From: Cris Di Sclafani
Date: Thu, 27 Aug 2020 15:33:38 +0000 (+0200)
Subject: Built motion from commit (unavailable).|2.5.0
X-Git-Url: http://repos.xcallymotion.com/base//%22https:/user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png/%22?a=commitdiff_plain;h=e72df25477a28ed0bcfb5e0057995ecb3b2d3f18;p=motion2.git
Built motion from commit (unavailable).|2.5.0
---
diff --git a/apidoc/api_project.js b/apidoc/api_project.js
index 904f0e4..4646545 100644
--- a/apidoc/api_project.js
+++ b/apidoc/api_project.js
@@ -1 +1 @@
-define({
"name": "xCALLY Motion API",
"version": "2.5.0",
"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-08-27T15:15:45.817Z",
"url": "http://apidocjs.com",
"version": "0.19.0"
}
});
+define({
"name": "xCALLY Motion API",
"version": "2.5.0",
"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-08-27T15:26:25.377Z",
"url": "http://apidocjs.com",
"version": "0.19.0"
}
});
diff --git a/apidoc/api_project.json b/apidoc/api_project.json
index 59b04bf..c5a1a4c 100644
--- a/apidoc/api_project.json
+++ b/apidoc/api_project.json
@@ -1 +1 @@
-{
"name": "xCALLY Motion API",
"version": "2.5.0",
"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-08-27T15:15:45.817Z",
"url": "http://apidocjs.com",
"version": "0.19.0"
}
}
+{
"name": "xCALLY Motion API",
"version": "2.5.0",
"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-08-27T15:26:25.377Z",
"url": "http://apidocjs.com",
"version": "0.19.0"
}
}
diff --git a/server/api/action/action.attributes.js b/server/api/action/action.attributes.js
index 4cd28b3..916bff7 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 _0x326b=['TEXT','sequelize','exports','VIRTUAL','getDataValue','STRING','contactManager','integration','motionbar','urlForward','browser','bot','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)]','motionbar[NULL,NULL,WinAppArguments]'];(function(_0x5acfc8,_0x518c17){var _0x238cf5=function(_0x1f3b17){while(--_0x1f3b17){_0x5acfc8['push'](_0x5acfc8['shift']());}};_0x238cf5(++_0x518c17);}(_0x326b,0x1a1));var _0xb326=function(_0x4254e7,_0x4fc342){_0x4254e7=_0x4254e7-0x0;var _0x5e0844=_0x326b[_0x4254e7];return _0x5e0844;};'use strict';var Sequelize=require(_0xb326('0x0'));module[_0xb326('0x1')]={'name':{'type':Sequelize[_0xb326('0x2')],'get':function(_0x7322b5){return this[_0xb326('0x3')]('action');}},'action':{'type':Sequelize[_0xb326('0x4')],'allowNull':![],'validate':{'isIn':{'args':[[_0xb326('0x5'),_0xb326('0x6'),_0xb326('0x7'),'jscripty',_0xb326('0x8'),_0xb326('0x9'),_0xb326('0xa'),_0xb326('0xb')]],'msg':_0xb326('0xc')}},'comment':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'},'data1':{'type':Sequelize[_0xb326('0x4')](0x1000),'comment':_0xb326('0xd')},'data2':{'type':Sequelize[_0xb326('0x4')](0x1000),'comment':'integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20urlForward[URL]'},'data3':{'type':Sequelize['STRING'](0x1000),'comment':_0xb326('0xe')},'data4':{'type':Sequelize[_0xb326('0x4')](0x1000)},'data5':{'type':Sequelize[_0xb326('0x4')](0x1000)},'data6':{'type':Sequelize[_0xb326('0x4')]},'data7':{'type':Sequelize[_0xb326('0xf')]}};
\ No newline at end of file
+var _0x0329=['action','STRING','contactManager','motionbar','jscripty','urlForward','browser','bot','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]','TEXT','sequelize','exports','VIRTUAL','getDataValue'];(function(_0x2903d4,_0x35d7c1){var _0x2d966f=function(_0x2a10c5){while(--_0x2a10c5){_0x2903d4['push'](_0x2903d4['shift']());}};_0x2d966f(++_0x35d7c1);}(_0x0329,0x6c));var _0x9032=function(_0x1f3aec,_0x24c18e){_0x1f3aec=_0x1f3aec-0x0;var _0x409f0d=_0x0329[_0x1f3aec];return _0x409f0d;};'use strict';var Sequelize=require(_0x9032('0x0'));module[_0x9032('0x1')]={'name':{'type':Sequelize[_0x9032('0x2')],'get':function(_0x52cd77){return this[_0x9032('0x3')](_0x9032('0x4'));}},'action':{'type':Sequelize[_0x9032('0x5')],'allowNull':![],'validate':{'isIn':{'args':[[_0x9032('0x6'),'integration',_0x9032('0x7'),_0x9032('0x8'),_0x9032('0x9'),_0x9032('0xa'),_0x9032('0xb'),'script']],'msg':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'}},'comment':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'},'data1':{'type':Sequelize[_0x9032('0x5')](0x1000),'comment':_0x9032('0xc')},'data2':{'type':Sequelize[_0x9032('0x5')](0x1000),'comment':_0x9032('0xd')},'data3':{'type':Sequelize[_0x9032('0x5')](0x1000),'comment':_0x9032('0xe')},'data4':{'type':Sequelize[_0x9032('0x5')](0x1000)},'data5':{'type':Sequelize['STRING'](0x1000)},'data6':{'type':Sequelize[_0x9032('0x5')]},'data7':{'type':Sequelize[_0x9032('0xf')]}};
\ No newline at end of file
diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js
index 161a9aa..f230a4a 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 _0x0481=['error','stack','name','send','body','find','params','catch','Action','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','Content-Range','apply','reject','save','update','then','destroy'];(function(_0x115b24,_0x238e3c){var _0x24de90=function(_0x2d3338){while(--_0x2d3338){_0x115b24['push'](_0x115b24['shift']());}};_0x24de90(++_0x238e3c);}(_0x0481,0xc5));var _0x1048=function(_0x7f287d,_0xe3b36e){_0x7f287d=_0x7f287d-0x0;var _0x21514f=_0x0481[_0x7f287d];return _0x21514f;};'use strict';var pdf=require(_0x1048('0x0'));var emlformat=require(_0x1048('0x1'));var rimraf=require(_0x1048('0x2'));var zipdir=require(_0x1048('0x3'));var jsonpatch=require(_0x1048('0x4'));var rp=require(_0x1048('0x5'));var moment=require(_0x1048('0x6'));var BPromise=require(_0x1048('0x7'));var Mustache=require(_0x1048('0x8'));var util=require(_0x1048('0x9'));var path=require(_0x1048('0xa'));var sox=require(_0x1048('0xb'));var csv=require('to-csv');var ejs=require(_0x1048('0xc'));var fs=require('fs');var _=require(_0x1048('0xd'));var squel=require(_0x1048('0xe'));var crypto=require('crypto');var jsforce=require(_0x1048('0xf'));var deskjs=require(_0x1048('0x10'));var toCsv=require(_0x1048('0x11'));var querystring=require(_0x1048('0x12'));var Papa=require(_0x1048('0x13'));var Redis=require('ioredis');var authService=require(_0x1048('0x14'));var qs=require('../../components/parsers/qs');var as=require(_0x1048('0x15'));var hardwareService=require(_0x1048('0x16'));var logger=require(_0x1048('0x17'))(_0x1048('0x18'));var utils=require('../../config/utils');var config=require(_0x1048('0x19'));var db=require(_0x1048('0x1a'))['db'];function respondWithStatusCode(_0x1e606c,_0x4d0eb2){_0x4d0eb2=_0x4d0eb2||0xcc;return function(_0x5a8330){if(_0x5a8330){return _0x1e606c[_0x1048('0x1b')](_0x4d0eb2);}return _0x1e606c[_0x1048('0x1c')](_0x4d0eb2)['end']();};}function respondWithResult(_0x30f660,_0x15075c){_0x15075c=_0x15075c||0xc8;return function(_0x3c5b6e){if(_0x3c5b6e){return _0x30f660[_0x1048('0x1c')](_0x15075c)[_0x1048('0x1d')](_0x3c5b6e);}};}function respondWithFilteredResult(_0x3ed1a3,_0x80107d){return function(_0x2eca45){if(_0x2eca45){var _0x2acf7d=_0x2eca45['count'],_0x42fb56=_0x80107d[_0x1048('0x1e')],_0x3e9d6f=_0x80107d[_0x1048('0x1e')]+_0x80107d['limit'],_0x1068af;if(_0x3e9d6f>=_0x2acf7d){_0x3e9d6f=_0x2acf7d;_0x1068af=0xc8;}else{_0x1068af=0xce;}_0x3ed1a3[_0x1048('0x1c')](_0x1068af);return _0x3ed1a3['set'](_0x1048('0x1f'),_0x42fb56+'-'+_0x3e9d6f+'/'+_0x2acf7d)[_0x1048('0x1d')](_0x2eca45);}return null;};}function patchUpdates(_0x43f9d6){return function(_0x28bc6c){try{jsonpatch[_0x1048('0x20')](_0x28bc6c,_0x43f9d6,!![]);}catch(_0x1dd56f){return BPromise[_0x1048('0x21')](_0x1dd56f);}return _0x28bc6c[_0x1048('0x22')]();};}function saveUpdates(_0x20318c,_0x1524db){return function(_0x47c051){if(_0x47c051){return _0x47c051[_0x1048('0x23')](_0x20318c)[_0x1048('0x24')](function(_0x1979d4){return _0x1979d4;});}return null;};}function removeEntity(_0x3e25ec,_0x692484){return function(_0x36fdfc){if(_0x36fdfc){return _0x36fdfc[_0x1048('0x25')]()['then'](function(){_0x3e25ec[_0x1048('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x9ed67a,_0x1bee2e){return function(_0x3b0168){if(!_0x3b0168){_0x9ed67a[_0x1048('0x1b')](0x194);}return _0x3b0168;};}function handleError(_0x15eb72,_0x301445){_0x301445=_0x301445||0x1f4;return function(_0x216150){logger[_0x1048('0x26')](_0x216150[_0x1048('0x27')]);if(_0x216150[_0x1048('0x28')]){delete _0x216150[_0x1048('0x28')];}_0x15eb72['status'](_0x301445)[_0x1048('0x29')](_0x216150);};}exports[_0x1048('0x23')]=function(_0x53b975,_0x17c199){if(_0x53b975[_0x1048('0x2a')]['id']){delete _0x53b975[_0x1048('0x2a')]['id'];}return db['Action'][_0x1048('0x2b')]({'where':{'id':_0x53b975[_0x1048('0x2c')]['id']}})[_0x1048('0x24')](handleEntityNotFound(_0x17c199,null))[_0x1048('0x24')](saveUpdates(_0x53b975[_0x1048('0x2a')],null))[_0x1048('0x24')](respondWithResult(_0x17c199,null))[_0x1048('0x2d')](handleError(_0x17c199,null));};exports['destroy']=function(_0x26cbbd,_0x5b28d7){return db[_0x1048('0x2e')][_0x1048('0x2b')]({'where':{'id':_0x26cbbd[_0x1048('0x2c')]['id']}})[_0x1048('0x24')](handleEntityNotFound(_0x5b28d7,null))[_0x1048('0x24')](removeEntity(_0x5b28d7,null))[_0x1048('0x2d')](handleError(_0x5b28d7,null));};
\ No newline at end of file
+var _0x6971=['destroy','error','stack','name','body','Action','find','params','catch','html-pdf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','save','update','then'];(function(_0xabf685,_0x2894a7){var _0x2ff8e7=function(_0x59afcb){while(--_0x59afcb){_0xabf685['push'](_0xabf685['shift']());}};_0x2ff8e7(++_0x2894a7);}(_0x6971,0x1ed));var _0x1697=function(_0x1fffb4,_0x4ff820){_0x1fffb4=_0x1fffb4-0x0;var _0x5e6336=_0x6971[_0x1fffb4];return _0x5e6336;};'use strict';var pdf=require(_0x1697('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x1697('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1697('0x2'));var moment=require(_0x1697('0x3'));var BPromise=require(_0x1697('0x4'));var Mustache=require(_0x1697('0x5'));var util=require(_0x1697('0x6'));var path=require(_0x1697('0x7'));var sox=require(_0x1697('0x8'));var csv=require(_0x1697('0x9'));var ejs=require(_0x1697('0xa'));var fs=require('fs');var _=require(_0x1697('0xb'));var squel=require(_0x1697('0xc'));var crypto=require('crypto');var jsforce=require(_0x1697('0xd'));var deskjs=require(_0x1697('0xe'));var toCsv=require(_0x1697('0x9'));var querystring=require(_0x1697('0xf'));var Papa=require(_0x1697('0x10'));var Redis=require(_0x1697('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1697('0x12'));var logger=require(_0x1697('0x13'))(_0x1697('0x14'));var utils=require(_0x1697('0x15'));var config=require(_0x1697('0x16'));var db=require(_0x1697('0x17'))['db'];function respondWithStatusCode(_0x5544d8,_0x126d62){_0x126d62=_0x126d62||0xcc;return function(_0x355922){if(_0x355922){return _0x5544d8[_0x1697('0x18')](_0x126d62);}return _0x5544d8[_0x1697('0x19')](_0x126d62)[_0x1697('0x1a')]();};}function respondWithResult(_0x2f9062,_0x1b0b42){_0x1b0b42=_0x1b0b42||0xc8;return function(_0x542a94){if(_0x542a94){return _0x2f9062[_0x1697('0x19')](_0x1b0b42)[_0x1697('0x1b')](_0x542a94);}};}function respondWithFilteredResult(_0x4b4141,_0x2be316){return function(_0x2a9b33){if(_0x2a9b33){var _0x2ee297=_0x2a9b33[_0x1697('0x1c')],_0x17a962=_0x2be316[_0x1697('0x1d')],_0x5adb3e=_0x2be316[_0x1697('0x1d')]+_0x2be316[_0x1697('0x1e')],_0x115f10;if(_0x5adb3e>=_0x2ee297){_0x5adb3e=_0x2ee297;_0x115f10=0xc8;}else{_0x115f10=0xce;}_0x4b4141['status'](_0x115f10);return _0x4b4141[_0x1697('0x1f')]('Content-Range',_0x17a962+'-'+_0x5adb3e+'/'+_0x2ee297)['json'](_0x2a9b33);}return null;};}function patchUpdates(_0x1b29ef){return function(_0x481b96){try{jsonpatch['apply'](_0x481b96,_0x1b29ef,!![]);}catch(_0x486346){return BPromise['reject'](_0x486346);}return _0x481b96[_0x1697('0x20')]();};}function saveUpdates(_0x2aa84b,_0xa02953){return function(_0x39e960){if(_0x39e960){return _0x39e960[_0x1697('0x21')](_0x2aa84b)[_0x1697('0x22')](function(_0xf87eda){return _0xf87eda;});}return null;};}function removeEntity(_0x5a5edc,_0x1764a3){return function(_0x169bb3){if(_0x169bb3){return _0x169bb3[_0x1697('0x23')]()[_0x1697('0x22')](function(){_0x5a5edc['status'](0xcc)[_0x1697('0x1a')]();});}};}function handleEntityNotFound(_0x49308a,_0x35f246){return function(_0x555b32){if(!_0x555b32){_0x49308a[_0x1697('0x18')](0x194);}return _0x555b32;};}function handleError(_0x5d57a5,_0x47bceb){_0x47bceb=_0x47bceb||0x1f4;return function(_0x1e8d1f){logger[_0x1697('0x24')](_0x1e8d1f[_0x1697('0x25')]);if(_0x1e8d1f[_0x1697('0x26')]){delete _0x1e8d1f[_0x1697('0x26')];}_0x5d57a5[_0x1697('0x19')](_0x47bceb)['send'](_0x1e8d1f);};}exports[_0x1697('0x21')]=function(_0xa65d99,_0x5cf33d){if(_0xa65d99[_0x1697('0x27')]['id']){delete _0xa65d99[_0x1697('0x27')]['id'];}return db[_0x1697('0x28')][_0x1697('0x29')]({'where':{'id':_0xa65d99[_0x1697('0x2a')]['id']}})['then'](handleEntityNotFound(_0x5cf33d,null))[_0x1697('0x22')](saveUpdates(_0xa65d99[_0x1697('0x27')],null))['then'](respondWithResult(_0x5cf33d,null))[_0x1697('0x2b')](handleError(_0x5cf33d,null));};exports[_0x1697('0x23')]=function(_0x10cc35,_0x2796ae){return db[_0x1697('0x28')][_0x1697('0x29')]({'where':{'id':_0x10cc35['params']['id']}})['then'](handleEntityNotFound(_0x2796ae,null))['then'](removeEntity(_0x2796ae,null))[_0x1697('0x2b')](handleError(_0x2796ae,null));};
\ No newline at end of file
diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js
index e8c2248..3ef710b 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 _0xd16e=['tools_actions','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','exports','define'];(function(_0x24875d,_0x4fb24d){var _0x181471=function(_0x4ecd6d){while(--_0x4ecd6d){_0x24875d['push'](_0x24875d['shift']());}};_0x181471(++_0x4fb24d);}(_0xd16e,0x151));var _0xed16=function(_0x40edb8,_0x142b1e){_0x40edb8=_0x40edb8-0x0;var _0x376675=_0xd16e[_0x40edb8];return _0x376675;};'use strict';var _=require(_0xed16('0x0'));var util=require(_0xed16('0x1'));var logger=require(_0xed16('0x2'))(_0xed16('0x3'));var moment=require(_0xed16('0x4'));var BPromise=require(_0xed16('0x5'));var rp=require(_0xed16('0x6'));var fs=require('fs');var path=require(_0xed16('0x7'));var rimraf=require('rimraf');var config=require(_0xed16('0x8'));var attributes=require('./action.attributes');module[_0xed16('0x9')]=function(_0x191f6b,_0x40571b){return _0x191f6b[_0xed16('0xa')]('Action',attributes,{'tableName':_0xed16('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xec9d=['../../config/environment','./action.attributes','define','Action','tools_actions','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x3a35fd,_0x28dee1){var _0x4bf833=function(_0x57ee75){while(--_0x57ee75){_0x3a35fd['push'](_0x3a35fd['shift']());}};_0x4bf833(++_0x28dee1);}(_0xec9d,0x1d3));var _0xdec9=function(_0x3b428b,_0xaf2f38){_0x3b428b=_0x3b428b-0x0;var _0x11a0c4=_0xec9d[_0x3b428b];return _0x11a0c4;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xdec9('0x0'))(_0xdec9('0x1'));var moment=require(_0xdec9('0x2'));var BPromise=require(_0xdec9('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdec9('0x4'));var rimraf=require(_0xdec9('0x5'));var config=require(_0xdec9('0x6'));var attributes=require(_0xdec9('0x7'));module['exports']=function(_0x35152b,_0x316caa){return _0x35152b[_0xdec9('0x8')](_0xdec9('0x9'),attributes,{'tableName':_0xdec9('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 3c8b6af..e3ac554 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 _0xe706=['http','request','then','info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\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(_0x23c72e,_0x36f5bc){var _0x2e0cab=function(_0xd8f49){while(--_0xd8f49){_0x23c72e['push'](_0x23c72e['shift']());}};_0x2e0cab(++_0x36f5bc);}(_0xe706,0xa3));var _0x6e70=function(_0x150961,_0x211501){_0x150961=_0x150961-0x0;var _0x5e210c=_0xe706[_0x150961];return _0x5e210c;};'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']('Action,\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']('Action,\x20%s,\x20%s',_0x293ce7,_0x161f23);_0x3c4843(_0x161f23);});});}
\ No newline at end of file
+var _0xe706=['http','request','then','info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\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(_0x50d78a,_0x1039c6){var _0x250b1d=function(_0x10c93a){while(--_0x10c93a){_0x50d78a['push'](_0x50d78a['shift']());}};_0x250b1d(++_0x1039c6);}(_0xe706,0xa3));var _0x6e70=function(_0x24c55d,_0x35e9f0){_0x24c55d=_0x24c55d-0x0;var _0x3776ba=_0xe706[_0x24c55d];return _0x3776ba;};'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']('Action,\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']('Action,\x20%s,\x20%s',_0x293ce7,_0x161f23);_0x3c4843(_0x161f23);});});}
\ No newline at end of file
diff --git a/server/api/action/index.js b/server/api/action/index.js
index 348b0f5..646740a 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 _0x26a0=['../../config/environment','./action.controller','put','/:id','isAuthenticated','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x3d8685,_0x2d049e){var _0x33ab81=function(_0x167fd6){while(--_0x167fd6){_0x3d8685['push'](_0x3d8685['shift']());}};_0x33ab81(++_0x2d049e);}(_0x26a0,0x1ab));var _0x026a=function(_0x44d40e,_0x385d76){_0x44d40e=_0x44d40e-0x0;var _0x49fa79=_0x26a0[_0x44d40e];return _0x49fa79;};'use strict';var multer=require(_0x026a('0x0'));var util=require('util');var path=require(_0x026a('0x1'));var timeout=require(_0x026a('0x2'));var express=require(_0x026a('0x3'));var router=express[_0x026a('0x4')]();var auth=require(_0x026a('0x5'));var interaction=require(_0x026a('0x6'));var config=require(_0x026a('0x7'));var controller=require(_0x026a('0x8'));router[_0x026a('0x9')](_0x026a('0xa'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x026a('0xa'),auth[_0x026a('0xb')](),controller[_0x026a('0xc')]);module[_0x026a('0xd')]=router;
\ No newline at end of file
+var _0xc25a=['../../config/environment','./action.controller','/:id','isAuthenticated','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x4d6e55,_0x59afcc){var _0x2184c6=function(_0x59729b){while(--_0x59729b){_0x4d6e55['push'](_0x4d6e55['shift']());}};_0x2184c6(++_0x59afcc);}(_0xc25a,0x170));var _0xac25=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0xc25a[_0x173441];return _0x2423a8;};'use strict';var multer=require(_0xac25('0x0'));var util=require(_0xac25('0x1'));var path=require(_0xac25('0x2'));var timeout=require(_0xac25('0x3'));var express=require(_0xac25('0x4'));var router=express[_0xac25('0x5')]();var auth=require(_0xac25('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xac25('0x7'));var controller=require(_0xac25('0x8'));router['put'](_0xac25('0x9'),auth[_0xac25('0xa')](),controller[_0xac25('0xb')]);router[_0xac25('0xc')](_0xac25('0x9'),auth[_0xac25('0xa')](),controller[_0xac25('0xd')]);module[_0xac25('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.attributes.js b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
index 500cf4d..4aaaf9b 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 _0x3970=['TEXT','sequelize','exports','STRING'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x3970,0xcd));var _0x0397=function(_0x3e6d5d,_0x264c7a){_0x3e6d5d=_0x3e6d5d-0x0;var _0x238923=_0x3970[_0x3e6d5d];return _0x238923;};'use strict';var Sequelize=require(_0x0397('0x0'));module[_0x0397('0x1')]={'name':{'type':Sequelize[_0x0397('0x2')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x0397('0x2')]},'table':{'type':Sequelize[_0x0397('0x2')]},'conditions':{'type':Sequelize[_0x0397('0x3')]},'joins':{'type':Sequelize[_0x0397('0x3')]}};
\ No newline at end of file
+var _0xaa88=['TEXT','sequelize','exports','STRING'];(function(_0x973ff3,_0x5906d2){var _0x4b2993=function(_0x3ddbff){while(--_0x3ddbff){_0x973ff3['push'](_0x973ff3['shift']());}};_0x4b2993(++_0x5906d2);}(_0xaa88,0x199));var _0x8aa8=function(_0x4ef734,_0x5826d){_0x4ef734=_0x4ef734-0x0;var _0x33a7cb=_0xaa88[_0x4ef734];return _0x33a7cb;};'use strict';var Sequelize=require(_0x8aa8('0x0'));module[_0x8aa8('0x1')]={'name':{'type':Sequelize[_0x8aa8('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x8aa8('0x2')]},'parent':{'type':Sequelize[_0x8aa8('0x2')]},'table':{'type':Sequelize[_0x8aa8('0x2')]},'conditions':{'type':Sequelize[_0x8aa8('0x3')]},'joins':{'type':Sequelize[_0x8aa8('0x3')]}};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js
index f51cc50..e5adb11 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 _0x4404=['moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','set','apply','reject','update','then','destroy','get','CustomReports','UserProfileResource','error','name','send','index','map','AnalyticCustomReport','rawAttributes','type','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','include','rows','catch','keys','find','create','body','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','preview','join','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','MAX(%s)','MIN(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20NOT\x20EMPTY','rules','operator','group','condition','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','findAll','keyBy','select','from','MetricId','metric','field','replace','format','groupBy','orderBy','DESC','alias','joins','parse','parentKey','foreignKey','foreignTable','%s.%s\x20=\x20%s.%s','conditions','debug','toString','sequelize','QueryTypes','SELECT','COUNT(DISTINCT\x20%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','IS\x20EMPTY','value','AnalyticMetric','table','function','clone','No\x20available\x20data','web','fullPath','%s-%s.%s','randomstring','csv','custom','cdr','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','fork','../../components/export/','output','../../files/reports','savename','countTable','COUNT(*)','run','runReport','Limited\x20Query:','html-pdf','rimraf','request-promise'];(function(_0x3729c8,_0x3bc53c){var _0x40eef8=function(_0x60c2e9){while(--_0x60c2e9){_0x3729c8['push'](_0x3729c8['shift']());}};_0x40eef8(++_0x3bc53c);}(_0x4404,0x1ef));var _0x4440=function(_0x398efc,_0x43b5e7){_0x398efc=_0x398efc-0x0;var _0x557ecc=_0x4404[_0x398efc];return _0x557ecc;};'use strict';var pdf=require(_0x4440('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x4440('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x4440('0x2'));var moment=require(_0x4440('0x3'));var BPromise=require(_0x4440('0x4'));var Mustache=require(_0x4440('0x5'));var util=require(_0x4440('0x6'));var path=require(_0x4440('0x7'));var sox=require(_0x4440('0x8'));var csv=require(_0x4440('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x4440('0xa'));var squel=require(_0x4440('0xb'));var crypto=require(_0x4440('0xc'));var jsforce=require(_0x4440('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x4440('0x9'));var querystring=require('querystring');var Papa=require(_0x4440('0xe'));var Redis=require(_0x4440('0xf'));var authService=require(_0x4440('0x10'));var qs=require(_0x4440('0x11'));var as=require(_0x4440('0x12'));var hardwareService=require(_0x4440('0x13'));var logger=require(_0x4440('0x14'))(_0x4440('0x15'));var utils=require(_0x4440('0x16'));var config=require(_0x4440('0x17'));var db=require(_0x4440('0x18'))['db'];function respondWithStatusCode(_0x1edcc8,_0x3f0444){_0x3f0444=_0x3f0444||0xcc;return function(_0x138013){if(_0x138013){return _0x1edcc8[_0x4440('0x19')](_0x3f0444);}return _0x1edcc8['status'](_0x3f0444)[_0x4440('0x1a')]();};}function respondWithResult(_0x505ef2,_0x939212){_0x939212=_0x939212||0xc8;return function(_0x2a48d7){if(_0x2a48d7){return _0x505ef2[_0x4440('0x1b')](_0x939212)[_0x4440('0x1c')](_0x2a48d7);}};}function respondWithFilteredResult(_0x2fbf73,_0x4a37e4){return function(_0x1f3481){if(_0x1f3481){var _0x1cfa62=_0x1f3481[_0x4440('0x1d')],_0xc976fe=_0x4a37e4[_0x4440('0x1e')],_0x1b8e02=_0x4a37e4[_0x4440('0x1e')]+_0x4a37e4['limit'],_0x53a244;if(_0x1b8e02>=_0x1cfa62){_0x1b8e02=_0x1cfa62;_0x53a244=0xc8;}else{_0x53a244=0xce;}_0x2fbf73[_0x4440('0x1b')](_0x53a244);return _0x2fbf73[_0x4440('0x1f')]('Content-Range',_0xc976fe+'-'+_0x1b8e02+'/'+_0x1cfa62)[_0x4440('0x1c')](_0x1f3481);}return null;};}function patchUpdates(_0x4ed2b2){return function(_0x3d5792){try{jsonpatch[_0x4440('0x20')](_0x3d5792,_0x4ed2b2,!![]);}catch(_0x26d404){return BPromise[_0x4440('0x21')](_0x26d404);}return _0x3d5792['save']();};}function saveUpdates(_0x18e769,_0x2fe7d8){return function(_0x26908b){if(_0x26908b){return _0x26908b[_0x4440('0x22')](_0x18e769)[_0x4440('0x23')](function(_0x4171c2){return _0x4171c2;});}return null;};}function removeEntity(_0x27620b,_0x4f0af2){return function(_0x384809){if(_0x384809){return _0x384809[_0x4440('0x24')]()[_0x4440('0x23')](function(){var _0x51aa5f=_0x384809[_0x4440('0x25')]({'plain':!![]});var _0x352809=_0x4440('0x26');return db[_0x4440('0x27')][_0x4440('0x24')]({'where':{'type':_0x352809,'resourceId':_0x51aa5f['id']}})[_0x4440('0x23')](function(){return _0x384809;});})[_0x4440('0x23')](function(){_0x27620b[_0x4440('0x1b')](0xcc)[_0x4440('0x1a')]();});}};}function handleEntityNotFound(_0x3ab89d,_0x21fc39){return function(_0x5d6b24){if(!_0x5d6b24){_0x3ab89d[_0x4440('0x19')](0x194);}return _0x5d6b24;};}function handleError(_0x4a1876,_0x412530){_0x412530=_0x412530||0x1f4;return function(_0x33ce61){logger[_0x4440('0x28')](_0x33ce61['stack']);if(_0x33ce61[_0x4440('0x29')]){delete _0x33ce61['name'];}_0x4a1876['status'](_0x412530)[_0x4440('0x2a')](_0x33ce61);};}exports[_0x4440('0x2b')]=function(_0x4657a6,_0x47660a){var _0x2c0dac={},_0x5e883e={},_0x32657f={'count':0x0,'rows':[]};var _0x5dce82=_[_0x4440('0x2c')](db[_0x4440('0x2d')][_0x4440('0x2e')],function(_0x970495){return{'name':_0x970495['fieldName'],'type':_0x970495[_0x4440('0x2f')]['key']};});_0x5e883e[_0x4440('0x30')]=_[_0x4440('0x2c')](_0x5dce82,'name');_0x5e883e[_0x4440('0x31')]=_['keys'](_0x4657a6[_0x4440('0x31')]);_0x5e883e[_0x4440('0x32')]=_[_0x4440('0x33')](_0x5e883e[_0x4440('0x30')],_0x5e883e[_0x4440('0x31')]);_0x2c0dac[_0x4440('0x34')]=_['intersection'](_0x5e883e[_0x4440('0x30')],qs[_0x4440('0x35')](_0x4657a6[_0x4440('0x31')][_0x4440('0x35')]));_0x2c0dac[_0x4440('0x34')]=_0x2c0dac['attributes'][_0x4440('0x36')]?_0x2c0dac[_0x4440('0x34')]:_0x5e883e[_0x4440('0x30')];if(!_0x4657a6[_0x4440('0x31')][_0x4440('0x37')](_0x4440('0x38'))){_0x2c0dac[_0x4440('0x39')]=qs[_0x4440('0x39')](_0x4657a6[_0x4440('0x31')][_0x4440('0x39')]);_0x2c0dac[_0x4440('0x1e')]=qs['offset'](_0x4657a6['query'][_0x4440('0x1e')]);}_0x2c0dac[_0x4440('0x3a')]=qs[_0x4440('0x3b')](_0x4657a6['query']['sort']);_0x2c0dac['where']=qs[_0x4440('0x32')](_[_0x4440('0x3c')](_0x4657a6[_0x4440('0x31')],_0x5e883e[_0x4440('0x32')]));if(_0x4657a6[_0x4440('0x31')][_0x4440('0x3d')]){_0x2c0dac['where']=_['merge'](_0x2c0dac[_0x4440('0x3e')],{'$or':_['map'](_0x5dce82,function(_0x216b10){if(_0x216b10[_0x4440('0x2f')]!==_0x4440('0x3f')){var _0x4fda5f={};_0x4fda5f[_0x216b10[_0x4440('0x29')]]={'$like':'%'+_0x4657a6[_0x4440('0x31')]['filter']+'%'};return _0x4fda5f;}})});}_0x2c0dac=_[_0x4440('0x40')]({},_0x2c0dac,_0x4657a6[_0x4440('0x41')]);var _0x9257bb={'where':_0x2c0dac[_0x4440('0x3e')]};return db['AnalyticCustomReport']['count'](_0x9257bb)[_0x4440('0x23')](function(_0x493251){_0x32657f[_0x4440('0x1d')]=_0x493251;if(_0x4657a6[_0x4440('0x31')][_0x4440('0x42')]){_0x2c0dac[_0x4440('0x43')]=[{'all':!![]}];}return db[_0x4440('0x2d')]['findAll'](_0x2c0dac);})['then'](function(_0x2779a3){_0x32657f[_0x4440('0x44')]=_0x2779a3;return _0x32657f;})[_0x4440('0x23')](respondWithFilteredResult(_0x47660a,_0x2c0dac))[_0x4440('0x45')](handleError(_0x47660a,null));};exports['show']=function(_0x499a7e,_0x3df8e9){var _0x47ada7={'raw':![],'where':{'id':_0x499a7e['params']['id']}},_0x5d4e67={};_0x5d4e67['model']=_[_0x4440('0x46')](db['AnalyticCustomReport'][_0x4440('0x2e')]);_0x5d4e67['query']=_[_0x4440('0x46')](_0x499a7e[_0x4440('0x31')]);_0x5d4e67[_0x4440('0x32')]=_[_0x4440('0x33')](_0x5d4e67[_0x4440('0x30')],_0x5d4e67[_0x4440('0x31')]);_0x47ada7[_0x4440('0x34')]=_[_0x4440('0x33')](_0x5d4e67[_0x4440('0x30')],qs[_0x4440('0x35')](_0x499a7e['query'][_0x4440('0x35')]));_0x47ada7[_0x4440('0x34')]=_0x47ada7['attributes'][_0x4440('0x36')]?_0x47ada7[_0x4440('0x34')]:_0x5d4e67['model'];if(_0x499a7e[_0x4440('0x31')][_0x4440('0x42')]){_0x47ada7[_0x4440('0x43')]=[{'all':!![]}];}_0x47ada7=_[_0x4440('0x40')]({},_0x47ada7,_0x499a7e[_0x4440('0x41')]);return db['AnalyticCustomReport'][_0x4440('0x47')](_0x47ada7)[_0x4440('0x23')](handleEntityNotFound(_0x3df8e9,null))[_0x4440('0x23')](respondWithResult(_0x3df8e9,null))[_0x4440('0x45')](handleError(_0x3df8e9,null));};exports[_0x4440('0x48')]=function(_0x4974fc,_0x5ecee2){return db[_0x4440('0x2d')][_0x4440('0x48')](_0x4974fc[_0x4440('0x49')],{})[_0x4440('0x23')](function(_0x520df9){var _0xf15ea1=_0x4974fc['user'][_0x4440('0x25')]({'plain':!![]});if(!_0xf15ea1)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xf15ea1[_0x4440('0x4a')]===_0x4440('0x4b')){var _0x464b0e=_0x520df9['get']({'plain':!![]});var _0x2adbbf='Reports';return db[_0x4440('0x4c')][_0x4440('0x47')]({'where':{'name':_0x2adbbf,'userProfileId':_0xf15ea1[_0x4440('0x4d')]},'raw':!![]})[_0x4440('0x23')](function(_0x24737d){if(_0x24737d&&_0x24737d[_0x4440('0x4e')]===0x0){return db[_0x4440('0x27')][_0x4440('0x48')]({'name':_0x464b0e[_0x4440('0x29')],'resourceId':_0x464b0e['id'],'type':_0x4440('0x26'),'sectionId':_0x24737d['id']},{})[_0x4440('0x23')](function(){return _0x520df9;});}else{return _0x520df9;}})[_0x4440('0x45')](function(_0x1052c7){logger[_0x4440('0x28')](_0x4440('0x4f'),_0x1052c7);throw _0x1052c7;});}return _0x520df9;})['then'](respondWithResult(_0x5ecee2,0xc9))['catch'](handleError(_0x5ecee2,null));};exports[_0x4440('0x22')]=function(_0x17171d,_0x724bba){if(_0x17171d[_0x4440('0x49')]['id']){delete _0x17171d[_0x4440('0x49')]['id'];}return db[_0x4440('0x2d')][_0x4440('0x47')]({'where':{'id':_0x17171d[_0x4440('0x50')]['id']}})[_0x4440('0x23')](handleEntityNotFound(_0x724bba,null))[_0x4440('0x23')](saveUpdates(_0x17171d[_0x4440('0x49')],null))[_0x4440('0x23')](respondWithResult(_0x724bba,null))[_0x4440('0x45')](handleError(_0x724bba,null));};exports[_0x4440('0x24')]=function(_0x2a2f7f,_0x54f203){return db[_0x4440('0x2d')][_0x4440('0x47')]({'where':{'id':_0x2a2f7f[_0x4440('0x50')]['id']}})[_0x4440('0x23')](handleEntityNotFound(_0x54f203,null))[_0x4440('0x23')](removeEntity(_0x54f203,null))[_0x4440('0x45')](handleError(_0x54f203,null));};exports[_0x4440('0x51')]=function(_0x1e362a,_0x306bda){var _0x260b99=0xa;var _0x2baa3f=[_0x4440('0x52'),_0x4440('0x53'),_0x4440('0x54'),_0x4440('0x55')];var _0x476336={'SUM':_0x4440('0x56'),'COUNT':_0x4440('0x57'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x4440('0x58'),'MIN':_0x4440('0x59'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x4440('0x5a'),'GROUP_CONCAT ASC':_0x4440('0x5b'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x2d6da4={'SEC_TO_TIME':_0x4440('0x5c'),'DATE':_0x4440('0x5d'),'HOUR':_0x4440('0x5e'),'ROUND':_0x4440('0x5f'),'UNIX_TIMESTAMP':_0x4440('0x60')};var _0x176ec0=function(_0x2b7c80){return!_[_0x4440('0x61')]([_0x4440('0x62'),_0x4440('0x63'),'IS\x20EMPTY',_0x4440('0x64')],_0x2b7c80);};var _0x1a98e8=function(_0x535f61){if(!_0x535f61||!_0x535f61[_0x4440('0x65')][_0x4440('0x36')]){return'';}for(var _0x201c7e='(',_0x3adec5=0x0;_0x3adec5<_0x535f61[_0x4440('0x65')][_0x4440('0x36')];_0x3adec5+=0x1){_0x3adec5>0x0&&(_0x201c7e+='\x20'+_0x535f61[_0x4440('0x66')]+'\x20');_0x201c7e+=_0x535f61['rules'][_0x3adec5]['group']?_0x1a98e8(_0x535f61[_0x4440('0x65')][_0x3adec5][_0x4440('0x67')]):_0x535f61['rules'][_0x3adec5]['field']+'\x20'+_0x535f61[_0x4440('0x65')][_0x3adec5][_0x4440('0x68')]+(_0x176ec0(_0x535f61['rules'][_0x3adec5][_0x4440('0x68')])?'\x20'+_0x535f61[_0x4440('0x65')][_0x3adec5]['value']:'');}return _0x201c7e+')';};var _0x1c92d5={'where':{'id':_0x1e362a[_0x4440('0x50')]['id']}},_0x36c8bf,_0x1a1cf9,_0x1be079,_0x1ba60c,_0x453b30;_0x1c92d5=_[_0x4440('0x40')]({},_0x1c92d5,_0x1e362a[_0x4440('0x41')]);return db[_0x4440('0x2d')][_0x4440('0x47')](_0x1c92d5)['then'](function(_0x43d0cd){if(_0x43d0cd){_0x36c8bf=_0x43d0cd;return _0x43d0cd[_0x4440('0x69')]();}return null;})[_0x4440('0x23')](function(_0x720031){if(_0x720031){if(!_0x720031[_0x4440('0x36')]){throw new db[(_0x4440('0x6a'))][(_0x4440('0x6b'))](_0x4440('0x6c'),0x193);}_0x1a1cf9=_0x720031;return db['AnalyticMetric'][_0x4440('0x6d')]({'raw':!![]});}return null;})[_0x4440('0x23')](function(_0x2cded5){if(_0x2cded5){_0x1be079=_[_0x4440('0x6e')](_0x2cded5,'id');var _0x1b7ae3;var _0x6499e8=squel[_0x4440('0x6f')]();_0x6499e8[_0x4440('0x70')](_0x36c8bf['table']);for(var _0x3252e7=0x0;_0x3252e7<_0x1a1cf9[_0x4440('0x36')];_0x3252e7+=0x1){_0x1b7ae3=_0x1a1cf9[_0x3252e7]['MetricId']?_0x1be079[_0x1a1cf9[_0x3252e7][_0x4440('0x71')]][_0x4440('0x72')]:_0x1a1cf9[_0x3252e7][_0x4440('0x73')];_0x1b7ae3=_0x1a1cf9[_0x3252e7]['function']?_[_0x4440('0x74')](_0x476336[_0x1a1cf9[_0x3252e7]['function']],'%s',_0x1b7ae3):_0x1b7ae3;_0x1b7ae3=_0x1a1cf9[_0x3252e7][_0x4440('0x75')]?_[_0x4440('0x74')](_0x2d6da4[_0x1a1cf9[_0x3252e7]['format']],'%s',_0x1b7ae3):_0x1b7ae3;if(_0x1a1cf9[_0x3252e7][_0x4440('0x76')]){_0x6499e8['group'](_0x1b7ae3);}_0x1a1cf9[_0x3252e7][_0x4440('0x77')]&&_0x6499e8['order'](_0x1b7ae3,_0x1a1cf9[_0x3252e7]['orderBy']===_0x4440('0x78')?![]:!![]);_0x6499e8[_0x4440('0x73')](_0x1b7ae3,_0x1a1cf9[_0x3252e7][_0x4440('0x79')]||_0x1b7ae3);}if(_0x36c8bf['joins']){_0x36c8bf[_0x4440('0x7a')]=JSON[_0x4440('0x7b')](_0x36c8bf[_0x4440('0x7a')]);for(var _0x3a6658=0x0;_0x3a6658<_0x36c8bf[_0x4440('0x7a')]['length'];_0x3a6658+=0x1){if(_0x36c8bf[_0x4440('0x7a')][_0x3a6658]['type']&&_[_0x4440('0x61')](_0x2baa3f,_0x36c8bf[_0x4440('0x7a')][_0x3a6658][_0x4440('0x2f')])&&_0x36c8bf[_0x4440('0x7a')][_0x3a6658][_0x4440('0x7c')]&&_0x36c8bf[_0x4440('0x7a')][_0x3a6658]['foreignTable']&&_0x36c8bf[_0x4440('0x7a')][_0x3a6658][_0x4440('0x7d')]){_0x6499e8[_0x36c8bf[_0x4440('0x7a')][_0x3a6658]['type']](_0x36c8bf[_0x4440('0x7a')][_0x3a6658][_0x4440('0x7e')],null,util[_0x4440('0x75')](_0x4440('0x7f'),_0x36c8bf['table'],_0x36c8bf[_0x4440('0x7a')][_0x3a6658][_0x4440('0x7c')],_0x36c8bf[_0x4440('0x7a')][_0x3a6658]['foreignTable'],_0x36c8bf[_0x4440('0x7a')][_0x3a6658]['foreignKey']));}}}if(_0x36c8bf[_0x4440('0x80')]){_0x36c8bf[_0x4440('0x80')]=JSON[_0x4440('0x7b')](_0x36c8bf[_0x4440('0x80')]);_0x6499e8[_0x4440('0x3e')](_0x1a98e8(_0x36c8bf['conditions'][_0x4440('0x67')]));}_0x453b30=_0x6499e8['clone']();_0x6499e8[_0x4440('0x39')](_0x260b99);_0x6499e8[_0x4440('0x1e')](0x0);logger[_0x4440('0x81')]('Limited\x20Query:',_0x6499e8[_0x4440('0x82')]());return db[_0x4440('0x83')][_0x4440('0x31')](_0x6499e8[_0x4440('0x82')](),{'type':db['sequelize'][_0x4440('0x84')][_0x4440('0x85')]});}})[_0x4440('0x23')](respondWithResult(_0x306bda,null))[_0x4440('0x45')](handleError(_0x306bda,null));};function runReport(_0x55ad82,_0x22e0da,_0x5b19ac){var _0xc89b22=_0x22e0da['name'];var _0x519788=0xa;var _0xc226d8=[_0x4440('0x52'),'left_join',_0x4440('0x54'),_0x4440('0x55')];var _0x2e1c38={'SUM':_0x4440('0x56'),'COUNT':_0x4440('0x57'),'COUNT DISTINCT':_0x4440('0x86'),'MAX':_0x4440('0x58'),'MIN':_0x4440('0x59'),'AVG':_0x4440('0x87'),'GROUP_CONCAT':_0x4440('0x5a'),'GROUP_CONCAT ASC':_0x4440('0x5b'),'GROUP_CONCAT DESC':_0x4440('0x88')};var _0x57130e={'SEC_TO_TIME':_0x4440('0x5c'),'DATE':_0x4440('0x5d'),'HOUR':_0x4440('0x5e'),'ROUND':_0x4440('0x5f'),'UNIX_TIMESTAMP':_0x4440('0x60')};var _0x51609b=function(_0xd41e75){return!_[_0x4440('0x61')](['IS\x20NULL',_0x4440('0x63'),_0x4440('0x89'),_0x4440('0x64')],_0xd41e75);};var _0x6d68f6=function(_0x4164fc){if(!_0x4164fc||!_0x4164fc[_0x4440('0x65')]['length']){return'';}for(var _0x167479='(',_0x47c8e4=0x0;_0x47c8e4<_0x4164fc[_0x4440('0x65')][_0x4440('0x36')];_0x47c8e4+=0x1){_0x47c8e4>0x0&&(_0x167479+='\x20'+_0x4164fc[_0x4440('0x66')]+'\x20');_0x167479+=_0x4164fc[_0x4440('0x65')][_0x47c8e4][_0x4440('0x67')]?_0x6d68f6(_0x4164fc[_0x4440('0x65')][_0x47c8e4][_0x4440('0x67')]):_0x4164fc[_0x4440('0x65')][_0x47c8e4][_0x4440('0x73')]+'\x20'+_0x4164fc[_0x4440('0x65')][_0x47c8e4]['condition']+(_0x51609b(_0x4164fc['rules'][_0x47c8e4][_0x4440('0x68')])?'\x20'+_0x4164fc[_0x4440('0x65')][_0x47c8e4][_0x4440('0x8a')]:'');}return _0x167479+')';};var _0x2cc956={'where':{'id':_0x55ad82['id']}},_0x451274,_0x5b33c7,_0x618e65,_0x29581b,_0x21b632;_0x2cc956=_['merge']({},_0x2cc956,_0x5b19ac);return db[_0x4440('0x2d')][_0x4440('0x47')](_0x2cc956)[_0x4440('0x23')](function(_0xe36e0e){if(_0xe36e0e){_0x451274=_0xe36e0e;return _0xe36e0e['getFields']();}return null;})[_0x4440('0x23')](function(_0x3cea99){if(_0x3cea99){if(!_0x3cea99['length']){throw new db['Sequelize'][(_0x4440('0x6b'))](_0x4440('0x6c'),0x193);}_0x5b33c7=_0x3cea99;return db[_0x4440('0x8b')][_0x4440('0x6d')]({'raw':!![]});}return null;})[_0x4440('0x23')](function(_0x551337){if(_0x551337){_0x618e65=_[_0x4440('0x6e')](_0x551337,'id');var _0x4c39c4;var _0x17dc75=squel[_0x4440('0x6f')]();_0x17dc75[_0x4440('0x70')](_0x451274[_0x4440('0x8c')]);for(var _0x3d8825=0x0;_0x3d8825<_0x5b33c7[_0x4440('0x36')];_0x3d8825+=0x1){_0x4c39c4=_0x5b33c7[_0x3d8825][_0x4440('0x71')]?_0x618e65[_0x5b33c7[_0x3d8825][_0x4440('0x71')]]['metric']:_0x5b33c7[_0x3d8825][_0x4440('0x73')];_0x4c39c4=_0x5b33c7[_0x3d8825][_0x4440('0x8d')]?_['replace'](_0x2e1c38[_0x5b33c7[_0x3d8825][_0x4440('0x8d')]],'%s',_0x4c39c4):_0x4c39c4;_0x4c39c4=_0x5b33c7[_0x3d8825][_0x4440('0x75')]?_[_0x4440('0x74')](_0x57130e[_0x5b33c7[_0x3d8825]['format']],'%s',_0x4c39c4):_0x4c39c4;if(_0x5b33c7[_0x3d8825][_0x4440('0x76')]){_0x17dc75['group'](_0x4c39c4);}_0x5b33c7[_0x3d8825][_0x4440('0x77')]&&_0x17dc75[_0x4440('0x3a')](_0x4c39c4,_0x5b33c7[_0x3d8825][_0x4440('0x77')]===_0x4440('0x78')?![]:!![]);_0x17dc75[_0x4440('0x73')](_0x4c39c4,_0x5b33c7[_0x3d8825]['alias']||_0x4c39c4);}if(_0x451274['joins']){_0x451274[_0x4440('0x7a')]=JSON[_0x4440('0x7b')](_0x451274[_0x4440('0x7a')]);for(var _0x30ac9e=0x0;_0x30ac9e<_0x451274[_0x4440('0x7a')]['length'];_0x30ac9e+=0x1){if(_0x451274['joins'][_0x30ac9e][_0x4440('0x2f')]&&_[_0x4440('0x61')](_0xc226d8,_0x451274['joins'][_0x30ac9e][_0x4440('0x2f')])&&_0x451274[_0x4440('0x7a')][_0x30ac9e][_0x4440('0x7c')]&&_0x451274[_0x4440('0x7a')][_0x30ac9e][_0x4440('0x7e')]&&_0x451274[_0x4440('0x7a')][_0x30ac9e]['foreignKey']){_0x17dc75[_0x451274[_0x4440('0x7a')][_0x30ac9e][_0x4440('0x2f')]](_0x451274[_0x4440('0x7a')][_0x30ac9e][_0x4440('0x7e')],null,util[_0x4440('0x75')]('%s.%s\x20=\x20%s.%s',_0x451274[_0x4440('0x8c')],_0x451274[_0x4440('0x7a')][_0x30ac9e][_0x4440('0x7c')],_0x451274[_0x4440('0x7a')][_0x30ac9e][_0x4440('0x7e')],_0x451274['joins'][_0x30ac9e][_0x4440('0x7d')]));}}}if(_0x451274[_0x4440('0x80')]){_0x451274[_0x4440('0x80')]=JSON[_0x4440('0x7b')](_0x451274['conditions']);_0x17dc75[_0x4440('0x3e')](_0x6d68f6(_0x451274[_0x4440('0x80')]['group']));}_0x21b632=_0x17dc75[_0x4440('0x8e')]();_0x17dc75[_0x4440('0x39')](_0x519788);_0x17dc75[_0x4440('0x1e')](0x0);logger['debug']('Limited\x20Query:',_0x17dc75[_0x4440('0x82')]());return db['sequelize'][_0x4440('0x31')](_0x17dc75[_0x4440('0x82')](),{'type':db[_0x4440('0x83')][_0x4440('0x84')][_0x4440('0x85')]});}})[_0x4440('0x23')](function(_0x5fd872){if(!_0x5fd872[_0x4440('0x36')]){throw new db['Sequelize'][(_0x4440('0x6b'))](_0x4440('0x8f'),0xcc);}if(_0x22e0da['output']===_0x4440('0x90')){return null;}var _0x1cfd4c=_[_0x4440('0x40')](_0x22e0da,{'name':_0x22e0da[_0x4440('0x91')]||_0x22e0da['name']||_0x451274[_0x4440('0x29')],'basename':_0xc89b22,'savename':util[_0x4440('0x75')](_0x4440('0x92'),_0x22e0da[_0x4440('0x29')]||_0x451274[_0x4440('0x29')],require(_0x4440('0x93'))['generate'](0x4),_0x22e0da['output']||_0x4440('0x94')),'reportId':_0x451274['id'],'reportType':_0x4440('0x95')});return db['AnalyticExtractedReport'][_0x4440('0x48')](_0x1cfd4c,{'raw':!![]});})[_0x4440('0x23')](function(_0x42fd6e){if(_0x451274[_0x4440('0x8c')]===_0x4440('0x96')){_0x21b632[_0x4440('0x3e')](_0x451274[_0x4440('0x8c')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x22e0da[_0x4440('0x97')],_0x22e0da[_0x4440('0x98')]);}else{_0x21b632[_0x4440('0x3e')](_0x451274[_0x4440('0x8c')]+_0x4440('0x99'),_0x22e0da[_0x4440('0x97')],_0x22e0da[_0x4440('0x98')]);}if(_0x42fd6e){logger[_0x4440('0x9a')](_0x4440('0x9b'),_0x21b632['toString']());require('child_process')[_0x4440('0x9c')](path['join'](__dirname,_0x4440('0x9d'),_0x42fd6e[_0x4440('0x9e')]),[_0x42fd6e['id'],_0x21b632[_0x4440('0x82')](),path[_0x4440('0x52')](__dirname,_0x4440('0x9f'),_0x42fd6e[_0x4440('0xa0')]),_0xc89b22]);return _0x42fd6e;}else{var _0x258b46=squel['select']();_0x258b46['from']('('+_0x21b632[_0x4440('0x82')]()+')',_0x4440('0xa1'));_0x258b46['field'](_0x4440('0xa2'),_0x4440('0x1d'));_0x21b632[_0x4440('0x39')](_0x22e0da[_0x4440('0x39')]||_0x519788);_0x21b632[_0x4440('0x1e')](_0x22e0da['offset']||0x0);return db[_0x4440('0x83')][_0x4440('0x31')](_0x258b46[_0x4440('0x82')](),{'type':db['sequelize'][_0x4440('0x84')][_0x4440('0x85')]})['then'](function(_0x4b9d6c){if(!_0x4b9d6c[_0x4440('0x36')]){_0x29581b=0x0;}else{_0x29581b=_0x4b9d6c[0x0][_0x4440('0x1d')]||0x0;}return db[_0x4440('0x83')][_0x4440('0x31')](_0x21b632['toString'](),{'type':db[_0x4440('0x83')][_0x4440('0x84')][_0x4440('0x85')]});})[_0x4440('0x23')](function(_0x3b2fde){return{'rows':_0x3b2fde||[],'count':_0x29581b};});}});}exports[_0x4440('0xa3')]=function(_0x501ad3,_0x2e79eb){return runReport(_0x501ad3[_0x4440('0x50')],_0x501ad3[_0x4440('0x31')],_0x501ad3[_0x4440('0x41')])[_0x4440('0x23')](respondWithResult(_0x2e79eb,null))[_0x4440('0x45')](handleError(_0x2e79eb,null));};exports[_0x4440('0xa4')]=runReport;exports['query']=function(_0x3797b1,_0x8e2b3e){var _0x1c40d4=0xa;var _0x336144=[_0x4440('0x52'),_0x4440('0x53'),_0x4440('0x54'),_0x4440('0x55')];var _0x4cca02={'SUM':_0x4440('0x56'),'COUNT':_0x4440('0x57'),'COUNT DISTINCT':_0x4440('0x86'),'MAX':_0x4440('0x58'),'MIN':_0x4440('0x59'),'AVG':_0x4440('0x87'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x4440('0x5b'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x251a1a={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':_0x4440('0x5e'),'ROUND':_0x4440('0x5f'),'UNIX_TIMESTAMP':_0x4440('0x60')};var _0x252c69=function(_0x3b962b){return!_[_0x4440('0x61')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x4440('0x89'),'IS\x20NOT\x20EMPTY'],_0x3b962b);};var _0x373d3c=function(_0x37eeb4){if(!_0x37eeb4||!_0x37eeb4[_0x4440('0x65')][_0x4440('0x36')]){return'';}for(var _0xe5b2d='(',_0x3ddaad=0x0;_0x3ddaad<_0x37eeb4[_0x4440('0x65')][_0x4440('0x36')];_0x3ddaad+=0x1){_0x3ddaad>0x0&&(_0xe5b2d+='\x20'+_0x37eeb4[_0x4440('0x66')]+'\x20');_0xe5b2d+=_0x37eeb4[_0x4440('0x65')][_0x3ddaad][_0x4440('0x67')]?_0x373d3c(_0x37eeb4[_0x4440('0x65')][_0x3ddaad][_0x4440('0x67')]):_0x37eeb4[_0x4440('0x65')][_0x3ddaad]['field']+'\x20'+_0x37eeb4[_0x4440('0x65')][_0x3ddaad][_0x4440('0x68')]+(_0x252c69(_0x37eeb4[_0x4440('0x65')][_0x3ddaad][_0x4440('0x68')])?'\x20'+_0x37eeb4[_0x4440('0x65')][_0x3ddaad][_0x4440('0x8a')]:'');}return _0xe5b2d+')';};var _0x55ec04={'where':{'id':_0x3797b1['params']['id']}},_0x6addfd,_0x3649b7,_0x374119,_0x44a57f,_0x3c30a9;_0x55ec04=_[_0x4440('0x40')]({},_0x55ec04,_0x3797b1[_0x4440('0x41')]);return db[_0x4440('0x2d')]['find'](_0x55ec04)[_0x4440('0x23')](function(_0x553c79){if(_0x553c79){_0x6addfd=_0x553c79;return _0x553c79[_0x4440('0x69')]();}return null;})[_0x4440('0x23')](function(_0x3dc428){if(_0x3dc428){if(!_0x3dc428[_0x4440('0x36')]){throw new db[(_0x4440('0x6a'))][(_0x4440('0x6b'))](_0x4440('0x6c'),0x193);}_0x3649b7=_0x3dc428;return db[_0x4440('0x8b')][_0x4440('0x6d')]({'raw':!![]});}return null;})[_0x4440('0x23')](function(_0x4e1c65){if(_0x4e1c65){_0x374119=_['keyBy'](_0x4e1c65,'id');var _0x33ff2d;var _0x229ac9=squel[_0x4440('0x6f')]();_0x229ac9[_0x4440('0x70')](_0x6addfd[_0x4440('0x8c')]);for(var _0x41c363=0x0;_0x41c363<_0x3649b7[_0x4440('0x36')];_0x41c363+=0x1){_0x33ff2d=_0x3649b7[_0x41c363][_0x4440('0x71')]?_0x374119[_0x3649b7[_0x41c363][_0x4440('0x71')]][_0x4440('0x72')]:_0x3649b7[_0x41c363]['field'];_0x33ff2d=_0x3649b7[_0x41c363]['function']?_['replace'](_0x4cca02[_0x3649b7[_0x41c363][_0x4440('0x8d')]],'%s',_0x33ff2d):_0x33ff2d;_0x33ff2d=_0x3649b7[_0x41c363][_0x4440('0x75')]?_[_0x4440('0x74')](_0x251a1a[_0x3649b7[_0x41c363]['format']],'%s',_0x33ff2d):_0x33ff2d;if(_0x3649b7[_0x41c363][_0x4440('0x76')]){_0x229ac9[_0x4440('0x67')](_0x33ff2d);}_0x3649b7[_0x41c363][_0x4440('0x77')]&&_0x229ac9['order'](_0x33ff2d,_0x3649b7[_0x41c363]['orderBy']===_0x4440('0x78')?![]:!![]);_0x229ac9['field'](_0x33ff2d,_0x3649b7[_0x41c363][_0x4440('0x79')]||_0x33ff2d);}if(_0x6addfd[_0x4440('0x7a')]){_0x6addfd[_0x4440('0x7a')]=JSON[_0x4440('0x7b')](_0x6addfd[_0x4440('0x7a')]);for(var _0x1751d2=0x0;_0x1751d2<_0x6addfd[_0x4440('0x7a')]['length'];_0x1751d2+=0x1){if(_0x6addfd['joins'][_0x1751d2][_0x4440('0x2f')]&&_[_0x4440('0x61')](_0x336144,_0x6addfd['joins'][_0x1751d2][_0x4440('0x2f')])&&_0x6addfd['joins'][_0x1751d2][_0x4440('0x7c')]&&_0x6addfd[_0x4440('0x7a')][_0x1751d2]['foreignTable']&&_0x6addfd[_0x4440('0x7a')][_0x1751d2][_0x4440('0x7d')]){_0x229ac9[_0x6addfd[_0x4440('0x7a')][_0x1751d2]['type']](_0x6addfd[_0x4440('0x7a')][_0x1751d2][_0x4440('0x7e')],null,util[_0x4440('0x75')]('%s.%s\x20=\x20%s.%s',_0x6addfd['table'],_0x6addfd[_0x4440('0x7a')][_0x1751d2][_0x4440('0x7c')],_0x6addfd[_0x4440('0x7a')][_0x1751d2][_0x4440('0x7e')],_0x6addfd[_0x4440('0x7a')][_0x1751d2][_0x4440('0x7d')]));}}}if(_0x6addfd[_0x4440('0x80')]){_0x6addfd['conditions']=JSON[_0x4440('0x7b')](_0x6addfd[_0x4440('0x80')]);_0x229ac9[_0x4440('0x3e')](_0x373d3c(_0x6addfd['conditions']['group']));}_0x3c30a9=_0x229ac9['clone']();_0x229ac9['limit'](_0x1c40d4);_0x229ac9[_0x4440('0x1e')](0x0);logger['debug'](_0x4440('0xa5'),_0x229ac9['toString']());return db['sequelize']['query'](_0x229ac9['toString'](),{'type':db['sequelize'][_0x4440('0x84')][_0x4440('0x85')]});}})[_0x4440('0x23')](function(){return{'sql':_0x3c30a9[_0x4440('0x82')]()};})[_0x4440('0x23')](respondWithResult(_0x8e2b3e,null))[_0x4440('0x45')](handleError(_0x8e2b3e,null));};
\ No newline at end of file
+var _0xaf79=['reject','save','update','then','destroy','UserProfileResource','stack','name','send','fieldName','key','model','map','keys','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filters','where','type','merge','options','AnalyticCustomReport','includeAll','include','findAll','rows','catch','show','params','find','create','body','user','get','role','Reports','UserProfileSection','userProfileId','autoAssociation','CustomReports','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','left_join','right_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','rules','operator','group','field','condition','value','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','from','table','MetricId','metric','function','replace','format','groupBy','orderBy','alias','joins','parse','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','parentKey','conditions','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','cross_join','IS\x20EMPTY','IS\x20NOT\x20EMPTY','getFields','DESC','clone','ValidationErrorItem','output','web','fullPath','randomstring','generate','csv','custom','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','child_process','fork','../../components/export/','../../files/reports','select','runReport','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','DATE(%s)','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','end','status','json','count','offset','limit'];(function(_0x134c2e,_0x3573c4){var _0x2825db=function(_0x2a574d){while(--_0x2a574d){_0x134c2e['push'](_0x134c2e['shift']());}};_0x2825db(++_0x3573c4);}(_0xaf79,0x82));var _0x9af7=function(_0x3a69c8,_0xf641ce){_0x3a69c8=_0x3a69c8-0x0;var _0x17896b=_0xaf79[_0x3a69c8];return _0x17896b;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x9af7('0x0'));var rimraf=require(_0x9af7('0x1'));var zipdir=require(_0x9af7('0x2'));var jsonpatch=require(_0x9af7('0x3'));var rp=require(_0x9af7('0x4'));var moment=require(_0x9af7('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x9af7('0x6'));var util=require(_0x9af7('0x7'));var path=require(_0x9af7('0x8'));var sox=require(_0x9af7('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x9af7('0xa'));var squel=require(_0x9af7('0xb'));var crypto=require(_0x9af7('0xc'));var jsforce=require(_0x9af7('0xd'));var deskjs=require(_0x9af7('0xe'));var toCsv=require(_0x9af7('0xf'));var querystring=require(_0x9af7('0x10'));var Papa=require(_0x9af7('0x11'));var Redis=require(_0x9af7('0x12'));var authService=require(_0x9af7('0x13'));var qs=require(_0x9af7('0x14'));var as=require(_0x9af7('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9af7('0x16'))(_0x9af7('0x17'));var utils=require(_0x9af7('0x18'));var config=require(_0x9af7('0x19'));var db=require(_0x9af7('0x1a'))['db'];function respondWithStatusCode(_0x1f76b3,_0x70c042){_0x70c042=_0x70c042||0xcc;return function(_0x10ef85){if(_0x10ef85){return _0x1f76b3['sendStatus'](_0x70c042);}return _0x1f76b3['status'](_0x70c042)[_0x9af7('0x1b')]();};}function respondWithResult(_0x3f7b70,_0x1bf989){_0x1bf989=_0x1bf989||0xc8;return function(_0x264344){if(_0x264344){return _0x3f7b70[_0x9af7('0x1c')](_0x1bf989)[_0x9af7('0x1d')](_0x264344);}};}function respondWithFilteredResult(_0x37e741,_0x539cd5){return function(_0x5cd00e){if(_0x5cd00e){var _0x471c1a=_0x5cd00e[_0x9af7('0x1e')],_0x197f67=_0x539cd5[_0x9af7('0x1f')],_0x4e0cf3=_0x539cd5[_0x9af7('0x1f')]+_0x539cd5[_0x9af7('0x20')],_0x229e2f;if(_0x4e0cf3>=_0x471c1a){_0x4e0cf3=_0x471c1a;_0x229e2f=0xc8;}else{_0x229e2f=0xce;}_0x37e741[_0x9af7('0x1c')](_0x229e2f);return _0x37e741['set']('Content-Range',_0x197f67+'-'+_0x4e0cf3+'/'+_0x471c1a)['json'](_0x5cd00e);}return null;};}function patchUpdates(_0x3da4ec){return function(_0x8b1434){try{jsonpatch['apply'](_0x8b1434,_0x3da4ec,!![]);}catch(_0x45d0d7){return BPromise[_0x9af7('0x21')](_0x45d0d7);}return _0x8b1434[_0x9af7('0x22')]();};}function saveUpdates(_0x1302f9,_0x52a0bf){return function(_0x5cf9fc){if(_0x5cf9fc){return _0x5cf9fc[_0x9af7('0x23')](_0x1302f9)[_0x9af7('0x24')](function(_0x443a5b){return _0x443a5b;});}return null;};}function removeEntity(_0x42c957,_0x221c35){return function(_0x5ae169){if(_0x5ae169){return _0x5ae169[_0x9af7('0x25')]()[_0x9af7('0x24')](function(){var _0x517072=_0x5ae169['get']({'plain':!![]});var _0x3c20c2='CustomReports';return db[_0x9af7('0x26')][_0x9af7('0x25')]({'where':{'type':_0x3c20c2,'resourceId':_0x517072['id']}})['then'](function(){return _0x5ae169;});})['then'](function(){_0x42c957['status'](0xcc)[_0x9af7('0x1b')]();});}};}function handleEntityNotFound(_0x142890,_0x5ded35){return function(_0x4ab9ba){if(!_0x4ab9ba){_0x142890['sendStatus'](0x194);}return _0x4ab9ba;};}function handleError(_0x42cc55,_0x4ddbad){_0x4ddbad=_0x4ddbad||0x1f4;return function(_0x19f20c){logger['error'](_0x19f20c[_0x9af7('0x27')]);if(_0x19f20c[_0x9af7('0x28')]){delete _0x19f20c[_0x9af7('0x28')];}_0x42cc55[_0x9af7('0x1c')](_0x4ddbad)[_0x9af7('0x29')](_0x19f20c);};}exports['index']=function(_0x1f69da,_0x1edad2){var _0x4a74bd={},_0x167b05={},_0x45d6f2={'count':0x0,'rows':[]};var _0x509157=_['map'](db['AnalyticCustomReport']['rawAttributes'],function(_0x785a6c){return{'name':_0x785a6c[_0x9af7('0x2a')],'type':_0x785a6c['type'][_0x9af7('0x2b')]};});_0x167b05[_0x9af7('0x2c')]=_[_0x9af7('0x2d')](_0x509157,_0x9af7('0x28'));_0x167b05['query']=_[_0x9af7('0x2e')](_0x1f69da['query']);_0x167b05['filters']=_['intersection'](_0x167b05['model'],_0x167b05[_0x9af7('0x2f')]);_0x4a74bd['attributes']=_[_0x9af7('0x30')](_0x167b05['model'],qs['fields'](_0x1f69da[_0x9af7('0x2f')][_0x9af7('0x31')]));_0x4a74bd['attributes']=_0x4a74bd[_0x9af7('0x32')][_0x9af7('0x33')]?_0x4a74bd['attributes']:_0x167b05[_0x9af7('0x2c')];if(!_0x1f69da['query'][_0x9af7('0x34')](_0x9af7('0x35'))){_0x4a74bd['limit']=qs[_0x9af7('0x20')](_0x1f69da[_0x9af7('0x2f')][_0x9af7('0x20')]);_0x4a74bd[_0x9af7('0x1f')]=qs[_0x9af7('0x1f')](_0x1f69da[_0x9af7('0x2f')]['offset']);}_0x4a74bd[_0x9af7('0x36')]=qs[_0x9af7('0x37')](_0x1f69da[_0x9af7('0x2f')][_0x9af7('0x37')]);_0x4a74bd['where']=qs['filters'](_[_0x9af7('0x38')](_0x1f69da[_0x9af7('0x2f')],_0x167b05[_0x9af7('0x39')]));if(_0x1f69da['query']['filter']){_0x4a74bd[_0x9af7('0x3a')]=_['merge'](_0x4a74bd[_0x9af7('0x3a')],{'$or':_[_0x9af7('0x2d')](_0x509157,function(_0x53891c){if(_0x53891c[_0x9af7('0x3b')]!=='VIRTUAL'){var _0x64e2b1={};_0x64e2b1[_0x53891c[_0x9af7('0x28')]]={'$like':'%'+_0x1f69da[_0x9af7('0x2f')]['filter']+'%'};return _0x64e2b1;}})});}_0x4a74bd=_[_0x9af7('0x3c')]({},_0x4a74bd,_0x1f69da[_0x9af7('0x3d')]);var _0x30909c={'where':_0x4a74bd['where']};return db[_0x9af7('0x3e')][_0x9af7('0x1e')](_0x30909c)[_0x9af7('0x24')](function(_0x328828){_0x45d6f2[_0x9af7('0x1e')]=_0x328828;if(_0x1f69da[_0x9af7('0x2f')][_0x9af7('0x3f')]){_0x4a74bd[_0x9af7('0x40')]=[{'all':!![]}];}return db[_0x9af7('0x3e')][_0x9af7('0x41')](_0x4a74bd);})['then'](function(_0x1ad12d){_0x45d6f2[_0x9af7('0x42')]=_0x1ad12d;return _0x45d6f2;})[_0x9af7('0x24')](respondWithFilteredResult(_0x1edad2,_0x4a74bd))[_0x9af7('0x43')](handleError(_0x1edad2,null));};exports[_0x9af7('0x44')]=function(_0x22d8b7,_0xb0ea84){var _0x20261e={'raw':![],'where':{'id':_0x22d8b7[_0x9af7('0x45')]['id']}},_0x3241dc={};_0x3241dc[_0x9af7('0x2c')]=_['keys'](db[_0x9af7('0x3e')]['rawAttributes']);_0x3241dc['query']=_[_0x9af7('0x2e')](_0x22d8b7[_0x9af7('0x2f')]);_0x3241dc[_0x9af7('0x39')]=_['intersection'](_0x3241dc['model'],_0x3241dc['query']);_0x20261e[_0x9af7('0x32')]=_[_0x9af7('0x30')](_0x3241dc['model'],qs[_0x9af7('0x31')](_0x22d8b7[_0x9af7('0x2f')][_0x9af7('0x31')]));_0x20261e[_0x9af7('0x32')]=_0x20261e['attributes'][_0x9af7('0x33')]?_0x20261e['attributes']:_0x3241dc[_0x9af7('0x2c')];if(_0x22d8b7['query'][_0x9af7('0x3f')]){_0x20261e[_0x9af7('0x40')]=[{'all':!![]}];}_0x20261e=_[_0x9af7('0x3c')]({},_0x20261e,_0x22d8b7[_0x9af7('0x3d')]);return db[_0x9af7('0x3e')][_0x9af7('0x46')](_0x20261e)['then'](handleEntityNotFound(_0xb0ea84,null))[_0x9af7('0x24')](respondWithResult(_0xb0ea84,null))[_0x9af7('0x43')](handleError(_0xb0ea84,null));};exports[_0x9af7('0x47')]=function(_0x36bdd8,_0x340bf2){return db[_0x9af7('0x3e')][_0x9af7('0x47')](_0x36bdd8[_0x9af7('0x48')],{})['then'](function(_0x560862){var _0x2f5fa4=_0x36bdd8[_0x9af7('0x49')][_0x9af7('0x4a')]({'plain':!![]});if(!_0x2f5fa4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2f5fa4[_0x9af7('0x4b')]===_0x9af7('0x49')){var _0x288af6=_0x560862[_0x9af7('0x4a')]({'plain':!![]});var _0x406a05=_0x9af7('0x4c');return db[_0x9af7('0x4d')]['find']({'where':{'name':_0x406a05,'userProfileId':_0x2f5fa4[_0x9af7('0x4e')]},'raw':!![]})[_0x9af7('0x24')](function(_0x448eb0){if(_0x448eb0&&_0x448eb0[_0x9af7('0x4f')]===0x0){return db[_0x9af7('0x26')]['create']({'name':_0x288af6[_0x9af7('0x28')],'resourceId':_0x288af6['id'],'type':_0x9af7('0x50'),'sectionId':_0x448eb0['id']},{})[_0x9af7('0x24')](function(){return _0x560862;});}else{return _0x560862;}})[_0x9af7('0x43')](function(_0x560181){logger[_0x9af7('0x51')](_0x9af7('0x52'),_0x560181);throw _0x560181;});}return _0x560862;})[_0x9af7('0x24')](respondWithResult(_0x340bf2,0xc9))[_0x9af7('0x43')](handleError(_0x340bf2,null));};exports[_0x9af7('0x23')]=function(_0x311ac0,_0x33b121){if(_0x311ac0[_0x9af7('0x48')]['id']){delete _0x311ac0[_0x9af7('0x48')]['id'];}return db['AnalyticCustomReport'][_0x9af7('0x46')]({'where':{'id':_0x311ac0[_0x9af7('0x45')]['id']}})['then'](handleEntityNotFound(_0x33b121,null))[_0x9af7('0x24')](saveUpdates(_0x311ac0[_0x9af7('0x48')],null))[_0x9af7('0x24')](respondWithResult(_0x33b121,null))[_0x9af7('0x43')](handleError(_0x33b121,null));};exports['destroy']=function(_0x1fe94f,_0x193b5e){return db[_0x9af7('0x3e')][_0x9af7('0x46')]({'where':{'id':_0x1fe94f[_0x9af7('0x45')]['id']}})[_0x9af7('0x24')](handleEntityNotFound(_0x193b5e,null))[_0x9af7('0x24')](removeEntity(_0x193b5e,null))['catch'](handleError(_0x193b5e,null));};exports[_0x9af7('0x53')]=function(_0x46d532,_0x58957a){var _0x4b9507=0xa;var _0x4d9f8f=[_0x9af7('0x54'),_0x9af7('0x55'),_0x9af7('0x56'),'cross_join'];var _0x4f2da6={'SUM':_0x9af7('0x57'),'COUNT':_0x9af7('0x58'),'COUNT DISTINCT':_0x9af7('0x59'),'MAX':_0x9af7('0x5a'),'MIN':_0x9af7('0x5b'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x9af7('0x5c'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x9af7('0x5d')};var _0x157c76={'SEC_TO_TIME':_0x9af7('0x5e'),'DATE':'DATE(%s)','HOUR':_0x9af7('0x5f'),'ROUND':_0x9af7('0x60'),'UNIX_TIMESTAMP':_0x9af7('0x61')};var _0x1bda65=function(_0x300288){return!_[_0x9af7('0x62')]([_0x9af7('0x63'),_0x9af7('0x64'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0x300288);};var _0x5c917b=function(_0x54d3c8){if(!_0x54d3c8||!_0x54d3c8[_0x9af7('0x65')][_0x9af7('0x33')]){return'';}for(var _0x2569a9='(',_0x2114c9=0x0;_0x2114c9<_0x54d3c8[_0x9af7('0x65')][_0x9af7('0x33')];_0x2114c9+=0x1){_0x2114c9>0x0&&(_0x2569a9+='\x20'+_0x54d3c8[_0x9af7('0x66')]+'\x20');_0x2569a9+=_0x54d3c8['rules'][_0x2114c9][_0x9af7('0x67')]?_0x5c917b(_0x54d3c8[_0x9af7('0x65')][_0x2114c9]['group']):_0x54d3c8[_0x9af7('0x65')][_0x2114c9][_0x9af7('0x68')]+'\x20'+_0x54d3c8['rules'][_0x2114c9][_0x9af7('0x69')]+(_0x1bda65(_0x54d3c8['rules'][_0x2114c9][_0x9af7('0x69')])?'\x20'+_0x54d3c8[_0x9af7('0x65')][_0x2114c9][_0x9af7('0x6a')]:'');}return _0x2569a9+')';};var _0x5f1fe1={'where':{'id':_0x46d532['params']['id']}},_0x460a86,_0x44579a,_0xf3dbc8,_0x199786,_0x17ef34;_0x5f1fe1=_[_0x9af7('0x3c')]({},_0x5f1fe1,_0x46d532[_0x9af7('0x3d')]);return db[_0x9af7('0x3e')][_0x9af7('0x46')](_0x5f1fe1)[_0x9af7('0x24')](function(_0x5c98f6){if(_0x5c98f6){_0x460a86=_0x5c98f6;return _0x5c98f6['getFields']();}return null;})[_0x9af7('0x24')](function(_0x10a0cd){if(_0x10a0cd){if(!_0x10a0cd[_0x9af7('0x33')]){throw new db[(_0x9af7('0x6b'))]['ValidationErrorItem'](_0x9af7('0x6c'),0x193);}_0x44579a=_0x10a0cd;return db[_0x9af7('0x6d')][_0x9af7('0x41')]({'raw':!![]});}return null;})['then'](function(_0x3275a5){if(_0x3275a5){_0xf3dbc8=_[_0x9af7('0x6e')](_0x3275a5,'id');var _0x112bf3;var _0x47cda9=squel['select']();_0x47cda9[_0x9af7('0x6f')](_0x460a86[_0x9af7('0x70')]);for(var _0x340b60=0x0;_0x340b60<_0x44579a[_0x9af7('0x33')];_0x340b60+=0x1){_0x112bf3=_0x44579a[_0x340b60][_0x9af7('0x71')]?_0xf3dbc8[_0x44579a[_0x340b60][_0x9af7('0x71')]][_0x9af7('0x72')]:_0x44579a[_0x340b60][_0x9af7('0x68')];_0x112bf3=_0x44579a[_0x340b60][_0x9af7('0x73')]?_[_0x9af7('0x74')](_0x4f2da6[_0x44579a[_0x340b60][_0x9af7('0x73')]],'%s',_0x112bf3):_0x112bf3;_0x112bf3=_0x44579a[_0x340b60][_0x9af7('0x75')]?_[_0x9af7('0x74')](_0x157c76[_0x44579a[_0x340b60][_0x9af7('0x75')]],'%s',_0x112bf3):_0x112bf3;if(_0x44579a[_0x340b60][_0x9af7('0x76')]){_0x47cda9[_0x9af7('0x67')](_0x112bf3);}_0x44579a[_0x340b60][_0x9af7('0x77')]&&_0x47cda9[_0x9af7('0x36')](_0x112bf3,_0x44579a[_0x340b60][_0x9af7('0x77')]==='DESC'?![]:!![]);_0x47cda9[_0x9af7('0x68')](_0x112bf3,_0x44579a[_0x340b60][_0x9af7('0x78')]||_0x112bf3);}if(_0x460a86['joins']){_0x460a86[_0x9af7('0x79')]=JSON[_0x9af7('0x7a')](_0x460a86[_0x9af7('0x79')]);for(var _0x30bade=0x0;_0x30bade<_0x460a86[_0x9af7('0x79')]['length'];_0x30bade+=0x1){if(_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x3b')]&&_[_0x9af7('0x62')](_0x4d9f8f,_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x3b')])&&_0x460a86[_0x9af7('0x79')][_0x30bade]['parentKey']&&_0x460a86['joins'][_0x30bade][_0x9af7('0x7b')]&&_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x7c')]){_0x47cda9[_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x3b')]](_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x7b')],null,util[_0x9af7('0x75')](_0x9af7('0x7d'),_0x460a86['table'],_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x7e')],_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x7b')],_0x460a86[_0x9af7('0x79')][_0x30bade][_0x9af7('0x7c')]));}}}if(_0x460a86[_0x9af7('0x7f')]){_0x460a86[_0x9af7('0x7f')]=JSON[_0x9af7('0x7a')](_0x460a86[_0x9af7('0x7f')]);_0x47cda9[_0x9af7('0x3a')](_0x5c917b(_0x460a86['conditions'][_0x9af7('0x67')]));}_0x17ef34=_0x47cda9['clone']();_0x47cda9[_0x9af7('0x20')](_0x4b9507);_0x47cda9[_0x9af7('0x1f')](0x0);logger[_0x9af7('0x80')](_0x9af7('0x81'),_0x47cda9[_0x9af7('0x82')]());return db['sequelize'][_0x9af7('0x2f')](_0x47cda9['toString'](),{'type':db[_0x9af7('0x83')][_0x9af7('0x84')][_0x9af7('0x85')]});}})[_0x9af7('0x24')](respondWithResult(_0x58957a,null))[_0x9af7('0x43')](handleError(_0x58957a,null));};function runReport(_0x359c78,_0xd5e1e9,_0x42f79c){var _0x5a94d7=_0xd5e1e9[_0x9af7('0x28')];var _0x2552c5=0xa;var _0x226001=['join',_0x9af7('0x55'),'right_join',_0x9af7('0x86')];var _0x45ff30={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x9af7('0x59'),'MAX':_0x9af7('0x5a'),'MIN':_0x9af7('0x5b'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x9af7('0x5c'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x9af7('0x5d')};var _0x24c10a={'SEC_TO_TIME':_0x9af7('0x5e'),'DATE':'DATE(%s)','HOUR':_0x9af7('0x5f'),'ROUND':_0x9af7('0x60'),'UNIX_TIMESTAMP':_0x9af7('0x61')};var _0xada9fe=function(_0x2d29b7){return!_['includes']([_0x9af7('0x63'),_0x9af7('0x64'),_0x9af7('0x87'),_0x9af7('0x88')],_0x2d29b7);};var _0x4ca5ac=function(_0x167712){if(!_0x167712||!_0x167712['rules'][_0x9af7('0x33')]){return'';}for(var _0x33852d='(',_0xae0ba0=0x0;_0xae0ba0<_0x167712[_0x9af7('0x65')][_0x9af7('0x33')];_0xae0ba0+=0x1){_0xae0ba0>0x0&&(_0x33852d+='\x20'+_0x167712[_0x9af7('0x66')]+'\x20');_0x33852d+=_0x167712[_0x9af7('0x65')][_0xae0ba0][_0x9af7('0x67')]?_0x4ca5ac(_0x167712['rules'][_0xae0ba0]['group']):_0x167712[_0x9af7('0x65')][_0xae0ba0][_0x9af7('0x68')]+'\x20'+_0x167712[_0x9af7('0x65')][_0xae0ba0][_0x9af7('0x69')]+(_0xada9fe(_0x167712[_0x9af7('0x65')][_0xae0ba0]['condition'])?'\x20'+_0x167712[_0x9af7('0x65')][_0xae0ba0][_0x9af7('0x6a')]:'');}return _0x33852d+')';};var _0x2755bf={'where':{'id':_0x359c78['id']}},_0x2e456c,_0xf5252f,_0x62f707,_0x54e2e2,_0x4f7bb4;_0x2755bf=_['merge']({},_0x2755bf,_0x42f79c);return db['AnalyticCustomReport'][_0x9af7('0x46')](_0x2755bf)[_0x9af7('0x24')](function(_0x49d473){if(_0x49d473){_0x2e456c=_0x49d473;return _0x49d473[_0x9af7('0x89')]();}return null;})[_0x9af7('0x24')](function(_0x476275){if(_0x476275){if(!_0x476275['length']){throw new db[(_0x9af7('0x6b'))]['ValidationErrorItem'](_0x9af7('0x6c'),0x193);}_0xf5252f=_0x476275;return db[_0x9af7('0x6d')][_0x9af7('0x41')]({'raw':!![]});}return null;})['then'](function(_0x535cdd){if(_0x535cdd){_0x62f707=_[_0x9af7('0x6e')](_0x535cdd,'id');var _0x3019fa;var _0x1c02e7=squel['select']();_0x1c02e7[_0x9af7('0x6f')](_0x2e456c[_0x9af7('0x70')]);for(var _0x245e89=0x0;_0x245e89<_0xf5252f[_0x9af7('0x33')];_0x245e89+=0x1){_0x3019fa=_0xf5252f[_0x245e89][_0x9af7('0x71')]?_0x62f707[_0xf5252f[_0x245e89][_0x9af7('0x71')]][_0x9af7('0x72')]:_0xf5252f[_0x245e89]['field'];_0x3019fa=_0xf5252f[_0x245e89][_0x9af7('0x73')]?_[_0x9af7('0x74')](_0x45ff30[_0xf5252f[_0x245e89][_0x9af7('0x73')]],'%s',_0x3019fa):_0x3019fa;_0x3019fa=_0xf5252f[_0x245e89][_0x9af7('0x75')]?_[_0x9af7('0x74')](_0x24c10a[_0xf5252f[_0x245e89][_0x9af7('0x75')]],'%s',_0x3019fa):_0x3019fa;if(_0xf5252f[_0x245e89][_0x9af7('0x76')]){_0x1c02e7[_0x9af7('0x67')](_0x3019fa);}_0xf5252f[_0x245e89][_0x9af7('0x77')]&&_0x1c02e7[_0x9af7('0x36')](_0x3019fa,_0xf5252f[_0x245e89][_0x9af7('0x77')]===_0x9af7('0x8a')?![]:!![]);_0x1c02e7[_0x9af7('0x68')](_0x3019fa,_0xf5252f[_0x245e89][_0x9af7('0x78')]||_0x3019fa);}if(_0x2e456c[_0x9af7('0x79')]){_0x2e456c[_0x9af7('0x79')]=JSON[_0x9af7('0x7a')](_0x2e456c[_0x9af7('0x79')]);for(var _0x45f49d=0x0;_0x45f49d<_0x2e456c['joins'][_0x9af7('0x33')];_0x45f49d+=0x1){if(_0x2e456c['joins'][_0x45f49d][_0x9af7('0x3b')]&&_['includes'](_0x226001,_0x2e456c[_0x9af7('0x79')][_0x45f49d]['type'])&&_0x2e456c[_0x9af7('0x79')][_0x45f49d][_0x9af7('0x7e')]&&_0x2e456c[_0x9af7('0x79')][_0x45f49d][_0x9af7('0x7b')]&&_0x2e456c[_0x9af7('0x79')][_0x45f49d]['foreignKey']){_0x1c02e7[_0x2e456c[_0x9af7('0x79')][_0x45f49d]['type']](_0x2e456c[_0x9af7('0x79')][_0x45f49d][_0x9af7('0x7b')],null,util['format'](_0x9af7('0x7d'),_0x2e456c[_0x9af7('0x70')],_0x2e456c[_0x9af7('0x79')][_0x45f49d][_0x9af7('0x7e')],_0x2e456c[_0x9af7('0x79')][_0x45f49d]['foreignTable'],_0x2e456c['joins'][_0x45f49d][_0x9af7('0x7c')]));}}}if(_0x2e456c['conditions']){_0x2e456c['conditions']=JSON[_0x9af7('0x7a')](_0x2e456c[_0x9af7('0x7f')]);_0x1c02e7['where'](_0x4ca5ac(_0x2e456c['conditions'][_0x9af7('0x67')]));}_0x4f7bb4=_0x1c02e7[_0x9af7('0x8b')]();_0x1c02e7[_0x9af7('0x20')](_0x2552c5);_0x1c02e7[_0x9af7('0x1f')](0x0);logger[_0x9af7('0x80')](_0x9af7('0x81'),_0x1c02e7[_0x9af7('0x82')]());return db[_0x9af7('0x83')][_0x9af7('0x2f')](_0x1c02e7[_0x9af7('0x82')](),{'type':db[_0x9af7('0x83')][_0x9af7('0x84')][_0x9af7('0x85')]});}})[_0x9af7('0x24')](function(_0x53ba6f){if(!_0x53ba6f[_0x9af7('0x33')]){throw new db[(_0x9af7('0x6b'))][(_0x9af7('0x8c'))]('No\x20available\x20data',0xcc);}if(_0xd5e1e9[_0x9af7('0x8d')]===_0x9af7('0x8e')){return null;}var _0x3239e6=_['merge'](_0xd5e1e9,{'name':_0xd5e1e9[_0x9af7('0x8f')]||_0xd5e1e9[_0x9af7('0x28')]||_0x2e456c[_0x9af7('0x28')],'basename':_0x5a94d7,'savename':util[_0x9af7('0x75')]('%s-%s.%s',_0xd5e1e9[_0x9af7('0x28')]||_0x2e456c[_0x9af7('0x28')],require(_0x9af7('0x90'))[_0x9af7('0x91')](0x4),_0xd5e1e9[_0x9af7('0x8d')]||_0x9af7('0x92')),'reportId':_0x2e456c['id'],'reportType':_0x9af7('0x93')});return db[_0x9af7('0x94')]['create'](_0x3239e6,{'raw':!![]});})[_0x9af7('0x24')](function(_0x543669){if(_0x2e456c[_0x9af7('0x70')]===_0x9af7('0x95')){_0x4f7bb4[_0x9af7('0x3a')](_0x2e456c['table']+_0x9af7('0x96'),_0xd5e1e9[_0x9af7('0x97')],_0xd5e1e9[_0x9af7('0x98')]);}else{_0x4f7bb4[_0x9af7('0x3a')](_0x2e456c[_0x9af7('0x70')]+_0x9af7('0x99'),_0xd5e1e9[_0x9af7('0x97')],_0xd5e1e9[_0x9af7('0x98')]);}if(_0x543669){logger[_0x9af7('0x9a')]('Run\x20Query:',_0x4f7bb4[_0x9af7('0x82')]());require(_0x9af7('0x9b'))[_0x9af7('0x9c')](path[_0x9af7('0x54')](__dirname,_0x9af7('0x9d'),_0x543669['output']),[_0x543669['id'],_0x4f7bb4[_0x9af7('0x82')](),path[_0x9af7('0x54')](__dirname,_0x9af7('0x9e'),_0x543669['savename']),_0x5a94d7]);return _0x543669;}else{var _0x5eebfe=squel[_0x9af7('0x9f')]();_0x5eebfe['from']('('+_0x4f7bb4['toString']()+')','countTable');_0x5eebfe[_0x9af7('0x68')]('COUNT(*)',_0x9af7('0x1e'));_0x4f7bb4[_0x9af7('0x20')](_0xd5e1e9[_0x9af7('0x20')]||_0x2552c5);_0x4f7bb4[_0x9af7('0x1f')](_0xd5e1e9[_0x9af7('0x1f')]||0x0);return db['sequelize'][_0x9af7('0x2f')](_0x5eebfe['toString'](),{'type':db[_0x9af7('0x83')]['QueryTypes'][_0x9af7('0x85')]})[_0x9af7('0x24')](function(_0x2bb910){if(!_0x2bb910[_0x9af7('0x33')]){_0x54e2e2=0x0;}else{_0x54e2e2=_0x2bb910[0x0][_0x9af7('0x1e')]||0x0;}return db[_0x9af7('0x83')]['query'](_0x4f7bb4[_0x9af7('0x82')](),{'type':db['sequelize'][_0x9af7('0x84')][_0x9af7('0x85')]});})['then'](function(_0x38a0a3){return{'rows':_0x38a0a3||[],'count':_0x54e2e2};});}});}exports['run']=function(_0x49daa9,_0x1505f7){return runReport(_0x49daa9['params'],_0x49daa9[_0x9af7('0x2f')],_0x49daa9[_0x9af7('0x3d')])[_0x9af7('0x24')](respondWithResult(_0x1505f7,null))[_0x9af7('0x43')](handleError(_0x1505f7,null));};exports[_0x9af7('0xa0')]=runReport;exports['query']=function(_0x5b02aa,_0x349b6d){var _0x23968d=0xa;var _0x11c60a=[_0x9af7('0x54'),_0x9af7('0x55'),'right_join','cross_join'];var _0x32460b={'SUM':_0x9af7('0x57'),'COUNT':_0x9af7('0x58'),'COUNT DISTINCT':_0x9af7('0x59'),'MAX':_0x9af7('0x5a'),'MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0x9af7('0x5c'),'GROUP_CONCAT ASC':_0x9af7('0xa1'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x58f920={'SEC_TO_TIME':_0x9af7('0x5e'),'DATE':_0x9af7('0xa2'),'HOUR':'HOUR(%s)','ROUND':_0x9af7('0x60'),'UNIX_TIMESTAMP':_0x9af7('0x61')};var _0x142e97=function(_0x8f6056){return!_[_0x9af7('0x62')](['IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY',_0x9af7('0x88')],_0x8f6056);};var _0x5e36b7=function(_0x44a4dd){if(!_0x44a4dd||!_0x44a4dd[_0x9af7('0x65')]['length']){return'';}for(var _0x207ad6='(',_0x5f04e7=0x0;_0x5f04e7<_0x44a4dd[_0x9af7('0x65')]['length'];_0x5f04e7+=0x1){_0x5f04e7>0x0&&(_0x207ad6+='\x20'+_0x44a4dd[_0x9af7('0x66')]+'\x20');_0x207ad6+=_0x44a4dd['rules'][_0x5f04e7][_0x9af7('0x67')]?_0x5e36b7(_0x44a4dd[_0x9af7('0x65')][_0x5f04e7][_0x9af7('0x67')]):_0x44a4dd['rules'][_0x5f04e7][_0x9af7('0x68')]+'\x20'+_0x44a4dd[_0x9af7('0x65')][_0x5f04e7][_0x9af7('0x69')]+(_0x142e97(_0x44a4dd[_0x9af7('0x65')][_0x5f04e7][_0x9af7('0x69')])?'\x20'+_0x44a4dd[_0x9af7('0x65')][_0x5f04e7][_0x9af7('0x6a')]:'');}return _0x207ad6+')';};var _0x5cd0c5={'where':{'id':_0x5b02aa[_0x9af7('0x45')]['id']}},_0x161bc1,_0x4800ce,_0x44e04d,_0x40adda,_0x59eb55;_0x5cd0c5=_[_0x9af7('0x3c')]({},_0x5cd0c5,_0x5b02aa['options']);return db[_0x9af7('0x3e')][_0x9af7('0x46')](_0x5cd0c5)[_0x9af7('0x24')](function(_0x40014b){if(_0x40014b){_0x161bc1=_0x40014b;return _0x40014b[_0x9af7('0x89')]();}return null;})[_0x9af7('0x24')](function(_0x3d5ce1){if(_0x3d5ce1){if(!_0x3d5ce1[_0x9af7('0x33')]){throw new db[(_0x9af7('0x6b'))]['ValidationErrorItem'](_0x9af7('0x6c'),0x193);}_0x4800ce=_0x3d5ce1;return db[_0x9af7('0x6d')]['findAll']({'raw':!![]});}return null;})[_0x9af7('0x24')](function(_0x1b5a9e){if(_0x1b5a9e){_0x44e04d=_['keyBy'](_0x1b5a9e,'id');var _0x1d2b05;var _0xf2c615=squel[_0x9af7('0x9f')]();_0xf2c615[_0x9af7('0x6f')](_0x161bc1[_0x9af7('0x70')]);for(var _0x5255a4=0x0;_0x5255a4<_0x4800ce[_0x9af7('0x33')];_0x5255a4+=0x1){_0x1d2b05=_0x4800ce[_0x5255a4][_0x9af7('0x71')]?_0x44e04d[_0x4800ce[_0x5255a4]['MetricId']][_0x9af7('0x72')]:_0x4800ce[_0x5255a4]['field'];_0x1d2b05=_0x4800ce[_0x5255a4]['function']?_[_0x9af7('0x74')](_0x32460b[_0x4800ce[_0x5255a4]['function']],'%s',_0x1d2b05):_0x1d2b05;_0x1d2b05=_0x4800ce[_0x5255a4][_0x9af7('0x75')]?_['replace'](_0x58f920[_0x4800ce[_0x5255a4][_0x9af7('0x75')]],'%s',_0x1d2b05):_0x1d2b05;if(_0x4800ce[_0x5255a4]['groupBy']){_0xf2c615['group'](_0x1d2b05);}_0x4800ce[_0x5255a4][_0x9af7('0x77')]&&_0xf2c615[_0x9af7('0x36')](_0x1d2b05,_0x4800ce[_0x5255a4][_0x9af7('0x77')]==='DESC'?![]:!![]);_0xf2c615[_0x9af7('0x68')](_0x1d2b05,_0x4800ce[_0x5255a4][_0x9af7('0x78')]||_0x1d2b05);}if(_0x161bc1['joins']){_0x161bc1[_0x9af7('0x79')]=JSON['parse'](_0x161bc1[_0x9af7('0x79')]);for(var _0x1204f7=0x0;_0x1204f7<_0x161bc1[_0x9af7('0x79')][_0x9af7('0x33')];_0x1204f7+=0x1){if(_0x161bc1['joins'][_0x1204f7][_0x9af7('0x3b')]&&_['includes'](_0x11c60a,_0x161bc1['joins'][_0x1204f7]['type'])&&_0x161bc1[_0x9af7('0x79')][_0x1204f7]['parentKey']&&_0x161bc1[_0x9af7('0x79')][_0x1204f7][_0x9af7('0x7b')]&&_0x161bc1[_0x9af7('0x79')][_0x1204f7][_0x9af7('0x7c')]){_0xf2c615[_0x161bc1[_0x9af7('0x79')][_0x1204f7][_0x9af7('0x3b')]](_0x161bc1['joins'][_0x1204f7][_0x9af7('0x7b')],null,util[_0x9af7('0x75')](_0x9af7('0x7d'),_0x161bc1[_0x9af7('0x70')],_0x161bc1[_0x9af7('0x79')][_0x1204f7]['parentKey'],_0x161bc1[_0x9af7('0x79')][_0x1204f7]['foreignTable'],_0x161bc1[_0x9af7('0x79')][_0x1204f7][_0x9af7('0x7c')]));}}}if(_0x161bc1['conditions']){_0x161bc1[_0x9af7('0x7f')]=JSON[_0x9af7('0x7a')](_0x161bc1[_0x9af7('0x7f')]);_0xf2c615['where'](_0x5e36b7(_0x161bc1['conditions'][_0x9af7('0x67')]));}_0x59eb55=_0xf2c615[_0x9af7('0x8b')]();_0xf2c615[_0x9af7('0x20')](_0x23968d);_0xf2c615[_0x9af7('0x1f')](0x0);logger['debug'](_0x9af7('0x81'),_0xf2c615[_0x9af7('0x82')]());return db[_0x9af7('0x83')]['query'](_0xf2c615[_0x9af7('0x82')](),{'type':db['sequelize'][_0x9af7('0x84')][_0x9af7('0x85')]});}})['then'](function(){return{'sql':_0x59eb55['toString']()};})[_0x9af7('0x24')](respondWithResult(_0x349b6d,null))[_0x9af7('0x43')](handleError(_0x349b6d,null));};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js
index f712865..8aeb226 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 _0xd566=['AnalyticCustomReport','analytics_custom_reports','../../config/logger','api','rimraf','../../config/environment','./analyticCustomReport.attributes','exports'];(function(_0x46406c,_0x2fc238){var _0x42d0ca=function(_0x88ad0a){while(--_0x88ad0a){_0x46406c['push'](_0x46406c['shift']());}};_0x42d0ca(++_0x2fc238);}(_0xd566,0x18a));var _0x6d56=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xd566[_0x3ab51d];return _0x29a04e;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x6d56('0x0'))(_0x6d56('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x6d56('0x2'));var config=require(_0x6d56('0x3'));var attributes=require(_0x6d56('0x4'));module[_0x6d56('0x5')]=function(_0x4183c9,_0x28c320){return _0x4183c9['define'](_0x6d56('0x6'),attributes,{'tableName':_0x6d56('0x7'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5499=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticCustomReport.attributes','exports','define','AnalyticCustomReport','lodash','util','../../config/logger','api'];(function(_0xfbc04c,_0x2471a6){var _0x528dd3=function(_0x27f202){while(--_0x27f202){_0xfbc04c['push'](_0xfbc04c['shift']());}};_0x528dd3(++_0x2471a6);}(_0x5499,0x1ca));var _0x9549=function(_0x174833,_0x4f5b0a){_0x174833=_0x174833-0x0;var _0x2b2f9c=_0x5499[_0x174833];return _0x2b2f9c;};'use strict';var _=require(_0x9549('0x0'));var util=require(_0x9549('0x1'));var logger=require(_0x9549('0x2'))(_0x9549('0x3'));var moment=require(_0x9549('0x4'));var BPromise=require(_0x9549('0x5'));var rp=require(_0x9549('0x6'));var fs=require('fs');var path=require(_0x9549('0x7'));var rimraf=require(_0x9549('0x8'));var config=require(_0x9549('0x9'));var attributes=require(_0x9549('0xa'));module[_0x9549('0xb')]=function(_0x3c2fd4,_0x5422d7){return _0x3c2fd4[_0x9549('0xc')](_0x9549('0xd'),attributes,{'tableName':'analytics_custom_reports','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 e342bfb..8eba14d 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 _0xaf24=['AnalyticCustomReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','debug','request\x20sent','error'];(function(_0x4706a6,_0x5a1c63){var _0x1bb705=function(_0x484ebb){while(--_0x484ebb){_0x4706a6['push'](_0x4706a6['shift']());}};_0x1bb705(++_0x5a1c63);}(_0xaf24,0xe0));var _0x4af2=function(_0x4be277,_0x1d5d6c){_0x4be277=_0x4be277-0x0;var _0x35c8d8=_0xaf24[_0x4be277];return _0x35c8d8;};'use strict';var _=require(_0x4af2('0x0'));var util=require(_0x4af2('0x1'));var moment=require(_0x4af2('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4af2('0x3'))['db'];var utils=require(_0x4af2('0x4'));var logger=require(_0x4af2('0x5'))(_0x4af2('0x6'));var config=require(_0x4af2('0x7'));var jayson=require(_0x4af2('0x8'));var client=jayson[_0x4af2('0x9')][_0x4af2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5c4d45,_0x27ae03,_0x304475){return new BPromise(function(_0x55dcd9,_0x25cdb2){return client[_0x4af2('0xb')](_0x5c4d45,_0x304475)[_0x4af2('0xc')](function(_0xbff5b0){logger['info']('AnalyticCustomReport,\x20%s,\x20%s',_0x27ae03,'request\x20sent');logger[_0x4af2('0xd')]('AnalyticCustomReport,\x20%s,\x20%s,\x20%s',_0x27ae03,_0x4af2('0xe'),JSON['stringify'](_0xbff5b0));if(_0xbff5b0[_0x4af2('0xf')]){if(_0xbff5b0['error']['code']===0x1f4){logger[_0x4af2('0xf')](_0x4af2('0x10'),_0x27ae03,_0xbff5b0[_0x4af2('0xf')]['message']);return _0x25cdb2(_0xbff5b0[_0x4af2('0xf')]['message']);}logger[_0x4af2('0xf')](_0x4af2('0x10'),_0x27ae03,_0xbff5b0[_0x4af2('0xf')][_0x4af2('0x11')]);return _0x55dcd9(_0xbff5b0[_0x4af2('0xf')]['message']);}else{logger['info'](_0x4af2('0x10'),_0x27ae03,_0x4af2('0xe'));_0x55dcd9(_0xbff5b0[_0x4af2('0x12')][_0x4af2('0x11')]);}})[_0x4af2('0x13')](function(_0x26484b){logger['error'](_0x4af2('0x10'),_0x27ae03,_0x26484b);_0x25cdb2(_0x26484b);});});}
\ No newline at end of file
+var _0xa44d=['catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result'];(function(_0x5d5bcb,_0x25e2ea){var _0x4ea5eb=function(_0x36782b){while(--_0x36782b){_0x5d5bcb['push'](_0x5d5bcb['shift']());}};_0x4ea5eb(++_0x25e2ea);}(_0xa44d,0x1d5));var _0xda44=function(_0x28669c,_0x1f62c4){_0x28669c=_0x28669c-0x0;var _0x4a3af6=_0xa44d[_0x28669c];return _0x4a3af6;};'use strict';var _=require('lodash');var util=require(_0xda44('0x0'));var moment=require(_0xda44('0x1'));var BPromise=require(_0xda44('0x2'));var rs=require(_0xda44('0x3'));var fs=require('fs');var Redis=require(_0xda44('0x4'));var db=require(_0xda44('0x5'))['db'];var utils=require(_0xda44('0x6'));var logger=require(_0xda44('0x7'))(_0xda44('0x8'));var config=require(_0xda44('0x9'));var jayson=require(_0xda44('0xa'));var client=jayson[_0xda44('0xb')][_0xda44('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x154780,_0x54393f,_0x531604){return new BPromise(function(_0x56e8b3,_0x3e06a3){return client[_0xda44('0xd')](_0x154780,_0x531604)[_0xda44('0xe')](function(_0x2375b7){logger[_0xda44('0xf')](_0xda44('0x10'),_0x54393f,'request\x20sent');logger[_0xda44('0x11')](_0xda44('0x12'),_0x54393f,_0xda44('0x13'),JSON[_0xda44('0x14')](_0x2375b7));if(_0x2375b7[_0xda44('0x15')]){if(_0x2375b7['error'][_0xda44('0x16')]===0x1f4){logger[_0xda44('0x15')](_0xda44('0x10'),_0x54393f,_0x2375b7[_0xda44('0x15')][_0xda44('0x17')]);return _0x3e06a3(_0x2375b7[_0xda44('0x15')][_0xda44('0x17')]);}logger[_0xda44('0x15')]('AnalyticCustomReport,\x20%s,\x20%s',_0x54393f,_0x2375b7[_0xda44('0x15')][_0xda44('0x17')]);return _0x56e8b3(_0x2375b7[_0xda44('0x15')]['message']);}else{logger[_0xda44('0xf')](_0xda44('0x10'),_0x54393f,_0xda44('0x13'));_0x56e8b3(_0x2375b7[_0xda44('0x18')]['message']);}})[_0xda44('0x19')](function(_0x2b9ea1){logger[_0xda44('0x15')](_0xda44('0x10'),_0x54393f,_0x2b9ea1);_0x3e06a3(_0x2b9ea1);});});}
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js
index fb3c967..8244c31 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 _0x5a15=['get','/:id','preview','/:id/run','query','create','put','update','delete','destroy','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','isAuthenticated','index'];(function(_0x5303eb,_0x5cf32e){var _0x4c2614=function(_0x21da58){while(--_0x21da58){_0x5303eb['push'](_0x5303eb['shift']());}};_0x4c2614(++_0x5cf32e);}(_0x5a15,0x1ea));var _0x55a1=function(_0x379473,_0x48fdda){_0x379473=_0x379473-0x0;var _0x146d35=_0x5a15[_0x379473];return _0x146d35;};'use strict';var multer=require(_0x55a1('0x0'));var util=require('util');var path=require(_0x55a1('0x1'));var timeout=require(_0x55a1('0x2'));var express=require(_0x55a1('0x3'));var router=express[_0x55a1('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x55a1('0x5'));var config=require(_0x55a1('0x6'));var controller=require(_0x55a1('0x7'));router['get']('/',auth[_0x55a1('0x8')](),controller[_0x55a1('0x9')]);router[_0x55a1('0xa')](_0x55a1('0xb'),auth[_0x55a1('0x8')](),controller['show']);router['get']('/:id/preview',auth['isAuthenticated'](),controller[_0x55a1('0xc')]);router[_0x55a1('0xa')](_0x55a1('0xd'),auth[_0x55a1('0x8')](),controller['run']);router['get']('/:id/query',auth[_0x55a1('0x8')](),controller[_0x55a1('0xe')]);router['post']('/',auth[_0x55a1('0x8')](),controller[_0x55a1('0xf')]);router[_0x55a1('0x10')]('/:id',auth[_0x55a1('0x8')](),controller[_0x55a1('0x11')]);router[_0x55a1('0x12')](_0x55a1('0xb'),auth[_0x55a1('0x8')](),controller[_0x55a1('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xf2fb=['Router','../../config/environment','get','isAuthenticated','index','/:id/preview','preview','/:id/run','run','/:id/query','post','update','delete','/:id','destroy','exports','multer','util','express'];(function(_0x50f657,_0x4db384){var _0x51db4a=function(_0xf898db){while(--_0xf898db){_0x50f657['push'](_0x50f657['shift']());}};_0x51db4a(++_0x4db384);}(_0xf2fb,0x12d));var _0xbf2f=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xf2fb[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0xbf2f('0x0'));var util=require(_0xbf2f('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xbf2f('0x2'));var router=express[_0xbf2f('0x3')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xbf2f('0x4'));var controller=require('./analyticCustomReport.controller');router[_0xbf2f('0x5')]('/',auth[_0xbf2f('0x6')](),controller[_0xbf2f('0x7')]);router['get']('/:id',auth[_0xbf2f('0x6')](),controller['show']);router[_0xbf2f('0x5')](_0xbf2f('0x8'),auth[_0xbf2f('0x6')](),controller[_0xbf2f('0x9')]);router[_0xbf2f('0x5')](_0xbf2f('0xa'),auth[_0xbf2f('0x6')](),controller[_0xbf2f('0xb')]);router[_0xbf2f('0x5')](_0xbf2f('0xc'),auth[_0xbf2f('0x6')](),controller['query']);router[_0xbf2f('0xd')]('/',auth['isAuthenticated'](),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller[_0xbf2f('0xe')]);router[_0xbf2f('0xf')](_0xbf2f('0x10'),auth[_0xbf2f('0x6')](),controller[_0xbf2f('0x11')]);module[_0xbf2f('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
index c640c6f..8b39364 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 _0xa5e3=['STRING','TEXT','exports'];(function(_0x3de7e0,_0x28cbff){var _0x11d0b3=function(_0xd95412){while(--_0xd95412){_0x3de7e0['push'](_0x3de7e0['shift']());}};_0x11d0b3(++_0x28cbff);}(_0xa5e3,0x1a9));var _0x3a5e=function(_0x2b0666,_0x56f400){_0x2b0666=_0x2b0666-0x0;var _0x60349a=_0xa5e3[_0x2b0666];return _0x60349a;};'use strict';var Sequelize=require('sequelize');module[_0x3a5e('0x0')]={'name':{'type':Sequelize[_0x3a5e('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x3a5e('0x1')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0x3a5e('0x1')]},'conditions':{'type':Sequelize[_0x3a5e('0x2')]},'joins':{'type':Sequelize[_0x3a5e('0x2')]}};
\ No newline at end of file
+var _0xf868=['sequelize','exports','STRING','TEXT'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf868,0xb0));var _0x8f86=function(_0x4ea8ed,_0x3dcbb7){_0x4ea8ed=_0x4ea8ed-0x0;var _0x6ab44e=_0xf868[_0x4ea8ed];return _0x6ab44e;};'use strict';var Sequelize=require(_0x8f86('0x0'));module[_0x8f86('0x1')]={'name':{'type':Sequelize[_0x8f86('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x8f86('0x2')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0x8f86('0x2')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize[_0x8f86('0x3')]}};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
index 6114124..6a1a7ca 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 _0x0578=['name','index','map','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','show','params','AnalyticDefaultReport','rawAttributes','include','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','cross_join','SUM(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','operator','rules','group','field','condition','value','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','keyBy','select','from','table','MetricId','metric','function','replace','format','DESC','alias','joins','parse','includes','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','join','left_join','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','AnalyticMetric','groupBy','orderBy','No\x20available\x20data','web','fullPath','%s-%s.%s','randomstring','AnalyticExtractedReport','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','fork','../../components/export/','output','../../files/reports','savename','countTable','COUNT(*)','run','runReport','right_join','DATE(%s)','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','to-csv','lodash','squel','jsforce','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','apply','reject','save','update','then','destroy','get','DefaultReports','UserProfileResource','sendStatus','error'];(function(_0x12223b,_0x4aacbc){var _0x330caf=function(_0x1783ff){while(--_0x1783ff){_0x12223b['push'](_0x12223b['shift']());}};_0x330caf(++_0x4aacbc);}(_0x0578,0x1b8));var _0x8057=function(_0x44930f,_0x342804){_0x44930f=_0x44930f-0x0;var _0x364357=_0x0578[_0x44930f];return _0x364357;};'use strict';var pdf=require(_0x8057('0x0'));var emlformat=require(_0x8057('0x1'));var rimraf=require(_0x8057('0x2'));var zipdir=require(_0x8057('0x3'));var jsonpatch=require(_0x8057('0x4'));var rp=require('request-promise');var moment=require(_0x8057('0x5'));var BPromise=require(_0x8057('0x6'));var Mustache=require('mustache');var util=require(_0x8057('0x7'));var path=require(_0x8057('0x8'));var sox=require('sox');var csv=require(_0x8057('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x8057('0xa'));var squel=require(_0x8057('0xb'));var crypto=require('crypto');var jsforce=require(_0x8057('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x8057('0x9'));var querystring=require(_0x8057('0xd'));var Papa=require(_0x8057('0xe'));var Redis=require(_0x8057('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8057('0x10'));var logger=require(_0x8057('0x11'))(_0x8057('0x12'));var utils=require(_0x8057('0x13'));var config=require(_0x8057('0x14'));var db=require(_0x8057('0x15'))['db'];function respondWithStatusCode(_0x53dfbc,_0x47337f){_0x47337f=_0x47337f||0xcc;return function(_0x27635d){if(_0x27635d){return _0x53dfbc['sendStatus'](_0x47337f);}return _0x53dfbc[_0x8057('0x16')](_0x47337f)[_0x8057('0x17')]();};}function respondWithResult(_0x4d961a,_0x1915c6){_0x1915c6=_0x1915c6||0xc8;return function(_0x826189){if(_0x826189){return _0x4d961a['status'](_0x1915c6)[_0x8057('0x18')](_0x826189);}};}function respondWithFilteredResult(_0x37f26d,_0x70a8a7){return function(_0x582fd5){if(_0x582fd5){var _0x3b9dbf=_0x582fd5[_0x8057('0x19')],_0x44a708=_0x70a8a7[_0x8057('0x1a')],_0x372433=_0x70a8a7[_0x8057('0x1a')]+_0x70a8a7[_0x8057('0x1b')],_0x15e05f;if(_0x372433>=_0x3b9dbf){_0x372433=_0x3b9dbf;_0x15e05f=0xc8;}else{_0x15e05f=0xce;}_0x37f26d[_0x8057('0x16')](_0x15e05f);return _0x37f26d[_0x8057('0x1c')]('Content-Range',_0x44a708+'-'+_0x372433+'/'+_0x3b9dbf)[_0x8057('0x18')](_0x582fd5);}return null;};}function patchUpdates(_0xcae021){return function(_0xabe28a){try{jsonpatch[_0x8057('0x1d')](_0xabe28a,_0xcae021,!![]);}catch(_0x5c3a96){return BPromise[_0x8057('0x1e')](_0x5c3a96);}return _0xabe28a[_0x8057('0x1f')]();};}function saveUpdates(_0xb59edf,_0x3e2230){return function(_0x3f3d36){if(_0x3f3d36){return _0x3f3d36[_0x8057('0x20')](_0xb59edf)[_0x8057('0x21')](function(_0x88dd51){return _0x88dd51;});}return null;};}function removeEntity(_0xf34935,_0x6e8b75){return function(_0x3d6d9d){if(_0x3d6d9d){return _0x3d6d9d[_0x8057('0x22')]()['then'](function(){var _0x2df71f=_0x3d6d9d[_0x8057('0x23')]({'plain':!![]});var _0x597341=_0x8057('0x24');return db[_0x8057('0x25')]['destroy']({'where':{'type':_0x597341,'resourceId':_0x2df71f['id']}})[_0x8057('0x21')](function(){return _0x3d6d9d;});})[_0x8057('0x21')](function(){_0xf34935['status'](0xcc)[_0x8057('0x17')]();});}};}function handleEntityNotFound(_0xb5462,_0x4ed0a0){return function(_0x383a6b){if(!_0x383a6b){_0xb5462[_0x8057('0x26')](0x194);}return _0x383a6b;};}function handleError(_0x5e5f74,_0x29699b){_0x29699b=_0x29699b||0x1f4;return function(_0x376623){logger[_0x8057('0x27')](_0x376623['stack']);if(_0x376623[_0x8057('0x28')]){delete _0x376623[_0x8057('0x28')];}_0x5e5f74[_0x8057('0x16')](_0x29699b)['send'](_0x376623);};}exports[_0x8057('0x29')]=function(_0x34e319,_0x255a8c){var _0x4c1c14={},_0x640284={},_0x497bd7={'count':0x0,'rows':[]};var _0x5d1def=_[_0x8057('0x2a')](db['AnalyticDefaultReport']['rawAttributes'],function(_0x242d87){return{'name':_0x242d87['fieldName'],'type':_0x242d87[_0x8057('0x2b')]['key']};});_0x640284[_0x8057('0x2c')]=_['map'](_0x5d1def,_0x8057('0x28'));_0x640284[_0x8057('0x2d')]=_[_0x8057('0x2e')](_0x34e319[_0x8057('0x2d')]);_0x640284[_0x8057('0x2f')]=_[_0x8057('0x30')](_0x640284['model'],_0x640284[_0x8057('0x2d')]);_0x4c1c14[_0x8057('0x31')]=_[_0x8057('0x30')](_0x640284['model'],qs[_0x8057('0x32')](_0x34e319[_0x8057('0x2d')][_0x8057('0x32')]));_0x4c1c14['attributes']=_0x4c1c14[_0x8057('0x31')][_0x8057('0x33')]?_0x4c1c14['attributes']:_0x640284['model'];if(!_0x34e319[_0x8057('0x2d')][_0x8057('0x34')](_0x8057('0x35'))){_0x4c1c14[_0x8057('0x1b')]=qs[_0x8057('0x1b')](_0x34e319[_0x8057('0x2d')][_0x8057('0x1b')]);_0x4c1c14[_0x8057('0x1a')]=qs[_0x8057('0x1a')](_0x34e319[_0x8057('0x2d')][_0x8057('0x1a')]);}_0x4c1c14[_0x8057('0x36')]=qs['sort'](_0x34e319[_0x8057('0x2d')][_0x8057('0x37')]);_0x4c1c14[_0x8057('0x38')]=qs[_0x8057('0x2f')](_[_0x8057('0x39')](_0x34e319[_0x8057('0x2d')],_0x640284[_0x8057('0x2f')]));if(_0x34e319[_0x8057('0x2d')][_0x8057('0x3a')]){_0x4c1c14[_0x8057('0x38')]=_[_0x8057('0x3b')](_0x4c1c14['where'],{'$or':_[_0x8057('0x2a')](_0x5d1def,function(_0xdb4afb){if(_0xdb4afb['type']!==_0x8057('0x3c')){var _0x61a5bd={};_0x61a5bd[_0xdb4afb[_0x8057('0x28')]]={'$like':'%'+_0x34e319[_0x8057('0x2d')][_0x8057('0x3a')]+'%'};return _0x61a5bd;}})});}_0x4c1c14=_['merge']({},_0x4c1c14,_0x34e319[_0x8057('0x3d')]);var _0x5429b6={'where':_0x4c1c14['where']};return db['AnalyticDefaultReport']['count'](_0x5429b6)[_0x8057('0x21')](function(_0x1ca53b){_0x497bd7[_0x8057('0x19')]=_0x1ca53b;if(_0x34e319[_0x8057('0x2d')]['includeAll']){_0x4c1c14['include']=[{'all':!![]}];}return db['AnalyticDefaultReport'][_0x8057('0x3e')](_0x4c1c14);})[_0x8057('0x21')](function(_0x2a6fa8){_0x497bd7[_0x8057('0x3f')]=_0x2a6fa8;return _0x497bd7;})[_0x8057('0x21')](respondWithFilteredResult(_0x255a8c,_0x4c1c14))['catch'](handleError(_0x255a8c,null));};exports[_0x8057('0x40')]=function(_0x22ae42,_0x485277){var _0x58c157={'raw':!![],'where':{'id':_0x22ae42[_0x8057('0x41')]['id']}},_0x216650={};_0x216650[_0x8057('0x2c')]=_[_0x8057('0x2e')](db[_0x8057('0x42')][_0x8057('0x43')]);_0x216650[_0x8057('0x2d')]=_[_0x8057('0x2e')](_0x22ae42[_0x8057('0x2d')]);_0x216650[_0x8057('0x2f')]=_[_0x8057('0x30')](_0x216650[_0x8057('0x2c')],_0x216650[_0x8057('0x2d')]);_0x58c157['attributes']=_[_0x8057('0x30')](_0x216650[_0x8057('0x2c')],qs[_0x8057('0x32')](_0x22ae42[_0x8057('0x2d')]['fields']));_0x58c157['attributes']=_0x58c157['attributes'][_0x8057('0x33')]?_0x58c157['attributes']:_0x216650[_0x8057('0x2c')];if(_0x22ae42['query']['includeAll']){_0x58c157[_0x8057('0x44')]=[{'all':!![]}];}_0x58c157=_[_0x8057('0x3b')]({},_0x58c157,_0x22ae42['options']);return db['AnalyticDefaultReport'][_0x8057('0x45')](_0x58c157)['then'](handleEntityNotFound(_0x485277,null))['then'](respondWithResult(_0x485277,null))[_0x8057('0x46')](handleError(_0x485277,null));};exports[_0x8057('0x47')]=function(_0x4daad4,_0x98d88){return db[_0x8057('0x42')][_0x8057('0x47')](_0x4daad4[_0x8057('0x48')],{})[_0x8057('0x21')](function(_0x35bf3b){var _0x15ea8c=_0x4daad4[_0x8057('0x49')][_0x8057('0x23')]({'plain':!![]});if(!_0x15ea8c)throw new Error(_0x8057('0x4a'));if(_0x15ea8c[_0x8057('0x4b')]===_0x8057('0x49')){var _0x44eea9=_0x35bf3b[_0x8057('0x23')]({'plain':!![]});var _0x1f0228=_0x8057('0x4c');return db[_0x8057('0x4d')][_0x8057('0x45')]({'where':{'name':_0x1f0228,'userProfileId':_0x15ea8c['userProfileId']},'raw':!![]})[_0x8057('0x21')](function(_0x3c5cda){if(_0x3c5cda&&_0x3c5cda['autoAssociation']===0x0){return db[_0x8057('0x25')][_0x8057('0x47')]({'name':_0x44eea9[_0x8057('0x28')],'resourceId':_0x44eea9['id'],'type':_0x8057('0x24'),'sectionId':_0x3c5cda['id']},{})['then'](function(){return _0x35bf3b;});}else{return _0x35bf3b;}})[_0x8057('0x46')](function(_0x44662b){logger['error'](_0x8057('0x4e'),_0x44662b);throw _0x44662b;});}return _0x35bf3b;})['then'](respondWithResult(_0x98d88,0xc9))['catch'](handleError(_0x98d88,null));};exports[_0x8057('0x20')]=function(_0x4af2c7,_0x3b87fd){if(_0x4af2c7['body']['id']){delete _0x4af2c7['body']['id'];}return db[_0x8057('0x42')]['find']({'where':{'id':_0x4af2c7[_0x8057('0x41')]['id']}})[_0x8057('0x21')](handleEntityNotFound(_0x3b87fd,null))[_0x8057('0x21')](saveUpdates(_0x4af2c7[_0x8057('0x48')],null))[_0x8057('0x21')](respondWithResult(_0x3b87fd,null))[_0x8057('0x46')](handleError(_0x3b87fd,null));};exports[_0x8057('0x22')]=function(_0x3d2d9f,_0x591241){return db[_0x8057('0x42')][_0x8057('0x45')]({'where':{'id':_0x3d2d9f['params']['id']}})[_0x8057('0x21')](handleEntityNotFound(_0x591241,null))[_0x8057('0x21')](removeEntity(_0x591241,null))[_0x8057('0x46')](handleError(_0x591241,null));};exports[_0x8057('0x4f')]=function(_0x14539a,_0x25d123){var _0x4940ae=0xa;var _0x27ba23=['join','left_join','right_join',_0x8057('0x50')];var _0x2428db={'SUM':_0x8057('0x51'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x8057('0x52'),'MAX':_0x8057('0x53'),'MIN':_0x8057('0x54'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x8057('0x55'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x8057('0x56')};var _0x8f0979={'SEC_TO_TIME':_0x8057('0x57'),'DATE':'DATE(%s)','HOUR':_0x8057('0x58'),'ROUND':_0x8057('0x59'),'UNIX_TIMESTAMP':_0x8057('0x5a')};var _0x3ca821=function(_0xd806bf){return!_['includes']([_0x8057('0x5b'),_0x8057('0x5c'),_0x8057('0x5d'),_0x8057('0x5e')],_0xd806bf);};var _0x2aad78=function(_0x145d97){if(!_0x145d97||!_0x145d97['rules']['length']){return'';}for(var _0x2b51d4='(',_0x36ece9=0x0;_0x36ece9<_0x145d97['rules'][_0x8057('0x33')];_0x36ece9+=0x1){_0x36ece9>0x0&&(_0x2b51d4+='\x20'+_0x145d97[_0x8057('0x5f')]+'\x20');_0x2b51d4+=_0x145d97[_0x8057('0x60')][_0x36ece9][_0x8057('0x61')]?_0x2aad78(_0x145d97[_0x8057('0x60')][_0x36ece9][_0x8057('0x61')]):_0x145d97[_0x8057('0x60')][_0x36ece9][_0x8057('0x62')]+'\x20'+_0x145d97[_0x8057('0x60')][_0x36ece9][_0x8057('0x63')]+(_0x3ca821(_0x145d97[_0x8057('0x60')][_0x36ece9][_0x8057('0x63')])?'\x20'+_0x145d97[_0x8057('0x60')][_0x36ece9][_0x8057('0x64')]:'');}return _0x2b51d4+')';};var _0x3232e0={'where':{'id':_0x14539a[_0x8057('0x41')]['id']}},_0x2453fc,_0x1f1036,_0x55fab0,_0x4e505e,_0x509f80;_0x3232e0=_[_0x8057('0x3b')]({},_0x3232e0,_0x14539a[_0x8057('0x3d')]);return db['AnalyticDefaultReport'][_0x8057('0x45')](_0x3232e0)['then'](function(_0x39c65a){if(_0x39c65a){_0x2453fc=_0x39c65a;return _0x39c65a[_0x8057('0x65')]();}return null;})['then'](function(_0x554e76){if(_0x554e76){if(!_0x554e76['length']){throw new db[(_0x8057('0x66'))][(_0x8057('0x67'))](_0x8057('0x68'),0x193);}_0x1f1036=_0x554e76;return db['AnalyticMetric'][_0x8057('0x3e')]({'raw':!![]});}return null;})[_0x8057('0x21')](function(_0x362c8b){if(_0x362c8b){_0x55fab0=_[_0x8057('0x69')](_0x362c8b,'id');var _0x16fd4d;var _0x48af23=squel[_0x8057('0x6a')]();_0x48af23[_0x8057('0x6b')](_0x2453fc[_0x8057('0x6c')]);for(var _0x4426b7=0x0;_0x4426b7<_0x1f1036[_0x8057('0x33')];_0x4426b7+=0x1){_0x16fd4d=_0x1f1036[_0x4426b7][_0x8057('0x6d')]?_0x55fab0[_0x1f1036[_0x4426b7][_0x8057('0x6d')]][_0x8057('0x6e')]:_0x1f1036[_0x4426b7][_0x8057('0x62')];_0x16fd4d=_0x1f1036[_0x4426b7][_0x8057('0x6f')]?_[_0x8057('0x70')](_0x2428db[_0x1f1036[_0x4426b7][_0x8057('0x6f')]],'%s',_0x16fd4d):_0x16fd4d;_0x16fd4d=_0x1f1036[_0x4426b7]['format']?_[_0x8057('0x70')](_0x8f0979[_0x1f1036[_0x4426b7][_0x8057('0x71')]],'%s',_0x16fd4d):_0x16fd4d;if(_0x1f1036[_0x4426b7]['groupBy']){_0x48af23[_0x8057('0x61')](_0x16fd4d);}_0x1f1036[_0x4426b7]['orderBy']&&_0x48af23[_0x8057('0x36')](_0x16fd4d,_0x1f1036[_0x4426b7]['orderBy']===_0x8057('0x72')?![]:!![]);_0x48af23[_0x8057('0x62')](_0x16fd4d,_0x1f1036[_0x4426b7][_0x8057('0x73')]||_0x16fd4d);}if(_0x2453fc[_0x8057('0x74')]){_0x2453fc['joins']=JSON[_0x8057('0x75')](_0x2453fc[_0x8057('0x74')]);for(var _0x4af5bc=0x0;_0x4af5bc<_0x2453fc[_0x8057('0x74')][_0x8057('0x33')];_0x4af5bc+=0x1){if(_0x2453fc[_0x8057('0x74')][_0x4af5bc][_0x8057('0x2b')]&&_[_0x8057('0x76')](_0x27ba23,_0x2453fc[_0x8057('0x74')][_0x4af5bc][_0x8057('0x2b')])&&_0x2453fc[_0x8057('0x74')][_0x4af5bc][_0x8057('0x77')]&&_0x2453fc['joins'][_0x4af5bc][_0x8057('0x78')]&&_0x2453fc[_0x8057('0x74')][_0x4af5bc][_0x8057('0x79')]){_0x48af23[_0x2453fc[_0x8057('0x74')][_0x4af5bc][_0x8057('0x2b')]](_0x2453fc[_0x8057('0x74')][_0x4af5bc][_0x8057('0x78')],null,util[_0x8057('0x71')](_0x8057('0x7a'),_0x2453fc[_0x8057('0x6c')],_0x2453fc[_0x8057('0x74')][_0x4af5bc]['parentKey'],_0x2453fc[_0x8057('0x74')][_0x4af5bc][_0x8057('0x78')],_0x2453fc['joins'][_0x4af5bc]['foreignKey']));}}}if(_0x2453fc['conditions']){_0x2453fc['conditions']=JSON[_0x8057('0x75')](_0x2453fc[_0x8057('0x7b')]);_0x48af23[_0x8057('0x38')](_0x2aad78(_0x2453fc[_0x8057('0x7b')][_0x8057('0x61')]));}_0x509f80=_0x48af23[_0x8057('0x7c')]();_0x48af23[_0x8057('0x1b')](_0x4940ae);_0x48af23[_0x8057('0x1a')](0x0);logger[_0x8057('0x7d')](_0x8057('0x7e'),_0x48af23[_0x8057('0x7f')]());return db[_0x8057('0x80')][_0x8057('0x2d')](_0x48af23[_0x8057('0x7f')](),{'type':db[_0x8057('0x80')][_0x8057('0x81')][_0x8057('0x82')]});}})['then'](respondWithResult(_0x25d123,null))[_0x8057('0x46')](handleError(_0x25d123,null));};function runReport(_0x225f49,_0x555f5d,_0x3a7a2c){var _0x30771a=_0x555f5d[_0x8057('0x28')];var _0x5f424c=0xa;var _0x5c5fc7=[_0x8057('0x83'),_0x8057('0x84'),'right_join',_0x8057('0x50')];var _0xe11cbb={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x8057('0x52'),'MAX':_0x8057('0x53'),'MIN':_0x8057('0x54'),'AVG':_0x8057('0x85'),'GROUP_CONCAT':_0x8057('0x55'),'GROUP_CONCAT ASC':_0x8057('0x86'),'GROUP_CONCAT DESC':_0x8057('0x56')};var _0x320b74={'SEC_TO_TIME':_0x8057('0x57'),'DATE':'DATE(%s)','HOUR':_0x8057('0x58'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x4430bf=function(_0x394d61){return!_[_0x8057('0x76')]([_0x8057('0x5b'),_0x8057('0x5c'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0x394d61);};var _0x1359a9=function(_0x4fd116){if(!_0x4fd116||!_0x4fd116['rules'][_0x8057('0x33')]){return'';}for(var _0x287954='(',_0x28a15b=0x0;_0x28a15b<_0x4fd116[_0x8057('0x60')][_0x8057('0x33')];_0x28a15b+=0x1){_0x28a15b>0x0&&(_0x287954+='\x20'+_0x4fd116[_0x8057('0x5f')]+'\x20');_0x287954+=_0x4fd116[_0x8057('0x60')][_0x28a15b]['group']?_0x1359a9(_0x4fd116[_0x8057('0x60')][_0x28a15b]['group']):_0x4fd116['rules'][_0x28a15b][_0x8057('0x62')]+'\x20'+_0x4fd116[_0x8057('0x60')][_0x28a15b]['condition']+(_0x4430bf(_0x4fd116[_0x8057('0x60')][_0x28a15b][_0x8057('0x63')])?'\x20'+_0x4fd116[_0x8057('0x60')][_0x28a15b][_0x8057('0x64')]:'');}return _0x287954+')';};var _0xc326bb={'where':{'id':_0x225f49['id']}},_0x3495b2,_0x3b0f89,_0x1d3910,_0x5ad810,_0xd9c0e7;_0xc326bb=_[_0x8057('0x3b')]({},_0xc326bb,_0x3a7a2c);return db['AnalyticDefaultReport'][_0x8057('0x45')](_0xc326bb)[_0x8057('0x21')](function(_0x143b1f){if(_0x143b1f){_0x3495b2=_0x143b1f;return _0x143b1f[_0x8057('0x65')]();}return null;})[_0x8057('0x21')](function(_0xa61eaf){if(_0xa61eaf){if(!_0xa61eaf[_0x8057('0x33')]){throw new db[(_0x8057('0x66'))]['ValidationErrorItem'](_0x8057('0x68'),0x193);}_0x3b0f89=_0xa61eaf;return db[_0x8057('0x87')][_0x8057('0x3e')]({'raw':!![]});}return null;})[_0x8057('0x21')](function(_0x901552){if(_0x901552){_0x1d3910=_['keyBy'](_0x901552,'id');var _0xd040b7;var _0x398378=squel[_0x8057('0x6a')]();_0x398378['from'](_0x3495b2[_0x8057('0x6c')]);for(var _0xe2e060=0x0;_0xe2e060<_0x3b0f89[_0x8057('0x33')];_0xe2e060+=0x1){_0xd040b7=_0x3b0f89[_0xe2e060][_0x8057('0x6d')]?_0x1d3910[_0x3b0f89[_0xe2e060]['MetricId']][_0x8057('0x6e')]:_0x3b0f89[_0xe2e060][_0x8057('0x62')];_0xd040b7=_0x3b0f89[_0xe2e060]['function']?_[_0x8057('0x70')](_0xe11cbb[_0x3b0f89[_0xe2e060][_0x8057('0x6f')]],'%s',_0xd040b7):_0xd040b7;_0xd040b7=_0x3b0f89[_0xe2e060][_0x8057('0x71')]?_[_0x8057('0x70')](_0x320b74[_0x3b0f89[_0xe2e060][_0x8057('0x71')]],'%s',_0xd040b7):_0xd040b7;if(_0x3b0f89[_0xe2e060][_0x8057('0x88')]){_0x398378[_0x8057('0x61')](_0xd040b7);}_0x3b0f89[_0xe2e060][_0x8057('0x89')]&&_0x398378[_0x8057('0x36')](_0xd040b7,_0x3b0f89[_0xe2e060]['orderBy']===_0x8057('0x72')?![]:!![]);_0x398378[_0x8057('0x62')](_0xd040b7,_0x3b0f89[_0xe2e060]['alias']||_0xd040b7);}if(_0x3495b2[_0x8057('0x74')]){_0x3495b2[_0x8057('0x74')]=JSON[_0x8057('0x75')](_0x3495b2['joins']);for(var _0x3a4200=0x0;_0x3a4200<_0x3495b2['joins'][_0x8057('0x33')];_0x3a4200+=0x1){if(_0x3495b2[_0x8057('0x74')][_0x3a4200]['type']&&_[_0x8057('0x76')](_0x5c5fc7,_0x3495b2['joins'][_0x3a4200][_0x8057('0x2b')])&&_0x3495b2['joins'][_0x3a4200][_0x8057('0x77')]&&_0x3495b2[_0x8057('0x74')][_0x3a4200][_0x8057('0x78')]&&_0x3495b2[_0x8057('0x74')][_0x3a4200][_0x8057('0x79')]){_0x398378[_0x3495b2[_0x8057('0x74')][_0x3a4200][_0x8057('0x2b')]](_0x3495b2[_0x8057('0x74')][_0x3a4200][_0x8057('0x78')],null,util[_0x8057('0x71')](_0x8057('0x7a'),_0x3495b2[_0x8057('0x6c')],_0x3495b2[_0x8057('0x74')][_0x3a4200][_0x8057('0x77')],_0x3495b2[_0x8057('0x74')][_0x3a4200][_0x8057('0x78')],_0x3495b2['joins'][_0x3a4200]['foreignKey']));}}}if(_0x3495b2['conditions']){_0x3495b2[_0x8057('0x7b')]=JSON[_0x8057('0x75')](_0x3495b2[_0x8057('0x7b')]);_0x398378[_0x8057('0x38')](_0x1359a9(_0x3495b2[_0x8057('0x7b')][_0x8057('0x61')]));}_0xd9c0e7=_0x398378['clone']();_0x398378[_0x8057('0x1b')](_0x5f424c);_0x398378[_0x8057('0x1a')](0x0);logger['debug']('Limited\x20Query:',_0x398378[_0x8057('0x7f')]());return db[_0x8057('0x80')]['query'](_0x398378[_0x8057('0x7f')](),{'type':db[_0x8057('0x80')][_0x8057('0x81')][_0x8057('0x82')]});}})[_0x8057('0x21')](function(_0x5acddb){if(!_0x5acddb[_0x8057('0x33')]){throw new db[(_0x8057('0x66'))][(_0x8057('0x67'))](_0x8057('0x8a'),0xcc);}if(_0x555f5d['output']===_0x8057('0x8b')){return null;}var _0x317562=_[_0x8057('0x3b')](_0x555f5d,{'name':_0x555f5d[_0x8057('0x8c')]||_0x555f5d['name']||_0x3495b2[_0x8057('0x28')],'basename':_0x30771a,'savename':util[_0x8057('0x71')](_0x8057('0x8d'),_0x555f5d['name']||_0x3495b2[_0x8057('0x28')],require(_0x8057('0x8e'))['generate'](0x4),_0x555f5d['output']||'csv'),'reportId':_0x3495b2['id'],'reportType':'default'});return db[_0x8057('0x8f')][_0x8057('0x47')](_0x317562,{'raw':!![]});})[_0x8057('0x21')](function(_0x38d291){if(_0x3495b2[_0x8057('0x6c')]==='cdr'){_0xd9c0e7['where'](_0x3495b2[_0x8057('0x6c')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x555f5d[_0x8057('0x90')],_0x555f5d[_0x8057('0x91')]);}else{_0xd9c0e7['where'](_0x3495b2['table']+_0x8057('0x92'),_0x555f5d[_0x8057('0x90')],_0x555f5d['endDate']);}if(_0x38d291){logger[_0x8057('0x93')](_0x8057('0x94'),_0xd9c0e7[_0x8057('0x7f')]());require('child_process')[_0x8057('0x95')](path['join'](__dirname,_0x8057('0x96'),_0x38d291[_0x8057('0x97')]),[_0x38d291['id'],_0xd9c0e7['toString'](),path['join'](__dirname,_0x8057('0x98'),_0x38d291[_0x8057('0x99')]),_0x30771a]);return _0x38d291;}else{var _0x2ecf70=squel['select']();_0x2ecf70['from']('('+_0xd9c0e7[_0x8057('0x7f')]()+')',_0x8057('0x9a'));_0x2ecf70[_0x8057('0x62')](_0x8057('0x9b'),'count');_0xd9c0e7['limit'](_0x555f5d[_0x8057('0x1b')]||_0x5f424c);_0xd9c0e7['offset'](_0x555f5d[_0x8057('0x1a')]||0x0);return db['sequelize'][_0x8057('0x2d')](_0x2ecf70[_0x8057('0x7f')](),{'type':db[_0x8057('0x80')]['QueryTypes'][_0x8057('0x82')]})[_0x8057('0x21')](function(_0x256764){if(!_0x256764[_0x8057('0x33')]){_0x5ad810=0x0;}else{_0x5ad810=_0x256764[0x0][_0x8057('0x19')]||0x0;}return db[_0x8057('0x80')][_0x8057('0x2d')](_0xd9c0e7[_0x8057('0x7f')](),{'type':db['sequelize'][_0x8057('0x81')]['SELECT']});})[_0x8057('0x21')](function(_0x510364){return{'rows':_0x510364||[],'count':_0x5ad810};});}});}exports[_0x8057('0x9c')]=function(_0x445aab,_0xd34082){return runReport(_0x445aab[_0x8057('0x41')],_0x445aab[_0x8057('0x2d')],_0x445aab[_0x8057('0x3d')])[_0x8057('0x21')](respondWithResult(_0xd34082,null))['catch'](handleError(_0xd34082,null));};exports[_0x8057('0x9d')]=runReport;exports[_0x8057('0x2d')]=function(_0x15c20f,_0x3bbb0d){var _0x19b3a6=0xa;var _0x4a6203=['join',_0x8057('0x84'),_0x8057('0x9e'),'cross_join'];var _0x4f0408={'SUM':_0x8057('0x51'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x8057('0x52'),'MAX':_0x8057('0x53'),'MIN':'MIN(%s)','AVG':_0x8057('0x85'),'GROUP_CONCAT':_0x8057('0x55'),'GROUP_CONCAT ASC':_0x8057('0x86'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x7994a0={'SEC_TO_TIME':_0x8057('0x57'),'DATE':_0x8057('0x9f'),'HOUR':_0x8057('0x58'),'ROUND':_0x8057('0x59'),'UNIX_TIMESTAMP':_0x8057('0x5a')};var _0xde063f=function(_0x49db46){return!_[_0x8057('0x76')]([_0x8057('0x5b'),_0x8057('0x5c'),_0x8057('0x5d'),'IS\x20NOT\x20EMPTY'],_0x49db46);};var _0x12f011=function(_0x178bca){if(!_0x178bca||!_0x178bca[_0x8057('0x60')][_0x8057('0x33')]){return'';}for(var _0x2b9f1b='(',_0x3e6693=0x0;_0x3e6693<_0x178bca[_0x8057('0x60')]['length'];_0x3e6693+=0x1){_0x3e6693>0x0&&(_0x2b9f1b+='\x20'+_0x178bca[_0x8057('0x5f')]+'\x20');_0x2b9f1b+=_0x178bca[_0x8057('0x60')][_0x3e6693][_0x8057('0x61')]?_0x12f011(_0x178bca[_0x8057('0x60')][_0x3e6693]['group']):_0x178bca['rules'][_0x3e6693][_0x8057('0x62')]+'\x20'+_0x178bca[_0x8057('0x60')][_0x3e6693][_0x8057('0x63')]+(_0xde063f(_0x178bca[_0x8057('0x60')][_0x3e6693][_0x8057('0x63')])?'\x20'+_0x178bca['rules'][_0x3e6693][_0x8057('0x64')]:'');}return _0x2b9f1b+')';};var _0x13f35f={'where':{'id':_0x15c20f[_0x8057('0x41')]['id']}},_0x2e5aeb,_0x31d178,_0x3c6e4e,_0x27225f,_0x1a6f0e;_0x13f35f=_[_0x8057('0x3b')]({},_0x13f35f,_0x15c20f[_0x8057('0x3d')]);return db['AnalyticDefaultReport'][_0x8057('0x45')](_0x13f35f)[_0x8057('0x21')](function(_0xde1614){if(_0xde1614){_0x2e5aeb=_0xde1614;return _0xde1614[_0x8057('0x65')]();}return null;})['then'](function(_0x5047b8){if(_0x5047b8){if(!_0x5047b8[_0x8057('0x33')]){throw new db['Sequelize'][(_0x8057('0x67'))](_0x8057('0x68'),0x193);}_0x31d178=_0x5047b8;return db[_0x8057('0x87')]['findAll']({'raw':!![]});}return null;})[_0x8057('0x21')](function(_0x11fa07){if(_0x11fa07){_0x3c6e4e=_['keyBy'](_0x11fa07,'id');var _0x1b0807;var _0x9ae579=squel[_0x8057('0x6a')]();_0x9ae579[_0x8057('0x6b')](_0x2e5aeb[_0x8057('0x6c')]);for(var _0x2c6434=0x0;_0x2c6434<_0x31d178[_0x8057('0x33')];_0x2c6434+=0x1){_0x1b0807=_0x31d178[_0x2c6434][_0x8057('0x6d')]?_0x3c6e4e[_0x31d178[_0x2c6434][_0x8057('0x6d')]][_0x8057('0x6e')]:_0x31d178[_0x2c6434][_0x8057('0x62')];_0x1b0807=_0x31d178[_0x2c6434]['function']?_[_0x8057('0x70')](_0x4f0408[_0x31d178[_0x2c6434][_0x8057('0x6f')]],'%s',_0x1b0807):_0x1b0807;_0x1b0807=_0x31d178[_0x2c6434][_0x8057('0x71')]?_['replace'](_0x7994a0[_0x31d178[_0x2c6434][_0x8057('0x71')]],'%s',_0x1b0807):_0x1b0807;if(_0x31d178[_0x2c6434][_0x8057('0x88')]){_0x9ae579[_0x8057('0x61')](_0x1b0807);}_0x31d178[_0x2c6434][_0x8057('0x89')]&&_0x9ae579['order'](_0x1b0807,_0x31d178[_0x2c6434]['orderBy']===_0x8057('0x72')?![]:!![]);_0x9ae579[_0x8057('0x62')](_0x1b0807,_0x31d178[_0x2c6434][_0x8057('0x73')]||_0x1b0807);}if(_0x2e5aeb[_0x8057('0x74')]){_0x2e5aeb[_0x8057('0x74')]=JSON[_0x8057('0x75')](_0x2e5aeb[_0x8057('0x74')]);for(var _0x330b7b=0x0;_0x330b7b<_0x2e5aeb[_0x8057('0x74')][_0x8057('0x33')];_0x330b7b+=0x1){if(_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x2b')]&&_[_0x8057('0x76')](_0x4a6203,_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x2b')])&&_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x77')]&&_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x78')]&&_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x79')]){_0x9ae579[_0x2e5aeb['joins'][_0x330b7b][_0x8057('0x2b')]](_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x78')],null,util[_0x8057('0x71')]('%s.%s\x20=\x20%s.%s',_0x2e5aeb[_0x8057('0x6c')],_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x77')],_0x2e5aeb['joins'][_0x330b7b]['foreignTable'],_0x2e5aeb[_0x8057('0x74')][_0x330b7b][_0x8057('0x79')]));}}}if(_0x2e5aeb[_0x8057('0x7b')]){_0x2e5aeb[_0x8057('0x7b')]=JSON['parse'](_0x2e5aeb['conditions']);_0x9ae579[_0x8057('0x38')](_0x12f011(_0x2e5aeb[_0x8057('0x7b')][_0x8057('0x61')]));}_0x1a6f0e=_0x9ae579['clone']();_0x9ae579[_0x8057('0x1b')](_0x19b3a6);_0x9ae579[_0x8057('0x1a')](0x0);logger[_0x8057('0x7d')](_0x8057('0x7e'),_0x9ae579[_0x8057('0x7f')]());return db['sequelize'][_0x8057('0x2d')](_0x9ae579[_0x8057('0x7f')](),{'type':db['sequelize'][_0x8057('0x81')][_0x8057('0x82')]});}})[_0x8057('0x21')](function(){return{'sql':_0x1a6f0e[_0x8057('0x7f')]()};})[_0x8057('0x21')](respondWithResult(_0x3bbb0d,null))[_0x8057('0x46')](handleError(_0x3bbb0d,null));};
\ No newline at end of file
+var _0xd1da=['format','groupBy','orderBy','alias','joins','parse','parentKey','foreignKey','foreignTable','%s.%s\x20=\x20%s.%s','conditions','clone','toString','sequelize','QueryTypes','SELECT','cross_join','SUM(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','IS\x20NOT\x20EMPTY','value','getFields','Sequelize','replace','DESC','field','debug','No\x20available\x20data','output','web','fullPath','randomstring','csv','default','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','info','Run\x20Query:','fork','savename','COUNT(*)','run','left_join','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','to-csv','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','end','json','count','offset','limit','status','set','reject','update','then','DefaultReports','UserProfileResource','destroy','sendStatus','name','send','index','map','fieldName','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','where','pick','filter','merge','type','VIRTUAL','options','AnalyticDefaultReport','include','findAll','rows','catch','show','length','includeAll','find','create','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','preview','join','right_join','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','operator','group','condition','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function'];(function(_0x3667a2,_0x53e630){var _0x10c6ba=function(_0x364527){while(--_0x364527){_0x3667a2['push'](_0x3667a2['shift']());}};_0x10c6ba(++_0x53e630);}(_0xd1da,0xca));var _0xad1d=function(_0x1bd2a6,_0x45f0fc){_0x1bd2a6=_0x1bd2a6-0x0;var _0x525206=_0xd1da[_0x1bd2a6];return _0x525206;};'use strict';var pdf=require(_0xad1d('0x0'));var emlformat=require(_0xad1d('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xad1d('0x2'));var jsonpatch=require(_0xad1d('0x3'));var rp=require(_0xad1d('0x4'));var moment=require(_0xad1d('0x5'));var BPromise=require(_0xad1d('0x6'));var Mustache=require(_0xad1d('0x7'));var util=require(_0xad1d('0x8'));var path=require(_0xad1d('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xad1d('0xa'));var fs=require('fs');var _=require(_0xad1d('0xb'));var squel=require(_0xad1d('0xc'));var crypto=require(_0xad1d('0xd'));var jsforce=require(_0xad1d('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xad1d('0xf'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xad1d('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xad1d('0x11'));var hardwareService=require(_0xad1d('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0xad1d('0x13'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1afc3a,_0x5d47be){_0x5d47be=_0x5d47be||0xcc;return function(_0x22bcf2){if(_0x22bcf2){return _0x1afc3a['sendStatus'](_0x5d47be);}return _0x1afc3a['status'](_0x5d47be)[_0xad1d('0x14')]();};}function respondWithResult(_0x18354f,_0xb0c130){_0xb0c130=_0xb0c130||0xc8;return function(_0x4931d9){if(_0x4931d9){return _0x18354f['status'](_0xb0c130)[_0xad1d('0x15')](_0x4931d9);}};}function respondWithFilteredResult(_0x409102,_0x21171d){return function(_0x4ae2b6){if(_0x4ae2b6){var _0x4d1db9=_0x4ae2b6[_0xad1d('0x16')],_0x8d0cf1=_0x21171d['offset'],_0x1561fb=_0x21171d[_0xad1d('0x17')]+_0x21171d[_0xad1d('0x18')],_0x43f3c3;if(_0x1561fb>=_0x4d1db9){_0x1561fb=_0x4d1db9;_0x43f3c3=0xc8;}else{_0x43f3c3=0xce;}_0x409102[_0xad1d('0x19')](_0x43f3c3);return _0x409102[_0xad1d('0x1a')]('Content-Range',_0x8d0cf1+'-'+_0x1561fb+'/'+_0x4d1db9)[_0xad1d('0x15')](_0x4ae2b6);}return null;};}function patchUpdates(_0x569fba){return function(_0x5e0da6){try{jsonpatch['apply'](_0x5e0da6,_0x569fba,!![]);}catch(_0x349af1){return BPromise[_0xad1d('0x1b')](_0x349af1);}return _0x5e0da6['save']();};}function saveUpdates(_0x43c412,_0x511e0e){return function(_0x55c47b){if(_0x55c47b){return _0x55c47b[_0xad1d('0x1c')](_0x43c412)[_0xad1d('0x1d')](function(_0x5760d9){return _0x5760d9;});}return null;};}function removeEntity(_0xd57449,_0x1934ab){return function(_0x2e66c2){if(_0x2e66c2){return _0x2e66c2['destroy']()[_0xad1d('0x1d')](function(){var _0x342e0a=_0x2e66c2['get']({'plain':!![]});var _0x4781da=_0xad1d('0x1e');return db[_0xad1d('0x1f')][_0xad1d('0x20')]({'where':{'type':_0x4781da,'resourceId':_0x342e0a['id']}})[_0xad1d('0x1d')](function(){return _0x2e66c2;});})[_0xad1d('0x1d')](function(){_0xd57449[_0xad1d('0x19')](0xcc)[_0xad1d('0x14')]();});}};}function handleEntityNotFound(_0x643b96,_0x4bf491){return function(_0x580b28){if(!_0x580b28){_0x643b96[_0xad1d('0x21')](0x194);}return _0x580b28;};}function handleError(_0x54a225,_0x5de64f){_0x5de64f=_0x5de64f||0x1f4;return function(_0x156cd1){logger['error'](_0x156cd1['stack']);if(_0x156cd1['name']){delete _0x156cd1[_0xad1d('0x22')];}_0x54a225['status'](_0x5de64f)[_0xad1d('0x23')](_0x156cd1);};}exports[_0xad1d('0x24')]=function(_0x577e4c,_0xfb80c6){var _0x48bec2={},_0x1fee01={},_0x24264b={'count':0x0,'rows':[]};var _0x270217=_[_0xad1d('0x25')](db['AnalyticDefaultReport']['rawAttributes'],function(_0x3d6710){return{'name':_0x3d6710[_0xad1d('0x26')],'type':_0x3d6710['type'][_0xad1d('0x27')]};});_0x1fee01[_0xad1d('0x28')]=_[_0xad1d('0x25')](_0x270217,_0xad1d('0x22'));_0x1fee01[_0xad1d('0x29')]=_[_0xad1d('0x2a')](_0x577e4c[_0xad1d('0x29')]);_0x1fee01[_0xad1d('0x2b')]=_[_0xad1d('0x2c')](_0x1fee01['model'],_0x1fee01[_0xad1d('0x29')]);_0x48bec2[_0xad1d('0x2d')]=_['intersection'](_0x1fee01[_0xad1d('0x28')],qs[_0xad1d('0x2e')](_0x577e4c['query'][_0xad1d('0x2e')]));_0x48bec2[_0xad1d('0x2d')]=_0x48bec2['attributes']['length']?_0x48bec2[_0xad1d('0x2d')]:_0x1fee01[_0xad1d('0x28')];if(!_0x577e4c[_0xad1d('0x29')][_0xad1d('0x2f')](_0xad1d('0x30'))){_0x48bec2['limit']=qs[_0xad1d('0x18')](_0x577e4c['query'][_0xad1d('0x18')]);_0x48bec2[_0xad1d('0x17')]=qs[_0xad1d('0x17')](_0x577e4c['query'][_0xad1d('0x17')]);}_0x48bec2[_0xad1d('0x31')]=qs['sort'](_0x577e4c[_0xad1d('0x29')]['sort']);_0x48bec2[_0xad1d('0x32')]=qs['filters'](_[_0xad1d('0x33')](_0x577e4c[_0xad1d('0x29')],_0x1fee01['filters']));if(_0x577e4c[_0xad1d('0x29')][_0xad1d('0x34')]){_0x48bec2[_0xad1d('0x32')]=_[_0xad1d('0x35')](_0x48bec2['where'],{'$or':_[_0xad1d('0x25')](_0x270217,function(_0xff8a98){if(_0xff8a98[_0xad1d('0x36')]!==_0xad1d('0x37')){var _0x4c1caf={};_0x4c1caf[_0xff8a98['name']]={'$like':'%'+_0x577e4c[_0xad1d('0x29')][_0xad1d('0x34')]+'%'};return _0x4c1caf;}})});}_0x48bec2=_[_0xad1d('0x35')]({},_0x48bec2,_0x577e4c[_0xad1d('0x38')]);var _0x1c4439={'where':_0x48bec2[_0xad1d('0x32')]};return db[_0xad1d('0x39')][_0xad1d('0x16')](_0x1c4439)[_0xad1d('0x1d')](function(_0x1d5bef){_0x24264b[_0xad1d('0x16')]=_0x1d5bef;if(_0x577e4c[_0xad1d('0x29')]['includeAll']){_0x48bec2[_0xad1d('0x3a')]=[{'all':!![]}];}return db['AnalyticDefaultReport'][_0xad1d('0x3b')](_0x48bec2);})['then'](function(_0xa3310a){_0x24264b[_0xad1d('0x3c')]=_0xa3310a;return _0x24264b;})[_0xad1d('0x1d')](respondWithFilteredResult(_0xfb80c6,_0x48bec2))[_0xad1d('0x3d')](handleError(_0xfb80c6,null));};exports[_0xad1d('0x3e')]=function(_0x3d4d0b,_0x1318cc){var _0x122f2d={'raw':!![],'where':{'id':_0x3d4d0b['params']['id']}},_0x120953={};_0x120953[_0xad1d('0x28')]=_[_0xad1d('0x2a')](db[_0xad1d('0x39')]['rawAttributes']);_0x120953[_0xad1d('0x29')]=_[_0xad1d('0x2a')](_0x3d4d0b[_0xad1d('0x29')]);_0x120953[_0xad1d('0x2b')]=_[_0xad1d('0x2c')](_0x120953[_0xad1d('0x28')],_0x120953[_0xad1d('0x29')]);_0x122f2d[_0xad1d('0x2d')]=_[_0xad1d('0x2c')](_0x120953['model'],qs[_0xad1d('0x2e')](_0x3d4d0b['query'][_0xad1d('0x2e')]));_0x122f2d[_0xad1d('0x2d')]=_0x122f2d['attributes'][_0xad1d('0x3f')]?_0x122f2d[_0xad1d('0x2d')]:_0x120953['model'];if(_0x3d4d0b['query'][_0xad1d('0x40')]){_0x122f2d['include']=[{'all':!![]}];}_0x122f2d=_[_0xad1d('0x35')]({},_0x122f2d,_0x3d4d0b['options']);return db['AnalyticDefaultReport'][_0xad1d('0x41')](_0x122f2d)[_0xad1d('0x1d')](handleEntityNotFound(_0x1318cc,null))['then'](respondWithResult(_0x1318cc,null))[_0xad1d('0x3d')](handleError(_0x1318cc,null));};exports[_0xad1d('0x42')]=function(_0x1be210,_0x568544){return db[_0xad1d('0x39')][_0xad1d('0x42')](_0x1be210['body'],{})[_0xad1d('0x1d')](function(_0x48aa16){var _0x1a61ec=_0x1be210['user'][_0xad1d('0x43')]({'plain':!![]});if(!_0x1a61ec)throw new Error(_0xad1d('0x44'));if(_0x1a61ec['role']===_0xad1d('0x45')){var _0x2918b7=_0x48aa16[_0xad1d('0x43')]({'plain':!![]});var _0x4075c3='Reports';return db['UserProfileSection'][_0xad1d('0x41')]({'where':{'name':_0x4075c3,'userProfileId':_0x1a61ec['userProfileId']},'raw':!![]})[_0xad1d('0x1d')](function(_0xd43152){if(_0xd43152&&_0xd43152[_0xad1d('0x46')]===0x0){return db[_0xad1d('0x1f')][_0xad1d('0x42')]({'name':_0x2918b7['name'],'resourceId':_0x2918b7['id'],'type':'DefaultReports','sectionId':_0xd43152['id']},{})[_0xad1d('0x1d')](function(){return _0x48aa16;});}else{return _0x48aa16;}})[_0xad1d('0x3d')](function(_0x3ccb36){logger['error'](_0xad1d('0x47'),_0x3ccb36);throw _0x3ccb36;});}return _0x48aa16;})[_0xad1d('0x1d')](respondWithResult(_0x568544,0xc9))[_0xad1d('0x3d')](handleError(_0x568544,null));};exports[_0xad1d('0x1c')]=function(_0x2e3799,_0x2e0469){if(_0x2e3799[_0xad1d('0x48')]['id']){delete _0x2e3799['body']['id'];}return db[_0xad1d('0x39')]['find']({'where':{'id':_0x2e3799['params']['id']}})[_0xad1d('0x1d')](handleEntityNotFound(_0x2e0469,null))[_0xad1d('0x1d')](saveUpdates(_0x2e3799[_0xad1d('0x48')],null))[_0xad1d('0x1d')](respondWithResult(_0x2e0469,null))[_0xad1d('0x3d')](handleError(_0x2e0469,null));};exports['destroy']=function(_0x50aa2c,_0x76c12d){return db['AnalyticDefaultReport'][_0xad1d('0x41')]({'where':{'id':_0x50aa2c[_0xad1d('0x49')]['id']}})[_0xad1d('0x1d')](handleEntityNotFound(_0x76c12d,null))['then'](removeEntity(_0x76c12d,null))[_0xad1d('0x3d')](handleError(_0x76c12d,null));};exports[_0xad1d('0x4a')]=function(_0x55f538,_0x516d61){var _0x206c96=0xa;var _0x36a13c=[_0xad1d('0x4b'),'left_join',_0xad1d('0x4c'),'cross_join'];var _0x554c6b={'SUM':'SUM(%s)','COUNT':_0xad1d('0x4d'),'COUNT DISTINCT':_0xad1d('0x4e'),'MAX':_0xad1d('0x4f'),'MIN':_0xad1d('0x50'),'AVG':_0xad1d('0x51'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0xad1d('0x52'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x2d58ac={'SEC_TO_TIME':_0xad1d('0x53'),'DATE':_0xad1d('0x54'),'HOUR':_0xad1d('0x55'),'ROUND':_0xad1d('0x56'),'UNIX_TIMESTAMP':_0xad1d('0x57')};var _0x244ffc=function(_0x27424a){return!_[_0xad1d('0x58')]([_0xad1d('0x59'),_0xad1d('0x5a'),_0xad1d('0x5b'),'IS\x20NOT\x20EMPTY'],_0x27424a);};var _0x143dd9=function(_0x3010f8){if(!_0x3010f8||!_0x3010f8[_0xad1d('0x5c')]['length']){return'';}for(var _0x300073='(',_0x271223=0x0;_0x271223<_0x3010f8[_0xad1d('0x5c')][_0xad1d('0x3f')];_0x271223+=0x1){_0x271223>0x0&&(_0x300073+='\x20'+_0x3010f8[_0xad1d('0x5d')]+'\x20');_0x300073+=_0x3010f8[_0xad1d('0x5c')][_0x271223][_0xad1d('0x5e')]?_0x143dd9(_0x3010f8[_0xad1d('0x5c')][_0x271223][_0xad1d('0x5e')]):_0x3010f8[_0xad1d('0x5c')][_0x271223]['field']+'\x20'+_0x3010f8[_0xad1d('0x5c')][_0x271223]['condition']+(_0x244ffc(_0x3010f8['rules'][_0x271223][_0xad1d('0x5f')])?'\x20'+_0x3010f8[_0xad1d('0x5c')][_0x271223]['value']:'');}return _0x300073+')';};var _0x250b01={'where':{'id':_0x55f538[_0xad1d('0x49')]['id']}},_0x16902c,_0x153fac,_0x3e6d3a,_0x55bc81,_0x2a0e83;_0x250b01=_[_0xad1d('0x35')]({},_0x250b01,_0x55f538[_0xad1d('0x38')]);return db['AnalyticDefaultReport'][_0xad1d('0x41')](_0x250b01)[_0xad1d('0x1d')](function(_0x35b719){if(_0x35b719){_0x16902c=_0x35b719;return _0x35b719['getFields']();}return null;})[_0xad1d('0x1d')](function(_0x3a1210){if(_0x3a1210){if(!_0x3a1210[_0xad1d('0x3f')]){throw new db['Sequelize'][(_0xad1d('0x60'))](_0xad1d('0x61'),0x193);}_0x153fac=_0x3a1210;return db[_0xad1d('0x62')][_0xad1d('0x3b')]({'raw':!![]});}return null;})[_0xad1d('0x1d')](function(_0x131141){if(_0x131141){_0x3e6d3a=_[_0xad1d('0x63')](_0x131141,'id');var _0x45f642;var _0x4435a5=squel[_0xad1d('0x64')]();_0x4435a5[_0xad1d('0x65')](_0x16902c[_0xad1d('0x66')]);for(var _0x34ee92=0x0;_0x34ee92<_0x153fac['length'];_0x34ee92+=0x1){_0x45f642=_0x153fac[_0x34ee92][_0xad1d('0x67')]?_0x3e6d3a[_0x153fac[_0x34ee92]['MetricId']][_0xad1d('0x68')]:_0x153fac[_0x34ee92]['field'];_0x45f642=_0x153fac[_0x34ee92][_0xad1d('0x69')]?_['replace'](_0x554c6b[_0x153fac[_0x34ee92][_0xad1d('0x69')]],'%s',_0x45f642):_0x45f642;_0x45f642=_0x153fac[_0x34ee92][_0xad1d('0x6a')]?_['replace'](_0x2d58ac[_0x153fac[_0x34ee92][_0xad1d('0x6a')]],'%s',_0x45f642):_0x45f642;if(_0x153fac[_0x34ee92][_0xad1d('0x6b')]){_0x4435a5[_0xad1d('0x5e')](_0x45f642);}_0x153fac[_0x34ee92][_0xad1d('0x6c')]&&_0x4435a5['order'](_0x45f642,_0x153fac[_0x34ee92][_0xad1d('0x6c')]==='DESC'?![]:!![]);_0x4435a5['field'](_0x45f642,_0x153fac[_0x34ee92][_0xad1d('0x6d')]||_0x45f642);}if(_0x16902c[_0xad1d('0x6e')]){_0x16902c[_0xad1d('0x6e')]=JSON[_0xad1d('0x6f')](_0x16902c[_0xad1d('0x6e')]);for(var _0x5586de=0x0;_0x5586de<_0x16902c[_0xad1d('0x6e')]['length'];_0x5586de+=0x1){if(_0x16902c[_0xad1d('0x6e')][_0x5586de]['type']&&_[_0xad1d('0x58')](_0x36a13c,_0x16902c[_0xad1d('0x6e')][_0x5586de]['type'])&&_0x16902c[_0xad1d('0x6e')][_0x5586de][_0xad1d('0x70')]&&_0x16902c[_0xad1d('0x6e')][_0x5586de]['foreignTable']&&_0x16902c[_0xad1d('0x6e')][_0x5586de][_0xad1d('0x71')]){_0x4435a5[_0x16902c[_0xad1d('0x6e')][_0x5586de][_0xad1d('0x36')]](_0x16902c[_0xad1d('0x6e')][_0x5586de][_0xad1d('0x72')],null,util[_0xad1d('0x6a')](_0xad1d('0x73'),_0x16902c[_0xad1d('0x66')],_0x16902c[_0xad1d('0x6e')][_0x5586de][_0xad1d('0x70')],_0x16902c[_0xad1d('0x6e')][_0x5586de]['foreignTable'],_0x16902c['joins'][_0x5586de][_0xad1d('0x71')]));}}}if(_0x16902c[_0xad1d('0x74')]){_0x16902c['conditions']=JSON['parse'](_0x16902c['conditions']);_0x4435a5['where'](_0x143dd9(_0x16902c[_0xad1d('0x74')][_0xad1d('0x5e')]));}_0x2a0e83=_0x4435a5[_0xad1d('0x75')]();_0x4435a5[_0xad1d('0x18')](_0x206c96);_0x4435a5[_0xad1d('0x17')](0x0);logger['debug']('Limited\x20Query:',_0x4435a5[_0xad1d('0x76')]());return db[_0xad1d('0x77')][_0xad1d('0x29')](_0x4435a5['toString'](),{'type':db['sequelize'][_0xad1d('0x78')][_0xad1d('0x79')]});}})[_0xad1d('0x1d')](respondWithResult(_0x516d61,null))[_0xad1d('0x3d')](handleError(_0x516d61,null));};function runReport(_0x4798f0,_0x859f04,_0x1ce5f5){var _0x44784e=_0x859f04[_0xad1d('0x22')];var _0x756e9f=0xa;var _0x18f1da=[_0xad1d('0x4b'),'left_join',_0xad1d('0x4c'),_0xad1d('0x7a')];var _0x239ab5={'SUM':_0xad1d('0x7b'),'COUNT':_0xad1d('0x4d'),'COUNT DISTINCT':_0xad1d('0x4e'),'MAX':'MAX(%s)','MIN':_0xad1d('0x50'),'AVG':_0xad1d('0x51'),'GROUP_CONCAT':_0xad1d('0x7c'),'GROUP_CONCAT ASC':_0xad1d('0x52'),'GROUP_CONCAT DESC':_0xad1d('0x7d')};var _0xa62d9f={'SEC_TO_TIME':_0xad1d('0x53'),'DATE':_0xad1d('0x54'),'HOUR':_0xad1d('0x55'),'ROUND':_0xad1d('0x56'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x1a0e44=function(_0x689d04){return!_[_0xad1d('0x58')]([_0xad1d('0x59'),'IS\x20NOT\x20NULL','IS\x20EMPTY',_0xad1d('0x7e')],_0x689d04);};var _0x5689c7=function(_0x11920a){if(!_0x11920a||!_0x11920a[_0xad1d('0x5c')][_0xad1d('0x3f')]){return'';}for(var _0x41683b='(',_0x5b6ef2=0x0;_0x5b6ef2<_0x11920a[_0xad1d('0x5c')]['length'];_0x5b6ef2+=0x1){_0x5b6ef2>0x0&&(_0x41683b+='\x20'+_0x11920a[_0xad1d('0x5d')]+'\x20');_0x41683b+=_0x11920a[_0xad1d('0x5c')][_0x5b6ef2][_0xad1d('0x5e')]?_0x5689c7(_0x11920a[_0xad1d('0x5c')][_0x5b6ef2]['group']):_0x11920a[_0xad1d('0x5c')][_0x5b6ef2]['field']+'\x20'+_0x11920a[_0xad1d('0x5c')][_0x5b6ef2][_0xad1d('0x5f')]+(_0x1a0e44(_0x11920a[_0xad1d('0x5c')][_0x5b6ef2][_0xad1d('0x5f')])?'\x20'+_0x11920a['rules'][_0x5b6ef2][_0xad1d('0x7f')]:'');}return _0x41683b+')';};var _0x4bf2a1={'where':{'id':_0x4798f0['id']}},_0x1e8a46,_0x23b56f,_0xc3f532,_0x4dd453,_0x442b88;_0x4bf2a1=_[_0xad1d('0x35')]({},_0x4bf2a1,_0x1ce5f5);return db[_0xad1d('0x39')][_0xad1d('0x41')](_0x4bf2a1)[_0xad1d('0x1d')](function(_0x33672a){if(_0x33672a){_0x1e8a46=_0x33672a;return _0x33672a[_0xad1d('0x80')]();}return null;})[_0xad1d('0x1d')](function(_0x1914f6){if(_0x1914f6){if(!_0x1914f6['length']){throw new db[(_0xad1d('0x81'))]['ValidationErrorItem'](_0xad1d('0x61'),0x193);}_0x23b56f=_0x1914f6;return db[_0xad1d('0x62')][_0xad1d('0x3b')]({'raw':!![]});}return null;})[_0xad1d('0x1d')](function(_0x3fab7b){if(_0x3fab7b){_0xc3f532=_[_0xad1d('0x63')](_0x3fab7b,'id');var _0x21008f;var _0x311e2b=squel[_0xad1d('0x64')]();_0x311e2b['from'](_0x1e8a46[_0xad1d('0x66')]);for(var _0x151691=0x0;_0x151691<_0x23b56f[_0xad1d('0x3f')];_0x151691+=0x1){_0x21008f=_0x23b56f[_0x151691][_0xad1d('0x67')]?_0xc3f532[_0x23b56f[_0x151691]['MetricId']]['metric']:_0x23b56f[_0x151691]['field'];_0x21008f=_0x23b56f[_0x151691]['function']?_[_0xad1d('0x82')](_0x239ab5[_0x23b56f[_0x151691][_0xad1d('0x69')]],'%s',_0x21008f):_0x21008f;_0x21008f=_0x23b56f[_0x151691][_0xad1d('0x6a')]?_[_0xad1d('0x82')](_0xa62d9f[_0x23b56f[_0x151691][_0xad1d('0x6a')]],'%s',_0x21008f):_0x21008f;if(_0x23b56f[_0x151691]['groupBy']){_0x311e2b[_0xad1d('0x5e')](_0x21008f);}_0x23b56f[_0x151691][_0xad1d('0x6c')]&&_0x311e2b[_0xad1d('0x31')](_0x21008f,_0x23b56f[_0x151691][_0xad1d('0x6c')]===_0xad1d('0x83')?![]:!![]);_0x311e2b[_0xad1d('0x84')](_0x21008f,_0x23b56f[_0x151691][_0xad1d('0x6d')]||_0x21008f);}if(_0x1e8a46[_0xad1d('0x6e')]){_0x1e8a46[_0xad1d('0x6e')]=JSON[_0xad1d('0x6f')](_0x1e8a46[_0xad1d('0x6e')]);for(var _0x5a864c=0x0;_0x5a864c<_0x1e8a46[_0xad1d('0x6e')][_0xad1d('0x3f')];_0x5a864c+=0x1){if(_0x1e8a46[_0xad1d('0x6e')][_0x5a864c][_0xad1d('0x36')]&&_[_0xad1d('0x58')](_0x18f1da,_0x1e8a46[_0xad1d('0x6e')][_0x5a864c][_0xad1d('0x36')])&&_0x1e8a46[_0xad1d('0x6e')][_0x5a864c][_0xad1d('0x70')]&&_0x1e8a46['joins'][_0x5a864c]['foreignTable']&&_0x1e8a46[_0xad1d('0x6e')][_0x5a864c]['foreignKey']){_0x311e2b[_0x1e8a46[_0xad1d('0x6e')][_0x5a864c]['type']](_0x1e8a46[_0xad1d('0x6e')][_0x5a864c][_0xad1d('0x72')],null,util[_0xad1d('0x6a')](_0xad1d('0x73'),_0x1e8a46['table'],_0x1e8a46[_0xad1d('0x6e')][_0x5a864c][_0xad1d('0x70')],_0x1e8a46[_0xad1d('0x6e')][_0x5a864c]['foreignTable'],_0x1e8a46[_0xad1d('0x6e')][_0x5a864c]['foreignKey']));}}}if(_0x1e8a46[_0xad1d('0x74')]){_0x1e8a46[_0xad1d('0x74')]=JSON['parse'](_0x1e8a46[_0xad1d('0x74')]);_0x311e2b[_0xad1d('0x32')](_0x5689c7(_0x1e8a46[_0xad1d('0x74')][_0xad1d('0x5e')]));}_0x442b88=_0x311e2b[_0xad1d('0x75')]();_0x311e2b[_0xad1d('0x18')](_0x756e9f);_0x311e2b['offset'](0x0);logger[_0xad1d('0x85')]('Limited\x20Query:',_0x311e2b[_0xad1d('0x76')]());return db[_0xad1d('0x77')][_0xad1d('0x29')](_0x311e2b[_0xad1d('0x76')](),{'type':db[_0xad1d('0x77')][_0xad1d('0x78')][_0xad1d('0x79')]});}})[_0xad1d('0x1d')](function(_0x36a419){if(!_0x36a419[_0xad1d('0x3f')]){throw new db[(_0xad1d('0x81'))][(_0xad1d('0x60'))](_0xad1d('0x86'),0xcc);}if(_0x859f04[_0xad1d('0x87')]===_0xad1d('0x88')){return null;}var _0x196c54=_[_0xad1d('0x35')](_0x859f04,{'name':_0x859f04[_0xad1d('0x89')]||_0x859f04['name']||_0x1e8a46[_0xad1d('0x22')],'basename':_0x44784e,'savename':util[_0xad1d('0x6a')]('%s-%s.%s',_0x859f04[_0xad1d('0x22')]||_0x1e8a46[_0xad1d('0x22')],require(_0xad1d('0x8a'))['generate'](0x4),_0x859f04['output']||_0xad1d('0x8b')),'reportId':_0x1e8a46['id'],'reportType':_0xad1d('0x8c')});return db[_0xad1d('0x8d')]['create'](_0x196c54,{'raw':!![]});})[_0xad1d('0x1d')](function(_0x5c5cce){if(_0x1e8a46[_0xad1d('0x66')]===_0xad1d('0x8e')){_0x442b88['where'](_0x1e8a46[_0xad1d('0x66')]+_0xad1d('0x8f'),_0x859f04[_0xad1d('0x90')],_0x859f04['endDate']);}else{_0x442b88[_0xad1d('0x32')](_0x1e8a46['table']+_0xad1d('0x91'),_0x859f04[_0xad1d('0x90')],_0x859f04[_0xad1d('0x92')]);}if(_0x5c5cce){logger[_0xad1d('0x93')](_0xad1d('0x94'),_0x442b88[_0xad1d('0x76')]());require('child_process')[_0xad1d('0x95')](path[_0xad1d('0x4b')](__dirname,'../../components/export/',_0x5c5cce[_0xad1d('0x87')]),[_0x5c5cce['id'],_0x442b88['toString'](),path[_0xad1d('0x4b')](__dirname,'../../files/reports',_0x5c5cce[_0xad1d('0x96')]),_0x44784e]);return _0x5c5cce;}else{var _0xa02543=squel['select']();_0xa02543[_0xad1d('0x65')]('('+_0x442b88['toString']()+')','countTable');_0xa02543[_0xad1d('0x84')](_0xad1d('0x97'),_0xad1d('0x16'));_0x442b88[_0xad1d('0x18')](_0x859f04[_0xad1d('0x18')]||_0x756e9f);_0x442b88[_0xad1d('0x17')](_0x859f04['offset']||0x0);return db[_0xad1d('0x77')][_0xad1d('0x29')](_0xa02543[_0xad1d('0x76')](),{'type':db['sequelize']['QueryTypes'][_0xad1d('0x79')]})['then'](function(_0x163bd5){if(!_0x163bd5[_0xad1d('0x3f')]){_0x4dd453=0x0;}else{_0x4dd453=_0x163bd5[0x0][_0xad1d('0x16')]||0x0;}return db['sequelize'][_0xad1d('0x29')](_0x442b88['toString'](),{'type':db[_0xad1d('0x77')][_0xad1d('0x78')][_0xad1d('0x79')]});})[_0xad1d('0x1d')](function(_0x13f335){return{'rows':_0x13f335||[],'count':_0x4dd453};});}});}exports[_0xad1d('0x98')]=function(_0x5b823c,_0x521b95){return runReport(_0x5b823c[_0xad1d('0x49')],_0x5b823c[_0xad1d('0x29')],_0x5b823c[_0xad1d('0x38')])['then'](respondWithResult(_0x521b95,null))[_0xad1d('0x3d')](handleError(_0x521b95,null));};exports['runReport']=runReport;exports['query']=function(_0x257ca8,_0x24989f){var _0xd112e7=0xa;var _0x1030c8=[_0xad1d('0x4b'),_0xad1d('0x99'),_0xad1d('0x4c'),_0xad1d('0x7a')];var _0x3f41f1={'SUM':_0xad1d('0x7b'),'COUNT':_0xad1d('0x4d'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xad1d('0x4f'),'MIN':'MIN(%s)','AVG':_0xad1d('0x51'),'GROUP_CONCAT':_0xad1d('0x7c'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xad1d('0x7d')};var _0x394419={'SEC_TO_TIME':_0xad1d('0x53'),'DATE':_0xad1d('0x54'),'HOUR':_0xad1d('0x55'),'ROUND':_0xad1d('0x56'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0xf80f9c=function(_0x179eab){return!_[_0xad1d('0x58')]([_0xad1d('0x59'),'IS\x20NOT\x20NULL',_0xad1d('0x5b'),_0xad1d('0x7e')],_0x179eab);};var _0x1b386e=function(_0x45a113){if(!_0x45a113||!_0x45a113[_0xad1d('0x5c')][_0xad1d('0x3f')]){return'';}for(var _0x408139='(',_0x432113=0x0;_0x432113<_0x45a113[_0xad1d('0x5c')][_0xad1d('0x3f')];_0x432113+=0x1){_0x432113>0x0&&(_0x408139+='\x20'+_0x45a113['operator']+'\x20');_0x408139+=_0x45a113[_0xad1d('0x5c')][_0x432113][_0xad1d('0x5e')]?_0x1b386e(_0x45a113[_0xad1d('0x5c')][_0x432113][_0xad1d('0x5e')]):_0x45a113[_0xad1d('0x5c')][_0x432113]['field']+'\x20'+_0x45a113[_0xad1d('0x5c')][_0x432113][_0xad1d('0x5f')]+(_0xf80f9c(_0x45a113['rules'][_0x432113]['condition'])?'\x20'+_0x45a113[_0xad1d('0x5c')][_0x432113]['value']:'');}return _0x408139+')';};var _0x34c2f1={'where':{'id':_0x257ca8[_0xad1d('0x49')]['id']}},_0x377ca8,_0x40d2bc,_0x351b2f,_0xe82649,_0x56f1c0;_0x34c2f1=_[_0xad1d('0x35')]({},_0x34c2f1,_0x257ca8[_0xad1d('0x38')]);return db[_0xad1d('0x39')]['find'](_0x34c2f1)[_0xad1d('0x1d')](function(_0x3e9959){if(_0x3e9959){_0x377ca8=_0x3e9959;return _0x3e9959[_0xad1d('0x80')]();}return null;})['then'](function(_0x30a7c3){if(_0x30a7c3){if(!_0x30a7c3[_0xad1d('0x3f')]){throw new db[(_0xad1d('0x81'))]['ValidationErrorItem'](_0xad1d('0x61'),0x193);}_0x40d2bc=_0x30a7c3;return db[_0xad1d('0x62')][_0xad1d('0x3b')]({'raw':!![]});}return null;})['then'](function(_0x2f7124){if(_0x2f7124){_0x351b2f=_[_0xad1d('0x63')](_0x2f7124,'id');var _0x50c8d5;var _0x38f721=squel['select']();_0x38f721[_0xad1d('0x65')](_0x377ca8[_0xad1d('0x66')]);for(var _0x97a42f=0x0;_0x97a42f<_0x40d2bc['length'];_0x97a42f+=0x1){_0x50c8d5=_0x40d2bc[_0x97a42f][_0xad1d('0x67')]?_0x351b2f[_0x40d2bc[_0x97a42f]['MetricId']][_0xad1d('0x68')]:_0x40d2bc[_0x97a42f][_0xad1d('0x84')];_0x50c8d5=_0x40d2bc[_0x97a42f][_0xad1d('0x69')]?_[_0xad1d('0x82')](_0x3f41f1[_0x40d2bc[_0x97a42f][_0xad1d('0x69')]],'%s',_0x50c8d5):_0x50c8d5;_0x50c8d5=_0x40d2bc[_0x97a42f][_0xad1d('0x6a')]?_['replace'](_0x394419[_0x40d2bc[_0x97a42f]['format']],'%s',_0x50c8d5):_0x50c8d5;if(_0x40d2bc[_0x97a42f][_0xad1d('0x6b')]){_0x38f721['group'](_0x50c8d5);}_0x40d2bc[_0x97a42f][_0xad1d('0x6c')]&&_0x38f721[_0xad1d('0x31')](_0x50c8d5,_0x40d2bc[_0x97a42f][_0xad1d('0x6c')]===_0xad1d('0x83')?![]:!![]);_0x38f721[_0xad1d('0x84')](_0x50c8d5,_0x40d2bc[_0x97a42f][_0xad1d('0x6d')]||_0x50c8d5);}if(_0x377ca8['joins']){_0x377ca8['joins']=JSON[_0xad1d('0x6f')](_0x377ca8[_0xad1d('0x6e')]);for(var _0x190fd2=0x0;_0x190fd2<_0x377ca8[_0xad1d('0x6e')][_0xad1d('0x3f')];_0x190fd2+=0x1){if(_0x377ca8[_0xad1d('0x6e')][_0x190fd2][_0xad1d('0x36')]&&_[_0xad1d('0x58')](_0x1030c8,_0x377ca8['joins'][_0x190fd2][_0xad1d('0x36')])&&_0x377ca8[_0xad1d('0x6e')][_0x190fd2]['parentKey']&&_0x377ca8[_0xad1d('0x6e')][_0x190fd2][_0xad1d('0x72')]&&_0x377ca8[_0xad1d('0x6e')][_0x190fd2][_0xad1d('0x71')]){_0x38f721[_0x377ca8[_0xad1d('0x6e')][_0x190fd2][_0xad1d('0x36')]](_0x377ca8[_0xad1d('0x6e')][_0x190fd2][_0xad1d('0x72')],null,util[_0xad1d('0x6a')](_0xad1d('0x73'),_0x377ca8[_0xad1d('0x66')],_0x377ca8[_0xad1d('0x6e')][_0x190fd2][_0xad1d('0x70')],_0x377ca8[_0xad1d('0x6e')][_0x190fd2]['foreignTable'],_0x377ca8[_0xad1d('0x6e')][_0x190fd2][_0xad1d('0x71')]));}}}if(_0x377ca8['conditions']){_0x377ca8[_0xad1d('0x74')]=JSON[_0xad1d('0x6f')](_0x377ca8['conditions']);_0x38f721[_0xad1d('0x32')](_0x1b386e(_0x377ca8[_0xad1d('0x74')][_0xad1d('0x5e')]));}_0x56f1c0=_0x38f721[_0xad1d('0x75')]();_0x38f721['limit'](_0xd112e7);_0x38f721[_0xad1d('0x17')](0x0);logger[_0xad1d('0x85')]('Limited\x20Query:',_0x38f721[_0xad1d('0x76')]());return db[_0xad1d('0x77')]['query'](_0x38f721[_0xad1d('0x76')](),{'type':db[_0xad1d('0x77')][_0xad1d('0x78')][_0xad1d('0x79')]});}})['then'](function(){return{'sql':_0x56f1c0[_0xad1d('0x76')]()};})[_0xad1d('0x1d')](respondWithResult(_0x24989f,null))[_0xad1d('0x3d')](handleError(_0x24989f,null));};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
index 42b77ec..1faf875 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 _0x8734=['./analyticDefaultReport.attributes','analytics_default_reports','lodash','../../config/logger','api','moment','bluebird','path','../../config/environment'];(function(_0x651aaf,_0x35f9a4){var _0x5efa91=function(_0x36fb6f){while(--_0x36fb6f){_0x651aaf['push'](_0x651aaf['shift']());}};_0x5efa91(++_0x35f9a4);}(_0x8734,0x134));var _0x4873=function(_0x233d57,_0x284678){_0x233d57=_0x233d57-0x0;var _0x3eec8c=_0x8734[_0x233d57];return _0x3eec8c;};'use strict';var _=require(_0x4873('0x0'));var util=require('util');var logger=require(_0x4873('0x1'))(_0x4873('0x2'));var moment=require(_0x4873('0x3'));var BPromise=require(_0x4873('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4873('0x5'));var rimraf=require('rimraf');var config=require(_0x4873('0x6'));var attributes=require(_0x4873('0x7'));module['exports']=function(_0xb44024,_0x4b5d88){return _0xb44024['define']('AnalyticDefaultReport',attributes,{'tableName':_0x4873('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x12c9=['AnalyticDefaultReport','analytics_default_reports','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./analyticDefaultReport.attributes','define'];(function(_0x239a62,_0x3e82e6){var _0x4e1358=function(_0x208c53){while(--_0x208c53){_0x239a62['push'](_0x239a62['shift']());}};_0x4e1358(++_0x3e82e6);}(_0x12c9,0x1c9));var _0x912c=function(_0xc2cae7,_0x420ba5){_0xc2cae7=_0xc2cae7-0x0;var _0x3d907c=_0x12c9[_0xc2cae7];return _0x3d907c;};'use strict';var _=require(_0x912c('0x0'));var util=require(_0x912c('0x1'));var logger=require(_0x912c('0x2'))(_0x912c('0x3'));var moment=require(_0x912c('0x4'));var BPromise=require('bluebird');var rp=require(_0x912c('0x5'));var fs=require('fs');var path=require(_0x912c('0x6'));var rimraf=require(_0x912c('0x7'));var config=require(_0x912c('0x8'));var attributes=require(_0x912c('0x9'));module['exports']=function(_0x584a27,_0xe29019){return _0x584a27[_0x912c('0xa')](_0x912c('0xb'),attributes,{'tableName':_0x912c('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 0bff3c4..b8d5ba7 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 _0xa3b9=['then','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xa3b9,0x112));var _0x9a3b=function(_0x57f9d3,_0x38f29c){_0x57f9d3=_0x57f9d3-0x0;var _0x5f5b0a=_0xa3b9[_0x57f9d3];return _0x5f5b0a;};'use strict';var _=require(_0x9a3b('0x0'));var util=require(_0x9a3b('0x1'));var moment=require(_0x9a3b('0x2'));var BPromise=require(_0x9a3b('0x3'));var rs=require(_0x9a3b('0x4'));var fs=require('fs');var Redis=require(_0x9a3b('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x9a3b('0x6'));var logger=require(_0x9a3b('0x7'))(_0x9a3b('0x8'));var config=require(_0x9a3b('0x9'));var jayson=require(_0x9a3b('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3a6a0d,_0x2357b8,_0x242fbe){return new BPromise(function(_0x2da1e2,_0x204d1f){return client[_0x9a3b('0xb')](_0x3a6a0d,_0x242fbe)[_0x9a3b('0xc')](function(_0x593fef){logger[_0x9a3b('0xd')](_0x9a3b('0xe'),_0x2357b8,_0x9a3b('0xf'));logger[_0x9a3b('0x10')]('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x2357b8,_0x9a3b('0xf'),JSON[_0x9a3b('0x11')](_0x593fef));if(_0x593fef[_0x9a3b('0x12')]){if(_0x593fef['error']['code']===0x1f4){logger[_0x9a3b('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2357b8,_0x593fef['error'][_0x9a3b('0x13')]);return _0x204d1f(_0x593fef[_0x9a3b('0x12')]['message']);}logger[_0x9a3b('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2357b8,_0x593fef[_0x9a3b('0x12')][_0x9a3b('0x13')]);return _0x2da1e2(_0x593fef[_0x9a3b('0x12')]['message']);}else{logger['info'](_0x9a3b('0xe'),_0x2357b8,'request\x20sent');_0x2da1e2(_0x593fef[_0x9a3b('0x14')][_0x9a3b('0x13')]);}})[_0x9a3b('0x15')](function(_0x43126b){logger[_0x9a3b('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2357b8,_0x43126b);_0x204d1f(_0x43126b);});});}
\ No newline at end of file
+var _0x8868=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','AnalyticDefaultReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','lodash','util'];(function(_0x2a77e4,_0x12b49e){var _0x182c30=function(_0x1a88b1){while(--_0x1a88b1){_0x2a77e4['push'](_0x2a77e4['shift']());}};_0x182c30(++_0x12b49e);}(_0x8868,0x1ca));var _0x8886=function(_0x47d54a,_0x1e96b5){_0x47d54a=_0x47d54a-0x0;var _0xe6da4b=_0x8868[_0x47d54a];return _0xe6da4b;};'use strict';var _=require(_0x8886('0x0'));var util=require(_0x8886('0x1'));var moment=require(_0x8886('0x2'));var BPromise=require(_0x8886('0x3'));var rs=require(_0x8886('0x4'));var fs=require('fs');var Redis=require(_0x8886('0x5'));var db=require(_0x8886('0x6'))['db'];var utils=require(_0x8886('0x7'));var logger=require(_0x8886('0x8'))(_0x8886('0x9'));var config=require(_0x8886('0xa'));var jayson=require('jayson/promise');var client=jayson['client'][_0x8886('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x26b94d,_0x5e2a73,_0x1a85e1){return new BPromise(function(_0x56b9fa,_0x147fc9){return client[_0x8886('0xc')](_0x26b94d,_0x1a85e1)[_0x8886('0xd')](function(_0x39036d){logger[_0x8886('0xe')](_0x8886('0xf'),_0x5e2a73,'request\x20sent');logger[_0x8886('0x10')]('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x5e2a73,'request\x20sent',JSON[_0x8886('0x11')](_0x39036d));if(_0x39036d['error']){if(_0x39036d[_0x8886('0x12')][_0x8886('0x13')]===0x1f4){logger[_0x8886('0x12')](_0x8886('0xf'),_0x5e2a73,_0x39036d['error'][_0x8886('0x14')]);return _0x147fc9(_0x39036d[_0x8886('0x12')]['message']);}logger[_0x8886('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x5e2a73,_0x39036d[_0x8886('0x12')][_0x8886('0x14')]);return _0x56b9fa(_0x39036d[_0x8886('0x12')][_0x8886('0x14')]);}else{logger['info']('AnalyticDefaultReport,\x20%s,\x20%s',_0x5e2a73,_0x8886('0x15'));_0x56b9fa(_0x39036d[_0x8886('0x16')]['message']);}})['catch'](function(_0x563a82){logger['error'](_0x8886('0xf'),_0x5e2a73,_0x563a82);_0x147fc9(_0x563a82);});});}
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js
index 8ff1aea..293801f 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 _0xbd13=['isAuthenticated','show','/:id/preview','preview','run','query','create','update','destroy','util','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./analyticDefaultReport.controller','get','index','/:id'];(function(_0x19d466,_0x378aff){var _0x11cf12=function(_0x151bba){while(--_0x151bba){_0x19d466['push'](_0x19d466['shift']());}};_0x11cf12(++_0x378aff);}(_0xbd13,0x185));var _0x3bd1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbd13[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x3bd1('0x0'));var path=require('path');var timeout=require(_0x3bd1('0x1'));var express=require(_0x3bd1('0x2'));var router=express[_0x3bd1('0x3')]();var auth=require(_0x3bd1('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x3bd1('0x5'));var controller=require(_0x3bd1('0x6'));router[_0x3bd1('0x7')]('/',auth['isAuthenticated'](),controller[_0x3bd1('0x8')]);router['get'](_0x3bd1('0x9'),auth[_0x3bd1('0xa')](),controller[_0x3bd1('0xb')]);router[_0x3bd1('0x7')](_0x3bd1('0xc'),auth[_0x3bd1('0xa')](),controller[_0x3bd1('0xd')]);router['get']('/:id/run',auth[_0x3bd1('0xa')](),controller[_0x3bd1('0xe')]);router[_0x3bd1('0x7')]('/:id/query',auth[_0x3bd1('0xa')](),controller[_0x3bd1('0xf')]);router['post']('/',auth[_0x3bd1('0xa')](),controller[_0x3bd1('0x10')]);router['put'](_0x3bd1('0x9'),auth[_0x3bd1('0xa')](),controller[_0x3bd1('0x11')]);router['delete'](_0x3bd1('0x9'),auth[_0x3bd1('0xa')](),controller[_0x3bd1('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x6a24=['index','/:id','show','/:id/preview','preview','/:id/run','run','/:id/query','query','post','put','update','delete','destroy','util','path','../../components/auth/service','../../components/interaction/service','./analyticDefaultReport.controller','get','isAuthenticated'];(function(_0x261188,_0x2258e7){var _0x1c3caa=function(_0x54c559){while(--_0x54c559){_0x261188['push'](_0x261188['shift']());}};_0x1c3caa(++_0x2258e7);}(_0x6a24,0x8c));var _0x46a2=function(_0x109bd0,_0xaddf0b){_0x109bd0=_0x109bd0-0x0;var _0x3c0466=_0x6a24[_0x109bd0];return _0x3c0466;};'use strict';var multer=require('multer');var util=require(_0x46a2('0x0'));var path=require(_0x46a2('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require(_0x46a2('0x2'));var interaction=require(_0x46a2('0x3'));var config=require('../../config/environment');var controller=require(_0x46a2('0x4'));router[_0x46a2('0x5')]('/',auth[_0x46a2('0x6')](),controller[_0x46a2('0x7')]);router[_0x46a2('0x5')](_0x46a2('0x8'),auth[_0x46a2('0x6')](),controller[_0x46a2('0x9')]);router['get'](_0x46a2('0xa'),auth['isAuthenticated'](),controller[_0x46a2('0xb')]);router[_0x46a2('0x5')](_0x46a2('0xc'),auth[_0x46a2('0x6')](),controller[_0x46a2('0xd')]);router[_0x46a2('0x5')](_0x46a2('0xe'),auth['isAuthenticated'](),controller[_0x46a2('0xf')]);router[_0x46a2('0x10')]('/',auth[_0x46a2('0x6')](),controller['create']);router[_0x46a2('0x11')](_0x46a2('0x8'),auth[_0x46a2('0x6')](),controller[_0x46a2('0x12')]);router[_0x46a2('0x13')]('/:id',auth[_0x46a2('0x6')](),controller[_0x46a2('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 e50e14d..1d4882a 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 _0xb2c8=['INTEGER','UNSIGNED','moment','exports','STRING','ENUM','pdf','xlsx','csv','DATE','Loading','manual'];(function(_0x27e166,_0x1fd889){var _0x41a676=function(_0x2d59ec){while(--_0x2d59ec){_0x27e166['push'](_0x27e166['shift']());}};_0x41a676(++_0x1fd889);}(_0xb2c8,0x122));var _0x8b2c=function(_0x36e846,_0x39ab37){_0x36e846=_0x36e846-0x0;var _0x201dce=_0xb2c8[_0x36e846];return _0x201dce;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x8b2c('0x0'));module[_0x8b2c('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0x8b2c('0x2')],'allowNull':![]},'output':{'type':Sequelize[_0x8b2c('0x3')]('csv',_0x8b2c('0x4'),_0x8b2c('0x5')),'allowNull':![],'defaultValue':_0x8b2c('0x6')},'savename':{'type':Sequelize[_0x8b2c('0x2')],'allowNull':![]},'startDate':{'type':Sequelize[_0x8b2c('0x7')]},'endDate':{'type':Sequelize['DATE']},'status':{'type':Sequelize[_0x8b2c('0x2')],'defaultValue':_0x8b2c('0x8')},'type':{'type':Sequelize[_0x8b2c('0x3')]('manual','scheduled'),'allowNull':![],'defaultValue':_0x8b2c('0x9')},'reportId':{'type':Sequelize[_0x8b2c('0xa')](0xb)[_0x8b2c('0xb')]},'reportType':{'type':Sequelize[_0x8b2c('0x2')]}};
\ No newline at end of file
+var _0x2755=['sequelize','moment','exports','STRING','ENUM','csv','pdf','xlsx','DATE','Loading','manual','scheduled','INTEGER','UNSIGNED'];(function(_0xc9a3f3,_0x2bcfe7){var _0x1cbfbe=function(_0x192a0f){while(--_0x192a0f){_0xc9a3f3['push'](_0xc9a3f3['shift']());}};_0x1cbfbe(++_0x2bcfe7);}(_0x2755,0x150));var _0x5275=function(_0x15b14d,_0x4c34f5){_0x15b14d=_0x15b14d-0x0;var _0x30f46b=_0x2755[_0x15b14d];return _0x30f46b;};'use strict';var Sequelize=require(_0x5275('0x0'));var moment=require(_0x5275('0x1'));module[_0x5275('0x2')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0x5275('0x3')],'allowNull':![]},'output':{'type':Sequelize[_0x5275('0x4')](_0x5275('0x5'),_0x5275('0x6'),_0x5275('0x7')),'allowNull':![],'defaultValue':_0x5275('0x5')},'savename':{'type':Sequelize['STRING'],'allowNull':![]},'startDate':{'type':Sequelize[_0x5275('0x8')]},'endDate':{'type':Sequelize[_0x5275('0x8')]},'status':{'type':Sequelize[_0x5275('0x3')],'defaultValue':_0x5275('0x9')},'type':{'type':Sequelize['ENUM'](_0x5275('0xa'),_0x5275('0xb')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0x5275('0xc')](0xb)[_0x5275('0xd')]},'reportType':{'type':Sequelize[_0x5275('0x3')]}};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
index b2a6465..11fa969 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 _0xa06c=['../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','set','apply','reject','save','then','destroy','get','ExtractedReports','UserProfileResource','error','name','send','index','map','AnalyticExtractedReport','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','nolimit','sort','where','filters','pick','filter','merge','options','count','include','findAll','rows','catch','show','includeAll','create','role','user','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','params','basename','output','existsSync','savename','Report\x20not\x20found\x20or\x20empty','download','join','root','format','%s.%s','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x4e707e,_0x208eb5){var _0x3d346e=function(_0xd1f767){while(--_0xd1f767){_0x4e707e['push'](_0x4e707e['shift']());}};_0x3d346e(++_0x208eb5);}(_0xa06c,0x102));var _0xca06=function(_0x2263ef,_0x1e26e6){_0x2263ef=_0x2263ef-0x0;var _0x1ff649=_0xa06c[_0x2263ef];return _0x1ff649;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xca06('0x0'));var zipdir=require(_0xca06('0x1'));var jsonpatch=require(_0xca06('0x2'));var rp=require(_0xca06('0x3'));var moment=require(_0xca06('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xca06('0x5'));var util=require(_0xca06('0x6'));var path=require(_0xca06('0x7'));var sox=require('sox');var csv=require(_0xca06('0x8'));var ejs=require(_0xca06('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xca06('0xa'));var crypto=require(_0xca06('0xb'));var jsforce=require(_0xca06('0xc'));var deskjs=require(_0xca06('0xd'));var toCsv=require(_0xca06('0x8'));var querystring=require(_0xca06('0xe'));var Papa=require('papaparse');var Redis=require(_0xca06('0xf'));var authService=require(_0xca06('0x10'));var qs=require(_0xca06('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xca06('0x12'));var logger=require(_0xca06('0x13'))(_0xca06('0x14'));var utils=require(_0xca06('0x15'));var config=require(_0xca06('0x16'));var db=require(_0xca06('0x17'))['db'];function respondWithStatusCode(_0x5b5602,_0x1689bc){_0x1689bc=_0x1689bc||0xcc;return function(_0x2496e4){if(_0x2496e4){return _0x5b5602[_0xca06('0x18')](_0x1689bc);}return _0x5b5602[_0xca06('0x19')](_0x1689bc)[_0xca06('0x1a')]();};}function respondWithResult(_0x194fd3,_0x22c673){_0x22c673=_0x22c673||0xc8;return function(_0x84da6e){if(_0x84da6e){return _0x194fd3[_0xca06('0x19')](_0x22c673)[_0xca06('0x1b')](_0x84da6e);}};}function respondWithFilteredResult(_0x355b17,_0x5b3d8e){return function(_0x33da6c){if(_0x33da6c){var _0x44c04f=_0x33da6c['count'],_0x35a03f=_0x5b3d8e[_0xca06('0x1c')],_0x26955c=_0x5b3d8e['offset']+_0x5b3d8e[_0xca06('0x1d')],_0x152013;if(_0x26955c>=_0x44c04f){_0x26955c=_0x44c04f;_0x152013=0xc8;}else{_0x152013=0xce;}_0x355b17[_0xca06('0x19')](_0x152013);return _0x355b17[_0xca06('0x1e')]('Content-Range',_0x35a03f+'-'+_0x26955c+'/'+_0x44c04f)[_0xca06('0x1b')](_0x33da6c);}return null;};}function patchUpdates(_0x310f9d){return function(_0x264d80){try{jsonpatch[_0xca06('0x1f')](_0x264d80,_0x310f9d,!![]);}catch(_0x2a6941){return BPromise[_0xca06('0x20')](_0x2a6941);}return _0x264d80[_0xca06('0x21')]();};}function saveUpdates(_0x51c8f7,_0x97cb8c){return function(_0x21afcf){if(_0x21afcf){return _0x21afcf['update'](_0x51c8f7)[_0xca06('0x22')](function(_0x46c0a7){return _0x46c0a7;});}return null;};}function removeEntity(_0x5ac1cf,_0x6b223f){return function(_0x2f8716){if(_0x2f8716){return _0x2f8716[_0xca06('0x23')]()['then'](function(){var _0x10ed33=_0x2f8716[_0xca06('0x24')]({'plain':!![]});var _0x289f15=_0xca06('0x25');return db[_0xca06('0x26')][_0xca06('0x23')]({'where':{'type':_0x289f15,'resourceId':_0x10ed33['id']}})[_0xca06('0x22')](function(){return _0x2f8716;});})[_0xca06('0x22')](function(){_0x5ac1cf[_0xca06('0x19')](0xcc)[_0xca06('0x1a')]();});}};}function handleEntityNotFound(_0x111265,_0x5beee4){return function(_0x2381c1){if(!_0x2381c1){_0x111265['sendStatus'](0x194);}return _0x2381c1;};}function handleError(_0x208f44,_0x192e74){_0x192e74=_0x192e74||0x1f4;return function(_0x454d1f){logger[_0xca06('0x27')](_0x454d1f['stack']);if(_0x454d1f[_0xca06('0x28')]){delete _0x454d1f[_0xca06('0x28')];}_0x208f44[_0xca06('0x19')](_0x192e74)[_0xca06('0x29')](_0x454d1f);};}exports[_0xca06('0x2a')]=function(_0x59aea5,_0x19db98){var _0x1922b6={},_0x1443dc={},_0x3cbce3={'count':0x0,'rows':[]};var _0x3b83fa=_[_0xca06('0x2b')](db[_0xca06('0x2c')][_0xca06('0x2d')],function(_0x18468e){return{'name':_0x18468e[_0xca06('0x2e')],'type':_0x18468e[_0xca06('0x2f')][_0xca06('0x30')]};});_0x1443dc[_0xca06('0x31')]=_['map'](_0x3b83fa,_0xca06('0x28'));_0x1443dc[_0xca06('0x32')]=_[_0xca06('0x33')](_0x59aea5[_0xca06('0x32')]);_0x1443dc['filters']=_[_0xca06('0x34')](_0x1443dc[_0xca06('0x31')],_0x1443dc['query']);_0x1922b6[_0xca06('0x35')]=_['intersection'](_0x1443dc[_0xca06('0x31')],qs[_0xca06('0x36')](_0x59aea5[_0xca06('0x32')][_0xca06('0x36')]));_0x1922b6[_0xca06('0x35')]=_0x1922b6[_0xca06('0x35')][_0xca06('0x37')]?_0x1922b6['attributes']:_0x1443dc[_0xca06('0x31')];if(!_0x59aea5['query']['hasOwnProperty'](_0xca06('0x38'))){_0x1922b6[_0xca06('0x1d')]=qs[_0xca06('0x1d')](_0x59aea5['query'][_0xca06('0x1d')]);_0x1922b6['offset']=qs[_0xca06('0x1c')](_0x59aea5[_0xca06('0x32')][_0xca06('0x1c')]);}_0x1922b6['order']=qs[_0xca06('0x39')](_0x59aea5[_0xca06('0x32')]['sort']);_0x1922b6[_0xca06('0x3a')]=qs[_0xca06('0x3b')](_[_0xca06('0x3c')](_0x59aea5['query'],_0x1443dc[_0xca06('0x3b')]));if(_0x59aea5[_0xca06('0x32')][_0xca06('0x3d')]){_0x1922b6[_0xca06('0x3a')]=_[_0xca06('0x3e')](_0x1922b6[_0xca06('0x3a')],{'$or':_[_0xca06('0x2b')](_0x3b83fa,function(_0x5869a5){if(_0x5869a5[_0xca06('0x2f')]!=='VIRTUAL'){var _0x524068={};_0x524068[_0x5869a5[_0xca06('0x28')]]={'$like':'%'+_0x59aea5['query'][_0xca06('0x3d')]+'%'};return _0x524068;}})});}_0x1922b6=_[_0xca06('0x3e')]({},_0x1922b6,_0x59aea5[_0xca06('0x3f')]);var _0x2d2820={'where':_0x1922b6[_0xca06('0x3a')]};return db['AnalyticExtractedReport'][_0xca06('0x40')](_0x2d2820)[_0xca06('0x22')](function(_0x33b1bf){_0x3cbce3[_0xca06('0x40')]=_0x33b1bf;if(_0x59aea5[_0xca06('0x32')]['includeAll']){_0x1922b6[_0xca06('0x41')]=[{'all':!![]}];}return db['AnalyticExtractedReport'][_0xca06('0x42')](_0x1922b6);})['then'](function(_0x436e6a){_0x3cbce3[_0xca06('0x43')]=_0x436e6a;return _0x3cbce3;})[_0xca06('0x22')](respondWithFilteredResult(_0x19db98,_0x1922b6))[_0xca06('0x44')](handleError(_0x19db98,null));};exports[_0xca06('0x45')]=function(_0x23087c,_0x5cd93d){var _0x12f782={'raw':!![],'where':{'id':_0x23087c['params']['id']}},_0x5704a3={};_0x5704a3[_0xca06('0x31')]=_[_0xca06('0x33')](db[_0xca06('0x2c')][_0xca06('0x2d')]);_0x5704a3[_0xca06('0x32')]=_[_0xca06('0x33')](_0x23087c['query']);_0x5704a3['filters']=_[_0xca06('0x34')](_0x5704a3[_0xca06('0x31')],_0x5704a3[_0xca06('0x32')]);_0x12f782[_0xca06('0x35')]=_[_0xca06('0x34')](_0x5704a3[_0xca06('0x31')],qs[_0xca06('0x36')](_0x23087c[_0xca06('0x32')][_0xca06('0x36')]));_0x12f782[_0xca06('0x35')]=_0x12f782[_0xca06('0x35')][_0xca06('0x37')]?_0x12f782[_0xca06('0x35')]:_0x5704a3[_0xca06('0x31')];if(_0x23087c[_0xca06('0x32')][_0xca06('0x46')]){_0x12f782[_0xca06('0x41')]=[{'all':!![]}];}_0x12f782=_[_0xca06('0x3e')]({},_0x12f782,_0x23087c['options']);return db[_0xca06('0x2c')]['find'](_0x12f782)[_0xca06('0x22')](handleEntityNotFound(_0x5cd93d,null))[_0xca06('0x22')](respondWithResult(_0x5cd93d,null))['catch'](handleError(_0x5cd93d,null));};exports[_0xca06('0x47')]=function(_0x41451f,_0x252f61){return db[_0xca06('0x2c')][_0xca06('0x47')](_0x41451f['body'],{})['then'](function(_0x47c857){var _0x4f72ac=_0x41451f['user'][_0xca06('0x24')]({'plain':!![]});if(!_0x4f72ac)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4f72ac[_0xca06('0x48')]===_0xca06('0x49')){var _0xe2d123=_0x47c857[_0xca06('0x24')]({'plain':!![]});var _0x1763c1=_0xca06('0x25');return db[_0xca06('0x4a')][_0xca06('0x4b')]({'where':{'name':_0x1763c1,'userProfileId':_0x4f72ac[_0xca06('0x4c')]},'raw':!![]})['then'](function(_0x534330){if(_0x534330&&_0x534330[_0xca06('0x4d')]===0x0){return db[_0xca06('0x26')][_0xca06('0x47')]({'name':_0xe2d123[_0xca06('0x28')],'resourceId':_0xe2d123['id'],'type':_0x534330['name'],'sectionId':_0x534330['id']},{})[_0xca06('0x22')](function(){return _0x47c857;});}else{return _0x47c857;}})[_0xca06('0x44')](function(_0x1b47e8){logger[_0xca06('0x27')](_0xca06('0x4e'),_0x1b47e8);throw _0x1b47e8;});}return _0x47c857;})[_0xca06('0x22')](respondWithResult(_0x252f61,0xc9))[_0xca06('0x44')](handleError(_0x252f61,null));};exports[_0xca06('0x4f')]=function(_0x1743b1,_0x5b349a){if(_0x1743b1[_0xca06('0x50')]['id']){delete _0x1743b1[_0xca06('0x50')]['id'];}return db[_0xca06('0x2c')][_0xca06('0x4b')]({'where':{'id':_0x1743b1[_0xca06('0x51')]['id']}})[_0xca06('0x22')](handleEntityNotFound(_0x5b349a,null))[_0xca06('0x22')](saveUpdates(_0x1743b1['body'],null))[_0xca06('0x22')](respondWithResult(_0x5b349a,null))[_0xca06('0x44')](handleError(_0x5b349a,null));};exports[_0xca06('0x23')]=function(_0x24e2ce,_0x33944e){return db['AnalyticExtractedReport'][_0xca06('0x4b')]({'where':{'id':_0x24e2ce[_0xca06('0x51')]['id']}})['then'](handleEntityNotFound(_0x33944e,null))['then'](removeEntity(_0x33944e,null))['catch'](handleError(_0x33944e,null));};exports['download']=function(_0x195681,_0x5928e5,_0x38b1be){return db[_0xca06('0x2c')][_0xca06('0x4b')]({'where':{'id':_0x195681[_0xca06('0x51')]['id']},'attributes':[_0xca06('0x28'),_0xca06('0x52'),'savename',_0xca06('0x53')],'raw':!![]})['then'](handleEntityNotFound(_0x5928e5,null))[_0xca06('0x22')](function(_0x11624d){if(_0x11624d){if(!fs[_0xca06('0x54')](path['join'](config['root'],'server/files/reports',_0x11624d[_0xca06('0x55')]))){throw new db['Sequelize']['ValidationError'](_0xca06('0x56'));}if(_0x195681['query']['exists']){return _0x5928e5[_0xca06('0x18')](0xc8);}return _0x5928e5[_0xca06('0x57')](path[_0xca06('0x58')](config[_0xca06('0x59')],'server/files/reports',_0x11624d['savename']),util[_0xca06('0x5a')](_0xca06('0x5b'),_0x11624d[_0xca06('0x52')]||_0x11624d[_0xca06('0x28')],_0x11624d[_0xca06('0x53')]['toLowerCase']()));}})[_0xca06('0x44')](handleError(_0x5928e5,null));};
\ No newline at end of file
+var _0xcfe3=['create','body','user','role','userProfileId','autoAssociation','UserProfileResource','download','basename','savename','output','existsSync','join','root','server/files/reports','Sequelize','Report\x20not\x20found\x20or\x20empty','format','%s.%s','toLowerCase','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','get','ExtractedReports','error','stack','name','send','index','map','AnalyticExtractedReport','fieldName','type','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','findAll','rows','catch','show','params','filters','include','find'];(function(_0x5b9cc5,_0x18e69b){var _0x2d679f=function(_0x3fdb98){while(--_0x3fdb98){_0x5b9cc5['push'](_0x5b9cc5['shift']());}};_0x2d679f(++_0x18e69b);}(_0xcfe3,0x1ef));var _0x3cfe=function(_0x424e32,_0xf238d5){_0x424e32=_0x424e32-0x0;var _0x565782=_0xcfe3[_0x424e32];return _0x565782;};'use strict';var pdf=require(_0x3cfe('0x0'));var emlformat=require(_0x3cfe('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x3cfe('0x2'));var jsonpatch=require(_0x3cfe('0x3'));var rp=require(_0x3cfe('0x4'));var moment=require(_0x3cfe('0x5'));var BPromise=require(_0x3cfe('0x6'));var Mustache=require(_0x3cfe('0x7'));var util=require('util');var path=require(_0x3cfe('0x8'));var sox=require('sox');var csv=require(_0x3cfe('0x9'));var ejs=require(_0x3cfe('0xa'));var fs=require('fs');var _=require(_0x3cfe('0xb'));var squel=require(_0x3cfe('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x3cfe('0xd'));var toCsv=require(_0x3cfe('0x9'));var querystring=require(_0x3cfe('0xe'));var Papa=require(_0x3cfe('0xf'));var Redis=require(_0x3cfe('0x10'));var authService=require(_0x3cfe('0x11'));var qs=require(_0x3cfe('0x12'));var as=require(_0x3cfe('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3cfe('0x14'))(_0x3cfe('0x15'));var utils=require(_0x3cfe('0x16'));var config=require(_0x3cfe('0x17'));var db=require(_0x3cfe('0x18'))['db'];function respondWithStatusCode(_0x342d13,_0x4a58b5){_0x4a58b5=_0x4a58b5||0xcc;return function(_0x182881){if(_0x182881){return _0x342d13[_0x3cfe('0x19')](_0x4a58b5);}return _0x342d13['status'](_0x4a58b5)[_0x3cfe('0x1a')]();};}function respondWithResult(_0x522501,_0x4b298c){_0x4b298c=_0x4b298c||0xc8;return function(_0x792142){if(_0x792142){return _0x522501[_0x3cfe('0x1b')](_0x4b298c)[_0x3cfe('0x1c')](_0x792142);}};}function respondWithFilteredResult(_0x294bf5,_0x28b1a9){return function(_0x1d6136){if(_0x1d6136){var _0x1b0c1a=_0x1d6136[_0x3cfe('0x1d')],_0x560c95=_0x28b1a9[_0x3cfe('0x1e')],_0xa3c181=_0x28b1a9[_0x3cfe('0x1e')]+_0x28b1a9[_0x3cfe('0x1f')],_0x38cd35;if(_0xa3c181>=_0x1b0c1a){_0xa3c181=_0x1b0c1a;_0x38cd35=0xc8;}else{_0x38cd35=0xce;}_0x294bf5[_0x3cfe('0x1b')](_0x38cd35);return _0x294bf5[_0x3cfe('0x20')](_0x3cfe('0x21'),_0x560c95+'-'+_0xa3c181+'/'+_0x1b0c1a)[_0x3cfe('0x1c')](_0x1d6136);}return null;};}function patchUpdates(_0x2c7fb7){return function(_0x1eb606){try{jsonpatch[_0x3cfe('0x22')](_0x1eb606,_0x2c7fb7,!![]);}catch(_0x3fbc4c){return BPromise['reject'](_0x3fbc4c);}return _0x1eb606[_0x3cfe('0x23')]();};}function saveUpdates(_0x180867,_0x251365){return function(_0x539803){if(_0x539803){return _0x539803[_0x3cfe('0x24')](_0x180867)[_0x3cfe('0x25')](function(_0x44d92b){return _0x44d92b;});}return null;};}function removeEntity(_0x2651f5,_0x3ff70c){return function(_0x4c5aa4){if(_0x4c5aa4){return _0x4c5aa4[_0x3cfe('0x26')]()[_0x3cfe('0x25')](function(){var _0x5706c5=_0x4c5aa4[_0x3cfe('0x27')]({'plain':!![]});var _0x417605=_0x3cfe('0x28');return db['UserProfileResource'][_0x3cfe('0x26')]({'where':{'type':_0x417605,'resourceId':_0x5706c5['id']}})[_0x3cfe('0x25')](function(){return _0x4c5aa4;});})['then'](function(){_0x2651f5[_0x3cfe('0x1b')](0xcc)[_0x3cfe('0x1a')]();});}};}function handleEntityNotFound(_0xae06a2,_0x5c462e){return function(_0x414098){if(!_0x414098){_0xae06a2[_0x3cfe('0x19')](0x194);}return _0x414098;};}function handleError(_0x103cfa,_0x1c9813){_0x1c9813=_0x1c9813||0x1f4;return function(_0x4c4ce4){logger[_0x3cfe('0x29')](_0x4c4ce4[_0x3cfe('0x2a')]);if(_0x4c4ce4[_0x3cfe('0x2b')]){delete _0x4c4ce4[_0x3cfe('0x2b')];}_0x103cfa[_0x3cfe('0x1b')](_0x1c9813)[_0x3cfe('0x2c')](_0x4c4ce4);};}exports[_0x3cfe('0x2d')]=function(_0x3154b7,_0x484489){var _0x98a0a0={},_0xdefc0b={},_0x5df9b7={'count':0x0,'rows':[]};var _0x234989=_[_0x3cfe('0x2e')](db[_0x3cfe('0x2f')]['rawAttributes'],function(_0x57a0f6){return{'name':_0x57a0f6[_0x3cfe('0x30')],'type':_0x57a0f6[_0x3cfe('0x31')]['key']};});_0xdefc0b[_0x3cfe('0x32')]=_[_0x3cfe('0x2e')](_0x234989,_0x3cfe('0x2b'));_0xdefc0b[_0x3cfe('0x33')]=_[_0x3cfe('0x34')](_0x3154b7[_0x3cfe('0x33')]);_0xdefc0b['filters']=_['intersection'](_0xdefc0b['model'],_0xdefc0b[_0x3cfe('0x33')]);_0x98a0a0['attributes']=_[_0x3cfe('0x35')](_0xdefc0b[_0x3cfe('0x32')],qs[_0x3cfe('0x36')](_0x3154b7[_0x3cfe('0x33')][_0x3cfe('0x36')]));_0x98a0a0[_0x3cfe('0x37')]=_0x98a0a0[_0x3cfe('0x37')][_0x3cfe('0x38')]?_0x98a0a0['attributes']:_0xdefc0b[_0x3cfe('0x32')];if(!_0x3154b7[_0x3cfe('0x33')][_0x3cfe('0x39')]('nolimit')){_0x98a0a0[_0x3cfe('0x1f')]=qs['limit'](_0x3154b7[_0x3cfe('0x33')]['limit']);_0x98a0a0[_0x3cfe('0x1e')]=qs[_0x3cfe('0x1e')](_0x3154b7[_0x3cfe('0x33')][_0x3cfe('0x1e')]);}_0x98a0a0[_0x3cfe('0x3a')]=qs[_0x3cfe('0x3b')](_0x3154b7[_0x3cfe('0x33')][_0x3cfe('0x3b')]);_0x98a0a0[_0x3cfe('0x3c')]=qs['filters'](_[_0x3cfe('0x3d')](_0x3154b7[_0x3cfe('0x33')],_0xdefc0b['filters']));if(_0x3154b7[_0x3cfe('0x33')]['filter']){_0x98a0a0[_0x3cfe('0x3c')]=_[_0x3cfe('0x3e')](_0x98a0a0['where'],{'$or':_[_0x3cfe('0x2e')](_0x234989,function(_0x80e828){if(_0x80e828[_0x3cfe('0x31')]!==_0x3cfe('0x3f')){var _0xcf412d={};_0xcf412d[_0x80e828[_0x3cfe('0x2b')]]={'$like':'%'+_0x3154b7[_0x3cfe('0x33')][_0x3cfe('0x40')]+'%'};return _0xcf412d;}})});}_0x98a0a0=_[_0x3cfe('0x3e')]({},_0x98a0a0,_0x3154b7[_0x3cfe('0x41')]);var _0x1a7370={'where':_0x98a0a0[_0x3cfe('0x3c')]};return db[_0x3cfe('0x2f')]['count'](_0x1a7370)[_0x3cfe('0x25')](function(_0x2b732b){_0x5df9b7[_0x3cfe('0x1d')]=_0x2b732b;if(_0x3154b7[_0x3cfe('0x33')][_0x3cfe('0x42')]){_0x98a0a0['include']=[{'all':!![]}];}return db[_0x3cfe('0x2f')][_0x3cfe('0x43')](_0x98a0a0);})[_0x3cfe('0x25')](function(_0x2a908c){_0x5df9b7[_0x3cfe('0x44')]=_0x2a908c;return _0x5df9b7;})[_0x3cfe('0x25')](respondWithFilteredResult(_0x484489,_0x98a0a0))[_0x3cfe('0x45')](handleError(_0x484489,null));};exports[_0x3cfe('0x46')]=function(_0x1dbe5d,_0x29a30f){var _0x4613d3={'raw':!![],'where':{'id':_0x1dbe5d[_0x3cfe('0x47')]['id']}},_0x40f97d={};_0x40f97d[_0x3cfe('0x32')]=_[_0x3cfe('0x34')](db[_0x3cfe('0x2f')]['rawAttributes']);_0x40f97d['query']=_[_0x3cfe('0x34')](_0x1dbe5d[_0x3cfe('0x33')]);_0x40f97d[_0x3cfe('0x48')]=_[_0x3cfe('0x35')](_0x40f97d[_0x3cfe('0x32')],_0x40f97d[_0x3cfe('0x33')]);_0x4613d3['attributes']=_['intersection'](_0x40f97d[_0x3cfe('0x32')],qs[_0x3cfe('0x36')](_0x1dbe5d[_0x3cfe('0x33')]['fields']));_0x4613d3['attributes']=_0x4613d3[_0x3cfe('0x37')][_0x3cfe('0x38')]?_0x4613d3['attributes']:_0x40f97d[_0x3cfe('0x32')];if(_0x1dbe5d[_0x3cfe('0x33')][_0x3cfe('0x42')]){_0x4613d3[_0x3cfe('0x49')]=[{'all':!![]}];}_0x4613d3=_['merge']({},_0x4613d3,_0x1dbe5d[_0x3cfe('0x41')]);return db[_0x3cfe('0x2f')][_0x3cfe('0x4a')](_0x4613d3)[_0x3cfe('0x25')](handleEntityNotFound(_0x29a30f,null))['then'](respondWithResult(_0x29a30f,null))['catch'](handleError(_0x29a30f,null));};exports['create']=function(_0x12bbb6,_0x28f450){return db[_0x3cfe('0x2f')][_0x3cfe('0x4b')](_0x12bbb6[_0x3cfe('0x4c')],{})[_0x3cfe('0x25')](function(_0x29266f){var _0x43b622=_0x12bbb6[_0x3cfe('0x4d')][_0x3cfe('0x27')]({'plain':!![]});if(!_0x43b622)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x43b622[_0x3cfe('0x4e')]===_0x3cfe('0x4d')){var _0x44a0dc=_0x29266f[_0x3cfe('0x27')]({'plain':!![]});var _0x43c403=_0x3cfe('0x28');return db['UserProfileSection']['find']({'where':{'name':_0x43c403,'userProfileId':_0x43b622[_0x3cfe('0x4f')]},'raw':!![]})[_0x3cfe('0x25')](function(_0x2a74b3){if(_0x2a74b3&&_0x2a74b3[_0x3cfe('0x50')]===0x0){return db[_0x3cfe('0x51')]['create']({'name':_0x44a0dc[_0x3cfe('0x2b')],'resourceId':_0x44a0dc['id'],'type':_0x2a74b3[_0x3cfe('0x2b')],'sectionId':_0x2a74b3['id']},{})[_0x3cfe('0x25')](function(){return _0x29266f;});}else{return _0x29266f;}})['catch'](function(_0x1c4762){logger[_0x3cfe('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1c4762);throw _0x1c4762;});}return _0x29266f;})[_0x3cfe('0x25')](respondWithResult(_0x28f450,0xc9))['catch'](handleError(_0x28f450,null));};exports['update']=function(_0x4d38ce,_0x5bb4dc){if(_0x4d38ce['body']['id']){delete _0x4d38ce[_0x3cfe('0x4c')]['id'];}return db[_0x3cfe('0x2f')][_0x3cfe('0x4a')]({'where':{'id':_0x4d38ce[_0x3cfe('0x47')]['id']}})[_0x3cfe('0x25')](handleEntityNotFound(_0x5bb4dc,null))[_0x3cfe('0x25')](saveUpdates(_0x4d38ce['body'],null))[_0x3cfe('0x25')](respondWithResult(_0x5bb4dc,null))['catch'](handleError(_0x5bb4dc,null));};exports[_0x3cfe('0x26')]=function(_0x33f8ae,_0x1094ef){return db['AnalyticExtractedReport'][_0x3cfe('0x4a')]({'where':{'id':_0x33f8ae[_0x3cfe('0x47')]['id']}})['then'](handleEntityNotFound(_0x1094ef,null))[_0x3cfe('0x25')](removeEntity(_0x1094ef,null))[_0x3cfe('0x45')](handleError(_0x1094ef,null));};exports[_0x3cfe('0x52')]=function(_0x41dc43,_0x5b2e4c,_0x29241d){return db[_0x3cfe('0x2f')][_0x3cfe('0x4a')]({'where':{'id':_0x41dc43[_0x3cfe('0x47')]['id']},'attributes':['name',_0x3cfe('0x53'),_0x3cfe('0x54'),_0x3cfe('0x55')],'raw':!![]})[_0x3cfe('0x25')](handleEntityNotFound(_0x5b2e4c,null))[_0x3cfe('0x25')](function(_0x2473cc){if(_0x2473cc){if(!fs[_0x3cfe('0x56')](path[_0x3cfe('0x57')](config[_0x3cfe('0x58')],_0x3cfe('0x59'),_0x2473cc[_0x3cfe('0x54')]))){throw new db[(_0x3cfe('0x5a'))]['ValidationError'](_0x3cfe('0x5b'));}if(_0x41dc43[_0x3cfe('0x33')]['exists']){return _0x5b2e4c[_0x3cfe('0x19')](0xc8);}return _0x5b2e4c[_0x3cfe('0x52')](path['join'](config[_0x3cfe('0x58')],'server/files/reports',_0x2473cc['savename']),util[_0x3cfe('0x5c')](_0x3cfe('0x5d'),_0x2473cc[_0x3cfe('0x53')]||_0x2473cc[_0x3cfe('0x2b')],_0x2473cc[_0x3cfe('0x55')][_0x3cfe('0x5e')]()));}})[_0x3cfe('0x45')](handleError(_0x5b2e4c,null));};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
index 282e22f..2c85d6f 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 _0xb43d=['util','../../config/logger','api','bluebird','../../config/environment','./analyticExtractedReport.attributes','exports','define','AnalyticExtractedReport','lodash'];(function(_0xcc470b,_0x668b1){var _0x1707aa=function(_0x3e0255){while(--_0x3e0255){_0xcc470b['push'](_0xcc470b['shift']());}};_0x1707aa(++_0x668b1);}(_0xb43d,0xf9));var _0xdb43=function(_0x218bc6,_0x168dc2){_0x218bc6=_0x218bc6-0x0;var _0x143d9b=_0xb43d[_0x218bc6];return _0x143d9b;};'use strict';var _=require(_0xdb43('0x0'));var util=require(_0xdb43('0x1'));var logger=require(_0xdb43('0x2'))(_0xdb43('0x3'));var moment=require('moment');var BPromise=require(_0xdb43('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xdb43('0x5'));var attributes=require(_0xdb43('0x6'));module[_0xdb43('0x7')]=function(_0x494f92,_0x2c7d24){return _0x494f92[_0xdb43('0x8')](_0xdb43('0x9'),attributes,{'tableName':'analytics_extracted_reports','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa79e=['rimraf','../../config/environment','./analyticExtractedReport.attributes','exports','AnalyticExtractedReport','analytics_extracted_reports','../../config/logger','api','bluebird','request-promise'];(function(_0xefd519,_0xc62635){var _0x4bb882=function(_0x37e0a1){while(--_0x37e0a1){_0xefd519['push'](_0xefd519['shift']());}};_0x4bb882(++_0xc62635);}(_0xa79e,0x11e));var _0xea79=function(_0x4bacb6,_0x2b299d){_0x4bacb6=_0x4bacb6-0x0;var _0x58c029=_0xa79e[_0x4bacb6];return _0x58c029;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xea79('0x0'))(_0xea79('0x1'));var moment=require('moment');var BPromise=require(_0xea79('0x2'));var rp=require(_0xea79('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xea79('0x4'));var config=require(_0xea79('0x5'));var attributes=require(_0xea79('0x6'));module[_0xea79('0x7')]=function(_0x271635,_0x310d2e){return _0x271635['define'](_0xea79('0x8'),attributes,{'tableName':_0xea79('0x9'),'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 bb6e2d3..0b065e4 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 _0xe798=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','util','moment','bluebird'];(function(_0x1d9708,_0x1979cf){var _0x32a52e=function(_0x2b7c8c){while(--_0x2b7c8c){_0x1d9708['push'](_0x1d9708['shift']());}};_0x32a52e(++_0x1979cf);}(_0xe798,0x155));var _0x8e79=function(_0x511068,_0x521a6c){_0x511068=_0x511068-0x0;var _0xb73342=_0xe798[_0x511068];return _0xb73342;};'use strict';var _=require(_0x8e79('0x0'));var util=require(_0x8e79('0x1'));var moment=require(_0x8e79('0x2'));var BPromise=require(_0x8e79('0x3'));var rs=require(_0x8e79('0x4'));var fs=require('fs');var Redis=require(_0x8e79('0x5'));var db=require(_0x8e79('0x6'))['db'];var utils=require(_0x8e79('0x7'));var logger=require(_0x8e79('0x8'))(_0x8e79('0x9'));var config=require(_0x8e79('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x8e79('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x44ba34,_0x4b881f,_0x380c23){return new BPromise(function(_0x19315e,_0x2b0d85){return client[_0x8e79('0xc')](_0x44ba34,_0x380c23)[_0x8e79('0xd')](function(_0x4125eb){logger[_0x8e79('0xe')](_0x8e79('0xf'),_0x4b881f,_0x8e79('0x10'));logger[_0x8e79('0x11')]('AnalyticExtractedReport,\x20%s,\x20%s,\x20%s',_0x4b881f,_0x8e79('0x10'),JSON['stringify'](_0x4125eb));if(_0x4125eb['error']){if(_0x4125eb[_0x8e79('0x12')][_0x8e79('0x13')]===0x1f4){logger['error']('AnalyticExtractedReport,\x20%s,\x20%s',_0x4b881f,_0x4125eb[_0x8e79('0x12')][_0x8e79('0x14')]);return _0x2b0d85(_0x4125eb[_0x8e79('0x12')][_0x8e79('0x14')]);}logger[_0x8e79('0x12')](_0x8e79('0xf'),_0x4b881f,_0x4125eb[_0x8e79('0x12')][_0x8e79('0x14')]);return _0x19315e(_0x4125eb[_0x8e79('0x12')]['message']);}else{logger[_0x8e79('0xe')](_0x8e79('0xf'),_0x4b881f,_0x8e79('0x10'));_0x19315e(_0x4125eb[_0x8e79('0x15')][_0x8e79('0x14')]);}})[_0x8e79('0x16')](function(_0x1cbf0c){logger[_0x8e79('0x12')](_0x8e79('0xf'),_0x4b881f,_0x1cbf0c);_0x2b0d85(_0x1cbf0c);});});}
\ No newline at end of file
+var _0x9034=['code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x237f9e,_0x360aa9){var _0x3b9a9c=function(_0x1453d2){while(--_0x1453d2){_0x237f9e['push'](_0x237f9e['shift']());}};_0x3b9a9c(++_0x360aa9);}(_0x9034,0xc4));var _0x4903=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9034[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x4903('0x0'));var util=require('util');var moment=require(_0x4903('0x1'));var BPromise=require(_0x4903('0x2'));var rs=require(_0x4903('0x3'));var fs=require('fs');var Redis=require(_0x4903('0x4'));var db=require(_0x4903('0x5'))['db'];var utils=require(_0x4903('0x6'));var logger=require(_0x4903('0x7'))(_0x4903('0x8'));var config=require(_0x4903('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x4903('0xa')][_0x4903('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x181012,_0x1746e9,_0x4131ae){return new BPromise(function(_0x450078,_0x500726){return client['request'](_0x181012,_0x4131ae)[_0x4903('0xc')](function(_0x46474){logger[_0x4903('0xd')](_0x4903('0xe'),_0x1746e9,_0x4903('0xf'));logger[_0x4903('0x10')](_0x4903('0x11'),_0x1746e9,_0x4903('0xf'),JSON[_0x4903('0x12')](_0x46474));if(_0x46474[_0x4903('0x13')]){if(_0x46474[_0x4903('0x13')][_0x4903('0x14')]===0x1f4){logger[_0x4903('0x13')](_0x4903('0xe'),_0x1746e9,_0x46474[_0x4903('0x13')][_0x4903('0x15')]);return _0x500726(_0x46474[_0x4903('0x13')][_0x4903('0x15')]);}logger[_0x4903('0x13')](_0x4903('0xe'),_0x1746e9,_0x46474['error'][_0x4903('0x15')]);return _0x450078(_0x46474[_0x4903('0x13')]['message']);}else{logger[_0x4903('0xd')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x1746e9,_0x4903('0xf'));_0x450078(_0x46474[_0x4903('0x16')][_0x4903('0x15')]);}})[_0x4903('0x17')](function(_0x5eeaf2){logger[_0x4903('0x13')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x1746e9,_0x5eeaf2);_0x500726(_0x5eeaf2);});});}
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js
index eda92b1..aa84e7e 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 _0x74cc=['util','express','Router','../../components/interaction/service','./analyticExtractedReport.controller','isAuthenticated','/:id','show','get','/:id/download','download','create','put','update','delete','destroy','exports','multer'];(function(_0x5632af,_0x92259b){var _0x5d349c=function(_0x1527fe){while(--_0x1527fe){_0x5632af['push'](_0x5632af['shift']());}};_0x5d349c(++_0x92259b);}(_0x74cc,0x19d));var _0xc74c=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0x74cc[_0x13ea00];return _0x1f7347;};'use strict';var multer=require(_0xc74c('0x0'));var util=require(_0xc74c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xc74c('0x2'));var router=express[_0xc74c('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xc74c('0x4'));var config=require('../../config/environment');var controller=require(_0xc74c('0x5'));router['get']('/',auth[_0xc74c('0x6')](),controller['index']);router['get'](_0xc74c('0x7'),auth[_0xc74c('0x6')](),controller[_0xc74c('0x8')]);router[_0xc74c('0x9')](_0xc74c('0xa'),auth['isAuthenticated'](),controller[_0xc74c('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xc74c('0xc')]);router[_0xc74c('0xd')]('/:id',auth[_0xc74c('0x6')](),controller[_0xc74c('0xe')]);router[_0xc74c('0xf')]('/:id',auth[_0xc74c('0x6')](),controller[_0xc74c('0x10')]);module[_0xc74c('0x11')]=router;
\ No newline at end of file
+var _0xfa1e=['isAuthenticated','index','show','/:id/download','post','create','put','/:id','update','delete','exports','multer','util','path','connect-timeout','../../components/auth/service','../../config/environment','./analyticExtractedReport.controller','get'];(function(_0x5aef17,_0x592cd4){var _0x43f9d0=function(_0x49ea9c){while(--_0x49ea9c){_0x5aef17['push'](_0x5aef17['shift']());}};_0x43f9d0(++_0x592cd4);}(_0xfa1e,0x102));var _0xefa1=function(_0x4ffa64,_0x271035){_0x4ffa64=_0x4ffa64-0x0;var _0x5da001=_0xfa1e[_0x4ffa64];return _0x5da001;};'use strict';var multer=require(_0xefa1('0x0'));var util=require(_0xefa1('0x1'));var path=require(_0xefa1('0x2'));var timeout=require(_0xefa1('0x3'));var express=require('express');var router=express['Router']();var auth=require(_0xefa1('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xefa1('0x5'));var controller=require(_0xefa1('0x6'));router[_0xefa1('0x7')]('/',auth[_0xefa1('0x8')](),controller[_0xefa1('0x9')]);router['get']('/:id',auth[_0xefa1('0x8')](),controller[_0xefa1('0xa')]);router[_0xefa1('0x7')](_0xefa1('0xb'),auth['isAuthenticated'](),controller['download']);router[_0xefa1('0xc')]('/',auth[_0xefa1('0x8')](),controller[_0xefa1('0xd')]);router[_0xefa1('0xe')](_0xefa1('0xf'),auth[_0xefa1('0x8')](),controller[_0xefa1('0x10')]);router[_0xefa1('0x11')](_0xefa1('0xf'),auth['isAuthenticated'](),controller['destroy']);module[_0xefa1('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
index fd087de..5e96552 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 _0x326f=['STRING','BOOLEAN','sequelize'];(function(_0x52e0da,_0x46546d){var _0x3490ec=function(_0x426afd){while(--_0x426afd){_0x52e0da['push'](_0x52e0da['shift']());}};_0x3490ec(++_0x46546d);}(_0x326f,0xd1));var _0xf326=function(_0x1a0811,_0x556ce9){_0x1a0811=_0x1a0811-0x0;var _0x2ac1c6=_0x326f[_0x1a0811];return _0x2ac1c6;};'use strict';var Sequelize=require(_0xf326('0x0'));module['exports']={'field':{'type':Sequelize['TEXT']},'alias':{'type':Sequelize[_0xf326('0x1')]},'function':{'type':Sequelize[_0xf326('0x1')]},'format':{'type':Sequelize[_0xf326('0x1')]},'groupBy':{'type':Sequelize[_0xf326('0x2')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0xf326('0x1')]},'custom':{'type':Sequelize[_0xf326('0x2')],'defaultValue':![]}};
\ No newline at end of file
+var _0x1261=['exports','TEXT','STRING','BOOLEAN'];(function(_0x2d19ea,_0x3193d8){var _0x4346c6=function(_0x950715){while(--_0x950715){_0x2d19ea['push'](_0x2d19ea['shift']());}};_0x4346c6(++_0x3193d8);}(_0x1261,0x144));var _0x1126=function(_0x160cd5,_0x19c58e){_0x160cd5=_0x160cd5-0x0;var _0x366763=_0x1261[_0x160cd5];return _0x366763;};'use strict';var Sequelize=require('sequelize');module[_0x1126('0x0')]={'field':{'type':Sequelize[_0x1126('0x1')]},'alias':{'type':Sequelize[_0x1126('0x2')]},'function':{'type':Sequelize[_0x1126('0x2')]},'format':{'type':Sequelize[_0x1126('0x2')]},'groupBy':{'type':Sequelize[_0x1126('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x1126('0x2')]},'custom':{'type':Sequelize[_0x1126('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js
index e978f60..3421057 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 _0x9582=['mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','count','offset','set','Content-Range','json','apply','reject','destroy','then','name','send','map','AnalyticFieldReport','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','include','rows','catch','show','params','fields','find','create','bulkCreate','body','update','bulkDestroy','addFields','AnalyticCustomReport','findOne','sequelize','findAll','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9582,0x95));var _0x2958=function(_0x377545,_0x26f85c){_0x377545=_0x377545-0x0;var _0x18d0c6=_0x9582[_0x377545];return _0x18d0c6;};'use strict';var pdf=require(_0x2958('0x0'));var emlformat=require(_0x2958('0x1'));var rimraf=require(_0x2958('0x2'));var zipdir=require(_0x2958('0x3'));var jsonpatch=require(_0x2958('0x4'));var rp=require(_0x2958('0x5'));var moment=require('moment');var BPromise=require(_0x2958('0x6'));var Mustache=require(_0x2958('0x7'));var util=require(_0x2958('0x8'));var path=require(_0x2958('0x9'));var sox=require(_0x2958('0xa'));var csv=require(_0x2958('0xb'));var ejs=require(_0x2958('0xc'));var fs=require('fs');var _=require(_0x2958('0xd'));var squel=require(_0x2958('0xe'));var crypto=require(_0x2958('0xf'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x2958('0xb'));var querystring=require('querystring');var Papa=require(_0x2958('0x10'));var Redis=require('ioredis');var authService=require(_0x2958('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x2958('0x12'));var hardwareService=require(_0x2958('0x13'));var logger=require(_0x2958('0x14'))(_0x2958('0x15'));var utils=require(_0x2958('0x16'));var config=require('../../config/environment');var db=require(_0x2958('0x17'))['db'];function respondWithStatusCode(_0x4255ee,_0x33a13a){_0x33a13a=_0x33a13a||0xcc;return function(_0x20e06a){if(_0x20e06a){return _0x4255ee[_0x2958('0x18')](_0x33a13a);}return _0x4255ee[_0x2958('0x19')](_0x33a13a)[_0x2958('0x1a')]();};}function respondWithResult(_0x250d47,_0x5bd520){_0x5bd520=_0x5bd520||0xc8;return function(_0x42e976){if(_0x42e976){return _0x250d47[_0x2958('0x19')](_0x5bd520)['json'](_0x42e976);}};}function respondWithFilteredResult(_0x4c762e,_0x21ed6c){return function(_0x38e724){if(_0x38e724){var _0x5f06b1=_0x38e724[_0x2958('0x1b')],_0x3bef50=_0x21ed6c[_0x2958('0x1c')],_0x544563=_0x21ed6c['offset']+_0x21ed6c['limit'],_0x5c3ac3;if(_0x544563>=_0x5f06b1){_0x544563=_0x5f06b1;_0x5c3ac3=0xc8;}else{_0x5c3ac3=0xce;}_0x4c762e[_0x2958('0x19')](_0x5c3ac3);return _0x4c762e[_0x2958('0x1d')](_0x2958('0x1e'),_0x3bef50+'-'+_0x544563+'/'+_0x5f06b1)[_0x2958('0x1f')](_0x38e724);}return null;};}function patchUpdates(_0x27599c){return function(_0x47c8f5){try{jsonpatch[_0x2958('0x20')](_0x47c8f5,_0x27599c,!![]);}catch(_0x378a9f){return BPromise[_0x2958('0x21')](_0x378a9f);}return _0x47c8f5['save']();};}function saveUpdates(_0x1e77eb,_0x53b100){return function(_0x1da684){if(_0x1da684){return _0x1da684['update'](_0x1e77eb)['then'](function(_0x431b41){return _0x431b41;});}return null;};}function removeEntity(_0x39945c,_0x2a02a4){return function(_0x26c5a5){if(_0x26c5a5){return _0x26c5a5[_0x2958('0x22')]()[_0x2958('0x23')](function(){_0x39945c[_0x2958('0x19')](0xcc)[_0x2958('0x1a')]();});}};}function handleEntityNotFound(_0x330763,_0x2aa514){return function(_0xaf5547){if(!_0xaf5547){_0x330763[_0x2958('0x18')](0x194);}return _0xaf5547;};}function handleError(_0x119242,_0x1943af){_0x1943af=_0x1943af||0x1f4;return function(_0x1e08b6){logger['error'](_0x1e08b6['stack']);if(_0x1e08b6[_0x2958('0x24')]){delete _0x1e08b6[_0x2958('0x24')];}_0x119242[_0x2958('0x19')](_0x1943af)[_0x2958('0x25')](_0x1e08b6);};}exports['index']=function(_0x2bd1ac,_0x57ae96){var _0x402d97={},_0x40adce={},_0x30a137={'count':0x0,'rows':[]};var _0x4581d3=_[_0x2958('0x26')](db[_0x2958('0x27')][_0x2958('0x28')],function(_0x5d1dfc){return{'name':_0x5d1dfc[_0x2958('0x29')],'type':_0x5d1dfc['type']['key']};});_0x40adce[_0x2958('0x2a')]=_[_0x2958('0x26')](_0x4581d3,_0x2958('0x24'));_0x40adce[_0x2958('0x2b')]=_[_0x2958('0x2c')](_0x2bd1ac[_0x2958('0x2b')]);_0x40adce[_0x2958('0x2d')]=_[_0x2958('0x2e')](_0x40adce['model'],_0x40adce[_0x2958('0x2b')]);_0x402d97[_0x2958('0x2f')]=_['intersection'](_0x40adce[_0x2958('0x2a')],qs['fields'](_0x2bd1ac[_0x2958('0x2b')]['fields']));_0x402d97[_0x2958('0x2f')]=_0x402d97['attributes'][_0x2958('0x30')]?_0x402d97[_0x2958('0x2f')]:_0x40adce[_0x2958('0x2a')];if(!_0x2bd1ac[_0x2958('0x2b')][_0x2958('0x31')](_0x2958('0x32'))){_0x402d97[_0x2958('0x33')]=qs[_0x2958('0x33')](_0x2bd1ac[_0x2958('0x2b')]['limit']);_0x402d97[_0x2958('0x1c')]=qs['offset'](_0x2bd1ac[_0x2958('0x2b')]['offset']);}_0x402d97[_0x2958('0x34')]=qs[_0x2958('0x35')](_0x2bd1ac[_0x2958('0x2b')][_0x2958('0x35')]);_0x402d97[_0x2958('0x36')]=qs[_0x2958('0x2d')](_[_0x2958('0x37')](_0x2bd1ac[_0x2958('0x2b')],_0x40adce[_0x2958('0x2d')]));if(_0x2bd1ac[_0x2958('0x2b')][_0x2958('0x38')]){_0x402d97[_0x2958('0x36')]=_[_0x2958('0x39')](_0x402d97['where'],{'$or':_[_0x2958('0x26')](_0x4581d3,function(_0xcdaa70){if(_0xcdaa70[_0x2958('0x3a')]!==_0x2958('0x3b')){var _0x4e0db4={};_0x4e0db4[_0xcdaa70[_0x2958('0x24')]]={'$like':'%'+_0x2bd1ac[_0x2958('0x2b')][_0x2958('0x38')]+'%'};return _0x4e0db4;}})});}_0x402d97=_[_0x2958('0x39')]({},_0x402d97,_0x2bd1ac[_0x2958('0x3c')]);var _0x273339={'where':_0x402d97[_0x2958('0x36')]};return db[_0x2958('0x27')][_0x2958('0x1b')](_0x273339)[_0x2958('0x23')](function(_0x41f5a6){_0x30a137[_0x2958('0x1b')]=_0x41f5a6;if(_0x2bd1ac[_0x2958('0x2b')]['includeAll']){_0x402d97[_0x2958('0x3d')]=[{'all':!![]}];}return db[_0x2958('0x27')]['findAll'](_0x402d97);})['then'](function(_0x1394ed){_0x30a137[_0x2958('0x3e')]=_0x1394ed;return _0x30a137;})[_0x2958('0x23')](respondWithFilteredResult(_0x57ae96,_0x402d97))[_0x2958('0x3f')](handleError(_0x57ae96,null));};exports[_0x2958('0x40')]=function(_0x817a84,_0x1435f8){var _0x13be6d={'raw':![],'where':{'id':_0x817a84[_0x2958('0x41')]['id']}},_0x43f917={};_0x43f917[_0x2958('0x2a')]=_[_0x2958('0x2c')](db[_0x2958('0x27')]['rawAttributes']);_0x43f917[_0x2958('0x2b')]=_[_0x2958('0x2c')](_0x817a84[_0x2958('0x2b')]);_0x43f917[_0x2958('0x2d')]=_['intersection'](_0x43f917[_0x2958('0x2a')],_0x43f917['query']);_0x13be6d['attributes']=_[_0x2958('0x2e')](_0x43f917[_0x2958('0x2a')],qs[_0x2958('0x42')](_0x817a84[_0x2958('0x2b')][_0x2958('0x42')]));_0x13be6d[_0x2958('0x2f')]=_0x13be6d['attributes'][_0x2958('0x30')]?_0x13be6d['attributes']:_0x43f917['model'];if(_0x817a84[_0x2958('0x2b')]['includeAll']){_0x13be6d[_0x2958('0x3d')]=[{'all':!![]}];}_0x13be6d=_[_0x2958('0x39')]({},_0x13be6d,_0x817a84[_0x2958('0x3c')]);return db[_0x2958('0x27')][_0x2958('0x43')](_0x13be6d)[_0x2958('0x23')](handleEntityNotFound(_0x1435f8,null))[_0x2958('0x23')](respondWithResult(_0x1435f8,null))[_0x2958('0x3f')](handleError(_0x1435f8,null));};exports['create']=function(_0x1c1597,_0x1012c5){return db[_0x2958('0x27')][_0x2958('0x44')](_0x1c1597['body'],{})[_0x2958('0x23')](respondWithResult(_0x1012c5,0xc9))[_0x2958('0x3f')](handleError(_0x1012c5,null));};exports['bulkCreate']=function(_0x1b6829,_0x682c14){return db[_0x2958('0x27')][_0x2958('0x45')](_0x1b6829[_0x2958('0x46')],{'raw':![],'individualHooks':!![]})[_0x2958('0x23')](respondWithResult(_0x682c14,0xc9))['catch'](handleError(_0x682c14,null));};exports[_0x2958('0x47')]=function(_0x38b551,_0x26cc7f){if(_0x38b551[_0x2958('0x46')]['id']){delete _0x38b551[_0x2958('0x46')]['id'];}return db[_0x2958('0x27')][_0x2958('0x43')]({'where':{'id':_0x38b551[_0x2958('0x41')]['id']}})[_0x2958('0x23')](handleEntityNotFound(_0x26cc7f,null))[_0x2958('0x23')](saveUpdates(_0x38b551[_0x2958('0x46')],null))[_0x2958('0x23')](respondWithResult(_0x26cc7f,null))[_0x2958('0x3f')](handleError(_0x26cc7f,null));};exports[_0x2958('0x22')]=function(_0x1bb780,_0xfce675){return db[_0x2958('0x27')]['find']({'where':{'id':_0x1bb780[_0x2958('0x41')]['id']}})['then'](handleEntityNotFound(_0xfce675,null))[_0x2958('0x23')](removeEntity(_0xfce675,null))[_0x2958('0x3f')](handleError(_0xfce675,null));};exports[_0x2958('0x48')]=function(_0x534677,_0x497a30){return db[_0x2958('0x27')][_0x2958('0x22')]({'where':{'id':_0x534677[_0x2958('0x2b')]['ids']||[]},'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x497a30,0xcc))[_0x2958('0x3f')](handleError(_0x497a30,null));};exports[_0x2958('0x49')]=function(_0x99cda3,_0x366428,_0x4347c0){return db[_0x2958('0x4a')][_0x2958('0x4b')]({'where':{'id':_0x99cda3[_0x2958('0x41')]['id']}})[_0x2958('0x23')](handleEntityNotFound(_0x366428,null))['then'](function(_0x30c739){if(_0x30c739){return db[_0x2958('0x4c')]['transaction'](function(_0x14726e){return db[_0x2958('0x27')][_0x2958('0x22')]({'where':{'CustomReportId':_0x99cda3[_0x2958('0x41')]['id']},'transaction':_0x14726e})[_0x2958('0x23')](function(_0x16d927){var _0x542df8=_[_0x2958('0x26')](_0x99cda3[_0x2958('0x46')],function(_0xe1bf71){delete _0xe1bf71['id'];_0xe1bf71['CustomReportId']=_0x99cda3['params']['id'];return _0xe1bf71;});return db[_0x2958('0x27')]['bulkCreate'](_0x542df8,{'transaction':_0x14726e});});})[_0x2958('0x23')](function(){return db['AnalyticFieldReport'][_0x2958('0x4d')]({'where':{'CustomReportId':_0x99cda3[_0x2958('0x41')]['id']}});});}})[_0x2958('0x23')](respondWithResult(_0x366428,null))[_0x2958('0x3f')](handleError(_0x366428,null));};
\ No newline at end of file
+var _0x9672=['squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','status','count','offset','limit','set','Content-Range','json','apply','reject','destroy','then','end','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','merge','type','VIRTUAL','filter','options','AnalyticFieldReport','includeAll','include','findAll','catch','show','create','bulkCreate','body','update','find','params','ids','addFields','AnalyticCustomReport','findOne','sequelize','transaction','CustomReportId','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','ejs','lodash'];(function(_0x434346,_0x375bc0){var _0x4beb29=function(_0x4bca4e){while(--_0x4bca4e){_0x434346['push'](_0x434346['shift']());}};_0x4beb29(++_0x375bc0);}(_0x9672,0xee));var _0x2967=function(_0x28d7f4,_0x1a67b1){_0x28d7f4=_0x28d7f4-0x0;var _0x3953c3=_0x9672[_0x28d7f4];return _0x3953c3;};'use strict';var pdf=require(_0x2967('0x0'));var emlformat=require(_0x2967('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x2967('0x2'));var jsonpatch=require(_0x2967('0x3'));var rp=require(_0x2967('0x4'));var moment=require(_0x2967('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x2967('0x6'));var util=require(_0x2967('0x7'));var path=require(_0x2967('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x2967('0x9'));var fs=require('fs');var _=require(_0x2967('0xa'));var squel=require(_0x2967('0xb'));var crypto=require(_0x2967('0xc'));var jsforce=require(_0x2967('0xd'));var deskjs=require(_0x2967('0xe'));var toCsv=require(_0x2967('0xf'));var querystring=require(_0x2967('0x10'));var Papa=require('papaparse');var Redis=require(_0x2967('0x11'));var authService=require(_0x2967('0x12'));var qs=require(_0x2967('0x13'));var as=require(_0x2967('0x14'));var hardwareService=require(_0x2967('0x15'));var logger=require(_0x2967('0x16'))('api');var utils=require(_0x2967('0x17'));var config=require('../../config/environment');var db=require(_0x2967('0x18'))['db'];function respondWithStatusCode(_0x595fdb,_0x207630){_0x207630=_0x207630||0xcc;return function(_0x298f58){if(_0x298f58){return _0x595fdb['sendStatus'](_0x207630);}return _0x595fdb[_0x2967('0x19')](_0x207630)['end']();};}function respondWithResult(_0x142200,_0x313b5c){_0x313b5c=_0x313b5c||0xc8;return function(_0x3ea4b3){if(_0x3ea4b3){return _0x142200['status'](_0x313b5c)['json'](_0x3ea4b3);}};}function respondWithFilteredResult(_0xa2e896,_0x9a4e11){return function(_0x42296c){if(_0x42296c){var _0x4e1d34=_0x42296c[_0x2967('0x1a')],_0x574a9f=_0x9a4e11[_0x2967('0x1b')],_0x2fff79=_0x9a4e11[_0x2967('0x1b')]+_0x9a4e11[_0x2967('0x1c')],_0x12910a;if(_0x2fff79>=_0x4e1d34){_0x2fff79=_0x4e1d34;_0x12910a=0xc8;}else{_0x12910a=0xce;}_0xa2e896[_0x2967('0x19')](_0x12910a);return _0xa2e896[_0x2967('0x1d')](_0x2967('0x1e'),_0x574a9f+'-'+_0x2fff79+'/'+_0x4e1d34)[_0x2967('0x1f')](_0x42296c);}return null;};}function patchUpdates(_0x57bf2c){return function(_0x298de0){try{jsonpatch[_0x2967('0x20')](_0x298de0,_0x57bf2c,!![]);}catch(_0xff84a1){return BPromise[_0x2967('0x21')](_0xff84a1);}return _0x298de0['save']();};}function saveUpdates(_0x321e36,_0x1cb5e4){return function(_0x33bb91){if(_0x33bb91){return _0x33bb91['update'](_0x321e36)['then'](function(_0x13f924){return _0x13f924;});}return null;};}function removeEntity(_0x13d498,_0x258eca){return function(_0x10788e){if(_0x10788e){return _0x10788e[_0x2967('0x22')]()[_0x2967('0x23')](function(){_0x13d498[_0x2967('0x19')](0xcc)[_0x2967('0x24')]();});}};}function handleEntityNotFound(_0x46ab4a,_0x5bd687){return function(_0x436b45){if(!_0x436b45){_0x46ab4a[_0x2967('0x25')](0x194);}return _0x436b45;};}function handleError(_0x3c47e2,_0x197763){_0x197763=_0x197763||0x1f4;return function(_0x57f715){logger[_0x2967('0x26')](_0x57f715[_0x2967('0x27')]);if(_0x57f715['name']){delete _0x57f715[_0x2967('0x28')];}_0x3c47e2[_0x2967('0x19')](_0x197763)[_0x2967('0x29')](_0x57f715);};}exports[_0x2967('0x2a')]=function(_0x2355f2,_0x36c1d9){var _0x1a3d42={},_0x4e0603={},_0x1966b4={'count':0x0,'rows':[]};var _0x2a0ad8=_[_0x2967('0x2b')](db['AnalyticFieldReport'][_0x2967('0x2c')],function(_0x30ba97){return{'name':_0x30ba97[_0x2967('0x2d')],'type':_0x30ba97['type'][_0x2967('0x2e')]};});_0x4e0603[_0x2967('0x2f')]=_['map'](_0x2a0ad8,_0x2967('0x28'));_0x4e0603[_0x2967('0x30')]=_[_0x2967('0x31')](_0x2355f2['query']);_0x4e0603[_0x2967('0x32')]=_[_0x2967('0x33')](_0x4e0603[_0x2967('0x2f')],_0x4e0603['query']);_0x1a3d42[_0x2967('0x34')]=_[_0x2967('0x33')](_0x4e0603[_0x2967('0x2f')],qs[_0x2967('0x35')](_0x2355f2[_0x2967('0x30')][_0x2967('0x35')]));_0x1a3d42[_0x2967('0x34')]=_0x1a3d42[_0x2967('0x34')][_0x2967('0x36')]?_0x1a3d42[_0x2967('0x34')]:_0x4e0603[_0x2967('0x2f')];if(!_0x2355f2[_0x2967('0x30')][_0x2967('0x37')](_0x2967('0x38'))){_0x1a3d42[_0x2967('0x1c')]=qs[_0x2967('0x1c')](_0x2355f2['query']['limit']);_0x1a3d42[_0x2967('0x1b')]=qs[_0x2967('0x1b')](_0x2355f2[_0x2967('0x30')][_0x2967('0x1b')]);}_0x1a3d42['order']=qs[_0x2967('0x39')](_0x2355f2['query'][_0x2967('0x39')]);_0x1a3d42[_0x2967('0x3a')]=qs[_0x2967('0x32')](_['pick'](_0x2355f2[_0x2967('0x30')],_0x4e0603['filters']));if(_0x2355f2[_0x2967('0x30')]['filter']){_0x1a3d42[_0x2967('0x3a')]=_[_0x2967('0x3b')](_0x1a3d42['where'],{'$or':_[_0x2967('0x2b')](_0x2a0ad8,function(_0x397e37){if(_0x397e37[_0x2967('0x3c')]!==_0x2967('0x3d')){var _0x235ffb={};_0x235ffb[_0x397e37[_0x2967('0x28')]]={'$like':'%'+_0x2355f2[_0x2967('0x30')][_0x2967('0x3e')]+'%'};return _0x235ffb;}})});}_0x1a3d42=_[_0x2967('0x3b')]({},_0x1a3d42,_0x2355f2[_0x2967('0x3f')]);var _0x166b0f={'where':_0x1a3d42[_0x2967('0x3a')]};return db[_0x2967('0x40')][_0x2967('0x1a')](_0x166b0f)[_0x2967('0x23')](function(_0x2cf2c7){_0x1966b4[_0x2967('0x1a')]=_0x2cf2c7;if(_0x2355f2[_0x2967('0x30')][_0x2967('0x41')]){_0x1a3d42[_0x2967('0x42')]=[{'all':!![]}];}return db[_0x2967('0x40')][_0x2967('0x43')](_0x1a3d42);})[_0x2967('0x23')](function(_0xed0b3a){_0x1966b4['rows']=_0xed0b3a;return _0x1966b4;})['then'](respondWithFilteredResult(_0x36c1d9,_0x1a3d42))[_0x2967('0x44')](handleError(_0x36c1d9,null));};exports[_0x2967('0x45')]=function(_0x3ca0ea,_0xfc8471){var _0x3ce06d={'raw':![],'where':{'id':_0x3ca0ea['params']['id']}},_0x3a4b5c={};_0x3a4b5c['model']=_[_0x2967('0x31')](db['AnalyticFieldReport'][_0x2967('0x2c')]);_0x3a4b5c[_0x2967('0x30')]=_[_0x2967('0x31')](_0x3ca0ea['query']);_0x3a4b5c[_0x2967('0x32')]=_[_0x2967('0x33')](_0x3a4b5c['model'],_0x3a4b5c['query']);_0x3ce06d[_0x2967('0x34')]=_[_0x2967('0x33')](_0x3a4b5c[_0x2967('0x2f')],qs['fields'](_0x3ca0ea[_0x2967('0x30')][_0x2967('0x35')]));_0x3ce06d[_0x2967('0x34')]=_0x3ce06d[_0x2967('0x34')]['length']?_0x3ce06d['attributes']:_0x3a4b5c[_0x2967('0x2f')];if(_0x3ca0ea['query'][_0x2967('0x41')]){_0x3ce06d['include']=[{'all':!![]}];}_0x3ce06d=_['merge']({},_0x3ce06d,_0x3ca0ea[_0x2967('0x3f')]);return db[_0x2967('0x40')]['find'](_0x3ce06d)[_0x2967('0x23')](handleEntityNotFound(_0xfc8471,null))[_0x2967('0x23')](respondWithResult(_0xfc8471,null))['catch'](handleError(_0xfc8471,null));};exports[_0x2967('0x46')]=function(_0x1acf1a,_0x34cce0){return db['AnalyticFieldReport'][_0x2967('0x46')](_0x1acf1a['body'],{})[_0x2967('0x23')](respondWithResult(_0x34cce0,0xc9))[_0x2967('0x44')](handleError(_0x34cce0,null));};exports[_0x2967('0x47')]=function(_0x286869,_0x331c02){return db[_0x2967('0x40')]['bulkCreate'](_0x286869[_0x2967('0x48')],{'raw':![],'individualHooks':!![]})[_0x2967('0x23')](respondWithResult(_0x331c02,0xc9))['catch'](handleError(_0x331c02,null));};exports[_0x2967('0x49')]=function(_0x27bbac,_0x4aa7f4){if(_0x27bbac['body']['id']){delete _0x27bbac['body']['id'];}return db['AnalyticFieldReport'][_0x2967('0x4a')]({'where':{'id':_0x27bbac[_0x2967('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4aa7f4,null))[_0x2967('0x23')](saveUpdates(_0x27bbac[_0x2967('0x48')],null))[_0x2967('0x23')](respondWithResult(_0x4aa7f4,null))[_0x2967('0x44')](handleError(_0x4aa7f4,null));};exports[_0x2967('0x22')]=function(_0x304f6f,_0x4d119d){return db['AnalyticFieldReport'][_0x2967('0x4a')]({'where':{'id':_0x304f6f[_0x2967('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4d119d,null))['then'](removeEntity(_0x4d119d,null))[_0x2967('0x44')](handleError(_0x4d119d,null));};exports['bulkDestroy']=function(_0x201cf3,_0x24c4a9){return db['AnalyticFieldReport'][_0x2967('0x22')]({'where':{'id':_0x201cf3['query'][_0x2967('0x4c')]||[]},'raw':![],'individualHooks':!![]})[_0x2967('0x23')](respondWithResult(_0x24c4a9,0xcc))[_0x2967('0x44')](handleError(_0x24c4a9,null));};exports[_0x2967('0x4d')]=function(_0x2f49d5,_0xe65fa2,_0x1d864f){return db[_0x2967('0x4e')][_0x2967('0x4f')]({'where':{'id':_0x2f49d5['params']['id']}})[_0x2967('0x23')](handleEntityNotFound(_0xe65fa2,null))[_0x2967('0x23')](function(_0x4362c2){if(_0x4362c2){return db[_0x2967('0x50')][_0x2967('0x51')](function(_0xb47141){return db['AnalyticFieldReport'][_0x2967('0x22')]({'where':{'CustomReportId':_0x2f49d5[_0x2967('0x4b')]['id']},'transaction':_0xb47141})[_0x2967('0x23')](function(_0x2c61a8){var _0x2e53bc=_[_0x2967('0x2b')](_0x2f49d5[_0x2967('0x48')],function(_0x2d6214){delete _0x2d6214['id'];_0x2d6214[_0x2967('0x52')]=_0x2f49d5['params']['id'];return _0x2d6214;});return db[_0x2967('0x40')][_0x2967('0x47')](_0x2e53bc,{'transaction':_0xb47141});});})[_0x2967('0x23')](function(){return db[_0x2967('0x40')][_0x2967('0x43')]({'where':{'CustomReportId':_0x2f49d5[_0x2967('0x4b')]['id']}});});}})['then'](respondWithResult(_0xe65fa2,null))['catch'](handleError(_0xe65fa2,null));};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js
index a80c690..8930226 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 _0xda70=['lodash','util','api','moment','path','../../config/environment','./analyticFieldReport.attributes','exports','define','AnalyticFieldReport'];(function(_0x4bfbd2,_0x6e38a3){var _0x8591d7=function(_0x45bc6e){while(--_0x45bc6e){_0x4bfbd2['push'](_0x4bfbd2['shift']());}};_0x8591d7(++_0x6e38a3);}(_0xda70,0xa0));var _0x0da7=function(_0x32e6b9,_0x1ba001){_0x32e6b9=_0x32e6b9-0x0;var _0xd18132=_0xda70[_0x32e6b9];return _0xd18132;};'use strict';var _=require(_0x0da7('0x0'));var util=require(_0x0da7('0x1'));var logger=require('../../config/logger')(_0x0da7('0x2'));var moment=require(_0x0da7('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x0da7('0x4'));var rimraf=require('rimraf');var config=require(_0x0da7('0x5'));var attributes=require(_0x0da7('0x6'));module[_0x0da7('0x7')]=function(_0x2cb20d,_0x28c6f6){return _0x2cb20d[_0x0da7('0x8')](_0x0da7('0x9'),attributes,{'tableName':'analytics_report_fields','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5079=['api','bluebird','request-promise','path','rimraf','./analyticFieldReport.attributes','exports','define','AnalyticFieldReport','lodash','../../config/logger'];(function(_0x326723,_0x42580d){var _0x54dcc9=function(_0x28b666){while(--_0x28b666){_0x326723['push'](_0x326723['shift']());}};_0x54dcc9(++_0x42580d);}(_0x5079,0x174));var _0x9507=function(_0x38c699,_0x56fea7){_0x38c699=_0x38c699-0x0;var _0x3b1ded=_0x5079[_0x38c699];return _0x3b1ded;};'use strict';var _=require(_0x9507('0x0'));var util=require('util');var logger=require(_0x9507('0x1'))(_0x9507('0x2'));var moment=require('moment');var BPromise=require(_0x9507('0x3'));var rp=require(_0x9507('0x4'));var fs=require('fs');var path=require(_0x9507('0x5'));var rimraf=require(_0x9507('0x6'));var config=require('../../config/environment');var attributes=require(_0x9507('0x7'));module[_0x9507('0x8')]=function(_0x5b4098,_0x122f8b){return _0x5b4098[_0x9507('0x9')](_0x9507('0xa'),attributes,{'tableName':'analytics_report_fields','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 76ff2a9..cd7c232 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 _0x7418=['code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7418,0x1d0));var _0x8741=function(_0xb971c1,_0x45b7f7){_0xb971c1=_0xb971c1-0x0;var _0x632f83=_0x7418[_0xb971c1];return _0x632f83;};'use strict';var _=require(_0x8741('0x0'));var util=require(_0x8741('0x1'));var moment=require('moment');var BPromise=require(_0x8741('0x2'));var rs=require(_0x8741('0x3'));var fs=require('fs');var Redis=require(_0x8741('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8741('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x8741('0x6'));var jayson=require(_0x8741('0x7'));var client=jayson[_0x8741('0x8')][_0x8741('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4234b5,_0x88c0a3,_0x3de895){return new BPromise(function(_0x4c36fc,_0x3663ee){return client[_0x8741('0xa')](_0x4234b5,_0x3de895)[_0x8741('0xb')](function(_0x914c74){logger[_0x8741('0xc')](_0x8741('0xd'),_0x88c0a3,_0x8741('0xe'));logger[_0x8741('0xf')](_0x8741('0x10'),_0x88c0a3,_0x8741('0xe'),JSON[_0x8741('0x11')](_0x914c74));if(_0x914c74[_0x8741('0x12')]){if(_0x914c74[_0x8741('0x12')][_0x8741('0x13')]===0x1f4){logger[_0x8741('0x12')]('AnalyticFieldReport,\x20%s,\x20%s',_0x88c0a3,_0x914c74[_0x8741('0x12')]['message']);return _0x3663ee(_0x914c74[_0x8741('0x12')]['message']);}logger[_0x8741('0x12')](_0x8741('0xd'),_0x88c0a3,_0x914c74[_0x8741('0x12')][_0x8741('0x14')]);return _0x4c36fc(_0x914c74[_0x8741('0x12')]['message']);}else{logger[_0x8741('0xc')]('AnalyticFieldReport,\x20%s,\x20%s',_0x88c0a3,'request\x20sent');_0x4c36fc(_0x914c74[_0x8741('0x15')]['message']);}})[_0x8741('0x16')](function(_0x1c8347){logger['error']('AnalyticFieldReport,\x20%s,\x20%s',_0x88c0a3,_0x1c8347);_0x3663ee(_0x1c8347);});});}
\ No newline at end of file
+var _0x0fb3=['lodash','util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch'];(function(_0x4fb0eb,_0x4c273e){var _0x17d2b4=function(_0x290b1c){while(--_0x290b1c){_0x4fb0eb['push'](_0x4fb0eb['shift']());}};_0x17d2b4(++_0x4c273e);}(_0x0fb3,0x1b5));var _0x30fb=function(_0x550b4d,_0x283591){_0x550b4d=_0x550b4d-0x0;var _0x1f73c0=_0x0fb3[_0x550b4d];return _0x1f73c0;};'use strict';var _=require(_0x30fb('0x0'));var util=require(_0x30fb('0x1'));var moment=require(_0x30fb('0x2'));var BPromise=require(_0x30fb('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x30fb('0x4'));var logger=require(_0x30fb('0x5'))(_0x30fb('0x6'));var config=require(_0x30fb('0x7'));var jayson=require(_0x30fb('0x8'));var client=jayson[_0x30fb('0x9')][_0x30fb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xea25f9,_0x482585,_0x465c8d){return new BPromise(function(_0x169b1d,_0x196483){return client[_0x30fb('0xb')](_0xea25f9,_0x465c8d)[_0x30fb('0xc')](function(_0x2110a1){logger[_0x30fb('0xd')](_0x30fb('0xe'),_0x482585,_0x30fb('0xf'));logger[_0x30fb('0x10')](_0x30fb('0x11'),_0x482585,_0x30fb('0xf'),JSON[_0x30fb('0x12')](_0x2110a1));if(_0x2110a1['error']){if(_0x2110a1[_0x30fb('0x13')]['code']===0x1f4){logger[_0x30fb('0x13')](_0x30fb('0xe'),_0x482585,_0x2110a1[_0x30fb('0x13')]['message']);return _0x196483(_0x2110a1[_0x30fb('0x13')][_0x30fb('0x14')]);}logger[_0x30fb('0x13')](_0x30fb('0xe'),_0x482585,_0x2110a1[_0x30fb('0x13')][_0x30fb('0x14')]);return _0x169b1d(_0x2110a1[_0x30fb('0x13')][_0x30fb('0x14')]);}else{logger['info'](_0x30fb('0xe'),_0x482585,_0x30fb('0xf'));_0x169b1d(_0x2110a1[_0x30fb('0x15')]['message']);}})[_0x30fb('0x16')](function(_0xe1b9bb){logger['error'](_0x30fb('0xe'),_0x482585,_0xe1b9bb);_0x196483(_0xe1b9bb);});});}
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js
index fd4d42d..a721b58 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 _0x7217=['put','update','delete','bulkDestroy','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','./analyticFieldReport.controller','get','isAuthenticated','index','/:id','show','post','create','/create_many','bulkCreate','/:id/create_many','addFields'];(function(_0x18bbfb,_0x49a75b){var _0x2ecb96=function(_0x196c50){while(--_0x196c50){_0x18bbfb['push'](_0x18bbfb['shift']());}};_0x2ecb96(++_0x49a75b);}(_0x7217,0x19e));var _0x7721=function(_0x28947d,_0x4cc9c6){_0x28947d=_0x28947d-0x0;var _0x12d2ee=_0x7217[_0x28947d];return _0x12d2ee;};'use strict';var multer=require(_0x7721('0x0'));var util=require('util');var path=require(_0x7721('0x1'));var timeout=require(_0x7721('0x2'));var express=require(_0x7721('0x3'));var router=express[_0x7721('0x4')]();var auth=require(_0x7721('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x7721('0x6'));router[_0x7721('0x7')]('/',auth[_0x7721('0x8')](),controller[_0x7721('0x9')]);router[_0x7721('0x7')](_0x7721('0xa'),auth[_0x7721('0x8')](),controller[_0x7721('0xb')]);router[_0x7721('0xc')]('/',auth[_0x7721('0x8')](),controller[_0x7721('0xd')]);router[_0x7721('0xc')](_0x7721('0xe'),auth[_0x7721('0x8')](),controller[_0x7721('0xf')]);router['post'](_0x7721('0x10'),auth[_0x7721('0x8')](),controller[_0x7721('0x11')]);router[_0x7721('0x12')](_0x7721('0xa'),auth[_0x7721('0x8')](),controller[_0x7721('0x13')]);router[_0x7721('0x14')]('/destroy_many',auth[_0x7721('0x8')](),controller[_0x7721('0x15')]);router['delete'](_0x7721('0xa'),auth[_0x7721('0x8')](),controller[_0x7721('0x16')]);module[_0x7721('0x17')]=router;
\ No newline at end of file
+var _0xe14b=['addFields','update','delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','express','Router','../../components/interaction/service','get','isAuthenticated','index','/:id','show','post','/create_many','bulkCreate'];(function(_0x505bd4,_0x4eaf7c){var _0x416478=function(_0x2e0b21){while(--_0x2e0b21){_0x505bd4['push'](_0x505bd4['shift']());}};_0x416478(++_0x4eaf7c);}(_0xe14b,0x93));var _0xbe14=function(_0x44e302,_0x573ee6){_0x44e302=_0x44e302-0x0;var _0x26d46d=_0xe14b[_0x44e302];return _0x26d46d;};'use strict';var multer=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xbe14('0x2'));var router=express[_0xbe14('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xbe14('0x4'));var config=require('../../config/environment');var controller=require('./analyticFieldReport.controller');router[_0xbe14('0x5')]('/',auth[_0xbe14('0x6')](),controller[_0xbe14('0x7')]);router[_0xbe14('0x5')](_0xbe14('0x8'),auth[_0xbe14('0x6')](),controller[_0xbe14('0x9')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0xbe14('0xa')](_0xbe14('0xb'),auth[_0xbe14('0x6')](),controller[_0xbe14('0xc')]);router['post']('/:id/create_many',auth[_0xbe14('0x6')](),controller[_0xbe14('0xd')]);router['put'](_0xbe14('0x8'),auth[_0xbe14('0x6')](),controller[_0xbe14('0xe')]);router[_0xbe14('0xf')](_0xbe14('0x10'),auth[_0xbe14('0x6')](),controller[_0xbe14('0x11')]);router[_0xbe14('0xf')](_0xbe14('0x8'),auth[_0xbe14('0x6')](),controller[_0xbe14('0x12')]);module[_0xbe14('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.attributes.js b/server/api/analyticMetric/analyticMetric.attributes.js
index 32767e1..edb6496 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 _0xf9b6=['exports','STRING'];(function(_0x1c9bbb,_0x216840){var _0x756a92=function(_0x478f5d){while(--_0x478f5d){_0x1c9bbb['push'](_0x1c9bbb['shift']());}};_0x756a92(++_0x216840);}(_0xf9b6,0x114));var _0x6f9b=function(_0x558eb1,_0x502908){_0x558eb1=_0x558eb1-0x0;var _0x2f0b9e=_0xf9b6[_0x558eb1];return _0x2f0b9e;};'use strict';var Sequelize=require('sequelize');module[_0x6f9b('0x0')]={'name':{'type':Sequelize[_0x6f9b('0x1')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0x6f9b('0x1')]},'metric':{'type':Sequelize['TEXT']},'description':{'type':Sequelize[_0x6f9b('0x1')]}};
\ No newline at end of file
+var _0x9861=['STRING','TEXT','sequelize','name'];(function(_0x5b91ee,_0x3ba2f0){var _0x1e5e7d=function(_0xce3742){while(--_0xce3742){_0x5b91ee['push'](_0x5b91ee['shift']());}};_0x1e5e7d(++_0x3ba2f0);}(_0x9861,0x176));var _0x1986=function(_0x3fd515,_0x1eb68f){_0x3fd515=_0x3fd515-0x0;var _0x441a28=_0x9861[_0x3fd515];return _0x441a28;};'use strict';var Sequelize=require(_0x1986('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x1986('0x1')},'table':{'type':Sequelize[_0x1986('0x2')]},'metric':{'type':Sequelize[_0x1986('0x3')]},'description':{'type':Sequelize[_0x1986('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js
index 1523957..a1377b5 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 _0x3b74=['reject','save','update','then','get','Metrics','UserProfileResource','destroy','stack','name','send','index','map','AnalyticMetric','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','filters','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','params','rawAttributes','length','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','ejs','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','set','Content-Range','apply'];(function(_0x59180a,_0x2ea113){var _0x5e99f6=function(_0x2682dc){while(--_0x2682dc){_0x59180a['push'](_0x59180a['shift']());}};_0x5e99f6(++_0x2ea113);}(_0x3b74,0x138));var _0x43b7=function(_0x43cd8c,_0x53b715){_0x43cd8c=_0x43cd8c-0x0;var _0x4f879e=_0x3b74[_0x43cd8c];return _0x4f879e;};'use strict';var pdf=require(_0x43b7('0x0'));var emlformat=require(_0x43b7('0x1'));var rimraf=require(_0x43b7('0x2'));var zipdir=require(_0x43b7('0x3'));var jsonpatch=require(_0x43b7('0x4'));var rp=require(_0x43b7('0x5'));var moment=require(_0x43b7('0x6'));var BPromise=require(_0x43b7('0x7'));var Mustache=require('mustache');var util=require('util');var path=require(_0x43b7('0x8'));var sox=require(_0x43b7('0x9'));var csv=require('to-csv');var ejs=require(_0x43b7('0xa'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x43b7('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x43b7('0xc'));var toCsv=require(_0x43b7('0xd'));var querystring=require(_0x43b7('0xe'));var Papa=require('papaparse');var Redis=require(_0x43b7('0xf'));var authService=require(_0x43b7('0x10'));var qs=require(_0x43b7('0x11'));var as=require(_0x43b7('0x12'));var hardwareService=require(_0x43b7('0x13'));var logger=require(_0x43b7('0x14'))('api');var utils=require(_0x43b7('0x15'));var config=require(_0x43b7('0x16'));var db=require(_0x43b7('0x17'))['db'];function respondWithStatusCode(_0xab7b15,_0x38dbc6){_0x38dbc6=_0x38dbc6||0xcc;return function(_0x42988d){if(_0x42988d){return _0xab7b15[_0x43b7('0x18')](_0x38dbc6);}return _0xab7b15[_0x43b7('0x19')](_0x38dbc6)[_0x43b7('0x1a')]();};}function respondWithResult(_0x490afc,_0x3c3775){_0x3c3775=_0x3c3775||0xc8;return function(_0x3cdf3c){if(_0x3cdf3c){return _0x490afc[_0x43b7('0x19')](_0x3c3775)[_0x43b7('0x1b')](_0x3cdf3c);}};}function respondWithFilteredResult(_0x2ca631,_0x38e034){return function(_0xcd2c88){if(_0xcd2c88){var _0x1261d6=_0xcd2c88['count'],_0x939c47=_0x38e034['offset'],_0x267f7c=_0x38e034[_0x43b7('0x1c')]+_0x38e034['limit'],_0xf24f92;if(_0x267f7c>=_0x1261d6){_0x267f7c=_0x1261d6;_0xf24f92=0xc8;}else{_0xf24f92=0xce;}_0x2ca631[_0x43b7('0x19')](_0xf24f92);return _0x2ca631[_0x43b7('0x1d')](_0x43b7('0x1e'),_0x939c47+'-'+_0x267f7c+'/'+_0x1261d6)['json'](_0xcd2c88);}return null;};}function patchUpdates(_0x5b21bf){return function(_0x224fbd){try{jsonpatch[_0x43b7('0x1f')](_0x224fbd,_0x5b21bf,!![]);}catch(_0x504d79){return BPromise[_0x43b7('0x20')](_0x504d79);}return _0x224fbd[_0x43b7('0x21')]();};}function saveUpdates(_0x472b95,_0x192f2b){return function(_0x28b31d){if(_0x28b31d){return _0x28b31d[_0x43b7('0x22')](_0x472b95)['then'](function(_0x51f06e){return _0x51f06e;});}return null;};}function removeEntity(_0x36aaff,_0x2dea87){return function(_0x322315){if(_0x322315){return _0x322315['destroy']()[_0x43b7('0x23')](function(){var _0x3fe5cf=_0x322315[_0x43b7('0x24')]({'plain':!![]});var _0x281af2=_0x43b7('0x25');return db[_0x43b7('0x26')][_0x43b7('0x27')]({'where':{'type':_0x281af2,'resourceId':_0x3fe5cf['id']}})[_0x43b7('0x23')](function(){return _0x322315;});})[_0x43b7('0x23')](function(){_0x36aaff[_0x43b7('0x19')](0xcc)[_0x43b7('0x1a')]();});}};}function handleEntityNotFound(_0x2cfeca,_0x51b4b4){return function(_0x13bf4b){if(!_0x13bf4b){_0x2cfeca[_0x43b7('0x18')](0x194);}return _0x13bf4b;};}function handleError(_0x4156df,_0xdcb5a5){_0xdcb5a5=_0xdcb5a5||0x1f4;return function(_0x5af624){logger['error'](_0x5af624[_0x43b7('0x28')]);if(_0x5af624[_0x43b7('0x29')]){delete _0x5af624['name'];}_0x4156df[_0x43b7('0x19')](_0xdcb5a5)[_0x43b7('0x2a')](_0x5af624);};}exports[_0x43b7('0x2b')]=function(_0x218075,_0x38dcfd){var _0x1d8458={},_0x50d9f2={},_0x79d073={'count':0x0,'rows':[]};var _0x82bfe1=_[_0x43b7('0x2c')](db[_0x43b7('0x2d')]['rawAttributes'],function(_0x587dba){return{'name':_0x587dba[_0x43b7('0x2e')],'type':_0x587dba[_0x43b7('0x2f')][_0x43b7('0x30')]};});_0x50d9f2[_0x43b7('0x31')]=_[_0x43b7('0x2c')](_0x82bfe1,_0x43b7('0x29'));_0x50d9f2[_0x43b7('0x32')]=_[_0x43b7('0x33')](_0x218075[_0x43b7('0x32')]);_0x50d9f2['filters']=_[_0x43b7('0x34')](_0x50d9f2[_0x43b7('0x31')],_0x50d9f2[_0x43b7('0x32')]);_0x1d8458[_0x43b7('0x35')]=_['intersection'](_0x50d9f2['model'],qs[_0x43b7('0x36')](_0x218075[_0x43b7('0x32')][_0x43b7('0x36')]));_0x1d8458[_0x43b7('0x35')]=_0x1d8458[_0x43b7('0x35')]['length']?_0x1d8458[_0x43b7('0x35')]:_0x50d9f2[_0x43b7('0x31')];if(!_0x218075['query'][_0x43b7('0x37')](_0x43b7('0x38'))){_0x1d8458[_0x43b7('0x39')]=qs[_0x43b7('0x39')](_0x218075[_0x43b7('0x32')]['limit']);_0x1d8458[_0x43b7('0x1c')]=qs[_0x43b7('0x1c')](_0x218075['query'][_0x43b7('0x1c')]);}_0x1d8458[_0x43b7('0x3a')]=qs[_0x43b7('0x3b')](_0x218075[_0x43b7('0x32')][_0x43b7('0x3b')]);_0x1d8458[_0x43b7('0x3c')]=qs['filters'](_['pick'](_0x218075[_0x43b7('0x32')],_0x50d9f2[_0x43b7('0x3d')]));if(_0x218075[_0x43b7('0x32')][_0x43b7('0x3e')]){_0x1d8458[_0x43b7('0x3c')]=_[_0x43b7('0x3f')](_0x1d8458[_0x43b7('0x3c')],{'$or':_[_0x43b7('0x2c')](_0x82bfe1,function(_0x342b4){if(_0x342b4[_0x43b7('0x2f')]!==_0x43b7('0x40')){var _0xef44c8={};_0xef44c8[_0x342b4[_0x43b7('0x29')]]={'$like':'%'+_0x218075[_0x43b7('0x32')][_0x43b7('0x3e')]+'%'};return _0xef44c8;}})});}_0x1d8458=_[_0x43b7('0x3f')]({},_0x1d8458,_0x218075[_0x43b7('0x41')]);var _0x154d6e={'where':_0x1d8458[_0x43b7('0x3c')]};return db[_0x43b7('0x2d')][_0x43b7('0x42')](_0x154d6e)[_0x43b7('0x23')](function(_0x1e96a0){_0x79d073[_0x43b7('0x42')]=_0x1e96a0;if(_0x218075[_0x43b7('0x32')][_0x43b7('0x43')]){_0x1d8458[_0x43b7('0x44')]=[{'all':!![]}];}return db[_0x43b7('0x2d')][_0x43b7('0x45')](_0x1d8458);})['then'](function(_0x458806){_0x79d073[_0x43b7('0x46')]=_0x458806;return _0x79d073;})[_0x43b7('0x23')](respondWithFilteredResult(_0x38dcfd,_0x1d8458))[_0x43b7('0x47')](handleError(_0x38dcfd,null));};exports['show']=function(_0x4f35e8,_0x5ef1ab){var _0x12f419={'raw':!![],'where':{'id':_0x4f35e8[_0x43b7('0x48')]['id']}},_0x52d655={};_0x52d655[_0x43b7('0x31')]=_[_0x43b7('0x33')](db[_0x43b7('0x2d')][_0x43b7('0x49')]);_0x52d655['query']=_['keys'](_0x4f35e8[_0x43b7('0x32')]);_0x52d655[_0x43b7('0x3d')]=_[_0x43b7('0x34')](_0x52d655[_0x43b7('0x31')],_0x52d655['query']);_0x12f419[_0x43b7('0x35')]=_[_0x43b7('0x34')](_0x52d655[_0x43b7('0x31')],qs['fields'](_0x4f35e8['query']['fields']));_0x12f419[_0x43b7('0x35')]=_0x12f419[_0x43b7('0x35')][_0x43b7('0x4a')]?_0x12f419['attributes']:_0x52d655['model'];if(_0x4f35e8[_0x43b7('0x32')][_0x43b7('0x43')]){_0x12f419[_0x43b7('0x44')]=[{'all':!![]}];}_0x12f419=_[_0x43b7('0x3f')]({},_0x12f419,_0x4f35e8[_0x43b7('0x41')]);return db[_0x43b7('0x2d')]['find'](_0x12f419)['then'](handleEntityNotFound(_0x5ef1ab,null))['then'](respondWithResult(_0x5ef1ab,null))['catch'](handleError(_0x5ef1ab,null));};exports[_0x43b7('0x4b')]=function(_0x3d8279,_0x44abf3){return db[_0x43b7('0x2d')][_0x43b7('0x4b')](_0x3d8279[_0x43b7('0x4c')],{})[_0x43b7('0x23')](function(_0x190ac9){var _0xd857d2=_0x3d8279[_0x43b7('0x4d')][_0x43b7('0x24')]({'plain':!![]});if(!_0xd857d2)throw new Error(_0x43b7('0x4e'));if(_0xd857d2[_0x43b7('0x4f')]==='user'){var _0x476108=_0x190ac9[_0x43b7('0x24')]({'plain':!![]});var _0x132b64='Metrics';return db[_0x43b7('0x50')][_0x43b7('0x51')]({'where':{'name':_0x132b64,'userProfileId':_0xd857d2[_0x43b7('0x52')]},'raw':!![]})[_0x43b7('0x23')](function(_0x5e3304){if(_0x5e3304&&_0x5e3304[_0x43b7('0x53')]===0x0){return db[_0x43b7('0x26')][_0x43b7('0x4b')]({'name':_0x476108[_0x43b7('0x29')],'resourceId':_0x476108['id'],'type':_0x5e3304[_0x43b7('0x29')],'sectionId':_0x5e3304['id']},{})[_0x43b7('0x23')](function(){return _0x190ac9;});}else{return _0x190ac9;}})[_0x43b7('0x47')](function(_0x4acf65){logger[_0x43b7('0x54')](_0x43b7('0x55'),_0x4acf65);throw _0x4acf65;});}return _0x190ac9;})['then'](respondWithResult(_0x44abf3,0xc9))[_0x43b7('0x47')](handleError(_0x44abf3,null));};exports['update']=function(_0x57d4cc,_0x571582){if(_0x57d4cc['body']['id']){delete _0x57d4cc[_0x43b7('0x4c')]['id'];}return db[_0x43b7('0x2d')]['find']({'where':{'id':_0x57d4cc[_0x43b7('0x48')]['id']}})['then'](handleEntityNotFound(_0x571582,null))[_0x43b7('0x23')](saveUpdates(_0x57d4cc[_0x43b7('0x4c')],null))[_0x43b7('0x23')](respondWithResult(_0x571582,null))[_0x43b7('0x47')](handleError(_0x571582,null));};exports[_0x43b7('0x27')]=function(_0xc2638f,_0x486191){return db[_0x43b7('0x2d')][_0x43b7('0x51')]({'where':{'id':_0xc2638f['params']['id']}})[_0x43b7('0x23')](handleEntityNotFound(_0x486191,null))[_0x43b7('0x23')](removeEntity(_0x486191,null))[_0x43b7('0x47')](handleError(_0x486191,null));};
\ No newline at end of file
+var _0xa51b=['include','rows','catch','show','keys','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','body','params','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','reject','save','update','destroy','Metrics','UserProfileResource','then','error','stack','name','send','index','AnalyticMetric','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','filter','merge','where','VIRTUAL','options','includeAll'];(function(_0xcd24b0,_0x33bfd2){var _0x548db5=function(_0x1fa761){while(--_0x1fa761){_0xcd24b0['push'](_0xcd24b0['shift']());}};_0x548db5(++_0x33bfd2);}(_0xa51b,0x102));var _0xba51=function(_0x39c34f,_0x29679f){_0x39c34f=_0x39c34f-0x0;var _0x237098=_0xa51b[_0x39c34f];return _0x237098;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xba51('0x0'));var rimraf=require(_0xba51('0x1'));var zipdir=require(_0xba51('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xba51('0x3'));var BPromise=require(_0xba51('0x4'));var Mustache=require(_0xba51('0x5'));var util=require(_0xba51('0x6'));var path=require(_0xba51('0x7'));var sox=require('sox');var csv=require(_0xba51('0x8'));var ejs=require(_0xba51('0x9'));var fs=require('fs');var _=require(_0xba51('0xa'));var squel=require(_0xba51('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xba51('0xc'));var toCsv=require(_0xba51('0x8'));var querystring=require(_0xba51('0xd'));var Papa=require('papaparse');var Redis=require(_0xba51('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xba51('0xf'));var as=require(_0xba51('0x10'));var hardwareService=require(_0xba51('0x11'));var logger=require(_0xba51('0x12'))(_0xba51('0x13'));var utils=require(_0xba51('0x14'));var config=require(_0xba51('0x15'));var db=require(_0xba51('0x16'))['db'];function respondWithStatusCode(_0xf5cb00,_0x218cc0){_0x218cc0=_0x218cc0||0xcc;return function(_0x129255){if(_0x129255){return _0xf5cb00[_0xba51('0x17')](_0x218cc0);}return _0xf5cb00[_0xba51('0x18')](_0x218cc0)[_0xba51('0x19')]();};}function respondWithResult(_0x1f1e1c,_0x10e06d){_0x10e06d=_0x10e06d||0xc8;return function(_0x1625ab){if(_0x1625ab){return _0x1f1e1c[_0xba51('0x18')](_0x10e06d)[_0xba51('0x1a')](_0x1625ab);}};}function respondWithFilteredResult(_0x2462d4,_0x505a69){return function(_0x3387e2){if(_0x3387e2){var _0x3c06bf=_0x3387e2[_0xba51('0x1b')],_0x2cfd28=_0x505a69[_0xba51('0x1c')],_0x19de86=_0x505a69[_0xba51('0x1c')]+_0x505a69['limit'],_0x11906f;if(_0x19de86>=_0x3c06bf){_0x19de86=_0x3c06bf;_0x11906f=0xc8;}else{_0x11906f=0xce;}_0x2462d4[_0xba51('0x18')](_0x11906f);return _0x2462d4[_0xba51('0x1d')]('Content-Range',_0x2cfd28+'-'+_0x19de86+'/'+_0x3c06bf)['json'](_0x3387e2);}return null;};}function patchUpdates(_0x5e2db6){return function(_0x1b13c4){try{jsonpatch['apply'](_0x1b13c4,_0x5e2db6,!![]);}catch(_0x695e03){return BPromise[_0xba51('0x1e')](_0x695e03);}return _0x1b13c4[_0xba51('0x1f')]();};}function saveUpdates(_0x5abf68,_0x161348){return function(_0x3d46e9){if(_0x3d46e9){return _0x3d46e9[_0xba51('0x20')](_0x5abf68)['then'](function(_0x4a9feb){return _0x4a9feb;});}return null;};}function removeEntity(_0x24df61,_0x49e69f){return function(_0x4e478e){if(_0x4e478e){return _0x4e478e[_0xba51('0x21')]()['then'](function(){var _0x107be0=_0x4e478e['get']({'plain':!![]});var _0x406108=_0xba51('0x22');return db[_0xba51('0x23')]['destroy']({'where':{'type':_0x406108,'resourceId':_0x107be0['id']}})[_0xba51('0x24')](function(){return _0x4e478e;});})[_0xba51('0x24')](function(){_0x24df61[_0xba51('0x18')](0xcc)[_0xba51('0x19')]();});}};}function handleEntityNotFound(_0x36285d,_0x25f809){return function(_0x46a15e){if(!_0x46a15e){_0x36285d['sendStatus'](0x194);}return _0x46a15e;};}function handleError(_0x235447,_0x4050c9){_0x4050c9=_0x4050c9||0x1f4;return function(_0x32f3a4){logger[_0xba51('0x25')](_0x32f3a4[_0xba51('0x26')]);if(_0x32f3a4[_0xba51('0x27')]){delete _0x32f3a4[_0xba51('0x27')];}_0x235447[_0xba51('0x18')](_0x4050c9)[_0xba51('0x28')](_0x32f3a4);};}exports[_0xba51('0x29')]=function(_0x18a3e9,_0x4ce3b1){var _0x50520b={},_0x11734f={},_0x1fb103={'count':0x0,'rows':[]};var _0x82b61d=_['map'](db[_0xba51('0x2a')][_0xba51('0x2b')],function(_0x485066){return{'name':_0x485066[_0xba51('0x2c')],'type':_0x485066[_0xba51('0x2d')][_0xba51('0x2e')]};});_0x11734f[_0xba51('0x2f')]=_[_0xba51('0x30')](_0x82b61d,_0xba51('0x27'));_0x11734f[_0xba51('0x31')]=_['keys'](_0x18a3e9['query']);_0x11734f[_0xba51('0x32')]=_[_0xba51('0x33')](_0x11734f[_0xba51('0x2f')],_0x11734f[_0xba51('0x31')]);_0x50520b[_0xba51('0x34')]=_[_0xba51('0x33')](_0x11734f['model'],qs['fields'](_0x18a3e9[_0xba51('0x31')][_0xba51('0x35')]));_0x50520b[_0xba51('0x34')]=_0x50520b[_0xba51('0x34')][_0xba51('0x36')]?_0x50520b[_0xba51('0x34')]:_0x11734f[_0xba51('0x2f')];if(!_0x18a3e9[_0xba51('0x31')][_0xba51('0x37')](_0xba51('0x38'))){_0x50520b[_0xba51('0x39')]=qs[_0xba51('0x39')](_0x18a3e9[_0xba51('0x31')][_0xba51('0x39')]);_0x50520b['offset']=qs['offset'](_0x18a3e9[_0xba51('0x31')][_0xba51('0x1c')]);}_0x50520b[_0xba51('0x3a')]=qs[_0xba51('0x3b')](_0x18a3e9['query'][_0xba51('0x3b')]);_0x50520b['where']=qs['filters'](_['pick'](_0x18a3e9[_0xba51('0x31')],_0x11734f[_0xba51('0x32')]));if(_0x18a3e9[_0xba51('0x31')][_0xba51('0x3c')]){_0x50520b['where']=_[_0xba51('0x3d')](_0x50520b[_0xba51('0x3e')],{'$or':_[_0xba51('0x30')](_0x82b61d,function(_0x155c40){if(_0x155c40[_0xba51('0x2d')]!==_0xba51('0x3f')){var _0x5102ea={};_0x5102ea[_0x155c40[_0xba51('0x27')]]={'$like':'%'+_0x18a3e9[_0xba51('0x31')][_0xba51('0x3c')]+'%'};return _0x5102ea;}})});}_0x50520b=_[_0xba51('0x3d')]({},_0x50520b,_0x18a3e9[_0xba51('0x40')]);var _0x15eccb={'where':_0x50520b[_0xba51('0x3e')]};return db[_0xba51('0x2a')][_0xba51('0x1b')](_0x15eccb)['then'](function(_0x4012d7){_0x1fb103['count']=_0x4012d7;if(_0x18a3e9[_0xba51('0x31')][_0xba51('0x41')]){_0x50520b[_0xba51('0x42')]=[{'all':!![]}];}return db[_0xba51('0x2a')]['findAll'](_0x50520b);})[_0xba51('0x24')](function(_0x525967){_0x1fb103[_0xba51('0x43')]=_0x525967;return _0x1fb103;})[_0xba51('0x24')](respondWithFilteredResult(_0x4ce3b1,_0x50520b))[_0xba51('0x44')](handleError(_0x4ce3b1,null));};exports[_0xba51('0x45')]=function(_0x3a65fd,_0x1dc17c){var _0x3e350b={'raw':!![],'where':{'id':_0x3a65fd['params']['id']}},_0xe6d96b={};_0xe6d96b[_0xba51('0x2f')]=_[_0xba51('0x46')](db[_0xba51('0x2a')][_0xba51('0x2b')]);_0xe6d96b[_0xba51('0x31')]=_[_0xba51('0x46')](_0x3a65fd[_0xba51('0x31')]);_0xe6d96b[_0xba51('0x32')]=_[_0xba51('0x33')](_0xe6d96b[_0xba51('0x2f')],_0xe6d96b[_0xba51('0x31')]);_0x3e350b[_0xba51('0x34')]=_[_0xba51('0x33')](_0xe6d96b[_0xba51('0x2f')],qs['fields'](_0x3a65fd[_0xba51('0x31')][_0xba51('0x35')]));_0x3e350b[_0xba51('0x34')]=_0x3e350b[_0xba51('0x34')][_0xba51('0x36')]?_0x3e350b[_0xba51('0x34')]:_0xe6d96b[_0xba51('0x2f')];if(_0x3a65fd[_0xba51('0x31')][_0xba51('0x41')]){_0x3e350b[_0xba51('0x42')]=[{'all':!![]}];}_0x3e350b=_[_0xba51('0x3d')]({},_0x3e350b,_0x3a65fd['options']);return db[_0xba51('0x2a')][_0xba51('0x47')](_0x3e350b)['then'](handleEntityNotFound(_0x1dc17c,null))['then'](respondWithResult(_0x1dc17c,null))[_0xba51('0x44')](handleError(_0x1dc17c,null));};exports[_0xba51('0x48')]=function(_0x591b4b,_0x5c029d){return db[_0xba51('0x2a')][_0xba51('0x48')](_0x591b4b['body'],{})[_0xba51('0x24')](function(_0x42829c){var _0x388aa4=_0x591b4b[_0xba51('0x49')][_0xba51('0x4a')]({'plain':!![]});if(!_0x388aa4)throw new Error(_0xba51('0x4b'));if(_0x388aa4['role']===_0xba51('0x49')){var _0x17ea3f=_0x42829c[_0xba51('0x4a')]({'plain':!![]});var _0x4b796e='Metrics';return db[_0xba51('0x4c')]['find']({'where':{'name':_0x4b796e,'userProfileId':_0x388aa4[_0xba51('0x4d')]},'raw':!![]})[_0xba51('0x24')](function(_0x11b7a3){if(_0x11b7a3&&_0x11b7a3[_0xba51('0x4e')]===0x0){return db[_0xba51('0x23')][_0xba51('0x48')]({'name':_0x17ea3f[_0xba51('0x27')],'resourceId':_0x17ea3f['id'],'type':_0x11b7a3['name'],'sectionId':_0x11b7a3['id']},{})[_0xba51('0x24')](function(){return _0x42829c;});}else{return _0x42829c;}})[_0xba51('0x44')](function(_0x4d44f5){logger[_0xba51('0x25')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4d44f5);throw _0x4d44f5;});}return _0x42829c;})['then'](respondWithResult(_0x5c029d,0xc9))[_0xba51('0x44')](handleError(_0x5c029d,null));};exports[_0xba51('0x20')]=function(_0x35f528,_0x277b96){if(_0x35f528['body']['id']){delete _0x35f528[_0xba51('0x4f')]['id'];}return db[_0xba51('0x2a')][_0xba51('0x47')]({'where':{'id':_0x35f528[_0xba51('0x50')]['id']}})[_0xba51('0x24')](handleEntityNotFound(_0x277b96,null))[_0xba51('0x24')](saveUpdates(_0x35f528[_0xba51('0x4f')],null))[_0xba51('0x24')](respondWithResult(_0x277b96,null))[_0xba51('0x44')](handleError(_0x277b96,null));};exports[_0xba51('0x21')]=function(_0x37b9ec,_0x6747a3){return db[_0xba51('0x2a')][_0xba51('0x47')]({'where':{'id':_0x37b9ec[_0xba51('0x50')]['id']}})[_0xba51('0x24')](handleEntityNotFound(_0x6747a3,null))['then'](removeEntity(_0x6747a3,null))[_0xba51('0x44')](handleError(_0x6747a3,null));};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js
index 78daee3..0de1cd0 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 _0x4412=['AnalyticMetric','analytics_metrics','lodash','util','api','moment','bluebird','rimraf','../../config/environment','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4412,0x12e));var _0x2441=function(_0xeceeea,_0x3761b1){_0xeceeea=_0xeceeea-0x0;var _0x38b57d=_0x4412[_0xeceeea];return _0x38b57d;};'use strict';var _=require(_0x2441('0x0'));var util=require(_0x2441('0x1'));var logger=require('../../config/logger')(_0x2441('0x2'));var moment=require(_0x2441('0x3'));var BPromise=require(_0x2441('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x2441('0x5'));var config=require(_0x2441('0x6'));var attributes=require('./analyticMetric.attributes');module[_0x2441('0x7')]=function(_0xddc185,_0x5f1016){return _0xddc185['define'](_0x2441('0x8'),attributes,{'tableName':_0x2441('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1e4b=['api','bluebird','request-promise','path','rimraf','../../config/environment','./analyticMetric.attributes','exports','AnalyticMetric','lodash','util'];(function(_0x4cbfc1,_0x212705){var _0x4260f8=function(_0x255cef){while(--_0x255cef){_0x4cbfc1['push'](_0x4cbfc1['shift']());}};_0x4260f8(++_0x212705);}(_0x1e4b,0x82));var _0xb1e4=function(_0x181f8f,_0x2775d6){_0x181f8f=_0x181f8f-0x0;var _0x5b3bea=_0x1e4b[_0x181f8f];return _0x5b3bea;};'use strict';var _=require(_0xb1e4('0x0'));var util=require(_0xb1e4('0x1'));var logger=require('../../config/logger')(_0xb1e4('0x2'));var moment=require('moment');var BPromise=require(_0xb1e4('0x3'));var rp=require(_0xb1e4('0x4'));var fs=require('fs');var path=require(_0xb1e4('0x5'));var rimraf=require(_0xb1e4('0x6'));var config=require(_0xb1e4('0x7'));var attributes=require(_0xb1e4('0x8'));module[_0xb1e4('0x9')]=function(_0x49ed29,_0x1ff3ad){return _0x49ed29['define'](_0xb1e4('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 6484534..286db71 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 _0x2051=['../../config/environment','jayson/promise','client','then','info','request\x20sent','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','AnalyticMetric,\x20%s,\x20%s','message','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x941b21,_0x4446b5){var _0x39d21f=function(_0x58ccac){while(--_0x58ccac){_0x941b21['push'](_0x941b21['shift']());}};_0x39d21f(++_0x4446b5);}(_0x2051,0x198));var _0x1205=function(_0x7ef0da,_0x3778f6){_0x7ef0da=_0x7ef0da-0x0;var _0x2706c7=_0x2051[_0x7ef0da];return _0x2706c7;};'use strict';var _=require('lodash');var util=require(_0x1205('0x0'));var moment=require('moment');var BPromise=require(_0x1205('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1205('0x2'));var db=require(_0x1205('0x3'))['db'];var utils=require(_0x1205('0x4'));var logger=require(_0x1205('0x5'))('rpc');var config=require(_0x1205('0x6'));var jayson=require(_0x1205('0x7'));var client=jayson[_0x1205('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x47a359,_0x1ef04f,_0xff216b){return new BPromise(function(_0x12bc93,_0x3c7d1f){return client['request'](_0x47a359,_0xff216b)[_0x1205('0x9')](function(_0x59bfee){logger[_0x1205('0xa')]('AnalyticMetric,\x20%s,\x20%s',_0x1ef04f,_0x1205('0xb'));logger['debug'](_0x1205('0xc'),_0x1ef04f,'request\x20sent',JSON[_0x1205('0xd')](_0x59bfee));if(_0x59bfee[_0x1205('0xe')]){if(_0x59bfee[_0x1205('0xe')][_0x1205('0xf')]===0x1f4){logger['error'](_0x1205('0x10'),_0x1ef04f,_0x59bfee['error'][_0x1205('0x11')]);return _0x3c7d1f(_0x59bfee[_0x1205('0xe')][_0x1205('0x11')]);}logger['error'](_0x1205('0x10'),_0x1ef04f,_0x59bfee[_0x1205('0xe')][_0x1205('0x11')]);return _0x12bc93(_0x59bfee[_0x1205('0xe')]['message']);}else{logger[_0x1205('0xa')](_0x1205('0x10'),_0x1ef04f,'request\x20sent');_0x12bc93(_0x59bfee['result'][_0x1205('0x11')]);}})['catch'](function(_0x3b2f9f){logger[_0x1205('0xe')](_0x1205('0x10'),_0x1ef04f,_0x3b2f9f);_0x3c7d1f(_0x3b2f9f);});});}
\ No newline at end of file
+var _0xdb10=['stringify','error','code','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s'];(function(_0x3df20b,_0x591d64){var _0x11c63b=function(_0x180845){while(--_0x180845){_0x3df20b['push'](_0x3df20b['shift']());}};_0x11c63b(++_0x591d64);}(_0xdb10,0x164));var _0x0db1=function(_0x59bcb1,_0x5a4b6c){_0x59bcb1=_0x59bcb1-0x0;var _0x4a737f=_0xdb10[_0x59bcb1];return _0x4a737f;};'use strict';var _=require(_0x0db1('0x0'));var util=require(_0x0db1('0x1'));var moment=require(_0x0db1('0x2'));var BPromise=require(_0x0db1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0db1('0x4'))['db'];var utils=require(_0x0db1('0x5'));var logger=require(_0x0db1('0x6'))(_0x0db1('0x7'));var config=require(_0x0db1('0x8'));var jayson=require(_0x0db1('0x9'));var client=jayson[_0x0db1('0xa')][_0x0db1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4e3b67,_0x15111a,_0x2b1024){return new BPromise(function(_0x2e10a0,_0x397425){return client[_0x0db1('0xc')](_0x4e3b67,_0x2b1024)[_0x0db1('0xd')](function(_0x386849){logger[_0x0db1('0xe')](_0x0db1('0xf'),_0x15111a,_0x0db1('0x10'));logger[_0x0db1('0x11')](_0x0db1('0x12'),_0x15111a,_0x0db1('0x10'),JSON[_0x0db1('0x13')](_0x386849));if(_0x386849['error']){if(_0x386849[_0x0db1('0x14')][_0x0db1('0x15')]===0x1f4){logger[_0x0db1('0x14')](_0x0db1('0xf'),_0x15111a,_0x386849['error'][_0x0db1('0x16')]);return _0x397425(_0x386849[_0x0db1('0x14')]['message']);}logger[_0x0db1('0x14')](_0x0db1('0xf'),_0x15111a,_0x386849[_0x0db1('0x14')]['message']);return _0x2e10a0(_0x386849[_0x0db1('0x14')]['message']);}else{logger['info']('AnalyticMetric,\x20%s,\x20%s',_0x15111a,'request\x20sent');_0x2e10a0(_0x386849[_0x0db1('0x17')][_0x0db1('0x16')]);}})[_0x0db1('0x18')](function(_0x391ff2){logger[_0x0db1('0x14')]('AnalyticMetric,\x20%s,\x20%s',_0x15111a,_0x391ff2);_0x397425(_0x391ff2);});});}
\ No newline at end of file
diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js
index c70d1d1..3ac24d3 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 _0xba34=['get','isAuthenticated','index','/:id','show','post','create','put','update','delete','exports','multer','util','path','connect-timeout','express','../../config/environment','./analyticMetric.controller'];(function(_0x50a993,_0x273bf0){var _0x57c27b=function(_0x8f125b){while(--_0x8f125b){_0x50a993['push'](_0x50a993['shift']());}};_0x57c27b(++_0x273bf0);}(_0xba34,0x119));var _0x4ba3=function(_0xc3a8a6,_0x4d0351){_0xc3a8a6=_0xc3a8a6-0x0;var _0x452ad0=_0xba34[_0xc3a8a6];return _0x452ad0;};'use strict';var multer=require(_0x4ba3('0x0'));var util=require(_0x4ba3('0x1'));var path=require(_0x4ba3('0x2'));var timeout=require(_0x4ba3('0x3'));var express=require(_0x4ba3('0x4'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x4ba3('0x5'));var controller=require(_0x4ba3('0x6'));router[_0x4ba3('0x7')]('/',auth[_0x4ba3('0x8')](),controller[_0x4ba3('0x9')]);router[_0x4ba3('0x7')](_0x4ba3('0xa'),auth['isAuthenticated'](),controller[_0x4ba3('0xb')]);router[_0x4ba3('0xc')]('/',auth[_0x4ba3('0x8')](),controller[_0x4ba3('0xd')]);router[_0x4ba3('0xe')](_0x4ba3('0xa'),auth[_0x4ba3('0x8')](),controller[_0x4ba3('0xf')]);router[_0x4ba3('0x10')](_0x4ba3('0xa'),auth[_0x4ba3('0x8')](),controller['destroy']);module[_0x4ba3('0x11')]=router;
\ No newline at end of file
+var _0x2ef3=['post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show'];(function(_0x49fb18,_0x3f22b8){var _0x217172=function(_0x17c866){while(--_0x17c866){_0x49fb18['push'](_0x49fb18['shift']());}};_0x217172(++_0x3f22b8);}(_0x2ef3,0xba));var _0x32ef=function(_0x34fb2b,_0x584763){_0x34fb2b=_0x34fb2b-0x0;var _0x1e8a59=_0x2ef3[_0x34fb2b];return _0x1e8a59;};'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('./analyticMetric.controller');router[_0x32ef('0x8')]('/',auth[_0x32ef('0x9')](),controller['index']);router['get'](_0x32ef('0xa'),auth[_0x32ef('0x9')](),controller[_0x32ef('0xb')]);router[_0x32ef('0xc')]('/',auth[_0x32ef('0x9')](),controller[_0x32ef('0xd')]);router[_0x32ef('0xe')](_0x32ef('0xa'),auth[_0x32ef('0x9')](),controller[_0x32ef('0xf')]);router['delete']('/:id',auth[_0x32ef('0x9')](),controller[_0x32ef('0x10')]);module[_0x32ef('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
index d1a5360..216835a 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 _0xac88=['sequelize','exports','TEXT'];(function(_0x2ae444,_0x5e9881){var _0x4d8790=function(_0x568cbb){while(--_0x568cbb){_0x2ae444['push'](_0x2ae444['shift']());}};_0x4d8790(++_0x5e9881);}(_0xac88,0x6f));var _0x8ac8=function(_0x23e2ea,_0x37f93a){_0x23e2ea=_0x23e2ea-0x0;var _0x1dde0e=_0xac88[_0x23e2ea];return _0x1dde0e;};'use strict';var Sequelize=require(_0x8ac8('0x0'));module[_0x8ac8('0x1')]={'tree':{'type':Sequelize[_0x8ac8('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0x3e31=['sequelize'];(function(_0x297805,_0x1b3d4d){var _0x435776=function(_0x4d0f9f){while(--_0x4d0f9f){_0x297805['push'](_0x297805['shift']());}};_0x435776(++_0x1b3d4d);}(_0x3e31,0x8c));var _0x13e3=function(_0x45eb65,_0x2df6ef){_0x45eb65=_0x45eb65-0x0;var _0x2e707c=_0x3e31[_0x45eb65];return _0x2e707c;};'use strict';var Sequelize=require(_0x13e3('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 daf3151..b1b0ad8 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 _0xdd4f=['intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','count','includeAll','include','findAll','rows','catch','show','params','length','create','body','find','html-pdf','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','offset','limit','set','Content-Range','json','reject','save','update','then','destroy','error','stack','name','send','index','AnalyticTreeReport','rawAttributes','fieldName','type','model','map','query','keys','filters'];(function(_0x423b7c,_0x5e2be9){var _0x5dc248=function(_0x57df45){while(--_0x57df45){_0x423b7c['push'](_0x423b7c['shift']());}};_0x5dc248(++_0x5e2be9);}(_0xdd4f,0x1ce));var _0xfdd4=function(_0x67675b,_0x3769cf){_0x67675b=_0x67675b-0x0;var _0x47c0c4=_0xdd4f[_0x67675b];return _0x47c0c4;};'use strict';var pdf=require(_0xfdd4('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xfdd4('0x1'));var rp=require(_0xfdd4('0x2'));var moment=require('moment');var BPromise=require(_0xfdd4('0x3'));var Mustache=require(_0xfdd4('0x4'));var util=require(_0xfdd4('0x5'));var path=require('path');var sox=require(_0xfdd4('0x6'));var csv=require(_0xfdd4('0x7'));var ejs=require(_0xfdd4('0x8'));var fs=require('fs');var _=require(_0xfdd4('0x9'));var squel=require(_0xfdd4('0xa'));var crypto=require('crypto');var jsforce=require(_0xfdd4('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xfdd4('0x7'));var querystring=require(_0xfdd4('0xc'));var Papa=require(_0xfdd4('0xd'));var Redis=require('ioredis');var authService=require(_0xfdd4('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0xfdd4('0xf'));var hardwareService=require(_0xfdd4('0x10'));var logger=require(_0xfdd4('0x11'))(_0xfdd4('0x12'));var utils=require(_0xfdd4('0x13'));var config=require(_0xfdd4('0x14'));var db=require(_0xfdd4('0x15'))['db'];function respondWithStatusCode(_0x1c71c4,_0x3f07f1){_0x3f07f1=_0x3f07f1||0xcc;return function(_0x4565e6){if(_0x4565e6){return _0x1c71c4[_0xfdd4('0x16')](_0x3f07f1);}return _0x1c71c4['status'](_0x3f07f1)[_0xfdd4('0x17')]();};}function respondWithResult(_0xd7dbf,_0x227099){_0x227099=_0x227099||0xc8;return function(_0x57b21f){if(_0x57b21f){return _0xd7dbf[_0xfdd4('0x18')](_0x227099)['json'](_0x57b21f);}};}function respondWithFilteredResult(_0x467824,_0x42c3a8){return function(_0x2f34ec){if(_0x2f34ec){var _0x431255=_0x2f34ec['count'],_0x37b05f=_0x42c3a8[_0xfdd4('0x19')],_0x52cf2c=_0x42c3a8[_0xfdd4('0x19')]+_0x42c3a8[_0xfdd4('0x1a')],_0x47ed1d;if(_0x52cf2c>=_0x431255){_0x52cf2c=_0x431255;_0x47ed1d=0xc8;}else{_0x47ed1d=0xce;}_0x467824[_0xfdd4('0x18')](_0x47ed1d);return _0x467824[_0xfdd4('0x1b')](_0xfdd4('0x1c'),_0x37b05f+'-'+_0x52cf2c+'/'+_0x431255)[_0xfdd4('0x1d')](_0x2f34ec);}return null;};}function patchUpdates(_0x2ffd5f){return function(_0x32e00d){try{jsonpatch['apply'](_0x32e00d,_0x2ffd5f,!![]);}catch(_0x1e5d91){return BPromise[_0xfdd4('0x1e')](_0x1e5d91);}return _0x32e00d[_0xfdd4('0x1f')]();};}function saveUpdates(_0x36e611,_0x1454f1){return function(_0x29cc8d){if(_0x29cc8d){return _0x29cc8d[_0xfdd4('0x20')](_0x36e611)[_0xfdd4('0x21')](function(_0x523a7d){return _0x523a7d;});}return null;};}function removeEntity(_0x2147e6,_0x17302b){return function(_0x2a24e8){if(_0x2a24e8){return _0x2a24e8[_0xfdd4('0x22')]()[_0xfdd4('0x21')](function(){_0x2147e6[_0xfdd4('0x18')](0xcc)[_0xfdd4('0x17')]();});}};}function handleEntityNotFound(_0x277ec1,_0x538b00){return function(_0x1e14da){if(!_0x1e14da){_0x277ec1[_0xfdd4('0x16')](0x194);}return _0x1e14da;};}function handleError(_0x4397a3,_0x53d35a){_0x53d35a=_0x53d35a||0x1f4;return function(_0x58fe0d){logger[_0xfdd4('0x23')](_0x58fe0d[_0xfdd4('0x24')]);if(_0x58fe0d[_0xfdd4('0x25')]){delete _0x58fe0d[_0xfdd4('0x25')];}_0x4397a3['status'](_0x53d35a)[_0xfdd4('0x26')](_0x58fe0d);};}exports[_0xfdd4('0x27')]=function(_0x3cd2c9,_0x31e053){var _0x3c6728={},_0x192471={},_0x453a48={'count':0x0,'rows':[]};var _0x37b7a2=_['map'](db[_0xfdd4('0x28')][_0xfdd4('0x29')],function(_0x385a68){return{'name':_0x385a68[_0xfdd4('0x2a')],'type':_0x385a68[_0xfdd4('0x2b')]['key']};});_0x192471[_0xfdd4('0x2c')]=_[_0xfdd4('0x2d')](_0x37b7a2,_0xfdd4('0x25'));_0x192471[_0xfdd4('0x2e')]=_[_0xfdd4('0x2f')](_0x3cd2c9['query']);_0x192471[_0xfdd4('0x30')]=_[_0xfdd4('0x31')](_0x192471[_0xfdd4('0x2c')],_0x192471['query']);_0x3c6728[_0xfdd4('0x32')]=_['intersection'](_0x192471[_0xfdd4('0x2c')],qs[_0xfdd4('0x33')](_0x3cd2c9['query']['fields']));_0x3c6728[_0xfdd4('0x32')]=_0x3c6728[_0xfdd4('0x32')]['length']?_0x3c6728['attributes']:_0x192471[_0xfdd4('0x2c')];if(!_0x3cd2c9[_0xfdd4('0x2e')][_0xfdd4('0x34')](_0xfdd4('0x35'))){_0x3c6728[_0xfdd4('0x1a')]=qs[_0xfdd4('0x1a')](_0x3cd2c9[_0xfdd4('0x2e')][_0xfdd4('0x1a')]);_0x3c6728[_0xfdd4('0x19')]=qs[_0xfdd4('0x19')](_0x3cd2c9[_0xfdd4('0x2e')][_0xfdd4('0x19')]);}_0x3c6728[_0xfdd4('0x36')]=qs[_0xfdd4('0x37')](_0x3cd2c9[_0xfdd4('0x2e')][_0xfdd4('0x37')]);_0x3c6728[_0xfdd4('0x38')]=qs[_0xfdd4('0x30')](_[_0xfdd4('0x39')](_0x3cd2c9[_0xfdd4('0x2e')],_0x192471[_0xfdd4('0x30')]));if(_0x3cd2c9[_0xfdd4('0x2e')][_0xfdd4('0x3a')]){_0x3c6728[_0xfdd4('0x38')]=_[_0xfdd4('0x3b')](_0x3c6728[_0xfdd4('0x38')],{'$or':_['map'](_0x37b7a2,function(_0x2b6c87){if(_0x2b6c87[_0xfdd4('0x2b')]!==_0xfdd4('0x3c')){var _0x439389={};_0x439389[_0x2b6c87[_0xfdd4('0x25')]]={'$like':'%'+_0x3cd2c9[_0xfdd4('0x2e')]['filter']+'%'};return _0x439389;}})});}_0x3c6728=_[_0xfdd4('0x3b')]({},_0x3c6728,_0x3cd2c9['options']);var _0xeca9d={'where':_0x3c6728[_0xfdd4('0x38')]};return db[_0xfdd4('0x28')][_0xfdd4('0x3d')](_0xeca9d)['then'](function(_0x1c6f43){_0x453a48[_0xfdd4('0x3d')]=_0x1c6f43;if(_0x3cd2c9[_0xfdd4('0x2e')][_0xfdd4('0x3e')]){_0x3c6728[_0xfdd4('0x3f')]=[{'all':!![]}];}return db[_0xfdd4('0x28')][_0xfdd4('0x40')](_0x3c6728);})[_0xfdd4('0x21')](function(_0xe65944){_0x453a48[_0xfdd4('0x41')]=_0xe65944;return _0x453a48;})['then'](respondWithFilteredResult(_0x31e053,_0x3c6728))[_0xfdd4('0x42')](handleError(_0x31e053,null));};exports[_0xfdd4('0x43')]=function(_0x210a15,_0x67a1e3){var _0x5173db={'raw':!![],'where':{'id':_0x210a15[_0xfdd4('0x44')]['id']}},_0x3e2bda={};_0x3e2bda[_0xfdd4('0x2c')]=_[_0xfdd4('0x2f')](db[_0xfdd4('0x28')]['rawAttributes']);_0x3e2bda[_0xfdd4('0x2e')]=_[_0xfdd4('0x2f')](_0x210a15[_0xfdd4('0x2e')]);_0x3e2bda[_0xfdd4('0x30')]=_[_0xfdd4('0x31')](_0x3e2bda[_0xfdd4('0x2c')],_0x3e2bda[_0xfdd4('0x2e')]);_0x5173db['attributes']=_[_0xfdd4('0x31')](_0x3e2bda['model'],qs[_0xfdd4('0x33')](_0x210a15[_0xfdd4('0x2e')][_0xfdd4('0x33')]));_0x5173db[_0xfdd4('0x32')]=_0x5173db['attributes'][_0xfdd4('0x45')]?_0x5173db[_0xfdd4('0x32')]:_0x3e2bda['model'];if(_0x210a15[_0xfdd4('0x2e')][_0xfdd4('0x3e')]){_0x5173db['include']=[{'all':!![]}];}_0x5173db=_[_0xfdd4('0x3b')]({},_0x5173db,_0x210a15['options']);return db['AnalyticTreeReport']['find'](_0x5173db)[_0xfdd4('0x21')](handleEntityNotFound(_0x67a1e3,null))[_0xfdd4('0x21')](respondWithResult(_0x67a1e3,null))[_0xfdd4('0x42')](handleError(_0x67a1e3,null));};exports['create']=function(_0x393029,_0x169d72){return db['AnalyticTreeReport'][_0xfdd4('0x46')](_0x393029[_0xfdd4('0x47')],{})[_0xfdd4('0x21')](respondWithResult(_0x169d72,0xc9))[_0xfdd4('0x42')](handleError(_0x169d72,null));};exports[_0xfdd4('0x20')]=function(_0x3817fe,_0x2578eb){if(_0x3817fe[_0xfdd4('0x47')]['id']){delete _0x3817fe[_0xfdd4('0x47')]['id'];}return db[_0xfdd4('0x28')][_0xfdd4('0x48')]({'where':{'id':_0x3817fe[_0xfdd4('0x44')]['id']}})[_0xfdd4('0x21')](handleEntityNotFound(_0x2578eb,null))[_0xfdd4('0x21')](saveUpdates(_0x3817fe['body'],null))['then'](respondWithResult(_0x2578eb,null))[_0xfdd4('0x42')](handleError(_0x2578eb,null));};exports[_0xfdd4('0x22')]=function(_0x1296e6,_0x1932ef){return db['AnalyticTreeReport'][_0xfdd4('0x48')]({'where':{'id':_0x1296e6[_0xfdd4('0x44')]['id']}})['then'](handleEntityNotFound(_0x1932ef,null))['then'](removeEntity(_0x1932ef,null))['catch'](handleError(_0x1932ef,null));};
\ No newline at end of file
+var _0x0713=['jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','json','count','offset','limit','status','set','Content-Range','apply','reject','save','then','destroy','error','stack','name','send','index','map','AnalyticTreeReport','rawAttributes','fieldName','type','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','options','findAll','catch','show','params','includeAll','include','find','create','body','update','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto'];(function(_0x3dfea0,_0x434790){var _0x8aa8c6=function(_0x554744){while(--_0x554744){_0x3dfea0['push'](_0x3dfea0['shift']());}};_0x8aa8c6(++_0x434790);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x3071('0x0'));var zipdir=require(_0x3071('0x1'));var jsonpatch=require(_0x3071('0x2'));var rp=require(_0x3071('0x3'));var moment=require(_0x3071('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x3071('0x5'));var util=require(_0x3071('0x6'));var path=require(_0x3071('0x7'));var sox=require(_0x3071('0x8'));var csv=require(_0x3071('0x9'));var ejs=require(_0x3071('0xa'));var fs=require('fs');var _=require(_0x3071('0xb'));var squel=require(_0x3071('0xc'));var crypto=require(_0x3071('0xd'));var jsforce=require(_0x3071('0xe'));var deskjs=require(_0x3071('0xf'));var toCsv=require(_0x3071('0x9'));var querystring=require(_0x3071('0x10'));var Papa=require('papaparse');var Redis=require(_0x3071('0x11'));var authService=require(_0x3071('0x12'));var qs=require(_0x3071('0x13'));var as=require(_0x3071('0x14'));var hardwareService=require(_0x3071('0x15'));var logger=require('../../config/logger')(_0x3071('0x16'));var utils=require(_0x3071('0x17'));var config=require(_0x3071('0x18'));var db=require(_0x3071('0x19'))['db'];function respondWithStatusCode(_0xa0c1,_0x4a8cc7){_0x4a8cc7=_0x4a8cc7||0xcc;return function(_0x5330a8){if(_0x5330a8){return _0xa0c1[_0x3071('0x1a')](_0x4a8cc7);}return _0xa0c1['status'](_0x4a8cc7)[_0x3071('0x1b')]();};}function respondWithResult(_0x44fbae,_0x5d4883){_0x5d4883=_0x5d4883||0xc8;return function(_0x104e73){if(_0x104e73){return _0x44fbae['status'](_0x5d4883)[_0x3071('0x1c')](_0x104e73);}};}function respondWithFilteredResult(_0x45c93b,_0x1271d0){return function(_0x1f14e1){if(_0x1f14e1){var _0x1caa5d=_0x1f14e1[_0x3071('0x1d')],_0x2a6a4b=_0x1271d0[_0x3071('0x1e')],_0x157a47=_0x1271d0['offset']+_0x1271d0[_0x3071('0x1f')],_0x11bdc9;if(_0x157a47>=_0x1caa5d){_0x157a47=_0x1caa5d;_0x11bdc9=0xc8;}else{_0x11bdc9=0xce;}_0x45c93b[_0x3071('0x20')](_0x11bdc9);return _0x45c93b[_0x3071('0x21')](_0x3071('0x22'),_0x2a6a4b+'-'+_0x157a47+'/'+_0x1caa5d)[_0x3071('0x1c')](_0x1f14e1);}return null;};}function patchUpdates(_0x17aee2){return function(_0x105bbb){try{jsonpatch[_0x3071('0x23')](_0x105bbb,_0x17aee2,!![]);}catch(_0x502a16){return BPromise[_0x3071('0x24')](_0x502a16);}return _0x105bbb[_0x3071('0x25')]();};}function saveUpdates(_0xd3e23d,_0x56c267){return function(_0xb8f4e3){if(_0xb8f4e3){return _0xb8f4e3['update'](_0xd3e23d)[_0x3071('0x26')](function(_0x43128c){return _0x43128c;});}return null;};}function removeEntity(_0x3762d8,_0x457b57){return function(_0x33090c){if(_0x33090c){return _0x33090c[_0x3071('0x27')]()[_0x3071('0x26')](function(){_0x3762d8[_0x3071('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x481a51,_0x2ce48a){return function(_0xb05b1d){if(!_0xb05b1d){_0x481a51[_0x3071('0x1a')](0x194);}return _0xb05b1d;};}function handleError(_0x13df9f,_0x2793ef){_0x2793ef=_0x2793ef||0x1f4;return function(_0x44b45f){logger[_0x3071('0x28')](_0x44b45f[_0x3071('0x29')]);if(_0x44b45f[_0x3071('0x2a')]){delete _0x44b45f['name'];}_0x13df9f[_0x3071('0x20')](_0x2793ef)[_0x3071('0x2b')](_0x44b45f);};}exports[_0x3071('0x2c')]=function(_0x4d5c4b,_0x4fb1ca){var _0x28792d={},_0x163604={},_0x950fde={'count':0x0,'rows':[]};var _0x3fa3b8=_[_0x3071('0x2d')](db[_0x3071('0x2e')][_0x3071('0x2f')],function(_0x32f1b4){return{'name':_0x32f1b4[_0x3071('0x30')],'type':_0x32f1b4[_0x3071('0x31')]['key']};});_0x163604['model']=_[_0x3071('0x2d')](_0x3fa3b8,_0x3071('0x2a'));_0x163604[_0x3071('0x32')]=_[_0x3071('0x33')](_0x4d5c4b[_0x3071('0x32')]);_0x163604[_0x3071('0x34')]=_[_0x3071('0x35')](_0x163604[_0x3071('0x36')],_0x163604['query']);_0x28792d['attributes']=_['intersection'](_0x163604[_0x3071('0x36')],qs[_0x3071('0x37')](_0x4d5c4b['query'][_0x3071('0x37')]));_0x28792d[_0x3071('0x38')]=_0x28792d[_0x3071('0x38')][_0x3071('0x39')]?_0x28792d['attributes']:_0x163604[_0x3071('0x36')];if(!_0x4d5c4b[_0x3071('0x32')][_0x3071('0x3a')](_0x3071('0x3b'))){_0x28792d[_0x3071('0x1f')]=qs[_0x3071('0x1f')](_0x4d5c4b[_0x3071('0x32')][_0x3071('0x1f')]);_0x28792d['offset']=qs[_0x3071('0x1e')](_0x4d5c4b['query']['offset']);}_0x28792d[_0x3071('0x3c')]=qs[_0x3071('0x3d')](_0x4d5c4b['query'][_0x3071('0x3d')]);_0x28792d[_0x3071('0x3e')]=qs[_0x3071('0x34')](_[_0x3071('0x3f')](_0x4d5c4b[_0x3071('0x32')],_0x163604[_0x3071('0x34')]));if(_0x4d5c4b['query'][_0x3071('0x40')]){_0x28792d[_0x3071('0x3e')]=_['merge'](_0x28792d[_0x3071('0x3e')],{'$or':_['map'](_0x3fa3b8,function(_0x28f855){if(_0x28f855[_0x3071('0x31')]!=='VIRTUAL'){var _0x593c99={};_0x593c99[_0x28f855[_0x3071('0x2a')]]={'$like':'%'+_0x4d5c4b[_0x3071('0x32')][_0x3071('0x40')]+'%'};return _0x593c99;}})});}_0x28792d=_['merge']({},_0x28792d,_0x4d5c4b[_0x3071('0x41')]);var _0x534a77={'where':_0x28792d[_0x3071('0x3e')]};return db['AnalyticTreeReport'][_0x3071('0x1d')](_0x534a77)[_0x3071('0x26')](function(_0x1fcc52){_0x950fde[_0x3071('0x1d')]=_0x1fcc52;if(_0x4d5c4b[_0x3071('0x32')]['includeAll']){_0x28792d['include']=[{'all':!![]}];}return db[_0x3071('0x2e')][_0x3071('0x42')](_0x28792d);})[_0x3071('0x26')](function(_0x1f69a6){_0x950fde['rows']=_0x1f69a6;return _0x950fde;})[_0x3071('0x26')](respondWithFilteredResult(_0x4fb1ca,_0x28792d))[_0x3071('0x43')](handleError(_0x4fb1ca,null));};exports[_0x3071('0x44')]=function(_0x25c29f,_0x277104){var _0xb9a4b8={'raw':!![],'where':{'id':_0x25c29f[_0x3071('0x45')]['id']}},_0x56a9d8={};_0x56a9d8['model']=_['keys'](db['AnalyticTreeReport']['rawAttributes']);_0x56a9d8[_0x3071('0x32')]=_[_0x3071('0x33')](_0x25c29f[_0x3071('0x32')]);_0x56a9d8[_0x3071('0x34')]=_[_0x3071('0x35')](_0x56a9d8[_0x3071('0x36')],_0x56a9d8[_0x3071('0x32')]);_0xb9a4b8[_0x3071('0x38')]=_['intersection'](_0x56a9d8[_0x3071('0x36')],qs[_0x3071('0x37')](_0x25c29f[_0x3071('0x32')][_0x3071('0x37')]));_0xb9a4b8[_0x3071('0x38')]=_0xb9a4b8['attributes']['length']?_0xb9a4b8[_0x3071('0x38')]:_0x56a9d8[_0x3071('0x36')];if(_0x25c29f[_0x3071('0x32')][_0x3071('0x46')]){_0xb9a4b8[_0x3071('0x47')]=[{'all':!![]}];}_0xb9a4b8=_['merge']({},_0xb9a4b8,_0x25c29f[_0x3071('0x41')]);return db['AnalyticTreeReport'][_0x3071('0x48')](_0xb9a4b8)['then'](handleEntityNotFound(_0x277104,null))['then'](respondWithResult(_0x277104,null))[_0x3071('0x43')](handleError(_0x277104,null));};exports['create']=function(_0x1862ea,_0x5a0a69){return db[_0x3071('0x2e')][_0x3071('0x49')](_0x1862ea[_0x3071('0x4a')],{})[_0x3071('0x26')](respondWithResult(_0x5a0a69,0xc9))['catch'](handleError(_0x5a0a69,null));};exports[_0x3071('0x4b')]=function(_0x575c12,_0xd273ec){if(_0x575c12['body']['id']){delete _0x575c12[_0x3071('0x4a')]['id'];}return db[_0x3071('0x2e')]['find']({'where':{'id':_0x575c12[_0x3071('0x45')]['id']}})[_0x3071('0x26')](handleEntityNotFound(_0xd273ec,null))[_0x3071('0x26')](saveUpdates(_0x575c12[_0x3071('0x4a')],null))[_0x3071('0x26')](respondWithResult(_0xd273ec,null))[_0x3071('0x43')](handleError(_0xd273ec,null));};exports[_0x3071('0x27')]=function(_0x577060,_0x2c6e4c){return db[_0x3071('0x2e')][_0x3071('0x48')]({'where':{'id':_0x577060[_0x3071('0x45')]['id']}})['then'](handleEntityNotFound(_0x2c6e4c,null))[_0x3071('0x26')](removeEntity(_0x2c6e4c,null))[_0x3071('0x43')](handleError(_0x2c6e4c,null));};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js
index 7c08433..d9efab2 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 _0x2015=['api','moment','bluebird','request-promise','path','../../config/environment','./analyticTreeReport.attributes','exports','define','AnalyticTreeReport','analytics_report_trees','lodash','util','../../config/logger'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x2015,0x193));var _0x5201=function(_0x7d5ebe,_0x46208b){_0x7d5ebe=_0x7d5ebe-0x0;var _0x477787=_0x2015[_0x7d5ebe];return _0x477787;};'use strict';var _=require(_0x5201('0x0'));var util=require(_0x5201('0x1'));var logger=require(_0x5201('0x2'))(_0x5201('0x3'));var moment=require(_0x5201('0x4'));var BPromise=require(_0x5201('0x5'));var rp=require(_0x5201('0x6'));var fs=require('fs');var path=require(_0x5201('0x7'));var rimraf=require('rimraf');var config=require(_0x5201('0x8'));var attributes=require(_0x5201('0x9'));module[_0x5201('0xa')]=function(_0x10e33b,_0xf013a){return _0x10e33b[_0x5201('0xb')](_0x5201('0xc'),attributes,{'tableName':_0x5201('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6afc=['lodash','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./analyticTreeReport.attributes','define','AnalyticTreeReport','analytics_report_trees'];(function(_0x1b3ef5,_0x130efc){var _0x3078a1=function(_0x1f41ff){while(--_0x1f41ff){_0x1b3ef5['push'](_0x1b3ef5['shift']());}};_0x3078a1(++_0x130efc);}(_0x6afc,0x16b));var _0xc6af=function(_0x39f615,_0xf7942b){_0x39f615=_0x39f615-0x0;var _0x34d59b=_0x6afc[_0x39f615];return _0x34d59b;};'use strict';var _=require(_0xc6af('0x0'));var util=require('util');var logger=require(_0xc6af('0x1'))('api');var moment=require(_0xc6af('0x2'));var BPromise=require(_0xc6af('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc6af('0x4'));var rimraf=require(_0xc6af('0x5'));var config=require(_0xc6af('0x6'));var attributes=require(_0xc6af('0x7'));module['exports']=function(_0x3beacd,_0x2bca8e){return _0x3beacd[_0xc6af('0x8')](_0xc6af('0x9'),attributes,{'tableName':_0xc6af('0xa'),'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 4ea0699..240dba4 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 _0x49ad=['info','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x4095db,_0x287ac6){var _0xc97464=function(_0x2b33c2){while(--_0x2b33c2){_0x4095db['push'](_0x4095db['shift']());}};_0xc97464(++_0x287ac6);}(_0x49ad,0x13e));var _0xd49a=function(_0x586c70,_0x4a8cb3){_0x586c70=_0x586c70-0x0;var _0x26db79=_0x49ad[_0x586c70];return _0x26db79;};'use strict';var _=require(_0xd49a('0x0'));var util=require(_0xd49a('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xd49a('0x2'));var fs=require('fs');var Redis=require(_0xd49a('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xd49a('0x4'));var logger=require(_0xd49a('0x5'))(_0xd49a('0x6'));var config=require(_0xd49a('0x7'));var jayson=require(_0xd49a('0x8'));var client=jayson['client'][_0xd49a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x253c39,_0x20f775,_0x3aca69){return new BPromise(function(_0x2a5020,_0x5f04c2){return client[_0xd49a('0xa')](_0x253c39,_0x3aca69)[_0xd49a('0xb')](function(_0x461a38){logger[_0xd49a('0xc')](_0xd49a('0xd'),_0x20f775,_0xd49a('0xe'));logger[_0xd49a('0xf')](_0xd49a('0x10'),_0x20f775,_0xd49a('0xe'),JSON[_0xd49a('0x11')](_0x461a38));if(_0x461a38[_0xd49a('0x12')]){if(_0x461a38[_0xd49a('0x12')][_0xd49a('0x13')]===0x1f4){logger[_0xd49a('0x12')](_0xd49a('0xd'),_0x20f775,_0x461a38[_0xd49a('0x12')][_0xd49a('0x14')]);return _0x5f04c2(_0x461a38[_0xd49a('0x12')]['message']);}logger['error'](_0xd49a('0xd'),_0x20f775,_0x461a38[_0xd49a('0x12')]['message']);return _0x2a5020(_0x461a38['error']['message']);}else{logger[_0xd49a('0xc')](_0xd49a('0xd'),_0x20f775,_0xd49a('0xe'));_0x2a5020(_0x461a38['result']['message']);}})[_0xd49a('0x15')](function(_0x343d9d){logger[_0xd49a('0x12')](_0xd49a('0xd'),_0x20f775,_0x343d9d);_0x5f04c2(_0x343d9d);});});}
\ No newline at end of file
+var _0xa496=['info','request\x20sent','debug','stringify','error','code','AnalyticTreeReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x338f45,_0x3b28c6){var _0xc327b9=function(_0x510aa1){while(--_0x510aa1){_0x338f45['push'](_0x338f45['shift']());}};_0xc327b9(++_0x3b28c6);}(_0xa496,0x82));var _0x6a49=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa496[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x6a49('0x0'));var util=require(_0x6a49('0x1'));var moment=require(_0x6a49('0x2'));var BPromise=require(_0x6a49('0x3'));var rs=require(_0x6a49('0x4'));var fs=require('fs');var Redis=require(_0x6a49('0x5'));var db=require(_0x6a49('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x6a49('0x7'))('rpc');var config=require(_0x6a49('0x8'));var jayson=require(_0x6a49('0x9'));var client=jayson[_0x6a49('0xa')][_0x6a49('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5ad013,_0x397326,_0x225421){return new BPromise(function(_0x59a8e7,_0x260089){return client[_0x6a49('0xc')](_0x5ad013,_0x225421)[_0x6a49('0xd')](function(_0x278212){logger[_0x6a49('0xe')]('AnalyticTreeReport,\x20%s,\x20%s',_0x397326,_0x6a49('0xf'));logger[_0x6a49('0x10')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x397326,_0x6a49('0xf'),JSON[_0x6a49('0x11')](_0x278212));if(_0x278212[_0x6a49('0x12')]){if(_0x278212[_0x6a49('0x12')][_0x6a49('0x13')]===0x1f4){logger[_0x6a49('0x12')](_0x6a49('0x14'),_0x397326,_0x278212[_0x6a49('0x12')][_0x6a49('0x15')]);return _0x260089(_0x278212[_0x6a49('0x12')][_0x6a49('0x15')]);}logger['error']('AnalyticTreeReport,\x20%s,\x20%s',_0x397326,_0x278212[_0x6a49('0x12')][_0x6a49('0x15')]);return _0x59a8e7(_0x278212[_0x6a49('0x12')][_0x6a49('0x15')]);}else{logger[_0x6a49('0xe')](_0x6a49('0x14'),_0x397326,_0x6a49('0xf'));_0x59a8e7(_0x278212[_0x6a49('0x16')][_0x6a49('0x15')]);}})[_0x6a49('0x17')](function(_0x40c3a5){logger[_0x6a49('0x12')](_0x6a49('0x14'),_0x397326,_0x40c3a5);_0x260089(_0x40c3a5);});});}
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js
index 173a1ea..e587b98 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 _0x55cd=['exports','multer','util','path','connect-timeout','Router','../../components/interaction/service','./analyticTreeReport.controller','isAuthenticated','index','get','show','post','create','put','/:id','delete'];(function(_0x431111,_0x45b645){var _0x1bdcc7=function(_0x2e1fde){while(--_0x2e1fde){_0x431111['push'](_0x431111['shift']());}};_0x1bdcc7(++_0x45b645);}(_0x55cd,0x166));var _0xd55c=function(_0x11b3a6,_0xeb8983){_0x11b3a6=_0x11b3a6-0x0;var _0x322c1d=_0x55cd[_0x11b3a6];return _0x322c1d;};'use strict';var multer=require(_0xd55c('0x0'));var util=require(_0xd55c('0x1'));var path=require(_0xd55c('0x2'));var timeout=require(_0xd55c('0x3'));var express=require('express');var router=express[_0xd55c('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xd55c('0x5'));var config=require('../../config/environment');var controller=require(_0xd55c('0x6'));router['get']('/',auth[_0xd55c('0x7')](),controller[_0xd55c('0x8')]);router[_0xd55c('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xd55c('0xa')]);router[_0xd55c('0xb')]('/',auth[_0xd55c('0x7')](),controller[_0xd55c('0xc')]);router[_0xd55c('0xd')](_0xd55c('0xe'),auth[_0xd55c('0x7')](),controller['update']);router[_0xd55c('0xf')](_0xd55c('0xe'),auth[_0xd55c('0x7')](),controller['destroy']);module[_0xd55c('0x10')]=router;
\ No newline at end of file
+var _0xd6bd=['../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticTreeReport.controller','get','/:id','show','post','isAuthenticated','create','update','delete','destroy','multer','path','express'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xd6bd,0x1cd));var _0xdd6b=function(_0x833c18,_0x3a5613){_0x833c18=_0x833c18-0x0;var _0x2e627=_0xd6bd[_0x833c18];return _0x2e627;};'use strict';var multer=require(_0xdd6b('0x0'));var util=require('util');var path=require(_0xdd6b('0x1'));var timeout=require('connect-timeout');var express=require(_0xdd6b('0x2'));var router=express['Router']();var auth=require(_0xdd6b('0x3'));var interaction=require(_0xdd6b('0x4'));var config=require(_0xdd6b('0x5'));var controller=require(_0xdd6b('0x6'));router[_0xdd6b('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0xdd6b('0x7')](_0xdd6b('0x8'),auth['isAuthenticated'](),controller[_0xdd6b('0x9')]);router[_0xdd6b('0xa')]('/',auth[_0xdd6b('0xb')](),controller[_0xdd6b('0xc')]);router['put']('/:id',auth[_0xdd6b('0xb')](),controller[_0xdd6b('0xd')]);router[_0xdd6b('0xe')](_0xdd6b('0x8'),auth[_0xdd6b('0xb')](),controller[_0xdd6b('0xf')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js
index 82a8728..9305662 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 _0x5789=['STRING','sequelize','exports'];(function(_0x263783,_0x5ec8f3){var _0x379c79=function(_0x31aa52){while(--_0x31aa52){_0x263783['push'](_0x263783['shift']());}};_0x379c79(++_0x5ec8f3);}(_0x5789,0x17e));var _0x9578=function(_0x2a7ab5,_0x4fbbc7){_0x2a7ab5=_0x2a7ab5-0x0;var _0x491da7=_0x5789[_0x2a7ab5];return _0x491da7;};'use strict';var Sequelize=require(_0x9578('0x0'));module[_0x9578('0x1')]={'name':{'type':Sequelize[_0x9578('0x2')]},'basename':{'type':Sequelize[_0x9578('0x2')]},'type':{'type':Sequelize[_0x9578('0x2')]}};
\ No newline at end of file
+var _0x0187=['STRING'];(function(_0x2f870b,_0x2f5c67){var _0x227a43=function(_0x16f970){while(--_0x16f970){_0x2f870b['push'](_0x2f870b['shift']());}};_0x227a43(++_0x2f5c67);}(_0x0187,0x1f3));var _0x7018=function(_0x20e7e3,_0x1529be){_0x20e7e3=_0x20e7e3-0x0;var _0x14b9de=_0x0187[_0x20e7e3];return _0x14b9de;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x7018('0x0')]},'basename':{'type':Sequelize[_0x7018('0x0')]},'type':{'type':Sequelize[_0x7018('0x0')]}};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js
index b593d1d..612e7b6 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 _0x6424=['limit','Content-Range','apply','save','update','then','destroy','sendStatus','stack','name','send','index','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','Attachment','includeAll','include','rows','params','options','find','catch','clone','omit','createdAt','updatedAt','body','create','file','originalname','filename','mimetype','findOne','download','join','server/files/attachments/','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','crypto','desk.js','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','status','end','json','count','offset'];(function(_0xd81cb0,_0x1bf19f){var _0x4d0885=function(_0x294f6b){while(--_0x294f6b){_0xd81cb0['push'](_0xd81cb0['shift']());}};_0x4d0885(++_0x1bf19f);}(_0x6424,0x84));var _0x4642=function(_0x343289,_0x3d00c1){_0x343289=_0x343289-0x0;var _0x3001d9=_0x6424[_0x343289];return _0x3001d9;};'use strict';var pdf=require(_0x4642('0x0'));var emlformat=require(_0x4642('0x1'));var rimraf=require(_0x4642('0x2'));var zipdir=require(_0x4642('0x3'));var jsonpatch=require(_0x4642('0x4'));var rp=require(_0x4642('0x5'));var moment=require(_0x4642('0x6'));var BPromise=require(_0x4642('0x7'));var Mustache=require('mustache');var util=require(_0x4642('0x8'));var path=require('path');var sox=require(_0x4642('0x9'));var csv=require(_0x4642('0xa'));var ejs=require(_0x4642('0xb'));var fs=require('fs');var _=require(_0x4642('0xc'));var squel=require('squel');var crypto=require(_0x4642('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x4642('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x4642('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x4642('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4642('0x11'))(_0x4642('0x12'));var utils=require('../../config/utils');var config=require(_0x4642('0x13'));var db=require(_0x4642('0x14'))['db'];function respondWithStatusCode(_0xb27bfe,_0x202bf8){_0x202bf8=_0x202bf8||0xcc;return function(_0x5f26e8){if(_0x5f26e8){return _0xb27bfe['sendStatus'](_0x202bf8);}return _0xb27bfe[_0x4642('0x15')](_0x202bf8)[_0x4642('0x16')]();};}function respondWithResult(_0x3818c2,_0x5c46e9){_0x5c46e9=_0x5c46e9||0xc8;return function(_0x21c818){if(_0x21c818){return _0x3818c2[_0x4642('0x15')](_0x5c46e9)[_0x4642('0x17')](_0x21c818);}};}function respondWithFilteredResult(_0x139a2a,_0x4406bf){return function(_0x21057e){if(_0x21057e){var _0x4f58f9=_0x21057e[_0x4642('0x18')],_0x2b44b4=_0x4406bf[_0x4642('0x19')],_0x5129b0=_0x4406bf[_0x4642('0x19')]+_0x4406bf[_0x4642('0x1a')],_0x4498ff;if(_0x5129b0>=_0x4f58f9){_0x5129b0=_0x4f58f9;_0x4498ff=0xc8;}else{_0x4498ff=0xce;}_0x139a2a[_0x4642('0x15')](_0x4498ff);return _0x139a2a['set'](_0x4642('0x1b'),_0x2b44b4+'-'+_0x5129b0+'/'+_0x4f58f9)[_0x4642('0x17')](_0x21057e);}return null;};}function patchUpdates(_0x4956cc){return function(_0x1b2414){try{jsonpatch[_0x4642('0x1c')](_0x1b2414,_0x4956cc,!![]);}catch(_0x1083d8){return BPromise['reject'](_0x1083d8);}return _0x1b2414[_0x4642('0x1d')]();};}function saveUpdates(_0x44ecad,_0x663936){return function(_0x4e0e21){if(_0x4e0e21){return _0x4e0e21[_0x4642('0x1e')](_0x44ecad)[_0x4642('0x1f')](function(_0x47e4ce){return _0x47e4ce;});}return null;};}function removeEntity(_0x257b3b,_0x35a8e6){return function(_0xf785a5){if(_0xf785a5){return _0xf785a5[_0x4642('0x20')]()[_0x4642('0x1f')](function(){_0x257b3b['status'](0xcc)[_0x4642('0x16')]();});}};}function handleEntityNotFound(_0x9f76b3,_0x10a541){return function(_0x5434f0){if(!_0x5434f0){_0x9f76b3[_0x4642('0x21')](0x194);}return _0x5434f0;};}function handleError(_0x157d96,_0xd372bd){_0xd372bd=_0xd372bd||0x1f4;return function(_0x1bf54c){logger['error'](_0x1bf54c[_0x4642('0x22')]);if(_0x1bf54c[_0x4642('0x23')]){delete _0x1bf54c[_0x4642('0x23')];}_0x157d96[_0x4642('0x15')](_0xd372bd)[_0x4642('0x24')](_0x1bf54c);};}exports[_0x4642('0x25')]=function(_0x2f2f29,_0x108dd0){var _0x25b127={},_0x7d3cb8={},_0x3b60ae={'count':0x0,'rows':[]};var _0x244f33=_[_0x4642('0x26')](db['Attachment'][_0x4642('0x27')],function(_0x280033){return{'name':_0x280033['fieldName'],'type':_0x280033[_0x4642('0x28')][_0x4642('0x29')]};});_0x7d3cb8[_0x4642('0x2a')]=_[_0x4642('0x26')](_0x244f33,_0x4642('0x23'));_0x7d3cb8[_0x4642('0x2b')]=_[_0x4642('0x2c')](_0x2f2f29[_0x4642('0x2b')]);_0x7d3cb8[_0x4642('0x2d')]=_[_0x4642('0x2e')](_0x7d3cb8[_0x4642('0x2a')],_0x7d3cb8[_0x4642('0x2b')]);_0x25b127[_0x4642('0x2f')]=_['intersection'](_0x7d3cb8['model'],qs[_0x4642('0x30')](_0x2f2f29[_0x4642('0x2b')][_0x4642('0x30')]));_0x25b127['attributes']=_0x25b127[_0x4642('0x2f')][_0x4642('0x31')]?_0x25b127[_0x4642('0x2f')]:_0x7d3cb8['model'];if(!_0x2f2f29[_0x4642('0x2b')][_0x4642('0x32')](_0x4642('0x33'))){_0x25b127[_0x4642('0x1a')]=qs['limit'](_0x2f2f29[_0x4642('0x2b')][_0x4642('0x1a')]);_0x25b127[_0x4642('0x19')]=qs[_0x4642('0x19')](_0x2f2f29['query'][_0x4642('0x19')]);}_0x25b127['order']=qs[_0x4642('0x34')](_0x2f2f29['query'][_0x4642('0x34')]);_0x25b127[_0x4642('0x35')]=qs[_0x4642('0x2d')](_['pick'](_0x2f2f29[_0x4642('0x2b')],_0x7d3cb8[_0x4642('0x2d')]));if(_0x2f2f29[_0x4642('0x2b')][_0x4642('0x36')]){_0x25b127[_0x4642('0x35')]=_[_0x4642('0x37')](_0x25b127['where'],{'$or':_[_0x4642('0x26')](_0x244f33,function(_0x3ca366){if(_0x3ca366[_0x4642('0x28')]!==_0x4642('0x38')){var _0x4909de={};_0x4909de[_0x3ca366[_0x4642('0x23')]]={'$like':'%'+_0x2f2f29[_0x4642('0x2b')][_0x4642('0x36')]+'%'};return _0x4909de;}})});}_0x25b127=_['merge']({},_0x25b127,_0x2f2f29['options']);var _0x5af5e9={'where':_0x25b127[_0x4642('0x35')]};return db[_0x4642('0x39')]['count'](_0x5af5e9)[_0x4642('0x1f')](function(_0x4d65cf){_0x3b60ae[_0x4642('0x18')]=_0x4d65cf;if(_0x2f2f29[_0x4642('0x2b')][_0x4642('0x3a')]){_0x25b127[_0x4642('0x3b')]=[{'all':!![]}];}return db[_0x4642('0x39')]['findAll'](_0x25b127);})['then'](function(_0x5c7628){_0x3b60ae[_0x4642('0x3c')]=_0x5c7628;return _0x3b60ae;})[_0x4642('0x1f')](respondWithFilteredResult(_0x108dd0,_0x25b127))['catch'](handleError(_0x108dd0,null));};exports['show']=function(_0x515961,_0x1ff820){var _0x13b413={'raw':!![],'where':{'id':_0x515961[_0x4642('0x3d')]['id']}},_0x46b2ed={};_0x46b2ed['model']=_[_0x4642('0x2c')](db[_0x4642('0x39')][_0x4642('0x27')]);_0x46b2ed['query']=_[_0x4642('0x2c')](_0x515961[_0x4642('0x2b')]);_0x46b2ed['filters']=_['intersection'](_0x46b2ed[_0x4642('0x2a')],_0x46b2ed[_0x4642('0x2b')]);_0x13b413[_0x4642('0x2f')]=_[_0x4642('0x2e')](_0x46b2ed['model'],qs['fields'](_0x515961[_0x4642('0x2b')]['fields']));_0x13b413[_0x4642('0x2f')]=_0x13b413[_0x4642('0x2f')][_0x4642('0x31')]?_0x13b413[_0x4642('0x2f')]:_0x46b2ed[_0x4642('0x2a')];if(_0x515961['query'][_0x4642('0x3a')]){_0x13b413['include']=[{'all':!![]}];}_0x13b413=_[_0x4642('0x37')]({},_0x13b413,_0x515961[_0x4642('0x3e')]);return db[_0x4642('0x39')][_0x4642('0x3f')](_0x13b413)['then'](handleEntityNotFound(_0x1ff820,null))[_0x4642('0x1f')](respondWithResult(_0x1ff820,null))[_0x4642('0x40')](handleError(_0x1ff820,null));};exports[_0x4642('0x41')]=function(_0x92624e,_0x1ef432){var _0x23f365={'where':{'id':_0x92624e[_0x4642('0x3d')]['id']}},_0x57a5ba={};_0x57a5ba[_0x4642('0x2a')]=_[_0x4642('0x2c')](db[_0x4642('0x39')][_0x4642('0x27')]);_0x23f365[_0x4642('0x2f')]=_[_0x4642('0x2e')](_0x57a5ba[_0x4642('0x2a')],qs[_0x4642('0x30')](_0x92624e[_0x4642('0x2b')][_0x4642('0x30')]));_0x23f365[_0x4642('0x2f')]=_0x23f365['attributes'][_0x4642('0x31')]?_0x23f365['attributes']:_0x57a5ba[_0x4642('0x2a')];if(_0x92624e['query'][_0x4642('0x3a')]){_0x23f365['include']=[{'all':!![]}];}_0x23f365=_[_0x4642('0x37')]({},_0x23f365,_0x92624e['options']);return db[_0x4642('0x39')][_0x4642('0x3f')](_0x23f365)[_0x4642('0x1f')](handleEntityNotFound(_0x1ef432,null))[_0x4642('0x1f')](function(_0x33dcb5){if(_0x33dcb5){var _0x183141=_0x33dcb5['get']({'plain':!![]});_0x183141=qs[_0x4642('0x42')](_0x183141,['id',_0x4642('0x43'),_0x4642('0x44')]);_0x92624e[_0x4642('0x45')]=_[_0x4642('0x42')](_0x92624e[_0x4642('0x45')],['id',_0x4642('0x43'),'updatedAt']);return db['Attachment']['create'](_[_0x4642('0x37')](_0x183141,_0x92624e[_0x4642('0x45')]),{'include':_0x92624e[_0x4642('0x2b')]['includeAll']?[{'all':!![]}]:undefined});}})[_0x4642('0x1f')](respondWithResult(_0x1ef432,0xc9))[_0x4642('0x40')](handleError(_0x1ef432,null));};exports[_0x4642('0x1e')]=function(_0x3b249a,_0x36fdd4){if(_0x3b249a[_0x4642('0x45')]['id']){delete _0x3b249a[_0x4642('0x45')]['id'];}return db[_0x4642('0x39')][_0x4642('0x3f')]({'where':{'id':_0x3b249a[_0x4642('0x3d')]['id']}})[_0x4642('0x1f')](handleEntityNotFound(_0x36fdd4,null))['then'](saveUpdates(_0x3b249a[_0x4642('0x45')],null))[_0x4642('0x1f')](respondWithResult(_0x36fdd4,null))[_0x4642('0x40')](handleError(_0x36fdd4,null));};exports[_0x4642('0x20')]=function(_0x3edc2f,_0x3c390b){return db[_0x4642('0x39')][_0x4642('0x3f')]({'where':{'id':_0x3edc2f[_0x4642('0x3d')]['id']}})['then'](handleEntityNotFound(_0x3c390b,null))[_0x4642('0x1f')](removeEntity(_0x3c390b,null))[_0x4642('0x40')](handleError(_0x3c390b,null));};exports[_0x4642('0x46')]=function(_0x4b1e26,_0x827dc2,_0x53c4cd){_0x4b1e26[_0x4642('0x45')][_0x4642('0x23')]=_0x4b1e26[_0x4642('0x47')][_0x4642('0x48')];_0x4b1e26[_0x4642('0x45')]['basename']=_0x4b1e26['file'][_0x4642('0x49')];_0x4b1e26['body']['type']=_0x4b1e26['file'][_0x4642('0x4a')];return db[_0x4642('0x39')][_0x4642('0x46')](_0x4b1e26[_0x4642('0x45')])['then'](respondWithResult(_0x827dc2,0xc9))['catch'](handleError(_0x827dc2,null));};exports['download']=function(_0x4712db,_0x521f62,_0x1b7e2d){return db['Attachment'][_0x4642('0x4b')]({'where':{'id':_0x4712db[_0x4642('0x3d')]['id']},'raw':!![]})[_0x4642('0x1f')](handleEntityNotFound(_0x521f62,null))[_0x4642('0x1f')](function(_0x42a0b2){if(_0x42a0b2){return _0x521f62[_0x4642('0x4c')](path[_0x4642('0x4d')](config['root'],_0x4642('0x4e'),_0x42a0b2['basename']));}})[_0x4642('0x40')](handleError(_0x521f62,null));};
\ No newline at end of file
+var _0xbae6=['../../config/environment','end','json','count','set','save','destroy','then','status','error','stack','name','send','index','map','Attachment','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','limit','offset','order','sort','pick','filter','where','merge','VIRTUAL','include','findAll','rows','catch','length','includeAll','find','clone','params','options','get','omit','createdAt','updatedAt','body','create','update','file','originalname','basename','filename','download','findOne','join','root','server/files/attachments/','html-pdf','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api'];(function(_0x1f6a6a,_0x406f02){var _0x2b648d=function(_0x461312){while(--_0x461312){_0x1f6a6a['push'](_0x1f6a6a['shift']());}};_0x2b648d(++_0x406f02);}(_0xbae6,0x98));var _0x6bae=function(_0x5712f8,_0x17156b){_0x5712f8=_0x5712f8-0x0;var _0x14a364=_0xbae6[_0x5712f8];return _0x14a364;};'use strict';var pdf=require(_0x6bae('0x0'));var emlformat=require(_0x6bae('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x6bae('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6bae('0x3'));var moment=require(_0x6bae('0x4'));var BPromise=require(_0x6bae('0x5'));var Mustache=require(_0x6bae('0x6'));var util=require(_0x6bae('0x7'));var path=require(_0x6bae('0x8'));var sox=require(_0x6bae('0x9'));var csv=require(_0x6bae('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x6bae('0xb'));var squel=require('squel');var crypto=require(_0x6bae('0xc'));var jsforce=require(_0x6bae('0xd'));var deskjs=require(_0x6bae('0xe'));var toCsv=require(_0x6bae('0xa'));var querystring=require(_0x6bae('0xf'));var Papa=require(_0x6bae('0x10'));var Redis=require(_0x6bae('0x11'));var authService=require(_0x6bae('0x12'));var qs=require(_0x6bae('0x13'));var as=require(_0x6bae('0x14'));var hardwareService=require(_0x6bae('0x15'));var logger=require(_0x6bae('0x16'))(_0x6bae('0x17'));var utils=require('../../config/utils');var config=require(_0x6bae('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x377564,_0x4a35c4){_0x4a35c4=_0x4a35c4||0xcc;return function(_0x4b454d){if(_0x4b454d){return _0x377564['sendStatus'](_0x4a35c4);}return _0x377564['status'](_0x4a35c4)[_0x6bae('0x19')]();};}function respondWithResult(_0x5e61d5,_0x71e75b){_0x71e75b=_0x71e75b||0xc8;return function(_0x5e7162){if(_0x5e7162){return _0x5e61d5['status'](_0x71e75b)[_0x6bae('0x1a')](_0x5e7162);}};}function respondWithFilteredResult(_0x58bcb7,_0x59a60e){return function(_0x3787ac){if(_0x3787ac){var _0x3f17ee=_0x3787ac[_0x6bae('0x1b')],_0x40fa23=_0x59a60e['offset'],_0x49370f=_0x59a60e['offset']+_0x59a60e['limit'],_0x1915c5;if(_0x49370f>=_0x3f17ee){_0x49370f=_0x3f17ee;_0x1915c5=0xc8;}else{_0x1915c5=0xce;}_0x58bcb7['status'](_0x1915c5);return _0x58bcb7[_0x6bae('0x1c')]('Content-Range',_0x40fa23+'-'+_0x49370f+'/'+_0x3f17ee)[_0x6bae('0x1a')](_0x3787ac);}return null;};}function patchUpdates(_0x9f2fa5){return function(_0x1f7497){try{jsonpatch['apply'](_0x1f7497,_0x9f2fa5,!![]);}catch(_0x3dd6f6){return BPromise['reject'](_0x3dd6f6);}return _0x1f7497[_0x6bae('0x1d')]();};}function saveUpdates(_0x17610f,_0x1da588){return function(_0x491cd6){if(_0x491cd6){return _0x491cd6['update'](_0x17610f)['then'](function(_0x3e1ea9){return _0x3e1ea9;});}return null;};}function removeEntity(_0x3edc3b,_0x2a3b66){return function(_0x478285){if(_0x478285){return _0x478285[_0x6bae('0x1e')]()[_0x6bae('0x1f')](function(){_0x3edc3b[_0x6bae('0x20')](0xcc)[_0x6bae('0x19')]();});}};}function handleEntityNotFound(_0x2d0c0e,_0x296053){return function(_0x14d899){if(!_0x14d899){_0x2d0c0e['sendStatus'](0x194);}return _0x14d899;};}function handleError(_0x137355,_0x1520b0){_0x1520b0=_0x1520b0||0x1f4;return function(_0x233031){logger[_0x6bae('0x21')](_0x233031[_0x6bae('0x22')]);if(_0x233031['name']){delete _0x233031[_0x6bae('0x23')];}_0x137355[_0x6bae('0x20')](_0x1520b0)[_0x6bae('0x24')](_0x233031);};}exports[_0x6bae('0x25')]=function(_0x17e35d,_0x43449a){var _0x2d1d2e={},_0x1c832a={},_0x41c21e={'count':0x0,'rows':[]};var _0x2c0907=_[_0x6bae('0x26')](db[_0x6bae('0x27')][_0x6bae('0x28')],function(_0x49e0f9){return{'name':_0x49e0f9[_0x6bae('0x29')],'type':_0x49e0f9[_0x6bae('0x2a')][_0x6bae('0x2b')]};});_0x1c832a['model']=_['map'](_0x2c0907,_0x6bae('0x23'));_0x1c832a[_0x6bae('0x2c')]=_[_0x6bae('0x2d')](_0x17e35d['query']);_0x1c832a[_0x6bae('0x2e')]=_[_0x6bae('0x2f')](_0x1c832a[_0x6bae('0x30')],_0x1c832a[_0x6bae('0x2c')]);_0x2d1d2e[_0x6bae('0x31')]=_[_0x6bae('0x2f')](_0x1c832a[_0x6bae('0x30')],qs[_0x6bae('0x32')](_0x17e35d[_0x6bae('0x2c')][_0x6bae('0x32')]));_0x2d1d2e[_0x6bae('0x31')]=_0x2d1d2e[_0x6bae('0x31')]['length']?_0x2d1d2e[_0x6bae('0x31')]:_0x1c832a[_0x6bae('0x30')];if(!_0x17e35d['query'][_0x6bae('0x33')](_0x6bae('0x34'))){_0x2d1d2e[_0x6bae('0x35')]=qs[_0x6bae('0x35')](_0x17e35d[_0x6bae('0x2c')][_0x6bae('0x35')]);_0x2d1d2e[_0x6bae('0x36')]=qs[_0x6bae('0x36')](_0x17e35d[_0x6bae('0x2c')]['offset']);}_0x2d1d2e[_0x6bae('0x37')]=qs['sort'](_0x17e35d['query'][_0x6bae('0x38')]);_0x2d1d2e['where']=qs[_0x6bae('0x2e')](_[_0x6bae('0x39')](_0x17e35d[_0x6bae('0x2c')],_0x1c832a[_0x6bae('0x2e')]));if(_0x17e35d[_0x6bae('0x2c')][_0x6bae('0x3a')]){_0x2d1d2e[_0x6bae('0x3b')]=_[_0x6bae('0x3c')](_0x2d1d2e[_0x6bae('0x3b')],{'$or':_[_0x6bae('0x26')](_0x2c0907,function(_0x3378ce){if(_0x3378ce[_0x6bae('0x2a')]!==_0x6bae('0x3d')){var _0x1eada0={};_0x1eada0[_0x3378ce['name']]={'$like':'%'+_0x17e35d[_0x6bae('0x2c')][_0x6bae('0x3a')]+'%'};return _0x1eada0;}})});}_0x2d1d2e=_['merge']({},_0x2d1d2e,_0x17e35d['options']);var _0x1deba2={'where':_0x2d1d2e['where']};return db[_0x6bae('0x27')][_0x6bae('0x1b')](_0x1deba2)['then'](function(_0x30a2c3){_0x41c21e[_0x6bae('0x1b')]=_0x30a2c3;if(_0x17e35d[_0x6bae('0x2c')]['includeAll']){_0x2d1d2e[_0x6bae('0x3e')]=[{'all':!![]}];}return db[_0x6bae('0x27')][_0x6bae('0x3f')](_0x2d1d2e);})[_0x6bae('0x1f')](function(_0x5cc309){_0x41c21e[_0x6bae('0x40')]=_0x5cc309;return _0x41c21e;})['then'](respondWithFilteredResult(_0x43449a,_0x2d1d2e))[_0x6bae('0x41')](handleError(_0x43449a,null));};exports['show']=function(_0x27bcc4,_0x20a9a5){var _0x1bd25d={'raw':!![],'where':{'id':_0x27bcc4['params']['id']}},_0x2daf1a={};_0x2daf1a['model']=_[_0x6bae('0x2d')](db[_0x6bae('0x27')][_0x6bae('0x28')]);_0x2daf1a[_0x6bae('0x2c')]=_[_0x6bae('0x2d')](_0x27bcc4[_0x6bae('0x2c')]);_0x2daf1a['filters']=_[_0x6bae('0x2f')](_0x2daf1a[_0x6bae('0x30')],_0x2daf1a[_0x6bae('0x2c')]);_0x1bd25d['attributes']=_['intersection'](_0x2daf1a[_0x6bae('0x30')],qs[_0x6bae('0x32')](_0x27bcc4['query'][_0x6bae('0x32')]));_0x1bd25d['attributes']=_0x1bd25d[_0x6bae('0x31')][_0x6bae('0x42')]?_0x1bd25d[_0x6bae('0x31')]:_0x2daf1a['model'];if(_0x27bcc4[_0x6bae('0x2c')][_0x6bae('0x43')]){_0x1bd25d[_0x6bae('0x3e')]=[{'all':!![]}];}_0x1bd25d=_[_0x6bae('0x3c')]({},_0x1bd25d,_0x27bcc4['options']);return db[_0x6bae('0x27')][_0x6bae('0x44')](_0x1bd25d)['then'](handleEntityNotFound(_0x20a9a5,null))[_0x6bae('0x1f')](respondWithResult(_0x20a9a5,null))[_0x6bae('0x41')](handleError(_0x20a9a5,null));};exports[_0x6bae('0x45')]=function(_0x3e9531,_0x484992){var _0x3512b7={'where':{'id':_0x3e9531[_0x6bae('0x46')]['id']}},_0x521aa8={};_0x521aa8[_0x6bae('0x30')]=_[_0x6bae('0x2d')](db['Attachment']['rawAttributes']);_0x3512b7[_0x6bae('0x31')]=_[_0x6bae('0x2f')](_0x521aa8[_0x6bae('0x30')],qs['fields'](_0x3e9531['query'][_0x6bae('0x32')]));_0x3512b7['attributes']=_0x3512b7['attributes'][_0x6bae('0x42')]?_0x3512b7['attributes']:_0x521aa8['model'];if(_0x3e9531[_0x6bae('0x2c')]['includeAll']){_0x3512b7[_0x6bae('0x3e')]=[{'all':!![]}];}_0x3512b7=_[_0x6bae('0x3c')]({},_0x3512b7,_0x3e9531[_0x6bae('0x47')]);return db[_0x6bae('0x27')][_0x6bae('0x44')](_0x3512b7)['then'](handleEntityNotFound(_0x484992,null))[_0x6bae('0x1f')](function(_0x103c32){if(_0x103c32){var _0x51fe10=_0x103c32[_0x6bae('0x48')]({'plain':!![]});_0x51fe10=qs[_0x6bae('0x49')](_0x51fe10,['id',_0x6bae('0x4a'),_0x6bae('0x4b')]);_0x3e9531[_0x6bae('0x4c')]=_[_0x6bae('0x49')](_0x3e9531['body'],['id',_0x6bae('0x4a'),'updatedAt']);return db[_0x6bae('0x27')][_0x6bae('0x4d')](_[_0x6bae('0x3c')](_0x51fe10,_0x3e9531['body']),{'include':_0x3e9531['query'][_0x6bae('0x43')]?[{'all':!![]}]:undefined});}})[_0x6bae('0x1f')](respondWithResult(_0x484992,0xc9))[_0x6bae('0x41')](handleError(_0x484992,null));};exports[_0x6bae('0x4e')]=function(_0x1e1503,_0x3a27dc){if(_0x1e1503['body']['id']){delete _0x1e1503['body']['id'];}return db[_0x6bae('0x27')]['find']({'where':{'id':_0x1e1503['params']['id']}})[_0x6bae('0x1f')](handleEntityNotFound(_0x3a27dc,null))[_0x6bae('0x1f')](saveUpdates(_0x1e1503[_0x6bae('0x4c')],null))[_0x6bae('0x1f')](respondWithResult(_0x3a27dc,null))['catch'](handleError(_0x3a27dc,null));};exports[_0x6bae('0x1e')]=function(_0x365ef3,_0xf57340){return db[_0x6bae('0x27')][_0x6bae('0x44')]({'where':{'id':_0x365ef3[_0x6bae('0x46')]['id']}})[_0x6bae('0x1f')](handleEntityNotFound(_0xf57340,null))[_0x6bae('0x1f')](removeEntity(_0xf57340,null))[_0x6bae('0x41')](handleError(_0xf57340,null));};exports[_0x6bae('0x4d')]=function(_0x218069,_0x4d2ded,_0x398f60){_0x218069[_0x6bae('0x4c')][_0x6bae('0x23')]=_0x218069[_0x6bae('0x4f')][_0x6bae('0x50')];_0x218069[_0x6bae('0x4c')][_0x6bae('0x51')]=_0x218069['file'][_0x6bae('0x52')];_0x218069['body'][_0x6bae('0x2a')]=_0x218069[_0x6bae('0x4f')]['mimetype'];return db['Attachment'][_0x6bae('0x4d')](_0x218069[_0x6bae('0x4c')])[_0x6bae('0x1f')](respondWithResult(_0x4d2ded,0xc9))['catch'](handleError(_0x4d2ded,null));};exports[_0x6bae('0x53')]=function(_0x4de8b7,_0x19dd3a,_0xf2e346){return db[_0x6bae('0x27')][_0x6bae('0x54')]({'where':{'id':_0x4de8b7[_0x6bae('0x46')]['id']},'raw':!![]})[_0x6bae('0x1f')](handleEntityNotFound(_0x19dd3a,null))['then'](function(_0x54c116){if(_0x54c116){return _0x19dd3a['download'](path[_0x6bae('0x55')](config[_0x6bae('0x56')],_0x6bae('0x57'),_0x54c116[_0x6bae('0x51')]));}})[_0x6bae('0x41')](handleError(_0x19dd3a,null));};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js
index 9b24e54..00c760e 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 _0xfcbb=['rimraf','../../config/environment','define','Attachment','attachments','lodash','util','../../config/logger','bluebird','request-promise','path'];(function(_0x1adc24,_0x3f9658){var _0x5a2958=function(_0x1ff758){while(--_0x1ff758){_0x1adc24['push'](_0x1adc24['shift']());}};_0x5a2958(++_0x3f9658);}(_0xfcbb,0x10d));var _0xbfcb=function(_0x1974f1,_0x43d148){_0x1974f1=_0x1974f1-0x0;var _0x4ca088=_0xfcbb[_0x1974f1];return _0x4ca088;};'use strict';var _=require(_0xbfcb('0x0'));var util=require(_0xbfcb('0x1'));var logger=require(_0xbfcb('0x2'))('api');var moment=require('moment');var BPromise=require(_0xbfcb('0x3'));var rp=require(_0xbfcb('0x4'));var fs=require('fs');var path=require(_0xbfcb('0x5'));var rimraf=require(_0xbfcb('0x6'));var config=require(_0xbfcb('0x7'));var attributes=require('./attachment.attributes');module['exports']=function(_0x32c2aa,_0x4990c){return _0x32c2aa[_0xbfcb('0x8')](_0xbfcb('0x9'),attributes,{'tableName':_0xbfcb('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8357=['path','rimraf','exports','define','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0xe17838,_0x11a9a0){var _0x5a518c=function(_0x542ffb){while(--_0x542ffb){_0xe17838['push'](_0xe17838['shift']());}};_0x5a518c(++_0x11a9a0);}(_0x8357,0x1e4));var _0x7835=function(_0x5e10b4,_0x22590b){_0x5e10b4=_0x5e10b4-0x0;var _0x2c00d3=_0x8357[_0x5e10b4];return _0x2c00d3;};'use strict';var _=require(_0x7835('0x0'));var util=require(_0x7835('0x1'));var logger=require(_0x7835('0x2'))('api');var moment=require(_0x7835('0x3'));var BPromise=require(_0x7835('0x4'));var rp=require(_0x7835('0x5'));var fs=require('fs');var path=require(_0x7835('0x6'));var rimraf=require(_0x7835('0x7'));var config=require('../../config/environment');var attributes=require('./attachment.attributes');module[_0x7835('0x8')]=function(_0x492061,_0x3bd4a8){return _0x492061[_0x7835('0x9')]('Attachment',attributes,{'tableName':'attachments','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 ce2888b..cb848c6 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 _0x5fbc=['body','options','raw','lodash','util','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Attachment,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','CreateAttachment','Attachment'];(function(_0xd1d19a,_0x1933f0){var _0x52a79d=function(_0x5199e2){while(--_0x5199e2){_0xd1d19a['push'](_0xd1d19a['shift']());}};_0x52a79d(++_0x1933f0);}(_0x5fbc,0x85));var _0xc5fb=function(_0xeb8a5,_0x1b0181){_0xeb8a5=_0xeb8a5-0x0;var _0x97059c=_0x5fbc[_0xeb8a5];return _0x97059c;};'use strict';var _=require(_0xc5fb('0x0'));var util=require(_0xc5fb('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc5fb('0x2'));var db=require(_0xc5fb('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xc5fb('0x4'))(_0xc5fb('0x5'));var config=require(_0xc5fb('0x6'));var jayson=require(_0xc5fb('0x7'));var client=jayson['client'][_0xc5fb('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x25b4cb,_0x4e3182,_0xfc7125){return new BPromise(function(_0xb309c4,_0x2caf88){return client[_0xc5fb('0x9')](_0x25b4cb,_0xfc7125)[_0xc5fb('0xa')](function(_0x49cfc9){logger[_0xc5fb('0xb')](_0xc5fb('0xc'),_0x4e3182,_0xc5fb('0xd'));logger[_0xc5fb('0xe')]('Attachment,\x20%s,\x20%s,\x20%s',_0x4e3182,_0xc5fb('0xd'),JSON[_0xc5fb('0xf')](_0x49cfc9));if(_0x49cfc9[_0xc5fb('0x10')]){if(_0x49cfc9[_0xc5fb('0x10')][_0xc5fb('0x11')]===0x1f4){logger[_0xc5fb('0x10')](_0xc5fb('0xc'),_0x4e3182,_0x49cfc9[_0xc5fb('0x10')]['message']);return _0x2caf88(_0x49cfc9[_0xc5fb('0x10')][_0xc5fb('0x12')]);}logger['error'](_0xc5fb('0xc'),_0x4e3182,_0x49cfc9['error'][_0xc5fb('0x12')]);return _0xb309c4(_0x49cfc9[_0xc5fb('0x10')][_0xc5fb('0x12')]);}else{logger[_0xc5fb('0xb')]('Attachment,\x20%s,\x20%s',_0x4e3182,_0xc5fb('0xd'));_0xb309c4(_0x49cfc9[_0xc5fb('0x13')][_0xc5fb('0x12')]);}})[_0xc5fb('0x14')](function(_0x2b7086){logger['error']('Attachment,\x20%s,\x20%s',_0x4e3182,_0x2b7086);_0x2caf88(_0x2b7086);});});}exports[_0xc5fb('0x15')]=function(_0x8415c1){var _0x1b7e18=this;return new Promise(function(_0x55c952,_0x4be12a){return db[_0xc5fb('0x16')]['create'](_0x8415c1[_0xc5fb('0x17')],{'raw':_0x8415c1[_0xc5fb('0x18')]?_0x8415c1['options'][_0xc5fb('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x45de4a){logger['info']('CreateAttachment',_0x8415c1);logger[_0xc5fb('0xe')](_0xc5fb('0x15'),_0x8415c1,JSON[_0xc5fb('0xf')](_0x45de4a));_0x55c952(_0x45de4a);})[_0xc5fb('0x14')](function(_0x13b6ea){logger[_0xc5fb('0x10')]('CreateAttachment',_0x13b6ea[_0xc5fb('0x12')],_0x8415c1);_0x4be12a(_0x1b7e18[_0xc5fb('0x10')](0x1f4,_0x13b6ea[_0xc5fb('0x12')]));});});};
\ No newline at end of file
+var _0xd050=['../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','error','code','Attachment,\x20%s,\x20%s','message','result','catch','Attachment','create','body','options','raw','CreateAttachment','stringify','util','bluebird','randomstring','ioredis','../../config/utils','rpc'];(function(_0x1d8c86,_0x35919a){var _0x47c8a5=function(_0x39346d){while(--_0x39346d){_0x1d8c86['push'](_0x1d8c86['shift']());}};_0x47c8a5(++_0x35919a);}(_0xd050,0x1f2));var _0x0d05=function(_0x1d8770,_0xec94ac){_0x1d8770=_0x1d8770-0x0;var _0x3bc9d6=_0xd050[_0x1d8770];return _0x3bc9d6;};'use strict';var _=require('lodash');var util=require(_0x0d05('0x0'));var moment=require('moment');var BPromise=require(_0x0d05('0x1'));var rs=require(_0x0d05('0x2'));var fs=require('fs');var Redis=require(_0x0d05('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0d05('0x4'));var logger=require('../../config/logger')(_0x0d05('0x5'));var config=require(_0x0d05('0x6'));var jayson=require(_0x0d05('0x7'));var client=jayson['client'][_0x0d05('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4c893c,_0xd8a477,_0x5c5cc8){return new BPromise(function(_0x433fb9,_0x254fdd){return client[_0x0d05('0x9')](_0x4c893c,_0x5c5cc8)[_0x0d05('0xa')](function(_0xff0585){logger[_0x0d05('0xb')]('Attachment,\x20%s,\x20%s',_0xd8a477,_0x0d05('0xc'));logger[_0x0d05('0xd')](_0x0d05('0xe'),_0xd8a477,'request\x20sent',JSON['stringify'](_0xff0585));if(_0xff0585[_0x0d05('0xf')]){if(_0xff0585[_0x0d05('0xf')][_0x0d05('0x10')]===0x1f4){logger[_0x0d05('0xf')](_0x0d05('0x11'),_0xd8a477,_0xff0585[_0x0d05('0xf')][_0x0d05('0x12')]);return _0x254fdd(_0xff0585['error']['message']);}logger[_0x0d05('0xf')](_0x0d05('0x11'),_0xd8a477,_0xff0585[_0x0d05('0xf')][_0x0d05('0x12')]);return _0x433fb9(_0xff0585[_0x0d05('0xf')][_0x0d05('0x12')]);}else{logger[_0x0d05('0xb')](_0x0d05('0x11'),_0xd8a477,_0x0d05('0xc'));_0x433fb9(_0xff0585[_0x0d05('0x13')][_0x0d05('0x12')]);}})[_0x0d05('0x14')](function(_0x240900){logger[_0x0d05('0xf')](_0x0d05('0x11'),_0xd8a477,_0x240900);_0x254fdd(_0x240900);});});}exports['CreateAttachment']=function(_0x4c2737){var _0x3e090f=this;return new Promise(function(_0x291580,_0x96d407){return db[_0x0d05('0x15')][_0x0d05('0x16')](_0x4c2737[_0x0d05('0x17')],{'raw':_0x4c2737[_0x0d05('0x18')]?_0x4c2737[_0x0d05('0x18')][_0x0d05('0x19')]===undefined?!![]:![]:!![]})[_0x0d05('0xa')](function(_0x5be500){logger['info'](_0x0d05('0x1a'),_0x4c2737);logger['debug'](_0x0d05('0x1a'),_0x4c2737,JSON[_0x0d05('0x1b')](_0x5be500));_0x291580(_0x5be500);})['catch'](function(_0x4abdf2){logger['error']('CreateAttachment',_0x4abdf2[_0x0d05('0x12')],_0x4c2737);_0x96d407(_0x3e090f['error'](0x1f4,_0x4abdf2[_0x0d05('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js
index 3b97a2b..7530bfb 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 _0x7f7e=['/:id/download','post','/:id/clone','clone','diskStorage','join','root','%s-%s','now','originalname','replace','single','file','create','put','update','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../config/environment','./attachment.controller','index','get','/:id','isAuthenticated','show'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x7f7e,0xc6));var _0xe7f7=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x7f7e[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0xe7f7('0x0'));var util=require('util');var path=require(_0xe7f7('0x1'));var timeout=require(_0xe7f7('0x2'));var express=require(_0xe7f7('0x3'));var router=express['Router']();var auth=require(_0xe7f7('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xe7f7('0x5'));var controller=require(_0xe7f7('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0xe7f7('0x7')]);router[_0xe7f7('0x8')](_0xe7f7('0x9'),auth[_0xe7f7('0xa')](),controller[_0xe7f7('0xb')]);router['get'](_0xe7f7('0xc'),auth[_0xe7f7('0xa')](),controller['download']);router[_0xe7f7('0xd')](_0xe7f7('0xe'),auth[_0xe7f7('0xa')](),controller[_0xe7f7('0xf')]);var upload=multer({'storage':multer[_0xe7f7('0x10')]({'destination':function(_0x5abafb,_0x44670a,_0x5af23a){_0x5af23a(null,path[_0xe7f7('0x11')](config[_0xe7f7('0x12')],'server/files/attachments/'));},'filename':function(_0x4c9f1e,_0x10bdf5,_0x500f57){_0x500f57(null,util['format'](_0xe7f7('0x13'),Date[_0xe7f7('0x14')](),_0x10bdf5[_0xe7f7('0x15')][_0xe7f7('0x16')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post']('/',upload[_0xe7f7('0x17')](_0xe7f7('0x18')),controller[_0xe7f7('0x19')]);router[_0xe7f7('0x1a')](_0xe7f7('0x9'),auth[_0xe7f7('0xa')](),controller[_0xe7f7('0x1b')]);router['delete'](_0xe7f7('0x9'),auth[_0xe7f7('0xa')](),controller[_0xe7f7('0x1c')]);module[_0xe7f7('0x1d')]=router;
\ No newline at end of file
+var _0x20d6=['isAuthenticated','index','/:id','download','post','/:id/clone','clone','diskStorage','root','server/files/attachments/','format','%s-%s','now','replace','single','file','create','update','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get'];(function(_0x383523,_0x262138){var _0x29c502=function(_0x3e64cd){while(--_0x3e64cd){_0x383523['push'](_0x383523['shift']());}};_0x29c502(++_0x262138);}(_0x20d6,0x1b8));var _0x620d=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x20d6[_0x2dafbe];return _0x58a45a;};'use strict';var multer=require(_0x620d('0x0'));var util=require(_0x620d('0x1'));var path=require(_0x620d('0x2'));var timeout=require(_0x620d('0x3'));var express=require('express');var router=express[_0x620d('0x4')]();var auth=require(_0x620d('0x5'));var interaction=require(_0x620d('0x6'));var config=require(_0x620d('0x7'));var controller=require(_0x620d('0x8'));router[_0x620d('0x9')]('/',auth[_0x620d('0xa')](),controller[_0x620d('0xb')]);router[_0x620d('0x9')](_0x620d('0xc'),auth[_0x620d('0xa')](),controller['show']);router[_0x620d('0x9')]('/:id/download',auth['isAuthenticated'](),controller[_0x620d('0xd')]);router[_0x620d('0xe')](_0x620d('0xf'),auth[_0x620d('0xa')](),controller[_0x620d('0x10')]);var upload=multer({'storage':multer[_0x620d('0x11')]({'destination':function(_0x4812fd,_0x3d8b2b,_0x2df469){_0x2df469(null,path['join'](config[_0x620d('0x12')],_0x620d('0x13')));},'filename':function(_0x253090,_0x20abc7,_0x15f37c){_0x15f37c(null,util[_0x620d('0x14')](_0x620d('0x15'),Date[_0x620d('0x16')](),_0x20abc7['originalname'][_0x620d('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x620d('0xe')]('/',upload[_0x620d('0x18')](_0x620d('0x19')),controller[_0x620d('0x1a')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x620d('0x1b')]);router['delete'](_0x620d('0xc'),auth[_0x620d('0xa')](),controller[_0x620d('0x1c')]);module[_0x620d('0x1d')]=router;
\ No newline at end of file
diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js
index 237f410..d7d21f1 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 _0x9e42=['agent','then','disabled','blocked','blockedAt','blockDuration','minutes','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','clearBlockUser','getLicense','passport','passport-google-oauth20','Strategy','../../mysqldb','../../components/auth/service','signToken','login','authenticate','/login','profile','email','callback','google','use','secret','Setting','findOne','User','map','user'];(function(_0x2b6600,_0x24c497){var _0x912ee2=function(_0x5d6484){while(--_0x5d6484){_0x2b6600['push'](_0x2b6600['shift']());}};_0x912ee2(++_0x24c497);}(_0x9e42,0xdc));var _0x29e4=function(_0x38b2d9,_0x19fd42){_0x38b2d9=_0x38b2d9-0x0;var _0x23a3e1=_0x9e42[_0x38b2d9];return _0x23a3e1;};'use strict';var _=require('lodash');var passport=require(_0x29e4('0x0'));var GoogleStrategy=require(_0x29e4('0x1'))[_0x29e4('0x2')];var moment=require('moment');var db=require(_0x29e4('0x3'))['db'];var config=require('../../config/environment');var signToken=require(_0x29e4('0x4'))[_0x29e4('0x5')];var utils=require('../../config/utils');exports[_0x29e4('0x6')]=passport[_0x29e4('0x7')]('google',{'failureRedirect':_0x29e4('0x8'),'scope':[_0x29e4('0x9'),_0x29e4('0xa')],'session':![]});exports[_0x29e4('0xb')]=passport[_0x29e4('0x7')](_0x29e4('0xc'),{'failureRedirect':'/login','session':![]});passport[_0x29e4('0xd')](new GoogleStrategy({'clientID':config[_0x29e4('0xc')]?config[_0x29e4('0xc')]['clientID']:'id','clientSecret':config[_0x29e4('0xc')]?config[_0x29e4('0xc')]['clientSecret']:_0x29e4('0xe'),'callbackURL':config[_0x29e4('0xc')]?config[_0x29e4('0xc')]['callbackURL']:''},function(_0x36d477,_0x316834,_0x2f7b11,_0x276f0b){var _0x576c21,_0x45f494;return db[_0x29e4('0xf')][_0x29e4('0x10')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts','blockDuration'],'raw':!![]})['then'](function(_0x3a90ab){_0x576c21=_0x3a90ab;return db[_0x29e4('0x11')]['find']({'where':{'email':_[_0x29e4('0x12')](_0x2f7b11['emails'],'value'),'role':{'$or':['admin',_0x29e4('0x13'),_0x29e4('0x14')]}}});})[_0x29e4('0x15')](function(_0x4b2403){_0x45f494=_0x4b2403;if(_0x45f494){if(_0x45f494[_0x29e4('0x16')]){return _0x276f0b('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else if(_0x576c21['blockDuration']>0x0){if(_0x45f494[_0x29e4('0x17')]){if(moment(_0x45f494[_0x29e4('0x18')])['add'](_0x576c21[_0x29e4('0x19')],_0x29e4('0x1a'))>moment()){return _0x276f0b(_0x29e4('0x1b'));}else{return utils[_0x29e4('0x1c')](_0x45f494,0x0,![],null)[_0x29e4('0x15')](function(){return utils['getLicense'](_0x45f494);})['then'](function(){return _0x276f0b(null,_0x45f494);});}}else{return utils[_0x29e4('0x1d')](_0x45f494)[_0x29e4('0x15')](function(){return _0x276f0b(null,_0x45f494);});}}else{return utils[_0x29e4('0x1d')](_0x45f494)['then'](function(){return _0x276f0b(null,_0x45f494);});}}return _0x276f0b(_0x29e4('0x1b'));})['catch'](function(_0x3d5384){_0x276f0b(_0x3d5384);});}));
\ No newline at end of file
+var _0x2d64=['../../config/utils','login','authenticate','google','profile','email','use','secret','callbackURL','Setting','findOne','allowedLoginAttempts','blockDuration','then','User','find','value','admin','user','agent','blockedAt','add','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','moment','../../mysqldb','../../config/environment','../../components/auth/service','signToken'];(function(_0x1c4865,_0x163598){var _0x2a3640=function(_0x16e8d8){while(--_0x16e8d8){_0x1c4865['push'](_0x1c4865['shift']());}};_0x2a3640(++_0x163598);}(_0x2d64,0xc3));var _0x42d6=function(_0xb13c15,_0x2b0fdc){_0xb13c15=_0xb13c15-0x0;var _0x137a83=_0x2d64[_0xb13c15];return _0x137a83;};'use strict';var _=require(_0x42d6('0x0'));var passport=require(_0x42d6('0x1'));var GoogleStrategy=require(_0x42d6('0x2'))[_0x42d6('0x3')];var moment=require(_0x42d6('0x4'));var db=require(_0x42d6('0x5'))['db'];var config=require(_0x42d6('0x6'));var signToken=require(_0x42d6('0x7'))[_0x42d6('0x8')];var utils=require(_0x42d6('0x9'));exports[_0x42d6('0xa')]=passport[_0x42d6('0xb')](_0x42d6('0xc'),{'failureRedirect':'/login','scope':[_0x42d6('0xd'),_0x42d6('0xe')],'session':![]});exports['callback']=passport[_0x42d6('0xb')](_0x42d6('0xc'),{'failureRedirect':'/login','session':![]});passport[_0x42d6('0xf')](new GoogleStrategy({'clientID':config[_0x42d6('0xc')]?config['google']['clientID']:'id','clientSecret':config[_0x42d6('0xc')]?config['google']['clientSecret']:_0x42d6('0x10'),'callbackURL':config['google']?config[_0x42d6('0xc')][_0x42d6('0x11')]:''},function(_0x152d5e,_0x12fef4,_0x17180e,_0x109f5f){var _0x548bbe,_0x517182;return db[_0x42d6('0x12')][_0x42d6('0x13')]({'where':{'id':0x1},'attributes':[_0x42d6('0x14'),_0x42d6('0x15')],'raw':!![]})[_0x42d6('0x16')](function(_0xc09bbf){_0x548bbe=_0xc09bbf;return db[_0x42d6('0x17')][_0x42d6('0x18')]({'where':{'email':_['map'](_0x17180e['emails'],_0x42d6('0x19')),'role':{'$or':[_0x42d6('0x1a'),_0x42d6('0x1b'),_0x42d6('0x1c')]}}});})[_0x42d6('0x16')](function(_0x39cbd1){_0x517182=_0x39cbd1;if(_0x517182){if(_0x517182['disabled']){return _0x109f5f('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else if(_0x548bbe[_0x42d6('0x15')]>0x0){if(_0x517182['blocked']){if(moment(_0x517182[_0x42d6('0x1d')])[_0x42d6('0x1e')](_0x548bbe['blockDuration'],'minutes')>moment()){return _0x109f5f('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{return utils[_0x42d6('0x1f')](_0x517182,0x0,![],null)['then'](function(){return utils['getLicense'](_0x517182);})['then'](function(){return _0x109f5f(null,_0x517182);});}}else{return utils[_0x42d6('0x20')](_0x517182)[_0x42d6('0x16')](function(){return _0x109f5f(null,_0x517182);});}}else{return utils[_0x42d6('0x20')](_0x517182)[_0x42d6('0x16')](function(){return _0x109f5f(null,_0x517182);});}}return _0x109f5f('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');})[_0x42d6('0x21')](function(_0x503ae2){_0x109f5f(_0x503ae2);});}));
\ No newline at end of file
diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js
index 1c61a47..a7d912a 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 _0x073e=['Router','./authGoogle.controller','login','get','/callback','setTokenCookie','exports','express','passport'];(function(_0x52a980,_0x1eb237){var _0x9b52b6=function(_0x2a36e4){while(--_0x2a36e4){_0x52a980['push'](_0x52a980['shift']());}};_0x9b52b6(++_0x1eb237);}(_0x073e,0x181));var _0xe073=function(_0x970a57,_0x469d3c){_0x970a57=_0x970a57-0x0;var _0x42be6a=_0x073e[_0x970a57];return _0x42be6a;};'use strict';var express=require(_0xe073('0x0'));var passport=require(_0xe073('0x1'));var router=express[_0xe073('0x2')]();var controller=require(_0xe073('0x3'));var userController=require('../user/user.controller.js');var authService=require('../../components/auth/service');router['get']('/',controller[_0xe073('0x4')]);router[_0xe073('0x5')](_0xe073('0x6'),controller['callback'],authService['isMiddleware'],userController['login'],authService[_0xe073('0x7')]);module[_0xe073('0x8')]=router;
\ No newline at end of file
+var _0x340c=['Router','./authGoogle.controller','../../components/auth/service','get','login','callback','isMiddleware','setTokenCookie','exports','express','passport'];(function(_0x173b91,_0xe45f81){var _0x346a4b=function(_0x3c369c){while(--_0x3c369c){_0x173b91['push'](_0x173b91['shift']());}};_0x346a4b(++_0xe45f81);}(_0x340c,0xe5));var _0xc340=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x340c[_0x3dd15e];return _0x231fd0;};'use strict';var express=require(_0xc340('0x0'));var passport=require(_0xc340('0x1'));var router=express[_0xc340('0x2')]();var controller=require(_0xc340('0x3'));var userController=require('../user/user.controller.js');var authService=require(_0xc340('0x4'));router[_0xc340('0x5')]('/',controller[_0xc340('0x6')]);router[_0xc340('0x5')]('/callback',controller[_0xc340('0x7')],authService[_0xc340('0x8')],userController[_0xc340('0x6')],authService[_0xc340('0x9')]);module[_0xc340('0xa')]=router;
\ No newline at end of file
diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js
index 4eea7d4..0959bd9 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 _0x8bf8=['message','stringify','status','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~!@#$%^&-_=+[{]}.','login','local','Something\x20went\x20wrong,\x20please\x20try\x20again.','json','online','forgot','Email\x20parameter\x20is\x20missing','generate','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','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','/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','Password\x20reset!','use','util','passport','passport-local','Strategy','jayson/promise','lodash','randomstring','moment','../../mysqldb','../../components/auth/service','../../config/utils','client','findOne','allowedLoginAttempts','blockDuration','name','password','salt','role','blocked','blockedAt','admin','user','agent','then','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','loginAttempts','disabled','add','minutes','clearBlockUser','getLicense','catch','find','email','Smtp','service','host','port','secure','authentication','auth','pass','merge','format','\x22%s\x22\x20<%s>','request','SendMail','error'];(function(_0x2283dc,_0x2fcfc5){var _0x16db90=function(_0x376c35){while(--_0x376c35){_0x2283dc['push'](_0x2283dc['shift']());}};_0x16db90(++_0x2fcfc5);}(_0x8bf8,0x126));var _0x88bf=function(_0x598cf7,_0xe52881){_0x598cf7=_0x598cf7-0x0;var _0x4508d2=_0x8bf8[_0x598cf7];return _0x4508d2;};'use strict';var util=require(_0x88bf('0x0'));var passport=require(_0x88bf('0x1'));var LocalStrategy=require(_0x88bf('0x2'))[_0x88bf('0x3')];var jayson=require(_0x88bf('0x4'));var _=require(_0x88bf('0x5'));var rs=require(_0x88bf('0x6'));var moment=require(_0x88bf('0x7'));var db=require(_0x88bf('0x8'))['db'];var authService=require(_0x88bf('0x9'));var utils=require(_0x88bf('0xa'));var client=jayson[_0x88bf('0xb')]['http']({'port':0x232b});function localAuthenticate(_0x454378,_0x1e5fab,_0x32206a,_0x7ff438){var _0x290779,_0x329195;return db['Setting'][_0x88bf('0xc')]({'where':{'id':0x1},'attributes':[_0x88bf('0xd'),_0x88bf('0xe')],'raw':!![]})['then'](function(_0x2137d5){_0x290779=_0x2137d5;return _0x454378[_0x88bf('0xc')]({'attributes':['id',_0x88bf('0xf'),_0x88bf('0x10'),_0x88bf('0x11'),_0x88bf('0x12'),'disabled',_0x88bf('0x13'),_0x88bf('0x14'),'loginAttempts'],'where':{'name':_0x1e5fab,'role':{'$or':[_0x88bf('0x15'),_0x88bf('0x16'),_0x88bf('0x17')]}}});})[_0x88bf('0x18')](function(_0x20abda){if(!_0x20abda||_0x20abda&&_0x20abda['name']!==_0x1e5fab){throw new Error(_0x88bf('0x19'));}else{_0x329195=_0x20abda;return _0x329195;}})[_0x88bf('0x18')](function(){_0x329195[_0x88bf('0x1a')](_0x32206a,function(_0x5e4c31,_0x38b75c){var _0x52f4f1=_0x329195[_0x88bf('0x1b')]+0x1;if(_0x5e4c31){return _0x7ff438(_0x5e4c31);}else if(!_0x38b75c){if(_0x329195[_0x88bf('0x1c')]){return _0x7ff438(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x290779[_0x88bf('0xd')]>0x0){if(_0x329195[_0x88bf('0x13')]){if(_0x290779[_0x88bf('0xe')]>0x0){if(moment(_0x329195['blockedAt'])[_0x88bf('0x1d')](_0x290779[_0x88bf('0xe')],_0x88bf('0x1e'))>moment()){return _0x7ff438(null,![],{'message':_0x88bf('0x19')});}else{return utils[_0x88bf('0x1f')](_0x329195,_0x52f4f1,![],null)['then'](function(){return _0x7ff438(null,![],{'message':_0x88bf('0x19')});});}}else{return _0x7ff438(null,![],{'message':_0x88bf('0x19')});}}else{if(_0x52f4f1>=_0x290779[_0x88bf('0xd')]){return utils[_0x88bf('0x1f')](_0x329195,0x0,!![],moment())[_0x88bf('0x18')](function(){return _0x7ff438(null,![],{'message':_0x88bf('0x19')});});}else{return utils[_0x88bf('0x1f')](_0x329195,_0x52f4f1,![],null)[_0x88bf('0x18')](function(){return _0x7ff438(null,![],{'message':_0x88bf('0x19')});});}}}else{return _0x7ff438(null,![],{'message':_0x88bf('0x19')});}}else{if(_0x329195[_0x88bf('0x1c')]){return _0x7ff438(null,![],{'message':_0x88bf('0x19')});}else if(_0x290779[_0x88bf('0xd')]>0x0){if(_0x329195['blocked']){if(_0x290779[_0x88bf('0xe')]>0x0){if(moment(_0x329195[_0x88bf('0x14')])[_0x88bf('0x1d')](_0x290779['blockDuration'],_0x88bf('0x1e'))>moment()){return _0x7ff438(null,![],{'message':_0x88bf('0x19')});}else{return utils[_0x88bf('0x1f')](_0x329195,0x0,![],null)[_0x88bf('0x18')](function(){return utils['getLicense'](_0x329195);})[_0x88bf('0x18')](function(){return _0x7ff438(null,_0x329195);});}}else{return _0x7ff438(null,![],{'message':_0x88bf('0x19')});}}else{return utils[_0x88bf('0x1f')](_0x329195,0x0,![],null)[_0x88bf('0x18')](function(){return utils[_0x88bf('0x20')](_0x329195);})[_0x88bf('0x18')](function(){return _0x7ff438(null,_0x329195);})['catch'](function(_0x800cd3){return _0x7ff438(null,![],_0x800cd3);});}}else{if(_0x329195[_0x88bf('0x13')]){return _0x7ff438(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x88bf('0x20')](_0x329195)['then'](function(){return _0x7ff438(null,_0x329195);});}}}});})[_0x88bf('0x21')](function(_0x513a28){return _0x7ff438(null,![],_0x513a28);});}function sendServiceMail(_0x22ae86){return db['MailAccount'][_0x88bf('0x22')]({'where':{'service':!![]},'attributes':['id','name',_0x88bf('0x23')],'include':[{'model':db['MailServerOut'],'as':_0x88bf('0x24')}]})[_0x88bf('0x18')](function(_0x5ee6e6){if(!_0x5ee6e6){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x2622b4={'tls':{'rejectUnauthorized':![]}};if(_0x5ee6e6[_0x88bf('0x24')][_0x88bf('0x25')]){_0x2622b4[_0x88bf('0x25')]=_0x5ee6e6[_0x88bf('0x24')][_0x88bf('0x25')];}else{_0x2622b4[_0x88bf('0x26')]=_0x5ee6e6[_0x88bf('0x24')][_0x88bf('0x26')];_0x2622b4['port']=_0x5ee6e6[_0x88bf('0x24')][_0x88bf('0x27')];_0x2622b4[_0x88bf('0x28')]=_0x5ee6e6['Smtp']['secure'];}if(_0x5ee6e6[_0x88bf('0x24')][_0x88bf('0x29')]){_0x2622b4[_0x88bf('0x2a')]={'user':_0x5ee6e6['Smtp']['user'],'pass':_0x5ee6e6[_0x88bf('0x24')][_0x88bf('0x2b')]};}var _0x1c4cdb={'account':_0x2622b4,'message':_[_0x88bf('0x2c')]({'from':util[_0x88bf('0x2d')](_0x88bf('0x2e'),_0x5ee6e6[_0x88bf('0xf')],_0x5ee6e6[_0x88bf('0x23')]||_0x5ee6e6['Smtp'][_0x88bf('0x16')])},_0x22ae86)};return client[_0x88bf('0x2f')](_0x88bf('0x30'),_0x1c4cdb);})[_0x88bf('0x18')](function(_0x37e291){if(_0x37e291[_0x88bf('0x31')]){throw new Error(util[_0x88bf('0x2d')]('SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!',_0x37e291[_0x88bf('0x31')][_0x88bf('0x32')]||JSON[_0x88bf('0x33')](_0x37e291[_0x88bf('0x31')])));}return!![];});}function handleError(_0x1e8f43,_0x4ee265,_0x49129e){return _0x1e8f43[_0x88bf('0x34')](_0x4ee265||0x1f4)['send']({'message':_0x49129e?_0x49129e[_0x88bf('0x32')]||_0x49129e:''});}function checkPasswordPattern(_0x3c52f6,_0x4eeca8,_0x4c0d8c){if(_0x4c0d8c){var _0x40a245=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x40a245[_0x88bf('0x35')](_0x4eeca8)){return _0x3c52f6;}else{throw new Error(_0x88bf('0x36'));}}else{return _0x3c52f6;}}exports[_0x88bf('0x37')]=function(_0x3e0106,_0x8183c6,_0x2f76f2){passport[_0x88bf('0x1a')](_0x88bf('0x38'),function(_0x3cd466,_0x1a89d1,_0x32f0d5){var _0x226e68=_0x3cd466||_0x32f0d5;if(_0x226e68){return handleError(_0x8183c6,0x191,_0x226e68);}if(!_0x1a89d1){return handleError(_0x8183c6,0x194,{'message':_0x88bf('0x39')});}else{var _0x5dd9d5={'payload':{'id':_0x1a89d1['id'],'role':_0x1a89d1[_0x88bf('0x12')]},'options':{'expiresIn':0x15180}};return authService['signToken'](_0x5dd9d5)[_0x88bf('0x18')](function(_0xf76478){_0x8183c6[_0x88bf('0x3a')]({'id':_0x1a89d1['id'],'token':_0xf76478,'statusCall':'','isAlreadyLogged':_0x1a89d1[_0x88bf('0x3b')]});});}})(_0x3e0106,_0x8183c6,_0x2f76f2);};exports[_0x88bf('0x3c')]=function(_0x501b29,_0x3d0aef,_0x3bf2f8){if(!_0x501b29['body'][_0x88bf('0x23')]){return handleError(_0x3d0aef,0x1f4,{'message':_0x88bf('0x3d')});}var _0x3283c1=rs[_0x88bf('0x3e')]();_0x501b29['body'][_0x88bf('0x23')]=_0x501b29[_0x88bf('0x3f')][_0x88bf('0x23')][_0x88bf('0x40')]()[_0x88bf('0x41')]();var _0x46e548;return db['Setting'][_0x88bf('0xc')]({'where':{'id':0x1},'attributes':[_0x88bf('0xd'),_0x88bf('0xe')],'raw':!![]})['then'](function(_0x6fe146){_0x46e548=_0x6fe146;return db[_0x88bf('0x42')][_0x88bf('0x22')]({'where':{'email':_0x501b29[_0x88bf('0x3f')][_0x88bf('0x23')]}});})[_0x88bf('0x18')](function(_0x2d77bb){if(!_0x2d77bb){throw new Error(_0x88bf('0x43'));}if(_0x2d77bb['disabled']){throw new Error(_0x88bf('0x44'));}if(_0x2d77bb[_0x88bf('0x13')]){if(moment(_0x2d77bb[_0x88bf('0x14')])[_0x88bf('0x1d')](_0x46e548[_0x88bf('0xe')],'minutes')>moment()){throw new Error(_0x88bf('0x45'));}else{_0x2d77bb[_0x88bf('0x13')]=![];_0x2d77bb[_0x88bf('0x14')]=null;}}_0x2d77bb['resetPasswordToken']=_0x3283c1;_0x2d77bb[_0x88bf('0x46')]=Date[_0x88bf('0x47')]()+0x36ee80;return _0x2d77bb['save']();})[_0x88bf('0x18')](function(){return sendServiceMail({'to':_0x501b29['body'][_0x88bf('0x23')],'subject':'xCally\x20Motion\x20Password\x20Reset','text':_0x88bf('0x48')+_0x88bf('0x49')+'http://'+_0x501b29['headers']['host']+_0x88bf('0x4a')+_0x3283c1+'\x0a\x0a'+_0x88bf('0x4b')});})['then'](function(){_0x3d0aef['status'](0xc8)[_0x88bf('0x4c')]({'message':_0x88bf('0x4d')});})[_0x88bf('0x21')](function(_0x237e18){return handleError(_0x3d0aef,0x1f4,_0x237e18);});};exports[_0x88bf('0x4e')]=function(_0x3c9116,_0x38642f,_0x1e8aad){var _0x12be11;return db[_0x88bf('0x42')][_0x88bf('0x22')]({'where':{'resetPasswordToken':_0x3c9116[_0x88bf('0x4f')][_0x88bf('0x50')],'resetPasswordExpires':{'$gt':Date[_0x88bf('0x47')]()}}})['then'](function(_0xa7a27e){_0x12be11=_0xa7a27e;if(!_0x12be11){throw new Error(_0x88bf('0x51'));}return db[_0x88bf('0x52')][_0x88bf('0xc')]({'attributes':['id',_0x88bf('0x53')]});})['then'](function(_0x25f567){return checkPasswordPattern(_0x25f567,_0x3c9116[_0x88bf('0x3f')][_0x88bf('0x10')],_0x25f567[_0x88bf('0x53')]);})[_0x88bf('0x18')](function(){_0x12be11[_0x88bf('0x10')]=_0x3c9116['body']['password'];_0x12be11['resetPasswordToken']=null;_0x12be11[_0x88bf('0x46')]=null;return _0x12be11['save']();})[_0x88bf('0x18')](function(){_0x38642f['status'](0xc8)[_0x88bf('0x4c')]({'message':_0x88bf('0x54')});})[_0x88bf('0x21')](function(_0x5f36e9){return handleError(_0x38642f,0x1f4,_0x5f36e9);});};passport[_0x88bf('0x55')](new LocalStrategy({'usernameField':'name','passwordField':_0x88bf('0x10')},function(_0x4cd9bd,_0x58a0e3,_0x17c2e2){return localAuthenticate(db['User'],_0x4cd9bd,_0x58a0e3,_0x17c2e2);}));
\ No newline at end of file
+var _0x28e4=['catch','MailAccount','email','MailServerOut','Smtp','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','service','host','port','secure','authentication','auth','pass','merge','request','SendMail','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','stringify','send','login','local','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','online','forgot','body','generate','trim','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','/reset/','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','status','Reset\x20Email\x20sent!','reset','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','use','passport','passport-local','jayson/promise','lodash','randomstring','moment','../../mysqldb','../../components/auth/service','../../config/utils','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','minutes','clearBlockUser','add','getLicense'];(function(_0x9890b1,_0x36db4a){var _0x3574bb=function(_0x11cd4f){while(--_0x11cd4f){_0x9890b1['push'](_0x9890b1['shift']());}};_0x3574bb(++_0x36db4a);}(_0x28e4,0x81));var _0x428e=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x28e4[_0x321bb2];return _0x9c12ed;};'use strict';var util=require('util');var passport=require(_0x428e('0x0'));var LocalStrategy=require(_0x428e('0x1'))['Strategy'];var jayson=require(_0x428e('0x2'));var _=require(_0x428e('0x3'));var rs=require(_0x428e('0x4'));var moment=require(_0x428e('0x5'));var db=require(_0x428e('0x6'))['db'];var authService=require(_0x428e('0x7'));var utils=require(_0x428e('0x8'));var client=jayson['client'][_0x428e('0x9')]({'port':0x232b});function localAuthenticate(_0x26c402,_0x90704d,_0x285f17,_0x162b9e){var _0x3d5b18,_0x426f0b;return db[_0x428e('0xa')][_0x428e('0xb')]({'where':{'id':0x1},'attributes':[_0x428e('0xc'),_0x428e('0xd')],'raw':!![]})[_0x428e('0xe')](function(_0xc8afd7){_0x3d5b18=_0xc8afd7;return _0x26c402[_0x428e('0xb')]({'attributes':['id',_0x428e('0xf'),_0x428e('0x10'),'salt',_0x428e('0x11'),_0x428e('0x12'),_0x428e('0x13'),_0x428e('0x14'),_0x428e('0x15')],'where':{'name':_0x90704d,'role':{'$or':[_0x428e('0x16'),_0x428e('0x17'),_0x428e('0x18')]}}});})[_0x428e('0xe')](function(_0x348193){if(!_0x348193||_0x348193&&_0x348193[_0x428e('0xf')]!==_0x90704d){throw new Error(_0x428e('0x19'));}else{_0x426f0b=_0x348193;return _0x426f0b;}})[_0x428e('0xe')](function(){_0x426f0b[_0x428e('0x1a')](_0x285f17,function(_0x44f87f,_0x431d19){var _0x11a0cd=_0x426f0b[_0x428e('0x15')]+0x1;if(_0x44f87f){return _0x162b9e(_0x44f87f);}else if(!_0x431d19){if(_0x426f0b[_0x428e('0x12')]){return _0x162b9e(null,![],{'message':_0x428e('0x19')});}else if(_0x3d5b18[_0x428e('0xc')]>0x0){if(_0x426f0b[_0x428e('0x13')]){if(_0x3d5b18[_0x428e('0xd')]>0x0){if(moment(_0x426f0b['blockedAt'])['add'](_0x3d5b18['blockDuration'],_0x428e('0x1b'))>moment()){return _0x162b9e(null,![],{'message':_0x428e('0x19')});}else{return utils[_0x428e('0x1c')](_0x426f0b,_0x11a0cd,![],null)[_0x428e('0xe')](function(){return _0x162b9e(null,![],{'message':_0x428e('0x19')});});}}else{return _0x162b9e(null,![],{'message':_0x428e('0x19')});}}else{if(_0x11a0cd>=_0x3d5b18[_0x428e('0xc')]){return utils['clearBlockUser'](_0x426f0b,0x0,!![],moment())['then'](function(){return _0x162b9e(null,![],{'message':_0x428e('0x19')});});}else{return utils[_0x428e('0x1c')](_0x426f0b,_0x11a0cd,![],null)['then'](function(){return _0x162b9e(null,![],{'message':_0x428e('0x19')});});}}}else{return _0x162b9e(null,![],{'message':_0x428e('0x19')});}}else{if(_0x426f0b[_0x428e('0x12')]){return _0x162b9e(null,![],{'message':_0x428e('0x19')});}else if(_0x3d5b18['allowedLoginAttempts']>0x0){if(_0x426f0b['blocked']){if(_0x3d5b18['blockDuration']>0x0){if(moment(_0x426f0b[_0x428e('0x14')])[_0x428e('0x1d')](_0x3d5b18[_0x428e('0xd')],_0x428e('0x1b'))>moment()){return _0x162b9e(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x428e('0x1c')](_0x426f0b,0x0,![],null)['then'](function(){return utils[_0x428e('0x1e')](_0x426f0b);})[_0x428e('0xe')](function(){return _0x162b9e(null,_0x426f0b);});}}else{return _0x162b9e(null,![],{'message':_0x428e('0x19')});}}else{return utils[_0x428e('0x1c')](_0x426f0b,0x0,![],null)[_0x428e('0xe')](function(){return utils[_0x428e('0x1e')](_0x426f0b);})['then'](function(){return _0x162b9e(null,_0x426f0b);})[_0x428e('0x1f')](function(_0x157f64){return _0x162b9e(null,![],_0x157f64);});}}else{if(_0x426f0b['blocked']){return _0x162b9e(null,![],{'message':_0x428e('0x19')});}else{return utils[_0x428e('0x1e')](_0x426f0b)[_0x428e('0xe')](function(){return _0x162b9e(null,_0x426f0b);});}}}});})[_0x428e('0x1f')](function(_0x453bcb){return _0x162b9e(null,![],_0x453bcb);});}function sendServiceMail(_0x4bfed1){return db[_0x428e('0x20')]['find']({'where':{'service':!![]},'attributes':['id',_0x428e('0xf'),_0x428e('0x21')],'include':[{'model':db[_0x428e('0x22')],'as':_0x428e('0x23')}]})['then'](function(_0x34a93b){if(!_0x34a93b){throw new Error(_0x428e('0x24'));}var _0x94f820={'tls':{'rejectUnauthorized':![]}};if(_0x34a93b[_0x428e('0x23')][_0x428e('0x25')]){_0x94f820[_0x428e('0x25')]=_0x34a93b[_0x428e('0x23')]['service'];}else{_0x94f820[_0x428e('0x26')]=_0x34a93b[_0x428e('0x23')]['host'];_0x94f820['port']=_0x34a93b[_0x428e('0x23')][_0x428e('0x27')];_0x94f820[_0x428e('0x28')]=_0x34a93b[_0x428e('0x23')]['secure'];}if(_0x34a93b[_0x428e('0x23')][_0x428e('0x29')]){_0x94f820[_0x428e('0x2a')]={'user':_0x34a93b[_0x428e('0x23')][_0x428e('0x17')],'pass':_0x34a93b['Smtp'][_0x428e('0x2b')]};}var _0x5124c0={'account':_0x94f820,'message':_[_0x428e('0x2c')]({'from':util['format']('\x22%s\x22\x20<%s>',_0x34a93b[_0x428e('0xf')],_0x34a93b[_0x428e('0x21')]||_0x34a93b['Smtp']['user'])},_0x4bfed1)};return client[_0x428e('0x2d')](_0x428e('0x2e'),_0x5124c0);})[_0x428e('0xe')](function(_0xf40304){if(_0xf40304[_0x428e('0x2f')]){throw new Error(util['format'](_0x428e('0x30'),_0xf40304['error'][_0x428e('0x31')]||JSON[_0x428e('0x32')](_0xf40304[_0x428e('0x2f')])));}return!![];});}function handleError(_0x18daa7,_0x48b43f,_0x5b32bf){return _0x18daa7['status'](_0x48b43f||0x1f4)[_0x428e('0x33')]({'message':_0x5b32bf?_0x5b32bf[_0x428e('0x31')]||_0x5b32bf:''});}function checkPasswordPattern(_0x263476,_0x3321a7,_0x1e9007){if(_0x1e9007){var _0x710a87=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x710a87['test'](_0x3321a7)){return _0x263476;}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 _0x263476;}}exports[_0x428e('0x34')]=function(_0x2b1687,_0x2b55fd,_0x1a91ea){passport[_0x428e('0x1a')](_0x428e('0x35'),function(_0x26e005,_0x3a7bf8,_0xe9b7b7){var _0x4a45ca=_0x26e005||_0xe9b7b7;if(_0x4a45ca){return handleError(_0x2b55fd,0x191,_0x4a45ca);}if(!_0x3a7bf8){return handleError(_0x2b55fd,0x194,{'message':_0x428e('0x36')});}else{var _0x54187d={'payload':{'id':_0x3a7bf8['id'],'role':_0x3a7bf8[_0x428e('0x11')]},'options':{'expiresIn':0x15180}};return authService[_0x428e('0x37')](_0x54187d)[_0x428e('0xe')](function(_0x21b1e4){_0x2b55fd[_0x428e('0x38')]({'id':_0x3a7bf8['id'],'token':_0x21b1e4,'statusCall':'','isAlreadyLogged':_0x3a7bf8[_0x428e('0x39')]});});}})(_0x2b1687,_0x2b55fd,_0x1a91ea);};exports[_0x428e('0x3a')]=function(_0xbf99f0,_0x2e7075,_0x29e416){if(!_0xbf99f0[_0x428e('0x3b')]['email']){return handleError(_0x2e7075,0x1f4,{'message':'Email\x20parameter\x20is\x20missing'});}var _0x7be0be=rs[_0x428e('0x3c')]();_0xbf99f0[_0x428e('0x3b')][_0x428e('0x21')]=_0xbf99f0[_0x428e('0x3b')][_0x428e('0x21')][_0x428e('0x3d')]()[_0x428e('0x3e')]();var _0x31f81c;return db[_0x428e('0xa')][_0x428e('0xb')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x428e('0xd')],'raw':!![]})['then'](function(_0x4b12d9){_0x31f81c=_0x4b12d9;return db[_0x428e('0x3f')]['find']({'where':{'email':_0xbf99f0[_0x428e('0x3b')][_0x428e('0x21')]}});})[_0x428e('0xe')](function(_0x3318d9){if(!_0x3318d9){throw new Error(_0x428e('0x40'));}if(_0x3318d9[_0x428e('0x12')]){throw new Error(_0x428e('0x41'));}if(_0x3318d9[_0x428e('0x13')]){if(moment(_0x3318d9[_0x428e('0x14')])['add'](_0x31f81c[_0x428e('0xd')],'minutes')>moment()){throw new Error('The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.');}else{_0x3318d9[_0x428e('0x13')]=![];_0x3318d9[_0x428e('0x14')]=null;}}_0x3318d9[_0x428e('0x42')]=_0x7be0be;_0x3318d9[_0x428e('0x43')]=Date['now']()+0x36ee80;return _0x3318d9[_0x428e('0x44')]();})[_0x428e('0xe')](function(){return sendServiceMail({'to':_0xbf99f0[_0x428e('0x3b')][_0x428e('0x21')],'subject':_0x428e('0x45'),'text':_0x428e('0x46')+'Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a'+'http://'+_0xbf99f0['headers'][_0x428e('0x26')]+_0x428e('0x47')+_0x7be0be+'\x0a\x0a'+_0x428e('0x48')});})[_0x428e('0xe')](function(){_0x2e7075[_0x428e('0x49')](0xc8)[_0x428e('0x33')]({'message':_0x428e('0x4a')});})[_0x428e('0x1f')](function(_0x3f5614){return handleError(_0x2e7075,0x1f4,_0x3f5614);});};exports[_0x428e('0x4b')]=function(_0x34b0cd,_0x6fab3c,_0x2709ac){var _0x5bc15b;return db[_0x428e('0x3f')]['find']({'where':{'resetPasswordToken':_0x34b0cd['params'][_0x428e('0x4c')],'resetPasswordExpires':{'$gt':Date['now']()}}})[_0x428e('0xe')](function(_0xb3cfcb){_0x5bc15b=_0xb3cfcb;if(!_0x5bc15b){throw new Error(_0x428e('0x4d'));}return db[_0x428e('0xa')][_0x428e('0xb')]({'attributes':['id',_0x428e('0x4e')]});})['then'](function(_0x3f8ccd){return checkPasswordPattern(_0x3f8ccd,_0x34b0cd[_0x428e('0x3b')][_0x428e('0x10')],_0x3f8ccd[_0x428e('0x4e')]);})[_0x428e('0xe')](function(){_0x5bc15b[_0x428e('0x10')]=_0x34b0cd['body'][_0x428e('0x10')];_0x5bc15b[_0x428e('0x42')]=null;_0x5bc15b['resetPasswordExpires']=null;return _0x5bc15b[_0x428e('0x44')]();})[_0x428e('0xe')](function(){_0x6fab3c[_0x428e('0x49')](0xc8)[_0x428e('0x33')]({'message':'Password\x20reset!'});})['catch'](function(_0x216ec8){return handleError(_0x6fab3c,0x1f4,_0x216ec8);});};passport[_0x428e('0x4f')](new LocalStrategy({'usernameField':'name','passwordField':'password'},function(_0x5dc157,_0x340756,_0x3143ad){return localAuthenticate(db[_0x428e('0x3f')],_0x5dc157,_0x340756,_0x3143ad);}));
\ No newline at end of file
diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js
index 15613dd..918be6f 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 _0x75de=['forgot','/reset/:token','./authLocal.controller','post','/forgot'];(function(_0x12ca6a,_0x58daa5){var _0x434c47=function(_0x597aa0){while(--_0x597aa0){_0x12ca6a['push'](_0x12ca6a['shift']());}};_0x434c47(++_0x58daa5);}(_0x75de,0x17e));var _0xe75d=function(_0x5abc90,_0x171010){_0x5abc90=_0x5abc90-0x0;var _0x5aa845=_0x75de[_0x5abc90];return _0x5aa845;};'use strict';var express=require('express');var router=express['Router']();var controller=require(_0xe75d('0x0'));router['post']('/',controller['login']);router[_0xe75d('0x1')](_0xe75d('0x2'),controller[_0xe75d('0x3')]);router[_0xe75d('0x1')](_0xe75d('0x4'),controller['reset']);module['exports']=router;
\ No newline at end of file
+var _0xe49c=['exports','express','Router','post','login','/forgot','forgot','/reset/:token','reset'];(function(_0x3abb9f,_0x5142b8){var _0x473a93=function(_0x59940e){while(--_0x59940e){_0x3abb9f['push'](_0x3abb9f['shift']());}};_0x473a93(++_0x5142b8);}(_0xe49c,0x91));var _0xce49=function(_0x3ef45e,_0xe84f33){_0x3ef45e=_0x3ef45e-0x0;var _0x69e7c=_0xe49c[_0x3ef45e];return _0x69e7c;};'use strict';var express=require(_0xce49('0x0'));var router=express[_0xce49('0x1')]();var controller=require('./authLocal.controller');router[_0xce49('0x2')]('/',controller[_0xce49('0x3')]);router[_0xce49('0x2')](_0xce49('0x4'),controller[_0xce49('0x5')]);router[_0xce49('0x2')](_0xce49('0x6'),controller[_0xce49('0x7')]);module[_0xce49('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js
index 4b73f7d..9fb1170 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 _0x0e58=['sequelize','STRING','BOOLEAN','INTEGER'];(function(_0x471f28,_0x3aedbf){var _0x3ca8f5=function(_0x20f612){while(--_0x20f612){_0x471f28['push'](_0x471f28['shift']());}};_0x3ca8f5(++_0x3aedbf);}(_0x0e58,0xbc));var _0x80e5=function(_0x881128,_0x4e73b9){_0x881128=_0x881128-0x0;var _0x53f69f=_0x0e58[_0x881128];return _0x53f69f;};'use strict';var Sequelize=require(_0x80e5('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'channel':{'type':Sequelize[_0x80e5('0x1')]},'description':{'type':Sequelize['STRING']},'status':{'type':Sequelize[_0x80e5('0x2')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x80e5('0x3')],'defaultValue':0xa}};
\ No newline at end of file
+var _0xede1=['sequelize','exports','STRING','BOOLEAN','INTEGER'];(function(_0x2c5255,_0x4340c3){var _0x30d0ea=function(_0x131ba1){while(--_0x131ba1){_0x2c5255['push'](_0x2c5255['shift']());}};_0x30d0ea(++_0x4340c3);}(_0xede1,0x195));var _0x1ede=function(_0x590a00,_0x50fdb9){_0x590a00=_0x590a00-0x0;var _0x1f963a=_0xede1[_0x590a00];return _0x1f963a;};'use strict';var Sequelize=require(_0x1ede('0x0'));module[_0x1ede('0x1')]={'name':{'type':Sequelize[_0x1ede('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0x1ede('0x2')]},'description':{'type':Sequelize[_0x1ede('0x2')]},'status':{'type':Sequelize[_0x1ede('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x1ede('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 5050531..bfe5e29 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 _0x768b=['findAll','show','params','keys','fields','find','catch','create','body','update','destroy','addConditions','Condition','ids','omit','getConditions','findOne','order','merge','addActions','Action','getActions','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../config/license/hardware','../../config/logger','api','../../config/environment','status','json','count','limit','Content-Range','apply','reject','save','then','end','sendStatus','error','name','send','index','map','Automation','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','offset','sort','where','pick','VIRTUAL','filter','options','includeAll'];(function(_0x51ce09,_0x3bb7b7){var _0xd884f=function(_0x3e4168){while(--_0x3e4168){_0x51ce09['push'](_0x51ce09['shift']());}};_0xd884f(++_0x3bb7b7);}(_0x768b,0x68));var _0xb768=function(_0x214fce,_0x276eda){_0x214fce=_0x214fce-0x0;var _0x5e7c73=_0x768b[_0x214fce];return _0x5e7c73;};'use strict';var pdf=require(_0xb768('0x0'));var emlformat=require(_0xb768('0x1'));var rimraf=require(_0xb768('0x2'));var zipdir=require(_0xb768('0x3'));var jsonpatch=require(_0xb768('0x4'));var rp=require(_0xb768('0x5'));var moment=require(_0xb768('0x6'));var BPromise=require(_0xb768('0x7'));var Mustache=require(_0xb768('0x8'));var util=require(_0xb768('0x9'));var path=require('path');var sox=require(_0xb768('0xa'));var csv=require(_0xb768('0xb'));var ejs=require(_0xb768('0xc'));var fs=require('fs');var _=require(_0xb768('0xd'));var squel=require('squel');var crypto=require(_0xb768('0xe'));var jsforce=require(_0xb768('0xf'));var deskjs=require(_0xb768('0x10'));var toCsv=require(_0xb768('0xb'));var querystring=require(_0xb768('0x11'));var Papa=require('papaparse');var Redis=require(_0xb768('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb768('0x13'));var logger=require(_0xb768('0x14'))(_0xb768('0x15'));var utils=require('../../config/utils');var config=require(_0xb768('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x6823c5,_0x2b4fe2){_0x2b4fe2=_0x2b4fe2||0xcc;return function(_0x5aa4e4){if(_0x5aa4e4){return _0x6823c5['sendStatus'](_0x2b4fe2);}return _0x6823c5[_0xb768('0x17')](_0x2b4fe2)['end']();};}function respondWithResult(_0xef5cfc,_0x3a9277){_0x3a9277=_0x3a9277||0xc8;return function(_0x442944){if(_0x442944){return _0xef5cfc[_0xb768('0x17')](_0x3a9277)[_0xb768('0x18')](_0x442944);}};}function respondWithFilteredResult(_0x5751fe,_0x2194b4){return function(_0x2accaf){if(_0x2accaf){var _0x2be8c5=_0x2accaf[_0xb768('0x19')],_0x5d2b3e=_0x2194b4['offset'],_0x34c288=_0x2194b4['offset']+_0x2194b4[_0xb768('0x1a')],_0x251e0f;if(_0x34c288>=_0x2be8c5){_0x34c288=_0x2be8c5;_0x251e0f=0xc8;}else{_0x251e0f=0xce;}_0x5751fe[_0xb768('0x17')](_0x251e0f);return _0x5751fe['set'](_0xb768('0x1b'),_0x5d2b3e+'-'+_0x34c288+'/'+_0x2be8c5)[_0xb768('0x18')](_0x2accaf);}return null;};}function patchUpdates(_0x4d119a){return function(_0x4d6977){try{jsonpatch[_0xb768('0x1c')](_0x4d6977,_0x4d119a,!![]);}catch(_0x3e6a0f){return BPromise[_0xb768('0x1d')](_0x3e6a0f);}return _0x4d6977[_0xb768('0x1e')]();};}function saveUpdates(_0x27af26,_0x5cce75){return function(_0x60768e){if(_0x60768e){return _0x60768e['update'](_0x27af26)[_0xb768('0x1f')](function(_0x1dc9da){return _0x1dc9da;});}return null;};}function removeEntity(_0x23c624,_0x3f7b94){return function(_0x44e2fe){if(_0x44e2fe){return _0x44e2fe['destroy']()[_0xb768('0x1f')](function(){_0x23c624[_0xb768('0x17')](0xcc)[_0xb768('0x20')]();});}};}function handleEntityNotFound(_0x1caf2c,_0x41112e){return function(_0x32b8f0){if(!_0x32b8f0){_0x1caf2c[_0xb768('0x21')](0x194);}return _0x32b8f0;};}function handleError(_0x16404f,_0x376319){_0x376319=_0x376319||0x1f4;return function(_0x2361cc){logger[_0xb768('0x22')](_0x2361cc['stack']);if(_0x2361cc['name']){delete _0x2361cc[_0xb768('0x23')];}_0x16404f[_0xb768('0x17')](_0x376319)[_0xb768('0x24')](_0x2361cc);};}exports[_0xb768('0x25')]=function(_0x5e168c,_0x5c5056){var _0x49292b={},_0x323c73={},_0x450721={'count':0x0,'rows':[]};var _0x20438a=_[_0xb768('0x26')](db[_0xb768('0x27')][_0xb768('0x28')],function(_0x505bd4){return{'name':_0x505bd4[_0xb768('0x29')],'type':_0x505bd4[_0xb768('0x2a')][_0xb768('0x2b')]};});_0x323c73[_0xb768('0x2c')]=_[_0xb768('0x26')](_0x20438a,'name');_0x323c73[_0xb768('0x2d')]=_['keys'](_0x5e168c[_0xb768('0x2d')]);_0x323c73[_0xb768('0x2e')]=_[_0xb768('0x2f')](_0x323c73[_0xb768('0x2c')],_0x323c73[_0xb768('0x2d')]);_0x49292b[_0xb768('0x30')]=_['intersection'](_0x323c73[_0xb768('0x2c')],qs['fields'](_0x5e168c['query']['fields']));_0x49292b[_0xb768('0x30')]=_0x49292b['attributes'][_0xb768('0x31')]?_0x49292b['attributes']:_0x323c73[_0xb768('0x2c')];if(!_0x5e168c[_0xb768('0x2d')][_0xb768('0x32')](_0xb768('0x33'))){_0x49292b[_0xb768('0x1a')]=qs[_0xb768('0x1a')](_0x5e168c[_0xb768('0x2d')][_0xb768('0x1a')]);_0x49292b[_0xb768('0x34')]=qs[_0xb768('0x34')](_0x5e168c['query'][_0xb768('0x34')]);}_0x49292b['order']=qs[_0xb768('0x35')](_0x5e168c[_0xb768('0x2d')][_0xb768('0x35')]);_0x49292b[_0xb768('0x36')]=qs['filters'](_[_0xb768('0x37')](_0x5e168c[_0xb768('0x2d')],_0x323c73[_0xb768('0x2e')]));if(_0x5e168c['query']['filter']){_0x49292b[_0xb768('0x36')]=_['merge'](_0x49292b[_0xb768('0x36')],{'$or':_['map'](_0x20438a,function(_0x337b48){if(_0x337b48[_0xb768('0x2a')]!==_0xb768('0x38')){var _0x4ad825={};_0x4ad825[_0x337b48[_0xb768('0x23')]]={'$like':'%'+_0x5e168c[_0xb768('0x2d')][_0xb768('0x39')]+'%'};return _0x4ad825;}})});}_0x49292b=_['merge']({},_0x49292b,_0x5e168c[_0xb768('0x3a')]);var _0x37da35={'where':_0x49292b[_0xb768('0x36')]};return db[_0xb768('0x27')][_0xb768('0x19')](_0x37da35)['then'](function(_0x4f757c){_0x450721[_0xb768('0x19')]=_0x4f757c;if(_0x5e168c[_0xb768('0x2d')][_0xb768('0x3b')]){_0x49292b['include']=[{'all':!![]}];}return db[_0xb768('0x27')][_0xb768('0x3c')](_0x49292b);})[_0xb768('0x1f')](function(_0x3e8aec){_0x450721['rows']=_0x3e8aec;return _0x450721;})[_0xb768('0x1f')](respondWithFilteredResult(_0x5c5056,_0x49292b))['catch'](handleError(_0x5c5056,null));};exports[_0xb768('0x3d')]=function(_0x2ecfa9,_0x5e003a){var _0x4ce95d={'raw':![],'where':{'id':_0x2ecfa9[_0xb768('0x3e')]['id']}},_0x5c6d51={};_0x5c6d51[_0xb768('0x2c')]=_['keys'](db[_0xb768('0x27')][_0xb768('0x28')]);_0x5c6d51[_0xb768('0x2d')]=_[_0xb768('0x3f')](_0x2ecfa9[_0xb768('0x2d')]);_0x5c6d51[_0xb768('0x2e')]=_[_0xb768('0x2f')](_0x5c6d51[_0xb768('0x2c')],_0x5c6d51[_0xb768('0x2d')]);_0x4ce95d[_0xb768('0x30')]=_['intersection'](_0x5c6d51['model'],qs[_0xb768('0x40')](_0x2ecfa9['query'][_0xb768('0x40')]));_0x4ce95d[_0xb768('0x30')]=_0x4ce95d[_0xb768('0x30')][_0xb768('0x31')]?_0x4ce95d[_0xb768('0x30')]:_0x5c6d51['model'];if(_0x2ecfa9[_0xb768('0x2d')][_0xb768('0x3b')]){_0x4ce95d['include']=[{'all':!![]}];}_0x4ce95d=_['merge']({},_0x4ce95d,_0x2ecfa9[_0xb768('0x3a')]);return db[_0xb768('0x27')][_0xb768('0x41')](_0x4ce95d)[_0xb768('0x1f')](handleEntityNotFound(_0x5e003a,null))[_0xb768('0x1f')](respondWithResult(_0x5e003a,null))[_0xb768('0x42')](handleError(_0x5e003a,null));};exports['create']=function(_0x52ad33,_0x25f105){return db[_0xb768('0x27')][_0xb768('0x43')](_0x52ad33[_0xb768('0x44')],{})[_0xb768('0x1f')](respondWithResult(_0x25f105,0xc9))[_0xb768('0x42')](handleError(_0x25f105,null));};exports[_0xb768('0x45')]=function(_0x243f94,_0x135359){if(_0x243f94[_0xb768('0x44')]['id']){delete _0x243f94[_0xb768('0x44')]['id'];}return db['Automation'][_0xb768('0x41')]({'where':{'id':_0x243f94[_0xb768('0x3e')]['id']}})[_0xb768('0x1f')](handleEntityNotFound(_0x135359,null))['then'](saveUpdates(_0x243f94[_0xb768('0x44')],null))['then'](respondWithResult(_0x135359,null))['catch'](handleError(_0x135359,null));};exports[_0xb768('0x46')]=function(_0x126d3c,_0x560e6a){return db[_0xb768('0x27')][_0xb768('0x41')]({'where':{'id':_0x126d3c[_0xb768('0x3e')]['id']}})[_0xb768('0x1f')](handleEntityNotFound(_0x560e6a,null))[_0xb768('0x1f')](removeEntity(_0x560e6a,null))[_0xb768('0x42')](handleError(_0x560e6a,null));};exports[_0xb768('0x47')]=function(_0x2328b3,_0x1d3b07,_0x559f8a){return db[_0xb768('0x48')][_0xb768('0x41')]({'where':{'id':_0x2328b3[_0xb768('0x3e')]['id']}})['then'](handleEntityNotFound(_0x1d3b07,null))[_0xb768('0x1f')](function(_0x2b34b5){if(_0x2b34b5){return _0x2b34b5['addConditions'](_0x2328b3['body'][_0xb768('0x49')],_[_0xb768('0x4a')](_0x2328b3[_0xb768('0x44')],[_0xb768('0x49'),'id'])||{});}})[_0xb768('0x1f')](respondWithResult(_0x1d3b07,null))[_0xb768('0x42')](handleError(_0x1d3b07,null));};exports[_0xb768('0x4b')]=function(_0x3f7bda,_0x40173a,_0x1a2340){var _0x52ee1e={};var _0x434124={};var _0x1d8e13;var _0xc9f7c7;return db[_0xb768('0x27')][_0xb768('0x4c')]({'where':{'id':_0x3f7bda[_0xb768('0x3e')]['id']}})[_0xb768('0x1f')](handleEntityNotFound(_0x40173a,null))[_0xb768('0x1f')](function(_0x4e733d){if(_0x4e733d){_0x1d8e13=_0x4e733d;_0x434124['model']=_[_0xb768('0x3f')](db[_0xb768('0x48')][_0xb768('0x28')]);_0x434124[_0xb768('0x2d')]=_['keys'](_0x3f7bda[_0xb768('0x2d')]);_0x434124[_0xb768('0x2e')]=_[_0xb768('0x2f')](_0x434124[_0xb768('0x2c')],_0x434124[_0xb768('0x2d')]);_0x52ee1e[_0xb768('0x30')]=_[_0xb768('0x2f')](_0x434124['model'],qs[_0xb768('0x40')](_0x3f7bda[_0xb768('0x2d')]['fields']));_0x52ee1e[_0xb768('0x30')]=_0x52ee1e[_0xb768('0x30')][_0xb768('0x31')]?_0x52ee1e[_0xb768('0x30')]:_0x434124[_0xb768('0x2c')];_0x52ee1e[_0xb768('0x4d')]=qs[_0xb768('0x35')](_0x3f7bda[_0xb768('0x2d')]['sort']);_0x52ee1e[_0xb768('0x36')]=qs['filters'](_[_0xb768('0x37')](_0x3f7bda[_0xb768('0x2d')],_0x434124['filters']));if(_0x3f7bda['query']['filter']){_0x52ee1e[_0xb768('0x36')]=_[_0xb768('0x4e')](_0x52ee1e[_0xb768('0x36')],{'$or':_['map'](_0x52ee1e['attributes'],function(_0x208ff9){var _0x22e432={};_0x22e432[_0x208ff9]={'$like':'%'+_0x3f7bda[_0xb768('0x2d')][_0xb768('0x39')]+'%'};return _0x22e432;})});}_0x52ee1e=_[_0xb768('0x4e')]({},_0x52ee1e,_0x3f7bda[_0xb768('0x3a')]);return _0x1d8e13[_0xb768('0x4b')](_0x52ee1e);}})[_0xb768('0x1f')](function(_0x5a2932){if(_0x5a2932){_0xc9f7c7=_0x5a2932[_0xb768('0x31')];if(!_0x3f7bda['query'][_0xb768('0x32')]('nolimit')){_0x52ee1e[_0xb768('0x1a')]=qs[_0xb768('0x1a')](_0x3f7bda[_0xb768('0x2d')][_0xb768('0x1a')]);_0x52ee1e[_0xb768('0x34')]=qs['offset'](_0x3f7bda[_0xb768('0x2d')][_0xb768('0x34')]);}return _0x1d8e13[_0xb768('0x4b')](_0x52ee1e);}})['then'](function(_0xf0fbdc){if(_0xf0fbdc){return _0xf0fbdc?{'count':_0xc9f7c7,'rows':_0xf0fbdc}:null;}})[_0xb768('0x1f')](respondWithResult(_0x40173a,null))[_0xb768('0x42')](handleError(_0x40173a,null));};exports[_0xb768('0x4f')]=function(_0x2519e7,_0x5e66e6,_0x14991c){return db[_0xb768('0x50')][_0xb768('0x41')]({'where':{'id':_0x2519e7[_0xb768('0x3e')]['id']}})[_0xb768('0x1f')](handleEntityNotFound(_0x5e66e6,null))['then'](function(_0x5c7a3d){if(_0x5c7a3d){return _0x5c7a3d[_0xb768('0x4f')](_0x2519e7[_0xb768('0x44')][_0xb768('0x49')],_[_0xb768('0x4a')](_0x2519e7['body'],['ids','id'])||{});}})[_0xb768('0x1f')](respondWithResult(_0x5e66e6,null))[_0xb768('0x42')](handleError(_0x5e66e6,null));};exports[_0xb768('0x51')]=function(_0x72bf46,_0x2b4bbe,_0x1fdf13){var _0x43e202={};var _0x4eaae9={};var _0x27e0e8;var _0x5a050e;return db[_0xb768('0x27')][_0xb768('0x4c')]({'where':{'id':_0x72bf46[_0xb768('0x3e')]['id']}})[_0xb768('0x1f')](handleEntityNotFound(_0x2b4bbe,null))[_0xb768('0x1f')](function(_0x38c2fd){if(_0x38c2fd){_0x27e0e8=_0x38c2fd;_0x4eaae9[_0xb768('0x2c')]=_[_0xb768('0x3f')](db[_0xb768('0x50')][_0xb768('0x28')]);_0x4eaae9[_0xb768('0x2d')]=_[_0xb768('0x3f')](_0x72bf46[_0xb768('0x2d')]);_0x4eaae9[_0xb768('0x2e')]=_[_0xb768('0x2f')](_0x4eaae9[_0xb768('0x2c')],_0x4eaae9['query']);_0x43e202[_0xb768('0x30')]=_[_0xb768('0x2f')](_0x4eaae9[_0xb768('0x2c')],qs[_0xb768('0x40')](_0x72bf46[_0xb768('0x2d')][_0xb768('0x40')]));_0x43e202['attributes']=_0x43e202['attributes'][_0xb768('0x31')]?_0x43e202[_0xb768('0x30')]:_0x4eaae9[_0xb768('0x2c')];_0x43e202[_0xb768('0x4d')]=qs[_0xb768('0x35')](_0x72bf46[_0xb768('0x2d')][_0xb768('0x35')]);_0x43e202[_0xb768('0x36')]=qs[_0xb768('0x2e')](_['pick'](_0x72bf46[_0xb768('0x2d')],_0x4eaae9[_0xb768('0x2e')]));if(_0x72bf46[_0xb768('0x2d')][_0xb768('0x39')]){_0x43e202['where']=_[_0xb768('0x4e')](_0x43e202[_0xb768('0x36')],{'$or':_[_0xb768('0x26')](_0x43e202[_0xb768('0x30')],function(_0x21402a){var _0x13867f={};_0x13867f[_0x21402a]={'$like':'%'+_0x72bf46[_0xb768('0x2d')][_0xb768('0x39')]+'%'};return _0x13867f;})});}_0x43e202=_[_0xb768('0x4e')]({},_0x43e202,_0x72bf46[_0xb768('0x3a')]);return _0x27e0e8[_0xb768('0x51')](_0x43e202);}})['then'](function(_0x28e55a){if(_0x28e55a){_0x5a050e=_0x28e55a[_0xb768('0x31')];if(!_0x72bf46['query'][_0xb768('0x32')]('nolimit')){_0x43e202['limit']=qs[_0xb768('0x1a')](_0x72bf46['query'][_0xb768('0x1a')]);_0x43e202[_0xb768('0x34')]=qs[_0xb768('0x34')](_0x72bf46[_0xb768('0x2d')][_0xb768('0x34')]);}return _0x27e0e8['getActions'](_0x43e202);}})[_0xb768('0x1f')](function(_0x297110){if(_0x297110){return _0x297110?{'count':_0x5a050e,'rows':_0x297110}:null;}})[_0xb768('0x1f')](respondWithResult(_0x2b4bbe,null))[_0xb768('0x42')](handleError(_0x2b4bbe,null));};
\ No newline at end of file
+var _0xc4d7=['fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','Automation','includeAll','include','findAll','rows','catch','show','params','find','create','body','addConditions','Condition','ids','omit','findOne','order','getConditions','Action','addActions','getActions','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','json','offset','limit','status','set','Content-Range','apply','reject','save','update','then','destroy','error','index','map','rawAttributes','fieldName','type','key','model','name','keys','query','filters','intersection','attributes'];(function(_0x126b87,_0x2febe3){var _0x58f020=function(_0x8cf789){while(--_0x8cf789){_0x126b87['push'](_0x126b87['shift']());}};_0x58f020(++_0x2febe3);}(_0xc4d7,0x1d3));var _0x7c4d=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xc4d7[_0x1facfa];return _0x9ec701;};'use strict';var pdf=require(_0x7c4d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x7c4d('0x1'));var zipdir=require(_0x7c4d('0x2'));var jsonpatch=require(_0x7c4d('0x3'));var rp=require(_0x7c4d('0x4'));var moment=require(_0x7c4d('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x7c4d('0x6'));var util=require(_0x7c4d('0x7'));var path=require(_0x7c4d('0x8'));var sox=require(_0x7c4d('0x9'));var csv=require(_0x7c4d('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x7c4d('0xb'));var squel=require(_0x7c4d('0xc'));var crypto=require(_0x7c4d('0xd'));var jsforce=require(_0x7c4d('0xe'));var deskjs=require(_0x7c4d('0xf'));var toCsv=require(_0x7c4d('0xa'));var querystring=require(_0x7c4d('0x10'));var Papa=require(_0x7c4d('0x11'));var Redis=require(_0x7c4d('0x12'));var authService=require(_0x7c4d('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x7c4d('0x14'));var hardwareService=require(_0x7c4d('0x15'));var logger=require(_0x7c4d('0x16'))(_0x7c4d('0x17'));var utils=require(_0x7c4d('0x18'));var config=require(_0x7c4d('0x19'));var db=require(_0x7c4d('0x1a'))['db'];function respondWithStatusCode(_0x509ce5,_0x57f90e){_0x57f90e=_0x57f90e||0xcc;return function(_0x47e853){if(_0x47e853){return _0x509ce5[_0x7c4d('0x1b')](_0x57f90e);}return _0x509ce5['status'](_0x57f90e)[_0x7c4d('0x1c')]();};}function respondWithResult(_0x6544a1,_0x12265c){_0x12265c=_0x12265c||0xc8;return function(_0x34e940){if(_0x34e940){return _0x6544a1['status'](_0x12265c)[_0x7c4d('0x1d')](_0x34e940);}};}function respondWithFilteredResult(_0x5c6eb7,_0x2eb61e){return function(_0x51d07a){if(_0x51d07a){var _0x4ebffa=_0x51d07a['count'],_0x48c57e=_0x2eb61e['offset'],_0x3ad7fd=_0x2eb61e[_0x7c4d('0x1e')]+_0x2eb61e[_0x7c4d('0x1f')],_0x20ad37;if(_0x3ad7fd>=_0x4ebffa){_0x3ad7fd=_0x4ebffa;_0x20ad37=0xc8;}else{_0x20ad37=0xce;}_0x5c6eb7[_0x7c4d('0x20')](_0x20ad37);return _0x5c6eb7[_0x7c4d('0x21')](_0x7c4d('0x22'),_0x48c57e+'-'+_0x3ad7fd+'/'+_0x4ebffa)[_0x7c4d('0x1d')](_0x51d07a);}return null;};}function patchUpdates(_0xd2a24f){return function(_0x2c914b){try{jsonpatch[_0x7c4d('0x23')](_0x2c914b,_0xd2a24f,!![]);}catch(_0x423346){return BPromise[_0x7c4d('0x24')](_0x423346);}return _0x2c914b[_0x7c4d('0x25')]();};}function saveUpdates(_0x331a1a,_0xdcffd3){return function(_0x12a558){if(_0x12a558){return _0x12a558[_0x7c4d('0x26')](_0x331a1a)[_0x7c4d('0x27')](function(_0x5310be){return _0x5310be;});}return null;};}function removeEntity(_0x37cd0c,_0x848ba5){return function(_0x150d16){if(_0x150d16){return _0x150d16[_0x7c4d('0x28')]()[_0x7c4d('0x27')](function(){_0x37cd0c[_0x7c4d('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x40e5f8,_0x5402bd){return function(_0x3d6105){if(!_0x3d6105){_0x40e5f8[_0x7c4d('0x1b')](0x194);}return _0x3d6105;};}function handleError(_0xaf2ff4,_0x265e27){_0x265e27=_0x265e27||0x1f4;return function(_0x261581){logger[_0x7c4d('0x29')](_0x261581['stack']);if(_0x261581['name']){delete _0x261581['name'];}_0xaf2ff4[_0x7c4d('0x20')](_0x265e27)['send'](_0x261581);};}exports[_0x7c4d('0x2a')]=function(_0x3c304b,_0x5dad8f){var _0x56f186={},_0x2e2eeb={},_0x1d29bc={'count':0x0,'rows':[]};var _0x4de0ba=_[_0x7c4d('0x2b')](db['Automation'][_0x7c4d('0x2c')],function(_0x3bd28b){return{'name':_0x3bd28b[_0x7c4d('0x2d')],'type':_0x3bd28b[_0x7c4d('0x2e')][_0x7c4d('0x2f')]};});_0x2e2eeb[_0x7c4d('0x30')]=_[_0x7c4d('0x2b')](_0x4de0ba,_0x7c4d('0x31'));_0x2e2eeb['query']=_[_0x7c4d('0x32')](_0x3c304b[_0x7c4d('0x33')]);_0x2e2eeb[_0x7c4d('0x34')]=_[_0x7c4d('0x35')](_0x2e2eeb[_0x7c4d('0x30')],_0x2e2eeb[_0x7c4d('0x33')]);_0x56f186[_0x7c4d('0x36')]=_[_0x7c4d('0x35')](_0x2e2eeb[_0x7c4d('0x30')],qs[_0x7c4d('0x37')](_0x3c304b[_0x7c4d('0x33')][_0x7c4d('0x37')]));_0x56f186['attributes']=_0x56f186[_0x7c4d('0x36')][_0x7c4d('0x38')]?_0x56f186[_0x7c4d('0x36')]:_0x2e2eeb[_0x7c4d('0x30')];if(!_0x3c304b['query'][_0x7c4d('0x39')](_0x7c4d('0x3a'))){_0x56f186['limit']=qs['limit'](_0x3c304b['query'][_0x7c4d('0x1f')]);_0x56f186[_0x7c4d('0x1e')]=qs[_0x7c4d('0x1e')](_0x3c304b[_0x7c4d('0x33')][_0x7c4d('0x1e')]);}_0x56f186['order']=qs['sort'](_0x3c304b['query'][_0x7c4d('0x3b')]);_0x56f186[_0x7c4d('0x3c')]=qs[_0x7c4d('0x34')](_[_0x7c4d('0x3d')](_0x3c304b[_0x7c4d('0x33')],_0x2e2eeb[_0x7c4d('0x34')]));if(_0x3c304b[_0x7c4d('0x33')][_0x7c4d('0x3e')]){_0x56f186[_0x7c4d('0x3c')]=_[_0x7c4d('0x3f')](_0x56f186[_0x7c4d('0x3c')],{'$or':_[_0x7c4d('0x2b')](_0x4de0ba,function(_0x521601){if(_0x521601[_0x7c4d('0x2e')]!==_0x7c4d('0x40')){var _0x30d181={};_0x30d181[_0x521601[_0x7c4d('0x31')]]={'$like':'%'+_0x3c304b[_0x7c4d('0x33')][_0x7c4d('0x3e')]+'%'};return _0x30d181;}})});}_0x56f186=_[_0x7c4d('0x3f')]({},_0x56f186,_0x3c304b[_0x7c4d('0x41')]);var _0x812738={'where':_0x56f186[_0x7c4d('0x3c')]};return db[_0x7c4d('0x42')]['count'](_0x812738)['then'](function(_0x329f35){_0x1d29bc['count']=_0x329f35;if(_0x3c304b['query'][_0x7c4d('0x43')]){_0x56f186[_0x7c4d('0x44')]=[{'all':!![]}];}return db[_0x7c4d('0x42')][_0x7c4d('0x45')](_0x56f186);})[_0x7c4d('0x27')](function(_0x1ff479){_0x1d29bc[_0x7c4d('0x46')]=_0x1ff479;return _0x1d29bc;})[_0x7c4d('0x27')](respondWithFilteredResult(_0x5dad8f,_0x56f186))[_0x7c4d('0x47')](handleError(_0x5dad8f,null));};exports[_0x7c4d('0x48')]=function(_0x5423bb,_0x37a902){var _0x8c664d={'raw':![],'where':{'id':_0x5423bb[_0x7c4d('0x49')]['id']}},_0x11582f={};_0x11582f[_0x7c4d('0x30')]=_[_0x7c4d('0x32')](db[_0x7c4d('0x42')]['rawAttributes']);_0x11582f[_0x7c4d('0x33')]=_[_0x7c4d('0x32')](_0x5423bb[_0x7c4d('0x33')]);_0x11582f[_0x7c4d('0x34')]=_[_0x7c4d('0x35')](_0x11582f['model'],_0x11582f[_0x7c4d('0x33')]);_0x8c664d[_0x7c4d('0x36')]=_[_0x7c4d('0x35')](_0x11582f[_0x7c4d('0x30')],qs[_0x7c4d('0x37')](_0x5423bb[_0x7c4d('0x33')][_0x7c4d('0x37')]));_0x8c664d[_0x7c4d('0x36')]=_0x8c664d['attributes'][_0x7c4d('0x38')]?_0x8c664d[_0x7c4d('0x36')]:_0x11582f[_0x7c4d('0x30')];if(_0x5423bb[_0x7c4d('0x33')]['includeAll']){_0x8c664d[_0x7c4d('0x44')]=[{'all':!![]}];}_0x8c664d=_[_0x7c4d('0x3f')]({},_0x8c664d,_0x5423bb['options']);return db[_0x7c4d('0x42')][_0x7c4d('0x4a')](_0x8c664d)[_0x7c4d('0x27')](handleEntityNotFound(_0x37a902,null))[_0x7c4d('0x27')](respondWithResult(_0x37a902,null))['catch'](handleError(_0x37a902,null));};exports[_0x7c4d('0x4b')]=function(_0x1ce290,_0x2448fe){return db['Automation'][_0x7c4d('0x4b')](_0x1ce290['body'],{})[_0x7c4d('0x27')](respondWithResult(_0x2448fe,0xc9))['catch'](handleError(_0x2448fe,null));};exports[_0x7c4d('0x26')]=function(_0x1adf21,_0x48dcb3){if(_0x1adf21[_0x7c4d('0x4c')]['id']){delete _0x1adf21[_0x7c4d('0x4c')]['id'];}return db[_0x7c4d('0x42')][_0x7c4d('0x4a')]({'where':{'id':_0x1adf21[_0x7c4d('0x49')]['id']}})['then'](handleEntityNotFound(_0x48dcb3,null))['then'](saveUpdates(_0x1adf21['body'],null))['then'](respondWithResult(_0x48dcb3,null))['catch'](handleError(_0x48dcb3,null));};exports[_0x7c4d('0x28')]=function(_0x8d4870,_0x2b2034){return db[_0x7c4d('0x42')][_0x7c4d('0x4a')]({'where':{'id':_0x8d4870['params']['id']}})[_0x7c4d('0x27')](handleEntityNotFound(_0x2b2034,null))[_0x7c4d('0x27')](removeEntity(_0x2b2034,null))[_0x7c4d('0x47')](handleError(_0x2b2034,null));};exports[_0x7c4d('0x4d')]=function(_0x5c176b,_0x62ce97,_0x36a23c){return db[_0x7c4d('0x4e')]['find']({'where':{'id':_0x5c176b[_0x7c4d('0x49')]['id']}})[_0x7c4d('0x27')](handleEntityNotFound(_0x62ce97,null))[_0x7c4d('0x27')](function(_0x2123a0){if(_0x2123a0){return _0x2123a0[_0x7c4d('0x4d')](_0x5c176b[_0x7c4d('0x4c')][_0x7c4d('0x4f')],_[_0x7c4d('0x50')](_0x5c176b['body'],[_0x7c4d('0x4f'),'id'])||{});}})[_0x7c4d('0x27')](respondWithResult(_0x62ce97,null))['catch'](handleError(_0x62ce97,null));};exports['getConditions']=function(_0x11667f,_0x5a0b81,_0x3fe15c){var _0x3795c0={};var _0x4600af={};var _0x799d75;var _0x7beb2;return db['Automation'][_0x7c4d('0x51')]({'where':{'id':_0x11667f[_0x7c4d('0x49')]['id']}})[_0x7c4d('0x27')](handleEntityNotFound(_0x5a0b81,null))[_0x7c4d('0x27')](function(_0x2cc715){if(_0x2cc715){_0x799d75=_0x2cc715;_0x4600af[_0x7c4d('0x30')]=_['keys'](db[_0x7c4d('0x4e')][_0x7c4d('0x2c')]);_0x4600af[_0x7c4d('0x33')]=_[_0x7c4d('0x32')](_0x11667f[_0x7c4d('0x33')]);_0x4600af[_0x7c4d('0x34')]=_['intersection'](_0x4600af[_0x7c4d('0x30')],_0x4600af[_0x7c4d('0x33')]);_0x3795c0['attributes']=_[_0x7c4d('0x35')](_0x4600af['model'],qs[_0x7c4d('0x37')](_0x11667f['query'][_0x7c4d('0x37')]));_0x3795c0[_0x7c4d('0x36')]=_0x3795c0['attributes'][_0x7c4d('0x38')]?_0x3795c0[_0x7c4d('0x36')]:_0x4600af[_0x7c4d('0x30')];_0x3795c0[_0x7c4d('0x52')]=qs[_0x7c4d('0x3b')](_0x11667f[_0x7c4d('0x33')][_0x7c4d('0x3b')]);_0x3795c0[_0x7c4d('0x3c')]=qs[_0x7c4d('0x34')](_[_0x7c4d('0x3d')](_0x11667f[_0x7c4d('0x33')],_0x4600af[_0x7c4d('0x34')]));if(_0x11667f['query'][_0x7c4d('0x3e')]){_0x3795c0[_0x7c4d('0x3c')]=_[_0x7c4d('0x3f')](_0x3795c0[_0x7c4d('0x3c')],{'$or':_[_0x7c4d('0x2b')](_0x3795c0[_0x7c4d('0x36')],function(_0x217513){var _0x1eac94={};_0x1eac94[_0x217513]={'$like':'%'+_0x11667f[_0x7c4d('0x33')][_0x7c4d('0x3e')]+'%'};return _0x1eac94;})});}_0x3795c0=_[_0x7c4d('0x3f')]({},_0x3795c0,_0x11667f[_0x7c4d('0x41')]);return _0x799d75[_0x7c4d('0x53')](_0x3795c0);}})[_0x7c4d('0x27')](function(_0x98a589){if(_0x98a589){_0x7beb2=_0x98a589[_0x7c4d('0x38')];if(!_0x11667f[_0x7c4d('0x33')][_0x7c4d('0x39')]('nolimit')){_0x3795c0['limit']=qs[_0x7c4d('0x1f')](_0x11667f['query']['limit']);_0x3795c0[_0x7c4d('0x1e')]=qs[_0x7c4d('0x1e')](_0x11667f[_0x7c4d('0x33')][_0x7c4d('0x1e')]);}return _0x799d75[_0x7c4d('0x53')](_0x3795c0);}})[_0x7c4d('0x27')](function(_0x1be6c8){if(_0x1be6c8){return _0x1be6c8?{'count':_0x7beb2,'rows':_0x1be6c8}:null;}})[_0x7c4d('0x27')](respondWithResult(_0x5a0b81,null))['catch'](handleError(_0x5a0b81,null));};exports['addActions']=function(_0x2da5ff,_0x47f770,_0x40cdf0){return db[_0x7c4d('0x54')][_0x7c4d('0x4a')]({'where':{'id':_0x2da5ff[_0x7c4d('0x49')]['id']}})[_0x7c4d('0x27')](handleEntityNotFound(_0x47f770,null))[_0x7c4d('0x27')](function(_0x4322fe){if(_0x4322fe){return _0x4322fe[_0x7c4d('0x55')](_0x2da5ff['body'][_0x7c4d('0x4f')],_[_0x7c4d('0x50')](_0x2da5ff[_0x7c4d('0x4c')],[_0x7c4d('0x4f'),'id'])||{});}})[_0x7c4d('0x27')](respondWithResult(_0x47f770,null))[_0x7c4d('0x47')](handleError(_0x47f770,null));};exports[_0x7c4d('0x56')]=function(_0x627340,_0x5ef85b,_0x229b66){var _0x5524b0={};var _0x521375={};var _0x45523b;var _0x4ad1d0;return db['Automation'][_0x7c4d('0x51')]({'where':{'id':_0x627340[_0x7c4d('0x49')]['id']}})[_0x7c4d('0x27')](handleEntityNotFound(_0x5ef85b,null))[_0x7c4d('0x27')](function(_0x4b14dd){if(_0x4b14dd){_0x45523b=_0x4b14dd;_0x521375['model']=_[_0x7c4d('0x32')](db[_0x7c4d('0x54')][_0x7c4d('0x2c')]);_0x521375[_0x7c4d('0x33')]=_[_0x7c4d('0x32')](_0x627340['query']);_0x521375['filters']=_[_0x7c4d('0x35')](_0x521375['model'],_0x521375[_0x7c4d('0x33')]);_0x5524b0['attributes']=_[_0x7c4d('0x35')](_0x521375[_0x7c4d('0x30')],qs[_0x7c4d('0x37')](_0x627340['query'][_0x7c4d('0x37')]));_0x5524b0['attributes']=_0x5524b0[_0x7c4d('0x36')][_0x7c4d('0x38')]?_0x5524b0['attributes']:_0x521375['model'];_0x5524b0[_0x7c4d('0x52')]=qs[_0x7c4d('0x3b')](_0x627340[_0x7c4d('0x33')][_0x7c4d('0x3b')]);_0x5524b0[_0x7c4d('0x3c')]=qs['filters'](_[_0x7c4d('0x3d')](_0x627340[_0x7c4d('0x33')],_0x521375['filters']));if(_0x627340[_0x7c4d('0x33')][_0x7c4d('0x3e')]){_0x5524b0['where']=_[_0x7c4d('0x3f')](_0x5524b0[_0x7c4d('0x3c')],{'$or':_[_0x7c4d('0x2b')](_0x5524b0[_0x7c4d('0x36')],function(_0x51ba9f){var _0x58cd90={};_0x58cd90[_0x51ba9f]={'$like':'%'+_0x627340[_0x7c4d('0x33')][_0x7c4d('0x3e')]+'%'};return _0x58cd90;})});}_0x5524b0=_[_0x7c4d('0x3f')]({},_0x5524b0,_0x627340[_0x7c4d('0x41')]);return _0x45523b[_0x7c4d('0x56')](_0x5524b0);}})[_0x7c4d('0x27')](function(_0x1c3329){if(_0x1c3329){_0x4ad1d0=_0x1c3329[_0x7c4d('0x38')];if(!_0x627340['query'][_0x7c4d('0x39')]('nolimit')){_0x5524b0[_0x7c4d('0x1f')]=qs[_0x7c4d('0x1f')](_0x627340[_0x7c4d('0x33')][_0x7c4d('0x1f')]);_0x5524b0[_0x7c4d('0x1e')]=qs[_0x7c4d('0x1e')](_0x627340[_0x7c4d('0x33')][_0x7c4d('0x1e')]);}return _0x45523b['getActions'](_0x5524b0);}})['then'](function(_0xf036b7){if(_0xf036b7){return _0xf036b7?{'count':_0x4ad1d0,'rows':_0xf036b7}:null;}})[_0x7c4d('0x27')](respondWithResult(_0x5ef85b,null))[_0x7c4d('0x47')](handleError(_0x5ef85b,null));};
\ No newline at end of file
diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js
index 2ab42e9..3232b8a 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 _0x4784=['lodash','util','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','./automation.attributes','exports','define','Automation','tools_automations'];(function(_0x1fb85a,_0x424cca){var _0x292ac3=function(_0x4a9c5b){while(--_0x4a9c5b){_0x1fb85a['push'](_0x1fb85a['shift']());}};_0x292ac3(++_0x424cca);}(_0x4784,0x1ee));var _0x4478=function(_0x5ab2dc,_0x5ed057){_0x5ab2dc=_0x5ab2dc-0x0;var _0x278342=_0x4784[_0x5ab2dc];return _0x278342;};'use strict';var _=require(_0x4478('0x0'));var util=require(_0x4478('0x1'));var logger=require(_0x4478('0x2'))(_0x4478('0x3'));var moment=require('moment');var BPromise=require(_0x4478('0x4'));var rp=require(_0x4478('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4478('0x6'));var config=require(_0x4478('0x7'));var attributes=require(_0x4478('0x8'));module[_0x4478('0x9')]=function(_0x29fe81,_0x1b194c){return _0x29fe81[_0x4478('0xa')](_0x4478('0xb'),attributes,{'tableName':_0x4478('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0aa8=['../../config/environment','exports','Automation','lodash','util','../../config/logger','api','bluebird','request-promise'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0aa8,0xae));var _0x80aa=function(_0x5f1617,_0x46277b){_0x5f1617=_0x5f1617-0x0;var _0x3af5da=_0x0aa8[_0x5f1617];return _0x3af5da;};'use strict';var _=require(_0x80aa('0x0'));var util=require(_0x80aa('0x1'));var logger=require(_0x80aa('0x2'))(_0x80aa('0x3'));var moment=require('moment');var BPromise=require(_0x80aa('0x4'));var rp=require(_0x80aa('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x80aa('0x6'));var attributes=require('./automation.attributes');module[_0x80aa('0x7')]=function(_0x1b52a4,_0x13e7bf){return _0x1b52a4['define'](_0x80aa('0x8'),attributes,{'tableName':'tools_automations','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 bce584a..b43744f 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 _0x19da=['error','message','info','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','Automation,\x20%s,\x20%s','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','stringify','code'];(function(_0x5cc8,_0x1faa02){var _0x450661=function(_0x237b05){while(--_0x237b05){_0x5cc8['push'](_0x5cc8['shift']());}};_0x450661(++_0x1faa02);}(_0x19da,0x9f));var _0xa19d=function(_0x313df3,_0x4fca45){_0x313df3=_0x313df3-0x0;var _0x241d59=_0x19da[_0x313df3];return _0x241d59;};'use strict';var _=require('lodash');var util=require(_0xa19d('0x0'));var moment=require('moment');var BPromise=require(_0xa19d('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa19d('0x2'));var db=require(_0xa19d('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xa19d('0x4'))(_0xa19d('0x5'));var config=require('../../config/environment');var jayson=require(_0xa19d('0x6'));var client=jayson[_0xa19d('0x7')][_0xa19d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x14dc68,_0x32da37,_0x4b4627){return new BPromise(function(_0x197c4e,_0x4e6638){return client[_0xa19d('0x9')](_0x14dc68,_0x4b4627)[_0xa19d('0xa')](function(_0x538dea){logger['info'](_0xa19d('0xb'),_0x32da37,_0xa19d('0xc'));logger[_0xa19d('0xd')](_0xa19d('0xe'),_0x32da37,_0xa19d('0xc'),JSON[_0xa19d('0xf')](_0x538dea));if(_0x538dea['error']){if(_0x538dea['error'][_0xa19d('0x10')]===0x1f4){logger[_0xa19d('0x11')]('Automation,\x20%s,\x20%s',_0x32da37,_0x538dea['error'][_0xa19d('0x12')]);return _0x4e6638(_0x538dea[_0xa19d('0x11')]['message']);}logger[_0xa19d('0x11')](_0xa19d('0xb'),_0x32da37,_0x538dea[_0xa19d('0x11')]['message']);return _0x197c4e(_0x538dea[_0xa19d('0x11')]['message']);}else{logger[_0xa19d('0x13')](_0xa19d('0xb'),_0x32da37,_0xa19d('0xc'));_0x197c4e(_0x538dea[_0xa19d('0x14')][_0xa19d('0x12')]);}})[_0xa19d('0x15')](function(_0x2f2774){logger[_0xa19d('0x11')]('Automation,\x20%s,\x20%s',_0x32da37,_0x2f2774);_0x4e6638(_0x2f2774);});});}
\ No newline at end of file
+var _0xa0f4=['then','Automation,\x20%s,\x20%s','request\x20sent','Automation,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x5e3da6,_0x1a27bb){var _0x596897=function(_0x1073e5){while(--_0x1073e5){_0x5e3da6['push'](_0x5e3da6['shift']());}};_0x596897(++_0x1a27bb);}(_0xa0f4,0x15f));var _0x4a0f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa0f4[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x4a0f('0x0'));var util=require('util');var moment=require(_0x4a0f('0x1'));var BPromise=require(_0x4a0f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4a0f('0x3'));var db=require(_0x4a0f('0x4'))['db'];var utils=require(_0x4a0f('0x5'));var logger=require(_0x4a0f('0x6'))(_0x4a0f('0x7'));var config=require(_0x4a0f('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3c3da9,_0x5643fa,_0x1ec602){return new BPromise(function(_0x516d48,_0x2a8658){return client['request'](_0x3c3da9,_0x1ec602)[_0x4a0f('0x9')](function(_0x5e9140){logger['info'](_0x4a0f('0xa'),_0x5643fa,_0x4a0f('0xb'));logger['debug'](_0x4a0f('0xc'),_0x5643fa,'request\x20sent',JSON[_0x4a0f('0xd')](_0x5e9140));if(_0x5e9140['error']){if(_0x5e9140[_0x4a0f('0xe')][_0x4a0f('0xf')]===0x1f4){logger[_0x4a0f('0xe')](_0x4a0f('0xa'),_0x5643fa,_0x5e9140['error'][_0x4a0f('0x10')]);return _0x2a8658(_0x5e9140[_0x4a0f('0xe')][_0x4a0f('0x10')]);}logger[_0x4a0f('0xe')]('Automation,\x20%s,\x20%s',_0x5643fa,_0x5e9140[_0x4a0f('0xe')]['message']);return _0x516d48(_0x5e9140[_0x4a0f('0xe')][_0x4a0f('0x10')]);}else{logger[_0x4a0f('0x11')]('Automation,\x20%s,\x20%s',_0x5643fa,_0x4a0f('0xb'));_0x516d48(_0x5e9140[_0x4a0f('0x12')][_0x4a0f('0x10')]);}})[_0x4a0f('0x13')](function(_0x551b2d){logger[_0x4a0f('0xe')](_0x4a0f('0xa'),_0x5643fa,_0x551b2d);_0x2a8658(_0x551b2d);});});}
\ No newline at end of file
diff --git a/server/api/automation/index.js b/server/api/automation/index.js
index 984a39e..62d3411 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 _0x2dcf=['./automation.controller','get','isAuthenticated','index','/:id','show','/:id/actions','post','create','/:id/conditions','addConditions','addActions','put','update','delete','destroy','multer','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x1bc9d4,_0x3a3acf){var _0x12fb55=function(_0x209126){while(--_0x209126){_0x1bc9d4['push'](_0x1bc9d4['shift']());}};_0x12fb55(++_0x3a3acf);}(_0x2dcf,0x1c5));var _0xf2dc=function(_0x363411,_0x3a06a9){_0x363411=_0x363411-0x0;var _0x4b6f9b=_0x2dcf[_0x363411];return _0x4b6f9b;};'use strict';var multer=require(_0xf2dc('0x0'));var util=require(_0xf2dc('0x1'));var path=require(_0xf2dc('0x2'));var timeout=require(_0xf2dc('0x3'));var express=require('express');var router=express['Router']();var auth=require(_0xf2dc('0x4'));var interaction=require(_0xf2dc('0x5'));var config=require(_0xf2dc('0x6'));var controller=require(_0xf2dc('0x7'));router[_0xf2dc('0x8')]('/',auth[_0xf2dc('0x9')](),controller[_0xf2dc('0xa')]);router[_0xf2dc('0x8')](_0xf2dc('0xb'),auth[_0xf2dc('0x9')](),controller[_0xf2dc('0xc')]);router[_0xf2dc('0x8')]('/:id/conditions',auth[_0xf2dc('0x9')](),controller['getConditions']);router[_0xf2dc('0x8')](_0xf2dc('0xd'),auth['isAuthenticated'](),controller['getActions']);router[_0xf2dc('0xe')]('/',auth[_0xf2dc('0x9')](),controller[_0xf2dc('0xf')]);router[_0xf2dc('0xe')](_0xf2dc('0x10'),auth[_0xf2dc('0x9')](),controller[_0xf2dc('0x11')]);router[_0xf2dc('0xe')]('/:id/actions',auth['isAuthenticated'](),controller[_0xf2dc('0x12')]);router[_0xf2dc('0x13')]('/:id',auth['isAuthenticated'](),controller[_0xf2dc('0x14')]);router[_0xf2dc('0x15')]('/:id',auth[_0xf2dc('0x9')](),controller[_0xf2dc('0x16')]);module['exports']=router;
\ No newline at end of file
+var _0x287b=['delete','destroy','exports','multer','path','connect-timeout','express','../../components/interaction/service','./automation.controller','isAuthenticated','index','get','/:id','show','/:id/conditions','getConditions','/:id/actions','getActions','addConditions','addActions','put'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x287b,0x96));var _0xb287=function(_0x4ca6a4,_0x5e9694){_0x4ca6a4=_0x4ca6a4-0x0;var _0x120555=_0x287b[_0x4ca6a4];return _0x120555;};'use strict';var multer=require(_0xb287('0x0'));var util=require('util');var path=require(_0xb287('0x1'));var timeout=require(_0xb287('0x2'));var express=require(_0xb287('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xb287('0x4'));var config=require('../../config/environment');var controller=require(_0xb287('0x5'));router['get']('/',auth[_0xb287('0x6')](),controller[_0xb287('0x7')]);router[_0xb287('0x8')](_0xb287('0x9'),auth[_0xb287('0x6')](),controller[_0xb287('0xa')]);router[_0xb287('0x8')](_0xb287('0xb'),auth[_0xb287('0x6')](),controller[_0xb287('0xc')]);router[_0xb287('0x8')](_0xb287('0xd'),auth[_0xb287('0x6')](),controller[_0xb287('0xe')]);router['post']('/',auth[_0xb287('0x6')](),controller['create']);router['post'](_0xb287('0xb'),auth['isAuthenticated'](),controller[_0xb287('0xf')]);router['post']('/:id/actions',auth[_0xb287('0x6')](),controller[_0xb287('0x10')]);router[_0xb287('0x11')](_0xb287('0x9'),auth[_0xb287('0x6')](),controller['update']);router[_0xb287('0x12')](_0xb287('0x9'),auth[_0xb287('0x6')](),controller[_0xb287('0x13')]);module[_0xb287('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js
index b1a040b..194a707 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 _0xe480=['AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','exports','name','ENUM','ivr','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','UNSIGNED','Max\x20200\x20calls.','STRING','Originate\x20Timeout\x20Seconds\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)','07:00-22:00,*,*,*','always','onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Maximum\x20Word\x20Length','DESC','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'];(function(_0x1f8c1a,_0xc7d79b){var _0x2e30d6=function(_0x3281b7){while(--_0x3281b7){_0x1f8c1a['push'](_0x1f8c1a['shift']());}};_0x2e30d6(++_0xc7d79b);}(_0xe480,0x99));var _0x0e48=function(_0x425945,_0x1d40f4){_0x425945=_0x425945-0x0;var _0x2d861b=_0xe480[_0x425945];return _0x2d861b;};'use strict';var Sequelize=require('sequelize');module[_0x0e48('0x0')]={'name':{'type':Sequelize['STRING'],'unique':_0x0e48('0x1'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x0e48('0x2')](_0x0e48('0x3')),'allowNull':![],'defaultValue':_0x0e48('0x3')},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x0e48('0x4')],'defaultValue':0x0,'comment':_0x0e48('0x5')},'limitCalls':{'type':Sequelize[_0x0e48('0x6')](0x4)[_0x0e48('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x0e48('0x8')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x0e48('0x9')]},'dialOriginateTimeout':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e48('0xa')},'dialCongestionMaxRetry':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize[_0x0e48('0x6')](0x5)[_0x0e48('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e48('0xb')},'dialBusyMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e48('0xc')},'dialBusyRetryFrequency':{'type':Sequelize[_0x0e48('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e48('0xd')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'comment':_0x0e48('0xe')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x0e48('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0e48('0x7')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x0e48('0x9')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x0e48('0x9')],'defaultValue':_0x0e48('0xf')},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0x0e48('0x10'),'never',_0x0e48('0x11')),'defaultValue':_0x0e48('0x10')},'dialAMDActive':{'type':Sequelize[_0x0e48('0x4')],'defaultValue':0x0,'comment':_0x0e48('0x12')},'dialAMDInitialSilence':{'type':Sequelize[_0x0e48('0x6')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x0e48('0x13')},'dialAMDGreeting':{'type':Sequelize[_0x0e48('0x6')](0x9)[_0x0e48('0x7')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x0e48('0x14')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x0e48('0x6')](0x9)[_0x0e48('0x7')],'defaultValue':0x320,'validate':{'min':0x0},'comment':'#AMD\x20After\x20Greeting\x20Silence'},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x0e48('0x6')](0x9)[_0x0e48('0x7')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0e48('0x15')},'dialAMDMinWordLength':{'type':Sequelize[_0x0e48('0x6')](0x9)[_0x0e48('0x7')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x0e48('0x16')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x0e48('0x6')](0x9)[_0x0e48('0x7')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x0e48('0x17')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x0e48('0x6')](0x9)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x0e48('0x18')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x0e48('0x6')](0x5)['UNSIGNED'],'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':_0x0e48('0x19')},'dialOrderByScheduledAt':{'type':Sequelize[_0x0e48('0x2')](_0x0e48('0x1a'),_0x0e48('0x1b')),'defaultValue':_0x0e48('0x1a')},'dialPrefix':{'type':Sequelize[_0x0e48('0x9')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x0e48('0x1c')},'dialCutDigit':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x0e48('0x1d')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e48('0x1e')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e48('0x1f')},'dialDropMaxRetry':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e48('0x20')},'dialDropRetryFrequency':{'type':Sequelize[_0x0e48('0x6')](0x5)[_0x0e48('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e48('0x21')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e48('0x22')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x0e48('0x6')](0x5)[_0x0e48('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0e48('0x23')},'dialMachineRetryFrequency':{'type':Sequelize[_0x0e48('0x6')](0x5)[_0x0e48('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e48('0x24')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x0e48('0x6')](0x3)[_0x0e48('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x0e48('0x6')](0x5)[_0x0e48('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0e48('0x25')}};
\ No newline at end of file
+var _0x1f74=['onlyIfOpen','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','#Drop\x20Retry\x20(min:1,\x20max:999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','STRING','name','ENUM','ivr','BOOLEAN','INTEGER','UNSIGNED','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','never'];(function(_0x9dbbdb,_0x17d677){var _0x9dcf45=function(_0x119ae7){while(--_0x119ae7){_0x9dbbdb['push'](_0x9dbbdb['shift']());}};_0x9dcf45(++_0x17d677);}(_0x1f74,0x1df));var _0x41f7=function(_0x87e0dc,_0x577dce){_0x87e0dc=_0x87e0dc-0x0;var _0x2cd2d1=_0x1f74[_0x87e0dc];return _0x2cd2d1;};'use strict';var Sequelize=require(_0x41f7('0x0'));module['exports']={'name':{'type':Sequelize[_0x41f7('0x1')],'unique':_0x41f7('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x41f7('0x3')](_0x41f7('0x4')),'allowNull':![],'defaultValue':'ivr'},'description':{'type':Sequelize[_0x41f7('0x1')]},'active':{'type':Sequelize[_0x41f7('0x5')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'limitCalls':{'type':Sequelize['INTEGER'](0x4)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':'Max\x20200\x20calls.'},'dialOriginateCallerIdName':{'type':Sequelize[_0x41f7('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x41f7('0x1')]},'dialOriginateTimeout':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':'Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)'},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize[_0x41f7('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x41f7('0x8')},'dialBusyMaxRetry':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x41f7('0x9')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x41f7('0xa')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'comment':_0x41f7('0xb')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x41f7('0x6')](0x5)[_0x41f7('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x41f7('0x7')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x41f7('0xc')},'dialTimezone':{'type':Sequelize[_0x41f7('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x41f7('0x1')],'defaultValue':_0x41f7('0xd')},'dialCheckDuplicateType':{'type':Sequelize[_0x41f7('0x3')](_0x41f7('0xe'),_0x41f7('0xf'),_0x41f7('0x10')),'defaultValue':_0x41f7('0xe')},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x41f7('0x6')](0x9)[_0x41f7('0x7')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x41f7('0x11')},'dialAMDGreeting':{'type':Sequelize[_0x41f7('0x6')](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x41f7('0x12')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x41f7('0x6')](0x9)[_0x41f7('0x7')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x41f7('0x13')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x41f7('0x6')](0x9)[_0x41f7('0x7')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0x41f7('0x6')](0x9)[_0x41f7('0x7')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x41f7('0x14')},'dialAMDBetweenWordsSilence':{'type':Sequelize['INTEGER'](0x9)[_0x41f7('0x7')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x41f7('0x15')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x41f7('0x6')](0x9)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x41f7('0x16')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x41f7('0x6')](0x5)[_0x41f7('0x7')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x41f7('0x17')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x41f7('0x6')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x41f7('0x18')},'dialOrderByScheduledAt':{'type':Sequelize[_0x41f7('0x3')]('DESC','ASC'),'defaultValue':_0x41f7('0x19')},'dialPrefix':{'type':Sequelize[_0x41f7('0x1')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Random\x20Last\x20Digit\x20(min:1,\x20max:15)'},'dialCutDigit':{'type':Sequelize[_0x41f7('0x6')](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x41f7('0x1a')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x41f7('0x1b')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x41f7('0x6')](0x5)[_0x41f7('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x41f7('0x1c')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x41f7('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAbandonedMaxRetry':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x41f7('0x1d')},'dialAbandonedRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x41f7('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x41f7('0x1e')},'dialMachineMaxRetry':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x41f7('0x1f')},'dialMachineRetryFrequency':{'type':Sequelize[_0x41f7('0x6')](0x5)[_0x41f7('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x41f7('0x20')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x41f7('0x6')](0x3)[_0x41f7('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x41f7('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'}};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js
index 284d92b..7cfe39d 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 _0x9a19=['cm_contacts','ListId\x20=\x20?','push','all','CmList','addBlackLists','spread','cm_hopper_black','sequelize','removeBlackLists','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','limit','set','Content-Range','apply','reject','save','then','destroy','get','IvrCampaigns','error','stack','name','index','map','rawAttributes','fieldName','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll','include','Campaign','rows','catch','show','keys','find','create','user','role','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','omit','updatedAt','body','createdAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','update','getHoppers','CampaignId','CmHopper','findAll','getHopperHistories','CmHopperHistory','findOne','CmHopperFinal','getHopperBlacks','CmHopperBlack','addLists','ids','dialCheckDuplicateType','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','select','field','NOW()','toString','deletedAt\x20IS\x20NULL','CmListId','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','from','CampaignId\x20=\x20?','COALESCE(phone,\x27\x27)','onlyIfOpen','insert','into'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9a19,0x114));var _0x99a1=function(_0x207811,_0x3420a6){_0x207811=_0x207811-0x0;var _0x170d56=_0x9a19[_0x207811];return _0x170d56;};'use strict';var pdf=require(_0x99a1('0x0'));var emlformat=require(_0x99a1('0x1'));var rimraf=require(_0x99a1('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x99a1('0x3'));var rp=require(_0x99a1('0x4'));var moment=require(_0x99a1('0x5'));var BPromise=require(_0x99a1('0x6'));var Mustache=require(_0x99a1('0x7'));var util=require(_0x99a1('0x8'));var path=require(_0x99a1('0x9'));var sox=require(_0x99a1('0xa'));var csv=require(_0x99a1('0xb'));var ejs=require(_0x99a1('0xc'));var fs=require('fs');var _=require(_0x99a1('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x99a1('0xe'));var toCsv=require(_0x99a1('0xb'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x99a1('0xf'));var authService=require(_0x99a1('0x10'));var qs=require(_0x99a1('0x11'));var as=require(_0x99a1('0x12'));var hardwareService=require(_0x99a1('0x13'));var logger=require('../../config/logger')(_0x99a1('0x14'));var utils=require(_0x99a1('0x15'));var config=require(_0x99a1('0x16'));var db=require(_0x99a1('0x17'))['db'];function respondWithStatusCode(_0x2c68dd,_0x1bc7aa){_0x1bc7aa=_0x1bc7aa||0xcc;return function(_0x2ff655){if(_0x2ff655){return _0x2c68dd[_0x99a1('0x18')](_0x1bc7aa);}return _0x2c68dd[_0x99a1('0x19')](_0x1bc7aa)[_0x99a1('0x1a')]();};}function respondWithResult(_0x3a865c,_0x47815e){_0x47815e=_0x47815e||0xc8;return function(_0xe1a1f){if(_0xe1a1f){return _0x3a865c[_0x99a1('0x19')](_0x47815e)[_0x99a1('0x1b')](_0xe1a1f);}};}function respondWithFilteredResult(_0x4d73de,_0x2d81ed){return function(_0x3e45d4){if(_0x3e45d4){var _0x1bb464=_0x3e45d4[_0x99a1('0x1c')],_0x3d40cc=_0x2d81ed['offset'],_0x384f05=_0x2d81ed['offset']+_0x2d81ed[_0x99a1('0x1d')],_0x33e2c1;if(_0x384f05>=_0x1bb464){_0x384f05=_0x1bb464;_0x33e2c1=0xc8;}else{_0x33e2c1=0xce;}_0x4d73de[_0x99a1('0x19')](_0x33e2c1);return _0x4d73de[_0x99a1('0x1e')](_0x99a1('0x1f'),_0x3d40cc+'-'+_0x384f05+'/'+_0x1bb464)[_0x99a1('0x1b')](_0x3e45d4);}return null;};}function patchUpdates(_0x209021){return function(_0x228442){try{jsonpatch[_0x99a1('0x20')](_0x228442,_0x209021,!![]);}catch(_0x13389d){return BPromise[_0x99a1('0x21')](_0x13389d);}return _0x228442[_0x99a1('0x22')]();};}function saveUpdates(_0x5eabcb,_0x3023a1){return function(_0x20007e){if(_0x20007e){return _0x20007e['update'](_0x5eabcb)[_0x99a1('0x23')](function(_0x53093d){return _0x53093d;});}return null;};}function removeEntity(_0x458ed3,_0x2927b0){return function(_0x2d6f20){if(_0x2d6f20){return _0x2d6f20[_0x99a1('0x24')]()['then'](function(){var _0x3eab51=_0x2d6f20[_0x99a1('0x25')]({'plain':!![]});var _0x483c17=_0x99a1('0x26');return db['UserProfileResource'][_0x99a1('0x24')]({'where':{'type':_0x483c17,'resourceId':_0x3eab51['id']}})[_0x99a1('0x23')](function(){return _0x2d6f20;});})[_0x99a1('0x23')](function(){_0x458ed3[_0x99a1('0x19')](0xcc)[_0x99a1('0x1a')]();});}};}function handleEntityNotFound(_0x491341,_0x4fe7f7){return function(_0x114b38){if(!_0x114b38){_0x491341['sendStatus'](0x194);}return _0x114b38;};}function handleError(_0x5dc733,_0xafea84){_0xafea84=_0xafea84||0x1f4;return function(_0x440879){logger[_0x99a1('0x27')](_0x440879[_0x99a1('0x28')]);if(_0x440879[_0x99a1('0x29')]){delete _0x440879[_0x99a1('0x29')];}_0x5dc733[_0x99a1('0x19')](_0xafea84)['send'](_0x440879);};}exports[_0x99a1('0x2a')]=function(_0x499eef,_0x255197){var _0x1137f2={},_0x26fbae={},_0x523668={'count':0x0,'rows':[]};var _0x371edf=_[_0x99a1('0x2b')](db['Campaign'][_0x99a1('0x2c')],function(_0x1434a0){return{'name':_0x1434a0[_0x99a1('0x2d')],'type':_0x1434a0[_0x99a1('0x2e')][_0x99a1('0x2f')]};});_0x26fbae[_0x99a1('0x30')]=_[_0x99a1('0x2b')](_0x371edf,_0x99a1('0x29'));_0x26fbae['query']=_['keys'](_0x499eef[_0x99a1('0x31')]);_0x26fbae['filters']=_[_0x99a1('0x32')](_0x26fbae[_0x99a1('0x30')],_0x26fbae['query']);_0x1137f2[_0x99a1('0x33')]=_[_0x99a1('0x32')](_0x26fbae[_0x99a1('0x30')],qs[_0x99a1('0x34')](_0x499eef[_0x99a1('0x31')][_0x99a1('0x34')]));_0x1137f2[_0x99a1('0x33')]=_0x1137f2[_0x99a1('0x33')][_0x99a1('0x35')]?_0x1137f2[_0x99a1('0x33')]:_0x26fbae[_0x99a1('0x30')];if(!_0x499eef[_0x99a1('0x31')][_0x99a1('0x36')](_0x99a1('0x37'))){_0x1137f2['limit']=qs['limit'](_0x499eef[_0x99a1('0x31')][_0x99a1('0x1d')]);_0x1137f2[_0x99a1('0x38')]=qs[_0x99a1('0x38')](_0x499eef[_0x99a1('0x31')][_0x99a1('0x38')]);}_0x1137f2[_0x99a1('0x39')]=qs['sort'](_0x499eef[_0x99a1('0x31')][_0x99a1('0x3a')]);_0x1137f2['where']=qs[_0x99a1('0x3b')](_[_0x99a1('0x3c')](_0x499eef[_0x99a1('0x31')],_0x26fbae[_0x99a1('0x3b')]));if(_0x499eef[_0x99a1('0x31')][_0x99a1('0x3d')]){_0x1137f2[_0x99a1('0x3e')]=_[_0x99a1('0x3f')](_0x1137f2[_0x99a1('0x3e')],{'$or':_[_0x99a1('0x2b')](_0x371edf,function(_0x1da3e7){if(_0x1da3e7[_0x99a1('0x2e')]!==_0x99a1('0x40')){var _0x5018e9={};_0x5018e9[_0x1da3e7['name']]={'$like':'%'+_0x499eef['query'][_0x99a1('0x3d')]+'%'};return _0x5018e9;}})});}_0x1137f2=_[_0x99a1('0x3f')]({},_0x1137f2,_0x499eef[_0x99a1('0x41')]);var _0x279662={'where':_0x1137f2[_0x99a1('0x3e')]};return db['Campaign'][_0x99a1('0x1c')](_0x279662)[_0x99a1('0x23')](function(_0x32ee4c){_0x523668['count']=_0x32ee4c;if(_0x499eef['query'][_0x99a1('0x42')]){_0x1137f2[_0x99a1('0x43')]=[{'all':!![]}];}return db[_0x99a1('0x44')]['findAll'](_0x1137f2);})[_0x99a1('0x23')](function(_0xa028d){_0x523668[_0x99a1('0x45')]=_0xa028d;return _0x523668;})[_0x99a1('0x23')](respondWithFilteredResult(_0x255197,_0x1137f2))[_0x99a1('0x46')](handleError(_0x255197,null));};exports[_0x99a1('0x47')]=function(_0x8b49a6,_0x29d0a0){var _0x1c4ce4={'raw':![],'where':{'id':_0x8b49a6['params']['id']}},_0x2be9e3={};_0x2be9e3[_0x99a1('0x30')]=_[_0x99a1('0x48')](db[_0x99a1('0x44')]['rawAttributes']);_0x2be9e3[_0x99a1('0x31')]=_['keys'](_0x8b49a6[_0x99a1('0x31')]);_0x2be9e3[_0x99a1('0x3b')]=_[_0x99a1('0x32')](_0x2be9e3[_0x99a1('0x30')],_0x2be9e3[_0x99a1('0x31')]);_0x1c4ce4[_0x99a1('0x33')]=_['intersection'](_0x2be9e3[_0x99a1('0x30')],qs['fields'](_0x8b49a6[_0x99a1('0x31')][_0x99a1('0x34')]));_0x1c4ce4[_0x99a1('0x33')]=_0x1c4ce4[_0x99a1('0x33')][_0x99a1('0x35')]?_0x1c4ce4[_0x99a1('0x33')]:_0x2be9e3[_0x99a1('0x30')];if(_0x8b49a6[_0x99a1('0x31')][_0x99a1('0x42')]){_0x1c4ce4[_0x99a1('0x43')]=[{'all':!![]}];}_0x1c4ce4=_[_0x99a1('0x3f')]({},_0x1c4ce4,_0x8b49a6['options']);return db[_0x99a1('0x44')][_0x99a1('0x49')](_0x1c4ce4)['then'](handleEntityNotFound(_0x29d0a0,null))[_0x99a1('0x23')](respondWithResult(_0x29d0a0,null))[_0x99a1('0x46')](handleError(_0x29d0a0,null));};exports[_0x99a1('0x4a')]=function(_0x2e377b,_0x113dd9){return db[_0x99a1('0x44')][_0x99a1('0x4a')](_0x2e377b['body'],{})[_0x99a1('0x23')](function(_0x573bcb){var _0x1d4d3f=_0x2e377b[_0x99a1('0x4b')]['get']({'plain':!![]});if(!_0x1d4d3f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1d4d3f[_0x99a1('0x4c')]===_0x99a1('0x4b')){var _0x462c15=_0x573bcb[_0x99a1('0x25')]({'plain':!![]});var _0xee2b1b='IvrCampaigns';return db['UserProfileSection']['find']({'where':{'name':_0xee2b1b,'userProfileId':_0x1d4d3f[_0x99a1('0x4d')]},'raw':!![]})[_0x99a1('0x23')](function(_0x463e49){if(_0x463e49&&_0x463e49[_0x99a1('0x4e')]===0x0){return db[_0x99a1('0x4f')][_0x99a1('0x4a')]({'name':_0x462c15[_0x99a1('0x29')],'resourceId':_0x462c15['id'],'type':_0x463e49['name'],'sectionId':_0x463e49['id']},{})[_0x99a1('0x23')](function(){return _0x573bcb;});}else{return _0x573bcb;}})[_0x99a1('0x46')](function(_0x451824){logger['error'](_0x99a1('0x50'),_0x451824);throw _0x451824;});}return _0x573bcb;})['then'](respondWithResult(_0x113dd9,0xc9))['catch'](handleError(_0x113dd9,null));};exports[_0x99a1('0x51')]=function(_0x1af90b,_0x1dd17b){var _0x175f6d={'where':{'id':_0x1af90b[_0x99a1('0x52')]['id']}},_0x11632d={};_0x11632d[_0x99a1('0x30')]=_[_0x99a1('0x48')](db[_0x99a1('0x44')]['rawAttributes']);_0x175f6d[_0x99a1('0x33')]=_['intersection'](_0x11632d[_0x99a1('0x30')],qs[_0x99a1('0x34')](_0x1af90b['query'][_0x99a1('0x34')]));_0x175f6d[_0x99a1('0x33')]=_0x175f6d[_0x99a1('0x33')][_0x99a1('0x35')]?_0x175f6d[_0x99a1('0x33')]:_0x11632d[_0x99a1('0x30')];if(_0x1af90b[_0x99a1('0x31')][_0x99a1('0x42')]){_0x175f6d[_0x99a1('0x43')]=[{'all':!![]}];}_0x175f6d=_[_0x99a1('0x3f')]({},_0x175f6d,_0x1af90b[_0x99a1('0x41')]);return db[_0x99a1('0x44')]['find'](_0x175f6d)['then'](handleEntityNotFound(_0x1dd17b,null))[_0x99a1('0x23')](function(_0x14bc9b){if(_0x14bc9b){var _0x28caeb=_0x14bc9b[_0x99a1('0x25')]({'plain':!![]});_0x28caeb=qs[_0x99a1('0x53')](_0x28caeb,['id','createdAt',_0x99a1('0x54')]);_0x1af90b[_0x99a1('0x55')]=_['omit'](_0x1af90b[_0x99a1('0x55')],['id',_0x99a1('0x56'),_0x99a1('0x54')]);return db[_0x99a1('0x44')][_0x99a1('0x4a')](_['merge'](_0x28caeb,_0x1af90b[_0x99a1('0x55')]),{'include':_0x1af90b[_0x99a1('0x31')][_0x99a1('0x42')]?[{'all':!![]}]:undefined})[_0x99a1('0x23')](function(_0x341d68){var _0x10289c=_0x1af90b['user'][_0x99a1('0x25')]({'plain':!![]});if(!_0x10289c)throw new Error(_0x99a1('0x57'));if(_0x10289c['role']===_0x99a1('0x4b')){var _0x2b228e=_0x341d68[_0x99a1('0x25')]({'plain':!![]});var _0xb126dd=_0x99a1('0x26');return db['UserProfileSection'][_0x99a1('0x49')]({'where':{'name':_0xb126dd,'userProfileId':_0x10289c['userProfileId']},'raw':!![]})['then'](function(_0x5cbf98){if(_0x5cbf98&&_0x5cbf98[_0x99a1('0x4e')]===0x0){return db[_0x99a1('0x4f')]['create']({'name':_0x2b228e['name'],'resourceId':_0x2b228e['id'],'type':_0x5cbf98[_0x99a1('0x29')],'sectionId':_0x5cbf98['id']},{})['then'](function(){return _0x341d68;});}else{return _0x341d68;}})[_0x99a1('0x46')](function(_0x263db3){logger[_0x99a1('0x27')](_0x99a1('0x50'),_0x263db3);throw _0x263db3;});}return _0x341d68;});}})['then'](respondWithResult(_0x1dd17b,0xc9))[_0x99a1('0x46')](handleError(_0x1dd17b,null));};exports[_0x99a1('0x58')]=function(_0x11b1c1,_0x4fbfb3){if(_0x11b1c1[_0x99a1('0x55')]['id']){delete _0x11b1c1['body']['id'];}return db[_0x99a1('0x44')][_0x99a1('0x49')]({'where':{'id':_0x11b1c1[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x4fbfb3,null))[_0x99a1('0x23')](saveUpdates(_0x11b1c1['body'],null))['then'](respondWithResult(_0x4fbfb3,null))['catch'](handleError(_0x4fbfb3,null));};exports[_0x99a1('0x24')]=function(_0x35e38a,_0x4ad713){return db['Campaign'][_0x99a1('0x49')]({'where':{'id':_0x35e38a[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x4ad713,null))['then'](removeEntity(_0x4ad713,null))['catch'](handleError(_0x4ad713,null));};exports[_0x99a1('0x59')]=function(_0x5409b9,_0x2770fd,_0x129690){var _0x32373b={'raw':!![],'where':{}};var _0x4b946b={};var _0x447e7d={'count':0x0,'rows':[]};return db[_0x99a1('0x44')]['findOne']({'where':{'id':_0x5409b9['params']['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x2770fd,null))['then'](function(_0x4262a9){if(_0x4262a9){_0x4b946b[_0x99a1('0x30')]=_[_0x99a1('0x48')](db['CmHopper'][_0x99a1('0x2c')]);_0x4b946b[_0x99a1('0x31')]=_[_0x99a1('0x48')](_0x5409b9[_0x99a1('0x31')]);_0x4b946b[_0x99a1('0x3b')]=_['intersection'](_0x4b946b['model'],_0x4b946b[_0x99a1('0x31')]);_0x32373b[_0x99a1('0x33')]=_[_0x99a1('0x32')](_0x4b946b[_0x99a1('0x30')],qs['fields'](_0x5409b9[_0x99a1('0x31')]['fields']));_0x32373b['attributes']=_0x32373b[_0x99a1('0x33')][_0x99a1('0x35')]?_0x32373b[_0x99a1('0x33')]:_0x4b946b['model'];if(!_0x5409b9[_0x99a1('0x31')][_0x99a1('0x36')](_0x99a1('0x37'))){_0x32373b[_0x99a1('0x1d')]=qs[_0x99a1('0x1d')](_0x5409b9['query'][_0x99a1('0x1d')]);_0x32373b[_0x99a1('0x38')]=qs[_0x99a1('0x38')](_0x5409b9[_0x99a1('0x31')][_0x99a1('0x38')]);}_0x32373b[_0x99a1('0x39')]=qs['sort'](_0x5409b9[_0x99a1('0x31')][_0x99a1('0x3a')]);_0x32373b[_0x99a1('0x3e')]=qs[_0x99a1('0x3b')](_[_0x99a1('0x3c')](_0x5409b9['query'],_0x4b946b[_0x99a1('0x3b')]));_0x32373b[_0x99a1('0x3e')][_0x99a1('0x5a')]=_0x4262a9['id'];if(_0x5409b9[_0x99a1('0x31')][_0x99a1('0x3d')]){_0x32373b[_0x99a1('0x3e')]=_['merge'](_0x32373b[_0x99a1('0x3e')],{'$or':_[_0x99a1('0x2b')](_0x32373b['attributes'],function(_0x56716a){var _0x2af5cc={};_0x2af5cc[_0x56716a]={'$like':'%'+_0x5409b9[_0x99a1('0x31')]['filter']+'%'};return _0x2af5cc;})});}_0x32373b=_[_0x99a1('0x3f')]({},_0x32373b,_0x5409b9[_0x99a1('0x41')]);return db[_0x99a1('0x5b')][_0x99a1('0x1c')]({'where':_0x32373b[_0x99a1('0x3e')]})[_0x99a1('0x23')](function(_0x2e5a54){_0x447e7d[_0x99a1('0x1c')]=_0x2e5a54;if(_0x5409b9[_0x99a1('0x31')][_0x99a1('0x42')]){_0x32373b[_0x99a1('0x43')]=[{'all':!![]}];}return db[_0x99a1('0x5b')][_0x99a1('0x5c')](_0x32373b);})['then'](function(_0x285897){_0x447e7d['rows']=_0x285897;return _0x447e7d;});}})['then'](respondWithFilteredResult(_0x2770fd,_0x32373b))[_0x99a1('0x46')](handleError(_0x2770fd,null));};exports[_0x99a1('0x5d')]=function(_0x188f81,_0x3676eb,_0xbbbe26){var _0x470514={'raw':!![],'where':{}};var _0xe937e0={};var _0x471c8f={'count':0x0,'rows':[]};return db[_0x99a1('0x44')]['findOne']({'where':{'id':_0x188f81[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x3676eb,null))[_0x99a1('0x23')](function(_0x1f1b7a){if(_0x1f1b7a){_0xe937e0[_0x99a1('0x30')]=_[_0x99a1('0x48')](db[_0x99a1('0x5e')][_0x99a1('0x2c')]);_0xe937e0['query']=_['keys'](_0x188f81['query']);_0xe937e0[_0x99a1('0x3b')]=_[_0x99a1('0x32')](_0xe937e0['model'],_0xe937e0[_0x99a1('0x31')]);_0x470514[_0x99a1('0x33')]=_[_0x99a1('0x32')](_0xe937e0[_0x99a1('0x30')],qs['fields'](_0x188f81[_0x99a1('0x31')][_0x99a1('0x34')]));_0x470514[_0x99a1('0x33')]=_0x470514[_0x99a1('0x33')]['length']?_0x470514[_0x99a1('0x33')]:_0xe937e0['model'];if(!_0x188f81['query']['hasOwnProperty'](_0x99a1('0x37'))){_0x470514['limit']=qs[_0x99a1('0x1d')](_0x188f81[_0x99a1('0x31')][_0x99a1('0x1d')]);_0x470514[_0x99a1('0x38')]=qs[_0x99a1('0x38')](_0x188f81[_0x99a1('0x31')][_0x99a1('0x38')]);}_0x470514['order']=qs['sort'](_0x188f81[_0x99a1('0x31')][_0x99a1('0x3a')]);_0x470514[_0x99a1('0x3e')]=qs['filters'](_[_0x99a1('0x3c')](_0x188f81[_0x99a1('0x31')],_0xe937e0[_0x99a1('0x3b')]));_0x470514['where'][_0x99a1('0x5a')]=_0x1f1b7a['id'];if(_0x188f81[_0x99a1('0x31')][_0x99a1('0x3d')]){_0x470514['where']=_['merge'](_0x470514[_0x99a1('0x3e')],{'$or':_[_0x99a1('0x2b')](_0x470514[_0x99a1('0x33')],function(_0xa3b801){var _0x3fe8bd={};_0x3fe8bd[_0xa3b801]={'$like':'%'+_0x188f81['query'][_0x99a1('0x3d')]+'%'};return _0x3fe8bd;})});}_0x470514=_['merge']({},_0x470514,_0x188f81[_0x99a1('0x41')]);return db[_0x99a1('0x5e')][_0x99a1('0x1c')]({'where':_0x470514[_0x99a1('0x3e')]})[_0x99a1('0x23')](function(_0x23e463){_0x471c8f['count']=_0x23e463;if(_0x188f81[_0x99a1('0x31')][_0x99a1('0x42')]){_0x470514[_0x99a1('0x43')]=[{'all':!![]}];}return db[_0x99a1('0x5e')][_0x99a1('0x5c')](_0x470514);})['then'](function(_0x354a8e){_0x471c8f['rows']=_0x354a8e;return _0x471c8f;});}})[_0x99a1('0x23')](respondWithFilteredResult(_0x3676eb,_0x470514))[_0x99a1('0x46')](handleError(_0x3676eb,null));};exports['getHopperFinals']=function(_0x38538e,_0x576856,_0x3ae04e){var _0x4778ba={'raw':!![],'where':{}};var _0x104e0e={};var _0x10a95a={'count':0x0,'rows':[]};return db[_0x99a1('0x44')][_0x99a1('0x5f')]({'where':{'id':_0x38538e['params']['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x576856,null))[_0x99a1('0x23')](function(_0x529913){if(_0x529913){_0x104e0e[_0x99a1('0x30')]=_[_0x99a1('0x48')](db[_0x99a1('0x60')]['rawAttributes']);_0x104e0e[_0x99a1('0x31')]=_['keys'](_0x38538e[_0x99a1('0x31')]);_0x104e0e[_0x99a1('0x3b')]=_[_0x99a1('0x32')](_0x104e0e[_0x99a1('0x30')],_0x104e0e[_0x99a1('0x31')]);_0x4778ba['attributes']=_[_0x99a1('0x32')](_0x104e0e['model'],qs['fields'](_0x38538e[_0x99a1('0x31')][_0x99a1('0x34')]));_0x4778ba['attributes']=_0x4778ba[_0x99a1('0x33')][_0x99a1('0x35')]?_0x4778ba[_0x99a1('0x33')]:_0x104e0e['model'];if(!_0x38538e[_0x99a1('0x31')][_0x99a1('0x36')](_0x99a1('0x37'))){_0x4778ba['limit']=qs[_0x99a1('0x1d')](_0x38538e[_0x99a1('0x31')]['limit']);_0x4778ba[_0x99a1('0x38')]=qs[_0x99a1('0x38')](_0x38538e['query']['offset']);}_0x4778ba[_0x99a1('0x39')]=qs[_0x99a1('0x3a')](_0x38538e[_0x99a1('0x31')]['sort']);_0x4778ba[_0x99a1('0x3e')]=qs[_0x99a1('0x3b')](_[_0x99a1('0x3c')](_0x38538e[_0x99a1('0x31')],_0x104e0e[_0x99a1('0x3b')]));_0x4778ba[_0x99a1('0x3e')]['CampaignId']=_0x529913['id'];if(_0x38538e['query']['filter']){_0x4778ba[_0x99a1('0x3e')]=_[_0x99a1('0x3f')](_0x4778ba[_0x99a1('0x3e')],{'$or':_[_0x99a1('0x2b')](_0x4778ba[_0x99a1('0x33')],function(_0x498d38){var _0x44a637={};_0x44a637[_0x498d38]={'$like':'%'+_0x38538e[_0x99a1('0x31')]['filter']+'%'};return _0x44a637;})});}_0x4778ba=_['merge']({},_0x4778ba,_0x38538e[_0x99a1('0x41')]);return db[_0x99a1('0x60')][_0x99a1('0x1c')]({'where':_0x4778ba['where']})[_0x99a1('0x23')](function(_0x596ebf){_0x10a95a[_0x99a1('0x1c')]=_0x596ebf;if(_0x38538e['query'][_0x99a1('0x42')]){_0x4778ba[_0x99a1('0x43')]=[{'all':!![]}];}return db['CmHopperFinal'][_0x99a1('0x5c')](_0x4778ba);})[_0x99a1('0x23')](function(_0x4f597c){_0x10a95a[_0x99a1('0x45')]=_0x4f597c;return _0x10a95a;});}})[_0x99a1('0x23')](respondWithFilteredResult(_0x576856,_0x4778ba))[_0x99a1('0x46')](handleError(_0x576856,null));};exports[_0x99a1('0x61')]=function(_0x212c39,_0x29f275,_0x44bd17){var _0x5880a9={'raw':!![],'where':{}};var _0x5bc396={};var _0x366bbb={'count':0x0,'rows':[]};return db[_0x99a1('0x44')]['findOne']({'where':{'id':_0x212c39['params']['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x29f275,null))['then'](function(_0x4e26b6){if(_0x4e26b6){_0x5bc396['model']=_[_0x99a1('0x48')](db['CmHopperBlack'][_0x99a1('0x2c')]);_0x5bc396[_0x99a1('0x31')]=_[_0x99a1('0x48')](_0x212c39[_0x99a1('0x31')]);_0x5bc396[_0x99a1('0x3b')]=_[_0x99a1('0x32')](_0x5bc396['model'],_0x5bc396[_0x99a1('0x31')]);_0x5880a9[_0x99a1('0x33')]=_[_0x99a1('0x32')](_0x5bc396[_0x99a1('0x30')],qs[_0x99a1('0x34')](_0x212c39['query'][_0x99a1('0x34')]));_0x5880a9[_0x99a1('0x33')]=_0x5880a9[_0x99a1('0x33')][_0x99a1('0x35')]?_0x5880a9[_0x99a1('0x33')]:_0x5bc396[_0x99a1('0x30')];if(!_0x212c39[_0x99a1('0x31')][_0x99a1('0x36')]('nolimit')){_0x5880a9[_0x99a1('0x1d')]=qs[_0x99a1('0x1d')](_0x212c39[_0x99a1('0x31')][_0x99a1('0x1d')]);_0x5880a9[_0x99a1('0x38')]=qs['offset'](_0x212c39[_0x99a1('0x31')]['offset']);}_0x5880a9[_0x99a1('0x39')]=qs[_0x99a1('0x3a')](_0x212c39[_0x99a1('0x31')][_0x99a1('0x3a')]);_0x5880a9['where']=qs[_0x99a1('0x3b')](_[_0x99a1('0x3c')](_0x212c39[_0x99a1('0x31')],_0x5bc396['filters']));_0x5880a9[_0x99a1('0x3e')][_0x99a1('0x5a')]=_0x4e26b6['id'];if(_0x212c39[_0x99a1('0x31')][_0x99a1('0x3d')]){_0x5880a9[_0x99a1('0x3e')]=_[_0x99a1('0x3f')](_0x5880a9[_0x99a1('0x3e')],{'$or':_[_0x99a1('0x2b')](_0x5880a9[_0x99a1('0x33')],function(_0x22a4e6){var _0xef45de={};_0xef45de[_0x22a4e6]={'$like':'%'+_0x212c39['query'][_0x99a1('0x3d')]+'%'};return _0xef45de;})});}_0x5880a9=_['merge']({},_0x5880a9,_0x212c39[_0x99a1('0x41')]);return db[_0x99a1('0x62')][_0x99a1('0x1c')]({'where':_0x5880a9['where']})[_0x99a1('0x23')](function(_0x60c710){_0x366bbb['count']=_0x60c710;if(_0x212c39[_0x99a1('0x31')]['includeAll']){_0x5880a9[_0x99a1('0x43')]=[{'all':!![]}];}return db[_0x99a1('0x62')][_0x99a1('0x5c')](_0x5880a9);})[_0x99a1('0x23')](function(_0x61013d){_0x366bbb['rows']=_0x61013d;return _0x366bbb;});}})[_0x99a1('0x23')](respondWithFilteredResult(_0x29f275,_0x5880a9))[_0x99a1('0x46')](handleError(_0x29f275,null));};exports['getLists']=function(_0x225911,_0x583a86,_0x4d0c1f){var _0x7e84d6={};var _0x109a1b={};var _0x45b3c9;var _0x2ed167;return db[_0x99a1('0x44')][_0x99a1('0x5f')]({'where':{'id':_0x225911[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x583a86,null))[_0x99a1('0x23')](function(_0x42b7b3){if(_0x42b7b3){_0x45b3c9=_0x42b7b3;_0x109a1b[_0x99a1('0x30')]=_[_0x99a1('0x48')](db['CmList'][_0x99a1('0x2c')]);_0x109a1b[_0x99a1('0x31')]=_[_0x99a1('0x48')](_0x225911[_0x99a1('0x31')]);_0x109a1b[_0x99a1('0x3b')]=_[_0x99a1('0x32')](_0x109a1b['model'],_0x109a1b[_0x99a1('0x31')]);_0x7e84d6[_0x99a1('0x33')]=_[_0x99a1('0x32')](_0x109a1b[_0x99a1('0x30')],qs['fields'](_0x225911['query'][_0x99a1('0x34')]));_0x7e84d6[_0x99a1('0x33')]=_0x7e84d6[_0x99a1('0x33')][_0x99a1('0x35')]?_0x7e84d6[_0x99a1('0x33')]:_0x109a1b[_0x99a1('0x30')];_0x7e84d6[_0x99a1('0x39')]=qs[_0x99a1('0x3a')](_0x225911[_0x99a1('0x31')][_0x99a1('0x3a')]);_0x7e84d6[_0x99a1('0x3e')]=qs[_0x99a1('0x3b')](_[_0x99a1('0x3c')](_0x225911[_0x99a1('0x31')],_0x109a1b[_0x99a1('0x3b')]));if(_0x225911[_0x99a1('0x31')]['filter']){_0x7e84d6[_0x99a1('0x3e')]=_['merge'](_0x7e84d6[_0x99a1('0x3e')],{'$or':_[_0x99a1('0x2b')](_0x7e84d6['attributes'],function(_0x5e7b99){var _0x4dec67={};_0x4dec67[_0x5e7b99]={'$like':'%'+_0x225911[_0x99a1('0x31')]['filter']+'%'};return _0x4dec67;})});}_0x7e84d6=_[_0x99a1('0x3f')]({},_0x7e84d6,_0x225911['options']);return _0x45b3c9['getLists'](_0x7e84d6);}})[_0x99a1('0x23')](function(_0x4dda38){if(_0x4dda38){_0x2ed167=_0x4dda38[_0x99a1('0x35')];if(!_0x225911['query']['hasOwnProperty'](_0x99a1('0x37'))){_0x7e84d6[_0x99a1('0x1d')]=qs['limit'](_0x225911[_0x99a1('0x31')][_0x99a1('0x1d')]);_0x7e84d6[_0x99a1('0x38')]=qs[_0x99a1('0x38')](_0x225911[_0x99a1('0x31')]['offset']);}return _0x45b3c9['getLists'](_0x7e84d6);}})[_0x99a1('0x23')](function(_0x323d73){if(_0x323d73){return _0x323d73?{'count':_0x2ed167,'rows':_0x323d73}:null;}})[_0x99a1('0x23')](respondWithResult(_0x583a86,null))[_0x99a1('0x46')](handleError(_0x583a86,null));};exports[_0x99a1('0x63')]=function(_0x47be3e,_0x557d9c,_0x46d0d3){var _0x2d44a9,_0x3efc27;return db[_0x99a1('0x44')][_0x99a1('0x49')]({'where':{'id':_0x47be3e[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x557d9c,null))[_0x99a1('0x23')](function(_0x33e24c){if(_0x33e24c){_0x3efc27=_0x33e24c;return _0x33e24c[_0x99a1('0x63')](_0x47be3e[_0x99a1('0x55')][_0x99a1('0x64')],_[_0x99a1('0x53')](_0x47be3e[_0x99a1('0x55')],[_0x99a1('0x64'),'id'])||{});}return null;})['spread'](function(_0x402afa){var _0x1bc01c;_0x2d44a9=_0x402afa||[];var _0x36bdb5=[];if(_0x402afa){for(var _0x1c69e6=0x0;_0x1c69e6<_0x402afa[_0x99a1('0x35')];_0x1c69e6+=0x1){var _0x36785c=_0x402afa[_0x1c69e6][_0x99a1('0x25')]({'plain':!![]});_0x3efc27[_0x99a1('0x65')]=_0x47be3e[_0x99a1('0x55')][_0x99a1('0x65')]?_0x47be3e[_0x99a1('0x55')]['dialCheckDuplicateType']:_0x3efc27['dialCheckDuplicateType'];switch(_0x3efc27[_0x99a1('0x65')]){case'always':_0x1bc01c=squel['insert']()['into'](_0x99a1('0x66'))[_0x99a1('0x67')]([_0x99a1('0x68'),_0x99a1('0x69'),_0x99a1('0x6a'),_0x99a1('0x6b'),_0x99a1('0x5a'),_0x99a1('0x56'),_0x99a1('0x54')],squel[_0x99a1('0x6c')]()[_0x99a1('0x6d')](_0x99a1('0x68'),_0x99a1('0x68'))[_0x99a1('0x6d')](_0x99a1('0x6e'),_0x99a1('0x69'))['field']('id',_0x99a1('0x6a'))[_0x99a1('0x6d')](_0x36785c['CmListId'][_0x99a1('0x6f')](),_0x99a1('0x6b'))[_0x99a1('0x6d')](_0x47be3e[_0x99a1('0x52')]['id']['toString'](),_0x99a1('0x5a'))['field']('NOW()','createdAt')['field'](_0x99a1('0x6e'),_0x99a1('0x54'))['from']('cm_contacts')['where'](_0x99a1('0x70'))['where']('ListId\x20=\x20?',_0x36785c[_0x99a1('0x71')][_0x99a1('0x6f')]())[_0x99a1('0x3e')](_0x99a1('0x72'))[_0x99a1('0x3e')](_0x99a1('0x73'),squel[_0x99a1('0x6c')]()[_0x99a1('0x6d')](_0x99a1('0x74'))[_0x99a1('0x75')]('cm_hopper_final')[_0x99a1('0x3e')](_0x99a1('0x76'),_0x47be3e['params']['id'][_0x99a1('0x6f')]()))[_0x99a1('0x3e')](_0x99a1('0x73'),squel[_0x99a1('0x6c')]()[_0x99a1('0x6d')](_0x99a1('0x77'))[_0x99a1('0x75')]('cm_hopper')[_0x99a1('0x3e')](_0x99a1('0x76'),_0x47be3e['params']['id'][_0x99a1('0x6f')]())))['toString']();break;case _0x99a1('0x78'):_0x1bc01c=squel[_0x99a1('0x79')]()[_0x99a1('0x7a')](_0x99a1('0x66'))[_0x99a1('0x67')]([_0x99a1('0x68'),_0x99a1('0x69'),'ContactId',_0x99a1('0x6b'),'CampaignId',_0x99a1('0x56'),_0x99a1('0x54')],squel['select']()[_0x99a1('0x6d')](_0x99a1('0x68'),_0x99a1('0x68'))['field']('NOW()',_0x99a1('0x69'))['field']('id',_0x99a1('0x6a'))[_0x99a1('0x6d')](_0x36785c[_0x99a1('0x71')][_0x99a1('0x6f')](),_0x99a1('0x6b'))[_0x99a1('0x6d')](_0x47be3e[_0x99a1('0x52')]['id'][_0x99a1('0x6f')](),_0x99a1('0x5a'))['field']('NOW()','createdAt')[_0x99a1('0x6d')](_0x99a1('0x6e'),_0x99a1('0x54'))[_0x99a1('0x75')](_0x99a1('0x7b'))[_0x99a1('0x3e')](_0x99a1('0x70'))[_0x99a1('0x3e')](_0x99a1('0x7c'),_0x36785c['CmListId'][_0x99a1('0x6f')]())[_0x99a1('0x3e')]('phone\x20IS\x20NOT\x20NULL')[_0x99a1('0x3e')](_0x99a1('0x73'),squel[_0x99a1('0x6c')]()[_0x99a1('0x6d')](_0x99a1('0x77'))['from'](_0x99a1('0x66'))[_0x99a1('0x3e')](_0x99a1('0x76'),_0x47be3e[_0x99a1('0x52')]['id'][_0x99a1('0x6f')]())))[_0x99a1('0x6f')]();break;default:_0x1bc01c=squel[_0x99a1('0x79')]()[_0x99a1('0x7a')](_0x99a1('0x66'))[_0x99a1('0x67')](['phone',_0x99a1('0x69'),_0x99a1('0x6a'),_0x99a1('0x6b'),_0x99a1('0x5a'),_0x99a1('0x56'),_0x99a1('0x54')],squel[_0x99a1('0x6c')]()[_0x99a1('0x6d')]('phone',_0x99a1('0x68'))['field'](_0x99a1('0x6e'),'scheduledAt')[_0x99a1('0x6d')]('id',_0x99a1('0x6a'))['field'](_0x36785c[_0x99a1('0x71')][_0x99a1('0x6f')](),_0x99a1('0x6b'))[_0x99a1('0x6d')](_0x47be3e[_0x99a1('0x52')]['id'][_0x99a1('0x6f')](),'CampaignId')[_0x99a1('0x6d')](_0x99a1('0x6e'),_0x99a1('0x56'))['field'](_0x99a1('0x6e'),_0x99a1('0x54'))['from'](_0x99a1('0x7b'))[_0x99a1('0x3e')]('deletedAt\x20IS\x20NULL')['where'](_0x99a1('0x7c'),_0x36785c[_0x99a1('0x71')][_0x99a1('0x6f')]())[_0x99a1('0x3e')](_0x99a1('0x72')))[_0x99a1('0x6f')]();}_0x36bdb5[_0x99a1('0x7d')](db['sequelize'][_0x99a1('0x31')](_0x1bc01c));}return BPromise[_0x99a1('0x7e')](_0x36bdb5);}})[_0x99a1('0x23')](function(){return _0x2d44a9;})['then'](respondWithResult(_0x557d9c,null))[_0x99a1('0x46')](handleError(_0x557d9c,null));};exports['removeLists']=function(_0x4fb877,_0x41996d,_0x54c283){return db['Campaign'][_0x99a1('0x49')]({'where':{'id':_0x4fb877['params']['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x41996d,null))['then'](function(_0x4c191a){if(_0x4c191a){return _0x4c191a['removeLists'](_0x4fb877['query'][_0x99a1('0x64')]);}})[_0x99a1('0x23')](function(_0x577d7c){if(_0x577d7c){return db['CmHopper'][_0x99a1('0x24')]({'where':{'ListId':_0x4fb877['query'][_0x99a1('0x64')],'CampaignId':_0x4fb877[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](function(){return _0x577d7c;});}})['then'](respondWithStatusCode(_0x41996d,null))['catch'](handleError(_0x41996d,null));};exports['getBlackLists']=function(_0x231f2f,_0x3f064d,_0x168684){var _0x184fbf={'raw':!![],'where':{}};var _0x251847={};var _0x182baf={'count':0x0,'rows':[]};return db[_0x99a1('0x44')][_0x99a1('0x5f')]({'where':{'id':_0x231f2f[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x3f064d,null))[_0x99a1('0x23')](function(_0x50961b){if(_0x50961b){_0x251847[_0x99a1('0x30')]=_['keys'](db[_0x99a1('0x7f')][_0x99a1('0x2c')]);_0x251847['query']=_['keys'](_0x231f2f['query']);_0x251847[_0x99a1('0x3b')]=_[_0x99a1('0x32')](_0x251847['model'],_0x251847['query']);_0x184fbf['attributes']=_[_0x99a1('0x32')](_0x251847[_0x99a1('0x30')],qs['fields'](_0x231f2f[_0x99a1('0x31')][_0x99a1('0x34')]));_0x184fbf[_0x99a1('0x33')]=_0x184fbf[_0x99a1('0x33')][_0x99a1('0x35')]?_0x184fbf[_0x99a1('0x33')]:_0x251847[_0x99a1('0x30')];if(!_0x231f2f[_0x99a1('0x31')][_0x99a1('0x36')]('nolimit')){_0x184fbf[_0x99a1('0x1d')]=qs[_0x99a1('0x1d')](_0x231f2f[_0x99a1('0x31')][_0x99a1('0x1d')]);_0x184fbf[_0x99a1('0x38')]=qs[_0x99a1('0x38')](_0x231f2f[_0x99a1('0x31')][_0x99a1('0x38')]);}_0x184fbf[_0x99a1('0x39')]=qs[_0x99a1('0x3a')](_0x231f2f['query'][_0x99a1('0x3a')]);_0x184fbf['where']=qs[_0x99a1('0x3b')](_[_0x99a1('0x3c')](_0x231f2f[_0x99a1('0x31')],_0x251847[_0x99a1('0x3b')]));_0x184fbf[_0x99a1('0x3e')][_0x99a1('0x5a')]=_0x50961b['id'];if(_0x231f2f['query'][_0x99a1('0x3d')]){_0x184fbf['where']=_[_0x99a1('0x3f')](_0x184fbf[_0x99a1('0x3e')],{'$or':_[_0x99a1('0x2b')](_0x184fbf[_0x99a1('0x33')],function(_0x2a5883){var _0x779c66={};_0x779c66[_0x2a5883]={'$like':'%'+_0x231f2f['query'][_0x99a1('0x3d')]+'%'};return _0x779c66;})});}_0x184fbf=_[_0x99a1('0x3f')]({},_0x184fbf,_0x231f2f[_0x99a1('0x41')]);return db[_0x99a1('0x7f')][_0x99a1('0x1c')]({'where':_0x184fbf[_0x99a1('0x3e')]})[_0x99a1('0x23')](function(_0x540022){_0x182baf[_0x99a1('0x1c')]=_0x540022;if(_0x231f2f['query'][_0x99a1('0x42')]){_0x184fbf[_0x99a1('0x43')]=[{'all':!![]}];}return db[_0x99a1('0x7f')][_0x99a1('0x5c')](_0x184fbf);})['then'](function(_0x3a3beb){_0x182baf['rows']=_0x3a3beb;return _0x182baf;});}})[_0x99a1('0x23')](respondWithFilteredResult(_0x3f064d,_0x184fbf))[_0x99a1('0x46')](handleError(_0x3f064d,null));};exports['addBlackLists']=function(_0x12b95b,_0x722681,_0x274d6d){var _0x2fc34a,_0x29597d;return db[_0x99a1('0x44')][_0x99a1('0x49')]({'where':{'id':_0x12b95b[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x722681,null))[_0x99a1('0x23')](function(_0x1bb886){if(_0x1bb886){_0x29597d=_0x1bb886;return _0x1bb886[_0x99a1('0x80')](_0x12b95b['body']['ids'],_[_0x99a1('0x53')](_0x12b95b[_0x99a1('0x55')],['ids','id'])||{});}return null;})[_0x99a1('0x81')](function(_0x394e13){var _0x15ef51;_0x2fc34a=_0x394e13||[];var _0x325ed1=[];if(_0x394e13){for(var _0x53ccd5=0x0;_0x53ccd5<_0x394e13[_0x99a1('0x35')];_0x53ccd5+=0x1){var _0x4b66fc=_0x394e13[_0x53ccd5][_0x99a1('0x25')]({'plain':!![]});_0x15ef51=squel[_0x99a1('0x79')]()[_0x99a1('0x7a')](_0x99a1('0x82'))[_0x99a1('0x67')](['phone',_0x99a1('0x6a'),_0x99a1('0x6b'),_0x99a1('0x5a'),_0x99a1('0x56'),_0x99a1('0x54')],squel['select']()[_0x99a1('0x6d')](_0x99a1('0x68'),_0x99a1('0x68'))[_0x99a1('0x6d')]('id','ContactId')['field'](_0x4b66fc[_0x99a1('0x71')][_0x99a1('0x6f')](),_0x99a1('0x6b'))[_0x99a1('0x6d')](_0x12b95b[_0x99a1('0x52')]['id'][_0x99a1('0x6f')](),_0x99a1('0x5a'))[_0x99a1('0x6d')]('NOW()',_0x99a1('0x56'))[_0x99a1('0x6d')](_0x99a1('0x6e'),_0x99a1('0x54'))[_0x99a1('0x75')](_0x99a1('0x7b'))[_0x99a1('0x3e')]('deletedAt\x20IS\x20NULL')[_0x99a1('0x3e')](_0x99a1('0x7c'),_0x4b66fc[_0x99a1('0x71')]['toString']())[_0x99a1('0x3e')](_0x99a1('0x72')))['toString']();_0x325ed1[_0x99a1('0x7d')](db[_0x99a1('0x83')]['query'](_0x15ef51));}return BPromise[_0x99a1('0x7e')](_0x325ed1);}})['then'](function(){return _0x2fc34a;})[_0x99a1('0x23')](respondWithResult(_0x722681,null))[_0x99a1('0x46')](handleError(_0x722681,null));};exports[_0x99a1('0x84')]=function(_0x532062,_0x5ec9d7,_0x1bd514){return db[_0x99a1('0x44')][_0x99a1('0x49')]({'where':{'id':_0x532062[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](handleEntityNotFound(_0x5ec9d7,null))['then'](function(_0x4f8040){if(_0x4f8040){return _0x4f8040[_0x99a1('0x84')](_0x532062[_0x99a1('0x31')][_0x99a1('0x64')]);}})[_0x99a1('0x23')](function(_0x38003e){if(_0x38003e){return db['CmHopperBlack']['destroy']({'where':{'ListId':_0x532062[_0x99a1('0x31')][_0x99a1('0x64')],'CampaignId':_0x532062[_0x99a1('0x52')]['id']}})[_0x99a1('0x23')](function(){return _0x38003e;});}})['then'](respondWithStatusCode(_0x5ec9d7,null))[_0x99a1('0x46')](handleError(_0x5ec9d7,null));};
\ No newline at end of file
+var _0x2dae=['UserProfileSection','userProfileId','autoAssociation','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','merge','omit','createdAt','updatedAt','body','getHoppers','findOne','CmHopper','order','CampaignId','CmHopperHistory','getHopperFinals','CmHopperFinal','getHopperBlacks','nolimit','CmHopperBlack','getLists','CmList','addLists','ids','spread','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','select','field','NOW()','CmListId','toString','from','cm_contacts','phone\x20IS\x20NOT\x20NULL','COALESCE(calleridnum,\x27\x27)','CampaignId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','COALESCE(phone,\x27\x27)','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','sequelize','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','push','removeBlackLists','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','set','Content-Range','apply','save','update','then','destroy','get','IvrCampaigns','UserProfileResource','error','stack','name','Campaign','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','limit','sort','where','pick','filter','options','includeAll','include','findAll','rows','show','params','keys','find','create','role','user'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2dae,0xc3));var _0xe2da=function(_0x53ccf2,_0x13cb67){_0x53ccf2=_0x53ccf2-0x0;var _0x5a2964=_0x2dae[_0x53ccf2];return _0x5a2964;};'use strict';var pdf=require(_0xe2da('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xe2da('0x1'));var zipdir=require(_0xe2da('0x2'));var jsonpatch=require(_0xe2da('0x3'));var rp=require(_0xe2da('0x4'));var moment=require(_0xe2da('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xe2da('0x6'));var util=require(_0xe2da('0x7'));var path=require(_0xe2da('0x8'));var sox=require(_0xe2da('0x9'));var csv=require('to-csv');var ejs=require(_0xe2da('0xa'));var fs=require('fs');var _=require(_0xe2da('0xb'));var squel=require(_0xe2da('0xc'));var crypto=require(_0xe2da('0xd'));var jsforce=require(_0xe2da('0xe'));var deskjs=require(_0xe2da('0xf'));var toCsv=require(_0xe2da('0x10'));var querystring=require(_0xe2da('0x11'));var Papa=require(_0xe2da('0x12'));var Redis=require('ioredis');var authService=require(_0xe2da('0x13'));var qs=require(_0xe2da('0x14'));var as=require(_0xe2da('0x15'));var hardwareService=require(_0xe2da('0x16'));var logger=require(_0xe2da('0x17'))(_0xe2da('0x18'));var utils=require(_0xe2da('0x19'));var config=require(_0xe2da('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xb98909,_0x5200b1){_0x5200b1=_0x5200b1||0xcc;return function(_0x4377c6){if(_0x4377c6){return _0xb98909[_0xe2da('0x1b')](_0x5200b1);}return _0xb98909[_0xe2da('0x1c')](_0x5200b1)[_0xe2da('0x1d')]();};}function respondWithResult(_0xfab73e,_0x5660b5){_0x5660b5=_0x5660b5||0xc8;return function(_0x295a86){if(_0x295a86){return _0xfab73e['status'](_0x5660b5)[_0xe2da('0x1e')](_0x295a86);}};}function respondWithFilteredResult(_0x5e1702,_0x586b27){return function(_0x403d1c){if(_0x403d1c){var _0x3dfc52=_0x403d1c[_0xe2da('0x1f')],_0x33f919=_0x586b27[_0xe2da('0x20')],_0x4dc58b=_0x586b27[_0xe2da('0x20')]+_0x586b27['limit'],_0x25d4fa;if(_0x4dc58b>=_0x3dfc52){_0x4dc58b=_0x3dfc52;_0x25d4fa=0xc8;}else{_0x25d4fa=0xce;}_0x5e1702[_0xe2da('0x1c')](_0x25d4fa);return _0x5e1702[_0xe2da('0x21')](_0xe2da('0x22'),_0x33f919+'-'+_0x4dc58b+'/'+_0x3dfc52)[_0xe2da('0x1e')](_0x403d1c);}return null;};}function patchUpdates(_0x329ffe){return function(_0x4c03a7){try{jsonpatch[_0xe2da('0x23')](_0x4c03a7,_0x329ffe,!![]);}catch(_0x2e16b2){return BPromise['reject'](_0x2e16b2);}return _0x4c03a7[_0xe2da('0x24')]();};}function saveUpdates(_0x254b37,_0x332193){return function(_0x203d36){if(_0x203d36){return _0x203d36[_0xe2da('0x25')](_0x254b37)[_0xe2da('0x26')](function(_0x5a9ffe){return _0x5a9ffe;});}return null;};}function removeEntity(_0x467cd6,_0x53cc4e){return function(_0x30efdc){if(_0x30efdc){return _0x30efdc[_0xe2da('0x27')]()[_0xe2da('0x26')](function(){var _0x28f1d3=_0x30efdc[_0xe2da('0x28')]({'plain':!![]});var _0x1e45e9=_0xe2da('0x29');return db[_0xe2da('0x2a')]['destroy']({'where':{'type':_0x1e45e9,'resourceId':_0x28f1d3['id']}})[_0xe2da('0x26')](function(){return _0x30efdc;});})[_0xe2da('0x26')](function(){_0x467cd6[_0xe2da('0x1c')](0xcc)[_0xe2da('0x1d')]();});}};}function handleEntityNotFound(_0x3778dc,_0x230fb8){return function(_0x124d93){if(!_0x124d93){_0x3778dc['sendStatus'](0x194);}return _0x124d93;};}function handleError(_0x2adc49,_0x3e23d7){_0x3e23d7=_0x3e23d7||0x1f4;return function(_0x1dc228){logger[_0xe2da('0x2b')](_0x1dc228[_0xe2da('0x2c')]);if(_0x1dc228[_0xe2da('0x2d')]){delete _0x1dc228[_0xe2da('0x2d')];}_0x2adc49[_0xe2da('0x1c')](_0x3e23d7)['send'](_0x1dc228);};}exports['index']=function(_0x5e259a,_0x3c4845){var _0x8c91db={},_0x4146ad={},_0x1ab91a={'count':0x0,'rows':[]};var _0x5de7fb=_['map'](db[_0xe2da('0x2e')][_0xe2da('0x2f')],function(_0x262d40){return{'name':_0x262d40[_0xe2da('0x30')],'type':_0x262d40[_0xe2da('0x31')][_0xe2da('0x32')]};});_0x4146ad[_0xe2da('0x33')]=_[_0xe2da('0x34')](_0x5de7fb,_0xe2da('0x2d'));_0x4146ad['query']=_['keys'](_0x5e259a[_0xe2da('0x35')]);_0x4146ad[_0xe2da('0x36')]=_[_0xe2da('0x37')](_0x4146ad[_0xe2da('0x33')],_0x4146ad[_0xe2da('0x35')]);_0x8c91db[_0xe2da('0x38')]=_[_0xe2da('0x37')](_0x4146ad[_0xe2da('0x33')],qs[_0xe2da('0x39')](_0x5e259a[_0xe2da('0x35')][_0xe2da('0x39')]));_0x8c91db[_0xe2da('0x38')]=_0x8c91db[_0xe2da('0x38')][_0xe2da('0x3a')]?_0x8c91db[_0xe2da('0x38')]:_0x4146ad[_0xe2da('0x33')];if(!_0x5e259a[_0xe2da('0x35')][_0xe2da('0x3b')]('nolimit')){_0x8c91db[_0xe2da('0x3c')]=qs[_0xe2da('0x3c')](_0x5e259a[_0xe2da('0x35')]['limit']);_0x8c91db[_0xe2da('0x20')]=qs[_0xe2da('0x20')](_0x5e259a[_0xe2da('0x35')]['offset']);}_0x8c91db['order']=qs[_0xe2da('0x3d')](_0x5e259a[_0xe2da('0x35')]['sort']);_0x8c91db[_0xe2da('0x3e')]=qs[_0xe2da('0x36')](_[_0xe2da('0x3f')](_0x5e259a[_0xe2da('0x35')],_0x4146ad[_0xe2da('0x36')]));if(_0x5e259a['query'][_0xe2da('0x40')]){_0x8c91db['where']=_['merge'](_0x8c91db[_0xe2da('0x3e')],{'$or':_['map'](_0x5de7fb,function(_0x2aa22c){if(_0x2aa22c[_0xe2da('0x31')]!=='VIRTUAL'){var _0x365968={};_0x365968[_0x2aa22c[_0xe2da('0x2d')]]={'$like':'%'+_0x5e259a['query']['filter']+'%'};return _0x365968;}})});}_0x8c91db=_['merge']({},_0x8c91db,_0x5e259a[_0xe2da('0x41')]);var _0xfe0812={'where':_0x8c91db[_0xe2da('0x3e')]};return db[_0xe2da('0x2e')][_0xe2da('0x1f')](_0xfe0812)[_0xe2da('0x26')](function(_0x14c30f){_0x1ab91a['count']=_0x14c30f;if(_0x5e259a[_0xe2da('0x35')][_0xe2da('0x42')]){_0x8c91db[_0xe2da('0x43')]=[{'all':!![]}];}return db[_0xe2da('0x2e')][_0xe2da('0x44')](_0x8c91db);})['then'](function(_0x4495fc){_0x1ab91a[_0xe2da('0x45')]=_0x4495fc;return _0x1ab91a;})[_0xe2da('0x26')](respondWithFilteredResult(_0x3c4845,_0x8c91db))['catch'](handleError(_0x3c4845,null));};exports[_0xe2da('0x46')]=function(_0x279f67,_0x1529f4){var _0x4096c5={'raw':![],'where':{'id':_0x279f67[_0xe2da('0x47')]['id']}},_0x2b229f={};_0x2b229f[_0xe2da('0x33')]=_[_0xe2da('0x48')](db['Campaign'][_0xe2da('0x2f')]);_0x2b229f[_0xe2da('0x35')]=_[_0xe2da('0x48')](_0x279f67[_0xe2da('0x35')]);_0x2b229f[_0xe2da('0x36')]=_['intersection'](_0x2b229f[_0xe2da('0x33')],_0x2b229f[_0xe2da('0x35')]);_0x4096c5[_0xe2da('0x38')]=_[_0xe2da('0x37')](_0x2b229f[_0xe2da('0x33')],qs[_0xe2da('0x39')](_0x279f67[_0xe2da('0x35')]['fields']));_0x4096c5[_0xe2da('0x38')]=_0x4096c5['attributes'][_0xe2da('0x3a')]?_0x4096c5[_0xe2da('0x38')]:_0x2b229f[_0xe2da('0x33')];if(_0x279f67['query'][_0xe2da('0x42')]){_0x4096c5[_0xe2da('0x43')]=[{'all':!![]}];}_0x4096c5=_['merge']({},_0x4096c5,_0x279f67[_0xe2da('0x41')]);return db[_0xe2da('0x2e')][_0xe2da('0x49')](_0x4096c5)['then'](handleEntityNotFound(_0x1529f4,null))[_0xe2da('0x26')](respondWithResult(_0x1529f4,null))['catch'](handleError(_0x1529f4,null));};exports['create']=function(_0x16a393,_0x55afef){return db[_0xe2da('0x2e')][_0xe2da('0x4a')](_0x16a393['body'],{})[_0xe2da('0x26')](function(_0x1464b7){var _0x482547=_0x16a393['user'][_0xe2da('0x28')]({'plain':!![]});if(!_0x482547)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x482547[_0xe2da('0x4b')]===_0xe2da('0x4c')){var _0x259546=_0x1464b7[_0xe2da('0x28')]({'plain':!![]});var _0x3e46b=_0xe2da('0x29');return db[_0xe2da('0x4d')][_0xe2da('0x49')]({'where':{'name':_0x3e46b,'userProfileId':_0x482547[_0xe2da('0x4e')]},'raw':!![]})['then'](function(_0x3ce9a8){if(_0x3ce9a8&&_0x3ce9a8[_0xe2da('0x4f')]===0x0){return db[_0xe2da('0x2a')]['create']({'name':_0x259546[_0xe2da('0x2d')],'resourceId':_0x259546['id'],'type':_0x3ce9a8[_0xe2da('0x2d')],'sectionId':_0x3ce9a8['id']},{})[_0xe2da('0x26')](function(){return _0x1464b7;});}else{return _0x1464b7;}})[_0xe2da('0x50')](function(_0x242049){logger[_0xe2da('0x2b')](_0xe2da('0x51'),_0x242049);throw _0x242049;});}return _0x1464b7;})['then'](respondWithResult(_0x55afef,0xc9))['catch'](handleError(_0x55afef,null));};exports[_0xe2da('0x52')]=function(_0x39c33b,_0x28f916){var _0x5cf8db={'where':{'id':_0x39c33b[_0xe2da('0x47')]['id']}},_0x572690={};_0x572690['model']=_[_0xe2da('0x48')](db[_0xe2da('0x2e')][_0xe2da('0x2f')]);_0x5cf8db[_0xe2da('0x38')]=_[_0xe2da('0x37')](_0x572690[_0xe2da('0x33')],qs[_0xe2da('0x39')](_0x39c33b[_0xe2da('0x35')][_0xe2da('0x39')]));_0x5cf8db['attributes']=_0x5cf8db[_0xe2da('0x38')][_0xe2da('0x3a')]?_0x5cf8db[_0xe2da('0x38')]:_0x572690[_0xe2da('0x33')];if(_0x39c33b['query'][_0xe2da('0x42')]){_0x5cf8db[_0xe2da('0x43')]=[{'all':!![]}];}_0x5cf8db=_[_0xe2da('0x53')]({},_0x5cf8db,_0x39c33b['options']);return db[_0xe2da('0x2e')][_0xe2da('0x49')](_0x5cf8db)[_0xe2da('0x26')](handleEntityNotFound(_0x28f916,null))[_0xe2da('0x26')](function(_0x188bb0){if(_0x188bb0){var _0x22a571=_0x188bb0[_0xe2da('0x28')]({'plain':!![]});_0x22a571=qs[_0xe2da('0x54')](_0x22a571,['id',_0xe2da('0x55'),_0xe2da('0x56')]);_0x39c33b[_0xe2da('0x57')]=_[_0xe2da('0x54')](_0x39c33b['body'],['id',_0xe2da('0x55'),_0xe2da('0x56')]);return db[_0xe2da('0x2e')][_0xe2da('0x4a')](_[_0xe2da('0x53')](_0x22a571,_0x39c33b[_0xe2da('0x57')]),{'include':_0x39c33b[_0xe2da('0x35')]['includeAll']?[{'all':!![]}]:undefined})[_0xe2da('0x26')](function(_0x4b1562){var _0x3abde9=_0x39c33b[_0xe2da('0x4c')]['get']({'plain':!![]});if(!_0x3abde9)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3abde9[_0xe2da('0x4b')]==='user'){var _0x48e2b1=_0x4b1562['get']({'plain':!![]});var _0x148615=_0xe2da('0x29');return db[_0xe2da('0x4d')]['find']({'where':{'name':_0x148615,'userProfileId':_0x3abde9['userProfileId']},'raw':!![]})['then'](function(_0x3ef7c7){if(_0x3ef7c7&&_0x3ef7c7[_0xe2da('0x4f')]===0x0){return db[_0xe2da('0x2a')][_0xe2da('0x4a')]({'name':_0x48e2b1['name'],'resourceId':_0x48e2b1['id'],'type':_0x3ef7c7[_0xe2da('0x2d')],'sectionId':_0x3ef7c7['id']},{})[_0xe2da('0x26')](function(){return _0x4b1562;});}else{return _0x4b1562;}})[_0xe2da('0x50')](function(_0x1adf15){logger[_0xe2da('0x2b')](_0xe2da('0x51'),_0x1adf15);throw _0x1adf15;});}return _0x4b1562;});}})[_0xe2da('0x26')](respondWithResult(_0x28f916,0xc9))['catch'](handleError(_0x28f916,null));};exports[_0xe2da('0x25')]=function(_0x4666b3,_0x3f0a4b){if(_0x4666b3[_0xe2da('0x57')]['id']){delete _0x4666b3[_0xe2da('0x57')]['id'];}return db['Campaign'][_0xe2da('0x49')]({'where':{'id':_0x4666b3['params']['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x3f0a4b,null))['then'](saveUpdates(_0x4666b3[_0xe2da('0x57')],null))['then'](respondWithResult(_0x3f0a4b,null))['catch'](handleError(_0x3f0a4b,null));};exports[_0xe2da('0x27')]=function(_0x405743,_0x2cff55){return db[_0xe2da('0x2e')][_0xe2da('0x49')]({'where':{'id':_0x405743[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x2cff55,null))[_0xe2da('0x26')](removeEntity(_0x2cff55,null))[_0xe2da('0x50')](handleError(_0x2cff55,null));};exports[_0xe2da('0x58')]=function(_0x5d7317,_0x430a65,_0x1474b7){var _0x3eb2c3={'raw':!![],'where':{}};var _0x346a38={};var _0x4ea2a6={'count':0x0,'rows':[]};return db[_0xe2da('0x2e')][_0xe2da('0x59')]({'where':{'id':_0x5d7317[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x430a65,null))['then'](function(_0x455bb2){if(_0x455bb2){_0x346a38['model']=_[_0xe2da('0x48')](db[_0xe2da('0x5a')]['rawAttributes']);_0x346a38[_0xe2da('0x35')]=_[_0xe2da('0x48')](_0x5d7317[_0xe2da('0x35')]);_0x346a38[_0xe2da('0x36')]=_[_0xe2da('0x37')](_0x346a38['model'],_0x346a38[_0xe2da('0x35')]);_0x3eb2c3['attributes']=_['intersection'](_0x346a38['model'],qs['fields'](_0x5d7317[_0xe2da('0x35')][_0xe2da('0x39')]));_0x3eb2c3[_0xe2da('0x38')]=_0x3eb2c3[_0xe2da('0x38')][_0xe2da('0x3a')]?_0x3eb2c3[_0xe2da('0x38')]:_0x346a38[_0xe2da('0x33')];if(!_0x5d7317[_0xe2da('0x35')][_0xe2da('0x3b')]('nolimit')){_0x3eb2c3[_0xe2da('0x3c')]=qs[_0xe2da('0x3c')](_0x5d7317[_0xe2da('0x35')][_0xe2da('0x3c')]);_0x3eb2c3[_0xe2da('0x20')]=qs[_0xe2da('0x20')](_0x5d7317[_0xe2da('0x35')][_0xe2da('0x20')]);}_0x3eb2c3[_0xe2da('0x5b')]=qs[_0xe2da('0x3d')](_0x5d7317['query'][_0xe2da('0x3d')]);_0x3eb2c3[_0xe2da('0x3e')]=qs[_0xe2da('0x36')](_[_0xe2da('0x3f')](_0x5d7317[_0xe2da('0x35')],_0x346a38[_0xe2da('0x36')]));_0x3eb2c3[_0xe2da('0x3e')][_0xe2da('0x5c')]=_0x455bb2['id'];if(_0x5d7317[_0xe2da('0x35')][_0xe2da('0x40')]){_0x3eb2c3[_0xe2da('0x3e')]=_[_0xe2da('0x53')](_0x3eb2c3['where'],{'$or':_[_0xe2da('0x34')](_0x3eb2c3['attributes'],function(_0x2c16a1){var _0x6babeb={};_0x6babeb[_0x2c16a1]={'$like':'%'+_0x5d7317[_0xe2da('0x35')][_0xe2da('0x40')]+'%'};return _0x6babeb;})});}_0x3eb2c3=_[_0xe2da('0x53')]({},_0x3eb2c3,_0x5d7317[_0xe2da('0x41')]);return db[_0xe2da('0x5a')]['count']({'where':_0x3eb2c3[_0xe2da('0x3e')]})[_0xe2da('0x26')](function(_0x140daa){_0x4ea2a6[_0xe2da('0x1f')]=_0x140daa;if(_0x5d7317[_0xe2da('0x35')][_0xe2da('0x42')]){_0x3eb2c3['include']=[{'all':!![]}];}return db[_0xe2da('0x5a')][_0xe2da('0x44')](_0x3eb2c3);})[_0xe2da('0x26')](function(_0x96caa5){_0x4ea2a6[_0xe2da('0x45')]=_0x96caa5;return _0x4ea2a6;});}})[_0xe2da('0x26')](respondWithFilteredResult(_0x430a65,_0x3eb2c3))[_0xe2da('0x50')](handleError(_0x430a65,null));};exports['getHopperHistories']=function(_0x298511,_0x2937f2,_0x3934f2){var _0x172745={'raw':!![],'where':{}};var _0x158940={};var _0xc3088a={'count':0x0,'rows':[]};return db['Campaign'][_0xe2da('0x59')]({'where':{'id':_0x298511['params']['id']}})['then'](handleEntityNotFound(_0x2937f2,null))[_0xe2da('0x26')](function(_0x6b5a99){if(_0x6b5a99){_0x158940[_0xe2da('0x33')]=_['keys'](db[_0xe2da('0x5d')][_0xe2da('0x2f')]);_0x158940[_0xe2da('0x35')]=_[_0xe2da('0x48')](_0x298511['query']);_0x158940[_0xe2da('0x36')]=_['intersection'](_0x158940['model'],_0x158940[_0xe2da('0x35')]);_0x172745[_0xe2da('0x38')]=_[_0xe2da('0x37')](_0x158940[_0xe2da('0x33')],qs[_0xe2da('0x39')](_0x298511[_0xe2da('0x35')]['fields']));_0x172745[_0xe2da('0x38')]=_0x172745[_0xe2da('0x38')][_0xe2da('0x3a')]?_0x172745['attributes']:_0x158940[_0xe2da('0x33')];if(!_0x298511[_0xe2da('0x35')][_0xe2da('0x3b')]('nolimit')){_0x172745[_0xe2da('0x3c')]=qs[_0xe2da('0x3c')](_0x298511[_0xe2da('0x35')][_0xe2da('0x3c')]);_0x172745[_0xe2da('0x20')]=qs['offset'](_0x298511[_0xe2da('0x35')][_0xe2da('0x20')]);}_0x172745[_0xe2da('0x5b')]=qs[_0xe2da('0x3d')](_0x298511[_0xe2da('0x35')][_0xe2da('0x3d')]);_0x172745[_0xe2da('0x3e')]=qs[_0xe2da('0x36')](_[_0xe2da('0x3f')](_0x298511['query'],_0x158940[_0xe2da('0x36')]));_0x172745[_0xe2da('0x3e')]['CampaignId']=_0x6b5a99['id'];if(_0x298511[_0xe2da('0x35')]['filter']){_0x172745['where']=_['merge'](_0x172745[_0xe2da('0x3e')],{'$or':_[_0xe2da('0x34')](_0x172745['attributes'],function(_0x34344d){var _0x5484f5={};_0x5484f5[_0x34344d]={'$like':'%'+_0x298511[_0xe2da('0x35')][_0xe2da('0x40')]+'%'};return _0x5484f5;})});}_0x172745=_[_0xe2da('0x53')]({},_0x172745,_0x298511[_0xe2da('0x41')]);return db[_0xe2da('0x5d')][_0xe2da('0x1f')]({'where':_0x172745[_0xe2da('0x3e')]})['then'](function(_0x5f2971){_0xc3088a[_0xe2da('0x1f')]=_0x5f2971;if(_0x298511[_0xe2da('0x35')][_0xe2da('0x42')]){_0x172745[_0xe2da('0x43')]=[{'all':!![]}];}return db['CmHopperHistory'][_0xe2da('0x44')](_0x172745);})['then'](function(_0x80a3e8){_0xc3088a[_0xe2da('0x45')]=_0x80a3e8;return _0xc3088a;});}})[_0xe2da('0x26')](respondWithFilteredResult(_0x2937f2,_0x172745))[_0xe2da('0x50')](handleError(_0x2937f2,null));};exports[_0xe2da('0x5e')]=function(_0x414fa3,_0x5102b6,_0x315939){var _0xe20312={'raw':!![],'where':{}};var _0x38ed03={};var _0x35caec={'count':0x0,'rows':[]};return db[_0xe2da('0x2e')][_0xe2da('0x59')]({'where':{'id':_0x414fa3[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x5102b6,null))['then'](function(_0x260c58){if(_0x260c58){_0x38ed03['model']=_[_0xe2da('0x48')](db[_0xe2da('0x5f')]['rawAttributes']);_0x38ed03['query']=_[_0xe2da('0x48')](_0x414fa3['query']);_0x38ed03[_0xe2da('0x36')]=_[_0xe2da('0x37')](_0x38ed03[_0xe2da('0x33')],_0x38ed03['query']);_0xe20312[_0xe2da('0x38')]=_['intersection'](_0x38ed03['model'],qs[_0xe2da('0x39')](_0x414fa3[_0xe2da('0x35')]['fields']));_0xe20312[_0xe2da('0x38')]=_0xe20312['attributes'][_0xe2da('0x3a')]?_0xe20312[_0xe2da('0x38')]:_0x38ed03[_0xe2da('0x33')];if(!_0x414fa3[_0xe2da('0x35')][_0xe2da('0x3b')]('nolimit')){_0xe20312[_0xe2da('0x3c')]=qs[_0xe2da('0x3c')](_0x414fa3[_0xe2da('0x35')]['limit']);_0xe20312[_0xe2da('0x20')]=qs[_0xe2da('0x20')](_0x414fa3[_0xe2da('0x35')][_0xe2da('0x20')]);}_0xe20312[_0xe2da('0x5b')]=qs[_0xe2da('0x3d')](_0x414fa3[_0xe2da('0x35')][_0xe2da('0x3d')]);_0xe20312['where']=qs['filters'](_[_0xe2da('0x3f')](_0x414fa3['query'],_0x38ed03[_0xe2da('0x36')]));_0xe20312[_0xe2da('0x3e')][_0xe2da('0x5c')]=_0x260c58['id'];if(_0x414fa3[_0xe2da('0x35')][_0xe2da('0x40')]){_0xe20312[_0xe2da('0x3e')]=_[_0xe2da('0x53')](_0xe20312['where'],{'$or':_[_0xe2da('0x34')](_0xe20312['attributes'],function(_0x1d8a75){var _0x5d5bc6={};_0x5d5bc6[_0x1d8a75]={'$like':'%'+_0x414fa3['query'][_0xe2da('0x40')]+'%'};return _0x5d5bc6;})});}_0xe20312=_[_0xe2da('0x53')]({},_0xe20312,_0x414fa3[_0xe2da('0x41')]);return db[_0xe2da('0x5f')][_0xe2da('0x1f')]({'where':_0xe20312[_0xe2da('0x3e')]})[_0xe2da('0x26')](function(_0x52f25b){_0x35caec[_0xe2da('0x1f')]=_0x52f25b;if(_0x414fa3[_0xe2da('0x35')][_0xe2da('0x42')]){_0xe20312['include']=[{'all':!![]}];}return db[_0xe2da('0x5f')]['findAll'](_0xe20312);})['then'](function(_0x17c7da){_0x35caec[_0xe2da('0x45')]=_0x17c7da;return _0x35caec;});}})['then'](respondWithFilteredResult(_0x5102b6,_0xe20312))['catch'](handleError(_0x5102b6,null));};exports[_0xe2da('0x60')]=function(_0x51653d,_0x37cf4b,_0x2da9ab){var _0x3cca50={'raw':!![],'where':{}};var _0x2b7b18={};var _0x2b399e={'count':0x0,'rows':[]};return db[_0xe2da('0x2e')]['findOne']({'where':{'id':_0x51653d[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x37cf4b,null))[_0xe2da('0x26')](function(_0x329413){if(_0x329413){_0x2b7b18[_0xe2da('0x33')]=_[_0xe2da('0x48')](db['CmHopperBlack'][_0xe2da('0x2f')]);_0x2b7b18[_0xe2da('0x35')]=_[_0xe2da('0x48')](_0x51653d['query']);_0x2b7b18[_0xe2da('0x36')]=_[_0xe2da('0x37')](_0x2b7b18[_0xe2da('0x33')],_0x2b7b18[_0xe2da('0x35')]);_0x3cca50[_0xe2da('0x38')]=_[_0xe2da('0x37')](_0x2b7b18['model'],qs['fields'](_0x51653d[_0xe2da('0x35')][_0xe2da('0x39')]));_0x3cca50['attributes']=_0x3cca50['attributes'][_0xe2da('0x3a')]?_0x3cca50['attributes']:_0x2b7b18[_0xe2da('0x33')];if(!_0x51653d[_0xe2da('0x35')]['hasOwnProperty'](_0xe2da('0x61'))){_0x3cca50[_0xe2da('0x3c')]=qs[_0xe2da('0x3c')](_0x51653d[_0xe2da('0x35')][_0xe2da('0x3c')]);_0x3cca50[_0xe2da('0x20')]=qs['offset'](_0x51653d[_0xe2da('0x35')]['offset']);}_0x3cca50[_0xe2da('0x5b')]=qs[_0xe2da('0x3d')](_0x51653d[_0xe2da('0x35')]['sort']);_0x3cca50[_0xe2da('0x3e')]=qs['filters'](_[_0xe2da('0x3f')](_0x51653d['query'],_0x2b7b18['filters']));_0x3cca50[_0xe2da('0x3e')]['CampaignId']=_0x329413['id'];if(_0x51653d[_0xe2da('0x35')][_0xe2da('0x40')]){_0x3cca50[_0xe2da('0x3e')]=_[_0xe2da('0x53')](_0x3cca50[_0xe2da('0x3e')],{'$or':_[_0xe2da('0x34')](_0x3cca50[_0xe2da('0x38')],function(_0x593a09){var _0x5207e5={};_0x5207e5[_0x593a09]={'$like':'%'+_0x51653d[_0xe2da('0x35')][_0xe2da('0x40')]+'%'};return _0x5207e5;})});}_0x3cca50=_[_0xe2da('0x53')]({},_0x3cca50,_0x51653d[_0xe2da('0x41')]);return db[_0xe2da('0x62')][_0xe2da('0x1f')]({'where':_0x3cca50['where']})['then'](function(_0x446fe1){_0x2b399e[_0xe2da('0x1f')]=_0x446fe1;if(_0x51653d[_0xe2da('0x35')]['includeAll']){_0x3cca50[_0xe2da('0x43')]=[{'all':!![]}];}return db[_0xe2da('0x62')][_0xe2da('0x44')](_0x3cca50);})[_0xe2da('0x26')](function(_0x53e7d8){_0x2b399e[_0xe2da('0x45')]=_0x53e7d8;return _0x2b399e;});}})['then'](respondWithFilteredResult(_0x37cf4b,_0x3cca50))['catch'](handleError(_0x37cf4b,null));};exports[_0xe2da('0x63')]=function(_0x4d4e9c,_0x51905b,_0xb7c12){var _0x7a762c={};var _0x378852={};var _0x316c03;var _0x4be1fe;return db[_0xe2da('0x2e')]['findOne']({'where':{'id':_0x4d4e9c['params']['id']}})['then'](handleEntityNotFound(_0x51905b,null))[_0xe2da('0x26')](function(_0x2597d9){if(_0x2597d9){_0x316c03=_0x2597d9;_0x378852['model']=_[_0xe2da('0x48')](db[_0xe2da('0x64')]['rawAttributes']);_0x378852[_0xe2da('0x35')]=_[_0xe2da('0x48')](_0x4d4e9c['query']);_0x378852[_0xe2da('0x36')]=_['intersection'](_0x378852[_0xe2da('0x33')],_0x378852[_0xe2da('0x35')]);_0x7a762c['attributes']=_['intersection'](_0x378852[_0xe2da('0x33')],qs[_0xe2da('0x39')](_0x4d4e9c[_0xe2da('0x35')]['fields']));_0x7a762c['attributes']=_0x7a762c['attributes']['length']?_0x7a762c[_0xe2da('0x38')]:_0x378852[_0xe2da('0x33')];_0x7a762c[_0xe2da('0x5b')]=qs[_0xe2da('0x3d')](_0x4d4e9c[_0xe2da('0x35')][_0xe2da('0x3d')]);_0x7a762c[_0xe2da('0x3e')]=qs[_0xe2da('0x36')](_[_0xe2da('0x3f')](_0x4d4e9c[_0xe2da('0x35')],_0x378852[_0xe2da('0x36')]));if(_0x4d4e9c[_0xe2da('0x35')]['filter']){_0x7a762c[_0xe2da('0x3e')]=_[_0xe2da('0x53')](_0x7a762c['where'],{'$or':_[_0xe2da('0x34')](_0x7a762c[_0xe2da('0x38')],function(_0xe6181a){var _0x16b8c4={};_0x16b8c4[_0xe6181a]={'$like':'%'+_0x4d4e9c['query'][_0xe2da('0x40')]+'%'};return _0x16b8c4;})});}_0x7a762c=_[_0xe2da('0x53')]({},_0x7a762c,_0x4d4e9c[_0xe2da('0x41')]);return _0x316c03[_0xe2da('0x63')](_0x7a762c);}})[_0xe2da('0x26')](function(_0x3dd581){if(_0x3dd581){_0x4be1fe=_0x3dd581[_0xe2da('0x3a')];if(!_0x4d4e9c[_0xe2da('0x35')][_0xe2da('0x3b')](_0xe2da('0x61'))){_0x7a762c[_0xe2da('0x3c')]=qs[_0xe2da('0x3c')](_0x4d4e9c['query'][_0xe2da('0x3c')]);_0x7a762c[_0xe2da('0x20')]=qs[_0xe2da('0x20')](_0x4d4e9c['query'][_0xe2da('0x20')]);}return _0x316c03[_0xe2da('0x63')](_0x7a762c);}})[_0xe2da('0x26')](function(_0xbb17d8){if(_0xbb17d8){return _0xbb17d8?{'count':_0x4be1fe,'rows':_0xbb17d8}:null;}})[_0xe2da('0x26')](respondWithResult(_0x51905b,null))[_0xe2da('0x50')](handleError(_0x51905b,null));};exports['addLists']=function(_0x1535e3,_0x1b8217,_0x540e77){var _0x3a19ab,_0x428a58;return db['Campaign']['find']({'where':{'id':_0x1535e3[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x1b8217,null))['then'](function(_0x283e89){if(_0x283e89){_0x428a58=_0x283e89;return _0x283e89[_0xe2da('0x65')](_0x1535e3[_0xe2da('0x57')][_0xe2da('0x66')],_[_0xe2da('0x54')](_0x1535e3['body'],[_0xe2da('0x66'),'id'])||{});}return null;})[_0xe2da('0x67')](function(_0x4bb2a8){var _0x501068;_0x3a19ab=_0x4bb2a8||[];var _0x47d1e4=[];if(_0x4bb2a8){for(var _0x6e59db=0x0;_0x6e59db<_0x4bb2a8['length'];_0x6e59db+=0x1){var _0x4e7bc3=_0x4bb2a8[_0x6e59db]['get']({'plain':!![]});_0x428a58[_0xe2da('0x68')]=_0x1535e3['body'][_0xe2da('0x68')]?_0x1535e3[_0xe2da('0x57')][_0xe2da('0x68')]:_0x428a58[_0xe2da('0x68')];switch(_0x428a58['dialCheckDuplicateType']){case _0xe2da('0x69'):_0x501068=squel[_0xe2da('0x6a')]()[_0xe2da('0x6b')](_0xe2da('0x6c'))[_0xe2da('0x6d')]([_0xe2da('0x6e'),_0xe2da('0x6f'),_0xe2da('0x70'),_0xe2da('0x71'),_0xe2da('0x5c'),_0xe2da('0x55'),_0xe2da('0x56')],squel[_0xe2da('0x72')]()[_0xe2da('0x73')]('phone',_0xe2da('0x6e'))['field'](_0xe2da('0x74'),_0xe2da('0x6f'))[_0xe2da('0x73')]('id','ContactId')[_0xe2da('0x73')](_0x4e7bc3[_0xe2da('0x75')][_0xe2da('0x76')](),_0xe2da('0x71'))[_0xe2da('0x73')](_0x1535e3[_0xe2da('0x47')]['id']['toString'](),_0xe2da('0x5c'))[_0xe2da('0x73')](_0xe2da('0x74'),_0xe2da('0x55'))[_0xe2da('0x73')](_0xe2da('0x74'),'updatedAt')[_0xe2da('0x77')](_0xe2da('0x78'))[_0xe2da('0x3e')]('deletedAt\x20IS\x20NULL')[_0xe2da('0x3e')]('ListId\x20=\x20?',_0x4e7bc3[_0xe2da('0x75')][_0xe2da('0x76')]())[_0xe2da('0x3e')](_0xe2da('0x79'))[_0xe2da('0x3e')]('phone\x20NOT\x20IN\x20(?)',squel[_0xe2da('0x72')]()[_0xe2da('0x73')](_0xe2da('0x7a'))[_0xe2da('0x77')]('cm_hopper_final')[_0xe2da('0x3e')](_0xe2da('0x7b'),_0x1535e3['params']['id'][_0xe2da('0x76')]()))[_0xe2da('0x3e')](_0xe2da('0x7c'),squel[_0xe2da('0x72')]()[_0xe2da('0x73')](_0xe2da('0x7d'))['from'](_0xe2da('0x6c'))[_0xe2da('0x3e')]('CampaignId\x20=\x20?',_0x1535e3['params']['id']['toString']())))['toString']();break;case'onlyIfOpen':_0x501068=squel[_0xe2da('0x6a')]()[_0xe2da('0x6b')]('cm_hopper')[_0xe2da('0x6d')]([_0xe2da('0x6e'),_0xe2da('0x6f'),_0xe2da('0x70'),_0xe2da('0x71'),_0xe2da('0x5c'),_0xe2da('0x55'),_0xe2da('0x56')],squel[_0xe2da('0x72')]()[_0xe2da('0x73')](_0xe2da('0x6e'),_0xe2da('0x6e'))[_0xe2da('0x73')](_0xe2da('0x74'),_0xe2da('0x6f'))['field']('id','ContactId')[_0xe2da('0x73')](_0x4e7bc3[_0xe2da('0x75')]['toString'](),_0xe2da('0x71'))['field'](_0x1535e3[_0xe2da('0x47')]['id'][_0xe2da('0x76')](),_0xe2da('0x5c'))[_0xe2da('0x73')]('NOW()',_0xe2da('0x55'))[_0xe2da('0x73')](_0xe2da('0x74'),_0xe2da('0x56'))[_0xe2da('0x77')](_0xe2da('0x78'))[_0xe2da('0x3e')](_0xe2da('0x7e'))[_0xe2da('0x3e')](_0xe2da('0x7f'),_0x4e7bc3[_0xe2da('0x75')][_0xe2da('0x76')]())[_0xe2da('0x3e')]('phone\x20IS\x20NOT\x20NULL')['where'](_0xe2da('0x7c'),squel[_0xe2da('0x72')]()['field'](_0xe2da('0x7d'))[_0xe2da('0x77')](_0xe2da('0x6c'))[_0xe2da('0x3e')](_0xe2da('0x7b'),_0x1535e3['params']['id'][_0xe2da('0x76')]())))[_0xe2da('0x76')]();break;default:_0x501068=squel[_0xe2da('0x6a')]()[_0xe2da('0x6b')](_0xe2da('0x6c'))[_0xe2da('0x6d')]([_0xe2da('0x6e'),_0xe2da('0x6f'),'ContactId','ListId',_0xe2da('0x5c'),_0xe2da('0x55'),_0xe2da('0x56')],squel[_0xe2da('0x72')]()['field'](_0xe2da('0x6e'),_0xe2da('0x6e'))['field'](_0xe2da('0x74'),_0xe2da('0x6f'))[_0xe2da('0x73')]('id',_0xe2da('0x70'))[_0xe2da('0x73')](_0x4e7bc3['CmListId'][_0xe2da('0x76')](),_0xe2da('0x71'))[_0xe2da('0x73')](_0x1535e3[_0xe2da('0x47')]['id']['toString'](),_0xe2da('0x5c'))[_0xe2da('0x73')](_0xe2da('0x74'),'createdAt')['field'](_0xe2da('0x74'),_0xe2da('0x56'))[_0xe2da('0x77')](_0xe2da('0x78'))['where'](_0xe2da('0x7e'))[_0xe2da('0x3e')](_0xe2da('0x7f'),_0x4e7bc3[_0xe2da('0x75')][_0xe2da('0x76')]())[_0xe2da('0x3e')](_0xe2da('0x79')))[_0xe2da('0x76')]();}_0x47d1e4['push'](db[_0xe2da('0x80')][_0xe2da('0x35')](_0x501068));}return BPromise[_0xe2da('0x81')](_0x47d1e4);}})[_0xe2da('0x26')](function(){return _0x3a19ab;})['then'](respondWithResult(_0x1b8217,null))[_0xe2da('0x50')](handleError(_0x1b8217,null));};exports[_0xe2da('0x82')]=function(_0x40636b,_0x1a26e5,_0x2d0d7a){return db[_0xe2da('0x2e')][_0xe2da('0x49')]({'where':{'id':_0x40636b[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x1a26e5,null))[_0xe2da('0x26')](function(_0x5c25ee){if(_0x5c25ee){return _0x5c25ee[_0xe2da('0x82')](_0x40636b[_0xe2da('0x35')]['ids']);}})[_0xe2da('0x26')](function(_0x1e6ec1){if(_0x1e6ec1){return db[_0xe2da('0x5a')][_0xe2da('0x27')]({'where':{'ListId':_0x40636b[_0xe2da('0x35')][_0xe2da('0x66')],'CampaignId':_0x40636b[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](function(){return _0x1e6ec1;});}})[_0xe2da('0x26')](respondWithStatusCode(_0x1a26e5,null))[_0xe2da('0x50')](handleError(_0x1a26e5,null));};exports[_0xe2da('0x83')]=function(_0x34feeb,_0xb819b7,_0x354821){var _0x1a07a9={'raw':!![],'where':{}};var _0x103e74={};var _0x22c905={'count':0x0,'rows':[]};return db[_0xe2da('0x2e')][_0xe2da('0x59')]({'where':{'id':_0x34feeb[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0xb819b7,null))[_0xe2da('0x26')](function(_0x1ea6a5){if(_0x1ea6a5){_0x103e74[_0xe2da('0x33')]=_[_0xe2da('0x48')](db['CmList'][_0xe2da('0x2f')]);_0x103e74[_0xe2da('0x35')]=_[_0xe2da('0x48')](_0x34feeb['query']);_0x103e74[_0xe2da('0x36')]=_[_0xe2da('0x37')](_0x103e74[_0xe2da('0x33')],_0x103e74[_0xe2da('0x35')]);_0x1a07a9[_0xe2da('0x38')]=_[_0xe2da('0x37')](_0x103e74[_0xe2da('0x33')],qs[_0xe2da('0x39')](_0x34feeb['query'][_0xe2da('0x39')]));_0x1a07a9['attributes']=_0x1a07a9['attributes'][_0xe2da('0x3a')]?_0x1a07a9['attributes']:_0x103e74[_0xe2da('0x33')];if(!_0x34feeb[_0xe2da('0x35')][_0xe2da('0x3b')](_0xe2da('0x61'))){_0x1a07a9['limit']=qs['limit'](_0x34feeb[_0xe2da('0x35')][_0xe2da('0x3c')]);_0x1a07a9[_0xe2da('0x20')]=qs[_0xe2da('0x20')](_0x34feeb[_0xe2da('0x35')][_0xe2da('0x20')]);}_0x1a07a9[_0xe2da('0x5b')]=qs[_0xe2da('0x3d')](_0x34feeb[_0xe2da('0x35')][_0xe2da('0x3d')]);_0x1a07a9[_0xe2da('0x3e')]=qs[_0xe2da('0x36')](_[_0xe2da('0x3f')](_0x34feeb['query'],_0x103e74[_0xe2da('0x36')]));_0x1a07a9[_0xe2da('0x3e')][_0xe2da('0x5c')]=_0x1ea6a5['id'];if(_0x34feeb[_0xe2da('0x35')][_0xe2da('0x40')]){_0x1a07a9[_0xe2da('0x3e')]=_[_0xe2da('0x53')](_0x1a07a9[_0xe2da('0x3e')],{'$or':_[_0xe2da('0x34')](_0x1a07a9[_0xe2da('0x38')],function(_0x303a97){var _0x1295b8={};_0x1295b8[_0x303a97]={'$like':'%'+_0x34feeb[_0xe2da('0x35')]['filter']+'%'};return _0x1295b8;})});}_0x1a07a9=_['merge']({},_0x1a07a9,_0x34feeb[_0xe2da('0x41')]);return db[_0xe2da('0x64')][_0xe2da('0x1f')]({'where':_0x1a07a9['where']})['then'](function(_0x2306c2){_0x22c905['count']=_0x2306c2;if(_0x34feeb[_0xe2da('0x35')]['includeAll']){_0x1a07a9[_0xe2da('0x43')]=[{'all':!![]}];}return db[_0xe2da('0x64')][_0xe2da('0x44')](_0x1a07a9);})[_0xe2da('0x26')](function(_0x13fd89){_0x22c905[_0xe2da('0x45')]=_0x13fd89;return _0x22c905;});}})[_0xe2da('0x26')](respondWithFilteredResult(_0xb819b7,_0x1a07a9))[_0xe2da('0x50')](handleError(_0xb819b7,null));};exports[_0xe2da('0x84')]=function(_0x50ee87,_0x1c0df3,_0x21f2c7){var _0x6eb17,_0x41913c;return db[_0xe2da('0x2e')]['find']({'where':{'id':_0x50ee87['params']['id']}})['then'](handleEntityNotFound(_0x1c0df3,null))[_0xe2da('0x26')](function(_0xe2e9d4){if(_0xe2e9d4){_0x41913c=_0xe2e9d4;return _0xe2e9d4[_0xe2da('0x84')](_0x50ee87['body'][_0xe2da('0x66')],_[_0xe2da('0x54')](_0x50ee87[_0xe2da('0x57')],[_0xe2da('0x66'),'id'])||{});}return null;})[_0xe2da('0x67')](function(_0x3ac749){var _0x2cfe3f;_0x6eb17=_0x3ac749||[];var _0x16664d=[];if(_0x3ac749){for(var _0x2d41a9=0x0;_0x2d41a9<_0x3ac749[_0xe2da('0x3a')];_0x2d41a9+=0x1){var _0x436e1e=_0x3ac749[_0x2d41a9][_0xe2da('0x28')]({'plain':!![]});_0x2cfe3f=squel['insert']()[_0xe2da('0x6b')](_0xe2da('0x85'))['fromQuery']([_0xe2da('0x6e'),_0xe2da('0x70'),_0xe2da('0x71'),_0xe2da('0x5c'),_0xe2da('0x55'),_0xe2da('0x56')],squel[_0xe2da('0x72')]()[_0xe2da('0x73')]('phone',_0xe2da('0x6e'))['field']('id',_0xe2da('0x70'))['field'](_0x436e1e['CmListId']['toString'](),_0xe2da('0x71'))[_0xe2da('0x73')](_0x50ee87[_0xe2da('0x47')]['id']['toString'](),_0xe2da('0x5c'))[_0xe2da('0x73')](_0xe2da('0x74'),_0xe2da('0x55'))[_0xe2da('0x73')](_0xe2da('0x74'),_0xe2da('0x56'))[_0xe2da('0x77')]('cm_contacts')[_0xe2da('0x3e')](_0xe2da('0x7e'))[_0xe2da('0x3e')]('ListId\x20=\x20?',_0x436e1e[_0xe2da('0x75')][_0xe2da('0x76')]())[_0xe2da('0x3e')]('phone\x20IS\x20NOT\x20NULL'))[_0xe2da('0x76')]();_0x16664d[_0xe2da('0x86')](db[_0xe2da('0x80')][_0xe2da('0x35')](_0x2cfe3f));}return BPromise['all'](_0x16664d);}})[_0xe2da('0x26')](function(){return _0x6eb17;})[_0xe2da('0x26')](respondWithResult(_0x1c0df3,null))[_0xe2da('0x50')](handleError(_0x1c0df3,null));};exports['removeBlackLists']=function(_0x56c318,_0x4ce9e2,_0x1c3c81){return db[_0xe2da('0x2e')][_0xe2da('0x49')]({'where':{'id':_0x56c318[_0xe2da('0x47')]['id']}})[_0xe2da('0x26')](handleEntityNotFound(_0x4ce9e2,null))[_0xe2da('0x26')](function(_0x140150){if(_0x140150){return _0x140150[_0xe2da('0x87')](_0x56c318[_0xe2da('0x35')]['ids']);}})[_0xe2da('0x26')](function(_0xb06cc6){if(_0xb06cc6){return db[_0xe2da('0x62')]['destroy']({'where':{'ListId':_0x56c318[_0xe2da('0x35')][_0xe2da('0x66')],'CampaignId':_0x56c318['params']['id']}})[_0xe2da('0x26')](function(){return _0xb06cc6;});}})['then'](respondWithStatusCode(_0x4ce9e2,null))[_0xe2da('0x50')](handleError(_0x4ce9e2,null));};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js
index ba7635a..41313f1 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 _0x40cd=['../../config/environment','./campaign.attributes','exports','define','Campaign','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x274e02,_0x50ef10){var _0x1ce25f=function(_0x24af67){while(--_0x24af67){_0x274e02['push'](_0x274e02['shift']());}};_0x1ce25f(++_0x50ef10);}(_0x40cd,0x13d));var _0xd40c=function(_0x8fcb6,_0x336388){_0x8fcb6=_0x8fcb6-0x0;var _0x171002=_0x40cd[_0x8fcb6];return _0x171002;};'use strict';var _=require(_0xd40c('0x0'));var util=require(_0xd40c('0x1'));var logger=require(_0xd40c('0x2'))(_0xd40c('0x3'));var moment=require(_0xd40c('0x4'));var BPromise=require(_0xd40c('0x5'));var rp=require(_0xd40c('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd40c('0x7'));var config=require(_0xd40c('0x8'));var attributes=require(_0xd40c('0x9'));module[_0xd40c('0xa')]=function(_0x5874b5,_0x503829){return _0x5874b5[_0xd40c('0xb')](_0xd40c('0xc'),attributes,{'tableName':'campaigns','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x109c=['request-promise','path','rimraf','../../config/environment','./campaign.attributes','exports','define','Campaign','campaigns','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0x109c,0x1cb));var _0xc109=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x109c[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0xc109('0x0'));var util=require(_0xc109('0x1'));var logger=require(_0xc109('0x2'))(_0xc109('0x3'));var moment=require(_0xc109('0x4'));var BPromise=require(_0xc109('0x5'));var rp=require(_0xc109('0x6'));var fs=require('fs');var path=require(_0xc109('0x7'));var rimraf=require(_0xc109('0x8'));var config=require(_0xc109('0x9'));var attributes=require(_0xc109('0xa'));module[_0xc109('0xb')]=function(_0x40a41b,_0x3b0f44){return _0x40a41b[_0xc109('0xc')](_0xc109('0xd'),attributes,{'tableName':_0xc109('0xe'),'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 2422309..c20cf46 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 _0x9957=['catch','GetCampaign','findAll','raw','options','where','attributes','limit','map','include','model','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x17b0bf,_0x36e400){var _0x2ace2a=function(_0x52662f){while(--_0x52662f){_0x17b0bf['push'](_0x17b0bf['shift']());}};_0x2ace2a(++_0x36e400);}(_0x9957,0x93));var _0x7995=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x9957[_0x5ddb1c];return _0x354adc;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];var utils=require(_0x7995('0x6'));var logger=require(_0x7995('0x7'))('rpc');var config=require(_0x7995('0x8'));var jayson=require(_0x7995('0x9'));var client=jayson[_0x7995('0xa')][_0x7995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbda126,_0x326741,_0x4996ca){return new BPromise(function(_0x465276,_0x1cad37){return client['request'](_0xbda126,_0x4996ca)[_0x7995('0xc')](function(_0x3116fb){logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));logger[_0x7995('0x10')](_0x7995('0x11'),_0x326741,'request\x20sent',JSON[_0x7995('0x12')](_0x3116fb));if(_0x3116fb[_0x7995('0x13')]){if(_0x3116fb['error'][_0x7995('0x14')]===0x1f4){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x1cad37(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}logger['error']('Campaign,\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);});});}exports[_0x7995('0x18')]=function(_0x291317){var _0x1e1415=this;return new Promise(function(_0x37a7d4,_0x4faa60){return db['Campaign'][_0x7995('0x19')]({'raw':_0x291317['options']?_0x291317['options'][_0x7995('0x1a')]===undefined?!![]:![]:!![],'where':_0x291317[_0x7995('0x1b')]?_0x291317['options'][_0x7995('0x1c')]||null:null,'attributes':_0x291317['options']?_0x291317['options'][_0x7995('0x1d')]||null:null,'limit':_0x291317[_0x7995('0x1b')]?_0x291317[_0x7995('0x1b')][_0x7995('0x1e')]||null:null,'include':_0x291317[_0x7995('0x1b')]?_0x291317[_0x7995('0x1b')]['include']?_[_0x7995('0x1f')](_0x291317[_0x7995('0x1b')][_0x7995('0x20')],function(_0x285437){return{'model':db[_0x285437[_0x7995('0x21')]],'as':_0x285437['as'],'attributes':_0x285437[_0x7995('0x1d')],'include':_0x285437[_0x7995('0x20')]?_[_0x7995('0x1f')](_0x285437['include'],function(_0x39df42){return{'model':db[_0x39df42[_0x7995('0x21')]],'as':_0x39df42['as'],'attributes':_0x39df42[_0x7995('0x1d')],'include':_0x39df42[_0x7995('0x20')]?_[_0x7995('0x1f')](_0x39df42[_0x7995('0x20')],function(_0x56691a){return{'model':db[_0x56691a[_0x7995('0x21')]],'as':_0x56691a['as'],'attributes':_0x56691a['attributes']};}):[]};}):[]};}):[]:[]})[_0x7995('0xc')](function(_0x49bc7e){logger[_0x7995('0xd')](_0x7995('0x18'),_0x291317);logger[_0x7995('0x10')]('GetCampaign',_0x291317,JSON[_0x7995('0x12')](_0x49bc7e));_0x37a7d4(_0x49bc7e);})['catch'](function(_0x456a28){logger[_0x7995('0x13')](_0x7995('0x18'),_0x456a28['message'],_0x291317);_0x4faa60(_0x1e1415['error'](0x1f4,_0x456a28['message']));});});};
\ No newline at end of file
+var _0x9957=['catch','GetCampaign','findAll','raw','options','where','attributes','limit','map','include','model','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x47da8d,_0x517e13){var _0x5aabef=function(_0x2528d7){while(--_0x2528d7){_0x47da8d['push'](_0x47da8d['shift']());}};_0x5aabef(++_0x517e13);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];var utils=require(_0x7995('0x6'));var logger=require(_0x7995('0x7'))('rpc');var config=require(_0x7995('0x8'));var jayson=require(_0x7995('0x9'));var client=jayson[_0x7995('0xa')][_0x7995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbda126,_0x326741,_0x4996ca){return new BPromise(function(_0x465276,_0x1cad37){return client['request'](_0xbda126,_0x4996ca)[_0x7995('0xc')](function(_0x3116fb){logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));logger[_0x7995('0x10')](_0x7995('0x11'),_0x326741,'request\x20sent',JSON[_0x7995('0x12')](_0x3116fb));if(_0x3116fb[_0x7995('0x13')]){if(_0x3116fb['error'][_0x7995('0x14')]===0x1f4){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x1cad37(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}logger['error']('Campaign,\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);});});}exports[_0x7995('0x18')]=function(_0x291317){var _0x1e1415=this;return new Promise(function(_0x37a7d4,_0x4faa60){return db['Campaign'][_0x7995('0x19')]({'raw':_0x291317['options']?_0x291317['options'][_0x7995('0x1a')]===undefined?!![]:![]:!![],'where':_0x291317[_0x7995('0x1b')]?_0x291317['options'][_0x7995('0x1c')]||null:null,'attributes':_0x291317['options']?_0x291317['options'][_0x7995('0x1d')]||null:null,'limit':_0x291317[_0x7995('0x1b')]?_0x291317[_0x7995('0x1b')][_0x7995('0x1e')]||null:null,'include':_0x291317[_0x7995('0x1b')]?_0x291317[_0x7995('0x1b')]['include']?_[_0x7995('0x1f')](_0x291317[_0x7995('0x1b')][_0x7995('0x20')],function(_0x285437){return{'model':db[_0x285437[_0x7995('0x21')]],'as':_0x285437['as'],'attributes':_0x285437[_0x7995('0x1d')],'include':_0x285437[_0x7995('0x20')]?_[_0x7995('0x1f')](_0x285437['include'],function(_0x39df42){return{'model':db[_0x39df42[_0x7995('0x21')]],'as':_0x39df42['as'],'attributes':_0x39df42[_0x7995('0x1d')],'include':_0x39df42[_0x7995('0x20')]?_[_0x7995('0x1f')](_0x39df42[_0x7995('0x20')],function(_0x56691a){return{'model':db[_0x56691a[_0x7995('0x21')]],'as':_0x56691a['as'],'attributes':_0x56691a['attributes']};}):[]};}):[]};}):[]:[]})[_0x7995('0xc')](function(_0x49bc7e){logger[_0x7995('0xd')](_0x7995('0x18'),_0x291317);logger[_0x7995('0x10')]('GetCampaign',_0x291317,JSON[_0x7995('0x12')](_0x49bc7e));_0x37a7d4(_0x49bc7e);})['catch'](function(_0x456a28){logger[_0x7995('0x13')](_0x7995('0x18'),_0x456a28['message'],_0x291317);_0x4faa60(_0x1e1415['error'](0x1f4,_0x456a28['message']));});});};
\ No newline at end of file
diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js
index df5f6da..154ada4 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 _0x8db5=['getHopperHistories','/:id/hopper_finals','getHopperFinals','getHopperBlacks','/:id/blacklists','post','/:id/clone','clone','/:id/lists','addBlackLists','put','update','delete','destroy','removeBlackLists','multer','util','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','isAuthenticated','index','/:id','show','getHoppers'];(function(_0x4a29a9,_0x58cd04){var _0x386570=function(_0x1d2d09){while(--_0x1d2d09){_0x4a29a9['push'](_0x4a29a9['shift']());}};_0x386570(++_0x58cd04);}(_0x8db5,0x1bf));var _0x58db=function(_0x11a5a2,_0x1411fb){_0x11a5a2=_0x11a5a2-0x0;var _0xaf1ed0=_0x8db5[_0x11a5a2];return _0xaf1ed0;};'use strict';var multer=require(_0x58db('0x0'));var util=require(_0x58db('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require(_0x58db('0x2'));var interaction=require(_0x58db('0x3'));var config=require(_0x58db('0x4'));var controller=require(_0x58db('0x5'));router[_0x58db('0x6')]('/',auth[_0x58db('0x7')](),controller[_0x58db('0x8')]);router['get'](_0x58db('0x9'),auth['isAuthenticated'](),controller[_0x58db('0xa')]);router[_0x58db('0x6')]('/:id/hoppers',auth[_0x58db('0x7')](),controller[_0x58db('0xb')]);router['get']('/:id/hopper_histories',auth[_0x58db('0x7')](),controller[_0x58db('0xc')]);router[_0x58db('0x6')](_0x58db('0xd'),auth[_0x58db('0x7')](),controller[_0x58db('0xe')]);router[_0x58db('0x6')]('/:id/hopper_black',auth['isAuthenticated'](),controller[_0x58db('0xf')]);router['get']('/:id/lists',auth[_0x58db('0x7')](),controller['getLists']);router[_0x58db('0x6')](_0x58db('0x10'),auth['isAuthenticated'](),controller['getBlackLists']);router['post']('/',auth[_0x58db('0x7')](),controller['create']);router[_0x58db('0x11')](_0x58db('0x12'),auth[_0x58db('0x7')](),controller[_0x58db('0x13')]);router[_0x58db('0x11')](_0x58db('0x14'),auth['isAuthenticated'](),controller['addLists']);router['post']('/:id/blacklists',auth['isAuthenticated'](),controller[_0x58db('0x15')]);router[_0x58db('0x16')](_0x58db('0x9'),auth['isAuthenticated'](),controller[_0x58db('0x17')]);router[_0x58db('0x18')](_0x58db('0x9'),auth[_0x58db('0x7')](),controller[_0x58db('0x19')]);router['delete']('/:id/lists',auth[_0x58db('0x7')](),controller['removeLists']);router[_0x58db('0x18')]('/:id/blacklists',auth['isAuthenticated'](),controller[_0x58db('0x1a')]);module['exports']=router;
\ No newline at end of file
+var _0xd447=['removeBlackLists','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','show','/:id/hoppers','getHoppers','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/lists','getLists','/:id/blacklists','getBlackLists','create','/:id/clone','clone','post','addBlackLists','put','update','delete'];(function(_0xf0bc07,_0x510ebf){var _0x1c50c2=function(_0x2e2bdf){while(--_0x2e2bdf){_0xf0bc07['push'](_0xf0bc07['shift']());}};_0x1c50c2(++_0x510ebf);}(_0xd447,0xc8));var _0x7d44=function(_0x3ab6d4,_0xa65d39){_0x3ab6d4=_0x3ab6d4-0x0;var _0xf7a29b=_0xd447[_0x3ab6d4];return _0xf7a29b;};'use strict';var multer=require('multer');var util=require(_0x7d44('0x0'));var path=require('path');var timeout=require(_0x7d44('0x1'));var express=require(_0x7d44('0x2'));var router=express[_0x7d44('0x3')]();var auth=require(_0x7d44('0x4'));var interaction=require(_0x7d44('0x5'));var config=require(_0x7d44('0x6'));var controller=require('./campaign.controller');router[_0x7d44('0x7')]('/',auth['isAuthenticated'](),controller[_0x7d44('0x8')]);router[_0x7d44('0x7')](_0x7d44('0x9'),auth[_0x7d44('0xa')](),controller[_0x7d44('0xb')]);router[_0x7d44('0x7')](_0x7d44('0xc'),auth[_0x7d44('0xa')](),controller[_0x7d44('0xd')]);router[_0x7d44('0x7')]('/:id/hopper_histories',auth['isAuthenticated'](),controller[_0x7d44('0xe')]);router['get'](_0x7d44('0xf'),auth[_0x7d44('0xa')](),controller[_0x7d44('0x10')]);router[_0x7d44('0x7')](_0x7d44('0x11'),auth[_0x7d44('0xa')](),controller[_0x7d44('0x12')]);router[_0x7d44('0x7')](_0x7d44('0x13'),auth[_0x7d44('0xa')](),controller[_0x7d44('0x14')]);router[_0x7d44('0x7')](_0x7d44('0x15'),auth[_0x7d44('0xa')](),controller[_0x7d44('0x16')]);router['post']('/',auth[_0x7d44('0xa')](),controller[_0x7d44('0x17')]);router['post'](_0x7d44('0x18'),auth[_0x7d44('0xa')](),controller[_0x7d44('0x19')]);router[_0x7d44('0x1a')](_0x7d44('0x13'),auth[_0x7d44('0xa')](),controller['addLists']);router[_0x7d44('0x1a')](_0x7d44('0x15'),auth[_0x7d44('0xa')](),controller[_0x7d44('0x1b')]);router[_0x7d44('0x1c')]('/:id',auth[_0x7d44('0xa')](),controller[_0x7d44('0x1d')]);router[_0x7d44('0x1e')](_0x7d44('0x9'),auth[_0x7d44('0xa')](),controller['destroy']);router['delete'](_0x7d44('0x13'),auth[_0x7d44('0xa')](),controller['removeLists']);router[_0x7d44('0x1e')]('/:id/blacklists',auth[_0x7d44('0xa')](),controller[_0x7d44('0x1f')]);module[_0x7d44('0x20')]=router;
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js
index 8d0d63c..2810d3e 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 _0xbb77=['getDataValue','key','exports','STRING','VIRTUAL'];(function(_0x56f6f4,_0x219fcf){var _0x4dbbcc=function(_0x1fee29){while(--_0x1fee29){_0x56f6f4['push'](_0x56f6f4['shift']());}};_0x4dbbcc(++_0x219fcf);}(_0xbb77,0x14c));var _0x7bb7=function(_0x29ef33,_0xc19753){_0x29ef33=_0x29ef33-0x0;var _0x252b73=_0xbb77[_0x29ef33];return _0x252b73;};'use strict';var Sequelize=require('sequelize');module[_0x7bb7('0x0')]={'key':{'type':Sequelize[_0x7bb7('0x1')],'allowNull':![]},'value':{'type':Sequelize['TEXT'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'name':{'type':Sequelize[_0x7bb7('0x2')],'get':function(){return this[_0x7bb7('0x3')](_0x7bb7('0x4'));}}};
\ No newline at end of file
+var _0xe264=['exports','STRING','TEXT','VIRTUAL','getDataValue','key','sequelize'];(function(_0x890a92,_0x2c36ce){var _0x223def=function(_0x2c1ef8){while(--_0x2c1ef8){_0x890a92['push'](_0x890a92['shift']());}};_0x223def(++_0x2c36ce);}(_0xe264,0x187));var _0x4e26=function(_0x16d10f,_0x2ba2d5){_0x16d10f=_0x16d10f-0x0;var _0x50c823=_0xe264[_0x16d10f];return _0x50c823;};'use strict';var Sequelize=require(_0x4e26('0x0'));module[_0x4e26('0x1')]={'key':{'type':Sequelize[_0x4e26('0x2')],'allowNull':![]},'value':{'type':Sequelize[_0x4e26('0x3')],'allowNull':![]},'description':{'type':Sequelize[_0x4e26('0x2')]},'name':{'type':Sequelize[_0x4e26('0x4')],'get':function(){return this[_0x4e26('0x5')](_0x4e26('0x6'));}}};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js
index 98186ad..1b13763 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 _0x34e8=['filters','intersection','attributes','fields','length','order','sort','pick','filter','where','merge','options','include','findAll','catch','show','includeAll','find','body','params','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','The\x20inserted\x20key\x20already\x20exists.','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','CannedAnswers','destroy','sendStatus','error','stack','name','map','CannedAnswer','rawAttributes','fieldName','type','key','model','keys','query'];(function(_0x22d85d,_0xe3923){var _0x4cb536=function(_0x10303e){while(--_0x10303e){_0x22d85d['push'](_0x22d85d['shift']());}};_0x4cb536(++_0xe3923);}(_0x34e8,0x12c));var _0x834e=function(_0x45cefa,_0x413e5d){_0x45cefa=_0x45cefa-0x0;var _0xf7f16d=_0x34e8[_0x45cefa];return _0xf7f16d;};'use strict';var pdf=require(_0x834e('0x0'));var emlformat=require(_0x834e('0x1'));var rimraf=require(_0x834e('0x2'));var zipdir=require(_0x834e('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x834e('0x4'));var moment=require(_0x834e('0x5'));var BPromise=require(_0x834e('0x6'));var Mustache=require(_0x834e('0x7'));var util=require(_0x834e('0x8'));var path=require(_0x834e('0x9'));var sox=require(_0x834e('0xa'));var csv=require('to-csv');var ejs=require(_0x834e('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x834e('0xc'));var crypto=require(_0x834e('0xd'));var jsforce=require(_0x834e('0xe'));var deskjs=require(_0x834e('0xf'));var toCsv=require(_0x834e('0x10'));var querystring=require(_0x834e('0x11'));var Papa=require(_0x834e('0x12'));var Redis=require(_0x834e('0x13'));var authService=require(_0x834e('0x14'));var qs=require(_0x834e('0x15'));var as=require(_0x834e('0x16'));var hardwareService=require(_0x834e('0x17'));var logger=require(_0x834e('0x18'))(_0x834e('0x19'));var utils=require(_0x834e('0x1a'));var config=require(_0x834e('0x1b'));var db=require(_0x834e('0x1c'))['db'];function respondWithStatusCode(_0x538bb3,_0x5e5b6d){_0x5e5b6d=_0x5e5b6d||0xcc;return function(_0x6cd9b9){if(_0x6cd9b9){return _0x538bb3['sendStatus'](_0x5e5b6d);}return _0x538bb3[_0x834e('0x1d')](_0x5e5b6d)[_0x834e('0x1e')]();};}function respondWithResult(_0x28e659,_0x21cc0a){_0x21cc0a=_0x21cc0a||0xc8;return function(_0x50e860){if(_0x50e860){return _0x28e659[_0x834e('0x1d')](_0x21cc0a)[_0x834e('0x1f')](_0x50e860);}};}function respondWithFilteredResult(_0x57274a,_0x316205){return function(_0x4a9cdc){if(_0x4a9cdc){var _0x38a8cd=_0x4a9cdc[_0x834e('0x20')],_0x36d443=_0x316205[_0x834e('0x21')],_0x478afe=_0x316205['offset']+_0x316205[_0x834e('0x22')],_0x43ac41;if(_0x478afe>=_0x38a8cd){_0x478afe=_0x38a8cd;_0x43ac41=0xc8;}else{_0x43ac41=0xce;}_0x57274a[_0x834e('0x1d')](_0x43ac41);return _0x57274a[_0x834e('0x23')](_0x834e('0x24'),_0x36d443+'-'+_0x478afe+'/'+_0x38a8cd)[_0x834e('0x1f')](_0x4a9cdc);}return null;};}function patchUpdates(_0x254677){return function(_0x1dd214){try{jsonpatch['apply'](_0x1dd214,_0x254677,!![]);}catch(_0x2545b4){return BPromise[_0x834e('0x25')](_0x2545b4);}return _0x1dd214[_0x834e('0x26')]();};}function saveUpdates(_0x325a99,_0x4ab05d){return function(_0x45a630){if(_0x45a630){return _0x45a630[_0x834e('0x27')](_0x325a99)['then'](function(_0x1b4bdf){return _0x1b4bdf;});}return null;};}function removeEntity(_0x28d687,_0x8d406e){return function(_0x5c55ca){if(_0x5c55ca){return _0x5c55ca['destroy']()[_0x834e('0x28')](function(){var _0x34563b=_0x5c55ca['get']({'plain':!![]});var _0x25ee1d=_0x834e('0x29');return db['UserProfileResource'][_0x834e('0x2a')]({'where':{'type':_0x25ee1d,'resourceId':_0x34563b['id']}})[_0x834e('0x28')](function(){return _0x5c55ca;});})[_0x834e('0x28')](function(){_0x28d687['status'](0xcc)[_0x834e('0x1e')]();});}};}function handleEntityNotFound(_0x3e310f,_0x5e1cc5){return function(_0x5bef62){if(!_0x5bef62){_0x3e310f[_0x834e('0x2b')](0x194);}return _0x5bef62;};}function handleError(_0x508a1d,_0x2826ec){_0x2826ec=_0x2826ec||0x1f4;return function(_0x3f1b0b){logger[_0x834e('0x2c')](_0x3f1b0b[_0x834e('0x2d')]);if(_0x3f1b0b[_0x834e('0x2e')]){delete _0x3f1b0b[_0x834e('0x2e')];}_0x508a1d['status'](_0x2826ec)['send'](_0x3f1b0b);};}exports['index']=function(_0x58c1d7,_0x2c7a8d){var _0x567cea={},_0x106d6a={},_0x5dacc1={'count':0x0,'rows':[]};var _0xb5bc06=_[_0x834e('0x2f')](db[_0x834e('0x30')][_0x834e('0x31')],function(_0x4551f5){return{'name':_0x4551f5[_0x834e('0x32')],'type':_0x4551f5[_0x834e('0x33')][_0x834e('0x34')]};});_0x106d6a[_0x834e('0x35')]=_['map'](_0xb5bc06,_0x834e('0x2e'));_0x106d6a['query']=_[_0x834e('0x36')](_0x58c1d7[_0x834e('0x37')]);_0x106d6a[_0x834e('0x38')]=_[_0x834e('0x39')](_0x106d6a[_0x834e('0x35')],_0x106d6a[_0x834e('0x37')]);_0x567cea[_0x834e('0x3a')]=_[_0x834e('0x39')](_0x106d6a[_0x834e('0x35')],qs[_0x834e('0x3b')](_0x58c1d7['query'][_0x834e('0x3b')]));_0x567cea[_0x834e('0x3a')]=_0x567cea[_0x834e('0x3a')][_0x834e('0x3c')]?_0x567cea['attributes']:_0x106d6a[_0x834e('0x35')];if(!_0x58c1d7[_0x834e('0x37')]['hasOwnProperty']('nolimit')){_0x567cea['limit']=qs[_0x834e('0x22')](_0x58c1d7[_0x834e('0x37')][_0x834e('0x22')]);_0x567cea[_0x834e('0x21')]=qs[_0x834e('0x21')](_0x58c1d7[_0x834e('0x37')]['offset']);}_0x567cea[_0x834e('0x3d')]=qs['sort'](_0x58c1d7[_0x834e('0x37')][_0x834e('0x3e')]);_0x567cea['where']=qs[_0x834e('0x38')](_[_0x834e('0x3f')](_0x58c1d7['query'],_0x106d6a['filters']));if(_0x58c1d7[_0x834e('0x37')][_0x834e('0x40')]){_0x567cea[_0x834e('0x41')]=_[_0x834e('0x42')](_0x567cea[_0x834e('0x41')],{'$or':_['map'](_0xb5bc06,function(_0x1c5ed6){if(_0x1c5ed6['type']!=='VIRTUAL'){var _0x1b2edf={};_0x1b2edf[_0x1c5ed6['name']]={'$like':'%'+_0x58c1d7[_0x834e('0x37')][_0x834e('0x40')]+'%'};return _0x1b2edf;}})});}_0x567cea=_[_0x834e('0x42')]({},_0x567cea,_0x58c1d7[_0x834e('0x43')]);var _0x2b7933={'where':_0x567cea['where']};return db[_0x834e('0x30')][_0x834e('0x20')](_0x2b7933)[_0x834e('0x28')](function(_0x58c5fb){_0x5dacc1[_0x834e('0x20')]=_0x58c5fb;if(_0x58c1d7[_0x834e('0x37')]['includeAll']){_0x567cea[_0x834e('0x44')]=[{'all':!![]}];}return db['CannedAnswer'][_0x834e('0x45')](_0x567cea);})[_0x834e('0x28')](function(_0x4a18bb){_0x5dacc1['rows']=_0x4a18bb;return _0x5dacc1;})[_0x834e('0x28')](respondWithFilteredResult(_0x2c7a8d,_0x567cea))[_0x834e('0x46')](handleError(_0x2c7a8d,null));};exports[_0x834e('0x47')]=function(_0xbc1571,_0x8ad264){var _0x23feea={'raw':!![],'where':{'id':_0xbc1571['params']['id']}},_0x195204={};_0x195204[_0x834e('0x35')]=_['keys'](db[_0x834e('0x30')]['rawAttributes']);_0x195204[_0x834e('0x37')]=_['keys'](_0xbc1571[_0x834e('0x37')]);_0x195204[_0x834e('0x38')]=_['intersection'](_0x195204[_0x834e('0x35')],_0x195204[_0x834e('0x37')]);_0x23feea[_0x834e('0x3a')]=_[_0x834e('0x39')](_0x195204[_0x834e('0x35')],qs[_0x834e('0x3b')](_0xbc1571[_0x834e('0x37')][_0x834e('0x3b')]));_0x23feea[_0x834e('0x3a')]=_0x23feea[_0x834e('0x3a')]['length']?_0x23feea[_0x834e('0x3a')]:_0x195204[_0x834e('0x35')];if(_0xbc1571['query'][_0x834e('0x48')]){_0x23feea[_0x834e('0x44')]=[{'all':!![]}];}_0x23feea=_[_0x834e('0x42')]({},_0x23feea,_0xbc1571[_0x834e('0x43')]);return db[_0x834e('0x30')][_0x834e('0x49')](_0x23feea)['then'](handleEntityNotFound(_0x8ad264,null))['then'](respondWithResult(_0x8ad264,null))[_0x834e('0x46')](handleError(_0x8ad264,null));};exports[_0x834e('0x27')]=function(_0x30568e,_0x40ff5a){if(_0x30568e[_0x834e('0x4a')]['id']){delete _0x30568e[_0x834e('0x4a')]['id'];}return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x30568e[_0x834e('0x4b')]['id']}})[_0x834e('0x28')](handleEntityNotFound(_0x40ff5a,null))[_0x834e('0x28')](saveUpdates(_0x30568e[_0x834e('0x4a')],null))[_0x834e('0x28')](respondWithResult(_0x40ff5a,null))[_0x834e('0x46')](handleError(_0x40ff5a,null));};exports[_0x834e('0x2a')]=function(_0x1a3855,_0x3df078){return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x1a3855[_0x834e('0x4b')]['id']}})['then'](handleEntityNotFound(_0x3df078,null))[_0x834e('0x28')](removeEntity(_0x3df078,null))[_0x834e('0x46')](handleError(_0x3df078,null));};exports['create']=function(_0x3c00a3,_0x3b0988){var _0x55d491={'key':_0x3c00a3[_0x834e('0x4a')][_0x834e('0x34')]};if(_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4c')]){_0x55d491[_0x834e('0x4c')]=_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4c')];}else if(_0x3c00a3['body'][_0x834e('0x4d')]){_0x55d491[_0x834e('0x4d')]=_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4d')];}else if(_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4e')]){_0x55d491[_0x834e('0x4e')]=_0x3c00a3[_0x834e('0x4a')]['OpenchannelAccountId'];}else if(_0x3c00a3[_0x834e('0x4a')]['ChatWebsiteId']){_0x55d491[_0x834e('0x4f')]=_0x3c00a3['body'][_0x834e('0x4f')];}return db['CannedAnswer']['find']({'where':_0x55d491})[_0x834e('0x28')](function(_0x3e1bee){if(_0x3e1bee){throw new db['Sequelize']['ValidationError'](_0x834e('0x50'));}return db[_0x834e('0x30')][_0x834e('0x51')](_0x3c00a3[_0x834e('0x4a')]);})[_0x834e('0x28')](function(_0x315858){var _0x3d3f2b=_0x3c00a3[_0x834e('0x52')]['get']({'plain':!![]});if(!_0x3d3f2b)throw new Error(_0x834e('0x53'));if(_0x3d3f2b[_0x834e('0x54')]==='user'){var _0x281342=_0x315858['get']({'plain':!![]});return db[_0x834e('0x55')][_0x834e('0x49')]({'where':{'name':'CannedAnswers','userProfileId':_0x3d3f2b[_0x834e('0x56')]},'raw':!![]})[_0x834e('0x28')](function(_0x2de29a){if(_0x2de29a&&_0x2de29a[_0x834e('0x57')]===0x0){return db['UserProfileResource'][_0x834e('0x51')]({'name':_0x281342[_0x834e('0x2e')],'resourceId':_0x281342['id'],'type':_0x2de29a[_0x834e('0x2e')],'sectionId':_0x2de29a['id']},{})['then'](function(){return _0x315858;});}else{return _0x315858;}})[_0x834e('0x46')](function(_0x1fcae9){logger[_0x834e('0x2c')](_0x834e('0x58'),_0x1fcae9);throw _0x1fcae9;});}return _0x315858;})[_0x834e('0x28')](respondWithResult(_0x3b0988,0xc9))[_0x834e('0x46')](handleError(_0x3b0988,null));};
\ No newline at end of file
+var _0x34e8=['filters','intersection','attributes','fields','length','order','sort','pick','filter','where','merge','options','include','findAll','catch','show','includeAll','find','body','params','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','The\x20inserted\x20key\x20already\x20exists.','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','CannedAnswers','destroy','sendStatus','error','stack','name','map','CannedAnswer','rawAttributes','fieldName','type','key','model','keys','query'];(function(_0x50c350,_0x5a29f2){var _0x4f92df=function(_0x95e3e){while(--_0x95e3e){_0x50c350['push'](_0x50c350['shift']());}};_0x4f92df(++_0x5a29f2);}(_0x34e8,0x12c));var _0x834e=function(_0x1280d5,_0x53ef9b){_0x1280d5=_0x1280d5-0x0;var _0x23f5ec=_0x34e8[_0x1280d5];return _0x23f5ec;};'use strict';var pdf=require(_0x834e('0x0'));var emlformat=require(_0x834e('0x1'));var rimraf=require(_0x834e('0x2'));var zipdir=require(_0x834e('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x834e('0x4'));var moment=require(_0x834e('0x5'));var BPromise=require(_0x834e('0x6'));var Mustache=require(_0x834e('0x7'));var util=require(_0x834e('0x8'));var path=require(_0x834e('0x9'));var sox=require(_0x834e('0xa'));var csv=require('to-csv');var ejs=require(_0x834e('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x834e('0xc'));var crypto=require(_0x834e('0xd'));var jsforce=require(_0x834e('0xe'));var deskjs=require(_0x834e('0xf'));var toCsv=require(_0x834e('0x10'));var querystring=require(_0x834e('0x11'));var Papa=require(_0x834e('0x12'));var Redis=require(_0x834e('0x13'));var authService=require(_0x834e('0x14'));var qs=require(_0x834e('0x15'));var as=require(_0x834e('0x16'));var hardwareService=require(_0x834e('0x17'));var logger=require(_0x834e('0x18'))(_0x834e('0x19'));var utils=require(_0x834e('0x1a'));var config=require(_0x834e('0x1b'));var db=require(_0x834e('0x1c'))['db'];function respondWithStatusCode(_0x538bb3,_0x5e5b6d){_0x5e5b6d=_0x5e5b6d||0xcc;return function(_0x6cd9b9){if(_0x6cd9b9){return _0x538bb3['sendStatus'](_0x5e5b6d);}return _0x538bb3[_0x834e('0x1d')](_0x5e5b6d)[_0x834e('0x1e')]();};}function respondWithResult(_0x28e659,_0x21cc0a){_0x21cc0a=_0x21cc0a||0xc8;return function(_0x50e860){if(_0x50e860){return _0x28e659[_0x834e('0x1d')](_0x21cc0a)[_0x834e('0x1f')](_0x50e860);}};}function respondWithFilteredResult(_0x57274a,_0x316205){return function(_0x4a9cdc){if(_0x4a9cdc){var _0x38a8cd=_0x4a9cdc[_0x834e('0x20')],_0x36d443=_0x316205[_0x834e('0x21')],_0x478afe=_0x316205['offset']+_0x316205[_0x834e('0x22')],_0x43ac41;if(_0x478afe>=_0x38a8cd){_0x478afe=_0x38a8cd;_0x43ac41=0xc8;}else{_0x43ac41=0xce;}_0x57274a[_0x834e('0x1d')](_0x43ac41);return _0x57274a[_0x834e('0x23')](_0x834e('0x24'),_0x36d443+'-'+_0x478afe+'/'+_0x38a8cd)[_0x834e('0x1f')](_0x4a9cdc);}return null;};}function patchUpdates(_0x254677){return function(_0x1dd214){try{jsonpatch['apply'](_0x1dd214,_0x254677,!![]);}catch(_0x2545b4){return BPromise[_0x834e('0x25')](_0x2545b4);}return _0x1dd214[_0x834e('0x26')]();};}function saveUpdates(_0x325a99,_0x4ab05d){return function(_0x45a630){if(_0x45a630){return _0x45a630[_0x834e('0x27')](_0x325a99)['then'](function(_0x1b4bdf){return _0x1b4bdf;});}return null;};}function removeEntity(_0x28d687,_0x8d406e){return function(_0x5c55ca){if(_0x5c55ca){return _0x5c55ca['destroy']()[_0x834e('0x28')](function(){var _0x34563b=_0x5c55ca['get']({'plain':!![]});var _0x25ee1d=_0x834e('0x29');return db['UserProfileResource'][_0x834e('0x2a')]({'where':{'type':_0x25ee1d,'resourceId':_0x34563b['id']}})[_0x834e('0x28')](function(){return _0x5c55ca;});})[_0x834e('0x28')](function(){_0x28d687['status'](0xcc)[_0x834e('0x1e')]();});}};}function handleEntityNotFound(_0x3e310f,_0x5e1cc5){return function(_0x5bef62){if(!_0x5bef62){_0x3e310f[_0x834e('0x2b')](0x194);}return _0x5bef62;};}function handleError(_0x508a1d,_0x2826ec){_0x2826ec=_0x2826ec||0x1f4;return function(_0x3f1b0b){logger[_0x834e('0x2c')](_0x3f1b0b[_0x834e('0x2d')]);if(_0x3f1b0b[_0x834e('0x2e')]){delete _0x3f1b0b[_0x834e('0x2e')];}_0x508a1d['status'](_0x2826ec)['send'](_0x3f1b0b);};}exports['index']=function(_0x58c1d7,_0x2c7a8d){var _0x567cea={},_0x106d6a={},_0x5dacc1={'count':0x0,'rows':[]};var _0xb5bc06=_[_0x834e('0x2f')](db[_0x834e('0x30')][_0x834e('0x31')],function(_0x4551f5){return{'name':_0x4551f5[_0x834e('0x32')],'type':_0x4551f5[_0x834e('0x33')][_0x834e('0x34')]};});_0x106d6a[_0x834e('0x35')]=_['map'](_0xb5bc06,_0x834e('0x2e'));_0x106d6a['query']=_[_0x834e('0x36')](_0x58c1d7[_0x834e('0x37')]);_0x106d6a[_0x834e('0x38')]=_[_0x834e('0x39')](_0x106d6a[_0x834e('0x35')],_0x106d6a[_0x834e('0x37')]);_0x567cea[_0x834e('0x3a')]=_[_0x834e('0x39')](_0x106d6a[_0x834e('0x35')],qs[_0x834e('0x3b')](_0x58c1d7['query'][_0x834e('0x3b')]));_0x567cea[_0x834e('0x3a')]=_0x567cea[_0x834e('0x3a')][_0x834e('0x3c')]?_0x567cea['attributes']:_0x106d6a[_0x834e('0x35')];if(!_0x58c1d7[_0x834e('0x37')]['hasOwnProperty']('nolimit')){_0x567cea['limit']=qs[_0x834e('0x22')](_0x58c1d7[_0x834e('0x37')][_0x834e('0x22')]);_0x567cea[_0x834e('0x21')]=qs[_0x834e('0x21')](_0x58c1d7[_0x834e('0x37')]['offset']);}_0x567cea[_0x834e('0x3d')]=qs['sort'](_0x58c1d7[_0x834e('0x37')][_0x834e('0x3e')]);_0x567cea['where']=qs[_0x834e('0x38')](_[_0x834e('0x3f')](_0x58c1d7['query'],_0x106d6a['filters']));if(_0x58c1d7[_0x834e('0x37')][_0x834e('0x40')]){_0x567cea[_0x834e('0x41')]=_[_0x834e('0x42')](_0x567cea[_0x834e('0x41')],{'$or':_['map'](_0xb5bc06,function(_0x1c5ed6){if(_0x1c5ed6['type']!=='VIRTUAL'){var _0x1b2edf={};_0x1b2edf[_0x1c5ed6['name']]={'$like':'%'+_0x58c1d7[_0x834e('0x37')][_0x834e('0x40')]+'%'};return _0x1b2edf;}})});}_0x567cea=_[_0x834e('0x42')]({},_0x567cea,_0x58c1d7[_0x834e('0x43')]);var _0x2b7933={'where':_0x567cea['where']};return db[_0x834e('0x30')][_0x834e('0x20')](_0x2b7933)[_0x834e('0x28')](function(_0x58c5fb){_0x5dacc1[_0x834e('0x20')]=_0x58c5fb;if(_0x58c1d7[_0x834e('0x37')]['includeAll']){_0x567cea[_0x834e('0x44')]=[{'all':!![]}];}return db['CannedAnswer'][_0x834e('0x45')](_0x567cea);})[_0x834e('0x28')](function(_0x4a18bb){_0x5dacc1['rows']=_0x4a18bb;return _0x5dacc1;})[_0x834e('0x28')](respondWithFilteredResult(_0x2c7a8d,_0x567cea))[_0x834e('0x46')](handleError(_0x2c7a8d,null));};exports[_0x834e('0x47')]=function(_0xbc1571,_0x8ad264){var _0x23feea={'raw':!![],'where':{'id':_0xbc1571['params']['id']}},_0x195204={};_0x195204[_0x834e('0x35')]=_['keys'](db[_0x834e('0x30')]['rawAttributes']);_0x195204[_0x834e('0x37')]=_['keys'](_0xbc1571[_0x834e('0x37')]);_0x195204[_0x834e('0x38')]=_['intersection'](_0x195204[_0x834e('0x35')],_0x195204[_0x834e('0x37')]);_0x23feea[_0x834e('0x3a')]=_[_0x834e('0x39')](_0x195204[_0x834e('0x35')],qs[_0x834e('0x3b')](_0xbc1571[_0x834e('0x37')][_0x834e('0x3b')]));_0x23feea[_0x834e('0x3a')]=_0x23feea[_0x834e('0x3a')]['length']?_0x23feea[_0x834e('0x3a')]:_0x195204[_0x834e('0x35')];if(_0xbc1571['query'][_0x834e('0x48')]){_0x23feea[_0x834e('0x44')]=[{'all':!![]}];}_0x23feea=_[_0x834e('0x42')]({},_0x23feea,_0xbc1571[_0x834e('0x43')]);return db[_0x834e('0x30')][_0x834e('0x49')](_0x23feea)['then'](handleEntityNotFound(_0x8ad264,null))['then'](respondWithResult(_0x8ad264,null))[_0x834e('0x46')](handleError(_0x8ad264,null));};exports[_0x834e('0x27')]=function(_0x30568e,_0x40ff5a){if(_0x30568e[_0x834e('0x4a')]['id']){delete _0x30568e[_0x834e('0x4a')]['id'];}return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x30568e[_0x834e('0x4b')]['id']}})[_0x834e('0x28')](handleEntityNotFound(_0x40ff5a,null))[_0x834e('0x28')](saveUpdates(_0x30568e[_0x834e('0x4a')],null))[_0x834e('0x28')](respondWithResult(_0x40ff5a,null))[_0x834e('0x46')](handleError(_0x40ff5a,null));};exports[_0x834e('0x2a')]=function(_0x1a3855,_0x3df078){return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x1a3855[_0x834e('0x4b')]['id']}})['then'](handleEntityNotFound(_0x3df078,null))[_0x834e('0x28')](removeEntity(_0x3df078,null))[_0x834e('0x46')](handleError(_0x3df078,null));};exports['create']=function(_0x3c00a3,_0x3b0988){var _0x55d491={'key':_0x3c00a3[_0x834e('0x4a')][_0x834e('0x34')]};if(_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4c')]){_0x55d491[_0x834e('0x4c')]=_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4c')];}else if(_0x3c00a3['body'][_0x834e('0x4d')]){_0x55d491[_0x834e('0x4d')]=_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4d')];}else if(_0x3c00a3[_0x834e('0x4a')][_0x834e('0x4e')]){_0x55d491[_0x834e('0x4e')]=_0x3c00a3[_0x834e('0x4a')]['OpenchannelAccountId'];}else if(_0x3c00a3[_0x834e('0x4a')]['ChatWebsiteId']){_0x55d491[_0x834e('0x4f')]=_0x3c00a3['body'][_0x834e('0x4f')];}return db['CannedAnswer']['find']({'where':_0x55d491})[_0x834e('0x28')](function(_0x3e1bee){if(_0x3e1bee){throw new db['Sequelize']['ValidationError'](_0x834e('0x50'));}return db[_0x834e('0x30')][_0x834e('0x51')](_0x3c00a3[_0x834e('0x4a')]);})[_0x834e('0x28')](function(_0x315858){var _0x3d3f2b=_0x3c00a3[_0x834e('0x52')]['get']({'plain':!![]});if(!_0x3d3f2b)throw new Error(_0x834e('0x53'));if(_0x3d3f2b[_0x834e('0x54')]==='user'){var _0x281342=_0x315858['get']({'plain':!![]});return db[_0x834e('0x55')][_0x834e('0x49')]({'where':{'name':'CannedAnswers','userProfileId':_0x3d3f2b[_0x834e('0x56')]},'raw':!![]})[_0x834e('0x28')](function(_0x2de29a){if(_0x2de29a&&_0x2de29a[_0x834e('0x57')]===0x0){return db['UserProfileResource'][_0x834e('0x51')]({'name':_0x281342[_0x834e('0x2e')],'resourceId':_0x281342['id'],'type':_0x2de29a[_0x834e('0x2e')],'sectionId':_0x2de29a['id']},{})['then'](function(){return _0x315858;});}else{return _0x315858;}})[_0x834e('0x46')](function(_0x1fcae9){logger[_0x834e('0x2c')](_0x834e('0x58'),_0x1fcae9);throw _0x1fcae9;});}return _0x315858;})[_0x834e('0x28')](respondWithResult(_0x3b0988,0xc9))[_0x834e('0x46')](handleError(_0x3b0988,null));};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js
index 4cc630f..99ed341 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 _0x1df5=['utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./cannedAnswer.attributes','exports','CannedAnswer','utf8mb4'];(function(_0x2afb60,_0x3e61cf){var _0x398c7f=function(_0x4e1b2a){while(--_0x4e1b2a){_0x2afb60['push'](_0x2afb60['shift']());}};_0x398c7f(++_0x3e61cf);}(_0x1df5,0xfd));var _0x51df=function(_0x200232,_0x1fa297){_0x200232=_0x200232-0x0;var _0x464dfa=_0x1df5[_0x200232];return _0x464dfa;};'use strict';var _=require(_0x51df('0x0'));var util=require(_0x51df('0x1'));var logger=require(_0x51df('0x2'))(_0x51df('0x3'));var moment=require(_0x51df('0x4'));var BPromise=require('bluebird');var rp=require(_0x51df('0x5'));var fs=require('fs');var path=require(_0x51df('0x6'));var rimraf=require(_0x51df('0x7'));var config=require(_0x51df('0x8'));var attributes=require(_0x51df('0x9'));module[_0x51df('0xa')]=function(_0x15de76,_0x239dbb){return _0x15de76['define'](_0x51df('0xb'),attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x51df('0xc'),'collate':_0x51df('0xd')});};
\ No newline at end of file
+var _0xe7b9=['exports','define','CannedAnswer','tools_canned_answers','utf8mb4_unicode_ci','lodash','util','../../config/logger','bluebird','request-promise','../../config/environment'];(function(_0x5aa20c,_0x28b6ca){var _0x5d0a3a=function(_0x4b6cc8){while(--_0x4b6cc8){_0x5aa20c['push'](_0x5aa20c['shift']());}};_0x5d0a3a(++_0x28b6ca);}(_0xe7b9,0x170));var _0x9e7b=function(_0x37ed70,_0x5132e5){_0x37ed70=_0x37ed70-0x0;var _0x155596=_0xe7b9[_0x37ed70];return _0x155596;};'use strict';var _=require(_0x9e7b('0x0'));var util=require(_0x9e7b('0x1'));var logger=require(_0x9e7b('0x2'))('api');var moment=require('moment');var BPromise=require(_0x9e7b('0x3'));var rp=require(_0x9e7b('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x9e7b('0x5'));var attributes=require('./cannedAnswer.attributes');module[_0x9e7b('0x6')]=function(_0x543b7e,_0x4dda21){return _0x543b7e[_0x9e7b('0x7')](_0x9e7b('0x8'),attributes,{'tableName':_0x9e7b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x9e7b('0xa')});};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js
index 8ad7a14..6917952 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 _0xfe99=['../../config/environment','jayson/promise','client','request','info','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','stringify','error','CannedAnswer,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x53dc0c,_0x2fc7c9){var _0x1ee17a=function(_0x56b36b){while(--_0x56b36b){_0x53dc0c['push'](_0x53dc0c['shift']());}};_0x1ee17a(++_0x2fc7c9);}(_0xfe99,0xd6));var _0x9fe9=function(_0x2a27a9,_0x13d9a2){_0x2a27a9=_0x2a27a9-0x0;var _0x39e145=_0xfe99[_0x2a27a9];return _0x39e145;};'use strict';var _=require(_0x9fe9('0x0'));var util=require(_0x9fe9('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9fe9('0x2'));var fs=require('fs');var Redis=require(_0x9fe9('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9fe9('0x4'));var logger=require(_0x9fe9('0x5'))('rpc');var config=require(_0x9fe9('0x6'));var jayson=require(_0x9fe9('0x7'));var client=jayson[_0x9fe9('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x42c126,_0x52d4b9,_0x394dc0){return new BPromise(function(_0x1dd0fd,_0x982c35){return client[_0x9fe9('0x9')](_0x42c126,_0x394dc0)['then'](function(_0x20f7c9){logger[_0x9fe9('0xa')]('CannedAnswer,\x20%s,\x20%s',_0x52d4b9,_0x9fe9('0xb'));logger[_0x9fe9('0xc')](_0x9fe9('0xd'),_0x52d4b9,'request\x20sent',JSON[_0x9fe9('0xe')](_0x20f7c9));if(_0x20f7c9['error']){if(_0x20f7c9[_0x9fe9('0xf')]['code']===0x1f4){logger[_0x9fe9('0xf')](_0x9fe9('0x10'),_0x52d4b9,_0x20f7c9[_0x9fe9('0xf')]['message']);return _0x982c35(_0x20f7c9[_0x9fe9('0xf')]['message']);}logger[_0x9fe9('0xf')]('CannedAnswer,\x20%s,\x20%s',_0x52d4b9,_0x20f7c9[_0x9fe9('0xf')][_0x9fe9('0x11')]);return _0x1dd0fd(_0x20f7c9[_0x9fe9('0xf')][_0x9fe9('0x11')]);}else{logger[_0x9fe9('0xa')](_0x9fe9('0x10'),_0x52d4b9,'request\x20sent');_0x1dd0fd(_0x20f7c9[_0x9fe9('0x12')][_0x9fe9('0x11')]);}})[_0x9fe9('0x13')](function(_0x476d02){logger[_0x9fe9('0xf')]('CannedAnswer,\x20%s,\x20%s',_0x52d4b9,_0x476d02);_0x982c35(_0x476d02);});});}
\ No newline at end of file
+var _0x283d=['catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','CannedAnswer,\x20%s,\x20%s','message'];(function(_0x16a245,_0x38060e){var _0x38172c=function(_0x4107c4){while(--_0x4107c4){_0x16a245['push'](_0x16a245['shift']());}};_0x38172c(++_0x38060e);}(_0x283d,0x1e5));var _0xd283=function(_0x1e920c,_0x5340a8){_0x1e920c=_0x1e920c-0x0;var _0x414368=_0x283d[_0x1e920c];return _0x414368;};'use strict';var _=require('lodash');var util=require(_0xd283('0x0'));var moment=require('moment');var BPromise=require(_0xd283('0x1'));var rs=require(_0xd283('0x2'));var fs=require('fs');var Redis=require(_0xd283('0x3'));var db=require(_0xd283('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xd283('0x5'))(_0xd283('0x6'));var config=require(_0xd283('0x7'));var jayson=require(_0xd283('0x8'));var client=jayson[_0xd283('0x9')][_0xd283('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x368374,_0x58a0cc,_0x1fbe33){return new BPromise(function(_0x930050,_0x57d68a){return client[_0xd283('0xb')](_0x368374,_0x1fbe33)[_0xd283('0xc')](function(_0xf893cd){logger[_0xd283('0xd')]('CannedAnswer,\x20%s,\x20%s',_0x58a0cc,'request\x20sent');logger[_0xd283('0xe')](_0xd283('0xf'),_0x58a0cc,_0xd283('0x10'),JSON[_0xd283('0x11')](_0xf893cd));if(_0xf893cd['error']){if(_0xf893cd[_0xd283('0x12')]['code']===0x1f4){logger[_0xd283('0x12')](_0xd283('0x13'),_0x58a0cc,_0xf893cd[_0xd283('0x12')]['message']);return _0x57d68a(_0xf893cd[_0xd283('0x12')][_0xd283('0x14')]);}logger[_0xd283('0x12')](_0xd283('0x13'),_0x58a0cc,_0xf893cd[_0xd283('0x12')]['message']);return _0x930050(_0xf893cd[_0xd283('0x12')][_0xd283('0x14')]);}else{logger[_0xd283('0xd')](_0xd283('0x13'),_0x58a0cc,'request\x20sent');_0x930050(_0xf893cd['result'][_0xd283('0x14')]);}})[_0xd283('0x15')](function(_0x4a1e7c){logger[_0xd283('0x12')]('CannedAnswer,\x20%s,\x20%s',_0x58a0cc,_0x4a1e7c);_0x57d68a(_0x4a1e7c);});});}
\ No newline at end of file
diff --git a/server/api/cannedAnswer/index.js b/server/api/cannedAnswer/index.js
index 80cde86..d4df40a 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 _0x089f=['../../components/interaction/service','../../config/environment','./cannedAnswer.controller','isAuthenticated','index','get','show','post','create','put','/:id','update','delete','destroy','exports','util','path','connect-timeout','express','Router'];(function(_0x380c9c,_0x18ba52){var _0x431eae=function(_0x2c591d){while(--_0x2c591d){_0x380c9c['push'](_0x380c9c['shift']());}};_0x431eae(++_0x18ba52);}(_0x089f,0x1c7));var _0xf089=function(_0x15844c,_0x482fff){_0x15844c=_0x15844c-0x0;var _0x40ff01=_0x089f[_0x15844c];return _0x40ff01;};'use strict';var multer=require('multer');var util=require(_0xf089('0x0'));var path=require(_0xf089('0x1'));var timeout=require(_0xf089('0x2'));var express=require(_0xf089('0x3'));var router=express[_0xf089('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xf089('0x5'));var config=require(_0xf089('0x6'));var controller=require(_0xf089('0x7'));router['get']('/',auth[_0xf089('0x8')](),controller[_0xf089('0x9')]);router[_0xf089('0xa')]('/:id',auth[_0xf089('0x8')](),controller[_0xf089('0xb')]);router[_0xf089('0xc')]('/',auth['isAuthenticated'](),controller[_0xf089('0xd')]);router[_0xf089('0xe')](_0xf089('0xf'),auth[_0xf089('0x8')](),controller[_0xf089('0x10')]);router[_0xf089('0x11')]('/:id',auth[_0xf089('0x8')](),controller[_0xf089('0x12')]);module[_0xf089('0x13')]=router;
\ No newline at end of file
+var _0x83c3=['create','/:id','update','delete','destroy','exports','util','path','./cannedAnswer.controller','get','isAuthenticated','index','show'];(function(_0x1d22fc,_0xb5f648){var _0x564315=function(_0x58789a){while(--_0x58789a){_0x1d22fc['push'](_0x1d22fc['shift']());}};_0x564315(++_0xb5f648);}(_0x83c3,0xa2));var _0x383c=function(_0x3b9479,_0x1a6c61){_0x3b9479=_0x3b9479-0x0;var _0x38e331=_0x83c3[_0x3b9479];return _0x38e331;};'use strict';var multer=require('multer');var util=require(_0x383c('0x0'));var path=require(_0x383c('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x383c('0x2'));router[_0x383c('0x3')]('/',auth[_0x383c('0x4')](),controller[_0x383c('0x5')]);router[_0x383c('0x3')]('/:id',auth['isAuthenticated'](),controller[_0x383c('0x6')]);router['post']('/',auth['isAuthenticated'](),controller[_0x383c('0x7')]);router['put'](_0x383c('0x8'),auth[_0x383c('0x4')](),controller[_0x383c('0x9')]);router[_0x383c('0xa')](_0x383c('0x8'),auth['isAuthenticated'](),controller[_0x383c('0xb')]);module[_0x383c('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js
index daa8ddd..70d8be9 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 _0x5afc=['1970-01-01\x2000:00:01','STRING','INTEGER','sequelize','exports'];(function(_0x18d690,_0x41d8ad){var _0x2e43cc=function(_0x6af17a){while(--_0x6af17a){_0x18d690['push'](_0x18d690['shift']());}};_0x2e43cc(++_0x41d8ad);}(_0x5afc,0x175));var _0xc5af=function(_0x158cba,_0x284af0){_0x158cba=_0x158cba-0x0;var _0x70b870=_0x5afc[_0x158cba];return _0x70b870;};'use strict';var Sequelize=require(_0xc5af('0x0'));module[_0xc5af('0x1')]={'calldate':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':_0xc5af('0x2')},'clid':{'type':Sequelize[_0xc5af('0x3')]},'src':{'type':Sequelize[_0xc5af('0x3')]},'dst':{'type':Sequelize[_0xc5af('0x3')]},'dcontext':{'type':Sequelize[_0xc5af('0x3')]},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize[_0xc5af('0x3')]},'lastapp':{'type':Sequelize[_0xc5af('0x3')]},'lastdata':{'type':Sequelize['STRING']},'duration':{'type':Sequelize[_0xc5af('0x4')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0xc5af('0x4')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xc5af('0x3')]},'amaflags':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xc5af('0x3')]},'userfield':{'type':Sequelize[_0xc5af('0x3')]},'uniqueid':{'type':Sequelize[_0xc5af('0x3')]},'linkedid':{'type':Sequelize[_0xc5af('0x3')]},'sequence':{'type':Sequelize[_0xc5af('0x3')]},'peeraccount':{'type':Sequelize[_0xc5af('0x3')]},'type':{'type':Sequelize[_0xc5af('0x3')]},'tag':{'type':Sequelize[_0xc5af('0x3')]}};
\ No newline at end of file
+var _0x8694=['INTEGER','sequelize','DATE','STRING'];(function(_0x6fd8ad,_0x597818){var _0x257d21=function(_0x2aad69){while(--_0x2aad69){_0x6fd8ad['push'](_0x6fd8ad['shift']());}};_0x257d21(++_0x597818);}(_0x8694,0x13d));var _0x4869=function(_0x173d7e,_0x3242fd){_0x173d7e=_0x173d7e-0x0;var _0x2220d6=_0x8694[_0x173d7e];return _0x2220d6;};'use strict';var Sequelize=require(_0x4869('0x0'));module['exports']={'calldate':{'type':Sequelize[_0x4869('0x1')],'allowNull':![],'defaultValue':'1970-01-01\x2000:00:01'},'clid':{'type':Sequelize[_0x4869('0x2')]},'src':{'type':Sequelize['STRING']},'dst':{'type':Sequelize[_0x4869('0x2')]},'dcontext':{'type':Sequelize[_0x4869('0x2')]},'channel':{'type':Sequelize[_0x4869('0x2')]},'dstchannel':{'type':Sequelize[_0x4869('0x2')]},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0x4869('0x2')]},'duration':{'type':Sequelize[_0x4869('0x3')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x4869('0x3')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x4869('0x2')]},'amaflags':{'type':Sequelize[_0x4869('0x3')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0x4869('0x2')]},'userfield':{'type':Sequelize[_0x4869('0x2')]},'uniqueid':{'type':Sequelize[_0x4869('0x2')]},'linkedid':{'type':Sequelize[_0x4869('0x2')]},'sequence':{'type':Sequelize[_0x4869('0x2')]},'peeraccount':{'type':Sequelize['STRING']},'type':{'type':Sequelize['STRING']},'tag':{'type':Sequelize[_0x4869('0x2')]}};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js
index 6d4b203..907fd26 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 _0x4786=['stack','name','send','index','map','Cdr','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','describe','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','Content-Range','apply','reject','save','update','then','error'];(function(_0x306544,_0x3572b9){var _0x49a8b4=function(_0x39b76e){while(--_0x39b76e){_0x306544['push'](_0x306544['shift']());}};_0x49a8b4(++_0x3572b9);}(_0x4786,0x74));var _0x6478=function(_0x1205b6,_0x4198df){_0x1205b6=_0x1205b6-0x0;var _0x3584f2=_0x4786[_0x1205b6];return _0x3584f2;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x6478('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x6478('0x1'));var jsonpatch=require(_0x6478('0x2'));var rp=require('request-promise');var moment=require(_0x6478('0x3'));var BPromise=require(_0x6478('0x4'));var Mustache=require(_0x6478('0x5'));var util=require(_0x6478('0x6'));var path=require(_0x6478('0x7'));var sox=require(_0x6478('0x8'));var csv=require(_0x6478('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x6478('0xa'));var squel=require(_0x6478('0xb'));var crypto=require(_0x6478('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x6478('0x9'));var querystring=require('querystring');var Papa=require(_0x6478('0xd'));var Redis=require(_0x6478('0xe'));var authService=require(_0x6478('0xf'));var qs=require(_0x6478('0x10'));var as=require(_0x6478('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6478('0x12'))(_0x6478('0x13'));var utils=require(_0x6478('0x14'));var config=require('../../config/environment');var db=require(_0x6478('0x15'))['db'];function respondWithStatusCode(_0x28e424,_0x18931f){_0x18931f=_0x18931f||0xcc;return function(_0x4f2265){if(_0x4f2265){return _0x28e424[_0x6478('0x16')](_0x18931f);}return _0x28e424[_0x6478('0x17')](_0x18931f)[_0x6478('0x18')]();};}function respondWithResult(_0x4ba972,_0xcf4721){_0xcf4721=_0xcf4721||0xc8;return function(_0x164b74){if(_0x164b74){return _0x4ba972['status'](_0xcf4721)[_0x6478('0x19')](_0x164b74);}};}function respondWithFilteredResult(_0x503b4a,_0x48ac02){return function(_0x1651e7){if(_0x1651e7){var _0x15ed16=_0x1651e7[_0x6478('0x1a')],_0x7c6cc9=_0x48ac02[_0x6478('0x1b')],_0x1f54b1=_0x48ac02[_0x6478('0x1b')]+_0x48ac02[_0x6478('0x1c')],_0x4e487b;if(_0x1f54b1>=_0x15ed16){_0x1f54b1=_0x15ed16;_0x4e487b=0xc8;}else{_0x4e487b=0xce;}_0x503b4a[_0x6478('0x17')](_0x4e487b);return _0x503b4a['set'](_0x6478('0x1d'),_0x7c6cc9+'-'+_0x1f54b1+'/'+_0x15ed16)[_0x6478('0x19')](_0x1651e7);}return null;};}function patchUpdates(_0x3b3420){return function(_0x2981a3){try{jsonpatch[_0x6478('0x1e')](_0x2981a3,_0x3b3420,!![]);}catch(_0x3d9307){return BPromise[_0x6478('0x1f')](_0x3d9307);}return _0x2981a3[_0x6478('0x20')]();};}function saveUpdates(_0x1cedd1,_0x836430){return function(_0x145258){if(_0x145258){return _0x145258[_0x6478('0x21')](_0x1cedd1)[_0x6478('0x22')](function(_0x3ac663){return _0x3ac663;});}return null;};}function removeEntity(_0xc179cd,_0x1f8985){return function(_0x370a04){if(_0x370a04){return _0x370a04['destroy']()[_0x6478('0x22')](function(){_0xc179cd[_0x6478('0x17')](0xcc)[_0x6478('0x18')]();});}};}function handleEntityNotFound(_0x57e1d9,_0x3e2c73){return function(_0x4c659f){if(!_0x4c659f){_0x57e1d9[_0x6478('0x16')](0x194);}return _0x4c659f;};}function handleError(_0x405c19,_0x5d75bc){_0x5d75bc=_0x5d75bc||0x1f4;return function(_0x48e33e){logger[_0x6478('0x23')](_0x48e33e[_0x6478('0x24')]);if(_0x48e33e[_0x6478('0x25')]){delete _0x48e33e[_0x6478('0x25')];}_0x405c19[_0x6478('0x17')](_0x5d75bc)[_0x6478('0x26')](_0x48e33e);};}exports[_0x6478('0x27')]=function(_0x19e927,_0x261145){var _0x17e509={},_0x49336c={},_0x372050={'count':0x0,'rows':[]};var _0x48eb7d=_[_0x6478('0x28')](db[_0x6478('0x29')][_0x6478('0x2a')],function(_0xb2ed04){return{'name':_0xb2ed04[_0x6478('0x2b')],'type':_0xb2ed04[_0x6478('0x2c')][_0x6478('0x2d')]};});_0x49336c[_0x6478('0x2e')]=_[_0x6478('0x28')](_0x48eb7d,'name');_0x49336c['query']=_[_0x6478('0x2f')](_0x19e927[_0x6478('0x30')]);_0x49336c[_0x6478('0x31')]=_[_0x6478('0x32')](_0x49336c['model'],_0x49336c[_0x6478('0x30')]);_0x17e509['attributes']=_[_0x6478('0x32')](_0x49336c[_0x6478('0x2e')],qs[_0x6478('0x33')](_0x19e927['query']['fields']));_0x17e509[_0x6478('0x34')]=_0x17e509[_0x6478('0x34')][_0x6478('0x35')]?_0x17e509[_0x6478('0x34')]:_0x49336c[_0x6478('0x2e')];if(!_0x19e927[_0x6478('0x30')][_0x6478('0x36')](_0x6478('0x37'))){_0x17e509[_0x6478('0x1c')]=qs[_0x6478('0x1c')](_0x19e927[_0x6478('0x30')]['limit']);_0x17e509[_0x6478('0x1b')]=qs['offset'](_0x19e927[_0x6478('0x30')][_0x6478('0x1b')]);}_0x17e509[_0x6478('0x38')]=qs[_0x6478('0x39')](_0x19e927[_0x6478('0x30')]['sort']);_0x17e509[_0x6478('0x3a')]=qs['filters'](_[_0x6478('0x3b')](_0x19e927[_0x6478('0x30')],_0x49336c[_0x6478('0x31')]));if(_0x19e927[_0x6478('0x30')][_0x6478('0x3c')]){_0x17e509[_0x6478('0x3a')]=_[_0x6478('0x3d')](_0x17e509[_0x6478('0x3a')],{'$or':_[_0x6478('0x28')](_0x48eb7d,function(_0x3d6497){if(_0x3d6497[_0x6478('0x2c')]!==_0x6478('0x3e')){var _0x309e78={};_0x309e78[_0x3d6497[_0x6478('0x25')]]={'$like':'%'+_0x19e927[_0x6478('0x30')][_0x6478('0x3c')]+'%'};return _0x309e78;}})});}_0x17e509=_[_0x6478('0x3d')]({},_0x17e509,_0x19e927[_0x6478('0x3f')]);var _0x564ce6={'where':_0x17e509['where']};return db[_0x6478('0x29')][_0x6478('0x1a')](_0x564ce6)['then'](function(_0x25b1c7){_0x372050['count']=_0x25b1c7;if(_0x19e927[_0x6478('0x30')][_0x6478('0x40')]){_0x17e509[_0x6478('0x41')]=[{'all':!![]}];}return db['Cdr'][_0x6478('0x42')](_0x17e509);})[_0x6478('0x22')](function(_0x27a372){_0x372050[_0x6478('0x43')]=_0x27a372;return _0x372050;})[_0x6478('0x22')](respondWithFilteredResult(_0x261145,_0x17e509))[_0x6478('0x44')](handleError(_0x261145,null));};exports[_0x6478('0x45')]=function(_0x1705b4,_0x3c7d23){var _0xbd3df2={'raw':!![],'where':{'id':_0x1705b4[_0x6478('0x46')]['id']}},_0x5ae8a6={};_0x5ae8a6[_0x6478('0x2e')]=_[_0x6478('0x2f')](db[_0x6478('0x29')][_0x6478('0x2a')]);_0x5ae8a6['query']=_['keys'](_0x1705b4[_0x6478('0x30')]);_0x5ae8a6[_0x6478('0x31')]=_[_0x6478('0x32')](_0x5ae8a6[_0x6478('0x2e')],_0x5ae8a6[_0x6478('0x30')]);_0xbd3df2[_0x6478('0x34')]=_[_0x6478('0x32')](_0x5ae8a6[_0x6478('0x2e')],qs[_0x6478('0x33')](_0x1705b4['query']['fields']));_0xbd3df2[_0x6478('0x34')]=_0xbd3df2[_0x6478('0x34')][_0x6478('0x35')]?_0xbd3df2['attributes']:_0x5ae8a6[_0x6478('0x2e')];if(_0x1705b4['query'][_0x6478('0x40')]){_0xbd3df2['include']=[{'all':!![]}];}_0xbd3df2=_[_0x6478('0x3d')]({},_0xbd3df2,_0x1705b4[_0x6478('0x3f')]);return db[_0x6478('0x29')][_0x6478('0x47')](_0xbd3df2)[_0x6478('0x22')](handleEntityNotFound(_0x3c7d23,null))[_0x6478('0x22')](respondWithResult(_0x3c7d23,null))[_0x6478('0x44')](handleError(_0x3c7d23,null));};exports['create']=function(_0x25796b,_0x4358d8){return db['Cdr'][_0x6478('0x48')](_0x25796b['body'],{})[_0x6478('0x22')](respondWithResult(_0x4358d8,0xc9))['catch'](handleError(_0x4358d8,null));};exports[_0x6478('0x21')]=function(_0x25d186,_0x1fbeb8){if(_0x25d186[_0x6478('0x49')]['id']){delete _0x25d186['body']['id'];}return db['Cdr'][_0x6478('0x47')]({'where':{'id':_0x25d186['params']['id']}})[_0x6478('0x22')](handleEntityNotFound(_0x1fbeb8,null))[_0x6478('0x22')](saveUpdates(_0x25d186[_0x6478('0x49')],null))[_0x6478('0x22')](respondWithResult(_0x1fbeb8,null))[_0x6478('0x44')](handleError(_0x1fbeb8,null));};exports[_0x6478('0x4a')]=function(_0x196ed0,_0x30f3a8){return db[_0x6478('0x29')]['find']({'where':{'id':_0x196ed0[_0x6478('0x46')]['id']}})[_0x6478('0x22')](handleEntityNotFound(_0x30f3a8,null))[_0x6478('0x22')](removeEntity(_0x30f3a8,null))[_0x6478('0x44')](handleError(_0x30f3a8,null));};exports[_0x6478('0x4b')]=function(_0x47191c,_0x247479){return db[_0x6478('0x29')][_0x6478('0x4b')]()[_0x6478('0x22')](respondWithResult(_0x247479,null))[_0x6478('0x44')](handleError(_0x247479,null));};
\ No newline at end of file
+var _0x40c0=['querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','count','limit','set','Content-Range','json','apply','save','update','then','destroy','error','stack','name','map','Cdr','fieldName','type','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','offset','order','sort','filter','where','VIRTUAL','options','includeAll','include','params','merge','find','catch','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','lodash','squel','crypto','to-csv'];(function(_0x2cee34,_0x7e21a9){var _0x5a369e=function(_0x5114d1){while(--_0x5114d1){_0x2cee34['push'](_0x2cee34['shift']());}};_0x5a369e(++_0x7e21a9);}(_0x40c0,0xc5));var _0x040c=function(_0x35f028,_0x4ba15d){_0x35f028=_0x35f028-0x0;var _0xd13ea9=_0x40c0[_0x35f028];return _0xd13ea9;};'use strict';var pdf=require(_0x040c('0x0'));var emlformat=require(_0x040c('0x1'));var rimraf=require(_0x040c('0x2'));var zipdir=require(_0x040c('0x3'));var jsonpatch=require(_0x040c('0x4'));var rp=require(_0x040c('0x5'));var moment=require(_0x040c('0x6'));var BPromise=require(_0x040c('0x7'));var Mustache=require('mustache');var util=require(_0x040c('0x8'));var path=require(_0x040c('0x9'));var sox=require(_0x040c('0xa'));var csv=require('to-csv');var ejs=require(_0x040c('0xb'));var fs=require('fs');var _=require(_0x040c('0xc'));var squel=require(_0x040c('0xd'));var crypto=require(_0x040c('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x040c('0xf'));var querystring=require(_0x040c('0x10'));var Papa=require('papaparse');var Redis=require(_0x040c('0x11'));var authService=require(_0x040c('0x12'));var qs=require(_0x040c('0x13'));var as=require(_0x040c('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x040c('0x15'))(_0x040c('0x16'));var utils=require(_0x040c('0x17'));var config=require(_0x040c('0x18'));var db=require(_0x040c('0x19'))['db'];function respondWithStatusCode(_0x42328d,_0x13e454){_0x13e454=_0x13e454||0xcc;return function(_0x288f01){if(_0x288f01){return _0x42328d[_0x040c('0x1a')](_0x13e454);}return _0x42328d[_0x040c('0x1b')](_0x13e454)['end']();};}function respondWithResult(_0x4cdc84,_0x489e69){_0x489e69=_0x489e69||0xc8;return function(_0x13211d){if(_0x13211d){return _0x4cdc84['status'](_0x489e69)['json'](_0x13211d);}};}function respondWithFilteredResult(_0x5efe8e,_0x1392a4){return function(_0x2f3887){if(_0x2f3887){var _0x367eed=_0x2f3887[_0x040c('0x1c')],_0x43d243=_0x1392a4['offset'],_0x38e694=_0x1392a4['offset']+_0x1392a4[_0x040c('0x1d')],_0x55891e;if(_0x38e694>=_0x367eed){_0x38e694=_0x367eed;_0x55891e=0xc8;}else{_0x55891e=0xce;}_0x5efe8e['status'](_0x55891e);return _0x5efe8e[_0x040c('0x1e')](_0x040c('0x1f'),_0x43d243+'-'+_0x38e694+'/'+_0x367eed)[_0x040c('0x20')](_0x2f3887);}return null;};}function patchUpdates(_0x52f244){return function(_0x244c51){try{jsonpatch[_0x040c('0x21')](_0x244c51,_0x52f244,!![]);}catch(_0x5e7b1a){return BPromise['reject'](_0x5e7b1a);}return _0x244c51[_0x040c('0x22')]();};}function saveUpdates(_0x3b455e,_0x9dcfe9){return function(_0xf20ea8){if(_0xf20ea8){return _0xf20ea8[_0x040c('0x23')](_0x3b455e)[_0x040c('0x24')](function(_0x47e780){return _0x47e780;});}return null;};}function removeEntity(_0x5b9af1,_0x58014c){return function(_0x1e956c){if(_0x1e956c){return _0x1e956c[_0x040c('0x25')]()[_0x040c('0x24')](function(){_0x5b9af1[_0x040c('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4e7c01,_0x7ac9f5){return function(_0x215538){if(!_0x215538){_0x4e7c01[_0x040c('0x1a')](0x194);}return _0x215538;};}function handleError(_0x3cd6a3,_0x2ee45d){_0x2ee45d=_0x2ee45d||0x1f4;return function(_0x296cb5){logger[_0x040c('0x26')](_0x296cb5[_0x040c('0x27')]);if(_0x296cb5[_0x040c('0x28')]){delete _0x296cb5['name'];}_0x3cd6a3[_0x040c('0x1b')](_0x2ee45d)['send'](_0x296cb5);};}exports['index']=function(_0x332b3b,_0x4f4c7f){var _0xb7a80f={},_0x1aec10={},_0x4a22f4={'count':0x0,'rows':[]};var _0x23eafd=_[_0x040c('0x29')](db[_0x040c('0x2a')]['rawAttributes'],function(_0x398f4e){return{'name':_0x398f4e[_0x040c('0x2b')],'type':_0x398f4e[_0x040c('0x2c')]['key']};});_0x1aec10[_0x040c('0x2d')]=_['map'](_0x23eafd,_0x040c('0x28'));_0x1aec10[_0x040c('0x2e')]=_[_0x040c('0x2f')](_0x332b3b['query']);_0x1aec10[_0x040c('0x30')]=_['intersection'](_0x1aec10[_0x040c('0x2d')],_0x1aec10['query']);_0xb7a80f[_0x040c('0x31')]=_[_0x040c('0x32')](_0x1aec10[_0x040c('0x2d')],qs[_0x040c('0x33')](_0x332b3b[_0x040c('0x2e')]['fields']));_0xb7a80f[_0x040c('0x31')]=_0xb7a80f['attributes'][_0x040c('0x34')]?_0xb7a80f['attributes']:_0x1aec10[_0x040c('0x2d')];if(!_0x332b3b[_0x040c('0x2e')][_0x040c('0x35')](_0x040c('0x36'))){_0xb7a80f[_0x040c('0x1d')]=qs[_0x040c('0x1d')](_0x332b3b[_0x040c('0x2e')][_0x040c('0x1d')]);_0xb7a80f[_0x040c('0x37')]=qs['offset'](_0x332b3b[_0x040c('0x2e')]['offset']);}_0xb7a80f[_0x040c('0x38')]=qs[_0x040c('0x39')](_0x332b3b[_0x040c('0x2e')][_0x040c('0x39')]);_0xb7a80f['where']=qs[_0x040c('0x30')](_['pick'](_0x332b3b['query'],_0x1aec10['filters']));if(_0x332b3b['query'][_0x040c('0x3a')]){_0xb7a80f[_0x040c('0x3b')]=_['merge'](_0xb7a80f[_0x040c('0x3b')],{'$or':_['map'](_0x23eafd,function(_0x144350){if(_0x144350[_0x040c('0x2c')]!==_0x040c('0x3c')){var _0x3aed35={};_0x3aed35[_0x144350[_0x040c('0x28')]]={'$like':'%'+_0x332b3b[_0x040c('0x2e')][_0x040c('0x3a')]+'%'};return _0x3aed35;}})});}_0xb7a80f=_['merge']({},_0xb7a80f,_0x332b3b[_0x040c('0x3d')]);var _0x27cc8b={'where':_0xb7a80f[_0x040c('0x3b')]};return db[_0x040c('0x2a')][_0x040c('0x1c')](_0x27cc8b)[_0x040c('0x24')](function(_0x2e0caf){_0x4a22f4[_0x040c('0x1c')]=_0x2e0caf;if(_0x332b3b[_0x040c('0x2e')][_0x040c('0x3e')]){_0xb7a80f[_0x040c('0x3f')]=[{'all':!![]}];}return db[_0x040c('0x2a')]['findAll'](_0xb7a80f);})[_0x040c('0x24')](function(_0xf84dd){_0x4a22f4['rows']=_0xf84dd;return _0x4a22f4;})[_0x040c('0x24')](respondWithFilteredResult(_0x4f4c7f,_0xb7a80f))['catch'](handleError(_0x4f4c7f,null));};exports['show']=function(_0x3d7097,_0x50d5d8){var _0x310050={'raw':!![],'where':{'id':_0x3d7097[_0x040c('0x40')]['id']}},_0x7a57ab={};_0x7a57ab['model']=_[_0x040c('0x2f')](db[_0x040c('0x2a')]['rawAttributes']);_0x7a57ab[_0x040c('0x2e')]=_['keys'](_0x3d7097['query']);_0x7a57ab[_0x040c('0x30')]=_['intersection'](_0x7a57ab[_0x040c('0x2d')],_0x7a57ab[_0x040c('0x2e')]);_0x310050[_0x040c('0x31')]=_[_0x040c('0x32')](_0x7a57ab['model'],qs[_0x040c('0x33')](_0x3d7097[_0x040c('0x2e')][_0x040c('0x33')]));_0x310050[_0x040c('0x31')]=_0x310050['attributes'][_0x040c('0x34')]?_0x310050[_0x040c('0x31')]:_0x7a57ab[_0x040c('0x2d')];if(_0x3d7097['query'][_0x040c('0x3e')]){_0x310050[_0x040c('0x3f')]=[{'all':!![]}];}_0x310050=_[_0x040c('0x41')]({},_0x310050,_0x3d7097[_0x040c('0x3d')]);return db[_0x040c('0x2a')][_0x040c('0x42')](_0x310050)[_0x040c('0x24')](handleEntityNotFound(_0x50d5d8,null))['then'](respondWithResult(_0x50d5d8,null))[_0x040c('0x43')](handleError(_0x50d5d8,null));};exports[_0x040c('0x44')]=function(_0x4d17d5,_0x1bfa54){return db[_0x040c('0x2a')]['create'](_0x4d17d5[_0x040c('0x45')],{})[_0x040c('0x24')](respondWithResult(_0x1bfa54,0xc9))[_0x040c('0x43')](handleError(_0x1bfa54,null));};exports[_0x040c('0x23')]=function(_0x3ecf44,_0x20c48e){if(_0x3ecf44[_0x040c('0x45')]['id']){delete _0x3ecf44[_0x040c('0x45')]['id'];}return db[_0x040c('0x2a')][_0x040c('0x42')]({'where':{'id':_0x3ecf44[_0x040c('0x40')]['id']}})[_0x040c('0x24')](handleEntityNotFound(_0x20c48e,null))[_0x040c('0x24')](saveUpdates(_0x3ecf44['body'],null))[_0x040c('0x24')](respondWithResult(_0x20c48e,null))[_0x040c('0x43')](handleError(_0x20c48e,null));};exports[_0x040c('0x25')]=function(_0x524ecd,_0x533abf){return db[_0x040c('0x2a')][_0x040c('0x42')]({'where':{'id':_0x524ecd['params']['id']}})['then'](handleEntityNotFound(_0x533abf,null))[_0x040c('0x24')](removeEntity(_0x533abf,null))[_0x040c('0x43')](handleError(_0x533abf,null));};exports['describe']=function(_0xdf4c2b,_0x50acf1){return db[_0x040c('0x2a')][_0x040c('0x46')]()[_0x040c('0x24')](respondWithResult(_0x50acf1,null))[_0x040c('0x43')](handleError(_0x50acf1,null));};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js
index a661a90..cddacc1 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 _0x5fab=['request-promise','path','rimraf','../../config/environment','./cdr.attributes','exports','Cdr','cdr','accountcode','calldate','disposition','dst','src','uniqueid','lodash','util','api','moment','bluebird'];(function(_0x2795ae,_0x434120){var _0x552d63=function(_0x3acc7a){while(--_0x3acc7a){_0x2795ae['push'](_0x2795ae['shift']());}};_0x552d63(++_0x434120);}(_0x5fab,0x177));var _0xb5fa=function(_0x7f3667,_0x30c3f1){_0x7f3667=_0x7f3667-0x0;var _0x2c4c24=_0x5fab[_0x7f3667];return _0x2c4c24;};'use strict';var _=require(_0xb5fa('0x0'));var util=require(_0xb5fa('0x1'));var logger=require('../../config/logger')(_0xb5fa('0x2'));var moment=require(_0xb5fa('0x3'));var BPromise=require(_0xb5fa('0x4'));var rp=require(_0xb5fa('0x5'));var fs=require('fs');var path=require(_0xb5fa('0x6'));var rimraf=require(_0xb5fa('0x7'));var config=require(_0xb5fa('0x8'));var attributes=require(_0xb5fa('0x9'));module[_0xb5fa('0xa')]=function(_0x44df89,_0x4a0249){return _0x44df89['define'](_0xb5fa('0xb'),attributes,{'tableName':_0xb5fa('0xc'),'paranoid':![],'indexes':[{'name':_0xb5fa('0xd'),'fields':['accountcode']},{'name':_0xb5fa('0xe'),'fields':[_0xb5fa('0xe')]},{'name':_0xb5fa('0xf'),'fields':['disposition']},{'name':'dst','fields':[_0xb5fa('0x10')]},{'name':_0xb5fa('0x11'),'fields':[_0xb5fa('0x11')]},{'name':_0xb5fa('0x12'),'fields':[_0xb5fa('0x12')]}],'timestamps':![]});};
\ No newline at end of file
+var _0xba34=['exports','define','cdr','accountcode','calldate','disposition','dst','src','uniqueid','lodash','util','../../config/logger','api','moment','rimraf','../../config/environment','./cdr.attributes'];(function(_0x3672b3,_0x20f5e9){var _0x383afb=function(_0x4cd85b){while(--_0x4cd85b){_0x3672b3['push'](_0x3672b3['shift']());}};_0x383afb(++_0x20f5e9);}(_0xba34,0x119));var _0x4ba3=function(_0x42227d,_0x245aeb){_0x42227d=_0x42227d-0x0;var _0x351e41=_0xba34[_0x42227d];return _0x351e41;};'use strict';var _=require(_0x4ba3('0x0'));var util=require(_0x4ba3('0x1'));var logger=require(_0x4ba3('0x2'))(_0x4ba3('0x3'));var moment=require(_0x4ba3('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x4ba3('0x5'));var config=require(_0x4ba3('0x6'));var attributes=require(_0x4ba3('0x7'));module[_0x4ba3('0x8')]=function(_0x3590a1,_0xb88621){return _0x3590a1[_0x4ba3('0x9')]('Cdr',attributes,{'tableName':_0x4ba3('0xa'),'paranoid':![],'indexes':[{'name':_0x4ba3('0xb'),'fields':[_0x4ba3('0xb')]},{'name':_0x4ba3('0xc'),'fields':[_0x4ba3('0xc')]},{'name':_0x4ba3('0xd'),'fields':[_0x4ba3('0xd')]},{'name':_0x4ba3('0xe'),'fields':[_0x4ba3('0xe')]},{'name':_0x4ba3('0xf'),'fields':[_0x4ba3('0xf')]},{'name':'uniqueid','fields':[_0x4ba3('0x10')]}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js
index 10db564..7d8b5c7 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 _0xf625=['debug','stringify','error','code','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','Cdr,\x20%s,\x20%s','request\x20sent'];(function(_0x47e7cb,_0x4c1b8d){var _0x2a8874=function(_0x36498f){while(--_0x36498f){_0x47e7cb['push'](_0x47e7cb['shift']());}};_0x2a8874(++_0x4c1b8d);}(_0xf625,0x1ab));var _0x5f62=function(_0x301ea6,_0x202cf3){_0x301ea6=_0x301ea6-0x0;var _0x3bd1ae=_0xf625[_0x301ea6];return _0x3bd1ae;};'use strict';var _=require(_0x5f62('0x0'));var util=require(_0x5f62('0x1'));var moment=require(_0x5f62('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5f62('0x3'));var db=require(_0x5f62('0x4'))['db'];var utils=require(_0x5f62('0x5'));var logger=require(_0x5f62('0x6'))(_0x5f62('0x7'));var config=require(_0x5f62('0x8'));var jayson=require(_0x5f62('0x9'));var client=jayson['client'][_0x5f62('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4ca55d,_0x438333,_0x60a02d){return new BPromise(function(_0x180f68,_0x2a1099){return client['request'](_0x4ca55d,_0x60a02d)[_0x5f62('0xb')](function(_0x2183c7){logger['info'](_0x5f62('0xc'),_0x438333,_0x5f62('0xd'));logger[_0x5f62('0xe')]('Cdr,\x20%s,\x20%s,\x20%s',_0x438333,_0x5f62('0xd'),JSON[_0x5f62('0xf')](_0x2183c7));if(_0x2183c7[_0x5f62('0x10')]){if(_0x2183c7[_0x5f62('0x10')][_0x5f62('0x11')]===0x1f4){logger[_0x5f62('0x10')](_0x5f62('0xc'),_0x438333,_0x2183c7[_0x5f62('0x10')][_0x5f62('0x12')]);return _0x2a1099(_0x2183c7[_0x5f62('0x10')][_0x5f62('0x12')]);}logger[_0x5f62('0x10')](_0x5f62('0xc'),_0x438333,_0x2183c7['error']['message']);return _0x180f68(_0x2183c7[_0x5f62('0x10')][_0x5f62('0x12')]);}else{logger['info'](_0x5f62('0xc'),_0x438333,'request\x20sent');_0x180f68(_0x2183c7[_0x5f62('0x13')]['message']);}})[_0x5f62('0x14')](function(_0x331bde){logger[_0x5f62('0x10')](_0x5f62('0xc'),_0x438333,_0x331bde);_0x2a1099(_0x331bde);});});}
\ No newline at end of file
+var _0x92c1=['request\x20sent','stringify','error','code','message','Cdr,\x20%s,\x20%s','info','result','catch','lodash','moment','randomstring','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','Cdr,\x20%s,\x20%s,\x20%s'];(function(_0x5a5f36,_0x1f123c){var _0x1048ea=function(_0x486a11){while(--_0x486a11){_0x5a5f36['push'](_0x5a5f36['shift']());}};_0x1048ea(++_0x1f123c);}(_0x92c1,0x1d5));var _0x192c=function(_0x59f138,_0x2f52f0){_0x59f138=_0x59f138-0x0;var _0x2b3820=_0x92c1[_0x59f138];return _0x2b3820;};'use strict';var _=require(_0x192c('0x0'));var util=require('util');var moment=require(_0x192c('0x1'));var BPromise=require('bluebird');var rs=require(_0x192c('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x192c('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x192c('0x4'))('rpc');var config=require(_0x192c('0x5'));var jayson=require(_0x192c('0x6'));var client=jayson[_0x192c('0x7')][_0x192c('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x39b38a,_0x33101d,_0xa322ea){return new BPromise(function(_0x2b62ac,_0x44dc51){return client[_0x192c('0x9')](_0x39b38a,_0xa322ea)['then'](function(_0x2ab752){logger['info']('Cdr,\x20%s,\x20%s',_0x33101d,'request\x20sent');logger['debug'](_0x192c('0xa'),_0x33101d,_0x192c('0xb'),JSON[_0x192c('0xc')](_0x2ab752));if(_0x2ab752[_0x192c('0xd')]){if(_0x2ab752[_0x192c('0xd')][_0x192c('0xe')]===0x1f4){logger[_0x192c('0xd')]('Cdr,\x20%s,\x20%s',_0x33101d,_0x2ab752[_0x192c('0xd')]['message']);return _0x44dc51(_0x2ab752[_0x192c('0xd')][_0x192c('0xf')]);}logger[_0x192c('0xd')](_0x192c('0x10'),_0x33101d,_0x2ab752[_0x192c('0xd')][_0x192c('0xf')]);return _0x2b62ac(_0x2ab752[_0x192c('0xd')][_0x192c('0xf')]);}else{logger[_0x192c('0x11')](_0x192c('0x10'),_0x33101d,_0x192c('0xb'));_0x2b62ac(_0x2ab752[_0x192c('0x12')]['message']);}})[_0x192c('0x13')](function(_0x3f43f5){logger[_0x192c('0xd')](_0x192c('0x10'),_0x33101d,_0x3f43f5);_0x44dc51(_0x3f43f5);});});}
\ No newline at end of file
diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js
index 5a45787..332194f 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 _0x2293=['delete','destroy','exports','multer','path','express','Router','../../components/interaction/service','../../config/environment','./cdr.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create','put','update'];(function(_0x3de4cb,_0x2d7b12){var _0x29f83a=function(_0x2371f3){while(--_0x2371f3){_0x3de4cb['push'](_0x3de4cb['shift']());}};_0x29f83a(++_0x2d7b12);}(_0x2293,0x81));var _0x3229=function(_0x4ed858,_0x3d7c51){_0x4ed858=_0x4ed858-0x0;var _0x15d269=_0x2293[_0x4ed858];return _0x15d269;};'use strict';var multer=require(_0x3229('0x0'));var util=require('util');var path=require(_0x3229('0x1'));var timeout=require('connect-timeout');var express=require(_0x3229('0x2'));var router=express[_0x3229('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x3229('0x4'));var config=require(_0x3229('0x5'));var controller=require(_0x3229('0x6'));router[_0x3229('0x7')]('/',auth[_0x3229('0x8')](),controller[_0x3229('0x9')]);router[_0x3229('0x7')](_0x3229('0xa'),auth[_0x3229('0x8')](),controller[_0x3229('0xb')]);router['get'](_0x3229('0xc'),auth[_0x3229('0x8')](),controller[_0x3229('0xd')]);router[_0x3229('0xe')]('/',auth[_0x3229('0x8')](),controller[_0x3229('0xf')]);router[_0x3229('0x10')](_0x3229('0xc'),auth['isAuthenticated'](),controller[_0x3229('0x11')]);router[_0x3229('0x12')](_0x3229('0xc'),auth[_0x3229('0x8')](),controller[_0x3229('0x13')]);module[_0x3229('0x14')]=router;
\ No newline at end of file
+var _0x9cff=['util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./cdr.controller','get','isAuthenticated','/:id','show','post','create','put','exports'];(function(_0xe71d4,_0x14780f){var _0x535ccd=function(_0x5799c7){while(--_0x5799c7){_0xe71d4['push'](_0xe71d4['shift']());}};_0x535ccd(++_0x14780f);}(_0x9cff,0x96));var _0xf9cf=function(_0x199b59,_0x25a5bc){_0x199b59=_0x199b59-0x0;var _0x179e10=_0x9cff[_0x199b59];return _0x179e10;};'use strict';var multer=require('multer');var util=require(_0xf9cf('0x0'));var path=require('path');var timeout=require(_0xf9cf('0x1'));var express=require(_0xf9cf('0x2'));var router=express['Router']();var auth=require(_0xf9cf('0x3'));var interaction=require(_0xf9cf('0x4'));var config=require(_0xf9cf('0x5'));var controller=require(_0xf9cf('0x6'));router[_0xf9cf('0x7')]('/',auth[_0xf9cf('0x8')](),controller['index']);router[_0xf9cf('0x7')]('/describe',auth[_0xf9cf('0x8')](),controller['describe']);router[_0xf9cf('0x7')](_0xf9cf('0x9'),auth[_0xf9cf('0x8')](),controller[_0xf9cf('0xa')]);router[_0xf9cf('0xb')]('/',auth[_0xf9cf('0x8')](),controller[_0xf9cf('0xc')]);router[_0xf9cf('0xd')](_0xf9cf('0x9'),auth[_0xf9cf('0x8')](),controller['update']);router['delete'](_0xf9cf('0x9'),auth[_0xf9cf('0x8')](),controller['destroy']);module[_0xf9cf('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.attributes.js b/server/api/chatApplication/chatApplication.attributes.js
index 5ac9633..a5bc56c 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 _0xcad8=['exports','STRING','noop','TEXT','*,*,*,*'];(function(_0x3d0f11,_0x519a66){var _0x26acc8=function(_0x97712f){while(--_0x97712f){_0x3d0f11['push'](_0x3d0f11['shift']());}};_0x26acc8(++_0x519a66);}(_0xcad8,0x11d));var _0x8cad=function(_0x11d945,_0x25b2a7){_0x11d945=_0x11d945-0x0;var _0x3566a7=_0xcad8[_0x11d945];return _0x3566a7;};'use strict';var Sequelize=require('sequelize');module[_0x8cad('0x0')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x8cad('0x1')],'allowNull':![],'defaultValue':_0x8cad('0x2')},'appdata':{'type':Sequelize[_0x8cad('0x3')]()},'description':{'type':Sequelize[_0x8cad('0x1')]},'interval':{'type':Sequelize[_0x8cad('0x1')],'defaultValue':_0x8cad('0x4')}};
\ No newline at end of file
+var _0xf2a9=['noop','TEXT','STRING','*,*,*,*','sequelize','exports','INTEGER'];(function(_0x472356,_0x1f4629){var _0x2a5194=function(_0x153861){while(--_0x153861){_0x472356['push'](_0x472356['shift']());}};_0x2a5194(++_0x1f4629);}(_0xf2a9,0x66));var _0x9f2a=function(_0x2379dc,_0x596caf){_0x2379dc=_0x2379dc-0x0;var _0x2a835c=_0xf2a9[_0x2379dc];return _0x2a835c;};'use strict';var Sequelize=require(_0x9f2a('0x0'));module[_0x9f2a('0x1')]={'priority':{'type':Sequelize[_0x9f2a('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x9f2a('0x3')},'appdata':{'type':Sequelize[_0x9f2a('0x4')]()},'description':{'type':Sequelize[_0x9f2a('0x5')]},'interval':{'type':Sequelize[_0x9f2a('0x5')],'defaultValue':_0x9f2a('0x6')}};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js
index f69710d..323a646 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 _0xf256=['json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','stack','name','send','show','params','model','keys','rawAttributes','query','filters','intersection','attributes','fields','include','options','find','catch','body','ChatApplication','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','ejs','squel','crypto','jsforce','to-csv','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status'];(function(_0x39fdda,_0x1994e1){var _0x5c9d2f=function(_0x141709){while(--_0x141709){_0x39fdda['push'](_0x39fdda['shift']());}};_0x5c9d2f(++_0x1994e1);}(_0xf256,0xc9));var _0x6f25=function(_0x4b87bf,_0x59faa9){_0x4b87bf=_0x4b87bf-0x0;var _0x765a28=_0xf256[_0x4b87bf];return _0x765a28;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x6f25('0x0'));var rimraf=require(_0x6f25('0x1'));var zipdir=require(_0x6f25('0x2'));var jsonpatch=require(_0x6f25('0x3'));var rp=require(_0x6f25('0x4'));var moment=require('moment');var BPromise=require(_0x6f25('0x5'));var Mustache=require(_0x6f25('0x6'));var util=require('util');var path=require(_0x6f25('0x7'));var sox=require(_0x6f25('0x8'));var csv=require('to-csv');var ejs=require(_0x6f25('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x6f25('0xa'));var crypto=require(_0x6f25('0xb'));var jsforce=require(_0x6f25('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x6f25('0xd'));var querystring=require(_0x6f25('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x6f25('0xf'));var qs=require(_0x6f25('0x10'));var as=require(_0x6f25('0x11'));var hardwareService=require(_0x6f25('0x12'));var logger=require(_0x6f25('0x13'))(_0x6f25('0x14'));var utils=require(_0x6f25('0x15'));var config=require(_0x6f25('0x16'));var db=require(_0x6f25('0x17'))['db'];function respondWithStatusCode(_0x14014e,_0x33782b){_0x33782b=_0x33782b||0xcc;return function(_0x1f0073){if(_0x1f0073){return _0x14014e[_0x6f25('0x18')](_0x33782b);}return _0x14014e['status'](_0x33782b)[_0x6f25('0x19')]();};}function respondWithResult(_0x4668d3,_0x1ec8cd){_0x1ec8cd=_0x1ec8cd||0xc8;return function(_0x5df2f2){if(_0x5df2f2){return _0x4668d3[_0x6f25('0x1a')](_0x1ec8cd)[_0x6f25('0x1b')](_0x5df2f2);}};}function respondWithFilteredResult(_0x23a9a2,_0x53b33e){return function(_0x235e8e){if(_0x235e8e){var _0x71616a=_0x235e8e[_0x6f25('0x1c')],_0x4782f8=_0x53b33e[_0x6f25('0x1d')],_0x5387d4=_0x53b33e[_0x6f25('0x1d')]+_0x53b33e[_0x6f25('0x1e')],_0x4cc0ca;if(_0x5387d4>=_0x71616a){_0x5387d4=_0x71616a;_0x4cc0ca=0xc8;}else{_0x4cc0ca=0xce;}_0x23a9a2[_0x6f25('0x1a')](_0x4cc0ca);return _0x23a9a2[_0x6f25('0x1f')](_0x6f25('0x20'),_0x4782f8+'-'+_0x5387d4+'/'+_0x71616a)['json'](_0x235e8e);}return null;};}function patchUpdates(_0x2326ef){return function(_0x54bac2){try{jsonpatch[_0x6f25('0x21')](_0x54bac2,_0x2326ef,!![]);}catch(_0x272cb5){return BPromise[_0x6f25('0x22')](_0x272cb5);}return _0x54bac2['save']();};}function saveUpdates(_0x32aa7f,_0x81f6bf){return function(_0x3b99d5){if(_0x3b99d5){return _0x3b99d5[_0x6f25('0x23')](_0x32aa7f)[_0x6f25('0x24')](function(_0x125e86){return _0x125e86;});}return null;};}function removeEntity(_0x1e3f11,_0x5d4252){return function(_0x515878){if(_0x515878){return _0x515878[_0x6f25('0x25')]()['then'](function(){_0x1e3f11[_0x6f25('0x1a')](0xcc)[_0x6f25('0x19')]();});}};}function handleEntityNotFound(_0x1fd0c5,_0x4f0d39){return function(_0x3ba19f){if(!_0x3ba19f){_0x1fd0c5[_0x6f25('0x18')](0x194);}return _0x3ba19f;};}function handleError(_0xdcd4b8,_0x5af723){_0x5af723=_0x5af723||0x1f4;return function(_0x39947e){logger['error'](_0x39947e[_0x6f25('0x26')]);if(_0x39947e[_0x6f25('0x27')]){delete _0x39947e[_0x6f25('0x27')];}_0xdcd4b8['status'](_0x5af723)[_0x6f25('0x28')](_0x39947e);};}exports[_0x6f25('0x29')]=function(_0x40b06a,_0x20f1f4){var _0x3f6c49={'raw':!![],'where':{'id':_0x40b06a[_0x6f25('0x2a')]['id']}},_0x39e1df={};_0x39e1df[_0x6f25('0x2b')]=_[_0x6f25('0x2c')](db['ChatApplication'][_0x6f25('0x2d')]);_0x39e1df[_0x6f25('0x2e')]=_[_0x6f25('0x2c')](_0x40b06a[_0x6f25('0x2e')]);_0x39e1df[_0x6f25('0x2f')]=_[_0x6f25('0x30')](_0x39e1df['model'],_0x39e1df[_0x6f25('0x2e')]);_0x3f6c49[_0x6f25('0x31')]=_[_0x6f25('0x30')](_0x39e1df[_0x6f25('0x2b')],qs[_0x6f25('0x32')](_0x40b06a[_0x6f25('0x2e')][_0x6f25('0x32')]));_0x3f6c49[_0x6f25('0x31')]=_0x3f6c49[_0x6f25('0x31')]['length']?_0x3f6c49[_0x6f25('0x31')]:_0x39e1df[_0x6f25('0x2b')];if(_0x40b06a[_0x6f25('0x2e')]['includeAll']){_0x3f6c49[_0x6f25('0x33')]=[{'all':!![]}];}_0x3f6c49=_['merge']({},_0x3f6c49,_0x40b06a[_0x6f25('0x34')]);return db['ChatApplication'][_0x6f25('0x35')](_0x3f6c49)['then'](handleEntityNotFound(_0x20f1f4,null))[_0x6f25('0x24')](respondWithResult(_0x20f1f4,null))[_0x6f25('0x36')](handleError(_0x20f1f4,null));};exports['update']=function(_0x273924,_0x487b47){if(_0x273924[_0x6f25('0x37')]['id']){delete _0x273924[_0x6f25('0x37')]['id'];}return db[_0x6f25('0x38')]['find']({'where':{'id':_0x273924['params']['id']}})[_0x6f25('0x24')](handleEntityNotFound(_0x487b47,null))[_0x6f25('0x24')](saveUpdates(_0x273924['body'],null))[_0x6f25('0x24')](respondWithResult(_0x487b47,null))['catch'](handleError(_0x487b47,null));};exports[_0x6f25('0x25')]=function(_0x1bec82,_0x3dc59c){return db[_0x6f25('0x38')][_0x6f25('0x35')]({'where':{'id':_0x1bec82[_0x6f25('0x2a')]['id']}})[_0x6f25('0x24')](handleEntityNotFound(_0x3dc59c,null))['then'](removeEntity(_0x3dc59c,null))[_0x6f25('0x36')](handleError(_0x3dc59c,null));};
\ No newline at end of file
+var _0xb073=['status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','error','stack','send','show','params','model','keys','rawAttributes','query','filters','intersection','attributes','fields','length','includeAll','merge','options','ChatApplication','find','catch','body','html-pdf','eml-format','rimraf','zip-dir','moment','bluebird','mustache','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb'];(function(_0x22c393,_0x1f2389){var _0x161580=function(_0x3bd765){while(--_0x3bd765){_0x22c393['push'](_0x22c393['shift']());}};_0x161580(++_0x1f2389);}(_0xb073,0xfe));var _0x3b07=function(_0x3fbe9d,_0x36f8fb){_0x3fbe9d=_0x3fbe9d-0x0;var _0x343c9b=_0xb073[_0x3fbe9d];return _0x343c9b;};'use strict';var pdf=require(_0x3b07('0x0'));var emlformat=require(_0x3b07('0x1'));var rimraf=require(_0x3b07('0x2'));var zipdir=require(_0x3b07('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3b07('0x4'));var BPromise=require(_0x3b07('0x5'));var Mustache=require(_0x3b07('0x6'));var util=require('util');var path=require('path');var sox=require(_0x3b07('0x7'));var csv=require(_0x3b07('0x8'));var ejs=require(_0x3b07('0x9'));var fs=require('fs');var _=require(_0x3b07('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x3b07('0xb'));var deskjs=require(_0x3b07('0xc'));var toCsv=require(_0x3b07('0x8'));var querystring=require(_0x3b07('0xd'));var Papa=require(_0x3b07('0xe'));var Redis=require(_0x3b07('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3b07('0x10'));var logger=require(_0x3b07('0x11'))('api');var utils=require(_0x3b07('0x12'));var config=require(_0x3b07('0x13'));var db=require(_0x3b07('0x14'))['db'];function respondWithStatusCode(_0x318208,_0x53082e){_0x53082e=_0x53082e||0xcc;return function(_0xae5a98){if(_0xae5a98){return _0x318208['sendStatus'](_0x53082e);}return _0x318208[_0x3b07('0x15')](_0x53082e)[_0x3b07('0x16')]();};}function respondWithResult(_0x2a15c9,_0x24de90){_0x24de90=_0x24de90||0xc8;return function(_0x497f39){if(_0x497f39){return _0x2a15c9[_0x3b07('0x15')](_0x24de90)[_0x3b07('0x17')](_0x497f39);}};}function respondWithFilteredResult(_0x1939b2,_0x51744b){return function(_0xc22ef5){if(_0xc22ef5){var _0x5c6752=_0xc22ef5[_0x3b07('0x18')],_0x2a6df2=_0x51744b[_0x3b07('0x19')],_0xbb0b74=_0x51744b[_0x3b07('0x19')]+_0x51744b[_0x3b07('0x1a')],_0x30d415;if(_0xbb0b74>=_0x5c6752){_0xbb0b74=_0x5c6752;_0x30d415=0xc8;}else{_0x30d415=0xce;}_0x1939b2['status'](_0x30d415);return _0x1939b2[_0x3b07('0x1b')](_0x3b07('0x1c'),_0x2a6df2+'-'+_0xbb0b74+'/'+_0x5c6752)['json'](_0xc22ef5);}return null;};}function patchUpdates(_0x4a62da){return function(_0xcbe26a){try{jsonpatch[_0x3b07('0x1d')](_0xcbe26a,_0x4a62da,!![]);}catch(_0x452a78){return BPromise[_0x3b07('0x1e')](_0x452a78);}return _0xcbe26a['save']();};}function saveUpdates(_0x4a224a,_0x431a53){return function(_0x3a76f6){if(_0x3a76f6){return _0x3a76f6[_0x3b07('0x1f')](_0x4a224a)[_0x3b07('0x20')](function(_0x1fa2d2){return _0x1fa2d2;});}return null;};}function removeEntity(_0x3b3525,_0x247b11){return function(_0x38e78c){if(_0x38e78c){return _0x38e78c[_0x3b07('0x21')]()[_0x3b07('0x20')](function(){_0x3b3525[_0x3b07('0x15')](0xcc)[_0x3b07('0x16')]();});}};}function handleEntityNotFound(_0x507aa4,_0x5e4f5e){return function(_0x39b968){if(!_0x39b968){_0x507aa4['sendStatus'](0x194);}return _0x39b968;};}function handleError(_0x4d5c54,_0x46a69b){_0x46a69b=_0x46a69b||0x1f4;return function(_0x2a49fb){logger[_0x3b07('0x22')](_0x2a49fb[_0x3b07('0x23')]);if(_0x2a49fb['name']){delete _0x2a49fb['name'];}_0x4d5c54[_0x3b07('0x15')](_0x46a69b)[_0x3b07('0x24')](_0x2a49fb);};}exports[_0x3b07('0x25')]=function(_0x3195a1,_0x264a29){var _0x5a2362={'raw':!![],'where':{'id':_0x3195a1[_0x3b07('0x26')]['id']}},_0x12342a={};_0x12342a[_0x3b07('0x27')]=_[_0x3b07('0x28')](db['ChatApplication'][_0x3b07('0x29')]);_0x12342a['query']=_[_0x3b07('0x28')](_0x3195a1[_0x3b07('0x2a')]);_0x12342a[_0x3b07('0x2b')]=_[_0x3b07('0x2c')](_0x12342a[_0x3b07('0x27')],_0x12342a['query']);_0x5a2362[_0x3b07('0x2d')]=_['intersection'](_0x12342a['model'],qs[_0x3b07('0x2e')](_0x3195a1['query'][_0x3b07('0x2e')]));_0x5a2362[_0x3b07('0x2d')]=_0x5a2362[_0x3b07('0x2d')][_0x3b07('0x2f')]?_0x5a2362[_0x3b07('0x2d')]:_0x12342a['model'];if(_0x3195a1['query'][_0x3b07('0x30')]){_0x5a2362['include']=[{'all':!![]}];}_0x5a2362=_[_0x3b07('0x31')]({},_0x5a2362,_0x3195a1[_0x3b07('0x32')]);return db[_0x3b07('0x33')][_0x3b07('0x34')](_0x5a2362)[_0x3b07('0x20')](handleEntityNotFound(_0x264a29,null))['then'](respondWithResult(_0x264a29,null))[_0x3b07('0x35')](handleError(_0x264a29,null));};exports[_0x3b07('0x1f')]=function(_0x44278c,_0x155c00){if(_0x44278c[_0x3b07('0x36')]['id']){delete _0x44278c[_0x3b07('0x36')]['id'];}return db['ChatApplication']['find']({'where':{'id':_0x44278c['params']['id']}})[_0x3b07('0x20')](handleEntityNotFound(_0x155c00,null))[_0x3b07('0x20')](saveUpdates(_0x44278c[_0x3b07('0x36')],null))[_0x3b07('0x20')](respondWithResult(_0x155c00,null))[_0x3b07('0x35')](handleError(_0x155c00,null));};exports[_0x3b07('0x21')]=function(_0x5cb579,_0x2f1cda){return db[_0x3b07('0x33')][_0x3b07('0x34')]({'where':{'id':_0x5cb579[_0x3b07('0x26')]['id']}})['then'](handleEntityNotFound(_0x2f1cda,null))[_0x3b07('0x20')](removeEntity(_0x2f1cda,null))[_0x3b07('0x35')](handleError(_0x2f1cda,null));};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js
index b4bcac7..7aca2b6 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 _0xa9e0=['define','ChatApplication','utf8mb4_unicode_ci','lodash','util','../../config/logger','bluebird','path','rimraf','../../config/environment','./chatApplication.attributes','exports'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x139a3c,_0x4fc883){_0x139a3c=_0x139a3c-0x0;var _0x2b375b=_0xa9e0[_0x139a3c];return _0x2b375b;};'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':'chat_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x0a9e('0xb')});};
\ No newline at end of file
+var _0xa9e0=['define','ChatApplication','utf8mb4_unicode_ci','lodash','util','../../config/logger','bluebird','path','rimraf','../../config/environment','./chatApplication.attributes','exports'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5c3c0b,_0x4ee35e){_0x5c3c0b=_0x5c3c0b-0x0;var _0x52ecd2=_0xa9e0[_0x5c3c0b];return _0x52ecd2;};'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':'chat_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x0a9e('0xb')});};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js
index ac297cc..3ee8eb8 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 _0xe499=['result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','ChatApplication,\x20%s,\x20%s','message'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xe499,0x1c4));var _0x9e49=function(_0x50e0b4,_0x1057f7){_0x50e0b4=_0x50e0b4-0x0;var _0x2fa8b0=_0xe499[_0x50e0b4];return _0x2fa8b0;};'use strict';var _=require(_0x9e49('0x0'));var util=require(_0x9e49('0x1'));var moment=require('moment');var BPromise=require(_0x9e49('0x2'));var rs=require(_0x9e49('0x3'));var fs=require('fs');var Redis=require(_0x9e49('0x4'));var db=require(_0x9e49('0x5'))['db'];var utils=require(_0x9e49('0x6'));var logger=require(_0x9e49('0x7'))(_0x9e49('0x8'));var config=require(_0x9e49('0x9'));var jayson=require(_0x9e49('0xa'));var client=jayson[_0x9e49('0xb')][_0x9e49('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4cdc89,_0x4e8fca,_0x186828){return new BPromise(function(_0x22a34c,_0x3e6dc9){return client[_0x9e49('0xd')](_0x4cdc89,_0x186828)[_0x9e49('0xe')](function(_0x43372d){logger[_0x9e49('0xf')]('ChatApplication,\x20%s,\x20%s',_0x4e8fca,_0x9e49('0x10'));logger[_0x9e49('0x11')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x4e8fca,_0x9e49('0x10'),JSON[_0x9e49('0x12')](_0x43372d));if(_0x43372d[_0x9e49('0x13')]){if(_0x43372d[_0x9e49('0x13')][_0x9e49('0x14')]===0x1f4){logger['error'](_0x9e49('0x15'),_0x4e8fca,_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);return _0x3e6dc9(_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);}logger[_0x9e49('0x13')](_0x9e49('0x15'),_0x4e8fca,_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);return _0x22a34c(_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);}else{logger['info'](_0x9e49('0x15'),_0x4e8fca,_0x9e49('0x10'));_0x22a34c(_0x43372d[_0x9e49('0x17')][_0x9e49('0x16')]);}})[_0x9e49('0x18')](function(_0x5a97c0){logger[_0x9e49('0x13')](_0x9e49('0x15'),_0x4e8fca,_0x5a97c0);_0x3e6dc9(_0x5a97c0);});});}
\ No newline at end of file
+var _0x97e2=['error','message','result','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ChatApplication,\x20%s,\x20%s','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','code'];(function(_0x363ef8,_0x4ecb1a){var _0x148822=function(_0x232634){while(--_0x232634){_0x363ef8['push'](_0x363ef8['shift']());}};_0x148822(++_0x4ecb1a);}(_0x97e2,0xab));var _0x297e=function(_0x48fd87,_0x52c8ae){_0x48fd87=_0x48fd87-0x0;var _0x805dfe=_0x97e2[_0x48fd87];return _0x805dfe;};'use strict';var _=require(_0x297e('0x0'));var util=require(_0x297e('0x1'));var moment=require('moment');var BPromise=require(_0x297e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x297e('0x3'));var db=require(_0x297e('0x4'))['db'];var utils=require(_0x297e('0x5'));var logger=require(_0x297e('0x6'))(_0x297e('0x7'));var config=require(_0x297e('0x8'));var jayson=require(_0x297e('0x9'));var client=jayson[_0x297e('0xa')][_0x297e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4dd2f6,_0x4db328,_0x437168){return new BPromise(function(_0x23c9c9,_0xca28f1){return client[_0x297e('0xc')](_0x4dd2f6,_0x437168)[_0x297e('0xd')](function(_0x23c606){logger['info'](_0x297e('0xe'),_0x4db328,_0x297e('0xf'));logger['debug'](_0x297e('0x10'),_0x4db328,'request\x20sent',JSON['stringify'](_0x23c606));if(_0x23c606['error']){if(_0x23c606['error'][_0x297e('0x11')]===0x1f4){logger[_0x297e('0x12')](_0x297e('0xe'),_0x4db328,_0x23c606[_0x297e('0x12')][_0x297e('0x13')]);return _0xca28f1(_0x23c606[_0x297e('0x12')][_0x297e('0x13')]);}logger['error'](_0x297e('0xe'),_0x4db328,_0x23c606[_0x297e('0x12')]['message']);return _0x23c9c9(_0x23c606['error']['message']);}else{logger['info'](_0x297e('0xe'),_0x4db328,_0x297e('0xf'));_0x23c9c9(_0x23c606[_0x297e('0x14')][_0x297e('0x13')]);}})['catch'](function(_0x249591){logger[_0x297e('0x12')](_0x297e('0xe'),_0x4db328,_0x249591);_0xca28f1(_0x249591);});});}
\ No newline at end of file
diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js
index b3e51b5..bddf454 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 _0xa3e3=['update','delete','destroy','multer','util','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','get','/:id','isAuthenticated','show','put'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xa3e3,0x163));var _0x3a3e=function(_0x3639a1,_0x20cca8){_0x3639a1=_0x3639a1-0x0;var _0x113193=_0xa3e3[_0x3639a1];return _0x113193;};'use strict';var multer=require(_0x3a3e('0x0'));var util=require(_0x3a3e('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x3a3e('0x2'));var router=express[_0x3a3e('0x3')]();var auth=require(_0x3a3e('0x4'));var interaction=require(_0x3a3e('0x5'));var config=require(_0x3a3e('0x6'));var controller=require(_0x3a3e('0x7'));router[_0x3a3e('0x8')](_0x3a3e('0x9'),auth[_0x3a3e('0xa')](),controller[_0x3a3e('0xb')]);router[_0x3a3e('0xc')](_0x3a3e('0x9'),auth[_0x3a3e('0xa')](),controller[_0x3a3e('0xd')]);router[_0x3a3e('0xe')]('/:id',auth[_0x3a3e('0xa')](),controller[_0x3a3e('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0x763a=['Router','../../components/auth/service','../../components/interaction/service','./chatApplication.controller','get','/:id','isAuthenticated','put','update','exports','multer','util','path','connect-timeout'];(function(_0xdc1300,_0x25149b){var _0x17acee=function(_0x35c535){while(--_0x35c535){_0xdc1300['push'](_0xdc1300['shift']());}};_0x17acee(++_0x25149b);}(_0x763a,0x15a));var _0xa763=function(_0x3754bb,_0x465fc2){_0x3754bb=_0x3754bb-0x0;var _0x477a14=_0x763a[_0x3754bb];return _0x477a14;};'use strict';var multer=require(_0xa763('0x0'));var util=require(_0xa763('0x1'));var path=require(_0xa763('0x2'));var timeout=require(_0xa763('0x3'));var express=require('express');var router=express[_0xa763('0x4')]();var auth=require(_0xa763('0x5'));var interaction=require(_0xa763('0x6'));var config=require('../../config/environment');var controller=require(_0xa763('0x7'));router[_0xa763('0x8')](_0xa763('0x9'),auth[_0xa763('0xa')](),controller['show']);router[_0xa763('0xb')](_0xa763('0x9'),auth[_0xa763('0xa')](),controller[_0xa763('0xc')]);router['delete']('/:id',auth[_0xa763('0xa')](),controller['destroy']);module[_0xa763('0xd')]=router;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.attributes.js b/server/api/chatGroup/chatGroup.attributes.js
index 52c4411..5350038 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 _0x6241=['BOOLEAN','exports','STRING'];(function(_0x4b780b,_0x47d9f4){var _0x294477=function(_0x372c34){while(--_0x372c34){_0x4b780b['push'](_0x4b780b['shift']());}};_0x294477(++_0x47d9f4);}(_0x6241,0x166));var _0x1624=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0x6241[_0x8c43de];return _0xa6591b;};'use strict';var Sequelize=require('sequelize');module[_0x1624('0x0')]={'name':{'type':Sequelize[_0x1624('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x1624('0x1')]},'write':{'type':Sequelize[_0x1624('0x2')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x3ef6=['STRING','BOOLEAN','sequelize'];(function(_0x48bfef,_0x595124){var _0x58447f=function(_0x2cac34){while(--_0x2cac34){_0x48bfef['push'](_0x48bfef['shift']());}};_0x58447f(++_0x595124);}(_0x3ef6,0xe9));var _0x63ef=function(_0x24aa4a,_0x1c646b){_0x24aa4a=_0x24aa4a-0x0;var _0x535e05=_0x3ef6[_0x24aa4a];return _0x535e05;};'use strict';var Sequelize=require(_0x63ef('0x0'));module['exports']={'name':{'type':Sequelize[_0x63ef('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x63ef('0x1')]},'write':{'type':Sequelize[_0x63ef('0x2')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js
index ff4a66b..564a6f5 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 _0xa567=['socket.io-emitter','./chatGroup.socket','register','client','http','test','Sequelize','ValidationError','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','error','code','message','catch','sendStatus','status','end','json','count','offset','limit','Content-Range','reject','save','stack','name','send','index','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','ChatGroup','findAll','rows','params','create','body','update','find','destroy','describe','getUnread','user','toInteger','addMembers','ids','getMembers','findOne','User','removeMembers','addMessage','ChatGroupId','ChatInternalMessage','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','html-pdf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost'];(function(_0x353d05,_0x2e3889){var _0x58e9c5=function(_0x4c6ac5){while(--_0x4c6ac5){_0x353d05['push'](_0x353d05['shift']());}};_0x58e9c5(++_0x2e3889);}(_0xa567,0xc1));var _0x7a56=function(_0x4f2373,_0x3e7a82){_0x4f2373=_0x4f2373-0x0;var _0x5d4374=_0xa567[_0x4f2373];return _0x5d4374;};'use strict';var pdf=require(_0x7a56('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x7a56('0x1'));var jsonpatch=require(_0x7a56('0x2'));var rp=require('request-promise');var moment=require(_0x7a56('0x3'));var BPromise=require(_0x7a56('0x4'));var Mustache=require('mustache');var util=require(_0x7a56('0x5'));var path=require(_0x7a56('0x6'));var sox=require(_0x7a56('0x7'));var csv=require(_0x7a56('0x8'));var ejs=require(_0x7a56('0x9'));var fs=require('fs');var _=require(_0x7a56('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x7a56('0xb'));var deskjs=require(_0x7a56('0xc'));var toCsv=require(_0x7a56('0x8'));var querystring=require(_0x7a56('0xd'));var Papa=require(_0x7a56('0xe'));var Redis=require(_0x7a56('0xf'));var authService=require(_0x7a56('0x10'));var qs=require(_0x7a56('0x11'));var as=require(_0x7a56('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x7a56('0x13'))(_0x7a56('0x14'));var utils=require(_0x7a56('0x15'));var config=require(_0x7a56('0x16'));var db=require(_0x7a56('0x17'))['db'];config[_0x7a56('0x18')]=_[_0x7a56('0x19')](config[_0x7a56('0x18')],{'host':_0x7a56('0x1a'),'port':0x18eb});var socket=require(_0x7a56('0x1b'))(new Redis(config['redis']));require(_0x7a56('0x1c'))[_0x7a56('0x1d')](socket);var jayson=require('jayson/promise');var client=jayson[_0x7a56('0x1e')][_0x7a56('0x1f')]({'port':0x232a});function checkPasswordPattern(_0x386617,_0x5486d4,_0x2753ad){if(_0x2753ad){var _0xc65c1b=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0xc65c1b[_0x7a56('0x20')](_0x5486d4)){return _0x386617;}else{throw new db[(_0x7a56('0x21'))][(_0x7a56('0x22'))]('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 _0x386617;}}function respondWithRpcPromise(_0x40cc61,_0x2224ed,_0x2362ef,_0x4538c7){return new BPromise(function(_0xee3d57,_0x63e1a3){var _0x2b5eb3=_0x4538c7||client;return _0x2b5eb3[_0x7a56('0x23')](_0x40cc61,_0x2362ef)[_0x7a56('0x24')](function(_0x95de96){logger[_0x7a56('0x25')](_0x7a56('0x26'),_0x2224ed,_0x7a56('0x27'));logger[_0x7a56('0x28')](_0x7a56('0x29'),_0x2224ed,_0x7a56('0x27'),JSON['stringify'](_0x95de96));if(_0x95de96[_0x7a56('0x2a')]){if(_0x95de96[_0x7a56('0x2a')][_0x7a56('0x2b')]===0x1f4){logger[_0x7a56('0x2a')](_0x7a56('0x26'),_0x2224ed,_0x95de96[_0x7a56('0x2a')]['message']);return _0x63e1a3(_0x95de96[_0x7a56('0x2a')]['message']);}logger['error'](_0x7a56('0x26'),_0x2224ed,_0x95de96[_0x7a56('0x2a')][_0x7a56('0x2c')]);return _0xee3d57(_0x95de96['error'][_0x7a56('0x2c')]);}else{logger[_0x7a56('0x25')](_0x7a56('0x26'),_0x2224ed,_0x7a56('0x27'));_0xee3d57(_0x95de96['result'][_0x7a56('0x2c')]);}})[_0x7a56('0x2d')](function(_0x256d31){logger[_0x7a56('0x2a')](_0x7a56('0x26'),_0x2224ed,_0x256d31);_0x63e1a3(_0x256d31);});});}function respondWithStatusCode(_0xb5c769,_0x489085){_0x489085=_0x489085||0xcc;return function(_0x4982bd){if(_0x4982bd){return _0xb5c769[_0x7a56('0x2e')](_0x489085);}return _0xb5c769[_0x7a56('0x2f')](_0x489085)[_0x7a56('0x30')]();};}function respondWithResult(_0x4eb3a2,_0x27cf77){_0x27cf77=_0x27cf77||0xc8;return function(_0x21aeed){if(_0x21aeed){return _0x4eb3a2[_0x7a56('0x2f')](_0x27cf77)[_0x7a56('0x31')](_0x21aeed);}};}function respondWithFilteredResult(_0x362f8b,_0x4840bc){return function(_0x1b24b5){if(_0x1b24b5){var _0x442dfc=_0x1b24b5[_0x7a56('0x32')],_0x964d40=_0x4840bc[_0x7a56('0x33')],_0x86e97a=_0x4840bc[_0x7a56('0x33')]+_0x4840bc[_0x7a56('0x34')],_0x4d32ca;if(_0x86e97a>=_0x442dfc){_0x86e97a=_0x442dfc;_0x4d32ca=0xc8;}else{_0x4d32ca=0xce;}_0x362f8b[_0x7a56('0x2f')](_0x4d32ca);return _0x362f8b['set'](_0x7a56('0x35'),_0x964d40+'-'+_0x86e97a+'/'+_0x442dfc)['json'](_0x1b24b5);}return null;};}function patchUpdates(_0x40369f){return function(_0x374fb9){try{jsonpatch['apply'](_0x374fb9,_0x40369f,!![]);}catch(_0x27fb18){return BPromise[_0x7a56('0x36')](_0x27fb18);}return _0x374fb9[_0x7a56('0x37')]();};}function saveUpdates(_0x40c7b7,_0x3bab4b){return function(_0x7028ef){if(_0x7028ef){return _0x7028ef['update'](_0x40c7b7)[_0x7a56('0x24')](function(_0x289a65){return _0x289a65;});}return null;};}function removeEntity(_0x4c8b3a,_0xdb0f5e){return function(_0x34d581){if(_0x34d581){return _0x34d581['destroy']()[_0x7a56('0x24')](function(){_0x4c8b3a[_0x7a56('0x2f')](0xcc)[_0x7a56('0x30')]();});}};}function handleEntityNotFound(_0x4d92c9,_0x3b9140){return function(_0x379c63){if(!_0x379c63){_0x4d92c9[_0x7a56('0x2e')](0x194);}return _0x379c63;};}function handleError(_0x414a42,_0x6b64fe){_0x6b64fe=_0x6b64fe||0x1f4;return function(_0x2064b4){logger[_0x7a56('0x2a')](_0x2064b4[_0x7a56('0x38')]);if(_0x2064b4[_0x7a56('0x39')]){delete _0x2064b4['name'];}_0x414a42[_0x7a56('0x2f')](_0x6b64fe)[_0x7a56('0x3a')](_0x2064b4);};}exports[_0x7a56('0x3b')]=function(_0x36fd42,_0x50e39f){var _0xdcc0ec={},_0x49c652={},_0x30b9c5={'count':0x0,'rows':[]};var _0xa55cae=_['map'](db['ChatGroup'][_0x7a56('0x3c')],function(_0x58dd57){return{'name':_0x58dd57[_0x7a56('0x3d')],'type':_0x58dd57['type'][_0x7a56('0x3e')]};});_0x49c652[_0x7a56('0x3f')]=_[_0x7a56('0x40')](_0xa55cae,_0x7a56('0x39'));_0x49c652[_0x7a56('0x41')]=_[_0x7a56('0x42')](_0x36fd42[_0x7a56('0x41')]);_0x49c652[_0x7a56('0x43')]=_[_0x7a56('0x44')](_0x49c652[_0x7a56('0x3f')],_0x49c652['query']);_0xdcc0ec['attributes']=_[_0x7a56('0x44')](_0x49c652['model'],qs[_0x7a56('0x45')](_0x36fd42[_0x7a56('0x41')][_0x7a56('0x45')]));_0xdcc0ec[_0x7a56('0x46')]=_0xdcc0ec[_0x7a56('0x46')][_0x7a56('0x47')]?_0xdcc0ec[_0x7a56('0x46')]:_0x49c652[_0x7a56('0x3f')];if(!_0x36fd42[_0x7a56('0x41')][_0x7a56('0x48')](_0x7a56('0x49'))){_0xdcc0ec[_0x7a56('0x34')]=qs[_0x7a56('0x34')](_0x36fd42[_0x7a56('0x41')][_0x7a56('0x34')]);_0xdcc0ec[_0x7a56('0x33')]=qs[_0x7a56('0x33')](_0x36fd42[_0x7a56('0x41')]['offset']);}_0xdcc0ec[_0x7a56('0x4a')]=qs[_0x7a56('0x4b')](_0x36fd42[_0x7a56('0x41')][_0x7a56('0x4b')]);_0xdcc0ec[_0x7a56('0x4c')]=qs['filters'](_[_0x7a56('0x4d')](_0x36fd42[_0x7a56('0x41')],_0x49c652['filters']));if(_0x36fd42[_0x7a56('0x41')][_0x7a56('0x4e')]){_0xdcc0ec[_0x7a56('0x4c')]=_[_0x7a56('0x4f')](_0xdcc0ec[_0x7a56('0x4c')],{'$or':_['map'](_0xa55cae,function(_0x45a83b){if(_0x45a83b[_0x7a56('0x50')]!==_0x7a56('0x51')){var _0x53b70c={};_0x53b70c[_0x45a83b[_0x7a56('0x39')]]={'$like':'%'+_0x36fd42[_0x7a56('0x41')]['filter']+'%'};return _0x53b70c;}})});}_0xdcc0ec=_[_0x7a56('0x4f')]({},_0xdcc0ec,_0x36fd42[_0x7a56('0x52')]);var _0x1a1998={'where':_0xdcc0ec[_0x7a56('0x4c')]};return db['ChatGroup'][_0x7a56('0x32')](_0x1a1998)[_0x7a56('0x24')](function(_0x325225){_0x30b9c5['count']=_0x325225;if(_0x36fd42[_0x7a56('0x41')]['includeAll']){_0xdcc0ec['include']=[{'all':!![]}];}return db[_0x7a56('0x53')][_0x7a56('0x54')](_0xdcc0ec);})[_0x7a56('0x24')](function(_0x1e2d9a){_0x30b9c5[_0x7a56('0x55')]=_0x1e2d9a;return _0x30b9c5;})[_0x7a56('0x24')](respondWithFilteredResult(_0x50e39f,_0xdcc0ec))['catch'](handleError(_0x50e39f,null));};exports['show']=function(_0x3b5404,_0x614ae3){var _0x497ff5={'raw':!![],'where':{'id':_0x3b5404[_0x7a56('0x56')]['id']}},_0x25964a={};_0x25964a[_0x7a56('0x3f')]=_[_0x7a56('0x42')](db[_0x7a56('0x53')][_0x7a56('0x3c')]);_0x25964a[_0x7a56('0x41')]=_['keys'](_0x3b5404[_0x7a56('0x41')]);_0x25964a[_0x7a56('0x43')]=_[_0x7a56('0x44')](_0x25964a[_0x7a56('0x3f')],_0x25964a[_0x7a56('0x41')]);_0x497ff5['attributes']=_[_0x7a56('0x44')](_0x25964a[_0x7a56('0x3f')],qs[_0x7a56('0x45')](_0x3b5404[_0x7a56('0x41')]['fields']));_0x497ff5[_0x7a56('0x46')]=_0x497ff5['attributes']['length']?_0x497ff5[_0x7a56('0x46')]:_0x25964a[_0x7a56('0x3f')];if(_0x3b5404[_0x7a56('0x41')]['includeAll']){_0x497ff5['include']=[{'all':!![]}];}_0x497ff5=_['merge']({},_0x497ff5,_0x3b5404['options']);return db[_0x7a56('0x53')]['find'](_0x497ff5)[_0x7a56('0x24')](handleEntityNotFound(_0x614ae3,null))[_0x7a56('0x24')](respondWithResult(_0x614ae3,null))[_0x7a56('0x2d')](handleError(_0x614ae3,null));};exports[_0x7a56('0x57')]=function(_0x44dfb6,_0x45d105){return db[_0x7a56('0x53')][_0x7a56('0x57')](_0x44dfb6[_0x7a56('0x58')],{})['then'](respondWithResult(_0x45d105,0xc9))[_0x7a56('0x2d')](handleError(_0x45d105,null));};exports[_0x7a56('0x59')]=function(_0x4da0ca,_0x589dd7){if(_0x4da0ca[_0x7a56('0x58')]['id']){delete _0x4da0ca[_0x7a56('0x58')]['id'];}return db[_0x7a56('0x53')][_0x7a56('0x5a')]({'where':{'id':_0x4da0ca['params']['id']}})[_0x7a56('0x24')](handleEntityNotFound(_0x589dd7,null))[_0x7a56('0x24')](saveUpdates(_0x4da0ca[_0x7a56('0x58')],null))['then'](respondWithResult(_0x589dd7,null))[_0x7a56('0x2d')](handleError(_0x589dd7,null));};exports[_0x7a56('0x5b')]=function(_0x9e7a71,_0x51b6a2){return db[_0x7a56('0x53')][_0x7a56('0x5a')]({'where':{'id':_0x9e7a71[_0x7a56('0x56')]['id']}})[_0x7a56('0x24')](handleEntityNotFound(_0x51b6a2,null))[_0x7a56('0x24')](removeEntity(_0x51b6a2,null))[_0x7a56('0x2d')](handleError(_0x51b6a2,null));};exports[_0x7a56('0x5c')]=function(_0x4451df,_0x59d0e0){return db[_0x7a56('0x53')][_0x7a56('0x5c')]()[_0x7a56('0x24')](respondWithResult(_0x59d0e0,null))[_0x7a56('0x2d')](handleError(_0x59d0e0,null));};exports[_0x7a56('0x5d')]=function(_0x34295c,_0x372265,_0x2d1aa6){return db['ChatInternalMessage'][_0x7a56('0x32')]({'where':{'ChatGroupId':_0x34295c[_0x7a56('0x56')]['id'],'ToId':_0x34295c[_0x7a56('0x5e')]['id'],'read':![]}})[_0x7a56('0x24')](function(_0x19dcc1){return{'id':_[_0x7a56('0x5f')](_0x34295c[_0x7a56('0x56')]['id']),'count':_0x19dcc1};})[_0x7a56('0x24')](respondWithResult(_0x372265,null))['catch'](handleError(_0x372265,null));};exports[_0x7a56('0x60')]=function(_0x25b05e,_0x43b061,_0x5d11fa){return db[_0x7a56('0x53')][_0x7a56('0x5a')]({'where':{'id':_0x25b05e['params']['id']}})[_0x7a56('0x24')](handleEntityNotFound(_0x43b061,null))[_0x7a56('0x24')](function(_0x59f242){if(_0x59f242){return _0x59f242['addMembers'](_0x25b05e[_0x7a56('0x58')][_0x7a56('0x61')],_['omit'](_0x25b05e['body'],['ids','id'])||{});}})[_0x7a56('0x24')](respondWithResult(_0x43b061,null))['catch'](handleError(_0x43b061,null));};exports[_0x7a56('0x62')]=function(_0x48f92b,_0x220055,_0x27f8a9){var _0x501f7a={};var _0x15daaa={};var _0xab13d;var _0x24667b;return db[_0x7a56('0x53')][_0x7a56('0x63')]({'where':{'id':_0x48f92b[_0x7a56('0x56')]['id']}})[_0x7a56('0x24')](handleEntityNotFound(_0x220055,null))[_0x7a56('0x24')](function(_0x166858){if(_0x166858){_0xab13d=_0x166858;_0x15daaa[_0x7a56('0x3f')]=_[_0x7a56('0x42')](db[_0x7a56('0x64')][_0x7a56('0x3c')]);_0x15daaa[_0x7a56('0x41')]=_[_0x7a56('0x42')](_0x48f92b[_0x7a56('0x41')]);_0x15daaa[_0x7a56('0x43')]=_['intersection'](_0x15daaa[_0x7a56('0x3f')],_0x15daaa['query']);_0x501f7a['attributes']=_['intersection'](_0x15daaa[_0x7a56('0x3f')],qs[_0x7a56('0x45')](_0x48f92b['query'][_0x7a56('0x45')]));_0x501f7a[_0x7a56('0x46')]=_0x501f7a[_0x7a56('0x46')][_0x7a56('0x47')]?_0x501f7a['attributes']:_0x15daaa[_0x7a56('0x3f')];_0x501f7a['order']=qs[_0x7a56('0x4b')](_0x48f92b[_0x7a56('0x41')][_0x7a56('0x4b')]);_0x501f7a['where']=qs[_0x7a56('0x43')](_['pick'](_0x48f92b[_0x7a56('0x41')],_0x15daaa[_0x7a56('0x43')]));if(_0x48f92b[_0x7a56('0x41')][_0x7a56('0x4e')]){_0x501f7a[_0x7a56('0x4c')]=_['merge'](_0x501f7a[_0x7a56('0x4c')],{'$or':_['map'](_0x501f7a['attributes'],function(_0x31b0cd){var _0xdcd12b={};_0xdcd12b[_0x31b0cd]={'$like':'%'+_0x48f92b[_0x7a56('0x41')][_0x7a56('0x4e')]+'%'};return _0xdcd12b;})});}_0x501f7a=_[_0x7a56('0x4f')]({},_0x501f7a,_0x48f92b['options']);return _0xab13d[_0x7a56('0x62')](_0x501f7a);}})[_0x7a56('0x24')](function(_0x3c754f){if(_0x3c754f){_0x24667b=_0x3c754f[_0x7a56('0x47')];if(!_0x48f92b[_0x7a56('0x41')][_0x7a56('0x48')](_0x7a56('0x49'))){_0x501f7a['limit']=qs['limit'](_0x48f92b[_0x7a56('0x41')]['limit']);_0x501f7a[_0x7a56('0x33')]=qs[_0x7a56('0x33')](_0x48f92b[_0x7a56('0x41')][_0x7a56('0x33')]);}return _0xab13d[_0x7a56('0x62')](_0x501f7a);}})[_0x7a56('0x24')](function(_0x2343de){if(_0x2343de){return _0x2343de?{'count':_0x24667b,'rows':_0x2343de}:null;}})[_0x7a56('0x24')](respondWithResult(_0x220055,null))[_0x7a56('0x2d')](handleError(_0x220055,null));};exports[_0x7a56('0x65')]=function(_0x21f280,_0x11177c,_0x3b9d0b){return db[_0x7a56('0x53')][_0x7a56('0x5a')]({'where':{'id':_0x21f280[_0x7a56('0x56')]['id']}})[_0x7a56('0x24')](handleEntityNotFound(_0x11177c,null))[_0x7a56('0x24')](function(_0x33093d){if(_0x33093d){return _0x33093d[_0x7a56('0x65')](_0x21f280[_0x7a56('0x41')]['ids']);}})[_0x7a56('0x24')](respondWithStatusCode(_0x11177c,null))[_0x7a56('0x2d')](handleError(_0x11177c,null));};exports[_0x7a56('0x66')]=function(_0x144e99,_0x20075f,_0x361c5d){if(_0x144e99['body']['id']){delete _0x144e99['body']['id'];}return db[_0x7a56('0x53')][_0x7a56('0x5a')]({'where':{'id':_0x144e99['params']['id']}})[_0x7a56('0x24')](handleEntityNotFound(_0x20075f,null))[_0x7a56('0x24')](function(_0x569920){if(_0x569920){_0x144e99[_0x7a56('0x58')][_0x7a56('0x67')]=_0x569920['id'];return db[_0x7a56('0x68')][_0x7a56('0x57')](_0x144e99[_0x7a56('0x58')]);}})[_0x7a56('0x24')](respondWithResult(_0x20075f,null))[_0x7a56('0x2d')](handleError(_0x20075f,null));};exports[_0x7a56('0x69')]=function(_0x4e8271,_0x1bf9f0,_0x29d2ce){var _0x400d13={};var _0x3fe5d5={};var _0x1e87c6;var _0x3dda75;return db[_0x7a56('0x53')][_0x7a56('0x63')]({'where':{'id':_0x4e8271[_0x7a56('0x56')]['id']}})[_0x7a56('0x24')](handleEntityNotFound(_0x1bf9f0,null))[_0x7a56('0x24')](function(_0x11e33b){if(_0x11e33b){_0x1e87c6=_0x11e33b;_0x3fe5d5[_0x7a56('0x3f')]=_[_0x7a56('0x42')](db[_0x7a56('0x68')][_0x7a56('0x3c')]);_0x3fe5d5[_0x7a56('0x41')]=_[_0x7a56('0x42')](_0x4e8271[_0x7a56('0x41')]);_0x3fe5d5[_0x7a56('0x43')]=_[_0x7a56('0x44')](_0x3fe5d5[_0x7a56('0x3f')],_0x3fe5d5['query']);_0x400d13[_0x7a56('0x46')]=_[_0x7a56('0x44')](_0x3fe5d5['model'],qs[_0x7a56('0x45')](_0x4e8271['query'][_0x7a56('0x45')]));_0x400d13['attributes']=_0x400d13[_0x7a56('0x46')]['length']?_0x400d13[_0x7a56('0x46')]:_0x3fe5d5[_0x7a56('0x3f')];_0x400d13[_0x7a56('0x4a')]=qs['sort'](_0x4e8271[_0x7a56('0x41')][_0x7a56('0x4b')]);_0x400d13['where']=qs['filters'](_[_0x7a56('0x4d')](_0x4e8271[_0x7a56('0x41')],_0x3fe5d5[_0x7a56('0x43')]));if(_0x4e8271[_0x7a56('0x41')][_0x7a56('0x4e')]){_0x400d13[_0x7a56('0x4c')]=_[_0x7a56('0x4f')](_0x400d13[_0x7a56('0x4c')],{'$or':_['map'](_0x400d13[_0x7a56('0x46')],function(_0x23ce28){var _0x45859b={};_0x45859b[_0x23ce28]={'$like':'%'+_0x4e8271[_0x7a56('0x41')][_0x7a56('0x4e')]+'%'};return _0x45859b;})});}if(_0x4e8271[_0x7a56('0x41')][_0x7a56('0x6a')]){var _0x2ace1e=_0x4e8271['query'][_0x7a56('0x6a')][_0x7a56('0x6b')](',');var _0x40969e={};_0x40969e[_0x2ace1e[0x0]]={'$gte':moment(_0x2ace1e[0x1])[_0x7a56('0x6c')](_0x7a56('0x6d'))};_0x400d13[_0x7a56('0x4c')]=_[_0x7a56('0x4f')](_0x400d13['where'],_0x40969e);}_0x400d13=_['merge']({},_0x400d13,_0x4e8271[_0x7a56('0x52')]);return _0x1e87c6[_0x7a56('0x69')](_0x400d13);}})[_0x7a56('0x24')](function(_0x18e6a7){if(_0x18e6a7){_0x3dda75=_0x18e6a7[_0x7a56('0x47')];if(!_0x4e8271[_0x7a56('0x41')][_0x7a56('0x48')](_0x7a56('0x49'))){_0x400d13['limit']=qs[_0x7a56('0x34')](_0x4e8271[_0x7a56('0x41')][_0x7a56('0x34')]);_0x400d13['offset']=qs[_0x7a56('0x33')](_0x4e8271[_0x7a56('0x41')]['offset']);}return _0x1e87c6[_0x7a56('0x69')](_0x400d13);}})[_0x7a56('0x24')](function(_0x23b0a9){if(_0x23b0a9){return _0x23b0a9?{'count':_0x3dda75,'rows':_0x23b0a9}:null;}})[_0x7a56('0x24')](respondWithResult(_0x1bf9f0,null))['catch'](handleError(_0x1bf9f0,null));};
\ No newline at end of file
+var _0x1a4d=['reject','save','end','stack','name','send','map','ChatGroup','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','fields','sort','filter','where','merge','options','includeAll','rows','show','length','find','create','body','params','destroy','describe','getUnread','ChatInternalMessage','toInteger','addMembers','ids','omit','getMembers','User','order','pick','hasOwnProperty','nolimit','removeMembers','findOne','$gte','YYYY-MM-DD\x20HH:mm:ss','getMessages','html-pdf','zip-dir','fast-json-patch','request-promise','moment','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./chatGroup.socket','register','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','status','json','count','offset','limit','set','Content-Range','apply'];(function(_0x77b2b3,_0x13f220){var _0x323778=function(_0x4345ea){while(--_0x4345ea){_0x77b2b3['push'](_0x77b2b3['shift']());}};_0x323778(++_0x13f220);}(_0x1a4d,0x1c1));var _0xd1a4=function(_0x316d84,_0x32e8fd){_0x316d84=_0x316d84-0x0;var _0xbeaa8a=_0x1a4d[_0x316d84];return _0xbeaa8a;};'use strict';var pdf=require(_0xd1a4('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xd1a4('0x1'));var jsonpatch=require(_0xd1a4('0x2'));var rp=require(_0xd1a4('0x3'));var moment=require(_0xd1a4('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xd1a4('0x5'));var crypto=require(_0xd1a4('0x6'));var jsforce=require(_0xd1a4('0x7'));var deskjs=require(_0xd1a4('0x8'));var toCsv=require(_0xd1a4('0x9'));var querystring=require(_0xd1a4('0xa'));var Papa=require(_0xd1a4('0xb'));var Redis=require('ioredis');var authService=require(_0xd1a4('0xc'));var qs=require(_0xd1a4('0xd'));var as=require(_0xd1a4('0xe'));var hardwareService=require(_0xd1a4('0xf'));var logger=require('../../config/logger')('api');var utils=require(_0xd1a4('0x10'));var config=require(_0xd1a4('0x11'));var db=require(_0xd1a4('0x12'))['db'];config[_0xd1a4('0x13')]=_[_0xd1a4('0x14')](config[_0xd1a4('0x13')],{'host':_0xd1a4('0x15'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd1a4('0x13')]));require(_0xd1a4('0x16'))[_0xd1a4('0x17')](socket);var jayson=require(_0xd1a4('0x18'));var client=jayson[_0xd1a4('0x19')][_0xd1a4('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x4eb303,_0x29c995,_0x4f309f){if(_0x4f309f){var _0x3f9de7=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3f9de7[_0xd1a4('0x1b')](_0x29c995)){return _0x4eb303;}else{throw new db[(_0xd1a4('0x1c'))][(_0xd1a4('0x1d'))](_0xd1a4('0x1e'));}}else{return _0x4eb303;}}function respondWithRpcPromise(_0x57c1c0,_0x41625f,_0x5cf636,_0x34b429){return new BPromise(function(_0x19f7ae,_0x5ebf4b){var _0x4c9b10=_0x34b429||client;return _0x4c9b10[_0xd1a4('0x1f')](_0x57c1c0,_0x5cf636)[_0xd1a4('0x20')](function(_0x261126){logger[_0xd1a4('0x21')](_0xd1a4('0x22'),_0x41625f,_0xd1a4('0x23'));logger['debug'](_0xd1a4('0x24'),_0x41625f,_0xd1a4('0x23'),JSON[_0xd1a4('0x25')](_0x261126));if(_0x261126[_0xd1a4('0x26')]){if(_0x261126[_0xd1a4('0x26')][_0xd1a4('0x27')]===0x1f4){logger[_0xd1a4('0x26')](_0xd1a4('0x22'),_0x41625f,_0x261126['error'][_0xd1a4('0x28')]);return _0x5ebf4b(_0x261126['error'][_0xd1a4('0x28')]);}logger[_0xd1a4('0x26')](_0xd1a4('0x22'),_0x41625f,_0x261126[_0xd1a4('0x26')]['message']);return _0x19f7ae(_0x261126['error']['message']);}else{logger[_0xd1a4('0x21')]('ChatGroup,\x20%s,\x20%s',_0x41625f,_0xd1a4('0x23'));_0x19f7ae(_0x261126['result'][_0xd1a4('0x28')]);}})[_0xd1a4('0x29')](function(_0x7adfa3){logger['error']('ChatGroup,\x20%s,\x20%s',_0x41625f,_0x7adfa3);_0x5ebf4b(_0x7adfa3);});});}function respondWithStatusCode(_0xe0eefa,_0x520d61){_0x520d61=_0x520d61||0xcc;return function(_0x23d357){if(_0x23d357){return _0xe0eefa[_0xd1a4('0x2a')](_0x520d61);}return _0xe0eefa[_0xd1a4('0x2b')](_0x520d61)['end']();};}function respondWithResult(_0x5553d9,_0x2cc589){_0x2cc589=_0x2cc589||0xc8;return function(_0x4a8327){if(_0x4a8327){return _0x5553d9['status'](_0x2cc589)[_0xd1a4('0x2c')](_0x4a8327);}};}function respondWithFilteredResult(_0x24ea8f,_0xcdf4fc){return function(_0x4e8638){if(_0x4e8638){var _0xcc1799=_0x4e8638[_0xd1a4('0x2d')],_0x505950=_0xcdf4fc[_0xd1a4('0x2e')],_0x5c1b07=_0xcdf4fc[_0xd1a4('0x2e')]+_0xcdf4fc[_0xd1a4('0x2f')],_0x20a608;if(_0x5c1b07>=_0xcc1799){_0x5c1b07=_0xcc1799;_0x20a608=0xc8;}else{_0x20a608=0xce;}_0x24ea8f[_0xd1a4('0x2b')](_0x20a608);return _0x24ea8f[_0xd1a4('0x30')](_0xd1a4('0x31'),_0x505950+'-'+_0x5c1b07+'/'+_0xcc1799)[_0xd1a4('0x2c')](_0x4e8638);}return null;};}function patchUpdates(_0x3d40f2){return function(_0x13b690){try{jsonpatch[_0xd1a4('0x32')](_0x13b690,_0x3d40f2,!![]);}catch(_0x3232f4){return BPromise[_0xd1a4('0x33')](_0x3232f4);}return _0x13b690[_0xd1a4('0x34')]();};}function saveUpdates(_0x2b85e2,_0x84b74a){return function(_0x100479){if(_0x100479){return _0x100479['update'](_0x2b85e2)[_0xd1a4('0x20')](function(_0x3295cd){return _0x3295cd;});}return null;};}function removeEntity(_0x5c7ae3,_0x28afe7){return function(_0x4fb303){if(_0x4fb303){return _0x4fb303['destroy']()[_0xd1a4('0x20')](function(){_0x5c7ae3['status'](0xcc)[_0xd1a4('0x35')]();});}};}function handleEntityNotFound(_0x3ef871,_0x16d810){return function(_0x51865d){if(!_0x51865d){_0x3ef871[_0xd1a4('0x2a')](0x194);}return _0x51865d;};}function handleError(_0x21dcc0,_0x134739){_0x134739=_0x134739||0x1f4;return function(_0x52e6ad){logger[_0xd1a4('0x26')](_0x52e6ad[_0xd1a4('0x36')]);if(_0x52e6ad[_0xd1a4('0x37')]){delete _0x52e6ad[_0xd1a4('0x37')];}_0x21dcc0[_0xd1a4('0x2b')](_0x134739)[_0xd1a4('0x38')](_0x52e6ad);};}exports['index']=function(_0x5d4d2e,_0x238b92){var _0x56d953={},_0x3dbf0d={},_0x246649={'count':0x0,'rows':[]};var _0x54e0ab=_[_0xd1a4('0x39')](db[_0xd1a4('0x3a')][_0xd1a4('0x3b')],function(_0x5e605d){return{'name':_0x5e605d[_0xd1a4('0x3c')],'type':_0x5e605d['type']['key']};});_0x3dbf0d[_0xd1a4('0x3d')]=_[_0xd1a4('0x39')](_0x54e0ab,'name');_0x3dbf0d[_0xd1a4('0x3e')]=_[_0xd1a4('0x3f')](_0x5d4d2e[_0xd1a4('0x3e')]);_0x3dbf0d[_0xd1a4('0x40')]=_[_0xd1a4('0x41')](_0x3dbf0d[_0xd1a4('0x3d')],_0x3dbf0d[_0xd1a4('0x3e')]);_0x56d953[_0xd1a4('0x42')]=_[_0xd1a4('0x41')](_0x3dbf0d[_0xd1a4('0x3d')],qs[_0xd1a4('0x43')](_0x5d4d2e[_0xd1a4('0x3e')]['fields']));_0x56d953[_0xd1a4('0x42')]=_0x56d953[_0xd1a4('0x42')]['length']?_0x56d953[_0xd1a4('0x42')]:_0x3dbf0d[_0xd1a4('0x3d')];if(!_0x5d4d2e[_0xd1a4('0x3e')]['hasOwnProperty']('nolimit')){_0x56d953[_0xd1a4('0x2f')]=qs['limit'](_0x5d4d2e['query'][_0xd1a4('0x2f')]);_0x56d953[_0xd1a4('0x2e')]=qs[_0xd1a4('0x2e')](_0x5d4d2e['query'][_0xd1a4('0x2e')]);}_0x56d953['order']=qs[_0xd1a4('0x44')](_0x5d4d2e[_0xd1a4('0x3e')]['sort']);_0x56d953['where']=qs[_0xd1a4('0x40')](_['pick'](_0x5d4d2e[_0xd1a4('0x3e')],_0x3dbf0d[_0xd1a4('0x40')]));if(_0x5d4d2e[_0xd1a4('0x3e')][_0xd1a4('0x45')]){_0x56d953[_0xd1a4('0x46')]=_[_0xd1a4('0x47')](_0x56d953[_0xd1a4('0x46')],{'$or':_['map'](_0x54e0ab,function(_0x1b1c6e){if(_0x1b1c6e['type']!=='VIRTUAL'){var _0x61d299={};_0x61d299[_0x1b1c6e[_0xd1a4('0x37')]]={'$like':'%'+_0x5d4d2e[_0xd1a4('0x3e')][_0xd1a4('0x45')]+'%'};return _0x61d299;}})});}_0x56d953=_[_0xd1a4('0x47')]({},_0x56d953,_0x5d4d2e[_0xd1a4('0x48')]);var _0x2da28d={'where':_0x56d953['where']};return db['ChatGroup'][_0xd1a4('0x2d')](_0x2da28d)[_0xd1a4('0x20')](function(_0x337685){_0x246649[_0xd1a4('0x2d')]=_0x337685;if(_0x5d4d2e[_0xd1a4('0x3e')][_0xd1a4('0x49')]){_0x56d953['include']=[{'all':!![]}];}return db[_0xd1a4('0x3a')]['findAll'](_0x56d953);})[_0xd1a4('0x20')](function(_0x57bd73){_0x246649[_0xd1a4('0x4a')]=_0x57bd73;return _0x246649;})[_0xd1a4('0x20')](respondWithFilteredResult(_0x238b92,_0x56d953))[_0xd1a4('0x29')](handleError(_0x238b92,null));};exports[_0xd1a4('0x4b')]=function(_0x4655b8,_0x5c731f){var _0x2906e1={'raw':!![],'where':{'id':_0x4655b8['params']['id']}},_0x1eb543={};_0x1eb543['model']=_['keys'](db[_0xd1a4('0x3a')]['rawAttributes']);_0x1eb543[_0xd1a4('0x3e')]=_['keys'](_0x4655b8[_0xd1a4('0x3e')]);_0x1eb543[_0xd1a4('0x40')]=_['intersection'](_0x1eb543[_0xd1a4('0x3d')],_0x1eb543[_0xd1a4('0x3e')]);_0x2906e1[_0xd1a4('0x42')]=_[_0xd1a4('0x41')](_0x1eb543[_0xd1a4('0x3d')],qs[_0xd1a4('0x43')](_0x4655b8[_0xd1a4('0x3e')]['fields']));_0x2906e1['attributes']=_0x2906e1[_0xd1a4('0x42')][_0xd1a4('0x4c')]?_0x2906e1[_0xd1a4('0x42')]:_0x1eb543[_0xd1a4('0x3d')];if(_0x4655b8[_0xd1a4('0x3e')][_0xd1a4('0x49')]){_0x2906e1['include']=[{'all':!![]}];}_0x2906e1=_[_0xd1a4('0x47')]({},_0x2906e1,_0x4655b8[_0xd1a4('0x48')]);return db[_0xd1a4('0x3a')][_0xd1a4('0x4d')](_0x2906e1)['then'](handleEntityNotFound(_0x5c731f,null))['then'](respondWithResult(_0x5c731f,null))['catch'](handleError(_0x5c731f,null));};exports[_0xd1a4('0x4e')]=function(_0x30cfd9,_0x4a0dff){return db[_0xd1a4('0x3a')][_0xd1a4('0x4e')](_0x30cfd9[_0xd1a4('0x4f')],{})['then'](respondWithResult(_0x4a0dff,0xc9))[_0xd1a4('0x29')](handleError(_0x4a0dff,null));};exports['update']=function(_0xdb82d2,_0x300ad2){if(_0xdb82d2['body']['id']){delete _0xdb82d2['body']['id'];}return db[_0xd1a4('0x3a')][_0xd1a4('0x4d')]({'where':{'id':_0xdb82d2[_0xd1a4('0x50')]['id']}})[_0xd1a4('0x20')](handleEntityNotFound(_0x300ad2,null))['then'](saveUpdates(_0xdb82d2[_0xd1a4('0x4f')],null))['then'](respondWithResult(_0x300ad2,null))[_0xd1a4('0x29')](handleError(_0x300ad2,null));};exports[_0xd1a4('0x51')]=function(_0x1017b1,_0x223349){return db[_0xd1a4('0x3a')][_0xd1a4('0x4d')]({'where':{'id':_0x1017b1['params']['id']}})['then'](handleEntityNotFound(_0x223349,null))['then'](removeEntity(_0x223349,null))[_0xd1a4('0x29')](handleError(_0x223349,null));};exports[_0xd1a4('0x52')]=function(_0x3e9c71,_0x33d434){return db[_0xd1a4('0x3a')][_0xd1a4('0x52')]()[_0xd1a4('0x20')](respondWithResult(_0x33d434,null))[_0xd1a4('0x29')](handleError(_0x33d434,null));};exports[_0xd1a4('0x53')]=function(_0x39ea46,_0x4f948f,_0x1b0e3c){return db[_0xd1a4('0x54')][_0xd1a4('0x2d')]({'where':{'ChatGroupId':_0x39ea46['params']['id'],'ToId':_0x39ea46['user']['id'],'read':![]}})[_0xd1a4('0x20')](function(_0x5ce3e7){return{'id':_[_0xd1a4('0x55')](_0x39ea46['params']['id']),'count':_0x5ce3e7};})[_0xd1a4('0x20')](respondWithResult(_0x4f948f,null))[_0xd1a4('0x29')](handleError(_0x4f948f,null));};exports[_0xd1a4('0x56')]=function(_0x1539ec,_0x149ec3,_0x491a5e){return db[_0xd1a4('0x3a')]['find']({'where':{'id':_0x1539ec[_0xd1a4('0x50')]['id']}})[_0xd1a4('0x20')](handleEntityNotFound(_0x149ec3,null))['then'](function(_0x4f7190){if(_0x4f7190){return _0x4f7190[_0xd1a4('0x56')](_0x1539ec[_0xd1a4('0x4f')][_0xd1a4('0x57')],_[_0xd1a4('0x58')](_0x1539ec[_0xd1a4('0x4f')],[_0xd1a4('0x57'),'id'])||{});}})['then'](respondWithResult(_0x149ec3,null))[_0xd1a4('0x29')](handleError(_0x149ec3,null));};exports[_0xd1a4('0x59')]=function(_0xb2d3b2,_0x25b8dc,_0x3cb9b8){var _0xd30aa8={};var _0x396c32={};var _0x5724ec;var _0x14fa5f;return db[_0xd1a4('0x3a')]['findOne']({'where':{'id':_0xb2d3b2['params']['id']}})[_0xd1a4('0x20')](handleEntityNotFound(_0x25b8dc,null))[_0xd1a4('0x20')](function(_0x550dc0){if(_0x550dc0){_0x5724ec=_0x550dc0;_0x396c32[_0xd1a4('0x3d')]=_[_0xd1a4('0x3f')](db[_0xd1a4('0x5a')][_0xd1a4('0x3b')]);_0x396c32[_0xd1a4('0x3e')]=_[_0xd1a4('0x3f')](_0xb2d3b2[_0xd1a4('0x3e')]);_0x396c32['filters']=_[_0xd1a4('0x41')](_0x396c32[_0xd1a4('0x3d')],_0x396c32[_0xd1a4('0x3e')]);_0xd30aa8[_0xd1a4('0x42')]=_[_0xd1a4('0x41')](_0x396c32[_0xd1a4('0x3d')],qs[_0xd1a4('0x43')](_0xb2d3b2[_0xd1a4('0x3e')]['fields']));_0xd30aa8[_0xd1a4('0x42')]=_0xd30aa8['attributes']['length']?_0xd30aa8['attributes']:_0x396c32['model'];_0xd30aa8[_0xd1a4('0x5b')]=qs[_0xd1a4('0x44')](_0xb2d3b2[_0xd1a4('0x3e')][_0xd1a4('0x44')]);_0xd30aa8[_0xd1a4('0x46')]=qs[_0xd1a4('0x40')](_[_0xd1a4('0x5c')](_0xb2d3b2['query'],_0x396c32[_0xd1a4('0x40')]));if(_0xb2d3b2['query'][_0xd1a4('0x45')]){_0xd30aa8[_0xd1a4('0x46')]=_[_0xd1a4('0x47')](_0xd30aa8['where'],{'$or':_[_0xd1a4('0x39')](_0xd30aa8['attributes'],function(_0x178021){var _0x13aa7d={};_0x13aa7d[_0x178021]={'$like':'%'+_0xb2d3b2[_0xd1a4('0x3e')][_0xd1a4('0x45')]+'%'};return _0x13aa7d;})});}_0xd30aa8=_[_0xd1a4('0x47')]({},_0xd30aa8,_0xb2d3b2[_0xd1a4('0x48')]);return _0x5724ec[_0xd1a4('0x59')](_0xd30aa8);}})[_0xd1a4('0x20')](function(_0x36b919){if(_0x36b919){_0x14fa5f=_0x36b919[_0xd1a4('0x4c')];if(!_0xb2d3b2[_0xd1a4('0x3e')][_0xd1a4('0x5d')](_0xd1a4('0x5e'))){_0xd30aa8['limit']=qs[_0xd1a4('0x2f')](_0xb2d3b2[_0xd1a4('0x3e')][_0xd1a4('0x2f')]);_0xd30aa8['offset']=qs[_0xd1a4('0x2e')](_0xb2d3b2[_0xd1a4('0x3e')][_0xd1a4('0x2e')]);}return _0x5724ec['getMembers'](_0xd30aa8);}})[_0xd1a4('0x20')](function(_0x17f81c){if(_0x17f81c){return _0x17f81c?{'count':_0x14fa5f,'rows':_0x17f81c}:null;}})[_0xd1a4('0x20')](respondWithResult(_0x25b8dc,null))['catch'](handleError(_0x25b8dc,null));};exports[_0xd1a4('0x5f')]=function(_0x4b3026,_0x56e5d2,_0x90212f){return db[_0xd1a4('0x3a')][_0xd1a4('0x4d')]({'where':{'id':_0x4b3026[_0xd1a4('0x50')]['id']}})[_0xd1a4('0x20')](handleEntityNotFound(_0x56e5d2,null))[_0xd1a4('0x20')](function(_0x387944){if(_0x387944){return _0x387944['removeMembers'](_0x4b3026[_0xd1a4('0x3e')][_0xd1a4('0x57')]);}})[_0xd1a4('0x20')](respondWithStatusCode(_0x56e5d2,null))['catch'](handleError(_0x56e5d2,null));};exports['addMessage']=function(_0x288e35,_0x1702e9,_0x160a43){if(_0x288e35[_0xd1a4('0x4f')]['id']){delete _0x288e35[_0xd1a4('0x4f')]['id'];}return db[_0xd1a4('0x3a')][_0xd1a4('0x4d')]({'where':{'id':_0x288e35[_0xd1a4('0x50')]['id']}})[_0xd1a4('0x20')](handleEntityNotFound(_0x1702e9,null))[_0xd1a4('0x20')](function(_0xc049db){if(_0xc049db){_0x288e35[_0xd1a4('0x4f')]['ChatGroupId']=_0xc049db['id'];return db[_0xd1a4('0x54')][_0xd1a4('0x4e')](_0x288e35[_0xd1a4('0x4f')]);}})[_0xd1a4('0x20')](respondWithResult(_0x1702e9,null))[_0xd1a4('0x29')](handleError(_0x1702e9,null));};exports['getMessages']=function(_0x1fdeb8,_0x5c322a,_0x412d37){var _0x9430b8={};var _0x15954b={};var _0x32152f;var _0x496d09;return db[_0xd1a4('0x3a')][_0xd1a4('0x60')]({'where':{'id':_0x1fdeb8[_0xd1a4('0x50')]['id']}})[_0xd1a4('0x20')](handleEntityNotFound(_0x5c322a,null))['then'](function(_0x252624){if(_0x252624){_0x32152f=_0x252624;_0x15954b[_0xd1a4('0x3d')]=_['keys'](db[_0xd1a4('0x54')][_0xd1a4('0x3b')]);_0x15954b[_0xd1a4('0x3e')]=_[_0xd1a4('0x3f')](_0x1fdeb8[_0xd1a4('0x3e')]);_0x15954b[_0xd1a4('0x40')]=_[_0xd1a4('0x41')](_0x15954b[_0xd1a4('0x3d')],_0x15954b[_0xd1a4('0x3e')]);_0x9430b8[_0xd1a4('0x42')]=_[_0xd1a4('0x41')](_0x15954b['model'],qs[_0xd1a4('0x43')](_0x1fdeb8['query'][_0xd1a4('0x43')]));_0x9430b8['attributes']=_0x9430b8['attributes'][_0xd1a4('0x4c')]?_0x9430b8[_0xd1a4('0x42')]:_0x15954b[_0xd1a4('0x3d')];_0x9430b8[_0xd1a4('0x5b')]=qs['sort'](_0x1fdeb8['query'][_0xd1a4('0x44')]);_0x9430b8[_0xd1a4('0x46')]=qs[_0xd1a4('0x40')](_[_0xd1a4('0x5c')](_0x1fdeb8[_0xd1a4('0x3e')],_0x15954b[_0xd1a4('0x40')]));if(_0x1fdeb8[_0xd1a4('0x3e')]['filter']){_0x9430b8[_0xd1a4('0x46')]=_[_0xd1a4('0x47')](_0x9430b8[_0xd1a4('0x46')],{'$or':_['map'](_0x9430b8['attributes'],function(_0x20da32){var _0x19bae2={};_0x19bae2[_0x20da32]={'$like':'%'+_0x1fdeb8['query'][_0xd1a4('0x45')]+'%'};return _0x19bae2;})});}if(_0x1fdeb8[_0xd1a4('0x3e')][_0xd1a4('0x61')]){var _0x5b1e74=_0x1fdeb8[_0xd1a4('0x3e')][_0xd1a4('0x61')]['split'](',');var _0x458539={};_0x458539[_0x5b1e74[0x0]]={'$gte':moment(_0x5b1e74[0x1])['format'](_0xd1a4('0x62'))};_0x9430b8['where']=_[_0xd1a4('0x47')](_0x9430b8[_0xd1a4('0x46')],_0x458539);}_0x9430b8=_['merge']({},_0x9430b8,_0x1fdeb8[_0xd1a4('0x48')]);return _0x32152f[_0xd1a4('0x63')](_0x9430b8);}})[_0xd1a4('0x20')](function(_0xd45b){if(_0xd45b){_0x496d09=_0xd45b[_0xd1a4('0x4c')];if(!_0x1fdeb8[_0xd1a4('0x3e')][_0xd1a4('0x5d')](_0xd1a4('0x5e'))){_0x9430b8[_0xd1a4('0x2f')]=qs['limit'](_0x1fdeb8['query'][_0xd1a4('0x2f')]);_0x9430b8[_0xd1a4('0x2e')]=qs[_0xd1a4('0x2e')](_0x1fdeb8[_0xd1a4('0x3e')][_0xd1a4('0x2e')]);}return _0x32152f[_0xd1a4('0x63')](_0x9430b8);}})[_0xd1a4('0x20')](function(_0x4bfa90){if(_0x4bfa90){return _0x4bfa90?{'count':_0x496d09,'rows':_0x4bfa90}:null;}})[_0xd1a4('0x20')](respondWithResult(_0x5c322a,null))['catch'](handleError(_0x5c322a,null));};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js
index 4183a83..2a70cfe 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 _0x5f2f=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatGroup','setMaxListeners','save','update'];(function(_0x14f330,_0x10b752){var _0x5d0058=function(_0x40da81){while(--_0x40da81){_0x14f330['push'](_0x14f330['shift']());}};_0x5d0058(++_0x10b752);}(_0x5f2f,0x73));var _0xf5f2=function(_0x72c71e,_0x3ef857){_0x72c71e=_0x72c71e-0x0;var _0x92512e=_0x5f2f[_0x72c71e];return _0x92512e;};'use strict';var EventEmitter=require(_0xf5f2('0x0'));var ChatGroup=require(_0xf5f2('0x1'))['db'][_0xf5f2('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0xf5f2('0x3')](0x0);var events={'afterCreate':_0xf5f2('0x4'),'afterUpdate':_0xf5f2('0x5'),'afterDestroy':_0xf5f2('0x6')};function emitEvent(_0x107cf){return function(_0x501fbd,_0x4854b6,_0x1665c7){ChatGroupEvents[_0xf5f2('0x7')](_0x107cf+':'+_0x501fbd['id'],_0x501fbd);ChatGroupEvents[_0xf5f2('0x7')](_0x107cf,_0x501fbd);_0x1665c7(null);};}for(var e in events){if(events[_0xf5f2('0x8')](e)){var event=events[e];ChatGroup[_0xf5f2('0x9')](e,emitEvent(event));}}module[_0xf5f2('0xa')]=ChatGroupEvents;
\ No newline at end of file
+var _0xdb28=['ChatGroup','setMaxListeners','update','remove','emit','exports','events','../../mysqldb'];(function(_0x38aa04,_0x2c8039){var _0x39bb22=function(_0x5b4e9a){while(--_0x5b4e9a){_0x38aa04['push'](_0x38aa04['shift']());}};_0x39bb22(++_0x2c8039);}(_0xdb28,0x106));var _0x8db2=function(_0x21f810,_0x2574db){_0x21f810=_0x21f810-0x0;var _0x133c0b=_0xdb28[_0x21f810];return _0x133c0b;};'use strict';var EventEmitter=require(_0x8db2('0x0'));var ChatGroup=require(_0x8db2('0x1'))['db'][_0x8db2('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x8db2('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x8db2('0x4'),'afterDestroy':_0x8db2('0x5')};function emitEvent(_0xfcf49f){return function(_0x4426fe,_0x11109e,_0x52bf99){ChatGroupEvents[_0x8db2('0x6')](_0xfcf49f+':'+_0x4426fe['id'],_0x4426fe);ChatGroupEvents[_0x8db2('0x6')](_0xfcf49f,_0x4426fe);_0x52bf99(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatGroup['hook'](e,emitEvent(event));}}module[_0x8db2('0x7')]=ChatGroupEvents;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js
index e79ab28..7125e60 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 _0x1782=['util','../../config/logger','bluebird','path','rimraf','./chatGroup.attributes','define'];(function(_0x258b04,_0x4bc597){var _0x3338b6=function(_0x69421f){while(--_0x69421f){_0x258b04['push'](_0x258b04['shift']());}};_0x3338b6(++_0x4bc597);}(_0x1782,0x188));var _0x2178=function(_0x5a1f58,_0xec180a){_0x5a1f58=_0x5a1f58-0x0;var _0x14d0fd=_0x1782[_0x5a1f58];return _0x14d0fd;};'use strict';var _=require('lodash');var util=require(_0x2178('0x0'));var logger=require(_0x2178('0x1'))('api');var moment=require('moment');var BPromise=require(_0x2178('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2178('0x3'));var rimraf=require(_0x2178('0x4'));var config=require('../../config/environment');var attributes=require(_0x2178('0x5'));module['exports']=function(_0x18664c,_0x38aa85){return _0x18664c[_0x2178('0x6')]('ChatGroup',attributes,{'tableName':'chat_groups','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x20d7=['rimraf','../../config/environment','ChatGroup','chat_groups','../../config/logger','api','moment'];(function(_0x2067e9,_0x5e6a97){var _0x280ce4=function(_0x2eca23){while(--_0x2eca23){_0x2067e9['push'](_0x2067e9['shift']());}};_0x280ce4(++_0x5e6a97);}(_0x20d7,0x146));var _0x720d=function(_0x562fb6,_0x454b7e){_0x562fb6=_0x562fb6-0x0;var _0x923e60=_0x20d7[_0x562fb6];return _0x923e60;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x720d('0x0'))(_0x720d('0x1'));var moment=require(_0x720d('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x720d('0x3'));var config=require(_0x720d('0x4'));var attributes=require('./chatGroup.attributes');module['exports']=function(_0x5904d8,_0x23379b){return _0x5904d8['define'](_0x720d('0x5'),attributes,{'tableName':_0x720d('0x6'),'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 13fb70d..cecdf47 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 _0x0f29=['../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','./chatGroup.socket','request','then','info','ChatGroup,\x20%s,\x20%s','debug','ChatGroup,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','randomstring','../../mysqldb','../../config/utils'];(function(_0x3c462c,_0x37c21f){var _0x6fe9a8=function(_0x2b0c49){while(--_0x2b0c49){_0x3c462c['push'](_0x3c462c['shift']());}};_0x6fe9a8(++_0x37c21f);}(_0x0f29,0xb8));var _0x90f2=function(_0x4e0670,_0x4caef8){_0x4e0670=_0x4e0670-0x0;var _0x449e3c=_0x0f29[_0x4e0670];return _0x449e3c;};'use strict';var _=require('lodash');var util=require(_0x90f2('0x0'));var moment=require(_0x90f2('0x1'));var BPromise=require('bluebird');var rs=require(_0x90f2('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x90f2('0x3'))['db'];var utils=require(_0x90f2('0x4'));var logger=require(_0x90f2('0x5'))(_0x90f2('0x6'));var config=require('../../config/environment');var jayson=require(_0x90f2('0x7'));var client=jayson[_0x90f2('0x8')][_0x90f2('0x9')]({'port':0x232a});config[_0x90f2('0xa')]=_[_0x90f2('0xb')](config['redis'],{'host':_0x90f2('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x90f2('0xa')]));require(_0x90f2('0xd'))['register'](socket);function respondWithRpcPromise(_0x1a644b,_0x208283,_0x54bcb0){return new BPromise(function(_0x126d15,_0x2970c5){return client[_0x90f2('0xe')](_0x1a644b,_0x54bcb0)[_0x90f2('0xf')](function(_0x13ff28){logger[_0x90f2('0x10')](_0x90f2('0x11'),_0x208283,'request\x20sent');logger[_0x90f2('0x12')](_0x90f2('0x13'),_0x208283,_0x90f2('0x14'),JSON[_0x90f2('0x15')](_0x13ff28));if(_0x13ff28[_0x90f2('0x16')]){if(_0x13ff28[_0x90f2('0x16')][_0x90f2('0x17')]===0x1f4){logger[_0x90f2('0x16')](_0x90f2('0x11'),_0x208283,_0x13ff28[_0x90f2('0x16')][_0x90f2('0x18')]);return _0x2970c5(_0x13ff28[_0x90f2('0x16')][_0x90f2('0x18')]);}logger[_0x90f2('0x16')]('ChatGroup,\x20%s,\x20%s',_0x208283,_0x13ff28['error']['message']);return _0x126d15(_0x13ff28[_0x90f2('0x16')][_0x90f2('0x18')]);}else{logger[_0x90f2('0x10')](_0x90f2('0x11'),_0x208283,_0x90f2('0x14'));_0x126d15(_0x13ff28[_0x90f2('0x19')]['message']);}})[_0x90f2('0x1a')](function(_0x1914c0){logger[_0x90f2('0x16')](_0x90f2('0x11'),_0x208283,_0x1914c0);_0x2970c5(_0x1914c0);});});}
\ No newline at end of file
+var _0xcc37=['socket.io-emitter','./chatGroup.socket','register','request','then','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults'];(function(_0x3de38d,_0x19fc4b){var _0x5c0c1d=function(_0x19da4c){while(--_0x19da4c){_0x3de38d['push'](_0x3de38d['shift']());}};_0x5c0c1d(++_0x19fc4b);}(_0xcc37,0x1ec));var _0x7cc3=function(_0x237dff,_0xa01488){_0x237dff=_0x237dff-0x0;var _0x5b60f4=_0xcc37[_0x237dff];return _0x5b60f4;};'use strict';var _=require(_0x7cc3('0x0'));var util=require(_0x7cc3('0x1'));var moment=require(_0x7cc3('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7cc3('0x3'))['db'];var utils=require(_0x7cc3('0x4'));var logger=require(_0x7cc3('0x5'))(_0x7cc3('0x6'));var config=require(_0x7cc3('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x7cc3('0x8')][_0x7cc3('0x9')]({'port':0x232a});config[_0x7cc3('0xa')]=_[_0x7cc3('0xb')](config[_0x7cc3('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x7cc3('0xc'))(new Redis(config[_0x7cc3('0xa')]));require(_0x7cc3('0xd'))[_0x7cc3('0xe')](socket);function respondWithRpcPromise(_0x4d52d2,_0x594672,_0x4c6e53){return new BPromise(function(_0xa7c5d4,_0x4b7e40){return client[_0x7cc3('0xf')](_0x4d52d2,_0x4c6e53)[_0x7cc3('0x10')](function(_0x25ce91){logger['info'](_0x7cc3('0x11'),_0x594672,_0x7cc3('0x12'));logger[_0x7cc3('0x13')](_0x7cc3('0x14'),_0x594672,_0x7cc3('0x12'),JSON[_0x7cc3('0x15')](_0x25ce91));if(_0x25ce91[_0x7cc3('0x16')]){if(_0x25ce91['error'][_0x7cc3('0x17')]===0x1f4){logger[_0x7cc3('0x16')](_0x7cc3('0x11'),_0x594672,_0x25ce91[_0x7cc3('0x16')][_0x7cc3('0x18')]);return _0x4b7e40(_0x25ce91[_0x7cc3('0x16')][_0x7cc3('0x18')]);}logger[_0x7cc3('0x16')](_0x7cc3('0x11'),_0x594672,_0x25ce91[_0x7cc3('0x16')][_0x7cc3('0x18')]);return _0xa7c5d4(_0x25ce91[_0x7cc3('0x16')][_0x7cc3('0x18')]);}else{logger[_0x7cc3('0x19')](_0x7cc3('0x11'),_0x594672,'request\x20sent');_0xa7c5d4(_0x25ce91[_0x7cc3('0x1a')][_0x7cc3('0x18')]);}})[_0x7cc3('0x1b')](function(_0x2d73e0){logger[_0x7cc3('0x16')]('ChatGroup,\x20%s,\x20%s',_0x594672,_0x2d73e0);_0x4b7e40(_0x2d73e0);});});}
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js
index f276918..59a70a6 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 _0x5259=['register','length','chatGroup:','./chatGroup.events','save','remove','removeListener'];(function(_0x40d285,_0x36b6ea){var _0x14fed8=function(_0x26ee8f){while(--_0x26ee8f){_0x40d285['push'](_0x40d285['shift']());}};_0x14fed8(++_0x36b6ea);}(_0x5259,0x1b5));var _0x9525=function(_0x1ebe08,_0x133161){_0x1ebe08=_0x1ebe08-0x0;var _0x243464=_0x5259[_0x1ebe08];return _0x243464;};'use strict';var ChatGroupEvents=require(_0x9525('0x0'));var events=[_0x9525('0x1'),_0x9525('0x2'),'update'];function createListener(_0xb67642,_0x41a023){return function(_0x2c823a){_0x41a023['emit'](_0xb67642,_0x2c823a);};}function removeListener(_0x12f328,_0x85474a){return function(){ChatGroupEvents[_0x9525('0x3')](_0x12f328,_0x85474a);};}exports[_0x9525('0x4')]=function(_0x25e7d1){for(var _0x1a0fbd=0x0,_0x2200e0=events[_0x9525('0x5')];_0x1a0fbd<_0x2200e0;_0x1a0fbd++){var _0xbb2b84=events[_0x1a0fbd];var _0x49572f=createListener(_0x9525('0x6')+_0xbb2b84,_0x25e7d1);ChatGroupEvents['on'](_0xbb2b84,_0x49572f);}};
\ No newline at end of file
+var _0x20a7=['removeListener','register','length','chatGroup:','./chatGroup.events','save','remove','update','emit'];(function(_0x2be8c2,_0x14a4b5){var _0x97f531=function(_0xcee58d){while(--_0xcee58d){_0x2be8c2['push'](_0x2be8c2['shift']());}};_0x97f531(++_0x14a4b5);}(_0x20a7,0x13f));var _0x720a=function(_0x437182,_0x2c782b){_0x437182=_0x437182-0x0;var _0x5ada93=_0x20a7[_0x437182];return _0x5ada93;};'use strict';var ChatGroupEvents=require(_0x720a('0x0'));var events=[_0x720a('0x1'),_0x720a('0x2'),_0x720a('0x3')];function createListener(_0xd4451a,_0x2b323e){return function(_0x281879){_0x2b323e[_0x720a('0x4')](_0xd4451a,_0x281879);};}function removeListener(_0x33d34f,_0x1e74a7){return function(){ChatGroupEvents[_0x720a('0x5')](_0x33d34f,_0x1e74a7);};}exports[_0x720a('0x6')]=function(_0x17e8ef){for(var _0x4ec1ae=0x0,_0x5895b2=events[_0x720a('0x7')];_0x4ec1ae<_0x5895b2;_0x4ec1ae++){var _0x2f1adc=events[_0x4ec1ae];var _0x481120=createListener(_0x720a('0x8')+_0x2f1adc,_0x17e8ef);ChatGroupEvents['on'](_0x2f1adc,_0x481120);}};
\ No newline at end of file
diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js
index bc29855..65e1e48 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 _0xa29b=['path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatGroup.controller','get','/describe','isAuthenticated','describe','/:id','show','/:id/unread','getUnread','/:id/members','getMembers','/:id/messages','getMessages','create','post','addMembers','addMessage','update','destroy','delete','removeMembers','exports','multer','util'];(function(_0x4c6fb5,_0x50c495){var _0x5c30fd=function(_0xe18228){while(--_0xe18228){_0x4c6fb5['push'](_0x4c6fb5['shift']());}};_0x5c30fd(++_0x50c495);}(_0xa29b,0x15a));var _0xba29=function(_0x39914e,_0x1ec745){_0x39914e=_0x39914e-0x0;var _0x56350b=_0xa29b[_0x39914e];return _0x56350b;};'use strict';var multer=require(_0xba29('0x0'));var util=require(_0xba29('0x1'));var path=require(_0xba29('0x2'));var timeout=require(_0xba29('0x3'));var express=require('express');var router=express['Router']();var auth=require(_0xba29('0x4'));var interaction=require(_0xba29('0x5'));var config=require(_0xba29('0x6'));var controller=require(_0xba29('0x7'));router[_0xba29('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xba29('0x8')](_0xba29('0x9'),auth[_0xba29('0xa')](),controller[_0xba29('0xb')]);router[_0xba29('0x8')](_0xba29('0xc'),auth[_0xba29('0xa')](),controller[_0xba29('0xd')]);router['get'](_0xba29('0xe'),auth['isAuthenticated'](),controller[_0xba29('0xf')]);router[_0xba29('0x8')](_0xba29('0x10'),auth[_0xba29('0xa')](),controller[_0xba29('0x11')]);router['get'](_0xba29('0x12'),auth[_0xba29('0xa')](),controller[_0xba29('0x13')]);router['post']('/',auth[_0xba29('0xa')](),controller[_0xba29('0x14')]);router[_0xba29('0x15')](_0xba29('0x10'),auth[_0xba29('0xa')](),controller[_0xba29('0x16')]);router[_0xba29('0x15')]('/:id/messages',auth[_0xba29('0xa')](),controller[_0xba29('0x17')]);router['put'](_0xba29('0xc'),auth['isAuthenticated'](),controller[_0xba29('0x18')]);router['delete'](_0xba29('0xc'),auth['isAuthenticated'](),controller[_0xba29('0x19')]);router[_0xba29('0x1a')](_0xba29('0x10'),auth[_0xba29('0xa')](),controller[_0xba29('0x1b')]);module[_0xba29('0x1c')]=router;
\ No newline at end of file
+var _0x6c49=['getMembers','getMessages','post','create','addMembers','addMessage','put','/:id','delete','destroy','removeMembers','exports','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./chatGroup.controller','isAuthenticated','index','get','/describe','show','getUnread','/:id/members'];(function(_0x5908c2,_0x23d6ef){var _0x1a09fa=function(_0x8ea4ff){while(--_0x8ea4ff){_0x5908c2['push'](_0x5908c2['shift']());}};_0x1a09fa(++_0x23d6ef);}(_0x6c49,0x144));var _0x96c4=function(_0x52bce4,_0x8c2808){_0x52bce4=_0x52bce4-0x0;var _0xe785e6=_0x6c49[_0x52bce4];return _0xe785e6;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x96c4('0x0'));var express=require('express');var router=express[_0x96c4('0x1')]();var auth=require(_0x96c4('0x2'));var interaction=require(_0x96c4('0x3'));var config=require('../../config/environment');var controller=require(_0x96c4('0x4'));router['get']('/',auth[_0x96c4('0x5')](),controller[_0x96c4('0x6')]);router[_0x96c4('0x7')](_0x96c4('0x8'),auth['isAuthenticated'](),controller['describe']);router[_0x96c4('0x7')]('/:id',auth['isAuthenticated'](),controller[_0x96c4('0x9')]);router['get']('/:id/unread',auth[_0x96c4('0x5')](),controller[_0x96c4('0xa')]);router[_0x96c4('0x7')](_0x96c4('0xb'),auth[_0x96c4('0x5')](),controller[_0x96c4('0xc')]);router[_0x96c4('0x7')]('/:id/messages',auth[_0x96c4('0x5')](),controller[_0x96c4('0xd')]);router[_0x96c4('0xe')]('/',auth[_0x96c4('0x5')](),controller[_0x96c4('0xf')]);router[_0x96c4('0xe')](_0x96c4('0xb'),auth[_0x96c4('0x5')](),controller[_0x96c4('0x10')]);router['post']('/:id/messages',auth[_0x96c4('0x5')](),controller[_0x96c4('0x11')]);router[_0x96c4('0x12')](_0x96c4('0x13'),auth['isAuthenticated'](),controller['update']);router[_0x96c4('0x14')](_0x96c4('0x13'),auth[_0x96c4('0x5')](),controller[_0x96c4('0x15')]);router[_0x96c4('0x14')](_0x96c4('0xb'),auth[_0x96c4('0x5')](),controller[_0x96c4('0x16')]);module[_0x96c4('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js
index 4d98f2d..ea4778a 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 _0x61d3=['INTEGER','star','thumb','TEXT','STRING','DATE','long','ENUM','out','sequelize','exports','BOOLEAN'];(function(_0x293178,_0x582a3b){var _0x4acca8=function(_0x293e45){while(--_0x293e45){_0x293178['push'](_0x293178['shift']());}};_0x4acca8(++_0x582a3b);}(_0x61d3,0x1e9));var _0x361d=function(_0x1a8132,_0x1d4978){_0x1a8132=_0x1a8132-0x0;var _0x5b9329=_0x61d3[_0x1a8132];return _0x5b9329;};'use strict';var Sequelize=require(_0x361d('0x0'));module[_0x361d('0x1')]={'closed':{'type':Sequelize[_0x361d('0x2')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x361d('0x3')]},'ratingType':{'type':Sequelize['ENUM'](_0x361d('0x4'),_0x361d('0x5')),'defaultValue':_0x361d('0x4')},'ratingMessage':{'type':Sequelize[_0x361d('0x6')]},'pathTranscript':{'type':Sequelize[_0x361d('0x6')]},'mailTranscript':{'type':Sequelize[_0x361d('0x7')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x361d('0x8')]},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x361d('0x7')]},'browserName':{'type':Sequelize[_0x361d('0x7')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize[_0x361d('0x7')]},'osVersion':{'type':Sequelize[_0x361d('0x7')]},'deviceModel':{'type':Sequelize[_0x361d('0x7')]},'deviceVendor':{'type':Sequelize[_0x361d('0x7')]},'deviceType':{'type':Sequelize[_0x361d('0x7')]},'referer':{'type':Sequelize[_0x361d('0x6')]},'customerIp':{'type':Sequelize[_0x361d('0x7')]},'formData':{'type':Sequelize[_0x361d('0x6')](_0x361d('0x9'))},'read1stAt':{'type':Sequelize[_0x361d('0x8')]},'lastMsgAt':{'type':Sequelize[_0x361d('0x8')]},'lastMsgDirection':{'type':Sequelize[_0x361d('0xa')]('in',_0x361d('0xb')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize['STRING']},'customerPort':{'type':Sequelize[_0x361d('0x7')]}};
\ No newline at end of file
+var _0x6fe5=['STRING','DATE','exports','BOOLEAN','INTEGER','ENUM','star','TEXT'];(function(_0x514bd1,_0x25ea3e){var _0x58a281=function(_0x25567a){while(--_0x25567a){_0x514bd1['push'](_0x514bd1['shift']());}};_0x58a281(++_0x25ea3e);}(_0x6fe5,0x1c2));var _0x56fe=function(_0x558cc8,_0x6aa803){_0x558cc8=_0x558cc8-0x0;var _0x144c0f=_0x6fe5[_0x558cc8];return _0x144c0f;};'use strict';var Sequelize=require('sequelize');module[_0x56fe('0x0')]={'closed':{'type':Sequelize[_0x56fe('0x1')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x56fe('0x2')]},'ratingType':{'type':Sequelize[_0x56fe('0x3')](_0x56fe('0x4'),'thumb'),'defaultValue':_0x56fe('0x4')},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0x56fe('0x5')]},'mailTranscript':{'type':Sequelize[_0x56fe('0x6')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x56fe('0x6')]},'note':{'type':Sequelize[_0x56fe('0x6')]},'browserName':{'type':Sequelize['STRING']},'browserVersion':{'type':Sequelize[_0x56fe('0x6')]},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize[_0x56fe('0x6')]},'deviceModel':{'type':Sequelize[_0x56fe('0x6')]},'deviceVendor':{'type':Sequelize[_0x56fe('0x6')]},'deviceType':{'type':Sequelize[_0x56fe('0x6')]},'referer':{'type':Sequelize[_0x56fe('0x5')]},'customerIp':{'type':Sequelize[_0x56fe('0x6')]},'formData':{'type':Sequelize['TEXT']('long')},'read1stAt':{'type':Sequelize['DATE']},'lastMsgAt':{'type':Sequelize[_0x56fe('0x7')]},'lastMsgDirection':{'type':Sequelize[_0x56fe('0x3')]('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x56fe('0x6')]},'customerPort':{'type':Sequelize[_0x56fe('0x6')]}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js
index 5e7881e..7c22f19 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 _0xb091=['secret','MailServerOut','Smtp','service','host','port','secure','authentication','auth','SendMail','sendMail','\x22%s\x22\x20<%s>','email','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','omit','getMessages','ChatMessage','$gte','options','getMyMessages','includeAgent','alias','includeAll','addTags','setTags','spread','Tag','findAll','color','emit','chatInteractionTags:save','removeTags','server','files','attachments','transcript-%d-%s.zip','firstName','lastName','direction','Account','get','mkdirSync','10px','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
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
',' \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\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
\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%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
\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
\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{{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
\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
\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%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
\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
','%s\x20#%d','Chat','YYYY-MM-DD','Owner','closedAt','YYYY-MM-DD\x20HH:mm:ss','osName','referer','customerIp','customerPort','N.A.','tail','existsSync','pipe','createWriteStream','out','renderFile','views','downloadInteraction.html','transcript-','.pdf','err','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','moment','util','path','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','jayson/promise','http','client','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','send','Users','map','TagIds','Tags','push','index','ChatInteraction','rawAttributes','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','select','field','from','tools_tags','u.fullname','ui.ChatInteractionId','left_join','users','u.id\x20=\x20ui.UserId','chat_interactions','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','chat_websites','a.id\x20=\x20i.ChatWebsiteId','chat_messages','me.ChatInteractionId\x20=\x20i.id','chat_interaction_has_tags','it.ChatInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','sqlOperator','conditions','find','unreadMessages','value','having','`\x20>\x200','Contact','operator','$substring','split','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','start','forEach','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','compact','isEmpty','ChatWebsiteId','i.ChatWebsiteId\x20IN\x20?','createdAt','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','filter','replace','\x27\x27\x27\x27','isNumeric','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','QueryTypes','i.id','order','DESC','t.id\x20IN\x20?','i.ChatWebsiteId\x20IS\x20NOT\x20NULL','user','getChatWebsites','i.ChatWebsiteId\x20IS\x20NULL','sequelize','count','toString','keyBy','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','i.*','c.firstName','Contact.firstName','Contact.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','ui.ChatInteractionId\x20IN\x20?','groupBy','ChatInteractionId','all','rows','show','params','include','merge','create','body','describe','customUpdate','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','Interaction\x20already\x20assigned','closed','disposition','originalname','basename','file','mimetype','Attachment','attachmentDownload','findOne','Unauthorized','download','join','root','server/files/attachments/','mailTranscript','server/files/chat/upload/','format','Messages','User','ChatWebsite','CmContact','System','%s%d','Visitor','website_alias','agentAlias','agent_alias','fullname','agent_fullname','MM/DD/YYYY\x20HH:mm:ss'];(function(_0x30e2a5,_0xd9d220){var _0x3f6e91=function(_0x584d85){while(--_0x584d85){_0x30e2a5['push'](_0x30e2a5['shift']());}};_0x3f6e91(++_0xd9d220);}(_0xb091,0x16e));var _0x1b09=function(_0x103625,_0x300f21){_0x103625=_0x103625-0x0;var _0x3ddd26=_0xb091[_0x103625];return _0x3ddd26;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x1b09('0x0'));var rimraf=require(_0x1b09('0x1'));var zipdir=require(_0x1b09('0x2'));var jsonpatch=require(_0x1b09('0x3'));var rp=require('request-promise');var moment=require(_0x1b09('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x1b09('0x5'));var path=require(_0x1b09('0x6'));var sox=require('sox');var csv=require(_0x1b09('0x7'));var ejs=require(_0x1b09('0x8'));var fs=require('fs');var _=require(_0x1b09('0x9'));var squel=require('squel');var crypto=require(_0x1b09('0xa'));var jsforce=require(_0x1b09('0xb'));var deskjs=require(_0x1b09('0xc'));var toCsv=require(_0x1b09('0x7'));var querystring=require(_0x1b09('0xd'));var Papa=require(_0x1b09('0xe'));var Redis=require(_0x1b09('0xf'));var authService=require(_0x1b09('0x10'));var qs=require(_0x1b09('0x11'));var as=require(_0x1b09('0x12'));var hardwareService=require(_0x1b09('0x13'));var logger=require('../../config/logger')(_0x1b09('0x14'));var utils=require(_0x1b09('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x1b09('0x16')]=_[_0x1b09('0x17')](config[_0x1b09('0x16')],{'host':_0x1b09('0x18'),'port':0x18eb});var socket=require(_0x1b09('0x19'))(new Redis(config[_0x1b09('0x16')]));require(_0x1b09('0x1a'))['register'](socket);var jayson=require(_0x1b09('0x1b'));var client=jayson['client'][_0x1b09('0x1c')]({'port':0x232b});var client9004=jayson[_0x1b09('0x1d')][_0x1b09('0x1c')]({'port':0x232c});function checkPasswordPattern(_0x37673e,_0x10b7eb,_0x1dc96b){if(_0x1dc96b){var _0x64689a=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x64689a[_0x1b09('0x1e')](_0x10b7eb)){return _0x37673e;}else{throw new db[(_0x1b09('0x1f'))][(_0x1b09('0x20'))](_0x1b09('0x21'));}}else{return _0x37673e;}}function respondWithRpcPromise(_0x231ef6,_0x646575,_0x4c64e1,_0x214c6b){return new BPromise(function(_0x1c1ef9,_0x5483ef){var _0x5cf855=_0x214c6b||client;return _0x5cf855[_0x1b09('0x22')](_0x231ef6,_0x4c64e1)['then'](function(_0x267b5e){logger['info'](_0x1b09('0x23'),_0x646575,_0x1b09('0x24'));logger[_0x1b09('0x25')](_0x1b09('0x26'),_0x646575,_0x1b09('0x24'),JSON[_0x1b09('0x27')](_0x267b5e));if(_0x267b5e[_0x1b09('0x28')]){if(_0x267b5e[_0x1b09('0x28')]['code']===0x1f4){logger['error'](_0x1b09('0x23'),_0x646575,_0x267b5e[_0x1b09('0x28')]['message']);return _0x5483ef(_0x267b5e[_0x1b09('0x28')][_0x1b09('0x29')]);}logger[_0x1b09('0x28')](_0x1b09('0x23'),_0x646575,_0x267b5e['error'][_0x1b09('0x29')]);return _0x1c1ef9(_0x267b5e[_0x1b09('0x28')]['message']);}else{logger[_0x1b09('0x2a')](_0x1b09('0x23'),_0x646575,'request\x20sent');_0x1c1ef9(_0x267b5e[_0x1b09('0x2b')][_0x1b09('0x29')]);}})[_0x1b09('0x2c')](function(_0x1b8aaa){logger['error'](_0x1b09('0x23'),_0x646575,_0x1b8aaa);_0x5483ef(_0x1b8aaa);});});}function respondWithStatusCode(_0x3cdbc5,_0x532589){_0x532589=_0x532589||0xcc;return function(_0x2d1ec0){if(_0x2d1ec0){return _0x3cdbc5[_0x1b09('0x2d')](_0x532589);}return _0x3cdbc5[_0x1b09('0x2e')](_0x532589)[_0x1b09('0x2f')]();};}function respondWithResult(_0x11098e,_0x1aa179){_0x1aa179=_0x1aa179||0xc8;return function(_0x34620f){if(_0x34620f){return _0x11098e['status'](_0x1aa179)[_0x1b09('0x30')](_0x34620f);}};}function respondWithFilteredResult(_0x3e6a4d,_0x4bf0ad){return function(_0x34d912){if(_0x34d912){var _0x1a6130=_0x34d912['count'],_0x1b98da=_0x4bf0ad[_0x1b09('0x31')],_0x122b1c=_0x4bf0ad['offset']+_0x4bf0ad[_0x1b09('0x32')],_0x62a96b;if(_0x122b1c>=_0x1a6130){_0x122b1c=_0x1a6130;_0x62a96b=0xc8;}else{_0x62a96b=0xce;}_0x3e6a4d['status'](_0x62a96b);return _0x3e6a4d[_0x1b09('0x33')](_0x1b09('0x34'),_0x1b98da+'-'+_0x122b1c+'/'+_0x1a6130)[_0x1b09('0x30')](_0x34d912);}return null;};}function patchUpdates(_0x2cf3cb){return function(_0x35b14c){try{jsonpatch[_0x1b09('0x35')](_0x35b14c,_0x2cf3cb,!![]);}catch(_0x46e7fc){return BPromise[_0x1b09('0x36')](_0x46e7fc);}return _0x35b14c[_0x1b09('0x37')]();};}function saveUpdates(_0x33bca2,_0x5003f8){return function(_0x267b28){if(_0x267b28){return _0x267b28[_0x1b09('0x38')](_0x33bca2)[_0x1b09('0x39')](function(_0x54c0a2){return _0x54c0a2;});}return null;};}function removeEntity(_0x4b9ada,_0x339b66){return function(_0x4662d6){if(_0x4662d6){return _0x4662d6[_0x1b09('0x3a')]()[_0x1b09('0x39')](function(){_0x4b9ada[_0x1b09('0x2e')](0xcc)[_0x1b09('0x2f')]();});}};}function handleEntityNotFound(_0x1fff0b,_0x4dc5d0){return function(_0x3f5f71){if(!_0x3f5f71){_0x1fff0b['sendStatus'](0x194);}return _0x3f5f71;};}function handleError(_0x1cd533,_0x4e6c6b){_0x4e6c6b=_0x4e6c6b||0x1f4;return function(_0x3243ee){logger[_0x1b09('0x28')](_0x3243ee[_0x1b09('0x3b')]);if(_0x3243ee[_0x1b09('0x3c')]){delete _0x3243ee[_0x1b09('0x3c')];}_0x1cd533[_0x1b09('0x2e')](_0x4e6c6b)[_0x1b09('0x3d')](_0x3243ee);};}function getInteractionUsers(_0x466502,_0x43032f){return new BPromise(function(_0x68fbfb,_0x1b7b3b){try{if(_0x43032f[_0x466502['id']]){_0x466502[_0x1b09('0x3e')]=_[_0x1b09('0x3f')](_0x43032f[_0x466502['id']],function(_0x4bd6fa){return{'id':_0x4bd6fa['id'],'fullname':_0x4bd6fa['fullname']};});}}catch(_0x23ce9a){_0x1b7b3b(_0x23ce9a);}_0x68fbfb(_0x466502);});}function getInteractionTags(_0xb2ef05,_0x27a78c){return new BPromise(function(_0x2470a0,_0x147c2b){try{if(_0xb2ef05[_0x1b09('0x40')]){_0xb2ef05[_0x1b09('0x41')]=[];_0xb2ef05[_0x1b09('0x40')]['split'](',')['forEach'](function(_0x348a49){_0xb2ef05['Tags'][_0x1b09('0x42')](_0x27a78c[_0x348a49]);});}delete _0xb2ef05[_0x1b09('0x40')];}catch(_0x1434ef){_0x147c2b(_0x1434ef);}_0x2470a0(_0xb2ef05);});}function updateChatInteraction(_0x5f2522,_0x4401ad,_0x23bdde){return new BPromise(function(_0x202b18,_0x58c7c2){return getInteractionUsers(_0x5f2522,_0x23bdde)[_0x1b09('0x39')](function(_0x6ae923){return getInteractionTags(_0x6ae923,_0x4401ad);})[_0x1b09('0x39')](function(_0xc34040){_0x202b18(_0xc34040);})['catch'](function(_0x36f814){_0x58c7c2(_0x36f814);});});}exports[_0x1b09('0x43')]=function(_0x4c0559,_0x1c7ec6){var _0xe7f4fb={},_0x4d8597={},_0x5a6722={'count':0x0,'rows':[]};var _0x4b388d=_['map'](db[_0x1b09('0x44')][_0x1b09('0x45')],function(_0x1314b8){return{'name':_0x1314b8['fieldName'],'type':_0x1314b8[_0x1b09('0x46')][_0x1b09('0x47')]};});_0x4d8597['model']=_[_0x1b09('0x3f')](_0x4b388d,_0x1b09('0x3c'));_0x4d8597[_0x1b09('0x48')]=_[_0x1b09('0x49')](_0x4c0559[_0x1b09('0x48')]);_0x4d8597[_0x1b09('0x4a')]=_[_0x1b09('0x4b')](_0x4d8597[_0x1b09('0x4c')],_0x4d8597[_0x1b09('0x48')]);_0xe7f4fb[_0x1b09('0x4d')]=_['intersection'](_0x4d8597[_0x1b09('0x4c')],qs[_0x1b09('0x4e')](_0x4c0559[_0x1b09('0x48')]['fields']));_0xe7f4fb[_0x1b09('0x4d')]=_0xe7f4fb['attributes'][_0x1b09('0x4f')]?_0xe7f4fb[_0x1b09('0x4d')]:_0x4d8597['model'];if(!_0x4c0559[_0x1b09('0x48')][_0x1b09('0x50')](_0x1b09('0x51'))){_0xe7f4fb[_0x1b09('0x32')]=qs[_0x1b09('0x32')](_0x4c0559[_0x1b09('0x48')]['limit']);_0xe7f4fb[_0x1b09('0x31')]=qs['offset'](_0x4c0559[_0x1b09('0x48')]['offset']);}_0xe7f4fb['order']=qs[_0x1b09('0x52')](_0x4c0559[_0x1b09('0x48')][_0x1b09('0x52')]);_0xe7f4fb[_0x1b09('0x53')]=qs[_0x1b09('0x4a')](_[_0x1b09('0x54')](_0x4c0559[_0x1b09('0x48')],_0x4d8597[_0x1b09('0x4a')]));var _0x5bb402=[];var _0x24028e=squel[_0x1b09('0x55')]()[_0x1b09('0x56')]('id')['field']('name')[_0x1b09('0x56')]('color')[_0x1b09('0x57')](_0x1b09('0x58'));var _0x49b051=squel[_0x1b09('0x55')]()[_0x1b09('0x56')]('u.id')[_0x1b09('0x56')](_0x1b09('0x59'))[_0x1b09('0x56')](_0x1b09('0x5a'))[_0x1b09('0x57')]('user_has_chat_interactions','ui')[_0x1b09('0x5b')](_0x1b09('0x5c'),'u',_0x1b09('0x5d'));var _0x337777=squel[_0x1b09('0x55')]()[_0x1b09('0x57')](_0x1b09('0x5e'),'i')['left_join']('cm_contacts','c',_0x1b09('0x5f'))[_0x1b09('0x5b')](_0x1b09('0x5c'),'o','o.id\x20=\x20i.UserId')[_0x1b09('0x5b')](_0x1b09('0x60'),'a',_0x1b09('0x61'))['left_join'](_0x1b09('0x62'),'me',_0x1b09('0x63'))[_0x1b09('0x5b')](_0x1b09('0x64'),'it',_0x1b09('0x65'))[_0x1b09('0x5b')](_0x1b09('0x58'),'t',_0x1b09('0x66'));var _0x4e68b3=squel[_0x1b09('0x67')]();var _0x1e618e=[];var _0x114ac3=squel[_0x1b09('0x67')]();var _0x44cae9;if(_0x4c0559[_0x1b09('0x48')]['search']){_0x44cae9=as['parseSearch'](_0x4c0559[_0x1b09('0x48')]['search']);var _0x315fe3=_0x44cae9[_0x1b09('0x68')];for(var _0x246134=0x0;_0x246134<_0x44cae9['conditions']['length'];_0x246134++){var _0x2cb7ba=_0x44cae9[_0x1b09('0x69')][_0x246134];var _0x5ad730='i';var _0xbaf193=_[_0x1b09('0x6a')](_0x4b388d,[_0x1b09('0x3c'),_0x2cb7ba[_0x1b09('0x56')]]);if(!_0xbaf193){switch(_0x2cb7ba[_0x1b09('0x56')]){case _0x1b09('0x6b'):if(_0x2cb7ba[_0x1b09('0x6c')]==0x1){_0x337777['having']('`'+_0x2cb7ba[_0x1b09('0x56')]+'`\x20=\x200');}else{_0x337777[_0x1b09('0x6d')]('`'+_0x2cb7ba[_0x1b09('0x56')]+_0x1b09('0x6e'));}break;case _0x1b09('0x6f'):if(_0x2cb7ba[_0x1b09('0x70')]===_0x1b09('0x71')){if(_0x2cb7ba[_0x1b09('0x6c')][_0x1b09('0x72')]('\x20')[_0x1b09('0x4f')]>0x1){_0x4e68b3[_0x315fe3](_0x1b09('0x73'),qs[_0x1b09('0x74')](_0x2cb7ba[_0x1b09('0x6c')]),null);}else{var _0x517e2d='%'+_0x2cb7ba['value']+'%';_0x4e68b3[_0x315fe3](_0x1b09('0x75'),_0x517e2d,_0x517e2d,_0x517e2d);}}else{_0xbaf193=_[_0x1b09('0x6a')](_0x4b388d,[_0x1b09('0x3c'),'ContactId']);_0x2cb7ba[_0x1b09('0x56')]=_0x1b09('0x76');_0x130fdf=as[_0x1b09('0x77')](_0x5ad730,_0xbaf193['type'],_0x2cb7ba);_0x4e68b3[_0x315fe3](_0x130fdf[_0x1b09('0x78')],_0x130fdf[_0x1b09('0x6c')][_0x1b09('0x79')],_0x130fdf['value'][_0x1b09('0x2f')]);}break;case'Tag':var _0x5c71dc=_0x2cb7ba[_0x1b09('0x6c')][_0x1b09('0x72')](',')[_0x1b09('0x3f')](function(_0x527f4e){return Number(_0x527f4e);});_0x5c71dc[_0x1b09('0x7a')](function(_0x49ec3f){_0x114ac3['or'](_0x1b09('0x7b'),'%,'+_0x49ec3f+',%');});_0x1e618e=_[_0x1b09('0x7c')](_0x1e618e,_0x5c71dc);break;case'User':if(_0x2cb7ba[_0x1b09('0x70')]==='$substring'){_0x4e68b3[_0x315fe3](_0x1b09('0x7d'),'%'+_0x2cb7ba[_0x1b09('0x6c')]+'%',null);}else{_0xbaf193=_['find'](_0x4b388d,[_0x1b09('0x3c'),_0x1b09('0x7e')]);_0x2cb7ba[_0x1b09('0x56')]=_0x1b09('0x7e');_0x130fdf=as[_0x1b09('0x77')](_0x5ad730,_0xbaf193[_0x1b09('0x46')],_0x2cb7ba);_0x4e68b3[_0x315fe3](_0x130fdf[_0x1b09('0x78')],_0x130fdf['value'][_0x1b09('0x79')],_0x130fdf[_0x1b09('0x6c')][_0x1b09('0x2f')]);}break;case'body':_0x130fdf=as[_0x1b09('0x77')]('me',null,_0x2cb7ba);_0x4e68b3[_0x315fe3](_0x130fdf[_0x1b09('0x78')],_0x130fdf[_0x1b09('0x6c')][_0x1b09('0x79')],_0x130fdf[_0x1b09('0x6c')]['end']);break;}}else{var _0x130fdf=as['buildExpression'](_0x5ad730,_0xbaf193[_0x1b09('0x46')],_0x2cb7ba);_0x4e68b3[_0x315fe3](_0x130fdf[_0x1b09('0x78')],_0x130fdf[_0x1b09('0x6c')][_0x1b09('0x79')],_0x130fdf[_0x1b09('0x6c')][_0x1b09('0x2f')]);}}}else{var _0x773d57=_(_0x4c0559[_0x1b09('0x48')])['keys']()[_0x1b09('0x3f')](function(_0x3be129){return _['some'](_0x4b388d,[_0x1b09('0x3c'),_0x3be129])?_0x3be129:undefined;})[_0x1b09('0x7f')]()[_0x1b09('0x6c')]();if(!_[_0x1b09('0x80')](_0x773d57)){_0x773d57[_0x1b09('0x7a')](function(_0xe6d81b){if(_0xe6d81b===_0x1b09('0x81')){_0x337777[_0x1b09('0x53')](_0x1b09('0x82'),[]['concat'](_0x4c0559[_0x1b09('0x48')][_0xe6d81b]));}else if(_0xe6d81b===_0x1b09('0x83')){var _0x127312=JSON[_0x1b09('0x84')](_0x4c0559[_0x1b09('0x48')][_0xe6d81b])['$gte'];var _0x42b71e=JSON[_0x1b09('0x84')](_0x4c0559['query'][_0xe6d81b])[_0x1b09('0x85')];_0x337777['where'](_0x1b09('0x86'),_0x127312,_0x42b71e);}else{if(_0x4c0559[_0x1b09('0x48')][_0xe6d81b]===_0x1b09('0x87')){_0x337777['where']('i.'+_0xe6d81b+'\x20IS\x20NULL');}else{_0x337777['where']('i.'+_0xe6d81b+_0x1b09('0x88'),_0x4c0559[_0x1b09('0x48')][_0xe6d81b]);}}});}if(_0x4c0559[_0x1b09('0x48')][_0x1b09('0x89')]){if(_0x4c0559[_0x1b09('0x48')][_0x1b09('0x89')]==0x1){_0x337777[_0x1b09('0x6d')](_0x1b09('0x8a'));}else{_0x337777[_0x1b09('0x6d')](_0x1b09('0x8b'));}}if(_0x4c0559[_0x1b09('0x48')][_0x1b09('0x8c')]){_0x1e618e=_['isArray'](_0x4c0559['query'][_0x1b09('0x8c')])?_0x4c0559[_0x1b09('0x48')][_0x1b09('0x8c')]:new Array(_0x4c0559[_0x1b09('0x48')][_0x1b09('0x8c')]);_0x1e618e[_0x1b09('0x7a')](function(_0x162de1){_0x114ac3['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x162de1+',%');});}if(_0x4c0559[_0x1b09('0x48')][_0x1b09('0x8d')]){var _0x2b2220=_0x4c0559['query'][_0x1b09('0x8d')][_0x1b09('0x8e')]('\x5c','\x5c\x5c')[_0x1b09('0x8e')]('\x27\x27',_0x1b09('0x8f'));if(qs[_0x1b09('0x90')](_0x2b2220)){_0x4e68b3['or']('i.id\x20LIKE\x20?',_0x2b2220+'%');}else{_0x4e68b3['or']('MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0x1b09('0x74')](_0x2b2220))['or'](_0x1b09('0x91'),_0x2b2220+'%');}}}_0x337777['where'](_0x4e68b3);_0x337777[_0x1b09('0x92')]('i.id');var _0x3b66fc={'type':db[_0x1b09('0x1f')][_0x1b09('0x93')]['SELECT'],'raw':!![]};var _0x14f277=_0x337777['clone']();_0x14f277['field'](_0x1b09('0x94'));_0x14f277['field']('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages');if(_0xe7f4fb[_0x1b09('0x95')]){_0xe7f4fb[_0x1b09('0x95')][_0x1b09('0x7a')](function(_0x10e88c){_0x337777['order']('i.'+_0x10e88c[0x0],_0x10e88c[0x1]===_0x1b09('0x96')?![]:!![]);});}if(!_[_0x1b09('0x80')](_0x1e618e)){_0x337777[_0x1b09('0x6d')](_0x114ac3);_0x14f277[_0x1b09('0x53')](_0x1b09('0x97'),_0x1e618e);}BPromise['resolve']()[_0x1b09('0x39')](function(){if(!_0x44cae9){if(_0x4c0559[_0x1b09('0x48')][_0x1b09('0x81')]||_0x4c0559[_0x1b09('0x48')]['journey'])return;_0x14f277['where']('i.ChatWebsiteId\x20IS\x20NOT\x20NULL');_0x337777[_0x1b09('0x53')](_0x1b09('0x98'));return;}return _0x4c0559[_0x1b09('0x99')][_0x1b09('0x9a')]({'attributes':['id'],'raw':!![]})[_0x1b09('0x39')](function(_0x37ff4f){if(_['isEmpty'](_0x37ff4f)){_0x14f277[_0x1b09('0x53')](_0x1b09('0x9b'));_0x337777['where']('i.ChatWebsiteId\x20IS\x20NULL');}else{_0x14f277[_0x1b09('0x53')](_0x1b09('0x82'),_[_0x1b09('0x3f')](_0x37ff4f,'id'));_0x337777['where']('i.ChatWebsiteId\x20IN\x20?',_[_0x1b09('0x3f')](_0x37ff4f,'id'));}});})['then'](function(){db[_0x1b09('0x9c')]['query'](_0x14f277['toString'](),_0x3b66fc)[_0x1b09('0x39')](function(_0xbd17f8){_0x5a6722[_0x1b09('0x9d')]=_0xbd17f8['length'];if(_0x5a6722[_0x1b09('0x9d')]===0x0)return[];return db[_0x1b09('0x9c')][_0x1b09('0x48')](_0x24028e[_0x1b09('0x9e')](),_0x3b66fc)[_0x1b09('0x39')](function(_0x315303){_0x5bb402=_[_0x1b09('0x9f')](_0x315303,'id');_0x3b66fc=_['merge'](_0x3b66fc,{'model':db[_0x1b09('0x44')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x4c0559['query'][_0x1b09('0x4e')]){_0xe7f4fb[_0x1b09('0x4d')]['forEach'](function(_0x20b050){_0x337777[_0x1b09('0x56')]('i.'+_0x20b050);});}else{_0x337777['field']('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x1b09('0x6b'));_0x337777[_0x1b09('0x56')](_0x1b09('0xa0'),_0x1b09('0xa1'));_0x337777[_0x1b09('0x56')](_0x1b09('0xa2'),_0x1b09('0xa3'));_0x337777[_0x1b09('0x56')](_0x1b09('0xa4'));_0x337777[_0x1b09('0x56')](_0x1b09('0xa5'),_0x1b09('0xa6'));_0x337777[_0x1b09('0x56')]('c.lastName',_0x1b09('0xa7'));_0x337777[_0x1b09('0x56')](_0x1b09('0xa8'),_0x1b09('0xa9'));_0x337777[_0x1b09('0x56')](_0x1b09('0xaa'),_0x1b09('0xab'));_0x337777[_0x1b09('0x56')](_0x1b09('0xac'),_0x1b09('0xad'));_0x337777[_0x1b09('0x56')](_0x1b09('0xae'),_0x1b09('0xaf'));_0x337777[_0x1b09('0x56')](_0x1b09('0xb0'),_0x1b09('0xb1'));_0x337777['field']('o.internal','Owner.internal');_0x337777['field']('GROUP_CONCAT(DISTINCT\x20t.id)',_0x1b09('0x40'));}_0x337777[_0x1b09('0x32')](_0xe7f4fb['limit']);_0x337777['offset'](_0xe7f4fb[_0x1b09('0x31')]);return db[_0x1b09('0x9c')][_0x1b09('0x48')](_0x337777[_0x1b09('0x9e')](),_0x3b66fc);})[_0x1b09('0x39')](function(_0x30f9cf){_0x49b051[_0x1b09('0x53')](_0x1b09('0xb2'),_[_0x1b09('0x3f')](_0x30f9cf,'id'));return db['sequelize'][_0x1b09('0x48')](_0x49b051[_0x1b09('0x9e')](),_0x3b66fc)[_0x1b09('0x39')](function(_0x4ac229){var _0x30313e=_[_0x1b09('0xb3')](_0x4ac229,_0x1b09('0xb4'));var _0x294866=[];_0x30f9cf[_0x1b09('0x7a')](function(_0xefb0c2){_0x294866[_0x1b09('0x42')](updateChatInteraction(_0xefb0c2,_0x5bb402,_0x30313e));});return BPromise[_0x1b09('0xb5')](_0x294866);});});})['then'](function(_0x57571b){_0x5a6722[_0x1b09('0xb6')]=_0x57571b;return _0x5a6722;})['then'](respondWithFilteredResult(_0x1c7ec6,_0xe7f4fb));})['catch'](handleError(_0x1c7ec6,null));};exports[_0x1b09('0xb7')]=function(_0x1f96ef,_0x436f51){var _0x166415={'raw':![],'where':{'id':_0x1f96ef[_0x1b09('0xb8')]['id']}},_0x913569={};_0x913569['model']=_[_0x1b09('0x49')](db['ChatInteraction'][_0x1b09('0x45')]);_0x913569[_0x1b09('0x48')]=_[_0x1b09('0x49')](_0x1f96ef[_0x1b09('0x48')]);_0x913569[_0x1b09('0x4a')]=_['intersection'](_0x913569[_0x1b09('0x4c')],_0x913569['query']);_0x166415[_0x1b09('0x4d')]=_[_0x1b09('0x4b')](_0x913569['model'],qs['fields'](_0x1f96ef[_0x1b09('0x48')]['fields']));_0x166415[_0x1b09('0x4d')]=_0x166415[_0x1b09('0x4d')]['length']?_0x166415[_0x1b09('0x4d')]:_0x913569[_0x1b09('0x4c')];if(_0x1f96ef[_0x1b09('0x48')]['includeAll']){_0x166415[_0x1b09('0xb9')]=[{'all':!![]}];}_0x166415=_[_0x1b09('0xba')]({},_0x166415,_0x1f96ef['options']);return db[_0x1b09('0x44')][_0x1b09('0x6a')](_0x166415)['then'](handleEntityNotFound(_0x436f51,null))[_0x1b09('0x39')](respondWithResult(_0x436f51,null))[_0x1b09('0x2c')](handleError(_0x436f51,null));};exports[_0x1b09('0xbb')]=function(_0x23bbe5,_0x54eb72){return db['ChatInteraction'][_0x1b09('0xbb')](_0x23bbe5[_0x1b09('0xbc')],{})['then'](respondWithResult(_0x54eb72,0xc9))[_0x1b09('0x2c')](handleError(_0x54eb72,null));};exports[_0x1b09('0x38')]=function(_0x25b144,_0x1f3804){if(_0x25b144[_0x1b09('0xbc')]['id']){delete _0x25b144['body']['id'];}return db[_0x1b09('0x44')][_0x1b09('0x6a')]({'where':{'id':_0x25b144[_0x1b09('0xb8')]['id']}})['then'](handleEntityNotFound(_0x1f3804,null))[_0x1b09('0x39')](saveUpdates(_0x25b144[_0x1b09('0xbc')],null))['then'](respondWithResult(_0x1f3804,null))[_0x1b09('0x2c')](handleError(_0x1f3804,null));};exports[_0x1b09('0x3a')]=function(_0x4f8169,_0x440a95){return db[_0x1b09('0x44')][_0x1b09('0x6a')]({'where':{'id':_0x4f8169['params']['id']}})['then'](handleEntityNotFound(_0x440a95,null))[_0x1b09('0x39')](removeEntity(_0x440a95,null))[_0x1b09('0x2c')](handleError(_0x440a95,null));};exports[_0x1b09('0xbd')]=function(_0x3381a8,_0x4eb919){return db[_0x1b09('0x44')]['describe']()[_0x1b09('0x39')](respondWithResult(_0x4eb919,null))['catch'](handleError(_0x4eb919,null));};exports[_0x1b09('0xbe')]=function(_0x3e14ca,_0x1c984c){if(_0x3e14ca[_0x1b09('0xbc')]['id']){delete _0x3e14ca[_0x1b09('0xbc')]['id'];}return db['ChatInteraction'][_0x1b09('0x6a')]({'where':{'id':_0x3e14ca[_0x1b09('0xb8')]['id']}})['then'](handleEntityNotFound(_0x1c984c,null))[_0x1b09('0x39')](saveUpdates(_0x3e14ca['body'],null))['then'](respondWithResult(_0x1c984c,null))['catch'](handleError(_0x1c984c,null));};exports[_0x1b09('0xbf')]=function(_0x4fdb8d,_0x54a668,_0x2bb596){if(_0x4fdb8d[_0x1b09('0xbc')]['id']){delete _0x4fdb8d[_0x1b09('0xbc')]['id'];}return db[_0x1b09('0x44')][_0x1b09('0x6a')]({'where':{'id':_0x4fdb8d[_0x1b09('0xb8')]['id']}})[_0x1b09('0x39')](function(_0x27d96a){if(!_0x27d96a){logger[_0x1b09('0x28')](_0x1b09('0xc0'),_0x1b09('0xbf'),0x194,'entity\x20not\x20found');_0x54a668[_0x1b09('0x2d')](0x194);}else{if(_0x27d96a[_0x1b09('0x7e')]){throw new db[(_0x1b09('0x1f'))][(_0x1b09('0x20'))](_0x1b09('0xc1'));}}return _0x27d96a;})[_0x1b09('0x39')](function(_0x54c79a){if(_0x54c79a){return _0x54c79a[_0x1b09('0x38')]({'closed':_0x4fdb8d[_0x1b09('0xbc')][_0x1b09('0xc2')],'disposition':_0x4fdb8d[_0x1b09('0xbc')][_0x1b09('0xc3')]})['then'](function(_0x408599){return _0x408599;});}})[_0x1b09('0x39')](function(_0x24d85d){return respondWithRpcPromise('AbandonInteraction','abandon',_0x4fdb8d[_0x1b09('0xbc')],client9004);})[_0x1b09('0x39')](respondWithResult(_0x54a668,null))['catch'](handleError(_0x54a668,null));};exports['attachmentUpload']=function(_0x13733e,_0x2a46df,_0x2d7b0b){_0x13733e[_0x1b09('0xbc')][_0x1b09('0x3c')]=_0x13733e['file'][_0x1b09('0xc4')];_0x13733e[_0x1b09('0xbc')][_0x1b09('0xc5')]=_0x13733e['file']['filename'];_0x13733e[_0x1b09('0xbc')][_0x1b09('0x46')]=_0x13733e[_0x1b09('0xc6')][_0x1b09('0xc7')];return db[_0x1b09('0xc8')][_0x1b09('0xbb')](_0x13733e[_0x1b09('0xbc')])[_0x1b09('0x39')](respondWithResult(_0x2a46df,0xc9))['catch'](handleError(_0x2a46df,null));};exports[_0x1b09('0xc9')]=function(_0x21da39,_0x12e8e7,_0x295bd6){return db[_0x1b09('0x44')][_0x1b09('0xca')]({'where':{'id':_0x21da39[_0x1b09('0xb8')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x12e8e7,null))[_0x1b09('0x39')](function(_0x3f632a){if(_0x3f632a){if(_0x3f632a[_0x1b09('0xc2')]){return _0x12e8e7[_0x1b09('0x2e')](0x193)[_0x1b09('0x30')]({'status':0x193,'message':_0x1b09('0xcb')});}return db['Attachment'][_0x1b09('0xca')]({'where':{'id':_0x21da39['query']['attachId']},'raw':!![]})[_0x1b09('0x39')](handleEntityNotFound(_0x12e8e7,null));}})[_0x1b09('0x39')](function(_0x583974){if(_0x583974){return _0x12e8e7[_0x1b09('0xcc')](path[_0x1b09('0xcd')](config[_0x1b09('0xce')],_0x1b09('0xcf'),_0x583974[_0x1b09('0xc5')]));}})[_0x1b09('0x2c')](handleError(_0x12e8e7,null));};exports['close']=function(_0x94dbd5,_0x435899){var _0x54c344=null;var _0x458915=null;var _0x1804b1=null;var _0x24e4f6=null;if(_0x94dbd5[_0x1b09('0xbc')]['id']){delete _0x94dbd5[_0x1b09('0xbc')]['id'];}if(_0x94dbd5[_0x1b09('0xbc')][_0x1b09('0xd0')]){_0x24e4f6=path['join'](config[_0x1b09('0xce')],_0x1b09('0xd1'),util[_0x1b09('0xd2')]('transcript-%s.txt',Date['now']()));_0x94dbd5[_0x1b09('0xbc')]['pathTranscript']=_0x24e4f6;}return db[_0x1b09('0x44')][_0x1b09('0x6a')]({'where':{'id':_0x94dbd5[_0x1b09('0xb8')]['id']},'include':[{'model':db['ChatMessage'],'as':_0x1b09('0xd3'),'include':[{'model':db['User'],'as':_0x1b09('0xd4')}]}]})[_0x1b09('0x39')](handleEntityNotFound(_0x435899,null))['then'](saveUpdates(_0x94dbd5[_0x1b09('0xbc')],null))[_0x1b09('0x39')](function(_0x7a7e27){if(_0x7a7e27){_0x54c344=_0x7a7e27;return db[_0x1b09('0xd5')][_0x1b09('0x6a')]({'where':{'id':_0x54c344[_0x1b09('0x81')]}});}})[_0x1b09('0x39')](function(_0x5ee080){if(_0x5ee080){_0x1804b1=_0x5ee080;return db[_0x1b09('0xd6')][_0x1b09('0x6a')]({'where':{'id':_0x54c344[_0x1b09('0x76')]}});}})['then'](function(_0x4ce62b){if(_0x4ce62b){_0x458915=_0x4ce62b;if(_0x24e4f6){var _0x44363f=null;for(var _0x1765ba=0x1;_0x1765ba<_0x54c344[_0x1b09('0xd3')][_0x1b09('0x4f')];++_0x1765ba){_0x44363f=_0x54c344[_0x1b09('0xd3')][_0x1765ba];var _0x85fe31=_0x44363f[_0x1b09('0x7e')]?util[_0x1b09('0xd2')]('%s%d',_0x1804b1['agentAlias'],_0x44363f[_0x1b09('0x7e')]):_0x1b09('0xd7');var _0x2ceb98=_0x94dbd5['body']['customer']||util[_0x1b09('0xd2')](_0x1b09('0xd8'),_0x1b09('0xd9'),_0x44363f[_0x1b09('0x76')]);switch(_0x1804b1['agentIdentifier']){case _0x1b09('0xda'):_0x85fe31=_0x44363f['UserId']?util[_0x1b09('0xd2')]('%s%d',_0x1804b1[_0x1b09('0xdb')],_0x44363f[_0x1b09('0x7e')]):_0x1b09('0xd7');break;case _0x1b09('0xdc'):_0x85fe31=_0x44363f[_0x1b09('0x7e')]?_0x44363f[_0x1b09('0xd4')]['alias']||_0x44363f['User'][_0x1b09('0xdd')]:'System';break;case _0x1b09('0xde'):_0x85fe31=_0x44363f[_0x1b09('0x7e')]?_0x44363f[_0x1b09('0xd4')]['fullname']:_0x1b09('0xd7');break;default:_0x85fe31=_0x44363f[_0x1b09('0x7e')]?util[_0x1b09('0xd2')](_0x1b09('0xd8'),_0x1804b1['agentAlias'],_0x44363f[_0x1b09('0x7e')]):_0x1b09('0xd7');}var _0x4ecf9f=util[_0x1b09('0xd2')]('[%s]\x20%s:\x20%s\x0a',moment(_0x44363f[_0x1b09('0x83')])[_0x1b09('0xd2')](_0x1b09('0xdf')),_0x44363f['direction']==='in'?_0x2ceb98:_0x85fe31,_0x44363f[_0x1b09('0xbc')]);if(!_0x44363f[_0x1b09('0xe0')]){fs['appendFileSync'](_0x24e4f6,_0x4ecf9f);}}return db['MailAccount'][_0x1b09('0xca')]({'where':{'service':!![]},'include':[{'model':db[_0x1b09('0xe1')],'as':_0x1b09('0xe2'),'raw':!![]}]});}}})[_0x1b09('0x39')](function(_0xc3de15){if(_0xc3de15&&_0xc3de15[_0x1b09('0xe2')]&&_0x94dbd5[_0x1b09('0xbc')]){var _0x46b9d1={'tls':{'rejectUnauthorized':![]}};if(_0xc3de15[_0x1b09('0xe2')]['service']){_0x46b9d1[_0x1b09('0xe3')]=_0xc3de15['Smtp'][_0x1b09('0xe3')];}else{_0x46b9d1[_0x1b09('0xe4')]=_0xc3de15[_0x1b09('0xe2')][_0x1b09('0xe4')];_0x46b9d1[_0x1b09('0xe5')]=_0xc3de15[_0x1b09('0xe2')][_0x1b09('0xe5')];_0x46b9d1[_0x1b09('0xe6')]=_0xc3de15[_0x1b09('0xe2')][_0x1b09('0xe6')];}if(_0xc3de15['Smtp'][_0x1b09('0xe7')]){_0x46b9d1[_0x1b09('0xe8')]={'user':_0xc3de15[_0x1b09('0xe2')][_0x1b09('0x99')],'pass':_0xc3de15[_0x1b09('0xe2')]['pass']};}return respondWithRpcPromise(_0x1b09('0xe9'),_0x1b09('0xea'),{'account':_0x46b9d1,'message':{'from':util[_0x1b09('0xd2')](_0x1b09('0xeb'),_0xc3de15[_0x1b09('0x3c')],_0xc3de15[_0x1b09('0xec')]||_0xc3de15[_0x1b09('0xe2')][_0x1b09('0x99')]),'to':_0x94dbd5['body'][_0x1b09('0xd0')],'subject':'Mail\x20Transcript','text':util[_0x1b09('0xd2')](_0x1b09('0xed'),_0x94dbd5[_0x1b09('0xbc')]['mailTranscript']),'attachments':[{'path':_0x24e4f6}]}})[_0x1b09('0x39')](function(){return _0x54c344;})[_0x1b09('0x2c')](function(_0x30e416){console['error'](_0x30e416);});}else{return _0x54c344;}})[_0x1b09('0x39')](respondWithStatusCode(_0x435899,0xc8))[_0x1b09('0x2c')](handleError(_0x435899,null));};exports[_0x1b09('0xee')]=function(_0x56d55e,_0x2ab791,_0x5bded2){return db['ChatMessage'][_0x1b09('0x6a')]({'where':{'id':_0x56d55e[_0x1b09('0xb8')]['id']}})[_0x1b09('0x39')](handleEntityNotFound(_0x2ab791,null))[_0x1b09('0x39')](function(_0x56a45e){if(_0x56a45e){return _0x56a45e[_0x1b09('0xee')](_0x56d55e[_0x1b09('0xbc')][_0x1b09('0xef')],_[_0x1b09('0xf0')](_0x56d55e[_0x1b09('0xbc')],[_0x1b09('0xef'),'id'])||{});}})[_0x1b09('0x39')](respondWithResult(_0x2ab791,null))['catch'](handleError(_0x2ab791,null));};exports[_0x1b09('0xf1')]=function(_0x2b0fc4,_0x113cbe,_0x32ba7a){var _0x451a67={'raw':![],'where':{}};var _0x277266={};var _0x4c72c3={'count':0x0,'rows':[]};return db[_0x1b09('0x44')]['findOne']({'where':{'id':_0x2b0fc4[_0x1b09('0xb8')]['id']}})['then'](handleEntityNotFound(_0x113cbe,null))[_0x1b09('0x39')](function(_0x4a838a){if(_0x4a838a){_0x277266[_0x1b09('0x4c')]=_[_0x1b09('0x49')](db[_0x1b09('0xf2')][_0x1b09('0x45')]);_0x277266[_0x1b09('0x48')]=_['keys'](_0x2b0fc4[_0x1b09('0x48')]);_0x277266[_0x1b09('0x4a')]=_[_0x1b09('0x4b')](_0x277266[_0x1b09('0x4c')],_0x277266[_0x1b09('0x48')]);_0x451a67[_0x1b09('0x4d')]=_[_0x1b09('0x4b')](_0x277266['model'],qs[_0x1b09('0x4e')](_0x2b0fc4[_0x1b09('0x48')][_0x1b09('0x4e')]));_0x451a67[_0x1b09('0x4d')]=_0x451a67[_0x1b09('0x4d')][_0x1b09('0x4f')]?_0x451a67[_0x1b09('0x4d')]:_0x277266['model'];if(!_0x2b0fc4[_0x1b09('0x48')][_0x1b09('0x50')](_0x1b09('0x51'))){_0x451a67[_0x1b09('0x32')]=qs[_0x1b09('0x32')](_0x2b0fc4[_0x1b09('0x48')]['limit']);_0x451a67[_0x1b09('0x31')]=qs['offset'](_0x2b0fc4[_0x1b09('0x48')][_0x1b09('0x31')]);}_0x451a67[_0x1b09('0x95')]=qs['sort'](_0x2b0fc4[_0x1b09('0x48')][_0x1b09('0x52')]);_0x451a67['where']=qs[_0x1b09('0x4a')](_[_0x1b09('0x54')](_0x2b0fc4[_0x1b09('0x48')],_0x277266[_0x1b09('0x4a')]));_0x451a67[_0x1b09('0x53')][_0x1b09('0xb4')]=_0x4a838a['id'];if(_0x2b0fc4['query'][_0x1b09('0x8d')]){_0x451a67[_0x1b09('0x53')]=_[_0x1b09('0xba')](_0x451a67['where'],{'$or':_[_0x1b09('0x3f')](_0x451a67[_0x1b09('0x4d')],function(_0x312fbf){var _0x20ed61={};_0x20ed61[_0x312fbf]={'$like':'%'+_0x2b0fc4['query'][_0x1b09('0x8d')]+'%'};return _0x20ed61;})});}if(_0x2b0fc4[_0x1b09('0x48')][_0x1b09('0xf3')]){var _0x62f438=_0x2b0fc4['query'][_0x1b09('0xf3')]['split'](',');var _0x31a55d={};_0x31a55d[_0x62f438[0x0]]={'$gte':moment(_0x62f438[0x1])[_0x1b09('0xd2')]('YYYY-MM-DD\x20HH:mm:ss')};_0x451a67[_0x1b09('0x53')]=_[_0x1b09('0xba')](_0x451a67[_0x1b09('0x53')],_0x31a55d);}_0x451a67=_[_0x1b09('0xba')]({},_0x451a67,_0x2b0fc4[_0x1b09('0xf4')]);return db[_0x1b09('0xf2')][_0x1b09('0x9d')]({'where':_0x451a67[_0x1b09('0x53')]})[_0x1b09('0x39')](function(_0x2cd9cd){_0x4c72c3[_0x1b09('0x9d')]=_0x2cd9cd;if(_0x2b0fc4[_0x1b09('0x48')]['includeAll']){_0x451a67['include']=[{'all':!![]}];}return db[_0x1b09('0xf2')]['findAll'](_0x451a67);})[_0x1b09('0x39')](function(_0xfd81aa){_0x4c72c3[_0x1b09('0xb6')]=_0xfd81aa;return _0x4c72c3;});}})[_0x1b09('0x39')](respondWithFilteredResult(_0x113cbe,_0x451a67))[_0x1b09('0x2c')](handleError(_0x113cbe,null));};exports[_0x1b09('0xf5')]=function(_0x324e94,_0x5a5127,_0x61491f){var _0x323dd7={'where':{}},_0x3c9223={},_0x26a9f7={'count':0x0,'rows':[]};return db[_0x1b09('0x44')][_0x1b09('0xca')]({'where':{'id':_0x324e94[_0x1b09('0xb8')]['id']}})[_0x1b09('0x39')](handleEntityNotFound(_0x5a5127,null))[_0x1b09('0x39')](function(_0x481c71){if(_0x481c71){_0x3c9223[_0x1b09('0x4c')]=_['keys'](db[_0x1b09('0xf2')][_0x1b09('0x45')]);_0x3c9223[_0x1b09('0x48')]=_[_0x1b09('0x49')](_0x324e94[_0x1b09('0x48')]);_0x3c9223[_0x1b09('0x4a')]=_[_0x1b09('0x4b')](_0x3c9223[_0x1b09('0x4c')],_0x3c9223[_0x1b09('0x48')]);_0x323dd7['attributes']=_['intersection'](_0x3c9223[_0x1b09('0x4c')],qs['fields'](_0x324e94[_0x1b09('0x48')][_0x1b09('0x4e')]));_0x323dd7[_0x1b09('0x4d')]=_0x323dd7[_0x1b09('0x4d')][_0x1b09('0x4f')]?_0x323dd7['attributes']:_0x3c9223['model'];if(!_0x324e94[_0x1b09('0x48')]['hasOwnProperty']('nolimit')){_0x323dd7[_0x1b09('0x32')]=qs[_0x1b09('0x32')](_0x324e94[_0x1b09('0x48')][_0x1b09('0x32')]);_0x323dd7['offset']=qs[_0x1b09('0x31')](_0x324e94[_0x1b09('0x48')][_0x1b09('0x31')]);}_0x323dd7[_0x1b09('0x95')]=qs[_0x1b09('0x52')](_0x324e94[_0x1b09('0x48')][_0x1b09('0x52')]);_0x323dd7[_0x1b09('0x53')]=qs['filters'](_[_0x1b09('0x54')](_0x324e94[_0x1b09('0x48')],_0x3c9223[_0x1b09('0x4a')]));_0x323dd7['where'][_0x1b09('0xb4')]=_0x481c71['id'];if(_0x324e94['query'][_0x1b09('0x8d')]){_0x323dd7['where']=_[_0x1b09('0xba')](_0x323dd7['where'],{'$or':_[_0x1b09('0x3f')](_0x323dd7['attributes'],function(_0x24b132){var _0x5c7bf6={};_0x5c7bf6[_0x24b132]={'$like':'%'+_0x324e94[_0x1b09('0x48')][_0x1b09('0x8d')]+'%'};return _0x5c7bf6;})});}_0x323dd7[_0x1b09('0x53')][_0x1b09('0xe0')]=![];if(_0x324e94['query']['id']){_0x323dd7[_0x1b09('0x53')]['id']={'$gt':_0x324e94['query']['id']};}_0x323dd7=_['merge']({},_0x323dd7,_0x324e94[_0x1b09('0xf4')]);return db[_0x1b09('0xf2')]['count']({'where':_0x323dd7[_0x1b09('0x53')]})[_0x1b09('0x39')](function(_0x10e6f8){_0x26a9f7[_0x1b09('0x9d')]=_0x10e6f8;_0x323dd7[_0x1b09('0xb9')]=[];if(_0x324e94['query'][_0x1b09('0xf6')]){_0x323dd7[_0x1b09('0xb9')][_0x1b09('0x42')]({'model':db[_0x1b09('0xd4')],'as':_0x1b09('0xd4'),'attributes':['id','fullname',_0x1b09('0xf7')]});}if(_0x324e94[_0x1b09('0x48')][_0x1b09('0xf8')]){_0x323dd7['include']=[{'all':!![]}];}return db[_0x1b09('0xf2')]['findAll'](_0x323dd7);})[_0x1b09('0x39')](function(_0x1d2d68){_0x26a9f7['rows']=_0x1d2d68;return _0x26a9f7;});}})[_0x1b09('0x39')](respondWithFilteredResult(_0x5a5127,_0x323dd7))[_0x1b09('0x2c')](handleError(_0x5a5127,null));};exports[_0x1b09('0xf9')]=function(_0x4fe7e4,_0x84597d,_0x10cee7){return db['ChatInteraction'][_0x1b09('0x6a')]({'where':{'id':_0x4fe7e4['params']['id']}})[_0x1b09('0x39')](handleEntityNotFound(_0x84597d,null))[_0x1b09('0x39')](function(_0x55f50d){if(_0x55f50d){return _0x55f50d[_0x1b09('0xfa')](_0x4fe7e4['body'][_0x1b09('0xef')],_['omit'](_0x4fe7e4[_0x1b09('0xbc')],['ids','id'])||{})[_0x1b09('0xfb')](function(){return db[_0x1b09('0xfc')][_0x1b09('0xfd')]({'attributes':['id',_0x1b09('0x3c'),_0x1b09('0xfe')],'where':{'id':_0x4fe7e4[_0x1b09('0xbc')]['ids']}});})[_0x1b09('0x39')](function(_0x1b763a){socket[_0x1b09('0xff')](_0x1b09('0x100'),{'id':Number(_0x4fe7e4[_0x1b09('0xb8')]['id']),'tags':_0x1b763a||[]});return{'id':Number(_0x4fe7e4[_0x1b09('0xb8')]['id']),'tags':_0x1b763a||[]};});}})[_0x1b09('0x39')](respondWithResult(_0x84597d,null))[_0x1b09('0x2c')](handleError(_0x84597d,null));};exports[_0x1b09('0x101')]=function(_0x249233,_0x182f5e,_0x25a853){return db[_0x1b09('0x44')][_0x1b09('0x6a')]({'where':{'id':_0x249233[_0x1b09('0xb8')]['id']}})['then'](handleEntityNotFound(_0x182f5e,null))['then'](function(_0x5d9b35){if(_0x5d9b35){return _0x5d9b35[_0x1b09('0x101')](_0x249233[_0x1b09('0x48')][_0x1b09('0xef')]);}})[_0x1b09('0x39')](respondWithStatusCode(_0x182f5e,null))[_0x1b09('0x2c')](handleError(_0x182f5e,null));};exports[_0x1b09('0xcc')]=function(_0x48b7bb,_0x76ef7f){var _0x2bc53c=moment()['unix']()[_0x1b09('0x9e')]();var _0x2692f8=path[_0x1b09('0xcd')](config[_0x1b09('0xce')],_0x1b09('0x102'),_0x1b09('0x103'),'tmp');var _0x3765c5=path['join'](config[_0x1b09('0xce')],'server','files',_0x1b09('0x104'));var _0x8e7692=path[_0x1b09('0xcd')](_0x2692f8,_0x2bc53c);var _0x1d4ec3=util[_0x1b09('0xd2')](_0x1b09('0x105'),_0x48b7bb[_0x1b09('0xb8')]['id'],_0x2bc53c);var _0x43020a=path[_0x1b09('0xcd')](_0x2692f8,_0x1d4ec3);var _0x55d7db=[];_0x55d7db['push']({'model':db[_0x1b09('0xd4')],'as':_0x1b09('0xd4'),'attributes':['id',_0x1b09('0xdd')],'raw':!![]});_0x55d7db[_0x1b09('0x42')]({'model':db[_0x1b09('0xd6')],'as':_0x1b09('0x6f'),'attributes':['id',_0x1b09('0x106'),_0x1b09('0x107')],'raw':!![]});if(_0x48b7bb[_0x1b09('0x48')]['attachments']){_0x55d7db[_0x1b09('0x42')]({'model':db[_0x1b09('0xc8')],'as':_0x1b09('0xc8'),'raw':!![]});}var _0x5efa6a=[{'model':db['ChatMessage'],'as':_0x1b09('0xd3'),'attributes':['id',_0x1b09('0xbc'),_0x1b09('0x83'),_0x1b09('0x108'),_0x1b09('0xe0'),_0x1b09('0x89')],'include':_0x55d7db}];_0x5efa6a[_0x1b09('0x42')]({'model':db[_0x1b09('0xd5')],'as':_0x1b09('0x109'),'attributes':['id','name']});_0x5efa6a[_0x1b09('0x42')]({'model':db[_0x1b09('0xd4')],'as':'Owner','attributes':['id',_0x1b09('0xdd')]});return db[_0x1b09('0x44')][_0x1b09('0x6a')]({'where':{'id':_0x48b7bb[_0x1b09('0xb8')]['id']},'include':_0x5efa6a})[_0x1b09('0x39')](handleEntityNotFound(_0x76ef7f,null))['then'](function(_0x431cb5){if(_0x431cb5){var _0x4311ef=_0x431cb5[_0x1b09('0x10a')]({'plain':!![]});fs[_0x1b09('0x10b')](_0x8e7692);var _0xe20f60={'format':'A4','border':_0x1b09('0x10c'),'header':{'height':_0x1b09('0x10d'),'contents':{'first':_0x1b09('0x10e')}},'footer':{'height':'30px','contents':{'default':util[_0x1b09('0xd2')](_0x1b09('0x10f'),util[_0x1b09('0xd2')](_0x1b09('0x110'),_0x1b09('0x111'),_0x4311ef['id']),moment()['format'](_0x1b09('0x112'))[_0x1b09('0x9e')]())}}};var _0x1acedb={'channel':_0x1b09('0x111'),'account':_0x4311ef[_0x1b09('0x109')]['name'],'agent':_0x4311ef[_0x1b09('0x113')]?_0x4311ef[_0x1b09('0x113')]['fullname']:'N.A.','createdAt':moment(_0x4311ef[_0x1b09('0x83')])[_0x1b09('0xd2')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'closedAt':_0x4311ef[_0x1b09('0xc2')]?moment(_0x4311ef[_0x1b09('0x114')])[_0x1b09('0xd2')](_0x1b09('0x115'))[_0x1b09('0x9e')]():'','disposition':_0x4311ef[_0x1b09('0xc3')],'chatInfo':{'browser':_0x4311ef['browserName'],'os':_0x4311ef[_0x1b09('0x116')],'referer':_0x4311ef[_0x1b09('0x117')],'customerIp':_0x4311ef[_0x1b09('0x118')],'customerPort':_0x4311ef[_0x1b09('0x119')]?_0x4311ef[_0x1b09('0x119')]:_0x1b09('0x11a')},'messages':_(_0x4311ef[_0x1b09('0xd3')])[_0x1b09('0x11b')]()[_0x1b09('0x8d')]({'secret':![]})[_0x1b09('0x3f')](function(_0x2a7323){if(_0x2a7323['Attachment']){var _0x3104b7=path[_0x1b09('0xcd')](_0x3765c5,_0x2a7323[_0x1b09('0xc8')][_0x1b09('0xc5')]);if(fs[_0x1b09('0x11c')](_0x3104b7)){fs['createReadStream'](_0x3104b7)[_0x1b09('0x11d')](fs[_0x1b09('0x11e')](path[_0x1b09('0xcd')](_0x8e7692,_0x2a7323['Attachment']['basename'])));}}return{'date':moment(_0x2a7323['createdAt'])[_0x1b09('0xd2')](_0x1b09('0x115'))['toString'](),'sender':_0x2a7323[_0x1b09('0x108')]===_0x1b09('0x11f')?_0x2a7323[_0x1b09('0xd4')]?_0x2a7323[_0x1b09('0xd4')][_0x1b09('0xdd')]:_0x1b09('0xd7'):_0x2a7323['Contact'][_0x1b09('0x106')]+(_0x2a7323[_0x1b09('0x6f')][_0x1b09('0x107')]?'\x20'+_0x2a7323[_0x1b09('0x6f')][_0x1b09('0x107')]:''),'body':_0x2a7323[_0x1b09('0xc8')]?_0x2a7323['Attachment'][_0x1b09('0xc5')]:_0x2a7323[_0x1b09('0xbc')],'direction':_0x2a7323[_0x1b09('0x108')]===_0x1b09('0x11f')?'A':'C','secret':_0x2a7323[_0x1b09('0xe0')],'read':_0x2a7323[_0x1b09('0x89')],'attachment':_0x2a7323[_0x1b09('0xc8')]};})[_0x1b09('0x6c')]()};return ejs[_0x1b09('0x120')](path['join'](config['root'],'server',_0x1b09('0x121'),_0x1b09('0x122')),{'interaction':_0x1acedb})[_0x1b09('0x39')](function(_0x42a474){return new BPromise(function(_0x2aee08,_0x55cfca){pdf['create'](_0x42a474,_0xe20f60)['toFile'](path[_0x1b09('0xcd')](_0x8e7692,_0x1b09('0x123')+_0x4311ef['id']+'-'+_0x2bc53c+_0x1b09('0x124')),function(_0x246bb8,_0x4d9763){if(_0x246bb8)return _0x55cfca(_0x246bb8);_0x2aee08(_0x4d9763);});});})[_0x1b09('0x39')](function(){return new BPromise(function(_0x340e65,_0x109aa6){zipdir(_0x8e7692,{'saveTo':_0x43020a},function(_0x4264bb,_0x44ca55){if(_0x4264bb)return _0x109aa6(_0x4264bb);return _0x340e65(_0x44ca55);});})['then'](function(){return new BPromise(function(_0x3f99ff,_0x2a7fcc){rimraf(_0x8e7692,function(_0x18be46){if(_0x18be46)_0x2a7fcc(_0x18be46);return _0x3f99ff();});});})[_0x1b09('0x39')](function(){return _0x76ef7f[_0x1b09('0xcc')](_0x43020a,_0x1d4ec3,function(_0x5773d9){if(_0x5773d9){console['log'](_0x1b09('0x125'),_0x5773d9);}else{fs[_0x1b09('0x126')](_0x43020a);}});});});}else{return _0x76ef7f[_0x1b09('0x2d')](0xc8);}})[_0x1b09('0x2c')](handleError(_0x76ef7f,null));};
\ No newline at end of file
+var _0xeff8=['root','server/files/attachments/','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','now','pathTranscript','ChatMessage','Messages','User','%s%d','agentAlias','System','customer','Visitor','agentIdentifier','website_alias','agent_alias','alias','[%s]\x20%s:\x20%s\x0a','MM/DD/YYYY\x20HH:mm:ss','direction','secret','appendFileSync','MailAccount','MailServerOut','Smtp','service','host','port','secure','SendMail','sendMail','\x22%s\x22\x20<%s>','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','omit','options','findAll','getMyMessages','include','includeAgent','spread','emit','chatInteractionTags:save','removeTags','join','server','tmp','files','attachments','transcript-%d-%s.zip','CmContact','firstName','lastName','ChatWebsite','Owner','get','mkdirSync','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\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
\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%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
\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
\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{{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
\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
\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%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
\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
','%s\x20#%d','Chat','YYYY-MM-DD','N.A.','YYYY-MM-DD\x20HH:mm:ss','disposition','osName','referer','customerIp','customerPort','tail','existsSync','pipe','createWriteStream','out','renderFile','views','downloadInteraction.html','toFile','transcript-','.pdf','err','unlinkSync','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./chatInteraction.socket','jayson/promise','client','http','test','Sequelize','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','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','json','count','offset','limit','set','Content-Range','apply','destroy','status','end','stack','name','send','Users','map','fullname','Tags','TagIds','split','forEach','push','rawAttributes','fieldName','type','model','query','filters','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','select','field','color','from','tools_tags','u.id','ui.ChatInteractionId','user_has_chat_interactions','left_join','users','u.id\x20=\x20ui.UserId','chat_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','chat_websites','a.id\x20=\x20i.ChatWebsiteId','chat_messages','me.ChatInteractionId\x20=\x20i.id','it.ChatInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','parseSearch','search','sqlOperator','conditions','find','value','having','`\x20=\x200','Contact','$substring','length','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','operator','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','text','keys','some','compact','isEmpty','ChatWebsiteId','i.ChatWebsiteId\x20IN\x20?','concat','createdAt','parse','$gte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','filter','replace','\x27\x27\x27\x27','isNumeric','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','i.id','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages','DESC','t.id\x20IN\x20?','resolve','journey','i.ChatWebsiteId\x20IS\x20NOT\x20NULL','user','i.ChatWebsiteId\x20IS\x20NULL','sequelize','toString','keyBy','merge','attributes','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','c.firstName','Contact.firstName','c.lastName','c.email','Contact.email','Contact.phone','c.mobile','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.ChatInteractionId\x20IN\x20?','groupBy','ChatInteractionId','all','rows','params','includeAll','ChatInteraction','create','update','describe','abandon','entity\x20not\x20found','ValidationError','closed','AbandonInteraction','attachmentUpload','originalname','basename','file','filename','mimetype','Attachment','attachmentDownload','findOne','attachId','download'];(function(_0x3b8dd9,_0x9d3b7c){var _0x11de4b=function(_0x3d13bf){while(--_0x3d13bf){_0x3b8dd9['push'](_0x3b8dd9['shift']());}};_0x11de4b(++_0x9d3b7c);}(_0xeff8,0x186));var _0x8eff=function(_0x424501,_0x42096d){_0x424501=_0x424501-0x0;var _0xb719af=_0xeff8[_0x424501];return _0xb719af;};'use strict';var pdf=require(_0x8eff('0x0'));var emlformat=require(_0x8eff('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x8eff('0x2'));var jsonpatch=require(_0x8eff('0x3'));var rp=require(_0x8eff('0x4'));var moment=require('moment');var BPromise=require(_0x8eff('0x5'));var Mustache=require(_0x8eff('0x6'));var util=require(_0x8eff('0x7'));var path=require(_0x8eff('0x8'));var sox=require('sox');var csv=require(_0x8eff('0x9'));var ejs=require(_0x8eff('0xa'));var fs=require('fs');var _=require(_0x8eff('0xb'));var squel=require(_0x8eff('0xc'));var crypto=require('crypto');var jsforce=require(_0x8eff('0xd'));var deskjs=require(_0x8eff('0xe'));var toCsv=require(_0x8eff('0x9'));var querystring=require(_0x8eff('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x8eff('0x10'));var qs=require(_0x8eff('0x11'));var as=require(_0x8eff('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8eff('0x13'))(_0x8eff('0x14'));var utils=require('../../config/utils');var config=require(_0x8eff('0x15'));var db=require(_0x8eff('0x16'))['db'];config['redis']=_['defaults'](config[_0x8eff('0x17')],{'host':_0x8eff('0x18'),'port':0x18eb});var socket=require(_0x8eff('0x19'))(new Redis(config[_0x8eff('0x17')]));require(_0x8eff('0x1a'))['register'](socket);var jayson=require(_0x8eff('0x1b'));var client=jayson[_0x8eff('0x1c')][_0x8eff('0x1d')]({'port':0x232b});var client9004=jayson[_0x8eff('0x1c')][_0x8eff('0x1d')]({'port':0x232c});function checkPasswordPattern(_0x4cfc91,_0x16202e,_0xdbb753){if(_0xdbb753){var _0x16a4eb=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x16a4eb[_0x8eff('0x1e')](_0x16202e)){return _0x4cfc91;}else{throw new db[(_0x8eff('0x1f'))]['ValidationError'](_0x8eff('0x20'));}}else{return _0x4cfc91;}}function respondWithRpcPromise(_0x38fb15,_0x3cd1dc,_0x20ec2a,_0x2cd7c5){return new BPromise(function(_0x3c800b,_0x38f5ee){var _0x399d96=_0x2cd7c5||client;return _0x399d96[_0x8eff('0x21')](_0x38fb15,_0x20ec2a)[_0x8eff('0x22')](function(_0x453c7a){logger[_0x8eff('0x23')](_0x8eff('0x24'),_0x3cd1dc,_0x8eff('0x25'));logger[_0x8eff('0x26')](_0x8eff('0x27'),_0x3cd1dc,'request\x20sent',JSON[_0x8eff('0x28')](_0x453c7a));if(_0x453c7a[_0x8eff('0x29')]){if(_0x453c7a['error'][_0x8eff('0x2a')]===0x1f4){logger['error'](_0x8eff('0x24'),_0x3cd1dc,_0x453c7a[_0x8eff('0x29')][_0x8eff('0x2b')]);return _0x38f5ee(_0x453c7a[_0x8eff('0x29')][_0x8eff('0x2b')]);}logger['error'](_0x8eff('0x24'),_0x3cd1dc,_0x453c7a[_0x8eff('0x29')]['message']);return _0x3c800b(_0x453c7a[_0x8eff('0x29')][_0x8eff('0x2b')]);}else{logger[_0x8eff('0x23')](_0x8eff('0x24'),_0x3cd1dc,_0x8eff('0x25'));_0x3c800b(_0x453c7a[_0x8eff('0x2c')][_0x8eff('0x2b')]);}})[_0x8eff('0x2d')](function(_0x516173){logger[_0x8eff('0x29')](_0x8eff('0x24'),_0x3cd1dc,_0x516173);_0x38f5ee(_0x516173);});});}function respondWithStatusCode(_0x15083c,_0xb88ce9){_0xb88ce9=_0xb88ce9||0xcc;return function(_0x45803c){if(_0x45803c){return _0x15083c[_0x8eff('0x2e')](_0xb88ce9);}return _0x15083c['status'](_0xb88ce9)['end']();};}function respondWithResult(_0x44dcdb,_0x472b19){_0x472b19=_0x472b19||0xc8;return function(_0x17ff3f){if(_0x17ff3f){return _0x44dcdb['status'](_0x472b19)[_0x8eff('0x2f')](_0x17ff3f);}};}function respondWithFilteredResult(_0x2f8ad9,_0x229e0d){return function(_0x1da0fa){if(_0x1da0fa){var _0x25b98e=_0x1da0fa[_0x8eff('0x30')],_0x2c5727=_0x229e0d[_0x8eff('0x31')],_0x141bd7=_0x229e0d[_0x8eff('0x31')]+_0x229e0d[_0x8eff('0x32')],_0x1c6efa;if(_0x141bd7>=_0x25b98e){_0x141bd7=_0x25b98e;_0x1c6efa=0xc8;}else{_0x1c6efa=0xce;}_0x2f8ad9['status'](_0x1c6efa);return _0x2f8ad9[_0x8eff('0x33')](_0x8eff('0x34'),_0x2c5727+'-'+_0x141bd7+'/'+_0x25b98e)[_0x8eff('0x2f')](_0x1da0fa);}return null;};}function patchUpdates(_0x7da1fb){return function(_0x50f211){try{jsonpatch[_0x8eff('0x35')](_0x50f211,_0x7da1fb,!![]);}catch(_0x32fd3c){return BPromise['reject'](_0x32fd3c);}return _0x50f211['save']();};}function saveUpdates(_0x40ed09,_0x271d64){return function(_0x565b83){if(_0x565b83){return _0x565b83['update'](_0x40ed09)['then'](function(_0x315691){return _0x315691;});}return null;};}function removeEntity(_0x5f5b79,_0x45d9d4){return function(_0x59c9cc){if(_0x59c9cc){return _0x59c9cc[_0x8eff('0x36')]()[_0x8eff('0x22')](function(){_0x5f5b79[_0x8eff('0x37')](0xcc)[_0x8eff('0x38')]();});}};}function handleEntityNotFound(_0x3e53a2,_0x37e474){return function(_0x5ed3f3){if(!_0x5ed3f3){_0x3e53a2[_0x8eff('0x2e')](0x194);}return _0x5ed3f3;};}function handleError(_0x5907e0,_0xba48d8){_0xba48d8=_0xba48d8||0x1f4;return function(_0x5beed4){logger[_0x8eff('0x29')](_0x5beed4[_0x8eff('0x39')]);if(_0x5beed4[_0x8eff('0x3a')]){delete _0x5beed4[_0x8eff('0x3a')];}_0x5907e0['status'](_0xba48d8)[_0x8eff('0x3b')](_0x5beed4);};}function getInteractionUsers(_0x170a33,_0x18c42c){return new BPromise(function(_0x5360b7,_0x475213){try{if(_0x18c42c[_0x170a33['id']]){_0x170a33[_0x8eff('0x3c')]=_[_0x8eff('0x3d')](_0x18c42c[_0x170a33['id']],function(_0x345bc7){return{'id':_0x345bc7['id'],'fullname':_0x345bc7[_0x8eff('0x3e')]};});}}catch(_0xd2a915){_0x475213(_0xd2a915);}_0x5360b7(_0x170a33);});}function getInteractionTags(_0x29f68e,_0x26da7a){return new BPromise(function(_0x661c36,_0x5c1277){try{if(_0x29f68e['TagIds']){_0x29f68e[_0x8eff('0x3f')]=[];_0x29f68e[_0x8eff('0x40')][_0x8eff('0x41')](',')[_0x8eff('0x42')](function(_0x429c31){_0x29f68e[_0x8eff('0x3f')][_0x8eff('0x43')](_0x26da7a[_0x429c31]);});}delete _0x29f68e['TagIds'];}catch(_0x14cf6e){_0x5c1277(_0x14cf6e);}_0x661c36(_0x29f68e);});}function updateChatInteraction(_0x1c7332,_0x478e09,_0x411a1c){return new BPromise(function(_0x1ad6b3,_0x241b33){return getInteractionUsers(_0x1c7332,_0x411a1c)[_0x8eff('0x22')](function(_0xdc5e2f){return getInteractionTags(_0xdc5e2f,_0x478e09);})[_0x8eff('0x22')](function(_0x194195){_0x1ad6b3(_0x194195);})[_0x8eff('0x2d')](function(_0x6d0568){_0x241b33(_0x6d0568);});});}exports['index']=function(_0x37f376,_0x27a8c9){var _0x3f8a85={},_0x2fa131={},_0x1a5460={'count':0x0,'rows':[]};var _0x55d15c=_[_0x8eff('0x3d')](db['ChatInteraction'][_0x8eff('0x44')],function(_0x42b444){return{'name':_0x42b444[_0x8eff('0x45')],'type':_0x42b444[_0x8eff('0x46')]['key']};});_0x2fa131[_0x8eff('0x47')]=_[_0x8eff('0x3d')](_0x55d15c,_0x8eff('0x3a'));_0x2fa131['query']=_['keys'](_0x37f376[_0x8eff('0x48')]);_0x2fa131[_0x8eff('0x49')]=_[_0x8eff('0x4a')](_0x2fa131[_0x8eff('0x47')],_0x2fa131[_0x8eff('0x48')]);_0x3f8a85['attributes']=_[_0x8eff('0x4a')](_0x2fa131['model'],qs[_0x8eff('0x4b')](_0x37f376[_0x8eff('0x48')]['fields']));_0x3f8a85['attributes']=_0x3f8a85['attributes']['length']?_0x3f8a85['attributes']:_0x2fa131['model'];if(!_0x37f376[_0x8eff('0x48')][_0x8eff('0x4c')](_0x8eff('0x4d'))){_0x3f8a85[_0x8eff('0x32')]=qs[_0x8eff('0x32')](_0x37f376[_0x8eff('0x48')][_0x8eff('0x32')]);_0x3f8a85[_0x8eff('0x31')]=qs[_0x8eff('0x31')](_0x37f376[_0x8eff('0x48')]['offset']);}_0x3f8a85[_0x8eff('0x4e')]=qs['sort'](_0x37f376[_0x8eff('0x48')][_0x8eff('0x4f')]);_0x3f8a85[_0x8eff('0x50')]=qs[_0x8eff('0x49')](_[_0x8eff('0x51')](_0x37f376[_0x8eff('0x48')],_0x2fa131[_0x8eff('0x49')]));var _0x3a4c31=[];var _0x16078f=squel[_0x8eff('0x52')]()[_0x8eff('0x53')]('id')[_0x8eff('0x53')]('name')[_0x8eff('0x53')](_0x8eff('0x54'))[_0x8eff('0x55')](_0x8eff('0x56'));var _0x3de247=squel[_0x8eff('0x52')]()[_0x8eff('0x53')](_0x8eff('0x57'))[_0x8eff('0x53')]('u.fullname')['field'](_0x8eff('0x58'))[_0x8eff('0x55')](_0x8eff('0x59'),'ui')[_0x8eff('0x5a')](_0x8eff('0x5b'),'u',_0x8eff('0x5c'));var _0x4b92ae=squel[_0x8eff('0x52')]()[_0x8eff('0x55')](_0x8eff('0x5d'),'i')['left_join'](_0x8eff('0x5e'),'c',_0x8eff('0x5f'))[_0x8eff('0x5a')](_0x8eff('0x5b'),'o','o.id\x20=\x20i.UserId')[_0x8eff('0x5a')](_0x8eff('0x60'),'a',_0x8eff('0x61'))[_0x8eff('0x5a')](_0x8eff('0x62'),'me',_0x8eff('0x63'))[_0x8eff('0x5a')]('chat_interaction_has_tags','it',_0x8eff('0x64'))[_0x8eff('0x5a')](_0x8eff('0x56'),'t',_0x8eff('0x65'));var _0x2079f6=squel['expr']();var _0x13c2e6=[];var _0x16b968=squel[_0x8eff('0x66')]();var _0x4b05b3;if(_0x37f376[_0x8eff('0x48')]['search']){_0x4b05b3=as[_0x8eff('0x67')](_0x37f376[_0x8eff('0x48')][_0x8eff('0x68')]);var _0xfecdd8=_0x4b05b3[_0x8eff('0x69')];for(var _0xa6355e=0x0;_0xa6355e<_0x4b05b3[_0x8eff('0x6a')]['length'];_0xa6355e++){var _0x48a414=_0x4b05b3[_0x8eff('0x6a')][_0xa6355e];var _0x4cf5db='i';var _0x3bfeac=_[_0x8eff('0x6b')](_0x55d15c,[_0x8eff('0x3a'),_0x48a414[_0x8eff('0x53')]]);if(!_0x3bfeac){switch(_0x48a414[_0x8eff('0x53')]){case'unreadMessages':if(_0x48a414[_0x8eff('0x6c')]==0x1){_0x4b92ae[_0x8eff('0x6d')]('`'+_0x48a414[_0x8eff('0x53')]+_0x8eff('0x6e'));}else{_0x4b92ae[_0x8eff('0x6d')]('`'+_0x48a414[_0x8eff('0x53')]+'`\x20>\x200');}break;case _0x8eff('0x6f'):if(_0x48a414['operator']===_0x8eff('0x70')){if(_0x48a414[_0x8eff('0x6c')]['split']('\x20')[_0x8eff('0x71')]>0x1){_0x2079f6[_0xfecdd8](_0x8eff('0x72'),qs[_0x8eff('0x73')](_0x48a414[_0x8eff('0x6c')]),null);}else{var _0x26ce78='%'+_0x48a414[_0x8eff('0x6c')]+'%';_0x2079f6[_0xfecdd8](_0x8eff('0x74'),_0x26ce78,_0x26ce78,_0x26ce78);}}else{_0x3bfeac=_[_0x8eff('0x6b')](_0x55d15c,['name',_0x8eff('0x75')]);_0x48a414['field']='ContactId';_0x5492df=as[_0x8eff('0x76')](_0x4cf5db,_0x3bfeac[_0x8eff('0x46')],_0x48a414);_0x2079f6[_0xfecdd8](_0x5492df['text'],_0x5492df[_0x8eff('0x6c')][_0x8eff('0x77')],_0x5492df['value'][_0x8eff('0x38')]);}break;case _0x8eff('0x78'):var _0x56c996=_0x48a414[_0x8eff('0x6c')][_0x8eff('0x41')](',')[_0x8eff('0x3d')](function(_0x29390c){return Number(_0x29390c);});_0x56c996[_0x8eff('0x42')](function(_0x41e395){_0x16b968['or'](_0x8eff('0x79'),'%,'+_0x41e395+',%');});_0x13c2e6=_['union'](_0x13c2e6,_0x56c996);break;case'User':if(_0x48a414[_0x8eff('0x7a')]===_0x8eff('0x70')){_0x2079f6[_0xfecdd8](_0x8eff('0x7b'),'%'+_0x48a414[_0x8eff('0x6c')]+'%',null);}else{_0x3bfeac=_[_0x8eff('0x6b')](_0x55d15c,[_0x8eff('0x3a'),_0x8eff('0x7c')]);_0x48a414['field']='UserId';_0x5492df=as[_0x8eff('0x76')](_0x4cf5db,_0x3bfeac['type'],_0x48a414);_0x2079f6[_0xfecdd8](_0x5492df['text'],_0x5492df['value'][_0x8eff('0x77')],_0x5492df[_0x8eff('0x6c')][_0x8eff('0x38')]);}break;case _0x8eff('0x7d'):_0x5492df=as[_0x8eff('0x76')]('me',null,_0x48a414);_0x2079f6[_0xfecdd8](_0x5492df[_0x8eff('0x7e')],_0x5492df[_0x8eff('0x6c')][_0x8eff('0x77')],_0x5492df['value'][_0x8eff('0x38')]);break;}}else{var _0x5492df=as[_0x8eff('0x76')](_0x4cf5db,_0x3bfeac[_0x8eff('0x46')],_0x48a414);_0x2079f6[_0xfecdd8](_0x5492df[_0x8eff('0x7e')],_0x5492df[_0x8eff('0x6c')][_0x8eff('0x77')],_0x5492df[_0x8eff('0x6c')]['end']);}}}else{var _0x3db0d8=_(_0x37f376['query'])[_0x8eff('0x7f')]()[_0x8eff('0x3d')](function(_0x3057f7){return _[_0x8eff('0x80')](_0x55d15c,[_0x8eff('0x3a'),_0x3057f7])?_0x3057f7:undefined;})[_0x8eff('0x81')]()[_0x8eff('0x6c')]();if(!_[_0x8eff('0x82')](_0x3db0d8)){_0x3db0d8[_0x8eff('0x42')](function(_0x592ae5){if(_0x592ae5===_0x8eff('0x83')){_0x4b92ae[_0x8eff('0x50')](_0x8eff('0x84'),[][_0x8eff('0x85')](_0x37f376[_0x8eff('0x48')][_0x592ae5]));}else if(_0x592ae5===_0x8eff('0x86')){var _0x22d462=JSON[_0x8eff('0x87')](_0x37f376[_0x8eff('0x48')][_0x592ae5])[_0x8eff('0x88')];var _0x4ef11d=JSON['parse'](_0x37f376['query'][_0x592ae5])['$lte'];_0x4b92ae[_0x8eff('0x50')](_0x8eff('0x89'),_0x22d462,_0x4ef11d);}else{if(_0x37f376[_0x8eff('0x48')][_0x592ae5]===_0x8eff('0x8a')){_0x4b92ae[_0x8eff('0x50')]('i.'+_0x592ae5+_0x8eff('0x8b'));}else{_0x4b92ae[_0x8eff('0x50')]('i.'+_0x592ae5+'\x20=\x20?',_0x37f376[_0x8eff('0x48')][_0x592ae5]);}}});}if(_0x37f376[_0x8eff('0x48')][_0x8eff('0x8c')]){if(_0x37f376[_0x8eff('0x48')]['read']==0x1){_0x4b92ae[_0x8eff('0x6d')](_0x8eff('0x8d'));}else{_0x4b92ae['having'](_0x8eff('0x8e'));}}if(_0x37f376[_0x8eff('0x48')][_0x8eff('0x8f')]){_0x13c2e6=_['isArray'](_0x37f376['query']['tag'])?_0x37f376[_0x8eff('0x48')][_0x8eff('0x8f')]:new Array(_0x37f376[_0x8eff('0x48')][_0x8eff('0x8f')]);_0x13c2e6[_0x8eff('0x42')](function(_0x10d22d){_0x16b968['or'](_0x8eff('0x79'),'%,'+_0x10d22d+',%');});}if(_0x37f376[_0x8eff('0x48')][_0x8eff('0x90')]){var _0x103a50=_0x37f376[_0x8eff('0x48')]['filter'][_0x8eff('0x91')]('\x5c','\x5c\x5c')['replace']('\x27\x27',_0x8eff('0x92'));if(qs[_0x8eff('0x93')](_0x103a50)){_0x2079f6['or']('i.id\x20LIKE\x20?',_0x103a50+'%');}else{_0x2079f6['or'](_0x8eff('0x94'),qs['getFullTextValue'](_0x103a50))['or'](_0x8eff('0x95'),_0x103a50+'%');}}}_0x4b92ae[_0x8eff('0x50')](_0x2079f6);_0x4b92ae[_0x8eff('0x96')](_0x8eff('0x97'));var _0x29e358={'type':db['Sequelize'][_0x8eff('0x98')][_0x8eff('0x99')],'raw':!![]};var _0xd5edc5=_0x4b92ae[_0x8eff('0x9a')]();_0xd5edc5[_0x8eff('0x53')](_0x8eff('0x97'));_0xd5edc5[_0x8eff('0x53')](_0x8eff('0x9b'),_0x8eff('0x9c'));if(_0x3f8a85[_0x8eff('0x4e')]){_0x3f8a85[_0x8eff('0x4e')]['forEach'](function(_0x41710c){_0x4b92ae[_0x8eff('0x4e')]('i.'+_0x41710c[0x0],_0x41710c[0x1]===_0x8eff('0x9d')?![]:!![]);});}if(!_[_0x8eff('0x82')](_0x13c2e6)){_0x4b92ae[_0x8eff('0x6d')](_0x16b968);_0xd5edc5['where'](_0x8eff('0x9e'),_0x13c2e6);}BPromise[_0x8eff('0x9f')]()['then'](function(){if(!_0x4b05b3){if(_0x37f376['query'][_0x8eff('0x83')]||_0x37f376[_0x8eff('0x48')][_0x8eff('0xa0')])return;_0xd5edc5[_0x8eff('0x50')](_0x8eff('0xa1'));_0x4b92ae[_0x8eff('0x50')]('i.ChatWebsiteId\x20IS\x20NOT\x20NULL');return;}return _0x37f376[_0x8eff('0xa2')]['getChatWebsites']({'attributes':['id'],'raw':!![]})[_0x8eff('0x22')](function(_0x262b68){if(_['isEmpty'](_0x262b68)){_0xd5edc5[_0x8eff('0x50')]('i.ChatWebsiteId\x20IS\x20NULL');_0x4b92ae['where'](_0x8eff('0xa3'));}else{_0xd5edc5['where'](_0x8eff('0x84'),_[_0x8eff('0x3d')](_0x262b68,'id'));_0x4b92ae['where'](_0x8eff('0x84'),_[_0x8eff('0x3d')](_0x262b68,'id'));}});})['then'](function(){db[_0x8eff('0xa4')][_0x8eff('0x48')](_0xd5edc5[_0x8eff('0xa5')](),_0x29e358)[_0x8eff('0x22')](function(_0x22abc5){_0x1a5460[_0x8eff('0x30')]=_0x22abc5[_0x8eff('0x71')];if(_0x1a5460[_0x8eff('0x30')]===0x0)return[];return db[_0x8eff('0xa4')]['query'](_0x16078f['toString'](),_0x29e358)['then'](function(_0x338269){_0x3a4c31=_[_0x8eff('0xa6')](_0x338269,'id');_0x29e358=_[_0x8eff('0xa7')](_0x29e358,{'model':db['ChatInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x37f376[_0x8eff('0x48')][_0x8eff('0x4b')]){_0x3f8a85[_0x8eff('0xa8')][_0x8eff('0x42')](function(_0x2c9646){_0x4b92ae[_0x8eff('0x53')]('i.'+_0x2c9646);});}else{_0x4b92ae['field'](_0x8eff('0x9b'),'unreadMessages');_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xa9'),_0x8eff('0xaa'));_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xab'),_0x8eff('0xac'));_0x4b92ae[_0x8eff('0x53')]('i.*');_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xad'),_0x8eff('0xae'));_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xaf'),'Contact.lastName');_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xb0'),_0x8eff('0xb1'));_0x4b92ae['field']('c.phone',_0x8eff('0xb2'));_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xb3'),'Contact.mobile');_0x4b92ae[_0x8eff('0x53')]('c.fax','Contact.fax');_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xb4'),_0x8eff('0xb5'));_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xb6'),_0x8eff('0xb7'));_0x4b92ae[_0x8eff('0x53')](_0x8eff('0xb8'),_0x8eff('0x40'));}_0x4b92ae[_0x8eff('0x32')](_0x3f8a85[_0x8eff('0x32')]);_0x4b92ae[_0x8eff('0x31')](_0x3f8a85['offset']);return db[_0x8eff('0xa4')][_0x8eff('0x48')](_0x4b92ae[_0x8eff('0xa5')](),_0x29e358);})[_0x8eff('0x22')](function(_0x134946){_0x3de247['where'](_0x8eff('0xb9'),_[_0x8eff('0x3d')](_0x134946,'id'));return db[_0x8eff('0xa4')][_0x8eff('0x48')](_0x3de247['toString'](),_0x29e358)['then'](function(_0x339451){var _0x111056=_[_0x8eff('0xba')](_0x339451,_0x8eff('0xbb'));var _0x4944af=[];_0x134946[_0x8eff('0x42')](function(_0xb283a6){_0x4944af[_0x8eff('0x43')](updateChatInteraction(_0xb283a6,_0x3a4c31,_0x111056));});return BPromise[_0x8eff('0xbc')](_0x4944af);});});})[_0x8eff('0x22')](function(_0x44e68a){_0x1a5460[_0x8eff('0xbd')]=_0x44e68a;return _0x1a5460;})[_0x8eff('0x22')](respondWithFilteredResult(_0x27a8c9,_0x3f8a85));})[_0x8eff('0x2d')](handleError(_0x27a8c9,null));};exports['show']=function(_0xe873eb,_0x54a472){var _0x22051e={'raw':![],'where':{'id':_0xe873eb[_0x8eff('0xbe')]['id']}},_0x16367d={};_0x16367d['model']=_[_0x8eff('0x7f')](db['ChatInteraction'][_0x8eff('0x44')]);_0x16367d[_0x8eff('0x48')]=_['keys'](_0xe873eb[_0x8eff('0x48')]);_0x16367d[_0x8eff('0x49')]=_[_0x8eff('0x4a')](_0x16367d[_0x8eff('0x47')],_0x16367d[_0x8eff('0x48')]);_0x22051e[_0x8eff('0xa8')]=_['intersection'](_0x16367d[_0x8eff('0x47')],qs[_0x8eff('0x4b')](_0xe873eb[_0x8eff('0x48')]['fields']));_0x22051e[_0x8eff('0xa8')]=_0x22051e[_0x8eff('0xa8')]['length']?_0x22051e[_0x8eff('0xa8')]:_0x16367d[_0x8eff('0x47')];if(_0xe873eb[_0x8eff('0x48')][_0x8eff('0xbf')]){_0x22051e['include']=[{'all':!![]}];}_0x22051e=_[_0x8eff('0xa7')]({},_0x22051e,_0xe873eb['options']);return db[_0x8eff('0xc0')][_0x8eff('0x6b')](_0x22051e)[_0x8eff('0x22')](handleEntityNotFound(_0x54a472,null))[_0x8eff('0x22')](respondWithResult(_0x54a472,null))['catch'](handleError(_0x54a472,null));};exports[_0x8eff('0xc1')]=function(_0x4d343e,_0x3e755b){return db[_0x8eff('0xc0')][_0x8eff('0xc1')](_0x4d343e[_0x8eff('0x7d')],{})[_0x8eff('0x22')](respondWithResult(_0x3e755b,0xc9))['catch'](handleError(_0x3e755b,null));};exports[_0x8eff('0xc2')]=function(_0x36712f,_0x3665ab){if(_0x36712f[_0x8eff('0x7d')]['id']){delete _0x36712f[_0x8eff('0x7d')]['id'];}return db[_0x8eff('0xc0')][_0x8eff('0x6b')]({'where':{'id':_0x36712f[_0x8eff('0xbe')]['id']}})['then'](handleEntityNotFound(_0x3665ab,null))[_0x8eff('0x22')](saveUpdates(_0x36712f[_0x8eff('0x7d')],null))['then'](respondWithResult(_0x3665ab,null))['catch'](handleError(_0x3665ab,null));};exports[_0x8eff('0x36')]=function(_0x5d9fc3,_0x534862){return db[_0x8eff('0xc0')][_0x8eff('0x6b')]({'where':{'id':_0x5d9fc3['params']['id']}})[_0x8eff('0x22')](handleEntityNotFound(_0x534862,null))[_0x8eff('0x22')](removeEntity(_0x534862,null))[_0x8eff('0x2d')](handleError(_0x534862,null));};exports['describe']=function(_0x3f5c47,_0x35be0a){return db['ChatInteraction'][_0x8eff('0xc3')]()[_0x8eff('0x22')](respondWithResult(_0x35be0a,null))[_0x8eff('0x2d')](handleError(_0x35be0a,null));};exports['customUpdate']=function(_0x5477c0,_0x52f9b2){if(_0x5477c0[_0x8eff('0x7d')]['id']){delete _0x5477c0[_0x8eff('0x7d')]['id'];}return db[_0x8eff('0xc0')][_0x8eff('0x6b')]({'where':{'id':_0x5477c0[_0x8eff('0xbe')]['id']}})[_0x8eff('0x22')](handleEntityNotFound(_0x52f9b2,null))[_0x8eff('0x22')](saveUpdates(_0x5477c0[_0x8eff('0x7d')],null))[_0x8eff('0x22')](respondWithResult(_0x52f9b2,null))[_0x8eff('0x2d')](handleError(_0x52f9b2,null));};exports[_0x8eff('0xc4')]=function(_0x4d7417,_0x56d0ed,_0x20d135){if(_0x4d7417[_0x8eff('0x7d')]['id']){delete _0x4d7417[_0x8eff('0x7d')]['id'];}return db[_0x8eff('0xc0')][_0x8eff('0x6b')]({'where':{'id':_0x4d7417[_0x8eff('0xbe')]['id']}})[_0x8eff('0x22')](function(_0x2d1c0b){if(!_0x2d1c0b){logger[_0x8eff('0x29')]('abandonInteraction,\x20%s,\x20%s,\x20%s',_0x8eff('0xc4'),0x194,_0x8eff('0xc5'));_0x56d0ed[_0x8eff('0x2e')](0x194);}else{if(_0x2d1c0b[_0x8eff('0x7c')]){throw new db[(_0x8eff('0x1f'))][(_0x8eff('0xc6'))]('Interaction\x20already\x20assigned');}}return _0x2d1c0b;})['then'](function(_0x41e975){if(_0x41e975){return _0x41e975[_0x8eff('0xc2')]({'closed':_0x4d7417[_0x8eff('0x7d')][_0x8eff('0xc7')],'disposition':_0x4d7417[_0x8eff('0x7d')]['disposition']})[_0x8eff('0x22')](function(_0x4e1313){return _0x4e1313;});}})['then'](function(_0x422796){return respondWithRpcPromise(_0x8eff('0xc8'),_0x8eff('0xc4'),_0x4d7417['body'],client9004);})[_0x8eff('0x22')](respondWithResult(_0x56d0ed,null))[_0x8eff('0x2d')](handleError(_0x56d0ed,null));};exports[_0x8eff('0xc9')]=function(_0x41f188,_0x27a3be,_0x2902f0){_0x41f188['body'][_0x8eff('0x3a')]=_0x41f188['file'][_0x8eff('0xca')];_0x41f188[_0x8eff('0x7d')][_0x8eff('0xcb')]=_0x41f188[_0x8eff('0xcc')][_0x8eff('0xcd')];_0x41f188[_0x8eff('0x7d')]['type']=_0x41f188['file'][_0x8eff('0xce')];return db[_0x8eff('0xcf')][_0x8eff('0xc1')](_0x41f188[_0x8eff('0x7d')])[_0x8eff('0x22')](respondWithResult(_0x27a3be,0xc9))['catch'](handleError(_0x27a3be,null));};exports[_0x8eff('0xd0')]=function(_0x1818ff,_0x3414c1,_0x51a066){return db['ChatInteraction'][_0x8eff('0xd1')]({'where':{'id':_0x1818ff[_0x8eff('0xbe')]['id']},'raw':!![]})[_0x8eff('0x22')](handleEntityNotFound(_0x3414c1,null))[_0x8eff('0x22')](function(_0x210ae8){if(_0x210ae8){if(_0x210ae8[_0x8eff('0xc7')]){return _0x3414c1[_0x8eff('0x37')](0x193)[_0x8eff('0x2f')]({'status':0x193,'message':'Unauthorized'});}return db['Attachment'][_0x8eff('0xd1')]({'where':{'id':_0x1818ff[_0x8eff('0x48')][_0x8eff('0xd2')]},'raw':!![]})[_0x8eff('0x22')](handleEntityNotFound(_0x3414c1,null));}})[_0x8eff('0x22')](function(_0x1f62a5){if(_0x1f62a5){return _0x3414c1[_0x8eff('0xd3')](path['join'](config[_0x8eff('0xd4')],_0x8eff('0xd5'),_0x1f62a5[_0x8eff('0xcb')]));}})[_0x8eff('0x2d')](handleError(_0x3414c1,null));};exports[_0x8eff('0xd6')]=function(_0x2ed342,_0x5c64ef){var _0x51cef3=null;var _0x59b7d2=null;var _0xae8a5e=null;var _0x374b82=null;if(_0x2ed342[_0x8eff('0x7d')]['id']){delete _0x2ed342[_0x8eff('0x7d')]['id'];}if(_0x2ed342[_0x8eff('0x7d')][_0x8eff('0xd7')]){_0x374b82=path['join'](config[_0x8eff('0xd4')],_0x8eff('0xd8'),util[_0x8eff('0xd9')](_0x8eff('0xda'),Date[_0x8eff('0xdb')]()));_0x2ed342[_0x8eff('0x7d')][_0x8eff('0xdc')]=_0x374b82;}return db[_0x8eff('0xc0')][_0x8eff('0x6b')]({'where':{'id':_0x2ed342[_0x8eff('0xbe')]['id']},'include':[{'model':db[_0x8eff('0xdd')],'as':_0x8eff('0xde'),'include':[{'model':db['User'],'as':_0x8eff('0xdf')}]}]})[_0x8eff('0x22')](handleEntityNotFound(_0x5c64ef,null))[_0x8eff('0x22')](saveUpdates(_0x2ed342[_0x8eff('0x7d')],null))[_0x8eff('0x22')](function(_0x3dc53c){if(_0x3dc53c){_0x51cef3=_0x3dc53c;return db['ChatWebsite'][_0x8eff('0x6b')]({'where':{'id':_0x51cef3[_0x8eff('0x83')]}});}})[_0x8eff('0x22')](function(_0x5398e8){if(_0x5398e8){_0xae8a5e=_0x5398e8;return db['CmContact'][_0x8eff('0x6b')]({'where':{'id':_0x51cef3['ContactId']}});}})['then'](function(_0x23d355){if(_0x23d355){_0x59b7d2=_0x23d355;if(_0x374b82){var _0x28abb9=null;for(var _0x270798=0x1;_0x270798<_0x51cef3[_0x8eff('0xde')][_0x8eff('0x71')];++_0x270798){_0x28abb9=_0x51cef3[_0x8eff('0xde')][_0x270798];var _0x1d9e31=_0x28abb9[_0x8eff('0x7c')]?util['format'](_0x8eff('0xe0'),_0xae8a5e[_0x8eff('0xe1')],_0x28abb9[_0x8eff('0x7c')]):_0x8eff('0xe2');var _0x4df919=_0x2ed342[_0x8eff('0x7d')][_0x8eff('0xe3')]||util[_0x8eff('0xd9')](_0x8eff('0xe0'),_0x8eff('0xe4'),_0x28abb9[_0x8eff('0x75')]);switch(_0xae8a5e[_0x8eff('0xe5')]){case _0x8eff('0xe6'):_0x1d9e31=_0x28abb9[_0x8eff('0x7c')]?util[_0x8eff('0xd9')](_0x8eff('0xe0'),_0xae8a5e[_0x8eff('0xe1')],_0x28abb9[_0x8eff('0x7c')]):_0x8eff('0xe2');break;case _0x8eff('0xe7'):_0x1d9e31=_0x28abb9[_0x8eff('0x7c')]?_0x28abb9[_0x8eff('0xdf')][_0x8eff('0xe8')]||_0x28abb9[_0x8eff('0xdf')][_0x8eff('0x3e')]:'System';break;case'agent_fullname':_0x1d9e31=_0x28abb9[_0x8eff('0x7c')]?_0x28abb9[_0x8eff('0xdf')][_0x8eff('0x3e')]:_0x8eff('0xe2');break;default:_0x1d9e31=_0x28abb9[_0x8eff('0x7c')]?util['format'](_0x8eff('0xe0'),_0xae8a5e[_0x8eff('0xe1')],_0x28abb9[_0x8eff('0x7c')]):_0x8eff('0xe2');}var _0x354882=util[_0x8eff('0xd9')](_0x8eff('0xe9'),moment(_0x28abb9['createdAt'])[_0x8eff('0xd9')](_0x8eff('0xea')),_0x28abb9[_0x8eff('0xeb')]==='in'?_0x4df919:_0x1d9e31,_0x28abb9[_0x8eff('0x7d')]);if(!_0x28abb9[_0x8eff('0xec')]){fs[_0x8eff('0xed')](_0x374b82,_0x354882);}}return db[_0x8eff('0xee')]['findOne']({'where':{'service':!![]},'include':[{'model':db[_0x8eff('0xef')],'as':'Smtp','raw':!![]}]});}}})[_0x8eff('0x22')](function(_0x45cf10){if(_0x45cf10&&_0x45cf10['Smtp']&&_0x2ed342[_0x8eff('0x7d')]){var _0x51c2a8={'tls':{'rejectUnauthorized':![]}};if(_0x45cf10[_0x8eff('0xf0')][_0x8eff('0xf1')]){_0x51c2a8[_0x8eff('0xf1')]=_0x45cf10[_0x8eff('0xf0')]['service'];}else{_0x51c2a8[_0x8eff('0xf2')]=_0x45cf10[_0x8eff('0xf0')]['host'];_0x51c2a8[_0x8eff('0xf3')]=_0x45cf10[_0x8eff('0xf0')][_0x8eff('0xf3')];_0x51c2a8['secure']=_0x45cf10['Smtp'][_0x8eff('0xf4')];}if(_0x45cf10[_0x8eff('0xf0')]['authentication']){_0x51c2a8['auth']={'user':_0x45cf10[_0x8eff('0xf0')][_0x8eff('0xa2')],'pass':_0x45cf10[_0x8eff('0xf0')]['pass']};}return respondWithRpcPromise(_0x8eff('0xf5'),_0x8eff('0xf6'),{'account':_0x51c2a8,'message':{'from':util[_0x8eff('0xd9')](_0x8eff('0xf7'),_0x45cf10[_0x8eff('0x3a')],_0x45cf10['email']||_0x45cf10[_0x8eff('0xf0')][_0x8eff('0xa2')]),'to':_0x2ed342[_0x8eff('0x7d')]['mailTranscript'],'subject':_0x8eff('0xf8'),'text':util[_0x8eff('0xd9')](_0x8eff('0xf9'),_0x2ed342[_0x8eff('0x7d')][_0x8eff('0xd7')]),'attachments':[{'path':_0x374b82}]}})[_0x8eff('0x22')](function(){return _0x51cef3;})[_0x8eff('0x2d')](function(_0x51f22e){console[_0x8eff('0x29')](_0x51f22e);});}else{return _0x51cef3;}})['then'](respondWithStatusCode(_0x5c64ef,0xc8))[_0x8eff('0x2d')](handleError(_0x5c64ef,null));};exports[_0x8eff('0xfa')]=function(_0x4fe183,_0x912eb8,_0x1ae192){return db[_0x8eff('0xdd')][_0x8eff('0x6b')]({'where':{'id':_0x4fe183[_0x8eff('0xbe')]['id']}})[_0x8eff('0x22')](handleEntityNotFound(_0x912eb8,null))[_0x8eff('0x22')](function(_0xe9351c){if(_0xe9351c){return _0xe9351c[_0x8eff('0xfa')](_0x4fe183[_0x8eff('0x7d')][_0x8eff('0xfb')],_[_0x8eff('0xfc')](_0x4fe183[_0x8eff('0x7d')],['ids','id'])||{});}})[_0x8eff('0x22')](respondWithResult(_0x912eb8,null))[_0x8eff('0x2d')](handleError(_0x912eb8,null));};exports['getMessages']=function(_0x428adc,_0x4c5d80,_0x27da0a){var _0x4cd219={'raw':![],'where':{}};var _0xf37a97={};var _0x3bd4f7={'count':0x0,'rows':[]};return db['ChatInteraction'][_0x8eff('0xd1')]({'where':{'id':_0x428adc['params']['id']}})[_0x8eff('0x22')](handleEntityNotFound(_0x4c5d80,null))[_0x8eff('0x22')](function(_0x22d3bb){if(_0x22d3bb){_0xf37a97[_0x8eff('0x47')]=_[_0x8eff('0x7f')](db[_0x8eff('0xdd')][_0x8eff('0x44')]);_0xf37a97[_0x8eff('0x48')]=_[_0x8eff('0x7f')](_0x428adc[_0x8eff('0x48')]);_0xf37a97[_0x8eff('0x49')]=_['intersection'](_0xf37a97[_0x8eff('0x47')],_0xf37a97['query']);_0x4cd219['attributes']=_['intersection'](_0xf37a97[_0x8eff('0x47')],qs[_0x8eff('0x4b')](_0x428adc[_0x8eff('0x48')][_0x8eff('0x4b')]));_0x4cd219[_0x8eff('0xa8')]=_0x4cd219[_0x8eff('0xa8')][_0x8eff('0x71')]?_0x4cd219['attributes']:_0xf37a97[_0x8eff('0x47')];if(!_0x428adc['query'][_0x8eff('0x4c')](_0x8eff('0x4d'))){_0x4cd219[_0x8eff('0x32')]=qs[_0x8eff('0x32')](_0x428adc['query'][_0x8eff('0x32')]);_0x4cd219[_0x8eff('0x31')]=qs[_0x8eff('0x31')](_0x428adc[_0x8eff('0x48')]['offset']);}_0x4cd219[_0x8eff('0x4e')]=qs['sort'](_0x428adc[_0x8eff('0x48')][_0x8eff('0x4f')]);_0x4cd219[_0x8eff('0x50')]=qs[_0x8eff('0x49')](_['pick'](_0x428adc[_0x8eff('0x48')],_0xf37a97[_0x8eff('0x49')]));_0x4cd219[_0x8eff('0x50')][_0x8eff('0xbb')]=_0x22d3bb['id'];if(_0x428adc['query'][_0x8eff('0x90')]){_0x4cd219[_0x8eff('0x50')]=_['merge'](_0x4cd219[_0x8eff('0x50')],{'$or':_[_0x8eff('0x3d')](_0x4cd219['attributes'],function(_0x1b6463){var _0x310ae9={};_0x310ae9[_0x1b6463]={'$like':'%'+_0x428adc[_0x8eff('0x48')][_0x8eff('0x90')]+'%'};return _0x310ae9;})});}if(_0x428adc[_0x8eff('0x48')][_0x8eff('0x88')]){var _0x1b8f75=_0x428adc[_0x8eff('0x48')][_0x8eff('0x88')]['split'](',');var _0xa9ca7a={};_0xa9ca7a[_0x1b8f75[0x0]]={'$gte':moment(_0x1b8f75[0x1])[_0x8eff('0xd9')]('YYYY-MM-DD\x20HH:mm:ss')};_0x4cd219[_0x8eff('0x50')]=_[_0x8eff('0xa7')](_0x4cd219['where'],_0xa9ca7a);}_0x4cd219=_[_0x8eff('0xa7')]({},_0x4cd219,_0x428adc[_0x8eff('0xfd')]);return db[_0x8eff('0xdd')][_0x8eff('0x30')]({'where':_0x4cd219[_0x8eff('0x50')]})[_0x8eff('0x22')](function(_0x4af3b){_0x3bd4f7[_0x8eff('0x30')]=_0x4af3b;if(_0x428adc[_0x8eff('0x48')][_0x8eff('0xbf')]){_0x4cd219['include']=[{'all':!![]}];}return db['ChatMessage'][_0x8eff('0xfe')](_0x4cd219);})['then'](function(_0x44e1eb){_0x3bd4f7['rows']=_0x44e1eb;return _0x3bd4f7;});}})[_0x8eff('0x22')](respondWithFilteredResult(_0x4c5d80,_0x4cd219))['catch'](handleError(_0x4c5d80,null));};exports[_0x8eff('0xff')]=function(_0x36257a,_0x3626d0,_0x4819fe){var _0x47b8d9={'where':{}},_0x1d5567={},_0x3ec2fc={'count':0x0,'rows':[]};return db['ChatInteraction'][_0x8eff('0xd1')]({'where':{'id':_0x36257a[_0x8eff('0xbe')]['id']}})[_0x8eff('0x22')](handleEntityNotFound(_0x3626d0,null))[_0x8eff('0x22')](function(_0x3b7733){if(_0x3b7733){_0x1d5567[_0x8eff('0x47')]=_[_0x8eff('0x7f')](db['ChatMessage'][_0x8eff('0x44')]);_0x1d5567['query']=_['keys'](_0x36257a[_0x8eff('0x48')]);_0x1d5567['filters']=_[_0x8eff('0x4a')](_0x1d5567[_0x8eff('0x47')],_0x1d5567[_0x8eff('0x48')]);_0x47b8d9['attributes']=_[_0x8eff('0x4a')](_0x1d5567[_0x8eff('0x47')],qs[_0x8eff('0x4b')](_0x36257a[_0x8eff('0x48')]['fields']));_0x47b8d9[_0x8eff('0xa8')]=_0x47b8d9[_0x8eff('0xa8')][_0x8eff('0x71')]?_0x47b8d9[_0x8eff('0xa8')]:_0x1d5567[_0x8eff('0x47')];if(!_0x36257a[_0x8eff('0x48')]['hasOwnProperty'](_0x8eff('0x4d'))){_0x47b8d9[_0x8eff('0x32')]=qs[_0x8eff('0x32')](_0x36257a[_0x8eff('0x48')][_0x8eff('0x32')]);_0x47b8d9[_0x8eff('0x31')]=qs[_0x8eff('0x31')](_0x36257a['query'][_0x8eff('0x31')]);}_0x47b8d9[_0x8eff('0x4e')]=qs[_0x8eff('0x4f')](_0x36257a[_0x8eff('0x48')][_0x8eff('0x4f')]);_0x47b8d9[_0x8eff('0x50')]=qs[_0x8eff('0x49')](_[_0x8eff('0x51')](_0x36257a[_0x8eff('0x48')],_0x1d5567[_0x8eff('0x49')]));_0x47b8d9[_0x8eff('0x50')][_0x8eff('0xbb')]=_0x3b7733['id'];if(_0x36257a[_0x8eff('0x48')][_0x8eff('0x90')]){_0x47b8d9[_0x8eff('0x50')]=_['merge'](_0x47b8d9[_0x8eff('0x50')],{'$or':_['map'](_0x47b8d9['attributes'],function(_0x1502d2){var _0x35d931={};_0x35d931[_0x1502d2]={'$like':'%'+_0x36257a[_0x8eff('0x48')]['filter']+'%'};return _0x35d931;})});}_0x47b8d9['where']['secret']=![];if(_0x36257a[_0x8eff('0x48')]['id']){_0x47b8d9[_0x8eff('0x50')]['id']={'$gt':_0x36257a[_0x8eff('0x48')]['id']};}_0x47b8d9=_[_0x8eff('0xa7')]({},_0x47b8d9,_0x36257a[_0x8eff('0xfd')]);return db[_0x8eff('0xdd')][_0x8eff('0x30')]({'where':_0x47b8d9[_0x8eff('0x50')]})['then'](function(_0x3b6bdf){_0x3ec2fc[_0x8eff('0x30')]=_0x3b6bdf;_0x47b8d9[_0x8eff('0x100')]=[];if(_0x36257a[_0x8eff('0x48')][_0x8eff('0x101')]){_0x47b8d9[_0x8eff('0x100')][_0x8eff('0x43')]({'model':db['User'],'as':_0x8eff('0xdf'),'attributes':['id',_0x8eff('0x3e'),_0x8eff('0xe8')]});}if(_0x36257a[_0x8eff('0x48')][_0x8eff('0xbf')]){_0x47b8d9[_0x8eff('0x100')]=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x47b8d9);})['then'](function(_0xd03bcb){_0x3ec2fc['rows']=_0xd03bcb;return _0x3ec2fc;});}})[_0x8eff('0x22')](respondWithFilteredResult(_0x3626d0,_0x47b8d9))[_0x8eff('0x2d')](handleError(_0x3626d0,null));};exports['addTags']=function(_0x57b56a,_0x52ef48,_0x418c9e){return db[_0x8eff('0xc0')][_0x8eff('0x6b')]({'where':{'id':_0x57b56a[_0x8eff('0xbe')]['id']}})[_0x8eff('0x22')](handleEntityNotFound(_0x52ef48,null))[_0x8eff('0x22')](function(_0x2ed550){if(_0x2ed550){return _0x2ed550['setTags'](_0x57b56a[_0x8eff('0x7d')][_0x8eff('0xfb')],_[_0x8eff('0xfc')](_0x57b56a[_0x8eff('0x7d')],[_0x8eff('0xfb'),'id'])||{})[_0x8eff('0x102')](function(){return db[_0x8eff('0x78')][_0x8eff('0xfe')]({'attributes':['id',_0x8eff('0x3a'),_0x8eff('0x54')],'where':{'id':_0x57b56a[_0x8eff('0x7d')][_0x8eff('0xfb')]}});})[_0x8eff('0x22')](function(_0x3781aa){socket[_0x8eff('0x103')](_0x8eff('0x104'),{'id':Number(_0x57b56a[_0x8eff('0xbe')]['id']),'tags':_0x3781aa||[]});return{'id':Number(_0x57b56a['params']['id']),'tags':_0x3781aa||[]};});}})[_0x8eff('0x22')](respondWithResult(_0x52ef48,null))[_0x8eff('0x2d')](handleError(_0x52ef48,null));};exports[_0x8eff('0x105')]=function(_0x4df5d5,_0x4f7608,_0x16abf6){return db[_0x8eff('0xc0')]['find']({'where':{'id':_0x4df5d5[_0x8eff('0xbe')]['id']}})[_0x8eff('0x22')](handleEntityNotFound(_0x4f7608,null))[_0x8eff('0x22')](function(_0x1ca0a5){if(_0x1ca0a5){return _0x1ca0a5[_0x8eff('0x105')](_0x4df5d5[_0x8eff('0x48')][_0x8eff('0xfb')]);}})['then'](respondWithStatusCode(_0x4f7608,null))['catch'](handleError(_0x4f7608,null));};exports[_0x8eff('0xd3')]=function(_0x2bfd90,_0x17767c){var _0x29419b=moment()['unix']()[_0x8eff('0xa5')]();var _0x555ff7=path[_0x8eff('0x106')](config['root'],_0x8eff('0x107'),'files',_0x8eff('0x108'));var _0xcd9723=path['join'](config[_0x8eff('0xd4')],_0x8eff('0x107'),_0x8eff('0x109'),_0x8eff('0x10a'));var _0x28594b=path[_0x8eff('0x106')](_0x555ff7,_0x29419b);var _0x3bdad7=util[_0x8eff('0xd9')](_0x8eff('0x10b'),_0x2bfd90['params']['id'],_0x29419b);var _0x248cde=path['join'](_0x555ff7,_0x3bdad7);var _0x32ba69=[];_0x32ba69[_0x8eff('0x43')]({'model':db['User'],'as':_0x8eff('0xdf'),'attributes':['id','fullname'],'raw':!![]});_0x32ba69[_0x8eff('0x43')]({'model':db[_0x8eff('0x10c')],'as':_0x8eff('0x6f'),'attributes':['id',_0x8eff('0x10d'),_0x8eff('0x10e')],'raw':!![]});if(_0x2bfd90['query']['attachments']){_0x32ba69[_0x8eff('0x43')]({'model':db['Attachment'],'as':'Attachment','raw':!![]});}var _0x92c5be=[{'model':db['ChatMessage'],'as':_0x8eff('0xde'),'attributes':['id',_0x8eff('0x7d'),'createdAt',_0x8eff('0xeb'),_0x8eff('0xec'),_0x8eff('0x8c')],'include':_0x32ba69}];_0x92c5be['push']({'model':db[_0x8eff('0x10f')],'as':'Account','attributes':['id',_0x8eff('0x3a')]});_0x92c5be[_0x8eff('0x43')]({'model':db['User'],'as':_0x8eff('0x110'),'attributes':['id',_0x8eff('0x3e')]});return db[_0x8eff('0xc0')]['find']({'where':{'id':_0x2bfd90[_0x8eff('0xbe')]['id']},'include':_0x92c5be})['then'](handleEntityNotFound(_0x17767c,null))[_0x8eff('0x22')](function(_0x462412){if(_0x462412){var _0x395581=_0x462412[_0x8eff('0x111')]({'plain':!![]});fs[_0x8eff('0x112')](_0x28594b);var _0x1f2ae8={'format':'A4','border':'10px','header':{'height':_0x8eff('0x113'),'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
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'}},'footer':{'height':_0x8eff('0x114'),'contents':{'default':util[_0x8eff('0xd9')](_0x8eff('0x115'),util[_0x8eff('0xd9')](_0x8eff('0x116'),_0x8eff('0x117'),_0x395581['id']),moment()[_0x8eff('0xd9')](_0x8eff('0x118'))[_0x8eff('0xa5')]())}}};var _0x4e20f5={'channel':_0x8eff('0x117'),'account':_0x395581['Account'][_0x8eff('0x3a')],'agent':_0x395581['Owner']?_0x395581[_0x8eff('0x110')]['fullname']:_0x8eff('0x119'),'createdAt':moment(_0x395581[_0x8eff('0x86')])[_0x8eff('0xd9')](_0x8eff('0x11a'))[_0x8eff('0xa5')](),'closedAt':_0x395581[_0x8eff('0xc7')]?moment(_0x395581['closedAt'])[_0x8eff('0xd9')]('YYYY-MM-DD\x20HH:mm:ss')[_0x8eff('0xa5')]():'','disposition':_0x395581[_0x8eff('0x11b')],'chatInfo':{'browser':_0x395581['browserName'],'os':_0x395581[_0x8eff('0x11c')],'referer':_0x395581[_0x8eff('0x11d')],'customerIp':_0x395581[_0x8eff('0x11e')],'customerPort':_0x395581['customerPort']?_0x395581[_0x8eff('0x11f')]:_0x8eff('0x119')},'messages':_(_0x395581[_0x8eff('0xde')])[_0x8eff('0x120')]()[_0x8eff('0x90')]({'secret':![]})[_0x8eff('0x3d')](function(_0x5e1cc7){if(_0x5e1cc7[_0x8eff('0xcf')]){var _0x99f3dd=path[_0x8eff('0x106')](_0xcd9723,_0x5e1cc7[_0x8eff('0xcf')][_0x8eff('0xcb')]);if(fs[_0x8eff('0x121')](_0x99f3dd)){fs['createReadStream'](_0x99f3dd)[_0x8eff('0x122')](fs[_0x8eff('0x123')](path[_0x8eff('0x106')](_0x28594b,_0x5e1cc7[_0x8eff('0xcf')][_0x8eff('0xcb')])));}}return{'date':moment(_0x5e1cc7[_0x8eff('0x86')])[_0x8eff('0xd9')](_0x8eff('0x11a'))['toString'](),'sender':_0x5e1cc7['direction']===_0x8eff('0x124')?_0x5e1cc7[_0x8eff('0xdf')]?_0x5e1cc7[_0x8eff('0xdf')][_0x8eff('0x3e')]:_0x8eff('0xe2'):_0x5e1cc7[_0x8eff('0x6f')][_0x8eff('0x10d')]+(_0x5e1cc7[_0x8eff('0x6f')][_0x8eff('0x10e')]?'\x20'+_0x5e1cc7[_0x8eff('0x6f')]['lastName']:''),'body':_0x5e1cc7['Attachment']?_0x5e1cc7[_0x8eff('0xcf')][_0x8eff('0xcb')]:_0x5e1cc7[_0x8eff('0x7d')],'direction':_0x5e1cc7[_0x8eff('0xeb')]==='out'?'A':'C','secret':_0x5e1cc7['secret'],'read':_0x5e1cc7[_0x8eff('0x8c')],'attachment':_0x5e1cc7['Attachment']};})[_0x8eff('0x6c')]()};return ejs[_0x8eff('0x125')](path[_0x8eff('0x106')](config[_0x8eff('0xd4')],_0x8eff('0x107'),_0x8eff('0x126'),_0x8eff('0x127')),{'interaction':_0x4e20f5})[_0x8eff('0x22')](function(_0x34f5d8){return new BPromise(function(_0x2a88bb,_0x3ec815){pdf[_0x8eff('0xc1')](_0x34f5d8,_0x1f2ae8)[_0x8eff('0x128')](path[_0x8eff('0x106')](_0x28594b,_0x8eff('0x129')+_0x395581['id']+'-'+_0x29419b+_0x8eff('0x12a')),function(_0x5f3f16,_0x4bc36){if(_0x5f3f16)return _0x3ec815(_0x5f3f16);_0x2a88bb(_0x4bc36);});});})[_0x8eff('0x22')](function(){return new BPromise(function(_0x348fed,_0x354d74){zipdir(_0x28594b,{'saveTo':_0x248cde},function(_0x596150,_0x36665f){if(_0x596150)return _0x354d74(_0x596150);return _0x348fed(_0x36665f);});})[_0x8eff('0x22')](function(){return new BPromise(function(_0x662c1b,_0x5c0e8d){rimraf(_0x28594b,function(_0x3dede3){if(_0x3dede3)_0x5c0e8d(_0x3dede3);return _0x662c1b();});});})['then'](function(){return _0x17767c[_0x8eff('0xd3')](_0x248cde,_0x3bdad7,function(_0x303d97){if(_0x303d97){console['log'](_0x8eff('0x12b'),_0x303d97);}else{fs[_0x8eff('0x12c')](_0x248cde);}});});});}else{return _0x17767c['sendStatus'](0xc8);}})['catch'](handleError(_0x17767c,null));};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js
index ecfddc7..c1e7f7a 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 _0xb302=['setDataValue','Users','map','length','emit','hook','../../mysqldb','ChatInteraction','setMaxListeners','save','update','remove','getUsers','then'];(function(_0x18e4eb,_0x26f268){var _0x226492=function(_0x4ea5c3){while(--_0x4ea5c3){_0x18e4eb['push'](_0x18e4eb['shift']());}};_0x226492(++_0x26f268);}(_0xb302,0x12c));var _0x2b30=function(_0xfb44bd,_0xc7c80){_0xfb44bd=_0xfb44bd-0x0;var _0x5cb665=_0xb302[_0xfb44bd];return _0x5cb665;};'use strict';var EventEmitter=require('events');var ChatInteraction=require(_0x2b30('0x0'))['db'][_0x2b30('0x1')];var ChatMessage=require(_0x2b30('0x0'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x2b30('0x2')](0x0);var events={'afterCreate':_0x2b30('0x3'),'afterUpdate':_0x2b30('0x4'),'afterDestroy':_0x2b30('0x5')};function emitEvent(_0xffa1ae){return function(_0x12ec26,_0x2bb6fe,_0x13a233){_0x12ec26[_0x2b30('0x6')]({'attributes':['id'],'raw':!![]})[_0x2b30('0x7')](function(_0x5ad21e){_0x12ec26[_0x2b30('0x8')](_0x2b30('0x9'),_0x5ad21e[_0x2b30('0xa')](function(_0x5e8892){return{'id':_0x5e8892['id']};}));return ChatMessage['findAll']({'where':{'ChatInteractionId':_0x12ec26['id'],'direction':'in','read':![]},'raw':!![]});})[_0x2b30('0x7')](function(_0x16fadb){_0x12ec26[_0x2b30('0x8')]('unreadMessages',_0x16fadb[_0x2b30('0xb')]);ChatInteractionEvents[_0x2b30('0xc')](_0xffa1ae+':'+_0x12ec26['id'],_0x12ec26);ChatInteractionEvents[_0x2b30('0xc')](_0xffa1ae,_0x12ec26);_0x13a233(null);})['catch'](_0x13a233(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInteraction[_0x2b30('0xd')](e,emitEvent(event));}}module['exports']=ChatInteractionEvents;
\ No newline at end of file
+var _0xa93a=['length','emit','catch','hasOwnProperty','ChatInteraction','setMaxListeners','update','getUsers','setDataValue','map','findAll','then'];(function(_0x14caeb,_0x2a9c55){var _0x395418=function(_0x5e85f9){while(--_0x5e85f9){_0x14caeb['push'](_0x14caeb['shift']());}};_0x395418(++_0x2a9c55);}(_0xa93a,0xb8));var _0xaa93=function(_0x59eb88,_0xfdceed){_0x59eb88=_0x59eb88-0x0;var _0x5a3ea5=_0xa93a[_0x59eb88];return _0x5a3ea5;};'use strict';var EventEmitter=require('events');var ChatInteraction=require('../../mysqldb')['db'][_0xaa93('0x0')];var ChatMessage=require('../../mysqldb')['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0xaa93('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xaa93('0x2'),'afterDestroy':'remove'};function emitEvent(_0x242aa2){return function(_0x181549,_0x2705c9,_0xed4247){_0x181549[_0xaa93('0x3')]({'attributes':['id'],'raw':!![]})['then'](function(_0x353544){_0x181549[_0xaa93('0x4')]('Users',_0x353544[_0xaa93('0x5')](function(_0x4bb171){return{'id':_0x4bb171['id']};}));return ChatMessage[_0xaa93('0x6')]({'where':{'ChatInteractionId':_0x181549['id'],'direction':'in','read':![]},'raw':!![]});})[_0xaa93('0x7')](function(_0x5409d9){_0x181549['setDataValue']('unreadMessages',_0x5409d9[_0xaa93('0x8')]);ChatInteractionEvents['emit'](_0x242aa2+':'+_0x181549['id'],_0x181549);ChatInteractionEvents[_0xaa93('0x9')](_0x242aa2,_0x181549);_0xed4247(null);})[_0xaa93('0xa')](_0xed4247(null));};}for(var e in events){if(events[_0xaa93('0xb')](e)){var event=events[e];ChatInteraction['hook'](e,emitEvent(event));}}module['exports']=ChatInteractionEvents;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js
index c33a3f8..3cf3912 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 _0x524c=['rimraf','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','changed','closedAt','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','moment','bluebird','request-promise'];(function(_0x18d8f1,_0x2ee9ee){var _0x33ccc2=function(_0x2e3471){while(--_0x2e3471){_0x18d8f1['push'](_0x18d8f1['shift']());}};_0x33ccc2(++_0x2ee9ee);}(_0x524c,0x1eb));var _0xc524=function(_0x499a1e,_0x4c0892){_0x499a1e=_0x499a1e-0x0;var _0x280818=_0x524c[_0x499a1e];return _0x280818;};'use strict';var _=require(_0xc524('0x0'));var util=require('util');var logger=require(_0xc524('0x1'))('api');var moment=require(_0xc524('0x2'));var BPromise=require(_0xc524('0x3'));var rp=require(_0xc524('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc524('0x5'));var config=require('../../config/environment');var attributes=require(_0xc524('0x6'));module[_0xc524('0x7')]=function(_0x2f706c,_0x366ef7){return _0x2f706c[_0xc524('0x8')](_0xc524('0x9'),attributes,{'tableName':_0xc524('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x322d32,_0xb97d59,_0x32dd22){if(_0x322d32[_0xc524('0xb')]('closed')){_0x322d32[_0xc524('0xc')]=moment()['format'](_0xc524('0xd'));}_0x32dd22(null,_0x322d32);}},'charset':_0xc524('0xe'),'collate':_0xc524('0xf')});};
\ No newline at end of file
+var _0x26a4=['./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','changed','closedAt','format','utf8mb4','utf8mb4_unicode_ci','../../config/logger','api','moment','bluebird','path','../../config/environment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x26a4,0x1aa));var _0x426a=function(_0x4f4bed,_0x4dff8f){_0x4f4bed=_0x4f4bed-0x0;var _0x1bb1d4=_0x26a4[_0x4f4bed];return _0x1bb1d4;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x426a('0x0'))(_0x426a('0x1'));var moment=require(_0x426a('0x2'));var BPromise=require(_0x426a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x426a('0x4'));var rimraf=require('rimraf');var config=require(_0x426a('0x5'));var attributes=require(_0x426a('0x6'));module[_0x426a('0x7')]=function(_0x31bfc8,_0x807e32){return _0x31bfc8[_0x426a('0x8')](_0x426a('0x9'),attributes,{'tableName':_0x426a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3f5273,_0x8df642,_0x13eaf1){if(_0x3f5273[_0x426a('0xb')]('closed')){_0x3f5273[_0x426a('0xc')]=moment()[_0x426a('0xd')]('YYYY-MM-DD\x20HH:mm:ss');}_0x13eaf1(null,_0x3f5273);}},'charset':_0x426a('0xe'),'collate':_0x426a('0xf')});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js
index 647eb65..d294731 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 _0x6789=['spread','AddTags','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','register','then','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatInteraction,\x20%s,\x20%s','info','result','catch','UpdateChatInteraction','ChatInteraction','update','body','options','raw','where','attributes','limit','AddTagsToChatInteraction','find','addTags','ids','omit'];(function(_0x3bae28,_0x5ca4f5){var _0xb431b=function(_0x1ef970){while(--_0x1ef970){_0x3bae28['push'](_0x3bae28['shift']());}};_0xb431b(++_0x5ca4f5);}(_0x6789,0x89));var _0x9678=function(_0x25d82,_0x3b85fc){_0x25d82=_0x25d82-0x0;var _0x27de85=_0x6789[_0x25d82];return _0x27de85;};'use strict';var _=require(_0x9678('0x0'));var util=require(_0x9678('0x1'));var moment=require('moment');var BPromise=require(_0x9678('0x2'));var rs=require(_0x9678('0x3'));var fs=require('fs');var Redis=require(_0x9678('0x4'));var db=require(_0x9678('0x5'))['db'];var utils=require(_0x9678('0x6'));var logger=require(_0x9678('0x7'))('rpc');var config=require(_0x9678('0x8'));var jayson=require(_0x9678('0x9'));var client=jayson[_0x9678('0xa')]['http']({'port':0x232a});config[_0x9678('0xb')]=_[_0x9678('0xc')](config[_0x9678('0xb')],{'host':_0x9678('0xd'),'port':0x18eb});var socket=require(_0x9678('0xe'))(new Redis(config[_0x9678('0xb')]));require(_0x9678('0xf'))[_0x9678('0x10')](socket);function respondWithRpcPromise(_0x22e2a1,_0xb5e2a,_0x1b2628){return new BPromise(function(_0x589bb0,_0x1743c9){return client['request'](_0x22e2a1,_0x1b2628)[_0x9678('0x11')](function(_0x2d51a7){logger['info']('ChatInteraction,\x20%s,\x20%s',_0xb5e2a,_0x9678('0x12'));logger[_0x9678('0x13')](_0x9678('0x14'),_0xb5e2a,_0x9678('0x12'),JSON[_0x9678('0x15')](_0x2d51a7));if(_0x2d51a7['error']){if(_0x2d51a7[_0x9678('0x16')][_0x9678('0x17')]===0x1f4){logger[_0x9678('0x16')]('ChatInteraction,\x20%s,\x20%s',_0xb5e2a,_0x2d51a7[_0x9678('0x16')]['message']);return _0x1743c9(_0x2d51a7['error'][_0x9678('0x18')]);}logger[_0x9678('0x16')](_0x9678('0x19'),_0xb5e2a,_0x2d51a7['error']['message']);return _0x589bb0(_0x2d51a7[_0x9678('0x16')][_0x9678('0x18')]);}else{logger[_0x9678('0x1a')](_0x9678('0x19'),_0xb5e2a,_0x9678('0x12'));_0x589bb0(_0x2d51a7[_0x9678('0x1b')][_0x9678('0x18')]);}})[_0x9678('0x1c')](function(_0x1c24e0){logger[_0x9678('0x16')]('ChatInteraction,\x20%s,\x20%s',_0xb5e2a,_0x1c24e0);_0x1743c9(_0x1c24e0);});});}exports[_0x9678('0x1d')]=function(_0x59fd58){var _0x4c206b=this;return new Promise(function(_0x3e2f02,_0x2c45a0){return db[_0x9678('0x1e')][_0x9678('0x1f')](_0x59fd58[_0x9678('0x20')],{'raw':_0x59fd58[_0x9678('0x21')]?_0x59fd58[_0x9678('0x21')][_0x9678('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59fd58[_0x9678('0x21')]?_0x59fd58[_0x9678('0x21')][_0x9678('0x23')]||null:null,'attributes':_0x59fd58[_0x9678('0x21')]?_0x59fd58[_0x9678('0x21')][_0x9678('0x24')]||null:null,'limit':_0x59fd58['options']?_0x59fd58['options'][_0x9678('0x25')]||null:null})[_0x9678('0x11')](function(_0x52f250){logger[_0x9678('0x1a')](_0x9678('0x1d'),_0x59fd58);logger['debug']('UpdateChatInteraction',_0x59fd58,JSON[_0x9678('0x15')](_0x52f250));_0x3e2f02(_0x52f250);})[_0x9678('0x1c')](function(_0x54d883){logger[_0x9678('0x16')]('UpdateChatInteraction',_0x54d883['message'],_0x59fd58);_0x2c45a0(_0x4c206b[_0x9678('0x16')](0x1f4,_0x54d883['message']));});});};exports[_0x9678('0x26')]=function(_0x44e978){return new Promise(function(_0x383d2e,_0x405902){return db['ChatInteraction'][_0x9678('0x27')]({'where':_0x44e978[_0x9678('0x21')]?_0x44e978['options'][_0x9678('0x23')]||null:null})[_0x9678('0x11')](function(_0x360a18){if(_0x360a18){return _0x360a18[_0x9678('0x28')](_0x44e978[_0x9678('0x20')][_0x9678('0x29')],_[_0x9678('0x2a')](_0x44e978[_0x9678('0x20')],[_0x9678('0x29'),'id'])||{});}})[_0x9678('0x2b')](function(_0x27d866){logger[_0x9678('0x1a')](_0x9678('0x2c'),_0x44e978);logger[_0x9678('0x13')](_0x9678('0x2c'),_0x44e978,JSON['stringify'](_0x27d866));_0x383d2e(_0x27d866);})['catch'](function(_0x136fbb){logger[_0x9678('0x16')](_0x9678('0x2c'),_0x136fbb[_0x9678('0x18')],_0x44e978);_0x405902(_this[_0x9678('0x16')](0x1f4,_0x136fbb['message']));});});};
\ No newline at end of file
+var _0x2d80=['update','options','raw','where','attributes','debug','AddTagsToChatInteraction','find','body','omit','spread','AddTags','stringify','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','defaults','redis','socket.io-emitter','./chatInteraction.socket','register','request','then','ChatInteraction,\x20%s,\x20%s','request\x20sent','error','code','message','info','result','catch','UpdateChatInteraction','ChatInteraction'];(function(_0x3ac3c9,_0xe0bde0){var _0x357ef7=function(_0x339167){while(--_0x339167){_0x3ac3c9['push'](_0x3ac3c9['shift']());}};_0x357ef7(++_0xe0bde0);}(_0x2d80,0xdf));var _0x02d8=function(_0x4bd8e1,_0x5e9388){_0x4bd8e1=_0x4bd8e1-0x0;var _0x286282=_0x2d80[_0x4bd8e1];return _0x286282;};'use strict';var _=require(_0x02d8('0x0'));var util=require(_0x02d8('0x1'));var moment=require(_0x02d8('0x2'));var BPromise=require(_0x02d8('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x02d8('0x4'));var db=require(_0x02d8('0x5'))['db'];var utils=require(_0x02d8('0x6'));var logger=require(_0x02d8('0x7'))(_0x02d8('0x8'));var config=require(_0x02d8('0x9'));var jayson=require(_0x02d8('0xa'));var client=jayson[_0x02d8('0xb')]['http']({'port':0x232a});config['redis']=_[_0x02d8('0xc')](config[_0x02d8('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0x02d8('0xe'))(new Redis(config[_0x02d8('0xd')]));require(_0x02d8('0xf'))[_0x02d8('0x10')](socket);function respondWithRpcPromise(_0x539b31,_0x4ce21d,_0x549dfe){return new BPromise(function(_0x587c5f,_0x37e756){return client[_0x02d8('0x11')](_0x539b31,_0x549dfe)[_0x02d8('0x12')](function(_0x36b2f5){logger['info'](_0x02d8('0x13'),_0x4ce21d,'request\x20sent');logger['debug']('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x4ce21d,_0x02d8('0x14'),JSON['stringify'](_0x36b2f5));if(_0x36b2f5[_0x02d8('0x15')]){if(_0x36b2f5[_0x02d8('0x15')][_0x02d8('0x16')]===0x1f4){logger[_0x02d8('0x15')](_0x02d8('0x13'),_0x4ce21d,_0x36b2f5[_0x02d8('0x15')]['message']);return _0x37e756(_0x36b2f5[_0x02d8('0x15')][_0x02d8('0x17')]);}logger[_0x02d8('0x15')](_0x02d8('0x13'),_0x4ce21d,_0x36b2f5[_0x02d8('0x15')][_0x02d8('0x17')]);return _0x587c5f(_0x36b2f5[_0x02d8('0x15')]['message']);}else{logger[_0x02d8('0x18')](_0x02d8('0x13'),_0x4ce21d,_0x02d8('0x14'));_0x587c5f(_0x36b2f5[_0x02d8('0x19')][_0x02d8('0x17')]);}})[_0x02d8('0x1a')](function(_0x1b716d){logger[_0x02d8('0x15')](_0x02d8('0x13'),_0x4ce21d,_0x1b716d);_0x37e756(_0x1b716d);});});}exports[_0x02d8('0x1b')]=function(_0x677fe9){var _0x549b1f=this;return new Promise(function(_0x572a34,_0x36db41){return db[_0x02d8('0x1c')][_0x02d8('0x1d')](_0x677fe9['body'],{'raw':_0x677fe9['options']?_0x677fe9[_0x02d8('0x1e')][_0x02d8('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x677fe9['options']?_0x677fe9['options'][_0x02d8('0x20')]||null:null,'attributes':_0x677fe9[_0x02d8('0x1e')]?_0x677fe9[_0x02d8('0x1e')][_0x02d8('0x21')]||null:null,'limit':_0x677fe9[_0x02d8('0x1e')]?_0x677fe9[_0x02d8('0x1e')]['limit']||null:null})[_0x02d8('0x12')](function(_0x2803cd){logger[_0x02d8('0x18')](_0x02d8('0x1b'),_0x677fe9);logger[_0x02d8('0x22')](_0x02d8('0x1b'),_0x677fe9,JSON['stringify'](_0x2803cd));_0x572a34(_0x2803cd);})[_0x02d8('0x1a')](function(_0xd12527){logger[_0x02d8('0x15')](_0x02d8('0x1b'),_0xd12527[_0x02d8('0x17')],_0x677fe9);_0x36db41(_0x549b1f[_0x02d8('0x15')](0x1f4,_0xd12527[_0x02d8('0x17')]));});});};exports[_0x02d8('0x23')]=function(_0xcff579){return new Promise(function(_0x47e526,_0x793ab0){return db[_0x02d8('0x1c')][_0x02d8('0x24')]({'where':_0xcff579[_0x02d8('0x1e')]?_0xcff579['options']['where']||null:null})[_0x02d8('0x12')](function(_0x1f393b){if(_0x1f393b){return _0x1f393b['addTags'](_0xcff579[_0x02d8('0x25')]['ids'],_[_0x02d8('0x26')](_0xcff579['body'],['ids','id'])||{});}})[_0x02d8('0x27')](function(_0x15a209){logger[_0x02d8('0x18')](_0x02d8('0x28'),_0xcff579);logger['debug'](_0x02d8('0x28'),_0xcff579,JSON[_0x02d8('0x29')](_0x15a209));_0x47e526(_0x15a209);})['catch'](function(_0x39337e){logger[_0x02d8('0x15')]('AddTags',_0x39337e['message'],_0xcff579);_0x793ab0(_this['error'](0x1f4,_0x39337e[_0x02d8('0x17')]));});});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js
index 164e7a7..419292f 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 _0xa860=['chatInteraction:','save','remove','update','emit','removeListener','register','length'];(function(_0x1a2212,_0x2a54e9){var _0x186d86=function(_0x54d152){while(--_0x54d152){_0x1a2212['push'](_0x1a2212['shift']());}};_0x186d86(++_0x2a54e9);}(_0xa860,0x71));var _0x0a86=function(_0x1c9e4b,_0x2b623d){_0x1c9e4b=_0x1c9e4b-0x0;var _0x3fb102=_0xa860[_0x1c9e4b];return _0x3fb102;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0x0a86('0x0'),_0x0a86('0x1'),_0x0a86('0x2')];function createListener(_0x32a033,_0x24f2bf){return function(_0x7bf99b){_0x24f2bf[_0x0a86('0x3')](_0x32a033,_0x7bf99b);};}function removeListener(_0x4d487c,_0x2555cb){return function(){ChatInteractionEvents[_0x0a86('0x4')](_0x4d487c,_0x2555cb);};}exports[_0x0a86('0x5')]=function(_0x241441){for(var _0x469149=0x0,_0x3ba7db=events[_0x0a86('0x6')];_0x469149<_0x3ba7db;_0x469149++){var _0x5ccc3c=events[_0x469149];var _0x47854b=createListener(_0x0a86('0x7')+_0x5ccc3c,_0x241441);ChatInteractionEvents['on'](_0x5ccc3c,_0x47854b);}};
\ No newline at end of file
+var _0x0ad3=['emit','register','./chatInteraction.events','save','remove'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0ad3,0x188));var _0x30ad=function(_0x301ee6,_0x5aff44){_0x301ee6=_0x301ee6-0x0;var _0x2024be=_0x0ad3[_0x301ee6];return _0x2024be;};'use strict';var ChatInteractionEvents=require(_0x30ad('0x0'));var events=[_0x30ad('0x1'),_0x30ad('0x2'),'update'];function createListener(_0x4e7e36,_0x5d7535){return function(_0x3d174f){_0x5d7535[_0x30ad('0x3')](_0x4e7e36,_0x3d174f);};}function removeListener(_0x512096,_0x264989){return function(){ChatInteractionEvents['removeListener'](_0x512096,_0x264989);};}exports[_0x30ad('0x4')]=function(_0x261dd1){for(var _0x2c7c2f=0x0,_0x22bed7=events['length'];_0x2c7c2f<_0x22bed7;_0x2c7c2f++){var _0x3f7bb1=events[_0x2c7c2f];var _0x51e01b=createListener('chatInteraction:'+_0x3f7bb1,_0x261dd1);ChatInteractionEvents['on'](_0x3f7bb1,_0x51e01b);}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js
index 7f62eed..80e29f5 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 _0xb227=['../../config/environment','./chatInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','isChatInteractionAuthorized','show','/:id/attachment_download','/:id/messages','/:id/my_messages','/:id/download','post','create','join','root','server/files/attachments/','format','%s-%s','originalname','attachmentUpload','addMessage','tracked','chat','chatinteraction:addtags','addTags','update','customUpdate','put','/:id/abandon','abandon','/:id/close','close','delete','chatinteraction:destroy','destroy','/:id/tags','removeTags','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x1c7279,_0x3a404a){var _0x5d36e4=function(_0x594526){while(--_0x594526){_0x1c7279['push'](_0x1c7279['shift']());}};_0x5d36e4(++_0x3a404a);}(_0xb227,0x1a0));var _0x7b22=function(_0x5b4023,_0x4a7d0f){_0x5b4023=_0x5b4023-0x0;var _0x44d0a7=_0xb227[_0x5b4023];return _0x44d0a7;};'use strict';var multer=require(_0x7b22('0x0'));var util=require(_0x7b22('0x1'));var path=require(_0x7b22('0x2'));var timeout=require(_0x7b22('0x3'));var express=require(_0x7b22('0x4'));var router=express[_0x7b22('0x5')]();var auth=require(_0x7b22('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x7b22('0x7'));var controller=require(_0x7b22('0x8'));router[_0x7b22('0x9')]('/',auth[_0x7b22('0xa')](),controller[_0x7b22('0xb')]);router[_0x7b22('0x9')](_0x7b22('0xc'),auth[_0x7b22('0xa')](),controller[_0x7b22('0xd')]);router[_0x7b22('0x9')](_0x7b22('0xe'),auth[_0x7b22('0xf')](),controller[_0x7b22('0x10')]);router[_0x7b22('0x9')](_0x7b22('0x11'),auth['isChatInteractionAuthorized'](),controller['attachmentDownload']);router[_0x7b22('0x9')](_0x7b22('0x12'),auth[_0x7b22('0xa')](),controller['getMessages']);router[_0x7b22('0x9')](_0x7b22('0x13'),auth['isChatInteractionAuthorized'](),controller['getMyMessages']);router[_0x7b22('0x9')](_0x7b22('0x14'),auth[_0x7b22('0xa')](),controller['download']);router[_0x7b22('0x15')]('/',auth['isAuthenticated'](),controller[_0x7b22('0x16')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x30efe5,_0x3a4eed,_0x51170b){_0x51170b(null,path[_0x7b22('0x17')](config[_0x7b22('0x18')],_0x7b22('0x19')));},'filename':function(_0x48a68a,_0x1df7bc,_0x518f65){_0x518f65(null,util[_0x7b22('0x1a')](_0x7b22('0x1b'),Date['now'](),_0x1df7bc[_0x7b22('0x1c')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x7b22('0x15')]('/:id/attachment_upload',upload['single']('file'),controller[_0x7b22('0x1d')]);router[_0x7b22('0x15')]('/:id/messages',auth['isChatInteractionAuthorized'](),controller[_0x7b22('0x1e')]);router[_0x7b22('0x15')]('/:id/tags',auth[_0x7b22('0xa')](),interaction[_0x7b22('0x1f')](_0x7b22('0x20'),_0x7b22('0x21')),controller[_0x7b22('0x22')]);router['put']('/:id',auth[_0x7b22('0xa')](),interaction['tracked'](_0x7b22('0x20'),'chatinteraction:update'),controller[_0x7b22('0x23')]);router['put']('/:id/custom_update',controller[_0x7b22('0x24')]);router[_0x7b22('0x25')](_0x7b22('0x26'),auth[_0x7b22('0xf')](),controller[_0x7b22('0x27')]);router[_0x7b22('0x25')](_0x7b22('0x28'),controller[_0x7b22('0x29')]);router[_0x7b22('0x2a')]('/:id',auth[_0x7b22('0xa')](),interaction[_0x7b22('0x1f')](_0x7b22('0x20'),_0x7b22('0x2b')),controller[_0x7b22('0x2c')]);router[_0x7b22('0x2a')](_0x7b22('0x2d'),auth['isAuthenticated'](),controller[_0x7b22('0x2e')]);module['exports']=router;
\ No newline at end of file
+var _0x6c64=['isAuthenticated','/describe','describe','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','getMessages','/:id/my_messages','getMyMessages','/:id/download','download','post','create','join','root','server/files/attachments/','format','%s-%s','now','replace','file','/:id/tags','tracked','chat','chatinteraction:addtags','addTags','put','/:id','chatinteraction:update','update','/:id/custom_update','abandon','/:id/close','close','delete','chatinteraction:destroy','removeTags','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./chatInteraction.controller','get'];(function(_0x478209,_0x27d57b){var _0x443ec4=function(_0x3c647f){while(--_0x3c647f){_0x478209['push'](_0x478209['shift']());}};_0x443ec4(++_0x27d57b);}(_0x6c64,0x16f));var _0x46c6=function(_0x4d72f7,_0x23c8b0){_0x4d72f7=_0x4d72f7-0x0;var _0x52c441=_0x6c64[_0x4d72f7];return _0x52c441;};'use strict';var multer=require('multer');var util=require(_0x46c6('0x0'));var path=require(_0x46c6('0x1'));var timeout=require(_0x46c6('0x2'));var express=require(_0x46c6('0x3'));var router=express[_0x46c6('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x46c6('0x5'));var config=require(_0x46c6('0x6'));var controller=require(_0x46c6('0x7'));router[_0x46c6('0x8')]('/',auth[_0x46c6('0x9')](),controller['index']);router[_0x46c6('0x8')](_0x46c6('0xa'),auth[_0x46c6('0x9')](),controller[_0x46c6('0xb')]);router[_0x46c6('0x8')]('/:id',auth[_0x46c6('0xc')](),controller[_0x46c6('0xd')]);router[_0x46c6('0x8')](_0x46c6('0xe'),auth[_0x46c6('0xc')](),controller[_0x46c6('0xf')]);router[_0x46c6('0x8')]('/:id/messages',auth['isAuthenticated'](),controller[_0x46c6('0x10')]);router['get'](_0x46c6('0x11'),auth[_0x46c6('0xc')](),controller[_0x46c6('0x12')]);router[_0x46c6('0x8')](_0x46c6('0x13'),auth['isAuthenticated'](),controller[_0x46c6('0x14')]);router[_0x46c6('0x15')]('/',auth['isAuthenticated'](),controller[_0x46c6('0x16')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xafd79c,_0x2a0af7,_0x28f333){_0x28f333(null,path[_0x46c6('0x17')](config[_0x46c6('0x18')],_0x46c6('0x19')));},'filename':function(_0x571426,_0x555d90,_0x2ca908){_0x2ca908(null,util[_0x46c6('0x1a')](_0x46c6('0x1b'),Date[_0x46c6('0x1c')](),_0x555d90['originalname'][_0x46c6('0x1d')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x46c6('0x15')]('/:id/attachment_upload',upload['single'](_0x46c6('0x1e')),controller['attachmentUpload']);router[_0x46c6('0x15')]('/:id/messages',auth[_0x46c6('0xc')](),controller['addMessage']);router[_0x46c6('0x15')](_0x46c6('0x1f'),auth['isAuthenticated'](),interaction[_0x46c6('0x20')](_0x46c6('0x21'),_0x46c6('0x22')),controller[_0x46c6('0x23')]);router[_0x46c6('0x24')](_0x46c6('0x25'),auth[_0x46c6('0x9')](),interaction[_0x46c6('0x20')](_0x46c6('0x21'),_0x46c6('0x26')),controller[_0x46c6('0x27')]);router[_0x46c6('0x24')](_0x46c6('0x28'),controller['customUpdate']);router[_0x46c6('0x24')]('/:id/abandon',auth['isChatInteractionAuthorized'](),controller[_0x46c6('0x29')]);router[_0x46c6('0x24')](_0x46c6('0x2a'),controller[_0x46c6('0x2b')]);router[_0x46c6('0x2c')](_0x46c6('0x25'),auth[_0x46c6('0x9')](),interaction[_0x46c6('0x20')](_0x46c6('0x21'),_0x46c6('0x2d')),controller['destroy']);router[_0x46c6('0x2c')](_0x46c6('0x1f'),auth[_0x46c6('0x9')](),controller[_0x46c6('0x2e')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.attributes.js b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
index c2b41c1..7b0d6d0 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 _0x57ca=['exports','TEXT','BOOLEAN','INTEGER'];(function(_0x2e763e,_0x3435a){var _0x248b19=function(_0x32060a){while(--_0x32060a){_0x2e763e['push'](_0x2e763e['shift']());}};_0x248b19(++_0x3435a);}(_0x57ca,0x108));var _0xa57c=function(_0x3e08fb,_0x21a556){_0x3e08fb=_0x3e08fb-0x0;var _0xb9dc2a=_0x57ca[_0x3e08fb];return _0xb9dc2a;};'use strict';var Sequelize=require('sequelize');module[_0xa57c('0x0')]={'body':{'type':Sequelize[_0xa57c('0x1')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xa57c('0x2')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0xa57c('0x3')]}};
\ No newline at end of file
+var _0x66fa=['exports','medium','BOOLEAN','INTEGER','sequelize'];(function(_0x34917f,_0x445740){var _0x672dc4=function(_0x5bee0f){while(--_0x5bee0f){_0x34917f['push'](_0x34917f['shift']());}};_0x672dc4(++_0x445740);}(_0x66fa,0x117));var _0xa66f=function(_0x481a03,_0x27a80b){_0x481a03=_0x481a03-0x0;var _0x149186=_0x66fa[_0x481a03];return _0x149186;};'use strict';var Sequelize=require(_0xa66f('0x0'));module[_0xa66f('0x1')]={'body':{'type':Sequelize['TEXT'](_0xa66f('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0xa66f('0x3')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0xa66f('0x4')]}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js
index 8834bde..11b7d3a 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 _0x9a30=['includeAll','include','findAll','catch','params','keys','rawAttributes','options','find','create','body','describe','get','messages','lastMessageAt','createdAt','getUsers','User','admin','user','fullname','role','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar','-online','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','UserProfileResource','isEmpty','agent','push','FromId','read','-createdAt','all','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./chatInternalMessage.socket','register','end','status','json','count','offset','limit','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','send','map','fieldName','type','key','model','name','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','ChatInternalMessage'];(function(_0x176f8b,_0x2297bf){var _0x2fc46c=function(_0x21e47f){while(--_0x21e47f){_0x176f8b['push'](_0x176f8b['shift']());}};_0x2fc46c(++_0x2297bf);}(_0x9a30,0x1d0));var _0x09a3=function(_0x448593,_0x3d95e0){_0x448593=_0x448593-0x0;var _0x3d856f=_0x9a30[_0x448593];return _0x3d856f;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x09a3('0x0'));var rimraf=require(_0x09a3('0x1'));var zipdir=require(_0x09a3('0x2'));var jsonpatch=require(_0x09a3('0x3'));var rp=require(_0x09a3('0x4'));var moment=require('moment');var BPromise=require(_0x09a3('0x5'));var Mustache=require(_0x09a3('0x6'));var util=require('util');var path=require(_0x09a3('0x7'));var sox=require(_0x09a3('0x8'));var csv=require(_0x09a3('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x09a3('0xa'));var squel=require(_0x09a3('0xb'));var crypto=require(_0x09a3('0xc'));var jsforce=require(_0x09a3('0xd'));var deskjs=require(_0x09a3('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x09a3('0xf'));var Redis=require('ioredis');var authService=require(_0x09a3('0x10'));var qs=require(_0x09a3('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x09a3('0x12'));var logger=require(_0x09a3('0x13'))('api');var utils=require(_0x09a3('0x14'));var config=require(_0x09a3('0x15'));var db=require(_0x09a3('0x16'))['db'];config[_0x09a3('0x17')]=_[_0x09a3('0x18')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x09a3('0x19'))(new Redis(config[_0x09a3('0x17')]));require(_0x09a3('0x1a'))[_0x09a3('0x1b')](socket);function respondWithStatusCode(_0x305129,_0x4df425){_0x4df425=_0x4df425||0xcc;return function(_0x580860){if(_0x580860){return _0x305129['sendStatus'](_0x4df425);}return _0x305129['status'](_0x4df425)[_0x09a3('0x1c')]();};}function respondWithResult(_0xdec951,_0x2b4382){_0x2b4382=_0x2b4382||0xc8;return function(_0x3ade75){if(_0x3ade75){return _0xdec951[_0x09a3('0x1d')](_0x2b4382)[_0x09a3('0x1e')](_0x3ade75);}};}function respondWithFilteredResult(_0x2321eb,_0x49d259){return function(_0x333676){if(_0x333676){var _0x40c8be=_0x333676[_0x09a3('0x1f')],_0x512228=_0x49d259[_0x09a3('0x20')],_0x2b4b56=_0x49d259['offset']+_0x49d259[_0x09a3('0x21')],_0x1b4b14;if(_0x2b4b56>=_0x40c8be){_0x2b4b56=_0x40c8be;_0x1b4b14=0xc8;}else{_0x1b4b14=0xce;}_0x2321eb[_0x09a3('0x1d')](_0x1b4b14);return _0x2321eb['set'](_0x09a3('0x22'),_0x512228+'-'+_0x2b4b56+'/'+_0x40c8be)[_0x09a3('0x1e')](_0x333676);}return null;};}function patchUpdates(_0x56ae61){return function(_0x3807b0){try{jsonpatch[_0x09a3('0x23')](_0x3807b0,_0x56ae61,!![]);}catch(_0x553fb8){return BPromise[_0x09a3('0x24')](_0x553fb8);}return _0x3807b0[_0x09a3('0x25')]();};}function saveUpdates(_0x2cc5d7,_0x535586){return function(_0xd9df5f){if(_0xd9df5f){return _0xd9df5f[_0x09a3('0x26')](_0x2cc5d7)[_0x09a3('0x27')](function(_0x2f3075){return _0x2f3075;});}return null;};}function removeEntity(_0x8aa6eb,_0x454226){return function(_0x139e19){if(_0x139e19){return _0x139e19[_0x09a3('0x28')]()[_0x09a3('0x27')](function(){_0x8aa6eb[_0x09a3('0x1d')](0xcc)[_0x09a3('0x1c')]();});}};}function handleEntityNotFound(_0x7f6d29,_0x255f68){return function(_0x153cbb){if(!_0x153cbb){_0x7f6d29[_0x09a3('0x29')](0x194);}return _0x153cbb;};}function handleError(_0x490657,_0x22b4a2){_0x22b4a2=_0x22b4a2||0x1f4;return function(_0x12e52e){logger[_0x09a3('0x2a')](_0x12e52e[_0x09a3('0x2b')]);if(_0x12e52e['name']){delete _0x12e52e['name'];}_0x490657[_0x09a3('0x1d')](_0x22b4a2)[_0x09a3('0x2c')](_0x12e52e);};}exports['index']=function(_0x39f5e,_0x206e67){var _0x27070f={},_0x3d8e49={},_0x326dd2={'count':0x0,'rows':[]};var _0xbee6c7=_[_0x09a3('0x2d')](db['ChatInternalMessage']['rawAttributes'],function(_0x20cdf6){return{'name':_0x20cdf6[_0x09a3('0x2e')],'type':_0x20cdf6[_0x09a3('0x2f')][_0x09a3('0x30')]};});_0x3d8e49[_0x09a3('0x31')]=_['map'](_0xbee6c7,_0x09a3('0x32'));_0x3d8e49[_0x09a3('0x33')]=_['keys'](_0x39f5e[_0x09a3('0x33')]);_0x3d8e49[_0x09a3('0x34')]=_['intersection'](_0x3d8e49[_0x09a3('0x31')],_0x3d8e49[_0x09a3('0x33')]);_0x27070f[_0x09a3('0x35')]=_[_0x09a3('0x36')](_0x3d8e49[_0x09a3('0x31')],qs[_0x09a3('0x37')](_0x39f5e['query'][_0x09a3('0x37')]));_0x27070f['attributes']=_0x27070f[_0x09a3('0x35')][_0x09a3('0x38')]?_0x27070f['attributes']:_0x3d8e49[_0x09a3('0x31')];if(!_0x39f5e[_0x09a3('0x33')][_0x09a3('0x39')](_0x09a3('0x3a'))){_0x27070f['limit']=qs[_0x09a3('0x21')](_0x39f5e['query'][_0x09a3('0x21')]);_0x27070f['offset']=qs['offset'](_0x39f5e['query'][_0x09a3('0x20')]);}_0x27070f['order']=qs['sort'](_0x39f5e[_0x09a3('0x33')][_0x09a3('0x3b')]);_0x27070f[_0x09a3('0x3c')]=qs[_0x09a3('0x34')](_[_0x09a3('0x3d')](_0x39f5e[_0x09a3('0x33')],_0x3d8e49[_0x09a3('0x34')]));if(_0x39f5e[_0x09a3('0x33')][_0x09a3('0x3e')]){_0x27070f[_0x09a3('0x3c')]=_['merge'](_0x27070f[_0x09a3('0x3c')],{'$or':_['map'](_0xbee6c7,function(_0x42d067){if(_0x42d067[_0x09a3('0x2f')]!==_0x09a3('0x3f')){var _0x2167dc={};_0x2167dc[_0x42d067[_0x09a3('0x32')]]={'$like':'%'+_0x39f5e['query'][_0x09a3('0x3e')]+'%'};return _0x2167dc;}})});}_0x27070f=_[_0x09a3('0x40')]({},_0x27070f,_0x39f5e['options']);var _0x21d87c={'where':_0x27070f[_0x09a3('0x3c')]};return db[_0x09a3('0x41')][_0x09a3('0x1f')](_0x21d87c)[_0x09a3('0x27')](function(_0x386344){_0x326dd2[_0x09a3('0x1f')]=_0x386344;if(_0x39f5e[_0x09a3('0x33')][_0x09a3('0x42')]){_0x27070f[_0x09a3('0x43')]=[{'all':!![]}];}return db[_0x09a3('0x41')][_0x09a3('0x44')](_0x27070f);})[_0x09a3('0x27')](function(_0x1b58fc){_0x326dd2['rows']=_0x1b58fc;return _0x326dd2;})[_0x09a3('0x27')](respondWithFilteredResult(_0x206e67,_0x27070f))[_0x09a3('0x45')](handleError(_0x206e67,null));};exports['show']=function(_0x4e73b4,_0x16e84a){var _0xa8b540={'raw':!![],'where':{'id':_0x4e73b4[_0x09a3('0x46')]['id']}},_0x3668e9={};_0x3668e9[_0x09a3('0x31')]=_[_0x09a3('0x47')](db['ChatInternalMessage'][_0x09a3('0x48')]);_0x3668e9[_0x09a3('0x33')]=_[_0x09a3('0x47')](_0x4e73b4[_0x09a3('0x33')]);_0x3668e9['filters']=_[_0x09a3('0x36')](_0x3668e9[_0x09a3('0x31')],_0x3668e9[_0x09a3('0x33')]);_0xa8b540[_0x09a3('0x35')]=_[_0x09a3('0x36')](_0x3668e9['model'],qs[_0x09a3('0x37')](_0x4e73b4[_0x09a3('0x33')][_0x09a3('0x37')]));_0xa8b540[_0x09a3('0x35')]=_0xa8b540[_0x09a3('0x35')]['length']?_0xa8b540[_0x09a3('0x35')]:_0x3668e9[_0x09a3('0x31')];if(_0x4e73b4[_0x09a3('0x33')]['includeAll']){_0xa8b540[_0x09a3('0x43')]=[{'all':!![]}];}_0xa8b540=_[_0x09a3('0x40')]({},_0xa8b540,_0x4e73b4[_0x09a3('0x49')]);return db[_0x09a3('0x41')][_0x09a3('0x4a')](_0xa8b540)[_0x09a3('0x27')](handleEntityNotFound(_0x16e84a,null))[_0x09a3('0x27')](respondWithResult(_0x16e84a,null))['catch'](handleError(_0x16e84a,null));};exports['create']=function(_0x1912ad,_0x40fd33){return db[_0x09a3('0x41')][_0x09a3('0x4b')](_0x1912ad[_0x09a3('0x4c')],{})['then'](respondWithResult(_0x40fd33,0xc9))[_0x09a3('0x45')](handleError(_0x40fd33,null));};exports[_0x09a3('0x26')]=function(_0x2d0ae3,_0x169d3e){if(_0x2d0ae3['body']['id']){delete _0x2d0ae3[_0x09a3('0x4c')]['id'];}return db[_0x09a3('0x41')][_0x09a3('0x4a')]({'where':{'id':_0x2d0ae3['params']['id']}})['then'](handleEntityNotFound(_0x169d3e,null))[_0x09a3('0x27')](saveUpdates(_0x2d0ae3['body'],null))[_0x09a3('0x27')](respondWithResult(_0x169d3e,null))[_0x09a3('0x45')](handleError(_0x169d3e,null));};exports['destroy']=function(_0x1c5c92,_0x48b067){return db[_0x09a3('0x41')][_0x09a3('0x4a')]({'where':{'id':_0x1c5c92['params']['id']}})[_0x09a3('0x27')](handleEntityNotFound(_0x48b067,null))[_0x09a3('0x27')](removeEntity(_0x48b067,null))[_0x09a3('0x45')](handleError(_0x48b067,null));};exports[_0x09a3('0x4d')]=function(_0x932f8b,_0x36765d){return db[_0x09a3('0x41')][_0x09a3('0x4d')]()[_0x09a3('0x27')](respondWithResult(_0x36765d,null))['catch'](handleError(_0x36765d,null));};function wrapUser(_0xed3264){return function(_0x15a6cf){var _0x19d348=_0xed3264[_0x09a3('0x4e')]({'plain':!![]});_0x19d348[_0x09a3('0x4f')]=[];if(_0x15a6cf){_0x19d348[_0x09a3('0x50')]=_0x15a6cf[_0x09a3('0x51')];_0x19d348['lastMessage']=_0x15a6cf;}else{_0x19d348[_0x09a3('0x50')]=moment(0x0)['format']('YYYY-MM-DD\x20HH:mm:ss');_0x19d348['lastMessage']={};}return _0x19d348;};}exports[_0x09a3('0x52')]=function(_0x2b59e5,_0x544fda,_0x21e41a){var _0x21bcb9=[];return db[_0x09a3('0x53')][_0x09a3('0x44')]({'where':{'role':['agent',_0x09a3('0x54'),_0x09a3('0x55')]},'attributes':['id',_0x09a3('0x56'),_0x09a3('0x32'),_0x09a3('0x57'),_0x09a3('0x58'),_0x09a3('0x59'),_0x09a3('0x5a'),_0x09a3('0x5b'),_0x09a3('0x5c'),_0x09a3('0x5d')],'order':qs[_0x09a3('0x3b')](_0x09a3('0x5e')),'include':[{'model':db['VoiceQueue'],'as':_0x09a3('0x5f'),'attributes':['id',_0x09a3('0x32'),'type'],'through':{'attributes':[]}}]})[_0x09a3('0x27')](function(_0x442035){if(_0x442035){var _0xa15de0=_0x2b59e5[_0x09a3('0x55')][_0x09a3('0x4e')]({'plain':!![]});if(!_0xa15de0)throw new Error(_0x09a3('0x60'));if(_0xa15de0[_0x09a3('0x57')]===_0x09a3('0x55')){return db[_0x09a3('0x61')][_0x09a3('0x4a')]({'where':{'name':'Agents','userProfileId':_0xa15de0['userProfileId']},'raw':!![]})['then'](function(_0x46640b){if(_0x46640b){if(_0x46640b['autoAssociation']===0x0){return db[_0x09a3('0x62')][_0x09a3('0x44')]({'where':{'sectionId':_0x46640b['id']},'raw':!![]})[_0x09a3('0x27')](function(_0x3a2a69){var _0x212c12=[];if(_[_0x09a3('0x63')](_0x3a2a69)){_0x212c12=_[_0x09a3('0x3e')](_0x442035,function(_0x45d73e){if(_0x45d73e[_0x09a3('0x57')]!==_0x09a3('0x64')){return _0x45d73e;}});return _0x212c12;}else{for(var _0x40cfd0=0x0;_0x40cfd0<_0x442035[_0x09a3('0x38')];_0x40cfd0++){var _0x116f19=_0x442035[_0x40cfd0];if(_0x116f19[_0x09a3('0x57')]==='agent'){var _0xe07116=_[_0x09a3('0x4a')](_0x3a2a69,function(_0x31fc9b){return _0x31fc9b['resourceId']===_0x116f19['id'];});if(_0xe07116)_0x212c12[_0x09a3('0x65')](_0x116f19);}else{_0x212c12[_0x09a3('0x65')](_0x116f19);}}return _0x212c12;}});}else{return _0x442035;}}else{var _0x1b9f33=_['filter'](_0x442035,function(_0x5a8d84){if(_0x5a8d84['role']!==_0x09a3('0x64')){return _0x5a8d84;}});return _0x1b9f33;}});}else{return _0x442035;}}})[_0x09a3('0x27')](function(_0x1b4ea8){var _0x456ce4=[];if(_0x1b4ea8){_0x21bcb9=_0x1b4ea8;for(var _0x23200a=0x0;_0x23200a<_0x1b4ea8[_0x09a3('0x38')];_0x23200a+=0x1){_0x21bcb9[_0x23200a][_0x09a3('0x4f')]=[];_0x456ce4[_0x09a3('0x65')](db[_0x09a3('0x41')][_0x09a3('0x4a')]({'where':{'FromId':[_0x2b59e5[_0x09a3('0x55')]['id'],_0x1b4ea8[_0x23200a]['id']],'ToId':[_0x2b59e5[_0x09a3('0x55')]['id'],_0x1b4ea8[_0x23200a]['id']],'ChatGroupId':null},'attributes':['id',_0x09a3('0x51'),_0x09a3('0x66'),'ToId',_0x09a3('0x67'),_0x09a3('0x4c')],'order':qs[_0x09a3('0x3b')](_0x09a3('0x68')),'limit':0x1,'offset':0x0,'raw':!![]})['then'](wrapUser(_0x1b4ea8[_0x23200a])));}return BPromise[_0x09a3('0x69')](_0x456ce4);}return[];})['then'](function(_0x3ed0d7){return{'rows':_0x3ed0d7,'count':_0x3ed0d7[_0x09a3('0x38')]};})[_0x09a3('0x27')](respondWithResult(_0x544fda,null))[_0x09a3('0x45')](handleError(_0x544fda,null));};
\ No newline at end of file
+var _0xca91=['nolimit','order','sort','where','filters','pick','filter','merge','name','options','ChatInternalMessage','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','create','body','find','describe','get','messages','lastMessageAt','createdAt','lastMessage','YYYY-MM-DD\x20HH:mm:ss','getUsers','User','agent','admin','user','fullname','role','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar','-online','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Agents','userProfileId','UserProfileResource','resourceId','push','FromId','ToId','read','-createdAt','all','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../mysqldb','redis','defaults','socket.io-emitter','register','sendStatus','status','end','offset','limit','set','json','reject','update','then','destroy','error','stack','send','index','map','key','query','intersection','model','attributes','fields','length','hasOwnProperty'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xca91,0x1ea));var _0x1ca9=function(_0x438fe1,_0x3308d5){_0x438fe1=_0x438fe1-0x0;var _0x3c8e1b=_0xca91[_0x438fe1];return _0x3c8e1b;};'use strict';var pdf=require(_0x1ca9('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x1ca9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x1ca9('0x2'));var rp=require(_0x1ca9('0x3'));var moment=require(_0x1ca9('0x4'));var BPromise=require(_0x1ca9('0x5'));var Mustache=require(_0x1ca9('0x6'));var util=require(_0x1ca9('0x7'));var path=require(_0x1ca9('0x8'));var sox=require(_0x1ca9('0x9'));var csv=require('to-csv');var ejs=require(_0x1ca9('0xa'));var fs=require('fs');var _=require(_0x1ca9('0xb'));var squel=require(_0x1ca9('0xc'));var crypto=require('crypto');var jsforce=require(_0x1ca9('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x1ca9('0xe'));var Papa=require(_0x1ca9('0xf'));var Redis=require(_0x1ca9('0x10'));var authService=require(_0x1ca9('0x11'));var qs=require(_0x1ca9('0x12'));var as=require(_0x1ca9('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1ca9('0x14'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x1ca9('0x15'))['db'];config[_0x1ca9('0x16')]=_[_0x1ca9('0x17')](config[_0x1ca9('0x16')],{'host':'localhost','port':0x18eb});var socket=require(_0x1ca9('0x18'))(new Redis(config[_0x1ca9('0x16')]));require('./chatInternalMessage.socket')[_0x1ca9('0x19')](socket);function respondWithStatusCode(_0x179fb2,_0x7d0f3d){_0x7d0f3d=_0x7d0f3d||0xcc;return function(_0x24cf68){if(_0x24cf68){return _0x179fb2[_0x1ca9('0x1a')](_0x7d0f3d);}return _0x179fb2[_0x1ca9('0x1b')](_0x7d0f3d)[_0x1ca9('0x1c')]();};}function respondWithResult(_0xa88699,_0x4d99cc){_0x4d99cc=_0x4d99cc||0xc8;return function(_0x598b77){if(_0x598b77){return _0xa88699[_0x1ca9('0x1b')](_0x4d99cc)['json'](_0x598b77);}};}function respondWithFilteredResult(_0x59c749,_0x555472){return function(_0x8689dd){if(_0x8689dd){var _0x4ba075=_0x8689dd['count'],_0x417ef9=_0x555472[_0x1ca9('0x1d')],_0x168b26=_0x555472[_0x1ca9('0x1d')]+_0x555472[_0x1ca9('0x1e')],_0x28aae7;if(_0x168b26>=_0x4ba075){_0x168b26=_0x4ba075;_0x28aae7=0xc8;}else{_0x28aae7=0xce;}_0x59c749[_0x1ca9('0x1b')](_0x28aae7);return _0x59c749[_0x1ca9('0x1f')]('Content-Range',_0x417ef9+'-'+_0x168b26+'/'+_0x4ba075)[_0x1ca9('0x20')](_0x8689dd);}return null;};}function patchUpdates(_0x40a5bc){return function(_0x13a086){try{jsonpatch['apply'](_0x13a086,_0x40a5bc,!![]);}catch(_0x100b54){return BPromise[_0x1ca9('0x21')](_0x100b54);}return _0x13a086['save']();};}function saveUpdates(_0x395715,_0x4da7c4){return function(_0xc38a7f){if(_0xc38a7f){return _0xc38a7f[_0x1ca9('0x22')](_0x395715)[_0x1ca9('0x23')](function(_0x43f30b){return _0x43f30b;});}return null;};}function removeEntity(_0x168409,_0x195f69){return function(_0x375757){if(_0x375757){return _0x375757[_0x1ca9('0x24')]()[_0x1ca9('0x23')](function(){_0x168409['status'](0xcc)[_0x1ca9('0x1c')]();});}};}function handleEntityNotFound(_0x16b6bb,_0x8b3ce3){return function(_0x17086e){if(!_0x17086e){_0x16b6bb[_0x1ca9('0x1a')](0x194);}return _0x17086e;};}function handleError(_0x1cb8d9,_0x4d603c){_0x4d603c=_0x4d603c||0x1f4;return function(_0x1365d1){logger[_0x1ca9('0x25')](_0x1365d1[_0x1ca9('0x26')]);if(_0x1365d1['name']){delete _0x1365d1['name'];}_0x1cb8d9['status'](_0x4d603c)[_0x1ca9('0x27')](_0x1365d1);};}exports[_0x1ca9('0x28')]=function(_0x7537e6,_0x5a4ad9){var _0x5ba109={},_0x58a325={},_0xdee0ca={'count':0x0,'rows':[]};var _0x22e37a=_[_0x1ca9('0x29')](db['ChatInternalMessage']['rawAttributes'],function(_0x281bea){return{'name':_0x281bea['fieldName'],'type':_0x281bea['type'][_0x1ca9('0x2a')]};});_0x58a325['model']=_['map'](_0x22e37a,'name');_0x58a325[_0x1ca9('0x2b')]=_['keys'](_0x7537e6[_0x1ca9('0x2b')]);_0x58a325['filters']=_[_0x1ca9('0x2c')](_0x58a325[_0x1ca9('0x2d')],_0x58a325[_0x1ca9('0x2b')]);_0x5ba109[_0x1ca9('0x2e')]=_[_0x1ca9('0x2c')](_0x58a325[_0x1ca9('0x2d')],qs[_0x1ca9('0x2f')](_0x7537e6[_0x1ca9('0x2b')][_0x1ca9('0x2f')]));_0x5ba109['attributes']=_0x5ba109[_0x1ca9('0x2e')][_0x1ca9('0x30')]?_0x5ba109[_0x1ca9('0x2e')]:_0x58a325['model'];if(!_0x7537e6[_0x1ca9('0x2b')][_0x1ca9('0x31')](_0x1ca9('0x32'))){_0x5ba109[_0x1ca9('0x1e')]=qs['limit'](_0x7537e6[_0x1ca9('0x2b')][_0x1ca9('0x1e')]);_0x5ba109['offset']=qs['offset'](_0x7537e6[_0x1ca9('0x2b')][_0x1ca9('0x1d')]);}_0x5ba109[_0x1ca9('0x33')]=qs['sort'](_0x7537e6['query'][_0x1ca9('0x34')]);_0x5ba109[_0x1ca9('0x35')]=qs[_0x1ca9('0x36')](_[_0x1ca9('0x37')](_0x7537e6[_0x1ca9('0x2b')],_0x58a325[_0x1ca9('0x36')]));if(_0x7537e6[_0x1ca9('0x2b')][_0x1ca9('0x38')]){_0x5ba109['where']=_[_0x1ca9('0x39')](_0x5ba109['where'],{'$or':_[_0x1ca9('0x29')](_0x22e37a,function(_0x142136){if(_0x142136['type']!=='VIRTUAL'){var _0x2d54cd={};_0x2d54cd[_0x142136[_0x1ca9('0x3a')]]={'$like':'%'+_0x7537e6[_0x1ca9('0x2b')][_0x1ca9('0x38')]+'%'};return _0x2d54cd;}})});}_0x5ba109=_[_0x1ca9('0x39')]({},_0x5ba109,_0x7537e6[_0x1ca9('0x3b')]);var _0x26a7d2={'where':_0x5ba109[_0x1ca9('0x35')]};return db[_0x1ca9('0x3c')]['count'](_0x26a7d2)['then'](function(_0x1b3846){_0xdee0ca['count']=_0x1b3846;if(_0x7537e6[_0x1ca9('0x2b')][_0x1ca9('0x3d')]){_0x5ba109[_0x1ca9('0x3e')]=[{'all':!![]}];}return db[_0x1ca9('0x3c')][_0x1ca9('0x3f')](_0x5ba109);})[_0x1ca9('0x23')](function(_0x1e849d){_0xdee0ca[_0x1ca9('0x40')]=_0x1e849d;return _0xdee0ca;})[_0x1ca9('0x23')](respondWithFilteredResult(_0x5a4ad9,_0x5ba109))[_0x1ca9('0x41')](handleError(_0x5a4ad9,null));};exports[_0x1ca9('0x42')]=function(_0x56280b,_0x36b633){var _0x572968={'raw':!![],'where':{'id':_0x56280b[_0x1ca9('0x43')]['id']}},_0x18c3e0={};_0x18c3e0['model']=_[_0x1ca9('0x44')](db['ChatInternalMessage'][_0x1ca9('0x45')]);_0x18c3e0[_0x1ca9('0x2b')]=_[_0x1ca9('0x44')](_0x56280b[_0x1ca9('0x2b')]);_0x18c3e0[_0x1ca9('0x36')]=_[_0x1ca9('0x2c')](_0x18c3e0[_0x1ca9('0x2d')],_0x18c3e0['query']);_0x572968[_0x1ca9('0x2e')]=_[_0x1ca9('0x2c')](_0x18c3e0[_0x1ca9('0x2d')],qs['fields'](_0x56280b[_0x1ca9('0x2b')]['fields']));_0x572968['attributes']=_0x572968[_0x1ca9('0x2e')]['length']?_0x572968[_0x1ca9('0x2e')]:_0x18c3e0[_0x1ca9('0x2d')];if(_0x56280b[_0x1ca9('0x2b')][_0x1ca9('0x3d')]){_0x572968[_0x1ca9('0x3e')]=[{'all':!![]}];}_0x572968=_[_0x1ca9('0x39')]({},_0x572968,_0x56280b[_0x1ca9('0x3b')]);return db['ChatInternalMessage']['find'](_0x572968)[_0x1ca9('0x23')](handleEntityNotFound(_0x36b633,null))[_0x1ca9('0x23')](respondWithResult(_0x36b633,null))[_0x1ca9('0x41')](handleError(_0x36b633,null));};exports[_0x1ca9('0x46')]=function(_0x327ae1,_0x4e58fa){return db[_0x1ca9('0x3c')][_0x1ca9('0x46')](_0x327ae1[_0x1ca9('0x47')],{})[_0x1ca9('0x23')](respondWithResult(_0x4e58fa,0xc9))[_0x1ca9('0x41')](handleError(_0x4e58fa,null));};exports[_0x1ca9('0x22')]=function(_0x13f8f5,_0x323d61){if(_0x13f8f5[_0x1ca9('0x47')]['id']){delete _0x13f8f5['body']['id'];}return db[_0x1ca9('0x3c')][_0x1ca9('0x48')]({'where':{'id':_0x13f8f5[_0x1ca9('0x43')]['id']}})[_0x1ca9('0x23')](handleEntityNotFound(_0x323d61,null))['then'](saveUpdates(_0x13f8f5['body'],null))['then'](respondWithResult(_0x323d61,null))['catch'](handleError(_0x323d61,null));};exports[_0x1ca9('0x24')]=function(_0x2873ab,_0x15bb6c){return db[_0x1ca9('0x3c')][_0x1ca9('0x48')]({'where':{'id':_0x2873ab[_0x1ca9('0x43')]['id']}})[_0x1ca9('0x23')](handleEntityNotFound(_0x15bb6c,null))[_0x1ca9('0x23')](removeEntity(_0x15bb6c,null))[_0x1ca9('0x41')](handleError(_0x15bb6c,null));};exports[_0x1ca9('0x49')]=function(_0x3b3320,_0x59ed94){return db['ChatInternalMessage'][_0x1ca9('0x49')]()['then'](respondWithResult(_0x59ed94,null))[_0x1ca9('0x41')](handleError(_0x59ed94,null));};function wrapUser(_0x38e2bc){return function(_0x240cfe){var _0x393e24=_0x38e2bc[_0x1ca9('0x4a')]({'plain':!![]});_0x393e24[_0x1ca9('0x4b')]=[];if(_0x240cfe){_0x393e24[_0x1ca9('0x4c')]=_0x240cfe[_0x1ca9('0x4d')];_0x393e24[_0x1ca9('0x4e')]=_0x240cfe;}else{_0x393e24['lastMessageAt']=moment(0x0)['format'](_0x1ca9('0x4f'));_0x393e24[_0x1ca9('0x4e')]={};}return _0x393e24;};}exports[_0x1ca9('0x50')]=function(_0x150f97,_0x427065,_0x512e98){var _0x1fb768=[];return db[_0x1ca9('0x51')][_0x1ca9('0x3f')]({'where':{'role':[_0x1ca9('0x52'),_0x1ca9('0x53'),_0x1ca9('0x54')]},'attributes':['id',_0x1ca9('0x55'),_0x1ca9('0x3a'),_0x1ca9('0x56'),_0x1ca9('0x57'),_0x1ca9('0x58'),_0x1ca9('0x59'),_0x1ca9('0x5a'),_0x1ca9('0x5b'),_0x1ca9('0x5c')],'order':qs[_0x1ca9('0x34')](_0x1ca9('0x5d')),'include':[{'model':db[_0x1ca9('0x5e')],'as':_0x1ca9('0x5f'),'attributes':['id',_0x1ca9('0x3a'),'type'],'through':{'attributes':[]}}]})[_0x1ca9('0x23')](function(_0x6aab59){if(_0x6aab59){var _0x227272=_0x150f97['user'][_0x1ca9('0x4a')]({'plain':!![]});if(!_0x227272)throw new Error(_0x1ca9('0x60'));if(_0x227272[_0x1ca9('0x56')]===_0x1ca9('0x54')){return db[_0x1ca9('0x61')]['find']({'where':{'name':_0x1ca9('0x62'),'userProfileId':_0x227272[_0x1ca9('0x63')]},'raw':!![]})['then'](function(_0x476812){if(_0x476812){if(_0x476812['autoAssociation']===0x0){return db[_0x1ca9('0x64')][_0x1ca9('0x3f')]({'where':{'sectionId':_0x476812['id']},'raw':!![]})[_0x1ca9('0x23')](function(_0x42abfd){var _0xb668d3=[];if(_['isEmpty'](_0x42abfd)){_0xb668d3=_[_0x1ca9('0x38')](_0x6aab59,function(_0x41537d){if(_0x41537d[_0x1ca9('0x56')]!==_0x1ca9('0x52')){return _0x41537d;}});return _0xb668d3;}else{for(var _0x46aa5e=0x0;_0x46aa5e<_0x6aab59['length'];_0x46aa5e++){var _0x222f0b=_0x6aab59[_0x46aa5e];if(_0x222f0b[_0x1ca9('0x56')]==='agent'){var _0x538e5b=_[_0x1ca9('0x48')](_0x42abfd,function(_0x504737){return _0x504737[_0x1ca9('0x65')]===_0x222f0b['id'];});if(_0x538e5b)_0xb668d3['push'](_0x222f0b);}else{_0xb668d3[_0x1ca9('0x66')](_0x222f0b);}}return _0xb668d3;}});}else{return _0x6aab59;}}else{var _0x4cd979=_['filter'](_0x6aab59,function(_0x382273){if(_0x382273[_0x1ca9('0x56')]!=='agent'){return _0x382273;}});return _0x4cd979;}});}else{return _0x6aab59;}}})[_0x1ca9('0x23')](function(_0x2a9e1e){var _0x15c4a3=[];if(_0x2a9e1e){_0x1fb768=_0x2a9e1e;for(var _0x490395=0x0;_0x490395<_0x2a9e1e[_0x1ca9('0x30')];_0x490395+=0x1){_0x1fb768[_0x490395][_0x1ca9('0x4b')]=[];_0x15c4a3[_0x1ca9('0x66')](db[_0x1ca9('0x3c')][_0x1ca9('0x48')]({'where':{'FromId':[_0x150f97[_0x1ca9('0x54')]['id'],_0x2a9e1e[_0x490395]['id']],'ToId':[_0x150f97['user']['id'],_0x2a9e1e[_0x490395]['id']],'ChatGroupId':null},'attributes':['id',_0x1ca9('0x4d'),_0x1ca9('0x67'),_0x1ca9('0x68'),_0x1ca9('0x69'),'body'],'order':qs[_0x1ca9('0x34')](_0x1ca9('0x6a')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x1ca9('0x23')](wrapUser(_0x2a9e1e[_0x490395])));}return BPromise[_0x1ca9('0x6b')](_0x15c4a3);}return[];})['then'](function(_0xc25899){return{'rows':_0xc25899,'count':_0xc25899[_0x1ca9('0x30')]};})[_0x1ca9('0x23')](respondWithResult(_0x427065,null))[_0x1ca9('0x41')](handleError(_0x427065,null));};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js
index aaa93e8..02d9440 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 _0x67d1=['hasOwnProperty','hook','exports','events','../../mysqldb','ChatInternalMessage','setMaxListeners','update','remove','emit'];(function(_0x55a520,_0x59f08f){var _0x4c6d89=function(_0x3f491f){while(--_0x3f491f){_0x55a520['push'](_0x55a520['shift']());}};_0x4c6d89(++_0x59f08f);}(_0x67d1,0xdf));var _0x167d=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x67d1[_0x4a9fb1];return _0x348672;};'use strict';var EventEmitter=require(_0x167d('0x0'));var ChatInternalMessage=require(_0x167d('0x1'))['db'][_0x167d('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x167d('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x167d('0x4'),'afterDestroy':_0x167d('0x5')};function emitEvent(_0x26ce3c){return function(_0x54ae83,_0x59228a,_0x557a8c){ChatInternalMessageEvents[_0x167d('0x6')](_0x26ce3c+':'+_0x54ae83['id'],_0x54ae83);ChatInternalMessageEvents[_0x167d('0x6')](_0x26ce3c,_0x54ae83);_0x557a8c(null);};}for(var e in events){if(events[_0x167d('0x7')](e)){var event=events[e];ChatInternalMessage[_0x167d('0x8')](e,emitEvent(event));}}module[_0x167d('0x9')]=ChatInternalMessageEvents;
\ No newline at end of file
+var _0xe5d5=['save','remove','emit','hasOwnProperty','hook','exports','ChatInternalMessage'];(function(_0xf200cc,_0x19c4ed){var _0x444ad6=function(_0x59f387){while(--_0x59f387){_0xf200cc['push'](_0xf200cc['shift']());}};_0x444ad6(++_0x19c4ed);}(_0xe5d5,0x156));var _0x5e5d=function(_0x1ed9d2,_0x1fabab){_0x1ed9d2=_0x1ed9d2-0x0;var _0x183b09=_0xe5d5[_0x1ed9d2];return _0x183b09;};'use strict';var EventEmitter=require('events');var ChatInternalMessage=require('../../mysqldb')['db'][_0x5e5d('0x0')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x5e5d('0x1'),'afterUpdate':'update','afterDestroy':_0x5e5d('0x2')};function emitEvent(_0x5127ee){return function(_0x3e2410,_0x191980,_0x32c471){ChatInternalMessageEvents[_0x5e5d('0x3')](_0x5127ee+':'+_0x3e2410['id'],_0x3e2410);ChatInternalMessageEvents[_0x5e5d('0x3')](_0x5127ee,_0x3e2410);_0x32c471(null);};}for(var e in events){if(events[_0x5e5d('0x4')](e)){var event=events[e];ChatInternalMessage[_0x5e5d('0x5')](e,emitEvent(event));}}module[_0x5e5d('0x6')]=ChatInternalMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js
index 48b3f03..d116686 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 _0xaa88=['chat_internal_messages','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./chatInternalMessage.attributes','ChatInternalMessage'];(function(_0x4f0670,_0x220f59){var _0x428983=function(_0x80a02d){while(--_0x80a02d){_0x4f0670['push'](_0x4f0670['shift']());}};_0x428983(++_0x220f59);}(_0xaa88,0x137));var _0x8aa8=function(_0x2ecb67,_0x8ec62d){_0x2ecb67=_0x2ecb67-0x0;var _0x168079=_0xaa88[_0x2ecb67];return _0x168079;};'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':!![],'charset':_0x8aa8('0xc'),'collate':_0x8aa8('0xd')});};
\ No newline at end of file
+var _0xb7e7=['ChatInternalMessage','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','moment','request-promise','rimraf','../../config/environment','./chatInternalMessage.attributes','define'];(function(_0x9dae9,_0x1cb9b2){var _0x1f07e9=function(_0xfccefd){while(--_0xfccefd){_0x9dae9['push'](_0x9dae9['shift']());}};_0x1f07e9(++_0x1cb9b2);}(_0xb7e7,0x121));var _0x7b7e=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xb7e7[_0x19e35c];return _0x3e1fe8;};'use strict';var _=require(_0x7b7e('0x0'));var util=require('util');var logger=require(_0x7b7e('0x1'))('api');var moment=require(_0x7b7e('0x2'));var BPromise=require('bluebird');var rp=require(_0x7b7e('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7b7e('0x4'));var config=require(_0x7b7e('0x5'));var attributes=require(_0x7b7e('0x6'));module['exports']=function(_0x53ed64,_0x333fa4){return _0x53ed64[_0x7b7e('0x7')](_0x7b7e('0x8'),attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x7b7e('0x9'),'collate':_0x7b7e('0xa')});};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
index 5019162..85dcd55 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 _0x490b=['client','http','redis','localhost','register','request','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','jayson/promise'];(function(_0x635fca,_0x336b51){var _0x1ec018=function(_0x5bc00d){while(--_0x5bc00d){_0x635fca['push'](_0x635fca['shift']());}};_0x1ec018(++_0x336b51);}(_0x490b,0x1d3));var _0xb490=function(_0x19aa84,_0x549537){_0x19aa84=_0x19aa84-0x0;var _0x536146=_0x490b[_0x19aa84];return _0x536146;};'use strict';var _=require(_0xb490('0x0'));var util=require(_0xb490('0x1'));var moment=require(_0xb490('0x2'));var BPromise=require(_0xb490('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb490('0x4'));var db=require(_0xb490('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb490('0x6'));var config=require('../../config/environment');var jayson=require(_0xb490('0x7'));var client=jayson[_0xb490('0x8')][_0xb490('0x9')]({'port':0x232a});config[_0xb490('0xa')]=_['defaults'](config[_0xb490('0xa')],{'host':_0xb490('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb490('0xa')]));require('./chatInternalMessage.socket')[_0xb490('0xc')](socket);function respondWithRpcPromise(_0x32b7e9,_0x2efe9b,_0x2d27f7){return new BPromise(function(_0x35a111,_0x4ebf63){return client[_0xb490('0xd')](_0x32b7e9,_0x2d27f7)[_0xb490('0xe')](function(_0x1d8093){logger[_0xb490('0xf')](_0xb490('0x10'),_0x2efe9b,_0xb490('0x11'));logger[_0xb490('0x12')](_0xb490('0x13'),_0x2efe9b,_0xb490('0x11'),JSON[_0xb490('0x14')](_0x1d8093));if(_0x1d8093[_0xb490('0x15')]){if(_0x1d8093[_0xb490('0x15')][_0xb490('0x16')]===0x1f4){logger[_0xb490('0x15')](_0xb490('0x10'),_0x2efe9b,_0x1d8093[_0xb490('0x15')]['message']);return _0x4ebf63(_0x1d8093[_0xb490('0x15')][_0xb490('0x17')]);}logger[_0xb490('0x15')]('ChatInternalMessage,\x20%s,\x20%s',_0x2efe9b,_0x1d8093[_0xb490('0x15')][_0xb490('0x17')]);return _0x35a111(_0x1d8093[_0xb490('0x15')][_0xb490('0x17')]);}else{logger[_0xb490('0xf')](_0xb490('0x10'),_0x2efe9b,_0xb490('0x11'));_0x35a111(_0x1d8093[_0xb490('0x18')][_0xb490('0x17')]);}})['catch'](function(_0x571f23){logger[_0xb490('0x15')](_0xb490('0x10'),_0x2efe9b,_0x571f23);_0x4ebf63(_0x571f23);});});}
\ No newline at end of file
+var _0x8d3b=['jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','request','then','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x332fdc,_0x148c1a){var _0x493ef4=function(_0x3f3b2b){while(--_0x3f3b2b){_0x332fdc['push'](_0x332fdc['shift']());}};_0x493ef4(++_0x148c1a);}(_0x8d3b,0x155));var _0xb8d3=function(_0x1f1011,_0x106d51){_0x1f1011=_0x1f1011-0x0;var _0x4eb6bb=_0x8d3b[_0x1f1011];return _0x4eb6bb;};'use strict';var _=require(_0xb8d3('0x0'));var util=require(_0xb8d3('0x1'));var moment=require(_0xb8d3('0x2'));var BPromise=require(_0xb8d3('0x3'));var rs=require(_0xb8d3('0x4'));var fs=require('fs');var Redis=require(_0xb8d3('0x5'));var db=require(_0xb8d3('0x6'))['db'];var utils=require(_0xb8d3('0x7'));var logger=require(_0xb8d3('0x8'))(_0xb8d3('0x9'));var config=require(_0xb8d3('0xa'));var jayson=require(_0xb8d3('0xb'));var client=jayson[_0xb8d3('0xc')][_0xb8d3('0xd')]({'port':0x232a});config[_0xb8d3('0xe')]=_[_0xb8d3('0xf')](config['redis'],{'host':_0xb8d3('0x10'),'port':0x18eb});var socket=require(_0xb8d3('0x11'))(new Redis(config[_0xb8d3('0xe')]));require(_0xb8d3('0x12'))[_0xb8d3('0x13')](socket);function respondWithRpcPromise(_0x281a16,_0x52a7a1,_0x5e6526){return new BPromise(function(_0x13a2c3,_0x4eb2a7){return client[_0xb8d3('0x14')](_0x281a16,_0x5e6526)[_0xb8d3('0x15')](function(_0x12fcf8){logger['info'](_0xb8d3('0x16'),_0x52a7a1,_0xb8d3('0x17'));logger[_0xb8d3('0x18')](_0xb8d3('0x19'),_0x52a7a1,_0xb8d3('0x17'),JSON[_0xb8d3('0x1a')](_0x12fcf8));if(_0x12fcf8[_0xb8d3('0x1b')]){if(_0x12fcf8[_0xb8d3('0x1b')][_0xb8d3('0x1c')]===0x1f4){logger[_0xb8d3('0x1b')]('ChatInternalMessage,\x20%s,\x20%s',_0x52a7a1,_0x12fcf8[_0xb8d3('0x1b')][_0xb8d3('0x1d')]);return _0x4eb2a7(_0x12fcf8['error']['message']);}logger[_0xb8d3('0x1b')](_0xb8d3('0x16'),_0x52a7a1,_0x12fcf8['error'][_0xb8d3('0x1d')]);return _0x13a2c3(_0x12fcf8[_0xb8d3('0x1b')][_0xb8d3('0x1d')]);}else{logger[_0xb8d3('0x1e')](_0xb8d3('0x16'),_0x52a7a1,_0xb8d3('0x17'));_0x13a2c3(_0x12fcf8['result']['message']);}})[_0xb8d3('0x1f')](function(_0x23e25d){logger[_0xb8d3('0x1b')]('ChatInternalMessage,\x20%s,\x20%s',_0x52a7a1,_0x23e25d);_0x4eb2a7(_0x23e25d);});});}
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js
index 2b65ce3..f45decb 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 _0xc737=['emit','length','./chatInternalMessage.events','save','update'];(function(_0x16b82c,_0x18abab){var _0x11afbf=function(_0x44947e){while(--_0x44947e){_0x16b82c['push'](_0x16b82c['shift']());}};_0x11afbf(++_0x18abab);}(_0xc737,0x8e));var _0x7c73=function(_0x315ec1,_0xd4f346){_0x315ec1=_0x315ec1-0x0;var _0xcd2acb=_0xc737[_0x315ec1];return _0xcd2acb;};'use strict';var ChatInternalMessageEvents=require(_0x7c73('0x0'));var events=[_0x7c73('0x1'),'remove',_0x7c73('0x2')];function createListener(_0x3e2b0d,_0x83f35b){return function(_0x17ac0d){_0x83f35b[_0x7c73('0x3')](_0x3e2b0d,_0x17ac0d);};}function removeListener(_0x2af61e,_0x22e872){return function(){ChatInternalMessageEvents['removeListener'](_0x2af61e,_0x22e872);};}exports['register']=function(_0x1eb29f){for(var _0x2f09f7=0x0,_0xd61255=events[_0x7c73('0x4')];_0x2f09f7<_0xd61255;_0x2f09f7++){var _0x4c0b1c=events[_0x2f09f7];var _0x575a80=createListener('chatInternalMessage:'+_0x4c0b1c,_0x1eb29f);ChatInternalMessageEvents['on'](_0x4c0b1c,_0x575a80);}};
\ No newline at end of file
+var _0x1c4d=['emit','removeListener','length','save','remove','update'];(function(_0x2fd652,_0x390a27){var _0x2d5a47=function(_0x330d07){while(--_0x330d07){_0x2fd652['push'](_0x2fd652['shift']());}};_0x2d5a47(++_0x390a27);}(_0x1c4d,0x1d7));var _0xd1c4=function(_0x314997,_0x234a37){_0x314997=_0x314997-0x0;var _0x46e9ca=_0x1c4d[_0x314997];return _0x46e9ca;};'use strict';var ChatInternalMessageEvents=require('./chatInternalMessage.events');var events=[_0xd1c4('0x0'),_0xd1c4('0x1'),_0xd1c4('0x2')];function createListener(_0x4f505c,_0xcc8012){return function(_0x3e30ce){_0xcc8012[_0xd1c4('0x3')](_0x4f505c,_0x3e30ce);};}function removeListener(_0x3bbe05,_0x4ca0df){return function(){ChatInternalMessageEvents[_0xd1c4('0x4')](_0x3bbe05,_0x4ca0df);};}exports['register']=function(_0x406eb6){for(var _0x12e793=0x0,_0x41cc76=events[_0xd1c4('0x5')];_0x12e793<_0x41cc76;_0x12e793++){var _0x429dc6=events[_0x12e793];var _0xc9284c=createListener('chatInternalMessage:'+_0x429dc6,_0x406eb6);ChatInternalMessageEvents['on'](_0x429dc6,_0xc9284c);}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js
index 0e4537e..ed23819 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 _0xd8b0=['put','update','delete','destroy','exports','multer','util','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','index','get','/describe','describe','isAuthenticated','getUsers','/:id','show','post'];(function(_0x59903e,_0x13e03b){var _0x55bdf5=function(_0x4d3722){while(--_0x4d3722){_0x59903e['push'](_0x59903e['shift']());}};_0x55bdf5(++_0x13e03b);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var auth=require(_0x0d8b('0x3'));var interaction=require(_0x0d8b('0x4'));var config=require(_0x0d8b('0x5'));var controller=require(_0x0d8b('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x0d8b('0x7')]);router[_0x0d8b('0x8')](_0x0d8b('0x9'),auth['isAuthenticated'](),controller[_0x0d8b('0xa')]);router[_0x0d8b('0x8')]('/users',auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0x8')](_0x0d8b('0xd'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')]('/',auth[_0x0d8b('0xb')](),controller['create']);router[_0x0d8b('0x10')]('/:id',controller[_0x0d8b('0x11')]);router[_0x0d8b('0x12')](_0x0d8b('0xd'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x13')]);module[_0x0d8b('0x14')]=router;
\ No newline at end of file
+var _0xa9e0=['destroy','exports','multer','util','path','Router','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','get','isAuthenticated','/describe','/users','/:id','show','post','delete'];(function(_0xe8aba7,_0x4f6499){var _0x1001dd=function(_0x166f5a){while(--_0x166f5a){_0xe8aba7['push'](_0xe8aba7['shift']());}};_0x1001dd(++_0x4f6499);}(_0xa9e0,0x123));var _0x0a9e=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0xa9e0[_0x387777];return _0x3f84c0;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var 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['describe']);router['get'](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['getUsers']);router[_0x0a9e('0x7')](_0x0a9e('0xb'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0xc')]);router[_0x0a9e('0xd')]('/',auth[_0x0a9e('0x8')](),controller['create']);router['put']('/:id',controller['update']);router[_0x0a9e('0xe')](_0x0a9e('0xb'),auth[_0x0a9e('0x8')](),controller[_0x0a9e('0xf')]);module[_0x0a9e('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js
index c189082..103a361 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 _0x4906=['out','exports','TEXT','medium','BOOLEAN','ENUM'];(function(_0x42b045,_0x2c2175){var _0xebf3be=function(_0x4dbfc9){while(--_0x4dbfc9){_0x42b045['push'](_0x42b045['shift']());}};_0xebf3be(++_0x2c2175);}(_0x4906,0x91));var _0x6490=function(_0x58aef1,_0x8affc5){_0x58aef1=_0x58aef1-0x0;var _0x2e6c98=_0x4906[_0x58aef1];return _0x2e6c98;};'use strict';var Sequelize=require('sequelize');module[_0x6490('0x0')]={'body':{'type':Sequelize[_0x6490('0x1')](_0x6490('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x6490('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0x6490('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x6490('0x4')]('in',_0x6490('0x5')),'defaultValue':_0x6490('0x5'),'allowNull':![]},'readAt':{'type':Sequelize['DATE']}};
\ No newline at end of file
+var _0xf191=['exports','BOOLEAN','ENUM','out','sequelize'];(function(_0x33ab79,_0x4f7c50){var _0x10ac00=function(_0x1caa4c){while(--_0x1caa4c){_0x33ab79['push'](_0x33ab79['shift']());}};_0x10ac00(++_0x4f7c50);}(_0xf191,0x86));var _0x1f19=function(_0x3a8d18,_0x34096f){_0x3a8d18=_0x3a8d18-0x0;var _0x13cb5d=_0xf191[_0x3a8d18];return _0x13cb5d;};'use strict';var Sequelize=require(_0x1f19('0x0'));module[_0x1f19('0x1')]={'body':{'type':Sequelize['TEXT']('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x1f19('0x2')],'defaultValue':![]},'secret':{'type':Sequelize[_0x1f19('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0x1f19('0x3')]('in',_0x1f19('0x4')),'defaultValue':_0x1f19('0x4'),'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 8941488..cb8c10c 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 _0x57f6=['YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','Contact','ChatInteraction','ChatInteractionId','read1stAt','interaction','get','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','SIP/%s','channel','event','EventManager','acceptmessage','parse','formData','chat','interface','html-pdf','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','defaults','redis','socket.io-emitter','./chatMessage.socket','register','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','destroy','stack','name','send','ChatMessage','rawAttributes','fieldName','type','key','map','query','filters','model','attributes','intersection','fields','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','show','params','keys','includeAll','find','catch','create','body','describe','chat-interactions','accept','readAt','format'];(function(_0x4154a6,_0x2c0b8e){var _0x3b2786=function(_0x2f5936){while(--_0x2f5936){_0x4154a6['push'](_0x4154a6['shift']());}};_0x3b2786(++_0x2c0b8e);}(_0x57f6,0x189));var _0x657f=function(_0x121350,_0x361f4d){_0x121350=_0x121350-0x0;var _0x2e21c7=_0x57f6[_0x121350];return _0x2e21c7;};'use strict';var pdf=require(_0x657f('0x0'));var emlformat=require(_0x657f('0x1'));var rimraf=require(_0x657f('0x2'));var zipdir=require(_0x657f('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x657f('0x4'));var moment=require('moment');var BPromise=require(_0x657f('0x5'));var Mustache=require(_0x657f('0x6'));var util=require(_0x657f('0x7'));var path=require(_0x657f('0x8'));var sox=require(_0x657f('0x9'));var csv=require(_0x657f('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x657f('0xb'));var squel=require('squel');var crypto=require(_0x657f('0xc'));var jsforce=require(_0x657f('0xd'));var deskjs=require(_0x657f('0xe'));var toCsv=require(_0x657f('0xa'));var querystring=require('querystring');var Papa=require(_0x657f('0xf'));var Redis=require(_0x657f('0x10'));var authService=require(_0x657f('0x11'));var qs=require(_0x657f('0x12'));var as=require(_0x657f('0x13'));var hardwareService=require(_0x657f('0x14'));var logger=require(_0x657f('0x15'))(_0x657f('0x16'));var utils=require(_0x657f('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0x657f('0x18')](config[_0x657f('0x19')],{'host':'localhost','port':0x18eb});var socket=require(_0x657f('0x1a'))(new Redis(config[_0x657f('0x19')]));require(_0x657f('0x1b'))[_0x657f('0x1c')](socket);var jayson=require(_0x657f('0x1d'));var client=jayson[_0x657f('0x1e')][_0x657f('0x1f')]({'port':0x232c});var client9002=jayson[_0x657f('0x1e')]['http']({'port':0x232a});function checkPasswordPattern(_0x4a24c6,_0x1fa186,_0x12664c){if(_0x12664c){var _0x2a4e84=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2a4e84[_0x657f('0x20')](_0x1fa186)){return _0x4a24c6;}else{throw new db[(_0x657f('0x21'))][(_0x657f('0x22'))](_0x657f('0x23'));}}else{return _0x4a24c6;}}function respondWithRpcPromise(_0x286e79,_0x5946d5,_0x2b4ea9,_0x4c32ab){return new BPromise(function(_0x2fb4a0,_0x308dd2){var _0x3f3baa=_0x4c32ab||client;return _0x3f3baa['request'](_0x286e79,_0x2b4ea9)[_0x657f('0x24')](function(_0x218ad4){logger[_0x657f('0x25')](_0x657f('0x26'),_0x5946d5,_0x657f('0x27'));logger[_0x657f('0x28')](_0x657f('0x29'),_0x5946d5,_0x657f('0x27'),JSON[_0x657f('0x2a')](_0x218ad4));if(_0x218ad4[_0x657f('0x2b')]){if(_0x218ad4[_0x657f('0x2b')][_0x657f('0x2c')]===0x1f4){logger[_0x657f('0x2b')](_0x657f('0x26'),_0x5946d5,_0x218ad4[_0x657f('0x2b')][_0x657f('0x2d')]);return _0x308dd2(_0x218ad4[_0x657f('0x2b')][_0x657f('0x2d')]);}logger['error'](_0x657f('0x26'),_0x5946d5,_0x218ad4[_0x657f('0x2b')]['message']);return _0x2fb4a0(_0x218ad4['error']['message']);}else{logger['info']('ChatMessage,\x20%s,\x20%s',_0x5946d5,'request\x20sent');_0x2fb4a0(_0x218ad4[_0x657f('0x2e')][_0x657f('0x2d')]);}})['catch'](function(_0x1e90dc){logger[_0x657f('0x2b')]('ChatMessage,\x20%s,\x20%s',_0x5946d5,_0x1e90dc);_0x308dd2(_0x1e90dc);});});}function respondWithStatusCode(_0x118d98,_0x379c10){_0x379c10=_0x379c10||0xcc;return function(_0x30c530){if(_0x30c530){return _0x118d98[_0x657f('0x2f')](_0x379c10);}return _0x118d98[_0x657f('0x30')](_0x379c10)[_0x657f('0x31')]();};}function respondWithResult(_0x1e63b6,_0x588245){_0x588245=_0x588245||0xc8;return function(_0xae11fe){if(_0xae11fe){return _0x1e63b6[_0x657f('0x30')](_0x588245)[_0x657f('0x32')](_0xae11fe);}};}function respondWithFilteredResult(_0x10c62c,_0x2ede5b){return function(_0x58955f){if(_0x58955f){var _0xfea9a8=_0x58955f[_0x657f('0x33')],_0x458f5a=_0x2ede5b['offset'],_0x4dc8b3=_0x2ede5b[_0x657f('0x34')]+_0x2ede5b[_0x657f('0x35')],_0x1d0e3f;if(_0x4dc8b3>=_0xfea9a8){_0x4dc8b3=_0xfea9a8;_0x1d0e3f=0xc8;}else{_0x1d0e3f=0xce;}_0x10c62c[_0x657f('0x30')](_0x1d0e3f);return _0x10c62c[_0x657f('0x36')](_0x657f('0x37'),_0x458f5a+'-'+_0x4dc8b3+'/'+_0xfea9a8)[_0x657f('0x32')](_0x58955f);}return null;};}function patchUpdates(_0x4a097e){return function(_0x2dd211){try{jsonpatch[_0x657f('0x38')](_0x2dd211,_0x4a097e,!![]);}catch(_0x15220e){return BPromise[_0x657f('0x39')](_0x15220e);}return _0x2dd211['save']();};}function saveUpdates(_0x3fb4fa,_0x206932){return function(_0x2b044d){if(_0x2b044d){return _0x2b044d[_0x657f('0x3a')](_0x3fb4fa)[_0x657f('0x24')](function(_0x58eb42){return _0x58eb42;});}return null;};}function removeEntity(_0xa523e4,_0x3da9fc){return function(_0x15972e){if(_0x15972e){return _0x15972e[_0x657f('0x3b')]()[_0x657f('0x24')](function(){_0xa523e4['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x24d617,_0x4cdcd3){return function(_0x1e1ffb){if(!_0x1e1ffb){_0x24d617[_0x657f('0x2f')](0x194);}return _0x1e1ffb;};}function handleError(_0x352693,_0x1deb13){_0x1deb13=_0x1deb13||0x1f4;return function(_0x1de76c){logger['error'](_0x1de76c[_0x657f('0x3c')]);if(_0x1de76c[_0x657f('0x3d')]){delete _0x1de76c['name'];}_0x352693['status'](_0x1deb13)[_0x657f('0x3e')](_0x1de76c);};}exports['index']=function(_0x5efa5b,_0xaff1f){var _0x4c3c9f={},_0x22b818={},_0x11c300={'count':0x0,'rows':[]};var _0x343c53=_['map'](db[_0x657f('0x3f')][_0x657f('0x40')],function(_0x1d169b){return{'name':_0x1d169b[_0x657f('0x41')],'type':_0x1d169b[_0x657f('0x42')][_0x657f('0x43')]};});_0x22b818['model']=_[_0x657f('0x44')](_0x343c53,_0x657f('0x3d'));_0x22b818['query']=_['keys'](_0x5efa5b[_0x657f('0x45')]);_0x22b818[_0x657f('0x46')]=_['intersection'](_0x22b818[_0x657f('0x47')],_0x22b818['query']);_0x4c3c9f[_0x657f('0x48')]=_[_0x657f('0x49')](_0x22b818['model'],qs[_0x657f('0x4a')](_0x5efa5b[_0x657f('0x45')][_0x657f('0x4a')]));_0x4c3c9f[_0x657f('0x48')]=_0x4c3c9f[_0x657f('0x48')]['length']?_0x4c3c9f[_0x657f('0x48')]:_0x22b818[_0x657f('0x47')];if(!_0x5efa5b[_0x657f('0x45')][_0x657f('0x4b')]('nolimit')){_0x4c3c9f[_0x657f('0x35')]=qs[_0x657f('0x35')](_0x5efa5b[_0x657f('0x45')][_0x657f('0x35')]);_0x4c3c9f[_0x657f('0x34')]=qs['offset'](_0x5efa5b[_0x657f('0x45')][_0x657f('0x34')]);}_0x4c3c9f[_0x657f('0x4c')]=qs[_0x657f('0x4d')](_0x5efa5b['query'][_0x657f('0x4d')]);_0x4c3c9f[_0x657f('0x4e')]=qs['filters'](_[_0x657f('0x4f')](_0x5efa5b['query'],_0x22b818[_0x657f('0x46')]));if(_0x5efa5b['query'][_0x657f('0x50')]){_0x4c3c9f[_0x657f('0x4e')]=_[_0x657f('0x51')](_0x4c3c9f[_0x657f('0x4e')],{'$or':_[_0x657f('0x44')](_0x343c53,function(_0x5bbc69){if(_0x5bbc69['type']!==_0x657f('0x52')){var _0x6d9c89={};_0x6d9c89[_0x5bbc69[_0x657f('0x3d')]]={'$like':'%'+_0x5efa5b[_0x657f('0x45')]['filter']+'%'};return _0x6d9c89;}})});}_0x4c3c9f=_[_0x657f('0x51')]({},_0x4c3c9f,_0x5efa5b[_0x657f('0x53')]);var _0x306106={'where':_0x4c3c9f['where']};return db[_0x657f('0x3f')][_0x657f('0x33')](_0x306106)[_0x657f('0x24')](function(_0x528089){_0x11c300['count']=_0x528089;if(_0x5efa5b[_0x657f('0x45')]['includeAll']){_0x4c3c9f['include']=[{'all':!![]}];}return db[_0x657f('0x3f')][_0x657f('0x54')](_0x4c3c9f);})[_0x657f('0x24')](function(_0x5e7d5a){_0x11c300[_0x657f('0x55')]=_0x5e7d5a;return _0x11c300;})['then'](respondWithFilteredResult(_0xaff1f,_0x4c3c9f))['catch'](handleError(_0xaff1f,null));};exports[_0x657f('0x56')]=function(_0xa71163,_0x2bea51){var _0x210135={'raw':!![],'where':{'id':_0xa71163[_0x657f('0x57')]['id']}},_0x3828d5={};_0x3828d5[_0x657f('0x47')]=_[_0x657f('0x58')](db[_0x657f('0x3f')][_0x657f('0x40')]);_0x3828d5[_0x657f('0x45')]=_[_0x657f('0x58')](_0xa71163['query']);_0x3828d5[_0x657f('0x46')]=_[_0x657f('0x49')](_0x3828d5[_0x657f('0x47')],_0x3828d5[_0x657f('0x45')]);_0x210135[_0x657f('0x48')]=_[_0x657f('0x49')](_0x3828d5[_0x657f('0x47')],qs['fields'](_0xa71163[_0x657f('0x45')]['fields']));_0x210135[_0x657f('0x48')]=_0x210135['attributes']['length']?_0x210135[_0x657f('0x48')]:_0x3828d5[_0x657f('0x47')];if(_0xa71163[_0x657f('0x45')][_0x657f('0x59')]){_0x210135['include']=[{'all':!![]}];}_0x210135=_[_0x657f('0x51')]({},_0x210135,_0xa71163[_0x657f('0x53')]);return db[_0x657f('0x3f')][_0x657f('0x5a')](_0x210135)[_0x657f('0x24')](handleEntityNotFound(_0x2bea51,null))[_0x657f('0x24')](respondWithResult(_0x2bea51,null))[_0x657f('0x5b')](handleError(_0x2bea51,null));};exports[_0x657f('0x5c')]=function(_0x2a0a0d,_0x2e8abb){return db[_0x657f('0x3f')][_0x657f('0x5c')](_0x2a0a0d[_0x657f('0x5d')],{})['then'](respondWithResult(_0x2e8abb,0xc9))[_0x657f('0x5b')](handleError(_0x2e8abb,null));};exports[_0x657f('0x3a')]=function(_0x43bfa7,_0x577a65){if(_0x43bfa7['body']['id']){delete _0x43bfa7[_0x657f('0x5d')]['id'];}return db[_0x657f('0x3f')][_0x657f('0x5a')]({'where':{'id':_0x43bfa7[_0x657f('0x57')]['id']}})[_0x657f('0x24')](handleEntityNotFound(_0x577a65,null))['then'](saveUpdates(_0x43bfa7[_0x657f('0x5d')],null))[_0x657f('0x24')](respondWithResult(_0x577a65,null))[_0x657f('0x5b')](handleError(_0x577a65,null));};exports[_0x657f('0x3b')]=function(_0x2d018a,_0x16cd7d){return db[_0x657f('0x3f')][_0x657f('0x5a')]({'where':{'id':_0x2d018a[_0x657f('0x57')]['id']}})['then'](handleEntityNotFound(_0x16cd7d,null))['then'](removeEntity(_0x16cd7d,null))[_0x657f('0x5b')](handleError(_0x16cd7d,null));};exports[_0x657f('0x5e')]=function(_0x5bd174,_0x4fb887){return db[_0x657f('0x3f')][_0x657f('0x5e')]()['then'](respondWithResult(_0x4fb887,null))[_0x657f('0x5b')](handleError(_0x4fb887,null));};var interaction_log=require(_0x657f('0x15'))(_0x657f('0x5f'));exports[_0x657f('0x60')]=function(_0x382e01,_0x42f37b,_0x322915){var _0x40e94f={'channel':'chat'};if(_0x382e01['body']['id']){delete _0x382e01[_0x657f('0x5d')]['id'];}_0x382e01[_0x657f('0x5d')]['read']=!![];_0x382e01[_0x657f('0x5d')][_0x657f('0x61')]=moment()[_0x657f('0x62')](_0x657f('0x63'));_0x382e01[_0x657f('0x5d')][_0x657f('0x64')]=_0x382e01[_0x657f('0x5d')][_0x657f('0x64')]||_0x382e01[_0x657f('0x65')]['id'];return db[_0x657f('0x3f')][_0x657f('0x5a')]({'where':{'id':_0x382e01[_0x657f('0x57')]['id'],'UserId':null},'include':[{'model':db[_0x657f('0x66')],'as':_0x657f('0x67')}]})[_0x657f('0x24')](handleEntityNotFound(_0x42f37b,null))['then'](saveUpdates(_0x382e01[_0x657f('0x5d')],null))[_0x657f('0x24')](function(_0x529207){if(_0x529207){_0x40e94f[_0x657f('0x2d')]=_0x529207['get']({'plain':!![]});return db[_0x657f('0x68')][_0x657f('0x5a')]({'where':{'id':_0x529207[_0x657f('0x69')]}});}return null;})['then'](handleEntityNotFound(_0x42f37b,null))[_0x657f('0x24')](function(_0x24569e){if(_0x24569e){return _0x24569e[_0x657f('0x3a')]({'UserId':_0x382e01['body'][_0x657f('0x64')],'read1stAt':_['isNil'](_0x24569e[_0x657f('0x6a')])?moment()['format'](_0x657f('0x63')):undefined});}return null;})[_0x657f('0x24')](function(_0x200acc){if(_0x200acc){_0x40e94f[_0x657f('0x6b')]=_0x200acc[_0x657f('0x6c')]({'plain':!![]});interaction_log[_0x657f('0x25')](_0x657f('0x6d'),_0x382e01[_0x657f('0x65')]['id'],_0x382e01[_0x657f('0x65')][_0x657f('0x3d')],_0x382e01[_0x657f('0x65')][_0x657f('0x6e')],_0x40e94f[_0x657f('0x6b')]['id'],_0x382e01[_0x657f('0x5d')]?JSON[_0x657f('0x2a')](_0x382e01[_0x657f('0x5d')]):_0x657f('0x6f'));return respondWithRpcPromise(_0x657f('0x70'),_0x657f('0x71'),_0x40e94f);}return null;})['then'](function(_0x49f0d1){if(_0x49f0d1){if(_0x382e01[_0x657f('0x5d')]['manual']){_0x40e94f[_0x657f('0x2d')]['interface']=util[_0x657f('0x62')](_0x657f('0x72'),_0x382e01[_0x657f('0x65')][_0x657f('0x3d')]);_0x40e94f[_0x657f('0x2d')]['channel']=_0x40e94f[_0x657f('0x73')];_0x40e94f[_0x657f('0x2d')][_0x657f('0x74')]=_0x657f('0x60');return respondWithRpcPromise(_0x657f('0x75'),_0x657f('0x75'),{'event':_0x657f('0x76'),'message':_['merge'](_0x40e94f[_0x657f('0x2d')],JSON[_0x657f('0x77')](_0x40e94f[_0x657f('0x6b')][_0x657f('0x78')]))},client9002)[_0x657f('0x24')](function(){return _0x40e94f;});}return _0x40e94f;}return null;})[_0x657f('0x24')](respondWithResult(_0x42f37b,null))['catch'](handleError(_0x42f37b,null));};var interaction_log=require(_0x657f('0x15'))('chat-interactions');exports[_0x657f('0x39')]=function(_0x2ba290,_0x4a80dc,_0x3a032c){var _0x5e90f4={'agent':{},'channel':_0x657f('0x79')};if(_0x2ba290[_0x657f('0x5d')]['id']){delete _0x2ba290[_0x657f('0x5d')]['id'];}_0x2ba290[_0x657f('0x5d')][_0x657f('0x64')]=_0x2ba290[_0x657f('0x5d')][_0x657f('0x64')]||_0x2ba290['user']['id'];_0x5e90f4['agent']['id']=_0x2ba290[_0x657f('0x5d')][_0x657f('0x64')];return db['ChatMessage'][_0x657f('0x5a')]({'where':{'id':_0x2ba290['params']['id'],'UserId':null}})[_0x657f('0x24')](handleEntityNotFound(_0x4a80dc,null))[_0x657f('0x24')](function(_0x247366){if(_0x247366){_0x5e90f4[_0x657f('0x2d')]=_0x247366[_0x657f('0x6c')]({'plain':!![]});return db[_0x657f('0x68')][_0x657f('0x5a')]({'where':{'id':_0x247366['ChatInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x4a80dc,null))[_0x657f('0x24')](function(_0x467b52){if(_0x467b52){_0x5e90f4[_0x657f('0x6b')]=_0x467b52[_0x657f('0x6c')]({'plain':!![]});interaction_log[_0x657f('0x25')]('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x2ba290['user']['id'],_0x2ba290[_0x657f('0x65')]['name'],_0x2ba290[_0x657f('0x65')][_0x657f('0x6e')],_0x5e90f4['interaction']['id'],_0x2ba290['body']?JSON['stringify'](_0x2ba290[_0x657f('0x5d')]):_0x657f('0x6f'));return respondWithRpcPromise('RejectMessage','rejectMessage',_0x5e90f4);}return null;})['then'](function(_0xe31455){if(_0xe31455){_0xe31455[_0x657f('0x2d')][_0x657f('0x7a')]=util['format'](_0x657f('0x72'),_0x2ba290[_0x657f('0x65')][_0x657f('0x3d')]);_0xe31455[_0x657f('0x2d')]['channel']=_0x5e90f4['channel'];_0xe31455[_0x657f('0x2d')][_0x657f('0x74')]=_0x657f('0x39');respondWithRpcPromise('EventManager','EventManager',{'event':'rejectmessage','message':_0xe31455[_0x657f('0x2d')]},client9002);return _0x5e90f4;}return null;})[_0x657f('0x24')](respondWithResult(_0x4a80dc,null))[_0x657f('0x5b')](handleError(_0x4a80dc,null));};
\ No newline at end of file
+var _0xeb46=['ChatInteractionId','rejectmessage','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','redis','defaults','localhost','register','client','http','Sequelize','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','ChatMessage,\x20%s,\x20%s','debug','ChatMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','stack','name','send','index','ChatMessage','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','params','find','create','body','describe','accept','chat','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','Contact','get','ChatInteraction','isNil','interaction','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','manual','interface','SIP/%s','channel','event','EventManager','acceptmessage','chat-interactions','agent'];(function(_0x4cada2,_0x40288d){var _0x58fa06=function(_0x1fae43){while(--_0x1fae43){_0x4cada2['push'](_0x4cada2['shift']());}};_0x58fa06(++_0x40288d);}(_0xeb46,0x7a));var _0x6eb4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xeb46[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0x6eb4('0x0'));var emlformat=require(_0x6eb4('0x1'));var rimraf=require(_0x6eb4('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6eb4('0x3'));var rp=require(_0x6eb4('0x4'));var moment=require(_0x6eb4('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x6eb4('0x6'));var util=require(_0x6eb4('0x7'));var path=require(_0x6eb4('0x8'));var sox=require('sox');var csv=require(_0x6eb4('0x9'));var ejs=require(_0x6eb4('0xa'));var fs=require('fs');var _=require(_0x6eb4('0xb'));var squel=require(_0x6eb4('0xc'));var crypto=require(_0x6eb4('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6eb4('0xe'));var Papa=require(_0x6eb4('0xf'));var Redis=require(_0x6eb4('0x10'));var authService=require(_0x6eb4('0x11'));var qs=require(_0x6eb4('0x12'));var as=require(_0x6eb4('0x13'));var hardwareService=require(_0x6eb4('0x14'));var logger=require(_0x6eb4('0x15'))(_0x6eb4('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x6eb4('0x17'))['db'];config[_0x6eb4('0x18')]=_[_0x6eb4('0x19')](config[_0x6eb4('0x18')],{'host':_0x6eb4('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x6eb4('0x18')]));require('./chatMessage.socket')[_0x6eb4('0x1b')](socket);var jayson=require('jayson/promise');var client=jayson[_0x6eb4('0x1c')][_0x6eb4('0x1d')]({'port':0x232c});var client9002=jayson['client'][_0x6eb4('0x1d')]({'port':0x232a});function checkPasswordPattern(_0x16abd7,_0x2cca6b,_0x37bc87){if(_0x37bc87){var _0x455d57=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x455d57['test'](_0x2cca6b)){return _0x16abd7;}else{throw new db[(_0x6eb4('0x1e'))]['ValidationError'](_0x6eb4('0x1f'));}}else{return _0x16abd7;}}function respondWithRpcPromise(_0x2ce5bb,_0x3e1a93,_0x8be0d6,_0x5eebe6){return new BPromise(function(_0x5e4acf,_0x400f7e){var _0x2fe94e=_0x5eebe6||client;return _0x2fe94e['request'](_0x2ce5bb,_0x8be0d6)[_0x6eb4('0x20')](function(_0x1a2229){logger[_0x6eb4('0x21')](_0x6eb4('0x22'),_0x3e1a93,'request\x20sent');logger[_0x6eb4('0x23')](_0x6eb4('0x24'),_0x3e1a93,_0x6eb4('0x25'),JSON[_0x6eb4('0x26')](_0x1a2229));if(_0x1a2229[_0x6eb4('0x27')]){if(_0x1a2229[_0x6eb4('0x27')][_0x6eb4('0x28')]===0x1f4){logger[_0x6eb4('0x27')]('ChatMessage,\x20%s,\x20%s',_0x3e1a93,_0x1a2229[_0x6eb4('0x27')][_0x6eb4('0x29')]);return _0x400f7e(_0x1a2229['error'][_0x6eb4('0x29')]);}logger[_0x6eb4('0x27')](_0x6eb4('0x22'),_0x3e1a93,_0x1a2229[_0x6eb4('0x27')]['message']);return _0x5e4acf(_0x1a2229[_0x6eb4('0x27')][_0x6eb4('0x29')]);}else{logger[_0x6eb4('0x21')](_0x6eb4('0x22'),_0x3e1a93,'request\x20sent');_0x5e4acf(_0x1a2229[_0x6eb4('0x2a')][_0x6eb4('0x29')]);}})[_0x6eb4('0x2b')](function(_0x36c41b){logger[_0x6eb4('0x27')](_0x6eb4('0x22'),_0x3e1a93,_0x36c41b);_0x400f7e(_0x36c41b);});});}function respondWithStatusCode(_0x2d2d58,_0x2bcc7a){_0x2bcc7a=_0x2bcc7a||0xcc;return function(_0x3d7d98){if(_0x3d7d98){return _0x2d2d58[_0x6eb4('0x2c')](_0x2bcc7a);}return _0x2d2d58[_0x6eb4('0x2d')](_0x2bcc7a)[_0x6eb4('0x2e')]();};}function respondWithResult(_0x41e782,_0x21dc77){_0x21dc77=_0x21dc77||0xc8;return function(_0x4178da){if(_0x4178da){return _0x41e782[_0x6eb4('0x2d')](_0x21dc77)[_0x6eb4('0x2f')](_0x4178da);}};}function respondWithFilteredResult(_0x20c6d7,_0x4e0827){return function(_0xb4a8a1){if(_0xb4a8a1){var _0x6ea624=_0xb4a8a1[_0x6eb4('0x30')],_0x222ecd=_0x4e0827[_0x6eb4('0x31')],_0x41dcb3=_0x4e0827['offset']+_0x4e0827[_0x6eb4('0x32')],_0x17502a;if(_0x41dcb3>=_0x6ea624){_0x41dcb3=_0x6ea624;_0x17502a=0xc8;}else{_0x17502a=0xce;}_0x20c6d7[_0x6eb4('0x2d')](_0x17502a);return _0x20c6d7[_0x6eb4('0x33')](_0x6eb4('0x34'),_0x222ecd+'-'+_0x41dcb3+'/'+_0x6ea624)[_0x6eb4('0x2f')](_0xb4a8a1);}return null;};}function patchUpdates(_0x2802c2){return function(_0x2c50a2){try{jsonpatch[_0x6eb4('0x35')](_0x2c50a2,_0x2802c2,!![]);}catch(_0x2f335f){return BPromise[_0x6eb4('0x36')](_0x2f335f);}return _0x2c50a2[_0x6eb4('0x37')]();};}function saveUpdates(_0x1df0a3,_0x381420){return function(_0x20c453){if(_0x20c453){return _0x20c453[_0x6eb4('0x38')](_0x1df0a3)[_0x6eb4('0x20')](function(_0x5bf097){return _0x5bf097;});}return null;};}function removeEntity(_0x3d26dc,_0x5b897e){return function(_0x5c6660){if(_0x5c6660){return _0x5c6660['destroy']()[_0x6eb4('0x20')](function(){_0x3d26dc[_0x6eb4('0x2d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x346c5e,_0x3b2c93){return function(_0x81b393){if(!_0x81b393){_0x346c5e[_0x6eb4('0x2c')](0x194);}return _0x81b393;};}function handleError(_0x2d4ef1,_0x2e1a90){_0x2e1a90=_0x2e1a90||0x1f4;return function(_0x494689){logger[_0x6eb4('0x27')](_0x494689[_0x6eb4('0x39')]);if(_0x494689[_0x6eb4('0x3a')]){delete _0x494689[_0x6eb4('0x3a')];}_0x2d4ef1[_0x6eb4('0x2d')](_0x2e1a90)[_0x6eb4('0x3b')](_0x494689);};}exports[_0x6eb4('0x3c')]=function(_0x5afd4a,_0x102e2c){var _0x308619={},_0x4224e8={},_0x342e5a={'count':0x0,'rows':[]};var _0x5da70b=_['map'](db[_0x6eb4('0x3d')][_0x6eb4('0x3e')],function(_0x12fb52){return{'name':_0x12fb52[_0x6eb4('0x3f')],'type':_0x12fb52[_0x6eb4('0x40')]['key']};});_0x4224e8[_0x6eb4('0x41')]=_[_0x6eb4('0x42')](_0x5da70b,_0x6eb4('0x3a'));_0x4224e8[_0x6eb4('0x43')]=_[_0x6eb4('0x44')](_0x5afd4a[_0x6eb4('0x43')]);_0x4224e8[_0x6eb4('0x45')]=_[_0x6eb4('0x46')](_0x4224e8[_0x6eb4('0x41')],_0x4224e8['query']);_0x308619[_0x6eb4('0x47')]=_[_0x6eb4('0x46')](_0x4224e8['model'],qs[_0x6eb4('0x48')](_0x5afd4a['query'][_0x6eb4('0x48')]));_0x308619[_0x6eb4('0x47')]=_0x308619[_0x6eb4('0x47')][_0x6eb4('0x49')]?_0x308619[_0x6eb4('0x47')]:_0x4224e8[_0x6eb4('0x41')];if(!_0x5afd4a['query'][_0x6eb4('0x4a')]('nolimit')){_0x308619['limit']=qs[_0x6eb4('0x32')](_0x5afd4a[_0x6eb4('0x43')][_0x6eb4('0x32')]);_0x308619[_0x6eb4('0x31')]=qs[_0x6eb4('0x31')](_0x5afd4a[_0x6eb4('0x43')][_0x6eb4('0x31')]);}_0x308619[_0x6eb4('0x4b')]=qs[_0x6eb4('0x4c')](_0x5afd4a['query'][_0x6eb4('0x4c')]);_0x308619[_0x6eb4('0x4d')]=qs[_0x6eb4('0x45')](_[_0x6eb4('0x4e')](_0x5afd4a['query'],_0x4224e8['filters']));if(_0x5afd4a[_0x6eb4('0x43')][_0x6eb4('0x4f')]){_0x308619[_0x6eb4('0x4d')]=_[_0x6eb4('0x50')](_0x308619[_0x6eb4('0x4d')],{'$or':_[_0x6eb4('0x42')](_0x5da70b,function(_0x5bd7f0){if(_0x5bd7f0['type']!==_0x6eb4('0x51')){var _0x1c811d={};_0x1c811d[_0x5bd7f0[_0x6eb4('0x3a')]]={'$like':'%'+_0x5afd4a[_0x6eb4('0x43')][_0x6eb4('0x4f')]+'%'};return _0x1c811d;}})});}_0x308619=_['merge']({},_0x308619,_0x5afd4a[_0x6eb4('0x52')]);var _0x5afc75={'where':_0x308619[_0x6eb4('0x4d')]};return db[_0x6eb4('0x3d')][_0x6eb4('0x30')](_0x5afc75)[_0x6eb4('0x20')](function(_0x54c67e){_0x342e5a[_0x6eb4('0x30')]=_0x54c67e;if(_0x5afd4a[_0x6eb4('0x43')][_0x6eb4('0x53')]){_0x308619[_0x6eb4('0x54')]=[{'all':!![]}];}return db[_0x6eb4('0x3d')][_0x6eb4('0x55')](_0x308619);})[_0x6eb4('0x20')](function(_0xcf4bda){_0x342e5a[_0x6eb4('0x56')]=_0xcf4bda;return _0x342e5a;})['then'](respondWithFilteredResult(_0x102e2c,_0x308619))['catch'](handleError(_0x102e2c,null));};exports['show']=function(_0x49f66b,_0x5c0328){var _0x51627c={'raw':!![],'where':{'id':_0x49f66b[_0x6eb4('0x57')]['id']}},_0x12eacc={};_0x12eacc[_0x6eb4('0x41')]=_[_0x6eb4('0x44')](db[_0x6eb4('0x3d')]['rawAttributes']);_0x12eacc['query']=_[_0x6eb4('0x44')](_0x49f66b[_0x6eb4('0x43')]);_0x12eacc[_0x6eb4('0x45')]=_[_0x6eb4('0x46')](_0x12eacc[_0x6eb4('0x41')],_0x12eacc[_0x6eb4('0x43')]);_0x51627c[_0x6eb4('0x47')]=_[_0x6eb4('0x46')](_0x12eacc[_0x6eb4('0x41')],qs[_0x6eb4('0x48')](_0x49f66b[_0x6eb4('0x43')]['fields']));_0x51627c[_0x6eb4('0x47')]=_0x51627c[_0x6eb4('0x47')][_0x6eb4('0x49')]?_0x51627c[_0x6eb4('0x47')]:_0x12eacc[_0x6eb4('0x41')];if(_0x49f66b['query'][_0x6eb4('0x53')]){_0x51627c[_0x6eb4('0x54')]=[{'all':!![]}];}_0x51627c=_[_0x6eb4('0x50')]({},_0x51627c,_0x49f66b['options']);return db[_0x6eb4('0x3d')][_0x6eb4('0x58')](_0x51627c)['then'](handleEntityNotFound(_0x5c0328,null))['then'](respondWithResult(_0x5c0328,null))[_0x6eb4('0x2b')](handleError(_0x5c0328,null));};exports[_0x6eb4('0x59')]=function(_0x1a3683,_0x3b2a5){return db['ChatMessage'][_0x6eb4('0x59')](_0x1a3683[_0x6eb4('0x5a')],{})[_0x6eb4('0x20')](respondWithResult(_0x3b2a5,0xc9))['catch'](handleError(_0x3b2a5,null));};exports[_0x6eb4('0x38')]=function(_0x20f307,_0x3407d8){if(_0x20f307[_0x6eb4('0x5a')]['id']){delete _0x20f307[_0x6eb4('0x5a')]['id'];}return db[_0x6eb4('0x3d')][_0x6eb4('0x58')]({'where':{'id':_0x20f307[_0x6eb4('0x57')]['id']}})[_0x6eb4('0x20')](handleEntityNotFound(_0x3407d8,null))[_0x6eb4('0x20')](saveUpdates(_0x20f307[_0x6eb4('0x5a')],null))[_0x6eb4('0x20')](respondWithResult(_0x3407d8,null))[_0x6eb4('0x2b')](handleError(_0x3407d8,null));};exports['destroy']=function(_0x3727a1,_0x4e14ad){return db[_0x6eb4('0x3d')]['find']({'where':{'id':_0x3727a1['params']['id']}})['then'](handleEntityNotFound(_0x4e14ad,null))[_0x6eb4('0x20')](removeEntity(_0x4e14ad,null))[_0x6eb4('0x2b')](handleError(_0x4e14ad,null));};exports[_0x6eb4('0x5b')]=function(_0x208ca5,_0x2b77e1){return db[_0x6eb4('0x3d')][_0x6eb4('0x5b')]()['then'](respondWithResult(_0x2b77e1,null))['catch'](handleError(_0x2b77e1,null));};var interaction_log=require(_0x6eb4('0x15'))('chat-interactions');exports[_0x6eb4('0x5c')]=function(_0x37e2d5,_0x3d820a,_0x2fbc0d){var _0x7a73be={'channel':_0x6eb4('0x5d')};if(_0x37e2d5[_0x6eb4('0x5a')]['id']){delete _0x37e2d5[_0x6eb4('0x5a')]['id'];}_0x37e2d5[_0x6eb4('0x5a')][_0x6eb4('0x5e')]=!![];_0x37e2d5[_0x6eb4('0x5a')]['readAt']=moment()[_0x6eb4('0x5f')](_0x6eb4('0x60'));_0x37e2d5[_0x6eb4('0x5a')][_0x6eb4('0x61')]=_0x37e2d5[_0x6eb4('0x5a')][_0x6eb4('0x61')]||_0x37e2d5[_0x6eb4('0x62')]['id'];return db['ChatMessage'][_0x6eb4('0x58')]({'where':{'id':_0x37e2d5[_0x6eb4('0x57')]['id'],'UserId':null},'include':[{'model':db['CmContact'],'as':_0x6eb4('0x63')}]})[_0x6eb4('0x20')](handleEntityNotFound(_0x3d820a,null))[_0x6eb4('0x20')](saveUpdates(_0x37e2d5[_0x6eb4('0x5a')],null))[_0x6eb4('0x20')](function(_0x145b4c){if(_0x145b4c){_0x7a73be[_0x6eb4('0x29')]=_0x145b4c[_0x6eb4('0x64')]({'plain':!![]});return db[_0x6eb4('0x65')]['find']({'where':{'id':_0x145b4c['ChatInteractionId']}});}return null;})[_0x6eb4('0x20')](handleEntityNotFound(_0x3d820a,null))[_0x6eb4('0x20')](function(_0x3a91e1){if(_0x3a91e1){return _0x3a91e1[_0x6eb4('0x38')]({'UserId':_0x37e2d5[_0x6eb4('0x5a')][_0x6eb4('0x61')],'read1stAt':_[_0x6eb4('0x66')](_0x3a91e1['read1stAt'])?moment()[_0x6eb4('0x5f')](_0x6eb4('0x60')):undefined});}return null;})[_0x6eb4('0x20')](function(_0x3fe215){if(_0x3fe215){_0x7a73be[_0x6eb4('0x67')]=_0x3fe215[_0x6eb4('0x64')]({'plain':!![]});interaction_log[_0x6eb4('0x21')](_0x6eb4('0x68'),_0x37e2d5['user']['id'],_0x37e2d5[_0x6eb4('0x62')][_0x6eb4('0x3a')],_0x37e2d5[_0x6eb4('0x62')][_0x6eb4('0x69')],_0x7a73be[_0x6eb4('0x67')]['id'],_0x37e2d5['body']?JSON[_0x6eb4('0x26')](_0x37e2d5[_0x6eb4('0x5a')]):_0x6eb4('0x6a'));return respondWithRpcPromise(_0x6eb4('0x6b'),_0x6eb4('0x6c'),_0x7a73be);}return null;})[_0x6eb4('0x20')](function(_0x1ac344){if(_0x1ac344){if(_0x37e2d5[_0x6eb4('0x5a')][_0x6eb4('0x6d')]){_0x7a73be[_0x6eb4('0x29')][_0x6eb4('0x6e')]=util[_0x6eb4('0x5f')](_0x6eb4('0x6f'),_0x37e2d5[_0x6eb4('0x62')]['name']);_0x7a73be[_0x6eb4('0x29')][_0x6eb4('0x70')]=_0x7a73be[_0x6eb4('0x70')];_0x7a73be['message'][_0x6eb4('0x71')]=_0x6eb4('0x5c');return respondWithRpcPromise(_0x6eb4('0x72'),_0x6eb4('0x72'),{'event':_0x6eb4('0x73'),'message':_[_0x6eb4('0x50')](_0x7a73be[_0x6eb4('0x29')],JSON['parse'](_0x7a73be['interaction']['formData']))},client9002)['then'](function(){return _0x7a73be;});}return _0x7a73be;}return null;})['then'](respondWithResult(_0x3d820a,null))[_0x6eb4('0x2b')](handleError(_0x3d820a,null));};var interaction_log=require(_0x6eb4('0x15'))(_0x6eb4('0x74'));exports[_0x6eb4('0x36')]=function(_0x5465a9,_0x387f29,_0x141c08){var _0x333eb2={'agent':{},'channel':_0x6eb4('0x5d')};if(_0x5465a9['body']['id']){delete _0x5465a9[_0x6eb4('0x5a')]['id'];}_0x5465a9[_0x6eb4('0x5a')][_0x6eb4('0x61')]=_0x5465a9[_0x6eb4('0x5a')][_0x6eb4('0x61')]||_0x5465a9[_0x6eb4('0x62')]['id'];_0x333eb2[_0x6eb4('0x75')]['id']=_0x5465a9['body'][_0x6eb4('0x61')];return db[_0x6eb4('0x3d')][_0x6eb4('0x58')]({'where':{'id':_0x5465a9[_0x6eb4('0x57')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x387f29,null))[_0x6eb4('0x20')](function(_0xd340f1){if(_0xd340f1){_0x333eb2[_0x6eb4('0x29')]=_0xd340f1[_0x6eb4('0x64')]({'plain':!![]});return db[_0x6eb4('0x65')][_0x6eb4('0x58')]({'where':{'id':_0xd340f1[_0x6eb4('0x76')]}});}return null;})['then'](handleEntityNotFound(_0x387f29,null))[_0x6eb4('0x20')](function(_0x5ea924){if(_0x5ea924){_0x333eb2[_0x6eb4('0x67')]=_0x5ea924[_0x6eb4('0x64')]({'plain':!![]});interaction_log[_0x6eb4('0x21')]('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x5465a9['user']['id'],_0x5465a9[_0x6eb4('0x62')][_0x6eb4('0x3a')],_0x5465a9['user'][_0x6eb4('0x69')],_0x333eb2['interaction']['id'],_0x5465a9[_0x6eb4('0x5a')]?JSON[_0x6eb4('0x26')](_0x5465a9['body']):_0x6eb4('0x6a'));return respondWithRpcPromise('RejectMessage','rejectMessage',_0x333eb2);}return null;})[_0x6eb4('0x20')](function(_0x4b469f){if(_0x4b469f){_0x4b469f[_0x6eb4('0x29')][_0x6eb4('0x6e')]=util[_0x6eb4('0x5f')](_0x6eb4('0x6f'),_0x5465a9[_0x6eb4('0x62')][_0x6eb4('0x3a')]);_0x4b469f[_0x6eb4('0x29')][_0x6eb4('0x70')]=_0x333eb2[_0x6eb4('0x70')];_0x4b469f[_0x6eb4('0x29')]['event']='reject';respondWithRpcPromise(_0x6eb4('0x72'),_0x6eb4('0x72'),{'event':_0x6eb4('0x77'),'message':_0x4b469f[_0x6eb4('0x29')]},client9002);return _0x333eb2;}return null;})['then'](respondWithResult(_0x387f29,null))[_0x6eb4('0x2b')](handleError(_0x387f29,null));};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.events.js b/server/api/chatMessage/chatMessage.events.js
index 4155fe9..f6cdc41 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 _0x2d6f=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatMessage','setMaxListeners','remove'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x2d6f,0xa6));var _0xf2d6=function(_0x2b88e4,_0x336e1d){_0x2b88e4=_0x2b88e4-0x0;var _0x2b5c56=_0x2d6f[_0x2b88e4];return _0x2b5c56;};'use strict';var EventEmitter=require(_0xf2d6('0x0'));var ChatMessage=require(_0xf2d6('0x1'))['db'][_0xf2d6('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0xf2d6('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xf2d6('0x4')};function emitEvent(_0x505489){return function(_0x291ab7,_0x49e1fb,_0x3379fc){ChatMessageEvents[_0xf2d6('0x5')](_0x505489+':'+_0x291ab7['id'],_0x291ab7);ChatMessageEvents[_0xf2d6('0x5')](_0x505489,_0x291ab7);_0x3379fc(null);};}for(var e in events){if(events[_0xf2d6('0x6')](e)){var event=events[e];ChatMessage[_0xf2d6('0x7')](e,emitEvent(event));}}module[_0xf2d6('0x8')]=ChatMessageEvents;
\ No newline at end of file
+var _0x3966=['update','emit','hook','../../mysqldb','ChatMessage','setMaxListeners'];(function(_0x5481ec,_0x152404){var _0xcec2d7=function(_0x366e52){while(--_0x366e52){_0x5481ec['push'](_0x5481ec['shift']());}};_0xcec2d7(++_0x152404);}(_0x3966,0x11d));var _0x6396=function(_0x54763e,_0x4072b1){_0x54763e=_0x54763e-0x0;var _0x4365b1=_0x3966[_0x54763e];return _0x4365b1;};'use strict';var EventEmitter=require('events');var ChatMessage=require(_0x6396('0x0'))['db'][_0x6396('0x1')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x6396('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x6396('0x3'),'afterDestroy':'remove'};function emitEvent(_0x4b8022){return function(_0x1785f1,_0x13e8cc,_0x5470a2){ChatMessageEvents[_0x6396('0x4')](_0x4b8022+':'+_0x1785f1['id'],_0x1785f1);ChatMessageEvents[_0x6396('0x4')](_0x4b8022,_0x1785f1);_0x5470a2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatMessage[_0x6396('0x5')](e,emitEvent(event));}}module['exports']=ChatMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.model.js b/server/api/chatMessage/chatMessage.model.js
index a4a69af..106331a 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 _0xd2e4=['path','rimraf','./chatMessage.attributes','exports','define','fti_chat_messages','FULLTEXT','get','direction','toLowerCase','out','secret','isNil','UserId','ChatInteractionId','then','update','catch','lodash','../../config/logger','moment','request-promise'];(function(_0x23c3f4,_0x24f0b3){var _0x82f0f1=function(_0x1071d6){while(--_0x1071d6){_0x23c3f4['push'](_0x23c3f4['shift']());}};_0x82f0f1(++_0x24f0b3);}(_0xd2e4,0x1e0));var _0x4d2e=function(_0x348015,_0x413c2c){_0x348015=_0x348015-0x0;var _0x57e539=_0xd2e4[_0x348015];return _0x57e539;};'use strict';var _=require(_0x4d2e('0x0'));var util=require('util');var logger=require(_0x4d2e('0x1'))('api');var moment=require(_0x4d2e('0x2'));var BPromise=require('bluebird');var rp=require(_0x4d2e('0x3'));var fs=require('fs');var path=require(_0x4d2e('0x4'));var rimraf=require(_0x4d2e('0x5'));var config=require('../../config/environment');var attributes=require(_0x4d2e('0x6'));module[_0x4d2e('0x7')]=function(_0x2e65ca,_0x291499){return _0x2e65ca[_0x4d2e('0x8')]('ChatMessage',attributes,{'tableName':'chat_messages','paranoid':![],'indexes':[{'name':_0x4d2e('0x9'),'fields':['body'],'type':_0x4d2e('0xa')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2660dc,_0x2fad31,_0x444b20){var _0x2be369=_0x2e65ca['models'];var _0x1de21d=_0x2660dc[_0x4d2e('0xb')]({'plain':!![]});if(_0x1de21d[_0x4d2e('0xc')][_0x4d2e('0xd')]()==='in'||_0x1de21d[_0x4d2e('0xc')][_0x4d2e('0xd')]()===_0x4d2e('0xe')&&!_0x1de21d[_0x4d2e('0xf')]&&!_[_0x4d2e('0x10')](_0x1de21d[_0x4d2e('0x11')])){_0x2be369['ChatInteraction']['findOne']({'where':{'id':_0x1de21d[_0x4d2e('0x12')]}})[_0x4d2e('0x13')](function(_0x32082){if(_0x32082){_0x32082[_0x4d2e('0x14')]({'lastMsgAt':_0x1de21d['createdAt'],'lastMsgDirection':_0x1de21d['direction']['toLowerCase']()});}})[_0x4d2e('0x15')](function(_0x2a499d){console['error'](_0x2a499d);});}_0x444b20();}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x96a4=['utf8mb4','utf8mb4_unicode_ci','util','api','moment','path','rimraf','./chatMessage.attributes','exports','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','models','get','toLowerCase','direction','out','secret','isNil','UserId','ChatInteraction','ChatInteractionId','then','update','createdAt','catch','error'];(function(_0x57d875,_0x2abfe1){var _0x1e90ab=function(_0xc7c80){while(--_0xc7c80){_0x57d875['push'](_0x57d875['shift']());}};_0x1e90ab(++_0x2abfe1);}(_0x96a4,0x124));var _0x496a=function(_0x24da57,_0x3771d7){_0x24da57=_0x24da57-0x0;var _0x370d75=_0x96a4[_0x24da57];return _0x370d75;};'use strict';var _=require('lodash');var util=require(_0x496a('0x0'));var logger=require('../../config/logger')(_0x496a('0x1'));var moment=require(_0x496a('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x496a('0x3'));var rimraf=require(_0x496a('0x4'));var config=require('../../config/environment');var attributes=require(_0x496a('0x5'));module[_0x496a('0x6')]=function(_0x709767,_0x457722){return _0x709767['define'](_0x496a('0x7'),attributes,{'tableName':_0x496a('0x8'),'paranoid':![],'indexes':[{'name':_0x496a('0x9'),'fields':[_0x496a('0xa')],'type':_0x496a('0xb')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x10c25c,_0x4fc334,_0x2e5a18){var _0x3d5042=_0x709767[_0x496a('0xc')];var _0x554601=_0x10c25c[_0x496a('0xd')]({'plain':!![]});if(_0x554601['direction'][_0x496a('0xe')]()==='in'||_0x554601[_0x496a('0xf')][_0x496a('0xe')]()===_0x496a('0x10')&&!_0x554601[_0x496a('0x11')]&&!_[_0x496a('0x12')](_0x554601[_0x496a('0x13')])){_0x3d5042[_0x496a('0x14')]['findOne']({'where':{'id':_0x554601[_0x496a('0x15')]}})[_0x496a('0x16')](function(_0x5e2b67){if(_0x5e2b67){_0x5e2b67[_0x496a('0x17')]({'lastMsgAt':_0x554601[_0x496a('0x18')],'lastMsgDirection':_0x554601[_0x496a('0xf')]['toLowerCase']()});}})[_0x496a('0x19')](function(_0x3f207f){console[_0x496a('0x1a')](_0x3f207f);});}_0x2e5a18();}},'charset':_0x496a('0x1b'),'collate':_0x496a('0x1c')});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.rpc.js b/server/api/chatMessage/chatMessage.rpc.js
index f239650..b5c706a 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 _0x676d=['ChatMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','ChatMessage','create','body','options','raw','CreateChatMessage','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','defaults','redis','socket.io-emitter','./chatMessage.socket','register','request'];(function(_0x35885a,_0x42fed7){var _0xe86249=function(_0x98edb3){while(--_0x98edb3){_0x35885a['push'](_0x35885a['shift']());}};_0xe86249(++_0x42fed7);}(_0x676d,0x16f));var _0xd676=function(_0x57797a,_0x5d2da2){_0x57797a=_0x57797a-0x0;var _0x5b8d9a=_0x676d[_0x57797a];return _0x5b8d9a;};'use strict';var _=require(_0xd676('0x0'));var util=require(_0xd676('0x1'));var moment=require(_0xd676('0x2'));var BPromise=require(_0xd676('0x3'));var rs=require(_0xd676('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd676('0x5'))['db'];var utils=require(_0xd676('0x6'));var logger=require(_0xd676('0x7'))(_0xd676('0x8'));var config=require(_0xd676('0x9'));var jayson=require(_0xd676('0xa'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0xd676('0xb')](config[_0xd676('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0xd676('0xd'))(new Redis(config[_0xd676('0xc')]));require(_0xd676('0xe'))[_0xd676('0xf')](socket);function respondWithRpcPromise(_0x20605a,_0x5d0322,_0x3723cb){return new BPromise(function(_0x5e35c7,_0x5360c0){return client[_0xd676('0x10')](_0x20605a,_0x3723cb)['then'](function(_0x560b8b){logger['info'](_0xd676('0x11'),_0x5d0322,_0xd676('0x12'));logger[_0xd676('0x13')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x5d0322,'request\x20sent',JSON[_0xd676('0x14')](_0x560b8b));if(_0x560b8b['error']){if(_0x560b8b[_0xd676('0x15')][_0xd676('0x16')]===0x1f4){logger[_0xd676('0x15')](_0xd676('0x11'),_0x5d0322,_0x560b8b[_0xd676('0x15')][_0xd676('0x17')]);return _0x5360c0(_0x560b8b[_0xd676('0x15')]['message']);}logger['error'](_0xd676('0x11'),_0x5d0322,_0x560b8b[_0xd676('0x15')][_0xd676('0x17')]);return _0x5e35c7(_0x560b8b['error'][_0xd676('0x17')]);}else{logger['info']('ChatMessage,\x20%s,\x20%s',_0x5d0322,_0xd676('0x12'));_0x5e35c7(_0x560b8b[_0xd676('0x18')][_0xd676('0x17')]);}})[_0xd676('0x19')](function(_0x9a5ff4){logger[_0xd676('0x15')](_0xd676('0x11'),_0x5d0322,_0x9a5ff4);_0x5360c0(_0x9a5ff4);});});}exports['CreateChatMessage']=function(_0x5e71c0){var _0x5f4db5=this;return new Promise(function(_0x42ee60,_0x3846f9){return db[_0xd676('0x1a')][_0xd676('0x1b')](_0x5e71c0[_0xd676('0x1c')],{'raw':_0x5e71c0[_0xd676('0x1d')]?_0x5e71c0[_0xd676('0x1d')][_0xd676('0x1e')]===undefined?!![]:![]:!![]})['then'](function(_0x216259){logger['info'](_0xd676('0x1f'),_0x5e71c0);logger['debug'](_0xd676('0x1f'),_0x5e71c0,JSON[_0xd676('0x14')](_0x216259));_0x42ee60(_0x216259);})[_0xd676('0x19')](function(_0x1e24f1){logger['error']('CreateChatMessage',_0x1e24f1[_0xd676('0x17')],_0x5e71c0);_0x3846f9(_0x5f4db5['error'](0x1f4,_0x1e24f1[_0xd676('0x17')]));});});};
\ No newline at end of file
+var _0x4479=['defaults','localhost','socket.io-emitter','./chatMessage.socket','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','CreateChatMessage','create','body','options','raw','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','redis'];(function(_0x323b31,_0x589dae){var _0x13436f=function(_0x3bbffa){while(--_0x3bbffa){_0x323b31['push'](_0x323b31['shift']());}};_0x13436f(++_0x589dae);}(_0x4479,0x1cf));var _0x9447=function(_0x4d5c0f,_0x5ebb96){_0x4d5c0f=_0x4d5c0f-0x0;var _0x19a759=_0x4479[_0x4d5c0f];return _0x19a759;};'use strict';var _=require(_0x9447('0x0'));var util=require(_0x9447('0x1'));var moment=require(_0x9447('0x2'));var BPromise=require(_0x9447('0x3'));var rs=require(_0x9447('0x4'));var fs=require('fs');var Redis=require(_0x9447('0x5'));var db=require(_0x9447('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x9447('0x7'));var config=require(_0x9447('0x8'));var jayson=require(_0x9447('0x9'));var client=jayson[_0x9447('0xa')][_0x9447('0xb')]({'port':0x232a});config[_0x9447('0xc')]=_[_0x9447('0xd')](config[_0x9447('0xc')],{'host':_0x9447('0xe'),'port':0x18eb});var socket=require(_0x9447('0xf'))(new Redis(config['redis']));require(_0x9447('0x10'))['register'](socket);function respondWithRpcPromise(_0x48ac97,_0x302bce,_0xa83526){return new BPromise(function(_0x140446,_0x58a018){return client[_0x9447('0x11')](_0x48ac97,_0xa83526)[_0x9447('0x12')](function(_0x3103f3){logger[_0x9447('0x13')](_0x9447('0x14'),_0x302bce,'request\x20sent');logger['debug']('ChatMessage,\x20%s,\x20%s,\x20%s',_0x302bce,_0x9447('0x15'),JSON[_0x9447('0x16')](_0x3103f3));if(_0x3103f3['error']){if(_0x3103f3[_0x9447('0x17')][_0x9447('0x18')]===0x1f4){logger['error']('ChatMessage,\x20%s,\x20%s',_0x302bce,_0x3103f3[_0x9447('0x17')][_0x9447('0x19')]);return _0x58a018(_0x3103f3[_0x9447('0x17')][_0x9447('0x19')]);}logger[_0x9447('0x17')](_0x9447('0x14'),_0x302bce,_0x3103f3[_0x9447('0x17')][_0x9447('0x19')]);return _0x140446(_0x3103f3[_0x9447('0x17')][_0x9447('0x19')]);}else{logger[_0x9447('0x13')](_0x9447('0x14'),_0x302bce,_0x9447('0x15'));_0x140446(_0x3103f3[_0x9447('0x1a')]['message']);}})[_0x9447('0x1b')](function(_0x51821f){logger[_0x9447('0x17')](_0x9447('0x14'),_0x302bce,_0x51821f);_0x58a018(_0x51821f);});});}exports[_0x9447('0x1c')]=function(_0x57e17f){var _0x242fc3=this;return new Promise(function(_0x21b7a6,_0x1e9bc4){return db['ChatMessage'][_0x9447('0x1d')](_0x57e17f[_0x9447('0x1e')],{'raw':_0x57e17f[_0x9447('0x1f')]?_0x57e17f['options'][_0x9447('0x20')]===undefined?!![]:![]:!![]})[_0x9447('0x12')](function(_0x3c70da){logger['info'](_0x9447('0x1c'),_0x57e17f);logger[_0x9447('0x21')]('CreateChatMessage',_0x57e17f,JSON[_0x9447('0x16')](_0x3c70da));_0x21b7a6(_0x3c70da);})[_0x9447('0x1b')](function(_0x5293a7){logger[_0x9447('0x17')](_0x9447('0x1c'),_0x5293a7[_0x9447('0x19')],_0x57e17f);_0x1e9bc4(_0x242fc3[_0x9447('0x17')](0x1f4,_0x5293a7[_0x9447('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.socket.js b/server/api/chatMessage/chatMessage.socket.js
index 3a351ec..3fa5293 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 _0x5d58=['register'];(function(_0x1e067e,_0x157421){var _0x58c87e=function(_0x36906f){while(--_0x36906f){_0x1e067e['push'](_0x1e067e['shift']());}};_0x58c87e(++_0x157421);}(_0x5d58,0x187));var _0x85d5=function(_0x5d9871,_0x547390){_0x5d9871=_0x5d9871-0x0;var _0x15bbec=_0x5d58[_0x5d9871];return _0x15bbec;};'use strict';var ChatMessageEvents=require('./chatMessage.events');var events=['save','remove','update'];function createListener(_0x501631,_0x64d32c){return function(_0x1eff3b){_0x64d32c['emit'](_0x501631,_0x1eff3b);};}function removeListener(_0x1469fc,_0x30bfe8){return function(){ChatMessageEvents['removeListener'](_0x1469fc,_0x30bfe8);};}exports[_0x85d5('0x0')]=function(_0x2d457a){for(var _0x578fad=0x0,_0x46e7b4=events['length'];_0x578fad<_0x46e7b4;_0x578fad++){var _0x98c963=events[_0x578fad];var _0x3fecca=createListener('chatMessage:'+_0x98c963,_0x2d457a);ChatMessageEvents['on'](_0x98c963,_0x3fecca);}};
\ No newline at end of file
+var _0xfdbd=['removeListener','chatMessage:','./chatMessage.events','save','remove','update','emit'];(function(_0x34f337,_0x30dfed){var _0xe4f217=function(_0x5d79a2){while(--_0x5d79a2){_0x34f337['push'](_0x34f337['shift']());}};_0xe4f217(++_0x30dfed);}(_0xfdbd,0xf0));var _0xdfdb=function(_0x40ddc0,_0x41c082){_0x40ddc0=_0x40ddc0-0x0;var _0x1aebf1=_0xfdbd[_0x40ddc0];return _0x1aebf1;};'use strict';var ChatMessageEvents=require(_0xdfdb('0x0'));var events=[_0xdfdb('0x1'),_0xdfdb('0x2'),_0xdfdb('0x3')];function createListener(_0x28f05d,_0x3078f0){return function(_0x11218a){_0x3078f0[_0xdfdb('0x4')](_0x28f05d,_0x11218a);};}function removeListener(_0x330ad3,_0x5945e0){return function(){ChatMessageEvents[_0xdfdb('0x5')](_0x330ad3,_0x5945e0);};}exports['register']=function(_0x453ef6){for(var _0x41bd5e=0x0,_0x489f19=events['length'];_0x41bd5e<_0x489f19;_0x41bd5e++){var _0x590b5d=events[_0x41bd5e];var _0x188508=createListener(_0xdfdb('0x6')+_0x590b5d,_0x453ef6);ChatMessageEvents['on'](_0x590b5d,_0x188508);}};
\ No newline at end of file
diff --git a/server/api/chatMessage/index.js b/server/api/chatMessage/index.js
index 218387c..ce070eb 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 _0x9617=['../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','/describe','isAuthenticated','describe','/:id','show','post','tracked','chat','create','put','update','accept','/:id/reject','reject','destroy','exports','util','connect-timeout','express'];(function(_0x1af469,_0x584d95){var _0x336171=function(_0x574e25){while(--_0x574e25){_0x1af469['push'](_0x1af469['shift']());}};_0x336171(++_0x584d95);}(_0x9617,0x17d));var _0x7961=function(_0x1215ed,_0x476121){_0x1215ed=_0x1215ed-0x0;var _0x2ba36f=_0x9617[_0x1215ed];return _0x2ba36f;};'use strict';var multer=require('multer');var util=require(_0x7961('0x0'));var path=require('path');var timeout=require(_0x7961('0x1'));var express=require(_0x7961('0x2'));var router=express['Router']();var auth=require(_0x7961('0x3'));var interaction=require(_0x7961('0x4'));var config=require(_0x7961('0x5'));var controller=require('./chatMessage.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x7961('0x6')]);router[_0x7961('0x7')](_0x7961('0x8'),auth[_0x7961('0x9')](),controller[_0x7961('0xa')]);router[_0x7961('0x7')](_0x7961('0xb'),auth['isAuthenticated'](),controller[_0x7961('0xc')]);router[_0x7961('0xd')]('/',auth[_0x7961('0x9')](),interaction[_0x7961('0xe')](_0x7961('0xf'),'chatmessage:create'),controller[_0x7961('0x10')]);router[_0x7961('0x11')]('/:id',controller[_0x7961('0x12')]);router['put']('/:id/accept',auth['isAuthenticated'](),controller[_0x7961('0x13')]);router[_0x7961('0x11')](_0x7961('0x14'),auth[_0x7961('0x9')](),controller[_0x7961('0x15')]);router['delete']('/:id',auth[_0x7961('0x9')](),controller[_0x7961('0x16')]);module[_0x7961('0x17')]=router;
\ No newline at end of file
+var _0xcd49=['isAuthenticated','index','/describe','describe','/:id','show','post','tracked','chat','create','put','update','/:id/reject','delete','destroy','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatMessage.controller','get'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xcd49,0x13b));var _0x9cd4=function(_0x289e64,_0x5adb3c){_0x289e64=_0x289e64-0x0;var _0x30246c=_0xcd49[_0x289e64];return _0x30246c;};'use strict';var multer=require(_0x9cd4('0x0'));var util=require(_0x9cd4('0x1'));var path=require(_0x9cd4('0x2'));var timeout=require(_0x9cd4('0x3'));var express=require(_0x9cd4('0x4'));var router=express['Router']();var auth=require(_0x9cd4('0x5'));var interaction=require(_0x9cd4('0x6'));var config=require(_0x9cd4('0x7'));var controller=require(_0x9cd4('0x8'));router[_0x9cd4('0x9')]('/',auth[_0x9cd4('0xa')](),controller[_0x9cd4('0xb')]);router['get'](_0x9cd4('0xc'),auth['isAuthenticated'](),controller[_0x9cd4('0xd')]);router[_0x9cd4('0x9')](_0x9cd4('0xe'),auth[_0x9cd4('0xa')](),controller[_0x9cd4('0xf')]);router[_0x9cd4('0x10')]('/',auth['isAuthenticated'](),interaction[_0x9cd4('0x11')](_0x9cd4('0x12'),'chatmessage:create'),controller[_0x9cd4('0x13')]);router[_0x9cd4('0x14')](_0x9cd4('0xe'),controller[_0x9cd4('0x15')]);router['put']('/:id/accept',auth['isAuthenticated'](),controller['accept']);router['put'](_0x9cd4('0x16'),auth['isAuthenticated'](),controller['reject']);router[_0x9cd4('0x17')](_0x9cd4('0xe'),auth['isAuthenticated'](),controller[_0x9cd4('0x18')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
index d7015bb..e24dc37 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 _0x0632=['exports','TEXT','medium','sequelize'];(function(_0x368dc0,_0x26faed){var _0x46c32b=function(_0x38edc3){while(--_0x38edc3){_0x368dc0['push'](_0x368dc0['shift']());}};_0x46c32b(++_0x26faed);}(_0x0632,0x1cf));var _0x2063=function(_0x595013,_0x65a215){_0x595013=_0x595013-0x0;var _0x2a29e3=_0x0632[_0x595013];return _0x2a29e3;};'use strict';var Sequelize=require(_0x2063('0x0'));module[_0x2063('0x1')]={'body':{'type':Sequelize[_0x2063('0x2')](_0x2063('0x3')),'allowNull':![]}};
\ No newline at end of file
+var _0x2955=['sequelize','exports','TEXT'];(function(_0x21a37e,_0x1a90bd){var _0xcdde64=function(_0x30d0e2){while(--_0x30d0e2){_0x21a37e['push'](_0x21a37e['shift']());}};_0xcdde64(++_0x1a90bd);}(_0x2955,0x114));var _0x5295=function(_0x38ab85,_0x264a0e){_0x38ab85=_0x38ab85-0x0;var _0x2c67ab=_0x2955[_0x38ab85];return _0x2c67ab;};'use strict';var Sequelize=require(_0x5295('0x0'));module[_0x5295('0x1')]={'body':{'type':Sequelize[_0x5295('0x2')]('medium'),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
index c4b7854..94c2c6c 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 _0x8f31=['merge','VIRTUAL','options','includeAll','include','catch','show','params','find','create','body','describe','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','map','ChatOfflineMessage','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter'];(function(_0x3d23f0,_0x231116){var _0x3cb1d7=function(_0x775e16){while(--_0x775e16){_0x3d23f0['push'](_0x3d23f0['shift']());}};_0x3cb1d7(++_0x231116);}(_0x8f31,0x130));var _0x18f3=function(_0x1e9d62,_0x25bb8e){_0x1e9d62=_0x1e9d62-0x0;var _0x56c490=_0x8f31[_0x1e9d62];return _0x56c490;};'use strict';var pdf=require(_0x18f3('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x18f3('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x18f3('0x2'));var rp=require(_0x18f3('0x3'));var moment=require(_0x18f3('0x4'));var BPromise=require(_0x18f3('0x5'));var Mustache=require('mustache');var util=require(_0x18f3('0x6'));var path=require(_0x18f3('0x7'));var sox=require(_0x18f3('0x8'));var csv=require(_0x18f3('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x18f3('0xa'));var crypto=require(_0x18f3('0xb'));var jsforce=require(_0x18f3('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x18f3('0x9'));var querystring=require(_0x18f3('0xd'));var Papa=require(_0x18f3('0xe'));var Redis=require(_0x18f3('0xf'));var authService=require(_0x18f3('0x10'));var qs=require(_0x18f3('0x11'));var as=require(_0x18f3('0x12'));var hardwareService=require(_0x18f3('0x13'));var logger=require('../../config/logger')(_0x18f3('0x14'));var utils=require(_0x18f3('0x15'));var config=require(_0x18f3('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x490665,_0x4bad62){_0x4bad62=_0x4bad62||0xcc;return function(_0x294941){if(_0x294941){return _0x490665[_0x18f3('0x17')](_0x4bad62);}return _0x490665[_0x18f3('0x18')](_0x4bad62)[_0x18f3('0x19')]();};}function respondWithResult(_0x662db9,_0x4d17e1){_0x4d17e1=_0x4d17e1||0xc8;return function(_0xbf87d0){if(_0xbf87d0){return _0x662db9[_0x18f3('0x18')](_0x4d17e1)[_0x18f3('0x1a')](_0xbf87d0);}};}function respondWithFilteredResult(_0x10fcef,_0x35f1da){return function(_0x312498){if(_0x312498){var _0x12e653=_0x312498[_0x18f3('0x1b')],_0x5c409e=_0x35f1da[_0x18f3('0x1c')],_0xce806b=_0x35f1da[_0x18f3('0x1c')]+_0x35f1da[_0x18f3('0x1d')],_0x1103be;if(_0xce806b>=_0x12e653){_0xce806b=_0x12e653;_0x1103be=0xc8;}else{_0x1103be=0xce;}_0x10fcef[_0x18f3('0x18')](_0x1103be);return _0x10fcef['set'](_0x18f3('0x1e'),_0x5c409e+'-'+_0xce806b+'/'+_0x12e653)[_0x18f3('0x1a')](_0x312498);}return null;};}function patchUpdates(_0x480075){return function(_0x4f2e03){try{jsonpatch['apply'](_0x4f2e03,_0x480075,!![]);}catch(_0x412037){return BPromise[_0x18f3('0x1f')](_0x412037);}return _0x4f2e03[_0x18f3('0x20')]();};}function saveUpdates(_0x59d351,_0x31e49c){return function(_0x4a6a85){if(_0x4a6a85){return _0x4a6a85[_0x18f3('0x21')](_0x59d351)[_0x18f3('0x22')](function(_0x65243b){return _0x65243b;});}return null;};}function removeEntity(_0x14e285,_0x54bc7c){return function(_0x5e6de2){if(_0x5e6de2){return _0x5e6de2[_0x18f3('0x23')]()[_0x18f3('0x22')](function(){_0x14e285[_0x18f3('0x18')](0xcc)[_0x18f3('0x19')]();});}};}function handleEntityNotFound(_0x2d1b76,_0x552e2a){return function(_0xc1369c){if(!_0xc1369c){_0x2d1b76[_0x18f3('0x17')](0x194);}return _0xc1369c;};}function handleError(_0xed5604,_0x13d13b){_0x13d13b=_0x13d13b||0x1f4;return function(_0x32cc23){logger[_0x18f3('0x24')](_0x32cc23[_0x18f3('0x25')]);if(_0x32cc23[_0x18f3('0x26')]){delete _0x32cc23[_0x18f3('0x26')];}_0xed5604[_0x18f3('0x18')](_0x13d13b)[_0x18f3('0x27')](_0x32cc23);};}exports[_0x18f3('0x28')]=function(_0x525760,_0x4f461a){var _0x4a5073={},_0x1755ce={},_0x45b473={'count':0x0,'rows':[]};var _0x3333f4=_[_0x18f3('0x29')](db[_0x18f3('0x2a')][_0x18f3('0x2b')],function(_0x47b01f){return{'name':_0x47b01f[_0x18f3('0x2c')],'type':_0x47b01f['type'][_0x18f3('0x2d')]};});_0x1755ce[_0x18f3('0x2e')]=_[_0x18f3('0x29')](_0x3333f4,_0x18f3('0x26'));_0x1755ce[_0x18f3('0x2f')]=_[_0x18f3('0x30')](_0x525760[_0x18f3('0x2f')]);_0x1755ce[_0x18f3('0x31')]=_[_0x18f3('0x32')](_0x1755ce['model'],_0x1755ce[_0x18f3('0x2f')]);_0x4a5073[_0x18f3('0x33')]=_[_0x18f3('0x32')](_0x1755ce[_0x18f3('0x2e')],qs[_0x18f3('0x34')](_0x525760['query'][_0x18f3('0x34')]));_0x4a5073[_0x18f3('0x33')]=_0x4a5073[_0x18f3('0x33')][_0x18f3('0x35')]?_0x4a5073['attributes']:_0x1755ce['model'];if(!_0x525760[_0x18f3('0x2f')][_0x18f3('0x36')](_0x18f3('0x37'))){_0x4a5073['limit']=qs[_0x18f3('0x1d')](_0x525760['query'][_0x18f3('0x1d')]);_0x4a5073['offset']=qs[_0x18f3('0x1c')](_0x525760[_0x18f3('0x2f')][_0x18f3('0x1c')]);}_0x4a5073[_0x18f3('0x38')]=qs[_0x18f3('0x39')](_0x525760['query'][_0x18f3('0x39')]);_0x4a5073[_0x18f3('0x3a')]=qs[_0x18f3('0x31')](_[_0x18f3('0x3b')](_0x525760[_0x18f3('0x2f')],_0x1755ce['filters']));if(_0x525760[_0x18f3('0x2f')][_0x18f3('0x3c')]){_0x4a5073[_0x18f3('0x3a')]=_[_0x18f3('0x3d')](_0x4a5073[_0x18f3('0x3a')],{'$or':_[_0x18f3('0x29')](_0x3333f4,function(_0x20645d){if(_0x20645d['type']!==_0x18f3('0x3e')){var _0x5dc2a8={};_0x5dc2a8[_0x20645d['name']]={'$like':'%'+_0x525760[_0x18f3('0x2f')][_0x18f3('0x3c')]+'%'};return _0x5dc2a8;}})});}_0x4a5073=_[_0x18f3('0x3d')]({},_0x4a5073,_0x525760[_0x18f3('0x3f')]);var _0xb5770a={'where':_0x4a5073[_0x18f3('0x3a')]};return db['ChatOfflineMessage']['count'](_0xb5770a)['then'](function(_0x544c8e){_0x45b473[_0x18f3('0x1b')]=_0x544c8e;if(_0x525760[_0x18f3('0x2f')][_0x18f3('0x40')]){_0x4a5073[_0x18f3('0x41')]=[{'all':!![]}];}return db[_0x18f3('0x2a')]['findAll'](_0x4a5073);})[_0x18f3('0x22')](function(_0x30cffd){_0x45b473['rows']=_0x30cffd;return _0x45b473;})['then'](respondWithFilteredResult(_0x4f461a,_0x4a5073))[_0x18f3('0x42')](handleError(_0x4f461a,null));};exports[_0x18f3('0x43')]=function(_0x5d9e3e,_0x3524cd){var _0xe393d8={'raw':!![],'where':{'id':_0x5d9e3e[_0x18f3('0x44')]['id']}},_0x4fee7b={};_0x4fee7b['model']=_[_0x18f3('0x30')](db[_0x18f3('0x2a')][_0x18f3('0x2b')]);_0x4fee7b[_0x18f3('0x2f')]=_[_0x18f3('0x30')](_0x5d9e3e[_0x18f3('0x2f')]);_0x4fee7b[_0x18f3('0x31')]=_[_0x18f3('0x32')](_0x4fee7b[_0x18f3('0x2e')],_0x4fee7b['query']);_0xe393d8[_0x18f3('0x33')]=_[_0x18f3('0x32')](_0x4fee7b[_0x18f3('0x2e')],qs[_0x18f3('0x34')](_0x5d9e3e['query'][_0x18f3('0x34')]));_0xe393d8[_0x18f3('0x33')]=_0xe393d8[_0x18f3('0x33')][_0x18f3('0x35')]?_0xe393d8[_0x18f3('0x33')]:_0x4fee7b[_0x18f3('0x2e')];if(_0x5d9e3e[_0x18f3('0x2f')][_0x18f3('0x40')]){_0xe393d8[_0x18f3('0x41')]=[{'all':!![]}];}_0xe393d8=_['merge']({},_0xe393d8,_0x5d9e3e[_0x18f3('0x3f')]);return db['ChatOfflineMessage'][_0x18f3('0x45')](_0xe393d8)[_0x18f3('0x22')](handleEntityNotFound(_0x3524cd,null))[_0x18f3('0x22')](respondWithResult(_0x3524cd,null))['catch'](handleError(_0x3524cd,null));};exports[_0x18f3('0x46')]=function(_0x4ceba4,_0x317f98){return db['ChatOfflineMessage'][_0x18f3('0x46')](_0x4ceba4['body'],{})[_0x18f3('0x22')](respondWithResult(_0x317f98,0xc9))[_0x18f3('0x42')](handleError(_0x317f98,null));};exports[_0x18f3('0x21')]=function(_0x41ba98,_0x15e5a6){if(_0x41ba98[_0x18f3('0x47')]['id']){delete _0x41ba98[_0x18f3('0x47')]['id'];}return db[_0x18f3('0x2a')][_0x18f3('0x45')]({'where':{'id':_0x41ba98[_0x18f3('0x44')]['id']}})[_0x18f3('0x22')](handleEntityNotFound(_0x15e5a6,null))['then'](saveUpdates(_0x41ba98[_0x18f3('0x47')],null))[_0x18f3('0x22')](respondWithResult(_0x15e5a6,null))['catch'](handleError(_0x15e5a6,null));};exports[_0x18f3('0x23')]=function(_0x5e54f3,_0x501d8f){return db[_0x18f3('0x2a')][_0x18f3('0x45')]({'where':{'id':_0x5e54f3['params']['id']}})[_0x18f3('0x22')](handleEntityNotFound(_0x501d8f,null))['then'](removeEntity(_0x501d8f,null))['catch'](handleError(_0x501d8f,null));};exports['describe']=function(_0x3cc3fa,_0x51278e){return db['ChatOfflineMessage'][_0x18f3('0x48')]()['then'](respondWithResult(_0x51278e,null))[_0x18f3('0x42')](handleError(_0x51278e,null));};
\ No newline at end of file
+var _0xb894=['end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','index','rawAttributes','fieldName','type','key','map','name','query','keys','filters','intersection','model','attributes','fields','order','sort','where','pick','filter','merge','VIRTUAL','options','ChatOfflineMessage','include','findAll','catch','show','length','includeAll','create','body','params','find','describe','eml-format','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xb894,0x1e0));var _0x4b89=function(_0x177adb,_0xcb8bd4){_0x177adb=_0x177adb-0x0;var _0xb9e451=_0xb894[_0x177adb];return _0xb9e451;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x4b89('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4b89('0x1'));var jsonpatch=require(_0x4b89('0x2'));var rp=require('request-promise');var moment=require(_0x4b89('0x3'));var BPromise=require(_0x4b89('0x4'));var Mustache=require('mustache');var util=require(_0x4b89('0x5'));var path=require(_0x4b89('0x6'));var sox=require(_0x4b89('0x7'));var csv=require(_0x4b89('0x8'));var ejs=require(_0x4b89('0x9'));var fs=require('fs');var _=require(_0x4b89('0xa'));var squel=require('squel');var crypto=require(_0x4b89('0xb'));var jsforce=require(_0x4b89('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x4b89('0x8'));var querystring=require('querystring');var Papa=require(_0x4b89('0xd'));var Redis=require('ioredis');var authService=require(_0x4b89('0xe'));var qs=require(_0x4b89('0xf'));var as=require(_0x4b89('0x10'));var hardwareService=require(_0x4b89('0x11'));var logger=require(_0x4b89('0x12'))(_0x4b89('0x13'));var utils=require('../../config/utils');var config=require(_0x4b89('0x14'));var db=require(_0x4b89('0x15'))['db'];function respondWithStatusCode(_0x50d6f4,_0xe58f4f){_0xe58f4f=_0xe58f4f||0xcc;return function(_0x20ff95){if(_0x20ff95){return _0x50d6f4[_0x4b89('0x16')](_0xe58f4f);}return _0x50d6f4[_0x4b89('0x17')](_0xe58f4f)[_0x4b89('0x18')]();};}function respondWithResult(_0x1d0ba9,_0x691983){_0x691983=_0x691983||0xc8;return function(_0x3a9a7c){if(_0x3a9a7c){return _0x1d0ba9[_0x4b89('0x17')](_0x691983)[_0x4b89('0x19')](_0x3a9a7c);}};}function respondWithFilteredResult(_0x43d8dc,_0x5977d1){return function(_0x329980){if(_0x329980){var _0x518a3f=_0x329980[_0x4b89('0x1a')],_0x1b751d=_0x5977d1[_0x4b89('0x1b')],_0x37c57e=_0x5977d1[_0x4b89('0x1b')]+_0x5977d1[_0x4b89('0x1c')],_0x98e312;if(_0x37c57e>=_0x518a3f){_0x37c57e=_0x518a3f;_0x98e312=0xc8;}else{_0x98e312=0xce;}_0x43d8dc[_0x4b89('0x17')](_0x98e312);return _0x43d8dc[_0x4b89('0x1d')](_0x4b89('0x1e'),_0x1b751d+'-'+_0x37c57e+'/'+_0x518a3f)['json'](_0x329980);}return null;};}function patchUpdates(_0x4d04eb){return function(_0x15c5de){try{jsonpatch[_0x4b89('0x1f')](_0x15c5de,_0x4d04eb,!![]);}catch(_0x48eebe){return BPromise[_0x4b89('0x20')](_0x48eebe);}return _0x15c5de[_0x4b89('0x21')]();};}function saveUpdates(_0x3a3628,_0x32f781){return function(_0x3eef92){if(_0x3eef92){return _0x3eef92[_0x4b89('0x22')](_0x3a3628)[_0x4b89('0x23')](function(_0x32d43f){return _0x32d43f;});}return null;};}function removeEntity(_0x592bae,_0x45f2db){return function(_0x10508a){if(_0x10508a){return _0x10508a[_0x4b89('0x24')]()['then'](function(){_0x592bae[_0x4b89('0x17')](0xcc)[_0x4b89('0x18')]();});}};}function handleEntityNotFound(_0x1abee2,_0x590dba){return function(_0x496fd4){if(!_0x496fd4){_0x1abee2[_0x4b89('0x16')](0x194);}return _0x496fd4;};}function handleError(_0x997273,_0xe916eb){_0xe916eb=_0xe916eb||0x1f4;return function(_0x283dfe){logger[_0x4b89('0x25')](_0x283dfe['stack']);if(_0x283dfe['name']){delete _0x283dfe['name'];}_0x997273['status'](_0xe916eb)['send'](_0x283dfe);};}exports[_0x4b89('0x26')]=function(_0x115257,_0x26982d){var _0x565e3c={},_0x22b526={},_0x94096a={'count':0x0,'rows':[]};var _0x386d50=_['map'](db['ChatOfflineMessage'][_0x4b89('0x27')],function(_0x2fa53c){return{'name':_0x2fa53c[_0x4b89('0x28')],'type':_0x2fa53c[_0x4b89('0x29')][_0x4b89('0x2a')]};});_0x22b526['model']=_[_0x4b89('0x2b')](_0x386d50,_0x4b89('0x2c'));_0x22b526[_0x4b89('0x2d')]=_[_0x4b89('0x2e')](_0x115257[_0x4b89('0x2d')]);_0x22b526[_0x4b89('0x2f')]=_[_0x4b89('0x30')](_0x22b526[_0x4b89('0x31')],_0x22b526[_0x4b89('0x2d')]);_0x565e3c[_0x4b89('0x32')]=_[_0x4b89('0x30')](_0x22b526[_0x4b89('0x31')],qs['fields'](_0x115257['query'][_0x4b89('0x33')]));_0x565e3c[_0x4b89('0x32')]=_0x565e3c[_0x4b89('0x32')]['length']?_0x565e3c[_0x4b89('0x32')]:_0x22b526['model'];if(!_0x115257[_0x4b89('0x2d')]['hasOwnProperty']('nolimit')){_0x565e3c[_0x4b89('0x1c')]=qs[_0x4b89('0x1c')](_0x115257[_0x4b89('0x2d')][_0x4b89('0x1c')]);_0x565e3c[_0x4b89('0x1b')]=qs[_0x4b89('0x1b')](_0x115257[_0x4b89('0x2d')][_0x4b89('0x1b')]);}_0x565e3c[_0x4b89('0x34')]=qs[_0x4b89('0x35')](_0x115257['query'][_0x4b89('0x35')]);_0x565e3c[_0x4b89('0x36')]=qs['filters'](_[_0x4b89('0x37')](_0x115257[_0x4b89('0x2d')],_0x22b526[_0x4b89('0x2f')]));if(_0x115257['query'][_0x4b89('0x38')]){_0x565e3c['where']=_[_0x4b89('0x39')](_0x565e3c[_0x4b89('0x36')],{'$or':_['map'](_0x386d50,function(_0x49747f){if(_0x49747f['type']!==_0x4b89('0x3a')){var _0x42f67b={};_0x42f67b[_0x49747f[_0x4b89('0x2c')]]={'$like':'%'+_0x115257[_0x4b89('0x2d')][_0x4b89('0x38')]+'%'};return _0x42f67b;}})});}_0x565e3c=_[_0x4b89('0x39')]({},_0x565e3c,_0x115257[_0x4b89('0x3b')]);var _0x3702eb={'where':_0x565e3c[_0x4b89('0x36')]};return db[_0x4b89('0x3c')][_0x4b89('0x1a')](_0x3702eb)[_0x4b89('0x23')](function(_0x1ccdd3){_0x94096a[_0x4b89('0x1a')]=_0x1ccdd3;if(_0x115257['query']['includeAll']){_0x565e3c[_0x4b89('0x3d')]=[{'all':!![]}];}return db[_0x4b89('0x3c')][_0x4b89('0x3e')](_0x565e3c);})[_0x4b89('0x23')](function(_0x111f27){_0x94096a['rows']=_0x111f27;return _0x94096a;})[_0x4b89('0x23')](respondWithFilteredResult(_0x26982d,_0x565e3c))[_0x4b89('0x3f')](handleError(_0x26982d,null));};exports[_0x4b89('0x40')]=function(_0xf8a3b5,_0x128416){var _0x3b6c7d={'raw':!![],'where':{'id':_0xf8a3b5['params']['id']}},_0x513093={};_0x513093[_0x4b89('0x31')]=_[_0x4b89('0x2e')](db[_0x4b89('0x3c')][_0x4b89('0x27')]);_0x513093['query']=_[_0x4b89('0x2e')](_0xf8a3b5[_0x4b89('0x2d')]);_0x513093[_0x4b89('0x2f')]=_['intersection'](_0x513093['model'],_0x513093[_0x4b89('0x2d')]);_0x3b6c7d[_0x4b89('0x32')]=_[_0x4b89('0x30')](_0x513093[_0x4b89('0x31')],qs['fields'](_0xf8a3b5['query'][_0x4b89('0x33')]));_0x3b6c7d[_0x4b89('0x32')]=_0x3b6c7d[_0x4b89('0x32')][_0x4b89('0x41')]?_0x3b6c7d['attributes']:_0x513093[_0x4b89('0x31')];if(_0xf8a3b5['query'][_0x4b89('0x42')]){_0x3b6c7d[_0x4b89('0x3d')]=[{'all':!![]}];}_0x3b6c7d=_[_0x4b89('0x39')]({},_0x3b6c7d,_0xf8a3b5[_0x4b89('0x3b')]);return db['ChatOfflineMessage']['find'](_0x3b6c7d)[_0x4b89('0x23')](handleEntityNotFound(_0x128416,null))[_0x4b89('0x23')](respondWithResult(_0x128416,null))[_0x4b89('0x3f')](handleError(_0x128416,null));};exports[_0x4b89('0x43')]=function(_0x62847b,_0x110310){return db[_0x4b89('0x3c')]['create'](_0x62847b['body'],{})[_0x4b89('0x23')](respondWithResult(_0x110310,0xc9))['catch'](handleError(_0x110310,null));};exports['update']=function(_0x19f489,_0x212f21){if(_0x19f489[_0x4b89('0x44')]['id']){delete _0x19f489[_0x4b89('0x44')]['id'];}return db[_0x4b89('0x3c')]['find']({'where':{'id':_0x19f489[_0x4b89('0x45')]['id']}})[_0x4b89('0x23')](handleEntityNotFound(_0x212f21,null))['then'](saveUpdates(_0x19f489['body'],null))['then'](respondWithResult(_0x212f21,null))[_0x4b89('0x3f')](handleError(_0x212f21,null));};exports[_0x4b89('0x24')]=function(_0xcaedfa,_0x5938d6){return db['ChatOfflineMessage'][_0x4b89('0x46')]({'where':{'id':_0xcaedfa[_0x4b89('0x45')]['id']}})[_0x4b89('0x23')](handleEntityNotFound(_0x5938d6,null))[_0x4b89('0x23')](removeEntity(_0x5938d6,null))[_0x4b89('0x3f')](handleError(_0x5938d6,null));};exports[_0x4b89('0x47')]=function(_0x1d649a,_0x59c299){return db[_0x4b89('0x3c')][_0x4b89('0x47')]()[_0x4b89('0x23')](respondWithResult(_0x59c299,null))[_0x4b89('0x3f')](handleError(_0x59c299,null));};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
index f12aea3..18c1fb8 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 _0x0c02=['util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatOfflineMessage.attributes','exports','utf8mb4_unicode_ci'];(function(_0x5499d9,_0x1abd4f){var _0x52054c=function(_0x2205bc){while(--_0x2205bc){_0x5499d9['push'](_0x5499d9['shift']());}};_0x52054c(++_0x1abd4f);}(_0x0c02,0x84));var _0x20c0=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0c02[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x20c0('0x0'));var logger=require(_0x20c0('0x1'))('api');var moment=require(_0x20c0('0x2'));var BPromise=require(_0x20c0('0x3'));var rp=require(_0x20c0('0x4'));var fs=require('fs');var path=require(_0x20c0('0x5'));var rimraf=require(_0x20c0('0x6'));var config=require(_0x20c0('0x7'));var attributes=require(_0x20c0('0x8'));module[_0x20c0('0x9')]=function(_0x13312d,_0xd25ee8){return _0x13312d['define']('ChatOfflineMessage',attributes,{'tableName':'chat_offline_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x20c0('0xa')});};
\ No newline at end of file
+var _0xe13a=['api','moment','request-promise','path','rimraf','../../config/environment','./chatOfflineMessage.attributes','exports','define','chat_offline_messages','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger'];(function(_0x1dc24d,_0x541fa4){var _0x5d7fb2=function(_0x7ccd26){while(--_0x7ccd26){_0x1dc24d['push'](_0x1dc24d['shift']());}};_0x5d7fb2(++_0x541fa4);}(_0xe13a,0x178));var _0xae13=function(_0x3bc5ef,_0x241e33){_0x3bc5ef=_0x3bc5ef-0x0;var _0x28c895=_0xe13a[_0x3bc5ef];return _0x28c895;};'use strict';var _=require('lodash');var util=require(_0xae13('0x0'));var logger=require(_0xae13('0x1'))(_0xae13('0x2'));var moment=require(_0xae13('0x3'));var BPromise=require('bluebird');var rp=require(_0xae13('0x4'));var fs=require('fs');var path=require(_0xae13('0x5'));var rimraf=require(_0xae13('0x6'));var config=require(_0xae13('0x7'));var attributes=require(_0xae13('0x8'));module[_0xae13('0x9')]=function(_0x412a07,_0x3379ed){return _0x412a07[_0xae13('0xa')]('ChatOfflineMessage',attributes,{'tableName':_0xae13('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xae13('0xc'),'collate':_0xae13('0xd')});};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
index caed31e..f9e4b61 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 _0xe05c=['request\x20sent','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatOfflineMessage,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x44a101,_0x3729bc){var _0x351900=function(_0x27008b){while(--_0x27008b){_0x44a101['push'](_0x44a101['shift']());}};_0x351900(++_0x3729bc);}(_0xe05c,0x159));var _0xce05=function(_0x234976,_0x5d2044){_0x234976=_0x234976-0x0;var _0x253b4b=_0xe05c[_0x234976];return _0x253b4b;};'use strict';var _=require(_0xce05('0x0'));var util=require(_0xce05('0x1'));var moment=require(_0xce05('0x2'));var BPromise=require('bluebird');var rs=require(_0xce05('0x3'));var fs=require('fs');var Redis=require(_0xce05('0x4'));var db=require(_0xce05('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xce05('0x6'))(_0xce05('0x7'));var config=require(_0xce05('0x8'));var jayson=require(_0xce05('0x9'));var client=jayson[_0xce05('0xa')][_0xce05('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2c0077,_0x1b00de,_0x274024){return new BPromise(function(_0x508f59,_0x3b5853){return client[_0xce05('0xc')](_0x2c0077,_0x274024)[_0xce05('0xd')](function(_0x5f5208){logger[_0xce05('0xe')]('ChatOfflineMessage,\x20%s,\x20%s',_0x1b00de,_0xce05('0xf'));logger['debug'](_0xce05('0x10'),_0x1b00de,_0xce05('0xf'),JSON[_0xce05('0x11')](_0x5f5208));if(_0x5f5208[_0xce05('0x12')]){if(_0x5f5208[_0xce05('0x12')][_0xce05('0x13')]===0x1f4){logger['error'](_0xce05('0x14'),_0x1b00de,_0x5f5208[_0xce05('0x12')]['message']);return _0x3b5853(_0x5f5208[_0xce05('0x12')]['message']);}logger['error'](_0xce05('0x14'),_0x1b00de,_0x5f5208[_0xce05('0x12')][_0xce05('0x15')]);return _0x508f59(_0x5f5208['error'][_0xce05('0x15')]);}else{logger['info'](_0xce05('0x14'),_0x1b00de,'request\x20sent');_0x508f59(_0x5f5208[_0xce05('0x16')][_0xce05('0x15')]);}})[_0xce05('0x17')](function(_0x9cb175){logger[_0xce05('0x12')](_0xce05('0x14'),_0x1b00de,_0x9cb175);_0x3b5853(_0x9cb175);});});}
\ No newline at end of file
+var _0xc42f=['ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','randomstring'];(function(_0x246e1a,_0x30ee98){var _0x19a13c=function(_0x3c4cd8){while(--_0x3c4cd8){_0x246e1a['push'](_0x246e1a['shift']());}};_0x19a13c(++_0x30ee98);}(_0xc42f,0xe5));var _0xfc42=function(_0x3ae8ab,_0x2b1751){_0x3ae8ab=_0x3ae8ab-0x0;var _0x438d75=_0xc42f[_0x3ae8ab];return _0x438d75;};'use strict';var _=require(_0xfc42('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xfc42('0x1'));var fs=require('fs');var Redis=require(_0xfc42('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xfc42('0x3'));var logger=require(_0xfc42('0x4'))(_0xfc42('0x5'));var config=require(_0xfc42('0x6'));var jayson=require(_0xfc42('0x7'));var client=jayson[_0xfc42('0x8')][_0xfc42('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1e1479,_0x37d174,_0x53e629){return new BPromise(function(_0x27f1fb,_0xc07b62){return client['request'](_0x1e1479,_0x53e629)[_0xfc42('0xa')](function(_0xee9ea7){logger[_0xfc42('0xb')](_0xfc42('0xc'),_0x37d174,_0xfc42('0xd'));logger['debug'](_0xfc42('0xe'),_0x37d174,_0xfc42('0xd'),JSON[_0xfc42('0xf')](_0xee9ea7));if(_0xee9ea7[_0xfc42('0x10')]){if(_0xee9ea7['error'][_0xfc42('0x11')]===0x1f4){logger[_0xfc42('0x10')](_0xfc42('0xc'),_0x37d174,_0xee9ea7[_0xfc42('0x10')][_0xfc42('0x12')]);return _0xc07b62(_0xee9ea7[_0xfc42('0x10')][_0xfc42('0x12')]);}logger[_0xfc42('0x10')](_0xfc42('0xc'),_0x37d174,_0xee9ea7[_0xfc42('0x10')][_0xfc42('0x12')]);return _0x27f1fb(_0xee9ea7[_0xfc42('0x10')][_0xfc42('0x12')]);}else{logger[_0xfc42('0xb')]('ChatOfflineMessage,\x20%s,\x20%s',_0x37d174,_0xfc42('0xd'));_0x27f1fb(_0xee9ea7[_0xfc42('0x13')]['message']);}})[_0xfc42('0x14')](function(_0xcc24ba){logger[_0xfc42('0x10')]('ChatOfflineMessage,\x20%s,\x20%s',_0x37d174,_0xcc24ba);_0xc07b62(_0xcc24ba);});});}
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js
index 8f0db3e..82f0e01 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 _0x8903=['multer','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','create','put','update','delete','exports'];(function(_0x5bbfa7,_0x118a4a){var _0x671f7=function(_0x39d481){while(--_0x39d481){_0x5bbfa7['push'](_0x5bbfa7['shift']());}};_0x671f7(++_0x118a4a);}(_0x8903,0x143));var _0x3890=function(_0x1d60d0,_0x2cfa88){_0x1d60d0=_0x1d60d0-0x0;var _0x1a0917=_0x8903[_0x1d60d0];return _0x1a0917;};'use strict';var multer=require(_0x3890('0x0'));var util=require(_0x3890('0x1'));var path=require('path');var timeout=require(_0x3890('0x2'));var express=require('express');var router=express[_0x3890('0x3')]();var auth=require(_0x3890('0x4'));var interaction=require(_0x3890('0x5'));var config=require(_0x3890('0x6'));var controller=require('./chatOfflineMessage.controller');router[_0x3890('0x7')]('/',auth[_0x3890('0x8')](),controller['index']);router['get'](_0x3890('0x9'),auth[_0x3890('0x8')](),controller[_0x3890('0xa')]);router['get'](_0x3890('0xb'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x3890('0x8')](),controller[_0x3890('0xc')]);router[_0x3890('0xd')](_0x3890('0xb'),auth[_0x3890('0x8')](),controller[_0x3890('0xe')]);router[_0x3890('0xf')](_0x3890('0xb'),auth[_0x3890('0x8')](),controller['destroy']);module[_0x3890('0x10')]=router;
\ No newline at end of file
+var _0xc678=['post','put','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','isAuthenticated','get','/describe','describe','/:id','show'];(function(_0x4b2c44,_0xaa92fc){var _0x488474=function(_0x37eabe){while(--_0x37eabe){_0x4b2c44['push'](_0x4b2c44['shift']());}};_0x488474(++_0xaa92fc);}(_0xc678,0xa4));var _0x8c67=function(_0x45aa90,_0x208685){_0x45aa90=_0x45aa90-0x0;var _0x2f0b2e=_0xc678[_0x45aa90];return _0x2f0b2e;};'use strict';var multer=require(_0x8c67('0x0'));var util=require(_0x8c67('0x1'));var path=require(_0x8c67('0x2'));var timeout=require(_0x8c67('0x3'));var express=require(_0x8c67('0x4'));var router=express[_0x8c67('0x5')]();var auth=require(_0x8c67('0x6'));var interaction=require(_0x8c67('0x7'));var config=require(_0x8c67('0x8'));var controller=require(_0x8c67('0x9'));router['get']('/',auth[_0x8c67('0xa')](),controller['index']);router[_0x8c67('0xb')](_0x8c67('0xc'),auth[_0x8c67('0xa')](),controller[_0x8c67('0xd')]);router['get'](_0x8c67('0xe'),auth[_0x8c67('0xa')](),controller[_0x8c67('0xf')]);router[_0x8c67('0x10')]('/',auth['isAuthenticated'](),controller['create']);router[_0x8c67('0x11')](_0x8c67('0xe'),auth['isAuthenticated'](),controller['update']);router[_0x8c67('0x12')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0x8c67('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
index f188887..fb221e8 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 _0x4f1b=['timeout','INTEGER','sequelize','exports','mouseOver'];(function(_0x8ea35a,_0x19dfc4){var _0x233576=function(_0x2bae24){while(--_0x2bae24){_0x8ea35a['push'](_0x8ea35a['shift']());}};_0x233576(++_0x19dfc4);}(_0x4f1b,0xbb));var _0xb4f1=function(_0x4456be,_0x4f4185){_0x4456be=_0x4456be-0x0;var _0x2e45f3=_0x4f1b[_0x4456be];return _0x2e45f3;};'use strict';var Sequelize=require(_0xb4f1('0x0'));module[_0xb4f1('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xb4f1('0x2'),_0xb4f1('0x3')),'defaultValue':_0xb4f1('0x2')},'selector':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize[_0xb4f1('0x4')]}};
\ No newline at end of file
+var _0xa7a4=['exports','mouseOver','timeout','STRING','INTEGER','sequelize'];(function(_0x436faa,_0x30eca2){var _0xfe3d39=function(_0xe6a90e){while(--_0xe6a90e){_0x436faa['push'](_0x436faa['shift']());}};_0xfe3d39(++_0x30eca2);}(_0xa7a4,0x1c1));var _0x4a7a=function(_0x324012,_0x23f45f){_0x324012=_0x324012-0x0;var _0x435cf2=_0xa7a4[_0x324012];return _0x435cf2;};'use strict';var Sequelize=require(_0x4a7a('0x0'));module[_0x4a7a('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x4a7a('0x2'),_0x4a7a('0x3')),'defaultValue':_0x4a7a('0x2')},'selector':{'type':Sequelize[_0x4a7a('0x4')]},'timeout':{'type':Sequelize[_0x4a7a('0x5')]}};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js
index 273c914..a5bc683 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 _0xa9e0=['keys','ChatProactiveAction','rawAttributes','query','filters','attributes','intersection','fields','length','include','options','find','create','body','catch','params','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','../../components/parsers/advancedSearch','../../config/license/hardware','../../mysqldb','sendStatus','status','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','end','error','name','send','show','model'];(function(_0x44216d,_0x4938a7){var _0xeca523=function(_0x11faf1){while(--_0x11faf1){_0x44216d['push'](_0x44216d['shift']());}};_0xeca523(++_0x4938a7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xa9e0[_0x2f5ac5];return _0x37c9a8;};'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 as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x0a9e('0x13'))['db'];function respondWithStatusCode(_0x36471c,_0xd5b662){_0xd5b662=_0xd5b662||0xcc;return function(_0x26d672){if(_0x26d672){return _0x36471c[_0x0a9e('0x14')](_0xd5b662);}return _0x36471c[_0x0a9e('0x15')](_0xd5b662)['end']();};}function respondWithResult(_0x4283ce,_0x239b12){_0x239b12=_0x239b12||0xc8;return function(_0x2b4227){if(_0x2b4227){return _0x4283ce[_0x0a9e('0x15')](_0x239b12)[_0x0a9e('0x16')](_0x2b4227);}};}function respondWithFilteredResult(_0x4d5611,_0x52a03d){return function(_0x22dccb){if(_0x22dccb){var _0x5d0880=_0x22dccb[_0x0a9e('0x17')],_0x1985b6=_0x52a03d['offset'],_0x519dfd=_0x52a03d[_0x0a9e('0x18')]+_0x52a03d['limit'],_0x16033c;if(_0x519dfd>=_0x5d0880){_0x519dfd=_0x5d0880;_0x16033c=0xc8;}else{_0x16033c=0xce;}_0x4d5611[_0x0a9e('0x15')](_0x16033c);return _0x4d5611[_0x0a9e('0x19')](_0x0a9e('0x1a'),_0x1985b6+'-'+_0x519dfd+'/'+_0x5d0880)[_0x0a9e('0x16')](_0x22dccb);}return null;};}function patchUpdates(_0x31b1ca){return function(_0x2eb11f){try{jsonpatch[_0x0a9e('0x1b')](_0x2eb11f,_0x31b1ca,!![]);}catch(_0x20559e){return BPromise[_0x0a9e('0x1c')](_0x20559e);}return _0x2eb11f[_0x0a9e('0x1d')]();};}function saveUpdates(_0x1c696a,_0x105080){return function(_0x4bb1e3){if(_0x4bb1e3){return _0x4bb1e3[_0x0a9e('0x1e')](_0x1c696a)[_0x0a9e('0x1f')](function(_0x53682f){return _0x53682f;});}return null;};}function removeEntity(_0x20f109,_0x5a09ef){return function(_0x588269){if(_0x588269){return _0x588269[_0x0a9e('0x20')]()[_0x0a9e('0x1f')](function(){_0x20f109[_0x0a9e('0x15')](0xcc)[_0x0a9e('0x21')]();});}};}function handleEntityNotFound(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(!_0x2fb0e4){_0x4abc77[_0x0a9e('0x14')](0x194);}return _0x2fb0e4;};}function handleError(_0x4d00e6,_0x370d86){_0x370d86=_0x370d86||0x1f4;return function(_0x42ac8f){logger[_0x0a9e('0x22')](_0x42ac8f['stack']);if(_0x42ac8f['name']){delete _0x42ac8f[_0x0a9e('0x23')];}_0x4d00e6[_0x0a9e('0x15')](_0x370d86)[_0x0a9e('0x24')](_0x42ac8f);};}exports[_0x0a9e('0x25')]=function(_0x526cf3,_0x384319){var _0x479bc4={'raw':!![],'where':{'id':_0x526cf3['params']['id']}},_0x45a1e7={};_0x45a1e7[_0x0a9e('0x26')]=_[_0x0a9e('0x27')](db[_0x0a9e('0x28')][_0x0a9e('0x29')]);_0x45a1e7[_0x0a9e('0x2a')]=_[_0x0a9e('0x27')](_0x526cf3[_0x0a9e('0x2a')]);_0x45a1e7[_0x0a9e('0x2b')]=_['intersection'](_0x45a1e7[_0x0a9e('0x26')],_0x45a1e7[_0x0a9e('0x2a')]);_0x479bc4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x45a1e7['model'],qs[_0x0a9e('0x2e')](_0x526cf3[_0x0a9e('0x2a')][_0x0a9e('0x2e')]));_0x479bc4[_0x0a9e('0x2c')]=_0x479bc4[_0x0a9e('0x2c')][_0x0a9e('0x2f')]?_0x479bc4[_0x0a9e('0x2c')]:_0x45a1e7[_0x0a9e('0x26')];if(_0x526cf3[_0x0a9e('0x2a')]['includeAll']){_0x479bc4[_0x0a9e('0x30')]=[{'all':!![]}];}_0x479bc4=_['merge']({},_0x479bc4,_0x526cf3[_0x0a9e('0x31')]);return db[_0x0a9e('0x28')][_0x0a9e('0x32')](_0x479bc4)[_0x0a9e('0x1f')](handleEntityNotFound(_0x384319,null))[_0x0a9e('0x1f')](respondWithResult(_0x384319,null))['catch'](handleError(_0x384319,null));};exports[_0x0a9e('0x33')]=function(_0x46f0a5,_0x40cb85){return db[_0x0a9e('0x28')][_0x0a9e('0x33')](_0x46f0a5[_0x0a9e('0x34')],{})[_0x0a9e('0x1f')](respondWithResult(_0x40cb85,0xc9))[_0x0a9e('0x35')](handleError(_0x40cb85,null));};exports['update']=function(_0x44295a,_0x5e7238){if(_0x44295a[_0x0a9e('0x34')]['id']){delete _0x44295a[_0x0a9e('0x34')]['id'];}return db[_0x0a9e('0x28')][_0x0a9e('0x32')]({'where':{'id':_0x44295a['params']['id']}})[_0x0a9e('0x1f')](handleEntityNotFound(_0x5e7238,null))[_0x0a9e('0x1f')](saveUpdates(_0x44295a[_0x0a9e('0x34')],null))[_0x0a9e('0x1f')](respondWithResult(_0x5e7238,null))['catch'](handleError(_0x5e7238,null));};exports['destroy']=function(_0x1e8694,_0x5640eb){return db[_0x0a9e('0x28')][_0x0a9e('0x32')]({'where':{'id':_0x1e8694[_0x0a9e('0x36')]['id']}})[_0x0a9e('0x1f')](handleEntityNotFound(_0x5640eb,null))['then'](removeEntity(_0x5640eb,null))[_0x0a9e('0x35')](handleError(_0x5640eb,null));};
\ No newline at end of file
+var _0x9c44=['lodash','squel','crypto','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../mysqldb','sendStatus','end','status','json','count','offset','limit','Content-Range','apply','reject','save','update','then','error','name','send','params','model','keys','rawAttributes','query','filters','intersection','attributes','length','includeAll','include','merge','options','catch','create','ChatProactiveAction','body','find','destroy','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','to-csv','ejs'];(function(_0x3d7364,_0x12cb1c){var _0x24361e=function(_0x471992){while(--_0x471992){_0x3d7364['push'](_0x3d7364['shift']());}};_0x24361e(++_0x12cb1c);}(_0x9c44,0x178));var _0x49c4=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0x9c44[_0x1969a7];return _0x3d665f;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x49c4('0x0'));var zipdir=require(_0x49c4('0x1'));var jsonpatch=require(_0x49c4('0x2'));var rp=require(_0x49c4('0x3'));var moment=require(_0x49c4('0x4'));var BPromise=require(_0x49c4('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x49c4('0x6'));var sox=require('sox');var csv=require(_0x49c4('0x7'));var ejs=require(_0x49c4('0x8'));var fs=require('fs');var _=require(_0x49c4('0x9'));var squel=require(_0x49c4('0xa'));var crypto=require(_0x49c4('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x49c4('0xc'));var toCsv=require(_0x49c4('0x7'));var querystring=require(_0x49c4('0xd'));var Papa=require(_0x49c4('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x49c4('0xf'));var as=require(_0x49c4('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x49c4('0x11'))(_0x49c4('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x49c4('0x13'))['db'];function respondWithStatusCode(_0x6d1b08,_0x5487cd){_0x5487cd=_0x5487cd||0xcc;return function(_0x7df3a9){if(_0x7df3a9){return _0x6d1b08[_0x49c4('0x14')](_0x5487cd);}return _0x6d1b08['status'](_0x5487cd)[_0x49c4('0x15')]();};}function respondWithResult(_0x280996,_0x21f15a){_0x21f15a=_0x21f15a||0xc8;return function(_0x2decee){if(_0x2decee){return _0x280996[_0x49c4('0x16')](_0x21f15a)[_0x49c4('0x17')](_0x2decee);}};}function respondWithFilteredResult(_0x75ea8,_0x3de397){return function(_0x58d177){if(_0x58d177){var _0x3acd06=_0x58d177[_0x49c4('0x18')],_0x141003=_0x3de397['offset'],_0x13a2db=_0x3de397[_0x49c4('0x19')]+_0x3de397[_0x49c4('0x1a')],_0x81e831;if(_0x13a2db>=_0x3acd06){_0x13a2db=_0x3acd06;_0x81e831=0xc8;}else{_0x81e831=0xce;}_0x75ea8['status'](_0x81e831);return _0x75ea8['set'](_0x49c4('0x1b'),_0x141003+'-'+_0x13a2db+'/'+_0x3acd06)[_0x49c4('0x17')](_0x58d177);}return null;};}function patchUpdates(_0x3addb2){return function(_0x59f29b){try{jsonpatch[_0x49c4('0x1c')](_0x59f29b,_0x3addb2,!![]);}catch(_0x50b151){return BPromise[_0x49c4('0x1d')](_0x50b151);}return _0x59f29b[_0x49c4('0x1e')]();};}function saveUpdates(_0xe31fcc,_0x291526){return function(_0x382040){if(_0x382040){return _0x382040[_0x49c4('0x1f')](_0xe31fcc)[_0x49c4('0x20')](function(_0x46e475){return _0x46e475;});}return null;};}function removeEntity(_0x2197d2,_0x578447){return function(_0x527126){if(_0x527126){return _0x527126['destroy']()[_0x49c4('0x20')](function(){_0x2197d2['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2263ae,_0x15581b){return function(_0x26c640){if(!_0x26c640){_0x2263ae[_0x49c4('0x14')](0x194);}return _0x26c640;};}function handleError(_0x4811c4,_0x5850f2){_0x5850f2=_0x5850f2||0x1f4;return function(_0x180276){logger[_0x49c4('0x21')](_0x180276['stack']);if(_0x180276[_0x49c4('0x22')]){delete _0x180276[_0x49c4('0x22')];}_0x4811c4[_0x49c4('0x16')](_0x5850f2)[_0x49c4('0x23')](_0x180276);};}exports['show']=function(_0x543ea2,_0x449960){var _0x53c199={'raw':!![],'where':{'id':_0x543ea2[_0x49c4('0x24')]['id']}},_0x3800b7={};_0x3800b7[_0x49c4('0x25')]=_[_0x49c4('0x26')](db['ChatProactiveAction'][_0x49c4('0x27')]);_0x3800b7[_0x49c4('0x28')]=_[_0x49c4('0x26')](_0x543ea2[_0x49c4('0x28')]);_0x3800b7[_0x49c4('0x29')]=_[_0x49c4('0x2a')](_0x3800b7[_0x49c4('0x25')],_0x3800b7[_0x49c4('0x28')]);_0x53c199[_0x49c4('0x2b')]=_[_0x49c4('0x2a')](_0x3800b7[_0x49c4('0x25')],qs['fields'](_0x543ea2['query']['fields']));_0x53c199[_0x49c4('0x2b')]=_0x53c199[_0x49c4('0x2b')][_0x49c4('0x2c')]?_0x53c199[_0x49c4('0x2b')]:_0x3800b7[_0x49c4('0x25')];if(_0x543ea2['query'][_0x49c4('0x2d')]){_0x53c199[_0x49c4('0x2e')]=[{'all':!![]}];}_0x53c199=_[_0x49c4('0x2f')]({},_0x53c199,_0x543ea2[_0x49c4('0x30')]);return db['ChatProactiveAction']['find'](_0x53c199)[_0x49c4('0x20')](handleEntityNotFound(_0x449960,null))[_0x49c4('0x20')](respondWithResult(_0x449960,null))[_0x49c4('0x31')](handleError(_0x449960,null));};exports[_0x49c4('0x32')]=function(_0xd38540,_0x4a0c7a){return db[_0x49c4('0x33')][_0x49c4('0x32')](_0xd38540[_0x49c4('0x34')],{})['then'](respondWithResult(_0x4a0c7a,0xc9))['catch'](handleError(_0x4a0c7a,null));};exports[_0x49c4('0x1f')]=function(_0x1991e9,_0x3bec0a){if(_0x1991e9[_0x49c4('0x34')]['id']){delete _0x1991e9[_0x49c4('0x34')]['id'];}return db[_0x49c4('0x33')][_0x49c4('0x35')]({'where':{'id':_0x1991e9[_0x49c4('0x24')]['id']}})[_0x49c4('0x20')](handleEntityNotFound(_0x3bec0a,null))['then'](saveUpdates(_0x1991e9[_0x49c4('0x34')],null))['then'](respondWithResult(_0x3bec0a,null))[_0x49c4('0x31')](handleError(_0x3bec0a,null));};exports[_0x49c4('0x36')]=function(_0x2625a6,_0x1c2830){return db['ChatProactiveAction'][_0x49c4('0x35')]({'where':{'id':_0x2625a6[_0x49c4('0x24')]['id']}})[_0x49c4('0x20')](handleEntityNotFound(_0x1c2830,null))['then'](removeEntity(_0x1c2830,null))[_0x49c4('0x31')](handleError(_0x1c2830,null));};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js
index 0069104..7897847 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 _0xd720=['./chatProactiveAction.attributes','exports','define','ChatProactiveAction','lodash','util','api','request-promise','path','rimraf','../../config/environment'];(function(_0x1acc2d,_0x597696){var _0xabfa6d=function(_0x41e83c){while(--_0x41e83c){_0x1acc2d['push'](_0x1acc2d['shift']());}};_0xabfa6d(++_0x597696);}(_0xd720,0xb4));var _0x0d72=function(_0x32ba0b,_0x5d41b5){_0x32ba0b=_0x32ba0b-0x0;var _0x53ab48=_0xd720[_0x32ba0b];return _0x53ab48;};'use strict';var _=require(_0x0d72('0x0'));var util=require(_0x0d72('0x1'));var logger=require('../../config/logger')(_0x0d72('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x0d72('0x3'));var fs=require('fs');var path=require(_0x0d72('0x4'));var rimraf=require(_0x0d72('0x5'));var config=require(_0x0d72('0x6'));var attributes=require(_0x0d72('0x7'));module[_0x0d72('0x8')]=function(_0x24b69c,_0x222a1c){return _0x24b69c[_0x0d72('0x9')](_0x0d72('0xa'),attributes,{'tableName':'chat_proactive_actions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb0b6=['ChatProactiveAction','chat_proactive_actions','lodash','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./chatProactiveAction.attributes','exports','define'];(function(_0x4ed411,_0x53f3f7){var _0x44e2de=function(_0x5e6487){while(--_0x5e6487){_0x4ed411['push'](_0x4ed411['shift']());}};_0x44e2de(++_0x53f3f7);}(_0xb0b6,0xec));var _0x6b0b=function(_0x3edae9,_0x4e7113){_0x3edae9=_0x3edae9-0x0;var _0x514387=_0xb0b6[_0x3edae9];return _0x514387;};'use strict';var _=require(_0x6b0b('0x0'));var util=require('util');var logger=require(_0x6b0b('0x1'))(_0x6b0b('0x2'));var moment=require(_0x6b0b('0x3'));var BPromise=require('bluebird');var rp=require(_0x6b0b('0x4'));var fs=require('fs');var path=require(_0x6b0b('0x5'));var rimraf=require(_0x6b0b('0x6'));var config=require(_0x6b0b('0x7'));var attributes=require(_0x6b0b('0x8'));module[_0x6b0b('0x9')]=function(_0x40c6bf,_0x1fc227){return _0x40c6bf[_0x6b0b('0xa')](_0x6b0b('0xb'),attributes,{'tableName':_0x6b0b('0xc'),'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 67fed55..3890e4f 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 _0x489e=['info','ChatProactiveAction,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','catch','lodash','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then'];(function(_0x541454,_0xded78c){var _0x4e5272=function(_0x3e58d5){while(--_0x3e58d5){_0x541454['push'](_0x541454['shift']());}};_0x4e5272(++_0xded78c);}(_0x489e,0x1c1));var _0xe489=function(_0x3a1bd2,_0x25ccca){_0x3a1bd2=_0x3a1bd2-0x0;var _0x201f79=_0x489e[_0x3a1bd2];return _0x201f79;};'use strict';var _=require(_0xe489('0x0'));var util=require(_0xe489('0x1'));var moment=require(_0xe489('0x2'));var BPromise=require('bluebird');var rs=require(_0xe489('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xe489('0x4'));var logger=require(_0xe489('0x5'))(_0xe489('0x6'));var config=require(_0xe489('0x7'));var jayson=require(_0xe489('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x54161e,_0x4569f9,_0x3e6c13){return new BPromise(function(_0xcaaf77,_0x5c482c){return client[_0xe489('0x9')](_0x54161e,_0x3e6c13)[_0xe489('0xa')](function(_0x4d567b){logger[_0xe489('0xb')](_0xe489('0xc'),_0x4569f9,'request\x20sent');logger[_0xe489('0xd')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x4569f9,_0xe489('0xe'),JSON[_0xe489('0xf')](_0x4d567b));if(_0x4d567b[_0xe489('0x10')]){if(_0x4d567b[_0xe489('0x10')][_0xe489('0x11')]===0x1f4){logger[_0xe489('0x10')]('ChatProactiveAction,\x20%s,\x20%s',_0x4569f9,_0x4d567b[_0xe489('0x10')][_0xe489('0x12')]);return _0x5c482c(_0x4d567b[_0xe489('0x10')][_0xe489('0x12')]);}logger['error'](_0xe489('0xc'),_0x4569f9,_0x4d567b[_0xe489('0x10')][_0xe489('0x12')]);return _0xcaaf77(_0x4d567b[_0xe489('0x10')][_0xe489('0x12')]);}else{logger[_0xe489('0xb')](_0xe489('0xc'),_0x4569f9,'request\x20sent');_0xcaaf77(_0x4d567b['result'][_0xe489('0x12')]);}})[_0xe489('0x13')](function(_0x392e5b){logger[_0xe489('0x10')]('ChatProactiveAction,\x20%s,\x20%s',_0x4569f9,_0x392e5b);_0x5c482c(_0x392e5b);});});}
\ No newline at end of file
+var _0xcac8=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','ChatProactiveAction,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x13eddd,_0x2bb439){var _0x3125b5=function(_0x5c2188){while(--_0x5c2188){_0x13eddd['push'](_0x13eddd['shift']());}};_0x3125b5(++_0x2bb439);}(_0xcac8,0xb9));var _0x8cac=function(_0x4199c8,_0x15690c){_0x4199c8=_0x4199c8-0x0;var _0x4c5905=_0xcac8[_0x4199c8];return _0x4c5905;};'use strict';var _=require(_0x8cac('0x0'));var util=require(_0x8cac('0x1'));var moment=require(_0x8cac('0x2'));var BPromise=require(_0x8cac('0x3'));var rs=require(_0x8cac('0x4'));var fs=require('fs');var Redis=require(_0x8cac('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8cac('0x6'));var logger=require(_0x8cac('0x7'))(_0x8cac('0x8'));var config=require(_0x8cac('0x9'));var jayson=require(_0x8cac('0xa'));var client=jayson[_0x8cac('0xb')][_0x8cac('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x6f8c8a,_0x5670c2,_0x3cb665){return new BPromise(function(_0x53c7b3,_0x3d5187){return client[_0x8cac('0xd')](_0x6f8c8a,_0x3cb665)[_0x8cac('0xe')](function(_0x53475e){logger['info']('ChatProactiveAction,\x20%s,\x20%s',_0x5670c2,_0x8cac('0xf'));logger[_0x8cac('0x10')](_0x8cac('0x11'),_0x5670c2,'request\x20sent',JSON[_0x8cac('0x12')](_0x53475e));if(_0x53475e[_0x8cac('0x13')]){if(_0x53475e[_0x8cac('0x13')]['code']===0x1f4){logger[_0x8cac('0x13')](_0x8cac('0x14'),_0x5670c2,_0x53475e['error'][_0x8cac('0x15')]);return _0x3d5187(_0x53475e[_0x8cac('0x13')][_0x8cac('0x15')]);}logger[_0x8cac('0x13')](_0x8cac('0x14'),_0x5670c2,_0x53475e[_0x8cac('0x13')][_0x8cac('0x15')]);return _0x53c7b3(_0x53475e[_0x8cac('0x13')][_0x8cac('0x15')]);}else{logger['info']('ChatProactiveAction,\x20%s,\x20%s',_0x5670c2,_0x8cac('0xf'));_0x53c7b3(_0x53475e[_0x8cac('0x16')]['message']);}})[_0x8cac('0x17')](function(_0x3ef2ee){logger[_0x8cac('0x13')](_0x8cac('0x14'),_0x5670c2,_0x3ef2ee);_0x3d5187(_0x3ef2ee);});});}
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js
index 132629e..5d1948b 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 _0xeb5d=['create','put','update','delete','destroy','exports','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','show','post'];(function(_0x3ab212,_0x1df8a6){var _0x1c1e05=function(_0xe88924){while(--_0xe88924){_0x3ab212['push'](_0x3ab212['shift']());}};_0x1c1e05(++_0x1df8a6);}(_0xeb5d,0x16b));var _0xdeb5=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xeb5d[_0x59ee6f];return _0x4c0979;};'use strict';var multer=require('multer');var util=require(_0xdeb5('0x0'));var path=require(_0xdeb5('0x1'));var timeout=require(_0xdeb5('0x2'));var express=require(_0xdeb5('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xdeb5('0x4'));var config=require(_0xdeb5('0x5'));var controller=require('./chatProactiveAction.controller');router[_0xdeb5('0x6')](_0xdeb5('0x7'),auth[_0xdeb5('0x8')](),controller[_0xdeb5('0x9')]);router[_0xdeb5('0xa')]('/',auth[_0xdeb5('0x8')](),controller[_0xdeb5('0xb')]);router[_0xdeb5('0xc')](_0xdeb5('0x7'),auth[_0xdeb5('0x8')](),controller[_0xdeb5('0xd')]);router[_0xdeb5('0xe')](_0xdeb5('0x7'),auth[_0xdeb5('0x8')](),controller[_0xdeb5('0xf')]);module[_0xdeb5('0x10')]=router;
\ No newline at end of file
+var _0x5827=['/:id','show','isAuthenticated','create','put','update','exports','multer','util','path','../../components/auth/service','../../components/interaction/service','get'];(function(_0x348f43,_0x41703b){var _0x3229a6=function(_0x447e14){while(--_0x447e14){_0x348f43['push'](_0x348f43['shift']());}};_0x3229a6(++_0x41703b);}(_0x5827,0xb0));var _0x7582=function(_0x248576,_0x122244){_0x248576=_0x248576-0x0;var _0x57f1da=_0x5827[_0x248576];return _0x57f1da;};'use strict';var multer=require(_0x7582('0x0'));var util=require(_0x7582('0x1'));var path=require(_0x7582('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require(_0x7582('0x3'));var interaction=require(_0x7582('0x4'));var config=require('../../config/environment');var controller=require('./chatProactiveAction.controller');router[_0x7582('0x5')](_0x7582('0x6'),auth['isAuthenticated'](),controller[_0x7582('0x7')]);router['post']('/',auth[_0x7582('0x8')](),controller[_0x7582('0x9')]);router[_0x7582('0xa')]('/:id',auth[_0x7582('0x8')](),controller[_0x7582('0xb')]);router['delete'](_0x7582('0x6'),auth[_0x7582('0x8')](),controller['destroy']);module[_0x7582('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js
index d5a8cd7..0fac7ba 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 _0x955d=['ENUM','rrmemory','beepall','roundrobin','sequelize','exports','STRING','name','INTEGER'];(function(_0x5e6655,_0x2eb701){var _0x397f66=function(_0x17672f){while(--_0x17672f){_0x5e6655['push'](_0x5e6655['shift']());}};_0x397f66(++_0x2eb701);}(_0x955d,0xb8));var _0xd955=function(_0x2fb7a6,_0x383d07){_0x2fb7a6=_0x2fb7a6-0x0;var _0x3f39c0=_0x955d[_0x2fb7a6];return _0x3f39c0;};'use strict';var Sequelize=require(_0xd955('0x0'));module[_0xd955('0x1')]={'name':{'type':Sequelize[_0xd955('0x2')],'unique':_0xd955('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xd955('0x2')]},'timeout':{'type':Sequelize[_0xd955('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xd955('0x5')](_0xd955('0x6'),_0xd955('0x7'),_0xd955('0x8'))}};
\ No newline at end of file
+var _0xf745=['name','ENUM','rrmemory','beepall','sequelize','STRING'];(function(_0x2a342e,_0x1c4a38){var _0x42e99d=function(_0x5af17c){while(--_0x5af17c){_0x2a342e['push'](_0x2a342e['shift']());}};_0x42e99d(++_0x1c4a38);}(_0xf745,0x94));var _0x5f74=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xf745[_0x3947c9];return _0x2e7871;};'use strict';var Sequelize=require(_0x5f74('0x0'));module['exports']={'name':{'type':Sequelize[_0x5f74('0x1')],'unique':_0x5f74('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x5f74('0x1')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x5f74('0x3')](_0x5f74('0x4'),_0x5f74('0x5'),'roundrobin')}};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js
index e00de5c..a173eef 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 _0x647c=['field','tq.TeamId','from','team_has_chat_queues','user_has_teams','clone','ut.UserId\x20=\x20?','toString','SELECT','every','TeamId','all','union','compact','value','transaction','isEmpty','emit','userChatQueue:remove','addAgents','removeAgents','isArray','getAgents','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','jayson/promise','http','Sequelize','ValidationError','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','update','destroy','ChatQueues','UserProfileResource','stack','name','index','ChatQueue','rawAttributes','fieldName','type','key','model','keys','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','filters','pick','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','findOne','UserChatQueue','ChatQueueId','User','findAndCountAll','UserId','agent','chatPause','updatedAt','createdAt','rows','%s/%s','SIP','getTeams','Team','addTeams','ids','Agents','online','voicePause','sequelize','each','findOrCreate','forEach','userChatQueue:save','removeTeams'];(function(_0x301b56,_0x427ba7){var _0x19b7c8=function(_0x5d0d88){while(--_0x5d0d88){_0x301b56['push'](_0x301b56['shift']());}};_0x19b7c8(++_0x427ba7);}(_0x647c,0x1d3));var _0xc647=function(_0x53f125,_0x4ba12e){_0x53f125=_0x53f125-0x0;var _0x209b38=_0x647c[_0x53f125];return _0x209b38;};'use strict';var pdf=require(_0xc647('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xc647('0x1'));var zipdir=require(_0xc647('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc647('0x3'));var moment=require(_0xc647('0x4'));var BPromise=require(_0xc647('0x5'));var Mustache=require(_0xc647('0x6'));var util=require(_0xc647('0x7'));var path=require('path');var sox=require(_0xc647('0x8'));var csv=require(_0xc647('0x9'));var ejs=require(_0xc647('0xa'));var fs=require('fs');var _=require(_0xc647('0xb'));var squel=require(_0xc647('0xc'));var crypto=require(_0xc647('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xc647('0x9'));var querystring=require(_0xc647('0xe'));var Papa=require(_0xc647('0xf'));var Redis=require('ioredis');var authService=require(_0xc647('0x10'));var qs=require(_0xc647('0x11'));var as=require(_0xc647('0x12'));var hardwareService=require(_0xc647('0x13'));var logger=require(_0xc647('0x14'))(_0xc647('0x15'));var utils=require(_0xc647('0x16'));var config=require('../../config/environment');var db=require(_0xc647('0x17'))['db'];config[_0xc647('0x18')]=_[_0xc647('0x19')](config[_0xc647('0x18')],{'host':_0xc647('0x1a'),'port':0x18eb});var socket=require(_0xc647('0x1b'))(new Redis(config[_0xc647('0x18')]));require('./chatQueue.socket')['register'](socket);var jayson=require(_0xc647('0x1c'));var client=jayson['client'][_0xc647('0x1d')]({'port':0x232a});function checkPasswordPattern(_0x5e6a2f,_0x353831,_0x46d496){if(_0x46d496){var _0x2be197=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2be197['test'](_0x353831)){return _0x5e6a2f;}else{throw new db[(_0xc647('0x1e'))][(_0xc647('0x1f'))]('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 _0x5e6a2f;}}function respondWithRpcPromise(_0x2909a7,_0x1c1db0,_0x895c9d,_0x407756){return new BPromise(function(_0x182de4,_0x1f502b){var _0x4e61f8=_0x407756||client;return _0x4e61f8['request'](_0x2909a7,_0x895c9d)[_0xc647('0x20')](function(_0x2b1f5a){logger[_0xc647('0x21')](_0xc647('0x22'),_0x1c1db0,_0xc647('0x23'));logger[_0xc647('0x24')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x1c1db0,_0xc647('0x23'),JSON[_0xc647('0x25')](_0x2b1f5a));if(_0x2b1f5a[_0xc647('0x26')]){if(_0x2b1f5a[_0xc647('0x26')]['code']===0x1f4){logger[_0xc647('0x26')](_0xc647('0x22'),_0x1c1db0,_0x2b1f5a[_0xc647('0x26')]['message']);return _0x1f502b(_0x2b1f5a['error'][_0xc647('0x27')]);}logger[_0xc647('0x26')]('ChatQueue,\x20%s,\x20%s',_0x1c1db0,_0x2b1f5a['error'][_0xc647('0x27')]);return _0x182de4(_0x2b1f5a[_0xc647('0x26')][_0xc647('0x27')]);}else{logger[_0xc647('0x21')](_0xc647('0x22'),_0x1c1db0,'request\x20sent');_0x182de4(_0x2b1f5a[_0xc647('0x28')][_0xc647('0x27')]);}})[_0xc647('0x29')](function(_0x5cbd31){logger[_0xc647('0x26')]('ChatQueue,\x20%s,\x20%s',_0x1c1db0,_0x5cbd31);_0x1f502b(_0x5cbd31);});});}function respondWithStatusCode(_0x47a6ad,_0x4bfe0b){_0x4bfe0b=_0x4bfe0b||0xcc;return function(_0x4c20a6){if(_0x4c20a6){return _0x47a6ad[_0xc647('0x2a')](_0x4bfe0b);}return _0x47a6ad[_0xc647('0x2b')](_0x4bfe0b)[_0xc647('0x2c')]();};}function respondWithResult(_0x39119e,_0x39fc93){_0x39fc93=_0x39fc93||0xc8;return function(_0x139e21){if(_0x139e21){return _0x39119e[_0xc647('0x2b')](_0x39fc93)[_0xc647('0x2d')](_0x139e21);}};}function respondWithFilteredResult(_0x2b7947,_0x5cecc2){return function(_0x592769){if(_0x592769){var _0xb96f51=_0x592769[_0xc647('0x2e')],_0x4652e4=_0x5cecc2['offset'],_0x3f20a4=_0x5cecc2[_0xc647('0x2f')]+_0x5cecc2['limit'],_0x2656b7;if(_0x3f20a4>=_0xb96f51){_0x3f20a4=_0xb96f51;_0x2656b7=0xc8;}else{_0x2656b7=0xce;}_0x2b7947[_0xc647('0x2b')](_0x2656b7);return _0x2b7947[_0xc647('0x30')](_0xc647('0x31'),_0x4652e4+'-'+_0x3f20a4+'/'+_0xb96f51)['json'](_0x592769);}return null;};}function patchUpdates(_0x1f5aac){return function(_0x4e3ed5){try{jsonpatch[_0xc647('0x32')](_0x4e3ed5,_0x1f5aac,!![]);}catch(_0x3c565d){return BPromise[_0xc647('0x33')](_0x3c565d);}return _0x4e3ed5[_0xc647('0x34')]();};}function saveUpdates(_0x293231,_0x2595eb){return function(_0x33235a){if(_0x33235a){return _0x33235a[_0xc647('0x35')](_0x293231)[_0xc647('0x20')](function(_0x14b1a1){return _0x14b1a1;});}return null;};}function removeEntity(_0x57bb54,_0x1378b4){return function(_0x851f40){if(_0x851f40){return _0x851f40[_0xc647('0x36')]()[_0xc647('0x20')](function(){var _0x3d6f49=_0x851f40['get']({'plain':!![]});var _0x4c4569=_0xc647('0x37');return db[_0xc647('0x38')][_0xc647('0x36')]({'where':{'type':_0x4c4569,'resourceId':_0x3d6f49['id']}})[_0xc647('0x20')](function(){return _0x851f40;});})[_0xc647('0x20')](function(){_0x57bb54[_0xc647('0x2b')](0xcc)[_0xc647('0x2c')]();});}};}function handleEntityNotFound(_0xebde0b,_0x8e49d9){return function(_0x46a508){if(!_0x46a508){_0xebde0b[_0xc647('0x2a')](0x194);}return _0x46a508;};}function handleError(_0x1db3ba,_0x9b919b){_0x9b919b=_0x9b919b||0x1f4;return function(_0xfd550){logger['error'](_0xfd550[_0xc647('0x39')]);if(_0xfd550[_0xc647('0x3a')]){delete _0xfd550[_0xc647('0x3a')];}_0x1db3ba[_0xc647('0x2b')](_0x9b919b)['send'](_0xfd550);};}exports[_0xc647('0x3b')]=function(_0x298345,_0x21073f){var _0x42d248={},_0x5dfd85={},_0x3771be={'count':0x0,'rows':[]};var _0x539fca=_['map'](db[_0xc647('0x3c')][_0xc647('0x3d')],function(_0x5b76a4){return{'name':_0x5b76a4[_0xc647('0x3e')],'type':_0x5b76a4[_0xc647('0x3f')][_0xc647('0x40')]};});_0x5dfd85[_0xc647('0x41')]=_['map'](_0x539fca,_0xc647('0x3a'));_0x5dfd85['query']=_[_0xc647('0x42')](_0x298345[_0xc647('0x43')]);_0x5dfd85['filters']=_['intersection'](_0x5dfd85[_0xc647('0x41')],_0x5dfd85[_0xc647('0x43')]);_0x42d248[_0xc647('0x44')]=_[_0xc647('0x45')](_0x5dfd85[_0xc647('0x41')],qs[_0xc647('0x46')](_0x298345['query'][_0xc647('0x46')]));_0x42d248[_0xc647('0x44')]=_0x42d248[_0xc647('0x44')][_0xc647('0x47')]?_0x42d248['attributes']:_0x5dfd85[_0xc647('0x41')];if(!_0x298345[_0xc647('0x43')][_0xc647('0x48')](_0xc647('0x49'))){_0x42d248['limit']=qs[_0xc647('0x4a')](_0x298345['query'][_0xc647('0x4a')]);_0x42d248[_0xc647('0x2f')]=qs[_0xc647('0x2f')](_0x298345['query'][_0xc647('0x2f')]);}_0x42d248[_0xc647('0x4b')]=qs[_0xc647('0x4c')](_0x298345['query'][_0xc647('0x4c')]);_0x42d248[_0xc647('0x4d')]=qs[_0xc647('0x4e')](_[_0xc647('0x4f')](_0x298345[_0xc647('0x43')],_0x5dfd85['filters']));if(_0x298345[_0xc647('0x43')][_0xc647('0x50')]){_0x42d248[_0xc647('0x4d')]=_[_0xc647('0x51')](_0x42d248['where'],{'$or':_[_0xc647('0x52')](_0x539fca,function(_0x40c5f7){if(_0x40c5f7[_0xc647('0x3f')]!==_0xc647('0x53')){var _0x163c10={};_0x163c10[_0x40c5f7[_0xc647('0x3a')]]={'$like':'%'+_0x298345[_0xc647('0x43')][_0xc647('0x50')]+'%'};return _0x163c10;}})});}_0x42d248=_[_0xc647('0x51')]({},_0x42d248,_0x298345[_0xc647('0x54')]);var _0x22930d={'where':_0x42d248[_0xc647('0x4d')]};return db[_0xc647('0x3c')][_0xc647('0x2e')](_0x22930d)[_0xc647('0x20')](function(_0x39ed82){_0x3771be[_0xc647('0x2e')]=_0x39ed82;if(_0x298345['query'][_0xc647('0x55')]){_0x42d248[_0xc647('0x56')]=[{'all':!![]}];}return db['ChatQueue'][_0xc647('0x57')](_0x42d248);})[_0xc647('0x20')](function(_0xf9f56a){_0x3771be['rows']=_0xf9f56a;return _0x3771be;})[_0xc647('0x20')](respondWithFilteredResult(_0x21073f,_0x42d248))['catch'](handleError(_0x21073f,null));};exports['show']=function(_0x366c23,_0x2fa8c5){var _0x4c6d55={'raw':!![],'where':{'id':_0x366c23['params']['id']}},_0x58046e={};_0x58046e[_0xc647('0x41')]=_[_0xc647('0x42')](db[_0xc647('0x3c')][_0xc647('0x3d')]);_0x58046e[_0xc647('0x43')]=_['keys'](_0x366c23[_0xc647('0x43')]);_0x58046e[_0xc647('0x4e')]=_[_0xc647('0x45')](_0x58046e[_0xc647('0x41')],_0x58046e[_0xc647('0x43')]);_0x4c6d55['attributes']=_[_0xc647('0x45')](_0x58046e[_0xc647('0x41')],qs[_0xc647('0x46')](_0x366c23[_0xc647('0x43')][_0xc647('0x46')]));_0x4c6d55[_0xc647('0x44')]=_0x4c6d55[_0xc647('0x44')][_0xc647('0x47')]?_0x4c6d55[_0xc647('0x44')]:_0x58046e[_0xc647('0x41')];if(_0x366c23['query'][_0xc647('0x55')]){_0x4c6d55[_0xc647('0x56')]=[{'all':!![]}];}_0x4c6d55=_[_0xc647('0x51')]({},_0x4c6d55,_0x366c23[_0xc647('0x54')]);return db['ChatQueue'][_0xc647('0x58')](_0x4c6d55)['then'](handleEntityNotFound(_0x2fa8c5,null))[_0xc647('0x20')](respondWithResult(_0x2fa8c5,null))[_0xc647('0x29')](handleError(_0x2fa8c5,null));};exports[_0xc647('0x59')]=function(_0x2e2f6a,_0x16ac48){return db[_0xc647('0x3c')][_0xc647('0x59')](_0x2e2f6a[_0xc647('0x5a')],{})['then'](function(_0x437746){var _0x4559ea=_0x2e2f6a[_0xc647('0x5b')]['get']({'plain':!![]});if(!_0x4559ea)throw new Error(_0xc647('0x5c'));if(_0x4559ea[_0xc647('0x5d')]===_0xc647('0x5b')){var _0x304ceb=_0x437746[_0xc647('0x5e')]({'plain':!![]});var _0x2c8235=_0xc647('0x37');return db[_0xc647('0x5f')][_0xc647('0x58')]({'where':{'name':_0x2c8235,'userProfileId':_0x4559ea['userProfileId']},'raw':!![]})['then'](function(_0xaa1f4b){if(_0xaa1f4b&&_0xaa1f4b['autoAssociation']===0x0){return db[_0xc647('0x38')][_0xc647('0x59')]({'name':_0x304ceb[_0xc647('0x3a')],'resourceId':_0x304ceb['id'],'type':_0xaa1f4b['name'],'sectionId':_0xaa1f4b['id']},{})[_0xc647('0x20')](function(){return _0x437746;});}else{return _0x437746;}})[_0xc647('0x29')](function(_0x2e4a20){logger[_0xc647('0x26')](_0xc647('0x60'),_0x2e4a20);throw _0x2e4a20;});}return _0x437746;})[_0xc647('0x20')](respondWithResult(_0x16ac48,0xc9))['catch'](handleError(_0x16ac48,null));};exports['update']=function(_0x256377,_0x50f877){if(_0x256377[_0xc647('0x5a')]['id']){delete _0x256377[_0xc647('0x5a')]['id'];}return db['ChatQueue'][_0xc647('0x58')]({'where':{'id':_0x256377[_0xc647('0x61')]['id']}})[_0xc647('0x20')](handleEntityNotFound(_0x50f877,null))[_0xc647('0x20')](saveUpdates(_0x256377[_0xc647('0x5a')],null))[_0xc647('0x20')](respondWithResult(_0x50f877,null))[_0xc647('0x29')](handleError(_0x50f877,null));};exports['destroy']=function(_0x4d92d5,_0x40ff29){return db[_0xc647('0x3c')]['find']({'where':{'id':_0x4d92d5[_0xc647('0x61')]['id']}})[_0xc647('0x20')](handleEntityNotFound(_0x40ff29,null))['then'](removeEntity(_0x40ff29,null))[_0xc647('0x29')](handleError(_0x40ff29,null));};exports[_0xc647('0x62')]=function(_0x3bdcf4,_0x2d2441){return db[_0xc647('0x3c')][_0xc647('0x62')]()[_0xc647('0x20')](respondWithResult(_0x2d2441,null))[_0xc647('0x29')](handleError(_0x2d2441,null));};exports['getMembers']=function(_0x3c8851,_0x18c17b,_0x5629ef){var _0x3a6e64={'raw':!![],'where':{}},_0x515446={},_0x7ed00e;return db['ChatQueue'][_0xc647('0x63')]({'where':{'id':_0x3c8851[_0xc647('0x61')]['id']}})[_0xc647('0x20')](handleEntityNotFound(_0x18c17b,null))[_0xc647('0x20')](function(_0x3eaa77){if(_0x3eaa77){_0x7ed00e=_0x3eaa77[_0xc647('0x5e')]({'plain':!![]});_0x515446['model']=_['keys'](db[_0xc647('0x64')]['rawAttributes']);_0x515446[_0xc647('0x43')]=_[_0xc647('0x42')](_0x3c8851[_0xc647('0x43')]);_0x515446[_0xc647('0x4e')]=_[_0xc647('0x45')](_0x515446[_0xc647('0x41')],_0x515446['query']);_0x3a6e64[_0xc647('0x44')]=_[_0xc647('0x45')](_0x515446['model'],qs[_0xc647('0x46')](_0x3c8851['query'][_0xc647('0x46')]));_0x3a6e64[_0xc647('0x44')]=_0x3a6e64[_0xc647('0x44')][_0xc647('0x47')]?_0x3a6e64['attributes']:_0x515446['model'];if(!_0x3c8851['query'][_0xc647('0x48')]('nolimit')){_0x3a6e64['limit']=qs[_0xc647('0x4a')](_0x3c8851[_0xc647('0x43')][_0xc647('0x4a')]);_0x3a6e64[_0xc647('0x2f')]=qs['offset'](_0x3c8851[_0xc647('0x43')][_0xc647('0x2f')]);}_0x3a6e64[_0xc647('0x4b')]=qs[_0xc647('0x4c')](_0x3c8851[_0xc647('0x43')][_0xc647('0x4c')]);_0x3a6e64['where']=qs[_0xc647('0x4e')](_[_0xc647('0x4f')](_0x3c8851['query'],_0x515446[_0xc647('0x4e')]));_0x3a6e64[_0xc647('0x4d')][_0xc647('0x65')]=_0x3eaa77['id'];if(_0x3c8851[_0xc647('0x43')]['filter']){_0x3a6e64['where']=_['merge'](_0x3a6e64[_0xc647('0x4d')],{'$or':_[_0xc647('0x52')](_0x3a6e64[_0xc647('0x44')],function(_0x2f72cc){var _0x541b5d={};_0x541b5d[_0x2f72cc]={'$like':'%'+_0x3c8851[_0xc647('0x43')]['filter']+'%'};return _0x541b5d;})});}_0x3a6e64=_['merge']({},_0x3a6e64,_0x3c8851[_0xc647('0x54')]);return db[_0xc647('0x64')][_0xc647('0x57')](_0x3a6e64);}})[_0xc647('0x20')](function(_0x11e213){if(_0x11e213){return db[_0xc647('0x66')][_0xc647('0x67')]({'where':{'id':_[_0xc647('0x52')](_0x11e213,_0xc647('0x68')),'role':_0xc647('0x69')},'attributes':['id',_0xc647('0x3a'),_0xc647('0x6a'),_0xc647('0x6b'),_0xc647('0x6c')]});}})[_0xc647('0x20')](function(_0x35fae8){if(_0x35fae8){return{'count':_0x35fae8[_0xc647('0x2e')],'rows':_[_0xc647('0x52')](_0x35fae8[_0xc647('0x6d')],function(_0x44a1ec){return{'membername':_0x44a1ec[_0xc647('0x3a')],'UserId':_0x44a1ec['id'],'queue_name':_0x7ed00e[_0xc647('0x3a')],'ChatQueueId':_0x7ed00e['id'],'interface':util['format'](_0xc647('0x6e'),_0xc647('0x6f'),_0x44a1ec[_0xc647('0x3a')]),'penalty':0x0,'paused':_0x44a1ec[_0xc647('0x6a')],'createdAt':_0x44a1ec[_0xc647('0x6c')],'updatedAt':_0x44a1ec[_0xc647('0x6b')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x18c17b,_0x3a6e64))[_0xc647('0x29')](handleError(_0x18c17b,null));};exports[_0xc647('0x70')]=function(_0x1f6cb1,_0x541810,_0x251ba3){var _0x3e1c80={};var _0x46d9f3={};var _0x1398e5;var _0x424e2b;return db['ChatQueue'][_0xc647('0x63')]({'where':{'id':_0x1f6cb1[_0xc647('0x61')]['id']}})['then'](handleEntityNotFound(_0x541810,null))[_0xc647('0x20')](function(_0x31567d){if(_0x31567d){_0x1398e5=_0x31567d;_0x46d9f3[_0xc647('0x41')]=_[_0xc647('0x42')](db[_0xc647('0x71')][_0xc647('0x3d')]);_0x46d9f3[_0xc647('0x43')]=_['keys'](_0x1f6cb1[_0xc647('0x43')]);_0x46d9f3[_0xc647('0x4e')]=_[_0xc647('0x45')](_0x46d9f3['model'],_0x46d9f3['query']);_0x3e1c80[_0xc647('0x44')]=_['intersection'](_0x46d9f3[_0xc647('0x41')],qs['fields'](_0x1f6cb1[_0xc647('0x43')][_0xc647('0x46')]));_0x3e1c80[_0xc647('0x44')]=_0x3e1c80[_0xc647('0x44')][_0xc647('0x47')]?_0x3e1c80[_0xc647('0x44')]:_0x46d9f3[_0xc647('0x41')];_0x3e1c80[_0xc647('0x4b')]=qs[_0xc647('0x4c')](_0x1f6cb1['query']['sort']);_0x3e1c80['where']=qs['filters'](_[_0xc647('0x4f')](_0x1f6cb1['query'],_0x46d9f3['filters']));if(_0x1f6cb1[_0xc647('0x43')]['filter']){_0x3e1c80['where']=_[_0xc647('0x51')](_0x3e1c80['where'],{'$or':_['map'](_0x3e1c80[_0xc647('0x44')],function(_0x36f231){var _0x35a5ea={};_0x35a5ea[_0x36f231]={'$like':'%'+_0x1f6cb1['query'][_0xc647('0x50')]+'%'};return _0x35a5ea;})});}_0x3e1c80=_['merge']({},_0x3e1c80,_0x1f6cb1[_0xc647('0x54')]);return _0x1398e5[_0xc647('0x70')](_0x3e1c80);}})[_0xc647('0x20')](function(_0x58424e){if(_0x58424e){_0x424e2b=_0x58424e[_0xc647('0x47')];if(!_0x1f6cb1['query'][_0xc647('0x48')]('nolimit')){_0x3e1c80['limit']=qs[_0xc647('0x4a')](_0x1f6cb1[_0xc647('0x43')][_0xc647('0x4a')]);_0x3e1c80[_0xc647('0x2f')]=qs[_0xc647('0x2f')](_0x1f6cb1[_0xc647('0x43')][_0xc647('0x2f')]);}return _0x1398e5[_0xc647('0x70')](_0x3e1c80);}})['then'](function(_0x44c910){if(_0x44c910){return _0x44c910?{'count':_0x424e2b,'rows':_0x44c910}:null;}})[_0xc647('0x20')](respondWithResult(_0x541810,null))[_0xc647('0x29')](handleError(_0x541810,null));};exports[_0xc647('0x72')]=function(_0x200e91,_0x15929a,_0x254553){var _0x1c38b3=_0x200e91['body'][_0xc647('0x73')];return db[_0xc647('0x71')][_0xc647('0x57')]({'where':{'id':_0x1c38b3},'attributes':['id'],'include':[{'model':db['User'],'as':_0xc647('0x74'),'attributes':['id','name',_0xc647('0x75'),_0xc647('0x76'),'interface'],'raw':!![]}]})['then'](function(_0x20fc97){if(_0x20fc97){var _0x2331a3=_['flatMap'](_0x20fc97,function(_0x418aca){var _0x3a6351=_0x418aca[_0xc647('0x5e')]({'plain':!![]});return _0x3a6351['Agents'];});return db[_0xc647('0x3c')][_0xc647('0x58')]({'where':{'id':_0x200e91[_0xc647('0x61')]['id']}})[_0xc647('0x20')](function(_0x4eb69f){return db[_0xc647('0x77')]['transaction'](function(_0x515c99){return _0x4eb69f[_0xc647('0x72')](_0x1c38b3,{'transaction':_0x515c99})[_0xc647('0x20')](function(){return BPromise[_0xc647('0x78')](_0x2331a3,function(_0x5120f7){return db['UserChatQueue'][_0xc647('0x79')]({'where':{'UserId':_0x5120f7['id'],'ChatQueueId':_0x200e91['params']['id']},'transaction':_0x515c99});});})[_0xc647('0x20')](function(){_0x2331a3[_0xc647('0x7a')](function(_0x2f0613){socket['emit'](_0xc647('0x7b'),{'UserId':_0x2f0613['id'],'ChatQueueId':_0x4eb69f['id']});});});});});}})[_0xc647('0x20')](respondWithStatusCode(_0x15929a,null))[_0xc647('0x29')](handleError(_0x15929a,null));};exports[_0xc647('0x7c')]=function(_0x23902f,_0x38e8b7,_0x4ed581){return db[_0xc647('0x71')][_0xc647('0x57')]({'where':{'id':_0x23902f[_0xc647('0x43')][_0xc647('0x73')]},'attributes':['id'],'include':[{'model':db[_0xc647('0x66')],'as':_0xc647('0x74'),'attributes':['id'],'raw':!![]}]})[_0xc647('0x20')](handleEntityNotFound(_0x38e8b7,null))['then'](function(_0x3de4a4){var _0x93a92a=_[_0xc647('0x52')](_0x3de4a4,'id');var _0x4a82aa=[];var _0x128067=[];var _0x5869f6=squel['select']();_0x5869f6[_0xc647('0x7d')](_0xc647('0x7e'))[_0xc647('0x7f')](_0xc647('0x80'),'tq')['join'](_0xc647('0x81'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0xc647('0x4d')]('ChatQueueId\x20=\x20?',_0x23902f[_0xc647('0x61')]['id']);for(var _0xc6195=0x0;_0xc6195<_0x3de4a4[_0xc647('0x47')];_0xc6195+=0x1){let _0x5b74b5=_0x3de4a4[_0xc6195];for(var _0x532962=0x0;_0x532962<_0x5b74b5['Agents'][_0xc647('0x47')];_0x532962+=0x1){let _0x3b2037=_0x5b74b5[_0xc647('0x74')][_0x532962];var _0x44e2cf=_0x5869f6[_0xc647('0x82')]();_0x44e2cf['where'](_0xc647('0x83'),_0x3b2037['id']);_0x128067['push'](db[_0xc647('0x77')][_0xc647('0x43')](_0x44e2cf[_0xc647('0x84')](),{'type':db[_0xc647('0x77')]['QueryTypes'][_0xc647('0x85')]})[_0xc647('0x20')](function(_0x2c68f7){if(_0x2c68f7[_0xc647('0x47')]===0x1){return _0x3b2037['id'];}else{var _0xf43d90=_[_0xc647('0x86')](_[_0xc647('0x52')](_0x2c68f7,_0xc647('0x87')),function(_0x4cc51e){return _['includes'](_0x93a92a,_0x4cc51e);});if(_0xf43d90){return _0x3b2037['id'];}}}));}}return BPromise[_0xc647('0x88')](_0x128067)[_0xc647('0x20')](function(_0x3e3039){_0x4a82aa=_(_0x4a82aa)[_0xc647('0x89')](_0x3e3039)[_0xc647('0x8a')]()[_0xc647('0x8b')]();return db['ChatQueue'][_0xc647('0x58')]({'where':{'id':_0x23902f[_0xc647('0x61')]['id']}})[_0xc647('0x20')](function(_0x35b9ad){return db[_0xc647('0x77')][_0xc647('0x8c')](function(_0x2ca699){return _0x35b9ad['removeTeams'](_0x23902f[_0xc647('0x43')][_0xc647('0x73')],{'transaction':_0x2ca699})[_0xc647('0x20')](function(){if(!_[_0xc647('0x8d')](_0x4a82aa)){return _0x35b9ad['removeAgents'](_0x4a82aa,{'transaction':_0x2ca699});}})[_0xc647('0x20')](function(){_0x4a82aa[_0xc647('0x7a')](function(_0x5a89ed){socket[_0xc647('0x8e')](_0xc647('0x8f'),{'UserId':_0x5a89ed,'ChatQueueId':_0x35b9ad['id']});});});});});});})[_0xc647('0x20')](respondWithStatusCode(_0x38e8b7,null))[_0xc647('0x29')](handleError(_0x38e8b7,null));};exports[_0xc647('0x90')]=function(_0x2d863e,_0x5c5900,_0x1589ee){return db[_0xc647('0x3c')][_0xc647('0x58')]({'where':{'id':_0x2d863e[_0xc647('0x61')]['id']}})[_0xc647('0x20')](handleEntityNotFound(_0x5c5900,null))[_0xc647('0x20')](function(_0x2bcf64){if(_0x2bcf64){return _0x2bcf64[_0xc647('0x90')](_0x2d863e[_0xc647('0x5a')][_0xc647('0x73')],_['omit'](_0x2d863e[_0xc647('0x5a')],[_0xc647('0x73'),'id'])||{})['spread'](function(_0x1fad47){for(var _0x1021c6=0x0;_0x1021c6<_0x2d863e[_0xc647('0x5a')][_0xc647('0x73')]['length'];_0x1021c6+=0x1){socket[_0xc647('0x8e')](_0xc647('0x7b'),{'UserId':_0x2d863e[_0xc647('0x5a')]['ids'][_0x1021c6],'ChatQueueId':_0x2d863e[_0xc647('0x61')]['id']});}return _0x1fad47;});}})[_0xc647('0x20')](respondWithResult(_0x5c5900,null))[_0xc647('0x29')](handleError(_0x5c5900,null));};exports['removeAgents']=function(_0x2361ec,_0xbd206c,_0x178f07){return db[_0xc647('0x3c')][_0xc647('0x58')]({'where':{'id':_0x2361ec['params']['id']}})[_0xc647('0x20')](handleEntityNotFound(_0xbd206c,null))[_0xc647('0x20')](function(_0x255460){if(_0x255460){return _0x255460[_0xc647('0x91')](_0x2361ec[_0xc647('0x43')][_0xc647('0x73')])['then'](function(){if(_[_0xc647('0x92')](_0x2361ec[_0xc647('0x43')][_0xc647('0x73')])){for(var _0x44f94b=0x0;_0x44f94b<_0x2361ec['query'][_0xc647('0x73')][_0xc647('0x47')];_0x44f94b+=0x1){socket['emit']('userChatQueue:remove',{'UserId':Number(_0x2361ec['query'][_0xc647('0x73')][_0x44f94b]),'ChatQueueId':Number(_0x2361ec[_0xc647('0x61')]['id'])});}}else{socket['emit'](_0xc647('0x8f'),{'UserId':Number(_0x2361ec[_0xc647('0x43')][_0xc647('0x73')]),'ChatQueueId':Number(_0x2361ec[_0xc647('0x61')]['id'])});}});}})[_0xc647('0x20')](respondWithStatusCode(_0xbd206c,null))[_0xc647('0x29')](handleError(_0xbd206c,null));};exports[_0xc647('0x93')]=function(_0x47ee12,_0x54c311,_0x342052){var _0x245a3b={};var _0x15dcea={};var _0x4a9829;var _0x1798ce;return db['ChatQueue'][_0xc647('0x63')]({'where':{'id':_0x47ee12['params']['id']}})[_0xc647('0x20')](handleEntityNotFound(_0x54c311,null))[_0xc647('0x20')](function(_0x588d40){if(_0x588d40){_0x4a9829=_0x588d40;_0x15dcea[_0xc647('0x41')]=_[_0xc647('0x42')](db['User'][_0xc647('0x3d')]);_0x15dcea['query']=_[_0xc647('0x42')](_0x47ee12['query']);_0x15dcea[_0xc647('0x4e')]=_[_0xc647('0x45')](_0x15dcea[_0xc647('0x41')],_0x15dcea[_0xc647('0x43')]);_0x245a3b[_0xc647('0x44')]=_[_0xc647('0x45')](_0x15dcea[_0xc647('0x41')],qs[_0xc647('0x46')](_0x47ee12[_0xc647('0x43')]['fields']));_0x245a3b[_0xc647('0x44')]=_0x245a3b['attributes'][_0xc647('0x47')]?_0x245a3b[_0xc647('0x44')]:_0x15dcea[_0xc647('0x41')];_0x245a3b[_0xc647('0x4b')]=qs['sort'](_0x47ee12[_0xc647('0x43')]['sort']);_0x245a3b[_0xc647('0x4d')]=qs[_0xc647('0x4e')](_[_0xc647('0x4f')](_0x47ee12[_0xc647('0x43')],_0x15dcea['filters']));if(_0x47ee12[_0xc647('0x43')][_0xc647('0x50')]){_0x245a3b['where']=_['merge'](_0x245a3b[_0xc647('0x4d')],{'$or':_['map'](_0x245a3b[_0xc647('0x44')],function(_0x138ac6){var _0x5aaeca={};_0x5aaeca[_0x138ac6]={'$like':'%'+_0x47ee12[_0xc647('0x43')]['filter']+'%'};return _0x5aaeca;})});}_0x245a3b=_[_0xc647('0x51')]({},_0x245a3b,_0x47ee12[_0xc647('0x54')]);return _0x4a9829['getAgents'](_0x245a3b);}})['then'](function(_0x1f9605){if(_0x1f9605){_0x1798ce=_0x1f9605[_0xc647('0x47')];if(!_0x47ee12[_0xc647('0x43')][_0xc647('0x48')]('nolimit')){_0x245a3b['limit']=qs[_0xc647('0x4a')](_0x47ee12['query'][_0xc647('0x4a')]);_0x245a3b[_0xc647('0x2f')]=qs[_0xc647('0x2f')](_0x47ee12[_0xc647('0x43')][_0xc647('0x2f')]);}return _0x4a9829['getAgents'](_0x245a3b);}})[_0xc647('0x20')](function(_0x225ddc){if(_0x225ddc){return _0x225ddc?{'count':_0x1798ce,'rows':_0x225ddc}:null;}})[_0xc647('0x20')](respondWithResult(_0x54c311,null))[_0xc647('0x29')](handleError(_0x54c311,null));};
\ No newline at end of file
+var _0x077e=['omit','spread','isArray','getAgents','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatQueue,\x20%s,\x20%s','message','result','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save','update','destroy','get','ChatQueues','UserProfileResource','name','send','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','ChatQueue','includeAll','findAll','rows','catch','show','params','rawAttributes','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','UserChatQueue','hasOwnProperty','User','findAndCountAll','UserId','agent','chatPause','createdAt','format','%s/%s','SIP','updatedAt','getTeams','addTeams','Team','voicePause','interface','flatMap','Agents','sequelize','each','findOrCreate','userChatQueue:save','removeTeams','ids','select','field','tq.TeamId','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','push','SELECT','every','TeamId','includes','all','union','compact','value','transaction','removeAgents','forEach','emit','userChatQueue:remove','addAgents'];(function(_0x33f10b,_0x449e5b){var _0x1febbc=function(_0x4c4f1f){while(--_0x4c4f1f){_0x33f10b['push'](_0x33f10b['shift']());}};_0x1febbc(++_0x449e5b);}(_0x077e,0x14a));var _0xe077=function(_0x567b6b,_0x40212d){_0x567b6b=_0x567b6b-0x0;var _0x4ccbd1=_0x077e[_0x567b6b];return _0x4ccbd1;};'use strict';var pdf=require(_0xe077('0x0'));var emlformat=require(_0xe077('0x1'));var rimraf=require(_0xe077('0x2'));var zipdir=require(_0xe077('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe077('0x4'));var moment=require(_0xe077('0x5'));var BPromise=require(_0xe077('0x6'));var Mustache=require('mustache');var util=require(_0xe077('0x7'));var path=require(_0xe077('0x8'));var sox=require(_0xe077('0x9'));var csv=require(_0xe077('0xa'));var ejs=require(_0xe077('0xb'));var fs=require('fs');var _=require(_0xe077('0xc'));var squel=require(_0xe077('0xd'));var crypto=require(_0xe077('0xe'));var jsforce=require(_0xe077('0xf'));var deskjs=require(_0xe077('0x10'));var toCsv=require(_0xe077('0xa'));var querystring=require(_0xe077('0x11'));var Papa=require('papaparse');var Redis=require(_0xe077('0x12'));var authService=require(_0xe077('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xe077('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe077('0x15'))('api');var utils=require(_0xe077('0x16'));var config=require(_0xe077('0x17'));var db=require(_0xe077('0x18'))['db'];config[_0xe077('0x19')]=_[_0xe077('0x1a')](config[_0xe077('0x19')],{'host':_0xe077('0x1b'),'port':0x18eb});var socket=require(_0xe077('0x1c'))(new Redis(config[_0xe077('0x19')]));require(_0xe077('0x1d'))[_0xe077('0x1e')](socket);var jayson=require('jayson/promise');var client=jayson[_0xe077('0x1f')][_0xe077('0x20')]({'port':0x232a});function checkPasswordPattern(_0x5e5cad,_0x588bb4,_0x57df1c){if(_0x57df1c){var _0x89c906=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x89c906[_0xe077('0x21')](_0x588bb4)){return _0x5e5cad;}else{throw new db[(_0xe077('0x22'))][(_0xe077('0x23'))](_0xe077('0x24'));}}else{return _0x5e5cad;}}function respondWithRpcPromise(_0x1787fa,_0xc219a6,_0x3957a8,_0x114ec0){return new BPromise(function(_0x2e650a,_0x4c0efc){var _0x11a45b=_0x114ec0||client;return _0x11a45b[_0xe077('0x25')](_0x1787fa,_0x3957a8)[_0xe077('0x26')](function(_0x4df5e3){logger[_0xe077('0x27')]('ChatQueue,\x20%s,\x20%s',_0xc219a6,_0xe077('0x28'));logger[_0xe077('0x29')](_0xe077('0x2a'),_0xc219a6,'request\x20sent',JSON[_0xe077('0x2b')](_0x4df5e3));if(_0x4df5e3[_0xe077('0x2c')]){if(_0x4df5e3[_0xe077('0x2c')][_0xe077('0x2d')]===0x1f4){logger[_0xe077('0x2c')](_0xe077('0x2e'),_0xc219a6,_0x4df5e3[_0xe077('0x2c')][_0xe077('0x2f')]);return _0x4c0efc(_0x4df5e3[_0xe077('0x2c')]['message']);}logger[_0xe077('0x2c')](_0xe077('0x2e'),_0xc219a6,_0x4df5e3['error'][_0xe077('0x2f')]);return _0x2e650a(_0x4df5e3[_0xe077('0x2c')][_0xe077('0x2f')]);}else{logger[_0xe077('0x27')](_0xe077('0x2e'),_0xc219a6,_0xe077('0x28'));_0x2e650a(_0x4df5e3[_0xe077('0x30')][_0xe077('0x2f')]);}})['catch'](function(_0x3838cb){logger[_0xe077('0x2c')](_0xe077('0x2e'),_0xc219a6,_0x3838cb);_0x4c0efc(_0x3838cb);});});}function respondWithStatusCode(_0xd7629f,_0x300857){_0x300857=_0x300857||0xcc;return function(_0x26293d){if(_0x26293d){return _0xd7629f[_0xe077('0x31')](_0x300857);}return _0xd7629f[_0xe077('0x32')](_0x300857)[_0xe077('0x33')]();};}function respondWithResult(_0x34c307,_0xc36ab1){_0xc36ab1=_0xc36ab1||0xc8;return function(_0x3744ba){if(_0x3744ba){return _0x34c307[_0xe077('0x32')](_0xc36ab1)['json'](_0x3744ba);}};}function respondWithFilteredResult(_0x183425,_0x4ed848){return function(_0x19c179){if(_0x19c179){var _0x8d4bfa=_0x19c179[_0xe077('0x34')],_0xd133a3=_0x4ed848[_0xe077('0x35')],_0x5e0c34=_0x4ed848[_0xe077('0x35')]+_0x4ed848[_0xe077('0x36')],_0x160453;if(_0x5e0c34>=_0x8d4bfa){_0x5e0c34=_0x8d4bfa;_0x160453=0xc8;}else{_0x160453=0xce;}_0x183425[_0xe077('0x32')](_0x160453);return _0x183425[_0xe077('0x37')](_0xe077('0x38'),_0xd133a3+'-'+_0x5e0c34+'/'+_0x8d4bfa)[_0xe077('0x39')](_0x19c179);}return null;};}function patchUpdates(_0x392999){return function(_0x2ee130){try{jsonpatch[_0xe077('0x3a')](_0x2ee130,_0x392999,!![]);}catch(_0xe328a8){return BPromise[_0xe077('0x3b')](_0xe328a8);}return _0x2ee130[_0xe077('0x3c')]();};}function saveUpdates(_0x5c3c46,_0x4b026c){return function(_0x2d2f23){if(_0x2d2f23){return _0x2d2f23[_0xe077('0x3d')](_0x5c3c46)['then'](function(_0x54863f){return _0x54863f;});}return null;};}function removeEntity(_0x24edff,_0x3870b1){return function(_0x8689f0){if(_0x8689f0){return _0x8689f0[_0xe077('0x3e')]()['then'](function(){var _0x50c48a=_0x8689f0[_0xe077('0x3f')]({'plain':!![]});var _0x18ae9f=_0xe077('0x40');return db[_0xe077('0x41')][_0xe077('0x3e')]({'where':{'type':_0x18ae9f,'resourceId':_0x50c48a['id']}})['then'](function(){return _0x8689f0;});})[_0xe077('0x26')](function(){_0x24edff['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x257da4,_0x449e20){return function(_0x3c9b80){if(!_0x3c9b80){_0x257da4[_0xe077('0x31')](0x194);}return _0x3c9b80;};}function handleError(_0xdb68f,_0x58786f){_0x58786f=_0x58786f||0x1f4;return function(_0x246e99){logger[_0xe077('0x2c')](_0x246e99['stack']);if(_0x246e99[_0xe077('0x42')]){delete _0x246e99['name'];}_0xdb68f['status'](_0x58786f)[_0xe077('0x43')](_0x246e99);};}exports['index']=function(_0x5077c3,_0x3ce8fb){var _0x832e7e={},_0x59b304={},_0x56c24c={'count':0x0,'rows':[]};var _0x3cd163=_[_0xe077('0x44')](db['ChatQueue']['rawAttributes'],function(_0xd47fb0){return{'name':_0xd47fb0[_0xe077('0x45')],'type':_0xd47fb0[_0xe077('0x46')][_0xe077('0x47')]};});_0x59b304[_0xe077('0x48')]=_[_0xe077('0x44')](_0x3cd163,_0xe077('0x42'));_0x59b304[_0xe077('0x49')]=_[_0xe077('0x4a')](_0x5077c3[_0xe077('0x49')]);_0x59b304[_0xe077('0x4b')]=_[_0xe077('0x4c')](_0x59b304[_0xe077('0x48')],_0x59b304['query']);_0x832e7e[_0xe077('0x4d')]=_[_0xe077('0x4c')](_0x59b304['model'],qs[_0xe077('0x4e')](_0x5077c3[_0xe077('0x49')][_0xe077('0x4e')]));_0x832e7e['attributes']=_0x832e7e[_0xe077('0x4d')][_0xe077('0x4f')]?_0x832e7e[_0xe077('0x4d')]:_0x59b304['model'];if(!_0x5077c3[_0xe077('0x49')]['hasOwnProperty'](_0xe077('0x50'))){_0x832e7e['limit']=qs['limit'](_0x5077c3[_0xe077('0x49')]['limit']);_0x832e7e[_0xe077('0x35')]=qs['offset'](_0x5077c3['query'][_0xe077('0x35')]);}_0x832e7e[_0xe077('0x51')]=qs[_0xe077('0x52')](_0x5077c3[_0xe077('0x49')][_0xe077('0x52')]);_0x832e7e[_0xe077('0x53')]=qs['filters'](_[_0xe077('0x54')](_0x5077c3[_0xe077('0x49')],_0x59b304[_0xe077('0x4b')]));if(_0x5077c3[_0xe077('0x49')][_0xe077('0x55')]){_0x832e7e['where']=_['merge'](_0x832e7e[_0xe077('0x53')],{'$or':_[_0xe077('0x44')](_0x3cd163,function(_0x2358a8){if(_0x2358a8['type']!==_0xe077('0x56')){var _0x25419a={};_0x25419a[_0x2358a8[_0xe077('0x42')]]={'$like':'%'+_0x5077c3[_0xe077('0x49')][_0xe077('0x55')]+'%'};return _0x25419a;}})});}_0x832e7e=_[_0xe077('0x57')]({},_0x832e7e,_0x5077c3[_0xe077('0x58')]);var _0x24875c={'where':_0x832e7e[_0xe077('0x53')]};return db[_0xe077('0x59')][_0xe077('0x34')](_0x24875c)[_0xe077('0x26')](function(_0x5b5d62){_0x56c24c[_0xe077('0x34')]=_0x5b5d62;if(_0x5077c3[_0xe077('0x49')][_0xe077('0x5a')]){_0x832e7e['include']=[{'all':!![]}];}return db['ChatQueue'][_0xe077('0x5b')](_0x832e7e);})[_0xe077('0x26')](function(_0x1935a2){_0x56c24c[_0xe077('0x5c')]=_0x1935a2;return _0x56c24c;})[_0xe077('0x26')](respondWithFilteredResult(_0x3ce8fb,_0x832e7e))[_0xe077('0x5d')](handleError(_0x3ce8fb,null));};exports[_0xe077('0x5e')]=function(_0x285632,_0x5309ad){var _0x1862d8={'raw':!![],'where':{'id':_0x285632[_0xe077('0x5f')]['id']}},_0x513a6f={};_0x513a6f[_0xe077('0x48')]=_[_0xe077('0x4a')](db[_0xe077('0x59')][_0xe077('0x60')]);_0x513a6f['query']=_[_0xe077('0x4a')](_0x285632['query']);_0x513a6f[_0xe077('0x4b')]=_['intersection'](_0x513a6f[_0xe077('0x48')],_0x513a6f[_0xe077('0x49')]);_0x1862d8[_0xe077('0x4d')]=_[_0xe077('0x4c')](_0x513a6f['model'],qs['fields'](_0x285632['query'][_0xe077('0x4e')]));_0x1862d8['attributes']=_0x1862d8['attributes'][_0xe077('0x4f')]?_0x1862d8[_0xe077('0x4d')]:_0x513a6f[_0xe077('0x48')];if(_0x285632[_0xe077('0x49')][_0xe077('0x5a')]){_0x1862d8['include']=[{'all':!![]}];}_0x1862d8=_[_0xe077('0x57')]({},_0x1862d8,_0x285632[_0xe077('0x58')]);return db['ChatQueue'][_0xe077('0x61')](_0x1862d8)[_0xe077('0x26')](handleEntityNotFound(_0x5309ad,null))[_0xe077('0x26')](respondWithResult(_0x5309ad,null))['catch'](handleError(_0x5309ad,null));};exports[_0xe077('0x62')]=function(_0x249325,_0x55f924){return db[_0xe077('0x59')][_0xe077('0x62')](_0x249325['body'],{})[_0xe077('0x26')](function(_0x5674d6){var _0x541bfe=_0x249325[_0xe077('0x63')][_0xe077('0x3f')]({'plain':!![]});if(!_0x541bfe)throw new Error(_0xe077('0x64'));if(_0x541bfe[_0xe077('0x65')]==='user'){var _0x212dd3=_0x5674d6[_0xe077('0x3f')]({'plain':!![]});var _0x4112f='ChatQueues';return db[_0xe077('0x66')][_0xe077('0x61')]({'where':{'name':_0x4112f,'userProfileId':_0x541bfe[_0xe077('0x67')]},'raw':!![]})[_0xe077('0x26')](function(_0x37456c){if(_0x37456c&&_0x37456c[_0xe077('0x68')]===0x0){return db['UserProfileResource'][_0xe077('0x62')]({'name':_0x212dd3[_0xe077('0x42')],'resourceId':_0x212dd3['id'],'type':_0x37456c[_0xe077('0x42')],'sectionId':_0x37456c['id']},{})[_0xe077('0x26')](function(){return _0x5674d6;});}else{return _0x5674d6;}})[_0xe077('0x5d')](function(_0x2cb8c1){logger[_0xe077('0x2c')](_0xe077('0x69'),_0x2cb8c1);throw _0x2cb8c1;});}return _0x5674d6;})[_0xe077('0x26')](respondWithResult(_0x55f924,0xc9))['catch'](handleError(_0x55f924,null));};exports[_0xe077('0x3d')]=function(_0x4d6f2e,_0x3db787){if(_0x4d6f2e[_0xe077('0x6a')]['id']){delete _0x4d6f2e[_0xe077('0x6a')]['id'];}return db[_0xe077('0x59')][_0xe077('0x61')]({'where':{'id':_0x4d6f2e['params']['id']}})[_0xe077('0x26')](handleEntityNotFound(_0x3db787,null))['then'](saveUpdates(_0x4d6f2e[_0xe077('0x6a')],null))[_0xe077('0x26')](respondWithResult(_0x3db787,null))['catch'](handleError(_0x3db787,null));};exports[_0xe077('0x3e')]=function(_0x41a633,_0x23e508){return db[_0xe077('0x59')][_0xe077('0x61')]({'where':{'id':_0x41a633[_0xe077('0x5f')]['id']}})[_0xe077('0x26')](handleEntityNotFound(_0x23e508,null))['then'](removeEntity(_0x23e508,null))[_0xe077('0x5d')](handleError(_0x23e508,null));};exports[_0xe077('0x6b')]=function(_0x35ff4e,_0x189d8a){return db[_0xe077('0x59')]['describe']()[_0xe077('0x26')](respondWithResult(_0x189d8a,null))['catch'](handleError(_0x189d8a,null));};exports[_0xe077('0x6c')]=function(_0x3741be,_0x355b73,_0x2a4279){var _0x5f3717={'raw':!![],'where':{}},_0x13e09a={},_0x36a593;return db[_0xe077('0x59')][_0xe077('0x6d')]({'where':{'id':_0x3741be[_0xe077('0x5f')]['id']}})[_0xe077('0x26')](handleEntityNotFound(_0x355b73,null))[_0xe077('0x26')](function(_0x17be3d){if(_0x17be3d){_0x36a593=_0x17be3d[_0xe077('0x3f')]({'plain':!![]});_0x13e09a[_0xe077('0x48')]=_[_0xe077('0x4a')](db[_0xe077('0x6e')]['rawAttributes']);_0x13e09a['query']=_[_0xe077('0x4a')](_0x3741be[_0xe077('0x49')]);_0x13e09a[_0xe077('0x4b')]=_['intersection'](_0x13e09a['model'],_0x13e09a[_0xe077('0x49')]);_0x5f3717[_0xe077('0x4d')]=_[_0xe077('0x4c')](_0x13e09a[_0xe077('0x48')],qs[_0xe077('0x4e')](_0x3741be[_0xe077('0x49')]['fields']));_0x5f3717[_0xe077('0x4d')]=_0x5f3717[_0xe077('0x4d')][_0xe077('0x4f')]?_0x5f3717[_0xe077('0x4d')]:_0x13e09a[_0xe077('0x48')];if(!_0x3741be[_0xe077('0x49')][_0xe077('0x6f')](_0xe077('0x50'))){_0x5f3717['limit']=qs['limit'](_0x3741be[_0xe077('0x49')][_0xe077('0x36')]);_0x5f3717['offset']=qs['offset'](_0x3741be[_0xe077('0x49')][_0xe077('0x35')]);}_0x5f3717[_0xe077('0x51')]=qs[_0xe077('0x52')](_0x3741be['query'][_0xe077('0x52')]);_0x5f3717['where']=qs[_0xe077('0x4b')](_[_0xe077('0x54')](_0x3741be[_0xe077('0x49')],_0x13e09a[_0xe077('0x4b')]));_0x5f3717[_0xe077('0x53')]['ChatQueueId']=_0x17be3d['id'];if(_0x3741be['query'][_0xe077('0x55')]){_0x5f3717[_0xe077('0x53')]=_[_0xe077('0x57')](_0x5f3717[_0xe077('0x53')],{'$or':_['map'](_0x5f3717[_0xe077('0x4d')],function(_0x153d07){var _0x4e5186={};_0x4e5186[_0x153d07]={'$like':'%'+_0x3741be[_0xe077('0x49')][_0xe077('0x55')]+'%'};return _0x4e5186;})});}_0x5f3717=_['merge']({},_0x5f3717,_0x3741be['options']);return db[_0xe077('0x6e')][_0xe077('0x5b')](_0x5f3717);}})['then'](function(_0x4cabfb){if(_0x4cabfb){return db[_0xe077('0x70')][_0xe077('0x71')]({'where':{'id':_[_0xe077('0x44')](_0x4cabfb,_0xe077('0x72')),'role':_0xe077('0x73')},'attributes':['id',_0xe077('0x42'),_0xe077('0x74'),'updatedAt',_0xe077('0x75')]});}})[_0xe077('0x26')](function(_0x5c35b8){if(_0x5c35b8){return{'count':_0x5c35b8[_0xe077('0x34')],'rows':_[_0xe077('0x44')](_0x5c35b8[_0xe077('0x5c')],function(_0x4708f3){return{'membername':_0x4708f3['name'],'UserId':_0x4708f3['id'],'queue_name':_0x36a593[_0xe077('0x42')],'ChatQueueId':_0x36a593['id'],'interface':util[_0xe077('0x76')](_0xe077('0x77'),_0xe077('0x78'),_0x4708f3[_0xe077('0x42')]),'penalty':0x0,'paused':_0x4708f3[_0xe077('0x74')],'createdAt':_0x4708f3['createdAt'],'updatedAt':_0x4708f3[_0xe077('0x79')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xe077('0x26')](respondWithFilteredResult(_0x355b73,_0x5f3717))[_0xe077('0x5d')](handleError(_0x355b73,null));};exports[_0xe077('0x7a')]=function(_0x3879f6,_0x54a3ac,_0x104016){var _0x2d897c={};var _0xece2bd={};var _0x5981c0;var _0x324284;return db['ChatQueue'][_0xe077('0x6d')]({'where':{'id':_0x3879f6[_0xe077('0x5f')]['id']}})[_0xe077('0x26')](handleEntityNotFound(_0x54a3ac,null))[_0xe077('0x26')](function(_0x4b2774){if(_0x4b2774){_0x5981c0=_0x4b2774;_0xece2bd[_0xe077('0x48')]=_[_0xe077('0x4a')](db['Team']['rawAttributes']);_0xece2bd[_0xe077('0x49')]=_[_0xe077('0x4a')](_0x3879f6[_0xe077('0x49')]);_0xece2bd[_0xe077('0x4b')]=_['intersection'](_0xece2bd[_0xe077('0x48')],_0xece2bd[_0xe077('0x49')]);_0x2d897c[_0xe077('0x4d')]=_['intersection'](_0xece2bd[_0xe077('0x48')],qs[_0xe077('0x4e')](_0x3879f6[_0xe077('0x49')][_0xe077('0x4e')]));_0x2d897c['attributes']=_0x2d897c['attributes'][_0xe077('0x4f')]?_0x2d897c[_0xe077('0x4d')]:_0xece2bd['model'];_0x2d897c[_0xe077('0x51')]=qs[_0xe077('0x52')](_0x3879f6[_0xe077('0x49')]['sort']);_0x2d897c[_0xe077('0x53')]=qs[_0xe077('0x4b')](_[_0xe077('0x54')](_0x3879f6[_0xe077('0x49')],_0xece2bd[_0xe077('0x4b')]));if(_0x3879f6[_0xe077('0x49')][_0xe077('0x55')]){_0x2d897c[_0xe077('0x53')]=_[_0xe077('0x57')](_0x2d897c[_0xe077('0x53')],{'$or':_[_0xe077('0x44')](_0x2d897c['attributes'],function(_0x4f2249){var _0x1c71ef={};_0x1c71ef[_0x4f2249]={'$like':'%'+_0x3879f6[_0xe077('0x49')]['filter']+'%'};return _0x1c71ef;})});}_0x2d897c=_[_0xe077('0x57')]({},_0x2d897c,_0x3879f6[_0xe077('0x58')]);return _0x5981c0[_0xe077('0x7a')](_0x2d897c);}})[_0xe077('0x26')](function(_0xfccfa4){if(_0xfccfa4){_0x324284=_0xfccfa4['length'];if(!_0x3879f6['query']['hasOwnProperty']('nolimit')){_0x2d897c[_0xe077('0x36')]=qs[_0xe077('0x36')](_0x3879f6[_0xe077('0x49')][_0xe077('0x36')]);_0x2d897c[_0xe077('0x35')]=qs[_0xe077('0x35')](_0x3879f6['query'][_0xe077('0x35')]);}return _0x5981c0[_0xe077('0x7a')](_0x2d897c);}})[_0xe077('0x26')](function(_0xee2a0e){if(_0xee2a0e){return _0xee2a0e?{'count':_0x324284,'rows':_0xee2a0e}:null;}})[_0xe077('0x26')](respondWithResult(_0x54a3ac,null))[_0xe077('0x5d')](handleError(_0x54a3ac,null));};exports[_0xe077('0x7b')]=function(_0xbbe100,_0x51035,_0x28a245){var _0x500c20=_0xbbe100[_0xe077('0x6a')]['ids'];return db[_0xe077('0x7c')][_0xe077('0x5b')]({'where':{'id':_0x500c20},'attributes':['id'],'include':[{'model':db[_0xe077('0x70')],'as':'Agents','attributes':['id',_0xe077('0x42'),'online',_0xe077('0x7d'),_0xe077('0x7e')],'raw':!![]}]})['then'](function(_0x5a2cad){if(_0x5a2cad){var _0x3536a3=_[_0xe077('0x7f')](_0x5a2cad,function(_0x3abf42){var _0x2bbceb=_0x3abf42[_0xe077('0x3f')]({'plain':!![]});return _0x2bbceb[_0xe077('0x80')];});return db[_0xe077('0x59')][_0xe077('0x61')]({'where':{'id':_0xbbe100['params']['id']}})['then'](function(_0x56b7ab){return db[_0xe077('0x81')]['transaction'](function(_0x2a4958){return _0x56b7ab['addTeams'](_0x500c20,{'transaction':_0x2a4958})[_0xe077('0x26')](function(){return BPromise[_0xe077('0x82')](_0x3536a3,function(_0x525f23){return db['UserChatQueue'][_0xe077('0x83')]({'where':{'UserId':_0x525f23['id'],'ChatQueueId':_0xbbe100[_0xe077('0x5f')]['id']},'transaction':_0x2a4958});});})[_0xe077('0x26')](function(){_0x3536a3['forEach'](function(_0x1570ed){socket['emit'](_0xe077('0x84'),{'UserId':_0x1570ed['id'],'ChatQueueId':_0x56b7ab['id']});});});});});}})[_0xe077('0x26')](respondWithStatusCode(_0x51035,null))[_0xe077('0x5d')](handleError(_0x51035,null));};exports[_0xe077('0x85')]=function(_0x3eb0cd,_0x4f7c3b,_0x229e11){return db[_0xe077('0x7c')][_0xe077('0x5b')]({'where':{'id':_0x3eb0cd['query'][_0xe077('0x86')]},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0xe077('0x26')](handleEntityNotFound(_0x4f7c3b,null))[_0xe077('0x26')](function(_0x4655fc){var _0x27c8b5=_['map'](_0x4655fc,'id');var _0xbf8370=[];var _0x18e5b4=[];var _0x26d965=squel[_0xe077('0x87')]();_0x26d965[_0xe077('0x88')](_0xe077('0x89'))[_0xe077('0x8a')]('team_has_chat_queues','tq')[_0xe077('0x8b')](_0xe077('0x8c'),'ut',_0xe077('0x8d'))[_0xe077('0x53')]('ChatQueueId\x20=\x20?',_0x3eb0cd[_0xe077('0x5f')]['id']);for(var _0x1aa3c2=0x0;_0x1aa3c2<_0x4655fc[_0xe077('0x4f')];_0x1aa3c2+=0x1){let _0x4d68cd=_0x4655fc[_0x1aa3c2];for(var _0x3d037a=0x0;_0x3d037a<_0x4d68cd['Agents']['length'];_0x3d037a+=0x1){let _0x5ee64d=_0x4d68cd[_0xe077('0x80')][_0x3d037a];var _0x4283b1=_0x26d965[_0xe077('0x8e')]();_0x4283b1['where'](_0xe077('0x8f'),_0x5ee64d['id']);_0x18e5b4[_0xe077('0x90')](db[_0xe077('0x81')][_0xe077('0x49')](_0x4283b1['toString'](),{'type':db['sequelize']['QueryTypes'][_0xe077('0x91')]})[_0xe077('0x26')](function(_0x5b792f){if(_0x5b792f[_0xe077('0x4f')]===0x1){return _0x5ee64d['id'];}else{var _0x56d193=_[_0xe077('0x92')](_[_0xe077('0x44')](_0x5b792f,_0xe077('0x93')),function(_0x1d117c){return _[_0xe077('0x94')](_0x27c8b5,_0x1d117c);});if(_0x56d193){return _0x5ee64d['id'];}}}));}}return BPromise[_0xe077('0x95')](_0x18e5b4)[_0xe077('0x26')](function(_0x16c4c5){_0xbf8370=_(_0xbf8370)[_0xe077('0x96')](_0x16c4c5)[_0xe077('0x97')]()[_0xe077('0x98')]();return db[_0xe077('0x59')][_0xe077('0x61')]({'where':{'id':_0x3eb0cd[_0xe077('0x5f')]['id']}})[_0xe077('0x26')](function(_0x412ed0){return db[_0xe077('0x81')][_0xe077('0x99')](function(_0x275488){return _0x412ed0[_0xe077('0x85')](_0x3eb0cd[_0xe077('0x49')][_0xe077('0x86')],{'transaction':_0x275488})[_0xe077('0x26')](function(){if(!_['isEmpty'](_0xbf8370)){return _0x412ed0[_0xe077('0x9a')](_0xbf8370,{'transaction':_0x275488});}})[_0xe077('0x26')](function(){_0xbf8370[_0xe077('0x9b')](function(_0x4a5ad7){socket[_0xe077('0x9c')](_0xe077('0x9d'),{'UserId':_0x4a5ad7,'ChatQueueId':_0x412ed0['id']});});});});});});})[_0xe077('0x26')](respondWithStatusCode(_0x4f7c3b,null))[_0xe077('0x5d')](handleError(_0x4f7c3b,null));};exports[_0xe077('0x9e')]=function(_0x3e18e7,_0x2e632b,_0x5e263d){return db[_0xe077('0x59')]['find']({'where':{'id':_0x3e18e7[_0xe077('0x5f')]['id']}})[_0xe077('0x26')](handleEntityNotFound(_0x2e632b,null))['then'](function(_0x45adbf){if(_0x45adbf){return _0x45adbf['addAgents'](_0x3e18e7[_0xe077('0x6a')][_0xe077('0x86')],_[_0xe077('0x9f')](_0x3e18e7[_0xe077('0x6a')],[_0xe077('0x86'),'id'])||{})[_0xe077('0xa0')](function(_0x4279c4){for(var _0xf5501a=0x0;_0xf5501a<_0x3e18e7[_0xe077('0x6a')][_0xe077('0x86')][_0xe077('0x4f')];_0xf5501a+=0x1){socket[_0xe077('0x9c')](_0xe077('0x84'),{'UserId':_0x3e18e7[_0xe077('0x6a')][_0xe077('0x86')][_0xf5501a],'ChatQueueId':_0x3e18e7[_0xe077('0x5f')]['id']});}return _0x4279c4;});}})[_0xe077('0x26')](respondWithResult(_0x2e632b,null))[_0xe077('0x5d')](handleError(_0x2e632b,null));};exports[_0xe077('0x9a')]=function(_0x2cfc83,_0x4c9582,_0x3fc413){return db[_0xe077('0x59')][_0xe077('0x61')]({'where':{'id':_0x2cfc83[_0xe077('0x5f')]['id']}})[_0xe077('0x26')](handleEntityNotFound(_0x4c9582,null))[_0xe077('0x26')](function(_0x37ac45){if(_0x37ac45){return _0x37ac45[_0xe077('0x9a')](_0x2cfc83['query'][_0xe077('0x86')])[_0xe077('0x26')](function(){if(_[_0xe077('0xa1')](_0x2cfc83[_0xe077('0x49')][_0xe077('0x86')])){for(var _0x27b17c=0x0;_0x27b17c<_0x2cfc83[_0xe077('0x49')][_0xe077('0x86')][_0xe077('0x4f')];_0x27b17c+=0x1){socket[_0xe077('0x9c')]('userChatQueue:remove',{'UserId':Number(_0x2cfc83[_0xe077('0x49')][_0xe077('0x86')][_0x27b17c]),'ChatQueueId':Number(_0x2cfc83['params']['id'])});}}else{socket['emit'](_0xe077('0x9d'),{'UserId':Number(_0x2cfc83[_0xe077('0x49')][_0xe077('0x86')]),'ChatQueueId':Number(_0x2cfc83[_0xe077('0x5f')]['id'])});}});}})[_0xe077('0x26')](respondWithStatusCode(_0x4c9582,null))['catch'](handleError(_0x4c9582,null));};exports[_0xe077('0xa2')]=function(_0x2027f7,_0x223f3d,_0xe1e7d2){var _0x2b8b1d={};var _0x58e527={};var _0xae1aad;var _0x33d819;return db[_0xe077('0x59')][_0xe077('0x6d')]({'where':{'id':_0x2027f7['params']['id']}})[_0xe077('0x26')](handleEntityNotFound(_0x223f3d,null))[_0xe077('0x26')](function(_0x18d195){if(_0x18d195){_0xae1aad=_0x18d195;_0x58e527[_0xe077('0x48')]=_[_0xe077('0x4a')](db[_0xe077('0x70')][_0xe077('0x60')]);_0x58e527['query']=_[_0xe077('0x4a')](_0x2027f7['query']);_0x58e527['filters']=_['intersection'](_0x58e527[_0xe077('0x48')],_0x58e527[_0xe077('0x49')]);_0x2b8b1d['attributes']=_['intersection'](_0x58e527[_0xe077('0x48')],qs[_0xe077('0x4e')](_0x2027f7[_0xe077('0x49')]['fields']));_0x2b8b1d['attributes']=_0x2b8b1d[_0xe077('0x4d')]['length']?_0x2b8b1d[_0xe077('0x4d')]:_0x58e527[_0xe077('0x48')];_0x2b8b1d[_0xe077('0x51')]=qs[_0xe077('0x52')](_0x2027f7[_0xe077('0x49')][_0xe077('0x52')]);_0x2b8b1d[_0xe077('0x53')]=qs[_0xe077('0x4b')](_[_0xe077('0x54')](_0x2027f7[_0xe077('0x49')],_0x58e527[_0xe077('0x4b')]));if(_0x2027f7[_0xe077('0x49')]['filter']){_0x2b8b1d[_0xe077('0x53')]=_[_0xe077('0x57')](_0x2b8b1d[_0xe077('0x53')],{'$or':_['map'](_0x2b8b1d['attributes'],function(_0x4457bc){var _0x595fa4={};_0x595fa4[_0x4457bc]={'$like':'%'+_0x2027f7['query'][_0xe077('0x55')]+'%'};return _0x595fa4;})});}_0x2b8b1d=_[_0xe077('0x57')]({},_0x2b8b1d,_0x2027f7[_0xe077('0x58')]);return _0xae1aad['getAgents'](_0x2b8b1d);}})[_0xe077('0x26')](function(_0x266f66){if(_0x266f66){_0x33d819=_0x266f66[_0xe077('0x4f')];if(!_0x2027f7[_0xe077('0x49')][_0xe077('0x6f')](_0xe077('0x50'))){_0x2b8b1d[_0xe077('0x36')]=qs[_0xe077('0x36')](_0x2027f7[_0xe077('0x49')][_0xe077('0x36')]);_0x2b8b1d[_0xe077('0x35')]=qs['offset'](_0x2027f7[_0xe077('0x49')][_0xe077('0x35')]);}return _0xae1aad['getAgents'](_0x2b8b1d);}})['then'](function(_0x420d7c){if(_0x420d7c){return _0x420d7c?{'count':_0x33d819,'rows':_0x420d7c}:null;}})[_0xe077('0x26')](respondWithResult(_0x223f3d,null))[_0xe077('0x5d')](handleError(_0x223f3d,null));};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js
index da55350..7310123 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 _0x5f2f=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatQueue','setMaxListeners','save','update'];(function(_0x1d0157,_0xb987f1){var _0x4829af=function(_0x1ea1d2){while(--_0x1ea1d2){_0x1d0157['push'](_0x1d0157['shift']());}};_0x4829af(++_0xb987f1);}(_0x5f2f,0x73));var _0xf5f2=function(_0x2b792f,_0x5746f1){_0x2b792f=_0x2b792f-0x0;var _0x17a2cc=_0x5f2f[_0x2b792f];return _0x17a2cc;};'use strict';var EventEmitter=require(_0xf5f2('0x0'));var ChatQueue=require(_0xf5f2('0x1'))['db'][_0xf5f2('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0xf5f2('0x3')](0x0);var events={'afterCreate':_0xf5f2('0x4'),'afterUpdate':_0xf5f2('0x5'),'afterDestroy':_0xf5f2('0x6')};function emitEvent(_0x107cf){return function(_0x501fbd,_0x4854b6,_0x1665c7){ChatQueueEvents[_0xf5f2('0x7')](_0x107cf+':'+_0x501fbd['id'],_0x501fbd);ChatQueueEvents[_0xf5f2('0x7')](_0x107cf,_0x501fbd);_0x1665c7(null);};}for(var e in events){if(events[_0xf5f2('0x8')](e)){var event=events[e];ChatQueue[_0xf5f2('0x9')](e,emitEvent(event));}}module[_0xf5f2('0xa')]=ChatQueueEvents;
\ No newline at end of file
+var _0xb10b=['hasOwnProperty','hook','events','ChatQueue','setMaxListeners','save','remove','emit'];(function(_0x395b19,_0x3c652d){var _0x3ad823=function(_0x3562e4){while(--_0x3562e4){_0x395b19['push'](_0x395b19['shift']());}};_0x3ad823(++_0x3c652d);}(_0xb10b,0x12a));var _0xbb10=function(_0x4a209a,_0x575ff9){_0x4a209a=_0x4a209a-0x0;var _0x4b3c20=_0xb10b[_0x4a209a];return _0x4b3c20;};'use strict';var EventEmitter=require(_0xbb10('0x0'));var ChatQueue=require('../../mysqldb')['db'][_0xbb10('0x1')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0xbb10('0x2')](0x0);var events={'afterCreate':_0xbb10('0x3'),'afterUpdate':'update','afterDestroy':_0xbb10('0x4')};function emitEvent(_0x9bbed){return function(_0x460981,_0x22320e,_0x49baf4){ChatQueueEvents[_0xbb10('0x5')](_0x9bbed+':'+_0x460981['id'],_0x460981);ChatQueueEvents['emit'](_0x9bbed,_0x460981);_0x49baf4(null);};}for(var e in events){if(events[_0xbb10('0x6')](e)){var event=events[e];ChatQueue[_0xbb10('0x7')](e,emitEvent(event));}}module['exports']=ChatQueueEvents;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js
index c699c91..f8720da 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 _0xe3bd=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','ChatQueue','lodash','util','../../config/logger'];(function(_0x1c732c,_0x462de1){var _0x37177f=function(_0x3307e4){while(--_0x3307e4){_0x1c732c['push'](_0x1c732c['shift']());}};_0x37177f(++_0x462de1);}(_0xe3bd,0x1d1));var _0xde3b=function(_0x4c1ec2,_0x4f42b7){_0x4c1ec2=_0x4c1ec2-0x0;var _0x3f6f1c=_0xe3bd[_0x4c1ec2];return _0x3f6f1c;};'use strict';var _=require(_0xde3b('0x0'));var util=require(_0xde3b('0x1'));var logger=require(_0xde3b('0x2'))(_0xde3b('0x3'));var moment=require(_0xde3b('0x4'));var BPromise=require(_0xde3b('0x5'));var rp=require(_0xde3b('0x6'));var fs=require('fs');var path=require(_0xde3b('0x7'));var rimraf=require(_0xde3b('0x8'));var config=require(_0xde3b('0x9'));var attributes=require('./chatQueue.attributes');module[_0xde3b('0xa')]=function(_0x26c26d,_0x324878){return _0x26c26d[_0xde3b('0xb')](_0xde3b('0xc'),attributes,{'tableName':'chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6410=['../../config/environment','./chatQueue.attributes','exports','define','ChatQueue','chat_queues','lodash','util','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x45c8a9,_0x3b8cc5){var _0x1f51d1=function(_0x1548a5){while(--_0x1548a5){_0x45c8a9['push'](_0x45c8a9['shift']());}};_0x1f51d1(++_0x3b8cc5);}(_0x6410,0xae));var _0x0641=function(_0xabdc6d,_0x9bb811){_0xabdc6d=_0xabdc6d-0x0;var _0x449c6b=_0x6410[_0xabdc6d];return _0x449c6b;};'use strict';var _=require(_0x0641('0x0'));var util=require(_0x0641('0x1'));var logger=require('../../config/logger')(_0x0641('0x2'));var moment=require(_0x0641('0x3'));var BPromise=require(_0x0641('0x4'));var rp=require(_0x0641('0x5'));var fs=require('fs');var path=require(_0x0641('0x6'));var rimraf=require(_0x0641('0x7'));var config=require(_0x0641('0x8'));var attributes=require(_0x0641('0x9'));module[_0x0641('0xa')]=function(_0x146c0b,_0x320176){return _0x146c0b[_0x0641('0xb')](_0x0641('0xc'),attributes,{'tableName':_0x0641('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 2d080ad..7c3461b 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 _0x05e3=['where','attributes','limit','include','map','model','GetChatQueue','find','raw','ShowChatQueue','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','ChatQueue','findAll','options'];(function(_0x1f59d0,_0x37b7c1){var _0x2bc499=function(_0x5ba577){while(--_0x5ba577){_0x1f59d0['push'](_0x1f59d0['shift']());}};_0x2bc499(++_0x37b7c1);}(_0x05e3,0x86));var _0x305e=function(_0x446f11,_0x95cf21){_0x446f11=_0x446f11-0x0;var _0x385cb5=_0x05e3[_0x446f11];return _0x385cb5;};'use strict';var _=require(_0x305e('0x0'));var util=require(_0x305e('0x1'));var moment=require(_0x305e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x305e('0x3'));var db=require(_0x305e('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x305e('0x5'))(_0x305e('0x6'));var config=require('../../config/environment');var jayson=require(_0x305e('0x7'));var client=jayson[_0x305e('0x8')][_0x305e('0x9')]({'port':0x232a});config[_0x305e('0xa')]=_[_0x305e('0xb')](config[_0x305e('0xa')],{'host':_0x305e('0xc'),'port':0x18eb});var socket=require(_0x305e('0xd'))(new Redis(config['redis']));require(_0x305e('0xe'))['register'](socket);function respondWithRpcPromise(_0x2579f6,_0x768a4a,_0x557e21){return new BPromise(function(_0x38ead1,_0x2d92d5){return client[_0x305e('0xf')](_0x2579f6,_0x557e21)[_0x305e('0x10')](function(_0x3bba0e){logger[_0x305e('0x11')](_0x305e('0x12'),_0x768a4a,_0x305e('0x13'));logger[_0x305e('0x14')](_0x305e('0x15'),_0x768a4a,_0x305e('0x13'),JSON[_0x305e('0x16')](_0x3bba0e));if(_0x3bba0e['error']){if(_0x3bba0e[_0x305e('0x17')][_0x305e('0x18')]===0x1f4){logger['error'](_0x305e('0x12'),_0x768a4a,_0x3bba0e[_0x305e('0x17')][_0x305e('0x19')]);return _0x2d92d5(_0x3bba0e[_0x305e('0x17')][_0x305e('0x19')]);}logger[_0x305e('0x17')](_0x305e('0x12'),_0x768a4a,_0x3bba0e['error'][_0x305e('0x19')]);return _0x38ead1(_0x3bba0e[_0x305e('0x17')]['message']);}else{logger[_0x305e('0x11')](_0x305e('0x12'),_0x768a4a,_0x305e('0x13'));_0x38ead1(_0x3bba0e[_0x305e('0x1a')][_0x305e('0x19')]);}})['catch'](function(_0x55f0fb){logger['error']('ChatQueue,\x20%s,\x20%s',_0x768a4a,_0x55f0fb);_0x2d92d5(_0x55f0fb);});});}exports['GetChatQueue']=function(_0x567ccd){var _0x498c44=this;return new Promise(function(_0x5dd25f,_0x2f8b4f){return db[_0x305e('0x1b')][_0x305e('0x1c')]({'raw':_0x567ccd[_0x305e('0x1d')]?_0x567ccd[_0x305e('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x567ccd[_0x305e('0x1d')]?_0x567ccd['options'][_0x305e('0x1e')]||null:null,'attributes':_0x567ccd[_0x305e('0x1d')]?_0x567ccd['options'][_0x305e('0x1f')]||null:null,'limit':_0x567ccd[_0x305e('0x1d')]?_0x567ccd[_0x305e('0x1d')][_0x305e('0x20')]||null:null,'include':_0x567ccd[_0x305e('0x1d')]?_0x567ccd[_0x305e('0x1d')][_0x305e('0x21')]?_[_0x305e('0x22')](_0x567ccd[_0x305e('0x1d')]['include'],function(_0x5e9aea){return{'model':db[_0x5e9aea[_0x305e('0x23')]],'as':_0x5e9aea['as'],'attributes':_0x5e9aea[_0x305e('0x1f')],'include':_0x5e9aea[_0x305e('0x21')]?_[_0x305e('0x22')](_0x5e9aea[_0x305e('0x21')],function(_0x56683b){return{'model':db[_0x56683b['model']],'as':_0x56683b['as'],'attributes':_0x56683b[_0x305e('0x1f')],'include':_0x56683b[_0x305e('0x21')]?_[_0x305e('0x22')](_0x56683b[_0x305e('0x21')],function(_0x3919ec){return{'model':db[_0x3919ec['model']],'as':_0x3919ec['as'],'attributes':_0x3919ec['attributes']};}):[]};}):[]};}):[]:[]})[_0x305e('0x10')](function(_0x18841a){logger[_0x305e('0x11')](_0x305e('0x24'),_0x567ccd);logger['debug'](_0x305e('0x24'),_0x567ccd,JSON[_0x305e('0x16')](_0x18841a));_0x5dd25f(_0x18841a);})['catch'](function(_0x90cbd1){logger[_0x305e('0x17')](_0x305e('0x24'),_0x90cbd1[_0x305e('0x19')],_0x567ccd);_0x2f8b4f(_0x498c44[_0x305e('0x17')](0x1f4,_0x90cbd1['message']));});});};exports['ShowChatQueue']=function(_0x309d98){var _0x35b649=this;return new Promise(function(_0x4929d8,_0x57d249){return db[_0x305e('0x1b')][_0x305e('0x25')]({'raw':_0x309d98[_0x305e('0x1d')]?_0x309d98['options'][_0x305e('0x26')]===undefined?!![]:![]:!![],'where':_0x309d98['options']?_0x309d98[_0x305e('0x1d')][_0x305e('0x1e')]||null:null,'attributes':_0x309d98[_0x305e('0x1d')]?_0x309d98[_0x305e('0x1d')][_0x305e('0x1f')]||null:null,'include':_0x309d98[_0x305e('0x1d')]?_0x309d98[_0x305e('0x1d')]['include']?_[_0x305e('0x22')](_0x309d98[_0x305e('0x1d')][_0x305e('0x21')],function(_0x11d87e){return{'model':db[_0x11d87e[_0x305e('0x23')]],'as':_0x11d87e['as'],'attributes':_0x11d87e['attributes'],'include':_0x11d87e[_0x305e('0x21')]?_['map'](_0x11d87e[_0x305e('0x21')],function(_0x35a8c0){return{'model':db[_0x35a8c0[_0x305e('0x23')]],'as':_0x35a8c0['as'],'attributes':_0x35a8c0[_0x305e('0x1f')],'include':_0x35a8c0[_0x305e('0x21')]?_[_0x305e('0x22')](_0x35a8c0[_0x305e('0x21')],function(_0x13b0fd){return{'model':db[_0x13b0fd[_0x305e('0x23')]],'as':_0x13b0fd['as'],'attributes':_0x13b0fd[_0x305e('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x305e('0x10')](function(_0x5c454a){logger[_0x305e('0x11')](_0x305e('0x27'),_0x309d98);logger[_0x305e('0x14')](_0x305e('0x27'),_0x309d98,JSON[_0x305e('0x16')](_0x5c454a));_0x4929d8(_0x5c454a);})[_0x305e('0x28')](function(_0x37b687){logger[_0x305e('0x17')](_0x305e('0x27'),_0x37b687[_0x305e('0x19')],_0x309d98);_0x57d249(_0x35b649[_0x305e('0x17')](0x1f4,_0x37b687[_0x305e('0x19')]));});});};
\ No newline at end of file
+var _0x1f20=['request\x20sent','stringify','error','code','message','result','catch','GetChatQueue','ChatQueue','findAll','options','raw','where','attributes','include','model','ShowChatQueue','map','lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','then','info','ChatQueue,\x20%s,\x20%s','debug','ChatQueue,\x20%s,\x20%s,\x20%s'];(function(_0x1ff966,_0x41fbff){var _0x40cea2=function(_0xce21c4){while(--_0xce21c4){_0x1ff966['push'](_0x1ff966['shift']());}};_0x40cea2(++_0x41fbff);}(_0x1f20,0x11c));var _0x01f2=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x1f20[_0xfae23b];return _0x200640;};'use strict';var _=require(_0x01f2('0x0'));var util=require(_0x01f2('0x1'));var moment=require('moment');var BPromise=require(_0x01f2('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x01f2('0x3'));var db=require(_0x01f2('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x01f2('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x01f2('0x6'));var client=jayson[_0x01f2('0x7')][_0x01f2('0x8')]({'port':0x232a});config[_0x01f2('0x9')]=_[_0x01f2('0xa')](config[_0x01f2('0x9')],{'host':_0x01f2('0xb'),'port':0x18eb});var socket=require(_0x01f2('0xc'))(new Redis(config[_0x01f2('0x9')]));require(_0x01f2('0xd'))[_0x01f2('0xe')](socket);function respondWithRpcPromise(_0xd7815a,_0x33fd40,_0x497a3a){return new BPromise(function(_0x30abe8,_0x4a56a5){return client['request'](_0xd7815a,_0x497a3a)[_0x01f2('0xf')](function(_0xe57cbe){logger[_0x01f2('0x10')](_0x01f2('0x11'),_0x33fd40,'request\x20sent');logger[_0x01f2('0x12')](_0x01f2('0x13'),_0x33fd40,_0x01f2('0x14'),JSON[_0x01f2('0x15')](_0xe57cbe));if(_0xe57cbe['error']){if(_0xe57cbe[_0x01f2('0x16')][_0x01f2('0x17')]===0x1f4){logger[_0x01f2('0x16')]('ChatQueue,\x20%s,\x20%s',_0x33fd40,_0xe57cbe[_0x01f2('0x16')]['message']);return _0x4a56a5(_0xe57cbe[_0x01f2('0x16')][_0x01f2('0x18')]);}logger[_0x01f2('0x16')]('ChatQueue,\x20%s,\x20%s',_0x33fd40,_0xe57cbe[_0x01f2('0x16')]['message']);return _0x30abe8(_0xe57cbe['error'][_0x01f2('0x18')]);}else{logger[_0x01f2('0x10')](_0x01f2('0x11'),_0x33fd40,_0x01f2('0x14'));_0x30abe8(_0xe57cbe[_0x01f2('0x19')]['message']);}})[_0x01f2('0x1a')](function(_0x42a224){logger[_0x01f2('0x16')](_0x01f2('0x11'),_0x33fd40,_0x42a224);_0x4a56a5(_0x42a224);});});}exports[_0x01f2('0x1b')]=function(_0x136f5e){var _0x5e7a9a=this;return new Promise(function(_0x3cac5a,_0xf56702){return db[_0x01f2('0x1c')][_0x01f2('0x1d')]({'raw':_0x136f5e[_0x01f2('0x1e')]?_0x136f5e[_0x01f2('0x1e')][_0x01f2('0x1f')]===undefined?!![]:![]:!![],'where':_0x136f5e[_0x01f2('0x1e')]?_0x136f5e[_0x01f2('0x1e')][_0x01f2('0x20')]||null:null,'attributes':_0x136f5e[_0x01f2('0x1e')]?_0x136f5e[_0x01f2('0x1e')][_0x01f2('0x21')]||null:null,'limit':_0x136f5e['options']?_0x136f5e['options']['limit']||null:null,'include':_0x136f5e['options']?_0x136f5e['options'][_0x01f2('0x22')]?_['map'](_0x136f5e[_0x01f2('0x1e')][_0x01f2('0x22')],function(_0x4b4958){return{'model':db[_0x4b4958[_0x01f2('0x23')]],'as':_0x4b4958['as'],'attributes':_0x4b4958['attributes'],'include':_0x4b4958[_0x01f2('0x22')]?_['map'](_0x4b4958[_0x01f2('0x22')],function(_0x510bdb){return{'model':db[_0x510bdb['model']],'as':_0x510bdb['as'],'attributes':_0x510bdb[_0x01f2('0x21')],'include':_0x510bdb[_0x01f2('0x22')]?_['map'](_0x510bdb[_0x01f2('0x22')],function(_0x3c2e83){return{'model':db[_0x3c2e83[_0x01f2('0x23')]],'as':_0x3c2e83['as'],'attributes':_0x3c2e83[_0x01f2('0x21')]};}):[]};}):[]};}):[]:[]})[_0x01f2('0xf')](function(_0x13c51a){logger['info'](_0x01f2('0x1b'),_0x136f5e);logger[_0x01f2('0x12')](_0x01f2('0x1b'),_0x136f5e,JSON[_0x01f2('0x15')](_0x13c51a));_0x3cac5a(_0x13c51a);})[_0x01f2('0x1a')](function(_0x57d333){logger['error'](_0x01f2('0x1b'),_0x57d333['message'],_0x136f5e);_0xf56702(_0x5e7a9a['error'](0x1f4,_0x57d333[_0x01f2('0x18')]));});});};exports[_0x01f2('0x24')]=function(_0x258786){var _0xd23135=this;return new Promise(function(_0x2a8d55,_0x5db326){return db[_0x01f2('0x1c')]['find']({'raw':_0x258786[_0x01f2('0x1e')]?_0x258786[_0x01f2('0x1e')][_0x01f2('0x1f')]===undefined?!![]:![]:!![],'where':_0x258786[_0x01f2('0x1e')]?_0x258786[_0x01f2('0x1e')][_0x01f2('0x20')]||null:null,'attributes':_0x258786['options']?_0x258786[_0x01f2('0x1e')]['attributes']||null:null,'include':_0x258786[_0x01f2('0x1e')]?_0x258786[_0x01f2('0x1e')][_0x01f2('0x22')]?_[_0x01f2('0x25')](_0x258786[_0x01f2('0x1e')][_0x01f2('0x22')],function(_0x201dc4){return{'model':db[_0x201dc4[_0x01f2('0x23')]],'as':_0x201dc4['as'],'attributes':_0x201dc4[_0x01f2('0x21')],'include':_0x201dc4[_0x01f2('0x22')]?_[_0x01f2('0x25')](_0x201dc4[_0x01f2('0x22')],function(_0x8f4c6c){return{'model':db[_0x8f4c6c[_0x01f2('0x23')]],'as':_0x8f4c6c['as'],'attributes':_0x8f4c6c['attributes'],'include':_0x8f4c6c[_0x01f2('0x22')]?_[_0x01f2('0x25')](_0x8f4c6c[_0x01f2('0x22')],function(_0x59de04){return{'model':db[_0x59de04[_0x01f2('0x23')]],'as':_0x59de04['as'],'attributes':_0x59de04[_0x01f2('0x21')]};}):[]};}):[]};}):[]:[]})[_0x01f2('0xf')](function(_0x371271){logger[_0x01f2('0x10')](_0x01f2('0x24'),_0x258786);logger[_0x01f2('0x12')](_0x01f2('0x24'),_0x258786,JSON['stringify'](_0x371271));_0x2a8d55(_0x371271);})['catch'](function(_0x228c7d){logger['error'](_0x01f2('0x24'),_0x228c7d['message'],_0x258786);_0x5db326(_0xd23135[_0x01f2('0x16')](0x1f4,_0x228c7d[_0x01f2('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js
index 50a9450..44b01ef 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 _0xbaf0=['removeListener','register','length','chatQueue:','save','remove','update'];(function(_0x5b8119,_0x5145b1){var _0x982623=function(_0x441a4b){while(--_0x441a4b){_0x5b8119['push'](_0x5b8119['shift']());}};_0x982623(++_0x5145b1);}(_0xbaf0,0x12a));var _0x0baf=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xbaf0[_0x501510];return _0x1e6ee5;};'use strict';var ChatQueueEvents=require('./chatQueue.events');var events=[_0x0baf('0x0'),_0x0baf('0x1'),_0x0baf('0x2')];function createListener(_0x263f79,_0x1688bc){return function(_0x4d2e72){_0x1688bc['emit'](_0x263f79,_0x4d2e72);};}function removeListener(_0x232cc7,_0x1c383e){return function(){ChatQueueEvents[_0x0baf('0x3')](_0x232cc7,_0x1c383e);};}exports[_0x0baf('0x4')]=function(_0xe4c3c4){for(var _0x335e24=0x0,_0x1a10b1=events[_0x0baf('0x5')];_0x335e24<_0x1a10b1;_0x335e24++){var _0x1d0a0d=events[_0x335e24];var _0x5f5030=createListener(_0x0baf('0x6')+_0x1d0a0d,_0xe4c3c4);ChatQueueEvents['on'](_0x1d0a0d,_0x5f5030);}};
\ No newline at end of file
+var _0x0b0e=['chatQueue:','./chatQueue.events','remove','emit','removeListener','register'];(function(_0xc6cc4b,_0x46eac6){var _0x267861=function(_0x5b13f9){while(--_0x5b13f9){_0xc6cc4b['push'](_0xc6cc4b['shift']());}};_0x267861(++_0x46eac6);}(_0x0b0e,0x187));var _0xe0b0=function(_0xae282f,_0x2d9368){_0xae282f=_0xae282f-0x0;var _0x5f46d4=_0x0b0e[_0xae282f];return _0x5f46d4;};'use strict';var ChatQueueEvents=require(_0xe0b0('0x0'));var events=['save',_0xe0b0('0x1'),'update'];function createListener(_0x7e5a8a,_0xdf715e){return function(_0x3b5e2b){_0xdf715e[_0xe0b0('0x2')](_0x7e5a8a,_0x3b5e2b);};}function removeListener(_0x28040c,_0x38a058){return function(){ChatQueueEvents[_0xe0b0('0x3')](_0x28040c,_0x38a058);};}exports[_0xe0b0('0x4')]=function(_0x30e20d){for(var _0x28e40f=0x0,_0x219b1c=events['length'];_0x28e40f<_0x219b1c;_0x28e40f++){var _0x50be7f=events[_0x28e40f];var _0x11effc=createListener(_0xe0b0('0x5')+_0x50be7f,_0x30e20d);ChatQueueEvents['on'](_0x50be7f,_0x11effc);}};
\ No newline at end of file
diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js
index 42dbce7..196fdbb 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 _0xec55=['get','isAuthenticated','index','/describe','describe','/:id','/:id/members','getTeams','/:id/users','getAgents','post','create','addAgents','put','update','delete','destroy','/:id/teams','removeTeams','removeAgents','exports','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueue.controller'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0xec55,0x123));var _0x5ec5=function(_0x19b8dd,_0x407c82){_0x19b8dd=_0x19b8dd-0x0;var _0x37cee3=_0xec55[_0x19b8dd];return _0x37cee3;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x5ec5('0x0'));var timeout=require('connect-timeout');var express=require(_0x5ec5('0x1'));var router=express['Router']();var auth=require(_0x5ec5('0x2'));var interaction=require(_0x5ec5('0x3'));var config=require(_0x5ec5('0x4'));var controller=require(_0x5ec5('0x5'));router[_0x5ec5('0x6')]('/',auth[_0x5ec5('0x7')](),controller[_0x5ec5('0x8')]);router[_0x5ec5('0x6')](_0x5ec5('0x9'),auth[_0x5ec5('0x7')](),controller[_0x5ec5('0xa')]);router[_0x5ec5('0x6')](_0x5ec5('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x5ec5('0x6')](_0x5ec5('0xc'),auth[_0x5ec5('0x7')](),controller['getMembers']);router[_0x5ec5('0x6')]('/:id/teams',auth[_0x5ec5('0x7')](),controller[_0x5ec5('0xd')]);router[_0x5ec5('0x6')](_0x5ec5('0xe'),auth[_0x5ec5('0x7')](),controller[_0x5ec5('0xf')]);router[_0x5ec5('0x10')]('/',auth['isAuthenticated'](),controller[_0x5ec5('0x11')]);router['post']('/:id/teams',auth[_0x5ec5('0x7')](),controller['addTeams']);router[_0x5ec5('0x10')](_0x5ec5('0xe'),auth[_0x5ec5('0x7')](),controller[_0x5ec5('0x12')]);router[_0x5ec5('0x13')](_0x5ec5('0xb'),auth['isAuthenticated'](),controller[_0x5ec5('0x14')]);router[_0x5ec5('0x15')](_0x5ec5('0xb'),auth[_0x5ec5('0x7')](),controller[_0x5ec5('0x16')]);router[_0x5ec5('0x15')](_0x5ec5('0x17'),auth['isAuthenticated'](),controller[_0x5ec5('0x18')]);router['delete'](_0x5ec5('0xe'),auth[_0x5ec5('0x7')](),controller[_0x5ec5('0x19')]);module[_0x5ec5('0x1a')]=router;
\ No newline at end of file
+var _0x08b3=['multer','connect-timeout','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','getMembers','getTeams','/:id/users','getAgents','post','create','/:id/teams','addTeams','/:id','update','delete','removeTeams','removeAgents','exports'];(function(_0x39d625,_0xcbd247){var _0x45bafa=function(_0x40f316){while(--_0x40f316){_0x39d625['push'](_0x39d625['shift']());}};_0x45bafa(++_0xcbd247);}(_0x08b3,0x1e4));var _0x308b=function(_0x3fadcf,_0x53075a){_0x3fadcf=_0x3fadcf-0x0;var _0x32501c=_0x08b3[_0x3fadcf];return _0x32501c;};'use strict';var multer=require(_0x308b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x308b('0x1'));var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x308b('0x2'));var config=require(_0x308b('0x3'));var controller=require('./chatQueue.controller');router[_0x308b('0x4')]('/',auth[_0x308b('0x5')](),controller['index']);router['get'](_0x308b('0x6'),auth[_0x308b('0x5')](),controller[_0x308b('0x7')]);router[_0x308b('0x4')]('/:id',auth[_0x308b('0x5')](),controller['show']);router['get']('/:id/members',auth['isAuthenticated'](),controller[_0x308b('0x8')]);router[_0x308b('0x4')]('/:id/teams',auth[_0x308b('0x5')](),controller[_0x308b('0x9')]);router['get'](_0x308b('0xa'),auth[_0x308b('0x5')](),controller[_0x308b('0xb')]);router[_0x308b('0xc')]('/',auth['isAuthenticated'](),controller[_0x308b('0xd')]);router[_0x308b('0xc')](_0x308b('0xe'),auth[_0x308b('0x5')](),controller[_0x308b('0xf')]);router[_0x308b('0xc')](_0x308b('0xa'),auth[_0x308b('0x5')](),controller['addAgents']);router['put'](_0x308b('0x10'),auth[_0x308b('0x5')](),controller[_0x308b('0x11')]);router[_0x308b('0x12')](_0x308b('0x10'),auth['isAuthenticated'](),controller['destroy']);router[_0x308b('0x12')](_0x308b('0xe'),auth[_0x308b('0x5')](),controller[_0x308b('0x13')]);router['delete'](_0x308b('0xa'),auth[_0x308b('0x5')](),controller[_0x308b('0x14')]);module[_0x308b('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js
index 7f1b024..78108e0 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 _0x5e0d=['exports','STRING','DATE','sequelize'];(function(_0x19848,_0x1095a7){var _0x54f569=function(_0x484aed){while(--_0x484aed){_0x19848['push'](_0x19848['shift']());}};_0x54f569(++_0x1095a7);}(_0x5e0d,0x137));var _0xd5e0=function(_0x8ba19a,_0x1d2b2b){_0x8ba19a=_0x8ba19a-0x0;var _0x2bd8b4=_0x5e0d[_0x8ba19a];return _0x2bd8b4;};'use strict';var moment=require('moment');var Sequelize=require(_0xd5e0('0x0'));module[_0xd5e0('0x1')]={'uniqueid':{'type':Sequelize[_0xd5e0('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0xd5e0('0x2')]},'joinAt':{'type':Sequelize[_0xd5e0('0x3')]},'leaveAt':{'type':Sequelize[_0xd5e0('0x3')]},'acceptAt':{'type':Sequelize[_0xd5e0('0x3')]},'exitAt':{'type':Sequelize[_0xd5e0('0x3')]},'reason':{'type':Sequelize[_0xd5e0('0x2')]}};
\ No newline at end of file
+var _0x8600=['STRING','DATE','moment','sequelize'];(function(_0x4424e6,_0x5ad64a){var _0x311b68=function(_0x4a2575){while(--_0x4a2575){_0x4424e6['push'](_0x4424e6['shift']());}};_0x311b68(++_0x5ad64a);}(_0x8600,0x19e));var _0x0860=function(_0x59d89e,_0x55edf5){_0x59d89e=_0x59d89e-0x0;var _0x554e93=_0x8600[_0x59d89e];return _0x554e93;};'use strict';var moment=require(_0x0860('0x0'));var Sequelize=require(_0x0860('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x0860('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x0860('0x2')]},'joinAt':{'type':Sequelize[_0x0860('0x3')]},'leaveAt':{'type':Sequelize[_0x0860('0x3')]},'acceptAt':{'type':Sequelize[_0x0860('0x3')]},'exitAt':{'type':Sequelize[_0x0860('0x3')]},'reason':{'type':Sequelize[_0x0860('0x2')]}};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js
index 152caf8..786c0eb 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 _0x1780=['params','intersection','options','create','body','update','find','destroy','eml-format','rimraf','zip-dir','moment','bluebird','path','to-csv','ejs','lodash','squel','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','reject','save','then','error','stack','name','map','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','fields','hasOwnProperty','nolimit','order','where','merge','VIRTUAL','ChatQueueReport','includeAll','include','rows','catch'];(function(_0x273c39,_0x1052e6){var _0x46d6b5=function(_0x44f1fb){while(--_0x44f1fb){_0x273c39['push'](_0x273c39['shift']());}};_0x46d6b5(++_0x1052e6);}(_0x1780,0x104));var _0x0178=function(_0x151c3a,_0x36d223){_0x151c3a=_0x151c3a-0x0;var _0x3ec1e0=_0x1780[_0x151c3a];return _0x3ec1e0;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x0178('0x0'));var rimraf=require(_0x0178('0x1'));var zipdir=require(_0x0178('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0178('0x3'));var BPromise=require(_0x0178('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x0178('0x5'));var sox=require('sox');var csv=require(_0x0178('0x6'));var ejs=require(_0x0178('0x7'));var fs=require('fs');var _=require(_0x0178('0x8'));var squel=require(_0x0178('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x0178('0x6'));var querystring=require('querystring');var Papa=require(_0x0178('0xa'));var Redis=require(_0x0178('0xb'));var authService=require(_0x0178('0xc'));var qs=require(_0x0178('0xd'));var as=require(_0x0178('0xe'));var hardwareService=require(_0x0178('0xf'));var logger=require(_0x0178('0x10'))('api');var utils=require(_0x0178('0x11'));var config=require(_0x0178('0x12'));var db=require(_0x0178('0x13'))['db'];function respondWithStatusCode(_0x3e1656,_0x268f49){_0x268f49=_0x268f49||0xcc;return function(_0x170c8b){if(_0x170c8b){return _0x3e1656[_0x0178('0x14')](_0x268f49);}return _0x3e1656[_0x0178('0x15')](_0x268f49)[_0x0178('0x16')]();};}function respondWithResult(_0x140777,_0x38e3d6){_0x38e3d6=_0x38e3d6||0xc8;return function(_0x1797b4){if(_0x1797b4){return _0x140777[_0x0178('0x15')](_0x38e3d6)[_0x0178('0x17')](_0x1797b4);}};}function respondWithFilteredResult(_0x3d6629,_0x55a485){return function(_0x24d7e4){if(_0x24d7e4){var _0x570fe7=_0x24d7e4[_0x0178('0x18')],_0x255de6=_0x55a485[_0x0178('0x19')],_0x376e27=_0x55a485['offset']+_0x55a485[_0x0178('0x1a')],_0x818d6a;if(_0x376e27>=_0x570fe7){_0x376e27=_0x570fe7;_0x818d6a=0xc8;}else{_0x818d6a=0xce;}_0x3d6629[_0x0178('0x15')](_0x818d6a);return _0x3d6629['set']('Content-Range',_0x255de6+'-'+_0x376e27+'/'+_0x570fe7)[_0x0178('0x17')](_0x24d7e4);}return null;};}function patchUpdates(_0x4b2c22){return function(_0x58cb9b){try{jsonpatch['apply'](_0x58cb9b,_0x4b2c22,!![]);}catch(_0x448b41){return BPromise[_0x0178('0x1b')](_0x448b41);}return _0x58cb9b[_0x0178('0x1c')]();};}function saveUpdates(_0x31fe41,_0x1cedf4){return function(_0x51435d){if(_0x51435d){return _0x51435d['update'](_0x31fe41)[_0x0178('0x1d')](function(_0x4be331){return _0x4be331;});}return null;};}function removeEntity(_0x41d6ff,_0xe0678c){return function(_0x21e35e){if(_0x21e35e){return _0x21e35e['destroy']()[_0x0178('0x1d')](function(){_0x41d6ff[_0x0178('0x15')](0xcc)[_0x0178('0x16')]();});}};}function handleEntityNotFound(_0x51b228,_0x43d2ea){return function(_0x904236){if(!_0x904236){_0x51b228[_0x0178('0x14')](0x194);}return _0x904236;};}function handleError(_0x5caa67,_0x3cf5cd){_0x3cf5cd=_0x3cf5cd||0x1f4;return function(_0x1ad774){logger[_0x0178('0x1e')](_0x1ad774[_0x0178('0x1f')]);if(_0x1ad774[_0x0178('0x20')]){delete _0x1ad774[_0x0178('0x20')];}_0x5caa67[_0x0178('0x15')](_0x3cf5cd)['send'](_0x1ad774);};}exports['index']=function(_0x3018e1,_0x2e8aed){var _0x345368={},_0x4cd8d5={},_0x49d99e={'count':0x0,'rows':[]};var _0x10c654=_[_0x0178('0x21')](db['ChatQueueReport'][_0x0178('0x22')],function(_0x4a3d71){return{'name':_0x4a3d71[_0x0178('0x23')],'type':_0x4a3d71[_0x0178('0x24')][_0x0178('0x25')]};});_0x4cd8d5[_0x0178('0x26')]=_[_0x0178('0x21')](_0x10c654,_0x0178('0x20'));_0x4cd8d5[_0x0178('0x27')]=_[_0x0178('0x28')](_0x3018e1[_0x0178('0x27')]);_0x4cd8d5[_0x0178('0x29')]=_['intersection'](_0x4cd8d5[_0x0178('0x26')],_0x4cd8d5[_0x0178('0x27')]);_0x345368[_0x0178('0x2a')]=_['intersection'](_0x4cd8d5[_0x0178('0x26')],qs[_0x0178('0x2b')](_0x3018e1[_0x0178('0x27')][_0x0178('0x2b')]));_0x345368[_0x0178('0x2a')]=_0x345368[_0x0178('0x2a')]['length']?_0x345368[_0x0178('0x2a')]:_0x4cd8d5[_0x0178('0x26')];if(!_0x3018e1[_0x0178('0x27')][_0x0178('0x2c')](_0x0178('0x2d'))){_0x345368[_0x0178('0x1a')]=qs[_0x0178('0x1a')](_0x3018e1[_0x0178('0x27')][_0x0178('0x1a')]);_0x345368[_0x0178('0x19')]=qs[_0x0178('0x19')](_0x3018e1['query'][_0x0178('0x19')]);}_0x345368[_0x0178('0x2e')]=qs['sort'](_0x3018e1[_0x0178('0x27')]['sort']);_0x345368[_0x0178('0x2f')]=qs[_0x0178('0x29')](_['pick'](_0x3018e1['query'],_0x4cd8d5[_0x0178('0x29')]));if(_0x3018e1[_0x0178('0x27')]['filter']){_0x345368[_0x0178('0x2f')]=_[_0x0178('0x30')](_0x345368[_0x0178('0x2f')],{'$or':_[_0x0178('0x21')](_0x10c654,function(_0x5c5799){if(_0x5c5799[_0x0178('0x24')]!==_0x0178('0x31')){var _0x8ead2={};_0x8ead2[_0x5c5799[_0x0178('0x20')]]={'$like':'%'+_0x3018e1[_0x0178('0x27')]['filter']+'%'};return _0x8ead2;}})});}_0x345368=_[_0x0178('0x30')]({},_0x345368,_0x3018e1['options']);var _0x4ba647={'where':_0x345368[_0x0178('0x2f')]};return db[_0x0178('0x32')][_0x0178('0x18')](_0x4ba647)[_0x0178('0x1d')](function(_0x478ba3){_0x49d99e[_0x0178('0x18')]=_0x478ba3;if(_0x3018e1[_0x0178('0x27')][_0x0178('0x33')]){_0x345368[_0x0178('0x34')]=[{'all':!![]}];}return db[_0x0178('0x32')]['findAll'](_0x345368);})[_0x0178('0x1d')](function(_0x5d23d1){_0x49d99e[_0x0178('0x35')]=_0x5d23d1;return _0x49d99e;})[_0x0178('0x1d')](respondWithFilteredResult(_0x2e8aed,_0x345368))[_0x0178('0x36')](handleError(_0x2e8aed,null));};exports['show']=function(_0x1e1504,_0x15bb74){var _0x2637cd={'raw':!![],'where':{'id':_0x1e1504[_0x0178('0x37')]['id']}},_0x249112={};_0x249112[_0x0178('0x26')]=_[_0x0178('0x28')](db[_0x0178('0x32')][_0x0178('0x22')]);_0x249112[_0x0178('0x27')]=_[_0x0178('0x28')](_0x1e1504[_0x0178('0x27')]);_0x249112[_0x0178('0x29')]=_[_0x0178('0x38')](_0x249112['model'],_0x249112[_0x0178('0x27')]);_0x2637cd[_0x0178('0x2a')]=_[_0x0178('0x38')](_0x249112[_0x0178('0x26')],qs[_0x0178('0x2b')](_0x1e1504[_0x0178('0x27')][_0x0178('0x2b')]));_0x2637cd[_0x0178('0x2a')]=_0x2637cd[_0x0178('0x2a')]['length']?_0x2637cd[_0x0178('0x2a')]:_0x249112['model'];if(_0x1e1504['query'][_0x0178('0x33')]){_0x2637cd['include']=[{'all':!![]}];}_0x2637cd=_[_0x0178('0x30')]({},_0x2637cd,_0x1e1504[_0x0178('0x39')]);return db['ChatQueueReport']['find'](_0x2637cd)[_0x0178('0x1d')](handleEntityNotFound(_0x15bb74,null))[_0x0178('0x1d')](respondWithResult(_0x15bb74,null))[_0x0178('0x36')](handleError(_0x15bb74,null));};exports['create']=function(_0x626608,_0x4dd286){return db[_0x0178('0x32')][_0x0178('0x3a')](_0x626608[_0x0178('0x3b')],{})[_0x0178('0x1d')](respondWithResult(_0x4dd286,0xc9))[_0x0178('0x36')](handleError(_0x4dd286,null));};exports[_0x0178('0x3c')]=function(_0x428063,_0x182579){if(_0x428063[_0x0178('0x3b')]['id']){delete _0x428063[_0x0178('0x3b')]['id'];}return db[_0x0178('0x32')][_0x0178('0x3d')]({'where':{'id':_0x428063[_0x0178('0x37')]['id']}})['then'](handleEntityNotFound(_0x182579,null))[_0x0178('0x1d')](saveUpdates(_0x428063[_0x0178('0x3b')],null))['then'](respondWithResult(_0x182579,null))[_0x0178('0x36')](handleError(_0x182579,null));};exports[_0x0178('0x3e')]=function(_0x1ba257,_0x1b3bb6){return db[_0x0178('0x32')][_0x0178('0x3d')]({'where':{'id':_0x1ba257['params']['id']}})['then'](handleEntityNotFound(_0x1b3bb6,null))['then'](removeEntity(_0x1b3bb6,null))[_0x0178('0x36')](handleError(_0x1b3bb6,null));};exports['describe']=function(_0x518833,_0x193dd0){return db[_0x0178('0x32')]['describe']()['then'](respondWithResult(_0x193dd0,null))['catch'](handleError(_0x193dd0,null));};
\ No newline at end of file
+var _0x2384=['fieldName','type','key','query','intersection','attributes','model','fields','hasOwnProperty','limit','offset','sort','filters','pick','filter','where','merge','findAll','rows','catch','show','params','keys','length','include','options','find','create','body','describe','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','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','map','ChatQueueReport','rawAttributes'];(function(_0x32869c,_0xd01545){var _0x136628=function(_0x198fbe){while(--_0x198fbe){_0x32869c['push'](_0x32869c['shift']());}};_0x136628(++_0xd01545);}(_0x2384,0x1ec));var _0x4238=function(_0xb4f3cc,_0xf0419e){_0xb4f3cc=_0xb4f3cc-0x0;var _0x51bfbd=_0x2384[_0xb4f3cc];return _0x51bfbd;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x4238('0x0'));var zipdir=require(_0x4238('0x1'));var jsonpatch=require(_0x4238('0x2'));var rp=require(_0x4238('0x3'));var moment=require(_0x4238('0x4'));var BPromise=require(_0x4238('0x5'));var Mustache=require(_0x4238('0x6'));var util=require(_0x4238('0x7'));var path=require('path');var sox=require(_0x4238('0x8'));var csv=require(_0x4238('0x9'));var ejs=require(_0x4238('0xa'));var fs=require('fs');var _=require(_0x4238('0xb'));var squel=require(_0x4238('0xc'));var crypto=require(_0x4238('0xd'));var jsforce=require(_0x4238('0xe'));var deskjs=require(_0x4238('0xf'));var toCsv=require(_0x4238('0x9'));var querystring=require(_0x4238('0x10'));var Papa=require(_0x4238('0x11'));var Redis=require(_0x4238('0x12'));var authService=require(_0x4238('0x13'));var qs=require(_0x4238('0x14'));var as=require(_0x4238('0x15'));var hardwareService=require(_0x4238('0x16'));var logger=require(_0x4238('0x17'))(_0x4238('0x18'));var utils=require(_0x4238('0x19'));var config=require(_0x4238('0x1a'));var db=require(_0x4238('0x1b'))['db'];function respondWithStatusCode(_0x49fe03,_0x526d73){_0x526d73=_0x526d73||0xcc;return function(_0x488198){if(_0x488198){return _0x49fe03[_0x4238('0x1c')](_0x526d73);}return _0x49fe03[_0x4238('0x1d')](_0x526d73)[_0x4238('0x1e')]();};}function respondWithResult(_0x176840,_0x225f05){_0x225f05=_0x225f05||0xc8;return function(_0x3a77da){if(_0x3a77da){return _0x176840[_0x4238('0x1d')](_0x225f05)[_0x4238('0x1f')](_0x3a77da);}};}function respondWithFilteredResult(_0xb9f7eb,_0xaf6fbe){return function(_0x9fb170){if(_0x9fb170){var _0x1a5688=_0x9fb170[_0x4238('0x20')],_0x422906=_0xaf6fbe['offset'],_0xfaaec=_0xaf6fbe['offset']+_0xaf6fbe['limit'],_0x40bdcd;if(_0xfaaec>=_0x1a5688){_0xfaaec=_0x1a5688;_0x40bdcd=0xc8;}else{_0x40bdcd=0xce;}_0xb9f7eb['status'](_0x40bdcd);return _0xb9f7eb[_0x4238('0x21')](_0x4238('0x22'),_0x422906+'-'+_0xfaaec+'/'+_0x1a5688)['json'](_0x9fb170);}return null;};}function patchUpdates(_0x47561f){return function(_0x5e4f90){try{jsonpatch[_0x4238('0x23')](_0x5e4f90,_0x47561f,!![]);}catch(_0x5365c5){return BPromise[_0x4238('0x24')](_0x5365c5);}return _0x5e4f90[_0x4238('0x25')]();};}function saveUpdates(_0x323c17,_0x313593){return function(_0x40eee7){if(_0x40eee7){return _0x40eee7[_0x4238('0x26')](_0x323c17)[_0x4238('0x27')](function(_0x829542){return _0x829542;});}return null;};}function removeEntity(_0x1808f8,_0x132e74){return function(_0x183183){if(_0x183183){return _0x183183[_0x4238('0x28')]()[_0x4238('0x27')](function(){_0x1808f8['status'](0xcc)[_0x4238('0x1e')]();});}};}function handleEntityNotFound(_0x572f00,_0x43015a){return function(_0x381cf3){if(!_0x381cf3){_0x572f00[_0x4238('0x1c')](0x194);}return _0x381cf3;};}function handleError(_0x35ca73,_0x39d272){_0x39d272=_0x39d272||0x1f4;return function(_0x2c07bb){logger[_0x4238('0x29')](_0x2c07bb[_0x4238('0x2a')]);if(_0x2c07bb[_0x4238('0x2b')]){delete _0x2c07bb['name'];}_0x35ca73[_0x4238('0x1d')](_0x39d272)['send'](_0x2c07bb);};}exports['index']=function(_0x278cf5,_0x35e2fb){var _0x29ccde={},_0x4e42a6={},_0x54b88c={'count':0x0,'rows':[]};var _0xc132df=_[_0x4238('0x2c')](db[_0x4238('0x2d')][_0x4238('0x2e')],function(_0xb34b4e){return{'name':_0xb34b4e[_0x4238('0x2f')],'type':_0xb34b4e[_0x4238('0x30')][_0x4238('0x31')]};});_0x4e42a6['model']=_[_0x4238('0x2c')](_0xc132df,_0x4238('0x2b'));_0x4e42a6[_0x4238('0x32')]=_['keys'](_0x278cf5[_0x4238('0x32')]);_0x4e42a6['filters']=_[_0x4238('0x33')](_0x4e42a6['model'],_0x4e42a6[_0x4238('0x32')]);_0x29ccde[_0x4238('0x34')]=_['intersection'](_0x4e42a6[_0x4238('0x35')],qs[_0x4238('0x36')](_0x278cf5['query'][_0x4238('0x36')]));_0x29ccde[_0x4238('0x34')]=_0x29ccde[_0x4238('0x34')]['length']?_0x29ccde[_0x4238('0x34')]:_0x4e42a6[_0x4238('0x35')];if(!_0x278cf5['query'][_0x4238('0x37')]('nolimit')){_0x29ccde[_0x4238('0x38')]=qs[_0x4238('0x38')](_0x278cf5[_0x4238('0x32')][_0x4238('0x38')]);_0x29ccde[_0x4238('0x39')]=qs[_0x4238('0x39')](_0x278cf5[_0x4238('0x32')][_0x4238('0x39')]);}_0x29ccde['order']=qs[_0x4238('0x3a')](_0x278cf5[_0x4238('0x32')][_0x4238('0x3a')]);_0x29ccde['where']=qs[_0x4238('0x3b')](_[_0x4238('0x3c')](_0x278cf5['query'],_0x4e42a6[_0x4238('0x3b')]));if(_0x278cf5['query'][_0x4238('0x3d')]){_0x29ccde[_0x4238('0x3e')]=_[_0x4238('0x3f')](_0x29ccde[_0x4238('0x3e')],{'$or':_[_0x4238('0x2c')](_0xc132df,function(_0x2aa9bd){if(_0x2aa9bd['type']!=='VIRTUAL'){var _0x247d16={};_0x247d16[_0x2aa9bd[_0x4238('0x2b')]]={'$like':'%'+_0x278cf5[_0x4238('0x32')]['filter']+'%'};return _0x247d16;}})});}_0x29ccde=_[_0x4238('0x3f')]({},_0x29ccde,_0x278cf5['options']);var _0x1cf2a7={'where':_0x29ccde[_0x4238('0x3e')]};return db[_0x4238('0x2d')]['count'](_0x1cf2a7)['then'](function(_0x4d2a48){_0x54b88c[_0x4238('0x20')]=_0x4d2a48;if(_0x278cf5[_0x4238('0x32')]['includeAll']){_0x29ccde['include']=[{'all':!![]}];}return db[_0x4238('0x2d')][_0x4238('0x40')](_0x29ccde);})['then'](function(_0x46374b){_0x54b88c[_0x4238('0x41')]=_0x46374b;return _0x54b88c;})['then'](respondWithFilteredResult(_0x35e2fb,_0x29ccde))[_0x4238('0x42')](handleError(_0x35e2fb,null));};exports[_0x4238('0x43')]=function(_0x18dc93,_0x26fed0){var _0x241131={'raw':!![],'where':{'id':_0x18dc93[_0x4238('0x44')]['id']}},_0x49de77={};_0x49de77[_0x4238('0x35')]=_['keys'](db['ChatQueueReport'][_0x4238('0x2e')]);_0x49de77[_0x4238('0x32')]=_[_0x4238('0x45')](_0x18dc93[_0x4238('0x32')]);_0x49de77[_0x4238('0x3b')]=_['intersection'](_0x49de77['model'],_0x49de77[_0x4238('0x32')]);_0x241131[_0x4238('0x34')]=_[_0x4238('0x33')](_0x49de77['model'],qs[_0x4238('0x36')](_0x18dc93[_0x4238('0x32')][_0x4238('0x36')]));_0x241131[_0x4238('0x34')]=_0x241131[_0x4238('0x34')][_0x4238('0x46')]?_0x241131[_0x4238('0x34')]:_0x49de77[_0x4238('0x35')];if(_0x18dc93[_0x4238('0x32')]['includeAll']){_0x241131[_0x4238('0x47')]=[{'all':!![]}];}_0x241131=_[_0x4238('0x3f')]({},_0x241131,_0x18dc93[_0x4238('0x48')]);return db[_0x4238('0x2d')][_0x4238('0x49')](_0x241131)[_0x4238('0x27')](handleEntityNotFound(_0x26fed0,null))[_0x4238('0x27')](respondWithResult(_0x26fed0,null))[_0x4238('0x42')](handleError(_0x26fed0,null));};exports[_0x4238('0x4a')]=function(_0x5d3d0c,_0x19b757){return db[_0x4238('0x2d')][_0x4238('0x4a')](_0x5d3d0c['body'],{})[_0x4238('0x27')](respondWithResult(_0x19b757,0xc9))[_0x4238('0x42')](handleError(_0x19b757,null));};exports['update']=function(_0x3d5b15,_0x58ec9c){if(_0x3d5b15[_0x4238('0x4b')]['id']){delete _0x3d5b15['body']['id'];}return db['ChatQueueReport'][_0x4238('0x49')]({'where':{'id':_0x3d5b15['params']['id']}})['then'](handleEntityNotFound(_0x58ec9c,null))[_0x4238('0x27')](saveUpdates(_0x3d5b15[_0x4238('0x4b')],null))[_0x4238('0x27')](respondWithResult(_0x58ec9c,null))['catch'](handleError(_0x58ec9c,null));};exports[_0x4238('0x28')]=function(_0x121841,_0x448fbb){return db['ChatQueueReport']['find']({'where':{'id':_0x121841[_0x4238('0x44')]['id']}})[_0x4238('0x27')](handleEntityNotFound(_0x448fbb,null))[_0x4238('0x27')](removeEntity(_0x448fbb,null))[_0x4238('0x42')](handleError(_0x448fbb,null));};exports[_0x4238('0x4c')]=function(_0x37a4f8,_0x3b7e88){return db[_0x4238('0x2d')]['describe']()['then'](respondWithResult(_0x3b7e88,null))['catch'](handleError(_0x3b7e88,null));};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js
index dd8c697..193b64d 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 _0x3362=['uniqueid','lodash','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports','define','report_chat_queue'];(function(_0x14f926,_0x501b56){var _0x1bc014=function(_0x50d3df){while(--_0x50d3df){_0x14f926['push'](_0x14f926['shift']());}};_0x1bc014(++_0x501b56);}(_0x3362,0xa6));var _0x2336=function(_0x3f6723,_0x3e6d35){_0x3f6723=_0x3f6723-0x0;var _0x21a643=_0x3362[_0x3f6723];return _0x21a643;};'use strict';var _=require(_0x2336('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x2336('0x1'));var moment=require(_0x2336('0x2'));var BPromise=require(_0x2336('0x3'));var rp=require(_0x2336('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2336('0x5'));var config=require(_0x2336('0x6'));var attributes=require('./chatQueueReport.attributes');module[_0x2336('0x7')]=function(_0x49940f,_0x476ce2){return _0x49940f[_0x2336('0x8')]('ChatQueueReport',attributes,{'tableName':_0x2336('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x2336('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x0ed7=['./chatQueueReport.attributes','exports','define','report_chat_queue','uniqueid','lodash','util','api','bluebird','request-promise','path','../../config/environment'];(function(_0x2662f7,_0x2eaeb5){var _0x17bb1d=function(_0xb04865){while(--_0xb04865){_0x2662f7['push'](_0x2662f7['shift']());}};_0x17bb1d(++_0x2eaeb5);}(_0x0ed7,0xb9));var _0x70ed=function(_0x5b311b,_0x3e0280){_0x5b311b=_0x5b311b-0x0;var _0x4fa0de=_0x0ed7[_0x5b311b];return _0x4fa0de;};'use strict';var _=require(_0x70ed('0x0'));var util=require(_0x70ed('0x1'));var logger=require('../../config/logger')(_0x70ed('0x2'));var moment=require('moment');var BPromise=require(_0x70ed('0x3'));var rp=require(_0x70ed('0x4'));var fs=require('fs');var path=require(_0x70ed('0x5'));var rimraf=require('rimraf');var config=require(_0x70ed('0x6'));var attributes=require(_0x70ed('0x7'));module[_0x70ed('0x8')]=function(_0x12c2ca,_0x3b0d17){return _0x12c2ca[_0x70ed('0x9')]('ChatQueueReport',attributes,{'tableName':_0x70ed('0xa'),'paranoid':![],'indexes':[{'name':_0x70ed('0xb'),'fields':[_0x70ed('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.rpc.js b/server/api/chatQueueReport/chatQueueReport.rpc.js
index 3448201..043beb4 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 _0xbd05=['stringify','error','code','message','catch','CreateChatQueueReport','ChatQueueReport','create','options','raw','then','debug','UpdateChatQueueReport','update','body','where','attributes','limit','lodash','moment','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s'];(function(_0x3a4197,_0x405128){var _0x38538b=function(_0x270376){while(--_0x270376){_0x3a4197['push'](_0x3a4197['shift']());}};_0x38538b(++_0x405128);}(_0xbd05,0xb2));var _0x5bd0=function(_0x4baae2,_0x487ab6){_0x4baae2=_0x4baae2-0x0;var _0x1a2285=_0xbd05[_0x4baae2];return _0x1a2285;};'use strict';var _=require(_0x5bd0('0x0'));var util=require('util');var moment=require(_0x5bd0('0x1'));var BPromise=require('bluebird');var rs=require(_0x5bd0('0x2'));var fs=require('fs');var Redis=require(_0x5bd0('0x3'));var db=require(_0x5bd0('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x5bd0('0x5'));var config=require(_0x5bd0('0x6'));var jayson=require(_0x5bd0('0x7'));var client=jayson[_0x5bd0('0x8')][_0x5bd0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xd1a857,_0x2741d0,_0x3672a4){return new BPromise(function(_0x511b81,_0x2546e3){return client['request'](_0xd1a857,_0x3672a4)['then'](function(_0x6ab82){logger[_0x5bd0('0xa')](_0x5bd0('0xb'),_0x2741d0,_0x5bd0('0xc'));logger['debug'](_0x5bd0('0xd'),_0x2741d0,_0x5bd0('0xc'),JSON[_0x5bd0('0xe')](_0x6ab82));if(_0x6ab82[_0x5bd0('0xf')]){if(_0x6ab82['error'][_0x5bd0('0x10')]===0x1f4){logger[_0x5bd0('0xf')](_0x5bd0('0xb'),_0x2741d0,_0x6ab82['error'][_0x5bd0('0x11')]);return _0x2546e3(_0x6ab82['error'][_0x5bd0('0x11')]);}logger[_0x5bd0('0xf')](_0x5bd0('0xb'),_0x2741d0,_0x6ab82['error'][_0x5bd0('0x11')]);return _0x511b81(_0x6ab82['error'][_0x5bd0('0x11')]);}else{logger['info'](_0x5bd0('0xb'),_0x2741d0,_0x5bd0('0xc'));_0x511b81(_0x6ab82['result'][_0x5bd0('0x11')]);}})[_0x5bd0('0x12')](function(_0x5114ab){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x2741d0,_0x5114ab);_0x2546e3(_0x5114ab);});});}exports[_0x5bd0('0x13')]=function(_0x529a26){var _0x2ee0d5=this;return new Promise(function(_0x2341b5,_0x342e1a){return db[_0x5bd0('0x14')][_0x5bd0('0x15')](_0x529a26['body'],{'raw':_0x529a26[_0x5bd0('0x16')]?_0x529a26[_0x5bd0('0x16')][_0x5bd0('0x17')]===undefined?!![]:![]:!![]})[_0x5bd0('0x18')](function(_0xafe678){logger['info']('CreateChatQueueReport',_0x529a26);logger[_0x5bd0('0x19')](_0x5bd0('0x13'),_0x529a26,JSON[_0x5bd0('0xe')](_0xafe678));_0x2341b5(_0xafe678);})[_0x5bd0('0x12')](function(_0x383675){logger[_0x5bd0('0xf')](_0x5bd0('0x13'),_0x383675[_0x5bd0('0x11')],_0x529a26);_0x342e1a(_0x2ee0d5[_0x5bd0('0xf')](0x1f4,_0x383675[_0x5bd0('0x11')]));});});};exports[_0x5bd0('0x1a')]=function(_0x2c2118){var _0x992da6=this;return new Promise(function(_0x37fdd7,_0x302ae2){return db[_0x5bd0('0x14')][_0x5bd0('0x1b')](_0x2c2118[_0x5bd0('0x1c')],{'raw':_0x2c2118['options']?_0x2c2118[_0x5bd0('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2c2118[_0x5bd0('0x16')]?_0x2c2118[_0x5bd0('0x16')][_0x5bd0('0x1d')]||null:null,'attributes':_0x2c2118[_0x5bd0('0x16')]?_0x2c2118[_0x5bd0('0x16')][_0x5bd0('0x1e')]||null:null,'limit':_0x2c2118[_0x5bd0('0x16')]?_0x2c2118['options'][_0x5bd0('0x1f')]||null:null})[_0x5bd0('0x18')](function(_0x11bc63){logger[_0x5bd0('0xa')](_0x5bd0('0x1a'),_0x2c2118);logger[_0x5bd0('0x19')](_0x5bd0('0x1a'),_0x2c2118,JSON[_0x5bd0('0xe')](_0x11bc63));_0x37fdd7(_0x11bc63);})[_0x5bd0('0x12')](function(_0x2d4d7e){logger[_0x5bd0('0xf')](_0x5bd0('0x1a'),_0x2d4d7e[_0x5bd0('0x11')],_0x2c2118);_0x302ae2(_0x992da6[_0x5bd0('0xf')](0x1f4,_0x2d4d7e['message']));});});};
\ No newline at end of file
+var _0x4063=['ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','request','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','raw','then','update','where','attributes','limit','UpdateChatQueueReport','lodash','util','moment','randomstring'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4063,0x104));var _0x3406=function(_0x277579,_0x33f977){_0x277579=_0x277579-0x0;var _0x459a79=_0x4063[_0x277579];return _0x459a79;};'use strict';var _=require(_0x3406('0x0'));var util=require(_0x3406('0x1'));var moment=require(_0x3406('0x2'));var BPromise=require('bluebird');var rs=require(_0x3406('0x3'));var fs=require('fs');var Redis=require(_0x3406('0x4'));var db=require(_0x3406('0x5'))['db'];var utils=require(_0x3406('0x6'));var logger=require(_0x3406('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3406('0x8'));var client=jayson[_0x3406('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2adead,_0x35f691,_0x36fb42){return new BPromise(function(_0x2a79ed,_0x5763ba){return client[_0x3406('0xa')](_0x2adead,_0x36fb42)['then'](function(_0x23eb39){logger[_0x3406('0xb')](_0x3406('0xc'),_0x35f691,_0x3406('0xd'));logger[_0x3406('0xe')](_0x3406('0xf'),_0x35f691,_0x3406('0xd'),JSON[_0x3406('0x10')](_0x23eb39));if(_0x23eb39[_0x3406('0x11')]){if(_0x23eb39['error']['code']===0x1f4){logger[_0x3406('0x11')](_0x3406('0xc'),_0x35f691,_0x23eb39[_0x3406('0x11')][_0x3406('0x12')]);return _0x5763ba(_0x23eb39[_0x3406('0x11')][_0x3406('0x12')]);}logger[_0x3406('0x11')]('ChatQueueReport,\x20%s,\x20%s',_0x35f691,_0x23eb39[_0x3406('0x11')][_0x3406('0x12')]);return _0x2a79ed(_0x23eb39[_0x3406('0x11')]['message']);}else{logger[_0x3406('0xb')](_0x3406('0xc'),_0x35f691,_0x3406('0xd'));_0x2a79ed(_0x23eb39[_0x3406('0x13')][_0x3406('0x12')]);}})[_0x3406('0x14')](function(_0x4f9f80){logger['error'](_0x3406('0xc'),_0x35f691,_0x4f9f80);_0x5763ba(_0x4f9f80);});});}exports[_0x3406('0x15')]=function(_0x4b1202){var _0x4ddafe=this;return new Promise(function(_0x618188,_0x389fbc){return db[_0x3406('0x16')][_0x3406('0x17')](_0x4b1202[_0x3406('0x18')],{'raw':_0x4b1202[_0x3406('0x19')]?_0x4b1202[_0x3406('0x19')][_0x3406('0x1a')]===undefined?!![]:![]:!![]})[_0x3406('0x1b')](function(_0x4f7e98){logger[_0x3406('0xb')]('CreateChatQueueReport',_0x4b1202);logger['debug'](_0x3406('0x15'),_0x4b1202,JSON[_0x3406('0x10')](_0x4f7e98));_0x618188(_0x4f7e98);})[_0x3406('0x14')](function(_0x49288d){logger[_0x3406('0x11')](_0x3406('0x15'),_0x49288d['message'],_0x4b1202);_0x389fbc(_0x4ddafe[_0x3406('0x11')](0x1f4,_0x49288d[_0x3406('0x12')]));});});};exports['UpdateChatQueueReport']=function(_0x587c7e){var _0x5891b0=this;return new Promise(function(_0x1650d6,_0x17c6bf){return db[_0x3406('0x16')][_0x3406('0x1c')](_0x587c7e[_0x3406('0x18')],{'raw':_0x587c7e['options']?_0x587c7e[_0x3406('0x19')][_0x3406('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x587c7e[_0x3406('0x19')]?_0x587c7e[_0x3406('0x19')][_0x3406('0x1d')]||null:null,'attributes':_0x587c7e[_0x3406('0x19')]?_0x587c7e[_0x3406('0x19')][_0x3406('0x1e')]||null:null,'limit':_0x587c7e[_0x3406('0x19')]?_0x587c7e[_0x3406('0x19')][_0x3406('0x1f')]||null:null})[_0x3406('0x1b')](function(_0x2678da){logger[_0x3406('0xb')](_0x3406('0x20'),_0x587c7e);logger['debug'](_0x3406('0x20'),_0x587c7e,JSON[_0x3406('0x10')](_0x2678da));_0x1650d6(_0x2678da);})[_0x3406('0x14')](function(_0x5c5f33){logger[_0x3406('0x11')](_0x3406('0x20'),_0x5c5f33[_0x3406('0x12')],_0x587c7e);_0x17c6bf(_0x5891b0[_0x3406('0x11')](0x1f4,_0x5c5f33[_0x3406('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js
index afeae30..80ebf8d 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 _0x3154=['Router','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','get','isAuthenticated','index','describe','/:id','show','update','delete','destroy','exports','multer','util','path','express'];(function(_0x4baf76,_0x270b92){var _0x3d93a7=function(_0x3473ee){while(--_0x3473ee){_0x4baf76['push'](_0x4baf76['shift']());}};_0x3d93a7(++_0x270b92);}(_0x3154,0x1f4));var _0x4315=function(_0x2dadb9,_0x42cfe6){_0x2dadb9=_0x2dadb9-0x0;var _0x2f0097=_0x3154[_0x2dadb9];return _0x2f0097;};'use strict';var multer=require(_0x4315('0x0'));var util=require(_0x4315('0x1'));var path=require(_0x4315('0x2'));var timeout=require('connect-timeout');var express=require(_0x4315('0x3'));var router=express[_0x4315('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x4315('0x5'));var config=require(_0x4315('0x6'));var controller=require(_0x4315('0x7'));router[_0x4315('0x8')]('/',auth[_0x4315('0x9')](),controller[_0x4315('0xa')]);router[_0x4315('0x8')]('/describe',auth[_0x4315('0x9')](),controller[_0x4315('0xb')]);router['get'](_0x4315('0xc'),auth[_0x4315('0x9')](),controller[_0x4315('0xd')]);router['post']('/',auth[_0x4315('0x9')](),controller['create']);router['put'](_0x4315('0xc'),auth[_0x4315('0x9')](),controller[_0x4315('0xe')]);router[_0x4315('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x4315('0x10')]);module[_0x4315('0x11')]=router;
\ No newline at end of file
+var _0x8b8c=['delete','/:id','exports','multer','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','isAuthenticated','get','/describe','describe','show','post','create','put'];(function(_0x822e1,_0x4dcc11){var _0x2da176=function(_0xf7e7ff){while(--_0xf7e7ff){_0x822e1['push'](_0x822e1['shift']());}};_0x2da176(++_0x4dcc11);}(_0x8b8c,0x146));var _0xc8b8=function(_0x30e52e,_0x3307f4){_0x30e52e=_0x30e52e-0x0;var _0xe001de=_0x8b8c[_0x30e52e];return _0xe001de;};'use strict';var multer=require(_0xc8b8('0x0'));var util=require('util');var path=require(_0xc8b8('0x1'));var timeout=require('connect-timeout');var express=require(_0xc8b8('0x2'));var router=express[_0xc8b8('0x3')]();var auth=require(_0xc8b8('0x4'));var interaction=require(_0xc8b8('0x5'));var config=require(_0xc8b8('0x6'));var controller=require(_0xc8b8('0x7'));router['get']('/',auth[_0xc8b8('0x8')](),controller['index']);router[_0xc8b8('0x9')](_0xc8b8('0xa'),auth['isAuthenticated'](),controller[_0xc8b8('0xb')]);router[_0xc8b8('0x9')]('/:id',auth[_0xc8b8('0x8')](),controller[_0xc8b8('0xc')]);router[_0xc8b8('0xd')]('/',auth['isAuthenticated'](),controller[_0xc8b8('0xe')]);router[_0xc8b8('0xf')]('/:id',auth[_0xc8b8('0x8')](),controller['update']);router[_0xc8b8('0x10')](_0xc8b8('0x11'),auth[_0xc8b8('0x8')](),controller['destroy']);module[_0xc8b8('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js
index b795b9f..ebdc709 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 _0x6cff=['queue','NOW','moment','sequelize','STRING','ENUM','agent'];(function(_0x3518ab,_0x2c52de){var _0x33eba8=function(_0x105df7){while(--_0x105df7){_0x3518ab['push'](_0x3518ab['shift']());}};_0x33eba8(++_0x2c52de);}(_0x6cff,0x16e));var _0xf6cf=function(_0x599aaf,_0x3d3622){_0x599aaf=_0x599aaf-0x0;var _0xd995f3=_0x6cff[_0x599aaf];return _0xd995f3;};'use strict';var moment=require(_0xf6cf('0x0'));var Sequelize=require(_0xf6cf('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xf6cf('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xf6cf('0x3')]('account',_0xf6cf('0x4'),'queue'),'allowNull':![],'defaultValue':_0xf6cf('0x5')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0xf6cf('0x6')]}};
\ No newline at end of file
+var _0x7da7=['agent','queue','DATE','NOW','moment','sequelize','exports','account'];(function(_0x19bb00,_0x4be509){var _0x26470e=function(_0x1d2557){while(--_0x1d2557){_0x19bb00['push'](_0x19bb00['shift']());}};_0x26470e(++_0x4be509);}(_0x7da7,0xb4));var _0x77da=function(_0x17823f,_0xffd807){_0x17823f=_0x17823f-0x0;var _0x51fc21=_0x7da7[_0x17823f];return _0x51fc21;};'use strict';var moment=require(_0x77da('0x0'));var Sequelize=require(_0x77da('0x1'));module[_0x77da('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x77da('0x3'),_0x77da('0x4'),_0x77da('0x5')),'allowNull':![],'defaultValue':_0x77da('0x5')},'transferredAt':{'type':Sequelize[_0x77da('0x6')],'allowNull':![],'defaultValue':Sequelize[_0x77da('0x7')]}};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js
index 7968fb8..5d2cc8c 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 _0xe313=['describe','html-pdf','rimraf','moment','bluebird','path','sox','to-csv','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','json','offset','limit','Content-Range','apply','reject','update','then','destroy','stack','name','send','map','ChatTransferReport','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','model','fields','length','nolimit','order','where','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','show','params','find','create','body'];(function(_0x234d1e,_0x4a5fc8){var _0x182fa2=function(_0x121cb2){while(--_0x121cb2){_0x234d1e['push'](_0x234d1e['shift']());}};_0x182fa2(++_0x4a5fc8);}(_0xe313,0xca));var _0x3e31=function(_0x231f94,_0x3e8f87){_0x231f94=_0x231f94-0x0;var _0x24b5a2=_0xe313[_0x231f94];return _0x24b5a2;};'use strict';var pdf=require(_0x3e31('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x3e31('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3e31('0x2'));var BPromise=require(_0x3e31('0x3'));var Mustache=require('mustache');var util=require('util');var path=require(_0x3e31('0x4'));var sox=require(_0x3e31('0x5'));var csv=require(_0x3e31('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x3e31('0x7'));var squel=require(_0x3e31('0x8'));var crypto=require('crypto');var jsforce=require(_0x3e31('0x9'));var deskjs=require(_0x3e31('0xa'));var toCsv=require(_0x3e31('0x6'));var querystring=require(_0x3e31('0xb'));var Papa=require(_0x3e31('0xc'));var Redis=require(_0x3e31('0xd'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x3e31('0xe'));var hardwareService=require(_0x3e31('0xf'));var logger=require(_0x3e31('0x10'))(_0x3e31('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x3e31('0x12'))['db'];function respondWithStatusCode(_0x3a8732,_0x587a5e){_0x587a5e=_0x587a5e||0xcc;return function(_0xc64b27){if(_0xc64b27){return _0x3a8732[_0x3e31('0x13')](_0x587a5e);}return _0x3a8732[_0x3e31('0x14')](_0x587a5e)[_0x3e31('0x15')]();};}function respondWithResult(_0x246410,_0x1c79b1){_0x1c79b1=_0x1c79b1||0xc8;return function(_0x1b5bad){if(_0x1b5bad){return _0x246410['status'](_0x1c79b1)[_0x3e31('0x16')](_0x1b5bad);}};}function respondWithFilteredResult(_0x148a39,_0x37da4a){return function(_0x5cf6eb){if(_0x5cf6eb){var _0x13d483=_0x5cf6eb['count'],_0x239215=_0x37da4a['offset'],_0x4bb33c=_0x37da4a[_0x3e31('0x17')]+_0x37da4a[_0x3e31('0x18')],_0x5ebbc7;if(_0x4bb33c>=_0x13d483){_0x4bb33c=_0x13d483;_0x5ebbc7=0xc8;}else{_0x5ebbc7=0xce;}_0x148a39[_0x3e31('0x14')](_0x5ebbc7);return _0x148a39['set'](_0x3e31('0x19'),_0x239215+'-'+_0x4bb33c+'/'+_0x13d483)['json'](_0x5cf6eb);}return null;};}function patchUpdates(_0x2eb10d){return function(_0x42e774){try{jsonpatch[_0x3e31('0x1a')](_0x42e774,_0x2eb10d,!![]);}catch(_0x396625){return BPromise[_0x3e31('0x1b')](_0x396625);}return _0x42e774['save']();};}function saveUpdates(_0x3c8b09,_0x392bbd){return function(_0x4d5b2d){if(_0x4d5b2d){return _0x4d5b2d[_0x3e31('0x1c')](_0x3c8b09)[_0x3e31('0x1d')](function(_0x38b921){return _0x38b921;});}return null;};}function removeEntity(_0x34be69,_0x189ede){return function(_0x4a8cf4){if(_0x4a8cf4){return _0x4a8cf4[_0x3e31('0x1e')]()[_0x3e31('0x1d')](function(){_0x34be69[_0x3e31('0x14')](0xcc)[_0x3e31('0x15')]();});}};}function handleEntityNotFound(_0x158ef6,_0x2dd7c5){return function(_0x12e9ef){if(!_0x12e9ef){_0x158ef6[_0x3e31('0x13')](0x194);}return _0x12e9ef;};}function handleError(_0x48ef10,_0x33282d){_0x33282d=_0x33282d||0x1f4;return function(_0x44873c){logger['error'](_0x44873c[_0x3e31('0x1f')]);if(_0x44873c[_0x3e31('0x20')]){delete _0x44873c['name'];}_0x48ef10[_0x3e31('0x14')](_0x33282d)[_0x3e31('0x21')](_0x44873c);};}exports['index']=function(_0x448311,_0x14c101){var _0x159701={},_0x49982c={},_0x1c2805={'count':0x0,'rows':[]};var _0x31ce47=_[_0x3e31('0x22')](db[_0x3e31('0x23')][_0x3e31('0x24')],function(_0x4f37ca){return{'name':_0x4f37ca[_0x3e31('0x25')],'type':_0x4f37ca[_0x3e31('0x26')][_0x3e31('0x27')]};});_0x49982c['model']=_['map'](_0x31ce47,_0x3e31('0x20'));_0x49982c[_0x3e31('0x28')]=_[_0x3e31('0x29')](_0x448311[_0x3e31('0x28')]);_0x49982c[_0x3e31('0x2a')]=_[_0x3e31('0x2b')](_0x49982c['model'],_0x49982c['query']);_0x159701[_0x3e31('0x2c')]=_['intersection'](_0x49982c[_0x3e31('0x2d')],qs[_0x3e31('0x2e')](_0x448311[_0x3e31('0x28')][_0x3e31('0x2e')]));_0x159701['attributes']=_0x159701['attributes'][_0x3e31('0x2f')]?_0x159701['attributes']:_0x49982c[_0x3e31('0x2d')];if(!_0x448311[_0x3e31('0x28')]['hasOwnProperty'](_0x3e31('0x30'))){_0x159701[_0x3e31('0x18')]=qs[_0x3e31('0x18')](_0x448311[_0x3e31('0x28')]['limit']);_0x159701[_0x3e31('0x17')]=qs[_0x3e31('0x17')](_0x448311[_0x3e31('0x28')][_0x3e31('0x17')]);}_0x159701[_0x3e31('0x31')]=qs['sort'](_0x448311[_0x3e31('0x28')]['sort']);_0x159701[_0x3e31('0x32')]=qs['filters'](_['pick'](_0x448311[_0x3e31('0x28')],_0x49982c[_0x3e31('0x2a')]));if(_0x448311[_0x3e31('0x28')][_0x3e31('0x33')]){_0x159701[_0x3e31('0x32')]=_[_0x3e31('0x34')](_0x159701[_0x3e31('0x32')],{'$or':_[_0x3e31('0x22')](_0x31ce47,function(_0x1b586c){if(_0x1b586c[_0x3e31('0x26')]!==_0x3e31('0x35')){var _0x43c226={};_0x43c226[_0x1b586c[_0x3e31('0x20')]]={'$like':'%'+_0x448311[_0x3e31('0x28')][_0x3e31('0x33')]+'%'};return _0x43c226;}})});}_0x159701=_[_0x3e31('0x34')]({},_0x159701,_0x448311[_0x3e31('0x36')]);var _0x174626={'where':_0x159701[_0x3e31('0x32')]};return db[_0x3e31('0x23')][_0x3e31('0x37')](_0x174626)['then'](function(_0x179cd9){_0x1c2805[_0x3e31('0x37')]=_0x179cd9;if(_0x448311['query'][_0x3e31('0x38')]){_0x159701[_0x3e31('0x39')]=[{'all':!![]}];}return db[_0x3e31('0x23')][_0x3e31('0x3a')](_0x159701);})[_0x3e31('0x1d')](function(_0x108fc8){_0x1c2805[_0x3e31('0x3b')]=_0x108fc8;return _0x1c2805;})[_0x3e31('0x1d')](respondWithFilteredResult(_0x14c101,_0x159701))[_0x3e31('0x3c')](handleError(_0x14c101,null));};exports[_0x3e31('0x3d')]=function(_0x4a890e,_0x16ef10){var _0x39f3eb={'raw':!![],'where':{'id':_0x4a890e[_0x3e31('0x3e')]['id']}},_0x1b06be={};_0x1b06be[_0x3e31('0x2d')]=_[_0x3e31('0x29')](db[_0x3e31('0x23')][_0x3e31('0x24')]);_0x1b06be[_0x3e31('0x28')]=_[_0x3e31('0x29')](_0x4a890e[_0x3e31('0x28')]);_0x1b06be[_0x3e31('0x2a')]=_[_0x3e31('0x2b')](_0x1b06be['model'],_0x1b06be[_0x3e31('0x28')]);_0x39f3eb['attributes']=_[_0x3e31('0x2b')](_0x1b06be['model'],qs[_0x3e31('0x2e')](_0x4a890e[_0x3e31('0x28')][_0x3e31('0x2e')]));_0x39f3eb['attributes']=_0x39f3eb[_0x3e31('0x2c')][_0x3e31('0x2f')]?_0x39f3eb[_0x3e31('0x2c')]:_0x1b06be[_0x3e31('0x2d')];if(_0x4a890e[_0x3e31('0x28')][_0x3e31('0x38')]){_0x39f3eb[_0x3e31('0x39')]=[{'all':!![]}];}_0x39f3eb=_[_0x3e31('0x34')]({},_0x39f3eb,_0x4a890e[_0x3e31('0x36')]);return db[_0x3e31('0x23')][_0x3e31('0x3f')](_0x39f3eb)['then'](handleEntityNotFound(_0x16ef10,null))[_0x3e31('0x1d')](respondWithResult(_0x16ef10,null))[_0x3e31('0x3c')](handleError(_0x16ef10,null));};exports['create']=function(_0x2321c6,_0x22e236){return db[_0x3e31('0x23')][_0x3e31('0x40')](_0x2321c6['body'],{})[_0x3e31('0x1d')](respondWithResult(_0x22e236,0xc9))[_0x3e31('0x3c')](handleError(_0x22e236,null));};exports[_0x3e31('0x1c')]=function(_0xacb723,_0xd8ca94){if(_0xacb723[_0x3e31('0x41')]['id']){delete _0xacb723[_0x3e31('0x41')]['id'];}return db[_0x3e31('0x23')][_0x3e31('0x3f')]({'where':{'id':_0xacb723[_0x3e31('0x3e')]['id']}})['then'](handleEntityNotFound(_0xd8ca94,null))['then'](saveUpdates(_0xacb723[_0x3e31('0x41')],null))[_0x3e31('0x1d')](respondWithResult(_0xd8ca94,null))[_0x3e31('0x3c')](handleError(_0xd8ca94,null));};exports[_0x3e31('0x1e')]=function(_0x1637d0,_0x30ab33){return db[_0x3e31('0x23')][_0x3e31('0x3f')]({'where':{'id':_0x1637d0[_0x3e31('0x3e')]['id']}})[_0x3e31('0x1d')](handleEntityNotFound(_0x30ab33,null))[_0x3e31('0x1d')](removeEntity(_0x30ab33,null))[_0x3e31('0x3c')](handleError(_0x30ab33,null));};exports['describe']=function(_0x1c5ee1,_0x32b282){return db[_0x3e31('0x23')][_0x3e31('0x42')]()['then'](respondWithResult(_0x32b282,null))['catch'](handleError(_0x32b282,null));};
\ No newline at end of file
+var _0x3a68=['pick','filter','options','count','includeAll','include','ChatTransferReport','rows','catch','show','params','merge','create','body','find','describe','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','mustache','path','sox','to-csv','ejs','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','save','then','destroy','name','send','index','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where'];(function(_0x2c741f,_0x25b70c){var _0x33828e=function(_0x45d63f){while(--_0x45d63f){_0x2c741f['push'](_0x2c741f['shift']());}};_0x33828e(++_0x25b70c);}(_0x3a68,0x118));var _0x83a6=function(_0x3ed7b7,_0x30400d){_0x3ed7b7=_0x3ed7b7-0x0;var _0x47612f=_0x3a68[_0x3ed7b7];return _0x47612f;};'use strict';var pdf=require(_0x83a6('0x0'));var emlformat=require(_0x83a6('0x1'));var rimraf=require(_0x83a6('0x2'));var zipdir=require(_0x83a6('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x83a6('0x4'));var moment=require(_0x83a6('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x83a6('0x6'));var util=require('util');var path=require(_0x83a6('0x7'));var sox=require(_0x83a6('0x8'));var csv=require(_0x83a6('0x9'));var ejs=require(_0x83a6('0xa'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x83a6('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x83a6('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x83a6('0xd'));var Redis=require(_0x83a6('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x83a6('0xf'));var as=require(_0x83a6('0x10'));var hardwareService=require(_0x83a6('0x11'));var logger=require(_0x83a6('0x12'))('api');var utils=require(_0x83a6('0x13'));var config=require('../../config/environment');var db=require(_0x83a6('0x14'))['db'];function respondWithStatusCode(_0x4aa1e3,_0x41cffd){_0x41cffd=_0x41cffd||0xcc;return function(_0x39685b){if(_0x39685b){return _0x4aa1e3[_0x83a6('0x15')](_0x41cffd);}return _0x4aa1e3[_0x83a6('0x16')](_0x41cffd)[_0x83a6('0x17')]();};}function respondWithResult(_0x4deebc,_0xede92){_0xede92=_0xede92||0xc8;return function(_0x1803e6){if(_0x1803e6){return _0x4deebc[_0x83a6('0x16')](_0xede92)[_0x83a6('0x18')](_0x1803e6);}};}function respondWithFilteredResult(_0x8ab099,_0x5e3039){return function(_0x1f6303){if(_0x1f6303){var _0x1c2baf=_0x1f6303['count'],_0x3786e3=_0x5e3039['offset'],_0x42a6ad=_0x5e3039[_0x83a6('0x19')]+_0x5e3039[_0x83a6('0x1a')],_0x466a6d;if(_0x42a6ad>=_0x1c2baf){_0x42a6ad=_0x1c2baf;_0x466a6d=0xc8;}else{_0x466a6d=0xce;}_0x8ab099['status'](_0x466a6d);return _0x8ab099[_0x83a6('0x1b')](_0x83a6('0x1c'),_0x3786e3+'-'+_0x42a6ad+'/'+_0x1c2baf)[_0x83a6('0x18')](_0x1f6303);}return null;};}function patchUpdates(_0x2fc344){return function(_0x11b36c){try{jsonpatch['apply'](_0x11b36c,_0x2fc344,!![]);}catch(_0x594451){return BPromise['reject'](_0x594451);}return _0x11b36c[_0x83a6('0x1d')]();};}function saveUpdates(_0x346e66,_0x76938d){return function(_0x365e7a){if(_0x365e7a){return _0x365e7a['update'](_0x346e66)[_0x83a6('0x1e')](function(_0x42d48f){return _0x42d48f;});}return null;};}function removeEntity(_0x49e735,_0x3d367f){return function(_0x4221fa){if(_0x4221fa){return _0x4221fa[_0x83a6('0x1f')]()[_0x83a6('0x1e')](function(){_0x49e735[_0x83a6('0x16')](0xcc)[_0x83a6('0x17')]();});}};}function handleEntityNotFound(_0x407d2e,_0x4c8d32){return function(_0x36cd23){if(!_0x36cd23){_0x407d2e[_0x83a6('0x15')](0x194);}return _0x36cd23;};}function handleError(_0x3add3f,_0x8e650e){_0x8e650e=_0x8e650e||0x1f4;return function(_0x181c2a){logger['error'](_0x181c2a['stack']);if(_0x181c2a[_0x83a6('0x20')]){delete _0x181c2a[_0x83a6('0x20')];}_0x3add3f[_0x83a6('0x16')](_0x8e650e)[_0x83a6('0x21')](_0x181c2a);};}exports[_0x83a6('0x22')]=function(_0x27ae8c,_0x5e23f7){var _0x24167b={},_0x5d2cc1={},_0x43bf24={'count':0x0,'rows':[]};var _0xb4b642=_[_0x83a6('0x23')](db['ChatTransferReport']['rawAttributes'],function(_0x1bacbf){return{'name':_0x1bacbf[_0x83a6('0x24')],'type':_0x1bacbf[_0x83a6('0x25')][_0x83a6('0x26')]};});_0x5d2cc1[_0x83a6('0x27')]=_[_0x83a6('0x23')](_0xb4b642,_0x83a6('0x20'));_0x5d2cc1[_0x83a6('0x28')]=_[_0x83a6('0x29')](_0x27ae8c['query']);_0x5d2cc1[_0x83a6('0x2a')]=_[_0x83a6('0x2b')](_0x5d2cc1[_0x83a6('0x27')],_0x5d2cc1[_0x83a6('0x28')]);_0x24167b[_0x83a6('0x2c')]=_[_0x83a6('0x2b')](_0x5d2cc1[_0x83a6('0x27')],qs[_0x83a6('0x2d')](_0x27ae8c[_0x83a6('0x28')][_0x83a6('0x2d')]));_0x24167b[_0x83a6('0x2c')]=_0x24167b['attributes'][_0x83a6('0x2e')]?_0x24167b[_0x83a6('0x2c')]:_0x5d2cc1[_0x83a6('0x27')];if(!_0x27ae8c[_0x83a6('0x28')][_0x83a6('0x2f')]('nolimit')){_0x24167b[_0x83a6('0x1a')]=qs[_0x83a6('0x1a')](_0x27ae8c['query'][_0x83a6('0x1a')]);_0x24167b[_0x83a6('0x19')]=qs[_0x83a6('0x19')](_0x27ae8c[_0x83a6('0x28')][_0x83a6('0x19')]);}_0x24167b['order']=qs['sort'](_0x27ae8c[_0x83a6('0x28')][_0x83a6('0x30')]);_0x24167b[_0x83a6('0x31')]=qs[_0x83a6('0x2a')](_[_0x83a6('0x32')](_0x27ae8c['query'],_0x5d2cc1[_0x83a6('0x2a')]));if(_0x27ae8c[_0x83a6('0x28')]['filter']){_0x24167b['where']=_['merge'](_0x24167b[_0x83a6('0x31')],{'$or':_['map'](_0xb4b642,function(_0x133d0d){if(_0x133d0d[_0x83a6('0x25')]!=='VIRTUAL'){var _0xbaf0bb={};_0xbaf0bb[_0x133d0d[_0x83a6('0x20')]]={'$like':'%'+_0x27ae8c[_0x83a6('0x28')][_0x83a6('0x33')]+'%'};return _0xbaf0bb;}})});}_0x24167b=_['merge']({},_0x24167b,_0x27ae8c[_0x83a6('0x34')]);var _0x191a62={'where':_0x24167b[_0x83a6('0x31')]};return db['ChatTransferReport'][_0x83a6('0x35')](_0x191a62)['then'](function(_0x350280){_0x43bf24[_0x83a6('0x35')]=_0x350280;if(_0x27ae8c[_0x83a6('0x28')][_0x83a6('0x36')]){_0x24167b[_0x83a6('0x37')]=[{'all':!![]}];}return db[_0x83a6('0x38')]['findAll'](_0x24167b);})[_0x83a6('0x1e')](function(_0x5d97be){_0x43bf24[_0x83a6('0x39')]=_0x5d97be;return _0x43bf24;})[_0x83a6('0x1e')](respondWithFilteredResult(_0x5e23f7,_0x24167b))[_0x83a6('0x3a')](handleError(_0x5e23f7,null));};exports[_0x83a6('0x3b')]=function(_0x307239,_0x31aedd){var _0x4fc259={'raw':!![],'where':{'id':_0x307239[_0x83a6('0x3c')]['id']}},_0x194acd={};_0x194acd['model']=_[_0x83a6('0x29')](db['ChatTransferReport']['rawAttributes']);_0x194acd[_0x83a6('0x28')]=_[_0x83a6('0x29')](_0x307239[_0x83a6('0x28')]);_0x194acd[_0x83a6('0x2a')]=_[_0x83a6('0x2b')](_0x194acd['model'],_0x194acd[_0x83a6('0x28')]);_0x4fc259['attributes']=_[_0x83a6('0x2b')](_0x194acd['model'],qs[_0x83a6('0x2d')](_0x307239[_0x83a6('0x28')][_0x83a6('0x2d')]));_0x4fc259[_0x83a6('0x2c')]=_0x4fc259[_0x83a6('0x2c')][_0x83a6('0x2e')]?_0x4fc259['attributes']:_0x194acd['model'];if(_0x307239[_0x83a6('0x28')][_0x83a6('0x36')]){_0x4fc259[_0x83a6('0x37')]=[{'all':!![]}];}_0x4fc259=_[_0x83a6('0x3d')]({},_0x4fc259,_0x307239[_0x83a6('0x34')]);return db['ChatTransferReport']['find'](_0x4fc259)[_0x83a6('0x1e')](handleEntityNotFound(_0x31aedd,null))[_0x83a6('0x1e')](respondWithResult(_0x31aedd,null))[_0x83a6('0x3a')](handleError(_0x31aedd,null));};exports[_0x83a6('0x3e')]=function(_0x4038c5,_0xc8adc6){return db[_0x83a6('0x38')][_0x83a6('0x3e')](_0x4038c5['body'],{})[_0x83a6('0x1e')](respondWithResult(_0xc8adc6,0xc9))[_0x83a6('0x3a')](handleError(_0xc8adc6,null));};exports['update']=function(_0x31539d,_0x6c1c1b){if(_0x31539d[_0x83a6('0x3f')]['id']){delete _0x31539d[_0x83a6('0x3f')]['id'];}return db[_0x83a6('0x38')][_0x83a6('0x40')]({'where':{'id':_0x31539d[_0x83a6('0x3c')]['id']}})[_0x83a6('0x1e')](handleEntityNotFound(_0x6c1c1b,null))[_0x83a6('0x1e')](saveUpdates(_0x31539d['body'],null))[_0x83a6('0x1e')](respondWithResult(_0x6c1c1b,null))[_0x83a6('0x3a')](handleError(_0x6c1c1b,null));};exports[_0x83a6('0x1f')]=function(_0x1b453e,_0x3451d1){return db[_0x83a6('0x38')][_0x83a6('0x40')]({'where':{'id':_0x1b453e[_0x83a6('0x3c')]['id']}})[_0x83a6('0x1e')](handleEntityNotFound(_0x3451d1,null))[_0x83a6('0x1e')](removeEntity(_0x3451d1,null))[_0x83a6('0x3a')](handleError(_0x3451d1,null));};exports[_0x83a6('0x41')]=function(_0x20351d,_0x2c4d0a){return db[_0x83a6('0x38')][_0x83a6('0x41')]()[_0x83a6('0x1e')](respondWithResult(_0x2c4d0a,null))[_0x83a6('0x3a')](handleError(_0x2c4d0a,null));};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js
index ae1a71a..e1ab727 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 _0x814c=['uniqueid','../../config/logger','api','moment','bluebird','request-promise','rimraf','./chatTransferReport.attributes','ChatTransferReport','report_chat_transfer'];(function(_0x1ae4a3,_0x569904){var _0x392f69=function(_0x37051a){while(--_0x37051a){_0x1ae4a3['push'](_0x1ae4a3['shift']());}};_0x392f69(++_0x569904);}(_0x814c,0x137));var _0xc814=function(_0x4aedbb,_0x4952e6){_0x4aedbb=_0x4aedbb-0x0;var _0x33c1d8=_0x814c[_0x4aedbb];return _0x33c1d8;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xc814('0x0'))(_0xc814('0x1'));var moment=require(_0xc814('0x2'));var BPromise=require(_0xc814('0x3'));var rp=require(_0xc814('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc814('0x5'));var config=require('../../config/environment');var attributes=require(_0xc814('0x6'));module['exports']=function(_0x124f0d,_0x4be87c){return _0x124f0d['define'](_0xc814('0x7'),attributes,{'tableName':_0xc814('0x8'),'paranoid':![],'indexes':[{'name':_0xc814('0x9'),'fields':[_0xc814('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x93c3=['lodash','util','api','moment','request-promise','path','rimraf','../../config/environment','./chatTransferReport.attributes','exports','define','ChatTransferReport','report_chat_transfer','uniqueid'];(function(_0x323e6d,_0x353fbc){var _0x4170de=function(_0xd350b9){while(--_0xd350b9){_0x323e6d['push'](_0x323e6d['shift']());}};_0x4170de(++_0x353fbc);}(_0x93c3,0x142));var _0x393c=function(_0x2bf90d,_0x4d8f1b){_0x2bf90d=_0x2bf90d-0x0;var _0x568d9e=_0x93c3[_0x2bf90d];return _0x568d9e;};'use strict';var _=require(_0x393c('0x0'));var util=require(_0x393c('0x1'));var logger=require('../../config/logger')(_0x393c('0x2'));var moment=require(_0x393c('0x3'));var BPromise=require('bluebird');var rp=require(_0x393c('0x4'));var fs=require('fs');var path=require(_0x393c('0x5'));var rimraf=require(_0x393c('0x6'));var config=require(_0x393c('0x7'));var attributes=require(_0x393c('0x8'));module[_0x393c('0x9')]=function(_0xf0fc69,_0xa0270a){return _0xf0fc69[_0x393c('0xa')](_0x393c('0xb'),attributes,{'tableName':_0x393c('0xc'),'paranoid':![],'indexes':[{'name':_0x393c('0xd'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js
index fc6d952..157fc70 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 _0x5a2f=['lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','ChatTransferReport,\x20%s,\x20%s','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','catch'];(function(_0x461c18,_0x5605b9){var _0x35501c=function(_0x1cd251){while(--_0x1cd251){_0x461c18['push'](_0x461c18['shift']());}};_0x35501c(++_0x5605b9);}(_0x5a2f,0xf7));var _0xf5a2=function(_0x43014d,_0x2743c0){_0x43014d=_0x43014d-0x0;var _0x4148a1=_0x5a2f[_0x43014d];return _0x4148a1;};'use strict';var _=require(_0xf5a2('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf5a2('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf5a2('0x2'));var db=require(_0xf5a2('0x3'))['db'];var utils=require(_0xf5a2('0x4'));var logger=require(_0xf5a2('0x5'))('rpc');var config=require(_0xf5a2('0x6'));var jayson=require(_0xf5a2('0x7'));var client=jayson[_0xf5a2('0x8')][_0xf5a2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xf9d61e,_0x32d55a,_0xaa0144){return new BPromise(function(_0x545982,_0x52f0ff){return client['request'](_0xf9d61e,_0xaa0144)[_0xf5a2('0xa')](function(_0x2c8080){logger[_0xf5a2('0xb')](_0xf5a2('0xc'),_0x32d55a,'request\x20sent');logger['debug'](_0xf5a2('0xd'),_0x32d55a,'request\x20sent',JSON[_0xf5a2('0xe')](_0x2c8080));if(_0x2c8080[_0xf5a2('0xf')]){if(_0x2c8080[_0xf5a2('0xf')]['code']===0x1f4){logger[_0xf5a2('0xf')](_0xf5a2('0xc'),_0x32d55a,_0x2c8080['error'][_0xf5a2('0x10')]);return _0x52f0ff(_0x2c8080['error']['message']);}logger[_0xf5a2('0xf')]('ChatTransferReport,\x20%s,\x20%s',_0x32d55a,_0x2c8080[_0xf5a2('0xf')][_0xf5a2('0x10')]);return _0x545982(_0x2c8080[_0xf5a2('0xf')]['message']);}else{logger[_0xf5a2('0xb')]('ChatTransferReport,\x20%s,\x20%s',_0x32d55a,_0xf5a2('0x11'));_0x545982(_0x2c8080['result'][_0xf5a2('0x10')]);}})[_0xf5a2('0x12')](function(_0x2ce8b9){logger['error'](_0xf5a2('0xc'),_0x32d55a,_0x2ce8b9);_0x52f0ff(_0x2ce8b9);});});}
\ No newline at end of file
+var _0xc93e=['../../mysqldb','../../config/logger','rpc','../../config/environment','http','request','then','info','ChatTransferReport,\x20%s,\x20%s','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','moment','bluebird','randomstring','ioredis'];(function(_0x1d66b7,_0x5a4910){var _0x28c8c8=function(_0x5cdbc8){while(--_0x5cdbc8){_0x1d66b7['push'](_0x1d66b7['shift']());}};_0x28c8c8(++_0x5a4910);}(_0xc93e,0xee));var _0xec93=function(_0x1505e5,_0x5cc291){_0x1505e5=_0x1505e5-0x0;var _0x5b1dcd=_0xc93e[_0x1505e5];return _0x5b1dcd;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xec93('0x0'));var BPromise=require(_0xec93('0x1'));var rs=require(_0xec93('0x2'));var fs=require('fs');var Redis=require(_0xec93('0x3'));var db=require(_0xec93('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xec93('0x5'))(_0xec93('0x6'));var config=require(_0xec93('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xec93('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x31cb9c,_0x43b9dd,_0x2759c1){return new BPromise(function(_0x50312c,_0x224495){return client[_0xec93('0x9')](_0x31cb9c,_0x2759c1)[_0xec93('0xa')](function(_0x519add){logger[_0xec93('0xb')](_0xec93('0xc'),_0x43b9dd,'request\x20sent');logger[_0xec93('0xd')](_0xec93('0xe'),_0x43b9dd,_0xec93('0xf'),JSON[_0xec93('0x10')](_0x519add));if(_0x519add[_0xec93('0x11')]){if(_0x519add[_0xec93('0x11')][_0xec93('0x12')]===0x1f4){logger['error'](_0xec93('0xc'),_0x43b9dd,_0x519add[_0xec93('0x11')]['message']);return _0x224495(_0x519add[_0xec93('0x11')]['message']);}logger[_0xec93('0x11')](_0xec93('0xc'),_0x43b9dd,_0x519add['error'][_0xec93('0x13')]);return _0x50312c(_0x519add[_0xec93('0x11')][_0xec93('0x13')]);}else{logger[_0xec93('0xb')](_0xec93('0xc'),_0x43b9dd,_0xec93('0xf'));_0x50312c(_0x519add[_0xec93('0x14')][_0xec93('0x13')]);}})[_0xec93('0x15')](function(_0x8cc4ff){logger[_0xec93('0x11')]('ChatTransferReport,\x20%s,\x20%s',_0x43b9dd,_0x8cc4ff);_0x224495(_0x8cc4ff);});});}
\ No newline at end of file
diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js
index 2e432d0..e790afa 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 _0xbaf0=['connect-timeout','express','Router','../../components/auth/service','../../config/environment','./chatTransferReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create','put','update','delete','util','path'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xbaf0,0x12a));var _0x0baf=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xbaf0[_0x4cf98e];return _0x1623ac;};'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('0xf')]('/',auth[_0x0baf('0x9')](),controller[_0x0baf('0x10')]);router[_0x0baf('0x11')](_0x0baf('0xd'),auth[_0x0baf('0x9')](),controller[_0x0baf('0x12')]);router[_0x0baf('0x13')](_0x0baf('0xd'),auth[_0x0baf('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xb7e7=['multer','path','express','../../components/auth/service','../../config/environment','./chatTransferReport.controller','get','/describe','isAuthenticated','/:id','show','post','create','update','delete','destroy','exports'];(function(_0x4a8309,_0x19fc93){var _0x3940f1=function(_0x615935){while(--_0x615935){_0x4a8309['push'](_0x4a8309['shift']());}};_0x3940f1(++_0x19fc93);}(_0xb7e7,0x121));var _0x7b7e=function(_0x16d10f,_0x2ba2d5){_0x16d10f=_0x16d10f-0x0;var _0x50c823=_0xb7e7[_0x16d10f];return _0x50c823;};'use strict';var multer=require(_0x7b7e('0x0'));var util=require('util');var path=require(_0x7b7e('0x1'));var timeout=require('connect-timeout');var express=require(_0x7b7e('0x2'));var router=express['Router']();var auth=require(_0x7b7e('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x7b7e('0x4'));var controller=require(_0x7b7e('0x5'));router[_0x7b7e('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0x7b7e('0x6')](_0x7b7e('0x7'),auth[_0x7b7e('0x8')](),controller['describe']);router[_0x7b7e('0x6')](_0x7b7e('0x9'),auth[_0x7b7e('0x8')](),controller[_0x7b7e('0xa')]);router[_0x7b7e('0xb')]('/',auth[_0x7b7e('0x8')](),controller[_0x7b7e('0xc')]);router['put'](_0x7b7e('0x9'),auth[_0x7b7e('0x8')](),controller[_0x7b7e('0xd')]);router[_0x7b7e('0xe')](_0x7b7e('0x9'),auth[_0x7b7e('0x8')](),controller[_0x7b7e('0xf')]);module[_0x7b7e('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 df1b573..fa84a9b 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 _0x06fb=['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','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','exports','STRING','address','email','Agent','#9f946a','#ffffff','INTEGER','ENUM','rounded','squared','We\x20are\x20here!','Chat','Send','Contact\x20us','BOOLEAN','Powered\x20by\x20xCALLY','TEXT','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','thumb','star','stringify','name','input','onlineForm','getDataValue','setDataValue','textarea','Comments','Leave\x20your\x20comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.'];(function(_0x10e10b,_0x58bc2c){var _0xa118e7=function(_0x142b15){while(--_0x142b15){_0x10e10b['push'](_0x10e10b['shift']());}};_0xa118e7(++_0x58bc2c);}(_0x06fb,0x1c4));var _0xb06f=function(_0x5b3447,_0x52bef4){_0x5b3447=_0x5b3447-0x0;var _0x2c10bf=_0x06fb[_0x5b3447];return _0x2c10bf;};'use strict';var Sequelize=require('sequelize');var rs=require('randomstring');module[_0xb06f('0x0')]={'name':{'type':Sequelize[_0xb06f('0x1')],'allowNull':![]},'address':{'type':Sequelize[_0xb06f('0x1')],'allowNull':![],'unique':_0xb06f('0x2')},'description':{'type':Sequelize[_0xb06f('0x1')]},'mapKey':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x3')},'mapKeyOffline':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':'email'},'key':{'type':Sequelize[_0xb06f('0x1')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x4')},'customerAlias':{'type':Sequelize['STRING'],'defaultValue':'Me'},'color':{'type':Sequelize[_0xb06f('0x1')],'allowNull':![],'defaultValue':_0xb06f('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0xb06f('0x1')],'allowNull':![],'defaultValue':_0xb06f('0x5'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xb06f('0x1')],'allowNull':![],'defaultValue':_0xb06f('0x6'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0xb06f('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize[_0xb06f('0x1')]},'animation':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0xb06f('0x8')](_0xb06f('0x9'),_0xb06f('0xa')),'defaultValue':_0xb06f('0x9')},'header_online':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0xb')},'start_chat_button':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0xc')},'offline_chat_button':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0xd')},'header_offline':{'type':Sequelize['STRING'],'defaultValue':_0xb06f('0xe')},'download_transcript':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0xb06f('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x10')},'defaultWhiteLabel':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0xb06f('0x11')]},'closingQuestion':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':'Do\x20you\x20want\x20to\x20close\x20the\x20interaction?'},'formSubmitSuccessMessage':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x12')},'formSubmitFailureMessage':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x13')},'noteTitle':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x14')},'placeholderMessage':{'type':Sequelize['STRING'],'defaultValue':_0xb06f('0x15')},'closingMessage':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x16')},'closingMessageButton':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0xd')},'skipMessageButton':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x17')},'conditionAgreement':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize['STRING'],'defaultValue':'Feedback'},'ratingType':{'type':Sequelize[_0xb06f('0x8')]('star',_0xb06f('0x18')),'defaultValue':_0xb06f('0x19')},'ratingStarsNumber':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0xb06f('0x11')],'defaultValue':function(){return JSON[_0xb06f('0x1a')]({'items':[{'type':'input','variable':null,'config':{'placeholder':_0xb06f('0x1b'),'type':'text','required':!![]},'props':{'title':_0xb06f('0x1b'),'helpText':''}},{'type':_0xb06f('0x1c'),'props':{'title':_0xb06f('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0xb06f('0x3'),'type':_0xb06f('0x3')},'variable':null}],'fromKey':0x1});},'get':function(){return this['getDataValue'](_0xb06f('0x1d'))?JSON['parse'](this[_0xb06f('0x1e')](_0xb06f('0x1d'))):{};},'set':function(_0x273506){return this[_0xb06f('0x1f')]('onlineForm',JSON[_0xb06f('0x1a')](_0x273506));}},'offlineForm':{'type':Sequelize[_0xb06f('0x11')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0xb06f('0x1c'),'props':{'title':_0xb06f('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0xb06f('0x3'),'type':'email'},'variable':null},{'type':_0xb06f('0x20'),'config':{'placeholder':_0xb06f('0x21')},'props':{'title':_0xb06f('0x21'),'helpText':_0xb06f('0x22')}}],'fromKey':0x0});},'get':function(){return this['getDataValue'](_0xb06f('0x23'))?JSON['parse'](this[_0xb06f('0x1e')](_0xb06f('0x23'))):{};},'set':function(_0x41d835){return this['setDataValue'](_0xb06f('0x23'),JSON[_0xb06f('0x1a')](_0x41d835));}},'token':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':function(){return rs[_0xb06f('0x24')]();}},'autoclose':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0xb06f('0x1')]},'forwardOffline':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0xb06f('0x1')]},'waitingTitle':{'type':Sequelize['STRING'],'defaultValue':_0xb06f('0x25')},'waitingMessage':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':'Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.'},'offlineMessageSubject':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x26')},'offlineMessageBody':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x27')},'enableUnmanagedNote':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x28')},'skipUnmanaged':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x17')},'sendUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0xb06f('0xd')},'enableCustomerAttachment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentAvatar':{'type':Sequelize['TEXT']},'showAgentAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'timezone':{'type':Sequelize[_0xb06f('0x1')]},'notificationTemplate':{'type':Sequelize[_0xb06f('0x11')],'defaultValue':function(){return _0xb06f('0x29');}},'notificationSound':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x2a')},'waitForTheAssignedAgent':{'type':Sequelize[_0xb06f('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize[_0xb06f('0x7')],'defaultValue':0x1e},'messagesAlignment':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':'alternate'},'defaultTitle':{'type':Sequelize[_0xb06f('0x1')]},'customerAvatar':{'type':Sequelize[_0xb06f('0x11')]},'showCustomerAvatar':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'messageFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0xb06f('0x1')],'allowNull':![],'defaultValue':_0xb06f('0x2b'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xb06f('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xb06f('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0xb06f('0x1')],'defaultValue':_0xb06f('0x2c')},'systemAvatar':{'type':Sequelize[_0xb06f('0x11')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xb06f('0x7')],'comment':_0xb06f('0x2d')},'mandatoryDisposition':{'type':Sequelize[_0xb06f('0xf')],'defaultValue':![],'comment':_0xb06f('0x2e'),'set':function(_0x2e1534){if(!_0x2e1534)this[_0xb06f('0x1f')](_0xb06f('0x2f'),null);this['setDataValue'](_0xb06f('0x30'),_0x2e1534);}}};
\ No newline at end of file
+var _0x6bbb=['Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','Feedback','ENUM','thumb','stringify','input','name','text','onlineForm','parse','getDataValue','setDataValue','Comments','Leave\x20your\x20comments','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.','bottom_right','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','randomstring','exports','STRING','address','email','Agent','#9f946a','#ffffff','INTEGER','BOOLEAN','squared','rounded','We\x20are\x20here!','Chat','Send','Contact\x20us','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Form\x20submission\x20error'];(function(_0x16e4f3,_0x4aade7){var _0xa6bb8f=function(_0x55c78d){while(--_0x55c78d){_0x16e4f3['push'](_0x16e4f3['shift']());}};_0xa6bb8f(++_0x4aade7);}(_0x6bbb,0x82));var _0xb6bb=function(_0x53e3de,_0x13da7b){_0x53e3de=_0x53e3de-0x0;var _0x7b905b=_0x6bbb[_0x53e3de];return _0x7b905b;};'use strict';var Sequelize=require('sequelize');var rs=require(_0xb6bb('0x0'));module[_0xb6bb('0x1')]={'name':{'type':Sequelize[_0xb6bb('0x2')],'allowNull':![]},'address':{'type':Sequelize[_0xb6bb('0x2')],'allowNull':![],'unique':_0xb6bb('0x3')},'description':{'type':Sequelize[_0xb6bb('0x2')]},'mapKey':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x4')},'mapKeyOffline':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x4')},'key':{'type':Sequelize[_0xb6bb('0x2')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x5')},'customerAlias':{'type':Sequelize['STRING'],'defaultValue':'Me'},'color':{'type':Sequelize[_0xb6bb('0x2')],'allowNull':![],'defaultValue':_0xb6bb('0x6'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0xb6bb('0x2')],'allowNull':![],'defaultValue':'#9f946a','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xb6bb('0x2')],'allowNull':![],'defaultValue':_0xb6bb('0x7'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0xb6bb('0x8')],'defaultValue':0xf},'remote':{'type':Sequelize[_0xb6bb('0x2')]},'animation':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM']('rounded',_0xb6bb('0xa')),'defaultValue':_0xb6bb('0xb')},'header_online':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0xc')},'start_chat_button':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0xd')},'offline_chat_button':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0xe')},'header_offline':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0xf')},'download_transcript':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0xb6bb('0x8')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':'Powered\x20by\x20xCALLY'},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0xb6bb('0x10')]},'closingQuestion':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0x11')},'formSubmitSuccessMessage':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x12')},'formSubmitFailureMessage':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0x13')},'noteTitle':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0x14')},'placeholderMessage':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x15')},'closingMessage':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x16')},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0xe')},'skipMessageButton':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x17')},'conditionAgreement':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'enableRating':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x18')},'ratingType':{'type':Sequelize[_0xb6bb('0x19')]('star',_0xb6bb('0x1a')),'defaultValue':'star'},'ratingStarsNumber':{'type':Sequelize[_0xb6bb('0x8')],'defaultValue':0x5},'onlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0xb6bb('0x1b')]({'items':[{'type':_0xb6bb('0x1c'),'variable':null,'config':{'placeholder':_0xb6bb('0x1d'),'type':_0xb6bb('0x1e'),'required':!![]},'props':{'title':'name','helpText':''}},{'type':_0xb6bb('0x1c'),'props':{'title':_0xb6bb('0x4'),'helpText':''},'config':{'required':!![],'placeholder':_0xb6bb('0x4'),'type':_0xb6bb('0x4')},'variable':null}],'fromKey':0x1});},'get':function(){return this['getDataValue'](_0xb6bb('0x1f'))?JSON[_0xb6bb('0x20')](this[_0xb6bb('0x21')](_0xb6bb('0x1f'))):{};},'set':function(_0x5ae8b1){return this[_0xb6bb('0x22')](_0xb6bb('0x1f'),JSON[_0xb6bb('0x1b')](_0x5ae8b1));}},'offlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0xb6bb('0x1b')]({'items':[{'type':_0xb6bb('0x1c'),'props':{'title':_0xb6bb('0x4'),'helpText':''},'config':{'required':!![],'placeholder':_0xb6bb('0x4'),'type':_0xb6bb('0x4')},'variable':null},{'type':'textarea','config':{'placeholder':_0xb6bb('0x23')},'props':{'title':_0xb6bb('0x23'),'helpText':_0xb6bb('0x24')}}],'fromKey':0x0});},'get':function(){return this[_0xb6bb('0x21')](_0xb6bb('0x25'))?JSON[_0xb6bb('0x20')](this[_0xb6bb('0x21')]('offlineForm')):{};},'set':function(_0x47d610){return this['setDataValue'](_0xb6bb('0x25'),JSON[_0xb6bb('0x1b')](_0x47d610));}},'token':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':function(){return rs['generate']();}},'autoclose':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0xb6bb('0x2')]},'forwardOffline':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize['STRING']},'waitingTitle':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':'All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.'},'waitingMessage':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0x26')},'offlineMessageSubject':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x27')},'offlineMessageBody':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x28')},'enableUnmanagedNote':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0x29')},'skipUnmanaged':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x17')},'sendUnmanaged':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':'Send'},'enableCustomerAttachment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0xb6bb('0x10')]},'showAgentAvatar':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'timezone':{'type':Sequelize[_0xb6bb('0x2')]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return'Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize['STRING'],'defaultValue':'website_alias'},'waitForTheAssignedAgent':{'type':Sequelize[_0xb6bb('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x2a')},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'messagesAlignment':{'type':Sequelize[_0xb6bb('0x2')],'defaultValue':_0xb6bb('0x2b')},'defaultTitle':{'type':Sequelize[_0xb6bb('0x2')]},'customerAvatar':{'type':Sequelize[_0xb6bb('0x10')]},'showCustomerAvatar':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0xb6bb('0x8')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0xb6bb('0x2')],'allowNull':![],'defaultValue':_0xb6bb('0x2c'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xb6bb('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xb6bb('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize['STRING'],'defaultValue':_0xb6bb('0x2d')},'systemAvatar':{'type':Sequelize['TEXT']},'mandatoryDispositionPauseId':{'type':Sequelize[_0xb6bb('0x8')],'comment':_0xb6bb('0x2e')},'mandatoryDisposition':{'type':Sequelize[_0xb6bb('0x9')],'defaultValue':![],'comment':_0xb6bb('0x2f'),'set':function(_0x38970b){if(!_0x38970b)this[_0xb6bb('0x22')](_0xb6bb('0x30'),null);this[_0xb6bb('0x22')](_0xb6bb('0x31'),_0x38970b);}}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js
index 87aac43..ec5e880 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 _0x0c28=['filename','addAvatar','agentAvatar','file','addCustomerAvatar','customerAvatar','systemAvatar','getLogo','join','root','server/files/images/logos/default_logo.png','sitepic','../../config/license/util','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','getCustomerAvatar','showCustomerAvatar','getSystemAvatar','server/files/images/avatars/system_avatar.png','notify','user-agent-parser','setUA','user-agent','chat','CmContact','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','from','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','CmList','List','DESC','Applications','account','applications','list','orderBy','priority','Contacts','contact','customerIp','cf-connecting-ip','headers','x-forwarded-for','first','split','firstName','lastName','x-real-port','browser','version','format','%s\x20%s','unknown','vendor','device','threadId','ChatInteraction','externalUrl','ContactId','interaction','spread','messageId','created','autoclose','push','unmanaged','ChatMessage','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','forcedOwnership','Start','EventManager','offline','send','from\x20is\x20mandatory','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','findOrCreate','server/files/templates/chatOfflineMessage.ejs','utf8','offlineMessageBody','MailAccount','MailServerOut','Smtp','service','host','port','secure','pass','SendMail','sendMail','\x22%s\x22\x20<%s>','email','forwardOfflineAddress','offlineMessageSubject','addInteraction','omit','fullname','internal','Tag','tag','Command','getSnippet','iftime\x20%s,%s','interval','iftime\x20%s','indexOf','true','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','OFFLINE','timezone','No\x20timezone','inspect','Interval','Intervals','getProactiveActions','virtual','increment','chatLicenseExceeded','all','some','readFileSync','server/files/chat/iframe.js','remote','connection','referer','replace','render','verticalAlignment','color','addApplications','sequelize','transaction','ChatApplication','findAndCountAll','getApplications','addProactiveActions','chatProactiveAction','getFields','false','offlineForm','items','fromKey','getOfflineMessages','ChatOfflineMessage','addAgents','emit','removeAgents','isArray','userChatWebsite:remove','getAgents','html-pdf','eml-format','rimraf','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','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','ChatWebsite,\x20%s,\x20%s','message','catch','sendStatus','status','end','json','offset','limit','set','apply','reject','save','update','then','destroy','get','UserProfileResource','stack','name','index','mandatoryDispositionPause','map','ChatWebsite','rawAttributes','type','key','model','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','filters','pick','filter','where','merge','VIRTUAL','count','includeAll','include','rows','show','params','Pause','length','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','ChatWebsites','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','describe','addDisposition','ChatWebsiteId','Disposition','keys','sort','findAll','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','findOne','removeAnswers','addLogo'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0c28,0xab));var _0x80c2=function(_0xb599b6,_0x1d68fd){_0xb599b6=_0xb599b6-0x0;var _0x490556=_0x0c28[_0xb599b6];return _0x490556;};'use strict';var pdf=require(_0x80c2('0x0'));var emlformat=require(_0x80c2('0x1'));var rimraf=require(_0x80c2('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x80c2('0x3'));var rp=require(_0x80c2('0x4'));var moment=require(_0x80c2('0x5'));var BPromise=require(_0x80c2('0x6'));var Mustache=require(_0x80c2('0x7'));var util=require(_0x80c2('0x8'));var path=require(_0x80c2('0x9'));var sox=require(_0x80c2('0xa'));var csv=require(_0x80c2('0xb'));var ejs=require(_0x80c2('0xc'));var fs=require('fs');var _=require(_0x80c2('0xd'));var squel=require(_0x80c2('0xe'));var crypto=require(_0x80c2('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x80c2('0x10'));var toCsv=require(_0x80c2('0xb'));var querystring=require(_0x80c2('0x11'));var Papa=require('papaparse');var Redis=require(_0x80c2('0x12'));var authService=require(_0x80c2('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x80c2('0x14'));var logger=require(_0x80c2('0x15'))(_0x80c2('0x16'));var utils=require(_0x80c2('0x17'));var config=require(_0x80c2('0x18'));var db=require(_0x80c2('0x19'))['db'];config[_0x80c2('0x1a')]=_[_0x80c2('0x1b')](config['redis'],{'host':_0x80c2('0x1c'),'port':0x18eb});var socket=require(_0x80c2('0x1d'))(new Redis(config[_0x80c2('0x1a')]));require(_0x80c2('0x1e'))[_0x80c2('0x1f')](socket);var jayson=require(_0x80c2('0x20'));var client=jayson[_0x80c2('0x21')]['http']({'port':0x232c});var client9002=jayson[_0x80c2('0x21')]['http']({'port':0x232a});var client9003=jayson[_0x80c2('0x21')][_0x80c2('0x22')]({'port':0x232b});function checkPasswordPattern(_0x42ff0d,_0x1bb4ef,_0x5721d4){if(_0x5721d4){var _0x2e67c7=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2e67c7[_0x80c2('0x23')](_0x1bb4ef)){return _0x42ff0d;}else{throw new db[(_0x80c2('0x24'))][(_0x80c2('0x25'))](_0x80c2('0x26'));}}else{return _0x42ff0d;}}function respondWithRpcPromise(_0x4158de,_0x121ec9,_0x10ce3b,_0x4bff89){return new BPromise(function(_0xb99493,_0x813a94){var _0x43f4c2=_0x4bff89||client;return _0x43f4c2[_0x80c2('0x27')](_0x4158de,_0x10ce3b)['then'](function(_0x12f3f6){logger[_0x80c2('0x28')]('ChatWebsite,\x20%s,\x20%s',_0x121ec9,_0x80c2('0x29'));logger[_0x80c2('0x2a')](_0x80c2('0x2b'),_0x121ec9,_0x80c2('0x29'),JSON[_0x80c2('0x2c')](_0x12f3f6));if(_0x12f3f6['error']){if(_0x12f3f6['error']['code']===0x1f4){logger[_0x80c2('0x2d')](_0x80c2('0x2e'),_0x121ec9,_0x12f3f6[_0x80c2('0x2d')]['message']);return _0x813a94(_0x12f3f6[_0x80c2('0x2d')]['message']);}logger['error']('ChatWebsite,\x20%s,\x20%s',_0x121ec9,_0x12f3f6[_0x80c2('0x2d')]['message']);return _0xb99493(_0x12f3f6[_0x80c2('0x2d')]['message']);}else{logger[_0x80c2('0x28')](_0x80c2('0x2e'),_0x121ec9,_0x80c2('0x29'));_0xb99493(_0x12f3f6['result'][_0x80c2('0x2f')]);}})[_0x80c2('0x30')](function(_0x93c01c){logger['error'](_0x80c2('0x2e'),_0x121ec9,_0x93c01c);_0x813a94(_0x93c01c);});});}function respondWithStatusCode(_0x5af318,_0x3bc280){_0x3bc280=_0x3bc280||0xcc;return function(_0x31aef6){if(_0x31aef6){return _0x5af318[_0x80c2('0x31')](_0x3bc280);}return _0x5af318[_0x80c2('0x32')](_0x3bc280)[_0x80c2('0x33')]();};}function respondWithResult(_0x222040,_0x4fd76f){_0x4fd76f=_0x4fd76f||0xc8;return function(_0x2b00e8){if(_0x2b00e8){return _0x222040[_0x80c2('0x32')](_0x4fd76f)[_0x80c2('0x34')](_0x2b00e8);}};}function respondWithFilteredResult(_0x125bdf,_0x23a1ec){return function(_0x1d4301){if(_0x1d4301){var _0xc04f95=_0x1d4301['count'],_0x230f1c=_0x23a1ec['offset'],_0x59efcc=_0x23a1ec[_0x80c2('0x35')]+_0x23a1ec[_0x80c2('0x36')],_0x47d4af;if(_0x59efcc>=_0xc04f95){_0x59efcc=_0xc04f95;_0x47d4af=0xc8;}else{_0x47d4af=0xce;}_0x125bdf[_0x80c2('0x32')](_0x47d4af);return _0x125bdf[_0x80c2('0x37')]('Content-Range',_0x230f1c+'-'+_0x59efcc+'/'+_0xc04f95)[_0x80c2('0x34')](_0x1d4301);}return null;};}function patchUpdates(_0x116b20){return function(_0x5528bd){try{jsonpatch[_0x80c2('0x38')](_0x5528bd,_0x116b20,!![]);}catch(_0x2f5530){return BPromise[_0x80c2('0x39')](_0x2f5530);}return _0x5528bd[_0x80c2('0x3a')]();};}function saveUpdates(_0x327200,_0x46319b){return function(_0x337998){if(_0x337998){return _0x337998[_0x80c2('0x3b')](_0x327200)[_0x80c2('0x3c')](function(_0x30e0fd){return _0x30e0fd;});}return null;};}function removeEntity(_0x446a22,_0x282641){return function(_0x2a04eb){if(_0x2a04eb){return _0x2a04eb[_0x80c2('0x3d')]()['then'](function(){var _0x7d4cfb=_0x2a04eb[_0x80c2('0x3e')]({'plain':!![]});var _0xdb6731='ChatWebsites';return db[_0x80c2('0x3f')][_0x80c2('0x3d')]({'where':{'type':_0xdb6731,'resourceId':_0x7d4cfb['id']}})[_0x80c2('0x3c')](function(){return _0x2a04eb;});})[_0x80c2('0x3c')](function(){_0x446a22[_0x80c2('0x32')](0xcc)[_0x80c2('0x33')]();});}};}function handleEntityNotFound(_0x270fe9,_0x290406){return function(_0x1689f3){if(!_0x1689f3){_0x270fe9[_0x80c2('0x31')](0x194);}return _0x1689f3;};}function handleError(_0x3a2656,_0x4669af){_0x4669af=_0x4669af||0x1f4;return function(_0x4953af){logger[_0x80c2('0x2d')](_0x4953af[_0x80c2('0x40')]);if(_0x4953af[_0x80c2('0x41')]){delete _0x4953af[_0x80c2('0x41')];}_0x3a2656[_0x80c2('0x32')](_0x4669af)['send'](_0x4953af);};}exports[_0x80c2('0x42')]=function(_0x3ea739,_0x221ed0){var _0x32074c={'include':[{'model':db['Pause'],'as':_0x80c2('0x43')}]},_0x41a3c7={},_0x1b833f={'count':0x0,'rows':[]};var _0xe54e96=_[_0x80c2('0x44')](db[_0x80c2('0x45')][_0x80c2('0x46')],function(_0x426d9c){return{'name':_0x426d9c['fieldName'],'type':_0x426d9c[_0x80c2('0x47')][_0x80c2('0x48')]};});_0x41a3c7[_0x80c2('0x49')]=_[_0x80c2('0x44')](_0xe54e96,_0x80c2('0x41'));_0x41a3c7[_0x80c2('0x4a')]=_['keys'](_0x3ea739[_0x80c2('0x4a')]);_0x41a3c7['filters']=_[_0x80c2('0x4b')](_0x41a3c7[_0x80c2('0x49')],_0x41a3c7['query']);_0x32074c[_0x80c2('0x4c')]=_['intersection'](_0x41a3c7[_0x80c2('0x49')],qs['fields'](_0x3ea739[_0x80c2('0x4a')][_0x80c2('0x4d')]));_0x32074c['attributes']=_0x32074c['attributes']['length']?_0x32074c[_0x80c2('0x4c')]:_0x41a3c7['model'];if(!_0x3ea739[_0x80c2('0x4a')][_0x80c2('0x4e')](_0x80c2('0x4f'))){_0x32074c[_0x80c2('0x36')]=qs[_0x80c2('0x36')](_0x3ea739[_0x80c2('0x4a')][_0x80c2('0x36')]);_0x32074c[_0x80c2('0x35')]=qs[_0x80c2('0x35')](_0x3ea739[_0x80c2('0x4a')][_0x80c2('0x35')]);}_0x32074c[_0x80c2('0x50')]=qs['sort'](_0x3ea739[_0x80c2('0x4a')]['sort']);_0x32074c['where']=qs[_0x80c2('0x51')](_[_0x80c2('0x52')](_0x3ea739[_0x80c2('0x4a')],_0x41a3c7['filters']));if(_0x3ea739[_0x80c2('0x4a')][_0x80c2('0x53')]){_0x32074c[_0x80c2('0x54')]=_[_0x80c2('0x55')](_0x32074c[_0x80c2('0x54')],{'$or':_[_0x80c2('0x44')](_0xe54e96,function(_0x33ca70){if(_0x33ca70[_0x80c2('0x47')]!==_0x80c2('0x56')){var _0x315dd3={};_0x315dd3[_0x33ca70[_0x80c2('0x41')]]={'$like':'%'+_0x3ea739[_0x80c2('0x4a')]['filter']+'%'};return _0x315dd3;}})});}_0x32074c=_[_0x80c2('0x55')]({},_0x32074c,_0x3ea739['options']);var _0x4548ba={'where':_0x32074c[_0x80c2('0x54')]};return db['ChatWebsite'][_0x80c2('0x57')](_0x4548ba)[_0x80c2('0x3c')](function(_0x26830d){_0x1b833f[_0x80c2('0x57')]=_0x26830d;if(_0x3ea739['query'][_0x80c2('0x58')]){_0x32074c[_0x80c2('0x59')]=[{'all':!![]}];}return db[_0x80c2('0x45')]['findAll'](_0x32074c);})[_0x80c2('0x3c')](function(_0x3aa71e){_0x1b833f[_0x80c2('0x5a')]=_0x3aa71e;return _0x1b833f;})[_0x80c2('0x3c')](respondWithFilteredResult(_0x221ed0,_0x32074c))['catch'](handleError(_0x221ed0,null));};exports[_0x80c2('0x5b')]=function(_0x399551,_0x206ed2){var _0x2f7d73={'raw':![],'where':{'id':_0x399551[_0x80c2('0x5c')]['id']},'include':[{'model':db[_0x80c2('0x5d')],'as':'mandatoryDispositionPause'}]},_0x56da06={};_0x56da06[_0x80c2('0x49')]=_['keys'](db['ChatWebsite'][_0x80c2('0x46')]);_0x56da06[_0x80c2('0x4a')]=_['keys'](_0x399551[_0x80c2('0x4a')]);_0x56da06[_0x80c2('0x51')]=_[_0x80c2('0x4b')](_0x56da06[_0x80c2('0x49')],_0x56da06[_0x80c2('0x4a')]);_0x2f7d73[_0x80c2('0x4c')]=_['intersection'](_0x56da06[_0x80c2('0x49')],qs[_0x80c2('0x4d')](_0x399551[_0x80c2('0x4a')][_0x80c2('0x4d')]));_0x2f7d73[_0x80c2('0x4c')]=_0x2f7d73['attributes'][_0x80c2('0x5e')]?_0x2f7d73[_0x80c2('0x4c')]:_0x56da06[_0x80c2('0x49')];if(_0x399551[_0x80c2('0x4a')]['includeAll']){_0x2f7d73['include']=[{'all':!![]}];}_0x2f7d73=_[_0x80c2('0x55')]({},_0x2f7d73,_0x399551[_0x80c2('0x5f')]);return db[_0x80c2('0x45')]['find'](_0x2f7d73)[_0x80c2('0x3c')](handleEntityNotFound(_0x206ed2,null))[_0x80c2('0x3c')](respondWithResult(_0x206ed2,null))['catch'](handleError(_0x206ed2,null));};exports['create']=function(_0x5ebcb0,_0x3db6d5){return db[_0x80c2('0x45')][_0x80c2('0x60')](_0x5ebcb0[_0x80c2('0x61')],{})[_0x80c2('0x3c')](function(_0xb2d1b6){var _0x2c9786=_0x5ebcb0[_0x80c2('0x62')][_0x80c2('0x3e')]({'plain':!![]});if(!_0x2c9786)throw new Error(_0x80c2('0x63'));if(_0x2c9786['role']==='user'){var _0x3f5f62=_0xb2d1b6[_0x80c2('0x3e')]({'plain':!![]});var _0x5c9fbb=_0x80c2('0x64');return db[_0x80c2('0x65')]['find']({'where':{'name':_0x5c9fbb,'userProfileId':_0x2c9786[_0x80c2('0x66')]},'raw':!![]})[_0x80c2('0x3c')](function(_0x46cdbd){if(_0x46cdbd&&_0x46cdbd[_0x80c2('0x67')]===0x0){return db[_0x80c2('0x3f')][_0x80c2('0x60')]({'name':_0x3f5f62['name'],'resourceId':_0x3f5f62['id'],'type':_0x46cdbd['name'],'sectionId':_0x46cdbd['id']},{})['then'](function(){return _0xb2d1b6;});}else{return _0xb2d1b6;}})[_0x80c2('0x30')](function(_0x5253cb){logger['error'](_0x80c2('0x68'),_0x5253cb);throw _0x5253cb;});}return _0xb2d1b6;})[_0x80c2('0x3c')](respondWithResult(_0x3db6d5,0xc9))[_0x80c2('0x30')](handleError(_0x3db6d5,null));};exports[_0x80c2('0x3b')]=function(_0x50753b,_0x1557b7){if(_0x50753b[_0x80c2('0x61')]['id']){delete _0x50753b[_0x80c2('0x61')]['id'];}return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x50753b['params']['id']},'include':[{'model':db[_0x80c2('0x5d')],'as':_0x80c2('0x43')}]})['then'](handleEntityNotFound(_0x1557b7,null))[_0x80c2('0x3c')](saveUpdates(_0x50753b['body'],null))[_0x80c2('0x3c')](respondWithResult(_0x1557b7,null))[_0x80c2('0x30')](handleError(_0x1557b7,null));};exports[_0x80c2('0x3d')]=function(_0x4261f2,_0xee78b){return db['ChatWebsite'][_0x80c2('0x69')]({'where':{'id':_0x4261f2[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0xee78b,null))[_0x80c2('0x3c')](removeEntity(_0xee78b,null))[_0x80c2('0x30')](handleError(_0xee78b,null));};exports[_0x80c2('0x6a')]=function(_0x313d53,_0x2ebf94){return db['ChatWebsite'][_0x80c2('0x6a')]()[_0x80c2('0x3c')](respondWithResult(_0x2ebf94,null))[_0x80c2('0x30')](handleError(_0x2ebf94,null));};exports[_0x80c2('0x6b')]=function(_0x23f985,_0x4915b0,_0x52cf12){if(_0x23f985['body']['id']){delete _0x23f985[_0x80c2('0x61')]['id'];}return db[_0x80c2('0x45')]['find']({'where':{'id':_0x23f985[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x4915b0,null))['then'](function(_0x55f644){if(_0x55f644){_0x23f985[_0x80c2('0x61')][_0x80c2('0x6c')]=_0x55f644['id'];return db[_0x80c2('0x6d')][_0x80c2('0x60')](_0x23f985[_0x80c2('0x61')]);}})[_0x80c2('0x3c')](respondWithResult(_0x4915b0,null))[_0x80c2('0x30')](handleError(_0x4915b0,null));};exports['getDispositions']=function(_0x133fe0,_0x571fbb,_0x524460){var _0x1f6bce={'raw':![],'where':{}};var _0x160a9f={};var _0x3ba57a={'count':0x0,'rows':[]};return db[_0x80c2('0x45')]['findOne']({'where':{'id':_0x133fe0['params']['id']}})['then'](handleEntityNotFound(_0x571fbb,null))['then'](function(_0x1f7eaa){if(_0x1f7eaa){_0x160a9f[_0x80c2('0x49')]=_[_0x80c2('0x6e')](db[_0x80c2('0x6d')][_0x80c2('0x46')]);_0x160a9f[_0x80c2('0x4a')]=_['keys'](_0x133fe0[_0x80c2('0x4a')]);_0x160a9f[_0x80c2('0x51')]=_[_0x80c2('0x4b')](_0x160a9f[_0x80c2('0x49')],_0x160a9f['query']);_0x1f6bce[_0x80c2('0x4c')]=_[_0x80c2('0x4b')](_0x160a9f[_0x80c2('0x49')],qs[_0x80c2('0x4d')](_0x133fe0['query'][_0x80c2('0x4d')]));_0x1f6bce['attributes']=_0x1f6bce[_0x80c2('0x4c')]['length']?_0x1f6bce[_0x80c2('0x4c')]:_0x160a9f[_0x80c2('0x49')];if(!_0x133fe0[_0x80c2('0x4a')]['hasOwnProperty'](_0x80c2('0x4f'))){_0x1f6bce['limit']=qs['limit'](_0x133fe0[_0x80c2('0x4a')]['limit']);_0x1f6bce[_0x80c2('0x35')]=qs[_0x80c2('0x35')](_0x133fe0[_0x80c2('0x4a')]['offset']);}_0x1f6bce[_0x80c2('0x50')]=qs[_0x80c2('0x6f')](_0x133fe0[_0x80c2('0x4a')][_0x80c2('0x6f')]);_0x1f6bce[_0x80c2('0x54')]=qs[_0x80c2('0x51')](_[_0x80c2('0x52')](_0x133fe0[_0x80c2('0x4a')],_0x160a9f[_0x80c2('0x51')]));_0x1f6bce[_0x80c2('0x54')][_0x80c2('0x6c')]=_0x1f7eaa['id'];if(_0x133fe0[_0x80c2('0x4a')][_0x80c2('0x53')]){_0x1f6bce['where']=_[_0x80c2('0x55')](_0x1f6bce[_0x80c2('0x54')],{'$or':_[_0x80c2('0x44')](_0x1f6bce[_0x80c2('0x4c')],function(_0x2f3a1d){var _0x3e64d8={};_0x3e64d8[_0x2f3a1d]={'$like':'%'+_0x133fe0['query'][_0x80c2('0x53')]+'%'};return _0x3e64d8;})});}_0x1f6bce=_[_0x80c2('0x55')]({},_0x1f6bce,_0x133fe0[_0x80c2('0x5f')]);return db[_0x80c2('0x6d')][_0x80c2('0x57')]({'where':_0x1f6bce[_0x80c2('0x54')]})[_0x80c2('0x3c')](function(_0x151b41){_0x3ba57a[_0x80c2('0x57')]=_0x151b41;if(_0x133fe0[_0x80c2('0x4a')][_0x80c2('0x58')]){_0x1f6bce['include']=[{'all':!![]}];}return db[_0x80c2('0x6d')][_0x80c2('0x70')](_0x1f6bce);})[_0x80c2('0x3c')](function(_0x18e328){_0x3ba57a['rows']=_0x18e328;return _0x3ba57a;});}})['then'](respondWithFilteredResult(_0x571fbb,_0x1f6bce))[_0x80c2('0x30')](handleError(_0x571fbb,null));};exports[_0x80c2('0x71')]=function(_0x2bb54d,_0x3b9e87,_0x31b0e2){return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x2bb54d[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x3b9e87,null))['then'](function(_0x3079b7){if(_0x3079b7){return _0x3079b7[_0x80c2('0x71')](_0x2bb54d['query'][_0x80c2('0x72')]);}})[_0x80c2('0x3c')](respondWithStatusCode(_0x3b9e87,null))[_0x80c2('0x30')](handleError(_0x3b9e87,null));};exports[_0x80c2('0x73')]=function(_0x28bdb5,_0x3521c1,_0x351910){if(_0x28bdb5[_0x80c2('0x61')]['id']){delete _0x28bdb5['body']['id'];}return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x28bdb5[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x3521c1,null))[_0x80c2('0x3c')](function(_0x2a4481){if(_0x2a4481){_0x28bdb5[_0x80c2('0x61')][_0x80c2('0x6c')]=_0x2a4481['id'];return db[_0x80c2('0x74')][_0x80c2('0x60')](_0x28bdb5[_0x80c2('0x61')]);}})['then'](respondWithResult(_0x3521c1,null))['catch'](handleError(_0x3521c1,null));};exports[_0x80c2('0x75')]=function(_0x4700e7,_0x61b4d0,_0x2c11c2){var _0x4b9b97={'raw':![],'where':{}};var _0x751e5d={};var _0x1c207d={'count':0x0,'rows':[]};return db[_0x80c2('0x45')][_0x80c2('0x76')]({'where':{'id':_0x4700e7[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x61b4d0,null))[_0x80c2('0x3c')](function(_0x3622bf){if(_0x3622bf){_0x751e5d['model']=_[_0x80c2('0x6e')](db[_0x80c2('0x74')][_0x80c2('0x46')]);_0x751e5d['query']=_[_0x80c2('0x6e')](_0x4700e7[_0x80c2('0x4a')]);_0x751e5d[_0x80c2('0x51')]=_[_0x80c2('0x4b')](_0x751e5d[_0x80c2('0x49')],_0x751e5d[_0x80c2('0x4a')]);_0x4b9b97[_0x80c2('0x4c')]=_[_0x80c2('0x4b')](_0x751e5d[_0x80c2('0x49')],qs[_0x80c2('0x4d')](_0x4700e7['query'][_0x80c2('0x4d')]));_0x4b9b97[_0x80c2('0x4c')]=_0x4b9b97[_0x80c2('0x4c')][_0x80c2('0x5e')]?_0x4b9b97[_0x80c2('0x4c')]:_0x751e5d[_0x80c2('0x49')];if(!_0x4700e7[_0x80c2('0x4a')][_0x80c2('0x4e')](_0x80c2('0x4f'))){_0x4b9b97['limit']=qs[_0x80c2('0x36')](_0x4700e7[_0x80c2('0x4a')]['limit']);_0x4b9b97['offset']=qs[_0x80c2('0x35')](_0x4700e7['query'][_0x80c2('0x35')]);}_0x4b9b97['order']=qs['sort'](_0x4700e7[_0x80c2('0x4a')][_0x80c2('0x6f')]);_0x4b9b97['where']=qs['filters'](_[_0x80c2('0x52')](_0x4700e7['query'],_0x751e5d[_0x80c2('0x51')]));_0x4b9b97[_0x80c2('0x54')][_0x80c2('0x6c')]=_0x3622bf['id'];if(_0x4700e7[_0x80c2('0x4a')][_0x80c2('0x53')]){_0x4b9b97[_0x80c2('0x54')]=_['merge'](_0x4b9b97['where'],{'$or':_[_0x80c2('0x44')](_0x4b9b97[_0x80c2('0x4c')],function(_0x5cf2c8){var _0x1579b3={};_0x1579b3[_0x5cf2c8]={'$like':'%'+_0x4700e7[_0x80c2('0x4a')]['filter']+'%'};return _0x1579b3;})});}_0x4b9b97=_[_0x80c2('0x55')]({},_0x4b9b97,_0x4700e7['options']);return db[_0x80c2('0x74')][_0x80c2('0x57')]({'where':_0x4b9b97[_0x80c2('0x54')]})['then'](function(_0x3e130c){_0x1c207d['count']=_0x3e130c;if(_0x4700e7[_0x80c2('0x4a')][_0x80c2('0x58')]){_0x4b9b97[_0x80c2('0x59')]=[{'all':!![]}];}return db[_0x80c2('0x74')]['findAll'](_0x4b9b97);})[_0x80c2('0x3c')](function(_0x2091f0){_0x1c207d[_0x80c2('0x5a')]=_0x2091f0;return _0x1c207d;});}})[_0x80c2('0x3c')](respondWithFilteredResult(_0x61b4d0,_0x4b9b97))['catch'](handleError(_0x61b4d0,null));};exports['removeAnswers']=function(_0x440f08,_0x2c9695,_0x419449){return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x440f08[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x2c9695,null))['then'](function(_0x1efc14){if(_0x1efc14){return _0x1efc14[_0x80c2('0x77')](_0x440f08[_0x80c2('0x4a')][_0x80c2('0x72')]);}})[_0x80c2('0x3c')](respondWithStatusCode(_0x2c9695,null))[_0x80c2('0x30')](handleError(_0x2c9695,null));};exports[_0x80c2('0x78')]=function(_0x190352,_0x3d71fb,_0x413772){_0x190352[_0x80c2('0x61')]['sitepic']=_0x190352['file'][_0x80c2('0x79')];return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x190352[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x3d71fb,null))[_0x80c2('0x3c')](saveUpdates(_0x190352['body'],null))[_0x80c2('0x3c')](respondWithResult(_0x3d71fb,null))[_0x80c2('0x30')](handleError(_0x3d71fb,null));};exports[_0x80c2('0x7a')]=function(_0x470140,_0x487d70,_0x581955){_0x470140[_0x80c2('0x61')][_0x80c2('0x7b')]=_0x470140[_0x80c2('0x7c')][_0x80c2('0x79')];return db['ChatWebsite'][_0x80c2('0x69')]({'where':{'id':_0x470140[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x487d70,null))[_0x80c2('0x3c')](saveUpdates(_0x470140[_0x80c2('0x61')],null))[_0x80c2('0x3c')](respondWithResult(_0x487d70,null))[_0x80c2('0x30')](handleError(_0x487d70,null));};exports[_0x80c2('0x7d')]=function(_0x1c1ad8,_0x41c00c,_0x5566ba){_0x1c1ad8['body'][_0x80c2('0x7e')]=_0x1c1ad8['file']['filename'];return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x1c1ad8['params']['id']}})['then'](handleEntityNotFound(_0x41c00c,null))[_0x80c2('0x3c')](saveUpdates(_0x1c1ad8[_0x80c2('0x61')],null))['then'](respondWithResult(_0x41c00c,null))[_0x80c2('0x30')](handleError(_0x41c00c,null));};exports['addSystemAvatar']=function(_0x14570b,_0x4b1f64,_0x1b96c1){_0x14570b[_0x80c2('0x61')][_0x80c2('0x7f')]=_0x14570b[_0x80c2('0x7c')][_0x80c2('0x79')];return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x14570b[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x4b1f64,null))['then'](saveUpdates(_0x14570b[_0x80c2('0x61')],null))[_0x80c2('0x3c')](respondWithResult(_0x4b1f64,null))['catch'](handleError(_0x4b1f64,null));};exports[_0x80c2('0x80')]=function(_0x257c49,_0x2bac3f,_0x2cacad){var _0x2e8add=path[_0x80c2('0x81')](config[_0x80c2('0x82')],_0x80c2('0x83'));var _0x490499={'where':{'id':_0x257c49[_0x80c2('0x5c')]['id']},'attributes':['id',_0x80c2('0x84')],'raw':!![]};var _0x2b0c2b=![];return require(_0x80c2('0x85'))[_0x80c2('0x86')]()['then'](function(_0xdf371c){if(_0xdf371c){_0x2b0c2b=_0xdf371c[_0x80c2('0x87')];}})[_0x80c2('0x3c')](function(){return db[_0x80c2('0x45')][_0x80c2('0x69')](_0x490499);})[_0x80c2('0x3c')](handleEntityNotFound(_0x2bac3f,null))[_0x80c2('0x3c')](function(_0x1574ed){if(_0x1574ed){if(!_[_0x80c2('0x88')](_0x1574ed[_0x80c2('0x84')])){if(fs[_0x80c2('0x89')](path['join'](config[_0x80c2('0x82')],_0x80c2('0x8a'),_0x1574ed[_0x80c2('0x84')]))&&_0x2b0c2b){_0x2e8add=path['join'](config[_0x80c2('0x82')],_0x80c2('0x8a'),_0x1574ed[_0x80c2('0x84')]);}}return _0x2bac3f[_0x80c2('0x8b')](_0x2e8add);}})[_0x80c2('0x30')](handleError(_0x2bac3f,null));};exports[_0x80c2('0x8c')]=function(_0x113d79,_0x21dfc8,_0x5d5c34){var _0x2b0435=path['join'](config[_0x80c2('0x82')],_0x80c2('0x8d'));var _0x537179={'where':{'id':_0x113d79['params']['id']},'attributes':['id',_0x80c2('0x7b')],'raw':!![]};return db[_0x80c2('0x45')][_0x80c2('0x69')](_0x537179)['then'](handleEntityNotFound(_0x21dfc8,null))[_0x80c2('0x3c')](function(_0x849a9a){if(_0x849a9a){if(!_[_0x80c2('0x88')](_0x849a9a[_0x80c2('0x7b')])){if(fs['existsSync'](path[_0x80c2('0x81')](config[_0x80c2('0x82')],_0x80c2('0x8e'),_0x849a9a[_0x80c2('0x7b')]))){_0x2b0435=path[_0x80c2('0x81')](config['root'],_0x80c2('0x8e'),_0x849a9a[_0x80c2('0x7b')]);}}return _0x21dfc8['download'](_0x2b0435);}})[_0x80c2('0x30')](handleError(_0x21dfc8,null));};exports[_0x80c2('0x8f')]=function(_0x4b28d5,_0x1c7ee3,_0x57f62d){var _0x553aae=path[_0x80c2('0x81')](config[_0x80c2('0x82')],'server/files/images/avatars/customer_avatar.png');var _0x34527c={'where':{'id':_0x4b28d5[_0x80c2('0x5c')]['id']},'attributes':['id','customerAvatar',_0x80c2('0x90')],'raw':!![]};return db['ChatWebsite'][_0x80c2('0x69')](_0x34527c)['then'](handleEntityNotFound(_0x1c7ee3,null))[_0x80c2('0x3c')](function(_0xbe74c9){if(_0xbe74c9){if(!_[_0x80c2('0x88')](_0xbe74c9['customerAvatar'])){if(fs[_0x80c2('0x89')](path[_0x80c2('0x81')](config[_0x80c2('0x82')],_0x80c2('0x8e'),_0xbe74c9[_0x80c2('0x7e')]))&&_0xbe74c9[_0x80c2('0x90')]){_0x553aae=path[_0x80c2('0x81')](config[_0x80c2('0x82')],_0x80c2('0x8e'),_0xbe74c9['customerAvatar']);}}return _0x1c7ee3[_0x80c2('0x8b')](_0x553aae);}})['catch'](handleError(_0x1c7ee3,null));};exports[_0x80c2('0x91')]=function(_0x4b575c,_0xb9a4f2,_0x2249aa){var _0x71c911=path[_0x80c2('0x81')](config[_0x80c2('0x82')],_0x80c2('0x92'));var _0x53d485={'where':{'id':_0x4b575c[_0x80c2('0x5c')]['id']},'attributes':['id','systemAvatar'],'raw':!![]};return db[_0x80c2('0x45')][_0x80c2('0x69')](_0x53d485)[_0x80c2('0x3c')](handleEntityNotFound(_0xb9a4f2,null))[_0x80c2('0x3c')](function(_0x401bbd){if(_0x401bbd){if(!_[_0x80c2('0x88')](_0x401bbd[_0x80c2('0x7f')])){if(fs['existsSync'](path['join'](config[_0x80c2('0x82')],_0x80c2('0x8e'),_0x401bbd['systemAvatar']))){_0x71c911=path[_0x80c2('0x81')](config['root'],_0x80c2('0x8e'),_0x401bbd['systemAvatar']);}}return _0xb9a4f2['download'](_0x71c911);}})['catch'](handleError(_0xb9a4f2,null));};exports[_0x80c2('0x93')]=function(_0x146d39,_0x3b1e1b,_0x369275){var _0x473f90=require(_0x80c2('0x94'));var _0x537036=new _0x473f90();var _0x2bf005=_0x537036[_0x80c2('0x95')](_0x146d39['headers'][_0x80c2('0x96')])['getResult']();var _0x32f120={'body':_0x146d39[_0x80c2('0x61')],'channel':_0x80c2('0x97')};var _0x59b3a1=[];var _0x29b859=[];var _0x2bc1c6={};var _0x117207=![];return db[_0x80c2('0x98')][_0x80c2('0x6a')]()[_0x80c2('0x3c')](function(_0x536753){if(!_0x536753){throw new db[(_0x80c2('0x24'))][(_0x80c2('0x25'))](_0x80c2('0x99'));}_0x59b3a1=_[_0x80c2('0x9a')](_[_0x80c2('0x6e')](_0x536753),[_0x80c2('0x9b'),_0x80c2('0x9c')]);_0x29b859=_['difference'](_[_0x80c2('0x6e')](_0x536753),['createdAt','updatedAt',_0x80c2('0x9d'),_0x80c2('0x9e')]);if(_0x146d39[_0x80c2('0x61')]['id']){delete _0x146d39[_0x80c2('0x61')]['id'];}if(_['isNil'](_0x146d39[_0x80c2('0x61')][_0x80c2('0x9f')])){throw new db[(_0x80c2('0x24'))][(_0x80c2('0x25'))]('from\x20is\x20mandatory');}if(_[_0x80c2('0x88')](_0x146d39[_0x80c2('0x61')][_0x80c2('0x61')])||_0x146d39[_0x80c2('0x61')][_0x80c2('0x61')]===''){throw new db['Sequelize'][(_0x80c2('0x25'))](_0x80c2('0xa0'));}if(_[_0x80c2('0x88')](_0x146d39[_0x80c2('0x61')][_0x80c2('0xa1')])){throw new db[(_0x80c2('0x24'))][(_0x80c2('0x25'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x29b859);}if(!_['includes'](_0x29b859,_0x146d39['body'][_0x80c2('0xa1')])){throw new db[(_0x80c2('0x24'))]['ValidationError']('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x29b859);}_0x2bc1c6[_0x146d39[_0x80c2('0x61')][_0x80c2('0xa1')]]=_0x146d39[_0x80c2('0x61')][_0x80c2('0x9f')];})[_0x80c2('0x3c')](function(){return db[_0x80c2('0x45')][_0x80c2('0x69')]({'where':{'id':_0x146d39[_0x80c2('0x5c')]['id']},'include':[{'model':db[_0x80c2('0xa2')],'as':_0x80c2('0xa3'),'include':[{'model':db[_0x80c2('0x98')],'as':'Contacts','where':_0x2bc1c6,'limit':0x1,'order':[[_0x80c2('0x9c'),_0x80c2('0xa4')]]}]},{'model':db['ChatApplication'],'as':_0x80c2('0xa5')}]});})[_0x80c2('0x3c')](handleEntityNotFound(_0x3b1e1b,null))[_0x80c2('0x3c')](function(_0x35194a){if(_0x35194a&&_0x35194a[_0x80c2('0xa3')]){_0x32f120[_0x80c2('0xa6')]=_0x35194a;_0x32f120[_0x80c2('0xa7')]=_0x35194a[_0x80c2('0xa5')];_0x32f120[_0x80c2('0xa8')]=_0x35194a[_0x80c2('0xa3')];_0x32f120[_0x80c2('0xa7')]=_[_0x80c2('0xa9')](_0x32f120[_0x80c2('0xa7')],[_0x80c2('0xaa')],['asc']);if(_0x32f120[_0x80c2('0xa6')][_0x80c2('0xa5')]){delete _0x32f120[_0x80c2('0xa6')]['Applications'];}if(_0x32f120[_0x80c2('0xa6')][_0x80c2('0xa3')]&&_0x32f120[_0x80c2('0xa6')][_0x80c2('0xa3')][_0x80c2('0xab')][_0x80c2('0x5e')]){return _0x32f120[_0x80c2('0xa6')]['List'][_0x80c2('0xab')][0x0];}var _0x1d92cd=_[_0x80c2('0x1b')](_0x146d39[_0x80c2('0x61')],{'firstName':_0x146d39[_0x80c2('0x61')][_0x80c2('0x9f')],'ListId':_0x35194a['ListId']});_0x1d92cd[_0x146d39[_0x80c2('0x61')][_0x80c2('0xa1')]]=_0x146d39[_0x80c2('0x61')][_0x80c2('0x9f')];return db[_0x80c2('0x98')][_0x80c2('0x60')](_0x1d92cd,{'fields':_0x59b3a1,'raw':!![]});}})[_0x80c2('0x3c')](handleEntityNotFound(_0x3b1e1b,null))['then'](function(_0x5d77eb){_0x32f120[_0x80c2('0xac')]=_0x5d77eb;var _0x42473b=_0x146d39[_0x80c2('0x61')][_0x80c2('0xad')];if(_0x146d39['headers'][_0x80c2('0xae')]){_0x42473b=_0x146d39['headers'][_0x80c2('0xae')];}else if(_0x146d39[_0x80c2('0xaf')][_0x80c2('0xb0')]){_0x42473b=_[_0x80c2('0xb1')](_0x146d39['headers'][_0x80c2('0xb0')][_0x80c2('0xb2')](','));}if(_0x5d77eb){var _0x467591={'ContactId':_0x5d77eb['id'],'ChatWebsiteId':_0x146d39[_0x80c2('0x5c')]['id'],'from':(_0x5d77eb[_0x80c2('0xb3')]||'')+'\x20'+(_0x5d77eb[_0x80c2('0xb4')]||''),'customerIp':_0x42473b,'customerPort':_0x146d39[_0x80c2('0xaf')][_0x80c2('0xb5')]?_0x146d39[_0x80c2('0xaf')]['x-real-port']:null,'referer':_0x146d39[_0x80c2('0x61')]['referer'],'browserName':_0x2bf005['browser'][_0x80c2('0x41')]&&_0x2bf005[_0x80c2('0xb6')][_0x80c2('0xb7')]?util[_0x80c2('0xb8')](_0x80c2('0xb9'),_0x2bf005[_0x80c2('0xb6')][_0x80c2('0x41')],_0x2bf005[_0x80c2('0xb6')][_0x80c2('0xb7')]):_0x80c2('0xba'),'browserVersion':_0x2bf005[_0x80c2('0xb6')][_0x80c2('0xb7')]||_0x80c2('0xba'),'osName':util[_0x80c2('0xb8')](_0x80c2('0xb9'),_0x2bf005['os'][_0x80c2('0x41')],_0x2bf005['os']['version']),'osVersion':_0x2bf005['os']['version'],'deviceModel':_0x2bf005['device'][_0x80c2('0x49')]&&_0x2bf005['device'][_0x80c2('0xbb')]?util['format']('%s\x20%s\x20%s',_0x2bf005[_0x80c2('0xbc')][_0x80c2('0x49')],_0x2bf005[_0x80c2('0xbc')][_0x80c2('0xbb')],_0x2bf005[_0x80c2('0xbc')][_0x80c2('0x47')]):null,'deviceVendor':_0x2bf005['device'][_0x80c2('0xbb')],'deviceType':_0x2bf005[_0x80c2('0xbc')]['type'],'formData':JSON[_0x80c2('0x2c')](_0x146d39[_0x80c2('0x61')])};var _0x3302f4={'ChatWebsiteId':_0x146d39[_0x80c2('0x5c')]['id'],'closed':![]};if(_0x146d39[_0x80c2('0x61')]['threadId']){_0x3302f4[_0x80c2('0xbd')]=_0x146d39[_0x80c2('0x61')][_0x80c2('0xbd')];return db[_0x80c2('0xbe')]['find']({'where':_0x3302f4})[_0x80c2('0x3c')](function(_0x14f6bb){if(_0x14f6bb){return[_0x14f6bb,![]];}_0x467591[_0x80c2('0xbd')]=_0x146d39[_0x80c2('0x61')]['threadId'];_0x467591[_0x80c2('0xbf')]=_0x146d39['body'][_0x80c2('0xbf')];return db[_0x80c2('0xbe')][_0x80c2('0x60')](_0x467591)[_0x80c2('0x3c')](function(_0x5e96fe){return[_0x5e96fe,!![]];});});}_0x3302f4[_0x80c2('0xc0')]=_0x5d77eb['id'];if(_0x146d39[_0x80c2('0x61')][_0x80c2('0xc1')]&&_0x146d39[_0x80c2('0x61')]['interaction']['id']){_0x3302f4['id']=_0x146d39['body']['interaction']['id'];return db[_0x80c2('0xbe')][_0x80c2('0x69')]({'where':_0x3302f4})['then'](function(_0x3de6ab){if(_0x3de6ab){return[_0x3de6ab,![]];}return db[_0x80c2('0xbe')]['create'](_0x467591)[_0x80c2('0x3c')](function(_0xc13eb8){return[_0xc13eb8,!![]];});});}return db[_0x80c2('0xbe')]['create'](_0x467591)[_0x80c2('0x3c')](function(_0x80cf9e){return[_0x80cf9e,!![]];});}})[_0x80c2('0xc2')](function(_0x4f02e9,_0x837fc1){if(_0x4f02e9){_0x117207=_0x837fc1;if(!_0x837fc1){var _0x537f56={'from':(_0x32f120[_0x80c2('0xac')][_0x80c2('0xb3')]||'')+'\x20'+(_0x32f120['contact']['lastName']||'')};if(_0x146d39[_0x80c2('0x61')][_0x80c2('0xbd')]&&_0x146d39[_0x80c2('0x61')]['messageId']&&_0x146d39['body'][_0x80c2('0xbd')]!=_0x146d39[_0x80c2('0x61')][_0x80c2('0xc3')]){_0x537f56[_0x80c2('0xbd')]=_0x146d39[_0x80c2('0x61')]['messageId'];}return _0x4f02e9[_0x80c2('0x3b')](_0x537f56);}else{return _0x4f02e9;}}})[_0x80c2('0x3c')](function(_0x407299){_0x32f120[_0x80c2('0xc1')]=_0x407299[_0x80c2('0x3e')]({'plain':!![]});_0x32f120[_0x80c2('0xc1')][_0x80c2('0xc4')]=_0x117207;if(_0x32f120['interaction']['created']){if(_0x32f120['account'][_0x80c2('0xc5')]){_0x32f120[_0x80c2('0xa7')][_0x80c2('0xc6')]({'id':0x0,'priority':_0x32f120[_0x80c2('0xa7')][_0x80c2('0x5e')]+0x1,'app':'close','appdata':_0x80c2('0xc7'),'interval':'*,*,*,*'});}}return db[_0x80c2('0xc8')]['create']({'body':_0x146d39[_0x80c2('0x61')]['body'],'ChatWebsiteId':_0x146d39[_0x80c2('0x5c')]['id'],'ChatInteractionId':_0x407299['id'],'direction':'in','ContactId':_0x32f120[_0x80c2('0xac')]['id'],'AttachmentId':_0x146d39['body'][_0x80c2('0xc9')]});})[_0x80c2('0x3c')](function(_0x521fa1){_0x32f120[_0x80c2('0x2f')]=_0x521fa1;if(_0x32f120[_0x80c2('0xc1')][_0x80c2('0xca')]){return db[_0x80c2('0xcb')]['find']({'attributes':['id','name'],'where':{'id':_0x32f120[_0x80c2('0xc1')]['UserId']}})[_0x80c2('0x3c')](function(_0x59555a){if(_0x59555a){_0x32f120[_0x80c2('0xa7')][_0x80c2('0xcc')]({'id':0x0,'priority':0x0,'app':_0x80c2('0xcd'),'appdata':_0x59555a[_0x80c2('0x41')]+','+(_0x32f120[_0x80c2('0xa6')][_0x80c2('0xce')]||0xa),'interval':'*,*,*,*'});_0x32f120[_0x80c2('0xcf')]=!![];}return respondWithRpcPromise(_0x80c2('0xd0'),'startRouting',_0x32f120);});}return respondWithRpcPromise(_0x80c2('0xd0'),'startRouting',_0x32f120);})[_0x80c2('0x3c')](function(_0x57c028){respondWithRpcPromise(_0x80c2('0xd1'),_0x80c2('0xd1'),{'event':_0x80c2('0x93'),'message':_0x57c028},client9002);return _0x57c028;})[_0x80c2('0x3c')](respondWithResult(_0x3b1e1b,null))['catch'](handleError(_0x3b1e1b,null));};exports[_0x80c2('0xd2')]=function(_0x30cc43,_0x5f0d47,_0x5d1b79){var _0x1072b4,_0x394f04,_0x337f91;var _0x41b862=[];var _0x580ae2=[];var _0x44b547={};return db[_0x80c2('0x98')][_0x80c2('0x6a')]()[_0x80c2('0x3c')](function(_0x312a07){if(!_0x312a07){throw new db[(_0x80c2('0x24'))][(_0x80c2('0x25'))](_0x80c2('0x99'));}_0x580ae2=_[_0x80c2('0x9a')](_['keys'](_0x312a07),[_0x80c2('0x9b'),'updatedAt']);_0x41b862=_[_0x80c2('0x9a')](_[_0x80c2('0x6e')](_0x312a07),[_0x80c2('0x9b'),_0x80c2('0x9c'),_0x80c2('0x9d'),_0x80c2('0x9e')]);if(_0x30cc43[_0x80c2('0x61')]['id']){delete _0x30cc43[_0x80c2('0x61')]['id'];}if(_[_0x80c2('0x88')](_0x30cc43[_0x80c2('0x61')]['from'])){throw _0x5f0d47['status'](0x1f4)[_0x80c2('0xd3')](new db[(_0x80c2('0x24'))]['ValidationError'](_0x80c2('0xd4')));}if(_[_0x80c2('0x88')](_0x30cc43[_0x80c2('0x61')]['body'])||_0x30cc43['body'][_0x80c2('0x61')]===''){throw _0x5f0d47[_0x80c2('0x32')](0x1f4)['send'](new db[(_0x80c2('0x24'))][(_0x80c2('0x25'))](_0x80c2('0xa0')));}if(_[_0x80c2('0x88')](_0x30cc43[_0x80c2('0x61')][_0x80c2('0xd5')])){throw _0x5f0d47[_0x80c2('0x32')](0x1f4)[_0x80c2('0xd3')](new db['Sequelize'][(_0x80c2('0x25'))](_0x80c2('0xd6')+_0x41b862));}if(!_[_0x80c2('0xd7')](_0x41b862,_0x30cc43[_0x80c2('0x61')][_0x80c2('0xd5')])){throw _0x5f0d47[_0x80c2('0x32')](0x1f4)[_0x80c2('0xd3')](new db[(_0x80c2('0x24'))][(_0x80c2('0x25'))](_0x80c2('0xd8')+_0x41b862));}_0x44b547[_0x30cc43[_0x80c2('0x61')][_0x80c2('0xd5')]]=_0x30cc43[_0x80c2('0x61')][_0x80c2('0x9f')];})[_0x80c2('0x3c')](function(){return db['ChatWebsite'][_0x80c2('0x69')]({'where':{'id':_0x30cc43['params']['id']},'include':[{'model':db[_0x80c2('0xa2')],'as':_0x80c2('0xa3')}]});})['then'](handleEntityNotFound(_0x5f0d47,null))['then'](function(_0x160df4){if(_0x160df4&&_0x160df4['List']){_0x394f04=_0x160df4;var _0xddbf3c=_['defaults'](_0x30cc43[_0x80c2('0x61')],{'firstName':_0x30cc43[_0x80c2('0x61')]['from'],'phone':_0x30cc43[_0x80c2('0x61')][_0x80c2('0x9f')],'ListId':_0x160df4[_0x80c2('0x9e')]});_0xddbf3c[_0x30cc43[_0x80c2('0x61')][_0x80c2('0xd5')]]=_0x30cc43[_0x80c2('0x61')][_0x80c2('0x9f')];return db[_0x80c2('0x98')][_0x80c2('0xd9')]({'where':_0x44b547,'defaults':_0xddbf3c});}})['spread'](function(_0x688b46){if(_0x688b46){_0x337f91=_0x688b46;var _0xd0daff=fs['readFileSync'](path[_0x80c2('0x81')](config[_0x80c2('0x82')],_0x80c2('0xda')),_0x80c2('0xdb'));var _0x54c332=ejs['render'](_0xd0daff,{'body':_['toPairs'](_0x30cc43['body']['body']),'bodyTitle':_0x394f04[_0x80c2('0xdc')]});return db['ChatOfflineMessage'][_0x80c2('0x60')]({'body':_0x54c332,'ContactId':_0x688b46['id'],'ChatWebsiteId':_0x394f04['id']});}})['then'](function(_0x44ac2c){if(_0x44ac2c){_0x1072b4=_0x44ac2c;return db[_0x80c2('0xdd')][_0x80c2('0x76')]({'where':{'service':!![]},'include':[{'model':db[_0x80c2('0xde')],'as':_0x80c2('0xdf'),'raw':!![]}]});}})[_0x80c2('0x3c')](function(_0x162491){if(_0x162491&&_0x162491[_0x80c2('0xdf')]&&_0x394f04['forwardOfflineAddress']){var _0x1ed450={'tls':{'rejectUnauthorized':![]}};if(_0x162491['Smtp'][_0x80c2('0xe0')]){_0x1ed450['service']=_0x162491['Smtp'][_0x80c2('0xe0')];}else{_0x1ed450[_0x80c2('0xe1')]=_0x162491[_0x80c2('0xdf')]['host'];_0x1ed450[_0x80c2('0xe2')]=_0x162491[_0x80c2('0xdf')][_0x80c2('0xe2')];_0x1ed450[_0x80c2('0xe3')]=_0x162491[_0x80c2('0xdf')]['secure'];}if(_0x162491['Smtp']['authentication']){_0x1ed450['auth']={'user':_0x162491[_0x80c2('0xdf')][_0x80c2('0x62')],'pass':_0x162491[_0x80c2('0xdf')][_0x80c2('0xe4')]};}return respondWithRpcPromise(_0x80c2('0xe5'),_0x80c2('0xe6'),{'account':_0x1ed450,'message':{'from':util['format'](_0x80c2('0xe7'),_0x162491[_0x80c2('0x41')],_0x162491[_0x80c2('0xe8')]||_0x162491['Smtp'][_0x80c2('0x62')]),'to':_0x394f04[_0x80c2('0xe9')],'subject':_0x394f04[_0x80c2('0xea')],'text':_0x1072b4[_0x80c2('0x61')]}},client9003)['then'](function(){return _0x1072b4;})[_0x80c2('0x30')](function(_0x23bbd9){console[_0x80c2('0x2d')](_0x23bbd9);});}})[_0x80c2('0x3c')](function(){if(_0x1072b4){return _0x1072b4;}})['then'](respondWithResult(_0x5f0d47,null))['catch'](handleError(_0x5f0d47,null));};exports[_0x80c2('0xeb')]=function(_0x3dbb67,_0xc45998,_0x2c9e0c){return db[_0x80c2('0xbe')][_0x80c2('0x69')]({'where':{'id':_0x3dbb67[_0x80c2('0x5c')]['id']}})['then'](handleEntityNotFound(_0xc45998,null))[_0x80c2('0x3c')](function(_0xed072b){if(_0xed072b){return _0xed072b[_0x80c2('0xeb')](_0x3dbb67['body'][_0x80c2('0x72')],_[_0x80c2('0xec')](_0x3dbb67['body'],[_0x80c2('0x72'),'id'])||{});}})[_0x80c2('0x3c')](respondWithResult(_0xc45998,null))[_0x80c2('0x30')](handleError(_0xc45998,null));};exports['getInteractions']=function(_0x11c2fc,_0x7796fb,_0x780571){var _0x5c9d33={'raw':![],'where':{}};var _0x252656={};var _0x271ec9={'count':0x0,'rows':[]};return db[_0x80c2('0x45')]['findOne']({'where':{'id':_0x11c2fc[_0x80c2('0x5c')]['id']}})['then'](handleEntityNotFound(_0x7796fb,null))[_0x80c2('0x3c')](function(_0xf63513){if(_0xf63513){_0x252656[_0x80c2('0x49')]=_[_0x80c2('0x6e')](db[_0x80c2('0xbe')][_0x80c2('0x46')]);_0x252656[_0x80c2('0x4a')]=_[_0x80c2('0x6e')](_0x11c2fc[_0x80c2('0x4a')]);_0x252656[_0x80c2('0x51')]=_[_0x80c2('0x4b')](_0x252656['model'],_0x252656[_0x80c2('0x4a')]);_0x5c9d33[_0x80c2('0x4c')]=_[_0x80c2('0x4b')](_0x252656[_0x80c2('0x49')],qs[_0x80c2('0x4d')](_0x11c2fc[_0x80c2('0x4a')][_0x80c2('0x4d')]));_0x5c9d33['attributes']=_0x5c9d33[_0x80c2('0x4c')][_0x80c2('0x5e')]?_0x5c9d33['attributes']:_0x252656[_0x80c2('0x49')];if(!_0x11c2fc[_0x80c2('0x4a')][_0x80c2('0x4e')](_0x80c2('0x4f'))){_0x5c9d33[_0x80c2('0x36')]=qs[_0x80c2('0x36')](_0x11c2fc[_0x80c2('0x4a')]['limit']);_0x5c9d33[_0x80c2('0x35')]=qs[_0x80c2('0x35')](_0x11c2fc[_0x80c2('0x4a')]['offset']);}_0x5c9d33[_0x80c2('0x50')]=qs['sort'](_0x11c2fc['query']['sort']);_0x5c9d33[_0x80c2('0x54')]=qs[_0x80c2('0x51')](_['pick'](_0x11c2fc[_0x80c2('0x4a')],_0x252656[_0x80c2('0x51')]));_0x5c9d33['where'][_0x80c2('0x6c')]=_0xf63513['id'];if(_0x11c2fc['query'][_0x80c2('0x53')]){_0x5c9d33[_0x80c2('0x54')]=_[_0x80c2('0x55')](_0x5c9d33[_0x80c2('0x54')],{'$or':_[_0x80c2('0x44')](_0x5c9d33[_0x80c2('0x4c')],function(_0x58fc44){var _0xc257af={};_0xc257af[_0x58fc44]={'$like':'%'+_0x11c2fc['query']['filter']+'%'};return _0xc257af;})});}_0x5c9d33=_['merge']({},_0x5c9d33,_0x11c2fc['options']);return db['ChatInteraction'][_0x80c2('0x57')]({'where':_0x5c9d33[_0x80c2('0x54')]})[_0x80c2('0x3c')](function(_0x25e3b8){_0x271ec9[_0x80c2('0x57')]=_0x25e3b8;if(_0x11c2fc[_0x80c2('0x4a')][_0x80c2('0x58')]){_0x5c9d33['include']=[{'model':db[_0x80c2('0x98')],'as':'Contact','required':![]},{'model':db['User'],'as':'Owner','attributes':[_0x80c2('0x41'),_0x80c2('0xed'),_0x80c2('0xee')],'required':![]},{'model':db[_0x80c2('0xef')],'as':'Tags','attributes':['id','name','color'],'where':_0x11c2fc[_0x80c2('0x4a')][_0x80c2('0xf0')]?{'id':_0x11c2fc[_0x80c2('0x4a')][_0x80c2('0xf0')]}:undefined,'required':_0x11c2fc[_0x80c2('0x4a')][_0x80c2('0xf0')]?!![]:![]}];}return db[_0x80c2('0xbe')]['findAll'](_0x5c9d33);})[_0x80c2('0x3c')](function(_0x36dae7){_0x271ec9[_0x80c2('0x5a')]=_0x36dae7;return _0x271ec9;});}})['then'](respondWithFilteredResult(_0x7796fb,_0x5c9d33))[_0x80c2('0x30')](handleError(_0x7796fb,null));};function iftimePromise(_0x55004c,_0x1aabf8){return respondWithRpcPromise(_0x80c2('0xf1'),_0x80c2('0xf2'),{'command':_0x1aabf8['timezone']?util[_0x80c2('0xb8')](_0x80c2('0xf3'),_0x55004c[_0x80c2('0xf4')],_0x1aabf8['timezone']):util[_0x80c2('0xb8')](_0x80c2('0xf5'),_0x55004c['interval'])},client9002)[_0x80c2('0x3c')](function(_0x6c0d05){var _0x18d9a2=_0x6c0d05&&_0x6c0d05[_0x80c2('0xf6')](_0x80c2('0xf7'))>=0x0?!![]:![];logger[_0x80c2('0x28')](_0x80c2('0xf8'),_0x1aabf8['id'],_0x55004c['id'],_0x55004c['interval'],_0x18d9a2?_0x80c2('0xf9'):_0x80c2('0xfa'),_0x1aabf8[_0x80c2('0xfb')]?_0x1aabf8[_0x80c2('0xfb')]:_0x80c2('0xfc'));return _0x18d9a2;})[_0x80c2('0x30')](function(_0x349b46){logger[_0x80c2('0x2d')](_0x80c2('0xf8'),_0x1aabf8['id'],_0x55004c['id'],_0x55004c['interval'],util[_0x80c2('0xfd')](_0x349b46,{'showHidden':![],'depth':null}),_0x1aabf8[_0x80c2('0xfb')]?_0x1aabf8['timezone']:_0x80c2('0xfc'));return![];});}exports[_0x80c2('0xf2')]=function(_0x2451e5,_0x4544d1,_0x2012d7){var _0x22a95d=0x0;var _0xd4a10=0x0;var _0x111990=![];var _0x5a54a7;var _0x57a7b7;return db['ChatWebsite'][_0x80c2('0x69')]({'where':{'id':_0x2451e5[_0x80c2('0x5c')]['id']},'include':[{'model':db[_0x80c2('0xfe')],'as':'Interval','include':[{'model':db[_0x80c2('0xfe')],'as':_0x80c2('0xff'),'attributes':['id','interval'],'raw':!![]}]}]})[_0x80c2('0x3c')](handleEntityNotFound(_0x4544d1,null))[_0x80c2('0x3c')](function(_0x27a879){if(_0x27a879){_0x5a54a7=_0x27a879;return _0x27a879[_0x80c2('0x100')]({'raw':!![]});}})[_0x80c2('0x3c')](function(_0x5d0c80){if(_0x5a54a7){if(_0x5d0c80){_0x57a7b7=_0x5d0c80;}}return require('../../config/license/util')[_0x80c2('0x86')]();})[_0x80c2('0x3c')](function(_0x281008){if(_0x281008){_0xd4a10=_0x281008[_0x80c2('0x101')];_0x111990=_0x281008[_0x80c2('0x87')];}})[_0x80c2('0x3c')](function(){return db[_0x80c2('0xbe')][_0x80c2('0x57')]({'where':{'closed':![]}});})[_0x80c2('0x3c')](function(_0x3a5c32){_0x22a95d=_0x3a5c32;if(_0xd4a10&&_0x3a5c32>_0xd4a10){return db['License'][_0x80c2('0x76')]({'where':{'id':0x1}})[_0x80c2('0x3c')](function(_0xa7cadf){if(_0xa7cadf){_0xa7cadf[_0x80c2('0x102')](_0x80c2('0x103'));}});}})[_0x80c2('0x3c')](function(){if(_0x5a54a7[_0x80c2('0xfe')]&&_0x5a54a7[_0x80c2('0xfe')][_0x80c2('0xff')]){var _0x5ef128=[];for(var _0x18238f=0x0;_0x18238f<_0x5a54a7[_0x80c2('0xfe')]['Intervals'][_0x80c2('0x5e')];_0x18238f++){var _0x440fdd=_0x5a54a7[_0x80c2('0xfe')][_0x80c2('0xff')][_0x18238f][_0x80c2('0x3e')]({'plain':!![]});_0x5ef128[_0x80c2('0xc6')](iftimePromise(_0x440fdd,_0x5a54a7));}return BPromise[_0x80c2('0x104')](_0x5ef128)['then'](function(_0x37ac5d){return _[_0x80c2('0x105')](_0x37ac5d);});}else{return!![];}})['then'](function(_0x27dd65){var _0x5a5bd2=fs[_0x80c2('0x106')](path[_0x80c2('0x81')](config['root'],_0x80c2('0x107')),_0x80c2('0xdb'));var _0x3cce97={'remote':_0x5a54a7[_0x80c2('0x108')],'query':querystring[_0x80c2('0x2c')](_['merge'](_0x5a54a7[_0x80c2('0x3e')]({'plain':!![]}),{'customerIp':_0x2451e5[_0x80c2('0xaf')][_0x80c2('0xb0')]||_0x2451e5[_0x80c2('0xaf')]['x-real-ip']||_0x2451e5[_0x80c2('0x109')]['remoteAddress']||_0x2451e5['ip'],'referer':_0x2451e5['headers'][_0x80c2('0x10a')],'openedInteractions':_0x22a95d,'maxInteractions':_0xd4a10,'virtual':_0x111990[_0x80c2('0x101')],'online':_0x27dd65,'custom':_0x111990}))[_0x80c2('0x10b')](/'/g,'\x5c\x27')};_0x4544d1[_0x80c2('0xd3')](ejs[_0x80c2('0x10c')](Mustache['render'](_0x5a5bd2,_0x3cce97),{'proactiveActions':_0x57a7b7,'alignment':_0x5a54a7['alignment'],'verticalAlignment':_0x5a54a7[_0x80c2('0x10d')],'div_color':_0x5a54a7[_0x80c2('0x10e')],'text_color':_0x5a54a7['textColor']}));})[_0x80c2('0x30')](handleError(_0x4544d1,null));};exports[_0x80c2('0x10f')]=function(_0x39279f,_0x21ebfe,_0x4a7c4e){return db[_0x80c2('0x45')][_0x80c2('0x76')]({'where':{'id':_0x39279f[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x21ebfe,null))[_0x80c2('0x3c')](function(_0x25af6a){if(_0x25af6a){return db[_0x80c2('0x110')][_0x80c2('0x111')](function(_0x5bb20e){return db[_0x80c2('0x112')]['destroy']({'where':{'ChatWebsiteId':_0x39279f[_0x80c2('0x5c')]['id']},'transaction':_0x5bb20e})[_0x80c2('0x3c')](function(_0x162cde){var _0x3ec75f=_[_0x80c2('0x44')](_0x39279f[_0x80c2('0x61')],function(_0x47f8a2){_0x47f8a2[_0x80c2('0x6c')]=_0x39279f[_0x80c2('0x5c')]['id'];return _0x47f8a2;});return db[_0x80c2('0x112')]['bulkCreate'](_0x3ec75f,{'transaction':_0x5bb20e});});})[_0x80c2('0x3c')](function(){return db[_0x80c2('0x112')][_0x80c2('0x113')]({'where':{'ChatWebsiteId':_0x39279f[_0x80c2('0x5c')]['id']},'order':_0x80c2('0xaa')});});}})['then'](respondWithResult(_0x21ebfe,null))[_0x80c2('0x30')](handleError(_0x21ebfe,null));};exports[_0x80c2('0x114')]=function(_0x3d356a,_0x414b2b,_0x3ca2e3){var _0x3c5234={};var _0x2da6b9={};var _0x3d36d8;var _0x9cadf3;return db['ChatWebsite'][_0x80c2('0x76')]({'where':{'id':_0x3d356a['params']['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x414b2b,null))[_0x80c2('0x3c')](function(_0x1dd83){if(_0x1dd83){_0x3d36d8=_0x1dd83;_0x2da6b9['model']=_[_0x80c2('0x6e')](db[_0x80c2('0x112')][_0x80c2('0x46')]);_0x2da6b9['query']=_[_0x80c2('0x6e')](_0x3d356a[_0x80c2('0x4a')]);_0x2da6b9[_0x80c2('0x51')]=_[_0x80c2('0x4b')](_0x2da6b9[_0x80c2('0x49')],_0x2da6b9[_0x80c2('0x4a')]);_0x3c5234[_0x80c2('0x4c')]=_[_0x80c2('0x4b')](_0x2da6b9[_0x80c2('0x49')],qs[_0x80c2('0x4d')](_0x3d356a['query'][_0x80c2('0x4d')]));_0x3c5234['attributes']=_0x3c5234[_0x80c2('0x4c')][_0x80c2('0x5e')]?_0x3c5234[_0x80c2('0x4c')]:_0x2da6b9[_0x80c2('0x49')];_0x3c5234[_0x80c2('0x50')]=qs[_0x80c2('0x6f')](_0x3d356a[_0x80c2('0x4a')]['sort']);_0x3c5234[_0x80c2('0x54')]=qs['filters'](_[_0x80c2('0x52')](_0x3d356a['query'],_0x2da6b9[_0x80c2('0x51')]));if(_0x3d356a['query'][_0x80c2('0x53')]){_0x3c5234['where']=_[_0x80c2('0x55')](_0x3c5234[_0x80c2('0x54')],{'$or':_[_0x80c2('0x44')](_0x3c5234[_0x80c2('0x4c')],function(_0x25c936){var _0x3ea7a1={};_0x3ea7a1[_0x25c936]={'$like':'%'+_0x3d356a[_0x80c2('0x4a')][_0x80c2('0x53')]+'%'};return _0x3ea7a1;})});}_0x3c5234=_['merge']({},_0x3c5234,_0x3d356a[_0x80c2('0x5f')]);return _0x3d36d8[_0x80c2('0x114')](_0x3c5234);}})['then'](function(_0x2a7242){if(_0x2a7242){_0x9cadf3=_0x2a7242['length'];if(!_0x3d356a[_0x80c2('0x4a')]['hasOwnProperty'](_0x80c2('0x4f'))){_0x3c5234['limit']=qs[_0x80c2('0x36')](_0x3d356a['query']['limit']);_0x3c5234[_0x80c2('0x35')]=qs['offset'](_0x3d356a[_0x80c2('0x4a')][_0x80c2('0x35')]);}return _0x3d36d8['getApplications'](_0x3c5234);}})[_0x80c2('0x3c')](function(_0x3f6a0c){if(_0x3f6a0c){return _0x3f6a0c?{'count':_0x9cadf3,'rows':_0x3f6a0c}:null;}})[_0x80c2('0x3c')](respondWithResult(_0x414b2b,null))['catch'](handleError(_0x414b2b,null));};exports[_0x80c2('0x115')]=function(_0x24e580,_0x3d26ca,_0x17f586){return db[_0x80c2('0x116')][_0x80c2('0x69')]({'where':{'id':_0x24e580[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x3d26ca,null))[_0x80c2('0x3c')](function(_0x40bb76){if(_0x40bb76){return _0x40bb76[_0x80c2('0x115')](_0x24e580[_0x80c2('0x61')]['ids'],_[_0x80c2('0xec')](_0x24e580[_0x80c2('0x61')],[_0x80c2('0x72'),'id'])||{});}})['then'](respondWithResult(_0x3d26ca,null))['catch'](handleError(_0x3d26ca,null));};exports[_0x80c2('0x100')]=function(_0x7d6b3,_0x12adf6,_0x105883){var _0x2978d1={};var _0x2ee3c4={};var _0x270ff0;var _0x3154f4;return db[_0x80c2('0x45')][_0x80c2('0x76')]({'where':{'id':_0x7d6b3[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x12adf6,null))['then'](function(_0x203921){if(_0x203921){_0x270ff0=_0x203921;_0x2ee3c4[_0x80c2('0x49')]=_['keys'](db['ChatProactiveAction'][_0x80c2('0x46')]);_0x2ee3c4['query']=_[_0x80c2('0x6e')](_0x7d6b3['query']);_0x2ee3c4[_0x80c2('0x51')]=_['intersection'](_0x2ee3c4['model'],_0x2ee3c4[_0x80c2('0x4a')]);_0x2978d1[_0x80c2('0x4c')]=_['intersection'](_0x2ee3c4['model'],qs[_0x80c2('0x4d')](_0x7d6b3['query'][_0x80c2('0x4d')]));_0x2978d1['attributes']=_0x2978d1['attributes']['length']?_0x2978d1['attributes']:_0x2ee3c4['model'];_0x2978d1['order']=qs['sort'](_0x7d6b3[_0x80c2('0x4a')][_0x80c2('0x6f')]);_0x2978d1['where']=qs['filters'](_[_0x80c2('0x52')](_0x7d6b3[_0x80c2('0x4a')],_0x2ee3c4[_0x80c2('0x51')]));if(_0x7d6b3['query']['filter']){_0x2978d1[_0x80c2('0x54')]=_[_0x80c2('0x55')](_0x2978d1[_0x80c2('0x54')],{'$or':_[_0x80c2('0x44')](_0x2978d1['attributes'],function(_0x475df7){var _0x3bd2f9={};_0x3bd2f9[_0x475df7]={'$like':'%'+_0x7d6b3['query'][_0x80c2('0x53')]+'%'};return _0x3bd2f9;})});}_0x2978d1=_[_0x80c2('0x55')]({},_0x2978d1,_0x7d6b3[_0x80c2('0x5f')]);return _0x270ff0[_0x80c2('0x100')](_0x2978d1);}})[_0x80c2('0x3c')](function(_0x587527){if(_0x587527){_0x3154f4=_0x587527[_0x80c2('0x5e')];if(!_0x7d6b3[_0x80c2('0x4a')][_0x80c2('0x4e')](_0x80c2('0x4f'))){_0x2978d1[_0x80c2('0x36')]=qs[_0x80c2('0x36')](_0x7d6b3[_0x80c2('0x4a')][_0x80c2('0x36')]);_0x2978d1[_0x80c2('0x35')]=qs[_0x80c2('0x35')](_0x7d6b3[_0x80c2('0x4a')][_0x80c2('0x35')]);}return _0x270ff0['getProactiveActions'](_0x2978d1);}})['then'](function(_0x400cee){if(_0x400cee){return _0x400cee?{'count':_0x3154f4,'rows':_0x400cee}:null;}})[_0x80c2('0x3c')](respondWithResult(_0x12adf6,null))[_0x80c2('0x30')](handleError(_0x12adf6,null));};exports[_0x80c2('0x117')]=function(_0x3bda0d,_0xde9871,_0x4f6583){var _0x580cd4=_0x3bda0d['query']['online']===_0x80c2('0x118')?_0x80c2('0x119'):'onlineForm';return db[_0x80c2('0x45')][_0x80c2('0x69')]({'attributes':['id',_0x580cd4],'where':{'id':_0x3bda0d['params']['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0xde9871,null))[_0x80c2('0x3c')](function(_0x10c653){if(_0x10c653){var _0x43209a=_0x10c653[_0x580cd4];var _0x2312eb=_0x43209a&&_0x43209a[_0x80c2('0x11a')]?_0x43209a[_0x80c2('0x11a')]:[];_0xde9871[_0x80c2('0xd3')]({'fromKey':_[_0x80c2('0x88')](_0x43209a['fromKey'])?undefined:_0x43209a[_0x80c2('0x11b')],'count':_0x2312eb[_0x80c2('0x5e')],'rows':_0x2312eb});}})[_0x80c2('0x30')](handleError(_0xde9871,null));};exports[_0x80c2('0x11c')]=function(_0x3ccfde,_0x22ce4e,_0x36e8df){var _0x5376fc={'raw':![],'where':{}};var _0x4725bf={};var _0x294ac6={'count':0x0,'rows':[]};return db[_0x80c2('0x45')][_0x80c2('0x76')]({'where':{'id':_0x3ccfde[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x22ce4e,null))[_0x80c2('0x3c')](function(_0x15e711){if(_0x15e711){_0x4725bf['model']=_[_0x80c2('0x6e')](db[_0x80c2('0x11d')][_0x80c2('0x46')]);_0x4725bf['query']=_[_0x80c2('0x6e')](_0x3ccfde['query']);_0x4725bf[_0x80c2('0x51')]=_[_0x80c2('0x4b')](_0x4725bf[_0x80c2('0x49')],_0x4725bf[_0x80c2('0x4a')]);_0x5376fc['attributes']=_[_0x80c2('0x4b')](_0x4725bf['model'],qs[_0x80c2('0x4d')](_0x3ccfde[_0x80c2('0x4a')][_0x80c2('0x4d')]));_0x5376fc['attributes']=_0x5376fc['attributes']['length']?_0x5376fc[_0x80c2('0x4c')]:_0x4725bf[_0x80c2('0x49')];if(!_0x3ccfde[_0x80c2('0x4a')][_0x80c2('0x4e')](_0x80c2('0x4f'))){_0x5376fc[_0x80c2('0x36')]=qs['limit'](_0x3ccfde[_0x80c2('0x4a')]['limit']);_0x5376fc[_0x80c2('0x35')]=qs[_0x80c2('0x35')](_0x3ccfde[_0x80c2('0x4a')][_0x80c2('0x35')]);}_0x5376fc[_0x80c2('0x50')]=qs[_0x80c2('0x6f')](_0x3ccfde['query']['sort']);_0x5376fc[_0x80c2('0x54')]=qs[_0x80c2('0x51')](_[_0x80c2('0x52')](_0x3ccfde[_0x80c2('0x4a')],_0x4725bf['filters']));_0x5376fc[_0x80c2('0x54')][_0x80c2('0x6c')]=_0x15e711['id'];if(_0x3ccfde[_0x80c2('0x4a')][_0x80c2('0x53')]){_0x5376fc['where']=_[_0x80c2('0x55')](_0x5376fc[_0x80c2('0x54')],{'$or':_[_0x80c2('0x44')](_0x5376fc[_0x80c2('0x4c')],function(_0x257da6){var _0x3cbe67={};_0x3cbe67[_0x257da6]={'$like':'%'+_0x3ccfde['query'][_0x80c2('0x53')]+'%'};return _0x3cbe67;})});}_0x5376fc=_[_0x80c2('0x55')]({},_0x5376fc,_0x3ccfde[_0x80c2('0x5f')]);return db[_0x80c2('0x11d')][_0x80c2('0x57')]({'where':_0x5376fc['where']})[_0x80c2('0x3c')](function(_0x2cd8d5){_0x294ac6['count']=_0x2cd8d5;if(_0x3ccfde[_0x80c2('0x4a')]['includeAll']){_0x5376fc[_0x80c2('0x59')]=[{'all':!![]}];}else{_0x5376fc['include']=[{'model':db[_0x80c2('0x98')],'as':'Contact','required':![]}];}return db[_0x80c2('0x11d')][_0x80c2('0x70')](_0x5376fc);})[_0x80c2('0x3c')](function(_0x8145d2){_0x294ac6[_0x80c2('0x5a')]=_0x8145d2;return _0x294ac6;});}})[_0x80c2('0x3c')](respondWithFilteredResult(_0x22ce4e,_0x5376fc))[_0x80c2('0x30')](handleError(_0x22ce4e,null));};exports[_0x80c2('0x11e')]=function(_0x3fd708,_0x22f97f,_0x978e15){return db[_0x80c2('0x45')]['find']({'where':{'id':_0x3fd708[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0x22f97f,null))[_0x80c2('0x3c')](function(_0x532dec){if(_0x532dec){return _0x532dec[_0x80c2('0x11e')](_0x3fd708[_0x80c2('0x61')][_0x80c2('0x72')],_[_0x80c2('0xec')](_0x3fd708[_0x80c2('0x61')],['ids','id'])||{})[_0x80c2('0xc2')](function(_0xb4a444){for(var _0x4a9386=0x0;_0x4a9386<_0x3fd708['body'][_0x80c2('0x72')][_0x80c2('0x5e')];_0x4a9386+=0x1){socket[_0x80c2('0x11f')]('userChatWebsite:save',{'UserId':_0x3fd708[_0x80c2('0x61')][_0x80c2('0x72')][_0x4a9386],'ChatWebsiteId':_0x3fd708[_0x80c2('0x5c')]['id']});}return _0xb4a444;});}})[_0x80c2('0x3c')](respondWithResult(_0x22f97f,null))[_0x80c2('0x30')](handleError(_0x22f97f,null));};exports[_0x80c2('0x120')]=function(_0x424118,_0x16ce53,_0x5ea996){return db['ChatWebsite']['find']({'where':{'id':_0x424118[_0x80c2('0x5c')]['id']}})['then'](handleEntityNotFound(_0x16ce53,null))[_0x80c2('0x3c')](function(_0x2177c4){if(_0x2177c4){return _0x2177c4[_0x80c2('0x120')](_0x424118[_0x80c2('0x4a')]['ids'])['then'](function(){if(_[_0x80c2('0x121')](_0x424118[_0x80c2('0x4a')][_0x80c2('0x72')])){for(var _0x4d9a8f=0x0;_0x4d9a8f<_0x424118[_0x80c2('0x4a')][_0x80c2('0x72')][_0x80c2('0x5e')];_0x4d9a8f+=0x1){socket[_0x80c2('0x11f')](_0x80c2('0x122'),{'UserId':Number(_0x424118[_0x80c2('0x4a')][_0x80c2('0x72')][_0x4d9a8f]),'ChatWebsiteId':Number(_0x424118['params']['id'])});}}else{socket[_0x80c2('0x11f')](_0x80c2('0x122'),{'UserId':Number(_0x424118[_0x80c2('0x4a')][_0x80c2('0x72')]),'ChatWebsiteId':Number(_0x424118[_0x80c2('0x5c')]['id'])});}});}})['then'](respondWithStatusCode(_0x16ce53,null))[_0x80c2('0x30')](handleError(_0x16ce53,null));};exports[_0x80c2('0x123')]=function(_0xd1e1cc,_0xc3a04e,_0x300b46){var _0x39d826={};var _0x41ee8d={};var _0x219867;var _0x101c01;return db[_0x80c2('0x45')][_0x80c2('0x76')]({'where':{'id':_0xd1e1cc[_0x80c2('0x5c')]['id']}})[_0x80c2('0x3c')](handleEntityNotFound(_0xc3a04e,null))[_0x80c2('0x3c')](function(_0x56222b){if(_0x56222b){_0x219867=_0x56222b;_0x41ee8d[_0x80c2('0x49')]=_[_0x80c2('0x6e')](db['User']['rawAttributes']);_0x41ee8d[_0x80c2('0x4a')]=_[_0x80c2('0x6e')](_0xd1e1cc[_0x80c2('0x4a')]);_0x41ee8d['filters']=_['intersection'](_0x41ee8d[_0x80c2('0x49')],_0x41ee8d[_0x80c2('0x4a')]);_0x39d826[_0x80c2('0x4c')]=_['intersection'](_0x41ee8d[_0x80c2('0x49')],qs[_0x80c2('0x4d')](_0xd1e1cc[_0x80c2('0x4a')][_0x80c2('0x4d')]));_0x39d826[_0x80c2('0x4c')]=_0x39d826[_0x80c2('0x4c')][_0x80c2('0x5e')]?_0x39d826[_0x80c2('0x4c')]:_0x41ee8d['model'];_0x39d826['order']=qs[_0x80c2('0x6f')](_0xd1e1cc['query'][_0x80c2('0x6f')]);_0x39d826['where']=qs[_0x80c2('0x51')](_[_0x80c2('0x52')](_0xd1e1cc['query'],_0x41ee8d['filters']));if(_0xd1e1cc[_0x80c2('0x4a')][_0x80c2('0x53')]){_0x39d826[_0x80c2('0x54')]=_[_0x80c2('0x55')](_0x39d826[_0x80c2('0x54')],{'$or':_[_0x80c2('0x44')](_0x39d826['attributes'],function(_0x2b546c){var _0x5de396={};_0x5de396[_0x2b546c]={'$like':'%'+_0xd1e1cc[_0x80c2('0x4a')][_0x80c2('0x53')]+'%'};return _0x5de396;})});}_0x39d826=_[_0x80c2('0x55')]({},_0x39d826,_0xd1e1cc[_0x80c2('0x5f')]);return _0x219867['getAgents'](_0x39d826);}})[_0x80c2('0x3c')](function(_0x3e2938){if(_0x3e2938){_0x101c01=_0x3e2938[_0x80c2('0x5e')];if(!_0xd1e1cc[_0x80c2('0x4a')][_0x80c2('0x4e')](_0x80c2('0x4f'))){_0x39d826['limit']=qs['limit'](_0xd1e1cc[_0x80c2('0x4a')]['limit']);_0x39d826['offset']=qs[_0x80c2('0x35')](_0xd1e1cc[_0x80c2('0x4a')][_0x80c2('0x35')]);}return _0x219867['getAgents'](_0x39d826);}})['then'](function(_0x1071f3){if(_0x1071f3){return _0x1071f3?{'count':_0x101c01,'rows':_0x1071f3}:null;}})[_0x80c2('0x3c')](respondWithResult(_0xc3a04e,null))['catch'](handleError(_0xc3a04e,null));};
\ No newline at end of file
+var _0xe699=['from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','List','DESC','account','applications','Applications','list','orderBy','priority','asc','Contacts','customerIp','cf-connecting-ip','first','x-forwarded-for','firstName','lastName','x-real-port','referer','browser','format','unknown','version','%s\x20%s','device','vendor','threadId','ChatInteraction','externalUrl','ContactId','interaction','spread','contact','messageId','created','autoclose','push','*,*,*,*','ChatMessage','AttachmentId','UserId','unshift','waitForTheAssignedAgent','forcedOwnership','startRouting','EventManager','offline','mapKeyOffline','readFileSync','server/files/templates/chatOfflineMessage.ejs','utf8','render','toPairs','ChatOfflineMessage','MailAccount','MailServerOut','Smtp','forwardOfflineAddress','service','host','port','authentication','auth','pass','SendMail','sendMail','email','offlineMessageSubject','addInteraction','omit','Contact','User','Owner','fullname','Tag','Tags','color','tag','Command','getSnippet','timezone','interval','indexOf','true','ONLINE','No\x20timezone','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','inspect','Interval','Intervals','virtual','License','increment','chatLicenseExceeded','all','some','remote','x-real-ip','remoteAddress','replace','alignment','verticalAlignment','textColor','addApplications','sequelize','bulkCreate','ChatApplication','findAndCountAll','getApplications','addProactiveActions','getProactiveActions','ChatProactiveAction','getFields','online','false','onlineForm','items','fromKey','getOfflineMessages','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','rimraf','request-promise','bluebird','mustache','util','path','to-csv','lodash','squel','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./chatWebsite.socket','register','jayson/promise','client','http','test','Sequelize','ValidationError','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','end','json','count','offset','status','Content-Range','apply','reject','save','update','get','ChatWebsites','UserProfileResource','stack','name','send','index','Pause','mandatoryDispositionPause','ChatWebsite','fieldName','type','key','model','map','keys','query','filters','intersection','attributes','fields','length','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','params','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','body','destroy','describe','addDisposition','Disposition','getDispositions','findOne','hasOwnProperty','ChatWebsiteId','findAll','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','rawAttributes','removeAnswers','addLogo','sitepic','filename','addAvatar','agentAvatar','file','customerAvatar','addSystemAvatar','systemAvatar','join','root','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','server/files/images/avatars/system_avatar.png','notify','user-agent-parser','setUA','headers','user-agent','CmContact','no\x20available\x20attributes','createdAt','updatedAt','difference','CompanyId','ListId'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xe699,0x196));var _0x9e69=function(_0x32a3f3,_0x41004f){_0x32a3f3=_0x32a3f3-0x0;var _0x421387=_0xe699[_0x32a3f3];return _0x421387;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x9e69('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x9e69('0x1'));var moment=require('moment');var BPromise=require(_0x9e69('0x2'));var Mustache=require(_0x9e69('0x3'));var util=require(_0x9e69('0x4'));var path=require(_0x9e69('0x5'));var sox=require('sox');var csv=require(_0x9e69('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x9e69('0x7'));var squel=require(_0x9e69('0x8'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x9e69('0x9'));var toCsv=require(_0x9e69('0x6'));var querystring=require('querystring');var Papa=require(_0x9e69('0xa'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x9e69('0xb'));var as=require(_0x9e69('0xc'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9e69('0xd'))(_0x9e69('0xe'));var utils=require(_0x9e69('0xf'));var config=require(_0x9e69('0x10'));var db=require(_0x9e69('0x11'))['db'];config[_0x9e69('0x12')]=_[_0x9e69('0x13')](config[_0x9e69('0x12')],{'host':_0x9e69('0x14'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x9e69('0x15'))[_0x9e69('0x16')](socket);var jayson=require(_0x9e69('0x17'));var client=jayson['client']['http']({'port':0x232c});var client9002=jayson[_0x9e69('0x18')][_0x9e69('0x19')]({'port':0x232a});var client9003=jayson[_0x9e69('0x18')][_0x9e69('0x19')]({'port':0x232b});function checkPasswordPattern(_0x2e3a37,_0xf3e0,_0x4c71f8){if(_0x4c71f8){var _0x5ba665=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5ba665[_0x9e69('0x1a')](_0xf3e0)){return _0x2e3a37;}else{throw new db[(_0x9e69('0x1b'))][(_0x9e69('0x1c'))]('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 _0x2e3a37;}}function respondWithRpcPromise(_0xd4a427,_0x38a25a,_0x49b4e0,_0x3cfb76){return new BPromise(function(_0x2a779d,_0x58e3c1){var _0x31e85e=_0x3cfb76||client;return _0x31e85e[_0x9e69('0x1d')](_0xd4a427,_0x49b4e0)[_0x9e69('0x1e')](function(_0xd545ad){logger[_0x9e69('0x1f')](_0x9e69('0x20'),_0x38a25a,_0x9e69('0x21'));logger[_0x9e69('0x22')](_0x9e69('0x23'),_0x38a25a,'request\x20sent',JSON[_0x9e69('0x24')](_0xd545ad));if(_0xd545ad[_0x9e69('0x25')]){if(_0xd545ad[_0x9e69('0x25')]['code']===0x1f4){logger[_0x9e69('0x25')](_0x9e69('0x20'),_0x38a25a,_0xd545ad[_0x9e69('0x25')]['message']);return _0x58e3c1(_0xd545ad[_0x9e69('0x25')]['message']);}logger[_0x9e69('0x25')](_0x9e69('0x20'),_0x38a25a,_0xd545ad[_0x9e69('0x25')][_0x9e69('0x26')]);return _0x2a779d(_0xd545ad[_0x9e69('0x25')][_0x9e69('0x26')]);}else{logger[_0x9e69('0x1f')](_0x9e69('0x20'),_0x38a25a,_0x9e69('0x21'));_0x2a779d(_0xd545ad[_0x9e69('0x27')][_0x9e69('0x26')]);}})[_0x9e69('0x28')](function(_0x1f9646){logger[_0x9e69('0x25')](_0x9e69('0x20'),_0x38a25a,_0x1f9646);_0x58e3c1(_0x1f9646);});});}function respondWithStatusCode(_0x592859,_0x495f39){_0x495f39=_0x495f39||0xcc;return function(_0x4a7301){if(_0x4a7301){return _0x592859[_0x9e69('0x29')](_0x495f39);}return _0x592859['status'](_0x495f39)[_0x9e69('0x2a')]();};}function respondWithResult(_0x5ea7cb,_0x26a51a){_0x26a51a=_0x26a51a||0xc8;return function(_0x33b0dc){if(_0x33b0dc){return _0x5ea7cb['status'](_0x26a51a)[_0x9e69('0x2b')](_0x33b0dc);}};}function respondWithFilteredResult(_0x20c3cd,_0x80b9c4){return function(_0x4faab7){if(_0x4faab7){var _0x37b6d3=_0x4faab7[_0x9e69('0x2c')],_0x5420c9=_0x80b9c4[_0x9e69('0x2d')],_0x538d97=_0x80b9c4[_0x9e69('0x2d')]+_0x80b9c4['limit'],_0xd91592;if(_0x538d97>=_0x37b6d3){_0x538d97=_0x37b6d3;_0xd91592=0xc8;}else{_0xd91592=0xce;}_0x20c3cd[_0x9e69('0x2e')](_0xd91592);return _0x20c3cd['set'](_0x9e69('0x2f'),_0x5420c9+'-'+_0x538d97+'/'+_0x37b6d3)['json'](_0x4faab7);}return null;};}function patchUpdates(_0x4b43fa){return function(_0x5b6e7c){try{jsonpatch[_0x9e69('0x30')](_0x5b6e7c,_0x4b43fa,!![]);}catch(_0x5f1a19){return BPromise[_0x9e69('0x31')](_0x5f1a19);}return _0x5b6e7c[_0x9e69('0x32')]();};}function saveUpdates(_0x2c1a33,_0xa96198){return function(_0x5d7cb8){if(_0x5d7cb8){return _0x5d7cb8[_0x9e69('0x33')](_0x2c1a33)[_0x9e69('0x1e')](function(_0x255e75){return _0x255e75;});}return null;};}function removeEntity(_0x5f13df,_0xaccff8){return function(_0x38207c){if(_0x38207c){return _0x38207c['destroy']()['then'](function(){var _0x2b0254=_0x38207c[_0x9e69('0x34')]({'plain':!![]});var _0x3574d3=_0x9e69('0x35');return db[_0x9e69('0x36')]['destroy']({'where':{'type':_0x3574d3,'resourceId':_0x2b0254['id']}})['then'](function(){return _0x38207c;});})[_0x9e69('0x1e')](function(){_0x5f13df[_0x9e69('0x2e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4eec71,_0x1d6f75){return function(_0x1323c2){if(!_0x1323c2){_0x4eec71[_0x9e69('0x29')](0x194);}return _0x1323c2;};}function handleError(_0x20d4e6,_0x18e228){_0x18e228=_0x18e228||0x1f4;return function(_0x544830){logger[_0x9e69('0x25')](_0x544830[_0x9e69('0x37')]);if(_0x544830[_0x9e69('0x38')]){delete _0x544830['name'];}_0x20d4e6['status'](_0x18e228)[_0x9e69('0x39')](_0x544830);};}exports[_0x9e69('0x3a')]=function(_0x27327c,_0x4933ac){var _0x24464d={'include':[{'model':db[_0x9e69('0x3b')],'as':_0x9e69('0x3c')}]},_0x3e422d={},_0xd9a28={'count':0x0,'rows':[]};var _0x4b4035=_['map'](db[_0x9e69('0x3d')]['rawAttributes'],function(_0x19994e){return{'name':_0x19994e[_0x9e69('0x3e')],'type':_0x19994e[_0x9e69('0x3f')][_0x9e69('0x40')]};});_0x3e422d[_0x9e69('0x41')]=_[_0x9e69('0x42')](_0x4b4035,_0x9e69('0x38'));_0x3e422d['query']=_[_0x9e69('0x43')](_0x27327c[_0x9e69('0x44')]);_0x3e422d[_0x9e69('0x45')]=_[_0x9e69('0x46')](_0x3e422d[_0x9e69('0x41')],_0x3e422d[_0x9e69('0x44')]);_0x24464d[_0x9e69('0x47')]=_[_0x9e69('0x46')](_0x3e422d[_0x9e69('0x41')],qs['fields'](_0x27327c[_0x9e69('0x44')][_0x9e69('0x48')]));_0x24464d[_0x9e69('0x47')]=_0x24464d[_0x9e69('0x47')][_0x9e69('0x49')]?_0x24464d['attributes']:_0x3e422d[_0x9e69('0x41')];if(!_0x27327c['query']['hasOwnProperty'](_0x9e69('0x4a'))){_0x24464d[_0x9e69('0x4b')]=qs[_0x9e69('0x4b')](_0x27327c['query'][_0x9e69('0x4b')]);_0x24464d[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0x27327c[_0x9e69('0x44')][_0x9e69('0x2d')]);}_0x24464d[_0x9e69('0x4c')]=qs[_0x9e69('0x4d')](_0x27327c[_0x9e69('0x44')][_0x9e69('0x4d')]);_0x24464d[_0x9e69('0x4e')]=qs[_0x9e69('0x45')](_[_0x9e69('0x4f')](_0x27327c[_0x9e69('0x44')],_0x3e422d[_0x9e69('0x45')]));if(_0x27327c[_0x9e69('0x44')][_0x9e69('0x50')]){_0x24464d[_0x9e69('0x4e')]=_[_0x9e69('0x51')](_0x24464d[_0x9e69('0x4e')],{'$or':_[_0x9e69('0x42')](_0x4b4035,function(_0x1edb26){if(_0x1edb26['type']!==_0x9e69('0x52')){var _0x3a57ef={};_0x3a57ef[_0x1edb26['name']]={'$like':'%'+_0x27327c[_0x9e69('0x44')][_0x9e69('0x50')]+'%'};return _0x3a57ef;}})});}_0x24464d=_[_0x9e69('0x51')]({},_0x24464d,_0x27327c[_0x9e69('0x53')]);var _0x4cf4f4={'where':_0x24464d[_0x9e69('0x4e')]};return db['ChatWebsite'][_0x9e69('0x2c')](_0x4cf4f4)[_0x9e69('0x1e')](function(_0x4ee161){_0xd9a28['count']=_0x4ee161;if(_0x27327c[_0x9e69('0x44')][_0x9e69('0x54')]){_0x24464d[_0x9e69('0x55')]=[{'all':!![]}];}return db[_0x9e69('0x3d')]['findAll'](_0x24464d);})[_0x9e69('0x1e')](function(_0x44c825){_0xd9a28[_0x9e69('0x56')]=_0x44c825;return _0xd9a28;})[_0x9e69('0x1e')](respondWithFilteredResult(_0x4933ac,_0x24464d))[_0x9e69('0x28')](handleError(_0x4933ac,null));};exports['show']=function(_0x3605b4,_0x4e7b3b){var _0x110362={'raw':![],'where':{'id':_0x3605b4[_0x9e69('0x57')]['id']},'include':[{'model':db[_0x9e69('0x3b')],'as':'mandatoryDispositionPause'}]},_0x1c8b9f={};_0x1c8b9f['model']=_['keys'](db['ChatWebsite']['rawAttributes']);_0x1c8b9f['query']=_['keys'](_0x3605b4[_0x9e69('0x44')]);_0x1c8b9f[_0x9e69('0x45')]=_[_0x9e69('0x46')](_0x1c8b9f['model'],_0x1c8b9f[_0x9e69('0x44')]);_0x110362[_0x9e69('0x47')]=_[_0x9e69('0x46')](_0x1c8b9f[_0x9e69('0x41')],qs[_0x9e69('0x48')](_0x3605b4['query'][_0x9e69('0x48')]));_0x110362['attributes']=_0x110362[_0x9e69('0x47')][_0x9e69('0x49')]?_0x110362[_0x9e69('0x47')]:_0x1c8b9f[_0x9e69('0x41')];if(_0x3605b4[_0x9e69('0x44')][_0x9e69('0x54')]){_0x110362[_0x9e69('0x55')]=[{'all':!![]}];}_0x110362=_[_0x9e69('0x51')]({},_0x110362,_0x3605b4['options']);return db['ChatWebsite'][_0x9e69('0x58')](_0x110362)['then'](handleEntityNotFound(_0x4e7b3b,null))[_0x9e69('0x1e')](respondWithResult(_0x4e7b3b,null))[_0x9e69('0x28')](handleError(_0x4e7b3b,null));};exports[_0x9e69('0x59')]=function(_0x4b168e,_0x1b38e4){return db[_0x9e69('0x3d')][_0x9e69('0x59')](_0x4b168e['body'],{})[_0x9e69('0x1e')](function(_0x103e6d){var _0x6db9ea=_0x4b168e[_0x9e69('0x5a')]['get']({'plain':!![]});if(!_0x6db9ea)throw new Error(_0x9e69('0x5b'));if(_0x6db9ea['role']==='user'){var _0x24916c=_0x103e6d[_0x9e69('0x34')]({'plain':!![]});var _0x4853a0=_0x9e69('0x35');return db[_0x9e69('0x5c')]['find']({'where':{'name':_0x4853a0,'userProfileId':_0x6db9ea[_0x9e69('0x5d')]},'raw':!![]})[_0x9e69('0x1e')](function(_0x339079){if(_0x339079&&_0x339079[_0x9e69('0x5e')]===0x0){return db[_0x9e69('0x36')][_0x9e69('0x59')]({'name':_0x24916c['name'],'resourceId':_0x24916c['id'],'type':_0x339079[_0x9e69('0x38')],'sectionId':_0x339079['id']},{})[_0x9e69('0x1e')](function(){return _0x103e6d;});}else{return _0x103e6d;}})[_0x9e69('0x28')](function(_0x14bacb){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x14bacb);throw _0x14bacb;});}return _0x103e6d;})[_0x9e69('0x1e')](respondWithResult(_0x1b38e4,0xc9))[_0x9e69('0x28')](handleError(_0x1b38e4,null));};exports['update']=function(_0x40b7fb,_0x5dfb18){if(_0x40b7fb['body']['id']){delete _0x40b7fb[_0x9e69('0x5f')]['id'];}return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'where':{'id':_0x40b7fb['params']['id']},'include':[{'model':db[_0x9e69('0x3b')],'as':_0x9e69('0x3c')}]})[_0x9e69('0x1e')](handleEntityNotFound(_0x5dfb18,null))[_0x9e69('0x1e')](saveUpdates(_0x40b7fb['body'],null))[_0x9e69('0x1e')](respondWithResult(_0x5dfb18,null))['catch'](handleError(_0x5dfb18,null));};exports[_0x9e69('0x60')]=function(_0x5987a8,_0x120071){return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'where':{'id':_0x5987a8['params']['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x120071,null))[_0x9e69('0x1e')](removeEntity(_0x120071,null))['catch'](handleError(_0x120071,null));};exports[_0x9e69('0x61')]=function(_0x232059,_0x420298){return db[_0x9e69('0x3d')][_0x9e69('0x61')]()[_0x9e69('0x1e')](respondWithResult(_0x420298,null))[_0x9e69('0x28')](handleError(_0x420298,null));};exports[_0x9e69('0x62')]=function(_0x243198,_0x418360,_0x2f4aee){if(_0x243198[_0x9e69('0x5f')]['id']){delete _0x243198[_0x9e69('0x5f')]['id'];}return db[_0x9e69('0x3d')]['find']({'where':{'id':_0x243198[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x418360,null))['then'](function(_0x3cbe0a){if(_0x3cbe0a){_0x243198[_0x9e69('0x5f')]['ChatWebsiteId']=_0x3cbe0a['id'];return db[_0x9e69('0x63')]['create'](_0x243198[_0x9e69('0x5f')]);}})[_0x9e69('0x1e')](respondWithResult(_0x418360,null))['catch'](handleError(_0x418360,null));};exports[_0x9e69('0x64')]=function(_0x236206,_0x3ef54f,_0x3f88f3){var _0x582dd5={'raw':![],'where':{}};var _0x2667ba={};var _0x1f8f2d={'count':0x0,'rows':[]};return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0x236206[_0x9e69('0x57')]['id']}})['then'](handleEntityNotFound(_0x3ef54f,null))['then'](function(_0x359ac0){if(_0x359ac0){_0x2667ba[_0x9e69('0x41')]=_['keys'](db[_0x9e69('0x63')]['rawAttributes']);_0x2667ba['query']=_['keys'](_0x236206['query']);_0x2667ba[_0x9e69('0x45')]=_[_0x9e69('0x46')](_0x2667ba[_0x9e69('0x41')],_0x2667ba[_0x9e69('0x44')]);_0x582dd5[_0x9e69('0x47')]=_[_0x9e69('0x46')](_0x2667ba['model'],qs[_0x9e69('0x48')](_0x236206['query']['fields']));_0x582dd5[_0x9e69('0x47')]=_0x582dd5[_0x9e69('0x47')]['length']?_0x582dd5[_0x9e69('0x47')]:_0x2667ba[_0x9e69('0x41')];if(!_0x236206['query'][_0x9e69('0x66')](_0x9e69('0x4a'))){_0x582dd5[_0x9e69('0x4b')]=qs[_0x9e69('0x4b')](_0x236206[_0x9e69('0x44')][_0x9e69('0x4b')]);_0x582dd5[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0x236206[_0x9e69('0x44')][_0x9e69('0x2d')]);}_0x582dd5['order']=qs[_0x9e69('0x4d')](_0x236206['query'][_0x9e69('0x4d')]);_0x582dd5[_0x9e69('0x4e')]=qs[_0x9e69('0x45')](_[_0x9e69('0x4f')](_0x236206['query'],_0x2667ba[_0x9e69('0x45')]));_0x582dd5[_0x9e69('0x4e')][_0x9e69('0x67')]=_0x359ac0['id'];if(_0x236206[_0x9e69('0x44')][_0x9e69('0x50')]){_0x582dd5[_0x9e69('0x4e')]=_['merge'](_0x582dd5[_0x9e69('0x4e')],{'$or':_['map'](_0x582dd5['attributes'],function(_0x5de2c2){var _0x424ce4={};_0x424ce4[_0x5de2c2]={'$like':'%'+_0x236206[_0x9e69('0x44')][_0x9e69('0x50')]+'%'};return _0x424ce4;})});}_0x582dd5=_['merge']({},_0x582dd5,_0x236206[_0x9e69('0x53')]);return db[_0x9e69('0x63')][_0x9e69('0x2c')]({'where':_0x582dd5[_0x9e69('0x4e')]})['then'](function(_0x4d44c7){_0x1f8f2d[_0x9e69('0x2c')]=_0x4d44c7;if(_0x236206[_0x9e69('0x44')][_0x9e69('0x54')]){_0x582dd5[_0x9e69('0x55')]=[{'all':!![]}];}return db[_0x9e69('0x63')][_0x9e69('0x68')](_0x582dd5);})[_0x9e69('0x1e')](function(_0x12affe){_0x1f8f2d['rows']=_0x12affe;return _0x1f8f2d;});}})[_0x9e69('0x1e')](respondWithFilteredResult(_0x3ef54f,_0x582dd5))[_0x9e69('0x28')](handleError(_0x3ef54f,null));};exports[_0x9e69('0x69')]=function(_0x23d9b3,_0x481f23,_0x2bac5b){return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'where':{'id':_0x23d9b3[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x481f23,null))[_0x9e69('0x1e')](function(_0x1a3859){if(_0x1a3859){return _0x1a3859[_0x9e69('0x69')](_0x23d9b3['query'][_0x9e69('0x6a')]);}})['then'](respondWithStatusCode(_0x481f23,null))[_0x9e69('0x28')](handleError(_0x481f23,null));};exports[_0x9e69('0x6b')]=function(_0x2012a7,_0x36584d,_0x27598c){if(_0x2012a7[_0x9e69('0x5f')]['id']){delete _0x2012a7[_0x9e69('0x5f')]['id'];}return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'where':{'id':_0x2012a7[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x36584d,null))[_0x9e69('0x1e')](function(_0x409f38){if(_0x409f38){_0x2012a7[_0x9e69('0x5f')]['ChatWebsiteId']=_0x409f38['id'];return db[_0x9e69('0x6c')][_0x9e69('0x59')](_0x2012a7[_0x9e69('0x5f')]);}})[_0x9e69('0x1e')](respondWithResult(_0x36584d,null))[_0x9e69('0x28')](handleError(_0x36584d,null));};exports[_0x9e69('0x6d')]=function(_0x3a05b9,_0x3a797f,_0x1fba5d){var _0x4ff882={'raw':![],'where':{}};var _0xdc66cf={};var _0x3b788a={'count':0x0,'rows':[]};return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0x3a05b9['params']['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x3a797f,null))[_0x9e69('0x1e')](function(_0x20e119){if(_0x20e119){_0xdc66cf['model']=_[_0x9e69('0x43')](db[_0x9e69('0x6c')][_0x9e69('0x6e')]);_0xdc66cf[_0x9e69('0x44')]=_[_0x9e69('0x43')](_0x3a05b9[_0x9e69('0x44')]);_0xdc66cf['filters']=_[_0x9e69('0x46')](_0xdc66cf['model'],_0xdc66cf['query']);_0x4ff882['attributes']=_[_0x9e69('0x46')](_0xdc66cf[_0x9e69('0x41')],qs['fields'](_0x3a05b9[_0x9e69('0x44')][_0x9e69('0x48')]));_0x4ff882[_0x9e69('0x47')]=_0x4ff882['attributes'][_0x9e69('0x49')]?_0x4ff882['attributes']:_0xdc66cf[_0x9e69('0x41')];if(!_0x3a05b9[_0x9e69('0x44')][_0x9e69('0x66')](_0x9e69('0x4a'))){_0x4ff882['limit']=qs[_0x9e69('0x4b')](_0x3a05b9[_0x9e69('0x44')][_0x9e69('0x4b')]);_0x4ff882[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0x3a05b9[_0x9e69('0x44')]['offset']);}_0x4ff882['order']=qs['sort'](_0x3a05b9[_0x9e69('0x44')]['sort']);_0x4ff882[_0x9e69('0x4e')]=qs[_0x9e69('0x45')](_[_0x9e69('0x4f')](_0x3a05b9[_0x9e69('0x44')],_0xdc66cf[_0x9e69('0x45')]));_0x4ff882[_0x9e69('0x4e')][_0x9e69('0x67')]=_0x20e119['id'];if(_0x3a05b9[_0x9e69('0x44')]['filter']){_0x4ff882['where']=_[_0x9e69('0x51')](_0x4ff882[_0x9e69('0x4e')],{'$or':_[_0x9e69('0x42')](_0x4ff882['attributes'],function(_0x967b10){var _0x5bf6b2={};_0x5bf6b2[_0x967b10]={'$like':'%'+_0x3a05b9[_0x9e69('0x44')][_0x9e69('0x50')]+'%'};return _0x5bf6b2;})});}_0x4ff882=_['merge']({},_0x4ff882,_0x3a05b9[_0x9e69('0x53')]);return db[_0x9e69('0x6c')]['count']({'where':_0x4ff882['where']})[_0x9e69('0x1e')](function(_0x2a91ae){_0x3b788a['count']=_0x2a91ae;if(_0x3a05b9['query'][_0x9e69('0x54')]){_0x4ff882[_0x9e69('0x55')]=[{'all':!![]}];}return db[_0x9e69('0x6c')]['findAll'](_0x4ff882);})[_0x9e69('0x1e')](function(_0x7e093a){_0x3b788a['rows']=_0x7e093a;return _0x3b788a;});}})[_0x9e69('0x1e')](respondWithFilteredResult(_0x3a797f,_0x4ff882))['catch'](handleError(_0x3a797f,null));};exports[_0x9e69('0x6f')]=function(_0x321d19,_0x69309c,_0x128850){return db[_0x9e69('0x3d')]['find']({'where':{'id':_0x321d19['params']['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x69309c,null))[_0x9e69('0x1e')](function(_0x2b1442){if(_0x2b1442){return _0x2b1442[_0x9e69('0x6f')](_0x321d19['query'][_0x9e69('0x6a')]);}})[_0x9e69('0x1e')](respondWithStatusCode(_0x69309c,null))[_0x9e69('0x28')](handleError(_0x69309c,null));};exports[_0x9e69('0x70')]=function(_0x46dc83,_0x28cbf6,_0x309cb6){_0x46dc83[_0x9e69('0x5f')][_0x9e69('0x71')]=_0x46dc83['file'][_0x9e69('0x72')];return db[_0x9e69('0x3d')]['find']({'where':{'id':_0x46dc83['params']['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x28cbf6,null))[_0x9e69('0x1e')](saveUpdates(_0x46dc83['body'],null))[_0x9e69('0x1e')](respondWithResult(_0x28cbf6,null))[_0x9e69('0x28')](handleError(_0x28cbf6,null));};exports[_0x9e69('0x73')]=function(_0x388237,_0x5cf62c,_0x726cec){_0x388237[_0x9e69('0x5f')][_0x9e69('0x74')]=_0x388237[_0x9e69('0x75')][_0x9e69('0x72')];return db['ChatWebsite'][_0x9e69('0x58')]({'where':{'id':_0x388237[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x5cf62c,null))[_0x9e69('0x1e')](saveUpdates(_0x388237[_0x9e69('0x5f')],null))[_0x9e69('0x1e')](respondWithResult(_0x5cf62c,null))[_0x9e69('0x28')](handleError(_0x5cf62c,null));};exports['addCustomerAvatar']=function(_0x2145a6,_0x575e50,_0x3ac2ed){_0x2145a6[_0x9e69('0x5f')][_0x9e69('0x76')]=_0x2145a6['file']['filename'];return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'where':{'id':_0x2145a6[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x575e50,null))[_0x9e69('0x1e')](saveUpdates(_0x2145a6[_0x9e69('0x5f')],null))[_0x9e69('0x1e')](respondWithResult(_0x575e50,null))[_0x9e69('0x28')](handleError(_0x575e50,null));};exports[_0x9e69('0x77')]=function(_0x4f58b5,_0xce141f,_0x2d592d){_0x4f58b5[_0x9e69('0x5f')][_0x9e69('0x78')]=_0x4f58b5[_0x9e69('0x75')]['filename'];return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'where':{'id':_0x4f58b5[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0xce141f,null))['then'](saveUpdates(_0x4f58b5[_0x9e69('0x5f')],null))['then'](respondWithResult(_0xce141f,null))[_0x9e69('0x28')](handleError(_0xce141f,null));};exports['getLogo']=function(_0x542a92,_0x36502e,_0x51bb6b){var _0x26c62c=path[_0x9e69('0x79')](config[_0x9e69('0x7a')],'server/files/images/logos/default_logo.png');var _0x409f37={'where':{'id':_0x542a92['params']['id']},'attributes':['id','sitepic'],'raw':!![]};var _0x1b3db6=![];return require('../../config/license/util')[_0x9e69('0x7b')]()[_0x9e69('0x1e')](function(_0x46885b){if(_0x46885b){_0x1b3db6=_0x46885b[_0x9e69('0x7c')];}})['then'](function(){return db[_0x9e69('0x3d')][_0x9e69('0x58')](_0x409f37);})[_0x9e69('0x1e')](handleEntityNotFound(_0x36502e,null))[_0x9e69('0x1e')](function(_0x778e49){if(_0x778e49){if(!_[_0x9e69('0x7d')](_0x778e49[_0x9e69('0x71')])){if(fs[_0x9e69('0x7e')](path['join'](config[_0x9e69('0x7a')],_0x9e69('0x7f'),_0x778e49[_0x9e69('0x71')]))&&_0x1b3db6){_0x26c62c=path[_0x9e69('0x79')](config['root'],'server/files/images/logos/',_0x778e49[_0x9e69('0x71')]);}}return _0x36502e[_0x9e69('0x80')](_0x26c62c);}})[_0x9e69('0x28')](handleError(_0x36502e,null));};exports['getAvatar']=function(_0x291dc5,_0x439144,_0x185e57){var _0x3cb896=path[_0x9e69('0x79')](config['root'],_0x9e69('0x81'));var _0x175a9f={'where':{'id':_0x291dc5[_0x9e69('0x57')]['id']},'attributes':['id',_0x9e69('0x74')],'raw':!![]};return db['ChatWebsite'][_0x9e69('0x58')](_0x175a9f)[_0x9e69('0x1e')](handleEntityNotFound(_0x439144,null))[_0x9e69('0x1e')](function(_0x460650){if(_0x460650){if(!_['isNil'](_0x460650[_0x9e69('0x74')])){if(fs['existsSync'](path[_0x9e69('0x79')](config[_0x9e69('0x7a')],_0x9e69('0x82'),_0x460650[_0x9e69('0x74')]))){_0x3cb896=path[_0x9e69('0x79')](config[_0x9e69('0x7a')],_0x9e69('0x82'),_0x460650[_0x9e69('0x74')]);}}return _0x439144['download'](_0x3cb896);}})['catch'](handleError(_0x439144,null));};exports['getCustomerAvatar']=function(_0x29fea7,_0x555a84,_0x964ab5){var _0x268758=path[_0x9e69('0x79')](config[_0x9e69('0x7a')],'server/files/images/avatars/customer_avatar.png');var _0x4603e8={'where':{'id':_0x29fea7[_0x9e69('0x57')]['id']},'attributes':['id',_0x9e69('0x76'),'showCustomerAvatar'],'raw':!![]};return db[_0x9e69('0x3d')]['find'](_0x4603e8)[_0x9e69('0x1e')](handleEntityNotFound(_0x555a84,null))[_0x9e69('0x1e')](function(_0x3fc582){if(_0x3fc582){if(!_['isNil'](_0x3fc582[_0x9e69('0x76')])){if(fs[_0x9e69('0x7e')](path[_0x9e69('0x79')](config['root'],_0x9e69('0x82'),_0x3fc582[_0x9e69('0x76')]))&&_0x3fc582['showCustomerAvatar']){_0x268758=path[_0x9e69('0x79')](config[_0x9e69('0x7a')],_0x9e69('0x82'),_0x3fc582[_0x9e69('0x76')]);}}return _0x555a84['download'](_0x268758);}})[_0x9e69('0x28')](handleError(_0x555a84,null));};exports['getSystemAvatar']=function(_0x530f1e,_0x1134d3,_0x5252ea){var _0x5d13ad=path[_0x9e69('0x79')](config[_0x9e69('0x7a')],_0x9e69('0x83'));var _0x314959={'where':{'id':_0x530f1e[_0x9e69('0x57')]['id']},'attributes':['id',_0x9e69('0x78')],'raw':!![]};return db[_0x9e69('0x3d')]['find'](_0x314959)['then'](handleEntityNotFound(_0x1134d3,null))[_0x9e69('0x1e')](function(_0xa3573e){if(_0xa3573e){if(!_[_0x9e69('0x7d')](_0xa3573e['systemAvatar'])){if(fs[_0x9e69('0x7e')](path[_0x9e69('0x79')](config['root'],_0x9e69('0x82'),_0xa3573e['systemAvatar']))){_0x5d13ad=path[_0x9e69('0x79')](config[_0x9e69('0x7a')],_0x9e69('0x82'),_0xa3573e['systemAvatar']);}}return _0x1134d3[_0x9e69('0x80')](_0x5d13ad);}})[_0x9e69('0x28')](handleError(_0x1134d3,null));};exports[_0x9e69('0x84')]=function(_0x45dcae,_0x34db78,_0x46a6c5){var _0x38c2b2=require(_0x9e69('0x85'));var _0x3908d6=new _0x38c2b2();var _0x6bb4ef=_0x3908d6[_0x9e69('0x86')](_0x45dcae[_0x9e69('0x87')][_0x9e69('0x88')])['getResult']();var _0xf719ce={'body':_0x45dcae[_0x9e69('0x5f')],'channel':'chat'};var _0x582da5=[];var _0x385a41=[];var _0x3568c7={};var _0x39765a=![];return db[_0x9e69('0x89')][_0x9e69('0x61')]()[_0x9e69('0x1e')](function(_0x3a759f){if(!_0x3a759f){throw new db[(_0x9e69('0x1b'))][(_0x9e69('0x1c'))](_0x9e69('0x8a'));}_0x582da5=_['difference'](_[_0x9e69('0x43')](_0x3a759f),[_0x9e69('0x8b'),_0x9e69('0x8c')]);_0x385a41=_[_0x9e69('0x8d')](_[_0x9e69('0x43')](_0x3a759f),[_0x9e69('0x8b'),_0x9e69('0x8c'),_0x9e69('0x8e'),_0x9e69('0x8f')]);if(_0x45dcae['body']['id']){delete _0x45dcae['body']['id'];}if(_[_0x9e69('0x7d')](_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x90')])){throw new db[(_0x9e69('0x1b'))][(_0x9e69('0x1c'))](_0x9e69('0x91'));}if(_[_0x9e69('0x7d')](_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x5f')])||_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x5f')]===''){throw new db['Sequelize']['ValidationError'](_0x9e69('0x92'));}if(_['isNil'](_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x93')])){throw new db['Sequelize']['ValidationError'](_0x9e69('0x94')+_0x385a41);}if(!_[_0x9e69('0x95')](_0x385a41,_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x93')])){throw new db[(_0x9e69('0x1b'))][(_0x9e69('0x1c'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x385a41);}_0x3568c7[_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x93')]]=_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x90')];})[_0x9e69('0x1e')](function(){return db[_0x9e69('0x3d')]['find']({'where':{'id':_0x45dcae[_0x9e69('0x57')]['id']},'include':[{'model':db[_0x9e69('0x96')],'as':_0x9e69('0x97'),'include':[{'model':db[_0x9e69('0x89')],'as':'Contacts','where':_0x3568c7,'limit':0x1,'order':[[_0x9e69('0x8c'),_0x9e69('0x98')]]}]},{'model':db['ChatApplication'],'as':'Applications'}]});})[_0x9e69('0x1e')](handleEntityNotFound(_0x34db78,null))[_0x9e69('0x1e')](function(_0x37da07){if(_0x37da07&&_0x37da07['List']){_0xf719ce[_0x9e69('0x99')]=_0x37da07;_0xf719ce[_0x9e69('0x9a')]=_0x37da07[_0x9e69('0x9b')];_0xf719ce[_0x9e69('0x9c')]=_0x37da07[_0x9e69('0x97')];_0xf719ce[_0x9e69('0x9a')]=_[_0x9e69('0x9d')](_0xf719ce[_0x9e69('0x9a')],[_0x9e69('0x9e')],[_0x9e69('0x9f')]);if(_0xf719ce[_0x9e69('0x99')][_0x9e69('0x9b')]){delete _0xf719ce['account'][_0x9e69('0x9b')];}if(_0xf719ce[_0x9e69('0x99')][_0x9e69('0x97')]&&_0xf719ce['account'][_0x9e69('0x97')][_0x9e69('0xa0')][_0x9e69('0x49')]){return _0xf719ce[_0x9e69('0x99')]['List'][_0x9e69('0xa0')][0x0];}var _0x43889c=_[_0x9e69('0x13')](_0x45dcae[_0x9e69('0x5f')],{'firstName':_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x90')],'ListId':_0x37da07[_0x9e69('0x8f')]});_0x43889c[_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x93')]]=_0x45dcae['body'][_0x9e69('0x90')];return db['CmContact'][_0x9e69('0x59')](_0x43889c,{'fields':_0x582da5,'raw':!![]});}})[_0x9e69('0x1e')](handleEntityNotFound(_0x34db78,null))['then'](function(_0x2a6d6e){_0xf719ce['contact']=_0x2a6d6e;var _0x1e9214=_0x45dcae[_0x9e69('0x5f')][_0x9e69('0xa1')];if(_0x45dcae[_0x9e69('0x87')][_0x9e69('0xa2')]){_0x1e9214=_0x45dcae[_0x9e69('0x87')][_0x9e69('0xa2')];}else if(_0x45dcae['headers']['x-forwarded-for']){_0x1e9214=_[_0x9e69('0xa3')](_0x45dcae[_0x9e69('0x87')][_0x9e69('0xa4')]['split'](','));}if(_0x2a6d6e){var _0x4c2822={'ContactId':_0x2a6d6e['id'],'ChatWebsiteId':_0x45dcae[_0x9e69('0x57')]['id'],'from':(_0x2a6d6e[_0x9e69('0xa5')]||'')+'\x20'+(_0x2a6d6e[_0x9e69('0xa6')]||''),'customerIp':_0x1e9214,'customerPort':_0x45dcae['headers']['x-real-port']?_0x45dcae['headers'][_0x9e69('0xa7')]:null,'referer':_0x45dcae['body'][_0x9e69('0xa8')],'browserName':_0x6bb4ef[_0x9e69('0xa9')][_0x9e69('0x38')]&&_0x6bb4ef[_0x9e69('0xa9')]['version']?util[_0x9e69('0xaa')]('%s\x20%s',_0x6bb4ef[_0x9e69('0xa9')][_0x9e69('0x38')],_0x6bb4ef['browser']['version']):_0x9e69('0xab'),'browserVersion':_0x6bb4ef[_0x9e69('0xa9')][_0x9e69('0xac')]||'unknown','osName':util[_0x9e69('0xaa')](_0x9e69('0xad'),_0x6bb4ef['os']['name'],_0x6bb4ef['os'][_0x9e69('0xac')]),'osVersion':_0x6bb4ef['os']['version'],'deviceModel':_0x6bb4ef[_0x9e69('0xae')][_0x9e69('0x41')]&&_0x6bb4ef[_0x9e69('0xae')]['vendor']?util['format']('%s\x20%s\x20%s',_0x6bb4ef[_0x9e69('0xae')][_0x9e69('0x41')],_0x6bb4ef[_0x9e69('0xae')][_0x9e69('0xaf')],_0x6bb4ef[_0x9e69('0xae')]['type']):null,'deviceVendor':_0x6bb4ef[_0x9e69('0xae')][_0x9e69('0xaf')],'deviceType':_0x6bb4ef[_0x9e69('0xae')][_0x9e69('0x3f')],'formData':JSON['stringify'](_0x45dcae['body'])};var _0x1f14ab={'ChatWebsiteId':_0x45dcae[_0x9e69('0x57')]['id'],'closed':![]};if(_0x45dcae[_0x9e69('0x5f')][_0x9e69('0xb0')]){_0x1f14ab[_0x9e69('0xb0')]=_0x45dcae['body'][_0x9e69('0xb0')];return db[_0x9e69('0xb1')][_0x9e69('0x58')]({'where':_0x1f14ab})[_0x9e69('0x1e')](function(_0x44434d){if(_0x44434d){return[_0x44434d,![]];}_0x4c2822[_0x9e69('0xb0')]=_0x45dcae['body'][_0x9e69('0xb0')];_0x4c2822[_0x9e69('0xb2')]=_0x45dcae['body'][_0x9e69('0xb2')];return db['ChatInteraction'][_0x9e69('0x59')](_0x4c2822)['then'](function(_0x436467){return[_0x436467,!![]];});});}_0x1f14ab[_0x9e69('0xb3')]=_0x2a6d6e['id'];if(_0x45dcae['body'][_0x9e69('0xb4')]&&_0x45dcae[_0x9e69('0x5f')][_0x9e69('0xb4')]['id']){_0x1f14ab['id']=_0x45dcae[_0x9e69('0x5f')]['interaction']['id'];return db[_0x9e69('0xb1')][_0x9e69('0x58')]({'where':_0x1f14ab})[_0x9e69('0x1e')](function(_0x2375cf){if(_0x2375cf){return[_0x2375cf,![]];}return db[_0x9e69('0xb1')][_0x9e69('0x59')](_0x4c2822)[_0x9e69('0x1e')](function(_0x40cb7c){return[_0x40cb7c,!![]];});});}return db[_0x9e69('0xb1')][_0x9e69('0x59')](_0x4c2822)[_0x9e69('0x1e')](function(_0x17f082){return[_0x17f082,!![]];});}})[_0x9e69('0xb5')](function(_0x44931f,_0x55dd15){if(_0x44931f){_0x39765a=_0x55dd15;if(!_0x55dd15){var _0x2c7f9a={'from':(_0xf719ce[_0x9e69('0xb6')][_0x9e69('0xa5')]||'')+'\x20'+(_0xf719ce[_0x9e69('0xb6')][_0x9e69('0xa6')]||'')};if(_0x45dcae[_0x9e69('0x5f')][_0x9e69('0xb0')]&&_0x45dcae[_0x9e69('0x5f')][_0x9e69('0xb7')]&&_0x45dcae[_0x9e69('0x5f')][_0x9e69('0xb0')]!=_0x45dcae[_0x9e69('0x5f')]['messageId']){_0x2c7f9a['threadId']=_0x45dcae['body'][_0x9e69('0xb7')];}return _0x44931f['update'](_0x2c7f9a);}else{return _0x44931f;}}})['then'](function(_0x4875cc){_0xf719ce[_0x9e69('0xb4')]=_0x4875cc[_0x9e69('0x34')]({'plain':!![]});_0xf719ce[_0x9e69('0xb4')][_0x9e69('0xb8')]=_0x39765a;if(_0xf719ce[_0x9e69('0xb4')][_0x9e69('0xb8')]){if(_0xf719ce['account'][_0x9e69('0xb9')]){_0xf719ce[_0x9e69('0x9a')][_0x9e69('0xba')]({'id':0x0,'priority':_0xf719ce[_0x9e69('0x9a')][_0x9e69('0x49')]+0x1,'app':'close','appdata':'unmanaged','interval':_0x9e69('0xbb')});}}return db[_0x9e69('0xbc')]['create']({'body':_0x45dcae[_0x9e69('0x5f')][_0x9e69('0x5f')],'ChatWebsiteId':_0x45dcae[_0x9e69('0x57')]['id'],'ChatInteractionId':_0x4875cc['id'],'direction':'in','ContactId':_0xf719ce[_0x9e69('0xb6')]['id'],'AttachmentId':_0x45dcae['body'][_0x9e69('0xbd')]});})[_0x9e69('0x1e')](function(_0x52abee){_0xf719ce['message']=_0x52abee;if(_0xf719ce[_0x9e69('0xb4')][_0x9e69('0xbe')]){return db['User'][_0x9e69('0x58')]({'attributes':['id','name'],'where':{'id':_0xf719ce[_0x9e69('0xb4')][_0x9e69('0xbe')]}})[_0x9e69('0x1e')](function(_0x22014a){if(_0x22014a){_0xf719ce[_0x9e69('0x9a')][_0x9e69('0xbf')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x22014a[_0x9e69('0x38')]+','+(_0xf719ce[_0x9e69('0x99')][_0x9e69('0xc0')]||0xa),'interval':_0x9e69('0xbb')});_0xf719ce[_0x9e69('0xc1')]=!![];}return respondWithRpcPromise('Start',_0x9e69('0xc2'),_0xf719ce);});}return respondWithRpcPromise('Start',_0x9e69('0xc2'),_0xf719ce);})[_0x9e69('0x1e')](function(_0x14570f){respondWithRpcPromise(_0x9e69('0xc3'),_0x9e69('0xc3'),{'event':'notify','message':_0x14570f},client9002);return _0x14570f;})['then'](respondWithResult(_0x34db78,null))[_0x9e69('0x28')](handleError(_0x34db78,null));};exports[_0x9e69('0xc4')]=function(_0x568073,_0x1ca077,_0x52cb10){var _0x22bb24,_0x19c67a,_0x1f2c98;var _0x528820=[];var _0x45abd5=[];var _0x33efb9={};return db[_0x9e69('0x89')][_0x9e69('0x61')]()[_0x9e69('0x1e')](function(_0x422856){if(!_0x422856){throw new db['Sequelize']['ValidationError']('no\x20available\x20attributes');}_0x45abd5=_[_0x9e69('0x8d')](_['keys'](_0x422856),[_0x9e69('0x8b'),'updatedAt']);_0x528820=_[_0x9e69('0x8d')](_['keys'](_0x422856),[_0x9e69('0x8b'),_0x9e69('0x8c'),_0x9e69('0x8e'),_0x9e69('0x8f')]);if(_0x568073[_0x9e69('0x5f')]['id']){delete _0x568073[_0x9e69('0x5f')]['id'];}if(_[_0x9e69('0x7d')](_0x568073['body'][_0x9e69('0x90')])){throw _0x1ca077[_0x9e69('0x2e')](0x1f4)['send'](new db[(_0x9e69('0x1b'))][(_0x9e69('0x1c'))](_0x9e69('0x91')));}if(_[_0x9e69('0x7d')](_0x568073[_0x9e69('0x5f')][_0x9e69('0x5f')])||_0x568073[_0x9e69('0x5f')][_0x9e69('0x5f')]===''){throw _0x1ca077[_0x9e69('0x2e')](0x1f4)[_0x9e69('0x39')](new db[(_0x9e69('0x1b'))][(_0x9e69('0x1c'))](_0x9e69('0x92')));}if(_[_0x9e69('0x7d')](_0x568073[_0x9e69('0x5f')][_0x9e69('0xc5')])){throw _0x1ca077[_0x9e69('0x2e')](0x1f4)[_0x9e69('0x39')](new db['Sequelize'][(_0x9e69('0x1c'))]('mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x528820));}if(!_['includes'](_0x528820,_0x568073['body'][_0x9e69('0xc5')])){throw _0x1ca077[_0x9e69('0x2e')](0x1f4)['send'](new db[(_0x9e69('0x1b'))][(_0x9e69('0x1c'))]('mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x528820));}_0x33efb9[_0x568073['body'][_0x9e69('0xc5')]]=_0x568073[_0x9e69('0x5f')][_0x9e69('0x90')];})[_0x9e69('0x1e')](function(){return db['ChatWebsite'][_0x9e69('0x58')]({'where':{'id':_0x568073['params']['id']},'include':[{'model':db[_0x9e69('0x96')],'as':_0x9e69('0x97')}]});})[_0x9e69('0x1e')](handleEntityNotFound(_0x1ca077,null))['then'](function(_0x5dfe64){if(_0x5dfe64&&_0x5dfe64[_0x9e69('0x97')]){_0x19c67a=_0x5dfe64;var _0x59d78e=_[_0x9e69('0x13')](_0x568073[_0x9e69('0x5f')],{'firstName':_0x568073[_0x9e69('0x5f')][_0x9e69('0x90')],'phone':_0x568073[_0x9e69('0x5f')][_0x9e69('0x90')],'ListId':_0x5dfe64['ListId']});_0x59d78e[_0x568073[_0x9e69('0x5f')][_0x9e69('0xc5')]]=_0x568073[_0x9e69('0x5f')][_0x9e69('0x90')];return db[_0x9e69('0x89')]['findOrCreate']({'where':_0x33efb9,'defaults':_0x59d78e});}})[_0x9e69('0xb5')](function(_0x3acf01){if(_0x3acf01){_0x1f2c98=_0x3acf01;var _0x3a6a41=fs[_0x9e69('0xc6')](path[_0x9e69('0x79')](config[_0x9e69('0x7a')],_0x9e69('0xc7')),_0x9e69('0xc8'));var _0x55d377=ejs[_0x9e69('0xc9')](_0x3a6a41,{'body':_[_0x9e69('0xca')](_0x568073[_0x9e69('0x5f')][_0x9e69('0x5f')]),'bodyTitle':_0x19c67a['offlineMessageBody']});return db[_0x9e69('0xcb')][_0x9e69('0x59')]({'body':_0x55d377,'ContactId':_0x3acf01['id'],'ChatWebsiteId':_0x19c67a['id']});}})['then'](function(_0x35b2ed){if(_0x35b2ed){_0x22bb24=_0x35b2ed;return db[_0x9e69('0xcc')][_0x9e69('0x65')]({'where':{'service':!![]},'include':[{'model':db[_0x9e69('0xcd')],'as':_0x9e69('0xce'),'raw':!![]}]});}})[_0x9e69('0x1e')](function(_0x596a16){if(_0x596a16&&_0x596a16['Smtp']&&_0x19c67a[_0x9e69('0xcf')]){var _0x4b97ad={'tls':{'rejectUnauthorized':![]}};if(_0x596a16[_0x9e69('0xce')][_0x9e69('0xd0')]){_0x4b97ad[_0x9e69('0xd0')]=_0x596a16[_0x9e69('0xce')][_0x9e69('0xd0')];}else{_0x4b97ad[_0x9e69('0xd1')]=_0x596a16[_0x9e69('0xce')][_0x9e69('0xd1')];_0x4b97ad['port']=_0x596a16[_0x9e69('0xce')][_0x9e69('0xd2')];_0x4b97ad['secure']=_0x596a16[_0x9e69('0xce')]['secure'];}if(_0x596a16[_0x9e69('0xce')][_0x9e69('0xd3')]){_0x4b97ad[_0x9e69('0xd4')]={'user':_0x596a16[_0x9e69('0xce')][_0x9e69('0x5a')],'pass':_0x596a16[_0x9e69('0xce')][_0x9e69('0xd5')]};}return respondWithRpcPromise(_0x9e69('0xd6'),_0x9e69('0xd7'),{'account':_0x4b97ad,'message':{'from':util[_0x9e69('0xaa')]('\x22%s\x22\x20<%s>',_0x596a16[_0x9e69('0x38')],_0x596a16[_0x9e69('0xd8')]||_0x596a16['Smtp'][_0x9e69('0x5a')]),'to':_0x19c67a['forwardOfflineAddress'],'subject':_0x19c67a[_0x9e69('0xd9')],'text':_0x22bb24[_0x9e69('0x5f')]}},client9003)['then'](function(){return _0x22bb24;})[_0x9e69('0x28')](function(_0x1e9ea4){console[_0x9e69('0x25')](_0x1e9ea4);});}})['then'](function(){if(_0x22bb24){return _0x22bb24;}})[_0x9e69('0x1e')](respondWithResult(_0x1ca077,null))['catch'](handleError(_0x1ca077,null));};exports[_0x9e69('0xda')]=function(_0x1ccf1b,_0x407689,_0x1bccec){return db[_0x9e69('0xb1')]['find']({'where':{'id':_0x1ccf1b['params']['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x407689,null))[_0x9e69('0x1e')](function(_0x5a7337){if(_0x5a7337){return _0x5a7337[_0x9e69('0xda')](_0x1ccf1b[_0x9e69('0x5f')]['ids'],_[_0x9e69('0xdb')](_0x1ccf1b[_0x9e69('0x5f')],[_0x9e69('0x6a'),'id'])||{});}})[_0x9e69('0x1e')](respondWithResult(_0x407689,null))[_0x9e69('0x28')](handleError(_0x407689,null));};exports['getInteractions']=function(_0x769a4d,_0x5c78b2,_0x5e9c2d){var _0x201212={'raw':![],'where':{}};var _0x2182ff={};var _0x4a35df={'count':0x0,'rows':[]};return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0x769a4d[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x5c78b2,null))[_0x9e69('0x1e')](function(_0x3f32e2){if(_0x3f32e2){_0x2182ff[_0x9e69('0x41')]=_[_0x9e69('0x43')](db['ChatInteraction'][_0x9e69('0x6e')]);_0x2182ff[_0x9e69('0x44')]=_[_0x9e69('0x43')](_0x769a4d[_0x9e69('0x44')]);_0x2182ff[_0x9e69('0x45')]=_[_0x9e69('0x46')](_0x2182ff[_0x9e69('0x41')],_0x2182ff[_0x9e69('0x44')]);_0x201212[_0x9e69('0x47')]=_[_0x9e69('0x46')](_0x2182ff[_0x9e69('0x41')],qs['fields'](_0x769a4d['query'][_0x9e69('0x48')]));_0x201212[_0x9e69('0x47')]=_0x201212[_0x9e69('0x47')][_0x9e69('0x49')]?_0x201212[_0x9e69('0x47')]:_0x2182ff['model'];if(!_0x769a4d[_0x9e69('0x44')][_0x9e69('0x66')](_0x9e69('0x4a'))){_0x201212[_0x9e69('0x4b')]=qs['limit'](_0x769a4d['query'][_0x9e69('0x4b')]);_0x201212[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0x769a4d[_0x9e69('0x44')]['offset']);}_0x201212[_0x9e69('0x4c')]=qs['sort'](_0x769a4d[_0x9e69('0x44')][_0x9e69('0x4d')]);_0x201212[_0x9e69('0x4e')]=qs[_0x9e69('0x45')](_[_0x9e69('0x4f')](_0x769a4d[_0x9e69('0x44')],_0x2182ff[_0x9e69('0x45')]));_0x201212[_0x9e69('0x4e')][_0x9e69('0x67')]=_0x3f32e2['id'];if(_0x769a4d['query'][_0x9e69('0x50')]){_0x201212['where']=_[_0x9e69('0x51')](_0x201212[_0x9e69('0x4e')],{'$or':_[_0x9e69('0x42')](_0x201212[_0x9e69('0x47')],function(_0x24321f){var _0xe9b122={};_0xe9b122[_0x24321f]={'$like':'%'+_0x769a4d[_0x9e69('0x44')]['filter']+'%'};return _0xe9b122;})});}_0x201212=_['merge']({},_0x201212,_0x769a4d[_0x9e69('0x53')]);return db['ChatInteraction'][_0x9e69('0x2c')]({'where':_0x201212['where']})[_0x9e69('0x1e')](function(_0x537078){_0x4a35df['count']=_0x537078;if(_0x769a4d['query'][_0x9e69('0x54')]){_0x201212['include']=[{'model':db['CmContact'],'as':_0x9e69('0xdc'),'required':![]},{'model':db[_0x9e69('0xdd')],'as':_0x9e69('0xde'),'attributes':[_0x9e69('0x38'),_0x9e69('0xdf'),'internal'],'required':![]},{'model':db[_0x9e69('0xe0')],'as':_0x9e69('0xe1'),'attributes':['id','name',_0x9e69('0xe2')],'where':_0x769a4d[_0x9e69('0x44')]['tag']?{'id':_0x769a4d[_0x9e69('0x44')][_0x9e69('0xe3')]}:undefined,'required':_0x769a4d['query']['tag']?!![]:![]}];}return db[_0x9e69('0xb1')][_0x9e69('0x68')](_0x201212);})[_0x9e69('0x1e')](function(_0x25557b){_0x4a35df[_0x9e69('0x56')]=_0x25557b;return _0x4a35df;});}})[_0x9e69('0x1e')](respondWithFilteredResult(_0x5c78b2,_0x201212))['catch'](handleError(_0x5c78b2,null));};function iftimePromise(_0x10cc75,_0x664557){return respondWithRpcPromise(_0x9e69('0xe4'),_0x9e69('0xe5'),{'command':_0x664557[_0x9e69('0xe6')]?util[_0x9e69('0xaa')]('iftime\x20%s,%s',_0x10cc75[_0x9e69('0xe7')],_0x664557[_0x9e69('0xe6')]):util[_0x9e69('0xaa')]('iftime\x20%s',_0x10cc75[_0x9e69('0xe7')])},client9002)[_0x9e69('0x1e')](function(_0x4dafc3){var _0x27d060=_0x4dafc3&&_0x4dafc3[_0x9e69('0xe8')](_0x9e69('0xe9'))>=0x0?!![]:![];logger[_0x9e69('0x1f')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x664557['id'],_0x10cc75['id'],_0x10cc75[_0x9e69('0xe7')],_0x27d060?_0x9e69('0xea'):'OFFLINE',_0x664557[_0x9e69('0xe6')]?_0x664557[_0x9e69('0xe6')]:_0x9e69('0xeb'));return _0x27d060;})[_0x9e69('0x28')](function(_0x7d3ae5){logger[_0x9e69('0x25')](_0x9e69('0xec'),_0x664557['id'],_0x10cc75['id'],_0x10cc75[_0x9e69('0xe7')],util[_0x9e69('0xed')](_0x7d3ae5,{'showHidden':![],'depth':null}),_0x664557['timezone']?_0x664557[_0x9e69('0xe6')]:_0x9e69('0xeb'));return![];});}exports[_0x9e69('0xe5')]=function(_0x1377a4,_0x57bb87,_0x3b9eb4){var _0x446b1a=0x0;var _0x3d1ee8=0x0;var _0x38bedb=![];var _0x54ebf9;var _0x7e435d;return db['ChatWebsite'][_0x9e69('0x58')]({'where':{'id':_0x1377a4['params']['id']},'include':[{'model':db[_0x9e69('0xee')],'as':'Interval','include':[{'model':db[_0x9e69('0xee')],'as':_0x9e69('0xef'),'attributes':['id',_0x9e69('0xe7')],'raw':!![]}]}]})[_0x9e69('0x1e')](handleEntityNotFound(_0x57bb87,null))['then'](function(_0x598683){if(_0x598683){_0x54ebf9=_0x598683;return _0x598683['getProactiveActions']({'raw':!![]});}})['then'](function(_0x76d4f){if(_0x54ebf9){if(_0x76d4f){_0x7e435d=_0x76d4f;}}return require('../../config/license/util')[_0x9e69('0x7b')]();})['then'](function(_0x3b99cd){if(_0x3b99cd){_0x3d1ee8=_0x3b99cd[_0x9e69('0xf0')];_0x38bedb=_0x3b99cd[_0x9e69('0x7c')];}})[_0x9e69('0x1e')](function(){return db[_0x9e69('0xb1')]['count']({'where':{'closed':![]}});})['then'](function(_0x32cdac){_0x446b1a=_0x32cdac;if(_0x3d1ee8&&_0x32cdac>_0x3d1ee8){return db[_0x9e69('0xf1')]['findOne']({'where':{'id':0x1}})[_0x9e69('0x1e')](function(_0x239d46){if(_0x239d46){_0x239d46[_0x9e69('0xf2')](_0x9e69('0xf3'));}});}})['then'](function(){if(_0x54ebf9[_0x9e69('0xee')]&&_0x54ebf9[_0x9e69('0xee')][_0x9e69('0xef')]){var _0xf34ca1=[];for(var _0x565d46=0x0;_0x565d46<_0x54ebf9[_0x9e69('0xee')][_0x9e69('0xef')]['length'];_0x565d46++){var _0x4d0c76=_0x54ebf9['Interval']['Intervals'][_0x565d46]['get']({'plain':!![]});_0xf34ca1[_0x9e69('0xba')](iftimePromise(_0x4d0c76,_0x54ebf9));}return BPromise[_0x9e69('0xf4')](_0xf34ca1)['then'](function(_0x4cb671){return _[_0x9e69('0xf5')](_0x4cb671);});}else{return!![];}})['then'](function(_0x27fb70){var _0x1058ea=fs[_0x9e69('0xc6')](path[_0x9e69('0x79')](config['root'],'server/files/chat/iframe.js'),_0x9e69('0xc8'));var _0x29758d={'remote':_0x54ebf9[_0x9e69('0xf6')],'query':querystring[_0x9e69('0x24')](_[_0x9e69('0x51')](_0x54ebf9[_0x9e69('0x34')]({'plain':!![]}),{'customerIp':_0x1377a4[_0x9e69('0x87')][_0x9e69('0xa4')]||_0x1377a4[_0x9e69('0x87')][_0x9e69('0xf7')]||_0x1377a4['connection'][_0x9e69('0xf8')]||_0x1377a4['ip'],'referer':_0x1377a4[_0x9e69('0x87')][_0x9e69('0xa8')],'openedInteractions':_0x446b1a,'maxInteractions':_0x3d1ee8,'virtual':_0x38bedb[_0x9e69('0xf0')],'online':_0x27fb70,'custom':_0x38bedb}))[_0x9e69('0xf9')](/'/g,'\x5c\x27')};_0x57bb87[_0x9e69('0x39')](ejs[_0x9e69('0xc9')](Mustache[_0x9e69('0xc9')](_0x1058ea,_0x29758d),{'proactiveActions':_0x7e435d,'alignment':_0x54ebf9[_0x9e69('0xfa')],'verticalAlignment':_0x54ebf9[_0x9e69('0xfb')],'div_color':_0x54ebf9[_0x9e69('0xe2')],'text_color':_0x54ebf9[_0x9e69('0xfc')]}));})['catch'](handleError(_0x57bb87,null));};exports[_0x9e69('0xfd')]=function(_0x144d9e,_0x1b1627,_0x22ccf4){return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0x144d9e['params']['id']}})['then'](handleEntityNotFound(_0x1b1627,null))[_0x9e69('0x1e')](function(_0x40e755){if(_0x40e755){return db[_0x9e69('0xfe')]['transaction'](function(_0x1377cb){return db['ChatApplication']['destroy']({'where':{'ChatWebsiteId':_0x144d9e['params']['id']},'transaction':_0x1377cb})[_0x9e69('0x1e')](function(_0x1eb939){var _0x4be40e=_[_0x9e69('0x42')](_0x144d9e[_0x9e69('0x5f')],function(_0x2c3ce2){_0x2c3ce2[_0x9e69('0x67')]=_0x144d9e[_0x9e69('0x57')]['id'];return _0x2c3ce2;});return db['ChatApplication'][_0x9e69('0xff')](_0x4be40e,{'transaction':_0x1377cb});});})[_0x9e69('0x1e')](function(){return db[_0x9e69('0x100')][_0x9e69('0x101')]({'where':{'ChatWebsiteId':_0x144d9e[_0x9e69('0x57')]['id']},'order':_0x9e69('0x9e')});});}})['then'](respondWithResult(_0x1b1627,null))[_0x9e69('0x28')](handleError(_0x1b1627,null));};exports['getApplications']=function(_0x42224a,_0x3a6950,_0xc22450){var _0x401b04={};var _0x3e70a7={};var _0x4675df;var _0x1dbd38;return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0x42224a[_0x9e69('0x57')]['id']}})['then'](handleEntityNotFound(_0x3a6950,null))['then'](function(_0x492b8c){if(_0x492b8c){_0x4675df=_0x492b8c;_0x3e70a7['model']=_[_0x9e69('0x43')](db[_0x9e69('0x100')][_0x9e69('0x6e')]);_0x3e70a7[_0x9e69('0x44')]=_[_0x9e69('0x43')](_0x42224a[_0x9e69('0x44')]);_0x3e70a7[_0x9e69('0x45')]=_[_0x9e69('0x46')](_0x3e70a7['model'],_0x3e70a7['query']);_0x401b04['attributes']=_[_0x9e69('0x46')](_0x3e70a7[_0x9e69('0x41')],qs['fields'](_0x42224a[_0x9e69('0x44')][_0x9e69('0x48')]));_0x401b04[_0x9e69('0x47')]=_0x401b04[_0x9e69('0x47')]['length']?_0x401b04['attributes']:_0x3e70a7[_0x9e69('0x41')];_0x401b04[_0x9e69('0x4c')]=qs[_0x9e69('0x4d')](_0x42224a['query'][_0x9e69('0x4d')]);_0x401b04['where']=qs[_0x9e69('0x45')](_['pick'](_0x42224a[_0x9e69('0x44')],_0x3e70a7[_0x9e69('0x45')]));if(_0x42224a[_0x9e69('0x44')][_0x9e69('0x50')]){_0x401b04[_0x9e69('0x4e')]=_['merge'](_0x401b04['where'],{'$or':_[_0x9e69('0x42')](_0x401b04[_0x9e69('0x47')],function(_0x59ab31){var _0x3a7853={};_0x3a7853[_0x59ab31]={'$like':'%'+_0x42224a[_0x9e69('0x44')][_0x9e69('0x50')]+'%'};return _0x3a7853;})});}_0x401b04=_[_0x9e69('0x51')]({},_0x401b04,_0x42224a[_0x9e69('0x53')]);return _0x4675df['getApplications'](_0x401b04);}})['then'](function(_0x1c6567){if(_0x1c6567){_0x1dbd38=_0x1c6567[_0x9e69('0x49')];if(!_0x42224a[_0x9e69('0x44')][_0x9e69('0x66')](_0x9e69('0x4a'))){_0x401b04[_0x9e69('0x4b')]=qs['limit'](_0x42224a['query'][_0x9e69('0x4b')]);_0x401b04[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0x42224a['query'][_0x9e69('0x2d')]);}return _0x4675df[_0x9e69('0x102')](_0x401b04);}})[_0x9e69('0x1e')](function(_0x5a6a08){if(_0x5a6a08){return _0x5a6a08?{'count':_0x1dbd38,'rows':_0x5a6a08}:null;}})[_0x9e69('0x1e')](respondWithResult(_0x3a6950,null))[_0x9e69('0x28')](handleError(_0x3a6950,null));};exports[_0x9e69('0x103')]=function(_0x5d9c0d,_0xdc1e9f,_0x330c77){return db['chatProactiveAction'][_0x9e69('0x58')]({'where':{'id':_0x5d9c0d[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0xdc1e9f,null))[_0x9e69('0x1e')](function(_0xb967d6){if(_0xb967d6){return _0xb967d6[_0x9e69('0x103')](_0x5d9c0d[_0x9e69('0x5f')]['ids'],_[_0x9e69('0xdb')](_0x5d9c0d[_0x9e69('0x5f')],[_0x9e69('0x6a'),'id'])||{});}})[_0x9e69('0x1e')](respondWithResult(_0xdc1e9f,null))[_0x9e69('0x28')](handleError(_0xdc1e9f,null));};exports[_0x9e69('0x104')]=function(_0x1ad23e,_0x5744a8,_0x3497bf){var _0xa813ce={};var _0xa0d0cb={};var _0x43ddda;var _0x1f82df;return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0x1ad23e[_0x9e69('0x57')]['id']}})['then'](handleEntityNotFound(_0x5744a8,null))[_0x9e69('0x1e')](function(_0x339c35){if(_0x339c35){_0x43ddda=_0x339c35;_0xa0d0cb['model']=_['keys'](db[_0x9e69('0x105')][_0x9e69('0x6e')]);_0xa0d0cb[_0x9e69('0x44')]=_[_0x9e69('0x43')](_0x1ad23e[_0x9e69('0x44')]);_0xa0d0cb[_0x9e69('0x45')]=_[_0x9e69('0x46')](_0xa0d0cb[_0x9e69('0x41')],_0xa0d0cb[_0x9e69('0x44')]);_0xa813ce[_0x9e69('0x47')]=_[_0x9e69('0x46')](_0xa0d0cb[_0x9e69('0x41')],qs[_0x9e69('0x48')](_0x1ad23e['query']['fields']));_0xa813ce[_0x9e69('0x47')]=_0xa813ce[_0x9e69('0x47')]['length']?_0xa813ce[_0x9e69('0x47')]:_0xa0d0cb[_0x9e69('0x41')];_0xa813ce['order']=qs[_0x9e69('0x4d')](_0x1ad23e[_0x9e69('0x44')][_0x9e69('0x4d')]);_0xa813ce[_0x9e69('0x4e')]=qs[_0x9e69('0x45')](_['pick'](_0x1ad23e[_0x9e69('0x44')],_0xa0d0cb['filters']));if(_0x1ad23e[_0x9e69('0x44')]['filter']){_0xa813ce[_0x9e69('0x4e')]=_[_0x9e69('0x51')](_0xa813ce['where'],{'$or':_[_0x9e69('0x42')](_0xa813ce[_0x9e69('0x47')],function(_0x450518){var _0x3b36a4={};_0x3b36a4[_0x450518]={'$like':'%'+_0x1ad23e[_0x9e69('0x44')][_0x9e69('0x50')]+'%'};return _0x3b36a4;})});}_0xa813ce=_[_0x9e69('0x51')]({},_0xa813ce,_0x1ad23e[_0x9e69('0x53')]);return _0x43ddda[_0x9e69('0x104')](_0xa813ce);}})[_0x9e69('0x1e')](function(_0x2a2a61){if(_0x2a2a61){_0x1f82df=_0x2a2a61['length'];if(!_0x1ad23e[_0x9e69('0x44')]['hasOwnProperty'](_0x9e69('0x4a'))){_0xa813ce[_0x9e69('0x4b')]=qs[_0x9e69('0x4b')](_0x1ad23e['query']['limit']);_0xa813ce[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0x1ad23e['query']['offset']);}return _0x43ddda[_0x9e69('0x104')](_0xa813ce);}})[_0x9e69('0x1e')](function(_0x3e5f51){if(_0x3e5f51){return _0x3e5f51?{'count':_0x1f82df,'rows':_0x3e5f51}:null;}})[_0x9e69('0x1e')](respondWithResult(_0x5744a8,null))[_0x9e69('0x28')](handleError(_0x5744a8,null));};exports[_0x9e69('0x106')]=function(_0x4451cb,_0x3a725b,_0x45d65d){var _0x2c797c=_0x4451cb['query'][_0x9e69('0x107')]===_0x9e69('0x108')?'offlineForm':_0x9e69('0x109');return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'attributes':['id',_0x2c797c],'where':{'id':_0x4451cb[_0x9e69('0x57')]['id']}})[_0x9e69('0x1e')](handleEntityNotFound(_0x3a725b,null))[_0x9e69('0x1e')](function(_0x52f047){if(_0x52f047){var _0x335e27=_0x52f047[_0x2c797c];var _0x41f762=_0x335e27&&_0x335e27[_0x9e69('0x10a')]?_0x335e27[_0x9e69('0x10a')]:[];_0x3a725b[_0x9e69('0x39')]({'fromKey':_[_0x9e69('0x7d')](_0x335e27['fromKey'])?undefined:_0x335e27[_0x9e69('0x10b')],'count':_0x41f762[_0x9e69('0x49')],'rows':_0x41f762});}})[_0x9e69('0x28')](handleError(_0x3a725b,null));};exports[_0x9e69('0x10c')]=function(_0x39005d,_0x3c902e,_0x2041f8){var _0x5a9faa={'raw':![],'where':{}};var _0x30f818={};var _0x3d2a80={'count':0x0,'rows':[]};return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0x39005d['params']['id']}})['then'](handleEntityNotFound(_0x3c902e,null))['then'](function(_0x4a81d7){if(_0x4a81d7){_0x30f818[_0x9e69('0x41')]=_['keys'](db['ChatOfflineMessage'][_0x9e69('0x6e')]);_0x30f818[_0x9e69('0x44')]=_[_0x9e69('0x43')](_0x39005d[_0x9e69('0x44')]);_0x30f818[_0x9e69('0x45')]=_[_0x9e69('0x46')](_0x30f818[_0x9e69('0x41')],_0x30f818['query']);_0x5a9faa[_0x9e69('0x47')]=_[_0x9e69('0x46')](_0x30f818[_0x9e69('0x41')],qs[_0x9e69('0x48')](_0x39005d[_0x9e69('0x44')][_0x9e69('0x48')]));_0x5a9faa['attributes']=_0x5a9faa['attributes'][_0x9e69('0x49')]?_0x5a9faa[_0x9e69('0x47')]:_0x30f818['model'];if(!_0x39005d[_0x9e69('0x44')][_0x9e69('0x66')](_0x9e69('0x4a'))){_0x5a9faa[_0x9e69('0x4b')]=qs[_0x9e69('0x4b')](_0x39005d['query'][_0x9e69('0x4b')]);_0x5a9faa[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0x39005d[_0x9e69('0x44')]['offset']);}_0x5a9faa[_0x9e69('0x4c')]=qs['sort'](_0x39005d['query'][_0x9e69('0x4d')]);_0x5a9faa[_0x9e69('0x4e')]=qs[_0x9e69('0x45')](_['pick'](_0x39005d[_0x9e69('0x44')],_0x30f818[_0x9e69('0x45')]));_0x5a9faa[_0x9e69('0x4e')][_0x9e69('0x67')]=_0x4a81d7['id'];if(_0x39005d['query'][_0x9e69('0x50')]){_0x5a9faa['where']=_['merge'](_0x5a9faa[_0x9e69('0x4e')],{'$or':_[_0x9e69('0x42')](_0x5a9faa[_0x9e69('0x47')],function(_0x351094){var _0x2c06b2={};_0x2c06b2[_0x351094]={'$like':'%'+_0x39005d[_0x9e69('0x44')][_0x9e69('0x50')]+'%'};return _0x2c06b2;})});}_0x5a9faa=_[_0x9e69('0x51')]({},_0x5a9faa,_0x39005d['options']);return db[_0x9e69('0xcb')][_0x9e69('0x2c')]({'where':_0x5a9faa[_0x9e69('0x4e')]})['then'](function(_0x5c22a6){_0x3d2a80[_0x9e69('0x2c')]=_0x5c22a6;if(_0x39005d[_0x9e69('0x44')][_0x9e69('0x54')]){_0x5a9faa['include']=[{'all':!![]}];}else{_0x5a9faa[_0x9e69('0x55')]=[{'model':db[_0x9e69('0x89')],'as':'Contact','required':![]}];}return db[_0x9e69('0xcb')][_0x9e69('0x68')](_0x5a9faa);})[_0x9e69('0x1e')](function(_0x4965dc){_0x3d2a80[_0x9e69('0x56')]=_0x4965dc;return _0x3d2a80;});}})['then'](respondWithFilteredResult(_0x3c902e,_0x5a9faa))[_0x9e69('0x28')](handleError(_0x3c902e,null));};exports['addAgents']=function(_0x28cc6f,_0x238447,_0x30ff09){return db[_0x9e69('0x3d')][_0x9e69('0x58')]({'where':{'id':_0x28cc6f[_0x9e69('0x57')]['id']}})['then'](handleEntityNotFound(_0x238447,null))[_0x9e69('0x1e')](function(_0x595534){if(_0x595534){return _0x595534['addAgents'](_0x28cc6f['body'][_0x9e69('0x6a')],_[_0x9e69('0xdb')](_0x28cc6f[_0x9e69('0x5f')],['ids','id'])||{})['spread'](function(_0x18f1cf){for(var _0x432b98=0x0;_0x432b98<_0x28cc6f[_0x9e69('0x5f')]['ids'][_0x9e69('0x49')];_0x432b98+=0x1){socket[_0x9e69('0x10d')](_0x9e69('0x10e'),{'UserId':_0x28cc6f[_0x9e69('0x5f')][_0x9e69('0x6a')][_0x432b98],'ChatWebsiteId':_0x28cc6f['params']['id']});}return _0x18f1cf;});}})['then'](respondWithResult(_0x238447,null))[_0x9e69('0x28')](handleError(_0x238447,null));};exports[_0x9e69('0x10f')]=function(_0x26b7d6,_0x24c687,_0x58cf11){return db[_0x9e69('0x3d')]['find']({'where':{'id':_0x26b7d6['params']['id']}})['then'](handleEntityNotFound(_0x24c687,null))[_0x9e69('0x1e')](function(_0xa3f6ae){if(_0xa3f6ae){return _0xa3f6ae[_0x9e69('0x10f')](_0x26b7d6['query']['ids'])['then'](function(){if(_[_0x9e69('0x110')](_0x26b7d6[_0x9e69('0x44')][_0x9e69('0x6a')])){for(var _0x38ba1b=0x0;_0x38ba1b<_0x26b7d6[_0x9e69('0x44')][_0x9e69('0x6a')]['length'];_0x38ba1b+=0x1){socket[_0x9e69('0x10d')]('userChatWebsite:remove',{'UserId':Number(_0x26b7d6[_0x9e69('0x44')][_0x9e69('0x6a')][_0x38ba1b]),'ChatWebsiteId':Number(_0x26b7d6[_0x9e69('0x57')]['id'])});}}else{socket['emit'](_0x9e69('0x111'),{'UserId':Number(_0x26b7d6['query'][_0x9e69('0x6a')]),'ChatWebsiteId':Number(_0x26b7d6['params']['id'])});}});}})[_0x9e69('0x1e')](respondWithStatusCode(_0x24c687,null))[_0x9e69('0x28')](handleError(_0x24c687,null));};exports[_0x9e69('0x112')]=function(_0xc2f3ca,_0x1b2aab,_0x6247e0){var _0x5c38ad={};var _0x435956={};var _0x1e6154;var _0x5a2ec8;return db[_0x9e69('0x3d')][_0x9e69('0x65')]({'where':{'id':_0xc2f3ca[_0x9e69('0x57')]['id']}})['then'](handleEntityNotFound(_0x1b2aab,null))[_0x9e69('0x1e')](function(_0x5646c8){if(_0x5646c8){_0x1e6154=_0x5646c8;_0x435956[_0x9e69('0x41')]=_[_0x9e69('0x43')](db[_0x9e69('0xdd')][_0x9e69('0x6e')]);_0x435956['query']=_[_0x9e69('0x43')](_0xc2f3ca[_0x9e69('0x44')]);_0x435956['filters']=_['intersection'](_0x435956[_0x9e69('0x41')],_0x435956[_0x9e69('0x44')]);_0x5c38ad[_0x9e69('0x47')]=_['intersection'](_0x435956['model'],qs[_0x9e69('0x48')](_0xc2f3ca[_0x9e69('0x44')][_0x9e69('0x48')]));_0x5c38ad['attributes']=_0x5c38ad['attributes']['length']?_0x5c38ad[_0x9e69('0x47')]:_0x435956[_0x9e69('0x41')];_0x5c38ad['order']=qs[_0x9e69('0x4d')](_0xc2f3ca[_0x9e69('0x44')][_0x9e69('0x4d')]);_0x5c38ad['where']=qs[_0x9e69('0x45')](_[_0x9e69('0x4f')](_0xc2f3ca[_0x9e69('0x44')],_0x435956['filters']));if(_0xc2f3ca[_0x9e69('0x44')][_0x9e69('0x50')]){_0x5c38ad[_0x9e69('0x4e')]=_[_0x9e69('0x51')](_0x5c38ad[_0x9e69('0x4e')],{'$or':_[_0x9e69('0x42')](_0x5c38ad[_0x9e69('0x47')],function(_0xbb6741){var _0x3564f3={};_0x3564f3[_0xbb6741]={'$like':'%'+_0xc2f3ca[_0x9e69('0x44')][_0x9e69('0x50')]+'%'};return _0x3564f3;})});}_0x5c38ad=_['merge']({},_0x5c38ad,_0xc2f3ca[_0x9e69('0x53')]);return _0x1e6154['getAgents'](_0x5c38ad);}})[_0x9e69('0x1e')](function(_0x403a8b){if(_0x403a8b){_0x5a2ec8=_0x403a8b[_0x9e69('0x49')];if(!_0xc2f3ca['query'][_0x9e69('0x66')](_0x9e69('0x4a'))){_0x5c38ad[_0x9e69('0x4b')]=qs[_0x9e69('0x4b')](_0xc2f3ca[_0x9e69('0x44')][_0x9e69('0x4b')]);_0x5c38ad[_0x9e69('0x2d')]=qs[_0x9e69('0x2d')](_0xc2f3ca[_0x9e69('0x44')][_0x9e69('0x2d')]);}return _0x1e6154['getAgents'](_0x5c38ad);}})[_0x9e69('0x1e')](function(_0x5edf32){if(_0x5edf32){return _0x5edf32?{'count':_0x5a2ec8,'rows':_0x5edf32}:null;}})['then'](respondWithResult(_0x1b2aab,null))[_0x9e69('0x28')](handleError(_0x1b2aab,null));};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js
index f530e7a..7891e82 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 _0x4350=['emit','hasOwnProperty','events','../../mysqldb','setMaxListeners','update','remove'];(function(_0x26d039,_0x11e669){var _0x221ae2=function(_0x41d725){while(--_0x41d725){_0x26d039['push'](_0x26d039['shift']());}};_0x221ae2(++_0x11e669);}(_0x4350,0x1d0));var _0x0435=function(_0x2280cd,_0x20a1f8){_0x2280cd=_0x2280cd-0x0;var _0x34952f=_0x4350[_0x2280cd];return _0x34952f;};'use strict';var EventEmitter=require(_0x0435('0x0'));var ChatWebsite=require(_0x0435('0x1'))['db']['ChatWebsite'];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x0435('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x0435('0x3'),'afterDestroy':_0x0435('0x4')};function emitEvent(_0x517d8d){return function(_0x247a54,_0xd41628,_0x2dcbfe){ChatWebsiteEvents[_0x0435('0x5')](_0x517d8d+':'+_0x247a54['id'],_0x247a54);ChatWebsiteEvents['emit'](_0x517d8d,_0x247a54);_0x2dcbfe(null);};}for(var e in events){if(events[_0x0435('0x6')](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;
\ No newline at end of file
+var _0x3212=['exports','events','../../mysqldb','ChatWebsite','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x3a7b8b,_0xa5c309){var _0x2e94c1=function(_0x47fc6d){while(--_0x47fc6d){_0x3a7b8b['push'](_0x3a7b8b['shift']());}};_0x2e94c1(++_0xa5c309);}(_0x3212,0x6f));var _0x2321=function(_0x1f5e13,_0x3f63c7){_0x1f5e13=_0x1f5e13-0x0;var _0x2e6c36=_0x3212[_0x1f5e13];return _0x2e6c36;};'use strict';var EventEmitter=require(_0x2321('0x0'));var ChatWebsite=require(_0x2321('0x1'))['db'][_0x2321('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x2321('0x3')](0x0);var events={'afterCreate':_0x2321('0x4'),'afterUpdate':_0x2321('0x5'),'afterDestroy':_0x2321('0x6')};function emitEvent(_0x216f64){return function(_0x4732b7,_0x3e090a,_0x32b9c4){ChatWebsiteEvents[_0x2321('0x7')](_0x216f64+':'+_0x4732b7['id'],_0x4732b7);ChatWebsiteEvents['emit'](_0x216f64,_0x4732b7);_0x32b9c4(null);};}for(var e in events){if(events[_0x2321('0x8')](e)){var event=events[e];ChatWebsite[_0x2321('0x9')](e,emitEvent(event));}}module[_0x2321('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 8d8d23e..f63efe4 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 _0xb6b1=['../../config/logger','moment','bluebird','path','../../config/environment','./chatWebsite.attributes','exports','define','chat_websites','lodash'];(function(_0xd34c38,_0x455c59){var _0xd180d6=function(_0x4a9cd4){while(--_0x4a9cd4){_0xd34c38['push'](_0xd34c38['shift']());}};_0xd180d6(++_0x455c59);}(_0xb6b1,0x17b));var _0x1b6b=function(_0x4bb145,_0x3e7d33){_0x4bb145=_0x4bb145-0x0;var _0x4db596=_0xb6b1[_0x4bb145];return _0x4db596;};'use strict';var _=require(_0x1b6b('0x0'));var util=require('util');var logger=require(_0x1b6b('0x1'))('api');var moment=require(_0x1b6b('0x2'));var BPromise=require(_0x1b6b('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1b6b('0x4'));var rimraf=require('rimraf');var config=require(_0x1b6b('0x5'));var attributes=require(_0x1b6b('0x6'));module[_0x1b6b('0x7')]=function(_0xdbbe22,_0x5870ca){return _0xdbbe22[_0x1b6b('0x8')]('ChatWebsite',attributes,{'tableName':_0x1b6b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x58a4=['bluebird','request-promise','path','rimraf','../../config/environment','./chatWebsite.attributes','exports','ChatWebsite','chat_websites','lodash','util','../../config/logger','api','moment'];(function(_0x50e103,_0x1dfd08){var _0x4feebb=function(_0x445fe4){while(--_0x445fe4){_0x50e103['push'](_0x50e103['shift']());}};_0x4feebb(++_0x1dfd08);}(_0x58a4,0xbf));var _0x458a=function(_0x24c39a,_0x48fc91){_0x24c39a=_0x24c39a-0x0;var _0x4c2fa6=_0x58a4[_0x24c39a];return _0x4c2fa6;};'use strict';var _=require(_0x458a('0x0'));var util=require(_0x458a('0x1'));var logger=require(_0x458a('0x2'))(_0x458a('0x3'));var moment=require(_0x458a('0x4'));var BPromise=require(_0x458a('0x5'));var rp=require(_0x458a('0x6'));var fs=require('fs');var path=require(_0x458a('0x7'));var rimraf=require(_0x458a('0x8'));var config=require(_0x458a('0x9'));var attributes=require(_0x458a('0xa'));module[_0x458a('0xb')]=function(_0x2f5d44,_0x57de3c){return _0x2f5d44['define'](_0x458a('0xc'),attributes,{'tableName':_0x458a('0xd'),'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 01f21df..39c3f49 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 _0x33af=['result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','ChatWebsite,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x591dea,_0x79f3b){var _0x2c6ad5=function(_0x2b4692){while(--_0x2b4692){_0x591dea['push'](_0x591dea['shift']());}};_0x2c6ad5(++_0x79f3b);}(_0x33af,0xec));var _0xf33a=function(_0x17b1c0,_0x5f48f5){_0x17b1c0=_0x17b1c0-0x0;var _0x5b0ff5=_0x33af[_0x17b1c0];return _0x5b0ff5;};'use strict';var _=require('lodash');var util=require(_0xf33a('0x0'));var moment=require('moment');var BPromise=require(_0xf33a('0x1'));var rs=require(_0xf33a('0x2'));var fs=require('fs');var Redis=require(_0xf33a('0x3'));var db=require(_0xf33a('0x4'))['db'];var utils=require(_0xf33a('0x5'));var logger=require(_0xf33a('0x6'))('rpc');var config=require(_0xf33a('0x7'));var jayson=require(_0xf33a('0x8'));var client=jayson['client'][_0xf33a('0x9')]({'port':0x232a});config[_0xf33a('0xa')]=_[_0xf33a('0xb')](config[_0xf33a('0xa')],{'host':_0xf33a('0xc'),'port':0x18eb});var socket=require(_0xf33a('0xd'))(new Redis(config['redis']));require(_0xf33a('0xe'))[_0xf33a('0xf')](socket);function respondWithRpcPromise(_0x115e08,_0x457b3b,_0x44ee7f){return new BPromise(function(_0x27f30a,_0x5074a2){return client['request'](_0x115e08,_0x44ee7f)[_0xf33a('0x10')](function(_0xb47cde){logger[_0xf33a('0x11')](_0xf33a('0x12'),_0x457b3b,_0xf33a('0x13'));logger['debug'](_0xf33a('0x14'),_0x457b3b,_0xf33a('0x13'),JSON['stringify'](_0xb47cde));if(_0xb47cde['error']){if(_0xb47cde[_0xf33a('0x15')][_0xf33a('0x16')]===0x1f4){logger[_0xf33a('0x15')](_0xf33a('0x12'),_0x457b3b,_0xb47cde[_0xf33a('0x15')][_0xf33a('0x17')]);return _0x5074a2(_0xb47cde[_0xf33a('0x15')][_0xf33a('0x17')]);}logger['error'](_0xf33a('0x12'),_0x457b3b,_0xb47cde['error'][_0xf33a('0x17')]);return _0x27f30a(_0xb47cde[_0xf33a('0x15')]['message']);}else{logger[_0xf33a('0x11')](_0xf33a('0x12'),_0x457b3b,'request\x20sent');_0x27f30a(_0xb47cde[_0xf33a('0x18')][_0xf33a('0x17')]);}})[_0xf33a('0x19')](function(_0x2a9f0e){logger['error'](_0xf33a('0x12'),_0x457b3b,_0x2a9f0e);_0x5074a2(_0x2a9f0e);});});}
\ No newline at end of file
+var _0xc1c6=['./chatWebsite.socket','register','then','info','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatWebsite,\x20%s,\x20%s','message','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','defaults','redis','localhost','socket.io-emitter'];(function(_0x1043cd,_0x2656a8){var _0x831f67=function(_0x4c7613){while(--_0x4c7613){_0x1043cd['push'](_0x1043cd['shift']());}};_0x831f67(++_0x2656a8);}(_0xc1c6,0xf7));var _0x6c1c=function(_0x533bd6,_0x2c11a0){_0x533bd6=_0x533bd6-0x0;var _0x58f7e6=_0xc1c6[_0x533bd6];return _0x58f7e6;};'use strict';var _=require(_0x6c1c('0x0'));var util=require(_0x6c1c('0x1'));var moment=require(_0x6c1c('0x2'));var BPromise=require('bluebird');var rs=require(_0x6c1c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6c1c('0x4'))['db'];var utils=require(_0x6c1c('0x5'));var logger=require(_0x6c1c('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x6c1c('0x7'));var client=jayson['client'][_0x6c1c('0x8')]({'port':0x232a});config['redis']=_[_0x6c1c('0x9')](config[_0x6c1c('0xa')],{'host':_0x6c1c('0xb'),'port':0x18eb});var socket=require(_0x6c1c('0xc'))(new Redis(config['redis']));require(_0x6c1c('0xd'))[_0x6c1c('0xe')](socket);function respondWithRpcPromise(_0x524d21,_0x147c7b,_0x36275f){return new BPromise(function(_0xb3bd12,_0x1137e8){return client['request'](_0x524d21,_0x36275f)[_0x6c1c('0xf')](function(_0x2a4fd4){logger[_0x6c1c('0x10')]('ChatWebsite,\x20%s,\x20%s',_0x147c7b,_0x6c1c('0x11'));logger[_0x6c1c('0x12')](_0x6c1c('0x13'),_0x147c7b,'request\x20sent',JSON[_0x6c1c('0x14')](_0x2a4fd4));if(_0x2a4fd4['error']){if(_0x2a4fd4[_0x6c1c('0x15')][_0x6c1c('0x16')]===0x1f4){logger[_0x6c1c('0x15')](_0x6c1c('0x17'),_0x147c7b,_0x2a4fd4[_0x6c1c('0x15')][_0x6c1c('0x18')]);return _0x1137e8(_0x2a4fd4[_0x6c1c('0x15')][_0x6c1c('0x18')]);}logger[_0x6c1c('0x15')]('ChatWebsite,\x20%s,\x20%s',_0x147c7b,_0x2a4fd4[_0x6c1c('0x15')][_0x6c1c('0x18')]);return _0xb3bd12(_0x2a4fd4['error'][_0x6c1c('0x18')]);}else{logger[_0x6c1c('0x10')]('ChatWebsite,\x20%s,\x20%s',_0x147c7b,_0x6c1c('0x11'));_0xb3bd12(_0x2a4fd4['result'][_0x6c1c('0x18')]);}})[_0x6c1c('0x19')](function(_0x5a3bb7){logger[_0x6c1c('0x15')]('ChatWebsite,\x20%s,\x20%s',_0x147c7b,_0x5a3bb7);_0x1137e8(_0x5a3bb7);});});}
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js
index e558ab5..a024906 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 _0x5f2f=['remove','update','emit','removeListener','register','length','chatWebsite:','./chatWebsite.events','save'];(function(_0x24697b,_0x2eb072){var _0x585b99=function(_0x261980){while(--_0x261980){_0x24697b['push'](_0x24697b['shift']());}};_0x585b99(++_0x2eb072);}(_0x5f2f,0x73));var _0xf5f2=function(_0x4b8fdb,_0x5d7f38){_0x4b8fdb=_0x4b8fdb-0x0;var _0x4e5601=_0x5f2f[_0x4b8fdb];return _0x4e5601;};'use strict';var ChatWebsiteEvents=require(_0xf5f2('0x0'));var events=[_0xf5f2('0x1'),_0xf5f2('0x2'),_0xf5f2('0x3')];function createListener(_0x1172dd,_0x174bc7){return function(_0x3c72ee){_0x174bc7[_0xf5f2('0x4')](_0x1172dd,_0x3c72ee);};}function removeListener(_0x501fbd,_0x4854b6){return function(){ChatWebsiteEvents[_0xf5f2('0x5')](_0x501fbd,_0x4854b6);};}exports[_0xf5f2('0x6')]=function(_0xad7f65){for(var _0x3eebf6=0x0,_0x3133bc=events[_0xf5f2('0x7')];_0x3eebf6<_0x3133bc;_0x3eebf6++){var _0x5907aa=events[_0x3eebf6];var _0x466882=createListener(_0xf5f2('0x8')+_0x5907aa,_0xad7f65);ChatWebsiteEvents['on'](_0x5907aa,_0x466882);}};
\ No newline at end of file
+var _0xb10b=['emit','removeListener','register','chatWebsite:','./chatWebsite.events','remove','update'];(function(_0x178ca4,_0x5aaa16){var _0x57f6a8=function(_0x237032){while(--_0x237032){_0x178ca4['push'](_0x178ca4['shift']());}};_0x57f6a8(++_0x5aaa16);}(_0xb10b,0x12a));var _0xbb10=function(_0x20bedd,_0x39694b){_0x20bedd=_0x20bedd-0x0;var _0x3041f3=_0xb10b[_0x20bedd];return _0x3041f3;};'use strict';var ChatWebsiteEvents=require(_0xbb10('0x0'));var events=['save',_0xbb10('0x1'),_0xbb10('0x2')];function createListener(_0x1dcb08,_0x4d688c){return function(_0x4541ae){_0x4d688c[_0xbb10('0x3')](_0x1dcb08,_0x4541ae);};}function removeListener(_0x460981,_0x22320e){return function(){ChatWebsiteEvents[_0xbb10('0x4')](_0x460981,_0x22320e);};}exports[_0xbb10('0x5')]=function(_0x481979){for(var _0x328583=0x0,_0x3cdd53=events['length'];_0x328583<_0x3cdd53;_0x328583++){var _0x1b9e94=events[_0x328583];var _0x3fb675=createListener(_0xbb10('0x6')+_0x1b9e94,_0x481979);ChatWebsiteEvents['on'](_0x1b9e94,_0x3fb675);}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js
index fa9c256..3f291f9 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 _0xb51d=['index','/:id','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/logo','getLogo','/:id/avatar','/:id/customer_avatar','getCustomerAvatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','post','create','addDisposition','addAnswer','diskStorage','root','server/files/images/logos/','format','%s-%s','now','originalname','file','addLogo','join','single','server/files/images/avatars/','addCustomerAvatar','/:id/system_avatar','/:id/notify','notify','offline','addInteraction','addApplications','addProactiveActions','addAgents','put','update','delete','removeAnswers','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x7e00f2,_0x352048){var _0x569493=function(_0x380ea7){while(--_0x380ea7){_0x7e00f2['push'](_0x7e00f2['shift']());}};_0x569493(++_0x352048);}(_0xb51d,0x159));var _0xdb51=function(_0x574103,_0x36049d){_0x574103=_0x574103-0x0;var _0x17a1ee=_0xb51d[_0x574103];return _0x17a1ee;};'use strict';var multer=require('multer');var util=require(_0xdb51('0x0'));var path=require('path');var timeout=require(_0xdb51('0x1'));var express=require(_0xdb51('0x2'));var router=express[_0xdb51('0x3')]();var auth=require(_0xdb51('0x4'));var interaction=require(_0xdb51('0x5'));var config=require(_0xdb51('0x6'));var controller=require('./chatWebsite.controller');router[_0xdb51('0x7')]('/',auth[_0xdb51('0x8')](),controller[_0xdb51('0x9')]);router['get']('/describe',auth[_0xdb51('0x8')](),controller['describe']);router['get'](_0xdb51('0xa'),auth[_0xdb51('0x8')](),controller['show']);router[_0xdb51('0x7')](_0xdb51('0xb'),auth[_0xdb51('0x8')](),controller[_0xdb51('0xc')]);router[_0xdb51('0x7')](_0xdb51('0xd'),auth[_0xdb51('0x8')](),controller['getAnswers']);router[_0xdb51('0x7')](_0xdb51('0xe'),controller[_0xdb51('0xf')]);router[_0xdb51('0x7')](_0xdb51('0x10'),controller['getAvatar']);router[_0xdb51('0x7')](_0xdb51('0x11'),controller[_0xdb51('0x12')]);router['get']('/:id/system_avatar',controller['getSystemAvatar']);router[_0xdb51('0x7')](_0xdb51('0x13'),auth[_0xdb51('0x8')](),controller[_0xdb51('0x14')]);router[_0xdb51('0x7')](_0xdb51('0x15'),controller[_0xdb51('0x16')]);router[_0xdb51('0x7')](_0xdb51('0x17'),auth[_0xdb51('0x8')](),controller['getApplications']);router[_0xdb51('0x7')]('/:id/proactive_actions',auth[_0xdb51('0x8')](),controller['getProactiveActions']);router[_0xdb51('0x7')](_0xdb51('0x18'),controller[_0xdb51('0x19')]);router[_0xdb51('0x7')](_0xdb51('0x1a'),auth[_0xdb51('0x8')](),controller[_0xdb51('0x1b')]);router[_0xdb51('0x7')](_0xdb51('0x1c'),auth[_0xdb51('0x8')](),controller['getAgents']);router[_0xdb51('0x1d')]('/',auth[_0xdb51('0x8')](),controller[_0xdb51('0x1e')]);router[_0xdb51('0x1d')](_0xdb51('0xb'),auth[_0xdb51('0x8')](),controller[_0xdb51('0x1f')]);router[_0xdb51('0x1d')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xdb51('0x20')]);var upload=multer({'storage':multer[_0xdb51('0x21')]({'destination':function(_0x457a2a,_0x29cc0f,_0x26684a){_0x26684a(null,path['join'](config[_0xdb51('0x22')],_0xdb51('0x23')));},'filename':function(_0x44280e,_0x5642df,_0x4f0e9a){_0x4f0e9a(null,util[_0xdb51('0x24')](_0xdb51('0x25'),Date[_0xdb51('0x26')](),_0x5642df[_0xdb51('0x27')]));}})});router[_0xdb51('0x1d')](_0xdb51('0xe'),upload['single'](_0xdb51('0x28')),controller[_0xdb51('0x29')]);var upload=multer({'storage':multer[_0xdb51('0x21')]({'destination':function(_0x3f8e88,_0xcce2aa,_0x3699bd){_0x3699bd(null,path[_0xdb51('0x2a')](config[_0xdb51('0x22')],'server/files/images/avatars/'));},'filename':function(_0x2be0bc,_0x2c5d53,_0x1d4335){_0x1d4335(null,util[_0xdb51('0x24')](_0xdb51('0x25'),Date[_0xdb51('0x26')](),_0x2c5d53[_0xdb51('0x27')]));}})});router['post'](_0xdb51('0x10'),upload[_0xdb51('0x2b')](_0xdb51('0x28')),controller['addAvatar']);var upload=multer({'storage':multer[_0xdb51('0x21')]({'destination':function(_0x3ee928,_0x6d7834,_0x413920){_0x413920(null,path[_0xdb51('0x2a')](config[_0xdb51('0x22')],_0xdb51('0x2c')));},'filename':function(_0x4272f8,_0x1b464a,_0x1c3a3b){_0x1c3a3b(null,util[_0xdb51('0x24')](_0xdb51('0x25'),Date['now'](),_0x1b464a[_0xdb51('0x27')]));}})});router[_0xdb51('0x1d')](_0xdb51('0x11'),upload[_0xdb51('0x2b')](_0xdb51('0x28')),controller[_0xdb51('0x2d')]);var upload=multer({'storage':multer[_0xdb51('0x21')]({'destination':function(_0x58092f,_0x2de87d,_0x7b8b94){_0x7b8b94(null,path[_0xdb51('0x2a')](config[_0xdb51('0x22')],_0xdb51('0x2c')));},'filename':function(_0xb5ade5,_0x17308e,_0x16835c){_0x16835c(null,util[_0xdb51('0x24')](_0xdb51('0x25'),Date['now'](),_0x17308e[_0xdb51('0x27')]));}})});router[_0xdb51('0x1d')](_0xdb51('0x2e'),upload[_0xdb51('0x2b')]('file'),controller['addSystemAvatar']);router['post'](_0xdb51('0x2f'),controller[_0xdb51('0x30')]);router[_0xdb51('0x1d')]('/:id/offline',controller[_0xdb51('0x31')]);router[_0xdb51('0x1d')](_0xdb51('0x13'),auth[_0xdb51('0x8')](),controller[_0xdb51('0x32')]);router[_0xdb51('0x1d')]('/:id/applications',auth[_0xdb51('0x8')](),controller[_0xdb51('0x33')]);router[_0xdb51('0x1d')]('/:id/proactive_actions',auth[_0xdb51('0x8')](),controller[_0xdb51('0x34')]);router[_0xdb51('0x1d')]('/:id/users',auth[_0xdb51('0x8')](),controller[_0xdb51('0x35')]);router[_0xdb51('0x36')](_0xdb51('0xa'),auth[_0xdb51('0x8')](),controller[_0xdb51('0x37')]);router[_0xdb51('0x38')](_0xdb51('0xa'),auth[_0xdb51('0x8')](),controller['destroy']);router[_0xdb51('0x38')](_0xdb51('0xb'),auth[_0xdb51('0x8')](),controller['removeDispositions']);router[_0xdb51('0x38')](_0xdb51('0xd'),auth[_0xdb51('0x8')](),controller[_0xdb51('0x39')]);router[_0xdb51('0x38')](_0xdb51('0x1c'),auth['isAuthenticated'](),controller['removeAgents']);module[_0xdb51('0x3a')]=router;
\ No newline at end of file
+var _0xbb29=['delete','removeAnswers','removeAgents','exports','multer','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','describe','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/logo','getLogo','/:id/avatar','getAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','getSnippet','/:id/applications','/:id/proactive_actions','getProactiveActions','/:id/fields','getFields','getOfflineMessages','getAgents','post','addAnswer','diskStorage','join','root','server/files/images/logos/','format','%s-%s','now','originalname','file','single','addAvatar','server/files/images/avatars/','/:id/customer_avatar','addSystemAvatar','/:id/notify','/:id/offline','addInteraction','addApplications','addProactiveActions','/:id/users','put','/:id','update','destroy'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xbb29,0x1bd));var _0x9bb2=function(_0xc68d79,_0x207ce0){_0xc68d79=_0xc68d79-0x0;var _0x323584=_0xbb29[_0xc68d79];return _0x323584;};'use strict';var multer=require(_0x9bb2('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x9bb2('0x1'));var express=require(_0x9bb2('0x2'));var router=express['Router']();var auth=require(_0x9bb2('0x3'));var interaction=require(_0x9bb2('0x4'));var config=require(_0x9bb2('0x5'));var controller=require(_0x9bb2('0x6'));router[_0x9bb2('0x7')]('/',auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x9')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0x9bb2('0xa')]);router[_0x9bb2('0x7')]('/:id',auth[_0x9bb2('0x8')](),controller[_0x9bb2('0xb')]);router[_0x9bb2('0x7')](_0x9bb2('0xc'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0xd')]);router[_0x9bb2('0x7')](_0x9bb2('0xe'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0xf')]);router[_0x9bb2('0x7')](_0x9bb2('0x10'),controller[_0x9bb2('0x11')]);router[_0x9bb2('0x7')](_0x9bb2('0x12'),controller[_0x9bb2('0x13')]);router['get']('/:id/customer_avatar',controller['getCustomerAvatar']);router[_0x9bb2('0x7')](_0x9bb2('0x14'),controller[_0x9bb2('0x15')]);router[_0x9bb2('0x7')](_0x9bb2('0x16'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x17')]);router[_0x9bb2('0x7')](_0x9bb2('0x18'),controller[_0x9bb2('0x19')]);router['get'](_0x9bb2('0x1a'),auth[_0x9bb2('0x8')](),controller['getApplications']);router['get'](_0x9bb2('0x1b'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x1c')]);router[_0x9bb2('0x7')](_0x9bb2('0x1d'),controller[_0x9bb2('0x1e')]);router[_0x9bb2('0x7')]('/:id/offline_messages',auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x1f')]);router[_0x9bb2('0x7')]('/:id/users',auth['isAuthenticated'](),controller[_0x9bb2('0x20')]);router[_0x9bb2('0x21')]('/',auth[_0x9bb2('0x8')](),controller['create']);router['post']('/:id/dispositions',auth[_0x9bb2('0x8')](),controller['addDisposition']);router[_0x9bb2('0x21')](_0x9bb2('0xe'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x22')]);var upload=multer({'storage':multer[_0x9bb2('0x23')]({'destination':function(_0xe8af19,_0x2c7050,_0x5520c2){_0x5520c2(null,path[_0x9bb2('0x24')](config[_0x9bb2('0x25')],_0x9bb2('0x26')));},'filename':function(_0x49fdea,_0x3f892e,_0x1a1721){_0x1a1721(null,util[_0x9bb2('0x27')](_0x9bb2('0x28'),Date[_0x9bb2('0x29')](),_0x3f892e[_0x9bb2('0x2a')]));}})});router[_0x9bb2('0x21')](_0x9bb2('0x10'),upload['single'](_0x9bb2('0x2b')),controller['addLogo']);var upload=multer({'storage':multer[_0x9bb2('0x23')]({'destination':function(_0x567b3a,_0x4236b3,_0x4c876b){_0x4c876b(null,path[_0x9bb2('0x24')](config[_0x9bb2('0x25')],'server/files/images/avatars/'));},'filename':function(_0x5eca56,_0x3357c0,_0x1fc33f){_0x1fc33f(null,util['format']('%s-%s',Date['now'](),_0x3357c0['originalname']));}})});router[_0x9bb2('0x21')](_0x9bb2('0x12'),upload[_0x9bb2('0x2c')](_0x9bb2('0x2b')),controller[_0x9bb2('0x2d')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5e46c3,_0x4583bf,_0x3b3ff9){_0x3b3ff9(null,path[_0x9bb2('0x24')](config[_0x9bb2('0x25')],_0x9bb2('0x2e')));},'filename':function(_0x8722ee,_0x521545,_0x4489dd){_0x4489dd(null,util[_0x9bb2('0x27')](_0x9bb2('0x28'),Date[_0x9bb2('0x29')](),_0x521545[_0x9bb2('0x2a')]));}})});router['post'](_0x9bb2('0x2f'),upload[_0x9bb2('0x2c')](_0x9bb2('0x2b')),controller['addCustomerAvatar']);var upload=multer({'storage':multer[_0x9bb2('0x23')]({'destination':function(_0x3f69de,_0x2b5cca,_0x45aca4){_0x45aca4(null,path[_0x9bb2('0x24')](config[_0x9bb2('0x25')],_0x9bb2('0x2e')));},'filename':function(_0x30c31f,_0x3cfba5,_0x5e8c70){_0x5e8c70(null,util[_0x9bb2('0x27')](_0x9bb2('0x28'),Date['now'](),_0x3cfba5[_0x9bb2('0x2a')]));}})});router[_0x9bb2('0x21')]('/:id/system_avatar',upload['single'](_0x9bb2('0x2b')),controller[_0x9bb2('0x30')]);router[_0x9bb2('0x21')](_0x9bb2('0x31'),controller['notify']);router[_0x9bb2('0x21')](_0x9bb2('0x32'),controller['offline']);router[_0x9bb2('0x21')]('/:id/interactions',auth['isAuthenticated'](),controller[_0x9bb2('0x33')]);router[_0x9bb2('0x21')](_0x9bb2('0x1a'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x34')]);router['post'](_0x9bb2('0x1b'),auth['isAuthenticated'](),controller[_0x9bb2('0x35')]);router[_0x9bb2('0x21')](_0x9bb2('0x36'),auth[_0x9bb2('0x8')](),controller['addAgents']);router[_0x9bb2('0x37')](_0x9bb2('0x38'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x39')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x9bb2('0x3a')]);router[_0x9bb2('0x3b')](_0x9bb2('0xc'),auth[_0x9bb2('0x8')](),controller['removeDispositions']);router[_0x9bb2('0x3b')](_0x9bb2('0xe'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x3c')]);router['delete'](_0x9bb2('0x36'),auth[_0x9bb2('0x8')](),controller[_0x9bb2('0x3d')]);module[_0x9bb2('0x3e')]=router;
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js
index 03e256d..18ab9c5 100644
--- a/server/api/cloudProvider/cloudProvider.attributes.js
+++ b/server/api/cloudProvider/cloudProvider.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1ffe=['ENUM','AmazonAWS','Google','sequelize','exports','STRING'];(function(_0x2ea07f,_0x12579b){var _0xd69b91=function(_0x2dbdd1){while(--_0x2dbdd1){_0x2ea07f['push'](_0x2ea07f['shift']());}};_0xd69b91(++_0x12579b);}(_0x1ffe,0xa5));var _0xe1ff=function(_0x53b96c,_0x56e613){_0x53b96c=_0x53b96c-0x0;var _0x5c72e8=_0x1ffe[_0x53b96c];return _0x5c72e8;};'use strict';var Sequelize=require(_0xe1ff('0x0'));module[_0xe1ff('0x1')]={'name':{'type':Sequelize[_0xe1ff('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0xe1ff('0x3')](_0xe1ff('0x4'),_0xe1ff('0x5')),'allowNull':![],'validate':{'notEmpty':!![]}},'data1':{'type':Sequelize[_0xe1ff('0x2')]},'data2':{'type':Sequelize[_0xe1ff('0x2')]}};
\ No newline at end of file
+var _0x0d4d=['sequelize','exports','STRING','ENUM','AmazonAWS','Google'];(function(_0x2cf140,_0x12e794){var _0x469288=function(_0x5b003a){while(--_0x5b003a){_0x2cf140['push'](_0x2cf140['shift']());}};_0x469288(++_0x12e794);}(_0x0d4d,0x132));var _0xd0d4=function(_0x56cd17,_0x58dc7f){_0x56cd17=_0x56cd17-0x0;var _0x432afa=_0x0d4d[_0x56cd17];return _0x432afa;};'use strict';var Sequelize=require(_0xd0d4('0x0'));module[_0xd0d4('0x1')]={'name':{'type':Sequelize[_0xd0d4('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0xd0d4('0x3')](_0xd0d4('0x4'),_0xd0d4('0x5')),'allowNull':![],'validate':{'notEmpty':!![]}},'data1':{'type':Sequelize['STRING']},'data2':{'type':Sequelize[_0xd0d4('0x2')]}};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.controller.js b/server/api/cloudProvider/cloudProvider.controller.js
index 0927844..425c5ed 100644
--- a/server/api/cloudProvider/cloudProvider.controller.js
+++ b/server/api/cloudProvider/cloudProvider.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd99f=['then','destroy','error','stack','name','rawAttributes','fieldName','type','key','map','query','filters','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','includeAll','include','CloudProvider','findAll','rows','catch','show','params','keys','intersection','create','body','find','html-pdf','eml-format','rimraf','zip-dir','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','update'];(function(_0x170826,_0x164c85){var _0x246c6d=function(_0x15fb77){while(--_0x15fb77){_0x170826['push'](_0x170826['shift']());}};_0x246c6d(++_0x164c85);}(_0xd99f,0x17e));var _0xfd99=function(_0x173b50,_0x235e75){_0x173b50=_0x173b50-0x0;var _0xaa6eee=_0xd99f[_0x173b50];return _0xaa6eee;};'use strict';var pdf=require(_0xfd99('0x0'));var emlformat=require(_0xfd99('0x1'));var rimraf=require(_0xfd99('0x2'));var zipdir=require(_0xfd99('0x3'));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(_0xfd99('0x4'));var path=require(_0xfd99('0x5'));var sox=require(_0xfd99('0x6'));var csv=require(_0xfd99('0x7'));var ejs=require(_0xfd99('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0xfd99('0x9'));var crypto=require(_0xfd99('0xa'));var jsforce=require(_0xfd99('0xb'));var deskjs=require(_0xfd99('0xc'));var toCsv=require('to-csv');var querystring=require(_0xfd99('0xd'));var Papa=require('papaparse');var Redis=require(_0xfd99('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xfd99('0xf'));var as=require(_0xfd99('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xfd99('0x11'))('api');var utils=require(_0xfd99('0x12'));var config=require(_0xfd99('0x13'));var db=require(_0xfd99('0x14'))['db'];function respondWithStatusCode(_0x3beb42,_0x580672){_0x580672=_0x580672||0xcc;return function(_0x73420c){if(_0x73420c){return _0x3beb42[_0xfd99('0x15')](_0x580672);}return _0x3beb42[_0xfd99('0x16')](_0x580672)[_0xfd99('0x17')]();};}function respondWithResult(_0x112fd4,_0x224d23){_0x224d23=_0x224d23||0xc8;return function(_0x1885f7){if(_0x1885f7){return _0x112fd4[_0xfd99('0x16')](_0x224d23)['json'](_0x1885f7);}};}function respondWithFilteredResult(_0x5dcb9a,_0x1b4788){return function(_0x3b59e6){if(_0x3b59e6){var _0x548b72=_0x3b59e6[_0xfd99('0x18')],_0x43b815=_0x1b4788[_0xfd99('0x19')],_0x2140cb=_0x1b4788[_0xfd99('0x19')]+_0x1b4788[_0xfd99('0x1a')],_0x160a70;if(_0x2140cb>=_0x548b72){_0x2140cb=_0x548b72;_0x160a70=0xc8;}else{_0x160a70=0xce;}_0x5dcb9a[_0xfd99('0x16')](_0x160a70);return _0x5dcb9a[_0xfd99('0x1b')](_0xfd99('0x1c'),_0x43b815+'-'+_0x2140cb+'/'+_0x548b72)[_0xfd99('0x1d')](_0x3b59e6);}return null;};}function patchUpdates(_0x4d13bc){return function(_0x2c351c){try{jsonpatch[_0xfd99('0x1e')](_0x2c351c,_0x4d13bc,!![]);}catch(_0x371c9e){return BPromise['reject'](_0x371c9e);}return _0x2c351c['save']();};}function saveUpdates(_0x1fcf36,_0xcde38c){return function(_0x43189e){if(_0x43189e){return _0x43189e[_0xfd99('0x1f')](_0x1fcf36)[_0xfd99('0x20')](function(_0x1b6ef4){return _0x1b6ef4;});}return null;};}function removeEntity(_0x18e389,_0x204375){return function(_0x129f65){if(_0x129f65){return _0x129f65[_0xfd99('0x21')]()[_0xfd99('0x20')](function(){_0x18e389[_0xfd99('0x16')](0xcc)[_0xfd99('0x17')]();});}};}function handleEntityNotFound(_0x946242,_0x40e9f8){return function(_0x33476d){if(!_0x33476d){_0x946242[_0xfd99('0x15')](0x194);}return _0x33476d;};}function handleError(_0x5af6c9,_0x444838){_0x444838=_0x444838||0x1f4;return function(_0x130ff1){logger[_0xfd99('0x22')](_0x130ff1[_0xfd99('0x23')]);if(_0x130ff1[_0xfd99('0x24')]){delete _0x130ff1[_0xfd99('0x24')];}_0x5af6c9[_0xfd99('0x16')](_0x444838)['send'](_0x130ff1);};}exports['index']=function(_0x3b69a3,_0x24b251){var _0x2a8958={},_0x315c40={},_0x46ae73={'count':0x0,'rows':[]};var _0x1e1910=_['map'](db['CloudProvider'][_0xfd99('0x25')],function(_0x3c1743){return{'name':_0x3c1743[_0xfd99('0x26')],'type':_0x3c1743[_0xfd99('0x27')][_0xfd99('0x28')]};});_0x315c40['model']=_[_0xfd99('0x29')](_0x1e1910,_0xfd99('0x24'));_0x315c40[_0xfd99('0x2a')]=_['keys'](_0x3b69a3[_0xfd99('0x2a')]);_0x315c40[_0xfd99('0x2b')]=_['intersection'](_0x315c40[_0xfd99('0x2c')],_0x315c40[_0xfd99('0x2a')]);_0x2a8958[_0xfd99('0x2d')]=_['intersection'](_0x315c40[_0xfd99('0x2c')],qs[_0xfd99('0x2e')](_0x3b69a3[_0xfd99('0x2a')][_0xfd99('0x2e')]));_0x2a8958['attributes']=_0x2a8958['attributes'][_0xfd99('0x2f')]?_0x2a8958[_0xfd99('0x2d')]:_0x315c40[_0xfd99('0x2c')];if(!_0x3b69a3['query'][_0xfd99('0x30')](_0xfd99('0x31'))){_0x2a8958[_0xfd99('0x1a')]=qs['limit'](_0x3b69a3[_0xfd99('0x2a')][_0xfd99('0x1a')]);_0x2a8958[_0xfd99('0x19')]=qs['offset'](_0x3b69a3[_0xfd99('0x2a')][_0xfd99('0x19')]);}_0x2a8958[_0xfd99('0x32')]=qs[_0xfd99('0x33')](_0x3b69a3[_0xfd99('0x2a')][_0xfd99('0x33')]);_0x2a8958[_0xfd99('0x34')]=qs[_0xfd99('0x2b')](_['pick'](_0x3b69a3[_0xfd99('0x2a')],_0x315c40[_0xfd99('0x2b')]),_0x1e1910);if(_0x3b69a3['query'][_0xfd99('0x35')]){_0x2a8958[_0xfd99('0x34')]=_[_0xfd99('0x36')](_0x2a8958['where'],{'$or':_['map'](_0x1e1910,function(_0x315b6b){if(_0x315b6b[_0xfd99('0x27')]!=='VIRTUAL'){var _0x472165={};_0x472165[_0x315b6b[_0xfd99('0x24')]]={'$like':'%'+_0x3b69a3[_0xfd99('0x2a')][_0xfd99('0x35')]+'%'};return _0x472165;}})});}_0x2a8958=_['merge']({},_0x2a8958,_0x3b69a3[_0xfd99('0x37')]);var _0x428ed7={'where':_0x2a8958[_0xfd99('0x34')]};return db['CloudProvider'][_0xfd99('0x18')](_0x428ed7)[_0xfd99('0x20')](function(_0x4cf47a){_0x46ae73[_0xfd99('0x18')]=_0x4cf47a;if(_0x3b69a3[_0xfd99('0x2a')][_0xfd99('0x38')]){_0x2a8958[_0xfd99('0x39')]=[{'all':!![]}];}return db[_0xfd99('0x3a')][_0xfd99('0x3b')](_0x2a8958);})[_0xfd99('0x20')](function(_0x394cbd){_0x46ae73[_0xfd99('0x3c')]=_0x394cbd;return _0x46ae73;})['then'](respondWithFilteredResult(_0x24b251,_0x2a8958))[_0xfd99('0x3d')](handleError(_0x24b251,null));};exports[_0xfd99('0x3e')]=function(_0x18e273,_0x3c0e0e){var _0xdfccb3={'raw':!![],'where':{'id':_0x18e273[_0xfd99('0x3f')]['id']}},_0x5745b8={};_0x5745b8[_0xfd99('0x2c')]=_[_0xfd99('0x40')](db[_0xfd99('0x3a')]['rawAttributes']);_0x5745b8['query']=_['keys'](_0x18e273[_0xfd99('0x2a')]);_0x5745b8[_0xfd99('0x2b')]=_[_0xfd99('0x41')](_0x5745b8[_0xfd99('0x2c')],_0x5745b8[_0xfd99('0x2a')]);_0xdfccb3[_0xfd99('0x2d')]=_[_0xfd99('0x41')](_0x5745b8[_0xfd99('0x2c')],qs[_0xfd99('0x2e')](_0x18e273[_0xfd99('0x2a')][_0xfd99('0x2e')]));_0xdfccb3[_0xfd99('0x2d')]=_0xdfccb3[_0xfd99('0x2d')][_0xfd99('0x2f')]?_0xdfccb3[_0xfd99('0x2d')]:_0x5745b8[_0xfd99('0x2c')];if(_0x18e273[_0xfd99('0x2a')][_0xfd99('0x38')]){_0xdfccb3['include']=[{'all':!![]}];}_0xdfccb3=_['merge']({},_0xdfccb3,_0x18e273['options']);return db['CloudProvider']['find'](_0xdfccb3)['then'](handleEntityNotFound(_0x3c0e0e,null))[_0xfd99('0x20')](respondWithResult(_0x3c0e0e,null))[_0xfd99('0x3d')](handleError(_0x3c0e0e,null));};exports[_0xfd99('0x42')]=function(_0x51df21,_0x3eed06){return db[_0xfd99('0x3a')][_0xfd99('0x42')](_0x51df21[_0xfd99('0x43')],{})[_0xfd99('0x20')](respondWithResult(_0x3eed06,0xc9))['catch'](handleError(_0x3eed06,null));};exports['update']=function(_0x3e62c7,_0x57d66f){if(_0x3e62c7[_0xfd99('0x43')]['id']){delete _0x3e62c7['body']['id'];}return db[_0xfd99('0x3a')][_0xfd99('0x44')]({'where':{'id':_0x3e62c7['params']['id']}})[_0xfd99('0x20')](handleEntityNotFound(_0x57d66f,null))[_0xfd99('0x20')](saveUpdates(_0x3e62c7[_0xfd99('0x43')],null))[_0xfd99('0x20')](respondWithResult(_0x57d66f,null))[_0xfd99('0x3d')](handleError(_0x57d66f,null));};exports[_0xfd99('0x21')]=function(_0x1651f0,_0x1919a5){return db[_0xfd99('0x3a')][_0xfd99('0x44')]({'where':{'id':_0x1651f0[_0xfd99('0x3f')]['id']}})[_0xfd99('0x20')](handleEntityNotFound(_0x1919a5,null))[_0xfd99('0x20')](removeEntity(_0x1919a5,null))[_0xfd99('0x3d')](handleError(_0x1919a5,null));};
\ No newline at end of file
+var _0xc2d5=['VIRTUAL','include','rows','catch','params','length','includeAll','find','create','body','destroy','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','path','sox','to-csv','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','update','then','error','name','send','index','map','CloudProvider','rawAttributes','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge'];(function(_0x4bf983,_0x17fde2){var _0x4eb726=function(_0x53bace){while(--_0x53bace){_0x4bf983['push'](_0x4bf983['shift']());}};_0x4eb726(++_0x17fde2);}(_0xc2d5,0x19d));var _0x5c2d=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0xc2d5[_0xb0f7c3];return _0x28ea68;};'use strict';var pdf=require(_0x5c2d('0x0'));var emlformat=require(_0x5c2d('0x1'));var rimraf=require(_0x5c2d('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5c2d('0x3'));var rp=require(_0x5c2d('0x4'));var moment=require(_0x5c2d('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x5c2d('0x6'));var sox=require(_0x5c2d('0x7'));var csv=require(_0x5c2d('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x5c2d('0x9'));var squel=require('squel');var crypto=require(_0x5c2d('0xa'));var jsforce=require(_0x5c2d('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5c2d('0xc'));var Papa=require(_0x5c2d('0xd'));var Redis=require(_0x5c2d('0xe'));var authService=require(_0x5c2d('0xf'));var qs=require(_0x5c2d('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5c2d('0x11'));var logger=require(_0x5c2d('0x12'))('api');var utils=require('../../config/utils');var config=require(_0x5c2d('0x13'));var db=require(_0x5c2d('0x14'))['db'];function respondWithStatusCode(_0x11e827,_0x2aae2e){_0x2aae2e=_0x2aae2e||0xcc;return function(_0x3b0d52){if(_0x3b0d52){return _0x11e827[_0x5c2d('0x15')](_0x2aae2e);}return _0x11e827[_0x5c2d('0x16')](_0x2aae2e)[_0x5c2d('0x17')]();};}function respondWithResult(_0x196518,_0x1ff526){_0x1ff526=_0x1ff526||0xc8;return function(_0x1b59d5){if(_0x1b59d5){return _0x196518[_0x5c2d('0x16')](_0x1ff526)[_0x5c2d('0x18')](_0x1b59d5);}};}function respondWithFilteredResult(_0x194f0d,_0x515fe9){return function(_0x346906){if(_0x346906){var _0x38155c=_0x346906[_0x5c2d('0x19')],_0xa7db0d=_0x515fe9[_0x5c2d('0x1a')],_0x111d0c=_0x515fe9[_0x5c2d('0x1a')]+_0x515fe9[_0x5c2d('0x1b')],_0x2d5fe1;if(_0x111d0c>=_0x38155c){_0x111d0c=_0x38155c;_0x2d5fe1=0xc8;}else{_0x2d5fe1=0xce;}_0x194f0d['status'](_0x2d5fe1);return _0x194f0d[_0x5c2d('0x1c')](_0x5c2d('0x1d'),_0xa7db0d+'-'+_0x111d0c+'/'+_0x38155c)['json'](_0x346906);}return null;};}function patchUpdates(_0x516947){return function(_0x4909b2){try{jsonpatch['apply'](_0x4909b2,_0x516947,!![]);}catch(_0x5a9c4b){return BPromise[_0x5c2d('0x1e')](_0x5a9c4b);}return _0x4909b2['save']();};}function saveUpdates(_0x19c9f5,_0x2487d1){return function(_0x4bd9f1){if(_0x4bd9f1){return _0x4bd9f1[_0x5c2d('0x1f')](_0x19c9f5)[_0x5c2d('0x20')](function(_0x191f7e){return _0x191f7e;});}return null;};}function removeEntity(_0x763964,_0x5a92c0){return function(_0x4d52da){if(_0x4d52da){return _0x4d52da['destroy']()[_0x5c2d('0x20')](function(){_0x763964[_0x5c2d('0x16')](0xcc)[_0x5c2d('0x17')]();});}};}function handleEntityNotFound(_0x52f0b4,_0x223cf7){return function(_0x2071b9){if(!_0x2071b9){_0x52f0b4[_0x5c2d('0x15')](0x194);}return _0x2071b9;};}function handleError(_0x37989c,_0x439295){_0x439295=_0x439295||0x1f4;return function(_0x5c6466){logger[_0x5c2d('0x21')](_0x5c6466['stack']);if(_0x5c6466[_0x5c2d('0x22')]){delete _0x5c6466['name'];}_0x37989c[_0x5c2d('0x16')](_0x439295)[_0x5c2d('0x23')](_0x5c6466);};}exports[_0x5c2d('0x24')]=function(_0x4b8c19,_0x3a62cd){var _0xaa4273={},_0x2361f4={},_0x2cd042={'count':0x0,'rows':[]};var _0x5834d6=_[_0x5c2d('0x25')](db[_0x5c2d('0x26')][_0x5c2d('0x27')],function(_0x4b9298){return{'name':_0x4b9298['fieldName'],'type':_0x4b9298['type'][_0x5c2d('0x28')]};});_0x2361f4[_0x5c2d('0x29')]=_[_0x5c2d('0x25')](_0x5834d6,_0x5c2d('0x22'));_0x2361f4[_0x5c2d('0x2a')]=_[_0x5c2d('0x2b')](_0x4b8c19[_0x5c2d('0x2a')]);_0x2361f4[_0x5c2d('0x2c')]=_[_0x5c2d('0x2d')](_0x2361f4[_0x5c2d('0x29')],_0x2361f4['query']);_0xaa4273['attributes']=_[_0x5c2d('0x2d')](_0x2361f4['model'],qs[_0x5c2d('0x2e')](_0x4b8c19['query'][_0x5c2d('0x2e')]));_0xaa4273[_0x5c2d('0x2f')]=_0xaa4273[_0x5c2d('0x2f')]['length']?_0xaa4273[_0x5c2d('0x2f')]:_0x2361f4[_0x5c2d('0x29')];if(!_0x4b8c19[_0x5c2d('0x2a')][_0x5c2d('0x30')](_0x5c2d('0x31'))){_0xaa4273[_0x5c2d('0x1b')]=qs[_0x5c2d('0x1b')](_0x4b8c19['query']['limit']);_0xaa4273['offset']=qs['offset'](_0x4b8c19[_0x5c2d('0x2a')][_0x5c2d('0x1a')]);}_0xaa4273[_0x5c2d('0x32')]=qs[_0x5c2d('0x33')](_0x4b8c19[_0x5c2d('0x2a')][_0x5c2d('0x33')]);_0xaa4273[_0x5c2d('0x34')]=qs['filters'](_[_0x5c2d('0x35')](_0x4b8c19[_0x5c2d('0x2a')],_0x2361f4[_0x5c2d('0x2c')]),_0x5834d6);if(_0x4b8c19[_0x5c2d('0x2a')][_0x5c2d('0x36')]){_0xaa4273[_0x5c2d('0x34')]=_[_0x5c2d('0x37')](_0xaa4273[_0x5c2d('0x34')],{'$or':_[_0x5c2d('0x25')](_0x5834d6,function(_0xede599){if(_0xede599['type']!==_0x5c2d('0x38')){var _0x3d6096={};_0x3d6096[_0xede599[_0x5c2d('0x22')]]={'$like':'%'+_0x4b8c19[_0x5c2d('0x2a')][_0x5c2d('0x36')]+'%'};return _0x3d6096;}})});}_0xaa4273=_[_0x5c2d('0x37')]({},_0xaa4273,_0x4b8c19['options']);var _0x11f4e1={'where':_0xaa4273['where']};return db[_0x5c2d('0x26')]['count'](_0x11f4e1)['then'](function(_0x5f06b4){_0x2cd042['count']=_0x5f06b4;if(_0x4b8c19['query']['includeAll']){_0xaa4273[_0x5c2d('0x39')]=[{'all':!![]}];}return db[_0x5c2d('0x26')]['findAll'](_0xaa4273);})[_0x5c2d('0x20')](function(_0x25a89e){_0x2cd042[_0x5c2d('0x3a')]=_0x25a89e;return _0x2cd042;})[_0x5c2d('0x20')](respondWithFilteredResult(_0x3a62cd,_0xaa4273))[_0x5c2d('0x3b')](handleError(_0x3a62cd,null));};exports['show']=function(_0x4fcf09,_0x1db498){var _0x5c0e18={'raw':!![],'where':{'id':_0x4fcf09[_0x5c2d('0x3c')]['id']}},_0x38574e={};_0x38574e[_0x5c2d('0x29')]=_[_0x5c2d('0x2b')](db[_0x5c2d('0x26')]['rawAttributes']);_0x38574e[_0x5c2d('0x2a')]=_[_0x5c2d('0x2b')](_0x4fcf09[_0x5c2d('0x2a')]);_0x38574e[_0x5c2d('0x2c')]=_[_0x5c2d('0x2d')](_0x38574e[_0x5c2d('0x29')],_0x38574e[_0x5c2d('0x2a')]);_0x5c0e18[_0x5c2d('0x2f')]=_['intersection'](_0x38574e[_0x5c2d('0x29')],qs[_0x5c2d('0x2e')](_0x4fcf09[_0x5c2d('0x2a')][_0x5c2d('0x2e')]));_0x5c0e18[_0x5c2d('0x2f')]=_0x5c0e18[_0x5c2d('0x2f')][_0x5c2d('0x3d')]?_0x5c0e18['attributes']:_0x38574e[_0x5c2d('0x29')];if(_0x4fcf09[_0x5c2d('0x2a')][_0x5c2d('0x3e')]){_0x5c0e18[_0x5c2d('0x39')]=[{'all':!![]}];}_0x5c0e18=_[_0x5c2d('0x37')]({},_0x5c0e18,_0x4fcf09['options']);return db[_0x5c2d('0x26')][_0x5c2d('0x3f')](_0x5c0e18)[_0x5c2d('0x20')](handleEntityNotFound(_0x1db498,null))[_0x5c2d('0x20')](respondWithResult(_0x1db498,null))[_0x5c2d('0x3b')](handleError(_0x1db498,null));};exports['create']=function(_0x234858,_0x37f5a2){return db[_0x5c2d('0x26')][_0x5c2d('0x40')](_0x234858[_0x5c2d('0x41')],{})['then'](respondWithResult(_0x37f5a2,0xc9))[_0x5c2d('0x3b')](handleError(_0x37f5a2,null));};exports['update']=function(_0x4a3352,_0x283fcd){if(_0x4a3352[_0x5c2d('0x41')]['id']){delete _0x4a3352[_0x5c2d('0x41')]['id'];}return db[_0x5c2d('0x26')]['find']({'where':{'id':_0x4a3352[_0x5c2d('0x3c')]['id']}})[_0x5c2d('0x20')](handleEntityNotFound(_0x283fcd,null))[_0x5c2d('0x20')](saveUpdates(_0x4a3352[_0x5c2d('0x41')],null))[_0x5c2d('0x20')](respondWithResult(_0x283fcd,null))[_0x5c2d('0x3b')](handleError(_0x283fcd,null));};exports[_0x5c2d('0x42')]=function(_0x10de21,_0x38c71d){return db[_0x5c2d('0x26')][_0x5c2d('0x3f')]({'where':{'id':_0x10de21['params']['id']}})[_0x5c2d('0x20')](handleEntityNotFound(_0x38c71d,null))['then'](removeEntity(_0x38c71d,null))[_0x5c2d('0x3b')](handleError(_0x38c71d,null));};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js
index a8ac420..eaf2222 100644
--- a/server/api/cloudProvider/cloudProvider.model.js
+++ b/server/api/cloudProvider/cloudProvider.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1818=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./cloudProvider.attributes','exports','define','CloudProvider','cloud_providers','util'];(function(_0x42d6a2,_0x5424c3){var _0x3aab5d=function(_0x19500f){while(--_0x19500f){_0x42d6a2['push'](_0x42d6a2['shift']());}};_0x3aab5d(++_0x5424c3);}(_0x1818,0x1b9));var _0x8181=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0x1818[_0x43d11d];return _0x38cd08;};'use strict';var _=require('lodash');var util=require(_0x8181('0x0'));var logger=require(_0x8181('0x1'))(_0x8181('0x2'));var moment=require(_0x8181('0x3'));var BPromise=require(_0x8181('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8181('0x5'));var rimraf=require(_0x8181('0x6'));var config=require(_0x8181('0x7'));var attributes=require(_0x8181('0x8'));module[_0x8181('0x9')]=function(_0x534222,_0x503a35){return _0x534222[_0x8181('0xa')](_0x8181('0xb'),attributes,{'tableName':_0x8181('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6fca=['../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./cloudProvider.attributes','exports','define','cloud_providers','util'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0x6fca,0x1b7));var _0xa6fc=function(_0x3bcbbc,_0x4e7b07){_0x3bcbbc=_0x3bcbbc-0x0;var _0x52c2b5=_0x6fca[_0x3bcbbc];return _0x52c2b5;};'use strict';var _=require('lodash');var util=require(_0xa6fc('0x0'));var logger=require(_0xa6fc('0x1'))(_0xa6fc('0x2'));var moment=require(_0xa6fc('0x3'));var BPromise=require(_0xa6fc('0x4'));var rp=require(_0xa6fc('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xa6fc('0x6'));var attributes=require(_0xa6fc('0x7'));module[_0xa6fc('0x8')]=function(_0x237f68,_0x146d5a){return _0x237f68[_0xa6fc('0x9')]('CloudProvider',attributes,{'tableName':_0xa6fc('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.rpc.js b/server/api/cloudProvider/cloudProvider.rpc.js
index 483325b..e4c5693 100644
--- a/server/api/cloudProvider/cloudProvider.rpc.js
+++ b/server/api/cloudProvider/cloudProvider.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x74ff=['../../config/environment','jayson/promise','client','http','request','then','info','debug','CloudProvider,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','CloudProvider,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x4b6830,_0x2bf6fb){var _0x239e4a=function(_0x364735){while(--_0x364735){_0x4b6830['push'](_0x4b6830['shift']());}};_0x239e4a(++_0x2bf6fb);}(_0x74ff,0x1dc));var _0xf74f=function(_0x30bdde,_0x2a5eb7){_0x30bdde=_0x30bdde-0x0;var _0x248921=_0x74ff[_0x30bdde];return _0x248921;};'use strict';var _=require(_0xf74f('0x0'));var util=require(_0xf74f('0x1'));var moment=require(_0xf74f('0x2'));var BPromise=require('bluebird');var rs=require(_0xf74f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf74f('0x4'))['db'];var utils=require(_0xf74f('0x5'));var logger=require(_0xf74f('0x6'))('rpc');var config=require(_0xf74f('0x7'));var jayson=require(_0xf74f('0x8'));var client=jayson[_0xf74f('0x9')][_0xf74f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x760fb2,_0x19ec57,_0x2de998){return new BPromise(function(_0x6626ec,_0x176f20){return client[_0xf74f('0xb')](_0x760fb2,_0x2de998)[_0xf74f('0xc')](function(_0x385ab0){logger[_0xf74f('0xd')]('CloudProvider,\x20%s,\x20%s',_0x19ec57,'request\x20sent');logger[_0xf74f('0xe')](_0xf74f('0xf'),_0x19ec57,_0xf74f('0x10'),JSON['stringify'](_0x385ab0));if(_0x385ab0[_0xf74f('0x11')]){if(_0x385ab0[_0xf74f('0x11')][_0xf74f('0x12')]===0x1f4){logger['error'](_0xf74f('0x13'),_0x19ec57,_0x385ab0[_0xf74f('0x11')][_0xf74f('0x14')]);return _0x176f20(_0x385ab0['error'][_0xf74f('0x14')]);}logger['error'](_0xf74f('0x13'),_0x19ec57,_0x385ab0[_0xf74f('0x11')][_0xf74f('0x14')]);return _0x6626ec(_0x385ab0[_0xf74f('0x11')]['message']);}else{logger[_0xf74f('0xd')](_0xf74f('0x13'),_0x19ec57,_0xf74f('0x10'));_0x6626ec(_0x385ab0[_0xf74f('0x15')][_0xf74f('0x14')]);}})[_0xf74f('0x16')](function(_0x452771){logger[_0xf74f('0x11')](_0xf74f('0x13'),_0x19ec57,_0x452771);_0x176f20(_0x452771);});});}
\ No newline at end of file
+var _0xa5c8=['CloudProvider,\x20%s,\x20%s','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','lodash','util','moment','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info'];(function(_0x383dbb,_0x17d41b){var _0x6e8bde=function(_0x2740f1){while(--_0x2740f1){_0x383dbb['push'](_0x383dbb['shift']());}};_0x6e8bde(++_0x17d41b);}(_0xa5c8,0x144));var _0x8a5c=function(_0xc736e7,_0x4fa172){_0xc736e7=_0xc736e7-0x0;var _0xe0f4e9=_0xa5c8[_0xc736e7];return _0xe0f4e9;};'use strict';var _=require(_0x8a5c('0x0'));var util=require(_0x8a5c('0x1'));var moment=require(_0x8a5c('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8a5c('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x8a5c('0x4'));var logger=require(_0x8a5c('0x5'))('rpc');var config=require(_0x8a5c('0x6'));var jayson=require(_0x8a5c('0x7'));var client=jayson[_0x8a5c('0x8')][_0x8a5c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1ad8b6,_0x42d7d4,_0x5690ea){return new BPromise(function(_0x4d2760,_0x568bc0){return client[_0x8a5c('0xa')](_0x1ad8b6,_0x5690ea)['then'](function(_0x263846){logger[_0x8a5c('0xb')](_0x8a5c('0xc'),_0x42d7d4,'request\x20sent');logger[_0x8a5c('0xd')](_0x8a5c('0xe'),_0x42d7d4,'request\x20sent',JSON[_0x8a5c('0xf')](_0x263846));if(_0x263846[_0x8a5c('0x10')]){if(_0x263846[_0x8a5c('0x10')][_0x8a5c('0x11')]===0x1f4){logger[_0x8a5c('0x10')](_0x8a5c('0xc'),_0x42d7d4,_0x263846[_0x8a5c('0x10')][_0x8a5c('0x12')]);return _0x568bc0(_0x263846[_0x8a5c('0x10')][_0x8a5c('0x12')]);}logger[_0x8a5c('0x10')](_0x8a5c('0xc'),_0x42d7d4,_0x263846[_0x8a5c('0x10')]['message']);return _0x4d2760(_0x263846[_0x8a5c('0x10')][_0x8a5c('0x12')]);}else{logger['info']('CloudProvider,\x20%s,\x20%s',_0x42d7d4,_0x8a5c('0x13'));_0x4d2760(_0x263846[_0x8a5c('0x14')][_0x8a5c('0x12')]);}})['catch'](function(_0x17fc7a){logger[_0x8a5c('0x10')](_0x8a5c('0xc'),_0x42d7d4,_0x17fc7a);_0x568bc0(_0x17fc7a);});});}
\ No newline at end of file
diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js
index f3e0270..244db14 100644
--- a/server/api/cloudProvider/index.js
+++ b/server/api/cloudProvider/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4fe6=['create','put','/:id','update','delete','destroy','multer','util','connect-timeout','express','Router','../../components/interaction/service','./cloudProvider.controller','get','isAuthenticated','index','show'];(function(_0x2caaef,_0x3c19ed){var _0xd011f8=function(_0x318656){while(--_0x318656){_0x2caaef['push'](_0x2caaef['shift']());}};_0xd011f8(++_0x3c19ed);}(_0x4fe6,0x1e2));var _0x64fe=function(_0x244414,_0x56d497){_0x244414=_0x244414-0x0;var _0x24eb12=_0x4fe6[_0x244414];return _0x24eb12;};'use strict';var multer=require(_0x64fe('0x0'));var util=require(_0x64fe('0x1'));var path=require('path');var timeout=require(_0x64fe('0x2'));var express=require(_0x64fe('0x3'));var router=express[_0x64fe('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x64fe('0x5'));var config=require('../../config/environment');var controller=require(_0x64fe('0x6'));router[_0x64fe('0x7')]('/',auth[_0x64fe('0x8')](),controller[_0x64fe('0x9')]);router['get']('/:id',auth[_0x64fe('0x8')](),controller[_0x64fe('0xa')]);router['post']('/',auth['isAuthenticated'](),controller[_0x64fe('0xb')]);router[_0x64fe('0xc')](_0x64fe('0xd'),auth['isAuthenticated'](),controller[_0x64fe('0xe')]);router[_0x64fe('0xf')](_0x64fe('0xd'),auth[_0x64fe('0x8')](),controller[_0x64fe('0x10')]);module['exports']=router;
\ No newline at end of file
+var _0xf8e0=['update','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cloudProvider.controller','get','isAuthenticated','index','/:id','post','create'];(function(_0x5cd29f,_0x25f1ab){var _0x2301b5=function(_0x137b82){while(--_0x137b82){_0x5cd29f['push'](_0x5cd29f['shift']());}};_0x2301b5(++_0x25f1ab);}(_0xf8e0,0x110));var _0x0f8e=function(_0x3882e4,_0x2cd2cd){_0x3882e4=_0x3882e4-0x0;var _0x359fea=_0xf8e0[_0x3882e4];return _0x359fea;};'use strict';var multer=require(_0x0f8e('0x0'));var util=require(_0x0f8e('0x1'));var path=require(_0x0f8e('0x2'));var timeout=require(_0x0f8e('0x3'));var express=require(_0x0f8e('0x4'));var router=express[_0x0f8e('0x5')]();var auth=require(_0x0f8e('0x6'));var interaction=require(_0x0f8e('0x7'));var config=require(_0x0f8e('0x8'));var controller=require(_0x0f8e('0x9'));router[_0x0f8e('0xa')]('/',auth[_0x0f8e('0xb')](),controller[_0x0f8e('0xc')]);router[_0x0f8e('0xa')](_0x0f8e('0xd'),auth[_0x0f8e('0xb')](),controller['show']);router[_0x0f8e('0xe')]('/',auth[_0x0f8e('0xb')](),controller[_0x0f8e('0xf')]);router['put'](_0x0f8e('0xd'),auth['isAuthenticated'](),controller[_0x0f8e('0x10')]);router['delete'](_0x0f8e('0xd'),auth[_0x0f8e('0xb')](),controller[_0x0f8e('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js
index a7817d8..64997b2 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 _0x403c=['exports','STRING'];(function(_0x5646f4,_0x35182a){var _0x7a1b59=function(_0x4f9e58){while(--_0x4f9e58){_0x5646f4['push'](_0x5646f4['shift']());}};_0x7a1b59(++_0x35182a);}(_0x403c,0x13a));var _0xc403=function(_0x56e056,_0x2f25cb){_0x56e056=_0x56e056-0x0;var _0x1eab88=_0x403c[_0x56e056];return _0x1eab88;};'use strict';var Sequelize=require('sequelize');module[_0xc403('0x0')]={'name':{'type':Sequelize[_0xc403('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xc403('0x1')]},'companyId':{'type':Sequelize[_0xc403('0x1')]},'website':{'type':Sequelize[_0xc403('0x1')]},'phone':{'type':Sequelize['STRING']},'fax':{'type':Sequelize[_0xc403('0x1')]},'type':{'type':Sequelize['STRING']},'street':{'type':Sequelize[_0xc403('0x1')]},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0xc403('0x1')]},'country':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0xc403('0x1')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize['STRING']},'sStreet':{'type':Sequelize[_0xc403('0x1')]},'sPostalCode':{'type':Sequelize[_0xc403('0x1')]},'sCity':{'type':Sequelize[_0xc403('0x1')]},'sCountry':{'type':Sequelize[_0xc403('0x1')]},'description':{'type':Sequelize[_0xc403('0x1')]}};
\ No newline at end of file
+var _0x2ec4=['STRING'];(function(_0x416c5f,_0x44a996){var _0x5de15d=function(_0x201fe5){while(--_0x201fe5){_0x416c5f['push'](_0x416c5f['shift']());}};_0x5de15d(++_0x44a996);}(_0x2ec4,0x139));var _0x42ec=function(_0x92c450,_0x41f1e3){_0x92c450=_0x92c450-0x0;var _0x2a9599=_0x2ec4[_0x92c450];return _0x2a9599;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x42ec('0x0')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0x42ec('0x0')]},'companyId':{'type':Sequelize['STRING']},'website':{'type':Sequelize[_0x42ec('0x0')]},'phone':{'type':Sequelize[_0x42ec('0x0')]},'fax':{'type':Sequelize[_0x42ec('0x0')]},'type':{'type':Sequelize[_0x42ec('0x0')]},'street':{'type':Sequelize[_0x42ec('0x0')]},'postalCode':{'type':Sequelize[_0x42ec('0x0')]},'city':{'type':Sequelize[_0x42ec('0x0')]},'country':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x42ec('0x0')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x42ec('0x0')]},'sStreet':{'type':Sequelize[_0x42ec('0x0')]},'sPostalCode':{'type':Sequelize[_0x42ec('0x0')]},'sCity':{'type':Sequelize['STRING']},'sCountry':{'type':Sequelize[_0x42ec('0x0')]},'description':{'type':Sequelize[_0x42ec('0x0')]}};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js
index 3e0e834..9bbef6f 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 _0xf40a=['offset','limit','apply','save','update','then','get','Companies','error','name','send','index','CmCompany','describe','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','map','includeAll','rows','catch','show','rawAttributes','include','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','destroy','addContacts','ids','omit','getContacts','CmContact','html-pdf','eml-format','zip-dir','fast-json-patch','bluebird','mustache','path','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','json','count'];(function(_0x46c533,_0x4fb92b){var _0x355e82=function(_0x30440b){while(--_0x30440b){_0x46c533['push'](_0x46c533['shift']());}};_0x355e82(++_0x4fb92b);}(_0xf40a,0x1bb));var _0xaf40=function(_0x2cb860,_0x2ab949){_0x2cb860=_0x2cb860-0x0;var _0x35c787=_0xf40a[_0x2cb860];return _0x35c787;};'use strict';var pdf=require(_0xaf40('0x0'));var emlformat=require(_0xaf40('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xaf40('0x2'));var jsonpatch=require(_0xaf40('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xaf40('0x4'));var Mustache=require(_0xaf40('0x5'));var util=require('util');var path=require(_0xaf40('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xaf40('0x7'));var squel=require('squel');var crypto=require(_0xaf40('0x8'));var jsforce=require(_0xaf40('0x9'));var deskjs=require(_0xaf40('0xa'));var toCsv=require('to-csv');var querystring=require(_0xaf40('0xb'));var Papa=require(_0xaf40('0xc'));var Redis=require(_0xaf40('0xd'));var authService=require('../../components/auth/service');var qs=require(_0xaf40('0xe'));var as=require(_0xaf40('0xf'));var hardwareService=require(_0xaf40('0x10'));var logger=require(_0xaf40('0x11'))('api');var utils=require('../../config/utils');var config=require(_0xaf40('0x12'));var db=require(_0xaf40('0x13'))['db'];function respondWithStatusCode(_0x525261,_0x1ae137){_0x1ae137=_0x1ae137||0xcc;return function(_0x29a977){if(_0x29a977){return _0x525261[_0xaf40('0x14')](_0x1ae137);}return _0x525261[_0xaf40('0x15')](_0x1ae137)[_0xaf40('0x16')]();};}function respondWithResult(_0x4bb48a,_0xe17a5b){_0xe17a5b=_0xe17a5b||0xc8;return function(_0x590d6a){if(_0x590d6a){return _0x4bb48a[_0xaf40('0x15')](_0xe17a5b)[_0xaf40('0x17')](_0x590d6a);}};}function respondWithFilteredResult(_0xbd2d74,_0x268a96){return function(_0x2df9a2){if(_0x2df9a2){var _0x3c0dea=_0x2df9a2[_0xaf40('0x18')],_0x3f5d94=_0x268a96[_0xaf40('0x19')],_0x36b5e5=_0x268a96[_0xaf40('0x19')]+_0x268a96[_0xaf40('0x1a')],_0x5db535;if(_0x36b5e5>=_0x3c0dea){_0x36b5e5=_0x3c0dea;_0x5db535=0xc8;}else{_0x5db535=0xce;}_0xbd2d74['status'](_0x5db535);return _0xbd2d74['set']('Content-Range',_0x3f5d94+'-'+_0x36b5e5+'/'+_0x3c0dea)[_0xaf40('0x17')](_0x2df9a2);}return null;};}function patchUpdates(_0x2fc38b){return function(_0x93ea60){try{jsonpatch[_0xaf40('0x1b')](_0x93ea60,_0x2fc38b,!![]);}catch(_0x390762){return BPromise['reject'](_0x390762);}return _0x93ea60[_0xaf40('0x1c')]();};}function saveUpdates(_0x2e324f,_0x42e888){return function(_0xb580a2){if(_0xb580a2){return _0xb580a2[_0xaf40('0x1d')](_0x2e324f)[_0xaf40('0x1e')](function(_0x2b420f){return _0x2b420f;});}return null;};}function removeEntity(_0x529647,_0x175bef){return function(_0x1c0957){if(_0x1c0957){return _0x1c0957['destroy']()[_0xaf40('0x1e')](function(){var _0x7045d7=_0x1c0957[_0xaf40('0x1f')]({'plain':!![]});var _0x2a4bb8=_0xaf40('0x20');return db['UserProfileResource']['destroy']({'where':{'type':_0x2a4bb8,'resourceId':_0x7045d7['id']}})['then'](function(){return _0x1c0957;});})['then'](function(){_0x529647[_0xaf40('0x15')](0xcc)[_0xaf40('0x16')]();});}};}function handleEntityNotFound(_0x5b8ad4,_0x3b430c){return function(_0x1e61ff){if(!_0x1e61ff){_0x5b8ad4['sendStatus'](0x194);}return _0x1e61ff;};}function handleError(_0x4da830,_0x41fbed){_0x41fbed=_0x41fbed||0x1f4;return function(_0x3a2aab){logger[_0xaf40('0x21')](_0x3a2aab['stack']);if(_0x3a2aab[_0xaf40('0x22')]){delete _0x3a2aab[_0xaf40('0x22')];}_0x4da830[_0xaf40('0x15')](_0x41fbed)[_0xaf40('0x23')](_0x3a2aab);};}exports[_0xaf40('0x24')]=function(_0x33d982,_0x5d62e8){var _0x12bce9={},_0x5497e3={},_0x507914={'count':0x0,'rows':[]};return db[_0xaf40('0x25')][_0xaf40('0x26')]()[_0xaf40('0x1e')](function(_0x254bed){_0x5497e3[_0xaf40('0x27')]=_[_0xaf40('0x28')](_0x254bed);_0x5497e3[_0xaf40('0x29')]=_[_0xaf40('0x28')](_0x33d982[_0xaf40('0x29')]);_0x5497e3[_0xaf40('0x2a')]=_[_0xaf40('0x2b')](_0x5497e3[_0xaf40('0x27')],_0x5497e3[_0xaf40('0x29')]);_0x12bce9[_0xaf40('0x2c')]=_[_0xaf40('0x2b')](_0x5497e3[_0xaf40('0x27')],qs[_0xaf40('0x2d')](_0x33d982[_0xaf40('0x29')][_0xaf40('0x2d')]));_0x12bce9[_0xaf40('0x2c')]=_0x12bce9['attributes'][_0xaf40('0x2e')]?_0x12bce9['attributes']:_0x5497e3['model'];if(!_0x33d982[_0xaf40('0x29')][_0xaf40('0x2f')]('nolimit')){_0x12bce9[_0xaf40('0x1a')]=qs[_0xaf40('0x1a')](_0x33d982[_0xaf40('0x29')][_0xaf40('0x1a')]);_0x12bce9[_0xaf40('0x19')]=qs[_0xaf40('0x19')](_0x33d982['query'][_0xaf40('0x19')]);}_0x12bce9[_0xaf40('0x30')]=qs[_0xaf40('0x31')](_0x33d982[_0xaf40('0x29')]['sort']);_0x12bce9[_0xaf40('0x32')]=qs[_0xaf40('0x2a')](_[_0xaf40('0x33')](_0x33d982['query'],_0x5497e3[_0xaf40('0x2a')]));if(_0x33d982['query'][_0xaf40('0x34')]){_0x12bce9[_0xaf40('0x32')]=_[_0xaf40('0x35')](_0x12bce9[_0xaf40('0x32')],{'$or':_[_0xaf40('0x36')](_0x12bce9[_0xaf40('0x2c')],function(_0x4f5d76){var _0x3f5f3f={};_0x3f5f3f[_0x4f5d76]={'$like':'%'+_0x33d982[_0xaf40('0x29')][_0xaf40('0x34')]+'%'};return _0x3f5f3f;})});}_0x12bce9=_[_0xaf40('0x35')]({},_0x12bce9,_0x33d982['options']);var _0x48d07e={'where':_0x12bce9['where']};return db[_0xaf40('0x25')]['count'](_0x48d07e)[_0xaf40('0x1e')](function(_0x4eaf12){_0x507914[_0xaf40('0x18')]=_0x4eaf12;if(_0x33d982['query'][_0xaf40('0x37')]){_0x12bce9['include']=[{'all':!![]}];}return db[_0xaf40('0x25')]['findAll'](_0x12bce9);})[_0xaf40('0x1e')](function(_0x26c976){_0x507914[_0xaf40('0x38')]=_0x26c976;return _0x507914;})['then'](respondWithFilteredResult(_0x5d62e8,_0x12bce9))[_0xaf40('0x39')](handleError(_0x5d62e8,null));})['catch'](handleError(_0x5d62e8,null));};exports[_0xaf40('0x3a')]=function(_0x5a988f,_0x4bb47c){var _0x39d7a8={'raw':![],'where':{'id':_0x5a988f['params']['id']}},_0x42c6bd={};_0x42c6bd[_0xaf40('0x27')]=_[_0xaf40('0x28')](db[_0xaf40('0x25')][_0xaf40('0x3b')]);_0x42c6bd['query']=_[_0xaf40('0x28')](_0x5a988f['query']);_0x42c6bd[_0xaf40('0x2a')]=_['intersection'](_0x42c6bd[_0xaf40('0x27')],_0x42c6bd[_0xaf40('0x29')]);_0x39d7a8[_0xaf40('0x2c')]=_[_0xaf40('0x2b')](_0x42c6bd[_0xaf40('0x27')],qs[_0xaf40('0x2d')](_0x5a988f['query'][_0xaf40('0x2d')]));_0x39d7a8['attributes']=_0x39d7a8[_0xaf40('0x2c')]['length']?_0x39d7a8[_0xaf40('0x2c')]:_0x42c6bd[_0xaf40('0x27')];if(_0x5a988f[_0xaf40('0x29')]['includeAll']){_0x39d7a8[_0xaf40('0x3c')]=[{'all':!![]}];}_0x39d7a8=_[_0xaf40('0x35')]({},_0x39d7a8,_0x5a988f[_0xaf40('0x3d')]);return db['CmCompany'][_0xaf40('0x3e')](_0x39d7a8)[_0xaf40('0x1e')](handleEntityNotFound(_0x4bb47c,null))[_0xaf40('0x1e')](respondWithResult(_0x4bb47c,null))['catch'](handleError(_0x4bb47c,null));};exports[_0xaf40('0x3f')]=function(_0x29e56c,_0x47d052){return db[_0xaf40('0x25')][_0xaf40('0x3f')](_0x29e56c[_0xaf40('0x40')],{})[_0xaf40('0x1e')](function(_0x5a2e5a){var _0x582e83=_0x29e56c[_0xaf40('0x41')]['get']({'plain':!![]});if(!_0x582e83)throw new Error(_0xaf40('0x42'));if(_0x582e83[_0xaf40('0x43')]==='user'){var _0xa1f6aa=_0x5a2e5a['get']({'plain':!![]});var _0x1013cb=_0xaf40('0x20');return db['UserProfileSection']['find']({'where':{'name':_0x1013cb,'userProfileId':_0x582e83['userProfileId']},'raw':!![]})[_0xaf40('0x1e')](function(_0x5eb737){if(_0x5eb737&&_0x5eb737[_0xaf40('0x44')]===0x0){return db[_0xaf40('0x45')][_0xaf40('0x3f')]({'name':_0xa1f6aa[_0xaf40('0x22')],'resourceId':_0xa1f6aa['id'],'type':_0x5eb737[_0xaf40('0x22')],'sectionId':_0x5eb737['id']},{})[_0xaf40('0x1e')](function(){return _0x5a2e5a;});}else{return _0x5a2e5a;}})[_0xaf40('0x39')](function(_0x3ed307){logger[_0xaf40('0x21')](_0xaf40('0x46'),_0x3ed307);throw _0x3ed307;});}return _0x5a2e5a;})[_0xaf40('0x1e')](respondWithResult(_0x47d052,0xc9))[_0xaf40('0x39')](handleError(_0x47d052,null));};exports['update']=function(_0x4a4288,_0x40e47a){if(_0x4a4288[_0xaf40('0x40')]['id']){delete _0x4a4288['body']['id'];}return db[_0xaf40('0x25')]['find']({'where':{'id':_0x4a4288[_0xaf40('0x47')]['id']}})[_0xaf40('0x1e')](handleEntityNotFound(_0x40e47a,null))[_0xaf40('0x1e')](saveUpdates(_0x4a4288[_0xaf40('0x40')],null))[_0xaf40('0x1e')](respondWithResult(_0x40e47a,null))[_0xaf40('0x39')](handleError(_0x40e47a,null));};exports[_0xaf40('0x48')]=function(_0x93c691,_0x2e7724){return db[_0xaf40('0x25')][_0xaf40('0x3e')]({'where':{'id':_0x93c691['params']['id']}})[_0xaf40('0x1e')](handleEntityNotFound(_0x2e7724,null))[_0xaf40('0x1e')](removeEntity(_0x2e7724,null))[_0xaf40('0x39')](handleError(_0x2e7724,null));};exports['describe']=function(_0x211972,_0x52813e){return db[_0xaf40('0x25')][_0xaf40('0x26')]()['then'](respondWithResult(_0x52813e,null))[_0xaf40('0x39')](handleError(_0x52813e,null));};exports[_0xaf40('0x49')]=function(_0x5badf5,_0x4864c8,_0x5026a2){return db['CmContact'][_0xaf40('0x3e')]({'where':{'id':_0x5badf5[_0xaf40('0x47')]['id']}})[_0xaf40('0x1e')](handleEntityNotFound(_0x4864c8,null))[_0xaf40('0x1e')](function(_0x353c7f){if(_0x353c7f){return _0x353c7f[_0xaf40('0x49')](_0x5badf5['body'][_0xaf40('0x4a')],_[_0xaf40('0x4b')](_0x5badf5[_0xaf40('0x40')],[_0xaf40('0x4a'),'id'])||{});}})[_0xaf40('0x1e')](respondWithResult(_0x4864c8,null))[_0xaf40('0x39')](handleError(_0x4864c8,null));};exports[_0xaf40('0x4c')]=function(_0x573463,_0xd2534c,_0x16d325){var _0x49d5ea={};var _0x477e81={};var _0x2f4474;var _0xd30bc2;return db[_0xaf40('0x25')]['findOne']({'where':{'id':_0x573463[_0xaf40('0x47')]['id']}})[_0xaf40('0x1e')](handleEntityNotFound(_0xd2534c,null))[_0xaf40('0x1e')](function(_0xd3a502){if(_0xd3a502){_0x2f4474=_0xd3a502;_0x477e81[_0xaf40('0x27')]=_[_0xaf40('0x28')](db[_0xaf40('0x4d')][_0xaf40('0x3b')]);_0x477e81[_0xaf40('0x29')]=_['keys'](_0x573463[_0xaf40('0x29')]);_0x477e81[_0xaf40('0x2a')]=_[_0xaf40('0x2b')](_0x477e81[_0xaf40('0x27')],_0x477e81['query']);_0x49d5ea[_0xaf40('0x2c')]=_[_0xaf40('0x2b')](_0x477e81[_0xaf40('0x27')],qs[_0xaf40('0x2d')](_0x573463['query'][_0xaf40('0x2d')]));_0x49d5ea[_0xaf40('0x2c')]=_0x49d5ea[_0xaf40('0x2c')]['length']?_0x49d5ea[_0xaf40('0x2c')]:_0x477e81[_0xaf40('0x27')];_0x49d5ea[_0xaf40('0x30')]=qs['sort'](_0x573463[_0xaf40('0x29')][_0xaf40('0x31')]);_0x49d5ea[_0xaf40('0x32')]=qs['filters'](_[_0xaf40('0x33')](_0x573463[_0xaf40('0x29')],_0x477e81['filters']));if(_0x573463['query'][_0xaf40('0x34')]){_0x49d5ea[_0xaf40('0x32')]=_['merge'](_0x49d5ea[_0xaf40('0x32')],{'$or':_['map'](_0x49d5ea['attributes'],function(_0x2743bc){var _0x3e3d6f={};_0x3e3d6f[_0x2743bc]={'$like':'%'+_0x573463[_0xaf40('0x29')][_0xaf40('0x34')]+'%'};return _0x3e3d6f;})});}_0x49d5ea=_['merge']({},_0x49d5ea,_0x573463[_0xaf40('0x3d')]);return _0x2f4474[_0xaf40('0x4c')](_0x49d5ea);}})[_0xaf40('0x1e')](function(_0x574fe6){if(_0x574fe6){_0xd30bc2=_0x574fe6[_0xaf40('0x2e')];if(!_0x573463[_0xaf40('0x29')]['hasOwnProperty']('nolimit')){_0x49d5ea[_0xaf40('0x1a')]=qs[_0xaf40('0x1a')](_0x573463[_0xaf40('0x29')][_0xaf40('0x1a')]);_0x49d5ea['offset']=qs[_0xaf40('0x19')](_0x573463[_0xaf40('0x29')][_0xaf40('0x19')]);}return _0x2f4474['getContacts'](_0x49d5ea);}})[_0xaf40('0x1e')](function(_0x124e63){if(_0x124e63){return _0x124e63?{'count':_0xd30bc2,'rows':_0x124e63}:null;}})[_0xaf40('0x1e')](respondWithResult(_0xd2534c,null))['catch'](handleError(_0xd2534c,null));};
\ No newline at end of file
+var _0x1f3a=['lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','sendStatus','status','end','json','count','offset','set','apply','reject','then','destroy','get','Companies','stack','name','send','index','CmCompany','describe','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','filter','merge','map','options','includeAll','include','rows','catch','show','params','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','addContacts','CmContact','ids','omit','getContacts','findOne','pick','html-pdf','eml-format','zip-dir','fast-json-patch','mustache','util','sox'];(function(_0x5e8981,_0x5ad60b){var _0x5a65ab=function(_0x328645){while(--_0x328645){_0x5e8981['push'](_0x5e8981['shift']());}};_0x5a65ab(++_0x5ad60b);}(_0x1f3a,0x18e));var _0xa1f3=function(_0x40f2e9,_0x2875cb){_0x40f2e9=_0x40f2e9-0x0;var _0x5ae775=_0x1f3a[_0x40f2e9];return _0x5ae775;};'use strict';var pdf=require(_0xa1f3('0x0'));var emlformat=require(_0xa1f3('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xa1f3('0x2'));var jsonpatch=require(_0xa1f3('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xa1f3('0x4'));var util=require(_0xa1f3('0x5'));var path=require('path');var sox=require(_0xa1f3('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xa1f3('0x7'));var squel=require(_0xa1f3('0x8'));var crypto=require(_0xa1f3('0x9'));var jsforce=require(_0xa1f3('0xa'));var deskjs=require(_0xa1f3('0xb'));var toCsv=require(_0xa1f3('0xc'));var querystring=require(_0xa1f3('0xd'));var Papa=require(_0xa1f3('0xe'));var Redis=require(_0xa1f3('0xf'));var authService=require(_0xa1f3('0x10'));var qs=require(_0xa1f3('0x11'));var as=require(_0xa1f3('0x12'));var hardwareService=require(_0xa1f3('0x13'));var logger=require(_0xa1f3('0x14'))('api');var utils=require(_0xa1f3('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x14bde3,_0x524988){_0x524988=_0x524988||0xcc;return function(_0x36fa57){if(_0x36fa57){return _0x14bde3[_0xa1f3('0x16')](_0x524988);}return _0x14bde3[_0xa1f3('0x17')](_0x524988)[_0xa1f3('0x18')]();};}function respondWithResult(_0x9cec13,_0x3f44d6){_0x3f44d6=_0x3f44d6||0xc8;return function(_0x3c8348){if(_0x3c8348){return _0x9cec13[_0xa1f3('0x17')](_0x3f44d6)[_0xa1f3('0x19')](_0x3c8348);}};}function respondWithFilteredResult(_0x2c4faa,_0x31c13c){return function(_0x3a152a){if(_0x3a152a){var _0x1471e9=_0x3a152a[_0xa1f3('0x1a')],_0x73f58a=_0x31c13c['offset'],_0x2c24f7=_0x31c13c[_0xa1f3('0x1b')]+_0x31c13c['limit'],_0x127e82;if(_0x2c24f7>=_0x1471e9){_0x2c24f7=_0x1471e9;_0x127e82=0xc8;}else{_0x127e82=0xce;}_0x2c4faa[_0xa1f3('0x17')](_0x127e82);return _0x2c4faa[_0xa1f3('0x1c')]('Content-Range',_0x73f58a+'-'+_0x2c24f7+'/'+_0x1471e9)[_0xa1f3('0x19')](_0x3a152a);}return null;};}function patchUpdates(_0x424def){return function(_0xd280bc){try{jsonpatch[_0xa1f3('0x1d')](_0xd280bc,_0x424def,!![]);}catch(_0x33f6b8){return BPromise[_0xa1f3('0x1e')](_0x33f6b8);}return _0xd280bc['save']();};}function saveUpdates(_0x223281,_0x2f22eb){return function(_0x41a0d5){if(_0x41a0d5){return _0x41a0d5['update'](_0x223281)[_0xa1f3('0x1f')](function(_0x396d39){return _0x396d39;});}return null;};}function removeEntity(_0x3845fc,_0x428f8b){return function(_0x4d303a){if(_0x4d303a){return _0x4d303a[_0xa1f3('0x20')]()['then'](function(){var _0x592d6f=_0x4d303a[_0xa1f3('0x21')]({'plain':!![]});var _0x243cf6=_0xa1f3('0x22');return db['UserProfileResource']['destroy']({'where':{'type':_0x243cf6,'resourceId':_0x592d6f['id']}})['then'](function(){return _0x4d303a;});})[_0xa1f3('0x1f')](function(){_0x3845fc[_0xa1f3('0x17')](0xcc)[_0xa1f3('0x18')]();});}};}function handleEntityNotFound(_0x144b0d,_0xdb62fb){return function(_0x3671bc){if(!_0x3671bc){_0x144b0d[_0xa1f3('0x16')](0x194);}return _0x3671bc;};}function handleError(_0x462ce0,_0x5cee87){_0x5cee87=_0x5cee87||0x1f4;return function(_0x125a1b){logger['error'](_0x125a1b[_0xa1f3('0x23')]);if(_0x125a1b[_0xa1f3('0x24')]){delete _0x125a1b[_0xa1f3('0x24')];}_0x462ce0['status'](_0x5cee87)[_0xa1f3('0x25')](_0x125a1b);};}exports[_0xa1f3('0x26')]=function(_0x39ea2a,_0x1c54d4){var _0x49df62={},_0x3983b4={},_0x4c61b9={'count':0x0,'rows':[]};return db[_0xa1f3('0x27')][_0xa1f3('0x28')]()[_0xa1f3('0x1f')](function(_0x4e436e){_0x3983b4[_0xa1f3('0x29')]=_['keys'](_0x4e436e);_0x3983b4['query']=_[_0xa1f3('0x2a')](_0x39ea2a[_0xa1f3('0x2b')]);_0x3983b4[_0xa1f3('0x2c')]=_[_0xa1f3('0x2d')](_0x3983b4[_0xa1f3('0x29')],_0x3983b4['query']);_0x49df62[_0xa1f3('0x2e')]=_[_0xa1f3('0x2d')](_0x3983b4[_0xa1f3('0x29')],qs[_0xa1f3('0x2f')](_0x39ea2a[_0xa1f3('0x2b')]['fields']));_0x49df62[_0xa1f3('0x2e')]=_0x49df62['attributes'][_0xa1f3('0x30')]?_0x49df62[_0xa1f3('0x2e')]:_0x3983b4[_0xa1f3('0x29')];if(!_0x39ea2a[_0xa1f3('0x2b')][_0xa1f3('0x31')]('nolimit')){_0x49df62[_0xa1f3('0x32')]=qs[_0xa1f3('0x32')](_0x39ea2a['query'][_0xa1f3('0x32')]);_0x49df62[_0xa1f3('0x1b')]=qs['offset'](_0x39ea2a['query'][_0xa1f3('0x1b')]);}_0x49df62[_0xa1f3('0x33')]=qs['sort'](_0x39ea2a[_0xa1f3('0x2b')][_0xa1f3('0x34')]);_0x49df62[_0xa1f3('0x35')]=qs[_0xa1f3('0x2c')](_['pick'](_0x39ea2a['query'],_0x3983b4[_0xa1f3('0x2c')]));if(_0x39ea2a['query'][_0xa1f3('0x36')]){_0x49df62[_0xa1f3('0x35')]=_[_0xa1f3('0x37')](_0x49df62[_0xa1f3('0x35')],{'$or':_[_0xa1f3('0x38')](_0x49df62[_0xa1f3('0x2e')],function(_0x3e019c){var _0x4c145a={};_0x4c145a[_0x3e019c]={'$like':'%'+_0x39ea2a[_0xa1f3('0x2b')][_0xa1f3('0x36')]+'%'};return _0x4c145a;})});}_0x49df62=_[_0xa1f3('0x37')]({},_0x49df62,_0x39ea2a[_0xa1f3('0x39')]);var _0x9b79dd={'where':_0x49df62[_0xa1f3('0x35')]};return db['CmCompany']['count'](_0x9b79dd)['then'](function(_0x5d469e){_0x4c61b9[_0xa1f3('0x1a')]=_0x5d469e;if(_0x39ea2a[_0xa1f3('0x2b')][_0xa1f3('0x3a')]){_0x49df62[_0xa1f3('0x3b')]=[{'all':!![]}];}return db[_0xa1f3('0x27')]['findAll'](_0x49df62);})['then'](function(_0x116582){_0x4c61b9[_0xa1f3('0x3c')]=_0x116582;return _0x4c61b9;})['then'](respondWithFilteredResult(_0x1c54d4,_0x49df62))[_0xa1f3('0x3d')](handleError(_0x1c54d4,null));})[_0xa1f3('0x3d')](handleError(_0x1c54d4,null));};exports[_0xa1f3('0x3e')]=function(_0x313a98,_0x40b2c8){var _0x459e01={'raw':![],'where':{'id':_0x313a98[_0xa1f3('0x3f')]['id']}},_0x376b00={};_0x376b00[_0xa1f3('0x29')]=_['keys'](db['CmCompany'][_0xa1f3('0x40')]);_0x376b00[_0xa1f3('0x2b')]=_[_0xa1f3('0x2a')](_0x313a98[_0xa1f3('0x2b')]);_0x376b00['filters']=_[_0xa1f3('0x2d')](_0x376b00[_0xa1f3('0x29')],_0x376b00[_0xa1f3('0x2b')]);_0x459e01[_0xa1f3('0x2e')]=_['intersection'](_0x376b00[_0xa1f3('0x29')],qs[_0xa1f3('0x2f')](_0x313a98['query']['fields']));_0x459e01[_0xa1f3('0x2e')]=_0x459e01[_0xa1f3('0x2e')][_0xa1f3('0x30')]?_0x459e01['attributes']:_0x376b00[_0xa1f3('0x29')];if(_0x313a98[_0xa1f3('0x2b')][_0xa1f3('0x3a')]){_0x459e01[_0xa1f3('0x3b')]=[{'all':!![]}];}_0x459e01=_[_0xa1f3('0x37')]({},_0x459e01,_0x313a98[_0xa1f3('0x39')]);return db['CmCompany'][_0xa1f3('0x41')](_0x459e01)[_0xa1f3('0x1f')](handleEntityNotFound(_0x40b2c8,null))[_0xa1f3('0x1f')](respondWithResult(_0x40b2c8,null))['catch'](handleError(_0x40b2c8,null));};exports[_0xa1f3('0x42')]=function(_0x3ab7c9,_0x3520ea){return db[_0xa1f3('0x27')][_0xa1f3('0x42')](_0x3ab7c9[_0xa1f3('0x43')],{})[_0xa1f3('0x1f')](function(_0x406a4d){var _0x55c0bd=_0x3ab7c9[_0xa1f3('0x44')][_0xa1f3('0x21')]({'plain':!![]});if(!_0x55c0bd)throw new Error(_0xa1f3('0x45'));if(_0x55c0bd['role']===_0xa1f3('0x44')){var _0x49ef64=_0x406a4d[_0xa1f3('0x21')]({'plain':!![]});var _0x16259a=_0xa1f3('0x22');return db['UserProfileSection'][_0xa1f3('0x41')]({'where':{'name':_0x16259a,'userProfileId':_0x55c0bd['userProfileId']},'raw':!![]})[_0xa1f3('0x1f')](function(_0x26db67){if(_0x26db67&&_0x26db67[_0xa1f3('0x46')]===0x0){return db['UserProfileResource'][_0xa1f3('0x42')]({'name':_0x49ef64[_0xa1f3('0x24')],'resourceId':_0x49ef64['id'],'type':_0x26db67['name'],'sectionId':_0x26db67['id']},{})[_0xa1f3('0x1f')](function(){return _0x406a4d;});}else{return _0x406a4d;}})['catch'](function(_0x45fa95){logger[_0xa1f3('0x47')](_0xa1f3('0x48'),_0x45fa95);throw _0x45fa95;});}return _0x406a4d;})[_0xa1f3('0x1f')](respondWithResult(_0x3520ea,0xc9))[_0xa1f3('0x3d')](handleError(_0x3520ea,null));};exports[_0xa1f3('0x49')]=function(_0x4212c9,_0x35e5ca){if(_0x4212c9['body']['id']){delete _0x4212c9[_0xa1f3('0x43')]['id'];}return db['CmCompany'][_0xa1f3('0x41')]({'where':{'id':_0x4212c9[_0xa1f3('0x3f')]['id']}})['then'](handleEntityNotFound(_0x35e5ca,null))['then'](saveUpdates(_0x4212c9[_0xa1f3('0x43')],null))['then'](respondWithResult(_0x35e5ca,null))[_0xa1f3('0x3d')](handleError(_0x35e5ca,null));};exports[_0xa1f3('0x20')]=function(_0x30c41f,_0x3868a1){return db['CmCompany'][_0xa1f3('0x41')]({'where':{'id':_0x30c41f[_0xa1f3('0x3f')]['id']}})[_0xa1f3('0x1f')](handleEntityNotFound(_0x3868a1,null))[_0xa1f3('0x1f')](removeEntity(_0x3868a1,null))[_0xa1f3('0x3d')](handleError(_0x3868a1,null));};exports[_0xa1f3('0x28')]=function(_0xde0bf8,_0x58027d){return db[_0xa1f3('0x27')][_0xa1f3('0x28')]()['then'](respondWithResult(_0x58027d,null))[_0xa1f3('0x3d')](handleError(_0x58027d,null));};exports[_0xa1f3('0x4a')]=function(_0x53997c,_0x1b6214,_0xbd92f0){return db[_0xa1f3('0x4b')][_0xa1f3('0x41')]({'where':{'id':_0x53997c[_0xa1f3('0x3f')]['id']}})[_0xa1f3('0x1f')](handleEntityNotFound(_0x1b6214,null))[_0xa1f3('0x1f')](function(_0x30ea26){if(_0x30ea26){return _0x30ea26[_0xa1f3('0x4a')](_0x53997c[_0xa1f3('0x43')][_0xa1f3('0x4c')],_[_0xa1f3('0x4d')](_0x53997c[_0xa1f3('0x43')],['ids','id'])||{});}})['then'](respondWithResult(_0x1b6214,null))[_0xa1f3('0x3d')](handleError(_0x1b6214,null));};exports[_0xa1f3('0x4e')]=function(_0x37d4b9,_0x19c229,_0x5ab233){var _0x4c8149={};var _0x3c09f2={};var _0x59e4a4;var _0x1c0e88;return db[_0xa1f3('0x27')][_0xa1f3('0x4f')]({'where':{'id':_0x37d4b9['params']['id']}})[_0xa1f3('0x1f')](handleEntityNotFound(_0x19c229,null))[_0xa1f3('0x1f')](function(_0x111e28){if(_0x111e28){_0x59e4a4=_0x111e28;_0x3c09f2[_0xa1f3('0x29')]=_['keys'](db[_0xa1f3('0x4b')]['rawAttributes']);_0x3c09f2[_0xa1f3('0x2b')]=_[_0xa1f3('0x2a')](_0x37d4b9[_0xa1f3('0x2b')]);_0x3c09f2[_0xa1f3('0x2c')]=_[_0xa1f3('0x2d')](_0x3c09f2[_0xa1f3('0x29')],_0x3c09f2[_0xa1f3('0x2b')]);_0x4c8149[_0xa1f3('0x2e')]=_[_0xa1f3('0x2d')](_0x3c09f2[_0xa1f3('0x29')],qs['fields'](_0x37d4b9[_0xa1f3('0x2b')][_0xa1f3('0x2f')]));_0x4c8149[_0xa1f3('0x2e')]=_0x4c8149[_0xa1f3('0x2e')][_0xa1f3('0x30')]?_0x4c8149[_0xa1f3('0x2e')]:_0x3c09f2[_0xa1f3('0x29')];_0x4c8149[_0xa1f3('0x33')]=qs[_0xa1f3('0x34')](_0x37d4b9[_0xa1f3('0x2b')][_0xa1f3('0x34')]);_0x4c8149[_0xa1f3('0x35')]=qs[_0xa1f3('0x2c')](_[_0xa1f3('0x50')](_0x37d4b9[_0xa1f3('0x2b')],_0x3c09f2[_0xa1f3('0x2c')]));if(_0x37d4b9[_0xa1f3('0x2b')][_0xa1f3('0x36')]){_0x4c8149[_0xa1f3('0x35')]=_[_0xa1f3('0x37')](_0x4c8149['where'],{'$or':_['map'](_0x4c8149[_0xa1f3('0x2e')],function(_0x3b5ccb){var _0x199b5f={};_0x199b5f[_0x3b5ccb]={'$like':'%'+_0x37d4b9['query'][_0xa1f3('0x36')]+'%'};return _0x199b5f;})});}_0x4c8149=_[_0xa1f3('0x37')]({},_0x4c8149,_0x37d4b9['options']);return _0x59e4a4[_0xa1f3('0x4e')](_0x4c8149);}})[_0xa1f3('0x1f')](function(_0x1399ef){if(_0x1399ef){_0x1c0e88=_0x1399ef['length'];if(!_0x37d4b9['query']['hasOwnProperty']('nolimit')){_0x4c8149['limit']=qs[_0xa1f3('0x32')](_0x37d4b9[_0xa1f3('0x2b')][_0xa1f3('0x32')]);_0x4c8149['offset']=qs[_0xa1f3('0x1b')](_0x37d4b9[_0xa1f3('0x2b')]['offset']);}return _0x59e4a4[_0xa1f3('0x4e')](_0x4c8149);}})['then'](function(_0x903eb0){if(_0x903eb0){return _0x903eb0?{'count':_0x1c0e88,'rows':_0x903eb0}:null;}})[_0xa1f3('0x1f')](respondWithResult(_0x19c229,null))[_0xa1f3('0x3d')](handleError(_0x19c229,null));};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js
index 32be6a2..bf913f9 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 _0x3ee5=['rimraf','../../config/environment','./cmCompany.attributes','exports','define','cm_companies','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x3ee5,0x1b6));var _0x53ee=function(_0x553226,_0x38d42c){_0x553226=_0x553226-0x0;var _0x5c9cd2=_0x3ee5[_0x553226];return _0x5c9cd2;};'use strict';var _=require('lodash');var util=require(_0x53ee('0x0'));var logger=require(_0x53ee('0x1'))('api');var moment=require(_0x53ee('0x2'));var BPromise=require(_0x53ee('0x3'));var rp=require(_0x53ee('0x4'));var fs=require('fs');var path=require(_0x53ee('0x5'));var rimraf=require(_0x53ee('0x6'));var config=require(_0x53ee('0x7'));var attributes=require(_0x53ee('0x8'));module[_0x53ee('0x9')]=function(_0x343bbb,_0x16ad68){return _0x343bbb[_0x53ee('0xa')]('CmCompany',attributes,{'tableName':_0x53ee('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8d0e=['define','CmCompany','cm_companies','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./cmCompany.attributes'];(function(_0xa92013,_0x3b2577){var _0x49fdfa=function(_0x4b88a6){while(--_0x4b88a6){_0xa92013['push'](_0xa92013['shift']());}};_0x49fdfa(++_0x3b2577);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x15f98d,_0x2123a9){_0x15f98d=_0x15f98d-0x0;var _0x4aa8dc=_0x8d0e[_0x15f98d];return _0x4aa8dc;};'use strict';var _=require(_0xe8d0('0x0'));var util=require(_0xe8d0('0x1'));var logger=require(_0xe8d0('0x2'))(_0xe8d0('0x3'));var moment=require(_0xe8d0('0x4'));var BPromise=require(_0xe8d0('0x5'));var rp=require(_0xe8d0('0x6'));var fs=require('fs');var path=require(_0xe8d0('0x7'));var rimraf=require(_0xe8d0('0x8'));var config=require('../../config/environment');var attributes=require(_0xe8d0('0x9'));module['exports']=function(_0x560dab,_0x2e2985){return _0x560dab[_0xe8d0('0xa')](_0xe8d0('0xb'),attributes,{'tableName':_0xe8d0('0xc'),'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 bc0ca91..326bb5f 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 _0x67b1=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','CmCompany,\x20%s,\x20%s','debug','CmCompany,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis'];(function(_0x585dbb,_0x14ab65){var _0x52bb6d=function(_0x5bbd51){while(--_0x5bbd51){_0x585dbb['push'](_0x585dbb['shift']());}};_0x52bb6d(++_0x14ab65);}(_0x67b1,0x85));var _0x167b=function(_0xa9a245,_0x2a0387){_0xa9a245=_0xa9a245-0x0;var _0x2d0eaa=_0x67b1[_0xa9a245];return _0x2d0eaa;};'use strict';var _=require(_0x167b('0x0'));var util=require(_0x167b('0x1'));var moment=require('moment');var BPromise=require(_0x167b('0x2'));var rs=require(_0x167b('0x3'));var fs=require('fs');var Redis=require(_0x167b('0x4'));var db=require(_0x167b('0x5'))['db'];var utils=require(_0x167b('0x6'));var logger=require(_0x167b('0x7'))(_0x167b('0x8'));var config=require(_0x167b('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x167b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x9b7248,_0x18dbb6,_0x13c1c0){return new BPromise(function(_0x2b4222,_0x18463a){return client[_0x167b('0xb')](_0x9b7248,_0x13c1c0)[_0x167b('0xc')](function(_0xa598c4){logger[_0x167b('0xd')](_0x167b('0xe'),_0x18dbb6,'request\x20sent');logger[_0x167b('0xf')](_0x167b('0x10'),_0x18dbb6,_0x167b('0x11'),JSON['stringify'](_0xa598c4));if(_0xa598c4[_0x167b('0x12')]){if(_0xa598c4['error'][_0x167b('0x13')]===0x1f4){logger[_0x167b('0x12')](_0x167b('0xe'),_0x18dbb6,_0xa598c4[_0x167b('0x12')][_0x167b('0x14')]);return _0x18463a(_0xa598c4[_0x167b('0x12')][_0x167b('0x14')]);}logger[_0x167b('0x12')]('CmCompany,\x20%s,\x20%s',_0x18dbb6,_0xa598c4[_0x167b('0x12')][_0x167b('0x14')]);return _0x2b4222(_0xa598c4[_0x167b('0x12')]['message']);}else{logger[_0x167b('0xd')](_0x167b('0xe'),_0x18dbb6,'request\x20sent');_0x2b4222(_0xa598c4[_0x167b('0x15')][_0x167b('0x14')]);}})[_0x167b('0x16')](function(_0x2bb4f4){logger['error'](_0x167b('0xe'),_0x18dbb6,_0x2bb4f4);_0x18463a(_0x2bb4f4);});});}
\ No newline at end of file
+var _0xfe64=['../../config/logger','rpc','jayson/promise','client','request','CmCompany,\x20%s,\x20%s','debug','CmCompany,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','moment','randomstring','ioredis'];(function(_0x3b8fa6,_0x50570e){var _0xed1d0a=function(_0x3c90f6){while(--_0x3c90f6){_0x3b8fa6['push'](_0x3b8fa6['shift']());}};_0xed1d0a(++_0x50570e);}(_0xfe64,0x88));var _0x4fe6=function(_0xc7664a,_0x5ee2b4){_0xc7664a=_0xc7664a-0x0;var _0x1da165=_0xfe64[_0xc7664a];return _0x1da165;};'use strict';var _=require(_0x4fe6('0x0'));var util=require('util');var moment=require(_0x4fe6('0x1'));var BPromise=require('bluebird');var rs=require(_0x4fe6('0x2'));var fs=require('fs');var Redis=require(_0x4fe6('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x4fe6('0x4'))(_0x4fe6('0x5'));var config=require('../../config/environment');var jayson=require(_0x4fe6('0x6'));var client=jayson[_0x4fe6('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x23af33,_0x18453e,_0x2c3879){return new BPromise(function(_0x3e4b9c,_0x54b89b){return client[_0x4fe6('0x8')](_0x23af33,_0x2c3879)['then'](function(_0x34853c){logger['info'](_0x4fe6('0x9'),_0x18453e,'request\x20sent');logger[_0x4fe6('0xa')](_0x4fe6('0xb'),_0x18453e,_0x4fe6('0xc'),JSON[_0x4fe6('0xd')](_0x34853c));if(_0x34853c['error']){if(_0x34853c[_0x4fe6('0xe')][_0x4fe6('0xf')]===0x1f4){logger[_0x4fe6('0xe')](_0x4fe6('0x9'),_0x18453e,_0x34853c[_0x4fe6('0xe')]['message']);return _0x54b89b(_0x34853c[_0x4fe6('0xe')][_0x4fe6('0x10')]);}logger[_0x4fe6('0xe')]('CmCompany,\x20%s,\x20%s',_0x18453e,_0x34853c[_0x4fe6('0xe')][_0x4fe6('0x10')]);return _0x3e4b9c(_0x34853c[_0x4fe6('0xe')][_0x4fe6('0x10')]);}else{logger[_0x4fe6('0x11')]('CmCompany,\x20%s,\x20%s',_0x18453e,_0x4fe6('0xc'));_0x3e4b9c(_0x34853c[_0x4fe6('0x12')][_0x4fe6('0x10')]);}})[_0x4fe6('0x13')](function(_0x54839b){logger[_0x4fe6('0xe')]('CmCompany,\x20%s,\x20%s',_0x18453e,_0x54839b);_0x54b89b(_0x54839b);});});}
\ No newline at end of file
diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js
index 0419ad4..4c91489 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 _0x6d11=['/:id','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','show','/:id/contacts','post','create','addContacts','put','update','delete'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x6d11,0xbf));var _0x16d1=function(_0x76faa4,_0x4a8b9c){_0x76faa4=_0x76faa4-0x0;var _0x5cab58=_0x6d11[_0x76faa4];return _0x5cab58;};'use strict';var multer=require(_0x16d1('0x0'));var util=require(_0x16d1('0x1'));var path=require(_0x16d1('0x2'));var timeout=require('connect-timeout');var express=require(_0x16d1('0x3'));var router=express['Router']();var auth=require(_0x16d1('0x4'));var interaction=require(_0x16d1('0x5'));var config=require('../../config/environment');var controller=require('./cmCompany.controller');router[_0x16d1('0x6')]('/',auth[_0x16d1('0x7')](),controller[_0x16d1('0x8')]);router[_0x16d1('0x6')](_0x16d1('0x9'),auth[_0x16d1('0x7')](),controller[_0x16d1('0xa')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x16d1('0xb')]);router[_0x16d1('0x6')](_0x16d1('0xc'),auth[_0x16d1('0x7')](),controller['getContacts']);router[_0x16d1('0xd')]('/',auth[_0x16d1('0x7')](),controller[_0x16d1('0xe')]);router[_0x16d1('0xd')](_0x16d1('0xc'),auth[_0x16d1('0x7')](),controller[_0x16d1('0xf')]);router[_0x16d1('0x10')]('/:id',auth[_0x16d1('0x7')](),controller[_0x16d1('0x11')]);router[_0x16d1('0x12')](_0x16d1('0x13'),auth[_0x16d1('0x7')](),controller['destroy']);module[_0x16d1('0x14')]=router;
\ No newline at end of file
+var _0xa456=['update','delete','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./cmCompany.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/contacts','getContacts','post'];(function(_0x292dcf,_0x459f1a){var _0x1b4ee6=function(_0x33dc1d){while(--_0x33dc1d){_0x292dcf['push'](_0x292dcf['shift']());}};_0x1b4ee6(++_0x459f1a);}(_0xa456,0x142));var _0x6a45=function(_0x36eaaa,_0x326732){_0x36eaaa=_0x36eaaa-0x0;var _0x461349=_0xa456[_0x36eaaa];return _0x461349;};'use strict';var multer=require(_0x6a45('0x0'));var util=require(_0x6a45('0x1'));var path=require(_0x6a45('0x2'));var timeout=require(_0x6a45('0x3'));var express=require('express');var router=express[_0x6a45('0x4')]();var auth=require(_0x6a45('0x5'));var interaction=require(_0x6a45('0x6'));var config=require('../../config/environment');var controller=require(_0x6a45('0x7'));router[_0x6a45('0x8')]('/',auth[_0x6a45('0x9')](),controller[_0x6a45('0xa')]);router['get'](_0x6a45('0xb'),auth[_0x6a45('0x9')](),controller[_0x6a45('0xc')]);router[_0x6a45('0x8')](_0x6a45('0xd'),auth['isAuthenticated'](),controller[_0x6a45('0xe')]);router['get'](_0x6a45('0xf'),auth[_0x6a45('0x9')](),controller[_0x6a45('0x10')]);router[_0x6a45('0x11')]('/',auth[_0x6a45('0x9')](),controller['create']);router['post'](_0x6a45('0xf'),auth[_0x6a45('0x9')](),controller['addContacts']);router['put']('/:id',auth[_0x6a45('0x9')](),controller[_0x6a45('0x12')]);router[_0x6a45('0x13')](_0x6a45('0xd'),auth[_0x6a45('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js
index 4e068f5..e1bcccd 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 _0x2fbe=['NOW','lodash','sequelize','STRING','INTEGER','DATE'];(function(_0x39acf0,_0x1d1829){var _0x108857=function(_0xdd7c81){while(--_0xdd7c81){_0x39acf0['push'](_0x39acf0['shift']());}};_0x108857(++_0x1d1829);}(_0x2fbe,0x187));var _0xe2fb=function(_0x449098,_0x351ae){_0x449098=_0x449098-0x0;var _0x3e0f53=_0x2fbe[_0x449098];return _0x3e0f53;};'use strict';var _=require(_0xe2fb('0x0'));var Sequelize=require(_0xe2fb('0x1'));module['exports']={'firstName':{'type':Sequelize[_0xe2fb('0x2')],'allowNull':![]},'lastName':{'type':Sequelize[_0xe2fb('0x2')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0xe2fb('0x2')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize[_0xe2fb('0x2')]},'dateOfBirth':{'type':Sequelize[_0xe2fb('0x2')]},'description':{'type':Sequelize['TEXT']},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0xe2fb('0x2')]},'fax':{'type':Sequelize[_0xe2fb('0x2')]},'email':{'type':Sequelize[_0xe2fb('0x2')]},'url':{'type':Sequelize['STRING']},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize[_0xe2fb('0x2')]},'twitter':{'type':Sequelize['STRING']},'skype':{'type':Sequelize['STRING']},'teams':{'type':Sequelize[_0xe2fb('0x2')]},'viber':{'type':Sequelize['STRING']},'line':{'type':Sequelize['STRING']},'wechat':{'type':Sequelize['STRING']},'telegram':{'type':Sequelize[_0xe2fb('0x2')]},'UserId':{'type':Sequelize[_0xe2fb('0x3')]},'priority':{'type':Sequelize[_0xe2fb('0x3')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0xe2fb('0x4')],'defaultValue':Sequelize[_0xe2fb('0x5')]}};
\ No newline at end of file
+var _0xa9c8=['DATE','NOW','exports','STRING','INTEGER','UNSIGNED'];(function(_0x54b7fc,_0x5a8cb6){var _0x2195e7=function(_0x3dd717){while(--_0x3dd717){_0x54b7fc['push'](_0x54b7fc['shift']());}};_0x2195e7(++_0x5a8cb6);}(_0xa9c8,0x11c));var _0x8a9c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa9c8[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var Sequelize=require('sequelize');module[_0x8a9c('0x0')]={'firstName':{'type':Sequelize[_0x8a9c('0x1')],'allowNull':![]},'lastName':{'type':Sequelize[_0x8a9c('0x1')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0x8a9c('0x1')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize[_0x8a9c('0x1')]},'dateOfBirth':{'type':Sequelize[_0x8a9c('0x1')]},'description':{'type':Sequelize['TEXT']},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0x8a9c('0x1')]},'fax':{'type':Sequelize[_0x8a9c('0x1')]},'email':{'type':Sequelize[_0x8a9c('0x1')]},'url':{'type':Sequelize[_0x8a9c('0x1')]},'facebook':{'type':Sequelize[_0x8a9c('0x1')]},'fb_data':{'type':Sequelize[_0x8a9c('0x1')]},'twitter':{'type':Sequelize[_0x8a9c('0x1')]},'skype':{'type':Sequelize['STRING']},'teams':{'type':Sequelize[_0x8a9c('0x1')]},'viber':{'type':Sequelize[_0x8a9c('0x1')]},'line':{'type':Sequelize[_0x8a9c('0x1')]},'wechat':{'type':Sequelize[_0x8a9c('0x1')]},'telegram':{'type':Sequelize[_0x8a9c('0x1')]},'UserId':{'type':Sequelize[_0x8a9c('0x2')]},'priority':{'type':Sequelize[_0x8a9c('0x2')](0x2)[_0x8a9c('0x3')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x8a9c('0x4')],'defaultValue':Sequelize[_0x8a9c('0x5')]}};
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js
index 824890b..940ae53 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 _0x3fcf=['fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','upload','createReadStream','file','import','binding','firstName','stringify','message','start\x20child\x20process\x20correctly!','exit','pid','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','status','end','json','count','offset','apply','reject','save','then','destroy','error','name','send','CmContact','describe','keys','length','startsWith','cf_','push','CmCustomField','findOne','trimStart','all','fieldType','type','model','query','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','filters','pick','field','tools_tags','select','from','cm_contacts','left_join','cm_contact_has_tags','ct.CmContactId\x20=\x20c.id','t.id\x20=\x20ct.TagId','where','c.deletedAt\x20IS\x20NULL','expr','search','sqlOperator','conditions','Tag','value','split','forEach','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','and','dateOfBirth','datetime','castTo','start','map','isNil','Contact','isEmpty','ListId','concat','CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?','\x20=\x20?','tag','isArray','filter','replace','getFullTextValue','isNumeric','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','c.firstName\x20LIKE\x20?','group','c.id','Sequelize','SELECT','clone','resolve','user','c.ListId\x20IS\x20NULL','c.ListId\x20IN\x20?','sequelize','toString','keyBy','merge','c.lastName','c.phone','c.mobile','c.fax','c.email','c.ListId','c.deletedAt','TagIds','Tags','rows','catch','find','params','columnName','displayName','findAll','alias','custom','values','body','get','mergeWith','tags','join','[CmContact][merge]\x20to\x20%s\x20from\x20%s','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatInteraction','update','ChatMessage','ChatOfflineMessage','MailMessage','MailInteraction','SmsInteraction','SmsMessage','FaxMessage','OpenchannelInteraction','OpenchannelMessage','ReportAgentPreview','VoiceCallReport','ChatQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','bulkCreate','duplicates','findOrCreate','spread','show','color','omit','format','cf_%d','$and','table','setFields','id\x20=\x20?','toParam','text','phone','CmHopper','rawAttributes','options','getTags','setTags','ids','getHoppers','ContactId','includeAll','include','getHopperHistories','CmHopperHistory','getHopperFinals','CmHopperFinal','getJscriptySessions','binding_keys','No\x20association\x20keys\x20specified!','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','zipObject','No\x20phone\x20column\x20specified','No\x20firstName\x20column\x20specified','root','chmodSync','0777'];(function(_0xb0f7c3,_0x4eae95){var _0x28ea68=function(_0x4395a7){while(--_0x4395a7){_0xb0f7c3['push'](_0xb0f7c3['shift']());}};_0x28ea68(++_0x4eae95);}(_0x3fcf,0x1e7));var _0xf3fc=function(_0x92d59d,_0x3575d6){_0x92d59d=_0x92d59d-0x0;var _0x2e38fc=_0x3fcf[_0x92d59d];return _0x2e38fc;};'use strict';var pdf=require(_0xf3fc('0x0'));var emlformat=require(_0xf3fc('0x1'));var rimraf=require(_0xf3fc('0x2'));var zipdir=require(_0xf3fc('0x3'));var jsonpatch=require(_0xf3fc('0x4'));var rp=require(_0xf3fc('0x5'));var moment=require(_0xf3fc('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xf3fc('0x7'));var util=require(_0xf3fc('0x8'));var path=require(_0xf3fc('0x9'));var sox=require(_0xf3fc('0xa'));var csv=require('to-csv');var ejs=require(_0xf3fc('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0xf3fc('0xc'));var crypto=require(_0xf3fc('0xd'));var jsforce=require(_0xf3fc('0xe'));var deskjs=require(_0xf3fc('0xf'));var toCsv=require(_0xf3fc('0x10'));var querystring=require(_0xf3fc('0x11'));var Papa=require(_0xf3fc('0x12'));var Redis=require(_0xf3fc('0x13'));var authService=require(_0xf3fc('0x14'));var qs=require(_0xf3fc('0x15'));var as=require(_0xf3fc('0x16'));var hardwareService=require(_0xf3fc('0x17'));var logger=require(_0xf3fc('0x18'))(_0xf3fc('0x19'));var utils=require(_0xf3fc('0x1a'));var config=require('../../config/environment');var db=require(_0xf3fc('0x1b'))['db'];config[_0xf3fc('0x1c')]=_[_0xf3fc('0x1d')](config['redis'],{'host':_0xf3fc('0x1e'),'port':0x18eb});var socket=require(_0xf3fc('0x1f'))(new Redis(config[_0xf3fc('0x1c')]));require('./cmContact.socket')[_0xf3fc('0x20')](socket);function respondWithStatusCode(_0x186d6,_0x229975){_0x229975=_0x229975||0xcc;return function(_0x41a4a7){if(_0x41a4a7){return _0x186d6['sendStatus'](_0x229975);}return _0x186d6[_0xf3fc('0x21')](_0x229975)[_0xf3fc('0x22')]();};}function respondWithResult(_0x1ad400,_0x542642){_0x542642=_0x542642||0xc8;return function(_0x3de139){if(_0x3de139){return _0x1ad400[_0xf3fc('0x21')](_0x542642)[_0xf3fc('0x23')](_0x3de139);}};}function respondWithFilteredResult(_0x55b7a4,_0x55d901){return function(_0xb870f6){if(_0xb870f6){var _0x52da73=_0xb870f6[_0xf3fc('0x24')],_0x2d75fb=_0x55d901[_0xf3fc('0x25')],_0x4e1cc6=_0x55d901['offset']+_0x55d901['limit'],_0x2cf918;if(_0x4e1cc6>=_0x52da73){_0x4e1cc6=_0x52da73;_0x2cf918=0xc8;}else{_0x2cf918=0xce;}_0x55b7a4[_0xf3fc('0x21')](_0x2cf918);return _0x55b7a4['set']('Content-Range',_0x2d75fb+'-'+_0x4e1cc6+'/'+_0x52da73)[_0xf3fc('0x23')](_0xb870f6);}return null;};}function patchUpdates(_0x53aa0a){return function(_0x3c51bf){try{jsonpatch[_0xf3fc('0x26')](_0x3c51bf,_0x53aa0a,!![]);}catch(_0x3b87c3){return BPromise[_0xf3fc('0x27')](_0x3b87c3);}return _0x3c51bf[_0xf3fc('0x28')]();};}function saveUpdates(_0x3d9af7,_0x399161){return function(_0x29cc42){if(_0x29cc42){return _0x29cc42['update'](_0x3d9af7)[_0xf3fc('0x29')](function(_0x5cffaa){return _0x5cffaa;});}return null;};}function removeEntity(_0x53c392,_0x4f154a){return function(_0x3504b6){if(_0x3504b6){return _0x3504b6[_0xf3fc('0x2a')]()[_0xf3fc('0x29')](function(){_0x53c392['status'](0xcc)[_0xf3fc('0x22')]();});}};}function handleEntityNotFound(_0x1ac4ea,_0x500bfc){return function(_0x1c5c48){if(!_0x1c5c48){_0x1ac4ea['sendStatus'](0x194);}return _0x1c5c48;};}function handleError(_0x1ac515,_0x29fe2b){_0x29fe2b=_0x29fe2b||0x1f4;return function(_0x15c148){logger[_0xf3fc('0x2b')](_0x15c148['stack']);if(_0x15c148[_0xf3fc('0x2c')]){delete _0x15c148[_0xf3fc('0x2c')];}_0x1ac515[_0xf3fc('0x21')](_0x29fe2b)[_0xf3fc('0x2d')](_0x15c148);};}exports['index']=function(_0x4ff37f,_0x42a21d){var _0x1917f9={},_0x5d61f0={},_0x49ce59={'count':0x0,'rows':[]};return db[_0xf3fc('0x2e')][_0xf3fc('0x2f')]()[_0xf3fc('0x29')](function(_0x284b27){var _0x4446b9=[];for(var _0x7f436e=0x0;_0x7f436e0x1){_0x59bc28['or']('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xf3fc('0x6e')](_0x3585da),null);}else{if(qs[_0xf3fc('0x6f')](_0x3585da)){_0x59bc28['or'](_0xf3fc('0x70'),_0x3585da+'%');_0x59bc28['or'](_0xf3fc('0x71'),_0x3585da+'%');_0x59bc28['or'](_0xf3fc('0x72'),_0x3585da+'%');_0x59bc28['or']('c.fax\x20LIKE\x20?',_0x3585da+'%');}else if(qs[_0xf3fc('0x73')](_0x3585da)){_0x59bc28['or'](_0xf3fc('0x74'),_0x3585da+'%');}else{_0x59bc28['or'](_0xf3fc('0x75'),'%'+_0x3585da+'%');_0x59bc28['or']('c.lastName\x20LIKE\x20?','%'+_0x3585da+'%');_0x59bc28['or'](_0xf3fc('0x74'),'%'+_0x3585da+'%');}}}}_0x523834['where'](_0x59bc28);_0x523834[_0xf3fc('0x76')](_0xf3fc('0x77'));var _0x4ab93e={'type':db[_0xf3fc('0x78')]['QueryTypes'][_0xf3fc('0x79')],'raw':!![]};var _0x220fb1=_0x523834[_0xf3fc('0x7a')]()['field'](_0xf3fc('0x77'));if(_0x1917f9[_0xf3fc('0x43')]){_0x1917f9['order']['forEach'](function(_0x532674){_0x523834[_0xf3fc('0x43')]('c.'+_0x532674[0x0],_0x532674[0x1]==='DESC'?![]:!![]);});}if(!_['isEmpty'](_0x16c829)){_0x523834['having'](_0x1e4879);_0x220fb1[_0xf3fc('0x50')]('t.id\x20IN\x20?',_0x16c829);}BPromise[_0xf3fc('0x7b')]()[_0xf3fc('0x29')](function(){if(_0x472898&&!_['some'](_0x472898[_0xf3fc('0x55')],[_0xf3fc('0x47'),_0xf3fc('0x5c')])){return _0x4ff37f[_0xf3fc('0x7c')]['getLists']({'attributes':['id'],'raw':!![]})['then'](function(_0x3d355b){if(_['isEmpty'](_0x3d355b)){_0x220fb1[_0xf3fc('0x50')](_0xf3fc('0x7d'));_0x523834[_0xf3fc('0x50')](_0xf3fc('0x7d'));}else{_0x220fb1[_0xf3fc('0x50')](_0xf3fc('0x7e'),_['map'](_0x3d355b,'id'));_0x523834[_0xf3fc('0x50')](_0xf3fc('0x7e'),_[_0xf3fc('0x62')](_0x3d355b,'id'));}});}else{return;}})[_0xf3fc('0x29')](function(){db[_0xf3fc('0x7f')][_0xf3fc('0x3c')](_0x220fb1[_0xf3fc('0x80')](),_0x4ab93e)[_0xf3fc('0x29')](function(_0x333d2e){_0x49ce59[_0xf3fc('0x24')]=_0x333d2e[_0xf3fc('0x31')];if(_0x49ce59[_0xf3fc('0x24')]===0x0)return[];return db[_0xf3fc('0x7f')]['query'](_0x48faa3[_0xf3fc('0x80')](),_0x4ab93e);})[_0xf3fc('0x29')](function(_0x32a49b){_0x17eee3=_[_0xf3fc('0x81')](_0x32a49b,'id');_0x4ab93e=_[_0xf3fc('0x82')](_0x4ab93e,{'model':db['CmContact'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x4ff37f[_0xf3fc('0x3c')][_0xf3fc('0x3f')]){_0x1917f9[_0xf3fc('0x3e')][_0xf3fc('0x59')](function(_0x1565d3){_0x523834[_0xf3fc('0x47')]('c.'+_0x1565d3);});}else{_0x523834['field'](_0xf3fc('0x77'));_0x523834[_0xf3fc('0x47')]('c.firstName');_0x523834[_0xf3fc('0x47')](_0xf3fc('0x83'));_0x523834[_0xf3fc('0x47')](_0xf3fc('0x84'));_0x523834['field'](_0xf3fc('0x85'));_0x523834[_0xf3fc('0x47')](_0xf3fc('0x86'));_0x523834[_0xf3fc('0x47')](_0xf3fc('0x87'));_0x523834['field'](_0xf3fc('0x88'));_0x523834[_0xf3fc('0x47')](_0xf3fc('0x89'));_0x523834[_0xf3fc('0x47')]('GROUP_CONCAT(DISTINCT\x20t.id)',_0xf3fc('0x8a'));}if(_0x1917f9[_0xf3fc('0x42')])_0x523834[_0xf3fc('0x42')](_0x1917f9[_0xf3fc('0x42')]);if(_0x1917f9['offset'])_0x523834[_0xf3fc('0x25')](_0x1917f9[_0xf3fc('0x25')]);return db['sequelize'][_0xf3fc('0x3c')](_0x523834[_0xf3fc('0x80')](),_0x4ab93e);})['then'](function(_0x226404){_0x226404[_0xf3fc('0x59')](function(_0x203418){if(_0x203418[_0xf3fc('0x8a')]){_0x203418[_0xf3fc('0x8b')]=[];_0x203418[_0xf3fc('0x8a')][_0xf3fc('0x58')](',')[_0xf3fc('0x59')](function(_0x2c293c){_0x203418[_0xf3fc('0x8b')][_0xf3fc('0x34')](_0x17eee3[_0x2c293c]);});}delete _0x203418[_0xf3fc('0x8a')];});_0x49ce59[_0xf3fc('0x8c')]=_0x226404;return _0x49ce59;})[_0xf3fc('0x29')](respondWithFilteredResult(_0x42a21d,_0x1917f9));});})[_0xf3fc('0x8d')](handleError(_0x42a21d,null));};exports[_0xf3fc('0x2a')]=function(_0x186ca6,_0x559b39){return db[_0xf3fc('0x2e')][_0xf3fc('0x8e')]({'where':{'id':_0x186ca6[_0xf3fc('0x8f')]['id']}})[_0xf3fc('0x29')](handleEntityNotFound(_0x559b39,null))[_0xf3fc('0x29')](removeEntity(_0x559b39,null))[_0xf3fc('0x8d')](handleError(_0x559b39,null));};exports['describe']=function(_0x345ab8,_0x18ef41){return db[_0xf3fc('0x2e')][_0xf3fc('0x2f')]()[_0xf3fc('0x29')](function(_0x354719){delete _0x354719['tags'];for(var _0x5861b7=0x0;_0x5861b7=_0xcba559){_0x344d0a=_0xcba559;_0x1f49b6=0xc8;}else{_0x1f49b6=0xce;}_0x92c55a[_0xa5f3('0x23')](_0x1f49b6);return _0x92c55a[_0xa5f3('0x24')](_0xa5f3('0x25'),_0x54582f+'-'+_0x344d0a+'/'+_0xcba559)['json'](_0x4e8f1d);}return null;};}function patchUpdates(_0x4703bb){return function(_0x1c7173){try{jsonpatch[_0xa5f3('0x26')](_0x1c7173,_0x4703bb,!![]);}catch(_0x54f6f1){return BPromise[_0xa5f3('0x27')](_0x54f6f1);}return _0x1c7173['save']();};}function saveUpdates(_0x2e5cd1,_0x49f384){return function(_0xd99723){if(_0xd99723){return _0xd99723['update'](_0x2e5cd1)[_0xa5f3('0x28')](function(_0x15e428){return _0x15e428;});}return null;};}function removeEntity(_0xf53548,_0x19823f){return function(_0x191966){if(_0x191966){return _0x191966['destroy']()[_0xa5f3('0x28')](function(){_0xf53548[_0xa5f3('0x23')](0xcc)[_0xa5f3('0x1e')]();});}};}function handleEntityNotFound(_0x56b164,_0x258bf9){return function(_0x110b5e){if(!_0x110b5e){_0x56b164[_0xa5f3('0x1d')](0x194);}return _0x110b5e;};}function handleError(_0x1600d0,_0x34ded9){_0x34ded9=_0x34ded9||0x1f4;return function(_0xa72863){logger['error'](_0xa72863['stack']);if(_0xa72863[_0xa5f3('0x29')]){delete _0xa72863['name'];}_0x1600d0[_0xa5f3('0x23')](_0x34ded9)['send'](_0xa72863);};}exports[_0xa5f3('0x2a')]=function(_0x2f0ba6,_0x2eaf32){var _0x2a4ecf={},_0x54eeb9={},_0x574f7a={'count':0x0,'rows':[]};return db[_0xa5f3('0x2b')]['describe']()[_0xa5f3('0x28')](function(_0x53bf8d){var _0x4898ae=[];for(var _0x43743f=0x0;_0x43743f0x1){_0x1dc513['or']('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xa5f3('0x67')](_0x5dc44f),null);}else{if(qs['isNumeric'](_0x5dc44f)){_0x1dc513['or'](_0xa5f3('0x68'),_0x5dc44f+'%');_0x1dc513['or']('c.phone\x20LIKE\x20?',_0x5dc44f+'%');_0x1dc513['or'](_0xa5f3('0x69'),_0x5dc44f+'%');_0x1dc513['or']('c.fax\x20LIKE\x20?',_0x5dc44f+'%');}else if(qs[_0xa5f3('0x6a')](_0x5dc44f)){_0x1dc513['or'](_0xa5f3('0x6b'),_0x5dc44f+'%');}else{_0x1dc513['or']('c.firstName\x20LIKE\x20?','%'+_0x5dc44f+'%');_0x1dc513['or'](_0xa5f3('0x6c'),'%'+_0x5dc44f+'%');_0x1dc513['or'](_0xa5f3('0x6b'),'%'+_0x5dc44f+'%');}}}}_0xde5fd9[_0xa5f3('0x3d')](_0x1dc513);_0xde5fd9[_0xa5f3('0x6d')]('c.id');var _0x47ec88={'type':db[_0xa5f3('0x6e')]['QueryTypes']['SELECT'],'raw':!![]};var _0x5be1f1=_0xde5fd9[_0xa5f3('0x6f')]()[_0xa5f3('0x3e')](_0xa5f3('0x70'));if(_0x2a4ecf[_0xa5f3('0x71')]){_0x2a4ecf[_0xa5f3('0x71')][_0xa5f3('0x4f')](function(_0x163708){_0xde5fd9['order']('c.'+_0x163708[0x0],_0x163708[0x1]===_0xa5f3('0x72')?![]:!![]);});}if(!_[_0xa5f3('0x5d')](_0x1c88bf)){_0xde5fd9['having'](_0x306bd9);_0x5be1f1['where'](_0xa5f3('0x73'),_0x1c88bf);}BPromise[_0xa5f3('0x74')]()[_0xa5f3('0x28')](function(){if(_0x4dfc91&&!_[_0xa5f3('0x75')](_0x4dfc91[_0xa5f3('0x4a')],[_0xa5f3('0x3e'),_0xa5f3('0x76')])){return _0x2f0ba6['user'][_0xa5f3('0x77')]({'attributes':['id'],'raw':!![]})[_0xa5f3('0x28')](function(_0x2b42ab){if(_[_0xa5f3('0x5d')](_0x2b42ab)){_0x5be1f1['where'](_0xa5f3('0x78'));_0xde5fd9[_0xa5f3('0x3d')](_0xa5f3('0x78'));}else{_0x5be1f1['where']('c.ListId\x20IN\x20?',_['map'](_0x2b42ab,'id'));_0xde5fd9[_0xa5f3('0x3d')](_0xa5f3('0x5f'),_[_0xa5f3('0x4e')](_0x2b42ab,'id'));}});}else{return;}})[_0xa5f3('0x28')](function(){db['sequelize']['query'](_0x5be1f1[_0xa5f3('0x79')](),_0x47ec88)[_0xa5f3('0x28')](function(_0x1164f1){_0x574f7a[_0xa5f3('0x20')]=_0x1164f1[_0xa5f3('0x2d')];if(_0x574f7a['count']===0x0)return[];return db[_0xa5f3('0x7a')][_0xa5f3('0x37')](_0x3a4d21[_0xa5f3('0x79')](),_0x47ec88);})[_0xa5f3('0x28')](function(_0x45bd63){_0x1c41ae=_[_0xa5f3('0x7b')](_0x45bd63,'id');_0x47ec88=_[_0xa5f3('0x7c')](_0x47ec88,{'model':db[_0xa5f3('0x2b')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x2f0ba6['query'][_0xa5f3('0x7d')]){_0x2a4ecf[_0xa5f3('0x3a')][_0xa5f3('0x4f')](function(_0x46155f){_0xde5fd9[_0xa5f3('0x3e')]('c.'+_0x46155f);});}else{_0xde5fd9[_0xa5f3('0x3e')](_0xa5f3('0x70'));_0xde5fd9[_0xa5f3('0x3e')](_0xa5f3('0x7e'));_0xde5fd9['field'](_0xa5f3('0x7f'));_0xde5fd9[_0xa5f3('0x3e')]('c.phone');_0xde5fd9[_0xa5f3('0x3e')](_0xa5f3('0x80'));_0xde5fd9[_0xa5f3('0x3e')]('c.fax');_0xde5fd9[_0xa5f3('0x3e')]('c.email');_0xde5fd9['field'](_0xa5f3('0x81'));_0xde5fd9[_0xa5f3('0x3e')]('c.deletedAt');_0xde5fd9[_0xa5f3('0x3e')](_0xa5f3('0x82'),_0xa5f3('0x83'));}if(_0x2a4ecf[_0xa5f3('0x22')])_0xde5fd9[_0xa5f3('0x22')](_0x2a4ecf['limit']);if(_0x2a4ecf['offset'])_0xde5fd9['offset'](_0x2a4ecf[_0xa5f3('0x21')]);return db[_0xa5f3('0x7a')]['query'](_0xde5fd9[_0xa5f3('0x79')](),_0x47ec88);})[_0xa5f3('0x28')](function(_0xbe563){_0xbe563[_0xa5f3('0x4f')](function(_0x121dee){if(_0x121dee[_0xa5f3('0x83')]){_0x121dee[_0xa5f3('0x84')]=[];_0x121dee['TagIds'][_0xa5f3('0x4d')](',')[_0xa5f3('0x4f')](function(_0x1740d3){_0x121dee['Tags'][_0xa5f3('0x30')](_0x1c41ae[_0x1740d3]);});}delete _0x121dee[_0xa5f3('0x83')];});_0x574f7a[_0xa5f3('0x85')]=_0xbe563;return _0x574f7a;})[_0xa5f3('0x28')](respondWithFilteredResult(_0x2eaf32,_0x2a4ecf));});})[_0xa5f3('0x86')](handleError(_0x2eaf32,null));};exports['destroy']=function(_0x2bdd92,_0x5690ed){return db['CmContact'][_0xa5f3('0x87')]({'where':{'id':_0x2bdd92[_0xa5f3('0x88')]['id']}})[_0xa5f3('0x28')](handleEntityNotFound(_0x5690ed,null))[_0xa5f3('0x28')](removeEntity(_0x5690ed,null))[_0xa5f3('0x86')](handleError(_0x5690ed,null));};exports['describe']=function(_0x3a6beb,_0x4d7092){return db['CmContact'][_0xa5f3('0x89')]()[_0xa5f3('0x28')](function(_0x469103){delete _0x469103[_0xa5f3('0x8a')];for(var _0x466429=0x0;_0x466429{}\s\\|]/g,'-');_0x2aed27(null,util['format'](_0x4f49('0x1e'),path[_0x4f49('0x1f')](_0x416893[_0x4f49('0x1c')],path['extname'](_0x416893[_0x4f49('0x1c')])),Date[_0x4f49('0x20')](),path[_0x4f49('0x21')](_0x416893[_0x4f49('0x1c')])));}})});router[_0x4f49('0x16')](_0x4f49('0x22'),upload['single']('file'),controller[_0x4f49('0x23')]);var upload=multer({'storage':multer[_0x4f49('0x24')]({'destination':function(_0x4fedbb,_0x408552,_0x2c1519){_0x2c1519(null,path[_0x4f49('0x19')](config['root'],_0x4f49('0x1b')));},'filename':function(_0x2eed1c,_0x298785,_0x148153){_0x298785[_0x4f49('0x1c')]=_0x298785[_0x4f49('0x1c')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x148153(null,util['format'](_0x4f49('0x1e'),path[_0x4f49('0x1f')](_0x298785[_0x4f49('0x1c')],path['extname'](_0x298785[_0x4f49('0x1c')])),Date[_0x4f49('0x20')](),path[_0x4f49('0x21')](_0x298785['originalname'])));}})});router['post'](_0x4f49('0x25'),upload[_0x4f49('0x26')](_0x4f49('0x27')),controller['upload']);router[_0x4f49('0x16')](_0x4f49('0x28'),auth[_0x4f49('0xa')](),controller[_0x4f49('0x29')]);router[_0x4f49('0x2a')](_0x4f49('0xd'),auth[_0x4f49('0xa')](),controller[_0x4f49('0x2b')]);router[_0x4f49('0x2c')](_0x4f49('0xd'),auth[_0x4f49('0xa')](),controller[_0x4f49('0x2d')]);module[_0x4f49('0x2e')]=router;
\ No newline at end of file
+var _0x5fc3=['/:id','show','/:id/tags','getTags','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','/:id/jscripty_sessions','getJscriptySessions','post','create','/create_many','setTags','diskStorage','join','root','originalname','replace','format','%s-%s%s','basename','now','extname','single','file','server/files/tmp','upload','/upload/:id','import','put','update','delete','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./cmContact.controller','get','isAuthenticated','/describe','describe'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5fc3,0xa8));var _0x35fc=function(_0x5466ab,_0x227b13){_0x5466ab=_0x5466ab-0x0;var _0x40751a=_0x5fc3[_0x5466ab];return _0x40751a;};'use strict';var multer=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var path=require('path');var timeout=require(_0x35fc('0x2'));var express=require(_0x35fc('0x3'));var router=express[_0x35fc('0x4')]();var auth=require(_0x35fc('0x5'));var interaction=require(_0x35fc('0x6'));var config=require('../../config/environment');var controller=require(_0x35fc('0x7'));router[_0x35fc('0x8')]('/',auth[_0x35fc('0x9')](),controller['index']);router['get'](_0x35fc('0xa'),auth['isAuthenticated'](),controller[_0x35fc('0xb')]);router[_0x35fc('0x8')](_0x35fc('0xc'),auth[_0x35fc('0x9')](),controller[_0x35fc('0xd')]);router[_0x35fc('0x8')](_0x35fc('0xe'),auth['isAuthenticated'](),controller[_0x35fc('0xf')]);router[_0x35fc('0x8')]('/:id/hoppers',auth[_0x35fc('0x9')](),controller[_0x35fc('0x10')]);router['get'](_0x35fc('0x11'),auth[_0x35fc('0x9')](),controller['getHopperHistories']);router['get'](_0x35fc('0x12'),auth['isAuthenticated'](),controller[_0x35fc('0x13')]);router[_0x35fc('0x8')](_0x35fc('0x14'),auth[_0x35fc('0x9')](),controller[_0x35fc('0x15')]);router['post']('/merge',auth['isAuthenticated'](),controller['merge']);router[_0x35fc('0x16')]('/',auth[_0x35fc('0x9')](),controller[_0x35fc('0x17')]);router[_0x35fc('0x16')](_0x35fc('0x18'),auth[_0x35fc('0x9')](),controller['bulkCreate']);router[_0x35fc('0x16')](_0x35fc('0xe'),auth['isAuthenticated'](),controller[_0x35fc('0x19')]);var upload=multer({'storage':multer[_0x35fc('0x1a')]({'destination':function(_0x2e513b,_0x5f56c6,_0x1a86e9){_0x1a86e9(null,path[_0x35fc('0x1b')](config[_0x35fc('0x1c')],'server/files/tmp'));},'filename':function(_0x402cff,_0x350a27,_0x3229d1){_0x350a27[_0x35fc('0x1d')]=_0x350a27[_0x35fc('0x1d')][_0x35fc('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3229d1(null,util[_0x35fc('0x1f')](_0x35fc('0x20'),path[_0x35fc('0x21')](_0x350a27[_0x35fc('0x1d')],path['extname'](_0x350a27[_0x35fc('0x1d')])),Date[_0x35fc('0x22')](),path[_0x35fc('0x23')](_0x350a27[_0x35fc('0x1d')])));}})});router[_0x35fc('0x16')]('/csv',upload[_0x35fc('0x24')](_0x35fc('0x25')),controller['uploadCsv']);var upload=multer({'storage':multer[_0x35fc('0x1a')]({'destination':function(_0x5a93df,_0x3d4a98,_0x51cfec){_0x51cfec(null,path[_0x35fc('0x1b')](config['root'],_0x35fc('0x26')));},'filename':function(_0xdfab9f,_0x5cb986,_0x519264){_0x5cb986[_0x35fc('0x1d')]=_0x5cb986['originalname'][_0x35fc('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x519264(null,util[_0x35fc('0x1f')]('%s-%s%s',path[_0x35fc('0x21')](_0x5cb986[_0x35fc('0x1d')],path[_0x35fc('0x23')](_0x5cb986[_0x35fc('0x1d')])),Date[_0x35fc('0x22')](),path[_0x35fc('0x23')](_0x5cb986[_0x35fc('0x1d')])));}})});router[_0x35fc('0x16')]('/upload',upload[_0x35fc('0x24')](_0x35fc('0x25')),controller[_0x35fc('0x27')]);router['post'](_0x35fc('0x28'),auth[_0x35fc('0x9')](),controller[_0x35fc('0x29')]);router[_0x35fc('0x2a')](_0x35fc('0xc'),auth[_0x35fc('0x9')](),controller[_0x35fc('0x2b')]);router[_0x35fc('0x2c')](_0x35fc('0xc'),auth[_0x35fc('0x9')](),controller['destroy']);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 83b39b3..07cce0d 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 _0x111e=['setDataValue','BOOLEAN','sequelize','lodash','exports','VIRTUAL','alias','getDataValue','name','STRING','TEXT','type','select','parse','isArray','values','stringify'];(function(_0x14bfbf,_0x552595){var _0x3a29d4=function(_0x1fae62){while(--_0x1fae62){_0x14bfbf['push'](_0x14bfbf['shift']());}};_0x3a29d4(++_0x552595);}(_0x111e,0x167));var _0xe111=function(_0x592a29,_0x4f8a19){_0x592a29=_0x592a29-0x0;var _0x32e476=_0x111e[_0x592a29];return _0x32e476;};'use strict';var Sequelize=require(_0xe111('0x0'));var _=require(_0xe111('0x1'));module[_0xe111('0x2')]={'name':{'type':Sequelize[_0xe111('0x3')],'get':function(_0x224150){return this['getDataValue'](_0xe111('0x4'));}},'alias':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x14d213){this['setDataValue'](_0xe111('0x4'),_0x14d213?_0x14d213:this[_0xe111('0x5')](_0xe111('0x6')));}},'type':{'type':Sequelize[_0xe111('0x7')],'allowNull':![]},'values':{'type':Sequelize[_0xe111('0x8')]('long'),'get':function(){if(this[_0xe111('0x5')](_0xe111('0x9'))===_0xe111('0xa')){return JSON[_0xe111('0xb')](this[_0xe111('0x5')]('values'));}else{return this[_0xe111('0x5')]('values');}},'set':function(_0x2c6bb1){if(Array[_0xe111('0xc')](_0x2c6bb1)){this['setDataValue'](_0xe111('0xd'),JSON[_0xe111('0xe')](_0x2c6bb1));}else{this[_0xe111('0xf')](_0xe111('0xd'),_0x2c6bb1);}}},'required':{'type':Sequelize[_0xe111('0x10')],'defaultValue':![]}};
\ No newline at end of file
+var _0xc2ed=['lodash','exports','VIRTUAL','getDataValue','alias','STRING','TEXT','type','select','parse','values','isArray','setDataValue','BOOLEAN','sequelize'];(function(_0x4d4a2e,_0x27a392){var _0x4d4eed=function(_0x24aa79){while(--_0x24aa79){_0x4d4a2e['push'](_0x4d4a2e['shift']());}};_0x4d4eed(++_0x27a392);}(_0xc2ed,0x1ee));var _0xdc2e=function(_0x38a7ac,_0x45514b){_0x38a7ac=_0x38a7ac-0x0;var _0x53061a=_0xc2ed[_0x38a7ac];return _0x53061a;};'use strict';var Sequelize=require(_0xdc2e('0x0'));var _=require(_0xdc2e('0x1'));module[_0xdc2e('0x2')]={'name':{'type':Sequelize[_0xdc2e('0x3')],'get':function(_0x5dedd3){return this[_0xdc2e('0x4')](_0xdc2e('0x5'));}},'alias':{'type':Sequelize[_0xdc2e('0x6')],'allowNull':![],'set':function(_0x3df292){this['setDataValue'](_0xdc2e('0x5'),_0x3df292?_0x3df292:this['getDataValue']('name'));}},'type':{'type':Sequelize[_0xdc2e('0x6')],'allowNull':![]},'values':{'type':Sequelize[_0xdc2e('0x7')]('long'),'get':function(){if(this['getDataValue'](_0xdc2e('0x8'))===_0xdc2e('0x9')){return JSON[_0xdc2e('0xa')](this[_0xdc2e('0x4')]('values'));}else{return this[_0xdc2e('0x4')](_0xdc2e('0xb'));}},'set':function(_0x3523c6){if(Array[_0xdc2e('0xc')](_0x3523c6)){this[_0xdc2e('0xd')]('values',JSON['stringify'](_0x3523c6));}else{this[_0xdc2e('0xd')](_0xdc2e('0xb'),_0x3523c6);}}},'required':{'type':Sequelize[_0xdc2e('0xe')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/cmCustomField/cmCustomField.controller.js b/server/api/cmCustomField/cmCustomField.controller.js
index 62dc6b6..730695e 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 _0x902e=['sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../mysqldb','status','count','offset','limit','Content-Range','json','reject','save','update','then','sendStatus','stack','send','index','map','CmCustomField','fieldName','type','key','model','name','keys','query','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','includeAll','include','catch','show','rawAttributes','options','find','body','params','destroy','create','transaction','TEXT','Sequelize','number','switch','defaultValue','sequelize','queryInterface','addColumn','cm_contacts','cf_%d','html-pdf','eml-format','zip-dir','request-promise','bluebird','mustache','util','path'];(function(_0x119b3e,_0x588d50){var _0x1169ae=function(_0x377422){while(--_0x377422){_0x119b3e['push'](_0x119b3e['shift']());}};_0x1169ae(++_0x588d50);}(_0x902e,0x188));var _0xe902=function(_0x4ac0c8,_0x2a7a6b){_0x4ac0c8=_0x4ac0c8-0x0;var _0x5cd97e=_0x902e[_0x4ac0c8];return _0x5cd97e;};'use strict';var pdf=require(_0xe902('0x0'));var emlformat=require(_0xe902('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xe902('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe902('0x3'));var moment=require('moment');var BPromise=require(_0xe902('0x4'));var Mustache=require(_0xe902('0x5'));var util=require(_0xe902('0x6'));var path=require(_0xe902('0x7'));var sox=require(_0xe902('0x8'));var csv=require(_0xe902('0x9'));var ejs=require(_0xe902('0xa'));var fs=require('fs');var _=require(_0xe902('0xb'));var squel=require(_0xe902('0xc'));var crypto=require(_0xe902('0xd'));var jsforce=require(_0xe902('0xe'));var deskjs=require(_0xe902('0xf'));var toCsv=require('to-csv');var querystring=require(_0xe902('0x10'));var Papa=require('papaparse');var Redis=require(_0xe902('0x11'));var authService=require(_0xe902('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xe902('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xe902('0x14'));var utils=require(_0xe902('0x15'));var config=require('../../config/environment');var db=require(_0xe902('0x16'))['db'];function respondWithStatusCode(_0x4bb78e,_0x1f2c61){_0x1f2c61=_0x1f2c61||0xcc;return function(_0x3598b8){if(_0x3598b8){return _0x4bb78e['sendStatus'](_0x1f2c61);}return _0x4bb78e[_0xe902('0x17')](_0x1f2c61)['end']();};}function respondWithResult(_0x5f4746,_0x145a4b){_0x145a4b=_0x145a4b||0xc8;return function(_0x483efa){if(_0x483efa){return _0x5f4746[_0xe902('0x17')](_0x145a4b)['json'](_0x483efa);}};}function respondWithFilteredResult(_0x54d47c,_0x51245a){return function(_0x5d82c0){if(_0x5d82c0){var _0xa6342d=_0x5d82c0[_0xe902('0x18')],_0x190163=_0x51245a[_0xe902('0x19')],_0x4eb5cb=_0x51245a[_0xe902('0x19')]+_0x51245a[_0xe902('0x1a')],_0x3e728e;if(_0x4eb5cb>=_0xa6342d){_0x4eb5cb=_0xa6342d;_0x3e728e=0xc8;}else{_0x3e728e=0xce;}_0x54d47c[_0xe902('0x17')](_0x3e728e);return _0x54d47c['set'](_0xe902('0x1b'),_0x190163+'-'+_0x4eb5cb+'/'+_0xa6342d)[_0xe902('0x1c')](_0x5d82c0);}return null;};}function patchUpdates(_0x4ffa3f){return function(_0x297662){try{jsonpatch['apply'](_0x297662,_0x4ffa3f,!![]);}catch(_0xc903fa){return BPromise[_0xe902('0x1d')](_0xc903fa);}return _0x297662[_0xe902('0x1e')]();};}function saveUpdates(_0xe6221e,_0x2f81ca){return function(_0x261f32){if(_0x261f32){return _0x261f32[_0xe902('0x1f')](_0xe6221e)['then'](function(_0x392e53){return _0x392e53;});}return null;};}function removeEntity(_0x3b263d,_0x48e0a5){return function(_0x52f8ff){if(_0x52f8ff){return _0x52f8ff['destroy']()[_0xe902('0x20')](function(){_0x3b263d[_0xe902('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1f0c0f,_0x2f8641){return function(_0x2aaf72){if(!_0x2aaf72){_0x1f0c0f[_0xe902('0x21')](0x194);}return _0x2aaf72;};}function handleError(_0x3d7214,_0x1ee335){_0x1ee335=_0x1ee335||0x1f4;return function(_0x5eb726){logger['error'](_0x5eb726[_0xe902('0x22')]);if(_0x5eb726['name']){delete _0x5eb726['name'];}_0x3d7214[_0xe902('0x17')](_0x1ee335)[_0xe902('0x23')](_0x5eb726);};}exports[_0xe902('0x24')]=function(_0x4b41d8,_0x5af0fd){var _0x2b1d96={},_0x311344={},_0x1ddf2e={'count':0x0,'rows':[]};var _0x498aac=_[_0xe902('0x25')](db[_0xe902('0x26')]['rawAttributes'],function(_0x2db2bd){return{'name':_0x2db2bd[_0xe902('0x27')],'type':_0x2db2bd[_0xe902('0x28')][_0xe902('0x29')]};});_0x311344[_0xe902('0x2a')]=_['differenceBy'](_[_0xe902('0x25')](_0x498aac,_0xe902('0x2b')),['name']);_0x311344['query']=_[_0xe902('0x2c')](_0x4b41d8[_0xe902('0x2d')]);_0x311344['filters']=_[_0xe902('0x2e')](_0x311344[_0xe902('0x2a')],_0x311344[_0xe902('0x2d')]);_0x2b1d96['attributes']=_['intersection'](_0x311344[_0xe902('0x2a')],qs[_0xe902('0x2f')](_0x4b41d8[_0xe902('0x2d')][_0xe902('0x2f')]));_0x2b1d96[_0xe902('0x30')]=_0x2b1d96[_0xe902('0x30')]['length']?_0x2b1d96[_0xe902('0x30')]:_0x311344['model'];if(!_0x4b41d8['query'][_0xe902('0x31')](_0xe902('0x32'))){_0x2b1d96[_0xe902('0x1a')]=qs['limit'](_0x4b41d8['query'][_0xe902('0x1a')]);_0x2b1d96[_0xe902('0x19')]=qs['offset'](_0x4b41d8[_0xe902('0x2d')][_0xe902('0x19')]);}_0x2b1d96[_0xe902('0x33')]=qs[_0xe902('0x34')](_0x4b41d8[_0xe902('0x2d')][_0xe902('0x34')]);_0x2b1d96[_0xe902('0x35')]=qs[_0xe902('0x36')](_[_0xe902('0x37')](_0x4b41d8[_0xe902('0x2d')],_0x311344[_0xe902('0x36')]));if(_0x4b41d8[_0xe902('0x2d')][_0xe902('0x38')]){_0x2b1d96[_0xe902('0x35')]=_[_0xe902('0x39')](_0x2b1d96[_0xe902('0x35')],{'$or':_[_0xe902('0x25')](_0x498aac,function(_0x4f133f){if(_0x4f133f[_0xe902('0x28')]!=='VIRTUAL'){var _0x24671d={};_0x24671d[_0x4f133f['name']]={'$like':'%'+_0x4b41d8['query'][_0xe902('0x38')]+'%'};return _0x24671d;}})});}_0x2b1d96=_['merge']({},_0x2b1d96,_0x4b41d8['options']);var _0x13ca44={'where':_0x2b1d96[_0xe902('0x35')]};return db['CmCustomField']['count'](_0x13ca44)[_0xe902('0x20')](function(_0xb1d60b){_0x1ddf2e[_0xe902('0x18')]=_0xb1d60b;if(_0x4b41d8['query'][_0xe902('0x3a')]){_0x2b1d96[_0xe902('0x3b')]=[{'all':!![]}];}return db[_0xe902('0x26')]['findAll'](_0x2b1d96);})[_0xe902('0x20')](function(_0x9295c6){_0x1ddf2e['rows']=_0x9295c6;return _0x1ddf2e;})['then'](respondWithFilteredResult(_0x5af0fd,_0x2b1d96))[_0xe902('0x3c')](handleError(_0x5af0fd,null));};exports[_0xe902('0x3d')]=function(_0x52e94e,_0x2c1cf6){var _0x2e4ff3={'raw':!![],'where':{'id':_0x52e94e['params']['id']}},_0x31dbb0={};_0x31dbb0['model']=_[_0xe902('0x2c')](db[_0xe902('0x26')][_0xe902('0x3e')]);_0x31dbb0[_0xe902('0x2d')]=_['keys'](_0x52e94e[_0xe902('0x2d')]);_0x31dbb0[_0xe902('0x36')]=_['intersection'](_0x31dbb0[_0xe902('0x2a')],_0x31dbb0['query']);_0x2e4ff3['attributes']=_['intersection'](_0x31dbb0[_0xe902('0x2a')],qs['fields'](_0x52e94e[_0xe902('0x2d')]['fields']));_0x2e4ff3['attributes']=_0x2e4ff3[_0xe902('0x30')]['length']?_0x2e4ff3[_0xe902('0x30')]:_0x31dbb0[_0xe902('0x2a')];if(_0x52e94e[_0xe902('0x2d')][_0xe902('0x3a')]){_0x2e4ff3[_0xe902('0x3b')]=[{'all':!![]}];}_0x2e4ff3=_[_0xe902('0x39')]({},_0x2e4ff3,_0x52e94e[_0xe902('0x3f')]);return db['CmCustomField'][_0xe902('0x40')](_0x2e4ff3)[_0xe902('0x20')](handleEntityNotFound(_0x2c1cf6,null))['then'](respondWithResult(_0x2c1cf6,null))[_0xe902('0x3c')](handleError(_0x2c1cf6,null));};exports[_0xe902('0x1f')]=function(_0x476282,_0x3a4497){if(_0x476282[_0xe902('0x41')]['id']){delete _0x476282[_0xe902('0x41')]['id'];}return db[_0xe902('0x26')][_0xe902('0x40')]({'where':{'id':_0x476282[_0xe902('0x42')]['id']}})[_0xe902('0x20')](handleEntityNotFound(_0x3a4497,null))[_0xe902('0x20')](saveUpdates(_0x476282['body'],null))[_0xe902('0x20')](respondWithResult(_0x3a4497,null))[_0xe902('0x3c')](handleError(_0x3a4497,null));};exports[_0xe902('0x43')]=function(_0x51d2fe,_0x31aba0){return db['CmCustomField']['find']({'where':{'id':_0x51d2fe[_0xe902('0x42')]['id']}})['then'](handleEntityNotFound(_0x31aba0,null))['then'](removeEntity(_0x31aba0,null))[_0xe902('0x3c')](handleError(_0x31aba0,null));};exports[_0xe902('0x44')]=function(_0x661a87,_0x279c08){var _0x3649f7;return db['sequelize'][_0xe902('0x45')](function(_0x110af0){return db[_0xe902('0x26')][_0xe902('0x44')](_0x661a87[_0xe902('0x41')],{'transaction':_0x110af0})[_0xe902('0x20')](function(_0x29f74c){_0x3649f7=_0x29f74c;var _0x322bd8={'type':db['Sequelize'][_0xe902('0x46')],'transaction':_0x110af0};switch(_0x661a87['body'][_0xe902('0x28')]){case'text':_0x322bd8[_0xe902('0x28')]=db[_0xe902('0x47')][_0xe902('0x46')];break;case _0xe902('0x48'):_0x322bd8[_0xe902('0x28')]=db[_0xe902('0x47')]['INTEGER'];break;case _0xe902('0x49'):_0x322bd8[_0xe902('0x28')]=db[_0xe902('0x47')]['BOOLEAN'];_0x322bd8[_0xe902('0x4a')]=![];break;default:}return db[_0xe902('0x4b')][_0xe902('0x4c')][_0xe902('0x4d')](_0xe902('0x4e'),util['format'](_0xe902('0x4f'),_0x3649f7['id']),_0x322bd8);})['then'](function(){return _0x3649f7;});})[_0xe902('0x20')](respondWithResult(_0x279c08,0xc9))[_0xe902('0x3c')](handleError(_0x279c08,null));};
\ No newline at end of file
+var _0x002a=['to-csv','ejs','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','CmCustomField','rawAttributes','fieldName','type','key','model','differenceBy','map','query','filters','intersection','fields','attributes','length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','show','keys','include','options','find','catch','body','params','create','Sequelize','text','TEXT','INTEGER','switch','sequelize','addColumn','cm_contacts','format','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','mustache','util'];(function(_0x16cfff,_0x3fc70c){var _0x127aa2=function(_0xd4acdd){while(--_0xd4acdd){_0x16cfff['push'](_0x16cfff['shift']());}};_0x127aa2(++_0x3fc70c);}(_0x002a,0xec));var _0xa002=function(_0xb6765f,_0x59eda7){_0xb6765f=_0xb6765f-0x0;var _0x355196=_0x002a[_0xb6765f];return _0x355196;};'use strict';var pdf=require(_0xa002('0x0'));var emlformat=require(_0xa002('0x1'));var rimraf=require(_0xa002('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa002('0x3'));var rp=require(_0xa002('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xa002('0x5'));var util=require(_0xa002('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xa002('0x7'));var ejs=require(_0xa002('0x8'));var fs=require('fs');var _=require(_0xa002('0x9'));var squel=require(_0xa002('0xa'));var crypto=require(_0xa002('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xa002('0xc'));var toCsv=require(_0xa002('0x7'));var querystring=require('querystring');var Papa=require(_0xa002('0xd'));var Redis=require(_0xa002('0xe'));var authService=require(_0xa002('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0xa002('0x10'));var hardwareService=require(_0xa002('0x11'));var logger=require('../../config/logger')('api');var utils=require(_0xa002('0x12'));var config=require(_0xa002('0x13'));var db=require(_0xa002('0x14'))['db'];function respondWithStatusCode(_0x5db3cd,_0x502f30){_0x502f30=_0x502f30||0xcc;return function(_0x220296){if(_0x220296){return _0x5db3cd['sendStatus'](_0x502f30);}return _0x5db3cd[_0xa002('0x15')](_0x502f30)[_0xa002('0x16')]();};}function respondWithResult(_0x47f65a,_0x116499){_0x116499=_0x116499||0xc8;return function(_0xa38089){if(_0xa38089){return _0x47f65a[_0xa002('0x15')](_0x116499)[_0xa002('0x17')](_0xa38089);}};}function respondWithFilteredResult(_0x19fff3,_0x1c6b05){return function(_0x3cd208){if(_0x3cd208){var _0x15c74f=_0x3cd208[_0xa002('0x18')],_0x2b5f24=_0x1c6b05[_0xa002('0x19')],_0x2101cf=_0x1c6b05[_0xa002('0x19')]+_0x1c6b05[_0xa002('0x1a')],_0x130e60;if(_0x2101cf>=_0x15c74f){_0x2101cf=_0x15c74f;_0x130e60=0xc8;}else{_0x130e60=0xce;}_0x19fff3[_0xa002('0x15')](_0x130e60);return _0x19fff3[_0xa002('0x1b')]('Content-Range',_0x2b5f24+'-'+_0x2101cf+'/'+_0x15c74f)['json'](_0x3cd208);}return null;};}function patchUpdates(_0x11994c){return function(_0xa5e750){try{jsonpatch[_0xa002('0x1c')](_0xa5e750,_0x11994c,!![]);}catch(_0x5bb83d){return BPromise[_0xa002('0x1d')](_0x5bb83d);}return _0xa5e750[_0xa002('0x1e')]();};}function saveUpdates(_0x41c10c,_0x35f2fd){return function(_0x12af0c){if(_0x12af0c){return _0x12af0c[_0xa002('0x1f')](_0x41c10c)[_0xa002('0x20')](function(_0x32841b){return _0x32841b;});}return null;};}function removeEntity(_0x31a5b3,_0x361258){return function(_0xd9e36d){if(_0xd9e36d){return _0xd9e36d[_0xa002('0x21')]()[_0xa002('0x20')](function(){_0x31a5b3[_0xa002('0x15')](0xcc)[_0xa002('0x16')]();});}};}function handleEntityNotFound(_0x5960cc,_0xfcc511){return function(_0x18fc4d){if(!_0x18fc4d){_0x5960cc[_0xa002('0x22')](0x194);}return _0x18fc4d;};}function handleError(_0x1038e6,_0x271987){_0x271987=_0x271987||0x1f4;return function(_0xc57600){logger[_0xa002('0x23')](_0xc57600[_0xa002('0x24')]);if(_0xc57600[_0xa002('0x25')]){delete _0xc57600[_0xa002('0x25')];}_0x1038e6['status'](_0x271987)[_0xa002('0x26')](_0xc57600);};}exports['index']=function(_0x35b65c,_0x11f72d){var _0x324733={},_0x5c6e60={},_0x3fbc50={'count':0x0,'rows':[]};var _0x53ccd6=_['map'](db[_0xa002('0x27')][_0xa002('0x28')],function(_0x58bfb1){return{'name':_0x58bfb1[_0xa002('0x29')],'type':_0x58bfb1[_0xa002('0x2a')][_0xa002('0x2b')]};});_0x5c6e60[_0xa002('0x2c')]=_[_0xa002('0x2d')](_[_0xa002('0x2e')](_0x53ccd6,_0xa002('0x25')),[_0xa002('0x25')]);_0x5c6e60[_0xa002('0x2f')]=_['keys'](_0x35b65c['query']);_0x5c6e60[_0xa002('0x30')]=_['intersection'](_0x5c6e60[_0xa002('0x2c')],_0x5c6e60[_0xa002('0x2f')]);_0x324733['attributes']=_[_0xa002('0x31')](_0x5c6e60[_0xa002('0x2c')],qs[_0xa002('0x32')](_0x35b65c['query']['fields']));_0x324733[_0xa002('0x33')]=_0x324733[_0xa002('0x33')][_0xa002('0x34')]?_0x324733[_0xa002('0x33')]:_0x5c6e60[_0xa002('0x2c')];if(!_0x35b65c[_0xa002('0x2f')][_0xa002('0x35')]('nolimit')){_0x324733[_0xa002('0x1a')]=qs[_0xa002('0x1a')](_0x35b65c['query'][_0xa002('0x1a')]);_0x324733['offset']=qs['offset'](_0x35b65c['query'][_0xa002('0x19')]);}_0x324733['order']=qs['sort'](_0x35b65c[_0xa002('0x2f')][_0xa002('0x36')]);_0x324733[_0xa002('0x37')]=qs['filters'](_[_0xa002('0x38')](_0x35b65c[_0xa002('0x2f')],_0x5c6e60[_0xa002('0x30')]));if(_0x35b65c[_0xa002('0x2f')][_0xa002('0x39')]){_0x324733[_0xa002('0x37')]=_[_0xa002('0x3a')](_0x324733['where'],{'$or':_[_0xa002('0x2e')](_0x53ccd6,function(_0x43735d){if(_0x43735d[_0xa002('0x2a')]!==_0xa002('0x3b')){var _0xc1474={};_0xc1474[_0x43735d[_0xa002('0x25')]]={'$like':'%'+_0x35b65c[_0xa002('0x2f')][_0xa002('0x39')]+'%'};return _0xc1474;}})});}_0x324733=_[_0xa002('0x3a')]({},_0x324733,_0x35b65c['options']);var _0x5bf901={'where':_0x324733[_0xa002('0x37')]};return db[_0xa002('0x27')][_0xa002('0x18')](_0x5bf901)[_0xa002('0x20')](function(_0x37b76c){_0x3fbc50[_0xa002('0x18')]=_0x37b76c;if(_0x35b65c[_0xa002('0x2f')][_0xa002('0x3c')]){_0x324733['include']=[{'all':!![]}];}return db['CmCustomField'][_0xa002('0x3d')](_0x324733);})[_0xa002('0x20')](function(_0x293138){_0x3fbc50[_0xa002('0x3e')]=_0x293138;return _0x3fbc50;})[_0xa002('0x20')](respondWithFilteredResult(_0x11f72d,_0x324733))['catch'](handleError(_0x11f72d,null));};exports[_0xa002('0x3f')]=function(_0x1968c4,_0x5726aa){var _0x5e463a={'raw':!![],'where':{'id':_0x1968c4['params']['id']}},_0x114076={};_0x114076[_0xa002('0x2c')]=_[_0xa002('0x40')](db[_0xa002('0x27')][_0xa002('0x28')]);_0x114076['query']=_[_0xa002('0x40')](_0x1968c4[_0xa002('0x2f')]);_0x114076[_0xa002('0x30')]=_['intersection'](_0x114076[_0xa002('0x2c')],_0x114076[_0xa002('0x2f')]);_0x5e463a['attributes']=_[_0xa002('0x31')](_0x114076[_0xa002('0x2c')],qs[_0xa002('0x32')](_0x1968c4[_0xa002('0x2f')][_0xa002('0x32')]));_0x5e463a['attributes']=_0x5e463a['attributes']['length']?_0x5e463a[_0xa002('0x33')]:_0x114076[_0xa002('0x2c')];if(_0x1968c4['query'][_0xa002('0x3c')]){_0x5e463a[_0xa002('0x41')]=[{'all':!![]}];}_0x5e463a=_['merge']({},_0x5e463a,_0x1968c4[_0xa002('0x42')]);return db[_0xa002('0x27')][_0xa002('0x43')](_0x5e463a)['then'](handleEntityNotFound(_0x5726aa,null))['then'](respondWithResult(_0x5726aa,null))[_0xa002('0x44')](handleError(_0x5726aa,null));};exports[_0xa002('0x1f')]=function(_0x363cc6,_0x379590){if(_0x363cc6[_0xa002('0x45')]['id']){delete _0x363cc6['body']['id'];}return db[_0xa002('0x27')][_0xa002('0x43')]({'where':{'id':_0x363cc6[_0xa002('0x46')]['id']}})[_0xa002('0x20')](handleEntityNotFound(_0x379590,null))['then'](saveUpdates(_0x363cc6[_0xa002('0x45')],null))[_0xa002('0x20')](respondWithResult(_0x379590,null))['catch'](handleError(_0x379590,null));};exports[_0xa002('0x21')]=function(_0x11cec6,_0x66e8){return db[_0xa002('0x27')][_0xa002('0x43')]({'where':{'id':_0x11cec6[_0xa002('0x46')]['id']}})[_0xa002('0x20')](handleEntityNotFound(_0x66e8,null))['then'](removeEntity(_0x66e8,null))[_0xa002('0x44')](handleError(_0x66e8,null));};exports['create']=function(_0x1f693b,_0x3cfe28){var _0x1278ef;return db['sequelize']['transaction'](function(_0xa5402f){return db[_0xa002('0x27')][_0xa002('0x47')](_0x1f693b[_0xa002('0x45')],{'transaction':_0xa5402f})[_0xa002('0x20')](function(_0x42e3b2){_0x1278ef=_0x42e3b2;var _0x7abf38={'type':db[_0xa002('0x48')]['TEXT'],'transaction':_0xa5402f};switch(_0x1f693b[_0xa002('0x45')][_0xa002('0x2a')]){case _0xa002('0x49'):_0x7abf38[_0xa002('0x2a')]=db[_0xa002('0x48')][_0xa002('0x4a')];break;case'number':_0x7abf38[_0xa002('0x2a')]=db['Sequelize'][_0xa002('0x4b')];break;case _0xa002('0x4c'):_0x7abf38['type']=db[_0xa002('0x48')]['BOOLEAN'];_0x7abf38['defaultValue']=![];break;default:}return db[_0xa002('0x4d')]['queryInterface'][_0xa002('0x4e')](_0xa002('0x4f'),util[_0xa002('0x50')]('cf_%d',_0x1278ef['id']),_0x7abf38);})[_0xa002('0x20')](function(){return _0x1278ef;});})['then'](respondWithResult(_0x3cfe28,0xc9))[_0xa002('0x44')](handleError(_0x3cfe28,null));};
\ No newline at end of file
diff --git a/server/api/cmCustomField/cmCustomField.model.js b/server/api/cmCustomField/cmCustomField.model.js
index 310ca8d..1a44f1b 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 _0x1fd4=['exports','CmCustomField','cm_custom_fields','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cmCustomField.attributes'];(function(_0x56f105,_0x2ce6ea){var _0x15eae2=function(_0x1a64d1){while(--_0x1a64d1){_0x56f105['push'](_0x56f105['shift']());}};_0x15eae2(++_0x2ce6ea);}(_0x1fd4,0x153));var _0x41fd=function(_0x18e875,_0x54fff7){_0x18e875=_0x18e875-0x0;var _0x1643c6=_0x1fd4[_0x18e875];return _0x1643c6;};'use strict';var _=require(_0x41fd('0x0'));var util=require(_0x41fd('0x1'));var logger=require(_0x41fd('0x2'))('api');var moment=require(_0x41fd('0x3'));var BPromise=require(_0x41fd('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x41fd('0x5'));var rimraf=require(_0x41fd('0x6'));var config=require(_0x41fd('0x7'));var attributes=require(_0x41fd('0x8'));module[_0x41fd('0x9')]=function(_0x1f38bc,_0xd740e5){return _0x1f38bc['define'](_0x41fd('0xa'),attributes,{'tableName':_0x41fd('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf782=['path','rimraf','../../config/environment','./cmCustomField.attributes','exports','cm_custom_fields','lodash','util','../../config/logger','api','bluebird'];(function(_0xcffa4,_0x235b3e){var _0x5bdf7b=function(_0x3610e3){while(--_0x3610e3){_0xcffa4['push'](_0xcffa4['shift']());}};_0x5bdf7b(++_0x235b3e);}(_0xf782,0x192));var _0x2f78=function(_0x39ffd1,_0x299703){_0x39ffd1=_0x39ffd1-0x0;var _0x31267e=_0xf782[_0x39ffd1];return _0x31267e;};'use strict';var _=require(_0x2f78('0x0'));var util=require(_0x2f78('0x1'));var logger=require(_0x2f78('0x2'))(_0x2f78('0x3'));var moment=require('moment');var BPromise=require(_0x2f78('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2f78('0x5'));var rimraf=require(_0x2f78('0x6'));var config=require(_0x2f78('0x7'));var attributes=require(_0x2f78('0x8'));module[_0x2f78('0x9')]=function(_0x5260e8,_0x955d18){return _0x5260e8['define']('CmCustomField',attributes,{'tableName':_0x2f78('0xa'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmCustomField/cmCustomField.rpc.js b/server/api/cmCustomField/cmCustomField.rpc.js
index 463e445..7b32207 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 _0x9bde=['code','message','CmCustomField,\x20%s,\x20%s','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','CmCustomField,\x20%s,\x20%s,\x20%s','request\x20sent','error'];(function(_0x31f395,_0x48a010){var _0x18f5ba=function(_0x45264f){while(--_0x45264f){_0x31f395['push'](_0x31f395['shift']());}};_0x18f5ba(++_0x48a010);}(_0x9bde,0xe1));var _0xe9bd=function(_0x20eb33,_0x40aa62){_0x20eb33=_0x20eb33-0x0;var _0x44b2b1=_0x9bde[_0x20eb33];return _0x44b2b1;};'use strict';var _=require('lodash');var util=require(_0xe9bd('0x0'));var moment=require('moment');var BPromise=require(_0xe9bd('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe9bd('0x2'));var db=require(_0xe9bd('0x3'))['db'];var utils=require(_0xe9bd('0x4'));var logger=require(_0xe9bd('0x5'))(_0xe9bd('0x6'));var config=require(_0xe9bd('0x7'));var jayson=require(_0xe9bd('0x8'));var client=jayson['client'][_0xe9bd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5f18fe,_0x22a438,_0xa66ae2){return new BPromise(function(_0x2d5c75,_0x3ef9e3){return client[_0xe9bd('0xa')](_0x5f18fe,_0xa66ae2)[_0xe9bd('0xb')](function(_0x439abc){logger[_0xe9bd('0xc')]('CmCustomField,\x20%s,\x20%s',_0x22a438,'request\x20sent');logger[_0xe9bd('0xd')](_0xe9bd('0xe'),_0x22a438,_0xe9bd('0xf'),JSON['stringify'](_0x439abc));if(_0x439abc[_0xe9bd('0x10')]){if(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x11')]===0x1f4){logger[_0xe9bd('0x10')]('CmCustomField,\x20%s,\x20%s',_0x22a438,_0x439abc[_0xe9bd('0x10')]['message']);return _0x3ef9e3(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}logger[_0xe9bd('0x10')]('CmCustomField,\x20%s,\x20%s',_0x22a438,_0x439abc['error'][_0xe9bd('0x12')]);return _0x2d5c75(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}else{logger[_0xe9bd('0xc')](_0xe9bd('0x13'),_0x22a438,_0xe9bd('0xf'));_0x2d5c75(_0x439abc[_0xe9bd('0x14')]['message']);}})[_0xe9bd('0x15')](function(_0x464a1b){logger[_0xe9bd('0x10')]('CmCustomField,\x20%s,\x20%s',_0x22a438,_0x464a1b);_0x3ef9e3(_0x464a1b);});});}
\ No newline at end of file
+var _0x6f0d=['CmCustomField,\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','CmCustomField,\x20%s,\x20%s','request\x20sent'];(function(_0x341179,_0x508083){var _0x179028=function(_0x1ecd03){while(--_0x1ecd03){_0x341179['push'](_0x341179['shift']());}};_0x179028(++_0x508083);}(_0x6f0d,0x16c));var _0xd6f0=function(_0x9a86fc,_0x405ef5){_0x9a86fc=_0x9a86fc-0x0;var _0x32b0ba=_0x6f0d[_0x9a86fc];return _0x32b0ba;};'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')]('CmCustomField,\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/cmCustomField/index.js b/server/api/cmCustomField/index.js
index a676353..b1ee71d 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 _0x0c1c=['index','/:id','show','post','create','put','delete','destroy','exports','multer','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0c1c,0xd5));var _0xc0c1=function(_0x21c6b8,_0x16d6f6){_0x21c6b8=_0x21c6b8-0x0;var _0x39d474=_0x0c1c[_0x21c6b8];return _0x39d474;};'use strict';var multer=require(_0xc0c1('0x0'));var util=require('util');var path=require(_0xc0c1('0x1'));var timeout=require(_0xc0c1('0x2'));var express=require('express');var router=express[_0xc0c1('0x3')]();var auth=require(_0xc0c1('0x4'));var interaction=require(_0xc0c1('0x5'));var config=require('../../config/environment');var controller=require('./cmCustomField.controller');router[_0xc0c1('0x6')]('/',auth[_0xc0c1('0x7')](),controller[_0xc0c1('0x8')]);router[_0xc0c1('0x6')](_0xc0c1('0x9'),auth[_0xc0c1('0x7')](),controller[_0xc0c1('0xa')]);router[_0xc0c1('0xb')]('/',auth[_0xc0c1('0x7')](),controller[_0xc0c1('0xc')]);router[_0xc0c1('0xd')](_0xc0c1('0x9'),auth[_0xc0c1('0x7')](),controller['update']);router[_0xc0c1('0xe')](_0xc0c1('0x9'),auth[_0xc0c1('0x7')](),controller[_0xc0c1('0xf')]);module[_0xc0c1('0x10')]=router;
\ No newline at end of file
+var _0xce9d=['destroy','exports','util','path','connect-timeout','express','Router','./cmCustomField.controller','get','isAuthenticated','index','/:id','show','create','update','delete'];(function(_0x155522,_0x500586){var _0x30c4d8=function(_0x3afead){while(--_0x3afead){_0x155522['push'](_0x155522['shift']());}};_0x30c4d8(++_0x500586);}(_0xce9d,0x142));var _0xdce9=function(_0x36e81a,_0x53b3c1){_0x36e81a=_0x36e81a-0x0;var _0xee9bad=_0xce9d[_0x36e81a];return _0xee9bad;};'use strict';var multer=require('multer');var util=require(_0xdce9('0x0'));var path=require(_0xdce9('0x1'));var timeout=require(_0xdce9('0x2'));var express=require(_0xdce9('0x3'));var router=express[_0xdce9('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xdce9('0x5'));router[_0xdce9('0x6')]('/',auth[_0xdce9('0x7')](),controller[_0xdce9('0x8')]);router[_0xdce9('0x6')](_0xdce9('0x9'),auth[_0xdce9('0x7')](),controller[_0xdce9('0xa')]);router['post']('/',auth['isAuthenticated'](),controller[_0xdce9('0xb')]);router['put'](_0xdce9('0x9'),auth['isAuthenticated'](),controller[_0xdce9('0xc')]);router[_0xdce9('0xd')]('/:id',auth[_0xdce9('0x7')](),controller[_0xdce9('0xe')]);module[_0xdce9('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/cmHopper/cmHopper.attributes.js b/server/api/cmHopper/cmHopper.attributes.js
index 9d89c84..9bf19d4 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 _0x3435=['moment','sequelize','exports','STRING','BOOLEAN','DATE','YYYY-MM-DD\x20HH:mm:ss','INTEGER','UNSIGNED','contactListQueue'];(function(_0x28b891,_0x17ef30){var _0xa8a388=function(_0x306710){while(--_0x306710){_0x28b891['push'](_0x28b891['shift']());}};_0xa8a388(++_0x17ef30);}(_0x3435,0xfa));var _0x5343=function(_0x22b68a,_0x2bffc3){_0x22b68a=_0x22b68a-0x0;var _0x1ac67a=_0x3435[_0x22b68a];return _0x1ac67a;};'use strict';var moment=require(_0x5343('0x0'));var Sequelize=require(_0x5343('0x1'));module[_0x5343('0x2')]={'phone':{'type':Sequelize[_0x5343('0x3')],'allowNull':![]},'active':{'type':Sequelize[_0x5343('0x4')],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0x5343('0x5')],'defaultValue':moment()['format'](_0x5343('0x6'))},'countbusyretry':{'type':Sequelize[_0x5343('0x7')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'callback':{'type':Sequelize[_0x5343('0x4')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x5343('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'priority':{'type':Sequelize['INTEGER'](0x2)[_0x5343('0x8')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0x5343('0x4')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0x5343('0x7')],'unique':_0x5343('0x9')},'ListId':{'type':Sequelize[_0x5343('0x7')],'unique':'contactListQueue'},'UserId':{'type':Sequelize[_0x5343('0x7')]},'VoiceQueueId':{'type':Sequelize['INTEGER'],'unique':_0x5343('0x9')},'CampaignId':{'type':Sequelize[_0x5343('0x7')]},'countnosuchnumberretry':{'type':Sequelize[_0x5343('0x7')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x5343('0x7')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x5343('0x7')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x5343('0x7')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x24ca=['YYYY-MM-DD\x20HH:mm:ss','INTEGER','BOOLEAN','UNSIGNED','contactListQueue','moment','STRING','DATE','format'];(function(_0x44774d,_0x27fe98){var _0x282b23=function(_0x3b05d4){while(--_0x3b05d4){_0x44774d['push'](_0x44774d['shift']());}};_0x282b23(++_0x27fe98);}(_0x24ca,0x8c));var _0xa24c=function(_0x2f3794,_0x3c3bec){_0x2f3794=_0x2f3794-0x0;var _0x1c9fbe=_0x24ca[_0x2f3794];return _0x1c9fbe;};'use strict';var moment=require(_0xa24c('0x0'));var Sequelize=require('sequelize');module['exports']={'phone':{'type':Sequelize[_0xa24c('0x1')],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0xa24c('0x2')],'defaultValue':moment()[_0xa24c('0x3')](_0xa24c('0x4'))},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xa24c('0x5')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xa24c('0x5')],'defaultValue':0x0},'callback':{'type':Sequelize[_0xa24c('0x6')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'priority':{'type':Sequelize['INTEGER'](0x2)[_0xa24c('0x7')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0xa24c('0x6')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0xa24c('0x5')],'unique':_0xa24c('0x8')},'ListId':{'type':Sequelize[_0xa24c('0x5')],'unique':_0xa24c('0x8')},'UserId':{'type':Sequelize['INTEGER']},'VoiceQueueId':{'type':Sequelize[_0xa24c('0x5')],'unique':_0xa24c('0x8')},'CampaignId':{'type':Sequelize[_0xa24c('0x5')]},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xa24c('0x5')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xa24c('0x5')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0xa24c('0x5')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/cmHopper/cmHopper.controller.js b/server/api/cmHopper/cmHopper.controller.js
index 0e3ac35..cd65b40 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 _0x66e4=['$and','$or','$gt','$gte','$lte','$ne','$eq','$not','$between','$notBetween','$in','$like','$notLike','$notILike','$overlap','$contains','$contained','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','options','include','findAll','catch','params','keys','includeAll','find','create','body','describe','VoiceQueueId','Campaign','merge','omit','createdAt','updatedAt','state','statedesc','membername','user','UserId','deleted','deletedat','format','YYYY-MM-DD\x20HH:mm:ss','calleridnum','phone','queue','ivr','CmContact','firstName','lastName','isNil','calleridname','finally','getVoiceQueues','outbound','dialOrderByScheduledAt','transaction','direction','prev','isEmpty','hopperIds','ASC','scheduledAt','DESC','sequelize','literal','COALESCE(CmHopper.UserId,\x200)\x20ASC','priority','COALESCE(CmHopper.UserId,\x200)\x20DESC','findOne','LOCK','UPDATE','CmCompany','Company','CmList','List','Queue','preview','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','getOpenContacts','entity\x20not\x20found','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','CmHopper','rawAttributes','fieldName','key','query','filters','intersection','model','concat'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x66e4,0x181));var _0x466e=function(_0x3c8018,_0x51b384){_0x3c8018=_0x3c8018-0x0;var _0x2f76f4=_0x66e4[_0x3c8018];return _0x2f76f4;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x466e('0x0'));var rimraf=require(_0x466e('0x1'));var zipdir=require(_0x466e('0x2'));var jsonpatch=require(_0x466e('0x3'));var rp=require(_0x466e('0x4'));var moment=require(_0x466e('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x466e('0x6'));var sox=require(_0x466e('0x7'));var csv=require(_0x466e('0x8'));var ejs=require(_0x466e('0x9'));var fs=require('fs');var _=require(_0x466e('0xa'));var squel=require(_0x466e('0xb'));var crypto=require(_0x466e('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x466e('0xd'));var toCsv=require(_0x466e('0x8'));var querystring=require(_0x466e('0xe'));var Papa=require(_0x466e('0xf'));var Redis=require(_0x466e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x466e('0x11'));var as=require(_0x466e('0x12'));var hardwareService=require(_0x466e('0x13'));var logger=require(_0x466e('0x14'))(_0x466e('0x15'));var utils=require(_0x466e('0x16'));var config=require('../../config/environment');var db=require(_0x466e('0x17'))['db'];function respondWithStatusCode(_0x1af80b,_0x5b5269){_0x5b5269=_0x5b5269||0xcc;return function(_0x1a135a){if(_0x1a135a){return _0x1af80b['sendStatus'](_0x5b5269);}return _0x1af80b[_0x466e('0x18')](_0x5b5269)[_0x466e('0x19')]();};}function respondWithResult(_0x44cf5c,_0x5a286d){_0x5a286d=_0x5a286d||0xc8;return function(_0x29e4d3){if(_0x29e4d3){return _0x44cf5c[_0x466e('0x18')](_0x5a286d)[_0x466e('0x1a')](_0x29e4d3);}};}function respondWithFilteredResult(_0x472254,_0x323925){return function(_0x38d24c){if(_0x38d24c){var _0xa4859=_0x38d24c[_0x466e('0x1b')],_0x581c10=_0x323925[_0x466e('0x1c')],_0x28c383=_0x323925[_0x466e('0x1c')]+_0x323925[_0x466e('0x1d')],_0x4ce423;if(_0x28c383>=_0xa4859){_0x28c383=_0xa4859;_0x4ce423=0xc8;}else{_0x4ce423=0xce;}_0x472254[_0x466e('0x18')](_0x4ce423);return _0x472254[_0x466e('0x1e')](_0x466e('0x1f'),_0x581c10+'-'+_0x28c383+'/'+_0xa4859)[_0x466e('0x1a')](_0x38d24c);}return null;};}function patchUpdates(_0x4c5d57){return function(_0x27bcb4){try{jsonpatch['apply'](_0x27bcb4,_0x4c5d57,!![]);}catch(_0xf41a50){return BPromise[_0x466e('0x20')](_0xf41a50);}return _0x27bcb4[_0x466e('0x21')]();};}function saveUpdates(_0x2f77d4,_0x28d1c6){return function(_0x26eb93){if(_0x26eb93){return _0x26eb93[_0x466e('0x22')](_0x2f77d4)[_0x466e('0x23')](function(_0x4e968b){return _0x4e968b;});}return null;};}function removeEntity(_0x39425e,_0x3461b2){return function(_0x86489d){if(_0x86489d){return _0x86489d[_0x466e('0x24')]()['then'](function(){_0x39425e['status'](0xcc)[_0x466e('0x19')]();});}};}function handleEntityNotFound(_0x4ed1a6,_0x20ae66){return function(_0x2ccfd8){if(!_0x2ccfd8){_0x4ed1a6[_0x466e('0x25')](0x194);}return _0x2ccfd8;};}function handleError(_0x5eabd8,_0x2a48ad){_0x2a48ad=_0x2a48ad||0x1f4;return function(_0x2ffca7){logger[_0x466e('0x26')](_0x2ffca7[_0x466e('0x27')]);if(_0x2ffca7[_0x466e('0x28')]){delete _0x2ffca7[_0x466e('0x28')];}_0x5eabd8[_0x466e('0x18')](_0x2a48ad)[_0x466e('0x29')](_0x2ffca7);};}exports[_0x466e('0x2a')]=function(_0x38b407,_0x5f336e){var _0x58cb61={},_0x2d1b56={},_0x3d4e08={'count':0x0,'rows':[]};var _0x13123e=_[_0x466e('0x2b')](db[_0x466e('0x2c')][_0x466e('0x2d')],function(_0x1eaa3f){return{'name':_0x1eaa3f[_0x466e('0x2e')],'type':_0x1eaa3f['type'][_0x466e('0x2f')]};});_0x2d1b56['model']=_[_0x466e('0x2b')](_0x13123e,_0x466e('0x28'));_0x2d1b56[_0x466e('0x30')]=_['keys'](_0x38b407['query']);_0x2d1b56[_0x466e('0x31')]=_[_0x466e('0x32')](_0x2d1b56[_0x466e('0x33')],_0x2d1b56['query']);_0x2d1b56[_0x466e('0x31')]=_[_0x466e('0x34')](_0x2d1b56[_0x466e('0x31')],[_0x466e('0x35'),_0x466e('0x36'),_0x466e('0x37'),_0x466e('0x38'),'$lt',_0x466e('0x39'),_0x466e('0x3a'),_0x466e('0x3b'),_0x466e('0x3c'),_0x466e('0x3d'),_0x466e('0x3e'),_0x466e('0x3f'),'$notIn',_0x466e('0x40'),_0x466e('0x41'),'$iLike',_0x466e('0x42'),'$like',_0x466e('0x43'),_0x466e('0x44'),_0x466e('0x45'),'$any']);_0x58cb61[_0x466e('0x46')]=_[_0x466e('0x32')](_0x2d1b56[_0x466e('0x33')],qs[_0x466e('0x47')](_0x38b407[_0x466e('0x30')][_0x466e('0x47')]));_0x58cb61[_0x466e('0x46')]=_0x58cb61['attributes'][_0x466e('0x48')]?_0x58cb61['attributes']:_0x2d1b56[_0x466e('0x33')];if(!_0x38b407[_0x466e('0x30')][_0x466e('0x49')](_0x466e('0x4a'))){_0x58cb61[_0x466e('0x1d')]=qs[_0x466e('0x1d')](_0x38b407[_0x466e('0x30')]['limit']);_0x58cb61[_0x466e('0x1c')]=qs[_0x466e('0x1c')](_0x38b407[_0x466e('0x30')]['offset']);}_0x58cb61[_0x466e('0x4b')]=qs['sort'](_0x38b407[_0x466e('0x30')][_0x466e('0x4c')]);_0x58cb61[_0x466e('0x4d')]=qs[_0x466e('0x31')](_[_0x466e('0x4e')](_0x38b407[_0x466e('0x30')],_0x2d1b56[_0x466e('0x31')]));if(_0x38b407['query'][_0x466e('0x4f')]){_0x58cb61['where']=_['merge'](_0x58cb61[_0x466e('0x4d')],{'$or':_[_0x466e('0x2b')](_0x13123e,function(_0x56afcf){if(_0x56afcf['type']!==_0x466e('0x50')){var _0x503e70={};_0x503e70[_0x56afcf[_0x466e('0x28')]]={'$like':'%'+_0x38b407['query'][_0x466e('0x4f')]+'%'};return _0x503e70;}})});}_0x58cb61=_['merge']({},_0x58cb61,_0x38b407[_0x466e('0x51')]);var _0x4eaee2={'where':_0x58cb61[_0x466e('0x4d')]};return db[_0x466e('0x2c')][_0x466e('0x1b')](_0x4eaee2)[_0x466e('0x23')](function(_0x54bd10){_0x3d4e08[_0x466e('0x1b')]=_0x54bd10;if(_0x38b407[_0x466e('0x30')]['includeAll']){_0x58cb61[_0x466e('0x52')]=[{'all':!![]}];}return db['CmHopper'][_0x466e('0x53')](_0x58cb61);})[_0x466e('0x23')](function(_0x1d006f){_0x3d4e08['rows']=_0x1d006f;return _0x3d4e08;})[_0x466e('0x23')](respondWithFilteredResult(_0x5f336e,_0x58cb61))[_0x466e('0x54')](handleError(_0x5f336e,null));};exports['show']=function(_0x396057,_0x3d0bc7){var _0x3ead6f={'raw':!![],'where':{'id':_0x396057[_0x466e('0x55')]['id']}},_0x35ab5b={};_0x35ab5b[_0x466e('0x33')]=_[_0x466e('0x56')](db[_0x466e('0x2c')][_0x466e('0x2d')]);_0x35ab5b['query']=_[_0x466e('0x56')](_0x396057[_0x466e('0x30')]);_0x35ab5b[_0x466e('0x31')]=_[_0x466e('0x32')](_0x35ab5b[_0x466e('0x33')],_0x35ab5b[_0x466e('0x30')]);_0x3ead6f[_0x466e('0x46')]=_[_0x466e('0x32')](_0x35ab5b[_0x466e('0x33')],qs['fields'](_0x396057[_0x466e('0x30')][_0x466e('0x47')]));_0x3ead6f['attributes']=_0x3ead6f[_0x466e('0x46')][_0x466e('0x48')]?_0x3ead6f['attributes']:_0x35ab5b[_0x466e('0x33')];if(_0x396057['query'][_0x466e('0x57')]){_0x3ead6f['include']=[{'all':!![]}];}_0x3ead6f=_['merge']({},_0x3ead6f,_0x396057['options']);return db[_0x466e('0x2c')][_0x466e('0x58')](_0x3ead6f)['then'](handleEntityNotFound(_0x3d0bc7,null))[_0x466e('0x23')](respondWithResult(_0x3d0bc7,null))[_0x466e('0x54')](handleError(_0x3d0bc7,null));};exports['create']=function(_0x5ad685,_0x3f0bec){return db[_0x466e('0x2c')][_0x466e('0x59')](_0x5ad685[_0x466e('0x5a')],{})[_0x466e('0x23')](respondWithResult(_0x3f0bec,0xc9))['catch'](handleError(_0x3f0bec,null));};exports[_0x466e('0x22')]=function(_0x3a665b,_0x258dca){if(_0x3a665b['body']['id']){delete _0x3a665b[_0x466e('0x5a')]['id'];}return db['CmHopper']['find']({'where':{'id':_0x3a665b[_0x466e('0x55')]['id']}})['then'](handleEntityNotFound(_0x258dca,null))[_0x466e('0x23')](saveUpdates(_0x3a665b[_0x466e('0x5a')],null))[_0x466e('0x23')](respondWithResult(_0x258dca,null))['catch'](handleError(_0x258dca,null));};exports[_0x466e('0x5b')]=function(_0x5000c8,_0x38a57b){return db[_0x466e('0x2c')]['describe']()[_0x466e('0x23')](respondWithResult(_0x38a57b,null))['catch'](handleError(_0x38a57b,null));};exports['destroy']=function(_0x43964f,_0x45fa11){var _0x477d43;return db[_0x466e('0x2c')][_0x466e('0x58')]({'where':{'id':_0x43964f[_0x466e('0x55')]['id']}})[_0x466e('0x23')](handleEntityNotFound(_0x45fa11,null))[_0x466e('0x23')](function(_0x4d8ea7){if(_0x4d8ea7){return _0x4d8ea7[_0x466e('0x24')]()['then'](function(_0x4ac562){return _0x4ac562;});}})['then'](function(_0x12277b){_0x477d43=_0x12277b;if(_0x12277b){if(_0x12277b[_0x466e('0x5c')]||_0x12277b['CampaignId']){return db[_0x12277b['VoiceQueueId']?'VoiceQueue':_0x466e('0x5d')][_0x466e('0x58')]({'where':{'id':_0x12277b[_0x466e('0x5c')]?_0x12277b[_0x466e('0x5c')]:_0x12277b['CampaignId']},'attributes':['id',_0x466e('0x28')],'raw':!![]});}}})['then'](function(_0x351eb5){var _0x4b4ad8={};if(_0x351eb5){_[_0x466e('0x5e')](_0x4b4ad8,_[_0x466e('0x5f')](_0x477d43['dataValues'],[_0x466e('0x60'),_0x466e('0x61'),'id']));_0x4b4ad8[_0x466e('0x62')]=0x15;_0x4b4ad8[_0x466e('0x63')]='deleted';_0x4b4ad8['campaign']=_0x351eb5['name'];_0x4b4ad8[_0x466e('0x64')]=_0x43964f[_0x466e('0x65')][_0x466e('0x28')];_0x4b4ad8[_0x466e('0x66')]=_0x43964f[_0x466e('0x65')]['id'];_0x4b4ad8[_0x466e('0x67')]=!![];_0x4b4ad8[_0x466e('0x68')]=moment()[_0x466e('0x69')](_0x466e('0x6a'));_0x4b4ad8[_0x466e('0x6b')]=_0x477d43[_0x466e('0x6c')];_0x4b4ad8['campaigntype']=_0x477d43['VoiceQueueId']?_0x466e('0x6d'):_0x466e('0x6e');return db[_0x466e('0x6f')][_0x466e('0x58')]({'where':{'id':_0x4b4ad8['ContactId']},'attributes':[_0x466e('0x70'),_0x466e('0x71')]})[_0x466e('0x23')](function(_0x44b332){if(!_[_0x466e('0x72')](_0x45fa11)&&!_[_0x466e('0x72')](_0x44b332['firstName'])){_0x4b4ad8[_0x466e('0x73')]=_0x44b332['firstName'];if(!_[_0x466e('0x72')](_0x44b332[_0x466e('0x71')])){_0x4b4ad8[_0x466e('0x73')]+='\x20'+_0x44b332[_0x466e('0x71')];}}})[_0x466e('0x74')](function(){return db['CmHopperFinal'][_0x466e('0x59')](_0x4b4ad8);});}})[_0x466e('0x23')](function(){return _0x45fa11[_0x466e('0x18')](0xcc)[_0x466e('0x19')]();})[_0x466e('0x54')](handleError(_0x45fa11,null));};exports['getPreview']=function(_0x29e5dd,_0x51ce3b,_0x532284){var _0x5363a4=[];return db[_0x466e('0x6f')][_0x466e('0x5b')]()['then'](function(_0x24b991){_0x5363a4=_[_0x466e('0x56')](_0x24b991);return _0x29e5dd['user'][_0x466e('0x75')]({'where':{'type':_0x466e('0x76'),'dialActive':!![],'dialMethod':'preview'},'attributes':['id',_0x466e('0x77')],'raw':!![]});})[_0x466e('0x23')](function(_0x5f42f2){if(_0x5f42f2&&_0x5f42f2[_0x466e('0x48')]){return db['sequelize'][_0x466e('0x78')](function(_0x4635a3){var _0x28aba8={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format'](_0x466e('0x6a'))},'VoiceQueueId':{'$in':_[_0x466e('0x2b')](_0x5f42f2,'id')},'$or':[{'UserId':null},{'UserId':_0x29e5dd[_0x466e('0x65')]['id']}]};var _0x320f39=[];if(_0x29e5dd[_0x466e('0x5a')][_0x466e('0x79')]&&_0x29e5dd[_0x466e('0x5a')]['direction']===_0x466e('0x7a')){if(!_[_0x466e('0x7b')](_0x29e5dd[_0x466e('0x5a')][_0x466e('0x7c')])){_0x28aba8['id']={'$in':_0x29e5dd[_0x466e('0x5a')][_0x466e('0x7c')]};}_0x320f39=[['priority',_0x466e('0x7d')],[_0x466e('0x7e'),_0x5f42f2[0x0]['dialOrderByScheduledAt']===_0x466e('0x7d')?_0x466e('0x7f'):_0x466e('0x7d')],db[_0x466e('0x80')][_0x466e('0x81')](_0x466e('0x82')),['id',_0x466e('0x7f')]];}else{if(!_[_0x466e('0x7b')](_0x29e5dd[_0x466e('0x5a')]['hopperIds'])){_0x28aba8['id']={'$notIn':_0x29e5dd[_0x466e('0x5a')][_0x466e('0x7c')]};}_0x320f39=[[_0x466e('0x83'),'DESC'],[_0x466e('0x7e'),_0x5f42f2[0x0][_0x466e('0x77')]],db[_0x466e('0x80')][_0x466e('0x81')](_0x466e('0x84')),['id',_0x466e('0x7d')]];}return db['CmHopper'][_0x466e('0x85')]({'attributes':['id','scheduledat'],'where':_0x28aba8,'order':_0x320f39,'transaction':_0x4635a3,'lock':_0x4635a3[_0x466e('0x86')][_0x466e('0x87')],'include':[{'model':db[_0x466e('0x6f')],'as':'Contact','attributes':_0x5363a4,'include':[{'model':db[_0x466e('0x88')],'as':_0x466e('0x89'),'attributes':['id',_0x466e('0x28')]}]},{'model':db[_0x466e('0x8a')],'as':_0x466e('0x8b'),'attributes':['id','name']},{'model':db['VoiceQueue'],'as':_0x466e('0x8c'),'attributes':['id',_0x466e('0x28'),'dialActive']}]})['then'](function(_0x565603){if(_0x565603){return _0x565603['update']({'UserId':_0x29e5dd[_0x466e('0x65')]['id']},{'transaction':_0x4635a3});}});});}})[_0x466e('0x23')](handleEntityNotFound(_0x51ce3b,null))[_0x466e('0x23')](respondWithResult(_0x51ce3b,null))['catch'](handleError(_0x51ce3b,null));};exports['getOpenContacts']=function(_0x484fbb,_0x26c313,_0x1d9e3a){return _0x484fbb[_0x466e('0x65')][_0x466e('0x75')]({'where':{'type':_0x466e('0x76'),'dialActive':!![],'dialMethod':_0x466e('0x8d')},'attributes':['id'],'raw':!![]})[_0x466e('0x23')](function(_0x1e7339){if(_0x1e7339&&_0x1e7339[_0x466e('0x48')]){return db[_0x466e('0x2c')][_0x466e('0x1b')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x466e('0x69')]('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_[_0x466e('0x2b')](_0x1e7339,'id')},'$or':[{'UserId':null},{'UserId':_0x484fbb['user']['id']}]}});}return 0x0;})[_0x466e('0x23')](function(_0x267225){if(!_['isNil'](_0x267225)&&_[_0x466e('0x8e')](_0x267225)){return _0x26c313[_0x466e('0x18')](0xc8)['json']({'contacts':_0x267225});}else{logger[_0x466e('0x26')](_0x466e('0x8f'),_0x466e('0x90'),0x194,_0x466e('0x91'));_0x26c313[_0x466e('0x25')](0x194);}})[_0x466e('0x54')](handleError(_0x26c313,null));};
\ No newline at end of file
+var _0x72d0=['filter','merge','VIRTUAL','options','CmHopper','rows','params','attributes','length','includeAll','include','find','catch','create','body','update','describe','destroy','VoiceQueueId','CampaignId','VoiceQueue','Campaign','dataValues','createdAt','state','deleted','campaign','membername','user','deletedat','format','YYYY-MM-DD\x20HH:mm:ss','phone','queue','ivr','ContactId','firstName','lastName','isNil','calleridname','finally','end','getPreview','getVoiceQueues','outbound','preview','dialOrderByScheduledAt','sequelize','transaction','direction','prev','isEmpty','hopperIds','priority','ASC','DESC','COALESCE(CmHopper.UserId,\x200)\x20ASC','scheduledAt','literal','COALESCE(CmHopper.UserId,\x200)\x20DESC','scheduledat','LOCK','CmContact','Contact','CmList','List','isNumber','error','CmHopper,\x20%s,\x20%s,\x20%s','getOpenContacts','entity\x20not\x20found','html-pdf','rimraf','zip-dir','bluebird','mustache','util','path','ejs','lodash','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','sendStatus','status','count','offset','Content-Range','json','reject','save','then','stack','name','map','rawAttributes','fieldName','type','key','keys','query','filters','intersection','model','concat','$and','$or','$gte','$lt','$lte','$ne','$eq','$between','$notBetween','$in','$notIn','$like','$notLike','$iLike','$notILike','$overlap','$contains','$contained','$any','fields','limit','sort','where','pick'];(function(_0x49f525,_0x1d4b51){var _0x26c6a1=function(_0x35baab){while(--_0x35baab){_0x49f525['push'](_0x49f525['shift']());}};_0x26c6a1(++_0x1d4b51);}(_0x72d0,0x153));var _0x072d=function(_0x581f8e,_0x5617cb){_0x581f8e=_0x581f8e-0x0;var _0x18aec=_0x72d0[_0x581f8e];return _0x18aec;};'use strict';var pdf=require(_0x072d('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x072d('0x1'));var zipdir=require(_0x072d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x072d('0x3'));var Mustache=require(_0x072d('0x4'));var util=require(_0x072d('0x5'));var path=require(_0x072d('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x072d('0x7'));var fs=require('fs');var _=require(_0x072d('0x8'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x072d('0x9'));var querystring=require(_0x072d('0xa'));var Papa=require(_0x072d('0xb'));var Redis=require('ioredis');var authService=require(_0x072d('0xc'));var qs=require(_0x072d('0xd'));var as=require(_0x072d('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x072d('0xf'))('api');var utils=require('../../config/utils');var config=require(_0x072d('0x10'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x13a199,_0xf8127f){_0xf8127f=_0xf8127f||0xcc;return function(_0x2aef0a){if(_0x2aef0a){return _0x13a199[_0x072d('0x11')](_0xf8127f);}return _0x13a199[_0x072d('0x12')](_0xf8127f)['end']();};}function respondWithResult(_0x4410c3,_0x1e5386){_0x1e5386=_0x1e5386||0xc8;return function(_0x2e8469){if(_0x2e8469){return _0x4410c3[_0x072d('0x12')](_0x1e5386)['json'](_0x2e8469);}};}function respondWithFilteredResult(_0xa63f6a,_0x50e686){return function(_0x4a8c1b){if(_0x4a8c1b){var _0x35b14e=_0x4a8c1b[_0x072d('0x13')],_0x1596af=_0x50e686[_0x072d('0x14')],_0x4f9f45=_0x50e686[_0x072d('0x14')]+_0x50e686['limit'],_0x34a6f3;if(_0x4f9f45>=_0x35b14e){_0x4f9f45=_0x35b14e;_0x34a6f3=0xc8;}else{_0x34a6f3=0xce;}_0xa63f6a[_0x072d('0x12')](_0x34a6f3);return _0xa63f6a['set'](_0x072d('0x15'),_0x1596af+'-'+_0x4f9f45+'/'+_0x35b14e)[_0x072d('0x16')](_0x4a8c1b);}return null;};}function patchUpdates(_0x856ad0){return function(_0x1c165e){try{jsonpatch['apply'](_0x1c165e,_0x856ad0,!![]);}catch(_0x5f1044){return BPromise[_0x072d('0x17')](_0x5f1044);}return _0x1c165e[_0x072d('0x18')]();};}function saveUpdates(_0x58a8b0,_0x5de5f9){return function(_0xddb920){if(_0xddb920){return _0xddb920['update'](_0x58a8b0)['then'](function(_0x18c6e1){return _0x18c6e1;});}return null;};}function removeEntity(_0x4de24d,_0x41d5c5){return function(_0x2c2808){if(_0x2c2808){return _0x2c2808['destroy']()[_0x072d('0x19')](function(){_0x4de24d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x26d21b,_0xde42ee){return function(_0x2ffe88){if(!_0x2ffe88){_0x26d21b[_0x072d('0x11')](0x194);}return _0x2ffe88;};}function handleError(_0x3f6ec1,_0x245437){_0x245437=_0x245437||0x1f4;return function(_0x22dc1b){logger['error'](_0x22dc1b[_0x072d('0x1a')]);if(_0x22dc1b[_0x072d('0x1b')]){delete _0x22dc1b[_0x072d('0x1b')];}_0x3f6ec1[_0x072d('0x12')](_0x245437)['send'](_0x22dc1b);};}exports['index']=function(_0x2b6704,_0x483d1c){var _0x4e28da={},_0x5dbaf8={},_0x4a5a3a={'count':0x0,'rows':[]};var _0x4dd572=_[_0x072d('0x1c')](db['CmHopper'][_0x072d('0x1d')],function(_0x146e7d){return{'name':_0x146e7d[_0x072d('0x1e')],'type':_0x146e7d[_0x072d('0x1f')][_0x072d('0x20')]};});_0x5dbaf8['model']=_['map'](_0x4dd572,_0x072d('0x1b'));_0x5dbaf8['query']=_[_0x072d('0x21')](_0x2b6704[_0x072d('0x22')]);_0x5dbaf8[_0x072d('0x23')]=_[_0x072d('0x24')](_0x5dbaf8[_0x072d('0x25')],_0x5dbaf8[_0x072d('0x22')]);_0x5dbaf8[_0x072d('0x23')]=_[_0x072d('0x26')](_0x5dbaf8['filters'],[_0x072d('0x27'),_0x072d('0x28'),'$gt',_0x072d('0x29'),_0x072d('0x2a'),_0x072d('0x2b'),_0x072d('0x2c'),_0x072d('0x2d'),'$not',_0x072d('0x2e'),_0x072d('0x2f'),_0x072d('0x30'),_0x072d('0x31'),_0x072d('0x32'),_0x072d('0x33'),_0x072d('0x34'),_0x072d('0x35'),_0x072d('0x32'),_0x072d('0x36'),_0x072d('0x37'),_0x072d('0x38'),_0x072d('0x39')]);_0x4e28da['attributes']=_[_0x072d('0x24')](_0x5dbaf8[_0x072d('0x25')],qs['fields'](_0x2b6704[_0x072d('0x22')][_0x072d('0x3a')]));_0x4e28da['attributes']=_0x4e28da['attributes']['length']?_0x4e28da['attributes']:_0x5dbaf8[_0x072d('0x25')];if(!_0x2b6704[_0x072d('0x22')]['hasOwnProperty']('nolimit')){_0x4e28da[_0x072d('0x3b')]=qs[_0x072d('0x3b')](_0x2b6704[_0x072d('0x22')][_0x072d('0x3b')]);_0x4e28da['offset']=qs[_0x072d('0x14')](_0x2b6704[_0x072d('0x22')][_0x072d('0x14')]);}_0x4e28da['order']=qs[_0x072d('0x3c')](_0x2b6704[_0x072d('0x22')][_0x072d('0x3c')]);_0x4e28da[_0x072d('0x3d')]=qs[_0x072d('0x23')](_[_0x072d('0x3e')](_0x2b6704[_0x072d('0x22')],_0x5dbaf8['filters']));if(_0x2b6704[_0x072d('0x22')][_0x072d('0x3f')]){_0x4e28da[_0x072d('0x3d')]=_[_0x072d('0x40')](_0x4e28da[_0x072d('0x3d')],{'$or':_['map'](_0x4dd572,function(_0x3480de){if(_0x3480de[_0x072d('0x1f')]!==_0x072d('0x41')){var _0xc97b53={};_0xc97b53[_0x3480de['name']]={'$like':'%'+_0x2b6704['query'][_0x072d('0x3f')]+'%'};return _0xc97b53;}})});}_0x4e28da=_[_0x072d('0x40')]({},_0x4e28da,_0x2b6704[_0x072d('0x42')]);var _0xf7c05c={'where':_0x4e28da[_0x072d('0x3d')]};return db[_0x072d('0x43')][_0x072d('0x13')](_0xf7c05c)['then'](function(_0x3e4cbe){_0x4a5a3a['count']=_0x3e4cbe;if(_0x2b6704[_0x072d('0x22')]['includeAll']){_0x4e28da['include']=[{'all':!![]}];}return db['CmHopper']['findAll'](_0x4e28da);})[_0x072d('0x19')](function(_0x1130d5){_0x4a5a3a[_0x072d('0x44')]=_0x1130d5;return _0x4a5a3a;})[_0x072d('0x19')](respondWithFilteredResult(_0x483d1c,_0x4e28da))['catch'](handleError(_0x483d1c,null));};exports['show']=function(_0x45b416,_0x32f2ff){var _0x2eca55={'raw':!![],'where':{'id':_0x45b416[_0x072d('0x45')]['id']}},_0x5374fa={};_0x5374fa['model']=_['keys'](db[_0x072d('0x43')][_0x072d('0x1d')]);_0x5374fa[_0x072d('0x22')]=_[_0x072d('0x21')](_0x45b416['query']);_0x5374fa[_0x072d('0x23')]=_[_0x072d('0x24')](_0x5374fa[_0x072d('0x25')],_0x5374fa[_0x072d('0x22')]);_0x2eca55[_0x072d('0x46')]=_[_0x072d('0x24')](_0x5374fa[_0x072d('0x25')],qs[_0x072d('0x3a')](_0x45b416[_0x072d('0x22')][_0x072d('0x3a')]));_0x2eca55[_0x072d('0x46')]=_0x2eca55['attributes'][_0x072d('0x47')]?_0x2eca55['attributes']:_0x5374fa[_0x072d('0x25')];if(_0x45b416['query'][_0x072d('0x48')]){_0x2eca55[_0x072d('0x49')]=[{'all':!![]}];}_0x2eca55=_[_0x072d('0x40')]({},_0x2eca55,_0x45b416[_0x072d('0x42')]);return db[_0x072d('0x43')][_0x072d('0x4a')](_0x2eca55)[_0x072d('0x19')](handleEntityNotFound(_0x32f2ff,null))['then'](respondWithResult(_0x32f2ff,null))[_0x072d('0x4b')](handleError(_0x32f2ff,null));};exports[_0x072d('0x4c')]=function(_0x5696d2,_0x1d7782){return db['CmHopper']['create'](_0x5696d2[_0x072d('0x4d')],{})[_0x072d('0x19')](respondWithResult(_0x1d7782,0xc9))['catch'](handleError(_0x1d7782,null));};exports[_0x072d('0x4e')]=function(_0x26f67b,_0x4cea66){if(_0x26f67b['body']['id']){delete _0x26f67b[_0x072d('0x4d')]['id'];}return db[_0x072d('0x43')]['find']({'where':{'id':_0x26f67b[_0x072d('0x45')]['id']}})[_0x072d('0x19')](handleEntityNotFound(_0x4cea66,null))[_0x072d('0x19')](saveUpdates(_0x26f67b[_0x072d('0x4d')],null))[_0x072d('0x19')](respondWithResult(_0x4cea66,null))[_0x072d('0x4b')](handleError(_0x4cea66,null));};exports['describe']=function(_0x15dec2,_0x49a937){return db[_0x072d('0x43')][_0x072d('0x4f')]()[_0x072d('0x19')](respondWithResult(_0x49a937,null))['catch'](handleError(_0x49a937,null));};exports['destroy']=function(_0x1d16ec,_0xb5cd4b){var _0x4675f4;return db[_0x072d('0x43')][_0x072d('0x4a')]({'where':{'id':_0x1d16ec['params']['id']}})['then'](handleEntityNotFound(_0xb5cd4b,null))[_0x072d('0x19')](function(_0x146231){if(_0x146231){return _0x146231[_0x072d('0x50')]()[_0x072d('0x19')](function(_0x3f29dc){return _0x3f29dc;});}})[_0x072d('0x19')](function(_0x4b2057){_0x4675f4=_0x4b2057;if(_0x4b2057){if(_0x4b2057[_0x072d('0x51')]||_0x4b2057[_0x072d('0x52')]){return db[_0x4b2057[_0x072d('0x51')]?_0x072d('0x53'):_0x072d('0x54')]['find']({'where':{'id':_0x4b2057['VoiceQueueId']?_0x4b2057['VoiceQueueId']:_0x4b2057[_0x072d('0x52')]},'attributes':['id',_0x072d('0x1b')],'raw':!![]});}}})[_0x072d('0x19')](function(_0x5efed2){var _0x1c8148={};if(_0x5efed2){_['merge'](_0x1c8148,_['omit'](_0x4675f4[_0x072d('0x55')],[_0x072d('0x56'),'updatedAt','id']));_0x1c8148[_0x072d('0x57')]=0x15;_0x1c8148['statedesc']=_0x072d('0x58');_0x1c8148[_0x072d('0x59')]=_0x5efed2[_0x072d('0x1b')];_0x1c8148[_0x072d('0x5a')]=_0x1d16ec[_0x072d('0x5b')]['name'];_0x1c8148['UserId']=_0x1d16ec['user']['id'];_0x1c8148['deleted']=!![];_0x1c8148[_0x072d('0x5c')]=moment()[_0x072d('0x5d')](_0x072d('0x5e'));_0x1c8148['calleridnum']=_0x4675f4[_0x072d('0x5f')];_0x1c8148['campaigntype']=_0x4675f4[_0x072d('0x51')]?_0x072d('0x60'):_0x072d('0x61');return db['CmContact'][_0x072d('0x4a')]({'where':{'id':_0x1c8148[_0x072d('0x62')]},'attributes':[_0x072d('0x63'),_0x072d('0x64')]})['then'](function(_0xade1cf){if(!_[_0x072d('0x65')](_0xb5cd4b)&&!_[_0x072d('0x65')](_0xade1cf[_0x072d('0x63')])){_0x1c8148['calleridname']=_0xade1cf['firstName'];if(!_[_0x072d('0x65')](_0xade1cf['lastName'])){_0x1c8148[_0x072d('0x66')]+='\x20'+_0xade1cf[_0x072d('0x64')];}}})[_0x072d('0x67')](function(){return db['CmHopperFinal']['create'](_0x1c8148);});}})[_0x072d('0x19')](function(){return _0xb5cd4b[_0x072d('0x12')](0xcc)[_0x072d('0x68')]();})[_0x072d('0x4b')](handleError(_0xb5cd4b,null));};exports[_0x072d('0x69')]=function(_0x541c15,_0x190bb5,_0x849eb8){var _0x539da8=[];return db['CmContact']['describe']()[_0x072d('0x19')](function(_0x55a1ef){_0x539da8=_[_0x072d('0x21')](_0x55a1ef);return _0x541c15[_0x072d('0x5b')][_0x072d('0x6a')]({'where':{'type':_0x072d('0x6b'),'dialActive':!![],'dialMethod':_0x072d('0x6c')},'attributes':['id',_0x072d('0x6d')],'raw':!![]});})['then'](function(_0x50681a){if(_0x50681a&&_0x50681a['length']){return db[_0x072d('0x6e')][_0x072d('0x6f')](function(_0x6c6811){var _0x1c6fbb={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format'](_0x072d('0x5e'))},'VoiceQueueId':{'$in':_['map'](_0x50681a,'id')},'$or':[{'UserId':null},{'UserId':_0x541c15[_0x072d('0x5b')]['id']}]};var _0x22d294=[];if(_0x541c15[_0x072d('0x4d')][_0x072d('0x70')]&&_0x541c15[_0x072d('0x4d')][_0x072d('0x70')]===_0x072d('0x71')){if(!_[_0x072d('0x72')](_0x541c15[_0x072d('0x4d')][_0x072d('0x73')])){_0x1c6fbb['id']={'$in':_0x541c15['body'][_0x072d('0x73')]};}_0x22d294=[[_0x072d('0x74'),_0x072d('0x75')],['scheduledAt',_0x50681a[0x0]['dialOrderByScheduledAt']==='ASC'?_0x072d('0x76'):'ASC'],db[_0x072d('0x6e')]['literal'](_0x072d('0x77')),['id',_0x072d('0x76')]];}else{if(!_[_0x072d('0x72')](_0x541c15[_0x072d('0x4d')][_0x072d('0x73')])){_0x1c6fbb['id']={'$notIn':_0x541c15[_0x072d('0x4d')][_0x072d('0x73')]};}_0x22d294=[[_0x072d('0x74'),_0x072d('0x76')],[_0x072d('0x78'),_0x50681a[0x0][_0x072d('0x6d')]],db['sequelize'][_0x072d('0x79')](_0x072d('0x7a')),['id',_0x072d('0x75')]];}return db[_0x072d('0x43')]['findOne']({'attributes':['id',_0x072d('0x7b')],'where':_0x1c6fbb,'order':_0x22d294,'transaction':_0x6c6811,'lock':_0x6c6811[_0x072d('0x7c')]['UPDATE'],'include':[{'model':db[_0x072d('0x7d')],'as':_0x072d('0x7e'),'attributes':_0x539da8,'include':[{'model':db['CmCompany'],'as':'Company','attributes':['id',_0x072d('0x1b')]}]},{'model':db[_0x072d('0x7f')],'as':_0x072d('0x80'),'attributes':['id','name']},{'model':db[_0x072d('0x53')],'as':'Queue','attributes':['id','name','dialActive']}]})[_0x072d('0x19')](function(_0x4a8956){if(_0x4a8956){return _0x4a8956[_0x072d('0x4e')]({'UserId':_0x541c15[_0x072d('0x5b')]['id']},{'transaction':_0x6c6811});}});});}})[_0x072d('0x19')](handleEntityNotFound(_0x190bb5,null))[_0x072d('0x19')](respondWithResult(_0x190bb5,null))[_0x072d('0x4b')](handleError(_0x190bb5,null));};exports['getOpenContacts']=function(_0x36aada,_0x5213f6,_0x2b9ce2){return _0x36aada[_0x072d('0x5b')][_0x072d('0x6a')]({'where':{'type':_0x072d('0x6b'),'dialActive':!![],'dialMethod':'preview'},'attributes':['id'],'raw':!![]})['then'](function(_0x206b8b){if(_0x206b8b&&_0x206b8b[_0x072d('0x47')]){return db[_0x072d('0x43')]['count']({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x072d('0x5d')]('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_['map'](_0x206b8b,'id')},'$or':[{'UserId':null},{'UserId':_0x36aada[_0x072d('0x5b')]['id']}]}});}return 0x0;})[_0x072d('0x19')](function(_0xd270cd){if(!_['isNil'](_0xd270cd)&&_[_0x072d('0x81')](_0xd270cd)){return _0x5213f6['status'](0xc8)[_0x072d('0x16')]({'contacts':_0xd270cd});}else{logger[_0x072d('0x82')](_0x072d('0x83'),_0x072d('0x84'),0x194,_0x072d('0x85'));_0x5213f6[_0x072d('0x11')](0x194);}})[_0x072d('0x4b')](handleError(_0x5213f6,null));};
\ No newline at end of file
diff --git a/server/api/cmHopper/cmHopper.model.js b/server/api/cmHopper/cmHopper.model.js
index f40663b..ca00b14 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 _0x099b=['scheduledat','phone','priority','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./cmHopper.attributes','exports','CmHopper','cm_hopper'];(function(_0x152e24,_0x1b80ed){var _0x3308c6=function(_0x2b5678){while(--_0x2b5678){_0x152e24['push'](_0x152e24['shift']());}};_0x3308c6(++_0x1b80ed);}(_0x099b,0xff));var _0xb099=function(_0x5d0bf3,_0x57bc2d){_0x5d0bf3=_0x5d0bf3-0x0;var _0xf06898=_0x099b[_0x5d0bf3];return _0xf06898;};'use strict';var _=require('lodash');var util=require(_0xb099('0x0'));var logger=require(_0xb099('0x1'))(_0xb099('0x2'));var moment=require('moment');var BPromise=require(_0xb099('0x3'));var rp=require(_0xb099('0x4'));var fs=require('fs');var path=require(_0xb099('0x5'));var rimraf=require('rimraf');var config=require(_0xb099('0x6'));var attributes=require(_0xb099('0x7'));module[_0xb099('0x8')]=function(_0x3a8111,_0x453fe9){return _0x3a8111['define'](_0xb099('0x9'),attributes,{'tableName':_0xb099('0xa'),'paranoid':![],'indexes':[{'name':_0xb099('0xb'),'fields':['scheduledat']},{'name':_0xb099('0xc'),'fields':[_0xb099('0xc')]},{'name':_0xb099('0xd'),'fields':[_0xb099('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x9225=['util','api','bluebird','request-promise','path','rimraf','../../config/environment','./cmHopper.attributes','exports','define','CmHopper','scheduledat','phone','priority','lodash'];(function(_0x1f5048,_0x35594a){var _0x4f17fd=function(_0x59c926){while(--_0x59c926){_0x1f5048['push'](_0x1f5048['shift']());}};_0x4f17fd(++_0x35594a);}(_0x9225,0x158));var _0x5922=function(_0x3d42d8,_0x4cffaa){_0x3d42d8=_0x3d42d8-0x0;var _0x27fc41=_0x9225[_0x3d42d8];return _0x27fc41;};'use strict';var _=require(_0x5922('0x0'));var util=require(_0x5922('0x1'));var logger=require('../../config/logger')(_0x5922('0x2'));var moment=require('moment');var BPromise=require(_0x5922('0x3'));var rp=require(_0x5922('0x4'));var fs=require('fs');var path=require(_0x5922('0x5'));var rimraf=require(_0x5922('0x6'));var config=require(_0x5922('0x7'));var attributes=require(_0x5922('0x8'));module[_0x5922('0x9')]=function(_0x40e46f,_0x4e24b6){return _0x40e46f[_0x5922('0xa')](_0x5922('0xb'),attributes,{'tableName':'cm_hopper','paranoid':![],'indexes':[{'name':_0x5922('0xc'),'fields':['scheduledat']},{'name':_0x5922('0xd'),'fields':[_0x5922('0xd')]},{'name':'priority','fields':[_0x5922('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 7da8026..ee549ea 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 _0x7a54=['stringify','error','code','message','request\x20sent','result','catch','CmHopper','findAll','options','raw','where','attributes','include','map','model','then','GetCmHopper','ShowCmHopper','find','CreateCmHopper','create','update','UpdateCmHopper','DestroyCmHopper','destroy','GetContactDialer','CmContact','describe','sequelize','limit','order','LOCK','UPDATE','keys','User','Agent','name','voicePause','length','body','all','MoveContactManagedDialer','transaction','CountReScheduled','COUNT','literal','`scheduledat`\x20>=\x20','format','\x22%s\x22','\x20,\x201,\x20null','contactsRescheduled','GetContactRecallMe','UserId','push','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','CmHopper,\x20%s,\x20%s','debug'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x7a54,0x106));var _0x47a5=function(_0x4a41f8,_0x3a3953){_0x4a41f8=_0x4a41f8-0x0;var _0xa81a98=_0x7a54[_0x4a41f8];return _0xa81a98;};'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')]('CmHopper,\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['GetCmHopper']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')]({'raw':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')][_0x47a5('0x18')]===undefined?!![]:![]:!![],'where':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x19')]||null:null,'attributes':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x1a')]||null:null,'limit':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')]['limit']||null:null,'include':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')][_0x47a5('0x1b')]?_[_0x47a5('0x1c')](_0x5247fd['options'][_0x47a5('0x1b')],function(_0x385687){return{'model':db[_0x385687['model']],'as':_0x385687['as'],'attributes':_0x385687[_0x47a5('0x1a')],'include':_0x385687[_0x47a5('0x1b')]?_[_0x47a5('0x1c')](_0x385687[_0x47a5('0x1b')],function(_0x3abd6a){return{'model':db[_0x3abd6a['model']],'as':_0x3abd6a['as'],'attributes':_0x3abd6a['attributes'],'include':_0x3abd6a[_0x47a5('0x1b')]?_['map'](_0x3abd6a[_0x47a5('0x1b')],function(_0x5b6c4e){return{'model':db[_0x5b6c4e[_0x47a5('0x1d')]],'as':_0x5b6c4e['as'],'attributes':_0x5b6c4e[_0x47a5('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x47a5('0x1e')](function(_0x1dac65){logger[_0x47a5('0xb')](_0x47a5('0x1f'),_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1f'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1dac65));_0xaf70a6(_0x1dac65);})[_0x47a5('0x14')](function(_0x1127f8){logger[_0x47a5('0xf')](_0x47a5('0x1f'),_0x1127f8['message'],_0x5247fd);_0x2ce454(_0x423a81[_0x47a5('0xf')](0x1f4,_0x1127f8['message']));});});};exports[_0x47a5('0x20')]=function(_0x9ac908){var _0x16901f=this;return new Promise(function(_0x4d6b57,_0x256650){return db[_0x47a5('0x15')][_0x47a5('0x21')]({'raw':_0x9ac908[_0x47a5('0x17')]?_0x9ac908['options']['raw']===undefined?!![]:![]:!![],'where':_0x9ac908[_0x47a5('0x17')]?_0x9ac908[_0x47a5('0x17')]['where']||null:null,'attributes':_0x9ac908['options']?_0x9ac908[_0x47a5('0x17')][_0x47a5('0x1a')]||null:null,'include':_0x9ac908['options']?_0x9ac908[_0x47a5('0x17')]['include']?_[_0x47a5('0x1c')](_0x9ac908[_0x47a5('0x17')]['include'],function(_0x4843c0){return{'model':db[_0x4843c0[_0x47a5('0x1d')]],'as':_0x4843c0['as'],'attributes':_0x4843c0['attributes'],'include':_0x4843c0[_0x47a5('0x1b')]?_[_0x47a5('0x1c')](_0x4843c0[_0x47a5('0x1b')],function(_0x52749b){return{'model':db[_0x52749b[_0x47a5('0x1d')]],'as':_0x52749b['as'],'attributes':_0x52749b['attributes'],'include':_0x52749b['include']?_[_0x47a5('0x1c')](_0x52749b['include'],function(_0x25cce0){return{'model':db[_0x25cce0['model']],'as':_0x25cce0['as'],'attributes':_0x25cce0[_0x47a5('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x47a5('0x1e')](function(_0x38c8d4){logger[_0x47a5('0xb')](_0x47a5('0x20'),_0x9ac908);logger[_0x47a5('0xd')](_0x47a5('0x20'),_0x9ac908,JSON[_0x47a5('0xe')](_0x38c8d4));_0x4d6b57(_0x38c8d4);})[_0x47a5('0x14')](function(_0x4caed5){logger[_0x47a5('0xf')](_0x47a5('0x20'),_0x4caed5['message'],_0x9ac908);_0x256650(_0x16901f[_0x47a5('0xf')](0x1f4,_0x4caed5[_0x47a5('0x11')]));});});};exports[_0x47a5('0x22')]=function(_0x49c4b5){var _0x101f70=this;return new Promise(function(_0x10f660,_0x596097){return db[_0x47a5('0x15')][_0x47a5('0x23')](_0x49c4b5['body'],{'raw':_0x49c4b5['options']?_0x49c4b5['options'][_0x47a5('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x9b5eaf){logger[_0x47a5('0xb')](_0x47a5('0x22'),_0x49c4b5);logger[_0x47a5('0xd')](_0x47a5('0x22'),_0x49c4b5,JSON[_0x47a5('0xe')](_0x9b5eaf));_0x10f660(_0x9b5eaf);})[_0x47a5('0x14')](function(_0x1f3d01){logger[_0x47a5('0xf')](_0x47a5('0x22'),_0x1f3d01[_0x47a5('0x11')],_0x49c4b5);_0x596097(_0x101f70[_0x47a5('0xf')](0x1f4,_0x1f3d01[_0x47a5('0x11')]));});});};exports['UpdateCmHopper']=function(_0x1fbece){var _0x1c36fa=this;return new Promise(function(_0x331474,_0x23bd8d){return db['CmHopper'][_0x47a5('0x24')](_0x1fbece['body'],{'raw':_0x1fbece['options']?_0x1fbece['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1fbece[_0x47a5('0x17')]?_0x1fbece['options'][_0x47a5('0x19')]||null:null,'attributes':_0x1fbece[_0x47a5('0x17')]?_0x1fbece[_0x47a5('0x17')]['attributes']||null:null,'limit':_0x1fbece[_0x47a5('0x17')]?_0x1fbece[_0x47a5('0x17')]['limit']||null:null})['then'](function(_0xbe21d9){logger['info'](_0x47a5('0x25'),_0x1fbece);logger[_0x47a5('0xd')](_0x47a5('0x25'),_0x1fbece,JSON[_0x47a5('0xe')](_0xbe21d9));_0x331474(_0xbe21d9);})[_0x47a5('0x14')](function(_0xf0edbb){logger[_0x47a5('0xf')](_0x47a5('0x25'),_0xf0edbb[_0x47a5('0x11')],_0x1fbece);_0x23bd8d(_0x1c36fa[_0x47a5('0xf')](0x1f4,_0xf0edbb[_0x47a5('0x11')]));});});};exports[_0x47a5('0x26')]=function(_0xe28d76){var _0x3574d4=this;return new Promise(function(_0x4e5e7,_0x3a2b38){return db['CmHopper'][_0x47a5('0x27')]({'where':_0xe28d76[_0x47a5('0x17')]?_0xe28d76['options']['where']||null:null})[_0x47a5('0x1e')](function(_0x560e4e){logger[_0x47a5('0xb')](_0x47a5('0x26'),_0xe28d76);logger['debug']('DestroyCmHopper',_0xe28d76,JSON[_0x47a5('0xe')](_0x560e4e));_0x4e5e7(_0x560e4e);})['catch'](function(_0x2d147c){logger[_0x47a5('0xf')](_0x47a5('0x26'),_0x2d147c[_0x47a5('0x11')],_0xe28d76);_0x3a2b38(_0x3574d4[_0x47a5('0xf')](0x1f4,_0x2d147c[_0x47a5('0x11')]));});});};exports[_0x47a5('0x28')]=function(_0x53e994){var _0x48a0ef=this;return new Promise(function(_0x2dd1db,_0x411230){return db[_0x47a5('0x29')][_0x47a5('0x2a')]()[_0x47a5('0x1e')](function(_0x2c0c86){return db[_0x47a5('0x2b')]['transaction'](function(_0x45cca5){return db[_0x47a5('0x15')][_0x47a5('0x16')]({'where':_0x53e994['options']?_0x53e994[_0x47a5('0x17')]['where']||null:null,'attributes':_0x53e994[_0x47a5('0x17')]?_0x53e994[_0x47a5('0x17')][_0x47a5('0x1a')]||null:null,'limit':_0x53e994[_0x47a5('0x17')]?_0x53e994['options'][_0x47a5('0x2c')]||null:null,'order':_0x53e994[_0x47a5('0x17')]?_0x53e994[_0x47a5('0x17')][_0x47a5('0x2d')]||null:null,'transaction':_0x45cca5,'lock':_0x45cca5[_0x47a5('0x2e')][_0x47a5('0x2f')],'include':[{'model':db[_0x47a5('0x29')],'as':'Contact','attributes':_[_0x47a5('0x30')](_0x2c0c86)},{'model':db[_0x47a5('0x31')],'as':_0x47a5('0x32'),'attributes':['id',_0x47a5('0x33'),_0x47a5('0x34')]}]})[_0x47a5('0x1e')](function(_0x572233){var _0x1ad6a9=[];for(var _0x245a15=0x0;_0x245a15<_0x572233[_0x47a5('0x35')];_0x245a15+=0x1){_0x1ad6a9['push'](_0x572233[_0x245a15][_0x47a5('0x24')](_0x53e994[_0x47a5('0x36')],{'transaction':_0x45cca5}));}return BPromise[_0x47a5('0x37')](_0x1ad6a9);});})['then'](function(_0x57641e){logger[_0x47a5('0xb')](_0x47a5('0x28'),_0x53e994);logger['debug']('GetContactDialer',_0x53e994,JSON[_0x47a5('0xe')](_0x57641e));_0x2dd1db(_0x57641e);})['catch'](function(_0x16bb8a){logger['error']('GetContactDialer',_0x16bb8a[_0x47a5('0x11')],_0x53e994);_0x411230(_0x48a0ef[_0x47a5('0xf')](0x1f4,_0x16bb8a['message']));});});});};exports[_0x47a5('0x38')]=function(_0x72fe){var _0x4b706a=this;return new Promise(function(_0x5b6127,_0x16b4fd){return db[_0x47a5('0x2b')][_0x47a5('0x39')](function(_0x2931e4){return db['CmHopperFinal'][_0x47a5('0x23')](_0x72fe[_0x47a5('0x36')],{'raw':_0x72fe[_0x47a5('0x17')]?_0x72fe['options'][_0x47a5('0x18')]===undefined?!![]:![]:!![],'transaction':_0x2931e4})['then'](function(){return db[_0x47a5('0x15')][_0x47a5('0x27')]({'where':_0x72fe[_0x47a5('0x17')]?_0x72fe[_0x47a5('0x17')][_0x47a5('0x19')]||null:null,'transaction':_0x2931e4});});})['then'](function(_0x144af9){logger['info']('MoveContactManagedDialer',_0x72fe);logger['debug']('MoveContactManagedDialer',_0x72fe,JSON[_0x47a5('0xe')](_0x144af9));_0x5b6127(_0x144af9);})[_0x47a5('0x14')](function(_0x1e2bb4){logger['error']('MoveContactManagedDialer',_0x1e2bb4[_0x47a5('0x11')],_0x72fe);_0x16b4fd(_0x4b706a[_0x47a5('0xf')](0x1f4,_0x1e2bb4[_0x47a5('0x11')]));});});};exports[_0x47a5('0x3a')]=function(_0xc45e25){var _0x4b5d0c=this;return new Promise(function(_0x3474b7,_0x519e9e){return db[_0x47a5('0x15')][_0x47a5('0x16')]({'raw':_0xc45e25['options']?_0xc45e25[_0x47a5('0x17')][_0x47a5('0x18')]===undefined?!![]:![]:!![],'where':_0xc45e25[_0x47a5('0x17')]?_0xc45e25[_0x47a5('0x17')][_0x47a5('0x19')]||null:null,'attributes':[[db[_0x47a5('0x2b')]['fn'](_0x47a5('0x3b'),db[_0x47a5('0x2b')]['fn']('IF',db['sequelize'][_0x47a5('0x3c')](_0x47a5('0x3d')+util[_0x47a5('0x3e')](_0x47a5('0x3f'),moment()[_0x47a5('0x3e')]('YYYY-MM-DD\x20HH:mm:ss'))+_0x47a5('0x40')))),_0x47a5('0x41')]]})[_0x47a5('0x1e')](function(_0x144aaa){logger[_0x47a5('0xb')](_0x47a5('0x3a'),_0xc45e25);logger[_0x47a5('0xd')](_0x47a5('0x3a'),_0xc45e25,JSON[_0x47a5('0xe')](_0x144aaa));_0x3474b7(_0x144aaa);})[_0x47a5('0x14')](function(_0x1d56f3){logger[_0x47a5('0xf')](_0x47a5('0x3a'),_0x1d56f3[_0x47a5('0x11')],_0xc45e25);_0x519e9e(_0x4b5d0c[_0x47a5('0xf')](0x1f4,_0x1d56f3['message']));});});};exports[_0x47a5('0x42')]=function(_0x284fb8){var _0x30504e=this;return new Promise(function(_0x4b42f3,_0x37ac59){return db[_0x47a5('0x29')][_0x47a5('0x2a')]()[_0x47a5('0x1e')](function(_0x5d9822){return db[_0x47a5('0x2b')]['transaction'](function(_0x2d5ee6){return db['CmHopper'][_0x47a5('0x16')]({'where':_0x284fb8['options']?_0x284fb8[_0x47a5('0x17')][_0x47a5('0x19')]||null:null,'attributes':_0x284fb8[_0x47a5('0x17')]?_0x284fb8['options']['attributes']||null:null,'limit':0x1,'order':_0x284fb8['options']?_0x284fb8[_0x47a5('0x17')][_0x47a5('0x2d')]||null:null,'group':db[_0x47a5('0x15')][_0x47a5('0x43')],'transaction':_0x2d5ee6,'lock':_0x2d5ee6['LOCK'][_0x47a5('0x2f')],'include':_0x284fb8[_0x47a5('0x17')]?_0x284fb8[_0x47a5('0x17')][_0x47a5('0x1b')]?_[_0x47a5('0x1c')](_0x284fb8[_0x47a5('0x17')][_0x47a5('0x1b')],function(_0x39939a){return{'model':db[_0x39939a[_0x47a5('0x1d')]],'as':_0x39939a['as'],'attributes':_0x39939a[_0x47a5('0x1a')],'include':_0x39939a[_0x47a5('0x1b')]?_[_0x47a5('0x1c')](_0x39939a['include'],function(_0x1e3212){return{'model':db[_0x1e3212['model']],'as':_0x1e3212['as'],'attributes':_0x1e3212[_0x47a5('0x1a')],'include':_0x1e3212[_0x47a5('0x1b')]?_[_0x47a5('0x1c')](_0x1e3212[_0x47a5('0x1b')],function(_0x40e584){return{'model':db[_0x40e584[_0x47a5('0x1d')]],'as':_0x40e584['as'],'attributes':_0x40e584[_0x47a5('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x47a5('0x1e')](function(_0x11c1db){var _0x254049=[];for(var _0x1cfb37=0x0;_0x1cfb37<_0x11c1db[_0x47a5('0x35')];_0x1cfb37+=0x1){_0x254049[_0x47a5('0x44')](_0x11c1db[_0x1cfb37][_0x47a5('0x24')](_0x284fb8[_0x47a5('0x36')],{'transaction':_0x2d5ee6}));}return BPromise['all'](_0x254049);});})['then'](function(_0x5ccc89){logger['info'](_0x47a5('0x42'),_0x284fb8);logger[_0x47a5('0xd')]('GetContactRecallMe',_0x284fb8,JSON[_0x47a5('0xe')](_0x5ccc89));_0x4b42f3(_0x5ccc89);})[_0x47a5('0x14')](function(_0x1baa5a){logger[_0x47a5('0xf')](_0x47a5('0x42'),_0x1baa5a[_0x47a5('0x11')],_0x284fb8);_0x37ac59(_0x30504e[_0x47a5('0xf')](0x1f4,_0x1baa5a[_0x47a5('0x11')]));});});});};
\ No newline at end of file
+var _0xb10b=['order','LOCK','UPDATE','Contact','keys','User','Agent','name','voicePause','length','push','CmHopperFinal','MoveContactManagedDialer','CountReScheduled','COUNT','`scheduledat`\x20>=\x20','format','\x22%s\x22','\x20,\x201,\x20null','contactsRescheduled','GetContactRecallMe','all','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopper,\x20%s,\x20%s','CmHopper,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','GetCmHopper','CmHopper','findAll','options','raw','where','attributes','include','map','model','debug','catch','ShowCmHopper','CreateCmHopper','create','body','update','limit','UpdateCmHopper','destroy','DestroyCmHopper','GetContactDialer','CmContact','describe','sequelize','transaction'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xb10b,0x12a));var _0xbb10=function(_0x4d0e8b,_0x25837e){_0x4d0e8b=_0x4d0e8b-0x0;var _0x1163d3=_0xb10b[_0x4d0e8b];return _0x1163d3;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'raw':_0x378da8['options']?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x378da8[_0xbb10('0x18')]?_0x378da8['options'][_0xbb10('0x1b')]||null:null,'limit':_0x378da8[_0xbb10('0x18')]?_0x378da8['options']['limit']||null:null,'include':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1c')]?_[_0xbb10('0x1d')](_0x378da8[_0xbb10('0x18')][_0xbb10('0x1c')],function(_0x407cb4){return{'model':db[_0x407cb4[_0xbb10('0x1e')]],'as':_0x407cb4['as'],'attributes':_0x407cb4[_0xbb10('0x1b')],'include':_0x407cb4[_0xbb10('0x1c')]?_[_0xbb10('0x1d')](_0x407cb4[_0xbb10('0x1c')],function(_0x537898){return{'model':db[_0x537898['model']],'as':_0x537898['as'],'attributes':_0x537898['attributes'],'include':_0x537898[_0xbb10('0x1c')]?_[_0xbb10('0x1d')](_0x537898[_0xbb10('0x1c')],function(_0x4e25ff){return{'model':db[_0x4e25ff[_0xbb10('0x1e')]],'as':_0x4e25ff['as'],'attributes':_0x4e25ff[_0xbb10('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xbb10('0xc')](function(_0x1d5e95){logger[_0xbb10('0xd')](_0xbb10('0x15'),_0x378da8);logger[_0xbb10('0x1f')]('GetCmHopper',_0x378da8,JSON[_0xbb10('0x11')](_0x1d5e95));_0x575cca(_0x1d5e95);})[_0xbb10('0x20')](function(_0xfc3595){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0xfc3595[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4['error'](0x1f4,_0xfc3595[_0xbb10('0x13')]));});});};exports['ShowCmHopper']=function(_0x448d5c){var _0x56f2da=this;return new Promise(function(_0x16ad2a,_0x1dcc9c){return db[_0xbb10('0x16')]['find']({'raw':_0x448d5c['options']?_0x448d5c[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x448d5c['options']?_0x448d5c[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x448d5c[_0xbb10('0x18')]?_0x448d5c[_0xbb10('0x18')][_0xbb10('0x1b')]||null:null,'include':_0x448d5c[_0xbb10('0x18')]?_0x448d5c[_0xbb10('0x18')]['include']?_[_0xbb10('0x1d')](_0x448d5c[_0xbb10('0x18')][_0xbb10('0x1c')],function(_0x8c1ce6){return{'model':db[_0x8c1ce6[_0xbb10('0x1e')]],'as':_0x8c1ce6['as'],'attributes':_0x8c1ce6[_0xbb10('0x1b')],'include':_0x8c1ce6[_0xbb10('0x1c')]?_[_0xbb10('0x1d')](_0x8c1ce6[_0xbb10('0x1c')],function(_0x56943c){return{'model':db[_0x56943c[_0xbb10('0x1e')]],'as':_0x56943c['as'],'attributes':_0x56943c[_0xbb10('0x1b')],'include':_0x56943c[_0xbb10('0x1c')]?_[_0xbb10('0x1d')](_0x56943c['include'],function(_0x111762){return{'model':db[_0x111762['model']],'as':_0x111762['as'],'attributes':_0x111762['attributes']};}):[]};}):[]};}):[]:[]})[_0xbb10('0xc')](function(_0x40c164){logger[_0xbb10('0xd')](_0xbb10('0x21'),_0x448d5c);logger[_0xbb10('0x1f')](_0xbb10('0x21'),_0x448d5c,JSON['stringify'](_0x40c164));_0x16ad2a(_0x40c164);})[_0xbb10('0x20')](function(_0x25d72f){logger['error']('ShowCmHopper',_0x25d72f['message'],_0x448d5c);_0x1dcc9c(_0x56f2da[_0xbb10('0x12')](0x1f4,_0x25d72f[_0xbb10('0x13')]));});});};exports[_0xbb10('0x22')]=function(_0x4d5a9b){var _0x3c0cd7=this;return new Promise(function(_0x3e8538,_0x4345f3){return db['CmHopper'][_0xbb10('0x23')](_0x4d5a9b[_0xbb10('0x24')],{'raw':_0x4d5a9b[_0xbb10('0x18')]?_0x4d5a9b[_0xbb10('0x18')]['raw']===undefined?!![]:![]:!![]})[_0xbb10('0xc')](function(_0x110eb5){logger['info'](_0xbb10('0x22'),_0x4d5a9b);logger[_0xbb10('0x1f')](_0xbb10('0x22'),_0x4d5a9b,JSON[_0xbb10('0x11')](_0x110eb5));_0x3e8538(_0x110eb5);})[_0xbb10('0x20')](function(_0x185a52){logger['error'](_0xbb10('0x22'),_0x185a52[_0xbb10('0x13')],_0x4d5a9b);_0x4345f3(_0x3c0cd7[_0xbb10('0x12')](0x1f4,_0x185a52[_0xbb10('0x13')]));});});};exports['UpdateCmHopper']=function(_0x3fff6c){var _0x331751=this;return new Promise(function(_0x23dc18,_0x403beb){return db['CmHopper'][_0xbb10('0x25')](_0x3fff6c[_0xbb10('0x24')],{'raw':_0x3fff6c['options']?_0x3fff6c['options'][_0xbb10('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3fff6c['options']?_0x3fff6c[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x3fff6c['options']?_0x3fff6c[_0xbb10('0x18')][_0xbb10('0x1b')]||null:null,'limit':_0x3fff6c[_0xbb10('0x18')]?_0x3fff6c['options'][_0xbb10('0x26')]||null:null})[_0xbb10('0xc')](function(_0x3b9fdf){logger[_0xbb10('0xd')](_0xbb10('0x27'),_0x3fff6c);logger[_0xbb10('0x1f')](_0xbb10('0x27'),_0x3fff6c,JSON[_0xbb10('0x11')](_0x3b9fdf));_0x23dc18(_0x3b9fdf);})[_0xbb10('0x20')](function(_0x43b948){logger[_0xbb10('0x12')](_0xbb10('0x27'),_0x43b948['message'],_0x3fff6c);_0x403beb(_0x331751[_0xbb10('0x12')](0x1f4,_0x43b948[_0xbb10('0x13')]));});});};exports['DestroyCmHopper']=function(_0x14e1cb){var _0x2f5027=this;return new Promise(function(_0x1a7df6,_0x5a5226){return db[_0xbb10('0x16')][_0xbb10('0x28')]({'where':_0x14e1cb[_0xbb10('0x18')]?_0x14e1cb['options']['where']||null:null})[_0xbb10('0xc')](function(_0x76a208){logger[_0xbb10('0xd')]('DestroyCmHopper',_0x14e1cb);logger['debug'](_0xbb10('0x29'),_0x14e1cb,JSON[_0xbb10('0x11')](_0x76a208));_0x1a7df6(_0x76a208);})[_0xbb10('0x20')](function(_0xf820fe){logger[_0xbb10('0x12')](_0xbb10('0x29'),_0xf820fe[_0xbb10('0x13')],_0x14e1cb);_0x5a5226(_0x2f5027[_0xbb10('0x12')](0x1f4,_0xf820fe[_0xbb10('0x13')]));});});};exports[_0xbb10('0x2a')]=function(_0x550111){var _0x5eafac=this;return new Promise(function(_0x412e13,_0x467dba){return db[_0xbb10('0x2b')][_0xbb10('0x2c')]()[_0xbb10('0xc')](function(_0x440f9e){return db[_0xbb10('0x2d')][_0xbb10('0x2e')](function(_0x1c0d8f){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'where':_0x550111[_0xbb10('0x18')]?_0x550111[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x550111[_0xbb10('0x18')]?_0x550111['options'][_0xbb10('0x1b')]||null:null,'limit':_0x550111['options']?_0x550111[_0xbb10('0x18')][_0xbb10('0x26')]||null:null,'order':_0x550111[_0xbb10('0x18')]?_0x550111[_0xbb10('0x18')][_0xbb10('0x2f')]||null:null,'transaction':_0x1c0d8f,'lock':_0x1c0d8f[_0xbb10('0x30')][_0xbb10('0x31')],'include':[{'model':db[_0xbb10('0x2b')],'as':_0xbb10('0x32'),'attributes':_[_0xbb10('0x33')](_0x440f9e)},{'model':db[_0xbb10('0x34')],'as':_0xbb10('0x35'),'attributes':['id',_0xbb10('0x36'),_0xbb10('0x37')]}]})[_0xbb10('0xc')](function(_0x5de0cc){var _0x4571b6=[];for(var _0x466eb7=0x0;_0x466eb7<_0x5de0cc[_0xbb10('0x38')];_0x466eb7+=0x1){_0x4571b6[_0xbb10('0x39')](_0x5de0cc[_0x466eb7][_0xbb10('0x25')](_0x550111[_0xbb10('0x24')],{'transaction':_0x1c0d8f}));}return BPromise['all'](_0x4571b6);});})[_0xbb10('0xc')](function(_0x4731ce){logger[_0xbb10('0xd')](_0xbb10('0x2a'),_0x550111);logger[_0xbb10('0x1f')](_0xbb10('0x2a'),_0x550111,JSON[_0xbb10('0x11')](_0x4731ce));_0x412e13(_0x4731ce);})[_0xbb10('0x20')](function(_0x205e01){logger[_0xbb10('0x12')](_0xbb10('0x2a'),_0x205e01[_0xbb10('0x13')],_0x550111);_0x467dba(_0x5eafac[_0xbb10('0x12')](0x1f4,_0x205e01['message']));});});});};exports['MoveContactManagedDialer']=function(_0x16272d){var _0x3e6338=this;return new Promise(function(_0x3d0cb7,_0x8b0a7d){return db['sequelize']['transaction'](function(_0x79411e){return db[_0xbb10('0x3a')][_0xbb10('0x23')](_0x16272d[_0xbb10('0x24')],{'raw':_0x16272d[_0xbb10('0x18')]?_0x16272d[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'transaction':_0x79411e})['then'](function(){return db[_0xbb10('0x16')][_0xbb10('0x28')]({'where':_0x16272d['options']?_0x16272d['options']['where']||null:null,'transaction':_0x79411e});});})[_0xbb10('0xc')](function(_0x31c727){logger[_0xbb10('0xd')]('MoveContactManagedDialer',_0x16272d);logger['debug']('MoveContactManagedDialer',_0x16272d,JSON[_0xbb10('0x11')](_0x31c727));_0x3d0cb7(_0x31c727);})[_0xbb10('0x20')](function(_0x45167a){logger['error'](_0xbb10('0x3b'),_0x45167a[_0xbb10('0x13')],_0x16272d);_0x8b0a7d(_0x3e6338['error'](0x1f4,_0x45167a['message']));});});};exports[_0xbb10('0x3c')]=function(_0x308896){var _0xd77753=this;return new Promise(function(_0x237246,_0x54b7c5){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'raw':_0x308896[_0xbb10('0x18')]?_0x308896['options'][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x308896[_0xbb10('0x18')]?_0x308896[_0xbb10('0x18')]['where']||null:null,'attributes':[[db[_0xbb10('0x2d')]['fn'](_0xbb10('0x3d'),db[_0xbb10('0x2d')]['fn']('IF',db[_0xbb10('0x2d')]['literal'](_0xbb10('0x3e')+util[_0xbb10('0x3f')](_0xbb10('0x40'),moment()[_0xbb10('0x3f')]('YYYY-MM-DD\x20HH:mm:ss'))+_0xbb10('0x41')))),_0xbb10('0x42')]]})[_0xbb10('0xc')](function(_0x2ceb3e){logger[_0xbb10('0xd')](_0xbb10('0x3c'),_0x308896);logger[_0xbb10('0x1f')]('CountReScheduled',_0x308896,JSON['stringify'](_0x2ceb3e));_0x237246(_0x2ceb3e);})['catch'](function(_0xdfbc0b){logger[_0xbb10('0x12')](_0xbb10('0x3c'),_0xdfbc0b['message'],_0x308896);_0x54b7c5(_0xd77753['error'](0x1f4,_0xdfbc0b[_0xbb10('0x13')]));});});};exports[_0xbb10('0x43')]=function(_0xd9e743){var _0x3a9677=this;return new Promise(function(_0x260e06,_0x1ad2ed){return db['CmContact'][_0xbb10('0x2c')]()[_0xbb10('0xc')](function(_0x270fdb){return db[_0xbb10('0x2d')][_0xbb10('0x2e')](function(_0x5bfc68){return db['CmHopper']['findAll']({'where':_0xd9e743[_0xbb10('0x18')]?_0xd9e743[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0xd9e743[_0xbb10('0x18')]?_0xd9e743[_0xbb10('0x18')][_0xbb10('0x1b')]||null:null,'limit':0x1,'order':_0xd9e743['options']?_0xd9e743[_0xbb10('0x18')]['order']||null:null,'group':db['CmHopper']['UserId'],'transaction':_0x5bfc68,'lock':_0x5bfc68[_0xbb10('0x30')][_0xbb10('0x31')],'include':_0xd9e743[_0xbb10('0x18')]?_0xd9e743[_0xbb10('0x18')]['include']?_[_0xbb10('0x1d')](_0xd9e743['options']['include'],function(_0x165fe9){return{'model':db[_0x165fe9[_0xbb10('0x1e')]],'as':_0x165fe9['as'],'attributes':_0x165fe9[_0xbb10('0x1b')],'include':_0x165fe9[_0xbb10('0x1c')]?_[_0xbb10('0x1d')](_0x165fe9['include'],function(_0x2d52ea){return{'model':db[_0x2d52ea[_0xbb10('0x1e')]],'as':_0x2d52ea['as'],'attributes':_0x2d52ea[_0xbb10('0x1b')],'include':_0x2d52ea[_0xbb10('0x1c')]?_[_0xbb10('0x1d')](_0x2d52ea[_0xbb10('0x1c')],function(_0x174395){return{'model':db[_0x174395['model']],'as':_0x174395['as'],'attributes':_0x174395[_0xbb10('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xbb10('0xc')](function(_0x30f3ea){var _0x322b41=[];for(var _0x37b20e=0x0;_0x37b20e<_0x30f3ea[_0xbb10('0x38')];_0x37b20e+=0x1){_0x322b41[_0xbb10('0x39')](_0x30f3ea[_0x37b20e][_0xbb10('0x25')](_0xd9e743['body'],{'transaction':_0x5bfc68}));}return BPromise[_0xbb10('0x44')](_0x322b41);});})[_0xbb10('0xc')](function(_0x145baf){logger['info']('GetContactRecallMe',_0xd9e743);logger['debug'](_0xbb10('0x43'),_0xd9e743,JSON['stringify'](_0x145baf));_0x260e06(_0x145baf);})['catch'](function(_0x1701c5){logger[_0xbb10('0x12')](_0xbb10('0x43'),_0x1701c5[_0xbb10('0x13')],_0xd9e743);_0x1ad2ed(_0x3a9677[_0xbb10('0x12')](0x1f4,_0x1701c5[_0xbb10('0x13')]));});});});};
\ No newline at end of file
diff --git a/server/api/cmHopper/index.js b/server/api/cmHopper/index.js
index 7ced3c5..0e9fc1d 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 _0x8d62=['/:id','show','post','/preview','getPreview','put','update','destroy','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopper.controller','get','isAuthenticated','index','/describe','describe','/opencontacts','getOpenContacts'];(function(_0x4909de,_0x1357ce){var _0x4fc71a=function(_0xd1bb6b){while(--_0xd1bb6b){_0x4909de['push'](_0x4909de['shift']());}};_0x4fc71a(++_0x1357ce);}(_0x8d62,0xf8));var _0x28d6=function(_0x22455b,_0x2c45b6){_0x22455b=_0x22455b-0x0;var _0x568152=_0x8d62[_0x22455b];return _0x568152;};'use strict';var multer=require('multer');var util=require(_0x28d6('0x0'));var path=require(_0x28d6('0x1'));var timeout=require(_0x28d6('0x2'));var express=require(_0x28d6('0x3'));var router=express[_0x28d6('0x4')]();var auth=require(_0x28d6('0x5'));var interaction=require(_0x28d6('0x6'));var config=require(_0x28d6('0x7'));var controller=require(_0x28d6('0x8'));router[_0x28d6('0x9')]('/',auth[_0x28d6('0xa')](),controller[_0x28d6('0xb')]);router[_0x28d6('0x9')](_0x28d6('0xc'),auth['isAuthenticated'](),controller[_0x28d6('0xd')]);router[_0x28d6('0x9')](_0x28d6('0xe'),auth['isAuthenticated'](),controller[_0x28d6('0xf')]);router['get'](_0x28d6('0x10'),auth[_0x28d6('0xa')](),controller[_0x28d6('0x11')]);router[_0x28d6('0x12')]('/',auth[_0x28d6('0xa')](),controller['create']);router[_0x28d6('0x12')](_0x28d6('0x13'),auth[_0x28d6('0xa')](),controller[_0x28d6('0x14')]);router[_0x28d6('0x15')](_0x28d6('0x10'),auth[_0x28d6('0xa')](),controller[_0x28d6('0x16')]);router['delete'](_0x28d6('0x10'),auth[_0x28d6('0xa')](),controller[_0x28d6('0x17')]);module['exports']=router;
\ No newline at end of file
+var _0x01d3=['../../config/environment','./cmHopper.controller','get','isAuthenticated','/describe','describe','/opencontacts','getOpenContacts','/:id','show','post','/preview','update','delete','destroy','multer','util','path','connect-timeout','Router','../../components/auth/service'];(function(_0x3e8598,_0x5a5d9a){var _0x15c7d4=function(_0x173469){while(--_0x173469){_0x3e8598['push'](_0x3e8598['shift']());}};_0x15c7d4(++_0x5a5d9a);}(_0x01d3,0xa2));var _0x301d=function(_0x263a2f,_0x1e81e3){_0x263a2f=_0x263a2f-0x0;var _0x8020e8=_0x01d3[_0x263a2f];return _0x8020e8;};'use strict';var multer=require(_0x301d('0x0'));var util=require(_0x301d('0x1'));var path=require(_0x301d('0x2'));var timeout=require(_0x301d('0x3'));var express=require('express');var router=express[_0x301d('0x4')]();var auth=require(_0x301d('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x301d('0x6'));var controller=require(_0x301d('0x7'));router[_0x301d('0x8')]('/',auth[_0x301d('0x9')](),controller['index']);router[_0x301d('0x8')](_0x301d('0xa'),auth[_0x301d('0x9')](),controller[_0x301d('0xb')]);router[_0x301d('0x8')](_0x301d('0xc'),auth[_0x301d('0x9')](),controller[_0x301d('0xd')]);router[_0x301d('0x8')](_0x301d('0xe'),auth['isAuthenticated'](),controller[_0x301d('0xf')]);router[_0x301d('0x10')]('/',auth[_0x301d('0x9')](),controller['create']);router[_0x301d('0x10')](_0x301d('0x11'),auth['isAuthenticated'](),controller['getPreview']);router['put'](_0x301d('0xe'),auth[_0x301d('0x9')](),controller[_0x301d('0x12')]);router[_0x301d('0x13')](_0x301d('0xe'),auth[_0x301d('0x9')](),controller[_0x301d('0x14')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/cmHopperBlack.attributes.js b/server/api/cmHopperBlack/cmHopperBlack.attributes.js
index 47f399c..2ae3a8e 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 _0xe18b=['sequelize','STRING','INTEGER','contactListQueue','moment'];(function(_0x9eee5f,_0x149090){var _0x976fe5=function(_0x4bbbd1){while(--_0x4bbbd1){_0x9eee5f['push'](_0x9eee5f['shift']());}};_0x976fe5(++_0x149090);}(_0xe18b,0x18f));var _0xbe18=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe18b[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require(_0xbe18('0x0'));var Sequelize=require(_0xbe18('0x1'));module['exports']={'phone':{'type':Sequelize[_0xbe18('0x2')],'allowNull':![]},'ContactId':{'type':Sequelize[_0xbe18('0x3')],'unique':'contactListQueue'},'ListId':{'type':Sequelize[_0xbe18('0x3')],'unique':'contactListQueue'},'VoiceQueueId':{'type':Sequelize['INTEGER'],'unique':_0xbe18('0x4')}};
\ No newline at end of file
+var _0xc90c=['exports','STRING','INTEGER','contactListQueue','moment','sequelize'];(function(_0x4c6fc0,_0x29218b){var _0x1e143b=function(_0x3997f6){while(--_0x3997f6){_0x4c6fc0['push'](_0x4c6fc0['shift']());}};_0x1e143b(++_0x29218b);}(_0xc90c,0xdc));var _0xcc90=function(_0x5c02c0,_0x2b825e){_0x5c02c0=_0x5c02c0-0x0;var _0x5d7676=_0xc90c[_0x5c02c0];return _0x5d7676;};'use strict';var moment=require(_0xcc90('0x0'));var Sequelize=require(_0xcc90('0x1'));module[_0xcc90('0x2')]={'phone':{'type':Sequelize[_0xcc90('0x3')],'allowNull':![]},'ContactId':{'type':Sequelize[_0xcc90('0x4')],'unique':_0xcc90('0x5')},'ListId':{'type':Sequelize[_0xcc90('0x4')],'unique':_0xcc90('0x5')},'VoiceQueueId':{'type':Sequelize[_0xcc90('0x4')],'unique':'contactListQueue'}};
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/cmHopperBlack.controller.js b/server/api/cmHopperBlack/cmHopperBlack.controller.js
index a96098a..45aa642 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 _0xe458=['sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','name','send','index','CmHopperBlack','rawAttributes','fieldName','type','key','model','map','keys','query','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','params','intersection','includeAll','find','body','describe','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb'];(function(_0x57f100,_0xa53aca){var _0x4cac01=function(_0x447061){while(--_0x447061){_0x57f100['push'](_0x57f100['shift']());}};_0x4cac01(++_0xa53aca);}(_0xe458,0x160));var _0x8e45=function(_0x457254,_0xc5468){_0x457254=_0x457254-0x0;var _0x436d8a=_0xe458[_0x457254];return _0x436d8a;};'use strict';var pdf=require(_0x8e45('0x0'));var emlformat=require(_0x8e45('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x8e45('0x2'));var jsonpatch=require(_0x8e45('0x3'));var rp=require(_0x8e45('0x4'));var moment=require(_0x8e45('0x5'));var BPromise=require(_0x8e45('0x6'));var Mustache=require(_0x8e45('0x7'));var util=require(_0x8e45('0x8'));var path=require(_0x8e45('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x8e45('0xa'));var fs=require('fs');var _=require(_0x8e45('0xb'));var squel=require(_0x8e45('0xc'));var crypto=require(_0x8e45('0xd'));var jsforce=require(_0x8e45('0xe'));var deskjs=require(_0x8e45('0xf'));var toCsv=require(_0x8e45('0x10'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x8e45('0x11'));var as=require(_0x8e45('0x12'));var hardwareService=require(_0x8e45('0x13'));var logger=require('../../config/logger')(_0x8e45('0x14'));var utils=require(_0x8e45('0x15'));var config=require('../../config/environment');var db=require(_0x8e45('0x16'))['db'];function respondWithStatusCode(_0x390e90,_0x49e36b){_0x49e36b=_0x49e36b||0xcc;return function(_0x23a741){if(_0x23a741){return _0x390e90[_0x8e45('0x17')](_0x49e36b);}return _0x390e90['status'](_0x49e36b)[_0x8e45('0x18')]();};}function respondWithResult(_0x3f4446,_0xde8a63){_0xde8a63=_0xde8a63||0xc8;return function(_0x49c652){if(_0x49c652){return _0x3f4446[_0x8e45('0x19')](_0xde8a63)[_0x8e45('0x1a')](_0x49c652);}};}function respondWithFilteredResult(_0x2be2a9,_0x4310ed){return function(_0x11d4bf){if(_0x11d4bf){var _0x368526=_0x11d4bf[_0x8e45('0x1b')],_0x46a39b=_0x4310ed[_0x8e45('0x1c')],_0x2e1eeb=_0x4310ed[_0x8e45('0x1c')]+_0x4310ed[_0x8e45('0x1d')],_0x1cc1d8;if(_0x2e1eeb>=_0x368526){_0x2e1eeb=_0x368526;_0x1cc1d8=0xc8;}else{_0x1cc1d8=0xce;}_0x2be2a9[_0x8e45('0x19')](_0x1cc1d8);return _0x2be2a9[_0x8e45('0x1e')](_0x8e45('0x1f'),_0x46a39b+'-'+_0x2e1eeb+'/'+_0x368526)[_0x8e45('0x1a')](_0x11d4bf);}return null;};}function patchUpdates(_0x4902dc){return function(_0xdd2b81){try{jsonpatch[_0x8e45('0x20')](_0xdd2b81,_0x4902dc,!![]);}catch(_0x2eac50){return BPromise[_0x8e45('0x21')](_0x2eac50);}return _0xdd2b81[_0x8e45('0x22')]();};}function saveUpdates(_0x4c3f52,_0x162856){return function(_0x258fe4){if(_0x258fe4){return _0x258fe4[_0x8e45('0x23')](_0x4c3f52)[_0x8e45('0x24')](function(_0x481a51){return _0x481a51;});}return null;};}function removeEntity(_0x2ee2aa,_0x5aea58){return function(_0x540345){if(_0x540345){return _0x540345[_0x8e45('0x25')]()[_0x8e45('0x24')](function(){_0x2ee2aa[_0x8e45('0x19')](0xcc)[_0x8e45('0x18')]();});}};}function handleEntityNotFound(_0xc93214,_0x135b8d){return function(_0xf8370c){if(!_0xf8370c){_0xc93214[_0x8e45('0x17')](0x194);}return _0xf8370c;};}function handleError(_0x10098a,_0x46d0f0){_0x46d0f0=_0x46d0f0||0x1f4;return function(_0x21f6bc){logger[_0x8e45('0x26')](_0x21f6bc['stack']);if(_0x21f6bc[_0x8e45('0x27')]){delete _0x21f6bc[_0x8e45('0x27')];}_0x10098a[_0x8e45('0x19')](_0x46d0f0)[_0x8e45('0x28')](_0x21f6bc);};}exports[_0x8e45('0x29')]=function(_0x1ff7f5,_0x20827b){var _0x236834={},_0x3be24d={},_0x581892={'count':0x0,'rows':[]};var _0x4306cc=_['map'](db[_0x8e45('0x2a')][_0x8e45('0x2b')],function(_0x4e9f5c){return{'name':_0x4e9f5c[_0x8e45('0x2c')],'type':_0x4e9f5c[_0x8e45('0x2d')][_0x8e45('0x2e')]};});_0x3be24d[_0x8e45('0x2f')]=_[_0x8e45('0x30')](_0x4306cc,_0x8e45('0x27'));_0x3be24d['query']=_[_0x8e45('0x31')](_0x1ff7f5[_0x8e45('0x32')]);_0x3be24d['filters']=_['intersection'](_0x3be24d[_0x8e45('0x2f')],_0x3be24d['query']);_0x236834['attributes']=_['intersection'](_0x3be24d['model'],qs[_0x8e45('0x33')](_0x1ff7f5['query'][_0x8e45('0x33')]));_0x236834[_0x8e45('0x34')]=_0x236834[_0x8e45('0x34')][_0x8e45('0x35')]?_0x236834[_0x8e45('0x34')]:_0x3be24d[_0x8e45('0x2f')];if(!_0x1ff7f5[_0x8e45('0x32')][_0x8e45('0x36')](_0x8e45('0x37'))){_0x236834[_0x8e45('0x1d')]=qs[_0x8e45('0x1d')](_0x1ff7f5['query'][_0x8e45('0x1d')]);_0x236834[_0x8e45('0x1c')]=qs[_0x8e45('0x1c')](_0x1ff7f5['query'][_0x8e45('0x1c')]);}_0x236834[_0x8e45('0x38')]=qs[_0x8e45('0x39')](_0x1ff7f5[_0x8e45('0x32')][_0x8e45('0x39')]);_0x236834[_0x8e45('0x3a')]=qs[_0x8e45('0x3b')](_[_0x8e45('0x3c')](_0x1ff7f5[_0x8e45('0x32')],_0x3be24d['filters']));if(_0x1ff7f5['query'][_0x8e45('0x3d')]){_0x236834[_0x8e45('0x3a')]=_[_0x8e45('0x3e')](_0x236834['where'],{'$or':_['map'](_0x4306cc,function(_0x20c248){if(_0x20c248[_0x8e45('0x2d')]!==_0x8e45('0x3f')){var _0x2ea817={};_0x2ea817[_0x20c248[_0x8e45('0x27')]]={'$like':'%'+_0x1ff7f5[_0x8e45('0x32')][_0x8e45('0x3d')]+'%'};return _0x2ea817;}})});}_0x236834=_[_0x8e45('0x3e')]({},_0x236834,_0x1ff7f5[_0x8e45('0x40')]);var _0x218166={'where':_0x236834[_0x8e45('0x3a')]};return db[_0x8e45('0x2a')][_0x8e45('0x1b')](_0x218166)[_0x8e45('0x24')](function(_0xc4e9dc){_0x581892[_0x8e45('0x1b')]=_0xc4e9dc;if(_0x1ff7f5[_0x8e45('0x32')]['includeAll']){_0x236834[_0x8e45('0x41')]=[{'all':!![]}];}return db['CmHopperBlack'][_0x8e45('0x42')](_0x236834);})[_0x8e45('0x24')](function(_0x45e377){_0x581892[_0x8e45('0x43')]=_0x45e377;return _0x581892;})[_0x8e45('0x24')](respondWithFilteredResult(_0x20827b,_0x236834))[_0x8e45('0x44')](handleError(_0x20827b,null));};exports['show']=function(_0x2f220e,_0x44d0c9){var _0x4fa23d={'raw':!![],'where':{'id':_0x2f220e[_0x8e45('0x45')]['id']}},_0x3161e0={};_0x3161e0[_0x8e45('0x2f')]=_[_0x8e45('0x31')](db[_0x8e45('0x2a')][_0x8e45('0x2b')]);_0x3161e0['query']=_[_0x8e45('0x31')](_0x2f220e[_0x8e45('0x32')]);_0x3161e0[_0x8e45('0x3b')]=_[_0x8e45('0x46')](_0x3161e0[_0x8e45('0x2f')],_0x3161e0[_0x8e45('0x32')]);_0x4fa23d['attributes']=_[_0x8e45('0x46')](_0x3161e0[_0x8e45('0x2f')],qs[_0x8e45('0x33')](_0x2f220e[_0x8e45('0x32')][_0x8e45('0x33')]));_0x4fa23d[_0x8e45('0x34')]=_0x4fa23d[_0x8e45('0x34')][_0x8e45('0x35')]?_0x4fa23d[_0x8e45('0x34')]:_0x3161e0[_0x8e45('0x2f')];if(_0x2f220e[_0x8e45('0x32')][_0x8e45('0x47')]){_0x4fa23d[_0x8e45('0x41')]=[{'all':!![]}];}_0x4fa23d=_[_0x8e45('0x3e')]({},_0x4fa23d,_0x2f220e[_0x8e45('0x40')]);return db[_0x8e45('0x2a')][_0x8e45('0x48')](_0x4fa23d)[_0x8e45('0x24')](handleEntityNotFound(_0x44d0c9,null))[_0x8e45('0x24')](respondWithResult(_0x44d0c9,null))[_0x8e45('0x44')](handleError(_0x44d0c9,null));};exports[_0x8e45('0x23')]=function(_0x5f59e7,_0x33c84e){if(_0x5f59e7['body']['id']){delete _0x5f59e7[_0x8e45('0x49')]['id'];}return db['CmHopperBlack'][_0x8e45('0x48')]({'where':{'id':_0x5f59e7[_0x8e45('0x45')]['id']}})[_0x8e45('0x24')](handleEntityNotFound(_0x33c84e,null))[_0x8e45('0x24')](saveUpdates(_0x5f59e7[_0x8e45('0x49')],null))[_0x8e45('0x24')](respondWithResult(_0x33c84e,null))[_0x8e45('0x44')](handleError(_0x33c84e,null));};exports[_0x8e45('0x25')]=function(_0x456607,_0x26ddf1){return db[_0x8e45('0x2a')][_0x8e45('0x48')]({'where':{'id':_0x456607[_0x8e45('0x45')]['id']}})['then'](handleEntityNotFound(_0x26ddf1,null))[_0x8e45('0x24')](removeEntity(_0x26ddf1,null))[_0x8e45('0x44')](handleError(_0x26ddf1,null));};exports['describe']=function(_0x3248a3,_0x514aed){return db['CmHopperBlack'][_0x8e45('0x4a')]()[_0x8e45('0x24')](respondWithResult(_0x514aed,null))[_0x8e45('0x44')](handleError(_0x514aed,null));};
\ No newline at end of file
+var _0x5454=['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','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','save','update','then','destroy','error','stack','name','send','index','map','CmHopperBlack','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','options','count','includeAll','findAll','catch','params','include','find','body','describe','zip-dir','bluebird','mustache'];(function(_0x2f6cd1,_0x5b0b40){var _0x3c4c0b=function(_0x4f1566){while(--_0x4f1566){_0x2f6cd1['push'](_0x2f6cd1['shift']());}};_0x3c4c0b(++_0x5b0b40);}(_0x5454,0x15b));var _0x4545=function(_0x407140,_0x57ddca){_0x407140=_0x407140-0x0;var _0x24389e=_0x5454[_0x407140];return _0x24389e;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x4545('0x0'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x4545('0x1'));var Mustache=require(_0x4545('0x2'));var util=require(_0x4545('0x3'));var path=require(_0x4545('0x4'));var sox=require('sox');var csv=require(_0x4545('0x5'));var ejs=require(_0x4545('0x6'));var fs=require('fs');var _=require(_0x4545('0x7'));var squel=require(_0x4545('0x8'));var crypto=require(_0x4545('0x9'));var jsforce=require(_0x4545('0xa'));var deskjs=require(_0x4545('0xb'));var toCsv=require(_0x4545('0x5'));var querystring=require(_0x4545('0xc'));var Papa=require(_0x4545('0xd'));var Redis=require(_0x4545('0xe'));var authService=require(_0x4545('0xf'));var qs=require(_0x4545('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4545('0x11'));var logger=require(_0x4545('0x12'))(_0x4545('0x13'));var utils=require(_0x4545('0x14'));var config=require(_0x4545('0x15'));var db=require(_0x4545('0x16'))['db'];function respondWithStatusCode(_0x4d414c,_0x3844a3){_0x3844a3=_0x3844a3||0xcc;return function(_0x20a4d8){if(_0x20a4d8){return _0x4d414c[_0x4545('0x17')](_0x3844a3);}return _0x4d414c[_0x4545('0x18')](_0x3844a3)[_0x4545('0x19')]();};}function respondWithResult(_0xb9120a,_0x3e7088){_0x3e7088=_0x3e7088||0xc8;return function(_0x347072){if(_0x347072){return _0xb9120a[_0x4545('0x18')](_0x3e7088)[_0x4545('0x1a')](_0x347072);}};}function respondWithFilteredResult(_0x40a079,_0x4b5700){return function(_0xb10472){if(_0xb10472){var _0x3577f5=_0xb10472['count'],_0x2416b0=_0x4b5700[_0x4545('0x1b')],_0x3bb165=_0x4b5700[_0x4545('0x1b')]+_0x4b5700[_0x4545('0x1c')],_0x5a332e;if(_0x3bb165>=_0x3577f5){_0x3bb165=_0x3577f5;_0x5a332e=0xc8;}else{_0x5a332e=0xce;}_0x40a079[_0x4545('0x18')](_0x5a332e);return _0x40a079[_0x4545('0x1d')](_0x4545('0x1e'),_0x2416b0+'-'+_0x3bb165+'/'+_0x3577f5)[_0x4545('0x1a')](_0xb10472);}return null;};}function patchUpdates(_0x4672ed){return function(_0x53a1cf){try{jsonpatch['apply'](_0x53a1cf,_0x4672ed,!![]);}catch(_0x262669){return BPromise['reject'](_0x262669);}return _0x53a1cf[_0x4545('0x1f')]();};}function saveUpdates(_0x669f9,_0x67e408){return function(_0x6b3bc){if(_0x6b3bc){return _0x6b3bc[_0x4545('0x20')](_0x669f9)[_0x4545('0x21')](function(_0x1a4f5a){return _0x1a4f5a;});}return null;};}function removeEntity(_0x13f497,_0x550dfb){return function(_0x580b57){if(_0x580b57){return _0x580b57[_0x4545('0x22')]()['then'](function(){_0x13f497[_0x4545('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x293c18,_0x4c47c0){return function(_0x519489){if(!_0x519489){_0x293c18[_0x4545('0x17')](0x194);}return _0x519489;};}function handleError(_0xdd21e4,_0x38815e){_0x38815e=_0x38815e||0x1f4;return function(_0x34d4c1){logger[_0x4545('0x23')](_0x34d4c1[_0x4545('0x24')]);if(_0x34d4c1[_0x4545('0x25')]){delete _0x34d4c1[_0x4545('0x25')];}_0xdd21e4[_0x4545('0x18')](_0x38815e)[_0x4545('0x26')](_0x34d4c1);};}exports[_0x4545('0x27')]=function(_0x43749b,_0xab0b00){var _0x3d1c1a={},_0x1d8c39={},_0xfd9247={'count':0x0,'rows':[]};var _0x576200=_[_0x4545('0x28')](db[_0x4545('0x29')][_0x4545('0x2a')],function(_0x394a8e){return{'name':_0x394a8e[_0x4545('0x2b')],'type':_0x394a8e['type'][_0x4545('0x2c')]};});_0x1d8c39[_0x4545('0x2d')]=_[_0x4545('0x28')](_0x576200,_0x4545('0x25'));_0x1d8c39[_0x4545('0x2e')]=_[_0x4545('0x2f')](_0x43749b['query']);_0x1d8c39[_0x4545('0x30')]=_[_0x4545('0x31')](_0x1d8c39[_0x4545('0x2d')],_0x1d8c39[_0x4545('0x2e')]);_0x3d1c1a[_0x4545('0x32')]=_[_0x4545('0x31')](_0x1d8c39[_0x4545('0x2d')],qs[_0x4545('0x33')](_0x43749b[_0x4545('0x2e')][_0x4545('0x33')]));_0x3d1c1a[_0x4545('0x32')]=_0x3d1c1a['attributes'][_0x4545('0x34')]?_0x3d1c1a['attributes']:_0x1d8c39[_0x4545('0x2d')];if(!_0x43749b[_0x4545('0x2e')]['hasOwnProperty'](_0x4545('0x35'))){_0x3d1c1a[_0x4545('0x1c')]=qs[_0x4545('0x1c')](_0x43749b[_0x4545('0x2e')][_0x4545('0x1c')]);_0x3d1c1a[_0x4545('0x1b')]=qs[_0x4545('0x1b')](_0x43749b['query'][_0x4545('0x1b')]);}_0x3d1c1a[_0x4545('0x36')]=qs[_0x4545('0x37')](_0x43749b[_0x4545('0x2e')][_0x4545('0x37')]);_0x3d1c1a[_0x4545('0x38')]=qs['filters'](_[_0x4545('0x39')](_0x43749b[_0x4545('0x2e')],_0x1d8c39[_0x4545('0x30')]));if(_0x43749b[_0x4545('0x2e')][_0x4545('0x3a')]){_0x3d1c1a[_0x4545('0x38')]=_[_0x4545('0x3b')](_0x3d1c1a[_0x4545('0x38')],{'$or':_[_0x4545('0x28')](_0x576200,function(_0x50588b){if(_0x50588b['type']!=='VIRTUAL'){var _0x1435d1={};_0x1435d1[_0x50588b['name']]={'$like':'%'+_0x43749b[_0x4545('0x2e')][_0x4545('0x3a')]+'%'};return _0x1435d1;}})});}_0x3d1c1a=_[_0x4545('0x3b')]({},_0x3d1c1a,_0x43749b[_0x4545('0x3c')]);var _0x537711={'where':_0x3d1c1a['where']};return db[_0x4545('0x29')]['count'](_0x537711)[_0x4545('0x21')](function(_0x12bb6a){_0xfd9247[_0x4545('0x3d')]=_0x12bb6a;if(_0x43749b[_0x4545('0x2e')][_0x4545('0x3e')]){_0x3d1c1a['include']=[{'all':!![]}];}return db['CmHopperBlack'][_0x4545('0x3f')](_0x3d1c1a);})[_0x4545('0x21')](function(_0x58d519){_0xfd9247['rows']=_0x58d519;return _0xfd9247;})[_0x4545('0x21')](respondWithFilteredResult(_0xab0b00,_0x3d1c1a))[_0x4545('0x40')](handleError(_0xab0b00,null));};exports['show']=function(_0x1aafdf,_0x59382e){var _0x239246={'raw':!![],'where':{'id':_0x1aafdf[_0x4545('0x41')]['id']}},_0x3612f2={};_0x3612f2[_0x4545('0x2d')]=_['keys'](db[_0x4545('0x29')][_0x4545('0x2a')]);_0x3612f2[_0x4545('0x2e')]=_[_0x4545('0x2f')](_0x1aafdf['query']);_0x3612f2['filters']=_[_0x4545('0x31')](_0x3612f2['model'],_0x3612f2[_0x4545('0x2e')]);_0x239246[_0x4545('0x32')]=_[_0x4545('0x31')](_0x3612f2[_0x4545('0x2d')],qs[_0x4545('0x33')](_0x1aafdf[_0x4545('0x2e')][_0x4545('0x33')]));_0x239246[_0x4545('0x32')]=_0x239246['attributes'][_0x4545('0x34')]?_0x239246[_0x4545('0x32')]:_0x3612f2[_0x4545('0x2d')];if(_0x1aafdf['query'][_0x4545('0x3e')]){_0x239246[_0x4545('0x42')]=[{'all':!![]}];}_0x239246=_[_0x4545('0x3b')]({},_0x239246,_0x1aafdf[_0x4545('0x3c')]);return db[_0x4545('0x29')][_0x4545('0x43')](_0x239246)[_0x4545('0x21')](handleEntityNotFound(_0x59382e,null))[_0x4545('0x21')](respondWithResult(_0x59382e,null))['catch'](handleError(_0x59382e,null));};exports[_0x4545('0x20')]=function(_0x5d4e44,_0x7ca53c){if(_0x5d4e44['body']['id']){delete _0x5d4e44[_0x4545('0x44')]['id'];}return db[_0x4545('0x29')][_0x4545('0x43')]({'where':{'id':_0x5d4e44['params']['id']}})[_0x4545('0x21')](handleEntityNotFound(_0x7ca53c,null))[_0x4545('0x21')](saveUpdates(_0x5d4e44[_0x4545('0x44')],null))[_0x4545('0x21')](respondWithResult(_0x7ca53c,null))[_0x4545('0x40')](handleError(_0x7ca53c,null));};exports[_0x4545('0x22')]=function(_0x51a22e,_0x59d00c){return db['CmHopperBlack']['find']({'where':{'id':_0x51a22e[_0x4545('0x41')]['id']}})[_0x4545('0x21')](handleEntityNotFound(_0x59d00c,null))[_0x4545('0x21')](removeEntity(_0x59d00c,null))[_0x4545('0x40')](handleError(_0x59d00c,null));};exports[_0x4545('0x45')]=function(_0x266f0c,_0x637b88){return db['CmHopperBlack']['describe']()[_0x4545('0x21')](respondWithResult(_0x637b88,null))[_0x4545('0x40')](handleError(_0x637b88,null));};
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/cmHopperBlack.model.js b/server/api/cmHopperBlack/cmHopperBlack.model.js
index 3932e25..0569844 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 _0x608c=['util','api','moment','request-promise','rimraf','./cmHopperBlack.attributes','exports','define','CmHopperBlack','cm_hopper_black','lodash'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x608c,0x1ee));var _0xc608=function(_0x44bca0,_0x219367){_0x44bca0=_0x44bca0-0x0;var _0x372db4=_0x608c[_0x44bca0];return _0x372db4;};'use strict';var _=require(_0xc608('0x0'));var util=require(_0xc608('0x1'));var logger=require('../../config/logger')(_0xc608('0x2'));var moment=require(_0xc608('0x3'));var BPromise=require('bluebird');var rp=require(_0xc608('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc608('0x5'));var config=require('../../config/environment');var attributes=require(_0xc608('0x6'));module[_0xc608('0x7')]=function(_0x52e15f,_0x130b95){return _0x52e15f[_0xc608('0x8')](_0xc608('0x9'),attributes,{'tableName':_0xc608('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0d48=['CmHopperBlack','lodash','moment','bluebird','path','rimraf','../../config/environment','exports','define'];(function(_0x4294e7,_0x2ab6ec){var _0xdb7164=function(_0x43e527){while(--_0x43e527){_0x4294e7['push'](_0x4294e7['shift']());}};_0xdb7164(++_0x2ab6ec);}(_0x0d48,0x121));var _0x80d4=function(_0x168017,_0x214a84){_0x168017=_0x168017-0x0;var _0xb9fb2=_0x0d48[_0x168017];return _0xb9fb2;};'use strict';var _=require(_0x80d4('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x80d4('0x1'));var BPromise=require(_0x80d4('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x80d4('0x3'));var rimraf=require(_0x80d4('0x4'));var config=require(_0x80d4('0x5'));var attributes=require('./cmHopperBlack.attributes');module[_0x80d4('0x6')]=function(_0x5edd7d,_0x228951){return _0x5edd7d[_0x80d4('0x7')](_0x80d4('0x8'),attributes,{'tableName':'cm_hopper_black','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 a836a5c..957b9ee 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 _0xacec=['catch','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','where','attributes','limit','include','map','model','UpdateCmHopperBlack','body','DestroyCmHopperBlack','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','stringify','error','message','result'];(function(_0x1b714f,_0x2a8fce){var _0x46df2a=function(_0x57e774){while(--_0x57e774){_0x1b714f['push'](_0x1b714f['shift']());}};_0x46df2a(++_0x2a8fce);}(_0xacec,0x153));var _0xcace=function(_0x3c6835,_0x952d5c){_0x3c6835=_0x3c6835-0x0;var _0x1adeb9=_0xacec[_0x3c6835];return _0x1adeb9;};'use strict';var _=require('lodash');var util=require(_0xcace('0x0'));var moment=require(_0xcace('0x1'));var BPromise=require(_0xcace('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xcace('0x3'));var db=require(_0xcace('0x4'))['db'];var utils=require(_0xcace('0x5'));var logger=require(_0xcace('0x6'))(_0xcace('0x7'));var config=require('../../config/environment');var jayson=require(_0xcace('0x8'));var client=jayson[_0xcace('0x9')][_0xcace('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x39cdd3,_0x17173c,_0x4e57b3){return new BPromise(function(_0x3182f5,_0x11a8d2){return client['request'](_0x39cdd3,_0x4e57b3)[_0xcace('0xb')](function(_0x2f39e3){logger[_0xcace('0xc')](_0xcace('0xd'),_0x17173c,_0xcace('0xe'));logger[_0xcace('0xf')](_0xcace('0x10'),_0x17173c,_0xcace('0xe'),JSON[_0xcace('0x11')](_0x2f39e3));if(_0x2f39e3[_0xcace('0x12')]){if(_0x2f39e3[_0xcace('0x12')]['code']===0x1f4){logger[_0xcace('0x12')]('CmHopperBlack,\x20%s,\x20%s',_0x17173c,_0x2f39e3['error'][_0xcace('0x13')]);return _0x11a8d2(_0x2f39e3['error']['message']);}logger[_0xcace('0x12')](_0xcace('0xd'),_0x17173c,_0x2f39e3[_0xcace('0x12')]['message']);return _0x3182f5(_0x2f39e3[_0xcace('0x12')][_0xcace('0x13')]);}else{logger[_0xcace('0xc')](_0xcace('0xd'),_0x17173c,_0xcace('0xe'));_0x3182f5(_0x2f39e3[_0xcace('0x14')]['message']);}})[_0xcace('0x15')](function(_0x16105d){logger[_0xcace('0x12')]('CmHopperBlack,\x20%s,\x20%s',_0x17173c,_0x16105d);_0x11a8d2(_0x16105d);});});}exports[_0xcace('0x16')]=function(_0x54bdd1){var _0x56ef47=this;return new Promise(function(_0x3ac27f,_0x8e62b5){return db[_0xcace('0x17')][_0xcace('0x18')]({'raw':_0x54bdd1[_0xcace('0x19')]?_0x54bdd1[_0xcace('0x19')][_0xcace('0x1a')]===undefined?!![]:![]:!![],'where':_0x54bdd1['options']?_0x54bdd1['options'][_0xcace('0x1b')]||null:null,'attributes':_0x54bdd1[_0xcace('0x19')]?_0x54bdd1[_0xcace('0x19')][_0xcace('0x1c')]||null:null,'limit':_0x54bdd1[_0xcace('0x19')]?_0x54bdd1['options'][_0xcace('0x1d')]||null:null,'include':_0x54bdd1[_0xcace('0x19')]?_0x54bdd1[_0xcace('0x19')][_0xcace('0x1e')]?_[_0xcace('0x1f')](_0x54bdd1[_0xcace('0x19')][_0xcace('0x1e')],function(_0x3620b4){return{'model':db[_0x3620b4[_0xcace('0x20')]],'as':_0x3620b4['as'],'attributes':_0x3620b4[_0xcace('0x1c')],'include':_0x3620b4[_0xcace('0x1e')]?_['map'](_0x3620b4['include'],function(_0x26e5d5){return{'model':db[_0x26e5d5[_0xcace('0x20')]],'as':_0x26e5d5['as'],'attributes':_0x26e5d5['attributes'],'include':_0x26e5d5[_0xcace('0x1e')]?_['map'](_0x26e5d5[_0xcace('0x1e')],function(_0x4a45d4){return{'model':db[_0x4a45d4[_0xcace('0x20')]],'as':_0x4a45d4['as'],'attributes':_0x4a45d4['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x184de){logger[_0xcace('0xc')](_0xcace('0x16'),_0x54bdd1);logger[_0xcace('0xf')](_0xcace('0x16'),_0x54bdd1,JSON[_0xcace('0x11')](_0x184de));_0x3ac27f(_0x184de);})[_0xcace('0x15')](function(_0x16b0cd){logger[_0xcace('0x12')](_0xcace('0x16'),_0x16b0cd[_0xcace('0x13')],_0x54bdd1);_0x8e62b5(_0x56ef47[_0xcace('0x12')](0x1f4,_0x16b0cd['message']));});});};exports[_0xcace('0x21')]=function(_0x506ec0){var _0x539816=this;return new Promise(function(_0x126b42,_0x3b5ab4){return db[_0xcace('0x17')]['update'](_0x506ec0[_0xcace('0x22')],{'raw':_0x506ec0[_0xcace('0x19')]?_0x506ec0[_0xcace('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x506ec0[_0xcace('0x19')]?_0x506ec0[_0xcace('0x19')]['where']||null:null,'attributes':_0x506ec0[_0xcace('0x19')]?_0x506ec0[_0xcace('0x19')][_0xcace('0x1c')]||null:null,'limit':_0x506ec0[_0xcace('0x19')]?_0x506ec0[_0xcace('0x19')][_0xcace('0x1d')]||null:null})[_0xcace('0xb')](function(_0xe2d49a){logger['info']('UpdateCmHopperBlack',_0x506ec0);logger['debug'](_0xcace('0x21'),_0x506ec0,JSON[_0xcace('0x11')](_0xe2d49a));_0x126b42(_0xe2d49a);})['catch'](function(_0x16fb7d){logger[_0xcace('0x12')](_0xcace('0x21'),_0x16fb7d[_0xcace('0x13')],_0x506ec0);_0x3b5ab4(_0x539816[_0xcace('0x12')](0x1f4,_0x16fb7d[_0xcace('0x13')]));});});};exports[_0xcace('0x23')]=function(_0x701351){var _0x1cfe1=this;return new Promise(function(_0x27fdd8,_0x34d1f0){return db['CmHopperBlack']['destroy']({'where':_0x701351[_0xcace('0x19')]?_0x701351['options'][_0xcace('0x1b')]||null:null})['then'](function(_0x28636e){logger[_0xcace('0xc')](_0xcace('0x23'),_0x701351);logger[_0xcace('0xf')](_0xcace('0x23'),_0x701351,JSON[_0xcace('0x11')](_0x28636e));_0x27fdd8(_0x28636e);})[_0xcace('0x15')](function(_0x3704b4){logger[_0xcace('0x12')](_0xcace('0x23'),_0x3704b4[_0xcace('0x13')],_0x701351);_0x34d1f0(_0x1cfe1[_0xcace('0x12')](0x1f4,_0x3704b4[_0xcace('0x13')]));});});};
\ No newline at end of file
+var _0xe8bf=['client','http','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','limit','include','map','model','attributes','catch','update','where','UpdateCmHopperBlack','destroy','DestroyCmHopperBlack','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0xdd6d36,_0x5e1adb){var _0x1a0472=function(_0x314249){while(--_0x314249){_0xdd6d36['push'](_0xdd6d36['shift']());}};_0x1a0472(++_0x5e1adb);}(_0xe8bf,0xdb));var _0xfe8b=function(_0x428d84,_0x4961fb){_0x428d84=_0x428d84-0x0;var _0x42c310=_0xe8bf[_0x428d84];return _0x42c310;};'use strict';var _=require(_0xfe8b('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xfe8b('0x1'));var rs=require(_0xfe8b('0x2'));var fs=require('fs');var Redis=require(_0xfe8b('0x3'));var db=require(_0xfe8b('0x4'))['db'];var utils=require(_0xfe8b('0x5'));var logger=require(_0xfe8b('0x6'))('rpc');var config=require(_0xfe8b('0x7'));var jayson=require(_0xfe8b('0x8'));var client=jayson[_0xfe8b('0x9')][_0xfe8b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x435bdb,_0x538e43,_0x2cbe19){return new BPromise(function(_0x5f39a7,_0x4a1046){return client[_0xfe8b('0xb')](_0x435bdb,_0x2cbe19)[_0xfe8b('0xc')](function(_0x1856f4){logger[_0xfe8b('0xd')](_0xfe8b('0xe'),_0x538e43,_0xfe8b('0xf'));logger[_0xfe8b('0x10')]('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x538e43,_0xfe8b('0xf'),JSON[_0xfe8b('0x11')](_0x1856f4));if(_0x1856f4['error']){if(_0x1856f4[_0xfe8b('0x12')][_0xfe8b('0x13')]===0x1f4){logger[_0xfe8b('0x12')](_0xfe8b('0xe'),_0x538e43,_0x1856f4['error'][_0xfe8b('0x14')]);return _0x4a1046(_0x1856f4[_0xfe8b('0x12')][_0xfe8b('0x14')]);}logger[_0xfe8b('0x12')]('CmHopperBlack,\x20%s,\x20%s',_0x538e43,_0x1856f4[_0xfe8b('0x12')][_0xfe8b('0x14')]);return _0x5f39a7(_0x1856f4[_0xfe8b('0x12')][_0xfe8b('0x14')]);}else{logger['info'](_0xfe8b('0xe'),_0x538e43,_0xfe8b('0xf'));_0x5f39a7(_0x1856f4[_0xfe8b('0x15')][_0xfe8b('0x14')]);}})['catch'](function(_0x1e53e5){logger['error'](_0xfe8b('0xe'),_0x538e43,_0x1e53e5);_0x4a1046(_0x1e53e5);});});}exports[_0xfe8b('0x16')]=function(_0x3ba274){var _0x468deb=this;return new Promise(function(_0x51c91a,_0x59fd40){return db[_0xfe8b('0x17')][_0xfe8b('0x18')]({'raw':_0x3ba274[_0xfe8b('0x19')]?_0x3ba274['options'][_0xfe8b('0x1a')]===undefined?!![]:![]:!![],'where':_0x3ba274[_0xfe8b('0x19')]?_0x3ba274[_0xfe8b('0x19')]['where']||null:null,'attributes':_0x3ba274[_0xfe8b('0x19')]?_0x3ba274[_0xfe8b('0x19')]['attributes']||null:null,'limit':_0x3ba274['options']?_0x3ba274[_0xfe8b('0x19')][_0xfe8b('0x1b')]||null:null,'include':_0x3ba274[_0xfe8b('0x19')]?_0x3ba274[_0xfe8b('0x19')][_0xfe8b('0x1c')]?_[_0xfe8b('0x1d')](_0x3ba274[_0xfe8b('0x19')][_0xfe8b('0x1c')],function(_0x2f039d){return{'model':db[_0x2f039d[_0xfe8b('0x1e')]],'as':_0x2f039d['as'],'attributes':_0x2f039d['attributes'],'include':_0x2f039d[_0xfe8b('0x1c')]?_[_0xfe8b('0x1d')](_0x2f039d[_0xfe8b('0x1c')],function(_0x5abbc5){return{'model':db[_0x5abbc5[_0xfe8b('0x1e')]],'as':_0x5abbc5['as'],'attributes':_0x5abbc5[_0xfe8b('0x1f')],'include':_0x5abbc5[_0xfe8b('0x1c')]?_[_0xfe8b('0x1d')](_0x5abbc5[_0xfe8b('0x1c')],function(_0x2a1e4d){return{'model':db[_0x2a1e4d[_0xfe8b('0x1e')]],'as':_0x2a1e4d['as'],'attributes':_0x2a1e4d[_0xfe8b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xfe8b('0xc')](function(_0x129192){logger[_0xfe8b('0xd')](_0xfe8b('0x16'),_0x3ba274);logger['debug'](_0xfe8b('0x16'),_0x3ba274,JSON[_0xfe8b('0x11')](_0x129192));_0x51c91a(_0x129192);})[_0xfe8b('0x20')](function(_0x2e629b){logger[_0xfe8b('0x12')]('GetCmHopperBlack',_0x2e629b[_0xfe8b('0x14')],_0x3ba274);_0x59fd40(_0x468deb[_0xfe8b('0x12')](0x1f4,_0x2e629b['message']));});});};exports['UpdateCmHopperBlack']=function(_0x3301d6){var _0x1ff1ee=this;return new Promise(function(_0x2fe3fb,_0x553b94){return db[_0xfe8b('0x17')][_0xfe8b('0x21')](_0x3301d6['body'],{'raw':_0x3301d6['options']?_0x3301d6[_0xfe8b('0x19')][_0xfe8b('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3301d6[_0xfe8b('0x19')]?_0x3301d6['options'][_0xfe8b('0x22')]||null:null,'attributes':_0x3301d6['options']?_0x3301d6[_0xfe8b('0x19')]['attributes']||null:null,'limit':_0x3301d6[_0xfe8b('0x19')]?_0x3301d6[_0xfe8b('0x19')][_0xfe8b('0x1b')]||null:null})[_0xfe8b('0xc')](function(_0x15a6be){logger['info']('UpdateCmHopperBlack',_0x3301d6);logger[_0xfe8b('0x10')](_0xfe8b('0x23'),_0x3301d6,JSON['stringify'](_0x15a6be));_0x2fe3fb(_0x15a6be);})['catch'](function(_0x316541){logger[_0xfe8b('0x12')](_0xfe8b('0x23'),_0x316541[_0xfe8b('0x14')],_0x3301d6);_0x553b94(_0x1ff1ee['error'](0x1f4,_0x316541['message']));});});};exports['DestroyCmHopperBlack']=function(_0x4683d4){var _0x4c5130=this;return new Promise(function(_0x3a94da,_0x5025be){return db[_0xfe8b('0x17')][_0xfe8b('0x24')]({'where':_0x4683d4[_0xfe8b('0x19')]?_0x4683d4[_0xfe8b('0x19')]['where']||null:null})[_0xfe8b('0xc')](function(_0x2fa90b){logger[_0xfe8b('0xd')](_0xfe8b('0x25'),_0x4683d4);logger['debug'](_0xfe8b('0x25'),_0x4683d4,JSON[_0xfe8b('0x11')](_0x2fa90b));_0x3a94da(_0x2fa90b);})[_0xfe8b('0x20')](function(_0x16863e){logger[_0xfe8b('0x12')](_0xfe8b('0x25'),_0x16863e[_0xfe8b('0x14')],_0x4683d4);_0x5025be(_0x4c5130[_0xfe8b('0x12')](0x1f4,_0x16863e['message']));});});};
\ No newline at end of file
diff --git a/server/api/cmHopperBlack/index.js b/server/api/cmHopperBlack/index.js
index c9456d6..8f1fb2c 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 _0x3e74=['connect-timeout','express','../../components/interaction/service','./cmHopperBlack.controller','get','isAuthenticated','index','describe','/:id','put','update','delete','exports','multer','path'];(function(_0xc0a626,_0x3f3d91){var _0x2717b6=function(_0x3fb8a7){while(--_0x3fb8a7){_0xc0a626['push'](_0xc0a626['shift']());}};_0x2717b6(++_0x3f3d91);}(_0x3e74,0x175));var _0x43e7=function(_0x171835,_0x19fa27){_0x171835=_0x171835-0x0;var _0x4945c1=_0x3e74[_0x171835];return _0x4945c1;};'use strict';var multer=require(_0x43e7('0x0'));var util=require('util');var path=require(_0x43e7('0x1'));var timeout=require(_0x43e7('0x2'));var express=require(_0x43e7('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x43e7('0x4'));var config=require('../../config/environment');var controller=require(_0x43e7('0x5'));router[_0x43e7('0x6')]('/',auth[_0x43e7('0x7')](),controller[_0x43e7('0x8')]);router[_0x43e7('0x6')]('/describe',auth[_0x43e7('0x7')](),controller[_0x43e7('0x9')]);router[_0x43e7('0x6')](_0x43e7('0xa'),auth[_0x43e7('0x7')](),controller['show']);router[_0x43e7('0xb')]('/:id',auth['isAuthenticated'](),controller[_0x43e7('0xc')]);router[_0x43e7('0xd')]('/:id',auth[_0x43e7('0x7')](),controller['destroy']);module[_0x43e7('0xe')]=router;
\ No newline at end of file
+var _0xa8a8=['index','/describe','describe','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperBlack.controller','get','isAuthenticated'];(function(_0x137d80,_0x4ca815){var _0x406c15=function(_0x1f0e13){while(--_0x1f0e13){_0x137d80['push'](_0x137d80['shift']());}};_0x406c15(++_0x4ca815);}(_0xa8a8,0xec));var _0x8a8a=function(_0x2b7c67,_0x130853){_0x2b7c67=_0x2b7c67-0x0;var _0x5180ad=_0xa8a8[_0x2b7c67];return _0x5180ad;};'use strict';var multer=require(_0x8a8a('0x0'));var util=require(_0x8a8a('0x1'));var path=require(_0x8a8a('0x2'));var timeout=require(_0x8a8a('0x3'));var express=require('express');var router=express[_0x8a8a('0x4')]();var auth=require(_0x8a8a('0x5'));var interaction=require(_0x8a8a('0x6'));var config=require(_0x8a8a('0x7'));var controller=require(_0x8a8a('0x8'));router[_0x8a8a('0x9')]('/',auth[_0x8a8a('0xa')](),controller[_0x8a8a('0xb')]);router[_0x8a8a('0x9')](_0x8a8a('0xc'),auth[_0x8a8a('0xa')](),controller[_0x8a8a('0xd')]);router[_0x8a8a('0x9')](_0x8a8a('0xe'),auth[_0x8a8a('0xa')](),controller['show']);router['put'](_0x8a8a('0xe'),auth['isAuthenticated'](),controller[_0x8a8a('0xf')]);router[_0x8a8a('0x10')]('/:id',auth[_0x8a8a('0xa')](),controller[_0x8a8a('0x11')]);module[_0x8a8a('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.attributes.js b/server/api/cmHopperFinal/cmHopperFinal.attributes.js
index 455b95f..d76ee36 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 _0x870e=['INTEGER','STRING','DATE','getDataValue','followuptime','diff','setDataValue','dispositionat','BOOLEAN','sequelize'];(function(_0x554e81,_0x466468){var _0x2cfe1f=function(_0x314918){while(--_0x314918){_0x554e81['push'](_0x554e81['shift']());}};_0x2cfe1f(++_0x466468);}(_0x870e,0x199));var _0xe870=function(_0x2725fe,_0x2f78c0){_0x2725fe=_0x2725fe-0x0;var _0x1cc7d8=_0x870e[_0x2725fe];return _0x1cc7d8;};'use strict';var Sequelize=require(_0xe870('0x0'));var moment=require('moment');module['exports']={'state':{'type':Sequelize[_0xe870('0x1')](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize['DATE']},'countbusyretry':{'type':Sequelize[_0xe870('0x1')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xe870('0x1')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xe870('0x1')],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xe870('0x2')]},'originatecalleridnum':{'type':Sequelize[_0xe870('0x2')]},'originatecalleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0xe870('0x3')]},'responsetime':{'type':Sequelize[_0xe870('0x3')]},'answertime':{'type':Sequelize[_0xe870('0x3')]},'droptime':{'type':Sequelize[_0xe870('0x3')]},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize[_0xe870('0x1')],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0xe870('0x2')]},'campaign':{'type':Sequelize[_0xe870('0x2')]},'campaigntype':{'type':Sequelize[_0xe870('0x2')]},'membername':{'type':Sequelize['STRING']},'reason':{'type':Sequelize[_0xe870('0x2')]},'disposition':{'type':Sequelize[_0xe870('0x2')]},'dispositionat':{'type':Sequelize[_0xe870('0x3')],'set':function(_0x5158c0){var _0x347540=this[_0xe870('0x4')]('endtime');if(_0x347540&&_0x5158c0){this['setDataValue'](_0xe870('0x5'),moment(_0x5158c0)[_0xe870('0x6')](moment(_0x347540),'seconds'));}return this[_0xe870('0x7')](_0xe870('0x8'),_0x5158c0);}},'amd':{'type':Sequelize[_0xe870('0x9')],'defaultValue':![]},'fax':{'type':Sequelize[_0xe870('0x9')],'defaultValue':![]},'blacklist':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'rescheduled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'rescheduledat':{'type':Sequelize[_0xe870('0x3')]},'callback':{'type':Sequelize[_0xe870('0x9')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0xe870('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'deleted':{'type':Sequelize['STRING'],'defaultValue':null},'deletedat':{'type':Sequelize[_0xe870('0x3')]},'recallme':{'type':Sequelize[_0xe870('0x9')],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0xe870('0x3')]},'countnosuchnumberretry':{'type':Sequelize[_0xe870('0x1')],'defaultValue':0x0},'countdropretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xe870('0x1')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xe870('0x1')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0x55a1=['exports','STRING','DATE','INTEGER','getDataValue','endtime','setDataValue','followuptime','diff','seconds','dispositionat','BOOLEAN','sequelize','moment'];(function(_0x42bdad,_0x12836c){var _0x122626=function(_0x2eb29c){while(--_0x2eb29c){_0x42bdad['push'](_0x42bdad['shift']());}};_0x122626(++_0x12836c);}(_0x55a1,0x15c));var _0x155a=function(_0x4004d6,_0x1ef87b){_0x4004d6=_0x4004d6-0x0;var _0x5aacf4=_0x55a1[_0x4004d6];return _0x5aacf4;};'use strict';var Sequelize=require(_0x155a('0x0'));var moment=require(_0x155a('0x1'));module[_0x155a('0x2')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize[_0x155a('0x3')]},'scheduledat':{'type':Sequelize[_0x155a('0x4')]},'countbusyretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x155a('0x3')]},'originatecalleridnum':{'type':Sequelize['STRING']},'originatecalleridname':{'type':Sequelize[_0x155a('0x3')]},'calleridnum':{'type':Sequelize[_0x155a('0x3')]},'calleridname':{'type':Sequelize[_0x155a('0x3')]},'starttime':{'type':Sequelize[_0x155a('0x4')]},'responsetime':{'type':Sequelize[_0x155a('0x4')]},'answertime':{'type':Sequelize['DATE']},'droptime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize[_0x155a('0x4')]},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x155a('0x3')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x155a('0x3')]},'membername':{'type':Sequelize[_0x155a('0x3')]},'reason':{'type':Sequelize[_0x155a('0x3')]},'disposition':{'type':Sequelize[_0x155a('0x3')]},'dispositionat':{'type':Sequelize[_0x155a('0x4')],'set':function(_0x22b341){var _0x52c379=this[_0x155a('0x6')](_0x155a('0x7'));if(_0x52c379&&_0x22b341){this[_0x155a('0x8')](_0x155a('0x9'),moment(_0x22b341)[_0x155a('0xa')](moment(_0x52c379),_0x155a('0xb')));}return this[_0x155a('0x8')](_0x155a('0xc'),_0x22b341);}},'amd':{'type':Sequelize[_0x155a('0xd')],'defaultValue':![]},'fax':{'type':Sequelize[_0x155a('0xd')],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x155a('0xd')],'defaultValue':![]},'rescheduled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'rescheduledat':{'type':Sequelize[_0x155a('0x4')]},'callback':{'type':Sequelize[_0x155a('0xd')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x155a('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x155a('0x4')]},'deleted':{'type':Sequelize[_0x155a('0x3')],'defaultValue':null},'deletedat':{'type':Sequelize[_0x155a('0x4')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x155a('0x4')]},'countnosuchnumberretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x155a('0x5')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.controller.js b/server/api/cmHopperFinal/cmHopperFinal.controller.js
index c54fb7f..c38ae03 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 _0x781e=['from','cm_hopper_final','toString','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','VoiceQueueId\x20=\x20?','calleridnum','state\x20=\x204','Campaign','CampaignId','ANY_VALUE(calleridnum)','ANY_VALUE(CampaignId)','state','CampaignId\x20=\x20?','group','checkContactHopper','CmHopper','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','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','CmHopperFinal','rawAttributes','fieldName','model','map','query','filters','attributes','fields','hasOwnProperty','limit','order','sort','pick','where','merge','type','VIRTUAL','filter','includeAll','include','findAll','catch','params','keys','intersection','length','options','find','uniqueid','body','COUNT','sequelize','literal','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','`state`\x20=\x205,\x201,\x20null','busyContacts','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','countContactsIvrCampaignHopperFinal','`state`\x20=\x208,\x201,\x20null','reCallContacts','answeringMachine','moveContactsQueueCampaignHopperFinal','VoiceQueue','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','createdAt','updatedAt','select','field','NOW()','ANY_VALUE(ContactId)','ANY_VALUE(ListId)','ANY_VALUE(VoiceQueueId)','VoiceQueueId'];(function(_0x31c5fd,_0x33131f){var _0x3799ab=function(_0x1538bf){while(--_0x1538bf){_0x31c5fd['push'](_0x31c5fd['shift']());}};_0x3799ab(++_0x33131f);}(_0x781e,0x18b));var _0xe781=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x781e[_0x502c7d];return _0x30b7ed;};'use strict';var pdf=require(_0xe781('0x0'));var emlformat=require(_0xe781('0x1'));var rimraf=require(_0xe781('0x2'));var zipdir=require(_0xe781('0x3'));var jsonpatch=require(_0xe781('0x4'));var rp=require(_0xe781('0x5'));var moment=require(_0xe781('0x6'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xe781('0x7'));var path=require(_0xe781('0x8'));var sox=require(_0xe781('0x9'));var csv=require(_0xe781('0xa'));var ejs=require(_0xe781('0xb'));var fs=require('fs');var _=require(_0xe781('0xc'));var squel=require(_0xe781('0xd'));var crypto=require(_0xe781('0xe'));var jsforce=require(_0xe781('0xf'));var deskjs=require(_0xe781('0x10'));var toCsv=require(_0xe781('0xa'));var querystring=require('querystring');var Papa=require(_0xe781('0x11'));var Redis=require('ioredis');var authService=require(_0xe781('0x12'));var qs=require(_0xe781('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe781('0x14'));var logger=require(_0xe781('0x15'))(_0xe781('0x16'));var utils=require(_0xe781('0x17'));var config=require('../../config/environment');var db=require(_0xe781('0x18'))['db'];function respondWithStatusCode(_0x4b5998,_0x3b02d8){_0x3b02d8=_0x3b02d8||0xcc;return function(_0x2c1d4c){if(_0x2c1d4c){return _0x4b5998[_0xe781('0x19')](_0x3b02d8);}return _0x4b5998[_0xe781('0x1a')](_0x3b02d8)[_0xe781('0x1b')]();};}function respondWithResult(_0x3d145b,_0x589941){_0x589941=_0x589941||0xc8;return function(_0x3f0e25){if(_0x3f0e25){return _0x3d145b['status'](_0x589941)[_0xe781('0x1c')](_0x3f0e25);}};}function respondWithFilteredResult(_0x4733a3,_0x22661c){return function(_0x3b5402){if(_0x3b5402){var _0x52ac2a=_0x3b5402[_0xe781('0x1d')],_0x5db493=_0x22661c[_0xe781('0x1e')],_0x51706f=_0x22661c['offset']+_0x22661c['limit'],_0x3f3694;if(_0x51706f>=_0x52ac2a){_0x51706f=_0x52ac2a;_0x3f3694=0xc8;}else{_0x3f3694=0xce;}_0x4733a3[_0xe781('0x1a')](_0x3f3694);return _0x4733a3[_0xe781('0x1f')](_0xe781('0x20'),_0x5db493+'-'+_0x51706f+'/'+_0x52ac2a)[_0xe781('0x1c')](_0x3b5402);}return null;};}function patchUpdates(_0x1add5f){return function(_0x201211){try{jsonpatch[_0xe781('0x21')](_0x201211,_0x1add5f,!![]);}catch(_0x3e95a2){return BPromise['reject'](_0x3e95a2);}return _0x201211[_0xe781('0x22')]();};}function saveUpdates(_0x3b8803,_0x2d5c5d){return function(_0x2fa625){if(_0x2fa625){return _0x2fa625[_0xe781('0x23')](_0x3b8803)[_0xe781('0x24')](function(_0x15805c){return _0x15805c;});}return null;};}function removeEntity(_0x13b48c,_0x3e021d){return function(_0x40d5bd){if(_0x40d5bd){return _0x40d5bd[_0xe781('0x25')]()[_0xe781('0x24')](function(){_0x13b48c[_0xe781('0x1a')](0xcc)[_0xe781('0x1b')]();});}};}function handleEntityNotFound(_0x21c953,_0x2a5061){return function(_0x526d74){if(!_0x526d74){_0x21c953[_0xe781('0x19')](0x194);}return _0x526d74;};}function handleError(_0x1ea9d9,_0x448f3d){_0x448f3d=_0x448f3d||0x1f4;return function(_0x283e99){logger[_0xe781('0x26')](_0x283e99[_0xe781('0x27')]);if(_0x283e99[_0xe781('0x28')]){delete _0x283e99[_0xe781('0x28')];}_0x1ea9d9[_0xe781('0x1a')](_0x448f3d)[_0xe781('0x29')](_0x283e99);};}exports['index']=function(_0x172eb2,_0x4715e0){var _0x573fb8={},_0x1f9f13={},_0x43f146={'count':0x0,'rows':[]};var _0x20b499=_['map'](db[_0xe781('0x2a')][_0xe781('0x2b')],function(_0x2ca223){return{'name':_0x2ca223[_0xe781('0x2c')],'type':_0x2ca223['type']['key']};});_0x1f9f13[_0xe781('0x2d')]=_[_0xe781('0x2e')](_0x20b499,_0xe781('0x28'));_0x1f9f13[_0xe781('0x2f')]=_['keys'](_0x172eb2[_0xe781('0x2f')]);_0x1f9f13[_0xe781('0x30')]=_['intersection'](_0x1f9f13[_0xe781('0x2d')],_0x1f9f13['query']);_0x573fb8[_0xe781('0x31')]=_['intersection'](_0x1f9f13[_0xe781('0x2d')],qs[_0xe781('0x32')](_0x172eb2[_0xe781('0x2f')][_0xe781('0x32')]));_0x573fb8['attributes']=_0x573fb8[_0xe781('0x31')]['length']?_0x573fb8[_0xe781('0x31')]:_0x1f9f13['model'];if(!_0x172eb2[_0xe781('0x2f')][_0xe781('0x33')]('nolimit')){_0x573fb8[_0xe781('0x34')]=qs[_0xe781('0x34')](_0x172eb2[_0xe781('0x2f')][_0xe781('0x34')]);_0x573fb8[_0xe781('0x1e')]=qs[_0xe781('0x1e')](_0x172eb2['query']['offset']);}_0x573fb8[_0xe781('0x35')]=qs[_0xe781('0x36')](_0x172eb2[_0xe781('0x2f')][_0xe781('0x36')]);_0x573fb8['where']=qs['filters'](_[_0xe781('0x37')](_0x172eb2['query'],_0x1f9f13[_0xe781('0x30')]));if(_0x172eb2['query']['filter']){_0x573fb8[_0xe781('0x38')]=_[_0xe781('0x39')](_0x573fb8[_0xe781('0x38')],{'$or':_[_0xe781('0x2e')](_0x20b499,function(_0x27e9cb){if(_0x27e9cb[_0xe781('0x3a')]!==_0xe781('0x3b')){var _0x217980={};_0x217980[_0x27e9cb[_0xe781('0x28')]]={'$like':'%'+_0x172eb2[_0xe781('0x2f')][_0xe781('0x3c')]+'%'};return _0x217980;}})});}_0x573fb8=_[_0xe781('0x39')]({},_0x573fb8,_0x172eb2['options']);var _0x36bac7={'where':_0x573fb8['where']};return db[_0xe781('0x2a')]['count'](_0x36bac7)[_0xe781('0x24')](function(_0xf10ef8){_0x43f146['count']=_0xf10ef8;if(_0x172eb2['query'][_0xe781('0x3d')]){_0x573fb8[_0xe781('0x3e')]=[{'all':!![]}];}return db['CmHopperFinal'][_0xe781('0x3f')](_0x573fb8);})['then'](function(_0xc201f0){_0x43f146['rows']=_0xc201f0;return _0x43f146;})[_0xe781('0x24')](respondWithFilteredResult(_0x4715e0,_0x573fb8))[_0xe781('0x40')](handleError(_0x4715e0,null));};exports['show']=function(_0x30a952,_0x453641){var _0x41ec97={'raw':!![],'where':{'id':_0x30a952[_0xe781('0x41')]['id']}},_0x478d71={};_0x478d71['model']=_[_0xe781('0x42')](db[_0xe781('0x2a')][_0xe781('0x2b')]);_0x478d71[_0xe781('0x2f')]=_[_0xe781('0x42')](_0x30a952[_0xe781('0x2f')]);_0x478d71[_0xe781('0x30')]=_['intersection'](_0x478d71[_0xe781('0x2d')],_0x478d71[_0xe781('0x2f')]);_0x41ec97[_0xe781('0x31')]=_[_0xe781('0x43')](_0x478d71[_0xe781('0x2d')],qs['fields'](_0x30a952[_0xe781('0x2f')][_0xe781('0x32')]));_0x41ec97[_0xe781('0x31')]=_0x41ec97[_0xe781('0x31')][_0xe781('0x44')]?_0x41ec97[_0xe781('0x31')]:_0x478d71[_0xe781('0x2d')];if(_0x30a952['query']['includeAll']){_0x41ec97[_0xe781('0x3e')]=[{'all':!![]}];}_0x41ec97=_['merge']({},_0x41ec97,_0x30a952[_0xe781('0x45')]);return db[_0xe781('0x2a')][_0xe781('0x46')](_0x41ec97)['then'](handleEntityNotFound(_0x453641,null))[_0xe781('0x24')](respondWithResult(_0x453641,null))[_0xe781('0x40')](handleError(_0x453641,null));};exports['describe']=function(_0x3f8f33,_0x9c1836){return db['CmHopperFinal']['describe']()[_0xe781('0x24')](respondWithResult(_0x9c1836,null))[_0xe781('0x40')](handleError(_0x9c1836,null));};exports[_0xe781('0x23')]=function(_0x4ad5c6,_0x59b821){if(_0x4ad5c6['body'][_0xe781('0x47')]){delete _0x4ad5c6[_0xe781('0x48')][_0xe781('0x47')];}return db[_0xe781('0x2a')]['find']({'where':{'uniqueid':_0x4ad5c6['params']['id']}})[_0xe781('0x24')](handleEntityNotFound(_0x59b821,null))[_0xe781('0x24')](saveUpdates(_0x4ad5c6[_0xe781('0x48')],null))['then'](respondWithResult(_0x59b821,null))[_0xe781('0x40')](handleError(_0x59b821,null));};exports['countContactsQueueCampaignHopperFinal']=function(_0x59b3c2,_0x45d6bc,_0x3da4f3){return db[_0xe781('0x2a')][_0xe781('0x3f')]({'raw':![],'where':{'VoiceQueueId':_0x59b3c2[_0xe781('0x41')]['id']},'attributes':[[db['sequelize']['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db[_0xe781('0x4a')][_0xe781('0x4b')]('`state`\x20=\x200,\x201,\x20null'))),'noSuchContacts'],[db[_0xe781('0x4a')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xe781('0x4a')]['literal'](_0xe781('0x4c')))),_0xe781('0x4d')],[db[_0xe781('0x4a')]['fn']('COUNT',db[_0xe781('0x4a')]['fn']('IF',db[_0xe781('0x4a')][_0xe781('0x4b')](_0xe781('0x4e')))),_0xe781('0x4f')],[db[_0xe781('0x4a')]['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db['sequelize'][_0xe781('0x4b')]('`state`\x20=\x208,\x201,\x20null'))),_0xe781('0x50')],[db[_0xe781('0x4a')]['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db['sequelize'][_0xe781('0x4b')](_0xe781('0x51')))),_0xe781('0x52')],[db[_0xe781('0x4a')]['fn']('COUNT',db[_0xe781('0x4a')]['fn']('IF',db['sequelize']['literal'](_0xe781('0x53')))),_0xe781('0x54')],[db[_0xe781('0x4a')]['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db['sequelize']['literal'](_0xe781('0x55')))),'reCallContacts'],[db['sequelize']['fn']('COUNT',db[_0xe781('0x4a')]['fn']('IF',db['sequelize'][_0xe781('0x4b')]('`state`\x20=\x2019,\x201,\x20null'))),'answeringMachine']]})[_0xe781('0x24')](handleEntityNotFound(_0x45d6bc,null))[_0xe781('0x24')](respondWithResult(_0x45d6bc,null))[_0xe781('0x40')](handleError(_0x45d6bc,null));};exports[_0xe781('0x56')]=function(_0x41e5ae,_0x522715,_0x40be67){return db[_0xe781('0x2a')]['findAll']({'raw':![],'where':{'CampaignId':_0x41e5ae[_0xe781('0x41')]['id']},'attributes':[[db[_0xe781('0x4a')]['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db[_0xe781('0x4a')][_0xe781('0x4b')]('`state`\x20=\x200,\x201,\x20null'))),'noSuchContacts'],[db[_0xe781('0x4a')]['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db[_0xe781('0x4a')]['literal']('`state`\x20=\x203,\x201,\x20null'))),'noAnswerContacts'],[db['sequelize']['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db[_0xe781('0x4a')]['literal'](_0xe781('0x4e')))),'busyContacts'],[db[_0xe781('0x4a')]['fn'](_0xe781('0x49'),db['sequelize']['fn']('IF',db[_0xe781('0x4a')][_0xe781('0x4b')](_0xe781('0x57')))),_0xe781('0x50')],[db[_0xe781('0x4a')]['fn']('COUNT',db[_0xe781('0x4a')]['fn']('IF',db[_0xe781('0x4a')][_0xe781('0x4b')](_0xe781('0x51')))),'dropContacts'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xe781('0x4a')]['literal'](_0xe781('0x53')))),'abandonedContacts'],[db['sequelize']['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db['sequelize']['literal']('`state`\x20=\x2022,\x201,\x20null'))),_0xe781('0x58')],[db[_0xe781('0x4a')]['fn'](_0xe781('0x49'),db[_0xe781('0x4a')]['fn']('IF',db[_0xe781('0x4a')][_0xe781('0x4b')]('`state`\x20=\x2019,\x201,\x20null'))),_0xe781('0x59')]]})[_0xe781('0x24')](handleEntityNotFound(_0x522715,null))['then'](respondWithResult(_0x522715,null))['catch'](handleError(_0x522715,null));};exports[_0xe781('0x5a')]=function(_0x1fc310,_0x4a222d,_0x33ef9d){return db[_0xe781('0x5b')][_0xe781('0x46')]({'where':{'id':_0x1fc310[_0xe781('0x41')]['id']}})[_0xe781('0x24')](handleEntityNotFound(_0x4a222d,null))['then'](function(_0x6f05b1){var _0x255b52;if(_0x6f05b1){_0x255b52=squel[_0xe781('0x5c')]()[_0xe781('0x5d')](_0xe781('0x5e'))[_0xe781('0x5f')]([_0xe781('0x60'),_0xe781('0x61'),_0xe781('0x62'),_0xe781('0x63'),'VoiceQueueId',_0xe781('0x64'),_0xe781('0x65')],squel[_0xe781('0x66')]()[_0xe781('0x67')]('ANY_VALUE(calleridnum)',_0xe781('0x60'))[_0xe781('0x67')](_0xe781('0x68'),'scheduledAt')['field'](_0xe781('0x69'),_0xe781('0x62'))[_0xe781('0x67')](_0xe781('0x6a'),_0xe781('0x63'))[_0xe781('0x67')](_0xe781('0x6b'),_0xe781('0x6c'))[_0xe781('0x67')](_0xe781('0x68'),'createdAt')[_0xe781('0x67')](_0xe781('0x68'),_0xe781('0x65'))[_0xe781('0x6d')](_0xe781('0x6e'))['where']('VoiceQueueId\x20=\x20?',_0x1fc310[_0xe781('0x41')]['id'][_0xe781('0x6f')]())[_0xe781('0x38')]('state\x20=\x20?',_0x1fc310['body']['state'][_0xe781('0x6f')]())[_0xe781('0x38')](_0xe781('0x70'))[_0xe781('0x38')](_0xe781('0x71'),squel[_0xe781('0x66')]()[_0xe781('0x67')](_0xe781('0x60'))['from'](_0xe781('0x5e'))[_0xe781('0x38')](_0xe781('0x72'),_0x1fc310[_0xe781('0x41')]['id'][_0xe781('0x6f')]()))['where'](_0xe781('0x71'),squel[_0xe781('0x66')]()['field'](_0xe781('0x73'))[_0xe781('0x6d')](_0xe781('0x6e'))['where'](_0xe781('0x72'),_0x1fc310['params']['id'][_0xe781('0x6f')]())[_0xe781('0x38')](_0xe781('0x74')))['group'](_0xe781('0x62')))['toString']();return db[_0xe781('0x4a')][_0xe781('0x2f')](_0x255b52);}return[];})[_0xe781('0x24')](respondWithResult(_0x4a222d,null))['catch'](handleError(_0x4a222d,null));};exports['moveContactsIvrCampaignHopperFinal']=function(_0x5334a6,_0x5197db,_0x35c248){return db[_0xe781('0x75')][_0xe781('0x46')]({'where':{'id':_0x5334a6[_0xe781('0x41')]['id']}})[_0xe781('0x24')](handleEntityNotFound(_0x5197db,null))['then'](function(_0x49ae4a){var _0x1eec9c;if(_0x49ae4a){_0x1eec9c=squel[_0xe781('0x5c')]()[_0xe781('0x5d')](_0xe781('0x5e'))[_0xe781('0x5f')]([_0xe781('0x60'),_0xe781('0x61'),_0xe781('0x62'),_0xe781('0x63'),_0xe781('0x76'),_0xe781('0x64'),'updatedAt'],squel[_0xe781('0x66')]()[_0xe781('0x67')](_0xe781('0x77'),_0xe781('0x60'))[_0xe781('0x67')](_0xe781('0x68'),_0xe781('0x61'))[_0xe781('0x67')](_0xe781('0x69'),_0xe781('0x62'))['field'](_0xe781('0x6a'),_0xe781('0x63'))[_0xe781('0x67')](_0xe781('0x78'),'CampaignId')['field']('NOW()',_0xe781('0x64'))[_0xe781('0x67')](_0xe781('0x68'),_0xe781('0x65'))[_0xe781('0x6d')]('cm_hopper_final')[_0xe781('0x38')]('CampaignId\x20=\x20?',_0x5334a6['params']['id'][_0xe781('0x6f')]())[_0xe781('0x38')]('state\x20=\x20?',_0x5334a6[_0xe781('0x48')][_0xe781('0x79')]['toString']())['where']('calleridnum\x20IS\x20NOT\x20NULL')[_0xe781('0x38')](_0xe781('0x71'),squel[_0xe781('0x66')]()[_0xe781('0x67')](_0xe781('0x60'))[_0xe781('0x6d')](_0xe781('0x5e'))[_0xe781('0x38')](_0xe781('0x7a'),_0x5334a6[_0xe781('0x41')]['id'][_0xe781('0x6f')]()))[_0xe781('0x38')](_0xe781('0x71'),squel[_0xe781('0x66')]()['field'](_0xe781('0x73'))[_0xe781('0x6d')](_0xe781('0x6e'))['where'](_0xe781('0x7a'),_0x5334a6[_0xe781('0x41')]['id'][_0xe781('0x6f')]())[_0xe781('0x38')](_0xe781('0x74')))[_0xe781('0x7b')](_0xe781('0x62')))[_0xe781('0x6f')]();return db[_0xe781('0x4a')]['query'](_0x1eec9c);}return[];})['then'](respondWithResult(_0x5197db,null))[_0xe781('0x40')](handleError(_0x5197db,null));};exports[_0xe781('0x7c')]=function(_0x2725b2,_0x10e4d3,_0x4dd2eb){return db[_0xe781('0x7d')]['findOne']({'where':{'VoiceQueueId':_0x2725b2[_0xe781('0x48')][_0xe781('0x6c')],'CampaignId':_0x2725b2['body'][_0xe781('0x76')],'ContactId':_0x2725b2[_0xe781('0x48')][_0xe781('0x62')]}})['then'](handleEntityNotFound(_0x10e4d3,null))[_0xe781('0x24')](function(_0x32a3b1){if(_0x32a3b1){return _0x32a3b1;}return null;})['then'](respondWithResult(_0x10e4d3,null))['catch'](handleError(_0x10e4d3,null));};
\ No newline at end of file
+var _0xadf4=['calleridnum\x20NOT\x20IN\x20(?)','select','cm_hopper','VoiceQueueId\x20=\x20?','calleridnum','group','moveContactsIvrCampaignHopperFinal','Campaign','into','fromQuery','ANY_VALUE(ListId)','ANY_VALUE(CampaignId)','CampaignId','CampaignId\x20=\x20?','state\x20=\x20?','checkContactHopper','CmHopper','findOne','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','to-csv','lodash','squel','crypto','jsforce','desk.js','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','status','end','count','offset','limit','json','apply','update','then','sendStatus','error','stack','name','send','index','map','CmHopperFinal','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','merge','VIRTUAL','options','findAll','rows','catch','show','params','rawAttributes','includeAll','include','find','describe','body','uniqueid','countContactsQueueCampaignHopperFinal','sequelize','COUNT','literal','`state`\x20=\x200,\x201,\x20null','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','`state`\x20=\x205,\x201,\x20null','busyContacts','`state`\x20=\x208,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2022,\x201,\x20null','reCallContacts','countContactsIvrCampaignHopperFinal','noSuchContacts','dropContacts','abandonedContacts','answeringMachine','VoiceQueue','insert','phone','scheduledAt','ContactId','ListId','updatedAt','field','ANY_VALUE(calleridnum)','NOW()','ANY_VALUE(ContactId)','ANY_VALUE(VoiceQueueId)','VoiceQueueId','createdAt','from','cm_hopper_final','toString','state','calleridnum\x20IS\x20NOT\x20NULL'];(function(_0x382e89,_0x4768c0){var _0x3a1318=function(_0x79e1ce){while(--_0x79e1ce){_0x382e89['push'](_0x382e89['shift']());}};_0x3a1318(++_0x4768c0);}(_0xadf4,0x8d));var _0x4adf=function(_0x52f1e6,_0xf70489){_0x52f1e6=_0x52f1e6-0x0;var _0x21f104=_0xadf4[_0x52f1e6];return _0x21f104;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x4adf('0x0'));var rimraf=require(_0x4adf('0x1'));var zipdir=require(_0x4adf('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4adf('0x3'));var moment=require(_0x4adf('0x4'));var BPromise=require(_0x4adf('0x5'));var Mustache=require(_0x4adf('0x6'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x4adf('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x4adf('0x8'));var squel=require(_0x4adf('0x9'));var crypto=require(_0x4adf('0xa'));var jsforce=require(_0x4adf('0xb'));var deskjs=require(_0x4adf('0xc'));var toCsv=require(_0x4adf('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x4adf('0xd'));var hardwareService=require(_0x4adf('0xe'));var logger=require(_0x4adf('0xf'))(_0x4adf('0x10'));var utils=require(_0x4adf('0x11'));var config=require(_0x4adf('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3425f2,_0x279b5a){_0x279b5a=_0x279b5a||0xcc;return function(_0x8c068a){if(_0x8c068a){return _0x3425f2['sendStatus'](_0x279b5a);}return _0x3425f2[_0x4adf('0x13')](_0x279b5a)[_0x4adf('0x14')]();};}function respondWithResult(_0x25edd9,_0x47b7e1){_0x47b7e1=_0x47b7e1||0xc8;return function(_0x6cc24){if(_0x6cc24){return _0x25edd9[_0x4adf('0x13')](_0x47b7e1)['json'](_0x6cc24);}};}function respondWithFilteredResult(_0x448123,_0xbb9597){return function(_0x1e2eac){if(_0x1e2eac){var _0x137a3d=_0x1e2eac[_0x4adf('0x15')],_0x166ee2=_0xbb9597[_0x4adf('0x16')],_0x559804=_0xbb9597['offset']+_0xbb9597[_0x4adf('0x17')],_0x4e4992;if(_0x559804>=_0x137a3d){_0x559804=_0x137a3d;_0x4e4992=0xc8;}else{_0x4e4992=0xce;}_0x448123[_0x4adf('0x13')](_0x4e4992);return _0x448123['set']('Content-Range',_0x166ee2+'-'+_0x559804+'/'+_0x137a3d)[_0x4adf('0x18')](_0x1e2eac);}return null;};}function patchUpdates(_0x19ce0e){return function(_0x21d88a){try{jsonpatch[_0x4adf('0x19')](_0x21d88a,_0x19ce0e,!![]);}catch(_0x21e52e){return BPromise['reject'](_0x21e52e);}return _0x21d88a['save']();};}function saveUpdates(_0x323f96,_0x3d47b5){return function(_0x3801b5){if(_0x3801b5){return _0x3801b5[_0x4adf('0x1a')](_0x323f96)[_0x4adf('0x1b')](function(_0x11b32b){return _0x11b32b;});}return null;};}function removeEntity(_0x1483a6,_0x1b5e92){return function(_0x59cbaf){if(_0x59cbaf){return _0x59cbaf['destroy']()['then'](function(){_0x1483a6['status'](0xcc)[_0x4adf('0x14')]();});}};}function handleEntityNotFound(_0x31a7a9,_0x4f316a){return function(_0x682077){if(!_0x682077){_0x31a7a9[_0x4adf('0x1c')](0x194);}return _0x682077;};}function handleError(_0x4a44eb,_0x3427d2){_0x3427d2=_0x3427d2||0x1f4;return function(_0xbeb88c){logger[_0x4adf('0x1d')](_0xbeb88c[_0x4adf('0x1e')]);if(_0xbeb88c[_0x4adf('0x1f')]){delete _0xbeb88c[_0x4adf('0x1f')];}_0x4a44eb[_0x4adf('0x13')](_0x3427d2)[_0x4adf('0x20')](_0xbeb88c);};}exports[_0x4adf('0x21')]=function(_0x14751e,_0x65cc82){var _0x272ada={},_0x547f33={},_0x3f3a9e={'count':0x0,'rows':[]};var _0x52de3b=_[_0x4adf('0x22')](db[_0x4adf('0x23')]['rawAttributes'],function(_0x2777d0){return{'name':_0x2777d0[_0x4adf('0x24')],'type':_0x2777d0[_0x4adf('0x25')][_0x4adf('0x26')]};});_0x547f33[_0x4adf('0x27')]=_[_0x4adf('0x22')](_0x52de3b,_0x4adf('0x1f'));_0x547f33[_0x4adf('0x28')]=_[_0x4adf('0x29')](_0x14751e[_0x4adf('0x28')]);_0x547f33['filters']=_[_0x4adf('0x2a')](_0x547f33[_0x4adf('0x27')],_0x547f33[_0x4adf('0x28')]);_0x272ada[_0x4adf('0x2b')]=_[_0x4adf('0x2a')](_0x547f33[_0x4adf('0x27')],qs[_0x4adf('0x2c')](_0x14751e[_0x4adf('0x28')][_0x4adf('0x2c')]));_0x272ada[_0x4adf('0x2b')]=_0x272ada[_0x4adf('0x2b')][_0x4adf('0x2d')]?_0x272ada[_0x4adf('0x2b')]:_0x547f33[_0x4adf('0x27')];if(!_0x14751e[_0x4adf('0x28')][_0x4adf('0x2e')](_0x4adf('0x2f'))){_0x272ada[_0x4adf('0x17')]=qs[_0x4adf('0x17')](_0x14751e[_0x4adf('0x28')]['limit']);_0x272ada['offset']=qs['offset'](_0x14751e[_0x4adf('0x28')][_0x4adf('0x16')]);}_0x272ada[_0x4adf('0x30')]=qs['sort'](_0x14751e[_0x4adf('0x28')][_0x4adf('0x31')]);_0x272ada[_0x4adf('0x32')]=qs[_0x4adf('0x33')](_[_0x4adf('0x34')](_0x14751e[_0x4adf('0x28')],_0x547f33[_0x4adf('0x33')]));if(_0x14751e['query']['filter']){_0x272ada['where']=_[_0x4adf('0x35')](_0x272ada[_0x4adf('0x32')],{'$or':_[_0x4adf('0x22')](_0x52de3b,function(_0x12a81e){if(_0x12a81e[_0x4adf('0x25')]!==_0x4adf('0x36')){var _0x4551a1={};_0x4551a1[_0x12a81e[_0x4adf('0x1f')]]={'$like':'%'+_0x14751e[_0x4adf('0x28')]['filter']+'%'};return _0x4551a1;}})});}_0x272ada=_[_0x4adf('0x35')]({},_0x272ada,_0x14751e[_0x4adf('0x37')]);var _0x1a34ff={'where':_0x272ada['where']};return db[_0x4adf('0x23')][_0x4adf('0x15')](_0x1a34ff)[_0x4adf('0x1b')](function(_0x359dd8){_0x3f3a9e[_0x4adf('0x15')]=_0x359dd8;if(_0x14751e[_0x4adf('0x28')]['includeAll']){_0x272ada['include']=[{'all':!![]}];}return db[_0x4adf('0x23')][_0x4adf('0x38')](_0x272ada);})['then'](function(_0x5bdf84){_0x3f3a9e[_0x4adf('0x39')]=_0x5bdf84;return _0x3f3a9e;})[_0x4adf('0x1b')](respondWithFilteredResult(_0x65cc82,_0x272ada))[_0x4adf('0x3a')](handleError(_0x65cc82,null));};exports[_0x4adf('0x3b')]=function(_0x47968d,_0x530e0b){var _0xfdbf23={'raw':!![],'where':{'id':_0x47968d[_0x4adf('0x3c')]['id']}},_0x1c1b89={};_0x1c1b89['model']=_[_0x4adf('0x29')](db['CmHopperFinal'][_0x4adf('0x3d')]);_0x1c1b89[_0x4adf('0x28')]=_[_0x4adf('0x29')](_0x47968d[_0x4adf('0x28')]);_0x1c1b89[_0x4adf('0x33')]=_[_0x4adf('0x2a')](_0x1c1b89['model'],_0x1c1b89[_0x4adf('0x28')]);_0xfdbf23[_0x4adf('0x2b')]=_[_0x4adf('0x2a')](_0x1c1b89[_0x4adf('0x27')],qs[_0x4adf('0x2c')](_0x47968d[_0x4adf('0x28')][_0x4adf('0x2c')]));_0xfdbf23['attributes']=_0xfdbf23[_0x4adf('0x2b')]['length']?_0xfdbf23[_0x4adf('0x2b')]:_0x1c1b89['model'];if(_0x47968d[_0x4adf('0x28')][_0x4adf('0x3e')]){_0xfdbf23[_0x4adf('0x3f')]=[{'all':!![]}];}_0xfdbf23=_[_0x4adf('0x35')]({},_0xfdbf23,_0x47968d[_0x4adf('0x37')]);return db['CmHopperFinal'][_0x4adf('0x40')](_0xfdbf23)[_0x4adf('0x1b')](handleEntityNotFound(_0x530e0b,null))[_0x4adf('0x1b')](respondWithResult(_0x530e0b,null))[_0x4adf('0x3a')](handleError(_0x530e0b,null));};exports['describe']=function(_0x1f0658,_0x4b08fc){return db[_0x4adf('0x23')][_0x4adf('0x41')]()['then'](respondWithResult(_0x4b08fc,null))[_0x4adf('0x3a')](handleError(_0x4b08fc,null));};exports[_0x4adf('0x1a')]=function(_0x33db2a,_0x6b47b9){if(_0x33db2a[_0x4adf('0x42')][_0x4adf('0x43')]){delete _0x33db2a[_0x4adf('0x42')]['uniqueid'];}return db['CmHopperFinal'][_0x4adf('0x40')]({'where':{'uniqueid':_0x33db2a[_0x4adf('0x3c')]['id']}})[_0x4adf('0x1b')](handleEntityNotFound(_0x6b47b9,null))[_0x4adf('0x1b')](saveUpdates(_0x33db2a[_0x4adf('0x42')],null))[_0x4adf('0x1b')](respondWithResult(_0x6b47b9,null))[_0x4adf('0x3a')](handleError(_0x6b47b9,null));};exports[_0x4adf('0x44')]=function(_0x36682d,_0x2f6fdc,_0x3b23e3){return db[_0x4adf('0x23')][_0x4adf('0x38')]({'raw':![],'where':{'VoiceQueueId':_0x36682d[_0x4adf('0x3c')]['id']},'attributes':[[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')](_0x4adf('0x48')))),'noSuchContacts'],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db['sequelize'][_0x4adf('0x47')](_0x4adf('0x49')))),_0x4adf('0x4a')],[db[_0x4adf('0x45')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')](_0x4adf('0x4b')))),_0x4adf('0x4c')],[db['sequelize']['fn']('COUNT',db[_0x4adf('0x45')]['fn']('IF',db['sequelize'][_0x4adf('0x47')](_0x4adf('0x4d')))),'congestionContacts'],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')]['literal']('`state`\x20=\x2010\x20,\x201,\x20null'))),'dropContacts'],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')](_0x4adf('0x4e')))),'abandonedContacts'],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')](_0x4adf('0x4f')))),_0x4adf('0x50')],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db['sequelize']['fn']('IF',db['sequelize'][_0x4adf('0x47')]('`state`\x20=\x2019,\x201,\x20null'))),'answeringMachine']]})['then'](handleEntityNotFound(_0x2f6fdc,null))[_0x4adf('0x1b')](respondWithResult(_0x2f6fdc,null))['catch'](handleError(_0x2f6fdc,null));};exports[_0x4adf('0x51')]=function(_0x46b09a,_0x530130,_0x1d4d6c){return db['CmHopperFinal'][_0x4adf('0x38')]({'raw':![],'where':{'CampaignId':_0x46b09a['params']['id']},'attributes':[[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')](_0x4adf('0x48')))),_0x4adf('0x52')],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')]('`state`\x20=\x203,\x201,\x20null'))),'noAnswerContacts'],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db['sequelize']['fn']('IF',db[_0x4adf('0x45')]['literal'](_0x4adf('0x4b')))),_0x4adf('0x4c')],[db['sequelize']['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')]['literal'](_0x4adf('0x4d')))),'congestionContacts'],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x4adf('0x53')],[db['sequelize']['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')](_0x4adf('0x4e')))),_0x4adf('0x54')],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db[_0x4adf('0x45')]['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')](_0x4adf('0x4f')))),_0x4adf('0x50')],[db[_0x4adf('0x45')]['fn'](_0x4adf('0x46'),db['sequelize']['fn']('IF',db[_0x4adf('0x45')][_0x4adf('0x47')]('`state`\x20=\x2019,\x201,\x20null'))),_0x4adf('0x55')]]})['then'](handleEntityNotFound(_0x530130,null))[_0x4adf('0x1b')](respondWithResult(_0x530130,null))[_0x4adf('0x3a')](handleError(_0x530130,null));};exports['moveContactsQueueCampaignHopperFinal']=function(_0x522e75,_0x28d701,_0x677b69){return db[_0x4adf('0x56')][_0x4adf('0x40')]({'where':{'id':_0x522e75[_0x4adf('0x3c')]['id']}})[_0x4adf('0x1b')](handleEntityNotFound(_0x28d701,null))[_0x4adf('0x1b')](function(_0x1a7ffa){var _0x3802e4;if(_0x1a7ffa){_0x3802e4=squel[_0x4adf('0x57')]()['into']('cm_hopper')['fromQuery']([_0x4adf('0x58'),_0x4adf('0x59'),_0x4adf('0x5a'),_0x4adf('0x5b'),'VoiceQueueId','createdAt',_0x4adf('0x5c')],squel['select']()[_0x4adf('0x5d')](_0x4adf('0x5e'),_0x4adf('0x58'))['field'](_0x4adf('0x5f'),'scheduledAt')[_0x4adf('0x5d')](_0x4adf('0x60'),'ContactId')['field']('ANY_VALUE(ListId)',_0x4adf('0x5b'))['field'](_0x4adf('0x61'),_0x4adf('0x62'))[_0x4adf('0x5d')](_0x4adf('0x5f'),_0x4adf('0x63'))[_0x4adf('0x5d')](_0x4adf('0x5f'),_0x4adf('0x5c'))[_0x4adf('0x64')](_0x4adf('0x65'))[_0x4adf('0x32')]('VoiceQueueId\x20=\x20?',_0x522e75[_0x4adf('0x3c')]['id'][_0x4adf('0x66')]())[_0x4adf('0x32')]('state\x20=\x20?',_0x522e75[_0x4adf('0x42')][_0x4adf('0x67')][_0x4adf('0x66')]())['where'](_0x4adf('0x68'))['where'](_0x4adf('0x69'),squel[_0x4adf('0x6a')]()[_0x4adf('0x5d')](_0x4adf('0x58'))[_0x4adf('0x64')](_0x4adf('0x6b'))[_0x4adf('0x32')](_0x4adf('0x6c'),_0x522e75['params']['id']['toString']()))['where'](_0x4adf('0x69'),squel[_0x4adf('0x6a')]()['field'](_0x4adf('0x6d'))[_0x4adf('0x64')](_0x4adf('0x65'))[_0x4adf('0x32')](_0x4adf('0x6c'),_0x522e75['params']['id'][_0x4adf('0x66')]())[_0x4adf('0x32')]('state\x20=\x204'))[_0x4adf('0x6e')](_0x4adf('0x5a')))[_0x4adf('0x66')]();return db[_0x4adf('0x45')][_0x4adf('0x28')](_0x3802e4);}return[];})[_0x4adf('0x1b')](respondWithResult(_0x28d701,null))['catch'](handleError(_0x28d701,null));};exports[_0x4adf('0x6f')]=function(_0x316815,_0x286bbc,_0x40f26a){return db[_0x4adf('0x70')][_0x4adf('0x40')]({'where':{'id':_0x316815[_0x4adf('0x3c')]['id']}})[_0x4adf('0x1b')](handleEntityNotFound(_0x286bbc,null))[_0x4adf('0x1b')](function(_0x3fea66){var _0x597b1f;if(_0x3fea66){_0x597b1f=squel[_0x4adf('0x57')]()[_0x4adf('0x71')](_0x4adf('0x6b'))[_0x4adf('0x72')]([_0x4adf('0x58'),_0x4adf('0x59'),_0x4adf('0x5a'),'ListId','CampaignId',_0x4adf('0x63'),'updatedAt'],squel[_0x4adf('0x6a')]()[_0x4adf('0x5d')]('ANY_VALUE(calleridnum)','phone')[_0x4adf('0x5d')](_0x4adf('0x5f'),'scheduledAt')[_0x4adf('0x5d')](_0x4adf('0x60'),_0x4adf('0x5a'))[_0x4adf('0x5d')](_0x4adf('0x73'),_0x4adf('0x5b'))[_0x4adf('0x5d')](_0x4adf('0x74'),_0x4adf('0x75'))[_0x4adf('0x5d')]('NOW()',_0x4adf('0x63'))[_0x4adf('0x5d')](_0x4adf('0x5f'),_0x4adf('0x5c'))[_0x4adf('0x64')]('cm_hopper_final')[_0x4adf('0x32')](_0x4adf('0x76'),_0x316815['params']['id'][_0x4adf('0x66')]())['where'](_0x4adf('0x77'),_0x316815[_0x4adf('0x42')][_0x4adf('0x67')][_0x4adf('0x66')]())['where'](_0x4adf('0x68'))['where']('calleridnum\x20NOT\x20IN\x20(?)',squel[_0x4adf('0x6a')]()[_0x4adf('0x5d')](_0x4adf('0x58'))[_0x4adf('0x64')](_0x4adf('0x6b'))[_0x4adf('0x32')](_0x4adf('0x76'),_0x316815[_0x4adf('0x3c')]['id']['toString']()))[_0x4adf('0x32')](_0x4adf('0x69'),squel['select']()[_0x4adf('0x5d')](_0x4adf('0x6d'))[_0x4adf('0x64')](_0x4adf('0x65'))['where'](_0x4adf('0x76'),_0x316815['params']['id'][_0x4adf('0x66')]())[_0x4adf('0x32')]('state\x20=\x204'))['group'](_0x4adf('0x5a')))[_0x4adf('0x66')]();return db['sequelize'][_0x4adf('0x28')](_0x597b1f);}return[];})['then'](respondWithResult(_0x286bbc,null))[_0x4adf('0x3a')](handleError(_0x286bbc,null));};exports[_0x4adf('0x78')]=function(_0x1933e2,_0x224c6e,_0x245219){return db[_0x4adf('0x79')][_0x4adf('0x7a')]({'where':{'VoiceQueueId':_0x1933e2['body'][_0x4adf('0x62')],'CampaignId':_0x1933e2['body'][_0x4adf('0x75')],'ContactId':_0x1933e2[_0x4adf('0x42')][_0x4adf('0x5a')]}})['then'](handleEntityNotFound(_0x224c6e,null))[_0x4adf('0x1b')](function(_0x4554b5){if(_0x4554b5){return _0x4554b5;}return null;})['then'](respondWithResult(_0x224c6e,null))[_0x4adf('0x3a')](handleError(_0x224c6e,null));};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.model.js b/server/api/cmHopperFinal/cmHopperFinal.model.js
index 2298d86..e24cc4f 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 _0x09f5=['../../config/environment','exports','define','cm_hopper_final','calleridnum','uniqueid','lodash','util','api','moment','bluebird','request-promise','rimraf'];(function(_0x26031a,_0x9955b4){var _0x1c9a3f=function(_0x1156da){while(--_0x1156da){_0x26031a['push'](_0x26031a['shift']());}};_0x1c9a3f(++_0x9955b4);}(_0x09f5,0x88));var _0x509f=function(_0x5862e4,_0xec1470){_0x5862e4=_0x5862e4-0x0;var _0x2567af=_0x09f5[_0x5862e4];return _0x2567af;};'use strict';var _=require(_0x509f('0x0'));var util=require(_0x509f('0x1'));var logger=require('../../config/logger')(_0x509f('0x2'));var moment=require(_0x509f('0x3'));var BPromise=require(_0x509f('0x4'));var rp=require(_0x509f('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x509f('0x6'));var config=require(_0x509f('0x7'));var attributes=require('./cmHopperFinal.attributes');module[_0x509f('0x8')]=function(_0x135a4e,_0x5c0339){return _0x135a4e[_0x509f('0x9')]('CmHopperFinal',attributes,{'tableName':_0x509f('0xa'),'paranoid':![],'indexes':[{'name':'calleridnum','fields':[_0x509f('0xb')]},{'name':_0x509f('0xc'),'fields':[_0x509f('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x0c95=['../../config/environment','./cmHopperFinal.attributes','define','CmHopperFinal','cm_hopper_final','calleridnum','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x3c4513,_0x14f374){var _0x4cc2dd=function(_0x7d4f46){while(--_0x7d4f46){_0x3c4513['push'](_0x3c4513['shift']());}};_0x4cc2dd(++_0x14f374);}(_0x0c95,0x19c));var _0x50c9=function(_0x3c2c62,_0x2033c2){_0x3c2c62=_0x3c2c62-0x0;var _0x58bcb8=_0x0c95[_0x3c2c62];return _0x58bcb8;};'use strict';var _=require(_0x50c9('0x0'));var util=require(_0x50c9('0x1'));var logger=require(_0x50c9('0x2'))(_0x50c9('0x3'));var moment=require(_0x50c9('0x4'));var BPromise=require(_0x50c9('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x50c9('0x6'));var rimraf=require(_0x50c9('0x7'));var config=require(_0x50c9('0x8'));var attributes=require(_0x50c9('0x9'));module['exports']=function(_0x377077,_0x8171a0){return _0x377077[_0x50c9('0xa')](_0x50c9('0xb'),attributes,{'tableName':_0x50c9('0xc'),'paranoid':![],'indexes':[{'name':_0x50c9('0xd'),'fields':[_0x50c9('0xd')]},{'name':_0x50c9('0xe'),'fields':[_0x50c9('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/cmHopperFinal.rpc.js b/server/api/cmHopperFinal/cmHopperFinal.rpc.js
index 7ee4f40..abe5c83 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 _0xa535=['code','CmHopperFinal,\x20%s,\x20%s','message','info','result','catch','CmHopperFinal','create','body','options','raw','debug','CreateCmHopperFinal','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','CmHopperFinal,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0xa95561,_0x3a7f96){var _0x1541d4=function(_0x2047a0){while(--_0x2047a0){_0xa95561['push'](_0xa95561['shift']());}};_0x1541d4(++_0x3a7f96);}(_0xa535,0x1ad));var _0x5a53=function(_0x8c7cee,_0x215fbc){_0x8c7cee=_0x8c7cee-0x0;var _0x1e94bf=_0xa535[_0x8c7cee];return _0x1e94bf;};'use strict';var _=require(_0x5a53('0x0'));var util=require(_0x5a53('0x1'));var moment=require(_0x5a53('0x2'));var BPromise=require(_0x5a53('0x3'));var rs=require(_0x5a53('0x4'));var fs=require('fs');var Redis=require(_0x5a53('0x5'));var db=require(_0x5a53('0x6'))['db'];var utils=require(_0x5a53('0x7'));var logger=require(_0x5a53('0x8'))(_0x5a53('0x9'));var config=require('../../config/environment');var jayson=require(_0x5a53('0xa'));var client=jayson[_0x5a53('0xb')][_0x5a53('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x148c7a,_0x9489ed,_0x5e4162){return new BPromise(function(_0x4ece41,_0x56f01a){return client[_0x5a53('0xd')](_0x148c7a,_0x5e4162)[_0x5a53('0xe')](function(_0x1e06fc){logger['info']('CmHopperFinal,\x20%s,\x20%s',_0x9489ed,'request\x20sent');logger['debug'](_0x5a53('0xf'),_0x9489ed,_0x5a53('0x10'),JSON[_0x5a53('0x11')](_0x1e06fc));if(_0x1e06fc[_0x5a53('0x12')]){if(_0x1e06fc[_0x5a53('0x12')][_0x5a53('0x13')]===0x1f4){logger[_0x5a53('0x12')](_0x5a53('0x14'),_0x9489ed,_0x1e06fc[_0x5a53('0x12')][_0x5a53('0x15')]);return _0x56f01a(_0x1e06fc['error'][_0x5a53('0x15')]);}logger[_0x5a53('0x12')](_0x5a53('0x14'),_0x9489ed,_0x1e06fc[_0x5a53('0x12')][_0x5a53('0x15')]);return _0x4ece41(_0x1e06fc[_0x5a53('0x12')][_0x5a53('0x15')]);}else{logger[_0x5a53('0x16')]('CmHopperFinal,\x20%s,\x20%s',_0x9489ed,_0x5a53('0x10'));_0x4ece41(_0x1e06fc[_0x5a53('0x17')]['message']);}})[_0x5a53('0x18')](function(_0x32742b){logger[_0x5a53('0x12')](_0x5a53('0x14'),_0x9489ed,_0x32742b);_0x56f01a(_0x32742b);});});}exports['CreateCmHopperFinal']=function(_0x155e55){var _0x45e496=this;return new Promise(function(_0x5e215f,_0x391b33){return db[_0x5a53('0x19')][_0x5a53('0x1a')](_0x155e55[_0x5a53('0x1b')],{'raw':_0x155e55[_0x5a53('0x1c')]?_0x155e55[_0x5a53('0x1c')][_0x5a53('0x1d')]===undefined?!![]:![]:!![]})[_0x5a53('0xe')](function(_0x2893d3){logger[_0x5a53('0x16')]('CreateCmHopperFinal',_0x155e55);logger[_0x5a53('0x1e')]('CreateCmHopperFinal',_0x155e55,JSON[_0x5a53('0x11')](_0x2893d3));_0x5e215f(_0x2893d3);})[_0x5a53('0x18')](function(_0x5eb1db){logger[_0x5a53('0x12')](_0x5a53('0x1f'),_0x5eb1db['message'],_0x155e55);_0x391b33(_0x45e496[_0x5a53('0x12')](0x1f4,_0x5eb1db[_0x5a53('0x15')]));});});};
\ No newline at end of file
+var _0x3ffb=['lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','CmHopperFinal,\x20%s,\x20%s','debug','CmHopperFinal,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','CreateCmHopperFinal','CmHopperFinal','body','options','raw'];(function(_0x2736b6,_0x32b9a9){var _0x193c59=function(_0x1efd73){while(--_0x1efd73){_0x2736b6['push'](_0x2736b6['shift']());}};_0x193c59(++_0x32b9a9);}(_0x3ffb,0x13f));var _0xb3ff=function(_0x3f3cda,_0x22247a){_0x3f3cda=_0x3f3cda-0x0;var _0x19c58a=_0x3ffb[_0x3f3cda];return _0x19c58a;};'use strict';var _=require(_0xb3ff('0x0'));var util=require(_0xb3ff('0x1'));var moment=require(_0xb3ff('0x2'));var BPromise=require(_0xb3ff('0x3'));var rs=require(_0xb3ff('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb3ff('0x5'))['db'];var utils=require(_0xb3ff('0x6'));var logger=require(_0xb3ff('0x7'))(_0xb3ff('0x8'));var config=require(_0xb3ff('0x9'));var jayson=require(_0xb3ff('0xa'));var client=jayson[_0xb3ff('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x301d72,_0x99d772,_0x3a6e33){return new BPromise(function(_0x4fecf1,_0x4e3533){return client['request'](_0x301d72,_0x3a6e33)[_0xb3ff('0xc')](function(_0x36c3af){logger[_0xb3ff('0xd')](_0xb3ff('0xe'),_0x99d772,'request\x20sent');logger[_0xb3ff('0xf')](_0xb3ff('0x10'),_0x99d772,'request\x20sent',JSON[_0xb3ff('0x11')](_0x36c3af));if(_0x36c3af[_0xb3ff('0x12')]){if(_0x36c3af[_0xb3ff('0x12')][_0xb3ff('0x13')]===0x1f4){logger[_0xb3ff('0x12')](_0xb3ff('0xe'),_0x99d772,_0x36c3af[_0xb3ff('0x12')][_0xb3ff('0x14')]);return _0x4e3533(_0x36c3af['error'][_0xb3ff('0x14')]);}logger[_0xb3ff('0x12')](_0xb3ff('0xe'),_0x99d772,_0x36c3af[_0xb3ff('0x12')][_0xb3ff('0x14')]);return _0x4fecf1(_0x36c3af[_0xb3ff('0x12')]['message']);}else{logger[_0xb3ff('0xd')]('CmHopperFinal,\x20%s,\x20%s',_0x99d772,_0xb3ff('0x15'));_0x4fecf1(_0x36c3af[_0xb3ff('0x16')]['message']);}})[_0xb3ff('0x17')](function(_0x3713f7){logger[_0xb3ff('0x12')](_0xb3ff('0xe'),_0x99d772,_0x3713f7);_0x4e3533(_0x3713f7);});});}exports[_0xb3ff('0x18')]=function(_0x8c5f6f){var _0x3e85c7=this;return new Promise(function(_0x2fe7ca,_0x5d908f){return db[_0xb3ff('0x19')]['create'](_0x8c5f6f[_0xb3ff('0x1a')],{'raw':_0x8c5f6f['options']?_0x8c5f6f[_0xb3ff('0x1b')][_0xb3ff('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x259c9e){logger[_0xb3ff('0xd')]('CreateCmHopperFinal',_0x8c5f6f);logger[_0xb3ff('0xf')](_0xb3ff('0x18'),_0x8c5f6f,JSON[_0xb3ff('0x11')](_0x259c9e));_0x2fe7ca(_0x259c9e);})['catch'](function(_0xa30fcd){logger[_0xb3ff('0x12')]('CreateCmHopperFinal',_0xa30fcd['message'],_0x8c5f6f);_0x5d908f(_0x3e85c7[_0xb3ff('0x12')](0x1f4,_0xa30fcd[_0xb3ff('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/cmHopperFinal/index.js b/server/api/cmHopperFinal/index.js
index bedf380..cb9cff9 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 _0x6996=['countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','post','/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','/checkContactHopper','checkContactHopper','update','exports','multer','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id','/voice/queue/countAttributes/:id'];(function(_0x334688,_0xf68c2c){var _0x42dc15=function(_0x17f90a){while(--_0x17f90a){_0x334688['push'](_0x334688['shift']());}};_0x42dc15(++_0xf68c2c);}(_0x6996,0x184));var _0x6699=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x6996[_0x3bf83f];return _0x22c4a9;};'use strict';var multer=require(_0x6699('0x0'));var util=require('util');var path=require(_0x6699('0x1'));var timeout=require(_0x6699('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0x6699('0x3'));var interaction=require(_0x6699('0x4'));var config=require(_0x6699('0x5'));var controller=require('./cmHopperFinal.controller');router['get']('/',auth[_0x6699('0x6')](),controller[_0x6699('0x7')]);router[_0x6699('0x8')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0x6699('0x8')](_0x6699('0x9'),auth[_0x6699('0x6')](),controller['show']);router[_0x6699('0x8')](_0x6699('0xa'),auth['isAuthenticated'](),controller[_0x6699('0xb')]);router[_0x6699('0x8')](_0x6699('0xc'),auth[_0x6699('0x6')](),controller[_0x6699('0xd')]);router[_0x6699('0xe')](_0x6699('0xf'),auth['isAuthenticated'](),controller[_0x6699('0x10')]);router[_0x6699('0xe')]('/voice/campaign/moveContacts/:id',auth[_0x6699('0x6')](),controller['moveContactsIvrCampaignHopperFinal']);router[_0x6699('0xe')](_0x6699('0x11'),auth[_0x6699('0x6')](),controller[_0x6699('0x12')]);router['put']('/:id',auth[_0x6699('0x6')](),controller[_0x6699('0x13')]);module[_0x6699('0x14')]=router;
\ No newline at end of file
+var _0x134d=['./cmHopperFinal.controller','isAuthenticated','index','get','/describe','describe','show','/voice/queue/countAttributes/:id','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','/voice/queue/moveContacts/:id','post','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','checkContactHopper','put','/:id','update','exports','util','connect-timeout','Router','../../config/environment'];(function(_0x2b8077,_0x453634){var _0x308091=function(_0x426df7){while(--_0x426df7){_0x2b8077['push'](_0x2b8077['shift']());}};_0x308091(++_0x453634);}(_0x134d,0xcb));var _0xd134=function(_0x32910a,_0x41a8e9){_0x32910a=_0x32910a-0x0;var _0x3d61bc=_0x134d[_0x32910a];return _0x3d61bc;};'use strict';var multer=require('multer');var util=require(_0xd134('0x0'));var path=require('path');var timeout=require(_0xd134('0x1'));var express=require('express');var router=express[_0xd134('0x2')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xd134('0x3'));var controller=require(_0xd134('0x4'));router['get']('/',auth[_0xd134('0x5')](),controller[_0xd134('0x6')]);router[_0xd134('0x7')](_0xd134('0x8'),auth[_0xd134('0x5')](),controller[_0xd134('0x9')]);router[_0xd134('0x7')]('/:id',auth[_0xd134('0x5')](),controller[_0xd134('0xa')]);router[_0xd134('0x7')](_0xd134('0xb'),auth[_0xd134('0x5')](),controller['countContactsQueueCampaignHopperFinal']);router[_0xd134('0x7')](_0xd134('0xc'),auth[_0xd134('0x5')](),controller[_0xd134('0xd')]);router['post'](_0xd134('0xe'),auth[_0xd134('0x5')](),controller['moveContactsQueueCampaignHopperFinal']);router[_0xd134('0xf')](_0xd134('0x10'),auth[_0xd134('0x5')](),controller[_0xd134('0x11')]);router[_0xd134('0xf')]('/checkContactHopper',auth['isAuthenticated'](),controller[_0xd134('0x12')]);router[_0xd134('0x13')](_0xd134('0x14'),auth['isAuthenticated'](),controller[_0xd134('0x15')]);module[_0xd134('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.attributes.js b/server/api/cmHopperHistory/cmHopperHistory.attributes.js
index 008da6f..5857d70 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 _0x07d0=['BOOLEAN','exports','INTEGER','STRING','DATE'];(function(_0x2cc711,_0x300328){var _0x31a52e=function(_0x588378){while(--_0x588378){_0x2cc711['push'](_0x2cc711['shift']());}};_0x31a52e(++_0x300328);}(_0x07d0,0x1a5));var _0x007d=function(_0xbf8ebe,_0x3b69a5){_0xbf8ebe=_0xbf8ebe-0x0;var _0x1e25e8=_0x07d0[_0xbf8ebe];return _0x1e25e8;};'use strict';var Sequelize=require('sequelize');module[_0x007d('0x0')]={'state':{'type':Sequelize[_0x007d('0x1')](0x2)},'statedesc':{'type':Sequelize[_0x007d('0x2')]},'scheduledat':{'type':Sequelize[_0x007d('0x3')]},'countbusyretry':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x007d('0x2')]},'originatecalleridnum':{'type':Sequelize[_0x007d('0x2')]},'originatecalleridname':{'type':Sequelize[_0x007d('0x2')]},'calleridnum':{'type':Sequelize[_0x007d('0x2')]},'calleridname':{'type':Sequelize[_0x007d('0x2')]},'starttime':{'type':Sequelize['DATE']},'responsetime':{'type':Sequelize[_0x007d('0x3')]},'answertime':{'type':Sequelize[_0x007d('0x3')]},'droptime':{'type':Sequelize[_0x007d('0x3')]},'endtime':{'type':Sequelize[_0x007d('0x3')]},'ringtime':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'dropreason':{'type':Sequelize['STRING']},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x007d('0x2')]},'membername':{'type':Sequelize[_0x007d('0x2')]},'reason':{'type':Sequelize[_0x007d('0x2')]},'amd':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fax':{'type':Sequelize[_0x007d('0x4')],'defaultValue':![]},'callback':{'type':Sequelize[_0x007d('0x4')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x007d('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x007d('0x3')]},'recallme':{'type':Sequelize[_0x007d('0x4')],'defaultValue':![]},'editedat':{'type':Sequelize[_0x007d('0x3')]},'edited':{'type':Sequelize[_0x007d('0x4')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x007d('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xbb64=['DATE','STRING','BOOLEAN','sequelize','exports','INTEGER'];(function(_0x20e514,_0x1e6949){var _0x1a525d=function(_0x365224){while(--_0x365224){_0x20e514['push'](_0x20e514['shift']());}};_0x1a525d(++_0x1e6949);}(_0xbb64,0x105));var _0x4bb6=function(_0x2f711c,_0x45b6db){_0x2f711c=_0x2f711c-0x0;var _0x5aabe9=_0xbb64[_0x2f711c];return _0x5aabe9;};'use strict';var Sequelize=require(_0x4bb6('0x0'));module[_0x4bb6('0x1')]={'state':{'type':Sequelize[_0x4bb6('0x2')](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize[_0x4bb6('0x3')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x4bb6('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize['STRING']},'originatecalleridnum':{'type':Sequelize['STRING']},'originatecalleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x4bb6('0x4')]},'calleridname':{'type':Sequelize[_0x4bb6('0x4')]},'starttime':{'type':Sequelize[_0x4bb6('0x3')]},'responsetime':{'type':Sequelize[_0x4bb6('0x3')]},'answertime':{'type':Sequelize[_0x4bb6('0x3')]},'droptime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x4bb6('0x2')],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x4bb6('0x4')]},'campaign':{'type':Sequelize[_0x4bb6('0x4')]},'campaigntype':{'type':Sequelize[_0x4bb6('0x4')]},'membername':{'type':Sequelize[_0x4bb6('0x4')]},'reason':{'type':Sequelize['STRING']},'amd':{'type':Sequelize[_0x4bb6('0x5')],'defaultValue':![]},'fax':{'type':Sequelize[_0x4bb6('0x5')],'defaultValue':![]},'callback':{'type':Sequelize[_0x4bb6('0x5')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x4bb6('0x4')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x4bb6('0x3')]},'recallme':{'type':Sequelize[_0x4bb6('0x5')],'defaultValue':![]},'editedat':{'type':Sequelize[_0x4bb6('0x3')]},'edited':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0x4bb6('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x4bb6('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x4bb6('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.controller.js b/server/api/cmHopperHistory/cmHopperHistory.controller.js
index 2120f17..defde10 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 _0x7255=['../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','set','Content-Range','apply','reject','save','then','destroy','sendStatus','name','index','map','CmHopperHistory','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','options','includeAll','rows','show','params','include','find','create','catch','describe','update','body','uniqueid','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service'];(function(_0x7b5cdd,_0x8c88d8){var _0x3a29ae=function(_0x17859a){while(--_0x17859a){_0x7b5cdd['push'](_0x7b5cdd['shift']());}};_0x3a29ae(++_0x8c88d8);}(_0x7255,0x16c));var _0x5725=function(_0x21092d,_0x18d5fc){_0x21092d=_0x21092d-0x0;var _0xa60587=_0x7255[_0x21092d];return _0xa60587;};'use strict';var pdf=require(_0x5725('0x0'));var emlformat=require(_0x5725('0x1'));var rimraf=require(_0x5725('0x2'));var zipdir=require(_0x5725('0x3'));var jsonpatch=require(_0x5725('0x4'));var rp=require(_0x5725('0x5'));var moment=require(_0x5725('0x6'));var BPromise=require('bluebird');var Mustache=require(_0x5725('0x7'));var util=require(_0x5725('0x8'));var path=require(_0x5725('0x9'));var sox=require(_0x5725('0xa'));var csv=require(_0x5725('0xb'));var ejs=require(_0x5725('0xc'));var fs=require('fs');var _=require(_0x5725('0xd'));var squel=require(_0x5725('0xe'));var crypto=require(_0x5725('0xf'));var jsforce=require(_0x5725('0x10'));var deskjs=require(_0x5725('0x11'));var toCsv=require(_0x5725('0xb'));var querystring=require(_0x5725('0x12'));var Papa=require(_0x5725('0x13'));var Redis=require('ioredis');var authService=require(_0x5725('0x14'));var qs=require(_0x5725('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5725('0x16'));var logger=require('../../config/logger')(_0x5725('0x17'));var utils=require(_0x5725('0x18'));var config=require(_0x5725('0x19'));var db=require(_0x5725('0x1a'))['db'];function respondWithStatusCode(_0x5784ba,_0x2160dd){_0x2160dd=_0x2160dd||0xcc;return function(_0x3189e7){if(_0x3189e7){return _0x5784ba['sendStatus'](_0x2160dd);}return _0x5784ba[_0x5725('0x1b')](_0x2160dd)[_0x5725('0x1c')]();};}function respondWithResult(_0x3ee12a,_0x2076c8){_0x2076c8=_0x2076c8||0xc8;return function(_0x14d32c){if(_0x14d32c){return _0x3ee12a['status'](_0x2076c8)[_0x5725('0x1d')](_0x14d32c);}};}function respondWithFilteredResult(_0x55e70e,_0x5ed8e6){return function(_0x283d4d){if(_0x283d4d){var _0x60f0f7=_0x283d4d[_0x5725('0x1e')],_0x5c50ed=_0x5ed8e6['offset'],_0x3f85c8=_0x5ed8e6[_0x5725('0x1f')]+_0x5ed8e6['limit'],_0x5f5a97;if(_0x3f85c8>=_0x60f0f7){_0x3f85c8=_0x60f0f7;_0x5f5a97=0xc8;}else{_0x5f5a97=0xce;}_0x55e70e['status'](_0x5f5a97);return _0x55e70e[_0x5725('0x20')](_0x5725('0x21'),_0x5c50ed+'-'+_0x3f85c8+'/'+_0x60f0f7)[_0x5725('0x1d')](_0x283d4d);}return null;};}function patchUpdates(_0xade16b){return function(_0xdb9cdd){try{jsonpatch[_0x5725('0x22')](_0xdb9cdd,_0xade16b,!![]);}catch(_0x2d9dcb){return BPromise[_0x5725('0x23')](_0x2d9dcb);}return _0xdb9cdd[_0x5725('0x24')]();};}function saveUpdates(_0x474209,_0x4e4659){return function(_0xf0edf){if(_0xf0edf){return _0xf0edf['update'](_0x474209)[_0x5725('0x25')](function(_0x548229){return _0x548229;});}return null;};}function removeEntity(_0x44dba2,_0x2142ab){return function(_0x143abe){if(_0x143abe){return _0x143abe[_0x5725('0x26')]()[_0x5725('0x25')](function(){_0x44dba2['status'](0xcc)[_0x5725('0x1c')]();});}};}function handleEntityNotFound(_0x6d17cb,_0x19b5a4){return function(_0x519277){if(!_0x519277){_0x6d17cb[_0x5725('0x27')](0x194);}return _0x519277;};}function handleError(_0x5c4e24,_0x4f8ac7){_0x4f8ac7=_0x4f8ac7||0x1f4;return function(_0xc6bc5){logger['error'](_0xc6bc5['stack']);if(_0xc6bc5[_0x5725('0x28')]){delete _0xc6bc5['name'];}_0x5c4e24[_0x5725('0x1b')](_0x4f8ac7)['send'](_0xc6bc5);};}exports[_0x5725('0x29')]=function(_0x164678,_0x156a67){var _0x53bce0={},_0x21fe8f={},_0x3143f3={'count':0x0,'rows':[]};var _0x404787=_[_0x5725('0x2a')](db[_0x5725('0x2b')][_0x5725('0x2c')],function(_0x2515f0){return{'name':_0x2515f0[_0x5725('0x2d')],'type':_0x2515f0[_0x5725('0x2e')]['key']};});_0x21fe8f[_0x5725('0x2f')]=_[_0x5725('0x2a')](_0x404787,_0x5725('0x28'));_0x21fe8f[_0x5725('0x30')]=_[_0x5725('0x31')](_0x164678[_0x5725('0x30')]);_0x21fe8f[_0x5725('0x32')]=_[_0x5725('0x33')](_0x21fe8f[_0x5725('0x2f')],_0x21fe8f['query']);_0x53bce0[_0x5725('0x34')]=_[_0x5725('0x33')](_0x21fe8f[_0x5725('0x2f')],qs[_0x5725('0x35')](_0x164678[_0x5725('0x30')][_0x5725('0x35')]));_0x53bce0['attributes']=_0x53bce0[_0x5725('0x34')][_0x5725('0x36')]?_0x53bce0[_0x5725('0x34')]:_0x21fe8f[_0x5725('0x2f')];if(!_0x164678[_0x5725('0x30')][_0x5725('0x37')](_0x5725('0x38'))){_0x53bce0[_0x5725('0x39')]=qs[_0x5725('0x39')](_0x164678[_0x5725('0x30')][_0x5725('0x39')]);_0x53bce0['offset']=qs['offset'](_0x164678[_0x5725('0x30')]['offset']);}_0x53bce0[_0x5725('0x3a')]=qs[_0x5725('0x3b')](_0x164678[_0x5725('0x30')]['sort']);_0x53bce0[_0x5725('0x3c')]=qs[_0x5725('0x32')](_[_0x5725('0x3d')](_0x164678[_0x5725('0x30')],_0x21fe8f[_0x5725('0x32')]));if(_0x164678[_0x5725('0x30')]['filter']){_0x53bce0[_0x5725('0x3c')]=_['merge'](_0x53bce0[_0x5725('0x3c')],{'$or':_[_0x5725('0x2a')](_0x404787,function(_0x382510){if(_0x382510[_0x5725('0x2e')]!=='VIRTUAL'){var _0x3115f4={};_0x3115f4[_0x382510[_0x5725('0x28')]]={'$like':'%'+_0x164678[_0x5725('0x30')][_0x5725('0x3e')]+'%'};return _0x3115f4;}})});}_0x53bce0=_[_0x5725('0x3f')]({},_0x53bce0,_0x164678[_0x5725('0x40')]);var _0x1170bc={'where':_0x53bce0[_0x5725('0x3c')]};return db[_0x5725('0x2b')][_0x5725('0x1e')](_0x1170bc)[_0x5725('0x25')](function(_0x2ef435){_0x3143f3[_0x5725('0x1e')]=_0x2ef435;if(_0x164678[_0x5725('0x30')][_0x5725('0x41')]){_0x53bce0['include']=[{'all':!![]}];}return db[_0x5725('0x2b')]['findAll'](_0x53bce0);})[_0x5725('0x25')](function(_0x5af508){_0x3143f3[_0x5725('0x42')]=_0x5af508;return _0x3143f3;})[_0x5725('0x25')](respondWithFilteredResult(_0x156a67,_0x53bce0))['catch'](handleError(_0x156a67,null));};exports[_0x5725('0x43')]=function(_0x4ecf60,_0x26476b){var _0x55a740={'raw':!![],'where':{'id':_0x4ecf60[_0x5725('0x44')]['id']}},_0x2f1988={};_0x2f1988[_0x5725('0x2f')]=_[_0x5725('0x31')](db['CmHopperHistory']['rawAttributes']);_0x2f1988[_0x5725('0x30')]=_[_0x5725('0x31')](_0x4ecf60[_0x5725('0x30')]);_0x2f1988[_0x5725('0x32')]=_['intersection'](_0x2f1988['model'],_0x2f1988[_0x5725('0x30')]);_0x55a740['attributes']=_['intersection'](_0x2f1988[_0x5725('0x2f')],qs[_0x5725('0x35')](_0x4ecf60[_0x5725('0x30')]['fields']));_0x55a740[_0x5725('0x34')]=_0x55a740['attributes']['length']?_0x55a740[_0x5725('0x34')]:_0x2f1988[_0x5725('0x2f')];if(_0x4ecf60['query']['includeAll']){_0x55a740[_0x5725('0x45')]=[{'all':!![]}];}_0x55a740=_[_0x5725('0x3f')]({},_0x55a740,_0x4ecf60['options']);return db['CmHopperHistory'][_0x5725('0x46')](_0x55a740)['then'](handleEntityNotFound(_0x26476b,null))[_0x5725('0x25')](respondWithResult(_0x26476b,null))['catch'](handleError(_0x26476b,null));};exports[_0x5725('0x47')]=function(_0x2b7e0d,_0x403125){return db[_0x5725('0x2b')]['create'](_0x2b7e0d['body'],{})[_0x5725('0x25')](respondWithResult(_0x403125,0xc9))[_0x5725('0x48')](handleError(_0x403125,null));};exports[_0x5725('0x49')]=function(_0x11e50b,_0x6d9e87){return db[_0x5725('0x2b')][_0x5725('0x49')]()['then'](respondWithResult(_0x6d9e87,null))[_0x5725('0x48')](handleError(_0x6d9e87,null));};exports[_0x5725('0x4a')]=function(_0x571dcd,_0xe3fff2){if(_0x571dcd[_0x5725('0x4b')][_0x5725('0x4c')]){delete _0x571dcd[_0x5725('0x4b')][_0x5725('0x4c')];}return db[_0x5725('0x2b')][_0x5725('0x46')]({'where':{'uniqueid':_0x571dcd['params']['id']}})[_0x5725('0x25')](handleEntityNotFound(_0xe3fff2,null))[_0x5725('0x25')](saveUpdates(_0x571dcd[_0x5725('0x4b')],null))[_0x5725('0x25')](respondWithResult(_0xe3fff2,null))[_0x5725('0x48')](handleError(_0xe3fff2,null));};
\ No newline at end of file
+var _0x0ac0=['length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','keys','fields','options','create','body','describe','uniqueid','find','html-pdf','eml-format','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/utils','../../mysqldb','status','count','offset','limit','json','apply','update','then','sendStatus','error','name','send','index','CmHopperHistory','rawAttributes','fieldName','type','model','map','query','filters','intersection','attributes'];(function(_0x222355,_0x3cdb49){var _0x412c7c=function(_0x234b83){while(--_0x234b83){_0x222355['push'](_0x222355['shift']());}};_0x412c7c(++_0x3cdb49);}(_0x0ac0,0x1c7));var _0x00ac=function(_0x2e3dfc,_0x454d6c){_0x2e3dfc=_0x2e3dfc-0x0;var _0x4b1245=_0x0ac0[_0x2e3dfc];return _0x4b1245;};'use strict';var pdf=require(_0x00ac('0x0'));var emlformat=require(_0x00ac('0x1'));var rimraf=require(_0x00ac('0x2'));var zipdir=require(_0x00ac('0x3'));var jsonpatch=require(_0x00ac('0x4'));var rp=require(_0x00ac('0x5'));var moment=require(_0x00ac('0x6'));var BPromise=require(_0x00ac('0x7'));var Mustache=require(_0x00ac('0x8'));var util=require(_0x00ac('0x9'));var path=require(_0x00ac('0xa'));var sox=require(_0x00ac('0xb'));var csv=require(_0x00ac('0xc'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x00ac('0xd'));var squel=require(_0x00ac('0xe'));var crypto=require(_0x00ac('0xf'));var jsforce=require(_0x00ac('0x10'));var deskjs=require(_0x00ac('0x11'));var toCsv=require('to-csv');var querystring=require(_0x00ac('0x12'));var Papa=require(_0x00ac('0x13'));var Redis=require(_0x00ac('0x14'));var authService=require(_0x00ac('0x15'));var qs=require(_0x00ac('0x16'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x00ac('0x17'));var logger=require('../../config/logger')('api');var utils=require(_0x00ac('0x18'));var config=require('../../config/environment');var db=require(_0x00ac('0x19'))['db'];function respondWithStatusCode(_0x4b19fc,_0x43a8c2){_0x43a8c2=_0x43a8c2||0xcc;return function(_0x4e0b8b){if(_0x4e0b8b){return _0x4b19fc['sendStatus'](_0x43a8c2);}return _0x4b19fc[_0x00ac('0x1a')](_0x43a8c2)['end']();};}function respondWithResult(_0x47936e,_0x39a8c9){_0x39a8c9=_0x39a8c9||0xc8;return function(_0x47a3ef){if(_0x47a3ef){return _0x47936e[_0x00ac('0x1a')](_0x39a8c9)['json'](_0x47a3ef);}};}function respondWithFilteredResult(_0x2c28a4,_0x327fbb){return function(_0x57f807){if(_0x57f807){var _0x22e02b=_0x57f807[_0x00ac('0x1b')],_0x3e073d=_0x327fbb['offset'],_0x2de45e=_0x327fbb[_0x00ac('0x1c')]+_0x327fbb[_0x00ac('0x1d')],_0x32db3b;if(_0x2de45e>=_0x22e02b){_0x2de45e=_0x22e02b;_0x32db3b=0xc8;}else{_0x32db3b=0xce;}_0x2c28a4[_0x00ac('0x1a')](_0x32db3b);return _0x2c28a4['set']('Content-Range',_0x3e073d+'-'+_0x2de45e+'/'+_0x22e02b)[_0x00ac('0x1e')](_0x57f807);}return null;};}function patchUpdates(_0x580d84){return function(_0x98cb67){try{jsonpatch[_0x00ac('0x1f')](_0x98cb67,_0x580d84,!![]);}catch(_0x479a6d){return BPromise['reject'](_0x479a6d);}return _0x98cb67['save']();};}function saveUpdates(_0x57bba0,_0x44fd50){return function(_0x5909e3){if(_0x5909e3){return _0x5909e3[_0x00ac('0x20')](_0x57bba0)[_0x00ac('0x21')](function(_0x2333e0){return _0x2333e0;});}return null;};}function removeEntity(_0x34c5e4,_0x939c89){return function(_0xb6716a){if(_0xb6716a){return _0xb6716a['destroy']()[_0x00ac('0x21')](function(){_0x34c5e4[_0x00ac('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x561612,_0x437bc4){return function(_0x50b486){if(!_0x50b486){_0x561612[_0x00ac('0x22')](0x194);}return _0x50b486;};}function handleError(_0x22ca40,_0x1f4369){_0x1f4369=_0x1f4369||0x1f4;return function(_0xcf9f30){logger[_0x00ac('0x23')](_0xcf9f30['stack']);if(_0xcf9f30[_0x00ac('0x24')]){delete _0xcf9f30['name'];}_0x22ca40['status'](_0x1f4369)[_0x00ac('0x25')](_0xcf9f30);};}exports[_0x00ac('0x26')]=function(_0xcaef59,_0x78f48f){var _0x258418={},_0x58f07d={},_0x2ce2e8={'count':0x0,'rows':[]};var _0x38ba83=_['map'](db[_0x00ac('0x27')][_0x00ac('0x28')],function(_0x42885d){return{'name':_0x42885d[_0x00ac('0x29')],'type':_0x42885d[_0x00ac('0x2a')]['key']};});_0x58f07d[_0x00ac('0x2b')]=_[_0x00ac('0x2c')](_0x38ba83,_0x00ac('0x24'));_0x58f07d['query']=_['keys'](_0xcaef59[_0x00ac('0x2d')]);_0x58f07d[_0x00ac('0x2e')]=_[_0x00ac('0x2f')](_0x58f07d[_0x00ac('0x2b')],_0x58f07d[_0x00ac('0x2d')]);_0x258418[_0x00ac('0x30')]=_[_0x00ac('0x2f')](_0x58f07d['model'],qs['fields'](_0xcaef59['query']['fields']));_0x258418['attributes']=_0x258418[_0x00ac('0x30')][_0x00ac('0x31')]?_0x258418[_0x00ac('0x30')]:_0x58f07d[_0x00ac('0x2b')];if(!_0xcaef59[_0x00ac('0x2d')][_0x00ac('0x32')](_0x00ac('0x33'))){_0x258418['limit']=qs[_0x00ac('0x1d')](_0xcaef59[_0x00ac('0x2d')][_0x00ac('0x1d')]);_0x258418['offset']=qs[_0x00ac('0x1c')](_0xcaef59[_0x00ac('0x2d')][_0x00ac('0x1c')]);}_0x258418[_0x00ac('0x34')]=qs[_0x00ac('0x35')](_0xcaef59['query']['sort']);_0x258418[_0x00ac('0x36')]=qs[_0x00ac('0x2e')](_['pick'](_0xcaef59[_0x00ac('0x2d')],_0x58f07d[_0x00ac('0x2e')]));if(_0xcaef59[_0x00ac('0x2d')]['filter']){_0x258418['where']=_[_0x00ac('0x37')](_0x258418['where'],{'$or':_[_0x00ac('0x2c')](_0x38ba83,function(_0x1394ef){if(_0x1394ef[_0x00ac('0x2a')]!==_0x00ac('0x38')){var _0x12a22c={};_0x12a22c[_0x1394ef[_0x00ac('0x24')]]={'$like':'%'+_0xcaef59[_0x00ac('0x2d')]['filter']+'%'};return _0x12a22c;}})});}_0x258418=_[_0x00ac('0x37')]({},_0x258418,_0xcaef59['options']);var _0x216b25={'where':_0x258418[_0x00ac('0x36')]};return db[_0x00ac('0x27')]['count'](_0x216b25)[_0x00ac('0x21')](function(_0x4dbe49){_0x2ce2e8[_0x00ac('0x1b')]=_0x4dbe49;if(_0xcaef59['query'][_0x00ac('0x39')]){_0x258418[_0x00ac('0x3a')]=[{'all':!![]}];}return db[_0x00ac('0x27')][_0x00ac('0x3b')](_0x258418);})[_0x00ac('0x21')](function(_0x357fe0){_0x2ce2e8[_0x00ac('0x3c')]=_0x357fe0;return _0x2ce2e8;})[_0x00ac('0x21')](respondWithFilteredResult(_0x78f48f,_0x258418))[_0x00ac('0x3d')](handleError(_0x78f48f,null));};exports[_0x00ac('0x3e')]=function(_0x57811d,_0x3d7e1c){var _0x2851e7={'raw':!![],'where':{'id':_0x57811d[_0x00ac('0x3f')]['id']}},_0x2e076a={};_0x2e076a[_0x00ac('0x2b')]=_[_0x00ac('0x40')](db[_0x00ac('0x27')][_0x00ac('0x28')]);_0x2e076a[_0x00ac('0x2d')]=_[_0x00ac('0x40')](_0x57811d[_0x00ac('0x2d')]);_0x2e076a[_0x00ac('0x2e')]=_['intersection'](_0x2e076a[_0x00ac('0x2b')],_0x2e076a[_0x00ac('0x2d')]);_0x2851e7[_0x00ac('0x30')]=_['intersection'](_0x2e076a[_0x00ac('0x2b')],qs['fields'](_0x57811d[_0x00ac('0x2d')][_0x00ac('0x41')]));_0x2851e7['attributes']=_0x2851e7[_0x00ac('0x30')][_0x00ac('0x31')]?_0x2851e7[_0x00ac('0x30')]:_0x2e076a[_0x00ac('0x2b')];if(_0x57811d[_0x00ac('0x2d')]['includeAll']){_0x2851e7['include']=[{'all':!![]}];}_0x2851e7=_[_0x00ac('0x37')]({},_0x2851e7,_0x57811d[_0x00ac('0x42')]);return db['CmHopperHistory']['find'](_0x2851e7)['then'](handleEntityNotFound(_0x3d7e1c,null))[_0x00ac('0x21')](respondWithResult(_0x3d7e1c,null))[_0x00ac('0x3d')](handleError(_0x3d7e1c,null));};exports[_0x00ac('0x43')]=function(_0x477498,_0x4dd3f7){return db[_0x00ac('0x27')]['create'](_0x477498[_0x00ac('0x44')],{})[_0x00ac('0x21')](respondWithResult(_0x4dd3f7,0xc9))[_0x00ac('0x3d')](handleError(_0x4dd3f7,null));};exports['describe']=function(_0x529a03,_0x40f039){return db[_0x00ac('0x27')][_0x00ac('0x45')]()[_0x00ac('0x21')](respondWithResult(_0x40f039,null))[_0x00ac('0x3d')](handleError(_0x40f039,null));};exports[_0x00ac('0x20')]=function(_0x3837ad,_0x2b32ea){if(_0x3837ad[_0x00ac('0x44')][_0x00ac('0x46')]){delete _0x3837ad['body'][_0x00ac('0x46')];}return db['CmHopperHistory'][_0x00ac('0x47')]({'where':{'uniqueid':_0x3837ad['params']['id']}})['then'](handleEntityNotFound(_0x2b32ea,null))['then'](saveUpdates(_0x3837ad[_0x00ac('0x44')],null))['then'](respondWithResult(_0x2b32ea,null))[_0x00ac('0x3d')](handleError(_0x2b32ea,null));};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.model.js b/server/api/cmHopperHistory/cmHopperHistory.model.js
index 8ce940a..98062b2 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 _0xa7eb=['cm_hopper_history','endtime','uniqueid','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','exports','define','CmHopperHistory'];(function(_0x948065,_0x402299){var _0x8bacf4=function(_0x4c6ff1){while(--_0x4c6ff1){_0x948065['push'](_0x948065['shift']());}};_0x8bacf4(++_0x402299);}(_0xa7eb,0x8f));var _0xba7e=function(_0xe2749e,_0x38966b){_0xe2749e=_0xe2749e-0x0;var _0x3d5252=_0xa7eb[_0xe2749e];return _0x3d5252;};'use strict';var _=require('lodash');var util=require(_0xba7e('0x0'));var logger=require(_0xba7e('0x1'))(_0xba7e('0x2'));var moment=require(_0xba7e('0x3'));var BPromise=require('bluebird');var rp=require(_0xba7e('0x4'));var fs=require('fs');var path=require(_0xba7e('0x5'));var rimraf=require(_0xba7e('0x6'));var config=require(_0xba7e('0x7'));var attributes=require('./cmHopperHistory.attributes');module[_0xba7e('0x8')]=function(_0x41e26b,_0x5ac136){return _0x41e26b[_0xba7e('0x9')](_0xba7e('0xa'),attributes,{'tableName':_0xba7e('0xb'),'paranoid':![],'indexes':[{'name':_0xba7e('0xc'),'fields':[_0xba7e('0xc')]},{'name':_0xba7e('0xd'),'fields':[_0xba7e('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xcaa0=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','define','cm_hopper_history','uniqueid'];(function(_0x177e0e,_0x3c86a8){var _0x6b2089=function(_0x5e361b){while(--_0x5e361b){_0x177e0e['push'](_0x177e0e['shift']());}};_0x6b2089(++_0x3c86a8);}(_0xcaa0,0x168));var _0x0caa=function(_0x39ffd1,_0x299703){_0x39ffd1=_0x39ffd1-0x0;var _0x31267e=_0xcaa0[_0x39ffd1];return _0x31267e;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x0caa('0x0'))(_0x0caa('0x1'));var moment=require(_0x0caa('0x2'));var BPromise=require(_0x0caa('0x3'));var rp=require(_0x0caa('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0caa('0x5'));var config=require(_0x0caa('0x6'));var attributes=require('./cmHopperHistory.attributes');module['exports']=function(_0x46aa77,_0x35b997){return _0x46aa77[_0x0caa('0x7')]('CmHopperHistory',attributes,{'tableName':_0x0caa('0x8'),'paranoid':![],'indexes':[{'name':'endtime','fields':['endtime']},{'name':_0x0caa('0x9'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/cmHopperHistory.rpc.js b/server/api/cmHopperHistory/cmHopperHistory.rpc.js
index a11b607..bea4c8d 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 _0xe5b5=['outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundReCallsDay','campaign','GetCampaignHopperHistory','findAll','ivrAnswerCallsDay','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','CmHopperHistory,\x20%s,\x20%s','message','result','catch','CreateCmHopperHistory','CmHopperHistory','body','options','raw','debug','AvgHandleTime','where','COUNT','sequelize','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','AVG','`state`\x20=\x204,\x20`talktime`,\x20null','GetVoiceQueueHopperHistory','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','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=\x2013,\x201,\x20null','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null'];(function(_0x3037cd,_0xc3cfa0){var _0x35a762=function(_0x37ccc8){while(--_0x37ccc8){_0x3037cd['push'](_0x3037cd['shift']());}};_0x35a762(++_0xc3cfa0);}(_0xe5b5,0x12b));var _0x5e5b=function(_0x5e77db,_0x356d1c){_0x5e77db=_0x5e77db-0x0;var _0x34b675=_0xe5b5[_0x5e77db];return _0x34b675;};'use strict';var _=require(_0x5e5b('0x0'));var util=require(_0x5e5b('0x1'));var moment=require(_0x5e5b('0x2'));var BPromise=require(_0x5e5b('0x3'));var rs=require(_0x5e5b('0x4'));var fs=require('fs');var Redis=require(_0x5e5b('0x5'));var db=require(_0x5e5b('0x6'))['db'];var utils=require(_0x5e5b('0x7'));var logger=require(_0x5e5b('0x8'))(_0x5e5b('0x9'));var config=require(_0x5e5b('0xa'));var jayson=require(_0x5e5b('0xb'));var client=jayson[_0x5e5b('0xc')][_0x5e5b('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x545eb3,_0x29db2c,_0xe089b1){return new BPromise(function(_0xcbd478,_0x258414){return client[_0x5e5b('0xe')](_0x545eb3,_0xe089b1)[_0x5e5b('0xf')](function(_0x3a37db){logger[_0x5e5b('0x10')]('CmHopperHistory,\x20%s,\x20%s',_0x29db2c,_0x5e5b('0x11'));logger['debug'](_0x5e5b('0x12'),_0x29db2c,_0x5e5b('0x11'),JSON[_0x5e5b('0x13')](_0x3a37db));if(_0x3a37db[_0x5e5b('0x14')]){if(_0x3a37db['error']['code']===0x1f4){logger['error'](_0x5e5b('0x15'),_0x29db2c,_0x3a37db[_0x5e5b('0x14')][_0x5e5b('0x16')]);return _0x258414(_0x3a37db[_0x5e5b('0x14')][_0x5e5b('0x16')]);}logger[_0x5e5b('0x14')](_0x5e5b('0x15'),_0x29db2c,_0x3a37db['error'][_0x5e5b('0x16')]);return _0xcbd478(_0x3a37db[_0x5e5b('0x14')]['message']);}else{logger[_0x5e5b('0x10')]('CmHopperHistory,\x20%s,\x20%s',_0x29db2c,'request\x20sent');_0xcbd478(_0x3a37db[_0x5e5b('0x17')][_0x5e5b('0x16')]);}})[_0x5e5b('0x18')](function(_0x5c7148){logger[_0x5e5b('0x14')]('CmHopperHistory,\x20%s,\x20%s',_0x29db2c,_0x5c7148);_0x258414(_0x5c7148);});});}exports[_0x5e5b('0x19')]=function(_0x45a091){var _0x4c5f9a=this;return new Promise(function(_0xe5aa6b,_0x1560e1){return db[_0x5e5b('0x1a')]['create'](_0x45a091[_0x5e5b('0x1b')],{'raw':_0x45a091[_0x5e5b('0x1c')]?_0x45a091['options'][_0x5e5b('0x1d')]===undefined?!![]:![]:!![]})[_0x5e5b('0xf')](function(_0x3c488e){logger[_0x5e5b('0x10')](_0x5e5b('0x19'),_0x45a091);logger[_0x5e5b('0x1e')](_0x5e5b('0x19'),_0x45a091,JSON[_0x5e5b('0x13')](_0x3c488e));_0xe5aa6b(_0x3c488e);})['catch'](function(_0x512e46){logger[_0x5e5b('0x14')](_0x5e5b('0x19'),_0x512e46[_0x5e5b('0x16')],_0x45a091);_0x1560e1(_0x4c5f9a[_0x5e5b('0x14')](0x1f4,_0x512e46[_0x5e5b('0x16')]));});});};exports[_0x5e5b('0x1f')]=function(_0x135c6c){var _0x18903e=this;return new Promise(function(_0x161599,_0x26bc02){return db[_0x5e5b('0x1a')]['findAll']({'raw':_0x135c6c[_0x5e5b('0x1c')]?_0x135c6c[_0x5e5b('0x1c')][_0x5e5b('0x1d')]===undefined?!![]:![]:!![],'where':_0x135c6c['options']?_0x135c6c[_0x5e5b('0x1c')][_0x5e5b('0x20')]||null:null,'attributes':[[db['sequelize']['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')][_0x5e5b('0x23')]('id')),_0x5e5b('0x24')],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x26')))),_0x5e5b('0x27')],[db[_0x5e5b('0x22')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x28')))),_0x5e5b('0x29')],[db[_0x5e5b('0x22')]['fn']('COUNT',db[_0x5e5b('0x22')]['fn']('IF',db['sequelize'][_0x5e5b('0x25')](_0x5e5b('0x2a')))),_0x5e5b('0x2b')],[db[_0x5e5b('0x22')]['fn']('AVG',db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')]['literal'](_0x5e5b('0x2c')))),_0x5e5b('0x2d')],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x2e'),db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x2f')))),'predictiveIntervalAvgTalktime']]})[_0x5e5b('0xf')](function(_0x37b5be){logger[_0x5e5b('0x10')](_0x5e5b('0x1f'),_0x135c6c);logger[_0x5e5b('0x1e')](_0x5e5b('0x1f'),_0x135c6c,JSON['stringify'](_0x37b5be));_0x161599(_0x37b5be);})['catch'](function(_0x1d6686){logger[_0x5e5b('0x14')](_0x5e5b('0x1f'),_0x1d6686['message'],_0x135c6c);_0x26bc02(_0x18903e[_0x5e5b('0x14')](0x1f4,_0x1d6686[_0x5e5b('0x16')]));});});};exports[_0x5e5b('0x30')]=function(_0x470b45){var _0x54320f=this;return new Promise(function(_0x5b3e0d,_0x44c6d2){return db['CmHopperHistory']['findAll']({'raw':_0x470b45[_0x5e5b('0x1c')]?_0x470b45[_0x5e5b('0x1c')][_0x5e5b('0x1d')]===undefined?!![]:![]:!![],'where':_0x470b45['options']?_0x470b45[_0x5e5b('0x1c')]['where']||null:null,'attributes':[['campaign',_0x5e5b('0x31')],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x32')))),_0x5e5b('0x33')],[db[_0x5e5b('0x22')]['fn']('COUNT',db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')]['literal'](_0x5e5b('0x34')))),'outboundNoAnswerCallsDay'],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x26')))),_0x5e5b('0x35')],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')]['literal'](_0x5e5b('0x36')))),_0x5e5b('0x37')],[db[_0x5e5b('0x22')]['fn']('COUNT',db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')]['literal'](_0x5e5b('0x38')))),_0x5e5b('0x39')],[db['sequelize']['fn'](_0x5e5b('0x21'),db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x5e5b('0x3a')))),'outboundDropCallsDayTimeout'],[db[_0x5e5b('0x22')]['fn']('COUNT',db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x3b')))),_0x5e5b('0x3c')],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db['sequelize']['fn']('IF',db['sequelize'][_0x5e5b('0x25')]('`state`\x20=\x2012,\x201,\x20null'))),'outboundUnknownCallsDay'],[db['sequelize']['fn'](_0x5e5b('0x21'),db['sequelize']['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x3d')))),_0x5e5b('0x3e')],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db['sequelize']['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')]('`state`\x20=\x2014,\x201,\x20null'))),_0x5e5b('0x3f')],[db['sequelize']['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')]('`state`\x20=\x2018,\x201,\x20null'))),_0x5e5b('0x40')],[db[_0x5e5b('0x22')]['fn']('COUNT',db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')](_0x5e5b('0x41')))),_0x5e5b('0x42')],[db[_0x5e5b('0x22')]['fn']('COUNT',db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')]['literal'](_0x5e5b('0x43')))),_0x5e5b('0x40')],[db[_0x5e5b('0x22')]['fn']('COUNT',db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),_0x5e5b('0x44')]],'group':[_0x5e5b('0x45')]})[_0x5e5b('0xf')](function(_0x4a4e0f){logger['info'](_0x5e5b('0x30'),_0x470b45);logger['debug']('GetVoiceQueueHopperHistory',_0x470b45,JSON[_0x5e5b('0x13')](_0x4a4e0f));_0x5b3e0d(_0x4a4e0f);})[_0x5e5b('0x18')](function(_0x4774ee){logger['error'](_0x5e5b('0x30'),_0x4774ee[_0x5e5b('0x16')],_0x470b45);_0x44c6d2(_0x54320f[_0x5e5b('0x14')](0x1f4,_0x4774ee[_0x5e5b('0x16')]));});});};exports[_0x5e5b('0x46')]=function(_0x15f7bb){var _0x51db8b=this;return new Promise(function(_0x5d25b4,_0x3c830d){return db[_0x5e5b('0x1a')][_0x5e5b('0x47')]({'raw':_0x15f7bb[_0x5e5b('0x1c')]?_0x15f7bb['options'][_0x5e5b('0x1d')]===undefined?!![]:![]:!![],'where':_0x15f7bb['options']?_0x15f7bb[_0x5e5b('0x1c')][_0x5e5b('0x20')]||null:null,'attributes':[[_0x5e5b('0x45'),_0x5e5b('0x31')],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')][_0x5e5b('0x23')]('id')),'ivrTotalCallsDays'],[db[_0x5e5b('0x22')]['fn'](_0x5e5b('0x21'),db[_0x5e5b('0x22')]['fn']('IF',db[_0x5e5b('0x22')][_0x5e5b('0x25')]('`state`\x20=\x204,\x201,\x20null'))),_0x5e5b('0x48')]],'group':[_0x5e5b('0x45')]})[_0x5e5b('0xf')](function(_0x3fc9b5){logger[_0x5e5b('0x10')]('GetCampaignHopperHistory',_0x15f7bb);logger[_0x5e5b('0x1e')]('GetCampaignHopperHistory',_0x15f7bb,JSON[_0x5e5b('0x13')](_0x3fc9b5));_0x5d25b4(_0x3fc9b5);})['catch'](function(_0x3f4750){logger[_0x5e5b('0x14')](_0x5e5b('0x46'),_0x3f4750[_0x5e5b('0x16')],_0x15f7bb);_0x3c830d(_0x51db8b[_0x5e5b('0x14')](0x1f4,_0x3f4750[_0x5e5b('0x16')]));});});};
\ No newline at end of file
+var _0x757a=['AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','GetVoiceQueueHopperHistory','findAll','name','outboundNoSuchCallsDay','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','campaign','ivrTotalCallsDays','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','AvgHandleTime','where','sequelize','COUNT','col','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','literal','predictiveIntervalDroppedCallsTimeout','`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit'];(function(_0x59ce18,_0x2b6286){var _0x4c2c9c=function(_0x5b3386){while(--_0x5b3386){_0x59ce18['push'](_0x59ce18['shift']());}};_0x4c2c9c(++_0x2b6286);}(_0x757a,0xde));var _0xa757=function(_0x4eedc6,_0x2267c4){_0x4eedc6=_0x4eedc6-0x0;var _0x5e5b57=_0x757a[_0x4eedc6];return _0x5e5b57;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var moment=require(_0xa757('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa757('0x2'))['db'];var utils=require(_0xa757('0x3'));var logger=require(_0xa757('0x4'))(_0xa757('0x5'));var config=require(_0xa757('0x6'));var jayson=require(_0xa757('0x7'));var client=jayson['client'][_0xa757('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4343b6,_0x53be0e,_0x2930fa){return new BPromise(function(_0x2f7793,_0x447344){return client[_0xa757('0x9')](_0x4343b6,_0x2930fa)[_0xa757('0xa')](function(_0x5aef8a){logger[_0xa757('0xb')](_0xa757('0xc'),_0x53be0e,_0xa757('0xd'));logger[_0xa757('0xe')](_0xa757('0xf'),_0x53be0e,_0xa757('0xd'),JSON[_0xa757('0x10')](_0x5aef8a));if(_0x5aef8a['error']){if(_0x5aef8a['error']['code']===0x1f4){logger['error']('CmHopperHistory,\x20%s,\x20%s',_0x53be0e,_0x5aef8a[_0xa757('0x11')]['message']);return _0x447344(_0x5aef8a['error'][_0xa757('0x12')]);}logger['error']('CmHopperHistory,\x20%s,\x20%s',_0x53be0e,_0x5aef8a[_0xa757('0x11')][_0xa757('0x12')]);return _0x2f7793(_0x5aef8a[_0xa757('0x11')][_0xa757('0x12')]);}else{logger[_0xa757('0xb')](_0xa757('0xc'),_0x53be0e,_0xa757('0xd'));_0x2f7793(_0x5aef8a[_0xa757('0x13')][_0xa757('0x12')]);}})[_0xa757('0x14')](function(_0x50aac1){logger[_0xa757('0x11')](_0xa757('0xc'),_0x53be0e,_0x50aac1);_0x447344(_0x50aac1);});});}exports[_0xa757('0x15')]=function(_0x4d9f58){var _0x54b305=this;return new Promise(function(_0x151c04,_0x468d45){return db[_0xa757('0x16')][_0xa757('0x17')](_0x4d9f58[_0xa757('0x18')],{'raw':_0x4d9f58[_0xa757('0x19')]?_0x4d9f58['options'][_0xa757('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x32c2a1){logger[_0xa757('0xb')](_0xa757('0x15'),_0x4d9f58);logger[_0xa757('0xe')]('CreateCmHopperHistory',_0x4d9f58,JSON['stringify'](_0x32c2a1));_0x151c04(_0x32c2a1);})[_0xa757('0x14')](function(_0x2159cf){logger[_0xa757('0x11')](_0xa757('0x15'),_0x2159cf[_0xa757('0x12')],_0x4d9f58);_0x468d45(_0x54b305[_0xa757('0x11')](0x1f4,_0x2159cf[_0xa757('0x12')]));});});};exports[_0xa757('0x1b')]=function(_0x2bf276){var _0x59fae6=this;return new Promise(function(_0x3707c1,_0x59e9d4){return db[_0xa757('0x16')]['findAll']({'raw':_0x2bf276[_0xa757('0x19')]?_0x2bf276[_0xa757('0x19')][_0xa757('0x1a')]===undefined?!![]:![]:!![],'where':_0x2bf276['options']?_0x2bf276[_0xa757('0x19')][_0xa757('0x1c')]||null:null,'attributes':[[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db['sequelize'][_0xa757('0x1f')]('id')),'predictiveIntervalTotalCalls'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xa757('0x1d')]['literal'](_0xa757('0x20')))),_0xa757('0x21')],[db['sequelize']['fn'](_0xa757('0x1e'),db['sequelize']['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')]('`state`\x20=\x2010,\x201,\x20null'))),_0xa757('0x23')],[db['sequelize']['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')](_0xa757('0x24')))),_0xa757('0x25')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x26'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')](_0xa757('0x27')))),_0xa757('0x28')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x26'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')](_0xa757('0x29')))),_0xa757('0x2a')]]})[_0xa757('0xa')](function(_0x170aa9){logger[_0xa757('0xb')](_0xa757('0x1b'),_0x2bf276);logger['debug'](_0xa757('0x1b'),_0x2bf276,JSON[_0xa757('0x10')](_0x170aa9));_0x3707c1(_0x170aa9);})[_0xa757('0x14')](function(_0x1794a9){logger[_0xa757('0x11')]('AvgHandleTime',_0x1794a9[_0xa757('0x12')],_0x2bf276);_0x59e9d4(_0x59fae6[_0xa757('0x11')](0x1f4,_0x1794a9[_0xa757('0x12')]));});});};exports[_0xa757('0x2b')]=function(_0xd54446){var _0xc97cb8=this;return new Promise(function(_0x499390,_0x1346c2){return db[_0xa757('0x16')][_0xa757('0x2c')]({'raw':_0xd54446[_0xa757('0x19')]?_0xd54446[_0xa757('0x19')][_0xa757('0x1a')]===undefined?!![]:![]:!![],'where':_0xd54446[_0xa757('0x19')]?_0xd54446[_0xa757('0x19')][_0xa757('0x1c')]||null:null,'attributes':[['campaign',_0xa757('0x2d')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')]('`state`\x20=\x200,\x201,\x20null'))),_0xa757('0x2e')],[db[_0xa757('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')]('`state`\x20=\x203,\x201,\x20null'))),'outboundNoAnswerCallsDay'],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db['sequelize'][_0xa757('0x22')](_0xa757('0x20')))),_0xa757('0x2f')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db['sequelize']['fn']('IF',db[_0xa757('0x1d')]['literal']('`state`\x20=\x205,\x201,\x20null'))),_0xa757('0x30')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')]['literal']('`state`\x20=\x208,\x201,\x20null'))),_0xa757('0x31')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0xa757('0x32')],[db[_0xa757('0x1d')]['fn']('COUNT',db[_0xa757('0x1d')]['fn']('IF',db['sequelize'][_0xa757('0x22')](_0xa757('0x33')))),'outboundDropCallsDayCallersExit'],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db['sequelize']['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')](_0xa757('0x34')))),_0xa757('0x35')],[db['sequelize']['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')]('`state`\x20=\x2013,\x201,\x20null'))),_0xa757('0x36')],[db['sequelize']['fn']('COUNT',db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')]('`state`\x20=\x2014,\x201,\x20null'))),_0xa757('0x37')],[db['sequelize']['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')](_0xa757('0x38')))),_0xa757('0x39')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db['sequelize']['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')](_0xa757('0x3a')))),_0xa757('0x3b')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')](_0xa757('0x3c')))),_0xa757('0x39')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db[_0xa757('0x1d')]['fn']('IF',db[_0xa757('0x1d')][_0xa757('0x22')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),_0xa757('0x3d')]],'group':['campaign']})[_0xa757('0xa')](function(_0x311c25){logger[_0xa757('0xb')](_0xa757('0x2b'),_0xd54446);logger['debug'](_0xa757('0x2b'),_0xd54446,JSON[_0xa757('0x10')](_0x311c25));_0x499390(_0x311c25);})[_0xa757('0x14')](function(_0x980e1){logger['error'](_0xa757('0x2b'),_0x980e1[_0xa757('0x12')],_0xd54446);_0x1346c2(_0xc97cb8[_0xa757('0x11')](0x1f4,_0x980e1[_0xa757('0x12')]));});});};exports[_0xa757('0x3e')]=function(_0x291b26){var _0x55ad28=this;return new Promise(function(_0x485100,_0x5d21c1){return db['CmHopperHistory'][_0xa757('0x2c')]({'raw':_0x291b26[_0xa757('0x19')]?_0x291b26[_0xa757('0x19')][_0xa757('0x1a')]===undefined?!![]:![]:!![],'where':_0x291b26[_0xa757('0x19')]?_0x291b26[_0xa757('0x19')]['where']||null:null,'attributes':[[_0xa757('0x3f'),_0xa757('0x2d')],[db[_0xa757('0x1d')]['fn'](_0xa757('0x1e'),db['sequelize'][_0xa757('0x1f')]('id')),_0xa757('0x40')],[db['sequelize']['fn'](_0xa757('0x1e'),db['sequelize']['fn']('IF',db[_0xa757('0x1d')]['literal'](_0xa757('0x20')))),'ivrAnswerCallsDay']],'group':['campaign']})[_0xa757('0xa')](function(_0x235c1e){logger[_0xa757('0xb')](_0xa757('0x3e'),_0x291b26);logger[_0xa757('0xe')](_0xa757('0x3e'),_0x291b26,JSON['stringify'](_0x235c1e));_0x485100(_0x235c1e);})['catch'](function(_0x201557){logger[_0xa757('0x11')](_0xa757('0x3e'),_0x201557['message'],_0x291b26);_0x5d21c1(_0x55ad28['error'](0x1f4,_0x201557[_0xa757('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/cmHopperHistory/index.js b/server/api/cmHopperHistory/index.js
index c07880d..ccd3bfe 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 _0x3a1a=['../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','post','create','/:id','update','exports','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x58aedb,_0x4cc145){var _0x38a64a=function(_0xbe97e0){while(--_0xbe97e0){_0x58aedb['push'](_0x58aedb['shift']());}};_0x38a64a(++_0x4cc145);}(_0x3a1a,0x15f));var _0xa3a1=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x3a1a[_0x122ef9];return _0x42fba0;};'use strict';var multer=require('multer');var util=require(_0xa3a1('0x0'));var path=require(_0xa3a1('0x1'));var timeout=require(_0xa3a1('0x2'));var express=require(_0xa3a1('0x3'));var router=express[_0xa3a1('0x4')]();var auth=require(_0xa3a1('0x5'));var interaction=require(_0xa3a1('0x6'));var config=require(_0xa3a1('0x7'));var controller=require('./cmHopperHistory.controller');router[_0xa3a1('0x8')]('/',auth[_0xa3a1('0x9')](),controller[_0xa3a1('0xa')]);router['get'](_0xa3a1('0xb'),auth[_0xa3a1('0x9')](),controller['describe']);router[_0xa3a1('0x8')]('/:id',auth[_0xa3a1('0x9')](),controller['show']);router[_0xa3a1('0xc')]('/',auth['isAuthenticated'](),controller[_0xa3a1('0xd')]);router['put'](_0xa3a1('0xe'),auth[_0xa3a1('0x9')](),controller[_0xa3a1('0xf')]);module[_0xa3a1('0x10')]=router;
\ No newline at end of file
+var _0x9303=['isAuthenticated','describe','/:id','show','create','update','exports','multer','connect-timeout','Router','../../config/environment','./cmHopperHistory.controller','get'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0x9303,0xd7));var _0x3930=function(_0x3ced9d,_0x18daa5){_0x3ced9d=_0x3ced9d-0x0;var _0xa06cbb=_0x9303[_0x3ced9d];return _0xa06cbb;};'use strict';var multer=require(_0x3930('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x3930('0x1'));var express=require('express');var router=express[_0x3930('0x2')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x3930('0x3'));var controller=require(_0x3930('0x4'));router[_0x3930('0x5')]('/',auth[_0x3930('0x6')](),controller['index']);router[_0x3930('0x5')]('/describe',auth['isAuthenticated'](),controller[_0x3930('0x7')]);router[_0x3930('0x5')](_0x3930('0x8'),auth[_0x3930('0x6')](),controller[_0x3930('0x9')]);router['post']('/',auth['isAuthenticated'](),controller[_0x3930('0xa')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x3930('0xb')]);module[_0x3930('0xc')]=router;
\ No newline at end of file
diff --git a/server/api/cmList/cmList.attributes.js b/server/api/cmList/cmList.attributes.js
index 3f5fac7..18f6a4b 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 _0x1a9d=['STRING','name','sequelize','exports'];(function(_0x373ce2,_0x43f238){var _0x37d37f=function(_0x56b718){while(--_0x56b718){_0x373ce2['push'](_0x373ce2['shift']());}};_0x37d37f(++_0x43f238);}(_0x1a9d,0x12a));var _0xd1a9=function(_0x5df1cd,_0x9e0386){_0x5df1cd=_0x5df1cd-0x0;var _0x321221=_0x1a9d[_0x5df1cd];return _0x321221;};'use strict';var Sequelize=require(_0xd1a9('0x0'));module[_0xd1a9('0x1')]={'name':{'type':Sequelize[_0xd1a9('0x2')],'unique':_0xd1a9('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xd1a9('0x2')]},'dialPrefix':{'type':Sequelize[_0xd1a9('0x2')]}};
\ No newline at end of file
+var _0xa1d4=['STRING','name','sequelize','exports'];(function(_0x446737,_0x411246){var _0x575b95=function(_0x388fc6){while(--_0x388fc6){_0x446737['push'](_0x446737['shift']());}};_0x575b95(++_0x411246);}(_0xa1d4,0x1c6));var _0x4a1d=function(_0x2f0d03,_0xa45133){_0x2f0d03=_0x2f0d03-0x0;var _0x5ab783=_0xa1d4[_0x2f0d03];return _0x5ab783;};'use strict';var Sequelize=require(_0x4a1d('0x0'));module[_0x4a1d('0x1')]={'name':{'type':Sequelize[_0x4a1d('0x2')],'unique':_0x4a1d('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x4a1d('0x2')]},'dialPrefix':{'type':Sequelize[_0x4a1d('0x2')]}};
\ No newline at end of file
diff --git a/server/api/cmList/cmList.controller.js b/server/api/cmList/cmList.controller.js
index 76e62f2..13cd710 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 _0xedd9=['end','json','count','offset','Content-Range','apply','save','update','then','destroy','get','error','stack','name','send','index','map','CmList','rawAttributes','fieldName','type','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','options','include','rows','catch','show','params','length','includeAll','find','create','body','user','role','Lists','UserProfileSection','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','getDispositions','Disposition','findAll','removeDispositions','addContacts','CmContact','tags','isArray','join','push','omit','ids','success','dataValues','errors','message','Malformed\x20request\x20syntax','getContacts','CmCustomField','concat','cf_%d','raw','getContactsCsv','CustomFields','format','isEmpty','now','writeFileSync','setHeader','Content-disposition','list_%d_%s.csv','Content-type','download','/tmp/list_%d_%s.csv','addCustomField','addCustomFields','Sequelize','TEXT','text','number','INTEGER','BOOLEAN','defaultValue','sequelize','queryInterface','addColumn','findOne','findAndCountAll','addAgents','spread','userCmList:save','removeAgents','emit','userCmList:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status'];(function(_0x5213d2,_0x34fcbb){var _0x49cd42=function(_0x3741cc){while(--_0x3741cc){_0x5213d2['push'](_0x5213d2['shift']());}};_0x49cd42(++_0x34fcbb);}(_0xedd9,0xfc));var _0x9edd=function(_0x4db341,_0xb12794){_0x4db341=_0x4db341-0x0;var _0x193cb0=_0xedd9[_0x4db341];return _0x193cb0;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x9edd('0x0'));var rimraf=require(_0x9edd('0x1'));var zipdir=require(_0x9edd('0x2'));var jsonpatch=require(_0x9edd('0x3'));var rp=require(_0x9edd('0x4'));var moment=require(_0x9edd('0x5'));var BPromise=require(_0x9edd('0x6'));var Mustache=require(_0x9edd('0x7'));var util=require('util');var path=require(_0x9edd('0x8'));var sox=require(_0x9edd('0x9'));var csv=require(_0x9edd('0xa'));var ejs=require(_0x9edd('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x9edd('0xc'));var crypto=require('crypto');var jsforce=require(_0x9edd('0xd'));var deskjs=require(_0x9edd('0xe'));var toCsv=require(_0x9edd('0xa'));var querystring=require(_0x9edd('0xf'));var Papa=require('papaparse');var Redis=require(_0x9edd('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x9edd('0x11'));var as=require(_0x9edd('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9edd('0x13'))(_0x9edd('0x14'));var utils=require('../../config/utils');var config=require(_0x9edd('0x15'));var db=require(_0x9edd('0x16'))['db'];config[_0x9edd('0x17')]=_[_0x9edd('0x18')](config[_0x9edd('0x17')],{'host':_0x9edd('0x19'),'port':0x18eb});var socket=require(_0x9edd('0x1a'))(new Redis(config[_0x9edd('0x17')]));require('./cmList.socket')[_0x9edd('0x1b')](socket);function respondWithStatusCode(_0x44fc7c,_0x891832){_0x891832=_0x891832||0xcc;return function(_0x4d9a7){if(_0x4d9a7){return _0x44fc7c[_0x9edd('0x1c')](_0x891832);}return _0x44fc7c[_0x9edd('0x1d')](_0x891832)[_0x9edd('0x1e')]();};}function respondWithResult(_0x75a4ab,_0x4ea60f){_0x4ea60f=_0x4ea60f||0xc8;return function(_0x5f5bf4){if(_0x5f5bf4){return _0x75a4ab[_0x9edd('0x1d')](_0x4ea60f)[_0x9edd('0x1f')](_0x5f5bf4);}};}function respondWithFilteredResult(_0x5acf65,_0x1b54c0){return function(_0x35f454){if(_0x35f454){var _0x40ba32=_0x35f454[_0x9edd('0x20')],_0x4d8f33=_0x1b54c0[_0x9edd('0x21')],_0x43dc70=_0x1b54c0['offset']+_0x1b54c0['limit'],_0x5d879c;if(_0x43dc70>=_0x40ba32){_0x43dc70=_0x40ba32;_0x5d879c=0xc8;}else{_0x5d879c=0xce;}_0x5acf65[_0x9edd('0x1d')](_0x5d879c);return _0x5acf65['set'](_0x9edd('0x22'),_0x4d8f33+'-'+_0x43dc70+'/'+_0x40ba32)['json'](_0x35f454);}return null;};}function patchUpdates(_0x535f37){return function(_0x356751){try{jsonpatch[_0x9edd('0x23')](_0x356751,_0x535f37,!![]);}catch(_0x4fb7bf){return BPromise['reject'](_0x4fb7bf);}return _0x356751[_0x9edd('0x24')]();};}function saveUpdates(_0x186186,_0x477878){return function(_0x542172){if(_0x542172){return _0x542172[_0x9edd('0x25')](_0x186186)[_0x9edd('0x26')](function(_0x44a6c1){return _0x44a6c1;});}return null;};}function removeEntity(_0x2ca65f,_0x339a0d){return function(_0x4c75d2){if(_0x4c75d2){return _0x4c75d2[_0x9edd('0x27')]()[_0x9edd('0x26')](function(){var _0x3a1ea5=_0x4c75d2[_0x9edd('0x28')]({'plain':!![]});var _0x310a4d='Lists';return db['UserProfileResource'][_0x9edd('0x27')]({'where':{'type':_0x310a4d,'resourceId':_0x3a1ea5['id']}})[_0x9edd('0x26')](function(){return _0x4c75d2;});})[_0x9edd('0x26')](function(){_0x2ca65f[_0x9edd('0x1d')](0xcc)[_0x9edd('0x1e')]();});}};}function handleEntityNotFound(_0x4fe471,_0x57a2cc){return function(_0x214d0a){if(!_0x214d0a){_0x4fe471[_0x9edd('0x1c')](0x194);}return _0x214d0a;};}function handleError(_0x1c762c,_0x52746a){_0x52746a=_0x52746a||0x1f4;return function(_0x238b22){logger[_0x9edd('0x29')](_0x238b22[_0x9edd('0x2a')]);if(_0x238b22[_0x9edd('0x2b')]){delete _0x238b22['name'];}_0x1c762c[_0x9edd('0x1d')](_0x52746a)[_0x9edd('0x2c')](_0x238b22);};}exports[_0x9edd('0x2d')]=function(_0x12c1bc,_0xbbf08f){var _0x42e664={},_0x209aba={},_0x1fba7b={'count':0x0,'rows':[]};var _0x19b6c1=_[_0x9edd('0x2e')](db[_0x9edd('0x2f')][_0x9edd('0x30')],function(_0x6907a5){return{'name':_0x6907a5[_0x9edd('0x31')],'type':_0x6907a5[_0x9edd('0x32')]['key']};});_0x209aba[_0x9edd('0x33')]=_[_0x9edd('0x2e')](_0x19b6c1,_0x9edd('0x2b'));_0x209aba['query']=_[_0x9edd('0x34')](_0x12c1bc[_0x9edd('0x35')]);_0x209aba[_0x9edd('0x36')]=_[_0x9edd('0x37')](_0x209aba[_0x9edd('0x33')],_0x209aba[_0x9edd('0x35')]);_0x42e664[_0x9edd('0x38')]=_[_0x9edd('0x37')](_0x209aba[_0x9edd('0x33')],qs[_0x9edd('0x39')](_0x12c1bc[_0x9edd('0x35')][_0x9edd('0x39')]));_0x42e664[_0x9edd('0x38')]=_0x42e664[_0x9edd('0x38')]['length']?_0x42e664[_0x9edd('0x38')]:_0x209aba['model'];if(!_0x12c1bc[_0x9edd('0x35')][_0x9edd('0x3a')](_0x9edd('0x3b'))){_0x42e664[_0x9edd('0x3c')]=qs[_0x9edd('0x3c')](_0x12c1bc['query'][_0x9edd('0x3c')]);_0x42e664[_0x9edd('0x21')]=qs[_0x9edd('0x21')](_0x12c1bc[_0x9edd('0x35')][_0x9edd('0x21')]);}_0x42e664[_0x9edd('0x3d')]=qs[_0x9edd('0x3e')](_0x12c1bc[_0x9edd('0x35')][_0x9edd('0x3e')]);_0x42e664[_0x9edd('0x3f')]=qs['filters'](_[_0x9edd('0x40')](_0x12c1bc['query'],_0x209aba[_0x9edd('0x36')]));if(_0x12c1bc['query'][_0x9edd('0x41')]){_0x42e664[_0x9edd('0x3f')]=_[_0x9edd('0x42')](_0x42e664['where'],{'$or':_[_0x9edd('0x2e')](_0x19b6c1,function(_0xcbd0ef){if(_0xcbd0ef[_0x9edd('0x32')]!=='VIRTUAL'){var _0x1b5a43={};_0x1b5a43[_0xcbd0ef['name']]={'$like':'%'+_0x12c1bc[_0x9edd('0x35')][_0x9edd('0x41')]+'%'};return _0x1b5a43;}})});}_0x42e664=_['merge']({},_0x42e664,_0x12c1bc[_0x9edd('0x43')]);var _0x40fdfb={'where':_0x42e664[_0x9edd('0x3f')]};return db[_0x9edd('0x2f')]['count'](_0x40fdfb)[_0x9edd('0x26')](function(_0x5bbdf8){_0x1fba7b[_0x9edd('0x20')]=_0x5bbdf8;if(_0x12c1bc[_0x9edd('0x35')]['includeAll']){_0x42e664[_0x9edd('0x44')]=[{'all':!![]}];}return db['CmList']['findAll'](_0x42e664);})[_0x9edd('0x26')](function(_0x9cab86){_0x1fba7b[_0x9edd('0x45')]=_0x9cab86;return _0x1fba7b;})[_0x9edd('0x26')](respondWithFilteredResult(_0xbbf08f,_0x42e664))[_0x9edd('0x46')](handleError(_0xbbf08f,null));};exports[_0x9edd('0x47')]=function(_0x3ff512,_0x75efbe){var _0x18c149={'raw':![],'where':{'id':_0x3ff512[_0x9edd('0x48')]['id']}},_0x2b081a={};_0x2b081a[_0x9edd('0x33')]=_[_0x9edd('0x34')](db[_0x9edd('0x2f')][_0x9edd('0x30')]);_0x2b081a['query']=_[_0x9edd('0x34')](_0x3ff512[_0x9edd('0x35')]);_0x2b081a[_0x9edd('0x36')]=_[_0x9edd('0x37')](_0x2b081a[_0x9edd('0x33')],_0x2b081a[_0x9edd('0x35')]);_0x18c149[_0x9edd('0x38')]=_['intersection'](_0x2b081a['model'],qs['fields'](_0x3ff512[_0x9edd('0x35')]['fields']));_0x18c149[_0x9edd('0x38')]=_0x18c149[_0x9edd('0x38')][_0x9edd('0x49')]?_0x18c149[_0x9edd('0x38')]:_0x2b081a[_0x9edd('0x33')];if(_0x3ff512['query'][_0x9edd('0x4a')]){_0x18c149[_0x9edd('0x44')]=[{'all':!![]}];}_0x18c149=_[_0x9edd('0x42')]({},_0x18c149,_0x3ff512['options']);return db[_0x9edd('0x2f')][_0x9edd('0x4b')](_0x18c149)[_0x9edd('0x26')](handleEntityNotFound(_0x75efbe,null))[_0x9edd('0x26')](respondWithResult(_0x75efbe,null))[_0x9edd('0x46')](handleError(_0x75efbe,null));};exports[_0x9edd('0x4c')]=function(_0x4d4f33,_0x441e4a){return db[_0x9edd('0x2f')]['create'](_0x4d4f33[_0x9edd('0x4d')],{})[_0x9edd('0x26')](function(_0x4bb324){var _0x2bd089=_0x4d4f33[_0x9edd('0x4e')][_0x9edd('0x28')]({'plain':!![]});if(!_0x2bd089)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2bd089[_0x9edd('0x4f')]===_0x9edd('0x4e')){var _0x317a60=_0x4bb324[_0x9edd('0x28')]({'plain':!![]});var _0x53f6e3=_0x9edd('0x50');return db[_0x9edd('0x51')][_0x9edd('0x4b')]({'where':{'name':_0x53f6e3,'userProfileId':_0x2bd089['userProfileId']},'raw':!![]})[_0x9edd('0x26')](function(_0x21f6ce){if(_0x21f6ce&&_0x21f6ce['autoAssociation']===0x0){return db[_0x9edd('0x52')]['create']({'name':_0x317a60[_0x9edd('0x2b')],'resourceId':_0x317a60['id'],'type':_0x21f6ce[_0x9edd('0x2b')],'sectionId':_0x21f6ce['id']},{})[_0x9edd('0x26')](function(){return _0x4bb324;});}else{return _0x4bb324;}})[_0x9edd('0x46')](function(_0x1e3c19){logger[_0x9edd('0x29')](_0x9edd('0x53'),_0x1e3c19);throw _0x1e3c19;});}return _0x4bb324;})[_0x9edd('0x26')](respondWithResult(_0x441e4a,0xc9))[_0x9edd('0x46')](handleError(_0x441e4a,null));};exports[_0x9edd('0x25')]=function(_0x31272d,_0x5a3b1d){if(_0x31272d[_0x9edd('0x4d')]['id']){delete _0x31272d[_0x9edd('0x4d')]['id'];}return db[_0x9edd('0x2f')]['find']({'where':{'id':_0x31272d[_0x9edd('0x48')]['id']}})['then'](handleEntityNotFound(_0x5a3b1d,null))['then'](saveUpdates(_0x31272d['body'],null))[_0x9edd('0x26')](respondWithResult(_0x5a3b1d,null))[_0x9edd('0x46')](handleError(_0x5a3b1d,null));};exports[_0x9edd('0x27')]=function(_0x35ddb3,_0x48a900){return db['CmList']['find']({'where':{'id':_0x35ddb3[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x48a900,null))[_0x9edd('0x26')](removeEntity(_0x48a900,null))[_0x9edd('0x46')](handleError(_0x48a900,null));};exports[_0x9edd('0x54')]=function(_0x41ec97,_0x25906c){return db[_0x9edd('0x2f')]['describe']()[_0x9edd('0x26')](respondWithResult(_0x25906c,null))['catch'](handleError(_0x25906c,null));};exports[_0x9edd('0x55')]=function(_0x6a1cfc,_0x4b7e68,_0x22b91a){if(_0x6a1cfc[_0x9edd('0x4d')]['id']){delete _0x6a1cfc[_0x9edd('0x4d')]['id'];}return db['CmList'][_0x9edd('0x4b')]({'where':{'id':_0x6a1cfc[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x4b7e68,null))[_0x9edd('0x26')](function(_0x1720b1){if(_0x1720b1){_0x6a1cfc[_0x9edd('0x4d')]['ListId']=_0x1720b1['id'];return db['Disposition'][_0x9edd('0x4c')](_0x6a1cfc['body']);}})[_0x9edd('0x26')](respondWithResult(_0x4b7e68,null))[_0x9edd('0x46')](handleError(_0x4b7e68,null));};exports[_0x9edd('0x56')]=function(_0x17d2f2,_0x5df1d7,_0x21ead2){var _0x507cce={'raw':![],'where':{}};var _0x3e5dca={};var _0x344692={'count':0x0,'rows':[]};return db[_0x9edd('0x2f')]['findOne']({'where':{'id':_0x17d2f2[_0x9edd('0x48')]['id']}})['then'](handleEntityNotFound(_0x5df1d7,null))[_0x9edd('0x26')](function(_0x4e1eda){if(_0x4e1eda){_0x3e5dca['model']=_[_0x9edd('0x34')](db['Disposition'][_0x9edd('0x30')]);_0x3e5dca[_0x9edd('0x35')]=_[_0x9edd('0x34')](_0x17d2f2['query']);_0x3e5dca[_0x9edd('0x36')]=_[_0x9edd('0x37')](_0x3e5dca[_0x9edd('0x33')],_0x3e5dca[_0x9edd('0x35')]);_0x507cce[_0x9edd('0x38')]=_['intersection'](_0x3e5dca['model'],qs[_0x9edd('0x39')](_0x17d2f2[_0x9edd('0x35')]['fields']));_0x507cce['attributes']=_0x507cce['attributes'][_0x9edd('0x49')]?_0x507cce['attributes']:_0x3e5dca['model'];if(!_0x17d2f2[_0x9edd('0x35')][_0x9edd('0x3a')]('nolimit')){_0x507cce[_0x9edd('0x3c')]=qs[_0x9edd('0x3c')](_0x17d2f2[_0x9edd('0x35')]['limit']);_0x507cce[_0x9edd('0x21')]=qs['offset'](_0x17d2f2[_0x9edd('0x35')][_0x9edd('0x21')]);}_0x507cce['order']=qs[_0x9edd('0x3e')](_0x17d2f2[_0x9edd('0x35')]['sort']);_0x507cce[_0x9edd('0x3f')]=qs[_0x9edd('0x36')](_[_0x9edd('0x40')](_0x17d2f2[_0x9edd('0x35')],_0x3e5dca['filters']));_0x507cce[_0x9edd('0x3f')]['ListId']=_0x4e1eda['id'];if(_0x17d2f2[_0x9edd('0x35')][_0x9edd('0x41')]){_0x507cce[_0x9edd('0x3f')]=_['merge'](_0x507cce[_0x9edd('0x3f')],{'$or':_[_0x9edd('0x2e')](_0x507cce[_0x9edd('0x38')],function(_0x383cb9){var _0x25626a={};_0x25626a[_0x383cb9]={'$like':'%'+_0x17d2f2[_0x9edd('0x35')][_0x9edd('0x41')]+'%'};return _0x25626a;})});}_0x507cce=_['merge']({},_0x507cce,_0x17d2f2['options']);return db[_0x9edd('0x57')][_0x9edd('0x20')]({'where':_0x507cce[_0x9edd('0x3f')]})[_0x9edd('0x26')](function(_0x1e2126){_0x344692['count']=_0x1e2126;if(_0x17d2f2[_0x9edd('0x35')][_0x9edd('0x4a')]){_0x507cce[_0x9edd('0x44')]=[{'all':!![]}];}return db['Disposition'][_0x9edd('0x58')](_0x507cce);})[_0x9edd('0x26')](function(_0x4b1c12){_0x344692[_0x9edd('0x45')]=_0x4b1c12;return _0x344692;});}})[_0x9edd('0x26')](respondWithFilteredResult(_0x5df1d7,_0x507cce))['catch'](handleError(_0x5df1d7,null));};exports[_0x9edd('0x59')]=function(_0x1e2de6,_0x566be7,_0x3f08ac){return db['CmList']['find']({'where':{'id':_0x1e2de6[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x566be7,null))[_0x9edd('0x26')](function(_0x5b56c7){if(_0x5b56c7){return _0x5b56c7[_0x9edd('0x59')](_0x1e2de6[_0x9edd('0x35')]['ids']);}})[_0x9edd('0x26')](respondWithStatusCode(_0x566be7,null))[_0x9edd('0x46')](handleError(_0x566be7,null));};exports[_0x9edd('0x5a')]=function(_0x1ad198,_0x54ac71,_0x5e68db){return db[_0x9edd('0x2f')]['find']({'where':{'id':_0x1ad198[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x54ac71,null))[_0x9edd('0x26')](function(_0x3cfd35){if(_0x3cfd35){var _0x195921=[];var _0x4786f8={'success':[],'errors':[]};return db[_0x9edd('0x5b')][_0x9edd('0x54')]()[_0x9edd('0x26')](function(_0x554241){if(_0x1ad198[_0x9edd('0x4d')][_0x9edd('0x5c')]&&_[_0x9edd('0x5d')](_0x1ad198[_0x9edd('0x4d')][_0x9edd('0x5c')])){if(_0x1ad198[_0x9edd('0x4d')][_0x9edd('0x5c')]['length']){_0x1ad198[_0x9edd('0x4d')][_0x9edd('0x5c')]=_0x1ad198['body'][_0x9edd('0x5c')][_0x9edd('0x5e')](';')+';';}else{_0x1ad198['body'][_0x9edd('0x5c')]=null;}}else{_0x1ad198[_0x9edd('0x4d')][_0x9edd('0x5c')]=null;}if(_0x1ad198['body']&&_[_0x9edd('0x5d')](_0x1ad198[_0x9edd('0x4d')])){for(var _0x3f04d3=0x0;_0x3f04d3<_0x1ad198['body']['length'];_0x3f04d3+=0x1){_0x1ad198['body'][_0x3f04d3]['ListId']=_0x1ad198[_0x9edd('0x48')]['id'];_0x195921[_0x9edd('0x5f')](_0x1ad198[_0x9edd('0x4d')][_0x3f04d3]);}return BPromise['each'](_0x195921,function(_0x53e141){return db['CmContact'][_0x9edd('0x4c')](_[_0x9edd('0x60')](_0x53e141,[_0x9edd('0x61'),'id'])||{},{'fields':_[_0x9edd('0x34')](_0x554241),'raw':!![]})[_0x9edd('0x26')](function(_0x18b25e){_0x4786f8[_0x9edd('0x62')][_0x9edd('0x5f')](_0x18b25e[_0x9edd('0x63')]);})[_0x9edd('0x46')](function(_0x2523b5){_0x4786f8[_0x9edd('0x64')]['push']({'data':_0x53e141,'error':_0x2523b5[_0x9edd('0x65')]});});})[_0x9edd('0x26')](function(_0x33b5dc){return _0x4786f8;})[_0x9edd('0x46')](function(_0x104afc){return _0x104afc;});}else{_0x54ac71[_0x9edd('0x1d')](0x190)[_0x9edd('0x1f')]({'message':_0x9edd('0x66')});}});}})['then'](respondWithResult(_0x54ac71,null))['catch'](handleError(_0x54ac71,null));};exports[_0x9edd('0x67')]=function(_0x4ec836,_0x35950b,_0x4a685e){var _0x21c35f;return db[_0x9edd('0x2f')]['find']({'where':{'id':_0x4ec836[_0x9edd('0x48')]['id']},'include':[{'model':db[_0x9edd('0x68')],'as':'CustomFields'}]})[_0x9edd('0x26')](handleEntityNotFound(_0x35950b,null))[_0x9edd('0x26')](function(_0x42d546){if(_0x42d546){_0x21c35f=_0x42d546;return db[_0x9edd('0x5b')][_0x9edd('0x30')];}})['then'](function(_0x33a077){if(_0x33a077){var _0x3ff07e={};var _0x3ec531={};_0x3ec531[_0x9edd('0x33')]=_[_0x9edd('0x69')](_['keys'](_0x33a077),_['map'](_0x21c35f['CustomFields'],function(_0x50316a){return util['format'](_0x9edd('0x6a'),_0x50316a['id']);}));_0x3ec531['query']=_['keys'](_0x4ec836[_0x9edd('0x35')]);_0x3ec531[_0x9edd('0x36')]=_[_0x9edd('0x37')](_0x3ec531[_0x9edd('0x33')],_0x3ec531[_0x9edd('0x35')]);_0x3ff07e[_0x9edd('0x38')]=_[_0x9edd('0x37')](_0x3ec531[_0x9edd('0x33')],qs[_0x9edd('0x39')](_0x4ec836[_0x9edd('0x35')]['fields']));_0x3ff07e[_0x9edd('0x38')]=_0x3ff07e[_0x9edd('0x38')][_0x9edd('0x49')]?_0x3ff07e[_0x9edd('0x38')]:_0x3ec531[_0x9edd('0x33')];if(!_0x4ec836[_0x9edd('0x35')][_0x9edd('0x3a')](_0x9edd('0x3b'))){_0x3ff07e['limit']=qs['limit'](_0x4ec836[_0x9edd('0x35')][_0x9edd('0x3c')]);_0x3ff07e[_0x9edd('0x21')]=qs[_0x9edd('0x21')](_0x4ec836[_0x9edd('0x35')][_0x9edd('0x21')]);}_0x3ff07e[_0x9edd('0x3d')]=qs[_0x9edd('0x3e')](_0x4ec836[_0x9edd('0x35')][_0x9edd('0x3e')]);_0x3ff07e[_0x9edd('0x3f')]=qs[_0x9edd('0x36')](_[_0x9edd('0x40')](_0x4ec836[_0x9edd('0x35')],_0x3ec531['filters']));_0x3ff07e[_0x9edd('0x6b')]=!![];if(_0x4ec836[_0x9edd('0x35')]['filter']){_0x3ff07e[_0x9edd('0x3f')]=_[_0x9edd('0x42')](_0x3ff07e[_0x9edd('0x3f')],{'$or':_[_0x9edd('0x2e')](_0x3ff07e['attributes'],function(_0x3429b6){var _0x398c34={};_0x398c34[_0x3429b6]={'$like':'%'+_0x4ec836[_0x9edd('0x35')][_0x9edd('0x41')]+'%'};return _0x398c34;})});}_0x3ff07e=_[_0x9edd('0x42')]({},_0x3ff07e,_0x4ec836['options']);return _0x21c35f[_0x9edd('0x67')](_0x3ff07e);}})[_0x9edd('0x26')](respondWithResult(_0x35950b,null))[_0x9edd('0x46')](handleError(_0x35950b,null));};exports[_0x9edd('0x6c')]=function(_0xa8d944,_0x59927d,_0x4d0734){var _0x2f8ce1;return db['CmList'][_0x9edd('0x4b')]({'where':{'id':_0xa8d944['params']['id']},'include':[{'model':db[_0x9edd('0x68')],'as':_0x9edd('0x6d')}]})[_0x9edd('0x26')](handleEntityNotFound(_0x59927d,null))[_0x9edd('0x26')](function(_0x2c7245){if(_0x2c7245){_0x2f8ce1=_0x2c7245;return db[_0x9edd('0x5b')]['rawAttributes'];}})[_0x9edd('0x26')](function(_0x33beb7){if(_0x33beb7){var _0x3aae72={};var _0x39d6dd={};_0x39d6dd[_0x9edd('0x33')]=_[_0x9edd('0x69')](_[_0x9edd('0x34')](_0x33beb7),_[_0x9edd('0x2e')](_0x2f8ce1['CustomFields'],function(_0x195088){return util[_0x9edd('0x6e')](_0x9edd('0x6a'),_0x195088['id']);}));_0x39d6dd[_0x9edd('0x35')]=_[_0x9edd('0x34')](_0xa8d944[_0x9edd('0x35')]);_0x39d6dd[_0x9edd('0x36')]=_[_0x9edd('0x37')](_0x39d6dd[_0x9edd('0x33')],_0x39d6dd[_0x9edd('0x35')]);_0x3aae72[_0x9edd('0x38')]=_[_0x9edd('0x37')](_0x39d6dd[_0x9edd('0x33')],qs[_0x9edd('0x39')](_0xa8d944[_0x9edd('0x35')][_0x9edd('0x39')]));_0x3aae72[_0x9edd('0x38')]=_0x3aae72[_0x9edd('0x38')][_0x9edd('0x49')]?_0x3aae72[_0x9edd('0x38')]:_0x39d6dd[_0x9edd('0x33')];if(!_0xa8d944['query'][_0x9edd('0x3a')]('nolimit')){_0x3aae72['limit']=qs[_0x9edd('0x3c')](_0xa8d944[_0x9edd('0x35')][_0x9edd('0x3c')]);_0x3aae72[_0x9edd('0x21')]=qs[_0x9edd('0x21')](_0xa8d944[_0x9edd('0x35')][_0x9edd('0x21')]);}_0x3aae72[_0x9edd('0x3d')]=qs[_0x9edd('0x3e')](_0xa8d944[_0x9edd('0x35')]['sort']);_0x3aae72[_0x9edd('0x3f')]=qs[_0x9edd('0x36')](_['pick'](_0xa8d944['query'],_0x39d6dd[_0x9edd('0x36')]));_0x3aae72[_0x9edd('0x6b')]=!![];if(_0xa8d944[_0x9edd('0x35')][_0x9edd('0x41')]){_0x3aae72['where']=_['merge'](_0x3aae72[_0x9edd('0x3f')],{'$or':_['map'](_0x3aae72[_0x9edd('0x38')],function(_0x24a9d1){var _0x3e2404={};_0x3e2404[_0x24a9d1]={'$like':'%'+_0xa8d944['query']['filter']+'%'};return _0x3e2404;})});}_0x3aae72=_['merge']({},_0x3aae72,_0xa8d944[_0x9edd('0x43')]);return _0x2f8ce1[_0x9edd('0x67')](_0x3aae72);}})[_0x9edd('0x26')](function(_0x5bfbfd){if(!_[_0x9edd('0x6f')](_0x5bfbfd)){var _0x402574=toCsv(_0x5bfbfd);var _0x4f12b9=Date[_0x9edd('0x70')]();fs[_0x9edd('0x71')](util['format']('/tmp/list_%d_%s.csv',_0x2f8ce1['id'],_0x4f12b9),_0x402574);_0x59927d[_0x9edd('0x72')](_0x9edd('0x73'),'attachment;\x20filename='+util[_0x9edd('0x6e')](_0x9edd('0x74'),_0x2f8ce1['id'],_0x4f12b9));_0x59927d['setHeader'](_0x9edd('0x75'),'text/csv');return _0x59927d[_0x9edd('0x76')](util[_0x9edd('0x6e')](_0x9edd('0x77'),_0x2f8ce1['id'],_0x4f12b9));}else{return _0x59927d[_0x9edd('0x1c')](0xcc);}})[_0x9edd('0x46')](handleError(_0x59927d,null));};exports[_0x9edd('0x78')]=function(_0x58bc3c,_0x2fe810,_0x22aa2b){var _0x68047e;delete _0x58bc3c['body']['id'];return db[_0x9edd('0x2f')]['findOne']({'where':{'id':_0x58bc3c[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x2fe810,null))[_0x9edd('0x26')](function(_0x41b0ea){if(_0x41b0ea){return db['sequelize']['transaction'](function(_0x4e9242){return db[_0x9edd('0x68')][_0x9edd('0x4c')](_0x58bc3c[_0x9edd('0x4d')],{'transaction':_0x4e9242})['then'](function(_0x41a761){_0x68047e=_0x41a761;return _0x41b0ea[_0x9edd('0x79')](_0x41a761,{'transaction':_0x4e9242});})[_0x9edd('0x26')](function(){var _0xb66eaf={'type':db[_0x9edd('0x7a')][_0x9edd('0x7b')],'transaction':_0x4e9242};switch(_0x58bc3c['body']['type']){case _0x9edd('0x7c'):_0xb66eaf[_0x9edd('0x32')]=db[_0x9edd('0x7a')]['TEXT'];break;case _0x9edd('0x7d'):_0xb66eaf[_0x9edd('0x32')]=db[_0x9edd('0x7a')][_0x9edd('0x7e')];break;case'switch':_0xb66eaf[_0x9edd('0x32')]=db['Sequelize'][_0x9edd('0x7f')];_0xb66eaf[_0x9edd('0x80')]=![];break;default:}return db[_0x9edd('0x81')][_0x9edd('0x82')][_0x9edd('0x83')]('cm_contacts',util[_0x9edd('0x6e')]('cf_%s',_0x68047e['id']),_0xb66eaf);})[_0x9edd('0x26')](function(){return _0x68047e;});});}})['then'](respondWithResult(_0x2fe810,null))[_0x9edd('0x46')](handleError(_0x2fe810,null));};exports['getCustomFields']=function(_0x363c5c,_0x96e3d7,_0x3bc495){var _0x575377={};var _0x244dce={};var _0x7512ea;var _0x1c5038;return db[_0x9edd('0x2f')][_0x9edd('0x84')]({'where':{'id':_0x363c5c[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x96e3d7,null))[_0x9edd('0x26')](function(_0x365b27){if(_0x365b27){_0x7512ea=_0x365b27;_0x244dce[_0x9edd('0x33')]=_[_0x9edd('0x34')](db[_0x9edd('0x68')][_0x9edd('0x30')]);_0x244dce[_0x9edd('0x35')]=_[_0x9edd('0x34')](_0x363c5c[_0x9edd('0x35')]);_0x244dce[_0x9edd('0x36')]=_[_0x9edd('0x37')](_0x244dce[_0x9edd('0x33')],_0x244dce[_0x9edd('0x35')]);_0x575377[_0x9edd('0x38')]=_[_0x9edd('0x37')](_0x244dce['model'],qs[_0x9edd('0x39')](_0x363c5c['query'][_0x9edd('0x39')]));_0x575377[_0x9edd('0x38')]=_0x575377[_0x9edd('0x38')][_0x9edd('0x49')]?_0x575377[_0x9edd('0x38')]:_0x244dce['model'];_0x575377[_0x9edd('0x3d')]=qs['sort'](_0x363c5c[_0x9edd('0x35')][_0x9edd('0x3e')]);_0x575377[_0x9edd('0x3f')]=qs[_0x9edd('0x36')](_[_0x9edd('0x40')](_0x363c5c[_0x9edd('0x35')],_0x244dce['filters']));_0x575377[_0x9edd('0x3f')]=_[_0x9edd('0x42')](_0x575377['where'],{'$or':[{'ListId':_0x365b27['id']},{'ListId':null}]});if(_0x363c5c['query']['filter']){_0x575377['where']=_[_0x9edd('0x42')](_0x575377[_0x9edd('0x3f')],{'$or':_[_0x9edd('0x2e')](_0x575377[_0x9edd('0x38')],function(_0x239774){var _0x229a92={};_0x229a92[_0x239774]={'$like':'%'+_0x363c5c[_0x9edd('0x35')][_0x9edd('0x41')]+'%'};return _0x229a92;})});}_0x575377=_[_0x9edd('0x42')]({},_0x575377,_0x363c5c[_0x9edd('0x43')]);return db['CmCustomField'][_0x9edd('0x85')](_0x575377);}})['then'](respondWithResult(_0x96e3d7,null))['catch'](handleError(_0x96e3d7,null));};exports[_0x9edd('0x86')]=function(_0x2dafd2,_0x35e9b9,_0x42a142){return db[_0x9edd('0x2f')]['find']({'where':{'id':_0x2dafd2[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x35e9b9,null))[_0x9edd('0x26')](function(_0x181469){if(_0x181469){return _0x181469['addAgents'](_0x2dafd2[_0x9edd('0x4d')][_0x9edd('0x61')],_[_0x9edd('0x60')](_0x2dafd2[_0x9edd('0x4d')],[_0x9edd('0x61'),'id'])||{})[_0x9edd('0x87')](function(_0x55052b){for(var _0x9ff2d3=0x0;_0x9ff2d3<_0x2dafd2[_0x9edd('0x4d')][_0x9edd('0x61')][_0x9edd('0x49')];_0x9ff2d3+=0x1){socket['emit'](_0x9edd('0x88'),{'UserId':_0x2dafd2[_0x9edd('0x4d')][_0x9edd('0x61')][_0x9ff2d3],'CmListId':_0x2dafd2[_0x9edd('0x48')]['id']});}return _0x55052b;});}})[_0x9edd('0x26')](respondWithResult(_0x35e9b9,null))[_0x9edd('0x46')](handleError(_0x35e9b9,null));};exports[_0x9edd('0x89')]=function(_0x39e3b3,_0x4a3955,_0x4a19a0){return db['CmList'][_0x9edd('0x4b')]({'where':{'id':_0x39e3b3[_0x9edd('0x48')]['id']}})[_0x9edd('0x26')](handleEntityNotFound(_0x4a3955,null))[_0x9edd('0x26')](function(_0x223c42){if(_0x223c42){return _0x223c42[_0x9edd('0x89')](_0x39e3b3[_0x9edd('0x35')][_0x9edd('0x61')])[_0x9edd('0x26')](function(){if(_[_0x9edd('0x5d')](_0x39e3b3['query'][_0x9edd('0x61')])){for(var _0x56dc7e=0x0;_0x56dc7e<_0x39e3b3['query'][_0x9edd('0x61')][_0x9edd('0x49')];_0x56dc7e+=0x1){socket[_0x9edd('0x8a')]('userCmList:remove',{'UserId':Number(_0x39e3b3['query']['ids'][_0x56dc7e]),'CmListId':Number(_0x39e3b3['params']['id'])});}}else{socket['emit'](_0x9edd('0x8b'),{'UserId':Number(_0x39e3b3[_0x9edd('0x35')][_0x9edd('0x61')]),'CmListId':Number(_0x39e3b3['params']['id'])});}});}})[_0x9edd('0x26')](respondWithStatusCode(_0x4a3955,null))[_0x9edd('0x46')](handleError(_0x4a3955,null));};exports[_0x9edd('0x8c')]=function(_0x557156,_0x2c2f00,_0x4afe0b){var _0x16a1c8={};var _0x1a2376={};var _0xc84fb7;var _0x259d33;return db['CmList'][_0x9edd('0x84')]({'where':{'id':_0x557156[_0x9edd('0x48')]['id']}})['then'](handleEntityNotFound(_0x2c2f00,null))[_0x9edd('0x26')](function(_0x36e825){if(_0x36e825){_0xc84fb7=_0x36e825;_0x1a2376[_0x9edd('0x33')]=_[_0x9edd('0x34')](db['User'][_0x9edd('0x30')]);_0x1a2376[_0x9edd('0x35')]=_[_0x9edd('0x34')](_0x557156[_0x9edd('0x35')]);_0x1a2376[_0x9edd('0x36')]=_[_0x9edd('0x37')](_0x1a2376[_0x9edd('0x33')],_0x1a2376['query']);_0x16a1c8[_0x9edd('0x38')]=_['intersection'](_0x1a2376[_0x9edd('0x33')],qs[_0x9edd('0x39')](_0x557156['query'][_0x9edd('0x39')]));_0x16a1c8[_0x9edd('0x38')]=_0x16a1c8[_0x9edd('0x38')]['length']?_0x16a1c8[_0x9edd('0x38')]:_0x1a2376[_0x9edd('0x33')];_0x16a1c8[_0x9edd('0x3d')]=qs['sort'](_0x557156[_0x9edd('0x35')]['sort']);_0x16a1c8[_0x9edd('0x3f')]=qs[_0x9edd('0x36')](_[_0x9edd('0x40')](_0x557156[_0x9edd('0x35')],_0x1a2376['filters']));if(_0x557156['query'][_0x9edd('0x41')]){_0x16a1c8[_0x9edd('0x3f')]=_[_0x9edd('0x42')](_0x16a1c8[_0x9edd('0x3f')],{'$or':_[_0x9edd('0x2e')](_0x16a1c8['attributes'],function(_0x1a1938){var _0x235762={};_0x235762[_0x1a1938]={'$like':'%'+_0x557156[_0x9edd('0x35')][_0x9edd('0x41')]+'%'};return _0x235762;})});}_0x16a1c8=_[_0x9edd('0x42')]({},_0x16a1c8,_0x557156[_0x9edd('0x43')]);return _0xc84fb7[_0x9edd('0x8c')](_0x16a1c8);}})[_0x9edd('0x26')](function(_0x3173fa){if(_0x3173fa){_0x259d33=_0x3173fa[_0x9edd('0x49')];if(!_0x557156[_0x9edd('0x35')][_0x9edd('0x3a')](_0x9edd('0x3b'))){_0x16a1c8['limit']=qs[_0x9edd('0x3c')](_0x557156[_0x9edd('0x35')][_0x9edd('0x3c')]);_0x16a1c8[_0x9edd('0x21')]=qs['offset'](_0x557156[_0x9edd('0x35')][_0x9edd('0x21')]);}return _0xc84fb7[_0x9edd('0x8c')](_0x16a1c8);}})['then'](function(_0x910adf){if(_0x910adf){return _0x910adf?{'count':_0x259d33,'rows':_0x910adf}:null;}})['then'](respondWithResult(_0x2c2f00,null))['catch'](handleError(_0x2c2f00,null));};
\ No newline at end of file
+var _0xe706=['cf_%s','getCustomFields','findAndCountAll','addAgents','omit','spread','userCmList:save','removeAgents','emit','userCmList:remove','getAgents','User','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','then','Lists','destroy','sendStatus','error','stack','name','send','index','CmList','rawAttributes','type','key','map','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','count','include','findAll','show','params','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','ListId','Disposition','getDispositions','findOne','order','includeAll','rows','removeDispositions','ids','addContacts','tags','isArray','each','CmContact','push','dataValues','errors','message','Malformed\x20request\x20syntax','getContacts','CmCustomField','concat','CustomFields','format','raw','getContactsCsv','cf_%d','isEmpty','now','/tmp/list_%d_%s.csv','setHeader','Content-disposition','attachment;\x20filename=','list_%d_%s.csv','addCustomField','sequelize','transaction','Sequelize','TEXT','number','INTEGER','BOOLEAN','defaultValue','queryInterface','addColumn','cm_contacts'];(function(_0x5b3e28,_0x2ad693){var _0x21a6f4=function(_0xea4216){while(--_0xea4216){_0x5b3e28['push'](_0x5b3e28['shift']());}};_0x21a6f4(++_0x2ad693);}(_0xe706,0xa3));var _0x6e70=function(_0x1e9dd1,_0x2e180a){_0x1e9dd1=_0x1e9dd1-0x0;var _0x1752dc=_0xe706[_0x1e9dd1];return _0x1752dc;};'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 as=require(_0x6e70('0x17'));var hardwareService=require(_0x6e70('0x18'));var logger=require(_0x6e70('0x19'))('api');var utils=require('../../config/utils');var config=require(_0x6e70('0x1a'));var db=require(_0x6e70('0x1b'))['db'];config[_0x6e70('0x1c')]=_[_0x6e70('0x1d')](config[_0x6e70('0x1c')],{'host':_0x6e70('0x1e'),'port':0x18eb});var socket=require(_0x6e70('0x1f'))(new Redis(config[_0x6e70('0x1c')]));require('./cmList.socket')['register'](socket);function respondWithStatusCode(_0x48bc72,_0x257e81){_0x257e81=_0x257e81||0xcc;return function(_0x5a37a6){if(_0x5a37a6){return _0x48bc72['sendStatus'](_0x257e81);}return _0x48bc72[_0x6e70('0x20')](_0x257e81)[_0x6e70('0x21')]();};}function respondWithResult(_0x5d9263,_0x24f3ac){_0x24f3ac=_0x24f3ac||0xc8;return function(_0x5c3fe7){if(_0x5c3fe7){return _0x5d9263[_0x6e70('0x20')](_0x24f3ac)[_0x6e70('0x22')](_0x5c3fe7);}};}function respondWithFilteredResult(_0x4ca554,_0x49029f){return function(_0x3bd572){if(_0x3bd572){var _0x5ea7a5=_0x3bd572['count'],_0x28a21f=_0x49029f[_0x6e70('0x23')],_0x173afe=_0x49029f[_0x6e70('0x23')]+_0x49029f[_0x6e70('0x24')],_0x53acdc;if(_0x173afe>=_0x5ea7a5){_0x173afe=_0x5ea7a5;_0x53acdc=0xc8;}else{_0x53acdc=0xce;}_0x4ca554[_0x6e70('0x20')](_0x53acdc);return _0x4ca554[_0x6e70('0x25')](_0x6e70('0x26'),_0x28a21f+'-'+_0x173afe+'/'+_0x5ea7a5)[_0x6e70('0x22')](_0x3bd572);}return null;};}function patchUpdates(_0x44a49f){return function(_0x29326f){try{jsonpatch[_0x6e70('0x27')](_0x29326f,_0x44a49f,!![]);}catch(_0x4a0cfe){return BPromise[_0x6e70('0x28')](_0x4a0cfe);}return _0x29326f[_0x6e70('0x29')]();};}function saveUpdates(_0x27b294,_0x502b2d){return function(_0x3ccd87){if(_0x3ccd87){return _0x3ccd87[_0x6e70('0x2a')](_0x27b294)[_0x6e70('0x2b')](function(_0x50da2c){return _0x50da2c;});}return null;};}function removeEntity(_0x10fc91,_0x538b9c){return function(_0x50aec2){if(_0x50aec2){return _0x50aec2['destroy']()[_0x6e70('0x2b')](function(){var _0x19c5ae=_0x50aec2['get']({'plain':!![]});var _0x3ecdf1=_0x6e70('0x2c');return db['UserProfileResource'][_0x6e70('0x2d')]({'where':{'type':_0x3ecdf1,'resourceId':_0x19c5ae['id']}})[_0x6e70('0x2b')](function(){return _0x50aec2;});})[_0x6e70('0x2b')](function(){_0x10fc91['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2c4d37,_0x3af17f){return function(_0x83c836){if(!_0x83c836){_0x2c4d37[_0x6e70('0x2e')](0x194);}return _0x83c836;};}function handleError(_0x43fee0,_0x5d772a){_0x5d772a=_0x5d772a||0x1f4;return function(_0x1952ea){logger[_0x6e70('0x2f')](_0x1952ea[_0x6e70('0x30')]);if(_0x1952ea[_0x6e70('0x31')]){delete _0x1952ea[_0x6e70('0x31')];}_0x43fee0[_0x6e70('0x20')](_0x5d772a)[_0x6e70('0x32')](_0x1952ea);};}exports[_0x6e70('0x33')]=function(_0x3a0821,_0x3a5d30){var _0x4b1229={},_0x1b27d8={},_0x50d60b={'count':0x0,'rows':[]};var _0x259486=_['map'](db[_0x6e70('0x34')][_0x6e70('0x35')],function(_0x30fa0b){return{'name':_0x30fa0b['fieldName'],'type':_0x30fa0b[_0x6e70('0x36')][_0x6e70('0x37')]};});_0x1b27d8['model']=_[_0x6e70('0x38')](_0x259486,_0x6e70('0x31'));_0x1b27d8['query']=_[_0x6e70('0x39')](_0x3a0821[_0x6e70('0x3a')]);_0x1b27d8[_0x6e70('0x3b')]=_[_0x6e70('0x3c')](_0x1b27d8[_0x6e70('0x3d')],_0x1b27d8[_0x6e70('0x3a')]);_0x4b1229[_0x6e70('0x3e')]=_[_0x6e70('0x3c')](_0x1b27d8[_0x6e70('0x3d')],qs[_0x6e70('0x3f')](_0x3a0821['query'][_0x6e70('0x3f')]));_0x4b1229['attributes']=_0x4b1229[_0x6e70('0x3e')][_0x6e70('0x40')]?_0x4b1229[_0x6e70('0x3e')]:_0x1b27d8[_0x6e70('0x3d')];if(!_0x3a0821[_0x6e70('0x3a')][_0x6e70('0x41')](_0x6e70('0x42'))){_0x4b1229[_0x6e70('0x24')]=qs[_0x6e70('0x24')](_0x3a0821[_0x6e70('0x3a')][_0x6e70('0x24')]);_0x4b1229[_0x6e70('0x23')]=qs[_0x6e70('0x23')](_0x3a0821['query']['offset']);}_0x4b1229['order']=qs[_0x6e70('0x43')](_0x3a0821[_0x6e70('0x3a')][_0x6e70('0x43')]);_0x4b1229[_0x6e70('0x44')]=qs[_0x6e70('0x3b')](_[_0x6e70('0x45')](_0x3a0821['query'],_0x1b27d8[_0x6e70('0x3b')]));if(_0x3a0821[_0x6e70('0x3a')][_0x6e70('0x46')]){_0x4b1229[_0x6e70('0x44')]=_[_0x6e70('0x47')](_0x4b1229[_0x6e70('0x44')],{'$or':_[_0x6e70('0x38')](_0x259486,function(_0x16fc7d){if(_0x16fc7d['type']!==_0x6e70('0x48')){var _0x23e893={};_0x23e893[_0x16fc7d[_0x6e70('0x31')]]={'$like':'%'+_0x3a0821[_0x6e70('0x3a')][_0x6e70('0x46')]+'%'};return _0x23e893;}})});}_0x4b1229=_[_0x6e70('0x47')]({},_0x4b1229,_0x3a0821[_0x6e70('0x49')]);var _0x4a8adc={'where':_0x4b1229['where']};return db['CmList'][_0x6e70('0x4a')](_0x4a8adc)[_0x6e70('0x2b')](function(_0x83847b){_0x50d60b[_0x6e70('0x4a')]=_0x83847b;if(_0x3a0821[_0x6e70('0x3a')]['includeAll']){_0x4b1229[_0x6e70('0x4b')]=[{'all':!![]}];}return db[_0x6e70('0x34')][_0x6e70('0x4c')](_0x4b1229);})['then'](function(_0x544ad0){_0x50d60b['rows']=_0x544ad0;return _0x50d60b;})[_0x6e70('0x2b')](respondWithFilteredResult(_0x3a5d30,_0x4b1229))['catch'](handleError(_0x3a5d30,null));};exports[_0x6e70('0x4d')]=function(_0x39913a,_0x3fed21){var _0x75a90d={'raw':![],'where':{'id':_0x39913a[_0x6e70('0x4e')]['id']}},_0x59c87d={};_0x59c87d['model']=_[_0x6e70('0x39')](db[_0x6e70('0x34')][_0x6e70('0x35')]);_0x59c87d[_0x6e70('0x3a')]=_['keys'](_0x39913a[_0x6e70('0x3a')]);_0x59c87d[_0x6e70('0x3b')]=_[_0x6e70('0x3c')](_0x59c87d[_0x6e70('0x3d')],_0x59c87d[_0x6e70('0x3a')]);_0x75a90d[_0x6e70('0x3e')]=_[_0x6e70('0x3c')](_0x59c87d['model'],qs[_0x6e70('0x3f')](_0x39913a[_0x6e70('0x3a')][_0x6e70('0x3f')]));_0x75a90d[_0x6e70('0x3e')]=_0x75a90d[_0x6e70('0x3e')][_0x6e70('0x40')]?_0x75a90d[_0x6e70('0x3e')]:_0x59c87d['model'];if(_0x39913a[_0x6e70('0x3a')]['includeAll']){_0x75a90d[_0x6e70('0x4b')]=[{'all':!![]}];}_0x75a90d=_[_0x6e70('0x47')]({},_0x75a90d,_0x39913a['options']);return db['CmList'][_0x6e70('0x4f')](_0x75a90d)[_0x6e70('0x2b')](handleEntityNotFound(_0x3fed21,null))[_0x6e70('0x2b')](respondWithResult(_0x3fed21,null))['catch'](handleError(_0x3fed21,null));};exports['create']=function(_0x238ebb,_0x11ac3d){return db[_0x6e70('0x34')][_0x6e70('0x50')](_0x238ebb[_0x6e70('0x51')],{})[_0x6e70('0x2b')](function(_0x4ad5a9){var _0x756a5b=_0x238ebb[_0x6e70('0x52')][_0x6e70('0x53')]({'plain':!![]});if(!_0x756a5b)throw new Error(_0x6e70('0x54'));if(_0x756a5b[_0x6e70('0x55')]==='user'){var _0x4ae901=_0x4ad5a9[_0x6e70('0x53')]({'plain':!![]});var _0x2e3ea6=_0x6e70('0x2c');return db[_0x6e70('0x56')][_0x6e70('0x4f')]({'where':{'name':_0x2e3ea6,'userProfileId':_0x756a5b['userProfileId']},'raw':!![]})[_0x6e70('0x2b')](function(_0x232366){if(_0x232366&&_0x232366[_0x6e70('0x57')]===0x0){return db[_0x6e70('0x58')][_0x6e70('0x50')]({'name':_0x4ae901['name'],'resourceId':_0x4ae901['id'],'type':_0x232366[_0x6e70('0x31')],'sectionId':_0x232366['id']},{})[_0x6e70('0x2b')](function(){return _0x4ad5a9;});}else{return _0x4ad5a9;}})[_0x6e70('0x59')](function(_0x3fb0d3){logger[_0x6e70('0x2f')](_0x6e70('0x5a'),_0x3fb0d3);throw _0x3fb0d3;});}return _0x4ad5a9;})['then'](respondWithResult(_0x11ac3d,0xc9))[_0x6e70('0x59')](handleError(_0x11ac3d,null));};exports[_0x6e70('0x2a')]=function(_0x5c2396,_0x382fde){if(_0x5c2396[_0x6e70('0x51')]['id']){delete _0x5c2396['body']['id'];}return db[_0x6e70('0x34')][_0x6e70('0x4f')]({'where':{'id':_0x5c2396[_0x6e70('0x4e')]['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x382fde,null))[_0x6e70('0x2b')](saveUpdates(_0x5c2396['body'],null))[_0x6e70('0x2b')](respondWithResult(_0x382fde,null))[_0x6e70('0x59')](handleError(_0x382fde,null));};exports[_0x6e70('0x2d')]=function(_0x13be81,_0x1c02d7){return db[_0x6e70('0x34')][_0x6e70('0x4f')]({'where':{'id':_0x13be81[_0x6e70('0x4e')]['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x1c02d7,null))[_0x6e70('0x2b')](removeEntity(_0x1c02d7,null))[_0x6e70('0x59')](handleError(_0x1c02d7,null));};exports[_0x6e70('0x5b')]=function(_0xb8f78,_0x1fd9a6){return db[_0x6e70('0x34')][_0x6e70('0x5b')]()[_0x6e70('0x2b')](respondWithResult(_0x1fd9a6,null))[_0x6e70('0x59')](handleError(_0x1fd9a6,null));};exports[_0x6e70('0x5c')]=function(_0x1c7dca,_0x4c6aab,_0x28898a){if(_0x1c7dca[_0x6e70('0x51')]['id']){delete _0x1c7dca[_0x6e70('0x51')]['id'];}return db[_0x6e70('0x34')][_0x6e70('0x4f')]({'where':{'id':_0x1c7dca[_0x6e70('0x4e')]['id']}})['then'](handleEntityNotFound(_0x4c6aab,null))[_0x6e70('0x2b')](function(_0x6cabf0){if(_0x6cabf0){_0x1c7dca['body'][_0x6e70('0x5d')]=_0x6cabf0['id'];return db[_0x6e70('0x5e')][_0x6e70('0x50')](_0x1c7dca['body']);}})['then'](respondWithResult(_0x4c6aab,null))[_0x6e70('0x59')](handleError(_0x4c6aab,null));};exports[_0x6e70('0x5f')]=function(_0x2d0203,_0x41a861,_0x10d299){var _0x739946={'raw':![],'where':{}};var _0x30cd88={};var _0x57bfe5={'count':0x0,'rows':[]};return db['CmList'][_0x6e70('0x60')]({'where':{'id':_0x2d0203[_0x6e70('0x4e')]['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x41a861,null))[_0x6e70('0x2b')](function(_0x5b1e6f){if(_0x5b1e6f){_0x30cd88['model']=_[_0x6e70('0x39')](db[_0x6e70('0x5e')]['rawAttributes']);_0x30cd88['query']=_[_0x6e70('0x39')](_0x2d0203['query']);_0x30cd88[_0x6e70('0x3b')]=_[_0x6e70('0x3c')](_0x30cd88[_0x6e70('0x3d')],_0x30cd88[_0x6e70('0x3a')]);_0x739946[_0x6e70('0x3e')]=_[_0x6e70('0x3c')](_0x30cd88[_0x6e70('0x3d')],qs[_0x6e70('0x3f')](_0x2d0203['query'][_0x6e70('0x3f')]));_0x739946[_0x6e70('0x3e')]=_0x739946[_0x6e70('0x3e')][_0x6e70('0x40')]?_0x739946[_0x6e70('0x3e')]:_0x30cd88['model'];if(!_0x2d0203['query']['hasOwnProperty'](_0x6e70('0x42'))){_0x739946[_0x6e70('0x24')]=qs[_0x6e70('0x24')](_0x2d0203['query']['limit']);_0x739946[_0x6e70('0x23')]=qs[_0x6e70('0x23')](_0x2d0203[_0x6e70('0x3a')][_0x6e70('0x23')]);}_0x739946[_0x6e70('0x61')]=qs[_0x6e70('0x43')](_0x2d0203['query'][_0x6e70('0x43')]);_0x739946[_0x6e70('0x44')]=qs[_0x6e70('0x3b')](_[_0x6e70('0x45')](_0x2d0203['query'],_0x30cd88[_0x6e70('0x3b')]));_0x739946['where']['ListId']=_0x5b1e6f['id'];if(_0x2d0203[_0x6e70('0x3a')][_0x6e70('0x46')]){_0x739946[_0x6e70('0x44')]=_[_0x6e70('0x47')](_0x739946[_0x6e70('0x44')],{'$or':_[_0x6e70('0x38')](_0x739946['attributes'],function(_0x370eeb){var _0x152003={};_0x152003[_0x370eeb]={'$like':'%'+_0x2d0203[_0x6e70('0x3a')][_0x6e70('0x46')]+'%'};return _0x152003;})});}_0x739946=_[_0x6e70('0x47')]({},_0x739946,_0x2d0203[_0x6e70('0x49')]);return db[_0x6e70('0x5e')][_0x6e70('0x4a')]({'where':_0x739946[_0x6e70('0x44')]})[_0x6e70('0x2b')](function(_0x575938){_0x57bfe5[_0x6e70('0x4a')]=_0x575938;if(_0x2d0203[_0x6e70('0x3a')][_0x6e70('0x62')]){_0x739946['include']=[{'all':!![]}];}return db['Disposition'][_0x6e70('0x4c')](_0x739946);})[_0x6e70('0x2b')](function(_0x25e685){_0x57bfe5[_0x6e70('0x63')]=_0x25e685;return _0x57bfe5;});}})[_0x6e70('0x2b')](respondWithFilteredResult(_0x41a861,_0x739946))['catch'](handleError(_0x41a861,null));};exports['removeDispositions']=function(_0xe0073f,_0x241a21,_0x56d4d9){return db[_0x6e70('0x34')][_0x6e70('0x4f')]({'where':{'id':_0xe0073f[_0x6e70('0x4e')]['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x241a21,null))[_0x6e70('0x2b')](function(_0x44bf96){if(_0x44bf96){return _0x44bf96[_0x6e70('0x64')](_0xe0073f[_0x6e70('0x3a')][_0x6e70('0x65')]);}})[_0x6e70('0x2b')](respondWithStatusCode(_0x241a21,null))[_0x6e70('0x59')](handleError(_0x241a21,null));};exports[_0x6e70('0x66')]=function(_0x2eb58b,_0x2473e8,_0x511658){return db['CmList'][_0x6e70('0x4f')]({'where':{'id':_0x2eb58b['params']['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x2473e8,null))['then'](function(_0x5b5471){if(_0x5b5471){var _0x402f6f=[];var _0x48e04b={'success':[],'errors':[]};return db['CmContact'][_0x6e70('0x5b')]()[_0x6e70('0x2b')](function(_0x3d1b42){if(_0x2eb58b['body']['tags']&&_['isArray'](_0x2eb58b[_0x6e70('0x51')]['tags'])){if(_0x2eb58b[_0x6e70('0x51')][_0x6e70('0x67')][_0x6e70('0x40')]){_0x2eb58b[_0x6e70('0x51')][_0x6e70('0x67')]=_0x2eb58b[_0x6e70('0x51')][_0x6e70('0x67')]['join'](';')+';';}else{_0x2eb58b[_0x6e70('0x51')][_0x6e70('0x67')]=null;}}else{_0x2eb58b[_0x6e70('0x51')]['tags']=null;}if(_0x2eb58b[_0x6e70('0x51')]&&_[_0x6e70('0x68')](_0x2eb58b[_0x6e70('0x51')])){for(var _0x267576=0x0;_0x267576<_0x2eb58b[_0x6e70('0x51')][_0x6e70('0x40')];_0x267576+=0x1){_0x2eb58b[_0x6e70('0x51')][_0x267576][_0x6e70('0x5d')]=_0x2eb58b[_0x6e70('0x4e')]['id'];_0x402f6f['push'](_0x2eb58b[_0x6e70('0x51')][_0x267576]);}return BPromise[_0x6e70('0x69')](_0x402f6f,function(_0x53acc8){return db[_0x6e70('0x6a')][_0x6e70('0x50')](_['omit'](_0x53acc8,['ids','id'])||{},{'fields':_[_0x6e70('0x39')](_0x3d1b42),'raw':!![]})['then'](function(_0x154c8a){_0x48e04b['success'][_0x6e70('0x6b')](_0x154c8a[_0x6e70('0x6c')]);})[_0x6e70('0x59')](function(_0x40eec7){_0x48e04b[_0x6e70('0x6d')][_0x6e70('0x6b')]({'data':_0x53acc8,'error':_0x40eec7[_0x6e70('0x6e')]});});})['then'](function(_0x4d6a09){return _0x48e04b;})[_0x6e70('0x59')](function(_0x4bf451){return _0x4bf451;});}else{_0x2473e8[_0x6e70('0x20')](0x190)[_0x6e70('0x22')]({'message':_0x6e70('0x6f')});}});}})[_0x6e70('0x2b')](respondWithResult(_0x2473e8,null))['catch'](handleError(_0x2473e8,null));};exports[_0x6e70('0x70')]=function(_0x5c30ce,_0x260dfa,_0x18a1be){var _0x21cd21;return db[_0x6e70('0x34')][_0x6e70('0x4f')]({'where':{'id':_0x5c30ce[_0x6e70('0x4e')]['id']},'include':[{'model':db[_0x6e70('0x71')],'as':'CustomFields'}]})[_0x6e70('0x2b')](handleEntityNotFound(_0x260dfa,null))['then'](function(_0x185599){if(_0x185599){_0x21cd21=_0x185599;return db['CmContact']['rawAttributes'];}})['then'](function(_0x1b4258){if(_0x1b4258){var _0x2179c9={};var _0x168209={};_0x168209[_0x6e70('0x3d')]=_[_0x6e70('0x72')](_['keys'](_0x1b4258),_[_0x6e70('0x38')](_0x21cd21[_0x6e70('0x73')],function(_0x48c30c){return util[_0x6e70('0x74')]('cf_%d',_0x48c30c['id']);}));_0x168209[_0x6e70('0x3a')]=_['keys'](_0x5c30ce['query']);_0x168209[_0x6e70('0x3b')]=_[_0x6e70('0x3c')](_0x168209[_0x6e70('0x3d')],_0x168209[_0x6e70('0x3a')]);_0x2179c9[_0x6e70('0x3e')]=_[_0x6e70('0x3c')](_0x168209[_0x6e70('0x3d')],qs['fields'](_0x5c30ce[_0x6e70('0x3a')]['fields']));_0x2179c9[_0x6e70('0x3e')]=_0x2179c9[_0x6e70('0x3e')][_0x6e70('0x40')]?_0x2179c9[_0x6e70('0x3e')]:_0x168209[_0x6e70('0x3d')];if(!_0x5c30ce[_0x6e70('0x3a')][_0x6e70('0x41')]('nolimit')){_0x2179c9[_0x6e70('0x24')]=qs['limit'](_0x5c30ce[_0x6e70('0x3a')][_0x6e70('0x24')]);_0x2179c9[_0x6e70('0x23')]=qs[_0x6e70('0x23')](_0x5c30ce[_0x6e70('0x3a')][_0x6e70('0x23')]);}_0x2179c9[_0x6e70('0x61')]=qs[_0x6e70('0x43')](_0x5c30ce[_0x6e70('0x3a')][_0x6e70('0x43')]);_0x2179c9['where']=qs[_0x6e70('0x3b')](_[_0x6e70('0x45')](_0x5c30ce[_0x6e70('0x3a')],_0x168209[_0x6e70('0x3b')]));_0x2179c9[_0x6e70('0x75')]=!![];if(_0x5c30ce['query']['filter']){_0x2179c9['where']=_[_0x6e70('0x47')](_0x2179c9[_0x6e70('0x44')],{'$or':_[_0x6e70('0x38')](_0x2179c9[_0x6e70('0x3e')],function(_0x3ef276){var _0x251111={};_0x251111[_0x3ef276]={'$like':'%'+_0x5c30ce[_0x6e70('0x3a')][_0x6e70('0x46')]+'%'};return _0x251111;})});}_0x2179c9=_[_0x6e70('0x47')]({},_0x2179c9,_0x5c30ce[_0x6e70('0x49')]);return _0x21cd21[_0x6e70('0x70')](_0x2179c9);}})[_0x6e70('0x2b')](respondWithResult(_0x260dfa,null))[_0x6e70('0x59')](handleError(_0x260dfa,null));};exports[_0x6e70('0x76')]=function(_0x3fcf78,_0x54abf9,_0x3a038a){var _0x223610;return db[_0x6e70('0x34')][_0x6e70('0x4f')]({'where':{'id':_0x3fcf78[_0x6e70('0x4e')]['id']},'include':[{'model':db[_0x6e70('0x71')],'as':'CustomFields'}]})['then'](handleEntityNotFound(_0x54abf9,null))[_0x6e70('0x2b')](function(_0x433c79){if(_0x433c79){_0x223610=_0x433c79;return db[_0x6e70('0x6a')][_0x6e70('0x35')];}})[_0x6e70('0x2b')](function(_0x213926){if(_0x213926){var _0x2ea4e9={};var _0x5f0cfb={};_0x5f0cfb[_0x6e70('0x3d')]=_['concat'](_[_0x6e70('0x39')](_0x213926),_[_0x6e70('0x38')](_0x223610[_0x6e70('0x73')],function(_0x3caa72){return util['format'](_0x6e70('0x77'),_0x3caa72['id']);}));_0x5f0cfb[_0x6e70('0x3a')]=_['keys'](_0x3fcf78[_0x6e70('0x3a')]);_0x5f0cfb['filters']=_[_0x6e70('0x3c')](_0x5f0cfb['model'],_0x5f0cfb['query']);_0x2ea4e9[_0x6e70('0x3e')]=_[_0x6e70('0x3c')](_0x5f0cfb[_0x6e70('0x3d')],qs['fields'](_0x3fcf78[_0x6e70('0x3a')][_0x6e70('0x3f')]));_0x2ea4e9['attributes']=_0x2ea4e9[_0x6e70('0x3e')][_0x6e70('0x40')]?_0x2ea4e9[_0x6e70('0x3e')]:_0x5f0cfb[_0x6e70('0x3d')];if(!_0x3fcf78[_0x6e70('0x3a')][_0x6e70('0x41')](_0x6e70('0x42'))){_0x2ea4e9[_0x6e70('0x24')]=qs[_0x6e70('0x24')](_0x3fcf78['query']['limit']);_0x2ea4e9[_0x6e70('0x23')]=qs['offset'](_0x3fcf78[_0x6e70('0x3a')][_0x6e70('0x23')]);}_0x2ea4e9['order']=qs[_0x6e70('0x43')](_0x3fcf78[_0x6e70('0x3a')][_0x6e70('0x43')]);_0x2ea4e9['where']=qs[_0x6e70('0x3b')](_[_0x6e70('0x45')](_0x3fcf78[_0x6e70('0x3a')],_0x5f0cfb[_0x6e70('0x3b')]));_0x2ea4e9[_0x6e70('0x75')]=!![];if(_0x3fcf78[_0x6e70('0x3a')][_0x6e70('0x46')]){_0x2ea4e9[_0x6e70('0x44')]=_[_0x6e70('0x47')](_0x2ea4e9[_0x6e70('0x44')],{'$or':_[_0x6e70('0x38')](_0x2ea4e9[_0x6e70('0x3e')],function(_0x5f41ae){var _0x5bcfcf={};_0x5bcfcf[_0x5f41ae]={'$like':'%'+_0x3fcf78[_0x6e70('0x3a')][_0x6e70('0x46')]+'%'};return _0x5bcfcf;})});}_0x2ea4e9=_[_0x6e70('0x47')]({},_0x2ea4e9,_0x3fcf78[_0x6e70('0x49')]);return _0x223610[_0x6e70('0x70')](_0x2ea4e9);}})['then'](function(_0x3296e9){if(!_[_0x6e70('0x78')](_0x3296e9)){var _0x2a5aed=toCsv(_0x3296e9);var _0x5e5b1f=Date[_0x6e70('0x79')]();fs['writeFileSync'](util['format'](_0x6e70('0x7a'),_0x223610['id'],_0x5e5b1f),_0x2a5aed);_0x54abf9[_0x6e70('0x7b')](_0x6e70('0x7c'),_0x6e70('0x7d')+util['format'](_0x6e70('0x7e'),_0x223610['id'],_0x5e5b1f));_0x54abf9[_0x6e70('0x7b')]('Content-type','text/csv');return _0x54abf9['download'](util[_0x6e70('0x74')](_0x6e70('0x7a'),_0x223610['id'],_0x5e5b1f));}else{return _0x54abf9[_0x6e70('0x2e')](0xcc);}})[_0x6e70('0x59')](handleError(_0x54abf9,null));};exports[_0x6e70('0x7f')]=function(_0xae1e83,_0x40c5c0,_0x5d5dc1){var _0x26e149;delete _0xae1e83[_0x6e70('0x51')]['id'];return db[_0x6e70('0x34')][_0x6e70('0x60')]({'where':{'id':_0xae1e83[_0x6e70('0x4e')]['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x40c5c0,null))[_0x6e70('0x2b')](function(_0x2badf5){if(_0x2badf5){return db[_0x6e70('0x80')][_0x6e70('0x81')](function(_0x1a2a44){return db[_0x6e70('0x71')]['create'](_0xae1e83[_0x6e70('0x51')],{'transaction':_0x1a2a44})[_0x6e70('0x2b')](function(_0x397289){_0x26e149=_0x397289;return _0x2badf5['addCustomFields'](_0x397289,{'transaction':_0x1a2a44});})[_0x6e70('0x2b')](function(){var _0x8264bb={'type':db[_0x6e70('0x82')][_0x6e70('0x83')],'transaction':_0x1a2a44};switch(_0xae1e83[_0x6e70('0x51')][_0x6e70('0x36')]){case'text':_0x8264bb['type']=db[_0x6e70('0x82')][_0x6e70('0x83')];break;case _0x6e70('0x84'):_0x8264bb[_0x6e70('0x36')]=db[_0x6e70('0x82')][_0x6e70('0x85')];break;case'switch':_0x8264bb[_0x6e70('0x36')]=db[_0x6e70('0x82')][_0x6e70('0x86')];_0x8264bb[_0x6e70('0x87')]=![];break;default:}return db[_0x6e70('0x80')][_0x6e70('0x88')][_0x6e70('0x89')](_0x6e70('0x8a'),util[_0x6e70('0x74')](_0x6e70('0x8b'),_0x26e149['id']),_0x8264bb);})[_0x6e70('0x2b')](function(){return _0x26e149;});});}})[_0x6e70('0x2b')](respondWithResult(_0x40c5c0,null))[_0x6e70('0x59')](handleError(_0x40c5c0,null));};exports[_0x6e70('0x8c')]=function(_0xc2eb8c,_0x1fc939,_0x3b9f61){var _0x4ca2f4={};var _0x4995fc={};var _0x35bd16;var _0xebb753;return db[_0x6e70('0x34')][_0x6e70('0x60')]({'where':{'id':_0xc2eb8c[_0x6e70('0x4e')]['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x1fc939,null))['then'](function(_0x8476fd){if(_0x8476fd){_0x35bd16=_0x8476fd;_0x4995fc['model']=_[_0x6e70('0x39')](db['CmCustomField'][_0x6e70('0x35')]);_0x4995fc['query']=_[_0x6e70('0x39')](_0xc2eb8c[_0x6e70('0x3a')]);_0x4995fc[_0x6e70('0x3b')]=_['intersection'](_0x4995fc[_0x6e70('0x3d')],_0x4995fc[_0x6e70('0x3a')]);_0x4ca2f4[_0x6e70('0x3e')]=_[_0x6e70('0x3c')](_0x4995fc[_0x6e70('0x3d')],qs[_0x6e70('0x3f')](_0xc2eb8c[_0x6e70('0x3a')]['fields']));_0x4ca2f4[_0x6e70('0x3e')]=_0x4ca2f4[_0x6e70('0x3e')]['length']?_0x4ca2f4[_0x6e70('0x3e')]:_0x4995fc[_0x6e70('0x3d')];_0x4ca2f4['order']=qs['sort'](_0xc2eb8c[_0x6e70('0x3a')]['sort']);_0x4ca2f4[_0x6e70('0x44')]=qs[_0x6e70('0x3b')](_[_0x6e70('0x45')](_0xc2eb8c[_0x6e70('0x3a')],_0x4995fc[_0x6e70('0x3b')]));_0x4ca2f4[_0x6e70('0x44')]=_[_0x6e70('0x47')](_0x4ca2f4[_0x6e70('0x44')],{'$or':[{'ListId':_0x8476fd['id']},{'ListId':null}]});if(_0xc2eb8c[_0x6e70('0x3a')][_0x6e70('0x46')]){_0x4ca2f4[_0x6e70('0x44')]=_[_0x6e70('0x47')](_0x4ca2f4[_0x6e70('0x44')],{'$or':_['map'](_0x4ca2f4[_0x6e70('0x3e')],function(_0x3fb786){var _0x2aa20a={};_0x2aa20a[_0x3fb786]={'$like':'%'+_0xc2eb8c[_0x6e70('0x3a')][_0x6e70('0x46')]+'%'};return _0x2aa20a;})});}_0x4ca2f4=_[_0x6e70('0x47')]({},_0x4ca2f4,_0xc2eb8c[_0x6e70('0x49')]);return db[_0x6e70('0x71')][_0x6e70('0x8d')](_0x4ca2f4);}})['then'](respondWithResult(_0x1fc939,null))[_0x6e70('0x59')](handleError(_0x1fc939,null));};exports[_0x6e70('0x8e')]=function(_0x349387,_0x49fd11,_0x88522){return db[_0x6e70('0x34')][_0x6e70('0x4f')]({'where':{'id':_0x349387[_0x6e70('0x4e')]['id']}})['then'](handleEntityNotFound(_0x49fd11,null))['then'](function(_0x20ac7e){if(_0x20ac7e){return _0x20ac7e['addAgents'](_0x349387['body'][_0x6e70('0x65')],_[_0x6e70('0x8f')](_0x349387[_0x6e70('0x51')],[_0x6e70('0x65'),'id'])||{})[_0x6e70('0x90')](function(_0x22827){for(var _0xf7e813=0x0;_0xf7e813<_0x349387[_0x6e70('0x51')][_0x6e70('0x65')][_0x6e70('0x40')];_0xf7e813+=0x1){socket['emit'](_0x6e70('0x91'),{'UserId':_0x349387[_0x6e70('0x51')][_0x6e70('0x65')][_0xf7e813],'CmListId':_0x349387[_0x6e70('0x4e')]['id']});}return _0x22827;});}})[_0x6e70('0x2b')](respondWithResult(_0x49fd11,null))[_0x6e70('0x59')](handleError(_0x49fd11,null));};exports[_0x6e70('0x92')]=function(_0xa9a209,_0x3c0e38,_0x372c3d){return db['CmList']['find']({'where':{'id':_0xa9a209['params']['id']}})['then'](handleEntityNotFound(_0x3c0e38,null))[_0x6e70('0x2b')](function(_0x12f155){if(_0x12f155){return _0x12f155[_0x6e70('0x92')](_0xa9a209['query'][_0x6e70('0x65')])['then'](function(){if(_[_0x6e70('0x68')](_0xa9a209['query']['ids'])){for(var _0xe4b9f8=0x0;_0xe4b9f8<_0xa9a209[_0x6e70('0x3a')][_0x6e70('0x65')][_0x6e70('0x40')];_0xe4b9f8+=0x1){socket[_0x6e70('0x93')](_0x6e70('0x94'),{'UserId':Number(_0xa9a209[_0x6e70('0x3a')]['ids'][_0xe4b9f8]),'CmListId':Number(_0xa9a209[_0x6e70('0x4e')]['id'])});}}else{socket[_0x6e70('0x93')]('userCmList:remove',{'UserId':Number(_0xa9a209[_0x6e70('0x3a')][_0x6e70('0x65')]),'CmListId':Number(_0xa9a209[_0x6e70('0x4e')]['id'])});}});}})['then'](respondWithStatusCode(_0x3c0e38,null))[_0x6e70('0x59')](handleError(_0x3c0e38,null));};exports[_0x6e70('0x95')]=function(_0x5516b9,_0x502927,_0x18f71f){var _0x303ae3={};var _0x747523={};var _0xe93f52;var _0x2943a6;return db['CmList']['findOne']({'where':{'id':_0x5516b9[_0x6e70('0x4e')]['id']}})[_0x6e70('0x2b')](handleEntityNotFound(_0x502927,null))[_0x6e70('0x2b')](function(_0x5dcc57){if(_0x5dcc57){_0xe93f52=_0x5dcc57;_0x747523[_0x6e70('0x3d')]=_[_0x6e70('0x39')](db[_0x6e70('0x96')][_0x6e70('0x35')]);_0x747523[_0x6e70('0x3a')]=_[_0x6e70('0x39')](_0x5516b9[_0x6e70('0x3a')]);_0x747523[_0x6e70('0x3b')]=_[_0x6e70('0x3c')](_0x747523[_0x6e70('0x3d')],_0x747523['query']);_0x303ae3[_0x6e70('0x3e')]=_[_0x6e70('0x3c')](_0x747523[_0x6e70('0x3d')],qs[_0x6e70('0x3f')](_0x5516b9['query'][_0x6e70('0x3f')]));_0x303ae3[_0x6e70('0x3e')]=_0x303ae3[_0x6e70('0x3e')]['length']?_0x303ae3[_0x6e70('0x3e')]:_0x747523[_0x6e70('0x3d')];_0x303ae3[_0x6e70('0x61')]=qs[_0x6e70('0x43')](_0x5516b9['query'][_0x6e70('0x43')]);_0x303ae3[_0x6e70('0x44')]=qs[_0x6e70('0x3b')](_[_0x6e70('0x45')](_0x5516b9[_0x6e70('0x3a')],_0x747523[_0x6e70('0x3b')]));if(_0x5516b9[_0x6e70('0x3a')][_0x6e70('0x46')]){_0x303ae3[_0x6e70('0x44')]=_[_0x6e70('0x47')](_0x303ae3['where'],{'$or':_['map'](_0x303ae3[_0x6e70('0x3e')],function(_0x3dec80){var _0x323887={};_0x323887[_0x3dec80]={'$like':'%'+_0x5516b9[_0x6e70('0x3a')][_0x6e70('0x46')]+'%'};return _0x323887;})});}_0x303ae3=_[_0x6e70('0x47')]({},_0x303ae3,_0x5516b9[_0x6e70('0x49')]);return _0xe93f52[_0x6e70('0x95')](_0x303ae3);}})[_0x6e70('0x2b')](function(_0x166244){if(_0x166244){_0x2943a6=_0x166244[_0x6e70('0x40')];if(!_0x5516b9[_0x6e70('0x3a')][_0x6e70('0x41')](_0x6e70('0x42'))){_0x303ae3[_0x6e70('0x24')]=qs['limit'](_0x5516b9[_0x6e70('0x3a')][_0x6e70('0x24')]);_0x303ae3[_0x6e70('0x23')]=qs['offset'](_0x5516b9[_0x6e70('0x3a')][_0x6e70('0x23')]);}return _0xe93f52[_0x6e70('0x95')](_0x303ae3);}})[_0x6e70('0x2b')](function(_0x3c7d2f){if(_0x3c7d2f){return _0x3c7d2f?{'count':_0x2943a6,'rows':_0x3c7d2f}:null;}})[_0x6e70('0x2b')](respondWithResult(_0x502927,null))['catch'](handleError(_0x502927,null));};
\ No newline at end of file
diff --git a/server/api/cmList/cmList.events.js b/server/api/cmList/cmList.events.js
index a01e0c5..d5a230f 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 _0xa391=['../../mysqldb','setMaxListeners','update','remove','emit','hasOwnProperty','events'];(function(_0x1460f6,_0x59051a){var _0x46ce94=function(_0x1c3ddf){while(--_0x1c3ddf){_0x1460f6['push'](_0x1460f6['shift']());}};_0x46ce94(++_0x59051a);}(_0xa391,0x110));var _0x1a39=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0xa391[_0x1969a7];return _0x3d665f;};'use strict';var EventEmitter=require(_0x1a39('0x0'));var CmList=require(_0x1a39('0x1'))['db']['CmList'];var CmListEvents=new EventEmitter();CmListEvents[_0x1a39('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1a39('0x3'),'afterDestroy':_0x1a39('0x4')};function emitEvent(_0x568721){return function(_0x2b4a2b,_0x1c4a6b,_0x359b29){CmListEvents[_0x1a39('0x5')](_0x568721+':'+_0x2b4a2b['id'],_0x2b4a2b);CmListEvents[_0x1a39('0x5')](_0x568721,_0x2b4a2b);_0x359b29(null);};}for(var e in events){if(events[_0x1a39('0x6')](e)){var event=events[e];CmList['hook'](e,emitEvent(event));}}module['exports']=CmListEvents;
\ No newline at end of file
+var _0xdc2f=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','CmList','save','update'];(function(_0x556b1d,_0xa0f67e){var _0x346381=function(_0x31a455){while(--_0x31a455){_0x556b1d['push'](_0x556b1d['shift']());}};_0x346381(++_0xa0f67e);}(_0xdc2f,0x1c7));var _0xfdc2=function(_0x10004e,_0xd701e6){_0x10004e=_0x10004e-0x0;var _0x5af990=_0xdc2f[_0x10004e];return _0x5af990;};'use strict';var EventEmitter=require(_0xfdc2('0x0'));var CmList=require(_0xfdc2('0x1'))['db'][_0xfdc2('0x2')];var CmListEvents=new EventEmitter();CmListEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xfdc2('0x3'),'afterUpdate':_0xfdc2('0x4'),'afterDestroy':_0xfdc2('0x5')};function emitEvent(_0x2b1cf8){return function(_0x16f9c6,_0xc047ea,_0x536223){CmListEvents['emit'](_0x2b1cf8+':'+_0x16f9c6['id'],_0x16f9c6);CmListEvents[_0xfdc2('0x6')](_0x2b1cf8,_0x16f9c6);_0x536223(null);};}for(var e in events){if(events[_0xfdc2('0x7')](e)){var event=events[e];CmList[_0xfdc2('0x8')](e,emitEvent(event));}}module[_0xfdc2('0x9')]=CmListEvents;
\ No newline at end of file
diff --git a/server/api/cmList/cmList.model.js b/server/api/cmList/cmList.model.js
index c0eaacc..cf0e4eb 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 _0xcc7c=['request-promise','rimraf','../../config/environment','./cmList.attributes','exports','define','CmList','cm_lists','util','../../config/logger','api','moment'];(function(_0x1d0948,_0x29a5ad){var _0x405614=function(_0x1ac2af){while(--_0x1ac2af){_0x1d0948['push'](_0x1d0948['shift']());}};_0x405614(++_0x29a5ad);}(_0xcc7c,0x134));var _0xccc7=function(_0x162dea,_0x418e88){_0x162dea=_0x162dea-0x0;var _0x418872=_0xcc7c[_0x162dea];return _0x418872;};'use strict';var _=require('lodash');var util=require(_0xccc7('0x0'));var logger=require(_0xccc7('0x1'))(_0xccc7('0x2'));var moment=require(_0xccc7('0x3'));var BPromise=require('bluebird');var rp=require(_0xccc7('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xccc7('0x5'));var config=require(_0xccc7('0x6'));var attributes=require(_0xccc7('0x7'));module[_0xccc7('0x8')]=function(_0x435d53,_0x55bb06){return _0x435d53[_0xccc7('0x9')](_0xccc7('0xa'),attributes,{'tableName':_0xccc7('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xaf2a=['api','bluebird','path','rimraf','../../config/environment','./cmList.attributes','exports','define','lodash','util','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xaf2a,0x1b5));var _0xaaf2=function(_0x1806d6,_0x10bd83){_0x1806d6=_0x1806d6-0x0;var _0x3c2fc3=_0xaf2a[_0x1806d6];return _0x3c2fc3;};'use strict';var _=require(_0xaaf2('0x0'));var util=require(_0xaaf2('0x1'));var logger=require(_0xaaf2('0x2'))(_0xaaf2('0x3'));var moment=require('moment');var BPromise=require(_0xaaf2('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xaaf2('0x5'));var rimraf=require(_0xaaf2('0x6'));var config=require(_0xaaf2('0x7'));var attributes=require(_0xaaf2('0x8'));module[_0xaaf2('0x9')]=function(_0x4c7cb2,_0x45ec04){return _0x4c7cb2[_0xaaf2('0xa')]('CmList',attributes,{'tableName':'cm_lists','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 ab41d71..4db165b 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 _0x5c2e=['info','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','redis','localhost','socket.io-emitter','./cmList.socket','then','CmList,\x20%s,\x20%s','CmList,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x5c2e,0x161));var _0xe5c2=function(_0x44268d,_0xad8443){_0x44268d=_0x44268d-0x0;var _0x4be92d=_0x5c2e[_0x44268d];return _0x4be92d;};'use strict';var _=require(_0xe5c2('0x0'));var util=require(_0xe5c2('0x1'));var moment=require(_0xe5c2('0x2'));var BPromise=require('bluebird');var rs=require(_0xe5c2('0x3'));var fs=require('fs');var Redis=require(_0xe5c2('0x4'));var db=require(_0xe5c2('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xe5c2('0x6'))(_0xe5c2('0x7'));var config=require(_0xe5c2('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xe5c2('0x9')]['http']({'port':0x232a});config[_0xe5c2('0xa')]=_['defaults'](config[_0xe5c2('0xa')],{'host':_0xe5c2('0xb'),'port':0x18eb});var socket=require(_0xe5c2('0xc'))(new Redis(config['redis']));require(_0xe5c2('0xd'))['register'](socket);function respondWithRpcPromise(_0x2c9a19,_0xa5c759,_0x357818){return new BPromise(function(_0x5bad59,_0x3980e9){return client['request'](_0x2c9a19,_0x357818)[_0xe5c2('0xe')](function(_0xe9710e){logger['info'](_0xe5c2('0xf'),_0xa5c759,'request\x20sent');logger['debug'](_0xe5c2('0x10'),_0xa5c759,_0xe5c2('0x11'),JSON[_0xe5c2('0x12')](_0xe9710e));if(_0xe9710e[_0xe5c2('0x13')]){if(_0xe9710e[_0xe5c2('0x13')][_0xe5c2('0x14')]===0x1f4){logger[_0xe5c2('0x13')](_0xe5c2('0xf'),_0xa5c759,_0xe9710e[_0xe5c2('0x13')][_0xe5c2('0x15')]);return _0x3980e9(_0xe9710e[_0xe5c2('0x13')]['message']);}logger['error'](_0xe5c2('0xf'),_0xa5c759,_0xe9710e['error'][_0xe5c2('0x15')]);return _0x5bad59(_0xe9710e['error']['message']);}else{logger[_0xe5c2('0x16')](_0xe5c2('0xf'),_0xa5c759,_0xe5c2('0x11'));_0x5bad59(_0xe9710e[_0xe5c2('0x17')][_0xe5c2('0x15')]);}})[_0xe5c2('0x18')](function(_0x381cec){logger[_0xe5c2('0x13')](_0xe5c2('0xf'),_0xa5c759,_0x381cec);_0x3980e9(_0x381cec);});});}
\ No newline at end of file
+var _0x1236=['randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','redis','defaults','./cmList.socket','request','then','request\x20sent','debug','CmList,\x20%s,\x20%s,\x20%s','stringify','error','code','CmList,\x20%s,\x20%s','message','info','result','lodash','util','moment','bluebird'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x1236,0xab));var _0x6123=function(_0x867b3a,_0x2fcc0d){_0x867b3a=_0x867b3a-0x0;var _0x2f0995=_0x1236[_0x867b3a];return _0x2f0995;};'use strict';var _=require(_0x6123('0x0'));var util=require(_0x6123('0x1'));var moment=require(_0x6123('0x2'));var BPromise=require(_0x6123('0x3'));var rs=require(_0x6123('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6123('0x5'))['db'];var utils=require(_0x6123('0x6'));var logger=require(_0x6123('0x7'))('rpc');var config=require(_0x6123('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x6123('0x9')]({'port':0x232a});config[_0x6123('0xa')]=_[_0x6123('0xb')](config[_0x6123('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x6123('0xa')]));require(_0x6123('0xc'))['register'](socket);function respondWithRpcPromise(_0x31d9a8,_0x15d66c,_0x42d8b9){return new BPromise(function(_0xe83225,_0x35fb21){return client[_0x6123('0xd')](_0x31d9a8,_0x42d8b9)[_0x6123('0xe')](function(_0x2dbd12){logger['info']('CmList,\x20%s,\x20%s',_0x15d66c,_0x6123('0xf'));logger[_0x6123('0x10')](_0x6123('0x11'),_0x15d66c,_0x6123('0xf'),JSON[_0x6123('0x12')](_0x2dbd12));if(_0x2dbd12['error']){if(_0x2dbd12[_0x6123('0x13')][_0x6123('0x14')]===0x1f4){logger[_0x6123('0x13')](_0x6123('0x15'),_0x15d66c,_0x2dbd12[_0x6123('0x13')]['message']);return _0x35fb21(_0x2dbd12[_0x6123('0x13')][_0x6123('0x16')]);}logger[_0x6123('0x13')]('CmList,\x20%s,\x20%s',_0x15d66c,_0x2dbd12[_0x6123('0x13')]['message']);return _0xe83225(_0x2dbd12['error'][_0x6123('0x16')]);}else{logger[_0x6123('0x17')](_0x6123('0x15'),_0x15d66c,_0x6123('0xf'));_0xe83225(_0x2dbd12[_0x6123('0x18')][_0x6123('0x16')]);}})['catch'](function(_0x2a2a30){logger['error'](_0x6123('0x15'),_0x15d66c,_0x2a2a30);_0x35fb21(_0x2a2a30);});});}
\ No newline at end of file
diff --git a/server/api/cmList/cmList.socket.js b/server/api/cmList/cmList.socket.js
index d51d690..c98ef1a 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 _0xce22=['removeListener','register','cmList:','./cmList.events','save','remove','update'];(function(_0x3ed075,_0xe81caf){var _0x268c87=function(_0xf584aa){while(--_0xf584aa){_0x3ed075['push'](_0x3ed075['shift']());}};_0x268c87(++_0xe81caf);}(_0xce22,0xea));var _0x2ce2=function(_0x492750,_0x1f9353){_0x492750=_0x492750-0x0;var _0x1f50bd=_0xce22[_0x492750];return _0x1f50bd;};'use strict';var CmListEvents=require(_0x2ce2('0x0'));var events=[_0x2ce2('0x1'),_0x2ce2('0x2'),_0x2ce2('0x3')];function createListener(_0x3a106f,_0x47de4a){return function(_0xd7b953){_0x47de4a['emit'](_0x3a106f,_0xd7b953);};}function removeListener(_0x26b273,_0x1801be){return function(){CmListEvents[_0x2ce2('0x4')](_0x26b273,_0x1801be);};}exports[_0x2ce2('0x5')]=function(_0x25110e){for(var _0x29f060=0x0,_0x6515b5=events['length'];_0x29f060<_0x6515b5;_0x29f060++){var _0x225737=events[_0x29f060];var _0x111f56=createListener(_0x2ce2('0x6')+_0x225737,_0x25110e);CmListEvents['on'](_0x225737,_0x111f56);}};
\ No newline at end of file
+var _0x8c79=['./cmList.events','emit','length'];(function(_0x5c67dd,_0x13dd6c){var _0x1bdb4b=function(_0x3f1967){while(--_0x3f1967){_0x5c67dd['push'](_0x5c67dd['shift']());}};_0x1bdb4b(++_0x13dd6c);}(_0x8c79,0xa8));var _0x98c7=function(_0x4bd374,_0x1b9051){_0x4bd374=_0x4bd374-0x0;var _0x4959a0=_0x8c79[_0x4bd374];return _0x4959a0;};'use strict';var CmListEvents=require(_0x98c7('0x0'));var events=['save','remove','update'];function createListener(_0x14ca25,_0x55824b){return function(_0x255cd6){_0x55824b[_0x98c7('0x1')](_0x14ca25,_0x255cd6);};}function removeListener(_0x5ecf19,_0x456fb6){return function(){CmListEvents['removeListener'](_0x5ecf19,_0x456fb6);};}exports['register']=function(_0x553d51){for(var _0x9e9609=0x0,_0x57b072=events[_0x98c7('0x2')];_0x9e9609<_0x57b072;_0x9e9609++){var _0x25dd4c=events[_0x9e9609];var _0x513208=createListener('cmList:'+_0x25dd4c,_0x553d51);CmListEvents['on'](_0x25dd4c,_0x513208);}};
\ No newline at end of file
diff --git a/server/api/cmList/index.js b/server/api/cmList/index.js
index 0618aa2..93edeba 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 _0xf340=['put','update','delete','exports','multer','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmList.controller','get','isAuthenticated','/describe','describe','/:id','show','getDispositions','/:id/contacts','getContacts','getContactsCsv','getCustomFields','getAgents','post','create','/:id/dispositions','addContacts','addCustomField','/:id/users','addAgents'];(function(_0x101e7b,_0x4ef05b){var _0x4995c0=function(_0x1a6488){while(--_0x1a6488){_0x101e7b['push'](_0x101e7b['shift']());}};_0x4995c0(++_0x4ef05b);}(_0xf340,0x1e4));var _0x0f34=function(_0x3e5d81,_0x3499e5){_0x3e5d81=_0x3e5d81-0x0;var _0xeb9f10=_0xf340[_0x3e5d81];return _0xeb9f10;};'use strict';var multer=require(_0x0f34('0x0'));var util=require('util');var path=require(_0x0f34('0x1'));var timeout=require(_0x0f34('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0x0f34('0x3'));var interaction=require(_0x0f34('0x4'));var config=require(_0x0f34('0x5'));var controller=require(_0x0f34('0x6'));router[_0x0f34('0x7')]('/',auth[_0x0f34('0x8')](),controller['index']);router['get'](_0x0f34('0x9'),auth[_0x0f34('0x8')](),controller[_0x0f34('0xa')]);router[_0x0f34('0x7')](_0x0f34('0xb'),auth['isAuthenticated'](),controller[_0x0f34('0xc')]);router[_0x0f34('0x7')]('/:id/dispositions',auth[_0x0f34('0x8')](),controller[_0x0f34('0xd')]);router['get'](_0x0f34('0xe'),auth[_0x0f34('0x8')](),controller[_0x0f34('0xf')]);router[_0x0f34('0x7')]('/:id/contacts/csv',auth[_0x0f34('0x8')](),controller[_0x0f34('0x10')]);router['get']('/:id/fields',auth[_0x0f34('0x8')](),controller[_0x0f34('0x11')]);router['get']('/:id/users',auth[_0x0f34('0x8')](),controller[_0x0f34('0x12')]);router[_0x0f34('0x13')]('/',auth['isAuthenticated'](),controller[_0x0f34('0x14')]);router[_0x0f34('0x13')](_0x0f34('0x15'),auth[_0x0f34('0x8')](),controller['addDisposition']);router[_0x0f34('0x13')](_0x0f34('0xe'),auth[_0x0f34('0x8')](),controller[_0x0f34('0x16')]);router[_0x0f34('0x13')]('/:id/fields',auth[_0x0f34('0x8')](),controller[_0x0f34('0x17')]);router[_0x0f34('0x13')](_0x0f34('0x18'),auth[_0x0f34('0x8')](),controller[_0x0f34('0x19')]);router[_0x0f34('0x1a')](_0x0f34('0xb'),auth[_0x0f34('0x8')](),controller[_0x0f34('0x1b')]);router[_0x0f34('0x1c')](_0x0f34('0xb'),auth[_0x0f34('0x8')](),controller['destroy']);router[_0x0f34('0x1c')]('/:id/dispositions',auth[_0x0f34('0x8')](),controller['removeDispositions']);router['delete'](_0x0f34('0x18'),auth[_0x0f34('0x8')](),controller['removeAgents']);module[_0x0f34('0x1d')]=router;
\ No newline at end of file
+var _0x66b3=['getAgents','post','create','addDisposition','/:id/users','addAgents','destroy','delete','removeDispositions','removeAgents','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','/:id','/:id/dispositions','getDispositions','/:id/contacts/csv','/:id/fields','getCustomFields'];(function(_0x4e3cf3,_0x1e7822){var _0x332bfe=function(_0x56bcd7){while(--_0x56bcd7){_0x4e3cf3['push'](_0x4e3cf3['shift']());}};_0x332bfe(++_0x1e7822);}(_0x66b3,0x19f));var _0x366b=function(_0x24c76d,_0x473c10){_0x24c76d=_0x24c76d-0x0;var _0x5093ca=_0x66b3[_0x24c76d];return _0x5093ca;};'use strict';var multer=require('multer');var util=require(_0x366b('0x0'));var path=require(_0x366b('0x1'));var timeout=require('connect-timeout');var express=require(_0x366b('0x2'));var router=express[_0x366b('0x3')]();var auth=require(_0x366b('0x4'));var interaction=require(_0x366b('0x5'));var config=require(_0x366b('0x6'));var controller=require('./cmList.controller');router[_0x366b('0x7')]('/',auth[_0x366b('0x8')](),controller[_0x366b('0x9')]);router[_0x366b('0x7')](_0x366b('0xa'),auth[_0x366b('0x8')](),controller['describe']);router[_0x366b('0x7')](_0x366b('0xb'),auth[_0x366b('0x8')](),controller['show']);router[_0x366b('0x7')](_0x366b('0xc'),auth['isAuthenticated'](),controller[_0x366b('0xd')]);router[_0x366b('0x7')]('/:id/contacts',auth[_0x366b('0x8')](),controller['getContacts']);router['get'](_0x366b('0xe'),auth[_0x366b('0x8')](),controller['getContactsCsv']);router['get'](_0x366b('0xf'),auth[_0x366b('0x8')](),controller[_0x366b('0x10')]);router[_0x366b('0x7')]('/:id/users',auth['isAuthenticated'](),controller[_0x366b('0x11')]);router[_0x366b('0x12')]('/',auth[_0x366b('0x8')](),controller[_0x366b('0x13')]);router[_0x366b('0x12')](_0x366b('0xc'),auth[_0x366b('0x8')](),controller[_0x366b('0x14')]);router[_0x366b('0x12')]('/:id/contacts',auth[_0x366b('0x8')](),controller['addContacts']);router['post'](_0x366b('0xf'),auth['isAuthenticated'](),controller['addCustomField']);router[_0x366b('0x12')](_0x366b('0x15'),auth['isAuthenticated'](),controller[_0x366b('0x16')]);router['put'](_0x366b('0xb'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x366b('0xb'),auth['isAuthenticated'](),controller[_0x366b('0x17')]);router[_0x366b('0x18')](_0x366b('0xc'),auth['isAuthenticated'](),controller[_0x366b('0x19')]);router[_0x366b('0x18')](_0x366b('0x15'),auth[_0x366b('0x8')](),controller[_0x366b('0x1a')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/condition/condition.attributes.js b/server/api/condition/condition.attributes.js
index ee64a4d..b31c095 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 _0x9957=['field','STRING','sequelize','exports','VIRTUAL'];(function(_0x4f263a,_0x33fe29){var _0x1d0179=function(_0x5b45f5){while(--_0x5b45f5){_0x4f263a['push'](_0x4f263a['shift']());}};_0x1d0179(++_0x33fe29);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'name':{'type':Sequelize[_0x7995('0x2')],'get':function(_0x10a05d){return this['getDataValue'](_0x7995('0x3'));}},'field':{'type':Sequelize[_0x7995('0x4')],'allowNull':![]},'operator':{'type':Sequelize[_0x7995('0x4')],'allowNull':![]},'value':{'type':Sequelize[_0x7995('0x4')],'allowNull':![]}};
\ No newline at end of file
+var _0xa9e0=['STRING','sequelize','exports','VIRTUAL','field'];(function(_0xa890e9,_0x46883c){var _0x5d2339=function(_0x2c54db){while(--_0x2c54db){_0xa890e9['push'](_0xa890e9['shift']());}};_0x5d2339(++_0x46883c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x9aada2,_0xd2d349){_0x9aada2=_0x9aada2-0x0;var _0x196dff=_0xa9e0[_0x9aada2];return _0x196dff;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')],'get':function(_0x5dd881){return this['getDataValue'](_0x0a9e('0x3'));}},'field':{'type':Sequelize['STRING'],'allowNull':![]},'operator':{'type':Sequelize[_0x0a9e('0x4')],'allowNull':![]},'value':{'type':Sequelize[_0x0a9e('0x4')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/condition/condition.controller.js b/server/api/condition/condition.controller.js
index 42ccbe4..2413ecb 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 _0xcdd6=['json','offset','limit','Content-Range','reject','update','then','destroy','error','stack','name','send','body','Condition','find','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status'];(function(_0x548707,_0x46409c){var _0x4666e2=function(_0x3fc3e5){while(--_0x3fc3e5){_0x548707['push'](_0x548707['shift']());}};_0x4666e2(++_0x46409c);}(_0xcdd6,0x1be));var _0x6cdd=function(_0x2a3a9e,_0x4db25c){_0x2a3a9e=_0x2a3a9e-0x0;var _0x31d900=_0xcdd6[_0x2a3a9e];return _0x31d900;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x6cdd('0x0'));var rimraf=require(_0x6cdd('0x1'));var zipdir=require(_0x6cdd('0x2'));var jsonpatch=require(_0x6cdd('0x3'));var rp=require('request-promise');var moment=require(_0x6cdd('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x6cdd('0x5'));var util=require(_0x6cdd('0x6'));var path=require(_0x6cdd('0x7'));var sox=require(_0x6cdd('0x8'));var csv=require(_0x6cdd('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x6cdd('0xa'));var squel=require('squel');var crypto=require(_0x6cdd('0xb'));var jsforce=require(_0x6cdd('0xc'));var deskjs=require(_0x6cdd('0xd'));var toCsv=require(_0x6cdd('0x9'));var querystring=require(_0x6cdd('0xe'));var Papa=require(_0x6cdd('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x6cdd('0x10'));var as=require(_0x6cdd('0x11'));var hardwareService=require(_0x6cdd('0x12'));var logger=require(_0x6cdd('0x13'))(_0x6cdd('0x14'));var utils=require(_0x6cdd('0x15'));var config=require(_0x6cdd('0x16'));var db=require(_0x6cdd('0x17'))['db'];function respondWithStatusCode(_0x5844ca,_0x5a68e1){_0x5a68e1=_0x5a68e1||0xcc;return function(_0x35a784){if(_0x35a784){return _0x5844ca[_0x6cdd('0x18')](_0x5a68e1);}return _0x5844ca['status'](_0x5a68e1)[_0x6cdd('0x19')]();};}function respondWithResult(_0x189989,_0x328e7a){_0x328e7a=_0x328e7a||0xc8;return function(_0x264748){if(_0x264748){return _0x189989[_0x6cdd('0x1a')](_0x328e7a)[_0x6cdd('0x1b')](_0x264748);}};}function respondWithFilteredResult(_0x212b9d,_0x10ab7c){return function(_0x104306){if(_0x104306){var _0x2b95d8=_0x104306['count'],_0x494280=_0x10ab7c[_0x6cdd('0x1c')],_0x33bb11=_0x10ab7c[_0x6cdd('0x1c')]+_0x10ab7c[_0x6cdd('0x1d')],_0x5a70c9;if(_0x33bb11>=_0x2b95d8){_0x33bb11=_0x2b95d8;_0x5a70c9=0xc8;}else{_0x5a70c9=0xce;}_0x212b9d[_0x6cdd('0x1a')](_0x5a70c9);return _0x212b9d['set'](_0x6cdd('0x1e'),_0x494280+'-'+_0x33bb11+'/'+_0x2b95d8)[_0x6cdd('0x1b')](_0x104306);}return null;};}function patchUpdates(_0xd349f0){return function(_0x3c6781){try{jsonpatch['apply'](_0x3c6781,_0xd349f0,!![]);}catch(_0x3617d5){return BPromise[_0x6cdd('0x1f')](_0x3617d5);}return _0x3c6781['save']();};}function saveUpdates(_0x49fd5a,_0x2efb7d){return function(_0x904758){if(_0x904758){return _0x904758[_0x6cdd('0x20')](_0x49fd5a)[_0x6cdd('0x21')](function(_0x2fb894){return _0x2fb894;});}return null;};}function removeEntity(_0x105fc6,_0x1fc6ee){return function(_0x100b82){if(_0x100b82){return _0x100b82[_0x6cdd('0x22')]()[_0x6cdd('0x21')](function(){_0x105fc6[_0x6cdd('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2707d8,_0x2a7e08){return function(_0x42c682){if(!_0x42c682){_0x2707d8[_0x6cdd('0x18')](0x194);}return _0x42c682;};}function handleError(_0x3fd9b8,_0xbe1d4b){_0xbe1d4b=_0xbe1d4b||0x1f4;return function(_0x52c533){logger[_0x6cdd('0x23')](_0x52c533[_0x6cdd('0x24')]);if(_0x52c533['name']){delete _0x52c533[_0x6cdd('0x25')];}_0x3fd9b8[_0x6cdd('0x1a')](_0xbe1d4b)[_0x6cdd('0x26')](_0x52c533);};}exports[_0x6cdd('0x20')]=function(_0x61b323,_0x5be983){if(_0x61b323[_0x6cdd('0x27')]['id']){delete _0x61b323[_0x6cdd('0x27')]['id'];}return db[_0x6cdd('0x28')][_0x6cdd('0x29')]({'where':{'id':_0x61b323[_0x6cdd('0x2a')]['id']}})[_0x6cdd('0x21')](handleEntityNotFound(_0x5be983,null))[_0x6cdd('0x21')](saveUpdates(_0x61b323[_0x6cdd('0x27')],null))['then'](respondWithResult(_0x5be983,null))['catch'](handleError(_0x5be983,null));};exports['destroy']=function(_0x20802c,_0x1b8c58){return db[_0x6cdd('0x28')][_0x6cdd('0x29')]({'where':{'id':_0x20802c['params']['id']}})[_0x6cdd('0x21')](handleEntityNotFound(_0x1b8c58,null))['then'](removeEntity(_0x1b8c58,null))['catch'](handleError(_0x1b8c58,null));};
\ No newline at end of file
+var _0xb9be=['../../mysqldb','count','offset','limit','status','set','Content-Range','json','apply','save','update','destroy','then','end','sendStatus','error','name','body','Condition','find','catch','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils'];(function(_0x5c9b7f,_0x10061f){var _0x5adb5f=function(_0xe5ec3d){while(--_0xe5ec3d){_0x5c9b7f['push'](_0x5c9b7f['shift']());}};_0x5adb5f(++_0x10061f);}(_0xb9be,0xc5));var _0xeb9b=function(_0x3e6d5d,_0x264c7a){_0x3e6d5d=_0x3e6d5d-0x0;var _0x238923=_0xb9be[_0x3e6d5d];return _0x238923;};'use strict';var pdf=require(_0xeb9b('0x0'));var emlformat=require(_0xeb9b('0x1'));var rimraf=require(_0xeb9b('0x2'));var zipdir=require(_0xeb9b('0x3'));var jsonpatch=require(_0xeb9b('0x4'));var rp=require(_0xeb9b('0x5'));var moment=require(_0xeb9b('0x6'));var BPromise=require(_0xeb9b('0x7'));var Mustache=require(_0xeb9b('0x8'));var util=require('util');var path=require('path');var sox=require(_0xeb9b('0x9'));var csv=require(_0xeb9b('0xa'));var ejs=require(_0xeb9b('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0xeb9b('0xc'));var crypto=require(_0xeb9b('0xd'));var jsforce=require(_0xeb9b('0xe'));var deskjs=require(_0xeb9b('0xf'));var toCsv=require(_0xeb9b('0xa'));var querystring=require(_0xeb9b('0x10'));var Papa=require(_0xeb9b('0x11'));var Redis=require(_0xeb9b('0x12'));var authService=require(_0xeb9b('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xeb9b('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xeb9b('0x15'));var utils=require(_0xeb9b('0x16'));var config=require('../../config/environment');var db=require(_0xeb9b('0x17'))['db'];function respondWithStatusCode(_0x1def58,_0x3df18a){_0x3df18a=_0x3df18a||0xcc;return function(_0x2a01df){if(_0x2a01df){return _0x1def58['sendStatus'](_0x3df18a);}return _0x1def58['status'](_0x3df18a)['end']();};}function respondWithResult(_0x355edb,_0x1ef03f){_0x1ef03f=_0x1ef03f||0xc8;return function(_0x2674e6){if(_0x2674e6){return _0x355edb['status'](_0x1ef03f)['json'](_0x2674e6);}};}function respondWithFilteredResult(_0x4f8182,_0x32538b){return function(_0x1a5f27){if(_0x1a5f27){var _0x406afd=_0x1a5f27[_0xeb9b('0x18')],_0x3fa308=_0x32538b['offset'],_0x2c9aa6=_0x32538b[_0xeb9b('0x19')]+_0x32538b[_0xeb9b('0x1a')],_0x10da6e;if(_0x2c9aa6>=_0x406afd){_0x2c9aa6=_0x406afd;_0x10da6e=0xc8;}else{_0x10da6e=0xce;}_0x4f8182[_0xeb9b('0x1b')](_0x10da6e);return _0x4f8182[_0xeb9b('0x1c')](_0xeb9b('0x1d'),_0x3fa308+'-'+_0x2c9aa6+'/'+_0x406afd)[_0xeb9b('0x1e')](_0x1a5f27);}return null;};}function patchUpdates(_0x21010e){return function(_0x3342c1){try{jsonpatch[_0xeb9b('0x1f')](_0x3342c1,_0x21010e,!![]);}catch(_0x26e312){return BPromise['reject'](_0x26e312);}return _0x3342c1[_0xeb9b('0x20')]();};}function saveUpdates(_0x5a7ffd,_0x5d5f54){return function(_0x580498){if(_0x580498){return _0x580498[_0xeb9b('0x21')](_0x5a7ffd)['then'](function(_0xbed5ce){return _0xbed5ce;});}return null;};}function removeEntity(_0x2dabb1,_0x37935c){return function(_0x37d7e0){if(_0x37d7e0){return _0x37d7e0[_0xeb9b('0x22')]()[_0xeb9b('0x23')](function(){_0x2dabb1[_0xeb9b('0x1b')](0xcc)[_0xeb9b('0x24')]();});}};}function handleEntityNotFound(_0x142d1c,_0x46df93){return function(_0x61c86d){if(!_0x61c86d){_0x142d1c[_0xeb9b('0x25')](0x194);}return _0x61c86d;};}function handleError(_0x1a4faf,_0xe6d3e1){_0xe6d3e1=_0xe6d3e1||0x1f4;return function(_0x2b2a14){logger[_0xeb9b('0x26')](_0x2b2a14['stack']);if(_0x2b2a14[_0xeb9b('0x27')]){delete _0x2b2a14['name'];}_0x1a4faf[_0xeb9b('0x1b')](_0xe6d3e1)['send'](_0x2b2a14);};}exports[_0xeb9b('0x21')]=function(_0x4361b9,_0x7e0134){if(_0x4361b9[_0xeb9b('0x28')]['id']){delete _0x4361b9['body']['id'];}return db[_0xeb9b('0x29')][_0xeb9b('0x2a')]({'where':{'id':_0x4361b9['params']['id']}})[_0xeb9b('0x23')](handleEntityNotFound(_0x7e0134,null))[_0xeb9b('0x23')](saveUpdates(_0x4361b9['body'],null))[_0xeb9b('0x23')](respondWithResult(_0x7e0134,null))[_0xeb9b('0x2b')](handleError(_0x7e0134,null));};exports[_0xeb9b('0x22')]=function(_0x48c5f4,_0x309bad){return db['Condition'][_0xeb9b('0x2a')]({'where':{'id':_0x48c5f4['params']['id']}})[_0xeb9b('0x23')](handleEntityNotFound(_0x309bad,null))['then'](removeEntity(_0x309bad,null))[_0xeb9b('0x2b')](handleError(_0x309bad,null));};
\ No newline at end of file
diff --git a/server/api/condition/condition.model.js b/server/api/condition/condition.model.js
index 425343d..b5c32d6 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 _0x61cd=['bluebird','request-promise','path','rimraf','./condition.attributes','exports','Condition','tools_conditions','util','../../config/logger','moment'];(function(_0x52ca4a,_0x2d2793){var _0x3d317d=function(_0x2febb2){while(--_0x2febb2){_0x52ca4a['push'](_0x52ca4a['shift']());}};_0x3d317d(++_0x2d2793);}(_0x61cd,0x1ec));var _0xd61c=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x61cd[_0x21a9d9];return _0x46adce;};'use strict';var _=require('lodash');var util=require(_0xd61c('0x0'));var logger=require(_0xd61c('0x1'))('api');var moment=require(_0xd61c('0x2'));var BPromise=require(_0xd61c('0x3'));var rp=require(_0xd61c('0x4'));var fs=require('fs');var path=require(_0xd61c('0x5'));var rimraf=require(_0xd61c('0x6'));var config=require('../../config/environment');var attributes=require(_0xd61c('0x7'));module[_0xd61c('0x8')]=function(_0x3184f4,_0x4e78d6){return _0x3184f4['define'](_0xd61c('0x9'),attributes,{'tableName':_0xd61c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x084f=['../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./condition.attributes','exports','define','Condition','tools_conditions'];(function(_0x4c7377,_0x2a68d0){var _0x28fdf6=function(_0x383065){while(--_0x383065){_0x4c7377['push'](_0x4c7377['shift']());}};_0x28fdf6(++_0x2a68d0);}(_0x084f,0x160));var _0xf084=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0x084f[_0x433a86];return _0x23000c;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xf084('0x0'))('api');var moment=require('moment');var BPromise=require(_0xf084('0x1'));var rp=require(_0xf084('0x2'));var fs=require('fs');var path=require(_0xf084('0x3'));var rimraf=require(_0xf084('0x4'));var config=require(_0xf084('0x5'));var attributes=require(_0xf084('0x6'));module[_0xf084('0x7')]=function(_0x1cf223,_0x562db5){return _0x1cf223[_0xf084('0x8')](_0xf084('0x9'),attributes,{'tableName':_0xf084('0xa'),'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 07fd980..2f3142f 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 _0xc5c6=['../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','request\x20sent','debug','error','code','message','Condition,\x20%s,\x20%s','result','catch','lodash','bluebird','randomstring','ioredis'];(function(_0x3fd0f3,_0x5763c6){var _0x4df1e9=function(_0x50b4ad){while(--_0x50b4ad){_0x3fd0f3['push'](_0x3fd0f3['shift']());}};_0x4df1e9(++_0x5763c6);}(_0xc5c6,0x161));var _0x6c5c=function(_0x1a7846,_0x59723e){_0x1a7846=_0x1a7846-0x0;var _0x48049=_0xc5c6[_0x1a7846];return _0x48049;};'use strict';var _=require(_0x6c5c('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x6c5c('0x1'));var rs=require(_0x6c5c('0x2'));var fs=require('fs');var Redis=require(_0x6c5c('0x3'));var db=require(_0x6c5c('0x4'))['db'];var utils=require(_0x6c5c('0x5'));var logger=require(_0x6c5c('0x6'))(_0x6c5c('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6c5c('0x8')][_0x6c5c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3f4123,_0x5d742e,_0x1b4cc6){return new BPromise(function(_0x10dc2d,_0x50b6ef){return client[_0x6c5c('0xa')](_0x3f4123,_0x1b4cc6)[_0x6c5c('0xb')](function(_0x4a4b5e){logger[_0x6c5c('0xc')]('Condition,\x20%s,\x20%s',_0x5d742e,_0x6c5c('0xd'));logger[_0x6c5c('0xe')]('Condition,\x20%s,\x20%s,\x20%s',_0x5d742e,_0x6c5c('0xd'),JSON['stringify'](_0x4a4b5e));if(_0x4a4b5e[_0x6c5c('0xf')]){if(_0x4a4b5e[_0x6c5c('0xf')][_0x6c5c('0x10')]===0x1f4){logger[_0x6c5c('0xf')]('Condition,\x20%s,\x20%s',_0x5d742e,_0x4a4b5e['error'][_0x6c5c('0x11')]);return _0x50b6ef(_0x4a4b5e[_0x6c5c('0xf')][_0x6c5c('0x11')]);}logger[_0x6c5c('0xf')](_0x6c5c('0x12'),_0x5d742e,_0x4a4b5e[_0x6c5c('0xf')][_0x6c5c('0x11')]);return _0x10dc2d(_0x4a4b5e['error']['message']);}else{logger[_0x6c5c('0xc')](_0x6c5c('0x12'),_0x5d742e,_0x6c5c('0xd'));_0x10dc2d(_0x4a4b5e[_0x6c5c('0x13')][_0x6c5c('0x11')]);}})[_0x6c5c('0x14')](function(_0x1fd013){logger['error'](_0x6c5c('0x12'),_0x5d742e,_0x1fd013);_0x50b6ef(_0x1fd013);});});}
\ No newline at end of file
+var _0xf25e=['request','then','info','Condition,\x20%s,\x20%s','request\x20sent','debug','Condition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x1d1779,_0x284147){var _0x2377e9=function(_0x299f6f){while(--_0x299f6f){_0x1d1779['push'](_0x1d1779['shift']());}};_0x2377e9(++_0x284147);}(_0xf25e,0xbc));var _0xef25=function(_0x3e8b71,_0x41dd0d){_0x3e8b71=_0x3e8b71-0x0;var _0x147a06=_0xf25e[_0x3e8b71];return _0x147a06;};'use strict';var _=require(_0xef25('0x0'));var util=require('util');var moment=require(_0xef25('0x1'));var BPromise=require(_0xef25('0x2'));var rs=require(_0xef25('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xef25('0x4'))['db'];var utils=require(_0xef25('0x5'));var logger=require(_0xef25('0x6'))(_0xef25('0x7'));var config=require('../../config/environment');var jayson=require(_0xef25('0x8'));var client=jayson[_0xef25('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1ee749,_0xa86bb,_0x5aff60){return new BPromise(function(_0x4276e4,_0x4d6a04){return client[_0xef25('0xa')](_0x1ee749,_0x5aff60)[_0xef25('0xb')](function(_0x37a329){logger[_0xef25('0xc')](_0xef25('0xd'),_0xa86bb,_0xef25('0xe'));logger[_0xef25('0xf')](_0xef25('0x10'),_0xa86bb,_0xef25('0xe'),JSON[_0xef25('0x11')](_0x37a329));if(_0x37a329[_0xef25('0x12')]){if(_0x37a329[_0xef25('0x12')][_0xef25('0x13')]===0x1f4){logger['error']('Condition,\x20%s,\x20%s',_0xa86bb,_0x37a329['error'][_0xef25('0x14')]);return _0x4d6a04(_0x37a329[_0xef25('0x12')][_0xef25('0x14')]);}logger[_0xef25('0x12')](_0xef25('0xd'),_0xa86bb,_0x37a329[_0xef25('0x12')][_0xef25('0x14')]);return _0x4276e4(_0x37a329[_0xef25('0x12')][_0xef25('0x14')]);}else{logger[_0xef25('0xc')](_0xef25('0xd'),_0xa86bb,_0xef25('0xe'));_0x4276e4(_0x37a329[_0xef25('0x15')][_0xef25('0x14')]);}})['catch'](function(_0x2ae983){logger[_0xef25('0x12')](_0xef25('0xd'),_0xa86bb,_0x2ae983);_0x4d6a04(_0x2ae983);});});}
\ No newline at end of file
diff --git a/server/api/condition/index.js b/server/api/condition/index.js
index f6e6796..1badfd3 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 _0x6145=['destroy','exports','multer','util','path','connect-timeout','express','Router','./condition.controller','put','/:id','isAuthenticated','update','delete'];(function(_0x2b1909,_0x314992){var _0x463c97=function(_0x5682f6){while(--_0x5682f6){_0x2b1909['push'](_0x2b1909['shift']());}};_0x463c97(++_0x314992);}(_0x6145,0x11a));var _0x5614=function(_0x1ed09d,_0x537888){_0x1ed09d=_0x1ed09d-0x0;var _0x517973=_0x6145[_0x1ed09d];return _0x517973;};'use strict';var multer=require(_0x5614('0x0'));var util=require(_0x5614('0x1'));var path=require(_0x5614('0x2'));var timeout=require(_0x5614('0x3'));var express=require(_0x5614('0x4'));var router=express[_0x5614('0x5')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x5614('0x6'));router[_0x5614('0x7')](_0x5614('0x8'),auth[_0x5614('0x9')](),controller[_0x5614('0xa')]);router[_0x5614('0xb')]('/:id',auth[_0x5614('0x9')](),controller[_0x5614('0xc')]);module[_0x5614('0xd')]=router;
\ No newline at end of file
+var _0x0e72=['delete','/:id','destroy','exports','multer','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./condition.controller','update'];(function(_0x3d7075,_0x3a34fc){var _0x3e8328=function(_0x325bbc){while(--_0x325bbc){_0x3d7075['push'](_0x3d7075['shift']());}};_0x3e8328(++_0x3a34fc);}(_0x0e72,0x148));var _0x20e7=function(_0x39af3a,_0x1f050b){_0x39af3a=_0x39af3a-0x0;var _0x4e7415=_0x0e72[_0x39af3a];return _0x4e7415;};'use strict';var multer=require(_0x20e7('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x20e7('0x1'));var express=require(_0x20e7('0x2'));var router=express[_0x20e7('0x3')]();var auth=require(_0x20e7('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x20e7('0x5'));var controller=require(_0x20e7('0x6'));router['put']('/:id',auth['isAuthenticated'](),controller[_0x20e7('0x7')]);router[_0x20e7('0x8')](_0x20e7('0x9'),auth['isAuthenticated'](),controller[_0x20e7('0xa')]);module[_0x20e7('0xb')]=router;
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.attributes.js b/server/api/dashboard/dashboard.attributes.js
index 7a9743f..37cd1fc 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 _0xaccc=['STRING','name','sequelize','exports'];(function(_0xb454ce,_0x5e6ef5){var _0x35881c=function(_0x92de44){while(--_0x92de44){_0xb454ce['push'](_0xb454ce['shift']());}};_0x35881c(++_0x5e6ef5);}(_0xaccc,0xda));var _0xcacc=function(_0x2601b4,_0x315e78){_0x2601b4=_0x2601b4-0x0;var _0x3e3661=_0xaccc[_0x2601b4];return _0x3e3661;};'use strict';var Sequelize=require(_0xcacc('0x0'));module[_0xcacc('0x1')]={'name':{'type':Sequelize[_0xcacc('0x2')],'allowNull':![],'unique':_0xcacc('0x3')},'description':{'type':Sequelize[_0xcacc('0x2')]}};
\ No newline at end of file
+var _0x55e2=['sequelize','exports','STRING'];(function(_0x4d7765,_0x2ec4bd){var _0x146c1a=function(_0x384776){while(--_0x384776){_0x4d7765['push'](_0x4d7765['shift']());}};_0x146c1a(++_0x2ec4bd);}(_0x55e2,0xd8));var _0x255e=function(_0x523098,_0x3e214a){_0x523098=_0x523098-0x0;var _0xcdf5e0=_0x55e2[_0x523098];return _0xcdf5e0;};'use strict';var Sequelize=require(_0x255e('0x0'));module[_0x255e('0x1')]={'name':{'type':Sequelize[_0x255e('0x2')],'allowNull':![],'unique':'name'},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js
index 634f5af..4bdd9f6 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 _0x422f=['jsforce','desk.js','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','localhost','socket.io-emitter','./dashboard.socket','register','status','offset','limit','set','json','reject','then','destroy','get','UserProfileResource','end','error','stack','name','send','Dashboard','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','where','VIRTUAL','filter','merge','count','includeAll','findAll','rows','catch','show','params','include','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','clone','omit','createdAt','updatedAt','body','CustomDashboards','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','iframe','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','counter','attrMetric','total','multibar-chart','pie-chart','attrSerie1','attrSerie2','attrSerie3','attrVoiceQueues','web-report','reportType','attrRefresh','widgetAttributes:\x20%s','stringify','addItem','DashboardId','DashboardItem','getItems','sort','map','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto'];(function(_0x1bdc70,_0x5141b2){var _0x5069cf=function(_0x41a902){while(--_0x41a902){_0x1bdc70['push'](_0x1bdc70['shift']());}};_0x5069cf(++_0x5141b2);}(_0x422f,0x1c7));var _0xf422=function(_0x896786,_0x11995d){_0x896786=_0x896786-0x0;var _0x41b274=_0x422f[_0x896786];return _0x41b274;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xf422('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xf422('0x1'));var jsonpatch=require(_0xf422('0x2'));var rp=require('request-promise');var moment=require(_0xf422('0x3'));var BPromise=require(_0xf422('0x4'));var Mustache=require(_0xf422('0x5'));var util=require(_0xf422('0x6'));var path=require(_0xf422('0x7'));var sox=require(_0xf422('0x8'));var csv=require(_0xf422('0x9'));var ejs=require(_0xf422('0xa'));var fs=require('fs');var _=require(_0xf422('0xb'));var squel=require('squel');var crypto=require(_0xf422('0xc'));var jsforce=require(_0xf422('0xd'));var deskjs=require(_0xf422('0xe'));var toCsv=require(_0xf422('0x9'));var querystring=require(_0xf422('0xf'));var Papa=require('papaparse');var Redis=require(_0xf422('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xf422('0x11'));var hardwareService=require(_0xf422('0x12'));var logger=require(_0xf422('0x13'))(_0xf422('0x14'));var utils=require(_0xf422('0x15'));var config=require('../../config/environment');var db=require(_0xf422('0x16'))['db'];config[_0xf422('0x17')]=_['defaults'](config[_0xf422('0x17')],{'host':_0xf422('0x18'),'port':0x18eb});var socket=require(_0xf422('0x19'))(new Redis(config[_0xf422('0x17')]));require(_0xf422('0x1a'))[_0xf422('0x1b')](socket);function respondWithStatusCode(_0x223b21,_0x272430){_0x272430=_0x272430||0xcc;return function(_0x2e6d81){if(_0x2e6d81){return _0x223b21['sendStatus'](_0x272430);}return _0x223b21['status'](_0x272430)['end']();};}function respondWithResult(_0x1c81e1,_0x30b70a){_0x30b70a=_0x30b70a||0xc8;return function(_0x21a35d){if(_0x21a35d){return _0x1c81e1[_0xf422('0x1c')](_0x30b70a)['json'](_0x21a35d);}};}function respondWithFilteredResult(_0x4134ee,_0x264964){return function(_0x76e4b1){if(_0x76e4b1){var _0x2ae133=_0x76e4b1['count'],_0x43de64=_0x264964[_0xf422('0x1d')],_0x29b0b1=_0x264964[_0xf422('0x1d')]+_0x264964[_0xf422('0x1e')],_0x4fefd0;if(_0x29b0b1>=_0x2ae133){_0x29b0b1=_0x2ae133;_0x4fefd0=0xc8;}else{_0x4fefd0=0xce;}_0x4134ee['status'](_0x4fefd0);return _0x4134ee[_0xf422('0x1f')]('Content-Range',_0x43de64+'-'+_0x29b0b1+'/'+_0x2ae133)[_0xf422('0x20')](_0x76e4b1);}return null;};}function patchUpdates(_0x15833b){return function(_0x36b7e7){try{jsonpatch['apply'](_0x36b7e7,_0x15833b,!![]);}catch(_0xf2d06b){return BPromise[_0xf422('0x21')](_0xf2d06b);}return _0x36b7e7['save']();};}function saveUpdates(_0x4b80a0,_0x268575){return function(_0x3cb26b){if(_0x3cb26b){return _0x3cb26b['update'](_0x4b80a0)[_0xf422('0x22')](function(_0x570ea2){return _0x570ea2;});}return null;};}function removeEntity(_0x3b21a5,_0x32ceee){return function(_0x31a518){if(_0x31a518){return _0x31a518[_0xf422('0x23')]()[_0xf422('0x22')](function(){var _0x1a0c6b=_0x31a518[_0xf422('0x24')]({'plain':!![]});var _0x11d10b='CustomDashboards';return db[_0xf422('0x25')]['destroy']({'where':{'type':_0x11d10b,'resourceId':_0x1a0c6b['id']}})[_0xf422('0x22')](function(){return _0x31a518;});})[_0xf422('0x22')](function(){_0x3b21a5[_0xf422('0x1c')](0xcc)[_0xf422('0x26')]();});}};}function handleEntityNotFound(_0xaa3e7e,_0x31f439){return function(_0x2d0053){if(!_0x2d0053){_0xaa3e7e['sendStatus'](0x194);}return _0x2d0053;};}function handleError(_0x4eed61,_0x35d1fa){_0x35d1fa=_0x35d1fa||0x1f4;return function(_0x10d51b){logger[_0xf422('0x27')](_0x10d51b[_0xf422('0x28')]);if(_0x10d51b[_0xf422('0x29')]){delete _0x10d51b['name'];}_0x4eed61[_0xf422('0x1c')](_0x35d1fa)[_0xf422('0x2a')](_0x10d51b);};}exports['index']=function(_0x5f0186,_0x3f86fc){var _0x579e8d={},_0x5592af={},_0x25a43c={'count':0x0,'rows':[]};var _0x27a5c1=_['map'](db[_0xf422('0x2b')][_0xf422('0x2c')],function(_0x11000e){return{'name':_0x11000e[_0xf422('0x2d')],'type':_0x11000e[_0xf422('0x2e')]['key']};});_0x5592af[_0xf422('0x2f')]=_['map'](_0x27a5c1,_0xf422('0x29'));_0x5592af[_0xf422('0x30')]=_[_0xf422('0x31')](_0x5f0186[_0xf422('0x30')]);_0x5592af[_0xf422('0x32')]=_[_0xf422('0x33')](_0x5592af[_0xf422('0x2f')],_0x5592af['query']);_0x579e8d['attributes']=_[_0xf422('0x33')](_0x5592af[_0xf422('0x2f')],qs['fields'](_0x5f0186[_0xf422('0x30')][_0xf422('0x34')]));_0x579e8d[_0xf422('0x35')]=_0x579e8d[_0xf422('0x35')][_0xf422('0x36')]?_0x579e8d[_0xf422('0x35')]:_0x5592af[_0xf422('0x2f')];if(!_0x5f0186[_0xf422('0x30')][_0xf422('0x37')](_0xf422('0x38'))){_0x579e8d[_0xf422('0x1e')]=qs[_0xf422('0x1e')](_0x5f0186[_0xf422('0x30')][_0xf422('0x1e')]);_0x579e8d['offset']=qs['offset'](_0x5f0186['query'][_0xf422('0x1d')]);}_0x579e8d[_0xf422('0x39')]=qs['sort'](_0x5f0186[_0xf422('0x30')]['sort']);_0x579e8d[_0xf422('0x3a')]=qs[_0xf422('0x32')](_['pick'](_0x5f0186[_0xf422('0x30')],_0x5592af[_0xf422('0x32')]));if(_0x5f0186[_0xf422('0x30')]['filter']){_0x579e8d[_0xf422('0x3a')]=_['merge'](_0x579e8d['where'],{'$or':_['map'](_0x27a5c1,function(_0x112bce){if(_0x112bce[_0xf422('0x2e')]!==_0xf422('0x3b')){var _0x3f874f={};_0x3f874f[_0x112bce[_0xf422('0x29')]]={'$like':'%'+_0x5f0186[_0xf422('0x30')][_0xf422('0x3c')]+'%'};return _0x3f874f;}})});}_0x579e8d=_[_0xf422('0x3d')]({},_0x579e8d,_0x5f0186['options']);var _0x4d312a={'where':_0x579e8d[_0xf422('0x3a')]};return db[_0xf422('0x2b')][_0xf422('0x3e')](_0x4d312a)[_0xf422('0x22')](function(_0xc7423f){_0x25a43c[_0xf422('0x3e')]=_0xc7423f;if(_0x5f0186['query'][_0xf422('0x3f')]){_0x579e8d['include']=[{'all':!![]}];}return db[_0xf422('0x2b')][_0xf422('0x40')](_0x579e8d);})['then'](function(_0x3c9b0d){_0x25a43c[_0xf422('0x41')]=_0x3c9b0d;return _0x25a43c;})[_0xf422('0x22')](respondWithFilteredResult(_0x3f86fc,_0x579e8d))[_0xf422('0x42')](handleError(_0x3f86fc,null));};exports[_0xf422('0x43')]=function(_0x49686b,_0x852a5f){var _0x1e20a2={'raw':![],'where':{'id':_0x49686b[_0xf422('0x44')]['id']}},_0x1b5371={};_0x1b5371[_0xf422('0x2f')]=_['keys'](db[_0xf422('0x2b')][_0xf422('0x2c')]);_0x1b5371['query']=_[_0xf422('0x31')](_0x49686b['query']);_0x1b5371[_0xf422('0x32')]=_[_0xf422('0x33')](_0x1b5371[_0xf422('0x2f')],_0x1b5371[_0xf422('0x30')]);_0x1e20a2[_0xf422('0x35')]=_[_0xf422('0x33')](_0x1b5371[_0xf422('0x2f')],qs[_0xf422('0x34')](_0x49686b[_0xf422('0x30')][_0xf422('0x34')]));_0x1e20a2[_0xf422('0x35')]=_0x1e20a2[_0xf422('0x35')][_0xf422('0x36')]?_0x1e20a2[_0xf422('0x35')]:_0x1b5371[_0xf422('0x2f')];if(_0x49686b['query']['includeAll']){_0x1e20a2[_0xf422('0x45')]=[{'all':!![]}];}_0x1e20a2=_[_0xf422('0x3d')]({},_0x1e20a2,_0x49686b[_0xf422('0x46')]);return db['Dashboard'][_0xf422('0x47')](_0x1e20a2)[_0xf422('0x22')](handleEntityNotFound(_0x852a5f,null))[_0xf422('0x22')](respondWithResult(_0x852a5f,null))[_0xf422('0x42')](handleError(_0x852a5f,null));};exports[_0xf422('0x48')]=function(_0x259e24,_0x3dffe0){return db['Dashboard'][_0xf422('0x48')](_0x259e24['body'],{})[_0xf422('0x22')](function(_0x2fe641){var _0x5b3ece=_0x259e24[_0xf422('0x49')][_0xf422('0x24')]({'plain':!![]});if(!_0x5b3ece)throw new Error(_0xf422('0x4a'));if(_0x5b3ece[_0xf422('0x4b')]===_0xf422('0x49')){var _0x5c3cb8=_0x2fe641['get']({'plain':!![]});var _0x2d26f7='CustomDashboards';return db[_0xf422('0x4c')][_0xf422('0x47')]({'where':{'name':_0x2d26f7,'userProfileId':_0x5b3ece[_0xf422('0x4d')]},'raw':!![]})[_0xf422('0x22')](function(_0x4b4de4){if(_0x4b4de4&&_0x4b4de4['autoAssociation']===0x0){return db[_0xf422('0x25')][_0xf422('0x48')]({'name':_0x5c3cb8[_0xf422('0x29')],'resourceId':_0x5c3cb8['id'],'type':_0x4b4de4[_0xf422('0x29')],'sectionId':_0x4b4de4['id']},{})[_0xf422('0x22')](function(){return _0x2fe641;});}else{return _0x2fe641;}})[_0xf422('0x42')](function(_0x538446){logger[_0xf422('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x538446);throw _0x538446;});}return _0x2fe641;})[_0xf422('0x22')](respondWithResult(_0x3dffe0,0xc9))[_0xf422('0x42')](handleError(_0x3dffe0,null));};exports[_0xf422('0x4e')]=function(_0x405b9c,_0x492972){var _0x48e491={'where':{'id':_0x405b9c[_0xf422('0x44')]['id']}},_0x183593={};_0x183593[_0xf422('0x2f')]=_[_0xf422('0x31')](db[_0xf422('0x2b')][_0xf422('0x2c')]);_0x48e491[_0xf422('0x35')]=_['intersection'](_0x183593[_0xf422('0x2f')],qs[_0xf422('0x34')](_0x405b9c[_0xf422('0x30')][_0xf422('0x34')]));_0x48e491[_0xf422('0x35')]=_0x48e491[_0xf422('0x35')][_0xf422('0x36')]?_0x48e491[_0xf422('0x35')]:_0x183593[_0xf422('0x2f')];if(_0x405b9c[_0xf422('0x30')]['includeAll']){_0x48e491[_0xf422('0x45')]=[{'all':!![]}];}_0x48e491=_[_0xf422('0x3d')]({},_0x48e491,_0x405b9c[_0xf422('0x46')]);return db[_0xf422('0x2b')][_0xf422('0x47')](_0x48e491)['then'](handleEntityNotFound(_0x492972,null))[_0xf422('0x22')](function(_0x2b6a57){if(_0x2b6a57){var _0x4fa193=_0x2b6a57[_0xf422('0x24')]({'plain':!![]});_0x4fa193=qs[_0xf422('0x4f')](_0x4fa193,['id',_0xf422('0x50'),_0xf422('0x51')]);_0x405b9c[_0xf422('0x52')]=_[_0xf422('0x4f')](_0x405b9c[_0xf422('0x52')],['id','createdAt',_0xf422('0x51')]);return db[_0xf422('0x2b')][_0xf422('0x48')](_['merge'](_0x4fa193,_0x405b9c[_0xf422('0x52')]),{'include':_0x405b9c[_0xf422('0x30')][_0xf422('0x3f')]?[{'all':!![]}]:undefined})[_0xf422('0x22')](function(_0x41f60e){var _0x702d0b=_0x405b9c[_0xf422('0x49')][_0xf422('0x24')]({'plain':!![]});if(!_0x702d0b)throw new Error(_0xf422('0x4a'));if(_0x702d0b[_0xf422('0x4b')]===_0xf422('0x49')){var _0x44c46d=_0x41f60e[_0xf422('0x24')]({'plain':!![]});var _0x36608e=_0xf422('0x53');return db[_0xf422('0x4c')][_0xf422('0x47')]({'where':{'name':_0x36608e,'userProfileId':_0x702d0b[_0xf422('0x4d')]},'raw':!![]})[_0xf422('0x22')](function(_0x548a96){if(_0x548a96&&_0x548a96['autoAssociation']===0x0){return db[_0xf422('0x25')]['create']({'name':_0x44c46d[_0xf422('0x29')],'resourceId':_0x44c46d['id'],'type':_0x548a96[_0xf422('0x29')],'sectionId':_0x548a96['id']},{})[_0xf422('0x22')](function(){return _0x41f60e;});}else{return _0x41f60e;}})[_0xf422('0x42')](function(_0x59efc6){logger[_0xf422('0x27')](_0xf422('0x54'),_0x59efc6);throw _0x59efc6;});}return _0x41f60e;});}})[_0xf422('0x22')](respondWithResult(_0x492972,0xc9))['catch'](handleError(_0x492972,null));};exports['update']=function(_0x31012e,_0x3b2475){if(_0x31012e[_0xf422('0x52')]['id']){delete _0x31012e[_0xf422('0x52')]['id'];}return db['Dashboard']['find']({'where':{'id':_0x31012e['params']['id']}})[_0xf422('0x22')](handleEntityNotFound(_0x3b2475,null))[_0xf422('0x22')](saveUpdates(_0x31012e[_0xf422('0x52')],null))[_0xf422('0x22')](respondWithResult(_0x3b2475,null))[_0xf422('0x42')](handleError(_0x3b2475,null));};exports[_0xf422('0x23')]=function(_0x3f165d,_0x51285c){return db['Dashboard']['find']({'where':{'id':_0x3f165d[_0xf422('0x44')]['id']}})['then'](handleEntityNotFound(_0x51285c,null))[_0xf422('0x22')](removeEntity(_0x51285c,null))[_0xf422('0x42')](handleError(_0x51285c,null));};function widgetAttributes(_0x5d7291){try{switch(_0x5d7291[_0xf422('0x2e')]){case _0xf422('0x55'):return[{'name':_0xf422('0x56'),'value':_0x5d7291['attrUrl']||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291[_0xf422('0x57')][0x0]?_0x5d7291['attrs'][0x0][_0xf422('0x58')]:undefined)||_0xf422('0x59')}];case _0xf422('0x5a'):return[{'name':_0xf422('0x5b'),'value':_0x5d7291[_0xf422('0x5b')]||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291[_0xf422('0x57')][0x0]?_0x5d7291['attrs'][0x0][_0xf422('0x58')]:undefined)||''}];case _0xf422('0x5c'):return[{'name':_0xf422('0x5d'),'value':_0x5d7291['attrHourFormat']||(_0x5d7291['attrs']&&_0x5d7291[_0xf422('0x57')][0x0]?_0x5d7291[_0xf422('0x57')][0x0][_0xf422('0x58')]:undefined)||_0xf422('0x5e')},{'name':_0xf422('0x5f'),'value':_0x5d7291[_0xf422('0x5f')]||(_0x5d7291['attrs']&&_0x5d7291[_0xf422('0x57')][0x1]?_0x5d7291[_0xf422('0x57')][0x1][_0xf422('0x58')]:undefined)||'0.00'},{'name':_0xf422('0x60'),'value':_0x5d7291['attrFontSize']||(_0x5d7291['attrs']&&_0x5d7291[_0xf422('0x57')][0x2]?_0x5d7291['attrs'][0x2][_0xf422('0x58')]:undefined)||0xc}];case _0xf422('0x61'):return[{'name':_0xf422('0x62'),'value':_0x5d7291[_0xf422('0x62')]||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291['attrs'][0x0]?_0x5d7291[_0xf422('0x57')][0x0][_0xf422('0x58')]:undefined)||_0xf422('0x63')},{'name':'attrVoiceQueues','value':_0x5d7291['attrVoiceQueues']||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291['attrs'][0x1]?_0x5d7291[_0xf422('0x57')][0x1]['value']:undefined)||[]},{'name':_0xf422('0x60'),'value':_0x5d7291[_0xf422('0x60')]||(_0x5d7291['attrs']&&_0x5d7291[_0xf422('0x57')][0x2]?_0x5d7291[_0xf422('0x57')][0x2]['value']:undefined)||0x14}];case _0xf422('0x64'):case _0xf422('0x65'):return[{'name':_0xf422('0x66'),'value':_0x5d7291[_0xf422('0x66')]||(_0x5d7291['attrs']&&_0x5d7291[_0xf422('0x57')][0x0]?_0x5d7291['attrs'][0x0][_0xf422('0x58')]:undefined)||_0xf422('0x63')},{'name':_0xf422('0x67'),'value':_0x5d7291['attrSerie2']||(_0x5d7291['attrs']&&_0x5d7291[_0xf422('0x57')][0x1]?_0x5d7291[_0xf422('0x57')][0x1]['value']:undefined)||null},{'name':_0xf422('0x68'),'value':_0x5d7291['attrSerie3']||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291['attrs'][0x2]?_0x5d7291['attrs'][0x2][_0xf422('0x58')]:undefined)||null},{'name':_0xf422('0x69'),'value':_0x5d7291[_0xf422('0x69')]||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291[_0xf422('0x57')][0x3]?_0x5d7291[_0xf422('0x57')][0x3][_0xf422('0x58')]:undefined)||[]}];case _0xf422('0x6a'):return[{'name':'attrReport','type':_0x5d7291[_0xf422('0x6b')]||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291[_0xf422('0x57')][0x0]?_0x5d7291[_0xf422('0x57')][0x0][_0xf422('0x2e')]:undefined)||null,'value':_0x5d7291['attrReport']||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291[_0xf422('0x57')][0x0]?_0x5d7291[_0xf422('0x57')][0x0][_0xf422('0x58')]:undefined)||null},{'name':_0xf422('0x6c'),'value':_0x5d7291['attrRefresh']||(_0x5d7291[_0xf422('0x57')]&&_0x5d7291['attrs'][0x1]?_0x5d7291[_0xf422('0x57')][0x1][_0xf422('0x58')]:undefined)||0x0}];default:return[];}}catch(_0x773f79){logger['error'](_0xf422('0x6d'),JSON[_0xf422('0x6e')](_0x773f79));return[];}}exports[_0xf422('0x6f')]=function(_0x86f960,_0x5a3ef7,_0x48d91e){if(_0x86f960['body']['id']){delete _0x86f960['body']['id'];}return db[_0xf422('0x2b')][_0xf422('0x47')]({'where':{'id':_0x86f960['params']['id']}})[_0xf422('0x22')](handleEntityNotFound(_0x5a3ef7,null))[_0xf422('0x22')](function(_0x260b86){if(_0x260b86){_0x86f960[_0xf422('0x52')][_0xf422('0x70')]=_0x260b86['id'];_0x86f960[_0xf422('0x52')]['attrs']=widgetAttributes(_0x86f960[_0xf422('0x52')]);return db[_0xf422('0x71')]['create'](_0x86f960[_0xf422('0x52')]);}})[_0xf422('0x22')](respondWithResult(_0x5a3ef7,null))[_0xf422('0x42')](handleError(_0x5a3ef7,null));};exports[_0xf422('0x72')]=function(_0x4832ab,_0xd16456,_0x2abf64){var _0x49713d={};var _0x169fc2={};var _0x483ba3;var _0x90b42;return db[_0xf422('0x2b')]['findOne']({'where':{'id':_0x4832ab[_0xf422('0x44')]['id']}})[_0xf422('0x22')](handleEntityNotFound(_0xd16456,null))[_0xf422('0x22')](function(_0x4027bc){if(_0x4027bc){_0x483ba3=_0x4027bc;_0x169fc2[_0xf422('0x2f')]=_[_0xf422('0x31')](db[_0xf422('0x71')][_0xf422('0x2c')]);_0x169fc2[_0xf422('0x30')]=_[_0xf422('0x31')](_0x4832ab[_0xf422('0x30')]);_0x169fc2[_0xf422('0x32')]=_[_0xf422('0x33')](_0x169fc2[_0xf422('0x2f')],_0x169fc2[_0xf422('0x30')]);_0x49713d[_0xf422('0x35')]=_['intersection'](_0x169fc2[_0xf422('0x2f')],qs[_0xf422('0x34')](_0x4832ab[_0xf422('0x30')][_0xf422('0x34')]));_0x49713d[_0xf422('0x35')]=_0x49713d[_0xf422('0x35')][_0xf422('0x36')]?_0x49713d[_0xf422('0x35')]:_0x169fc2['model'];_0x49713d[_0xf422('0x39')]=qs['sort'](_0x4832ab['query'][_0xf422('0x73')]);_0x49713d[_0xf422('0x3a')]=qs['filters'](_['pick'](_0x4832ab[_0xf422('0x30')],_0x169fc2[_0xf422('0x32')]));if(_0x4832ab[_0xf422('0x30')]['filter']){_0x49713d[_0xf422('0x3a')]=_[_0xf422('0x3d')](_0x49713d[_0xf422('0x3a')],{'$or':_[_0xf422('0x74')](_0x49713d['attributes'],function(_0x967d28){var _0x38c5b6={};_0x38c5b6[_0x967d28]={'$like':'%'+_0x4832ab[_0xf422('0x30')][_0xf422('0x3c')]+'%'};return _0x38c5b6;})});}_0x49713d=_[_0xf422('0x3d')]({},_0x49713d,_0x4832ab[_0xf422('0x46')]);return _0x483ba3['getItems'](_0x49713d);}})[_0xf422('0x22')](function(_0x55ab44){if(_0x55ab44){_0x90b42=_0x55ab44[_0xf422('0x36')];if(!_0x4832ab[_0xf422('0x30')][_0xf422('0x37')](_0xf422('0x38'))){_0x49713d[_0xf422('0x1e')]=qs['limit'](_0x4832ab[_0xf422('0x30')]['limit']);_0x49713d['offset']=qs[_0xf422('0x1d')](_0x4832ab[_0xf422('0x30')][_0xf422('0x1d')]);}return _0x483ba3[_0xf422('0x72')](_0x49713d);}})[_0xf422('0x22')](function(_0xaacdf3){if(_0xaacdf3){return _0xaacdf3?{'count':_0x90b42,'rows':_0xaacdf3}:null;}})[_0xf422('0x22')](respondWithResult(_0xd16456,null))[_0xf422('0x42')](handleError(_0xd16456,null));};
\ No newline at end of file
+var _0xd2e3=['userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','include','createdAt','omit','updatedAt','attrUrl','attrs','value','https://','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','total','attrVoiceQueues','pie-chart','attrSerie1','attrSerie2','attrSerie3','attrReport','reportType','attrRefresh','stringify','addItem','DashboardId','DashboardItem','nolimit','getItems','html-pdf','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./dashboard.socket','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','CustomDashboards','sendStatus','stack','name','map','Dashboard','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','options','findAll','catch','params','includeAll','find','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection'];(function(_0x48764a,_0x1590bc){var _0x31828b=function(_0x1fce43){while(--_0x1fce43){_0x48764a['push'](_0x48764a['shift']());}};_0x31828b(++_0x1590bc);}(_0xd2e3,0x10a));var _0x3d2e=function(_0x3405e7,_0x125160){_0x3405e7=_0x3405e7-0x0;var _0x363901=_0xd2e3[_0x3405e7];return _0x363901;};'use strict';var pdf=require(_0x3d2e('0x0'));var emlformat=require(_0x3d2e('0x1'));var rimraf=require(_0x3d2e('0x2'));var zipdir=require(_0x3d2e('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3d2e('0x4'));var moment=require('moment');var BPromise=require(_0x3d2e('0x5'));var Mustache=require(_0x3d2e('0x6'));var util=require(_0x3d2e('0x7'));var path=require(_0x3d2e('0x8'));var sox=require(_0x3d2e('0x9'));var csv=require(_0x3d2e('0xa'));var ejs=require(_0x3d2e('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x3d2e('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x3d2e('0xd'));var toCsv=require(_0x3d2e('0xa'));var querystring=require(_0x3d2e('0xe'));var Papa=require(_0x3d2e('0xf'));var Redis=require(_0x3d2e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x3d2e('0x11'));var as=require(_0x3d2e('0x12'));var hardwareService=require(_0x3d2e('0x13'));var logger=require(_0x3d2e('0x14'))('api');var utils=require(_0x3d2e('0x15'));var config=require('../../config/environment');var db=require(_0x3d2e('0x16'))['db'];config[_0x3d2e('0x17')]=_[_0x3d2e('0x18')](config[_0x3d2e('0x17')],{'host':_0x3d2e('0x19'),'port':0x18eb});var socket=require(_0x3d2e('0x1a'))(new Redis(config['redis']));require(_0x3d2e('0x1b'))['register'](socket);function respondWithStatusCode(_0x302436,_0x440434){_0x440434=_0x440434||0xcc;return function(_0x5d6619){if(_0x5d6619){return _0x302436['sendStatus'](_0x440434);}return _0x302436[_0x3d2e('0x1c')](_0x440434)[_0x3d2e('0x1d')]();};}function respondWithResult(_0x5e59ed,_0x50303d){_0x50303d=_0x50303d||0xc8;return function(_0x474c04){if(_0x474c04){return _0x5e59ed[_0x3d2e('0x1c')](_0x50303d)[_0x3d2e('0x1e')](_0x474c04);}};}function respondWithFilteredResult(_0x29e6ee,_0x111d41){return function(_0x320849){if(_0x320849){var _0xd30619=_0x320849[_0x3d2e('0x1f')],_0x5e8f1b=_0x111d41[_0x3d2e('0x20')],_0x50f46a=_0x111d41[_0x3d2e('0x20')]+_0x111d41[_0x3d2e('0x21')],_0x3baaf4;if(_0x50f46a>=_0xd30619){_0x50f46a=_0xd30619;_0x3baaf4=0xc8;}else{_0x3baaf4=0xce;}_0x29e6ee['status'](_0x3baaf4);return _0x29e6ee[_0x3d2e('0x22')](_0x3d2e('0x23'),_0x5e8f1b+'-'+_0x50f46a+'/'+_0xd30619)[_0x3d2e('0x1e')](_0x320849);}return null;};}function patchUpdates(_0xaaf5b1){return function(_0x3791b2){try{jsonpatch[_0x3d2e('0x24')](_0x3791b2,_0xaaf5b1,!![]);}catch(_0x395564){return BPromise[_0x3d2e('0x25')](_0x395564);}return _0x3791b2['save']();};}function saveUpdates(_0x4ca8c3,_0x289ef6){return function(_0x11b381){if(_0x11b381){return _0x11b381[_0x3d2e('0x26')](_0x4ca8c3)[_0x3d2e('0x27')](function(_0x1412f6){return _0x1412f6;});}return null;};}function removeEntity(_0x5cfe6c,_0x3a90f4){return function(_0x3693e3){if(_0x3693e3){return _0x3693e3[_0x3d2e('0x28')]()[_0x3d2e('0x27')](function(){var _0xafdb65=_0x3693e3['get']({'plain':!![]});var _0x3ca975=_0x3d2e('0x29');return db['UserProfileResource'][_0x3d2e('0x28')]({'where':{'type':_0x3ca975,'resourceId':_0xafdb65['id']}})[_0x3d2e('0x27')](function(){return _0x3693e3;});})[_0x3d2e('0x27')](function(){_0x5cfe6c[_0x3d2e('0x1c')](0xcc)[_0x3d2e('0x1d')]();});}};}function handleEntityNotFound(_0x4684b4,_0x3a4d85){return function(_0x1af047){if(!_0x1af047){_0x4684b4[_0x3d2e('0x2a')](0x194);}return _0x1af047;};}function handleError(_0xe11603,_0x2441cb){_0x2441cb=_0x2441cb||0x1f4;return function(_0x368d18){logger['error'](_0x368d18[_0x3d2e('0x2b')]);if(_0x368d18['name']){delete _0x368d18[_0x3d2e('0x2c')];}_0xe11603[_0x3d2e('0x1c')](_0x2441cb)['send'](_0x368d18);};}exports['index']=function(_0x403fcd,_0x45e130){var _0xe13fbe={},_0x46aeb6={},_0xf3516b={'count':0x0,'rows':[]};var _0x1d81ee=_[_0x3d2e('0x2d')](db[_0x3d2e('0x2e')][_0x3d2e('0x2f')],function(_0xf8f5d1){return{'name':_0xf8f5d1[_0x3d2e('0x30')],'type':_0xf8f5d1[_0x3d2e('0x31')][_0x3d2e('0x32')]};});_0x46aeb6[_0x3d2e('0x33')]=_[_0x3d2e('0x2d')](_0x1d81ee,_0x3d2e('0x2c'));_0x46aeb6['query']=_[_0x3d2e('0x34')](_0x403fcd['query']);_0x46aeb6[_0x3d2e('0x35')]=_[_0x3d2e('0x36')](_0x46aeb6['model'],_0x46aeb6[_0x3d2e('0x37')]);_0xe13fbe[_0x3d2e('0x38')]=_[_0x3d2e('0x36')](_0x46aeb6[_0x3d2e('0x33')],qs['fields'](_0x403fcd[_0x3d2e('0x37')][_0x3d2e('0x39')]));_0xe13fbe[_0x3d2e('0x38')]=_0xe13fbe[_0x3d2e('0x38')][_0x3d2e('0x3a')]?_0xe13fbe[_0x3d2e('0x38')]:_0x46aeb6[_0x3d2e('0x33')];if(!_0x403fcd[_0x3d2e('0x37')][_0x3d2e('0x3b')]('nolimit')){_0xe13fbe[_0x3d2e('0x21')]=qs[_0x3d2e('0x21')](_0x403fcd['query'][_0x3d2e('0x21')]);_0xe13fbe[_0x3d2e('0x20')]=qs[_0x3d2e('0x20')](_0x403fcd['query'][_0x3d2e('0x20')]);}_0xe13fbe[_0x3d2e('0x3c')]=qs[_0x3d2e('0x3d')](_0x403fcd[_0x3d2e('0x37')]['sort']);_0xe13fbe[_0x3d2e('0x3e')]=qs['filters'](_[_0x3d2e('0x3f')](_0x403fcd['query'],_0x46aeb6['filters']));if(_0x403fcd[_0x3d2e('0x37')][_0x3d2e('0x40')]){_0xe13fbe[_0x3d2e('0x3e')]=_['merge'](_0xe13fbe[_0x3d2e('0x3e')],{'$or':_[_0x3d2e('0x2d')](_0x1d81ee,function(_0x395531){if(_0x395531['type']!=='VIRTUAL'){var _0x1d40fb={};_0x1d40fb[_0x395531[_0x3d2e('0x2c')]]={'$like':'%'+_0x403fcd[_0x3d2e('0x37')]['filter']+'%'};return _0x1d40fb;}})});}_0xe13fbe=_[_0x3d2e('0x41')]({},_0xe13fbe,_0x403fcd[_0x3d2e('0x42')]);var _0x17ce91={'where':_0xe13fbe[_0x3d2e('0x3e')]};return db['Dashboard']['count'](_0x17ce91)[_0x3d2e('0x27')](function(_0x1c1e1a){_0xf3516b[_0x3d2e('0x1f')]=_0x1c1e1a;if(_0x403fcd[_0x3d2e('0x37')]['includeAll']){_0xe13fbe['include']=[{'all':!![]}];}return db[_0x3d2e('0x2e')][_0x3d2e('0x43')](_0xe13fbe);})['then'](function(_0x4bb39f){_0xf3516b['rows']=_0x4bb39f;return _0xf3516b;})[_0x3d2e('0x27')](respondWithFilteredResult(_0x45e130,_0xe13fbe))[_0x3d2e('0x44')](handleError(_0x45e130,null));};exports['show']=function(_0x396f90,_0x52a843){var _0x124183={'raw':![],'where':{'id':_0x396f90[_0x3d2e('0x45')]['id']}},_0x44b37d={};_0x44b37d[_0x3d2e('0x33')]=_[_0x3d2e('0x34')](db[_0x3d2e('0x2e')]['rawAttributes']);_0x44b37d[_0x3d2e('0x37')]=_['keys'](_0x396f90[_0x3d2e('0x37')]);_0x44b37d[_0x3d2e('0x35')]=_[_0x3d2e('0x36')](_0x44b37d[_0x3d2e('0x33')],_0x44b37d['query']);_0x124183[_0x3d2e('0x38')]=_[_0x3d2e('0x36')](_0x44b37d[_0x3d2e('0x33')],qs['fields'](_0x396f90['query'][_0x3d2e('0x39')]));_0x124183[_0x3d2e('0x38')]=_0x124183[_0x3d2e('0x38')][_0x3d2e('0x3a')]?_0x124183['attributes']:_0x44b37d[_0x3d2e('0x33')];if(_0x396f90[_0x3d2e('0x37')][_0x3d2e('0x46')]){_0x124183['include']=[{'all':!![]}];}_0x124183=_['merge']({},_0x124183,_0x396f90[_0x3d2e('0x42')]);return db['Dashboard'][_0x3d2e('0x47')](_0x124183)['then'](handleEntityNotFound(_0x52a843,null))[_0x3d2e('0x27')](respondWithResult(_0x52a843,null))[_0x3d2e('0x44')](handleError(_0x52a843,null));};exports[_0x3d2e('0x48')]=function(_0x4240b1,_0x55843e){return db[_0x3d2e('0x2e')][_0x3d2e('0x48')](_0x4240b1[_0x3d2e('0x49')],{})[_0x3d2e('0x27')](function(_0x2e3244){var _0x298f91=_0x4240b1['user'][_0x3d2e('0x4a')]({'plain':!![]});if(!_0x298f91)throw new Error(_0x3d2e('0x4b'));if(_0x298f91[_0x3d2e('0x4c')]===_0x3d2e('0x4d')){var _0x11e984=_0x2e3244[_0x3d2e('0x4a')]({'plain':!![]});var _0x55d396=_0x3d2e('0x29');return db[_0x3d2e('0x4e')][_0x3d2e('0x47')]({'where':{'name':_0x55d396,'userProfileId':_0x298f91[_0x3d2e('0x4f')]},'raw':!![]})[_0x3d2e('0x27')](function(_0x3e58c2){if(_0x3e58c2&&_0x3e58c2[_0x3d2e('0x50')]===0x0){return db['UserProfileResource'][_0x3d2e('0x48')]({'name':_0x11e984[_0x3d2e('0x2c')],'resourceId':_0x11e984['id'],'type':_0x3e58c2[_0x3d2e('0x2c')],'sectionId':_0x3e58c2['id']},{})[_0x3d2e('0x27')](function(){return _0x2e3244;});}else{return _0x2e3244;}})['catch'](function(_0x4ff88a){logger[_0x3d2e('0x51')](_0x3d2e('0x52'),_0x4ff88a);throw _0x4ff88a;});}return _0x2e3244;})[_0x3d2e('0x27')](respondWithResult(_0x55843e,0xc9))[_0x3d2e('0x44')](handleError(_0x55843e,null));};exports['clone']=function(_0x473fb4,_0x363b7a){var _0x351bc9={'where':{'id':_0x473fb4[_0x3d2e('0x45')]['id']}},_0x210ba5={};_0x210ba5[_0x3d2e('0x33')]=_[_0x3d2e('0x34')](db[_0x3d2e('0x2e')][_0x3d2e('0x2f')]);_0x351bc9[_0x3d2e('0x38')]=_[_0x3d2e('0x36')](_0x210ba5[_0x3d2e('0x33')],qs[_0x3d2e('0x39')](_0x473fb4[_0x3d2e('0x37')][_0x3d2e('0x39')]));_0x351bc9['attributes']=_0x351bc9[_0x3d2e('0x38')]['length']?_0x351bc9['attributes']:_0x210ba5[_0x3d2e('0x33')];if(_0x473fb4[_0x3d2e('0x37')][_0x3d2e('0x46')]){_0x351bc9[_0x3d2e('0x53')]=[{'all':!![]}];}_0x351bc9=_[_0x3d2e('0x41')]({},_0x351bc9,_0x473fb4[_0x3d2e('0x42')]);return db['Dashboard'][_0x3d2e('0x47')](_0x351bc9)[_0x3d2e('0x27')](handleEntityNotFound(_0x363b7a,null))[_0x3d2e('0x27')](function(_0x3094c2){if(_0x3094c2){var _0x19c0d7=_0x3094c2[_0x3d2e('0x4a')]({'plain':!![]});_0x19c0d7=qs['omit'](_0x19c0d7,['id',_0x3d2e('0x54'),'updatedAt']);_0x473fb4['body']=_[_0x3d2e('0x55')](_0x473fb4[_0x3d2e('0x49')],['id','createdAt',_0x3d2e('0x56')]);return db['Dashboard'][_0x3d2e('0x48')](_['merge'](_0x19c0d7,_0x473fb4[_0x3d2e('0x49')]),{'include':_0x473fb4[_0x3d2e('0x37')][_0x3d2e('0x46')]?[{'all':!![]}]:undefined})['then'](function(_0x257287){var _0x3a99b5=_0x473fb4[_0x3d2e('0x4d')]['get']({'plain':!![]});if(!_0x3a99b5)throw new Error(_0x3d2e('0x4b'));if(_0x3a99b5[_0x3d2e('0x4c')]==='user'){var _0x54d7c9=_0x257287[_0x3d2e('0x4a')]({'plain':!![]});var _0x5c3f86='CustomDashboards';return db[_0x3d2e('0x4e')]['find']({'where':{'name':_0x5c3f86,'userProfileId':_0x3a99b5['userProfileId']},'raw':!![]})[_0x3d2e('0x27')](function(_0x35f2e7){if(_0x35f2e7&&_0x35f2e7[_0x3d2e('0x50')]===0x0){return db['UserProfileResource'][_0x3d2e('0x48')]({'name':_0x54d7c9[_0x3d2e('0x2c')],'resourceId':_0x54d7c9['id'],'type':_0x35f2e7[_0x3d2e('0x2c')],'sectionId':_0x35f2e7['id']},{})[_0x3d2e('0x27')](function(){return _0x257287;});}else{return _0x257287;}})[_0x3d2e('0x44')](function(_0x2e1c5c){logger[_0x3d2e('0x51')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2e1c5c);throw _0x2e1c5c;});}return _0x257287;});}})[_0x3d2e('0x27')](respondWithResult(_0x363b7a,0xc9))[_0x3d2e('0x44')](handleError(_0x363b7a,null));};exports[_0x3d2e('0x26')]=function(_0x4fe845,_0x16f3df){if(_0x4fe845[_0x3d2e('0x49')]['id']){delete _0x4fe845[_0x3d2e('0x49')]['id'];}return db[_0x3d2e('0x2e')][_0x3d2e('0x47')]({'where':{'id':_0x4fe845[_0x3d2e('0x45')]['id']}})[_0x3d2e('0x27')](handleEntityNotFound(_0x16f3df,null))[_0x3d2e('0x27')](saveUpdates(_0x4fe845['body'],null))[_0x3d2e('0x27')](respondWithResult(_0x16f3df,null))[_0x3d2e('0x44')](handleError(_0x16f3df,null));};exports[_0x3d2e('0x28')]=function(_0x54f674,_0x29022f){return db[_0x3d2e('0x2e')]['find']({'where':{'id':_0x54f674[_0x3d2e('0x45')]['id']}})[_0x3d2e('0x27')](handleEntityNotFound(_0x29022f,null))['then'](removeEntity(_0x29022f,null))[_0x3d2e('0x44')](handleError(_0x29022f,null));};function widgetAttributes(_0x11598e){try{switch(_0x11598e[_0x3d2e('0x31')]){case'iframe':return[{'name':'attrUrl','value':_0x11598e[_0x3d2e('0x57')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x0]?_0x11598e[_0x3d2e('0x58')][0x0][_0x3d2e('0x59')]:undefined)||_0x3d2e('0x5a')}];case'custom':return[{'name':_0x3d2e('0x5b'),'value':_0x11598e['attrPath']||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x0]?_0x11598e[_0x3d2e('0x58')][0x0][_0x3d2e('0x59')]:undefined)||''}];case _0x3d2e('0x5c'):return[{'name':'attrHourFormat','value':_0x11598e[_0x3d2e('0x5d')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e['attrs'][0x0]?_0x11598e['attrs'][0x0]['value']:undefined)||_0x3d2e('0x5e')},{'name':_0x3d2e('0x5f'),'value':_0x11598e[_0x3d2e('0x5f')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x1]?_0x11598e[_0x3d2e('0x58')][0x1][_0x3d2e('0x59')]:undefined)||_0x3d2e('0x60')},{'name':_0x3d2e('0x61'),'value':_0x11598e[_0x3d2e('0x61')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x2]?_0x11598e[_0x3d2e('0x58')][0x2]['value']:undefined)||0xc}];case _0x3d2e('0x62'):return[{'name':_0x3d2e('0x63'),'value':_0x11598e[_0x3d2e('0x63')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e['attrs'][0x0]?_0x11598e['attrs'][0x0][_0x3d2e('0x59')]:undefined)||_0x3d2e('0x64')},{'name':_0x3d2e('0x65'),'value':_0x11598e[_0x3d2e('0x65')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x1]?_0x11598e[_0x3d2e('0x58')][0x1][_0x3d2e('0x59')]:undefined)||[]},{'name':_0x3d2e('0x61'),'value':_0x11598e[_0x3d2e('0x61')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x2]?_0x11598e[_0x3d2e('0x58')][0x2][_0x3d2e('0x59')]:undefined)||0x14}];case'multibar-chart':case _0x3d2e('0x66'):return[{'name':_0x3d2e('0x67'),'value':_0x11598e[_0x3d2e('0x67')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x0]?_0x11598e['attrs'][0x0][_0x3d2e('0x59')]:undefined)||'total'},{'name':_0x3d2e('0x68'),'value':_0x11598e['attrSerie2']||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x1]?_0x11598e['attrs'][0x1][_0x3d2e('0x59')]:undefined)||null},{'name':_0x3d2e('0x69'),'value':_0x11598e[_0x3d2e('0x69')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x2]?_0x11598e[_0x3d2e('0x58')][0x2]['value']:undefined)||null},{'name':'attrVoiceQueues','value':_0x11598e[_0x3d2e('0x65')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x3]?_0x11598e[_0x3d2e('0x58')][0x3][_0x3d2e('0x59')]:undefined)||[]}];case'web-report':return[{'name':_0x3d2e('0x6a'),'type':_0x11598e[_0x3d2e('0x6b')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x0]?_0x11598e[_0x3d2e('0x58')][0x0]['type']:undefined)||null,'value':_0x11598e[_0x3d2e('0x6a')]||(_0x11598e[_0x3d2e('0x58')]&&_0x11598e[_0x3d2e('0x58')][0x0]?_0x11598e[_0x3d2e('0x58')][0x0][_0x3d2e('0x59')]:undefined)||null},{'name':_0x3d2e('0x6c'),'value':_0x11598e[_0x3d2e('0x6c')]||(_0x11598e['attrs']&&_0x11598e['attrs'][0x1]?_0x11598e[_0x3d2e('0x58')][0x1][_0x3d2e('0x59')]:undefined)||0x0}];default:return[];}}catch(_0x3601c1){logger[_0x3d2e('0x51')]('widgetAttributes:\x20%s',JSON[_0x3d2e('0x6d')](_0x3601c1));return[];}}exports[_0x3d2e('0x6e')]=function(_0x2b65b0,_0x472a84,_0x40751d){if(_0x2b65b0['body']['id']){delete _0x2b65b0['body']['id'];}return db[_0x3d2e('0x2e')][_0x3d2e('0x47')]({'where':{'id':_0x2b65b0['params']['id']}})['then'](handleEntityNotFound(_0x472a84,null))[_0x3d2e('0x27')](function(_0x398cb2){if(_0x398cb2){_0x2b65b0[_0x3d2e('0x49')][_0x3d2e('0x6f')]=_0x398cb2['id'];_0x2b65b0[_0x3d2e('0x49')]['attrs']=widgetAttributes(_0x2b65b0[_0x3d2e('0x49')]);return db[_0x3d2e('0x70')][_0x3d2e('0x48')](_0x2b65b0[_0x3d2e('0x49')]);}})[_0x3d2e('0x27')](respondWithResult(_0x472a84,null))['catch'](handleError(_0x472a84,null));};exports['getItems']=function(_0x2ff412,_0x2305e5,_0x2be736){var _0xc58d13={};var _0x28dd09={};var _0x51129a;var _0x56e989;return db[_0x3d2e('0x2e')]['findOne']({'where':{'id':_0x2ff412[_0x3d2e('0x45')]['id']}})[_0x3d2e('0x27')](handleEntityNotFound(_0x2305e5,null))[_0x3d2e('0x27')](function(_0x24d7fb){if(_0x24d7fb){_0x51129a=_0x24d7fb;_0x28dd09['model']=_[_0x3d2e('0x34')](db[_0x3d2e('0x70')]['rawAttributes']);_0x28dd09[_0x3d2e('0x37')]=_['keys'](_0x2ff412[_0x3d2e('0x37')]);_0x28dd09[_0x3d2e('0x35')]=_[_0x3d2e('0x36')](_0x28dd09[_0x3d2e('0x33')],_0x28dd09[_0x3d2e('0x37')]);_0xc58d13[_0x3d2e('0x38')]=_[_0x3d2e('0x36')](_0x28dd09[_0x3d2e('0x33')],qs['fields'](_0x2ff412[_0x3d2e('0x37')][_0x3d2e('0x39')]));_0xc58d13['attributes']=_0xc58d13['attributes'][_0x3d2e('0x3a')]?_0xc58d13[_0x3d2e('0x38')]:_0x28dd09[_0x3d2e('0x33')];_0xc58d13[_0x3d2e('0x3c')]=qs[_0x3d2e('0x3d')](_0x2ff412[_0x3d2e('0x37')][_0x3d2e('0x3d')]);_0xc58d13[_0x3d2e('0x3e')]=qs[_0x3d2e('0x35')](_[_0x3d2e('0x3f')](_0x2ff412[_0x3d2e('0x37')],_0x28dd09['filters']));if(_0x2ff412[_0x3d2e('0x37')][_0x3d2e('0x40')]){_0xc58d13[_0x3d2e('0x3e')]=_[_0x3d2e('0x41')](_0xc58d13[_0x3d2e('0x3e')],{'$or':_[_0x3d2e('0x2d')](_0xc58d13[_0x3d2e('0x38')],function(_0x2a5841){var _0x3b3b86={};_0x3b3b86[_0x2a5841]={'$like':'%'+_0x2ff412['query'][_0x3d2e('0x40')]+'%'};return _0x3b3b86;})});}_0xc58d13=_[_0x3d2e('0x41')]({},_0xc58d13,_0x2ff412[_0x3d2e('0x42')]);return _0x51129a['getItems'](_0xc58d13);}})[_0x3d2e('0x27')](function(_0x322eb5){if(_0x322eb5){_0x56e989=_0x322eb5[_0x3d2e('0x3a')];if(!_0x2ff412[_0x3d2e('0x37')][_0x3d2e('0x3b')](_0x3d2e('0x71'))){_0xc58d13[_0x3d2e('0x21')]=qs[_0x3d2e('0x21')](_0x2ff412[_0x3d2e('0x37')][_0x3d2e('0x21')]);_0xc58d13['offset']=qs[_0x3d2e('0x20')](_0x2ff412[_0x3d2e('0x37')][_0x3d2e('0x20')]);}return _0x51129a[_0x3d2e('0x72')](_0xc58d13);}})[_0x3d2e('0x27')](function(_0x5f3698){if(_0x5f3698){return _0x5f3698?{'count':_0x56e989,'rows':_0x5f3698}:null;}})[_0x3d2e('0x27')](respondWithResult(_0x2305e5,null))[_0x3d2e('0x44')](handleError(_0x2305e5,null));};
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js
index d2d92bc..91f0be3 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 _0x4a3a=['emit','hasOwnProperty','hook','../../mysqldb','Dashboard','setMaxListeners','save','update','remove'];(function(_0x329aaa,_0x38ab7e){var _0x33c3bc=function(_0x17c0d8){while(--_0x17c0d8){_0x329aaa['push'](_0x329aaa['shift']());}};_0x33c3bc(++_0x38ab7e);}(_0x4a3a,0x18f));var _0xa4a3=function(_0xb5394,_0x54c4fe){_0xb5394=_0xb5394-0x0;var _0x4e60f0=_0x4a3a[_0xb5394];return _0x4e60f0;};'use strict';var EventEmitter=require('events');var Dashboard=require(_0xa4a3('0x0'))['db'][_0xa4a3('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xa4a3('0x2')](0x0);var events={'afterCreate':_0xa4a3('0x3'),'afterUpdate':_0xa4a3('0x4'),'afterDestroy':_0xa4a3('0x5')};function emitEvent(_0x5290a8){return function(_0x129714,_0x2c5644,_0x2e8615){DashboardEvents['emit'](_0x5290a8+':'+_0x129714['id'],_0x129714);DashboardEvents[_0xa4a3('0x6')](_0x5290a8,_0x129714);_0x2e8615(null);};}for(var e in events){if(events[_0xa4a3('0x7')](e)){var event=events[e];Dashboard[_0xa4a3('0x8')](e,emitEvent(event));}}module['exports']=DashboardEvents;
\ No newline at end of file
+var _0x5765=['hook','exports','setMaxListeners','save','update','emit','hasOwnProperty'];(function(_0x1da9bc,_0x4bd9c8){var _0x51878f=function(_0x5c6e0f){while(--_0x5c6e0f){_0x1da9bc['push'](_0x1da9bc['shift']());}};_0x51878f(++_0x4bd9c8);}(_0x5765,0x87));var _0x5576=function(_0x5a5395,_0x5361f6){_0x5a5395=_0x5a5395-0x0;var _0x4da43d=_0x5765[_0x5a5395];return _0x4da43d;};'use strict';var EventEmitter=require('events');var Dashboard=require('../../mysqldb')['db']['Dashboard'];var DashboardEvents=new EventEmitter();DashboardEvents[_0x5576('0x0')](0x0);var events={'afterCreate':_0x5576('0x1'),'afterUpdate':_0x5576('0x2'),'afterDestroy':'remove'};function emitEvent(_0x41e417){return function(_0x59434f,_0x4324a3,_0x2620c7){DashboardEvents[_0x5576('0x3')](_0x41e417+':'+_0x59434f['id'],_0x59434f);DashboardEvents[_0x5576('0x3')](_0x41e417,_0x59434f);_0x2620c7(null);};}for(var e in events){if(events[_0x5576('0x4')](e)){var event=events[e];Dashboard[_0x5576('0x5')](e,emitEvent(event));}}module[_0x5576('0x6')]=DashboardEvents;
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.model.js b/server/api/dashboard/dashboard.model.js
index 215372c..a6e75d0 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 _0x4c83=['../../config/environment','exports','define','Dashboard','lodash','moment','bluebird','request-promise','path','rimraf'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4c83,0x90));var _0x34c8=function(_0x4e1964,_0x4a62cc){_0x4e1964=_0x4e1964-0x0;var _0x2c6881=_0x4c83[_0x4e1964];return _0x2c6881;};'use strict';var _=require(_0x34c8('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x34c8('0x1'));var BPromise=require(_0x34c8('0x2'));var rp=require(_0x34c8('0x3'));var fs=require('fs');var path=require(_0x34c8('0x4'));var rimraf=require(_0x34c8('0x5'));var config=require(_0x34c8('0x6'));var attributes=require('./dashboard.attributes');module[_0x34c8('0x7')]=function(_0x509e3f,_0x12ca30){return _0x509e3f[_0x34c8('0x8')](_0x34c8('0x9'),attributes,{'tableName':'dashboards','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc6c9=['Dashboard','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define'];(function(_0x858576,_0x4f0c25){var _0x7a7198=function(_0x52e7c2){while(--_0x52e7c2){_0x858576['push'](_0x858576['shift']());}};_0x7a7198(++_0x4f0c25);}(_0xc6c9,0x97));var _0x9c6c=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xc6c9[_0x3b380d];return _0x54502b;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x9c6c('0x0'));var moment=require(_0x9c6c('0x1'));var BPromise=require(_0x9c6c('0x2'));var rp=require(_0x9c6c('0x3'));var fs=require('fs');var path=require(_0x9c6c('0x4'));var rimraf=require(_0x9c6c('0x5'));var config=require(_0x9c6c('0x6'));var attributes=require('./dashboard.attributes');module[_0x9c6c('0x7')]=function(_0x15cc17,_0x2eaa9a){return _0x15cc17[_0x9c6c('0x8')](_0x9c6c('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 a74cbc4..853770a 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 _0xdf77=['message','info','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','redis','defaults','socket.io-emitter','./dashboard.socket','register','request','then','Dashboard,\x20%s,\x20%s','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x5a1b57,_0x2563ea){var _0x4bdcf0=function(_0x14bc15){while(--_0x14bc15){_0x5a1b57['push'](_0x5a1b57['shift']());}};_0x4bdcf0(++_0x2563ea);}(_0xdf77,0x138));var _0x7df7=function(_0x322ecc,_0x497794){_0x322ecc=_0x322ecc-0x0;var _0x3071b3=_0xdf77[_0x322ecc];return _0x3071b3;};'use strict';var _=require(_0x7df7('0x0'));var util=require(_0x7df7('0x1'));var moment=require('moment');var BPromise=require(_0x7df7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7df7('0x3'));var db=require(_0x7df7('0x4'))['db'];var utils=require(_0x7df7('0x5'));var logger=require(_0x7df7('0x6'))(_0x7df7('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7df7('0x8')][_0x7df7('0x9')]({'port':0x232a});config[_0x7df7('0xa')]=_[_0x7df7('0xb')](config[_0x7df7('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x7df7('0xc'))(new Redis(config[_0x7df7('0xa')]));require(_0x7df7('0xd'))[_0x7df7('0xe')](socket);function respondWithRpcPromise(_0x4f5de1,_0x24158a,_0xe9b81c){return new BPromise(function(_0x56bde3,_0x43c4dd){return client[_0x7df7('0xf')](_0x4f5de1,_0xe9b81c)[_0x7df7('0x10')](function(_0x571548){logger['info'](_0x7df7('0x11'),_0x24158a,_0x7df7('0x12'));logger[_0x7df7('0x13')](_0x7df7('0x14'),_0x24158a,_0x7df7('0x12'),JSON[_0x7df7('0x15')](_0x571548));if(_0x571548['error']){if(_0x571548[_0x7df7('0x16')][_0x7df7('0x17')]===0x1f4){logger['error']('Dashboard,\x20%s,\x20%s',_0x24158a,_0x571548[_0x7df7('0x16')][_0x7df7('0x18')]);return _0x43c4dd(_0x571548[_0x7df7('0x16')][_0x7df7('0x18')]);}logger[_0x7df7('0x16')](_0x7df7('0x11'),_0x24158a,_0x571548[_0x7df7('0x16')][_0x7df7('0x18')]);return _0x56bde3(_0x571548[_0x7df7('0x16')][_0x7df7('0x18')]);}else{logger[_0x7df7('0x19')](_0x7df7('0x11'),_0x24158a,_0x7df7('0x12'));_0x56bde3(_0x571548[_0x7df7('0x1a')][_0x7df7('0x18')]);}})[_0x7df7('0x1b')](function(_0x55b208){logger[_0x7df7('0x16')](_0x7df7('0x11'),_0x24158a,_0x55b208);_0x43c4dd(_0x55b208);});});}
\ No newline at end of file
+var _0x2424=['ioredis','../../mysqldb','../../config/logger','rpc','client','http','defaults','redis','localhost','socket.io-emitter','./dashboard.socket','register','request','then','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','bluebird','randomstring'];(function(_0x38fb5e,_0x2d0526){var _0x2f5278=function(_0x1e4576){while(--_0x1e4576){_0x38fb5e['push'](_0x38fb5e['shift']());}};_0x2f5278(++_0x2d0526);}(_0x2424,0x10a));var _0x4242=function(_0x48522d,_0x3e5fea){_0x48522d=_0x48522d-0x0;var _0x5b328b=_0x2424[_0x48522d];return _0x5b328b;};'use strict';var _=require(_0x4242('0x0'));var util=require(_0x4242('0x1'));var moment=require('moment');var BPromise=require(_0x4242('0x2'));var rs=require(_0x4242('0x3'));var fs=require('fs');var Redis=require(_0x4242('0x4'));var db=require(_0x4242('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x4242('0x6'))(_0x4242('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x4242('0x8')][_0x4242('0x9')]({'port':0x232a});config['redis']=_[_0x4242('0xa')](config[_0x4242('0xb')],{'host':_0x4242('0xc'),'port':0x18eb});var socket=require(_0x4242('0xd'))(new Redis(config[_0x4242('0xb')]));require(_0x4242('0xe'))[_0x4242('0xf')](socket);function respondWithRpcPromise(_0x26b3d1,_0x449861,_0xfb6eb6){return new BPromise(function(_0x2f0c1a,_0x43facd){return client[_0x4242('0x10')](_0x26b3d1,_0xfb6eb6)[_0x4242('0x11')](function(_0x323b54){logger[_0x4242('0x12')](_0x4242('0x13'),_0x449861,_0x4242('0x14'));logger[_0x4242('0x15')]('Dashboard,\x20%s,\x20%s,\x20%s',_0x449861,_0x4242('0x14'),JSON[_0x4242('0x16')](_0x323b54));if(_0x323b54[_0x4242('0x17')]){if(_0x323b54['error']['code']===0x1f4){logger[_0x4242('0x17')](_0x4242('0x13'),_0x449861,_0x323b54[_0x4242('0x17')][_0x4242('0x18')]);return _0x43facd(_0x323b54['error']['message']);}logger['error']('Dashboard,\x20%s,\x20%s',_0x449861,_0x323b54[_0x4242('0x17')]['message']);return _0x2f0c1a(_0x323b54[_0x4242('0x17')][_0x4242('0x18')]);}else{logger[_0x4242('0x12')](_0x4242('0x13'),_0x449861,_0x4242('0x14'));_0x2f0c1a(_0x323b54[_0x4242('0x19')][_0x4242('0x18')]);}})[_0x4242('0x1a')](function(_0x1887de){logger['error']('Dashboard,\x20%s,\x20%s',_0x449861,_0x1887de);_0x43facd(_0x1887de);});});}
\ No newline at end of file
diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js
index dd28a21..446131d 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 _0xa2c6=['remove','update','emit','register','dashboard:','./dashboard.events','save'];(function(_0x7b5cee,_0x165c1b){var _0x5b1278=function(_0x34ffc5){while(--_0x34ffc5){_0x7b5cee['push'](_0x7b5cee['shift']());}};_0x5b1278(++_0x165c1b);}(_0xa2c6,0xd0));var _0x6a2c=function(_0x18cac4,_0x57a4d5){_0x18cac4=_0x18cac4-0x0;var _0x2227c6=_0xa2c6[_0x18cac4];return _0x2227c6;};'use strict';var DashboardEvents=require(_0x6a2c('0x0'));var events=[_0x6a2c('0x1'),_0x6a2c('0x2'),_0x6a2c('0x3')];function createListener(_0x83dbc4,_0x2b94b6){return function(_0x364d75){_0x2b94b6[_0x6a2c('0x4')](_0x83dbc4,_0x364d75);};}function removeListener(_0x4ee38e,_0x28b402){return function(){DashboardEvents['removeListener'](_0x4ee38e,_0x28b402);};}exports[_0x6a2c('0x5')]=function(_0x4c6981){for(var _0x63385f=0x0,_0x18d30d=events['length'];_0x63385f<_0x18d30d;_0x63385f++){var _0x12447d=events[_0x63385f];var _0x317dd7=createListener(_0x6a2c('0x6')+_0x12447d,_0x4c6981);DashboardEvents['on'](_0x12447d,_0x317dd7);}};
\ No newline at end of file
+var _0x8d0f=['update','emit','register','length','dashboard:','save'];(function(_0x50982e,_0x106bf2){var _0xe3710d=function(_0x4af44d){while(--_0x4af44d){_0x50982e['push'](_0x50982e['shift']());}};_0xe3710d(++_0x106bf2);}(_0x8d0f,0x1d9));var _0xf8d0=function(_0x246c77,_0xdf8952){_0x246c77=_0x246c77-0x0;var _0x2d3c16=_0x8d0f[_0x246c77];return _0x2d3c16;};'use strict';var DashboardEvents=require('./dashboard.events');var events=[_0xf8d0('0x0'),'remove',_0xf8d0('0x1')];function createListener(_0x5ce5f9,_0x2474f5){return function(_0x54f271){_0x2474f5[_0xf8d0('0x2')](_0x5ce5f9,_0x54f271);};}function removeListener(_0x21a0fc,_0x43492c){return function(){DashboardEvents['removeListener'](_0x21a0fc,_0x43492c);};}exports[_0xf8d0('0x3')]=function(_0x72e583){for(var _0x342a81=0x0,_0x3b8f8c=events[_0xf8d0('0x4')];_0x342a81<_0x3b8f8c;_0x342a81++){var _0x52970a=events[_0x342a81];var _0x4f0180=createListener(_0xf8d0('0x5')+_0x52970a,_0x72e583);DashboardEvents['on'](_0x52970a,_0x4f0180);}};
\ No newline at end of file
diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js
index 592a11a..3aac91c 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 _0x0713=['exports','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./dashboard.controller','get','isAuthenticated','index','/:id','show','/:id/items','getItems','create','post','/:id/clone','addItem','put','update'];(function(_0x5cd3fa,_0x1637fc){var _0x1bb81f=function(_0x57edf8){while(--_0x57edf8){_0x5cd3fa['push'](_0x5cd3fa['shift']());}};_0x1bb81f(++_0x1637fc);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var auth=require(_0x3071('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x3071('0x5'));var controller=require(_0x3071('0x6'));router[_0x3071('0x7')]('/',auth[_0x3071('0x8')](),controller[_0x3071('0x9')]);router[_0x3071('0x7')](_0x3071('0xa'),auth[_0x3071('0x8')](),controller[_0x3071('0xb')]);router[_0x3071('0x7')](_0x3071('0xc'),auth[_0x3071('0x8')](),controller[_0x3071('0xd')]);router['post']('/',auth[_0x3071('0x8')](),controller[_0x3071('0xe')]);router[_0x3071('0xf')](_0x3071('0x10'),auth[_0x3071('0x8')](),controller['clone']);router[_0x3071('0xf')](_0x3071('0xc'),auth[_0x3071('0x8')](),controller[_0x3071('0x11')]);router[_0x3071('0x12')]('/:id',auth['isAuthenticated'](),controller[_0x3071('0x13')]);router['delete'](_0x3071('0xa'),auth[_0x3071('0x8')](),controller['destroy']);module[_0x3071('0x14')]=router;
\ No newline at end of file
+var _0xe706=['../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboard.controller','get','isAuthenticated','index','/:id','show','/:id/items','getItems','post','create','/:id/clone','clone','addItem','put','update','delete','multer','util','path','express','Router'];(function(_0x23a673,_0x31e4bc){var _0x2213b7=function(_0x3c5dcc){while(--_0x3c5dcc){_0x23a673['push'](_0x23a673['shift']());}};_0x2213b7(++_0x31e4bc);}(_0xe706,0xa3));var _0x6e70=function(_0x2064c8,_0x168039){_0x2064c8=_0x2064c8-0x0;var _0x23af73=_0xe706[_0x2064c8];return _0x23af73;};'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('0x10')]('/',auth[_0x6e70('0xa')](),controller[_0x6e70('0x11')]);router[_0x6e70('0x10')](_0x6e70('0x12'),auth[_0x6e70('0xa')](),controller[_0x6e70('0x13')]);router['post']('/:id/items',auth[_0x6e70('0xa')](),controller[_0x6e70('0x14')]);router[_0x6e70('0x15')](_0x6e70('0xc'),auth[_0x6e70('0xa')](),controller[_0x6e70('0x16')]);router[_0x6e70('0x17')](_0x6e70('0xc'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.attributes.js b/server/api/dashboardItem/dashboardItem.attributes.js
index 01f2be9..cd131d0 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 _0x8fc3=['attrs','setDataValue','stringify','INTEGER','#ffffff','#2196f3','sequelize','lodash','exports','STRING','TEXT','long','parse','getDataValue'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x8fc3,0xae));var _0x38fc=function(_0x514260,_0x1891e1){_0x514260=_0x514260-0x0;var _0x4ac81b=_0x8fc3[_0x514260];return _0x4ac81b;};'use strict';var Sequelize=require(_0x38fc('0x0'));var squel=require('squel');var _=require(_0x38fc('0x1'));module[_0x38fc('0x2')]={'title':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x38fc('0x3')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x38fc('0x4')](_0x38fc('0x5')),'get':function(){try{return JSON[_0x38fc('0x6')](this[_0x38fc('0x7')](_0x38fc('0x8')));}catch(_0x306610){return[];}},'set':function(_0x490cf6){try{this[_0x38fc('0x9')]('attrs',JSON[_0x38fc('0xa')](_0x490cf6));}catch(_0x3eba74){this[_0x38fc('0x9')](_0x38fc('0x8'),JSON[_0x38fc('0xa')]([]));}}},'sizeX':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x38fc('0xb')]},'col':{'type':Sequelize[_0x38fc('0xb')]},'background':{'type':Sequelize[_0x38fc('0x3')],'allowNull':![],'defaultValue':_0x38fc('0xc'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize[_0x38fc('0x3')],'allowNull':![],'defaultValue':_0x38fc('0xd'),'validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x38fc('0x3')]}};
\ No newline at end of file
+var _0xa58d=['long','parse','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff','#2196f3','squel','exports','STRING','TEXT'];(function(_0x32f75b,_0x16cde7){var _0x26f5c7=function(_0x2f80b8){while(--_0x2f80b8){_0x32f75b['push'](_0x32f75b['shift']());}};_0x26f5c7(++_0x16cde7);}(_0xa58d,0x7e));var _0xda58=function(_0x75d890,_0x2aee0b){_0x75d890=_0x75d890-0x0;var _0xf90253=_0xa58d[_0x75d890];return _0xf90253;};'use strict';var Sequelize=require('sequelize');var squel=require(_0xda58('0x0'));var _=require('lodash');module[_0xda58('0x1')]={'title':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xda58('0x2')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0xda58('0x3')](_0xda58('0x4')),'get':function(){try{return JSON[_0xda58('0x5')](this[_0xda58('0x6')](_0xda58('0x7')));}catch(_0x21fac2){return[];}},'set':function(_0x48e412){try{this[_0xda58('0x8')](_0xda58('0x7'),JSON[_0xda58('0x9')](_0x48e412));}catch(_0x5ea178){this[_0xda58('0x8')](_0xda58('0x7'),JSON[_0xda58('0x9')]([]));}}},'sizeX':{'type':Sequelize[_0xda58('0xa')],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0xda58('0xa')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize['INTEGER']},'col':{'type':Sequelize[_0xda58('0xa')]},'background':{'type':Sequelize[_0xda58('0x2')],'allowNull':![],'defaultValue':_0xda58('0xb'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize[_0xda58('0x2')],'allowNull':![],'defaultValue':_0xda58('0xc'),'validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0xda58('0x2')]}};
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.controller.js b/server/api/dashboardItem/dashboardItem.controller.js
index c86ba63..0bc4979 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 _0x552c=['rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','./dashboardItem.socket','status','end','count','offset','limit','set','Content-Range','apply','save','update','then','sendStatus','name','send','show','params','model','keys','DashboardItem','rawAttributes','query','filters','intersection','fields','attributes','length','includeAll','merge','options','find','catch','destroy','type','iframe','attrUrl','attrs','https://','custom','attrPath','attrHourFormat','value','HH:mm:ss','attrTimezone','attrFontSize','attrMetric','attrVoiceQueues','multibar-chart','pie-chart','attrSerie1','total','attrSerie3','web-report','attrReport','reportType','attrRefresh','error','widgetAttributes:\x20%s','stringify','create','body','html-pdf','eml-format'];(function(_0x315002,_0x4ee032){var _0x54e480=function(_0x4683bc){while(--_0x4683bc){_0x315002['push'](_0x315002['shift']());}};_0x54e480(++_0x4ee032);}(_0x552c,0xb2));var _0xc552=function(_0x2869f8,_0x9756fb){_0x2869f8=_0x2869f8-0x0;var _0x2a9fe6=_0x552c[_0x2869f8];return _0x2a9fe6;};'use strict';var pdf=require(_0xc552('0x0'));var emlformat=require(_0xc552('0x1'));var rimraf=require(_0xc552('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc552('0x3'));var rp=require(_0xc552('0x4'));var moment=require(_0xc552('0x5'));var BPromise=require(_0xc552('0x6'));var Mustache=require(_0xc552('0x7'));var util=require(_0xc552('0x8'));var path=require(_0xc552('0x9'));var sox=require(_0xc552('0xa'));var csv=require(_0xc552('0xb'));var ejs=require(_0xc552('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0xc552('0xd'));var crypto=require(_0xc552('0xe'));var jsforce=require(_0xc552('0xf'));var deskjs=require(_0xc552('0x10'));var toCsv=require('to-csv');var querystring=require(_0xc552('0x11'));var Papa=require(_0xc552('0x12'));var Redis=require(_0xc552('0x13'));var authService=require(_0xc552('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc552('0x15'));var logger=require(_0xc552('0x16'))(_0xc552('0x17'));var utils=require(_0xc552('0x18'));var config=require(_0xc552('0x19'));var db=require(_0xc552('0x1a'))['db'];config['redis']=_['defaults'](config[_0xc552('0x1b')],{'host':_0xc552('0x1c'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc552('0x1b')]));require(_0xc552('0x1d'))['register'](socket);function respondWithStatusCode(_0x1bbd27,_0x3eadbb){_0x3eadbb=_0x3eadbb||0xcc;return function(_0x23f6e5){if(_0x23f6e5){return _0x1bbd27['sendStatus'](_0x3eadbb);}return _0x1bbd27[_0xc552('0x1e')](_0x3eadbb)[_0xc552('0x1f')]();};}function respondWithResult(_0x230de0,_0x4aa587){_0x4aa587=_0x4aa587||0xc8;return function(_0x2b50f5){if(_0x2b50f5){return _0x230de0[_0xc552('0x1e')](_0x4aa587)['json'](_0x2b50f5);}};}function respondWithFilteredResult(_0x4bab0d,_0xf393d3){return function(_0x1002ce){if(_0x1002ce){var _0x5e1a0d=_0x1002ce[_0xc552('0x20')],_0x5c4eaa=_0xf393d3[_0xc552('0x21')],_0xfff49c=_0xf393d3[_0xc552('0x21')]+_0xf393d3[_0xc552('0x22')],_0x39c0be;if(_0xfff49c>=_0x5e1a0d){_0xfff49c=_0x5e1a0d;_0x39c0be=0xc8;}else{_0x39c0be=0xce;}_0x4bab0d[_0xc552('0x1e')](_0x39c0be);return _0x4bab0d[_0xc552('0x23')](_0xc552('0x24'),_0x5c4eaa+'-'+_0xfff49c+'/'+_0x5e1a0d)['json'](_0x1002ce);}return null;};}function patchUpdates(_0x3a2ead){return function(_0x476313){try{jsonpatch[_0xc552('0x25')](_0x476313,_0x3a2ead,!![]);}catch(_0x4bf01a){return BPromise['reject'](_0x4bf01a);}return _0x476313[_0xc552('0x26')]();};}function saveUpdates(_0x1e6f08,_0x2b918f){return function(_0x331fa6){if(_0x331fa6){return _0x331fa6[_0xc552('0x27')](_0x1e6f08)[_0xc552('0x28')](function(_0x17e12f){return _0x17e12f;});}return null;};}function removeEntity(_0x289b7d,_0x2e49cd){return function(_0x141cb2){if(_0x141cb2){return _0x141cb2['destroy']()['then'](function(){_0x289b7d[_0xc552('0x1e')](0xcc)[_0xc552('0x1f')]();});}};}function handleEntityNotFound(_0x5524b5,_0x1493b4){return function(_0x4e493c){if(!_0x4e493c){_0x5524b5[_0xc552('0x29')](0x194);}return _0x4e493c;};}function handleError(_0x23a457,_0x47cc30){_0x47cc30=_0x47cc30||0x1f4;return function(_0x7909e0){logger['error'](_0x7909e0['stack']);if(_0x7909e0[_0xc552('0x2a')]){delete _0x7909e0[_0xc552('0x2a')];}_0x23a457[_0xc552('0x1e')](_0x47cc30)[_0xc552('0x2b')](_0x7909e0);};}exports[_0xc552('0x2c')]=function(_0x1e1d44,_0x3dd9a6){var _0x4e23d6={'raw':![],'where':{'id':_0x1e1d44[_0xc552('0x2d')]['id']}},_0x309e77={};_0x309e77[_0xc552('0x2e')]=_[_0xc552('0x2f')](db[_0xc552('0x30')][_0xc552('0x31')]);_0x309e77[_0xc552('0x32')]=_[_0xc552('0x2f')](_0x1e1d44[_0xc552('0x32')]);_0x309e77[_0xc552('0x33')]=_[_0xc552('0x34')](_0x309e77[_0xc552('0x2e')],_0x309e77['query']);_0x4e23d6['attributes']=_[_0xc552('0x34')](_0x309e77[_0xc552('0x2e')],qs[_0xc552('0x35')](_0x1e1d44[_0xc552('0x32')][_0xc552('0x35')]));_0x4e23d6[_0xc552('0x36')]=_0x4e23d6[_0xc552('0x36')][_0xc552('0x37')]?_0x4e23d6[_0xc552('0x36')]:_0x309e77['model'];if(_0x1e1d44['query'][_0xc552('0x38')]){_0x4e23d6['include']=[{'all':!![]}];}_0x4e23d6=_[_0xc552('0x39')]({},_0x4e23d6,_0x1e1d44[_0xc552('0x3a')]);return db['DashboardItem'][_0xc552('0x3b')](_0x4e23d6)['then'](handleEntityNotFound(_0x3dd9a6,null))['then'](respondWithResult(_0x3dd9a6,null))[_0xc552('0x3c')](handleError(_0x3dd9a6,null));};exports[_0xc552('0x3d')]=function(_0x12be3b,_0x2ddf99){return db[_0xc552('0x30')][_0xc552('0x3b')]({'where':{'id':_0x12be3b['params']['id']}})[_0xc552('0x28')](handleEntityNotFound(_0x2ddf99,null))['then'](removeEntity(_0x2ddf99,null))['catch'](handleError(_0x2ddf99,null));};function widgetAttributes(_0x31552d){try{switch(_0x31552d[_0xc552('0x3e')]){case _0xc552('0x3f'):return[{'name':_0xc552('0x40'),'value':_0x31552d[_0xc552('0x40')]||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x0]?_0x31552d[_0xc552('0x41')][0x0]['value']:undefined)||_0xc552('0x42')}];case _0xc552('0x43'):return[{'name':_0xc552('0x44'),'value':_0x31552d[_0xc552('0x44')]||(_0x31552d[_0xc552('0x41')]&&_0x31552d['attrs'][0x0]?_0x31552d['attrs'][0x0]['value']:undefined)||''}];case'clock':return[{'name':_0xc552('0x45'),'value':_0x31552d['attrHourFormat']||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x0]?_0x31552d[_0xc552('0x41')][0x0][_0xc552('0x46')]:undefined)||_0xc552('0x47')},{'name':_0xc552('0x48'),'value':_0x31552d[_0xc552('0x48')]||(_0x31552d['attrs']&&_0x31552d[_0xc552('0x41')][0x1]?_0x31552d['attrs'][0x1][_0xc552('0x46')]:undefined)||'0.00'},{'name':_0xc552('0x49'),'value':_0x31552d['attrFontSize']||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x2]?_0x31552d[_0xc552('0x41')][0x2]['value']:undefined)||0xc}];case'counter':return[{'name':_0xc552('0x4a'),'value':_0x31552d[_0xc552('0x4a')]||(_0x31552d['attrs']&&_0x31552d[_0xc552('0x41')][0x0]?_0x31552d[_0xc552('0x41')][0x0][_0xc552('0x46')]:undefined)||'total'},{'name':_0xc552('0x4b'),'value':_0x31552d[_0xc552('0x4b')]||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x1]?_0x31552d[_0xc552('0x41')][0x1]['value']:undefined)||[]},{'name':'attrFontSize','value':_0x31552d[_0xc552('0x49')]||(_0x31552d['attrs']&&_0x31552d[_0xc552('0x41')][0x2]?_0x31552d[_0xc552('0x41')][0x2][_0xc552('0x46')]:undefined)||0x14}];case _0xc552('0x4c'):case _0xc552('0x4d'):return[{'name':_0xc552('0x4e'),'value':_0x31552d[_0xc552('0x4e')]||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x0]?_0x31552d[_0xc552('0x41')][0x0]['value']:undefined)||_0xc552('0x4f')},{'name':'attrSerie2','value':_0x31552d['attrSerie2']||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x1]?_0x31552d['attrs'][0x1][_0xc552('0x46')]:undefined)||null},{'name':_0xc552('0x50'),'value':_0x31552d[_0xc552('0x50')]||(_0x31552d['attrs']&&_0x31552d[_0xc552('0x41')][0x2]?_0x31552d['attrs'][0x2]['value']:undefined)||null},{'name':'attrVoiceQueues','value':_0x31552d[_0xc552('0x4b')]||(_0x31552d['attrs']&&_0x31552d[_0xc552('0x41')][0x3]?_0x31552d[_0xc552('0x41')][0x3][_0xc552('0x46')]:undefined)||[]}];case _0xc552('0x51'):return[{'name':_0xc552('0x52'),'type':_0x31552d[_0xc552('0x53')]||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x0]?_0x31552d[_0xc552('0x41')][0x0][_0xc552('0x3e')]:undefined)||null,'value':_0x31552d[_0xc552('0x52')]||(_0x31552d[_0xc552('0x41')]&&_0x31552d[_0xc552('0x41')][0x0]?_0x31552d[_0xc552('0x41')][0x0][_0xc552('0x46')]:undefined)||null},{'name':_0xc552('0x54'),'value':_0x31552d['attrRefresh']||(_0x31552d['attrs']&&_0x31552d[_0xc552('0x41')][0x1]?_0x31552d['attrs'][0x1][_0xc552('0x46')]:undefined)||0x0}];default:return[];}}catch(_0x48ca01){logger[_0xc552('0x55')](_0xc552('0x56'),JSON[_0xc552('0x57')](_0x48ca01));return[];}}exports[_0xc552('0x58')]=function(_0x506632,_0x106234){if(_0x506632['body']){_0x506632[_0xc552('0x59')][_0xc552('0x41')]=widgetAttributes(_0x506632[_0xc552('0x59')]);}return db[_0xc552('0x30')][_0xc552('0x58')](_0x506632[_0xc552('0x59')],{})[_0xc552('0x28')](respondWithResult(_0x106234,0xc9))['catch'](handleError(_0x106234,null));};exports[_0xc552('0x27')]=function(_0x3bebf2,_0x221bd3){if(_0x3bebf2[_0xc552('0x59')]['id']){delete _0x3bebf2[_0xc552('0x59')]['id'];}_0x3bebf2[_0xc552('0x59')][_0xc552('0x41')]=widgetAttributes(_0x3bebf2['body']);return db[_0xc552('0x30')][_0xc552('0x3b')]({'where':{'id':_0x3bebf2[_0xc552('0x2d')]['id']}})[_0xc552('0x28')](handleEntityNotFound(_0x221bd3,null))[_0xc552('0x28')](saveUpdates(_0x3bebf2[_0xc552('0x59')],null))['then'](respondWithResult(_0x221bd3,null))[_0xc552('0x3c')](handleError(_0x221bd3,null));};
\ No newline at end of file
+var _0xd1e0=['desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','save','then','destroy','stack','name','send','show','params','model','keys','DashboardItem','query','filters','attributes','intersection','length','include','merge','options','find','catch','iframe','attrUrl','attrs','https://','custom','attrPath','value','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','attrVoiceQueues','multibar-chart','pie-chart','attrSerie1','total','attrSerie2','attrSerie3','web-report','type','attrReport','attrRefresh','error','widgetAttributes:\x20%s','stringify','create','body','update','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','lodash','squel','crypto','jsforce'];(function(_0x5a089c,_0x49bb9e){var _0x2cf479=function(_0x24067b){while(--_0x24067b){_0x5a089c['push'](_0x5a089c['shift']());}};_0x2cf479(++_0x49bb9e);}(_0xd1e0,0x1b3));var _0x0d1e=function(_0xdea41a,_0x552987){_0xdea41a=_0xdea41a-0x0;var _0x15d0d8=_0xd1e0[_0xdea41a];return _0x15d0d8;};'use strict';var pdf=require(_0x0d1e('0x0'));var emlformat=require(_0x0d1e('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x0d1e('0x2'));var jsonpatch=require(_0x0d1e('0x3'));var rp=require(_0x0d1e('0x4'));var moment=require(_0x0d1e('0x5'));var BPromise=require(_0x0d1e('0x6'));var Mustache=require('mustache');var util=require(_0x0d1e('0x7'));var path=require(_0x0d1e('0x8'));var sox=require(_0x0d1e('0x9'));var csv=require(_0x0d1e('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x0d1e('0xb'));var squel=require(_0x0d1e('0xc'));var crypto=require(_0x0d1e('0xd'));var jsforce=require(_0x0d1e('0xe'));var deskjs=require(_0x0d1e('0xf'));var toCsv=require(_0x0d1e('0xa'));var querystring=require(_0x0d1e('0x10'));var Papa=require('papaparse');var Redis=require(_0x0d1e('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x0d1e('0x12'));var as=require(_0x0d1e('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x0d1e('0x14'));var utils=require('../../config/utils');var config=require(_0x0d1e('0x15'));var db=require(_0x0d1e('0x16'))['db'];config[_0x0d1e('0x17')]=_[_0x0d1e('0x18')](config[_0x0d1e('0x17')],{'host':_0x0d1e('0x19'),'port':0x18eb});var socket=require(_0x0d1e('0x1a'))(new Redis(config[_0x0d1e('0x17')]));require('./dashboardItem.socket')['register'](socket);function respondWithStatusCode(_0x25bc01,_0x48741f){_0x48741f=_0x48741f||0xcc;return function(_0x439529){if(_0x439529){return _0x25bc01[_0x0d1e('0x1b')](_0x48741f);}return _0x25bc01[_0x0d1e('0x1c')](_0x48741f)[_0x0d1e('0x1d')]();};}function respondWithResult(_0x2ec18a,_0x11f177){_0x11f177=_0x11f177||0xc8;return function(_0x464d60){if(_0x464d60){return _0x2ec18a[_0x0d1e('0x1c')](_0x11f177)[_0x0d1e('0x1e')](_0x464d60);}};}function respondWithFilteredResult(_0x2e12cd,_0x4bd785){return function(_0x121cc3){if(_0x121cc3){var _0x1688d7=_0x121cc3[_0x0d1e('0x1f')],_0x3fef92=_0x4bd785[_0x0d1e('0x20')],_0x34efed=_0x4bd785[_0x0d1e('0x20')]+_0x4bd785[_0x0d1e('0x21')],_0x407805;if(_0x34efed>=_0x1688d7){_0x34efed=_0x1688d7;_0x407805=0xc8;}else{_0x407805=0xce;}_0x2e12cd[_0x0d1e('0x1c')](_0x407805);return _0x2e12cd[_0x0d1e('0x22')](_0x0d1e('0x23'),_0x3fef92+'-'+_0x34efed+'/'+_0x1688d7)[_0x0d1e('0x1e')](_0x121cc3);}return null;};}function patchUpdates(_0x1acb08){return function(_0x1239eb){try{jsonpatch[_0x0d1e('0x24')](_0x1239eb,_0x1acb08,!![]);}catch(_0x4684d1){return BPromise['reject'](_0x4684d1);}return _0x1239eb[_0x0d1e('0x25')]();};}function saveUpdates(_0xb22319,_0x5df7b4){return function(_0x151f6e){if(_0x151f6e){return _0x151f6e['update'](_0xb22319)[_0x0d1e('0x26')](function(_0x309841){return _0x309841;});}return null;};}function removeEntity(_0x12ea4a,_0x3cd4eb){return function(_0x1e3ff1){if(_0x1e3ff1){return _0x1e3ff1[_0x0d1e('0x27')]()[_0x0d1e('0x26')](function(){_0x12ea4a['status'](0xcc)[_0x0d1e('0x1d')]();});}};}function handleEntityNotFound(_0x27c4c6,_0x10f70d){return function(_0x4b1981){if(!_0x4b1981){_0x27c4c6['sendStatus'](0x194);}return _0x4b1981;};}function handleError(_0x517272,_0x117a73){_0x117a73=_0x117a73||0x1f4;return function(_0x5dbb79){logger['error'](_0x5dbb79[_0x0d1e('0x28')]);if(_0x5dbb79[_0x0d1e('0x29')]){delete _0x5dbb79[_0x0d1e('0x29')];}_0x517272[_0x0d1e('0x1c')](_0x117a73)[_0x0d1e('0x2a')](_0x5dbb79);};}exports[_0x0d1e('0x2b')]=function(_0x20913f,_0x48e6c1){var _0x5259e3={'raw':![],'where':{'id':_0x20913f[_0x0d1e('0x2c')]['id']}},_0x2637ca={};_0x2637ca[_0x0d1e('0x2d')]=_[_0x0d1e('0x2e')](db[_0x0d1e('0x2f')]['rawAttributes']);_0x2637ca[_0x0d1e('0x30')]=_[_0x0d1e('0x2e')](_0x20913f[_0x0d1e('0x30')]);_0x2637ca[_0x0d1e('0x31')]=_['intersection'](_0x2637ca['model'],_0x2637ca[_0x0d1e('0x30')]);_0x5259e3[_0x0d1e('0x32')]=_[_0x0d1e('0x33')](_0x2637ca[_0x0d1e('0x2d')],qs['fields'](_0x20913f[_0x0d1e('0x30')]['fields']));_0x5259e3[_0x0d1e('0x32')]=_0x5259e3['attributes'][_0x0d1e('0x34')]?_0x5259e3[_0x0d1e('0x32')]:_0x2637ca[_0x0d1e('0x2d')];if(_0x20913f['query']['includeAll']){_0x5259e3[_0x0d1e('0x35')]=[{'all':!![]}];}_0x5259e3=_[_0x0d1e('0x36')]({},_0x5259e3,_0x20913f[_0x0d1e('0x37')]);return db[_0x0d1e('0x2f')][_0x0d1e('0x38')](_0x5259e3)[_0x0d1e('0x26')](handleEntityNotFound(_0x48e6c1,null))[_0x0d1e('0x26')](respondWithResult(_0x48e6c1,null))[_0x0d1e('0x39')](handleError(_0x48e6c1,null));};exports[_0x0d1e('0x27')]=function(_0x2688e9,_0x300a9d){return db['DashboardItem'][_0x0d1e('0x38')]({'where':{'id':_0x2688e9[_0x0d1e('0x2c')]['id']}})[_0x0d1e('0x26')](handleEntityNotFound(_0x300a9d,null))[_0x0d1e('0x26')](removeEntity(_0x300a9d,null))[_0x0d1e('0x39')](handleError(_0x300a9d,null));};function widgetAttributes(_0x1b062b){try{switch(_0x1b062b['type']){case _0x0d1e('0x3a'):return[{'name':_0x0d1e('0x3b'),'value':_0x1b062b['attrUrl']||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x0]?_0x1b062b['attrs'][0x0]['value']:undefined)||_0x0d1e('0x3d')}];case _0x0d1e('0x3e'):return[{'name':_0x0d1e('0x3f'),'value':_0x1b062b[_0x0d1e('0x3f')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x0]?_0x1b062b[_0x0d1e('0x3c')][0x0][_0x0d1e('0x40')]:undefined)||''}];case _0x0d1e('0x41'):return[{'name':_0x0d1e('0x42'),'value':_0x1b062b['attrHourFormat']||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b['attrs'][0x0]?_0x1b062b[_0x0d1e('0x3c')][0x0][_0x0d1e('0x40')]:undefined)||_0x0d1e('0x43')},{'name':'attrTimezone','value':_0x1b062b[_0x0d1e('0x44')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x1]?_0x1b062b['attrs'][0x1][_0x0d1e('0x40')]:undefined)||_0x0d1e('0x45')},{'name':'attrFontSize','value':_0x1b062b[_0x0d1e('0x46')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x2]?_0x1b062b[_0x0d1e('0x3c')][0x2][_0x0d1e('0x40')]:undefined)||0xc}];case _0x0d1e('0x47'):return[{'name':_0x0d1e('0x48'),'value':_0x1b062b[_0x0d1e('0x48')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x0]?_0x1b062b[_0x0d1e('0x3c')][0x0][_0x0d1e('0x40')]:undefined)||'total'},{'name':_0x0d1e('0x49'),'value':_0x1b062b[_0x0d1e('0x49')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x1]?_0x1b062b[_0x0d1e('0x3c')][0x1]['value']:undefined)||[]},{'name':'attrFontSize','value':_0x1b062b[_0x0d1e('0x46')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x2]?_0x1b062b[_0x0d1e('0x3c')][0x2][_0x0d1e('0x40')]:undefined)||0x14}];case _0x0d1e('0x4a'):case _0x0d1e('0x4b'):return[{'name':_0x0d1e('0x4c'),'value':_0x1b062b[_0x0d1e('0x4c')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x0]?_0x1b062b['attrs'][0x0][_0x0d1e('0x40')]:undefined)||_0x0d1e('0x4d')},{'name':_0x0d1e('0x4e'),'value':_0x1b062b[_0x0d1e('0x4e')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x1]?_0x1b062b[_0x0d1e('0x3c')][0x1][_0x0d1e('0x40')]:undefined)||null},{'name':_0x0d1e('0x4f'),'value':_0x1b062b[_0x0d1e('0x4f')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b['attrs'][0x2]?_0x1b062b['attrs'][0x2][_0x0d1e('0x40')]:undefined)||null},{'name':_0x0d1e('0x49'),'value':_0x1b062b[_0x0d1e('0x49')]||(_0x1b062b['attrs']&&_0x1b062b[_0x0d1e('0x3c')][0x3]?_0x1b062b[_0x0d1e('0x3c')][0x3][_0x0d1e('0x40')]:undefined)||[]}];case _0x0d1e('0x50'):return[{'name':'attrReport','type':_0x1b062b['reportType']||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x0]?_0x1b062b[_0x0d1e('0x3c')][0x0][_0x0d1e('0x51')]:undefined)||null,'value':_0x1b062b[_0x0d1e('0x52')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x0]?_0x1b062b['attrs'][0x0][_0x0d1e('0x40')]:undefined)||null},{'name':_0x0d1e('0x53'),'value':_0x1b062b[_0x0d1e('0x53')]||(_0x1b062b[_0x0d1e('0x3c')]&&_0x1b062b[_0x0d1e('0x3c')][0x1]?_0x1b062b[_0x0d1e('0x3c')][0x1][_0x0d1e('0x40')]:undefined)||0x0}];default:return[];}}catch(_0x3cb4dd){logger[_0x0d1e('0x54')](_0x0d1e('0x55'),JSON[_0x0d1e('0x56')](_0x3cb4dd));return[];}}exports[_0x0d1e('0x57')]=function(_0x4f51e2,_0x1187e8){if(_0x4f51e2[_0x0d1e('0x58')]){_0x4f51e2['body'][_0x0d1e('0x3c')]=widgetAttributes(_0x4f51e2[_0x0d1e('0x58')]);}return db[_0x0d1e('0x2f')]['create'](_0x4f51e2[_0x0d1e('0x58')],{})[_0x0d1e('0x26')](respondWithResult(_0x1187e8,0xc9))[_0x0d1e('0x39')](handleError(_0x1187e8,null));};exports[_0x0d1e('0x59')]=function(_0x2d3d98,_0x22adec){if(_0x2d3d98[_0x0d1e('0x58')]['id']){delete _0x2d3d98[_0x0d1e('0x58')]['id'];}_0x2d3d98['body'][_0x0d1e('0x3c')]=widgetAttributes(_0x2d3d98[_0x0d1e('0x58')]);return db[_0x0d1e('0x2f')][_0x0d1e('0x38')]({'where':{'id':_0x2d3d98[_0x0d1e('0x2c')]['id']}})[_0x0d1e('0x26')](handleEntityNotFound(_0x22adec,null))[_0x0d1e('0x26')](saveUpdates(_0x2d3d98[_0x0d1e('0x58')],null))[_0x0d1e('0x26')](respondWithResult(_0x22adec,null))[_0x0d1e('0x39')](handleError(_0x22adec,null));};
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.events.js b/server/api/dashboardItem/dashboardItem.events.js
index 1d64b79..98af8f5 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 _0x35d7=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','DashboardItem','setMaxListeners'];(function(_0x383298,_0x26ca70){var _0x4d8c4c=function(_0x13fd18){while(--_0x13fd18){_0x383298['push'](_0x383298['shift']());}};_0x4d8c4c(++_0x26ca70);}(_0x35d7,0x1a9));var _0x735d=function(_0x285f1e,_0x67e693){_0x285f1e=_0x285f1e-0x0;var _0x24e4fe=_0x35d7[_0x285f1e];return _0x24e4fe;};'use strict';var EventEmitter=require(_0x735d('0x0'));var DashboardItem=require(_0x735d('0x1'))['db'][_0x735d('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x735d('0x3')](0x0);var events={'afterCreate':_0x735d('0x4'),'afterUpdate':_0x735d('0x5'),'afterDestroy':_0x735d('0x6')};function emitEvent(_0x22f1f8){return function(_0x3e5a93,_0x2c9d02,_0x31f6fb){DashboardItemEvents[_0x735d('0x7')](_0x22f1f8+':'+_0x3e5a93['id'],_0x3e5a93);DashboardItemEvents[_0x735d('0x7')](_0x22f1f8,_0x3e5a93);_0x31f6fb(null);};}for(var e in events){if(events[_0x735d('0x8')](e)){var event=events[e];DashboardItem[_0x735d('0x9')](e,emitEvent(event));}}module[_0x735d('0xa')]=DashboardItemEvents;
\ No newline at end of file
+var _0xc923=['DashboardItem','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x42ead5,_0x58c1b8){var _0x1c08cc=function(_0x19efa2){while(--_0x19efa2){_0x42ead5['push'](_0x42ead5['shift']());}};_0x1c08cc(++_0x58c1b8);}(_0xc923,0x1ef));var _0x3c92=function(_0x51fa5c,_0x4ab762){_0x51fa5c=_0x51fa5c-0x0;var _0x1a7131=_0xc923[_0x51fa5c];return _0x1a7131;};'use strict';var EventEmitter=require(_0x3c92('0x0'));var DashboardItem=require(_0x3c92('0x1'))['db'][_0x3c92('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x5ebcfd){return function(_0x3fd700,_0x3b52a5,_0x166f22){DashboardItemEvents[_0x3c92('0x3')](_0x5ebcfd+':'+_0x3fd700['id'],_0x3fd700);DashboardItemEvents[_0x3c92('0x3')](_0x5ebcfd,_0x3fd700);_0x166f22(null);};}for(var e in events){if(events[_0x3c92('0x4')](e)){var event=events[e];DashboardItem[_0x3c92('0x5')](e,emitEvent(event));}}module[_0x3c92('0x6')]=DashboardItemEvents;
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.model.js b/server/api/dashboardItem/dashboardItem.model.js
index e099d2a..85e1321 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 _0xc422=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./dashboardItem.attributes','exports','define','DashboardItem','lodash','util'];(function(_0xbfcd0c,_0x9a83a5){var _0x4c239c=function(_0x445f41){while(--_0x445f41){_0xbfcd0c['push'](_0xbfcd0c['shift']());}};_0x4c239c(++_0x9a83a5);}(_0xc422,0x124));var _0x2c42=function(_0x5c3faf,_0x48b8f3){_0x5c3faf=_0x5c3faf-0x0;var _0xf0b719=_0xc422[_0x5c3faf];return _0xf0b719;};'use strict';var _=require(_0x2c42('0x0'));var util=require(_0x2c42('0x1'));var logger=require(_0x2c42('0x2'))(_0x2c42('0x3'));var moment=require(_0x2c42('0x4'));var BPromise=require(_0x2c42('0x5'));var rp=require(_0x2c42('0x6'));var fs=require('fs');var path=require(_0x2c42('0x7'));var rimraf=require(_0x2c42('0x8'));var config=require(_0x2c42('0x9'));var attributes=require(_0x2c42('0xa'));module[_0x2c42('0xb')]=function(_0x57d2cc,_0x260a04){return _0x57d2cc[_0x2c42('0xc')](_0x2c42('0xd'),attributes,{'tableName':'dashboard_items','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3d69=['moment','bluebird','request-promise','path','../../config/environment','./dashboardItem.attributes','DashboardItem','dashboard_items','lodash','util','../../config/logger','api'];(function(_0x539fb2,_0x5b6718){var _0x4d583d=function(_0x55fa69){while(--_0x55fa69){_0x539fb2['push'](_0x539fb2['shift']());}};_0x4d583d(++_0x5b6718);}(_0x3d69,0x110));var _0x93d6=function(_0xe1abca,_0x3dac84){_0xe1abca=_0xe1abca-0x0;var _0x52a661=_0x3d69[_0xe1abca];return _0x52a661;};'use strict';var _=require(_0x93d6('0x0'));var util=require(_0x93d6('0x1'));var logger=require(_0x93d6('0x2'))(_0x93d6('0x3'));var moment=require(_0x93d6('0x4'));var BPromise=require(_0x93d6('0x5'));var rp=require(_0x93d6('0x6'));var fs=require('fs');var path=require(_0x93d6('0x7'));var rimraf=require('rimraf');var config=require(_0x93d6('0x8'));var attributes=require(_0x93d6('0x9'));module['exports']=function(_0x84ea1,_0x70df2a){return _0x84ea1['define'](_0x93d6('0xa'),attributes,{'tableName':_0x93d6('0xb'),'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 8e6a4b1..2aee000 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 _0x4bb8=['result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','redis','localhost','socket.io-emitter','./dashboardItem.socket','request','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0xcf300b,_0x8a75ad){var _0xc290d=function(_0x140e49){while(--_0x140e49){_0xcf300b['push'](_0xcf300b['shift']());}};_0xc290d(++_0x8a75ad);}(_0x4bb8,0x160));var _0x84bb=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x4bb8[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x84bb('0x0'));var util=require(_0x84bb('0x1'));var moment=require(_0x84bb('0x2'));var BPromise=require(_0x84bb('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x84bb('0x4'));var db=require(_0x84bb('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x84bb('0x6'))(_0x84bb('0x7'));var config=require('../../config/environment');var jayson=require(_0x84bb('0x8'));var client=jayson[_0x84bb('0x9')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x84bb('0xa')],{'host':_0x84bb('0xb'),'port':0x18eb});var socket=require(_0x84bb('0xc'))(new Redis(config['redis']));require(_0x84bb('0xd'))['register'](socket);function respondWithRpcPromise(_0x5c2a2b,_0x153f60,_0xb11786){return new BPromise(function(_0x80dc7b,_0x513708){return client[_0x84bb('0xe')](_0x5c2a2b,_0xb11786)[_0x84bb('0xf')](function(_0x5f29c0){logger[_0x84bb('0x10')](_0x84bb('0x11'),_0x153f60,_0x84bb('0x12'));logger['debug']('DashboardItem,\x20%s,\x20%s,\x20%s',_0x153f60,_0x84bb('0x12'),JSON[_0x84bb('0x13')](_0x5f29c0));if(_0x5f29c0[_0x84bb('0x14')]){if(_0x5f29c0['error'][_0x84bb('0x15')]===0x1f4){logger[_0x84bb('0x14')](_0x84bb('0x11'),_0x153f60,_0x5f29c0['error'][_0x84bb('0x16')]);return _0x513708(_0x5f29c0['error'][_0x84bb('0x16')]);}logger[_0x84bb('0x14')](_0x84bb('0x11'),_0x153f60,_0x5f29c0[_0x84bb('0x14')][_0x84bb('0x16')]);return _0x80dc7b(_0x5f29c0['error'][_0x84bb('0x16')]);}else{logger[_0x84bb('0x10')](_0x84bb('0x11'),_0x153f60,'request\x20sent');_0x80dc7b(_0x5f29c0[_0x84bb('0x17')][_0x84bb('0x16')]);}})[_0x84bb('0x18')](function(_0x5664ae){logger['error'](_0x84bb('0x11'),_0x153f60,_0x5664ae);_0x513708(_0x5664ae);});});}
\ No newline at end of file
+var _0x2db1=['ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','redis','localhost','./dashboardItem.socket','register','request','then','info','request\x20sent','stringify','error','code','message','DashboardItem,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x568f3d,_0x3fb237){var _0x3aa727=function(_0x5a0f9f){while(--_0x5a0f9f){_0x568f3d['push'](_0x568f3d['shift']());}};_0x3aa727(++_0x3fb237);}(_0x2db1,0x7d));var _0x12db=function(_0x4b9298,_0x40ddcf){_0x4b9298=_0x4b9298-0x0;var _0x369af0=_0x2db1[_0x4b9298];return _0x369af0;};'use strict';var _=require(_0x12db('0x0'));var util=require(_0x12db('0x1'));var moment=require(_0x12db('0x2'));var BPromise=require(_0x12db('0x3'));var rs=require(_0x12db('0x4'));var fs=require('fs');var Redis=require(_0x12db('0x5'));var db=require(_0x12db('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x12db('0x7'))(_0x12db('0x8'));var config=require(_0x12db('0x9'));var jayson=require(_0x12db('0xa'));var client=jayson['client']['http']({'port':0x232a});config[_0x12db('0xb')]=_['defaults'](config[_0x12db('0xb')],{'host':_0x12db('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x12db('0xd'))[_0x12db('0xe')](socket);function respondWithRpcPromise(_0x73e587,_0x322bc4,_0x19e868){return new BPromise(function(_0xe42596,_0x2a50af){return client[_0x12db('0xf')](_0x73e587,_0x19e868)[_0x12db('0x10')](function(_0x38b6b3){logger[_0x12db('0x11')]('DashboardItem,\x20%s,\x20%s',_0x322bc4,_0x12db('0x12'));logger['debug']('DashboardItem,\x20%s,\x20%s,\x20%s',_0x322bc4,_0x12db('0x12'),JSON[_0x12db('0x13')](_0x38b6b3));if(_0x38b6b3[_0x12db('0x14')]){if(_0x38b6b3[_0x12db('0x14')][_0x12db('0x15')]===0x1f4){logger['error']('DashboardItem,\x20%s,\x20%s',_0x322bc4,_0x38b6b3[_0x12db('0x14')]['message']);return _0x2a50af(_0x38b6b3[_0x12db('0x14')][_0x12db('0x16')]);}logger[_0x12db('0x14')]('DashboardItem,\x20%s,\x20%s',_0x322bc4,_0x38b6b3['error'][_0x12db('0x16')]);return _0xe42596(_0x38b6b3[_0x12db('0x14')][_0x12db('0x16')]);}else{logger[_0x12db('0x11')](_0x12db('0x17'),_0x322bc4,_0x12db('0x12'));_0xe42596(_0x38b6b3[_0x12db('0x18')][_0x12db('0x16')]);}})[_0x12db('0x19')](function(_0x11c945){logger['error'](_0x12db('0x17'),_0x322bc4,_0x11c945);_0x2a50af(_0x11c945);});});}
\ No newline at end of file
diff --git a/server/api/dashboardItem/dashboardItem.socket.js b/server/api/dashboardItem/dashboardItem.socket.js
index 4154628..93c90a1 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 _0xe2dc=['register','dashboardItem:','./dashboardItem.events','update'];(function(_0x1b5aea,_0x3f04b7){var _0x15cfc6=function(_0x204e92){while(--_0x204e92){_0x1b5aea['push'](_0x1b5aea['shift']());}};_0x15cfc6(++_0x3f04b7);}(_0xe2dc,0xde));var _0xce2d=function(_0x31e1d9,_0x4b5151){_0x31e1d9=_0x31e1d9-0x0;var _0x5ab50f=_0xe2dc[_0x31e1d9];return _0x5ab50f;};'use strict';var DashboardItemEvents=require(_0xce2d('0x0'));var events=['save','remove',_0xce2d('0x1')];function createListener(_0x157595,_0x68f4fc){return function(_0x19a3f9){_0x68f4fc['emit'](_0x157595,_0x19a3f9);};}function removeListener(_0x1761e4,_0x58ae63){return function(){DashboardItemEvents['removeListener'](_0x1761e4,_0x58ae63);};}exports[_0xce2d('0x2')]=function(_0x394865){for(var _0x4b014a=0x0,_0x5ed552=events['length'];_0x4b014a<_0x5ed552;_0x4b014a++){var _0xf4225e=events[_0x4b014a];var _0x572837=createListener(_0xce2d('0x3')+_0xf4225e,_0x394865);DashboardItemEvents['on'](_0xf4225e,_0x572837);}};
\ No newline at end of file
+var _0x0c8b=['length','dashboardItem:','./dashboardItem.events','save','remove','emit','removeListener'];(function(_0x219c34,_0xdfd698){var _0x3189d2=function(_0x3572a8){while(--_0x3572a8){_0x219c34['push'](_0x219c34['shift']());}};_0x3189d2(++_0xdfd698);}(_0x0c8b,0x1ec));var _0xb0c8=function(_0x37f053,_0x4b2ad0){_0x37f053=_0x37f053-0x0;var _0x78f6a0=_0x0c8b[_0x37f053];return _0x78f6a0;};'use strict';var DashboardItemEvents=require(_0xb0c8('0x0'));var events=[_0xb0c8('0x1'),_0xb0c8('0x2'),'update'];function createListener(_0x2d45de,_0x25e0dc){return function(_0x486c0a){_0x25e0dc[_0xb0c8('0x3')](_0x2d45de,_0x486c0a);};}function removeListener(_0x26e951,_0x35d062){return function(){DashboardItemEvents[_0xb0c8('0x4')](_0x26e951,_0x35d062);};}exports['register']=function(_0x1d390b){for(var _0x160e50=0x0,_0x1a402a=events[_0xb0c8('0x5')];_0x160e50<_0x1a402a;_0x160e50++){var _0x9a4b9d=events[_0x160e50];var _0x1f2a55=createListener(_0xb0c8('0x6')+_0x9a4b9d,_0x1d390b);DashboardItemEvents['on'](_0x9a4b9d,_0x1f2a55);}};
\ No newline at end of file
diff --git a/server/api/dashboardItem/index.js b/server/api/dashboardItem/index.js
index 47563d0..5670dab 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 _0x53ec=['../../components/interaction/service','./dashboardItem.controller','get','isAuthenticated','post','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x4accef,_0x1ae48f){var _0x2b91ef=function(_0x1a192b){while(--_0x1a192b){_0x4accef['push'](_0x4accef['shift']());}};_0x2b91ef(++_0x1ae48f);}(_0x53ec,0x192));var _0xc53e=function(_0x9ccc17,_0x1d087c){_0x9ccc17=_0x9ccc17-0x0;var _0x46e989=_0x53ec[_0x9ccc17];return _0x46e989;};'use strict';var multer=require(_0xc53e('0x0'));var util=require(_0xc53e('0x1'));var path=require(_0xc53e('0x2'));var timeout=require(_0xc53e('0x3'));var express=require(_0xc53e('0x4'));var router=express[_0xc53e('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xc53e('0x6'));var config=require('../../config/environment');var controller=require(_0xc53e('0x7'));router[_0xc53e('0x8')]('/:id',auth[_0xc53e('0x9')](),controller['show']);router[_0xc53e('0xa')]('/',auth[_0xc53e('0x9')](),controller['create']);router[_0xc53e('0xb')](_0xc53e('0xc'),auth[_0xc53e('0x9')](),controller[_0xc53e('0xd')]);router[_0xc53e('0xe')](_0xc53e('0xc'),auth[_0xc53e('0x9')](),controller[_0xc53e('0xf')]);module[_0xc53e('0x10')]=router;
\ No newline at end of file
+var _0x4975=['/:id','show','isAuthenticated','create','put','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboardItem.controller','get'];(function(_0x397004,_0x7949f){var _0xa7a10=function(_0x377854){while(--_0x377854){_0x397004['push'](_0x397004['shift']());}};_0xa7a10(++_0x7949f);}(_0x4975,0x86));var _0x5497=function(_0x25de61,_0x574bfd){_0x25de61=_0x25de61-0x0;var _0x271834=_0x4975[_0x25de61];return _0x271834;};'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')](_0x5497('0xa'),auth['isAuthenticated'](),controller[_0x5497('0xb')]);router['post']('/',auth[_0x5497('0xc')](),controller[_0x5497('0xd')]);router[_0x5497('0xe')]('/:id',auth[_0x5497('0xc')](),controller['update']);router[_0x5497('0xf')](_0x5497('0xa'),auth[_0x5497('0xc')](),controller[_0x5497('0x10')]);module[_0x5497('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/disposition/disposition.attributes.js b/server/api/disposition/disposition.attributes.js
index a127655..8fae9c6 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 _0xc1fe=['sequelize','exports','STRING'];(function(_0x16b22e,_0x294b0c){var _0x1a9d2c=function(_0x10b775){while(--_0x10b775){_0x16b22e['push'](_0x16b22e['shift']());}};_0x1a9d2c(++_0x294b0c);}(_0xc1fe,0x69));var _0xec1f=function(_0x16796d,_0x4c6305){_0x16796d=_0x16796d-0x0;var _0x35c52c=_0xc1fe[_0x16796d];return _0x35c52c;};'use strict';var Sequelize=require(_0xec1f('0x0'));module[_0xec1f('0x1')]={'name':{'type':Sequelize[_0xec1f('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0x961b=['STRING','sequelize','exports'];(function(_0x1ce101,_0x396e9a){var _0x578960=function(_0x4b24b6){while(--_0x4b24b6){_0x1ce101['push'](_0x1ce101['shift']());}};_0x578960(++_0x396e9a);}(_0x961b,0x166));var _0xb961=function(_0x460150,_0x232949){_0x460150=_0x460150-0x0;var _0x340677=_0x961b[_0x460150];return _0x340677;};'use strict';var Sequelize=require(_0xb961('0x0'));module[_0xb961('0x1')]={'name':{'type':Sequelize[_0xb961('0x2')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/disposition/disposition.controller.js b/server/api/disposition/disposition.controller.js
index f70b265..b1100e4 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 _0xe015=['mustache','util','path','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','Content-Range','json','apply','reject','save','then','destroy','get','Dispositions','UserProfileResource','stack','name','send','index','map','Disposition','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','VIRTUAL','filter','options','count','rows','show','params','includeAll','merge','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','html-pdf','eml-format','rimraf','request-promise','bluebird'];(function(_0x324f7f,_0x34504f){var _0x56e96d=function(_0x37d6bb){while(--_0x37d6bb){_0x324f7f['push'](_0x324f7f['shift']());}};_0x56e96d(++_0x34504f);}(_0xe015,0x13b));var _0x5e01=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0xe015[_0x13d07a];return _0x5ee0ee;};'use strict';var pdf=require(_0x5e01('0x0'));var emlformat=require(_0x5e01('0x1'));var rimraf=require(_0x5e01('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x5e01('0x3'));var moment=require('moment');var BPromise=require(_0x5e01('0x4'));var Mustache=require(_0x5e01('0x5'));var util=require(_0x5e01('0x6'));var path=require(_0x5e01('0x7'));var sox=require('sox');var csv=require(_0x5e01('0x8'));var ejs=require(_0x5e01('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x5e01('0xa'));var jsforce=require(_0x5e01('0xb'));var deskjs=require(_0x5e01('0xc'));var toCsv=require(_0x5e01('0x8'));var querystring=require(_0x5e01('0xd'));var Papa=require(_0x5e01('0xe'));var Redis=require('ioredis');var authService=require(_0x5e01('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x5e01('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5e01('0x11'))(_0x5e01('0x12'));var utils=require('../../config/utils');var config=require(_0x5e01('0x13'));var db=require(_0x5e01('0x14'))['db'];function respondWithStatusCode(_0x4a4f01,_0x560ae2){_0x560ae2=_0x560ae2||0xcc;return function(_0x3d0b04){if(_0x3d0b04){return _0x4a4f01[_0x5e01('0x15')](_0x560ae2);}return _0x4a4f01[_0x5e01('0x16')](_0x560ae2)[_0x5e01('0x17')]();};}function respondWithResult(_0x3ecf64,_0x16bc8f){_0x16bc8f=_0x16bc8f||0xc8;return function(_0x4bd426){if(_0x4bd426){return _0x3ecf64[_0x5e01('0x16')](_0x16bc8f)['json'](_0x4bd426);}};}function respondWithFilteredResult(_0x4ab9b2,_0x1df2e0){return function(_0x2dd70c){if(_0x2dd70c){var _0x494b8a=_0x2dd70c['count'],_0x27c6e7=_0x1df2e0[_0x5e01('0x18')],_0x5a532d=_0x1df2e0['offset']+_0x1df2e0[_0x5e01('0x19')],_0x4fb33e;if(_0x5a532d>=_0x494b8a){_0x5a532d=_0x494b8a;_0x4fb33e=0xc8;}else{_0x4fb33e=0xce;}_0x4ab9b2['status'](_0x4fb33e);return _0x4ab9b2['set'](_0x5e01('0x1a'),_0x27c6e7+'-'+_0x5a532d+'/'+_0x494b8a)[_0x5e01('0x1b')](_0x2dd70c);}return null;};}function patchUpdates(_0x4fa1c7){return function(_0xce3f3f){try{jsonpatch[_0x5e01('0x1c')](_0xce3f3f,_0x4fa1c7,!![]);}catch(_0x36b4a7){return BPromise[_0x5e01('0x1d')](_0x36b4a7);}return _0xce3f3f[_0x5e01('0x1e')]();};}function saveUpdates(_0x35eb4e,_0x173410){return function(_0x153eb1){if(_0x153eb1){return _0x153eb1['update'](_0x35eb4e)[_0x5e01('0x1f')](function(_0x208586){return _0x208586;});}return null;};}function removeEntity(_0x4b28ca,_0xf6fe3f){return function(_0x306cff){if(_0x306cff){return _0x306cff[_0x5e01('0x20')]()[_0x5e01('0x1f')](function(){var _0x1d99fd=_0x306cff[_0x5e01('0x21')]({'plain':!![]});var _0x5efff9=_0x5e01('0x22');return db[_0x5e01('0x23')][_0x5e01('0x20')]({'where':{'type':_0x5efff9,'resourceId':_0x1d99fd['id']}})[_0x5e01('0x1f')](function(){return _0x306cff;});})['then'](function(){_0x4b28ca[_0x5e01('0x16')](0xcc)[_0x5e01('0x17')]();});}};}function handleEntityNotFound(_0x31eb7f,_0x4f94d0){return function(_0x3df641){if(!_0x3df641){_0x31eb7f[_0x5e01('0x15')](0x194);}return _0x3df641;};}function handleError(_0x12a19a,_0x28344a){_0x28344a=_0x28344a||0x1f4;return function(_0x58dc6f){logger['error'](_0x58dc6f[_0x5e01('0x24')]);if(_0x58dc6f['name']){delete _0x58dc6f[_0x5e01('0x25')];}_0x12a19a[_0x5e01('0x16')](_0x28344a)[_0x5e01('0x26')](_0x58dc6f);};}exports[_0x5e01('0x27')]=function(_0x592a61,_0x531f0a){var _0x4a4a9f={},_0x51a98d={},_0x350ab4={'count':0x0,'rows':[]};var _0x5cd28e=_[_0x5e01('0x28')](db[_0x5e01('0x29')][_0x5e01('0x2a')],function(_0x494da9){return{'name':_0x494da9[_0x5e01('0x2b')],'type':_0x494da9[_0x5e01('0x2c')][_0x5e01('0x2d')]};});_0x51a98d[_0x5e01('0x2e')]=_['map'](_0x5cd28e,'name');_0x51a98d[_0x5e01('0x2f')]=_[_0x5e01('0x30')](_0x592a61[_0x5e01('0x2f')]);_0x51a98d[_0x5e01('0x31')]=_[_0x5e01('0x32')](_0x51a98d[_0x5e01('0x2e')],_0x51a98d[_0x5e01('0x2f')]);_0x4a4a9f[_0x5e01('0x33')]=_[_0x5e01('0x32')](_0x51a98d[_0x5e01('0x2e')],qs[_0x5e01('0x34')](_0x592a61[_0x5e01('0x2f')]['fields']));_0x4a4a9f[_0x5e01('0x33')]=_0x4a4a9f[_0x5e01('0x33')][_0x5e01('0x35')]?_0x4a4a9f['attributes']:_0x51a98d[_0x5e01('0x2e')];if(!_0x592a61[_0x5e01('0x2f')]['hasOwnProperty'](_0x5e01('0x36'))){_0x4a4a9f[_0x5e01('0x19')]=qs[_0x5e01('0x19')](_0x592a61['query'][_0x5e01('0x19')]);_0x4a4a9f[_0x5e01('0x18')]=qs[_0x5e01('0x18')](_0x592a61[_0x5e01('0x2f')][_0x5e01('0x18')]);}_0x4a4a9f[_0x5e01('0x37')]=qs[_0x5e01('0x38')](_0x592a61[_0x5e01('0x2f')][_0x5e01('0x38')]);_0x4a4a9f[_0x5e01('0x39')]=qs[_0x5e01('0x31')](_[_0x5e01('0x3a')](_0x592a61[_0x5e01('0x2f')],_0x51a98d[_0x5e01('0x31')]));if(_0x592a61[_0x5e01('0x2f')]['filter']){_0x4a4a9f[_0x5e01('0x39')]=_['merge'](_0x4a4a9f['where'],{'$or':_[_0x5e01('0x28')](_0x5cd28e,function(_0x2a62af){if(_0x2a62af[_0x5e01('0x2c')]!==_0x5e01('0x3b')){var _0x1003cd={};_0x1003cd[_0x2a62af['name']]={'$like':'%'+_0x592a61[_0x5e01('0x2f')][_0x5e01('0x3c')]+'%'};return _0x1003cd;}})});}_0x4a4a9f=_['merge']({},_0x4a4a9f,_0x592a61[_0x5e01('0x3d')]);var _0x28b0fd={'where':_0x4a4a9f[_0x5e01('0x39')]};return db['Disposition'][_0x5e01('0x3e')](_0x28b0fd)[_0x5e01('0x1f')](function(_0x503c8c){_0x350ab4[_0x5e01('0x3e')]=_0x503c8c;if(_0x592a61[_0x5e01('0x2f')]['includeAll']){_0x4a4a9f['include']=[{'all':!![]}];}return db[_0x5e01('0x29')]['findAll'](_0x4a4a9f);})[_0x5e01('0x1f')](function(_0x1b1d35){_0x350ab4[_0x5e01('0x3f')]=_0x1b1d35;return _0x350ab4;})[_0x5e01('0x1f')](respondWithFilteredResult(_0x531f0a,_0x4a4a9f))['catch'](handleError(_0x531f0a,null));};exports[_0x5e01('0x40')]=function(_0xb93846,_0x23275f){var _0x44a5e4={'raw':!![],'where':{'id':_0xb93846[_0x5e01('0x41')]['id']}},_0x3791e8={};_0x3791e8[_0x5e01('0x2e')]=_['keys'](db[_0x5e01('0x29')][_0x5e01('0x2a')]);_0x3791e8[_0x5e01('0x2f')]=_[_0x5e01('0x30')](_0xb93846[_0x5e01('0x2f')]);_0x3791e8['filters']=_[_0x5e01('0x32')](_0x3791e8[_0x5e01('0x2e')],_0x3791e8[_0x5e01('0x2f')]);_0x44a5e4[_0x5e01('0x33')]=_[_0x5e01('0x32')](_0x3791e8[_0x5e01('0x2e')],qs[_0x5e01('0x34')](_0xb93846['query'][_0x5e01('0x34')]));_0x44a5e4['attributes']=_0x44a5e4[_0x5e01('0x33')][_0x5e01('0x35')]?_0x44a5e4[_0x5e01('0x33')]:_0x3791e8[_0x5e01('0x2e')];if(_0xb93846[_0x5e01('0x2f')][_0x5e01('0x42')]){_0x44a5e4['include']=[{'all':!![]}];}_0x44a5e4=_[_0x5e01('0x43')]({},_0x44a5e4,_0xb93846['options']);return db[_0x5e01('0x29')][_0x5e01('0x44')](_0x44a5e4)[_0x5e01('0x1f')](handleEntityNotFound(_0x23275f,null))[_0x5e01('0x1f')](respondWithResult(_0x23275f,null))[_0x5e01('0x45')](handleError(_0x23275f,null));};exports[_0x5e01('0x46')]=function(_0x555204,_0x5cf1e4){return db[_0x5e01('0x29')][_0x5e01('0x46')](_0x555204[_0x5e01('0x47')],{})[_0x5e01('0x1f')](function(_0x3d5bfb){var _0x389520=_0x555204[_0x5e01('0x48')][_0x5e01('0x21')]({'plain':!![]});if(!_0x389520)throw new Error(_0x5e01('0x49'));if(_0x389520[_0x5e01('0x4a')]===_0x5e01('0x48')){var _0x5cd7ec=_0x3d5bfb[_0x5e01('0x21')]({'plain':!![]});var _0x426ab8=_0x5e01('0x22');return db['UserProfileSection'][_0x5e01('0x44')]({'where':{'name':_0x426ab8,'userProfileId':_0x389520[_0x5e01('0x4b')]},'raw':!![]})[_0x5e01('0x1f')](function(_0xa8ff1b){if(_0xa8ff1b&&_0xa8ff1b[_0x5e01('0x4c')]===0x0){return db['UserProfileResource'][_0x5e01('0x46')]({'name':_0x5cd7ec['name'],'resourceId':_0x5cd7ec['id'],'type':_0xa8ff1b[_0x5e01('0x25')],'sectionId':_0xa8ff1b['id']},{})[_0x5e01('0x1f')](function(){return _0x3d5bfb;});}else{return _0x3d5bfb;}})[_0x5e01('0x45')](function(_0x4c368c){logger[_0x5e01('0x4d')](_0x5e01('0x4e'),_0x4c368c);throw _0x4c368c;});}return _0x3d5bfb;})[_0x5e01('0x1f')](respondWithResult(_0x5cf1e4,0xc9))[_0x5e01('0x45')](handleError(_0x5cf1e4,null));};exports[_0x5e01('0x4f')]=function(_0x4f7784,_0x2b4ba9){if(_0x4f7784[_0x5e01('0x47')]['id']){delete _0x4f7784[_0x5e01('0x47')]['id'];}return db[_0x5e01('0x29')][_0x5e01('0x44')]({'where':{'id':_0x4f7784[_0x5e01('0x41')]['id']}})['then'](handleEntityNotFound(_0x2b4ba9,null))[_0x5e01('0x1f')](saveUpdates(_0x4f7784['body'],null))[_0x5e01('0x1f')](respondWithResult(_0x2b4ba9,null))[_0x5e01('0x45')](handleError(_0x2b4ba9,null));};exports[_0x5e01('0x20')]=function(_0x5012cb,_0x222a13){return db[_0x5e01('0x29')]['find']({'where':{'id':_0x5012cb[_0x5e01('0x41')]['id']}})['then'](handleEntityNotFound(_0x222a13,null))[_0x5e01('0x1f')](removeEntity(_0x222a13,null))[_0x5e01('0x45')](handleError(_0x222a13,null));};
\ No newline at end of file
+var _0xe14d=['includeAll','include','rows','catch','params','options','find','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','apply','reject','update','then','destroy','get','Dispositions','error','stack','name','send','index','map','Disposition','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','order','pick','filter','where','merge','type','VIRTUAL'];(function(_0x52784b,_0x35e2f0){var _0x3e90ec=function(_0x1d507f){while(--_0x1d507f){_0x52784b['push'](_0x52784b['shift']());}};_0x3e90ec(++_0x35e2f0);}(_0xe14d,0x1ee));var _0xde14=function(_0x33032e,_0x31411a){_0x33032e=_0x33032e-0x0;var _0x13316b=_0xe14d[_0x33032e];return _0x13316b;};'use strict';var pdf=require(_0xde14('0x0'));var emlformat=require(_0xde14('0x1'));var rimraf=require(_0xde14('0x2'));var zipdir=require(_0xde14('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xde14('0x4'));var moment=require(_0xde14('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xde14('0x6'));var util=require(_0xde14('0x7'));var path=require(_0xde14('0x8'));var sox=require(_0xde14('0x9'));var csv=require(_0xde14('0xa'));var ejs=require(_0xde14('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xde14('0xc'));var jsforce=require(_0xde14('0xd'));var deskjs=require(_0xde14('0xe'));var toCsv=require(_0xde14('0xa'));var querystring=require(_0xde14('0xf'));var Papa=require(_0xde14('0x10'));var Redis=require(_0xde14('0x11'));var authService=require(_0xde14('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xde14('0x13'));var hardwareService=require(_0xde14('0x14'));var logger=require(_0xde14('0x15'))(_0xde14('0x16'));var utils=require(_0xde14('0x17'));var config=require(_0xde14('0x18'));var db=require(_0xde14('0x19'))['db'];function respondWithStatusCode(_0x3d5a29,_0x34e28f){_0x34e28f=_0x34e28f||0xcc;return function(_0x29e3ca){if(_0x29e3ca){return _0x3d5a29[_0xde14('0x1a')](_0x34e28f);}return _0x3d5a29[_0xde14('0x1b')](_0x34e28f)[_0xde14('0x1c')]();};}function respondWithResult(_0x281c54,_0x1489e9){_0x1489e9=_0x1489e9||0xc8;return function(_0x54c58b){if(_0x54c58b){return _0x281c54['status'](_0x1489e9)[_0xde14('0x1d')](_0x54c58b);}};}function respondWithFilteredResult(_0x1db2f6,_0x26c1ec){return function(_0x4c86ff){if(_0x4c86ff){var _0x16aa55=_0x4c86ff[_0xde14('0x1e')],_0x31adb3=_0x26c1ec[_0xde14('0x1f')],_0x257390=_0x26c1ec[_0xde14('0x1f')]+_0x26c1ec[_0xde14('0x20')],_0x31902a;if(_0x257390>=_0x16aa55){_0x257390=_0x16aa55;_0x31902a=0xc8;}else{_0x31902a=0xce;}_0x1db2f6[_0xde14('0x1b')](_0x31902a);return _0x1db2f6[_0xde14('0x21')]('Content-Range',_0x31adb3+'-'+_0x257390+'/'+_0x16aa55)[_0xde14('0x1d')](_0x4c86ff);}return null;};}function patchUpdates(_0x3bfc59){return function(_0x2eb8a8){try{jsonpatch[_0xde14('0x22')](_0x2eb8a8,_0x3bfc59,!![]);}catch(_0x4ce69f){return BPromise[_0xde14('0x23')](_0x4ce69f);}return _0x2eb8a8['save']();};}function saveUpdates(_0x45d101,_0x4c24a8){return function(_0xa50687){if(_0xa50687){return _0xa50687[_0xde14('0x24')](_0x45d101)[_0xde14('0x25')](function(_0x1949ab){return _0x1949ab;});}return null;};}function removeEntity(_0x39bdc5,_0x11a4d9){return function(_0x40b648){if(_0x40b648){return _0x40b648[_0xde14('0x26')]()[_0xde14('0x25')](function(){var _0x163b79=_0x40b648[_0xde14('0x27')]({'plain':!![]});var _0xbaa078=_0xde14('0x28');return db['UserProfileResource'][_0xde14('0x26')]({'where':{'type':_0xbaa078,'resourceId':_0x163b79['id']}})[_0xde14('0x25')](function(){return _0x40b648;});})[_0xde14('0x25')](function(){_0x39bdc5[_0xde14('0x1b')](0xcc)[_0xde14('0x1c')]();});}};}function handleEntityNotFound(_0x21ef15,_0x310d75){return function(_0x23c735){if(!_0x23c735){_0x21ef15[_0xde14('0x1a')](0x194);}return _0x23c735;};}function handleError(_0x350a78,_0x4eff65){_0x4eff65=_0x4eff65||0x1f4;return function(_0x309922){logger[_0xde14('0x29')](_0x309922[_0xde14('0x2a')]);if(_0x309922[_0xde14('0x2b')]){delete _0x309922['name'];}_0x350a78[_0xde14('0x1b')](_0x4eff65)[_0xde14('0x2c')](_0x309922);};}exports[_0xde14('0x2d')]=function(_0x553cab,_0x4655fb){var _0x582537={},_0x2760f9={},_0x361b2c={'count':0x0,'rows':[]};var _0x3bb1da=_[_0xde14('0x2e')](db[_0xde14('0x2f')][_0xde14('0x30')],function(_0xae9dca){return{'name':_0xae9dca[_0xde14('0x31')],'type':_0xae9dca['type'][_0xde14('0x32')]};});_0x2760f9[_0xde14('0x33')]=_['map'](_0x3bb1da,_0xde14('0x2b'));_0x2760f9['query']=_[_0xde14('0x34')](_0x553cab[_0xde14('0x35')]);_0x2760f9[_0xde14('0x36')]=_[_0xde14('0x37')](_0x2760f9[_0xde14('0x33')],_0x2760f9['query']);_0x582537[_0xde14('0x38')]=_[_0xde14('0x37')](_0x2760f9['model'],qs[_0xde14('0x39')](_0x553cab[_0xde14('0x35')][_0xde14('0x39')]));_0x582537[_0xde14('0x38')]=_0x582537[_0xde14('0x38')][_0xde14('0x3a')]?_0x582537[_0xde14('0x38')]:_0x2760f9[_0xde14('0x33')];if(!_0x553cab[_0xde14('0x35')]['hasOwnProperty']('nolimit')){_0x582537[_0xde14('0x20')]=qs[_0xde14('0x20')](_0x553cab[_0xde14('0x35')][_0xde14('0x20')]);_0x582537[_0xde14('0x1f')]=qs[_0xde14('0x1f')](_0x553cab[_0xde14('0x35')][_0xde14('0x1f')]);}_0x582537[_0xde14('0x3b')]=qs['sort'](_0x553cab[_0xde14('0x35')]['sort']);_0x582537['where']=qs['filters'](_[_0xde14('0x3c')](_0x553cab[_0xde14('0x35')],_0x2760f9[_0xde14('0x36')]));if(_0x553cab[_0xde14('0x35')][_0xde14('0x3d')]){_0x582537[_0xde14('0x3e')]=_[_0xde14('0x3f')](_0x582537[_0xde14('0x3e')],{'$or':_['map'](_0x3bb1da,function(_0xc2a39d){if(_0xc2a39d[_0xde14('0x40')]!==_0xde14('0x41')){var _0x2b3004={};_0x2b3004[_0xc2a39d[_0xde14('0x2b')]]={'$like':'%'+_0x553cab[_0xde14('0x35')][_0xde14('0x3d')]+'%'};return _0x2b3004;}})});}_0x582537=_[_0xde14('0x3f')]({},_0x582537,_0x553cab['options']);var _0x225164={'where':_0x582537[_0xde14('0x3e')]};return db[_0xde14('0x2f')][_0xde14('0x1e')](_0x225164)['then'](function(_0x5ebb03){_0x361b2c[_0xde14('0x1e')]=_0x5ebb03;if(_0x553cab[_0xde14('0x35')][_0xde14('0x42')]){_0x582537[_0xde14('0x43')]=[{'all':!![]}];}return db[_0xde14('0x2f')]['findAll'](_0x582537);})[_0xde14('0x25')](function(_0x70c912){_0x361b2c[_0xde14('0x44')]=_0x70c912;return _0x361b2c;})['then'](respondWithFilteredResult(_0x4655fb,_0x582537))[_0xde14('0x45')](handleError(_0x4655fb,null));};exports['show']=function(_0x46ac22,_0x51ace9){var _0x102770={'raw':!![],'where':{'id':_0x46ac22[_0xde14('0x46')]['id']}},_0x117c64={};_0x117c64[_0xde14('0x33')]=_[_0xde14('0x34')](db[_0xde14('0x2f')][_0xde14('0x30')]);_0x117c64[_0xde14('0x35')]=_['keys'](_0x46ac22[_0xde14('0x35')]);_0x117c64['filters']=_[_0xde14('0x37')](_0x117c64['model'],_0x117c64[_0xde14('0x35')]);_0x102770[_0xde14('0x38')]=_[_0xde14('0x37')](_0x117c64[_0xde14('0x33')],qs[_0xde14('0x39')](_0x46ac22[_0xde14('0x35')][_0xde14('0x39')]));_0x102770[_0xde14('0x38')]=_0x102770['attributes'][_0xde14('0x3a')]?_0x102770[_0xde14('0x38')]:_0x117c64[_0xde14('0x33')];if(_0x46ac22[_0xde14('0x35')]['includeAll']){_0x102770[_0xde14('0x43')]=[{'all':!![]}];}_0x102770=_[_0xde14('0x3f')]({},_0x102770,_0x46ac22[_0xde14('0x47')]);return db[_0xde14('0x2f')][_0xde14('0x48')](_0x102770)[_0xde14('0x25')](handleEntityNotFound(_0x51ace9,null))['then'](respondWithResult(_0x51ace9,null))[_0xde14('0x45')](handleError(_0x51ace9,null));};exports['create']=function(_0xa408ec,_0x383b99){return db['Disposition'][_0xde14('0x49')](_0xa408ec[_0xde14('0x4a')],{})[_0xde14('0x25')](function(_0x2775da){var _0x2d05c7=_0xa408ec[_0xde14('0x4b')][_0xde14('0x27')]({'plain':!![]});if(!_0x2d05c7)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2d05c7[_0xde14('0x4c')]==='user'){var _0xfa80c8=_0x2775da[_0xde14('0x27')]({'plain':!![]});var _0x237be4=_0xde14('0x28');return db[_0xde14('0x4d')][_0xde14('0x48')]({'where':{'name':_0x237be4,'userProfileId':_0x2d05c7[_0xde14('0x4e')]},'raw':!![]})[_0xde14('0x25')](function(_0x3495d1){if(_0x3495d1&&_0x3495d1[_0xde14('0x4f')]===0x0){return db['UserProfileResource'][_0xde14('0x49')]({'name':_0xfa80c8[_0xde14('0x2b')],'resourceId':_0xfa80c8['id'],'type':_0x3495d1[_0xde14('0x2b')],'sectionId':_0x3495d1['id']},{})[_0xde14('0x25')](function(){return _0x2775da;});}else{return _0x2775da;}})[_0xde14('0x45')](function(_0x4874ed){logger[_0xde14('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4874ed);throw _0x4874ed;});}return _0x2775da;})[_0xde14('0x25')](respondWithResult(_0x383b99,0xc9))[_0xde14('0x45')](handleError(_0x383b99,null));};exports[_0xde14('0x24')]=function(_0x115d3e,_0x30d230){if(_0x115d3e['body']['id']){delete _0x115d3e['body']['id'];}return db[_0xde14('0x2f')]['find']({'where':{'id':_0x115d3e[_0xde14('0x46')]['id']}})[_0xde14('0x25')](handleEntityNotFound(_0x30d230,null))[_0xde14('0x25')](saveUpdates(_0x115d3e[_0xde14('0x4a')],null))[_0xde14('0x25')](respondWithResult(_0x30d230,null))[_0xde14('0x45')](handleError(_0x30d230,null));};exports[_0xde14('0x26')]=function(_0x187bd3,_0x423adc){return db['Disposition'][_0xde14('0x48')]({'where':{'id':_0x187bd3[_0xde14('0x46')]['id']}})[_0xde14('0x25')](handleEntityNotFound(_0x423adc,null))[_0xde14('0x25')](removeEntity(_0x423adc,null))[_0xde14('0x45')](handleError(_0x423adc,null));};
\ No newline at end of file
diff --git a/server/api/disposition/disposition.model.js b/server/api/disposition/disposition.model.js
index fa1af60..52218b4 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 _0x182f=['rimraf','../../config/environment','define','Disposition','tools_dispositions','name','ListId','name_chat','ChatWebsiteId','name_mail','MailAccountId','name_sms','SmsAccountId','name_fax','name_openchannel','OpenchannelAccountId','lodash','util','api','moment','request-promise','path'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x182f,0xaa));var _0xf182=function(_0xe0095e,_0x56eb1f){_0xe0095e=_0xe0095e-0x0;var _0x29e5e9=_0x182f[_0xe0095e];return _0x29e5e9;};'use strict';var _=require(_0xf182('0x0'));var util=require(_0xf182('0x1'));var logger=require('../../config/logger')(_0xf182('0x2'));var moment=require(_0xf182('0x3'));var BPromise=require('bluebird');var rp=require(_0xf182('0x4'));var fs=require('fs');var path=require(_0xf182('0x5'));var rimraf=require(_0xf182('0x6'));var config=require(_0xf182('0x7'));var attributes=require('./disposition.attributes');module['exports']=function(_0x1b7401,_0x23beb7){return _0x1b7401[_0xf182('0x8')](_0xf182('0x9'),attributes,{'tableName':_0xf182('0xa'),'paranoid':![],'indexes':[{'unique':!![],'name':'name_voice','fields':[_0xf182('0xb'),_0xf182('0xc')]},{'unique':!![],'name':_0xf182('0xd'),'fields':['name',_0xf182('0xe')]},{'unique':!![],'name':_0xf182('0xf'),'fields':[_0xf182('0xb'),_0xf182('0x10')]},{'unique':!![],'name':_0xf182('0x11'),'fields':[_0xf182('0xb'),_0xf182('0x12')]},{'unique':!![],'name':_0xf182('0x13'),'fields':[_0xf182('0xb'),'FaxAccountId']},{'unique':!![],'name':_0xf182('0x14'),'fields':[_0xf182('0xb'),_0xf182('0x15')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xe100=['MailAccountId','name_sms','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','lodash','util','moment','bluebird','request-promise','path','rimraf','./disposition.attributes','exports','define','Disposition','tools_dispositions','name_voice','name','ListId','name_chat','ChatWebsiteId'];(function(_0x42ed70,_0x58b3ef){var _0x514049=function(_0x5c6d67){while(--_0x5c6d67){_0x42ed70['push'](_0x42ed70['shift']());}};_0x514049(++_0x58b3ef);}(_0xe100,0x1bb));var _0x0e10=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xe100[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x0e10('0x0'));var util=require(_0x0e10('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x0e10('0x2'));var BPromise=require(_0x0e10('0x3'));var rp=require(_0x0e10('0x4'));var fs=require('fs');var path=require(_0x0e10('0x5'));var rimraf=require(_0x0e10('0x6'));var config=require('../../config/environment');var attributes=require(_0x0e10('0x7'));module[_0x0e10('0x8')]=function(_0x409a7e,_0x46d1a1){return _0x409a7e[_0x0e10('0x9')](_0x0e10('0xa'),attributes,{'tableName':_0x0e10('0xb'),'paranoid':![],'indexes':[{'unique':!![],'name':_0x0e10('0xc'),'fields':[_0x0e10('0xd'),_0x0e10('0xe')]},{'unique':!![],'name':_0x0e10('0xf'),'fields':[_0x0e10('0xd'),_0x0e10('0x10')]},{'unique':!![],'name':'name_mail','fields':[_0x0e10('0xd'),_0x0e10('0x11')]},{'unique':!![],'name':_0x0e10('0x12'),'fields':[_0x0e10('0xd'),'SmsAccountId']},{'unique':!![],'name':_0x0e10('0x13'),'fields':[_0x0e10('0xd'),_0x0e10('0x14')]},{'unique':!![],'name':_0x0e10('0x15'),'fields':[_0x0e10('0xd'),_0x0e10('0x16')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/disposition/disposition.rpc.js b/server/api/disposition/disposition.rpc.js
index 95daa1d..f6ababc 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 _0x61e5=['info','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','Disposition,\x20%s,\x20%s','debug','Disposition,\x20%s,\x20%s,\x20%s','request\x20sent','error','message'];(function(_0x54f3e8,_0x3ed493){var _0x267b37=function(_0x58247e){while(--_0x58247e){_0x54f3e8['push'](_0x54f3e8['shift']());}};_0x267b37(++_0x3ed493);}(_0x61e5,0x152));var _0x561e=function(_0x46209c,_0x11925e){_0x46209c=_0x46209c-0x0;var _0xa1261c=_0x61e5[_0x46209c];return _0xa1261c;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x561e('0x0'));var BPromise=require(_0x561e('0x1'));var rs=require(_0x561e('0x2'));var fs=require('fs');var Redis=require(_0x561e('0x3'));var db=require(_0x561e('0x4'))['db'];var utils=require(_0x561e('0x5'));var logger=require(_0x561e('0x6'))(_0x561e('0x7'));var config=require('../../config/environment');var jayson=require(_0x561e('0x8'));var client=jayson[_0x561e('0x9')][_0x561e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x10423d,_0xcadcf,_0x15b857){return new BPromise(function(_0x723b6b,_0x79914c){return client[_0x561e('0xb')](_0x10423d,_0x15b857)[_0x561e('0xc')](function(_0x257eaf){logger['info'](_0x561e('0xd'),_0xcadcf,'request\x20sent');logger[_0x561e('0xe')](_0x561e('0xf'),_0xcadcf,_0x561e('0x10'),JSON['stringify'](_0x257eaf));if(_0x257eaf[_0x561e('0x11')]){if(_0x257eaf[_0x561e('0x11')]['code']===0x1f4){logger[_0x561e('0x11')](_0x561e('0xd'),_0xcadcf,_0x257eaf[_0x561e('0x11')][_0x561e('0x12')]);return _0x79914c(_0x257eaf[_0x561e('0x11')][_0x561e('0x12')]);}logger[_0x561e('0x11')](_0x561e('0xd'),_0xcadcf,_0x257eaf[_0x561e('0x11')][_0x561e('0x12')]);return _0x723b6b(_0x257eaf[_0x561e('0x11')]['message']);}else{logger[_0x561e('0x13')](_0x561e('0xd'),_0xcadcf,_0x561e('0x10'));_0x723b6b(_0x257eaf['result'][_0x561e('0x12')]);}})[_0x561e('0x14')](function(_0x28e519){logger[_0x561e('0x11')](_0x561e('0xd'),_0xcadcf,_0x28e519);_0x79914c(_0x28e519);});});}
\ No newline at end of file
+var _0x5934=['catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','then','info','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x3a5595,_0x267381){var _0x3cac19=function(_0x50953f){while(--_0x50953f){_0x3a5595['push'](_0x3a5595['shift']());}};_0x3cac19(++_0x267381);}(_0x5934,0x177));var _0x4593=function(_0x52f400,_0x4db153){_0x52f400=_0x52f400-0x0;var _0x44ad48=_0x5934[_0x52f400];return _0x44ad48;};'use strict';var _=require(_0x4593('0x0'));var util=require(_0x4593('0x1'));var moment=require('moment');var BPromise=require(_0x4593('0x2'));var rs=require(_0x4593('0x3'));var fs=require('fs');var Redis=require(_0x4593('0x4'));var db=require(_0x4593('0x5'))['db'];var utils=require(_0x4593('0x6'));var logger=require('../../config/logger')(_0x4593('0x7'));var config=require('../../config/environment');var jayson=require(_0x4593('0x8'));var client=jayson[_0x4593('0x9')][_0x4593('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x53d200,_0x5828d7,_0x9e06b1){return new BPromise(function(_0x4431cc,_0x4173df){return client['request'](_0x53d200,_0x9e06b1)[_0x4593('0xb')](function(_0x3b92ac){logger[_0x4593('0xc')](_0x4593('0xd'),_0x5828d7,_0x4593('0xe'));logger[_0x4593('0xf')](_0x4593('0x10'),_0x5828d7,_0x4593('0xe'),JSON[_0x4593('0x11')](_0x3b92ac));if(_0x3b92ac[_0x4593('0x12')]){if(_0x3b92ac['error'][_0x4593('0x13')]===0x1f4){logger[_0x4593('0x12')](_0x4593('0xd'),_0x5828d7,_0x3b92ac['error'][_0x4593('0x14')]);return _0x4173df(_0x3b92ac[_0x4593('0x12')][_0x4593('0x14')]);}logger[_0x4593('0x12')](_0x4593('0xd'),_0x5828d7,_0x3b92ac['error']['message']);return _0x4431cc(_0x3b92ac[_0x4593('0x12')][_0x4593('0x14')]);}else{logger[_0x4593('0xc')](_0x4593('0xd'),_0x5828d7,_0x4593('0xe'));_0x4431cc(_0x3b92ac['result'][_0x4593('0x14')]);}})[_0x4593('0x15')](function(_0x5240d0){logger[_0x4593('0x12')](_0x4593('0xd'),_0x5828d7,_0x5240d0);_0x4173df(_0x5240d0);});});}
\ No newline at end of file
diff --git a/server/api/disposition/index.js b/server/api/disposition/index.js
index 4c7ecbb..507f268 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 _0x288a=['delete','exports','util','path','connect-timeout','express','../../components/interaction/service','./disposition.controller','get','isAuthenticated','/:id','post','create','put','update'];(function(_0x13f2ec,_0x407206){var _0x389ca9=function(_0x43d7d6){while(--_0x43d7d6){_0x13f2ec['push'](_0x13f2ec['shift']());}};_0x389ca9(++_0x407206);}(_0x288a,0x188));var _0xa288=function(_0x1551fb,_0x2552dc){_0x1551fb=_0x1551fb-0x0;var _0x32c5e4=_0x288a[_0x1551fb];return _0x32c5e4;};'use strict';var multer=require('multer');var util=require(_0xa288('0x0'));var path=require(_0xa288('0x1'));var timeout=require(_0xa288('0x2'));var express=require(_0xa288('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xa288('0x4'));var config=require('../../config/environment');var controller=require(_0xa288('0x5'));router[_0xa288('0x6')]('/',auth[_0xa288('0x7')](),controller['index']);router[_0xa288('0x6')](_0xa288('0x8'),auth[_0xa288('0x7')](),controller['show']);router[_0xa288('0x9')]('/',auth[_0xa288('0x7')](),controller[_0xa288('0xa')]);router[_0xa288('0xb')](_0xa288('0x8'),auth[_0xa288('0x7')](),controller[_0xa288('0xc')]);router[_0xa288('0xd')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xa288('0xe')]=router;
\ No newline at end of file
+var _0x8579=['Router','../../components/auth/service','isAuthenticated','index','get','/:id','show','create','put','update','destroy','exports','multer','util','connect-timeout','express'];(function(_0x4a2da2,_0x1c4e33){var _0x31960c=function(_0x5914b4){while(--_0x5914b4){_0x4a2da2['push'](_0x4a2da2['shift']());}};_0x31960c(++_0x1c4e33);}(_0x8579,0x16c));var _0x9857=function(_0x4f0b69,_0x11b0ca){_0x4f0b69=_0x4f0b69-0x0;var _0x1eccbc=_0x8579[_0x4f0b69];return _0x1eccbc;};'use strict';var multer=require(_0x9857('0x0'));var util=require(_0x9857('0x1'));var path=require('path');var timeout=require(_0x9857('0x2'));var express=require(_0x9857('0x3'));var router=express[_0x9857('0x4')]();var auth=require(_0x9857('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./disposition.controller');router['get']('/',auth[_0x9857('0x6')](),controller[_0x9857('0x7')]);router[_0x9857('0x8')](_0x9857('0x9'),auth[_0x9857('0x6')](),controller[_0x9857('0xa')]);router['post']('/',auth[_0x9857('0x6')](),controller[_0x9857('0xb')]);router[_0x9857('0xc')](_0x9857('0x9'),auth[_0x9857('0x6')](),controller[_0x9857('0xd')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x9857('0xe')]);module[_0x9857('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.attributes.js b/server/api/faxAccount/faxAccount.attributes.js
index 5a789a6..4f3c526 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 _0x6309=['mandatoryDisposition','sequelize','exports','STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid','2400','4800','7200','9600','12000','14400','v17,v27,v29','SIP','IAX','DADHI','KHOMP','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId'];(function(_0x174977,_0x117c44){var _0x2d400b=function(_0x3c4c8f){while(--_0x3c4c8f){_0x174977['push'](_0x174977['shift']());}};_0x2d400b(++_0x117c44);}(_0x6309,0x9d));var _0x9630=function(_0x307086,_0x3bfe4e){_0x307086=_0x307086-0x0;var _0x699043=_0x6309[_0x307086];return _0x699043;};'use strict';var Sequelize=require(_0x9630('0x0'));module[_0x9630('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x9630('0x2')]},'ecm':{'type':Sequelize[_0x9630('0x3')](_0x9630('0x4'),'no'),'defaultValue':'yes'},'headerinfo':{'type':Sequelize['STRING'],'defaultValue':_0x9630('0x5')},'localstationid':{'type':Sequelize['STRING'],'unique':_0x9630('0x6')},'minrate':{'type':Sequelize[_0x9630('0x3')](_0x9630('0x7'),_0x9630('0x8'),_0x9630('0x9'),_0x9630('0xa'),_0x9630('0xb'),_0x9630('0xc')),'defaultValue':_0x9630('0x8')},'maxrate':{'type':Sequelize['ENUM'](_0x9630('0x7'),_0x9630('0x8'),'7200',_0x9630('0xa'),_0x9630('0xb'),_0x9630('0xc')),'defaultValue':_0x9630('0xc')},'modem':{'type':Sequelize[_0x9630('0x2')],'defaultValue':_0x9630('0xd')},'gateway':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x9630('0x2')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize['INTEGER'],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x9630('0x3')](_0x9630('0xe'),_0x9630('0xf'),_0x9630('0x10'),_0x9630('0x11')),'defaultValue':_0x9630('0xe')},'key':{'type':Sequelize[_0x9630('0x2')],'allowNull':![]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x9630('0x12');}},'notificationSound':{'type':Sequelize[_0x9630('0x13')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x9630('0x13')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x9630('0x14')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x9630('0x13')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x9630('0x14')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x9630('0x14')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x9630('0x14')],'allowNull':!![],'defaultValue':null,'comment':_0x9630('0x15')},'mandatoryDisposition':{'type':Sequelize[_0x9630('0x13')],'defaultValue':![],'comment':_0x9630('0x16'),'set':function(_0x1e3353){if(!_0x1e3353)this[_0x9630('0x17')](_0x9630('0x18'),null);this[_0x9630('0x17')](_0x9630('0x19'),_0x1e3353);}}};
\ No newline at end of file
+var _0xeb28=['setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports','ENUM','yes','xCALLY\x20Motion\x20Fax','STRING','localstationid','2400','4800','7200','9600','12000','14400','SIP','IAX','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue'];(function(_0x51e7f8,_0x1b4d4c){var _0x1b19cf=function(_0x3af857){while(--_0x3af857){_0x51e7f8['push'](_0x51e7f8['shift']());}};_0x1b19cf(++_0x1b4d4c);}(_0xeb28,0x10b));var _0x8eb2=function(_0x4e7bae,_0x587907){_0x4e7bae=_0x4e7bae-0x0;var _0x1891aa=_0xeb28[_0x4e7bae];return _0x1891aa;};'use strict';var Sequelize=require(_0x8eb2('0x0'));module[_0x8eb2('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']},'ecm':{'type':Sequelize[_0x8eb2('0x2')](_0x8eb2('0x3'),'no'),'defaultValue':_0x8eb2('0x3')},'headerinfo':{'type':Sequelize['STRING'],'defaultValue':_0x8eb2('0x4')},'localstationid':{'type':Sequelize[_0x8eb2('0x5')],'unique':_0x8eb2('0x6')},'minrate':{'type':Sequelize[_0x8eb2('0x2')](_0x8eb2('0x7'),_0x8eb2('0x8'),_0x8eb2('0x9'),_0x8eb2('0xa'),_0x8eb2('0xb'),_0x8eb2('0xc')),'defaultValue':'4800'},'maxrate':{'type':Sequelize['ENUM'](_0x8eb2('0x7'),'4800',_0x8eb2('0x9'),_0x8eb2('0xa'),'12000',_0x8eb2('0xc')),'defaultValue':_0x8eb2('0xc')},'modem':{'type':Sequelize[_0x8eb2('0x5')],'defaultValue':'v17,v27,v29'},'gateway':{'type':Sequelize[_0x8eb2('0x5')],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x8eb2('0x5')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize['INTEGER'],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x8eb2('0x2')](_0x8eb2('0xd'),_0x8eb2('0xe'),'DADHI','KHOMP'),'defaultValue':'SIP'},'key':{'type':Sequelize[_0x8eb2('0x5')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x8eb2('0xf')],'defaultValue':function(){return _0x8eb2('0x10');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x8eb2('0x11')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x8eb2('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x8eb2('0x11')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x8eb2('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x8eb2('0x11')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x8eb2('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x8eb2('0x12')],'allowNull':!![],'defaultValue':null,'comment':_0x8eb2('0x13')},'mandatoryDisposition':{'type':Sequelize[_0x8eb2('0x11')],'defaultValue':![],'comment':_0x8eb2('0x14'),'set':function(_0x4d4512){if(!_0x4d4512)this[_0x8eb2('0x15')](_0x8eb2('0x16'),null);this[_0x8eb2('0x15')](_0x8eb2('0x17'),_0x4d4512);}}};
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.controller.js b/server/api/faxAccount/faxAccount.controller.js
index 855866b..5d4bfa6 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 _0xe83c=['attachments','join','server/files/attachments','basename','CheckAfterSend','isNil','from','\x22%s\x22\x20<%s>','fax','out','filename','Messages','ContactId','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','spread','emit','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','getAgents','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','jayson/promise','client','test','Sequelize','request','then','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','FaxAccount,\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','FaxAccounts','UserProfileResource','name','index','Pause','mandatoryDispositionPause','map','FaxAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','filter','merge','VIRTUAL','options','includeAll','findAll','show','params','include','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addDisposition','FaxAccountId','Disposition','getDispositions','findOne','pick','rows','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','nolimit','order','removeAnswers','addInteraction','FaxInteraction','omit','getInteractions','CmContact','Contact','User','Owner','internal','Tag','color','tag','addApplications','transaction','FaxApplication','bulkCreate','priority','getApplications','context','from-voip-provider','exten','localstationid','system','description','Answer','push','CDR(type)=inbound-fax','ecm','gateway','faxdetect','headerinfo','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','sequelize','updateAccountApplications','VoiceExtension','tech','updatedAt','TrunkId','ListId','findById','getMessages','$gte','format','YYYY-MM-DD\x20HH:mm:ss','FaxMessage','send','CmList','List','Contacts','DESC'];(function(_0x288549,_0x1499da){var _0x1e4ff2=function(_0x1a424b){while(--_0x1a424b){_0x288549['push'](_0x288549['shift']());}};_0x1e4ff2(++_0x1499da);}(_0xe83c,0x1a6));var _0xce83=function(_0x47408e,_0x481428){_0x47408e=_0x47408e-0x0;var _0x1636bc=_0xe83c[_0x47408e];return _0x1636bc;};'use strict';var pdf=require(_0xce83('0x0'));var emlformat=require(_0xce83('0x1'));var rimraf=require(_0xce83('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xce83('0x3'));var rp=require(_0xce83('0x4'));var moment=require('moment');var BPromise=require(_0xce83('0x5'));var Mustache=require(_0xce83('0x6'));var util=require('util');var path=require(_0xce83('0x7'));var sox=require(_0xce83('0x8'));var csv=require(_0xce83('0x9'));var ejs=require(_0xce83('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xce83('0xb'));var crypto=require(_0xce83('0xc'));var jsforce=require(_0xce83('0xd'));var deskjs=require(_0xce83('0xe'));var toCsv=require(_0xce83('0x9'));var querystring=require(_0xce83('0xf'));var Papa=require(_0xce83('0x10'));var Redis=require(_0xce83('0x11'));var authService=require(_0xce83('0x12'));var qs=require(_0xce83('0x13'));var as=require(_0xce83('0x14'));var hardwareService=require(_0xce83('0x15'));var logger=require(_0xce83('0x16'))(_0xce83('0x17'));var utils=require(_0xce83('0x18'));var config=require(_0xce83('0x19'));var db=require(_0xce83('0x1a'))['db'];config[_0xce83('0x1b')]=_[_0xce83('0x1c')](config['redis'],{'host':_0xce83('0x1d'),'port':0x18eb});var socket=require(_0xce83('0x1e'))(new Redis(config[_0xce83('0x1b')]));require('./faxAccount.socket')['register'](socket);var jayson=require(_0xce83('0x1f'));var client=jayson['client']['http']({'port':0x232c});var client9002=jayson[_0xce83('0x20')]['http']({'port':0x232a});function checkPasswordPattern(_0x1d391e,_0x20eb87,_0x40e137){if(_0x40e137){var _0x2dfbd0=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2dfbd0[_0xce83('0x21')](_0x20eb87)){return _0x1d391e;}else{throw new db[(_0xce83('0x22'))]['ValidationError']('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x1d391e;}}function respondWithRpcPromise(_0x202d0c,_0x46ca41,_0x1b687b,_0x2c4c99){return new BPromise(function(_0x5317bf,_0x3788f2){var _0x322a3f=_0x2c4c99||client;return _0x322a3f[_0xce83('0x23')](_0x202d0c,_0x1b687b)[_0xce83('0x24')](function(_0x37a8ed){logger['info'](_0xce83('0x25'),_0x46ca41,_0xce83('0x26'));logger[_0xce83('0x27')](_0xce83('0x28'),_0x46ca41,_0xce83('0x26'),JSON[_0xce83('0x29')](_0x37a8ed));if(_0x37a8ed[_0xce83('0x2a')]){if(_0x37a8ed[_0xce83('0x2a')][_0xce83('0x2b')]===0x1f4){logger['error'](_0xce83('0x25'),_0x46ca41,_0x37a8ed[_0xce83('0x2a')]['message']);return _0x3788f2(_0x37a8ed[_0xce83('0x2a')]['message']);}logger[_0xce83('0x2a')](_0xce83('0x25'),_0x46ca41,_0x37a8ed[_0xce83('0x2a')][_0xce83('0x2c')]);return _0x5317bf(_0x37a8ed[_0xce83('0x2a')][_0xce83('0x2c')]);}else{logger[_0xce83('0x2d')](_0xce83('0x25'),_0x46ca41,'request\x20sent');_0x5317bf(_0x37a8ed[_0xce83('0x2e')][_0xce83('0x2c')]);}})[_0xce83('0x2f')](function(_0x159888){logger[_0xce83('0x2a')]('FaxAccount,\x20%s,\x20%s',_0x46ca41,_0x159888);_0x3788f2(_0x159888);});});}function respondWithStatusCode(_0x334ba5,_0x3f3d78){_0x3f3d78=_0x3f3d78||0xcc;return function(_0x5eaf62){if(_0x5eaf62){return _0x334ba5[_0xce83('0x30')](_0x3f3d78);}return _0x334ba5[_0xce83('0x31')](_0x3f3d78)[_0xce83('0x32')]();};}function respondWithResult(_0x59b558,_0x1a43e5){_0x1a43e5=_0x1a43e5||0xc8;return function(_0x4ec4a7){if(_0x4ec4a7){return _0x59b558[_0xce83('0x31')](_0x1a43e5)[_0xce83('0x33')](_0x4ec4a7);}};}function respondWithFilteredResult(_0x31ceed,_0x26e374){return function(_0x7acfb6){if(_0x7acfb6){var _0x3fd522=_0x7acfb6[_0xce83('0x34')],_0x25cec4=_0x26e374['offset'],_0x2fe3dc=_0x26e374[_0xce83('0x35')]+_0x26e374[_0xce83('0x36')],_0x2a6417;if(_0x2fe3dc>=_0x3fd522){_0x2fe3dc=_0x3fd522;_0x2a6417=0xc8;}else{_0x2a6417=0xce;}_0x31ceed['status'](_0x2a6417);return _0x31ceed[_0xce83('0x37')](_0xce83('0x38'),_0x25cec4+'-'+_0x2fe3dc+'/'+_0x3fd522)[_0xce83('0x33')](_0x7acfb6);}return null;};}function patchUpdates(_0x359c65){return function(_0x42cdcc){try{jsonpatch['apply'](_0x42cdcc,_0x359c65,!![]);}catch(_0x52d9da){return BPromise[_0xce83('0x39')](_0x52d9da);}return _0x42cdcc[_0xce83('0x3a')]();};}function saveUpdates(_0x4a8d21,_0x33cb42){return function(_0x512b24){if(_0x512b24){return _0x512b24[_0xce83('0x3b')](_0x4a8d21)[_0xce83('0x24')](function(_0x1c45ca){return _0x1c45ca;});}return null;};}function removeEntity(_0x5e4b8a,_0x2f2072){return function(_0x4924a7){if(_0x4924a7){return _0x4924a7[_0xce83('0x3c')]()['then'](function(){var _0x2498ee=_0x4924a7[_0xce83('0x3d')]({'plain':!![]});var _0x2be6a0=_0xce83('0x3e');return db[_0xce83('0x3f')][_0xce83('0x3c')]({'where':{'type':_0x2be6a0,'resourceId':_0x2498ee['id']}})[_0xce83('0x24')](function(){return _0x4924a7;});})[_0xce83('0x24')](function(){_0x5e4b8a['status'](0xcc)[_0xce83('0x32')]();});}};}function handleEntityNotFound(_0xd81add,_0x2eb631){return function(_0x50a00d){if(!_0x50a00d){_0xd81add[_0xce83('0x30')](0x194);}return _0x50a00d;};}function handleError(_0x30f3b8,_0x4c0597){_0x4c0597=_0x4c0597||0x1f4;return function(_0x500155){logger['error'](_0x500155['stack']);if(_0x500155[_0xce83('0x40')]){delete _0x500155[_0xce83('0x40')];}_0x30f3b8['status'](_0x4c0597)['send'](_0x500155);};}exports[_0xce83('0x41')]=function(_0x26b39,_0x7ddeff){var _0x55cdc3={'include':[{'model':db[_0xce83('0x42')],'as':_0xce83('0x43')}]},_0x31bf35={},_0x22da30={'count':0x0,'rows':[]};var _0x2ec6e7=_[_0xce83('0x44')](db[_0xce83('0x45')][_0xce83('0x46')],function(_0x450f7a){return{'name':_0x450f7a[_0xce83('0x47')],'type':_0x450f7a[_0xce83('0x48')][_0xce83('0x49')]};});_0x31bf35[_0xce83('0x4a')]=_['map'](_0x2ec6e7,_0xce83('0x40'));_0x31bf35[_0xce83('0x4b')]=_[_0xce83('0x4c')](_0x26b39['query']);_0x31bf35[_0xce83('0x4d')]=_[_0xce83('0x4e')](_0x31bf35[_0xce83('0x4a')],_0x31bf35['query']);_0x55cdc3[_0xce83('0x4f')]=_[_0xce83('0x4e')](_0x31bf35[_0xce83('0x4a')],qs[_0xce83('0x50')](_0x26b39[_0xce83('0x4b')][_0xce83('0x50')]));_0x55cdc3[_0xce83('0x4f')]=_0x55cdc3[_0xce83('0x4f')][_0xce83('0x51')]?_0x55cdc3[_0xce83('0x4f')]:_0x31bf35['model'];if(!_0x26b39['query'][_0xce83('0x52')]('nolimit')){_0x55cdc3['limit']=qs['limit'](_0x26b39['query'][_0xce83('0x36')]);_0x55cdc3['offset']=qs['offset'](_0x26b39[_0xce83('0x4b')][_0xce83('0x35')]);}_0x55cdc3['order']=qs[_0xce83('0x53')](_0x26b39[_0xce83('0x4b')][_0xce83('0x53')]);_0x55cdc3[_0xce83('0x54')]=qs[_0xce83('0x4d')](_['pick'](_0x26b39[_0xce83('0x4b')],_0x31bf35[_0xce83('0x4d')]));if(_0x26b39['query'][_0xce83('0x55')]){_0x55cdc3[_0xce83('0x54')]=_[_0xce83('0x56')](_0x55cdc3[_0xce83('0x54')],{'$or':_[_0xce83('0x44')](_0x2ec6e7,function(_0x90b776){if(_0x90b776[_0xce83('0x48')]!==_0xce83('0x57')){var _0x68d189={};_0x68d189[_0x90b776[_0xce83('0x40')]]={'$like':'%'+_0x26b39[_0xce83('0x4b')][_0xce83('0x55')]+'%'};return _0x68d189;}})});}_0x55cdc3=_[_0xce83('0x56')]({},_0x55cdc3,_0x26b39[_0xce83('0x58')]);var _0x2c5df4={'where':_0x55cdc3[_0xce83('0x54')]};return db[_0xce83('0x45')][_0xce83('0x34')](_0x2c5df4)[_0xce83('0x24')](function(_0x14bc50){_0x22da30[_0xce83('0x34')]=_0x14bc50;if(_0x26b39[_0xce83('0x4b')][_0xce83('0x59')]){_0x55cdc3['include']=[{'all':!![]}];}return db['FaxAccount'][_0xce83('0x5a')](_0x55cdc3);})[_0xce83('0x24')](function(_0x2b1974){_0x22da30['rows']=_0x2b1974;return _0x22da30;})[_0xce83('0x24')](respondWithFilteredResult(_0x7ddeff,_0x55cdc3))['catch'](handleError(_0x7ddeff,null));};exports[_0xce83('0x5b')]=function(_0x3d52d2,_0x31adc1){var _0x23686b={'raw':![],'where':{'id':_0x3d52d2[_0xce83('0x5c')]['id']},'include':[{'model':db[_0xce83('0x42')],'as':_0xce83('0x43')}]},_0x3dfe40={};_0x3dfe40[_0xce83('0x4a')]=_[_0xce83('0x4c')](db['FaxAccount']['rawAttributes']);_0x3dfe40['query']=_[_0xce83('0x4c')](_0x3d52d2[_0xce83('0x4b')]);_0x3dfe40[_0xce83('0x4d')]=_[_0xce83('0x4e')](_0x3dfe40[_0xce83('0x4a')],_0x3dfe40['query']);_0x23686b['attributes']=_[_0xce83('0x4e')](_0x3dfe40[_0xce83('0x4a')],qs[_0xce83('0x50')](_0x3d52d2[_0xce83('0x4b')][_0xce83('0x50')]));_0x23686b[_0xce83('0x4f')]=_0x23686b['attributes'][_0xce83('0x51')]?_0x23686b[_0xce83('0x4f')]:_0x3dfe40[_0xce83('0x4a')];if(_0x3d52d2[_0xce83('0x4b')]['includeAll']){_0x23686b[_0xce83('0x5d')]=[{'all':!![]}];}_0x23686b=_[_0xce83('0x56')]({},_0x23686b,_0x3d52d2[_0xce83('0x58')]);return db[_0xce83('0x45')]['find'](_0x23686b)['then'](handleEntityNotFound(_0x31adc1,null))[_0xce83('0x24')](respondWithResult(_0x31adc1,null))[_0xce83('0x2f')](handleError(_0x31adc1,null));};exports['create']=function(_0x431b75,_0x3542f0){return db[_0xce83('0x45')][_0xce83('0x5e')](_0x431b75[_0xce83('0x5f')],{})['then'](function(_0x265ca0){var _0x45106e=_0x431b75['user'][_0xce83('0x3d')]({'plain':!![]});if(!_0x45106e)throw new Error(_0xce83('0x60'));if(_0x45106e[_0xce83('0x61')]===_0xce83('0x62')){var _0x3a95b7=_0x265ca0['get']({'plain':!![]});var _0x5bcdb4='FaxAccounts';return db[_0xce83('0x63')][_0xce83('0x64')]({'where':{'name':_0x5bcdb4,'userProfileId':_0x45106e[_0xce83('0x65')]},'raw':!![]})['then'](function(_0x80c129){if(_0x80c129&&_0x80c129[_0xce83('0x66')]===0x0){return db[_0xce83('0x3f')]['create']({'name':_0x3a95b7[_0xce83('0x40')],'resourceId':_0x3a95b7['id'],'type':_0x80c129[_0xce83('0x40')],'sectionId':_0x80c129['id']},{})['then'](function(){return _0x265ca0;});}else{return _0x265ca0;}})[_0xce83('0x2f')](function(_0x2a8456){logger[_0xce83('0x2a')](_0xce83('0x67'),_0x2a8456);throw _0x2a8456;});}return _0x265ca0;})['then'](respondWithResult(_0x3542f0,0xc9))['catch'](handleError(_0x3542f0,null));};exports[_0xce83('0x3b')]=function(_0x16c40a,_0xee8894){if(_0x16c40a[_0xce83('0x5f')]['id']){delete _0x16c40a['body']['id'];}return db['FaxAccount'][_0xce83('0x64')]({'where':{'id':_0x16c40a[_0xce83('0x5c')]['id']},'include':[{'model':db[_0xce83('0x42')],'as':_0xce83('0x43')}]})[_0xce83('0x24')](handleEntityNotFound(_0xee8894,null))[_0xce83('0x24')](saveUpdates(_0x16c40a[_0xce83('0x5f')],null))[_0xce83('0x24')](respondWithResult(_0xee8894,null))['catch'](handleError(_0xee8894,null));};exports[_0xce83('0x3c')]=function(_0x570a31,_0x18a460){return db['FaxAccount'][_0xce83('0x64')]({'where':{'id':_0x570a31[_0xce83('0x5c')]['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x18a460,null))['then'](removeEntity(_0x18a460,null))[_0xce83('0x2f')](handleError(_0x18a460,null));};exports['describe']=function(_0x3d0ece,_0x17c316){return db[_0xce83('0x45')]['describe']()['then'](respondWithResult(_0x17c316,null))[_0xce83('0x2f')](handleError(_0x17c316,null));};exports[_0xce83('0x68')]=function(_0x57f3f3,_0x542d43,_0x4c7772){if(_0x57f3f3['body']['id']){delete _0x57f3f3[_0xce83('0x5f')]['id'];}return db['FaxAccount'][_0xce83('0x64')]({'where':{'id':_0x57f3f3[_0xce83('0x5c')]['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x542d43,null))[_0xce83('0x24')](function(_0x5f299d){if(_0x5f299d){_0x57f3f3['body'][_0xce83('0x69')]=_0x5f299d['id'];return db[_0xce83('0x6a')][_0xce83('0x5e')](_0x57f3f3[_0xce83('0x5f')]);}})[_0xce83('0x24')](respondWithResult(_0x542d43,null))[_0xce83('0x2f')](handleError(_0x542d43,null));};exports[_0xce83('0x6b')]=function(_0x3aa5cc,_0x53c2fd,_0x5076bc){var _0xa5825c={'raw':![],'where':{}};var _0x504014={};var _0x578e55={'count':0x0,'rows':[]};return db[_0xce83('0x45')][_0xce83('0x6c')]({'where':{'id':_0x3aa5cc[_0xce83('0x5c')]['id']}})['then'](handleEntityNotFound(_0x53c2fd,null))['then'](function(_0x2d9fd6){if(_0x2d9fd6){_0x504014['model']=_['keys'](db[_0xce83('0x6a')][_0xce83('0x46')]);_0x504014[_0xce83('0x4b')]=_[_0xce83('0x4c')](_0x3aa5cc[_0xce83('0x4b')]);_0x504014[_0xce83('0x4d')]=_[_0xce83('0x4e')](_0x504014[_0xce83('0x4a')],_0x504014[_0xce83('0x4b')]);_0xa5825c[_0xce83('0x4f')]=_[_0xce83('0x4e')](_0x504014['model'],qs[_0xce83('0x50')](_0x3aa5cc[_0xce83('0x4b')][_0xce83('0x50')]));_0xa5825c[_0xce83('0x4f')]=_0xa5825c[_0xce83('0x4f')]['length']?_0xa5825c['attributes']:_0x504014['model'];if(!_0x3aa5cc[_0xce83('0x4b')]['hasOwnProperty']('nolimit')){_0xa5825c['limit']=qs[_0xce83('0x36')](_0x3aa5cc[_0xce83('0x4b')][_0xce83('0x36')]);_0xa5825c[_0xce83('0x35')]=qs[_0xce83('0x35')](_0x3aa5cc['query'][_0xce83('0x35')]);}_0xa5825c['order']=qs[_0xce83('0x53')](_0x3aa5cc['query'][_0xce83('0x53')]);_0xa5825c['where']=qs[_0xce83('0x4d')](_[_0xce83('0x6d')](_0x3aa5cc['query'],_0x504014['filters']));_0xa5825c[_0xce83('0x54')][_0xce83('0x69')]=_0x2d9fd6['id'];if(_0x3aa5cc['query']['filter']){_0xa5825c[_0xce83('0x54')]=_[_0xce83('0x56')](_0xa5825c[_0xce83('0x54')],{'$or':_[_0xce83('0x44')](_0xa5825c[_0xce83('0x4f')],function(_0x2b118e){var _0x10743a={};_0x10743a[_0x2b118e]={'$like':'%'+_0x3aa5cc[_0xce83('0x4b')][_0xce83('0x55')]+'%'};return _0x10743a;})});}_0xa5825c=_[_0xce83('0x56')]({},_0xa5825c,_0x3aa5cc[_0xce83('0x58')]);return db[_0xce83('0x6a')]['count']({'where':_0xa5825c[_0xce83('0x54')]})[_0xce83('0x24')](function(_0x5d08de){_0x578e55[_0xce83('0x34')]=_0x5d08de;if(_0x3aa5cc[_0xce83('0x4b')][_0xce83('0x59')]){_0xa5825c['include']=[{'all':!![]}];}return db['Disposition']['findAll'](_0xa5825c);})[_0xce83('0x24')](function(_0x2c6295){_0x578e55[_0xce83('0x6e')]=_0x2c6295;return _0x578e55;});}})[_0xce83('0x24')](respondWithFilteredResult(_0x53c2fd,_0xa5825c))['catch'](handleError(_0x53c2fd,null));};exports[_0xce83('0x6f')]=function(_0x4d2e7f,_0x1bb2bb,_0x1856a3){return db['FaxAccount'][_0xce83('0x64')]({'where':{'id':_0x4d2e7f[_0xce83('0x5c')]['id']}})['then'](handleEntityNotFound(_0x1bb2bb,null))[_0xce83('0x24')](function(_0x4f6de0){if(_0x4f6de0){return _0x4f6de0[_0xce83('0x6f')](_0x4d2e7f[_0xce83('0x4b')][_0xce83('0x70')]);}})[_0xce83('0x24')](respondWithStatusCode(_0x1bb2bb,null))[_0xce83('0x2f')](handleError(_0x1bb2bb,null));};exports[_0xce83('0x71')]=function(_0x13cc87,_0x270315,_0xad1382){if(_0x13cc87[_0xce83('0x5f')]['id']){delete _0x13cc87[_0xce83('0x5f')]['id'];}return db[_0xce83('0x45')][_0xce83('0x64')]({'where':{'id':_0x13cc87[_0xce83('0x5c')]['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x270315,null))[_0xce83('0x24')](function(_0x2bacfb){if(_0x2bacfb){_0x13cc87[_0xce83('0x5f')][_0xce83('0x69')]=_0x2bacfb['id'];return db[_0xce83('0x72')][_0xce83('0x5e')](_0x13cc87[_0xce83('0x5f')]);}})[_0xce83('0x24')](respondWithResult(_0x270315,null))[_0xce83('0x2f')](handleError(_0x270315,null));};exports[_0xce83('0x73')]=function(_0x14de2d,_0x3ab02e,_0x3fd381){var _0x2b6b45={'raw':![],'where':{}};var _0x290d9d={};var _0x22b4cb={'count':0x0,'rows':[]};return db['FaxAccount']['findOne']({'where':{'id':_0x14de2d['params']['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x3ab02e,null))[_0xce83('0x24')](function(_0x22c22b){if(_0x22c22b){_0x290d9d[_0xce83('0x4a')]=_['keys'](db[_0xce83('0x72')]['rawAttributes']);_0x290d9d[_0xce83('0x4b')]=_[_0xce83('0x4c')](_0x14de2d[_0xce83('0x4b')]);_0x290d9d[_0xce83('0x4d')]=_[_0xce83('0x4e')](_0x290d9d[_0xce83('0x4a')],_0x290d9d[_0xce83('0x4b')]);_0x2b6b45[_0xce83('0x4f')]=_['intersection'](_0x290d9d['model'],qs['fields'](_0x14de2d['query'][_0xce83('0x50')]));_0x2b6b45['attributes']=_0x2b6b45['attributes'][_0xce83('0x51')]?_0x2b6b45[_0xce83('0x4f')]:_0x290d9d[_0xce83('0x4a')];if(!_0x14de2d[_0xce83('0x4b')]['hasOwnProperty'](_0xce83('0x74'))){_0x2b6b45[_0xce83('0x36')]=qs[_0xce83('0x36')](_0x14de2d['query'][_0xce83('0x36')]);_0x2b6b45[_0xce83('0x35')]=qs['offset'](_0x14de2d[_0xce83('0x4b')]['offset']);}_0x2b6b45[_0xce83('0x75')]=qs[_0xce83('0x53')](_0x14de2d[_0xce83('0x4b')][_0xce83('0x53')]);_0x2b6b45['where']=qs[_0xce83('0x4d')](_[_0xce83('0x6d')](_0x14de2d[_0xce83('0x4b')],_0x290d9d[_0xce83('0x4d')]));_0x2b6b45[_0xce83('0x54')][_0xce83('0x69')]=_0x22c22b['id'];if(_0x14de2d[_0xce83('0x4b')][_0xce83('0x55')]){_0x2b6b45['where']=_[_0xce83('0x56')](_0x2b6b45[_0xce83('0x54')],{'$or':_[_0xce83('0x44')](_0x2b6b45[_0xce83('0x4f')],function(_0x153bb2){var _0x567f82={};_0x567f82[_0x153bb2]={'$like':'%'+_0x14de2d[_0xce83('0x4b')]['filter']+'%'};return _0x567f82;})});}_0x2b6b45=_[_0xce83('0x56')]({},_0x2b6b45,_0x14de2d[_0xce83('0x58')]);return db[_0xce83('0x72')][_0xce83('0x34')]({'where':_0x2b6b45[_0xce83('0x54')]})[_0xce83('0x24')](function(_0xf8f97f){_0x22b4cb['count']=_0xf8f97f;if(_0x14de2d[_0xce83('0x4b')][_0xce83('0x59')]){_0x2b6b45[_0xce83('0x5d')]=[{'all':!![]}];}return db[_0xce83('0x72')][_0xce83('0x5a')](_0x2b6b45);})[_0xce83('0x24')](function(_0x3d2eb0){_0x22b4cb[_0xce83('0x6e')]=_0x3d2eb0;return _0x22b4cb;});}})[_0xce83('0x24')](respondWithFilteredResult(_0x3ab02e,_0x2b6b45))[_0xce83('0x2f')](handleError(_0x3ab02e,null));};exports[_0xce83('0x76')]=function(_0x421c24,_0x1f3341,_0x43e98d){return db[_0xce83('0x45')][_0xce83('0x64')]({'where':{'id':_0x421c24[_0xce83('0x5c')]['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x1f3341,null))['then'](function(_0x22a6cb){if(_0x22a6cb){return _0x22a6cb[_0xce83('0x76')](_0x421c24[_0xce83('0x4b')][_0xce83('0x70')]);}})['then'](respondWithStatusCode(_0x1f3341,null))[_0xce83('0x2f')](handleError(_0x1f3341,null));};exports[_0xce83('0x77')]=function(_0xb78964,_0x2dc507,_0xc70cc2){return db[_0xce83('0x78')][_0xce83('0x64')]({'where':{'id':_0xb78964[_0xce83('0x5c')]['id']}})['then'](handleEntityNotFound(_0x2dc507,null))['then'](function(_0x2f793f){if(_0x2f793f){return _0x2f793f[_0xce83('0x77')](_0xb78964[_0xce83('0x5f')][_0xce83('0x70')],_[_0xce83('0x79')](_0xb78964['body'],['ids','id'])||{});}})[_0xce83('0x24')](respondWithResult(_0x2dc507,null))[_0xce83('0x2f')](handleError(_0x2dc507,null));};exports[_0xce83('0x7a')]=function(_0x231e75,_0x17deca,_0x4dae1){var _0x581952={'raw':![],'where':{}};var _0x5ea371={};var _0x398b4={'count':0x0,'rows':[]};return db[_0xce83('0x45')][_0xce83('0x6c')]({'where':{'id':_0x231e75[_0xce83('0x5c')]['id']}})['then'](handleEntityNotFound(_0x17deca,null))[_0xce83('0x24')](function(_0x3d54a6){if(_0x3d54a6){_0x5ea371[_0xce83('0x4a')]=_['keys'](db[_0xce83('0x78')][_0xce83('0x46')]);_0x5ea371[_0xce83('0x4b')]=_[_0xce83('0x4c')](_0x231e75['query']);_0x5ea371[_0xce83('0x4d')]=_[_0xce83('0x4e')](_0x5ea371[_0xce83('0x4a')],_0x5ea371[_0xce83('0x4b')]);_0x581952[_0xce83('0x4f')]=_[_0xce83('0x4e')](_0x5ea371[_0xce83('0x4a')],qs[_0xce83('0x50')](_0x231e75[_0xce83('0x4b')][_0xce83('0x50')]));_0x581952[_0xce83('0x4f')]=_0x581952[_0xce83('0x4f')]['length']?_0x581952[_0xce83('0x4f')]:_0x5ea371['model'];if(!_0x231e75[_0xce83('0x4b')][_0xce83('0x52')](_0xce83('0x74'))){_0x581952['limit']=qs[_0xce83('0x36')](_0x231e75['query'][_0xce83('0x36')]);_0x581952[_0xce83('0x35')]=qs[_0xce83('0x35')](_0x231e75['query'][_0xce83('0x35')]);}_0x581952[_0xce83('0x75')]=qs['sort'](_0x231e75[_0xce83('0x4b')][_0xce83('0x53')]);_0x581952[_0xce83('0x54')]=qs[_0xce83('0x4d')](_['pick'](_0x231e75[_0xce83('0x4b')],_0x5ea371['filters']));_0x581952[_0xce83('0x54')][_0xce83('0x69')]=_0x3d54a6['id'];if(_0x231e75['query'][_0xce83('0x55')]){_0x581952[_0xce83('0x54')]=_[_0xce83('0x56')](_0x581952[_0xce83('0x54')],{'$or':_[_0xce83('0x44')](_0x581952['attributes'],function(_0x47b1c6){var _0x854c32={};_0x854c32[_0x47b1c6]={'$like':'%'+_0x231e75['query'][_0xce83('0x55')]+'%'};return _0x854c32;})});}_0x581952=_[_0xce83('0x56')]({},_0x581952,_0x231e75['options']);return db[_0xce83('0x78')]['count']({'where':_0x581952[_0xce83('0x54')]})['then'](function(_0x41a7d7){_0x398b4[_0xce83('0x34')]=_0x41a7d7;if(_0x231e75[_0xce83('0x4b')]['includeAll']){_0x581952[_0xce83('0x5d')]=[{'model':db[_0xce83('0x7b')],'as':_0xce83('0x7c'),'required':![]},{'model':db[_0xce83('0x7d')],'as':_0xce83('0x7e'),'attributes':[_0xce83('0x40'),'fullname',_0xce83('0x7f')],'required':![]},{'model':db[_0xce83('0x80')],'as':'Tags','attributes':['id',_0xce83('0x40'),_0xce83('0x81')],'where':_0x231e75[_0xce83('0x4b')]['tag']?{'id':_0x231e75['query'][_0xce83('0x82')]}:undefined,'required':_0x231e75['query'][_0xce83('0x82')]?!![]:![]}];}return db[_0xce83('0x78')][_0xce83('0x5a')](_0x581952);})[_0xce83('0x24')](function(_0x2797a8){_0x398b4[_0xce83('0x6e')]=_0x2797a8;return _0x398b4;});}})[_0xce83('0x24')](respondWithFilteredResult(_0x17deca,_0x581952))[_0xce83('0x2f')](handleError(_0x17deca,null));};exports[_0xce83('0x83')]=function(_0x388ff7,_0x245e49,_0x403b30){return db['FaxAccount'][_0xce83('0x6c')]({'where':{'id':_0x388ff7['params']['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x245e49,null))[_0xce83('0x24')](function(_0x488b3b){if(_0x488b3b){return db['sequelize'][_0xce83('0x84')](function(_0x163bdb){return db[_0xce83('0x85')][_0xce83('0x3c')]({'where':{'FaxAccountId':_0x388ff7[_0xce83('0x5c')]['id']},'transaction':_0x163bdb})[_0xce83('0x24')](function(_0x13bfdd){var _0x3c3210=_[_0xce83('0x44')](_0x388ff7[_0xce83('0x5f')],function(_0x3ce9fc){_0x3ce9fc[_0xce83('0x69')]=_0x388ff7[_0xce83('0x5c')]['id'];return _0x3ce9fc;});return db[_0xce83('0x85')][_0xce83('0x86')](_0x3c3210,{'transaction':_0x163bdb});});})[_0xce83('0x24')](function(){return db[_0xce83('0x85')]['findAndCountAll']({'where':{'FaxAccountId':_0x388ff7[_0xce83('0x5c')]['id']},'order':_0xce83('0x87')});});}})[_0xce83('0x24')](respondWithResult(_0x245e49,null))[_0xce83('0x2f')](handleError(_0x245e49,null));};exports[_0xce83('0x88')]=function(_0x12a579,_0x439deb,_0x448176){var _0x1943c5={};var _0x33d626={};var _0x375f01;var _0x46fb50;return db[_0xce83('0x45')][_0xce83('0x6c')]({'where':{'id':_0x12a579[_0xce83('0x5c')]['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x439deb,null))['then'](function(_0x334783){if(_0x334783){_0x375f01=_0x334783;_0x33d626[_0xce83('0x4a')]=_[_0xce83('0x4c')](db[_0xce83('0x85')]['rawAttributes']);_0x33d626[_0xce83('0x4b')]=_[_0xce83('0x4c')](_0x12a579[_0xce83('0x4b')]);_0x33d626[_0xce83('0x4d')]=_['intersection'](_0x33d626['model'],_0x33d626['query']);_0x1943c5[_0xce83('0x4f')]=_[_0xce83('0x4e')](_0x33d626['model'],qs[_0xce83('0x50')](_0x12a579[_0xce83('0x4b')][_0xce83('0x50')]));_0x1943c5[_0xce83('0x4f')]=_0x1943c5[_0xce83('0x4f')]['length']?_0x1943c5[_0xce83('0x4f')]:_0x33d626['model'];_0x1943c5[_0xce83('0x75')]=qs['sort'](_0x12a579[_0xce83('0x4b')][_0xce83('0x53')]);_0x1943c5['where']=qs[_0xce83('0x4d')](_[_0xce83('0x6d')](_0x12a579['query'],_0x33d626[_0xce83('0x4d')]));if(_0x12a579['query']['filter']){_0x1943c5[_0xce83('0x54')]=_[_0xce83('0x56')](_0x1943c5[_0xce83('0x54')],{'$or':_[_0xce83('0x44')](_0x1943c5[_0xce83('0x4f')],function(_0x4c7821){var _0x324e43={};_0x324e43[_0x4c7821]={'$like':'%'+_0x12a579[_0xce83('0x4b')][_0xce83('0x55')]+'%'};return _0x324e43;})});}_0x1943c5=_[_0xce83('0x56')]({},_0x1943c5,_0x12a579['options']);return _0x375f01[_0xce83('0x88')](_0x1943c5);}})[_0xce83('0x24')](function(_0x26605d){if(_0x26605d){_0x46fb50=_0x26605d[_0xce83('0x51')];if(!_0x12a579[_0xce83('0x4b')][_0xce83('0x52')]('nolimit')){_0x1943c5[_0xce83('0x36')]=qs[_0xce83('0x36')](_0x12a579[_0xce83('0x4b')][_0xce83('0x36')]);_0x1943c5[_0xce83('0x35')]=qs[_0xce83('0x35')](_0x12a579[_0xce83('0x4b')][_0xce83('0x35')]);}return _0x375f01[_0xce83('0x88')](_0x1943c5);}})['then'](function(_0x8d4a7d){if(_0x8d4a7d){return _0x8d4a7d?{'count':_0x46fb50,'rows':_0x8d4a7d}:null;}})[_0xce83('0x24')](respondWithResult(_0x439deb,null))[_0xce83('0x2f')](handleError(_0x439deb,null));};function Extension(_0x24e8fd,_0x4890f7,_0x1a5df4,_0x4e413b){this[_0xce83('0x89')]=_0xce83('0x8a');this[_0xce83('0x8b')]=_0x24e8fd[_0xce83('0x8c')];this['app']=_0x4e413b;this['type']=_0xce83('0x8d');this[_0xce83('0x8e')]='Fax\x20Extension';this['FaxAccountId']=_0x24e8fd['id'];this['priority']=_0x4890f7;this['appdata']=_0x1a5df4;}function createExtensionsReciveFax(_0x4a955f){var _0x53d5fe=0x1;var _0x15f237=[];_0x15f237['push'](new Extension(_0x4a955f,_0x53d5fe,'',_0xce83('0x8f')));_0x53d5fe+=0x1;_0x15f237[_0xce83('0x90')](new Extension(_0x4a955f,_0x53d5fe,_0xce83('0x91'),'Set'));_0x53d5fe+=0x1;for(var _0x59ff63 in _0x4a955f){if(_0x4a955f[_0xce83('0x52')](_0x59ff63)&&(_0x59ff63===_0xce83('0x92')||_0x59ff63===_0xce83('0x8c')||_0x59ff63===_0xce83('0x93')||_0x59ff63===_0xce83('0x94')||_0x59ff63===_0xce83('0x95')||_0x59ff63==='maxrate'||_0x59ff63==='minrate'||_0x59ff63==='modem'||_0x59ff63===_0xce83('0x96'))){_0x15f237[_0xce83('0x90')](new Extension(_0x4a955f,_0x53d5fe,_0xce83('0x97')+_0x59ff63+')='+_0x4a955f[_0x59ff63],_0xce83('0x98')));_0x53d5fe+=0x1;}}_0x15f237[_0xce83('0x90')](new Extension(_0x4a955f,_0x53d5fe,'6',_0xce83('0x99')));_0x53d5fe+=0x1;_0x15f237[_0xce83('0x90')](new Extension(_0x4a955f,_0x53d5fe,_0xce83('0x9a'),_0xce83('0x9b')));_0x53d5fe=0x0;return _0x15f237;}exports[_0xce83('0x9c')]=function(_0x1b39f0,_0x194a28,_0x1a9719){var _0x353da1;return db[_0xce83('0x9d')][_0xce83('0x84')](function(_0x27eaf7){return db[_0xce83('0x45')][_0xce83('0x5e')](_0x1b39f0[_0xce83('0x5f')],{'transaction':_0x27eaf7})[_0xce83('0x24')](function(_0x2ba8f6){_0x353da1=_0x2ba8f6['get']({'plain':!![]});return db['VoiceExtension'][_0xce83('0x86')](createExtensionsReciveFax(_0x353da1),{'transaction':_0x27eaf7});});})[_0xce83('0x24')](function(){return _0x353da1;})['then'](respondWithResult(_0x194a28,null))[_0xce83('0x2f')](handleError(_0x194a28,null));};exports[_0xce83('0x9e')]=function(_0x370ae8,_0xd9ab51,_0xd22550){var _0xf48a43;return db[_0xce83('0x9d')][_0xce83('0x84')](function(_0xe25f24){return db['FaxAccount']['update'](_0x370ae8[_0xce83('0x5f')],{'where':{'id':_0x370ae8[_0xce83('0x5f')]['id']},'transaction':_0xe25f24})['then'](function(_0x158b46){return db[_0xce83('0x9f')]['destroy']({'where':{'FaxAccountId':_0x370ae8[_0xce83('0x5f')]['id']},'transaction':_0xe25f24})['then'](function(_0x2fb4ab){return db[_0xce83('0x9f')]['bulkCreate'](createExtensionsReciveFax(_[_0xce83('0x79')](_0x370ae8[_0xce83('0x5f')],[_0xce83('0xa0'),_0xce83('0x49'),'createdAt',_0xce83('0xa1'),_0xce83('0xa2'),_0xce83('0xa3')])),{'transaction':_0xe25f24});});});})[_0xce83('0x24')](function(){return db[_0xce83('0x45')][_0xce83('0xa4')](_0x370ae8[_0xce83('0x5f')]['id']);})[_0xce83('0x24')](respondWithResult(_0xd9ab51,null))[_0xce83('0x2f')](handleError(_0xd9ab51,null));};exports[_0xce83('0xa5')]=function(_0x594415,_0x26bec3,_0x1ae8f8){var _0x51599c={'raw':!![],'where':{}};var _0x33fef7={};var _0x4bfbcc={'count':0x0,'rows':[]};return db[_0xce83('0x45')][_0xce83('0x6c')]({'where':{'id':_0x594415['params']['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x26bec3,null))[_0xce83('0x24')](function(_0x1e9c94){if(_0x1e9c94){_0x33fef7[_0xce83('0x4a')]=_['keys'](db['FaxMessage'][_0xce83('0x46')]);_0x33fef7['query']=_[_0xce83('0x4c')](_0x594415['query']);_0x33fef7[_0xce83('0x4d')]=_[_0xce83('0x4e')](_0x33fef7[_0xce83('0x4a')],_0x33fef7[_0xce83('0x4b')]);_0x51599c['attributes']=_[_0xce83('0x4e')](_0x33fef7[_0xce83('0x4a')],qs[_0xce83('0x50')](_0x594415[_0xce83('0x4b')]['fields']));_0x51599c['attributes']=_0x51599c[_0xce83('0x4f')][_0xce83('0x51')]?_0x51599c[_0xce83('0x4f')]:_0x33fef7[_0xce83('0x4a')];if(!_0x594415[_0xce83('0x4b')]['hasOwnProperty']('nolimit')){_0x51599c[_0xce83('0x36')]=qs[_0xce83('0x36')](_0x594415[_0xce83('0x4b')][_0xce83('0x36')]);_0x51599c['offset']=qs[_0xce83('0x35')](_0x594415[_0xce83('0x4b')][_0xce83('0x35')]);}_0x51599c[_0xce83('0x75')]=qs['sort'](_0x594415[_0xce83('0x4b')][_0xce83('0x53')]);_0x51599c[_0xce83('0x54')]=qs['filters'](_[_0xce83('0x6d')](_0x594415[_0xce83('0x4b')],_0x33fef7[_0xce83('0x4d')]));_0x51599c[_0xce83('0x54')]['FaxAccountId']=_0x1e9c94['id'];if(_0x594415[_0xce83('0x4b')][_0xce83('0x55')]){_0x51599c[_0xce83('0x54')]=_[_0xce83('0x56')](_0x51599c[_0xce83('0x54')],{'$or':_[_0xce83('0x44')](_0x51599c[_0xce83('0x4f')],function(_0x4cb461){var _0x545e00={};_0x545e00[_0x4cb461]={'$like':'%'+_0x594415[_0xce83('0x4b')][_0xce83('0x55')]+'%'};return _0x545e00;})});}if(_0x594415['query'][_0xce83('0xa6')]){var _0x435465=_0x594415[_0xce83('0x4b')][_0xce83('0xa6')]['split'](',');var _0x59cf64={};_0x59cf64[_0x435465[0x0]]={'$gte':moment(_0x435465[0x1])[_0xce83('0xa7')](_0xce83('0xa8'))};_0x51599c[_0xce83('0x54')]=_[_0xce83('0x56')](_0x51599c[_0xce83('0x54')],_0x59cf64);}_0x51599c=_[_0xce83('0x56')]({},_0x51599c,_0x594415[_0xce83('0x58')]);return db[_0xce83('0xa9')]['count']({'where':_0x51599c[_0xce83('0x54')]})[_0xce83('0x24')](function(_0x5b6c2e){_0x4bfbcc['count']=_0x5b6c2e;if(_0x594415[_0xce83('0x4b')][_0xce83('0x59')]){_0x51599c[_0xce83('0x5d')]=[{'all':!![]}];}return db[_0xce83('0xa9')]['findAll'](_0x51599c);})[_0xce83('0x24')](function(_0x123a1e){_0x4bfbcc['rows']=_0x123a1e;return _0x4bfbcc;});}})['then'](respondWithFilteredResult(_0x26bec3,_0x51599c))[_0xce83('0x2f')](handleError(_0x26bec3,null));};exports[_0xce83('0xaa')]=function(_0x420c53,_0x326756,_0x111706){var _0x17a4a6,_0x22f202={},_0x499112;if(_0x420c53[_0xce83('0x5f')]['to']){_0x499112=_0x420c53['body']['to'][0x0];}return db[_0xce83('0x45')][_0xce83('0x64')]({'where':{'id':_0x420c53[_0xce83('0x5c')]['id']},'include':[{'model':db[_0xce83('0xab')],'as':_0xce83('0xac'),'include':[{'model':db[_0xce83('0x7b')],'as':_0xce83('0xad'),'where':{'fax':_0x499112},'limit':0x1,'order':[[_0xce83('0xa1'),_0xce83('0xae')]]}]}]})[_0xce83('0x24')](handleEntityNotFound(_0x326756,null))[_0xce83('0x24')](function(_0x29be62){_0x17a4a6=_0x29be62;if(_0x420c53['body']['attachments']&&_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][_0xce83('0x51')]){for(var _0x427950=0x0;_0x427950<_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][_0xce83('0x51')];_0x427950+=0x1){_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][_0x427950]={'filename':_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][_0x427950][_0xce83('0x40')],'id':_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][_0x427950]['id'],'path':path[_0xce83('0xb0')](config['root'],_0xce83('0xb1'),_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][_0x427950][_0xce83('0xb2')])};}}return respondWithRpcPromise(_0xce83('0xb3'),'CheckAfterSend',{'FaxAccountId':_[_0xce83('0xb4')](_0x420c53[_0xce83('0x5c')]['id'])?undefined:_0x420c53['params']['id'],'path':_['isNil'](_0x420c53['body']['attachments'][0x0][_0xce83('0x7')])?undefined:_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][0x0][_0xce83('0x7')],'fax':_[_0xce83('0xb4')](_0x420c53[_0xce83('0x5f')]['to'][0x0])?undefined:_0x420c53[_0xce83('0x5f')]['to'][0x0]},client9002);})[_0xce83('0x24')](function(){if(_0x17a4a6){if(_['isNil'](_0x420c53[_0xce83('0x5f')][_0xce83('0xb5')])){_0x420c53[_0xce83('0x5f')]['from']=util[_0xce83('0xa7')](_0xce83('0xb6'),_0x17a4a6[_0xce83('0x40')],_0x17a4a6[_0xce83('0xb7')]);}if(_0x17a4a6['List']){if(_0x17a4a6['List'][_0xce83('0xad')][_0xce83('0x51')]){return _0x17a4a6[_0xce83('0xac')][_0xce83('0xad')][0x0];}else{return db[_0xce83('0x7b')]['create'](_[_0xce83('0x1c')](_0x420c53[_0xce83('0x5f')],{'firstName':_0x420c53[_0xce83('0x5f')]['to'][0x0],'phone':_0x420c53[_0xce83('0x5f')]['to'][0x0],'fax':_0x420c53['body']['to'][0x0],'ListId':_0x17a4a6[_0xce83('0xa3')]}));}}else{throw new Error('List\x20not\x20found');}}else{throw new Error('Send\x20Fax\x20failed');}})['then'](function(_0x1b4b9f){if(_0x1b4b9f){return db[_0xce83('0x78')][_0xce83('0x64')]({'where':{'ContactId':_0x1b4b9f['id'],'closed':![],'FaxAccountId':_0x17a4a6['id']}})[_0xce83('0x24')](function(_0x459a86){if(_0x459a86){return[_0x459a86,![]];}return db['FaxInteraction']['create']({'UserId':_0x420c53[_0xce83('0x62')]['id'],'ContactId':_0x1b4b9f['id'],'FaxAccountId':_0x17a4a6['id'],'fax':_0x420c53['body']['to'][0x0],'firstMsgDirection':_0xce83('0xb8'),'Messages':[_[_0xce83('0x56')](_0x420c53[_0xce83('0x5f')],{'read':![],'body':_0x420c53[_0xce83('0x5f')]['attachments'][0x0][_0xce83('0xb9')],'FaxAccountId':_0x17a4a6['id'],'UserId':_0x420c53[_0xce83('0x62')]['id'],'ContactId':_0x1b4b9f['id'],'AttachmentId':_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][0x0]['id']})]},{'include':[{'model':db[_0xce83('0xa9')],'as':_0xce83('0xba')}]})[_0xce83('0x24')](function(_0x29f9eb){return[_0x29f9eb,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})['spread'](function(_0x5e4bfd,_0x56b28b){if(_0x56b28b){return _0x5e4bfd;}return db[_0xce83('0xa9')][_0xce83('0x5e')]({'direction':'out','read':![],'body':_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][0x0][_0xce83('0xb9')],'FaxAccountId':_0x17a4a6['id'],'FaxInteractionId':_0x5e4bfd['id'],'UserId':_0x420c53[_0xce83('0x62')]['id'],'ContactId':_0x5e4bfd[_0xce83('0xbb')],'AttachmentId':_0x420c53['body'][_0xce83('0xaf')][0x0]['id']})[_0xce83('0x24')](function(_0x3e6f18){_0x5e4bfd[_0xce83('0xbc')][_0xce83('0xba')]=[];_0x5e4bfd[_0xce83('0xbc')][_0xce83('0xba')][_0xce83('0x90')](_0x3e6f18[_0xce83('0xbc')]);return _0x5e4bfd;});})[_0xce83('0x24')](function(_0x12745d){respondWithRpcPromise(_0xce83('0xbd'),_0xce83('0xbd'),{'FaxAccountId':_[_0xce83('0xb4')](_0x420c53[_0xce83('0x5c')]['id'])?undefined:_0x420c53[_0xce83('0x5c')]['id'],'path':_[_0xce83('0xb4')](_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][0x0][_0xce83('0x7')])?undefined:_0x420c53['body']['attachments'][0x0]['path'],'fax':_['isNil'](_0x420c53[_0xce83('0x5f')]['to'][0x0])?undefined:_0x420c53[_0xce83('0x5f')]['to'][0x0],'AttachmentId':_0x420c53[_0xce83('0x5f')][_0xce83('0xaf')][0x0]['id']},client9002)['then'](function(_0xb2bf3){logger[_0xce83('0x2d')](_0xce83('0xbe'),_0xb2bf3);})[_0xce83('0x2f')](function(_0x3fef03){logger[_0xce83('0x2d')](_0xce83('0xbe'),_0x3fef03);});return _0x12745d;})[_0xce83('0x24')](respondWithResult(_0x326756,null))['catch'](handleError(_0x326756,null));};exports['addAgents']=function(_0x5781aa,_0x32f8b1,_0x259788){return db['FaxAccount'][_0xce83('0x64')]({'where':{'id':_0x5781aa['params']['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x32f8b1,null))['then'](function(_0x2b1889){if(_0x2b1889){return _0x2b1889[_0xce83('0xbf')](_0x5781aa[_0xce83('0x5f')][_0xce83('0x70')],_[_0xce83('0x79')](_0x5781aa['body'],[_0xce83('0x70'),'id'])||{})[_0xce83('0xc0')](function(_0x4e0f2c){for(var _0x214f80=0x0;_0x214f80<_0x5781aa[_0xce83('0x5f')][_0xce83('0x70')]['length'];_0x214f80+=0x1){socket[_0xce83('0xc1')](_0xce83('0xc2'),{'UserId':_0x5781aa[_0xce83('0x5f')][_0xce83('0x70')][_0x214f80],'FaxAccountId':_0x5781aa[_0xce83('0x5c')]['id']});}return _0x4e0f2c;});}})[_0xce83('0x24')](respondWithResult(_0x32f8b1,null))[_0xce83('0x2f')](handleError(_0x32f8b1,null));};exports[_0xce83('0xc3')]=function(_0xa60f48,_0x313760,_0x453b03){return db[_0xce83('0x45')][_0xce83('0x64')]({'where':{'id':_0xa60f48[_0xce83('0x5c')]['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x313760,null))[_0xce83('0x24')](function(_0xa5435d){if(_0xa5435d){return _0xa5435d['removeAgents'](_0xa60f48[_0xce83('0x4b')][_0xce83('0x70')])['then'](function(){if(_[_0xce83('0xc4')](_0xa60f48[_0xce83('0x4b')][_0xce83('0x70')])){for(var _0x2cb020=0x0;_0x2cb020<_0xa60f48['query'][_0xce83('0x70')]['length'];_0x2cb020+=0x1){socket[_0xce83('0xc1')](_0xce83('0xc5'),{'UserId':Number(_0xa60f48['query'][_0xce83('0x70')][_0x2cb020]),'FaxAccountId':Number(_0xa60f48['params']['id'])});}}else{socket['emit'](_0xce83('0xc5'),{'UserId':Number(_0xa60f48[_0xce83('0x4b')][_0xce83('0x70')]),'FaxAccountId':Number(_0xa60f48['params']['id'])});}});}})[_0xce83('0x24')](respondWithStatusCode(_0x313760,null))['catch'](handleError(_0x313760,null));};exports[_0xce83('0xc6')]=function(_0x32dac4,_0x8ca8f6,_0x307ca4){var _0x5e027e={};var _0x77281={};var _0xa2506a;var _0x4683af;return db[_0xce83('0x45')][_0xce83('0x6c')]({'where':{'id':_0x32dac4[_0xce83('0x5c')]['id']}})[_0xce83('0x24')](handleEntityNotFound(_0x8ca8f6,null))['then'](function(_0x3403b8){if(_0x3403b8){_0xa2506a=_0x3403b8;_0x77281[_0xce83('0x4a')]=_[_0xce83('0x4c')](db[_0xce83('0x7d')]['rawAttributes']);_0x77281['query']=_[_0xce83('0x4c')](_0x32dac4[_0xce83('0x4b')]);_0x77281['filters']=_[_0xce83('0x4e')](_0x77281[_0xce83('0x4a')],_0x77281[_0xce83('0x4b')]);_0x5e027e[_0xce83('0x4f')]=_[_0xce83('0x4e')](_0x77281['model'],qs[_0xce83('0x50')](_0x32dac4[_0xce83('0x4b')]['fields']));_0x5e027e[_0xce83('0x4f')]=_0x5e027e[_0xce83('0x4f')]['length']?_0x5e027e['attributes']:_0x77281['model'];_0x5e027e[_0xce83('0x75')]=qs[_0xce83('0x53')](_0x32dac4[_0xce83('0x4b')][_0xce83('0x53')]);_0x5e027e[_0xce83('0x54')]=qs[_0xce83('0x4d')](_[_0xce83('0x6d')](_0x32dac4[_0xce83('0x4b')],_0x77281[_0xce83('0x4d')]));if(_0x32dac4[_0xce83('0x4b')][_0xce83('0x55')]){_0x5e027e['where']=_[_0xce83('0x56')](_0x5e027e['where'],{'$or':_[_0xce83('0x44')](_0x5e027e['attributes'],function(_0x4c4d62){var _0x4bc143={};_0x4bc143[_0x4c4d62]={'$like':'%'+_0x32dac4['query'][_0xce83('0x55')]+'%'};return _0x4bc143;})});}_0x5e027e=_['merge']({},_0x5e027e,_0x32dac4[_0xce83('0x58')]);return _0xa2506a[_0xce83('0xc6')](_0x5e027e);}})[_0xce83('0x24')](function(_0x35dee3){if(_0x35dee3){_0x4683af=_0x35dee3[_0xce83('0x51')];if(!_0x32dac4['query'][_0xce83('0x52')](_0xce83('0x74'))){_0x5e027e['limit']=qs['limit'](_0x32dac4[_0xce83('0x4b')][_0xce83('0x36')]);_0x5e027e[_0xce83('0x35')]=qs[_0xce83('0x35')](_0x32dac4['query'][_0xce83('0x35')]);}return _0xa2506a['getAgents'](_0x5e027e);}})[_0xce83('0x24')](function(_0x422f23){if(_0x422f23){return _0x422f23?{'count':_0x4683af,'rows':_0x422f23}:null;}})[_0xce83('0x24')](respondWithResult(_0x8ca8f6,null))[_0xce83('0x2f')](handleError(_0x8ca8f6,null));};
\ No newline at end of file
+var _0x99b3=['DESC','attachments','join','root','server/files/attachments','basename','CheckAfterSend','isNil','from','\x22%s\x22\x20<%s>','fax','List','ListId','List\x20not\x20found','Send\x20Fax\x20failed','out','filename','Contact\x20not\x20found','ContactId','Messages','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','spread','userFaxAccount:save','isArray','userFaxAccount:remove','emit','getAgents','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','redis','defaults','localhost','./faxAccount.socket','jayson/promise','client','test','Sequelize','ValidationError','request','then','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','error','code','FaxAccount,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','count','offset','limit','Content-Range','json','update','destroy','get','FaxAccounts','UserProfileResource','stack','name','send','index','Pause','mandatoryDispositionPause','map','FaxAccount','rawAttributes','fieldName','type','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','params','keys','includeAll','find','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','Disposition','getDispositions','findOne','FaxAccountId','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','addInteraction','omit','getInteractions','FaxInteraction','Contact','User','Owner','fullname','internal','Tag','color','tag','addApplications','transaction','FaxApplication','bulkCreate','findAndCountAll','priority','getApplications','context','from-voip-provider','exten','system','description','Fax\x20Extension','appdata','push','Answer','CDR(type)=inbound-fax','Set','localstationid','faxdetect','headerinfo','maxrate','minrate','FAXOPT(','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax','sequelize','VoiceExtension','updateAccountApplications','tech','key','createdAt','updatedAt','TrunkId','findById','getMessages','FaxMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','CmList','CmContact','Contacts'];(function(_0x32be36,_0x54005f){var _0x3b92fb=function(_0x3f8a17){while(--_0x3f8a17){_0x32be36['push'](_0x32be36['shift']());}};_0x3b92fb(++_0x54005f);}(_0x99b3,0xe6));var _0x399b=function(_0x326e7f,_0xe8da32){_0x326e7f=_0x326e7f-0x0;var _0x5b11fe=_0x99b3[_0x326e7f];return _0x5b11fe;};'use strict';var pdf=require(_0x399b('0x0'));var emlformat=require(_0x399b('0x1'));var rimraf=require(_0x399b('0x2'));var zipdir=require(_0x399b('0x3'));var jsonpatch=require(_0x399b('0x4'));var rp=require(_0x399b('0x5'));var moment=require('moment');var BPromise=require(_0x399b('0x6'));var Mustache=require(_0x399b('0x7'));var util=require(_0x399b('0x8'));var path=require(_0x399b('0x9'));var sox=require(_0x399b('0xa'));var csv=require('to-csv');var ejs=require(_0x399b('0xb'));var fs=require('fs');var _=require(_0x399b('0xc'));var squel=require(_0x399b('0xd'));var crypto=require(_0x399b('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x399b('0xf'));var toCsv=require('to-csv');var querystring=require(_0x399b('0x10'));var Papa=require(_0x399b('0x11'));var Redis=require(_0x399b('0x12'));var authService=require(_0x399b('0x13'));var qs=require(_0x399b('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x399b('0x15'));var logger=require('../../config/logger')(_0x399b('0x16'));var utils=require(_0x399b('0x17'));var config=require(_0x399b('0x18'));var db=require('../../mysqldb')['db'];config[_0x399b('0x19')]=_[_0x399b('0x1a')](config[_0x399b('0x19')],{'host':_0x399b('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x399b('0x19')]));require(_0x399b('0x1c'))['register'](socket);var jayson=require(_0x399b('0x1d'));var client=jayson[_0x399b('0x1e')]['http']({'port':0x232c});var client9002=jayson[_0x399b('0x1e')]['http']({'port':0x232a});function checkPasswordPattern(_0x112f12,_0x140b33,_0x3a33a2){if(_0x3a33a2){var _0x8befb4=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x8befb4[_0x399b('0x1f')](_0x140b33)){return _0x112f12;}else{throw new db[(_0x399b('0x20'))][(_0x399b('0x21'))]('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 _0x112f12;}}function respondWithRpcPromise(_0x317033,_0x95f986,_0x3969e5,_0x128171){return new BPromise(function(_0x463081,_0x5c2c27){var _0xde7dd5=_0x128171||client;return _0xde7dd5[_0x399b('0x22')](_0x317033,_0x3969e5)[_0x399b('0x23')](function(_0x2b632b){logger['info']('FaxAccount,\x20%s,\x20%s',_0x95f986,_0x399b('0x24'));logger[_0x399b('0x25')](_0x399b('0x26'),_0x95f986,_0x399b('0x24'),JSON['stringify'](_0x2b632b));if(_0x2b632b[_0x399b('0x27')]){if(_0x2b632b[_0x399b('0x27')][_0x399b('0x28')]===0x1f4){logger[_0x399b('0x27')](_0x399b('0x29'),_0x95f986,_0x2b632b['error']['message']);return _0x5c2c27(_0x2b632b[_0x399b('0x27')][_0x399b('0x2a')]);}logger['error'](_0x399b('0x29'),_0x95f986,_0x2b632b[_0x399b('0x27')]['message']);return _0x463081(_0x2b632b[_0x399b('0x27')]['message']);}else{logger[_0x399b('0x2b')](_0x399b('0x29'),_0x95f986,_0x399b('0x24'));_0x463081(_0x2b632b[_0x399b('0x2c')][_0x399b('0x2a')]);}})[_0x399b('0x2d')](function(_0xf0f8a){logger[_0x399b('0x27')](_0x399b('0x29'),_0x95f986,_0xf0f8a);_0x5c2c27(_0xf0f8a);});});}function respondWithStatusCode(_0x5363ed,_0x3fdd61){_0x3fdd61=_0x3fdd61||0xcc;return function(_0x28d537){if(_0x28d537){return _0x5363ed[_0x399b('0x2e')](_0x3fdd61);}return _0x5363ed[_0x399b('0x2f')](_0x3fdd61)[_0x399b('0x30')]();};}function respondWithResult(_0x3f8b58,_0x50f9c4){_0x50f9c4=_0x50f9c4||0xc8;return function(_0x2f4d83){if(_0x2f4d83){return _0x3f8b58[_0x399b('0x2f')](_0x50f9c4)['json'](_0x2f4d83);}};}function respondWithFilteredResult(_0x193996,_0xb019a){return function(_0x415ea4){if(_0x415ea4){var _0x520f79=_0x415ea4[_0x399b('0x31')],_0x3b3bb8=_0xb019a[_0x399b('0x32')],_0x1ad802=_0xb019a[_0x399b('0x32')]+_0xb019a[_0x399b('0x33')],_0x457fdd;if(_0x1ad802>=_0x520f79){_0x1ad802=_0x520f79;_0x457fdd=0xc8;}else{_0x457fdd=0xce;}_0x193996['status'](_0x457fdd);return _0x193996['set'](_0x399b('0x34'),_0x3b3bb8+'-'+_0x1ad802+'/'+_0x520f79)[_0x399b('0x35')](_0x415ea4);}return null;};}function patchUpdates(_0x33e4b8){return function(_0x393547){try{jsonpatch['apply'](_0x393547,_0x33e4b8,!![]);}catch(_0x3b117a){return BPromise['reject'](_0x3b117a);}return _0x393547['save']();};}function saveUpdates(_0x4db924,_0x324ff3){return function(_0x77f302){if(_0x77f302){return _0x77f302[_0x399b('0x36')](_0x4db924)[_0x399b('0x23')](function(_0x837763){return _0x837763;});}return null;};}function removeEntity(_0x476f55,_0x28ae3b){return function(_0x59016d){if(_0x59016d){return _0x59016d[_0x399b('0x37')]()[_0x399b('0x23')](function(){var _0x24415b=_0x59016d[_0x399b('0x38')]({'plain':!![]});var _0x35ece3=_0x399b('0x39');return db[_0x399b('0x3a')][_0x399b('0x37')]({'where':{'type':_0x35ece3,'resourceId':_0x24415b['id']}})[_0x399b('0x23')](function(){return _0x59016d;});})[_0x399b('0x23')](function(){_0x476f55[_0x399b('0x2f')](0xcc)[_0x399b('0x30')]();});}};}function handleEntityNotFound(_0x306bc9,_0x2f7e0b){return function(_0x29dd78){if(!_0x29dd78){_0x306bc9[_0x399b('0x2e')](0x194);}return _0x29dd78;};}function handleError(_0x27f5ca,_0x204503){_0x204503=_0x204503||0x1f4;return function(_0x547169){logger['error'](_0x547169[_0x399b('0x3b')]);if(_0x547169['name']){delete _0x547169[_0x399b('0x3c')];}_0x27f5ca[_0x399b('0x2f')](_0x204503)[_0x399b('0x3d')](_0x547169);};}exports[_0x399b('0x3e')]=function(_0x5aeeba,_0x16099d){var _0x5db840={'include':[{'model':db[_0x399b('0x3f')],'as':_0x399b('0x40')}]},_0x418fe5={},_0x4186cd={'count':0x0,'rows':[]};var _0x174e9c=_[_0x399b('0x41')](db[_0x399b('0x42')][_0x399b('0x43')],function(_0x5df6fc){return{'name':_0x5df6fc[_0x399b('0x44')],'type':_0x5df6fc[_0x399b('0x45')]['key']};});_0x418fe5[_0x399b('0x46')]=_['map'](_0x174e9c,_0x399b('0x3c'));_0x418fe5[_0x399b('0x47')]=_['keys'](_0x5aeeba[_0x399b('0x47')]);_0x418fe5[_0x399b('0x48')]=_[_0x399b('0x49')](_0x418fe5['model'],_0x418fe5[_0x399b('0x47')]);_0x5db840[_0x399b('0x4a')]=_[_0x399b('0x49')](_0x418fe5[_0x399b('0x46')],qs[_0x399b('0x4b')](_0x5aeeba[_0x399b('0x47')]['fields']));_0x5db840['attributes']=_0x5db840[_0x399b('0x4a')][_0x399b('0x4c')]?_0x5db840[_0x399b('0x4a')]:_0x418fe5[_0x399b('0x46')];if(!_0x5aeeba['query'][_0x399b('0x4d')](_0x399b('0x4e'))){_0x5db840['limit']=qs[_0x399b('0x33')](_0x5aeeba[_0x399b('0x47')][_0x399b('0x33')]);_0x5db840[_0x399b('0x32')]=qs['offset'](_0x5aeeba[_0x399b('0x47')][_0x399b('0x32')]);}_0x5db840[_0x399b('0x4f')]=qs[_0x399b('0x50')](_0x5aeeba[_0x399b('0x47')][_0x399b('0x50')]);_0x5db840[_0x399b('0x51')]=qs['filters'](_[_0x399b('0x52')](_0x5aeeba[_0x399b('0x47')],_0x418fe5[_0x399b('0x48')]));if(_0x5aeeba['query'][_0x399b('0x53')]){_0x5db840[_0x399b('0x51')]=_[_0x399b('0x54')](_0x5db840['where'],{'$or':_[_0x399b('0x41')](_0x174e9c,function(_0x26ca3b){if(_0x26ca3b[_0x399b('0x45')]!==_0x399b('0x55')){var _0x5c3ccd={};_0x5c3ccd[_0x26ca3b[_0x399b('0x3c')]]={'$like':'%'+_0x5aeeba[_0x399b('0x47')][_0x399b('0x53')]+'%'};return _0x5c3ccd;}})});}_0x5db840=_['merge']({},_0x5db840,_0x5aeeba[_0x399b('0x56')]);var _0x139f95={'where':_0x5db840[_0x399b('0x51')]};return db[_0x399b('0x42')]['count'](_0x139f95)[_0x399b('0x23')](function(_0x255e92){_0x4186cd[_0x399b('0x31')]=_0x255e92;if(_0x5aeeba[_0x399b('0x47')]['includeAll']){_0x5db840[_0x399b('0x57')]=[{'all':!![]}];}return db[_0x399b('0x42')][_0x399b('0x58')](_0x5db840);})[_0x399b('0x23')](function(_0x418a6d){_0x4186cd[_0x399b('0x59')]=_0x418a6d;return _0x4186cd;})[_0x399b('0x23')](respondWithFilteredResult(_0x16099d,_0x5db840))[_0x399b('0x2d')](handleError(_0x16099d,null));};exports['show']=function(_0x3fd91e,_0xe5d75f){var _0x265db9={'raw':![],'where':{'id':_0x3fd91e[_0x399b('0x5a')]['id']},'include':[{'model':db['Pause'],'as':_0x399b('0x40')}]},_0x3893a4={};_0x3893a4[_0x399b('0x46')]=_[_0x399b('0x5b')](db[_0x399b('0x42')][_0x399b('0x43')]);_0x3893a4[_0x399b('0x47')]=_[_0x399b('0x5b')](_0x3fd91e[_0x399b('0x47')]);_0x3893a4['filters']=_[_0x399b('0x49')](_0x3893a4[_0x399b('0x46')],_0x3893a4[_0x399b('0x47')]);_0x265db9['attributes']=_[_0x399b('0x49')](_0x3893a4[_0x399b('0x46')],qs[_0x399b('0x4b')](_0x3fd91e['query'][_0x399b('0x4b')]));_0x265db9[_0x399b('0x4a')]=_0x265db9[_0x399b('0x4a')][_0x399b('0x4c')]?_0x265db9['attributes']:_0x3893a4['model'];if(_0x3fd91e[_0x399b('0x47')][_0x399b('0x5c')]){_0x265db9[_0x399b('0x57')]=[{'all':!![]}];}_0x265db9=_['merge']({},_0x265db9,_0x3fd91e['options']);return db['FaxAccount'][_0x399b('0x5d')](_0x265db9)[_0x399b('0x23')](handleEntityNotFound(_0xe5d75f,null))[_0x399b('0x23')](respondWithResult(_0xe5d75f,null))[_0x399b('0x2d')](handleError(_0xe5d75f,null));};exports['create']=function(_0x44fdf8,_0x3bb256){return db[_0x399b('0x42')][_0x399b('0x5e')](_0x44fdf8[_0x399b('0x5f')],{})['then'](function(_0x781ade){var _0x4e8720=_0x44fdf8[_0x399b('0x60')][_0x399b('0x38')]({'plain':!![]});if(!_0x4e8720)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4e8720[_0x399b('0x61')]===_0x399b('0x60')){var _0x33b156=_0x781ade[_0x399b('0x38')]({'plain':!![]});var _0x1d5307=_0x399b('0x39');return db[_0x399b('0x62')][_0x399b('0x5d')]({'where':{'name':_0x1d5307,'userProfileId':_0x4e8720[_0x399b('0x63')]},'raw':!![]})['then'](function(_0x2d8f82){if(_0x2d8f82&&_0x2d8f82[_0x399b('0x64')]===0x0){return db[_0x399b('0x3a')][_0x399b('0x5e')]({'name':_0x33b156[_0x399b('0x3c')],'resourceId':_0x33b156['id'],'type':_0x2d8f82[_0x399b('0x3c')],'sectionId':_0x2d8f82['id']},{})[_0x399b('0x23')](function(){return _0x781ade;});}else{return _0x781ade;}})[_0x399b('0x2d')](function(_0x5c8b23){logger['error'](_0x399b('0x65'),_0x5c8b23);throw _0x5c8b23;});}return _0x781ade;})[_0x399b('0x23')](respondWithResult(_0x3bb256,0xc9))['catch'](handleError(_0x3bb256,null));};exports[_0x399b('0x36')]=function(_0x79b688,_0x1788cc){if(_0x79b688[_0x399b('0x5f')]['id']){delete _0x79b688['body']['id'];}return db['FaxAccount'][_0x399b('0x5d')]({'where':{'id':_0x79b688[_0x399b('0x5a')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]})[_0x399b('0x23')](handleEntityNotFound(_0x1788cc,null))[_0x399b('0x23')](saveUpdates(_0x79b688[_0x399b('0x5f')],null))[_0x399b('0x23')](respondWithResult(_0x1788cc,null))[_0x399b('0x2d')](handleError(_0x1788cc,null));};exports[_0x399b('0x37')]=function(_0x5674eb,_0x3bd3d5){return db[_0x399b('0x42')][_0x399b('0x5d')]({'where':{'id':_0x5674eb[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x3bd3d5,null))[_0x399b('0x23')](removeEntity(_0x3bd3d5,null))[_0x399b('0x2d')](handleError(_0x3bd3d5,null));};exports[_0x399b('0x66')]=function(_0x5d5bc0,_0x45272a){return db['FaxAccount'][_0x399b('0x66')]()[_0x399b('0x23')](respondWithResult(_0x45272a,null))[_0x399b('0x2d')](handleError(_0x45272a,null));};exports[_0x399b('0x67')]=function(_0xf131c6,_0x6dd243,_0x1f8b05){if(_0xf131c6[_0x399b('0x5f')]['id']){delete _0xf131c6[_0x399b('0x5f')]['id'];}return db[_0x399b('0x42')][_0x399b('0x5d')]({'where':{'id':_0xf131c6[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x6dd243,null))[_0x399b('0x23')](function(_0x56fe58){if(_0x56fe58){_0xf131c6['body']['FaxAccountId']=_0x56fe58['id'];return db[_0x399b('0x68')][_0x399b('0x5e')](_0xf131c6['body']);}})[_0x399b('0x23')](respondWithResult(_0x6dd243,null))[_0x399b('0x2d')](handleError(_0x6dd243,null));};exports[_0x399b('0x69')]=function(_0xcd80a8,_0x4293dd,_0x20256c){var _0x258070={'raw':![],'where':{}};var _0x1c7431={};var _0x13aad3={'count':0x0,'rows':[]};return db['FaxAccount'][_0x399b('0x6a')]({'where':{'id':_0xcd80a8['params']['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x4293dd,null))[_0x399b('0x23')](function(_0x280cec){if(_0x280cec){_0x1c7431['model']=_[_0x399b('0x5b')](db['Disposition'][_0x399b('0x43')]);_0x1c7431['query']=_[_0x399b('0x5b')](_0xcd80a8['query']);_0x1c7431['filters']=_['intersection'](_0x1c7431[_0x399b('0x46')],_0x1c7431[_0x399b('0x47')]);_0x258070[_0x399b('0x4a')]=_[_0x399b('0x49')](_0x1c7431[_0x399b('0x46')],qs[_0x399b('0x4b')](_0xcd80a8['query']['fields']));_0x258070[_0x399b('0x4a')]=_0x258070['attributes'][_0x399b('0x4c')]?_0x258070[_0x399b('0x4a')]:_0x1c7431['model'];if(!_0xcd80a8[_0x399b('0x47')][_0x399b('0x4d')]('nolimit')){_0x258070[_0x399b('0x33')]=qs[_0x399b('0x33')](_0xcd80a8[_0x399b('0x47')][_0x399b('0x33')]);_0x258070['offset']=qs[_0x399b('0x32')](_0xcd80a8[_0x399b('0x47')][_0x399b('0x32')]);}_0x258070['order']=qs[_0x399b('0x50')](_0xcd80a8[_0x399b('0x47')]['sort']);_0x258070[_0x399b('0x51')]=qs[_0x399b('0x48')](_[_0x399b('0x52')](_0xcd80a8['query'],_0x1c7431[_0x399b('0x48')]));_0x258070[_0x399b('0x51')][_0x399b('0x6b')]=_0x280cec['id'];if(_0xcd80a8['query']['filter']){_0x258070[_0x399b('0x51')]=_[_0x399b('0x54')](_0x258070[_0x399b('0x51')],{'$or':_[_0x399b('0x41')](_0x258070[_0x399b('0x4a')],function(_0x25c86b){var _0x13e913={};_0x13e913[_0x25c86b]={'$like':'%'+_0xcd80a8['query'][_0x399b('0x53')]+'%'};return _0x13e913;})});}_0x258070=_['merge']({},_0x258070,_0xcd80a8[_0x399b('0x56')]);return db[_0x399b('0x68')]['count']({'where':_0x258070[_0x399b('0x51')]})['then'](function(_0x4727f2){_0x13aad3[_0x399b('0x31')]=_0x4727f2;if(_0xcd80a8['query'][_0x399b('0x5c')]){_0x258070[_0x399b('0x57')]=[{'all':!![]}];}return db[_0x399b('0x68')]['findAll'](_0x258070);})[_0x399b('0x23')](function(_0x29de01){_0x13aad3['rows']=_0x29de01;return _0x13aad3;});}})[_0x399b('0x23')](respondWithFilteredResult(_0x4293dd,_0x258070))[_0x399b('0x2d')](handleError(_0x4293dd,null));};exports[_0x399b('0x6c')]=function(_0x3031df,_0x4dd2bc,_0x3a34cb){return db[_0x399b('0x42')][_0x399b('0x5d')]({'where':{'id':_0x3031df[_0x399b('0x5a')]['id']}})['then'](handleEntityNotFound(_0x4dd2bc,null))['then'](function(_0x44cccb){if(_0x44cccb){return _0x44cccb[_0x399b('0x6c')](_0x3031df[_0x399b('0x47')][_0x399b('0x6d')]);}})[_0x399b('0x23')](respondWithStatusCode(_0x4dd2bc,null))[_0x399b('0x2d')](handleError(_0x4dd2bc,null));};exports[_0x399b('0x6e')]=function(_0x22a9db,_0x3f17e8,_0x2e6a3f){if(_0x22a9db[_0x399b('0x5f')]['id']){delete _0x22a9db[_0x399b('0x5f')]['id'];}return db['FaxAccount']['find']({'where':{'id':_0x22a9db[_0x399b('0x5a')]['id']}})['then'](handleEntityNotFound(_0x3f17e8,null))['then'](function(_0x382c53){if(_0x382c53){_0x22a9db['body'][_0x399b('0x6b')]=_0x382c53['id'];return db[_0x399b('0x6f')][_0x399b('0x5e')](_0x22a9db[_0x399b('0x5f')]);}})[_0x399b('0x23')](respondWithResult(_0x3f17e8,null))['catch'](handleError(_0x3f17e8,null));};exports[_0x399b('0x70')]=function(_0x443e90,_0x5186e4,_0x4f8f06){var _0x2b0ba5={'raw':![],'where':{}};var _0x5f348a={};var _0x534b0b={'count':0x0,'rows':[]};return db[_0x399b('0x42')][_0x399b('0x6a')]({'where':{'id':_0x443e90['params']['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x5186e4,null))[_0x399b('0x23')](function(_0x17d1b8){if(_0x17d1b8){_0x5f348a['model']=_[_0x399b('0x5b')](db['CannedAnswer'][_0x399b('0x43')]);_0x5f348a[_0x399b('0x47')]=_[_0x399b('0x5b')](_0x443e90[_0x399b('0x47')]);_0x5f348a[_0x399b('0x48')]=_[_0x399b('0x49')](_0x5f348a[_0x399b('0x46')],_0x5f348a[_0x399b('0x47')]);_0x2b0ba5['attributes']=_[_0x399b('0x49')](_0x5f348a[_0x399b('0x46')],qs[_0x399b('0x4b')](_0x443e90[_0x399b('0x47')][_0x399b('0x4b')]));_0x2b0ba5[_0x399b('0x4a')]=_0x2b0ba5[_0x399b('0x4a')]['length']?_0x2b0ba5[_0x399b('0x4a')]:_0x5f348a[_0x399b('0x46')];if(!_0x443e90[_0x399b('0x47')][_0x399b('0x4d')]('nolimit')){_0x2b0ba5[_0x399b('0x33')]=qs['limit'](_0x443e90[_0x399b('0x47')][_0x399b('0x33')]);_0x2b0ba5[_0x399b('0x32')]=qs['offset'](_0x443e90['query']['offset']);}_0x2b0ba5[_0x399b('0x4f')]=qs[_0x399b('0x50')](_0x443e90['query'][_0x399b('0x50')]);_0x2b0ba5[_0x399b('0x51')]=qs[_0x399b('0x48')](_[_0x399b('0x52')](_0x443e90[_0x399b('0x47')],_0x5f348a['filters']));_0x2b0ba5[_0x399b('0x51')]['FaxAccountId']=_0x17d1b8['id'];if(_0x443e90[_0x399b('0x47')][_0x399b('0x53')]){_0x2b0ba5['where']=_['merge'](_0x2b0ba5[_0x399b('0x51')],{'$or':_['map'](_0x2b0ba5['attributes'],function(_0x229095){var _0x151995={};_0x151995[_0x229095]={'$like':'%'+_0x443e90[_0x399b('0x47')][_0x399b('0x53')]+'%'};return _0x151995;})});}_0x2b0ba5=_[_0x399b('0x54')]({},_0x2b0ba5,_0x443e90[_0x399b('0x56')]);return db['CannedAnswer'][_0x399b('0x31')]({'where':_0x2b0ba5[_0x399b('0x51')]})[_0x399b('0x23')](function(_0x48e73a){_0x534b0b['count']=_0x48e73a;if(_0x443e90[_0x399b('0x47')]['includeAll']){_0x2b0ba5[_0x399b('0x57')]=[{'all':!![]}];}return db[_0x399b('0x6f')][_0x399b('0x58')](_0x2b0ba5);})['then'](function(_0x1184b8){_0x534b0b[_0x399b('0x59')]=_0x1184b8;return _0x534b0b;});}})[_0x399b('0x23')](respondWithFilteredResult(_0x5186e4,_0x2b0ba5))[_0x399b('0x2d')](handleError(_0x5186e4,null));};exports[_0x399b('0x71')]=function(_0x5974c9,_0x4b2d63,_0x2a9c96){return db[_0x399b('0x42')]['find']({'where':{'id':_0x5974c9[_0x399b('0x5a')]['id']}})['then'](handleEntityNotFound(_0x4b2d63,null))[_0x399b('0x23')](function(_0x59b809){if(_0x59b809){return _0x59b809[_0x399b('0x71')](_0x5974c9[_0x399b('0x47')]['ids']);}})[_0x399b('0x23')](respondWithStatusCode(_0x4b2d63,null))[_0x399b('0x2d')](handleError(_0x4b2d63,null));};exports[_0x399b('0x72')]=function(_0x541b7c,_0x1085cf,_0x5ce19a){return db['FaxInteraction'][_0x399b('0x5d')]({'where':{'id':_0x541b7c[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x1085cf,null))['then'](function(_0x57c3c5){if(_0x57c3c5){return _0x57c3c5[_0x399b('0x72')](_0x541b7c['body'][_0x399b('0x6d')],_[_0x399b('0x73')](_0x541b7c['body'],[_0x399b('0x6d'),'id'])||{});}})[_0x399b('0x23')](respondWithResult(_0x1085cf,null))[_0x399b('0x2d')](handleError(_0x1085cf,null));};exports[_0x399b('0x74')]=function(_0x5a2fd2,_0x551672,_0x14efd5){var _0x263970={'raw':![],'where':{}};var _0xf0619b={};var _0x36fdb5={'count':0x0,'rows':[]};return db[_0x399b('0x42')][_0x399b('0x6a')]({'where':{'id':_0x5a2fd2[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x551672,null))[_0x399b('0x23')](function(_0x1251d7){if(_0x1251d7){_0xf0619b['model']=_['keys'](db['FaxInteraction']['rawAttributes']);_0xf0619b[_0x399b('0x47')]=_['keys'](_0x5a2fd2[_0x399b('0x47')]);_0xf0619b[_0x399b('0x48')]=_['intersection'](_0xf0619b[_0x399b('0x46')],_0xf0619b[_0x399b('0x47')]);_0x263970['attributes']=_[_0x399b('0x49')](_0xf0619b[_0x399b('0x46')],qs[_0x399b('0x4b')](_0x5a2fd2[_0x399b('0x47')][_0x399b('0x4b')]));_0x263970[_0x399b('0x4a')]=_0x263970[_0x399b('0x4a')][_0x399b('0x4c')]?_0x263970['attributes']:_0xf0619b['model'];if(!_0x5a2fd2['query']['hasOwnProperty'](_0x399b('0x4e'))){_0x263970[_0x399b('0x33')]=qs[_0x399b('0x33')](_0x5a2fd2[_0x399b('0x47')][_0x399b('0x33')]);_0x263970[_0x399b('0x32')]=qs[_0x399b('0x32')](_0x5a2fd2[_0x399b('0x47')]['offset']);}_0x263970[_0x399b('0x4f')]=qs[_0x399b('0x50')](_0x5a2fd2[_0x399b('0x47')]['sort']);_0x263970[_0x399b('0x51')]=qs[_0x399b('0x48')](_[_0x399b('0x52')](_0x5a2fd2[_0x399b('0x47')],_0xf0619b['filters']));_0x263970[_0x399b('0x51')]['FaxAccountId']=_0x1251d7['id'];if(_0x5a2fd2['query'][_0x399b('0x53')]){_0x263970['where']=_['merge'](_0x263970[_0x399b('0x51')],{'$or':_[_0x399b('0x41')](_0x263970[_0x399b('0x4a')],function(_0x1a0120){var _0x1f6501={};_0x1f6501[_0x1a0120]={'$like':'%'+_0x5a2fd2[_0x399b('0x47')][_0x399b('0x53')]+'%'};return _0x1f6501;})});}_0x263970=_[_0x399b('0x54')]({},_0x263970,_0x5a2fd2[_0x399b('0x56')]);return db[_0x399b('0x75')][_0x399b('0x31')]({'where':_0x263970[_0x399b('0x51')]})[_0x399b('0x23')](function(_0x541adf){_0x36fdb5[_0x399b('0x31')]=_0x541adf;if(_0x5a2fd2[_0x399b('0x47')][_0x399b('0x5c')]){_0x263970[_0x399b('0x57')]=[{'model':db['CmContact'],'as':_0x399b('0x76'),'required':![]},{'model':db[_0x399b('0x77')],'as':_0x399b('0x78'),'attributes':[_0x399b('0x3c'),_0x399b('0x79'),_0x399b('0x7a')],'required':![]},{'model':db[_0x399b('0x7b')],'as':'Tags','attributes':['id',_0x399b('0x3c'),_0x399b('0x7c')],'where':_0x5a2fd2['query'][_0x399b('0x7d')]?{'id':_0x5a2fd2[_0x399b('0x47')][_0x399b('0x7d')]}:undefined,'required':_0x5a2fd2['query']['tag']?!![]:![]}];}return db[_0x399b('0x75')][_0x399b('0x58')](_0x263970);})['then'](function(_0x142bc9){_0x36fdb5[_0x399b('0x59')]=_0x142bc9;return _0x36fdb5;});}})[_0x399b('0x23')](respondWithFilteredResult(_0x551672,_0x263970))[_0x399b('0x2d')](handleError(_0x551672,null));};exports[_0x399b('0x7e')]=function(_0x4b01ba,_0x131ed9,_0x141a77){return db[_0x399b('0x42')][_0x399b('0x6a')]({'where':{'id':_0x4b01ba[_0x399b('0x5a')]['id']}})['then'](handleEntityNotFound(_0x131ed9,null))['then'](function(_0x303148){if(_0x303148){return db['sequelize'][_0x399b('0x7f')](function(_0xae6dd6){return db[_0x399b('0x80')][_0x399b('0x37')]({'where':{'FaxAccountId':_0x4b01ba[_0x399b('0x5a')]['id']},'transaction':_0xae6dd6})['then'](function(_0x1160a6){var _0x3d345a=_[_0x399b('0x41')](_0x4b01ba[_0x399b('0x5f')],function(_0x25949e){_0x25949e['FaxAccountId']=_0x4b01ba[_0x399b('0x5a')]['id'];return _0x25949e;});return db[_0x399b('0x80')][_0x399b('0x81')](_0x3d345a,{'transaction':_0xae6dd6});});})['then'](function(){return db['FaxApplication'][_0x399b('0x82')]({'where':{'FaxAccountId':_0x4b01ba[_0x399b('0x5a')]['id']},'order':_0x399b('0x83')});});}})[_0x399b('0x23')](respondWithResult(_0x131ed9,null))[_0x399b('0x2d')](handleError(_0x131ed9,null));};exports['getApplications']=function(_0x540dd6,_0x40cd74,_0x531f7b){var _0x56b93d={};var _0x5d119d={};var _0x494fb0;var _0x139b85;return db['FaxAccount']['findOne']({'where':{'id':_0x540dd6[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x40cd74,null))[_0x399b('0x23')](function(_0x234480){if(_0x234480){_0x494fb0=_0x234480;_0x5d119d[_0x399b('0x46')]=_[_0x399b('0x5b')](db[_0x399b('0x80')][_0x399b('0x43')]);_0x5d119d[_0x399b('0x47')]=_[_0x399b('0x5b')](_0x540dd6[_0x399b('0x47')]);_0x5d119d[_0x399b('0x48')]=_[_0x399b('0x49')](_0x5d119d[_0x399b('0x46')],_0x5d119d[_0x399b('0x47')]);_0x56b93d[_0x399b('0x4a')]=_[_0x399b('0x49')](_0x5d119d[_0x399b('0x46')],qs[_0x399b('0x4b')](_0x540dd6[_0x399b('0x47')][_0x399b('0x4b')]));_0x56b93d[_0x399b('0x4a')]=_0x56b93d[_0x399b('0x4a')][_0x399b('0x4c')]?_0x56b93d[_0x399b('0x4a')]:_0x5d119d[_0x399b('0x46')];_0x56b93d[_0x399b('0x4f')]=qs[_0x399b('0x50')](_0x540dd6[_0x399b('0x47')]['sort']);_0x56b93d[_0x399b('0x51')]=qs[_0x399b('0x48')](_[_0x399b('0x52')](_0x540dd6['query'],_0x5d119d[_0x399b('0x48')]));if(_0x540dd6[_0x399b('0x47')][_0x399b('0x53')]){_0x56b93d[_0x399b('0x51')]=_['merge'](_0x56b93d[_0x399b('0x51')],{'$or':_[_0x399b('0x41')](_0x56b93d[_0x399b('0x4a')],function(_0xe2ccd){var _0x4d1fa0={};_0x4d1fa0[_0xe2ccd]={'$like':'%'+_0x540dd6['query'][_0x399b('0x53')]+'%'};return _0x4d1fa0;})});}_0x56b93d=_[_0x399b('0x54')]({},_0x56b93d,_0x540dd6['options']);return _0x494fb0[_0x399b('0x84')](_0x56b93d);}})[_0x399b('0x23')](function(_0x51719b){if(_0x51719b){_0x139b85=_0x51719b[_0x399b('0x4c')];if(!_0x540dd6[_0x399b('0x47')][_0x399b('0x4d')](_0x399b('0x4e'))){_0x56b93d['limit']=qs[_0x399b('0x33')](_0x540dd6[_0x399b('0x47')]['limit']);_0x56b93d['offset']=qs[_0x399b('0x32')](_0x540dd6[_0x399b('0x47')][_0x399b('0x32')]);}return _0x494fb0[_0x399b('0x84')](_0x56b93d);}})[_0x399b('0x23')](function(_0x3dab9e){if(_0x3dab9e){return _0x3dab9e?{'count':_0x139b85,'rows':_0x3dab9e}:null;}})[_0x399b('0x23')](respondWithResult(_0x40cd74,null))[_0x399b('0x2d')](handleError(_0x40cd74,null));};function Extension(_0x4e8c5d,_0x3733d7,_0xc1d0a3,_0x28fdd9){this[_0x399b('0x85')]=_0x399b('0x86');this[_0x399b('0x87')]=_0x4e8c5d['localstationid'];this['app']=_0x28fdd9;this[_0x399b('0x45')]=_0x399b('0x88');this[_0x399b('0x89')]=_0x399b('0x8a');this[_0x399b('0x6b')]=_0x4e8c5d['id'];this['priority']=_0x3733d7;this[_0x399b('0x8b')]=_0xc1d0a3;}function createExtensionsReciveFax(_0x9dbdf5){var _0x1ba37a=0x1;var _0x5b06ac=[];_0x5b06ac[_0x399b('0x8c')](new Extension(_0x9dbdf5,_0x1ba37a,'',_0x399b('0x8d')));_0x1ba37a+=0x1;_0x5b06ac[_0x399b('0x8c')](new Extension(_0x9dbdf5,_0x1ba37a,_0x399b('0x8e'),_0x399b('0x8f')));_0x1ba37a+=0x1;for(var _0x3610ff in _0x9dbdf5){if(_0x9dbdf5[_0x399b('0x4d')](_0x3610ff)&&(_0x3610ff==='ecm'||_0x3610ff===_0x399b('0x90')||_0x3610ff==='gateway'||_0x3610ff===_0x399b('0x91')||_0x3610ff===_0x399b('0x92')||_0x3610ff===_0x399b('0x93')||_0x3610ff===_0x399b('0x94')||_0x3610ff==='modem'||_0x3610ff==='t38timeout')){_0x5b06ac['push'](new Extension(_0x9dbdf5,_0x1ba37a,_0x399b('0x95')+_0x3610ff+')='+_0x9dbdf5[_0x3610ff],_0x399b('0x8f')));_0x1ba37a+=0x1;}}_0x5b06ac[_0x399b('0x8c')](new Extension(_0x9dbdf5,_0x1ba37a,'6','Wait'));_0x1ba37a+=0x1;_0x5b06ac['push'](new Extension(_0x9dbdf5,_0x1ba37a,_0x399b('0x96'),_0x399b('0x97')));_0x1ba37a=0x0;return _0x5b06ac;}exports['addAccountApplications']=function(_0x1dc4f7,_0x53ebce,_0x7a69c9){var _0x3df744;return db[_0x399b('0x98')][_0x399b('0x7f')](function(_0x4199ef){return db[_0x399b('0x42')]['create'](_0x1dc4f7[_0x399b('0x5f')],{'transaction':_0x4199ef})['then'](function(_0x56eaf8){_0x3df744=_0x56eaf8[_0x399b('0x38')]({'plain':!![]});return db[_0x399b('0x99')][_0x399b('0x81')](createExtensionsReciveFax(_0x3df744),{'transaction':_0x4199ef});});})[_0x399b('0x23')](function(){return _0x3df744;})[_0x399b('0x23')](respondWithResult(_0x53ebce,null))[_0x399b('0x2d')](handleError(_0x53ebce,null));};exports[_0x399b('0x9a')]=function(_0x1a58f2,_0x344611,_0x1ec498){var _0x596a07;return db[_0x399b('0x98')]['transaction'](function(_0x1b99f4){return db['FaxAccount'][_0x399b('0x36')](_0x1a58f2['body'],{'where':{'id':_0x1a58f2[_0x399b('0x5f')]['id']},'transaction':_0x1b99f4})[_0x399b('0x23')](function(_0x4bf60a){return db[_0x399b('0x99')][_0x399b('0x37')]({'where':{'FaxAccountId':_0x1a58f2['body']['id']},'transaction':_0x1b99f4})['then'](function(_0x47e112){return db[_0x399b('0x99')][_0x399b('0x81')](createExtensionsReciveFax(_[_0x399b('0x73')](_0x1a58f2[_0x399b('0x5f')],[_0x399b('0x9b'),_0x399b('0x9c'),_0x399b('0x9d'),_0x399b('0x9e'),_0x399b('0x9f'),'ListId'])),{'transaction':_0x1b99f4});});});})[_0x399b('0x23')](function(){return db['FaxAccount'][_0x399b('0xa0')](_0x1a58f2['body']['id']);})[_0x399b('0x23')](respondWithResult(_0x344611,null))[_0x399b('0x2d')](handleError(_0x344611,null));};exports[_0x399b('0xa1')]=function(_0x5130a9,_0x54c633,_0x4d669a){var _0x1c7c98={'raw':!![],'where':{}};var _0x53aeee={};var _0x257609={'count':0x0,'rows':[]};return db[_0x399b('0x42')][_0x399b('0x6a')]({'where':{'id':_0x5130a9[_0x399b('0x5a')]['id']}})['then'](handleEntityNotFound(_0x54c633,null))['then'](function(_0x15c0aa){if(_0x15c0aa){_0x53aeee[_0x399b('0x46')]=_[_0x399b('0x5b')](db[_0x399b('0xa2')][_0x399b('0x43')]);_0x53aeee[_0x399b('0x47')]=_['keys'](_0x5130a9[_0x399b('0x47')]);_0x53aeee['filters']=_[_0x399b('0x49')](_0x53aeee[_0x399b('0x46')],_0x53aeee['query']);_0x1c7c98[_0x399b('0x4a')]=_[_0x399b('0x49')](_0x53aeee['model'],qs[_0x399b('0x4b')](_0x5130a9['query'][_0x399b('0x4b')]));_0x1c7c98['attributes']=_0x1c7c98['attributes']['length']?_0x1c7c98[_0x399b('0x4a')]:_0x53aeee[_0x399b('0x46')];if(!_0x5130a9[_0x399b('0x47')][_0x399b('0x4d')](_0x399b('0x4e'))){_0x1c7c98[_0x399b('0x33')]=qs[_0x399b('0x33')](_0x5130a9[_0x399b('0x47')]['limit']);_0x1c7c98[_0x399b('0x32')]=qs[_0x399b('0x32')](_0x5130a9[_0x399b('0x47')]['offset']);}_0x1c7c98[_0x399b('0x4f')]=qs['sort'](_0x5130a9['query'][_0x399b('0x50')]);_0x1c7c98[_0x399b('0x51')]=qs[_0x399b('0x48')](_[_0x399b('0x52')](_0x5130a9[_0x399b('0x47')],_0x53aeee[_0x399b('0x48')]));_0x1c7c98[_0x399b('0x51')]['FaxAccountId']=_0x15c0aa['id'];if(_0x5130a9[_0x399b('0x47')]['filter']){_0x1c7c98['where']=_[_0x399b('0x54')](_0x1c7c98[_0x399b('0x51')],{'$or':_[_0x399b('0x41')](_0x1c7c98[_0x399b('0x4a')],function(_0x2539d4){var _0x517ab3={};_0x517ab3[_0x2539d4]={'$like':'%'+_0x5130a9[_0x399b('0x47')]['filter']+'%'};return _0x517ab3;})});}if(_0x5130a9[_0x399b('0x47')][_0x399b('0xa3')]){var _0x298dfd=_0x5130a9['query'][_0x399b('0xa3')][_0x399b('0xa4')](',');var _0x5ba6be={};_0x5ba6be[_0x298dfd[0x0]]={'$gte':moment(_0x298dfd[0x1])[_0x399b('0xa5')](_0x399b('0xa6'))};_0x1c7c98[_0x399b('0x51')]=_[_0x399b('0x54')](_0x1c7c98[_0x399b('0x51')],_0x5ba6be);}_0x1c7c98=_['merge']({},_0x1c7c98,_0x5130a9[_0x399b('0x56')]);return db['FaxMessage'][_0x399b('0x31')]({'where':_0x1c7c98['where']})[_0x399b('0x23')](function(_0x14eabb){_0x257609['count']=_0x14eabb;if(_0x5130a9['query'][_0x399b('0x5c')]){_0x1c7c98[_0x399b('0x57')]=[{'all':!![]}];}return db[_0x399b('0xa2')][_0x399b('0x58')](_0x1c7c98);})[_0x399b('0x23')](function(_0x28ed3f){_0x257609[_0x399b('0x59')]=_0x28ed3f;return _0x257609;});}})['then'](respondWithFilteredResult(_0x54c633,_0x1c7c98))[_0x399b('0x2d')](handleError(_0x54c633,null));};exports[_0x399b('0x3d')]=function(_0x17a367,_0x45c782,_0x3cc4e1){var _0x41f4dd,_0x151e56={},_0x1f3b08;if(_0x17a367[_0x399b('0x5f')]['to']){_0x1f3b08=_0x17a367[_0x399b('0x5f')]['to'][0x0];}return db[_0x399b('0x42')][_0x399b('0x5d')]({'where':{'id':_0x17a367['params']['id']},'include':[{'model':db[_0x399b('0xa7')],'as':'List','include':[{'model':db[_0x399b('0xa8')],'as':_0x399b('0xa9'),'where':{'fax':_0x1f3b08},'limit':0x1,'order':[[_0x399b('0x9e'),_0x399b('0xaa')]]}]}]})[_0x399b('0x23')](handleEntityNotFound(_0x45c782,null))[_0x399b('0x23')](function(_0x1be2ca){_0x41f4dd=_0x1be2ca;if(_0x17a367[_0x399b('0x5f')][_0x399b('0xab')]&&_0x17a367['body'][_0x399b('0xab')][_0x399b('0x4c')]){for(var _0xb73da5=0x0;_0xb73da5<_0x17a367['body']['attachments'][_0x399b('0x4c')];_0xb73da5+=0x1){_0x17a367[_0x399b('0x5f')][_0x399b('0xab')][_0xb73da5]={'filename':_0x17a367[_0x399b('0x5f')]['attachments'][_0xb73da5][_0x399b('0x3c')],'id':_0x17a367[_0x399b('0x5f')][_0x399b('0xab')][_0xb73da5]['id'],'path':path[_0x399b('0xac')](config[_0x399b('0xad')],_0x399b('0xae'),_0x17a367['body'][_0x399b('0xab')][_0xb73da5][_0x399b('0xaf')])};}}return respondWithRpcPromise(_0x399b('0xb0'),_0x399b('0xb0'),{'FaxAccountId':_[_0x399b('0xb1')](_0x17a367[_0x399b('0x5a')]['id'])?undefined:_0x17a367[_0x399b('0x5a')]['id'],'path':_['isNil'](_0x17a367[_0x399b('0x5f')]['attachments'][0x0][_0x399b('0x9')])?undefined:_0x17a367[_0x399b('0x5f')][_0x399b('0xab')][0x0][_0x399b('0x9')],'fax':_[_0x399b('0xb1')](_0x17a367['body']['to'][0x0])?undefined:_0x17a367[_0x399b('0x5f')]['to'][0x0]},client9002);})[_0x399b('0x23')](function(){if(_0x41f4dd){if(_[_0x399b('0xb1')](_0x17a367['body'][_0x399b('0xb2')])){_0x17a367[_0x399b('0x5f')][_0x399b('0xb2')]=util[_0x399b('0xa5')](_0x399b('0xb3'),_0x41f4dd[_0x399b('0x3c')],_0x41f4dd[_0x399b('0xb4')]);}if(_0x41f4dd['List']){if(_0x41f4dd[_0x399b('0xb5')][_0x399b('0xa9')]['length']){return _0x41f4dd[_0x399b('0xb5')][_0x399b('0xa9')][0x0];}else{return db['CmContact'][_0x399b('0x5e')](_[_0x399b('0x1a')](_0x17a367[_0x399b('0x5f')],{'firstName':_0x17a367[_0x399b('0x5f')]['to'][0x0],'phone':_0x17a367[_0x399b('0x5f')]['to'][0x0],'fax':_0x17a367[_0x399b('0x5f')]['to'][0x0],'ListId':_0x41f4dd[_0x399b('0xb6')]}));}}else{throw new Error(_0x399b('0xb7'));}}else{throw new Error(_0x399b('0xb8'));}})['then'](function(_0x205224){if(_0x205224){return db[_0x399b('0x75')][_0x399b('0x5d')]({'where':{'ContactId':_0x205224['id'],'closed':![],'FaxAccountId':_0x41f4dd['id']}})[_0x399b('0x23')](function(_0x52b2af){if(_0x52b2af){return[_0x52b2af,![]];}return db[_0x399b('0x75')][_0x399b('0x5e')]({'UserId':_0x17a367[_0x399b('0x60')]['id'],'ContactId':_0x205224['id'],'FaxAccountId':_0x41f4dd['id'],'fax':_0x17a367[_0x399b('0x5f')]['to'][0x0],'firstMsgDirection':_0x399b('0xb9'),'Messages':[_[_0x399b('0x54')](_0x17a367[_0x399b('0x5f')],{'read':![],'body':_0x17a367[_0x399b('0x5f')][_0x399b('0xab')][0x0][_0x399b('0xba')],'FaxAccountId':_0x41f4dd['id'],'UserId':_0x17a367[_0x399b('0x60')]['id'],'ContactId':_0x205224['id'],'AttachmentId':_0x17a367[_0x399b('0x5f')][_0x399b('0xab')][0x0]['id']})]},{'include':[{'model':db[_0x399b('0xa2')],'as':'Messages'}]})[_0x399b('0x23')](function(_0x3c5d13){return[_0x3c5d13,!![]];});});}else{throw new Error(_0x399b('0xbb'));}})['spread'](function(_0x26ae4d,_0x9720ee){if(_0x9720ee){return _0x26ae4d;}return db[_0x399b('0xa2')][_0x399b('0x5e')]({'direction':'out','read':![],'body':_0x17a367[_0x399b('0x5f')][_0x399b('0xab')][0x0]['filename'],'FaxAccountId':_0x41f4dd['id'],'FaxInteractionId':_0x26ae4d['id'],'UserId':_0x17a367[_0x399b('0x60')]['id'],'ContactId':_0x26ae4d[_0x399b('0xbc')],'AttachmentId':_0x17a367[_0x399b('0x5f')]['attachments'][0x0]['id']})['then'](function(_0x380ca9){_0x26ae4d['dataValues'][_0x399b('0xbd')]=[];_0x26ae4d[_0x399b('0xbe')][_0x399b('0xbd')]['push'](_0x380ca9[_0x399b('0xbe')]);return _0x26ae4d;});})[_0x399b('0x23')](function(_0x51e95b){respondWithRpcPromise(_0x399b('0xbf'),_0x399b('0xbf'),{'FaxAccountId':_[_0x399b('0xb1')](_0x17a367[_0x399b('0x5a')]['id'])?undefined:_0x17a367[_0x399b('0x5a')]['id'],'path':_[_0x399b('0xb1')](_0x17a367['body']['attachments'][0x0][_0x399b('0x9')])?undefined:_0x17a367[_0x399b('0x5f')]['attachments'][0x0][_0x399b('0x9')],'fax':_[_0x399b('0xb1')](_0x17a367[_0x399b('0x5f')]['to'][0x0])?undefined:_0x17a367['body']['to'][0x0],'AttachmentId':_0x17a367[_0x399b('0x5f')][_0x399b('0xab')][0x0]['id']},client9002)[_0x399b('0x23')](function(_0x1be7da){logger['info']('SendFaxRpc,\x20%s',_0x1be7da);})['catch'](function(_0x2cd0be){logger[_0x399b('0x2b')](_0x399b('0xc0'),_0x2cd0be);});return _0x51e95b;})[_0x399b('0x23')](respondWithResult(_0x45c782,null))['catch'](handleError(_0x45c782,null));};exports[_0x399b('0xc1')]=function(_0x39b17a,_0x26024a,_0x38b6ec){return db[_0x399b('0x42')]['find']({'where':{'id':_0x39b17a[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x26024a,null))['then'](function(_0x225d63){if(_0x225d63){return _0x225d63['addAgents'](_0x39b17a[_0x399b('0x5f')][_0x399b('0x6d')],_[_0x399b('0x73')](_0x39b17a[_0x399b('0x5f')],[_0x399b('0x6d'),'id'])||{})[_0x399b('0xc2')](function(_0x48de4e){for(var _0x43a2e7=0x0;_0x43a2e7<_0x39b17a['body'][_0x399b('0x6d')]['length'];_0x43a2e7+=0x1){socket['emit'](_0x399b('0xc3'),{'UserId':_0x39b17a['body'][_0x399b('0x6d')][_0x43a2e7],'FaxAccountId':_0x39b17a[_0x399b('0x5a')]['id']});}return _0x48de4e;});}})[_0x399b('0x23')](respondWithResult(_0x26024a,null))[_0x399b('0x2d')](handleError(_0x26024a,null));};exports['removeAgents']=function(_0x2e3c91,_0x24872a,_0x3bc801){return db[_0x399b('0x42')][_0x399b('0x5d')]({'where':{'id':_0x2e3c91[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x24872a,null))[_0x399b('0x23')](function(_0x2ab7e3){if(_0x2ab7e3){return _0x2ab7e3['removeAgents'](_0x2e3c91[_0x399b('0x47')][_0x399b('0x6d')])['then'](function(){if(_[_0x399b('0xc4')](_0x2e3c91[_0x399b('0x47')][_0x399b('0x6d')])){for(var _0x42ecad=0x0;_0x42ecad<_0x2e3c91[_0x399b('0x47')][_0x399b('0x6d')][_0x399b('0x4c')];_0x42ecad+=0x1){socket['emit'](_0x399b('0xc5'),{'UserId':Number(_0x2e3c91['query'][_0x399b('0x6d')][_0x42ecad]),'FaxAccountId':Number(_0x2e3c91[_0x399b('0x5a')]['id'])});}}else{socket[_0x399b('0xc6')]('userFaxAccount:remove',{'UserId':Number(_0x2e3c91[_0x399b('0x47')][_0x399b('0x6d')]),'FaxAccountId':Number(_0x2e3c91['params']['id'])});}});}})[_0x399b('0x23')](respondWithStatusCode(_0x24872a,null))[_0x399b('0x2d')](handleError(_0x24872a,null));};exports[_0x399b('0xc7')]=function(_0x353526,_0x1abc96,_0x45369c){var _0x8d21e3={};var _0x5a17f8={};var _0x23078e;var _0x20c497;return db[_0x399b('0x42')][_0x399b('0x6a')]({'where':{'id':_0x353526[_0x399b('0x5a')]['id']}})[_0x399b('0x23')](handleEntityNotFound(_0x1abc96,null))[_0x399b('0x23')](function(_0x263bc4){if(_0x263bc4){_0x23078e=_0x263bc4;_0x5a17f8[_0x399b('0x46')]=_['keys'](db['User']['rawAttributes']);_0x5a17f8[_0x399b('0x47')]=_[_0x399b('0x5b')](_0x353526['query']);_0x5a17f8[_0x399b('0x48')]=_['intersection'](_0x5a17f8[_0x399b('0x46')],_0x5a17f8[_0x399b('0x47')]);_0x8d21e3[_0x399b('0x4a')]=_[_0x399b('0x49')](_0x5a17f8['model'],qs[_0x399b('0x4b')](_0x353526[_0x399b('0x47')][_0x399b('0x4b')]));_0x8d21e3[_0x399b('0x4a')]=_0x8d21e3[_0x399b('0x4a')][_0x399b('0x4c')]?_0x8d21e3['attributes']:_0x5a17f8[_0x399b('0x46')];_0x8d21e3[_0x399b('0x4f')]=qs[_0x399b('0x50')](_0x353526[_0x399b('0x47')][_0x399b('0x50')]);_0x8d21e3[_0x399b('0x51')]=qs[_0x399b('0x48')](_[_0x399b('0x52')](_0x353526[_0x399b('0x47')],_0x5a17f8[_0x399b('0x48')]));if(_0x353526[_0x399b('0x47')][_0x399b('0x53')]){_0x8d21e3[_0x399b('0x51')]=_[_0x399b('0x54')](_0x8d21e3['where'],{'$or':_[_0x399b('0x41')](_0x8d21e3[_0x399b('0x4a')],function(_0xca6fb){var _0x191c30={};_0x191c30[_0xca6fb]={'$like':'%'+_0x353526[_0x399b('0x47')][_0x399b('0x53')]+'%'};return _0x191c30;})});}_0x8d21e3=_[_0x399b('0x54')]({},_0x8d21e3,_0x353526[_0x399b('0x56')]);return _0x23078e[_0x399b('0xc7')](_0x8d21e3);}})['then'](function(_0x3948ee){if(_0x3948ee){_0x20c497=_0x3948ee['length'];if(!_0x353526[_0x399b('0x47')][_0x399b('0x4d')](_0x399b('0x4e'))){_0x8d21e3[_0x399b('0x33')]=qs[_0x399b('0x33')](_0x353526[_0x399b('0x47')]['limit']);_0x8d21e3['offset']=qs[_0x399b('0x32')](_0x353526[_0x399b('0x47')][_0x399b('0x32')]);}return _0x23078e[_0x399b('0xc7')](_0x8d21e3);}})[_0x399b('0x23')](function(_0x41798d){if(_0x41798d){return _0x41798d?{'count':_0x20c497,'rows':_0x41798d}:null;}})['then'](respondWithResult(_0x1abc96,null))['catch'](handleError(_0x1abc96,null));};
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.events.js b/server/api/faxAccount/faxAccount.events.js
index 6e3f2c5..6a1c3da 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 _0xd92c=['setMaxListeners','save','update','remove','hasOwnProperty','hook','exports','events','../../mysqldb','FaxAccount'];(function(_0x261895,_0x1daf1e){var _0xe2bc9=function(_0x130cc7){while(--_0x130cc7){_0x261895['push'](_0x261895['shift']());}};_0xe2bc9(++_0x1daf1e);}(_0xd92c,0x9d));var _0xcd92=function(_0x2f9496,_0x3a1b07){_0x2f9496=_0x2f9496-0x0;var _0x4c8a97=_0xd92c[_0x2f9496];return _0x4c8a97;};'use strict';var EventEmitter=require(_0xcd92('0x0'));var FaxAccount=require(_0xcd92('0x1'))['db'][_0xcd92('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xcd92('0x3')](0x0);var events={'afterCreate':_0xcd92('0x4'),'afterUpdate':_0xcd92('0x5'),'afterDestroy':_0xcd92('0x6')};function emitEvent(_0x301296){return function(_0x1787b3,_0x5df447,_0x5321b2){FaxAccountEvents['emit'](_0x301296+':'+_0x1787b3['id'],_0x1787b3);FaxAccountEvents['emit'](_0x301296,_0x1787b3);_0x5321b2(null);};}for(var e in events){if(events[_0xcd92('0x7')](e)){var event=events[e];FaxAccount[_0xcd92('0x8')](e,emitEvent(event));}}module[_0xcd92('0x9')]=FaxAccountEvents;
\ No newline at end of file
+var _0x4815=['remove','emit','hasOwnProperty','exports','events','FaxAccount','setMaxListeners','save','update'];(function(_0x3a3c81,_0x253ca1){var _0x53acaf=function(_0x585113){while(--_0x585113){_0x3a3c81['push'](_0x3a3c81['shift']());}};_0x53acaf(++_0x253ca1);}(_0x4815,0xe5));var _0x5481=function(_0xea9870,_0x3e09c1){_0xea9870=_0xea9870-0x0;var _0x473f14=_0x4815[_0xea9870];return _0x473f14;};'use strict';var EventEmitter=require(_0x5481('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0x5481('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x5481('0x2')](0x0);var events={'afterCreate':_0x5481('0x3'),'afterUpdate':_0x5481('0x4'),'afterDestroy':_0x5481('0x5')};function emitEvent(_0x25b3b7){return function(_0x2d40b1,_0xa4292b,_0x13c515){FaxAccountEvents[_0x5481('0x6')](_0x25b3b7+':'+_0x2d40b1['id'],_0x2d40b1);FaxAccountEvents['emit'](_0x25b3b7,_0x2d40b1);_0x13c515(null);};}for(var e in events){if(events[_0x5481('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x5481('0x8')]=FaxAccountEvents;
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.model.js b/server/api/faxAccount/faxAccount.model.js
index d013444..b342681 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 _0xd270=['moment','request-promise','rimraf','exports','define','lodash','api'];(function(_0x23f724,_0x299a30){var _0x303fc3=function(_0x2ab67c){while(--_0x2ab67c){_0x23f724['push'](_0x23f724['shift']());}};_0x303fc3(++_0x299a30);}(_0xd270,0x98));var _0x0d27=function(_0x3266ca,_0x2166b5){_0x3266ca=_0x3266ca-0x0;var _0x3414bf=_0xd270[_0x3266ca];return _0x3414bf;};'use strict';var _=require(_0x0d27('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x0d27('0x1'));var moment=require(_0x0d27('0x2'));var BPromise=require('bluebird');var rp=require(_0x0d27('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0d27('0x4'));var config=require('../../config/environment');var attributes=require('./faxAccount.attributes');module[_0x0d27('0x5')]=function(_0x1d3410,_0xefc96c){return _0x1d3410[_0x0d27('0x6')]('FaxAccount',attributes,{'tableName':'fax_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x448d=['request-promise','path','rimraf','../../config/environment','define','FaxAccount','fax_accounts','lodash','util','../../config/logger','api','bluebird'];(function(_0x571b15,_0x2ef730){var _0x26a18a=function(_0x5e2ef6){while(--_0x5e2ef6){_0x571b15['push'](_0x571b15['shift']());}};_0x26a18a(++_0x2ef730);}(_0x448d,0xaf));var _0xd448=function(_0x11a23e,_0x388dcf){_0x11a23e=_0x11a23e-0x0;var _0x5300dc=_0x448d[_0x11a23e];return _0x5300dc;};'use strict';var _=require(_0xd448('0x0'));var util=require(_0xd448('0x1'));var logger=require(_0xd448('0x2'))(_0xd448('0x3'));var moment=require('moment');var BPromise=require(_0xd448('0x4'));var rp=require(_0xd448('0x5'));var fs=require('fs');var path=require(_0xd448('0x6'));var rimraf=require(_0xd448('0x7'));var config=require(_0xd448('0x8'));var attributes=require('./faxAccount.attributes');module['exports']=function(_0x4c40ae,_0x1164ac){return _0x4c40ae[_0xd448('0x9')](_0xd448('0xa'),attributes,{'tableName':_0xd448('0xb'),'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 3c745e2..85f07f0 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 _0xa991=['keys','createdAt','updatedAt','CompanyId','isNil','from','Sequelize','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','account','CmList','List','Contacts','DESC','FaxApplication','Applications','get','applications','list','priority','defaults','ListId','create','contact','fax','FaxInteraction','find','Contact\x20not\x20found','autoclose','push','length','close','unmanaged','*,*,*,*','created','interaction','FaxMessage','ContactId','AttachmentId','User','name','UserId','agent','waitForTheAssignedAgent','Start','startRouting','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','socket.io-emitter','./faxAccount.socket','register','request','info','request\x20sent','stringify','error','FaxAccount,\x20%s,\x20%s','message','GetFaxAccount','FaxAccount','findAll','options','raw','where','map','include','attributes','model','debug','catch','NotifyFaxAccount','body','CmContact','then','ValidationError','difference'];(function(_0xc6f2df,_0x222595){var _0x1c853b=function(_0x588dc7){while(--_0x588dc7){_0xc6f2df['push'](_0xc6f2df['shift']());}};_0x1c853b(++_0x222595);}(_0xa991,0x143));var _0x1a99=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xa991[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0x1a99('0x0'));var util=require('util');var moment=require(_0x1a99('0x1'));var BPromise=require(_0x1a99('0x2'));var rs=require(_0x1a99('0x3'));var fs=require('fs');var Redis=require(_0x1a99('0x4'));var db=require(_0x1a99('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x1a99('0x6'))(_0x1a99('0x7'));var config=require(_0x1a99('0x8'));var jayson=require(_0x1a99('0x9'));var client=jayson[_0x1a99('0xa')][_0x1a99('0xb')]({'port':0x232c});config[_0x1a99('0xc')]=_['defaults'](config[_0x1a99('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x1a99('0xd'))(new Redis(config[_0x1a99('0xc')]));require(_0x1a99('0xe'))[_0x1a99('0xf')](socket);function respondWithRpcPromise(_0x12b8f7,_0x1ba9b2,_0x48f59b){return new BPromise(function(_0x22016d,_0x2e7899){return client[_0x1a99('0x10')](_0x12b8f7,_0x48f59b)['then'](function(_0x33260c){logger[_0x1a99('0x11')]('FaxAccount,\x20%s,\x20%s',_0x1ba9b2,_0x1a99('0x12'));logger['debug']('FaxAccount,\x20%s,\x20%s,\x20%s',_0x1ba9b2,_0x1a99('0x12'),JSON[_0x1a99('0x13')](_0x33260c));if(_0x33260c[_0x1a99('0x14')]){if(_0x33260c[_0x1a99('0x14')]['code']===0x1f4){logger[_0x1a99('0x14')](_0x1a99('0x15'),_0x1ba9b2,_0x33260c[_0x1a99('0x14')][_0x1a99('0x16')]);return _0x2e7899(_0x33260c[_0x1a99('0x14')]['message']);}logger[_0x1a99('0x14')]('FaxAccount,\x20%s,\x20%s',_0x1ba9b2,_0x33260c[_0x1a99('0x14')][_0x1a99('0x16')]);return _0x22016d(_0x33260c[_0x1a99('0x14')][_0x1a99('0x16')]);}else{logger[_0x1a99('0x11')](_0x1a99('0x15'),_0x1ba9b2,'request\x20sent');_0x22016d(_0x33260c['result'][_0x1a99('0x16')]);}})['catch'](function(_0x780b3e){logger[_0x1a99('0x14')](_0x1a99('0x15'),_0x1ba9b2,_0x780b3e);_0x2e7899(_0x780b3e);});});}exports[_0x1a99('0x17')]=function(_0x468e8d){var _0x1d55ed=this;return new Promise(function(_0x42422f,_0x4f6087){return db[_0x1a99('0x18')][_0x1a99('0x19')]({'raw':_0x468e8d[_0x1a99('0x1a')]?_0x468e8d[_0x1a99('0x1a')][_0x1a99('0x1b')]===undefined?!![]:![]:!![],'where':_0x468e8d['options']?_0x468e8d[_0x1a99('0x1a')][_0x1a99('0x1c')]||null:null,'attributes':_0x468e8d[_0x1a99('0x1a')]?_0x468e8d[_0x1a99('0x1a')]['attributes']||null:null,'limit':_0x468e8d[_0x1a99('0x1a')]?_0x468e8d[_0x1a99('0x1a')]['limit']||null:null,'include':_0x468e8d[_0x1a99('0x1a')]?_0x468e8d[_0x1a99('0x1a')]['include']?_[_0x1a99('0x1d')](_0x468e8d[_0x1a99('0x1a')][_0x1a99('0x1e')],function(_0x54faf6){return{'model':db[_0x54faf6['model']],'as':_0x54faf6['as'],'attributes':_0x54faf6[_0x1a99('0x1f')],'include':_0x54faf6['include']?_[_0x1a99('0x1d')](_0x54faf6[_0x1a99('0x1e')],function(_0x227b05){return{'model':db[_0x227b05[_0x1a99('0x20')]],'as':_0x227b05['as'],'attributes':_0x227b05[_0x1a99('0x1f')],'include':_0x227b05[_0x1a99('0x1e')]?_[_0x1a99('0x1d')](_0x227b05[_0x1a99('0x1e')],function(_0x66b7a4){return{'model':db[_0x66b7a4[_0x1a99('0x20')]],'as':_0x66b7a4['as'],'attributes':_0x66b7a4['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x388e5e){logger[_0x1a99('0x11')]('GetFaxAccount',_0x468e8d);logger[_0x1a99('0x21')](_0x1a99('0x17'),_0x468e8d,JSON[_0x1a99('0x13')](_0x388e5e));_0x42422f(_0x388e5e);})[_0x1a99('0x22')](function(_0x25fc25){logger[_0x1a99('0x14')]('GetFaxAccount',_0x25fc25['message'],_0x468e8d);_0x4f6087(_0x1d55ed[_0x1a99('0x14')](0x1f4,_0x25fc25[_0x1a99('0x16')]));});});};exports[_0x1a99('0x23')]=function(_0x2df23c,_0x5490c4,_0x338436){var _0x46c18c=this;return new Promise(function(_0x23d616,_0x31f949){var _0x156f09={'body':_0x2df23c[_0x1a99('0x24')],'channel':'fax'};var _0x474c45=[];var _0x5162e8=[];var _0x3e0bff={};return db[_0x1a99('0x25')]['describe']()[_0x1a99('0x26')](function(_0x48cc4a){if(!_0x48cc4a){throw new db['Sequelize'][(_0x1a99('0x27'))]('no\x20available\x20attributes');}_0x474c45=_[_0x1a99('0x28')](_[_0x1a99('0x29')](_0x48cc4a),[_0x1a99('0x2a'),_0x1a99('0x2b')]);_0x5162e8=_[_0x1a99('0x28')](_[_0x1a99('0x29')](_0x48cc4a),[_0x1a99('0x2a'),_0x1a99('0x2b'),_0x1a99('0x2c'),'ListId']);if(_0x2df23c[_0x1a99('0x24')]['id']){delete _0x2df23c[_0x1a99('0x24')]['id'];}if(_[_0x1a99('0x2d')](_0x2df23c[_0x1a99('0x24')][_0x1a99('0x2e')])){throw new db[(_0x1a99('0x2f'))][(_0x1a99('0x27'))](_0x1a99('0x30'));}if(_['isNil'](_0x2df23c[_0x1a99('0x24')][_0x1a99('0x24')])||_0x2df23c[_0x1a99('0x24')]['body']===''){throw new db[(_0x1a99('0x2f'))][(_0x1a99('0x27'))](_0x1a99('0x31'));}if(_[_0x1a99('0x2d')](_0x2df23c['body'][_0x1a99('0x32')])){throw new db[(_0x1a99('0x2f'))][(_0x1a99('0x27'))](_0x1a99('0x33')+_0x5162e8);}if(!_[_0x1a99('0x34')](_0x5162e8,_0x2df23c['body'][_0x1a99('0x32')])){throw new db[(_0x1a99('0x2f'))][(_0x1a99('0x27'))](_0x1a99('0x35')+_0x5162e8);}_0x3e0bff[_0x2df23c[_0x1a99('0x24')]['mapKey']]=_0x2df23c[_0x1a99('0x24')][_0x1a99('0x2e')];})['then'](function(){return db['FaxAccount']['find']({'where':{'id':_0x2df23c[_0x1a99('0x36')]['id']},'include':[{'model':db[_0x1a99('0x37')],'as':_0x1a99('0x38'),'include':[{'model':db['CmContact'],'as':_0x1a99('0x39'),'where':_0x3e0bff,'limit':0x1,'order':[['updatedAt',_0x1a99('0x3a')]]}]},{'model':db[_0x1a99('0x3b')],'as':_0x1a99('0x3c')}]});})[_0x1a99('0x26')](function(_0x6dd134){if(_0x6dd134&&_0x6dd134[_0x1a99('0x38')]){var _0x269d78=_0x6dd134[_0x1a99('0x3d')]({'plain':!![]});_0x156f09[_0x1a99('0x36')]=_0x269d78;_0x156f09[_0x1a99('0x3e')]=_0x269d78[_0x1a99('0x3c')];_0x156f09[_0x1a99('0x3f')]=_0x269d78[_0x1a99('0x38')];_0x156f09[_0x1a99('0x3e')]=_['orderBy'](_0x156f09['applications'],[_0x1a99('0x40')],['asc']);if(_0x156f09[_0x1a99('0x36')][_0x1a99('0x3c')]){delete _0x156f09['account']['Applications'];}if(_0x156f09[_0x1a99('0x36')][_0x1a99('0x38')]&&_0x156f09[_0x1a99('0x36')][_0x1a99('0x38')][_0x1a99('0x39')]['length']){return _0x156f09['account'][_0x1a99('0x38')][_0x1a99('0x39')][0x0];}var _0x1d9ca5=_[_0x1a99('0x41')](_0x2df23c[_0x1a99('0x24')],{'firstName':_0x2df23c['body'][_0x1a99('0x2e')],'ListId':_0x269d78[_0x1a99('0x42')]});_0x1d9ca5[_0x2df23c[_0x1a99('0x24')][_0x1a99('0x32')]]=_0x2df23c['body'][_0x1a99('0x2e')];return db[_0x1a99('0x25')][_0x1a99('0x43')](_0x1d9ca5,{'fields':_0x474c45,'raw':!![]});}})['then'](function(_0x50a753){_0x156f09[_0x1a99('0x44')]=_0x50a753;if(_0x50a753){var _0x349c30={'ContactId':_0x50a753['id'],'FaxAccountId':_0x2df23c[_0x1a99('0x36')]['id'],'fax':_0x50a753[_0x1a99('0x45')]};return db[_0x1a99('0x46')][_0x1a99('0x47')]({'where':{'ContactId':_0x50a753['id'],'closed':![],'FaxAccountId':_0x2df23c['account']['id']}})[_0x1a99('0x26')](function(_0x549b40){if(_0x549b40){return[_0x549b40,![]];}return db['FaxInteraction'][_0x1a99('0x43')](_0x349c30)['then'](function(_0x2f5260){return[_0x2f5260,!![]];});});}else{throw new Error(_0x1a99('0x48'));}})['spread'](function(_0x3ae641,_0x2e478f){var _0x527aeb=_0x3ae641['get']({'plain':!![]});if(_0x2e478f){if(_0x156f09['account'][_0x1a99('0x49')]){_0x156f09[_0x1a99('0x3e')][_0x1a99('0x4a')]({'id':0x0,'priority':_0x156f09['applications'][_0x1a99('0x4b')]+0x1,'app':_0x1a99('0x4c'),'appdata':_0x1a99('0x4d'),'interval':_0x1a99('0x4e')});}_0x527aeb['created']=!![];}else{_0x527aeb[_0x1a99('0x4f')]=![];}_0x156f09[_0x1a99('0x50')]=_0x527aeb;return db[_0x1a99('0x51')][_0x1a99('0x43')]({'body':_0x2df23c[_0x1a99('0x24')]['body'],'FaxAccountId':_0x2df23c[_0x1a99('0x36')]['id'],'FaxInteractionId':_0x3ae641['id'],'direction':'in','ContactId':_0x3ae641[_0x1a99('0x52')],'AttachmentId':_0x2df23c['body'][_0x1a99('0x53')]});})[_0x1a99('0x26')](function(_0x6be549){_0x156f09[_0x1a99('0x16')]=_0x6be549;if(_0x156f09[_0x1a99('0x50')]['UserId']){return db[_0x1a99('0x54')]['find']({'attributes':['id',_0x1a99('0x55')],'where':{'id':_0x156f09['interaction'][_0x1a99('0x56')]}})[_0x1a99('0x26')](function(_0x4544c7){if(_0x4544c7){_0x156f09[_0x1a99('0x3e')]['unshift']({'id':0x0,'priority':0x0,'app':_0x1a99('0x57'),'appdata':_0x4544c7[_0x1a99('0x55')]+','+(_0x156f09['account'][_0x1a99('0x58')]||0xa),'interval':_0x1a99('0x4e')});}return respondWithRpcPromise(_0x1a99('0x59'),_0x1a99('0x5a'),_0x156f09);});}return respondWithRpcPromise(_0x1a99('0x59'),_0x1a99('0x5a'),_0x156f09);})[_0x1a99('0x26')](function(_0x522088){_0x23d616(_0x522088);})['catch'](function(_0x132e33){_0x31f949(_0x46c18c[_0x1a99('0x14')](0x1f4,_0x132e33[_0x1a99('0x16')]));});});};
\ No newline at end of file
+var _0xdbbd=['list','orderBy','priority','asc','length','ListId','create','contact','FaxInteraction','Contact\x20not\x20found','spread','get','close','unmanaged','created','interaction','FaxMessage','ContactId','AttachmentId','UserId','User','name','*,*,*,*','startRouting','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','register','request','then','FaxAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','catch','GetFaxAccount','findAll','options','where','attributes','model','include','debug','NotifyFaxAccount','body','fax','CmContact','describe','difference','createdAt','updatedAt','keys','Sequelize','ValidationError','from\x20is\x20mandatory','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','from','FaxAccount','account','CmList','List','Contacts','DESC','Applications','applications'];(function(_0x463f6f,_0x19b8f6){var _0x5c908d=function(_0x35c275){while(--_0x35c275){_0x463f6f['push'](_0x463f6f['shift']());}};_0x5c908d(++_0x19b8f6);}(_0xdbbd,0x1bc));var _0xddbb=function(_0x40bffc,_0x3a45d7){_0x40bffc=_0x40bffc-0x0;var _0x3007e9=_0xdbbd[_0x40bffc];return _0x3007e9;};'use strict';var _=require('lodash');var util=require(_0xddbb('0x0'));var moment=require(_0xddbb('0x1'));var BPromise=require(_0xddbb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xddbb('0x3'));var db=require(_0xddbb('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xddbb('0x5'))(_0xddbb('0x6'));var config=require(_0xddbb('0x7'));var jayson=require(_0xddbb('0x8'));var client=jayson[_0xddbb('0x9')][_0xddbb('0xa')]({'port':0x232c});config[_0xddbb('0xb')]=_[_0xddbb('0xc')](config[_0xddbb('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xddbb('0xd'))(new Redis(config[_0xddbb('0xb')]));require('./faxAccount.socket')[_0xddbb('0xe')](socket);function respondWithRpcPromise(_0xa1063c,_0x1bb728,_0x398a75){return new BPromise(function(_0xc67008,_0x7c7f70){return client[_0xddbb('0xf')](_0xa1063c,_0x398a75)[_0xddbb('0x10')](function(_0x4ec365){logger['info'](_0xddbb('0x11'),_0x1bb728,_0xddbb('0x12'));logger['debug']('FaxAccount,\x20%s,\x20%s,\x20%s',_0x1bb728,'request\x20sent',JSON[_0xddbb('0x13')](_0x4ec365));if(_0x4ec365[_0xddbb('0x14')]){if(_0x4ec365[_0xddbb('0x14')][_0xddbb('0x15')]===0x1f4){logger[_0xddbb('0x14')](_0xddbb('0x11'),_0x1bb728,_0x4ec365['error']['message']);return _0x7c7f70(_0x4ec365[_0xddbb('0x14')][_0xddbb('0x16')]);}logger[_0xddbb('0x14')]('FaxAccount,\x20%s,\x20%s',_0x1bb728,_0x4ec365['error'][_0xddbb('0x16')]);return _0xc67008(_0x4ec365[_0xddbb('0x14')][_0xddbb('0x16')]);}else{logger[_0xddbb('0x17')](_0xddbb('0x11'),_0x1bb728,'request\x20sent');_0xc67008(_0x4ec365['result']['message']);}})[_0xddbb('0x18')](function(_0xa4b5f){logger['error']('FaxAccount,\x20%s,\x20%s',_0x1bb728,_0xa4b5f);_0x7c7f70(_0xa4b5f);});});}exports[_0xddbb('0x19')]=function(_0x57b841){var _0x1d5104=this;return new Promise(function(_0x34bc41,_0x15698a){return db['FaxAccount'][_0xddbb('0x1a')]({'raw':_0x57b841[_0xddbb('0x1b')]?_0x57b841[_0xddbb('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x57b841[_0xddbb('0x1b')]?_0x57b841['options'][_0xddbb('0x1c')]||null:null,'attributes':_0x57b841[_0xddbb('0x1b')]?_0x57b841[_0xddbb('0x1b')][_0xddbb('0x1d')]||null:null,'limit':_0x57b841[_0xddbb('0x1b')]?_0x57b841[_0xddbb('0x1b')]['limit']||null:null,'include':_0x57b841[_0xddbb('0x1b')]?_0x57b841[_0xddbb('0x1b')]['include']?_['map'](_0x57b841['options']['include'],function(_0x51067d){return{'model':db[_0x51067d[_0xddbb('0x1e')]],'as':_0x51067d['as'],'attributes':_0x51067d[_0xddbb('0x1d')],'include':_0x51067d[_0xddbb('0x1f')]?_['map'](_0x51067d[_0xddbb('0x1f')],function(_0x2c8a33){return{'model':db[_0x2c8a33[_0xddbb('0x1e')]],'as':_0x2c8a33['as'],'attributes':_0x2c8a33[_0xddbb('0x1d')],'include':_0x2c8a33['include']?_['map'](_0x2c8a33[_0xddbb('0x1f')],function(_0x47d0f2){return{'model':db[_0x47d0f2['model']],'as':_0x47d0f2['as'],'attributes':_0x47d0f2[_0xddbb('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xddbb('0x10')](function(_0x31ab8e){logger[_0xddbb('0x17')]('GetFaxAccount',_0x57b841);logger[_0xddbb('0x20')](_0xddbb('0x19'),_0x57b841,JSON[_0xddbb('0x13')](_0x31ab8e));_0x34bc41(_0x31ab8e);})[_0xddbb('0x18')](function(_0x4f61ee){logger[_0xddbb('0x14')](_0xddbb('0x19'),_0x4f61ee['message'],_0x57b841);_0x15698a(_0x1d5104['error'](0x1f4,_0x4f61ee['message']));});});};exports[_0xddbb('0x21')]=function(_0x18bba4,_0x34f487,_0x1c6bff){var _0x194a8f=this;return new Promise(function(_0x30f933,_0x15a8dd){var _0xb2cbee={'body':_0x18bba4[_0xddbb('0x22')],'channel':_0xddbb('0x23')};var _0x3a331c=[];var _0x5ebd5d=[];var _0x221851={};return db[_0xddbb('0x24')][_0xddbb('0x25')]()['then'](function(_0x1c2bd4){if(!_0x1c2bd4){throw new db['Sequelize']['ValidationError']('no\x20available\x20attributes');}_0x3a331c=_[_0xddbb('0x26')](_['keys'](_0x1c2bd4),[_0xddbb('0x27'),_0xddbb('0x28')]);_0x5ebd5d=_[_0xddbb('0x26')](_[_0xddbb('0x29')](_0x1c2bd4),['createdAt','updatedAt','CompanyId','ListId']);if(_0x18bba4[_0xddbb('0x22')]['id']){delete _0x18bba4['body']['id'];}if(_['isNil'](_0x18bba4[_0xddbb('0x22')]['from'])){throw new db[(_0xddbb('0x2a'))][(_0xddbb('0x2b'))](_0xddbb('0x2c'));}if(_[_0xddbb('0x2d')](_0x18bba4[_0xddbb('0x22')][_0xddbb('0x22')])||_0x18bba4[_0xddbb('0x22')][_0xddbb('0x22')]===''){throw new db[(_0xddbb('0x2a'))][(_0xddbb('0x2b'))](_0xddbb('0x2e'));}if(_['isNil'](_0x18bba4[_0xddbb('0x22')]['mapKey'])){throw new db['Sequelize'][(_0xddbb('0x2b'))](_0xddbb('0x2f')+_0x5ebd5d);}if(!_[_0xddbb('0x30')](_0x5ebd5d,_0x18bba4['body']['mapKey'])){throw new db['Sequelize']['ValidationError'](_0xddbb('0x31')+_0x5ebd5d);}_0x221851[_0x18bba4['body'][_0xddbb('0x32')]]=_0x18bba4[_0xddbb('0x22')][_0xddbb('0x33')];})[_0xddbb('0x10')](function(){return db[_0xddbb('0x34')]['find']({'where':{'id':_0x18bba4[_0xddbb('0x35')]['id']},'include':[{'model':db[_0xddbb('0x36')],'as':_0xddbb('0x37'),'include':[{'model':db[_0xddbb('0x24')],'as':_0xddbb('0x38'),'where':_0x221851,'limit':0x1,'order':[[_0xddbb('0x28'),_0xddbb('0x39')]]}]},{'model':db['FaxApplication'],'as':_0xddbb('0x3a')}]});})['then'](function(_0x151ac6){if(_0x151ac6&&_0x151ac6['List']){var _0x31c9e2=_0x151ac6['get']({'plain':!![]});_0xb2cbee[_0xddbb('0x35')]=_0x31c9e2;_0xb2cbee[_0xddbb('0x3b')]=_0x31c9e2[_0xddbb('0x3a')];_0xb2cbee[_0xddbb('0x3c')]=_0x31c9e2[_0xddbb('0x37')];_0xb2cbee[_0xddbb('0x3b')]=_[_0xddbb('0x3d')](_0xb2cbee[_0xddbb('0x3b')],[_0xddbb('0x3e')],[_0xddbb('0x3f')]);if(_0xb2cbee[_0xddbb('0x35')][_0xddbb('0x3a')]){delete _0xb2cbee[_0xddbb('0x35')]['Applications'];}if(_0xb2cbee['account'][_0xddbb('0x37')]&&_0xb2cbee[_0xddbb('0x35')][_0xddbb('0x37')][_0xddbb('0x38')][_0xddbb('0x40')]){return _0xb2cbee[_0xddbb('0x35')][_0xddbb('0x37')][_0xddbb('0x38')][0x0];}var _0x550031=_[_0xddbb('0xc')](_0x18bba4[_0xddbb('0x22')],{'firstName':_0x18bba4['body'][_0xddbb('0x33')],'ListId':_0x31c9e2[_0xddbb('0x41')]});_0x550031[_0x18bba4[_0xddbb('0x22')]['mapKey']]=_0x18bba4[_0xddbb('0x22')][_0xddbb('0x33')];return db['CmContact'][_0xddbb('0x42')](_0x550031,{'fields':_0x3a331c,'raw':!![]});}})[_0xddbb('0x10')](function(_0x2c3c80){_0xb2cbee[_0xddbb('0x43')]=_0x2c3c80;if(_0x2c3c80){var _0x163bc5={'ContactId':_0x2c3c80['id'],'FaxAccountId':_0x18bba4[_0xddbb('0x35')]['id'],'fax':_0x2c3c80[_0xddbb('0x23')]};return db[_0xddbb('0x44')]['find']({'where':{'ContactId':_0x2c3c80['id'],'closed':![],'FaxAccountId':_0x18bba4[_0xddbb('0x35')]['id']}})[_0xddbb('0x10')](function(_0x510821){if(_0x510821){return[_0x510821,![]];}return db[_0xddbb('0x44')][_0xddbb('0x42')](_0x163bc5)[_0xddbb('0x10')](function(_0x128b29){return[_0x128b29,!![]];});});}else{throw new Error(_0xddbb('0x45'));}})[_0xddbb('0x46')](function(_0x50d739,_0x1d109b){var _0xb4d880=_0x50d739[_0xddbb('0x47')]({'plain':!![]});if(_0x1d109b){if(_0xb2cbee[_0xddbb('0x35')]['autoclose']){_0xb2cbee[_0xddbb('0x3b')]['push']({'id':0x0,'priority':_0xb2cbee[_0xddbb('0x3b')][_0xddbb('0x40')]+0x1,'app':_0xddbb('0x48'),'appdata':_0xddbb('0x49'),'interval':'*,*,*,*'});}_0xb4d880[_0xddbb('0x4a')]=!![];}else{_0xb4d880[_0xddbb('0x4a')]=![];}_0xb2cbee[_0xddbb('0x4b')]=_0xb4d880;return db[_0xddbb('0x4c')]['create']({'body':_0x18bba4[_0xddbb('0x22')][_0xddbb('0x22')],'FaxAccountId':_0x18bba4['account']['id'],'FaxInteractionId':_0x50d739['id'],'direction':'in','ContactId':_0x50d739[_0xddbb('0x4d')],'AttachmentId':_0x18bba4[_0xddbb('0x22')][_0xddbb('0x4e')]});})['then'](function(_0x3b19e7){_0xb2cbee[_0xddbb('0x16')]=_0x3b19e7;if(_0xb2cbee['interaction'][_0xddbb('0x4f')]){return db[_0xddbb('0x50')]['find']({'attributes':['id',_0xddbb('0x51')],'where':{'id':_0xb2cbee['interaction'][_0xddbb('0x4f')]}})[_0xddbb('0x10')](function(_0x21ed32){if(_0x21ed32){_0xb2cbee[_0xddbb('0x3b')]['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x21ed32[_0xddbb('0x51')]+','+(_0xb2cbee[_0xddbb('0x35')]['waitForTheAssignedAgent']||0xa),'interval':_0xddbb('0x52')});}return respondWithRpcPromise('Start',_0xddbb('0x53'),_0xb2cbee);});}return respondWithRpcPromise('Start',_0xddbb('0x53'),_0xb2cbee);})[_0xddbb('0x10')](function(_0x1fc72b){_0x30f933(_0x1fc72b);})[_0xddbb('0x18')](function(_0x9b49f5){_0x15a8dd(_0x194a8f[_0xddbb('0x14')](0x1f4,_0x9b49f5[_0xddbb('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/faxAccount/faxAccount.socket.js b/server/api/faxAccount/faxAccount.socket.js
index e7824f0..9b54cc9 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 _0xbff5=['register','length','faxAccount:','./faxAccount.events','save','remove','update'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xbff5,0x1bc));var _0x5bff=function(_0x3665e9,_0xc36126){_0x3665e9=_0x3665e9-0x0;var _0x3bbb37=_0xbff5[_0x3665e9];return _0x3bbb37;};'use strict';var FaxAccountEvents=require(_0x5bff('0x0'));var events=[_0x5bff('0x1'),_0x5bff('0x2'),_0x5bff('0x3')];function createListener(_0x41c38b,_0x43a41b){return function(_0x3bd90c){_0x43a41b['emit'](_0x41c38b,_0x3bd90c);};}function removeListener(_0x3868ae,_0x486083){return function(){FaxAccountEvents['removeListener'](_0x3868ae,_0x486083);};}exports[_0x5bff('0x4')]=function(_0x1d8650){for(var _0x151add=0x0,_0xa54c57=events[_0x5bff('0x5')];_0x151add<_0xa54c57;_0x151add++){var _0xd4b9dc=events[_0x151add];var _0x1acb49=createListener(_0x5bff('0x6')+_0xd4b9dc,_0x1d8650);FaxAccountEvents['on'](_0xd4b9dc,_0x1acb49);}};
\ No newline at end of file
+var _0x5204=['length','./faxAccount.events','save','update','emit','register'];(function(_0x3462e9,_0x255a41){var _0x218a11=function(_0x514c56){while(--_0x514c56){_0x3462e9['push'](_0x3462e9['shift']());}};_0x218a11(++_0x255a41);}(_0x5204,0xdf));var _0x4520=function(_0x1ad926,_0x3e1fed){_0x1ad926=_0x1ad926-0x0;var _0x1b81dc=_0x5204[_0x1ad926];return _0x1b81dc;};'use strict';var FaxAccountEvents=require(_0x4520('0x0'));var events=[_0x4520('0x1'),'remove',_0x4520('0x2')];function createListener(_0x3bf0b1,_0x10cbc2){return function(_0x36caca){_0x10cbc2[_0x4520('0x3')](_0x3bf0b1,_0x36caca);};}function removeListener(_0x592fe0,_0x41d89c){return function(){FaxAccountEvents['removeListener'](_0x592fe0,_0x41d89c);};}exports[_0x4520('0x4')]=function(_0x209381){for(var _0xe0a256=0x0,_0xe741c2=events[_0x4520('0x5')];_0xe0a256<_0xe741c2;_0xe0a256++){var _0x446dc9=events[_0xe0a256];var _0x27890f=createListener('faxAccount:'+_0x446dc9,_0x209381);FaxAccountEvents['on'](_0x446dc9,_0x27890f);}};
\ No newline at end of file
diff --git a/server/api/faxAccount/index.js b/server/api/faxAccount/index.js
index 7dfb81a..299acd7 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 _0x932b=['/updateaccountapplications','send','addAgents','put','update','delete','removeAgents','exports','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getDispositions','/:id/canned_answers','/:id/interactions','getInteractions','/:id/applications','getApplications','/:id/messages','/:id/users','getAgents','post','create','/:id/dispositions','addAnswer','addInteraction','addApplications','/addaccountapplications','addAccountApplications'];(function(_0x1630f1,_0x2eba83){var _0x1531e6=function(_0x1d25ec){while(--_0x1d25ec){_0x1630f1['push'](_0x1630f1['shift']());}};_0x1531e6(++_0x2eba83);}(_0x932b,0xcb));var _0xb932=function(_0x54e335,_0x6b782d){_0x54e335=_0x54e335-0x0;var _0x5be44a=_0x932b[_0x54e335];return _0x5be44a;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xb932('0x0'));var timeout=require('connect-timeout');var express=require(_0xb932('0x1'));var router=express[_0xb932('0x2')]();var auth=require(_0xb932('0x3'));var interaction=require(_0xb932('0x4'));var config=require(_0xb932('0x5'));var controller=require(_0xb932('0x6'));router[_0xb932('0x7')]('/',auth[_0xb932('0x8')](),controller[_0xb932('0x9')]);router[_0xb932('0x7')](_0xb932('0xa'),auth[_0xb932('0x8')](),controller[_0xb932('0xb')]);router['get'](_0xb932('0xc'),auth['isAuthenticated'](),controller[_0xb932('0xd')]);router[_0xb932('0x7')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0xb932('0xe')]);router[_0xb932('0x7')](_0xb932('0xf'),auth[_0xb932('0x8')](),controller['getAnswers']);router[_0xb932('0x7')](_0xb932('0x10'),auth[_0xb932('0x8')](),controller[_0xb932('0x11')]);router[_0xb932('0x7')](_0xb932('0x12'),auth[_0xb932('0x8')](),controller[_0xb932('0x13')]);router['get'](_0xb932('0x14'),auth[_0xb932('0x8')](),controller['getMessages']);router['get'](_0xb932('0x15'),auth[_0xb932('0x8')](),controller[_0xb932('0x16')]);router[_0xb932('0x17')]('/',auth['isAuthenticated'](),controller[_0xb932('0x18')]);router[_0xb932('0x17')](_0xb932('0x19'),auth[_0xb932('0x8')](),controller['addDisposition']);router[_0xb932('0x17')](_0xb932('0xf'),auth[_0xb932('0x8')](),controller[_0xb932('0x1a')]);router[_0xb932('0x17')](_0xb932('0x10'),auth[_0xb932('0x8')](),controller[_0xb932('0x1b')]);router[_0xb932('0x17')](_0xb932('0x12'),auth[_0xb932('0x8')](),controller[_0xb932('0x1c')]);router[_0xb932('0x17')](_0xb932('0x1d'),auth['isAuthenticated'](),controller[_0xb932('0x1e')]);router[_0xb932('0x17')](_0xb932('0x1f'),auth[_0xb932('0x8')](),controller['updateAccountApplications']);router[_0xb932('0x17')]('/:id/send',auth[_0xb932('0x8')](),controller[_0xb932('0x20')]);router[_0xb932('0x17')]('/:id/users',auth[_0xb932('0x8')](),controller[_0xb932('0x21')]);router[_0xb932('0x22')]('/:id',auth[_0xb932('0x8')](),controller[_0xb932('0x23')]);router[_0xb932('0x24')]('/:id',auth['isAuthenticated'](),controller['destroy']);router[_0xb932('0x24')](_0xb932('0x19'),auth[_0xb932('0x8')](),controller['removeDispositions']);router[_0xb932('0x24')]('/:id/canned_answers',auth[_0xb932('0x8')](),controller['removeAnswers']);router[_0xb932('0x24')](_0xb932('0x15'),auth[_0xb932('0x8')](),controller[_0xb932('0x25')]);module[_0xb932('0x26')]=router;
\ No newline at end of file
+var _0x04c5=['delete','removeDispositions','removeAgents','exports','multer','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','isAuthenticated','index','describe','/:id','show','getDispositions','/:id/canned_answers','getAnswers','/:id/interactions','getInteractions','getApplications','/:id/users','getAgents','create','post','/:id/dispositions','addDisposition','addAnswer','addInteraction','addApplications','/updateaccountapplications','updateAccountApplications','addAgents','put','update','destroy'];(function(_0x5cc631,_0x25e822){var _0x17a984=function(_0x1a7779){while(--_0x1a7779){_0x5cc631['push'](_0x5cc631['shift']());}};_0x17a984(++_0x25e822);}(_0x04c5,0x163));var _0x504c=function(_0x242bf2,_0x343ad2){_0x242bf2=_0x242bf2-0x0;var _0x38d325=_0x04c5[_0x242bf2];return _0x38d325;};'use strict';var multer=require(_0x504c('0x0'));var util=require('util');var path=require(_0x504c('0x1'));var timeout=require('connect-timeout');var express=require(_0x504c('0x2'));var router=express[_0x504c('0x3')]();var auth=require(_0x504c('0x4'));var interaction=require(_0x504c('0x5'));var config=require(_0x504c('0x6'));var controller=require(_0x504c('0x7'));router[_0x504c('0x8')]('/',auth[_0x504c('0x9')](),controller[_0x504c('0xa')]);router[_0x504c('0x8')]('/describe',auth['isAuthenticated'](),controller[_0x504c('0xb')]);router[_0x504c('0x8')](_0x504c('0xc'),auth[_0x504c('0x9')](),controller[_0x504c('0xd')]);router[_0x504c('0x8')]('/:id/dispositions',auth[_0x504c('0x9')](),controller[_0x504c('0xe')]);router[_0x504c('0x8')](_0x504c('0xf'),auth[_0x504c('0x9')](),controller[_0x504c('0x10')]);router[_0x504c('0x8')](_0x504c('0x11'),auth[_0x504c('0x9')](),controller[_0x504c('0x12')]);router[_0x504c('0x8')]('/:id/applications',auth['isAuthenticated'](),controller[_0x504c('0x13')]);router[_0x504c('0x8')]('/:id/messages',auth[_0x504c('0x9')](),controller['getMessages']);router['get'](_0x504c('0x14'),auth[_0x504c('0x9')](),controller[_0x504c('0x15')]);router['post']('/',auth[_0x504c('0x9')](),controller[_0x504c('0x16')]);router[_0x504c('0x17')](_0x504c('0x18'),auth['isAuthenticated'](),controller[_0x504c('0x19')]);router[_0x504c('0x17')](_0x504c('0xf'),auth[_0x504c('0x9')](),controller[_0x504c('0x1a')]);router[_0x504c('0x17')]('/:id/interactions',auth[_0x504c('0x9')](),controller[_0x504c('0x1b')]);router['post']('/:id/applications',auth[_0x504c('0x9')](),controller[_0x504c('0x1c')]);router[_0x504c('0x17')]('/addaccountapplications',auth[_0x504c('0x9')](),controller['addAccountApplications']);router['post'](_0x504c('0x1d'),auth[_0x504c('0x9')](),controller[_0x504c('0x1e')]);router[_0x504c('0x17')]('/:id/send',auth[_0x504c('0x9')](),controller['send']);router['post']('/:id/users',auth[_0x504c('0x9')](),controller[_0x504c('0x1f')]);router[_0x504c('0x20')](_0x504c('0xc'),auth[_0x504c('0x9')](),controller[_0x504c('0x21')]);router['delete'](_0x504c('0xc'),auth[_0x504c('0x9')](),controller[_0x504c('0x22')]);router[_0x504c('0x23')]('/:id/dispositions',auth[_0x504c('0x9')](),controller[_0x504c('0x24')]);router[_0x504c('0x23')](_0x504c('0xf'),auth['isAuthenticated'](),controller['removeAnswers']);router[_0x504c('0x23')](_0x504c('0x14'),auth['isAuthenticated'](),controller[_0x504c('0x25')]);module[_0x504c('0x26')]=router;
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.attributes.js b/server/api/faxApplication/faxApplication.attributes.js
index 72d017c..d5bee07 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 _0xfb0b=['INTEGER','noop','TEXT','*,*,*,*','sequelize','exports'];(function(_0x487832,_0x45e913){var _0x31c794=function(_0x56fdd4){while(--_0x56fdd4){_0x487832['push'](_0x487832['shift']());}};_0x31c794(++_0x45e913);}(_0xfb0b,0x94));var _0xbfb0=function(_0x10353c,_0x53abc2){_0x10353c=_0x10353c-0x0;var _0x24fef0=_0xfb0b[_0x10353c];return _0x24fef0;};'use strict';var Sequelize=require(_0xbfb0('0x0'));module[_0xbfb0('0x1')]={'priority':{'type':Sequelize[_0xbfb0('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xbfb0('0x3')},'appdata':{'type':Sequelize[_0xbfb0('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':_0xbfb0('0x5')}};
\ No newline at end of file
+var _0xf496=['sequelize','exports','INTEGER','STRING','noop'];(function(_0x525c29,_0x44ad57){var _0x596d53=function(_0x1dd265){while(--_0x1dd265){_0x525c29['push'](_0x525c29['shift']());}};_0x596d53(++_0x44ad57);}(_0xf496,0x1c7));var _0x6f49=function(_0x58fae6,_0x561737){_0x58fae6=_0x58fae6-0x0;var _0x13296c=_0xf496[_0x58fae6];return _0x13296c;};'use strict';var Sequelize=require(_0x6f49('0x0'));module[_0x6f49('0x1')]={'priority':{'type':Sequelize[_0x6f49('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x6f49('0x3')],'allowNull':![],'defaultValue':_0x6f49('0x4')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x6f49('0x3')]},'interval':{'type':Sequelize[_0x6f49('0x3')],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.controller.js b/server/api/faxApplication/faxApplication.controller.js
index 03cdedf..a7e9cac 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 _0x1666=['apply','reject','save','update','then','destroy','error','name','send','rawAttributes','fieldName','type','key','model','map','keys','filters','intersection','query','attributes','fields','length','limit','order','sort','pick','where','merge','VIRTUAL','filter','options','FaxApplication','findAll','rows','catch','show','params','includeAll','include','find','create','body','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1666,0x75));var _0x6166=function(_0x49e4fd,_0x2f153b){_0x49e4fd=_0x49e4fd-0x0;var _0x26707e=_0x1666[_0x49e4fd];return _0x26707e;};'use strict';var pdf=require(_0x6166('0x0'));var emlformat=require(_0x6166('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x6166('0x2'));var jsonpatch=require(_0x6166('0x3'));var rp=require(_0x6166('0x4'));var moment=require(_0x6166('0x5'));var BPromise=require(_0x6166('0x6'));var Mustache=require(_0x6166('0x7'));var util=require(_0x6166('0x8'));var path=require(_0x6166('0x9'));var sox=require('sox');var csv=require(_0x6166('0xa'));var ejs=require(_0x6166('0xb'));var fs=require('fs');var _=require(_0x6166('0xc'));var squel=require(_0x6166('0xd'));var crypto=require(_0x6166('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6166('0xf'));var Papa=require('papaparse');var Redis=require(_0x6166('0x10'));var authService=require(_0x6166('0x11'));var qs=require(_0x6166('0x12'));var as=require(_0x6166('0x13'));var hardwareService=require(_0x6166('0x14'));var logger=require(_0x6166('0x15'))(_0x6166('0x16'));var utils=require('../../config/utils');var config=require(_0x6166('0x17'));var db=require(_0x6166('0x18'))['db'];function respondWithStatusCode(_0x4104b9,_0x5b2335){_0x5b2335=_0x5b2335||0xcc;return function(_0x320728){if(_0x320728){return _0x4104b9[_0x6166('0x19')](_0x5b2335);}return _0x4104b9[_0x6166('0x1a')](_0x5b2335)[_0x6166('0x1b')]();};}function respondWithResult(_0x5bde71,_0x1316f2){_0x1316f2=_0x1316f2||0xc8;return function(_0x33789f){if(_0x33789f){return _0x5bde71[_0x6166('0x1a')](_0x1316f2)[_0x6166('0x1c')](_0x33789f);}};}function respondWithFilteredResult(_0x38b1c4,_0x147874){return function(_0x56520c){if(_0x56520c){var _0x3d2f83=_0x56520c[_0x6166('0x1d')],_0x12f0a5=_0x147874[_0x6166('0x1e')],_0x3000de=_0x147874[_0x6166('0x1e')]+_0x147874['limit'],_0x4eff5c;if(_0x3000de>=_0x3d2f83){_0x3000de=_0x3d2f83;_0x4eff5c=0xc8;}else{_0x4eff5c=0xce;}_0x38b1c4[_0x6166('0x1a')](_0x4eff5c);return _0x38b1c4[_0x6166('0x1f')](_0x6166('0x20'),_0x12f0a5+'-'+_0x3000de+'/'+_0x3d2f83)[_0x6166('0x1c')](_0x56520c);}return null;};}function patchUpdates(_0x389449){return function(_0x553701){try{jsonpatch[_0x6166('0x21')](_0x553701,_0x389449,!![]);}catch(_0x28185c){return BPromise[_0x6166('0x22')](_0x28185c);}return _0x553701[_0x6166('0x23')]();};}function saveUpdates(_0x5a964f,_0x28d90c){return function(_0x2411de){if(_0x2411de){return _0x2411de[_0x6166('0x24')](_0x5a964f)[_0x6166('0x25')](function(_0x2874f7){return _0x2874f7;});}return null;};}function removeEntity(_0x30d6e5,_0x49c474){return function(_0x1646ff){if(_0x1646ff){return _0x1646ff[_0x6166('0x26')]()[_0x6166('0x25')](function(){_0x30d6e5[_0x6166('0x1a')](0xcc)[_0x6166('0x1b')]();});}};}function handleEntityNotFound(_0x1d23c3,_0x3ffd46){return function(_0x26d926){if(!_0x26d926){_0x1d23c3['sendStatus'](0x194);}return _0x26d926;};}function handleError(_0x2909d9,_0x5a2e7b){_0x5a2e7b=_0x5a2e7b||0x1f4;return function(_0x1a1290){logger[_0x6166('0x27')](_0x1a1290['stack']);if(_0x1a1290[_0x6166('0x28')]){delete _0x1a1290[_0x6166('0x28')];}_0x2909d9[_0x6166('0x1a')](_0x5a2e7b)[_0x6166('0x29')](_0x1a1290);};}exports['index']=function(_0x3ce5a7,_0xcb8172){var _0x47176f={},_0x805836={},_0x9ff878={'count':0x0,'rows':[]};var _0x2bfe75=_['map'](db['FaxApplication'][_0x6166('0x2a')],function(_0x2c1e5f){return{'name':_0x2c1e5f[_0x6166('0x2b')],'type':_0x2c1e5f[_0x6166('0x2c')][_0x6166('0x2d')]};});_0x805836[_0x6166('0x2e')]=_[_0x6166('0x2f')](_0x2bfe75,'name');_0x805836['query']=_[_0x6166('0x30')](_0x3ce5a7['query']);_0x805836[_0x6166('0x31')]=_[_0x6166('0x32')](_0x805836[_0x6166('0x2e')],_0x805836[_0x6166('0x33')]);_0x47176f[_0x6166('0x34')]=_['intersection'](_0x805836[_0x6166('0x2e')],qs[_0x6166('0x35')](_0x3ce5a7[_0x6166('0x33')][_0x6166('0x35')]));_0x47176f[_0x6166('0x34')]=_0x47176f[_0x6166('0x34')][_0x6166('0x36')]?_0x47176f['attributes']:_0x805836[_0x6166('0x2e')];if(!_0x3ce5a7[_0x6166('0x33')]['hasOwnProperty']('nolimit')){_0x47176f[_0x6166('0x37')]=qs[_0x6166('0x37')](_0x3ce5a7['query'][_0x6166('0x37')]);_0x47176f[_0x6166('0x1e')]=qs[_0x6166('0x1e')](_0x3ce5a7['query'][_0x6166('0x1e')]);}_0x47176f[_0x6166('0x38')]=qs[_0x6166('0x39')](_0x3ce5a7['query']['sort']);_0x47176f['where']=qs[_0x6166('0x31')](_[_0x6166('0x3a')](_0x3ce5a7[_0x6166('0x33')],_0x805836[_0x6166('0x31')]));if(_0x3ce5a7[_0x6166('0x33')]['filter']){_0x47176f[_0x6166('0x3b')]=_[_0x6166('0x3c')](_0x47176f[_0x6166('0x3b')],{'$or':_[_0x6166('0x2f')](_0x2bfe75,function(_0x5bad07){if(_0x5bad07[_0x6166('0x2c')]!==_0x6166('0x3d')){var _0x41477f={};_0x41477f[_0x5bad07[_0x6166('0x28')]]={'$like':'%'+_0x3ce5a7['query'][_0x6166('0x3e')]+'%'};return _0x41477f;}})});}_0x47176f=_[_0x6166('0x3c')]({},_0x47176f,_0x3ce5a7[_0x6166('0x3f')]);var _0x2b6ef4={'where':_0x47176f[_0x6166('0x3b')]};return db[_0x6166('0x40')]['count'](_0x2b6ef4)[_0x6166('0x25')](function(_0x8ae3e0){_0x9ff878['count']=_0x8ae3e0;if(_0x3ce5a7['query']['includeAll']){_0x47176f['include']=[{'all':!![]}];}return db[_0x6166('0x40')][_0x6166('0x41')](_0x47176f);})[_0x6166('0x25')](function(_0xde100e){_0x9ff878[_0x6166('0x42')]=_0xde100e;return _0x9ff878;})['then'](respondWithFilteredResult(_0xcb8172,_0x47176f))[_0x6166('0x43')](handleError(_0xcb8172,null));};exports[_0x6166('0x44')]=function(_0x23aa32,_0x5ce502){var _0x229cb9={'raw':!![],'where':{'id':_0x23aa32[_0x6166('0x45')]['id']}},_0x3b8cff={};_0x3b8cff['model']=_[_0x6166('0x30')](db[_0x6166('0x40')]['rawAttributes']);_0x3b8cff[_0x6166('0x33')]=_['keys'](_0x23aa32[_0x6166('0x33')]);_0x3b8cff['filters']=_['intersection'](_0x3b8cff[_0x6166('0x2e')],_0x3b8cff[_0x6166('0x33')]);_0x229cb9[_0x6166('0x34')]=_['intersection'](_0x3b8cff['model'],qs[_0x6166('0x35')](_0x23aa32[_0x6166('0x33')][_0x6166('0x35')]));_0x229cb9[_0x6166('0x34')]=_0x229cb9[_0x6166('0x34')][_0x6166('0x36')]?_0x229cb9['attributes']:_0x3b8cff['model'];if(_0x23aa32[_0x6166('0x33')][_0x6166('0x46')]){_0x229cb9[_0x6166('0x47')]=[{'all':!![]}];}_0x229cb9=_[_0x6166('0x3c')]({},_0x229cb9,_0x23aa32['options']);return db[_0x6166('0x40')][_0x6166('0x48')](_0x229cb9)[_0x6166('0x25')](handleEntityNotFound(_0x5ce502,null))[_0x6166('0x25')](respondWithResult(_0x5ce502,null))[_0x6166('0x43')](handleError(_0x5ce502,null));};exports[_0x6166('0x49')]=function(_0x1f364c,_0x48a955){return db['FaxApplication']['create'](_0x1f364c[_0x6166('0x4a')],{})[_0x6166('0x25')](respondWithResult(_0x48a955,0xc9))[_0x6166('0x43')](handleError(_0x48a955,null));};exports[_0x6166('0x24')]=function(_0x2eeab1,_0x47e857){if(_0x2eeab1[_0x6166('0x4a')]['id']){delete _0x2eeab1[_0x6166('0x4a')]['id'];}return db[_0x6166('0x40')][_0x6166('0x48')]({'where':{'id':_0x2eeab1['params']['id']}})[_0x6166('0x25')](handleEntityNotFound(_0x47e857,null))[_0x6166('0x25')](saveUpdates(_0x2eeab1[_0x6166('0x4a')],null))[_0x6166('0x25')](respondWithResult(_0x47e857,null))[_0x6166('0x43')](handleError(_0x47e857,null));};exports[_0x6166('0x26')]=function(_0x58deab,_0x49df42){return db[_0x6166('0x40')][_0x6166('0x48')]({'where':{'id':_0x58deab['params']['id']}})[_0x6166('0x25')](handleEntityNotFound(_0x49df42,null))['then'](removeEntity(_0x49df42,null))[_0x6166('0x43')](handleError(_0x49df42,null));};
\ No newline at end of file
+var _0xe4d6=['options','count','includeAll','include','catch','show','params','fields','find','create','body','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','path','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','FaxApplication','rawAttributes','fieldName','type','map','query','keys','filters','intersection','model','attributes','length','hasOwnProperty','nolimit','order','sort','pick','merge','where','filter'];(function(_0x10a94d,_0x3bf30f){var _0x33b351=function(_0x10277c){while(--_0x10277c){_0x10a94d['push'](_0x10a94d['shift']());}};_0x33b351(++_0x3bf30f);}(_0xe4d6,0xd7));var _0x6e4d=function(_0x238613,_0x719e82){_0x238613=_0x238613-0x0;var _0x50db4e=_0xe4d6[_0x238613];return _0x50db4e;};'use strict';var pdf=require(_0x6e4d('0x0'));var emlformat=require(_0x6e4d('0x1'));var rimraf=require(_0x6e4d('0x2'));var zipdir=require(_0x6e4d('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6e4d('0x4'));var moment=require(_0x6e4d('0x5'));var BPromise=require(_0x6e4d('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x6e4d('0x7'));var sox=require('sox');var csv=require(_0x6e4d('0x8'));var ejs=require(_0x6e4d('0x9'));var fs=require('fs');var _=require(_0x6e4d('0xa'));var squel=require(_0x6e4d('0xb'));var crypto=require(_0x6e4d('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x6e4d('0x8'));var querystring=require(_0x6e4d('0xd'));var Papa=require(_0x6e4d('0xe'));var Redis=require('ioredis');var authService=require(_0x6e4d('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x6e4d('0x10'));var hardwareService=require(_0x6e4d('0x11'));var logger=require(_0x6e4d('0x12'))(_0x6e4d('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x6e4d('0x14'))['db'];function respondWithStatusCode(_0x3e99c7,_0x13cd57){_0x13cd57=_0x13cd57||0xcc;return function(_0x39ab6d){if(_0x39ab6d){return _0x3e99c7[_0x6e4d('0x15')](_0x13cd57);}return _0x3e99c7[_0x6e4d('0x16')](_0x13cd57)[_0x6e4d('0x17')]();};}function respondWithResult(_0x451a48,_0x7ade78){_0x7ade78=_0x7ade78||0xc8;return function(_0x545f9b){if(_0x545f9b){return _0x451a48[_0x6e4d('0x16')](_0x7ade78)[_0x6e4d('0x18')](_0x545f9b);}};}function respondWithFilteredResult(_0x1694c4,_0x5d1391){return function(_0x5863d3){if(_0x5863d3){var _0xdca5f3=_0x5863d3['count'],_0x51b9f1=_0x5d1391[_0x6e4d('0x19')],_0x206c02=_0x5d1391['offset']+_0x5d1391[_0x6e4d('0x1a')],_0xf0021;if(_0x206c02>=_0xdca5f3){_0x206c02=_0xdca5f3;_0xf0021=0xc8;}else{_0xf0021=0xce;}_0x1694c4[_0x6e4d('0x16')](_0xf0021);return _0x1694c4[_0x6e4d('0x1b')](_0x6e4d('0x1c'),_0x51b9f1+'-'+_0x206c02+'/'+_0xdca5f3)[_0x6e4d('0x18')](_0x5863d3);}return null;};}function patchUpdates(_0x5cf5e4){return function(_0x168ef9){try{jsonpatch['apply'](_0x168ef9,_0x5cf5e4,!![]);}catch(_0xa1da79){return BPromise[_0x6e4d('0x1d')](_0xa1da79);}return _0x168ef9[_0x6e4d('0x1e')]();};}function saveUpdates(_0x15d386,_0x5a8c39){return function(_0x33867f){if(_0x33867f){return _0x33867f[_0x6e4d('0x1f')](_0x15d386)[_0x6e4d('0x20')](function(_0xaf1736){return _0xaf1736;});}return null;};}function removeEntity(_0x4bc652,_0xe45d2a){return function(_0x1be13b){if(_0x1be13b){return _0x1be13b[_0x6e4d('0x21')]()['then'](function(){_0x4bc652[_0x6e4d('0x16')](0xcc)[_0x6e4d('0x17')]();});}};}function handleEntityNotFound(_0x2fbbae,_0x2873b3){return function(_0x4a7d4a){if(!_0x4a7d4a){_0x2fbbae['sendStatus'](0x194);}return _0x4a7d4a;};}function handleError(_0x9fb272,_0x586adb){_0x586adb=_0x586adb||0x1f4;return function(_0x46f528){logger[_0x6e4d('0x22')](_0x46f528[_0x6e4d('0x23')]);if(_0x46f528['name']){delete _0x46f528[_0x6e4d('0x24')];}_0x9fb272[_0x6e4d('0x16')](_0x586adb)['send'](_0x46f528);};}exports['index']=function(_0x5a2ef9,_0x345ce6){var _0x229d4d={},_0x251d0c={},_0x215020={'count':0x0,'rows':[]};var _0xeb2707=_['map'](db[_0x6e4d('0x25')][_0x6e4d('0x26')],function(_0x1c90de){return{'name':_0x1c90de[_0x6e4d('0x27')],'type':_0x1c90de[_0x6e4d('0x28')]['key']};});_0x251d0c['model']=_[_0x6e4d('0x29')](_0xeb2707,'name');_0x251d0c[_0x6e4d('0x2a')]=_[_0x6e4d('0x2b')](_0x5a2ef9[_0x6e4d('0x2a')]);_0x251d0c[_0x6e4d('0x2c')]=_[_0x6e4d('0x2d')](_0x251d0c[_0x6e4d('0x2e')],_0x251d0c[_0x6e4d('0x2a')]);_0x229d4d[_0x6e4d('0x2f')]=_[_0x6e4d('0x2d')](_0x251d0c[_0x6e4d('0x2e')],qs['fields'](_0x5a2ef9['query']['fields']));_0x229d4d[_0x6e4d('0x2f')]=_0x229d4d[_0x6e4d('0x2f')][_0x6e4d('0x30')]?_0x229d4d[_0x6e4d('0x2f')]:_0x251d0c['model'];if(!_0x5a2ef9[_0x6e4d('0x2a')][_0x6e4d('0x31')](_0x6e4d('0x32'))){_0x229d4d[_0x6e4d('0x1a')]=qs['limit'](_0x5a2ef9[_0x6e4d('0x2a')][_0x6e4d('0x1a')]);_0x229d4d['offset']=qs[_0x6e4d('0x19')](_0x5a2ef9[_0x6e4d('0x2a')][_0x6e4d('0x19')]);}_0x229d4d[_0x6e4d('0x33')]=qs[_0x6e4d('0x34')](_0x5a2ef9[_0x6e4d('0x2a')]['sort']);_0x229d4d['where']=qs[_0x6e4d('0x2c')](_[_0x6e4d('0x35')](_0x5a2ef9[_0x6e4d('0x2a')],_0x251d0c['filters']));if(_0x5a2ef9['query']['filter']){_0x229d4d['where']=_[_0x6e4d('0x36')](_0x229d4d[_0x6e4d('0x37')],{'$or':_['map'](_0xeb2707,function(_0x357a11){if(_0x357a11[_0x6e4d('0x28')]!=='VIRTUAL'){var _0x2f612e={};_0x2f612e[_0x357a11[_0x6e4d('0x24')]]={'$like':'%'+_0x5a2ef9[_0x6e4d('0x2a')][_0x6e4d('0x38')]+'%'};return _0x2f612e;}})});}_0x229d4d=_[_0x6e4d('0x36')]({},_0x229d4d,_0x5a2ef9[_0x6e4d('0x39')]);var _0x3a18ae={'where':_0x229d4d['where']};return db[_0x6e4d('0x25')]['count'](_0x3a18ae)['then'](function(_0x8b047d){_0x215020[_0x6e4d('0x3a')]=_0x8b047d;if(_0x5a2ef9['query'][_0x6e4d('0x3b')]){_0x229d4d[_0x6e4d('0x3c')]=[{'all':!![]}];}return db['FaxApplication']['findAll'](_0x229d4d);})[_0x6e4d('0x20')](function(_0x2e2c70){_0x215020['rows']=_0x2e2c70;return _0x215020;})[_0x6e4d('0x20')](respondWithFilteredResult(_0x345ce6,_0x229d4d))[_0x6e4d('0x3d')](handleError(_0x345ce6,null));};exports[_0x6e4d('0x3e')]=function(_0x4acf59,_0x2a6b38){var _0x55c4e1={'raw':!![],'where':{'id':_0x4acf59[_0x6e4d('0x3f')]['id']}},_0x4bd3e7={};_0x4bd3e7[_0x6e4d('0x2e')]=_['keys'](db[_0x6e4d('0x25')][_0x6e4d('0x26')]);_0x4bd3e7[_0x6e4d('0x2a')]=_[_0x6e4d('0x2b')](_0x4acf59[_0x6e4d('0x2a')]);_0x4bd3e7[_0x6e4d('0x2c')]=_[_0x6e4d('0x2d')](_0x4bd3e7[_0x6e4d('0x2e')],_0x4bd3e7['query']);_0x55c4e1[_0x6e4d('0x2f')]=_['intersection'](_0x4bd3e7['model'],qs[_0x6e4d('0x40')](_0x4acf59[_0x6e4d('0x2a')]['fields']));_0x55c4e1[_0x6e4d('0x2f')]=_0x55c4e1[_0x6e4d('0x2f')][_0x6e4d('0x30')]?_0x55c4e1[_0x6e4d('0x2f')]:_0x4bd3e7['model'];if(_0x4acf59[_0x6e4d('0x2a')][_0x6e4d('0x3b')]){_0x55c4e1[_0x6e4d('0x3c')]=[{'all':!![]}];}_0x55c4e1=_['merge']({},_0x55c4e1,_0x4acf59['options']);return db['FaxApplication'][_0x6e4d('0x41')](_0x55c4e1)[_0x6e4d('0x20')](handleEntityNotFound(_0x2a6b38,null))[_0x6e4d('0x20')](respondWithResult(_0x2a6b38,null))[_0x6e4d('0x3d')](handleError(_0x2a6b38,null));};exports[_0x6e4d('0x42')]=function(_0x4dec54,_0x54bdbe){return db[_0x6e4d('0x25')]['create'](_0x4dec54[_0x6e4d('0x43')],{})[_0x6e4d('0x20')](respondWithResult(_0x54bdbe,0xc9))['catch'](handleError(_0x54bdbe,null));};exports[_0x6e4d('0x1f')]=function(_0x6d042f,_0x411e04){if(_0x6d042f[_0x6e4d('0x43')]['id']){delete _0x6d042f[_0x6e4d('0x43')]['id'];}return db['FaxApplication']['find']({'where':{'id':_0x6d042f['params']['id']}})[_0x6e4d('0x20')](handleEntityNotFound(_0x411e04,null))[_0x6e4d('0x20')](saveUpdates(_0x6d042f[_0x6e4d('0x43')],null))['then'](respondWithResult(_0x411e04,null))[_0x6e4d('0x3d')](handleError(_0x411e04,null));};exports[_0x6e4d('0x21')]=function(_0x393670,_0xb8f9bc){return db[_0x6e4d('0x25')][_0x6e4d('0x41')]({'where':{'id':_0x393670[_0x6e4d('0x3f')]['id']}})[_0x6e4d('0x20')](handleEntityNotFound(_0xb8f9bc,null))['then'](removeEntity(_0xb8f9bc,null))[_0x6e4d('0x3d')](handleError(_0xb8f9bc,null));};
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.model.js b/server/api/faxApplication/faxApplication.model.js
index 03b3622..fe04743 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 _0xded2=['utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./faxApplication.attributes','exports','define','FaxApplication','fax_applications'];(function(_0x4edc01,_0x45426a){var _0x33c380=function(_0x2855c){while(--_0x2855c){_0x4edc01['push'](_0x4edc01['shift']());}};_0x33c380(++_0x45426a);}(_0xded2,0x1f1));var _0x2ded=function(_0x17406e,_0x1049fd){_0x17406e=_0x17406e-0x0;var _0x2bfc5a=_0xded2[_0x17406e];return _0x2bfc5a;};'use strict';var _=require('lodash');var util=require(_0x2ded('0x0'));var logger=require(_0x2ded('0x1'))(_0x2ded('0x2'));var moment=require(_0x2ded('0x3'));var BPromise=require(_0x2ded('0x4'));var rp=require(_0x2ded('0x5'));var fs=require('fs');var path=require(_0x2ded('0x6'));var rimraf=require('rimraf');var config=require(_0x2ded('0x7'));var attributes=require(_0x2ded('0x8'));module[_0x2ded('0x9')]=function(_0x55b678,_0x5d9e0a){return _0x55b678[_0x2ded('0xa')](_0x2ded('0xb'),attributes,{'tableName':_0x2ded('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x2ded('0xd'),'collate':_0x2ded('0xe')});};
\ No newline at end of file
+var _0x8d0f=['utf8mb4_unicode_ci','util','../../config/logger','api','request-promise','rimraf','../../config/environment','exports','define','fax_applications','utf8mb4'];(function(_0x336043,_0x5d09f6){var _0x3b945c=function(_0x37d2bf){while(--_0x37d2bf){_0x336043['push'](_0x336043['shift']());}};_0x3b945c(++_0x5d09f6);}(_0x8d0f,0x14b));var _0xf8d0=function(_0x4eccdb,_0x116e65){_0x4eccdb=_0x4eccdb-0x0;var _0x5d7cdf=_0x8d0f[_0x4eccdb];return _0x5d7cdf;};'use strict';var _=require('lodash');var util=require(_0xf8d0('0x0'));var logger=require(_0xf8d0('0x1'))(_0xf8d0('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xf8d0('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf8d0('0x4'));var config=require(_0xf8d0('0x5'));var attributes=require('./faxApplication.attributes');module[_0xf8d0('0x6')]=function(_0xc9ebb6,_0x4c9fa6){return _0xc9ebb6[_0xf8d0('0x7')]('FaxApplication',attributes,{'tableName':_0xf8d0('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xf8d0('0x9'),'collate':_0xf8d0('0xa')});};
\ No newline at end of file
diff --git a/server/api/faxApplication/faxApplication.rpc.js b/server/api/faxApplication/faxApplication.rpc.js
index 96b4d80..c419d55 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 _0x6525=['update','body','options','where','UpdateFaxApplication','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','FaxApplication'];(function(_0x2d8e0e,_0x178a1b){var _0xb3ddf4=function(_0x8b727f){while(--_0x8b727f){_0x2d8e0e['push'](_0x2d8e0e['shift']());}};_0xb3ddf4(++_0x178a1b);}(_0x6525,0x1a9));var _0x5652=function(_0x5df033,_0x29458b){_0x5df033=_0x5df033-0x0;var _0x445829=_0x6525[_0x5df033];return _0x445829;};'use strict';var _=require('lodash');var util=require(_0x5652('0x0'));var moment=require(_0x5652('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5652('0x2'));var db=require(_0x5652('0x3'))['db'];var utils=require(_0x5652('0x4'));var logger=require(_0x5652('0x5'))('rpc');var config=require(_0x5652('0x6'));var jayson=require(_0x5652('0x7'));var client=jayson[_0x5652('0x8')][_0x5652('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x38e01e,_0x428dae,_0x3be1da){return new BPromise(function(_0x360d0c,_0x489554){return client[_0x5652('0xa')](_0x38e01e,_0x3be1da)[_0x5652('0xb')](function(_0x310cee){logger[_0x5652('0xc')](_0x5652('0xd'),_0x428dae,_0x5652('0xe'));logger[_0x5652('0xf')](_0x5652('0x10'),_0x428dae,'request\x20sent',JSON[_0x5652('0x11')](_0x310cee));if(_0x310cee['error']){if(_0x310cee['error']['code']===0x1f4){logger[_0x5652('0x12')](_0x5652('0xd'),_0x428dae,_0x310cee[_0x5652('0x12')]['message']);return _0x489554(_0x310cee['error']['message']);}logger[_0x5652('0x12')]('FaxApplication,\x20%s,\x20%s',_0x428dae,_0x310cee[_0x5652('0x12')][_0x5652('0x13')]);return _0x360d0c(_0x310cee[_0x5652('0x12')][_0x5652('0x13')]);}else{logger[_0x5652('0xc')](_0x5652('0xd'),_0x428dae,'request\x20sent');_0x360d0c(_0x310cee[_0x5652('0x14')][_0x5652('0x13')]);}})[_0x5652('0x15')](function(_0x42d576){logger[_0x5652('0x12')](_0x5652('0xd'),_0x428dae,_0x42d576);_0x489554(_0x42d576);});});}exports['UpdateFaxApplication']=function(_0x43b65f){var _0x3b11f6=this;return new Promise(function(_0xac2f19,_0x26d315){return db[_0x5652('0x16')][_0x5652('0x17')](_0x43b65f[_0x5652('0x18')],{'raw':_0x43b65f[_0x5652('0x19')]?_0x43b65f[_0x5652('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x43b65f[_0x5652('0x19')]?_0x43b65f[_0x5652('0x19')][_0x5652('0x1a')]||null:null,'attributes':_0x43b65f[_0x5652('0x19')]?_0x43b65f[_0x5652('0x19')]['attributes']||null:null,'limit':_0x43b65f[_0x5652('0x19')]?_0x43b65f['options']['limit']||null:null})[_0x5652('0xb')](function(_0x15d56e){logger[_0x5652('0xc')](_0x5652('0x1b'),_0x43b65f);logger[_0x5652('0xf')](_0x5652('0x1b'),_0x43b65f,JSON['stringify'](_0x15d56e));_0xac2f19(_0x15d56e);})['catch'](function(_0x35f5d2){logger[_0x5652('0x12')](_0x5652('0x1b'),_0x35f5d2[_0x5652('0x13')],_0x43b65f);_0x26d315(_0x3b11f6[_0x5652('0x12')](0x1f4,_0x35f5d2[_0x5652('0x13')]));});});};
\ No newline at end of file
+var _0x3e99=['body','options','raw','attributes','limit','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','UpdateFaxApplication','update'];(function(_0x10a781,_0x26dcd7){var _0x41d8ae=function(_0x14ad0c){while(--_0x14ad0c){_0x10a781['push'](_0x10a781['shift']());}};_0x41d8ae(++_0x26dcd7);}(_0x3e99,0xed));var _0x93e9=function(_0x4d2bee,_0x2960a6){_0x4d2bee=_0x4d2bee-0x0;var _0x22c9d6=_0x3e99[_0x4d2bee];return _0x22c9d6;};'use strict';var _=require('lodash');var util=require(_0x93e9('0x0'));var moment=require(_0x93e9('0x1'));var BPromise=require(_0x93e9('0x2'));var rs=require(_0x93e9('0x3'));var fs=require('fs');var Redis=require(_0x93e9('0x4'));var db=require(_0x93e9('0x5'))['db'];var utils=require(_0x93e9('0x6'));var logger=require(_0x93e9('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x93e9('0x8'));var client=jayson[_0x93e9('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x6ac8db,_0x34afdd,_0x3dd432){return new BPromise(function(_0x240dba,_0x4c5eba){return client[_0x93e9('0xa')](_0x6ac8db,_0x3dd432)[_0x93e9('0xb')](function(_0x55d4bc){logger[_0x93e9('0xc')](_0x93e9('0xd'),_0x34afdd,_0x93e9('0xe'));logger[_0x93e9('0xf')](_0x93e9('0x10'),_0x34afdd,'request\x20sent',JSON[_0x93e9('0x11')](_0x55d4bc));if(_0x55d4bc['error']){if(_0x55d4bc['error']['code']===0x1f4){logger[_0x93e9('0x12')](_0x93e9('0xd'),_0x34afdd,_0x55d4bc[_0x93e9('0x12')][_0x93e9('0x13')]);return _0x4c5eba(_0x55d4bc[_0x93e9('0x12')][_0x93e9('0x13')]);}logger[_0x93e9('0x12')](_0x93e9('0xd'),_0x34afdd,_0x55d4bc[_0x93e9('0x12')][_0x93e9('0x13')]);return _0x240dba(_0x55d4bc[_0x93e9('0x12')][_0x93e9('0x13')]);}else{logger[_0x93e9('0xc')]('FaxApplication,\x20%s,\x20%s',_0x34afdd,_0x93e9('0xe'));_0x240dba(_0x55d4bc[_0x93e9('0x14')][_0x93e9('0x13')]);}})[_0x93e9('0x15')](function(_0x6eed82){logger[_0x93e9('0x12')](_0x93e9('0xd'),_0x34afdd,_0x6eed82);_0x4c5eba(_0x6eed82);});});}exports[_0x93e9('0x16')]=function(_0x3ed72f){var _0x34bb6e=this;return new Promise(function(_0x2069b4,_0x402bd3){return db['FaxApplication'][_0x93e9('0x17')](_0x3ed72f[_0x93e9('0x18')],{'raw':_0x3ed72f[_0x93e9('0x19')]?_0x3ed72f['options'][_0x93e9('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3ed72f[_0x93e9('0x19')]?_0x3ed72f[_0x93e9('0x19')]['where']||null:null,'attributes':_0x3ed72f[_0x93e9('0x19')]?_0x3ed72f['options'][_0x93e9('0x1b')]||null:null,'limit':_0x3ed72f['options']?_0x3ed72f[_0x93e9('0x19')][_0x93e9('0x1c')]||null:null})['then'](function(_0x5f58ab){logger['info'](_0x93e9('0x16'),_0x3ed72f);logger[_0x93e9('0xf')]('UpdateFaxApplication',_0x3ed72f,JSON['stringify'](_0x5f58ab));_0x2069b4(_0x5f58ab);})['catch'](function(_0x213933){logger[_0x93e9('0x12')](_0x93e9('0x16'),_0x213933[_0x93e9('0x13')],_0x3ed72f);_0x402bd3(_0x34bb6e[_0x93e9('0x12')](0x1f4,_0x213933[_0x93e9('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/faxApplication/index.js b/server/api/faxApplication/index.js
index f8a30aa..5ec142b 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 _0x3f8a=['index','/:id','show','post','create','put','update','delete','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxApplication.controller','get','isAuthenticated'];(function(_0x5a2f3a,_0x4de4f2){var _0xa430f=function(_0x385508){while(--_0x385508){_0x5a2f3a['push'](_0x5a2f3a['shift']());}};_0xa430f(++_0x4de4f2);}(_0x3f8a,0x1d5));var _0xa3f8=function(_0x50b9df,_0x56d241){_0x50b9df=_0x50b9df-0x0;var _0x4e511a=_0x3f8a[_0x50b9df];return _0x4e511a;};'use strict';var multer=require(_0xa3f8('0x0'));var util=require(_0xa3f8('0x1'));var path=require(_0xa3f8('0x2'));var timeout=require(_0xa3f8('0x3'));var express=require('express');var router=express[_0xa3f8('0x4')]();var auth=require(_0xa3f8('0x5'));var interaction=require(_0xa3f8('0x6'));var config=require(_0xa3f8('0x7'));var controller=require(_0xa3f8('0x8'));router[_0xa3f8('0x9')]('/',auth[_0xa3f8('0xa')](),controller[_0xa3f8('0xb')]);router[_0xa3f8('0x9')](_0xa3f8('0xc'),auth[_0xa3f8('0xa')](),controller[_0xa3f8('0xd')]);router[_0xa3f8('0xe')]('/',auth[_0xa3f8('0xa')](),controller[_0xa3f8('0xf')]);router[_0xa3f8('0x10')](_0xa3f8('0xc'),auth['isAuthenticated'](),controller[_0xa3f8('0x11')]);router[_0xa3f8('0x12')](_0xa3f8('0xc'),auth[_0xa3f8('0xa')](),controller['destroy']);module[_0xa3f8('0x13')]=router;
\ No newline at end of file
+var _0x33c5=['destroy','exports','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','put','update','delete'];(function(_0x4ea16b,_0x4aee83){var _0x42312e=function(_0xd6a8d2){while(--_0xd6a8d2){_0x4ea16b['push'](_0x4ea16b['shift']());}};_0x42312e(++_0x4aee83);}(_0x33c5,0xe6));var _0x533c=function(_0x4d4f61,_0x56d7a7){_0x4d4f61=_0x4d4f61-0x0;var _0x297414=_0x33c5[_0x4d4f61];return _0x297414;};'use strict';var multer=require('multer');var util=require(_0x533c('0x0'));var path=require(_0x533c('0x1'));var timeout=require('connect-timeout');var express=require(_0x533c('0x2'));var router=express[_0x533c('0x3')]();var auth=require(_0x533c('0x4'));var interaction=require(_0x533c('0x5'));var config=require(_0x533c('0x6'));var controller=require('./faxApplication.controller');router[_0x533c('0x7')]('/',auth[_0x533c('0x8')](),controller[_0x533c('0x9')]);router[_0x533c('0x7')](_0x533c('0xa'),auth[_0x533c('0x8')](),controller[_0x533c('0xb')]);router[_0x533c('0xc')]('/',auth[_0x533c('0x8')](),controller[_0x533c('0xd')]);router[_0x533c('0xe')](_0x533c('0xa'),auth[_0x533c('0x8')](),controller[_0x533c('0xf')]);router[_0x533c('0x10')](_0x533c('0xa'),auth['isAuthenticated'](),controller[_0x533c('0x11')]);module[_0x533c('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.attributes.js b/server/api/faxInteraction/faxInteraction.attributes.js
index 441f132..45dd568 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 _0xec46=['DATE','ENUM','out','sequelize','STRING'];(function(_0x3b9007,_0x482404){var _0xfe01e7=function(_0x199ebf){while(--_0x199ebf){_0x3b9007['push'](_0x3b9007['shift']());}};_0xfe01e7(++_0x482404);}(_0xec46,0x1c0));var _0x6ec4=function(_0xbd3a05,_0xe6c6b7){_0xbd3a05=_0xbd3a05-0x0;var _0x101f90=_0xec46[_0xbd3a05];return _0x101f90;};'use strict';var Sequelize=require(_0x6ec4('0x0'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x6ec4('0x1')]},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x6ec4('0x2')]},'fax':{'type':Sequelize[_0x6ec4('0x1')]},'firstMsgDirection':{'type':Sequelize[_0x6ec4('0x3')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x6ec4('0x2')]},'lastMsgDirection':{'type':Sequelize[_0x6ec4('0x3')]('in',_0x6ec4('0x4')),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
+var _0xe018=['sequelize','exports','BOOLEAN','DATE','STRING','out'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xe018,0x66));var _0x8e01=function(_0x844676,_0xabcc4e){_0x844676=_0x844676-0x0;var _0x14b776=_0xe018[_0x844676];return _0x14b776;};'use strict';var Sequelize=require(_0x8e01('0x0'));module[_0x8e01('0x1')]={'closed':{'type':Sequelize[_0x8e01('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x8e01('0x3')]},'disposition':{'type':Sequelize[_0x8e01('0x4')]},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize['DATE']},'fax':{'type':Sequelize[_0x8e01('0x4')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0x8e01('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x8e01('0x5')),'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 217f006..00181af 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 _0x1984=['forEach','Tags','push','index','FaxInteraction','rawAttributes','fieldName','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','field','from','select','u.id','u.fullname','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','fax_accounts','a.id\x20=\x20i.FaxAccountId','fax_messages','me.FaxInteractionId\x20=\x20i.id','fax_interaction_has_tags','it.FaxInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','parseSearch','conditions','length','unreadMessages','value','`\x20=\x200','having','`\x20>\x200','Contact','operator','$substring','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','find','type','text','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','buildExpression','body','compact','isEmpty','FaxAccountId','where','i.FaxAccountId\x20IN\x20?','concat','createdAt','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','\x20IS\x20NULL','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','isArray','tag','filter','replace','\x27\x27\x27\x27','i.fax\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','i.id','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','DESC','t.id\x20IN\x20?','resolve','i.FaxAccountId\x20IS\x20NOT\x20NULL','user','getFaxAccounts','i.FaxAccountId\x20IS\x20NULL','toString','count','sequelize','merge','a.key','Account.key','Account.mandatoryDisposition','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','GROUP_CONCAT(DISTINCT\x20t.id)','offset','groupBy','all','rows','show','params','includeAll','include','options','catch','create','destroy','describe','addMessage','FaxMessage','ids','omit','getMessages','findOne','FaxInteractionId','$gte','format','findAll','spread','color','emit','faxInteractionTags:save','removeTags','download','root','server','files','tmp','join','attachments','transcript-%d-%s.zip','Attachment','Messages','get','mkdirSync','basename','existsSync','createReadStream','pipe','createWriteStream','unlinkSync','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','mustache','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./faxInteraction.socket','register','status','end','limit','json','reject','save','update','then','sendStatus','error','stack','name','Users','map','fullname','TagIds','split'];(function(_0x3b3a82,_0x53b5e0){var _0x267063=function(_0x5aaf3d){while(--_0x5aaf3d){_0x3b3a82['push'](_0x3b3a82['shift']());}};_0x267063(++_0x53b5e0);}(_0x1984,0x182));var _0x4198=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x1984[_0x138adb];return _0x1b27f2;};'use strict';var pdf=require(_0x4198('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x4198('0x1'));var zipdir=require(_0x4198('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4198('0x3'));var moment=require(_0x4198('0x4'));var BPromise=require(_0x4198('0x5'));var Mustache=require(_0x4198('0x6'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x4198('0x7'));var ejs=require(_0x4198('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0x4198('0x9'));var crypto=require(_0x4198('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x4198('0xb'));var toCsv=require(_0x4198('0x7'));var querystring=require(_0x4198('0xc'));var Papa=require(_0x4198('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x4198('0xe'));var as=require(_0x4198('0xf'));var hardwareService=require(_0x4198('0x10'));var logger=require(_0x4198('0x11'))(_0x4198('0x12'));var utils=require(_0x4198('0x13'));var config=require(_0x4198('0x14'));var db=require(_0x4198('0x15'))['db'];config[_0x4198('0x16')]=_[_0x4198('0x17')](config[_0x4198('0x16')],{'host':_0x4198('0x18'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4198('0x16')]));require(_0x4198('0x19'))[_0x4198('0x1a')](socket);function respondWithStatusCode(_0x447a50,_0xf0ba68){_0xf0ba68=_0xf0ba68||0xcc;return function(_0x46e8f8){if(_0x46e8f8){return _0x447a50['sendStatus'](_0xf0ba68);}return _0x447a50[_0x4198('0x1b')](_0xf0ba68)[_0x4198('0x1c')]();};}function respondWithResult(_0xdd9075,_0x464d20){_0x464d20=_0x464d20||0xc8;return function(_0x4cbda0){if(_0x4cbda0){return _0xdd9075[_0x4198('0x1b')](_0x464d20)['json'](_0x4cbda0);}};}function respondWithFilteredResult(_0x39f3be,_0x54242c){return function(_0x7c5fb1){if(_0x7c5fb1){var _0x300a39=_0x7c5fb1['count'],_0x45a6d3=_0x54242c['offset'],_0x6887a7=_0x54242c['offset']+_0x54242c[_0x4198('0x1d')],_0x10b50f;if(_0x6887a7>=_0x300a39){_0x6887a7=_0x300a39;_0x10b50f=0xc8;}else{_0x10b50f=0xce;}_0x39f3be[_0x4198('0x1b')](_0x10b50f);return _0x39f3be['set']('Content-Range',_0x45a6d3+'-'+_0x6887a7+'/'+_0x300a39)[_0x4198('0x1e')](_0x7c5fb1);}return null;};}function patchUpdates(_0x4727d3){return function(_0x35d6fe){try{jsonpatch['apply'](_0x35d6fe,_0x4727d3,!![]);}catch(_0x3b8c17){return BPromise[_0x4198('0x1f')](_0x3b8c17);}return _0x35d6fe[_0x4198('0x20')]();};}function saveUpdates(_0x25f8d7,_0x175494){return function(_0x45918c){if(_0x45918c){return _0x45918c[_0x4198('0x21')](_0x25f8d7)['then'](function(_0x346585){return _0x346585;});}return null;};}function removeEntity(_0x155c76,_0x1ced31){return function(_0x543b11){if(_0x543b11){return _0x543b11['destroy']()[_0x4198('0x22')](function(){_0x155c76[_0x4198('0x1b')](0xcc)[_0x4198('0x1c')]();});}};}function handleEntityNotFound(_0x53a0b4,_0x3a6cd6){return function(_0x48abb5){if(!_0x48abb5){_0x53a0b4[_0x4198('0x23')](0x194);}return _0x48abb5;};}function handleError(_0x2cd408,_0x7e3bcc){_0x7e3bcc=_0x7e3bcc||0x1f4;return function(_0x46ff51){logger[_0x4198('0x24')](_0x46ff51[_0x4198('0x25')]);if(_0x46ff51[_0x4198('0x26')]){delete _0x46ff51[_0x4198('0x26')];}_0x2cd408[_0x4198('0x1b')](_0x7e3bcc)['send'](_0x46ff51);};}function getInteractionUsers(_0x1c19b4,_0x47bd1b){return new BPromise(function(_0x142026,_0x3d095a){try{if(_0x47bd1b[_0x1c19b4['id']]){_0x1c19b4[_0x4198('0x27')]=_[_0x4198('0x28')](_0x47bd1b[_0x1c19b4['id']],function(_0x15523b){return{'id':_0x15523b['id'],'fullname':_0x15523b[_0x4198('0x29')]};});}}catch(_0x2786ad){_0x3d095a(_0x2786ad);}_0x142026(_0x1c19b4);});}function getInteractionTags(_0x3079f5,_0x531b89){return new BPromise(function(_0x30844d,_0x391d30){try{if(_0x3079f5[_0x4198('0x2a')]){_0x3079f5['Tags']=[];_0x3079f5[_0x4198('0x2a')][_0x4198('0x2b')](',')[_0x4198('0x2c')](function(_0x46da63){_0x3079f5[_0x4198('0x2d')][_0x4198('0x2e')](_0x531b89[_0x46da63]);});}delete _0x3079f5['TagIds'];}catch(_0x2a0be2){_0x391d30(_0x2a0be2);}_0x30844d(_0x3079f5);});}function updateFaxInteraction(_0x222140,_0x385703,_0x439256){return new BPromise(function(_0x801d50,_0x4115a2){return getInteractionUsers(_0x222140,_0x439256)[_0x4198('0x22')](function(_0x4d744b){return getInteractionTags(_0x4d744b,_0x385703);})[_0x4198('0x22')](function(_0x353cdb){_0x801d50(_0x353cdb);})['catch'](function(_0x14b647){_0x4115a2(_0x14b647);});});}exports[_0x4198('0x2f')]=function(_0x495062,_0x14abb9){var _0x1dcd42={},_0x4ecf6c={},_0x459240={'count':0x0,'rows':[]};var _0x48eecc=_['map'](db[_0x4198('0x30')][_0x4198('0x31')],function(_0x449494){return{'name':_0x449494[_0x4198('0x32')],'type':_0x449494['type']['key']};});_0x4ecf6c[_0x4198('0x33')]=_[_0x4198('0x28')](_0x48eecc,'name');_0x4ecf6c['query']=_[_0x4198('0x34')](_0x495062[_0x4198('0x35')]);_0x4ecf6c[_0x4198('0x36')]=_[_0x4198('0x37')](_0x4ecf6c[_0x4198('0x33')],_0x4ecf6c[_0x4198('0x35')]);_0x1dcd42['attributes']=_[_0x4198('0x37')](_0x4ecf6c['model'],qs[_0x4198('0x38')](_0x495062[_0x4198('0x35')][_0x4198('0x38')]));_0x1dcd42[_0x4198('0x39')]=_0x1dcd42[_0x4198('0x39')]['length']?_0x1dcd42[_0x4198('0x39')]:_0x4ecf6c[_0x4198('0x33')];if(!_0x495062[_0x4198('0x35')][_0x4198('0x3a')](_0x4198('0x3b'))){_0x1dcd42[_0x4198('0x1d')]=qs[_0x4198('0x1d')](_0x495062[_0x4198('0x35')][_0x4198('0x1d')]);_0x1dcd42['offset']=qs['offset'](_0x495062[_0x4198('0x35')]['offset']);}_0x1dcd42[_0x4198('0x3c')]=qs['sort'](_0x495062[_0x4198('0x35')][_0x4198('0x3d')]);_0x1dcd42['where']=qs[_0x4198('0x36')](_[_0x4198('0x3e')](_0x495062[_0x4198('0x35')],_0x4ecf6c[_0x4198('0x36')]));var _0x2f8d20=[];var _0x317271=squel['select']()[_0x4198('0x3f')]('id')[_0x4198('0x3f')](_0x4198('0x26'))[_0x4198('0x3f')]('color')[_0x4198('0x40')]('tools_tags');var _0x5ddeef=squel[_0x4198('0x41')]()[_0x4198('0x3f')](_0x4198('0x42'))[_0x4198('0x3f')](_0x4198('0x43'))[_0x4198('0x3f')](_0x4198('0x44'))[_0x4198('0x40')](_0x4198('0x45'),'ui')[_0x4198('0x46')](_0x4198('0x47'),'u',_0x4198('0x48'));var _0x315a5f=squel[_0x4198('0x41')]()[_0x4198('0x40')](_0x4198('0x49'),'i')[_0x4198('0x46')](_0x4198('0x4a'),'c',_0x4198('0x4b'))[_0x4198('0x46')](_0x4198('0x47'),'o',_0x4198('0x4c'))['left_join'](_0x4198('0x4d'),'a',_0x4198('0x4e'))[_0x4198('0x46')](_0x4198('0x4f'),'me',_0x4198('0x50'))[_0x4198('0x46')](_0x4198('0x51'),'it',_0x4198('0x52'))[_0x4198('0x46')]('tools_tags','t',_0x4198('0x53'));var _0x29a20e=squel[_0x4198('0x54')]();var _0x2357d6=[];var _0x49f31e=squel[_0x4198('0x54')]();var _0x2f70f7;if(_0x495062['query'][_0x4198('0x55')]){_0x2f70f7=as[_0x4198('0x56')](_0x495062['query'][_0x4198('0x55')]);var _0x26814b=_0x2f70f7['sqlOperator'];for(var _0x542020=0x0;_0x542020<_0x2f70f7[_0x4198('0x57')][_0x4198('0x58')];_0x542020++){var _0x3b095d=_0x2f70f7[_0x4198('0x57')][_0x542020];var _0x425ec4='i';var _0x44bf09=_['find'](_0x48eecc,[_0x4198('0x26'),_0x3b095d[_0x4198('0x3f')]]);if(!_0x44bf09){switch(_0x3b095d['field']){case _0x4198('0x59'):if(_0x3b095d[_0x4198('0x5a')]==0x1){_0x315a5f['having']('`'+_0x3b095d[_0x4198('0x3f')]+_0x4198('0x5b'));}else{_0x315a5f[_0x4198('0x5c')]('`'+_0x3b095d[_0x4198('0x3f')]+_0x4198('0x5d'));}break;case _0x4198('0x5e'):if(_0x3b095d[_0x4198('0x5f')]===_0x4198('0x60')){if(_0x3b095d[_0x4198('0x5a')]['split']('\x20')[_0x4198('0x58')]>0x1){_0x29a20e[_0x26814b]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0x4198('0x61')](_0x3b095d[_0x4198('0x5a')]),null);}else{var _0x3218e3='%'+_0x3b095d['value']+'%';_0x29a20e[_0x26814b](_0x4198('0x62'),_0x3218e3,_0x3218e3,_0x3218e3);}}else{_0x44bf09=_[_0x4198('0x63')](_0x48eecc,['name','ContactId']);_0x3b095d[_0x4198('0x3f')]='ContactId';_0x2edced=as['buildExpression'](_0x425ec4,_0x44bf09[_0x4198('0x64')],_0x3b095d);_0x29a20e[_0x26814b](_0x2edced[_0x4198('0x65')],_0x2edced[_0x4198('0x5a')][_0x4198('0x66')],_0x2edced[_0x4198('0x5a')][_0x4198('0x1c')]);}break;case _0x4198('0x67'):var _0x3acc7f=_0x3b095d[_0x4198('0x5a')][_0x4198('0x2b')](',')['map'](function(_0x3cb98a){return Number(_0x3cb98a);});_0x3acc7f['forEach'](function(_0x2e3891){_0x49f31e['or'](_0x4198('0x68'),'%,'+_0x2e3891+',%');});_0x2357d6=_[_0x4198('0x69')](_0x2357d6,_0x3acc7f);break;case _0x4198('0x6a'):if(_0x3b095d['operator']===_0x4198('0x60')){_0x29a20e[_0x26814b](_0x4198('0x6b'),'%'+_0x3b095d[_0x4198('0x5a')]+'%',null);}else{_0x44bf09=_[_0x4198('0x63')](_0x48eecc,[_0x4198('0x26'),_0x4198('0x6c')]);_0x3b095d[_0x4198('0x3f')]=_0x4198('0x6c');_0x2edced=as[_0x4198('0x6d')](_0x425ec4,_0x44bf09[_0x4198('0x64')],_0x3b095d);_0x29a20e[_0x26814b](_0x2edced[_0x4198('0x65')],_0x2edced[_0x4198('0x5a')]['start'],_0x2edced[_0x4198('0x5a')][_0x4198('0x1c')]);}break;case _0x4198('0x6e'):_0x2edced=as[_0x4198('0x6d')]('me',null,_0x3b095d);_0x29a20e[_0x26814b](_0x2edced[_0x4198('0x65')],_0x2edced[_0x4198('0x5a')][_0x4198('0x66')],_0x2edced['value']['end']);break;}}else{var _0x2edced=as[_0x4198('0x6d')](_0x425ec4,_0x44bf09[_0x4198('0x64')],_0x3b095d);_0x29a20e[_0x26814b](_0x2edced[_0x4198('0x65')],_0x2edced['value'][_0x4198('0x66')],_0x2edced[_0x4198('0x5a')]['end']);}}}else{var _0x20ae39=_(_0x495062[_0x4198('0x35')])[_0x4198('0x34')]()[_0x4198('0x28')](function(_0x5281a7){return _['some'](_0x48eecc,[_0x4198('0x26'),_0x5281a7])?_0x5281a7:undefined;})[_0x4198('0x6f')]()[_0x4198('0x5a')]();if(!_[_0x4198('0x70')](_0x20ae39)){_0x20ae39['forEach'](function(_0x3762c5){if(_0x3762c5===_0x4198('0x71')){_0x315a5f[_0x4198('0x72')](_0x4198('0x73'),[][_0x4198('0x74')](_0x495062['query'][_0x3762c5]));}else if(_0x3762c5===_0x4198('0x75')){var _0x4501de=JSON[_0x4198('0x76')](_0x495062[_0x4198('0x35')][_0x3762c5])['$gte'];var _0x3fb494=JSON[_0x4198('0x76')](_0x495062[_0x4198('0x35')][_0x3762c5])[_0x4198('0x77')];_0x315a5f['where'](_0x4198('0x78'),_0x4501de,_0x3fb494);}else{if(_0x495062[_0x4198('0x35')][_0x3762c5]==='null'){_0x315a5f[_0x4198('0x72')]('i.'+_0x3762c5+_0x4198('0x79'));}else{_0x315a5f[_0x4198('0x72')]('i.'+_0x3762c5+_0x4198('0x7a'),_0x495062['query'][_0x3762c5]);}}});}if(_0x495062['query'][_0x4198('0x7b')]){if(_0x495062[_0x4198('0x35')][_0x4198('0x7b')]==0x1){_0x315a5f[_0x4198('0x5c')](_0x4198('0x7c'));}else{_0x315a5f[_0x4198('0x5c')](_0x4198('0x7d'));}}if(_0x495062[_0x4198('0x35')]['tag']){_0x2357d6=_[_0x4198('0x7e')](_0x495062[_0x4198('0x35')][_0x4198('0x7f')])?_0x495062[_0x4198('0x35')]['tag']:new Array(_0x495062[_0x4198('0x35')][_0x4198('0x7f')]);_0x2357d6[_0x4198('0x2c')](function(_0x12e86a){_0x49f31e['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x12e86a+',%');});}if(_0x495062[_0x4198('0x35')][_0x4198('0x80')]){var _0x44121f=_0x495062[_0x4198('0x35')]['filter'][_0x4198('0x81')]('\x5c','\x5c\x5c')['replace']('\x27\x27',_0x4198('0x82'));if(qs['isNumeric'](_0x44121f)){_0x29a20e['or']('i.id\x20LIKE\x20?',_0x44121f+'%')['or'](_0x4198('0x83'),_0x44121f+'%');}_0x29a20e['or'](_0x4198('0x84'),_0x44121f+'%');}}_0x315a5f['where'](_0x29a20e);_0x315a5f[_0x4198('0x85')](_0x4198('0x86'));var _0x3247f8={'type':db['Sequelize'][_0x4198('0x87')][_0x4198('0x88')],'raw':!![]};var _0x4d18d8=_0x315a5f[_0x4198('0x89')]();_0x4d18d8[_0x4198('0x3f')](_0x4198('0x86'));_0x4d18d8[_0x4198('0x3f')](_0x4198('0x8a'),_0x4198('0x59'));if(_0x1dcd42[_0x4198('0x3c')]){_0x1dcd42[_0x4198('0x3c')]['forEach'](function(_0x6adf13){_0x315a5f['order']('i.'+_0x6adf13[0x0],_0x6adf13[0x1]===_0x4198('0x8b')?![]:!![]);});}if(!_[_0x4198('0x70')](_0x2357d6)){_0x315a5f[_0x4198('0x5c')](_0x49f31e);_0x4d18d8[_0x4198('0x72')](_0x4198('0x8c'),_0x2357d6);}BPromise[_0x4198('0x8d')]()[_0x4198('0x22')](function(){if(!_0x2f70f7){if(_0x495062['query'][_0x4198('0x71')]||_0x495062[_0x4198('0x35')]['journey'])return;_0x4d18d8[_0x4198('0x72')]('i.FaxAccountId\x20IS\x20NOT\x20NULL');_0x315a5f[_0x4198('0x72')](_0x4198('0x8e'));return;}return _0x495062[_0x4198('0x8f')][_0x4198('0x90')]({'attributes':['id'],'raw':!![]})[_0x4198('0x22')](function(_0x136fb1){if(_[_0x4198('0x70')](_0x136fb1)){_0x4d18d8[_0x4198('0x72')](_0x4198('0x91'));_0x315a5f[_0x4198('0x72')](_0x4198('0x91'));}else{_0x4d18d8['where']('i.FaxAccountId\x20IN\x20?',_[_0x4198('0x28')](_0x136fb1,'id'));_0x315a5f[_0x4198('0x72')](_0x4198('0x73'),_[_0x4198('0x28')](_0x136fb1,'id'));}});})['then'](function(){db['sequelize'][_0x4198('0x35')](_0x4d18d8[_0x4198('0x92')](),_0x3247f8)[_0x4198('0x22')](function(_0x420329){_0x459240[_0x4198('0x93')]=_0x420329['length'];if(_0x459240[_0x4198('0x93')]===0x0)return[];return db[_0x4198('0x94')][_0x4198('0x35')](_0x317271[_0x4198('0x92')](),_0x3247f8)[_0x4198('0x22')](function(_0x4fd1a4){_0x2f8d20=_['keyBy'](_0x4fd1a4,'id');_0x3247f8=_[_0x4198('0x95')](_0x3247f8,{'model':db[_0x4198('0x30')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x495062['query'][_0x4198('0x38')]){_0x1dcd42['attributes'][_0x4198('0x2c')](function(_0x3558bf){_0x315a5f[_0x4198('0x3f')]('i.'+_0x3558bf);});}else{_0x315a5f['field'](_0x4198('0x8a'),'unreadMessages');_0x315a5f[_0x4198('0x3f')](_0x4198('0x96'),_0x4198('0x97'));_0x315a5f[_0x4198('0x3f')]('a.mandatoryDisposition',_0x4198('0x98'));_0x315a5f[_0x4198('0x3f')](_0x4198('0x99'));_0x315a5f[_0x4198('0x3f')](_0x4198('0x9a'),_0x4198('0x9b'));_0x315a5f['field'](_0x4198('0x9c'),_0x4198('0x9d'));_0x315a5f[_0x4198('0x3f')](_0x4198('0x9e'),_0x4198('0x9f'));_0x315a5f[_0x4198('0x3f')](_0x4198('0xa0'),_0x4198('0xa1'));_0x315a5f[_0x4198('0x3f')](_0x4198('0xa2'),_0x4198('0xa3'));_0x315a5f[_0x4198('0x3f')](_0x4198('0xa4'),_0x4198('0xa5'));_0x315a5f['field'](_0x4198('0xa6'),_0x4198('0xa7'));_0x315a5f['field']('o.internal','Owner.internal');_0x315a5f[_0x4198('0x3f')](_0x4198('0xa8'),_0x4198('0x2a'));}_0x315a5f[_0x4198('0x1d')](_0x1dcd42[_0x4198('0x1d')]);_0x315a5f[_0x4198('0xa9')](_0x1dcd42[_0x4198('0xa9')]);return db['sequelize']['query'](_0x315a5f[_0x4198('0x92')](),_0x3247f8);})[_0x4198('0x22')](function(_0x467667){_0x5ddeef[_0x4198('0x72')]('ui.FaxInteractionId\x20IN\x20?',_[_0x4198('0x28')](_0x467667,'id'));return db[_0x4198('0x94')][_0x4198('0x35')](_0x5ddeef['toString'](),_0x3247f8)['then'](function(_0x51c417){var _0x54aade=_[_0x4198('0xaa')](_0x51c417,'FaxInteractionId');var _0xa5a8b6=[];_0x467667['forEach'](function(_0x117c2c){_0xa5a8b6['push'](updateFaxInteraction(_0x117c2c,_0x2f8d20,_0x54aade));});return BPromise[_0x4198('0xab')](_0xa5a8b6);});});})[_0x4198('0x22')](function(_0x47cf71){_0x459240[_0x4198('0xac')]=_0x47cf71;return _0x459240;})[_0x4198('0x22')](respondWithFilteredResult(_0x14abb9,_0x1dcd42));})['catch'](handleError(_0x14abb9,null));};exports[_0x4198('0xad')]=function(_0x38f639,_0x320dd3){var _0x317124={'raw':![],'where':{'id':_0x38f639[_0x4198('0xae')]['id']}},_0x3946d0={};_0x3946d0[_0x4198('0x33')]=_[_0x4198('0x34')](db['FaxInteraction'][_0x4198('0x31')]);_0x3946d0[_0x4198('0x35')]=_[_0x4198('0x34')](_0x38f639[_0x4198('0x35')]);_0x3946d0['filters']=_[_0x4198('0x37')](_0x3946d0[_0x4198('0x33')],_0x3946d0[_0x4198('0x35')]);_0x317124[_0x4198('0x39')]=_[_0x4198('0x37')](_0x3946d0['model'],qs['fields'](_0x38f639[_0x4198('0x35')][_0x4198('0x38')]));_0x317124[_0x4198('0x39')]=_0x317124[_0x4198('0x39')][_0x4198('0x58')]?_0x317124[_0x4198('0x39')]:_0x3946d0[_0x4198('0x33')];if(_0x38f639[_0x4198('0x35')][_0x4198('0xaf')]){_0x317124[_0x4198('0xb0')]=[{'all':!![]}];}_0x317124=_['merge']({},_0x317124,_0x38f639[_0x4198('0xb1')]);return db['FaxInteraction'][_0x4198('0x63')](_0x317124)[_0x4198('0x22')](handleEntityNotFound(_0x320dd3,null))[_0x4198('0x22')](respondWithResult(_0x320dd3,null))[_0x4198('0xb2')](handleError(_0x320dd3,null));};exports[_0x4198('0xb3')]=function(_0x3b14d1,_0x224eba){return db['FaxInteraction'][_0x4198('0xb3')](_0x3b14d1[_0x4198('0x6e')],{})['then'](respondWithResult(_0x224eba,0xc9))[_0x4198('0xb2')](handleError(_0x224eba,null));};exports['update']=function(_0x2a9fb5,_0x5ce36c){if(_0x2a9fb5[_0x4198('0x6e')]['id']){delete _0x2a9fb5[_0x4198('0x6e')]['id'];}return db['FaxInteraction'][_0x4198('0x63')]({'where':{'id':_0x2a9fb5[_0x4198('0xae')]['id']}})[_0x4198('0x22')](handleEntityNotFound(_0x5ce36c,null))[_0x4198('0x22')](saveUpdates(_0x2a9fb5[_0x4198('0x6e')],null))[_0x4198('0x22')](respondWithResult(_0x5ce36c,null))[_0x4198('0xb2')](handleError(_0x5ce36c,null));};exports[_0x4198('0xb4')]=function(_0x282819,_0x5a2583){return db[_0x4198('0x30')]['find']({'where':{'id':_0x282819['params']['id']}})[_0x4198('0x22')](handleEntityNotFound(_0x5a2583,null))['then'](removeEntity(_0x5a2583,null))['catch'](handleError(_0x5a2583,null));};exports[_0x4198('0xb5')]=function(_0x551c0a,_0x481673){return db[_0x4198('0x30')][_0x4198('0xb5')]()[_0x4198('0x22')](respondWithResult(_0x481673,null))['catch'](handleError(_0x481673,null));};exports[_0x4198('0xb6')]=function(_0x573197,_0x3bbafa,_0x362c22){return db[_0x4198('0xb7')][_0x4198('0x63')]({'where':{'id':_0x573197[_0x4198('0xae')]['id']}})[_0x4198('0x22')](handleEntityNotFound(_0x3bbafa,null))['then'](function(_0x44827c){if(_0x44827c){return _0x44827c['addMessage'](_0x573197[_0x4198('0x6e')][_0x4198('0xb8')],_[_0x4198('0xb9')](_0x573197['body'],[_0x4198('0xb8'),'id'])||{});}})[_0x4198('0x22')](respondWithResult(_0x3bbafa,null))[_0x4198('0xb2')](handleError(_0x3bbafa,null));};exports[_0x4198('0xba')]=function(_0x174bcf,_0x1ea9ec,_0x23191f){var _0x3ee5cb={'raw':![],'where':{}};var _0x25860a={};var _0x95fd7a={'count':0x0,'rows':[]};return db['FaxInteraction'][_0x4198('0xbb')]({'where':{'id':_0x174bcf[_0x4198('0xae')]['id']}})[_0x4198('0x22')](handleEntityNotFound(_0x1ea9ec,null))[_0x4198('0x22')](function(_0x995397){if(_0x995397){_0x25860a['model']=_['keys'](db['FaxMessage'][_0x4198('0x31')]);_0x25860a['query']=_[_0x4198('0x34')](_0x174bcf['query']);_0x25860a['filters']=_[_0x4198('0x37')](_0x25860a[_0x4198('0x33')],_0x25860a['query']);_0x3ee5cb[_0x4198('0x39')]=_[_0x4198('0x37')](_0x25860a[_0x4198('0x33')],qs['fields'](_0x174bcf[_0x4198('0x35')][_0x4198('0x38')]));_0x3ee5cb['attributes']=_0x3ee5cb[_0x4198('0x39')]['length']?_0x3ee5cb['attributes']:_0x25860a[_0x4198('0x33')];if(!_0x174bcf[_0x4198('0x35')]['hasOwnProperty'](_0x4198('0x3b'))){_0x3ee5cb[_0x4198('0x1d')]=qs[_0x4198('0x1d')](_0x174bcf['query']['limit']);_0x3ee5cb[_0x4198('0xa9')]=qs[_0x4198('0xa9')](_0x174bcf['query']['offset']);}_0x3ee5cb[_0x4198('0x3c')]=qs[_0x4198('0x3d')](_0x174bcf[_0x4198('0x35')][_0x4198('0x3d')]);_0x3ee5cb[_0x4198('0x72')]=qs[_0x4198('0x36')](_[_0x4198('0x3e')](_0x174bcf[_0x4198('0x35')],_0x25860a['filters']));_0x3ee5cb[_0x4198('0x72')][_0x4198('0xbc')]=_0x995397['id'];if(_0x174bcf[_0x4198('0x35')][_0x4198('0x80')]){_0x3ee5cb['where']=_['merge'](_0x3ee5cb['where'],{'$or':_['map'](_0x3ee5cb[_0x4198('0x39')],function(_0x17bb80){var _0x22bc14={};_0x22bc14[_0x17bb80]={'$like':'%'+_0x174bcf[_0x4198('0x35')][_0x4198('0x80')]+'%'};return _0x22bc14;})});}if(_0x174bcf[_0x4198('0x35')]['$gte']){var _0x12cb08=_0x174bcf[_0x4198('0x35')][_0x4198('0xbd')][_0x4198('0x2b')](',');var _0x5308c3={};_0x5308c3[_0x12cb08[0x0]]={'$gte':moment(_0x12cb08[0x1])[_0x4198('0xbe')]('YYYY-MM-DD\x20HH:mm:ss')};_0x3ee5cb[_0x4198('0x72')]=_[_0x4198('0x95')](_0x3ee5cb['where'],_0x5308c3);}_0x3ee5cb=_[_0x4198('0x95')]({},_0x3ee5cb,_0x174bcf[_0x4198('0xb1')]);return db['FaxMessage'][_0x4198('0x93')]({'where':_0x3ee5cb[_0x4198('0x72')]})[_0x4198('0x22')](function(_0x56ac92){_0x95fd7a[_0x4198('0x93')]=_0x56ac92;if(_0x174bcf[_0x4198('0x35')][_0x4198('0xaf')]){_0x3ee5cb[_0x4198('0xb0')]=[{'all':!![]}];}return db['FaxMessage'][_0x4198('0xbf')](_0x3ee5cb);})[_0x4198('0x22')](function(_0x267526){_0x95fd7a[_0x4198('0xac')]=_0x267526;return _0x95fd7a;});}})['then'](respondWithFilteredResult(_0x1ea9ec,_0x3ee5cb))[_0x4198('0xb2')](handleError(_0x1ea9ec,null));};exports['addTags']=function(_0x2fcd03,_0x5e1b38,_0x1ca83e){return db[_0x4198('0x30')][_0x4198('0x63')]({'where':{'id':_0x2fcd03[_0x4198('0xae')]['id']}})[_0x4198('0x22')](handleEntityNotFound(_0x5e1b38,null))[_0x4198('0x22')](function(_0x7174ca){if(_0x7174ca){return _0x7174ca['setTags'](_0x2fcd03[_0x4198('0x6e')][_0x4198('0xb8')],_[_0x4198('0xb9')](_0x2fcd03[_0x4198('0x6e')],[_0x4198('0xb8'),'id'])||{})[_0x4198('0xc0')](function(){return db[_0x4198('0x67')][_0x4198('0xbf')]({'attributes':['id','name',_0x4198('0xc1')],'where':{'id':_0x2fcd03[_0x4198('0x6e')][_0x4198('0xb8')]}});})['then'](function(_0x424638){socket[_0x4198('0xc2')](_0x4198('0xc3'),{'id':Number(_0x2fcd03[_0x4198('0xae')]['id']),'tags':_0x424638||[]});return{'id':Number(_0x2fcd03[_0x4198('0xae')]['id']),'tags':_0x424638||[]};});}})['then'](respondWithResult(_0x5e1b38,null))['catch'](handleError(_0x5e1b38,null));};exports[_0x4198('0xc4')]=function(_0x332c2f,_0x15ae58,_0x22e4cb){return db[_0x4198('0x30')]['find']({'where':{'id':_0x332c2f[_0x4198('0xae')]['id']}})[_0x4198('0x22')](handleEntityNotFound(_0x15ae58,null))[_0x4198('0x22')](function(_0x457e2f){if(_0x457e2f){return _0x457e2f[_0x4198('0xc4')](_0x332c2f['query'][_0x4198('0xb8')]);}})[_0x4198('0x22')](respondWithStatusCode(_0x15ae58,null))[_0x4198('0xb2')](handleError(_0x15ae58,null));};exports[_0x4198('0xc5')]=function(_0x108c2c,_0x206f07){var _0x6b26f7=moment()['unix']()[_0x4198('0x92')]();var _0x260d5d=path['join'](config[_0x4198('0xc6')],_0x4198('0xc7'),_0x4198('0xc8'),_0x4198('0xc9'));var _0x461ec4=path[_0x4198('0xca')](config[_0x4198('0xc6')],'server','files',_0x4198('0xcb'));var _0x20756b=path[_0x4198('0xca')](_0x260d5d,_0x6b26f7);var _0x17267e=util[_0x4198('0xbe')](_0x4198('0xcc'),_0x108c2c['params']['id'],_0x6b26f7);var _0x28fba1=path[_0x4198('0xca')](_0x260d5d,_0x17267e);var _0x5b76d3=[];_0x5b76d3['push']({'model':db[_0x4198('0xcd')],'as':'Attachment','raw':!![]});var _0x9fbac=[{'model':db[_0x4198('0xb7')],'as':_0x4198('0xce'),'attributes':['id','body','createdAt'],'include':_0x5b76d3}];return db[_0x4198('0x30')][_0x4198('0x63')]({'where':{'id':_0x108c2c[_0x4198('0xae')]['id']},'include':_0x9fbac})[_0x4198('0x22')](handleEntityNotFound(_0x206f07,null))[_0x4198('0x22')](function(_0x39accf){if(_0x39accf&&_0x39accf[_0x4198('0xce')]){var _0x13fabe=_0x39accf[_0x4198('0xcf')]({'plain':!![]});fs[_0x4198('0xd0')](_0x20756b);for(var _0x548e6f=0x0;_0x548e6f<_0x13fabe['Messages']['length'];_0x548e6f++){var _0x19cfad=_0x13fabe[_0x4198('0xce')][_0x548e6f][_0x4198('0xcd')];if(_0x19cfad){var _0x1b97fe=path[_0x4198('0xca')](_0x461ec4,_0x19cfad[_0x4198('0xd1')]);if(fs[_0x4198('0xd2')](_0x1b97fe)){fs[_0x4198('0xd3')](_0x1b97fe)[_0x4198('0xd4')](fs[_0x4198('0xd5')](path[_0x4198('0xca')](_0x20756b,_0x19cfad[_0x4198('0xd1')])));}}}return BPromise[_0x4198('0x8d')]()[_0x4198('0x22')](function(){return new BPromise(function(_0x249b8d,_0x1d70d0){zipdir(_0x20756b,{'saveTo':_0x28fba1},function(_0x414c17,_0x14bb71){if(_0x414c17)return _0x1d70d0(_0x414c17);return _0x249b8d(_0x14bb71);});})['then'](function(){return new BPromise(function(_0x49c4fe,_0x37746d){rimraf(_0x20756b,function(_0xfc7723){if(_0xfc7723)_0x37746d(_0xfc7723);return _0x49c4fe();});});})[_0x4198('0x22')](function(){return _0x206f07[_0x4198('0xc5')](_0x28fba1,_0x17267e,function(_0x4ee507){if(_0x4ee507){console['log']('err',_0x4ee507);}else{fs[_0x4198('0xd6')](_0x28fba1);}});});});}else{return _0x206f07['sendStatus'](0xc8);}})[_0x4198('0xb2')](handleError(_0x206f07,null));};
\ No newline at end of file
+var _0xadc9=['isNumeric','i.id\x20LIKE\x20?','i.fax\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','i.id','Sequelize','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','DESC','resolve','i.FaxAccountId\x20IS\x20NOT\x20NULL','user','i.FaxAccountId\x20IS\x20NULL','sequelize','count','toString','keyBy','a.key','a.mandatoryDisposition','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','Contact.phone','c.mobile','Contact.mobile','Contact.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.FaxInteractionId\x20IN\x20?','FaxInteractionId','all','rows','show','includeAll','merge','options','find','create','params','destroy','describe','FaxMessage','addMessage','ids','omit','getMessages','findOne','nolimit','YYYY-MM-DD\x20HH:mm:ss','include','findAll','setTags','spread','color','emit','faxInteractionTags:save','removeTags','download','unix','join','root','server','files','attachments','format','transcript-%d-%s.zip','Attachment','Messages','createdAt','basename','existsSync','createReadStream','pipe','createWriteStream','log','err','unlinkSync','sendStatus','html-pdf','eml-format','rimraf','zip-dir','request-promise','mustache','util','path','sox','to-csv','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./faxInteraction.socket','status','json','limit','set','Content-Range','reject','save','update','then','end','stack','name','Users','map','fullname','Tags','split','forEach','push','TagIds','catch','FaxInteraction','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','offset','order','sort','where','pick','select','field','from','tools_tags','u.id','u.fullname','ui.FaxInteractionId','user_has_fax_interactions','left_join','u.id\x20=\x20ui.UserId','fax_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','users','o.id\x20=\x20i.UserId','a.id\x20=\x20i.FaxAccountId','fax_messages','me.FaxInteractionId\x20=\x20i.id','fax_interaction_has_tags','it.FaxInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','sqlOperator','conditions','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','Contact','operator','$substring','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','type','text','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','body','start','some','isEmpty','FaxAccountId','i.FaxAccountId\x20IN\x20?','concat','parse','$gte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','isArray','filter','replace'];(function(_0x1cafd7,_0x34e7e1){var _0x96f4d4=function(_0x4f9538){while(--_0x4f9538){_0x1cafd7['push'](_0x1cafd7['shift']());}};_0x96f4d4(++_0x34e7e1);}(_0xadc9,0x12a));var _0x9adc=function(_0x46e9f0,_0x41091a){_0x46e9f0=_0x46e9f0-0x0;var _0x115380=_0xadc9[_0x46e9f0];return _0x115380;};'use strict';var pdf=require(_0x9adc('0x0'));var emlformat=require(_0x9adc('0x1'));var rimraf=require(_0x9adc('0x2'));var zipdir=require(_0x9adc('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9adc('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x9adc('0x5'));var util=require(_0x9adc('0x6'));var path=require(_0x9adc('0x7'));var sox=require(_0x9adc('0x8'));var csv=require(_0x9adc('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x9adc('0xa'));var squel=require('squel');var crypto=require(_0x9adc('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x9adc('0x9'));var querystring=require(_0x9adc('0xc'));var Papa=require(_0x9adc('0xd'));var Redis=require(_0x9adc('0xe'));var authService=require(_0x9adc('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x9adc('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9adc('0x11'))('api');var utils=require(_0x9adc('0x12'));var config=require(_0x9adc('0x13'));var db=require(_0x9adc('0x14'))['db'];config[_0x9adc('0x15')]=_['defaults'](config[_0x9adc('0x15')],{'host':_0x9adc('0x16'),'port':0x18eb});var socket=require(_0x9adc('0x17'))(new Redis(config['redis']));require(_0x9adc('0x18'))['register'](socket);function respondWithStatusCode(_0x3072f8,_0x2a7225){_0x2a7225=_0x2a7225||0xcc;return function(_0x1264a7){if(_0x1264a7){return _0x3072f8['sendStatus'](_0x2a7225);}return _0x3072f8[_0x9adc('0x19')](_0x2a7225)['end']();};}function respondWithResult(_0x18b96c,_0xadf8c2){_0xadf8c2=_0xadf8c2||0xc8;return function(_0x556ff6){if(_0x556ff6){return _0x18b96c[_0x9adc('0x19')](_0xadf8c2)[_0x9adc('0x1a')](_0x556ff6);}};}function respondWithFilteredResult(_0x1e1056,_0xc21bca){return function(_0x41726e){if(_0x41726e){var _0x4e8747=_0x41726e['count'],_0x1ead12=_0xc21bca['offset'],_0x8ba066=_0xc21bca['offset']+_0xc21bca[_0x9adc('0x1b')],_0x50440a;if(_0x8ba066>=_0x4e8747){_0x8ba066=_0x4e8747;_0x50440a=0xc8;}else{_0x50440a=0xce;}_0x1e1056[_0x9adc('0x19')](_0x50440a);return _0x1e1056[_0x9adc('0x1c')](_0x9adc('0x1d'),_0x1ead12+'-'+_0x8ba066+'/'+_0x4e8747)['json'](_0x41726e);}return null;};}function patchUpdates(_0x31b5ae){return function(_0x35752a){try{jsonpatch['apply'](_0x35752a,_0x31b5ae,!![]);}catch(_0x1da797){return BPromise[_0x9adc('0x1e')](_0x1da797);}return _0x35752a[_0x9adc('0x1f')]();};}function saveUpdates(_0x49a04e,_0x406c0d){return function(_0x1f21bc){if(_0x1f21bc){return _0x1f21bc[_0x9adc('0x20')](_0x49a04e)[_0x9adc('0x21')](function(_0x164fff){return _0x164fff;});}return null;};}function removeEntity(_0x489217,_0x281aea){return function(_0x1912d3){if(_0x1912d3){return _0x1912d3['destroy']()[_0x9adc('0x21')](function(){_0x489217[_0x9adc('0x19')](0xcc)[_0x9adc('0x22')]();});}};}function handleEntityNotFound(_0x61885b,_0x69ba17){return function(_0x2831ee){if(!_0x2831ee){_0x61885b['sendStatus'](0x194);}return _0x2831ee;};}function handleError(_0x1e6779,_0xe9bb88){_0xe9bb88=_0xe9bb88||0x1f4;return function(_0x244a1d){logger['error'](_0x244a1d[_0x9adc('0x23')]);if(_0x244a1d[_0x9adc('0x24')]){delete _0x244a1d[_0x9adc('0x24')];}_0x1e6779[_0x9adc('0x19')](_0xe9bb88)['send'](_0x244a1d);};}function getInteractionUsers(_0xeb5f13,_0x470744){return new BPromise(function(_0x3e72cf,_0x43b5f2){try{if(_0x470744[_0xeb5f13['id']]){_0xeb5f13[_0x9adc('0x25')]=_[_0x9adc('0x26')](_0x470744[_0xeb5f13['id']],function(_0x13c512){return{'id':_0x13c512['id'],'fullname':_0x13c512[_0x9adc('0x27')]};});}}catch(_0x22db36){_0x43b5f2(_0x22db36);}_0x3e72cf(_0xeb5f13);});}function getInteractionTags(_0x1ceb4f,_0x57789e){return new BPromise(function(_0x43d2d6,_0x479352){try{if(_0x1ceb4f['TagIds']){_0x1ceb4f[_0x9adc('0x28')]=[];_0x1ceb4f['TagIds'][_0x9adc('0x29')](',')[_0x9adc('0x2a')](function(_0x286258){_0x1ceb4f[_0x9adc('0x28')][_0x9adc('0x2b')](_0x57789e[_0x286258]);});}delete _0x1ceb4f[_0x9adc('0x2c')];}catch(_0x1ad660){_0x479352(_0x1ad660);}_0x43d2d6(_0x1ceb4f);});}function updateFaxInteraction(_0x4095c5,_0x91df8f,_0x5ccd90){return new BPromise(function(_0x34d0f3,_0x28fa8d){return getInteractionUsers(_0x4095c5,_0x5ccd90)[_0x9adc('0x21')](function(_0x1efbaf){return getInteractionTags(_0x1efbaf,_0x91df8f);})['then'](function(_0x398d18){_0x34d0f3(_0x398d18);})[_0x9adc('0x2d')](function(_0x5dd079){_0x28fa8d(_0x5dd079);});});}exports['index']=function(_0x39894d,_0x27d906){var _0x52a7ac={},_0x39cd96={},_0x20c568={'count':0x0,'rows':[]};var _0x3f41bb=_[_0x9adc('0x26')](db[_0x9adc('0x2e')][_0x9adc('0x2f')],function(_0x12d67f){return{'name':_0x12d67f['fieldName'],'type':_0x12d67f['type'][_0x9adc('0x30')]};});_0x39cd96[_0x9adc('0x31')]=_[_0x9adc('0x26')](_0x3f41bb,_0x9adc('0x24'));_0x39cd96[_0x9adc('0x32')]=_[_0x9adc('0x33')](_0x39894d[_0x9adc('0x32')]);_0x39cd96[_0x9adc('0x34')]=_[_0x9adc('0x35')](_0x39cd96[_0x9adc('0x31')],_0x39cd96['query']);_0x52a7ac[_0x9adc('0x36')]=_[_0x9adc('0x35')](_0x39cd96[_0x9adc('0x31')],qs[_0x9adc('0x37')](_0x39894d[_0x9adc('0x32')][_0x9adc('0x37')]));_0x52a7ac['attributes']=_0x52a7ac[_0x9adc('0x36')][_0x9adc('0x38')]?_0x52a7ac['attributes']:_0x39cd96[_0x9adc('0x31')];if(!_0x39894d[_0x9adc('0x32')][_0x9adc('0x39')]('nolimit')){_0x52a7ac[_0x9adc('0x1b')]=qs[_0x9adc('0x1b')](_0x39894d[_0x9adc('0x32')]['limit']);_0x52a7ac[_0x9adc('0x3a')]=qs[_0x9adc('0x3a')](_0x39894d[_0x9adc('0x32')][_0x9adc('0x3a')]);}_0x52a7ac[_0x9adc('0x3b')]=qs[_0x9adc('0x3c')](_0x39894d[_0x9adc('0x32')]['sort']);_0x52a7ac[_0x9adc('0x3d')]=qs[_0x9adc('0x34')](_[_0x9adc('0x3e')](_0x39894d[_0x9adc('0x32')],_0x39cd96[_0x9adc('0x34')]));var _0x41c892=[];var _0x5ed810=squel[_0x9adc('0x3f')]()['field']('id')[_0x9adc('0x40')](_0x9adc('0x24'))['field']('color')[_0x9adc('0x41')](_0x9adc('0x42'));var _0x12af87=squel[_0x9adc('0x3f')]()[_0x9adc('0x40')](_0x9adc('0x43'))[_0x9adc('0x40')](_0x9adc('0x44'))[_0x9adc('0x40')](_0x9adc('0x45'))[_0x9adc('0x41')](_0x9adc('0x46'),'ui')[_0x9adc('0x47')]('users','u',_0x9adc('0x48'));var _0x116428=squel[_0x9adc('0x3f')]()[_0x9adc('0x41')](_0x9adc('0x49'),'i')[_0x9adc('0x47')](_0x9adc('0x4a'),'c',_0x9adc('0x4b'))['left_join'](_0x9adc('0x4c'),'o',_0x9adc('0x4d'))[_0x9adc('0x47')]('fax_accounts','a',_0x9adc('0x4e'))['left_join'](_0x9adc('0x4f'),'me',_0x9adc('0x50'))[_0x9adc('0x47')](_0x9adc('0x51'),'it',_0x9adc('0x52'))[_0x9adc('0x47')](_0x9adc('0x42'),'t',_0x9adc('0x53'));var _0xc0d9a=squel['expr']();var _0x14f7f5=[];var _0x49de8b=squel[_0x9adc('0x54')]();var _0x3f7f6e;if(_0x39894d[_0x9adc('0x32')][_0x9adc('0x55')]){_0x3f7f6e=as['parseSearch'](_0x39894d[_0x9adc('0x32')][_0x9adc('0x55')]);var _0x35824a=_0x3f7f6e[_0x9adc('0x56')];for(var _0x4f7fde=0x0;_0x4f7fde<_0x3f7f6e[_0x9adc('0x57')][_0x9adc('0x38')];_0x4f7fde++){var _0x5580f6=_0x3f7f6e[_0x9adc('0x57')][_0x4f7fde];var _0x44375b='i';var _0x38229b=_['find'](_0x3f41bb,[_0x9adc('0x24'),_0x5580f6[_0x9adc('0x40')]]);if(!_0x38229b){switch(_0x5580f6[_0x9adc('0x40')]){case _0x9adc('0x58'):if(_0x5580f6[_0x9adc('0x59')]==0x1){_0x116428[_0x9adc('0x5a')]('`'+_0x5580f6[_0x9adc('0x40')]+_0x9adc('0x5b'));}else{_0x116428[_0x9adc('0x5a')]('`'+_0x5580f6[_0x9adc('0x40')]+_0x9adc('0x5c'));}break;case _0x9adc('0x5d'):if(_0x5580f6[_0x9adc('0x5e')]===_0x9adc('0x5f')){if(_0x5580f6['value'][_0x9adc('0x29')]('\x20')['length']>0x1){_0xc0d9a[_0x35824a](_0x9adc('0x60'),qs[_0x9adc('0x61')](_0x5580f6['value']),null);}else{var _0x2646d9='%'+_0x5580f6[_0x9adc('0x59')]+'%';_0xc0d9a[_0x35824a](_0x9adc('0x62'),_0x2646d9,_0x2646d9,_0x2646d9);}}else{_0x38229b=_['find'](_0x3f41bb,['name','ContactId']);_0x5580f6['field']=_0x9adc('0x63');_0x46100f=as[_0x9adc('0x64')](_0x44375b,_0x38229b[_0x9adc('0x65')],_0x5580f6);_0xc0d9a[_0x35824a](_0x46100f[_0x9adc('0x66')],_0x46100f[_0x9adc('0x59')]['start'],_0x46100f[_0x9adc('0x59')][_0x9adc('0x22')]);}break;case _0x9adc('0x67'):var _0x3f7bdc=_0x5580f6[_0x9adc('0x59')]['split'](',')[_0x9adc('0x26')](function(_0x2e5aee){return Number(_0x2e5aee);});_0x3f7bdc['forEach'](function(_0x1d4957){_0x49de8b['or'](_0x9adc('0x68'),'%,'+_0x1d4957+',%');});_0x14f7f5=_[_0x9adc('0x69')](_0x14f7f5,_0x3f7bdc);break;case _0x9adc('0x6a'):if(_0x5580f6[_0x9adc('0x5e')]==='$substring'){_0xc0d9a[_0x35824a]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x5580f6[_0x9adc('0x59')]+'%',null);}else{_0x38229b=_['find'](_0x3f41bb,['name','UserId']);_0x5580f6['field']='UserId';_0x46100f=as[_0x9adc('0x64')](_0x44375b,_0x38229b[_0x9adc('0x65')],_0x5580f6);_0xc0d9a[_0x35824a](_0x46100f[_0x9adc('0x66')],_0x46100f[_0x9adc('0x59')]['start'],_0x46100f[_0x9adc('0x59')][_0x9adc('0x22')]);}break;case _0x9adc('0x6b'):_0x46100f=as['buildExpression']('me',null,_0x5580f6);_0xc0d9a[_0x35824a](_0x46100f[_0x9adc('0x66')],_0x46100f[_0x9adc('0x59')]['start'],_0x46100f[_0x9adc('0x59')]['end']);break;}}else{var _0x46100f=as['buildExpression'](_0x44375b,_0x38229b[_0x9adc('0x65')],_0x5580f6);_0xc0d9a[_0x35824a](_0x46100f[_0x9adc('0x66')],_0x46100f[_0x9adc('0x59')][_0x9adc('0x6c')],_0x46100f[_0x9adc('0x59')]['end']);}}}else{var _0x241cde=_(_0x39894d[_0x9adc('0x32')])[_0x9adc('0x33')]()[_0x9adc('0x26')](function(_0x5a563c){return _[_0x9adc('0x6d')](_0x3f41bb,[_0x9adc('0x24'),_0x5a563c])?_0x5a563c:undefined;})['compact']()[_0x9adc('0x59')]();if(!_[_0x9adc('0x6e')](_0x241cde)){_0x241cde[_0x9adc('0x2a')](function(_0x47fd75){if(_0x47fd75===_0x9adc('0x6f')){_0x116428[_0x9adc('0x3d')](_0x9adc('0x70'),[][_0x9adc('0x71')](_0x39894d['query'][_0x47fd75]));}else if(_0x47fd75==='createdAt'){var _0x2c0845=JSON[_0x9adc('0x72')](_0x39894d[_0x9adc('0x32')][_0x47fd75])[_0x9adc('0x73')];var _0x2aa754=JSON[_0x9adc('0x72')](_0x39894d[_0x9adc('0x32')][_0x47fd75])['$lte'];_0x116428['where'](_0x9adc('0x74'),_0x2c0845,_0x2aa754);}else{if(_0x39894d[_0x9adc('0x32')][_0x47fd75]===_0x9adc('0x75')){_0x116428[_0x9adc('0x3d')]('i.'+_0x47fd75+_0x9adc('0x76'));}else{_0x116428[_0x9adc('0x3d')]('i.'+_0x47fd75+'\x20=\x20?',_0x39894d[_0x9adc('0x32')][_0x47fd75]);}}});}if(_0x39894d[_0x9adc('0x32')][_0x9adc('0x77')]){if(_0x39894d[_0x9adc('0x32')][_0x9adc('0x77')]==0x1){_0x116428[_0x9adc('0x5a')](_0x9adc('0x78'));}else{_0x116428[_0x9adc('0x5a')](_0x9adc('0x79'));}}if(_0x39894d[_0x9adc('0x32')][_0x9adc('0x7a')]){_0x14f7f5=_[_0x9adc('0x7b')](_0x39894d[_0x9adc('0x32')]['tag'])?_0x39894d[_0x9adc('0x32')][_0x9adc('0x7a')]:new Array(_0x39894d[_0x9adc('0x32')][_0x9adc('0x7a')]);_0x14f7f5['forEach'](function(_0x278736){_0x49de8b['or'](_0x9adc('0x68'),'%,'+_0x278736+',%');});}if(_0x39894d[_0x9adc('0x32')][_0x9adc('0x7c')]){var _0x9c206=_0x39894d[_0x9adc('0x32')][_0x9adc('0x7c')]['replace']('\x5c','\x5c\x5c')[_0x9adc('0x7d')]('\x27\x27','\x27\x27\x27\x27');if(qs[_0x9adc('0x7e')](_0x9c206)){_0xc0d9a['or'](_0x9adc('0x7f'),_0x9c206+'%')['or'](_0x9adc('0x80'),_0x9c206+'%');}_0xc0d9a['or'](_0x9adc('0x81'),_0x9c206+'%');}}_0x116428[_0x9adc('0x3d')](_0xc0d9a);_0x116428[_0x9adc('0x82')](_0x9adc('0x83'));var _0x97aa21={'type':db[_0x9adc('0x84')][_0x9adc('0x85')][_0x9adc('0x86')],'raw':!![]};var _0x17b59b=_0x116428[_0x9adc('0x87')]();_0x17b59b[_0x9adc('0x40')](_0x9adc('0x83'));_0x17b59b[_0x9adc('0x40')](_0x9adc('0x88'),'unreadMessages');if(_0x52a7ac[_0x9adc('0x3b')]){_0x52a7ac[_0x9adc('0x3b')][_0x9adc('0x2a')](function(_0x7f8da4){_0x116428[_0x9adc('0x3b')]('i.'+_0x7f8da4[0x0],_0x7f8da4[0x1]===_0x9adc('0x89')?![]:!![]);});}if(!_['isEmpty'](_0x14f7f5)){_0x116428[_0x9adc('0x5a')](_0x49de8b);_0x17b59b[_0x9adc('0x3d')]('t.id\x20IN\x20?',_0x14f7f5);}BPromise[_0x9adc('0x8a')]()[_0x9adc('0x21')](function(){if(!_0x3f7f6e){if(_0x39894d[_0x9adc('0x32')][_0x9adc('0x6f')]||_0x39894d[_0x9adc('0x32')]['journey'])return;_0x17b59b['where'](_0x9adc('0x8b'));_0x116428[_0x9adc('0x3d')]('i.FaxAccountId\x20IS\x20NOT\x20NULL');return;}return _0x39894d[_0x9adc('0x8c')]['getFaxAccounts']({'attributes':['id'],'raw':!![]})[_0x9adc('0x21')](function(_0x140d26){if(_[_0x9adc('0x6e')](_0x140d26)){_0x17b59b[_0x9adc('0x3d')](_0x9adc('0x8d'));_0x116428[_0x9adc('0x3d')](_0x9adc('0x8d'));}else{_0x17b59b[_0x9adc('0x3d')](_0x9adc('0x70'),_[_0x9adc('0x26')](_0x140d26,'id'));_0x116428[_0x9adc('0x3d')](_0x9adc('0x70'),_['map'](_0x140d26,'id'));}});})[_0x9adc('0x21')](function(){db[_0x9adc('0x8e')][_0x9adc('0x32')](_0x17b59b['toString'](),_0x97aa21)['then'](function(_0x1981f0){_0x20c568[_0x9adc('0x8f')]=_0x1981f0[_0x9adc('0x38')];if(_0x20c568[_0x9adc('0x8f')]===0x0)return[];return db[_0x9adc('0x8e')][_0x9adc('0x32')](_0x5ed810[_0x9adc('0x90')](),_0x97aa21)['then'](function(_0x2f3520){_0x41c892=_[_0x9adc('0x91')](_0x2f3520,'id');_0x97aa21=_['merge'](_0x97aa21,{'model':db[_0x9adc('0x2e')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x39894d[_0x9adc('0x32')]['fields']){_0x52a7ac[_0x9adc('0x36')][_0x9adc('0x2a')](function(_0x29a192){_0x116428[_0x9adc('0x40')]('i.'+_0x29a192);});}else{_0x116428['field']('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x9adc('0x58'));_0x116428[_0x9adc('0x40')](_0x9adc('0x92'),'Account.key');_0x116428['field'](_0x9adc('0x93'),'Account.mandatoryDisposition');_0x116428['field'](_0x9adc('0x94'));_0x116428[_0x9adc('0x40')](_0x9adc('0x95'),_0x9adc('0x96'));_0x116428['field'](_0x9adc('0x97'),_0x9adc('0x98'));_0x116428[_0x9adc('0x40')]('c.email','Contact.email');_0x116428['field']('c.phone',_0x9adc('0x99'));_0x116428['field'](_0x9adc('0x9a'),_0x9adc('0x9b'));_0x116428['field']('c.fax',_0x9adc('0x9c'));_0x116428[_0x9adc('0x40')](_0x9adc('0x9d'),_0x9adc('0x9e'));_0x116428[_0x9adc('0x40')](_0x9adc('0x9f'),_0x9adc('0xa0'));_0x116428[_0x9adc('0x40')](_0x9adc('0xa1'),_0x9adc('0x2c'));}_0x116428['limit'](_0x52a7ac[_0x9adc('0x1b')]);_0x116428[_0x9adc('0x3a')](_0x52a7ac['offset']);return db[_0x9adc('0x8e')][_0x9adc('0x32')](_0x116428[_0x9adc('0x90')](),_0x97aa21);})[_0x9adc('0x21')](function(_0x35d6bc){_0x12af87[_0x9adc('0x3d')](_0x9adc('0xa2'),_[_0x9adc('0x26')](_0x35d6bc,'id'));return db[_0x9adc('0x8e')][_0x9adc('0x32')](_0x12af87[_0x9adc('0x90')](),_0x97aa21)[_0x9adc('0x21')](function(_0xc2f6a1){var _0x564f4c=_['groupBy'](_0xc2f6a1,_0x9adc('0xa3'));var _0x211c24=[];_0x35d6bc[_0x9adc('0x2a')](function(_0x338bd7){_0x211c24[_0x9adc('0x2b')](updateFaxInteraction(_0x338bd7,_0x41c892,_0x564f4c));});return BPromise[_0x9adc('0xa4')](_0x211c24);});});})[_0x9adc('0x21')](function(_0x1da4d4){_0x20c568[_0x9adc('0xa5')]=_0x1da4d4;return _0x20c568;})[_0x9adc('0x21')](respondWithFilteredResult(_0x27d906,_0x52a7ac));})[_0x9adc('0x2d')](handleError(_0x27d906,null));};exports[_0x9adc('0xa6')]=function(_0x11b488,_0x5c1531){var _0x148da8={'raw':![],'where':{'id':_0x11b488['params']['id']}},_0x4ac6b1={};_0x4ac6b1['model']=_[_0x9adc('0x33')](db['FaxInteraction'][_0x9adc('0x2f')]);_0x4ac6b1[_0x9adc('0x32')]=_['keys'](_0x11b488[_0x9adc('0x32')]);_0x4ac6b1[_0x9adc('0x34')]=_['intersection'](_0x4ac6b1['model'],_0x4ac6b1[_0x9adc('0x32')]);_0x148da8['attributes']=_[_0x9adc('0x35')](_0x4ac6b1[_0x9adc('0x31')],qs[_0x9adc('0x37')](_0x11b488[_0x9adc('0x32')][_0x9adc('0x37')]));_0x148da8[_0x9adc('0x36')]=_0x148da8[_0x9adc('0x36')][_0x9adc('0x38')]?_0x148da8[_0x9adc('0x36')]:_0x4ac6b1[_0x9adc('0x31')];if(_0x11b488[_0x9adc('0x32')][_0x9adc('0xa7')]){_0x148da8['include']=[{'all':!![]}];}_0x148da8=_[_0x9adc('0xa8')]({},_0x148da8,_0x11b488[_0x9adc('0xa9')]);return db['FaxInteraction'][_0x9adc('0xaa')](_0x148da8)[_0x9adc('0x21')](handleEntityNotFound(_0x5c1531,null))[_0x9adc('0x21')](respondWithResult(_0x5c1531,null))[_0x9adc('0x2d')](handleError(_0x5c1531,null));};exports[_0x9adc('0xab')]=function(_0x40fa15,_0x338e03){return db['FaxInteraction'][_0x9adc('0xab')](_0x40fa15['body'],{})[_0x9adc('0x21')](respondWithResult(_0x338e03,0xc9))[_0x9adc('0x2d')](handleError(_0x338e03,null));};exports[_0x9adc('0x20')]=function(_0x4f01e3,_0x5d4186){if(_0x4f01e3['body']['id']){delete _0x4f01e3[_0x9adc('0x6b')]['id'];}return db[_0x9adc('0x2e')][_0x9adc('0xaa')]({'where':{'id':_0x4f01e3[_0x9adc('0xac')]['id']}})[_0x9adc('0x21')](handleEntityNotFound(_0x5d4186,null))[_0x9adc('0x21')](saveUpdates(_0x4f01e3['body'],null))[_0x9adc('0x21')](respondWithResult(_0x5d4186,null))['catch'](handleError(_0x5d4186,null));};exports[_0x9adc('0xad')]=function(_0x475b02,_0x35b511){return db[_0x9adc('0x2e')]['find']({'where':{'id':_0x475b02[_0x9adc('0xac')]['id']}})['then'](handleEntityNotFound(_0x35b511,null))[_0x9adc('0x21')](removeEntity(_0x35b511,null))[_0x9adc('0x2d')](handleError(_0x35b511,null));};exports['describe']=function(_0x339adc,_0x35db4a){return db[_0x9adc('0x2e')][_0x9adc('0xae')]()['then'](respondWithResult(_0x35db4a,null))[_0x9adc('0x2d')](handleError(_0x35db4a,null));};exports['addMessage']=function(_0x2cbcf2,_0x1fbfc2,_0xe63f8a){return db[_0x9adc('0xaf')][_0x9adc('0xaa')]({'where':{'id':_0x2cbcf2[_0x9adc('0xac')]['id']}})['then'](handleEntityNotFound(_0x1fbfc2,null))[_0x9adc('0x21')](function(_0x4dd088){if(_0x4dd088){return _0x4dd088[_0x9adc('0xb0')](_0x2cbcf2['body'][_0x9adc('0xb1')],_[_0x9adc('0xb2')](_0x2cbcf2[_0x9adc('0x6b')],[_0x9adc('0xb1'),'id'])||{});}})[_0x9adc('0x21')](respondWithResult(_0x1fbfc2,null))[_0x9adc('0x2d')](handleError(_0x1fbfc2,null));};exports[_0x9adc('0xb3')]=function(_0x5f57ec,_0x2e6372,_0x3cd521){var _0x20e511={'raw':![],'where':{}};var _0x32fc82={};var _0xc6a2bc={'count':0x0,'rows':[]};return db[_0x9adc('0x2e')][_0x9adc('0xb4')]({'where':{'id':_0x5f57ec['params']['id']}})[_0x9adc('0x21')](handleEntityNotFound(_0x2e6372,null))[_0x9adc('0x21')](function(_0x1a3a3d){if(_0x1a3a3d){_0x32fc82['model']=_[_0x9adc('0x33')](db['FaxMessage']['rawAttributes']);_0x32fc82[_0x9adc('0x32')]=_['keys'](_0x5f57ec[_0x9adc('0x32')]);_0x32fc82[_0x9adc('0x34')]=_[_0x9adc('0x35')](_0x32fc82[_0x9adc('0x31')],_0x32fc82[_0x9adc('0x32')]);_0x20e511[_0x9adc('0x36')]=_[_0x9adc('0x35')](_0x32fc82[_0x9adc('0x31')],qs[_0x9adc('0x37')](_0x5f57ec[_0x9adc('0x32')][_0x9adc('0x37')]));_0x20e511['attributes']=_0x20e511[_0x9adc('0x36')][_0x9adc('0x38')]?_0x20e511[_0x9adc('0x36')]:_0x32fc82[_0x9adc('0x31')];if(!_0x5f57ec[_0x9adc('0x32')][_0x9adc('0x39')](_0x9adc('0xb5'))){_0x20e511[_0x9adc('0x1b')]=qs[_0x9adc('0x1b')](_0x5f57ec[_0x9adc('0x32')][_0x9adc('0x1b')]);_0x20e511[_0x9adc('0x3a')]=qs[_0x9adc('0x3a')](_0x5f57ec['query']['offset']);}_0x20e511[_0x9adc('0x3b')]=qs[_0x9adc('0x3c')](_0x5f57ec[_0x9adc('0x32')][_0x9adc('0x3c')]);_0x20e511[_0x9adc('0x3d')]=qs['filters'](_['pick'](_0x5f57ec[_0x9adc('0x32')],_0x32fc82[_0x9adc('0x34')]));_0x20e511[_0x9adc('0x3d')][_0x9adc('0xa3')]=_0x1a3a3d['id'];if(_0x5f57ec[_0x9adc('0x32')]['filter']){_0x20e511[_0x9adc('0x3d')]=_['merge'](_0x20e511['where'],{'$or':_[_0x9adc('0x26')](_0x20e511[_0x9adc('0x36')],function(_0x4fe018){var _0x50d8ef={};_0x50d8ef[_0x4fe018]={'$like':'%'+_0x5f57ec[_0x9adc('0x32')][_0x9adc('0x7c')]+'%'};return _0x50d8ef;})});}if(_0x5f57ec[_0x9adc('0x32')][_0x9adc('0x73')]){var _0x5312b0=_0x5f57ec[_0x9adc('0x32')]['$gte'][_0x9adc('0x29')](',');var _0x5a3ea2={};_0x5a3ea2[_0x5312b0[0x0]]={'$gte':moment(_0x5312b0[0x1])['format'](_0x9adc('0xb6'))};_0x20e511[_0x9adc('0x3d')]=_[_0x9adc('0xa8')](_0x20e511['where'],_0x5a3ea2);}_0x20e511=_[_0x9adc('0xa8')]({},_0x20e511,_0x5f57ec[_0x9adc('0xa9')]);return db[_0x9adc('0xaf')][_0x9adc('0x8f')]({'where':_0x20e511[_0x9adc('0x3d')]})['then'](function(_0x26b5eb){_0xc6a2bc[_0x9adc('0x8f')]=_0x26b5eb;if(_0x5f57ec[_0x9adc('0x32')][_0x9adc('0xa7')]){_0x20e511[_0x9adc('0xb7')]=[{'all':!![]}];}return db[_0x9adc('0xaf')][_0x9adc('0xb8')](_0x20e511);})[_0x9adc('0x21')](function(_0x5db283){_0xc6a2bc[_0x9adc('0xa5')]=_0x5db283;return _0xc6a2bc;});}})['then'](respondWithFilteredResult(_0x2e6372,_0x20e511))['catch'](handleError(_0x2e6372,null));};exports['addTags']=function(_0x4680f6,_0x492762,_0x4a463e){return db[_0x9adc('0x2e')][_0x9adc('0xaa')]({'where':{'id':_0x4680f6[_0x9adc('0xac')]['id']}})[_0x9adc('0x21')](handleEntityNotFound(_0x492762,null))[_0x9adc('0x21')](function(_0x21e007){if(_0x21e007){return _0x21e007[_0x9adc('0xb9')](_0x4680f6[_0x9adc('0x6b')][_0x9adc('0xb1')],_[_0x9adc('0xb2')](_0x4680f6['body'],[_0x9adc('0xb1'),'id'])||{})[_0x9adc('0xba')](function(){return db['Tag']['findAll']({'attributes':['id',_0x9adc('0x24'),_0x9adc('0xbb')],'where':{'id':_0x4680f6[_0x9adc('0x6b')]['ids']}});})[_0x9adc('0x21')](function(_0x349865){socket[_0x9adc('0xbc')](_0x9adc('0xbd'),{'id':Number(_0x4680f6['params']['id']),'tags':_0x349865||[]});return{'id':Number(_0x4680f6[_0x9adc('0xac')]['id']),'tags':_0x349865||[]};});}})['then'](respondWithResult(_0x492762,null))[_0x9adc('0x2d')](handleError(_0x492762,null));};exports[_0x9adc('0xbe')]=function(_0x14735a,_0x396231,_0x3f9b42){return db[_0x9adc('0x2e')][_0x9adc('0xaa')]({'where':{'id':_0x14735a['params']['id']}})[_0x9adc('0x21')](handleEntityNotFound(_0x396231,null))[_0x9adc('0x21')](function(_0x3dceea){if(_0x3dceea){return _0x3dceea[_0x9adc('0xbe')](_0x14735a[_0x9adc('0x32')][_0x9adc('0xb1')]);}})['then'](respondWithStatusCode(_0x396231,null))['catch'](handleError(_0x396231,null));};exports[_0x9adc('0xbf')]=function(_0xd753bd,_0x2fee9b){var _0x1d52c0=moment()[_0x9adc('0xc0')]()[_0x9adc('0x90')]();var _0x366bef=path[_0x9adc('0xc1')](config[_0x9adc('0xc2')],_0x9adc('0xc3'),_0x9adc('0xc4'),'tmp');var _0xf1a168=path[_0x9adc('0xc1')](config[_0x9adc('0xc2')],_0x9adc('0xc3'),_0x9adc('0xc4'),_0x9adc('0xc5'));var _0x5be0b6=path[_0x9adc('0xc1')](_0x366bef,_0x1d52c0);var _0x51b379=util[_0x9adc('0xc6')](_0x9adc('0xc7'),_0xd753bd[_0x9adc('0xac')]['id'],_0x1d52c0);var _0x52e7d8=path['join'](_0x366bef,_0x51b379);var _0x4e19c6=[];_0x4e19c6['push']({'model':db[_0x9adc('0xc8')],'as':_0x9adc('0xc8'),'raw':!![]});var _0x2688eb=[{'model':db[_0x9adc('0xaf')],'as':_0x9adc('0xc9'),'attributes':['id',_0x9adc('0x6b'),_0x9adc('0xca')],'include':_0x4e19c6}];return db['FaxInteraction']['find']({'where':{'id':_0xd753bd[_0x9adc('0xac')]['id']},'include':_0x2688eb})[_0x9adc('0x21')](handleEntityNotFound(_0x2fee9b,null))[_0x9adc('0x21')](function(_0x177d17){if(_0x177d17&&_0x177d17[_0x9adc('0xc9')]){var _0xa17bae=_0x177d17['get']({'plain':!![]});fs['mkdirSync'](_0x5be0b6);for(var _0x1d5d45=0x0;_0x1d5d45<_0xa17bae[_0x9adc('0xc9')][_0x9adc('0x38')];_0x1d5d45++){var _0x34999d=_0xa17bae['Messages'][_0x1d5d45][_0x9adc('0xc8')];if(_0x34999d){var _0x16cc14=path[_0x9adc('0xc1')](_0xf1a168,_0x34999d[_0x9adc('0xcb')]);if(fs[_0x9adc('0xcc')](_0x16cc14)){fs[_0x9adc('0xcd')](_0x16cc14)[_0x9adc('0xce')](fs[_0x9adc('0xcf')](path[_0x9adc('0xc1')](_0x5be0b6,_0x34999d['basename'])));}}}return BPromise[_0x9adc('0x8a')]()[_0x9adc('0x21')](function(){return new BPromise(function(_0x2a7271,_0x4a9554){zipdir(_0x5be0b6,{'saveTo':_0x52e7d8},function(_0x2408e2,_0x596fa6){if(_0x2408e2)return _0x4a9554(_0x2408e2);return _0x2a7271(_0x596fa6);});})[_0x9adc('0x21')](function(){return new BPromise(function(_0x53352e,_0x124567){rimraf(_0x5be0b6,function(_0x57d701){if(_0x57d701)_0x124567(_0x57d701);return _0x53352e();});});})['then'](function(){return _0x2fee9b['download'](_0x52e7d8,_0x51b379,function(_0x5472fd){if(_0x5472fd){console[_0x9adc('0xd0')](_0x9adc('0xd1'),_0x5472fd);}else{fs[_0x9adc('0xd2')](_0x52e7d8);}});});});}else{return _0x2fee9b[_0x9adc('0xd3')](0xc8);}})[_0x9adc('0x2d')](handleError(_0x2fee9b,null));};
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.events.js b/server/api/faxInteraction/faxInteraction.events.js
index 945963a..136c3e1 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 _0xc4aa=['unreadMessages','length','emit','hasOwnProperty','exports','events','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','getUsers','then','setDataValue','findAll'];(function(_0x545b71,_0x4f44eb){var _0x26e587=function(_0x293b81){while(--_0x293b81){_0x545b71['push'](_0x545b71['shift']());}};_0x26e587(++_0x4f44eb);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xc4aa[_0x321bb2];return _0x9c12ed;};'use strict';var EventEmitter=require(_0xac4a('0x0'));var FaxInteraction=require(_0xac4a('0x1'))['db'][_0xac4a('0x2')];var FaxMessage=require(_0xac4a('0x1'))['db'][_0xac4a('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0xac4a('0x4')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x2f48ed){return function(_0x15b967,_0x730a38,_0x215f39){_0x15b967[_0xac4a('0x5')]({'attributes':['id'],'raw':!![]})[_0xac4a('0x6')](function(_0x3ef77c){_0x15b967[_0xac4a('0x7')]('Users',_0x3ef77c['map'](function(_0x1aba6d){return{'id':_0x1aba6d['id']};}));return FaxMessage[_0xac4a('0x8')]({'where':{'FaxInteractionId':_0x15b967['id'],'direction':'in','read':![]},'raw':!![]});})[_0xac4a('0x6')](function(_0x4f4146){_0x15b967[_0xac4a('0x7')](_0xac4a('0x9'),_0x4f4146[_0xac4a('0xa')]);FaxInteractionEvents['emit'](_0x2f48ed+':'+_0x15b967['id'],_0x15b967);FaxInteractionEvents[_0xac4a('0xb')](_0x2f48ed,_0x15b967);_0x215f39(null);})['catch'](_0x215f39(null));};}for(var e in events){if(events[_0xac4a('0xc')](e)){var event=events[e];FaxInteraction['hook'](e,emitEvent(event));}}module[_0xac4a('0xd')]=FaxInteractionEvents;
\ No newline at end of file
+var _0x1261=['exports','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','save','update','remove','getUsers','then','setDataValue','Users','map','findAll','unreadMessages','emit','hasOwnProperty'];(function(_0x24560b,_0x3186f2){var _0x1b2919=function(_0x289580){while(--_0x289580){_0x24560b['push'](_0x24560b['shift']());}};_0x1b2919(++_0x3186f2);}(_0x1261,0x144));var _0x1126=function(_0x4ca796,_0x10dc47){_0x4ca796=_0x4ca796-0x0;var _0x171f87=_0x1261[_0x4ca796];return _0x171f87;};'use strict';var EventEmitter=require('events');var FaxInteraction=require(_0x1126('0x0'))['db'][_0x1126('0x1')];var FaxMessage=require(_0x1126('0x0'))['db'][_0x1126('0x2')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0x1126('0x3')](0x0);var events={'afterCreate':_0x1126('0x4'),'afterUpdate':_0x1126('0x5'),'afterDestroy':_0x1126('0x6')};function emitEvent(_0x21a480){return function(_0x75a851,_0x5a2189,_0x5c68c8){_0x75a851[_0x1126('0x7')]({'attributes':['id'],'raw':!![]})[_0x1126('0x8')](function(_0x4f239c){_0x75a851[_0x1126('0x9')](_0x1126('0xa'),_0x4f239c[_0x1126('0xb')](function(_0x3abb0b){return{'id':_0x3abb0b['id']};}));return FaxMessage[_0x1126('0xc')]({'where':{'FaxInteractionId':_0x75a851['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x3f09ac){_0x75a851[_0x1126('0x9')](_0x1126('0xd'),_0x3f09ac['length']);FaxInteractionEvents[_0x1126('0xe')](_0x21a480+':'+_0x75a851['id'],_0x75a851);FaxInteractionEvents['emit'](_0x21a480,_0x75a851);_0x5c68c8(null);})['catch'](_0x5c68c8(null));};}for(var e in events){if(events[_0x1126('0xf')](e)){var event=events[e];FaxInteraction['hook'](e,emitEvent(event));}}module[_0x1126('0x10')]=FaxInteractionEvents;
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.model.js b/server/api/faxInteraction/faxInteraction.model.js
index 18098d5..b2e6ae7 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 _0xa4fe=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','api','moment','request-promise','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction','changed','closed'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa4fe,0x1de));var _0xea4f=function(_0x4f7100,_0x3ab1ea){_0x4f7100=_0x4f7100-0x0;var _0x397bbb=_0xa4fe[_0x4f7100];return _0x397bbb;};'use strict';var _=require(_0xea4f('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xea4f('0x1'));var moment=require(_0xea4f('0x2'));var BPromise=require('bluebird');var rp=require(_0xea4f('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xea4f('0x4'));var config=require(_0xea4f('0x5'));var attributes=require(_0xea4f('0x6'));module[_0xea4f('0x7')]=function(_0x433591,_0x54453b){return _0x433591[_0xea4f('0x8')](_0xea4f('0x9'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x18998d,_0x49b8d9,_0x3f3024){if(_0x18998d[_0xea4f('0xa')](_0xea4f('0xb'))){_0x18998d['closedAt']=moment()[_0xea4f('0xc')](_0xea4f('0xd'));}_0x3f3024(null,_0x18998d);}}});};
\ No newline at end of file
+var _0xb45a=['bluebird','path','../../config/environment','./faxInteraction.attributes','define','FaxInteraction','fax_interactions','changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger'];(function(_0x71fe8,_0x485e02){var _0x1ea6c7=function(_0x18f770){while(--_0x18f770){_0x71fe8['push'](_0x71fe8['shift']());}};_0x1ea6c7(++_0x485e02);}(_0xb45a,0x185));var _0xab45=function(_0x26c643,_0x2c784a){_0x26c643=_0x26c643-0x0;var _0xb49398=_0xb45a[_0x26c643];return _0xb49398;};'use strict';var _=require(_0xab45('0x0'));var util=require(_0xab45('0x1'));var logger=require(_0xab45('0x2'))('api');var moment=require('moment');var BPromise=require(_0xab45('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xab45('0x4'));var rimraf=require('rimraf');var config=require(_0xab45('0x5'));var attributes=require(_0xab45('0x6'));module['exports']=function(_0x5c4119,_0x110f65){return _0x5c4119[_0xab45('0x7')](_0xab45('0x8'),attributes,{'tableName':_0xab45('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xe0993,_0xada04e,_0x381057){if(_0xe0993[_0xab45('0xa')]('closed')){_0xe0993[_0xab45('0xb')]=moment()[_0xab45('0xc')](_0xab45('0xd'));}_0x381057(null,_0xe0993);}}});};
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.rpc.js b/server/api/faxInteraction/faxInteraction.rpc.js
index a1fcd87..0e8e394 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 _0xaabb=['options','raw','where','debug','AddTagsToFaxInteraction','addTags','omit','ids','AddTags','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./faxInteraction.socket','register','request','then','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','catch','UpdateFaxInteraction','FaxInteraction','update','body'];(function(_0x12bcf7,_0xc11103){var _0x2825a=function(_0x4452ba){while(--_0x4452ba){_0x12bcf7['push'](_0x12bcf7['shift']());}};_0x2825a(++_0xc11103);}(_0xaabb,0xcc));var _0xbaab=function(_0x5a01f5,_0x21803a){_0x5a01f5=_0x5a01f5-0x0;var _0x5ecf7c=_0xaabb[_0x5a01f5];return _0x5ecf7c;};'use strict';var _=require('lodash');var util=require(_0xbaab('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xbaab('0x1'));var fs=require('fs');var Redis=require(_0xbaab('0x2'));var db=require(_0xbaab('0x3'))['db'];var utils=require(_0xbaab('0x4'));var logger=require(_0xbaab('0x5'))('rpc');var config=require(_0xbaab('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xbaab('0x7')][_0xbaab('0x8')]({'port':0x232a});config[_0xbaab('0x9')]=_[_0xbaab('0xa')](config[_0xbaab('0x9')],{'host':_0xbaab('0xb'),'port':0x18eb});var socket=require(_0xbaab('0xc'))(new Redis(config[_0xbaab('0x9')]));require(_0xbaab('0xd'))[_0xbaab('0xe')](socket);function respondWithRpcPromise(_0x33151d,_0x1f1ee2,_0x20d414){return new BPromise(function(_0x39cb79,_0x53f20c){return client[_0xbaab('0xf')](_0x33151d,_0x20d414)[_0xbaab('0x10')](function(_0x35ef4c){logger[_0xbaab('0x11')](_0xbaab('0x12'),_0x1f1ee2,_0xbaab('0x13'));logger['debug']('FaxInteraction,\x20%s,\x20%s,\x20%s',_0x1f1ee2,_0xbaab('0x13'),JSON[_0xbaab('0x14')](_0x35ef4c));if(_0x35ef4c['error']){if(_0x35ef4c['error'][_0xbaab('0x15')]===0x1f4){logger[_0xbaab('0x16')](_0xbaab('0x12'),_0x1f1ee2,_0x35ef4c[_0xbaab('0x16')][_0xbaab('0x17')]);return _0x53f20c(_0x35ef4c[_0xbaab('0x16')][_0xbaab('0x17')]);}logger['error']('FaxInteraction,\x20%s,\x20%s',_0x1f1ee2,_0x35ef4c[_0xbaab('0x16')][_0xbaab('0x17')]);return _0x39cb79(_0x35ef4c['error'][_0xbaab('0x17')]);}else{logger[_0xbaab('0x11')]('FaxInteraction,\x20%s,\x20%s',_0x1f1ee2,'request\x20sent');_0x39cb79(_0x35ef4c[_0xbaab('0x18')][_0xbaab('0x17')]);}})[_0xbaab('0x19')](function(_0x31ef8b){logger[_0xbaab('0x16')](_0xbaab('0x12'),_0x1f1ee2,_0x31ef8b);_0x53f20c(_0x31ef8b);});});}exports[_0xbaab('0x1a')]=function(_0x2e4c00){var _0x3ee595=this;return new Promise(function(_0x36deb7,_0x3479a0){return db[_0xbaab('0x1b')][_0xbaab('0x1c')](_0x2e4c00[_0xbaab('0x1d')],{'raw':_0x2e4c00['options']?_0x2e4c00[_0xbaab('0x1e')][_0xbaab('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2e4c00[_0xbaab('0x1e')]?_0x2e4c00[_0xbaab('0x1e')][_0xbaab('0x20')]||null:null,'attributes':_0x2e4c00[_0xbaab('0x1e')]?_0x2e4c00['options']['attributes']||null:null,'limit':_0x2e4c00['options']?_0x2e4c00[_0xbaab('0x1e')]['limit']||null:null})['then'](function(_0x53b9ca){logger[_0xbaab('0x11')](_0xbaab('0x1a'),_0x2e4c00);logger[_0xbaab('0x21')](_0xbaab('0x1a'),_0x2e4c00,JSON[_0xbaab('0x14')](_0x53b9ca));_0x36deb7(_0x53b9ca);})[_0xbaab('0x19')](function(_0x56f2f4){logger[_0xbaab('0x16')](_0xbaab('0x1a'),_0x56f2f4['message'],_0x2e4c00);_0x3479a0(_0x3ee595[_0xbaab('0x16')](0x1f4,_0x56f2f4['message']));});});};exports[_0xbaab('0x22')]=function(_0x3aedc7){return new Promise(function(_0x4566b6,_0x110305){return db[_0xbaab('0x1b')]['find']({'where':_0x3aedc7[_0xbaab('0x1e')]?_0x3aedc7[_0xbaab('0x1e')][_0xbaab('0x20')]||null:null})[_0xbaab('0x10')](function(_0x1834f3){if(_0x1834f3){return _0x1834f3[_0xbaab('0x23')](_0x3aedc7[_0xbaab('0x1d')]['ids'],_[_0xbaab('0x24')](_0x3aedc7['body'],[_0xbaab('0x25'),'id'])||{});}})['spread'](function(_0x34a50e){logger[_0xbaab('0x11')](_0xbaab('0x26'),_0x3aedc7);logger[_0xbaab('0x21')]('AddTags',_0x3aedc7,JSON['stringify'](_0x34a50e));_0x4566b6(_0x34a50e);})[_0xbaab('0x19')](function(_0x26dadd){logger[_0xbaab('0x16')](_0xbaab('0x26'),_0x26dadd[_0xbaab('0x17')],_0x3aedc7);_0x110305(_this['error'](0x1f4,_0x26dadd[_0xbaab('0x17')]));});});};
\ No newline at end of file
+var _0x8f00=['catch','UpdateFaxInteraction','FaxInteraction','update','body','options','raw','where','attributes','limit','then','AddTagsToFaxInteraction','find','ids','omit','spread','AddTags','moment','ioredis','../../config/utils','../../config/logger','jayson/promise','client','http','redis','defaults','localhost','./faxInteraction.socket','register','request','info','FaxInteraction,\x20%s,\x20%s','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x8f00,0x129));var _0x08f0=function(_0x54282e,_0x30d848){_0x54282e=_0x54282e-0x0;var _0x1f3ae2=_0x8f00[_0x54282e];return _0x1f3ae2;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x08f0('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x08f0('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0x08f0('0x2'));var logger=require(_0x08f0('0x3'))('rpc');var config=require('../../config/environment');var jayson=require(_0x08f0('0x4'));var client=jayson[_0x08f0('0x5')][_0x08f0('0x6')]({'port':0x232a});config[_0x08f0('0x7')]=_[_0x08f0('0x8')](config[_0x08f0('0x7')],{'host':_0x08f0('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x08f0('0x7')]));require(_0x08f0('0xa'))[_0x08f0('0xb')](socket);function respondWithRpcPromise(_0x152b5c,_0x1b85df,_0x12fda7){return new BPromise(function(_0x3ff667,_0x2ac41b){return client[_0x08f0('0xc')](_0x152b5c,_0x12fda7)['then'](function(_0x2620da){logger[_0x08f0('0xd')](_0x08f0('0xe'),_0x1b85df,'request\x20sent');logger[_0x08f0('0xf')](_0x08f0('0x10'),_0x1b85df,_0x08f0('0x11'),JSON[_0x08f0('0x12')](_0x2620da));if(_0x2620da['error']){if(_0x2620da[_0x08f0('0x13')][_0x08f0('0x14')]===0x1f4){logger[_0x08f0('0x13')]('FaxInteraction,\x20%s,\x20%s',_0x1b85df,_0x2620da[_0x08f0('0x13')][_0x08f0('0x15')]);return _0x2ac41b(_0x2620da[_0x08f0('0x13')][_0x08f0('0x15')]);}logger[_0x08f0('0x13')](_0x08f0('0xe'),_0x1b85df,_0x2620da[_0x08f0('0x13')][_0x08f0('0x15')]);return _0x3ff667(_0x2620da[_0x08f0('0x13')][_0x08f0('0x15')]);}else{logger[_0x08f0('0xd')]('FaxInteraction,\x20%s,\x20%s',_0x1b85df,_0x08f0('0x11'));_0x3ff667(_0x2620da[_0x08f0('0x16')]['message']);}})[_0x08f0('0x17')](function(_0x52aca7){logger[_0x08f0('0x13')](_0x08f0('0xe'),_0x1b85df,_0x52aca7);_0x2ac41b(_0x52aca7);});});}exports[_0x08f0('0x18')]=function(_0x42ed67){var _0x49fe30=this;return new Promise(function(_0x964b6d,_0x209100){return db[_0x08f0('0x19')][_0x08f0('0x1a')](_0x42ed67[_0x08f0('0x1b')],{'raw':_0x42ed67[_0x08f0('0x1c')]?_0x42ed67['options'][_0x08f0('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x42ed67[_0x08f0('0x1c')]?_0x42ed67[_0x08f0('0x1c')][_0x08f0('0x1e')]||null:null,'attributes':_0x42ed67['options']?_0x42ed67[_0x08f0('0x1c')][_0x08f0('0x1f')]||null:null,'limit':_0x42ed67[_0x08f0('0x1c')]?_0x42ed67['options'][_0x08f0('0x20')]||null:null})[_0x08f0('0x21')](function(_0x7eeae7){logger[_0x08f0('0xd')]('UpdateFaxInteraction',_0x42ed67);logger[_0x08f0('0xf')](_0x08f0('0x18'),_0x42ed67,JSON['stringify'](_0x7eeae7));_0x964b6d(_0x7eeae7);})['catch'](function(_0x107ffe){logger[_0x08f0('0x13')](_0x08f0('0x18'),_0x107ffe[_0x08f0('0x15')],_0x42ed67);_0x209100(_0x49fe30['error'](0x1f4,_0x107ffe['message']));});});};exports[_0x08f0('0x22')]=function(_0x522c21){return new Promise(function(_0xe767cc,_0x1c9f2f){return db[_0x08f0('0x19')][_0x08f0('0x23')]({'where':_0x522c21[_0x08f0('0x1c')]?_0x522c21[_0x08f0('0x1c')][_0x08f0('0x1e')]||null:null})[_0x08f0('0x21')](function(_0x423685){if(_0x423685){return _0x423685['addTags'](_0x522c21[_0x08f0('0x1b')][_0x08f0('0x24')],_[_0x08f0('0x25')](_0x522c21[_0x08f0('0x1b')],['ids','id'])||{});}})[_0x08f0('0x26')](function(_0x13154a){logger[_0x08f0('0xd')](_0x08f0('0x27'),_0x522c21);logger[_0x08f0('0xf')](_0x08f0('0x27'),_0x522c21,JSON[_0x08f0('0x12')](_0x13154a));_0xe767cc(_0x13154a);})[_0x08f0('0x17')](function(_0x4b6fca){logger['error']('AddTags',_0x4b6fca['message'],_0x522c21);_0x1c9f2f(_this[_0x08f0('0x13')](0x1f4,_0x4b6fca[_0x08f0('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/faxInteraction/faxInteraction.socket.js b/server/api/faxInteraction/faxInteraction.socket.js
index a2fbf36..590f3fe 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 _0x43f3=['length','./faxInteraction.events','save','update','removeListener','register'];(function(_0x305742,_0x5768fa){var _0x28fcab=function(_0x16810a){while(--_0x16810a){_0x305742['push'](_0x305742['shift']());}};_0x28fcab(++_0x5768fa);}(_0x43f3,0x67));var _0x343f=function(_0x4c6d6f,_0x291557){_0x4c6d6f=_0x4c6d6f-0x0;var _0x2d4478=_0x43f3[_0x4c6d6f];return _0x2d4478;};'use strict';var FaxInteractionEvents=require(_0x343f('0x0'));var events=[_0x343f('0x1'),'remove',_0x343f('0x2')];function createListener(_0x21d1fb,_0x7bc1bf){return function(_0x2f2e4a){_0x7bc1bf['emit'](_0x21d1fb,_0x2f2e4a);};}function removeListener(_0x53e8e0,_0x25c6f3){return function(){FaxInteractionEvents[_0x343f('0x3')](_0x53e8e0,_0x25c6f3);};}exports[_0x343f('0x4')]=function(_0x5040ce){for(var _0x4a5a2c=0x0,_0x6579b7=events[_0x343f('0x5')];_0x4a5a2c<_0x6579b7;_0x4a5a2c++){var _0x599021=events[_0x4a5a2c];var _0x49d540=createListener('faxInteraction:'+_0x599021,_0x5040ce);FaxInteractionEvents['on'](_0x599021,_0x49d540);}};
\ No newline at end of file
+var _0xe0a7=['emit','removeListener','register','faxInteraction:','./faxInteraction.events','save','remove'];(function(_0x4faab0,_0x544bf3){var _0x5b1f25=function(_0xf5d089){while(--_0xf5d089){_0x4faab0['push'](_0x4faab0['shift']());}};_0x5b1f25(++_0x544bf3);}(_0xe0a7,0x193));var _0x7e0a=function(_0x11a2a1,_0x157e61){_0x11a2a1=_0x11a2a1-0x0;var _0x3bdd17=_0xe0a7[_0x11a2a1];return _0x3bdd17;};'use strict';var FaxInteractionEvents=require(_0x7e0a('0x0'));var events=[_0x7e0a('0x1'),_0x7e0a('0x2'),'update'];function createListener(_0x12f5f3,_0xf49ef3){return function(_0x1e7727){_0xf49ef3[_0x7e0a('0x3')](_0x12f5f3,_0x1e7727);};}function removeListener(_0x56cfd7,_0x4f277b){return function(){FaxInteractionEvents[_0x7e0a('0x4')](_0x56cfd7,_0x4f277b);};}exports[_0x7e0a('0x5')]=function(_0x5c0e56){for(var _0x462985=0x0,_0x3e612b=events['length'];_0x462985<_0x3e612b;_0x462985++){var _0x42c31f=events[_0x462985];var _0x117289=createListener(_0x7e0a('0x6')+_0x42c31f,_0x5c0e56);FaxInteractionEvents['on'](_0x42c31f,_0x117289);}};
\ No newline at end of file
diff --git a/server/api/faxInteraction/index.js b/server/api/faxInteraction/index.js
index c544755..07b5d1b 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 _0xca07=['../../components/auth/service','../../components/interaction/service','./faxInteraction.controller','get','isAuthenticated','describe','/:id','show','/:id/download','download','post','create','/:id/messages','addMessage','/:id/tags','tracked','fax','faxinteraction:addtags','addTags','put','faxinteraction:update','update','delete','faxinteraction:destroy','destroy','removeTags','exports','util','connect-timeout','Router'];(function(_0x2abde0,_0x34c56e){var _0x33d1e6=function(_0x2e9c44){while(--_0x2e9c44){_0x2abde0['push'](_0x2abde0['shift']());}};_0x33d1e6(++_0x34c56e);}(_0xca07,0xb1));var _0x7ca0=function(_0x5bed28,_0x3069b3){_0x5bed28=_0x5bed28-0x0;var _0x44fe9f=_0xca07[_0x5bed28];return _0x44fe9f;};'use strict';var multer=require('multer');var util=require(_0x7ca0('0x0'));var path=require('path');var timeout=require(_0x7ca0('0x1'));var express=require('express');var router=express[_0x7ca0('0x2')]();var auth=require(_0x7ca0('0x3'));var interaction=require(_0x7ca0('0x4'));var config=require('../../config/environment');var controller=require(_0x7ca0('0x5'));router[_0x7ca0('0x6')]('/',auth[_0x7ca0('0x7')](),controller['index']);router['get']('/describe',auth[_0x7ca0('0x7')](),controller[_0x7ca0('0x8')]);router['get'](_0x7ca0('0x9'),auth['isAuthenticated'](),controller[_0x7ca0('0xa')]);router['get']('/:id/messages',auth[_0x7ca0('0x7')](),controller['getMessages']);router[_0x7ca0('0x6')](_0x7ca0('0xb'),auth[_0x7ca0('0x7')](),controller[_0x7ca0('0xc')]);router[_0x7ca0('0xd')]('/',auth['isAuthenticated'](),controller[_0x7ca0('0xe')]);router[_0x7ca0('0xd')](_0x7ca0('0xf'),auth[_0x7ca0('0x7')](),controller[_0x7ca0('0x10')]);router['post'](_0x7ca0('0x11'),auth[_0x7ca0('0x7')](),interaction[_0x7ca0('0x12')](_0x7ca0('0x13'),_0x7ca0('0x14')),controller[_0x7ca0('0x15')]);router[_0x7ca0('0x16')]('/:id',auth['isAuthenticated'](),interaction['tracked'](_0x7ca0('0x13'),_0x7ca0('0x17')),controller[_0x7ca0('0x18')]);router[_0x7ca0('0x19')](_0x7ca0('0x9'),auth[_0x7ca0('0x7')](),interaction[_0x7ca0('0x12')]('fax',_0x7ca0('0x1a')),controller[_0x7ca0('0x1b')]);router['delete'](_0x7ca0('0x11'),auth[_0x7ca0('0x7')](),controller[_0x7ca0('0x1c')]);module[_0x7ca0('0x1d')]=router;
\ No newline at end of file
+var _0x7a0a=['../../components/auth/service','../../components/interaction/service','../../config/environment','./faxInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','getMessages','/:id/download','download','post','create','/:id/messages','addMessage','/:id/tags','tracked','fax','faxinteraction:addtags','addTags','put','faxinteraction:update','delete','faxinteraction:destroy','destroy','removeTags','multer','util','path','connect-timeout','express','Router'];(function(_0x5c9865,_0x1a299a){var _0x54c22b=function(_0x538537){while(--_0x538537){_0x5c9865['push'](_0x5c9865['shift']());}};_0x54c22b(++_0x1a299a);}(_0x7a0a,0xc6));var _0xa7a0=function(_0x2e8afb,_0x112502){_0x2e8afb=_0x2e8afb-0x0;var _0x24b08f=_0x7a0a[_0x2e8afb];return _0x24b08f;};'use strict';var multer=require(_0xa7a0('0x0'));var util=require(_0xa7a0('0x1'));var path=require(_0xa7a0('0x2'));var timeout=require(_0xa7a0('0x3'));var express=require(_0xa7a0('0x4'));var router=express[_0xa7a0('0x5')]();var auth=require(_0xa7a0('0x6'));var interaction=require(_0xa7a0('0x7'));var config=require(_0xa7a0('0x8'));var controller=require(_0xa7a0('0x9'));router[_0xa7a0('0xa')]('/',auth[_0xa7a0('0xb')](),controller[_0xa7a0('0xc')]);router['get'](_0xa7a0('0xd'),auth[_0xa7a0('0xb')](),controller[_0xa7a0('0xe')]);router[_0xa7a0('0xa')](_0xa7a0('0xf'),auth['isAuthenticated'](),controller['show']);router['get']('/:id/messages',auth[_0xa7a0('0xb')](),controller[_0xa7a0('0x10')]);router[_0xa7a0('0xa')](_0xa7a0('0x11'),auth[_0xa7a0('0xb')](),controller[_0xa7a0('0x12')]);router[_0xa7a0('0x13')]('/',auth['isAuthenticated'](),controller[_0xa7a0('0x14')]);router[_0xa7a0('0x13')](_0xa7a0('0x15'),auth[_0xa7a0('0xb')](),controller[_0xa7a0('0x16')]);router['post'](_0xa7a0('0x17'),auth[_0xa7a0('0xb')](),interaction[_0xa7a0('0x18')](_0xa7a0('0x19'),_0xa7a0('0x1a')),controller[_0xa7a0('0x1b')]);router[_0xa7a0('0x1c')](_0xa7a0('0xf'),auth[_0xa7a0('0xb')](),interaction['tracked'](_0xa7a0('0x19'),_0xa7a0('0x1d')),controller['update']);router[_0xa7a0('0x1e')](_0xa7a0('0xf'),auth[_0xa7a0('0xb')](),interaction['tracked'](_0xa7a0('0x19'),_0xa7a0('0x1f')),controller[_0xa7a0('0x20')]);router[_0xa7a0('0x1e')]('/:id/tags',auth['isAuthenticated'](),controller[_0xa7a0('0x21')]);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 7cad7b9..5f60208 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 _0x8190=['medium','BOOLEAN','out','sequelize','exports','TEXT'];(function(_0x343502,_0x45326f){var _0x1b38b9=function(_0x472a17){while(--_0x472a17){_0x343502['push'](_0x343502['shift']());}};_0x1b38b9(++_0x45326f);}(_0x8190,0x16b));var _0x0819=function(_0x50be91,_0x1a6694){_0x50be91=_0x50be91-0x0;var _0x5cf263=_0x8190[_0x50be91];return _0x5cf263;};'use strict';var Sequelize=require(_0x0819('0x0'));module[_0x0819('0x1')]={'body':{'type':Sequelize[_0x0819('0x2')](_0x0819('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x0819('0x4')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x0819('0x5')),'defaultValue':_0x0819('0x5'),'allowNull':![]},'failMessage':{'type':Sequelize['TEXT'],'defaultValue':null},'readAt':{'type':Sequelize['DATE']}};
\ No newline at end of file
+var _0x1d3a=['out','DATE','sequelize','TEXT','medium','BOOLEAN'];(function(_0x36884e,_0x48008f){var _0x1cc367=function(_0x388a78){while(--_0x388a78){_0x36884e['push'](_0x36884e['shift']());}};_0x1cc367(++_0x48008f);}(_0x1d3a,0xaa));var _0xa1d3=function(_0x2aec52,_0x59d962){_0x2aec52=_0x2aec52-0x0;var _0x3b8835=_0x1d3a[_0x2aec52];return _0x3b8835;};'use strict';var Sequelize=require(_0xa1d3('0x0'));module['exports']={'body':{'type':Sequelize[_0xa1d3('0x1')](_0xa1d3('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0xa1d3('0x3')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0xa1d3('0x4')),'defaultValue':_0xa1d3('0x4'),'allowNull':![]},'failMessage':{'type':Sequelize[_0xa1d3('0x1')],'defaultValue':null},'readAt':{'type':Sequelize[_0xa1d3('0x5')]}};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.controller.js b/server/api/faxMessage/faxMessage.controller.js
index 2c982ae..599d468 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 _0xb10b=['read1stAt','interaction','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','manual','interface','channel','EventManager','acceptmessage','fax','agent','FaxInteractionId','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','event','create','Attachment','findOne','AttachmentId','SendFax','FaxAccountId','/var/opt/motion2/server/files/attachments/%s','basename','join','root','server','attachments','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/license/hardware','../../config/logger','api','../../config/environment','redis','defaults','localhost','socket.io-emitter','register','jayson/promise','client','http','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','sendStatus','end','status','json','count','limit','Content-Range','apply','reject','update','stack','name','send','index','FaxMessage','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','nolimit','offset','order','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','show','params','includeAll','include','find','body','destroy','describe','fax-interactions','accept','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','get','FaxInteraction','isNil'];(function(_0x8adb,_0x3034b8){var _0x31408a=function(_0x48659a){while(--_0x48659a){_0x8adb['push'](_0x8adb['shift']());}};_0x31408a(++_0x3034b8);}(_0xb10b,0x12a));var _0xbb10=function(_0x593cbd,_0x141c5b){_0x593cbd=_0x593cbd-0x0;var _0x1ea4aa=_0xb10b[_0x593cbd];return _0x1ea4aa;};'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 as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbb10('0x14'));var logger=require(_0xbb10('0x15'))(_0xbb10('0x16'));var utils=require('../../config/utils');var config=require(_0xbb10('0x17'));var db=require('../../mysqldb')['db'];config[_0xbb10('0x18')]=_[_0xbb10('0x19')](config[_0xbb10('0x18')],{'host':_0xbb10('0x1a'),'port':0x18eb});var socket=require(_0xbb10('0x1b'))(new Redis(config[_0xbb10('0x18')]));require('./faxMessage.socket')[_0xbb10('0x1c')](socket);var jayson=require(_0xbb10('0x1d'));var client=jayson[_0xbb10('0x1e')][_0xbb10('0x1f')]({'port':0x232c});var client9002=jayson[_0xbb10('0x1e')][_0xbb10('0x1f')]({'port':0x232a});function checkPasswordPattern(_0x24a57b,_0x36b5e8,_0x3e26f4){if(_0x3e26f4){var _0x2b184e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2b184e['test'](_0x36b5e8)){return _0x24a57b;}else{throw new db[(_0xbb10('0x20'))][(_0xbb10('0x21'))](_0xbb10('0x22'));}}else{return _0x24a57b;}}function respondWithRpcPromise(_0x42db98,_0x378da8,_0x1682a4,_0x575cca){return new BPromise(function(_0x30efc6,_0xbf2906){var _0xe1c665=_0x575cca||client;return _0xe1c665['request'](_0x42db98,_0x1682a4)[_0xbb10('0x23')](function(_0x19f48d){logger[_0xbb10('0x24')](_0xbb10('0x25'),_0x378da8,_0xbb10('0x26'));logger[_0xbb10('0x27')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x378da8,_0xbb10('0x26'),JSON[_0xbb10('0x28')](_0x19f48d));if(_0x19f48d['error']){if(_0x19f48d['error'][_0xbb10('0x29')]===0x1f4){logger[_0xbb10('0x2a')](_0xbb10('0x25'),_0x378da8,_0x19f48d[_0xbb10('0x2a')][_0xbb10('0x2b')]);return _0xbf2906(_0x19f48d[_0xbb10('0x2a')][_0xbb10('0x2b')]);}logger[_0xbb10('0x2a')](_0xbb10('0x25'),_0x378da8,_0x19f48d[_0xbb10('0x2a')][_0xbb10('0x2b')]);return _0x30efc6(_0x19f48d[_0xbb10('0x2a')]['message']);}else{logger['info']('FaxMessage,\x20%s,\x20%s',_0x378da8,_0xbb10('0x26'));_0x30efc6(_0x19f48d[_0xbb10('0x2c')][_0xbb10('0x2b')]);}})['catch'](function(_0x2fdde9){logger[_0xbb10('0x2a')](_0xbb10('0x25'),_0x378da8,_0x2fdde9);_0xbf2906(_0x2fdde9);});});}function respondWithStatusCode(_0x1d5e95,_0x1acce9){_0x1acce9=_0x1acce9||0xcc;return function(_0x20d946){if(_0x20d946){return _0x1d5e95[_0xbb10('0x2d')](_0x1acce9);}return _0x1d5e95['status'](_0x1acce9)[_0xbb10('0x2e')]();};}function respondWithResult(_0x21ac54,_0xfc3595){_0xfc3595=_0xfc3595||0xc8;return function(_0x2e0249){if(_0x2e0249){return _0x21ac54[_0xbb10('0x2f')](_0xfc3595)[_0xbb10('0x30')](_0x2e0249);}};}function respondWithFilteredResult(_0x5d5c80,_0x221624){return function(_0x4ee02e){if(_0x4ee02e){var _0x448d5c=_0x4ee02e[_0xbb10('0x31')],_0x56f2da=_0x221624['offset'],_0x16ad2a=_0x221624['offset']+_0x221624[_0xbb10('0x32')],_0x1dcc9c;if(_0x16ad2a>=_0x448d5c){_0x16ad2a=_0x448d5c;_0x1dcc9c=0xc8;}else{_0x1dcc9c=0xce;}_0x5d5c80[_0xbb10('0x2f')](_0x1dcc9c);return _0x5d5c80['set'](_0xbb10('0x33'),_0x56f2da+'-'+_0x16ad2a+'/'+_0x448d5c)[_0xbb10('0x30')](_0x4ee02e);}return null;};}function patchUpdates(_0x2f653f){return function(_0x1c0b57){try{jsonpatch[_0xbb10('0x34')](_0x1c0b57,_0x2f653f,!![]);}catch(_0x138bc6){return BPromise[_0xbb10('0x35')](_0x138bc6);}return _0x1c0b57['save']();};}function saveUpdates(_0x25acb3,_0x1da9c9){return function(_0x441d15){if(_0x441d15){return _0x441d15[_0xbb10('0x36')](_0x25acb3)[_0xbb10('0x23')](function(_0x9de708){return _0x9de708;});}return null;};}function removeEntity(_0x188cbd,_0x10202c){return function(_0x3c8d7d){if(_0x3c8d7d){return _0x3c8d7d['destroy']()[_0xbb10('0x23')](function(){_0x188cbd[_0xbb10('0x2f')](0xcc)[_0xbb10('0x2e')]();});}};}function handleEntityNotFound(_0x3c3c45,_0x570f5a){return function(_0x111762){if(!_0x111762){_0x3c3c45['sendStatus'](0x194);}return _0x111762;};}function handleError(_0x4e2754,_0x3eb3cc){_0x3eb3cc=_0x3eb3cc||0x1f4;return function(_0x40c164){logger[_0xbb10('0x2a')](_0x40c164[_0xbb10('0x37')]);if(_0x40c164[_0xbb10('0x38')]){delete _0x40c164[_0xbb10('0x38')];}_0x4e2754['status'](_0x3eb3cc)[_0xbb10('0x39')](_0x40c164);};}exports[_0xbb10('0x3a')]=function(_0x52de31,_0x5e3fbd){var _0x5cd55f={},_0x31bee3={},_0x2b0b45={'count':0x0,'rows':[]};var _0x2b658a=_['map'](db[_0xbb10('0x3b')][_0xbb10('0x3c')],function(_0x4345f3){return{'name':_0x4345f3['fieldName'],'type':_0x4345f3[_0xbb10('0x3d')][_0xbb10('0x3e')]};});_0x31bee3[_0xbb10('0x3f')]=_[_0xbb10('0x40')](_0x2b658a,'name');_0x31bee3[_0xbb10('0x41')]=_[_0xbb10('0x42')](_0x52de31['query']);_0x31bee3[_0xbb10('0x43')]=_[_0xbb10('0x44')](_0x31bee3[_0xbb10('0x3f')],_0x31bee3[_0xbb10('0x41')]);_0x5cd55f[_0xbb10('0x45')]=_[_0xbb10('0x44')](_0x31bee3['model'],qs[_0xbb10('0x46')](_0x52de31[_0xbb10('0x41')][_0xbb10('0x46')]));_0x5cd55f[_0xbb10('0x45')]=_0x5cd55f['attributes'][_0xbb10('0x47')]?_0x5cd55f[_0xbb10('0x45')]:_0x31bee3[_0xbb10('0x3f')];if(!_0x52de31[_0xbb10('0x41')]['hasOwnProperty'](_0xbb10('0x48'))){_0x5cd55f[_0xbb10('0x32')]=qs['limit'](_0x52de31['query'][_0xbb10('0x32')]);_0x5cd55f['offset']=qs[_0xbb10('0x49')](_0x52de31[_0xbb10('0x41')]['offset']);}_0x5cd55f[_0xbb10('0x4a')]=qs[_0xbb10('0x4b')](_0x52de31[_0xbb10('0x41')]['sort']);_0x5cd55f[_0xbb10('0x4c')]=qs[_0xbb10('0x43')](_[_0xbb10('0x4d')](_0x52de31[_0xbb10('0x41')],_0x31bee3[_0xbb10('0x43')]));if(_0x52de31[_0xbb10('0x41')][_0xbb10('0x4e')]){_0x5cd55f[_0xbb10('0x4c')]=_[_0xbb10('0x4f')](_0x5cd55f[_0xbb10('0x4c')],{'$or':_[_0xbb10('0x40')](_0x2b658a,function(_0x1eadd2){if(_0x1eadd2['type']!==_0xbb10('0x50')){var _0x41bbf8={};_0x41bbf8[_0x1eadd2['name']]={'$like':'%'+_0x52de31[_0xbb10('0x41')][_0xbb10('0x4e')]+'%'};return _0x41bbf8;}})});}_0x5cd55f=_[_0xbb10('0x4f')]({},_0x5cd55f,_0x52de31[_0xbb10('0x51')]);var _0x41ea91={'where':_0x5cd55f[_0xbb10('0x4c')]};return db[_0xbb10('0x3b')]['count'](_0x41ea91)['then'](function(_0xcb3354){_0x2b0b45[_0xbb10('0x31')]=_0xcb3354;if(_0x52de31[_0xbb10('0x41')]['includeAll']){_0x5cd55f['include']=[{'all':!![]}];}return db[_0xbb10('0x3b')][_0xbb10('0x52')](_0x5cd55f);})[_0xbb10('0x23')](function(_0xf820fe){_0x2b0b45[_0xbb10('0x53')]=_0xf820fe;return _0x2b0b45;})[_0xbb10('0x23')](respondWithFilteredResult(_0x5e3fbd,_0x5cd55f))[_0xbb10('0x54')](handleError(_0x5e3fbd,null));};exports[_0xbb10('0x55')]=function(_0x2626d8,_0x3d7e7e){var _0x550111={'raw':!![],'where':{'id':_0x2626d8[_0xbb10('0x56')]['id']}},_0x5eafac={};_0x5eafac[_0xbb10('0x3f')]=_[_0xbb10('0x42')](db[_0xbb10('0x3b')][_0xbb10('0x3c')]);_0x5eafac[_0xbb10('0x41')]=_[_0xbb10('0x42')](_0x2626d8[_0xbb10('0x41')]);_0x5eafac[_0xbb10('0x43')]=_[_0xbb10('0x44')](_0x5eafac[_0xbb10('0x3f')],_0x5eafac[_0xbb10('0x41')]);_0x550111[_0xbb10('0x45')]=_[_0xbb10('0x44')](_0x5eafac[_0xbb10('0x3f')],qs['fields'](_0x2626d8[_0xbb10('0x41')]['fields']));_0x550111[_0xbb10('0x45')]=_0x550111[_0xbb10('0x45')][_0xbb10('0x47')]?_0x550111[_0xbb10('0x45')]:_0x5eafac[_0xbb10('0x3f')];if(_0x2626d8[_0xbb10('0x41')][_0xbb10('0x57')]){_0x550111[_0xbb10('0x58')]=[{'all':!![]}];}_0x550111=_[_0xbb10('0x4f')]({},_0x550111,_0x2626d8[_0xbb10('0x51')]);return db[_0xbb10('0x3b')][_0xbb10('0x59')](_0x550111)[_0xbb10('0x23')](handleEntityNotFound(_0x3d7e7e,null))[_0xbb10('0x23')](respondWithResult(_0x3d7e7e,null))[_0xbb10('0x54')](handleError(_0x3d7e7e,null));};exports['update']=function(_0x4571b6,_0x466eb7){if(_0x4571b6[_0xbb10('0x5a')]['id']){delete _0x4571b6[_0xbb10('0x5a')]['id'];}return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x4571b6['params']['id']}})[_0xbb10('0x23')](handleEntityNotFound(_0x466eb7,null))[_0xbb10('0x23')](saveUpdates(_0x4571b6[_0xbb10('0x5a')],null))[_0xbb10('0x23')](respondWithResult(_0x466eb7,null))[_0xbb10('0x54')](handleError(_0x466eb7,null));};exports[_0xbb10('0x5b')]=function(_0x175872,_0x12ec18){return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x175872[_0xbb10('0x56')]['id']}})[_0xbb10('0x23')](handleEntityNotFound(_0x12ec18,null))[_0xbb10('0x23')](removeEntity(_0x12ec18,null))['catch'](handleError(_0x12ec18,null));};exports['describe']=function(_0x16272d,_0x3e6338){return db[_0xbb10('0x3b')][_0xbb10('0x5c')]()['then'](respondWithResult(_0x3e6338,null))['catch'](handleError(_0x3e6338,null));};var interaction_log=require(_0xbb10('0x15'))(_0xbb10('0x5d'));exports[_0xbb10('0x5e')]=function(_0x2dd150,_0x412f13,_0x3e9753){var _0x45c0dc={'channel':'fax'};if(_0x2dd150[_0xbb10('0x5a')]['id']){delete _0x2dd150[_0xbb10('0x5a')]['id'];}_0x2dd150['body']['read']=!![];_0x2dd150['body'][_0xbb10('0x5f')]=moment()[_0xbb10('0x60')](_0xbb10('0x61'));_0x2dd150['body']['UserId']=_0x2dd150['body'][_0xbb10('0x62')]||_0x2dd150[_0xbb10('0x63')]['id'];return db[_0xbb10('0x3b')]['find']({'where':{'id':_0x2dd150[_0xbb10('0x56')]['id'],'UserId':null},'include':[{'model':db[_0xbb10('0x64')],'as':'Contact'}]})['then'](handleEntityNotFound(_0x412f13,null))[_0xbb10('0x23')](saveUpdates(_0x2dd150[_0xbb10('0x5a')],null))[_0xbb10('0x23')](function(_0x237246){if(_0x237246){_0x45c0dc['message']=_0x237246[_0xbb10('0x65')]({'plain':!![]});return db[_0xbb10('0x66')][_0xbb10('0x59')]({'where':{'id':_0x237246['FaxInteractionId']}});}return null;})[_0xbb10('0x23')](handleEntityNotFound(_0x412f13,null))[_0xbb10('0x23')](function(_0x3e3617){if(_0x3e3617){return _0x3e3617['update']({'UserId':_0x2dd150[_0xbb10('0x5a')][_0xbb10('0x62')],'read1stAt':_[_0xbb10('0x67')](_0x3e3617[_0xbb10('0x68')])?moment()['format'](_0xbb10('0x61')):undefined});}return null;})[_0xbb10('0x23')](function(_0x108e5b){if(_0x108e5b){_0x45c0dc[_0xbb10('0x69')]=_0x108e5b['get']({'plain':!![]});interaction_log[_0xbb10('0x24')](_0xbb10('0x6a'),_0x2dd150[_0xbb10('0x63')]['id'],_0x2dd150[_0xbb10('0x63')][_0xbb10('0x38')],_0x2dd150[_0xbb10('0x63')][_0xbb10('0x6b')],_0x45c0dc['interaction']['id'],_0x2dd150['body']?JSON['stringify'](_0x2dd150[_0xbb10('0x5a')]):_0xbb10('0x6c'));return respondWithRpcPromise(_0xbb10('0x6d'),'acceptMessage',_0x45c0dc);}return null;})['then'](function(_0x46f462){if(_0x46f462){if(_0x2dd150[_0xbb10('0x5a')][_0xbb10('0x6e')]){_0x45c0dc[_0xbb10('0x2b')][_0xbb10('0x6f')]=util[_0xbb10('0x60')]('SIP/%s',_0x2dd150[_0xbb10('0x63')][_0xbb10('0x38')]);_0x45c0dc[_0xbb10('0x2b')][_0xbb10('0x70')]=_0x45c0dc[_0xbb10('0x70')];_0x45c0dc['message']['event']='accept';return respondWithRpcPromise(_0xbb10('0x71'),_0xbb10('0x71'),{'event':_0xbb10('0x72'),'message':_0x45c0dc[_0xbb10('0x2b')]},client9002)[_0xbb10('0x23')](function(){return _0x45c0dc;});}return _0x45c0dc;}return null;})[_0xbb10('0x23')](respondWithResult(_0x412f13,null))['catch'](handleError(_0x412f13,null));};var interaction_log=require(_0xbb10('0x15'))('fax-interactions');exports['reject']=function(_0x519a54,_0xdf634f,_0x13040d){var _0x23b1d5={'agent':{},'channel':_0xbb10('0x73')};if(_0x519a54['body']['id']){delete _0x519a54[_0xbb10('0x5a')]['id'];}_0x519a54['body']['UserId']=_0x519a54[_0xbb10('0x5a')][_0xbb10('0x62')]||_0x519a54[_0xbb10('0x63')]['id'];_0x23b1d5[_0xbb10('0x74')]['id']=_0x519a54[_0xbb10('0x5a')]['UserId'];return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x519a54[_0xbb10('0x56')]['id'],'UserId':null}})[_0xbb10('0x23')](handleEntityNotFound(_0xdf634f,null))[_0xbb10('0x23')](function(_0x27f42f){if(_0x27f42f){_0x23b1d5[_0xbb10('0x2b')]=_0x27f42f['get']({'plain':!![]});return db[_0xbb10('0x66')][_0xbb10('0x59')]({'where':{'id':_0x27f42f[_0xbb10('0x75')]}});}return null;})[_0xbb10('0x23')](handleEntityNotFound(_0xdf634f,null))[_0xbb10('0x23')](function(_0x172be3){if(_0x172be3){_0x23b1d5[_0xbb10('0x69')]=_0x172be3[_0xbb10('0x65')]({'plain':!![]});interaction_log['info'](_0xbb10('0x76'),_0x519a54[_0xbb10('0x63')]['id'],_0x519a54[_0xbb10('0x63')]['name'],_0x519a54['user']['role'],_0x23b1d5[_0xbb10('0x69')]['id'],_0x519a54['body']?JSON['stringify'](_0x519a54[_0xbb10('0x5a')]):_0xbb10('0x6c'));return respondWithRpcPromise(_0xbb10('0x77'),_0xbb10('0x78'),_0x23b1d5);}return null;})[_0xbb10('0x23')](function(_0x24dca6){if(_0x24dca6){_0x24dca6[_0xbb10('0x2b')][_0xbb10('0x6f')]=util[_0xbb10('0x60')]('SIP/%s',_0x519a54[_0xbb10('0x63')][_0xbb10('0x38')]);_0x24dca6[_0xbb10('0x2b')][_0xbb10('0x70')]=_0x23b1d5['channel'];_0x24dca6['message'][_0xbb10('0x79')]=_0xbb10('0x35');respondWithRpcPromise(_0xbb10('0x71'),_0xbb10('0x71'),{'event':'rejectmessage','message':_0x24dca6[_0xbb10('0x2b')]},client9002);return _0x23b1d5;}return null;})[_0xbb10('0x23')](respondWithResult(_0xdf634f,null))[_0xbb10('0x54')](handleError(_0xdf634f,null));};exports[_0xbb10('0x7a')]=function(_0x35c1e8,_0x517185){var _0x5f0691;return db[_0xbb10('0x3b')][_0xbb10('0x7a')](_0x35c1e8[_0xbb10('0x5a')],{})['then'](function(_0x256b35){_0x5f0691=_0x256b35;return db[_0xbb10('0x64')]['findOne']({'where':{'id':_0x5f0691['ContactId']}});})[_0xbb10('0x23')](function(_0x26d0dd){if(_[_0xbb10('0x67')](_0x26d0dd)){return;}else{_0x5f0691['fax']=_0x26d0dd[_0xbb10('0x73')];return db[_0xbb10('0x7b')][_0xbb10('0x7c')]({'where':{'id':_0x5f0691[_0xbb10('0x7d')]}});}})[_0xbb10('0x23')](function(_0x5de006){return respondWithRpcPromise(_0xbb10('0x7e'),_0xbb10('0x7e'),{'FaxAccountId':_[_0xbb10('0x67')](_0x35c1e8['body'])?undefined:_0x35c1e8[_0xbb10('0x5a')][_0xbb10('0x7f')],'path':_[_0xbb10('0x67')](_0x5de006)?undefined:util[_0xbb10('0x60')](_0xbb10('0x80'),_0x5de006[_0xbb10('0x81')]),'fax':_[_0xbb10('0x67')](_0x5f0691[_0xbb10('0x73')])?undefined:_0x5f0691[_0xbb10('0x73')],'AttachmentId':_0x5f0691[_0xbb10('0x7d')]},client9002);})[_0xbb10('0x23')](respondWithResult(_0x517185,0xc9))[_0xbb10('0x54')](handleError(_0x517185,null));};exports['download']=function(_0x51f106,_0xe1fc51){var _0x3fa344=path[_0xbb10('0x82')](config[_0xbb10('0x83')],_0xbb10('0x84'),'files',_0xbb10('0x85'));return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x51f106[_0xbb10('0x56')]['id']},'include':[{'model':db[_0xbb10('0x7b')],'as':_0xbb10('0x7b')}]})['then'](handleEntityNotFound(_0xe1fc51,null))[_0xbb10('0x23')](function(_0x742e10){if(_0x742e10){return _0xe1fc51['download'](path[_0xbb10('0x82')](_0x3fa344,_0x742e10['Attachment'][_0xbb10('0x81')]));}})[_0xbb10('0x54')](handleError(_0xe1fc51,null));};
\ No newline at end of file
+var _0xb10b=['read1stAt','interaction','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','manual','interface','channel','EventManager','acceptmessage','fax','agent','FaxInteractionId','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','event','create','Attachment','findOne','AttachmentId','SendFax','FaxAccountId','/var/opt/motion2/server/files/attachments/%s','basename','join','root','server','attachments','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/license/hardware','../../config/logger','api','../../config/environment','redis','defaults','localhost','socket.io-emitter','register','jayson/promise','client','http','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','sendStatus','end','status','json','count','limit','Content-Range','apply','reject','update','stack','name','send','index','FaxMessage','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','nolimit','offset','order','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','show','params','includeAll','include','find','body','destroy','describe','fax-interactions','accept','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','get','FaxInteraction','isNil'];(function(_0x4728c8,_0x1913e7){var _0x1faa7c=function(_0x3e2f16){while(--_0x3e2f16){_0x4728c8['push'](_0x4728c8['shift']());}};_0x1faa7c(++_0x1913e7);}(_0xb10b,0x12a));var _0xbb10=function(_0xe96931,_0x2f59d7){_0xe96931=_0xe96931-0x0;var _0x332f08=_0xb10b[_0xe96931];return _0x332f08;};'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 as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbb10('0x14'));var logger=require(_0xbb10('0x15'))(_0xbb10('0x16'));var utils=require('../../config/utils');var config=require(_0xbb10('0x17'));var db=require('../../mysqldb')['db'];config[_0xbb10('0x18')]=_[_0xbb10('0x19')](config[_0xbb10('0x18')],{'host':_0xbb10('0x1a'),'port':0x18eb});var socket=require(_0xbb10('0x1b'))(new Redis(config[_0xbb10('0x18')]));require('./faxMessage.socket')[_0xbb10('0x1c')](socket);var jayson=require(_0xbb10('0x1d'));var client=jayson[_0xbb10('0x1e')][_0xbb10('0x1f')]({'port':0x232c});var client9002=jayson[_0xbb10('0x1e')][_0xbb10('0x1f')]({'port':0x232a});function checkPasswordPattern(_0x24a57b,_0x36b5e8,_0x3e26f4){if(_0x3e26f4){var _0x2b184e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2b184e['test'](_0x36b5e8)){return _0x24a57b;}else{throw new db[(_0xbb10('0x20'))][(_0xbb10('0x21'))](_0xbb10('0x22'));}}else{return _0x24a57b;}}function respondWithRpcPromise(_0x42db98,_0x378da8,_0x1682a4,_0x575cca){return new BPromise(function(_0x30efc6,_0xbf2906){var _0xe1c665=_0x575cca||client;return _0xe1c665['request'](_0x42db98,_0x1682a4)[_0xbb10('0x23')](function(_0x19f48d){logger[_0xbb10('0x24')](_0xbb10('0x25'),_0x378da8,_0xbb10('0x26'));logger[_0xbb10('0x27')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x378da8,_0xbb10('0x26'),JSON[_0xbb10('0x28')](_0x19f48d));if(_0x19f48d['error']){if(_0x19f48d['error'][_0xbb10('0x29')]===0x1f4){logger[_0xbb10('0x2a')](_0xbb10('0x25'),_0x378da8,_0x19f48d[_0xbb10('0x2a')][_0xbb10('0x2b')]);return _0xbf2906(_0x19f48d[_0xbb10('0x2a')][_0xbb10('0x2b')]);}logger[_0xbb10('0x2a')](_0xbb10('0x25'),_0x378da8,_0x19f48d[_0xbb10('0x2a')][_0xbb10('0x2b')]);return _0x30efc6(_0x19f48d[_0xbb10('0x2a')]['message']);}else{logger['info']('FaxMessage,\x20%s,\x20%s',_0x378da8,_0xbb10('0x26'));_0x30efc6(_0x19f48d[_0xbb10('0x2c')][_0xbb10('0x2b')]);}})['catch'](function(_0x2fdde9){logger[_0xbb10('0x2a')](_0xbb10('0x25'),_0x378da8,_0x2fdde9);_0xbf2906(_0x2fdde9);});});}function respondWithStatusCode(_0x1d5e95,_0x1acce9){_0x1acce9=_0x1acce9||0xcc;return function(_0x20d946){if(_0x20d946){return _0x1d5e95[_0xbb10('0x2d')](_0x1acce9);}return _0x1d5e95['status'](_0x1acce9)[_0xbb10('0x2e')]();};}function respondWithResult(_0x21ac54,_0xfc3595){_0xfc3595=_0xfc3595||0xc8;return function(_0x2e0249){if(_0x2e0249){return _0x21ac54[_0xbb10('0x2f')](_0xfc3595)[_0xbb10('0x30')](_0x2e0249);}};}function respondWithFilteredResult(_0x5d5c80,_0x221624){return function(_0x4ee02e){if(_0x4ee02e){var _0x448d5c=_0x4ee02e[_0xbb10('0x31')],_0x56f2da=_0x221624['offset'],_0x16ad2a=_0x221624['offset']+_0x221624[_0xbb10('0x32')],_0x1dcc9c;if(_0x16ad2a>=_0x448d5c){_0x16ad2a=_0x448d5c;_0x1dcc9c=0xc8;}else{_0x1dcc9c=0xce;}_0x5d5c80[_0xbb10('0x2f')](_0x1dcc9c);return _0x5d5c80['set'](_0xbb10('0x33'),_0x56f2da+'-'+_0x16ad2a+'/'+_0x448d5c)[_0xbb10('0x30')](_0x4ee02e);}return null;};}function patchUpdates(_0x2f653f){return function(_0x1c0b57){try{jsonpatch[_0xbb10('0x34')](_0x1c0b57,_0x2f653f,!![]);}catch(_0x138bc6){return BPromise[_0xbb10('0x35')](_0x138bc6);}return _0x1c0b57['save']();};}function saveUpdates(_0x25acb3,_0x1da9c9){return function(_0x441d15){if(_0x441d15){return _0x441d15[_0xbb10('0x36')](_0x25acb3)[_0xbb10('0x23')](function(_0x9de708){return _0x9de708;});}return null;};}function removeEntity(_0x188cbd,_0x10202c){return function(_0x3c8d7d){if(_0x3c8d7d){return _0x3c8d7d['destroy']()[_0xbb10('0x23')](function(){_0x188cbd[_0xbb10('0x2f')](0xcc)[_0xbb10('0x2e')]();});}};}function handleEntityNotFound(_0x3c3c45,_0x570f5a){return function(_0x111762){if(!_0x111762){_0x3c3c45['sendStatus'](0x194);}return _0x111762;};}function handleError(_0x4e2754,_0x3eb3cc){_0x3eb3cc=_0x3eb3cc||0x1f4;return function(_0x40c164){logger[_0xbb10('0x2a')](_0x40c164[_0xbb10('0x37')]);if(_0x40c164[_0xbb10('0x38')]){delete _0x40c164[_0xbb10('0x38')];}_0x4e2754['status'](_0x3eb3cc)[_0xbb10('0x39')](_0x40c164);};}exports[_0xbb10('0x3a')]=function(_0x52de31,_0x5e3fbd){var _0x5cd55f={},_0x31bee3={},_0x2b0b45={'count':0x0,'rows':[]};var _0x2b658a=_['map'](db[_0xbb10('0x3b')][_0xbb10('0x3c')],function(_0x4345f3){return{'name':_0x4345f3['fieldName'],'type':_0x4345f3[_0xbb10('0x3d')][_0xbb10('0x3e')]};});_0x31bee3[_0xbb10('0x3f')]=_[_0xbb10('0x40')](_0x2b658a,'name');_0x31bee3[_0xbb10('0x41')]=_[_0xbb10('0x42')](_0x52de31['query']);_0x31bee3[_0xbb10('0x43')]=_[_0xbb10('0x44')](_0x31bee3[_0xbb10('0x3f')],_0x31bee3[_0xbb10('0x41')]);_0x5cd55f[_0xbb10('0x45')]=_[_0xbb10('0x44')](_0x31bee3['model'],qs[_0xbb10('0x46')](_0x52de31[_0xbb10('0x41')][_0xbb10('0x46')]));_0x5cd55f[_0xbb10('0x45')]=_0x5cd55f['attributes'][_0xbb10('0x47')]?_0x5cd55f[_0xbb10('0x45')]:_0x31bee3[_0xbb10('0x3f')];if(!_0x52de31[_0xbb10('0x41')]['hasOwnProperty'](_0xbb10('0x48'))){_0x5cd55f[_0xbb10('0x32')]=qs['limit'](_0x52de31['query'][_0xbb10('0x32')]);_0x5cd55f['offset']=qs[_0xbb10('0x49')](_0x52de31[_0xbb10('0x41')]['offset']);}_0x5cd55f[_0xbb10('0x4a')]=qs[_0xbb10('0x4b')](_0x52de31[_0xbb10('0x41')]['sort']);_0x5cd55f[_0xbb10('0x4c')]=qs[_0xbb10('0x43')](_[_0xbb10('0x4d')](_0x52de31[_0xbb10('0x41')],_0x31bee3[_0xbb10('0x43')]));if(_0x52de31[_0xbb10('0x41')][_0xbb10('0x4e')]){_0x5cd55f[_0xbb10('0x4c')]=_[_0xbb10('0x4f')](_0x5cd55f[_0xbb10('0x4c')],{'$or':_[_0xbb10('0x40')](_0x2b658a,function(_0x1eadd2){if(_0x1eadd2['type']!==_0xbb10('0x50')){var _0x41bbf8={};_0x41bbf8[_0x1eadd2['name']]={'$like':'%'+_0x52de31[_0xbb10('0x41')][_0xbb10('0x4e')]+'%'};return _0x41bbf8;}})});}_0x5cd55f=_[_0xbb10('0x4f')]({},_0x5cd55f,_0x52de31[_0xbb10('0x51')]);var _0x41ea91={'where':_0x5cd55f[_0xbb10('0x4c')]};return db[_0xbb10('0x3b')]['count'](_0x41ea91)['then'](function(_0xcb3354){_0x2b0b45[_0xbb10('0x31')]=_0xcb3354;if(_0x52de31[_0xbb10('0x41')]['includeAll']){_0x5cd55f['include']=[{'all':!![]}];}return db[_0xbb10('0x3b')][_0xbb10('0x52')](_0x5cd55f);})[_0xbb10('0x23')](function(_0xf820fe){_0x2b0b45[_0xbb10('0x53')]=_0xf820fe;return _0x2b0b45;})[_0xbb10('0x23')](respondWithFilteredResult(_0x5e3fbd,_0x5cd55f))[_0xbb10('0x54')](handleError(_0x5e3fbd,null));};exports[_0xbb10('0x55')]=function(_0x2626d8,_0x3d7e7e){var _0x550111={'raw':!![],'where':{'id':_0x2626d8[_0xbb10('0x56')]['id']}},_0x5eafac={};_0x5eafac[_0xbb10('0x3f')]=_[_0xbb10('0x42')](db[_0xbb10('0x3b')][_0xbb10('0x3c')]);_0x5eafac[_0xbb10('0x41')]=_[_0xbb10('0x42')](_0x2626d8[_0xbb10('0x41')]);_0x5eafac[_0xbb10('0x43')]=_[_0xbb10('0x44')](_0x5eafac[_0xbb10('0x3f')],_0x5eafac[_0xbb10('0x41')]);_0x550111[_0xbb10('0x45')]=_[_0xbb10('0x44')](_0x5eafac[_0xbb10('0x3f')],qs['fields'](_0x2626d8[_0xbb10('0x41')]['fields']));_0x550111[_0xbb10('0x45')]=_0x550111[_0xbb10('0x45')][_0xbb10('0x47')]?_0x550111[_0xbb10('0x45')]:_0x5eafac[_0xbb10('0x3f')];if(_0x2626d8[_0xbb10('0x41')][_0xbb10('0x57')]){_0x550111[_0xbb10('0x58')]=[{'all':!![]}];}_0x550111=_[_0xbb10('0x4f')]({},_0x550111,_0x2626d8[_0xbb10('0x51')]);return db[_0xbb10('0x3b')][_0xbb10('0x59')](_0x550111)[_0xbb10('0x23')](handleEntityNotFound(_0x3d7e7e,null))[_0xbb10('0x23')](respondWithResult(_0x3d7e7e,null))[_0xbb10('0x54')](handleError(_0x3d7e7e,null));};exports['update']=function(_0x4571b6,_0x466eb7){if(_0x4571b6[_0xbb10('0x5a')]['id']){delete _0x4571b6[_0xbb10('0x5a')]['id'];}return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x4571b6['params']['id']}})[_0xbb10('0x23')](handleEntityNotFound(_0x466eb7,null))[_0xbb10('0x23')](saveUpdates(_0x4571b6[_0xbb10('0x5a')],null))[_0xbb10('0x23')](respondWithResult(_0x466eb7,null))[_0xbb10('0x54')](handleError(_0x466eb7,null));};exports[_0xbb10('0x5b')]=function(_0x175872,_0x12ec18){return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x175872[_0xbb10('0x56')]['id']}})[_0xbb10('0x23')](handleEntityNotFound(_0x12ec18,null))[_0xbb10('0x23')](removeEntity(_0x12ec18,null))['catch'](handleError(_0x12ec18,null));};exports['describe']=function(_0x16272d,_0x3e6338){return db[_0xbb10('0x3b')][_0xbb10('0x5c')]()['then'](respondWithResult(_0x3e6338,null))['catch'](handleError(_0x3e6338,null));};var interaction_log=require(_0xbb10('0x15'))(_0xbb10('0x5d'));exports[_0xbb10('0x5e')]=function(_0x2dd150,_0x412f13,_0x3e9753){var _0x45c0dc={'channel':'fax'};if(_0x2dd150[_0xbb10('0x5a')]['id']){delete _0x2dd150[_0xbb10('0x5a')]['id'];}_0x2dd150['body']['read']=!![];_0x2dd150['body'][_0xbb10('0x5f')]=moment()[_0xbb10('0x60')](_0xbb10('0x61'));_0x2dd150['body']['UserId']=_0x2dd150['body'][_0xbb10('0x62')]||_0x2dd150[_0xbb10('0x63')]['id'];return db[_0xbb10('0x3b')]['find']({'where':{'id':_0x2dd150[_0xbb10('0x56')]['id'],'UserId':null},'include':[{'model':db[_0xbb10('0x64')],'as':'Contact'}]})['then'](handleEntityNotFound(_0x412f13,null))[_0xbb10('0x23')](saveUpdates(_0x2dd150[_0xbb10('0x5a')],null))[_0xbb10('0x23')](function(_0x237246){if(_0x237246){_0x45c0dc['message']=_0x237246[_0xbb10('0x65')]({'plain':!![]});return db[_0xbb10('0x66')][_0xbb10('0x59')]({'where':{'id':_0x237246['FaxInteractionId']}});}return null;})[_0xbb10('0x23')](handleEntityNotFound(_0x412f13,null))[_0xbb10('0x23')](function(_0x3e3617){if(_0x3e3617){return _0x3e3617['update']({'UserId':_0x2dd150[_0xbb10('0x5a')][_0xbb10('0x62')],'read1stAt':_[_0xbb10('0x67')](_0x3e3617[_0xbb10('0x68')])?moment()['format'](_0xbb10('0x61')):undefined});}return null;})[_0xbb10('0x23')](function(_0x108e5b){if(_0x108e5b){_0x45c0dc[_0xbb10('0x69')]=_0x108e5b['get']({'plain':!![]});interaction_log[_0xbb10('0x24')](_0xbb10('0x6a'),_0x2dd150[_0xbb10('0x63')]['id'],_0x2dd150[_0xbb10('0x63')][_0xbb10('0x38')],_0x2dd150[_0xbb10('0x63')][_0xbb10('0x6b')],_0x45c0dc['interaction']['id'],_0x2dd150['body']?JSON['stringify'](_0x2dd150[_0xbb10('0x5a')]):_0xbb10('0x6c'));return respondWithRpcPromise(_0xbb10('0x6d'),'acceptMessage',_0x45c0dc);}return null;})['then'](function(_0x46f462){if(_0x46f462){if(_0x2dd150[_0xbb10('0x5a')][_0xbb10('0x6e')]){_0x45c0dc[_0xbb10('0x2b')][_0xbb10('0x6f')]=util[_0xbb10('0x60')]('SIP/%s',_0x2dd150[_0xbb10('0x63')][_0xbb10('0x38')]);_0x45c0dc[_0xbb10('0x2b')][_0xbb10('0x70')]=_0x45c0dc[_0xbb10('0x70')];_0x45c0dc['message']['event']='accept';return respondWithRpcPromise(_0xbb10('0x71'),_0xbb10('0x71'),{'event':_0xbb10('0x72'),'message':_0x45c0dc[_0xbb10('0x2b')]},client9002)[_0xbb10('0x23')](function(){return _0x45c0dc;});}return _0x45c0dc;}return null;})[_0xbb10('0x23')](respondWithResult(_0x412f13,null))['catch'](handleError(_0x412f13,null));};var interaction_log=require(_0xbb10('0x15'))('fax-interactions');exports['reject']=function(_0x519a54,_0xdf634f,_0x13040d){var _0x23b1d5={'agent':{},'channel':_0xbb10('0x73')};if(_0x519a54['body']['id']){delete _0x519a54[_0xbb10('0x5a')]['id'];}_0x519a54['body']['UserId']=_0x519a54[_0xbb10('0x5a')][_0xbb10('0x62')]||_0x519a54[_0xbb10('0x63')]['id'];_0x23b1d5[_0xbb10('0x74')]['id']=_0x519a54[_0xbb10('0x5a')]['UserId'];return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x519a54[_0xbb10('0x56')]['id'],'UserId':null}})[_0xbb10('0x23')](handleEntityNotFound(_0xdf634f,null))[_0xbb10('0x23')](function(_0x27f42f){if(_0x27f42f){_0x23b1d5[_0xbb10('0x2b')]=_0x27f42f['get']({'plain':!![]});return db[_0xbb10('0x66')][_0xbb10('0x59')]({'where':{'id':_0x27f42f[_0xbb10('0x75')]}});}return null;})[_0xbb10('0x23')](handleEntityNotFound(_0xdf634f,null))[_0xbb10('0x23')](function(_0x172be3){if(_0x172be3){_0x23b1d5[_0xbb10('0x69')]=_0x172be3[_0xbb10('0x65')]({'plain':!![]});interaction_log['info'](_0xbb10('0x76'),_0x519a54[_0xbb10('0x63')]['id'],_0x519a54[_0xbb10('0x63')]['name'],_0x519a54['user']['role'],_0x23b1d5[_0xbb10('0x69')]['id'],_0x519a54['body']?JSON['stringify'](_0x519a54[_0xbb10('0x5a')]):_0xbb10('0x6c'));return respondWithRpcPromise(_0xbb10('0x77'),_0xbb10('0x78'),_0x23b1d5);}return null;})[_0xbb10('0x23')](function(_0x24dca6){if(_0x24dca6){_0x24dca6[_0xbb10('0x2b')][_0xbb10('0x6f')]=util[_0xbb10('0x60')]('SIP/%s',_0x519a54[_0xbb10('0x63')][_0xbb10('0x38')]);_0x24dca6[_0xbb10('0x2b')][_0xbb10('0x70')]=_0x23b1d5['channel'];_0x24dca6['message'][_0xbb10('0x79')]=_0xbb10('0x35');respondWithRpcPromise(_0xbb10('0x71'),_0xbb10('0x71'),{'event':'rejectmessage','message':_0x24dca6[_0xbb10('0x2b')]},client9002);return _0x23b1d5;}return null;})[_0xbb10('0x23')](respondWithResult(_0xdf634f,null))[_0xbb10('0x54')](handleError(_0xdf634f,null));};exports[_0xbb10('0x7a')]=function(_0x35c1e8,_0x517185){var _0x5f0691;return db[_0xbb10('0x3b')][_0xbb10('0x7a')](_0x35c1e8[_0xbb10('0x5a')],{})['then'](function(_0x256b35){_0x5f0691=_0x256b35;return db[_0xbb10('0x64')]['findOne']({'where':{'id':_0x5f0691['ContactId']}});})[_0xbb10('0x23')](function(_0x26d0dd){if(_[_0xbb10('0x67')](_0x26d0dd)){return;}else{_0x5f0691['fax']=_0x26d0dd[_0xbb10('0x73')];return db[_0xbb10('0x7b')][_0xbb10('0x7c')]({'where':{'id':_0x5f0691[_0xbb10('0x7d')]}});}})[_0xbb10('0x23')](function(_0x5de006){return respondWithRpcPromise(_0xbb10('0x7e'),_0xbb10('0x7e'),{'FaxAccountId':_[_0xbb10('0x67')](_0x35c1e8['body'])?undefined:_0x35c1e8[_0xbb10('0x5a')][_0xbb10('0x7f')],'path':_[_0xbb10('0x67')](_0x5de006)?undefined:util[_0xbb10('0x60')](_0xbb10('0x80'),_0x5de006[_0xbb10('0x81')]),'fax':_[_0xbb10('0x67')](_0x5f0691[_0xbb10('0x73')])?undefined:_0x5f0691[_0xbb10('0x73')],'AttachmentId':_0x5f0691[_0xbb10('0x7d')]},client9002);})[_0xbb10('0x23')](respondWithResult(_0x517185,0xc9))[_0xbb10('0x54')](handleError(_0x517185,null));};exports['download']=function(_0x51f106,_0xe1fc51){var _0x3fa344=path[_0xbb10('0x82')](config[_0xbb10('0x83')],_0xbb10('0x84'),'files',_0xbb10('0x85'));return db[_0xbb10('0x3b')][_0xbb10('0x59')]({'where':{'id':_0x51f106[_0xbb10('0x56')]['id']},'include':[{'model':db[_0xbb10('0x7b')],'as':_0xbb10('0x7b')}]})['then'](handleEntityNotFound(_0xe1fc51,null))[_0xbb10('0x23')](function(_0x742e10){if(_0x742e10){return _0xe1fc51['download'](path[_0xbb10('0x82')](_0x3fa344,_0x742e10['Attachment'][_0xbb10('0x81')]));}})[_0xbb10('0x54')](handleError(_0xe1fc51,null));};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.events.js b/server/api/faxMessage/faxMessage.events.js
index 5b80afa..9cd7a36 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 _0xe14b=['hasOwnProperty','hook','exports','events','../../mysqldb','save','update','emit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe14b,0x93));var _0xbe14=function(_0x5aa067,_0x2656ea){_0x5aa067=_0x5aa067-0x0;var _0x2210ae=_0xe14b[_0x5aa067];return _0x2210ae;};'use strict';var EventEmitter=require(_0xbe14('0x0'));var FaxMessage=require(_0xbe14('0x1'))['db']['FaxMessage'];var FaxMessageEvents=new EventEmitter();FaxMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbe14('0x2'),'afterUpdate':_0xbe14('0x3'),'afterDestroy':'remove'};function emitEvent(_0x7d3665){return function(_0x5ce8fb,_0x496c04,_0x1833e3){FaxMessageEvents[_0xbe14('0x4')](_0x7d3665+':'+_0x5ce8fb['id'],_0x5ce8fb);FaxMessageEvents[_0xbe14('0x4')](_0x7d3665,_0x5ce8fb);_0x1833e3(null);};}for(var e in events){if(events[_0xbe14('0x5')](e)){var event=events[e];FaxMessage[_0xbe14('0x6')](e,emitEvent(event));}}module[_0xbe14('0x7')]=FaxMessageEvents;
\ No newline at end of file
+var _0x9957=['setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxMessage'];(function(_0x47b3cf,_0x5bcca2){var _0x346ff2=function(_0x1dcc1a){while(--_0x1dcc1a){_0x47b3cf['push'](_0x47b3cf['shift']());}};_0x346ff2(++_0x5bcca2);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var EventEmitter=require(_0x7995('0x0'));var FaxMessage=require(_0x7995('0x1'))['db'][_0x7995('0x2')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x7995('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7995('0x4'),'afterDestroy':_0x7995('0x5')};function emitEvent(_0x1902b4){return function(_0x462a03,_0x576d89,_0x744bea){FaxMessageEvents[_0x7995('0x6')](_0x1902b4+':'+_0x462a03['id'],_0x462a03);FaxMessageEvents[_0x7995('0x6')](_0x1902b4,_0x462a03);_0x744bea(null);};}for(var e in events){if(events[_0x7995('0x7')](e)){var event=events[e];FaxMessage[_0x7995('0x8')](e,emitEvent(event));}}module[_0x7995('0x9')]=FaxMessageEvents;
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.model.js b/server/api/faxMessage/faxMessage.model.js
index bde0f7c..707f537 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 _0x80f3=['catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports','define','FaxMessage','fax_messages','body','FULLTEXT','models','get','direction','toLowerCase','out','isNil','UserId','FaxInteraction','FaxInteractionId','then','update','createdAt'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x80f3,0x1a7));var _0x380f=function(_0x80d733,_0x266211){_0x80d733=_0x80d733-0x0;var _0x435868=_0x80f3[_0x80d733];return _0x435868;};'use strict';var _=require(_0x380f('0x0'));var util=require(_0x380f('0x1'));var logger=require(_0x380f('0x2'))(_0x380f('0x3'));var moment=require(_0x380f('0x4'));var BPromise=require(_0x380f('0x5'));var rp=require(_0x380f('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x380f('0x7'));var config=require(_0x380f('0x8'));var attributes=require('./faxMessage.attributes');module[_0x380f('0x9')]=function(_0x29aa31,_0x43add8){return _0x29aa31[_0x380f('0xa')](_0x380f('0xb'),attributes,{'tableName':_0x380f('0xc'),'paranoid':![],'indexes':[{'name':'fti_fax_messages','fields':[_0x380f('0xd')],'type':_0x380f('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x4662b0,_0x45efee,_0x18fc52){var _0x5503f9=_0x29aa31[_0x380f('0xf')];var _0x6516b=_0x4662b0[_0x380f('0x10')]({'plain':!![]});if(_0x6516b[_0x380f('0x11')][_0x380f('0x12')]()==='in'||_0x6516b[_0x380f('0x11')]['toLowerCase']()===_0x380f('0x13')&&!_0x6516b['secret']&&!_[_0x380f('0x14')](_0x6516b[_0x380f('0x15')])){_0x5503f9[_0x380f('0x16')]['findOne']({'where':{'id':_0x6516b[_0x380f('0x17')]}})[_0x380f('0x18')](function(_0x107113){if(_0x107113){_0x107113[_0x380f('0x19')]({'lastMsgAt':_0x6516b[_0x380f('0x1a')],'lastMsgDirection':_0x6516b[_0x380f('0x11')][_0x380f('0x12')]()});}})[_0x380f('0x1b')](function(_0x4790e4){console['error'](_0x4790e4);});}_0x18fc52();}},'charset':_0x380f('0x1c'),'collate':_0x380f('0x1d')});};
\ No newline at end of file
+var _0xc82e=['direction','toLowerCase','out','isNil','UserId','findOne','FaxInteractionId','then','update','createdAt','catch','error','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./faxMessage.attributes','exports','define','FaxMessage','fax_messages','body','models','get'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xc82e,0x85));var _0xec82=function(_0x55a975,_0x44dc51){_0x55a975=_0x55a975-0x0;var _0x94b368=_0xc82e[_0x55a975];return _0x94b368;};'use strict';var _=require(_0xec82('0x0'));var util=require(_0xec82('0x1'));var logger=require(_0xec82('0x2'))(_0xec82('0x3'));var moment=require(_0xec82('0x4'));var BPromise=require(_0xec82('0x5'));var rp=require(_0xec82('0x6'));var fs=require('fs');var path=require(_0xec82('0x7'));var rimraf=require(_0xec82('0x8'));var config=require('../../config/environment');var attributes=require(_0xec82('0x9'));module[_0xec82('0xa')]=function(_0x3e0c67,_0x534d4e){return _0x3e0c67[_0xec82('0xb')](_0xec82('0xc'),attributes,{'tableName':_0xec82('0xd'),'paranoid':![],'indexes':[{'name':'fti_fax_messages','fields':[_0xec82('0xe')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x3124b2,_0x5901bb,_0x1b5047){var _0x1ec999=_0x3e0c67[_0xec82('0xf')];var _0x382b6e=_0x3124b2[_0xec82('0x10')]({'plain':!![]});if(_0x382b6e[_0xec82('0x11')][_0xec82('0x12')]()==='in'||_0x382b6e[_0xec82('0x11')]['toLowerCase']()===_0xec82('0x13')&&!_0x382b6e['secret']&&!_[_0xec82('0x14')](_0x382b6e[_0xec82('0x15')])){_0x1ec999['FaxInteraction'][_0xec82('0x16')]({'where':{'id':_0x382b6e[_0xec82('0x17')]}})[_0xec82('0x18')](function(_0xe0a35d){if(_0xe0a35d){_0xe0a35d[_0xec82('0x19')]({'lastMsgAt':_0x382b6e[_0xec82('0x1a')],'lastMsgDirection':_0x382b6e[_0xec82('0x11')][_0xec82('0x12')]()});}})[_0xec82('0x1b')](function(_0x36098a){console[_0xec82('0x1c')](_0x36098a);});}_0x1b5047();}},'charset':'utf8mb4','collate':_0xec82('0x1d')});};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.rpc.js b/server/api/faxMessage/faxMessage.rpc.js
index ddcca6d..60a0272 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 _0xbe0f=['util','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','defaults','redis','localhost','socket.io-emitter','register','request','then','info','request\x20sent','debug','stringify','error','code','FaxMessage,\x20%s,\x20%s','message','result','catch','FaxMessage','create','body','options','raw','CreateFaxMessage','where','attributes','limit','UpdateFaxMessage','lodash'];(function(_0x103599,_0x12ade1){var _0x87f531=function(_0x33830d){while(--_0x33830d){_0x103599['push'](_0x103599['shift']());}};_0x87f531(++_0x12ade1);}(_0xbe0f,0x1d3));var _0xfbe0=function(_0x279a96,_0x28d0e8){_0x279a96=_0x279a96-0x0;var _0x967f87=_0xbe0f[_0x279a96];return _0x967f87;};'use strict';var _=require(_0xfbe0('0x0'));var util=require(_0xfbe0('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xfbe0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfbe0('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xfbe0('0x4'))(_0xfbe0('0x5'));var config=require(_0xfbe0('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xfbe0('0x7')][_0xfbe0('0x8')]({'port':0x232a});config['redis']=_[_0xfbe0('0x9')](config[_0xfbe0('0xa')],{'host':_0xfbe0('0xb'),'port':0x18eb});var socket=require(_0xfbe0('0xc'))(new Redis(config[_0xfbe0('0xa')]));require('./faxMessage.socket')[_0xfbe0('0xd')](socket);function respondWithRpcPromise(_0x3e404a,_0x304b21,_0x586904){return new BPromise(function(_0x4f1b9b,_0x3cdef7){return client[_0xfbe0('0xe')](_0x3e404a,_0x586904)[_0xfbe0('0xf')](function(_0x271514){logger[_0xfbe0('0x10')]('FaxMessage,\x20%s,\x20%s',_0x304b21,_0xfbe0('0x11'));logger[_0xfbe0('0x12')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x304b21,_0xfbe0('0x11'),JSON[_0xfbe0('0x13')](_0x271514));if(_0x271514[_0xfbe0('0x14')]){if(_0x271514[_0xfbe0('0x14')][_0xfbe0('0x15')]===0x1f4){logger[_0xfbe0('0x14')](_0xfbe0('0x16'),_0x304b21,_0x271514[_0xfbe0('0x14')][_0xfbe0('0x17')]);return _0x3cdef7(_0x271514[_0xfbe0('0x14')][_0xfbe0('0x17')]);}logger[_0xfbe0('0x14')](_0xfbe0('0x16'),_0x304b21,_0x271514[_0xfbe0('0x14')][_0xfbe0('0x17')]);return _0x4f1b9b(_0x271514[_0xfbe0('0x14')][_0xfbe0('0x17')]);}else{logger['info']('FaxMessage,\x20%s,\x20%s',_0x304b21,'request\x20sent');_0x4f1b9b(_0x271514[_0xfbe0('0x18')][_0xfbe0('0x17')]);}})[_0xfbe0('0x19')](function(_0x4a5577){logger[_0xfbe0('0x14')](_0xfbe0('0x16'),_0x304b21,_0x4a5577);_0x3cdef7(_0x4a5577);});});}exports['CreateFaxMessage']=function(_0x721dac){var _0x26bebe=this;return new Promise(function(_0x1cfe67,_0x3bdb0b){return db[_0xfbe0('0x1a')][_0xfbe0('0x1b')](_0x721dac[_0xfbe0('0x1c')],{'raw':_0x721dac[_0xfbe0('0x1d')]?_0x721dac[_0xfbe0('0x1d')][_0xfbe0('0x1e')]===undefined?!![]:![]:!![]})[_0xfbe0('0xf')](function(_0x55eaf4){logger[_0xfbe0('0x10')]('CreateFaxMessage',_0x721dac);logger[_0xfbe0('0x12')](_0xfbe0('0x1f'),_0x721dac,JSON[_0xfbe0('0x13')](_0x55eaf4));_0x1cfe67(_0x55eaf4);})['catch'](function(_0xa4ddf7){logger['error'](_0xfbe0('0x1f'),_0xa4ddf7[_0xfbe0('0x17')],_0x721dac);_0x3bdb0b(_0x26bebe['error'](0x1f4,_0xa4ddf7['message']));});});};exports['UpdateFaxMessage']=function(_0x21f12b){var _0xe1392b=this;return new Promise(function(_0xc2d77c,_0x1b5788){return db[_0xfbe0('0x1a')]['update'](_0x21f12b[_0xfbe0('0x1c')],{'raw':_0x21f12b[_0xfbe0('0x1d')]?_0x21f12b[_0xfbe0('0x1d')][_0xfbe0('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x21f12b[_0xfbe0('0x1d')]?_0x21f12b[_0xfbe0('0x1d')][_0xfbe0('0x20')]||null:null,'attributes':_0x21f12b[_0xfbe0('0x1d')]?_0x21f12b[_0xfbe0('0x1d')][_0xfbe0('0x21')]||null:null,'limit':_0x21f12b[_0xfbe0('0x1d')]?_0x21f12b[_0xfbe0('0x1d')][_0xfbe0('0x22')]||null:null})[_0xfbe0('0xf')](function(_0x11d116){logger[_0xfbe0('0x10')](_0xfbe0('0x23'),_0x21f12b);logger[_0xfbe0('0x12')](_0xfbe0('0x23'),_0x21f12b,JSON[_0xfbe0('0x13')](_0x11d116));_0xc2d77c(_0x11d116);})[_0xfbe0('0x19')](function(_0x2aef0c){logger['error'](_0xfbe0('0x23'),_0x2aef0c[_0xfbe0('0x17')],_0x21f12b);_0x1b5788(_0xe1392b[_0xfbe0('0x14')](0x1f4,_0x2aef0c[_0xfbe0('0x17')]));});});};
\ No newline at end of file
+var _0x0a35=['socket.io-emitter','./faxMessage.socket','register','request','info','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','error','code','FaxMessage,\x20%s,\x20%s','message','result','catch','CreateFaxMessage','FaxMessage','create','body','options','raw','stringify','update','attributes','limit','UpdateFaxMessage','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','defaults','redis'];(function(_0x8e69da,_0x4b916b){var _0x161ac8=function(_0x1eece0){while(--_0x1eece0){_0x8e69da['push'](_0x8e69da['shift']());}};_0x161ac8(++_0x4b916b);}(_0x0a35,0xe1));var _0x50a3=function(_0x10aa73,_0xc744f4){_0x10aa73=_0x10aa73-0x0;var _0x3496d9=_0x0a35[_0x10aa73];return _0x3496d9;};'use strict';var _=require(_0x50a3('0x0'));var util=require(_0x50a3('0x1'));var moment=require(_0x50a3('0x2'));var BPromise=require(_0x50a3('0x3'));var rs=require(_0x50a3('0x4'));var fs=require('fs');var Redis=require(_0x50a3('0x5'));var db=require(_0x50a3('0x6'))['db'];var utils=require(_0x50a3('0x7'));var logger=require(_0x50a3('0x8'))('rpc');var config=require(_0x50a3('0x9'));var jayson=require(_0x50a3('0xa'));var client=jayson[_0x50a3('0xb')][_0x50a3('0xc')]({'port':0x232a});config['redis']=_[_0x50a3('0xd')](config[_0x50a3('0xe')],{'host':'localhost','port':0x18eb});var socket=require(_0x50a3('0xf'))(new Redis(config[_0x50a3('0xe')]));require(_0x50a3('0x10'))[_0x50a3('0x11')](socket);function respondWithRpcPromise(_0x166474,_0x557506,_0x2b91e9){return new BPromise(function(_0x3a526d,_0x3b2114){return client[_0x50a3('0x12')](_0x166474,_0x2b91e9)['then'](function(_0x4c7fe5){logger[_0x50a3('0x13')]('FaxMessage,\x20%s,\x20%s',_0x557506,_0x50a3('0x14'));logger[_0x50a3('0x15')](_0x50a3('0x16'),_0x557506,_0x50a3('0x14'),JSON['stringify'](_0x4c7fe5));if(_0x4c7fe5['error']){if(_0x4c7fe5[_0x50a3('0x17')][_0x50a3('0x18')]===0x1f4){logger[_0x50a3('0x17')](_0x50a3('0x19'),_0x557506,_0x4c7fe5[_0x50a3('0x17')]['message']);return _0x3b2114(_0x4c7fe5[_0x50a3('0x17')][_0x50a3('0x1a')]);}logger['error'](_0x50a3('0x19'),_0x557506,_0x4c7fe5['error'][_0x50a3('0x1a')]);return _0x3a526d(_0x4c7fe5[_0x50a3('0x17')][_0x50a3('0x1a')]);}else{logger[_0x50a3('0x13')](_0x50a3('0x19'),_0x557506,_0x50a3('0x14'));_0x3a526d(_0x4c7fe5[_0x50a3('0x1b')][_0x50a3('0x1a')]);}})[_0x50a3('0x1c')](function(_0x29e369){logger[_0x50a3('0x17')]('FaxMessage,\x20%s,\x20%s',_0x557506,_0x29e369);_0x3b2114(_0x29e369);});});}exports[_0x50a3('0x1d')]=function(_0x4435c9){var _0xc3e4b2=this;return new Promise(function(_0x27a69f,_0x55a60f){return db[_0x50a3('0x1e')][_0x50a3('0x1f')](_0x4435c9[_0x50a3('0x20')],{'raw':_0x4435c9[_0x50a3('0x21')]?_0x4435c9['options'][_0x50a3('0x22')]===undefined?!![]:![]:!![]})['then'](function(_0x347e29){logger[_0x50a3('0x13')](_0x50a3('0x1d'),_0x4435c9);logger[_0x50a3('0x15')](_0x50a3('0x1d'),_0x4435c9,JSON[_0x50a3('0x23')](_0x347e29));_0x27a69f(_0x347e29);})['catch'](function(_0x353e65){logger[_0x50a3('0x17')](_0x50a3('0x1d'),_0x353e65[_0x50a3('0x1a')],_0x4435c9);_0x55a60f(_0xc3e4b2[_0x50a3('0x17')](0x1f4,_0x353e65[_0x50a3('0x1a')]));});});};exports['UpdateFaxMessage']=function(_0x1d1195){var _0x3a566b=this;return new Promise(function(_0x14f3c1,_0x51dd05){return db['FaxMessage'][_0x50a3('0x24')](_0x1d1195[_0x50a3('0x20')],{'raw':_0x1d1195['options']?_0x1d1195['options'][_0x50a3('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1d1195[_0x50a3('0x21')]?_0x1d1195['options']['where']||null:null,'attributes':_0x1d1195[_0x50a3('0x21')]?_0x1d1195[_0x50a3('0x21')][_0x50a3('0x25')]||null:null,'limit':_0x1d1195[_0x50a3('0x21')]?_0x1d1195[_0x50a3('0x21')][_0x50a3('0x26')]||null:null})['then'](function(_0x38f3d2){logger[_0x50a3('0x13')](_0x50a3('0x27'),_0x1d1195);logger['debug'](_0x50a3('0x27'),_0x1d1195,JSON['stringify'](_0x38f3d2));_0x14f3c1(_0x38f3d2);})[_0x50a3('0x1c')](function(_0x3cd70c){logger[_0x50a3('0x17')]('UpdateFaxMessage',_0x3cd70c[_0x50a3('0x1a')],_0x1d1195);_0x51dd05(_0x3a566b['error'](0x1f4,_0x3cd70c['message']));});});};
\ No newline at end of file
diff --git a/server/api/faxMessage/faxMessage.socket.js b/server/api/faxMessage/faxMessage.socket.js
index 6545e29..a9cccbe 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 _0xa9e0=['register','length','faxMessage:','./faxMessage.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(_0x56482c,_0x16118d){_0x56482c=_0x56482c-0x0;var _0x5aae7a=_0xa9e0[_0x56482c];return _0x5aae7a;};'use strict';var FaxMessageEvents=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(){FaxMessageEvents[_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);FaxMessageEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
+var _0xa9e0=['register','length','faxMessage:','./faxMessage.events','save','remove','emit','removeListener'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xa9e0[_0x3947c9];return _0x2e7871;};'use strict';var FaxMessageEvents=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(){FaxMessageEvents[_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);FaxMessageEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
diff --git a/server/api/faxMessage/index.js b/server/api/faxMessage/index.js
index 39b161b..2f4aeab 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 _0xce89=['../../components/interaction/service','../../config/environment','isAuthenticated','index','/:id','show','get','/:id/download','download','post','fax','create','put','update','accept','/:id/reject','reject','exports','multer','util','path','connect-timeout','Router','../../components/auth/service'];(function(_0x1b5aea,_0x3f04b7){var _0x15cfc6=function(_0x204e92){while(--_0x204e92){_0x1b5aea['push'](_0x1b5aea['shift']());}};_0x15cfc6(++_0x3f04b7);}(_0xce89,0x1aa));var _0x9ce8=function(_0x51fadf,_0x16c8ea){_0x51fadf=_0x51fadf-0x0;var _0x5ca024=_0xce89[_0x51fadf];return _0x5ca024;};'use strict';var multer=require(_0x9ce8('0x0'));var util=require(_0x9ce8('0x1'));var path=require(_0x9ce8('0x2'));var timeout=require(_0x9ce8('0x3'));var express=require('express');var router=express[_0x9ce8('0x4')]();var auth=require(_0x9ce8('0x5'));var interaction=require(_0x9ce8('0x6'));var config=require(_0x9ce8('0x7'));var controller=require('./faxMessage.controller');router['get']('/',auth[_0x9ce8('0x8')](),controller[_0x9ce8('0x9')]);router['get']('/describe',auth[_0x9ce8('0x8')](),controller['describe']);router['get'](_0x9ce8('0xa'),auth[_0x9ce8('0x8')](),controller[_0x9ce8('0xb')]);router[_0x9ce8('0xc')](_0x9ce8('0xd'),auth[_0x9ce8('0x8')](),controller[_0x9ce8('0xe')]);router[_0x9ce8('0xf')]('/',auth['isAuthenticated'](),interaction['tracked'](_0x9ce8('0x10'),'faxmessage:create'),controller[_0x9ce8('0x11')]);router[_0x9ce8('0x12')](_0x9ce8('0xa'),auth[_0x9ce8('0x8')](),controller[_0x9ce8('0x13')]);router[_0x9ce8('0x12')]('/:id/accept',auth[_0x9ce8('0x8')](),controller[_0x9ce8('0x14')]);router[_0x9ce8('0x12')](_0x9ce8('0x15'),auth[_0x9ce8('0x8')](),controller[_0x9ce8('0x16')]);router['delete'](_0x9ce8('0xa'),auth[_0x9ce8('0x8')](),controller['destroy']);module[_0x9ce8('0x17')]=router;
\ No newline at end of file
+var _0x0e7a=['../../components/interaction/service','../../config/environment','./faxMessage.controller','isAuthenticated','index','get','/describe','describe','/:id/download','download','post','tracked','fax','faxmessage:create','create','put','/:id','/:id/accept','accept','reject','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service'];(function(_0x1a0769,_0xbd0de6){var _0x4bae96=function(_0x1766b5){while(--_0x1766b5){_0x1a0769['push'](_0x1a0769['shift']());}};_0x4bae96(++_0xbd0de6);}(_0x0e7a,0xff));var _0xa0e7=function(_0x5385f5,_0x554c1b){_0x5385f5=_0x5385f5-0x0;var _0x1eac01=_0x0e7a[_0x5385f5];return _0x1eac01;};'use strict';var multer=require(_0xa0e7('0x0'));var util=require(_0xa0e7('0x1'));var path=require(_0xa0e7('0x2'));var timeout=require(_0xa0e7('0x3'));var express=require('express');var router=express[_0xa0e7('0x4')]();var auth=require(_0xa0e7('0x5'));var interaction=require(_0xa0e7('0x6'));var config=require(_0xa0e7('0x7'));var controller=require(_0xa0e7('0x8'));router['get']('/',auth[_0xa0e7('0x9')](),controller[_0xa0e7('0xa')]);router[_0xa0e7('0xb')](_0xa0e7('0xc'),auth[_0xa0e7('0x9')](),controller[_0xa0e7('0xd')]);router[_0xa0e7('0xb')]('/:id',auth[_0xa0e7('0x9')](),controller['show']);router[_0xa0e7('0xb')](_0xa0e7('0xe'),auth['isAuthenticated'](),controller[_0xa0e7('0xf')]);router[_0xa0e7('0x10')]('/',auth[_0xa0e7('0x9')](),interaction[_0xa0e7('0x11')](_0xa0e7('0x12'),_0xa0e7('0x13')),controller[_0xa0e7('0x14')]);router[_0xa0e7('0x15')](_0xa0e7('0x16'),auth[_0xa0e7('0x9')](),controller['update']);router[_0xa0e7('0x15')](_0xa0e7('0x17'),auth[_0xa0e7('0x9')](),controller[_0xa0e7('0x18')]);router['put']('/:id/reject',auth[_0xa0e7('0x9')](),controller[_0xa0e7('0x19')]);router[_0xa0e7('0x1a')](_0xa0e7('0x16'),auth[_0xa0e7('0x9')](),controller[_0xa0e7('0x1b')]);module[_0xa0e7('0x1c')]=router;
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.attributes.js b/server/api/faxQueue/faxQueue.attributes.js
index c508128..9b21834 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 _0xccf3=['sequelize','exports','STRING','name','rrmemory','roundrobin','INTEGER'];(function(_0x2b6f06,_0x6c6fd5){var _0x3d10e1=function(_0x511d1d){while(--_0x511d1d){_0x2b6f06['push'](_0x2b6f06['shift']());}};_0x3d10e1(++_0x6c6fd5);}(_0xccf3,0xf5));var _0x3ccf=function(_0x3599ed,_0x3f819e){_0x3599ed=_0x3599ed-0x0;var _0x4334cd=_0xccf3[_0x3599ed];return _0x4334cd;};'use strict';var Sequelize=require(_0x3ccf('0x0'));module[_0x3ccf('0x1')]={'name':{'type':Sequelize[_0x3ccf('0x2')],'unique':_0x3ccf('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x3ccf('0x2')]},'timeout':{'type':Sequelize['INTEGER'],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x3ccf('0x4'),'beepall',_0x3ccf('0x5')),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x3ccf('0x6')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xb545=['INTEGER','ENUM','rrmemory','roundrobin','exports','name','STRING'];(function(_0x336ca2,_0x1a813a){var _0xda59a6=function(_0x47caa6){while(--_0x47caa6){_0x336ca2['push'](_0x336ca2['shift']());}};_0xda59a6(++_0x1a813a);}(_0xb545,0xcf));var _0x5b54=function(_0x178247,_0x41c6d3){_0x178247=_0x178247-0x0;var _0x4eb948=_0xb545[_0x178247];return _0x4eb948;};'use strict';var Sequelize=require('sequelize');module[_0x5b54('0x0')]={'name':{'type':Sequelize['STRING'],'unique':_0x5b54('0x1'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x5b54('0x2')]},'timeout':{'type':Sequelize[_0x5b54('0x3')],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x5b54('0x4')](_0x5b54('0x5'),'beepall',_0x5b54('0x6')),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x5b54('0x3')],'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 f229cae..456c834 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 _0x0ffc=['toString','sequelize','SELECT','every','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','emit','addAgents','spread','userFaxQueue:save','userFaxQueue:remove','getAgents','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','socket.io-emitter','status','end','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','get','FaxQueues','sendStatus','error','send','index','map','FaxQueue','rawAttributes','type','name','keys','query','filters','intersection','model','attributes','fields','length','nolimit','limit','order','sort','pick','filter','VIRTUAL','merge','options','where','includeAll','include','catch','show','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','getMembers','UserFaxQueue','hasOwnProperty','FaxQueueId','findAll','User','findAndCountAll','UserId','agent','faxPause','updatedAt','rows','%s/%s','SIP','createdAt','getTeams','findOne','addTeams','ids','Team','Agents','voicePause','transaction','each','findOrCreate','forEach','removeTeams','select','field','tq.TeamId','from','team_has_fax_queues','join','user_has_teams','FaxQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push'];(function(_0x4c98b9,_0x1ad11b){var _0x3a257a=function(_0x147857){while(--_0x147857){_0x4c98b9['push'](_0x4c98b9['shift']());}};_0x3a257a(++_0x1ad11b);}(_0x0ffc,0x9e));var _0xc0ff=function(_0x3a37d9,_0x188ebd){_0x3a37d9=_0x3a37d9-0x0;var _0x3b8f03=_0x0ffc[_0x3a37d9];return _0x3b8f03;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xc0ff('0x0'));var rimraf=require(_0xc0ff('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc0ff('0x2'));var rp=require('request-promise');var moment=require(_0xc0ff('0x3'));var BPromise=require(_0xc0ff('0x4'));var Mustache=require(_0xc0ff('0x5'));var util=require(_0xc0ff('0x6'));var path=require(_0xc0ff('0x7'));var sox=require(_0xc0ff('0x8'));var csv=require(_0xc0ff('0x9'));var ejs=require(_0xc0ff('0xa'));var fs=require('fs');var _=require(_0xc0ff('0xb'));var squel=require('squel');var crypto=require(_0xc0ff('0xc'));var jsforce=require(_0xc0ff('0xd'));var deskjs=require(_0xc0ff('0xe'));var toCsv=require(_0xc0ff('0x9'));var querystring=require(_0xc0ff('0xf'));var Papa=require(_0xc0ff('0x10'));var Redis=require(_0xc0ff('0x11'));var authService=require(_0xc0ff('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc0ff('0x13'));var logger=require('../../config/logger')(_0xc0ff('0x14'));var utils=require(_0xc0ff('0x15'));var config=require(_0xc0ff('0x16'));var db=require(_0xc0ff('0x17'))['db'];config['redis']=_[_0xc0ff('0x18')](config[_0xc0ff('0x19')],{'host':'localhost','port':0x18eb});var socket=require(_0xc0ff('0x1a'))(new Redis(config['redis']));require('./faxQueue.socket')['register'](socket);function respondWithStatusCode(_0x2384b0,_0xa91369){_0xa91369=_0xa91369||0xcc;return function(_0x22c91d){if(_0x22c91d){return _0x2384b0['sendStatus'](_0xa91369);}return _0x2384b0[_0xc0ff('0x1b')](_0xa91369)[_0xc0ff('0x1c')]();};}function respondWithResult(_0x2ddf56,_0x3ab92b){_0x3ab92b=_0x3ab92b||0xc8;return function(_0x2752f1){if(_0x2752f1){return _0x2ddf56[_0xc0ff('0x1b')](_0x3ab92b)[_0xc0ff('0x1d')](_0x2752f1);}};}function respondWithFilteredResult(_0x33c72a,_0x136b31){return function(_0x11014a){if(_0x11014a){var _0x265a63=_0x11014a[_0xc0ff('0x1e')],_0x4e8a36=_0x136b31[_0xc0ff('0x1f')],_0x21b852=_0x136b31[_0xc0ff('0x1f')]+_0x136b31['limit'],_0x5939e9;if(_0x21b852>=_0x265a63){_0x21b852=_0x265a63;_0x5939e9=0xc8;}else{_0x5939e9=0xce;}_0x33c72a[_0xc0ff('0x1b')](_0x5939e9);return _0x33c72a[_0xc0ff('0x20')](_0xc0ff('0x21'),_0x4e8a36+'-'+_0x21b852+'/'+_0x265a63)[_0xc0ff('0x1d')](_0x11014a);}return null;};}function patchUpdates(_0x362db7){return function(_0x1fd7ad){try{jsonpatch[_0xc0ff('0x22')](_0x1fd7ad,_0x362db7,!![]);}catch(_0x23b2a0){return BPromise[_0xc0ff('0x23')](_0x23b2a0);}return _0x1fd7ad[_0xc0ff('0x24')]();};}function saveUpdates(_0x153850,_0x219be9){return function(_0xee982d){if(_0xee982d){return _0xee982d[_0xc0ff('0x25')](_0x153850)[_0xc0ff('0x26')](function(_0x26ce8a){return _0x26ce8a;});}return null;};}function removeEntity(_0x5ce43e,_0x4200d4){return function(_0x5ba2c3){if(_0x5ba2c3){return _0x5ba2c3[_0xc0ff('0x27')]()[_0xc0ff('0x26')](function(){var _0x421924=_0x5ba2c3[_0xc0ff('0x28')]({'plain':!![]});var _0x25f8a0=_0xc0ff('0x29');return db['UserProfileResource'][_0xc0ff('0x27')]({'where':{'type':_0x25f8a0,'resourceId':_0x421924['id']}})[_0xc0ff('0x26')](function(){return _0x5ba2c3;});})['then'](function(){_0x5ce43e['status'](0xcc)[_0xc0ff('0x1c')]();});}};}function handleEntityNotFound(_0x1ea3a9,_0x2509ce){return function(_0x1b0fe2){if(!_0x1b0fe2){_0x1ea3a9[_0xc0ff('0x2a')](0x194);}return _0x1b0fe2;};}function handleError(_0xd0115e,_0x3d5699){_0x3d5699=_0x3d5699||0x1f4;return function(_0xed7156){logger[_0xc0ff('0x2b')](_0xed7156['stack']);if(_0xed7156['name']){delete _0xed7156['name'];}_0xd0115e[_0xc0ff('0x1b')](_0x3d5699)[_0xc0ff('0x2c')](_0xed7156);};}exports[_0xc0ff('0x2d')]=function(_0xf60f5a,_0x5c17ff){var _0x773814={},_0x1cd2d4={},_0x327822={'count':0x0,'rows':[]};var _0x22c943=_[_0xc0ff('0x2e')](db[_0xc0ff('0x2f')][_0xc0ff('0x30')],function(_0xb99550){return{'name':_0xb99550['fieldName'],'type':_0xb99550[_0xc0ff('0x31')]['key']};});_0x1cd2d4['model']=_[_0xc0ff('0x2e')](_0x22c943,_0xc0ff('0x32'));_0x1cd2d4['query']=_[_0xc0ff('0x33')](_0xf60f5a[_0xc0ff('0x34')]);_0x1cd2d4[_0xc0ff('0x35')]=_[_0xc0ff('0x36')](_0x1cd2d4[_0xc0ff('0x37')],_0x1cd2d4[_0xc0ff('0x34')]);_0x773814[_0xc0ff('0x38')]=_['intersection'](_0x1cd2d4[_0xc0ff('0x37')],qs[_0xc0ff('0x39')](_0xf60f5a['query'][_0xc0ff('0x39')]));_0x773814[_0xc0ff('0x38')]=_0x773814[_0xc0ff('0x38')][_0xc0ff('0x3a')]?_0x773814[_0xc0ff('0x38')]:_0x1cd2d4['model'];if(!_0xf60f5a['query']['hasOwnProperty'](_0xc0ff('0x3b'))){_0x773814[_0xc0ff('0x3c')]=qs[_0xc0ff('0x3c')](_0xf60f5a[_0xc0ff('0x34')][_0xc0ff('0x3c')]);_0x773814['offset']=qs[_0xc0ff('0x1f')](_0xf60f5a['query']['offset']);}_0x773814[_0xc0ff('0x3d')]=qs[_0xc0ff('0x3e')](_0xf60f5a['query'][_0xc0ff('0x3e')]);_0x773814['where']=qs[_0xc0ff('0x35')](_[_0xc0ff('0x3f')](_0xf60f5a[_0xc0ff('0x34')],_0x1cd2d4[_0xc0ff('0x35')]));if(_0xf60f5a[_0xc0ff('0x34')][_0xc0ff('0x40')]){_0x773814['where']=_['merge'](_0x773814['where'],{'$or':_[_0xc0ff('0x2e')](_0x22c943,function(_0x135014){if(_0x135014[_0xc0ff('0x31')]!==_0xc0ff('0x41')){var _0x39e678={};_0x39e678[_0x135014['name']]={'$like':'%'+_0xf60f5a[_0xc0ff('0x34')][_0xc0ff('0x40')]+'%'};return _0x39e678;}})});}_0x773814=_[_0xc0ff('0x42')]({},_0x773814,_0xf60f5a[_0xc0ff('0x43')]);var _0x294bf3={'where':_0x773814[_0xc0ff('0x44')]};return db[_0xc0ff('0x2f')][_0xc0ff('0x1e')](_0x294bf3)[_0xc0ff('0x26')](function(_0x2e5c8b){_0x327822[_0xc0ff('0x1e')]=_0x2e5c8b;if(_0xf60f5a[_0xc0ff('0x34')][_0xc0ff('0x45')]){_0x773814[_0xc0ff('0x46')]=[{'all':!![]}];}return db[_0xc0ff('0x2f')]['findAll'](_0x773814);})[_0xc0ff('0x26')](function(_0x3e9336){_0x327822['rows']=_0x3e9336;return _0x327822;})[_0xc0ff('0x26')](respondWithFilteredResult(_0x5c17ff,_0x773814))[_0xc0ff('0x47')](handleError(_0x5c17ff,null));};exports[_0xc0ff('0x48')]=function(_0x1bd6a1,_0x3bc88d){var _0x125335={'raw':!![],'where':{'id':_0x1bd6a1['params']['id']}},_0x31e6cb={};_0x31e6cb[_0xc0ff('0x37')]=_[_0xc0ff('0x33')](db[_0xc0ff('0x2f')][_0xc0ff('0x30')]);_0x31e6cb[_0xc0ff('0x34')]=_[_0xc0ff('0x33')](_0x1bd6a1['query']);_0x31e6cb[_0xc0ff('0x35')]=_[_0xc0ff('0x36')](_0x31e6cb[_0xc0ff('0x37')],_0x31e6cb[_0xc0ff('0x34')]);_0x125335[_0xc0ff('0x38')]=_[_0xc0ff('0x36')](_0x31e6cb[_0xc0ff('0x37')],qs[_0xc0ff('0x39')](_0x1bd6a1[_0xc0ff('0x34')][_0xc0ff('0x39')]));_0x125335[_0xc0ff('0x38')]=_0x125335[_0xc0ff('0x38')][_0xc0ff('0x3a')]?_0x125335[_0xc0ff('0x38')]:_0x31e6cb[_0xc0ff('0x37')];if(_0x1bd6a1['query'][_0xc0ff('0x45')]){_0x125335[_0xc0ff('0x46')]=[{'all':!![]}];}_0x125335=_['merge']({},_0x125335,_0x1bd6a1[_0xc0ff('0x43')]);return db[_0xc0ff('0x2f')][_0xc0ff('0x49')](_0x125335)[_0xc0ff('0x26')](handleEntityNotFound(_0x3bc88d,null))[_0xc0ff('0x26')](respondWithResult(_0x3bc88d,null))['catch'](handleError(_0x3bc88d,null));};exports[_0xc0ff('0x4a')]=function(_0xf67716,_0x4cf99e){return db[_0xc0ff('0x2f')]['create'](_0xf67716[_0xc0ff('0x4b')],{})['then'](function(_0x3eca5e){var _0x3d9159=_0xf67716['user'][_0xc0ff('0x28')]({'plain':!![]});if(!_0x3d9159)throw new Error(_0xc0ff('0x4c'));if(_0x3d9159[_0xc0ff('0x4d')]===_0xc0ff('0x4e')){var _0x436ef2=_0x3eca5e['get']({'plain':!![]});var _0x196e46=_0xc0ff('0x29');return db['UserProfileSection'][_0xc0ff('0x49')]({'where':{'name':_0x196e46,'userProfileId':_0x3d9159[_0xc0ff('0x4f')]},'raw':!![]})[_0xc0ff('0x26')](function(_0x49a00f){if(_0x49a00f&&_0x49a00f[_0xc0ff('0x50')]===0x0){return db['UserProfileResource'][_0xc0ff('0x4a')]({'name':_0x436ef2[_0xc0ff('0x32')],'resourceId':_0x436ef2['id'],'type':_0x49a00f[_0xc0ff('0x32')],'sectionId':_0x49a00f['id']},{})[_0xc0ff('0x26')](function(){return _0x3eca5e;});}else{return _0x3eca5e;}})[_0xc0ff('0x47')](function(_0x1a186f){logger[_0xc0ff('0x2b')](_0xc0ff('0x51'),_0x1a186f);throw _0x1a186f;});}return _0x3eca5e;})[_0xc0ff('0x26')](respondWithResult(_0x4cf99e,0xc9))[_0xc0ff('0x47')](handleError(_0x4cf99e,null));};exports[_0xc0ff('0x25')]=function(_0x3b7825,_0x210ffb){if(_0x3b7825[_0xc0ff('0x4b')]['id']){delete _0x3b7825['body']['id'];}return db[_0xc0ff('0x2f')][_0xc0ff('0x49')]({'where':{'id':_0x3b7825[_0xc0ff('0x52')]['id']}})[_0xc0ff('0x26')](handleEntityNotFound(_0x210ffb,null))[_0xc0ff('0x26')](saveUpdates(_0x3b7825['body'],null))[_0xc0ff('0x26')](respondWithResult(_0x210ffb,null))[_0xc0ff('0x47')](handleError(_0x210ffb,null));};exports[_0xc0ff('0x27')]=function(_0x2be1cc,_0x350665){return db[_0xc0ff('0x2f')]['find']({'where':{'id':_0x2be1cc['params']['id']}})[_0xc0ff('0x26')](handleEntityNotFound(_0x350665,null))[_0xc0ff('0x26')](removeEntity(_0x350665,null))[_0xc0ff('0x47')](handleError(_0x350665,null));};exports[_0xc0ff('0x53')]=function(_0x51f38e,_0x27a18d){return db['FaxQueue'][_0xc0ff('0x53')]()[_0xc0ff('0x26')](respondWithResult(_0x27a18d,null))[_0xc0ff('0x47')](handleError(_0x27a18d,null));};exports[_0xc0ff('0x54')]=function(_0x22be6c,_0x568de9,_0x16cfa6){var _0x43c2f7={'raw':!![],'where':{}},_0x2f8122={},_0x2ab795;return db[_0xc0ff('0x2f')]['findOne']({'where':{'id':_0x22be6c[_0xc0ff('0x52')]['id']}})[_0xc0ff('0x26')](handleEntityNotFound(_0x568de9,null))['then'](function(_0x2cda14){if(_0x2cda14){_0x2ab795=_0x2cda14['get']({'plain':!![]});_0x2f8122[_0xc0ff('0x37')]=_[_0xc0ff('0x33')](db[_0xc0ff('0x55')][_0xc0ff('0x30')]);_0x2f8122[_0xc0ff('0x34')]=_[_0xc0ff('0x33')](_0x22be6c[_0xc0ff('0x34')]);_0x2f8122[_0xc0ff('0x35')]=_[_0xc0ff('0x36')](_0x2f8122[_0xc0ff('0x37')],_0x2f8122['query']);_0x43c2f7['attributes']=_[_0xc0ff('0x36')](_0x2f8122['model'],qs[_0xc0ff('0x39')](_0x22be6c[_0xc0ff('0x34')][_0xc0ff('0x39')]));_0x43c2f7[_0xc0ff('0x38')]=_0x43c2f7[_0xc0ff('0x38')][_0xc0ff('0x3a')]?_0x43c2f7[_0xc0ff('0x38')]:_0x2f8122['model'];if(!_0x22be6c['query'][_0xc0ff('0x56')]('nolimit')){_0x43c2f7[_0xc0ff('0x3c')]=qs[_0xc0ff('0x3c')](_0x22be6c['query'][_0xc0ff('0x3c')]);_0x43c2f7[_0xc0ff('0x1f')]=qs['offset'](_0x22be6c[_0xc0ff('0x34')][_0xc0ff('0x1f')]);}_0x43c2f7[_0xc0ff('0x3d')]=qs[_0xc0ff('0x3e')](_0x22be6c[_0xc0ff('0x34')]['sort']);_0x43c2f7['where']=qs[_0xc0ff('0x35')](_[_0xc0ff('0x3f')](_0x22be6c[_0xc0ff('0x34')],_0x2f8122[_0xc0ff('0x35')]));_0x43c2f7[_0xc0ff('0x44')][_0xc0ff('0x57')]=_0x2cda14['id'];if(_0x22be6c[_0xc0ff('0x34')][_0xc0ff('0x40')]){_0x43c2f7[_0xc0ff('0x44')]=_[_0xc0ff('0x42')](_0x43c2f7[_0xc0ff('0x44')],{'$or':_[_0xc0ff('0x2e')](_0x43c2f7['attributes'],function(_0x5261fc){var _0x1ecb4b={};_0x1ecb4b[_0x5261fc]={'$like':'%'+_0x22be6c[_0xc0ff('0x34')]['filter']+'%'};return _0x1ecb4b;})});}_0x43c2f7=_['merge']({},_0x43c2f7,_0x22be6c[_0xc0ff('0x43')]);return db[_0xc0ff('0x55')][_0xc0ff('0x58')](_0x43c2f7);}})[_0xc0ff('0x26')](function(_0x297dbe){if(_0x297dbe){return db[_0xc0ff('0x59')][_0xc0ff('0x5a')]({'where':{'id':_[_0xc0ff('0x2e')](_0x297dbe,_0xc0ff('0x5b')),'role':_0xc0ff('0x5c')},'attributes':['id','name',_0xc0ff('0x5d'),_0xc0ff('0x5e'),'createdAt']});}})[_0xc0ff('0x26')](function(_0x3c78f9){if(_0x3c78f9){return{'count':_0x3c78f9[_0xc0ff('0x1e')],'rows':_[_0xc0ff('0x2e')](_0x3c78f9[_0xc0ff('0x5f')],function(_0x5a359b){return{'membername':_0x5a359b['name'],'UserId':_0x5a359b['id'],'queue_name':_0x2ab795[_0xc0ff('0x32')],'FaxQueueId':_0x2ab795['id'],'interface':util['format'](_0xc0ff('0x60'),_0xc0ff('0x61'),_0x5a359b[_0xc0ff('0x32')]),'penalty':0x0,'paused':_0x5a359b[_0xc0ff('0x5d')],'createdAt':_0x5a359b[_0xc0ff('0x62')],'updatedAt':_0x5a359b['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x568de9,_0x43c2f7))[_0xc0ff('0x47')](handleError(_0x568de9,null));};exports[_0xc0ff('0x63')]=function(_0x5c3bac,_0x48df87,_0x344a23){var _0x39bd8f={};var _0xfa4855={};var _0x428d01;var _0x25a162;return db[_0xc0ff('0x2f')][_0xc0ff('0x64')]({'where':{'id':_0x5c3bac[_0xc0ff('0x52')]['id']}})[_0xc0ff('0x26')](handleEntityNotFound(_0x48df87,null))[_0xc0ff('0x26')](function(_0x1f799c){if(_0x1f799c){_0x428d01=_0x1f799c;_0xfa4855[_0xc0ff('0x37')]=_[_0xc0ff('0x33')](db['Team'][_0xc0ff('0x30')]);_0xfa4855[_0xc0ff('0x34')]=_[_0xc0ff('0x33')](_0x5c3bac['query']);_0xfa4855[_0xc0ff('0x35')]=_['intersection'](_0xfa4855[_0xc0ff('0x37')],_0xfa4855['query']);_0x39bd8f[_0xc0ff('0x38')]=_[_0xc0ff('0x36')](_0xfa4855[_0xc0ff('0x37')],qs['fields'](_0x5c3bac[_0xc0ff('0x34')][_0xc0ff('0x39')]));_0x39bd8f['attributes']=_0x39bd8f[_0xc0ff('0x38')]['length']?_0x39bd8f[_0xc0ff('0x38')]:_0xfa4855['model'];_0x39bd8f['order']=qs[_0xc0ff('0x3e')](_0x5c3bac[_0xc0ff('0x34')]['sort']);_0x39bd8f[_0xc0ff('0x44')]=qs[_0xc0ff('0x35')](_['pick'](_0x5c3bac[_0xc0ff('0x34')],_0xfa4855['filters']));if(_0x5c3bac[_0xc0ff('0x34')][_0xc0ff('0x40')]){_0x39bd8f['where']=_[_0xc0ff('0x42')](_0x39bd8f['where'],{'$or':_[_0xc0ff('0x2e')](_0x39bd8f['attributes'],function(_0x288ba5){var _0x20da33={};_0x20da33[_0x288ba5]={'$like':'%'+_0x5c3bac[_0xc0ff('0x34')][_0xc0ff('0x40')]+'%'};return _0x20da33;})});}_0x39bd8f=_[_0xc0ff('0x42')]({},_0x39bd8f,_0x5c3bac['options']);return _0x428d01[_0xc0ff('0x63')](_0x39bd8f);}})['then'](function(_0x72d3b0){if(_0x72d3b0){_0x25a162=_0x72d3b0['length'];if(!_0x5c3bac[_0xc0ff('0x34')][_0xc0ff('0x56')](_0xc0ff('0x3b'))){_0x39bd8f[_0xc0ff('0x3c')]=qs[_0xc0ff('0x3c')](_0x5c3bac[_0xc0ff('0x34')][_0xc0ff('0x3c')]);_0x39bd8f[_0xc0ff('0x1f')]=qs[_0xc0ff('0x1f')](_0x5c3bac[_0xc0ff('0x34')][_0xc0ff('0x1f')]);}return _0x428d01[_0xc0ff('0x63')](_0x39bd8f);}})[_0xc0ff('0x26')](function(_0x2f5e67){if(_0x2f5e67){return _0x2f5e67?{'count':_0x25a162,'rows':_0x2f5e67}:null;}})['then'](respondWithResult(_0x48df87,null))[_0xc0ff('0x47')](handleError(_0x48df87,null));};exports[_0xc0ff('0x65')]=function(_0x52e581,_0x2bd936,_0x3804eb){var _0x3f78d6=_0x52e581[_0xc0ff('0x4b')][_0xc0ff('0x66')];return db[_0xc0ff('0x67')]['findAll']({'where':{'id':_0x3f78d6},'attributes':['id'],'include':[{'model':db[_0xc0ff('0x59')],'as':_0xc0ff('0x68'),'attributes':['id',_0xc0ff('0x32'),'online',_0xc0ff('0x69'),'interface'],'raw':!![]}]})[_0xc0ff('0x26')](function(_0x4e302c){if(_0x4e302c){var _0x2ca0cc=_['flatMap'](_0x4e302c,function(_0x238e4a){var _0x4031d9=_0x238e4a['get']({'plain':!![]});return _0x4031d9[_0xc0ff('0x68')];});return db[_0xc0ff('0x2f')][_0xc0ff('0x49')]({'where':{'id':_0x52e581[_0xc0ff('0x52')]['id']}})[_0xc0ff('0x26')](function(_0x3e11e2){return db['sequelize'][_0xc0ff('0x6a')](function(_0x1d39c4){return _0x3e11e2[_0xc0ff('0x65')](_0x3f78d6,{'transaction':_0x1d39c4})[_0xc0ff('0x26')](function(){return BPromise[_0xc0ff('0x6b')](_0x2ca0cc,function(_0x474683){return db[_0xc0ff('0x55')][_0xc0ff('0x6c')]({'where':{'UserId':_0x474683['id'],'FaxQueueId':_0x52e581['params']['id']},'transaction':_0x1d39c4});});})[_0xc0ff('0x26')](function(){_0x2ca0cc[_0xc0ff('0x6d')](function(_0x5dbd4f){socket['emit']('userFaxQueue:save',{'UserId':_0x5dbd4f['id'],'FaxQueueId':_0x3e11e2['id']});});});});});}})[_0xc0ff('0x26')](respondWithStatusCode(_0x2bd936,null))[_0xc0ff('0x47')](handleError(_0x2bd936,null));};exports[_0xc0ff('0x6e')]=function(_0x302850,_0x4e3543,_0x41dfe6){return db[_0xc0ff('0x67')][_0xc0ff('0x58')]({'where':{'id':_0x302850[_0xc0ff('0x34')][_0xc0ff('0x66')]},'attributes':['id'],'include':[{'model':db[_0xc0ff('0x59')],'as':_0xc0ff('0x68'),'attributes':['id'],'raw':!![]}]})[_0xc0ff('0x26')](handleEntityNotFound(_0x4e3543,null))[_0xc0ff('0x26')](function(_0xa7e379){var _0x556546=_['map'](_0xa7e379,'id');var _0x4fa9ca=[];var _0x85ddb7=[];var _0x59d9da=squel[_0xc0ff('0x6f')]();_0x59d9da[_0xc0ff('0x70')](_0xc0ff('0x71'))[_0xc0ff('0x72')](_0xc0ff('0x73'),'tq')[_0xc0ff('0x74')](_0xc0ff('0x75'),'ut','ut.TeamId\x20=\x20tq.TeamId')['where'](_0xc0ff('0x76'),_0x302850['params']['id']);for(var _0x1f1658=0x0;_0x1f1658<_0xa7e379['length'];_0x1f1658+=0x1){let _0x20d27b=_0xa7e379[_0x1f1658];for(var _0x341871=0x0;_0x341871<_0x20d27b[_0xc0ff('0x68')][_0xc0ff('0x3a')];_0x341871+=0x1){let _0x11824c=_0x20d27b[_0xc0ff('0x68')][_0x341871];var _0x1d6e1d=_0x59d9da[_0xc0ff('0x77')]();_0x1d6e1d[_0xc0ff('0x44')](_0xc0ff('0x78'),_0x11824c['id']);_0x85ddb7[_0xc0ff('0x79')](db['sequelize'][_0xc0ff('0x34')](_0x1d6e1d[_0xc0ff('0x7a')](),{'type':db[_0xc0ff('0x7b')]['QueryTypes'][_0xc0ff('0x7c')]})[_0xc0ff('0x26')](function(_0x21a656){if(_0x21a656[_0xc0ff('0x3a')]===0x1){return _0x11824c['id'];}else{var _0x1f20a1=_[_0xc0ff('0x7d')](_[_0xc0ff('0x2e')](_0x21a656,_0xc0ff('0x7e')),function(_0x1a66e9){return _[_0xc0ff('0x7f')](_0x556546,_0x1a66e9);});if(_0x1f20a1){return _0x11824c['id'];}}}));}}return BPromise[_0xc0ff('0x80')](_0x85ddb7)['then'](function(_0x2fad96){_0x4fa9ca=_(_0x4fa9ca)[_0xc0ff('0x81')](_0x2fad96)[_0xc0ff('0x82')]()[_0xc0ff('0x83')]();return db['FaxQueue'][_0xc0ff('0x49')]({'where':{'id':_0x302850['params']['id']}})['then'](function(_0x2a64eb){return db[_0xc0ff('0x7b')][_0xc0ff('0x6a')](function(_0x1665b3){return _0x2a64eb['removeTeams'](_0x302850[_0xc0ff('0x34')]['ids'],{'transaction':_0x1665b3})[_0xc0ff('0x26')](function(){if(!_[_0xc0ff('0x84')](_0x4fa9ca)){return _0x2a64eb[_0xc0ff('0x85')](_0x4fa9ca,{'transaction':_0x1665b3});}})[_0xc0ff('0x26')](function(){_0x4fa9ca['forEach'](function(_0x50616d){socket[_0xc0ff('0x86')]('userFaxQueue:remove',{'UserId':_0x50616d,'FaxQueueId':_0x2a64eb['id']});});});});});});})[_0xc0ff('0x26')](respondWithStatusCode(_0x4e3543,null))[_0xc0ff('0x47')](handleError(_0x4e3543,null));};exports[_0xc0ff('0x87')]=function(_0x331950,_0x2e357c,_0x3c3e43){return db[_0xc0ff('0x2f')][_0xc0ff('0x49')]({'where':{'id':_0x331950[_0xc0ff('0x52')]['id']}})[_0xc0ff('0x26')](handleEntityNotFound(_0x2e357c,null))[_0xc0ff('0x26')](function(_0x1d5b86){if(_0x1d5b86){return _0x1d5b86['addAgents'](_0x331950[_0xc0ff('0x4b')][_0xc0ff('0x66')],_['omit'](_0x331950[_0xc0ff('0x4b')],[_0xc0ff('0x66'),'id'])||{})[_0xc0ff('0x88')](function(_0x5bf4b7){for(var _0x1aaed4=0x0;_0x1aaed4<_0x331950[_0xc0ff('0x4b')][_0xc0ff('0x66')]['length'];_0x1aaed4+=0x1){socket[_0xc0ff('0x86')](_0xc0ff('0x89'),{'UserId':_0x331950[_0xc0ff('0x4b')][_0xc0ff('0x66')][_0x1aaed4],'FaxQueueId':_0x331950['params']['id']});}return _0x5bf4b7;});}})[_0xc0ff('0x26')](respondWithResult(_0x2e357c,null))[_0xc0ff('0x47')](handleError(_0x2e357c,null));};exports[_0xc0ff('0x85')]=function(_0xe309f4,_0x2b36dd,_0x408a51){return db[_0xc0ff('0x2f')][_0xc0ff('0x49')]({'where':{'id':_0xe309f4[_0xc0ff('0x52')]['id']}})[_0xc0ff('0x26')](handleEntityNotFound(_0x2b36dd,null))[_0xc0ff('0x26')](function(_0x1da5c1){if(_0x1da5c1){return _0x1da5c1[_0xc0ff('0x85')](_0xe309f4[_0xc0ff('0x34')][_0xc0ff('0x66')])[_0xc0ff('0x26')](function(){if(_['isArray'](_0xe309f4[_0xc0ff('0x34')]['ids'])){for(var _0x50c780=0x0;_0x50c780<_0xe309f4[_0xc0ff('0x34')][_0xc0ff('0x66')][_0xc0ff('0x3a')];_0x50c780+=0x1){socket[_0xc0ff('0x86')]('userFaxQueue:remove',{'UserId':Number(_0xe309f4[_0xc0ff('0x34')][_0xc0ff('0x66')][_0x50c780]),'FaxQueueId':Number(_0xe309f4[_0xc0ff('0x52')]['id'])});}}else{socket[_0xc0ff('0x86')](_0xc0ff('0x8a'),{'UserId':Number(_0xe309f4[_0xc0ff('0x34')][_0xc0ff('0x66')]),'FaxQueueId':Number(_0xe309f4['params']['id'])});}});}})[_0xc0ff('0x26')](respondWithStatusCode(_0x2b36dd,null))[_0xc0ff('0x47')](handleError(_0x2b36dd,null));};exports[_0xc0ff('0x8b')]=function(_0x27853f,_0x2d3332,_0x28dc94){var _0x45bb15={};var _0x4723ac={};var _0x448a6e;var _0x336ab9;return db[_0xc0ff('0x2f')][_0xc0ff('0x64')]({'where':{'id':_0x27853f[_0xc0ff('0x52')]['id']}})[_0xc0ff('0x26')](handleEntityNotFound(_0x2d3332,null))[_0xc0ff('0x26')](function(_0x2b2cf7){if(_0x2b2cf7){_0x448a6e=_0x2b2cf7;_0x4723ac['model']=_['keys'](db['User'][_0xc0ff('0x30')]);_0x4723ac[_0xc0ff('0x34')]=_[_0xc0ff('0x33')](_0x27853f[_0xc0ff('0x34')]);_0x4723ac[_0xc0ff('0x35')]=_[_0xc0ff('0x36')](_0x4723ac[_0xc0ff('0x37')],_0x4723ac['query']);_0x45bb15[_0xc0ff('0x38')]=_['intersection'](_0x4723ac['model'],qs[_0xc0ff('0x39')](_0x27853f[_0xc0ff('0x34')]['fields']));_0x45bb15['attributes']=_0x45bb15['attributes'][_0xc0ff('0x3a')]?_0x45bb15[_0xc0ff('0x38')]:_0x4723ac[_0xc0ff('0x37')];_0x45bb15['order']=qs[_0xc0ff('0x3e')](_0x27853f[_0xc0ff('0x34')][_0xc0ff('0x3e')]);_0x45bb15[_0xc0ff('0x44')]=qs[_0xc0ff('0x35')](_[_0xc0ff('0x3f')](_0x27853f[_0xc0ff('0x34')],_0x4723ac[_0xc0ff('0x35')]));if(_0x27853f['query'][_0xc0ff('0x40')]){_0x45bb15['where']=_['merge'](_0x45bb15[_0xc0ff('0x44')],{'$or':_['map'](_0x45bb15[_0xc0ff('0x38')],function(_0x3b2fab){var _0x31874a={};_0x31874a[_0x3b2fab]={'$like':'%'+_0x27853f[_0xc0ff('0x34')][_0xc0ff('0x40')]+'%'};return _0x31874a;})});}_0x45bb15=_[_0xc0ff('0x42')]({},_0x45bb15,_0x27853f[_0xc0ff('0x43')]);return _0x448a6e['getAgents'](_0x45bb15);}})[_0xc0ff('0x26')](function(_0x412c0c){if(_0x412c0c){_0x336ab9=_0x412c0c[_0xc0ff('0x3a')];if(!_0x27853f['query']['hasOwnProperty'](_0xc0ff('0x3b'))){_0x45bb15[_0xc0ff('0x3c')]=qs[_0xc0ff('0x3c')](_0x27853f[_0xc0ff('0x34')]['limit']);_0x45bb15[_0xc0ff('0x1f')]=qs[_0xc0ff('0x1f')](_0x27853f[_0xc0ff('0x34')][_0xc0ff('0x1f')]);}return _0x448a6e[_0xc0ff('0x8b')](_0x45bb15);}})[_0xc0ff('0x26')](function(_0xa9fe39){if(_0xa9fe39){return _0xa9fe39?{'count':_0x336ab9,'rows':_0xa9fe39}:null;}})[_0xc0ff('0x26')](respondWithResult(_0x2d3332,null))[_0xc0ff('0x47')](handleError(_0x2d3332,null));};
\ No newline at end of file
+var _0x4ad3=['isEmpty','addAgents','omit','userFaxQueue:save','removeAgents','userFaxQueue:remove','getAgents','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxQueue.socket','register','sendStatus','end','status','offset','limit','set','Content-Range','json','save','update','then','FaxQueues','UserProfileResource','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','FaxQueue','count','include','findAll','rows','catch','keys','options','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','describe','getMembers','findOne','UserFaxQueue','FaxQueueId','UserId','agent','updatedAt','createdAt','faxPause','getTeams','Team','addTeams','ids','User','Agents','online','voicePause','interface','flatMap','transaction','each','findOrCreate','forEach','emit','removeTeams','select','field','tq.TeamId','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ut.UserId\x20=\x20?','sequelize','toString','SELECT','every','TeamId','all','union','compact','value'];(function(_0x218480,_0x2db0af){var _0x479ba2=function(_0x2a750d){while(--_0x2a750d){_0x218480['push'](_0x218480['shift']());}};_0x479ba2(++_0x2db0af);}(_0x4ad3,0x1b1));var _0x34ad=function(_0x234ae1,_0x42bdd6){_0x234ae1=_0x234ae1-0x0;var _0x227ba0=_0x4ad3[_0x234ae1];return _0x227ba0;};'use strict';var pdf=require(_0x34ad('0x0'));var emlformat=require(_0x34ad('0x1'));var rimraf=require(_0x34ad('0x2'));var zipdir=require(_0x34ad('0x3'));var jsonpatch=require(_0x34ad('0x4'));var rp=require(_0x34ad('0x5'));var moment=require('moment');var BPromise=require(_0x34ad('0x6'));var Mustache=require(_0x34ad('0x7'));var util=require(_0x34ad('0x8'));var path=require(_0x34ad('0x9'));var sox=require(_0x34ad('0xa'));var csv=require(_0x34ad('0xb'));var ejs=require(_0x34ad('0xc'));var fs=require('fs');var _=require(_0x34ad('0xd'));var squel=require(_0x34ad('0xe'));var crypto=require(_0x34ad('0xf'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x34ad('0xb'));var querystring=require(_0x34ad('0x10'));var Papa=require(_0x34ad('0x11'));var Redis=require(_0x34ad('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x34ad('0x13'));var as=require(_0x34ad('0x14'));var hardwareService=require(_0x34ad('0x15'));var logger=require(_0x34ad('0x16'))(_0x34ad('0x17'));var utils=require(_0x34ad('0x18'));var config=require(_0x34ad('0x19'));var db=require(_0x34ad('0x1a'))['db'];config[_0x34ad('0x1b')]=_[_0x34ad('0x1c')](config[_0x34ad('0x1b')],{'host':_0x34ad('0x1d'),'port':0x18eb});var socket=require(_0x34ad('0x1e'))(new Redis(config[_0x34ad('0x1b')]));require(_0x34ad('0x1f'))[_0x34ad('0x20')](socket);function respondWithStatusCode(_0x558097,_0x4764e9){_0x4764e9=_0x4764e9||0xcc;return function(_0x5d166b){if(_0x5d166b){return _0x558097[_0x34ad('0x21')](_0x4764e9);}return _0x558097['status'](_0x4764e9)[_0x34ad('0x22')]();};}function respondWithResult(_0x262123,_0x38a15e){_0x38a15e=_0x38a15e||0xc8;return function(_0x36c8d3){if(_0x36c8d3){return _0x262123[_0x34ad('0x23')](_0x38a15e)['json'](_0x36c8d3);}};}function respondWithFilteredResult(_0x1533b5,_0x4daa5c){return function(_0x1fcdd0){if(_0x1fcdd0){var _0x294326=_0x1fcdd0['count'],_0x32316c=_0x4daa5c[_0x34ad('0x24')],_0x7036e0=_0x4daa5c[_0x34ad('0x24')]+_0x4daa5c[_0x34ad('0x25')],_0x2c5b60;if(_0x7036e0>=_0x294326){_0x7036e0=_0x294326;_0x2c5b60=0xc8;}else{_0x2c5b60=0xce;}_0x1533b5[_0x34ad('0x23')](_0x2c5b60);return _0x1533b5[_0x34ad('0x26')](_0x34ad('0x27'),_0x32316c+'-'+_0x7036e0+'/'+_0x294326)[_0x34ad('0x28')](_0x1fcdd0);}return null;};}function patchUpdates(_0x45557e){return function(_0x1ef997){try{jsonpatch['apply'](_0x1ef997,_0x45557e,!![]);}catch(_0x45d055){return BPromise['reject'](_0x45d055);}return _0x1ef997[_0x34ad('0x29')]();};}function saveUpdates(_0x493f73,_0x154ee8){return function(_0x439333){if(_0x439333){return _0x439333[_0x34ad('0x2a')](_0x493f73)[_0x34ad('0x2b')](function(_0x737c2d){return _0x737c2d;});}return null;};}function removeEntity(_0x4a06a7,_0x5a8379){return function(_0x3a8418){if(_0x3a8418){return _0x3a8418['destroy']()[_0x34ad('0x2b')](function(){var _0x4bdad0=_0x3a8418['get']({'plain':!![]});var _0x34d2ae=_0x34ad('0x2c');return db[_0x34ad('0x2d')][_0x34ad('0x2e')]({'where':{'type':_0x34d2ae,'resourceId':_0x4bdad0['id']}})[_0x34ad('0x2b')](function(){return _0x3a8418;});})[_0x34ad('0x2b')](function(){_0x4a06a7[_0x34ad('0x23')](0xcc)[_0x34ad('0x22')]();});}};}function handleEntityNotFound(_0xd230ca,_0x9ebbad){return function(_0x580ee5){if(!_0x580ee5){_0xd230ca[_0x34ad('0x21')](0x194);}return _0x580ee5;};}function handleError(_0x25316a,_0x23bb04){_0x23bb04=_0x23bb04||0x1f4;return function(_0x31b880){logger[_0x34ad('0x2f')](_0x31b880[_0x34ad('0x30')]);if(_0x31b880[_0x34ad('0x31')]){delete _0x31b880[_0x34ad('0x31')];}_0x25316a[_0x34ad('0x23')](_0x23bb04)[_0x34ad('0x32')](_0x31b880);};}exports[_0x34ad('0x33')]=function(_0x174001,_0x5258fc){var _0xf0f8b7={},_0x603161={},_0x14be3a={'count':0x0,'rows':[]};var _0x568e91=_[_0x34ad('0x34')](db['FaxQueue'][_0x34ad('0x35')],function(_0xedd677){return{'name':_0xedd677[_0x34ad('0x36')],'type':_0xedd677[_0x34ad('0x37')]['key']};});_0x603161[_0x34ad('0x38')]=_[_0x34ad('0x34')](_0x568e91,_0x34ad('0x31'));_0x603161[_0x34ad('0x39')]=_['keys'](_0x174001['query']);_0x603161['filters']=_[_0x34ad('0x3a')](_0x603161[_0x34ad('0x38')],_0x603161[_0x34ad('0x39')]);_0xf0f8b7[_0x34ad('0x3b')]=_[_0x34ad('0x3a')](_0x603161['model'],qs[_0x34ad('0x3c')](_0x174001[_0x34ad('0x39')][_0x34ad('0x3c')]));_0xf0f8b7[_0x34ad('0x3b')]=_0xf0f8b7[_0x34ad('0x3b')][_0x34ad('0x3d')]?_0xf0f8b7[_0x34ad('0x3b')]:_0x603161[_0x34ad('0x38')];if(!_0x174001[_0x34ad('0x39')][_0x34ad('0x3e')](_0x34ad('0x3f'))){_0xf0f8b7[_0x34ad('0x25')]=qs[_0x34ad('0x25')](_0x174001[_0x34ad('0x39')][_0x34ad('0x25')]);_0xf0f8b7[_0x34ad('0x24')]=qs[_0x34ad('0x24')](_0x174001[_0x34ad('0x39')][_0x34ad('0x24')]);}_0xf0f8b7[_0x34ad('0x40')]=qs['sort'](_0x174001['query'][_0x34ad('0x41')]);_0xf0f8b7[_0x34ad('0x42')]=qs[_0x34ad('0x43')](_[_0x34ad('0x44')](_0x174001[_0x34ad('0x39')],_0x603161[_0x34ad('0x43')]));if(_0x174001[_0x34ad('0x39')][_0x34ad('0x45')]){_0xf0f8b7[_0x34ad('0x42')]=_[_0x34ad('0x46')](_0xf0f8b7['where'],{'$or':_[_0x34ad('0x34')](_0x568e91,function(_0x843cc5){if(_0x843cc5[_0x34ad('0x37')]!==_0x34ad('0x47')){var _0x212e45={};_0x212e45[_0x843cc5[_0x34ad('0x31')]]={'$like':'%'+_0x174001[_0x34ad('0x39')][_0x34ad('0x45')]+'%'};return _0x212e45;}})});}_0xf0f8b7=_[_0x34ad('0x46')]({},_0xf0f8b7,_0x174001['options']);var _0x2dccc6={'where':_0xf0f8b7['where']};return db[_0x34ad('0x48')][_0x34ad('0x49')](_0x2dccc6)[_0x34ad('0x2b')](function(_0x4710c9){_0x14be3a[_0x34ad('0x49')]=_0x4710c9;if(_0x174001[_0x34ad('0x39')]['includeAll']){_0xf0f8b7[_0x34ad('0x4a')]=[{'all':!![]}];}return db['FaxQueue'][_0x34ad('0x4b')](_0xf0f8b7);})['then'](function(_0x5c55ad){_0x14be3a[_0x34ad('0x4c')]=_0x5c55ad;return _0x14be3a;})[_0x34ad('0x2b')](respondWithFilteredResult(_0x5258fc,_0xf0f8b7))[_0x34ad('0x4d')](handleError(_0x5258fc,null));};exports['show']=function(_0x201803,_0x22b2d2){var _0x1cec0b={'raw':!![],'where':{'id':_0x201803['params']['id']}},_0x4d7015={};_0x4d7015[_0x34ad('0x38')]=_[_0x34ad('0x4e')](db['FaxQueue'][_0x34ad('0x35')]);_0x4d7015[_0x34ad('0x39')]=_[_0x34ad('0x4e')](_0x201803['query']);_0x4d7015[_0x34ad('0x43')]=_[_0x34ad('0x3a')](_0x4d7015[_0x34ad('0x38')],_0x4d7015[_0x34ad('0x39')]);_0x1cec0b[_0x34ad('0x3b')]=_[_0x34ad('0x3a')](_0x4d7015[_0x34ad('0x38')],qs['fields'](_0x201803[_0x34ad('0x39')][_0x34ad('0x3c')]));_0x1cec0b['attributes']=_0x1cec0b[_0x34ad('0x3b')][_0x34ad('0x3d')]?_0x1cec0b[_0x34ad('0x3b')]:_0x4d7015[_0x34ad('0x38')];if(_0x201803[_0x34ad('0x39')]['includeAll']){_0x1cec0b['include']=[{'all':!![]}];}_0x1cec0b=_[_0x34ad('0x46')]({},_0x1cec0b,_0x201803[_0x34ad('0x4f')]);return db['FaxQueue']['find'](_0x1cec0b)[_0x34ad('0x2b')](handleEntityNotFound(_0x22b2d2,null))['then'](respondWithResult(_0x22b2d2,null))[_0x34ad('0x4d')](handleError(_0x22b2d2,null));};exports[_0x34ad('0x50')]=function(_0x287401,_0x5a3ef5){return db[_0x34ad('0x48')][_0x34ad('0x50')](_0x287401['body'],{})['then'](function(_0x48be05){var _0x4ee0b4=_0x287401[_0x34ad('0x51')][_0x34ad('0x52')]({'plain':!![]});if(!_0x4ee0b4)throw new Error(_0x34ad('0x53'));if(_0x4ee0b4[_0x34ad('0x54')]==='user'){var _0x3ad42e=_0x48be05[_0x34ad('0x52')]({'plain':!![]});var _0x54b41d='FaxQueues';return db[_0x34ad('0x55')][_0x34ad('0x56')]({'where':{'name':_0x54b41d,'userProfileId':_0x4ee0b4[_0x34ad('0x57')]},'raw':!![]})[_0x34ad('0x2b')](function(_0x1f6bed){if(_0x1f6bed&&_0x1f6bed[_0x34ad('0x58')]===0x0){return db['UserProfileResource'][_0x34ad('0x50')]({'name':_0x3ad42e[_0x34ad('0x31')],'resourceId':_0x3ad42e['id'],'type':_0x1f6bed['name'],'sectionId':_0x1f6bed['id']},{})[_0x34ad('0x2b')](function(){return _0x48be05;});}else{return _0x48be05;}})['catch'](function(_0x50fa8c){logger[_0x34ad('0x2f')](_0x34ad('0x59'),_0x50fa8c);throw _0x50fa8c;});}return _0x48be05;})[_0x34ad('0x2b')](respondWithResult(_0x5a3ef5,0xc9))['catch'](handleError(_0x5a3ef5,null));};exports[_0x34ad('0x2a')]=function(_0x4ef0b4,_0x3556a2){if(_0x4ef0b4[_0x34ad('0x5a')]['id']){delete _0x4ef0b4[_0x34ad('0x5a')]['id'];}return db['FaxQueue'][_0x34ad('0x56')]({'where':{'id':_0x4ef0b4[_0x34ad('0x5b')]['id']}})[_0x34ad('0x2b')](handleEntityNotFound(_0x3556a2,null))[_0x34ad('0x2b')](saveUpdates(_0x4ef0b4[_0x34ad('0x5a')],null))[_0x34ad('0x2b')](respondWithResult(_0x3556a2,null))[_0x34ad('0x4d')](handleError(_0x3556a2,null));};exports[_0x34ad('0x2e')]=function(_0x273b78,_0x56e01d){return db[_0x34ad('0x48')][_0x34ad('0x56')]({'where':{'id':_0x273b78[_0x34ad('0x5b')]['id']}})[_0x34ad('0x2b')](handleEntityNotFound(_0x56e01d,null))[_0x34ad('0x2b')](removeEntity(_0x56e01d,null))[_0x34ad('0x4d')](handleError(_0x56e01d,null));};exports[_0x34ad('0x5c')]=function(_0x15d671,_0x2dd5c5){return db[_0x34ad('0x48')][_0x34ad('0x5c')]()[_0x34ad('0x2b')](respondWithResult(_0x2dd5c5,null))['catch'](handleError(_0x2dd5c5,null));};exports[_0x34ad('0x5d')]=function(_0x40946f,_0x3727f5,_0xf9815a){var _0x114904={'raw':!![],'where':{}},_0x4e1ae1={},_0x13c8a1;return db['FaxQueue'][_0x34ad('0x5e')]({'where':{'id':_0x40946f[_0x34ad('0x5b')]['id']}})['then'](handleEntityNotFound(_0x3727f5,null))[_0x34ad('0x2b')](function(_0xb78e72){if(_0xb78e72){_0x13c8a1=_0xb78e72[_0x34ad('0x52')]({'plain':!![]});_0x4e1ae1[_0x34ad('0x38')]=_[_0x34ad('0x4e')](db[_0x34ad('0x5f')]['rawAttributes']);_0x4e1ae1[_0x34ad('0x39')]=_[_0x34ad('0x4e')](_0x40946f[_0x34ad('0x39')]);_0x4e1ae1['filters']=_[_0x34ad('0x3a')](_0x4e1ae1[_0x34ad('0x38')],_0x4e1ae1[_0x34ad('0x39')]);_0x114904[_0x34ad('0x3b')]=_[_0x34ad('0x3a')](_0x4e1ae1['model'],qs[_0x34ad('0x3c')](_0x40946f[_0x34ad('0x39')]['fields']));_0x114904['attributes']=_0x114904[_0x34ad('0x3b')]['length']?_0x114904[_0x34ad('0x3b')]:_0x4e1ae1[_0x34ad('0x38')];if(!_0x40946f[_0x34ad('0x39')][_0x34ad('0x3e')](_0x34ad('0x3f'))){_0x114904[_0x34ad('0x25')]=qs[_0x34ad('0x25')](_0x40946f[_0x34ad('0x39')][_0x34ad('0x25')]);_0x114904[_0x34ad('0x24')]=qs['offset'](_0x40946f[_0x34ad('0x39')][_0x34ad('0x24')]);}_0x114904[_0x34ad('0x40')]=qs['sort'](_0x40946f[_0x34ad('0x39')][_0x34ad('0x41')]);_0x114904['where']=qs[_0x34ad('0x43')](_['pick'](_0x40946f[_0x34ad('0x39')],_0x4e1ae1[_0x34ad('0x43')]));_0x114904[_0x34ad('0x42')][_0x34ad('0x60')]=_0xb78e72['id'];if(_0x40946f[_0x34ad('0x39')][_0x34ad('0x45')]){_0x114904[_0x34ad('0x42')]=_['merge'](_0x114904[_0x34ad('0x42')],{'$or':_[_0x34ad('0x34')](_0x114904[_0x34ad('0x3b')],function(_0x24c864){var _0x30fd34={};_0x30fd34[_0x24c864]={'$like':'%'+_0x40946f['query'][_0x34ad('0x45')]+'%'};return _0x30fd34;})});}_0x114904=_['merge']({},_0x114904,_0x40946f['options']);return db[_0x34ad('0x5f')][_0x34ad('0x4b')](_0x114904);}})[_0x34ad('0x2b')](function(_0x56c1b9){if(_0x56c1b9){return db['User']['findAndCountAll']({'where':{'id':_[_0x34ad('0x34')](_0x56c1b9,_0x34ad('0x61')),'role':_0x34ad('0x62')},'attributes':['id','name','faxPause',_0x34ad('0x63'),_0x34ad('0x64')]});}})[_0x34ad('0x2b')](function(_0x4b574e){if(_0x4b574e){return{'count':_0x4b574e['count'],'rows':_[_0x34ad('0x34')](_0x4b574e[_0x34ad('0x4c')],function(_0x5d8434){return{'membername':_0x5d8434[_0x34ad('0x31')],'UserId':_0x5d8434['id'],'queue_name':_0x13c8a1['name'],'FaxQueueId':_0x13c8a1['id'],'interface':util['format']('%s/%s','SIP',_0x5d8434[_0x34ad('0x31')]),'penalty':0x0,'paused':_0x5d8434[_0x34ad('0x65')],'createdAt':_0x5d8434[_0x34ad('0x64')],'updatedAt':_0x5d8434['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x34ad('0x2b')](respondWithFilteredResult(_0x3727f5,_0x114904))[_0x34ad('0x4d')](handleError(_0x3727f5,null));};exports[_0x34ad('0x66')]=function(_0x503c6b,_0x19d3b4,_0x5a482a){var _0x25236c={};var _0x332754={};var _0xccc0ff;var _0x4f6135;return db[_0x34ad('0x48')][_0x34ad('0x5e')]({'where':{'id':_0x503c6b['params']['id']}})['then'](handleEntityNotFound(_0x19d3b4,null))[_0x34ad('0x2b')](function(_0x28c70e){if(_0x28c70e){_0xccc0ff=_0x28c70e;_0x332754['model']=_[_0x34ad('0x4e')](db[_0x34ad('0x67')][_0x34ad('0x35')]);_0x332754[_0x34ad('0x39')]=_[_0x34ad('0x4e')](_0x503c6b[_0x34ad('0x39')]);_0x332754[_0x34ad('0x43')]=_['intersection'](_0x332754['model'],_0x332754[_0x34ad('0x39')]);_0x25236c[_0x34ad('0x3b')]=_[_0x34ad('0x3a')](_0x332754[_0x34ad('0x38')],qs[_0x34ad('0x3c')](_0x503c6b['query'][_0x34ad('0x3c')]));_0x25236c['attributes']=_0x25236c[_0x34ad('0x3b')][_0x34ad('0x3d')]?_0x25236c[_0x34ad('0x3b')]:_0x332754[_0x34ad('0x38')];_0x25236c[_0x34ad('0x40')]=qs[_0x34ad('0x41')](_0x503c6b[_0x34ad('0x39')][_0x34ad('0x41')]);_0x25236c[_0x34ad('0x42')]=qs[_0x34ad('0x43')](_[_0x34ad('0x44')](_0x503c6b[_0x34ad('0x39')],_0x332754[_0x34ad('0x43')]));if(_0x503c6b[_0x34ad('0x39')][_0x34ad('0x45')]){_0x25236c['where']=_[_0x34ad('0x46')](_0x25236c['where'],{'$or':_['map'](_0x25236c[_0x34ad('0x3b')],function(_0xfe0159){var _0x305ee9={};_0x305ee9[_0xfe0159]={'$like':'%'+_0x503c6b[_0x34ad('0x39')][_0x34ad('0x45')]+'%'};return _0x305ee9;})});}_0x25236c=_[_0x34ad('0x46')]({},_0x25236c,_0x503c6b[_0x34ad('0x4f')]);return _0xccc0ff[_0x34ad('0x66')](_0x25236c);}})[_0x34ad('0x2b')](function(_0xb0c8ba){if(_0xb0c8ba){_0x4f6135=_0xb0c8ba[_0x34ad('0x3d')];if(!_0x503c6b[_0x34ad('0x39')]['hasOwnProperty'](_0x34ad('0x3f'))){_0x25236c['limit']=qs['limit'](_0x503c6b[_0x34ad('0x39')][_0x34ad('0x25')]);_0x25236c[_0x34ad('0x24')]=qs[_0x34ad('0x24')](_0x503c6b[_0x34ad('0x39')][_0x34ad('0x24')]);}return _0xccc0ff[_0x34ad('0x66')](_0x25236c);}})['then'](function(_0x2d41ac){if(_0x2d41ac){return _0x2d41ac?{'count':_0x4f6135,'rows':_0x2d41ac}:null;}})['then'](respondWithResult(_0x19d3b4,null))['catch'](handleError(_0x19d3b4,null));};exports[_0x34ad('0x68')]=function(_0x554c90,_0x5cdd6c,_0x4278ef){var _0x266d6b=_0x554c90[_0x34ad('0x5a')][_0x34ad('0x69')];return db[_0x34ad('0x67')]['findAll']({'where':{'id':_0x266d6b},'attributes':['id'],'include':[{'model':db[_0x34ad('0x6a')],'as':_0x34ad('0x6b'),'attributes':['id',_0x34ad('0x31'),_0x34ad('0x6c'),_0x34ad('0x6d'),_0x34ad('0x6e')],'raw':!![]}]})['then'](function(_0x44613f){if(_0x44613f){var _0x571925=_[_0x34ad('0x6f')](_0x44613f,function(_0x35b4f6){var _0x49b39e=_0x35b4f6[_0x34ad('0x52')]({'plain':!![]});return _0x49b39e[_0x34ad('0x6b')];});return db[_0x34ad('0x48')][_0x34ad('0x56')]({'where':{'id':_0x554c90[_0x34ad('0x5b')]['id']}})['then'](function(_0x595f4b){return db['sequelize'][_0x34ad('0x70')](function(_0x5f3fd2){return _0x595f4b['addTeams'](_0x266d6b,{'transaction':_0x5f3fd2})[_0x34ad('0x2b')](function(){return BPromise[_0x34ad('0x71')](_0x571925,function(_0x22e7c2){return db[_0x34ad('0x5f')][_0x34ad('0x72')]({'where':{'UserId':_0x22e7c2['id'],'FaxQueueId':_0x554c90[_0x34ad('0x5b')]['id']},'transaction':_0x5f3fd2});});})[_0x34ad('0x2b')](function(){_0x571925[_0x34ad('0x73')](function(_0x57741b){socket[_0x34ad('0x74')]('userFaxQueue:save',{'UserId':_0x57741b['id'],'FaxQueueId':_0x595f4b['id']});});});});});}})['then'](respondWithStatusCode(_0x5cdd6c,null))[_0x34ad('0x4d')](handleError(_0x5cdd6c,null));};exports[_0x34ad('0x75')]=function(_0x1a5796,_0x4ecb02,_0x51010c){return db['Team'][_0x34ad('0x4b')]({'where':{'id':_0x1a5796['query'][_0x34ad('0x69')]},'attributes':['id'],'include':[{'model':db[_0x34ad('0x6a')],'as':_0x34ad('0x6b'),'attributes':['id'],'raw':!![]}]})[_0x34ad('0x2b')](handleEntityNotFound(_0x4ecb02,null))[_0x34ad('0x2b')](function(_0x8745c0){var _0x420629=_[_0x34ad('0x34')](_0x8745c0,'id');var _0x25bf5b=[];var _0x18fed1=[];var _0x4e2f74=squel[_0x34ad('0x76')]();_0x4e2f74[_0x34ad('0x77')](_0x34ad('0x78'))[_0x34ad('0x79')]('team_has_fax_queues','tq')[_0x34ad('0x7a')](_0x34ad('0x7b'),'ut',_0x34ad('0x7c'))[_0x34ad('0x42')]('FaxQueueId\x20=\x20?',_0x1a5796['params']['id']);for(var _0x175dbc=0x0;_0x175dbc<_0x8745c0[_0x34ad('0x3d')];_0x175dbc+=0x1){let _0x3991cc=_0x8745c0[_0x175dbc];for(var _0xbc21c6=0x0;_0xbc21c6<_0x3991cc[_0x34ad('0x6b')][_0x34ad('0x3d')];_0xbc21c6+=0x1){let _0x46f71c=_0x3991cc[_0x34ad('0x6b')][_0xbc21c6];var _0x274a16=_0x4e2f74['clone']();_0x274a16[_0x34ad('0x42')](_0x34ad('0x7d'),_0x46f71c['id']);_0x18fed1['push'](db[_0x34ad('0x7e')][_0x34ad('0x39')](_0x274a16[_0x34ad('0x7f')](),{'type':db[_0x34ad('0x7e')]['QueryTypes'][_0x34ad('0x80')]})[_0x34ad('0x2b')](function(_0x2367f3){if(_0x2367f3[_0x34ad('0x3d')]===0x1){return _0x46f71c['id'];}else{var _0xb7f03d=_[_0x34ad('0x81')](_['map'](_0x2367f3,_0x34ad('0x82')),function(_0x4a4335){return _['includes'](_0x420629,_0x4a4335);});if(_0xb7f03d){return _0x46f71c['id'];}}}));}}return BPromise[_0x34ad('0x83')](_0x18fed1)[_0x34ad('0x2b')](function(_0x24fa5c){_0x25bf5b=_(_0x25bf5b)[_0x34ad('0x84')](_0x24fa5c)[_0x34ad('0x85')]()[_0x34ad('0x86')]();return db[_0x34ad('0x48')][_0x34ad('0x56')]({'where':{'id':_0x1a5796['params']['id']}})[_0x34ad('0x2b')](function(_0x7d5de6){return db['sequelize'][_0x34ad('0x70')](function(_0x1c1780){return _0x7d5de6[_0x34ad('0x75')](_0x1a5796[_0x34ad('0x39')][_0x34ad('0x69')],{'transaction':_0x1c1780})[_0x34ad('0x2b')](function(){if(!_[_0x34ad('0x87')](_0x25bf5b)){return _0x7d5de6['removeAgents'](_0x25bf5b,{'transaction':_0x1c1780});}})['then'](function(){_0x25bf5b['forEach'](function(_0x136eae){socket[_0x34ad('0x74')]('userFaxQueue:remove',{'UserId':_0x136eae,'FaxQueueId':_0x7d5de6['id']});});});});});});})['then'](respondWithStatusCode(_0x4ecb02,null))[_0x34ad('0x4d')](handleError(_0x4ecb02,null));};exports['addAgents']=function(_0x4be1e3,_0x2659db,_0x4180f0){return db[_0x34ad('0x48')][_0x34ad('0x56')]({'where':{'id':_0x4be1e3[_0x34ad('0x5b')]['id']}})[_0x34ad('0x2b')](handleEntityNotFound(_0x2659db,null))[_0x34ad('0x2b')](function(_0x20e7b0){if(_0x20e7b0){return _0x20e7b0[_0x34ad('0x88')](_0x4be1e3['body'][_0x34ad('0x69')],_[_0x34ad('0x89')](_0x4be1e3[_0x34ad('0x5a')],[_0x34ad('0x69'),'id'])||{})['spread'](function(_0x232994){for(var _0x31af6a=0x0;_0x31af6a<_0x4be1e3[_0x34ad('0x5a')][_0x34ad('0x69')][_0x34ad('0x3d')];_0x31af6a+=0x1){socket['emit'](_0x34ad('0x8a'),{'UserId':_0x4be1e3[_0x34ad('0x5a')][_0x34ad('0x69')][_0x31af6a],'FaxQueueId':_0x4be1e3[_0x34ad('0x5b')]['id']});}return _0x232994;});}})[_0x34ad('0x2b')](respondWithResult(_0x2659db,null))[_0x34ad('0x4d')](handleError(_0x2659db,null));};exports[_0x34ad('0x8b')]=function(_0x2264e5,_0x28d3e4,_0x1137d1){return db[_0x34ad('0x48')][_0x34ad('0x56')]({'where':{'id':_0x2264e5[_0x34ad('0x5b')]['id']}})[_0x34ad('0x2b')](handleEntityNotFound(_0x28d3e4,null))[_0x34ad('0x2b')](function(_0x2fa9c1){if(_0x2fa9c1){return _0x2fa9c1[_0x34ad('0x8b')](_0x2264e5[_0x34ad('0x39')][_0x34ad('0x69')])['then'](function(){if(_['isArray'](_0x2264e5[_0x34ad('0x39')][_0x34ad('0x69')])){for(var _0x4fb7a6=0x0;_0x4fb7a6<_0x2264e5[_0x34ad('0x39')]['ids']['length'];_0x4fb7a6+=0x1){socket[_0x34ad('0x74')](_0x34ad('0x8c'),{'UserId':Number(_0x2264e5[_0x34ad('0x39')][_0x34ad('0x69')][_0x4fb7a6]),'FaxQueueId':Number(_0x2264e5['params']['id'])});}}else{socket[_0x34ad('0x74')](_0x34ad('0x8c'),{'UserId':Number(_0x2264e5[_0x34ad('0x39')][_0x34ad('0x69')]),'FaxQueueId':Number(_0x2264e5[_0x34ad('0x5b')]['id'])});}});}})[_0x34ad('0x2b')](respondWithStatusCode(_0x28d3e4,null))['catch'](handleError(_0x28d3e4,null));};exports['getAgents']=function(_0x62820f,_0x3ab4af,_0x48fc77){var _0x295c47={};var _0x556143={};var _0x1bd382;var _0x40ec80;return db[_0x34ad('0x48')][_0x34ad('0x5e')]({'where':{'id':_0x62820f[_0x34ad('0x5b')]['id']}})[_0x34ad('0x2b')](handleEntityNotFound(_0x3ab4af,null))[_0x34ad('0x2b')](function(_0x44dc93){if(_0x44dc93){_0x1bd382=_0x44dc93;_0x556143['model']=_[_0x34ad('0x4e')](db[_0x34ad('0x6a')][_0x34ad('0x35')]);_0x556143[_0x34ad('0x39')]=_['keys'](_0x62820f[_0x34ad('0x39')]);_0x556143['filters']=_['intersection'](_0x556143[_0x34ad('0x38')],_0x556143[_0x34ad('0x39')]);_0x295c47[_0x34ad('0x3b')]=_[_0x34ad('0x3a')](_0x556143['model'],qs[_0x34ad('0x3c')](_0x62820f[_0x34ad('0x39')][_0x34ad('0x3c')]));_0x295c47['attributes']=_0x295c47[_0x34ad('0x3b')][_0x34ad('0x3d')]?_0x295c47[_0x34ad('0x3b')]:_0x556143[_0x34ad('0x38')];_0x295c47[_0x34ad('0x40')]=qs[_0x34ad('0x41')](_0x62820f[_0x34ad('0x39')][_0x34ad('0x41')]);_0x295c47['where']=qs[_0x34ad('0x43')](_['pick'](_0x62820f[_0x34ad('0x39')],_0x556143['filters']));if(_0x62820f[_0x34ad('0x39')][_0x34ad('0x45')]){_0x295c47[_0x34ad('0x42')]=_['merge'](_0x295c47[_0x34ad('0x42')],{'$or':_['map'](_0x295c47[_0x34ad('0x3b')],function(_0x10ab1f){var _0x595a85={};_0x595a85[_0x10ab1f]={'$like':'%'+_0x62820f[_0x34ad('0x39')][_0x34ad('0x45')]+'%'};return _0x595a85;})});}_0x295c47=_[_0x34ad('0x46')]({},_0x295c47,_0x62820f['options']);return _0x1bd382[_0x34ad('0x8d')](_0x295c47);}})[_0x34ad('0x2b')](function(_0x1bfa17){if(_0x1bfa17){_0x40ec80=_0x1bfa17['length'];if(!_0x62820f[_0x34ad('0x39')][_0x34ad('0x3e')](_0x34ad('0x3f'))){_0x295c47[_0x34ad('0x25')]=qs[_0x34ad('0x25')](_0x62820f['query'][_0x34ad('0x25')]);_0x295c47[_0x34ad('0x24')]=qs[_0x34ad('0x24')](_0x62820f[_0x34ad('0x39')][_0x34ad('0x24')]);}return _0x1bd382[_0x34ad('0x8d')](_0x295c47);}})['then'](function(_0x470564){if(_0x470564){return _0x470564?{'count':_0x40ec80,'rows':_0x470564}:null;}})[_0x34ad('0x2b')](respondWithResult(_0x3ab4af,null))[_0x34ad('0x4d')](handleError(_0x3ab4af,null));};
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.events.js b/server/api/faxQueue/faxQueue.events.js
index 275168d..ccac28b 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 _0xc987=['events','../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x240c44,_0xf20ab6){var _0x28e709=function(_0x3ef7de){while(--_0x3ef7de){_0x240c44['push'](_0x240c44['shift']());}};_0x28e709(++_0xf20ab6);}(_0xc987,0x1c3));var _0x7c98=function(_0x4b4277,_0x22676f){_0x4b4277=_0x4b4277-0x0;var _0x1ff405=_0xc987[_0x4b4277];return _0x1ff405;};'use strict';var EventEmitter=require(_0x7c98('0x0'));var FaxQueue=require(_0x7c98('0x1'))['db'][_0x7c98('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x7c98('0x3')](0x0);var events={'afterCreate':_0x7c98('0x4'),'afterUpdate':_0x7c98('0x5'),'afterDestroy':_0x7c98('0x6')};function emitEvent(_0x5b4ae6){return function(_0x5a75a3,_0x3d37bf,_0x3d058f){FaxQueueEvents['emit'](_0x5b4ae6+':'+_0x5a75a3['id'],_0x5a75a3);FaxQueueEvents[_0x7c98('0x7')](_0x5b4ae6,_0x5a75a3);_0x3d058f(null);};}for(var e in events){if(events[_0x7c98('0x8')](e)){var event=events[e];FaxQueue[_0x7c98('0x9')](e,emitEvent(event));}}module[_0x7c98('0xa')]=FaxQueueEvents;
\ No newline at end of file
+var _0x7c99=['events','../../mysqldb','FaxQueue','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x134749,_0x294e3c){var _0x3e6f43=function(_0x39ddf7){while(--_0x39ddf7){_0x134749['push'](_0x134749['shift']());}};_0x3e6f43(++_0x294e3c);}(_0x7c99,0x1d6));var _0x97c9=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x7c99[_0x2c91e9];return _0x13f0ff;};'use strict';var EventEmitter=require(_0x97c9('0x0'));var FaxQueue=require(_0x97c9('0x1'))['db'][_0x97c9('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x97c9('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x97c9('0x4'),'afterDestroy':_0x97c9('0x5')};function emitEvent(_0x37d1c9){return function(_0x41fd1a,_0x4ae58f,_0x4f4fba){FaxQueueEvents['emit'](_0x37d1c9+':'+_0x41fd1a['id'],_0x41fd1a);FaxQueueEvents[_0x97c9('0x6')](_0x37d1c9,_0x41fd1a);_0x4f4fba(null);};}for(var e in events){if(events[_0x97c9('0x7')](e)){var event=events[e];FaxQueue[_0x97c9('0x8')](e,emitEvent(event));}}module[_0x97c9('0x9')]=FaxQueueEvents;
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.model.js b/server/api/faxQueue/faxQueue.model.js
index 6c4d602..e0523cc 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 _0x7486=['../../config/logger','moment','request-promise','rimraf','../../config/environment','exports','define','FaxQueue','fax_queues','lodash','util'];(function(_0x3ef6d4,_0xc4b41e){var _0x5a614d=function(_0x243d89){while(--_0x243d89){_0x3ef6d4['push'](_0x3ef6d4['shift']());}};_0x5a614d(++_0xc4b41e);}(_0x7486,0xfb));var _0x6748=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7486[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x6748('0x0'));var util=require(_0x6748('0x1'));var logger=require(_0x6748('0x2'))('api');var moment=require(_0x6748('0x3'));var BPromise=require('bluebird');var rp=require(_0x6748('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6748('0x5'));var config=require(_0x6748('0x6'));var attributes=require('./faxQueue.attributes');module[_0x6748('0x7')]=function(_0x2c5b7a,_0x204419){return _0x2c5b7a[_0x6748('0x8')](_0x6748('0x9'),attributes,{'tableName':_0x6748('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa51b=['define','FaxQueue','fax_queues','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./faxQueue.attributes'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xa51b,0x1b0));var _0xba51=function(_0x19faa4,_0x1ce8e8){_0x19faa4=_0x19faa4-0x0;var _0x51b78b=_0xa51b[_0x19faa4];return _0x51b78b;};'use strict';var _=require(_0xba51('0x0'));var util=require(_0xba51('0x1'));var logger=require(_0xba51('0x2'))(_0xba51('0x3'));var moment=require(_0xba51('0x4'));var BPromise=require('bluebird');var rp=require(_0xba51('0x5'));var fs=require('fs');var path=require(_0xba51('0x6'));var rimraf=require(_0xba51('0x7'));var config=require(_0xba51('0x8'));var attributes=require(_0xba51('0x9'));module['exports']=function(_0x5dd152,_0x115770){return _0x5dd152[_0xba51('0xa')](_0xba51('0xb'),attributes,{'tableName':_0xba51('0xc'),'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 c3683be..974e0d8 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 _0x24b6=['debug','stringify','error','message','result','GetFaxQueue','FaxQueue','findAll','options','raw','where','limit','include','map','model','attributes','catch','ShowFaxQueue','find','info','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./faxQueue.socket','register','request','then','FaxQueue,\x20%s,\x20%s','request\x20sent'];(function(_0x405362,_0x9f3d26){var _0x2fbf6e=function(_0x19529a){while(--_0x19529a){_0x405362['push'](_0x405362['shift']());}};_0x2fbf6e(++_0x9f3d26);}(_0x24b6,0x10a));var _0x624b=function(_0xacb183,_0x4aa875){_0xacb183=_0xacb183-0x0;var _0x1b4a89=_0x24b6[_0xacb183];return _0x1b4a89;};'use strict';var _=require(_0x624b('0x0'));var util=require(_0x624b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x624b('0x2'));var fs=require('fs');var Redis=require(_0x624b('0x3'));var db=require(_0x624b('0x4'))['db'];var utils=require(_0x624b('0x5'));var logger=require(_0x624b('0x6'))(_0x624b('0x7'));var config=require(_0x624b('0x8'));var jayson=require(_0x624b('0x9'));var client=jayson[_0x624b('0xa')][_0x624b('0xb')]({'port':0x232a});config[_0x624b('0xc')]=_[_0x624b('0xd')](config['redis'],{'host':_0x624b('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x624b('0xf'))[_0x624b('0x10')](socket);function respondWithRpcPromise(_0x51ce90,_0x58fa37,_0x1aea89){return new BPromise(function(_0x60b6e9,_0x5a85ea){return client[_0x624b('0x11')](_0x51ce90,_0x1aea89)[_0x624b('0x12')](function(_0x5cf6ad){logger['info'](_0x624b('0x13'),_0x58fa37,_0x624b('0x14'));logger[_0x624b('0x15')]('FaxQueue,\x20%s,\x20%s,\x20%s',_0x58fa37,_0x624b('0x14'),JSON[_0x624b('0x16')](_0x5cf6ad));if(_0x5cf6ad[_0x624b('0x17')]){if(_0x5cf6ad[_0x624b('0x17')]['code']===0x1f4){logger[_0x624b('0x17')]('FaxQueue,\x20%s,\x20%s',_0x58fa37,_0x5cf6ad[_0x624b('0x17')]['message']);return _0x5a85ea(_0x5cf6ad[_0x624b('0x17')][_0x624b('0x18')]);}logger[_0x624b('0x17')](_0x624b('0x13'),_0x58fa37,_0x5cf6ad['error'][_0x624b('0x18')]);return _0x60b6e9(_0x5cf6ad[_0x624b('0x17')]['message']);}else{logger['info']('FaxQueue,\x20%s,\x20%s',_0x58fa37,'request\x20sent');_0x60b6e9(_0x5cf6ad[_0x624b('0x19')][_0x624b('0x18')]);}})['catch'](function(_0x161156){logger[_0x624b('0x17')](_0x624b('0x13'),_0x58fa37,_0x161156);_0x5a85ea(_0x161156);});});}exports[_0x624b('0x1a')]=function(_0xb31639){var _0x3c4f76=this;return new Promise(function(_0x4f0dcf,_0x50cfe8){return db[_0x624b('0x1b')][_0x624b('0x1c')]({'raw':_0xb31639[_0x624b('0x1d')]?_0xb31639['options'][_0x624b('0x1e')]===undefined?!![]:![]:!![],'where':_0xb31639[_0x624b('0x1d')]?_0xb31639[_0x624b('0x1d')][_0x624b('0x1f')]||null:null,'attributes':_0xb31639[_0x624b('0x1d')]?_0xb31639[_0x624b('0x1d')]['attributes']||null:null,'limit':_0xb31639[_0x624b('0x1d')]?_0xb31639[_0x624b('0x1d')][_0x624b('0x20')]||null:null,'include':_0xb31639['options']?_0xb31639['options'][_0x624b('0x21')]?_[_0x624b('0x22')](_0xb31639['options'][_0x624b('0x21')],function(_0x2295d7){return{'model':db[_0x2295d7[_0x624b('0x23')]],'as':_0x2295d7['as'],'attributes':_0x2295d7['attributes'],'include':_0x2295d7[_0x624b('0x21')]?_[_0x624b('0x22')](_0x2295d7[_0x624b('0x21')],function(_0x1a855a){return{'model':db[_0x1a855a['model']],'as':_0x1a855a['as'],'attributes':_0x1a855a[_0x624b('0x24')],'include':_0x1a855a[_0x624b('0x21')]?_['map'](_0x1a855a[_0x624b('0x21')],function(_0x2871f4){return{'model':db[_0x2871f4[_0x624b('0x23')]],'as':_0x2871f4['as'],'attributes':_0x2871f4['attributes']};}):[]};}):[]};}):[]:[]})[_0x624b('0x12')](function(_0x2d4019){logger['info'](_0x624b('0x1a'),_0xb31639);logger[_0x624b('0x15')](_0x624b('0x1a'),_0xb31639,JSON[_0x624b('0x16')](_0x2d4019));_0x4f0dcf(_0x2d4019);})[_0x624b('0x25')](function(_0x3815e6){logger[_0x624b('0x17')](_0x624b('0x1a'),_0x3815e6['message'],_0xb31639);_0x50cfe8(_0x3c4f76[_0x624b('0x17')](0x1f4,_0x3815e6[_0x624b('0x18')]));});});};exports[_0x624b('0x26')]=function(_0x567770){var _0x6c1282=this;return new Promise(function(_0xc1d860,_0x1177c9){return db[_0x624b('0x1b')][_0x624b('0x27')]({'raw':_0x567770[_0x624b('0x1d')]?_0x567770[_0x624b('0x1d')][_0x624b('0x1e')]===undefined?!![]:![]:!![],'where':_0x567770[_0x624b('0x1d')]?_0x567770['options']['where']||null:null,'attributes':_0x567770[_0x624b('0x1d')]?_0x567770[_0x624b('0x1d')][_0x624b('0x24')]||null:null,'include':_0x567770[_0x624b('0x1d')]?_0x567770['options'][_0x624b('0x21')]?_[_0x624b('0x22')](_0x567770['options'][_0x624b('0x21')],function(_0x522a65){return{'model':db[_0x522a65[_0x624b('0x23')]],'as':_0x522a65['as'],'attributes':_0x522a65['attributes'],'include':_0x522a65[_0x624b('0x21')]?_[_0x624b('0x22')](_0x522a65[_0x624b('0x21')],function(_0xcb6ff){return{'model':db[_0xcb6ff['model']],'as':_0xcb6ff['as'],'attributes':_0xcb6ff['attributes'],'include':_0xcb6ff[_0x624b('0x21')]?_[_0x624b('0x22')](_0xcb6ff[_0x624b('0x21')],function(_0x2843c0){return{'model':db[_0x2843c0[_0x624b('0x23')]],'as':_0x2843c0['as'],'attributes':_0x2843c0[_0x624b('0x24')]};}):[]};}):[]};}):[]:[]})[_0x624b('0x12')](function(_0x361789){logger[_0x624b('0x28')](_0x624b('0x26'),_0x567770);logger['debug'](_0x624b('0x26'),_0x567770,JSON[_0x624b('0x16')](_0x361789));_0xc1d860(_0x361789);})[_0x624b('0x25')](function(_0x59effa){logger[_0x624b('0x17')](_0x624b('0x26'),_0x59effa[_0x624b('0x18')],_0x567770);_0x1177c9(_0x6c1282['error'](0x1f4,_0x59effa[_0x624b('0x18')]));});});};
\ No newline at end of file
+var _0xf204=['rpc','../../config/environment','defaults','localhost','redis','./faxQueue.socket','register','request','then','FaxQueue,\x20%s,\x20%s','FaxQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','GetFaxQueue','FaxQueue','findAll','options','raw','where','attributes','limit','include','map','model','ShowFaxQueue','find','debug','lodash','util','randomstring','../../config/logger'];(function(_0x412d5f,_0x3beb1){var _0x275d6f=function(_0x44535e){while(--_0x44535e){_0x412d5f['push'](_0x412d5f['shift']());}};_0x275d6f(++_0x3beb1);}(_0xf204,0x6b));var _0x4f20=function(_0x463c38,_0x562392){_0x463c38=_0x463c38-0x0;var _0x17304f=_0xf204[_0x463c38];return _0x17304f;};'use strict';var _=require(_0x4f20('0x0'));var util=require(_0x4f20('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4f20('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x4f20('0x3'))(_0x4f20('0x4'));var config=require(_0x4f20('0x5'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0x4f20('0x6')](config['redis'],{'host':_0x4f20('0x7'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4f20('0x8')]));require(_0x4f20('0x9'))[_0x4f20('0xa')](socket);function respondWithRpcPromise(_0xde60aa,_0x4ce2f8,_0x385a60){return new BPromise(function(_0x45200e,_0x32f9c6){return client[_0x4f20('0xb')](_0xde60aa,_0x385a60)[_0x4f20('0xc')](function(_0x3e2182){logger['info'](_0x4f20('0xd'),_0x4ce2f8,'request\x20sent');logger['debug'](_0x4f20('0xe'),_0x4ce2f8,_0x4f20('0xf'),JSON[_0x4f20('0x10')](_0x3e2182));if(_0x3e2182[_0x4f20('0x11')]){if(_0x3e2182[_0x4f20('0x11')][_0x4f20('0x12')]===0x1f4){logger[_0x4f20('0x11')]('FaxQueue,\x20%s,\x20%s',_0x4ce2f8,_0x3e2182['error']['message']);return _0x32f9c6(_0x3e2182[_0x4f20('0x11')][_0x4f20('0x13')]);}logger[_0x4f20('0x11')](_0x4f20('0xd'),_0x4ce2f8,_0x3e2182[_0x4f20('0x11')][_0x4f20('0x13')]);return _0x45200e(_0x3e2182[_0x4f20('0x11')]['message']);}else{logger[_0x4f20('0x14')](_0x4f20('0xd'),_0x4ce2f8,_0x4f20('0xf'));_0x45200e(_0x3e2182[_0x4f20('0x15')][_0x4f20('0x13')]);}})[_0x4f20('0x16')](function(_0x200050){logger[_0x4f20('0x11')](_0x4f20('0xd'),_0x4ce2f8,_0x200050);_0x32f9c6(_0x200050);});});}exports[_0x4f20('0x17')]=function(_0x53d5d2){var _0x298e5b=this;return new Promise(function(_0x448649,_0x48c423){return db[_0x4f20('0x18')][_0x4f20('0x19')]({'raw':_0x53d5d2[_0x4f20('0x1a')]?_0x53d5d2[_0x4f20('0x1a')][_0x4f20('0x1b')]===undefined?!![]:![]:!![],'where':_0x53d5d2[_0x4f20('0x1a')]?_0x53d5d2[_0x4f20('0x1a')][_0x4f20('0x1c')]||null:null,'attributes':_0x53d5d2['options']?_0x53d5d2['options'][_0x4f20('0x1d')]||null:null,'limit':_0x53d5d2[_0x4f20('0x1a')]?_0x53d5d2[_0x4f20('0x1a')][_0x4f20('0x1e')]||null:null,'include':_0x53d5d2[_0x4f20('0x1a')]?_0x53d5d2['options'][_0x4f20('0x1f')]?_[_0x4f20('0x20')](_0x53d5d2[_0x4f20('0x1a')][_0x4f20('0x1f')],function(_0x31c23d){return{'model':db[_0x31c23d['model']],'as':_0x31c23d['as'],'attributes':_0x31c23d['attributes'],'include':_0x31c23d[_0x4f20('0x1f')]?_[_0x4f20('0x20')](_0x31c23d[_0x4f20('0x1f')],function(_0x52c8ec){return{'model':db[_0x52c8ec[_0x4f20('0x21')]],'as':_0x52c8ec['as'],'attributes':_0x52c8ec[_0x4f20('0x1d')],'include':_0x52c8ec[_0x4f20('0x1f')]?_[_0x4f20('0x20')](_0x52c8ec[_0x4f20('0x1f')],function(_0x588ed7){return{'model':db[_0x588ed7['model']],'as':_0x588ed7['as'],'attributes':_0x588ed7[_0x4f20('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x533327){logger[_0x4f20('0x14')](_0x4f20('0x17'),_0x53d5d2);logger['debug']('GetFaxQueue',_0x53d5d2,JSON['stringify'](_0x533327));_0x448649(_0x533327);})[_0x4f20('0x16')](function(_0x57c931){logger['error'](_0x4f20('0x17'),_0x57c931[_0x4f20('0x13')],_0x53d5d2);_0x48c423(_0x298e5b[_0x4f20('0x11')](0x1f4,_0x57c931[_0x4f20('0x13')]));});});};exports[_0x4f20('0x22')]=function(_0x2d96bf){var _0x2325eb=this;return new Promise(function(_0x6e838f,_0x50a84){return db['FaxQueue'][_0x4f20('0x23')]({'raw':_0x2d96bf[_0x4f20('0x1a')]?_0x2d96bf['options']['raw']===undefined?!![]:![]:!![],'where':_0x2d96bf[_0x4f20('0x1a')]?_0x2d96bf['options'][_0x4f20('0x1c')]||null:null,'attributes':_0x2d96bf['options']?_0x2d96bf[_0x4f20('0x1a')][_0x4f20('0x1d')]||null:null,'include':_0x2d96bf[_0x4f20('0x1a')]?_0x2d96bf['options'][_0x4f20('0x1f')]?_[_0x4f20('0x20')](_0x2d96bf['options'][_0x4f20('0x1f')],function(_0x4d62a6){return{'model':db[_0x4d62a6[_0x4f20('0x21')]],'as':_0x4d62a6['as'],'attributes':_0x4d62a6[_0x4f20('0x1d')],'include':_0x4d62a6[_0x4f20('0x1f')]?_[_0x4f20('0x20')](_0x4d62a6[_0x4f20('0x1f')],function(_0x15388e){return{'model':db[_0x15388e[_0x4f20('0x21')]],'as':_0x15388e['as'],'attributes':_0x15388e[_0x4f20('0x1d')],'include':_0x15388e[_0x4f20('0x1f')]?_['map'](_0x15388e['include'],function(_0x58373a){return{'model':db[_0x58373a[_0x4f20('0x21')]],'as':_0x58373a['as'],'attributes':_0x58373a[_0x4f20('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x4f20('0xc')](function(_0x2206d0){logger[_0x4f20('0x14')](_0x4f20('0x22'),_0x2d96bf);logger[_0x4f20('0x24')](_0x4f20('0x22'),_0x2d96bf,JSON[_0x4f20('0x10')](_0x2206d0));_0x6e838f(_0x2206d0);})[_0x4f20('0x16')](function(_0x3409b1){logger[_0x4f20('0x11')](_0x4f20('0x22'),_0x3409b1['message'],_0x2d96bf);_0x50a84(_0x2325eb[_0x4f20('0x11')](0x1f4,_0x3409b1[_0x4f20('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/faxQueue/faxQueue.socket.js b/server/api/faxQueue/faxQueue.socket.js
index 8743486..62604f2 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 _0xd837=['save','remove','update','register','length','faxQueue:','./faxQueue.events'];(function(_0x2bb4cd,_0x9bc549){var _0x45c99e=function(_0x5983c8){while(--_0x5983c8){_0x2bb4cd['push'](_0x2bb4cd['shift']());}};_0x45c99e(++_0x9bc549);}(_0xd837,0x1db));var _0x7d83=function(_0x23e7c1,_0x35110c){_0x23e7c1=_0x23e7c1-0x0;var _0x1add43=_0xd837[_0x23e7c1];return _0x1add43;};'use strict';var FaxQueueEvents=require(_0x7d83('0x0'));var events=[_0x7d83('0x1'),_0x7d83('0x2'),_0x7d83('0x3')];function createListener(_0xa998da,_0x436118){return function(_0x47cadb){_0x436118['emit'](_0xa998da,_0x47cadb);};}function removeListener(_0x2ad46b,_0x47a072){return function(){FaxQueueEvents['removeListener'](_0x2ad46b,_0x47a072);};}exports[_0x7d83('0x4')]=function(_0x2f4094){for(var _0x1bb099=0x0,_0x3e3a17=events[_0x7d83('0x5')];_0x1bb099<_0x3e3a17;_0x1bb099++){var _0x1825f3=events[_0x1bb099];var _0x2a1984=createListener(_0x7d83('0x6')+_0x1825f3,_0x2f4094);FaxQueueEvents['on'](_0x1825f3,_0x2a1984);}};
\ No newline at end of file
+var _0x3911=['save','remove','update','emit','length','faxQueue:','./faxQueue.events'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x3911,0x76));var _0x1391=function(_0x2c1dcd,_0x350452){_0x2c1dcd=_0x2c1dcd-0x0;var _0x158ce5=_0x3911[_0x2c1dcd];return _0x158ce5;};'use strict';var FaxQueueEvents=require(_0x1391('0x0'));var events=[_0x1391('0x1'),_0x1391('0x2'),_0x1391('0x3')];function createListener(_0x3100e6,_0x4823af){return function(_0x4c487b){_0x4823af[_0x1391('0x4')](_0x3100e6,_0x4c487b);};}function removeListener(_0x46e0b0,_0x2e95e8){return function(){FaxQueueEvents['removeListener'](_0x46e0b0,_0x2e95e8);};}exports['register']=function(_0x205d1b){for(var _0x5786dc=0x0,_0x3a310d=events[_0x1391('0x5')];_0x5786dc<_0x3a310d;_0x5786dc++){var _0x143b74=events[_0x5786dc];var _0x2c0f0e=createListener(_0x1391('0x6')+_0x143b74,_0x205d1b);FaxQueueEvents['on'](_0x143b74,_0x2c0f0e);}};
\ No newline at end of file
diff --git a/server/api/faxQueue/index.js b/server/api/faxQueue/index.js
index 71df8ff..d89d6ef 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 _0xd8b0=['util','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueue.controller','index','get','/describe','describe','isAuthenticated','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','/:id','update','delete','destroy','removeTeams','exports','multer'];(function(_0x33363d,_0x58de26){var _0x4a59fb=function(_0x28b642){while(--_0x28b642){_0x33363d['push'](_0x33363d['shift']());}};_0x4a59fb(++_0x58de26);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var auth=require(_0x0d8b('0x3'));var interaction=require(_0x0d8b('0x4'));var config=require(_0x0d8b('0x5'));var controller=require(_0x0d8b('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x0d8b('0x7')]);router[_0x0d8b('0x8')](_0x0d8b('0x9'),auth['isAuthenticated'](),controller[_0x0d8b('0xa')]);router[_0x0d8b('0x8')]('/:id',auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0x8')](_0x0d8b('0xd'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0x8')](_0x0d8b('0xf'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['get'](_0x0d8b('0x11'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x12')]);router[_0x0d8b('0x13')]('/',auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x14')]);router[_0x0d8b('0x13')](_0x0d8b('0xf'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x15')]);router[_0x0d8b('0x13')](_0x0d8b('0x11'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x16')]);router['put'](_0x0d8b('0x17'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x18')]);router[_0x0d8b('0x19')](_0x0d8b('0x17'),auth['isAuthenticated'](),controller[_0x0d8b('0x1a')]);router[_0x0d8b('0x19')](_0x0d8b('0xf'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x1b')]);router[_0x0d8b('0x19')](_0x0d8b('0x11'),auth[_0x0d8b('0xb')](),controller['removeAgents']);module[_0x0d8b('0x1c')]=router;
\ No newline at end of file
+var _0xd8b0=['util','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueue.controller','index','get','/describe','describe','isAuthenticated','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','/:id','update','delete','destroy','removeTeams','exports','multer'];(function(_0x3a3976,_0x31cf95){var _0x3f3e45=function(_0x1f5181){while(--_0x1f5181){_0x3a3976['push'](_0x3a3976['shift']());}};_0x3f3e45(++_0x31cf95);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var auth=require(_0x0d8b('0x3'));var interaction=require(_0x0d8b('0x4'));var config=require(_0x0d8b('0x5'));var controller=require(_0x0d8b('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x0d8b('0x7')]);router[_0x0d8b('0x8')](_0x0d8b('0x9'),auth['isAuthenticated'](),controller[_0x0d8b('0xa')]);router[_0x0d8b('0x8')]('/:id',auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0x8')](_0x0d8b('0xd'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0x8')](_0x0d8b('0xf'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['get'](_0x0d8b('0x11'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x12')]);router[_0x0d8b('0x13')]('/',auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x14')]);router[_0x0d8b('0x13')](_0x0d8b('0xf'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x15')]);router[_0x0d8b('0x13')](_0x0d8b('0x11'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x16')]);router['put'](_0x0d8b('0x17'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x18')]);router[_0x0d8b('0x19')](_0x0d8b('0x17'),auth['isAuthenticated'](),controller[_0x0d8b('0x1a')]);router[_0x0d8b('0x19')](_0x0d8b('0xf'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x1b')]);router[_0x0d8b('0x19')](_0x0d8b('0x11'),auth[_0x0d8b('0xb')](),controller['removeAgents']);module[_0x0d8b('0x1c')]=router;
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.attributes.js b/server/api/faxQueueReport/faxQueueReport.attributes.js
index 7aab3f8..4521102 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 _0x5b3d=['DATE','moment','sequelize','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5b3d,0x89));var _0xd5b3=function(_0x4ef721,_0x1513f3){_0x4ef721=_0x4ef721-0x0;var _0x1b035e=_0x5b3d[_0x4ef721];return _0x1b035e;};'use strict';var moment=require(_0xd5b3('0x0'));var Sequelize=require(_0xd5b3('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xd5b3('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0xd5b3('0x2')]},'joinAt':{'type':Sequelize[_0xd5b3('0x3')]},'leaveAt':{'type':Sequelize[_0xd5b3('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0xd5b3('0x2')]}};
\ No newline at end of file
+var _0x30aa=['exports','STRING','DATE','moment','sequelize'];(function(_0x11a6dd,_0x24663e){var _0x215d88=function(_0x2f3d04){while(--_0x2f3d04){_0x11a6dd['push'](_0x11a6dd['shift']());}};_0x215d88(++_0x24663e);}(_0x30aa,0xfd));var _0xa30a=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x30aa[_0x3947c9];return _0x2e7871;};'use strict';var moment=require(_0xa30a('0x0'));var Sequelize=require(_0xa30a('0x1'));module[_0xa30a('0x2')]={'uniqueid':{'type':Sequelize[_0xa30a('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0xa30a('0x3')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0xa30a('0x4')]},'acceptAt':{'type':Sequelize[_0xa30a('0x4')]},'exitAt':{'type':Sequelize[_0xa30a('0x4')]},'reason':{'type':Sequelize[_0xa30a('0x3')]}};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.controller.js b/server/api/faxQueueReport/faxQueueReport.controller.js
index e7631e3..fdb170a 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 _0xaf7b=['update','then','destroy','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','key','model','query','filters','intersection','fields','attributes','nolimit','order','sort','filter','where','merge','type','FaxQueueReport','includeAll','include','findAll','show','params','keys','length','find','catch','create','body','describe','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','end','status','json','count','offset','limit','Content-Range','apply','reject'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xaf7b,0x18a));var _0xbaf7=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xaf7b[_0x14add3];return _0x4a174f;};'use strict';var pdf=require(_0xbaf7('0x0'));var emlformat=require(_0xbaf7('0x1'));var rimraf=require(_0xbaf7('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xbaf7('0x3'));var moment=require('moment');var BPromise=require(_0xbaf7('0x4'));var Mustache=require(_0xbaf7('0x5'));var util=require(_0xbaf7('0x6'));var path=require(_0xbaf7('0x7'));var sox=require(_0xbaf7('0x8'));var csv=require(_0xbaf7('0x9'));var ejs=require(_0xbaf7('0xa'));var fs=require('fs');var _=require(_0xbaf7('0xb'));var squel=require(_0xbaf7('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xbaf7('0xd'));var toCsv=require(_0xbaf7('0x9'));var querystring=require(_0xbaf7('0xe'));var Papa=require(_0xbaf7('0xf'));var Redis=require(_0xbaf7('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xbaf7('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbaf7('0x12'));var logger=require(_0xbaf7('0x13'))('api');var utils=require(_0xbaf7('0x14'));var config=require(_0xbaf7('0x15'));var db=require(_0xbaf7('0x16'))['db'];function respondWithStatusCode(_0x5906ba,_0x5f3b11){_0x5f3b11=_0x5f3b11||0xcc;return function(_0x129580){if(_0x129580){return _0x5906ba['sendStatus'](_0x5f3b11);}return _0x5906ba['status'](_0x5f3b11)[_0xbaf7('0x17')]();};}function respondWithResult(_0x217156,_0x2f8832){_0x2f8832=_0x2f8832||0xc8;return function(_0x15a762){if(_0x15a762){return _0x217156[_0xbaf7('0x18')](_0x2f8832)[_0xbaf7('0x19')](_0x15a762);}};}function respondWithFilteredResult(_0xa77702,_0x48613d){return function(_0x8bf75e){if(_0x8bf75e){var _0x2231ea=_0x8bf75e[_0xbaf7('0x1a')],_0x535531=_0x48613d[_0xbaf7('0x1b')],_0x43a216=_0x48613d[_0xbaf7('0x1b')]+_0x48613d[_0xbaf7('0x1c')],_0x1ed556;if(_0x43a216>=_0x2231ea){_0x43a216=_0x2231ea;_0x1ed556=0xc8;}else{_0x1ed556=0xce;}_0xa77702[_0xbaf7('0x18')](_0x1ed556);return _0xa77702['set'](_0xbaf7('0x1d'),_0x535531+'-'+_0x43a216+'/'+_0x2231ea)[_0xbaf7('0x19')](_0x8bf75e);}return null;};}function patchUpdates(_0x270f13){return function(_0x1671f3){try{jsonpatch[_0xbaf7('0x1e')](_0x1671f3,_0x270f13,!![]);}catch(_0x300eab){return BPromise[_0xbaf7('0x1f')](_0x300eab);}return _0x1671f3['save']();};}function saveUpdates(_0x5eee95,_0x477f8a){return function(_0x5b4762){if(_0x5b4762){return _0x5b4762[_0xbaf7('0x20')](_0x5eee95)[_0xbaf7('0x21')](function(_0x3d0814){return _0x3d0814;});}return null;};}function removeEntity(_0x81c37,_0x1d12ed){return function(_0x410892){if(_0x410892){return _0x410892[_0xbaf7('0x22')]()[_0xbaf7('0x21')](function(){_0x81c37['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xe431b7,_0x12348a){return function(_0x3e372c){if(!_0x3e372c){_0xe431b7[_0xbaf7('0x23')](0x194);}return _0x3e372c;};}function handleError(_0x3ee23d,_0x45ef49){_0x45ef49=_0x45ef49||0x1f4;return function(_0x5cebb3){logger[_0xbaf7('0x24')](_0x5cebb3[_0xbaf7('0x25')]);if(_0x5cebb3[_0xbaf7('0x26')]){delete _0x5cebb3[_0xbaf7('0x26')];}_0x3ee23d['status'](_0x45ef49)[_0xbaf7('0x27')](_0x5cebb3);};}exports[_0xbaf7('0x28')]=function(_0x2c732d,_0x1f2bc3){var _0x42478a={},_0x3d9095={},_0x27603c={'count':0x0,'rows':[]};var _0x4eac6a=_[_0xbaf7('0x29')](db['FaxQueueReport'][_0xbaf7('0x2a')],function(_0x83a8fe){return{'name':_0x83a8fe[_0xbaf7('0x2b')],'type':_0x83a8fe['type'][_0xbaf7('0x2c')]};});_0x3d9095[_0xbaf7('0x2d')]=_[_0xbaf7('0x29')](_0x4eac6a,_0xbaf7('0x26'));_0x3d9095['query']=_['keys'](_0x2c732d[_0xbaf7('0x2e')]);_0x3d9095[_0xbaf7('0x2f')]=_[_0xbaf7('0x30')](_0x3d9095[_0xbaf7('0x2d')],_0x3d9095[_0xbaf7('0x2e')]);_0x42478a['attributes']=_[_0xbaf7('0x30')](_0x3d9095['model'],qs[_0xbaf7('0x31')](_0x2c732d['query'][_0xbaf7('0x31')]));_0x42478a[_0xbaf7('0x32')]=_0x42478a[_0xbaf7('0x32')]['length']?_0x42478a[_0xbaf7('0x32')]:_0x3d9095['model'];if(!_0x2c732d[_0xbaf7('0x2e')]['hasOwnProperty'](_0xbaf7('0x33'))){_0x42478a[_0xbaf7('0x1c')]=qs[_0xbaf7('0x1c')](_0x2c732d[_0xbaf7('0x2e')][_0xbaf7('0x1c')]);_0x42478a[_0xbaf7('0x1b')]=qs['offset'](_0x2c732d['query']['offset']);}_0x42478a[_0xbaf7('0x34')]=qs[_0xbaf7('0x35')](_0x2c732d[_0xbaf7('0x2e')]['sort']);_0x42478a['where']=qs['filters'](_['pick'](_0x2c732d['query'],_0x3d9095['filters']));if(_0x2c732d[_0xbaf7('0x2e')][_0xbaf7('0x36')]){_0x42478a[_0xbaf7('0x37')]=_[_0xbaf7('0x38')](_0x42478a[_0xbaf7('0x37')],{'$or':_[_0xbaf7('0x29')](_0x4eac6a,function(_0x261a55){if(_0x261a55[_0xbaf7('0x39')]!=='VIRTUAL'){var _0x13988f={};_0x13988f[_0x261a55['name']]={'$like':'%'+_0x2c732d[_0xbaf7('0x2e')][_0xbaf7('0x36')]+'%'};return _0x13988f;}})});}_0x42478a=_['merge']({},_0x42478a,_0x2c732d['options']);var _0x5d6abf={'where':_0x42478a[_0xbaf7('0x37')]};return db[_0xbaf7('0x3a')][_0xbaf7('0x1a')](_0x5d6abf)[_0xbaf7('0x21')](function(_0x1ea95b){_0x27603c['count']=_0x1ea95b;if(_0x2c732d['query'][_0xbaf7('0x3b')]){_0x42478a[_0xbaf7('0x3c')]=[{'all':!![]}];}return db['FaxQueueReport'][_0xbaf7('0x3d')](_0x42478a);})[_0xbaf7('0x21')](function(_0x34f200){_0x27603c['rows']=_0x34f200;return _0x27603c;})[_0xbaf7('0x21')](respondWithFilteredResult(_0x1f2bc3,_0x42478a))['catch'](handleError(_0x1f2bc3,null));};exports[_0xbaf7('0x3e')]=function(_0x28aa0e,_0x54b53d){var _0x369bb4={'raw':!![],'where':{'id':_0x28aa0e[_0xbaf7('0x3f')]['id']}},_0x152d0b={};_0x152d0b[_0xbaf7('0x2d')]=_[_0xbaf7('0x40')](db[_0xbaf7('0x3a')][_0xbaf7('0x2a')]);_0x152d0b['query']=_[_0xbaf7('0x40')](_0x28aa0e[_0xbaf7('0x2e')]);_0x152d0b[_0xbaf7('0x2f')]=_['intersection'](_0x152d0b[_0xbaf7('0x2d')],_0x152d0b[_0xbaf7('0x2e')]);_0x369bb4[_0xbaf7('0x32')]=_[_0xbaf7('0x30')](_0x152d0b[_0xbaf7('0x2d')],qs[_0xbaf7('0x31')](_0x28aa0e[_0xbaf7('0x2e')][_0xbaf7('0x31')]));_0x369bb4['attributes']=_0x369bb4['attributes'][_0xbaf7('0x41')]?_0x369bb4[_0xbaf7('0x32')]:_0x152d0b['model'];if(_0x28aa0e[_0xbaf7('0x2e')][_0xbaf7('0x3b')]){_0x369bb4[_0xbaf7('0x3c')]=[{'all':!![]}];}_0x369bb4=_['merge']({},_0x369bb4,_0x28aa0e['options']);return db['FaxQueueReport'][_0xbaf7('0x42')](_0x369bb4)[_0xbaf7('0x21')](handleEntityNotFound(_0x54b53d,null))['then'](respondWithResult(_0x54b53d,null))[_0xbaf7('0x43')](handleError(_0x54b53d,null));};exports[_0xbaf7('0x44')]=function(_0x3422b6,_0x5abbe6){return db['FaxQueueReport']['create'](_0x3422b6['body'],{})[_0xbaf7('0x21')](respondWithResult(_0x5abbe6,0xc9))[_0xbaf7('0x43')](handleError(_0x5abbe6,null));};exports['update']=function(_0x3d52b0,_0x218c81){if(_0x3d52b0[_0xbaf7('0x45')]['id']){delete _0x3d52b0[_0xbaf7('0x45')]['id'];}return db[_0xbaf7('0x3a')]['find']({'where':{'id':_0x3d52b0['params']['id']}})[_0xbaf7('0x21')](handleEntityNotFound(_0x218c81,null))['then'](saveUpdates(_0x3d52b0[_0xbaf7('0x45')],null))[_0xbaf7('0x21')](respondWithResult(_0x218c81,null))['catch'](handleError(_0x218c81,null));};exports['destroy']=function(_0x353c65,_0x560008){return db[_0xbaf7('0x3a')][_0xbaf7('0x42')]({'where':{'id':_0x353c65[_0xbaf7('0x3f')]['id']}})[_0xbaf7('0x21')](handleEntityNotFound(_0x560008,null))[_0xbaf7('0x21')](removeEntity(_0x560008,null))['catch'](handleError(_0x560008,null));};exports[_0xbaf7('0x46')]=function(_0xd704c9,_0x2bf622){return db[_0xbaf7('0x3a')][_0xbaf7('0x46')]()[_0xbaf7('0x21')](respondWithResult(_0x2bf622,null))[_0xbaf7('0x43')](handleError(_0x2bf622,null));};
\ No newline at end of file
+var _0x2aa6=['then','destroy','end','error','name','send','map','FaxQueueReport','rawAttributes','type','key','model','query','keys','filters','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','options','count','includeAll','include','findAll','catch','show','params','intersection','length','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../mysqldb','status','json','offset','limit','set','reject','save','update'];(function(_0x9fd887,_0x47f76c){var _0x1a54ab=function(_0xb65c08){while(--_0xb65c08){_0x9fd887['push'](_0x9fd887['shift']());}};_0x1a54ab(++_0x47f76c);}(_0x2aa6,0xb5));var _0x62aa=function(_0x4c4037,_0x15054b){_0x4c4037=_0x4c4037-0x0;var _0x357862=_0x2aa6[_0x4c4037];return _0x357862;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x62aa('0x0'));var rimraf=require(_0x62aa('0x1'));var zipdir=require(_0x62aa('0x2'));var jsonpatch=require(_0x62aa('0x3'));var rp=require(_0x62aa('0x4'));var moment=require(_0x62aa('0x5'));var BPromise=require(_0x62aa('0x6'));var Mustache=require(_0x62aa('0x7'));var util=require(_0x62aa('0x8'));var path=require(_0x62aa('0x9'));var sox=require(_0x62aa('0xa'));var csv=require(_0x62aa('0xb'));var ejs=require(_0x62aa('0xc'));var fs=require('fs');var _=require(_0x62aa('0xd'));var squel=require(_0x62aa('0xe'));var crypto=require(_0x62aa('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x62aa('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x62aa('0x11'));var Redis=require(_0x62aa('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x62aa('0x13'));var as=require(_0x62aa('0x14'));var hardwareService=require(_0x62aa('0x15'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x62aa('0x16'));var db=require(_0x62aa('0x17'))['db'];function respondWithStatusCode(_0x521ba2,_0x23de4b){_0x23de4b=_0x23de4b||0xcc;return function(_0x2fa330){if(_0x2fa330){return _0x521ba2['sendStatus'](_0x23de4b);}return _0x521ba2[_0x62aa('0x18')](_0x23de4b)['end']();};}function respondWithResult(_0x36f8b2,_0x5a56aa){_0x5a56aa=_0x5a56aa||0xc8;return function(_0x186274){if(_0x186274){return _0x36f8b2['status'](_0x5a56aa)[_0x62aa('0x19')](_0x186274);}};}function respondWithFilteredResult(_0x4b7a53,_0x4d3756){return function(_0x3826b7){if(_0x3826b7){var _0xcc2d71=_0x3826b7['count'],_0x52468a=_0x4d3756['offset'],_0x7f5b99=_0x4d3756[_0x62aa('0x1a')]+_0x4d3756[_0x62aa('0x1b')],_0x1ca1ad;if(_0x7f5b99>=_0xcc2d71){_0x7f5b99=_0xcc2d71;_0x1ca1ad=0xc8;}else{_0x1ca1ad=0xce;}_0x4b7a53[_0x62aa('0x18')](_0x1ca1ad);return _0x4b7a53[_0x62aa('0x1c')]('Content-Range',_0x52468a+'-'+_0x7f5b99+'/'+_0xcc2d71)[_0x62aa('0x19')](_0x3826b7);}return null;};}function patchUpdates(_0x58016a){return function(_0x4ef5d2){try{jsonpatch['apply'](_0x4ef5d2,_0x58016a,!![]);}catch(_0x590424){return BPromise[_0x62aa('0x1d')](_0x590424);}return _0x4ef5d2[_0x62aa('0x1e')]();};}function saveUpdates(_0x2c3a88,_0x2b657f){return function(_0x3e4d22){if(_0x3e4d22){return _0x3e4d22[_0x62aa('0x1f')](_0x2c3a88)[_0x62aa('0x20')](function(_0x19cb98){return _0x19cb98;});}return null;};}function removeEntity(_0x1e641d,_0x2d920f){return function(_0x104eea){if(_0x104eea){return _0x104eea[_0x62aa('0x21')]()[_0x62aa('0x20')](function(){_0x1e641d[_0x62aa('0x18')](0xcc)[_0x62aa('0x22')]();});}};}function handleEntityNotFound(_0x20fbb,_0x20a238){return function(_0x3b9fb4){if(!_0x3b9fb4){_0x20fbb['sendStatus'](0x194);}return _0x3b9fb4;};}function handleError(_0x4ce3c8,_0x1d2585){_0x1d2585=_0x1d2585||0x1f4;return function(_0x5ddc03){logger[_0x62aa('0x23')](_0x5ddc03['stack']);if(_0x5ddc03[_0x62aa('0x24')]){delete _0x5ddc03[_0x62aa('0x24')];}_0x4ce3c8[_0x62aa('0x18')](_0x1d2585)[_0x62aa('0x25')](_0x5ddc03);};}exports['index']=function(_0x150990,_0x3882b8){var _0x418530={},_0x228491={},_0x149cf6={'count':0x0,'rows':[]};var _0x27580e=_[_0x62aa('0x26')](db[_0x62aa('0x27')][_0x62aa('0x28')],function(_0x3b9431){return{'name':_0x3b9431['fieldName'],'type':_0x3b9431[_0x62aa('0x29')][_0x62aa('0x2a')]};});_0x228491[_0x62aa('0x2b')]=_[_0x62aa('0x26')](_0x27580e,_0x62aa('0x24'));_0x228491[_0x62aa('0x2c')]=_[_0x62aa('0x2d')](_0x150990[_0x62aa('0x2c')]);_0x228491[_0x62aa('0x2e')]=_['intersection'](_0x228491[_0x62aa('0x2b')],_0x228491['query']);_0x418530[_0x62aa('0x2f')]=_['intersection'](_0x228491['model'],qs[_0x62aa('0x30')](_0x150990['query'][_0x62aa('0x30')]));_0x418530[_0x62aa('0x2f')]=_0x418530['attributes']['length']?_0x418530[_0x62aa('0x2f')]:_0x228491[_0x62aa('0x2b')];if(!_0x150990[_0x62aa('0x2c')][_0x62aa('0x31')](_0x62aa('0x32'))){_0x418530[_0x62aa('0x1b')]=qs[_0x62aa('0x1b')](_0x150990['query'][_0x62aa('0x1b')]);_0x418530[_0x62aa('0x1a')]=qs[_0x62aa('0x1a')](_0x150990['query']['offset']);}_0x418530[_0x62aa('0x33')]=qs[_0x62aa('0x34')](_0x150990[_0x62aa('0x2c')][_0x62aa('0x34')]);_0x418530['where']=qs[_0x62aa('0x2e')](_[_0x62aa('0x35')](_0x150990[_0x62aa('0x2c')],_0x228491['filters']));if(_0x150990[_0x62aa('0x2c')][_0x62aa('0x36')]){_0x418530[_0x62aa('0x37')]=_[_0x62aa('0x38')](_0x418530[_0x62aa('0x37')],{'$or':_[_0x62aa('0x26')](_0x27580e,function(_0x5d1a89){if(_0x5d1a89[_0x62aa('0x29')]!=='VIRTUAL'){var _0x524a2e={};_0x524a2e[_0x5d1a89[_0x62aa('0x24')]]={'$like':'%'+_0x150990['query'][_0x62aa('0x36')]+'%'};return _0x524a2e;}})});}_0x418530=_[_0x62aa('0x38')]({},_0x418530,_0x150990[_0x62aa('0x39')]);var _0x57ebdd={'where':_0x418530[_0x62aa('0x37')]};return db['FaxQueueReport']['count'](_0x57ebdd)[_0x62aa('0x20')](function(_0x1547de){_0x149cf6[_0x62aa('0x3a')]=_0x1547de;if(_0x150990[_0x62aa('0x2c')][_0x62aa('0x3b')]){_0x418530[_0x62aa('0x3c')]=[{'all':!![]}];}return db['FaxQueueReport'][_0x62aa('0x3d')](_0x418530);})['then'](function(_0x50edb0){_0x149cf6['rows']=_0x50edb0;return _0x149cf6;})['then'](respondWithFilteredResult(_0x3882b8,_0x418530))[_0x62aa('0x3e')](handleError(_0x3882b8,null));};exports[_0x62aa('0x3f')]=function(_0x490d4a,_0x2da885){var _0x168a31={'raw':!![],'where':{'id':_0x490d4a[_0x62aa('0x40')]['id']}},_0x2e90c3={};_0x2e90c3[_0x62aa('0x2b')]=_[_0x62aa('0x2d')](db[_0x62aa('0x27')][_0x62aa('0x28')]);_0x2e90c3['query']=_[_0x62aa('0x2d')](_0x490d4a[_0x62aa('0x2c')]);_0x2e90c3[_0x62aa('0x2e')]=_['intersection'](_0x2e90c3[_0x62aa('0x2b')],_0x2e90c3[_0x62aa('0x2c')]);_0x168a31[_0x62aa('0x2f')]=_[_0x62aa('0x41')](_0x2e90c3['model'],qs['fields'](_0x490d4a[_0x62aa('0x2c')]['fields']));_0x168a31[_0x62aa('0x2f')]=_0x168a31[_0x62aa('0x2f')][_0x62aa('0x42')]?_0x168a31[_0x62aa('0x2f')]:_0x2e90c3[_0x62aa('0x2b')];if(_0x490d4a[_0x62aa('0x2c')][_0x62aa('0x3b')]){_0x168a31[_0x62aa('0x3c')]=[{'all':!![]}];}_0x168a31=_[_0x62aa('0x38')]({},_0x168a31,_0x490d4a[_0x62aa('0x39')]);return db['FaxQueueReport'][_0x62aa('0x43')](_0x168a31)[_0x62aa('0x20')](handleEntityNotFound(_0x2da885,null))[_0x62aa('0x20')](respondWithResult(_0x2da885,null))['catch'](handleError(_0x2da885,null));};exports[_0x62aa('0x44')]=function(_0x62e66e,_0x5c8ce2){return db['FaxQueueReport'][_0x62aa('0x44')](_0x62e66e[_0x62aa('0x45')],{})['then'](respondWithResult(_0x5c8ce2,0xc9))[_0x62aa('0x3e')](handleError(_0x5c8ce2,null));};exports[_0x62aa('0x1f')]=function(_0x4841df,_0x54c034){if(_0x4841df[_0x62aa('0x45')]['id']){delete _0x4841df[_0x62aa('0x45')]['id'];}return db['FaxQueueReport'][_0x62aa('0x43')]({'where':{'id':_0x4841df[_0x62aa('0x40')]['id']}})[_0x62aa('0x20')](handleEntityNotFound(_0x54c034,null))[_0x62aa('0x20')](saveUpdates(_0x4841df[_0x62aa('0x45')],null))[_0x62aa('0x20')](respondWithResult(_0x54c034,null))[_0x62aa('0x3e')](handleError(_0x54c034,null));};exports[_0x62aa('0x21')]=function(_0x536ee2,_0x434919){return db[_0x62aa('0x27')][_0x62aa('0x43')]({'where':{'id':_0x536ee2['params']['id']}})[_0x62aa('0x20')](handleEntityNotFound(_0x434919,null))['then'](removeEntity(_0x434919,null))[_0x62aa('0x3e')](handleError(_0x434919,null));};exports[_0x62aa('0x46')]=function(_0x302d97,_0x26e64f){return db[_0x62aa('0x27')][_0x62aa('0x46')]()[_0x62aa('0x20')](respondWithResult(_0x26e64f,null))[_0x62aa('0x3e')](handleError(_0x26e64f,null));};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.model.js b/server/api/faxQueueReport/faxQueueReport.model.js
index f14aca0..457fca1 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 _0xac27=['uniqueid','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','FaxQueueReport','report_fax_queue'];(function(_0x35225b,_0x2c888b){var _0x20564f=function(_0x2393c7){while(--_0x2393c7){_0x35225b['push'](_0x35225b['shift']());}};_0x20564f(++_0x2c888b);}(_0xac27,0x17b));var _0x7ac2=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xac27[_0x502c7d];return _0x30b7ed;};'use strict';var _=require(_0x7ac2('0x0'));var util=require(_0x7ac2('0x1'));var logger=require(_0x7ac2('0x2'))('api');var moment=require(_0x7ac2('0x3'));var BPromise=require(_0x7ac2('0x4'));var rp=require(_0x7ac2('0x5'));var fs=require('fs');var path=require(_0x7ac2('0x6'));var rimraf=require(_0x7ac2('0x7'));var config=require(_0x7ac2('0x8'));var attributes=require('./faxQueueReport.attributes');module[_0x7ac2('0x9')]=function(_0x5c86b6,_0x19356f){return _0x5c86b6[_0x7ac2('0xa')](_0x7ac2('0xb'),attributes,{'tableName':_0x7ac2('0xc'),'paranoid':![],'indexes':[{'name':_0x7ac2('0xd'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x6e42=['bluebird','request-promise','path','rimraf','../../config/environment','exports','define','FaxQueueReport','report_fax_queue','uniqueid','lodash','../../config/logger','api','moment'];(function(_0x3cf617,_0x343fb1){var _0x51b7ef=function(_0x5a9444){while(--_0x5a9444){_0x3cf617['push'](_0x3cf617['shift']());}};_0x51b7ef(++_0x343fb1);}(_0x6e42,0x14c));var _0x26e4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6e42[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x26e4('0x0'));var util=require('util');var logger=require(_0x26e4('0x1'))(_0x26e4('0x2'));var moment=require(_0x26e4('0x3'));var BPromise=require(_0x26e4('0x4'));var rp=require(_0x26e4('0x5'));var fs=require('fs');var path=require(_0x26e4('0x6'));var rimraf=require(_0x26e4('0x7'));var config=require(_0x26e4('0x8'));var attributes=require('./faxQueueReport.attributes');module[_0x26e4('0x9')]=function(_0xdf5435,_0x1ac7e1){return _0xdf5435[_0x26e4('0xa')](_0x26e4('0xb'),attributes,{'tableName':_0x26e4('0xc'),'paranoid':![],'indexes':[{'name':_0x26e4('0xd'),'fields':[_0x26e4('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/faxQueueReport.rpc.js b/server/api/faxQueueReport/faxQueueReport.rpc.js
index c6563b2..190ebcf 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 _0x2f55=['lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxQueueReport,\x20%s,\x20%s','message','result','catch','CreateFaxQueueReport','create','body','raw','then','UpdateFaxQueueReport','FaxQueueReport','options','attributes','limit'];(function(_0x13b0bd,_0x4a7ac5){var _0x16f517=function(_0x5bdc82){while(--_0x5bdc82){_0x13b0bd['push'](_0x13b0bd['shift']());}};_0x16f517(++_0x4a7ac5);}(_0x2f55,0x1b2));var _0x52f5=function(_0x82e16d,_0x3a243f){_0x82e16d=_0x82e16d-0x0;var _0x13e193=_0x2f55[_0x82e16d];return _0x13e193;};'use strict';var _=require(_0x52f5('0x0'));var util=require(_0x52f5('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x52f5('0x2'));var db=require(_0x52f5('0x3'))['db'];var utils=require(_0x52f5('0x4'));var logger=require(_0x52f5('0x5'))(_0x52f5('0x6'));var config=require(_0x52f5('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x52f5('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x560db7,_0x255fa3,_0x23c597){return new BPromise(function(_0x444b4e,_0xb3073a){return client[_0x52f5('0x9')](_0x560db7,_0x23c597)['then'](function(_0x2eb498){logger[_0x52f5('0xa')]('FaxQueueReport,\x20%s,\x20%s',_0x255fa3,_0x52f5('0xb'));logger[_0x52f5('0xc')](_0x52f5('0xd'),_0x255fa3,'request\x20sent',JSON[_0x52f5('0xe')](_0x2eb498));if(_0x2eb498[_0x52f5('0xf')]){if(_0x2eb498[_0x52f5('0xf')][_0x52f5('0x10')]===0x1f4){logger[_0x52f5('0xf')](_0x52f5('0x11'),_0x255fa3,_0x2eb498[_0x52f5('0xf')][_0x52f5('0x12')]);return _0xb3073a(_0x2eb498['error'][_0x52f5('0x12')]);}logger['error'](_0x52f5('0x11'),_0x255fa3,_0x2eb498[_0x52f5('0xf')][_0x52f5('0x12')]);return _0x444b4e(_0x2eb498['error'][_0x52f5('0x12')]);}else{logger[_0x52f5('0xa')](_0x52f5('0x11'),_0x255fa3,_0x52f5('0xb'));_0x444b4e(_0x2eb498[_0x52f5('0x13')][_0x52f5('0x12')]);}})[_0x52f5('0x14')](function(_0x1cb6c0){logger[_0x52f5('0xf')](_0x52f5('0x11'),_0x255fa3,_0x1cb6c0);_0xb3073a(_0x1cb6c0);});});}exports[_0x52f5('0x15')]=function(_0x3e760a){var _0x15ee0a=this;return new Promise(function(_0x4d0ad0,_0x2eeba9){return db['FaxQueueReport'][_0x52f5('0x16')](_0x3e760a[_0x52f5('0x17')],{'raw':_0x3e760a['options']?_0x3e760a['options'][_0x52f5('0x18')]===undefined?!![]:![]:!![]})[_0x52f5('0x19')](function(_0x30bb2f){logger['info'](_0x52f5('0x15'),_0x3e760a);logger[_0x52f5('0xc')]('CreateFaxQueueReport',_0x3e760a,JSON['stringify'](_0x30bb2f));_0x4d0ad0(_0x30bb2f);})[_0x52f5('0x14')](function(_0x3939f6){logger['error'](_0x52f5('0x15'),_0x3939f6[_0x52f5('0x12')],_0x3e760a);_0x2eeba9(_0x15ee0a[_0x52f5('0xf')](0x1f4,_0x3939f6[_0x52f5('0x12')]));});});};exports[_0x52f5('0x1a')]=function(_0x41e03f){var _0x878def=this;return new Promise(function(_0x4a304a,_0x578317){return db[_0x52f5('0x1b')]['update'](_0x41e03f[_0x52f5('0x17')],{'raw':_0x41e03f['options']?_0x41e03f[_0x52f5('0x1c')][_0x52f5('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x41e03f[_0x52f5('0x1c')]?_0x41e03f[_0x52f5('0x1c')]['where']||null:null,'attributes':_0x41e03f['options']?_0x41e03f[_0x52f5('0x1c')][_0x52f5('0x1d')]||null:null,'limit':_0x41e03f[_0x52f5('0x1c')]?_0x41e03f[_0x52f5('0x1c')][_0x52f5('0x1e')]||null:null})['then'](function(_0x2cb481){logger['info']('UpdateFaxQueueReport',_0x41e03f);logger[_0x52f5('0xc')](_0x52f5('0x1a'),_0x41e03f,JSON[_0x52f5('0xe')](_0x2cb481));_0x4a304a(_0x2cb481);})[_0x52f5('0x14')](function(_0x39a2d7){logger['error'](_0x52f5('0x1a'),_0x39a2d7[_0x52f5('0x12')],_0x41e03f);_0x578317(_0x878def[_0x52f5('0xf')](0x1f4,_0x39a2d7['message']));});});};
\ No newline at end of file
+var _0x22a5=['catch','CreateFaxQueueReport','create','options','FaxQueueReport','update','body','limit','UpdateFaxQueueReport','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','http','request','then','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0x3e0248,_0x990363){var _0x127971=function(_0x4c2907){while(--_0x4c2907){_0x3e0248['push'](_0x3e0248['shift']());}};_0x127971(++_0x990363);}(_0x22a5,0x1ad));var _0x522a=function(_0x460551,_0x3c4155){_0x460551=_0x460551-0x0;var _0x20a144=_0x22a5[_0x460551];return _0x20a144;};'use strict';var _=require(_0x522a('0x0'));var util=require('util');var moment=require(_0x522a('0x1'));var BPromise=require('bluebird');var rs=require(_0x522a('0x2'));var fs=require('fs');var Redis=require(_0x522a('0x3'));var db=require(_0x522a('0x4'))['db'];var utils=require(_0x522a('0x5'));var logger=require('../../config/logger')(_0x522a('0x6'));var config=require('../../config/environment');var jayson=require(_0x522a('0x7'));var client=jayson['client'][_0x522a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x173007,_0x1a2c7a,_0x1b8b7b){return new BPromise(function(_0x4955b4,_0x35c03f){return client[_0x522a('0x9')](_0x173007,_0x1b8b7b)[_0x522a('0xa')](function(_0x5d793a){logger[_0x522a('0xb')](_0x522a('0xc'),_0x1a2c7a,_0x522a('0xd'));logger[_0x522a('0xe')]('FaxQueueReport,\x20%s,\x20%s,\x20%s',_0x1a2c7a,_0x522a('0xd'),JSON[_0x522a('0xf')](_0x5d793a));if(_0x5d793a[_0x522a('0x10')]){if(_0x5d793a['error'][_0x522a('0x11')]===0x1f4){logger[_0x522a('0x10')]('FaxQueueReport,\x20%s,\x20%s',_0x1a2c7a,_0x5d793a['error']['message']);return _0x35c03f(_0x5d793a['error'][_0x522a('0x12')]);}logger[_0x522a('0x10')]('FaxQueueReport,\x20%s,\x20%s',_0x1a2c7a,_0x5d793a[_0x522a('0x10')][_0x522a('0x12')]);return _0x4955b4(_0x5d793a['error'][_0x522a('0x12')]);}else{logger[_0x522a('0xb')](_0x522a('0xc'),_0x1a2c7a,_0x522a('0xd'));_0x4955b4(_0x5d793a['result'][_0x522a('0x12')]);}})[_0x522a('0x13')](function(_0x4d0b3c){logger[_0x522a('0x10')](_0x522a('0xc'),_0x1a2c7a,_0x4d0b3c);_0x35c03f(_0x4d0b3c);});});}exports[_0x522a('0x14')]=function(_0x289fa8){var _0x4989d3=this;return new Promise(function(_0xe8a021,_0x3e1228){return db['FaxQueueReport'][_0x522a('0x15')](_0x289fa8['body'],{'raw':_0x289fa8[_0x522a('0x16')]?_0x289fa8[_0x522a('0x16')]['raw']===undefined?!![]:![]:!![]})[_0x522a('0xa')](function(_0x2d0ea7){logger[_0x522a('0xb')](_0x522a('0x14'),_0x289fa8);logger[_0x522a('0xe')](_0x522a('0x14'),_0x289fa8,JSON[_0x522a('0xf')](_0x2d0ea7));_0xe8a021(_0x2d0ea7);})[_0x522a('0x13')](function(_0x208adb){logger[_0x522a('0x10')](_0x522a('0x14'),_0x208adb[_0x522a('0x12')],_0x289fa8);_0x3e1228(_0x4989d3['error'](0x1f4,_0x208adb['message']));});});};exports['UpdateFaxQueueReport']=function(_0x98ad6e){var _0x39383d=this;return new Promise(function(_0x4b5179,_0x27039c){return db[_0x522a('0x17')][_0x522a('0x18')](_0x98ad6e[_0x522a('0x19')],{'raw':_0x98ad6e['options']?_0x98ad6e[_0x522a('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x98ad6e[_0x522a('0x16')]?_0x98ad6e[_0x522a('0x16')]['where']||null:null,'attributes':_0x98ad6e[_0x522a('0x16')]?_0x98ad6e[_0x522a('0x16')]['attributes']||null:null,'limit':_0x98ad6e['options']?_0x98ad6e[_0x522a('0x16')][_0x522a('0x1a')]||null:null})[_0x522a('0xa')](function(_0x309fff){logger[_0x522a('0xb')](_0x522a('0x1b'),_0x98ad6e);logger[_0x522a('0xe')](_0x522a('0x1b'),_0x98ad6e,JSON[_0x522a('0xf')](_0x309fff));_0x4b5179(_0x309fff);})[_0x522a('0x13')](function(_0x4080e4){logger[_0x522a('0x10')]('UpdateFaxQueueReport',_0x4080e4['message'],_0x98ad6e);_0x27039c(_0x39383d[_0x522a('0x10')](0x1f4,_0x4080e4['message']));});});};
\ No newline at end of file
diff --git a/server/api/faxQueueReport/index.js b/server/api/faxQueueReport/index.js
index 2e176ba..5c96e8c 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 _0x08f0=['update','delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../config/environment','./faxQueueReport.controller','isAuthenticated','index','/describe','describe','get','/:id','show','post','create','put'];(function(_0x47c7c8,_0x4cd73a){var _0x10a5b7=function(_0xf0deed){while(--_0xf0deed){_0x47c7c8['push'](_0x47c7c8['shift']());}};_0x10a5b7(++_0x4cd73a);}(_0x08f0,0xf6));var _0x008f=function(_0x53f884,_0x150a24){_0x53f884=_0x53f884-0x0;var _0x4160e6=_0x08f0[_0x53f884];return _0x4160e6;};'use strict';var multer=require(_0x008f('0x0'));var util=require(_0x008f('0x1'));var path=require(_0x008f('0x2'));var timeout=require('connect-timeout');var express=require(_0x008f('0x3'));var router=express[_0x008f('0x4')]();var auth=require(_0x008f('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x008f('0x6'));var controller=require(_0x008f('0x7'));router['get']('/',auth[_0x008f('0x8')](),controller[_0x008f('0x9')]);router['get'](_0x008f('0xa'),auth[_0x008f('0x8')](),controller[_0x008f('0xb')]);router[_0x008f('0xc')](_0x008f('0xd'),auth[_0x008f('0x8')](),controller[_0x008f('0xe')]);router[_0x008f('0xf')]('/',auth['isAuthenticated'](),controller[_0x008f('0x10')]);router[_0x008f('0x11')](_0x008f('0xd'),auth[_0x008f('0x8')](),controller[_0x008f('0x12')]);router[_0x008f('0x13')](_0x008f('0xd'),auth[_0x008f('0x8')](),controller[_0x008f('0x14')]);module[_0x008f('0x15')]=router;
\ No newline at end of file
+var _0x7f07=['/describe','describe','/:id','post','create','put','delete','destroy','exports','multer','util','express','Router','../../components/auth/service','../../config/environment','./faxQueueReport.controller','get','isAuthenticated'];(function(_0xf7e28,_0x45a637){var _0x2497c8=function(_0x5aa52e){while(--_0x5aa52e){_0xf7e28['push'](_0xf7e28['shift']());}};_0x2497c8(++_0x45a637);}(_0x7f07,0x99));var _0x77f0=function(_0x5ec453,_0x30b0ba){_0x5ec453=_0x5ec453-0x0;var _0x25548f=_0x7f07[_0x5ec453];return _0x25548f;};'use strict';var multer=require(_0x77f0('0x0'));var util=require(_0x77f0('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x77f0('0x2'));var router=express[_0x77f0('0x3')]();var auth=require(_0x77f0('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x77f0('0x5'));var controller=require(_0x77f0('0x6'));router[_0x77f0('0x7')]('/',auth[_0x77f0('0x8')](),controller['index']);router['get'](_0x77f0('0x9'),auth[_0x77f0('0x8')](),controller[_0x77f0('0xa')]);router[_0x77f0('0x7')](_0x77f0('0xb'),auth[_0x77f0('0x8')](),controller['show']);router[_0x77f0('0xc')]('/',auth[_0x77f0('0x8')](),controller[_0x77f0('0xd')]);router[_0x77f0('0xe')]('/:id',auth[_0x77f0('0x8')](),controller['update']);router[_0x77f0('0xf')](_0x77f0('0xb'),auth['isAuthenticated'](),controller[_0x77f0('0x10')]);module[_0x77f0('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.attributes.js b/server/api/faxTransferReport/faxTransferReport.attributes.js
index f524674..94a609c 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 _0x453f=['NOW','moment','sequelize','exports','STRING','ENUM','queue','DATE'];(function(_0x222216,_0x49abe5){var _0x16f4a8=function(_0x33b112){while(--_0x33b112){_0x222216['push'](_0x222216['shift']());}};_0x16f4a8(++_0x49abe5);}(_0x453f,0x181));var _0xf453=function(_0x3466ed,_0x55eac2){_0x3466ed=_0x3466ed-0x0;var _0x4a240c=_0x453f[_0x3466ed];return _0x4a240c;};'use strict';var moment=require(_0xf453('0x0'));var Sequelize=require(_0xf453('0x1'));module[_0xf453('0x2')]={'uniqueid':{'type':Sequelize[_0xf453('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xf453('0x4')]('account','agent',_0xf453('0x5')),'allowNull':![],'defaultValue':_0xf453('0x5')},'transferredAt':{'type':Sequelize[_0xf453('0x6')],'allowNull':![],'defaultValue':Sequelize[_0xf453('0x7')]}};
\ No newline at end of file
+var _0xbabf=['agent','queue','NOW','moment','exports','STRING','ENUM','account'];(function(_0x1beeba,_0x5a9bd7){var _0x66112c=function(_0x3f41e9){while(--_0x3f41e9){_0x1beeba['push'](_0x1beeba['shift']());}};_0x66112c(++_0x5a9bd7);}(_0xbabf,0x14b));var _0xfbab=function(_0x55abd9,_0x1148af){_0x55abd9=_0x55abd9-0x0;var _0x3e5669=_0xbabf[_0x55abd9];return _0x3e5669;};'use strict';var moment=require(_0xfbab('0x0'));var Sequelize=require('sequelize');module[_0xfbab('0x1')]={'uniqueid':{'type':Sequelize[_0xfbab('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xfbab('0x3')](_0xfbab('0x4'),_0xfbab('0x5'),'queue'),'allowNull':![],'defaultValue':_0xfbab('0x6')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0xfbab('0x7')]}};
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.controller.js b/server/api/faxTransferReport/faxTransferReport.controller.js
index 8ed5b7b..d5d723b 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 _0x52ea=['index','map','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','nolimit','limit','order','where','filters','pick','filter','merge','options','FaxTransferReport','includeAll','include','findAll','catch','show','params','find','create','body','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','name','send'];(function(_0x1117a1,_0x11ab18){var _0x35d12d=function(_0x2148d6){while(--_0x2148d6){_0x1117a1['push'](_0x1117a1['shift']());}};_0x35d12d(++_0x11ab18);}(_0x52ea,0x189));var _0xa52e=function(_0x373e27,_0x527f8d){_0x373e27=_0x373e27-0x0;var _0x4a336f=_0x52ea[_0x373e27];return _0x4a336f;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xa52e('0x0'));var rimraf=require(_0xa52e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa52e('0x2'));var rp=require(_0xa52e('0x3'));var moment=require(_0xa52e('0x4'));var BPromise=require(_0xa52e('0x5'));var Mustache=require(_0xa52e('0x6'));var util=require(_0xa52e('0x7'));var path=require(_0xa52e('0x8'));var sox=require('sox');var csv=require(_0xa52e('0x9'));var ejs=require(_0xa52e('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xa52e('0xb'));var crypto=require(_0xa52e('0xc'));var jsforce=require(_0xa52e('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xa52e('0x9'));var querystring=require(_0xa52e('0xe'));var Papa=require(_0xa52e('0xf'));var Redis=require(_0xa52e('0x10'));var authService=require(_0xa52e('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xa52e('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa52e('0x13'))('api');var utils=require(_0xa52e('0x14'));var config=require(_0xa52e('0x15'));var db=require(_0xa52e('0x16'))['db'];function respondWithStatusCode(_0x58a26e,_0x371b54){_0x371b54=_0x371b54||0xcc;return function(_0x521f04){if(_0x521f04){return _0x58a26e[_0xa52e('0x17')](_0x371b54);}return _0x58a26e[_0xa52e('0x18')](_0x371b54)[_0xa52e('0x19')]();};}function respondWithResult(_0x30815f,_0x4b4127){_0x4b4127=_0x4b4127||0xc8;return function(_0x523bf3){if(_0x523bf3){return _0x30815f['status'](_0x4b4127)[_0xa52e('0x1a')](_0x523bf3);}};}function respondWithFilteredResult(_0x2c945b,_0x1c5e63){return function(_0x6a9e22){if(_0x6a9e22){var _0x261999=_0x6a9e22[_0xa52e('0x1b')],_0x98c901=_0x1c5e63['offset'],_0x106643=_0x1c5e63[_0xa52e('0x1c')]+_0x1c5e63['limit'],_0x18949d;if(_0x106643>=_0x261999){_0x106643=_0x261999;_0x18949d=0xc8;}else{_0x18949d=0xce;}_0x2c945b['status'](_0x18949d);return _0x2c945b[_0xa52e('0x1d')](_0xa52e('0x1e'),_0x98c901+'-'+_0x106643+'/'+_0x261999)[_0xa52e('0x1a')](_0x6a9e22);}return null;};}function patchUpdates(_0x184df5){return function(_0x2645e7){try{jsonpatch[_0xa52e('0x1f')](_0x2645e7,_0x184df5,!![]);}catch(_0x13e0d3){return BPromise[_0xa52e('0x20')](_0x13e0d3);}return _0x2645e7[_0xa52e('0x21')]();};}function saveUpdates(_0x38d949,_0x4572eb){return function(_0x2143d3){if(_0x2143d3){return _0x2143d3[_0xa52e('0x22')](_0x38d949)[_0xa52e('0x23')](function(_0x4b0a03){return _0x4b0a03;});}return null;};}function removeEntity(_0x571def,_0x1ac806){return function(_0x2ef307){if(_0x2ef307){return _0x2ef307[_0xa52e('0x24')]()[_0xa52e('0x23')](function(){_0x571def[_0xa52e('0x18')](0xcc)[_0xa52e('0x19')]();});}};}function handleEntityNotFound(_0x1b094c,_0x109cfd){return function(_0x51aaad){if(!_0x51aaad){_0x1b094c[_0xa52e('0x17')](0x194);}return _0x51aaad;};}function handleError(_0x5b6ee0,_0x2b9983){_0x2b9983=_0x2b9983||0x1f4;return function(_0xb4cb0d){logger['error'](_0xb4cb0d['stack']);if(_0xb4cb0d[_0xa52e('0x25')]){delete _0xb4cb0d['name'];}_0x5b6ee0[_0xa52e('0x18')](_0x2b9983)[_0xa52e('0x26')](_0xb4cb0d);};}exports[_0xa52e('0x27')]=function(_0x4677c7,_0x110f7f){var _0x42dbd8={},_0x2d8be8={},_0x2a3084={'count':0x0,'rows':[]};var _0x85c4d5=_[_0xa52e('0x28')](db['FaxTransferReport'][_0xa52e('0x29')],function(_0x4b60d7){return{'name':_0x4b60d7[_0xa52e('0x2a')],'type':_0x4b60d7[_0xa52e('0x2b')][_0xa52e('0x2c')]};});_0x2d8be8[_0xa52e('0x2d')]=_[_0xa52e('0x28')](_0x85c4d5,'name');_0x2d8be8['query']=_[_0xa52e('0x2e')](_0x4677c7[_0xa52e('0x2f')]);_0x2d8be8['filters']=_[_0xa52e('0x30')](_0x2d8be8[_0xa52e('0x2d')],_0x2d8be8['query']);_0x42dbd8[_0xa52e('0x31')]=_['intersection'](_0x2d8be8['model'],qs[_0xa52e('0x32')](_0x4677c7[_0xa52e('0x2f')]['fields']));_0x42dbd8['attributes']=_0x42dbd8[_0xa52e('0x31')][_0xa52e('0x33')]?_0x42dbd8['attributes']:_0x2d8be8[_0xa52e('0x2d')];if(!_0x4677c7[_0xa52e('0x2f')]['hasOwnProperty'](_0xa52e('0x34'))){_0x42dbd8[_0xa52e('0x35')]=qs['limit'](_0x4677c7['query'][_0xa52e('0x35')]);_0x42dbd8['offset']=qs[_0xa52e('0x1c')](_0x4677c7[_0xa52e('0x2f')][_0xa52e('0x1c')]);}_0x42dbd8[_0xa52e('0x36')]=qs['sort'](_0x4677c7['query']['sort']);_0x42dbd8[_0xa52e('0x37')]=qs[_0xa52e('0x38')](_[_0xa52e('0x39')](_0x4677c7['query'],_0x2d8be8['filters']));if(_0x4677c7[_0xa52e('0x2f')][_0xa52e('0x3a')]){_0x42dbd8[_0xa52e('0x37')]=_[_0xa52e('0x3b')](_0x42dbd8['where'],{'$or':_[_0xa52e('0x28')](_0x85c4d5,function(_0x251df5){if(_0x251df5[_0xa52e('0x2b')]!=='VIRTUAL'){var _0xa59e38={};_0xa59e38[_0x251df5[_0xa52e('0x25')]]={'$like':'%'+_0x4677c7[_0xa52e('0x2f')]['filter']+'%'};return _0xa59e38;}})});}_0x42dbd8=_[_0xa52e('0x3b')]({},_0x42dbd8,_0x4677c7[_0xa52e('0x3c')]);var _0x3ffe65={'where':_0x42dbd8[_0xa52e('0x37')]};return db[_0xa52e('0x3d')][_0xa52e('0x1b')](_0x3ffe65)[_0xa52e('0x23')](function(_0x20cd39){_0x2a3084[_0xa52e('0x1b')]=_0x20cd39;if(_0x4677c7[_0xa52e('0x2f')][_0xa52e('0x3e')]){_0x42dbd8[_0xa52e('0x3f')]=[{'all':!![]}];}return db[_0xa52e('0x3d')][_0xa52e('0x40')](_0x42dbd8);})['then'](function(_0x30a97a){_0x2a3084['rows']=_0x30a97a;return _0x2a3084;})['then'](respondWithFilteredResult(_0x110f7f,_0x42dbd8))[_0xa52e('0x41')](handleError(_0x110f7f,null));};exports[_0xa52e('0x42')]=function(_0x353611,_0x3525c9){var _0x138423={'raw':!![],'where':{'id':_0x353611[_0xa52e('0x43')]['id']}},_0x3671df={};_0x3671df['model']=_[_0xa52e('0x2e')](db[_0xa52e('0x3d')][_0xa52e('0x29')]);_0x3671df[_0xa52e('0x2f')]=_[_0xa52e('0x2e')](_0x353611['query']);_0x3671df[_0xa52e('0x38')]=_[_0xa52e('0x30')](_0x3671df[_0xa52e('0x2d')],_0x3671df['query']);_0x138423[_0xa52e('0x31')]=_[_0xa52e('0x30')](_0x3671df['model'],qs[_0xa52e('0x32')](_0x353611[_0xa52e('0x2f')][_0xa52e('0x32')]));_0x138423[_0xa52e('0x31')]=_0x138423[_0xa52e('0x31')][_0xa52e('0x33')]?_0x138423[_0xa52e('0x31')]:_0x3671df[_0xa52e('0x2d')];if(_0x353611[_0xa52e('0x2f')][_0xa52e('0x3e')]){_0x138423[_0xa52e('0x3f')]=[{'all':!![]}];}_0x138423=_[_0xa52e('0x3b')]({},_0x138423,_0x353611[_0xa52e('0x3c')]);return db[_0xa52e('0x3d')][_0xa52e('0x44')](_0x138423)[_0xa52e('0x23')](handleEntityNotFound(_0x3525c9,null))[_0xa52e('0x23')](respondWithResult(_0x3525c9,null))['catch'](handleError(_0x3525c9,null));};exports[_0xa52e('0x45')]=function(_0x52234f,_0x19c1fd){return db['FaxTransferReport'][_0xa52e('0x45')](_0x52234f[_0xa52e('0x46')],{})['then'](respondWithResult(_0x19c1fd,0xc9))[_0xa52e('0x41')](handleError(_0x19c1fd,null));};exports[_0xa52e('0x22')]=function(_0x552936,_0x145599){if(_0x552936[_0xa52e('0x46')]['id']){delete _0x552936[_0xa52e('0x46')]['id'];}return db[_0xa52e('0x3d')][_0xa52e('0x44')]({'where':{'id':_0x552936['params']['id']}})[_0xa52e('0x23')](handleEntityNotFound(_0x145599,null))[_0xa52e('0x23')](saveUpdates(_0x552936[_0xa52e('0x46')],null))[_0xa52e('0x23')](respondWithResult(_0x145599,null))['catch'](handleError(_0x145599,null));};exports[_0xa52e('0x24')]=function(_0x4cad7a,_0x54eb23){return db[_0xa52e('0x3d')][_0xa52e('0x44')]({'where':{'id':_0x4cad7a[_0xa52e('0x43')]['id']}})[_0xa52e('0x23')](handleEntityNotFound(_0x54eb23,null))[_0xa52e('0x23')](removeEntity(_0x54eb23,null))['catch'](handleError(_0x54eb23,null));};exports[_0xa52e('0x47')]=function(_0x3dda81,_0x46c323){return db[_0xa52e('0x3d')][_0xa52e('0x47')]()[_0xa52e('0x23')](respondWithResult(_0x46c323,null))['catch'](handleError(_0x46c323,null));};
\ No newline at end of file
+var _0x03f5=['stack','name','index','FaxTransferReport','fieldName','key','map','keys','filters','intersection','model','fields','query','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','findAll','rows','catch','show','include','create','body','find','params','destroy','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','crypto','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','sendStatus','status','end','count','offset','set','Content-Range','json','apply','reject','save','then'];(function(_0x40ac5e,_0x2de228){var _0x2839d6=function(_0x123d47){while(--_0x123d47){_0x40ac5e['push'](_0x40ac5e['shift']());}};_0x2839d6(++_0x2de228);}(_0x03f5,0xb2));var _0x503f=function(_0x2daf49,_0x131e8a){_0x2daf49=_0x2daf49-0x0;var _0x67085d=_0x03f5[_0x2daf49];return _0x67085d;};'use strict';var pdf=require(_0x503f('0x0'));var emlformat=require(_0x503f('0x1'));var rimraf=require(_0x503f('0x2'));var zipdir=require(_0x503f('0x3'));var jsonpatch=require(_0x503f('0x4'));var rp=require('request-promise');var moment=require(_0x503f('0x5'));var BPromise=require(_0x503f('0x6'));var Mustache=require(_0x503f('0x7'));var util=require(_0x503f('0x8'));var path=require('path');var sox=require(_0x503f('0x9'));var csv=require(_0x503f('0xa'));var ejs=require(_0x503f('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x503f('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x503f('0xa'));var querystring=require(_0x503f('0xd'));var Papa=require(_0x503f('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x503f('0xf'));var as=require(_0x503f('0x10'));var hardwareService=require(_0x503f('0x11'));var logger=require('../../config/logger')(_0x503f('0x12'));var utils=require('../../config/utils');var config=require(_0x503f('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3af385,_0xa840b9){_0xa840b9=_0xa840b9||0xcc;return function(_0x12b1f2){if(_0x12b1f2){return _0x3af385[_0x503f('0x14')](_0xa840b9);}return _0x3af385[_0x503f('0x15')](_0xa840b9)[_0x503f('0x16')]();};}function respondWithResult(_0x128c5d,_0xbee938){_0xbee938=_0xbee938||0xc8;return function(_0x419b94){if(_0x419b94){return _0x128c5d[_0x503f('0x15')](_0xbee938)['json'](_0x419b94);}};}function respondWithFilteredResult(_0x49dd06,_0x5dfe40){return function(_0x3ce597){if(_0x3ce597){var _0x5d2404=_0x3ce597[_0x503f('0x17')],_0x46588d=_0x5dfe40[_0x503f('0x18')],_0x4bbca6=_0x5dfe40[_0x503f('0x18')]+_0x5dfe40['limit'],_0xab87ad;if(_0x4bbca6>=_0x5d2404){_0x4bbca6=_0x5d2404;_0xab87ad=0xc8;}else{_0xab87ad=0xce;}_0x49dd06['status'](_0xab87ad);return _0x49dd06[_0x503f('0x19')](_0x503f('0x1a'),_0x46588d+'-'+_0x4bbca6+'/'+_0x5d2404)[_0x503f('0x1b')](_0x3ce597);}return null;};}function patchUpdates(_0x8d82a7){return function(_0x2cdc7c){try{jsonpatch[_0x503f('0x1c')](_0x2cdc7c,_0x8d82a7,!![]);}catch(_0x524eb6){return BPromise[_0x503f('0x1d')](_0x524eb6);}return _0x2cdc7c[_0x503f('0x1e')]();};}function saveUpdates(_0x243b30,_0x382f84){return function(_0x49d416){if(_0x49d416){return _0x49d416['update'](_0x243b30)['then'](function(_0x52b966){return _0x52b966;});}return null;};}function removeEntity(_0x16d905,_0x1deb5b){return function(_0x36d1df){if(_0x36d1df){return _0x36d1df['destroy']()[_0x503f('0x1f')](function(){_0x16d905[_0x503f('0x15')](0xcc)[_0x503f('0x16')]();});}};}function handleEntityNotFound(_0x36c2b5,_0x24a226){return function(_0x4b0481){if(!_0x4b0481){_0x36c2b5[_0x503f('0x14')](0x194);}return _0x4b0481;};}function handleError(_0x3a61f5,_0x43343d){_0x43343d=_0x43343d||0x1f4;return function(_0x1109f6){logger['error'](_0x1109f6[_0x503f('0x20')]);if(_0x1109f6[_0x503f('0x21')]){delete _0x1109f6[_0x503f('0x21')];}_0x3a61f5[_0x503f('0x15')](_0x43343d)['send'](_0x1109f6);};}exports[_0x503f('0x22')]=function(_0x4e5558,_0x3689af){var _0x2e059f={},_0x8e4f8f={},_0x58e326={'count':0x0,'rows':[]};var _0x55d1fa=_['map'](db[_0x503f('0x23')]['rawAttributes'],function(_0x39b90f){return{'name':_0x39b90f[_0x503f('0x24')],'type':_0x39b90f['type'][_0x503f('0x25')]};});_0x8e4f8f['model']=_[_0x503f('0x26')](_0x55d1fa,'name');_0x8e4f8f['query']=_[_0x503f('0x27')](_0x4e5558['query']);_0x8e4f8f[_0x503f('0x28')]=_[_0x503f('0x29')](_0x8e4f8f[_0x503f('0x2a')],_0x8e4f8f['query']);_0x2e059f['attributes']=_[_0x503f('0x29')](_0x8e4f8f[_0x503f('0x2a')],qs[_0x503f('0x2b')](_0x4e5558[_0x503f('0x2c')]['fields']));_0x2e059f[_0x503f('0x2d')]=_0x2e059f[_0x503f('0x2d')][_0x503f('0x2e')]?_0x2e059f[_0x503f('0x2d')]:_0x8e4f8f[_0x503f('0x2a')];if(!_0x4e5558[_0x503f('0x2c')][_0x503f('0x2f')](_0x503f('0x30'))){_0x2e059f[_0x503f('0x31')]=qs[_0x503f('0x31')](_0x4e5558['query'][_0x503f('0x31')]);_0x2e059f[_0x503f('0x18')]=qs[_0x503f('0x18')](_0x4e5558['query'][_0x503f('0x18')]);}_0x2e059f[_0x503f('0x32')]=qs[_0x503f('0x33')](_0x4e5558[_0x503f('0x2c')][_0x503f('0x33')]);_0x2e059f[_0x503f('0x34')]=qs[_0x503f('0x28')](_['pick'](_0x4e5558[_0x503f('0x2c')],_0x8e4f8f[_0x503f('0x28')]));if(_0x4e5558[_0x503f('0x2c')][_0x503f('0x35')]){_0x2e059f[_0x503f('0x34')]=_[_0x503f('0x36')](_0x2e059f[_0x503f('0x34')],{'$or':_[_0x503f('0x26')](_0x55d1fa,function(_0x4fe27b){if(_0x4fe27b[_0x503f('0x37')]!==_0x503f('0x38')){var _0x36f823={};_0x36f823[_0x4fe27b['name']]={'$like':'%'+_0x4e5558['query'][_0x503f('0x35')]+'%'};return _0x36f823;}})});}_0x2e059f=_[_0x503f('0x36')]({},_0x2e059f,_0x4e5558[_0x503f('0x39')]);var _0x25903f={'where':_0x2e059f[_0x503f('0x34')]};return db['FaxTransferReport'][_0x503f('0x17')](_0x25903f)[_0x503f('0x1f')](function(_0x4addaf){_0x58e326[_0x503f('0x17')]=_0x4addaf;if(_0x4e5558['query'][_0x503f('0x3a')]){_0x2e059f['include']=[{'all':!![]}];}return db[_0x503f('0x23')][_0x503f('0x3b')](_0x2e059f);})[_0x503f('0x1f')](function(_0x4a53a2){_0x58e326[_0x503f('0x3c')]=_0x4a53a2;return _0x58e326;})[_0x503f('0x1f')](respondWithFilteredResult(_0x3689af,_0x2e059f))[_0x503f('0x3d')](handleError(_0x3689af,null));};exports[_0x503f('0x3e')]=function(_0xfdb8be,_0x409ead){var _0x2be501={'raw':!![],'where':{'id':_0xfdb8be['params']['id']}},_0x3ac74e={};_0x3ac74e[_0x503f('0x2a')]=_[_0x503f('0x27')](db[_0x503f('0x23')]['rawAttributes']);_0x3ac74e['query']=_[_0x503f('0x27')](_0xfdb8be[_0x503f('0x2c')]);_0x3ac74e['filters']=_[_0x503f('0x29')](_0x3ac74e[_0x503f('0x2a')],_0x3ac74e[_0x503f('0x2c')]);_0x2be501[_0x503f('0x2d')]=_[_0x503f('0x29')](_0x3ac74e['model'],qs[_0x503f('0x2b')](_0xfdb8be[_0x503f('0x2c')]['fields']));_0x2be501[_0x503f('0x2d')]=_0x2be501['attributes'][_0x503f('0x2e')]?_0x2be501[_0x503f('0x2d')]:_0x3ac74e['model'];if(_0xfdb8be[_0x503f('0x2c')][_0x503f('0x3a')]){_0x2be501[_0x503f('0x3f')]=[{'all':!![]}];}_0x2be501=_[_0x503f('0x36')]({},_0x2be501,_0xfdb8be[_0x503f('0x39')]);return db[_0x503f('0x23')]['find'](_0x2be501)[_0x503f('0x1f')](handleEntityNotFound(_0x409ead,null))[_0x503f('0x1f')](respondWithResult(_0x409ead,null))[_0x503f('0x3d')](handleError(_0x409ead,null));};exports[_0x503f('0x40')]=function(_0x63b29a,_0x3421bf){return db['FaxTransferReport'][_0x503f('0x40')](_0x63b29a['body'],{})['then'](respondWithResult(_0x3421bf,0xc9))[_0x503f('0x3d')](handleError(_0x3421bf,null));};exports['update']=function(_0x5d899a,_0xe11e7f){if(_0x5d899a[_0x503f('0x41')]['id']){delete _0x5d899a['body']['id'];}return db['FaxTransferReport'][_0x503f('0x42')]({'where':{'id':_0x5d899a[_0x503f('0x43')]['id']}})[_0x503f('0x1f')](handleEntityNotFound(_0xe11e7f,null))[_0x503f('0x1f')](saveUpdates(_0x5d899a[_0x503f('0x41')],null))[_0x503f('0x1f')](respondWithResult(_0xe11e7f,null))[_0x503f('0x3d')](handleError(_0xe11e7f,null));};exports[_0x503f('0x44')]=function(_0x29a778,_0x180bbc){return db[_0x503f('0x23')][_0x503f('0x42')]({'where':{'id':_0x29a778[_0x503f('0x43')]['id']}})['then'](handleEntityNotFound(_0x180bbc,null))['then'](removeEntity(_0x180bbc,null))[_0x503f('0x3d')](handleError(_0x180bbc,null));};exports[_0x503f('0x45')]=function(_0x69b996,_0x516f12){return db[_0x503f('0x23')][_0x503f('0x45')]()['then'](respondWithResult(_0x516f12,null))[_0x503f('0x3d')](handleError(_0x516f12,null));};
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.model.js b/server/api/faxTransferReport/faxTransferReport.model.js
index fc549c9..5b05d45 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 _0x6d16=['bluebird','request-promise','path','../../config/environment','FaxTransferReport','report_fax_transfer','util','../../config/logger','moment'];(function(_0x17a63e,_0x58df71){var _0x3b3381=function(_0x3d57c6){while(--_0x3d57c6){_0x17a63e['push'](_0x17a63e['shift']());}};_0x3b3381(++_0x58df71);}(_0x6d16,0x14a));var _0x66d1=function(_0x47405c,_0x320d89){_0x47405c=_0x47405c-0x0;var _0x25b199=_0x6d16[_0x47405c];return _0x25b199;};'use strict';var _=require('lodash');var util=require(_0x66d1('0x0'));var logger=require(_0x66d1('0x1'))('api');var moment=require(_0x66d1('0x2'));var BPromise=require(_0x66d1('0x3'));var rp=require(_0x66d1('0x4'));var fs=require('fs');var path=require(_0x66d1('0x5'));var rimraf=require('rimraf');var config=require(_0x66d1('0x6'));var attributes=require('./faxTransferReport.attributes');module['exports']=function(_0x5594d,_0x49a39f){return _0x5594d['define'](_0x66d1('0x7'),attributes,{'tableName':_0x66d1('0x8'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xb2df=['path','../../config/environment','./faxTransferReport.attributes','exports','FaxTransferReport','report_fax_transfer','uniqueid','util','api','moment','bluebird'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0xb2df,0x8b));var _0xfb2d=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0xb2df[_0xc4001c];return _0x49f7bc;};'use strict';var _=require('lodash');var util=require(_0xfb2d('0x0'));var logger=require('../../config/logger')(_0xfb2d('0x1'));var moment=require(_0xfb2d('0x2'));var BPromise=require(_0xfb2d('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xfb2d('0x4'));var rimraf=require('rimraf');var config=require(_0xfb2d('0x5'));var attributes=require(_0xfb2d('0x6'));module[_0xfb2d('0x7')]=function(_0x22b1f8,_0x2d1dc5){return _0x22b1f8['define'](_0xfb2d('0x8'),attributes,{'tableName':_0xfb2d('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xfb2d('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/faxTransferReport/faxTransferReport.rpc.js b/server/api/faxTransferReport/faxTransferReport.rpc.js
index e051acc..61ac224 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 _0xafdb=['rpc','../../config/environment','client','http','request','then','FaxTransferReport,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x436d87,_0x4485fb){var _0x4a9c0b=function(_0x1f5ca3){while(--_0x1f5ca3){_0x436d87['push'](_0x436d87['shift']());}};_0x4a9c0b(++_0x4485fb);}(_0xafdb,0x10b));var _0xbafd=function(_0x2053ea,_0x1ab2d4){_0x2053ea=_0x2053ea-0x0;var _0x2232c4=_0xafdb[_0x2053ea];return _0x2232c4;};'use strict';var _=require(_0xbafd('0x0'));var util=require(_0xbafd('0x1'));var moment=require(_0xbafd('0x2'));var BPromise=require(_0xbafd('0x3'));var rs=require(_0xbafd('0x4'));var fs=require('fs');var Redis=require(_0xbafd('0x5'));var db=require(_0xbafd('0x6'))['db'];var utils=require(_0xbafd('0x7'));var logger=require(_0xbafd('0x8'))(_0xbafd('0x9'));var config=require(_0xbafd('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xbafd('0xb')][_0xbafd('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2ef448,_0x28bf9a,_0x46af95){return new BPromise(function(_0x12b9ba,_0x5c088f){return client[_0xbafd('0xd')](_0x2ef448,_0x46af95)[_0xbafd('0xe')](function(_0x5528c0){logger['info'](_0xbafd('0xf'),_0x28bf9a,'request\x20sent');logger[_0xbafd('0x10')]('FaxTransferReport,\x20%s,\x20%s,\x20%s',_0x28bf9a,_0xbafd('0x11'),JSON[_0xbafd('0x12')](_0x5528c0));if(_0x5528c0['error']){if(_0x5528c0[_0xbafd('0x13')][_0xbafd('0x14')]===0x1f4){logger['error']('FaxTransferReport,\x20%s,\x20%s',_0x28bf9a,_0x5528c0[_0xbafd('0x13')][_0xbafd('0x15')]);return _0x5c088f(_0x5528c0[_0xbafd('0x13')][_0xbafd('0x15')]);}logger['error'](_0xbafd('0xf'),_0x28bf9a,_0x5528c0[_0xbafd('0x13')][_0xbafd('0x15')]);return _0x12b9ba(_0x5528c0[_0xbafd('0x13')][_0xbafd('0x15')]);}else{logger[_0xbafd('0x16')](_0xbafd('0xf'),_0x28bf9a,_0xbafd('0x11'));_0x12b9ba(_0x5528c0['result']['message']);}})['catch'](function(_0x49a857){logger[_0xbafd('0x13')](_0xbafd('0xf'),_0x28bf9a,_0x49a857);_0x5c088f(_0x49a857);});});}
\ No newline at end of file
+var _0x02df=['request','then','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','moment','randomstring','../../config/logger','../../config/environment','jayson/promise','http'];(function(_0xf715bc,_0x1df25e){var _0x2fb8ce=function(_0x29d43d){while(--_0x29d43d){_0xf715bc['push'](_0xf715bc['shift']());}};_0x2fb8ce(++_0x1df25e);}(_0x02df,0x13c));var _0xf02d=function(_0x31742b,_0x3efb44){_0x31742b=_0x31742b-0x0;var _0x4041d1=_0x02df[_0x31742b];return _0x4041d1;};'use strict';var _=require(_0xf02d('0x0'));var util=require('util');var moment=require(_0xf02d('0x1'));var BPromise=require('bluebird');var rs=require(_0xf02d('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf02d('0x3'))('rpc');var config=require(_0xf02d('0x4'));var jayson=require(_0xf02d('0x5'));var client=jayson['client'][_0xf02d('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x32db92,_0x804202,_0x4ce292){return new BPromise(function(_0x5e013e,_0x853a90){return client[_0xf02d('0x7')](_0x32db92,_0x4ce292)[_0xf02d('0x8')](function(_0xbc0ca){logger[_0xf02d('0x9')](_0xf02d('0xa'),_0x804202,_0xf02d('0xb'));logger[_0xf02d('0xc')](_0xf02d('0xd'),_0x804202,'request\x20sent',JSON[_0xf02d('0xe')](_0xbc0ca));if(_0xbc0ca[_0xf02d('0xf')]){if(_0xbc0ca[_0xf02d('0xf')][_0xf02d('0x10')]===0x1f4){logger[_0xf02d('0xf')]('FaxTransferReport,\x20%s,\x20%s',_0x804202,_0xbc0ca[_0xf02d('0xf')][_0xf02d('0x11')]);return _0x853a90(_0xbc0ca[_0xf02d('0xf')]['message']);}logger['error'](_0xf02d('0xa'),_0x804202,_0xbc0ca['error'][_0xf02d('0x11')]);return _0x5e013e(_0xbc0ca[_0xf02d('0xf')][_0xf02d('0x11')]);}else{logger[_0xf02d('0x9')]('FaxTransferReport,\x20%s,\x20%s',_0x804202,_0xf02d('0xb'));_0x5e013e(_0xbc0ca['result']['message']);}})[_0xf02d('0x12')](function(_0x33fece){logger['error']('FaxTransferReport,\x20%s,\x20%s',_0x804202,_0x33fece);_0x853a90(_0x33fece);});});}
\ No newline at end of file
diff --git a/server/api/faxTransferReport/index.js b/server/api/faxTransferReport/index.js
index 93256d1..b9508ba 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 _0xa633=['destroy','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxTransferReport.controller','get','isAuthenticated','index','/describe','/:id','post','create','put','update','delete'];(function(_0x1a9b7e,_0x3259fc){var _0x5b4914=function(_0x3b9735){while(--_0x3b9735){_0x1a9b7e['push'](_0x1a9b7e['shift']());}};_0x5b4914(++_0x3259fc);}(_0xa633,0xf8));var _0x3a63=function(_0xdf7e6b,_0x211ab1){_0xdf7e6b=_0xdf7e6b-0x0;var _0xd15514=_0xa633[_0xdf7e6b];return _0xd15514;};'use strict';var multer=require('multer');var util=require(_0x3a63('0x0'));var path=require('path');var timeout=require(_0x3a63('0x1'));var express=require(_0x3a63('0x2'));var router=express[_0x3a63('0x3')]();var auth=require(_0x3a63('0x4'));var interaction=require(_0x3a63('0x5'));var config=require(_0x3a63('0x6'));var controller=require(_0x3a63('0x7'));router[_0x3a63('0x8')]('/',auth[_0x3a63('0x9')](),controller[_0x3a63('0xa')]);router[_0x3a63('0x8')](_0x3a63('0xb'),auth[_0x3a63('0x9')](),controller['describe']);router[_0x3a63('0x8')](_0x3a63('0xc'),auth[_0x3a63('0x9')](),controller['show']);router[_0x3a63('0xd')]('/',auth[_0x3a63('0x9')](),controller[_0x3a63('0xe')]);router[_0x3a63('0xf')](_0x3a63('0xc'),auth[_0x3a63('0x9')](),controller[_0x3a63('0x10')]);router[_0x3a63('0x11')](_0x3a63('0xc'),auth[_0x3a63('0x9')](),controller[_0x3a63('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x09de=['put','destroy','exports','multer','express','Router','../../components/auth/service','../../config/environment','./faxTransferReport.controller','get','isAuthenticated','index','describe','/:id','show','post'];(function(_0x491468,_0x42f169){var _0x5b8c22=function(_0x407a9b){while(--_0x407a9b){_0x491468['push'](_0x491468['shift']());}};_0x5b8c22(++_0x42f169);}(_0x09de,0x123));var _0xe09d=function(_0x4d6ac0,_0x201628){_0x4d6ac0=_0x4d6ac0-0x0;var _0x5296c4=_0x09de[_0x4d6ac0];return _0x5296c4;};'use strict';var multer=require(_0xe09d('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xe09d('0x1'));var router=express[_0xe09d('0x2')]();var auth=require(_0xe09d('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xe09d('0x4'));var controller=require(_0xe09d('0x5'));router[_0xe09d('0x6')]('/',auth[_0xe09d('0x7')](),controller[_0xe09d('0x8')]);router[_0xe09d('0x6')]('/describe',auth[_0xe09d('0x7')](),controller[_0xe09d('0x9')]);router['get'](_0xe09d('0xa'),auth[_0xe09d('0x7')](),controller[_0xe09d('0xb')]);router[_0xe09d('0xc')]('/',auth[_0xe09d('0x7')](),controller['create']);router[_0xe09d('0xd')](_0xe09d('0xa'),auth[_0xe09d('0x7')](),controller['update']);router['delete'](_0xe09d('0xa'),auth['isAuthenticated'](),controller[_0xe09d('0xe')]);module[_0xe09d('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/intDeskAccount/index.js b/server/api/intDeskAccount/index.js
index 99f5875..74dbde5 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 _0x3fa4=['getConfigurations','getFields','post','isAuthenticated','create','addConfiguration','put','update','delete','multer','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskAccount.controller','get','index','/:id','show','/:id/configurations'];(function(_0x1ba4d1,_0x54fd0e){var _0x29a4a5=function(_0x15c9b8){while(--_0x15c9b8){_0x1ba4d1['push'](_0x1ba4d1['shift']());}};_0x29a4a5(++_0x54fd0e);}(_0x3fa4,0xf0));var _0x43fa=function(_0x2b3616,_0x18f2fd){_0x2b3616=_0x2b3616-0x0;var _0x196fa9=_0x3fa4[_0x2b3616];return _0x196fa9;};'use strict';var multer=require(_0x43fa('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x43fa('0x1'));var router=express[_0x43fa('0x2')]();var auth=require(_0x43fa('0x3'));var interaction=require(_0x43fa('0x4'));var config=require(_0x43fa('0x5'));var controller=require(_0x43fa('0x6'));router[_0x43fa('0x7')]('/',auth['isAuthenticated'](),controller[_0x43fa('0x8')]);router[_0x43fa('0x7')](_0x43fa('0x9'),auth['isAuthenticated'](),controller[_0x43fa('0xa')]);router[_0x43fa('0x7')](_0x43fa('0xb'),auth['isAuthenticated'](),controller[_0x43fa('0xc')]);router[_0x43fa('0x7')]('/:id/fields',auth['isAuthenticated'](),controller[_0x43fa('0xd')]);router[_0x43fa('0xe')]('/',auth[_0x43fa('0xf')](),controller[_0x43fa('0x10')]);router[_0x43fa('0xe')]('/:id/configurations',auth[_0x43fa('0xf')](),controller[_0x43fa('0x11')]);router[_0x43fa('0x12')]('/:id',auth[_0x43fa('0xf')](),controller[_0x43fa('0x13')]);router[_0x43fa('0x14')]('/:id',auth[_0x43fa('0xf')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xc03e=['post','create','addConfiguration','put','update','delete','multer','connect-timeout','Router','../../components/interaction/service','../../config/environment','./intDeskAccount.controller','get','isAuthenticated','index','/:id','/:id/configurations','getConfigurations','/:id/fields','getFields'];(function(_0x5595f1,_0x37e1fc){var _0xa8f714=function(_0x402126){while(--_0x402126){_0x5595f1['push'](_0x5595f1['shift']());}};_0xa8f714(++_0x37e1fc);}(_0xc03e,0x15a));var _0xec03=function(_0x493dda,_0x1528d3){_0x493dda=_0x493dda-0x0;var _0x31a5a6=_0xc03e[_0x493dda];return _0x31a5a6;};'use strict';var multer=require(_0xec03('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xec03('0x1'));var express=require('express');var router=express[_0xec03('0x2')]();var auth=require('../../components/auth/service');var interaction=require(_0xec03('0x3'));var config=require(_0xec03('0x4'));var controller=require(_0xec03('0x5'));router[_0xec03('0x6')]('/',auth[_0xec03('0x7')](),controller[_0xec03('0x8')]);router[_0xec03('0x6')](_0xec03('0x9'),auth[_0xec03('0x7')](),controller['show']);router[_0xec03('0x6')](_0xec03('0xa'),auth[_0xec03('0x7')](),controller[_0xec03('0xb')]);router['get'](_0xec03('0xc'),auth[_0xec03('0x7')](),controller[_0xec03('0xd')]);router[_0xec03('0xe')]('/',auth[_0xec03('0x7')](),controller[_0xec03('0xf')]);router[_0xec03('0xe')](_0xec03('0xa'),auth['isAuthenticated'](),controller[_0xec03('0x10')]);router[_0xec03('0x11')](_0xec03('0x9'),auth[_0xec03('0x7')](),controller[_0xec03('0x12')]);router[_0xec03('0x13')](_0xec03('0x9'),auth[_0xec03('0x7')](),controller['destroy']);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 fc0057b..b6facb0 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 _0xfe97=['STRING','ENUM','sequelize'];(function(_0x636b77,_0x3fc3ca){var _0x31c1be=function(_0x481738){while(--_0x481738){_0x636b77['push'](_0x636b77['shift']());}};_0x31c1be(++_0x3fc3ca);}(_0xfe97,0x194));var _0x7fe9=function(_0x33a474,_0x238afc){_0x33a474=_0x33a474-0x0;var _0x4e8a55=_0xfe97[_0x33a474];return _0x4e8a55;};'use strict';var Sequelize=require(_0x7fe9('0x0'));module['exports']={'name':{'type':Sequelize[_0x7fe9('0x1')]},'description':{'type':Sequelize[_0x7fe9('0x1')]},'username':{'type':Sequelize[_0x7fe9('0x1')]},'remoteUri':{'type':Sequelize[_0x7fe9('0x1')]},'authType':{'type':Sequelize[_0x7fe9('0x2')]('basic'),'defaultValue':'basic'},'password':{'type':Sequelize[_0x7fe9('0x1')]},'consumerKey':{'type':Sequelize['STRING']},'consumerSecret':{'type':Sequelize[_0x7fe9('0x1')]},'token':{'type':Sequelize[_0x7fe9('0x1')]},'tokenSecret':{'type':Sequelize[_0x7fe9('0x1')]},'serverUrl':{'type':Sequelize[_0x7fe9('0x1')]},'type':{'type':Sequelize[_0x7fe9('0x2')]('integrationTab','newTab'),'defaultValue':'integrationTab'}};
\ No newline at end of file
+var _0x5941=['integrationTab','newTab','sequelize','exports','STRING','ENUM','basic'];(function(_0x18ec86,_0xb357e2){var _0x26d709=function(_0x169a09){while(--_0x169a09){_0x18ec86['push'](_0x18ec86['shift']());}};_0x26d709(++_0xb357e2);}(_0x5941,0xd4));var _0x1594=function(_0x2a93e8,_0x43ac33){_0x2a93e8=_0x2a93e8-0x0;var _0xac8c4d=_0x5941[_0x2a93e8];return _0xac8c4d;};'use strict';var Sequelize=require(_0x1594('0x0'));module[_0x1594('0x1')]={'name':{'type':Sequelize[_0x1594('0x2')]},'description':{'type':Sequelize[_0x1594('0x2')]},'username':{'type':Sequelize[_0x1594('0x2')]},'remoteUri':{'type':Sequelize[_0x1594('0x2')]},'authType':{'type':Sequelize[_0x1594('0x3')](_0x1594('0x4')),'defaultValue':_0x1594('0x4')},'password':{'type':Sequelize['STRING']},'consumerKey':{'type':Sequelize['STRING']},'consumerSecret':{'type':Sequelize[_0x1594('0x2')]},'token':{'type':Sequelize[_0x1594('0x2')]},'tokenSecret':{'type':Sequelize[_0x1594('0x2')]},'serverUrl':{'type':Sequelize[_0x1594('0x2')]},'type':{'type':Sequelize[_0x1594('0x3')](_0x1594('0x5'),_0x1594('0x6')),'defaultValue':_0x1594('0x5')}};
\ No newline at end of file
diff --git a/server/api/intDeskAccount/intDeskAccount.controller.js b/server/api/intDeskAccount/intDeskAccount.controller.js
index 0bacaa1..41b7eb5 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 _0x506e=['querystring','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','../../components/integrations/configuration','client','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','request\x20sent','debug','error','code','message','DeskAccount,\x20%s,\x20%s','catch','sendStatus','status','end','count','offset','limit','set','json','apply','reject','save','update','destroy','stack','name','index','map','DeskAccount','rawAttributes','type','key','query','filters','intersection','attributes','fields','length','model','hasOwnProperty','nolimit','sort','filter','where','merge','VIRTUAL','include','findAll','includeAll','options','find','create','body','params','getConfigurations','findOne','keys','DeskConfiguration','order','addConfiguration','getSubjects','Descriptions','getDescriptions','channel','DeskField','Subjects','getFields','priority','remoteUri','authType','username','password','consumerKey','consumerSecret','token','tokenSecret','slice','lastIndexOf','GET','format','%s/custom_fields','application/json','headers','Authorization','Basic\x20%s','%s:%s','toString','base64','concat','_embedded','entries','label','statusCode','send','Wrong\x20credentials','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'];(function(_0x2c9b79,_0x7cf58b){var _0x265032=function(_0x188a92){while(--_0x188a92){_0x2c9b79['push'](_0x2c9b79['shift']());}};_0x265032(++_0x7cf58b);}(_0x506e,0x68));var _0xe506=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x506e[_0x122ef9];return _0x42fba0;};'use strict';var pdf=require(_0xe506('0x0'));var emlformat=require(_0xe506('0x1'));var rimraf=require(_0xe506('0x2'));var zipdir=require(_0xe506('0x3'));var jsonpatch=require(_0xe506('0x4'));var rp=require(_0xe506('0x5'));var moment=require(_0xe506('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xe506('0x7'));var util=require(_0xe506('0x8'));var path=require(_0xe506('0x9'));var sox=require(_0xe506('0xa'));var csv=require(_0xe506('0xb'));var ejs=require(_0xe506('0xc'));var fs=require('fs');var _=require(_0xe506('0xd'));var squel=require('squel');var crypto=require(_0xe506('0xe'));var jsforce=require(_0xe506('0xf'));var deskjs=require(_0xe506('0x10'));var toCsv=require(_0xe506('0xb'));var querystring=require(_0xe506('0x11'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xe506('0x12'));var as=require(_0xe506('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe506('0x14'))(_0xe506('0x15'));var utils=require(_0xe506('0x16'));var config=require('../../config/environment');var db=require(_0xe506('0x17'))['db'];var integrations=require(_0xe506('0x18'));var jayson=require('jayson/promise');var client=jayson[_0xe506('0x19')]['http']({'port':0x232a});function checkPasswordPattern(_0x3b11a2,_0x664058,_0xf2151d){if(_0xf2151d){var _0x5c96db=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5c96db[_0xe506('0x1a')](_0x664058)){return _0x3b11a2;}else{throw new db['Sequelize'][(_0xe506('0x1b'))](_0xe506('0x1c'));}}else{return _0x3b11a2;}}function respondWithRpcPromise(_0x1a51cb,_0x5ecd7c,_0x5a6431,_0x41032c){return new BPromise(function(_0x1ba90f,_0x49da5c){var _0xd396c=_0x41032c||client;return _0xd396c['request'](_0x1a51cb,_0x5a6431)[_0xe506('0x1d')](function(_0x3b9bd3){logger['info']('DeskAccount,\x20%s,\x20%s',_0x5ecd7c,_0xe506('0x1e'));logger[_0xe506('0x1f')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x5ecd7c,_0xe506('0x1e'),JSON['stringify'](_0x3b9bd3));if(_0x3b9bd3[_0xe506('0x20')]){if(_0x3b9bd3[_0xe506('0x20')][_0xe506('0x21')]===0x1f4){logger['error']('DeskAccount,\x20%s,\x20%s',_0x5ecd7c,_0x3b9bd3['error']['message']);return _0x49da5c(_0x3b9bd3[_0xe506('0x20')][_0xe506('0x22')]);}logger[_0xe506('0x20')](_0xe506('0x23'),_0x5ecd7c,_0x3b9bd3[_0xe506('0x20')]['message']);return _0x1ba90f(_0x3b9bd3[_0xe506('0x20')]['message']);}else{logger['info']('DeskAccount,\x20%s,\x20%s',_0x5ecd7c,'request\x20sent');_0x1ba90f(_0x3b9bd3['result']['message']);}})[_0xe506('0x24')](function(_0x3db10b){logger[_0xe506('0x20')]('DeskAccount,\x20%s,\x20%s',_0x5ecd7c,_0x3db10b);_0x49da5c(_0x3db10b);});});}function respondWithStatusCode(_0x184bd0,_0x4e3bac){_0x4e3bac=_0x4e3bac||0xcc;return function(_0x11d9be){if(_0x11d9be){return _0x184bd0[_0xe506('0x25')](_0x4e3bac);}return _0x184bd0[_0xe506('0x26')](_0x4e3bac)[_0xe506('0x27')]();};}function respondWithResult(_0x2302ae,_0x4e9d4c){_0x4e9d4c=_0x4e9d4c||0xc8;return function(_0x1ce8af){if(_0x1ce8af){return _0x2302ae[_0xe506('0x26')](_0x4e9d4c)['json'](_0x1ce8af);}};}function respondWithFilteredResult(_0x424562,_0x5acf2b){return function(_0x47b7f7){if(_0x47b7f7){var _0x21d2e9=_0x47b7f7[_0xe506('0x28')],_0x300b8c=_0x5acf2b[_0xe506('0x29')],_0xe0c689=_0x5acf2b[_0xe506('0x29')]+_0x5acf2b[_0xe506('0x2a')],_0x50c5ec;if(_0xe0c689>=_0x21d2e9){_0xe0c689=_0x21d2e9;_0x50c5ec=0xc8;}else{_0x50c5ec=0xce;}_0x424562['status'](_0x50c5ec);return _0x424562[_0xe506('0x2b')]('Content-Range',_0x300b8c+'-'+_0xe0c689+'/'+_0x21d2e9)[_0xe506('0x2c')](_0x47b7f7);}return null;};}function patchUpdates(_0x5c5277){return function(_0x231d1f){try{jsonpatch[_0xe506('0x2d')](_0x231d1f,_0x5c5277,!![]);}catch(_0x4030c4){return BPromise[_0xe506('0x2e')](_0x4030c4);}return _0x231d1f[_0xe506('0x2f')]();};}function saveUpdates(_0x3aa2bb,_0x2ec2e3){return function(_0x269a18){if(_0x269a18){return _0x269a18[_0xe506('0x30')](_0x3aa2bb)[_0xe506('0x1d')](function(_0x503644){return _0x503644;});}return null;};}function removeEntity(_0x1acd1e,_0x62ff2c){return function(_0x3bf870){if(_0x3bf870){return _0x3bf870[_0xe506('0x31')]()[_0xe506('0x1d')](function(){_0x1acd1e[_0xe506('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x214579,_0x97e55a){return function(_0x25aaa5){if(!_0x25aaa5){_0x214579[_0xe506('0x25')](0x194);}return _0x25aaa5;};}function handleError(_0x11cb7e,_0x22cf60){_0x22cf60=_0x22cf60||0x1f4;return function(_0x1c5657){logger[_0xe506('0x20')](_0x1c5657[_0xe506('0x32')]);if(_0x1c5657[_0xe506('0x33')]){delete _0x1c5657[_0xe506('0x33')];}_0x11cb7e['status'](_0x22cf60)['send'](_0x1c5657);};}exports[_0xe506('0x34')]=function(_0x52ef62,_0x14d0d0){var _0x165e3b={},_0x4ec8d0={},_0xbd0ddf={'count':0x0,'rows':[]};var _0x58e701=_[_0xe506('0x35')](db[_0xe506('0x36')][_0xe506('0x37')],function(_0x35e862){return{'name':_0x35e862['fieldName'],'type':_0x35e862[_0xe506('0x38')][_0xe506('0x39')]};});_0x4ec8d0['model']=_[_0xe506('0x35')](_0x58e701,_0xe506('0x33'));_0x4ec8d0[_0xe506('0x3a')]=_['keys'](_0x52ef62[_0xe506('0x3a')]);_0x4ec8d0[_0xe506('0x3b')]=_[_0xe506('0x3c')](_0x4ec8d0['model'],_0x4ec8d0[_0xe506('0x3a')]);_0x165e3b[_0xe506('0x3d')]=_[_0xe506('0x3c')](_0x4ec8d0['model'],qs[_0xe506('0x3e')](_0x52ef62[_0xe506('0x3a')][_0xe506('0x3e')]));_0x165e3b[_0xe506('0x3d')]=_0x165e3b[_0xe506('0x3d')][_0xe506('0x3f')]?_0x165e3b['attributes']:_0x4ec8d0[_0xe506('0x40')];if(!_0x52ef62[_0xe506('0x3a')][_0xe506('0x41')](_0xe506('0x42'))){_0x165e3b[_0xe506('0x2a')]=qs[_0xe506('0x2a')](_0x52ef62[_0xe506('0x3a')][_0xe506('0x2a')]);_0x165e3b[_0xe506('0x29')]=qs['offset'](_0x52ef62['query']['offset']);}_0x165e3b['order']=qs[_0xe506('0x43')](_0x52ef62[_0xe506('0x3a')][_0xe506('0x43')]);_0x165e3b['where']=qs[_0xe506('0x3b')](_['pick'](_0x52ef62['query'],_0x4ec8d0[_0xe506('0x3b')]));if(_0x52ef62[_0xe506('0x3a')][_0xe506('0x44')]){_0x165e3b[_0xe506('0x45')]=_[_0xe506('0x46')](_0x165e3b[_0xe506('0x45')],{'$or':_[_0xe506('0x35')](_0x58e701,function(_0x37bd08){if(_0x37bd08[_0xe506('0x38')]!==_0xe506('0x47')){var _0x37fa2b={};_0x37fa2b[_0x37bd08[_0xe506('0x33')]]={'$like':'%'+_0x52ef62['query'][_0xe506('0x44')]+'%'};return _0x37fa2b;}})});}_0x165e3b=_['merge']({},_0x165e3b,_0x52ef62['options']);var _0x103005={'where':_0x165e3b[_0xe506('0x45')]};return db[_0xe506('0x36')]['count'](_0x103005)[_0xe506('0x1d')](function(_0x5545cc){_0xbd0ddf[_0xe506('0x28')]=_0x5545cc;if(_0x52ef62[_0xe506('0x3a')]['includeAll']){_0x165e3b[_0xe506('0x48')]=[{'all':!![]}];}return db[_0xe506('0x36')][_0xe506('0x49')](_0x165e3b);})[_0xe506('0x1d')](function(_0xed4d39){_0xbd0ddf['rows']=_0xed4d39;return _0xbd0ddf;})[_0xe506('0x1d')](respondWithFilteredResult(_0x14d0d0,_0x165e3b))[_0xe506('0x24')](handleError(_0x14d0d0,null));};exports['show']=function(_0xb6446,_0x5ea1b7){var _0x44f5f4={'raw':![],'where':{'id':_0xb6446['params']['id']}},_0x9a82={};_0x9a82[_0xe506('0x40')]=_['keys'](db[_0xe506('0x36')]['rawAttributes']);_0x9a82[_0xe506('0x3a')]=_['keys'](_0xb6446[_0xe506('0x3a')]);_0x9a82['filters']=_[_0xe506('0x3c')](_0x9a82[_0xe506('0x40')],_0x9a82[_0xe506('0x3a')]);_0x44f5f4['attributes']=_[_0xe506('0x3c')](_0x9a82['model'],qs[_0xe506('0x3e')](_0xb6446[_0xe506('0x3a')][_0xe506('0x3e')]));_0x44f5f4[_0xe506('0x3d')]=_0x44f5f4['attributes'][_0xe506('0x3f')]?_0x44f5f4['attributes']:_0x9a82[_0xe506('0x40')];if(_0xb6446['query'][_0xe506('0x4a')]){_0x44f5f4['include']=[{'all':!![]}];}_0x44f5f4=_[_0xe506('0x46')]({},_0x44f5f4,_0xb6446[_0xe506('0x4b')]);return db['DeskAccount'][_0xe506('0x4c')](_0x44f5f4)['then'](handleEntityNotFound(_0x5ea1b7,null))[_0xe506('0x1d')](respondWithResult(_0x5ea1b7,null))['catch'](handleError(_0x5ea1b7,null));};exports[_0xe506('0x4d')]=function(_0x58c229,_0x135e96){return db[_0xe506('0x36')][_0xe506('0x4d')](_0x58c229[_0xe506('0x4e')],{})['then'](respondWithResult(_0x135e96,0xc9))[_0xe506('0x24')](handleError(_0x135e96,null));};exports[_0xe506('0x30')]=function(_0x26ef43,_0x3b3cfe){if(_0x26ef43[_0xe506('0x4e')]['id']){delete _0x26ef43[_0xe506('0x4e')]['id'];}return db[_0xe506('0x36')][_0xe506('0x4c')]({'where':{'id':_0x26ef43['params']['id']}})[_0xe506('0x1d')](handleEntityNotFound(_0x3b3cfe,null))[_0xe506('0x1d')](saveUpdates(_0x26ef43[_0xe506('0x4e')],null))['then'](respondWithResult(_0x3b3cfe,null))[_0xe506('0x24')](handleError(_0x3b3cfe,null));};exports['destroy']=function(_0x2f333c,_0x2cb053){return db[_0xe506('0x36')][_0xe506('0x4c')]({'where':{'id':_0x2f333c[_0xe506('0x4f')]['id']}})['then'](handleEntityNotFound(_0x2cb053,null))[_0xe506('0x1d')](removeEntity(_0x2cb053,null))[_0xe506('0x24')](handleError(_0x2cb053,null));};exports[_0xe506('0x50')]=function(_0x1c4c9e,_0x145613,_0x10afa4){var _0x1d16f8={};var _0x2d4dc3={};var _0x116e9a;var _0x94aa51;return db[_0xe506('0x36')][_0xe506('0x51')]({'where':{'id':_0x1c4c9e[_0xe506('0x4f')]['id']}})[_0xe506('0x1d')](handleEntityNotFound(_0x145613,null))[_0xe506('0x1d')](function(_0x58cfde){if(_0x58cfde){_0x116e9a=_0x58cfde;_0x2d4dc3['model']=_[_0xe506('0x52')](db[_0xe506('0x53')][_0xe506('0x37')]);_0x2d4dc3[_0xe506('0x3a')]=_[_0xe506('0x52')](_0x1c4c9e['query']);_0x2d4dc3['filters']=_[_0xe506('0x3c')](_0x2d4dc3[_0xe506('0x40')],_0x2d4dc3[_0xe506('0x3a')]);_0x1d16f8[_0xe506('0x3d')]=_['intersection'](_0x2d4dc3[_0xe506('0x40')],qs['fields'](_0x1c4c9e['query'][_0xe506('0x3e')]));_0x1d16f8['attributes']=_0x1d16f8['attributes'][_0xe506('0x3f')]?_0x1d16f8[_0xe506('0x3d')]:_0x2d4dc3['model'];_0x1d16f8[_0xe506('0x54')]=qs['sort'](_0x1c4c9e['query'][_0xe506('0x43')]);_0x1d16f8['where']=qs[_0xe506('0x3b')](_['pick'](_0x1c4c9e[_0xe506('0x3a')],_0x2d4dc3[_0xe506('0x3b')]));if(_0x1c4c9e['query'][_0xe506('0x44')]){_0x1d16f8[_0xe506('0x45')]=_[_0xe506('0x46')](_0x1d16f8[_0xe506('0x45')],{'$or':_[_0xe506('0x35')](_0x1d16f8[_0xe506('0x3d')],function(_0x1724f8){var _0x516ea6={};_0x516ea6[_0x1724f8]={'$like':'%'+_0x1c4c9e[_0xe506('0x3a')][_0xe506('0x44')]+'%'};return _0x516ea6;})});}_0x1d16f8=_[_0xe506('0x46')]({},_0x1d16f8,_0x1c4c9e[_0xe506('0x4b')]);return _0x116e9a[_0xe506('0x50')](_0x1d16f8);}})[_0xe506('0x1d')](function(_0x2bc9f8){if(_0x2bc9f8){_0x94aa51=_0x2bc9f8['length'];if(!_0x1c4c9e[_0xe506('0x3a')][_0xe506('0x41')](_0xe506('0x42'))){_0x1d16f8[_0xe506('0x2a')]=qs[_0xe506('0x2a')](_0x1c4c9e[_0xe506('0x3a')][_0xe506('0x2a')]);_0x1d16f8[_0xe506('0x29')]=qs[_0xe506('0x29')](_0x1c4c9e['query'][_0xe506('0x29')]);}return _0x116e9a['getConfigurations'](_0x1d16f8);}})['then'](function(_0x481295){if(_0x481295){return _0x481295?{'count':_0x94aa51,'rows':_0x481295}:null;}})[_0xe506('0x1d')](respondWithResult(_0x145613,null))[_0xe506('0x24')](handleError(_0x145613,null));};exports[_0xe506('0x55')]=function(_0x200021,_0x1357c1,_0xeec625){if(_0x200021[_0xe506('0x4e')]['id']){delete _0x200021[_0xe506('0x4e')]['id'];}return db[_0xe506('0x36')][_0xe506('0x51')]({'where':{'id':_0x200021['params']['id']}})['then'](handleEntityNotFound(_0x1357c1,null))[_0xe506('0x1d')](function(_0x41b752){if(_0x41b752){_0x200021[_0xe506('0x4e')]['AccountId']=_0x41b752['id'];_0x200021[_0xe506('0x4e')]['Subjects']=integrations[_0xe506('0x56')](_0x200021['body']['channel'],_0x200021[_0xe506('0x4e')]['type']);_0x200021['body'][_0xe506('0x57')]=integrations[_0xe506('0x58')](_0x200021[_0xe506('0x4e')][_0xe506('0x59')],_0x200021['body'][_0xe506('0x38')]);return db[_0xe506('0x53')][_0xe506('0x4d')](_0x200021[_0xe506('0x4e')],{'include':[{'model':db[_0xe506('0x5a')],'as':_0xe506('0x5b')},{'model':db[_0xe506('0x5a')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x1357c1,null))[_0xe506('0x24')](handleError(_0x1357c1,null));};exports[_0xe506('0x5c')]=function(_0x42a1f1,_0x2ed6d1,_0x417195){var _0x575748=[{'name':_0xe506('0x5d'),'label':_0xe506('0x5d'),'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 _0x1c1079='';return db['DeskAccount'][_0xe506('0x51')]({'where':{'id':_0x42a1f1[_0xe506('0x4f')]['id']},'attributes':['id',_0xe506('0x5e'),_0xe506('0x5f'),_0xe506('0x60'),_0xe506('0x61'),_0xe506('0x62'),_0xe506('0x63'),_0xe506('0x64'),_0xe506('0x65')]})['then'](handleEntityNotFound(_0x2ed6d1,null))[_0xe506('0x1d')](function(_0x488aa3){if(_0x488aa3){_0x1c1079=_0x488aa3[_0xe506('0x5e')];var _0x54825f=_0x1c1079[_0xe506('0x66')](-0x1);if(_0x54825f==='/'){_0x1c1079=_0x1c1079['substring'](0x0,_0x1c1079[_0xe506('0x67')](_0x54825f));}var _0x6379f5={'method':_0xe506('0x68'),'uri':util[_0xe506('0x69')](_0xe506('0x6a'),_0x1c1079),'headers':{'Content-Type':_0xe506('0x6b'),'Accept':'application/json'},'json':!![]};if(_0x488aa3[_0xe506('0x5f')]==='basic'){_0x6379f5[_0xe506('0x6c')][_0xe506('0x6d')]=util[_0xe506('0x69')](_0xe506('0x6e'),new Buffer(util['format'](_0xe506('0x6f'),_0x488aa3[_0xe506('0x60')],_0x488aa3['password']))[_0xe506('0x70')](_0xe506('0x71')));}return rp(_0x6379f5)[_0xe506('0x1d')](function(_0x2a1e2b){return _0x575748[_0xe506('0x72')](_[_0xe506('0x35')](_0x2a1e2b[_0xe506('0x73')][_0xe506('0x74')],function(_0xdca569){return{'id':_0xdca569[_0xe506('0x33')],'name':_0xdca569['name'],'type':_0xdca569[_0xe506('0x38')],'active':_0xdca569['active'],'label':_0xdca569[_0xe506('0x75')],'custom':!![]};}));});}})[_0xe506('0x1d')](function(_0xff288){return{'count':_0xff288[_0xe506('0x3f')],'rows':_0xff288};})[_0xe506('0x1d')](respondWithResult(_0x2ed6d1,null))['catch'](function(_0x1595ab){var _0x3422ad=_0x42a1f1['query'][_0xe506('0x1a')]?0x1f4:_0x1595ab[_0xe506('0x76')]||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s',_0xe506('0x5c'),_0x3422ad,JSON['stringify'](_0x1595ab));delete _0x1595ab['name'];if(_0x3422ad===0x191){_0x3422ad=0x190;}_0x2ed6d1[_0xe506('0x26')](_0x3422ad)[_0xe506('0x77')](_0x42a1f1[_0xe506('0x3a')][_0xe506('0x1a')]?{'message':_0xe506('0x78'),'statusCode':_0x1595ab[_0xe506('0x76')]}:_0x1595ab);});};
\ No newline at end of file
+var _0x50b0=['crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','end','status','count','offset','Content-Range','apply','reject','update','destroy','sendStatus','stack','name','map','DeskAccount','rawAttributes','fieldName','type','key','query','intersection','attributes','fields','length','model','limit','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','show','params','keys','find','create','body','getConfigurations','findOne','DeskConfiguration','hasOwnProperty','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','DeskField','getFields','priority','remoteUri','username','password','consumerSecret','token','slice','substring','GET','%s/custom_fields','application/json','authType','basic','headers','Authorization','format','Basic\x20%s','toString','base64','_embedded','entries','active','label','statusCode','send','Wrong\x20credentials','html-pdf','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel'];(function(_0xc8ffc4,_0x2cea71){var _0x48e8e6=function(_0x3b86bf){while(--_0x3b86bf){_0xc8ffc4['push'](_0xc8ffc4['shift']());}};_0x48e8e6(++_0x2cea71);}(_0x50b0,0x16c));var _0x050b=function(_0x161f85,_0x1b1968){_0x161f85=_0x161f85-0x0;var _0x3f98ad=_0x50b0[_0x161f85];return _0x3f98ad;};'use strict';var pdf=require(_0x050b('0x0'));var emlformat=require(_0x050b('0x1'));var rimraf=require(_0x050b('0x2'));var zipdir=require(_0x050b('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x050b('0x4'));var moment=require('moment');var BPromise=require(_0x050b('0x5'));var Mustache=require(_0x050b('0x6'));var util=require(_0x050b('0x7'));var path=require(_0x050b('0x8'));var sox=require(_0x050b('0x9'));var csv=require(_0x050b('0xa'));var ejs=require(_0x050b('0xb'));var fs=require('fs');var _=require(_0x050b('0xc'));var squel=require(_0x050b('0xd'));var crypto=require(_0x050b('0xe'));var jsforce=require(_0x050b('0xf'));var deskjs=require(_0x050b('0x10'));var toCsv=require(_0x050b('0xa'));var querystring=require('querystring');var Papa=require(_0x050b('0x11'));var Redis=require(_0x050b('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x050b('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x050b('0x14'));var logger=require(_0x050b('0x15'))(_0x050b('0x16'));var utils=require(_0x050b('0x17'));var config=require(_0x050b('0x18'));var db=require(_0x050b('0x19'))['db'];var integrations=require(_0x050b('0x1a'));var jayson=require(_0x050b('0x1b'));var client=jayson[_0x050b('0x1c')]['http']({'port':0x232a});function checkPasswordPattern(_0x42a019,_0x25fbb0,_0x2855de){if(_0x2855de){var _0x26ae98=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x26ae98[_0x050b('0x1d')](_0x25fbb0)){return _0x42a019;}else{throw new db[(_0x050b('0x1e'))][(_0x050b('0x1f'))](_0x050b('0x20'));}}else{return _0x42a019;}}function respondWithRpcPromise(_0x46a1ec,_0x89ec80,_0x14313c,_0x39d257){return new BPromise(function(_0x41d968,_0xa2f614){var _0x25a9be=_0x39d257||client;return _0x25a9be[_0x050b('0x21')](_0x46a1ec,_0x14313c)[_0x050b('0x22')](function(_0xd637b7){logger[_0x050b('0x23')](_0x050b('0x24'),_0x89ec80,_0x050b('0x25'));logger[_0x050b('0x26')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x89ec80,_0x050b('0x25'),JSON[_0x050b('0x27')](_0xd637b7));if(_0xd637b7[_0x050b('0x28')]){if(_0xd637b7['error']['code']===0x1f4){logger['error']('DeskAccount,\x20%s,\x20%s',_0x89ec80,_0xd637b7[_0x050b('0x28')][_0x050b('0x29')]);return _0xa2f614(_0xd637b7[_0x050b('0x28')][_0x050b('0x29')]);}logger['error']('DeskAccount,\x20%s,\x20%s',_0x89ec80,_0xd637b7[_0x050b('0x28')]['message']);return _0x41d968(_0xd637b7[_0x050b('0x28')][_0x050b('0x29')]);}else{logger[_0x050b('0x23')](_0x050b('0x24'),_0x89ec80,'request\x20sent');_0x41d968(_0xd637b7[_0x050b('0x2a')][_0x050b('0x29')]);}})[_0x050b('0x2b')](function(_0x33aa01){logger['error'](_0x050b('0x24'),_0x89ec80,_0x33aa01);_0xa2f614(_0x33aa01);});});}function respondWithStatusCode(_0x5e09e7,_0x56cec5){_0x56cec5=_0x56cec5||0xcc;return function(_0x46abe6){if(_0x46abe6){return _0x5e09e7['sendStatus'](_0x56cec5);}return _0x5e09e7['status'](_0x56cec5)[_0x050b('0x2c')]();};}function respondWithResult(_0x3c2bfe,_0x45d725){_0x45d725=_0x45d725||0xc8;return function(_0x353a3c){if(_0x353a3c){return _0x3c2bfe[_0x050b('0x2d')](_0x45d725)['json'](_0x353a3c);}};}function respondWithFilteredResult(_0x102645,_0x3121e9){return function(_0xf472a7){if(_0xf472a7){var _0x28373c=_0xf472a7[_0x050b('0x2e')],_0x205985=_0x3121e9[_0x050b('0x2f')],_0x4131c0=_0x3121e9[_0x050b('0x2f')]+_0x3121e9['limit'],_0x11b0aa;if(_0x4131c0>=_0x28373c){_0x4131c0=_0x28373c;_0x11b0aa=0xc8;}else{_0x11b0aa=0xce;}_0x102645[_0x050b('0x2d')](_0x11b0aa);return _0x102645['set'](_0x050b('0x30'),_0x205985+'-'+_0x4131c0+'/'+_0x28373c)['json'](_0xf472a7);}return null;};}function patchUpdates(_0xbcb6c1){return function(_0x59bd26){try{jsonpatch[_0x050b('0x31')](_0x59bd26,_0xbcb6c1,!![]);}catch(_0x369e71){return BPromise[_0x050b('0x32')](_0x369e71);}return _0x59bd26['save']();};}function saveUpdates(_0x2409c7,_0x4f09d8){return function(_0x46d3d8){if(_0x46d3d8){return _0x46d3d8[_0x050b('0x33')](_0x2409c7)[_0x050b('0x22')](function(_0x11d678){return _0x11d678;});}return null;};}function removeEntity(_0x14df62,_0x3f44b8){return function(_0x163c08){if(_0x163c08){return _0x163c08[_0x050b('0x34')]()[_0x050b('0x22')](function(){_0x14df62[_0x050b('0x2d')](0xcc)[_0x050b('0x2c')]();});}};}function handleEntityNotFound(_0x15e412,_0x32201b){return function(_0x331ac8){if(!_0x331ac8){_0x15e412[_0x050b('0x35')](0x194);}return _0x331ac8;};}function handleError(_0x3388a3,_0x53f6c3){_0x53f6c3=_0x53f6c3||0x1f4;return function(_0x2a9a7b){logger['error'](_0x2a9a7b[_0x050b('0x36')]);if(_0x2a9a7b['name']){delete _0x2a9a7b[_0x050b('0x37')];}_0x3388a3[_0x050b('0x2d')](_0x53f6c3)['send'](_0x2a9a7b);};}exports['index']=function(_0x5060c5,_0x5a892a){var _0x2e6070={},_0x55fd9f={},_0x173d9e={'count':0x0,'rows':[]};var _0x21d493=_[_0x050b('0x38')](db[_0x050b('0x39')][_0x050b('0x3a')],function(_0x681bae){return{'name':_0x681bae[_0x050b('0x3b')],'type':_0x681bae[_0x050b('0x3c')][_0x050b('0x3d')]};});_0x55fd9f['model']=_[_0x050b('0x38')](_0x21d493,_0x050b('0x37'));_0x55fd9f[_0x050b('0x3e')]=_['keys'](_0x5060c5[_0x050b('0x3e')]);_0x55fd9f['filters']=_[_0x050b('0x3f')](_0x55fd9f['model'],_0x55fd9f[_0x050b('0x3e')]);_0x2e6070[_0x050b('0x40')]=_[_0x050b('0x3f')](_0x55fd9f['model'],qs[_0x050b('0x41')](_0x5060c5[_0x050b('0x3e')][_0x050b('0x41')]));_0x2e6070['attributes']=_0x2e6070['attributes'][_0x050b('0x42')]?_0x2e6070[_0x050b('0x40')]:_0x55fd9f[_0x050b('0x43')];if(!_0x5060c5[_0x050b('0x3e')]['hasOwnProperty']('nolimit')){_0x2e6070[_0x050b('0x44')]=qs[_0x050b('0x44')](_0x5060c5['query'][_0x050b('0x44')]);_0x2e6070[_0x050b('0x2f')]=qs['offset'](_0x5060c5[_0x050b('0x3e')]['offset']);}_0x2e6070[_0x050b('0x45')]=qs[_0x050b('0x46')](_0x5060c5['query']['sort']);_0x2e6070[_0x050b('0x47')]=qs[_0x050b('0x48')](_[_0x050b('0x49')](_0x5060c5[_0x050b('0x3e')],_0x55fd9f[_0x050b('0x48')]));if(_0x5060c5[_0x050b('0x3e')]['filter']){_0x2e6070[_0x050b('0x47')]=_[_0x050b('0x4a')](_0x2e6070['where'],{'$or':_['map'](_0x21d493,function(_0x113bd9){if(_0x113bd9['type']!==_0x050b('0x4b')){var _0x51f422={};_0x51f422[_0x113bd9[_0x050b('0x37')]]={'$like':'%'+_0x5060c5['query'][_0x050b('0x4c')]+'%'};return _0x51f422;}})});}_0x2e6070=_[_0x050b('0x4a')]({},_0x2e6070,_0x5060c5[_0x050b('0x4d')]);var _0x2bb827={'where':_0x2e6070[_0x050b('0x47')]};return db[_0x050b('0x39')]['count'](_0x2bb827)['then'](function(_0x2dd44b){_0x173d9e['count']=_0x2dd44b;if(_0x5060c5['query'][_0x050b('0x4e')]){_0x2e6070[_0x050b('0x4f')]=[{'all':!![]}];}return db[_0x050b('0x39')][_0x050b('0x50')](_0x2e6070);})[_0x050b('0x22')](function(_0x4b8ccb){_0x173d9e[_0x050b('0x51')]=_0x4b8ccb;return _0x173d9e;})['then'](respondWithFilteredResult(_0x5a892a,_0x2e6070))[_0x050b('0x2b')](handleError(_0x5a892a,null));};exports[_0x050b('0x52')]=function(_0x478894,_0x17cc92){var _0x4630da={'raw':![],'where':{'id':_0x478894[_0x050b('0x53')]['id']}},_0x395510={};_0x395510['model']=_[_0x050b('0x54')](db['DeskAccount'][_0x050b('0x3a')]);_0x395510[_0x050b('0x3e')]=_[_0x050b('0x54')](_0x478894[_0x050b('0x3e')]);_0x395510[_0x050b('0x48')]=_[_0x050b('0x3f')](_0x395510[_0x050b('0x43')],_0x395510['query']);_0x4630da['attributes']=_['intersection'](_0x395510['model'],qs[_0x050b('0x41')](_0x478894[_0x050b('0x3e')][_0x050b('0x41')]));_0x4630da['attributes']=_0x4630da[_0x050b('0x40')][_0x050b('0x42')]?_0x4630da[_0x050b('0x40')]:_0x395510[_0x050b('0x43')];if(_0x478894[_0x050b('0x3e')]['includeAll']){_0x4630da[_0x050b('0x4f')]=[{'all':!![]}];}_0x4630da=_[_0x050b('0x4a')]({},_0x4630da,_0x478894[_0x050b('0x4d')]);return db[_0x050b('0x39')][_0x050b('0x55')](_0x4630da)[_0x050b('0x22')](handleEntityNotFound(_0x17cc92,null))[_0x050b('0x22')](respondWithResult(_0x17cc92,null))[_0x050b('0x2b')](handleError(_0x17cc92,null));};exports[_0x050b('0x56')]=function(_0xb0cdb4,_0x370c35){return db[_0x050b('0x39')][_0x050b('0x56')](_0xb0cdb4[_0x050b('0x57')],{})['then'](respondWithResult(_0x370c35,0xc9))[_0x050b('0x2b')](handleError(_0x370c35,null));};exports['update']=function(_0xfa7e54,_0x3686b4){if(_0xfa7e54[_0x050b('0x57')]['id']){delete _0xfa7e54[_0x050b('0x57')]['id'];}return db['DeskAccount']['find']({'where':{'id':_0xfa7e54[_0x050b('0x53')]['id']}})[_0x050b('0x22')](handleEntityNotFound(_0x3686b4,null))['then'](saveUpdates(_0xfa7e54['body'],null))[_0x050b('0x22')](respondWithResult(_0x3686b4,null))['catch'](handleError(_0x3686b4,null));};exports[_0x050b('0x34')]=function(_0x13a6d6,_0x40d1fc){return db[_0x050b('0x39')][_0x050b('0x55')]({'where':{'id':_0x13a6d6[_0x050b('0x53')]['id']}})[_0x050b('0x22')](handleEntityNotFound(_0x40d1fc,null))['then'](removeEntity(_0x40d1fc,null))[_0x050b('0x2b')](handleError(_0x40d1fc,null));};exports[_0x050b('0x58')]=function(_0x47f5c8,_0x1cd8bf,_0x3b76bc){var _0x2e42dd={};var _0x5823b2={};var _0x4cedf6;var _0x44c579;return db['DeskAccount'][_0x050b('0x59')]({'where':{'id':_0x47f5c8[_0x050b('0x53')]['id']}})[_0x050b('0x22')](handleEntityNotFound(_0x1cd8bf,null))[_0x050b('0x22')](function(_0x1a1d57){if(_0x1a1d57){_0x4cedf6=_0x1a1d57;_0x5823b2[_0x050b('0x43')]=_[_0x050b('0x54')](db[_0x050b('0x5a')][_0x050b('0x3a')]);_0x5823b2[_0x050b('0x3e')]=_[_0x050b('0x54')](_0x47f5c8['query']);_0x5823b2[_0x050b('0x48')]=_['intersection'](_0x5823b2[_0x050b('0x43')],_0x5823b2[_0x050b('0x3e')]);_0x2e42dd[_0x050b('0x40')]=_[_0x050b('0x3f')](_0x5823b2['model'],qs[_0x050b('0x41')](_0x47f5c8['query'][_0x050b('0x41')]));_0x2e42dd[_0x050b('0x40')]=_0x2e42dd['attributes'][_0x050b('0x42')]?_0x2e42dd[_0x050b('0x40')]:_0x5823b2[_0x050b('0x43')];_0x2e42dd[_0x050b('0x45')]=qs[_0x050b('0x46')](_0x47f5c8[_0x050b('0x3e')][_0x050b('0x46')]);_0x2e42dd[_0x050b('0x47')]=qs['filters'](_[_0x050b('0x49')](_0x47f5c8[_0x050b('0x3e')],_0x5823b2[_0x050b('0x48')]));if(_0x47f5c8['query'][_0x050b('0x4c')]){_0x2e42dd[_0x050b('0x47')]=_[_0x050b('0x4a')](_0x2e42dd[_0x050b('0x47')],{'$or':_[_0x050b('0x38')](_0x2e42dd['attributes'],function(_0x50e4ef){var _0x2e455f={};_0x2e455f[_0x50e4ef]={'$like':'%'+_0x47f5c8[_0x050b('0x3e')][_0x050b('0x4c')]+'%'};return _0x2e455f;})});}_0x2e42dd=_['merge']({},_0x2e42dd,_0x47f5c8['options']);return _0x4cedf6[_0x050b('0x58')](_0x2e42dd);}})[_0x050b('0x22')](function(_0x26dc7f){if(_0x26dc7f){_0x44c579=_0x26dc7f['length'];if(!_0x47f5c8[_0x050b('0x3e')][_0x050b('0x5b')]('nolimit')){_0x2e42dd[_0x050b('0x44')]=qs['limit'](_0x47f5c8['query']['limit']);_0x2e42dd[_0x050b('0x2f')]=qs[_0x050b('0x2f')](_0x47f5c8[_0x050b('0x3e')][_0x050b('0x2f')]);}return _0x4cedf6['getConfigurations'](_0x2e42dd);}})[_0x050b('0x22')](function(_0x478276){if(_0x478276){return _0x478276?{'count':_0x44c579,'rows':_0x478276}:null;}})['then'](respondWithResult(_0x1cd8bf,null))['catch'](handleError(_0x1cd8bf,null));};exports[_0x050b('0x5c')]=function(_0x394618,_0x38fec0,_0x5ebef2){if(_0x394618['body']['id']){delete _0x394618[_0x050b('0x57')]['id'];}return db['DeskAccount'][_0x050b('0x59')]({'where':{'id':_0x394618['params']['id']}})[_0x050b('0x22')](handleEntityNotFound(_0x38fec0,null))[_0x050b('0x22')](function(_0x52da7b){if(_0x52da7b){_0x394618['body'][_0x050b('0x5d')]=_0x52da7b['id'];_0x394618['body'][_0x050b('0x5e')]=integrations[_0x050b('0x5f')](_0x394618['body'][_0x050b('0x60')],_0x394618[_0x050b('0x57')]['type']);_0x394618['body'][_0x050b('0x61')]=integrations['getDescriptions'](_0x394618['body'][_0x050b('0x60')],_0x394618[_0x050b('0x57')][_0x050b('0x3c')]);return db[_0x050b('0x5a')][_0x050b('0x56')](_0x394618['body'],{'include':[{'model':db['DeskField'],'as':'Subjects'},{'model':db[_0x050b('0x62')],'as':_0x050b('0x61')}]});}return null;})[_0x050b('0x22')](respondWithResult(_0x38fec0,null))[_0x050b('0x2b')](handleError(_0x38fec0,null));};exports[_0x050b('0x63')]=function(_0x27e2ab,_0xc3cd06,_0x51f53){var _0x55d56d=[{'name':_0x050b('0x64'),'label':_0x050b('0x64'),'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 _0x16b5ab='';return db['DeskAccount'][_0x050b('0x59')]({'where':{'id':_0x27e2ab[_0x050b('0x53')]['id']},'attributes':['id',_0x050b('0x65'),'authType',_0x050b('0x66'),_0x050b('0x67'),'consumerKey',_0x050b('0x68'),_0x050b('0x69'),'tokenSecret']})['then'](handleEntityNotFound(_0xc3cd06,null))['then'](function(_0x149beb){if(_0x149beb){_0x16b5ab=_0x149beb[_0x050b('0x65')];var _0x18cc50=_0x16b5ab[_0x050b('0x6a')](-0x1);if(_0x18cc50==='/'){_0x16b5ab=_0x16b5ab[_0x050b('0x6b')](0x0,_0x16b5ab['lastIndexOf'](_0x18cc50));}var _0x4987f9={'method':_0x050b('0x6c'),'uri':util['format'](_0x050b('0x6d'),_0x16b5ab),'headers':{'Content-Type':_0x050b('0x6e'),'Accept':'application/json'},'json':!![]};if(_0x149beb[_0x050b('0x6f')]===_0x050b('0x70')){_0x4987f9[_0x050b('0x71')][_0x050b('0x72')]=util[_0x050b('0x73')](_0x050b('0x74'),new Buffer(util[_0x050b('0x73')]('%s:%s',_0x149beb[_0x050b('0x66')],_0x149beb[_0x050b('0x67')]))[_0x050b('0x75')](_0x050b('0x76')));}return rp(_0x4987f9)[_0x050b('0x22')](function(_0x5625ca){return _0x55d56d['concat'](_[_0x050b('0x38')](_0x5625ca[_0x050b('0x77')][_0x050b('0x78')],function(_0x3c3364){return{'id':_0x3c3364[_0x050b('0x37')],'name':_0x3c3364[_0x050b('0x37')],'type':_0x3c3364[_0x050b('0x3c')],'active':_0x3c3364[_0x050b('0x79')],'label':_0x3c3364[_0x050b('0x7a')],'custom':!![]};}));});}})[_0x050b('0x22')](function(_0x3b126c){return{'count':_0x3b126c[_0x050b('0x42')],'rows':_0x3b126c};})['then'](respondWithResult(_0xc3cd06,null))['catch'](function(_0xa79f){var _0x17d35a=_0x27e2ab['query'][_0x050b('0x1d')]?0x1f4:_0xa79f[_0x050b('0x7b')]||0x1f4;logger[_0x050b('0x28')]('getFields,\x20%s,\x20%s,\x20%s',_0x050b('0x63'),_0x17d35a,JSON['stringify'](_0xa79f));delete _0xa79f['name'];if(_0x17d35a===0x191){_0x17d35a=0x190;}_0xc3cd06['status'](_0x17d35a)[_0x050b('0x7c')](_0x27e2ab[_0x050b('0x3e')][_0x050b('0x1d')]?{'message':_0x050b('0x7d'),'statusCode':_0xa79f['statusCode']}:_0xa79f);});};
\ No newline at end of file
diff --git a/server/api/intDeskAccount/intDeskAccount.model.js b/server/api/intDeskAccount/intDeskAccount.model.js
index a0b014e..225bade 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 _0xb957=['util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./intDeskAccount.attributes','define','DeskAccount','int_desk_accounts','lodash'];(function(_0x3d2e89,_0x2f79c4){var _0x58b969=function(_0x53064e){while(--_0x53064e){_0x3d2e89['push'](_0x3d2e89['shift']());}};_0x58b969(++_0x2f79c4);}(_0xb957,0x1d3));var _0x7b95=function(_0x5f2787,_0x273ae2){_0x5f2787=_0x5f2787-0x0;var _0x28ab50=_0xb957[_0x5f2787];return _0x28ab50;};'use strict';var _=require(_0x7b95('0x0'));var util=require(_0x7b95('0x1'));var logger=require(_0x7b95('0x2'))(_0x7b95('0x3'));var moment=require('moment');var BPromise=require(_0x7b95('0x4'));var rp=require(_0x7b95('0x5'));var fs=require('fs');var path=require(_0x7b95('0x6'));var rimraf=require(_0x7b95('0x7'));var config=require(_0x7b95('0x8'));var attributes=require(_0x7b95('0x9'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x24db98,_0x389848){return _0x24db98[_0x7b95('0xa')](_0x7b95('0xb'),attributes,{'tableName':_0x7b95('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xba1a=['moment','rimraf','./intDeskAccount.attributes','define','int_desk_accounts','lodash','util','../../config/logger','api'];(function(_0x1cc986,_0x4f94a0){var _0x251eda=function(_0x524072){while(--_0x524072){_0x1cc986['push'](_0x1cc986['shift']());}};_0x251eda(++_0x4f94a0);}(_0xba1a,0x7a));var _0xaba1=function(_0x2252a5,_0x2be87b){_0x2252a5=_0x2252a5-0x0;var _0x365891=_0xba1a[_0x2252a5];return _0x365891;};'use strict';var _=require(_0xaba1('0x0'));var util=require(_0xaba1('0x1'));var logger=require(_0xaba1('0x2'))(_0xaba1('0x3'));var moment=require(_0xaba1('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xaba1('0x5'));var config=require('../../config/environment');var attributes=require(_0xaba1('0x6'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x776a2c,_0x43c7b6){return _0x776a2c[_0xaba1('0x7')]('DeskAccount',attributes,{'tableName':_0xaba1('0x8'),'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 e0c032b..ef72912 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 _0x017d=['GetDeskAccount','DeskAccount','options','where','attributes','include','map','model','ShowDeskAccount','find','stringify','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','error','message','catch'];(function(_0x4fa489,_0x4cba6b){var _0x41d2ce=function(_0x364060){while(--_0x364060){_0x4fa489['push'](_0x4fa489['shift']());}};_0x41d2ce(++_0x4cba6b);}(_0x017d,0xe4));var _0xd017=function(_0x1f524b,_0x36b273){_0x1f524b=_0x1f524b-0x0;var _0x175678=_0x017d[_0x1f524b];return _0x175678;};'use strict';var _=require(_0xd017('0x0'));var util=require(_0xd017('0x1'));var moment=require('moment');var BPromise=require(_0xd017('0x2'));var rs=require(_0xd017('0x3'));var fs=require('fs');var Redis=require(_0xd017('0x4'));var db=require(_0xd017('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xd017('0x6'));var config=require(_0xd017('0x7'));var jayson=require(_0xd017('0x8'));var client=jayson[_0xd017('0x9')][_0xd017('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5dd4c3,_0x381f67,_0x533eb9){return new BPromise(function(_0x31f9ad,_0x1648f0){return client[_0xd017('0xb')](_0x5dd4c3,_0x533eb9)[_0xd017('0xc')](function(_0x1d5b4){logger[_0xd017('0xd')](_0xd017('0xe'),_0x381f67,_0xd017('0xf'));logger[_0xd017('0x10')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x381f67,'request\x20sent',JSON['stringify'](_0x1d5b4));if(_0x1d5b4[_0xd017('0x11')]){if(_0x1d5b4[_0xd017('0x11')]['code']===0x1f4){logger[_0xd017('0x11')](_0xd017('0xe'),_0x381f67,_0x1d5b4[_0xd017('0x11')][_0xd017('0x12')]);return _0x1648f0(_0x1d5b4[_0xd017('0x11')][_0xd017('0x12')]);}logger[_0xd017('0x11')]('DeskAccount,\x20%s,\x20%s',_0x381f67,_0x1d5b4[_0xd017('0x11')][_0xd017('0x12')]);return _0x31f9ad(_0x1d5b4['error'][_0xd017('0x12')]);}else{logger[_0xd017('0xd')](_0xd017('0xe'),_0x381f67,_0xd017('0xf'));_0x31f9ad(_0x1d5b4['result'][_0xd017('0x12')]);}})[_0xd017('0x13')](function(_0x1a9b73){logger[_0xd017('0x11')]('DeskAccount,\x20%s,\x20%s',_0x381f67,_0x1a9b73);_0x1648f0(_0x1a9b73);});});}exports[_0xd017('0x14')]=function(_0x4559ad){var _0x484fb6=this;return new Promise(function(_0x5863eb,_0x5060dd){return db[_0xd017('0x15')]['findAll']({'raw':_0x4559ad[_0xd017('0x16')]?_0x4559ad['options']['raw']===undefined?!![]:![]:!![],'where':_0x4559ad['options']?_0x4559ad[_0xd017('0x16')][_0xd017('0x17')]||null:null,'attributes':_0x4559ad[_0xd017('0x16')]?_0x4559ad[_0xd017('0x16')][_0xd017('0x18')]||null:null,'limit':_0x4559ad[_0xd017('0x16')]?_0x4559ad[_0xd017('0x16')]['limit']||null:null,'include':_0x4559ad['options']?_0x4559ad['options'][_0xd017('0x19')]?_['map'](_0x4559ad[_0xd017('0x16')]['include'],function(_0x6124a6){return{'model':db[_0x6124a6['model']],'as':_0x6124a6['as'],'attributes':_0x6124a6[_0xd017('0x18')],'include':_0x6124a6[_0xd017('0x19')]?_[_0xd017('0x1a')](_0x6124a6[_0xd017('0x19')],function(_0x23b6c2){return{'model':db[_0x23b6c2[_0xd017('0x1b')]],'as':_0x23b6c2['as'],'attributes':_0x23b6c2[_0xd017('0x18')],'include':_0x23b6c2[_0xd017('0x19')]?_['map'](_0x23b6c2[_0xd017('0x19')],function(_0x27e8fc){return{'model':db[_0x27e8fc[_0xd017('0x1b')]],'as':_0x27e8fc['as'],'attributes':_0x27e8fc[_0xd017('0x18')]};}):[]};}):[]};}):[]:[]})[_0xd017('0xc')](function(_0x5c5904){logger['info'](_0xd017('0x14'),_0x4559ad);logger[_0xd017('0x10')](_0xd017('0x14'),_0x4559ad,JSON['stringify'](_0x5c5904));_0x5863eb(_0x5c5904);})[_0xd017('0x13')](function(_0x440014){logger[_0xd017('0x11')](_0xd017('0x14'),_0x440014[_0xd017('0x12')],_0x4559ad);_0x5060dd(_0x484fb6[_0xd017('0x11')](0x1f4,_0x440014['message']));});});};exports[_0xd017('0x1c')]=function(_0x27f4f2){var _0x101655=this;return new Promise(function(_0x1e01f1,_0x5f515f){return db[_0xd017('0x15')][_0xd017('0x1d')]({'raw':_0x27f4f2[_0xd017('0x16')]?_0x27f4f2[_0xd017('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x27f4f2['options']?_0x27f4f2[_0xd017('0x16')][_0xd017('0x17')]||null:null,'attributes':_0x27f4f2[_0xd017('0x16')]?_0x27f4f2[_0xd017('0x16')][_0xd017('0x18')]||null:null,'include':_0x27f4f2[_0xd017('0x16')]?_0x27f4f2[_0xd017('0x16')][_0xd017('0x19')]?_['map'](_0x27f4f2['options'][_0xd017('0x19')],function(_0x2cff09){return{'model':db[_0x2cff09['model']],'as':_0x2cff09['as'],'attributes':_0x2cff09[_0xd017('0x18')],'include':_0x2cff09[_0xd017('0x19')]?_['map'](_0x2cff09[_0xd017('0x19')],function(_0x16145a){return{'model':db[_0x16145a[_0xd017('0x1b')]],'as':_0x16145a['as'],'attributes':_0x16145a['attributes'],'include':_0x16145a[_0xd017('0x19')]?_[_0xd017('0x1a')](_0x16145a['include'],function(_0x349c1d){return{'model':db[_0x349c1d[_0xd017('0x1b')]],'as':_0x349c1d['as'],'attributes':_0x349c1d[_0xd017('0x18')]};}):[]};}):[]};}):[]:[]})[_0xd017('0xc')](function(_0x363d7b){logger['info'](_0xd017('0x1c'),_0x27f4f2);logger['debug']('ShowDeskAccount',_0x27f4f2,JSON[_0xd017('0x1e')](_0x363d7b));_0x1e01f1(_0x363d7b);})[_0xd017('0x13')](function(_0x48b205){logger[_0xd017('0x11')]('ShowDeskAccount',_0x48b205[_0xd017('0x12')],_0x27f4f2);_0x5f515f(_0x101655[_0xd017('0x11')](0x1f4,_0x48b205[_0xd017('0x12')]));});});};
\ No newline at end of file
+var _0xd234=['ShowDeskAccount','find','raw','then','lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','info','request\x20sent','debug','error','code','DeskAccount,\x20%s,\x20%s','message','result','catch','GetDeskAccount','DeskAccount','findAll','options','where','attributes','limit','include','map','model','stringify'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0xd234,0x1e0));var _0x4d23=function(_0x1fabda,_0x23dfa4){_0x1fabda=_0x1fabda-0x0;var _0x10cf23=_0xd234[_0x1fabda];return _0x10cf23;};'use strict';var _=require(_0x4d23('0x0'));var util=require(_0x4d23('0x1'));var moment=require('moment');var BPromise=require(_0x4d23('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4d23('0x3'));var db=require(_0x4d23('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4d23('0x5'))(_0x4d23('0x6'));var config=require(_0x4d23('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x4d23('0x8')][_0x4d23('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x7be169,_0xbfefd1,_0x3d5a5d){return new BPromise(function(_0x5cda6c,_0x163097){return client['request'](_0x7be169,_0x3d5a5d)['then'](function(_0x52a3de){logger[_0x4d23('0xa')]('DeskAccount,\x20%s,\x20%s',_0xbfefd1,_0x4d23('0xb'));logger[_0x4d23('0xc')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0xbfefd1,_0x4d23('0xb'),JSON['stringify'](_0x52a3de));if(_0x52a3de[_0x4d23('0xd')]){if(_0x52a3de[_0x4d23('0xd')][_0x4d23('0xe')]===0x1f4){logger[_0x4d23('0xd')](_0x4d23('0xf'),_0xbfefd1,_0x52a3de['error'][_0x4d23('0x10')]);return _0x163097(_0x52a3de['error']['message']);}logger['error']('DeskAccount,\x20%s,\x20%s',_0xbfefd1,_0x52a3de[_0x4d23('0xd')][_0x4d23('0x10')]);return _0x5cda6c(_0x52a3de[_0x4d23('0xd')][_0x4d23('0x10')]);}else{logger[_0x4d23('0xa')](_0x4d23('0xf'),_0xbfefd1,_0x4d23('0xb'));_0x5cda6c(_0x52a3de[_0x4d23('0x11')]['message']);}})[_0x4d23('0x12')](function(_0x1d3e28){logger[_0x4d23('0xd')](_0x4d23('0xf'),_0xbfefd1,_0x1d3e28);_0x163097(_0x1d3e28);});});}exports[_0x4d23('0x13')]=function(_0x17e7a3){var _0x188e29=this;return new Promise(function(_0x4f6a07,_0x1933c8){return db[_0x4d23('0x14')][_0x4d23('0x15')]({'raw':_0x17e7a3['options']?_0x17e7a3[_0x4d23('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x17e7a3[_0x4d23('0x16')]?_0x17e7a3['options'][_0x4d23('0x17')]||null:null,'attributes':_0x17e7a3[_0x4d23('0x16')]?_0x17e7a3[_0x4d23('0x16')][_0x4d23('0x18')]||null:null,'limit':_0x17e7a3[_0x4d23('0x16')]?_0x17e7a3[_0x4d23('0x16')][_0x4d23('0x19')]||null:null,'include':_0x17e7a3[_0x4d23('0x16')]?_0x17e7a3['options'][_0x4d23('0x1a')]?_[_0x4d23('0x1b')](_0x17e7a3[_0x4d23('0x16')][_0x4d23('0x1a')],function(_0x54155f){return{'model':db[_0x54155f['model']],'as':_0x54155f['as'],'attributes':_0x54155f[_0x4d23('0x18')],'include':_0x54155f[_0x4d23('0x1a')]?_[_0x4d23('0x1b')](_0x54155f[_0x4d23('0x1a')],function(_0x13074f){return{'model':db[_0x13074f[_0x4d23('0x1c')]],'as':_0x13074f['as'],'attributes':_0x13074f[_0x4d23('0x18')],'include':_0x13074f['include']?_[_0x4d23('0x1b')](_0x13074f[_0x4d23('0x1a')],function(_0x3b4ba8){return{'model':db[_0x3b4ba8[_0x4d23('0x1c')]],'as':_0x3b4ba8['as'],'attributes':_0x3b4ba8[_0x4d23('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2ba6d5){logger['info'](_0x4d23('0x13'),_0x17e7a3);logger['debug'](_0x4d23('0x13'),_0x17e7a3,JSON[_0x4d23('0x1d')](_0x2ba6d5));_0x4f6a07(_0x2ba6d5);})[_0x4d23('0x12')](function(_0x19267c){logger[_0x4d23('0xd')](_0x4d23('0x13'),_0x19267c[_0x4d23('0x10')],_0x17e7a3);_0x1933c8(_0x188e29[_0x4d23('0xd')](0x1f4,_0x19267c[_0x4d23('0x10')]));});});};exports[_0x4d23('0x1e')]=function(_0x418653){var _0x38d1f4=this;return new Promise(function(_0x1833a7,_0x376242){return db[_0x4d23('0x14')][_0x4d23('0x1f')]({'raw':_0x418653[_0x4d23('0x16')]?_0x418653[_0x4d23('0x16')][_0x4d23('0x20')]===undefined?!![]:![]:!![],'where':_0x418653[_0x4d23('0x16')]?_0x418653[_0x4d23('0x16')][_0x4d23('0x17')]||null:null,'attributes':_0x418653[_0x4d23('0x16')]?_0x418653[_0x4d23('0x16')][_0x4d23('0x18')]||null:null,'include':_0x418653[_0x4d23('0x16')]?_0x418653[_0x4d23('0x16')][_0x4d23('0x1a')]?_[_0x4d23('0x1b')](_0x418653['options'][_0x4d23('0x1a')],function(_0x31a98c){return{'model':db[_0x31a98c[_0x4d23('0x1c')]],'as':_0x31a98c['as'],'attributes':_0x31a98c[_0x4d23('0x18')],'include':_0x31a98c[_0x4d23('0x1a')]?_['map'](_0x31a98c[_0x4d23('0x1a')],function(_0x33c7d5){return{'model':db[_0x33c7d5[_0x4d23('0x1c')]],'as':_0x33c7d5['as'],'attributes':_0x33c7d5[_0x4d23('0x18')],'include':_0x33c7d5['include']?_[_0x4d23('0x1b')](_0x33c7d5[_0x4d23('0x1a')],function(_0x4b56f7){return{'model':db[_0x4b56f7['model']],'as':_0x4b56f7['as'],'attributes':_0x4b56f7[_0x4d23('0x18')]};}):[]};}):[]};}):[]:[]})[_0x4d23('0x21')](function(_0x16f0e7){logger[_0x4d23('0xa')](_0x4d23('0x1e'),_0x418653);logger[_0x4d23('0xc')](_0x4d23('0x1e'),_0x418653,JSON['stringify'](_0x16f0e7));_0x1833a7(_0x16f0e7);})['catch'](function(_0x270e73){logger['error']('ShowDeskAccount',_0x270e73['message'],_0x418653);_0x376242(_0x38d1f4[_0x4d23('0xd')](0x1f4,_0x270e73[_0x4d23('0x10')]));});});};
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/index.js b/server/api/intDeskConfiguration/index.js
index 15a5bc2..f4d8f46 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 _0x1261=['getFields','/:id/subjects','getSubjects','/:id/descriptions','getTags','post','create','/:id/tags','setTags','update','delete','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskConfiguration.controller','get','/:id','show','/:id/fields','isAuthenticated'];(function(_0x322f3d,_0x235c5c){var _0x2f309c=function(_0x22e299){while(--_0x22e299){_0x322f3d['push'](_0x322f3d['shift']());}};_0x2f309c(++_0x235c5c);}(_0x1261,0x144));var _0x1126=function(_0xb85fd5,_0x3362ae){_0xb85fd5=_0xb85fd5-0x0;var _0x34228e=_0x1261[_0xb85fd5];return _0x34228e;};'use strict';var multer=require('multer');var util=require(_0x1126('0x0'));var path=require(_0x1126('0x1'));var timeout=require(_0x1126('0x2'));var express=require(_0x1126('0x3'));var router=express[_0x1126('0x4')]();var auth=require(_0x1126('0x5'));var interaction=require(_0x1126('0x6'));var config=require(_0x1126('0x7'));var controller=require(_0x1126('0x8'));router[_0x1126('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x1126('0x9')](_0x1126('0xa'),auth['isAuthenticated'](),controller[_0x1126('0xb')]);router[_0x1126('0x9')](_0x1126('0xc'),auth[_0x1126('0xd')](),controller[_0x1126('0xe')]);router['get'](_0x1126('0xf'),auth[_0x1126('0xd')](),controller[_0x1126('0x10')]);router['get'](_0x1126('0x11'),auth['isAuthenticated'](),controller['getDescriptions']);router[_0x1126('0x9')]('/:id/tags',auth[_0x1126('0xd')](),controller[_0x1126('0x12')]);router[_0x1126('0x13')]('/',auth[_0x1126('0xd')](),controller[_0x1126('0x14')]);router[_0x1126('0x13')](_0x1126('0x15'),auth[_0x1126('0xd')](),controller[_0x1126('0x16')]);router['put']('/:id',auth[_0x1126('0xd')](),controller[_0x1126('0x17')]);router[_0x1126('0x18')]('/:id',auth[_0x1126('0xd')](),controller['destroy']);module[_0x1126('0x19')]=router;
\ No newline at end of file
+var _0x78f4=['util','path','connect-timeout','express','../../components/auth/service','../../config/environment','./intDeskConfiguration.controller','get','index','isAuthenticated','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','create','setTags','put','/:id','delete','destroy'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x78f4,0x1c8));var _0x478f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x78f4[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x478f('0x0'));var path=require(_0x478f('0x1'));var timeout=require(_0x478f('0x2'));var express=require(_0x478f('0x3'));var router=express['Router']();var auth=require(_0x478f('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x478f('0x5'));var controller=require(_0x478f('0x6'));router[_0x478f('0x7')]('/',auth['isAuthenticated'](),controller[_0x478f('0x8')]);router[_0x478f('0x7')]('/:id',auth[_0x478f('0x9')](),controller['show']);router['get'](_0x478f('0xa'),auth['isAuthenticated'](),controller[_0x478f('0xb')]);router[_0x478f('0x7')](_0x478f('0xc'),auth[_0x478f('0x9')](),controller['getSubjects']);router['get'](_0x478f('0xd'),auth[_0x478f('0x9')](),controller[_0x478f('0xe')]);router[_0x478f('0x7')](_0x478f('0xf'),auth[_0x478f('0x9')](),controller[_0x478f('0x10')]);router[_0x478f('0x11')]('/',auth['isAuthenticated'](),controller[_0x478f('0x12')]);router[_0x478f('0x11')](_0x478f('0xf'),auth[_0x478f('0x9')](),controller[_0x478f('0x13')]);router[_0x478f('0x14')](_0x478f('0x15'),auth[_0x478f('0x9')](),controller['update']);router[_0x478f('0x16')](_0x478f('0x15'),auth[_0x478f('0x9')](),controller[_0x478f('0x17')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js
index fff0955..08fc7d1 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 _0x9775=['STRING','sequelize','exports'];(function(_0x29c3ae,_0x4a2cc8){var _0x20cd48=function(_0x425270){while(--_0x425270){_0x29c3ae['push'](_0x29c3ae['shift']());}};_0x20cd48(++_0x4a2cc8);}(_0x9775,0x1cf));var _0x5977=function(_0x5b7412,_0x575f17){_0x5b7412=_0x5b7412-0x0;var _0x4bf4be=_0x9775[_0x5b7412];return _0x4bf4be;};'use strict';var Sequelize=require(_0x5977('0x0'));module[_0x5977('0x1')]={'name':{'type':Sequelize[_0x5977('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x3914=['sequelize','exports','STRING'];(function(_0x247fa1,_0x4ec37c){var _0x244f35=function(_0xfb98be){while(--_0xfb98be){_0x247fa1['push'](_0x247fa1['shift']());}};_0x244f35(++_0x4ec37c);}(_0x3914,0x75));var _0x4391=function(_0x6f1a87,_0x5d5bcf){_0x6f1a87=_0x6f1a87-0x0;var _0x2495c7=_0x3914[_0x6f1a87];return _0x2495c7;};'use strict';var Sequelize=require(_0x4391('0x0'));module[_0x4391('0x1')]={'name':{'type':Sequelize[_0x4391('0x2')]},'description':{'type':Sequelize[_0x4391('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js
index f460b3e..c3e1245 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 _0xa44a=['offset','limit','Content-Range','reject','save','update','destroy','stack','name','send','index','map','DeskConfiguration','rawAttributes','type','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','body','getFields','findOne','DeskField','getSubjects','getDescriptions','getTags','Tag','setTags','ids','html-pdf','rimraf','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','request\x20sent','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','DeskConfiguration,\x20%s,\x20%s','message','result','sendStatus','end','status','json','count'];(function(_0x4f5720,_0x46fa46){var _0x50a4d9=function(_0x44aabb){while(--_0x44aabb){_0x4f5720['push'](_0x4f5720['shift']());}};_0x50a4d9(++_0x46fa46);}(_0xa44a,0x14d));var _0xaa44=function(_0x2169e8,_0x42a9b5){_0x2169e8=_0x2169e8-0x0;var _0x239a69=_0xa44a[_0x2169e8];return _0x239a69;};'use strict';var pdf=require(_0xaa44('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xaa44('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xaa44('0x2'));var rp=require(_0xaa44('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xaa44('0x4'));var util=require('util');var path=require(_0xaa44('0x5'));var sox=require(_0xaa44('0x6'));var csv=require(_0xaa44('0x7'));var ejs=require(_0xaa44('0x8'));var fs=require('fs');var _=require(_0xaa44('0x9'));var squel=require(_0xaa44('0xa'));var crypto=require(_0xaa44('0xb'));var jsforce=require(_0xaa44('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xaa44('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xaa44('0xd'));var authService=require(_0xaa44('0xe'));var qs=require(_0xaa44('0xf'));var as=require(_0xaa44('0x10'));var hardwareService=require(_0xaa44('0x11'));var logger=require(_0xaa44('0x12'))(_0xaa44('0x13'));var utils=require(_0xaa44('0x14'));var config=require(_0xaa44('0x15'));var db=require(_0xaa44('0x16'))['db'];var jayson=require(_0xaa44('0x17'));var client=jayson[_0xaa44('0x18')][_0xaa44('0x19')]({'port':0x232a});function checkPasswordPattern(_0x382994,_0x30836f,_0x37d72c){if(_0x37d72c){var _0x9f20e2=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x9f20e2['test'](_0x30836f)){return _0x382994;}else{throw new db[(_0xaa44('0x1a'))][(_0xaa44('0x1b'))](_0xaa44('0x1c'));}}else{return _0x382994;}}function respondWithRpcPromise(_0x4f84c5,_0x5d5c7e,_0x6af05,_0xe29b96){return new BPromise(function(_0x5ddfb2,_0x333aff){var _0x57d1f8=_0xe29b96||client;return _0x57d1f8['request'](_0x4f84c5,_0x6af05)[_0xaa44('0x1d')](function(_0x2a4893){logger['info']('DeskConfiguration,\x20%s,\x20%s',_0x5d5c7e,_0xaa44('0x1e'));logger[_0xaa44('0x1f')](_0xaa44('0x20'),_0x5d5c7e,'request\x20sent',JSON[_0xaa44('0x21')](_0x2a4893));if(_0x2a4893[_0xaa44('0x22')]){if(_0x2a4893[_0xaa44('0x22')]['code']===0x1f4){logger['error'](_0xaa44('0x23'),_0x5d5c7e,_0x2a4893['error']['message']);return _0x333aff(_0x2a4893[_0xaa44('0x22')]['message']);}logger[_0xaa44('0x22')](_0xaa44('0x23'),_0x5d5c7e,_0x2a4893['error']['message']);return _0x5ddfb2(_0x2a4893[_0xaa44('0x22')][_0xaa44('0x24')]);}else{logger['info'](_0xaa44('0x23'),_0x5d5c7e,_0xaa44('0x1e'));_0x5ddfb2(_0x2a4893[_0xaa44('0x25')][_0xaa44('0x24')]);}})['catch'](function(_0x44fe3f){logger['error']('DeskConfiguration,\x20%s,\x20%s',_0x5d5c7e,_0x44fe3f);_0x333aff(_0x44fe3f);});});}function respondWithStatusCode(_0x4995f3,_0x290788){_0x290788=_0x290788||0xcc;return function(_0x2139d3){if(_0x2139d3){return _0x4995f3[_0xaa44('0x26')](_0x290788);}return _0x4995f3['status'](_0x290788)[_0xaa44('0x27')]();};}function respondWithResult(_0x19fed3,_0x30e537){_0x30e537=_0x30e537||0xc8;return function(_0x27a3ab){if(_0x27a3ab){return _0x19fed3[_0xaa44('0x28')](_0x30e537)[_0xaa44('0x29')](_0x27a3ab);}};}function respondWithFilteredResult(_0x476d14,_0x1a4c3c){return function(_0x22accb){if(_0x22accb){var _0x11345c=_0x22accb[_0xaa44('0x2a')],_0x1bac8e=_0x1a4c3c[_0xaa44('0x2b')],_0x331aec=_0x1a4c3c['offset']+_0x1a4c3c[_0xaa44('0x2c')],_0x2ea9c5;if(_0x331aec>=_0x11345c){_0x331aec=_0x11345c;_0x2ea9c5=0xc8;}else{_0x2ea9c5=0xce;}_0x476d14[_0xaa44('0x28')](_0x2ea9c5);return _0x476d14['set'](_0xaa44('0x2d'),_0x1bac8e+'-'+_0x331aec+'/'+_0x11345c)['json'](_0x22accb);}return null;};}function patchUpdates(_0x27dcf3){return function(_0x36c9e0){try{jsonpatch['apply'](_0x36c9e0,_0x27dcf3,!![]);}catch(_0x2dab7a){return BPromise[_0xaa44('0x2e')](_0x2dab7a);}return _0x36c9e0[_0xaa44('0x2f')]();};}function saveUpdates(_0x341445,_0x4a348d){return function(_0x15fed0){if(_0x15fed0){return _0x15fed0[_0xaa44('0x30')](_0x341445)[_0xaa44('0x1d')](function(_0x4ad75f){return _0x4ad75f;});}return null;};}function removeEntity(_0x247fe3,_0x5a6361){return function(_0x4d0637){if(_0x4d0637){return _0x4d0637[_0xaa44('0x31')]()[_0xaa44('0x1d')](function(){_0x247fe3[_0xaa44('0x28')](0xcc)[_0xaa44('0x27')]();});}};}function handleEntityNotFound(_0x53a8af,_0x2ce3ed){return function(_0x19105d){if(!_0x19105d){_0x53a8af['sendStatus'](0x194);}return _0x19105d;};}function handleError(_0x3f0978,_0x44d1f0){_0x44d1f0=_0x44d1f0||0x1f4;return function(_0x322171){logger[_0xaa44('0x22')](_0x322171[_0xaa44('0x32')]);if(_0x322171[_0xaa44('0x33')]){delete _0x322171[_0xaa44('0x33')];}_0x3f0978['status'](_0x44d1f0)[_0xaa44('0x34')](_0x322171);};}exports[_0xaa44('0x35')]=function(_0x324f86,_0x3407f8){var _0xc7bc84={},_0x35f802={},_0x18da5a={'count':0x0,'rows':[]};var _0x52cf4b=_[_0xaa44('0x36')](db[_0xaa44('0x37')][_0xaa44('0x38')],function(_0x127c19){return{'name':_0x127c19['fieldName'],'type':_0x127c19[_0xaa44('0x39')]['key']};});_0x35f802['model']=_[_0xaa44('0x36')](_0x52cf4b,'name');_0x35f802[_0xaa44('0x3a')]=_[_0xaa44('0x3b')](_0x324f86['query']);_0x35f802[_0xaa44('0x3c')]=_['intersection'](_0x35f802[_0xaa44('0x3d')],_0x35f802[_0xaa44('0x3a')]);_0xc7bc84[_0xaa44('0x3e')]=_[_0xaa44('0x3f')](_0x35f802[_0xaa44('0x3d')],qs[_0xaa44('0x40')](_0x324f86[_0xaa44('0x3a')][_0xaa44('0x40')]));_0xc7bc84['attributes']=_0xc7bc84[_0xaa44('0x3e')][_0xaa44('0x41')]?_0xc7bc84['attributes']:_0x35f802[_0xaa44('0x3d')];if(!_0x324f86['query'][_0xaa44('0x42')](_0xaa44('0x43'))){_0xc7bc84[_0xaa44('0x2c')]=qs[_0xaa44('0x2c')](_0x324f86[_0xaa44('0x3a')][_0xaa44('0x2c')]);_0xc7bc84[_0xaa44('0x2b')]=qs[_0xaa44('0x2b')](_0x324f86[_0xaa44('0x3a')][_0xaa44('0x2b')]);}_0xc7bc84[_0xaa44('0x44')]=qs[_0xaa44('0x45')](_0x324f86[_0xaa44('0x3a')][_0xaa44('0x45')]);_0xc7bc84[_0xaa44('0x46')]=qs['filters'](_[_0xaa44('0x47')](_0x324f86['query'],_0x35f802['filters']));if(_0x324f86['query'][_0xaa44('0x48')]){_0xc7bc84[_0xaa44('0x46')]=_[_0xaa44('0x49')](_0xc7bc84[_0xaa44('0x46')],{'$or':_['map'](_0x52cf4b,function(_0x524ffc){if(_0x524ffc[_0xaa44('0x39')]!==_0xaa44('0x4a')){var _0x1ccb40={};_0x1ccb40[_0x524ffc[_0xaa44('0x33')]]={'$like':'%'+_0x324f86[_0xaa44('0x3a')]['filter']+'%'};return _0x1ccb40;}})});}_0xc7bc84=_['merge']({},_0xc7bc84,_0x324f86[_0xaa44('0x4b')]);var _0x30c9ca={'where':_0xc7bc84[_0xaa44('0x46')]};return db[_0xaa44('0x37')][_0xaa44('0x2a')](_0x30c9ca)['then'](function(_0x4037ad){_0x18da5a[_0xaa44('0x2a')]=_0x4037ad;if(_0x324f86[_0xaa44('0x3a')][_0xaa44('0x4c')]){_0xc7bc84[_0xaa44('0x4d')]=[{'all':!![]}];}return db[_0xaa44('0x37')]['findAll'](_0xc7bc84);})['then'](function(_0x268e2b){_0x18da5a[_0xaa44('0x4e')]=_0x268e2b;return _0x18da5a;})[_0xaa44('0x1d')](respondWithFilteredResult(_0x3407f8,_0xc7bc84))[_0xaa44('0x4f')](handleError(_0x3407f8,null));};exports[_0xaa44('0x50')]=function(_0x2b3367,_0x41d871){var _0xb547f={'raw':![],'where':{'id':_0x2b3367[_0xaa44('0x51')]['id']}},_0x2d4390={};_0x2d4390['model']=_[_0xaa44('0x3b')](db[_0xaa44('0x37')]['rawAttributes']);_0x2d4390[_0xaa44('0x3a')]=_[_0xaa44('0x3b')](_0x2b3367[_0xaa44('0x3a')]);_0x2d4390[_0xaa44('0x3c')]=_['intersection'](_0x2d4390['model'],_0x2d4390[_0xaa44('0x3a')]);_0xb547f[_0xaa44('0x3e')]=_['intersection'](_0x2d4390[_0xaa44('0x3d')],qs[_0xaa44('0x40')](_0x2b3367[_0xaa44('0x3a')][_0xaa44('0x40')]));_0xb547f[_0xaa44('0x3e')]=_0xb547f[_0xaa44('0x3e')][_0xaa44('0x41')]?_0xb547f['attributes']:_0x2d4390[_0xaa44('0x3d')];if(_0x2b3367[_0xaa44('0x3a')][_0xaa44('0x4c')]){_0xb547f[_0xaa44('0x4d')]=[{'all':!![]}];}_0xb547f=_[_0xaa44('0x49')]({},_0xb547f,_0x2b3367[_0xaa44('0x4b')]);return db[_0xaa44('0x37')][_0xaa44('0x52')](_0xb547f)['then'](handleEntityNotFound(_0x41d871,null))[_0xaa44('0x1d')](respondWithResult(_0x41d871,null))[_0xaa44('0x4f')](handleError(_0x41d871,null));};exports[_0xaa44('0x53')]=function(_0xad4cf9,_0x4913bb){return db[_0xaa44('0x37')][_0xaa44('0x53')](_0xad4cf9[_0xaa44('0x54')],{})[_0xaa44('0x1d')](respondWithResult(_0x4913bb,0xc9))[_0xaa44('0x4f')](handleError(_0x4913bb,null));};exports['update']=function(_0x2a71fd,_0x2967b6){if(_0x2a71fd['body']['id']){delete _0x2a71fd[_0xaa44('0x54')]['id'];}return db[_0xaa44('0x37')][_0xaa44('0x52')]({'where':{'id':_0x2a71fd[_0xaa44('0x51')]['id']}})[_0xaa44('0x1d')](handleEntityNotFound(_0x2967b6,null))[_0xaa44('0x1d')](saveUpdates(_0x2a71fd[_0xaa44('0x54')],null))[_0xaa44('0x1d')](respondWithResult(_0x2967b6,null))[_0xaa44('0x4f')](handleError(_0x2967b6,null));};exports['destroy']=function(_0x10299c,_0x2fcded){return db['DeskConfiguration']['find']({'where':{'id':_0x10299c[_0xaa44('0x51')]['id']}})['then'](handleEntityNotFound(_0x2fcded,null))[_0xaa44('0x1d')](removeEntity(_0x2fcded,null))['catch'](handleError(_0x2fcded,null));};exports[_0xaa44('0x55')]=function(_0x433552,_0x594185,_0x3662da){var _0x110200={};var _0x1aebf4={};var _0x1d162d;var _0x171412;return db['DeskConfiguration'][_0xaa44('0x56')]({'where':{'id':_0x433552[_0xaa44('0x51')]['id']}})[_0xaa44('0x1d')](handleEntityNotFound(_0x594185,null))[_0xaa44('0x1d')](function(_0x2d73fb){if(_0x2d73fb){_0x1d162d=_0x2d73fb;_0x1aebf4[_0xaa44('0x3d')]=_['keys'](db[_0xaa44('0x57')][_0xaa44('0x38')]);_0x1aebf4['query']=_[_0xaa44('0x3b')](_0x433552['query']);_0x1aebf4['filters']=_[_0xaa44('0x3f')](_0x1aebf4[_0xaa44('0x3d')],_0x1aebf4[_0xaa44('0x3a')]);_0x110200['attributes']=_['intersection'](_0x1aebf4['model'],qs['fields'](_0x433552[_0xaa44('0x3a')][_0xaa44('0x40')]));_0x110200[_0xaa44('0x3e')]=_0x110200['attributes'][_0xaa44('0x41')]?_0x110200[_0xaa44('0x3e')]:_0x1aebf4[_0xaa44('0x3d')];_0x110200['order']=qs[_0xaa44('0x45')](_0x433552['query'][_0xaa44('0x45')]);_0x110200[_0xaa44('0x46')]=qs['filters'](_[_0xaa44('0x47')](_0x433552[_0xaa44('0x3a')],_0x1aebf4[_0xaa44('0x3c')]));if(_0x433552['query'][_0xaa44('0x48')]){_0x110200['where']=_[_0xaa44('0x49')](_0x110200['where'],{'$or':_[_0xaa44('0x36')](_0x110200[_0xaa44('0x3e')],function(_0xc7b092){var _0x3039e8={};_0x3039e8[_0xc7b092]={'$like':'%'+_0x433552[_0xaa44('0x3a')][_0xaa44('0x48')]+'%'};return _0x3039e8;})});}_0x110200=_[_0xaa44('0x49')]({},_0x110200,_0x433552[_0xaa44('0x4b')]);return _0x1d162d[_0xaa44('0x55')](_0x110200);}})['then'](function(_0x285dcd){if(_0x285dcd){_0x171412=_0x285dcd[_0xaa44('0x41')];if(!_0x433552[_0xaa44('0x3a')][_0xaa44('0x42')]('nolimit')){_0x110200['limit']=qs['limit'](_0x433552[_0xaa44('0x3a')][_0xaa44('0x2c')]);_0x110200[_0xaa44('0x2b')]=qs[_0xaa44('0x2b')](_0x433552[_0xaa44('0x3a')]['offset']);}return _0x1d162d[_0xaa44('0x55')](_0x110200);}})[_0xaa44('0x1d')](function(_0x550921){if(_0x550921){return _0x550921?{'count':_0x171412,'rows':_0x550921}:null;}})[_0xaa44('0x1d')](respondWithResult(_0x594185,null))[_0xaa44('0x4f')](handleError(_0x594185,null));};exports[_0xaa44('0x58')]=function(_0x474f4a,_0x42a26e,_0x1c4857){var _0x50f8a0={};var _0x36aa66={};var _0x1c84a8;var _0xf112f1;return db[_0xaa44('0x37')]['findOne']({'where':{'id':_0x474f4a['params']['id']}})[_0xaa44('0x1d')](handleEntityNotFound(_0x42a26e,null))[_0xaa44('0x1d')](function(_0xda095e){if(_0xda095e){_0x1c84a8=_0xda095e;_0x36aa66[_0xaa44('0x3d')]=_['keys'](db['DeskField'][_0xaa44('0x38')]);_0x36aa66[_0xaa44('0x3a')]=_['keys'](_0x474f4a[_0xaa44('0x3a')]);_0x36aa66[_0xaa44('0x3c')]=_[_0xaa44('0x3f')](_0x36aa66[_0xaa44('0x3d')],_0x36aa66[_0xaa44('0x3a')]);_0x50f8a0[_0xaa44('0x3e')]=_['intersection'](_0x36aa66[_0xaa44('0x3d')],qs[_0xaa44('0x40')](_0x474f4a[_0xaa44('0x3a')]['fields']));_0x50f8a0[_0xaa44('0x3e')]=_0x50f8a0[_0xaa44('0x3e')][_0xaa44('0x41')]?_0x50f8a0[_0xaa44('0x3e')]:_0x36aa66[_0xaa44('0x3d')];_0x50f8a0[_0xaa44('0x44')]=qs[_0xaa44('0x45')](_0x474f4a[_0xaa44('0x3a')]['sort']);_0x50f8a0[_0xaa44('0x46')]=qs['filters'](_['pick'](_0x474f4a[_0xaa44('0x3a')],_0x36aa66['filters']));if(_0x474f4a[_0xaa44('0x3a')][_0xaa44('0x48')]){_0x50f8a0[_0xaa44('0x46')]=_[_0xaa44('0x49')](_0x50f8a0[_0xaa44('0x46')],{'$or':_[_0xaa44('0x36')](_0x50f8a0['attributes'],function(_0x4d4049){var _0x56f28f={};_0x56f28f[_0x4d4049]={'$like':'%'+_0x474f4a['query'][_0xaa44('0x48')]+'%'};return _0x56f28f;})});}_0x50f8a0=_[_0xaa44('0x49')]({},_0x50f8a0,_0x474f4a[_0xaa44('0x4b')]);return _0x1c84a8[_0xaa44('0x58')](_0x50f8a0);}})['then'](function(_0x1694dc){if(_0x1694dc){_0xf112f1=_0x1694dc[_0xaa44('0x41')];if(!_0x474f4a[_0xaa44('0x3a')][_0xaa44('0x42')]('nolimit')){_0x50f8a0[_0xaa44('0x2c')]=qs[_0xaa44('0x2c')](_0x474f4a[_0xaa44('0x3a')][_0xaa44('0x2c')]);_0x50f8a0[_0xaa44('0x2b')]=qs[_0xaa44('0x2b')](_0x474f4a[_0xaa44('0x3a')][_0xaa44('0x2b')]);}return _0x1c84a8[_0xaa44('0x58')](_0x50f8a0);}})[_0xaa44('0x1d')](function(_0xd90b48){if(_0xd90b48){return _0xd90b48?{'count':_0xf112f1,'rows':_0xd90b48}:null;}})[_0xaa44('0x1d')](respondWithResult(_0x42a26e,null))['catch'](handleError(_0x42a26e,null));};exports[_0xaa44('0x59')]=function(_0x552e43,_0x218865,_0x143820){var _0x277f91={};var _0x3a24d9={};var _0x40ccd8;var _0x2fe920;return db[_0xaa44('0x37')][_0xaa44('0x56')]({'where':{'id':_0x552e43['params']['id']}})[_0xaa44('0x1d')](handleEntityNotFound(_0x218865,null))[_0xaa44('0x1d')](function(_0x38e882){if(_0x38e882){_0x40ccd8=_0x38e882;_0x3a24d9['model']=_[_0xaa44('0x3b')](db[_0xaa44('0x57')][_0xaa44('0x38')]);_0x3a24d9[_0xaa44('0x3a')]=_['keys'](_0x552e43[_0xaa44('0x3a')]);_0x3a24d9['filters']=_[_0xaa44('0x3f')](_0x3a24d9[_0xaa44('0x3d')],_0x3a24d9[_0xaa44('0x3a')]);_0x277f91['attributes']=_['intersection'](_0x3a24d9[_0xaa44('0x3d')],qs['fields'](_0x552e43[_0xaa44('0x3a')][_0xaa44('0x40')]));_0x277f91[_0xaa44('0x3e')]=_0x277f91[_0xaa44('0x3e')][_0xaa44('0x41')]?_0x277f91['attributes']:_0x3a24d9[_0xaa44('0x3d')];_0x277f91[_0xaa44('0x44')]=qs[_0xaa44('0x45')](_0x552e43['query']['sort']);_0x277f91[_0xaa44('0x46')]=qs[_0xaa44('0x3c')](_[_0xaa44('0x47')](_0x552e43['query'],_0x3a24d9['filters']));if(_0x552e43[_0xaa44('0x3a')][_0xaa44('0x48')]){_0x277f91[_0xaa44('0x46')]=_['merge'](_0x277f91['where'],{'$or':_[_0xaa44('0x36')](_0x277f91[_0xaa44('0x3e')],function(_0x39a2c8){var _0xa04fe1={};_0xa04fe1[_0x39a2c8]={'$like':'%'+_0x552e43[_0xaa44('0x3a')][_0xaa44('0x48')]+'%'};return _0xa04fe1;})});}_0x277f91=_[_0xaa44('0x49')]({},_0x277f91,_0x552e43[_0xaa44('0x4b')]);return _0x40ccd8[_0xaa44('0x59')](_0x277f91);}})[_0xaa44('0x1d')](function(_0x43409c){if(_0x43409c){_0x2fe920=_0x43409c['length'];if(!_0x552e43['query']['hasOwnProperty'](_0xaa44('0x43'))){_0x277f91[_0xaa44('0x2c')]=qs['limit'](_0x552e43['query']['limit']);_0x277f91[_0xaa44('0x2b')]=qs[_0xaa44('0x2b')](_0x552e43['query'][_0xaa44('0x2b')]);}return _0x40ccd8['getDescriptions'](_0x277f91);}})[_0xaa44('0x1d')](function(_0x8ba9a2){if(_0x8ba9a2){return _0x8ba9a2?{'count':_0x2fe920,'rows':_0x8ba9a2}:null;}})[_0xaa44('0x1d')](respondWithResult(_0x218865,null))[_0xaa44('0x4f')](handleError(_0x218865,null));};exports[_0xaa44('0x5a')]=function(_0x3cb06c,_0x11da0a,_0x23906f){var _0x17495a={};var _0x2476aa={};var _0x241cdb;var _0x1d1b0f;return db['DeskConfiguration'][_0xaa44('0x56')]({'where':{'id':_0x3cb06c[_0xaa44('0x51')]['id']}})[_0xaa44('0x1d')](handleEntityNotFound(_0x11da0a,null))['then'](function(_0x4a5b62){if(_0x4a5b62){_0x241cdb=_0x4a5b62;_0x2476aa['model']=_[_0xaa44('0x3b')](db[_0xaa44('0x5b')]['rawAttributes']);_0x2476aa['query']=_[_0xaa44('0x3b')](_0x3cb06c['query']);_0x2476aa[_0xaa44('0x3c')]=_[_0xaa44('0x3f')](_0x2476aa[_0xaa44('0x3d')],_0x2476aa[_0xaa44('0x3a')]);_0x17495a['attributes']=_[_0xaa44('0x3f')](_0x2476aa[_0xaa44('0x3d')],qs['fields'](_0x3cb06c[_0xaa44('0x3a')]['fields']));_0x17495a[_0xaa44('0x3e')]=_0x17495a[_0xaa44('0x3e')][_0xaa44('0x41')]?_0x17495a[_0xaa44('0x3e')]:_0x2476aa['model'];_0x17495a[_0xaa44('0x44')]=qs[_0xaa44('0x45')](_0x3cb06c['query'][_0xaa44('0x45')]);_0x17495a[_0xaa44('0x46')]=qs['filters'](_['pick'](_0x3cb06c[_0xaa44('0x3a')],_0x2476aa[_0xaa44('0x3c')]));if(_0x3cb06c[_0xaa44('0x3a')][_0xaa44('0x48')]){_0x17495a['where']=_[_0xaa44('0x49')](_0x17495a[_0xaa44('0x46')],{'$or':_[_0xaa44('0x36')](_0x17495a[_0xaa44('0x3e')],function(_0x1f1469){var _0x25271d={};_0x25271d[_0x1f1469]={'$like':'%'+_0x3cb06c[_0xaa44('0x3a')][_0xaa44('0x48')]+'%'};return _0x25271d;})});}_0x17495a=_[_0xaa44('0x49')]({},_0x17495a,_0x3cb06c['options']);return _0x241cdb[_0xaa44('0x5a')](_0x17495a);}})[_0xaa44('0x1d')](function(_0x47446){if(_0x47446){_0x1d1b0f=_0x47446[_0xaa44('0x41')];if(!_0x3cb06c[_0xaa44('0x3a')][_0xaa44('0x42')](_0xaa44('0x43'))){_0x17495a[_0xaa44('0x2c')]=qs[_0xaa44('0x2c')](_0x3cb06c[_0xaa44('0x3a')]['limit']);_0x17495a[_0xaa44('0x2b')]=qs[_0xaa44('0x2b')](_0x3cb06c['query']['offset']);}return _0x241cdb[_0xaa44('0x5a')](_0x17495a);}})[_0xaa44('0x1d')](function(_0x4b73f1){if(_0x4b73f1){return _0x4b73f1?{'count':_0x1d1b0f,'rows':_0x4b73f1}:null;}})['then'](respondWithResult(_0x11da0a,null))[_0xaa44('0x4f')](handleError(_0x11da0a,null));};exports[_0xaa44('0x5c')]=function(_0xf5e3e1,_0x1425d2,_0x263683){if(_0xf5e3e1[_0xaa44('0x54')]['id']){delete _0xf5e3e1['body']['id'];}return db[_0xaa44('0x37')][_0xaa44('0x56')]({'where':{'id':_0xf5e3e1['params']['id']}})['then'](handleEntityNotFound(_0x1425d2,null))[_0xaa44('0x1d')](function(_0x5041eb){if(_0x5041eb){return _0x5041eb[_0xaa44('0x5c')](_0xf5e3e1[_0xaa44('0x54')][_0xaa44('0x5d')]||[]);}return null;})['then'](respondWithResult(_0x1425d2,null))[_0xaa44('0x4f')](handleError(_0x1425d2,null));};
\ No newline at end of file
+var _0xc295=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','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','request\x20sent','debug','stringify','error','DeskConfiguration,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','destroy','name','send','index','map','DeskConfiguration','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','options','include','rows','show','params','includeAll','create','body','find','getFields','findOne','DeskField','rawAttributes','order','nolimit','getSubjects','getDescriptions','getTags','Tag','setTags','ids','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis'];(function(_0x4c4797,_0x172f9b){var _0x12a28d=function(_0x3aeb83){while(--_0x3aeb83){_0x4c4797['push'](_0x4c4797['shift']());}};_0x12a28d(++_0x172f9b);}(_0xc295,0x1cb));var _0x5c29=function(_0x5a5dd9,_0x246ba4){_0x5a5dd9=_0x5a5dd9-0x0;var _0x4e7d14=_0xc295[_0x5a5dd9];return _0x4e7d14;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x5c29('0x0'));var zipdir=require(_0x5c29('0x1'));var jsonpatch=require(_0x5c29('0x2'));var rp=require(_0x5c29('0x3'));var moment=require(_0x5c29('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x5c29('0x5'));var util=require(_0x5c29('0x6'));var path=require(_0x5c29('0x7'));var sox=require('sox');var csv=require(_0x5c29('0x8'));var ejs=require(_0x5c29('0x9'));var fs=require('fs');var _=require(_0x5c29('0xa'));var squel=require(_0x5c29('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5c29('0xc'));var toCsv=require(_0x5c29('0x8'));var querystring=require(_0x5c29('0xd'));var Papa=require(_0x5c29('0xe'));var Redis=require(_0x5c29('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x5c29('0x10'));var as=require(_0x5c29('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5c29('0x12'))(_0x5c29('0x13'));var utils=require(_0x5c29('0x14'));var config=require(_0x5c29('0x15'));var db=require(_0x5c29('0x16'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x5c29('0x17')][_0x5c29('0x18')]({'port':0x232a});function checkPasswordPattern(_0x460f51,_0x1137d7,_0x43e517){if(_0x43e517){var _0x31addd=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x31addd[_0x5c29('0x19')](_0x1137d7)){return _0x460f51;}else{throw new db['Sequelize']['ValidationError'](_0x5c29('0x1a'));}}else{return _0x460f51;}}function respondWithRpcPromise(_0x363b8a,_0x5aa860,_0x539782,_0x50b28c){return new BPromise(function(_0x1770ba,_0x463bf7){var _0x2c6bb2=_0x50b28c||client;return _0x2c6bb2[_0x5c29('0x1b')](_0x363b8a,_0x539782)[_0x5c29('0x1c')](function(_0x5ed75c){logger[_0x5c29('0x1d')]('DeskConfiguration,\x20%s,\x20%s',_0x5aa860,_0x5c29('0x1e'));logger[_0x5c29('0x1f')]('DeskConfiguration,\x20%s,\x20%s,\x20%s',_0x5aa860,'request\x20sent',JSON[_0x5c29('0x20')](_0x5ed75c));if(_0x5ed75c['error']){if(_0x5ed75c[_0x5c29('0x21')]['code']===0x1f4){logger[_0x5c29('0x21')](_0x5c29('0x22'),_0x5aa860,_0x5ed75c[_0x5c29('0x21')][_0x5c29('0x23')]);return _0x463bf7(_0x5ed75c[_0x5c29('0x21')][_0x5c29('0x23')]);}logger[_0x5c29('0x21')](_0x5c29('0x22'),_0x5aa860,_0x5ed75c[_0x5c29('0x21')][_0x5c29('0x23')]);return _0x1770ba(_0x5ed75c['error']['message']);}else{logger[_0x5c29('0x1d')](_0x5c29('0x22'),_0x5aa860,_0x5c29('0x1e'));_0x1770ba(_0x5ed75c[_0x5c29('0x24')][_0x5c29('0x23')]);}})[_0x5c29('0x25')](function(_0x4c8ea9){logger[_0x5c29('0x21')](_0x5c29('0x22'),_0x5aa860,_0x4c8ea9);_0x463bf7(_0x4c8ea9);});});}function respondWithStatusCode(_0x19d385,_0x3c1f8c){_0x3c1f8c=_0x3c1f8c||0xcc;return function(_0x3446a6){if(_0x3446a6){return _0x19d385[_0x5c29('0x26')](_0x3c1f8c);}return _0x19d385[_0x5c29('0x27')](_0x3c1f8c)[_0x5c29('0x28')]();};}function respondWithResult(_0x44fc0d,_0x761f73){_0x761f73=_0x761f73||0xc8;return function(_0x529e61){if(_0x529e61){return _0x44fc0d[_0x5c29('0x27')](_0x761f73)[_0x5c29('0x29')](_0x529e61);}};}function respondWithFilteredResult(_0x4c6148,_0xbd77){return function(_0x50a8a7){if(_0x50a8a7){var _0xf65275=_0x50a8a7[_0x5c29('0x2a')],_0x3326b4=_0xbd77['offset'],_0x22c473=_0xbd77[_0x5c29('0x2b')]+_0xbd77[_0x5c29('0x2c')],_0x2118cc;if(_0x22c473>=_0xf65275){_0x22c473=_0xf65275;_0x2118cc=0xc8;}else{_0x2118cc=0xce;}_0x4c6148['status'](_0x2118cc);return _0x4c6148[_0x5c29('0x2d')](_0x5c29('0x2e'),_0x3326b4+'-'+_0x22c473+'/'+_0xf65275)[_0x5c29('0x29')](_0x50a8a7);}return null;};}function patchUpdates(_0x1bd72e){return function(_0x2ec06b){try{jsonpatch[_0x5c29('0x2f')](_0x2ec06b,_0x1bd72e,!![]);}catch(_0x7bdda9){return BPromise[_0x5c29('0x30')](_0x7bdda9);}return _0x2ec06b['save']();};}function saveUpdates(_0x4d59c1,_0x51729d){return function(_0x4a6efe){if(_0x4a6efe){return _0x4a6efe[_0x5c29('0x31')](_0x4d59c1)[_0x5c29('0x1c')](function(_0x451a98){return _0x451a98;});}return null;};}function removeEntity(_0x3342af,_0x1a2fed){return function(_0x5acf79){if(_0x5acf79){return _0x5acf79[_0x5c29('0x32')]()['then'](function(){_0x3342af[_0x5c29('0x27')](0xcc)[_0x5c29('0x28')]();});}};}function handleEntityNotFound(_0x29794a,_0x36bed9){return function(_0x10ddf1){if(!_0x10ddf1){_0x29794a[_0x5c29('0x26')](0x194);}return _0x10ddf1;};}function handleError(_0x5e64d3,_0x4a4f9c){_0x4a4f9c=_0x4a4f9c||0x1f4;return function(_0x74415d){logger['error'](_0x74415d['stack']);if(_0x74415d['name']){delete _0x74415d[_0x5c29('0x33')];}_0x5e64d3[_0x5c29('0x27')](_0x4a4f9c)[_0x5c29('0x34')](_0x74415d);};}exports[_0x5c29('0x35')]=function(_0x10adcd,_0x246143){var _0xd09da1={},_0x3094bd={},_0x3f8f75={'count':0x0,'rows':[]};var _0x797cec=_[_0x5c29('0x36')](db[_0x5c29('0x37')]['rawAttributes'],function(_0x32ad44){return{'name':_0x32ad44[_0x5c29('0x38')],'type':_0x32ad44[_0x5c29('0x39')][_0x5c29('0x3a')]};});_0x3094bd['model']=_['map'](_0x797cec,_0x5c29('0x33'));_0x3094bd[_0x5c29('0x3b')]=_[_0x5c29('0x3c')](_0x10adcd[_0x5c29('0x3b')]);_0x3094bd[_0x5c29('0x3d')]=_[_0x5c29('0x3e')](_0x3094bd[_0x5c29('0x3f')],_0x3094bd[_0x5c29('0x3b')]);_0xd09da1[_0x5c29('0x40')]=_[_0x5c29('0x3e')](_0x3094bd[_0x5c29('0x3f')],qs[_0x5c29('0x41')](_0x10adcd[_0x5c29('0x3b')][_0x5c29('0x41')]));_0xd09da1[_0x5c29('0x40')]=_0xd09da1[_0x5c29('0x40')][_0x5c29('0x42')]?_0xd09da1[_0x5c29('0x40')]:_0x3094bd['model'];if(!_0x10adcd[_0x5c29('0x3b')][_0x5c29('0x43')]('nolimit')){_0xd09da1[_0x5c29('0x2c')]=qs[_0x5c29('0x2c')](_0x10adcd[_0x5c29('0x3b')][_0x5c29('0x2c')]);_0xd09da1['offset']=qs[_0x5c29('0x2b')](_0x10adcd[_0x5c29('0x3b')]['offset']);}_0xd09da1['order']=qs[_0x5c29('0x44')](_0x10adcd['query'][_0x5c29('0x44')]);_0xd09da1[_0x5c29('0x45')]=qs[_0x5c29('0x3d')](_[_0x5c29('0x46')](_0x10adcd['query'],_0x3094bd[_0x5c29('0x3d')]));if(_0x10adcd['query'][_0x5c29('0x47')]){_0xd09da1['where']=_[_0x5c29('0x48')](_0xd09da1['where'],{'$or':_[_0x5c29('0x36')](_0x797cec,function(_0x12f507){if(_0x12f507[_0x5c29('0x39')]!==_0x5c29('0x49')){var _0x2ff0c5={};_0x2ff0c5[_0x12f507[_0x5c29('0x33')]]={'$like':'%'+_0x10adcd['query'][_0x5c29('0x47')]+'%'};return _0x2ff0c5;}})});}_0xd09da1=_['merge']({},_0xd09da1,_0x10adcd[_0x5c29('0x4a')]);var _0x4c4423={'where':_0xd09da1['where']};return db['DeskConfiguration'][_0x5c29('0x2a')](_0x4c4423)['then'](function(_0x1b7e9){_0x3f8f75['count']=_0x1b7e9;if(_0x10adcd[_0x5c29('0x3b')]['includeAll']){_0xd09da1[_0x5c29('0x4b')]=[{'all':!![]}];}return db[_0x5c29('0x37')]['findAll'](_0xd09da1);})[_0x5c29('0x1c')](function(_0x58139a){_0x3f8f75[_0x5c29('0x4c')]=_0x58139a;return _0x3f8f75;})[_0x5c29('0x1c')](respondWithFilteredResult(_0x246143,_0xd09da1))['catch'](handleError(_0x246143,null));};exports[_0x5c29('0x4d')]=function(_0x5c26ed,_0x3eac95){var _0x15fdd5={'raw':![],'where':{'id':_0x5c26ed[_0x5c29('0x4e')]['id']}},_0x1f193f={};_0x1f193f[_0x5c29('0x3f')]=_[_0x5c29('0x3c')](db[_0x5c29('0x37')]['rawAttributes']);_0x1f193f[_0x5c29('0x3b')]=_[_0x5c29('0x3c')](_0x5c26ed[_0x5c29('0x3b')]);_0x1f193f[_0x5c29('0x3d')]=_[_0x5c29('0x3e')](_0x1f193f[_0x5c29('0x3f')],_0x1f193f[_0x5c29('0x3b')]);_0x15fdd5['attributes']=_[_0x5c29('0x3e')](_0x1f193f[_0x5c29('0x3f')],qs[_0x5c29('0x41')](_0x5c26ed[_0x5c29('0x3b')][_0x5c29('0x41')]));_0x15fdd5[_0x5c29('0x40')]=_0x15fdd5[_0x5c29('0x40')][_0x5c29('0x42')]?_0x15fdd5[_0x5c29('0x40')]:_0x1f193f['model'];if(_0x5c26ed['query'][_0x5c29('0x4f')]){_0x15fdd5[_0x5c29('0x4b')]=[{'all':!![]}];}_0x15fdd5=_[_0x5c29('0x48')]({},_0x15fdd5,_0x5c26ed['options']);return db['DeskConfiguration']['find'](_0x15fdd5)[_0x5c29('0x1c')](handleEntityNotFound(_0x3eac95,null))[_0x5c29('0x1c')](respondWithResult(_0x3eac95,null))[_0x5c29('0x25')](handleError(_0x3eac95,null));};exports[_0x5c29('0x50')]=function(_0x104c11,_0x83a5ce){return db['DeskConfiguration'][_0x5c29('0x50')](_0x104c11[_0x5c29('0x51')],{})[_0x5c29('0x1c')](respondWithResult(_0x83a5ce,0xc9))[_0x5c29('0x25')](handleError(_0x83a5ce,null));};exports[_0x5c29('0x31')]=function(_0x515d9f,_0x511953){if(_0x515d9f[_0x5c29('0x51')]['id']){delete _0x515d9f[_0x5c29('0x51')]['id'];}return db[_0x5c29('0x37')]['find']({'where':{'id':_0x515d9f[_0x5c29('0x4e')]['id']}})['then'](handleEntityNotFound(_0x511953,null))[_0x5c29('0x1c')](saveUpdates(_0x515d9f['body'],null))[_0x5c29('0x1c')](respondWithResult(_0x511953,null))[_0x5c29('0x25')](handleError(_0x511953,null));};exports[_0x5c29('0x32')]=function(_0x53bed2,_0x21c94b){return db[_0x5c29('0x37')][_0x5c29('0x52')]({'where':{'id':_0x53bed2[_0x5c29('0x4e')]['id']}})[_0x5c29('0x1c')](handleEntityNotFound(_0x21c94b,null))[_0x5c29('0x1c')](removeEntity(_0x21c94b,null))['catch'](handleError(_0x21c94b,null));};exports[_0x5c29('0x53')]=function(_0x2469e3,_0x5211dc,_0x33eee4){var _0x108c75={};var _0x4a962d={};var _0x708720;var _0x4b6488;return db[_0x5c29('0x37')][_0x5c29('0x54')]({'where':{'id':_0x2469e3[_0x5c29('0x4e')]['id']}})['then'](handleEntityNotFound(_0x5211dc,null))[_0x5c29('0x1c')](function(_0x9080e8){if(_0x9080e8){_0x708720=_0x9080e8;_0x4a962d['model']=_[_0x5c29('0x3c')](db[_0x5c29('0x55')][_0x5c29('0x56')]);_0x4a962d[_0x5c29('0x3b')]=_['keys'](_0x2469e3[_0x5c29('0x3b')]);_0x4a962d[_0x5c29('0x3d')]=_[_0x5c29('0x3e')](_0x4a962d[_0x5c29('0x3f')],_0x4a962d['query']);_0x108c75[_0x5c29('0x40')]=_[_0x5c29('0x3e')](_0x4a962d[_0x5c29('0x3f')],qs[_0x5c29('0x41')](_0x2469e3[_0x5c29('0x3b')]['fields']));_0x108c75[_0x5c29('0x40')]=_0x108c75['attributes'][_0x5c29('0x42')]?_0x108c75['attributes']:_0x4a962d[_0x5c29('0x3f')];_0x108c75[_0x5c29('0x57')]=qs[_0x5c29('0x44')](_0x2469e3[_0x5c29('0x3b')][_0x5c29('0x44')]);_0x108c75[_0x5c29('0x45')]=qs[_0x5c29('0x3d')](_[_0x5c29('0x46')](_0x2469e3[_0x5c29('0x3b')],_0x4a962d[_0x5c29('0x3d')]));if(_0x2469e3[_0x5c29('0x3b')][_0x5c29('0x47')]){_0x108c75['where']=_[_0x5c29('0x48')](_0x108c75[_0x5c29('0x45')],{'$or':_[_0x5c29('0x36')](_0x108c75['attributes'],function(_0x4e94f4){var _0x5dfa89={};_0x5dfa89[_0x4e94f4]={'$like':'%'+_0x2469e3['query'][_0x5c29('0x47')]+'%'};return _0x5dfa89;})});}_0x108c75=_[_0x5c29('0x48')]({},_0x108c75,_0x2469e3[_0x5c29('0x4a')]);return _0x708720['getFields'](_0x108c75);}})[_0x5c29('0x1c')](function(_0x2a379d){if(_0x2a379d){_0x4b6488=_0x2a379d[_0x5c29('0x42')];if(!_0x2469e3[_0x5c29('0x3b')][_0x5c29('0x43')](_0x5c29('0x58'))){_0x108c75[_0x5c29('0x2c')]=qs[_0x5c29('0x2c')](_0x2469e3[_0x5c29('0x3b')][_0x5c29('0x2c')]);_0x108c75[_0x5c29('0x2b')]=qs[_0x5c29('0x2b')](_0x2469e3[_0x5c29('0x3b')][_0x5c29('0x2b')]);}return _0x708720['getFields'](_0x108c75);}})[_0x5c29('0x1c')](function(_0x438ce1){if(_0x438ce1){return _0x438ce1?{'count':_0x4b6488,'rows':_0x438ce1}:null;}})[_0x5c29('0x1c')](respondWithResult(_0x5211dc,null))[_0x5c29('0x25')](handleError(_0x5211dc,null));};exports[_0x5c29('0x59')]=function(_0xa36c97,_0x229362,_0x27dd1a){var _0x227ac3={};var _0xe32d3={};var _0x186897;var _0x2ccd12;return db[_0x5c29('0x37')][_0x5c29('0x54')]({'where':{'id':_0xa36c97[_0x5c29('0x4e')]['id']}})[_0x5c29('0x1c')](handleEntityNotFound(_0x229362,null))[_0x5c29('0x1c')](function(_0x1d9e47){if(_0x1d9e47){_0x186897=_0x1d9e47;_0xe32d3[_0x5c29('0x3f')]=_[_0x5c29('0x3c')](db[_0x5c29('0x55')]['rawAttributes']);_0xe32d3[_0x5c29('0x3b')]=_['keys'](_0xa36c97['query']);_0xe32d3[_0x5c29('0x3d')]=_[_0x5c29('0x3e')](_0xe32d3['model'],_0xe32d3[_0x5c29('0x3b')]);_0x227ac3[_0x5c29('0x40')]=_[_0x5c29('0x3e')](_0xe32d3[_0x5c29('0x3f')],qs['fields'](_0xa36c97['query'][_0x5c29('0x41')]));_0x227ac3['attributes']=_0x227ac3[_0x5c29('0x40')][_0x5c29('0x42')]?_0x227ac3[_0x5c29('0x40')]:_0xe32d3['model'];_0x227ac3[_0x5c29('0x57')]=qs['sort'](_0xa36c97[_0x5c29('0x3b')][_0x5c29('0x44')]);_0x227ac3[_0x5c29('0x45')]=qs[_0x5c29('0x3d')](_[_0x5c29('0x46')](_0xa36c97[_0x5c29('0x3b')],_0xe32d3[_0x5c29('0x3d')]));if(_0xa36c97['query'][_0x5c29('0x47')]){_0x227ac3[_0x5c29('0x45')]=_['merge'](_0x227ac3[_0x5c29('0x45')],{'$or':_[_0x5c29('0x36')](_0x227ac3[_0x5c29('0x40')],function(_0x3ce357){var _0x25a662={};_0x25a662[_0x3ce357]={'$like':'%'+_0xa36c97[_0x5c29('0x3b')][_0x5c29('0x47')]+'%'};return _0x25a662;})});}_0x227ac3=_['merge']({},_0x227ac3,_0xa36c97[_0x5c29('0x4a')]);return _0x186897[_0x5c29('0x59')](_0x227ac3);}})[_0x5c29('0x1c')](function(_0x4132d3){if(_0x4132d3){_0x2ccd12=_0x4132d3[_0x5c29('0x42')];if(!_0xa36c97[_0x5c29('0x3b')][_0x5c29('0x43')](_0x5c29('0x58'))){_0x227ac3[_0x5c29('0x2c')]=qs['limit'](_0xa36c97[_0x5c29('0x3b')][_0x5c29('0x2c')]);_0x227ac3[_0x5c29('0x2b')]=qs[_0x5c29('0x2b')](_0xa36c97[_0x5c29('0x3b')]['offset']);}return _0x186897[_0x5c29('0x59')](_0x227ac3);}})[_0x5c29('0x1c')](function(_0x505204){if(_0x505204){return _0x505204?{'count':_0x2ccd12,'rows':_0x505204}:null;}})[_0x5c29('0x1c')](respondWithResult(_0x229362,null))[_0x5c29('0x25')](handleError(_0x229362,null));};exports[_0x5c29('0x5a')]=function(_0x2ef5c9,_0x139352,_0x1d2b4a){var _0x22cdcd={};var _0x2f9107={};var _0x258758;var _0x22515d;return db[_0x5c29('0x37')]['findOne']({'where':{'id':_0x2ef5c9[_0x5c29('0x4e')]['id']}})[_0x5c29('0x1c')](handleEntityNotFound(_0x139352,null))[_0x5c29('0x1c')](function(_0x4ab598){if(_0x4ab598){_0x258758=_0x4ab598;_0x2f9107[_0x5c29('0x3f')]=_['keys'](db[_0x5c29('0x55')]['rawAttributes']);_0x2f9107[_0x5c29('0x3b')]=_['keys'](_0x2ef5c9[_0x5c29('0x3b')]);_0x2f9107[_0x5c29('0x3d')]=_[_0x5c29('0x3e')](_0x2f9107[_0x5c29('0x3f')],_0x2f9107[_0x5c29('0x3b')]);_0x22cdcd[_0x5c29('0x40')]=_[_0x5c29('0x3e')](_0x2f9107['model'],qs['fields'](_0x2ef5c9[_0x5c29('0x3b')][_0x5c29('0x41')]));_0x22cdcd[_0x5c29('0x40')]=_0x22cdcd[_0x5c29('0x40')]['length']?_0x22cdcd[_0x5c29('0x40')]:_0x2f9107[_0x5c29('0x3f')];_0x22cdcd[_0x5c29('0x57')]=qs[_0x5c29('0x44')](_0x2ef5c9[_0x5c29('0x3b')][_0x5c29('0x44')]);_0x22cdcd[_0x5c29('0x45')]=qs[_0x5c29('0x3d')](_[_0x5c29('0x46')](_0x2ef5c9[_0x5c29('0x3b')],_0x2f9107[_0x5c29('0x3d')]));if(_0x2ef5c9[_0x5c29('0x3b')]['filter']){_0x22cdcd[_0x5c29('0x45')]=_[_0x5c29('0x48')](_0x22cdcd['where'],{'$or':_[_0x5c29('0x36')](_0x22cdcd[_0x5c29('0x40')],function(_0x131079){var _0x4a56d1={};_0x4a56d1[_0x131079]={'$like':'%'+_0x2ef5c9['query'][_0x5c29('0x47')]+'%'};return _0x4a56d1;})});}_0x22cdcd=_[_0x5c29('0x48')]({},_0x22cdcd,_0x2ef5c9[_0x5c29('0x4a')]);return _0x258758[_0x5c29('0x5a')](_0x22cdcd);}})['then'](function(_0x438955){if(_0x438955){_0x22515d=_0x438955[_0x5c29('0x42')];if(!_0x2ef5c9[_0x5c29('0x3b')]['hasOwnProperty']('nolimit')){_0x22cdcd[_0x5c29('0x2c')]=qs[_0x5c29('0x2c')](_0x2ef5c9[_0x5c29('0x3b')][_0x5c29('0x2c')]);_0x22cdcd[_0x5c29('0x2b')]=qs[_0x5c29('0x2b')](_0x2ef5c9['query']['offset']);}return _0x258758[_0x5c29('0x5a')](_0x22cdcd);}})[_0x5c29('0x1c')](function(_0x42c50d){if(_0x42c50d){return _0x42c50d?{'count':_0x22515d,'rows':_0x42c50d}:null;}})[_0x5c29('0x1c')](respondWithResult(_0x139352,null))[_0x5c29('0x25')](handleError(_0x139352,null));};exports[_0x5c29('0x5b')]=function(_0x21a3ab,_0x2ef47c,_0xd3ae5b){var _0xe2fe3d={};var _0x5123d1={};var _0x4710a7;var _0x516050;return db[_0x5c29('0x37')]['findOne']({'where':{'id':_0x21a3ab[_0x5c29('0x4e')]['id']}})['then'](handleEntityNotFound(_0x2ef47c,null))[_0x5c29('0x1c')](function(_0x7d6186){if(_0x7d6186){_0x4710a7=_0x7d6186;_0x5123d1[_0x5c29('0x3f')]=_[_0x5c29('0x3c')](db[_0x5c29('0x5c')][_0x5c29('0x56')]);_0x5123d1[_0x5c29('0x3b')]=_[_0x5c29('0x3c')](_0x21a3ab[_0x5c29('0x3b')]);_0x5123d1[_0x5c29('0x3d')]=_[_0x5c29('0x3e')](_0x5123d1[_0x5c29('0x3f')],_0x5123d1['query']);_0xe2fe3d['attributes']=_['intersection'](_0x5123d1[_0x5c29('0x3f')],qs[_0x5c29('0x41')](_0x21a3ab[_0x5c29('0x3b')][_0x5c29('0x41')]));_0xe2fe3d[_0x5c29('0x40')]=_0xe2fe3d['attributes'][_0x5c29('0x42')]?_0xe2fe3d[_0x5c29('0x40')]:_0x5123d1[_0x5c29('0x3f')];_0xe2fe3d[_0x5c29('0x57')]=qs[_0x5c29('0x44')](_0x21a3ab[_0x5c29('0x3b')]['sort']);_0xe2fe3d['where']=qs[_0x5c29('0x3d')](_[_0x5c29('0x46')](_0x21a3ab[_0x5c29('0x3b')],_0x5123d1[_0x5c29('0x3d')]));if(_0x21a3ab[_0x5c29('0x3b')][_0x5c29('0x47')]){_0xe2fe3d[_0x5c29('0x45')]=_[_0x5c29('0x48')](_0xe2fe3d[_0x5c29('0x45')],{'$or':_[_0x5c29('0x36')](_0xe2fe3d[_0x5c29('0x40')],function(_0x5e7090){var _0x4a197b={};_0x4a197b[_0x5e7090]={'$like':'%'+_0x21a3ab['query']['filter']+'%'};return _0x4a197b;})});}_0xe2fe3d=_[_0x5c29('0x48')]({},_0xe2fe3d,_0x21a3ab[_0x5c29('0x4a')]);return _0x4710a7[_0x5c29('0x5b')](_0xe2fe3d);}})[_0x5c29('0x1c')](function(_0x5ced80){if(_0x5ced80){_0x516050=_0x5ced80[_0x5c29('0x42')];if(!_0x21a3ab['query'][_0x5c29('0x43')](_0x5c29('0x58'))){_0xe2fe3d[_0x5c29('0x2c')]=qs[_0x5c29('0x2c')](_0x21a3ab['query'][_0x5c29('0x2c')]);_0xe2fe3d[_0x5c29('0x2b')]=qs[_0x5c29('0x2b')](_0x21a3ab[_0x5c29('0x3b')][_0x5c29('0x2b')]);}return _0x4710a7[_0x5c29('0x5b')](_0xe2fe3d);}})['then'](function(_0xa1ab34){if(_0xa1ab34){return _0xa1ab34?{'count':_0x516050,'rows':_0xa1ab34}:null;}})[_0x5c29('0x1c')](respondWithResult(_0x2ef47c,null))[_0x5c29('0x25')](handleError(_0x2ef47c,null));};exports[_0x5c29('0x5d')]=function(_0x4b7657,_0x668011,_0x21b657){if(_0x4b7657[_0x5c29('0x51')]['id']){delete _0x4b7657[_0x5c29('0x51')]['id'];}return db[_0x5c29('0x37')][_0x5c29('0x54')]({'where':{'id':_0x4b7657['params']['id']}})[_0x5c29('0x1c')](handleEntityNotFound(_0x668011,null))[_0x5c29('0x1c')](function(_0x5f55d2){if(_0x5f55d2){return _0x5f55d2['setTags'](_0x4b7657[_0x5c29('0x51')][_0x5c29('0x5e')]||[]);}return null;})[_0x5c29('0x1c')](respondWithResult(_0x668011,null))[_0x5c29('0x25')](handleError(_0x668011,null));};
\ No newline at end of file
diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.model.js b/server/api/intDeskConfiguration/intDeskConfiguration.model.js
index 8731559..e276b50 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 _0x40f6=['define','DeskConfiguration','int_desk_configurations','lodash','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0x2c88c3,_0x2709d2){var _0x454287=function(_0xdc7d67){while(--_0xdc7d67){_0x2c88c3['push'](_0x2c88c3['shift']());}};_0x454287(++_0x2709d2);}(_0x40f6,0x1c6));var _0x640f=function(_0x190b94,_0x1c01d7){_0x190b94=_0x190b94-0x0;var _0x439206=_0x40f6[_0x190b94];return _0x439206;};'use strict';var _=require(_0x640f('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x640f('0x1'));var BPromise=require(_0x640f('0x2'));var rp=require(_0x640f('0x3'));var fs=require('fs');var path=require(_0x640f('0x4'));var rimraf=require(_0x640f('0x5'));var config=require(_0x640f('0x6'));var attributes=require('./intDeskConfiguration.attributes');module[_0x640f('0x7')]=function(_0x29ba33,_0x12ce8c){return _0x29ba33[_0x640f('0x8')](_0x640f('0x9'),attributes,{'tableName':_0x640f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfd01=['util','../../config/logger','api','moment','bluebird','path','rimraf','./intDeskConfiguration.attributes','define','DeskConfiguration','int_desk_configurations','lodash'];(function(_0x47bc58,_0x1e1998){var _0x4a0860=function(_0x2a5b23){while(--_0x2a5b23){_0x47bc58['push'](_0x47bc58['shift']());}};_0x4a0860(++_0x1e1998);}(_0xfd01,0x1df));var _0x1fd0=function(_0x5c0d9f,_0x496051){_0x5c0d9f=_0x5c0d9f-0x0;var _0x32b430=_0xfd01[_0x5c0d9f];return _0x32b430;};'use strict';var _=require(_0x1fd0('0x0'));var util=require(_0x1fd0('0x1'));var logger=require(_0x1fd0('0x2'))(_0x1fd0('0x3'));var moment=require(_0x1fd0('0x4'));var BPromise=require(_0x1fd0('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1fd0('0x6'));var rimraf=require(_0x1fd0('0x7'));var config=require('../../config/environment');var attributes=require(_0x1fd0('0x8'));module['exports']=function(_0x49722e,_0x48f322){return _0x49722e[_0x1fd0('0x9')](_0x1fd0('0xa'),attributes,{'tableName':_0x1fd0('0xb'),'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 0ad7de6..fbaba5b 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 _0x99b7=['http','request','then','DeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','error','message','info','result','catch','lodash','moment','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x1c136e,_0x383c85){var _0x334243=function(_0x928fef){while(--_0x928fef){_0x1c136e['push'](_0x1c136e['shift']());}};_0x334243(++_0x383c85);}(_0x99b7,0x14e));var _0x799b=function(_0x1bc013,_0x7771c6){_0x1bc013=_0x1bc013-0x0;var _0x55df36=_0x99b7[_0x1bc013];return _0x55df36;};'use strict';var _=require(_0x799b('0x0'));var util=require('util');var moment=require(_0x799b('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x799b('0x2'))['db'];var utils=require(_0x799b('0x3'));var logger=require(_0x799b('0x4'))('rpc');var config=require(_0x799b('0x5'));var jayson=require(_0x799b('0x6'));var client=jayson[_0x799b('0x7')][_0x799b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xfd685a,_0x1316b3,_0x4b901a){return new BPromise(function(_0x418a70,_0x1b0b13){return client[_0x799b('0x9')](_0xfd685a,_0x4b901a)[_0x799b('0xa')](function(_0x291e49){logger['info'](_0x799b('0xb'),_0x1316b3,_0x799b('0xc'));logger[_0x799b('0xd')]('DeskConfiguration,\x20%s,\x20%s,\x20%s',_0x1316b3,_0x799b('0xc'),JSON['stringify'](_0x291e49));if(_0x291e49['error']){if(_0x291e49[_0x799b('0xe')]['code']===0x1f4){logger[_0x799b('0xe')]('DeskConfiguration,\x20%s,\x20%s',_0x1316b3,_0x291e49[_0x799b('0xe')]['message']);return _0x1b0b13(_0x291e49['error'][_0x799b('0xf')]);}logger[_0x799b('0xe')](_0x799b('0xb'),_0x1316b3,_0x291e49[_0x799b('0xe')][_0x799b('0xf')]);return _0x418a70(_0x291e49[_0x799b('0xe')]['message']);}else{logger[_0x799b('0x10')]('DeskConfiguration,\x20%s,\x20%s',_0x1316b3,_0x799b('0xc'));_0x418a70(_0x291e49[_0x799b('0x11')]['message']);}})[_0x799b('0x12')](function(_0x19fab8){logger['error'](_0x799b('0xb'),_0x1316b3,_0x19fab8);_0x1b0b13(_0x19fab8);});});}
\ No newline at end of file
+var _0xe13a=['code','message','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','DeskConfiguration,\x20%s,\x20%s','request\x20sent','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0xda4fd6,_0x16d39e){var _0x27bd93=function(_0x3de8cc){while(--_0x3de8cc){_0xda4fd6['push'](_0xda4fd6['shift']());}};_0x27bd93(++_0x16d39e);}(_0xe13a,0x178));var _0xae13=function(_0x45f888,_0x22b1a0){_0x45f888=_0x45f888-0x0;var _0x5638e8=_0xe13a[_0x45f888];return _0x5638e8;};'use strict';var _=require('lodash');var util=require(_0xae13('0x0'));var moment=require(_0xae13('0x1'));var BPromise=require(_0xae13('0x2'));var rs=require(_0xae13('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xae13('0x4'))['db'];var utils=require(_0xae13('0x5'));var logger=require(_0xae13('0x6'))(_0xae13('0x7'));var config=require(_0xae13('0x8'));var jayson=require(_0xae13('0x9'));var client=jayson[_0xae13('0xa')][_0xae13('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x341ba4,_0x4ae51f,_0x2f6d10){return new BPromise(function(_0x2b2e1f,_0x27fefd){return client[_0xae13('0xc')](_0x341ba4,_0x2f6d10)[_0xae13('0xd')](function(_0x41bf44){logger[_0xae13('0xe')](_0xae13('0xf'),_0x4ae51f,_0xae13('0x10'));logger['debug'](_0xae13('0x11'),_0x4ae51f,_0xae13('0x10'),JSON[_0xae13('0x12')](_0x41bf44));if(_0x41bf44[_0xae13('0x13')]){if(_0x41bf44[_0xae13('0x13')][_0xae13('0x14')]===0x1f4){logger[_0xae13('0x13')]('DeskConfiguration,\x20%s,\x20%s',_0x4ae51f,_0x41bf44[_0xae13('0x13')][_0xae13('0x15')]);return _0x27fefd(_0x41bf44['error']['message']);}logger['error']('DeskConfiguration,\x20%s,\x20%s',_0x4ae51f,_0x41bf44['error'][_0xae13('0x15')]);return _0x2b2e1f(_0x41bf44[_0xae13('0x13')][_0xae13('0x15')]);}else{logger[_0xae13('0xe')](_0xae13('0xf'),_0x4ae51f,_0xae13('0x10'));_0x2b2e1f(_0x41bf44['result'][_0xae13('0x15')]);}})['catch'](function(_0xe10aab){logger[_0xae13('0x13')](_0xae13('0xf'),_0x4ae51f,_0xe10aab);_0x27fefd(_0xe10aab);});});}
\ No newline at end of file
diff --git a/server/api/intDeskField/index.js b/server/api/intDeskField/index.js
index 4f84ac0..6578e1e 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 _0x2e8d=['connect-timeout','express','Router','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','create','put','update','delete','destroy','exports','multer','util','path'];(function(_0x3959b5,_0x374ca4){var _0x147d99=function(_0x5bcddc){while(--_0x5bcddc){_0x3959b5['push'](_0x3959b5['shift']());}};_0x147d99(++_0x374ca4);}(_0x2e8d,0x162));var _0xd2e8=function(_0x59cdd0,_0x56af37){_0x59cdd0=_0x59cdd0-0x0;var _0x41bf3d=_0x2e8d[_0x59cdd0];return _0x41bf3d;};'use strict';var multer=require(_0xd2e8('0x0'));var util=require(_0xd2e8('0x1'));var path=require(_0xd2e8('0x2'));var timeout=require(_0xd2e8('0x3'));var express=require(_0xd2e8('0x4'));var router=express[_0xd2e8('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xd2e8('0x6'));var config=require(_0xd2e8('0x7'));var controller=require('./intDeskField.controller');router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0xd2e8('0x8')](_0xd2e8('0x9'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0xd2e8('0xa')](),controller[_0xd2e8('0xb')]);router[_0xd2e8('0xc')](_0xd2e8('0x9'),auth[_0xd2e8('0xa')](),controller[_0xd2e8('0xd')]);router[_0xd2e8('0xe')](_0xd2e8('0x9'),auth['isAuthenticated'](),controller[_0xd2e8('0xf')]);module[_0xd2e8('0x10')]=router;
\ No newline at end of file
+var _0x89d9=['exports','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id','show','post','create','put','update','delete'];(function(_0x4eafed,_0x26e2bc){var _0x159c85=function(_0x6f129f){while(--_0x6f129f){_0x4eafed['push'](_0x4eafed['shift']());}};_0x159c85(++_0x26e2bc);}(_0x89d9,0x1cc));var _0x989d=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x89d9[_0x126558];return _0x1f6d14;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x989d('0x0'));var timeout=require(_0x989d('0x1'));var express=require('express');var router=express[_0x989d('0x2')]();var auth=require(_0x989d('0x3'));var interaction=require(_0x989d('0x4'));var config=require(_0x989d('0x5'));var controller=require('./intDeskField.controller');router['get']('/',auth[_0x989d('0x6')](),controller[_0x989d('0x7')]);router[_0x989d('0x8')](_0x989d('0x9'),auth[_0x989d('0x6')](),controller[_0x989d('0xa')]);router[_0x989d('0xb')]('/',auth[_0x989d('0x6')](),controller[_0x989d('0xc')]);router[_0x989d('0xd')](_0x989d('0x9'),auth[_0x989d('0x6')](),controller[_0x989d('0xe')]);router[_0x989d('0xf')](_0x989d('0x9'),auth[_0x989d('0x6')](),controller['destroy']);module[_0x989d('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 15dee8f..007c4c0 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 _0x9849=['STRING','sequelize','exports','ENUM','string','variable','customVariable'];(function(_0x3ce282,_0xd2ecd8){var _0x528254=function(_0x1357b2){while(--_0x1357b2){_0x3ce282['push'](_0x3ce282['shift']());}};_0x528254(++_0xd2ecd8);}(_0x9849,0x15f));var _0x9984=function(_0x186376,_0x5d988a){_0x186376=_0x186376-0x0;var _0x2dbdd9=_0x9849[_0x186376];return _0x2dbdd9;};'use strict';var Sequelize=require(_0x9984('0x0'));module[_0x9984('0x1')]={'type':{'type':Sequelize[_0x9984('0x2')](_0x9984('0x3'),_0x9984('0x4'),_0x9984('0x5'),'keyValue'),'defaultValue':_0x9984('0x3')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x9984('0x6')]},'keyType':{'type':Sequelize[_0x9984('0x2')](_0x9984('0x3'),_0x9984('0x4'),'customVariable')},'keyContent':{'type':Sequelize[_0x9984('0x6')]},'idField':{'type':Sequelize[_0x9984('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x9984('0x6')]}};
\ No newline at end of file
+var _0xa009=['customVariable','keyValue','STRING','sequelize','exports','ENUM','string','variable'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0xa009,0x1a3));var _0x9a00=function(_0x2c8036,_0x34fc75){_0x2c8036=_0x2c8036-0x0;var _0x45b90f=_0xa009[_0x2c8036];return _0x45b90f;};'use strict';var Sequelize=require(_0x9a00('0x0'));module[_0x9a00('0x1')]={'type':{'type':Sequelize[_0x9a00('0x2')](_0x9a00('0x3'),_0x9a00('0x4'),_0x9a00('0x5'),_0x9a00('0x6')),'defaultValue':_0x9a00('0x3')},'content':{'type':Sequelize[_0x9a00('0x7')]},'key':{'type':Sequelize[_0x9a00('0x7')]},'keyType':{'type':Sequelize[_0x9a00('0x2')](_0x9a00('0x3'),_0x9a00('0x4'),'customVariable')},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x9a00('0x7')]},'nameField':{'type':Sequelize[_0x9a00('0x7')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x9a00('0x7')]}};
\ No newline at end of file
diff --git a/server/api/intDeskField/intDeskField.controller.js b/server/api/intDeskField/intDeskField.controller.js
index 88b41d4..f0e82d3 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 _0xf3cd=['destroy','error','stack','name','send','rawAttributes','fieldName','type','model','map','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','where','pick','filter','merge','VIRTUAL','includeAll','include','DeskField','findAll','rows','catch','params','find','create','body','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','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','then'];(function(_0x36380f,_0xe1fcc4){var _0x553aa6=function(_0x48df17){while(--_0x48df17){_0x36380f['push'](_0x36380f['shift']());}};_0x553aa6(++_0xe1fcc4);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x2bb3f6,_0x25fde0){_0x2bb3f6=_0x2bb3f6-0x0;var _0x62b339=_0xf3cd[_0x2bb3f6];return _0x62b339;};'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 as=require(_0xdf3c('0x13'));var hardwareService=require(_0xdf3c('0x14'));var logger=require(_0xdf3c('0x15'))(_0xdf3c('0x16'));var utils=require(_0xdf3c('0x17'));var config=require(_0xdf3c('0x18'));var db=require(_0xdf3c('0x19'))['db'];function respondWithStatusCode(_0x5e8925,_0x1d483c){_0x1d483c=_0x1d483c||0xcc;return function(_0x166ae5){if(_0x166ae5){return _0x5e8925[_0xdf3c('0x1a')](_0x1d483c);}return _0x5e8925[_0xdf3c('0x1b')](_0x1d483c)['end']();};}function respondWithResult(_0x2ae4ad,_0x461079){_0x461079=_0x461079||0xc8;return function(_0x13ea5f){if(_0x13ea5f){return _0x2ae4ad['status'](_0x461079)[_0xdf3c('0x1c')](_0x13ea5f);}};}function respondWithFilteredResult(_0x38b01d,_0x173041){return function(_0x4274fd){if(_0x4274fd){var _0x21e587=_0x4274fd[_0xdf3c('0x1d')],_0x1a7a5a=_0x173041[_0xdf3c('0x1e')],_0x305ea5=_0x173041['offset']+_0x173041[_0xdf3c('0x1f')],_0x92008b;if(_0x305ea5>=_0x21e587){_0x305ea5=_0x21e587;_0x92008b=0xc8;}else{_0x92008b=0xce;}_0x38b01d[_0xdf3c('0x1b')](_0x92008b);return _0x38b01d[_0xdf3c('0x20')](_0xdf3c('0x21'),_0x1a7a5a+'-'+_0x305ea5+'/'+_0x21e587)[_0xdf3c('0x1c')](_0x4274fd);}return null;};}function patchUpdates(_0x113b56){return function(_0x16b02b){try{jsonpatch[_0xdf3c('0x22')](_0x16b02b,_0x113b56,!![]);}catch(_0x426f3a){return BPromise[_0xdf3c('0x23')](_0x426f3a);}return _0x16b02b[_0xdf3c('0x24')]();};}function saveUpdates(_0x3d14cc,_0x25487c){return function(_0x5d2390){if(_0x5d2390){return _0x5d2390['update'](_0x3d14cc)[_0xdf3c('0x25')](function(_0x583ce4){return _0x583ce4;});}return null;};}function removeEntity(_0x15776c,_0x40e7ec){return function(_0x36552e){if(_0x36552e){return _0x36552e[_0xdf3c('0x26')]()[_0xdf3c('0x25')](function(){_0x15776c[_0xdf3c('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x22a164,_0x213d75){return function(_0x13e3ca){if(!_0x13e3ca){_0x22a164[_0xdf3c('0x1a')](0x194);}return _0x13e3ca;};}function handleError(_0x40032a,_0x3b5371){_0x3b5371=_0x3b5371||0x1f4;return function(_0xef54cb){logger[_0xdf3c('0x27')](_0xef54cb[_0xdf3c('0x28')]);if(_0xef54cb[_0xdf3c('0x29')]){delete _0xef54cb['name'];}_0x40032a[_0xdf3c('0x1b')](_0x3b5371)[_0xdf3c('0x2a')](_0xef54cb);};}exports['index']=function(_0xdc8962,_0x59659e){var _0x4eaced={},_0x508be9={},_0x14aac9={'count':0x0,'rows':[]};var _0x186bba=_['map'](db['DeskField'][_0xdf3c('0x2b')],function(_0x1f2ce4){return{'name':_0x1f2ce4[_0xdf3c('0x2c')],'type':_0x1f2ce4[_0xdf3c('0x2d')]['key']};});_0x508be9[_0xdf3c('0x2e')]=_[_0xdf3c('0x2f')](_0x186bba,'name');_0x508be9['query']=_[_0xdf3c('0x30')](_0xdc8962[_0xdf3c('0x31')]);_0x508be9[_0xdf3c('0x32')]=_['intersection'](_0x508be9[_0xdf3c('0x2e')],_0x508be9[_0xdf3c('0x31')]);_0x4eaced[_0xdf3c('0x33')]=_[_0xdf3c('0x34')](_0x508be9['model'],qs[_0xdf3c('0x35')](_0xdc8962[_0xdf3c('0x31')]['fields']));_0x4eaced[_0xdf3c('0x33')]=_0x4eaced[_0xdf3c('0x33')][_0xdf3c('0x36')]?_0x4eaced[_0xdf3c('0x33')]:_0x508be9['model'];if(!_0xdc8962[_0xdf3c('0x31')][_0xdf3c('0x37')](_0xdf3c('0x38'))){_0x4eaced[_0xdf3c('0x1f')]=qs['limit'](_0xdc8962[_0xdf3c('0x31')][_0xdf3c('0x1f')]);_0x4eaced['offset']=qs['offset'](_0xdc8962[_0xdf3c('0x31')]['offset']);}_0x4eaced[_0xdf3c('0x39')]=qs['sort'](_0xdc8962['query']['sort']);_0x4eaced[_0xdf3c('0x3a')]=qs[_0xdf3c('0x32')](_[_0xdf3c('0x3b')](_0xdc8962[_0xdf3c('0x31')],_0x508be9['filters']));if(_0xdc8962['query'][_0xdf3c('0x3c')]){_0x4eaced['where']=_[_0xdf3c('0x3d')](_0x4eaced[_0xdf3c('0x3a')],{'$or':_[_0xdf3c('0x2f')](_0x186bba,function(_0xcdd731){if(_0xcdd731[_0xdf3c('0x2d')]!==_0xdf3c('0x3e')){var _0x1c7335={};_0x1c7335[_0xcdd731[_0xdf3c('0x29')]]={'$like':'%'+_0xdc8962[_0xdf3c('0x31')]['filter']+'%'};return _0x1c7335;}})});}_0x4eaced=_[_0xdf3c('0x3d')]({},_0x4eaced,_0xdc8962['options']);var _0x5c1471={'where':_0x4eaced[_0xdf3c('0x3a')]};return db['DeskField'][_0xdf3c('0x1d')](_0x5c1471)['then'](function(_0x2a94c3){_0x14aac9[_0xdf3c('0x1d')]=_0x2a94c3;if(_0xdc8962[_0xdf3c('0x31')][_0xdf3c('0x3f')]){_0x4eaced[_0xdf3c('0x40')]=[{'all':!![]}];}return db[_0xdf3c('0x41')][_0xdf3c('0x42')](_0x4eaced);})[_0xdf3c('0x25')](function(_0x3cf131){_0x14aac9[_0xdf3c('0x43')]=_0x3cf131;return _0x14aac9;})[_0xdf3c('0x25')](respondWithFilteredResult(_0x59659e,_0x4eaced))[_0xdf3c('0x44')](handleError(_0x59659e,null));};exports['show']=function(_0x5be92d,_0x169ba6){var _0x5752e6={'raw':!![],'where':{'id':_0x5be92d[_0xdf3c('0x45')]['id']}},_0x3a6527={};_0x3a6527[_0xdf3c('0x2e')]=_[_0xdf3c('0x30')](db['DeskField']['rawAttributes']);_0x3a6527[_0xdf3c('0x31')]=_[_0xdf3c('0x30')](_0x5be92d[_0xdf3c('0x31')]);_0x3a6527['filters']=_[_0xdf3c('0x34')](_0x3a6527[_0xdf3c('0x2e')],_0x3a6527[_0xdf3c('0x31')]);_0x5752e6[_0xdf3c('0x33')]=_['intersection'](_0x3a6527[_0xdf3c('0x2e')],qs[_0xdf3c('0x35')](_0x5be92d[_0xdf3c('0x31')][_0xdf3c('0x35')]));_0x5752e6[_0xdf3c('0x33')]=_0x5752e6['attributes'][_0xdf3c('0x36')]?_0x5752e6[_0xdf3c('0x33')]:_0x3a6527[_0xdf3c('0x2e')];if(_0x5be92d[_0xdf3c('0x31')][_0xdf3c('0x3f')]){_0x5752e6[_0xdf3c('0x40')]=[{'all':!![]}];}_0x5752e6=_['merge']({},_0x5752e6,_0x5be92d['options']);return db[_0xdf3c('0x41')][_0xdf3c('0x46')](_0x5752e6)['then'](handleEntityNotFound(_0x169ba6,null))['then'](respondWithResult(_0x169ba6,null))[_0xdf3c('0x44')](handleError(_0x169ba6,null));};exports[_0xdf3c('0x47')]=function(_0x46b2bd,_0x2aeb29){return db[_0xdf3c('0x41')][_0xdf3c('0x47')](_0x46b2bd[_0xdf3c('0x48')],{})[_0xdf3c('0x25')](respondWithResult(_0x2aeb29,0xc9))[_0xdf3c('0x44')](handleError(_0x2aeb29,null));};exports['update']=function(_0x129c2a,_0x2cfdb2){if(_0x129c2a[_0xdf3c('0x48')]['id']){delete _0x129c2a[_0xdf3c('0x48')]['id'];}return db[_0xdf3c('0x41')][_0xdf3c('0x46')]({'where':{'id':_0x129c2a[_0xdf3c('0x45')]['id']}})['then'](handleEntityNotFound(_0x2cfdb2,null))[_0xdf3c('0x25')](saveUpdates(_0x129c2a['body'],null))[_0xdf3c('0x25')](respondWithResult(_0x2cfdb2,null))['catch'](handleError(_0x2cfdb2,null));};exports[_0xdf3c('0x26')]=function(_0x28144f,_0x2ec575){return db[_0xdf3c('0x41')]['find']({'where':{'id':_0x28144f['params']['id']}})['then'](handleEntityNotFound(_0x2ec575,null))[_0xdf3c('0x25')](removeEntity(_0x2ec575,null))['catch'](handleError(_0x2ec575,null));};
\ No newline at end of file
+var _0xd2bb=['body','find','params','destroy','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','then','error','stack','name','map','rawAttributes','fieldName','type','key','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filters','filter','merge','VIRTUAL','DeskField','count','includeAll','findAll','rows','show','keys','include','options','create','catch'];(function(_0x52a9f9,_0x1d6c5d){var _0x7f7693=function(_0x498696){while(--_0x498696){_0x52a9f9['push'](_0x52a9f9['shift']());}};_0x7f7693(++_0x1d6c5d);}(_0xd2bb,0x9a));var _0xbd2b=function(_0x3fac61,_0x39d769){_0x3fac61=_0x3fac61-0x0;var _0x17943=_0xd2bb[_0x3fac61];return _0x17943;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xbd2b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xbd2b('0x1'));var jsonpatch=require(_0xbd2b('0x2'));var rp=require(_0xbd2b('0x3'));var moment=require(_0xbd2b('0x4'));var BPromise=require(_0xbd2b('0x5'));var Mustache=require(_0xbd2b('0x6'));var util=require('util');var path=require(_0xbd2b('0x7'));var sox=require(_0xbd2b('0x8'));var csv=require(_0xbd2b('0x9'));var ejs=require(_0xbd2b('0xa'));var fs=require('fs');var _=require(_0xbd2b('0xb'));var squel=require(_0xbd2b('0xc'));var crypto=require(_0xbd2b('0xd'));var jsforce=require(_0xbd2b('0xe'));var deskjs=require(_0xbd2b('0xf'));var toCsv=require(_0xbd2b('0x9'));var querystring=require('querystring');var Papa=require(_0xbd2b('0x10'));var Redis=require('ioredis');var authService=require(_0xbd2b('0x11'));var qs=require(_0xbd2b('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbd2b('0x13'));var logger=require(_0xbd2b('0x14'))(_0xbd2b('0x15'));var utils=require(_0xbd2b('0x16'));var config=require(_0xbd2b('0x17'));var db=require(_0xbd2b('0x18'))['db'];function respondWithStatusCode(_0x1077b0,_0x275b60){_0x275b60=_0x275b60||0xcc;return function(_0x5722a4){if(_0x5722a4){return _0x1077b0[_0xbd2b('0x19')](_0x275b60);}return _0x1077b0[_0xbd2b('0x1a')](_0x275b60)[_0xbd2b('0x1b')]();};}function respondWithResult(_0x36916c,_0x29f3d1){_0x29f3d1=_0x29f3d1||0xc8;return function(_0x5f246b){if(_0x5f246b){return _0x36916c[_0xbd2b('0x1a')](_0x29f3d1)[_0xbd2b('0x1c')](_0x5f246b);}};}function respondWithFilteredResult(_0x1bc648,_0x1018dc){return function(_0x1815b3){if(_0x1815b3){var _0x2d8352=_0x1815b3['count'],_0x29c6a6=_0x1018dc[_0xbd2b('0x1d')],_0x190648=_0x1018dc[_0xbd2b('0x1d')]+_0x1018dc[_0xbd2b('0x1e')],_0x80463f;if(_0x190648>=_0x2d8352){_0x190648=_0x2d8352;_0x80463f=0xc8;}else{_0x80463f=0xce;}_0x1bc648[_0xbd2b('0x1a')](_0x80463f);return _0x1bc648[_0xbd2b('0x1f')](_0xbd2b('0x20'),_0x29c6a6+'-'+_0x190648+'/'+_0x2d8352)[_0xbd2b('0x1c')](_0x1815b3);}return null;};}function patchUpdates(_0xe4eaa6){return function(_0x21468b){try{jsonpatch[_0xbd2b('0x21')](_0x21468b,_0xe4eaa6,!![]);}catch(_0x5183c1){return BPromise[_0xbd2b('0x22')](_0x5183c1);}return _0x21468b[_0xbd2b('0x23')]();};}function saveUpdates(_0x2b6af4,_0x12d252){return function(_0xc1ce31){if(_0xc1ce31){return _0xc1ce31[_0xbd2b('0x24')](_0x2b6af4)[_0xbd2b('0x25')](function(_0x4cccdd){return _0x4cccdd;});}return null;};}function removeEntity(_0x5e4c99,_0x4a3588){return function(_0x2fb14b){if(_0x2fb14b){return _0x2fb14b['destroy']()[_0xbd2b('0x25')](function(){_0x5e4c99[_0xbd2b('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5b6b31,_0x1a2b3d){return function(_0x1e3609){if(!_0x1e3609){_0x5b6b31['sendStatus'](0x194);}return _0x1e3609;};}function handleError(_0x534583,_0x584fbd){_0x584fbd=_0x584fbd||0x1f4;return function(_0xbeeef9){logger[_0xbd2b('0x26')](_0xbeeef9[_0xbd2b('0x27')]);if(_0xbeeef9[_0xbd2b('0x28')]){delete _0xbeeef9[_0xbd2b('0x28')];}_0x534583[_0xbd2b('0x1a')](_0x584fbd)['send'](_0xbeeef9);};}exports['index']=function(_0x5f5643,_0x3925ab){var _0x51b3d5={},_0x3516bd={},_0x3e4b8c={'count':0x0,'rows':[]};var _0x44a1ef=_[_0xbd2b('0x29')](db['DeskField'][_0xbd2b('0x2a')],function(_0x5cb9a0){return{'name':_0x5cb9a0[_0xbd2b('0x2b')],'type':_0x5cb9a0[_0xbd2b('0x2c')][_0xbd2b('0x2d')]};});_0x3516bd[_0xbd2b('0x2e')]=_[_0xbd2b('0x29')](_0x44a1ef,_0xbd2b('0x28'));_0x3516bd[_0xbd2b('0x2f')]=_['keys'](_0x5f5643[_0xbd2b('0x2f')]);_0x3516bd['filters']=_[_0xbd2b('0x30')](_0x3516bd[_0xbd2b('0x2e')],_0x3516bd['query']);_0x51b3d5['attributes']=_[_0xbd2b('0x30')](_0x3516bd[_0xbd2b('0x2e')],qs[_0xbd2b('0x31')](_0x5f5643[_0xbd2b('0x2f')][_0xbd2b('0x31')]));_0x51b3d5['attributes']=_0x51b3d5[_0xbd2b('0x32')][_0xbd2b('0x33')]?_0x51b3d5[_0xbd2b('0x32')]:_0x3516bd[_0xbd2b('0x2e')];if(!_0x5f5643[_0xbd2b('0x2f')][_0xbd2b('0x34')](_0xbd2b('0x35'))){_0x51b3d5['limit']=qs[_0xbd2b('0x1e')](_0x5f5643['query']['limit']);_0x51b3d5[_0xbd2b('0x1d')]=qs[_0xbd2b('0x1d')](_0x5f5643[_0xbd2b('0x2f')]['offset']);}_0x51b3d5['order']=qs[_0xbd2b('0x36')](_0x5f5643[_0xbd2b('0x2f')][_0xbd2b('0x36')]);_0x51b3d5[_0xbd2b('0x37')]=qs[_0xbd2b('0x38')](_['pick'](_0x5f5643[_0xbd2b('0x2f')],_0x3516bd[_0xbd2b('0x38')]));if(_0x5f5643['query'][_0xbd2b('0x39')]){_0x51b3d5['where']=_[_0xbd2b('0x3a')](_0x51b3d5[_0xbd2b('0x37')],{'$or':_[_0xbd2b('0x29')](_0x44a1ef,function(_0x2eeafa){if(_0x2eeafa['type']!==_0xbd2b('0x3b')){var _0x2cbe0e={};_0x2cbe0e[_0x2eeafa[_0xbd2b('0x28')]]={'$like':'%'+_0x5f5643[_0xbd2b('0x2f')]['filter']+'%'};return _0x2cbe0e;}})});}_0x51b3d5=_[_0xbd2b('0x3a')]({},_0x51b3d5,_0x5f5643['options']);var _0x3ea722={'where':_0x51b3d5[_0xbd2b('0x37')]};return db[_0xbd2b('0x3c')][_0xbd2b('0x3d')](_0x3ea722)[_0xbd2b('0x25')](function(_0x534741){_0x3e4b8c[_0xbd2b('0x3d')]=_0x534741;if(_0x5f5643[_0xbd2b('0x2f')][_0xbd2b('0x3e')]){_0x51b3d5['include']=[{'all':!![]}];}return db[_0xbd2b('0x3c')][_0xbd2b('0x3f')](_0x51b3d5);})[_0xbd2b('0x25')](function(_0x40df8b){_0x3e4b8c[_0xbd2b('0x40')]=_0x40df8b;return _0x3e4b8c;})[_0xbd2b('0x25')](respondWithFilteredResult(_0x3925ab,_0x51b3d5))['catch'](handleError(_0x3925ab,null));};exports[_0xbd2b('0x41')]=function(_0x27ca58,_0x3f1ae4){var _0x4bcdee={'raw':!![],'where':{'id':_0x27ca58['params']['id']}},_0x57c275={};_0x57c275[_0xbd2b('0x2e')]=_[_0xbd2b('0x42')](db[_0xbd2b('0x3c')][_0xbd2b('0x2a')]);_0x57c275[_0xbd2b('0x2f')]=_['keys'](_0x27ca58[_0xbd2b('0x2f')]);_0x57c275['filters']=_[_0xbd2b('0x30')](_0x57c275['model'],_0x57c275[_0xbd2b('0x2f')]);_0x4bcdee[_0xbd2b('0x32')]=_[_0xbd2b('0x30')](_0x57c275['model'],qs['fields'](_0x27ca58[_0xbd2b('0x2f')]['fields']));_0x4bcdee[_0xbd2b('0x32')]=_0x4bcdee[_0xbd2b('0x32')][_0xbd2b('0x33')]?_0x4bcdee[_0xbd2b('0x32')]:_0x57c275[_0xbd2b('0x2e')];if(_0x27ca58[_0xbd2b('0x2f')][_0xbd2b('0x3e')]){_0x4bcdee[_0xbd2b('0x43')]=[{'all':!![]}];}_0x4bcdee=_['merge']({},_0x4bcdee,_0x27ca58[_0xbd2b('0x44')]);return db['DeskField']['find'](_0x4bcdee)['then'](handleEntityNotFound(_0x3f1ae4,null))[_0xbd2b('0x25')](respondWithResult(_0x3f1ae4,null))['catch'](handleError(_0x3f1ae4,null));};exports[_0xbd2b('0x45')]=function(_0x45e791,_0x1074ef){return db['DeskField'][_0xbd2b('0x45')](_0x45e791['body'],{})[_0xbd2b('0x25')](respondWithResult(_0x1074ef,0xc9))[_0xbd2b('0x46')](handleError(_0x1074ef,null));};exports[_0xbd2b('0x24')]=function(_0x2dae90,_0x3194af){if(_0x2dae90[_0xbd2b('0x47')]['id']){delete _0x2dae90['body']['id'];}return db[_0xbd2b('0x3c')][_0xbd2b('0x48')]({'where':{'id':_0x2dae90[_0xbd2b('0x49')]['id']}})[_0xbd2b('0x25')](handleEntityNotFound(_0x3194af,null))[_0xbd2b('0x25')](saveUpdates(_0x2dae90[_0xbd2b('0x47')],null))[_0xbd2b('0x25')](respondWithResult(_0x3194af,null))['catch'](handleError(_0x3194af,null));};exports[_0xbd2b('0x4a')]=function(_0x4d639d,_0x3d254d){return db[_0xbd2b('0x3c')][_0xbd2b('0x48')]({'where':{'id':_0x4d639d[_0xbd2b('0x49')]['id']}})[_0xbd2b('0x25')](handleEntityNotFound(_0x3d254d,null))[_0xbd2b('0x25')](removeEntity(_0x3d254d,null))[_0xbd2b('0x46')](handleError(_0x3d254d,null));};
\ No newline at end of file
diff --git a/server/api/intDeskField/intDeskField.model.js b/server/api/intDeskField/intDeskField.model.js
index 6f13e31..a4ded4b 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 _0x9534=['idField','FieldId','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','DeskField','int_desk_fields'];(function(_0x2f612f,_0xe7bf7b){var _0x565b1b=function(_0x2bbaf2){while(--_0x2bbaf2){_0x2f612f['push'](_0x2f612f['shift']());}};_0x565b1b(++_0xe7bf7b);}(_0x9534,0x101));var _0x4953=function(_0x473caa,_0x204176){_0x473caa=_0x473caa-0x0;var _0x370266=_0x9534[_0x473caa];return _0x370266;};'use strict';var _=require(_0x4953('0x0'));var util=require(_0x4953('0x1'));var logger=require(_0x4953('0x2'))(_0x4953('0x3'));var moment=require(_0x4953('0x4'));var BPromise=require(_0x4953('0x5'));var rp=require(_0x4953('0x6'));var fs=require('fs');var path=require(_0x4953('0x7'));var rimraf=require(_0x4953('0x8'));var config=require('../../config/environment');var attributes=require('./intDeskField.attributes');module[_0x4953('0x9')]=function(_0x18a874,_0x56b7cf){return _0x18a874[_0x4953('0xa')](_0x4953('0xb'),attributes,{'tableName':_0x4953('0xc'),'paranoid':![],'indexes':[{'name':'desk_unique_index','fields':[_0x4953('0xd'),_0x4953('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xf19d=['define','int_desk_fields','desk_unique_index','idField','FieldId','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./intDeskField.attributes','exports'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xf19d,0x115));var _0xdf19=function(_0x2b5eae,_0x55010d){_0x2b5eae=_0x2b5eae-0x0;var _0x5f3ac9=_0xf19d[_0x2b5eae];return _0x5f3ac9;};'use strict';var _=require(_0xdf19('0x0'));var util=require(_0xdf19('0x1'));var logger=require(_0xdf19('0x2'))(_0xdf19('0x3'));var moment=require(_0xdf19('0x4'));var BPromise=require(_0xdf19('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdf19('0x6'));var rimraf=require(_0xdf19('0x7'));var config=require(_0xdf19('0x8'));var attributes=require(_0xdf19('0x9'));module[_0xdf19('0xa')]=function(_0x2e7171,_0x4ea69){return _0x2e7171[_0xdf19('0xb')]('DeskField',attributes,{'tableName':_0xdf19('0xc'),'paranoid':![],'indexes':[{'name':_0xdf19('0xd'),'fields':[_0xdf19('0xe'),_0xdf19('0xf')],'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 b24d054..aa8b710 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 _0x0ff5=['info','DeskField,\x20%s,\x20%s','debug','stringify','code','error','message','request\x20sent','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x2d2d5c,_0x4bc2c9){var _0x17e6b6=function(_0x3232d9){while(--_0x3232d9){_0x2d2d5c['push'](_0x2d2d5c['shift']());}};_0x17e6b6(++_0x4bc2c9);}(_0x0ff5,0x13d));var _0x50ff=function(_0x3b0042,_0x8e7550){_0x3b0042=_0x3b0042-0x0;var _0x41bf57=_0x0ff5[_0x3b0042];return _0x41bf57;};'use strict';var _=require(_0x50ff('0x0'));var util=require(_0x50ff('0x1'));var moment=require(_0x50ff('0x2'));var BPromise=require(_0x50ff('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x50ff('0x4'));var db=require(_0x50ff('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x50ff('0x6'))(_0x50ff('0x7'));var config=require(_0x50ff('0x8'));var jayson=require(_0x50ff('0x9'));var client=jayson[_0x50ff('0xa')][_0x50ff('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2668f9,_0x571108,_0xbcf787){return new BPromise(function(_0x2ca742,_0x36ab55){return client[_0x50ff('0xc')](_0x2668f9,_0xbcf787)['then'](function(_0x968883){logger[_0x50ff('0xd')](_0x50ff('0xe'),_0x571108,'request\x20sent');logger[_0x50ff('0xf')]('DeskField,\x20%s,\x20%s,\x20%s',_0x571108,'request\x20sent',JSON[_0x50ff('0x10')](_0x968883));if(_0x968883['error']){if(_0x968883['error'][_0x50ff('0x11')]===0x1f4){logger[_0x50ff('0x12')](_0x50ff('0xe'),_0x571108,_0x968883[_0x50ff('0x12')][_0x50ff('0x13')]);return _0x36ab55(_0x968883[_0x50ff('0x12')]['message']);}logger['error'](_0x50ff('0xe'),_0x571108,_0x968883[_0x50ff('0x12')][_0x50ff('0x13')]);return _0x2ca742(_0x968883['error'][_0x50ff('0x13')]);}else{logger[_0x50ff('0xd')](_0x50ff('0xe'),_0x571108,_0x50ff('0x14'));_0x2ca742(_0x968883['result'][_0x50ff('0x13')]);}})[_0x50ff('0x15')](function(_0x5c3e36){logger[_0x50ff('0x12')]('DeskField,\x20%s,\x20%s',_0x571108,_0x5c3e36);_0x36ab55(_0x5c3e36);});});}
\ No newline at end of file
+var _0xb178=['bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','then','info','DeskField,\x20%s,\x20%s','DeskField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','lodash','moment'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xb178,0xcf));var _0x8b17=function(_0x18bee8,_0x15e890){_0x18bee8=_0x18bee8-0x0;var _0x4301a9=_0xb178[_0x18bee8];return _0x4301a9;};'use strict';var _=require(_0x8b17('0x0'));var util=require('util');var moment=require(_0x8b17('0x1'));var BPromise=require(_0x8b17('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8b17('0x3'))['db'];var utils=require(_0x8b17('0x4'));var logger=require(_0x8b17('0x5'))(_0x8b17('0x6'));var config=require('../../config/environment');var jayson=require(_0x8b17('0x7'));var client=jayson['client'][_0x8b17('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xe8f13b,_0x5d4de9,_0x4b29ee){return new BPromise(function(_0x274563,_0x247bd2){return client[_0x8b17('0x9')](_0xe8f13b,_0x4b29ee)[_0x8b17('0xa')](function(_0x2ac369){logger[_0x8b17('0xb')](_0x8b17('0xc'),_0x5d4de9,'request\x20sent');logger['debug'](_0x8b17('0xd'),_0x5d4de9,_0x8b17('0xe'),JSON[_0x8b17('0xf')](_0x2ac369));if(_0x2ac369[_0x8b17('0x10')]){if(_0x2ac369[_0x8b17('0x10')]['code']===0x1f4){logger[_0x8b17('0x10')]('DeskField,\x20%s,\x20%s',_0x5d4de9,_0x2ac369['error'][_0x8b17('0x11')]);return _0x247bd2(_0x2ac369[_0x8b17('0x10')][_0x8b17('0x11')]);}logger[_0x8b17('0x10')](_0x8b17('0xc'),_0x5d4de9,_0x2ac369[_0x8b17('0x10')]['message']);return _0x274563(_0x2ac369[_0x8b17('0x10')]['message']);}else{logger[_0x8b17('0xb')](_0x8b17('0xc'),_0x5d4de9,'request\x20sent');_0x274563(_0x2ac369['result']['message']);}})[_0x8b17('0x12')](function(_0x422199){logger[_0x8b17('0x10')](_0x8b17('0xc'),_0x5d4de9,_0x422199);_0x247bd2(_0x422199);});});}
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/index.js b/server/api/intDynamics365Account/index.js
index 48b0d40..7a3d871 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 _0xec5b=['/:id','update','delete','destroy','multer','util','path','connect-timeout','../../components/interaction/service','../../config/environment','./intDynamics365Account.controller','get','isAuthenticated','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put'];(function(_0x4d3016,_0x3351a0){var _0x20057c=function(_0x782a81){while(--_0x782a81){_0x4d3016['push'](_0x4d3016['shift']());}};_0x20057c(++_0x3351a0);}(_0xec5b,0xac));var _0xbec5=function(_0x3f5f6d,_0xa339d5){_0x3f5f6d=_0x3f5f6d-0x0;var _0x290d0e=_0xec5b[_0x3f5f6d];return _0x290d0e;};'use strict';var multer=require(_0xbec5('0x0'));var util=require(_0xbec5('0x1'));var path=require(_0xbec5('0x2'));var timeout=require(_0xbec5('0x3'));var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xbec5('0x4'));var config=require(_0xbec5('0x5'));var controller=require(_0xbec5('0x6'));router[_0xbec5('0x7')]('/',auth[_0xbec5('0x8')](),controller['index']);router[_0xbec5('0x7')]('/:id',auth[_0xbec5('0x8')](),controller['show']);router[_0xbec5('0x7')](_0xbec5('0x9'),auth[_0xbec5('0x8')](),controller[_0xbec5('0xa')]);router[_0xbec5('0x7')](_0xbec5('0xb'),auth[_0xbec5('0x8')](),controller[_0xbec5('0xc')]);router[_0xbec5('0xd')]('/',auth[_0xbec5('0x8')](),controller[_0xbec5('0xe')]);router[_0xbec5('0xd')](_0xbec5('0x9'),auth[_0xbec5('0x8')](),controller[_0xbec5('0xf')]);router[_0xbec5('0x10')](_0xbec5('0x11'),auth[_0xbec5('0x8')](),controller[_0xbec5('0x12')]);router[_0xbec5('0x13')](_0xbec5('0x11'),auth[_0xbec5('0x8')](),controller[_0xbec5('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xdfb7=['/:id/configurations','getConfigurations','/:id/fields','create','post','addConfiguration','put','update','delete','destroy','util','path','connect-timeout','express','Router','../../config/environment','./intDynamics365Account.controller','get','isAuthenticated','index','/:id','show'];(function(_0x51a6d6,_0x3c9c49){var _0x5ef1a8=function(_0x8ff84a){while(--_0x8ff84a){_0x51a6d6['push'](_0x51a6d6['shift']());}};_0x5ef1a8(++_0x3c9c49);}(_0xdfb7,0x180));var _0x7dfb=function(_0x2866ae,_0x904928){_0x2866ae=_0x2866ae-0x0;var _0x3d9027=_0xdfb7[_0x2866ae];return _0x3d9027;};'use strict';var multer=require('multer');var util=require(_0x7dfb('0x0'));var path=require(_0x7dfb('0x1'));var timeout=require(_0x7dfb('0x2'));var express=require(_0x7dfb('0x3'));var router=express[_0x7dfb('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7dfb('0x5'));var controller=require(_0x7dfb('0x6'));router[_0x7dfb('0x7')]('/',auth[_0x7dfb('0x8')](),controller[_0x7dfb('0x9')]);router[_0x7dfb('0x7')](_0x7dfb('0xa'),auth[_0x7dfb('0x8')](),controller[_0x7dfb('0xb')]);router[_0x7dfb('0x7')](_0x7dfb('0xc'),auth[_0x7dfb('0x8')](),controller[_0x7dfb('0xd')]);router[_0x7dfb('0x7')](_0x7dfb('0xe'),auth[_0x7dfb('0x8')](),controller['getFields']);router['post']('/',auth[_0x7dfb('0x8')](),controller[_0x7dfb('0xf')]);router[_0x7dfb('0x10')](_0x7dfb('0xc'),auth[_0x7dfb('0x8')](),controller[_0x7dfb('0x11')]);router[_0x7dfb('0x12')](_0x7dfb('0xa'),auth[_0x7dfb('0x8')](),controller[_0x7dfb('0x13')]);router[_0x7dfb('0x14')]('/:id',auth[_0x7dfb('0x8')](),controller[_0x7dfb('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/intDynamics365Account.attributes.js b/server/api/intDynamics365Account/intDynamics365Account.attributes.js
index d9096ed..943cca5 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 _0x47fd=['STRING','sequelize','exports'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x47fd,0x11e));var _0xd47f=function(_0x133277,_0xb1d6b2){_0x133277=_0x133277-0x0;var _0x5b4a22=_0x47fd[_0x133277];return _0x5b4a22;};'use strict';var Sequelize=require(_0xd47f('0x0'));module[_0xd47f('0x1')]={'name':{'type':Sequelize[_0xd47f('0x2')]},'username':{'type':Sequelize[_0xd47f('0x2')]},'password':{'type':Sequelize[_0xd47f('0x2')]},'remoteUri':{'type':Sequelize[_0xd47f('0x2')]},'tenantId':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize[_0xd47f('0x2')]},'clientSecret':{'type':Sequelize[_0xd47f('0x2')]},'serverUrl':{'type':Sequelize[_0xd47f('0x2')]},'description':{'type':Sequelize[_0xd47f('0x2')]}};
\ No newline at end of file
+var _0x206b=['STRING','sequelize','exports'];(function(_0x140920,_0x5464db){var _0x436ed0=function(_0x56b784){while(--_0x56b784){_0x140920['push'](_0x140920['shift']());}};_0x436ed0(++_0x5464db);}(_0x206b,0x1c6));var _0xb206=function(_0x1476fb,_0x467d01){_0x1476fb=_0x1476fb-0x0;var _0x44f57e=_0x206b[_0x1476fb];return _0x44f57e;};'use strict';var Sequelize=require(_0xb206('0x0'));module[_0xb206('0x1')]={'name':{'type':Sequelize[_0xb206('0x2')]},'username':{'type':Sequelize[_0xb206('0x2')]},'password':{'type':Sequelize[_0xb206('0x2')]},'remoteUri':{'type':Sequelize[_0xb206('0x2')]},'tenantId':{'type':Sequelize[_0xb206('0x2')]},'clientId':{'type':Sequelize[_0xb206('0x2')]},'clientSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/intDynamics365Account.controller.js b/server/api/intDynamics365Account/intDynamics365Account.controller.js
index 7cf2b1c..75280e1 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 _0xf165=['modifiedon','modifiedonbehalfbyname','modifiedonbehalfbyyominame','msdyn_incidenttypename','onholdtime','overriddencreatedon','owneridname','owneridtype','owneridyominame','primarycontactidname','primarycontactidyominame','productidname','productserialnumber','responseby','responsiblecontactidname','sentimentvalue','slaname','socialprofileidname','statecode','ticketnumber','timezoneruleversionnumber','transactioncurrencyidname','traversedpath','utcconversiontimezonecode','versionnumber','concat','username','password','tenantId','clientId','clientSecret','slice','substring','lastIndexOf','format','%s/api/data/v9.0/','POST','https://login.microsoftonline.com/','access_token','GET','Bearer\x20','4.0','EntityDefinitions(',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Attributes','remove','includes','LogicalName','forEach','@odata.type','MetadataId','all','isNil','BooleanAttributeMetadata','push','StringAttributeMetadata','DoubleAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','DateTimeAttributeMetadata','StatusAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','test','Wrong\x20credentials',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','OptionSet','Options','Label','Value','UserLocalizedLabel',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','true','FalseOption','DisplayName',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','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','../../components/integrations/configuration','jayson/promise','client','Sequelize','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','Dynamics365Account,\x20%s,\x20%s','request\x20sent','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','message','result','sendStatus','json','offset','limit','status','set','Content-Range','apply','reject','destroy','end','stack','name','send','map','Dynamics365Account','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','order','sort','pick','filter','merge','VIRTUAL','options','where','count','includeAll','findAll','rows','catch','show','include','find','create','update','body','params','getConfigurations','findOne','Dynamics365Configuration','Subjects','getSubjects','Descriptions','channel','Dynamics365Field','getFields','Incident','PhoneCall','title','ownerid','caseorigincode','subject','phonenumber','regardingobjectid','accountidyominame','billedserviceunits','contractdetailidname','contractidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdbyyominame','createdon','customeridname','customeridtype','entityimage_timestamp','entityimage_url','exchangerate','followupby','importsequencenumber','influencescore','kbarticleidname','lastonholdtime','masteridname','modifiedbyexternalpartyname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedbyyominame'];(function(_0x4884a7,_0x18e38a){var _0x56b60e=function(_0x2ba8a3){while(--_0x2ba8a3){_0x4884a7['push'](_0x4884a7['shift']());}};_0x56b60e(++_0x18e38a);}(_0xf165,0x11e));var _0x5f16=function(_0x42cb3b,_0x1c9368){_0x42cb3b=_0x42cb3b-0x0;var _0x49f07b=_0xf165[_0x42cb3b];return _0x49f07b;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x5f16('0x0'));var zipdir=require(_0x5f16('0x1'));var jsonpatch=require(_0x5f16('0x2'));var rp=require(_0x5f16('0x3'));var moment=require(_0x5f16('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x5f16('0x5'));var util=require('util');var path=require(_0x5f16('0x6'));var sox=require(_0x5f16('0x7'));var csv=require(_0x5f16('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x5f16('0x9'));var squel=require(_0x5f16('0xa'));var crypto=require(_0x5f16('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x5f16('0xc'));var toCsv=require('to-csv');var querystring=require(_0x5f16('0xd'));var Papa=require(_0x5f16('0xe'));var Redis=require(_0x5f16('0xf'));var authService=require(_0x5f16('0x10'));var qs=require(_0x5f16('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5f16('0x12'));var logger=require(_0x5f16('0x13'))(_0x5f16('0x14'));var utils=require(_0x5f16('0x15'));var config=require(_0x5f16('0x16'));var db=require(_0x5f16('0x17'))['db'];var integrations=require(_0x5f16('0x18'));var jayson=require(_0x5f16('0x19'));var client=jayson[_0x5f16('0x1a')]['http']({'port':0x232a});function checkPasswordPattern(_0x5ac8a7,_0xe0241,_0x291d20){if(_0x291d20){var _0x1dae99=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1dae99['test'](_0xe0241)){return _0x5ac8a7;}else{throw new db[(_0x5f16('0x1b'))]['ValidationError'](_0x5f16('0x1c'));}}else{return _0x5ac8a7;}}function respondWithRpcPromise(_0x301466,_0x2e1692,_0x27a937,_0x3939f8){return new BPromise(function(_0x527a0f,_0x159d9c){var _0x324610=_0x3939f8||client;return _0x324610['request'](_0x301466,_0x27a937)[_0x5f16('0x1d')](function(_0x2c26f6){logger[_0x5f16('0x1e')](_0x5f16('0x1f'),_0x2e1692,_0x5f16('0x20'));logger['debug'](_0x5f16('0x21'),_0x2e1692,_0x5f16('0x20'),JSON[_0x5f16('0x22')](_0x2c26f6));if(_0x2c26f6[_0x5f16('0x23')]){if(_0x2c26f6[_0x5f16('0x23')]['code']===0x1f4){logger[_0x5f16('0x23')](_0x5f16('0x1f'),_0x2e1692,_0x2c26f6[_0x5f16('0x23')]['message']);return _0x159d9c(_0x2c26f6[_0x5f16('0x23')][_0x5f16('0x24')]);}logger['error'](_0x5f16('0x1f'),_0x2e1692,_0x2c26f6[_0x5f16('0x23')][_0x5f16('0x24')]);return _0x527a0f(_0x2c26f6[_0x5f16('0x23')][_0x5f16('0x24')]);}else{logger[_0x5f16('0x1e')](_0x5f16('0x1f'),_0x2e1692,_0x5f16('0x20'));_0x527a0f(_0x2c26f6[_0x5f16('0x25')][_0x5f16('0x24')]);}})['catch'](function(_0x12b16c){logger[_0x5f16('0x23')](_0x5f16('0x1f'),_0x2e1692,_0x12b16c);_0x159d9c(_0x12b16c);});});}function respondWithStatusCode(_0x50f517,_0x2c866b){_0x2c866b=_0x2c866b||0xcc;return function(_0x5aed0d){if(_0x5aed0d){return _0x50f517[_0x5f16('0x26')](_0x2c866b);}return _0x50f517['status'](_0x2c866b)['end']();};}function respondWithResult(_0x26ec2c,_0x4f4d80){_0x4f4d80=_0x4f4d80||0xc8;return function(_0x5593d9){if(_0x5593d9){return _0x26ec2c['status'](_0x4f4d80)[_0x5f16('0x27')](_0x5593d9);}};}function respondWithFilteredResult(_0x3bd562,_0x5cd32f){return function(_0x5a59e1){if(_0x5a59e1){var _0x5bca79=_0x5a59e1['count'],_0x5082a4=_0x5cd32f[_0x5f16('0x28')],_0x2e47cb=_0x5cd32f[_0x5f16('0x28')]+_0x5cd32f[_0x5f16('0x29')],_0x431597;if(_0x2e47cb>=_0x5bca79){_0x2e47cb=_0x5bca79;_0x431597=0xc8;}else{_0x431597=0xce;}_0x3bd562[_0x5f16('0x2a')](_0x431597);return _0x3bd562[_0x5f16('0x2b')](_0x5f16('0x2c'),_0x5082a4+'-'+_0x2e47cb+'/'+_0x5bca79)[_0x5f16('0x27')](_0x5a59e1);}return null;};}function patchUpdates(_0x56d91c){return function(_0x51390a){try{jsonpatch[_0x5f16('0x2d')](_0x51390a,_0x56d91c,!![]);}catch(_0x5e3c6c){return BPromise[_0x5f16('0x2e')](_0x5e3c6c);}return _0x51390a['save']();};}function saveUpdates(_0x1fdebd,_0x3952b4){return function(_0x5fd9f3){if(_0x5fd9f3){return _0x5fd9f3['update'](_0x1fdebd)[_0x5f16('0x1d')](function(_0x5c9a1e){return _0x5c9a1e;});}return null;};}function removeEntity(_0x7aaff5,_0x1e36b2){return function(_0x43099f){if(_0x43099f){return _0x43099f[_0x5f16('0x2f')]()[_0x5f16('0x1d')](function(){_0x7aaff5[_0x5f16('0x2a')](0xcc)[_0x5f16('0x30')]();});}};}function handleEntityNotFound(_0x70e188,_0x1ef33b){return function(_0xfd90bf){if(!_0xfd90bf){_0x70e188['sendStatus'](0x194);}return _0xfd90bf;};}function handleError(_0x5f5450,_0x321fc1){_0x321fc1=_0x321fc1||0x1f4;return function(_0x3ad9ce){logger[_0x5f16('0x23')](_0x3ad9ce[_0x5f16('0x31')]);if(_0x3ad9ce[_0x5f16('0x32')]){delete _0x3ad9ce[_0x5f16('0x32')];}_0x5f5450[_0x5f16('0x2a')](_0x321fc1)[_0x5f16('0x33')](_0x3ad9ce);};}exports['index']=function(_0xebb7,_0x230a10){var _0x121fe3={},_0x1bf46f={},_0x468c8d={'count':0x0,'rows':[]};var _0x459140=_[_0x5f16('0x34')](db[_0x5f16('0x35')][_0x5f16('0x36')],function(_0x458153){return{'name':_0x458153['fieldName'],'type':_0x458153[_0x5f16('0x37')][_0x5f16('0x38')]};});_0x1bf46f[_0x5f16('0x39')]=_[_0x5f16('0x34')](_0x459140,'name');_0x1bf46f[_0x5f16('0x3a')]=_[_0x5f16('0x3b')](_0xebb7['query']);_0x1bf46f[_0x5f16('0x3c')]=_[_0x5f16('0x3d')](_0x1bf46f[_0x5f16('0x39')],_0x1bf46f[_0x5f16('0x3a')]);_0x121fe3['attributes']=_['intersection'](_0x1bf46f[_0x5f16('0x39')],qs[_0x5f16('0x3e')](_0xebb7[_0x5f16('0x3a')][_0x5f16('0x3e')]));_0x121fe3[_0x5f16('0x3f')]=_0x121fe3[_0x5f16('0x3f')][_0x5f16('0x40')]?_0x121fe3[_0x5f16('0x3f')]:_0x1bf46f[_0x5f16('0x39')];if(!_0xebb7[_0x5f16('0x3a')]['hasOwnProperty']('nolimit')){_0x121fe3[_0x5f16('0x29')]=qs[_0x5f16('0x29')](_0xebb7[_0x5f16('0x3a')][_0x5f16('0x29')]);_0x121fe3[_0x5f16('0x28')]=qs[_0x5f16('0x28')](_0xebb7[_0x5f16('0x3a')][_0x5f16('0x28')]);}_0x121fe3[_0x5f16('0x41')]=qs[_0x5f16('0x42')](_0xebb7[_0x5f16('0x3a')]['sort']);_0x121fe3['where']=qs['filters'](_[_0x5f16('0x43')](_0xebb7[_0x5f16('0x3a')],_0x1bf46f[_0x5f16('0x3c')]));if(_0xebb7[_0x5f16('0x3a')][_0x5f16('0x44')]){_0x121fe3['where']=_[_0x5f16('0x45')](_0x121fe3['where'],{'$or':_[_0x5f16('0x34')](_0x459140,function(_0xcb1438){if(_0xcb1438['type']!==_0x5f16('0x46')){var _0xc14d59={};_0xc14d59[_0xcb1438[_0x5f16('0x32')]]={'$like':'%'+_0xebb7[_0x5f16('0x3a')]['filter']+'%'};return _0xc14d59;}})});}_0x121fe3=_[_0x5f16('0x45')]({},_0x121fe3,_0xebb7[_0x5f16('0x47')]);var _0x100df2={'where':_0x121fe3[_0x5f16('0x48')]};return db[_0x5f16('0x35')][_0x5f16('0x49')](_0x100df2)[_0x5f16('0x1d')](function(_0x2d5d98){_0x468c8d[_0x5f16('0x49')]=_0x2d5d98;if(_0xebb7[_0x5f16('0x3a')][_0x5f16('0x4a')]){_0x121fe3['include']=[{'all':!![]}];}return db['Dynamics365Account'][_0x5f16('0x4b')](_0x121fe3);})[_0x5f16('0x1d')](function(_0x1c4d5f){_0x468c8d[_0x5f16('0x4c')]=_0x1c4d5f;return _0x468c8d;})[_0x5f16('0x1d')](respondWithFilteredResult(_0x230a10,_0x121fe3))[_0x5f16('0x4d')](handleError(_0x230a10,null));};exports[_0x5f16('0x4e')]=function(_0x222461,_0x3887e5){var _0x2d86f5={'raw':![],'where':{'id':_0x222461['params']['id']}},_0x5744cf={};_0x5744cf[_0x5f16('0x39')]=_[_0x5f16('0x3b')](db['Dynamics365Account']['rawAttributes']);_0x5744cf['query']=_['keys'](_0x222461[_0x5f16('0x3a')]);_0x5744cf[_0x5f16('0x3c')]=_[_0x5f16('0x3d')](_0x5744cf[_0x5f16('0x39')],_0x5744cf[_0x5f16('0x3a')]);_0x2d86f5[_0x5f16('0x3f')]=_[_0x5f16('0x3d')](_0x5744cf['model'],qs[_0x5f16('0x3e')](_0x222461[_0x5f16('0x3a')][_0x5f16('0x3e')]));_0x2d86f5['attributes']=_0x2d86f5[_0x5f16('0x3f')][_0x5f16('0x40')]?_0x2d86f5[_0x5f16('0x3f')]:_0x5744cf['model'];if(_0x222461['query'][_0x5f16('0x4a')]){_0x2d86f5[_0x5f16('0x4f')]=[{'all':!![]}];}_0x2d86f5=_[_0x5f16('0x45')]({},_0x2d86f5,_0x222461[_0x5f16('0x47')]);return db[_0x5f16('0x35')][_0x5f16('0x50')](_0x2d86f5)['then'](handleEntityNotFound(_0x3887e5,null))[_0x5f16('0x1d')](respondWithResult(_0x3887e5,null))[_0x5f16('0x4d')](handleError(_0x3887e5,null));};exports[_0x5f16('0x51')]=function(_0xf4ae28,_0x1a62e6){return db[_0x5f16('0x35')][_0x5f16('0x51')](_0xf4ae28['body'],{})['then'](respondWithResult(_0x1a62e6,0xc9))[_0x5f16('0x4d')](handleError(_0x1a62e6,null));};exports[_0x5f16('0x52')]=function(_0x1f56ca,_0x255f36){if(_0x1f56ca[_0x5f16('0x53')]['id']){delete _0x1f56ca[_0x5f16('0x53')]['id'];}return db[_0x5f16('0x35')][_0x5f16('0x50')]({'where':{'id':_0x1f56ca[_0x5f16('0x54')]['id']}})[_0x5f16('0x1d')](handleEntityNotFound(_0x255f36,null))[_0x5f16('0x1d')](saveUpdates(_0x1f56ca[_0x5f16('0x53')],null))[_0x5f16('0x1d')](respondWithResult(_0x255f36,null))['catch'](handleError(_0x255f36,null));};exports[_0x5f16('0x2f')]=function(_0x4b2dc6,_0x211289){return db[_0x5f16('0x35')][_0x5f16('0x50')]({'where':{'id':_0x4b2dc6[_0x5f16('0x54')]['id']}})[_0x5f16('0x1d')](handleEntityNotFound(_0x211289,null))[_0x5f16('0x1d')](removeEntity(_0x211289,null))[_0x5f16('0x4d')](handleError(_0x211289,null));};exports[_0x5f16('0x55')]=function(_0x493d8a,_0x4f53a9,_0x5b3417){var _0x2f0594={};var _0x45bf6c={};var _0x51a365;var _0x56550d;return db[_0x5f16('0x35')][_0x5f16('0x56')]({'where':{'id':_0x493d8a[_0x5f16('0x54')]['id']}})[_0x5f16('0x1d')](handleEntityNotFound(_0x4f53a9,null))[_0x5f16('0x1d')](function(_0x1939e4){if(_0x1939e4){_0x51a365=_0x1939e4;_0x45bf6c[_0x5f16('0x39')]=_[_0x5f16('0x3b')](db[_0x5f16('0x57')][_0x5f16('0x36')]);_0x45bf6c[_0x5f16('0x3a')]=_[_0x5f16('0x3b')](_0x493d8a[_0x5f16('0x3a')]);_0x45bf6c[_0x5f16('0x3c')]=_[_0x5f16('0x3d')](_0x45bf6c[_0x5f16('0x39')],_0x45bf6c[_0x5f16('0x3a')]);_0x2f0594[_0x5f16('0x3f')]=_['intersection'](_0x45bf6c[_0x5f16('0x39')],qs[_0x5f16('0x3e')](_0x493d8a[_0x5f16('0x3a')]['fields']));_0x2f0594[_0x5f16('0x3f')]=_0x2f0594['attributes'][_0x5f16('0x40')]?_0x2f0594[_0x5f16('0x3f')]:_0x45bf6c[_0x5f16('0x39')];_0x2f0594['order']=qs['sort'](_0x493d8a[_0x5f16('0x3a')][_0x5f16('0x42')]);_0x2f0594[_0x5f16('0x48')]=qs[_0x5f16('0x3c')](_[_0x5f16('0x43')](_0x493d8a[_0x5f16('0x3a')],_0x45bf6c['filters']));if(_0x493d8a['query'][_0x5f16('0x44')]){_0x2f0594[_0x5f16('0x48')]=_[_0x5f16('0x45')](_0x2f0594[_0x5f16('0x48')],{'$or':_[_0x5f16('0x34')](_0x2f0594['attributes'],function(_0x5e14c0){var _0x1a3779={};_0x1a3779[_0x5e14c0]={'$like':'%'+_0x493d8a['query'][_0x5f16('0x44')]+'%'};return _0x1a3779;})});}_0x2f0594=_[_0x5f16('0x45')]({},_0x2f0594,_0x493d8a['options']);return _0x51a365[_0x5f16('0x55')](_0x2f0594);}})[_0x5f16('0x1d')](function(_0x57237d){if(_0x57237d){_0x56550d=_0x57237d['length'];if(!_0x493d8a[_0x5f16('0x3a')]['hasOwnProperty']('nolimit')){_0x2f0594[_0x5f16('0x29')]=qs['limit'](_0x493d8a[_0x5f16('0x3a')][_0x5f16('0x29')]);_0x2f0594[_0x5f16('0x28')]=qs['offset'](_0x493d8a[_0x5f16('0x3a')][_0x5f16('0x28')]);}return _0x51a365[_0x5f16('0x55')](_0x2f0594);}})['then'](function(_0x4ab7bb){if(_0x4ab7bb){return _0x4ab7bb?{'count':_0x56550d,'rows':_0x4ab7bb}:null;}})[_0x5f16('0x1d')](respondWithResult(_0x4f53a9,null))[_0x5f16('0x4d')](handleError(_0x4f53a9,null));};exports['addConfiguration']=function(_0x49ee01,_0x8405af,_0x3e362c){if(_0x49ee01[_0x5f16('0x53')]['id']){delete _0x49ee01[_0x5f16('0x53')]['id'];}return db[_0x5f16('0x35')]['findOne']({'where':{'id':_0x49ee01[_0x5f16('0x54')]['id']}})[_0x5f16('0x1d')](handleEntityNotFound(_0x8405af,null))[_0x5f16('0x1d')](function(_0x43a933){if(_0x43a933){_0x49ee01[_0x5f16('0x53')]['AccountId']=_0x43a933['id'];_0x49ee01[_0x5f16('0x53')][_0x5f16('0x58')]=integrations[_0x5f16('0x59')](_0x49ee01[_0x5f16('0x53')]['channel'],_0x49ee01[_0x5f16('0x53')][_0x5f16('0x37')]);_0x49ee01[_0x5f16('0x53')][_0x5f16('0x5a')]=integrations['getDescriptions'](_0x49ee01[_0x5f16('0x53')][_0x5f16('0x5b')],_0x49ee01[_0x5f16('0x53')][_0x5f16('0x37')]);return db[_0x5f16('0x57')][_0x5f16('0x51')](_0x49ee01['body'],{'include':[{'model':db[_0x5f16('0x5c')],'as':_0x5f16('0x58')},{'model':db[_0x5f16('0x5c')],'as':_0x5f16('0x5a')}]});}return null;})[_0x5f16('0x1d')](respondWithResult(_0x8405af,null))[_0x5f16('0x4d')](handleError(_0x8405af,null));};exports[_0x5f16('0x5d')]=function(_0x1702f2,_0x355e29,_0x361880){var _0x36d77c=_0x1702f2['query']['ticketType'];var _0x22a284=_0x36d77c==='incident'?_0x5f16('0x5e'):_0x5f16('0x5f');var _0x27b6f3='';var _0x1e5a71='';var _0x12a6ba='';var _0x46b4b8='';var _0x593131='';var _0x3a4eee='';var _0x3005bc='';var _0x13b897='';var _0x402135=[_0x5f16('0x60'),'description','customerid',_0x5f16('0x61'),_0x5f16('0x62'),_0x5f16('0x63'),_0x5f16('0x64'),_0x5f16('0x65'),'directioncode','phonecall_activity_parties'];var _0x2b784f=['accountidname',_0x5f16('0x66'),'actualserviceunits',_0x5f16('0x67'),'contactidname','contactidyominame',_0x5f16('0x68'),_0x5f16('0x69'),_0x5f16('0x6a'),_0x5f16('0x6b'),_0x5f16('0x6c'),_0x5f16('0x6d'),_0x5f16('0x6e'),'createdonbehalfbyname','createdonbehalfbyyominame',_0x5f16('0x6f'),_0x5f16('0x70'),'customeridyominame','emailaddress','entitlementidname',_0x5f16('0x71'),_0x5f16('0x72'),'escalatedon',_0x5f16('0x73'),'firstresponsebykpiidname',_0x5f16('0x74'),_0x5f16('0x75'),_0x5f16('0x76'),_0x5f16('0x77'),_0x5f16('0x78'),_0x5f16('0x79'),_0x5f16('0x7a'),_0x5f16('0x7b'),_0x5f16('0x7c'),_0x5f16('0x7d'),_0x5f16('0x7e'),_0x5f16('0x7f'),_0x5f16('0x80'),_0x5f16('0x81'),'msdyn_iotalertname','numberofchildincidents',_0x5f16('0x82'),_0x5f16('0x83'),_0x5f16('0x84'),_0x5f16('0x85'),_0x5f16('0x86'),'parentcaseidname',_0x5f16('0x87'),_0x5f16('0x88'),'prioritycodename',_0x5f16('0x89'),_0x5f16('0x8a'),'resolveby','resolvebykpiidname',_0x5f16('0x8b'),_0x5f16('0x8c'),'responsiblecontactidyominame',_0x5f16('0x8d'),'slainvokedidname',_0x5f16('0x8e'),_0x5f16('0x8f'),_0x5f16('0x90'),'statuscode','subjectidname',_0x5f16('0x91'),_0x5f16('0x92'),_0x5f16('0x93'),_0x5f16('0x94'),_0x5f16('0x95'),_0x5f16('0x96')];var _0xe31d1e=_0x402135[_0x5f16('0x97')](_0x2b784f);return db['Dynamics365Account']['findOne']({'where':{'id':_0x1702f2['params']['id']},'attributes':['id',_0x5f16('0x98'),_0x5f16('0x99'),'remoteUri',_0x5f16('0x9a'),_0x5f16('0x9b'),_0x5f16('0x9c')]})[_0x5f16('0x1d')](handleEntityNotFound(_0x355e29,null))[_0x5f16('0x1d')](function(_0x54bc52){if(_0x54bc52){_0x13b897=_0x54bc52['remoteUri'];var _0x4e19cf=_0x13b897[_0x5f16('0x9d')](-0x1);if(_0x4e19cf==='/'){_0x13b897=_0x13b897[_0x5f16('0x9e')](0x0,_0x13b897[_0x5f16('0x9f')](_0x4e19cf));}_0x3005bc=util[_0x5f16('0xa0')](_0x5f16('0xa1'),_0x13b897);var _0x34acb4={'method':_0x5f16('0xa2'),'uri':_0x5f16('0xa3')+_0x54bc52['tenantId']+'/oauth2/token','form':{'client_id':_0x54bc52[_0x5f16('0x9b')],'resource':_0x13b897,'username':_0x54bc52[_0x5f16('0x98')],'password':_0x54bc52['password'],'grant_type':_0x5f16('0x99'),'client_secret':_0x54bc52['clientSecret']},'json':!![]};return rp(_0x34acb4);}})['then'](function(_0x3bf958){_0x3a4eee=_0x3bf958[_0x5f16('0xa4')];var _0x38a9eb={'method':_0x5f16('0xa5'),'uri':encodeURI(_0x3005bc+'EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27'+_0x22a284+'\x27'),'headers':{'Authorization':_0x5f16('0xa6')+_0x3a4eee,'If-None-Match':null,'OData-Version':_0x5f16('0xa7')},'json':!![]};return rp(_0x38a9eb);})['then'](function(_0x132b46){var _0x324fcb=_0x132b46['value'][0x0];var _0x28d38d=_0x324fcb['MetadataId'];var _0x2872ff={'method':_0x5f16('0xa5'),'uri':_0x3005bc+_0x5f16('0xa8')+_0x28d38d+_0x5f16('0xa9'),'headers':{'Authorization':_0x5f16('0xa6')+_0x3a4eee,'If-None-Match':null,'OData-Version':_0x5f16('0xa7')},'json':!![]};return rp(_0x2872ff);})[_0x5f16('0x1d')](function(_0x4ed758){_0x27b6f3=_0x4ed758;_0x1e5a71=_0x27b6f3[_0x5f16('0xaa')];_0x1e5a71=_[_0x5f16('0xab')](_0x1e5a71,function(_0x4e5a8e){return!_0xe31d1e[_0x5f16('0xac')](_0x4e5a8e[_0x5f16('0xad')]);});var _0x18d314=[];var _0x237a08=[];_0x1e5a71[_0x5f16('0xae')](function(_0x4c384c){if(_0x4c384c['@odata.type']){var _0x2644d3=_0x4c384c[_0x5f16('0xaf')][_0x5f16('0x9e')](_0x4c384c[_0x5f16('0xaf')]['lastIndexOf']('.')+0x1);if(_0x2644d3==='PicklistAttributeMetadata'){_0x18d314['push'](getSelectList(_0x3005bc,_0x36d77c,_0x237a08,_0x27b6f3[_0x5f16('0xb0')],_0x4c384c[_0x5f16('0xb0')],_0x3a4eee));}}});return Promise[_0x5f16('0xb1')](_0x18d314);})[_0x5f16('0x1d')](function(_0x108fda){_0x12a6ba=_0x108fda[0x0];var _0x12709b=[];var _0x49a279=[];_0x1e5a71[_0x5f16('0xae')](function(_0x457cdb){if(!_[_0x5f16('0xb2')](_0x457cdb[_0x5f16('0xaf')])){var _0x298d35=_0x457cdb[_0x5f16('0xaf')][_0x5f16('0x9e')](_0x457cdb[_0x5f16('0xaf')][_0x5f16('0x9f')]('.')+0x1);if(_0x298d35===_0x5f16('0xb3')){_0x12709b[_0x5f16('0xb4')](getBooleanList(_0x3005bc,_0x36d77c,_0x49a279,_0x27b6f3[_0x5f16('0xb0')],_0x457cdb[_0x5f16('0xb0')],_0x3a4eee));}}});return Promise['all'](_0x12709b);})['then'](function(_0x114140){_0x46b4b8=_0x114140[0x0];var _0x54002e=[];var _0x395e0c=[];_0x1e5a71[_0x5f16('0xae')](function(_0x47d7e1){if(_0x47d7e1[_0x5f16('0xaf')]){var _0x305bbe=_0x47d7e1['@odata.type'][_0x5f16('0x9e')](_0x47d7e1[_0x5f16('0xaf')][_0x5f16('0x9f')]('.')+0x1);if(_0x305bbe===_0x5f16('0xb5')||_0x305bbe===_0x5f16('0xb6')||_0x305bbe===_0x5f16('0xb7')||_0x305bbe===_0x5f16('0xb8')||_0x305bbe==='MemoAttributeMetadata'||_0x305bbe===_0x5f16('0xb9')||_0x305bbe===_0x5f16('0xba')||_0x305bbe===_0x5f16('0xbb')||_0x305bbe===_0x5f16('0xbc')||_0x305bbe==='DecimalAttributeMetadata'){_0x54002e[_0x5f16('0xb4')](getInputList(_0x3005bc,_0x36d77c,_0x305bbe,_0x395e0c,_0x27b6f3[_0x5f16('0xb0')],_0x47d7e1[_0x5f16('0xb0')],_0x3a4eee));}}});return Promise['all'](_0x54002e);})[_0x5f16('0x1d')](function(_0x343839){_0x593131=_0x343839[0x0];var _0x46f598=_0x12a6ba[_0x5f16('0x97')](_0x46b4b8)[_0x5f16('0x97')](_0x593131);var _0x2dfb20={'count':_0x46f598[_0x5f16('0x40')],'rows':_0x46f598};return _0x2dfb20;})[_0x5f16('0x1d')](respondWithResult(_0x355e29,null))[_0x5f16('0x4d')](function(_0x47f148){var _0x169fab=_0x1702f2[_0x5f16('0x3a')][_0x5f16('0xbd')]?0x1f4:_0x47f148['statusCode']||0x1f4;logger[_0x5f16('0x23')](_0x47f148[_0x5f16('0x31')]);delete _0x47f148[_0x5f16('0x32')];if(_0x169fab===0x191){_0x169fab=0x190;}_0x355e29[_0x5f16('0x2a')](_0x169fab)[_0x5f16('0x33')](_0x1702f2['query'][_0x5f16('0xbd')]?{'message':_0x5f16('0xbe'),'statusCode':_0x47f148['statusCode']}:_0x47f148);});};function getSelectList(_0x423d43,_0x48e519,_0x2105a8,_0x3d1826,_0x26fd2c,_0x584fd6){var _0x47801e={'method':'GET','uri':_0x423d43+_0x5f16('0xa8')+_0x3d1826+_0x5f16('0xbf')+_0x26fd2c+_0x5f16('0xc0')+_0x5f16('0xc1'),'headers':{'Authorization':_0x5f16('0xa6')+_0x584fd6,'If-None-Match':null,'OData-Version':_0x5f16('0xa7')},'json':!![]};return rp(_0x47801e)[_0x5f16('0x1d')](function(_0x4ec53e){var _0xf212d4=[];var _0x42a651=_0x4ec53e[_0x5f16('0xc2')][_0x5f16('0xc3')];_0x42a651['forEach'](function(_0x34ec01){_0xf212d4[_0x5f16('0xb4')]({'name':_0x34ec01[_0x5f16('0xc4')]['UserLocalizedLabel'][_0x5f16('0xc4')],'value':String(_0x34ec01[_0x5f16('0xc5')])});});var _0x5a187d={'id':_0x48e519+'_'+_0x4ec53e[_0x5f16('0xad')],'name':_0x4ec53e['DisplayName'][_0x5f16('0xc6')][_0x5f16('0xc4')],'custom':![],'options':_0xf212d4};_0x2105a8[_0x5f16('0xb4')](_0x5a187d);return _0x2105a8;});}function getBooleanList(_0x231d5f,_0x5bae42,_0x465fd8,_0x2e3e67,_0x4646a7,_0x40ee5d){var _0xbe1143={'method':_0x5f16('0xa5'),'uri':_0x231d5f+_0x5f16('0xa8')+_0x2e3e67+_0x5f16('0xbf')+_0x4646a7+_0x5f16('0xc7'),'headers':{'Authorization':_0x5f16('0xa6')+_0x40ee5d,'If-None-Match':null,'OData-Version':_0x5f16('0xa7')},'json':!![]};return rp(_0xbe1143)[_0x5f16('0x1d')](function(_0xeb0881){var _0x34135c=[];_0x34135c[_0x5f16('0xb4')]({'name':_0xeb0881[_0x5f16('0xc2')][_0x5f16('0xc8')]['Label']['UserLocalizedLabel'][_0x5f16('0xc4')],'value':_0x5f16('0xc9')},{'name':_0xeb0881[_0x5f16('0xc2')][_0x5f16('0xca')][_0x5f16('0xc4')][_0x5f16('0xc6')]['Label'],'value':'false'});var _0x39614d={'id':_0x5bae42+'_'+_0xeb0881[_0x5f16('0xad')],'name':_0xeb0881[_0x5f16('0xcb')][_0x5f16('0xc6')][_0x5f16('0xc4')],'custom':![],'options':_0x34135c};_0x465fd8[_0x5f16('0xb4')](_0x39614d);return _0x465fd8;});}function getInputList(_0x1494ab,_0xe16e05,_0x3c7ddb,_0x325072,_0x1aade5,_0x3ceb7c,_0x1f7ddc){var _0x5b7698={'method':_0x5f16('0xa5'),'uri':_0x1494ab+_0x5f16('0xa8')+_0x1aade5+_0x5f16('0xbf')+_0x3ceb7c+_0x5f16('0xcc')+_0x3c7ddb+_0x5f16('0xcd'),'headers':{'Authorization':'Bearer\x20'+_0x1f7ddc,'If-None-Match':null,'OData-Version':_0x5f16('0xa7')},'json':!![]};return rp(_0x5b7698)[_0x5f16('0x1d')](function(_0xfd1f9b){var _0x158352={'id':_0xe16e05+'_'+_0xfd1f9b[_0x5f16('0xad')],'name':_0xfd1f9b[_0x5f16('0xcb')][_0x5f16('0xc6')]?_0xfd1f9b[_0x5f16('0xcb')][_0x5f16('0xc6')][_0x5f16('0xc4')]:_0xfd1f9b[_0x5f16('0xad')],'custom':![],'options':[]};_0x325072[_0x5f16('0xb4')](_0x158352);return _0x325072;});}
\ No newline at end of file
+var _0x1617=['index','rawAttributes','fieldName','key','model','keys','filters','attributes','query','fields','length','nolimit','order','sort','where','pick','filter','merge','map','type','VIRTUAL','Dynamics365Account','includeAll','include','findAll','rows','intersection','options','find','create','body','params','destroy','Dynamics365Configuration','hasOwnProperty','getConfigurations','findOne','AccountId','channel','Descriptions','getDescriptions','Subjects','Dynamics365Field','getFields','ticketType','incident','title','description','customerid','ownerid','caseorigincode','subject','phonenumber','regardingobjectid','directioncode','phonecall_activity_parties','billedserviceunits','contactidname','contactidyominame','contractdetailidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdbyyominame','createdon','createdonbehalfbyname','createdonbehalfbyyominame','customeridname','customeridtype','customeridyominame','emailaddress','entitlementidname','entityimage_timestamp','entityimage_url','escalatedon','exchangerate','firstresponsebykpiidname','followupby','importsequencenumber','influencescore','kbarticleidname','modifiedbyname','modifiedbyyominame','modifiedon','modifiedonbehalfbyname','modifiedonbehalfbyyominame','msdyn_iotalertname','numberofchildincidents','onholdtime','owneridtype','owneridyominame','primarycontactidname','prioritycodename','productidname','productserialnumber','resolveby','resolvebykpiidname','responseby','responsiblecontactidname','responsiblecontactidyominame','sentimentvalue','slainvokedidname','slaname','socialprofileidname','subjectidname','ticketnumber','timezoneruleversionnumber','transactioncurrencyidname','traversedpath','utcconversiontimezonecode','versionnumber','username','password','remoteUri','tenantId','clientId','clientSecret','slice','substring','format','POST','https://login.microsoftonline.com/','/oauth2/token','access_token','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','MetadataId','EntityDefinitions(',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Attributes','remove','includes','LogicalName','forEach','@odata.type','PicklistAttributeMetadata','push','all','isNil','lastIndexOf','BooleanAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','DateTimeAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','concat','statusCode','Wrong\x20credentials','GET','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','OptionSet','Options','UserLocalizedLabel','Label','Value','DisplayName',')/Attributes(',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','true','FalseOption',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../components/integrations/configuration','jayson/promise','http','test','Sequelize','ValidationError','request','then','Dynamics365Account,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','count','offset','limit','Content-Range','json','reject','save','update','stack','name','send'];(function(_0x23ae69,_0xbbd128){var _0x57d6b4=function(_0x31b769){while(--_0x31b769){_0x23ae69['push'](_0x23ae69['shift']());}};_0x57d6b4(++_0xbbd128);}(_0x1617,0xa5));var _0x7161=function(_0x599f41,_0x4db732){_0x599f41=_0x599f41-0x0;var _0x2e4d58=_0x1617[_0x599f41];return _0x2e4d58;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x7161('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x7161('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7161('0x2'));var moment=require(_0x7161('0x3'));var BPromise=require(_0x7161('0x4'));var Mustache=require(_0x7161('0x5'));var util=require(_0x7161('0x6'));var path=require(_0x7161('0x7'));var sox=require(_0x7161('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x7161('0x9'));var squel=require(_0x7161('0xa'));var crypto=require(_0x7161('0xb'));var jsforce=require(_0x7161('0xc'));var deskjs=require(_0x7161('0xd'));var toCsv=require('to-csv');var querystring=require(_0x7161('0xe'));var Papa=require(_0x7161('0xf'));var Redis=require(_0x7161('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x7161('0x11'));var as=require(_0x7161('0x12'));var hardwareService=require(_0x7161('0x13'));var logger=require(_0x7161('0x14'))(_0x7161('0x15'));var utils=require(_0x7161('0x16'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var integrations=require(_0x7161('0x17'));var jayson=require(_0x7161('0x18'));var client=jayson['client'][_0x7161('0x19')]({'port':0x232a});function checkPasswordPattern(_0x4299f9,_0x2a2756,_0x336de6){if(_0x336de6){var _0x39f25d=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x39f25d[_0x7161('0x1a')](_0x2a2756)){return _0x4299f9;}else{throw new db[(_0x7161('0x1b'))][(_0x7161('0x1c'))]('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 _0x4299f9;}}function respondWithRpcPromise(_0x42f312,_0x286e7d,_0x378b81,_0x29ce07){return new BPromise(function(_0x1bdea9,_0x5becfa){var _0x35c2bb=_0x29ce07||client;return _0x35c2bb[_0x7161('0x1d')](_0x42f312,_0x378b81)[_0x7161('0x1e')](function(_0x5c0bb3){logger['info']('Dynamics365Account,\x20%s,\x20%s',_0x286e7d,'request\x20sent');logger['debug'](_0x7161('0x1f'),_0x286e7d,_0x7161('0x20'),JSON[_0x7161('0x21')](_0x5c0bb3));if(_0x5c0bb3[_0x7161('0x22')]){if(_0x5c0bb3[_0x7161('0x22')][_0x7161('0x23')]===0x1f4){logger[_0x7161('0x22')](_0x7161('0x24'),_0x286e7d,_0x5c0bb3['error']['message']);return _0x5becfa(_0x5c0bb3[_0x7161('0x22')][_0x7161('0x25')]);}logger['error'](_0x7161('0x24'),_0x286e7d,_0x5c0bb3[_0x7161('0x22')][_0x7161('0x25')]);return _0x1bdea9(_0x5c0bb3[_0x7161('0x22')][_0x7161('0x25')]);}else{logger[_0x7161('0x26')](_0x7161('0x24'),_0x286e7d,_0x7161('0x20'));_0x1bdea9(_0x5c0bb3[_0x7161('0x27')][_0x7161('0x25')]);}})[_0x7161('0x28')](function(_0x17c0fa){logger[_0x7161('0x22')](_0x7161('0x24'),_0x286e7d,_0x17c0fa);_0x5becfa(_0x17c0fa);});});}function respondWithStatusCode(_0xc79b0d,_0x4381d3){_0x4381d3=_0x4381d3||0xcc;return function(_0x3016f4){if(_0x3016f4){return _0xc79b0d[_0x7161('0x29')](_0x4381d3);}return _0xc79b0d[_0x7161('0x2a')](_0x4381d3)[_0x7161('0x2b')]();};}function respondWithResult(_0x5489c3,_0x2ea998){_0x2ea998=_0x2ea998||0xc8;return function(_0x164d4b){if(_0x164d4b){return _0x5489c3['status'](_0x2ea998)['json'](_0x164d4b);}};}function respondWithFilteredResult(_0x2fcaeb,_0x35b8da){return function(_0x59cd8e){if(_0x59cd8e){var _0x398ef3=_0x59cd8e[_0x7161('0x2c')],_0x567bea=_0x35b8da[_0x7161('0x2d')],_0x14ddde=_0x35b8da[_0x7161('0x2d')]+_0x35b8da[_0x7161('0x2e')],_0x22fde4;if(_0x14ddde>=_0x398ef3){_0x14ddde=_0x398ef3;_0x22fde4=0xc8;}else{_0x22fde4=0xce;}_0x2fcaeb[_0x7161('0x2a')](_0x22fde4);return _0x2fcaeb['set'](_0x7161('0x2f'),_0x567bea+'-'+_0x14ddde+'/'+_0x398ef3)[_0x7161('0x30')](_0x59cd8e);}return null;};}function patchUpdates(_0x20e729){return function(_0x4ac683){try{jsonpatch['apply'](_0x4ac683,_0x20e729,!![]);}catch(_0x2fb50c){return BPromise[_0x7161('0x31')](_0x2fb50c);}return _0x4ac683[_0x7161('0x32')]();};}function saveUpdates(_0x87e468,_0x2373bd){return function(_0x2f796b){if(_0x2f796b){return _0x2f796b[_0x7161('0x33')](_0x87e468)['then'](function(_0xce3430){return _0xce3430;});}return null;};}function removeEntity(_0x4291b8,_0x286e15){return function(_0x110a18){if(_0x110a18){return _0x110a18['destroy']()[_0x7161('0x1e')](function(){_0x4291b8[_0x7161('0x2a')](0xcc)[_0x7161('0x2b')]();});}};}function handleEntityNotFound(_0x167537,_0x232ab2){return function(_0x3d6d1f){if(!_0x3d6d1f){_0x167537[_0x7161('0x29')](0x194);}return _0x3d6d1f;};}function handleError(_0x54d6e1,_0x21dd45){_0x21dd45=_0x21dd45||0x1f4;return function(_0x178eb6){logger['error'](_0x178eb6[_0x7161('0x34')]);if(_0x178eb6[_0x7161('0x35')]){delete _0x178eb6[_0x7161('0x35')];}_0x54d6e1[_0x7161('0x2a')](_0x21dd45)[_0x7161('0x36')](_0x178eb6);};}exports[_0x7161('0x37')]=function(_0x38b7b6,_0x3abfbb){var _0x4919c1={},_0x4f4373={},_0x105ad8={'count':0x0,'rows':[]};var _0x330ab8=_['map'](db['Dynamics365Account'][_0x7161('0x38')],function(_0x28cbd8){return{'name':_0x28cbd8[_0x7161('0x39')],'type':_0x28cbd8['type'][_0x7161('0x3a')]};});_0x4f4373[_0x7161('0x3b')]=_['map'](_0x330ab8,_0x7161('0x35'));_0x4f4373['query']=_[_0x7161('0x3c')](_0x38b7b6['query']);_0x4f4373[_0x7161('0x3d')]=_['intersection'](_0x4f4373[_0x7161('0x3b')],_0x4f4373['query']);_0x4919c1[_0x7161('0x3e')]=_['intersection'](_0x4f4373['model'],qs['fields'](_0x38b7b6[_0x7161('0x3f')][_0x7161('0x40')]));_0x4919c1[_0x7161('0x3e')]=_0x4919c1['attributes'][_0x7161('0x41')]?_0x4919c1[_0x7161('0x3e')]:_0x4f4373[_0x7161('0x3b')];if(!_0x38b7b6[_0x7161('0x3f')]['hasOwnProperty'](_0x7161('0x42'))){_0x4919c1[_0x7161('0x2e')]=qs['limit'](_0x38b7b6[_0x7161('0x3f')][_0x7161('0x2e')]);_0x4919c1[_0x7161('0x2d')]=qs[_0x7161('0x2d')](_0x38b7b6[_0x7161('0x3f')][_0x7161('0x2d')]);}_0x4919c1[_0x7161('0x43')]=qs[_0x7161('0x44')](_0x38b7b6[_0x7161('0x3f')][_0x7161('0x44')]);_0x4919c1[_0x7161('0x45')]=qs[_0x7161('0x3d')](_[_0x7161('0x46')](_0x38b7b6[_0x7161('0x3f')],_0x4f4373[_0x7161('0x3d')]));if(_0x38b7b6[_0x7161('0x3f')][_0x7161('0x47')]){_0x4919c1[_0x7161('0x45')]=_[_0x7161('0x48')](_0x4919c1[_0x7161('0x45')],{'$or':_[_0x7161('0x49')](_0x330ab8,function(_0x1dde9a){if(_0x1dde9a[_0x7161('0x4a')]!==_0x7161('0x4b')){var _0x13844b={};_0x13844b[_0x1dde9a['name']]={'$like':'%'+_0x38b7b6[_0x7161('0x3f')][_0x7161('0x47')]+'%'};return _0x13844b;}})});}_0x4919c1=_[_0x7161('0x48')]({},_0x4919c1,_0x38b7b6['options']);var _0x2af8ee={'where':_0x4919c1['where']};return db[_0x7161('0x4c')][_0x7161('0x2c')](_0x2af8ee)[_0x7161('0x1e')](function(_0x4f6421){_0x105ad8[_0x7161('0x2c')]=_0x4f6421;if(_0x38b7b6['query'][_0x7161('0x4d')]){_0x4919c1[_0x7161('0x4e')]=[{'all':!![]}];}return db[_0x7161('0x4c')][_0x7161('0x4f')](_0x4919c1);})[_0x7161('0x1e')](function(_0x327399){_0x105ad8[_0x7161('0x50')]=_0x327399;return _0x105ad8;})[_0x7161('0x1e')](respondWithFilteredResult(_0x3abfbb,_0x4919c1))[_0x7161('0x28')](handleError(_0x3abfbb,null));};exports['show']=function(_0x59da5e,_0x59f91b){var _0x4f8195={'raw':![],'where':{'id':_0x59da5e['params']['id']}},_0x1db136={};_0x1db136[_0x7161('0x3b')]=_[_0x7161('0x3c')](db[_0x7161('0x4c')][_0x7161('0x38')]);_0x1db136['query']=_[_0x7161('0x3c')](_0x59da5e[_0x7161('0x3f')]);_0x1db136[_0x7161('0x3d')]=_[_0x7161('0x51')](_0x1db136[_0x7161('0x3b')],_0x1db136[_0x7161('0x3f')]);_0x4f8195[_0x7161('0x3e')]=_['intersection'](_0x1db136[_0x7161('0x3b')],qs[_0x7161('0x40')](_0x59da5e[_0x7161('0x3f')]['fields']));_0x4f8195[_0x7161('0x3e')]=_0x4f8195[_0x7161('0x3e')]['length']?_0x4f8195['attributes']:_0x1db136['model'];if(_0x59da5e[_0x7161('0x3f')][_0x7161('0x4d')]){_0x4f8195['include']=[{'all':!![]}];}_0x4f8195=_[_0x7161('0x48')]({},_0x4f8195,_0x59da5e[_0x7161('0x52')]);return db[_0x7161('0x4c')][_0x7161('0x53')](_0x4f8195)[_0x7161('0x1e')](handleEntityNotFound(_0x59f91b,null))[_0x7161('0x1e')](respondWithResult(_0x59f91b,null))[_0x7161('0x28')](handleError(_0x59f91b,null));};exports['create']=function(_0x1bab36,_0x441997){return db[_0x7161('0x4c')][_0x7161('0x54')](_0x1bab36[_0x7161('0x55')],{})[_0x7161('0x1e')](respondWithResult(_0x441997,0xc9))[_0x7161('0x28')](handleError(_0x441997,null));};exports[_0x7161('0x33')]=function(_0x543286,_0x4803d5){if(_0x543286[_0x7161('0x55')]['id']){delete _0x543286[_0x7161('0x55')]['id'];}return db[_0x7161('0x4c')][_0x7161('0x53')]({'where':{'id':_0x543286[_0x7161('0x56')]['id']}})['then'](handleEntityNotFound(_0x4803d5,null))[_0x7161('0x1e')](saveUpdates(_0x543286['body'],null))['then'](respondWithResult(_0x4803d5,null))[_0x7161('0x28')](handleError(_0x4803d5,null));};exports[_0x7161('0x57')]=function(_0x58c0c0,_0x3cc145){return db['Dynamics365Account'][_0x7161('0x53')]({'where':{'id':_0x58c0c0[_0x7161('0x56')]['id']}})[_0x7161('0x1e')](handleEntityNotFound(_0x3cc145,null))[_0x7161('0x1e')](removeEntity(_0x3cc145,null))[_0x7161('0x28')](handleError(_0x3cc145,null));};exports['getConfigurations']=function(_0x2038ef,_0x5dc0ee,_0x520373){var _0x460d6b={};var _0x3eab6e={};var _0x5b3d94;var _0x15d2c9;return db[_0x7161('0x4c')]['findOne']({'where':{'id':_0x2038ef[_0x7161('0x56')]['id']}})['then'](handleEntityNotFound(_0x5dc0ee,null))[_0x7161('0x1e')](function(_0x5f098e){if(_0x5f098e){_0x5b3d94=_0x5f098e;_0x3eab6e[_0x7161('0x3b')]=_[_0x7161('0x3c')](db[_0x7161('0x58')][_0x7161('0x38')]);_0x3eab6e[_0x7161('0x3f')]=_[_0x7161('0x3c')](_0x2038ef['query']);_0x3eab6e[_0x7161('0x3d')]=_[_0x7161('0x51')](_0x3eab6e['model'],_0x3eab6e[_0x7161('0x3f')]);_0x460d6b[_0x7161('0x3e')]=_[_0x7161('0x51')](_0x3eab6e[_0x7161('0x3b')],qs[_0x7161('0x40')](_0x2038ef[_0x7161('0x3f')][_0x7161('0x40')]));_0x460d6b[_0x7161('0x3e')]=_0x460d6b['attributes'][_0x7161('0x41')]?_0x460d6b['attributes']:_0x3eab6e[_0x7161('0x3b')];_0x460d6b[_0x7161('0x43')]=qs[_0x7161('0x44')](_0x2038ef['query'][_0x7161('0x44')]);_0x460d6b[_0x7161('0x45')]=qs['filters'](_['pick'](_0x2038ef['query'],_0x3eab6e[_0x7161('0x3d')]));if(_0x2038ef[_0x7161('0x3f')]['filter']){_0x460d6b[_0x7161('0x45')]=_['merge'](_0x460d6b[_0x7161('0x45')],{'$or':_['map'](_0x460d6b['attributes'],function(_0xd260ee){var _0x44a12c={};_0x44a12c[_0xd260ee]={'$like':'%'+_0x2038ef[_0x7161('0x3f')][_0x7161('0x47')]+'%'};return _0x44a12c;})});}_0x460d6b=_[_0x7161('0x48')]({},_0x460d6b,_0x2038ef[_0x7161('0x52')]);return _0x5b3d94['getConfigurations'](_0x460d6b);}})[_0x7161('0x1e')](function(_0x2f6552){if(_0x2f6552){_0x15d2c9=_0x2f6552[_0x7161('0x41')];if(!_0x2038ef[_0x7161('0x3f')][_0x7161('0x59')](_0x7161('0x42'))){_0x460d6b[_0x7161('0x2e')]=qs[_0x7161('0x2e')](_0x2038ef['query']['limit']);_0x460d6b[_0x7161('0x2d')]=qs[_0x7161('0x2d')](_0x2038ef[_0x7161('0x3f')][_0x7161('0x2d')]);}return _0x5b3d94[_0x7161('0x5a')](_0x460d6b);}})[_0x7161('0x1e')](function(_0x3ec552){if(_0x3ec552){return _0x3ec552?{'count':_0x15d2c9,'rows':_0x3ec552}:null;}})[_0x7161('0x1e')](respondWithResult(_0x5dc0ee,null))[_0x7161('0x28')](handleError(_0x5dc0ee,null));};exports['addConfiguration']=function(_0xf7740c,_0x469910,_0x3744ab){if(_0xf7740c[_0x7161('0x55')]['id']){delete _0xf7740c[_0x7161('0x55')]['id'];}return db[_0x7161('0x4c')][_0x7161('0x5b')]({'where':{'id':_0xf7740c[_0x7161('0x56')]['id']}})[_0x7161('0x1e')](handleEntityNotFound(_0x469910,null))[_0x7161('0x1e')](function(_0x1d7654){if(_0x1d7654){_0xf7740c[_0x7161('0x55')][_0x7161('0x5c')]=_0x1d7654['id'];_0xf7740c[_0x7161('0x55')]['Subjects']=integrations['getSubjects'](_0xf7740c[_0x7161('0x55')][_0x7161('0x5d')],_0xf7740c['body'][_0x7161('0x4a')]);_0xf7740c[_0x7161('0x55')][_0x7161('0x5e')]=integrations[_0x7161('0x5f')](_0xf7740c[_0x7161('0x55')][_0x7161('0x5d')],_0xf7740c[_0x7161('0x55')][_0x7161('0x4a')]);return db['Dynamics365Configuration'][_0x7161('0x54')](_0xf7740c[_0x7161('0x55')],{'include':[{'model':db['Dynamics365Field'],'as':_0x7161('0x60')},{'model':db[_0x7161('0x61')],'as':'Descriptions'}]});}return null;})[_0x7161('0x1e')](respondWithResult(_0x469910,null))[_0x7161('0x28')](handleError(_0x469910,null));};exports[_0x7161('0x62')]=function(_0x13ceba,_0x1a18f8,_0x5cc747){var _0x227f2e=_0x13ceba[_0x7161('0x3f')][_0x7161('0x63')];var _0x2b38ce=_0x227f2e===_0x7161('0x64')?'Incident':'PhoneCall';var _0x9c1559='';var _0x2ed672='';var _0x5afce8='';var _0x4e4446='';var _0x21a229='';var _0x317ef4='';var _0x9368ee='';var _0x11e07f='';var _0x33c71f=[_0x7161('0x65'),_0x7161('0x66'),_0x7161('0x67'),_0x7161('0x68'),_0x7161('0x69'),_0x7161('0x6a'),_0x7161('0x6b'),_0x7161('0x6c'),_0x7161('0x6d'),_0x7161('0x6e')];var _0x483353=['accountidname','accountidyominame','actualserviceunits',_0x7161('0x6f'),_0x7161('0x70'),_0x7161('0x71'),_0x7161('0x72'),'contractidname',_0x7161('0x73'),_0x7161('0x74'),_0x7161('0x75'),_0x7161('0x76'),_0x7161('0x77'),_0x7161('0x78'),_0x7161('0x79'),_0x7161('0x7a'),_0x7161('0x7b'),_0x7161('0x7c'),_0x7161('0x7d'),_0x7161('0x7e'),_0x7161('0x7f'),_0x7161('0x80'),_0x7161('0x81'),_0x7161('0x82'),_0x7161('0x83'),_0x7161('0x84'),_0x7161('0x85'),_0x7161('0x86'),_0x7161('0x87'),'lastonholdtime','masteridname','modifiedbyexternalpartyname','modifiedbyexternalpartyyominame',_0x7161('0x88'),_0x7161('0x89'),_0x7161('0x8a'),_0x7161('0x8b'),_0x7161('0x8c'),'msdyn_incidenttypename',_0x7161('0x8d'),_0x7161('0x8e'),_0x7161('0x8f'),'overriddencreatedon','owneridname',_0x7161('0x90'),_0x7161('0x91'),'parentcaseidname',_0x7161('0x92'),'primarycontactidyominame',_0x7161('0x93'),_0x7161('0x94'),_0x7161('0x95'),_0x7161('0x96'),_0x7161('0x97'),_0x7161('0x98'),_0x7161('0x99'),_0x7161('0x9a'),_0x7161('0x9b'),_0x7161('0x9c'),_0x7161('0x9d'),_0x7161('0x9e'),'statecode','statuscode',_0x7161('0x9f'),_0x7161('0xa0'),_0x7161('0xa1'),_0x7161('0xa2'),_0x7161('0xa3'),_0x7161('0xa4'),_0x7161('0xa5')];var _0x2eba90=_0x33c71f['concat'](_0x483353);return db[_0x7161('0x4c')]['findOne']({'where':{'id':_0x13ceba[_0x7161('0x56')]['id']},'attributes':['id',_0x7161('0xa6'),_0x7161('0xa7'),_0x7161('0xa8'),_0x7161('0xa9'),_0x7161('0xaa'),_0x7161('0xab')]})[_0x7161('0x1e')](handleEntityNotFound(_0x1a18f8,null))[_0x7161('0x1e')](function(_0x3baef9){if(_0x3baef9){_0x11e07f=_0x3baef9[_0x7161('0xa8')];var _0x1dc19f=_0x11e07f[_0x7161('0xac')](-0x1);if(_0x1dc19f==='/'){_0x11e07f=_0x11e07f[_0x7161('0xad')](0x0,_0x11e07f['lastIndexOf'](_0x1dc19f));}_0x9368ee=util[_0x7161('0xae')]('%s/api/data/v9.0/',_0x11e07f);var _0x2ecf28={'method':_0x7161('0xaf'),'uri':_0x7161('0xb0')+_0x3baef9['tenantId']+_0x7161('0xb1'),'form':{'client_id':_0x3baef9[_0x7161('0xaa')],'resource':_0x11e07f,'username':_0x3baef9[_0x7161('0xa6')],'password':_0x3baef9[_0x7161('0xa7')],'grant_type':_0x7161('0xa7'),'client_secret':_0x3baef9[_0x7161('0xab')]},'json':!![]};return rp(_0x2ecf28);}})[_0x7161('0x1e')](function(_0x6ae69a){_0x317ef4=_0x6ae69a[_0x7161('0xb2')];var _0x35ec30={'method':'GET','uri':encodeURI(_0x9368ee+_0x7161('0xb3')+_0x2b38ce+'\x27'),'headers':{'Authorization':_0x7161('0xb4')+_0x317ef4,'If-None-Match':null,'OData-Version':_0x7161('0xb5')},'json':!![]};return rp(_0x35ec30);})['then'](function(_0x4eb04d){var _0x307af0=_0x4eb04d['value'][0x0];var _0x35e11c=_0x307af0[_0x7161('0xb6')];var _0xa04cad={'method':'GET','uri':_0x9368ee+_0x7161('0xb7')+_0x35e11c+_0x7161('0xb8'),'headers':{'Authorization':_0x7161('0xb4')+_0x317ef4,'If-None-Match':null,'OData-Version':_0x7161('0xb5')},'json':!![]};return rp(_0xa04cad);})['then'](function(_0x18676c){_0x9c1559=_0x18676c;_0x2ed672=_0x9c1559[_0x7161('0xb9')];_0x2ed672=_[_0x7161('0xba')](_0x2ed672,function(_0x2f6f8d){return!_0x2eba90[_0x7161('0xbb')](_0x2f6f8d[_0x7161('0xbc')]);});var _0x5bf9c0=[];var _0x3cb4d8=[];_0x2ed672[_0x7161('0xbd')](function(_0x569042){if(_0x569042[_0x7161('0xbe')]){var _0x3cd60e=_0x569042['@odata.type'][_0x7161('0xad')](_0x569042[_0x7161('0xbe')]['lastIndexOf']('.')+0x1);if(_0x3cd60e===_0x7161('0xbf')){_0x5bf9c0[_0x7161('0xc0')](getSelectList(_0x9368ee,_0x227f2e,_0x3cb4d8,_0x9c1559[_0x7161('0xb6')],_0x569042['MetadataId'],_0x317ef4));}}});return Promise[_0x7161('0xc1')](_0x5bf9c0);})[_0x7161('0x1e')](function(_0x1a61be){_0x5afce8=_0x1a61be[0x0];var _0xceac6e=[];var _0x504164=[];_0x2ed672[_0x7161('0xbd')](function(_0x25162e){if(!_[_0x7161('0xc2')](_0x25162e[_0x7161('0xbe')])){var _0xf4d48c=_0x25162e['@odata.type'][_0x7161('0xad')](_0x25162e[_0x7161('0xbe')][_0x7161('0xc3')]('.')+0x1);if(_0xf4d48c===_0x7161('0xc4')){_0xceac6e[_0x7161('0xc0')](getBooleanList(_0x9368ee,_0x227f2e,_0x504164,_0x9c1559['MetadataId'],_0x25162e[_0x7161('0xb6')],_0x317ef4));}}});return Promise[_0x7161('0xc1')](_0xceac6e);})[_0x7161('0x1e')](function(_0x447f44){_0x4e4446=_0x447f44[0x0];var _0x97393=[];var _0x44356c=[];_0x2ed672['forEach'](function(_0x3cf57d){if(_0x3cf57d[_0x7161('0xbe')]){var _0x26ce0c=_0x3cf57d[_0x7161('0xbe')][_0x7161('0xad')](_0x3cf57d[_0x7161('0xbe')][_0x7161('0xc3')]('.')+0x1);if(_0x26ce0c==='StringAttributeMetadata'||_0x26ce0c==='DoubleAttributeMetadata'||_0x26ce0c===_0x7161('0xc5')||_0x26ce0c===_0x7161('0xc6')||_0x26ce0c==='MemoAttributeMetadata'||_0x26ce0c===_0x7161('0xc7')||_0x26ce0c==='StatusAttributeMetadata'||_0x26ce0c==='EntityNameAttributeMetadata'||_0x26ce0c===_0x7161('0xc8')||_0x26ce0c===_0x7161('0xc9')){_0x97393[_0x7161('0xc0')](getInputList(_0x9368ee,_0x227f2e,_0x26ce0c,_0x44356c,_0x9c1559[_0x7161('0xb6')],_0x3cf57d[_0x7161('0xb6')],_0x317ef4));}}});return Promise[_0x7161('0xc1')](_0x97393);})['then'](function(_0x46bcec){_0x21a229=_0x46bcec[0x0];var _0x1865ce=_0x5afce8[_0x7161('0xca')](_0x4e4446)[_0x7161('0xca')](_0x21a229);var _0xde8d5b={'count':_0x1865ce[_0x7161('0x41')],'rows':_0x1865ce};return _0xde8d5b;})[_0x7161('0x1e')](respondWithResult(_0x1a18f8,null))[_0x7161('0x28')](function(_0x316aec){var _0xaacf66=_0x13ceba[_0x7161('0x3f')]['test']?0x1f4:_0x316aec[_0x7161('0xcb')]||0x1f4;logger[_0x7161('0x22')](_0x316aec[_0x7161('0x34')]);delete _0x316aec[_0x7161('0x35')];if(_0xaacf66===0x191){_0xaacf66=0x190;}_0x1a18f8['status'](_0xaacf66)[_0x7161('0x36')](_0x13ceba[_0x7161('0x3f')][_0x7161('0x1a')]?{'message':_0x7161('0xcc'),'statusCode':_0x316aec[_0x7161('0xcb')]}:_0x316aec);});};function getSelectList(_0xfe3a76,_0x1d647e,_0x4a1b8f,_0x2e016d,_0x537325,_0x1de529){var _0x3eaa52={'method':_0x7161('0xcd'),'uri':_0xfe3a76+_0x7161('0xb7')+_0x2e016d+')/Attributes('+_0x537325+')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?'+_0x7161('0xce'),'headers':{'Authorization':_0x7161('0xb4')+_0x1de529,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x3eaa52)[_0x7161('0x1e')](function(_0x48cc79){var _0x3b59bd=[];var _0x47b421=_0x48cc79[_0x7161('0xcf')][_0x7161('0xd0')];_0x47b421[_0x7161('0xbd')](function(_0x175191){_0x3b59bd[_0x7161('0xc0')]({'name':_0x175191['Label'][_0x7161('0xd1')][_0x7161('0xd2')],'value':String(_0x175191[_0x7161('0xd3')])});});var _0x3647f6={'id':_0x1d647e+'_'+_0x48cc79['LogicalName'],'name':_0x48cc79[_0x7161('0xd4')]['UserLocalizedLabel'][_0x7161('0xd2')],'custom':![],'options':_0x3b59bd};_0x4a1b8f[_0x7161('0xc0')](_0x3647f6);return _0x4a1b8f;});}function getBooleanList(_0x5d48c7,_0x43735d,_0x38ac19,_0x26777a,_0x1a9b1b,_0x38a3a5){var _0x141d7f={'method':_0x7161('0xcd'),'uri':_0x5d48c7+_0x7161('0xb7')+_0x26777a+_0x7161('0xd5')+_0x1a9b1b+_0x7161('0xd6'),'headers':{'Authorization':'Bearer\x20'+_0x38a3a5,'If-None-Match':null,'OData-Version':_0x7161('0xb5')},'json':!![]};return rp(_0x141d7f)[_0x7161('0x1e')](function(_0x50ab2a){var _0x3f4320=[];_0x3f4320['push']({'name':_0x50ab2a[_0x7161('0xcf')][_0x7161('0xd7')][_0x7161('0xd2')][_0x7161('0xd1')][_0x7161('0xd2')],'value':_0x7161('0xd8')},{'name':_0x50ab2a[_0x7161('0xcf')][_0x7161('0xd9')][_0x7161('0xd2')][_0x7161('0xd1')][_0x7161('0xd2')],'value':'false'});var _0x2476c9={'id':_0x43735d+'_'+_0x50ab2a[_0x7161('0xbc')],'name':_0x50ab2a[_0x7161('0xd4')][_0x7161('0xd1')][_0x7161('0xd2')],'custom':![],'options':_0x3f4320};_0x38ac19[_0x7161('0xc0')](_0x2476c9);return _0x38ac19;});}function getInputList(_0x114720,_0x1bf8e6,_0x168128,_0x2ac8d3,_0xcab222,_0x4e92a2,_0xb819c3){var _0x5c88a3={'method':_0x7161('0xcd'),'uri':_0x114720+'EntityDefinitions('+_0xcab222+_0x7161('0xd5')+_0x4e92a2+_0x7161('0xda')+_0x168128+_0x7161('0xdb'),'headers':{'Authorization':_0x7161('0xb4')+_0xb819c3,'If-None-Match':null,'OData-Version':_0x7161('0xb5')},'json':!![]};return rp(_0x5c88a3)['then'](function(_0x3ca0bc){var _0xf57dd0={'id':_0x1bf8e6+'_'+_0x3ca0bc[_0x7161('0xbc')],'name':_0x3ca0bc[_0x7161('0xd4')]['UserLocalizedLabel']?_0x3ca0bc['DisplayName'][_0x7161('0xd1')][_0x7161('0xd2')]:_0x3ca0bc['LogicalName'],'custom':![],'options':[]};_0x2ac8d3['push'](_0xf57dd0);return _0x2ac8d3;});}
\ No newline at end of file
diff --git a/server/api/intDynamics365Account/intDynamics365Account.model.js b/server/api/intDynamics365Account/intDynamics365Account.model.js
index d6bdb60..68dd3d7 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 _0x6675=['rimraf','exports','define','Dynamics365Account','util','api','moment','bluebird','path'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x6675,0x190));var _0x5667=function(_0x1553b4,_0x102f0b){_0x1553b4=_0x1553b4-0x0;var _0x5956b5=_0x6675[_0x1553b4];return _0x5956b5;};'use strict';var _=require('lodash');var util=require(_0x5667('0x0'));var logger=require('../../config/logger')(_0x5667('0x1'));var moment=require(_0x5667('0x2'));var BPromise=require(_0x5667('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5667('0x4'));var rimraf=require(_0x5667('0x5'));var config=require('../../config/environment');var attributes=require('./intDynamics365Account.attributes');var integrations=require('../../components/integrations/configuration');module[_0x5667('0x6')]=function(_0x5f3c1f,_0x1d65ad){return _0x5f3c1f[_0x5667('0x7')](_0x5667('0x8'),attributes,{'tableName':'int_dynamics365_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe9a1=['./intDynamics365Account.attributes','exports','define','Dynamics365Account','lodash','util','api','moment','bluebird','path','../../config/environment'];(function(_0x112571,_0x59086f){var _0x19bb43=function(_0x5d32d5){while(--_0x5d32d5){_0x112571['push'](_0x112571['shift']());}};_0x19bb43(++_0x59086f);}(_0xe9a1,0xf6));var _0x1e9a=function(_0x3e4a61,_0x59a7c0){_0x3e4a61=_0x3e4a61-0x0;var _0x2361b5=_0xe9a1[_0x3e4a61];return _0x2361b5;};'use strict';var _=require(_0x1e9a('0x0'));var util=require(_0x1e9a('0x1'));var logger=require('../../config/logger')(_0x1e9a('0x2'));var moment=require(_0x1e9a('0x3'));var BPromise=require(_0x1e9a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1e9a('0x5'));var rimraf=require('rimraf');var config=require(_0x1e9a('0x6'));var attributes=require(_0x1e9a('0x7'));var integrations=require('../../components/integrations/configuration');module[_0x1e9a('0x8')]=function(_0x2e6781,_0x3122bb){return _0x2e6781[_0x1e9a('0x9')](_0x1e9a('0xa'),attributes,{'tableName':'int_dynamics365_accounts','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 b5a2fb3..552fbef 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 _0x7f59=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','request','Dynamics365Account,\x20%s,\x20%s','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result','Dynamics365Account','options','raw','where','attributes','limit','map','include','model','then','GetDynamics365Account','ShowDynamics365Account','find','catch','lodash','util','bluebird','randomstring'];(function(_0x2d1d4c,_0x1fcc88){var _0x3a5d22=function(_0x148295){while(--_0x148295){_0x2d1d4c['push'](_0x2d1d4c['shift']());}};_0x3a5d22(++_0x1fcc88);}(_0x7f59,0x12e));var _0x97f5=function(_0x1ad3dc,_0x57a8d9){_0x1ad3dc=_0x1ad3dc-0x0;var _0x45f8ce=_0x7f59[_0x1ad3dc];return _0x45f8ce;};'use strict';var _=require(_0x97f5('0x0'));var util=require(_0x97f5('0x1'));var moment=require('moment');var BPromise=require(_0x97f5('0x2'));var rs=require(_0x97f5('0x3'));var fs=require('fs');var Redis=require(_0x97f5('0x4'));var db=require(_0x97f5('0x5'))['db'];var utils=require(_0x97f5('0x6'));var logger=require(_0x97f5('0x7'))(_0x97f5('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2ad891,_0x1d0a13,_0x3d25ec){return new BPromise(function(_0x317b2d,_0x3637fd){return client[_0x97f5('0x9')](_0x2ad891,_0x3d25ec)['then'](function(_0x492ff0){logger['info'](_0x97f5('0xa'),_0x1d0a13,'request\x20sent');logger[_0x97f5('0xb')](_0x97f5('0xc'),_0x1d0a13,'request\x20sent',JSON[_0x97f5('0xd')](_0x492ff0));if(_0x492ff0[_0x97f5('0xe')]){if(_0x492ff0[_0x97f5('0xe')][_0x97f5('0xf')]===0x1f4){logger['error'](_0x97f5('0xa'),_0x1d0a13,_0x492ff0['error']['message']);return _0x3637fd(_0x492ff0['error'][_0x97f5('0x10')]);}logger['error'](_0x97f5('0xa'),_0x1d0a13,_0x492ff0['error'][_0x97f5('0x10')]);return _0x317b2d(_0x492ff0[_0x97f5('0xe')][_0x97f5('0x10')]);}else{logger[_0x97f5('0x11')](_0x97f5('0xa'),_0x1d0a13,_0x97f5('0x12'));_0x317b2d(_0x492ff0[_0x97f5('0x13')][_0x97f5('0x10')]);}})['catch'](function(_0x4c1392){logger[_0x97f5('0xe')](_0x97f5('0xa'),_0x1d0a13,_0x4c1392);_0x3637fd(_0x4c1392);});});}exports['GetDynamics365Account']=function(_0x197be7){var _0x441231=this;return new Promise(function(_0x26caac,_0x1013cc){return db[_0x97f5('0x14')]['findAll']({'raw':_0x197be7[_0x97f5('0x15')]?_0x197be7[_0x97f5('0x15')][_0x97f5('0x16')]===undefined?!![]:![]:!![],'where':_0x197be7['options']?_0x197be7['options'][_0x97f5('0x17')]||null:null,'attributes':_0x197be7['options']?_0x197be7[_0x97f5('0x15')][_0x97f5('0x18')]||null:null,'limit':_0x197be7[_0x97f5('0x15')]?_0x197be7[_0x97f5('0x15')][_0x97f5('0x19')]||null:null,'include':_0x197be7[_0x97f5('0x15')]?_0x197be7[_0x97f5('0x15')]['include']?_[_0x97f5('0x1a')](_0x197be7['options'][_0x97f5('0x1b')],function(_0x57281e){return{'model':db[_0x57281e[_0x97f5('0x1c')]],'as':_0x57281e['as'],'attributes':_0x57281e[_0x97f5('0x18')],'include':_0x57281e[_0x97f5('0x1b')]?_['map'](_0x57281e[_0x97f5('0x1b')],function(_0xefef9a){return{'model':db[_0xefef9a[_0x97f5('0x1c')]],'as':_0xefef9a['as'],'attributes':_0xefef9a[_0x97f5('0x18')],'include':_0xefef9a[_0x97f5('0x1b')]?_[_0x97f5('0x1a')](_0xefef9a[_0x97f5('0x1b')],function(_0x284265){return{'model':db[_0x284265['model']],'as':_0x284265['as'],'attributes':_0x284265['attributes']};}):[]};}):[]};}):[]:[]})[_0x97f5('0x1d')](function(_0x506f55){logger[_0x97f5('0x11')](_0x97f5('0x1e'),_0x197be7);logger[_0x97f5('0xb')](_0x97f5('0x1e'),_0x197be7,JSON[_0x97f5('0xd')](_0x506f55));_0x26caac(_0x506f55);})['catch'](function(_0x48e1e5){logger[_0x97f5('0xe')]('GetDynamics365Account',_0x48e1e5[_0x97f5('0x10')],_0x197be7);_0x1013cc(_0x441231[_0x97f5('0xe')](0x1f4,_0x48e1e5[_0x97f5('0x10')]));});});};exports[_0x97f5('0x1f')]=function(_0x40b831){var _0xf805db=this;return new Promise(function(_0x2aee98,_0x134b42){return db[_0x97f5('0x14')][_0x97f5('0x20')]({'raw':_0x40b831[_0x97f5('0x15')]?_0x40b831[_0x97f5('0x15')][_0x97f5('0x16')]===undefined?!![]:![]:!![],'where':_0x40b831[_0x97f5('0x15')]?_0x40b831['options'][_0x97f5('0x17')]||null:null,'attributes':_0x40b831[_0x97f5('0x15')]?_0x40b831['options']['attributes']||null:null,'include':_0x40b831[_0x97f5('0x15')]?_0x40b831[_0x97f5('0x15')][_0x97f5('0x1b')]?_[_0x97f5('0x1a')](_0x40b831['options']['include'],function(_0x20e05b){return{'model':db[_0x20e05b[_0x97f5('0x1c')]],'as':_0x20e05b['as'],'attributes':_0x20e05b['attributes'],'include':_0x20e05b[_0x97f5('0x1b')]?_['map'](_0x20e05b[_0x97f5('0x1b')],function(_0xf4ab6d){return{'model':db[_0xf4ab6d['model']],'as':_0xf4ab6d['as'],'attributes':_0xf4ab6d['attributes'],'include':_0xf4ab6d['include']?_[_0x97f5('0x1a')](_0xf4ab6d[_0x97f5('0x1b')],function(_0x9ed859){return{'model':db[_0x9ed859[_0x97f5('0x1c')]],'as':_0x9ed859['as'],'attributes':_0x9ed859['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x3fb8e7){logger[_0x97f5('0x11')]('ShowDynamics365Account',_0x40b831);logger[_0x97f5('0xb')](_0x97f5('0x1f'),_0x40b831,JSON[_0x97f5('0xd')](_0x3fb8e7));_0x2aee98(_0x3fb8e7);})[_0x97f5('0x21')](function(_0x29b75d){logger[_0x97f5('0xe')](_0x97f5('0x1f'),_0x29b75d['message'],_0x40b831);_0x134b42(_0xf805db[_0x97f5('0xe')](0x1f4,_0x29b75d[_0x97f5('0x10')]));});});};
\ No newline at end of file
+var _0xb242=['include','map','ShowDynamics365Account','find','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','catch','GetDynamics365Account','Dynamics365Account','findAll','raw','options','where','attributes','model'];(function(_0x3eb713,_0x437874){var _0x1d7128=function(_0x2b9cea){while(--_0x2b9cea){_0x3eb713['push'](_0x3eb713['shift']());}};_0x1d7128(++_0x437874);}(_0xb242,0x1f3));var _0x2b24=function(_0x2fbcf6,_0x2e7155){_0x2fbcf6=_0x2fbcf6-0x0;var _0x3e7265=_0xb242[_0x2fbcf6];return _0x3e7265;};'use strict';var _=require('lodash');var util=require(_0x2b24('0x0'));var moment=require(_0x2b24('0x1'));var BPromise=require(_0x2b24('0x2'));var rs=require(_0x2b24('0x3'));var fs=require('fs');var Redis=require(_0x2b24('0x4'));var db=require(_0x2b24('0x5'))['db'];var utils=require(_0x2b24('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x2b24('0x7'));var jayson=require(_0x2b24('0x8'));var client=jayson['client'][_0x2b24('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x477e45,_0x179d9a,_0x53345b){return new BPromise(function(_0x475271,_0x56c14a){return client[_0x2b24('0xa')](_0x477e45,_0x53345b)[_0x2b24('0xb')](function(_0x529939){logger[_0x2b24('0xc')]('Dynamics365Account,\x20%s,\x20%s',_0x179d9a,_0x2b24('0xd'));logger[_0x2b24('0xe')]('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x179d9a,'request\x20sent',JSON[_0x2b24('0xf')](_0x529939));if(_0x529939['error']){if(_0x529939[_0x2b24('0x10')][_0x2b24('0x11')]===0x1f4){logger[_0x2b24('0x10')](_0x2b24('0x12'),_0x179d9a,_0x529939['error']['message']);return _0x56c14a(_0x529939[_0x2b24('0x10')][_0x2b24('0x13')]);}logger[_0x2b24('0x10')](_0x2b24('0x12'),_0x179d9a,_0x529939[_0x2b24('0x10')]['message']);return _0x475271(_0x529939[_0x2b24('0x10')][_0x2b24('0x13')]);}else{logger['info'](_0x2b24('0x12'),_0x179d9a,_0x2b24('0xd'));_0x475271(_0x529939['result'][_0x2b24('0x13')]);}})[_0x2b24('0x14')](function(_0x2fdc73){logger[_0x2b24('0x10')]('Dynamics365Account,\x20%s,\x20%s',_0x179d9a,_0x2fdc73);_0x56c14a(_0x2fdc73);});});}exports[_0x2b24('0x15')]=function(_0x2815dc){var _0x135261=this;return new Promise(function(_0x4951af,_0x1eb73f){return db[_0x2b24('0x16')][_0x2b24('0x17')]({'raw':_0x2815dc['options']?_0x2815dc['options'][_0x2b24('0x18')]===undefined?!![]:![]:!![],'where':_0x2815dc[_0x2b24('0x19')]?_0x2815dc[_0x2b24('0x19')][_0x2b24('0x1a')]||null:null,'attributes':_0x2815dc['options']?_0x2815dc[_0x2b24('0x19')][_0x2b24('0x1b')]||null:null,'limit':_0x2815dc[_0x2b24('0x19')]?_0x2815dc[_0x2b24('0x19')]['limit']||null:null,'include':_0x2815dc['options']?_0x2815dc[_0x2b24('0x19')]['include']?_['map'](_0x2815dc['options']['include'],function(_0x2acfcf){return{'model':db[_0x2acfcf[_0x2b24('0x1c')]],'as':_0x2acfcf['as'],'attributes':_0x2acfcf[_0x2b24('0x1b')],'include':_0x2acfcf[_0x2b24('0x1d')]?_['map'](_0x2acfcf['include'],function(_0x4d25e4){return{'model':db[_0x4d25e4[_0x2b24('0x1c')]],'as':_0x4d25e4['as'],'attributes':_0x4d25e4[_0x2b24('0x1b')],'include':_0x4d25e4[_0x2b24('0x1d')]?_[_0x2b24('0x1e')](_0x4d25e4['include'],function(_0x5c9efb){return{'model':db[_0x5c9efb[_0x2b24('0x1c')]],'as':_0x5c9efb['as'],'attributes':_0x5c9efb[_0x2b24('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5765b5){logger[_0x2b24('0xc')]('GetDynamics365Account',_0x2815dc);logger['debug'](_0x2b24('0x15'),_0x2815dc,JSON[_0x2b24('0xf')](_0x5765b5));_0x4951af(_0x5765b5);})[_0x2b24('0x14')](function(_0x3183cd){logger['error'](_0x2b24('0x15'),_0x3183cd['message'],_0x2815dc);_0x1eb73f(_0x135261[_0x2b24('0x10')](0x1f4,_0x3183cd[_0x2b24('0x13')]));});});};exports[_0x2b24('0x1f')]=function(_0x12c529){var _0x316253=this;return new Promise(function(_0x8717e,_0x3ca905){return db[_0x2b24('0x16')][_0x2b24('0x20')]({'raw':_0x12c529[_0x2b24('0x19')]?_0x12c529[_0x2b24('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x12c529[_0x2b24('0x19')]?_0x12c529['options'][_0x2b24('0x1a')]||null:null,'attributes':_0x12c529['options']?_0x12c529[_0x2b24('0x19')][_0x2b24('0x1b')]||null:null,'include':_0x12c529['options']?_0x12c529[_0x2b24('0x19')][_0x2b24('0x1d')]?_['map'](_0x12c529[_0x2b24('0x19')][_0x2b24('0x1d')],function(_0x243ed5){return{'model':db[_0x243ed5['model']],'as':_0x243ed5['as'],'attributes':_0x243ed5[_0x2b24('0x1b')],'include':_0x243ed5[_0x2b24('0x1d')]?_['map'](_0x243ed5[_0x2b24('0x1d')],function(_0x45ddd4){return{'model':db[_0x45ddd4['model']],'as':_0x45ddd4['as'],'attributes':_0x45ddd4[_0x2b24('0x1b')],'include':_0x45ddd4[_0x2b24('0x1d')]?_['map'](_0x45ddd4[_0x2b24('0x1d')],function(_0x2f974d){return{'model':db[_0x2f974d[_0x2b24('0x1c')]],'as':_0x2f974d['as'],'attributes':_0x2f974d['attributes']};}):[]};}):[]};}):[]:[]})[_0x2b24('0xb')](function(_0x214f3d){logger[_0x2b24('0xc')](_0x2b24('0x1f'),_0x12c529);logger['debug'](_0x2b24('0x1f'),_0x12c529,JSON[_0x2b24('0xf')](_0x214f3d));_0x8717e(_0x214f3d);})[_0x2b24('0x14')](function(_0x1810b4){logger[_0x2b24('0x10')](_0x2b24('0x1f'),_0x1810b4['message'],_0x12c529);_0x3ca905(_0x316253[_0x2b24('0x10')](0x1f4,_0x1810b4[_0x2b24('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/index.js b/server/api/intDynamics365Configuration/index.js
index 4f9f67b..635969e 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 _0x4c9d=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','delete'];(function(_0x507b3b,_0x30c190){var _0xe1e48e=function(_0x1865ed){while(--_0x1865ed){_0x507b3b['push'](_0x507b3b['shift']());}};_0xe1e48e(++_0x30c190);}(_0x4c9d,0x9b));var _0xd4c9=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x4c9d[_0x501510];return _0x1e6ee5;};'use strict';var multer=require(_0xd4c9('0x0'));var util=require(_0xd4c9('0x1'));var path=require(_0xd4c9('0x2'));var timeout=require(_0xd4c9('0x3'));var express=require(_0xd4c9('0x4'));var router=express[_0xd4c9('0x5')]();var auth=require(_0xd4c9('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intDynamics365Configuration.controller');router[_0xd4c9('0x7')]('/',auth[_0xd4c9('0x8')](),controller[_0xd4c9('0x9')]);router[_0xd4c9('0x7')](_0xd4c9('0xa'),auth['isAuthenticated'](),controller[_0xd4c9('0xb')]);router['get']('/:id/fields',auth[_0xd4c9('0x8')](),controller[_0xd4c9('0xc')]);router[_0xd4c9('0x7')](_0xd4c9('0xd'),auth[_0xd4c9('0x8')](),controller[_0xd4c9('0xe')]);router[_0xd4c9('0x7')](_0xd4c9('0xf'),auth['isAuthenticated'](),controller[_0xd4c9('0x10')]);router[_0xd4c9('0x11')]('/',auth[_0xd4c9('0x8')](),controller[_0xd4c9('0x12')]);router[_0xd4c9('0x13')](_0xd4c9('0xa'),auth[_0xd4c9('0x8')](),controller['update']);router[_0xd4c9('0x14')](_0xd4c9('0xa'),auth[_0xd4c9('0x8')](),controller['destroy']);module[_0xd4c9('0x15')]=router;
\ No newline at end of file
+var _0xe23d=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Configuration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','exports','multer','util','path','express'];(function(_0x4b7895,_0x3c4f5d){var _0x264180=function(_0xe0e861){while(--_0xe0e861){_0x4b7895['push'](_0x4b7895['shift']());}};_0x264180(++_0x3c4f5d);}(_0xe23d,0x1d0));var _0xde23=function(_0x376a7d,_0xf534){_0x376a7d=_0x376a7d-0x0;var _0x34b2aa=_0xe23d[_0x376a7d];return _0x34b2aa;};'use strict';var multer=require(_0xde23('0x0'));var util=require(_0xde23('0x1'));var path=require(_0xde23('0x2'));var timeout=require('connect-timeout');var express=require(_0xde23('0x3'));var router=express[_0xde23('0x4')]();var auth=require(_0xde23('0x5'));var interaction=require(_0xde23('0x6'));var config=require(_0xde23('0x7'));var controller=require(_0xde23('0x8'));router[_0xde23('0x9')]('/',auth[_0xde23('0xa')](),controller[_0xde23('0xb')]);router[_0xde23('0x9')](_0xde23('0xc'),auth[_0xde23('0xa')](),controller[_0xde23('0xd')]);router[_0xde23('0x9')](_0xde23('0xe'),auth[_0xde23('0xa')](),controller[_0xde23('0xf')]);router[_0xde23('0x9')]('/:id/subjects',auth['isAuthenticated'](),controller[_0xde23('0x10')]);router[_0xde23('0x9')](_0xde23('0x11'),auth[_0xde23('0xa')](),controller[_0xde23('0x12')]);router[_0xde23('0x13')]('/',auth[_0xde23('0xa')](),controller[_0xde23('0x14')]);router[_0xde23('0x15')](_0xde23('0xc'),auth[_0xde23('0xa')](),controller[_0xde23('0x16')]);router[_0xde23('0x17')](_0xde23('0xc'),auth[_0xde23('0xa')](),controller[_0xde23('0x18')]);module[_0xde23('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js
index 0d1e79c..12764e3 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 _0x144d=['ENUM','incident','sequelize','exports','STRING'];(function(_0x1e3089,_0x2c09de){var _0x525dd3=function(_0x4bb8f1){while(--_0x4bb8f1){_0x1e3089['push'](_0x1e3089['shift']());}};_0x525dd3(++_0x2c09de);}(_0x144d,0x1c9));var _0xd144=function(_0x3b3c7f,_0x39e199){_0x3b3c7f=_0x3b3c7f-0x0;var _0x118eac=_0x144d[_0x3b3c7f];return _0x118eac;};'use strict';var Sequelize=require(_0xd144('0x0'));module[_0xd144('0x1')]={'name':{'type':Sequelize[_0xd144('0x2')]},'description':{'type':Sequelize[_0xd144('0x2')]},'ticketType':{'type':Sequelize[_0xd144('0x3')](_0xd144('0x4'),'phonecall'),'defaultValue':_0xd144('0x4')}};
\ No newline at end of file
+var _0x3a0b=['STRING','ENUM','incident','phonecall'];(function(_0x31cb5f,_0x2df766){var _0x586042=function(_0x53c807){while(--_0x53c807){_0x31cb5f['push'](_0x31cb5f['shift']());}};_0x586042(++_0x2df766);}(_0x3a0b,0x150));var _0xb3a0=function(_0xcf5436,_0x4632c3){_0xcf5436=_0xcf5436-0x0;var _0xc4f5c8=_0x3a0b[_0xcf5436];return _0xc4f5c8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xb3a0('0x0')]},'description':{'type':Sequelize[_0xb3a0('0x0')]},'ticketType':{'type':Sequelize[_0xb3a0('0x1')](_0xb3a0('0x2'),_0xb3a0('0x3')),'defaultValue':'incident'}};
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js
index b78f98a..e36d9ad 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 _0x5c4f=['stringify','error','code','message','result','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','destroy','stack','name','send','index','Dynamics365Configuration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','map','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','options','create','body','find','getFields','Dynamics365Field','pick','getSubjects','findOne','getDescriptions','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','Dynamics365Configuration,\x20%s,\x20%s,\x20%s'];(function(_0x5c292b,_0x1187b2){var _0x4c01df=function(_0x509719){while(--_0x509719){_0x5c292b['push'](_0x5c292b['shift']());}};_0x4c01df(++_0x1187b2);}(_0x5c4f,0xfd));var _0xf5c4=function(_0x48a62b,_0x51fdb1){_0x48a62b=_0x48a62b-0x0;var _0xf7e9e0=_0x5c4f[_0x48a62b];return _0xf7e9e0;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xf5c4('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xf5c4('0x1'));var rp=require(_0xf5c4('0x2'));var moment=require(_0xf5c4('0x3'));var BPromise=require(_0xf5c4('0x4'));var Mustache=require(_0xf5c4('0x5'));var util=require(_0xf5c4('0x6'));var path=require(_0xf5c4('0x7'));var sox=require(_0xf5c4('0x8'));var csv=require('to-csv');var ejs=require(_0xf5c4('0x9'));var fs=require('fs');var _=require(_0xf5c4('0xa'));var squel=require(_0xf5c4('0xb'));var crypto=require(_0xf5c4('0xc'));var jsforce=require(_0xf5c4('0xd'));var deskjs=require(_0xf5c4('0xe'));var toCsv=require(_0xf5c4('0xf'));var querystring=require(_0xf5c4('0x10'));var Papa=require(_0xf5c4('0x11'));var Redis=require(_0xf5c4('0x12'));var authService=require(_0xf5c4('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xf5c4('0x14'))('api');var utils=require(_0xf5c4('0x15'));var config=require(_0xf5c4('0x16'));var db=require(_0xf5c4('0x17'))['db'];var jayson=require(_0xf5c4('0x18'));var client=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0x5d99a1,_0x42af14,_0x1aaf90){if(_0x1aaf90){var _0x3417fe=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3417fe[_0xf5c4('0x19')](_0x42af14)){return _0x5d99a1;}else{throw new db[(_0xf5c4('0x1a'))][(_0xf5c4('0x1b'))](_0xf5c4('0x1c'));}}else{return _0x5d99a1;}}function respondWithRpcPromise(_0x1d6715,_0x2861f7,_0x26975f,_0x467c65){return new BPromise(function(_0x4b1b95,_0x251b5d){var _0x4aadb3=_0x467c65||client;return _0x4aadb3[_0xf5c4('0x1d')](_0x1d6715,_0x26975f)[_0xf5c4('0x1e')](function(_0x12530a){logger[_0xf5c4('0x1f')](_0xf5c4('0x20'),_0x2861f7,_0xf5c4('0x21'));logger['debug'](_0xf5c4('0x22'),_0x2861f7,_0xf5c4('0x21'),JSON[_0xf5c4('0x23')](_0x12530a));if(_0x12530a[_0xf5c4('0x24')]){if(_0x12530a[_0xf5c4('0x24')][_0xf5c4('0x25')]===0x1f4){logger[_0xf5c4('0x24')](_0xf5c4('0x20'),_0x2861f7,_0x12530a[_0xf5c4('0x24')][_0xf5c4('0x26')]);return _0x251b5d(_0x12530a['error'][_0xf5c4('0x26')]);}logger[_0xf5c4('0x24')](_0xf5c4('0x20'),_0x2861f7,_0x12530a['error'][_0xf5c4('0x26')]);return _0x4b1b95(_0x12530a[_0xf5c4('0x24')][_0xf5c4('0x26')]);}else{logger[_0xf5c4('0x1f')]('Dynamics365Configuration,\x20%s,\x20%s',_0x2861f7,_0xf5c4('0x21'));_0x4b1b95(_0x12530a[_0xf5c4('0x27')][_0xf5c4('0x26')]);}})['catch'](function(_0x52b1b4){logger[_0xf5c4('0x24')]('Dynamics365Configuration,\x20%s,\x20%s',_0x2861f7,_0x52b1b4);_0x251b5d(_0x52b1b4);});});}function respondWithStatusCode(_0x498e3b,_0x2da044){_0x2da044=_0x2da044||0xcc;return function(_0x343208){if(_0x343208){return _0x498e3b[_0xf5c4('0x28')](_0x2da044);}return _0x498e3b[_0xf5c4('0x29')](_0x2da044)[_0xf5c4('0x2a')]();};}function respondWithResult(_0x2e118a,_0x524d90){_0x524d90=_0x524d90||0xc8;return function(_0x114e4d){if(_0x114e4d){return _0x2e118a[_0xf5c4('0x29')](_0x524d90)[_0xf5c4('0x2b')](_0x114e4d);}};}function respondWithFilteredResult(_0xea9c82,_0x51c1ba){return function(_0x277230){if(_0x277230){var _0x404500=_0x277230[_0xf5c4('0x2c')],_0x584ac5=_0x51c1ba['offset'],_0x1b3dd9=_0x51c1ba[_0xf5c4('0x2d')]+_0x51c1ba[_0xf5c4('0x2e')],_0x340b27;if(_0x1b3dd9>=_0x404500){_0x1b3dd9=_0x404500;_0x340b27=0xc8;}else{_0x340b27=0xce;}_0xea9c82[_0xf5c4('0x29')](_0x340b27);return _0xea9c82[_0xf5c4('0x2f')](_0xf5c4('0x30'),_0x584ac5+'-'+_0x1b3dd9+'/'+_0x404500)['json'](_0x277230);}return null;};}function patchUpdates(_0x50c57e){return function(_0x318431){try{jsonpatch[_0xf5c4('0x31')](_0x318431,_0x50c57e,!![]);}catch(_0x59740b){return BPromise[_0xf5c4('0x32')](_0x59740b);}return _0x318431['save']();};}function saveUpdates(_0x32f9e0,_0x445cf8){return function(_0x1d2652){if(_0x1d2652){return _0x1d2652[_0xf5c4('0x33')](_0x32f9e0)[_0xf5c4('0x1e')](function(_0xc7c317){return _0xc7c317;});}return null;};}function removeEntity(_0x461990,_0x4f3afc){return function(_0x1d425d){if(_0x1d425d){return _0x1d425d[_0xf5c4('0x34')]()[_0xf5c4('0x1e')](function(){_0x461990[_0xf5c4('0x29')](0xcc)[_0xf5c4('0x2a')]();});}};}function handleEntityNotFound(_0x3dd4b9,_0x85628){return function(_0x25e8bc){if(!_0x25e8bc){_0x3dd4b9[_0xf5c4('0x28')](0x194);}return _0x25e8bc;};}function handleError(_0x1b4416,_0x1f8e11){_0x1f8e11=_0x1f8e11||0x1f4;return function(_0x131828){logger[_0xf5c4('0x24')](_0x131828[_0xf5c4('0x35')]);if(_0x131828[_0xf5c4('0x36')]){delete _0x131828['name'];}_0x1b4416['status'](_0x1f8e11)[_0xf5c4('0x37')](_0x131828);};}exports[_0xf5c4('0x38')]=function(_0x126b75,_0x35ec37){var _0x48da07={},_0x50f18c={},_0x53869e={'count':0x0,'rows':[]};var _0x45ac80=_['map'](db[_0xf5c4('0x39')][_0xf5c4('0x3a')],function(_0x526d49){return{'name':_0x526d49[_0xf5c4('0x3b')],'type':_0x526d49[_0xf5c4('0x3c')][_0xf5c4('0x3d')]};});_0x50f18c[_0xf5c4('0x3e')]=_['map'](_0x45ac80,'name');_0x50f18c[_0xf5c4('0x3f')]=_[_0xf5c4('0x40')](_0x126b75['query']);_0x50f18c[_0xf5c4('0x41')]=_[_0xf5c4('0x42')](_0x50f18c['model'],_0x50f18c[_0xf5c4('0x3f')]);_0x48da07[_0xf5c4('0x43')]=_[_0xf5c4('0x42')](_0x50f18c['model'],qs[_0xf5c4('0x44')](_0x126b75[_0xf5c4('0x3f')][_0xf5c4('0x44')]));_0x48da07['attributes']=_0x48da07[_0xf5c4('0x43')][_0xf5c4('0x45')]?_0x48da07[_0xf5c4('0x43')]:_0x50f18c[_0xf5c4('0x3e')];if(!_0x126b75[_0xf5c4('0x3f')][_0xf5c4('0x46')](_0xf5c4('0x47'))){_0x48da07[_0xf5c4('0x2e')]=qs[_0xf5c4('0x2e')](_0x126b75[_0xf5c4('0x3f')][_0xf5c4('0x2e')]);_0x48da07[_0xf5c4('0x2d')]=qs[_0xf5c4('0x2d')](_0x126b75[_0xf5c4('0x3f')][_0xf5c4('0x2d')]);}_0x48da07[_0xf5c4('0x48')]=qs[_0xf5c4('0x49')](_0x126b75['query'][_0xf5c4('0x49')]);_0x48da07[_0xf5c4('0x4a')]=qs[_0xf5c4('0x41')](_['pick'](_0x126b75[_0xf5c4('0x3f')],_0x50f18c[_0xf5c4('0x41')]));if(_0x126b75['query'][_0xf5c4('0x4b')]){_0x48da07[_0xf5c4('0x4a')]=_[_0xf5c4('0x4c')](_0x48da07[_0xf5c4('0x4a')],{'$or':_[_0xf5c4('0x4d')](_0x45ac80,function(_0x375146){if(_0x375146[_0xf5c4('0x3c')]!==_0xf5c4('0x4e')){var _0x5383ff={};_0x5383ff[_0x375146[_0xf5c4('0x36')]]={'$like':'%'+_0x126b75[_0xf5c4('0x3f')][_0xf5c4('0x4b')]+'%'};return _0x5383ff;}})});}_0x48da07=_['merge']({},_0x48da07,_0x126b75['options']);var _0x217265={'where':_0x48da07[_0xf5c4('0x4a')]};return db[_0xf5c4('0x39')][_0xf5c4('0x2c')](_0x217265)[_0xf5c4('0x1e')](function(_0x6ab478){_0x53869e[_0xf5c4('0x2c')]=_0x6ab478;if(_0x126b75[_0xf5c4('0x3f')][_0xf5c4('0x4f')]){_0x48da07[_0xf5c4('0x50')]=[{'all':!![]}];}return db[_0xf5c4('0x39')][_0xf5c4('0x51')](_0x48da07);})[_0xf5c4('0x1e')](function(_0x2111f9){_0x53869e[_0xf5c4('0x52')]=_0x2111f9;return _0x53869e;})[_0xf5c4('0x1e')](respondWithFilteredResult(_0x35ec37,_0x48da07))[_0xf5c4('0x53')](handleError(_0x35ec37,null));};exports[_0xf5c4('0x54')]=function(_0x1fb230,_0x3a9a41){var _0x3d2881={'raw':![],'where':{'id':_0x1fb230[_0xf5c4('0x55')]['id']}},_0x59adc4={};_0x59adc4[_0xf5c4('0x3e')]=_[_0xf5c4('0x40')](db[_0xf5c4('0x39')]['rawAttributes']);_0x59adc4[_0xf5c4('0x3f')]=_[_0xf5c4('0x40')](_0x1fb230[_0xf5c4('0x3f')]);_0x59adc4[_0xf5c4('0x41')]=_['intersection'](_0x59adc4[_0xf5c4('0x3e')],_0x59adc4['query']);_0x3d2881[_0xf5c4('0x43')]=_[_0xf5c4('0x42')](_0x59adc4['model'],qs[_0xf5c4('0x44')](_0x1fb230[_0xf5c4('0x3f')][_0xf5c4('0x44')]));_0x3d2881[_0xf5c4('0x43')]=_0x3d2881[_0xf5c4('0x43')]['length']?_0x3d2881[_0xf5c4('0x43')]:_0x59adc4[_0xf5c4('0x3e')];if(_0x1fb230[_0xf5c4('0x3f')][_0xf5c4('0x4f')]){_0x3d2881[_0xf5c4('0x50')]=[{'all':!![]}];}_0x3d2881=_[_0xf5c4('0x4c')]({},_0x3d2881,_0x1fb230[_0xf5c4('0x56')]);return db[_0xf5c4('0x39')]['find'](_0x3d2881)[_0xf5c4('0x1e')](handleEntityNotFound(_0x3a9a41,null))[_0xf5c4('0x1e')](respondWithResult(_0x3a9a41,null))[_0xf5c4('0x53')](handleError(_0x3a9a41,null));};exports[_0xf5c4('0x57')]=function(_0xb66295,_0x2d63ac){return db[_0xf5c4('0x39')][_0xf5c4('0x57')](_0xb66295['body'],{})[_0xf5c4('0x1e')](respondWithResult(_0x2d63ac,0xc9))[_0xf5c4('0x53')](handleError(_0x2d63ac,null));};exports[_0xf5c4('0x33')]=function(_0x4ff3d2,_0x9277c8){if(_0x4ff3d2['body']['id']){delete _0x4ff3d2[_0xf5c4('0x58')]['id'];}return db[_0xf5c4('0x39')][_0xf5c4('0x59')]({'where':{'id':_0x4ff3d2[_0xf5c4('0x55')]['id']}})[_0xf5c4('0x1e')](handleEntityNotFound(_0x9277c8,null))[_0xf5c4('0x1e')](saveUpdates(_0x4ff3d2[_0xf5c4('0x58')],null))[_0xf5c4('0x1e')](respondWithResult(_0x9277c8,null))[_0xf5c4('0x53')](handleError(_0x9277c8,null));};exports[_0xf5c4('0x34')]=function(_0x590dd3,_0x44da88){return db[_0xf5c4('0x39')][_0xf5c4('0x59')]({'where':{'id':_0x590dd3['params']['id']}})[_0xf5c4('0x1e')](handleEntityNotFound(_0x44da88,null))['then'](removeEntity(_0x44da88,null))['catch'](handleError(_0x44da88,null));};exports[_0xf5c4('0x5a')]=function(_0x33b03c,_0x52ae49,_0x3b9a6c){var _0x37b19d={};var _0x1bb21d={};var _0x10e8e1;var _0x1e15a9;return db[_0xf5c4('0x39')]['findOne']({'where':{'id':_0x33b03c[_0xf5c4('0x55')]['id']}})[_0xf5c4('0x1e')](handleEntityNotFound(_0x52ae49,null))['then'](function(_0x4da6b4){if(_0x4da6b4){_0x10e8e1=_0x4da6b4;_0x1bb21d[_0xf5c4('0x3e')]=_[_0xf5c4('0x40')](db[_0xf5c4('0x5b')][_0xf5c4('0x3a')]);_0x1bb21d[_0xf5c4('0x3f')]=_['keys'](_0x33b03c[_0xf5c4('0x3f')]);_0x1bb21d[_0xf5c4('0x41')]=_['intersection'](_0x1bb21d[_0xf5c4('0x3e')],_0x1bb21d['query']);_0x37b19d[_0xf5c4('0x43')]=_[_0xf5c4('0x42')](_0x1bb21d[_0xf5c4('0x3e')],qs[_0xf5c4('0x44')](_0x33b03c[_0xf5c4('0x3f')]['fields']));_0x37b19d['attributes']=_0x37b19d[_0xf5c4('0x43')]['length']?_0x37b19d[_0xf5c4('0x43')]:_0x1bb21d['model'];_0x37b19d[_0xf5c4('0x48')]=qs[_0xf5c4('0x49')](_0x33b03c[_0xf5c4('0x3f')][_0xf5c4('0x49')]);_0x37b19d['where']=qs[_0xf5c4('0x41')](_[_0xf5c4('0x5c')](_0x33b03c[_0xf5c4('0x3f')],_0x1bb21d[_0xf5c4('0x41')]));if(_0x33b03c[_0xf5c4('0x3f')][_0xf5c4('0x4b')]){_0x37b19d[_0xf5c4('0x4a')]=_[_0xf5c4('0x4c')](_0x37b19d[_0xf5c4('0x4a')],{'$or':_['map'](_0x37b19d[_0xf5c4('0x43')],function(_0x250de1){var _0x305698={};_0x305698[_0x250de1]={'$like':'%'+_0x33b03c['query'][_0xf5c4('0x4b')]+'%'};return _0x305698;})});}_0x37b19d=_['merge']({},_0x37b19d,_0x33b03c['options']);return _0x10e8e1[_0xf5c4('0x5a')](_0x37b19d);}})['then'](function(_0x4d89db){if(_0x4d89db){_0x1e15a9=_0x4d89db[_0xf5c4('0x45')];if(!_0x33b03c[_0xf5c4('0x3f')]['hasOwnProperty'](_0xf5c4('0x47'))){_0x37b19d['limit']=qs[_0xf5c4('0x2e')](_0x33b03c[_0xf5c4('0x3f')][_0xf5c4('0x2e')]);_0x37b19d['offset']=qs[_0xf5c4('0x2d')](_0x33b03c[_0xf5c4('0x3f')]['offset']);}return _0x10e8e1[_0xf5c4('0x5a')](_0x37b19d);}})[_0xf5c4('0x1e')](function(_0x231ae1){if(_0x231ae1){return _0x231ae1?{'count':_0x1e15a9,'rows':_0x231ae1}:null;}})[_0xf5c4('0x1e')](respondWithResult(_0x52ae49,null))[_0xf5c4('0x53')](handleError(_0x52ae49,null));};exports[_0xf5c4('0x5d')]=function(_0x382588,_0x5cfc42,_0xcc2d7d){var _0x21dc45={};var _0x1ba98a={};var _0x52f0be;var _0x37297d;return db[_0xf5c4('0x39')][_0xf5c4('0x5e')]({'where':{'id':_0x382588[_0xf5c4('0x55')]['id']}})[_0xf5c4('0x1e')](handleEntityNotFound(_0x5cfc42,null))[_0xf5c4('0x1e')](function(_0x52ac7c){if(_0x52ac7c){_0x52f0be=_0x52ac7c;_0x1ba98a[_0xf5c4('0x3e')]=_[_0xf5c4('0x40')](db[_0xf5c4('0x5b')]['rawAttributes']);_0x1ba98a[_0xf5c4('0x3f')]=_[_0xf5c4('0x40')](_0x382588[_0xf5c4('0x3f')]);_0x1ba98a['filters']=_['intersection'](_0x1ba98a['model'],_0x1ba98a[_0xf5c4('0x3f')]);_0x21dc45[_0xf5c4('0x43')]=_[_0xf5c4('0x42')](_0x1ba98a[_0xf5c4('0x3e')],qs[_0xf5c4('0x44')](_0x382588[_0xf5c4('0x3f')]['fields']));_0x21dc45[_0xf5c4('0x43')]=_0x21dc45[_0xf5c4('0x43')][_0xf5c4('0x45')]?_0x21dc45[_0xf5c4('0x43')]:_0x1ba98a[_0xf5c4('0x3e')];_0x21dc45[_0xf5c4('0x48')]=qs[_0xf5c4('0x49')](_0x382588['query'][_0xf5c4('0x49')]);_0x21dc45[_0xf5c4('0x4a')]=qs[_0xf5c4('0x41')](_[_0xf5c4('0x5c')](_0x382588[_0xf5c4('0x3f')],_0x1ba98a[_0xf5c4('0x41')]));if(_0x382588['query'][_0xf5c4('0x4b')]){_0x21dc45['where']=_[_0xf5c4('0x4c')](_0x21dc45[_0xf5c4('0x4a')],{'$or':_[_0xf5c4('0x4d')](_0x21dc45[_0xf5c4('0x43')],function(_0xc4e4d1){var _0x551ade={};_0x551ade[_0xc4e4d1]={'$like':'%'+_0x382588[_0xf5c4('0x3f')][_0xf5c4('0x4b')]+'%'};return _0x551ade;})});}_0x21dc45=_[_0xf5c4('0x4c')]({},_0x21dc45,_0x382588['options']);return _0x52f0be[_0xf5c4('0x5d')](_0x21dc45);}})[_0xf5c4('0x1e')](function(_0x552eb3){if(_0x552eb3){_0x37297d=_0x552eb3['length'];if(!_0x382588[_0xf5c4('0x3f')][_0xf5c4('0x46')](_0xf5c4('0x47'))){_0x21dc45['limit']=qs[_0xf5c4('0x2e')](_0x382588[_0xf5c4('0x3f')]['limit']);_0x21dc45[_0xf5c4('0x2d')]=qs[_0xf5c4('0x2d')](_0x382588['query'][_0xf5c4('0x2d')]);}return _0x52f0be[_0xf5c4('0x5d')](_0x21dc45);}})[_0xf5c4('0x1e')](function(_0x293592){if(_0x293592){return _0x293592?{'count':_0x37297d,'rows':_0x293592}:null;}})[_0xf5c4('0x1e')](respondWithResult(_0x5cfc42,null))[_0xf5c4('0x53')](handleError(_0x5cfc42,null));};exports[_0xf5c4('0x5f')]=function(_0x18978a,_0x282ccb,_0x514f8a){var _0xe6a769={};var _0xe28830={};var _0x50e310;var _0x5406da;return db[_0xf5c4('0x39')][_0xf5c4('0x5e')]({'where':{'id':_0x18978a[_0xf5c4('0x55')]['id']}})['then'](handleEntityNotFound(_0x282ccb,null))['then'](function(_0x248bf4){if(_0x248bf4){_0x50e310=_0x248bf4;_0xe28830[_0xf5c4('0x3e')]=_[_0xf5c4('0x40')](db['Dynamics365Field']['rawAttributes']);_0xe28830[_0xf5c4('0x3f')]=_[_0xf5c4('0x40')](_0x18978a[_0xf5c4('0x3f')]);_0xe28830[_0xf5c4('0x41')]=_['intersection'](_0xe28830['model'],_0xe28830[_0xf5c4('0x3f')]);_0xe6a769['attributes']=_['intersection'](_0xe28830[_0xf5c4('0x3e')],qs[_0xf5c4('0x44')](_0x18978a[_0xf5c4('0x3f')][_0xf5c4('0x44')]));_0xe6a769[_0xf5c4('0x43')]=_0xe6a769['attributes']['length']?_0xe6a769[_0xf5c4('0x43')]:_0xe28830[_0xf5c4('0x3e')];_0xe6a769[_0xf5c4('0x48')]=qs['sort'](_0x18978a[_0xf5c4('0x3f')][_0xf5c4('0x49')]);_0xe6a769['where']=qs[_0xf5c4('0x41')](_[_0xf5c4('0x5c')](_0x18978a[_0xf5c4('0x3f')],_0xe28830[_0xf5c4('0x41')]));if(_0x18978a[_0xf5c4('0x3f')][_0xf5c4('0x4b')]){_0xe6a769[_0xf5c4('0x4a')]=_[_0xf5c4('0x4c')](_0xe6a769['where'],{'$or':_['map'](_0xe6a769[_0xf5c4('0x43')],function(_0x28759e){var _0x48a0ba={};_0x48a0ba[_0x28759e]={'$like':'%'+_0x18978a['query']['filter']+'%'};return _0x48a0ba;})});}_0xe6a769=_[_0xf5c4('0x4c')]({},_0xe6a769,_0x18978a[_0xf5c4('0x56')]);return _0x50e310[_0xf5c4('0x5f')](_0xe6a769);}})[_0xf5c4('0x1e')](function(_0x308c12){if(_0x308c12){_0x5406da=_0x308c12['length'];if(!_0x18978a['query'][_0xf5c4('0x46')](_0xf5c4('0x47'))){_0xe6a769['limit']=qs[_0xf5c4('0x2e')](_0x18978a[_0xf5c4('0x3f')][_0xf5c4('0x2e')]);_0xe6a769[_0xf5c4('0x2d')]=qs['offset'](_0x18978a['query'][_0xf5c4('0x2d')]);}return _0x50e310[_0xf5c4('0x5f')](_0xe6a769);}})[_0xf5c4('0x1e')](function(_0x21cffd){if(_0x21cffd){return _0x21cffd?{'count':_0x5406da,'rows':_0x21cffd}:null;}})[_0xf5c4('0x1e')](respondWithResult(_0x282ccb,null))['catch'](handleError(_0x282ccb,null));};
\ No newline at end of file
+var _0x8d6c=['offset','limit','set','Content-Range','reject','update','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','VIRTUAL','filter','Dynamics365Configuration','includeAll','include','findAll','rows','show','params','merge','options','find','create','body','getFields','findOne','Dynamics365Field','pick','getSubjects','getDescriptions','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../mysqldb','jayson/promise','client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','count'];(function(_0x568270,_0x3e67eb){var _0x29cb99=function(_0x4d0b8b){while(--_0x4d0b8b){_0x568270['push'](_0x568270['shift']());}};_0x29cb99(++_0x3e67eb);}(_0x8d6c,0x1a1));var _0xc8d6=function(_0x51380e,_0x55b897){_0x51380e=_0x51380e-0x0;var _0x2ed390=_0x8d6c[_0x51380e];return _0x2ed390;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xc8d6('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xc8d6('0x1'));var jsonpatch=require(_0xc8d6('0x2'));var rp=require(_0xc8d6('0x3'));var moment=require(_0xc8d6('0x4'));var BPromise=require(_0xc8d6('0x5'));var Mustache=require('mustache');var util=require(_0xc8d6('0x6'));var path=require('path');var sox=require(_0xc8d6('0x7'));var csv=require(_0xc8d6('0x8'));var ejs=require(_0xc8d6('0x9'));var fs=require('fs');var _=require(_0xc8d6('0xa'));var squel=require(_0xc8d6('0xb'));var crypto=require(_0xc8d6('0xc'));var jsforce=require(_0xc8d6('0xd'));var deskjs=require(_0xc8d6('0xe'));var toCsv=require(_0xc8d6('0x8'));var querystring=require(_0xc8d6('0xf'));var Papa=require(_0xc8d6('0x10'));var Redis=require(_0xc8d6('0x11'));var authService=require(_0xc8d6('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc8d6('0x13'));var logger=require(_0xc8d6('0x14'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xc8d6('0x15'))['db'];var jayson=require(_0xc8d6('0x16'));var client=jayson[_0xc8d6('0x17')][_0xc8d6('0x18')]({'port':0x232a});function checkPasswordPattern(_0x1df752,_0x2017af,_0x131703){if(_0x131703){var _0x3667bb=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3667bb[_0xc8d6('0x19')](_0x2017af)){return _0x1df752;}else{throw new db['Sequelize'][(_0xc8d6('0x1a'))](_0xc8d6('0x1b'));}}else{return _0x1df752;}}function respondWithRpcPromise(_0x2dafde,_0x58f24e,_0x234ba5,_0x11ad2c){return new BPromise(function(_0x3156da,_0x57fd9b){var _0x235120=_0x11ad2c||client;return _0x235120[_0xc8d6('0x1c')](_0x2dafde,_0x234ba5)[_0xc8d6('0x1d')](function(_0x384d78){logger[_0xc8d6('0x1e')](_0xc8d6('0x1f'),_0x58f24e,'request\x20sent');logger['debug']('Dynamics365Configuration,\x20%s,\x20%s,\x20%s',_0x58f24e,'request\x20sent',JSON[_0xc8d6('0x20')](_0x384d78));if(_0x384d78[_0xc8d6('0x21')]){if(_0x384d78[_0xc8d6('0x21')][_0xc8d6('0x22')]===0x1f4){logger[_0xc8d6('0x21')]('Dynamics365Configuration,\x20%s,\x20%s',_0x58f24e,_0x384d78[_0xc8d6('0x21')][_0xc8d6('0x23')]);return _0x57fd9b(_0x384d78['error'][_0xc8d6('0x23')]);}logger[_0xc8d6('0x21')]('Dynamics365Configuration,\x20%s,\x20%s',_0x58f24e,_0x384d78['error']['message']);return _0x3156da(_0x384d78[_0xc8d6('0x21')][_0xc8d6('0x23')]);}else{logger['info'](_0xc8d6('0x1f'),_0x58f24e,'request\x20sent');_0x3156da(_0x384d78[_0xc8d6('0x24')]['message']);}})[_0xc8d6('0x25')](function(_0xae860c){logger['error'](_0xc8d6('0x1f'),_0x58f24e,_0xae860c);_0x57fd9b(_0xae860c);});});}function respondWithStatusCode(_0x240d6e,_0x341390){_0x341390=_0x341390||0xcc;return function(_0x583143){if(_0x583143){return _0x240d6e[_0xc8d6('0x26')](_0x341390);}return _0x240d6e[_0xc8d6('0x27')](_0x341390)[_0xc8d6('0x28')]();};}function respondWithResult(_0x2ab229,_0x3d8c3a){_0x3d8c3a=_0x3d8c3a||0xc8;return function(_0x504b83){if(_0x504b83){return _0x2ab229['status'](_0x3d8c3a)[_0xc8d6('0x29')](_0x504b83);}};}function respondWithFilteredResult(_0x1c5ead,_0x40f873){return function(_0x264d59){if(_0x264d59){var _0x476d24=_0x264d59[_0xc8d6('0x2a')],_0x5f1cc9=_0x40f873['offset'],_0x6dacc0=_0x40f873[_0xc8d6('0x2b')]+_0x40f873[_0xc8d6('0x2c')],_0xc6db6d;if(_0x6dacc0>=_0x476d24){_0x6dacc0=_0x476d24;_0xc6db6d=0xc8;}else{_0xc6db6d=0xce;}_0x1c5ead['status'](_0xc6db6d);return _0x1c5ead[_0xc8d6('0x2d')](_0xc8d6('0x2e'),_0x5f1cc9+'-'+_0x6dacc0+'/'+_0x476d24)[_0xc8d6('0x29')](_0x264d59);}return null;};}function patchUpdates(_0x4f2d6b){return function(_0x415849){try{jsonpatch['apply'](_0x415849,_0x4f2d6b,!![]);}catch(_0x1703b9){return BPromise[_0xc8d6('0x2f')](_0x1703b9);}return _0x415849['save']();};}function saveUpdates(_0x46ceff,_0xcb8580){return function(_0x9ede7f){if(_0x9ede7f){return _0x9ede7f[_0xc8d6('0x30')](_0x46ceff)[_0xc8d6('0x1d')](function(_0xd8a31d){return _0xd8a31d;});}return null;};}function removeEntity(_0x1a1f10,_0x36e469){return function(_0x4d02ee){if(_0x4d02ee){return _0x4d02ee[_0xc8d6('0x31')]()['then'](function(){_0x1a1f10[_0xc8d6('0x27')](0xcc)[_0xc8d6('0x28')]();});}};}function handleEntityNotFound(_0x22c66a,_0x5ef8c5){return function(_0x149b6b){if(!_0x149b6b){_0x22c66a[_0xc8d6('0x26')](0x194);}return _0x149b6b;};}function handleError(_0x5a701c,_0x4ae1b5){_0x4ae1b5=_0x4ae1b5||0x1f4;return function(_0xd0aed0){logger[_0xc8d6('0x21')](_0xd0aed0[_0xc8d6('0x32')]);if(_0xd0aed0[_0xc8d6('0x33')]){delete _0xd0aed0[_0xc8d6('0x33')];}_0x5a701c[_0xc8d6('0x27')](_0x4ae1b5)[_0xc8d6('0x34')](_0xd0aed0);};}exports[_0xc8d6('0x35')]=function(_0x17ac53,_0x5815fa){var _0x5d34ea={},_0x598971={},_0x20bad9={'count':0x0,'rows':[]};var _0x474761=_[_0xc8d6('0x36')](db['Dynamics365Configuration'][_0xc8d6('0x37')],function(_0x569494){return{'name':_0x569494[_0xc8d6('0x38')],'type':_0x569494[_0xc8d6('0x39')][_0xc8d6('0x3a')]};});_0x598971[_0xc8d6('0x3b')]=_[_0xc8d6('0x36')](_0x474761,'name');_0x598971[_0xc8d6('0x3c')]=_[_0xc8d6('0x3d')](_0x17ac53[_0xc8d6('0x3c')]);_0x598971[_0xc8d6('0x3e')]=_[_0xc8d6('0x3f')](_0x598971[_0xc8d6('0x3b')],_0x598971[_0xc8d6('0x3c')]);_0x5d34ea[_0xc8d6('0x40')]=_[_0xc8d6('0x3f')](_0x598971[_0xc8d6('0x3b')],qs[_0xc8d6('0x41')](_0x17ac53['query']['fields']));_0x5d34ea['attributes']=_0x5d34ea['attributes'][_0xc8d6('0x42')]?_0x5d34ea[_0xc8d6('0x40')]:_0x598971['model'];if(!_0x17ac53[_0xc8d6('0x3c')][_0xc8d6('0x43')](_0xc8d6('0x44'))){_0x5d34ea[_0xc8d6('0x2c')]=qs[_0xc8d6('0x2c')](_0x17ac53[_0xc8d6('0x3c')][_0xc8d6('0x2c')]);_0x5d34ea[_0xc8d6('0x2b')]=qs[_0xc8d6('0x2b')](_0x17ac53['query'][_0xc8d6('0x2b')]);}_0x5d34ea[_0xc8d6('0x45')]=qs[_0xc8d6('0x46')](_0x17ac53[_0xc8d6('0x3c')]['sort']);_0x5d34ea[_0xc8d6('0x47')]=qs[_0xc8d6('0x3e')](_['pick'](_0x17ac53['query'],_0x598971[_0xc8d6('0x3e')]));if(_0x17ac53[_0xc8d6('0x3c')]['filter']){_0x5d34ea[_0xc8d6('0x47')]=_['merge'](_0x5d34ea[_0xc8d6('0x47')],{'$or':_[_0xc8d6('0x36')](_0x474761,function(_0x16e40a){if(_0x16e40a[_0xc8d6('0x39')]!==_0xc8d6('0x48')){var _0x484eaa={};_0x484eaa[_0x16e40a[_0xc8d6('0x33')]]={'$like':'%'+_0x17ac53[_0xc8d6('0x3c')][_0xc8d6('0x49')]+'%'};return _0x484eaa;}})});}_0x5d34ea=_['merge']({},_0x5d34ea,_0x17ac53['options']);var _0x4427a0={'where':_0x5d34ea['where']};return db[_0xc8d6('0x4a')]['count'](_0x4427a0)[_0xc8d6('0x1d')](function(_0x436b1c){_0x20bad9[_0xc8d6('0x2a')]=_0x436b1c;if(_0x17ac53[_0xc8d6('0x3c')][_0xc8d6('0x4b')]){_0x5d34ea[_0xc8d6('0x4c')]=[{'all':!![]}];}return db[_0xc8d6('0x4a')][_0xc8d6('0x4d')](_0x5d34ea);})[_0xc8d6('0x1d')](function(_0x1933e2){_0x20bad9[_0xc8d6('0x4e')]=_0x1933e2;return _0x20bad9;})[_0xc8d6('0x1d')](respondWithFilteredResult(_0x5815fa,_0x5d34ea))['catch'](handleError(_0x5815fa,null));};exports[_0xc8d6('0x4f')]=function(_0x2a89ca,_0x37ab1a){var _0x55dddd={'raw':![],'where':{'id':_0x2a89ca[_0xc8d6('0x50')]['id']}},_0x353112={};_0x353112['model']=_[_0xc8d6('0x3d')](db['Dynamics365Configuration'][_0xc8d6('0x37')]);_0x353112[_0xc8d6('0x3c')]=_[_0xc8d6('0x3d')](_0x2a89ca['query']);_0x353112[_0xc8d6('0x3e')]=_[_0xc8d6('0x3f')](_0x353112[_0xc8d6('0x3b')],_0x353112[_0xc8d6('0x3c')]);_0x55dddd[_0xc8d6('0x40')]=_[_0xc8d6('0x3f')](_0x353112['model'],qs['fields'](_0x2a89ca['query'][_0xc8d6('0x41')]));_0x55dddd['attributes']=_0x55dddd[_0xc8d6('0x40')][_0xc8d6('0x42')]?_0x55dddd['attributes']:_0x353112[_0xc8d6('0x3b')];if(_0x2a89ca[_0xc8d6('0x3c')][_0xc8d6('0x4b')]){_0x55dddd[_0xc8d6('0x4c')]=[{'all':!![]}];}_0x55dddd=_[_0xc8d6('0x51')]({},_0x55dddd,_0x2a89ca[_0xc8d6('0x52')]);return db[_0xc8d6('0x4a')][_0xc8d6('0x53')](_0x55dddd)['then'](handleEntityNotFound(_0x37ab1a,null))[_0xc8d6('0x1d')](respondWithResult(_0x37ab1a,null))[_0xc8d6('0x25')](handleError(_0x37ab1a,null));};exports[_0xc8d6('0x54')]=function(_0x100f0f,_0x4379f7){return db[_0xc8d6('0x4a')][_0xc8d6('0x54')](_0x100f0f[_0xc8d6('0x55')],{})[_0xc8d6('0x1d')](respondWithResult(_0x4379f7,0xc9))[_0xc8d6('0x25')](handleError(_0x4379f7,null));};exports[_0xc8d6('0x30')]=function(_0x19b607,_0x2e62d5){if(_0x19b607[_0xc8d6('0x55')]['id']){delete _0x19b607[_0xc8d6('0x55')]['id'];}return db['Dynamics365Configuration'][_0xc8d6('0x53')]({'where':{'id':_0x19b607[_0xc8d6('0x50')]['id']}})[_0xc8d6('0x1d')](handleEntityNotFound(_0x2e62d5,null))[_0xc8d6('0x1d')](saveUpdates(_0x19b607[_0xc8d6('0x55')],null))['then'](respondWithResult(_0x2e62d5,null))['catch'](handleError(_0x2e62d5,null));};exports['destroy']=function(_0x4d14ed,_0x56c811){return db['Dynamics365Configuration'][_0xc8d6('0x53')]({'where':{'id':_0x4d14ed[_0xc8d6('0x50')]['id']}})[_0xc8d6('0x1d')](handleEntityNotFound(_0x56c811,null))[_0xc8d6('0x1d')](removeEntity(_0x56c811,null))['catch'](handleError(_0x56c811,null));};exports[_0xc8d6('0x56')]=function(_0x5c3879,_0x1a18c8,_0x5b7621){var _0x45528e={};var _0x381bb3={};var _0xf7c27f;var _0x9e64fb;return db[_0xc8d6('0x4a')][_0xc8d6('0x57')]({'where':{'id':_0x5c3879['params']['id']}})[_0xc8d6('0x1d')](handleEntityNotFound(_0x1a18c8,null))[_0xc8d6('0x1d')](function(_0x44719b){if(_0x44719b){_0xf7c27f=_0x44719b;_0x381bb3[_0xc8d6('0x3b')]=_[_0xc8d6('0x3d')](db[_0xc8d6('0x58')][_0xc8d6('0x37')]);_0x381bb3[_0xc8d6('0x3c')]=_[_0xc8d6('0x3d')](_0x5c3879[_0xc8d6('0x3c')]);_0x381bb3[_0xc8d6('0x3e')]=_[_0xc8d6('0x3f')](_0x381bb3[_0xc8d6('0x3b')],_0x381bb3['query']);_0x45528e['attributes']=_[_0xc8d6('0x3f')](_0x381bb3['model'],qs[_0xc8d6('0x41')](_0x5c3879[_0xc8d6('0x3c')][_0xc8d6('0x41')]));_0x45528e[_0xc8d6('0x40')]=_0x45528e['attributes']['length']?_0x45528e['attributes']:_0x381bb3[_0xc8d6('0x3b')];_0x45528e[_0xc8d6('0x45')]=qs[_0xc8d6('0x46')](_0x5c3879[_0xc8d6('0x3c')][_0xc8d6('0x46')]);_0x45528e[_0xc8d6('0x47')]=qs[_0xc8d6('0x3e')](_[_0xc8d6('0x59')](_0x5c3879['query'],_0x381bb3[_0xc8d6('0x3e')]));if(_0x5c3879[_0xc8d6('0x3c')][_0xc8d6('0x49')]){_0x45528e[_0xc8d6('0x47')]=_[_0xc8d6('0x51')](_0x45528e[_0xc8d6('0x47')],{'$or':_[_0xc8d6('0x36')](_0x45528e['attributes'],function(_0xd1576c){var _0x165696={};_0x165696[_0xd1576c]={'$like':'%'+_0x5c3879[_0xc8d6('0x3c')][_0xc8d6('0x49')]+'%'};return _0x165696;})});}_0x45528e=_['merge']({},_0x45528e,_0x5c3879[_0xc8d6('0x52')]);return _0xf7c27f['getFields'](_0x45528e);}})[_0xc8d6('0x1d')](function(_0x44b5ad){if(_0x44b5ad){_0x9e64fb=_0x44b5ad[_0xc8d6('0x42')];if(!_0x5c3879[_0xc8d6('0x3c')]['hasOwnProperty'](_0xc8d6('0x44'))){_0x45528e['limit']=qs[_0xc8d6('0x2c')](_0x5c3879['query']['limit']);_0x45528e[_0xc8d6('0x2b')]=qs['offset'](_0x5c3879[_0xc8d6('0x3c')][_0xc8d6('0x2b')]);}return _0xf7c27f[_0xc8d6('0x56')](_0x45528e);}})[_0xc8d6('0x1d')](function(_0x25f60d){if(_0x25f60d){return _0x25f60d?{'count':_0x9e64fb,'rows':_0x25f60d}:null;}})['then'](respondWithResult(_0x1a18c8,null))[_0xc8d6('0x25')](handleError(_0x1a18c8,null));};exports[_0xc8d6('0x5a')]=function(_0x292b94,_0x454019,_0x4a26d5){var _0x24b0e7={};var _0x45b5bb={};var _0x19388b;var _0x3ee03f;return db['Dynamics365Configuration'][_0xc8d6('0x57')]({'where':{'id':_0x292b94['params']['id']}})[_0xc8d6('0x1d')](handleEntityNotFound(_0x454019,null))[_0xc8d6('0x1d')](function(_0x2d11b4){if(_0x2d11b4){_0x19388b=_0x2d11b4;_0x45b5bb['model']=_['keys'](db['Dynamics365Field'][_0xc8d6('0x37')]);_0x45b5bb[_0xc8d6('0x3c')]=_[_0xc8d6('0x3d')](_0x292b94[_0xc8d6('0x3c')]);_0x45b5bb[_0xc8d6('0x3e')]=_[_0xc8d6('0x3f')](_0x45b5bb[_0xc8d6('0x3b')],_0x45b5bb[_0xc8d6('0x3c')]);_0x24b0e7[_0xc8d6('0x40')]=_[_0xc8d6('0x3f')](_0x45b5bb[_0xc8d6('0x3b')],qs[_0xc8d6('0x41')](_0x292b94[_0xc8d6('0x3c')][_0xc8d6('0x41')]));_0x24b0e7[_0xc8d6('0x40')]=_0x24b0e7[_0xc8d6('0x40')][_0xc8d6('0x42')]?_0x24b0e7[_0xc8d6('0x40')]:_0x45b5bb[_0xc8d6('0x3b')];_0x24b0e7[_0xc8d6('0x45')]=qs[_0xc8d6('0x46')](_0x292b94[_0xc8d6('0x3c')][_0xc8d6('0x46')]);_0x24b0e7['where']=qs[_0xc8d6('0x3e')](_[_0xc8d6('0x59')](_0x292b94[_0xc8d6('0x3c')],_0x45b5bb[_0xc8d6('0x3e')]));if(_0x292b94['query'][_0xc8d6('0x49')]){_0x24b0e7[_0xc8d6('0x47')]=_[_0xc8d6('0x51')](_0x24b0e7[_0xc8d6('0x47')],{'$or':_[_0xc8d6('0x36')](_0x24b0e7[_0xc8d6('0x40')],function(_0x1c311a){var _0x50239f={};_0x50239f[_0x1c311a]={'$like':'%'+_0x292b94[_0xc8d6('0x3c')][_0xc8d6('0x49')]+'%'};return _0x50239f;})});}_0x24b0e7=_[_0xc8d6('0x51')]({},_0x24b0e7,_0x292b94[_0xc8d6('0x52')]);return _0x19388b[_0xc8d6('0x5a')](_0x24b0e7);}})[_0xc8d6('0x1d')](function(_0x3d6296){if(_0x3d6296){_0x3ee03f=_0x3d6296[_0xc8d6('0x42')];if(!_0x292b94['query'][_0xc8d6('0x43')](_0xc8d6('0x44'))){_0x24b0e7[_0xc8d6('0x2c')]=qs[_0xc8d6('0x2c')](_0x292b94[_0xc8d6('0x3c')][_0xc8d6('0x2c')]);_0x24b0e7[_0xc8d6('0x2b')]=qs[_0xc8d6('0x2b')](_0x292b94[_0xc8d6('0x3c')][_0xc8d6('0x2b')]);}return _0x19388b[_0xc8d6('0x5a')](_0x24b0e7);}})['then'](function(_0x3cc33c){if(_0x3cc33c){return _0x3cc33c?{'count':_0x3ee03f,'rows':_0x3cc33c}:null;}})[_0xc8d6('0x1d')](respondWithResult(_0x454019,null))[_0xc8d6('0x25')](handleError(_0x454019,null));};exports[_0xc8d6('0x5b')]=function(_0x22470b,_0x5c5d51,_0x31a403){var _0x103f8d={};var _0x24b666={};var _0x449f8a;var _0x8977df;return db[_0xc8d6('0x4a')][_0xc8d6('0x57')]({'where':{'id':_0x22470b['params']['id']}})[_0xc8d6('0x1d')](handleEntityNotFound(_0x5c5d51,null))['then'](function(_0x138e29){if(_0x138e29){_0x449f8a=_0x138e29;_0x24b666[_0xc8d6('0x3b')]=_['keys'](db[_0xc8d6('0x58')][_0xc8d6('0x37')]);_0x24b666[_0xc8d6('0x3c')]=_[_0xc8d6('0x3d')](_0x22470b[_0xc8d6('0x3c')]);_0x24b666[_0xc8d6('0x3e')]=_[_0xc8d6('0x3f')](_0x24b666[_0xc8d6('0x3b')],_0x24b666[_0xc8d6('0x3c')]);_0x103f8d[_0xc8d6('0x40')]=_[_0xc8d6('0x3f')](_0x24b666['model'],qs[_0xc8d6('0x41')](_0x22470b[_0xc8d6('0x3c')][_0xc8d6('0x41')]));_0x103f8d['attributes']=_0x103f8d[_0xc8d6('0x40')][_0xc8d6('0x42')]?_0x103f8d[_0xc8d6('0x40')]:_0x24b666['model'];_0x103f8d['order']=qs[_0xc8d6('0x46')](_0x22470b[_0xc8d6('0x3c')][_0xc8d6('0x46')]);_0x103f8d[_0xc8d6('0x47')]=qs[_0xc8d6('0x3e')](_[_0xc8d6('0x59')](_0x22470b[_0xc8d6('0x3c')],_0x24b666['filters']));if(_0x22470b[_0xc8d6('0x3c')][_0xc8d6('0x49')]){_0x103f8d[_0xc8d6('0x47')]=_[_0xc8d6('0x51')](_0x103f8d[_0xc8d6('0x47')],{'$or':_[_0xc8d6('0x36')](_0x103f8d['attributes'],function(_0x5d2a36){var _0x1ff434={};_0x1ff434[_0x5d2a36]={'$like':'%'+_0x22470b[_0xc8d6('0x3c')]['filter']+'%'};return _0x1ff434;})});}_0x103f8d=_[_0xc8d6('0x51')]({},_0x103f8d,_0x22470b[_0xc8d6('0x52')]);return _0x449f8a[_0xc8d6('0x5b')](_0x103f8d);}})[_0xc8d6('0x1d')](function(_0x1851c5){if(_0x1851c5){_0x8977df=_0x1851c5[_0xc8d6('0x42')];if(!_0x22470b[_0xc8d6('0x3c')][_0xc8d6('0x43')](_0xc8d6('0x44'))){_0x103f8d[_0xc8d6('0x2c')]=qs['limit'](_0x22470b['query'][_0xc8d6('0x2c')]);_0x103f8d['offset']=qs[_0xc8d6('0x2b')](_0x22470b['query']['offset']);}return _0x449f8a[_0xc8d6('0x5b')](_0x103f8d);}})['then'](function(_0x42d221){if(_0x42d221){return _0x42d221?{'count':_0x8977df,'rows':_0x42d221}:null;}})[_0xc8d6('0x1d')](respondWithResult(_0x5c5d51,null))[_0xc8d6('0x25')](handleError(_0x5c5d51,null));};
\ No newline at end of file
diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js
index 43f2e4f..f6d2550 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 _0x564f=['./intDynamics365Configuration.attributes','exports','define','Dynamics365Configuration','int_dynamics365_configurations','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x4e1cd7,_0x3dc7a4){var _0x18083f=function(_0x5bb1c0){while(--_0x5bb1c0){_0x4e1cd7['push'](_0x4e1cd7['shift']());}};_0x18083f(++_0x3dc7a4);}(_0x564f,0x12b));var _0xf564=function(_0x22efd1,_0x1f404d){_0x22efd1=_0x22efd1-0x0;var _0xf11137=_0x564f[_0x22efd1];return _0xf11137;};'use strict';var _=require('lodash');var util=require(_0xf564('0x0'));var logger=require(_0xf564('0x1'))(_0xf564('0x2'));var moment=require(_0xf564('0x3'));var BPromise=require(_0xf564('0x4'));var rp=require(_0xf564('0x5'));var fs=require('fs');var path=require(_0xf564('0x6'));var rimraf=require(_0xf564('0x7'));var config=require(_0xf564('0x8'));var attributes=require(_0xf564('0x9'));module[_0xf564('0xa')]=function(_0x1acc11,_0x6d3cb){return _0x1acc11[_0xf564('0xb')](_0xf564('0xc'),attributes,{'tableName':_0xf564('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x799a=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDynamics365Configuration.attributes','Dynamics365Configuration','int_dynamics365_configurations','lodash','util'];(function(_0x2369e3,_0x589d00){var _0x2adeb5=function(_0x1a0f96){while(--_0x1a0f96){_0x2369e3['push'](_0x2369e3['shift']());}};_0x2adeb5(++_0x589d00);}(_0x799a,0x1ea));var _0xa799=function(_0x5583a7,_0x15e952){_0x5583a7=_0x5583a7-0x0;var _0x589639=_0x799a[_0x5583a7];return _0x589639;};'use strict';var _=require(_0xa799('0x0'));var util=require(_0xa799('0x1'));var logger=require(_0xa799('0x2'))('api');var moment=require(_0xa799('0x3'));var BPromise=require(_0xa799('0x4'));var rp=require(_0xa799('0x5'));var fs=require('fs');var path=require(_0xa799('0x6'));var rimraf=require(_0xa799('0x7'));var config=require(_0xa799('0x8'));var attributes=require(_0xa799('0x9'));module['exports']=function(_0x40fb42,_0x2fa0b5){return _0x40fb42['define'](_0xa799('0xa'),attributes,{'tableName':_0xa799('0xb'),'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 29362be..5c8b28e 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 _0xc19d=['request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','Dynamics365Configuration,\x20%s,\x20%s'];(function(_0x147c5f,_0x17c25c){var _0x4d6e09=function(_0x4f10dd){while(--_0x4f10dd){_0x147c5f['push'](_0x147c5f['shift']());}};_0x4d6e09(++_0x17c25c);}(_0xc19d,0x94));var _0xdc19=function(_0x30bd4d,_0x50eb60){_0x30bd4d=_0x30bd4d-0x0;var _0x306915=_0xc19d[_0x30bd4d];return _0x306915;};'use strict';var _=require(_0xdc19('0x0'));var util=require(_0xdc19('0x1'));var moment=require(_0xdc19('0x2'));var BPromise=require(_0xdc19('0x3'));var rs=require(_0xdc19('0x4'));var fs=require('fs');var Redis=require(_0xdc19('0x5'));var db=require(_0xdc19('0x6'))['db'];var utils=require(_0xdc19('0x7'));var logger=require(_0xdc19('0x8'))(_0xdc19('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xdc19('0xa')][_0xdc19('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x455132,_0x1e801e,_0x31b2d1){return new BPromise(function(_0x2d46c3,_0x4fdf74){return client['request'](_0x455132,_0x31b2d1)['then'](function(_0x5aba08){logger['info'](_0xdc19('0xc'),_0x1e801e,_0xdc19('0xd'));logger[_0xdc19('0xe')](_0xdc19('0xf'),_0x1e801e,_0xdc19('0xd'),JSON[_0xdc19('0x10')](_0x5aba08));if(_0x5aba08['error']){if(_0x5aba08['error'][_0xdc19('0x11')]===0x1f4){logger[_0xdc19('0x12')](_0xdc19('0xc'),_0x1e801e,_0x5aba08[_0xdc19('0x12')]['message']);return _0x4fdf74(_0x5aba08[_0xdc19('0x12')][_0xdc19('0x13')]);}logger[_0xdc19('0x12')](_0xdc19('0xc'),_0x1e801e,_0x5aba08['error']['message']);return _0x2d46c3(_0x5aba08[_0xdc19('0x12')][_0xdc19('0x13')]);}else{logger[_0xdc19('0x14')](_0xdc19('0xc'),_0x1e801e,'request\x20sent');_0x2d46c3(_0x5aba08[_0xdc19('0x15')][_0xdc19('0x13')]);}})[_0xdc19('0x16')](function(_0x32edda){logger['error'](_0xdc19('0xc'),_0x1e801e,_0x32edda);_0x4fdf74(_0x32edda);});});}
\ No newline at end of file
+var _0xdbf6=['Dynamics365Configuration,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','util','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','debug'];(function(_0x342c3d,_0x538b21){var _0x131531=function(_0x88f4b){while(--_0x88f4b){_0x342c3d['push'](_0x342c3d['shift']());}};_0x131531(++_0x538b21);}(_0xdbf6,0x146));var _0x6dbf=function(_0x406c64,_0x14fbf4){_0x406c64=_0x406c64-0x0;var _0x2b5f80=_0xdbf6[_0x406c64];return _0x2b5f80;};'use strict';var _=require('lodash');var util=require(_0x6dbf('0x0'));var moment=require('moment');var BPromise=require(_0x6dbf('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6dbf('0x2'))['db'];var utils=require(_0x6dbf('0x3'));var logger=require('../../config/logger')(_0x6dbf('0x4'));var config=require(_0x6dbf('0x5'));var jayson=require(_0x6dbf('0x6'));var client=jayson[_0x6dbf('0x7')][_0x6dbf('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x25ba15,_0x398e0b,_0x47d5c4){return new BPromise(function(_0x15b8aa,_0x3afde2){return client[_0x6dbf('0x9')](_0x25ba15,_0x47d5c4)[_0x6dbf('0xa')](function(_0x59f4b5){logger[_0x6dbf('0xb')](_0x6dbf('0xc'),_0x398e0b,'request\x20sent');logger[_0x6dbf('0xd')](_0x6dbf('0xe'),_0x398e0b,_0x6dbf('0xf'),JSON['stringify'](_0x59f4b5));if(_0x59f4b5[_0x6dbf('0x10')]){if(_0x59f4b5[_0x6dbf('0x10')]['code']===0x1f4){logger[_0x6dbf('0x10')](_0x6dbf('0xc'),_0x398e0b,_0x59f4b5[_0x6dbf('0x10')][_0x6dbf('0x11')]);return _0x3afde2(_0x59f4b5['error'][_0x6dbf('0x11')]);}logger[_0x6dbf('0x10')]('Dynamics365Configuration,\x20%s,\x20%s',_0x398e0b,_0x59f4b5['error'][_0x6dbf('0x11')]);return _0x15b8aa(_0x59f4b5[_0x6dbf('0x10')]['message']);}else{logger[_0x6dbf('0xb')]('Dynamics365Configuration,\x20%s,\x20%s',_0x398e0b,_0x6dbf('0xf'));_0x15b8aa(_0x59f4b5[_0x6dbf('0x12')][_0x6dbf('0x11')]);}})[_0x6dbf('0x13')](function(_0x4d1b07){logger[_0x6dbf('0x10')]('Dynamics365Configuration,\x20%s,\x20%s',_0x398e0b,_0x4d1b07);_0x3afde2(_0x4d1b07);});});}
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/index.js b/server/api/intDynamics365Field/index.js
index 3a554f8..ae625f2 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 _0x4058=['../../components/interaction/service','../../config/environment','index','get','/:id','isAuthenticated','show','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x29603c,_0x4b0922){var _0x1d8d9a=function(_0x57b628){while(--_0x57b628){_0x29603c['push'](_0x29603c['shift']());}};_0x1d8d9a(++_0x4b0922);}(_0x4058,0x129));var _0x8405=function(_0x5394a2,_0x1e22df){_0x5394a2=_0x5394a2-0x0;var _0x46a796=_0x4058[_0x5394a2];return _0x46a796;};'use strict';var multer=require(_0x8405('0x0'));var util=require(_0x8405('0x1'));var path=require(_0x8405('0x2'));var timeout=require(_0x8405('0x3'));var express=require(_0x8405('0x4'));var router=express[_0x8405('0x5')]();var auth=require(_0x8405('0x6'));var interaction=require(_0x8405('0x7'));var config=require(_0x8405('0x8'));var controller=require('./intDynamics365Field.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x8405('0x9')]);router[_0x8405('0xa')](_0x8405('0xb'),auth[_0x8405('0xc')](),controller[_0x8405('0xd')]);router['post']('/',auth[_0x8405('0xc')](),controller[_0x8405('0xe')]);router[_0x8405('0xf')]('/:id',auth[_0x8405('0xc')](),controller['update']);router[_0x8405('0x10')](_0x8405('0xb'),auth['isAuthenticated'](),controller[_0x8405('0x11')]);module[_0x8405('0x12')]=router;
\ No newline at end of file
+var _0x4058=['../../components/interaction/service','../../config/environment','index','get','/:id','isAuthenticated','show','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service'];(function(_0x4884f5,_0x2b8afb){var _0x3a551e=function(_0x2e4b1c){while(--_0x2e4b1c){_0x4884f5['push'](_0x4884f5['shift']());}};_0x3a551e(++_0x2b8afb);}(_0x4058,0x129));var _0x8405=function(_0x42cda2,_0x8c7efb){_0x42cda2=_0x42cda2-0x0;var _0x2135b7=_0x4058[_0x42cda2];return _0x2135b7;};'use strict';var multer=require(_0x8405('0x0'));var util=require(_0x8405('0x1'));var path=require(_0x8405('0x2'));var timeout=require(_0x8405('0x3'));var express=require(_0x8405('0x4'));var router=express[_0x8405('0x5')]();var auth=require(_0x8405('0x6'));var interaction=require(_0x8405('0x7'));var config=require(_0x8405('0x8'));var controller=require('./intDynamics365Field.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x8405('0x9')]);router[_0x8405('0xa')](_0x8405('0xb'),auth[_0x8405('0xc')](),controller[_0x8405('0xd')]);router['post']('/',auth[_0x8405('0xc')](),controller[_0x8405('0xe')]);router[_0x8405('0xf')]('/:id',auth[_0x8405('0xc')](),controller['update']);router[_0x8405('0x10')](_0x8405('0xb'),auth['isAuthenticated'](),controller[_0x8405('0x11')]);module[_0x8405('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/intDynamics365Field.attributes.js b/server/api/intDynamics365Field/intDynamics365Field.attributes.js
index 7831135..25b13fc 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 _0xd70e=['customVariable','STRING','sequelize','exports','ENUM','string','variable','keyValue'];(function(_0x251d9c,_0x580977){var _0x16ae64=function(_0x4d3b53){while(--_0x4d3b53){_0x251d9c['push'](_0x251d9c['shift']());}};_0x16ae64(++_0x580977);}(_0xd70e,0x1a2));var _0xed70=function(_0x4a668a,_0x204bba){_0x4a668a=_0x4a668a-0x0;var _0x43d0b6=_0xd70e[_0x4a668a];return _0x43d0b6;};'use strict';var Sequelize=require(_0xed70('0x0'));module[_0xed70('0x1')]={'type':{'type':Sequelize[_0xed70('0x2')](_0xed70('0x3'),_0xed70('0x4'),'customVariable',_0xed70('0x5')),'defaultValue':_0xed70('0x3')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xed70('0x2')](_0xed70('0x3'),_0xed70('0x4'),_0xed70('0x6'))},'keyContent':{'type':Sequelize[_0xed70('0x7')]},'idField':{'type':Sequelize[_0xed70('0x7')]},'nameField':{'type':Sequelize[_0xed70('0x7')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xed7f=['variable','customVariable','keyValue','STRING','ENUM','BOOLEAN','string'];(function(_0x248238,_0xe31996){var _0xb93bc4=function(_0xa7489e){while(--_0xa7489e){_0x248238['push'](_0x248238['shift']());}};_0xb93bc4(++_0xe31996);}(_0xed7f,0xd8));var _0xfed7=function(_0x107f31,_0x1bcd53){_0x107f31=_0x107f31-0x0;var _0x10560c=_0xed7f[_0x107f31];return _0x10560c;};'use strict';var Sequelize=require('sequelize');module['exports']={'type':{'type':Sequelize['ENUM'](_0xfed7('0x0'),_0xfed7('0x1'),_0xfed7('0x2'),_0xfed7('0x3')),'defaultValue':_0xfed7('0x0')},'content':{'type':Sequelize[_0xfed7('0x4')]},'key':{'type':Sequelize[_0xfed7('0x4')]},'keyType':{'type':Sequelize[_0xfed7('0x5')](_0xfed7('0x0'),'variable','customVariable')},'keyContent':{'type':Sequelize[_0xfed7('0x4')]},'idField':{'type':Sequelize[_0xfed7('0x4')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0xfed7('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/intDynamics365Field.controller.js b/server/api/intDynamics365Field/intDynamics365Field.controller.js
index 08189c4..40c2ed8 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 _0x905a=['type','map','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','filter','where','merge','VIRTUAL','includeAll','include','findAll','catch','show','params','length','create','body','update','find','html-pdf','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','json','reject','save','then','destroy','error','stack','name','index','Dynamics365Field','rawAttributes','fieldName'];(function(_0x2c4e1b,_0x48a2dc){var _0x335117=function(_0x3cac61){while(--_0x3cac61){_0x2c4e1b['push'](_0x2c4e1b['shift']());}};_0x335117(++_0x48a2dc);}(_0x905a,0xeb));var _0xa905=function(_0x1f89ba,_0x9e2a4b){_0x1f89ba=_0x1f89ba-0x0;var _0x5cd312=_0x905a[_0x1f89ba];return _0x5cd312;};'use strict';var pdf=require(_0xa905('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xa905('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xa905('0x2'));var moment=require(_0xa905('0x3'));var BPromise=require(_0xa905('0x4'));var Mustache=require(_0xa905('0x5'));var util=require(_0xa905('0x6'));var path=require(_0xa905('0x7'));var sox=require(_0xa905('0x8'));var csv=require(_0xa905('0x9'));var ejs=require(_0xa905('0xa'));var fs=require('fs');var _=require(_0xa905('0xb'));var squel=require(_0xa905('0xc'));var crypto=require(_0xa905('0xd'));var jsforce=require(_0xa905('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xa905('0x9'));var querystring=require('querystring');var Papa=require(_0xa905('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa905('0x10'));var as=require(_0xa905('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa905('0x12'))('api');var utils=require('../../config/utils');var config=require(_0xa905('0x13'));var db=require(_0xa905('0x14'))['db'];function respondWithStatusCode(_0x5f3ae6,_0x54e06c){_0x54e06c=_0x54e06c||0xcc;return function(_0x3272df){if(_0x3272df){return _0x5f3ae6[_0xa905('0x15')](_0x54e06c);}return _0x5f3ae6[_0xa905('0x16')](_0x54e06c)[_0xa905('0x17')]();};}function respondWithResult(_0x1a2cb2,_0xbe0d64){_0xbe0d64=_0xbe0d64||0xc8;return function(_0x4c42a4){if(_0x4c42a4){return _0x1a2cb2[_0xa905('0x16')](_0xbe0d64)['json'](_0x4c42a4);}};}function respondWithFilteredResult(_0x356cfb,_0x97332d){return function(_0x5990c8){if(_0x5990c8){var _0x58341f=_0x5990c8[_0xa905('0x18')],_0x5b7b12=_0x97332d[_0xa905('0x19')],_0x103c18=_0x97332d[_0xa905('0x19')]+_0x97332d[_0xa905('0x1a')],_0x15a4df;if(_0x103c18>=_0x58341f){_0x103c18=_0x58341f;_0x15a4df=0xc8;}else{_0x15a4df=0xce;}_0x356cfb[_0xa905('0x16')](_0x15a4df);return _0x356cfb[_0xa905('0x1b')](_0xa905('0x1c'),_0x5b7b12+'-'+_0x103c18+'/'+_0x58341f)[_0xa905('0x1d')](_0x5990c8);}return null;};}function patchUpdates(_0x3afe0c){return function(_0x3ec96b){try{jsonpatch['apply'](_0x3ec96b,_0x3afe0c,!![]);}catch(_0x334433){return BPromise[_0xa905('0x1e')](_0x334433);}return _0x3ec96b[_0xa905('0x1f')]();};}function saveUpdates(_0x2a347d,_0x14930d){return function(_0x36e094){if(_0x36e094){return _0x36e094['update'](_0x2a347d)[_0xa905('0x20')](function(_0x110be0){return _0x110be0;});}return null;};}function removeEntity(_0x31261d,_0x3193ca){return function(_0x5c4b50){if(_0x5c4b50){return _0x5c4b50[_0xa905('0x21')]()[_0xa905('0x20')](function(){_0x31261d[_0xa905('0x16')](0xcc)[_0xa905('0x17')]();});}};}function handleEntityNotFound(_0x50a44a,_0x53d476){return function(_0x23fb4e){if(!_0x23fb4e){_0x50a44a[_0xa905('0x15')](0x194);}return _0x23fb4e;};}function handleError(_0x54edcb,_0x2e39c8){_0x2e39c8=_0x2e39c8||0x1f4;return function(_0x38e6da){logger[_0xa905('0x22')](_0x38e6da[_0xa905('0x23')]);if(_0x38e6da['name']){delete _0x38e6da[_0xa905('0x24')];}_0x54edcb[_0xa905('0x16')](_0x2e39c8)['send'](_0x38e6da);};}exports[_0xa905('0x25')]=function(_0x399f07,_0x172129){var _0x2ff254={},_0x2768c0={},_0x131421={'count':0x0,'rows':[]};var _0x5adc5d=_['map'](db[_0xa905('0x26')][_0xa905('0x27')],function(_0x38c35d){return{'name':_0x38c35d[_0xa905('0x28')],'type':_0x38c35d[_0xa905('0x29')]['key']};});_0x2768c0['model']=_[_0xa905('0x2a')](_0x5adc5d,_0xa905('0x24'));_0x2768c0[_0xa905('0x2b')]=_[_0xa905('0x2c')](_0x399f07['query']);_0x2768c0[_0xa905('0x2d')]=_[_0xa905('0x2e')](_0x2768c0[_0xa905('0x2f')],_0x2768c0[_0xa905('0x2b')]);_0x2ff254[_0xa905('0x30')]=_['intersection'](_0x2768c0[_0xa905('0x2f')],qs[_0xa905('0x31')](_0x399f07[_0xa905('0x2b')][_0xa905('0x31')]));_0x2ff254[_0xa905('0x30')]=_0x2ff254[_0xa905('0x30')]['length']?_0x2ff254[_0xa905('0x30')]:_0x2768c0[_0xa905('0x2f')];if(!_0x399f07[_0xa905('0x2b')][_0xa905('0x32')](_0xa905('0x33'))){_0x2ff254['limit']=qs[_0xa905('0x1a')](_0x399f07['query'][_0xa905('0x1a')]);_0x2ff254[_0xa905('0x19')]=qs[_0xa905('0x19')](_0x399f07[_0xa905('0x2b')]['offset']);}_0x2ff254[_0xa905('0x34')]=qs[_0xa905('0x35')](_0x399f07['query'][_0xa905('0x35')]);_0x2ff254['where']=qs[_0xa905('0x2d')](_['pick'](_0x399f07[_0xa905('0x2b')],_0x2768c0['filters']));if(_0x399f07[_0xa905('0x2b')][_0xa905('0x36')]){_0x2ff254[_0xa905('0x37')]=_[_0xa905('0x38')](_0x2ff254[_0xa905('0x37')],{'$or':_[_0xa905('0x2a')](_0x5adc5d,function(_0x27649d){if(_0x27649d[_0xa905('0x29')]!==_0xa905('0x39')){var _0x2427e9={};_0x2427e9[_0x27649d[_0xa905('0x24')]]={'$like':'%'+_0x399f07['query'][_0xa905('0x36')]+'%'};return _0x2427e9;}})});}_0x2ff254=_[_0xa905('0x38')]({},_0x2ff254,_0x399f07['options']);var _0xb059c2={'where':_0x2ff254[_0xa905('0x37')]};return db['Dynamics365Field'][_0xa905('0x18')](_0xb059c2)[_0xa905('0x20')](function(_0x5c03ff){_0x131421[_0xa905('0x18')]=_0x5c03ff;if(_0x399f07['query'][_0xa905('0x3a')]){_0x2ff254[_0xa905('0x3b')]=[{'all':!![]}];}return db['Dynamics365Field'][_0xa905('0x3c')](_0x2ff254);})['then'](function(_0x14b559){_0x131421['rows']=_0x14b559;return _0x131421;})[_0xa905('0x20')](respondWithFilteredResult(_0x172129,_0x2ff254))[_0xa905('0x3d')](handleError(_0x172129,null));};exports[_0xa905('0x3e')]=function(_0x382412,_0x18263b){var _0x193edc={'raw':!![],'where':{'id':_0x382412[_0xa905('0x3f')]['id']}},_0x1cf0ee={};_0x1cf0ee['model']=_[_0xa905('0x2c')](db[_0xa905('0x26')]['rawAttributes']);_0x1cf0ee[_0xa905('0x2b')]=_[_0xa905('0x2c')](_0x382412['query']);_0x1cf0ee[_0xa905('0x2d')]=_[_0xa905('0x2e')](_0x1cf0ee['model'],_0x1cf0ee[_0xa905('0x2b')]);_0x193edc[_0xa905('0x30')]=_[_0xa905('0x2e')](_0x1cf0ee[_0xa905('0x2f')],qs[_0xa905('0x31')](_0x382412[_0xa905('0x2b')][_0xa905('0x31')]));_0x193edc[_0xa905('0x30')]=_0x193edc[_0xa905('0x30')][_0xa905('0x40')]?_0x193edc[_0xa905('0x30')]:_0x1cf0ee['model'];if(_0x382412[_0xa905('0x2b')]['includeAll']){_0x193edc['include']=[{'all':!![]}];}_0x193edc=_[_0xa905('0x38')]({},_0x193edc,_0x382412['options']);return db[_0xa905('0x26')]['find'](_0x193edc)['then'](handleEntityNotFound(_0x18263b,null))[_0xa905('0x20')](respondWithResult(_0x18263b,null))['catch'](handleError(_0x18263b,null));};exports[_0xa905('0x41')]=function(_0x587b5f,_0x4d170a){return db['Dynamics365Field']['create'](_0x587b5f[_0xa905('0x42')],{})[_0xa905('0x20')](respondWithResult(_0x4d170a,0xc9))[_0xa905('0x3d')](handleError(_0x4d170a,null));};exports[_0xa905('0x43')]=function(_0x5c9e8a,_0x3ff89f){if(_0x5c9e8a['body']['id']){delete _0x5c9e8a['body']['id'];}return db[_0xa905('0x26')][_0xa905('0x44')]({'where':{'id':_0x5c9e8a[_0xa905('0x3f')]['id']}})[_0xa905('0x20')](handleEntityNotFound(_0x3ff89f,null))[_0xa905('0x20')](saveUpdates(_0x5c9e8a[_0xa905('0x42')],null))[_0xa905('0x20')](respondWithResult(_0x3ff89f,null))[_0xa905('0x3d')](handleError(_0x3ff89f,null));};exports[_0xa905('0x21')]=function(_0x2f1311,_0x47479f){return db[_0xa905('0x26')][_0xa905('0x44')]({'where':{'id':_0x2f1311[_0xa905('0x3f')]['id']}})[_0xa905('0x20')](handleEntityNotFound(_0x47479f,null))[_0xa905('0x20')](removeEntity(_0x47479f,null))[_0xa905('0x3d')](handleError(_0x47479f,null));};
\ No newline at end of file
+var _0xaee6=['sort','where','pick','merge','VIRTUAL','filter','includeAll','include','rows','catch','show','params','options','find','create','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','apply','reject','save','destroy','then','error','stack','name','send','index','map','Dynamics365Field','rawAttributes','fieldName','type','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','order'];(function(_0x36996d,_0x53f741){var _0x5f0877=function(_0xc52912){while(--_0xc52912){_0x36996d['push'](_0x36996d['shift']());}};_0x5f0877(++_0x53f741);}(_0xaee6,0x187));var _0x6aee=function(_0x48211e,_0x3fe6e1){_0x48211e=_0x48211e-0x0;var _0xb9369c=_0xaee6[_0x48211e];return _0xb9369c;};'use strict';var pdf=require(_0x6aee('0x0'));var emlformat=require(_0x6aee('0x1'));var rimraf=require(_0x6aee('0x2'));var zipdir=require(_0x6aee('0x3'));var jsonpatch=require(_0x6aee('0x4'));var rp=require(_0x6aee('0x5'));var moment=require('moment');var BPromise=require(_0x6aee('0x6'));var Mustache=require(_0x6aee('0x7'));var util=require(_0x6aee('0x8'));var path=require('path');var sox=require(_0x6aee('0x9'));var csv=require(_0x6aee('0xa'));var ejs=require(_0x6aee('0xb'));var fs=require('fs');var _=require(_0x6aee('0xc'));var squel=require(_0x6aee('0xd'));var crypto=require(_0x6aee('0xe'));var jsforce=require(_0x6aee('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6aee('0x10'));var Papa=require('papaparse');var Redis=require(_0x6aee('0x11'));var authService=require(_0x6aee('0x12'));var qs=require(_0x6aee('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6aee('0x14'));var logger=require(_0x6aee('0x15'))(_0x6aee('0x16'));var utils=require(_0x6aee('0x17'));var config=require('../../config/environment');var db=require(_0x6aee('0x18'))['db'];function respondWithStatusCode(_0x567627,_0x5b4551){_0x5b4551=_0x5b4551||0xcc;return function(_0x46e458){if(_0x46e458){return _0x567627[_0x6aee('0x19')](_0x5b4551);}return _0x567627[_0x6aee('0x1a')](_0x5b4551)[_0x6aee('0x1b')]();};}function respondWithResult(_0x5201fa,_0x2d13f5){_0x2d13f5=_0x2d13f5||0xc8;return function(_0x238b4d){if(_0x238b4d){return _0x5201fa['status'](_0x2d13f5)['json'](_0x238b4d);}};}function respondWithFilteredResult(_0x3179e3,_0x10a0c8){return function(_0x658ef){if(_0x658ef){var _0x18b259=_0x658ef[_0x6aee('0x1c')],_0x16cc61=_0x10a0c8['offset'],_0x257c0b=_0x10a0c8[_0x6aee('0x1d')]+_0x10a0c8[_0x6aee('0x1e')],_0x1c0235;if(_0x257c0b>=_0x18b259){_0x257c0b=_0x18b259;_0x1c0235=0xc8;}else{_0x1c0235=0xce;}_0x3179e3['status'](_0x1c0235);return _0x3179e3[_0x6aee('0x1f')](_0x6aee('0x20'),_0x16cc61+'-'+_0x257c0b+'/'+_0x18b259)['json'](_0x658ef);}return null;};}function patchUpdates(_0x1848a9){return function(_0x138d83){try{jsonpatch[_0x6aee('0x21')](_0x138d83,_0x1848a9,!![]);}catch(_0x3231af){return BPromise[_0x6aee('0x22')](_0x3231af);}return _0x138d83[_0x6aee('0x23')]();};}function saveUpdates(_0xf94d0d,_0x5969b2){return function(_0x25c43f){if(_0x25c43f){return _0x25c43f['update'](_0xf94d0d)['then'](function(_0x2097ed){return _0x2097ed;});}return null;};}function removeEntity(_0x3413df,_0x409295){return function(_0x4619b1){if(_0x4619b1){return _0x4619b1[_0x6aee('0x24')]()[_0x6aee('0x25')](function(){_0x3413df[_0x6aee('0x1a')](0xcc)[_0x6aee('0x1b')]();});}};}function handleEntityNotFound(_0x57b997,_0xc1b66c){return function(_0x511ea6){if(!_0x511ea6){_0x57b997['sendStatus'](0x194);}return _0x511ea6;};}function handleError(_0x5fbffb,_0x30f4cd){_0x30f4cd=_0x30f4cd||0x1f4;return function(_0x5ea8da){logger[_0x6aee('0x26')](_0x5ea8da[_0x6aee('0x27')]);if(_0x5ea8da['name']){delete _0x5ea8da[_0x6aee('0x28')];}_0x5fbffb[_0x6aee('0x1a')](_0x30f4cd)[_0x6aee('0x29')](_0x5ea8da);};}exports[_0x6aee('0x2a')]=function(_0xb5c93c,_0x321c55){var _0x411149={},_0x34f448={},_0x34034a={'count':0x0,'rows':[]};var _0x1916b7=_[_0x6aee('0x2b')](db[_0x6aee('0x2c')][_0x6aee('0x2d')],function(_0x7327d4){return{'name':_0x7327d4[_0x6aee('0x2e')],'type':_0x7327d4[_0x6aee('0x2f')]['key']};});_0x34f448['model']=_[_0x6aee('0x2b')](_0x1916b7,_0x6aee('0x28'));_0x34f448[_0x6aee('0x30')]=_[_0x6aee('0x31')](_0xb5c93c['query']);_0x34f448[_0x6aee('0x32')]=_['intersection'](_0x34f448[_0x6aee('0x33')],_0x34f448[_0x6aee('0x30')]);_0x411149[_0x6aee('0x34')]=_[_0x6aee('0x35')](_0x34f448[_0x6aee('0x33')],qs[_0x6aee('0x36')](_0xb5c93c[_0x6aee('0x30')][_0x6aee('0x36')]));_0x411149[_0x6aee('0x34')]=_0x411149[_0x6aee('0x34')][_0x6aee('0x37')]?_0x411149[_0x6aee('0x34')]:_0x34f448[_0x6aee('0x33')];if(!_0xb5c93c['query'][_0x6aee('0x38')](_0x6aee('0x39'))){_0x411149[_0x6aee('0x1e')]=qs[_0x6aee('0x1e')](_0xb5c93c[_0x6aee('0x30')][_0x6aee('0x1e')]);_0x411149[_0x6aee('0x1d')]=qs[_0x6aee('0x1d')](_0xb5c93c['query'][_0x6aee('0x1d')]);}_0x411149[_0x6aee('0x3a')]=qs[_0x6aee('0x3b')](_0xb5c93c[_0x6aee('0x30')][_0x6aee('0x3b')]);_0x411149[_0x6aee('0x3c')]=qs[_0x6aee('0x32')](_[_0x6aee('0x3d')](_0xb5c93c[_0x6aee('0x30')],_0x34f448[_0x6aee('0x32')]));if(_0xb5c93c[_0x6aee('0x30')]['filter']){_0x411149['where']=_[_0x6aee('0x3e')](_0x411149['where'],{'$or':_['map'](_0x1916b7,function(_0x387c58){if(_0x387c58[_0x6aee('0x2f')]!==_0x6aee('0x3f')){var _0x590825={};_0x590825[_0x387c58[_0x6aee('0x28')]]={'$like':'%'+_0xb5c93c[_0x6aee('0x30')][_0x6aee('0x40')]+'%'};return _0x590825;}})});}_0x411149=_[_0x6aee('0x3e')]({},_0x411149,_0xb5c93c['options']);var _0x1aba43={'where':_0x411149[_0x6aee('0x3c')]};return db[_0x6aee('0x2c')][_0x6aee('0x1c')](_0x1aba43)[_0x6aee('0x25')](function(_0x5b85cc){_0x34034a[_0x6aee('0x1c')]=_0x5b85cc;if(_0xb5c93c[_0x6aee('0x30')][_0x6aee('0x41')]){_0x411149[_0x6aee('0x42')]=[{'all':!![]}];}return db[_0x6aee('0x2c')]['findAll'](_0x411149);})[_0x6aee('0x25')](function(_0x49777d){_0x34034a[_0x6aee('0x43')]=_0x49777d;return _0x34034a;})[_0x6aee('0x25')](respondWithFilteredResult(_0x321c55,_0x411149))[_0x6aee('0x44')](handleError(_0x321c55,null));};exports[_0x6aee('0x45')]=function(_0x36c6a4,_0x1b1898){var _0x5ba53b={'raw':!![],'where':{'id':_0x36c6a4[_0x6aee('0x46')]['id']}},_0x58b3a2={};_0x58b3a2['model']=_[_0x6aee('0x31')](db[_0x6aee('0x2c')][_0x6aee('0x2d')]);_0x58b3a2[_0x6aee('0x30')]=_['keys'](_0x36c6a4[_0x6aee('0x30')]);_0x58b3a2['filters']=_[_0x6aee('0x35')](_0x58b3a2['model'],_0x58b3a2[_0x6aee('0x30')]);_0x5ba53b[_0x6aee('0x34')]=_[_0x6aee('0x35')](_0x58b3a2[_0x6aee('0x33')],qs[_0x6aee('0x36')](_0x36c6a4[_0x6aee('0x30')][_0x6aee('0x36')]));_0x5ba53b[_0x6aee('0x34')]=_0x5ba53b['attributes'][_0x6aee('0x37')]?_0x5ba53b[_0x6aee('0x34')]:_0x58b3a2['model'];if(_0x36c6a4['query'][_0x6aee('0x41')]){_0x5ba53b[_0x6aee('0x42')]=[{'all':!![]}];}_0x5ba53b=_['merge']({},_0x5ba53b,_0x36c6a4[_0x6aee('0x47')]);return db['Dynamics365Field'][_0x6aee('0x48')](_0x5ba53b)[_0x6aee('0x25')](handleEntityNotFound(_0x1b1898,null))[_0x6aee('0x25')](respondWithResult(_0x1b1898,null))[_0x6aee('0x44')](handleError(_0x1b1898,null));};exports['create']=function(_0x4f5218,_0x11f9e6){return db[_0x6aee('0x2c')][_0x6aee('0x49')](_0x4f5218[_0x6aee('0x4a')],{})['then'](respondWithResult(_0x11f9e6,0xc9))[_0x6aee('0x44')](handleError(_0x11f9e6,null));};exports['update']=function(_0x40ea5e,_0x3b0392){if(_0x40ea5e[_0x6aee('0x4a')]['id']){delete _0x40ea5e[_0x6aee('0x4a')]['id'];}return db['Dynamics365Field'][_0x6aee('0x48')]({'where':{'id':_0x40ea5e[_0x6aee('0x46')]['id']}})[_0x6aee('0x25')](handleEntityNotFound(_0x3b0392,null))[_0x6aee('0x25')](saveUpdates(_0x40ea5e[_0x6aee('0x4a')],null))[_0x6aee('0x25')](respondWithResult(_0x3b0392,null))[_0x6aee('0x44')](handleError(_0x3b0392,null));};exports[_0x6aee('0x24')]=function(_0x56004e,_0x23e252){return db[_0x6aee('0x2c')]['find']({'where':{'id':_0x56004e[_0x6aee('0x46')]['id']}})[_0x6aee('0x25')](handleEntityNotFound(_0x23e252,null))[_0x6aee('0x25')](removeEntity(_0x23e252,null))[_0x6aee('0x44')](handleError(_0x23e252,null));};
\ No newline at end of file
diff --git a/server/api/intDynamics365Field/intDynamics365Field.model.js b/server/api/intDynamics365Field/intDynamics365Field.model.js
index 459a2c5..3cbf95d 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 _0x19ef=['util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','./intDynamics365Field.attributes','exports','Dynamics365Field','int_dynamics365_fields','dynamics365_unique_index','idField','FieldId','lodash'];(function(_0x2d2c16,_0x4e88b6){var _0x53f2fb=function(_0x6b6dac){while(--_0x6b6dac){_0x2d2c16['push'](_0x2d2c16['shift']());}};_0x53f2fb(++_0x4e88b6);}(_0x19ef,0xd1));var _0xf19e=function(_0x2459a7,_0x308a3f){_0x2459a7=_0x2459a7-0x0;var _0x42a01d=_0x19ef[_0x2459a7];return _0x42a01d;};'use strict';var _=require(_0xf19e('0x0'));var util=require(_0xf19e('0x1'));var logger=require(_0xf19e('0x2'))(_0xf19e('0x3'));var moment=require('moment');var BPromise=require(_0xf19e('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf19e('0x5'));var rimraf=require(_0xf19e('0x6'));var config=require(_0xf19e('0x7'));var attributes=require(_0xf19e('0x8'));module[_0xf19e('0x9')]=function(_0x2c54d8,_0x13385f){return _0x2c54d8['define'](_0xf19e('0xa'),attributes,{'tableName':_0xf19e('0xb'),'paranoid':![],'indexes':[{'name':_0xf19e('0xc'),'fields':[_0xf19e('0xd'),_0xf19e('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xe9df=['FieldId','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./intDynamics365Field.attributes','exports','define','Dynamics365Field','dynamics365_unique_index'];(function(_0x47e137,_0x3b8cd6){var _0x223976=function(_0x3388c6){while(--_0x3388c6){_0x47e137['push'](_0x47e137['shift']());}};_0x223976(++_0x3b8cd6);}(_0xe9df,0xa6));var _0xfe9d=function(_0x1b4474,_0x45738f){_0x1b4474=_0x1b4474-0x0;var _0x3425da=_0xe9df[_0x1b4474];return _0x3425da;};'use strict';var _=require(_0xfe9d('0x0'));var util=require(_0xfe9d('0x1'));var logger=require(_0xfe9d('0x2'))(_0xfe9d('0x3'));var moment=require('moment');var BPromise=require(_0xfe9d('0x4'));var rp=require(_0xfe9d('0x5'));var fs=require('fs');var path=require(_0xfe9d('0x6'));var rimraf=require(_0xfe9d('0x7'));var config=require(_0xfe9d('0x8'));var attributes=require(_0xfe9d('0x9'));module[_0xfe9d('0xa')]=function(_0x55453b,_0x45ee28){return _0x55453b[_0xfe9d('0xb')](_0xfe9d('0xc'),attributes,{'tableName':'int_dynamics365_fields','paranoid':![],'indexes':[{'name':_0xfe9d('0xd'),'fields':['idField',_0xfe9d('0xe')],'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 f33edef..2124cb5 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 _0xef66=['jayson/promise','client','http','request','then','info','request\x20sent','error','code','message','Dynamics365Field,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x4f5131,_0x517ea4){var _0x3c152b=function(_0x5bf546){while(--_0x5bf546){_0x4f5131['push'](_0x4f5131['shift']());}};_0x3c152b(++_0x517ea4);}(_0xef66,0x1db));var _0x6ef6=function(_0x5f1e49,_0x3bea4c){_0x5f1e49=_0x5f1e49-0x0;var _0x2b97cf=_0xef66[_0x5f1e49];return _0x2b97cf;};'use strict';var _=require(_0x6ef6('0x0'));var util=require(_0x6ef6('0x1'));var moment=require(_0x6ef6('0x2'));var BPromise=require(_0x6ef6('0x3'));var rs=require(_0x6ef6('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x6ef6('0x5'));var logger=require(_0x6ef6('0x6'))(_0x6ef6('0x7'));var config=require(_0x6ef6('0x8'));var jayson=require(_0x6ef6('0x9'));var client=jayson[_0x6ef6('0xa')][_0x6ef6('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1830aa,_0x3755b5,_0x4f06b9){return new BPromise(function(_0x5a7c74,_0xc0d555){return client[_0x6ef6('0xc')](_0x1830aa,_0x4f06b9)[_0x6ef6('0xd')](function(_0x391e0e){logger[_0x6ef6('0xe')]('Dynamics365Field,\x20%s,\x20%s',_0x3755b5,_0x6ef6('0xf'));logger['debug']('Dynamics365Field,\x20%s,\x20%s,\x20%s',_0x3755b5,_0x6ef6('0xf'),JSON['stringify'](_0x391e0e));if(_0x391e0e[_0x6ef6('0x10')]){if(_0x391e0e[_0x6ef6('0x10')][_0x6ef6('0x11')]===0x1f4){logger[_0x6ef6('0x10')]('Dynamics365Field,\x20%s,\x20%s',_0x3755b5,_0x391e0e[_0x6ef6('0x10')][_0x6ef6('0x12')]);return _0xc0d555(_0x391e0e[_0x6ef6('0x10')][_0x6ef6('0x12')]);}logger['error'](_0x6ef6('0x13'),_0x3755b5,_0x391e0e['error'][_0x6ef6('0x12')]);return _0x5a7c74(_0x391e0e[_0x6ef6('0x10')]['message']);}else{logger[_0x6ef6('0xe')](_0x6ef6('0x13'),_0x3755b5,_0x6ef6('0xf'));_0x5a7c74(_0x391e0e[_0x6ef6('0x14')][_0x6ef6('0x12')]);}})[_0x6ef6('0x15')](function(_0x4ea222){logger[_0x6ef6('0x10')](_0x6ef6('0x13'),_0x3755b5,_0x4ea222);_0xc0d555(_0x4ea222);});});}
\ No newline at end of file
+var _0x326f=['info','Dynamics365Field,\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(_0x2976cd,_0x5c1f6d){var _0x518222=function(_0x248cac){while(--_0x248cac){_0x2976cd['push'](_0x2976cd['shift']());}};_0x518222(++_0x5c1f6d);}(_0x326f,0xd1));var _0xf326=function(_0x294f81,_0x10d6cb){_0x294f81=_0x294f81-0x0;var _0x1ac0c8=_0x326f[_0x294f81];return _0x1ac0c8;};'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')]('Dynamics365Field,\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')]('Dynamics365Field,\x20%s,\x20%s',_0x3851eb,_0x34128e);_0x515bfa(_0x34128e);});});}
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/index.js b/server/api/intFreshdeskAccount/index.js
index 448ffc2..2e3182d 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 _0x29be=['addConfiguration','update','delete','exports','multer','util','connect-timeout','express','Router','../../components/interaction/service','./intFreshdeskAccount.controller','get','isAuthenticated','index','/:id','/:id/configurations','getConfigurations','getFields'];(function(_0x32f054,_0x254c74){var _0xc4f975=function(_0x1d1b06){while(--_0x1d1b06){_0x32f054['push'](_0x32f054['shift']());}};_0xc4f975(++_0x254c74);}(_0x29be,0x148));var _0xe29b=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x29be[_0x4243a3];return _0x1b2a33;};'use strict';var multer=require(_0xe29b('0x0'));var util=require(_0xe29b('0x1'));var path=require('path');var timeout=require(_0xe29b('0x2'));var express=require(_0xe29b('0x3'));var router=express[_0xe29b('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xe29b('0x5'));var config=require('../../config/environment');var controller=require(_0xe29b('0x6'));router[_0xe29b('0x7')]('/',auth[_0xe29b('0x8')](),controller[_0xe29b('0x9')]);router[_0xe29b('0x7')](_0xe29b('0xa'),auth[_0xe29b('0x8')](),controller['show']);router[_0xe29b('0x7')](_0xe29b('0xb'),auth[_0xe29b('0x8')](),controller[_0xe29b('0xc')]);router[_0xe29b('0x7')]('/:id/fields',auth[_0xe29b('0x8')](),controller[_0xe29b('0xd')]);router['post']('/',auth[_0xe29b('0x8')](),controller['create']);router['post'](_0xe29b('0xb'),auth[_0xe29b('0x8')](),controller[_0xe29b('0xe')]);router['put'](_0xe29b('0xa'),auth[_0xe29b('0x8')](),controller[_0xe29b('0xf')]);router[_0xe29b('0x10')](_0xe29b('0xa'),auth[_0xe29b('0x8')](),controller['destroy']);module[_0xe29b('0x11')]=router;
\ No newline at end of file
+var _0xd883=['destroy','multer','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','update','delete'];(function(_0x56908c,_0x4b974d){var _0x4bd4f7=function(_0x2d8755){while(--_0x2d8755){_0x56908c['push'](_0x56908c['shift']());}};_0x4bd4f7(++_0x4b974d);}(_0xd883,0x86));var _0x3d88=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xd883[_0xfae23b];return _0x200640;};'use strict';var multer=require(_0x3d88('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x3d88('0x1'));var router=express[_0x3d88('0x2')]();var auth=require(_0x3d88('0x3'));var interaction=require(_0x3d88('0x4'));var config=require(_0x3d88('0x5'));var controller=require('./intFreshdeskAccount.controller');router[_0x3d88('0x6')]('/',auth[_0x3d88('0x7')](),controller[_0x3d88('0x8')]);router[_0x3d88('0x6')](_0x3d88('0x9'),auth[_0x3d88('0x7')](),controller[_0x3d88('0xa')]);router[_0x3d88('0x6')](_0x3d88('0xb'),auth[_0x3d88('0x7')](),controller[_0x3d88('0xc')]);router[_0x3d88('0x6')](_0x3d88('0xd'),auth['isAuthenticated'](),controller[_0x3d88('0xe')]);router[_0x3d88('0xf')]('/',auth[_0x3d88('0x7')](),controller['create']);router['post'](_0x3d88('0xb'),auth[_0x3d88('0x7')](),controller['addConfiguration']);router['put'](_0x3d88('0x9'),auth[_0x3d88('0x7')](),controller[_0x3d88('0x10')]);router[_0x3d88('0x11')](_0x3d88('0x9'),auth['isAuthenticated'](),controller[_0x3d88('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js
index 3d19047..93df44b 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 _0x6c45=['username','remoteUri','sequelize','exports','STRING'];(function(_0x348659,_0xd595df){var _0x35d731=function(_0x1503cd){while(--_0x1503cd){_0x348659['push'](_0x348659['shift']());}};_0x35d731(++_0xd595df);}(_0x6c45,0xb1));var _0x56c4=function(_0x50e7b7,_0x121e1e){_0x50e7b7=_0x50e7b7-0x0;var _0x1f1442=_0x6c45[_0x50e7b7];return _0x1f1442;};'use strict';var Sequelize=require(_0x56c4('0x0'));module[_0x56c4('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x56c4('0x2')]},'username':{'type':Sequelize[_0x56c4('0x2')],'unique':_0x56c4('0x3')},'apiKey':{'type':Sequelize[_0x56c4('0x2')]},'remoteUri':{'type':Sequelize[_0x56c4('0x2')],'unique':_0x56c4('0x4')},'serverUrl':{'type':Sequelize[_0x56c4('0x2')]}};
\ No newline at end of file
+var _0x17a7=['username','remoteUri','STRING'];(function(_0x29a9a1,_0x933e2d){var _0x2226b7=function(_0x2f41cb){while(--_0x2f41cb){_0x29a9a1['push'](_0x29a9a1['shift']());}};_0x2226b7(++_0x933e2d);}(_0x17a7,0xc2));var _0x717a=function(_0x43df48,_0x157e38){_0x43df48=_0x43df48-0x0;var _0x5681af=_0x17a7[_0x43df48];return _0x5681af;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x717a('0x0')]},'username':{'type':Sequelize[_0x717a('0x0')],'unique':_0x717a('0x1')},'apiKey':{'type':Sequelize[_0x717a('0x0')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x717a('0x2')},'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 6512ae8..7835302 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 _0x3ea1=['intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','rows','show','keys','find','body','params','FreshdeskConfiguration','getConfigurations','addConfiguration','findOne','AccountId','getSubjects','channel','Descriptions','getDescriptions','FreshdeskField','Subjects','remoteUri','apiKey','lastIndexOf','format','%s/%s','%s:X','base64','requester','subject','agent','description','priority','group','source','ticket_type','company','remove','includes','default','custom_dropdown','choices','capitalize','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','Wrong\x20credentials','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','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','end','json','count','offset','limit','Content-Range','apply','save','then','destroy','name','status','send','index','FreshdeskAccount','rawAttributes','fieldName','type','map','query','filters'];(function(_0x4e1991,_0xeb727c){var _0x318050=function(_0x1af113){while(--_0x1af113){_0x4e1991['push'](_0x4e1991['shift']());}};_0x318050(++_0xeb727c);}(_0x3ea1,0x1be));var _0x13ea=function(_0x2fff75,_0x573671){_0x2fff75=_0x2fff75-0x0;var _0x5b3f36=_0x3ea1[_0x2fff75];return _0x5b3f36;};'use strict';var pdf=require(_0x13ea('0x0'));var emlformat=require(_0x13ea('0x1'));var rimraf=require(_0x13ea('0x2'));var zipdir=require(_0x13ea('0x3'));var jsonpatch=require(_0x13ea('0x4'));var rp=require('request-promise');var moment=require(_0x13ea('0x5'));var BPromise=require(_0x13ea('0x6'));var Mustache=require(_0x13ea('0x7'));var util=require(_0x13ea('0x8'));var path=require(_0x13ea('0x9'));var sox=require(_0x13ea('0xa'));var csv=require(_0x13ea('0xb'));var ejs=require(_0x13ea('0xc'));var fs=require('fs');var _=require(_0x13ea('0xd'));var squel=require(_0x13ea('0xe'));var crypto=require(_0x13ea('0xf'));var jsforce=require(_0x13ea('0x10'));var deskjs=require(_0x13ea('0x11'));var toCsv=require(_0x13ea('0xb'));var querystring=require(_0x13ea('0x12'));var Papa=require(_0x13ea('0x13'));var Redis=require(_0x13ea('0x14'));var authService=require(_0x13ea('0x15'));var qs=require(_0x13ea('0x16'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x13ea('0x17'));var logger=require(_0x13ea('0x18'))(_0x13ea('0x19'));var utils=require(_0x13ea('0x1a'));var config=require(_0x13ea('0x1b'));var db=require(_0x13ea('0x1c'))['db'];var integrations=require(_0x13ea('0x1d'));var jayson=require(_0x13ea('0x1e'));var client=jayson[_0x13ea('0x1f')][_0x13ea('0x20')]({'port':0x232a});function checkPasswordPattern(_0x19ebfb,_0xffef53,_0x5dbf2a){if(_0x5dbf2a){var _0x2b03ae=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2b03ae[_0x13ea('0x21')](_0xffef53)){return _0x19ebfb;}else{throw new db[(_0x13ea('0x22'))][(_0x13ea('0x23'))](_0x13ea('0x24'));}}else{return _0x19ebfb;}}function respondWithRpcPromise(_0xa91360,_0x3249e1,_0x13ef33,_0x25a274){return new BPromise(function(_0x308ab3,_0x151cd0){var _0xa1dd9e=_0x25a274||client;return _0xa1dd9e[_0x13ea('0x25')](_0xa91360,_0x13ef33)['then'](function(_0x28e6bf){logger[_0x13ea('0x26')](_0x13ea('0x27'),_0x3249e1,_0x13ea('0x28'));logger[_0x13ea('0x29')](_0x13ea('0x2a'),_0x3249e1,_0x13ea('0x28'),JSON[_0x13ea('0x2b')](_0x28e6bf));if(_0x28e6bf[_0x13ea('0x2c')]){if(_0x28e6bf['error']['code']===0x1f4){logger[_0x13ea('0x2c')](_0x13ea('0x27'),_0x3249e1,_0x28e6bf[_0x13ea('0x2c')][_0x13ea('0x2d')]);return _0x151cd0(_0x28e6bf[_0x13ea('0x2c')]['message']);}logger['error']('FreshdeskAccount,\x20%s,\x20%s',_0x3249e1,_0x28e6bf[_0x13ea('0x2c')][_0x13ea('0x2d')]);return _0x308ab3(_0x28e6bf[_0x13ea('0x2c')][_0x13ea('0x2d')]);}else{logger[_0x13ea('0x26')](_0x13ea('0x27'),_0x3249e1,_0x13ea('0x28'));_0x308ab3(_0x28e6bf[_0x13ea('0x2e')][_0x13ea('0x2d')]);}})[_0x13ea('0x2f')](function(_0x168e51){logger[_0x13ea('0x2c')](_0x13ea('0x27'),_0x3249e1,_0x168e51);_0x151cd0(_0x168e51);});});}function respondWithStatusCode(_0x5e24b8,_0x555695){_0x555695=_0x555695||0xcc;return function(_0x212c06){if(_0x212c06){return _0x5e24b8[_0x13ea('0x30')](_0x555695);}return _0x5e24b8['status'](_0x555695)[_0x13ea('0x31')]();};}function respondWithResult(_0x3ce045,_0x3ab898){_0x3ab898=_0x3ab898||0xc8;return function(_0x3ebacd){if(_0x3ebacd){return _0x3ce045['status'](_0x3ab898)[_0x13ea('0x32')](_0x3ebacd);}};}function respondWithFilteredResult(_0x1e0a92,_0x16115c){return function(_0x9c82ea){if(_0x9c82ea){var _0x3012b6=_0x9c82ea[_0x13ea('0x33')],_0x374b3d=_0x16115c[_0x13ea('0x34')],_0x2a9a0c=_0x16115c[_0x13ea('0x34')]+_0x16115c[_0x13ea('0x35')],_0x34a677;if(_0x2a9a0c>=_0x3012b6){_0x2a9a0c=_0x3012b6;_0x34a677=0xc8;}else{_0x34a677=0xce;}_0x1e0a92['status'](_0x34a677);return _0x1e0a92['set'](_0x13ea('0x36'),_0x374b3d+'-'+_0x2a9a0c+'/'+_0x3012b6)[_0x13ea('0x32')](_0x9c82ea);}return null;};}function patchUpdates(_0x2d99bb){return function(_0x188aac){try{jsonpatch[_0x13ea('0x37')](_0x188aac,_0x2d99bb,!![]);}catch(_0x40a2f9){return BPromise['reject'](_0x40a2f9);}return _0x188aac[_0x13ea('0x38')]();};}function saveUpdates(_0x36f405,_0x2fa227){return function(_0x2b94e1){if(_0x2b94e1){return _0x2b94e1['update'](_0x36f405)[_0x13ea('0x39')](function(_0x5a197b){return _0x5a197b;});}return null;};}function removeEntity(_0x998379,_0x4c1d27){return function(_0x1087d1){if(_0x1087d1){return _0x1087d1[_0x13ea('0x3a')]()[_0x13ea('0x39')](function(){_0x998379['status'](0xcc)[_0x13ea('0x31')]();});}};}function handleEntityNotFound(_0x586d52,_0x292646){return function(_0x280ebc){if(!_0x280ebc){_0x586d52[_0x13ea('0x30')](0x194);}return _0x280ebc;};}function handleError(_0x19e18c,_0x4d7a27){_0x4d7a27=_0x4d7a27||0x1f4;return function(_0x1a05f0){logger[_0x13ea('0x2c')](_0x1a05f0['stack']);if(_0x1a05f0[_0x13ea('0x3b')]){delete _0x1a05f0['name'];}_0x19e18c[_0x13ea('0x3c')](_0x4d7a27)[_0x13ea('0x3d')](_0x1a05f0);};}exports[_0x13ea('0x3e')]=function(_0x3b0319,_0xb0cc97){var _0x151db7={},_0x1be9ba={},_0xfd5248={'count':0x0,'rows':[]};var _0x3dee3c=_['map'](db[_0x13ea('0x3f')][_0x13ea('0x40')],function(_0x4bf0a9){return{'name':_0x4bf0a9[_0x13ea('0x41')],'type':_0x4bf0a9[_0x13ea('0x42')]['key']};});_0x1be9ba['model']=_[_0x13ea('0x43')](_0x3dee3c,_0x13ea('0x3b'));_0x1be9ba[_0x13ea('0x44')]=_['keys'](_0x3b0319[_0x13ea('0x44')]);_0x1be9ba[_0x13ea('0x45')]=_[_0x13ea('0x46')](_0x1be9ba[_0x13ea('0x47')],_0x1be9ba[_0x13ea('0x44')]);_0x151db7[_0x13ea('0x48')]=_[_0x13ea('0x46')](_0x1be9ba[_0x13ea('0x47')],qs[_0x13ea('0x49')](_0x3b0319[_0x13ea('0x44')][_0x13ea('0x49')]));_0x151db7['attributes']=_0x151db7[_0x13ea('0x48')][_0x13ea('0x4a')]?_0x151db7[_0x13ea('0x48')]:_0x1be9ba[_0x13ea('0x47')];if(!_0x3b0319[_0x13ea('0x44')][_0x13ea('0x4b')](_0x13ea('0x4c'))){_0x151db7[_0x13ea('0x35')]=qs[_0x13ea('0x35')](_0x3b0319[_0x13ea('0x44')][_0x13ea('0x35')]);_0x151db7[_0x13ea('0x34')]=qs[_0x13ea('0x34')](_0x3b0319[_0x13ea('0x44')][_0x13ea('0x34')]);}_0x151db7[_0x13ea('0x4d')]=qs[_0x13ea('0x4e')](_0x3b0319[_0x13ea('0x44')][_0x13ea('0x4e')]);_0x151db7[_0x13ea('0x4f')]=qs[_0x13ea('0x45')](_[_0x13ea('0x50')](_0x3b0319[_0x13ea('0x44')],_0x1be9ba[_0x13ea('0x45')]));if(_0x3b0319[_0x13ea('0x44')][_0x13ea('0x51')]){_0x151db7[_0x13ea('0x4f')]=_[_0x13ea('0x52')](_0x151db7['where'],{'$or':_[_0x13ea('0x43')](_0x3dee3c,function(_0x3242c4){if(_0x3242c4[_0x13ea('0x42')]!=='VIRTUAL'){var _0x34e15d={};_0x34e15d[_0x3242c4['name']]={'$like':'%'+_0x3b0319[_0x13ea('0x44')][_0x13ea('0x51')]+'%'};return _0x34e15d;}})});}_0x151db7=_[_0x13ea('0x52')]({},_0x151db7,_0x3b0319[_0x13ea('0x53')]);var _0x37db31={'where':_0x151db7[_0x13ea('0x4f')]};return db[_0x13ea('0x3f')][_0x13ea('0x33')](_0x37db31)[_0x13ea('0x39')](function(_0x41e866){_0xfd5248['count']=_0x41e866;if(_0x3b0319[_0x13ea('0x44')][_0x13ea('0x54')]){_0x151db7[_0x13ea('0x55')]=[{'all':!![]}];}return db['FreshdeskAccount']['findAll'](_0x151db7);})[_0x13ea('0x39')](function(_0x10c442){_0xfd5248[_0x13ea('0x56')]=_0x10c442;return _0xfd5248;})[_0x13ea('0x39')](respondWithFilteredResult(_0xb0cc97,_0x151db7))[_0x13ea('0x2f')](handleError(_0xb0cc97,null));};exports[_0x13ea('0x57')]=function(_0x2e99d8,_0x32fa77){var _0x4b85dc={'raw':![],'where':{'id':_0x2e99d8['params']['id']}},_0x45fb7b={};_0x45fb7b[_0x13ea('0x47')]=_[_0x13ea('0x58')](db[_0x13ea('0x3f')][_0x13ea('0x40')]);_0x45fb7b[_0x13ea('0x44')]=_[_0x13ea('0x58')](_0x2e99d8[_0x13ea('0x44')]);_0x45fb7b[_0x13ea('0x45')]=_[_0x13ea('0x46')](_0x45fb7b[_0x13ea('0x47')],_0x45fb7b['query']);_0x4b85dc[_0x13ea('0x48')]=_[_0x13ea('0x46')](_0x45fb7b[_0x13ea('0x47')],qs['fields'](_0x2e99d8['query'][_0x13ea('0x49')]));_0x4b85dc[_0x13ea('0x48')]=_0x4b85dc[_0x13ea('0x48')][_0x13ea('0x4a')]?_0x4b85dc[_0x13ea('0x48')]:_0x45fb7b['model'];if(_0x2e99d8[_0x13ea('0x44')][_0x13ea('0x54')]){_0x4b85dc['include']=[{'all':!![]}];}_0x4b85dc=_[_0x13ea('0x52')]({},_0x4b85dc,_0x2e99d8[_0x13ea('0x53')]);return db['FreshdeskAccount'][_0x13ea('0x59')](_0x4b85dc)[_0x13ea('0x39')](handleEntityNotFound(_0x32fa77,null))['then'](respondWithResult(_0x32fa77,null))[_0x13ea('0x2f')](handleError(_0x32fa77,null));};exports['create']=function(_0x3529b5,_0x55150d){return db[_0x13ea('0x3f')]['create'](_0x3529b5[_0x13ea('0x5a')],{})[_0x13ea('0x39')](respondWithResult(_0x55150d,0xc9))[_0x13ea('0x2f')](handleError(_0x55150d,null));};exports['update']=function(_0x5294c5,_0x52a47f){if(_0x5294c5['body']['id']){delete _0x5294c5[_0x13ea('0x5a')]['id'];}return db[_0x13ea('0x3f')][_0x13ea('0x59')]({'where':{'id':_0x5294c5[_0x13ea('0x5b')]['id']}})[_0x13ea('0x39')](handleEntityNotFound(_0x52a47f,null))[_0x13ea('0x39')](saveUpdates(_0x5294c5['body'],null))[_0x13ea('0x39')](respondWithResult(_0x52a47f,null))[_0x13ea('0x2f')](handleError(_0x52a47f,null));};exports[_0x13ea('0x3a')]=function(_0x360cb9,_0x1e2e68){return db[_0x13ea('0x3f')][_0x13ea('0x59')]({'where':{'id':_0x360cb9['params']['id']}})[_0x13ea('0x39')](handleEntityNotFound(_0x1e2e68,null))['then'](removeEntity(_0x1e2e68,null))['catch'](handleError(_0x1e2e68,null));};exports['getConfigurations']=function(_0x12dd3c,_0x27c5b9,_0x400a0a){var _0x196276={};var _0x1b5483={};var _0x4cf614;var _0xfdb44a;return db['FreshdeskAccount']['findOne']({'where':{'id':_0x12dd3c[_0x13ea('0x5b')]['id']}})[_0x13ea('0x39')](handleEntityNotFound(_0x27c5b9,null))[_0x13ea('0x39')](function(_0x1f538d){if(_0x1f538d){_0x4cf614=_0x1f538d;_0x1b5483[_0x13ea('0x47')]=_['keys'](db[_0x13ea('0x5c')][_0x13ea('0x40')]);_0x1b5483['query']=_[_0x13ea('0x58')](_0x12dd3c[_0x13ea('0x44')]);_0x1b5483[_0x13ea('0x45')]=_[_0x13ea('0x46')](_0x1b5483[_0x13ea('0x47')],_0x1b5483['query']);_0x196276[_0x13ea('0x48')]=_[_0x13ea('0x46')](_0x1b5483[_0x13ea('0x47')],qs[_0x13ea('0x49')](_0x12dd3c[_0x13ea('0x44')][_0x13ea('0x49')]));_0x196276[_0x13ea('0x48')]=_0x196276['attributes'][_0x13ea('0x4a')]?_0x196276[_0x13ea('0x48')]:_0x1b5483[_0x13ea('0x47')];_0x196276[_0x13ea('0x4d')]=qs[_0x13ea('0x4e')](_0x12dd3c[_0x13ea('0x44')][_0x13ea('0x4e')]);_0x196276['where']=qs[_0x13ea('0x45')](_[_0x13ea('0x50')](_0x12dd3c['query'],_0x1b5483[_0x13ea('0x45')]));if(_0x12dd3c[_0x13ea('0x44')][_0x13ea('0x51')]){_0x196276['where']=_[_0x13ea('0x52')](_0x196276[_0x13ea('0x4f')],{'$or':_[_0x13ea('0x43')](_0x196276[_0x13ea('0x48')],function(_0x285e9d){var _0x1a126a={};_0x1a126a[_0x285e9d]={'$like':'%'+_0x12dd3c['query'][_0x13ea('0x51')]+'%'};return _0x1a126a;})});}_0x196276=_[_0x13ea('0x52')]({},_0x196276,_0x12dd3c[_0x13ea('0x53')]);return _0x4cf614[_0x13ea('0x5d')](_0x196276);}})['then'](function(_0x387d77){if(_0x387d77){_0xfdb44a=_0x387d77['length'];if(!_0x12dd3c['query'][_0x13ea('0x4b')](_0x13ea('0x4c'))){_0x196276['limit']=qs[_0x13ea('0x35')](_0x12dd3c[_0x13ea('0x44')][_0x13ea('0x35')]);_0x196276[_0x13ea('0x34')]=qs[_0x13ea('0x34')](_0x12dd3c['query'][_0x13ea('0x34')]);}return _0x4cf614['getConfigurations'](_0x196276);}})[_0x13ea('0x39')](function(_0x3489b5){if(_0x3489b5){return _0x3489b5?{'count':_0xfdb44a,'rows':_0x3489b5}:null;}})['then'](respondWithResult(_0x27c5b9,null))[_0x13ea('0x2f')](handleError(_0x27c5b9,null));};exports[_0x13ea('0x5e')]=function(_0x3dd532,_0x5cfd8b,_0x428bd3){if(_0x3dd532['body']['id']){delete _0x3dd532[_0x13ea('0x5a')]['id'];}return db[_0x13ea('0x3f')][_0x13ea('0x5f')]({'where':{'id':_0x3dd532[_0x13ea('0x5b')]['id']}})[_0x13ea('0x39')](handleEntityNotFound(_0x5cfd8b,null))[_0x13ea('0x39')](function(_0x2ebfb1){if(_0x2ebfb1){_0x3dd532['body'][_0x13ea('0x60')]=_0x2ebfb1['id'];_0x3dd532[_0x13ea('0x5a')]['Subjects']=integrations[_0x13ea('0x61')](_0x3dd532[_0x13ea('0x5a')][_0x13ea('0x62')],_0x3dd532[_0x13ea('0x5a')][_0x13ea('0x42')]);_0x3dd532['body'][_0x13ea('0x63')]=integrations[_0x13ea('0x64')](_0x3dd532[_0x13ea('0x5a')][_0x13ea('0x62')],_0x3dd532['body'][_0x13ea('0x42')]);return db[_0x13ea('0x5c')]['create'](_0x3dd532[_0x13ea('0x5a')],{'include':[{'model':db[_0x13ea('0x65')],'as':_0x13ea('0x66')},{'model':db[_0x13ea('0x65')],'as':_0x13ea('0x63')}]});}return null;})[_0x13ea('0x39')](respondWithResult(_0x5cfd8b,null))[_0x13ea('0x2f')](handleError(_0x5cfd8b,null));};exports['getFields']=function(_0x22f56a,_0x2becaa,_0x2285b1){var _0x33feef='';return db[_0x13ea('0x3f')][_0x13ea('0x5f')]({'where':{'id':_0x22f56a[_0x13ea('0x5b')]['id']},'attributes':['id',_0x13ea('0x67'),_0x13ea('0x68')]})[_0x13ea('0x39')](handleEntityNotFound(_0x2becaa,null))[_0x13ea('0x39')](function(_0x116554){if(_0x116554){_0x33feef=_0x116554[_0x13ea('0x67')];var _0x1b8358=_0x33feef['slice'](-0x1);if(_0x1b8358==='/'){_0x33feef=_0x33feef['substring'](0x0,_0x33feef[_0x13ea('0x69')](_0x1b8358));}return rp({'method':'GET','uri':util[_0x13ea('0x6a')](_0x13ea('0x6b'),_0x33feef,'api/v2/ticket_fields'),'headers':{'Authorization':util[_0x13ea('0x6a')]('Basic\x20%s',new Buffer(util[_0x13ea('0x6a')](_0x13ea('0x6c'),_0x116554[_0x13ea('0x68')]))['toString'](_0x13ea('0x6d')))},'json':!![]});}})[_0x13ea('0x39')](function(_0x165185){if(_0x165185){var _0x3a7e5b=[_0x13ea('0x6e'),_0x13ea('0x6f'),_0x13ea('0x70'),_0x13ea('0x71'),_0x13ea('0x3c'),_0x13ea('0x72'),_0x13ea('0x73'),_0x13ea('0x74'),_0x13ea('0x75'),'group',_0x13ea('0x76')];_[_0x13ea('0x77')](_0x165185,function(_0x9f9246){return _0x3a7e5b[_0x13ea('0x78')](_0x9f9246[_0x13ea('0x3b')])||!_0x9f9246[_0x13ea('0x79')]&&_0x9f9246[_0x13ea('0x42')]!=='custom_text'&&_0x9f9246[_0x13ea('0x42')]!==_0x13ea('0x7a');});return{'count':_0x165185[_0x13ea('0x4a')],'rows':_[_0x13ea('0x43')](_0x165185,function(_0x11b30f){return{'id':_0x11b30f[_0x13ea('0x3b')],'name':_0x11b30f['label'],'custom':!_0x11b30f[_0x13ea('0x79')],'options':_0x11b30f[_0x13ea('0x7b')]?_['map'](_0x11b30f['choices'],function(_0x47fdc8){return{'name':_[_0x13ea('0x7c')](_0x47fdc8),'value':_0x47fdc8};}):[]};})};}})[_0x13ea('0x39')](respondWithResult(_0x2becaa,null))[_0x13ea('0x2f')](function(_0x460c36){var _0x5159e5=_0x22f56a[_0x13ea('0x44')][_0x13ea('0x21')]?0x1f4:_0x460c36[_0x13ea('0x7d')]||0x1f4;logger[_0x13ea('0x2c')](_0x13ea('0x7e'),_0x13ea('0x7f'),_0x5159e5,JSON[_0x13ea('0x2b')](_0x460c36));delete _0x460c36[_0x13ea('0x3b')];if(_0x5159e5===0x191){_0x5159e5=0x190;}_0x2becaa[_0x13ea('0x3c')](_0x5159e5)[_0x13ea('0x3d')](_0x22f56a[_0x13ea('0x44')][_0x13ea('0x21')]?{'message':_0x13ea('0x80'),'statusCode':_0x460c36[_0x13ea('0x7d')]}:_0x460c36);});};
\ No newline at end of file
+var _0x5998=['to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','sendStatus','end','status','json','offset','limit','set','Content-Range','update','destroy','stack','name','send','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','fields','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','FreshdeskAccount','count','includeAll','rows','show','params','length','include','find','create','body','getConfigurations','findOne','FreshdeskConfiguration','order','addConfiguration','Subjects','getSubjects','channel','Descriptions','getDescriptions','FreshdeskField','getFields','remoteUri','slice','substring','lastIndexOf','GET','format','%s/%s','api/v2/ticket_fields','%s:X','toString','base64','requester','subject','priority','group','source','ticket_type','company','remove','includes','default','custom_text','custom_dropdown','map','label','choices','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','statusCode','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox'];(function(_0x568e72,_0x494e27){var _0x4576c0=function(_0x216307){while(--_0x216307){_0x568e72['push'](_0x568e72['shift']());}};_0x4576c0(++_0x494e27);}(_0x5998,0xf2));var _0x8599=function(_0x10d308,_0x98cd27){_0x10d308=_0x10d308-0x0;var _0x370b8c=_0x5998[_0x10d308];return _0x370b8c;};'use strict';var pdf=require(_0x8599('0x0'));var emlformat=require(_0x8599('0x1'));var rimraf=require(_0x8599('0x2'));var zipdir=require(_0x8599('0x3'));var jsonpatch=require(_0x8599('0x4'));var rp=require(_0x8599('0x5'));var moment=require(_0x8599('0x6'));var BPromise=require(_0x8599('0x7'));var Mustache=require('mustache');var util=require('util');var path=require(_0x8599('0x8'));var sox=require(_0x8599('0x9'));var csv=require(_0x8599('0xa'));var ejs=require(_0x8599('0xb'));var fs=require('fs');var _=require(_0x8599('0xc'));var squel=require('squel');var crypto=require(_0x8599('0xd'));var jsforce=require(_0x8599('0xe'));var deskjs=require(_0x8599('0xf'));var toCsv=require(_0x8599('0xa'));var querystring=require('querystring');var Papa=require(_0x8599('0x10'));var Redis=require(_0x8599('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x8599('0x12'));var as=require(_0x8599('0x13'));var hardwareService=require(_0x8599('0x14'));var logger=require('../../config/logger')(_0x8599('0x15'));var utils=require(_0x8599('0x16'));var config=require(_0x8599('0x17'));var db=require(_0x8599('0x18'))['db'];var integrations=require(_0x8599('0x19'));var jayson=require('jayson/promise');var client=jayson[_0x8599('0x1a')][_0x8599('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x523291,_0x4d0c6e,_0x41e97b){if(_0x41e97b){var _0x577220=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x577220[_0x8599('0x1c')](_0x4d0c6e)){return _0x523291;}else{throw new db[(_0x8599('0x1d'))][(_0x8599('0x1e'))](_0x8599('0x1f'));}}else{return _0x523291;}}function respondWithRpcPromise(_0x3f020c,_0x5c819c,_0x1249c2,_0x1859b8){return new BPromise(function(_0x398aec,_0x410f06){var _0x4623e4=_0x1859b8||client;return _0x4623e4[_0x8599('0x20')](_0x3f020c,_0x1249c2)[_0x8599('0x21')](function(_0x41958d){logger[_0x8599('0x22')](_0x8599('0x23'),_0x5c819c,_0x8599('0x24'));logger[_0x8599('0x25')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x5c819c,'request\x20sent',JSON[_0x8599('0x26')](_0x41958d));if(_0x41958d['error']){if(_0x41958d[_0x8599('0x27')]['code']===0x1f4){logger[_0x8599('0x27')](_0x8599('0x23'),_0x5c819c,_0x41958d[_0x8599('0x27')][_0x8599('0x28')]);return _0x410f06(_0x41958d[_0x8599('0x27')]['message']);}logger[_0x8599('0x27')]('FreshdeskAccount,\x20%s,\x20%s',_0x5c819c,_0x41958d[_0x8599('0x27')][_0x8599('0x28')]);return _0x398aec(_0x41958d[_0x8599('0x27')][_0x8599('0x28')]);}else{logger['info'](_0x8599('0x23'),_0x5c819c,_0x8599('0x24'));_0x398aec(_0x41958d[_0x8599('0x29')][_0x8599('0x28')]);}})[_0x8599('0x2a')](function(_0x3dae1a){logger[_0x8599('0x27')](_0x8599('0x23'),_0x5c819c,_0x3dae1a);_0x410f06(_0x3dae1a);});});}function respondWithStatusCode(_0x290f38,_0x2dd63c){_0x2dd63c=_0x2dd63c||0xcc;return function(_0x211932){if(_0x211932){return _0x290f38[_0x8599('0x2b')](_0x2dd63c);}return _0x290f38['status'](_0x2dd63c)[_0x8599('0x2c')]();};}function respondWithResult(_0xd8502e,_0x59f2d7){_0x59f2d7=_0x59f2d7||0xc8;return function(_0x3a5023){if(_0x3a5023){return _0xd8502e[_0x8599('0x2d')](_0x59f2d7)[_0x8599('0x2e')](_0x3a5023);}};}function respondWithFilteredResult(_0x1fa8c5,_0x32b102){return function(_0x198b53){if(_0x198b53){var _0x3b26a5=_0x198b53['count'],_0x162a64=_0x32b102['offset'],_0x44f72c=_0x32b102[_0x8599('0x2f')]+_0x32b102[_0x8599('0x30')],_0x4d3ad4;if(_0x44f72c>=_0x3b26a5){_0x44f72c=_0x3b26a5;_0x4d3ad4=0xc8;}else{_0x4d3ad4=0xce;}_0x1fa8c5[_0x8599('0x2d')](_0x4d3ad4);return _0x1fa8c5[_0x8599('0x31')](_0x8599('0x32'),_0x162a64+'-'+_0x44f72c+'/'+_0x3b26a5)[_0x8599('0x2e')](_0x198b53);}return null;};}function patchUpdates(_0x1b2f05){return function(_0x42e979){try{jsonpatch['apply'](_0x42e979,_0x1b2f05,!![]);}catch(_0x4fc7e0){return BPromise['reject'](_0x4fc7e0);}return _0x42e979['save']();};}function saveUpdates(_0x1116ad,_0x4ce052){return function(_0x362ff5){if(_0x362ff5){return _0x362ff5[_0x8599('0x33')](_0x1116ad)[_0x8599('0x21')](function(_0x19c480){return _0x19c480;});}return null;};}function removeEntity(_0x5d0826,_0x34b693){return function(_0x347a62){if(_0x347a62){return _0x347a62[_0x8599('0x34')]()[_0x8599('0x21')](function(){_0x5d0826[_0x8599('0x2d')](0xcc)[_0x8599('0x2c')]();});}};}function handleEntityNotFound(_0x3b75b0,_0x3227cb){return function(_0x391743){if(!_0x391743){_0x3b75b0[_0x8599('0x2b')](0x194);}return _0x391743;};}function handleError(_0xe1fec4,_0x5a0ff2){_0x5a0ff2=_0x5a0ff2||0x1f4;return function(_0x645344){logger[_0x8599('0x27')](_0x645344[_0x8599('0x35')]);if(_0x645344[_0x8599('0x36')]){delete _0x645344[_0x8599('0x36')];}_0xe1fec4[_0x8599('0x2d')](_0x5a0ff2)[_0x8599('0x37')](_0x645344);};}exports['index']=function(_0x5caed3,_0x763e26){var _0x13adb2={},_0x1551d3={},_0x5d783d={'count':0x0,'rows':[]};var _0x275dac=_['map'](db['FreshdeskAccount'][_0x8599('0x38')],function(_0x33a14a){return{'name':_0x33a14a[_0x8599('0x39')],'type':_0x33a14a[_0x8599('0x3a')]['key']};});_0x1551d3['model']=_['map'](_0x275dac,_0x8599('0x36'));_0x1551d3[_0x8599('0x3b')]=_[_0x8599('0x3c')](_0x5caed3[_0x8599('0x3b')]);_0x1551d3[_0x8599('0x3d')]=_[_0x8599('0x3e')](_0x1551d3[_0x8599('0x3f')],_0x1551d3[_0x8599('0x3b')]);_0x13adb2[_0x8599('0x40')]=_['intersection'](_0x1551d3[_0x8599('0x3f')],qs[_0x8599('0x41')](_0x5caed3[_0x8599('0x3b')][_0x8599('0x41')]));_0x13adb2['attributes']=_0x13adb2[_0x8599('0x40')]['length']?_0x13adb2[_0x8599('0x40')]:_0x1551d3[_0x8599('0x3f')];if(!_0x5caed3[_0x8599('0x3b')]['hasOwnProperty'](_0x8599('0x42'))){_0x13adb2[_0x8599('0x30')]=qs[_0x8599('0x30')](_0x5caed3[_0x8599('0x3b')][_0x8599('0x30')]);_0x13adb2[_0x8599('0x2f')]=qs[_0x8599('0x2f')](_0x5caed3[_0x8599('0x3b')]['offset']);}_0x13adb2['order']=qs[_0x8599('0x43')](_0x5caed3[_0x8599('0x3b')][_0x8599('0x43')]);_0x13adb2[_0x8599('0x44')]=qs[_0x8599('0x3d')](_[_0x8599('0x45')](_0x5caed3['query'],_0x1551d3[_0x8599('0x3d')]));if(_0x5caed3[_0x8599('0x3b')][_0x8599('0x46')]){_0x13adb2[_0x8599('0x44')]=_[_0x8599('0x47')](_0x13adb2[_0x8599('0x44')],{'$or':_['map'](_0x275dac,function(_0x119a76){if(_0x119a76[_0x8599('0x3a')]!==_0x8599('0x48')){var _0x35259b={};_0x35259b[_0x119a76['name']]={'$like':'%'+_0x5caed3[_0x8599('0x3b')]['filter']+'%'};return _0x35259b;}})});}_0x13adb2=_[_0x8599('0x47')]({},_0x13adb2,_0x5caed3[_0x8599('0x49')]);var _0xcae185={'where':_0x13adb2[_0x8599('0x44')]};return db[_0x8599('0x4a')]['count'](_0xcae185)[_0x8599('0x21')](function(_0x47a49b){_0x5d783d[_0x8599('0x4b')]=_0x47a49b;if(_0x5caed3['query'][_0x8599('0x4c')]){_0x13adb2['include']=[{'all':!![]}];}return db[_0x8599('0x4a')]['findAll'](_0x13adb2);})['then'](function(_0x1500cb){_0x5d783d[_0x8599('0x4d')]=_0x1500cb;return _0x5d783d;})[_0x8599('0x21')](respondWithFilteredResult(_0x763e26,_0x13adb2))[_0x8599('0x2a')](handleError(_0x763e26,null));};exports[_0x8599('0x4e')]=function(_0x4f9d86,_0x4e93b8){var _0x4de863={'raw':![],'where':{'id':_0x4f9d86[_0x8599('0x4f')]['id']}},_0x16cf5b={};_0x16cf5b['model']=_['keys'](db[_0x8599('0x4a')][_0x8599('0x38')]);_0x16cf5b[_0x8599('0x3b')]=_[_0x8599('0x3c')](_0x4f9d86[_0x8599('0x3b')]);_0x16cf5b[_0x8599('0x3d')]=_[_0x8599('0x3e')](_0x16cf5b[_0x8599('0x3f')],_0x16cf5b[_0x8599('0x3b')]);_0x4de863[_0x8599('0x40')]=_[_0x8599('0x3e')](_0x16cf5b[_0x8599('0x3f')],qs['fields'](_0x4f9d86[_0x8599('0x3b')][_0x8599('0x41')]));_0x4de863['attributes']=_0x4de863[_0x8599('0x40')][_0x8599('0x50')]?_0x4de863[_0x8599('0x40')]:_0x16cf5b['model'];if(_0x4f9d86[_0x8599('0x3b')][_0x8599('0x4c')]){_0x4de863[_0x8599('0x51')]=[{'all':!![]}];}_0x4de863=_['merge']({},_0x4de863,_0x4f9d86[_0x8599('0x49')]);return db[_0x8599('0x4a')][_0x8599('0x52')](_0x4de863)[_0x8599('0x21')](handleEntityNotFound(_0x4e93b8,null))[_0x8599('0x21')](respondWithResult(_0x4e93b8,null))['catch'](handleError(_0x4e93b8,null));};exports[_0x8599('0x53')]=function(_0x1171d8,_0x2aa943){return db[_0x8599('0x4a')][_0x8599('0x53')](_0x1171d8[_0x8599('0x54')],{})[_0x8599('0x21')](respondWithResult(_0x2aa943,0xc9))[_0x8599('0x2a')](handleError(_0x2aa943,null));};exports['update']=function(_0x55227e,_0x4d0d21){if(_0x55227e['body']['id']){delete _0x55227e[_0x8599('0x54')]['id'];}return db[_0x8599('0x4a')][_0x8599('0x52')]({'where':{'id':_0x55227e['params']['id']}})[_0x8599('0x21')](handleEntityNotFound(_0x4d0d21,null))[_0x8599('0x21')](saveUpdates(_0x55227e['body'],null))[_0x8599('0x21')](respondWithResult(_0x4d0d21,null))[_0x8599('0x2a')](handleError(_0x4d0d21,null));};exports[_0x8599('0x34')]=function(_0x264193,_0x37961b){return db[_0x8599('0x4a')]['find']({'where':{'id':_0x264193[_0x8599('0x4f')]['id']}})['then'](handleEntityNotFound(_0x37961b,null))['then'](removeEntity(_0x37961b,null))[_0x8599('0x2a')](handleError(_0x37961b,null));};exports[_0x8599('0x55')]=function(_0xa279f0,_0x3cd733,_0x110a03){var _0x2504fc={};var _0x4c23b1={};var _0x1857fb;var _0x4c9514;return db[_0x8599('0x4a')][_0x8599('0x56')]({'where':{'id':_0xa279f0['params']['id']}})[_0x8599('0x21')](handleEntityNotFound(_0x3cd733,null))[_0x8599('0x21')](function(_0x20fe7c){if(_0x20fe7c){_0x1857fb=_0x20fe7c;_0x4c23b1['model']=_['keys'](db[_0x8599('0x57')][_0x8599('0x38')]);_0x4c23b1[_0x8599('0x3b')]=_[_0x8599('0x3c')](_0xa279f0[_0x8599('0x3b')]);_0x4c23b1[_0x8599('0x3d')]=_['intersection'](_0x4c23b1[_0x8599('0x3f')],_0x4c23b1[_0x8599('0x3b')]);_0x2504fc[_0x8599('0x40')]=_[_0x8599('0x3e')](_0x4c23b1[_0x8599('0x3f')],qs[_0x8599('0x41')](_0xa279f0[_0x8599('0x3b')][_0x8599('0x41')]));_0x2504fc[_0x8599('0x40')]=_0x2504fc['attributes'][_0x8599('0x50')]?_0x2504fc[_0x8599('0x40')]:_0x4c23b1[_0x8599('0x3f')];_0x2504fc[_0x8599('0x58')]=qs[_0x8599('0x43')](_0xa279f0[_0x8599('0x3b')][_0x8599('0x43')]);_0x2504fc[_0x8599('0x44')]=qs['filters'](_['pick'](_0xa279f0['query'],_0x4c23b1[_0x8599('0x3d')]));if(_0xa279f0[_0x8599('0x3b')][_0x8599('0x46')]){_0x2504fc['where']=_[_0x8599('0x47')](_0x2504fc[_0x8599('0x44')],{'$or':_['map'](_0x2504fc[_0x8599('0x40')],function(_0x388639){var _0x495c63={};_0x495c63[_0x388639]={'$like':'%'+_0xa279f0[_0x8599('0x3b')][_0x8599('0x46')]+'%'};return _0x495c63;})});}_0x2504fc=_['merge']({},_0x2504fc,_0xa279f0['options']);return _0x1857fb[_0x8599('0x55')](_0x2504fc);}})['then'](function(_0x58e1f6){if(_0x58e1f6){_0x4c9514=_0x58e1f6[_0x8599('0x50')];if(!_0xa279f0['query']['hasOwnProperty'](_0x8599('0x42'))){_0x2504fc[_0x8599('0x30')]=qs['limit'](_0xa279f0[_0x8599('0x3b')][_0x8599('0x30')]);_0x2504fc[_0x8599('0x2f')]=qs[_0x8599('0x2f')](_0xa279f0[_0x8599('0x3b')][_0x8599('0x2f')]);}return _0x1857fb['getConfigurations'](_0x2504fc);}})['then'](function(_0x369be5){if(_0x369be5){return _0x369be5?{'count':_0x4c9514,'rows':_0x369be5}:null;}})[_0x8599('0x21')](respondWithResult(_0x3cd733,null))['catch'](handleError(_0x3cd733,null));};exports[_0x8599('0x59')]=function(_0x259808,_0x32ef5f,_0x8c83a5){if(_0x259808[_0x8599('0x54')]['id']){delete _0x259808['body']['id'];}return db['FreshdeskAccount'][_0x8599('0x56')]({'where':{'id':_0x259808['params']['id']}})['then'](handleEntityNotFound(_0x32ef5f,null))['then'](function(_0x244767){if(_0x244767){_0x259808['body']['AccountId']=_0x244767['id'];_0x259808['body'][_0x8599('0x5a')]=integrations[_0x8599('0x5b')](_0x259808[_0x8599('0x54')][_0x8599('0x5c')],_0x259808[_0x8599('0x54')]['type']);_0x259808[_0x8599('0x54')][_0x8599('0x5d')]=integrations[_0x8599('0x5e')](_0x259808['body'][_0x8599('0x5c')],_0x259808[_0x8599('0x54')]['type']);return db['FreshdeskConfiguration'][_0x8599('0x53')](_0x259808[_0x8599('0x54')],{'include':[{'model':db['FreshdeskField'],'as':'Subjects'},{'model':db[_0x8599('0x5f')],'as':_0x8599('0x5d')}]});}return null;})[_0x8599('0x21')](respondWithResult(_0x32ef5f,null))[_0x8599('0x2a')](handleError(_0x32ef5f,null));};exports[_0x8599('0x60')]=function(_0x3aa186,_0x1c0e12,_0x5aa10c){var _0x1fc6df='';return db[_0x8599('0x4a')][_0x8599('0x56')]({'where':{'id':_0x3aa186['params']['id']},'attributes':['id',_0x8599('0x61'),'apiKey']})[_0x8599('0x21')](handleEntityNotFound(_0x1c0e12,null))[_0x8599('0x21')](function(_0x1a5735){if(_0x1a5735){_0x1fc6df=_0x1a5735['remoteUri'];var _0x32a067=_0x1fc6df[_0x8599('0x62')](-0x1);if(_0x32a067==='/'){_0x1fc6df=_0x1fc6df[_0x8599('0x63')](0x0,_0x1fc6df[_0x8599('0x64')](_0x32a067));}return rp({'method':_0x8599('0x65'),'uri':util[_0x8599('0x66')](_0x8599('0x67'),_0x1fc6df,_0x8599('0x68')),'headers':{'Authorization':util[_0x8599('0x66')]('Basic\x20%s',new Buffer(util['format'](_0x8599('0x69'),_0x1a5735['apiKey']))[_0x8599('0x6a')](_0x8599('0x6b')))},'json':!![]});}})[_0x8599('0x21')](function(_0x2701c9){if(_0x2701c9){var _0x45c4b8=[_0x8599('0x6c'),_0x8599('0x6d'),'agent','description',_0x8599('0x2d'),_0x8599('0x6e'),_0x8599('0x6f'),_0x8599('0x70'),_0x8599('0x71'),_0x8599('0x6f'),_0x8599('0x72')];_[_0x8599('0x73')](_0x2701c9,function(_0x4f04d0){return _0x45c4b8[_0x8599('0x74')](_0x4f04d0[_0x8599('0x36')])||!_0x4f04d0[_0x8599('0x75')]&&_0x4f04d0[_0x8599('0x3a')]!==_0x8599('0x76')&&_0x4f04d0[_0x8599('0x3a')]!==_0x8599('0x77');});return{'count':_0x2701c9[_0x8599('0x50')],'rows':_[_0x8599('0x78')](_0x2701c9,function(_0x2424e1){return{'id':_0x2424e1['name'],'name':_0x2424e1[_0x8599('0x79')],'custom':!_0x2424e1[_0x8599('0x75')],'options':_0x2424e1[_0x8599('0x7a')]?_[_0x8599('0x78')](_0x2424e1[_0x8599('0x7a')],function(_0x580d8b){return{'name':_['capitalize'](_0x580d8b),'value':_0x580d8b};}):[]};})};}})[_0x8599('0x21')](respondWithResult(_0x1c0e12,null))[_0x8599('0x2a')](function(_0x1d925f){var _0x453270=_0x3aa186['query'][_0x8599('0x1c')]?0x1f4:_0x1d925f['statusCode']||0x1f4;logger[_0x8599('0x27')](_0x8599('0x7b'),_0x8599('0x60'),_0x453270,JSON['stringify'](_0x1d925f));delete _0x1d925f[_0x8599('0x36')];if(_0x453270===0x191){_0x453270=0x190;}_0x1c0e12[_0x8599('0x2d')](_0x453270)[_0x8599('0x37')](_0x3aa186['query'][_0x8599('0x1c')]?{'message':_0x8599('0x7c'),'statusCode':_0x1d925f[_0x8599('0x7d')]}:_0x1d925f);});};
\ No newline at end of file
diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js
index 3ec7ce9..adbb8e8 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 _0x28de=['int_freshdesk_accounts','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshdeskAccount.attributes','exports','define'];(function(_0x32e649,_0x228649){var _0x14d386=function(_0x3fb3ed){while(--_0x3fb3ed){_0x32e649['push'](_0x32e649['shift']());}};_0x14d386(++_0x228649);}(_0x28de,0x182));var _0xe28d=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x28de[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xe28d('0x0'));var util=require(_0xe28d('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xe28d('0x2'));var rp=require(_0xe28d('0x3'));var fs=require('fs');var path=require(_0xe28d('0x4'));var rimraf=require(_0xe28d('0x5'));var config=require(_0xe28d('0x6'));var attributes=require(_0xe28d('0x7'));var integrations=require('../../components/integrations/configuration');module[_0xe28d('0x8')]=function(_0xc377db,_0x2c3deb){return _0xc377db[_0xe28d('0x9')]('FreshdeskAccount',attributes,{'tableName':_0xe28d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf278=['lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshdeskAccount.attributes','../../components/integrations/configuration','exports','define','FreshdeskAccount','int_freshdesk_accounts'];(function(_0x488ca1,_0xf6858e){var _0x4dd0a4=function(_0x40fb65){while(--_0x40fb65){_0x488ca1['push'](_0x488ca1['shift']());}};_0x4dd0a4(++_0xf6858e);}(_0xf278,0x1ea));var _0x8f27=function(_0x42701f,_0x3d2f90){_0x42701f=_0x42701f-0x0;var _0x36aafb=_0xf278[_0x42701f];return _0x36aafb;};'use strict';var _=require(_0x8f27('0x0'));var util=require(_0x8f27('0x1'));var logger=require(_0x8f27('0x2'))('api');var moment=require('moment');var BPromise=require(_0x8f27('0x3'));var rp=require(_0x8f27('0x4'));var fs=require('fs');var path=require(_0x8f27('0x5'));var rimraf=require(_0x8f27('0x6'));var config=require(_0x8f27('0x7'));var attributes=require(_0x8f27('0x8'));var integrations=require(_0x8f27('0x9'));module[_0x8f27('0xa')]=function(_0x53902a,_0x17d175){return _0x53902a[_0x8f27('0xb')](_0x8f27('0xc'),attributes,{'tableName':_0x8f27('0xd'),'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 5c3bca8..37eee4f 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 _0x0939=['raw','attributes','limit','include','map','model','then','GetFreshdeskAccount','ShowFreshdeskAccount','FreshdeskAccount','where','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','FreshdeskAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','findAll','options'];(function(_0x288615,_0x4f46d0){var _0x50991d=function(_0x211f45){while(--_0x211f45){_0x288615['push'](_0x288615['shift']());}};_0x50991d(++_0x4f46d0);}(_0x0939,0x14f));var _0x9093=function(_0x4d4f3a,_0x3e3e55){_0x4d4f3a=_0x4d4f3a-0x0;var _0x3d10a1=_0x0939[_0x4d4f3a];return _0x3d10a1;};'use strict';var _=require(_0x9093('0x0'));var util=require('util');var moment=require(_0x9093('0x1'));var BPromise=require(_0x9093('0x2'));var rs=require(_0x9093('0x3'));var fs=require('fs');var Redis=require(_0x9093('0x4'));var db=require(_0x9093('0x5'))['db'];var utils=require(_0x9093('0x6'));var logger=require(_0x9093('0x7'))(_0x9093('0x8'));var config=require('../../config/environment');var jayson=require(_0x9093('0x9'));var client=jayson[_0x9093('0xa')][_0x9093('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3c54a7,_0x2863ea,_0x463c37){return new BPromise(function(_0x35ecff,_0x536bce){return client[_0x9093('0xc')](_0x3c54a7,_0x463c37)['then'](function(_0x34e8b9){logger[_0x9093('0xd')](_0x9093('0xe'),_0x2863ea,'request\x20sent');logger[_0x9093('0xf')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x2863ea,_0x9093('0x10'),JSON[_0x9093('0x11')](_0x34e8b9));if(_0x34e8b9[_0x9093('0x12')]){if(_0x34e8b9[_0x9093('0x12')][_0x9093('0x13')]===0x1f4){logger[_0x9093('0x12')](_0x9093('0xe'),_0x2863ea,_0x34e8b9[_0x9093('0x12')][_0x9093('0x14')]);return _0x536bce(_0x34e8b9['error'][_0x9093('0x14')]);}logger['error'](_0x9093('0xe'),_0x2863ea,_0x34e8b9[_0x9093('0x12')][_0x9093('0x14')]);return _0x35ecff(_0x34e8b9[_0x9093('0x12')][_0x9093('0x14')]);}else{logger[_0x9093('0xd')](_0x9093('0xe'),_0x2863ea,_0x9093('0x10'));_0x35ecff(_0x34e8b9[_0x9093('0x15')][_0x9093('0x14')]);}})[_0x9093('0x16')](function(_0x4ceb37){logger[_0x9093('0x12')](_0x9093('0xe'),_0x2863ea,_0x4ceb37);_0x536bce(_0x4ceb37);});});}exports['GetFreshdeskAccount']=function(_0x412e86){var _0x53a7eb=this;return new Promise(function(_0x5d2fb7,_0x4b8e23){return db['FreshdeskAccount'][_0x9093('0x17')]({'raw':_0x412e86['options']?_0x412e86[_0x9093('0x18')][_0x9093('0x19')]===undefined?!![]:![]:!![],'where':_0x412e86['options']?_0x412e86[_0x9093('0x18')]['where']||null:null,'attributes':_0x412e86[_0x9093('0x18')]?_0x412e86[_0x9093('0x18')][_0x9093('0x1a')]||null:null,'limit':_0x412e86[_0x9093('0x18')]?_0x412e86[_0x9093('0x18')][_0x9093('0x1b')]||null:null,'include':_0x412e86['options']?_0x412e86[_0x9093('0x18')][_0x9093('0x1c')]?_[_0x9093('0x1d')](_0x412e86[_0x9093('0x18')][_0x9093('0x1c')],function(_0x3c50cf){return{'model':db[_0x3c50cf[_0x9093('0x1e')]],'as':_0x3c50cf['as'],'attributes':_0x3c50cf['attributes'],'include':_0x3c50cf['include']?_[_0x9093('0x1d')](_0x3c50cf['include'],function(_0x500a28){return{'model':db[_0x500a28[_0x9093('0x1e')]],'as':_0x500a28['as'],'attributes':_0x500a28['attributes'],'include':_0x500a28[_0x9093('0x1c')]?_[_0x9093('0x1d')](_0x500a28[_0x9093('0x1c')],function(_0x16ed03){return{'model':db[_0x16ed03[_0x9093('0x1e')]],'as':_0x16ed03['as'],'attributes':_0x16ed03['attributes']};}):[]};}):[]};}):[]:[]})[_0x9093('0x1f')](function(_0x312071){logger[_0x9093('0xd')](_0x9093('0x20'),_0x412e86);logger[_0x9093('0xf')]('GetFreshdeskAccount',_0x412e86,JSON[_0x9093('0x11')](_0x312071));_0x5d2fb7(_0x312071);})['catch'](function(_0x41e907){logger[_0x9093('0x12')](_0x9093('0x20'),_0x41e907[_0x9093('0x14')],_0x412e86);_0x4b8e23(_0x53a7eb[_0x9093('0x12')](0x1f4,_0x41e907[_0x9093('0x14')]));});});};exports[_0x9093('0x21')]=function(_0x24632d){var _0x2a76b7=this;return new Promise(function(_0x9907a5,_0xac4ab4){return db[_0x9093('0x22')]['find']({'raw':_0x24632d['options']?_0x24632d['options'][_0x9093('0x19')]===undefined?!![]:![]:!![],'where':_0x24632d['options']?_0x24632d[_0x9093('0x18')][_0x9093('0x23')]||null:null,'attributes':_0x24632d[_0x9093('0x18')]?_0x24632d['options'][_0x9093('0x1a')]||null:null,'include':_0x24632d['options']?_0x24632d[_0x9093('0x18')]['include']?_[_0x9093('0x1d')](_0x24632d[_0x9093('0x18')][_0x9093('0x1c')],function(_0x28a5bc){return{'model':db[_0x28a5bc['model']],'as':_0x28a5bc['as'],'attributes':_0x28a5bc[_0x9093('0x1a')],'include':_0x28a5bc[_0x9093('0x1c')]?_[_0x9093('0x1d')](_0x28a5bc['include'],function(_0x975338){return{'model':db[_0x975338[_0x9093('0x1e')]],'as':_0x975338['as'],'attributes':_0x975338['attributes'],'include':_0x975338[_0x9093('0x1c')]?_[_0x9093('0x1d')](_0x975338[_0x9093('0x1c')],function(_0x51cbec){return{'model':db[_0x51cbec[_0x9093('0x1e')]],'as':_0x51cbec['as'],'attributes':_0x51cbec[_0x9093('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x9093('0x1f')](function(_0xa5f21e){logger['info']('ShowFreshdeskAccount',_0x24632d);logger[_0x9093('0xf')](_0x9093('0x21'),_0x24632d,JSON[_0x9093('0x11')](_0xa5f21e));_0x9907a5(_0xa5f21e);})[_0x9093('0x16')](function(_0x56b07b){logger[_0x9093('0x12')](_0x9093('0x21'),_0x56b07b[_0x9093('0x14')],_0x24632d);_0xac4ab4(_0x2a76b7[_0x9093('0x12')](0x1f4,_0x56b07b[_0x9093('0x14')]));});});};
\ No newline at end of file
+var _0xca4b=['find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','findAll','options','raw','where','attributes','limit','include','map','model','then','GetFreshdeskAccount','ShowFreshdeskAccount','FreshdeskAccount'];(function(_0x4cce8,_0x22d1fe){var _0x458440=function(_0x3d15e4){while(--_0x3d15e4){_0x4cce8['push'](_0x4cce8['shift']());}};_0x458440(++_0x22d1fe);}(_0xca4b,0x1eb));var _0xbca4=function(_0x529a51,_0x408d27){_0x529a51=_0x529a51-0x0;var _0x29b763=_0xca4b[_0x529a51];return _0x29b763;};'use strict';var _=require(_0xbca4('0x0'));var util=require(_0xbca4('0x1'));var moment=require(_0xbca4('0x2'));var BPromise=require(_0xbca4('0x3'));var rs=require(_0xbca4('0x4'));var fs=require('fs');var Redis=require(_0xbca4('0x5'));var db=require(_0xbca4('0x6'))['db'];var utils=require(_0xbca4('0x7'));var logger=require(_0xbca4('0x8'))(_0xbca4('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xbca4('0xa')][_0xbca4('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2e4bbe,_0x62292d,_0x56dd4f){return new BPromise(function(_0x3a2cd0,_0x3ba840){return client['request'](_0x2e4bbe,_0x56dd4f)['then'](function(_0x3922d7){logger[_0xbca4('0xc')](_0xbca4('0xd'),_0x62292d,_0xbca4('0xe'));logger[_0xbca4('0xf')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x62292d,_0xbca4('0xe'),JSON[_0xbca4('0x10')](_0x3922d7));if(_0x3922d7[_0xbca4('0x11')]){if(_0x3922d7[_0xbca4('0x11')][_0xbca4('0x12')]===0x1f4){logger[_0xbca4('0x11')](_0xbca4('0xd'),_0x62292d,_0x3922d7[_0xbca4('0x11')][_0xbca4('0x13')]);return _0x3ba840(_0x3922d7['error'][_0xbca4('0x13')]);}logger[_0xbca4('0x11')]('FreshdeskAccount,\x20%s,\x20%s',_0x62292d,_0x3922d7[_0xbca4('0x11')][_0xbca4('0x13')]);return _0x3a2cd0(_0x3922d7[_0xbca4('0x11')][_0xbca4('0x13')]);}else{logger[_0xbca4('0xc')](_0xbca4('0xd'),_0x62292d,_0xbca4('0xe'));_0x3a2cd0(_0x3922d7['result'][_0xbca4('0x13')]);}})[_0xbca4('0x14')](function(_0x40704c){logger[_0xbca4('0x11')]('FreshdeskAccount,\x20%s,\x20%s',_0x62292d,_0x40704c);_0x3ba840(_0x40704c);});});}exports['GetFreshdeskAccount']=function(_0x4dc9aa){var _0x1b1e27=this;return new Promise(function(_0x3033da,_0x40f02a){return db['FreshdeskAccount'][_0xbca4('0x15')]({'raw':_0x4dc9aa['options']?_0x4dc9aa[_0xbca4('0x16')][_0xbca4('0x17')]===undefined?!![]:![]:!![],'where':_0x4dc9aa[_0xbca4('0x16')]?_0x4dc9aa['options'][_0xbca4('0x18')]||null:null,'attributes':_0x4dc9aa['options']?_0x4dc9aa[_0xbca4('0x16')][_0xbca4('0x19')]||null:null,'limit':_0x4dc9aa[_0xbca4('0x16')]?_0x4dc9aa[_0xbca4('0x16')][_0xbca4('0x1a')]||null:null,'include':_0x4dc9aa['options']?_0x4dc9aa['options'][_0xbca4('0x1b')]?_[_0xbca4('0x1c')](_0x4dc9aa['options'][_0xbca4('0x1b')],function(_0xa9be84){return{'model':db[_0xa9be84[_0xbca4('0x1d')]],'as':_0xa9be84['as'],'attributes':_0xa9be84[_0xbca4('0x19')],'include':_0xa9be84['include']?_[_0xbca4('0x1c')](_0xa9be84['include'],function(_0x3a1b8a){return{'model':db[_0x3a1b8a[_0xbca4('0x1d')]],'as':_0x3a1b8a['as'],'attributes':_0x3a1b8a[_0xbca4('0x19')],'include':_0x3a1b8a[_0xbca4('0x1b')]?_[_0xbca4('0x1c')](_0x3a1b8a[_0xbca4('0x1b')],function(_0x405a96){return{'model':db[_0x405a96[_0xbca4('0x1d')]],'as':_0x405a96['as'],'attributes':_0x405a96[_0xbca4('0x19')]};}):[]};}):[]};}):[]:[]})[_0xbca4('0x1e')](function(_0x5bd4d7){logger['info'](_0xbca4('0x1f'),_0x4dc9aa);logger[_0xbca4('0xf')]('GetFreshdeskAccount',_0x4dc9aa,JSON[_0xbca4('0x10')](_0x5bd4d7));_0x3033da(_0x5bd4d7);})[_0xbca4('0x14')](function(_0x5611f7){logger[_0xbca4('0x11')](_0xbca4('0x1f'),_0x5611f7[_0xbca4('0x13')],_0x4dc9aa);_0x40f02a(_0x1b1e27[_0xbca4('0x11')](0x1f4,_0x5611f7[_0xbca4('0x13')]));});});};exports[_0xbca4('0x20')]=function(_0x24a874){var _0x2f6c0d=this;return new Promise(function(_0x179589,_0xbcc412){return db[_0xbca4('0x21')][_0xbca4('0x22')]({'raw':_0x24a874[_0xbca4('0x16')]?_0x24a874[_0xbca4('0x16')][_0xbca4('0x17')]===undefined?!![]:![]:!![],'where':_0x24a874[_0xbca4('0x16')]?_0x24a874[_0xbca4('0x16')][_0xbca4('0x18')]||null:null,'attributes':_0x24a874[_0xbca4('0x16')]?_0x24a874['options'][_0xbca4('0x19')]||null:null,'include':_0x24a874['options']?_0x24a874[_0xbca4('0x16')][_0xbca4('0x1b')]?_[_0xbca4('0x1c')](_0x24a874['options'][_0xbca4('0x1b')],function(_0x5e79ab){return{'model':db[_0x5e79ab[_0xbca4('0x1d')]],'as':_0x5e79ab['as'],'attributes':_0x5e79ab[_0xbca4('0x19')],'include':_0x5e79ab[_0xbca4('0x1b')]?_['map'](_0x5e79ab[_0xbca4('0x1b')],function(_0x377c53){return{'model':db[_0x377c53['model']],'as':_0x377c53['as'],'attributes':_0x377c53[_0xbca4('0x19')],'include':_0x377c53['include']?_['map'](_0x377c53[_0xbca4('0x1b')],function(_0x85e6d8){return{'model':db[_0x85e6d8[_0xbca4('0x1d')]],'as':_0x85e6d8['as'],'attributes':_0x85e6d8[_0xbca4('0x19')]};}):[]};}):[]};}):[]:[]})[_0xbca4('0x1e')](function(_0x47cda8){logger[_0xbca4('0xc')](_0xbca4('0x20'),_0x24a874);logger[_0xbca4('0xf')](_0xbca4('0x20'),_0x24a874,JSON['stringify'](_0x47cda8));_0x179589(_0x47cda8);})[_0xbca4('0x14')](function(_0x3661ce){logger[_0xbca4('0x11')](_0xbca4('0x20'),_0x3661ce[_0xbca4('0x13')],_0x24a874);_0xbcc412(_0x2f6c0d[_0xbca4('0x11')](0x1f4,_0x3661ce['message']));});});};
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/index.js b/server/api/intFreshdeskConfiguration/index.js
index b95ff6f..79a2477 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 _0x64f2=['getDescriptions','/:id/tags','getTags','create','post','setTags','put','update','delete','destroy','multer','util','Router','../../components/auth/service','../../config/environment','./intFreshdeskConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions'];(function(_0x5805d7,_0x3d584a){var _0x170fe4=function(_0x3b9b73){while(--_0x3b9b73){_0x5805d7['push'](_0x5805d7['shift']());}};_0x170fe4(++_0x3d584a);}(_0x64f2,0x176));var _0x264f=function(_0x8f7b71,_0x26ea2e){_0x8f7b71=_0x8f7b71-0x0;var _0x41c3cf=_0x64f2[_0x8f7b71];return _0x41c3cf;};'use strict';var multer=require(_0x264f('0x0'));var util=require(_0x264f('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x264f('0x2')]();var auth=require(_0x264f('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x264f('0x4'));var controller=require(_0x264f('0x5'));router[_0x264f('0x6')]('/',auth[_0x264f('0x7')](),controller[_0x264f('0x8')]);router[_0x264f('0x6')](_0x264f('0x9'),auth['isAuthenticated'](),controller[_0x264f('0xa')]);router[_0x264f('0x6')](_0x264f('0xb'),auth['isAuthenticated'](),controller[_0x264f('0xc')]);router['get'](_0x264f('0xd'),auth[_0x264f('0x7')](),controller[_0x264f('0xe')]);router[_0x264f('0x6')](_0x264f('0xf'),auth[_0x264f('0x7')](),controller[_0x264f('0x10')]);router[_0x264f('0x6')](_0x264f('0x11'),auth[_0x264f('0x7')](),controller[_0x264f('0x12')]);router['post']('/',auth[_0x264f('0x7')](),controller[_0x264f('0x13')]);router[_0x264f('0x14')](_0x264f('0x11'),auth[_0x264f('0x7')](),controller[_0x264f('0x15')]);router[_0x264f('0x16')](_0x264f('0x9'),auth[_0x264f('0x7')](),controller[_0x264f('0x17')]);router[_0x264f('0x18')]('/:id',auth[_0x264f('0x7')](),controller[_0x264f('0x19')]);module['exports']=router;
\ No newline at end of file
+var _0xba71=['getFields','/:id/subjects','/:id/descriptions','getDescriptions','/:id/tags','create','post','put','/:id','update','delete','destroy','multer','util','path','connect-timeout','Router','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id/fields'];(function(_0x5d5f03,_0x4d8cfc){var _0x4e1cb8=function(_0x1f84a){while(--_0x1f84a){_0x5d5f03['push'](_0x5d5f03['shift']());}};_0x4e1cb8(++_0x4d8cfc);}(_0xba71,0x120));var _0x1ba7=function(_0x38e191,_0x8d5355){_0x38e191=_0x38e191-0x0;var _0x4af767=_0xba71[_0x38e191];return _0x4af767;};'use strict';var multer=require(_0x1ba7('0x0'));var util=require(_0x1ba7('0x1'));var path=require(_0x1ba7('0x2'));var timeout=require(_0x1ba7('0x3'));var express=require('express');var router=express[_0x1ba7('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x1ba7('0x5'));var config=require(_0x1ba7('0x6'));var controller=require('./intFreshdeskConfiguration.controller');router[_0x1ba7('0x7')]('/',auth[_0x1ba7('0x8')](),controller[_0x1ba7('0x9')]);router[_0x1ba7('0x7')]('/:id',auth[_0x1ba7('0x8')](),controller['show']);router[_0x1ba7('0x7')](_0x1ba7('0xa'),auth['isAuthenticated'](),controller[_0x1ba7('0xb')]);router[_0x1ba7('0x7')](_0x1ba7('0xc'),auth[_0x1ba7('0x8')](),controller['getSubjects']);router[_0x1ba7('0x7')](_0x1ba7('0xd'),auth[_0x1ba7('0x8')](),controller[_0x1ba7('0xe')]);router['get'](_0x1ba7('0xf'),auth['isAuthenticated'](),controller['getTags']);router['post']('/',auth[_0x1ba7('0x8')](),controller[_0x1ba7('0x10')]);router[_0x1ba7('0x11')](_0x1ba7('0xf'),auth['isAuthenticated'](),controller['setTags']);router[_0x1ba7('0x12')](_0x1ba7('0x13'),auth['isAuthenticated'](),controller[_0x1ba7('0x14')]);router[_0x1ba7('0x15')]('/:id',auth[_0x1ba7('0x8')](),controller[_0x1ba7('0x16')]);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 d035f24..b708d8e 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 _0xa40d=['STRING','sequelize','exports'];(function(_0x1aa33a,_0x543923){var _0x5ca537=function(_0x1a29b3){while(--_0x1a29b3){_0x1aa33a['push'](_0x1aa33a['shift']());}};_0x5ca537(++_0x543923);}(_0xa40d,0x187));var _0xda40=function(_0x4a010b,_0x3523b3){_0x4a010b=_0x4a010b-0x0;var _0xe0b19b=_0xa40d[_0x4a010b];return _0xe0b19b;};'use strict';var Sequelize=require(_0xda40('0x0'));module[_0xda40('0x1')]={'name':{'type':Sequelize[_0xda40('0x2')]},'description':{'type':Sequelize[_0xda40('0x2')]}};
\ No newline at end of file
+var _0x38ea=['exports','STRING','sequelize'];(function(_0x34ac4b,_0xac857e){var _0x57c0db=function(_0x199bd6){while(--_0x199bd6){_0x34ac4b['push'](_0x34ac4b['shift']());}};_0x57c0db(++_0xac857e);}(_0x38ea,0xd7));var _0xa38e=function(_0x3a39c4,_0x3d8c81){_0x3a39c4=_0x3a39c4-0x0;var _0x1392f6=_0x38ea[_0x3a39c4];return _0x1392f6;};'use strict';var Sequelize=require(_0xa38e('0x0'));module[_0xa38e('0x1')]={'name':{'type':Sequelize[_0xa38e('0x2')]},'description':{'type':Sequelize[_0xa38e('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js
index 9ef3159..4d52755 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 _0xc593=['../../config/environment','../../mysqldb','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','sendStatus','status','end','json','count','offset','set','apply','reject','save','update','stack','name','send','map','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','FreshdeskConfiguration','includeAll','include','findAll','rows','show','params','create','body','find','destroy','getFields','findOne','FreshdeskField','getDescriptions','getTags','Tag','setTags','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','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils'];(function(_0x296809,_0x1c9665){var _0x18c0d3=function(_0x249156){while(--_0x249156){_0x296809['push'](_0x296809['shift']());}};_0x18c0d3(++_0x1c9665);}(_0xc593,0xb1));var _0x3c59=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0xc593[_0x3bf83f];return _0x22c4a9;};'use strict';var pdf=require(_0x3c59('0x0'));var emlformat=require(_0x3c59('0x1'));var rimraf=require(_0x3c59('0x2'));var zipdir=require(_0x3c59('0x3'));var jsonpatch=require(_0x3c59('0x4'));var rp=require('request-promise');var moment=require(_0x3c59('0x5'));var BPromise=require(_0x3c59('0x6'));var Mustache=require(_0x3c59('0x7'));var util=require(_0x3c59('0x8'));var path=require('path');var sox=require(_0x3c59('0x9'));var csv=require(_0x3c59('0xa'));var ejs=require(_0x3c59('0xb'));var fs=require('fs');var _=require(_0x3c59('0xc'));var squel=require(_0x3c59('0xd'));var crypto=require(_0x3c59('0xe'));var jsforce=require(_0x3c59('0xf'));var deskjs=require(_0x3c59('0x10'));var toCsv=require('to-csv');var querystring=require(_0x3c59('0x11'));var Papa=require('papaparse');var Redis=require(_0x3c59('0x12'));var authService=require(_0x3c59('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x3c59('0x14'));var hardwareService=require(_0x3c59('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0x3c59('0x16'));var config=require(_0x3c59('0x17'));var db=require(_0x3c59('0x18'))['db'];var jayson=require(_0x3c59('0x19'));var client=jayson[_0x3c59('0x1a')][_0x3c59('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x322104,_0x3ec286,_0x1ecd7e){if(_0x1ecd7e){var _0x32536f=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x32536f[_0x3c59('0x1c')](_0x3ec286)){return _0x322104;}else{throw new db[(_0x3c59('0x1d'))][(_0x3c59('0x1e'))](_0x3c59('0x1f'));}}else{return _0x322104;}}function respondWithRpcPromise(_0x3be19c,_0x4c3f82,_0x5f0994,_0x28cf07){return new BPromise(function(_0x4df0f7,_0x550b25){var _0x1bdc5e=_0x28cf07||client;return _0x1bdc5e[_0x3c59('0x20')](_0x3be19c,_0x5f0994)[_0x3c59('0x21')](function(_0x300aa5){logger['info'](_0x3c59('0x22'),_0x4c3f82,_0x3c59('0x23'));logger[_0x3c59('0x24')](_0x3c59('0x25'),_0x4c3f82,_0x3c59('0x23'),JSON[_0x3c59('0x26')](_0x300aa5));if(_0x300aa5['error']){if(_0x300aa5[_0x3c59('0x27')][_0x3c59('0x28')]===0x1f4){logger[_0x3c59('0x27')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x4c3f82,_0x300aa5[_0x3c59('0x27')]['message']);return _0x550b25(_0x300aa5[_0x3c59('0x27')][_0x3c59('0x29')]);}logger[_0x3c59('0x27')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x4c3f82,_0x300aa5['error'][_0x3c59('0x29')]);return _0x4df0f7(_0x300aa5[_0x3c59('0x27')][_0x3c59('0x29')]);}else{logger[_0x3c59('0x2a')](_0x3c59('0x22'),_0x4c3f82,'request\x20sent');_0x4df0f7(_0x300aa5[_0x3c59('0x2b')]['message']);}})[_0x3c59('0x2c')](function(_0xea8ab8){logger['error']('FreshdeskConfiguration,\x20%s,\x20%s',_0x4c3f82,_0xea8ab8);_0x550b25(_0xea8ab8);});});}function respondWithStatusCode(_0x109759,_0x1fe18f){_0x1fe18f=_0x1fe18f||0xcc;return function(_0x5eeb7a){if(_0x5eeb7a){return _0x109759[_0x3c59('0x2d')](_0x1fe18f);}return _0x109759[_0x3c59('0x2e')](_0x1fe18f)[_0x3c59('0x2f')]();};}function respondWithResult(_0x34eb21,_0x79c3ea){_0x79c3ea=_0x79c3ea||0xc8;return function(_0x193ec8){if(_0x193ec8){return _0x34eb21['status'](_0x79c3ea)[_0x3c59('0x30')](_0x193ec8);}};}function respondWithFilteredResult(_0x1a3887,_0x30698e){return function(_0x2e5571){if(_0x2e5571){var _0x5661fb=_0x2e5571[_0x3c59('0x31')],_0x2cac2b=_0x30698e[_0x3c59('0x32')],_0x3d4fd5=_0x30698e[_0x3c59('0x32')]+_0x30698e['limit'],_0x3abcbd;if(_0x3d4fd5>=_0x5661fb){_0x3d4fd5=_0x5661fb;_0x3abcbd=0xc8;}else{_0x3abcbd=0xce;}_0x1a3887['status'](_0x3abcbd);return _0x1a3887[_0x3c59('0x33')]('Content-Range',_0x2cac2b+'-'+_0x3d4fd5+'/'+_0x5661fb)['json'](_0x2e5571);}return null;};}function patchUpdates(_0x131b88){return function(_0x4fa7bd){try{jsonpatch[_0x3c59('0x34')](_0x4fa7bd,_0x131b88,!![]);}catch(_0x5c604c){return BPromise[_0x3c59('0x35')](_0x5c604c);}return _0x4fa7bd[_0x3c59('0x36')]();};}function saveUpdates(_0x4ac911,_0x19e6a7){return function(_0xc4dc4c){if(_0xc4dc4c){return _0xc4dc4c[_0x3c59('0x37')](_0x4ac911)[_0x3c59('0x21')](function(_0x17cb37){return _0x17cb37;});}return null;};}function removeEntity(_0x3dd47d,_0x1eaebc){return function(_0x74a5c0){if(_0x74a5c0){return _0x74a5c0['destroy']()[_0x3c59('0x21')](function(){_0x3dd47d[_0x3c59('0x2e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x229cf0,_0x1069bb){return function(_0x1b4d60){if(!_0x1b4d60){_0x229cf0['sendStatus'](0x194);}return _0x1b4d60;};}function handleError(_0x320033,_0x424959){_0x424959=_0x424959||0x1f4;return function(_0x54d22f){logger[_0x3c59('0x27')](_0x54d22f[_0x3c59('0x38')]);if(_0x54d22f[_0x3c59('0x39')]){delete _0x54d22f[_0x3c59('0x39')];}_0x320033[_0x3c59('0x2e')](_0x424959)[_0x3c59('0x3a')](_0x54d22f);};}exports['index']=function(_0x2fb02b,_0x404079){var _0xce0607={},_0x4549cc={},_0x2cf4e3={'count':0x0,'rows':[]};var _0x77c86f=_[_0x3c59('0x3b')](db['FreshdeskConfiguration'][_0x3c59('0x3c')],function(_0x1801b3){return{'name':_0x1801b3[_0x3c59('0x3d')],'type':_0x1801b3['type'][_0x3c59('0x3e')]};});_0x4549cc[_0x3c59('0x3f')]=_[_0x3c59('0x3b')](_0x77c86f,_0x3c59('0x39'));_0x4549cc['query']=_[_0x3c59('0x40')](_0x2fb02b[_0x3c59('0x41')]);_0x4549cc[_0x3c59('0x42')]=_[_0x3c59('0x43')](_0x4549cc['model'],_0x4549cc['query']);_0xce0607[_0x3c59('0x44')]=_[_0x3c59('0x43')](_0x4549cc['model'],qs[_0x3c59('0x45')](_0x2fb02b[_0x3c59('0x41')][_0x3c59('0x45')]));_0xce0607[_0x3c59('0x44')]=_0xce0607[_0x3c59('0x44')][_0x3c59('0x46')]?_0xce0607['attributes']:_0x4549cc[_0x3c59('0x3f')];if(!_0x2fb02b['query'][_0x3c59('0x47')](_0x3c59('0x48'))){_0xce0607[_0x3c59('0x49')]=qs['limit'](_0x2fb02b[_0x3c59('0x41')][_0x3c59('0x49')]);_0xce0607['offset']=qs[_0x3c59('0x32')](_0x2fb02b['query'][_0x3c59('0x32')]);}_0xce0607[_0x3c59('0x4a')]=qs[_0x3c59('0x4b')](_0x2fb02b[_0x3c59('0x41')][_0x3c59('0x4b')]);_0xce0607[_0x3c59('0x4c')]=qs[_0x3c59('0x42')](_[_0x3c59('0x4d')](_0x2fb02b[_0x3c59('0x41')],_0x4549cc[_0x3c59('0x42')]));if(_0x2fb02b['query'][_0x3c59('0x4e')]){_0xce0607['where']=_[_0x3c59('0x4f')](_0xce0607[_0x3c59('0x4c')],{'$or':_[_0x3c59('0x3b')](_0x77c86f,function(_0x121fac){if(_0x121fac['type']!==_0x3c59('0x50')){var _0x18b49c={};_0x18b49c[_0x121fac[_0x3c59('0x39')]]={'$like':'%'+_0x2fb02b[_0x3c59('0x41')][_0x3c59('0x4e')]+'%'};return _0x18b49c;}})});}_0xce0607=_[_0x3c59('0x4f')]({},_0xce0607,_0x2fb02b[_0x3c59('0x51')]);var _0x462cfd={'where':_0xce0607['where']};return db[_0x3c59('0x52')][_0x3c59('0x31')](_0x462cfd)['then'](function(_0xfe68cd){_0x2cf4e3['count']=_0xfe68cd;if(_0x2fb02b[_0x3c59('0x41')][_0x3c59('0x53')]){_0xce0607[_0x3c59('0x54')]=[{'all':!![]}];}return db[_0x3c59('0x52')][_0x3c59('0x55')](_0xce0607);})[_0x3c59('0x21')](function(_0xd700c8){_0x2cf4e3[_0x3c59('0x56')]=_0xd700c8;return _0x2cf4e3;})[_0x3c59('0x21')](respondWithFilteredResult(_0x404079,_0xce0607))[_0x3c59('0x2c')](handleError(_0x404079,null));};exports[_0x3c59('0x57')]=function(_0x223094,_0x1dea8a){var _0x3afc67={'raw':![],'where':{'id':_0x223094[_0x3c59('0x58')]['id']}},_0x26c94e={};_0x26c94e['model']=_[_0x3c59('0x40')](db[_0x3c59('0x52')][_0x3c59('0x3c')]);_0x26c94e[_0x3c59('0x41')]=_[_0x3c59('0x40')](_0x223094[_0x3c59('0x41')]);_0x26c94e[_0x3c59('0x42')]=_[_0x3c59('0x43')](_0x26c94e[_0x3c59('0x3f')],_0x26c94e[_0x3c59('0x41')]);_0x3afc67['attributes']=_[_0x3c59('0x43')](_0x26c94e[_0x3c59('0x3f')],qs[_0x3c59('0x45')](_0x223094[_0x3c59('0x41')]['fields']));_0x3afc67[_0x3c59('0x44')]=_0x3afc67[_0x3c59('0x44')][_0x3c59('0x46')]?_0x3afc67[_0x3c59('0x44')]:_0x26c94e[_0x3c59('0x3f')];if(_0x223094[_0x3c59('0x41')][_0x3c59('0x53')]){_0x3afc67[_0x3c59('0x54')]=[{'all':!![]}];}_0x3afc67=_[_0x3c59('0x4f')]({},_0x3afc67,_0x223094[_0x3c59('0x51')]);return db[_0x3c59('0x52')]['find'](_0x3afc67)[_0x3c59('0x21')](handleEntityNotFound(_0x1dea8a,null))[_0x3c59('0x21')](respondWithResult(_0x1dea8a,null))[_0x3c59('0x2c')](handleError(_0x1dea8a,null));};exports[_0x3c59('0x59')]=function(_0x561386,_0x36de7f){return db[_0x3c59('0x52')][_0x3c59('0x59')](_0x561386[_0x3c59('0x5a')],{})[_0x3c59('0x21')](respondWithResult(_0x36de7f,0xc9))[_0x3c59('0x2c')](handleError(_0x36de7f,null));};exports['update']=function(_0x5dc20c,_0x9b638a){if(_0x5dc20c[_0x3c59('0x5a')]['id']){delete _0x5dc20c[_0x3c59('0x5a')]['id'];}return db[_0x3c59('0x52')][_0x3c59('0x5b')]({'where':{'id':_0x5dc20c['params']['id']}})[_0x3c59('0x21')](handleEntityNotFound(_0x9b638a,null))['then'](saveUpdates(_0x5dc20c[_0x3c59('0x5a')],null))['then'](respondWithResult(_0x9b638a,null))['catch'](handleError(_0x9b638a,null));};exports[_0x3c59('0x5c')]=function(_0x375250,_0x58b7df){return db['FreshdeskConfiguration'][_0x3c59('0x5b')]({'where':{'id':_0x375250[_0x3c59('0x58')]['id']}})[_0x3c59('0x21')](handleEntityNotFound(_0x58b7df,null))[_0x3c59('0x21')](removeEntity(_0x58b7df,null))[_0x3c59('0x2c')](handleError(_0x58b7df,null));};exports[_0x3c59('0x5d')]=function(_0x5a206e,_0x1e3bed,_0x550d2c){var _0x102796={};var _0x5aa220={};var _0x11896e;var _0x2b1fb9;return db[_0x3c59('0x52')][_0x3c59('0x5e')]({'where':{'id':_0x5a206e[_0x3c59('0x58')]['id']}})['then'](handleEntityNotFound(_0x1e3bed,null))[_0x3c59('0x21')](function(_0x10d2a9){if(_0x10d2a9){_0x11896e=_0x10d2a9;_0x5aa220[_0x3c59('0x3f')]=_[_0x3c59('0x40')](db['FreshdeskField'][_0x3c59('0x3c')]);_0x5aa220['query']=_[_0x3c59('0x40')](_0x5a206e[_0x3c59('0x41')]);_0x5aa220[_0x3c59('0x42')]=_['intersection'](_0x5aa220[_0x3c59('0x3f')],_0x5aa220[_0x3c59('0x41')]);_0x102796['attributes']=_[_0x3c59('0x43')](_0x5aa220[_0x3c59('0x3f')],qs['fields'](_0x5a206e[_0x3c59('0x41')][_0x3c59('0x45')]));_0x102796[_0x3c59('0x44')]=_0x102796[_0x3c59('0x44')]['length']?_0x102796[_0x3c59('0x44')]:_0x5aa220[_0x3c59('0x3f')];_0x102796[_0x3c59('0x4a')]=qs['sort'](_0x5a206e['query'][_0x3c59('0x4b')]);_0x102796[_0x3c59('0x4c')]=qs[_0x3c59('0x42')](_[_0x3c59('0x4d')](_0x5a206e['query'],_0x5aa220[_0x3c59('0x42')]));if(_0x5a206e[_0x3c59('0x41')][_0x3c59('0x4e')]){_0x102796['where']=_[_0x3c59('0x4f')](_0x102796[_0x3c59('0x4c')],{'$or':_[_0x3c59('0x3b')](_0x102796['attributes'],function(_0x218832){var _0x19d107={};_0x19d107[_0x218832]={'$like':'%'+_0x5a206e['query'][_0x3c59('0x4e')]+'%'};return _0x19d107;})});}_0x102796=_[_0x3c59('0x4f')]({},_0x102796,_0x5a206e[_0x3c59('0x51')]);return _0x11896e[_0x3c59('0x5d')](_0x102796);}})[_0x3c59('0x21')](function(_0x4bdedd){if(_0x4bdedd){_0x2b1fb9=_0x4bdedd[_0x3c59('0x46')];if(!_0x5a206e['query']['hasOwnProperty']('nolimit')){_0x102796['limit']=qs[_0x3c59('0x49')](_0x5a206e['query'][_0x3c59('0x49')]);_0x102796[_0x3c59('0x32')]=qs[_0x3c59('0x32')](_0x5a206e[_0x3c59('0x41')][_0x3c59('0x32')]);}return _0x11896e[_0x3c59('0x5d')](_0x102796);}})[_0x3c59('0x21')](function(_0x2d5c50){if(_0x2d5c50){return _0x2d5c50?{'count':_0x2b1fb9,'rows':_0x2d5c50}:null;}})[_0x3c59('0x21')](respondWithResult(_0x1e3bed,null))['catch'](handleError(_0x1e3bed,null));};exports['getSubjects']=function(_0x39ac93,_0x17c302,_0x35defd){var _0x6c0f90={};var _0x427360={};var _0x51ee5b;var _0x1cef8f;return db[_0x3c59('0x52')][_0x3c59('0x5e')]({'where':{'id':_0x39ac93[_0x3c59('0x58')]['id']}})[_0x3c59('0x21')](handleEntityNotFound(_0x17c302,null))[_0x3c59('0x21')](function(_0x3762da){if(_0x3762da){_0x51ee5b=_0x3762da;_0x427360['model']=_['keys'](db[_0x3c59('0x5f')][_0x3c59('0x3c')]);_0x427360[_0x3c59('0x41')]=_[_0x3c59('0x40')](_0x39ac93['query']);_0x427360[_0x3c59('0x42')]=_[_0x3c59('0x43')](_0x427360['model'],_0x427360[_0x3c59('0x41')]);_0x6c0f90[_0x3c59('0x44')]=_[_0x3c59('0x43')](_0x427360['model'],qs[_0x3c59('0x45')](_0x39ac93[_0x3c59('0x41')][_0x3c59('0x45')]));_0x6c0f90[_0x3c59('0x44')]=_0x6c0f90[_0x3c59('0x44')][_0x3c59('0x46')]?_0x6c0f90[_0x3c59('0x44')]:_0x427360[_0x3c59('0x3f')];_0x6c0f90[_0x3c59('0x4a')]=qs[_0x3c59('0x4b')](_0x39ac93[_0x3c59('0x41')][_0x3c59('0x4b')]);_0x6c0f90[_0x3c59('0x4c')]=qs[_0x3c59('0x42')](_['pick'](_0x39ac93[_0x3c59('0x41')],_0x427360[_0x3c59('0x42')]));if(_0x39ac93[_0x3c59('0x41')][_0x3c59('0x4e')]){_0x6c0f90[_0x3c59('0x4c')]=_[_0x3c59('0x4f')](_0x6c0f90[_0x3c59('0x4c')],{'$or':_[_0x3c59('0x3b')](_0x6c0f90[_0x3c59('0x44')],function(_0x5a05b0){var _0x216c78={};_0x216c78[_0x5a05b0]={'$like':'%'+_0x39ac93[_0x3c59('0x41')]['filter']+'%'};return _0x216c78;})});}_0x6c0f90=_[_0x3c59('0x4f')]({},_0x6c0f90,_0x39ac93[_0x3c59('0x51')]);return _0x51ee5b['getSubjects'](_0x6c0f90);}})[_0x3c59('0x21')](function(_0x2a091e){if(_0x2a091e){_0x1cef8f=_0x2a091e[_0x3c59('0x46')];if(!_0x39ac93[_0x3c59('0x41')][_0x3c59('0x47')](_0x3c59('0x48'))){_0x6c0f90[_0x3c59('0x49')]=qs['limit'](_0x39ac93[_0x3c59('0x41')][_0x3c59('0x49')]);_0x6c0f90[_0x3c59('0x32')]=qs[_0x3c59('0x32')](_0x39ac93[_0x3c59('0x41')][_0x3c59('0x32')]);}return _0x51ee5b['getSubjects'](_0x6c0f90);}})[_0x3c59('0x21')](function(_0x54d95f){if(_0x54d95f){return _0x54d95f?{'count':_0x1cef8f,'rows':_0x54d95f}:null;}})[_0x3c59('0x21')](respondWithResult(_0x17c302,null))[_0x3c59('0x2c')](handleError(_0x17c302,null));};exports[_0x3c59('0x60')]=function(_0x2d46c5,_0x57b095,_0x34f3a5){var _0x26c572={};var _0x200002={};var _0x2c1e59;var _0x5abdaa;return db['FreshdeskConfiguration'][_0x3c59('0x5e')]({'where':{'id':_0x2d46c5[_0x3c59('0x58')]['id']}})[_0x3c59('0x21')](handleEntityNotFound(_0x57b095,null))[_0x3c59('0x21')](function(_0x14ab33){if(_0x14ab33){_0x2c1e59=_0x14ab33;_0x200002[_0x3c59('0x3f')]=_[_0x3c59('0x40')](db[_0x3c59('0x5f')][_0x3c59('0x3c')]);_0x200002[_0x3c59('0x41')]=_['keys'](_0x2d46c5[_0x3c59('0x41')]);_0x200002[_0x3c59('0x42')]=_[_0x3c59('0x43')](_0x200002[_0x3c59('0x3f')],_0x200002[_0x3c59('0x41')]);_0x26c572[_0x3c59('0x44')]=_['intersection'](_0x200002[_0x3c59('0x3f')],qs[_0x3c59('0x45')](_0x2d46c5['query'][_0x3c59('0x45')]));_0x26c572[_0x3c59('0x44')]=_0x26c572[_0x3c59('0x44')][_0x3c59('0x46')]?_0x26c572['attributes']:_0x200002[_0x3c59('0x3f')];_0x26c572['order']=qs[_0x3c59('0x4b')](_0x2d46c5[_0x3c59('0x41')][_0x3c59('0x4b')]);_0x26c572[_0x3c59('0x4c')]=qs[_0x3c59('0x42')](_[_0x3c59('0x4d')](_0x2d46c5[_0x3c59('0x41')],_0x200002[_0x3c59('0x42')]));if(_0x2d46c5['query'][_0x3c59('0x4e')]){_0x26c572[_0x3c59('0x4c')]=_[_0x3c59('0x4f')](_0x26c572[_0x3c59('0x4c')],{'$or':_[_0x3c59('0x3b')](_0x26c572[_0x3c59('0x44')],function(_0x5f13d7){var _0x4b48e4={};_0x4b48e4[_0x5f13d7]={'$like':'%'+_0x2d46c5[_0x3c59('0x41')][_0x3c59('0x4e')]+'%'};return _0x4b48e4;})});}_0x26c572=_['merge']({},_0x26c572,_0x2d46c5[_0x3c59('0x51')]);return _0x2c1e59[_0x3c59('0x60')](_0x26c572);}})[_0x3c59('0x21')](function(_0x512c1f){if(_0x512c1f){_0x5abdaa=_0x512c1f[_0x3c59('0x46')];if(!_0x2d46c5[_0x3c59('0x41')][_0x3c59('0x47')](_0x3c59('0x48'))){_0x26c572[_0x3c59('0x49')]=qs[_0x3c59('0x49')](_0x2d46c5[_0x3c59('0x41')]['limit']);_0x26c572['offset']=qs[_0x3c59('0x32')](_0x2d46c5[_0x3c59('0x41')]['offset']);}return _0x2c1e59[_0x3c59('0x60')](_0x26c572);}})[_0x3c59('0x21')](function(_0x2374d0){if(_0x2374d0){return _0x2374d0?{'count':_0x5abdaa,'rows':_0x2374d0}:null;}})[_0x3c59('0x21')](respondWithResult(_0x57b095,null))['catch'](handleError(_0x57b095,null));};exports[_0x3c59('0x61')]=function(_0x3f460a,_0x2481de,_0x2cadd7){var _0xe9bd8b={};var _0x4e8880={};var _0x46a1ab;var _0x53abca;return db[_0x3c59('0x52')][_0x3c59('0x5e')]({'where':{'id':_0x3f460a[_0x3c59('0x58')]['id']}})[_0x3c59('0x21')](handleEntityNotFound(_0x2481de,null))[_0x3c59('0x21')](function(_0x87a059){if(_0x87a059){_0x46a1ab=_0x87a059;_0x4e8880[_0x3c59('0x3f')]=_[_0x3c59('0x40')](db[_0x3c59('0x62')][_0x3c59('0x3c')]);_0x4e8880[_0x3c59('0x41')]=_['keys'](_0x3f460a[_0x3c59('0x41')]);_0x4e8880[_0x3c59('0x42')]=_[_0x3c59('0x43')](_0x4e8880['model'],_0x4e8880[_0x3c59('0x41')]);_0xe9bd8b[_0x3c59('0x44')]=_[_0x3c59('0x43')](_0x4e8880[_0x3c59('0x3f')],qs[_0x3c59('0x45')](_0x3f460a[_0x3c59('0x41')]['fields']));_0xe9bd8b[_0x3c59('0x44')]=_0xe9bd8b['attributes'][_0x3c59('0x46')]?_0xe9bd8b[_0x3c59('0x44')]:_0x4e8880[_0x3c59('0x3f')];_0xe9bd8b[_0x3c59('0x4a')]=qs['sort'](_0x3f460a['query'][_0x3c59('0x4b')]);_0xe9bd8b[_0x3c59('0x4c')]=qs[_0x3c59('0x42')](_[_0x3c59('0x4d')](_0x3f460a[_0x3c59('0x41')],_0x4e8880[_0x3c59('0x42')]));if(_0x3f460a[_0x3c59('0x41')][_0x3c59('0x4e')]){_0xe9bd8b[_0x3c59('0x4c')]=_[_0x3c59('0x4f')](_0xe9bd8b[_0x3c59('0x4c')],{'$or':_[_0x3c59('0x3b')](_0xe9bd8b[_0x3c59('0x44')],function(_0x1e25ef){var _0x416e4a={};_0x416e4a[_0x1e25ef]={'$like':'%'+_0x3f460a[_0x3c59('0x41')][_0x3c59('0x4e')]+'%'};return _0x416e4a;})});}_0xe9bd8b=_[_0x3c59('0x4f')]({},_0xe9bd8b,_0x3f460a[_0x3c59('0x51')]);return _0x46a1ab[_0x3c59('0x61')](_0xe9bd8b);}})[_0x3c59('0x21')](function(_0x376d8){if(_0x376d8){_0x53abca=_0x376d8[_0x3c59('0x46')];if(!_0x3f460a['query'][_0x3c59('0x47')](_0x3c59('0x48'))){_0xe9bd8b['limit']=qs['limit'](_0x3f460a[_0x3c59('0x41')]['limit']);_0xe9bd8b[_0x3c59('0x32')]=qs[_0x3c59('0x32')](_0x3f460a[_0x3c59('0x41')]['offset']);}return _0x46a1ab[_0x3c59('0x61')](_0xe9bd8b);}})['then'](function(_0xd00213){if(_0xd00213){return _0xd00213?{'count':_0x53abca,'rows':_0xd00213}:null;}})[_0x3c59('0x21')](respondWithResult(_0x2481de,null))['catch'](handleError(_0x2481de,null));};exports[_0x3c59('0x63')]=function(_0x24867d,_0x50029a,_0x278d91){if(_0x24867d[_0x3c59('0x5a')]['id']){delete _0x24867d[_0x3c59('0x5a')]['id'];}return db[_0x3c59('0x52')][_0x3c59('0x5e')]({'where':{'id':_0x24867d[_0x3c59('0x58')]['id']}})[_0x3c59('0x21')](handleEntityNotFound(_0x50029a,null))[_0x3c59('0x21')](function(_0x15a29b){if(_0x15a29b){return _0x15a29b[_0x3c59('0x63')](_0x24867d[_0x3c59('0x5a')]['ids']||[]);}return null;})['then'](respondWithResult(_0x50029a,null))[_0x3c59('0x2c')](handleError(_0x50029a,null));};
\ No newline at end of file
+var _0x69f4=['error','message','request\x20sent','result','catch','sendStatus','status','end','json','offset','limit','set','apply','reject','save','destroy','stack','name','send','index','map','FreshdeskConfiguration','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','find','create','update','body','params','getFields','FreshdeskField','order','getSubjects','findOne','getDescriptions','getTags','Tag','setTags','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','FreshdeskConfiguration,\x20%s,\x20%s','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','code'];(function(_0x2ee922,_0x3b3c54){var _0x49e807=function(_0x36eb7b){while(--_0x36eb7b){_0x2ee922['push'](_0x2ee922['shift']());}};_0x49e807(++_0x3b3c54);}(_0x69f4,0xa1));var _0x469f=function(_0x309b09,_0xe4c181){_0x309b09=_0x309b09-0x0;var _0x7b38d7=_0x69f4[_0x309b09];return _0x7b38d7;};'use strict';var pdf=require(_0x469f('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x469f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x469f('0x2'));var rp=require(_0x469f('0x3'));var moment=require(_0x469f('0x4'));var BPromise=require(_0x469f('0x5'));var Mustache=require(_0x469f('0x6'));var util=require(_0x469f('0x7'));var path=require(_0x469f('0x8'));var sox=require(_0x469f('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x469f('0xa'));var crypto=require(_0x469f('0xb'));var jsforce=require(_0x469f('0xc'));var deskjs=require(_0x469f('0xd'));var toCsv=require('to-csv');var querystring=require(_0x469f('0xe'));var Papa=require(_0x469f('0xf'));var Redis=require('ioredis');var authService=require(_0x469f('0x10'));var qs=require(_0x469f('0x11'));var as=require(_0x469f('0x12'));var hardwareService=require(_0x469f('0x13'));var logger=require(_0x469f('0x14'))(_0x469f('0x15'));var utils=require(_0x469f('0x16'));var config=require(_0x469f('0x17'));var db=require(_0x469f('0x18'))['db'];var jayson=require(_0x469f('0x19'));var client=jayson[_0x469f('0x1a')][_0x469f('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x3718b8,_0x542d50,_0x442355){if(_0x442355){var _0x3f2f3a=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3f2f3a[_0x469f('0x1c')](_0x542d50)){return _0x3718b8;}else{throw new db[(_0x469f('0x1d'))][(_0x469f('0x1e'))](_0x469f('0x1f'));}}else{return _0x3718b8;}}function respondWithRpcPromise(_0x240d57,_0x305579,_0x360a0a,_0x335cc9){return new BPromise(function(_0x3f5274,_0x4fb43d){var _0x3f226f=_0x335cc9||client;return _0x3f226f[_0x469f('0x20')](_0x240d57,_0x360a0a)[_0x469f('0x21')](function(_0x27baea){logger[_0x469f('0x22')](_0x469f('0x23'),_0x305579,'request\x20sent');logger[_0x469f('0x24')](_0x469f('0x25'),_0x305579,'request\x20sent',JSON['stringify'](_0x27baea));if(_0x27baea['error']){if(_0x27baea['error'][_0x469f('0x26')]===0x1f4){logger[_0x469f('0x27')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x305579,_0x27baea['error'][_0x469f('0x28')]);return _0x4fb43d(_0x27baea[_0x469f('0x27')][_0x469f('0x28')]);}logger[_0x469f('0x27')](_0x469f('0x23'),_0x305579,_0x27baea['error'][_0x469f('0x28')]);return _0x3f5274(_0x27baea['error'][_0x469f('0x28')]);}else{logger['info']('FreshdeskConfiguration,\x20%s,\x20%s',_0x305579,_0x469f('0x29'));_0x3f5274(_0x27baea[_0x469f('0x2a')]['message']);}})[_0x469f('0x2b')](function(_0x515322){logger[_0x469f('0x27')](_0x469f('0x23'),_0x305579,_0x515322);_0x4fb43d(_0x515322);});});}function respondWithStatusCode(_0x2a09fa,_0x3c3c7c){_0x3c3c7c=_0x3c3c7c||0xcc;return function(_0x562b71){if(_0x562b71){return _0x2a09fa[_0x469f('0x2c')](_0x3c3c7c);}return _0x2a09fa[_0x469f('0x2d')](_0x3c3c7c)[_0x469f('0x2e')]();};}function respondWithResult(_0x9f507c,_0x29fcb1){_0x29fcb1=_0x29fcb1||0xc8;return function(_0x188ad6){if(_0x188ad6){return _0x9f507c[_0x469f('0x2d')](_0x29fcb1)[_0x469f('0x2f')](_0x188ad6);}};}function respondWithFilteredResult(_0x1ce9e6,_0x53f9ab){return function(_0x4c3a92){if(_0x4c3a92){var _0x453ea0=_0x4c3a92['count'],_0x4a274f=_0x53f9ab[_0x469f('0x30')],_0x40483c=_0x53f9ab[_0x469f('0x30')]+_0x53f9ab[_0x469f('0x31')],_0x4ca58e;if(_0x40483c>=_0x453ea0){_0x40483c=_0x453ea0;_0x4ca58e=0xc8;}else{_0x4ca58e=0xce;}_0x1ce9e6[_0x469f('0x2d')](_0x4ca58e);return _0x1ce9e6[_0x469f('0x32')]('Content-Range',_0x4a274f+'-'+_0x40483c+'/'+_0x453ea0)[_0x469f('0x2f')](_0x4c3a92);}return null;};}function patchUpdates(_0x2eb27b){return function(_0x4097a0){try{jsonpatch[_0x469f('0x33')](_0x4097a0,_0x2eb27b,!![]);}catch(_0xb741f){return BPromise[_0x469f('0x34')](_0xb741f);}return _0x4097a0[_0x469f('0x35')]();};}function saveUpdates(_0x150d85,_0x410861){return function(_0x407458){if(_0x407458){return _0x407458['update'](_0x150d85)[_0x469f('0x21')](function(_0x417c06){return _0x417c06;});}return null;};}function removeEntity(_0x3422c5,_0x21de11){return function(_0x3ef793){if(_0x3ef793){return _0x3ef793[_0x469f('0x36')]()[_0x469f('0x21')](function(){_0x3422c5[_0x469f('0x2d')](0xcc)[_0x469f('0x2e')]();});}};}function handleEntityNotFound(_0x42b823,_0x327852){return function(_0x465cb){if(!_0x465cb){_0x42b823[_0x469f('0x2c')](0x194);}return _0x465cb;};}function handleError(_0x3e5b93,_0x14df9a){_0x14df9a=_0x14df9a||0x1f4;return function(_0x1d53e0){logger[_0x469f('0x27')](_0x1d53e0[_0x469f('0x37')]);if(_0x1d53e0[_0x469f('0x38')]){delete _0x1d53e0[_0x469f('0x38')];}_0x3e5b93['status'](_0x14df9a)[_0x469f('0x39')](_0x1d53e0);};}exports[_0x469f('0x3a')]=function(_0x464bd0,_0x5f315c){var _0x350dc7={},_0x5c9c6f={},_0x219da5={'count':0x0,'rows':[]};var _0x39e682=_[_0x469f('0x3b')](db[_0x469f('0x3c')][_0x469f('0x3d')],function(_0x1d968a){return{'name':_0x1d968a['fieldName'],'type':_0x1d968a[_0x469f('0x3e')][_0x469f('0x3f')]};});_0x5c9c6f[_0x469f('0x40')]=_[_0x469f('0x3b')](_0x39e682,'name');_0x5c9c6f[_0x469f('0x41')]=_[_0x469f('0x42')](_0x464bd0[_0x469f('0x41')]);_0x5c9c6f[_0x469f('0x43')]=_[_0x469f('0x44')](_0x5c9c6f['model'],_0x5c9c6f[_0x469f('0x41')]);_0x350dc7[_0x469f('0x45')]=_['intersection'](_0x5c9c6f[_0x469f('0x40')],qs[_0x469f('0x46')](_0x464bd0['query'][_0x469f('0x46')]));_0x350dc7[_0x469f('0x45')]=_0x350dc7['attributes'][_0x469f('0x47')]?_0x350dc7[_0x469f('0x45')]:_0x5c9c6f[_0x469f('0x40')];if(!_0x464bd0[_0x469f('0x41')][_0x469f('0x48')](_0x469f('0x49'))){_0x350dc7['limit']=qs[_0x469f('0x31')](_0x464bd0[_0x469f('0x41')][_0x469f('0x31')]);_0x350dc7['offset']=qs[_0x469f('0x30')](_0x464bd0['query'][_0x469f('0x30')]);}_0x350dc7['order']=qs[_0x469f('0x4a')](_0x464bd0['query'][_0x469f('0x4a')]);_0x350dc7['where']=qs['filters'](_[_0x469f('0x4b')](_0x464bd0['query'],_0x5c9c6f[_0x469f('0x43')]));if(_0x464bd0[_0x469f('0x41')][_0x469f('0x4c')]){_0x350dc7[_0x469f('0x4d')]=_[_0x469f('0x4e')](_0x350dc7[_0x469f('0x4d')],{'$or':_['map'](_0x39e682,function(_0x435ff4){if(_0x435ff4[_0x469f('0x3e')]!==_0x469f('0x4f')){var _0x3a768f={};_0x3a768f[_0x435ff4[_0x469f('0x38')]]={'$like':'%'+_0x464bd0[_0x469f('0x41')][_0x469f('0x4c')]+'%'};return _0x3a768f;}})});}_0x350dc7=_[_0x469f('0x4e')]({},_0x350dc7,_0x464bd0[_0x469f('0x50')]);var _0x58ea69={'where':_0x350dc7['where']};return db[_0x469f('0x3c')]['count'](_0x58ea69)[_0x469f('0x21')](function(_0x121b65){_0x219da5[_0x469f('0x51')]=_0x121b65;if(_0x464bd0['query'][_0x469f('0x52')]){_0x350dc7[_0x469f('0x53')]=[{'all':!![]}];}return db['FreshdeskConfiguration'][_0x469f('0x54')](_0x350dc7);})['then'](function(_0x11307a){_0x219da5[_0x469f('0x55')]=_0x11307a;return _0x219da5;})[_0x469f('0x21')](respondWithFilteredResult(_0x5f315c,_0x350dc7))[_0x469f('0x2b')](handleError(_0x5f315c,null));};exports['show']=function(_0x552308,_0x38bfa4){var _0x5164b3={'raw':![],'where':{'id':_0x552308['params']['id']}},_0x5b77a7={};_0x5b77a7[_0x469f('0x40')]=_[_0x469f('0x42')](db[_0x469f('0x3c')][_0x469f('0x3d')]);_0x5b77a7[_0x469f('0x41')]=_['keys'](_0x552308[_0x469f('0x41')]);_0x5b77a7[_0x469f('0x43')]=_[_0x469f('0x44')](_0x5b77a7[_0x469f('0x40')],_0x5b77a7['query']);_0x5164b3['attributes']=_['intersection'](_0x5b77a7[_0x469f('0x40')],qs['fields'](_0x552308['query'][_0x469f('0x46')]));_0x5164b3[_0x469f('0x45')]=_0x5164b3['attributes'][_0x469f('0x47')]?_0x5164b3[_0x469f('0x45')]:_0x5b77a7[_0x469f('0x40')];if(_0x552308[_0x469f('0x41')][_0x469f('0x52')]){_0x5164b3[_0x469f('0x53')]=[{'all':!![]}];}_0x5164b3=_['merge']({},_0x5164b3,_0x552308[_0x469f('0x50')]);return db[_0x469f('0x3c')][_0x469f('0x56')](_0x5164b3)[_0x469f('0x21')](handleEntityNotFound(_0x38bfa4,null))[_0x469f('0x21')](respondWithResult(_0x38bfa4,null))[_0x469f('0x2b')](handleError(_0x38bfa4,null));};exports[_0x469f('0x57')]=function(_0x1bd5d8,_0xf0e7fa){return db[_0x469f('0x3c')]['create'](_0x1bd5d8['body'],{})[_0x469f('0x21')](respondWithResult(_0xf0e7fa,0xc9))[_0x469f('0x2b')](handleError(_0xf0e7fa,null));};exports[_0x469f('0x58')]=function(_0x134a13,_0x5b699){if(_0x134a13[_0x469f('0x59')]['id']){delete _0x134a13[_0x469f('0x59')]['id'];}return db[_0x469f('0x3c')]['find']({'where':{'id':_0x134a13[_0x469f('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5b699,null))[_0x469f('0x21')](saveUpdates(_0x134a13[_0x469f('0x59')],null))[_0x469f('0x21')](respondWithResult(_0x5b699,null))[_0x469f('0x2b')](handleError(_0x5b699,null));};exports[_0x469f('0x36')]=function(_0x146b5d,_0x283243){return db[_0x469f('0x3c')]['find']({'where':{'id':_0x146b5d[_0x469f('0x5a')]['id']}})[_0x469f('0x21')](handleEntityNotFound(_0x283243,null))[_0x469f('0x21')](removeEntity(_0x283243,null))[_0x469f('0x2b')](handleError(_0x283243,null));};exports[_0x469f('0x5b')]=function(_0x4e919b,_0x54be3a,_0x43ec13){var _0x18713c={};var _0x391c35={};var _0x385fb3;var _0x24a8f5;return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0x4e919b[_0x469f('0x5a')]['id']}})['then'](handleEntityNotFound(_0x54be3a,null))[_0x469f('0x21')](function(_0x2b1912){if(_0x2b1912){_0x385fb3=_0x2b1912;_0x391c35['model']=_[_0x469f('0x42')](db[_0x469f('0x5c')][_0x469f('0x3d')]);_0x391c35['query']=_['keys'](_0x4e919b['query']);_0x391c35[_0x469f('0x43')]=_['intersection'](_0x391c35[_0x469f('0x40')],_0x391c35['query']);_0x18713c[_0x469f('0x45')]=_[_0x469f('0x44')](_0x391c35[_0x469f('0x40')],qs[_0x469f('0x46')](_0x4e919b['query'][_0x469f('0x46')]));_0x18713c['attributes']=_0x18713c[_0x469f('0x45')]['length']?_0x18713c[_0x469f('0x45')]:_0x391c35['model'];_0x18713c[_0x469f('0x5d')]=qs[_0x469f('0x4a')](_0x4e919b[_0x469f('0x41')]['sort']);_0x18713c[_0x469f('0x4d')]=qs[_0x469f('0x43')](_['pick'](_0x4e919b[_0x469f('0x41')],_0x391c35[_0x469f('0x43')]));if(_0x4e919b[_0x469f('0x41')]['filter']){_0x18713c[_0x469f('0x4d')]=_[_0x469f('0x4e')](_0x18713c[_0x469f('0x4d')],{'$or':_[_0x469f('0x3b')](_0x18713c[_0x469f('0x45')],function(_0x15b0ff){var _0x15f7a7={};_0x15f7a7[_0x15b0ff]={'$like':'%'+_0x4e919b['query'][_0x469f('0x4c')]+'%'};return _0x15f7a7;})});}_0x18713c=_[_0x469f('0x4e')]({},_0x18713c,_0x4e919b['options']);return _0x385fb3[_0x469f('0x5b')](_0x18713c);}})[_0x469f('0x21')](function(_0x2f303c){if(_0x2f303c){_0x24a8f5=_0x2f303c[_0x469f('0x47')];if(!_0x4e919b[_0x469f('0x41')][_0x469f('0x48')](_0x469f('0x49'))){_0x18713c[_0x469f('0x31')]=qs['limit'](_0x4e919b[_0x469f('0x41')][_0x469f('0x31')]);_0x18713c[_0x469f('0x30')]=qs[_0x469f('0x30')](_0x4e919b[_0x469f('0x41')][_0x469f('0x30')]);}return _0x385fb3[_0x469f('0x5b')](_0x18713c);}})[_0x469f('0x21')](function(_0x11f813){if(_0x11f813){return _0x11f813?{'count':_0x24a8f5,'rows':_0x11f813}:null;}})[_0x469f('0x21')](respondWithResult(_0x54be3a,null))[_0x469f('0x2b')](handleError(_0x54be3a,null));};exports[_0x469f('0x5e')]=function(_0x1c5201,_0x4cec80,_0x5c08aa){var _0x138271={};var _0x5d3464={};var _0x1585ab;var _0x548b2e;return db[_0x469f('0x3c')][_0x469f('0x5f')]({'where':{'id':_0x1c5201['params']['id']}})[_0x469f('0x21')](handleEntityNotFound(_0x4cec80,null))[_0x469f('0x21')](function(_0x513ff3){if(_0x513ff3){_0x1585ab=_0x513ff3;_0x5d3464['model']=_[_0x469f('0x42')](db[_0x469f('0x5c')][_0x469f('0x3d')]);_0x5d3464[_0x469f('0x41')]=_['keys'](_0x1c5201[_0x469f('0x41')]);_0x5d3464['filters']=_[_0x469f('0x44')](_0x5d3464[_0x469f('0x40')],_0x5d3464['query']);_0x138271[_0x469f('0x45')]=_['intersection'](_0x5d3464[_0x469f('0x40')],qs[_0x469f('0x46')](_0x1c5201[_0x469f('0x41')][_0x469f('0x46')]));_0x138271[_0x469f('0x45')]=_0x138271[_0x469f('0x45')][_0x469f('0x47')]?_0x138271[_0x469f('0x45')]:_0x5d3464['model'];_0x138271['order']=qs[_0x469f('0x4a')](_0x1c5201['query'][_0x469f('0x4a')]);_0x138271['where']=qs['filters'](_[_0x469f('0x4b')](_0x1c5201[_0x469f('0x41')],_0x5d3464[_0x469f('0x43')]));if(_0x1c5201['query']['filter']){_0x138271['where']=_[_0x469f('0x4e')](_0x138271[_0x469f('0x4d')],{'$or':_[_0x469f('0x3b')](_0x138271[_0x469f('0x45')],function(_0x35f65b){var _0xfed47d={};_0xfed47d[_0x35f65b]={'$like':'%'+_0x1c5201['query']['filter']+'%'};return _0xfed47d;})});}_0x138271=_[_0x469f('0x4e')]({},_0x138271,_0x1c5201[_0x469f('0x50')]);return _0x1585ab[_0x469f('0x5e')](_0x138271);}})[_0x469f('0x21')](function(_0x484eec){if(_0x484eec){_0x548b2e=_0x484eec['length'];if(!_0x1c5201['query'][_0x469f('0x48')](_0x469f('0x49'))){_0x138271[_0x469f('0x31')]=qs[_0x469f('0x31')](_0x1c5201[_0x469f('0x41')][_0x469f('0x31')]);_0x138271[_0x469f('0x30')]=qs[_0x469f('0x30')](_0x1c5201['query'][_0x469f('0x30')]);}return _0x1585ab[_0x469f('0x5e')](_0x138271);}})[_0x469f('0x21')](function(_0x5cdcbd){if(_0x5cdcbd){return _0x5cdcbd?{'count':_0x548b2e,'rows':_0x5cdcbd}:null;}})[_0x469f('0x21')](respondWithResult(_0x4cec80,null))[_0x469f('0x2b')](handleError(_0x4cec80,null));};exports[_0x469f('0x60')]=function(_0x3f8c31,_0x1e2ff3,_0x33a280){var _0x3853c0={};var _0x106e5b={};var _0x28d798;var _0x3a336c;return db[_0x469f('0x3c')][_0x469f('0x5f')]({'where':{'id':_0x3f8c31[_0x469f('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1e2ff3,null))[_0x469f('0x21')](function(_0x4bd5fe){if(_0x4bd5fe){_0x28d798=_0x4bd5fe;_0x106e5b[_0x469f('0x40')]=_[_0x469f('0x42')](db[_0x469f('0x5c')]['rawAttributes']);_0x106e5b['query']=_[_0x469f('0x42')](_0x3f8c31[_0x469f('0x41')]);_0x106e5b['filters']=_[_0x469f('0x44')](_0x106e5b[_0x469f('0x40')],_0x106e5b[_0x469f('0x41')]);_0x3853c0[_0x469f('0x45')]=_[_0x469f('0x44')](_0x106e5b[_0x469f('0x40')],qs[_0x469f('0x46')](_0x3f8c31[_0x469f('0x41')][_0x469f('0x46')]));_0x3853c0[_0x469f('0x45')]=_0x3853c0[_0x469f('0x45')]['length']?_0x3853c0['attributes']:_0x106e5b[_0x469f('0x40')];_0x3853c0[_0x469f('0x5d')]=qs[_0x469f('0x4a')](_0x3f8c31[_0x469f('0x41')][_0x469f('0x4a')]);_0x3853c0[_0x469f('0x4d')]=qs[_0x469f('0x43')](_['pick'](_0x3f8c31['query'],_0x106e5b[_0x469f('0x43')]));if(_0x3f8c31[_0x469f('0x41')]['filter']){_0x3853c0['where']=_[_0x469f('0x4e')](_0x3853c0['where'],{'$or':_[_0x469f('0x3b')](_0x3853c0['attributes'],function(_0xbb5be7){var _0x6a2f2f={};_0x6a2f2f[_0xbb5be7]={'$like':'%'+_0x3f8c31[_0x469f('0x41')]['filter']+'%'};return _0x6a2f2f;})});}_0x3853c0=_[_0x469f('0x4e')]({},_0x3853c0,_0x3f8c31[_0x469f('0x50')]);return _0x28d798[_0x469f('0x60')](_0x3853c0);}})[_0x469f('0x21')](function(_0x115eed){if(_0x115eed){_0x3a336c=_0x115eed[_0x469f('0x47')];if(!_0x3f8c31[_0x469f('0x41')]['hasOwnProperty'](_0x469f('0x49'))){_0x3853c0[_0x469f('0x31')]=qs['limit'](_0x3f8c31[_0x469f('0x41')][_0x469f('0x31')]);_0x3853c0['offset']=qs[_0x469f('0x30')](_0x3f8c31[_0x469f('0x41')][_0x469f('0x30')]);}return _0x28d798['getDescriptions'](_0x3853c0);}})['then'](function(_0x1591eb){if(_0x1591eb){return _0x1591eb?{'count':_0x3a336c,'rows':_0x1591eb}:null;}})[_0x469f('0x21')](respondWithResult(_0x1e2ff3,null))[_0x469f('0x2b')](handleError(_0x1e2ff3,null));};exports[_0x469f('0x61')]=function(_0xa5fde4,_0x5edd3d,_0x13f2e0){var _0x440ec3={};var _0x62b9d4={};var _0x3f86d1;var _0x17ebea;return db['FreshdeskConfiguration'][_0x469f('0x5f')]({'where':{'id':_0xa5fde4['params']['id']}})[_0x469f('0x21')](handleEntityNotFound(_0x5edd3d,null))[_0x469f('0x21')](function(_0x1c4b9b){if(_0x1c4b9b){_0x3f86d1=_0x1c4b9b;_0x62b9d4[_0x469f('0x40')]=_[_0x469f('0x42')](db[_0x469f('0x62')][_0x469f('0x3d')]);_0x62b9d4[_0x469f('0x41')]=_['keys'](_0xa5fde4[_0x469f('0x41')]);_0x62b9d4[_0x469f('0x43')]=_[_0x469f('0x44')](_0x62b9d4[_0x469f('0x40')],_0x62b9d4['query']);_0x440ec3['attributes']=_['intersection'](_0x62b9d4[_0x469f('0x40')],qs[_0x469f('0x46')](_0xa5fde4[_0x469f('0x41')][_0x469f('0x46')]));_0x440ec3[_0x469f('0x45')]=_0x440ec3[_0x469f('0x45')]['length']?_0x440ec3[_0x469f('0x45')]:_0x62b9d4[_0x469f('0x40')];_0x440ec3[_0x469f('0x5d')]=qs[_0x469f('0x4a')](_0xa5fde4[_0x469f('0x41')][_0x469f('0x4a')]);_0x440ec3[_0x469f('0x4d')]=qs[_0x469f('0x43')](_[_0x469f('0x4b')](_0xa5fde4['query'],_0x62b9d4[_0x469f('0x43')]));if(_0xa5fde4[_0x469f('0x41')][_0x469f('0x4c')]){_0x440ec3[_0x469f('0x4d')]=_['merge'](_0x440ec3[_0x469f('0x4d')],{'$or':_['map'](_0x440ec3[_0x469f('0x45')],function(_0x31c99e){var _0x33fb33={};_0x33fb33[_0x31c99e]={'$like':'%'+_0xa5fde4['query'][_0x469f('0x4c')]+'%'};return _0x33fb33;})});}_0x440ec3=_['merge']({},_0x440ec3,_0xa5fde4[_0x469f('0x50')]);return _0x3f86d1[_0x469f('0x61')](_0x440ec3);}})['then'](function(_0x11c52e){if(_0x11c52e){_0x17ebea=_0x11c52e['length'];if(!_0xa5fde4[_0x469f('0x41')][_0x469f('0x48')](_0x469f('0x49'))){_0x440ec3['limit']=qs[_0x469f('0x31')](_0xa5fde4[_0x469f('0x41')][_0x469f('0x31')]);_0x440ec3[_0x469f('0x30')]=qs[_0x469f('0x30')](_0xa5fde4[_0x469f('0x41')][_0x469f('0x30')]);}return _0x3f86d1[_0x469f('0x61')](_0x440ec3);}})[_0x469f('0x21')](function(_0x4226ad){if(_0x4226ad){return _0x4226ad?{'count':_0x17ebea,'rows':_0x4226ad}:null;}})['then'](respondWithResult(_0x5edd3d,null))[_0x469f('0x2b')](handleError(_0x5edd3d,null));};exports[_0x469f('0x63')]=function(_0x4759b6,_0x5b172e,_0x2a6f7f){if(_0x4759b6['body']['id']){delete _0x4759b6[_0x469f('0x59')]['id'];}return db[_0x469f('0x3c')][_0x469f('0x5f')]({'where':{'id':_0x4759b6[_0x469f('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5b172e,null))[_0x469f('0x21')](function(_0xa07f78){if(_0xa07f78){return _0xa07f78[_0x469f('0x63')](_0x4759b6[_0x469f('0x59')]['ids']||[]);}return null;})[_0x469f('0x21')](respondWithResult(_0x5b172e,null))[_0x469f('0x2b')](handleError(_0x5b172e,null));};
\ No newline at end of file
diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js
index f258007..0a1ee84 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 _0x66a0=['../../config/logger','api','moment','bluebird','rimraf','exports','FreshdeskConfiguration','int_freshdesk_configurations','lodash'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x66a0,0x1c1));var _0x066a=function(_0x4bacb6,_0x2b299d){_0x4bacb6=_0x4bacb6-0x0;var _0x58c029=_0x66a0[_0x4bacb6];return _0x58c029;};'use strict';var _=require(_0x066a('0x0'));var util=require('util');var logger=require(_0x066a('0x1'))(_0x066a('0x2'));var moment=require(_0x066a('0x3'));var BPromise=require(_0x066a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x066a('0x5'));var config=require('../../config/environment');var attributes=require('./intFreshdeskConfiguration.attributes');module[_0x066a('0x6')]=function(_0x3425db,_0x555186){return _0x3425db['define'](_0x066a('0x7'),attributes,{'tableName':_0x066a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2008=['rimraf','../../config/environment','int_freshdesk_configurations','lodash','util','../../config/logger','moment','request-promise','path'];(function(_0x4e3cfa,_0xf8d93e){var _0x36adad=function(_0x991058){while(--_0x991058){_0x4e3cfa['push'](_0x4e3cfa['shift']());}};_0x36adad(++_0xf8d93e);}(_0x2008,0xe4));var _0x8200=function(_0x52096b,_0x20bab4){_0x52096b=_0x52096b-0x0;var _0x2b1cc7=_0x2008[_0x52096b];return _0x2b1cc7;};'use strict';var _=require(_0x8200('0x0'));var util=require(_0x8200('0x1'));var logger=require(_0x8200('0x2'))('api');var moment=require(_0x8200('0x3'));var BPromise=require('bluebird');var rp=require(_0x8200('0x4'));var fs=require('fs');var path=require(_0x8200('0x5'));var rimraf=require(_0x8200('0x6'));var config=require(_0x8200('0x7'));var attributes=require('./intFreshdeskConfiguration.attributes');module['exports']=function(_0x169b93,_0x4843c0){return _0x169b93['define']('FreshdeskConfiguration',attributes,{'tableName':_0x8200('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 c8b18a0..4d250b3 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 _0xe016=['../../config/logger','../../config/environment','client','http','request','then','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xe016,0x12f));var _0x6e01=function(_0x1589dd,_0x2b9d22){_0x1589dd=_0x1589dd-0x0;var _0x1bddd1=_0xe016[_0x1589dd];return _0x1bddd1;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6e01('0x0'));var BPromise=require(_0x6e01('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6e01('0x2'));var db=require(_0x6e01('0x3'))['db'];var utils=require(_0x6e01('0x4'));var logger=require(_0x6e01('0x5'))('rpc');var config=require(_0x6e01('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x6e01('0x7')][_0x6e01('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x418f06,_0x425916,_0x407df2){return new BPromise(function(_0x1dfb76,_0x360b29){return client[_0x6e01('0x9')](_0x418f06,_0x407df2)[_0x6e01('0xa')](function(_0x25f184){logger['info'](_0x6e01('0xb'),_0x425916,_0x6e01('0xc'));logger[_0x6e01('0xd')](_0x6e01('0xe'),_0x425916,_0x6e01('0xc'),JSON[_0x6e01('0xf')](_0x25f184));if(_0x25f184[_0x6e01('0x10')]){if(_0x25f184[_0x6e01('0x10')][_0x6e01('0x11')]===0x1f4){logger[_0x6e01('0x10')](_0x6e01('0xb'),_0x425916,_0x25f184[_0x6e01('0x10')][_0x6e01('0x12')]);return _0x360b29(_0x25f184[_0x6e01('0x10')]['message']);}logger[_0x6e01('0x10')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x425916,_0x25f184[_0x6e01('0x10')][_0x6e01('0x12')]);return _0x1dfb76(_0x25f184['error']['message']);}else{logger[_0x6e01('0x13')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x425916,'request\x20sent');_0x1dfb76(_0x25f184[_0x6e01('0x14')]['message']);}})[_0x6e01('0x15')](function(_0x1e26fd){logger[_0x6e01('0x10')](_0x6e01('0xb'),_0x425916,_0x1e26fd);_0x360b29(_0x1e26fd);});});}
\ No newline at end of file
+var _0x6393=['request','then','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','info','result','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x3c9e74,_0x4334c5){var _0x4fea21=function(_0x5a2cbb){while(--_0x5a2cbb){_0x3c9e74['push'](_0x3c9e74['shift']());}};_0x4fea21(++_0x4334c5);}(_0x6393,0x8e));var _0x3639=function(_0x185f7f,_0x42aa8b){_0x185f7f=_0x185f7f-0x0;var _0x15d436=_0x6393[_0x185f7f];return _0x15d436;};'use strict';var _=require(_0x3639('0x0'));var util=require(_0x3639('0x1'));var moment=require(_0x3639('0x2'));var BPromise=require('bluebird');var rs=require(_0x3639('0x3'));var fs=require('fs');var Redis=require(_0x3639('0x4'));var db=require(_0x3639('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x3639('0x6'))(_0x3639('0x7'));var config=require(_0x3639('0x8'));var jayson=require(_0x3639('0x9'));var client=jayson[_0x3639('0xa')][_0x3639('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x27d01f,_0x10a4b9,_0x382079){return new BPromise(function(_0x1786b4,_0x18cdcc){return client[_0x3639('0xc')](_0x27d01f,_0x382079)[_0x3639('0xd')](function(_0x4f7698){logger['info'](_0x3639('0xe'),_0x10a4b9,_0x3639('0xf'));logger['debug'](_0x3639('0x10'),_0x10a4b9,_0x3639('0xf'),JSON['stringify'](_0x4f7698));if(_0x4f7698['error']){if(_0x4f7698[_0x3639('0x11')][_0x3639('0x12')]===0x1f4){logger[_0x3639('0x11')](_0x3639('0xe'),_0x10a4b9,_0x4f7698[_0x3639('0x11')][_0x3639('0x13')]);return _0x18cdcc(_0x4f7698[_0x3639('0x11')][_0x3639('0x13')]);}logger[_0x3639('0x11')](_0x3639('0xe'),_0x10a4b9,_0x4f7698[_0x3639('0x11')]['message']);return _0x1786b4(_0x4f7698[_0x3639('0x11')]['message']);}else{logger[_0x3639('0x14')](_0x3639('0xe'),_0x10a4b9,_0x3639('0xf'));_0x1786b4(_0x4f7698[_0x3639('0x15')][_0x3639('0x13')]);}})['catch'](function(_0x29cce8){logger[_0x3639('0x11')](_0x3639('0xe'),_0x10a4b9,_0x29cce8);_0x18cdcc(_0x29cce8);});});}
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/index.js b/server/api/intFreshdeskField/index.js
index 18d02cf..2609160 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 _0x34e8=['multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskField.controller','get','isAuthenticated','show','post','create','put','/:id','update','delete','destroy','exports'];(function(_0x5400b,_0x55943a){var _0x36a39b=function(_0x56963c){while(--_0x56963c){_0x5400b['push'](_0x5400b['shift']());}};_0x36a39b(++_0x55943a);}(_0x34e8,0x12c));var _0x834e=function(_0x4d3c47,_0x1ce7b8){_0x4d3c47=_0x4d3c47-0x0;var _0x5a334f=_0x34e8[_0x4d3c47];return _0x5a334f;};'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')]('/:id',auth[_0x834e('0xa')](),controller[_0x834e('0xb')]);router[_0x834e('0xc')]('/',auth[_0x834e('0xa')](),controller[_0x834e('0xd')]);router[_0x834e('0xe')](_0x834e('0xf'),auth[_0x834e('0xa')](),controller[_0x834e('0x10')]);router[_0x834e('0x11')](_0x834e('0xf'),auth[_0x834e('0xa')](),controller[_0x834e('0x12')]);module[_0x834e('0x13')]=router;
\ No newline at end of file
+var _0x9c44=['/:id','isAuthenticated','show','create','put','delete','destroy','exports','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','index'];(function(_0x10c814,_0x2c5349){var _0x3620e8=function(_0x2da52a){while(--_0x2da52a){_0x10c814['push'](_0x10c814['shift']());}};_0x3620e8(++_0x2c5349);}(_0x9c44,0x178));var _0x49c4=function(_0x6cf19c,_0x2f3f02){_0x6cf19c=_0x6cf19c-0x0;var _0xce14f3=_0x9c44[_0x6cf19c];return _0xce14f3;};'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('./intFreshdeskField.controller');router[_0x49c4('0x6')]('/',auth['isAuthenticated'](),controller[_0x49c4('0x7')]);router[_0x49c4('0x6')](_0x49c4('0x8'),auth[_0x49c4('0x9')](),controller[_0x49c4('0xa')]);router['post']('/',auth[_0x49c4('0x9')](),controller[_0x49c4('0xb')]);router[_0x49c4('0xc')](_0x49c4('0x8'),auth['isAuthenticated'](),controller['update']);router[_0x49c4('0xd')](_0x49c4('0x8'),auth['isAuthenticated'](),controller[_0x49c4('0xe')]);module[_0x49c4('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/intFreshdeskField.attributes.js b/server/api/intFreshdeskField/intFreshdeskField.attributes.js
index d2958b5..2a7c0b4 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 _0x37cc=['string','variable','customVariable','STRING','sequelize','exports','ENUM'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0x37cc,0x185));var _0xc37c=function(_0x1f15e8,_0x456666){_0x1f15e8=_0x1f15e8-0x0;var _0x70662b=_0x37cc[_0x1f15e8];return _0x70662b;};'use strict';var Sequelize=require(_0xc37c('0x0'));module[_0xc37c('0x1')]={'type':{'type':Sequelize[_0xc37c('0x2')](_0xc37c('0x3'),_0xc37c('0x4'),_0xc37c('0x5'),'keyValue'),'defaultValue':'string'},'content':{'type':Sequelize[_0xc37c('0x6')]},'key':{'type':Sequelize[_0xc37c('0x6')]},'keyType':{'type':Sequelize[_0xc37c('0x2')](_0xc37c('0x3'),_0xc37c('0x4'),_0xc37c('0x5'))},'keyContent':{'type':Sequelize[_0xc37c('0x6')]},'idField':{'type':Sequelize[_0xc37c('0x6')]},'nameField':{'type':Sequelize[_0xc37c('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xc37c('0x6')]}};
\ No newline at end of file
+var _0x0ef0=['sequelize','exports','string','variable','customVariable','keyValue','STRING','BOOLEAN'];(function(_0x2784f2,_0x180318){var _0x3aa02c=function(_0x2a712c){while(--_0x2a712c){_0x2784f2['push'](_0x2784f2['shift']());}};_0x3aa02c(++_0x180318);}(_0x0ef0,0x80));var _0x00ef=function(_0xe56fcb,_0x42f237){_0xe56fcb=_0xe56fcb-0x0;var _0x6037c7=_0x0ef0[_0xe56fcb];return _0x6037c7;};'use strict';var Sequelize=require(_0x00ef('0x0'));module[_0x00ef('0x1')]={'type':{'type':Sequelize['ENUM'](_0x00ef('0x2'),_0x00ef('0x3'),_0x00ef('0x4'),_0x00ef('0x5')),'defaultValue':_0x00ef('0x2')},'content':{'type':Sequelize[_0x00ef('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM'](_0x00ef('0x2'),_0x00ef('0x3'),_0x00ef('0x4'))},'keyContent':{'type':Sequelize[_0x00ef('0x6')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x00ef('0x6')]},'customField':{'type':Sequelize[_0x00ef('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x00ef('0x6')]}};
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/intFreshdeskField.controller.js b/server/api/intFreshdeskField/intFreshdeskField.controller.js
index 5ce71c1..7d0cdb3 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 _0x65e0=['sendStatus','status','json','count','offset','set','Content-Range','apply','save','update','then','destroy','stack','name','index','map','FreshdeskField','rawAttributes','fieldName','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','rows','catch','show','params','length','find','create','body','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb'];(function(_0x26e8e2,_0x4d9f95){var _0x622522=function(_0x2437ee){while(--_0x2437ee){_0x26e8e2['push'](_0x26e8e2['shift']());}};_0x622522(++_0x4d9f95);}(_0x65e0,0x19c));var _0x065e=function(_0x1417c6,_0x194309){_0x1417c6=_0x1417c6-0x0;var _0x44db97=_0x65e0[_0x1417c6];return _0x44db97;};'use strict';var pdf=require(_0x065e('0x0'));var emlformat=require(_0x065e('0x1'));var rimraf=require(_0x065e('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x065e('0x3'));var rp=require(_0x065e('0x4'));var moment=require(_0x065e('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x065e('0x6'));var util=require(_0x065e('0x7'));var path=require(_0x065e('0x8'));var sox=require(_0x065e('0x9'));var csv=require(_0x065e('0xa'));var ejs=require(_0x065e('0xb'));var fs=require('fs');var _=require(_0x065e('0xc'));var squel=require(_0x065e('0xd'));var crypto=require(_0x065e('0xe'));var jsforce=require(_0x065e('0xf'));var deskjs=require(_0x065e('0x10'));var toCsv=require(_0x065e('0xa'));var querystring=require(_0x065e('0x11'));var Papa=require('papaparse');var Redis=require(_0x065e('0x12'));var authService=require(_0x065e('0x13'));var qs=require(_0x065e('0x14'));var as=require(_0x065e('0x15'));var hardwareService=require(_0x065e('0x16'));var logger=require(_0x065e('0x17'))(_0x065e('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x065e('0x19'))['db'];function respondWithStatusCode(_0x3076eb,_0xfa7f5d){_0xfa7f5d=_0xfa7f5d||0xcc;return function(_0x120d85){if(_0x120d85){return _0x3076eb[_0x065e('0x1a')](_0xfa7f5d);}return _0x3076eb[_0x065e('0x1b')](_0xfa7f5d)['end']();};}function respondWithResult(_0x819806,_0x566cf2){_0x566cf2=_0x566cf2||0xc8;return function(_0x159277){if(_0x159277){return _0x819806[_0x065e('0x1b')](_0x566cf2)[_0x065e('0x1c')](_0x159277);}};}function respondWithFilteredResult(_0x480441,_0xe9dfaf){return function(_0x36e496){if(_0x36e496){var _0x47101d=_0x36e496[_0x065e('0x1d')],_0x4d3a43=_0xe9dfaf[_0x065e('0x1e')],_0x4628d5=_0xe9dfaf[_0x065e('0x1e')]+_0xe9dfaf['limit'],_0xb4fca3;if(_0x4628d5>=_0x47101d){_0x4628d5=_0x47101d;_0xb4fca3=0xc8;}else{_0xb4fca3=0xce;}_0x480441[_0x065e('0x1b')](_0xb4fca3);return _0x480441[_0x065e('0x1f')](_0x065e('0x20'),_0x4d3a43+'-'+_0x4628d5+'/'+_0x47101d)[_0x065e('0x1c')](_0x36e496);}return null;};}function patchUpdates(_0x3df4fb){return function(_0x334d24){try{jsonpatch[_0x065e('0x21')](_0x334d24,_0x3df4fb,!![]);}catch(_0x2f6f86){return BPromise['reject'](_0x2f6f86);}return _0x334d24[_0x065e('0x22')]();};}function saveUpdates(_0x4369a3,_0x5f3116){return function(_0xb66a0){if(_0xb66a0){return _0xb66a0[_0x065e('0x23')](_0x4369a3)[_0x065e('0x24')](function(_0x2bf073){return _0x2bf073;});}return null;};}function removeEntity(_0x38a264,_0x2d73c8){return function(_0x9e348a){if(_0x9e348a){return _0x9e348a[_0x065e('0x25')]()[_0x065e('0x24')](function(){_0x38a264[_0x065e('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4976e4,_0x3431c1){return function(_0x599c9c){if(!_0x599c9c){_0x4976e4[_0x065e('0x1a')](0x194);}return _0x599c9c;};}function handleError(_0x36efca,_0xa04d7f){_0xa04d7f=_0xa04d7f||0x1f4;return function(_0x1ea063){logger['error'](_0x1ea063[_0x065e('0x26')]);if(_0x1ea063[_0x065e('0x27')]){delete _0x1ea063[_0x065e('0x27')];}_0x36efca[_0x065e('0x1b')](_0xa04d7f)['send'](_0x1ea063);};}exports[_0x065e('0x28')]=function(_0x553852,_0x307e23){var _0x33e275={},_0x1bb4cf={},_0x3d74a9={'count':0x0,'rows':[]};var _0x546b29=_[_0x065e('0x29')](db[_0x065e('0x2a')][_0x065e('0x2b')],function(_0x5de2e5){return{'name':_0x5de2e5[_0x065e('0x2c')],'type':_0x5de2e5['type']['key']};});_0x1bb4cf['model']=_[_0x065e('0x29')](_0x546b29,_0x065e('0x27'));_0x1bb4cf[_0x065e('0x2d')]=_[_0x065e('0x2e')](_0x553852[_0x065e('0x2d')]);_0x1bb4cf[_0x065e('0x2f')]=_[_0x065e('0x30')](_0x1bb4cf[_0x065e('0x31')],_0x1bb4cf[_0x065e('0x2d')]);_0x33e275[_0x065e('0x32')]=_[_0x065e('0x30')](_0x1bb4cf[_0x065e('0x31')],qs[_0x065e('0x33')](_0x553852[_0x065e('0x2d')][_0x065e('0x33')]));_0x33e275['attributes']=_0x33e275[_0x065e('0x32')]['length']?_0x33e275['attributes']:_0x1bb4cf[_0x065e('0x31')];if(!_0x553852[_0x065e('0x2d')][_0x065e('0x34')](_0x065e('0x35'))){_0x33e275['limit']=qs[_0x065e('0x36')](_0x553852[_0x065e('0x2d')][_0x065e('0x36')]);_0x33e275[_0x065e('0x1e')]=qs[_0x065e('0x1e')](_0x553852[_0x065e('0x2d')][_0x065e('0x1e')]);}_0x33e275[_0x065e('0x37')]=qs[_0x065e('0x38')](_0x553852['query'][_0x065e('0x38')]);_0x33e275[_0x065e('0x39')]=qs[_0x065e('0x2f')](_['pick'](_0x553852[_0x065e('0x2d')],_0x1bb4cf[_0x065e('0x2f')]));if(_0x553852[_0x065e('0x2d')][_0x065e('0x3a')]){_0x33e275[_0x065e('0x39')]=_[_0x065e('0x3b')](_0x33e275[_0x065e('0x39')],{'$or':_['map'](_0x546b29,function(_0x8278e){if(_0x8278e[_0x065e('0x3c')]!==_0x065e('0x3d')){var _0x52ad71={};_0x52ad71[_0x8278e[_0x065e('0x27')]]={'$like':'%'+_0x553852['query']['filter']+'%'};return _0x52ad71;}})});}_0x33e275=_[_0x065e('0x3b')]({},_0x33e275,_0x553852[_0x065e('0x3e')]);var _0x126ff0={'where':_0x33e275['where']};return db[_0x065e('0x2a')][_0x065e('0x1d')](_0x126ff0)[_0x065e('0x24')](function(_0x4de6fd){_0x3d74a9[_0x065e('0x1d')]=_0x4de6fd;if(_0x553852[_0x065e('0x2d')][_0x065e('0x3f')]){_0x33e275[_0x065e('0x40')]=[{'all':!![]}];}return db[_0x065e('0x2a')]['findAll'](_0x33e275);})[_0x065e('0x24')](function(_0x7f46eb){_0x3d74a9[_0x065e('0x41')]=_0x7f46eb;return _0x3d74a9;})['then'](respondWithFilteredResult(_0x307e23,_0x33e275))[_0x065e('0x42')](handleError(_0x307e23,null));};exports[_0x065e('0x43')]=function(_0x437ecb,_0x39c8ec){var _0x7bab34={'raw':!![],'where':{'id':_0x437ecb[_0x065e('0x44')]['id']}},_0x4a455e={};_0x4a455e[_0x065e('0x31')]=_[_0x065e('0x2e')](db[_0x065e('0x2a')][_0x065e('0x2b')]);_0x4a455e[_0x065e('0x2d')]=_[_0x065e('0x2e')](_0x437ecb[_0x065e('0x2d')]);_0x4a455e[_0x065e('0x2f')]=_[_0x065e('0x30')](_0x4a455e[_0x065e('0x31')],_0x4a455e['query']);_0x7bab34[_0x065e('0x32')]=_[_0x065e('0x30')](_0x4a455e[_0x065e('0x31')],qs[_0x065e('0x33')](_0x437ecb[_0x065e('0x2d')][_0x065e('0x33')]));_0x7bab34[_0x065e('0x32')]=_0x7bab34[_0x065e('0x32')][_0x065e('0x45')]?_0x7bab34[_0x065e('0x32')]:_0x4a455e[_0x065e('0x31')];if(_0x437ecb['query']['includeAll']){_0x7bab34[_0x065e('0x40')]=[{'all':!![]}];}_0x7bab34=_['merge']({},_0x7bab34,_0x437ecb[_0x065e('0x3e')]);return db['FreshdeskField'][_0x065e('0x46')](_0x7bab34)['then'](handleEntityNotFound(_0x39c8ec,null))[_0x065e('0x24')](respondWithResult(_0x39c8ec,null))[_0x065e('0x42')](handleError(_0x39c8ec,null));};exports[_0x065e('0x47')]=function(_0x555e5d,_0x2c87a2){return db[_0x065e('0x2a')][_0x065e('0x47')](_0x555e5d[_0x065e('0x48')],{})[_0x065e('0x24')](respondWithResult(_0x2c87a2,0xc9))[_0x065e('0x42')](handleError(_0x2c87a2,null));};exports['update']=function(_0x2479af,_0x39a5be){if(_0x2479af[_0x065e('0x48')]['id']){delete _0x2479af[_0x065e('0x48')]['id'];}return db[_0x065e('0x2a')][_0x065e('0x46')]({'where':{'id':_0x2479af[_0x065e('0x44')]['id']}})[_0x065e('0x24')](handleEntityNotFound(_0x39a5be,null))[_0x065e('0x24')](saveUpdates(_0x2479af[_0x065e('0x48')],null))[_0x065e('0x24')](respondWithResult(_0x39a5be,null))[_0x065e('0x42')](handleError(_0x39a5be,null));};exports[_0x065e('0x25')]=function(_0x3ba1f7,_0x5e0d7e){return db['FreshdeskField'][_0x065e('0x46')]({'where':{'id':_0x3ba1f7['params']['id']}})[_0x065e('0x24')](handleEntityNotFound(_0x5e0d7e,null))[_0x065e('0x24')](removeEntity(_0x5e0d7e,null))[_0x065e('0x42')](handleError(_0x5e0d7e,null));};
\ No newline at end of file
+var _0xea83=['ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','reject','update','destroy','then','error','stack','name','send','index','map','FreshdeskField','rawAttributes','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','params','find','catch','create','body','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util'];(function(_0x4e0aa1,_0x238e3b){var _0x13d33d=function(_0x4278a8){while(--_0x4278a8){_0x4e0aa1['push'](_0x4e0aa1['shift']());}};_0x13d33d(++_0x238e3b);}(_0xea83,0x114));var _0x3ea8=function(_0x3441e9,_0x269c8a){_0x3441e9=_0x3441e9-0x0;var _0x7f9ada=_0xea83[_0x3441e9];return _0x7f9ada;};'use strict';var pdf=require(_0x3ea8('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x3ea8('0x1'));var zipdir=require(_0x3ea8('0x2'));var jsonpatch=require(_0x3ea8('0x3'));var rp=require(_0x3ea8('0x4'));var moment=require('moment');var BPromise=require(_0x3ea8('0x5'));var Mustache=require(_0x3ea8('0x6'));var util=require(_0x3ea8('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x3ea8('0x8'));var fs=require('fs');var _=require(_0x3ea8('0x9'));var squel=require(_0x3ea8('0xa'));var crypto=require(_0x3ea8('0xb'));var jsforce=require(_0x3ea8('0xc'));var deskjs=require(_0x3ea8('0xd'));var toCsv=require(_0x3ea8('0xe'));var querystring=require(_0x3ea8('0xf'));var Papa=require(_0x3ea8('0x10'));var Redis=require(_0x3ea8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x3ea8('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3ea8('0x13'));var logger=require(_0x3ea8('0x14'))(_0x3ea8('0x15'));var utils=require(_0x3ea8('0x16'));var config=require(_0x3ea8('0x17'));var db=require(_0x3ea8('0x18'))['db'];function respondWithStatusCode(_0x5073f4,_0x4d3174){_0x4d3174=_0x4d3174||0xcc;return function(_0x4cd111){if(_0x4cd111){return _0x5073f4[_0x3ea8('0x19')](_0x4d3174);}return _0x5073f4['status'](_0x4d3174)[_0x3ea8('0x1a')]();};}function respondWithResult(_0x5b1601,_0xdd3f11){_0xdd3f11=_0xdd3f11||0xc8;return function(_0x4a9160){if(_0x4a9160){return _0x5b1601[_0x3ea8('0x1b')](_0xdd3f11)[_0x3ea8('0x1c')](_0x4a9160);}};}function respondWithFilteredResult(_0x5e7ddd,_0x55e5bd){return function(_0x4bcfa8){if(_0x4bcfa8){var _0x3961c7=_0x4bcfa8[_0x3ea8('0x1d')],_0x193460=_0x55e5bd[_0x3ea8('0x1e')],_0x169fa4=_0x55e5bd[_0x3ea8('0x1e')]+_0x55e5bd[_0x3ea8('0x1f')],_0x27b1b7;if(_0x169fa4>=_0x3961c7){_0x169fa4=_0x3961c7;_0x27b1b7=0xc8;}else{_0x27b1b7=0xce;}_0x5e7ddd['status'](_0x27b1b7);return _0x5e7ddd['set']('Content-Range',_0x193460+'-'+_0x169fa4+'/'+_0x3961c7)['json'](_0x4bcfa8);}return null;};}function patchUpdates(_0x867831){return function(_0x2906f5){try{jsonpatch['apply'](_0x2906f5,_0x867831,!![]);}catch(_0x150784){return BPromise[_0x3ea8('0x20')](_0x150784);}return _0x2906f5['save']();};}function saveUpdates(_0x503978,_0x467093){return function(_0x202370){if(_0x202370){return _0x202370[_0x3ea8('0x21')](_0x503978)['then'](function(_0x38915a){return _0x38915a;});}return null;};}function removeEntity(_0x121fff,_0x206d53){return function(_0xec5c34){if(_0xec5c34){return _0xec5c34[_0x3ea8('0x22')]()[_0x3ea8('0x23')](function(){_0x121fff[_0x3ea8('0x1b')](0xcc)[_0x3ea8('0x1a')]();});}};}function handleEntityNotFound(_0x4775df,_0x52708e){return function(_0x1fda39){if(!_0x1fda39){_0x4775df[_0x3ea8('0x19')](0x194);}return _0x1fda39;};}function handleError(_0x1c6325,_0x996f62){_0x996f62=_0x996f62||0x1f4;return function(_0x19ffb9){logger[_0x3ea8('0x24')](_0x19ffb9[_0x3ea8('0x25')]);if(_0x19ffb9[_0x3ea8('0x26')]){delete _0x19ffb9[_0x3ea8('0x26')];}_0x1c6325[_0x3ea8('0x1b')](_0x996f62)[_0x3ea8('0x27')](_0x19ffb9);};}exports[_0x3ea8('0x28')]=function(_0x458499,_0x35dbca){var _0x191973={},_0x4291f1={},_0x55f7c8={'count':0x0,'rows':[]};var _0x54b195=_[_0x3ea8('0x29')](db[_0x3ea8('0x2a')][_0x3ea8('0x2b')],function(_0x206f1a){return{'name':_0x206f1a['fieldName'],'type':_0x206f1a[_0x3ea8('0x2c')][_0x3ea8('0x2d')]};});_0x4291f1[_0x3ea8('0x2e')]=_[_0x3ea8('0x29')](_0x54b195,_0x3ea8('0x26'));_0x4291f1['query']=_['keys'](_0x458499[_0x3ea8('0x2f')]);_0x4291f1[_0x3ea8('0x30')]=_[_0x3ea8('0x31')](_0x4291f1['model'],_0x4291f1[_0x3ea8('0x2f')]);_0x191973[_0x3ea8('0x32')]=_[_0x3ea8('0x31')](_0x4291f1['model'],qs[_0x3ea8('0x33')](_0x458499['query'][_0x3ea8('0x33')]));_0x191973[_0x3ea8('0x32')]=_0x191973[_0x3ea8('0x32')][_0x3ea8('0x34')]?_0x191973[_0x3ea8('0x32')]:_0x4291f1[_0x3ea8('0x2e')];if(!_0x458499[_0x3ea8('0x2f')][_0x3ea8('0x35')](_0x3ea8('0x36'))){_0x191973[_0x3ea8('0x1f')]=qs[_0x3ea8('0x1f')](_0x458499['query'][_0x3ea8('0x1f')]);_0x191973['offset']=qs['offset'](_0x458499['query']['offset']);}_0x191973[_0x3ea8('0x37')]=qs[_0x3ea8('0x38')](_0x458499[_0x3ea8('0x2f')]['sort']);_0x191973[_0x3ea8('0x39')]=qs[_0x3ea8('0x30')](_[_0x3ea8('0x3a')](_0x458499[_0x3ea8('0x2f')],_0x4291f1[_0x3ea8('0x30')]));if(_0x458499[_0x3ea8('0x2f')][_0x3ea8('0x3b')]){_0x191973[_0x3ea8('0x39')]=_[_0x3ea8('0x3c')](_0x191973[_0x3ea8('0x39')],{'$or':_[_0x3ea8('0x29')](_0x54b195,function(_0x14a491){if(_0x14a491['type']!=='VIRTUAL'){var _0x53f8ba={};_0x53f8ba[_0x14a491['name']]={'$like':'%'+_0x458499['query'][_0x3ea8('0x3b')]+'%'};return _0x53f8ba;}})});}_0x191973=_[_0x3ea8('0x3c')]({},_0x191973,_0x458499[_0x3ea8('0x3d')]);var _0x295b80={'where':_0x191973[_0x3ea8('0x39')]};return db['FreshdeskField']['count'](_0x295b80)['then'](function(_0x4f8943){_0x55f7c8[_0x3ea8('0x1d')]=_0x4f8943;if(_0x458499['query'][_0x3ea8('0x3e')]){_0x191973[_0x3ea8('0x3f')]=[{'all':!![]}];}return db[_0x3ea8('0x2a')][_0x3ea8('0x40')](_0x191973);})[_0x3ea8('0x23')](function(_0xeed598){_0x55f7c8[_0x3ea8('0x41')]=_0xeed598;return _0x55f7c8;})[_0x3ea8('0x23')](respondWithFilteredResult(_0x35dbca,_0x191973))['catch'](handleError(_0x35dbca,null));};exports['show']=function(_0xd02d3,_0xcba046){var _0x1c2fb6={'raw':!![],'where':{'id':_0xd02d3[_0x3ea8('0x42')]['id']}},_0x108eda={};_0x108eda[_0x3ea8('0x2e')]=_['keys'](db[_0x3ea8('0x2a')][_0x3ea8('0x2b')]);_0x108eda[_0x3ea8('0x2f')]=_['keys'](_0xd02d3[_0x3ea8('0x2f')]);_0x108eda[_0x3ea8('0x30')]=_[_0x3ea8('0x31')](_0x108eda[_0x3ea8('0x2e')],_0x108eda['query']);_0x1c2fb6[_0x3ea8('0x32')]=_[_0x3ea8('0x31')](_0x108eda[_0x3ea8('0x2e')],qs[_0x3ea8('0x33')](_0xd02d3[_0x3ea8('0x2f')][_0x3ea8('0x33')]));_0x1c2fb6[_0x3ea8('0x32')]=_0x1c2fb6['attributes'][_0x3ea8('0x34')]?_0x1c2fb6[_0x3ea8('0x32')]:_0x108eda['model'];if(_0xd02d3[_0x3ea8('0x2f')][_0x3ea8('0x3e')]){_0x1c2fb6[_0x3ea8('0x3f')]=[{'all':!![]}];}_0x1c2fb6=_[_0x3ea8('0x3c')]({},_0x1c2fb6,_0xd02d3[_0x3ea8('0x3d')]);return db['FreshdeskField'][_0x3ea8('0x43')](_0x1c2fb6)['then'](handleEntityNotFound(_0xcba046,null))[_0x3ea8('0x23')](respondWithResult(_0xcba046,null))[_0x3ea8('0x44')](handleError(_0xcba046,null));};exports[_0x3ea8('0x45')]=function(_0x3011d1,_0x4aa770){return db[_0x3ea8('0x2a')][_0x3ea8('0x45')](_0x3011d1[_0x3ea8('0x46')],{})[_0x3ea8('0x23')](respondWithResult(_0x4aa770,0xc9))[_0x3ea8('0x44')](handleError(_0x4aa770,null));};exports['update']=function(_0x36ae37,_0x2554d5){if(_0x36ae37['body']['id']){delete _0x36ae37['body']['id'];}return db[_0x3ea8('0x2a')][_0x3ea8('0x43')]({'where':{'id':_0x36ae37[_0x3ea8('0x42')]['id']}})[_0x3ea8('0x23')](handleEntityNotFound(_0x2554d5,null))[_0x3ea8('0x23')](saveUpdates(_0x36ae37[_0x3ea8('0x46')],null))[_0x3ea8('0x23')](respondWithResult(_0x2554d5,null))[_0x3ea8('0x44')](handleError(_0x2554d5,null));};exports[_0x3ea8('0x22')]=function(_0x471a7b,_0x5364eb){return db[_0x3ea8('0x2a')][_0x3ea8('0x43')]({'where':{'id':_0x471a7b['params']['id']}})['then'](handleEntityNotFound(_0x5364eb,null))[_0x3ea8('0x23')](removeEntity(_0x5364eb,null))[_0x3ea8('0x44')](handleError(_0x5364eb,null));};
\ No newline at end of file
diff --git a/server/api/intFreshdeskField/intFreshdeskField.model.js b/server/api/intFreshdeskField/intFreshdeskField.model.js
index 41c7986..361981b 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 _0x947a=['path','rimraf','../../config/environment','./intFreshdeskField.attributes','exports','define','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField','FieldId','lodash','api','moment','bluebird','request-promise'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0x947a,0xdb));var _0xa947=function(_0x25d5e9,_0x340fda){_0x25d5e9=_0x25d5e9-0x0;var _0xa351e2=_0x947a[_0x25d5e9];return _0xa351e2;};'use strict';var _=require(_0xa947('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa947('0x1'));var moment=require(_0xa947('0x2'));var BPromise=require(_0xa947('0x3'));var rp=require(_0xa947('0x4'));var fs=require('fs');var path=require(_0xa947('0x5'));var rimraf=require(_0xa947('0x6'));var config=require(_0xa947('0x7'));var attributes=require(_0xa947('0x8'));module[_0xa947('0x9')]=function(_0x2a7629,_0x37cd22){return _0x2a7629[_0xa947('0xa')](_0xa947('0xb'),attributes,{'tableName':_0xa947('0xc'),'paranoid':![],'indexes':[{'name':_0xa947('0xd'),'fields':[_0xa947('0xe'),_0xa947('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xba21=['path','../../config/environment','./intFreshdeskField.attributes','exports','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField','FieldId','lodash','../../config/logger','api','moment'];(function(_0x1d34ef,_0x2a6865){var _0x19b5ac=function(_0x2e3a94){while(--_0x2e3a94){_0x1d34ef['push'](_0x1d34ef['shift']());}};_0x19b5ac(++_0x2a6865);}(_0xba21,0x14e));var _0x1ba2=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0xba21[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require(_0x1ba2('0x0'));var util=require('util');var logger=require(_0x1ba2('0x1'))(_0x1ba2('0x2'));var moment=require(_0x1ba2('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x1ba2('0x4'));var rimraf=require('rimraf');var config=require(_0x1ba2('0x5'));var attributes=require(_0x1ba2('0x6'));module[_0x1ba2('0x7')]=function(_0xd64fee,_0x1b1f6f){return _0xd64fee['define'](_0x1ba2('0x8'),attributes,{'tableName':_0x1ba2('0x9'),'paranoid':![],'indexes':[{'name':_0x1ba2('0xa'),'fields':[_0x1ba2('0xb'),_0x1ba2('0xc')],'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 b406357..4c9c102 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 _0xb10b=['stringify','error','message','result','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','FreshdeskField,\x20%s,\x20%s','FreshdeskField,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x144d27,_0xe11f85){var _0x283df2=function(_0x2df315){while(--_0x2df315){_0x144d27['push'](_0x144d27['shift']());}};_0x283df2(++_0xe11f85);}(_0xb10b,0x12a));var _0xbb10=function(_0x126f47,_0x2199e9){_0x126f47=_0x126f47-0x0;var _0x49508a=_0xb10b[_0x126f47];return _0x49508a;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}
\ No newline at end of file
+var _0xb10b=['stringify','error','message','result','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','FreshdeskField,\x20%s,\x20%s','FreshdeskField,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x501b78,_0x5b7380){var _0x15c0fa=function(_0x2c53c7){while(--_0x2c53c7){_0x501b78['push'](_0x501b78['shift']());}};_0x15c0fa(++_0x5b7380);}(_0xb10b,0x12a));var _0xbb10=function(_0x5ea326,_0x3d52fa){_0x5ea326=_0x5ea326-0x0;var _0x48cf87=_0xb10b[_0x5ea326];return _0x48cf87;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}
\ No newline at end of file
diff --git a/server/api/intFreshsalesAccount/index.js b/server/api/intFreshsalesAccount/index.js
index 7ee7c60..5df4fe2 100644
--- a/server/api/intFreshsalesAccount/index.js
+++ b/server/api/intFreshsalesAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb6ce=['index','/:id','isAuthenticated','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','addConfiguration','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshsalesAccount.controller','get'];(function(_0xae1364,_0x44863f){var _0x55104f=function(_0x83d4f1){while(--_0x83d4f1){_0xae1364['push'](_0xae1364['shift']());}};_0x55104f(++_0x44863f);}(_0xb6ce,0x13a));var _0xeb6c=function(_0x38ced4,_0x24263f){_0x38ced4=_0x38ced4-0x0;var _0x547c07=_0xb6ce[_0x38ced4];return _0x547c07;};'use strict';var multer=require(_0xeb6c('0x0'));var util=require(_0xeb6c('0x1'));var path=require(_0xeb6c('0x2'));var timeout=require(_0xeb6c('0x3'));var express=require(_0xeb6c('0x4'));var router=express[_0xeb6c('0x5')]();var auth=require(_0xeb6c('0x6'));var interaction=require(_0xeb6c('0x7'));var config=require(_0xeb6c('0x8'));var controller=require(_0xeb6c('0x9'));router[_0xeb6c('0xa')]('/',auth['isAuthenticated'](),controller[_0xeb6c('0xb')]);router[_0xeb6c('0xa')](_0xeb6c('0xc'),auth[_0xeb6c('0xd')](),controller[_0xeb6c('0xe')]);router[_0xeb6c('0xa')](_0xeb6c('0xf'),auth[_0xeb6c('0xd')](),controller[_0xeb6c('0x10')]);router[_0xeb6c('0xa')](_0xeb6c('0x11'),auth[_0xeb6c('0xd')](),controller[_0xeb6c('0x12')]);router[_0xeb6c('0x13')]('/',auth[_0xeb6c('0xd')](),controller['create']);router['post'](_0xeb6c('0xf'),auth[_0xeb6c('0xd')](),controller[_0xeb6c('0x14')]);router[_0xeb6c('0x15')](_0xeb6c('0xc'),auth[_0xeb6c('0xd')](),controller[_0xeb6c('0x16')]);router[_0xeb6c('0x17')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xeb6c('0x18')]=router;
\ No newline at end of file
+var _0x2e51=['show','/:id/configurations','getConfigurations','getFields','create','post','addConfiguration','put','/:id','update','delete','destroy','multer','path','connect-timeout','Router','../../components/interaction/service','../../config/environment','./intFreshsalesAccount.controller','get','isAuthenticated','index'];(function(_0x4a6e77,_0x4a677c){var _0x1c137e=function(_0x3ecd59){while(--_0x3ecd59){_0x4a6e77['push'](_0x4a6e77['shift']());}};_0x1c137e(++_0x4a677c);}(_0x2e51,0xa6));var _0x12e5=function(_0xda464c,_0x26e47d){_0xda464c=_0xda464c-0x0;var _0x19e222=_0x2e51[_0xda464c];return _0x19e222;};'use strict';var multer=require(_0x12e5('0x0'));var util=require('util');var path=require(_0x12e5('0x1'));var timeout=require(_0x12e5('0x2'));var express=require('express');var router=express[_0x12e5('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x12e5('0x4'));var config=require(_0x12e5('0x5'));var controller=require(_0x12e5('0x6'));router[_0x12e5('0x7')]('/',auth[_0x12e5('0x8')](),controller[_0x12e5('0x9')]);router[_0x12e5('0x7')]('/:id',auth[_0x12e5('0x8')](),controller[_0x12e5('0xa')]);router[_0x12e5('0x7')](_0x12e5('0xb'),auth[_0x12e5('0x8')](),controller[_0x12e5('0xc')]);router[_0x12e5('0x7')]('/:id/fields',auth['isAuthenticated'](),controller[_0x12e5('0xd')]);router['post']('/',auth[_0x12e5('0x8')](),controller[_0x12e5('0xe')]);router[_0x12e5('0xf')]('/:id/configurations',auth[_0x12e5('0x8')](),controller[_0x12e5('0x10')]);router[_0x12e5('0x11')](_0x12e5('0x12'),auth[_0x12e5('0x8')](),controller[_0x12e5('0x13')]);router[_0x12e5('0x14')](_0x12e5('0x12'),auth[_0x12e5('0x8')](),controller[_0x12e5('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js
index 3e81515..de3fd25 100644
--- a/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js
+++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e63=['remoteUri','sequelize','exports','STRING','username'];(function(_0x28b90f,_0x3fe158){var _0x3aa6b1=function(_0x13d890){while(--_0x13d890){_0x28b90f['push'](_0x28b90f['shift']());}};_0x3aa6b1(++_0x3fe158);}(_0x9e63,0x65));var _0x39e6=function(_0x1ddedd,_0x485606){_0x1ddedd=_0x1ddedd-0x0;var _0xa3e1ac=_0x9e63[_0x1ddedd];return _0xa3e1ac;};'use strict';var Sequelize=require(_0x39e6('0x0'));module[_0x39e6('0x1')]={'name':{'type':Sequelize[_0x39e6('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x39e6('0x2')],'unique':_0x39e6('0x3')},'apiKey':{'type':Sequelize[_0x39e6('0x2')]},'remoteUri':{'type':Sequelize[_0x39e6('0x2')],'unique':_0x39e6('0x4')},'serverUrl':{'type':Sequelize[_0x39e6('0x2')]}};
\ No newline at end of file
+var _0x41d0=['exports','STRING','username','remoteUri','sequelize'];(function(_0x3d42d8,_0x4cffaa){var _0x27fc41=function(_0x3a363b){while(--_0x3a363b){_0x3d42d8['push'](_0x3d42d8['shift']());}};_0x27fc41(++_0x4cffaa);}(_0x41d0,0x1c6));var _0x041d=function(_0x37a9d7,_0x2b6fde){_0x37a9d7=_0x37a9d7-0x0;var _0x1343d3=_0x41d0[_0x37a9d7];return _0x1343d3;};'use strict';var Sequelize=require(_0x041d('0x0'));module[_0x041d('0x1')]={'name':{'type':Sequelize[_0x041d('0x2')]},'description':{'type':Sequelize[_0x041d('0x2')]},'username':{'type':Sequelize['STRING'],'unique':_0x041d('0x3')},'apiKey':{'type':Sequelize[_0x041d('0x2')]},'remoteUri':{'type':Sequelize[_0x041d('0x2')],'unique':_0x041d('0x4')},'serverUrl':{'type':Sequelize[_0x041d('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js
index eda75aa..ce408d2 100644
--- a/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js
+++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x82b7=['getFields,\x20%s,\x20%s,\x20%s','send','Wrong\x20credentials','statusCode','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','sox','ejs','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','FreshsalesAccount,\x20%s,\x20%s','debug','FreshsalesAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','update','then','stack','name','index','map','FreshsalesAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','intersection','catch','create','body','find','FreshsalesConfiguration','where','getConfigurations','addConfiguration','findOne','AccountId','channel','FreshsalesField','Subjects','Descriptions','getFields','username','remoteUri','apiKey','substring','lastIndexOf','GET','format','%s%s','/api/selector/owners','Token\x20token=','users','email','Requested\x20Resource\x20not\x20Found'];(function(_0x264781,_0x27bf68){var _0x382f5a=function(_0x5628a9){while(--_0x5628a9){_0x264781['push'](_0x264781['shift']());}};_0x382f5a(++_0x27bf68);}(_0x82b7,0xec));var _0x782b=function(_0x185545,_0x3b53bf){_0x185545=_0x185545-0x0;var _0x4591b6=_0x82b7[_0x185545];return _0x4591b6;};'use strict';var pdf=require(_0x782b('0x0'));var emlformat=require(_0x782b('0x1'));var rimraf=require(_0x782b('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x782b('0x3'));var rp=require(_0x782b('0x4'));var moment=require(_0x782b('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x782b('0x6'));var util=require(_0x782b('0x7'));var path=require('path');var sox=require(_0x782b('0x8'));var csv=require('to-csv');var ejs=require(_0x782b('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x782b('0xa'));var jsforce=require(_0x782b('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x782b('0xc'));var Papa=require(_0x782b('0xd'));var Redis=require(_0x782b('0xe'));var authService=require(_0x782b('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x782b('0x10'));var logger=require(_0x782b('0x11'))(_0x782b('0x12'));var utils=require(_0x782b('0x13'));var config=require(_0x782b('0x14'));var db=require(_0x782b('0x15'))['db'];var integrations=require(_0x782b('0x16'));var jayson=require(_0x782b('0x17'));var client=jayson['client'][_0x782b('0x18')]({'port':0x232a});function checkPasswordPattern(_0x491df3,_0x56a277,_0x6becb2){if(_0x6becb2){var _0x12e9a4=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x12e9a4[_0x782b('0x19')](_0x56a277)){return _0x491df3;}else{throw new db[(_0x782b('0x1a'))][(_0x782b('0x1b'))](_0x782b('0x1c'));}}else{return _0x491df3;}}function respondWithRpcPromise(_0x58bd0d,_0x4a28b0,_0x165318,_0x388bd9){return new BPromise(function(_0x1c31fe,_0x2b05a8){var _0x577be4=_0x388bd9||client;return _0x577be4[_0x782b('0x1d')](_0x58bd0d,_0x165318)['then'](function(_0x3c3fb4){logger['info'](_0x782b('0x1e'),_0x4a28b0,'request\x20sent');logger[_0x782b('0x1f')](_0x782b('0x20'),_0x4a28b0,_0x782b('0x21'),JSON[_0x782b('0x22')](_0x3c3fb4));if(_0x3c3fb4[_0x782b('0x23')]){if(_0x3c3fb4[_0x782b('0x23')][_0x782b('0x24')]===0x1f4){logger[_0x782b('0x23')](_0x782b('0x1e'),_0x4a28b0,_0x3c3fb4[_0x782b('0x23')][_0x782b('0x25')]);return _0x2b05a8(_0x3c3fb4[_0x782b('0x23')]['message']);}logger['error'](_0x782b('0x1e'),_0x4a28b0,_0x3c3fb4[_0x782b('0x23')][_0x782b('0x25')]);return _0x1c31fe(_0x3c3fb4[_0x782b('0x23')][_0x782b('0x25')]);}else{logger[_0x782b('0x26')](_0x782b('0x1e'),_0x4a28b0,_0x782b('0x21'));_0x1c31fe(_0x3c3fb4[_0x782b('0x27')][_0x782b('0x25')]);}})['catch'](function(_0x40487c){logger['error'](_0x782b('0x1e'),_0x4a28b0,_0x40487c);_0x2b05a8(_0x40487c);});});}function respondWithStatusCode(_0xdb6e1e,_0x5902df){_0x5902df=_0x5902df||0xcc;return function(_0x47c84e){if(_0x47c84e){return _0xdb6e1e[_0x782b('0x28')](_0x5902df);}return _0xdb6e1e[_0x782b('0x29')](_0x5902df)['end']();};}function respondWithResult(_0x455815,_0x1617f8){_0x1617f8=_0x1617f8||0xc8;return function(_0x593a2c){if(_0x593a2c){return _0x455815[_0x782b('0x29')](_0x1617f8)[_0x782b('0x2a')](_0x593a2c);}};}function respondWithFilteredResult(_0x58f5a8,_0x36ff36){return function(_0x21a967){if(_0x21a967){var _0x5defac=_0x21a967[_0x782b('0x2b')],_0x556f8=_0x36ff36[_0x782b('0x2c')],_0x472fe1=_0x36ff36[_0x782b('0x2c')]+_0x36ff36[_0x782b('0x2d')],_0x504ed3;if(_0x472fe1>=_0x5defac){_0x472fe1=_0x5defac;_0x504ed3=0xc8;}else{_0x504ed3=0xce;}_0x58f5a8[_0x782b('0x29')](_0x504ed3);return _0x58f5a8[_0x782b('0x2e')](_0x782b('0x2f'),_0x556f8+'-'+_0x472fe1+'/'+_0x5defac)['json'](_0x21a967);}return null;};}function patchUpdates(_0x6b8704){return function(_0x4f3d36){try{jsonpatch[_0x782b('0x30')](_0x4f3d36,_0x6b8704,!![]);}catch(_0x5dbf9a){return BPromise[_0x782b('0x31')](_0x5dbf9a);}return _0x4f3d36['save']();};}function saveUpdates(_0x3f1598,_0xad068d){return function(_0x5f3f54){if(_0x5f3f54){return _0x5f3f54[_0x782b('0x32')](_0x3f1598)['then'](function(_0x3d9cf7){return _0x3d9cf7;});}return null;};}function removeEntity(_0x3edd04,_0x49fe5d){return function(_0x149854){if(_0x149854){return _0x149854['destroy']()[_0x782b('0x33')](function(){_0x3edd04[_0x782b('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x303c2e,_0x1914d0){return function(_0x181865){if(!_0x181865){_0x303c2e[_0x782b('0x28')](0x194);}return _0x181865;};}function handleError(_0x8fa739,_0x15d7b4){_0x15d7b4=_0x15d7b4||0x1f4;return function(_0x5e5cc5){logger[_0x782b('0x23')](_0x5e5cc5[_0x782b('0x34')]);if(_0x5e5cc5[_0x782b('0x35')]){delete _0x5e5cc5[_0x782b('0x35')];}_0x8fa739[_0x782b('0x29')](_0x15d7b4)['send'](_0x5e5cc5);};}exports[_0x782b('0x36')]=function(_0x2eb6c6,_0x5f1499){var _0x3459eb={},_0x3385c3={},_0x3ba98e={'count':0x0,'rows':[]};var _0x3c6951=_[_0x782b('0x37')](db[_0x782b('0x38')][_0x782b('0x39')],function(_0x3c9c55){return{'name':_0x3c9c55[_0x782b('0x3a')],'type':_0x3c9c55[_0x782b('0x3b')][_0x782b('0x3c')]};});_0x3385c3[_0x782b('0x3d')]=_['map'](_0x3c6951,'name');_0x3385c3[_0x782b('0x3e')]=_[_0x782b('0x3f')](_0x2eb6c6[_0x782b('0x3e')]);_0x3385c3[_0x782b('0x40')]=_['intersection'](_0x3385c3[_0x782b('0x3d')],_0x3385c3[_0x782b('0x3e')]);_0x3459eb[_0x782b('0x41')]=_['intersection'](_0x3385c3[_0x782b('0x3d')],qs[_0x782b('0x42')](_0x2eb6c6[_0x782b('0x3e')]['fields']));_0x3459eb[_0x782b('0x41')]=_0x3459eb['attributes'][_0x782b('0x43')]?_0x3459eb[_0x782b('0x41')]:_0x3385c3[_0x782b('0x3d')];if(!_0x2eb6c6[_0x782b('0x3e')][_0x782b('0x44')](_0x782b('0x45'))){_0x3459eb[_0x782b('0x2d')]=qs[_0x782b('0x2d')](_0x2eb6c6['query'][_0x782b('0x2d')]);_0x3459eb['offset']=qs[_0x782b('0x2c')](_0x2eb6c6['query']['offset']);}_0x3459eb[_0x782b('0x46')]=qs[_0x782b('0x47')](_0x2eb6c6[_0x782b('0x3e')]['sort']);_0x3459eb['where']=qs[_0x782b('0x40')](_[_0x782b('0x48')](_0x2eb6c6[_0x782b('0x3e')],_0x3385c3[_0x782b('0x40')]));if(_0x2eb6c6[_0x782b('0x3e')][_0x782b('0x49')]){_0x3459eb['where']=_[_0x782b('0x4a')](_0x3459eb['where'],{'$or':_[_0x782b('0x37')](_0x3c6951,function(_0x2b89fc){if(_0x2b89fc[_0x782b('0x3b')]!==_0x782b('0x4b')){var _0x4aa5d9={};_0x4aa5d9[_0x2b89fc[_0x782b('0x35')]]={'$like':'%'+_0x2eb6c6[_0x782b('0x3e')]['filter']+'%'};return _0x4aa5d9;}})});}_0x3459eb=_[_0x782b('0x4a')]({},_0x3459eb,_0x2eb6c6[_0x782b('0x4c')]);var _0x361631={'where':_0x3459eb['where']};return db['FreshsalesAccount'][_0x782b('0x2b')](_0x361631)[_0x782b('0x33')](function(_0x266bac){_0x3ba98e[_0x782b('0x2b')]=_0x266bac;if(_0x2eb6c6[_0x782b('0x3e')][_0x782b('0x4d')]){_0x3459eb[_0x782b('0x4e')]=[{'all':!![]}];}return db[_0x782b('0x38')][_0x782b('0x4f')](_0x3459eb);})[_0x782b('0x33')](function(_0x5ec018){_0x3ba98e[_0x782b('0x50')]=_0x5ec018;return _0x3ba98e;})[_0x782b('0x33')](respondWithFilteredResult(_0x5f1499,_0x3459eb))['catch'](handleError(_0x5f1499,null));};exports[_0x782b('0x51')]=function(_0xac09ec,_0x42c69d){var _0x3e439a={'raw':![],'where':{'id':_0xac09ec[_0x782b('0x52')]['id']}},_0x3f4476={};_0x3f4476[_0x782b('0x3d')]=_[_0x782b('0x3f')](db[_0x782b('0x38')][_0x782b('0x39')]);_0x3f4476[_0x782b('0x3e')]=_[_0x782b('0x3f')](_0xac09ec[_0x782b('0x3e')]);_0x3f4476['filters']=_[_0x782b('0x53')](_0x3f4476[_0x782b('0x3d')],_0x3f4476[_0x782b('0x3e')]);_0x3e439a[_0x782b('0x41')]=_[_0x782b('0x53')](_0x3f4476[_0x782b('0x3d')],qs['fields'](_0xac09ec[_0x782b('0x3e')]['fields']));_0x3e439a[_0x782b('0x41')]=_0x3e439a[_0x782b('0x41')]['length']?_0x3e439a[_0x782b('0x41')]:_0x3f4476[_0x782b('0x3d')];if(_0xac09ec['query'][_0x782b('0x4d')]){_0x3e439a[_0x782b('0x4e')]=[{'all':!![]}];}_0x3e439a=_[_0x782b('0x4a')]({},_0x3e439a,_0xac09ec[_0x782b('0x4c')]);return db[_0x782b('0x38')]['find'](_0x3e439a)[_0x782b('0x33')](handleEntityNotFound(_0x42c69d,null))[_0x782b('0x33')](respondWithResult(_0x42c69d,null))[_0x782b('0x54')](handleError(_0x42c69d,null));};exports[_0x782b('0x55')]=function(_0x4cb6a5,_0x23f055){return db[_0x782b('0x38')][_0x782b('0x55')](_0x4cb6a5[_0x782b('0x56')],{})[_0x782b('0x33')](respondWithResult(_0x23f055,0xc9))['catch'](handleError(_0x23f055,null));};exports[_0x782b('0x32')]=function(_0x17b5fa,_0x955ecd){if(_0x17b5fa[_0x782b('0x56')]['id']){delete _0x17b5fa[_0x782b('0x56')]['id'];}return db[_0x782b('0x38')][_0x782b('0x57')]({'where':{'id':_0x17b5fa['params']['id']}})[_0x782b('0x33')](handleEntityNotFound(_0x955ecd,null))[_0x782b('0x33')](saveUpdates(_0x17b5fa[_0x782b('0x56')],null))[_0x782b('0x33')](respondWithResult(_0x955ecd,null))[_0x782b('0x54')](handleError(_0x955ecd,null));};exports['destroy']=function(_0x3e8132,_0x34e3b5){return db[_0x782b('0x38')][_0x782b('0x57')]({'where':{'id':_0x3e8132[_0x782b('0x52')]['id']}})[_0x782b('0x33')](handleEntityNotFound(_0x34e3b5,null))[_0x782b('0x33')](removeEntity(_0x34e3b5,null))[_0x782b('0x54')](handleError(_0x34e3b5,null));};exports['getConfigurations']=function(_0xcefbbc,_0x59cd32,_0x125ed4){var _0x2fe693={};var _0x2612da={};var _0x48dde2;var _0x5bba4d;return db[_0x782b('0x38')]['findOne']({'where':{'id':_0xcefbbc[_0x782b('0x52')]['id']}})['then'](handleEntityNotFound(_0x59cd32,null))[_0x782b('0x33')](function(_0x212f7f){if(_0x212f7f){_0x48dde2=_0x212f7f;_0x2612da[_0x782b('0x3d')]=_[_0x782b('0x3f')](db[_0x782b('0x58')]['rawAttributes']);_0x2612da[_0x782b('0x3e')]=_[_0x782b('0x3f')](_0xcefbbc[_0x782b('0x3e')]);_0x2612da[_0x782b('0x40')]=_[_0x782b('0x53')](_0x2612da[_0x782b('0x3d')],_0x2612da[_0x782b('0x3e')]);_0x2fe693['attributes']=_['intersection'](_0x2612da[_0x782b('0x3d')],qs[_0x782b('0x42')](_0xcefbbc[_0x782b('0x3e')][_0x782b('0x42')]));_0x2fe693[_0x782b('0x41')]=_0x2fe693[_0x782b('0x41')][_0x782b('0x43')]?_0x2fe693['attributes']:_0x2612da[_0x782b('0x3d')];_0x2fe693[_0x782b('0x46')]=qs[_0x782b('0x47')](_0xcefbbc['query'][_0x782b('0x47')]);_0x2fe693[_0x782b('0x59')]=qs[_0x782b('0x40')](_[_0x782b('0x48')](_0xcefbbc[_0x782b('0x3e')],_0x2612da[_0x782b('0x40')]));if(_0xcefbbc['query'][_0x782b('0x49')]){_0x2fe693[_0x782b('0x59')]=_['merge'](_0x2fe693[_0x782b('0x59')],{'$or':_[_0x782b('0x37')](_0x2fe693[_0x782b('0x41')],function(_0x3a8e8a){var _0x3eeb7f={};_0x3eeb7f[_0x3a8e8a]={'$like':'%'+_0xcefbbc['query'][_0x782b('0x49')]+'%'};return _0x3eeb7f;})});}_0x2fe693=_['merge']({},_0x2fe693,_0xcefbbc[_0x782b('0x4c')]);return _0x48dde2['getConfigurations'](_0x2fe693);}})[_0x782b('0x33')](function(_0xab0483){if(_0xab0483){_0x5bba4d=_0xab0483[_0x782b('0x43')];if(!_0xcefbbc['query']['hasOwnProperty'](_0x782b('0x45'))){_0x2fe693[_0x782b('0x2d')]=qs[_0x782b('0x2d')](_0xcefbbc[_0x782b('0x3e')][_0x782b('0x2d')]);_0x2fe693[_0x782b('0x2c')]=qs['offset'](_0xcefbbc[_0x782b('0x3e')]['offset']);}return _0x48dde2[_0x782b('0x5a')](_0x2fe693);}})[_0x782b('0x33')](function(_0x3c507a){if(_0x3c507a){return _0x3c507a?{'count':_0x5bba4d,'rows':_0x3c507a}:null;}})[_0x782b('0x33')](respondWithResult(_0x59cd32,null))[_0x782b('0x54')](handleError(_0x59cd32,null));};exports[_0x782b('0x5b')]=function(_0x5da8f9,_0x4882bf,_0x35bc41){if(_0x5da8f9[_0x782b('0x56')]['id']){delete _0x5da8f9[_0x782b('0x56')]['id'];}return db[_0x782b('0x38')][_0x782b('0x5c')]({'where':{'id':_0x5da8f9[_0x782b('0x52')]['id']}})['then'](handleEntityNotFound(_0x4882bf,null))[_0x782b('0x33')](function(_0x326f3a){if(_0x326f3a){_0x5da8f9[_0x782b('0x56')][_0x782b('0x5d')]=_0x326f3a['id'];_0x5da8f9[_0x782b('0x56')]['Subjects']=integrations['getSubjects'](_0x5da8f9[_0x782b('0x56')][_0x782b('0x5e')],_0x5da8f9[_0x782b('0x56')][_0x782b('0x3b')]);_0x5da8f9[_0x782b('0x56')]['Descriptions']=integrations['getDescriptions'](_0x5da8f9['body'][_0x782b('0x5e')],_0x5da8f9[_0x782b('0x56')][_0x782b('0x3b')]);return db[_0x782b('0x58')][_0x782b('0x55')](_0x5da8f9[_0x782b('0x56')],{'include':[{'model':db[_0x782b('0x5f')],'as':_0x782b('0x60')},{'model':db[_0x782b('0x5f')],'as':_0x782b('0x61')}]});}return null;})[_0x782b('0x33')](respondWithResult(_0x4882bf,null))[_0x782b('0x54')](handleError(_0x4882bf,null));};exports[_0x782b('0x62')]=function(_0xcf8c31,_0x44d00c,_0x1bced3){var _0x1eb60a='';var _0xa02e8a='';return db[_0x782b('0x38')][_0x782b('0x5c')]({'where':{'id':_0xcf8c31['params']['id']},'attributes':['id',_0x782b('0x63'),_0x782b('0x64'),_0x782b('0x65')]})[_0x782b('0x33')](handleEntityNotFound(_0x44d00c,null))[_0x782b('0x33')](function(_0x4960f6){if(_0x4960f6){_0xa02e8a=_0x4960f6[_0x782b('0x63')];_0x1eb60a=_0x4960f6[_0x782b('0x64')];var _0x28a351=_0x4960f6[_0x782b('0x64')]['slice'](-0x1);if(_0x28a351==='/'){_0x1eb60a=_0x1eb60a[_0x782b('0x66')](0x0,_0x1eb60a[_0x782b('0x67')](_0x28a351));}return rp({'method':_0x782b('0x68'),'uri':util[_0x782b('0x69')](_0x782b('0x6a'),_0x1eb60a,_0x782b('0x6b')),'headers':{'Authorization':_0x782b('0x6c')+_0x4960f6[_0x782b('0x65')]},'json':!![]});}})['then'](function(_0x3e9d82){if(_0x3e9d82){var _0xac395b=_0x3e9d82[_0x782b('0x6d')];var _0x29e2b6=![];var _0xa8c26a=null;for(_0xa8c26a=0x0;_0xa8c26a<_0xac395b[_0x782b('0x43')];_0xa8c26a++){if(_0xac395b[_0xa8c26a][_0x782b('0x6e')]===_0xa02e8a){_0x29e2b6=!![];}}if(_0x29e2b6){return!![];}else{throw new Error({'statusCode':0x194,'message':_0x782b('0x6f')});}}})[_0x782b('0x33')](respondWithResult(_0x44d00c,null))[_0x782b('0x54')](function(_0x3ca116){var _0x3603d2=_0xcf8c31[_0x782b('0x3e')][_0x782b('0x19')]?0x1f4:_0x3ca116['statusCode']||0x1f4;logger['error'](_0x782b('0x70'),'getFields',_0x3603d2,JSON[_0x782b('0x22')](_0x3ca116));delete _0x3ca116[_0x782b('0x35')];if(_0x3603d2===0x191){_0x3603d2=0x190;}_0x44d00c[_0x782b('0x29')](_0x3603d2)[_0x782b('0x71')](_0xcf8c31[_0x782b('0x3e')][_0x782b('0x19')]?{'message':_0x782b('0x72'),'statusCode':_0x3ca116[_0x782b('0x73')]}:_0x3ca116);});};
\ No newline at end of file
+var _0x1a01=['channel','Descriptions','getDescriptions','FreshsalesField','getFields','username','remoteUri','apiKey','slice','lastIndexOf','GET','format','%s%s','/api/selector/owners','Token\x20token=','users','email','Requested\x20Resource\x20not\x20Found','test','Wrong\x20credentials','statusCode','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','http','Sequelize','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','FreshsalesAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','result','sendStatus','end','json','count','offset','limit','status','set','apply','reject','save','name','index','map','FreshsalesAccount','type','key','model','query','filters','intersection','fields','attributes','length','order','sort','where','filter','merge','options','include','findAll','rows','catch','show','rawAttributes','includeAll','find','create','body','update','params','destroy','getConfigurations','keys','FreshsalesConfiguration','nolimit','addConfiguration','findOne','AccountId','Subjects'];(function(_0x445354,_0x1d5878){var _0x569dcf=function(_0x280b70){while(--_0x280b70){_0x445354['push'](_0x445354['shift']());}};_0x569dcf(++_0x1d5878);}(_0x1a01,0x162));var _0x11a0=function(_0x291139,_0x7f30de){_0x291139=_0x291139-0x0;var _0x3c42c0=_0x1a01[_0x291139];return _0x3c42c0;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x11a0('0x0'));var rimraf=require(_0x11a0('0x1'));var zipdir=require(_0x11a0('0x2'));var jsonpatch=require(_0x11a0('0x3'));var rp=require(_0x11a0('0x4'));var moment=require(_0x11a0('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x11a0('0x6'));var path=require(_0x11a0('0x7'));var sox=require('sox');var csv=require(_0x11a0('0x8'));var ejs=require(_0x11a0('0x9'));var fs=require('fs');var _=require(_0x11a0('0xa'));var squel=require(_0x11a0('0xb'));var crypto=require(_0x11a0('0xc'));var jsforce=require(_0x11a0('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x11a0('0x8'));var querystring=require(_0x11a0('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x11a0('0xf'));var qs=require(_0x11a0('0x10'));var as=require(_0x11a0('0x11'));var hardwareService=require(_0x11a0('0x12'));var logger=require(_0x11a0('0x13'))(_0x11a0('0x14'));var utils=require(_0x11a0('0x15'));var config=require(_0x11a0('0x16'));var db=require(_0x11a0('0x17'))['db'];var integrations=require(_0x11a0('0x18'));var jayson=require(_0x11a0('0x19'));var client=jayson['client'][_0x11a0('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x3d4ae2,_0x10dfd9,_0x21a554){if(_0x21a554){var _0x1e0248=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1e0248['test'](_0x10dfd9)){return _0x3d4ae2;}else{throw new db[(_0x11a0('0x1b'))]['ValidationError'](_0x11a0('0x1c'));}}else{return _0x3d4ae2;}}function respondWithRpcPromise(_0x23bba6,_0x18ddb3,_0x547b71,_0x3f8205){return new BPromise(function(_0x2f0bc8,_0x185bf3){var _0x4391bd=_0x3f8205||client;return _0x4391bd[_0x11a0('0x1d')](_0x23bba6,_0x547b71)[_0x11a0('0x1e')](function(_0x27c009){logger[_0x11a0('0x1f')](_0x11a0('0x20'),_0x18ddb3,'request\x20sent');logger[_0x11a0('0x21')]('FreshsalesAccount,\x20%s,\x20%s,\x20%s',_0x18ddb3,_0x11a0('0x22'),JSON[_0x11a0('0x23')](_0x27c009));if(_0x27c009[_0x11a0('0x24')]){if(_0x27c009[_0x11a0('0x24')]['code']===0x1f4){logger[_0x11a0('0x24')](_0x11a0('0x20'),_0x18ddb3,_0x27c009[_0x11a0('0x24')]['message']);return _0x185bf3(_0x27c009['error'][_0x11a0('0x25')]);}logger['error']('FreshsalesAccount,\x20%s,\x20%s',_0x18ddb3,_0x27c009['error'][_0x11a0('0x25')]);return _0x2f0bc8(_0x27c009['error'][_0x11a0('0x25')]);}else{logger[_0x11a0('0x1f')]('FreshsalesAccount,\x20%s,\x20%s',_0x18ddb3,_0x11a0('0x22'));_0x2f0bc8(_0x27c009[_0x11a0('0x26')]['message']);}})['catch'](function(_0xea416e){logger[_0x11a0('0x24')](_0x11a0('0x20'),_0x18ddb3,_0xea416e);_0x185bf3(_0xea416e);});});}function respondWithStatusCode(_0x18ea71,_0x37af22){_0x37af22=_0x37af22||0xcc;return function(_0x36fec4){if(_0x36fec4){return _0x18ea71[_0x11a0('0x27')](_0x37af22);}return _0x18ea71['status'](_0x37af22)[_0x11a0('0x28')]();};}function respondWithResult(_0x2a72a4,_0x3eb90c){_0x3eb90c=_0x3eb90c||0xc8;return function(_0x3ab5d7){if(_0x3ab5d7){return _0x2a72a4['status'](_0x3eb90c)[_0x11a0('0x29')](_0x3ab5d7);}};}function respondWithFilteredResult(_0x2285c6,_0x4d2cab){return function(_0x2b0743){if(_0x2b0743){var _0xbbc113=_0x2b0743[_0x11a0('0x2a')],_0x16450c=_0x4d2cab[_0x11a0('0x2b')],_0x153d7a=_0x4d2cab[_0x11a0('0x2b')]+_0x4d2cab[_0x11a0('0x2c')],_0x635522;if(_0x153d7a>=_0xbbc113){_0x153d7a=_0xbbc113;_0x635522=0xc8;}else{_0x635522=0xce;}_0x2285c6[_0x11a0('0x2d')](_0x635522);return _0x2285c6[_0x11a0('0x2e')]('Content-Range',_0x16450c+'-'+_0x153d7a+'/'+_0xbbc113)[_0x11a0('0x29')](_0x2b0743);}return null;};}function patchUpdates(_0x110f65){return function(_0x28be47){try{jsonpatch[_0x11a0('0x2f')](_0x28be47,_0x110f65,!![]);}catch(_0x4622f4){return BPromise[_0x11a0('0x30')](_0x4622f4);}return _0x28be47[_0x11a0('0x31')]();};}function saveUpdates(_0xfc2241,_0x4de683){return function(_0x2613ca){if(_0x2613ca){return _0x2613ca['update'](_0xfc2241)[_0x11a0('0x1e')](function(_0x351229){return _0x351229;});}return null;};}function removeEntity(_0x225249,_0x3b805c){return function(_0x264558){if(_0x264558){return _0x264558['destroy']()[_0x11a0('0x1e')](function(){_0x225249[_0x11a0('0x2d')](0xcc)[_0x11a0('0x28')]();});}};}function handleEntityNotFound(_0x54bf6d,_0x22eefe){return function(_0x3e2756){if(!_0x3e2756){_0x54bf6d[_0x11a0('0x27')](0x194);}return _0x3e2756;};}function handleError(_0x3fee05,_0x2cbcb3){_0x2cbcb3=_0x2cbcb3||0x1f4;return function(_0xa2435e){logger['error'](_0xa2435e['stack']);if(_0xa2435e[_0x11a0('0x32')]){delete _0xa2435e[_0x11a0('0x32')];}_0x3fee05[_0x11a0('0x2d')](_0x2cbcb3)['send'](_0xa2435e);};}exports[_0x11a0('0x33')]=function(_0x13de8e,_0x458840){var _0x5702a1={},_0x2104ea={},_0x3bb2a8={'count':0x0,'rows':[]};var _0x419915=_[_0x11a0('0x34')](db[_0x11a0('0x35')]['rawAttributes'],function(_0x457369){return{'name':_0x457369['fieldName'],'type':_0x457369[_0x11a0('0x36')][_0x11a0('0x37')]};});_0x2104ea[_0x11a0('0x38')]=_['map'](_0x419915,'name');_0x2104ea[_0x11a0('0x39')]=_['keys'](_0x13de8e[_0x11a0('0x39')]);_0x2104ea[_0x11a0('0x3a')]=_[_0x11a0('0x3b')](_0x2104ea[_0x11a0('0x38')],_0x2104ea[_0x11a0('0x39')]);_0x5702a1['attributes']=_[_0x11a0('0x3b')](_0x2104ea[_0x11a0('0x38')],qs[_0x11a0('0x3c')](_0x13de8e['query'][_0x11a0('0x3c')]));_0x5702a1['attributes']=_0x5702a1[_0x11a0('0x3d')][_0x11a0('0x3e')]?_0x5702a1[_0x11a0('0x3d')]:_0x2104ea[_0x11a0('0x38')];if(!_0x13de8e[_0x11a0('0x39')]['hasOwnProperty']('nolimit')){_0x5702a1['limit']=qs[_0x11a0('0x2c')](_0x13de8e[_0x11a0('0x39')]['limit']);_0x5702a1[_0x11a0('0x2b')]=qs[_0x11a0('0x2b')](_0x13de8e[_0x11a0('0x39')][_0x11a0('0x2b')]);}_0x5702a1[_0x11a0('0x3f')]=qs[_0x11a0('0x40')](_0x13de8e[_0x11a0('0x39')][_0x11a0('0x40')]);_0x5702a1[_0x11a0('0x41')]=qs[_0x11a0('0x3a')](_['pick'](_0x13de8e[_0x11a0('0x39')],_0x2104ea[_0x11a0('0x3a')]));if(_0x13de8e[_0x11a0('0x39')][_0x11a0('0x42')]){_0x5702a1['where']=_[_0x11a0('0x43')](_0x5702a1[_0x11a0('0x41')],{'$or':_[_0x11a0('0x34')](_0x419915,function(_0x4e1fb2){if(_0x4e1fb2[_0x11a0('0x36')]!=='VIRTUAL'){var _0xbe81af={};_0xbe81af[_0x4e1fb2[_0x11a0('0x32')]]={'$like':'%'+_0x13de8e[_0x11a0('0x39')][_0x11a0('0x42')]+'%'};return _0xbe81af;}})});}_0x5702a1=_['merge']({},_0x5702a1,_0x13de8e[_0x11a0('0x44')]);var _0x125017={'where':_0x5702a1[_0x11a0('0x41')]};return db[_0x11a0('0x35')][_0x11a0('0x2a')](_0x125017)[_0x11a0('0x1e')](function(_0x1a34f1){_0x3bb2a8['count']=_0x1a34f1;if(_0x13de8e['query']['includeAll']){_0x5702a1[_0x11a0('0x45')]=[{'all':!![]}];}return db[_0x11a0('0x35')][_0x11a0('0x46')](_0x5702a1);})[_0x11a0('0x1e')](function(_0x2b3d21){_0x3bb2a8[_0x11a0('0x47')]=_0x2b3d21;return _0x3bb2a8;})[_0x11a0('0x1e')](respondWithFilteredResult(_0x458840,_0x5702a1))[_0x11a0('0x48')](handleError(_0x458840,null));};exports[_0x11a0('0x49')]=function(_0x2e24cd,_0x29e00a){var _0x1a8ed3={'raw':![],'where':{'id':_0x2e24cd['params']['id']}},_0x33bec0={};_0x33bec0['model']=_['keys'](db['FreshsalesAccount'][_0x11a0('0x4a')]);_0x33bec0[_0x11a0('0x39')]=_['keys'](_0x2e24cd['query']);_0x33bec0[_0x11a0('0x3a')]=_[_0x11a0('0x3b')](_0x33bec0[_0x11a0('0x38')],_0x33bec0[_0x11a0('0x39')]);_0x1a8ed3[_0x11a0('0x3d')]=_[_0x11a0('0x3b')](_0x33bec0['model'],qs[_0x11a0('0x3c')](_0x2e24cd[_0x11a0('0x39')][_0x11a0('0x3c')]));_0x1a8ed3[_0x11a0('0x3d')]=_0x1a8ed3[_0x11a0('0x3d')][_0x11a0('0x3e')]?_0x1a8ed3[_0x11a0('0x3d')]:_0x33bec0['model'];if(_0x2e24cd[_0x11a0('0x39')][_0x11a0('0x4b')]){_0x1a8ed3[_0x11a0('0x45')]=[{'all':!![]}];}_0x1a8ed3=_[_0x11a0('0x43')]({},_0x1a8ed3,_0x2e24cd[_0x11a0('0x44')]);return db[_0x11a0('0x35')][_0x11a0('0x4c')](_0x1a8ed3)[_0x11a0('0x1e')](handleEntityNotFound(_0x29e00a,null))[_0x11a0('0x1e')](respondWithResult(_0x29e00a,null))[_0x11a0('0x48')](handleError(_0x29e00a,null));};exports['create']=function(_0x44ce8d,_0x4689ad){return db['FreshsalesAccount'][_0x11a0('0x4d')](_0x44ce8d[_0x11a0('0x4e')],{})['then'](respondWithResult(_0x4689ad,0xc9))[_0x11a0('0x48')](handleError(_0x4689ad,null));};exports[_0x11a0('0x4f')]=function(_0x29327f,_0x574652){if(_0x29327f['body']['id']){delete _0x29327f['body']['id'];}return db[_0x11a0('0x35')][_0x11a0('0x4c')]({'where':{'id':_0x29327f[_0x11a0('0x50')]['id']}})[_0x11a0('0x1e')](handleEntityNotFound(_0x574652,null))['then'](saveUpdates(_0x29327f[_0x11a0('0x4e')],null))[_0x11a0('0x1e')](respondWithResult(_0x574652,null))[_0x11a0('0x48')](handleError(_0x574652,null));};exports[_0x11a0('0x51')]=function(_0x2b5d5d,_0x18c12c){return db[_0x11a0('0x35')][_0x11a0('0x4c')]({'where':{'id':_0x2b5d5d[_0x11a0('0x50')]['id']}})[_0x11a0('0x1e')](handleEntityNotFound(_0x18c12c,null))[_0x11a0('0x1e')](removeEntity(_0x18c12c,null))['catch'](handleError(_0x18c12c,null));};exports[_0x11a0('0x52')]=function(_0x2691f1,_0x6b6c9d,_0x34f23e){var _0x185055={};var _0x193d32={};var _0x5999f7;var _0x36625f;return db[_0x11a0('0x35')]['findOne']({'where':{'id':_0x2691f1['params']['id']}})[_0x11a0('0x1e')](handleEntityNotFound(_0x6b6c9d,null))[_0x11a0('0x1e')](function(_0x28477f){if(_0x28477f){_0x5999f7=_0x28477f;_0x193d32[_0x11a0('0x38')]=_[_0x11a0('0x53')](db[_0x11a0('0x54')][_0x11a0('0x4a')]);_0x193d32[_0x11a0('0x39')]=_[_0x11a0('0x53')](_0x2691f1['query']);_0x193d32[_0x11a0('0x3a')]=_[_0x11a0('0x3b')](_0x193d32[_0x11a0('0x38')],_0x193d32[_0x11a0('0x39')]);_0x185055[_0x11a0('0x3d')]=_[_0x11a0('0x3b')](_0x193d32['model'],qs[_0x11a0('0x3c')](_0x2691f1[_0x11a0('0x39')][_0x11a0('0x3c')]));_0x185055[_0x11a0('0x3d')]=_0x185055[_0x11a0('0x3d')][_0x11a0('0x3e')]?_0x185055[_0x11a0('0x3d')]:_0x193d32[_0x11a0('0x38')];_0x185055[_0x11a0('0x3f')]=qs[_0x11a0('0x40')](_0x2691f1['query'][_0x11a0('0x40')]);_0x185055[_0x11a0('0x41')]=qs[_0x11a0('0x3a')](_['pick'](_0x2691f1['query'],_0x193d32[_0x11a0('0x3a')]));if(_0x2691f1[_0x11a0('0x39')]['filter']){_0x185055[_0x11a0('0x41')]=_[_0x11a0('0x43')](_0x185055[_0x11a0('0x41')],{'$or':_[_0x11a0('0x34')](_0x185055[_0x11a0('0x3d')],function(_0x48f184){var _0x6135b9={};_0x6135b9[_0x48f184]={'$like':'%'+_0x2691f1[_0x11a0('0x39')][_0x11a0('0x42')]+'%'};return _0x6135b9;})});}_0x185055=_[_0x11a0('0x43')]({},_0x185055,_0x2691f1[_0x11a0('0x44')]);return _0x5999f7['getConfigurations'](_0x185055);}})[_0x11a0('0x1e')](function(_0x21764f){if(_0x21764f){_0x36625f=_0x21764f[_0x11a0('0x3e')];if(!_0x2691f1['query']['hasOwnProperty'](_0x11a0('0x55'))){_0x185055[_0x11a0('0x2c')]=qs[_0x11a0('0x2c')](_0x2691f1[_0x11a0('0x39')][_0x11a0('0x2c')]);_0x185055['offset']=qs[_0x11a0('0x2b')](_0x2691f1['query'][_0x11a0('0x2b')]);}return _0x5999f7[_0x11a0('0x52')](_0x185055);}})[_0x11a0('0x1e')](function(_0xc1c10a){if(_0xc1c10a){return _0xc1c10a?{'count':_0x36625f,'rows':_0xc1c10a}:null;}})[_0x11a0('0x1e')](respondWithResult(_0x6b6c9d,null))['catch'](handleError(_0x6b6c9d,null));};exports[_0x11a0('0x56')]=function(_0x450284,_0x1d57e5,_0x90a8cb){if(_0x450284[_0x11a0('0x4e')]['id']){delete _0x450284['body']['id'];}return db['FreshsalesAccount'][_0x11a0('0x57')]({'where':{'id':_0x450284['params']['id']}})[_0x11a0('0x1e')](handleEntityNotFound(_0x1d57e5,null))[_0x11a0('0x1e')](function(_0x39d6fb){if(_0x39d6fb){_0x450284['body'][_0x11a0('0x58')]=_0x39d6fb['id'];_0x450284['body'][_0x11a0('0x59')]=integrations['getSubjects'](_0x450284[_0x11a0('0x4e')][_0x11a0('0x5a')],_0x450284[_0x11a0('0x4e')]['type']);_0x450284[_0x11a0('0x4e')][_0x11a0('0x5b')]=integrations[_0x11a0('0x5c')](_0x450284['body'][_0x11a0('0x5a')],_0x450284['body'][_0x11a0('0x36')]);return db[_0x11a0('0x54')][_0x11a0('0x4d')](_0x450284[_0x11a0('0x4e')],{'include':[{'model':db[_0x11a0('0x5d')],'as':'Subjects'},{'model':db[_0x11a0('0x5d')],'as':'Descriptions'}]});}return null;})[_0x11a0('0x1e')](respondWithResult(_0x1d57e5,null))[_0x11a0('0x48')](handleError(_0x1d57e5,null));};exports[_0x11a0('0x5e')]=function(_0xb5afc6,_0x50f47b,_0xfbe8e0){var _0x1a5865='';var _0x57bc91='';return db['FreshsalesAccount'][_0x11a0('0x57')]({'where':{'id':_0xb5afc6[_0x11a0('0x50')]['id']},'attributes':['id',_0x11a0('0x5f'),_0x11a0('0x60'),_0x11a0('0x61')]})['then'](handleEntityNotFound(_0x50f47b,null))[_0x11a0('0x1e')](function(_0x38f7fc){if(_0x38f7fc){_0x57bc91=_0x38f7fc['username'];_0x1a5865=_0x38f7fc['remoteUri'];var _0x1170fb=_0x38f7fc[_0x11a0('0x60')][_0x11a0('0x62')](-0x1);if(_0x1170fb==='/'){_0x1a5865=_0x1a5865['substring'](0x0,_0x1a5865[_0x11a0('0x63')](_0x1170fb));}return rp({'method':_0x11a0('0x64'),'uri':util[_0x11a0('0x65')](_0x11a0('0x66'),_0x1a5865,_0x11a0('0x67')),'headers':{'Authorization':_0x11a0('0x68')+_0x38f7fc[_0x11a0('0x61')]},'json':!![]});}})[_0x11a0('0x1e')](function(_0x49aac1){if(_0x49aac1){var _0x380096=_0x49aac1[_0x11a0('0x69')];var _0xcd6401=![];var _0x4d14c2=null;for(_0x4d14c2=0x0;_0x4d14c2<_0x380096[_0x11a0('0x3e')];_0x4d14c2++){if(_0x380096[_0x4d14c2][_0x11a0('0x6a')]===_0x57bc91){_0xcd6401=!![];}}if(_0xcd6401){return!![];}else{throw new Error({'statusCode':0x194,'message':_0x11a0('0x6b')});}}})['then'](respondWithResult(_0x50f47b,null))[_0x11a0('0x48')](function(_0x7cc897){var _0x4e1436=_0xb5afc6[_0x11a0('0x39')]['test']?0x1f4:_0x7cc897['statusCode']||0x1f4;logger[_0x11a0('0x24')]('getFields,\x20%s,\x20%s,\x20%s','getFields',_0x4e1436,JSON[_0x11a0('0x23')](_0x7cc897));delete _0x7cc897[_0x11a0('0x32')];if(_0x4e1436===0x191){_0x4e1436=0x190;}_0x50f47b[_0x11a0('0x2d')](_0x4e1436)['send'](_0xb5afc6['query'][_0x11a0('0x6c')]?{'message':_0x11a0('0x6d'),'statusCode':_0x7cc897[_0x11a0('0x6e')]}:_0x7cc897);});};
\ No newline at end of file
diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js
index 63df62b..df1a836 100644
--- a/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js
+++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xff89=['path','rimraf','../../config/environment','./intFreshsalesAccount.attributes','../../components/integrations/configuration','define','int_freshsales_accounts','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x3be865,_0x261dcb){var _0x216dbe=function(_0x2b2300){while(--_0x2b2300){_0x3be865['push'](_0x3be865['shift']());}};_0x216dbe(++_0x261dcb);}(_0xff89,0x149));var _0x9ff8=function(_0x25712c,_0x590183){_0x25712c=_0x25712c-0x0;var _0x72e32e=_0xff89[_0x25712c];return _0x72e32e;};'use strict';var _=require(_0x9ff8('0x0'));var util=require(_0x9ff8('0x1'));var logger=require(_0x9ff8('0x2'))(_0x9ff8('0x3'));var moment=require(_0x9ff8('0x4'));var BPromise=require(_0x9ff8('0x5'));var rp=require(_0x9ff8('0x6'));var fs=require('fs');var path=require(_0x9ff8('0x7'));var rimraf=require(_0x9ff8('0x8'));var config=require(_0x9ff8('0x9'));var attributes=require(_0x9ff8('0xa'));var integrations=require(_0x9ff8('0xb'));module['exports']=function(_0x1dd1df,_0x19aae1){return _0x1dd1df[_0x9ff8('0xc')]('FreshsalesAccount',attributes,{'tableName':_0x9ff8('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1aac=['bluebird','path','../../config/environment','./intFreshsalesAccount.attributes','../../components/integrations/configuration','exports','define','FreshsalesAccount','int_freshsales_accounts','lodash','util','../../config/logger','api','moment'];(function(_0x5e305a,_0x5385f){var _0x25b737=function(_0x6d7ca8){while(--_0x6d7ca8){_0x5e305a['push'](_0x5e305a['shift']());}};_0x25b737(++_0x5385f);}(_0x1aac,0x6b));var _0xc1aa=function(_0x318062,_0x4c380b){_0x318062=_0x318062-0x0;var _0x1fc947=_0x1aac[_0x318062];return _0x1fc947;};'use strict';var _=require(_0xc1aa('0x0'));var util=require(_0xc1aa('0x1'));var logger=require(_0xc1aa('0x2'))(_0xc1aa('0x3'));var moment=require(_0xc1aa('0x4'));var BPromise=require(_0xc1aa('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc1aa('0x6'));var rimraf=require('rimraf');var config=require(_0xc1aa('0x7'));var attributes=require(_0xc1aa('0x8'));var integrations=require(_0xc1aa('0x9'));module[_0xc1aa('0xa')]=function(_0x21d9b8,_0x4de411){return _0x21d9b8[_0xc1aa('0xb')](_0xc1aa('0xc'),attributes,{'tableName':_0xc1aa('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js
index 48d407f..d9e29be 100644
--- a/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js
+++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8212=['raw','where','attributes','limit','map','include','model','ShowFreshsalesAccount','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','GetFreshsalesAccount','FreshsalesAccount','options'];(function(_0x15014a,_0x403d6c){var _0x40bc52=function(_0x524f30){while(--_0x524f30){_0x15014a['push'](_0x15014a['shift']());}};_0x40bc52(++_0x403d6c);}(_0x8212,0xb3));var _0x2821=function(_0xaa66b4,_0x5bad46){_0xaa66b4=_0xaa66b4-0x0;var _0x1a7e0a=_0x8212[_0xaa66b4];return _0x1a7e0a;};'use strict';var _=require(_0x2821('0x0'));var util=require(_0x2821('0x1'));var moment=require('moment');var BPromise=require(_0x2821('0x2'));var rs=require(_0x2821('0x3'));var fs=require('fs');var Redis=require(_0x2821('0x4'));var db=require(_0x2821('0x5'))['db'];var utils=require(_0x2821('0x6'));var logger=require(_0x2821('0x7'))(_0x2821('0x8'));var config=require(_0x2821('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x2821('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x376c57,_0x1dc078,_0x4ea6d5){return new BPromise(function(_0x3644aa,_0x201069){return client[_0x2821('0xb')](_0x376c57,_0x4ea6d5)[_0x2821('0xc')](function(_0x16003f){logger[_0x2821('0xd')](_0x2821('0xe'),_0x1dc078,_0x2821('0xf'));logger[_0x2821('0x10')]('FreshsalesAccount,\x20%s,\x20%s,\x20%s',_0x1dc078,_0x2821('0xf'),JSON[_0x2821('0x11')](_0x16003f));if(_0x16003f[_0x2821('0x12')]){if(_0x16003f['error']['code']===0x1f4){logger['error']('FreshsalesAccount,\x20%s,\x20%s',_0x1dc078,_0x16003f[_0x2821('0x12')][_0x2821('0x13')]);return _0x201069(_0x16003f[_0x2821('0x12')][_0x2821('0x13')]);}logger[_0x2821('0x12')](_0x2821('0xe'),_0x1dc078,_0x16003f['error'][_0x2821('0x13')]);return _0x3644aa(_0x16003f['error']['message']);}else{logger[_0x2821('0xd')](_0x2821('0xe'),_0x1dc078,_0x2821('0xf'));_0x3644aa(_0x16003f[_0x2821('0x14')]['message']);}})[_0x2821('0x15')](function(_0x5c2aa7){logger[_0x2821('0x12')](_0x2821('0xe'),_0x1dc078,_0x5c2aa7);_0x201069(_0x5c2aa7);});});}exports[_0x2821('0x16')]=function(_0x3f1057){var _0x280bfc=this;return new Promise(function(_0x500357,_0x15bd07){return db[_0x2821('0x17')]['findAll']({'raw':_0x3f1057[_0x2821('0x18')]?_0x3f1057['options'][_0x2821('0x19')]===undefined?!![]:![]:!![],'where':_0x3f1057[_0x2821('0x18')]?_0x3f1057[_0x2821('0x18')][_0x2821('0x1a')]||null:null,'attributes':_0x3f1057[_0x2821('0x18')]?_0x3f1057[_0x2821('0x18')][_0x2821('0x1b')]||null:null,'limit':_0x3f1057[_0x2821('0x18')]?_0x3f1057[_0x2821('0x18')][_0x2821('0x1c')]||null:null,'include':_0x3f1057[_0x2821('0x18')]?_0x3f1057['options']['include']?_[_0x2821('0x1d')](_0x3f1057[_0x2821('0x18')][_0x2821('0x1e')],function(_0x279a46){return{'model':db[_0x279a46[_0x2821('0x1f')]],'as':_0x279a46['as'],'attributes':_0x279a46[_0x2821('0x1b')],'include':_0x279a46[_0x2821('0x1e')]?_[_0x2821('0x1d')](_0x279a46[_0x2821('0x1e')],function(_0x27cef1){return{'model':db[_0x27cef1[_0x2821('0x1f')]],'as':_0x27cef1['as'],'attributes':_0x27cef1[_0x2821('0x1b')],'include':_0x27cef1[_0x2821('0x1e')]?_[_0x2821('0x1d')](_0x27cef1[_0x2821('0x1e')],function(_0x2ab3ab){return{'model':db[_0x2ab3ab[_0x2821('0x1f')]],'as':_0x2ab3ab['as'],'attributes':_0x2ab3ab[_0x2821('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x2821('0xc')](function(_0x2986a8){logger['info'](_0x2821('0x16'),_0x3f1057);logger['debug'](_0x2821('0x16'),_0x3f1057,JSON[_0x2821('0x11')](_0x2986a8));_0x500357(_0x2986a8);})[_0x2821('0x15')](function(_0x7dfdc3){logger['error'](_0x2821('0x16'),_0x7dfdc3[_0x2821('0x13')],_0x3f1057);_0x15bd07(_0x280bfc['error'](0x1f4,_0x7dfdc3[_0x2821('0x13')]));});});};exports[_0x2821('0x20')]=function(_0x3d2d07){var _0x54a033=this;return new Promise(function(_0x3d6c45,_0x2568bf){return db[_0x2821('0x17')][_0x2821('0x21')]({'raw':_0x3d2d07[_0x2821('0x18')]?_0x3d2d07[_0x2821('0x18')][_0x2821('0x19')]===undefined?!![]:![]:!![],'where':_0x3d2d07['options']?_0x3d2d07[_0x2821('0x18')][_0x2821('0x1a')]||null:null,'attributes':_0x3d2d07[_0x2821('0x18')]?_0x3d2d07[_0x2821('0x18')][_0x2821('0x1b')]||null:null,'include':_0x3d2d07[_0x2821('0x18')]?_0x3d2d07[_0x2821('0x18')][_0x2821('0x1e')]?_[_0x2821('0x1d')](_0x3d2d07[_0x2821('0x18')][_0x2821('0x1e')],function(_0x5e9194){return{'model':db[_0x5e9194[_0x2821('0x1f')]],'as':_0x5e9194['as'],'attributes':_0x5e9194[_0x2821('0x1b')],'include':_0x5e9194[_0x2821('0x1e')]?_[_0x2821('0x1d')](_0x5e9194['include'],function(_0x441cca){return{'model':db[_0x441cca[_0x2821('0x1f')]],'as':_0x441cca['as'],'attributes':_0x441cca[_0x2821('0x1b')],'include':_0x441cca[_0x2821('0x1e')]?_[_0x2821('0x1d')](_0x441cca[_0x2821('0x1e')],function(_0x3d73cd){return{'model':db[_0x3d73cd[_0x2821('0x1f')]],'as':_0x3d73cd['as'],'attributes':_0x3d73cd[_0x2821('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x2821('0xc')](function(_0x4bc4d9){logger[_0x2821('0xd')](_0x2821('0x20'),_0x3d2d07);logger[_0x2821('0x10')](_0x2821('0x20'),_0x3d2d07,JSON[_0x2821('0x11')](_0x4bc4d9));_0x3d6c45(_0x4bc4d9);})['catch'](function(_0x2e3a0e){logger['error']('ShowFreshsalesAccount',_0x2e3a0e[_0x2821('0x13')],_0x3d2d07);_0x2568bf(_0x54a033[_0x2821('0x12')](0x1f4,_0x2e3a0e[_0x2821('0x13')]));});});};
\ No newline at end of file
+var _0xb470=['limit','include','map','model','then','GetFreshsalesAccount','ShowFreshsalesAccount','find','where','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','info','request\x20sent','debug','FreshsalesAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','FreshsalesAccount,\x20%s,\x20%s','message','result','catch','FreshsalesAccount','options','raw','attributes'];(function(_0x1d2351,_0x4d2a6c){var _0x6762c0=function(_0x33ae0d){while(--_0x33ae0d){_0x1d2351['push'](_0x1d2351['shift']());}};_0x6762c0(++_0x4d2a6c);}(_0xb470,0x75));var _0x0b47=function(_0x5c620f,_0xdb8e5b){_0x5c620f=_0x5c620f-0x0;var _0x4f71e5=_0xb470[_0x5c620f];return _0x4f71e5;};'use strict';var _=require(_0x0b47('0x0'));var util=require(_0x0b47('0x1'));var moment=require(_0x0b47('0x2'));var BPromise=require(_0x0b47('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0b47('0x4'));var db=require(_0x0b47('0x5'))['db'];var utils=require(_0x0b47('0x6'));var logger=require('../../config/logger')(_0x0b47('0x7'));var config=require(_0x0b47('0x8'));var jayson=require(_0x0b47('0x9'));var client=jayson[_0x0b47('0xa')][_0x0b47('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x23d960,_0x201ab2,_0x37eb18){return new BPromise(function(_0x4bfebf,_0x56543c){return client['request'](_0x23d960,_0x37eb18)['then'](function(_0x38523d){logger[_0x0b47('0xc')]('FreshsalesAccount,\x20%s,\x20%s',_0x201ab2,_0x0b47('0xd'));logger[_0x0b47('0xe')](_0x0b47('0xf'),_0x201ab2,_0x0b47('0xd'),JSON[_0x0b47('0x10')](_0x38523d));if(_0x38523d[_0x0b47('0x11')]){if(_0x38523d[_0x0b47('0x11')][_0x0b47('0x12')]===0x1f4){logger[_0x0b47('0x11')](_0x0b47('0x13'),_0x201ab2,_0x38523d['error']['message']);return _0x56543c(_0x38523d[_0x0b47('0x11')]['message']);}logger[_0x0b47('0x11')](_0x0b47('0x13'),_0x201ab2,_0x38523d['error'][_0x0b47('0x14')]);return _0x4bfebf(_0x38523d[_0x0b47('0x11')][_0x0b47('0x14')]);}else{logger[_0x0b47('0xc')](_0x0b47('0x13'),_0x201ab2,_0x0b47('0xd'));_0x4bfebf(_0x38523d[_0x0b47('0x15')][_0x0b47('0x14')]);}})[_0x0b47('0x16')](function(_0x1da847){logger['error'](_0x0b47('0x13'),_0x201ab2,_0x1da847);_0x56543c(_0x1da847);});});}exports['GetFreshsalesAccount']=function(_0x11f305){var _0x1620fc=this;return new Promise(function(_0x2b1024,_0x478caa){return db[_0x0b47('0x17')]['findAll']({'raw':_0x11f305['options']?_0x11f305[_0x0b47('0x18')][_0x0b47('0x19')]===undefined?!![]:![]:!![],'where':_0x11f305['options']?_0x11f305[_0x0b47('0x18')]['where']||null:null,'attributes':_0x11f305[_0x0b47('0x18')]?_0x11f305[_0x0b47('0x18')][_0x0b47('0x1a')]||null:null,'limit':_0x11f305[_0x0b47('0x18')]?_0x11f305[_0x0b47('0x18')][_0x0b47('0x1b')]||null:null,'include':_0x11f305[_0x0b47('0x18')]?_0x11f305[_0x0b47('0x18')][_0x0b47('0x1c')]?_[_0x0b47('0x1d')](_0x11f305[_0x0b47('0x18')]['include'],function(_0xc87cd){return{'model':db[_0xc87cd[_0x0b47('0x1e')]],'as':_0xc87cd['as'],'attributes':_0xc87cd['attributes'],'include':_0xc87cd[_0x0b47('0x1c')]?_[_0x0b47('0x1d')](_0xc87cd[_0x0b47('0x1c')],function(_0xd9c35c){return{'model':db[_0xd9c35c['model']],'as':_0xd9c35c['as'],'attributes':_0xd9c35c['attributes'],'include':_0xd9c35c[_0x0b47('0x1c')]?_[_0x0b47('0x1d')](_0xd9c35c['include'],function(_0x138a03){return{'model':db[_0x138a03[_0x0b47('0x1e')]],'as':_0x138a03['as'],'attributes':_0x138a03[_0x0b47('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x0b47('0x1f')](function(_0x15db7d){logger[_0x0b47('0xc')](_0x0b47('0x20'),_0x11f305);logger[_0x0b47('0xe')](_0x0b47('0x20'),_0x11f305,JSON[_0x0b47('0x10')](_0x15db7d));_0x2b1024(_0x15db7d);})[_0x0b47('0x16')](function(_0x5e90f1){logger['error'](_0x0b47('0x20'),_0x5e90f1['message'],_0x11f305);_0x478caa(_0x1620fc[_0x0b47('0x11')](0x1f4,_0x5e90f1[_0x0b47('0x14')]));});});};exports[_0x0b47('0x21')]=function(_0xccf571){var _0x1014cd=this;return new Promise(function(_0x510caf,_0x453ac1){return db[_0x0b47('0x17')][_0x0b47('0x22')]({'raw':_0xccf571['options']?_0xccf571[_0x0b47('0x18')][_0x0b47('0x19')]===undefined?!![]:![]:!![],'where':_0xccf571[_0x0b47('0x18')]?_0xccf571[_0x0b47('0x18')][_0x0b47('0x23')]||null:null,'attributes':_0xccf571[_0x0b47('0x18')]?_0xccf571['options']['attributes']||null:null,'include':_0xccf571[_0x0b47('0x18')]?_0xccf571[_0x0b47('0x18')][_0x0b47('0x1c')]?_[_0x0b47('0x1d')](_0xccf571[_0x0b47('0x18')][_0x0b47('0x1c')],function(_0x42fa6c){return{'model':db[_0x42fa6c[_0x0b47('0x1e')]],'as':_0x42fa6c['as'],'attributes':_0x42fa6c[_0x0b47('0x1a')],'include':_0x42fa6c[_0x0b47('0x1c')]?_[_0x0b47('0x1d')](_0x42fa6c['include'],function(_0x50fd74){return{'model':db[_0x50fd74[_0x0b47('0x1e')]],'as':_0x50fd74['as'],'attributes':_0x50fd74['attributes'],'include':_0x50fd74[_0x0b47('0x1c')]?_[_0x0b47('0x1d')](_0x50fd74[_0x0b47('0x1c')],function(_0xa7724f){return{'model':db[_0xa7724f[_0x0b47('0x1e')]],'as':_0xa7724f['as'],'attributes':_0xa7724f[_0x0b47('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4948d5){logger['info'](_0x0b47('0x21'),_0xccf571);logger[_0x0b47('0xe')](_0x0b47('0x21'),_0xccf571,JSON[_0x0b47('0x10')](_0x4948d5));_0x510caf(_0x4948d5);})[_0x0b47('0x16')](function(_0x22227f){logger['error'](_0x0b47('0x21'),_0x22227f[_0x0b47('0x14')],_0xccf571);_0x453ac1(_0x1014cd[_0x0b47('0x11')](0x1f4,_0x22227f[_0x0b47('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/intFreshsalesConfiguration/index.js b/server/api/intFreshsalesConfiguration/index.js
index 32351d7..23eca56 100644
--- a/server/api/intFreshsalesConfiguration/index.js
+++ b/server/api/intFreshsalesConfiguration/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x286d=['getFields','post','put','update','delete','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/fields'];(function(_0x4382bc,_0x231a2d){var _0x13c82a=function(_0x3723b0){while(--_0x3723b0){_0x4382bc['push'](_0x4382bc['shift']());}};_0x13c82a(++_0x231a2d);}(_0x286d,0x90));var _0xd286=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0x286d[_0x24237f];return _0x48298e;};'use strict';var multer=require(_0xd286('0x0'));var util=require(_0xd286('0x1'));var path=require(_0xd286('0x2'));var timeout=require('connect-timeout');var express=require(_0xd286('0x3'));var router=express['Router']();var auth=require(_0xd286('0x4'));var interaction=require(_0xd286('0x5'));var config=require(_0xd286('0x6'));var controller=require('./intFreshsalesConfiguration.controller');router[_0xd286('0x7')]('/',auth[_0xd286('0x8')](),controller[_0xd286('0x9')]);router['get'](_0xd286('0xa'),auth[_0xd286('0x8')](),controller[_0xd286('0xb')]);router[_0xd286('0x7')](_0xd286('0xc'),auth['isAuthenticated'](),controller[_0xd286('0xd')]);router[_0xd286('0x7')](_0xd286('0xe'),auth[_0xd286('0x8')](),controller[_0xd286('0xf')]);router[_0xd286('0x7')](_0xd286('0x10'),auth[_0xd286('0x8')](),controller[_0xd286('0x11')]);router[_0xd286('0x12')]('/',auth[_0xd286('0x8')](),controller['create']);router[_0xd286('0x13')]('/:id',auth[_0xd286('0x8')](),controller[_0xd286('0x14')]);router[_0xd286('0x15')](_0xd286('0xa'),auth[_0xd286('0x8')](),controller['destroy']);module[_0xd286('0x16')]=router;
\ No newline at end of file
+var _0x6ec7=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshsalesConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/subjects','/:id/descriptions','getDescriptions','/:id/fields','create','put','update','delete','exports','multer','util','path'];(function(_0x3ba0bb,_0x3a2c81){var _0x3e74b7=function(_0x362c5d){while(--_0x362c5d){_0x3ba0bb['push'](_0x3ba0bb['shift']());}};_0x3e74b7(++_0x3a2c81);}(_0x6ec7,0x156));var _0x76ec=function(_0x183228,_0x58db39){_0x183228=_0x183228-0x0;var _0x505ac6=_0x6ec7[_0x183228];return _0x505ac6;};'use strict';var multer=require(_0x76ec('0x0'));var util=require(_0x76ec('0x1'));var path=require(_0x76ec('0x2'));var timeout=require('connect-timeout');var express=require(_0x76ec('0x3'));var router=express[_0x76ec('0x4')]();var auth=require(_0x76ec('0x5'));var interaction=require(_0x76ec('0x6'));var config=require(_0x76ec('0x7'));var controller=require(_0x76ec('0x8'));router[_0x76ec('0x9')]('/',auth[_0x76ec('0xa')](),controller[_0x76ec('0xb')]);router['get'](_0x76ec('0xc'),auth['isAuthenticated'](),controller[_0x76ec('0xd')]);router[_0x76ec('0x9')](_0x76ec('0xe'),auth[_0x76ec('0xa')](),controller['getSubjects']);router[_0x76ec('0x9')](_0x76ec('0xf'),auth[_0x76ec('0xa')](),controller[_0x76ec('0x10')]);router[_0x76ec('0x9')](_0x76ec('0x11'),auth[_0x76ec('0xa')](),controller['getFields']);router['post']('/',auth[_0x76ec('0xa')](),controller[_0x76ec('0x12')]);router[_0x76ec('0x13')](_0x76ec('0xc'),auth[_0x76ec('0xa')](),controller[_0x76ec('0x14')]);router[_0x76ec('0x15')](_0x76ec('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0x76ec('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js
index 630cf43..3dd8237 100644
--- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js
+++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7692=['sequelize','exports','STRING'];(function(_0xd4f426,_0x2b6bac){var _0x3cc47e=function(_0x37f417){while(--_0x37f417){_0xd4f426['push'](_0xd4f426['shift']());}};_0x3cc47e(++_0x2b6bac);}(_0x7692,0x1e3));var _0x2769=function(_0x4e7d4a,_0x35cdc8){_0x4e7d4a=_0x4e7d4a-0x0;var _0x235800=_0x7692[_0x4e7d4a];return _0x235800;};'use strict';var Sequelize=require(_0x2769('0x0'));module[_0x2769('0x1')]={'name':{'type':Sequelize[_0x2769('0x2')]},'description':{'type':Sequelize[_0x2769('0x2')]}};
\ No newline at end of file
+var _0x5243=['exports','STRING','sequelize'];(function(_0x241fa3,_0x400ab1){var _0x366370=function(_0x255289){while(--_0x255289){_0x241fa3['push'](_0x241fa3['shift']());}};_0x366370(++_0x400ab1);}(_0x5243,0xf5));var _0x3524=function(_0x5723b7,_0x373d5b){_0x5723b7=_0x5723b7-0x0;var _0x5ad9a4=_0x5243[_0x5723b7];return _0x5ad9a4;};'use strict';var Sequelize=require(_0x3524('0x0'));module[_0x3524('0x1')]={'name':{'type':Sequelize[_0x3524('0x2')]},'description':{'type':Sequelize[_0x3524('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js
index 0c9ede5..773bfd8 100644
--- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js
+++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa423=['path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','client','test','Sequelize','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','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','sendStatus','end','json','count','offset','limit','status','set','apply','update','then','destroy','stack','name','index','map','FreshsalesConfiguration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','show','fields','attributes','find','create','body','params','findOne','FreshsalesField','getSubjects','getDescriptions','getFields','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util'];(function(_0x4a806e,_0x5d47a8){var _0x29aa5b=function(_0x3b7627){while(--_0x3b7627){_0x4a806e['push'](_0x4a806e['shift']());}};_0x29aa5b(++_0x5d47a8);}(_0xa423,0x16c));var _0x3a42=function(_0x4c0511,_0x23721f){_0x4c0511=_0x4c0511-0x0;var _0xd4e76b=_0xa423[_0x4c0511];return _0xd4e76b;};'use strict';var pdf=require(_0x3a42('0x0'));var emlformat=require(_0x3a42('0x1'));var rimraf=require(_0x3a42('0x2'));var zipdir=require(_0x3a42('0x3'));var jsonpatch=require(_0x3a42('0x4'));var rp=require('request-promise');var moment=require(_0x3a42('0x5'));var BPromise=require(_0x3a42('0x6'));var Mustache=require('mustache');var util=require(_0x3a42('0x7'));var path=require(_0x3a42('0x8'));var sox=require(_0x3a42('0x9'));var csv=require(_0x3a42('0xa'));var ejs=require(_0x3a42('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x3a42('0xc'));var crypto=require(_0x3a42('0xd'));var jsforce=require(_0x3a42('0xe'));var deskjs=require(_0x3a42('0xf'));var toCsv=require(_0x3a42('0xa'));var querystring=require(_0x3a42('0x10'));var Papa=require(_0x3a42('0x11'));var Redis=require(_0x3a42('0x12'));var authService=require(_0x3a42('0x13'));var qs=require(_0x3a42('0x14'));var as=require(_0x3a42('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3a42('0x16'))(_0x3a42('0x17'));var utils=require(_0x3a42('0x18'));var config=require(_0x3a42('0x19'));var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var client=jayson[_0x3a42('0x1a')]['http']({'port':0x232a});function checkPasswordPattern(_0x4008ea,_0x2f210f,_0x198bf1){if(_0x198bf1){var _0x1fc71f=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1fc71f[_0x3a42('0x1b')](_0x2f210f)){return _0x4008ea;}else{throw new db[(_0x3a42('0x1c'))]['ValidationError'](_0x3a42('0x1d'));}}else{return _0x4008ea;}}function respondWithRpcPromise(_0x4f715c,_0x469c73,_0x4b1d68,_0x3e5d77){return new BPromise(function(_0x5895a8,_0x46ef1e){var _0x4edcf5=_0x3e5d77||client;return _0x4edcf5['request'](_0x4f715c,_0x4b1d68)['then'](function(_0x26c844){logger[_0x3a42('0x1e')](_0x3a42('0x1f'),_0x469c73,_0x3a42('0x20'));logger[_0x3a42('0x21')]('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x469c73,_0x3a42('0x20'),JSON[_0x3a42('0x22')](_0x26c844));if(_0x26c844[_0x3a42('0x23')]){if(_0x26c844[_0x3a42('0x23')][_0x3a42('0x24')]===0x1f4){logger[_0x3a42('0x23')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x469c73,_0x26c844[_0x3a42('0x23')][_0x3a42('0x25')]);return _0x46ef1e(_0x26c844[_0x3a42('0x23')][_0x3a42('0x25')]);}logger[_0x3a42('0x23')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x469c73,_0x26c844[_0x3a42('0x23')][_0x3a42('0x25')]);return _0x5895a8(_0x26c844[_0x3a42('0x23')][_0x3a42('0x25')]);}else{logger[_0x3a42('0x1e')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x469c73,_0x3a42('0x20'));_0x5895a8(_0x26c844[_0x3a42('0x26')][_0x3a42('0x25')]);}})[_0x3a42('0x27')](function(_0x1540e5){logger[_0x3a42('0x23')](_0x3a42('0x1f'),_0x469c73,_0x1540e5);_0x46ef1e(_0x1540e5);});});}function respondWithStatusCode(_0x434044,_0x2c4b3a){_0x2c4b3a=_0x2c4b3a||0xcc;return function(_0x3a3f87){if(_0x3a3f87){return _0x434044[_0x3a42('0x28')](_0x2c4b3a);}return _0x434044['status'](_0x2c4b3a)[_0x3a42('0x29')]();};}function respondWithResult(_0x468ea8,_0x4b3062){_0x4b3062=_0x4b3062||0xc8;return function(_0x3027dd){if(_0x3027dd){return _0x468ea8['status'](_0x4b3062)[_0x3a42('0x2a')](_0x3027dd);}};}function respondWithFilteredResult(_0x2a4878,_0x409910){return function(_0x299282){if(_0x299282){var _0x1559cd=_0x299282[_0x3a42('0x2b')],_0xaf28ad=_0x409910[_0x3a42('0x2c')],_0x4b8fe7=_0x409910[_0x3a42('0x2c')]+_0x409910[_0x3a42('0x2d')],_0x175fc4;if(_0x4b8fe7>=_0x1559cd){_0x4b8fe7=_0x1559cd;_0x175fc4=0xc8;}else{_0x175fc4=0xce;}_0x2a4878[_0x3a42('0x2e')](_0x175fc4);return _0x2a4878[_0x3a42('0x2f')]('Content-Range',_0xaf28ad+'-'+_0x4b8fe7+'/'+_0x1559cd)[_0x3a42('0x2a')](_0x299282);}return null;};}function patchUpdates(_0x3e7442){return function(_0x268693){try{jsonpatch[_0x3a42('0x30')](_0x268693,_0x3e7442,!![]);}catch(_0x158f02){return BPromise['reject'](_0x158f02);}return _0x268693['save']();};}function saveUpdates(_0x1032eb,_0x51871b){return function(_0x3fb07d){if(_0x3fb07d){return _0x3fb07d[_0x3a42('0x31')](_0x1032eb)[_0x3a42('0x32')](function(_0x421d3b){return _0x421d3b;});}return null;};}function removeEntity(_0x37defa,_0x26f4c5){return function(_0x57123d){if(_0x57123d){return _0x57123d[_0x3a42('0x33')]()[_0x3a42('0x32')](function(){_0x37defa[_0x3a42('0x2e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5871bf,_0x41df56){return function(_0x3f21ed){if(!_0x3f21ed){_0x5871bf[_0x3a42('0x28')](0x194);}return _0x3f21ed;};}function handleError(_0xe51e6,_0xb297ad){_0xb297ad=_0xb297ad||0x1f4;return function(_0x4e872b){logger['error'](_0x4e872b[_0x3a42('0x34')]);if(_0x4e872b[_0x3a42('0x35')]){delete _0x4e872b[_0x3a42('0x35')];}_0xe51e6[_0x3a42('0x2e')](_0xb297ad)['send'](_0x4e872b);};}exports[_0x3a42('0x36')]=function(_0xac31a8,_0x4fb43f){var _0x479e5e={},_0x5079a4={},_0x199a39={'count':0x0,'rows':[]};var _0x4ca6a9=_[_0x3a42('0x37')](db[_0x3a42('0x38')][_0x3a42('0x39')],function(_0x1fcbcb){return{'name':_0x1fcbcb[_0x3a42('0x3a')],'type':_0x1fcbcb[_0x3a42('0x3b')][_0x3a42('0x3c')]};});_0x5079a4[_0x3a42('0x3d')]=_[_0x3a42('0x37')](_0x4ca6a9,'name');_0x5079a4[_0x3a42('0x3e')]=_[_0x3a42('0x3f')](_0xac31a8[_0x3a42('0x3e')]);_0x5079a4[_0x3a42('0x40')]=_[_0x3a42('0x41')](_0x5079a4['model'],_0x5079a4[_0x3a42('0x3e')]);_0x479e5e['attributes']=_['intersection'](_0x5079a4['model'],qs['fields'](_0xac31a8[_0x3a42('0x3e')]['fields']));_0x479e5e['attributes']=_0x479e5e['attributes'][_0x3a42('0x42')]?_0x479e5e['attributes']:_0x5079a4['model'];if(!_0xac31a8[_0x3a42('0x3e')][_0x3a42('0x43')](_0x3a42('0x44'))){_0x479e5e[_0x3a42('0x2d')]=qs[_0x3a42('0x2d')](_0xac31a8[_0x3a42('0x3e')]['limit']);_0x479e5e[_0x3a42('0x2c')]=qs[_0x3a42('0x2c')](_0xac31a8[_0x3a42('0x3e')]['offset']);}_0x479e5e[_0x3a42('0x45')]=qs[_0x3a42('0x46')](_0xac31a8['query'][_0x3a42('0x46')]);_0x479e5e[_0x3a42('0x47')]=qs[_0x3a42('0x40')](_[_0x3a42('0x48')](_0xac31a8[_0x3a42('0x3e')],_0x5079a4[_0x3a42('0x40')]));if(_0xac31a8[_0x3a42('0x3e')]['filter']){_0x479e5e[_0x3a42('0x47')]=_[_0x3a42('0x49')](_0x479e5e[_0x3a42('0x47')],{'$or':_[_0x3a42('0x37')](_0x4ca6a9,function(_0xff4f08){if(_0xff4f08['type']!==_0x3a42('0x4a')){var _0x258026={};_0x258026[_0xff4f08[_0x3a42('0x35')]]={'$like':'%'+_0xac31a8['query'][_0x3a42('0x4b')]+'%'};return _0x258026;}})});}_0x479e5e=_[_0x3a42('0x49')]({},_0x479e5e,_0xac31a8[_0x3a42('0x4c')]);var _0x1645b8={'where':_0x479e5e[_0x3a42('0x47')]};return db['FreshsalesConfiguration'][_0x3a42('0x2b')](_0x1645b8)[_0x3a42('0x32')](function(_0x3a3293){_0x199a39[_0x3a42('0x2b')]=_0x3a3293;if(_0xac31a8['query'][_0x3a42('0x4d')]){_0x479e5e[_0x3a42('0x4e')]=[{'all':!![]}];}return db[_0x3a42('0x38')][_0x3a42('0x4f')](_0x479e5e);})[_0x3a42('0x32')](function(_0x9799a){_0x199a39[_0x3a42('0x50')]=_0x9799a;return _0x199a39;})['then'](respondWithFilteredResult(_0x4fb43f,_0x479e5e))[_0x3a42('0x27')](handleError(_0x4fb43f,null));};exports[_0x3a42('0x51')]=function(_0x17df29,_0x1f9912){var _0x34cf64={'raw':![],'where':{'id':_0x17df29['params']['id']}},_0x4350bc={};_0x4350bc[_0x3a42('0x3d')]=_['keys'](db[_0x3a42('0x38')][_0x3a42('0x39')]);_0x4350bc[_0x3a42('0x3e')]=_[_0x3a42('0x3f')](_0x17df29[_0x3a42('0x3e')]);_0x4350bc[_0x3a42('0x40')]=_[_0x3a42('0x41')](_0x4350bc[_0x3a42('0x3d')],_0x4350bc[_0x3a42('0x3e')]);_0x34cf64['attributes']=_[_0x3a42('0x41')](_0x4350bc[_0x3a42('0x3d')],qs['fields'](_0x17df29['query'][_0x3a42('0x52')]));_0x34cf64[_0x3a42('0x53')]=_0x34cf64['attributes'][_0x3a42('0x42')]?_0x34cf64[_0x3a42('0x53')]:_0x4350bc[_0x3a42('0x3d')];if(_0x17df29['query'][_0x3a42('0x4d')]){_0x34cf64[_0x3a42('0x4e')]=[{'all':!![]}];}_0x34cf64=_['merge']({},_0x34cf64,_0x17df29[_0x3a42('0x4c')]);return db['FreshsalesConfiguration'][_0x3a42('0x54')](_0x34cf64)[_0x3a42('0x32')](handleEntityNotFound(_0x1f9912,null))['then'](respondWithResult(_0x1f9912,null))[_0x3a42('0x27')](handleError(_0x1f9912,null));};exports[_0x3a42('0x55')]=function(_0x23ca9d,_0x530d78){return db[_0x3a42('0x38')][_0x3a42('0x55')](_0x23ca9d[_0x3a42('0x56')],{})[_0x3a42('0x32')](respondWithResult(_0x530d78,0xc9))[_0x3a42('0x27')](handleError(_0x530d78,null));};exports[_0x3a42('0x31')]=function(_0x56e61b,_0x54081f){if(_0x56e61b[_0x3a42('0x56')]['id']){delete _0x56e61b[_0x3a42('0x56')]['id'];}return db[_0x3a42('0x38')][_0x3a42('0x54')]({'where':{'id':_0x56e61b['params']['id']}})[_0x3a42('0x32')](handleEntityNotFound(_0x54081f,null))[_0x3a42('0x32')](saveUpdates(_0x56e61b[_0x3a42('0x56')],null))['then'](respondWithResult(_0x54081f,null))[_0x3a42('0x27')](handleError(_0x54081f,null));};exports[_0x3a42('0x33')]=function(_0x596e9e,_0x190563){return db[_0x3a42('0x38')][_0x3a42('0x54')]({'where':{'id':_0x596e9e[_0x3a42('0x57')]['id']}})[_0x3a42('0x32')](handleEntityNotFound(_0x190563,null))[_0x3a42('0x32')](removeEntity(_0x190563,null))['catch'](handleError(_0x190563,null));};exports['getSubjects']=function(_0x4c20f4,_0xc2e895,_0x352967){var _0x302b24={};var _0x46cd72={};var _0x47956a;var _0x376aa0;return db[_0x3a42('0x38')][_0x3a42('0x58')]({'where':{'id':_0x4c20f4['params']['id']}})[_0x3a42('0x32')](handleEntityNotFound(_0xc2e895,null))[_0x3a42('0x32')](function(_0x5abb21){if(_0x5abb21){_0x47956a=_0x5abb21;_0x46cd72[_0x3a42('0x3d')]=_[_0x3a42('0x3f')](db[_0x3a42('0x59')][_0x3a42('0x39')]);_0x46cd72[_0x3a42('0x3e')]=_[_0x3a42('0x3f')](_0x4c20f4[_0x3a42('0x3e')]);_0x46cd72[_0x3a42('0x40')]=_[_0x3a42('0x41')](_0x46cd72[_0x3a42('0x3d')],_0x46cd72[_0x3a42('0x3e')]);_0x302b24[_0x3a42('0x53')]=_[_0x3a42('0x41')](_0x46cd72[_0x3a42('0x3d')],qs[_0x3a42('0x52')](_0x4c20f4[_0x3a42('0x3e')][_0x3a42('0x52')]));_0x302b24[_0x3a42('0x53')]=_0x302b24['attributes'][_0x3a42('0x42')]?_0x302b24[_0x3a42('0x53')]:_0x46cd72[_0x3a42('0x3d')];_0x302b24['order']=qs['sort'](_0x4c20f4['query'][_0x3a42('0x46')]);_0x302b24[_0x3a42('0x47')]=qs[_0x3a42('0x40')](_[_0x3a42('0x48')](_0x4c20f4[_0x3a42('0x3e')],_0x46cd72[_0x3a42('0x40')]));if(_0x4c20f4[_0x3a42('0x3e')]['filter']){_0x302b24[_0x3a42('0x47')]=_[_0x3a42('0x49')](_0x302b24['where'],{'$or':_[_0x3a42('0x37')](_0x302b24[_0x3a42('0x53')],function(_0x531dbc){var _0x128d61={};_0x128d61[_0x531dbc]={'$like':'%'+_0x4c20f4['query'][_0x3a42('0x4b')]+'%'};return _0x128d61;})});}_0x302b24=_['merge']({},_0x302b24,_0x4c20f4[_0x3a42('0x4c')]);return _0x47956a[_0x3a42('0x5a')](_0x302b24);}})[_0x3a42('0x32')](function(_0x9621ee){if(_0x9621ee){_0x376aa0=_0x9621ee[_0x3a42('0x42')];if(!_0x4c20f4[_0x3a42('0x3e')][_0x3a42('0x43')]('nolimit')){_0x302b24[_0x3a42('0x2d')]=qs[_0x3a42('0x2d')](_0x4c20f4['query'][_0x3a42('0x2d')]);_0x302b24[_0x3a42('0x2c')]=qs['offset'](_0x4c20f4[_0x3a42('0x3e')][_0x3a42('0x2c')]);}return _0x47956a[_0x3a42('0x5a')](_0x302b24);}})[_0x3a42('0x32')](function(_0x4e226c){if(_0x4e226c){return _0x4e226c?{'count':_0x376aa0,'rows':_0x4e226c}:null;}})['then'](respondWithResult(_0xc2e895,null))['catch'](handleError(_0xc2e895,null));};exports[_0x3a42('0x5b')]=function(_0x248bb9,_0x12e3f1,_0x55f4df){var _0x4c2025={};var _0x505fc4={};var _0x3a663b;var _0x560e3c;return db[_0x3a42('0x38')]['findOne']({'where':{'id':_0x248bb9[_0x3a42('0x57')]['id']}})['then'](handleEntityNotFound(_0x12e3f1,null))['then'](function(_0xc3ad1f){if(_0xc3ad1f){_0x3a663b=_0xc3ad1f;_0x505fc4['model']=_[_0x3a42('0x3f')](db['FreshsalesField']['rawAttributes']);_0x505fc4[_0x3a42('0x3e')]=_[_0x3a42('0x3f')](_0x248bb9[_0x3a42('0x3e')]);_0x505fc4[_0x3a42('0x40')]=_['intersection'](_0x505fc4[_0x3a42('0x3d')],_0x505fc4[_0x3a42('0x3e')]);_0x4c2025[_0x3a42('0x53')]=_['intersection'](_0x505fc4[_0x3a42('0x3d')],qs[_0x3a42('0x52')](_0x248bb9['query'][_0x3a42('0x52')]));_0x4c2025[_0x3a42('0x53')]=_0x4c2025[_0x3a42('0x53')][_0x3a42('0x42')]?_0x4c2025[_0x3a42('0x53')]:_0x505fc4[_0x3a42('0x3d')];_0x4c2025['order']=qs[_0x3a42('0x46')](_0x248bb9['query'][_0x3a42('0x46')]);_0x4c2025[_0x3a42('0x47')]=qs['filters'](_[_0x3a42('0x48')](_0x248bb9['query'],_0x505fc4[_0x3a42('0x40')]));if(_0x248bb9[_0x3a42('0x3e')][_0x3a42('0x4b')]){_0x4c2025[_0x3a42('0x47')]=_['merge'](_0x4c2025[_0x3a42('0x47')],{'$or':_[_0x3a42('0x37')](_0x4c2025[_0x3a42('0x53')],function(_0x59aa24){var _0x40168e={};_0x40168e[_0x59aa24]={'$like':'%'+_0x248bb9[_0x3a42('0x3e')][_0x3a42('0x4b')]+'%'};return _0x40168e;})});}_0x4c2025=_[_0x3a42('0x49')]({},_0x4c2025,_0x248bb9[_0x3a42('0x4c')]);return _0x3a663b[_0x3a42('0x5b')](_0x4c2025);}})['then'](function(_0x18f8f8){if(_0x18f8f8){_0x560e3c=_0x18f8f8[_0x3a42('0x42')];if(!_0x248bb9['query'][_0x3a42('0x43')](_0x3a42('0x44'))){_0x4c2025[_0x3a42('0x2d')]=qs[_0x3a42('0x2d')](_0x248bb9['query'][_0x3a42('0x2d')]);_0x4c2025[_0x3a42('0x2c')]=qs[_0x3a42('0x2c')](_0x248bb9[_0x3a42('0x3e')][_0x3a42('0x2c')]);}return _0x3a663b[_0x3a42('0x5b')](_0x4c2025);}})[_0x3a42('0x32')](function(_0x2b9798){if(_0x2b9798){return _0x2b9798?{'count':_0x560e3c,'rows':_0x2b9798}:null;}})[_0x3a42('0x32')](respondWithResult(_0x12e3f1,null))[_0x3a42('0x27')](handleError(_0x12e3f1,null));};exports['getFields']=function(_0x3bc4e7,_0x5725aa,_0x2d0aa1){var _0x4e6f56={};var _0x166d02={};var _0x467180;var _0x39a9e7;return db['FreshsalesConfiguration'][_0x3a42('0x58')]({'where':{'id':_0x3bc4e7[_0x3a42('0x57')]['id']}})[_0x3a42('0x32')](handleEntityNotFound(_0x5725aa,null))[_0x3a42('0x32')](function(_0x1896f2){if(_0x1896f2){_0x467180=_0x1896f2;_0x166d02[_0x3a42('0x3d')]=_[_0x3a42('0x3f')](db['FreshsalesField'][_0x3a42('0x39')]);_0x166d02[_0x3a42('0x3e')]=_['keys'](_0x3bc4e7[_0x3a42('0x3e')]);_0x166d02[_0x3a42('0x40')]=_[_0x3a42('0x41')](_0x166d02['model'],_0x166d02[_0x3a42('0x3e')]);_0x4e6f56[_0x3a42('0x53')]=_[_0x3a42('0x41')](_0x166d02[_0x3a42('0x3d')],qs['fields'](_0x3bc4e7[_0x3a42('0x3e')][_0x3a42('0x52')]));_0x4e6f56[_0x3a42('0x53')]=_0x4e6f56[_0x3a42('0x53')]['length']?_0x4e6f56[_0x3a42('0x53')]:_0x166d02[_0x3a42('0x3d')];_0x4e6f56[_0x3a42('0x45')]=qs[_0x3a42('0x46')](_0x3bc4e7[_0x3a42('0x3e')][_0x3a42('0x46')]);_0x4e6f56[_0x3a42('0x47')]=qs[_0x3a42('0x40')](_[_0x3a42('0x48')](_0x3bc4e7[_0x3a42('0x3e')],_0x166d02[_0x3a42('0x40')]));if(_0x3bc4e7[_0x3a42('0x3e')][_0x3a42('0x4b')]){_0x4e6f56[_0x3a42('0x47')]=_['merge'](_0x4e6f56[_0x3a42('0x47')],{'$or':_['map'](_0x4e6f56[_0x3a42('0x53')],function(_0x432d68){var _0x21504a={};_0x21504a[_0x432d68]={'$like':'%'+_0x3bc4e7['query']['filter']+'%'};return _0x21504a;})});}_0x4e6f56=_[_0x3a42('0x49')]({},_0x4e6f56,_0x3bc4e7['options']);return _0x467180[_0x3a42('0x5c')](_0x4e6f56);}})[_0x3a42('0x32')](function(_0x2fc6d2){if(_0x2fc6d2){_0x39a9e7=_0x2fc6d2['length'];if(!_0x3bc4e7[_0x3a42('0x3e')][_0x3a42('0x43')]('nolimit')){_0x4e6f56[_0x3a42('0x2d')]=qs['limit'](_0x3bc4e7[_0x3a42('0x3e')][_0x3a42('0x2d')]);_0x4e6f56[_0x3a42('0x2c')]=qs[_0x3a42('0x2c')](_0x3bc4e7[_0x3a42('0x3e')][_0x3a42('0x2c')]);}return _0x467180['getFields'](_0x4e6f56);}})['then'](function(_0x46f775){if(_0x46f775){return _0x46f775?{'count':_0x39a9e7,'rows':_0x46f775}:null;}})['then'](respondWithResult(_0x5725aa,null))[_0x3a42('0x27')](handleError(_0x5725aa,null));};
\ No newline at end of file
+var _0xf494=['bluebird','mustache','util','path','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','jayson/promise','client','test','Sequelize','ValidationError','request','info','FreshsalesConfiguration,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','sendStatus','end','status','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','send','index','map','FreshsalesConfiguration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','pick','filter','merge','options','where','includeAll','findAll','catch','show','params','find','body','getSubjects','FreshsalesField','length','sort','getDescriptions','getFields','findOne','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment'];(function(_0x56b93a,_0x8473a4){var _0x155a17=function(_0xe0436){while(--_0xe0436){_0x56b93a['push'](_0x56b93a['shift']());}};_0x155a17(++_0x8473a4);}(_0xf494,0x1c6));var _0x4f49=function(_0x5c5c32,_0x5355b1){_0x5c5c32=_0x5c5c32-0x0;var _0x22392c=_0xf494[_0x5c5c32];return _0x22392c;};'use strict';var pdf=require(_0x4f49('0x0'));var emlformat=require(_0x4f49('0x1'));var rimraf=require(_0x4f49('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4f49('0x3'));var rp=require(_0x4f49('0x4'));var moment=require(_0x4f49('0x5'));var BPromise=require(_0x4f49('0x6'));var Mustache=require(_0x4f49('0x7'));var util=require(_0x4f49('0x8'));var path=require(_0x4f49('0x9'));var sox=require(_0x4f49('0xa'));var csv=require(_0x4f49('0xb'));var ejs=require(_0x4f49('0xc'));var fs=require('fs');var _=require(_0x4f49('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x4f49('0xe'));var deskjs=require(_0x4f49('0xf'));var toCsv=require(_0x4f49('0xb'));var querystring=require(_0x4f49('0x10'));var Papa=require(_0x4f49('0x11'));var Redis=require(_0x4f49('0x12'));var authService=require(_0x4f49('0x13'));var qs=require(_0x4f49('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4f49('0x15'));var logger=require(_0x4f49('0x16'))('api');var utils=require(_0x4f49('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var jayson=require(_0x4f49('0x18'));var client=jayson[_0x4f49('0x19')]['http']({'port':0x232a});function checkPasswordPattern(_0x1e1c37,_0x111a8b,_0x1b9145){if(_0x1b9145){var _0x2efe49=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2efe49[_0x4f49('0x1a')](_0x111a8b)){return _0x1e1c37;}else{throw new db[(_0x4f49('0x1b'))][(_0x4f49('0x1c'))]('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 _0x1e1c37;}}function respondWithRpcPromise(_0x515ace,_0x1f2d0d,_0x415e83,_0x5878f4){return new BPromise(function(_0x5bdfaf,_0x2f0a0d){var _0x2ecaaa=_0x5878f4||client;return _0x2ecaaa[_0x4f49('0x1d')](_0x515ace,_0x415e83)['then'](function(_0x1dccfd){logger[_0x4f49('0x1e')](_0x4f49('0x1f'),_0x1f2d0d,'request\x20sent');logger['debug']('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x1f2d0d,'request\x20sent',JSON[_0x4f49('0x20')](_0x1dccfd));if(_0x1dccfd[_0x4f49('0x21')]){if(_0x1dccfd[_0x4f49('0x21')][_0x4f49('0x22')]===0x1f4){logger['error'](_0x4f49('0x1f'),_0x1f2d0d,_0x1dccfd[_0x4f49('0x21')][_0x4f49('0x23')]);return _0x2f0a0d(_0x1dccfd[_0x4f49('0x21')][_0x4f49('0x23')]);}logger['error'](_0x4f49('0x1f'),_0x1f2d0d,_0x1dccfd[_0x4f49('0x21')][_0x4f49('0x23')]);return _0x5bdfaf(_0x1dccfd['error'][_0x4f49('0x23')]);}else{logger[_0x4f49('0x1e')](_0x4f49('0x1f'),_0x1f2d0d,_0x4f49('0x24'));_0x5bdfaf(_0x1dccfd[_0x4f49('0x25')][_0x4f49('0x23')]);}})['catch'](function(_0x4e9041){logger[_0x4f49('0x21')](_0x4f49('0x1f'),_0x1f2d0d,_0x4e9041);_0x2f0a0d(_0x4e9041);});});}function respondWithStatusCode(_0x4fedbb,_0x408552){_0x408552=_0x408552||0xcc;return function(_0x2c1519){if(_0x2c1519){return _0x4fedbb[_0x4f49('0x26')](_0x408552);}return _0x4fedbb['status'](_0x408552)[_0x4f49('0x27')]();};}function respondWithResult(_0x2eed1c,_0x298785){_0x298785=_0x298785||0xc8;return function(_0x148153){if(_0x148153){return _0x2eed1c[_0x4f49('0x28')](_0x298785)[_0x4f49('0x29')](_0x148153);}};}function respondWithFilteredResult(_0x4915af,_0x50c571){return function(_0x239f44){if(_0x239f44){var _0x2c00ee=_0x239f44[_0x4f49('0x2a')],_0x605c91=_0x50c571[_0x4f49('0x2b')],_0x560050=_0x50c571['offset']+_0x50c571['limit'],_0x3cbfbd;if(_0x560050>=_0x2c00ee){_0x560050=_0x2c00ee;_0x3cbfbd=0xc8;}else{_0x3cbfbd=0xce;}_0x4915af[_0x4f49('0x28')](_0x3cbfbd);return _0x4915af[_0x4f49('0x2c')](_0x4f49('0x2d'),_0x605c91+'-'+_0x560050+'/'+_0x2c00ee)['json'](_0x239f44);}return null;};}function patchUpdates(_0x1eaac6){return function(_0x35aa33){try{jsonpatch[_0x4f49('0x2e')](_0x35aa33,_0x1eaac6,!![]);}catch(_0x2ceda4){return BPromise[_0x4f49('0x2f')](_0x2ceda4);}return _0x35aa33[_0x4f49('0x30')]();};}function saveUpdates(_0x32c066,_0x45ae19){return function(_0x1f38d3){if(_0x1f38d3){return _0x1f38d3[_0x4f49('0x31')](_0x32c066)[_0x4f49('0x32')](function(_0xf65ac6){return _0xf65ac6;});}return null;};}function removeEntity(_0x29ff83,_0x6625cd){return function(_0x135d17){if(_0x135d17){return _0x135d17[_0x4f49('0x33')]()[_0x4f49('0x32')](function(){_0x29ff83[_0x4f49('0x28')](0xcc)[_0x4f49('0x27')]();});}};}function handleEntityNotFound(_0x492b16,_0x45d0d2){return function(_0x46b7ba){if(!_0x46b7ba){_0x492b16[_0x4f49('0x26')](0x194);}return _0x46b7ba;};}function handleError(_0x1cb3cc,_0x1c3af8){_0x1c3af8=_0x1c3af8||0x1f4;return function(_0x15e82b){logger[_0x4f49('0x21')](_0x15e82b[_0x4f49('0x34')]);if(_0x15e82b[_0x4f49('0x35')]){delete _0x15e82b[_0x4f49('0x35')];}_0x1cb3cc[_0x4f49('0x28')](_0x1c3af8)[_0x4f49('0x36')](_0x15e82b);};}exports[_0x4f49('0x37')]=function(_0x4d2d57,_0x371282){var _0x27b7a9={},_0x36000a={},_0x26014f={'count':0x0,'rows':[]};var _0x1c1e9b=_[_0x4f49('0x38')](db[_0x4f49('0x39')][_0x4f49('0x3a')],function(_0x10bfc4){return{'name':_0x10bfc4[_0x4f49('0x3b')],'type':_0x10bfc4[_0x4f49('0x3c')][_0x4f49('0x3d')]};});_0x36000a[_0x4f49('0x3e')]=_[_0x4f49('0x38')](_0x1c1e9b,'name');_0x36000a[_0x4f49('0x3f')]=_[_0x4f49('0x40')](_0x4d2d57['query']);_0x36000a[_0x4f49('0x41')]=_[_0x4f49('0x42')](_0x36000a['model'],_0x36000a[_0x4f49('0x3f')]);_0x27b7a9[_0x4f49('0x43')]=_[_0x4f49('0x42')](_0x36000a[_0x4f49('0x3e')],qs[_0x4f49('0x44')](_0x4d2d57[_0x4f49('0x3f')][_0x4f49('0x44')]));_0x27b7a9['attributes']=_0x27b7a9['attributes']['length']?_0x27b7a9[_0x4f49('0x43')]:_0x36000a[_0x4f49('0x3e')];if(!_0x4d2d57[_0x4f49('0x3f')][_0x4f49('0x45')](_0x4f49('0x46'))){_0x27b7a9[_0x4f49('0x47')]=qs[_0x4f49('0x47')](_0x4d2d57[_0x4f49('0x3f')][_0x4f49('0x47')]);_0x27b7a9['offset']=qs['offset'](_0x4d2d57[_0x4f49('0x3f')][_0x4f49('0x2b')]);}_0x27b7a9[_0x4f49('0x48')]=qs['sort'](_0x4d2d57[_0x4f49('0x3f')]['sort']);_0x27b7a9['where']=qs[_0x4f49('0x41')](_[_0x4f49('0x49')](_0x4d2d57[_0x4f49('0x3f')],_0x36000a['filters']));if(_0x4d2d57[_0x4f49('0x3f')][_0x4f49('0x4a')]){_0x27b7a9['where']=_[_0x4f49('0x4b')](_0x27b7a9['where'],{'$or':_[_0x4f49('0x38')](_0x1c1e9b,function(_0xb9601){if(_0xb9601[_0x4f49('0x3c')]!=='VIRTUAL'){var _0x23a0fc={};_0x23a0fc[_0xb9601[_0x4f49('0x35')]]={'$like':'%'+_0x4d2d57[_0x4f49('0x3f')][_0x4f49('0x4a')]+'%'};return _0x23a0fc;}})});}_0x27b7a9=_[_0x4f49('0x4b')]({},_0x27b7a9,_0x4d2d57[_0x4f49('0x4c')]);var _0xe66867={'where':_0x27b7a9[_0x4f49('0x4d')]};return db[_0x4f49('0x39')][_0x4f49('0x2a')](_0xe66867)['then'](function(_0x26c222){_0x26014f[_0x4f49('0x2a')]=_0x26c222;if(_0x4d2d57['query'][_0x4f49('0x4e')]){_0x27b7a9['include']=[{'all':!![]}];}return db[_0x4f49('0x39')][_0x4f49('0x4f')](_0x27b7a9);})[_0x4f49('0x32')](function(_0x300230){_0x26014f['rows']=_0x300230;return _0x26014f;})[_0x4f49('0x32')](respondWithFilteredResult(_0x371282,_0x27b7a9))[_0x4f49('0x50')](handleError(_0x371282,null));};exports[_0x4f49('0x51')]=function(_0x973099,_0x3ec266){var _0x72ea05={'raw':![],'where':{'id':_0x973099[_0x4f49('0x52')]['id']}},_0x37fdb7={};_0x37fdb7[_0x4f49('0x3e')]=_[_0x4f49('0x40')](db[_0x4f49('0x39')][_0x4f49('0x3a')]);_0x37fdb7[_0x4f49('0x3f')]=_[_0x4f49('0x40')](_0x973099[_0x4f49('0x3f')]);_0x37fdb7[_0x4f49('0x41')]=_['intersection'](_0x37fdb7['model'],_0x37fdb7[_0x4f49('0x3f')]);_0x72ea05[_0x4f49('0x43')]=_[_0x4f49('0x42')](_0x37fdb7[_0x4f49('0x3e')],qs[_0x4f49('0x44')](_0x973099[_0x4f49('0x3f')][_0x4f49('0x44')]));_0x72ea05['attributes']=_0x72ea05[_0x4f49('0x43')]['length']?_0x72ea05[_0x4f49('0x43')]:_0x37fdb7[_0x4f49('0x3e')];if(_0x973099[_0x4f49('0x3f')][_0x4f49('0x4e')]){_0x72ea05['include']=[{'all':!![]}];}_0x72ea05=_[_0x4f49('0x4b')]({},_0x72ea05,_0x973099['options']);return db['FreshsalesConfiguration'][_0x4f49('0x53')](_0x72ea05)[_0x4f49('0x32')](handleEntityNotFound(_0x3ec266,null))[_0x4f49('0x32')](respondWithResult(_0x3ec266,null))[_0x4f49('0x50')](handleError(_0x3ec266,null));};exports['create']=function(_0x599c51,_0xd7f47b){return db[_0x4f49('0x39')]['create'](_0x599c51[_0x4f49('0x54')],{})['then'](respondWithResult(_0xd7f47b,0xc9))['catch'](handleError(_0xd7f47b,null));};exports[_0x4f49('0x31')]=function(_0x5f3a80,_0xfa7dd6){if(_0x5f3a80['body']['id']){delete _0x5f3a80[_0x4f49('0x54')]['id'];}return db[_0x4f49('0x39')][_0x4f49('0x53')]({'where':{'id':_0x5f3a80[_0x4f49('0x52')]['id']}})[_0x4f49('0x32')](handleEntityNotFound(_0xfa7dd6,null))[_0x4f49('0x32')](saveUpdates(_0x5f3a80[_0x4f49('0x54')],null))[_0x4f49('0x32')](respondWithResult(_0xfa7dd6,null))['catch'](handleError(_0xfa7dd6,null));};exports[_0x4f49('0x33')]=function(_0x51f57e,_0x213608){return db[_0x4f49('0x39')][_0x4f49('0x53')]({'where':{'id':_0x51f57e[_0x4f49('0x52')]['id']}})[_0x4f49('0x32')](handleEntityNotFound(_0x213608,null))[_0x4f49('0x32')](removeEntity(_0x213608,null))['catch'](handleError(_0x213608,null));};exports[_0x4f49('0x55')]=function(_0xd3689c,_0x5e3568,_0x5d2b3c){var _0x121c04={};var _0x447dde={};var _0x2e0df5;var _0x2409f1;return db[_0x4f49('0x39')]['findOne']({'where':{'id':_0xd3689c[_0x4f49('0x52')]['id']}})['then'](handleEntityNotFound(_0x5e3568,null))[_0x4f49('0x32')](function(_0x372dfd){if(_0x372dfd){_0x2e0df5=_0x372dfd;_0x447dde[_0x4f49('0x3e')]=_['keys'](db[_0x4f49('0x56')][_0x4f49('0x3a')]);_0x447dde[_0x4f49('0x3f')]=_[_0x4f49('0x40')](_0xd3689c['query']);_0x447dde[_0x4f49('0x41')]=_[_0x4f49('0x42')](_0x447dde['model'],_0x447dde[_0x4f49('0x3f')]);_0x121c04[_0x4f49('0x43')]=_[_0x4f49('0x42')](_0x447dde[_0x4f49('0x3e')],qs[_0x4f49('0x44')](_0xd3689c[_0x4f49('0x3f')][_0x4f49('0x44')]));_0x121c04[_0x4f49('0x43')]=_0x121c04['attributes'][_0x4f49('0x57')]?_0x121c04[_0x4f49('0x43')]:_0x447dde[_0x4f49('0x3e')];_0x121c04[_0x4f49('0x48')]=qs[_0x4f49('0x58')](_0xd3689c[_0x4f49('0x3f')][_0x4f49('0x58')]);_0x121c04['where']=qs[_0x4f49('0x41')](_['pick'](_0xd3689c[_0x4f49('0x3f')],_0x447dde[_0x4f49('0x41')]));if(_0xd3689c[_0x4f49('0x3f')][_0x4f49('0x4a')]){_0x121c04[_0x4f49('0x4d')]=_[_0x4f49('0x4b')](_0x121c04[_0x4f49('0x4d')],{'$or':_[_0x4f49('0x38')](_0x121c04[_0x4f49('0x43')],function(_0x176a6a){var _0x545552={};_0x545552[_0x176a6a]={'$like':'%'+_0xd3689c[_0x4f49('0x3f')][_0x4f49('0x4a')]+'%'};return _0x545552;})});}_0x121c04=_[_0x4f49('0x4b')]({},_0x121c04,_0xd3689c[_0x4f49('0x4c')]);return _0x2e0df5['getSubjects'](_0x121c04);}})['then'](function(_0x28e8ae){if(_0x28e8ae){_0x2409f1=_0x28e8ae['length'];if(!_0xd3689c[_0x4f49('0x3f')][_0x4f49('0x45')](_0x4f49('0x46'))){_0x121c04[_0x4f49('0x47')]=qs[_0x4f49('0x47')](_0xd3689c[_0x4f49('0x3f')][_0x4f49('0x47')]);_0x121c04[_0x4f49('0x2b')]=qs[_0x4f49('0x2b')](_0xd3689c[_0x4f49('0x3f')][_0x4f49('0x2b')]);}return _0x2e0df5[_0x4f49('0x55')](_0x121c04);}})[_0x4f49('0x32')](function(_0xd53de8){if(_0xd53de8){return _0xd53de8?{'count':_0x2409f1,'rows':_0xd53de8}:null;}})[_0x4f49('0x32')](respondWithResult(_0x5e3568,null))[_0x4f49('0x50')](handleError(_0x5e3568,null));};exports[_0x4f49('0x59')]=function(_0x753863,_0x1f9161,_0x1434ea){var _0x2c3962={};var _0x3e9389={};var _0xf6d04b;var _0x4683f8;return db[_0x4f49('0x39')]['findOne']({'where':{'id':_0x753863[_0x4f49('0x52')]['id']}})['then'](handleEntityNotFound(_0x1f9161,null))[_0x4f49('0x32')](function(_0x3b0990){if(_0x3b0990){_0xf6d04b=_0x3b0990;_0x3e9389[_0x4f49('0x3e')]=_[_0x4f49('0x40')](db[_0x4f49('0x56')][_0x4f49('0x3a')]);_0x3e9389[_0x4f49('0x3f')]=_[_0x4f49('0x40')](_0x753863[_0x4f49('0x3f')]);_0x3e9389['filters']=_['intersection'](_0x3e9389[_0x4f49('0x3e')],_0x3e9389['query']);_0x2c3962[_0x4f49('0x43')]=_[_0x4f49('0x42')](_0x3e9389[_0x4f49('0x3e')],qs[_0x4f49('0x44')](_0x753863[_0x4f49('0x3f')]['fields']));_0x2c3962['attributes']=_0x2c3962[_0x4f49('0x43')][_0x4f49('0x57')]?_0x2c3962['attributes']:_0x3e9389[_0x4f49('0x3e')];_0x2c3962[_0x4f49('0x48')]=qs['sort'](_0x753863[_0x4f49('0x3f')]['sort']);_0x2c3962[_0x4f49('0x4d')]=qs[_0x4f49('0x41')](_['pick'](_0x753863[_0x4f49('0x3f')],_0x3e9389[_0x4f49('0x41')]));if(_0x753863[_0x4f49('0x3f')][_0x4f49('0x4a')]){_0x2c3962[_0x4f49('0x4d')]=_[_0x4f49('0x4b')](_0x2c3962['where'],{'$or':_[_0x4f49('0x38')](_0x2c3962['attributes'],function(_0x3ecc94){var _0x574343={};_0x574343[_0x3ecc94]={'$like':'%'+_0x753863[_0x4f49('0x3f')]['filter']+'%'};return _0x574343;})});}_0x2c3962=_[_0x4f49('0x4b')]({},_0x2c3962,_0x753863[_0x4f49('0x4c')]);return _0xf6d04b[_0x4f49('0x59')](_0x2c3962);}})[_0x4f49('0x32')](function(_0x47af99){if(_0x47af99){_0x4683f8=_0x47af99[_0x4f49('0x57')];if(!_0x753863['query'][_0x4f49('0x45')]('nolimit')){_0x2c3962[_0x4f49('0x47')]=qs['limit'](_0x753863['query'][_0x4f49('0x47')]);_0x2c3962[_0x4f49('0x2b')]=qs[_0x4f49('0x2b')](_0x753863['query'][_0x4f49('0x2b')]);}return _0xf6d04b[_0x4f49('0x59')](_0x2c3962);}})['then'](function(_0x5d52ae){if(_0x5d52ae){return _0x5d52ae?{'count':_0x4683f8,'rows':_0x5d52ae}:null;}})['then'](respondWithResult(_0x1f9161,null))[_0x4f49('0x50')](handleError(_0x1f9161,null));};exports[_0x4f49('0x5a')]=function(_0x38a515,_0x87439,_0x1643fc){var _0x517144={};var _0x15b7e4={};var _0x1b922e;var _0x29de92;return db['FreshsalesConfiguration'][_0x4f49('0x5b')]({'where':{'id':_0x38a515[_0x4f49('0x52')]['id']}})[_0x4f49('0x32')](handleEntityNotFound(_0x87439,null))[_0x4f49('0x32')](function(_0x5ea6b4){if(_0x5ea6b4){_0x1b922e=_0x5ea6b4;_0x15b7e4[_0x4f49('0x3e')]=_[_0x4f49('0x40')](db[_0x4f49('0x56')][_0x4f49('0x3a')]);_0x15b7e4[_0x4f49('0x3f')]=_['keys'](_0x38a515[_0x4f49('0x3f')]);_0x15b7e4[_0x4f49('0x41')]=_['intersection'](_0x15b7e4[_0x4f49('0x3e')],_0x15b7e4['query']);_0x517144[_0x4f49('0x43')]=_['intersection'](_0x15b7e4[_0x4f49('0x3e')],qs[_0x4f49('0x44')](_0x38a515[_0x4f49('0x3f')][_0x4f49('0x44')]));_0x517144[_0x4f49('0x43')]=_0x517144['attributes'][_0x4f49('0x57')]?_0x517144[_0x4f49('0x43')]:_0x15b7e4[_0x4f49('0x3e')];_0x517144[_0x4f49('0x48')]=qs['sort'](_0x38a515[_0x4f49('0x3f')]['sort']);_0x517144[_0x4f49('0x4d')]=qs['filters'](_[_0x4f49('0x49')](_0x38a515[_0x4f49('0x3f')],_0x15b7e4[_0x4f49('0x41')]));if(_0x38a515[_0x4f49('0x3f')][_0x4f49('0x4a')]){_0x517144[_0x4f49('0x4d')]=_[_0x4f49('0x4b')](_0x517144[_0x4f49('0x4d')],{'$or':_[_0x4f49('0x38')](_0x517144[_0x4f49('0x43')],function(_0x5e6c35){var _0x33098a={};_0x33098a[_0x5e6c35]={'$like':'%'+_0x38a515[_0x4f49('0x3f')][_0x4f49('0x4a')]+'%'};return _0x33098a;})});}_0x517144=_[_0x4f49('0x4b')]({},_0x517144,_0x38a515[_0x4f49('0x4c')]);return _0x1b922e[_0x4f49('0x5a')](_0x517144);}})['then'](function(_0x2ec42b){if(_0x2ec42b){_0x29de92=_0x2ec42b[_0x4f49('0x57')];if(!_0x38a515[_0x4f49('0x3f')][_0x4f49('0x45')]('nolimit')){_0x517144[_0x4f49('0x47')]=qs['limit'](_0x38a515[_0x4f49('0x3f')][_0x4f49('0x47')]);_0x517144[_0x4f49('0x2b')]=qs[_0x4f49('0x2b')](_0x38a515['query'][_0x4f49('0x2b')]);}return _0x1b922e[_0x4f49('0x5a')](_0x517144);}})[_0x4f49('0x32')](function(_0x1c053d){if(_0x1c053d){return _0x1c053d?{'count':_0x29de92,'rows':_0x1c053d}:null;}})[_0x4f49('0x32')](respondWithResult(_0x87439,null))[_0x4f49('0x50')](handleError(_0x87439,null));};
\ No newline at end of file
diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js
index 7721f51..445013d 100644
--- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js
+++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3e57=['define','FreshsalesConfiguration','int_freshsales_configurations','lodash','util','api','request-promise','path','rimraf','./intFreshsalesConfiguration.attributes','exports'];(function(_0x53db2d,_0x38661a){var _0xc93ccf=function(_0x9f3b6){while(--_0x9f3b6){_0x53db2d['push'](_0x53db2d['shift']());}};_0xc93ccf(++_0x38661a);}(_0x3e57,0x1d1));var _0x73e5=function(_0x46a38b,_0x16ffb5){_0x46a38b=_0x46a38b-0x0;var _0x346e75=_0x3e57[_0x46a38b];return _0x346e75;};'use strict';var _=require(_0x73e5('0x0'));var util=require(_0x73e5('0x1'));var logger=require('../../config/logger')(_0x73e5('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x73e5('0x3'));var fs=require('fs');var path=require(_0x73e5('0x4'));var rimraf=require(_0x73e5('0x5'));var config=require('../../config/environment');var attributes=require(_0x73e5('0x6'));module[_0x73e5('0x7')]=function(_0x591faa,_0x36f626){return _0x591faa[_0x73e5('0x8')](_0x73e5('0x9'),attributes,{'tableName':_0x73e5('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc423=['path','rimraf','./intFreshsalesConfiguration.attributes','exports','define','FreshsalesConfiguration','int_freshsales_configurations','lodash','util','../../config/logger','api','moment','request-promise'];(function(_0x53d172,_0x46611b){var _0x1bd0a2=function(_0x19fb52){while(--_0x19fb52){_0x53d172['push'](_0x53d172['shift']());}};_0x1bd0a2(++_0x46611b);}(_0xc423,0x159));var _0x3c42=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xc423[_0x413feb];return _0x40ee88;};'use strict';var _=require(_0x3c42('0x0'));var util=require(_0x3c42('0x1'));var logger=require(_0x3c42('0x2'))(_0x3c42('0x3'));var moment=require(_0x3c42('0x4'));var BPromise=require('bluebird');var rp=require(_0x3c42('0x5'));var fs=require('fs');var path=require(_0x3c42('0x6'));var rimraf=require(_0x3c42('0x7'));var config=require('../../config/environment');var attributes=require(_0x3c42('0x8'));module[_0x3c42('0x9')]=function(_0x14e395,_0x1feba8){return _0x14e395[_0x3c42('0xa')](_0x3c42('0xb'),attributes,{'tableName':_0x3c42('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js
index 0ffd932..5d249fd 100644
--- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js
+++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc4e6=['rpc','../../config/environment','client','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0xc4e6,0x1d9));var _0x6c4e=function(_0x46ec32,_0x1e842f){_0x46ec32=_0x46ec32-0x0;var _0x338f60=_0xc4e6[_0x46ec32];return _0x338f60;};'use strict';var _=require(_0x6c4e('0x0'));var util=require(_0x6c4e('0x1'));var moment=require('moment');var BPromise=require(_0x6c4e('0x2'));var rs=require(_0x6c4e('0x3'));var fs=require('fs');var Redis=require(_0x6c4e('0x4'));var db=require(_0x6c4e('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x6c4e('0x6'))(_0x6c4e('0x7'));var config=require(_0x6c4e('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x6c4e('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x56fec4,_0x3355f9,_0x394d8b){return new BPromise(function(_0xb0496a,_0x2f91ad){return client[_0x6c4e('0xa')](_0x56fec4,_0x394d8b)[_0x6c4e('0xb')](function(_0x58c1da){logger[_0x6c4e('0xc')](_0x6c4e('0xd'),_0x3355f9,_0x6c4e('0xe'));logger[_0x6c4e('0xf')](_0x6c4e('0x10'),_0x3355f9,'request\x20sent',JSON['stringify'](_0x58c1da));if(_0x58c1da[_0x6c4e('0x11')]){if(_0x58c1da[_0x6c4e('0x11')][_0x6c4e('0x12')]===0x1f4){logger['error'](_0x6c4e('0xd'),_0x3355f9,_0x58c1da[_0x6c4e('0x11')][_0x6c4e('0x13')]);return _0x2f91ad(_0x58c1da[_0x6c4e('0x11')]['message']);}logger[_0x6c4e('0x11')](_0x6c4e('0xd'),_0x3355f9,_0x58c1da[_0x6c4e('0x11')][_0x6c4e('0x13')]);return _0xb0496a(_0x58c1da[_0x6c4e('0x11')]['message']);}else{logger[_0x6c4e('0xc')](_0x6c4e('0xd'),_0x3355f9,_0x6c4e('0xe'));_0xb0496a(_0x58c1da['result']['message']);}})['catch'](function(_0x5e4e88){logger[_0x6c4e('0x11')](_0x6c4e('0xd'),_0x3355f9,_0x5e4e88);_0x2f91ad(_0x5e4e88);});});}
\ No newline at end of file
+var _0x7980=['message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x53537c,_0x256227){var _0x53a442=function(_0x50d845){while(--_0x50d845){_0x53537c['push'](_0x53537c['shift']());}};_0x53a442(++_0x256227);}(_0x7980,0xab));var _0x0798=function(_0x46e2bb,_0x276efb){_0x46e2bb=_0x46e2bb-0x0;var _0x243efb=_0x7980[_0x46e2bb];return _0x243efb;};'use strict';var _=require(_0x0798('0x0'));var util=require(_0x0798('0x1'));var moment=require(_0x0798('0x2'));var BPromise=require(_0x0798('0x3'));var rs=require(_0x0798('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0798('0x5'))['db'];var utils=require(_0x0798('0x6'));var logger=require(_0x0798('0x7'))(_0x0798('0x8'));var config=require(_0x0798('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x0798('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1e534f,_0x34f808,_0x467859){return new BPromise(function(_0x54da10,_0x5151b3){return client[_0x0798('0xb')](_0x1e534f,_0x467859)[_0x0798('0xc')](function(_0x301a55){logger[_0x0798('0xd')](_0x0798('0xe'),_0x34f808,_0x0798('0xf'));logger[_0x0798('0x10')](_0x0798('0x11'),_0x34f808,_0x0798('0xf'),JSON[_0x0798('0x12')](_0x301a55));if(_0x301a55['error']){if(_0x301a55[_0x0798('0x13')][_0x0798('0x14')]===0x1f4){logger['error']('FreshsalesConfiguration,\x20%s,\x20%s',_0x34f808,_0x301a55[_0x0798('0x13')][_0x0798('0x15')]);return _0x5151b3(_0x301a55[_0x0798('0x13')][_0x0798('0x15')]);}logger[_0x0798('0x13')](_0x0798('0xe'),_0x34f808,_0x301a55[_0x0798('0x13')]['message']);return _0x54da10(_0x301a55['error'][_0x0798('0x15')]);}else{logger[_0x0798('0xd')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x34f808,'request\x20sent');_0x54da10(_0x301a55[_0x0798('0x16')][_0x0798('0x15')]);}})[_0x0798('0x17')](function(_0x5dc617){logger['error'](_0x0798('0xe'),_0x34f808,_0x5dc617);_0x5151b3(_0x5dc617);});});}
\ No newline at end of file
diff --git a/server/api/intFreshsalesField/index.js b/server/api/intFreshsalesField/index.js
index 7aa45ff..db42ca9 100644
--- a/server/api/intFreshsalesField/index.js
+++ b/server/api/intFreshsalesField/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaf09=['multer','util','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshsalesField.controller','get','isAuthenticated','/:id','show','destroy','exports'];(function(_0x35479f,_0x27ce56){var _0xed50ad=function(_0x4c2344){while(--_0x4c2344){_0x35479f['push'](_0x35479f['shift']());}};_0xed50ad(++_0x27ce56);}(_0xaf09,0xc3));var _0x9af0=function(_0x4e1d03,_0x786f3a){_0x4e1d03=_0x4e1d03-0x0;var _0x362d4b=_0xaf09[_0x4e1d03];return _0x362d4b;};'use strict';var multer=require(_0x9af0('0x0'));var util=require(_0x9af0('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x9af0('0x2'));var router=express['Router']();var auth=require(_0x9af0('0x3'));var interaction=require(_0x9af0('0x4'));var config=require(_0x9af0('0x5'));var controller=require(_0x9af0('0x6'));router[_0x9af0('0x7')]('/',auth[_0x9af0('0x8')](),controller['index']);router['get'](_0x9af0('0x9'),auth[_0x9af0('0x8')](),controller[_0x9af0('0xa')]);router['post']('/',auth[_0x9af0('0x8')](),controller['create']);router['put'](_0x9af0('0x9'),auth[_0x9af0('0x8')](),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x9af0('0xb')]);module[_0x9af0('0xc')]=router;
\ No newline at end of file
+var _0xe2c8=['put','update','delete','destroy','exports','multer','util','express','Router','../../components/interaction/service','isAuthenticated','index','get','/:id','post','create'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xe2c8,0xd5));var _0x8e2c=function(_0x1694f5,_0x49b7c3){_0x1694f5=_0x1694f5-0x0;var _0x5b4321=_0xe2c8[_0x1694f5];return _0x5b4321;};'use strict';var multer=require(_0x8e2c('0x0'));var util=require(_0x8e2c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x8e2c('0x2'));var router=express[_0x8e2c('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x8e2c('0x4'));var config=require('../../config/environment');var controller=require('./intFreshsalesField.controller');router['get']('/',auth[_0x8e2c('0x5')](),controller[_0x8e2c('0x6')]);router[_0x8e2c('0x7')](_0x8e2c('0x8'),auth[_0x8e2c('0x5')](),controller['show']);router[_0x8e2c('0x9')]('/',auth[_0x8e2c('0x5')](),controller[_0x8e2c('0xa')]);router[_0x8e2c('0xb')](_0x8e2c('0x8'),auth[_0x8e2c('0x5')](),controller[_0x8e2c('0xc')]);router[_0x8e2c('0xd')]('/:id',auth[_0x8e2c('0x5')](),controller[_0x8e2c('0xe')]);module[_0x8e2c('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/intFreshsalesField/intFreshsalesField.attributes.js b/server/api/intFreshsalesField/intFreshsalesField.attributes.js
index 0e829fc..2301268 100644
--- a/server/api/intFreshsalesField/intFreshsalesField.attributes.js
+++ b/server/api/intFreshsalesField/intFreshsalesField.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x360e=['customVariable','STRING','BOOLEAN','sequelize','exports','ENUM','string','variable','keyValue'];(function(_0x2668cd,_0x5f112c){var _0x2afcac=function(_0x3aed55){while(--_0x3aed55){_0x2668cd['push'](_0x2668cd['shift']());}};_0x2afcac(++_0x5f112c);}(_0x360e,0xf6));var _0xe360=function(_0x6dfbaa,_0x31eede){_0x6dfbaa=_0x6dfbaa-0x0;var _0xfbe02=_0x360e[_0x6dfbaa];return _0xfbe02;};'use strict';var Sequelize=require(_0xe360('0x0'));module[_0xe360('0x1')]={'type':{'type':Sequelize[_0xe360('0x2')](_0xe360('0x3'),_0xe360('0x4'),'customVariable',_0xe360('0x5')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xe360('0x2')](_0xe360('0x3'),'variable',_0xe360('0x6'))},'keyContent':{'type':Sequelize[_0xe360('0x7')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xe360('0x7')]},'customField':{'type':Sequelize[_0xe360('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xe360('0x7')]}};
\ No newline at end of file
+var _0x0590=['exports','string','variable','customVariable','keyValue','ENUM','STRING','BOOLEAN','sequelize'];(function(_0x157033,_0x398810){var _0x45d09f=function(_0x55086b){while(--_0x55086b){_0x157033['push'](_0x157033['shift']());}};_0x45d09f(++_0x398810);}(_0x0590,0x1d3));var _0x0059=function(_0x5a5399,_0x406fea){_0x5a5399=_0x5a5399-0x0;var _0x1537fd=_0x0590[_0x5a5399];return _0x1537fd;};'use strict';var Sequelize=require(_0x0059('0x0'));module[_0x0059('0x1')]={'type':{'type':Sequelize['ENUM'](_0x0059('0x2'),_0x0059('0x3'),_0x0059('0x4'),_0x0059('0x5')),'defaultValue':_0x0059('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x0059('0x6')](_0x0059('0x2'),_0x0059('0x3'),'customVariable')},'keyContent':{'type':Sequelize[_0x0059('0x7')]},'idField':{'type':Sequelize[_0x0059('0x7')]},'nameField':{'type':Sequelize[_0x0059('0x7')]},'customField':{'type':Sequelize[_0x0059('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x0059('0x7')]}};
\ No newline at end of file
diff --git a/server/api/intFreshsalesField/intFreshsalesField.controller.js b/server/api/intFreshsalesField/intFreshsalesField.controller.js
index 8130e17..f17e562 100644
--- a/server/api/intFreshsalesField/intFreshsalesField.controller.js
+++ b/server/api/intFreshsalesField/intFreshsalesField.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x34b7=['json','offset','limit','apply','reject','save','update','then','destroy','error','stack','name','index','map','FreshsalesField','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','VIRTUAL','filter','merge','count','includeAll','include','findAll','rows','show','params','find','catch','create','body','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end'];(function(_0x441f4a,_0x175ac6){var _0x5a1301=function(_0x48bbd4){while(--_0x48bbd4){_0x441f4a['push'](_0x441f4a['shift']());}};_0x5a1301(++_0x175ac6);}(_0x34b7,0x196));var _0x734b=function(_0x3fe30d,_0x469e48){_0x3fe30d=_0x3fe30d-0x0;var _0x37b3e1=_0x34b7[_0x3fe30d];return _0x37b3e1;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x734b('0x0'));var zipdir=require(_0x734b('0x1'));var jsonpatch=require(_0x734b('0x2'));var rp=require(_0x734b('0x3'));var moment=require(_0x734b('0x4'));var BPromise=require(_0x734b('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x734b('0x6'));var sox=require(_0x734b('0x7'));var csv=require(_0x734b('0x8'));var ejs=require(_0x734b('0x9'));var fs=require('fs');var _=require(_0x734b('0xa'));var squel=require(_0x734b('0xb'));var crypto=require('crypto');var jsforce=require(_0x734b('0xc'));var deskjs=require(_0x734b('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x734b('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x734b('0xf'));var as=require(_0x734b('0x10'));var hardwareService=require(_0x734b('0x11'));var logger=require(_0x734b('0x12'))(_0x734b('0x13'));var utils=require(_0x734b('0x14'));var config=require(_0x734b('0x15'));var db=require(_0x734b('0x16'))['db'];function respondWithStatusCode(_0x257657,_0x1e0fca){_0x1e0fca=_0x1e0fca||0xcc;return function(_0x189a82){if(_0x189a82){return _0x257657[_0x734b('0x17')](_0x1e0fca);}return _0x257657[_0x734b('0x18')](_0x1e0fca)[_0x734b('0x19')]();};}function respondWithResult(_0x5a5613,_0x18fc18){_0x18fc18=_0x18fc18||0xc8;return function(_0x252510){if(_0x252510){return _0x5a5613[_0x734b('0x18')](_0x18fc18)[_0x734b('0x1a')](_0x252510);}};}function respondWithFilteredResult(_0x19f427,_0x2e00ad){return function(_0x2372bd){if(_0x2372bd){var _0x2c03bd=_0x2372bd['count'],_0xa6d111=_0x2e00ad[_0x734b('0x1b')],_0x4b8c63=_0x2e00ad[_0x734b('0x1b')]+_0x2e00ad[_0x734b('0x1c')],_0x42407a;if(_0x4b8c63>=_0x2c03bd){_0x4b8c63=_0x2c03bd;_0x42407a=0xc8;}else{_0x42407a=0xce;}_0x19f427[_0x734b('0x18')](_0x42407a);return _0x19f427['set']('Content-Range',_0xa6d111+'-'+_0x4b8c63+'/'+_0x2c03bd)[_0x734b('0x1a')](_0x2372bd);}return null;};}function patchUpdates(_0x3033cd){return function(_0x1e6ed9){try{jsonpatch[_0x734b('0x1d')](_0x1e6ed9,_0x3033cd,!![]);}catch(_0x1c605c){return BPromise[_0x734b('0x1e')](_0x1c605c);}return _0x1e6ed9[_0x734b('0x1f')]();};}function saveUpdates(_0x6572ee,_0x67eed){return function(_0x1d2b27){if(_0x1d2b27){return _0x1d2b27[_0x734b('0x20')](_0x6572ee)[_0x734b('0x21')](function(_0x477d6d){return _0x477d6d;});}return null;};}function removeEntity(_0x19fc51,_0x56f807){return function(_0x1e4dcc){if(_0x1e4dcc){return _0x1e4dcc[_0x734b('0x22')]()['then'](function(){_0x19fc51[_0x734b('0x18')](0xcc)[_0x734b('0x19')]();});}};}function handleEntityNotFound(_0x1a7908,_0x11fb8e){return function(_0x46d432){if(!_0x46d432){_0x1a7908[_0x734b('0x17')](0x194);}return _0x46d432;};}function handleError(_0x26eccf,_0x104fff){_0x104fff=_0x104fff||0x1f4;return function(_0x144328){logger[_0x734b('0x23')](_0x144328[_0x734b('0x24')]);if(_0x144328[_0x734b('0x25')]){delete _0x144328[_0x734b('0x25')];}_0x26eccf['status'](_0x104fff)['send'](_0x144328);};}exports[_0x734b('0x26')]=function(_0x3680a0,_0x47a0a9){var _0x32ea00={},_0x2dd51a={},_0x1d8e51={'count':0x0,'rows':[]};var _0x41b501=_[_0x734b('0x27')](db[_0x734b('0x28')][_0x734b('0x29')],function(_0x5c6c5d){return{'name':_0x5c6c5d[_0x734b('0x2a')],'type':_0x5c6c5d[_0x734b('0x2b')][_0x734b('0x2c')]};});_0x2dd51a[_0x734b('0x2d')]=_[_0x734b('0x27')](_0x41b501,_0x734b('0x25'));_0x2dd51a[_0x734b('0x2e')]=_[_0x734b('0x2f')](_0x3680a0[_0x734b('0x2e')]);_0x2dd51a[_0x734b('0x30')]=_['intersection'](_0x2dd51a[_0x734b('0x2d')],_0x2dd51a[_0x734b('0x2e')]);_0x32ea00['attributes']=_[_0x734b('0x31')](_0x2dd51a[_0x734b('0x2d')],qs[_0x734b('0x32')](_0x3680a0[_0x734b('0x2e')][_0x734b('0x32')]));_0x32ea00[_0x734b('0x33')]=_0x32ea00[_0x734b('0x33')][_0x734b('0x34')]?_0x32ea00[_0x734b('0x33')]:_0x2dd51a[_0x734b('0x2d')];if(!_0x3680a0[_0x734b('0x2e')][_0x734b('0x35')](_0x734b('0x36'))){_0x32ea00[_0x734b('0x1c')]=qs[_0x734b('0x1c')](_0x3680a0['query'][_0x734b('0x1c')]);_0x32ea00['offset']=qs[_0x734b('0x1b')](_0x3680a0[_0x734b('0x2e')][_0x734b('0x1b')]);}_0x32ea00[_0x734b('0x37')]=qs[_0x734b('0x38')](_0x3680a0[_0x734b('0x2e')]['sort']);_0x32ea00['where']=qs[_0x734b('0x30')](_['pick'](_0x3680a0[_0x734b('0x2e')],_0x2dd51a['filters']));if(_0x3680a0[_0x734b('0x2e')]['filter']){_0x32ea00[_0x734b('0x39')]=_['merge'](_0x32ea00[_0x734b('0x39')],{'$or':_[_0x734b('0x27')](_0x41b501,function(_0x43aeca){if(_0x43aeca[_0x734b('0x2b')]!==_0x734b('0x3a')){var _0x29f8d0={};_0x29f8d0[_0x43aeca[_0x734b('0x25')]]={'$like':'%'+_0x3680a0['query'][_0x734b('0x3b')]+'%'};return _0x29f8d0;}})});}_0x32ea00=_[_0x734b('0x3c')]({},_0x32ea00,_0x3680a0['options']);var _0x3752c5={'where':_0x32ea00[_0x734b('0x39')]};return db[_0x734b('0x28')][_0x734b('0x3d')](_0x3752c5)['then'](function(_0x2bdf8f){_0x1d8e51[_0x734b('0x3d')]=_0x2bdf8f;if(_0x3680a0['query'][_0x734b('0x3e')]){_0x32ea00[_0x734b('0x3f')]=[{'all':!![]}];}return db['FreshsalesField'][_0x734b('0x40')](_0x32ea00);})[_0x734b('0x21')](function(_0x2820f9){_0x1d8e51[_0x734b('0x41')]=_0x2820f9;return _0x1d8e51;})['then'](respondWithFilteredResult(_0x47a0a9,_0x32ea00))['catch'](handleError(_0x47a0a9,null));};exports[_0x734b('0x42')]=function(_0x5a34af,_0x564ad9){var _0x121a00={'raw':!![],'where':{'id':_0x5a34af[_0x734b('0x43')]['id']}},_0x50bde2={};_0x50bde2['model']=_[_0x734b('0x2f')](db[_0x734b('0x28')][_0x734b('0x29')]);_0x50bde2['query']=_['keys'](_0x5a34af[_0x734b('0x2e')]);_0x50bde2['filters']=_['intersection'](_0x50bde2[_0x734b('0x2d')],_0x50bde2[_0x734b('0x2e')]);_0x121a00['attributes']=_[_0x734b('0x31')](_0x50bde2['model'],qs[_0x734b('0x32')](_0x5a34af[_0x734b('0x2e')][_0x734b('0x32')]));_0x121a00['attributes']=_0x121a00[_0x734b('0x33')][_0x734b('0x34')]?_0x121a00[_0x734b('0x33')]:_0x50bde2[_0x734b('0x2d')];if(_0x5a34af['query']['includeAll']){_0x121a00['include']=[{'all':!![]}];}_0x121a00=_[_0x734b('0x3c')]({},_0x121a00,_0x5a34af['options']);return db['FreshsalesField'][_0x734b('0x44')](_0x121a00)['then'](handleEntityNotFound(_0x564ad9,null))[_0x734b('0x21')](respondWithResult(_0x564ad9,null))[_0x734b('0x45')](handleError(_0x564ad9,null));};exports[_0x734b('0x46')]=function(_0x26d78e,_0x5befde){return db[_0x734b('0x28')]['create'](_0x26d78e[_0x734b('0x47')],{})[_0x734b('0x21')](respondWithResult(_0x5befde,0xc9))[_0x734b('0x45')](handleError(_0x5befde,null));};exports['update']=function(_0x370326,_0x4c3efb){if(_0x370326[_0x734b('0x47')]['id']){delete _0x370326[_0x734b('0x47')]['id'];}return db['FreshsalesField'][_0x734b('0x44')]({'where':{'id':_0x370326[_0x734b('0x43')]['id']}})[_0x734b('0x21')](handleEntityNotFound(_0x4c3efb,null))[_0x734b('0x21')](saveUpdates(_0x370326[_0x734b('0x47')],null))['then'](respondWithResult(_0x4c3efb,null))[_0x734b('0x45')](handleError(_0x4c3efb,null));};exports['destroy']=function(_0x171575,_0x5de7b7){return db[_0x734b('0x28')][_0x734b('0x44')]({'where':{'id':_0x171575[_0x734b('0x43')]['id']}})[_0x734b('0x21')](handleEntityNotFound(_0x5de7b7,null))[_0x734b('0x21')](removeEntity(_0x5de7b7,null))['catch'](handleError(_0x5de7b7,null));};
\ No newline at end of file
+var _0xb9be=['../../config/utils','../../mysqldb','count','offset','limit','status','set','Content-Range','json','apply','save','update','destroy','then','end','sendStatus','error','name','index','FreshsalesField','rawAttributes','fieldName','type','key','map','query','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','params','keys','options','find','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api'];(function(_0x4da6c4,_0x2f2213){var _0x48feaa=function(_0x4b42af){while(--_0x4b42af){_0x4da6c4['push'](_0x4da6c4['shift']());}};_0x48feaa(++_0x2f2213);}(_0xb9be,0xc5));var _0xeb9b=function(_0x35007a,_0x58a0d4){_0x35007a=_0x35007a-0x0;var _0x574f68=_0xb9be[_0x35007a];return _0x574f68;};'use strict';var pdf=require(_0xeb9b('0x0'));var emlformat=require(_0xeb9b('0x1'));var rimraf=require(_0xeb9b('0x2'));var zipdir=require(_0xeb9b('0x3'));var jsonpatch=require(_0xeb9b('0x4'));var rp=require(_0xeb9b('0x5'));var moment=require(_0xeb9b('0x6'));var BPromise=require(_0xeb9b('0x7'));var Mustache=require(_0xeb9b('0x8'));var util=require('util');var path=require('path');var sox=require(_0xeb9b('0x9'));var csv=require(_0xeb9b('0xa'));var ejs=require(_0xeb9b('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0xeb9b('0xc'));var crypto=require(_0xeb9b('0xd'));var jsforce=require(_0xeb9b('0xe'));var deskjs=require(_0xeb9b('0xf'));var toCsv=require(_0xeb9b('0xa'));var querystring=require(_0xeb9b('0x10'));var Papa=require(_0xeb9b('0x11'));var Redis=require(_0xeb9b('0x12'));var authService=require(_0xeb9b('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xeb9b('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xeb9b('0x15'));var utils=require(_0xeb9b('0x16'));var config=require('../../config/environment');var db=require(_0xeb9b('0x17'))['db'];function respondWithStatusCode(_0x1def58,_0x3df18a){_0x3df18a=_0x3df18a||0xcc;return function(_0x2a01df){if(_0x2a01df){return _0x1def58['sendStatus'](_0x3df18a);}return _0x1def58['status'](_0x3df18a)['end']();};}function respondWithResult(_0x355edb,_0x1ef03f){_0x1ef03f=_0x1ef03f||0xc8;return function(_0x2674e6){if(_0x2674e6){return _0x355edb['status'](_0x1ef03f)['json'](_0x2674e6);}};}function respondWithFilteredResult(_0x4f8182,_0x32538b){return function(_0x1a5f27){if(_0x1a5f27){var _0x406afd=_0x1a5f27[_0xeb9b('0x18')],_0x3fa308=_0x32538b['offset'],_0x2c9aa6=_0x32538b[_0xeb9b('0x19')]+_0x32538b[_0xeb9b('0x1a')],_0x10da6e;if(_0x2c9aa6>=_0x406afd){_0x2c9aa6=_0x406afd;_0x10da6e=0xc8;}else{_0x10da6e=0xce;}_0x4f8182[_0xeb9b('0x1b')](_0x10da6e);return _0x4f8182[_0xeb9b('0x1c')](_0xeb9b('0x1d'),_0x3fa308+'-'+_0x2c9aa6+'/'+_0x406afd)[_0xeb9b('0x1e')](_0x1a5f27);}return null;};}function patchUpdates(_0x21010e){return function(_0x3342c1){try{jsonpatch[_0xeb9b('0x1f')](_0x3342c1,_0x21010e,!![]);}catch(_0x26e312){return BPromise['reject'](_0x26e312);}return _0x3342c1[_0xeb9b('0x20')]();};}function saveUpdates(_0x5a7ffd,_0x5d5f54){return function(_0x580498){if(_0x580498){return _0x580498[_0xeb9b('0x21')](_0x5a7ffd)['then'](function(_0xbed5ce){return _0xbed5ce;});}return null;};}function removeEntity(_0x2dabb1,_0x37935c){return function(_0x37d7e0){if(_0x37d7e0){return _0x37d7e0[_0xeb9b('0x22')]()[_0xeb9b('0x23')](function(){_0x2dabb1[_0xeb9b('0x1b')](0xcc)[_0xeb9b('0x24')]();});}};}function handleEntityNotFound(_0x142d1c,_0x46df93){return function(_0x61c86d){if(!_0x61c86d){_0x142d1c[_0xeb9b('0x25')](0x194);}return _0x61c86d;};}function handleError(_0x1a4faf,_0xe6d3e1){_0xe6d3e1=_0xe6d3e1||0x1f4;return function(_0x2b2a14){logger[_0xeb9b('0x26')](_0x2b2a14['stack']);if(_0x2b2a14[_0xeb9b('0x27')]){delete _0x2b2a14['name'];}_0x1a4faf[_0xeb9b('0x1b')](_0xe6d3e1)['send'](_0x2b2a14);};}exports[_0xeb9b('0x28')]=function(_0x4361b9,_0x7e0134){var _0xe3eda5={},_0x52f6c1={},_0x33f73a={'count':0x0,'rows':[]};var _0x42fe78=_['map'](db[_0xeb9b('0x29')][_0xeb9b('0x2a')],function(_0x5ce745){return{'name':_0x5ce745[_0xeb9b('0x2b')],'type':_0x5ce745[_0xeb9b('0x2c')][_0xeb9b('0x2d')]};});_0x52f6c1['model']=_[_0xeb9b('0x2e')](_0x42fe78,'name');_0x52f6c1[_0xeb9b('0x2f')]=_['keys'](_0x4361b9[_0xeb9b('0x2f')]);_0x52f6c1['filters']=_[_0xeb9b('0x30')](_0x52f6c1['model'],_0x52f6c1[_0xeb9b('0x2f')]);_0xe3eda5['attributes']=_[_0xeb9b('0x30')](_0x52f6c1[_0xeb9b('0x31')],qs[_0xeb9b('0x32')](_0x4361b9[_0xeb9b('0x2f')][_0xeb9b('0x32')]));_0xe3eda5[_0xeb9b('0x33')]=_0xe3eda5[_0xeb9b('0x33')][_0xeb9b('0x34')]?_0xe3eda5[_0xeb9b('0x33')]:_0x52f6c1[_0xeb9b('0x31')];if(!_0x4361b9['query'][_0xeb9b('0x35')](_0xeb9b('0x36'))){_0xe3eda5[_0xeb9b('0x1a')]=qs[_0xeb9b('0x1a')](_0x4361b9[_0xeb9b('0x2f')][_0xeb9b('0x1a')]);_0xe3eda5[_0xeb9b('0x19')]=qs['offset'](_0x4361b9[_0xeb9b('0x2f')][_0xeb9b('0x19')]);}_0xe3eda5[_0xeb9b('0x37')]=qs['sort'](_0x4361b9[_0xeb9b('0x2f')][_0xeb9b('0x38')]);_0xe3eda5[_0xeb9b('0x39')]=qs[_0xeb9b('0x3a')](_[_0xeb9b('0x3b')](_0x4361b9[_0xeb9b('0x2f')],_0x52f6c1['filters']));if(_0x4361b9[_0xeb9b('0x2f')][_0xeb9b('0x3c')]){_0xe3eda5['where']=_[_0xeb9b('0x3d')](_0xe3eda5[_0xeb9b('0x39')],{'$or':_[_0xeb9b('0x2e')](_0x42fe78,function(_0x395b6b){if(_0x395b6b[_0xeb9b('0x2c')]!==_0xeb9b('0x3e')){var _0x408839={};_0x408839[_0x395b6b['name']]={'$like':'%'+_0x4361b9[_0xeb9b('0x2f')][_0xeb9b('0x3c')]+'%'};return _0x408839;}})});}_0xe3eda5=_[_0xeb9b('0x3d')]({},_0xe3eda5,_0x4361b9['options']);var _0x5750df={'where':_0xe3eda5['where']};return db[_0xeb9b('0x29')][_0xeb9b('0x18')](_0x5750df)[_0xeb9b('0x23')](function(_0x57d2a6){_0x33f73a[_0xeb9b('0x18')]=_0x57d2a6;if(_0x4361b9[_0xeb9b('0x2f')][_0xeb9b('0x3f')]){_0xe3eda5[_0xeb9b('0x40')]=[{'all':!![]}];}return db[_0xeb9b('0x29')][_0xeb9b('0x41')](_0xe3eda5);})[_0xeb9b('0x23')](function(_0x492122){_0x33f73a[_0xeb9b('0x42')]=_0x492122;return _0x33f73a;})[_0xeb9b('0x23')](respondWithFilteredResult(_0x7e0134,_0xe3eda5))[_0xeb9b('0x43')](handleError(_0x7e0134,null));};exports['show']=function(_0x4967cb,_0x34ea03){var _0x110122={'raw':!![],'where':{'id':_0x4967cb[_0xeb9b('0x44')]['id']}},_0x495998={};_0x495998['model']=_[_0xeb9b('0x45')](db[_0xeb9b('0x29')][_0xeb9b('0x2a')]);_0x495998[_0xeb9b('0x2f')]=_[_0xeb9b('0x45')](_0x4967cb[_0xeb9b('0x2f')]);_0x495998[_0xeb9b('0x3a')]=_[_0xeb9b('0x30')](_0x495998[_0xeb9b('0x31')],_0x495998[_0xeb9b('0x2f')]);_0x110122[_0xeb9b('0x33')]=_[_0xeb9b('0x30')](_0x495998['model'],qs['fields'](_0x4967cb[_0xeb9b('0x2f')]['fields']));_0x110122[_0xeb9b('0x33')]=_0x110122[_0xeb9b('0x33')][_0xeb9b('0x34')]?_0x110122['attributes']:_0x495998[_0xeb9b('0x31')];if(_0x4967cb[_0xeb9b('0x2f')]['includeAll']){_0x110122[_0xeb9b('0x40')]=[{'all':!![]}];}_0x110122=_[_0xeb9b('0x3d')]({},_0x110122,_0x4967cb[_0xeb9b('0x46')]);return db[_0xeb9b('0x29')][_0xeb9b('0x47')](_0x110122)[_0xeb9b('0x23')](handleEntityNotFound(_0x34ea03,null))[_0xeb9b('0x23')](respondWithResult(_0x34ea03,null))[_0xeb9b('0x43')](handleError(_0x34ea03,null));};exports['create']=function(_0x54bb29,_0x3a13cc){return db['FreshsalesField']['create'](_0x54bb29[_0xeb9b('0x48')],{})[_0xeb9b('0x23')](respondWithResult(_0x3a13cc,0xc9))[_0xeb9b('0x43')](handleError(_0x3a13cc,null));};exports[_0xeb9b('0x21')]=function(_0x45bc74,_0x2fd6ee){if(_0x45bc74['body']['id']){delete _0x45bc74['body']['id'];}return db['FreshsalesField'][_0xeb9b('0x47')]({'where':{'id':_0x45bc74['params']['id']}})[_0xeb9b('0x23')](handleEntityNotFound(_0x2fd6ee,null))[_0xeb9b('0x23')](saveUpdates(_0x45bc74[_0xeb9b('0x48')],null))[_0xeb9b('0x23')](respondWithResult(_0x2fd6ee,null))[_0xeb9b('0x43')](handleError(_0x2fd6ee,null));};exports[_0xeb9b('0x22')]=function(_0x202ef3,_0x1a2189){return db[_0xeb9b('0x29')][_0xeb9b('0x47')]({'where':{'id':_0x202ef3['params']['id']}})['then'](handleEntityNotFound(_0x1a2189,null))[_0xeb9b('0x23')](removeEntity(_0x1a2189,null))[_0xeb9b('0x43')](handleError(_0x1a2189,null));};
\ No newline at end of file
diff --git a/server/api/intFreshsalesField/intFreshsalesField.model.js b/server/api/intFreshsalesField/intFreshsalesField.model.js
index 3199aab..e6f8b24 100644
--- a/server/api/intFreshsalesField/intFreshsalesField.model.js
+++ b/server/api/intFreshsalesField/intFreshsalesField.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x796d=['FieldId','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshsalesField.attributes','define','FreshsalesField','freshsales_unique_index','idField'];(function(_0xcbcfd1,_0x5e1f67){var _0x21ab7f=function(_0x46d8b4){while(--_0x46d8b4){_0xcbcfd1['push'](_0xcbcfd1['shift']());}};_0x21ab7f(++_0x5e1f67);}(_0x796d,0xa6));var _0xd796=function(_0x1ac6e5,_0x40f47f){_0x1ac6e5=_0x1ac6e5-0x0;var _0x5877dc=_0x796d[_0x1ac6e5];return _0x5877dc;};'use strict';var _=require(_0xd796('0x0'));var util=require('util');var logger=require(_0xd796('0x1'))(_0xd796('0x2'));var moment=require(_0xd796('0x3'));var BPromise=require(_0xd796('0x4'));var rp=require(_0xd796('0x5'));var fs=require('fs');var path=require(_0xd796('0x6'));var rimraf=require(_0xd796('0x7'));var config=require(_0xd796('0x8'));var attributes=require(_0xd796('0x9'));module['exports']=function(_0x38cd57,_0x230b25){return _0x38cd57[_0xd796('0xa')](_0xd796('0xb'),attributes,{'tableName':'int_freshsales_fields','paranoid':![],'indexes':[{'name':_0xd796('0xc'),'fields':[_0xd796('0xd'),_0xd796('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x02d1=['exports','FreshsalesField','freshsales_unique_index','idField','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./intFreshsalesField.attributes'];(function(_0x5c351c,_0x2046d8){var _0x26f3b3=function(_0x47ac18){while(--_0x47ac18){_0x5c351c['push'](_0x5c351c['shift']());}};_0x26f3b3(++_0x2046d8);}(_0x02d1,0x1b1));var _0x102d=function(_0x592c54,_0x30eff0){_0x592c54=_0x592c54-0x0;var _0x2ccaed=_0x02d1[_0x592c54];return _0x2ccaed;};'use strict';var _=require(_0x102d('0x0'));var util=require(_0x102d('0x1'));var logger=require(_0x102d('0x2'))(_0x102d('0x3'));var moment=require('moment');var BPromise=require(_0x102d('0x4'));var rp=require(_0x102d('0x5'));var fs=require('fs');var path=require(_0x102d('0x6'));var rimraf=require(_0x102d('0x7'));var config=require('../../config/environment');var attributes=require(_0x102d('0x8'));module[_0x102d('0x9')]=function(_0x2aa388,_0x3b1ab3){return _0x2aa388['define'](_0x102d('0xa'),attributes,{'tableName':'int_freshsales_fields','paranoid':![],'indexes':[{'name':_0x102d('0xb'),'fields':[_0x102d('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/intFreshsalesField/intFreshsalesField.rpc.js b/server/api/intFreshsalesField/intFreshsalesField.rpc.js
index 909816b..ad57f14 100644
--- a/server/api/intFreshsalesField/intFreshsalesField.rpc.js
+++ b/server/api/intFreshsalesField/intFreshsalesField.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe295=['FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','error','code','message','result','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','http','request','then','info'];(function(_0x1ab35d,_0x3f401d){var _0x133d6d=function(_0x381b41){while(--_0x381b41){_0x1ab35d['push'](_0x1ab35d['shift']());}};_0x133d6d(++_0x3f401d);}(_0xe295,0x143));var _0x5e29=function(_0x5ae187,_0x8afd5c){_0x5ae187=_0x5ae187-0x0;var _0x211069=_0xe295[_0x5ae187];return _0x211069;};'use strict';var _=require('lodash');var util=require(_0x5e29('0x0'));var moment=require(_0x5e29('0x1'));var BPromise=require(_0x5e29('0x2'));var rs=require(_0x5e29('0x3'));var fs=require('fs');var Redis=require(_0x5e29('0x4'));var db=require(_0x5e29('0x5'))['db'];var utils=require(_0x5e29('0x6'));var logger=require('../../config/logger')(_0x5e29('0x7'));var config=require('../../config/environment');var jayson=require(_0x5e29('0x8'));var client=jayson['client'][_0x5e29('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4067be,_0x2c4318,_0x12712b){return new BPromise(function(_0x38f2c4,_0xd3d39b){return client[_0x5e29('0xa')](_0x4067be,_0x12712b)[_0x5e29('0xb')](function(_0x2b7acc){logger[_0x5e29('0xc')](_0x5e29('0xd'),_0x2c4318,_0x5e29('0xe'));logger[_0x5e29('0xf')](_0x5e29('0x10'),_0x2c4318,_0x5e29('0xe'),JSON['stringify'](_0x2b7acc));if(_0x2b7acc['error']){if(_0x2b7acc[_0x5e29('0x11')][_0x5e29('0x12')]===0x1f4){logger[_0x5e29('0x11')]('FreshsalesField,\x20%s,\x20%s',_0x2c4318,_0x2b7acc[_0x5e29('0x11')][_0x5e29('0x13')]);return _0xd3d39b(_0x2b7acc[_0x5e29('0x11')][_0x5e29('0x13')]);}logger['error']('FreshsalesField,\x20%s,\x20%s',_0x2c4318,_0x2b7acc[_0x5e29('0x11')][_0x5e29('0x13')]);return _0x38f2c4(_0x2b7acc['error'][_0x5e29('0x13')]);}else{logger[_0x5e29('0xc')](_0x5e29('0xd'),_0x2c4318,'request\x20sent');_0x38f2c4(_0x2b7acc[_0x5e29('0x14')]['message']);}})['catch'](function(_0x1df83f){logger['error'](_0x5e29('0xd'),_0x2c4318,_0x1df83f);_0xd3d39b(_0x1df83f);});});}
\ No newline at end of file
+var _0xd12c=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','stringify','error','FreshsalesField,\x20%s,\x20%s','message','result','lodash','moment','randomstring','ioredis','../../mysqldb'];(function(_0x56b5d1,_0x59be02){var _0x5bfe4a=function(_0x9ed053){while(--_0x9ed053){_0x56b5d1['push'](_0x56b5d1['shift']());}};_0x5bfe4a(++_0x59be02);}(_0xd12c,0x64));var _0xcd12=function(_0x1d1b93,_0x1e44c9){_0x1d1b93=_0x1d1b93-0x0;var _0x100cd1=_0xd12c[_0x1d1b93];return _0x100cd1;};'use strict';var _=require(_0xcd12('0x0'));var util=require('util');var moment=require(_0xcd12('0x1'));var BPromise=require('bluebird');var rs=require(_0xcd12('0x2'));var fs=require('fs');var Redis=require(_0xcd12('0x3'));var db=require(_0xcd12('0x4'))['db'];var utils=require(_0xcd12('0x5'));var logger=require(_0xcd12('0x6'))(_0xcd12('0x7'));var config=require(_0xcd12('0x8'));var jayson=require(_0xcd12('0x9'));var client=jayson[_0xcd12('0xa')][_0xcd12('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3f7eec,_0x1ad659,_0x3cd587){return new BPromise(function(_0x62200e,_0x1f412f){return client['request'](_0x3f7eec,_0x3cd587)[_0xcd12('0xc')](function(_0x2ce4e8){logger[_0xcd12('0xd')]('FreshsalesField,\x20%s,\x20%s',_0x1ad659,_0xcd12('0xe'));logger[_0xcd12('0xf')]('FreshsalesField,\x20%s,\x20%s,\x20%s',_0x1ad659,_0xcd12('0xe'),JSON[_0xcd12('0x10')](_0x2ce4e8));if(_0x2ce4e8[_0xcd12('0x11')]){if(_0x2ce4e8[_0xcd12('0x11')]['code']===0x1f4){logger[_0xcd12('0x11')](_0xcd12('0x12'),_0x1ad659,_0x2ce4e8[_0xcd12('0x11')][_0xcd12('0x13')]);return _0x1f412f(_0x2ce4e8[_0xcd12('0x11')][_0xcd12('0x13')]);}logger[_0xcd12('0x11')](_0xcd12('0x12'),_0x1ad659,_0x2ce4e8['error'][_0xcd12('0x13')]);return _0x62200e(_0x2ce4e8['error']['message']);}else{logger['info']('FreshsalesField,\x20%s,\x20%s',_0x1ad659,_0xcd12('0xe'));_0x62200e(_0x2ce4e8[_0xcd12('0x14')][_0xcd12('0x13')]);}})['catch'](function(_0x53fe23){logger[_0xcd12('0x11')](_0xcd12('0x12'),_0x1ad659,_0x53fe23);_0x1f412f(_0x53fe23);});});}
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/index.js b/server/api/intSalesforceAccount/index.js
index 48cfb28..c9fd78a 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 _0x993f=['/:id','show','/:id/configurations','/:id/fields','getFields','post','create','addConfiguration','put','delete','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../config/environment','./intSalesforceAccount.controller','get','isAuthenticated','index'];(function(_0x38a2da,_0x542866){var _0x4b57f3=function(_0x1133be){while(--_0x1133be){_0x38a2da['push'](_0x38a2da['shift']());}};_0x4b57f3(++_0x542866);}(_0x993f,0x129));var _0xf993=function(_0x155b2d,_0x472bf5){_0x155b2d=_0x155b2d-0x0;var _0x2ef038=_0x993f[_0x155b2d];return _0x2ef038;};'use strict';var multer=require(_0xf993('0x0'));var util=require(_0xf993('0x1'));var path=require(_0xf993('0x2'));var timeout=require(_0xf993('0x3'));var express=require('express');var router=express[_0xf993('0x4')]();var auth=require(_0xf993('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xf993('0x6'));var controller=require(_0xf993('0x7'));router[_0xf993('0x8')]('/',auth[_0xf993('0x9')](),controller[_0xf993('0xa')]);router[_0xf993('0x8')](_0xf993('0xb'),auth[_0xf993('0x9')](),controller[_0xf993('0xc')]);router[_0xf993('0x8')](_0xf993('0xd'),auth[_0xf993('0x9')](),controller['getConfigurations']);router[_0xf993('0x8')](_0xf993('0xe'),auth['isAuthenticated'](),controller[_0xf993('0xf')]);router[_0xf993('0x10')]('/',auth[_0xf993('0x9')](),controller[_0xf993('0x11')]);router['post'](_0xf993('0xd'),auth['isAuthenticated'](),controller[_0xf993('0x12')]);router[_0xf993('0x13')]('/:id',auth[_0xf993('0x9')](),controller['update']);router[_0xf993('0x14')](_0xf993('0xb'),auth[_0xf993('0x9')](),controller['destroy']);module[_0xf993('0x15')]=router;
\ No newline at end of file
+var _0xf8fe=['post','create','addConfiguration','update','delete','exports','multer','util','path','express','Router','../../components/auth/service','../../config/environment','./intSalesforceAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','getFields'];(function(_0x454165,_0x1f3e74){var _0x56db53=function(_0x23388c){while(--_0x23388c){_0x454165['push'](_0x454165['shift']());}};_0x56db53(++_0x1f3e74);}(_0xf8fe,0x1be));var _0xef8f=function(_0x33e169,_0x3fdd78){_0x33e169=_0x33e169-0x0;var _0xa6d1e7=_0xf8fe[_0x33e169];return _0xa6d1e7;};'use strict';var multer=require(_0xef8f('0x0'));var util=require(_0xef8f('0x1'));var path=require(_0xef8f('0x2'));var timeout=require('connect-timeout');var express=require(_0xef8f('0x3'));var router=express[_0xef8f('0x4')]();var auth=require(_0xef8f('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xef8f('0x6'));var controller=require(_0xef8f('0x7'));router[_0xef8f('0x8')]('/',auth[_0xef8f('0x9')](),controller[_0xef8f('0xa')]);router[_0xef8f('0x8')](_0xef8f('0xb'),auth['isAuthenticated'](),controller[_0xef8f('0xc')]);router[_0xef8f('0x8')](_0xef8f('0xd'),auth[_0xef8f('0x9')](),controller[_0xef8f('0xe')]);router[_0xef8f('0x8')]('/:id/fields',auth[_0xef8f('0x9')](),controller[_0xef8f('0xf')]);router[_0xef8f('0x10')]('/',auth[_0xef8f('0x9')](),controller[_0xef8f('0x11')]);router['post'](_0xef8f('0xd'),auth[_0xef8f('0x9')](),controller[_0xef8f('0x12')]);router['put'](_0xef8f('0xb'),auth[_0xef8f('0x9')](),controller[_0xef8f('0x13')]);router[_0xef8f('0x14')]('/:id',auth[_0xef8f('0x9')](),controller['destroy']);module[_0xef8f('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js b/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js
index ef3cca9..b2dc42b 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 _0x5fab=['username','ENUM','integrationTab','sequelize','exports','STRING'];(function(_0x110d63,_0x38e4c9){var _0x5bd63f=function(_0x1cd91e){while(--_0x1cd91e){_0x110d63['push'](_0x110d63['shift']());}};_0x5bd63f(++_0x38e4c9);}(_0x5fab,0x177));var _0xb5fa=function(_0x566c5a,_0x42e09c){_0x566c5a=_0x566c5a-0x0;var _0x3c4abe=_0x5fab[_0x566c5a];return _0x3c4abe;};'use strict';var Sequelize=require(_0xb5fa('0x0'));module[_0xb5fa('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xb5fa('0x2')]},'username':{'type':Sequelize[_0xb5fa('0x2')],'unique':_0xb5fa('0x3')},'remoteUri':{'type':Sequelize[_0xb5fa('0x2')]},'password':{'type':Sequelize[_0xb5fa('0x2')]},'clientId':{'type':Sequelize[_0xb5fa('0x2')]},'clientSecret':{'type':Sequelize[_0xb5fa('0x2')]},'securityToken':{'type':Sequelize[_0xb5fa('0x2')]},'serverUrl':{'type':Sequelize[_0xb5fa('0x2')]},'type':{'type':Sequelize[_0xb5fa('0x4')]('integrationTab','newTab'),'defaultValue':_0xb5fa('0x5')}};
\ No newline at end of file
+var _0xc4aa=['STRING','username','ENUM','integrationTab','newTab','sequelize','exports'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x17b6e3,_0x4522ed){_0x17b6e3=_0x17b6e3-0x0;var _0x3906f3=_0xc4aa[_0x17b6e3];return _0x3906f3;};'use strict';var Sequelize=require(_0xac4a('0x0'));module[_0xac4a('0x1')]={'name':{'type':Sequelize[_0xac4a('0x2')]},'description':{'type':Sequelize[_0xac4a('0x2')]},'username':{'type':Sequelize[_0xac4a('0x2')],'unique':_0xac4a('0x3')},'remoteUri':{'type':Sequelize['STRING']},'password':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize[_0xac4a('0x2')]},'securityToken':{'type':Sequelize[_0xac4a('0x2')]},'serverUrl':{'type':Sequelize[_0xac4a('0x2')]},'type':{'type':Sequelize[_0xac4a('0x4')](_0xac4a('0x5'),_0xac4a('0x6')),'defaultValue':_0xac4a('0x5')}};
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js
index 6a4b1c8..ed78218 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 _0x0295=['info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','destroy','stack','name','index','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','options','SalesforceAccount','includeAll','include','findAll','rows','catch','show','params','merge','find','create','body','getConfigurations','addConfiguration','findOne','AccountId','Subjects','getSubjects','channel','Descriptions','SalesforceConfiguration','SalesforceField','getFields','clientId','clientSecret','username','securityToken','remoteUri','substring','lastIndexOf','Connection','password','concat','isNil','ticketType','sobject','describe','CallDisposition','CallObject','CallType','IsArchived','Priority','Status','Case','IsEscalated','SuppliedName','SuppliedCompany','custom','label','picklistValues','value','True','False','false','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','statusCode','html-pdf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../components/integrations/configuration','jayson/promise','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then'];(function(_0x58f63d,_0x325c47){var _0x393660=function(_0x214df5){while(--_0x214df5){_0x58f63d['push'](_0x58f63d['shift']());}};_0x393660(++_0x325c47);}(_0x0295,0x1f0));var _0x5029=function(_0x23840e,_0x2fb0cb){_0x23840e=_0x23840e-0x0;var _0x277300=_0x0295[_0x23840e];return _0x277300;};'use strict';var pdf=require(_0x5029('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x5029('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x5029('0x2'));var BPromise=require(_0x5029('0x3'));var Mustache=require(_0x5029('0x4'));var util=require(_0x5029('0x5'));var path=require(_0x5029('0x6'));var sox=require(_0x5029('0x7'));var csv=require(_0x5029('0x8'));var ejs=require(_0x5029('0x9'));var fs=require('fs');var _=require(_0x5029('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5029('0xb'));var toCsv=require('to-csv');var querystring=require(_0x5029('0xc'));var Papa=require('papaparse');var Redis=require(_0x5029('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x5029('0xe'));var as=require(_0x5029('0xf'));var hardwareService=require(_0x5029('0x10'));var logger=require('../../config/logger')(_0x5029('0x11'));var utils=require(_0x5029('0x12'));var config=require(_0x5029('0x13'));var db=require('../../mysqldb')['db'];var integrations=require(_0x5029('0x14'));var jayson=require(_0x5029('0x15'));var client=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0x49f836,_0x4aebb6,_0x2484ac){if(_0x2484ac){var _0x2e0369=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2e0369[_0x5029('0x16')](_0x4aebb6)){return _0x49f836;}else{throw new db[(_0x5029('0x17'))][(_0x5029('0x18'))](_0x5029('0x19'));}}else{return _0x49f836;}}function respondWithRpcPromise(_0xe278b7,_0x317c20,_0x10bf55,_0x326923){return new BPromise(function(_0x457c73,_0x353cba){var _0x3786b5=_0x326923||client;return _0x3786b5[_0x5029('0x1a')](_0xe278b7,_0x10bf55)[_0x5029('0x1b')](function(_0x4f7ab4){logger[_0x5029('0x1c')](_0x5029('0x1d'),_0x317c20,_0x5029('0x1e'));logger[_0x5029('0x1f')](_0x5029('0x20'),_0x317c20,_0x5029('0x1e'),JSON[_0x5029('0x21')](_0x4f7ab4));if(_0x4f7ab4['error']){if(_0x4f7ab4[_0x5029('0x22')]['code']===0x1f4){logger[_0x5029('0x22')](_0x5029('0x1d'),_0x317c20,_0x4f7ab4[_0x5029('0x22')][_0x5029('0x23')]);return _0x353cba(_0x4f7ab4['error']['message']);}logger[_0x5029('0x22')]('SalesforceAccount,\x20%s,\x20%s',_0x317c20,_0x4f7ab4[_0x5029('0x22')][_0x5029('0x23')]);return _0x457c73(_0x4f7ab4[_0x5029('0x22')][_0x5029('0x23')]);}else{logger[_0x5029('0x1c')](_0x5029('0x1d'),_0x317c20,_0x5029('0x1e'));_0x457c73(_0x4f7ab4[_0x5029('0x24')][_0x5029('0x23')]);}})['catch'](function(_0x564866){logger['error'](_0x5029('0x1d'),_0x317c20,_0x564866);_0x353cba(_0x564866);});});}function respondWithStatusCode(_0x45666c,_0x51093c){_0x51093c=_0x51093c||0xcc;return function(_0x5727e9){if(_0x5727e9){return _0x45666c[_0x5029('0x25')](_0x51093c);}return _0x45666c[_0x5029('0x26')](_0x51093c)[_0x5029('0x27')]();};}function respondWithResult(_0x5527fc,_0x2c501f){_0x2c501f=_0x2c501f||0xc8;return function(_0xb14bc){if(_0xb14bc){return _0x5527fc['status'](_0x2c501f)[_0x5029('0x28')](_0xb14bc);}};}function respondWithFilteredResult(_0x31f0a0,_0x16ad8b){return function(_0x4a24b9){if(_0x4a24b9){var _0x32da06=_0x4a24b9[_0x5029('0x29')],_0x251f99=_0x16ad8b[_0x5029('0x2a')],_0xe5313e=_0x16ad8b['offset']+_0x16ad8b[_0x5029('0x2b')],_0x4b6f92;if(_0xe5313e>=_0x32da06){_0xe5313e=_0x32da06;_0x4b6f92=0xc8;}else{_0x4b6f92=0xce;}_0x31f0a0[_0x5029('0x26')](_0x4b6f92);return _0x31f0a0[_0x5029('0x2c')](_0x5029('0x2d'),_0x251f99+'-'+_0xe5313e+'/'+_0x32da06)[_0x5029('0x28')](_0x4a24b9);}return null;};}function patchUpdates(_0x2a1ed6){return function(_0x44255a){try{jsonpatch[_0x5029('0x2e')](_0x44255a,_0x2a1ed6,!![]);}catch(_0x250156){return BPromise[_0x5029('0x2f')](_0x250156);}return _0x44255a[_0x5029('0x30')]();};}function saveUpdates(_0x4519c8,_0x4ff3db){return function(_0x11ae38){if(_0x11ae38){return _0x11ae38['update'](_0x4519c8)[_0x5029('0x1b')](function(_0x4f672e){return _0x4f672e;});}return null;};}function removeEntity(_0x48f387,_0x2bc434){return function(_0x447680){if(_0x447680){return _0x447680[_0x5029('0x31')]()['then'](function(){_0x48f387[_0x5029('0x26')](0xcc)[_0x5029('0x27')]();});}};}function handleEntityNotFound(_0x3f20fb,_0x29c59a){return function(_0x1bb896){if(!_0x1bb896){_0x3f20fb[_0x5029('0x25')](0x194);}return _0x1bb896;};}function handleError(_0x46ec59,_0x22205e){_0x22205e=_0x22205e||0x1f4;return function(_0x456cfc){logger['error'](_0x456cfc[_0x5029('0x32')]);if(_0x456cfc[_0x5029('0x33')]){delete _0x456cfc[_0x5029('0x33')];}_0x46ec59[_0x5029('0x26')](_0x22205e)['send'](_0x456cfc);};}exports[_0x5029('0x34')]=function(_0x388cca,_0x3e2d88){var _0x594549={},_0x4904cc={},_0x2d1ccb={'count':0x0,'rows':[]};var _0x17756b=_['map'](db['SalesforceAccount'][_0x5029('0x35')],function(_0x157969){return{'name':_0x157969[_0x5029('0x36')],'type':_0x157969[_0x5029('0x37')][_0x5029('0x38')]};});_0x4904cc[_0x5029('0x39')]=_[_0x5029('0x3a')](_0x17756b,_0x5029('0x33'));_0x4904cc[_0x5029('0x3b')]=_[_0x5029('0x3c')](_0x388cca[_0x5029('0x3b')]);_0x4904cc[_0x5029('0x3d')]=_[_0x5029('0x3e')](_0x4904cc[_0x5029('0x39')],_0x4904cc['query']);_0x594549['attributes']=_[_0x5029('0x3e')](_0x4904cc[_0x5029('0x39')],qs[_0x5029('0x3f')](_0x388cca['query'][_0x5029('0x3f')]));_0x594549[_0x5029('0x40')]=_0x594549['attributes'][_0x5029('0x41')]?_0x594549['attributes']:_0x4904cc[_0x5029('0x39')];if(!_0x388cca['query'][_0x5029('0x42')](_0x5029('0x43'))){_0x594549[_0x5029('0x2b')]=qs[_0x5029('0x2b')](_0x388cca[_0x5029('0x3b')][_0x5029('0x2b')]);_0x594549[_0x5029('0x2a')]=qs[_0x5029('0x2a')](_0x388cca[_0x5029('0x3b')]['offset']);}_0x594549[_0x5029('0x44')]=qs[_0x5029('0x45')](_0x388cca[_0x5029('0x3b')][_0x5029('0x45')]);_0x594549[_0x5029('0x46')]=qs[_0x5029('0x3d')](_['pick'](_0x388cca[_0x5029('0x3b')],_0x4904cc[_0x5029('0x3d')]));if(_0x388cca[_0x5029('0x3b')][_0x5029('0x47')]){_0x594549[_0x5029('0x46')]=_['merge'](_0x594549[_0x5029('0x46')],{'$or':_[_0x5029('0x3a')](_0x17756b,function(_0x248556){if(_0x248556[_0x5029('0x37')]!==_0x5029('0x48')){var _0x128aff={};_0x128aff[_0x248556[_0x5029('0x33')]]={'$like':'%'+_0x388cca[_0x5029('0x3b')][_0x5029('0x47')]+'%'};return _0x128aff;}})});}_0x594549=_['merge']({},_0x594549,_0x388cca[_0x5029('0x49')]);var _0x27d2ad={'where':_0x594549[_0x5029('0x46')]};return db[_0x5029('0x4a')]['count'](_0x27d2ad)['then'](function(_0x17a515){_0x2d1ccb[_0x5029('0x29')]=_0x17a515;if(_0x388cca[_0x5029('0x3b')][_0x5029('0x4b')]){_0x594549[_0x5029('0x4c')]=[{'all':!![]}];}return db[_0x5029('0x4a')][_0x5029('0x4d')](_0x594549);})[_0x5029('0x1b')](function(_0x1257a4){_0x2d1ccb[_0x5029('0x4e')]=_0x1257a4;return _0x2d1ccb;})[_0x5029('0x1b')](respondWithFilteredResult(_0x3e2d88,_0x594549))[_0x5029('0x4f')](handleError(_0x3e2d88,null));};exports[_0x5029('0x50')]=function(_0x18f1f5,_0x3168bd){var _0x175cc0={'raw':![],'where':{'id':_0x18f1f5[_0x5029('0x51')]['id']}},_0x10fc07={};_0x10fc07[_0x5029('0x39')]=_[_0x5029('0x3c')](db[_0x5029('0x4a')]['rawAttributes']);_0x10fc07[_0x5029('0x3b')]=_['keys'](_0x18f1f5[_0x5029('0x3b')]);_0x10fc07[_0x5029('0x3d')]=_['intersection'](_0x10fc07['model'],_0x10fc07[_0x5029('0x3b')]);_0x175cc0['attributes']=_['intersection'](_0x10fc07[_0x5029('0x39')],qs[_0x5029('0x3f')](_0x18f1f5[_0x5029('0x3b')]['fields']));_0x175cc0['attributes']=_0x175cc0[_0x5029('0x40')][_0x5029('0x41')]?_0x175cc0['attributes']:_0x10fc07[_0x5029('0x39')];if(_0x18f1f5['query'][_0x5029('0x4b')]){_0x175cc0['include']=[{'all':!![]}];}_0x175cc0=_[_0x5029('0x52')]({},_0x175cc0,_0x18f1f5[_0x5029('0x49')]);return db[_0x5029('0x4a')][_0x5029('0x53')](_0x175cc0)[_0x5029('0x1b')](handleEntityNotFound(_0x3168bd,null))[_0x5029('0x1b')](respondWithResult(_0x3168bd,null))[_0x5029('0x4f')](handleError(_0x3168bd,null));};exports[_0x5029('0x54')]=function(_0x586936,_0x1df044){return db['SalesforceAccount'][_0x5029('0x54')](_0x586936[_0x5029('0x55')],{})['then'](respondWithResult(_0x1df044,0xc9))[_0x5029('0x4f')](handleError(_0x1df044,null));};exports['update']=function(_0x58928f,_0x55c57c){if(_0x58928f[_0x5029('0x55')]['id']){delete _0x58928f['body']['id'];}return db[_0x5029('0x4a')][_0x5029('0x53')]({'where':{'id':_0x58928f[_0x5029('0x51')]['id']}})['then'](handleEntityNotFound(_0x55c57c,null))[_0x5029('0x1b')](saveUpdates(_0x58928f['body'],null))['then'](respondWithResult(_0x55c57c,null))[_0x5029('0x4f')](handleError(_0x55c57c,null));};exports[_0x5029('0x31')]=function(_0x81e39c,_0x448273){return db[_0x5029('0x4a')]['find']({'where':{'id':_0x81e39c[_0x5029('0x51')]['id']}})[_0x5029('0x1b')](handleEntityNotFound(_0x448273,null))[_0x5029('0x1b')](removeEntity(_0x448273,null))[_0x5029('0x4f')](handleError(_0x448273,null));};exports['getConfigurations']=function(_0x33812b,_0xfffc0d,_0x4d4a2d){var _0x512de9={};var _0x2afd44={};var _0x4685a6;var _0x1263ba;return db[_0x5029('0x4a')]['findOne']({'where':{'id':_0x33812b[_0x5029('0x51')]['id']}})[_0x5029('0x1b')](handleEntityNotFound(_0xfffc0d,null))[_0x5029('0x1b')](function(_0x2aebb3){if(_0x2aebb3){_0x4685a6=_0x2aebb3;_0x2afd44[_0x5029('0x39')]=_[_0x5029('0x3c')](db['SalesforceConfiguration']['rawAttributes']);_0x2afd44[_0x5029('0x3b')]=_[_0x5029('0x3c')](_0x33812b[_0x5029('0x3b')]);_0x2afd44['filters']=_[_0x5029('0x3e')](_0x2afd44[_0x5029('0x39')],_0x2afd44[_0x5029('0x3b')]);_0x512de9[_0x5029('0x40')]=_[_0x5029('0x3e')](_0x2afd44['model'],qs[_0x5029('0x3f')](_0x33812b[_0x5029('0x3b')][_0x5029('0x3f')]));_0x512de9['attributes']=_0x512de9[_0x5029('0x40')]['length']?_0x512de9[_0x5029('0x40')]:_0x2afd44['model'];_0x512de9[_0x5029('0x44')]=qs[_0x5029('0x45')](_0x33812b[_0x5029('0x3b')][_0x5029('0x45')]);_0x512de9[_0x5029('0x46')]=qs[_0x5029('0x3d')](_['pick'](_0x33812b[_0x5029('0x3b')],_0x2afd44[_0x5029('0x3d')]));if(_0x33812b[_0x5029('0x3b')][_0x5029('0x47')]){_0x512de9[_0x5029('0x46')]=_['merge'](_0x512de9[_0x5029('0x46')],{'$or':_['map'](_0x512de9[_0x5029('0x40')],function(_0x539f80){var _0xacab3={};_0xacab3[_0x539f80]={'$like':'%'+_0x33812b['query'][_0x5029('0x47')]+'%'};return _0xacab3;})});}_0x512de9=_['merge']({},_0x512de9,_0x33812b['options']);return _0x4685a6[_0x5029('0x56')](_0x512de9);}})['then'](function(_0x2d2a40){if(_0x2d2a40){_0x1263ba=_0x2d2a40[_0x5029('0x41')];if(!_0x33812b[_0x5029('0x3b')]['hasOwnProperty'](_0x5029('0x43'))){_0x512de9['limit']=qs[_0x5029('0x2b')](_0x33812b[_0x5029('0x3b')][_0x5029('0x2b')]);_0x512de9[_0x5029('0x2a')]=qs[_0x5029('0x2a')](_0x33812b['query'][_0x5029('0x2a')]);}return _0x4685a6[_0x5029('0x56')](_0x512de9);}})['then'](function(_0x6500bb){if(_0x6500bb){return _0x6500bb?{'count':_0x1263ba,'rows':_0x6500bb}:null;}})[_0x5029('0x1b')](respondWithResult(_0xfffc0d,null))[_0x5029('0x4f')](handleError(_0xfffc0d,null));};exports[_0x5029('0x57')]=function(_0x9b1c13,_0x1bd1c6,_0x5bd84e){if(_0x9b1c13['body']['id']){delete _0x9b1c13[_0x5029('0x55')]['id'];}return db['SalesforceAccount'][_0x5029('0x58')]({'where':{'id':_0x9b1c13[_0x5029('0x51')]['id']}})['then'](handleEntityNotFound(_0x1bd1c6,null))[_0x5029('0x1b')](function(_0x574d06){if(_0x574d06){_0x9b1c13['body'][_0x5029('0x59')]=_0x574d06['id'];_0x9b1c13[_0x5029('0x55')][_0x5029('0x5a')]=integrations[_0x5029('0x5b')](_0x9b1c13['body'][_0x5029('0x5c')],_0x9b1c13[_0x5029('0x55')]['type']);_0x9b1c13[_0x5029('0x55')][_0x5029('0x5d')]=integrations['getDescriptions'](_0x9b1c13['body']['channel'],_0x9b1c13[_0x5029('0x55')][_0x5029('0x37')]);return db[_0x5029('0x5e')][_0x5029('0x54')](_0x9b1c13[_0x5029('0x55')],{'include':[{'model':db[_0x5029('0x5f')],'as':_0x5029('0x5a')},{'model':db[_0x5029('0x5f')],'as':_0x5029('0x5d')}]});}return null;})['then'](respondWithResult(_0x1bd1c6,null))['catch'](handleError(_0x1bd1c6,null));};exports[_0x5029('0x60')]=function(_0x413f9e,_0xf51086,_0x15906f){var _0x2d8c9a;var _0x3f5115='';var _0x459230='Task';return db[_0x5029('0x4a')][_0x5029('0x58')]({'where':{'id':_0x413f9e[_0x5029('0x51')]['id']},'attributes':['id','remoteUri',_0x5029('0x61'),_0x5029('0x62'),_0x5029('0x63'),'password',_0x5029('0x64')]})[_0x5029('0x1b')](handleEntityNotFound(_0xf51086,null))[_0x5029('0x1b')](function(_0x50af55){if(_0x50af55){_0x3f5115=_0x50af55[_0x5029('0x65')];var _0x145616=_0x3f5115['slice'](-0x1);if(_0x145616==='/'){_0x3f5115=_0x3f5115[_0x5029('0x66')](0x0,_0x3f5115[_0x5029('0x67')](_0x145616));}_0x2d8c9a=new jsforce[(_0x5029('0x68'))]({'oauth2':{'loginUrl':_0x3f5115,'clientId':_0x50af55[_0x5029('0x61')],'clientSecret':_0x50af55[_0x5029('0x62')]}});return _0x2d8c9a['login'](_0x50af55[_0x5029('0x63')],_0x50af55[_0x5029('0x69')][_0x5029('0x6a')](_0x50af55[_0x5029('0x64')]));}})[_0x5029('0x1b')](function(_0x5e7f50){if(_0x5e7f50){if(!_[_0x5029('0x6b')](_0x413f9e[_0x5029('0x3b')][_0x5029('0x6c')])){_0x459230=_0x413f9e['query'][_0x5029('0x6c')];}return _0x2d8c9a[_0x5029('0x6d')](_0x459230)[_0x5029('0x6e')]();}})[_0x5029('0x1b')](function(_0x1b3860){var _0x320a91=[_0x5029('0x6f'),'CallDurationInSeconds',_0x5029('0x70'),_0x5029('0x71'),_0x5029('0x72'),_0x5029('0x73'),_0x5029('0x74'),'Type'];if(!_[_0x5029('0x6b')](_0x413f9e[_0x5029('0x3b')][_0x5029('0x6c')])&&_0x413f9e['query'][_0x5029('0x6c')]===_0x5029('0x75')){_0x320a91=['Type','Origin','Reason',_0x5029('0x74'),_0x5029('0x73'),_0x5029('0x76'),_0x5029('0x77'),_0x5029('0x78')];}if(_0x1b3860){_['remove'](_0x1b3860[_0x5029('0x3f')],function(_0x2e4782){return _0x2e4782[_0x5029('0x79')]===![]&&!_0x320a91['includes'](_0x2e4782['name']);});return{'count':_0x1b3860[_0x5029('0x3f')][_0x5029('0x41')],'rows':_[_0x5029('0x3a')](_0x1b3860[_0x5029('0x3f')],function(_0x597381){return{'id':_0x597381[_0x5029('0x33')],'name':_0x597381[_0x5029('0x7a')],'custom':_0x597381[_0x5029('0x79')],'options':_0x597381[_0x5029('0x7b')][_0x5029('0x41')]>0x0?_[_0x5029('0x3a')](_0x597381[_0x5029('0x7b')],function(_0xe4b730){return{'name':_0xe4b730['label'],'value':_0xe4b730[_0x5029('0x7c')]};}):_0x597381['type']=='boolean'?[{'name':_0x5029('0x7d'),'value':'true'},{'name':_0x5029('0x7e'),'value':_0x5029('0x7f')}]:[]};})};}})[_0x5029('0x1b')](respondWithResult(_0xf51086,null))[_0x5029('0x4f')](function(_0x1b6f4c){var _0x227d13=_0x413f9e[_0x5029('0x3b')][_0x5029('0x16')]?0x1f4:_0x1b6f4c['statusCode']||0x1f4;logger['error'](_0x5029('0x80'),'getFields',_0x227d13,JSON['stringify'](_0x1b6f4c));delete _0x1b6f4c[_0x5029('0x33')];if(_0x227d13===0x191){_0x227d13=0x190;}_0xf51086['status'](_0x227d13)['send'](_0x413f9e[_0x5029('0x3b')][_0x5029('0x16')]?{'message':_0x5029('0x81'),'statusCode':_0x1b6f4c[_0x5029('0x82')]}:_0x1b6f4c);});};
\ No newline at end of file
+var _0xf494=['addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','SalesforceField','getFields','Task','clientId','username','securityToken','remoteUri','substring','Connection','clientSecret','password','concat','isNil','ticketType','sobject','describe','CallDisposition','CallDurationInSeconds','CallObject','IsArchived','Priority','Status','Type','Case','Origin','Reason','SuppliedName','remove','custom','includes','picklistValues','label','value','boolean','True','true','false','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../components/integrations/configuration','jayson/promise','http','test','Sequelize','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','stringify','error','SalesforceAccount,\x20%s,\x20%s','message','result','status','end','count','limit','set','json','apply','reject','save','update','destroy','sendStatus','stack','name','send','map','SalesforceAccount','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','offset','sort','where','pick','VIRTUAL','filter','merge','options','include','findAll','rows','catch','show','params','keys','find','create','body','getConfigurations','findOne','SalesforceConfiguration','order'];(function(_0xfb42e6,_0x5f5d4b){var _0x27265b=function(_0x163e81){while(--_0x163e81){_0xfb42e6['push'](_0xfb42e6['shift']());}};_0x27265b(++_0x5f5d4b);}(_0xf494,0x1c6));var _0x4f49=function(_0x2f22da,_0x4677d7){_0x2f22da=_0x2f22da-0x0;var _0x1ef6d7=_0xf494[_0x2f22da];return _0x1ef6d7;};'use strict';var pdf=require(_0x4f49('0x0'));var emlformat=require(_0x4f49('0x1'));var rimraf=require(_0x4f49('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4f49('0x3'));var rp=require(_0x4f49('0x4'));var moment=require(_0x4f49('0x5'));var BPromise=require(_0x4f49('0x6'));var Mustache=require(_0x4f49('0x7'));var util=require(_0x4f49('0x8'));var path=require(_0x4f49('0x9'));var sox=require(_0x4f49('0xa'));var csv=require(_0x4f49('0xb'));var ejs=require(_0x4f49('0xc'));var fs=require('fs');var _=require(_0x4f49('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x4f49('0xe'));var deskjs=require(_0x4f49('0xf'));var toCsv=require(_0x4f49('0xb'));var querystring=require(_0x4f49('0x10'));var Papa=require(_0x4f49('0x11'));var Redis=require(_0x4f49('0x12'));var authService=require(_0x4f49('0x13'));var qs=require(_0x4f49('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4f49('0x15'));var logger=require(_0x4f49('0x16'))('api');var utils=require(_0x4f49('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var integrations=require(_0x4f49('0x18'));var jayson=require(_0x4f49('0x19'));var client=jayson['client'][_0x4f49('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x111a8b,_0x1b9145,_0x2efe49){if(_0x2efe49){var _0x1a0f1e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1a0f1e[_0x4f49('0x1b')](_0x1b9145)){return _0x111a8b;}else{throw new db[(_0x4f49('0x1c'))]['ValidationError'](_0x4f49('0x1d'));}}else{return _0x111a8b;}}function respondWithRpcPromise(_0x1f2d0d,_0x415e83,_0x5878f4,_0x5bdfaf){return new BPromise(function(_0x2f0a0d,_0x2ecaaa){var _0x74886e=_0x5bdfaf||client;return _0x74886e['request'](_0x1f2d0d,_0x5878f4)[_0x4f49('0x1e')](function(_0x399be7){logger[_0x4f49('0x1f')]('SalesforceAccount,\x20%s,\x20%s',_0x415e83,'request\x20sent');logger['debug']('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x415e83,_0x4f49('0x20'),JSON[_0x4f49('0x21')](_0x399be7));if(_0x399be7[_0x4f49('0x22')]){if(_0x399be7[_0x4f49('0x22')]['code']===0x1f4){logger[_0x4f49('0x22')](_0x4f49('0x23'),_0x415e83,_0x399be7[_0x4f49('0x22')][_0x4f49('0x24')]);return _0x2ecaaa(_0x399be7[_0x4f49('0x22')]['message']);}logger[_0x4f49('0x22')](_0x4f49('0x23'),_0x415e83,_0x399be7[_0x4f49('0x22')]['message']);return _0x2f0a0d(_0x399be7[_0x4f49('0x22')][_0x4f49('0x24')]);}else{logger[_0x4f49('0x1f')](_0x4f49('0x23'),_0x415e83,_0x4f49('0x20'));_0x2f0a0d(_0x399be7[_0x4f49('0x25')]['message']);}})['catch'](function(_0x3a947b){logger[_0x4f49('0x22')]('SalesforceAccount,\x20%s,\x20%s',_0x415e83,_0x3a947b);_0x2ecaaa(_0x3a947b);});});}function respondWithStatusCode(_0x408552,_0x2c1519){_0x2c1519=_0x2c1519||0xcc;return function(_0x35f8e0){if(_0x35f8e0){return _0x408552['sendStatus'](_0x2c1519);}return _0x408552[_0x4f49('0x26')](_0x2c1519)[_0x4f49('0x27')]();};}function respondWithResult(_0x298785,_0x148153){_0x148153=_0x148153||0xc8;return function(_0xfefbab){if(_0xfefbab){return _0x298785[_0x4f49('0x26')](_0x148153)['json'](_0xfefbab);}};}function respondWithFilteredResult(_0x50c571,_0x239f44){return function(_0x2c00ee){if(_0x2c00ee){var _0x605c91=_0x2c00ee[_0x4f49('0x28')],_0x560050=_0x239f44['offset'],_0x3cbfbd=_0x239f44['offset']+_0x239f44[_0x4f49('0x29')],_0x206203;if(_0x3cbfbd>=_0x605c91){_0x3cbfbd=_0x605c91;_0x206203=0xc8;}else{_0x206203=0xce;}_0x50c571[_0x4f49('0x26')](_0x206203);return _0x50c571[_0x4f49('0x2a')]('Content-Range',_0x560050+'-'+_0x3cbfbd+'/'+_0x605c91)[_0x4f49('0x2b')](_0x2c00ee);}return null;};}function patchUpdates(_0x35aa33){return function(_0x173657){try{jsonpatch[_0x4f49('0x2c')](_0x173657,_0x35aa33,!![]);}catch(_0x3e103b){return BPromise[_0x4f49('0x2d')](_0x3e103b);}return _0x173657[_0x4f49('0x2e')]();};}function saveUpdates(_0x45ae19,_0x1f38d3){return function(_0x310ee2){if(_0x310ee2){return _0x310ee2[_0x4f49('0x2f')](_0x45ae19)[_0x4f49('0x1e')](function(_0x29ff83){return _0x29ff83;});}return null;};}function removeEntity(_0x6625cd,_0x135d17){return function(_0x97ef98){if(_0x97ef98){return _0x97ef98[_0x4f49('0x30')]()[_0x4f49('0x1e')](function(){_0x6625cd[_0x4f49('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x45d0d2,_0x46b7ba){return function(_0x24f568){if(!_0x24f568){_0x45d0d2[_0x4f49('0x31')](0x194);}return _0x24f568;};}function handleError(_0x1c3af8,_0x15e82b){_0x15e82b=_0x15e82b||0x1f4;return function(_0x2cbe4e){logger[_0x4f49('0x22')](_0x2cbe4e[_0x4f49('0x32')]);if(_0x2cbe4e[_0x4f49('0x33')]){delete _0x2cbe4e[_0x4f49('0x33')];}_0x1c3af8[_0x4f49('0x26')](_0x15e82b)[_0x4f49('0x34')](_0x2cbe4e);};}exports['index']=function(_0x371282,_0x27b7a9){var _0x36000a={},_0x26014f={},_0x1c1e9b={'count':0x0,'rows':[]};var _0x3ee818=_[_0x4f49('0x35')](db[_0x4f49('0x36')][_0x4f49('0x37')],function(_0xf8c377){return{'name':_0xf8c377[_0x4f49('0x38')],'type':_0xf8c377[_0x4f49('0x39')][_0x4f49('0x3a')]};});_0x26014f[_0x4f49('0x3b')]=_['map'](_0x3ee818,_0x4f49('0x33'));_0x26014f[_0x4f49('0x3c')]=_['keys'](_0x371282[_0x4f49('0x3c')]);_0x26014f[_0x4f49('0x3d')]=_['intersection'](_0x26014f[_0x4f49('0x3b')],_0x26014f[_0x4f49('0x3c')]);_0x36000a[_0x4f49('0x3e')]=_[_0x4f49('0x3f')](_0x26014f[_0x4f49('0x3b')],qs[_0x4f49('0x40')](_0x371282[_0x4f49('0x3c')]['fields']));_0x36000a['attributes']=_0x36000a['attributes'][_0x4f49('0x41')]?_0x36000a[_0x4f49('0x3e')]:_0x26014f[_0x4f49('0x3b')];if(!_0x371282[_0x4f49('0x3c')][_0x4f49('0x42')](_0x4f49('0x43'))){_0x36000a[_0x4f49('0x29')]=qs[_0x4f49('0x29')](_0x371282[_0x4f49('0x3c')]['limit']);_0x36000a['offset']=qs[_0x4f49('0x44')](_0x371282[_0x4f49('0x3c')][_0x4f49('0x44')]);}_0x36000a['order']=qs[_0x4f49('0x45')](_0x371282['query']['sort']);_0x36000a[_0x4f49('0x46')]=qs[_0x4f49('0x3d')](_[_0x4f49('0x47')](_0x371282['query'],_0x26014f[_0x4f49('0x3d')]));if(_0x371282[_0x4f49('0x3c')]['filter']){_0x36000a[_0x4f49('0x46')]=_['merge'](_0x36000a[_0x4f49('0x46')],{'$or':_[_0x4f49('0x35')](_0x3ee818,function(_0x133f39){if(_0x133f39['type']!==_0x4f49('0x48')){var _0x1e5f0b={};_0x1e5f0b[_0x133f39[_0x4f49('0x33')]]={'$like':'%'+_0x371282[_0x4f49('0x3c')][_0x4f49('0x49')]+'%'};return _0x1e5f0b;}})});}_0x36000a=_[_0x4f49('0x4a')]({},_0x36000a,_0x371282[_0x4f49('0x4b')]);var _0x356785={'where':_0x36000a[_0x4f49('0x46')]};return db[_0x4f49('0x36')]['count'](_0x356785)[_0x4f49('0x1e')](function(_0x44bf1d){_0x1c1e9b['count']=_0x44bf1d;if(_0x371282[_0x4f49('0x3c')]['includeAll']){_0x36000a[_0x4f49('0x4c')]=[{'all':!![]}];}return db[_0x4f49('0x36')][_0x4f49('0x4d')](_0x36000a);})[_0x4f49('0x1e')](function(_0x4a91ec){_0x1c1e9b[_0x4f49('0x4e')]=_0x4a91ec;return _0x1c1e9b;})[_0x4f49('0x1e')](respondWithFilteredResult(_0x27b7a9,_0x36000a))[_0x4f49('0x4f')](handleError(_0x27b7a9,null));};exports[_0x4f49('0x50')]=function(_0x3ec266,_0x72ea05){var _0x37fdb7={'raw':![],'where':{'id':_0x3ec266[_0x4f49('0x51')]['id']}},_0xd282c={};_0xd282c[_0x4f49('0x3b')]=_[_0x4f49('0x52')](db[_0x4f49('0x36')][_0x4f49('0x37')]);_0xd282c[_0x4f49('0x3c')]=_[_0x4f49('0x52')](_0x3ec266[_0x4f49('0x3c')]);_0xd282c['filters']=_['intersection'](_0xd282c[_0x4f49('0x3b')],_0xd282c[_0x4f49('0x3c')]);_0x37fdb7[_0x4f49('0x3e')]=_[_0x4f49('0x3f')](_0xd282c[_0x4f49('0x3b')],qs[_0x4f49('0x40')](_0x3ec266[_0x4f49('0x3c')]['fields']));_0x37fdb7[_0x4f49('0x3e')]=_0x37fdb7['attributes'][_0x4f49('0x41')]?_0x37fdb7[_0x4f49('0x3e')]:_0xd282c[_0x4f49('0x3b')];if(_0x3ec266[_0x4f49('0x3c')]['includeAll']){_0x37fdb7[_0x4f49('0x4c')]=[{'all':!![]}];}_0x37fdb7=_['merge']({},_0x37fdb7,_0x3ec266['options']);return db[_0x4f49('0x36')][_0x4f49('0x53')](_0x37fdb7)[_0x4f49('0x1e')](handleEntityNotFound(_0x72ea05,null))[_0x4f49('0x1e')](respondWithResult(_0x72ea05,null))['catch'](handleError(_0x72ea05,null));};exports['create']=function(_0xd7f47b,_0x291a45){return db['SalesforceAccount'][_0x4f49('0x54')](_0xd7f47b['body'],{})['then'](respondWithResult(_0x291a45,0xc9))[_0x4f49('0x4f')](handleError(_0x291a45,null));};exports['update']=function(_0xfa7dd6,_0x492aaa){if(_0xfa7dd6[_0x4f49('0x55')]['id']){delete _0xfa7dd6[_0x4f49('0x55')]['id'];}return db[_0x4f49('0x36')][_0x4f49('0x53')]({'where':{'id':_0xfa7dd6[_0x4f49('0x51')]['id']}})[_0x4f49('0x1e')](handleEntityNotFound(_0x492aaa,null))[_0x4f49('0x1e')](saveUpdates(_0xfa7dd6[_0x4f49('0x55')],null))['then'](respondWithResult(_0x492aaa,null))[_0x4f49('0x4f')](handleError(_0x492aaa,null));};exports['destroy']=function(_0x213608,_0x1f640d){return db[_0x4f49('0x36')][_0x4f49('0x53')]({'where':{'id':_0x213608[_0x4f49('0x51')]['id']}})[_0x4f49('0x1e')](handleEntityNotFound(_0x1f640d,null))['then'](removeEntity(_0x1f640d,null))[_0x4f49('0x4f')](handleError(_0x1f640d,null));};exports[_0x4f49('0x56')]=function(_0x5e3568,_0x5d2b3c,_0x121c04){var _0x447dde={};var _0x2e0df5={};var _0x2409f1;var _0x19a788;return db['SalesforceAccount'][_0x4f49('0x57')]({'where':{'id':_0x5e3568['params']['id']}})[_0x4f49('0x1e')](handleEntityNotFound(_0x5d2b3c,null))[_0x4f49('0x1e')](function(_0x2a2b0d){if(_0x2a2b0d){_0x2409f1=_0x2a2b0d;_0x2e0df5['model']=_[_0x4f49('0x52')](db[_0x4f49('0x58')][_0x4f49('0x37')]);_0x2e0df5[_0x4f49('0x3c')]=_['keys'](_0x5e3568[_0x4f49('0x3c')]);_0x2e0df5[_0x4f49('0x3d')]=_['intersection'](_0x2e0df5[_0x4f49('0x3b')],_0x2e0df5[_0x4f49('0x3c')]);_0x447dde[_0x4f49('0x3e')]=_[_0x4f49('0x3f')](_0x2e0df5[_0x4f49('0x3b')],qs[_0x4f49('0x40')](_0x5e3568[_0x4f49('0x3c')][_0x4f49('0x40')]));_0x447dde['attributes']=_0x447dde[_0x4f49('0x3e')][_0x4f49('0x41')]?_0x447dde[_0x4f49('0x3e')]:_0x2e0df5[_0x4f49('0x3b')];_0x447dde[_0x4f49('0x59')]=qs[_0x4f49('0x45')](_0x5e3568[_0x4f49('0x3c')]['sort']);_0x447dde[_0x4f49('0x46')]=qs['filters'](_[_0x4f49('0x47')](_0x5e3568[_0x4f49('0x3c')],_0x2e0df5[_0x4f49('0x3d')]));if(_0x5e3568[_0x4f49('0x3c')][_0x4f49('0x49')]){_0x447dde[_0x4f49('0x46')]=_[_0x4f49('0x4a')](_0x447dde[_0x4f49('0x46')],{'$or':_[_0x4f49('0x35')](_0x447dde[_0x4f49('0x3e')],function(_0x545552){var _0x2f9f2e={};_0x2f9f2e[_0x545552]={'$like':'%'+_0x5e3568[_0x4f49('0x3c')][_0x4f49('0x49')]+'%'};return _0x2f9f2e;})});}_0x447dde=_[_0x4f49('0x4a')]({},_0x447dde,_0x5e3568['options']);return _0x2409f1['getConfigurations'](_0x447dde);}})[_0x4f49('0x1e')](function(_0x5e4879){if(_0x5e4879){_0x19a788=_0x5e4879[_0x4f49('0x41')];if(!_0x5e3568[_0x4f49('0x3c')][_0x4f49('0x42')](_0x4f49('0x43'))){_0x447dde[_0x4f49('0x29')]=qs[_0x4f49('0x29')](_0x5e3568[_0x4f49('0x3c')][_0x4f49('0x29')]);_0x447dde[_0x4f49('0x44')]=qs[_0x4f49('0x44')](_0x5e3568[_0x4f49('0x3c')][_0x4f49('0x44')]);}return _0x2409f1[_0x4f49('0x56')](_0x447dde);}})[_0x4f49('0x1e')](function(_0x234984){if(_0x234984){return _0x234984?{'count':_0x19a788,'rows':_0x234984}:null;}})[_0x4f49('0x1e')](respondWithResult(_0x5d2b3c,null))[_0x4f49('0x4f')](handleError(_0x5d2b3c,null));};exports[_0x4f49('0x5a')]=function(_0x1f9161,_0x1434ea,_0x2c3962){if(_0x1f9161[_0x4f49('0x55')]['id']){delete _0x1f9161[_0x4f49('0x55')]['id'];}return db[_0x4f49('0x36')][_0x4f49('0x57')]({'where':{'id':_0x1f9161['params']['id']}})[_0x4f49('0x1e')](handleEntityNotFound(_0x1434ea,null))['then'](function(_0x31df7f){if(_0x31df7f){_0x1f9161[_0x4f49('0x55')][_0x4f49('0x5b')]=_0x31df7f['id'];_0x1f9161[_0x4f49('0x55')][_0x4f49('0x5c')]=integrations[_0x4f49('0x5d')](_0x1f9161[_0x4f49('0x55')][_0x4f49('0x5e')],_0x1f9161[_0x4f49('0x55')]['type']);_0x1f9161['body'][_0x4f49('0x5f')]=integrations['getDescriptions'](_0x1f9161[_0x4f49('0x55')][_0x4f49('0x5e')],_0x1f9161[_0x4f49('0x55')][_0x4f49('0x39')]);return db[_0x4f49('0x58')]['create'](_0x1f9161['body'],{'include':[{'model':db[_0x4f49('0x60')],'as':_0x4f49('0x5c')},{'model':db['SalesforceField'],'as':_0x4f49('0x5f')}]});}return null;})[_0x4f49('0x1e')](respondWithResult(_0x1434ea,null))['catch'](handleError(_0x1434ea,null));};exports[_0x4f49('0x61')]=function(_0x5b88aa,_0x121972,_0x160cf8){var _0x544356;var _0x15ed6c='';var _0x4551d9=_0x4f49('0x62');return db[_0x4f49('0x36')][_0x4f49('0x57')]({'where':{'id':_0x5b88aa[_0x4f49('0x51')]['id']},'attributes':['id','remoteUri',_0x4f49('0x63'),'clientSecret',_0x4f49('0x64'),'password',_0x4f49('0x65')]})['then'](handleEntityNotFound(_0x121972,null))[_0x4f49('0x1e')](function(_0x16fad9){if(_0x16fad9){_0x15ed6c=_0x16fad9[_0x4f49('0x66')];var _0x2dbd0f=_0x15ed6c['slice'](-0x1);if(_0x2dbd0f==='/'){_0x15ed6c=_0x15ed6c[_0x4f49('0x67')](0x0,_0x15ed6c['lastIndexOf'](_0x2dbd0f));}_0x544356=new jsforce[(_0x4f49('0x68'))]({'oauth2':{'loginUrl':_0x15ed6c,'clientId':_0x16fad9['clientId'],'clientSecret':_0x16fad9[_0x4f49('0x69')]}});return _0x544356['login'](_0x16fad9['username'],_0x16fad9[_0x4f49('0x6a')][_0x4f49('0x6b')](_0x16fad9[_0x4f49('0x65')]));}})['then'](function(_0x289810){if(_0x289810){if(!_[_0x4f49('0x6c')](_0x5b88aa['query']['ticketType'])){_0x4551d9=_0x5b88aa['query'][_0x4f49('0x6d')];}return _0x544356[_0x4f49('0x6e')](_0x4551d9)[_0x4f49('0x6f')]();}})[_0x4f49('0x1e')](function(_0x1643fc){var _0x517144=[_0x4f49('0x70'),_0x4f49('0x71'),_0x4f49('0x72'),'CallType',_0x4f49('0x73'),_0x4f49('0x74'),_0x4f49('0x75'),_0x4f49('0x76')];if(!_['isNil'](_0x5b88aa[_0x4f49('0x3c')][_0x4f49('0x6d')])&&_0x5b88aa[_0x4f49('0x3c')][_0x4f49('0x6d')]===_0x4f49('0x77')){_0x517144=['Type',_0x4f49('0x78'),_0x4f49('0x79'),'Status',_0x4f49('0x74'),'IsEscalated',_0x4f49('0x7a'),'SuppliedCompany'];}if(_0x1643fc){_[_0x4f49('0x7b')](_0x1643fc[_0x4f49('0x40')],function(_0x2ef19e){return _0x2ef19e[_0x4f49('0x7c')]===![]&&!_0x517144[_0x4f49('0x7d')](_0x2ef19e['name']);});return{'count':_0x1643fc[_0x4f49('0x40')][_0x4f49('0x41')],'rows':_[_0x4f49('0x35')](_0x1643fc[_0x4f49('0x40')],function(_0x4b7c61){return{'id':_0x4b7c61[_0x4f49('0x33')],'name':_0x4b7c61['label'],'custom':_0x4b7c61[_0x4f49('0x7c')],'options':_0x4b7c61['picklistValues'][_0x4f49('0x41')]>0x0?_[_0x4f49('0x35')](_0x4b7c61[_0x4f49('0x7e')],function(_0x34fca3){return{'name':_0x34fca3[_0x4f49('0x7f')],'value':_0x34fca3[_0x4f49('0x80')]};}):_0x4b7c61[_0x4f49('0x39')]==_0x4f49('0x81')?[{'name':_0x4f49('0x82'),'value':_0x4f49('0x83')},{'name':'False','value':_0x4f49('0x84')}]:[]};})};}})[_0x4f49('0x1e')](respondWithResult(_0x121972,null))[_0x4f49('0x4f')](function(_0x299849){var _0x302861=_0x5b88aa[_0x4f49('0x3c')]['test']?0x1f4:_0x299849[_0x4f49('0x85')]||0x1f4;logger[_0x4f49('0x22')](_0x4f49('0x86'),_0x4f49('0x61'),_0x302861,JSON['stringify'](_0x299849));delete _0x299849[_0x4f49('0x33')];if(_0x302861===0x191){_0x302861=0x190;}_0x121972['status'](_0x302861)[_0x4f49('0x34')](_0x5b88aa[_0x4f49('0x3c')][_0x4f49('0x1b')]?{'message':_0x4f49('0x87'),'statusCode':_0x299849['statusCode']}:_0x299849);});};
\ No newline at end of file
diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.model.js b/server/api/intSalesforceAccount/intSalesforceAccount.model.js
index 5f20509..ceccdbb 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 _0x8077=['bluebird','path','../../config/environment','../../components/integrations/configuration','exports','define','SalesforceAccount','lodash','util','../../config/logger','api','moment'];(function(_0x1286fb,_0x4addb1){var _0x3736c4=function(_0x1d4fd1){while(--_0x1d4fd1){_0x1286fb['push'](_0x1286fb['shift']());}};_0x3736c4(++_0x4addb1);}(_0x8077,0x133));var _0x7807=function(_0x462cd7,_0xd55ad9){_0x462cd7=_0x462cd7-0x0;var _0x3d3390=_0x8077[_0x462cd7];return _0x3d3390;};'use strict';var _=require(_0x7807('0x0'));var util=require(_0x7807('0x1'));var logger=require(_0x7807('0x2'))(_0x7807('0x3'));var moment=require(_0x7807('0x4'));var BPromise=require(_0x7807('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7807('0x6'));var rimraf=require('rimraf');var config=require(_0x7807('0x7'));var attributes=require('./intSalesforceAccount.attributes');var integrations=require(_0x7807('0x8'));module[_0x7807('0x9')]=function(_0xdf8842,_0x513632){return _0xdf8842[_0x7807('0xa')](_0x7807('0xb'),attributes,{'tableName':'int_salesforce_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xea73=['api','moment','request-promise','path','../../config/environment','./intSalesforceAccount.attributes','define','int_salesforce_accounts','util','../../config/logger'];(function(_0x5951e8,_0x42b9a7){var _0x20a1f5=function(_0x2bc968){while(--_0x2bc968){_0x5951e8['push'](_0x5951e8['shift']());}};_0x20a1f5(++_0x42b9a7);}(_0xea73,0x166));var _0x3ea7=function(_0x540c07,_0x5ef3b3){_0x540c07=_0x540c07-0x0;var _0x1f10d2=_0xea73[_0x540c07];return _0x1f10d2;};'use strict';var _=require('lodash');var util=require(_0x3ea7('0x0'));var logger=require(_0x3ea7('0x1'))(_0x3ea7('0x2'));var moment=require(_0x3ea7('0x3'));var BPromise=require('bluebird');var rp=require(_0x3ea7('0x4'));var fs=require('fs');var path=require(_0x3ea7('0x5'));var rimraf=require('rimraf');var config=require(_0x3ea7('0x6'));var attributes=require(_0x3ea7('0x7'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0xa0eac2,_0xfd314c){return _0xa0eac2[_0x3ea7('0x8')]('SalesforceAccount',attributes,{'tableName':_0x3ea7('0x9'),'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 493cb0a..31224d4 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 _0x80d9=['bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','SalesforceAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','SalesforceAccount,\x20%s,\x20%s','message','result','catch','SalesforceAccount','findAll','options','raw','limit','model','include','attributes','map','GetSalesforceAccount','stringify','ShowSalesforceAccount','find','debug','lodash','moment'];(function(_0x8854f2,_0x79542c){var _0x38505d=function(_0x5af02b){while(--_0x5af02b){_0x8854f2['push'](_0x8854f2['shift']());}};_0x38505d(++_0x79542c);}(_0x80d9,0x15c));var _0x980d=function(_0x2e5cf6,_0x57f8a9){_0x2e5cf6=_0x2e5cf6-0x0;var _0x3ee1c7=_0x80d9[_0x2e5cf6];return _0x3ee1c7;};'use strict';var _=require(_0x980d('0x0'));var util=require('util');var moment=require(_0x980d('0x1'));var BPromise=require(_0x980d('0x2'));var rs=require(_0x980d('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x980d('0x4'))['db'];var utils=require(_0x980d('0x5'));var logger=require(_0x980d('0x6'))(_0x980d('0x7'));var config=require(_0x980d('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x980d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x50854e,_0x5d9eb0,_0x7e96f7){return new BPromise(function(_0x758fc3,_0x2b8e2c){return client[_0x980d('0xa')](_0x50854e,_0x7e96f7)[_0x980d('0xb')](function(_0xef5778){logger[_0x980d('0xc')]('SalesforceAccount,\x20%s,\x20%s',_0x5d9eb0,'request\x20sent');logger['debug'](_0x980d('0xd'),_0x5d9eb0,_0x980d('0xe'),JSON['stringify'](_0xef5778));if(_0xef5778[_0x980d('0xf')]){if(_0xef5778['error'][_0x980d('0x10')]===0x1f4){logger['error'](_0x980d('0x11'),_0x5d9eb0,_0xef5778[_0x980d('0xf')][_0x980d('0x12')]);return _0x2b8e2c(_0xef5778[_0x980d('0xf')][_0x980d('0x12')]);}logger[_0x980d('0xf')](_0x980d('0x11'),_0x5d9eb0,_0xef5778[_0x980d('0xf')]['message']);return _0x758fc3(_0xef5778[_0x980d('0xf')][_0x980d('0x12')]);}else{logger[_0x980d('0xc')](_0x980d('0x11'),_0x5d9eb0,_0x980d('0xe'));_0x758fc3(_0xef5778[_0x980d('0x13')]['message']);}})[_0x980d('0x14')](function(_0x393ae2){logger['error'](_0x980d('0x11'),_0x5d9eb0,_0x393ae2);_0x2b8e2c(_0x393ae2);});});}exports['GetSalesforceAccount']=function(_0x23f64c){var _0x1bc7e4=this;return new Promise(function(_0x39192b,_0x3c06c5){return db[_0x980d('0x15')][_0x980d('0x16')]({'raw':_0x23f64c[_0x980d('0x17')]?_0x23f64c[_0x980d('0x17')][_0x980d('0x18')]===undefined?!![]:![]:!![],'where':_0x23f64c[_0x980d('0x17')]?_0x23f64c[_0x980d('0x17')]['where']||null:null,'attributes':_0x23f64c['options']?_0x23f64c[_0x980d('0x17')]['attributes']||null:null,'limit':_0x23f64c['options']?_0x23f64c[_0x980d('0x17')][_0x980d('0x19')]||null:null,'include':_0x23f64c[_0x980d('0x17')]?_0x23f64c[_0x980d('0x17')]['include']?_['map'](_0x23f64c[_0x980d('0x17')]['include'],function(_0x4de252){return{'model':db[_0x4de252[_0x980d('0x1a')]],'as':_0x4de252['as'],'attributes':_0x4de252['attributes'],'include':_0x4de252[_0x980d('0x1b')]?_['map'](_0x4de252['include'],function(_0x4ecf91){return{'model':db[_0x4ecf91[_0x980d('0x1a')]],'as':_0x4ecf91['as'],'attributes':_0x4ecf91[_0x980d('0x1c')],'include':_0x4ecf91[_0x980d('0x1b')]?_[_0x980d('0x1d')](_0x4ecf91['include'],function(_0x5a2b76){return{'model':db[_0x5a2b76[_0x980d('0x1a')]],'as':_0x5a2b76['as'],'attributes':_0x5a2b76[_0x980d('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x980d('0xb')](function(_0x1da8ea){logger[_0x980d('0xc')]('GetSalesforceAccount',_0x23f64c);logger['debug'](_0x980d('0x1e'),_0x23f64c,JSON[_0x980d('0x1f')](_0x1da8ea));_0x39192b(_0x1da8ea);})[_0x980d('0x14')](function(_0xf00845){logger[_0x980d('0xf')](_0x980d('0x1e'),_0xf00845['message'],_0x23f64c);_0x3c06c5(_0x1bc7e4[_0x980d('0xf')](0x1f4,_0xf00845[_0x980d('0x12')]));});});};exports[_0x980d('0x20')]=function(_0xd397e3){var _0x3981d8=this;return new Promise(function(_0x38470b,_0x868f1f){return db[_0x980d('0x15')][_0x980d('0x21')]({'raw':_0xd397e3['options']?_0xd397e3[_0x980d('0x17')][_0x980d('0x18')]===undefined?!![]:![]:!![],'where':_0xd397e3[_0x980d('0x17')]?_0xd397e3['options']['where']||null:null,'attributes':_0xd397e3[_0x980d('0x17')]?_0xd397e3['options'][_0x980d('0x1c')]||null:null,'include':_0xd397e3['options']?_0xd397e3['options']['include']?_['map'](_0xd397e3['options']['include'],function(_0x48f013){return{'model':db[_0x48f013[_0x980d('0x1a')]],'as':_0x48f013['as'],'attributes':_0x48f013[_0x980d('0x1c')],'include':_0x48f013[_0x980d('0x1b')]?_['map'](_0x48f013[_0x980d('0x1b')],function(_0x21a66a){return{'model':db[_0x21a66a[_0x980d('0x1a')]],'as':_0x21a66a['as'],'attributes':_0x21a66a[_0x980d('0x1c')],'include':_0x21a66a[_0x980d('0x1b')]?_[_0x980d('0x1d')](_0x21a66a[_0x980d('0x1b')],function(_0x56b08e){return{'model':db[_0x56b08e[_0x980d('0x1a')]],'as':_0x56b08e['as'],'attributes':_0x56b08e[_0x980d('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x92c9bd){logger['info'](_0x980d('0x20'),_0xd397e3);logger[_0x980d('0x22')](_0x980d('0x20'),_0xd397e3,JSON['stringify'](_0x92c9bd));_0x38470b(_0x92c9bd);})['catch'](function(_0x5d5903){logger[_0x980d('0xf')]('ShowSalesforceAccount',_0x5d5903['message'],_0xd397e3);_0x868f1f(_0x3981d8[_0x980d('0xf')](0x1f4,_0x5d5903[_0x980d('0x12')]));});});};
\ No newline at end of file
+var _0xe14d=['catch','GetSalesforceAccount','SalesforceAccount','findAll','options','raw','attributes','limit','include','map','model','ShowSalesforceAccount','where','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SalesforceAccount,\x20%s,\x20%s','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result'];(function(_0x34e37e,_0x3db1ca){var _0x4eb5a3=function(_0x9e3f45){while(--_0x9e3f45){_0x34e37e['push'](_0x34e37e['shift']());}};_0x4eb5a3(++_0x3db1ca);}(_0xe14d,0x1ee));var _0xde14=function(_0x23e7c1,_0x35110c){_0x23e7c1=_0x23e7c1-0x0;var _0x1add43=_0xe14d[_0x23e7c1];return _0x1add43;};'use strict';var _=require(_0xde14('0x0'));var util=require(_0xde14('0x1'));var moment=require(_0xde14('0x2'));var BPromise=require(_0xde14('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xde14('0x4'));var db=require(_0xde14('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xde14('0x6'))(_0xde14('0x7'));var config=require(_0xde14('0x8'));var jayson=require(_0xde14('0x9'));var client=jayson[_0xde14('0xa')][_0xde14('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4b1f6b,_0x5a1344,_0x1bd49d){return new BPromise(function(_0x115b7d,_0x2b0e7c){return client[_0xde14('0xc')](_0x4b1f6b,_0x1bd49d)[_0xde14('0xd')](function(_0x176909){logger[_0xde14('0xe')](_0xde14('0xf'),_0x5a1344,'request\x20sent');logger[_0xde14('0x10')](_0xde14('0x11'),_0x5a1344,_0xde14('0x12'),JSON[_0xde14('0x13')](_0x176909));if(_0x176909[_0xde14('0x14')]){if(_0x176909[_0xde14('0x14')][_0xde14('0x15')]===0x1f4){logger[_0xde14('0x14')](_0xde14('0xf'),_0x5a1344,_0x176909[_0xde14('0x14')][_0xde14('0x16')]);return _0x2b0e7c(_0x176909[_0xde14('0x14')][_0xde14('0x16')]);}logger[_0xde14('0x14')](_0xde14('0xf'),_0x5a1344,_0x176909['error']['message']);return _0x115b7d(_0x176909[_0xde14('0x14')][_0xde14('0x16')]);}else{logger[_0xde14('0xe')]('SalesforceAccount,\x20%s,\x20%s',_0x5a1344,_0xde14('0x12'));_0x115b7d(_0x176909[_0xde14('0x17')][_0xde14('0x16')]);}})[_0xde14('0x18')](function(_0x3de959){logger[_0xde14('0x14')](_0xde14('0xf'),_0x5a1344,_0x3de959);_0x2b0e7c(_0x3de959);});});}exports[_0xde14('0x19')]=function(_0x3cc317){var _0x10c4ab=this;return new Promise(function(_0x590a8b,_0x3f5fcf){return db[_0xde14('0x1a')][_0xde14('0x1b')]({'raw':_0x3cc317[_0xde14('0x1c')]?_0x3cc317['options'][_0xde14('0x1d')]===undefined?!![]:![]:!![],'where':_0x3cc317['options']?_0x3cc317[_0xde14('0x1c')]['where']||null:null,'attributes':_0x3cc317[_0xde14('0x1c')]?_0x3cc317[_0xde14('0x1c')][_0xde14('0x1e')]||null:null,'limit':_0x3cc317[_0xde14('0x1c')]?_0x3cc317[_0xde14('0x1c')][_0xde14('0x1f')]||null:null,'include':_0x3cc317[_0xde14('0x1c')]?_0x3cc317[_0xde14('0x1c')][_0xde14('0x20')]?_[_0xde14('0x21')](_0x3cc317[_0xde14('0x1c')][_0xde14('0x20')],function(_0x8f8033){return{'model':db[_0x8f8033['model']],'as':_0x8f8033['as'],'attributes':_0x8f8033[_0xde14('0x1e')],'include':_0x8f8033[_0xde14('0x20')]?_[_0xde14('0x21')](_0x8f8033[_0xde14('0x20')],function(_0x1bb7be){return{'model':db[_0x1bb7be[_0xde14('0x22')]],'as':_0x1bb7be['as'],'attributes':_0x1bb7be[_0xde14('0x1e')],'include':_0x1bb7be[_0xde14('0x20')]?_[_0xde14('0x21')](_0x1bb7be[_0xde14('0x20')],function(_0x4eff65){return{'model':db[_0x4eff65[_0xde14('0x22')]],'as':_0x4eff65['as'],'attributes':_0x4eff65[_0xde14('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xde14('0xd')](function(_0xf8279a){logger['info'](_0xde14('0x19'),_0x3cc317);logger[_0xde14('0x10')](_0xde14('0x19'),_0x3cc317,JSON['stringify'](_0xf8279a));_0x590a8b(_0xf8279a);})[_0xde14('0x18')](function(_0x582537){logger[_0xde14('0x14')](_0xde14('0x19'),_0x582537[_0xde14('0x16')],_0x3cc317);_0x3f5fcf(_0x10c4ab[_0xde14('0x14')](0x1f4,_0x582537[_0xde14('0x16')]));});});};exports[_0xde14('0x23')]=function(_0xae9dca){var _0x464666=this;return new Promise(function(_0x4e7c5b,_0xbfc01b){return db[_0xde14('0x1a')]['find']({'raw':_0xae9dca[_0xde14('0x1c')]?_0xae9dca['options'][_0xde14('0x1d')]===undefined?!![]:![]:!![],'where':_0xae9dca[_0xde14('0x1c')]?_0xae9dca[_0xde14('0x1c')][_0xde14('0x24')]||null:null,'attributes':_0xae9dca[_0xde14('0x1c')]?_0xae9dca['options'][_0xde14('0x1e')]||null:null,'include':_0xae9dca[_0xde14('0x1c')]?_0xae9dca['options'][_0xde14('0x20')]?_[_0xde14('0x21')](_0xae9dca[_0xde14('0x1c')][_0xde14('0x20')],function(_0x2713fb){return{'model':db[_0x2713fb[_0xde14('0x22')]],'as':_0x2713fb['as'],'attributes':_0x2713fb[_0xde14('0x1e')],'include':_0x2713fb[_0xde14('0x20')]?_[_0xde14('0x21')](_0x2713fb['include'],function(_0x50084f){return{'model':db[_0x50084f[_0xde14('0x22')]],'as':_0x50084f['as'],'attributes':_0x50084f[_0xde14('0x1e')],'include':_0x50084f[_0xde14('0x20')]?_[_0xde14('0x21')](_0x50084f[_0xde14('0x20')],function(_0x23813f){return{'model':db[_0x23813f[_0xde14('0x22')]],'as':_0x23813f['as'],'attributes':_0x23813f[_0xde14('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xde14('0xd')](function(_0x4e33e0){logger[_0xde14('0xe')]('ShowSalesforceAccount',_0xae9dca);logger['debug']('ShowSalesforceAccount',_0xae9dca,JSON[_0xde14('0x13')](_0x4e33e0));_0x4e7c5b(_0x4e33e0);})[_0xde14('0x18')](function(_0x398f63){logger[_0xde14('0x14')](_0xde14('0x23'),_0x398f63[_0xde14('0x16')],_0xae9dca);_0xbfc01b(_0x464666[_0xde14('0x14')](0x1f4,_0x398f63[_0xde14('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/index.js b/server/api/intSalesforceConfiguration/index.js
index 0706c26..9c3282f 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 _0xe1f1=['destroy','exports','util','path','connect-timeout','../../config/environment','./intSalesforceConfiguration.controller','get','index','/:id','isAuthenticated','show','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','create','update','delete'];(function(_0x13b15c,_0x185d61){var _0x24e7ef=function(_0x282021){while(--_0x282021){_0x13b15c['push'](_0x13b15c['shift']());}};_0x24e7ef(++_0x185d61);}(_0xe1f1,0x17e));var _0x1e1f=function(_0x4ffdbf,_0x3e63a6){_0x4ffdbf=_0x4ffdbf-0x0;var _0x57c4a0=_0xe1f1[_0x4ffdbf];return _0x57c4a0;};'use strict';var multer=require('multer');var util=require(_0x1e1f('0x0'));var path=require(_0x1e1f('0x1'));var timeout=require(_0x1e1f('0x2'));var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x1e1f('0x3'));var controller=require(_0x1e1f('0x4'));router[_0x1e1f('0x5')]('/',auth['isAuthenticated'](),controller[_0x1e1f('0x6')]);router['get'](_0x1e1f('0x7'),auth[_0x1e1f('0x8')](),controller[_0x1e1f('0x9')]);router[_0x1e1f('0x5')](_0x1e1f('0xa'),auth[_0x1e1f('0x8')](),controller['getFields']);router[_0x1e1f('0x5')](_0x1e1f('0xb'),auth[_0x1e1f('0x8')](),controller[_0x1e1f('0xc')]);router[_0x1e1f('0x5')](_0x1e1f('0xd'),auth['isAuthenticated'](),controller[_0x1e1f('0xe')]);router['post']('/',auth[_0x1e1f('0x8')](),controller[_0x1e1f('0xf')]);router['put'](_0x1e1f('0x7'),auth[_0x1e1f('0x8')](),controller[_0x1e1f('0x10')]);router[_0x1e1f('0x11')](_0x1e1f('0x7'),auth[_0x1e1f('0x8')](),controller[_0x1e1f('0x12')]);module[_0x1e1f('0x13')]=router;
\ No newline at end of file
+var _0x9d67=['delete','destroy','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceConfiguration.controller','get','isAuthenticated','/:id','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','put'];(function(_0x415816,_0x666ce3){var _0x351d34=function(_0xd9e554){while(--_0xd9e554){_0x415816['push'](_0x415816['shift']());}};_0x351d34(++_0x666ce3);}(_0x9d67,0x1e6));var _0x79d6=function(_0x4e82ce,_0x435ec7){_0x4e82ce=_0x4e82ce-0x0;var _0x18cf87=_0x9d67[_0x4e82ce];return _0x18cf87;};'use strict';var multer=require(_0x79d6('0x0'));var util=require(_0x79d6('0x1'));var path=require(_0x79d6('0x2'));var timeout=require(_0x79d6('0x3'));var express=require(_0x79d6('0x4'));var router=express['Router']();var auth=require(_0x79d6('0x5'));var interaction=require(_0x79d6('0x6'));var config=require(_0x79d6('0x7'));var controller=require(_0x79d6('0x8'));router[_0x79d6('0x9')]('/',auth[_0x79d6('0xa')](),controller['index']);router[_0x79d6('0x9')](_0x79d6('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x79d6('0x9')](_0x79d6('0xc'),auth['isAuthenticated'](),controller[_0x79d6('0xd')]);router[_0x79d6('0x9')](_0x79d6('0xe'),auth[_0x79d6('0xa')](),controller[_0x79d6('0xf')]);router[_0x79d6('0x9')](_0x79d6('0x10'),auth[_0x79d6('0xa')](),controller[_0x79d6('0x11')]);router[_0x79d6('0x12')]('/',auth[_0x79d6('0xa')](),controller['create']);router[_0x79d6('0x13')]('/:id',auth[_0x79d6('0xa')](),controller['update']);router[_0x79d6('0x14')]('/:id',auth[_0x79d6('0xa')](),controller[_0x79d6('0x15')]);module[_0x79d6('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js
index 30e723b..d47d216 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 _0xc927=['nothing','lead','sequelize','STRING','ENUM','Case','contact'];(function(_0x4045e7,_0x4514a4){var _0x23c339=function(_0x2016f3){while(--_0x2016f3){_0x4045e7['push'](_0x4045e7['shift']());}};_0x23c339(++_0x4514a4);}(_0xc927,0x12f));var _0x7c92=function(_0x46b26e,_0x4a536d){_0x46b26e=_0x46b26e-0x0;var _0x54d101=_0xc927[_0x46b26e];return _0x54d101;};'use strict';var Sequelize=require(_0x7c92('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x7c92('0x1')]},'ticketType':{'type':Sequelize[_0x7c92('0x2')]('Task',_0x7c92('0x3')),'defaultValue':'Task'},'moduleSearch':{'type':Sequelize['ENUM']('contact_lead',_0x7c92('0x4'),'lead'),'defaultValue':'contact_lead'},'moduleCreate':{'type':Sequelize['ENUM'](_0x7c92('0x5'),'contact',_0x7c92('0x6')),'defaultValue':_0x7c92('0x6')}};
\ No newline at end of file
+var _0x0649=['lead','contact','sequelize','exports','STRING','ENUM','Case','Task','contact_lead'];(function(_0x2f3b14,_0x554f94){var _0x20e924=function(_0x3f4c1c){while(--_0x3f4c1c){_0x2f3b14['push'](_0x2f3b14['shift']());}};_0x20e924(++_0x554f94);}(_0x0649,0x77));var _0x9064=function(_0x157e8f,_0x317587){_0x157e8f=_0x157e8f-0x0;var _0x57df7f=_0x0649[_0x157e8f];return _0x57df7f;};'use strict';var Sequelize=require(_0x9064('0x0'));module[_0x9064('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x9064('0x2')]},'ticketType':{'type':Sequelize[_0x9064('0x3')]('Task',_0x9064('0x4')),'defaultValue':_0x9064('0x5')},'moduleSearch':{'type':Sequelize[_0x9064('0x3')](_0x9064('0x6'),'contact',_0x9064('0x7')),'defaultValue':'contact_lead'},'moduleCreate':{'type':Sequelize[_0x9064('0x3')]('nothing',_0x9064('0x8'),'lead'),'defaultValue':_0x9064('0x7')}};
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js
index 4a14929..34cce14 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 _0x4438=['count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','map','SalesforceConfiguration','fieldName','type','key','model','keys','filters','intersection','query','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','include','findAll','rows','show','rawAttributes','length','includeAll','options','create','find','params','body','getFields','findOne','getSubjects','SalesforceField','getDescriptions','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','jsforce','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','SalesforceConfiguration,\x20%s,\x20%s','debug','error','code','message','request\x20sent','catch','sendStatus','status','json'];(function(_0x765972,_0x340b0e){var _0x3893ab=function(_0x1175f4){while(--_0x1175f4){_0x765972['push'](_0x765972['shift']());}};_0x3893ab(++_0x340b0e);}(_0x4438,0x1b0));var _0x8443=function(_0x3b1582,_0x31a7ff){_0x3b1582=_0x3b1582-0x0;var _0x3f2d2f=_0x4438[_0x3b1582];return _0x3f2d2f;};'use strict';var pdf=require(_0x8443('0x0'));var emlformat=require(_0x8443('0x1'));var rimraf=require(_0x8443('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x8443('0x3'));var rp=require(_0x8443('0x4'));var moment=require(_0x8443('0x5'));var BPromise=require(_0x8443('0x6'));var Mustache=require('mustache');var util=require(_0x8443('0x7'));var path=require(_0x8443('0x8'));var sox=require(_0x8443('0x9'));var csv=require(_0x8443('0xa'));var ejs=require(_0x8443('0xb'));var fs=require('fs');var _=require(_0x8443('0xc'));var squel=require(_0x8443('0xd'));var crypto=require('crypto');var jsforce=require(_0x8443('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x8443('0xa'));var querystring=require('querystring');var Papa=require(_0x8443('0xf'));var Redis=require(_0x8443('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x8443('0x11'));var as=require(_0x8443('0x12'));var hardwareService=require(_0x8443('0x13'));var logger=require(_0x8443('0x14'))(_0x8443('0x15'));var utils=require(_0x8443('0x16'));var config=require(_0x8443('0x17'));var db=require(_0x8443('0x18'))['db'];var jayson=require(_0x8443('0x19'));var client=jayson['client'][_0x8443('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x801994,_0x4d7d07,_0x4137bb){if(_0x4137bb){var _0x223a56=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x223a56[_0x8443('0x1b')](_0x4d7d07)){return _0x801994;}else{throw new db[(_0x8443('0x1c'))][(_0x8443('0x1d'))](_0x8443('0x1e'));}}else{return _0x801994;}}function respondWithRpcPromise(_0x28a1d9,_0x443ea9,_0x101fab,_0x28bb44){return new BPromise(function(_0x48841c,_0x2cf4ac){var _0xaeea4c=_0x28bb44||client;return _0xaeea4c['request'](_0x28a1d9,_0x101fab)[_0x8443('0x1f')](function(_0x4e2e65){logger[_0x8443('0x20')](_0x8443('0x21'),_0x443ea9,'request\x20sent');logger[_0x8443('0x22')]('SalesforceConfiguration,\x20%s,\x20%s,\x20%s',_0x443ea9,'request\x20sent',JSON['stringify'](_0x4e2e65));if(_0x4e2e65['error']){if(_0x4e2e65[_0x8443('0x23')][_0x8443('0x24')]===0x1f4){logger[_0x8443('0x23')](_0x8443('0x21'),_0x443ea9,_0x4e2e65['error'][_0x8443('0x25')]);return _0x2cf4ac(_0x4e2e65[_0x8443('0x23')]['message']);}logger[_0x8443('0x23')](_0x8443('0x21'),_0x443ea9,_0x4e2e65['error']['message']);return _0x48841c(_0x4e2e65[_0x8443('0x23')][_0x8443('0x25')]);}else{logger[_0x8443('0x20')](_0x8443('0x21'),_0x443ea9,_0x8443('0x26'));_0x48841c(_0x4e2e65['result'][_0x8443('0x25')]);}})[_0x8443('0x27')](function(_0x31d75e){logger[_0x8443('0x23')](_0x8443('0x21'),_0x443ea9,_0x31d75e);_0x2cf4ac(_0x31d75e);});});}function respondWithStatusCode(_0x1e43d6,_0x566aa2){_0x566aa2=_0x566aa2||0xcc;return function(_0x592ef4){if(_0x592ef4){return _0x1e43d6[_0x8443('0x28')](_0x566aa2);}return _0x1e43d6[_0x8443('0x29')](_0x566aa2)['end']();};}function respondWithResult(_0x2d867e,_0x4b1e06){_0x4b1e06=_0x4b1e06||0xc8;return function(_0x3646be){if(_0x3646be){return _0x2d867e[_0x8443('0x29')](_0x4b1e06)[_0x8443('0x2a')](_0x3646be);}};}function respondWithFilteredResult(_0x46e84e,_0xc0ed3a){return function(_0x4b693e){if(_0x4b693e){var _0x2301a9=_0x4b693e[_0x8443('0x2b')],_0x4f36d8=_0xc0ed3a[_0x8443('0x2c')],_0x369105=_0xc0ed3a['offset']+_0xc0ed3a[_0x8443('0x2d')],_0x3602cf;if(_0x369105>=_0x2301a9){_0x369105=_0x2301a9;_0x3602cf=0xc8;}else{_0x3602cf=0xce;}_0x46e84e[_0x8443('0x29')](_0x3602cf);return _0x46e84e[_0x8443('0x2e')](_0x8443('0x2f'),_0x4f36d8+'-'+_0x369105+'/'+_0x2301a9)[_0x8443('0x2a')](_0x4b693e);}return null;};}function patchUpdates(_0x28baca){return function(_0x31094a){try{jsonpatch[_0x8443('0x30')](_0x31094a,_0x28baca,!![]);}catch(_0x5db57e){return BPromise[_0x8443('0x31')](_0x5db57e);}return _0x31094a[_0x8443('0x32')]();};}function saveUpdates(_0x35b6e6,_0x102f6b){return function(_0x1f6c27){if(_0x1f6c27){return _0x1f6c27[_0x8443('0x33')](_0x35b6e6)[_0x8443('0x1f')](function(_0x4593ce){return _0x4593ce;});}return null;};}function removeEntity(_0x4cf211,_0x2d72fb){return function(_0x13afdc){if(_0x13afdc){return _0x13afdc[_0x8443('0x34')]()[_0x8443('0x1f')](function(){_0x4cf211[_0x8443('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x16f0da,_0x5706cc){return function(_0x42842b){if(!_0x42842b){_0x16f0da[_0x8443('0x28')](0x194);}return _0x42842b;};}function handleError(_0x3a19bc,_0x26eb0d){_0x26eb0d=_0x26eb0d||0x1f4;return function(_0x48e9ec){logger[_0x8443('0x23')](_0x48e9ec[_0x8443('0x35')]);if(_0x48e9ec[_0x8443('0x36')]){delete _0x48e9ec[_0x8443('0x36')];}_0x3a19bc['status'](_0x26eb0d)[_0x8443('0x37')](_0x48e9ec);};}exports[_0x8443('0x38')]=function(_0x8c876,_0x30c1ac){var _0x134758={},_0x13df28={},_0x551bf2={'count':0x0,'rows':[]};var _0xd2c91d=_[_0x8443('0x39')](db[_0x8443('0x3a')]['rawAttributes'],function(_0x50928e){return{'name':_0x50928e[_0x8443('0x3b')],'type':_0x50928e[_0x8443('0x3c')][_0x8443('0x3d')]};});_0x13df28[_0x8443('0x3e')]=_[_0x8443('0x39')](_0xd2c91d,_0x8443('0x36'));_0x13df28['query']=_[_0x8443('0x3f')](_0x8c876['query']);_0x13df28[_0x8443('0x40')]=_[_0x8443('0x41')](_0x13df28[_0x8443('0x3e')],_0x13df28[_0x8443('0x42')]);_0x134758['attributes']=_[_0x8443('0x41')](_0x13df28['model'],qs[_0x8443('0x43')](_0x8c876[_0x8443('0x42')][_0x8443('0x43')]));_0x134758['attributes']=_0x134758[_0x8443('0x44')]['length']?_0x134758[_0x8443('0x44')]:_0x13df28['model'];if(!_0x8c876[_0x8443('0x42')][_0x8443('0x45')](_0x8443('0x46'))){_0x134758[_0x8443('0x2d')]=qs[_0x8443('0x2d')](_0x8c876[_0x8443('0x42')][_0x8443('0x2d')]);_0x134758['offset']=qs[_0x8443('0x2c')](_0x8c876[_0x8443('0x42')][_0x8443('0x2c')]);}_0x134758[_0x8443('0x47')]=qs[_0x8443('0x48')](_0x8c876[_0x8443('0x42')][_0x8443('0x48')]);_0x134758[_0x8443('0x49')]=qs[_0x8443('0x40')](_[_0x8443('0x4a')](_0x8c876[_0x8443('0x42')],_0x13df28[_0x8443('0x40')]));if(_0x8c876['query'][_0x8443('0x4b')]){_0x134758[_0x8443('0x49')]=_[_0x8443('0x4c')](_0x134758[_0x8443('0x49')],{'$or':_[_0x8443('0x39')](_0xd2c91d,function(_0x525cf8){if(_0x525cf8['type']!==_0x8443('0x4d')){var _0x25b0ff={};_0x25b0ff[_0x525cf8[_0x8443('0x36')]]={'$like':'%'+_0x8c876[_0x8443('0x42')][_0x8443('0x4b')]+'%'};return _0x25b0ff;}})});}_0x134758=_[_0x8443('0x4c')]({},_0x134758,_0x8c876['options']);var _0x57e5ed={'where':_0x134758[_0x8443('0x49')]};return db[_0x8443('0x3a')][_0x8443('0x2b')](_0x57e5ed)[_0x8443('0x1f')](function(_0x41486c){_0x551bf2[_0x8443('0x2b')]=_0x41486c;if(_0x8c876[_0x8443('0x42')]['includeAll']){_0x134758[_0x8443('0x4e')]=[{'all':!![]}];}return db[_0x8443('0x3a')][_0x8443('0x4f')](_0x134758);})[_0x8443('0x1f')](function(_0x3356d2){_0x551bf2[_0x8443('0x50')]=_0x3356d2;return _0x551bf2;})['then'](respondWithFilteredResult(_0x30c1ac,_0x134758))[_0x8443('0x27')](handleError(_0x30c1ac,null));};exports[_0x8443('0x51')]=function(_0x2c630d,_0x272d63){var _0x4178b6={'raw':![],'where':{'id':_0x2c630d['params']['id']}},_0x13dbf5={};_0x13dbf5['model']=_['keys'](db[_0x8443('0x3a')][_0x8443('0x52')]);_0x13dbf5['query']=_['keys'](_0x2c630d[_0x8443('0x42')]);_0x13dbf5[_0x8443('0x40')]=_['intersection'](_0x13dbf5[_0x8443('0x3e')],_0x13dbf5[_0x8443('0x42')]);_0x4178b6['attributes']=_[_0x8443('0x41')](_0x13dbf5[_0x8443('0x3e')],qs[_0x8443('0x43')](_0x2c630d[_0x8443('0x42')][_0x8443('0x43')]));_0x4178b6[_0x8443('0x44')]=_0x4178b6['attributes'][_0x8443('0x53')]?_0x4178b6[_0x8443('0x44')]:_0x13dbf5[_0x8443('0x3e')];if(_0x2c630d['query'][_0x8443('0x54')]){_0x4178b6[_0x8443('0x4e')]=[{'all':!![]}];}_0x4178b6=_['merge']({},_0x4178b6,_0x2c630d[_0x8443('0x55')]);return db[_0x8443('0x3a')]['find'](_0x4178b6)[_0x8443('0x1f')](handleEntityNotFound(_0x272d63,null))[_0x8443('0x1f')](respondWithResult(_0x272d63,null))[_0x8443('0x27')](handleError(_0x272d63,null));};exports['create']=function(_0xeb32ed,_0x2a88f1){return db[_0x8443('0x3a')][_0x8443('0x56')](_0xeb32ed['body'],{})[_0x8443('0x1f')](respondWithResult(_0x2a88f1,0xc9))[_0x8443('0x27')](handleError(_0x2a88f1,null));};exports[_0x8443('0x33')]=function(_0x1edc3d,_0x4ad5d1){if(_0x1edc3d['body']['id']){delete _0x1edc3d['body']['id'];}return db['SalesforceConfiguration'][_0x8443('0x57')]({'where':{'id':_0x1edc3d[_0x8443('0x58')]['id']}})['then'](handleEntityNotFound(_0x4ad5d1,null))['then'](saveUpdates(_0x1edc3d[_0x8443('0x59')],null))[_0x8443('0x1f')](respondWithResult(_0x4ad5d1,null))[_0x8443('0x27')](handleError(_0x4ad5d1,null));};exports[_0x8443('0x34')]=function(_0x266ed7,_0xf2ab8e){return db['SalesforceConfiguration']['find']({'where':{'id':_0x266ed7[_0x8443('0x58')]['id']}})[_0x8443('0x1f')](handleEntityNotFound(_0xf2ab8e,null))['then'](removeEntity(_0xf2ab8e,null))[_0x8443('0x27')](handleError(_0xf2ab8e,null));};exports[_0x8443('0x5a')]=function(_0x23cdf5,_0xb2d8b8,_0x248879){var _0x2b11b8={};var _0x3d24b2={};var _0x2e89a9;var _0x837ce7;return db[_0x8443('0x3a')][_0x8443('0x5b')]({'where':{'id':_0x23cdf5[_0x8443('0x58')]['id']}})['then'](handleEntityNotFound(_0xb2d8b8,null))[_0x8443('0x1f')](function(_0x36c99a){if(_0x36c99a){_0x2e89a9=_0x36c99a;_0x3d24b2[_0x8443('0x3e')]=_[_0x8443('0x3f')](db['SalesforceField'][_0x8443('0x52')]);_0x3d24b2['query']=_[_0x8443('0x3f')](_0x23cdf5[_0x8443('0x42')]);_0x3d24b2[_0x8443('0x40')]=_[_0x8443('0x41')](_0x3d24b2[_0x8443('0x3e')],_0x3d24b2[_0x8443('0x42')]);_0x2b11b8[_0x8443('0x44')]=_[_0x8443('0x41')](_0x3d24b2[_0x8443('0x3e')],qs[_0x8443('0x43')](_0x23cdf5['query'][_0x8443('0x43')]));_0x2b11b8[_0x8443('0x44')]=_0x2b11b8[_0x8443('0x44')][_0x8443('0x53')]?_0x2b11b8['attributes']:_0x3d24b2['model'];_0x2b11b8[_0x8443('0x47')]=qs[_0x8443('0x48')](_0x23cdf5[_0x8443('0x42')][_0x8443('0x48')]);_0x2b11b8['where']=qs[_0x8443('0x40')](_['pick'](_0x23cdf5[_0x8443('0x42')],_0x3d24b2[_0x8443('0x40')]));if(_0x23cdf5[_0x8443('0x42')][_0x8443('0x4b')]){_0x2b11b8[_0x8443('0x49')]=_[_0x8443('0x4c')](_0x2b11b8['where'],{'$or':_[_0x8443('0x39')](_0x2b11b8['attributes'],function(_0xfdb621){var _0x4738d7={};_0x4738d7[_0xfdb621]={'$like':'%'+_0x23cdf5[_0x8443('0x42')][_0x8443('0x4b')]+'%'};return _0x4738d7;})});}_0x2b11b8=_[_0x8443('0x4c')]({},_0x2b11b8,_0x23cdf5[_0x8443('0x55')]);return _0x2e89a9[_0x8443('0x5a')](_0x2b11b8);}})[_0x8443('0x1f')](function(_0x57447d){if(_0x57447d){_0x837ce7=_0x57447d['length'];if(!_0x23cdf5[_0x8443('0x42')]['hasOwnProperty']('nolimit')){_0x2b11b8[_0x8443('0x2d')]=qs[_0x8443('0x2d')](_0x23cdf5[_0x8443('0x42')][_0x8443('0x2d')]);_0x2b11b8[_0x8443('0x2c')]=qs[_0x8443('0x2c')](_0x23cdf5['query']['offset']);}return _0x2e89a9[_0x8443('0x5a')](_0x2b11b8);}})[_0x8443('0x1f')](function(_0x15bf6a){if(_0x15bf6a){return _0x15bf6a?{'count':_0x837ce7,'rows':_0x15bf6a}:null;}})[_0x8443('0x1f')](respondWithResult(_0xb2d8b8,null))['catch'](handleError(_0xb2d8b8,null));};exports[_0x8443('0x5c')]=function(_0x20dfa3,_0x1c6dd2,_0x22d0e9){var _0x3e347e={};var _0x159937={};var _0x2e09e4;var _0x36f58e;return db[_0x8443('0x3a')][_0x8443('0x5b')]({'where':{'id':_0x20dfa3['params']['id']}})['then'](handleEntityNotFound(_0x1c6dd2,null))[_0x8443('0x1f')](function(_0x544070){if(_0x544070){_0x2e09e4=_0x544070;_0x159937[_0x8443('0x3e')]=_['keys'](db[_0x8443('0x5d')][_0x8443('0x52')]);_0x159937[_0x8443('0x42')]=_[_0x8443('0x3f')](_0x20dfa3[_0x8443('0x42')]);_0x159937[_0x8443('0x40')]=_['intersection'](_0x159937[_0x8443('0x3e')],_0x159937[_0x8443('0x42')]);_0x3e347e[_0x8443('0x44')]=_[_0x8443('0x41')](_0x159937[_0x8443('0x3e')],qs[_0x8443('0x43')](_0x20dfa3[_0x8443('0x42')][_0x8443('0x43')]));_0x3e347e['attributes']=_0x3e347e[_0x8443('0x44')]['length']?_0x3e347e[_0x8443('0x44')]:_0x159937['model'];_0x3e347e['order']=qs[_0x8443('0x48')](_0x20dfa3['query'][_0x8443('0x48')]);_0x3e347e['where']=qs['filters'](_[_0x8443('0x4a')](_0x20dfa3['query'],_0x159937[_0x8443('0x40')]));if(_0x20dfa3[_0x8443('0x42')][_0x8443('0x4b')]){_0x3e347e[_0x8443('0x49')]=_[_0x8443('0x4c')](_0x3e347e[_0x8443('0x49')],{'$or':_[_0x8443('0x39')](_0x3e347e[_0x8443('0x44')],function(_0x86a630){var _0x3889c7={};_0x3889c7[_0x86a630]={'$like':'%'+_0x20dfa3['query']['filter']+'%'};return _0x3889c7;})});}_0x3e347e=_[_0x8443('0x4c')]({},_0x3e347e,_0x20dfa3[_0x8443('0x55')]);return _0x2e09e4[_0x8443('0x5c')](_0x3e347e);}})[_0x8443('0x1f')](function(_0x178de9){if(_0x178de9){_0x36f58e=_0x178de9[_0x8443('0x53')];if(!_0x20dfa3['query'][_0x8443('0x45')](_0x8443('0x46'))){_0x3e347e[_0x8443('0x2d')]=qs[_0x8443('0x2d')](_0x20dfa3[_0x8443('0x42')]['limit']);_0x3e347e[_0x8443('0x2c')]=qs[_0x8443('0x2c')](_0x20dfa3[_0x8443('0x42')][_0x8443('0x2c')]);}return _0x2e09e4['getSubjects'](_0x3e347e);}})[_0x8443('0x1f')](function(_0x53e689){if(_0x53e689){return _0x53e689?{'count':_0x36f58e,'rows':_0x53e689}:null;}})[_0x8443('0x1f')](respondWithResult(_0x1c6dd2,null))[_0x8443('0x27')](handleError(_0x1c6dd2,null));};exports[_0x8443('0x5e')]=function(_0x4341de,_0x13f725,_0x2f9c30){var _0x480555={};var _0x2d1030={};var _0x4115f7;var _0x40656a;return db['SalesforceConfiguration']['findOne']({'where':{'id':_0x4341de[_0x8443('0x58')]['id']}})['then'](handleEntityNotFound(_0x13f725,null))['then'](function(_0x93a592){if(_0x93a592){_0x4115f7=_0x93a592;_0x2d1030[_0x8443('0x3e')]=_[_0x8443('0x3f')](db['SalesforceField'][_0x8443('0x52')]);_0x2d1030['query']=_[_0x8443('0x3f')](_0x4341de[_0x8443('0x42')]);_0x2d1030[_0x8443('0x40')]=_[_0x8443('0x41')](_0x2d1030['model'],_0x2d1030[_0x8443('0x42')]);_0x480555[_0x8443('0x44')]=_[_0x8443('0x41')](_0x2d1030[_0x8443('0x3e')],qs[_0x8443('0x43')](_0x4341de[_0x8443('0x42')][_0x8443('0x43')]));_0x480555[_0x8443('0x44')]=_0x480555[_0x8443('0x44')][_0x8443('0x53')]?_0x480555[_0x8443('0x44')]:_0x2d1030['model'];_0x480555[_0x8443('0x47')]=qs[_0x8443('0x48')](_0x4341de['query'][_0x8443('0x48')]);_0x480555[_0x8443('0x49')]=qs['filters'](_[_0x8443('0x4a')](_0x4341de[_0x8443('0x42')],_0x2d1030['filters']));if(_0x4341de['query'][_0x8443('0x4b')]){_0x480555[_0x8443('0x49')]=_['merge'](_0x480555[_0x8443('0x49')],{'$or':_[_0x8443('0x39')](_0x480555[_0x8443('0x44')],function(_0xd742c0){var _0x2dfbd5={};_0x2dfbd5[_0xd742c0]={'$like':'%'+_0x4341de[_0x8443('0x42')][_0x8443('0x4b')]+'%'};return _0x2dfbd5;})});}_0x480555=_[_0x8443('0x4c')]({},_0x480555,_0x4341de[_0x8443('0x55')]);return _0x4115f7['getDescriptions'](_0x480555);}})[_0x8443('0x1f')](function(_0x5d5601){if(_0x5d5601){_0x40656a=_0x5d5601[_0x8443('0x53')];if(!_0x4341de[_0x8443('0x42')]['hasOwnProperty'](_0x8443('0x46'))){_0x480555['limit']=qs[_0x8443('0x2d')](_0x4341de[_0x8443('0x42')][_0x8443('0x2d')]);_0x480555[_0x8443('0x2c')]=qs[_0x8443('0x2c')](_0x4341de[_0x8443('0x42')]['offset']);}return _0x4115f7['getDescriptions'](_0x480555);}})[_0x8443('0x1f')](function(_0x49413b){if(_0x49413b){return _0x49413b?{'count':_0x40656a,'rows':_0x49413b}:null;}})['then'](respondWithResult(_0x13f725,null))[_0x8443('0x27')](handleError(_0x13f725,null));};
\ No newline at end of file
+var _0x55d4=['type','key','model','map','keys','query','attributes','intersection','fields','length','limit','sort','where','filters','merge','options','includeAll','include','rows','catch','params','find','create','body','getFields','findOne','SalesforceField','pick','filter','nolimit','getSubjects','order','hasOwnProperty','getDescriptions','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','test','Sequelize','ValidationError','request','then','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','sendStatus','end','status','json','count','offset','Content-Range','apply','reject','save','update','stack','name','send','SalesforceConfiguration','rawAttributes'];(function(_0x91ec22,_0x3cc1b7){var _0x4f655f=function(_0x3e70a0){while(--_0x3e70a0){_0x91ec22['push'](_0x91ec22['shift']());}};_0x4f655f(++_0x3cc1b7);}(_0x55d4,0x12d));var _0x455d=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x55d4[_0x40a045];return _0x1a687c;};'use strict';var pdf=require(_0x455d('0x0'));var emlformat=require(_0x455d('0x1'));var rimraf=require(_0x455d('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x455d('0x3'));var rp=require(_0x455d('0x4'));var moment=require('moment');var BPromise=require(_0x455d('0x5'));var Mustache=require(_0x455d('0x6'));var util=require(_0x455d('0x7'));var path=require('path');var sox=require(_0x455d('0x8'));var csv=require(_0x455d('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x455d('0xa'));var squel=require(_0x455d('0xb'));var crypto=require(_0x455d('0xc'));var jsforce=require(_0x455d('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x455d('0x9'));var querystring=require('querystring');var Papa=require(_0x455d('0xe'));var Redis=require(_0x455d('0xf'));var authService=require(_0x455d('0x10'));var qs=require(_0x455d('0x11'));var as=require(_0x455d('0x12'));var hardwareService=require(_0x455d('0x13'));var logger=require(_0x455d('0x14'))('api');var utils=require(_0x455d('0x15'));var config=require(_0x455d('0x16'));var db=require(_0x455d('0x17'))['db'];var jayson=require(_0x455d('0x18'));var client=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0x1a9712,_0x585d67,_0x37ba52){if(_0x37ba52){var _0x14288f=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x14288f[_0x455d('0x19')](_0x585d67)){return _0x1a9712;}else{throw new db[(_0x455d('0x1a'))][(_0x455d('0x1b'))]('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 _0x1a9712;}}function respondWithRpcPromise(_0x1e603b,_0x4cbf06,_0x207d67,_0xb3174a){return new BPromise(function(_0x4bbca0,_0x2d27c4){var _0x39cba7=_0xb3174a||client;return _0x39cba7[_0x455d('0x1c')](_0x1e603b,_0x207d67)[_0x455d('0x1d')](function(_0xc33c42){logger[_0x455d('0x1e')](_0x455d('0x1f'),_0x4cbf06,_0x455d('0x20'));logger[_0x455d('0x21')](_0x455d('0x22'),_0x4cbf06,_0x455d('0x20'),JSON['stringify'](_0xc33c42));if(_0xc33c42[_0x455d('0x23')]){if(_0xc33c42['error'][_0x455d('0x24')]===0x1f4){logger[_0x455d('0x23')](_0x455d('0x1f'),_0x4cbf06,_0xc33c42[_0x455d('0x23')]['message']);return _0x2d27c4(_0xc33c42['error'][_0x455d('0x25')]);}logger['error'](_0x455d('0x1f'),_0x4cbf06,_0xc33c42[_0x455d('0x23')][_0x455d('0x25')]);return _0x4bbca0(_0xc33c42[_0x455d('0x23')][_0x455d('0x25')]);}else{logger[_0x455d('0x1e')](_0x455d('0x1f'),_0x4cbf06,_0x455d('0x20'));_0x4bbca0(_0xc33c42[_0x455d('0x26')][_0x455d('0x25')]);}})['catch'](function(_0x180bf9){logger[_0x455d('0x23')]('SalesforceConfiguration,\x20%s,\x20%s',_0x4cbf06,_0x180bf9);_0x2d27c4(_0x180bf9);});});}function respondWithStatusCode(_0x26818d,_0x1a1710){_0x1a1710=_0x1a1710||0xcc;return function(_0x343bd8){if(_0x343bd8){return _0x26818d[_0x455d('0x27')](_0x1a1710);}return _0x26818d['status'](_0x1a1710)[_0x455d('0x28')]();};}function respondWithResult(_0x18cd4c,_0x17e4a0){_0x17e4a0=_0x17e4a0||0xc8;return function(_0x12f5b7){if(_0x12f5b7){return _0x18cd4c[_0x455d('0x29')](_0x17e4a0)[_0x455d('0x2a')](_0x12f5b7);}};}function respondWithFilteredResult(_0x31f856,_0x3735f1){return function(_0x13afa4){if(_0x13afa4){var _0x4e9da6=_0x13afa4[_0x455d('0x2b')],_0x174985=_0x3735f1[_0x455d('0x2c')],_0x67ddbe=_0x3735f1[_0x455d('0x2c')]+_0x3735f1['limit'],_0x1d7f50;if(_0x67ddbe>=_0x4e9da6){_0x67ddbe=_0x4e9da6;_0x1d7f50=0xc8;}else{_0x1d7f50=0xce;}_0x31f856[_0x455d('0x29')](_0x1d7f50);return _0x31f856['set'](_0x455d('0x2d'),_0x174985+'-'+_0x67ddbe+'/'+_0x4e9da6)[_0x455d('0x2a')](_0x13afa4);}return null;};}function patchUpdates(_0x382b85){return function(_0x3fa730){try{jsonpatch[_0x455d('0x2e')](_0x3fa730,_0x382b85,!![]);}catch(_0x17d654){return BPromise[_0x455d('0x2f')](_0x17d654);}return _0x3fa730[_0x455d('0x30')]();};}function saveUpdates(_0x456a03,_0x2bc9c7){return function(_0x131419){if(_0x131419){return _0x131419[_0x455d('0x31')](_0x456a03)[_0x455d('0x1d')](function(_0x461ed3){return _0x461ed3;});}return null;};}function removeEntity(_0x373148,_0x45dd1a){return function(_0x3ebbbe){if(_0x3ebbbe){return _0x3ebbbe['destroy']()[_0x455d('0x1d')](function(){_0x373148[_0x455d('0x29')](0xcc)[_0x455d('0x28')]();});}};}function handleEntityNotFound(_0x20040d,_0x90be39){return function(_0x593bff){if(!_0x593bff){_0x20040d[_0x455d('0x27')](0x194);}return _0x593bff;};}function handleError(_0x28cc93,_0x52d7bd){_0x52d7bd=_0x52d7bd||0x1f4;return function(_0x3920c){logger[_0x455d('0x23')](_0x3920c[_0x455d('0x32')]);if(_0x3920c[_0x455d('0x33')]){delete _0x3920c[_0x455d('0x33')];}_0x28cc93['status'](_0x52d7bd)[_0x455d('0x34')](_0x3920c);};}exports['index']=function(_0x3b32e7,_0x1a685e){var _0x553770={},_0x49b7ea={},_0x20193f={'count':0x0,'rows':[]};var _0x40de45=_['map'](db[_0x455d('0x35')][_0x455d('0x36')],function(_0xec3e6b){return{'name':_0xec3e6b['fieldName'],'type':_0xec3e6b[_0x455d('0x37')][_0x455d('0x38')]};});_0x49b7ea[_0x455d('0x39')]=_[_0x455d('0x3a')](_0x40de45,_0x455d('0x33'));_0x49b7ea['query']=_[_0x455d('0x3b')](_0x3b32e7[_0x455d('0x3c')]);_0x49b7ea['filters']=_['intersection'](_0x49b7ea[_0x455d('0x39')],_0x49b7ea[_0x455d('0x3c')]);_0x553770[_0x455d('0x3d')]=_[_0x455d('0x3e')](_0x49b7ea['model'],qs[_0x455d('0x3f')](_0x3b32e7[_0x455d('0x3c')][_0x455d('0x3f')]));_0x553770[_0x455d('0x3d')]=_0x553770[_0x455d('0x3d')][_0x455d('0x40')]?_0x553770[_0x455d('0x3d')]:_0x49b7ea['model'];if(!_0x3b32e7['query']['hasOwnProperty']('nolimit')){_0x553770[_0x455d('0x41')]=qs[_0x455d('0x41')](_0x3b32e7['query']['limit']);_0x553770[_0x455d('0x2c')]=qs[_0x455d('0x2c')](_0x3b32e7[_0x455d('0x3c')][_0x455d('0x2c')]);}_0x553770['order']=qs[_0x455d('0x42')](_0x3b32e7[_0x455d('0x3c')][_0x455d('0x42')]);_0x553770[_0x455d('0x43')]=qs[_0x455d('0x44')](_['pick'](_0x3b32e7['query'],_0x49b7ea[_0x455d('0x44')]));if(_0x3b32e7['query']['filter']){_0x553770[_0x455d('0x43')]=_['merge'](_0x553770['where'],{'$or':_[_0x455d('0x3a')](_0x40de45,function(_0x15b4cf){if(_0x15b4cf[_0x455d('0x37')]!=='VIRTUAL'){var _0x5c03f8={};_0x5c03f8[_0x15b4cf[_0x455d('0x33')]]={'$like':'%'+_0x3b32e7[_0x455d('0x3c')]['filter']+'%'};return _0x5c03f8;}})});}_0x553770=_[_0x455d('0x45')]({},_0x553770,_0x3b32e7[_0x455d('0x46')]);var _0x27f81d={'where':_0x553770['where']};return db[_0x455d('0x35')][_0x455d('0x2b')](_0x27f81d)['then'](function(_0x20c07d){_0x20193f[_0x455d('0x2b')]=_0x20c07d;if(_0x3b32e7[_0x455d('0x3c')][_0x455d('0x47')]){_0x553770[_0x455d('0x48')]=[{'all':!![]}];}return db[_0x455d('0x35')]['findAll'](_0x553770);})[_0x455d('0x1d')](function(_0x3320c0){_0x20193f[_0x455d('0x49')]=_0x3320c0;return _0x20193f;})[_0x455d('0x1d')](respondWithFilteredResult(_0x1a685e,_0x553770))[_0x455d('0x4a')](handleError(_0x1a685e,null));};exports['show']=function(_0x40ddf1,_0x247989){var _0x27085a={'raw':![],'where':{'id':_0x40ddf1[_0x455d('0x4b')]['id']}},_0x28cf4a={};_0x28cf4a['model']=_[_0x455d('0x3b')](db[_0x455d('0x35')][_0x455d('0x36')]);_0x28cf4a[_0x455d('0x3c')]=_[_0x455d('0x3b')](_0x40ddf1[_0x455d('0x3c')]);_0x28cf4a['filters']=_[_0x455d('0x3e')](_0x28cf4a[_0x455d('0x39')],_0x28cf4a['query']);_0x27085a[_0x455d('0x3d')]=_[_0x455d('0x3e')](_0x28cf4a[_0x455d('0x39')],qs[_0x455d('0x3f')](_0x40ddf1[_0x455d('0x3c')]['fields']));_0x27085a[_0x455d('0x3d')]=_0x27085a[_0x455d('0x3d')]['length']?_0x27085a[_0x455d('0x3d')]:_0x28cf4a[_0x455d('0x39')];if(_0x40ddf1[_0x455d('0x3c')][_0x455d('0x47')]){_0x27085a[_0x455d('0x48')]=[{'all':!![]}];}_0x27085a=_[_0x455d('0x45')]({},_0x27085a,_0x40ddf1[_0x455d('0x46')]);return db[_0x455d('0x35')][_0x455d('0x4c')](_0x27085a)['then'](handleEntityNotFound(_0x247989,null))['then'](respondWithResult(_0x247989,null))['catch'](handleError(_0x247989,null));};exports['create']=function(_0xb98afb,_0x3882ef){return db[_0x455d('0x35')][_0x455d('0x4d')](_0xb98afb[_0x455d('0x4e')],{})[_0x455d('0x1d')](respondWithResult(_0x3882ef,0xc9))['catch'](handleError(_0x3882ef,null));};exports[_0x455d('0x31')]=function(_0x546006,_0x15a948){if(_0x546006['body']['id']){delete _0x546006['body']['id'];}return db['SalesforceConfiguration']['find']({'where':{'id':_0x546006[_0x455d('0x4b')]['id']}})[_0x455d('0x1d')](handleEntityNotFound(_0x15a948,null))[_0x455d('0x1d')](saveUpdates(_0x546006[_0x455d('0x4e')],null))[_0x455d('0x1d')](respondWithResult(_0x15a948,null))[_0x455d('0x4a')](handleError(_0x15a948,null));};exports['destroy']=function(_0x553cd7,_0x2bfc4b){return db[_0x455d('0x35')][_0x455d('0x4c')]({'where':{'id':_0x553cd7[_0x455d('0x4b')]['id']}})[_0x455d('0x1d')](handleEntityNotFound(_0x2bfc4b,null))[_0x455d('0x1d')](removeEntity(_0x2bfc4b,null))[_0x455d('0x4a')](handleError(_0x2bfc4b,null));};exports[_0x455d('0x4f')]=function(_0x188aa4,_0x32f2c4,_0x2e99df){var _0x5e01e8={};var _0x589ee6={};var _0x352c9f;var _0x27eaa0;return db[_0x455d('0x35')][_0x455d('0x50')]({'where':{'id':_0x188aa4[_0x455d('0x4b')]['id']}})[_0x455d('0x1d')](handleEntityNotFound(_0x32f2c4,null))[_0x455d('0x1d')](function(_0x2a93f8){if(_0x2a93f8){_0x352c9f=_0x2a93f8;_0x589ee6[_0x455d('0x39')]=_[_0x455d('0x3b')](db[_0x455d('0x51')][_0x455d('0x36')]);_0x589ee6['query']=_[_0x455d('0x3b')](_0x188aa4[_0x455d('0x3c')]);_0x589ee6[_0x455d('0x44')]=_['intersection'](_0x589ee6[_0x455d('0x39')],_0x589ee6[_0x455d('0x3c')]);_0x5e01e8[_0x455d('0x3d')]=_['intersection'](_0x589ee6[_0x455d('0x39')],qs[_0x455d('0x3f')](_0x188aa4[_0x455d('0x3c')][_0x455d('0x3f')]));_0x5e01e8[_0x455d('0x3d')]=_0x5e01e8[_0x455d('0x3d')]['length']?_0x5e01e8[_0x455d('0x3d')]:_0x589ee6[_0x455d('0x39')];_0x5e01e8['order']=qs['sort'](_0x188aa4[_0x455d('0x3c')][_0x455d('0x42')]);_0x5e01e8['where']=qs[_0x455d('0x44')](_[_0x455d('0x52')](_0x188aa4['query'],_0x589ee6[_0x455d('0x44')]));if(_0x188aa4[_0x455d('0x3c')][_0x455d('0x53')]){_0x5e01e8[_0x455d('0x43')]=_['merge'](_0x5e01e8[_0x455d('0x43')],{'$or':_[_0x455d('0x3a')](_0x5e01e8[_0x455d('0x3d')],function(_0x479015){var _0x302cbe={};_0x302cbe[_0x479015]={'$like':'%'+_0x188aa4['query'][_0x455d('0x53')]+'%'};return _0x302cbe;})});}_0x5e01e8=_[_0x455d('0x45')]({},_0x5e01e8,_0x188aa4[_0x455d('0x46')]);return _0x352c9f['getFields'](_0x5e01e8);}})['then'](function(_0x23f27e){if(_0x23f27e){_0x27eaa0=_0x23f27e[_0x455d('0x40')];if(!_0x188aa4[_0x455d('0x3c')]['hasOwnProperty'](_0x455d('0x54'))){_0x5e01e8[_0x455d('0x41')]=qs[_0x455d('0x41')](_0x188aa4[_0x455d('0x3c')]['limit']);_0x5e01e8[_0x455d('0x2c')]=qs[_0x455d('0x2c')](_0x188aa4['query'][_0x455d('0x2c')]);}return _0x352c9f[_0x455d('0x4f')](_0x5e01e8);}})[_0x455d('0x1d')](function(_0x34321a){if(_0x34321a){return _0x34321a?{'count':_0x27eaa0,'rows':_0x34321a}:null;}})[_0x455d('0x1d')](respondWithResult(_0x32f2c4,null))[_0x455d('0x4a')](handleError(_0x32f2c4,null));};exports[_0x455d('0x55')]=function(_0x3f1665,_0x1abec8,_0x24c6b2){var _0x40f730={};var _0x4ec77b={};var _0x3d60e2;var _0x5b6cbd;return db['SalesforceConfiguration'][_0x455d('0x50')]({'where':{'id':_0x3f1665[_0x455d('0x4b')]['id']}})[_0x455d('0x1d')](handleEntityNotFound(_0x1abec8,null))[_0x455d('0x1d')](function(_0x26b7c4){if(_0x26b7c4){_0x3d60e2=_0x26b7c4;_0x4ec77b['model']=_[_0x455d('0x3b')](db[_0x455d('0x51')][_0x455d('0x36')]);_0x4ec77b[_0x455d('0x3c')]=_[_0x455d('0x3b')](_0x3f1665[_0x455d('0x3c')]);_0x4ec77b[_0x455d('0x44')]=_[_0x455d('0x3e')](_0x4ec77b['model'],_0x4ec77b[_0x455d('0x3c')]);_0x40f730[_0x455d('0x3d')]=_['intersection'](_0x4ec77b[_0x455d('0x39')],qs[_0x455d('0x3f')](_0x3f1665['query'][_0x455d('0x3f')]));_0x40f730[_0x455d('0x3d')]=_0x40f730['attributes'][_0x455d('0x40')]?_0x40f730[_0x455d('0x3d')]:_0x4ec77b[_0x455d('0x39')];_0x40f730[_0x455d('0x56')]=qs['sort'](_0x3f1665['query'][_0x455d('0x42')]);_0x40f730[_0x455d('0x43')]=qs['filters'](_[_0x455d('0x52')](_0x3f1665[_0x455d('0x3c')],_0x4ec77b[_0x455d('0x44')]));if(_0x3f1665['query']['filter']){_0x40f730[_0x455d('0x43')]=_[_0x455d('0x45')](_0x40f730[_0x455d('0x43')],{'$or':_[_0x455d('0x3a')](_0x40f730[_0x455d('0x3d')],function(_0x34a22e){var _0x48277e={};_0x48277e[_0x34a22e]={'$like':'%'+_0x3f1665[_0x455d('0x3c')][_0x455d('0x53')]+'%'};return _0x48277e;})});}_0x40f730=_[_0x455d('0x45')]({},_0x40f730,_0x3f1665[_0x455d('0x46')]);return _0x3d60e2['getSubjects'](_0x40f730);}})[_0x455d('0x1d')](function(_0x41446c){if(_0x41446c){_0x5b6cbd=_0x41446c[_0x455d('0x40')];if(!_0x3f1665[_0x455d('0x3c')][_0x455d('0x57')]('nolimit')){_0x40f730['limit']=qs['limit'](_0x3f1665['query'][_0x455d('0x41')]);_0x40f730[_0x455d('0x2c')]=qs[_0x455d('0x2c')](_0x3f1665[_0x455d('0x3c')][_0x455d('0x2c')]);}return _0x3d60e2[_0x455d('0x55')](_0x40f730);}})[_0x455d('0x1d')](function(_0x20d936){if(_0x20d936){return _0x20d936?{'count':_0x5b6cbd,'rows':_0x20d936}:null;}})['then'](respondWithResult(_0x1abec8,null))[_0x455d('0x4a')](handleError(_0x1abec8,null));};exports[_0x455d('0x58')]=function(_0x2f70ef,_0x317315,_0xd0f5d8){var _0x2fb29f={};var _0x52657c={};var _0x3979b0;var _0x3532d8;return db[_0x455d('0x35')][_0x455d('0x50')]({'where':{'id':_0x2f70ef[_0x455d('0x4b')]['id']}})[_0x455d('0x1d')](handleEntityNotFound(_0x317315,null))[_0x455d('0x1d')](function(_0x57e55c){if(_0x57e55c){_0x3979b0=_0x57e55c;_0x52657c[_0x455d('0x39')]=_['keys'](db[_0x455d('0x51')][_0x455d('0x36')]);_0x52657c[_0x455d('0x3c')]=_[_0x455d('0x3b')](_0x2f70ef[_0x455d('0x3c')]);_0x52657c['filters']=_[_0x455d('0x3e')](_0x52657c[_0x455d('0x39')],_0x52657c[_0x455d('0x3c')]);_0x2fb29f[_0x455d('0x3d')]=_['intersection'](_0x52657c[_0x455d('0x39')],qs[_0x455d('0x3f')](_0x2f70ef['query'][_0x455d('0x3f')]));_0x2fb29f['attributes']=_0x2fb29f[_0x455d('0x3d')][_0x455d('0x40')]?_0x2fb29f[_0x455d('0x3d')]:_0x52657c['model'];_0x2fb29f[_0x455d('0x56')]=qs[_0x455d('0x42')](_0x2f70ef['query'][_0x455d('0x42')]);_0x2fb29f[_0x455d('0x43')]=qs[_0x455d('0x44')](_[_0x455d('0x52')](_0x2f70ef['query'],_0x52657c[_0x455d('0x44')]));if(_0x2f70ef[_0x455d('0x3c')]['filter']){_0x2fb29f[_0x455d('0x43')]=_['merge'](_0x2fb29f[_0x455d('0x43')],{'$or':_[_0x455d('0x3a')](_0x2fb29f[_0x455d('0x3d')],function(_0x34ee0d){var _0x528c10={};_0x528c10[_0x34ee0d]={'$like':'%'+_0x2f70ef[_0x455d('0x3c')][_0x455d('0x53')]+'%'};return _0x528c10;})});}_0x2fb29f=_[_0x455d('0x45')]({},_0x2fb29f,_0x2f70ef[_0x455d('0x46')]);return _0x3979b0[_0x455d('0x58')](_0x2fb29f);}})['then'](function(_0x2c9033){if(_0x2c9033){_0x3532d8=_0x2c9033[_0x455d('0x40')];if(!_0x2f70ef[_0x455d('0x3c')][_0x455d('0x57')]('nolimit')){_0x2fb29f[_0x455d('0x41')]=qs[_0x455d('0x41')](_0x2f70ef['query'][_0x455d('0x41')]);_0x2fb29f[_0x455d('0x2c')]=qs[_0x455d('0x2c')](_0x2f70ef[_0x455d('0x3c')][_0x455d('0x2c')]);}return _0x3979b0[_0x455d('0x58')](_0x2fb29f);}})['then'](function(_0x425022){if(_0x425022){return _0x425022?{'count':_0x3532d8,'rows':_0x425022}:null;}})[_0x455d('0x1d')](respondWithResult(_0x317315,null))[_0x455d('0x4a')](handleError(_0x317315,null));};
\ No newline at end of file
diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js
index ea81a18..59cab15 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 _0xb62f=['exports','define','SalesforceConfiguration','int_salesforce_configurations','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x20cc29,_0x30a46d){var _0x28d513=function(_0x179b06){while(--_0x179b06){_0x20cc29['push'](_0x20cc29['shift']());}};_0x28d513(++_0x30a46d);}(_0xb62f,0x1b1));var _0xfb62=function(_0x3e78d9,_0x5ac3fd){_0x3e78d9=_0x3e78d9-0x0;var _0x536e10=_0xb62f[_0x3e78d9];return _0x536e10;};'use strict';var _=require(_0xfb62('0x0'));var util=require(_0xfb62('0x1'));var logger=require(_0xfb62('0x2'))(_0xfb62('0x3'));var moment=require('moment');var BPromise=require(_0xfb62('0x4'));var rp=require(_0xfb62('0x5'));var fs=require('fs');var path=require(_0xfb62('0x6'));var rimraf=require(_0xfb62('0x7'));var config=require(_0xfb62('0x8'));var attributes=require('./intSalesforceConfiguration.attributes');module[_0xfb62('0x9')]=function(_0x56251c,_0x2a2404){return _0x56251c[_0xfb62('0xa')](_0xfb62('0xb'),attributes,{'tableName':_0xfb62('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x61ad=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intSalesforceConfiguration.attributes','exports','define','int_salesforce_configurations'];(function(_0x176ea1,_0x3ae5af){var _0x17e9a5=function(_0x3ced4a){while(--_0x3ced4a){_0x176ea1['push'](_0x176ea1['shift']());}};_0x17e9a5(++_0x3ae5af);}(_0x61ad,0x134));var _0xd61a=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x61ad[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xd61a('0x0'));var util=require(_0xd61a('0x1'));var logger=require(_0xd61a('0x2'))(_0xd61a('0x3'));var moment=require(_0xd61a('0x4'));var BPromise=require(_0xd61a('0x5'));var rp=require(_0xd61a('0x6'));var fs=require('fs');var path=require(_0xd61a('0x7'));var rimraf=require(_0xd61a('0x8'));var config=require(_0xd61a('0x9'));var attributes=require(_0xd61a('0xa'));module[_0xd61a('0xb')]=function(_0x37ae5e,_0x3ab3e1){return _0x37ae5e[_0xd61a('0xc')]('SalesforceConfiguration',attributes,{'tableName':_0xd61a('0xd'),'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 ff219ab..2235290 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 _0x033e=['result','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info'];(function(_0x1858f5,_0x10ab1c){var _0xc59128=function(_0x4e2145){while(--_0x4e2145){_0x1858f5['push'](_0x1858f5['shift']());}};_0xc59128(++_0x10ab1c);}(_0x033e,0xb0));var _0xe033=function(_0x46ac00,_0x7cd69a){_0x46ac00=_0x46ac00-0x0;var _0x8b6e11=_0x033e[_0x46ac00];return _0x8b6e11;};'use strict';var _=require(_0xe033('0x0'));var util=require('util');var moment=require(_0xe033('0x1'));var BPromise=require(_0xe033('0x2'));var rs=require(_0xe033('0x3'));var fs=require('fs');var Redis=require(_0xe033('0x4'));var db=require(_0xe033('0x5'))['db'];var utils=require(_0xe033('0x6'));var logger=require(_0xe033('0x7'))(_0xe033('0x8'));var config=require(_0xe033('0x9'));var jayson=require(_0xe033('0xa'));var client=jayson[_0xe033('0xb')][_0xe033('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2e0b6d,_0xc49610,_0x1bd34e){return new BPromise(function(_0x4a6658,_0x5a27cb){return client[_0xe033('0xd')](_0x2e0b6d,_0x1bd34e)[_0xe033('0xe')](function(_0x4d0616){logger['info'](_0xe033('0xf'),_0xc49610,_0xe033('0x10'));logger[_0xe033('0x11')](_0xe033('0x12'),_0xc49610,_0xe033('0x10'),JSON[_0xe033('0x13')](_0x4d0616));if(_0x4d0616['error']){if(_0x4d0616[_0xe033('0x14')][_0xe033('0x15')]===0x1f4){logger[_0xe033('0x14')](_0xe033('0xf'),_0xc49610,_0x4d0616['error'][_0xe033('0x16')]);return _0x5a27cb(_0x4d0616[_0xe033('0x14')][_0xe033('0x16')]);}logger[_0xe033('0x14')](_0xe033('0xf'),_0xc49610,_0x4d0616[_0xe033('0x14')][_0xe033('0x16')]);return _0x4a6658(_0x4d0616[_0xe033('0x14')][_0xe033('0x16')]);}else{logger[_0xe033('0x17')](_0xe033('0xf'),_0xc49610,'request\x20sent');_0x4a6658(_0x4d0616[_0xe033('0x18')][_0xe033('0x16')]);}})['catch'](function(_0x284f86){logger[_0xe033('0x14')]('SalesforceConfiguration,\x20%s,\x20%s',_0xc49610,_0x284f86);_0x5a27cb(_0x284f86);});});}
\ No newline at end of file
+var _0x061f=['../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x7b3f4a,_0x5c6900){var _0x140a33=function(_0x2ea661){while(--_0x2ea661){_0x7b3f4a['push'](_0x7b3f4a['shift']());}};_0x140a33(++_0x5c6900);}(_0x061f,0xe9));var _0xf061=function(_0x11fb21,_0x5369cd){_0x11fb21=_0x11fb21-0x0;var _0x4d51d0=_0x061f[_0x11fb21];return _0x4d51d0;};'use strict';var _=require(_0xf061('0x0'));var util=require(_0xf061('0x1'));var moment=require(_0xf061('0x2'));var BPromise=require(_0xf061('0x3'));var rs=require(_0xf061('0x4'));var fs=require('fs');var Redis=require(_0xf061('0x5'));var db=require(_0xf061('0x6'))['db'];var utils=require(_0xf061('0x7'));var logger=require('../../config/logger')(_0xf061('0x8'));var config=require(_0xf061('0x9'));var jayson=require(_0xf061('0xa'));var client=jayson[_0xf061('0xb')][_0xf061('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4c61f6,_0x813e4a,_0x5f3d2a){return new BPromise(function(_0x2f0415,_0x184949){return client[_0xf061('0xd')](_0x4c61f6,_0x5f3d2a)[_0xf061('0xe')](function(_0x1847bb){logger[_0xf061('0xf')](_0xf061('0x10'),_0x813e4a,_0xf061('0x11'));logger['debug'](_0xf061('0x12'),_0x813e4a,_0xf061('0x11'),JSON[_0xf061('0x13')](_0x1847bb));if(_0x1847bb[_0xf061('0x14')]){if(_0x1847bb[_0xf061('0x14')][_0xf061('0x15')]===0x1f4){logger[_0xf061('0x14')](_0xf061('0x10'),_0x813e4a,_0x1847bb[_0xf061('0x14')]['message']);return _0x184949(_0x1847bb['error'][_0xf061('0x16')]);}logger[_0xf061('0x14')](_0xf061('0x10'),_0x813e4a,_0x1847bb[_0xf061('0x14')]['message']);return _0x2f0415(_0x1847bb[_0xf061('0x14')][_0xf061('0x16')]);}else{logger[_0xf061('0xf')](_0xf061('0x10'),_0x813e4a,'request\x20sent');_0x2f0415(_0x1847bb[_0xf061('0x17')]['message']);}})['catch'](function(_0x618b57){logger[_0xf061('0x14')](_0xf061('0x10'),_0x813e4a,_0x618b57);_0x184949(_0x618b57);});});}
\ No newline at end of file
diff --git a/server/api/intSalesforceField/index.js b/server/api/intSalesforceField/index.js
index 5ca87d7..cc9e83d 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 _0x1cb9=['../../config/environment','get','isAuthenticated','index','/:id','post','create','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/interaction/service'];(function(_0x63ee67,_0x574bb1){var _0x314ab8=function(_0xf1c51a){while(--_0xf1c51a){_0x63ee67['push'](_0x63ee67['shift']());}};_0x314ab8(++_0x574bb1);}(_0x1cb9,0x14e));var _0x91cb=function(_0x54bb34,_0xcc1da6){_0x54bb34=_0x54bb34-0x0;var _0x4d9fd5=_0x1cb9[_0x54bb34];return _0x4d9fd5;};'use strict';var multer=require(_0x91cb('0x0'));var util=require('util');var path=require(_0x91cb('0x1'));var timeout=require(_0x91cb('0x2'));var express=require(_0x91cb('0x3'));var router=express[_0x91cb('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x91cb('0x5'));var config=require(_0x91cb('0x6'));var controller=require('./intSalesforceField.controller');router[_0x91cb('0x7')]('/',auth[_0x91cb('0x8')](),controller[_0x91cb('0x9')]);router[_0x91cb('0x7')](_0x91cb('0xa'),auth[_0x91cb('0x8')](),controller['show']);router[_0x91cb('0xb')]('/',auth['isAuthenticated'](),controller[_0x91cb('0xc')]);router['put'](_0x91cb('0xa'),auth[_0x91cb('0x8')](),controller[_0x91cb('0xd')]);router[_0x91cb('0xe')](_0x91cb('0xa'),auth[_0x91cb('0x8')](),controller[_0x91cb('0xf')]);module[_0x91cb('0x10')]=router;
\ No newline at end of file
+var _0xc1c6=['show','post','put','/:id','update','delete','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','get'];(function(_0x3af198,_0x53e7eb){var _0x47abff=function(_0x5d9d8b){while(--_0x5d9d8b){_0x3af198['push'](_0x3af198['shift']());}};_0x47abff(++_0x53e7eb);}(_0xc1c6,0xf7));var _0x6c1c=function(_0x4e18fb,_0x169975){_0x4e18fb=_0x4e18fb-0x0;var _0x37bfcf=_0xc1c6[_0x4e18fb];return _0x37bfcf;};'use strict';var multer=require(_0x6c1c('0x0'));var util=require(_0x6c1c('0x1'));var path=require(_0x6c1c('0x2'));var timeout=require('connect-timeout');var express=require(_0x6c1c('0x3'));var router=express['Router']();var auth=require(_0x6c1c('0x4'));var interaction=require(_0x6c1c('0x5'));var config=require(_0x6c1c('0x6'));var controller=require('./intSalesforceField.controller');router['get']('/',auth[_0x6c1c('0x7')](),controller['index']);router[_0x6c1c('0x8')]('/:id',auth[_0x6c1c('0x7')](),controller[_0x6c1c('0x9')]);router[_0x6c1c('0xa')]('/',auth[_0x6c1c('0x7')](),controller['create']);router[_0x6c1c('0xb')](_0x6c1c('0xc'),auth['isAuthenticated'](),controller[_0x6c1c('0xd')]);router[_0x6c1c('0xe')](_0x6c1c('0xc'),auth[_0x6c1c('0x7')](),controller['destroy']);module[_0x6c1c('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/intSalesforceField/intSalesforceField.attributes.js b/server/api/intSalesforceField/intSalesforceField.attributes.js
index ad05b2a..57bb85b 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 _0x1c9d=['customVariable','sequelize','exports','string','keyValue','STRING','ENUM','variable'];(function(_0x34abef,_0x4b63db){var _0x59f66b=function(_0x24e74f){while(--_0x24e74f){_0x34abef['push'](_0x34abef['shift']());}};_0x59f66b(++_0x4b63db);}(_0x1c9d,0x161));var _0xd1c9=function(_0x406118,_0x2f530a){_0x406118=_0x406118-0x0;var _0x37d9a2=_0x1c9d[_0x406118];return _0x37d9a2;};'use strict';var Sequelize=require(_0xd1c9('0x0'));module[_0xd1c9('0x1')]={'type':{'type':Sequelize['ENUM'](_0xd1c9('0x2'),'variable','customVariable',_0xd1c9('0x3')),'defaultValue':_0xd1c9('0x2')},'content':{'type':Sequelize[_0xd1c9('0x4')]},'key':{'type':Sequelize[_0xd1c9('0x4')]},'keyType':{'type':Sequelize[_0xd1c9('0x5')]('string',_0xd1c9('0x6'),_0xd1c9('0x7'))},'keyContent':{'type':Sequelize[_0xd1c9('0x4')]},'idField':{'type':Sequelize[_0xd1c9('0x4')]},'variableName':{'type':Sequelize[_0xd1c9('0x4')]}};
\ No newline at end of file
+var _0x8b3b=['exports','ENUM','string','variable','customVariable','keyValue','STRING','sequelize'];(function(_0x19be1a,_0x32b7ef){var _0x36feea=function(_0xbfc581){while(--_0xbfc581){_0x19be1a['push'](_0x19be1a['shift']());}};_0x36feea(++_0x32b7ef);}(_0x8b3b,0xf7));var _0xb8b3=function(_0x55677b,_0x3e5655){_0x55677b=_0x55677b-0x0;var _0x104b88=_0x8b3b[_0x55677b];return _0x104b88;};'use strict';var Sequelize=require(_0xb8b3('0x0'));module[_0xb8b3('0x1')]={'type':{'type':Sequelize[_0xb8b3('0x2')](_0xb8b3('0x3'),_0xb8b3('0x4'),_0xb8b3('0x5'),_0xb8b3('0x6')),'defaultValue':_0xb8b3('0x3')},'content':{'type':Sequelize[_0xb8b3('0x7')]},'key':{'type':Sequelize[_0xb8b3('0x7')]},'keyType':{'type':Sequelize[_0xb8b3('0x2')](_0xb8b3('0x3'),_0xb8b3('0x4'),_0xb8b3('0x5'))},'keyContent':{'type':Sequelize[_0xb8b3('0x7')]},'idField':{'type':Sequelize[_0xb8b3('0x7')]},'variableName':{'type':Sequelize[_0xb8b3('0x7')]}};
\ No newline at end of file
diff --git a/server/api/intSalesforceField/intSalesforceField.controller.js b/server/api/intSalesforceField/intSalesforceField.controller.js
index ace4f9f..e530a9e 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 _0x2032=['zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../mysqldb','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','sendStatus','error','stack','name','send','map','SalesforceField','rawAttributes','type','key','model','query','keys','filters','fields','attributes','length','hasOwnProperty','order','sort','pick','filter','where','VIRTUAL','merge','options','then','includeAll','include','findAll','rows','show','intersection','find','create','body','catch','params','eml-format','rimraf'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x2032,0xd9));var _0x2203=function(_0x1115f3,_0x2ada26){_0x1115f3=_0x1115f3-0x0;var _0xa10bf9=_0x2032[_0x1115f3];return _0xa10bf9;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x2203('0x0'));var rimraf=require(_0x2203('0x1'));var zipdir=require(_0x2203('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2203('0x3'));var moment=require(_0x2203('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2203('0x5'));var util=require(_0x2203('0x6'));var path=require(_0x2203('0x7'));var sox=require(_0x2203('0x8'));var csv=require(_0x2203('0x9'));var ejs=require(_0x2203('0xa'));var fs=require('fs');var _=require(_0x2203('0xb'));var squel=require(_0x2203('0xc'));var crypto=require(_0x2203('0xd'));var jsforce=require(_0x2203('0xe'));var deskjs=require(_0x2203('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x2203('0x10'));var Redis=require('ioredis');var authService=require(_0x2203('0x11'));var qs=require(_0x2203('0x12'));var as=require(_0x2203('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2203('0x14'))('api');var utils=require(_0x2203('0x15'));var config=require('../../config/environment');var db=require(_0x2203('0x16'))['db'];function respondWithStatusCode(_0x1abb51,_0x4b9376){_0x4b9376=_0x4b9376||0xcc;return function(_0x583bc7){if(_0x583bc7){return _0x1abb51['sendStatus'](_0x4b9376);}return _0x1abb51['status'](_0x4b9376)['end']();};}function respondWithResult(_0x238772,_0x538b30){_0x538b30=_0x538b30||0xc8;return function(_0x592e47){if(_0x592e47){return _0x238772[_0x2203('0x17')](_0x538b30)[_0x2203('0x18')](_0x592e47);}};}function respondWithFilteredResult(_0x1c1ead,_0x41af85){return function(_0x226209){if(_0x226209){var _0x3fe0a8=_0x226209[_0x2203('0x19')],_0x2c36e6=_0x41af85['offset'],_0x2c085c=_0x41af85[_0x2203('0x1a')]+_0x41af85[_0x2203('0x1b')],_0xdf9d0b;if(_0x2c085c>=_0x3fe0a8){_0x2c085c=_0x3fe0a8;_0xdf9d0b=0xc8;}else{_0xdf9d0b=0xce;}_0x1c1ead['status'](_0xdf9d0b);return _0x1c1ead[_0x2203('0x1c')](_0x2203('0x1d'),_0x2c36e6+'-'+_0x2c085c+'/'+_0x3fe0a8)['json'](_0x226209);}return null;};}function patchUpdates(_0x30c6f7){return function(_0x5ee83c){try{jsonpatch[_0x2203('0x1e')](_0x5ee83c,_0x30c6f7,!![]);}catch(_0x310b8c){return BPromise[_0x2203('0x1f')](_0x310b8c);}return _0x5ee83c[_0x2203('0x20')]();};}function saveUpdates(_0x15cb1a,_0x449039){return function(_0x538c23){if(_0x538c23){return _0x538c23[_0x2203('0x21')](_0x15cb1a)['then'](function(_0x5ac866){return _0x5ac866;});}return null;};}function removeEntity(_0x15f543,_0x496d82){return function(_0x3b8ef9){if(_0x3b8ef9){return _0x3b8ef9[_0x2203('0x22')]()['then'](function(){_0x15f543[_0x2203('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5c8da9,_0x226374){return function(_0x2718f5){if(!_0x2718f5){_0x5c8da9[_0x2203('0x23')](0x194);}return _0x2718f5;};}function handleError(_0xfd0970,_0x1244f4){_0x1244f4=_0x1244f4||0x1f4;return function(_0x3114ef){logger[_0x2203('0x24')](_0x3114ef[_0x2203('0x25')]);if(_0x3114ef['name']){delete _0x3114ef[_0x2203('0x26')];}_0xfd0970[_0x2203('0x17')](_0x1244f4)[_0x2203('0x27')](_0x3114ef);};}exports['index']=function(_0xb2071b,_0x1cec17){var _0x5c5fd3={},_0xd6e109={},_0xd91f5d={'count':0x0,'rows':[]};var _0x1c6a77=_[_0x2203('0x28')](db[_0x2203('0x29')][_0x2203('0x2a')],function(_0x9c53f){return{'name':_0x9c53f['fieldName'],'type':_0x9c53f[_0x2203('0x2b')][_0x2203('0x2c')]};});_0xd6e109[_0x2203('0x2d')]=_[_0x2203('0x28')](_0x1c6a77,'name');_0xd6e109[_0x2203('0x2e')]=_[_0x2203('0x2f')](_0xb2071b[_0x2203('0x2e')]);_0xd6e109[_0x2203('0x30')]=_['intersection'](_0xd6e109[_0x2203('0x2d')],_0xd6e109[_0x2203('0x2e')]);_0x5c5fd3['attributes']=_['intersection'](_0xd6e109[_0x2203('0x2d')],qs['fields'](_0xb2071b['query'][_0x2203('0x31')]));_0x5c5fd3[_0x2203('0x32')]=_0x5c5fd3[_0x2203('0x32')][_0x2203('0x33')]?_0x5c5fd3[_0x2203('0x32')]:_0xd6e109['model'];if(!_0xb2071b[_0x2203('0x2e')][_0x2203('0x34')]('nolimit')){_0x5c5fd3[_0x2203('0x1b')]=qs[_0x2203('0x1b')](_0xb2071b[_0x2203('0x2e')][_0x2203('0x1b')]);_0x5c5fd3[_0x2203('0x1a')]=qs[_0x2203('0x1a')](_0xb2071b[_0x2203('0x2e')][_0x2203('0x1a')]);}_0x5c5fd3[_0x2203('0x35')]=qs['sort'](_0xb2071b[_0x2203('0x2e')][_0x2203('0x36')]);_0x5c5fd3['where']=qs['filters'](_[_0x2203('0x37')](_0xb2071b['query'],_0xd6e109[_0x2203('0x30')]));if(_0xb2071b[_0x2203('0x2e')][_0x2203('0x38')]){_0x5c5fd3['where']=_['merge'](_0x5c5fd3[_0x2203('0x39')],{'$or':_['map'](_0x1c6a77,function(_0x2d0365){if(_0x2d0365['type']!==_0x2203('0x3a')){var _0x4b6fc5={};_0x4b6fc5[_0x2d0365[_0x2203('0x26')]]={'$like':'%'+_0xb2071b[_0x2203('0x2e')][_0x2203('0x38')]+'%'};return _0x4b6fc5;}})});}_0x5c5fd3=_[_0x2203('0x3b')]({},_0x5c5fd3,_0xb2071b[_0x2203('0x3c')]);var _0x5436d2={'where':_0x5c5fd3['where']};return db['SalesforceField'][_0x2203('0x19')](_0x5436d2)[_0x2203('0x3d')](function(_0x323798){_0xd91f5d[_0x2203('0x19')]=_0x323798;if(_0xb2071b[_0x2203('0x2e')][_0x2203('0x3e')]){_0x5c5fd3[_0x2203('0x3f')]=[{'all':!![]}];}return db['SalesforceField'][_0x2203('0x40')](_0x5c5fd3);})[_0x2203('0x3d')](function(_0x108fde){_0xd91f5d[_0x2203('0x41')]=_0x108fde;return _0xd91f5d;})['then'](respondWithFilteredResult(_0x1cec17,_0x5c5fd3))['catch'](handleError(_0x1cec17,null));};exports[_0x2203('0x42')]=function(_0x5494a1,_0x330303){var _0x446209={'raw':!![],'where':{'id':_0x5494a1['params']['id']}},_0x132091={};_0x132091['model']=_[_0x2203('0x2f')](db[_0x2203('0x29')][_0x2203('0x2a')]);_0x132091[_0x2203('0x2e')]=_[_0x2203('0x2f')](_0x5494a1[_0x2203('0x2e')]);_0x132091['filters']=_[_0x2203('0x43')](_0x132091[_0x2203('0x2d')],_0x132091[_0x2203('0x2e')]);_0x446209[_0x2203('0x32')]=_[_0x2203('0x43')](_0x132091[_0x2203('0x2d')],qs[_0x2203('0x31')](_0x5494a1[_0x2203('0x2e')][_0x2203('0x31')]));_0x446209[_0x2203('0x32')]=_0x446209['attributes'][_0x2203('0x33')]?_0x446209[_0x2203('0x32')]:_0x132091[_0x2203('0x2d')];if(_0x5494a1[_0x2203('0x2e')]['includeAll']){_0x446209['include']=[{'all':!![]}];}_0x446209=_[_0x2203('0x3b')]({},_0x446209,_0x5494a1['options']);return db[_0x2203('0x29')][_0x2203('0x44')](_0x446209)[_0x2203('0x3d')](handleEntityNotFound(_0x330303,null))[_0x2203('0x3d')](respondWithResult(_0x330303,null))['catch'](handleError(_0x330303,null));};exports[_0x2203('0x45')]=function(_0x102803,_0x5cd8c6){return db[_0x2203('0x29')][_0x2203('0x45')](_0x102803[_0x2203('0x46')],{})[_0x2203('0x3d')](respondWithResult(_0x5cd8c6,0xc9))['catch'](handleError(_0x5cd8c6,null));};exports['update']=function(_0x21b8ab,_0x5707c8){if(_0x21b8ab['body']['id']){delete _0x21b8ab[_0x2203('0x46')]['id'];}return db[_0x2203('0x29')][_0x2203('0x44')]({'where':{'id':_0x21b8ab['params']['id']}})['then'](handleEntityNotFound(_0x5707c8,null))[_0x2203('0x3d')](saveUpdates(_0x21b8ab[_0x2203('0x46')],null))[_0x2203('0x3d')](respondWithResult(_0x5707c8,null))[_0x2203('0x47')](handleError(_0x5707c8,null));};exports[_0x2203('0x22')]=function(_0x21fd78,_0x4a7f4e){return db[_0x2203('0x29')]['find']({'where':{'id':_0x21fd78[_0x2203('0x48')]['id']}})[_0x2203('0x3d')](handleEntityNotFound(_0x4a7f4e,null))[_0x2203('0x3d')](removeEntity(_0x4a7f4e,null))[_0x2203('0x47')](handleError(_0x4a7f4e,null));};
\ No newline at end of file
+var _0x2ef3=['then','stack','name','send','index','SalesforceField','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','offset','sort','pick','where','merge','map','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','find','create','body','params','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','json','count','limit','set','apply','reject','save','update','destroy'];(function(_0x35ebae,_0x4f86c4){var _0x1924cf=function(_0x5788fe){while(--_0x5788fe){_0x35ebae['push'](_0x35ebae['shift']());}};_0x1924cf(++_0x4f86c4);}(_0x2ef3,0xba));var _0x32ef=function(_0x3b4680,_0x52a696){_0x3b4680=_0x3b4680-0x0;var _0x51f021=_0x2ef3[_0x3b4680];return _0x51f021;};'use strict';var pdf=require(_0x32ef('0x0'));var emlformat=require(_0x32ef('0x1'));var rimraf=require(_0x32ef('0x2'));var zipdir=require(_0x32ef('0x3'));var jsonpatch=require(_0x32ef('0x4'));var rp=require(_0x32ef('0x5'));var moment=require('moment');var BPromise=require(_0x32ef('0x6'));var Mustache=require(_0x32ef('0x7'));var util=require('util');var path=require(_0x32ef('0x8'));var sox=require(_0x32ef('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x32ef('0xa'));var squel=require(_0x32ef('0xb'));var crypto=require(_0x32ef('0xc'));var jsforce=require(_0x32ef('0xd'));var deskjs=require(_0x32ef('0xe'));var toCsv=require(_0x32ef('0xf'));var querystring=require(_0x32ef('0x10'));var Papa=require(_0x32ef('0x11'));var Redis=require(_0x32ef('0x12'));var authService=require(_0x32ef('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x32ef('0x14'));var logger=require(_0x32ef('0x15'))(_0x32ef('0x16'));var utils=require(_0x32ef('0x17'));var config=require('../../config/environment');var db=require(_0x32ef('0x18'))['db'];function respondWithStatusCode(_0x5afcc2,_0x1a5106){_0x1a5106=_0x1a5106||0xcc;return function(_0x49d590){if(_0x49d590){return _0x5afcc2[_0x32ef('0x19')](_0x1a5106);}return _0x5afcc2[_0x32ef('0x1a')](_0x1a5106)['end']();};}function respondWithResult(_0x539d18,_0x19ce1){_0x19ce1=_0x19ce1||0xc8;return function(_0x4d8009){if(_0x4d8009){return _0x539d18[_0x32ef('0x1a')](_0x19ce1)[_0x32ef('0x1b')](_0x4d8009);}};}function respondWithFilteredResult(_0x93d492,_0x54c7f5){return function(_0x57aff1){if(_0x57aff1){var _0x55bf0b=_0x57aff1[_0x32ef('0x1c')],_0x531e30=_0x54c7f5['offset'],_0x13db1a=_0x54c7f5['offset']+_0x54c7f5[_0x32ef('0x1d')],_0x3950e6;if(_0x13db1a>=_0x55bf0b){_0x13db1a=_0x55bf0b;_0x3950e6=0xc8;}else{_0x3950e6=0xce;}_0x93d492[_0x32ef('0x1a')](_0x3950e6);return _0x93d492[_0x32ef('0x1e')]('Content-Range',_0x531e30+'-'+_0x13db1a+'/'+_0x55bf0b)[_0x32ef('0x1b')](_0x57aff1);}return null;};}function patchUpdates(_0x33e230){return function(_0x4f4c98){try{jsonpatch[_0x32ef('0x1f')](_0x4f4c98,_0x33e230,!![]);}catch(_0x314ef1){return BPromise[_0x32ef('0x20')](_0x314ef1);}return _0x4f4c98[_0x32ef('0x21')]();};}function saveUpdates(_0x445cda,_0x3aec05){return function(_0x4de441){if(_0x4de441){return _0x4de441[_0x32ef('0x22')](_0x445cda)['then'](function(_0x309866){return _0x309866;});}return null;};}function removeEntity(_0x3a20ca,_0x49f2d8){return function(_0x1af371){if(_0x1af371){return _0x1af371[_0x32ef('0x23')]()[_0x32ef('0x24')](function(){_0x3a20ca['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x22f2d7,_0xb30fab){return function(_0x225feb){if(!_0x225feb){_0x22f2d7['sendStatus'](0x194);}return _0x225feb;};}function handleError(_0x59585f,_0x19ea6){_0x19ea6=_0x19ea6||0x1f4;return function(_0x4d584b){logger['error'](_0x4d584b[_0x32ef('0x25')]);if(_0x4d584b[_0x32ef('0x26')]){delete _0x4d584b[_0x32ef('0x26')];}_0x59585f[_0x32ef('0x1a')](_0x19ea6)[_0x32ef('0x27')](_0x4d584b);};}exports[_0x32ef('0x28')]=function(_0x1874ea,_0x38aed5){var _0x338f19={},_0x2f52d7={},_0x1335e2={'count':0x0,'rows':[]};var _0xba4b3f=_['map'](db[_0x32ef('0x29')][_0x32ef('0x2a')],function(_0x5a04cd){return{'name':_0x5a04cd[_0x32ef('0x2b')],'type':_0x5a04cd[_0x32ef('0x2c')][_0x32ef('0x2d')]};});_0x2f52d7[_0x32ef('0x2e')]=_['map'](_0xba4b3f,_0x32ef('0x26'));_0x2f52d7[_0x32ef('0x2f')]=_[_0x32ef('0x30')](_0x1874ea[_0x32ef('0x2f')]);_0x2f52d7[_0x32ef('0x31')]=_[_0x32ef('0x32')](_0x2f52d7[_0x32ef('0x2e')],_0x2f52d7['query']);_0x338f19[_0x32ef('0x33')]=_['intersection'](_0x2f52d7[_0x32ef('0x2e')],qs[_0x32ef('0x34')](_0x1874ea['query'][_0x32ef('0x34')]));_0x338f19[_0x32ef('0x33')]=_0x338f19[_0x32ef('0x33')][_0x32ef('0x35')]?_0x338f19[_0x32ef('0x33')]:_0x2f52d7['model'];if(!_0x1874ea['query'][_0x32ef('0x36')]('nolimit')){_0x338f19[_0x32ef('0x1d')]=qs[_0x32ef('0x1d')](_0x1874ea[_0x32ef('0x2f')][_0x32ef('0x1d')]);_0x338f19[_0x32ef('0x37')]=qs[_0x32ef('0x37')](_0x1874ea['query']['offset']);}_0x338f19['order']=qs[_0x32ef('0x38')](_0x1874ea[_0x32ef('0x2f')][_0x32ef('0x38')]);_0x338f19['where']=qs['filters'](_[_0x32ef('0x39')](_0x1874ea[_0x32ef('0x2f')],_0x2f52d7[_0x32ef('0x31')]));if(_0x1874ea['query']['filter']){_0x338f19[_0x32ef('0x3a')]=_[_0x32ef('0x3b')](_0x338f19[_0x32ef('0x3a')],{'$or':_[_0x32ef('0x3c')](_0xba4b3f,function(_0x3a7c49){if(_0x3a7c49[_0x32ef('0x2c')]!==_0x32ef('0x3d')){var _0x21da90={};_0x21da90[_0x3a7c49[_0x32ef('0x26')]]={'$like':'%'+_0x1874ea['query'][_0x32ef('0x3e')]+'%'};return _0x21da90;}})});}_0x338f19=_[_0x32ef('0x3b')]({},_0x338f19,_0x1874ea[_0x32ef('0x3f')]);var _0x4b97dc={'where':_0x338f19[_0x32ef('0x3a')]};return db[_0x32ef('0x29')][_0x32ef('0x1c')](_0x4b97dc)[_0x32ef('0x24')](function(_0x1faf72){_0x1335e2[_0x32ef('0x1c')]=_0x1faf72;if(_0x1874ea[_0x32ef('0x2f')][_0x32ef('0x40')]){_0x338f19[_0x32ef('0x41')]=[{'all':!![]}];}return db[_0x32ef('0x29')][_0x32ef('0x42')](_0x338f19);})[_0x32ef('0x24')](function(_0x48e071){_0x1335e2[_0x32ef('0x43')]=_0x48e071;return _0x1335e2;})[_0x32ef('0x24')](respondWithFilteredResult(_0x38aed5,_0x338f19))[_0x32ef('0x44')](handleError(_0x38aed5,null));};exports[_0x32ef('0x45')]=function(_0x2f92f5,_0x2ca66b){var _0x3c0e44={'raw':!![],'where':{'id':_0x2f92f5['params']['id']}},_0x596d5a={};_0x596d5a[_0x32ef('0x2e')]=_[_0x32ef('0x30')](db[_0x32ef('0x29')][_0x32ef('0x2a')]);_0x596d5a['query']=_[_0x32ef('0x30')](_0x2f92f5[_0x32ef('0x2f')]);_0x596d5a['filters']=_[_0x32ef('0x32')](_0x596d5a['model'],_0x596d5a[_0x32ef('0x2f')]);_0x3c0e44[_0x32ef('0x33')]=_[_0x32ef('0x32')](_0x596d5a[_0x32ef('0x2e')],qs[_0x32ef('0x34')](_0x2f92f5[_0x32ef('0x2f')][_0x32ef('0x34')]));_0x3c0e44[_0x32ef('0x33')]=_0x3c0e44[_0x32ef('0x33')][_0x32ef('0x35')]?_0x3c0e44['attributes']:_0x596d5a[_0x32ef('0x2e')];if(_0x2f92f5['query'][_0x32ef('0x40')]){_0x3c0e44[_0x32ef('0x41')]=[{'all':!![]}];}_0x3c0e44=_[_0x32ef('0x3b')]({},_0x3c0e44,_0x2f92f5['options']);return db[_0x32ef('0x29')][_0x32ef('0x46')](_0x3c0e44)[_0x32ef('0x24')](handleEntityNotFound(_0x2ca66b,null))[_0x32ef('0x24')](respondWithResult(_0x2ca66b,null))[_0x32ef('0x44')](handleError(_0x2ca66b,null));};exports[_0x32ef('0x47')]=function(_0x12c9e6,_0x47dbe1){return db['SalesforceField'][_0x32ef('0x47')](_0x12c9e6[_0x32ef('0x48')],{})[_0x32ef('0x24')](respondWithResult(_0x47dbe1,0xc9))[_0x32ef('0x44')](handleError(_0x47dbe1,null));};exports[_0x32ef('0x22')]=function(_0xd67dc9,_0x44ad11){if(_0xd67dc9[_0x32ef('0x48')]['id']){delete _0xd67dc9[_0x32ef('0x48')]['id'];}return db[_0x32ef('0x29')][_0x32ef('0x46')]({'where':{'id':_0xd67dc9[_0x32ef('0x49')]['id']}})[_0x32ef('0x24')](handleEntityNotFound(_0x44ad11,null))['then'](saveUpdates(_0xd67dc9[_0x32ef('0x48')],null))[_0x32ef('0x24')](respondWithResult(_0x44ad11,null))[_0x32ef('0x44')](handleError(_0x44ad11,null));};exports[_0x32ef('0x23')]=function(_0x1cc9f3,_0x4353f0){return db[_0x32ef('0x29')][_0x32ef('0x46')]({'where':{'id':_0x1cc9f3[_0x32ef('0x49')]['id']}})[_0x32ef('0x24')](handleEntityNotFound(_0x4353f0,null))[_0x32ef('0x24')](removeEntity(_0x4353f0,null))[_0x32ef('0x44')](handleError(_0x4353f0,null));};
\ No newline at end of file
diff --git a/server/api/intSalesforceField/intSalesforceField.model.js b/server/api/intSalesforceField/intSalesforceField.model.js
index 4875acb..b8ba4a6 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 _0xf5a9=['path','../../config/environment','./intSalesforceField.attributes','exports','define','SalesforceField','int_salesforce_fields','salesforce_unique_index','lodash','util','api','moment','bluebird'];(function(_0x114194,_0x505ab4){var _0x5435d6=function(_0x4e708e){while(--_0x4e708e){_0x114194['push'](_0x114194['shift']());}};_0x5435d6(++_0x505ab4);}(_0xf5a9,0x97));var _0x9f5a=function(_0x3c7274,_0x4cd499){_0x3c7274=_0x3c7274-0x0;var _0x86c533=_0xf5a9[_0x3c7274];return _0x86c533;};'use strict';var _=require(_0x9f5a('0x0'));var util=require(_0x9f5a('0x1'));var logger=require('../../config/logger')(_0x9f5a('0x2'));var moment=require(_0x9f5a('0x3'));var BPromise=require(_0x9f5a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9f5a('0x5'));var rimraf=require('rimraf');var config=require(_0x9f5a('0x6'));var attributes=require(_0x9f5a('0x7'));module[_0x9f5a('0x8')]=function(_0xb45fc2,_0x171bc9){return _0xb45fc2[_0x9f5a('0x9')](_0x9f5a('0xa'),attributes,{'tableName':_0x9f5a('0xb'),'paranoid':![],'indexes':[{'name':_0x9f5a('0xc'),'fields':['idField','FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x493d=['path','rimraf','../../config/environment','./intSalesforceField.attributes','exports','define','SalesforceField','int_salesforce_fields','salesforce_unique_index','FieldId','util','api','moment','bluebird','request-promise'];(function(_0x2cfb58,_0x3d9412){var _0xd99951=function(_0x329afa){while(--_0x329afa){_0x2cfb58['push'](_0x2cfb58['shift']());}};_0xd99951(++_0x3d9412);}(_0x493d,0xcd));var _0xd493=function(_0xddb860,_0x344918){_0xddb860=_0xddb860-0x0;var _0x255df9=_0x493d[_0xddb860];return _0x255df9;};'use strict';var _=require('lodash');var util=require(_0xd493('0x0'));var logger=require('../../config/logger')(_0xd493('0x1'));var moment=require(_0xd493('0x2'));var BPromise=require(_0xd493('0x3'));var rp=require(_0xd493('0x4'));var fs=require('fs');var path=require(_0xd493('0x5'));var rimraf=require(_0xd493('0x6'));var config=require(_0xd493('0x7'));var attributes=require(_0xd493('0x8'));module[_0xd493('0x9')]=function(_0x531e22,_0x2ed96a){return _0x531e22[_0xd493('0xa')](_0xd493('0xb'),attributes,{'tableName':_0xd493('0xc'),'paranoid':![],'indexes':[{'name':_0xd493('0xd'),'fields':['idField',_0xd493('0xe')],'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 81b259b..f7cc48c 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 _0xf109=['util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','SalesforceField,\x20%s,\x20%s,\x20%s','error','code','SalesforceField,\x20%s,\x20%s','message','result','catch','lodash'];(function(_0x2cba08,_0x6e57f5){var _0xeb813=function(_0x2d30c6){while(--_0x2d30c6){_0x2cba08['push'](_0x2cba08['shift']());}};_0xeb813(++_0x6e57f5);}(_0xf109,0xce));var _0x9f10=function(_0x5ddaac,_0x2697a8){_0x5ddaac=_0x5ddaac-0x0;var _0x2a9c58=_0xf109[_0x5ddaac];return _0x2a9c58;};'use strict';var _=require(_0x9f10('0x0'));var util=require(_0x9f10('0x1'));var moment=require(_0x9f10('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9f10('0x3'))['db'];var utils=require(_0x9f10('0x4'));var logger=require(_0x9f10('0x5'))(_0x9f10('0x6'));var config=require(_0x9f10('0x7'));var jayson=require(_0x9f10('0x8'));var client=jayson[_0x9f10('0x9')][_0x9f10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x227a29,_0x2a877e,_0x3fd82f){return new BPromise(function(_0x5c8719,_0x42a8cd){return client[_0x9f10('0xb')](_0x227a29,_0x3fd82f)[_0x9f10('0xc')](function(_0x1bde2e){logger[_0x9f10('0xd')]('SalesforceField,\x20%s,\x20%s',_0x2a877e,_0x9f10('0xe'));logger[_0x9f10('0xf')](_0x9f10('0x10'),_0x2a877e,'request\x20sent',JSON['stringify'](_0x1bde2e));if(_0x1bde2e[_0x9f10('0x11')]){if(_0x1bde2e[_0x9f10('0x11')][_0x9f10('0x12')]===0x1f4){logger['error'](_0x9f10('0x13'),_0x2a877e,_0x1bde2e[_0x9f10('0x11')][_0x9f10('0x14')]);return _0x42a8cd(_0x1bde2e['error'][_0x9f10('0x14')]);}logger[_0x9f10('0x11')]('SalesforceField,\x20%s,\x20%s',_0x2a877e,_0x1bde2e[_0x9f10('0x11')][_0x9f10('0x14')]);return _0x5c8719(_0x1bde2e['error']['message']);}else{logger[_0x9f10('0xd')](_0x9f10('0x13'),_0x2a877e,'request\x20sent');_0x5c8719(_0x1bde2e[_0x9f10('0x15')]['message']);}})[_0x9f10('0x16')](function(_0x1f68d8){logger['error'](_0x9f10('0x13'),_0x2a877e,_0x1f68d8);_0x42a8cd(_0x1f68d8);});});}
\ No newline at end of file
+var _0x0bb5=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','SalesforceField,\x20%s,\x20%s','debug','SalesforceField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util'];(function(_0x286e77,_0x34cdb2){var _0x5ac349=function(_0xb439bb){while(--_0xb439bb){_0x286e77['push'](_0x286e77['shift']());}};_0x5ac349(++_0x34cdb2);}(_0x0bb5,0x148));var _0x50bb=function(_0x5a6519,_0x3ee377){_0x5a6519=_0x5a6519-0x0;var _0x1f31c1=_0x0bb5[_0x5a6519];return _0x1f31c1;};'use strict';var _=require(_0x50bb('0x0'));var util=require(_0x50bb('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x50bb('0x2'));var fs=require('fs');var Redis=require(_0x50bb('0x3'));var db=require(_0x50bb('0x4'))['db'];var utils=require(_0x50bb('0x5'));var logger=require(_0x50bb('0x6'))(_0x50bb('0x7'));var config=require(_0x50bb('0x8'));var jayson=require(_0x50bb('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xfd7aeb,_0x35de5d,_0x2e5463){return new BPromise(function(_0x33ff54,_0x4f9172){return client['request'](_0xfd7aeb,_0x2e5463)[_0x50bb('0xa')](function(_0x1c2174){logger[_0x50bb('0xb')](_0x50bb('0xc'),_0x35de5d,'request\x20sent');logger[_0x50bb('0xd')](_0x50bb('0xe'),_0x35de5d,_0x50bb('0xf'),JSON[_0x50bb('0x10')](_0x1c2174));if(_0x1c2174[_0x50bb('0x11')]){if(_0x1c2174[_0x50bb('0x11')][_0x50bb('0x12')]===0x1f4){logger['error'](_0x50bb('0xc'),_0x35de5d,_0x1c2174['error'][_0x50bb('0x13')]);return _0x4f9172(_0x1c2174[_0x50bb('0x11')][_0x50bb('0x13')]);}logger['error'](_0x50bb('0xc'),_0x35de5d,_0x1c2174[_0x50bb('0x11')][_0x50bb('0x13')]);return _0x33ff54(_0x1c2174['error'][_0x50bb('0x13')]);}else{logger['info'](_0x50bb('0xc'),_0x35de5d,_0x50bb('0xf'));_0x33ff54(_0x1c2174[_0x50bb('0x14')][_0x50bb('0x13')]);}})[_0x50bb('0x15')](function(_0x4f2897){logger[_0x50bb('0x11')](_0x50bb('0xc'),_0x35de5d,_0x4f2897);_0x4f9172(_0x4f2897);});});}
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/index.js b/server/api/intServicenowAccount/index.js
index bfafccc..dcef28b 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 _0x078c=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','path','connect-timeout'];(function(_0x48cac2,_0x483396){var _0xd2a59e=function(_0xbdac60){while(--_0xbdac60){_0x48cac2['push'](_0x48cac2['shift']());}};_0xd2a59e(++_0x483396);}(_0x078c,0x19f));var _0xc078=function(_0x216428,_0x5d20ea){_0x216428=_0x216428-0x0;var _0x313dd4=_0x078c[_0x216428];return _0x313dd4;};'use strict';var multer=require(_0xc078('0x0'));var util=require('util');var path=require(_0xc078('0x1'));var timeout=require(_0xc078('0x2'));var express=require('express');var router=express[_0xc078('0x3')]();var auth=require(_0xc078('0x4'));var interaction=require(_0xc078('0x5'));var config=require(_0xc078('0x6'));var controller=require('./intServicenowAccount.controller');router[_0xc078('0x7')]('/',auth[_0xc078('0x8')](),controller[_0xc078('0x9')]);router[_0xc078('0x7')](_0xc078('0xa'),auth[_0xc078('0x8')](),controller[_0xc078('0xb')]);router[_0xc078('0x7')]('/:id/configurations',auth['isAuthenticated'](),controller['getConfigurations']);router[_0xc078('0x7')](_0xc078('0xc'),auth['isAuthenticated'](),controller[_0xc078('0xd')]);router[_0xc078('0xe')]('/',auth[_0xc078('0x8')](),controller[_0xc078('0xf')]);router[_0xc078('0xe')]('/:id/configurations',auth['isAuthenticated'](),controller[_0xc078('0x10')]);router[_0xc078('0x11')](_0xc078('0xa'),auth[_0xc078('0x8')](),controller[_0xc078('0x12')]);router[_0xc078('0x13')](_0xc078('0xa'),auth[_0xc078('0x8')](),controller[_0xc078('0x14')]);module[_0xc078('0x15')]=router;
\ No newline at end of file
+var _0x0389=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','/:id/configurations','getFields','post','create','addConfiguration','/:id','update','delete','destroy','exports','multer'];(function(_0x267279,_0x92911c){var _0x14b8ef=function(_0x112564){while(--_0x112564){_0x267279['push'](_0x267279['shift']());}};_0x14b8ef(++_0x92911c);}(_0x0389,0x175));var _0x9038=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x0389[_0x4a9fb1];return _0x348672;};'use strict';var multer=require(_0x9038('0x0'));var util=require('util');var path=require(_0x9038('0x1'));var timeout=require(_0x9038('0x2'));var express=require(_0x9038('0x3'));var router=express[_0x9038('0x4')]();var auth=require(_0x9038('0x5'));var interaction=require(_0x9038('0x6'));var config=require(_0x9038('0x7'));var controller=require('./intServicenowAccount.controller');router[_0x9038('0x8')]('/',auth[_0x9038('0x9')](),controller[_0x9038('0xa')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x9038('0xb')]);router[_0x9038('0x8')](_0x9038('0xc'),auth[_0x9038('0x9')](),controller['getConfigurations']);router[_0x9038('0x8')]('/:id/fields',auth['isAuthenticated'](),controller[_0x9038('0xd')]);router[_0x9038('0xe')]('/',auth['isAuthenticated'](),controller[_0x9038('0xf')]);router['post'](_0x9038('0xc'),auth[_0x9038('0x9')](),controller[_0x9038('0x10')]);router['put'](_0x9038('0x11'),auth[_0x9038('0x9')](),controller[_0x9038('0x12')]);router[_0x9038('0x13')]('/:id',auth[_0x9038('0x9')](),controller[_0x9038('0x14')]);module[_0x9038('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/intServicenowAccount.attributes.js b/server/api/intServicenowAccount/intServicenowAccount.attributes.js
index 553ecaf..531be96 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 _0x68e7=['sequelize','exports','STRING','username','remoteUri'];(function(_0x161148,_0x5b1e7c){var _0x5858b8=function(_0x289c2e){while(--_0x289c2e){_0x161148['push'](_0x161148['shift']());}};_0x5858b8(++_0x5b1e7c);}(_0x68e7,0x122));var _0x768e=function(_0x28db95,_0x41ada2){_0x28db95=_0x28db95-0x0;var _0x400b2a=_0x68e7[_0x28db95];return _0x400b2a;};'use strict';var Sequelize=require(_0x768e('0x0'));module[_0x768e('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x768e('0x2')]},'username':{'type':Sequelize['STRING'],'unique':_0x768e('0x3')},'password':{'type':Sequelize[_0x768e('0x2')]},'email':{'type':Sequelize[_0x768e('0x2')]},'remoteUri':{'type':Sequelize[_0x768e('0x2')],'unique':_0x768e('0x4')},'serverUrl':{'type':Sequelize[_0x768e('0x2')]}};
\ No newline at end of file
+var _0x8f6a=['exports','STRING','username','remoteUri','sequelize'];(function(_0x413059,_0xaa27a1){var _0x43aa6f=function(_0x5a99f1){while(--_0x5a99f1){_0x413059['push'](_0x413059['shift']());}};_0x43aa6f(++_0xaa27a1);}(_0x8f6a,0x14e));var _0xa8f6=function(_0x5b479e,_0x4dd759){_0x5b479e=_0x5b479e-0x0;var _0x44f253=_0x8f6a[_0x5b479e];return _0x44f253;};'use strict';var Sequelize=require(_0xa8f6('0x0'));module[_0xa8f6('0x1')]={'name':{'type':Sequelize[_0xa8f6('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xa8f6('0x2')],'unique':_0xa8f6('0x3')},'password':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0xa8f6('0x2')]},'remoteUri':{'type':Sequelize[_0xa8f6('0x2')],'unique':_0xa8f6('0x4')},'serverUrl':{'type':Sequelize[_0xa8f6('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/intServicenowAccount.controller.js b/server/api/intServicenowAccount/intServicenowAccount.controller.js
index 24dec05..edacc0c 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 _0xb465=['username','password','email','remoteUri','serverUrl','slice','substring','lastIndexOf','format','%s/api/now/doc/table/schema/','GET','incident?sysparm_display_value=all','result','log','assign','remove','forEach','internalType','label','push','all','TCL:\x20_object','includes','statusCode','Wrong\x20credentials','boolean','true','false','sys_choice?sysparm_query=name=incident^element=','value','html-pdf','eml-format','rimraf','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/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','ServicenowAccount,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','catch','end','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','stack','name','send','index','map','ServicenowAccount','rawAttributes','type','model','query','filters','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','show','params','keys','body','destroy','find','getConfigurations','findOne','hasOwnProperty','AccountId','Subjects','channel','Descriptions','getDescriptions','ServicenowConfiguration','ServicenowField','getFields','made_sla','hold_reason','close_code','notify','incident_state','severity','caused_by','watch_list','sys_updated_on','child_incidents','approval_history','resolved_by','opened_by','sys_created_on','state','sys_created_by','knowledge','calendar_stc','closed_at','cmdb_ci','delivery_plan','impact','active','work_notes_list','business_service','sys_domain_path','time_worked','opened_at','business_duration','group_list','work_end','reopened_time','resolved_at','caller_id','approval_set','work_notes','correlation_display','delivery_task','work_start','assignment_group','business_stc','calendar_duration','sys_class_name','close_notes','closed_by','follow_up','parent_incident','sys_id','contact_type','urgency','problem_id','company','reassignment_count','activity_due','comments','approval','comments_and_work_notes','due_date','sys_mod_count','reopen_count','sys_tags','escalation','upon_approval','correlation_id','location','category'];(function(_0x73e4cf,_0x2a8375){var _0x1e1bf8=function(_0xca0967){while(--_0xca0967){_0x73e4cf['push'](_0x73e4cf['shift']());}};_0x1e1bf8(++_0x2a8375);}(_0xb465,0x1a0));var _0x5b46=function(_0x4f6943,_0x35c7fe){_0x4f6943=_0x4f6943-0x0;var _0x14c80b=_0xb465[_0x4f6943];return _0x14c80b;};'use strict';var pdf=require(_0x5b46('0x0'));var emlformat=require(_0x5b46('0x1'));var rimraf=require(_0x5b46('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5b46('0x3'));var rp=require('request-promise');var moment=require(_0x5b46('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x5b46('0x5'));var util=require(_0x5b46('0x6'));var path=require(_0x5b46('0x7'));var sox=require(_0x5b46('0x8'));var csv=require(_0x5b46('0x9'));var ejs=require(_0x5b46('0xa'));var fs=require('fs');var _=require(_0x5b46('0xb'));var squel=require(_0x5b46('0xc'));var crypto=require(_0x5b46('0xd'));var jsforce=require(_0x5b46('0xe'));var deskjs=require(_0x5b46('0xf'));var toCsv=require(_0x5b46('0x9'));var querystring=require(_0x5b46('0x10'));var Papa=require(_0x5b46('0x11'));var Redis=require(_0x5b46('0x12'));var authService=require(_0x5b46('0x13'));var qs=require(_0x5b46('0x14'));var as=require(_0x5b46('0x15'));var hardwareService=require(_0x5b46('0x16'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x5b46('0x17'));var db=require(_0x5b46('0x18'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0x5b46('0x19'));var client=jayson[_0x5b46('0x1a')][_0x5b46('0x1b')]({'port':0x232a});function checkPasswordPattern(_0xcf25fd,_0x530321,_0x1bf473){if(_0x1bf473){var _0x3e9ecf=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3e9ecf[_0x5b46('0x1c')](_0x530321)){return _0xcf25fd;}else{throw new db['Sequelize']['ValidationError'](_0x5b46('0x1d'));}}else{return _0xcf25fd;}}function respondWithRpcPromise(_0x11dbf5,_0x5375f6,_0x44c6cb,_0x283a74){return new BPromise(function(_0x210948,_0x5269b9){var _0x4c4e7f=_0x283a74||client;return _0x4c4e7f[_0x5b46('0x1e')](_0x11dbf5,_0x44c6cb)[_0x5b46('0x1f')](function(_0x1804c8){logger[_0x5b46('0x20')](_0x5b46('0x21'),_0x5375f6,'request\x20sent');logger[_0x5b46('0x22')]('ServicenowAccount,\x20%s,\x20%s,\x20%s',_0x5375f6,'request\x20sent',JSON[_0x5b46('0x23')](_0x1804c8));if(_0x1804c8[_0x5b46('0x24')]){if(_0x1804c8[_0x5b46('0x24')][_0x5b46('0x25')]===0x1f4){logger[_0x5b46('0x24')](_0x5b46('0x21'),_0x5375f6,_0x1804c8[_0x5b46('0x24')][_0x5b46('0x26')]);return _0x5269b9(_0x1804c8['error'][_0x5b46('0x26')]);}logger[_0x5b46('0x24')](_0x5b46('0x21'),_0x5375f6,_0x1804c8['error'][_0x5b46('0x26')]);return _0x210948(_0x1804c8[_0x5b46('0x24')][_0x5b46('0x26')]);}else{logger[_0x5b46('0x20')](_0x5b46('0x21'),_0x5375f6,_0x5b46('0x27'));_0x210948(_0x1804c8['result'][_0x5b46('0x26')]);}})[_0x5b46('0x28')](function(_0x23219e){logger[_0x5b46('0x24')]('ServicenowAccount,\x20%s,\x20%s',_0x5375f6,_0x23219e);_0x5269b9(_0x23219e);});});}function respondWithStatusCode(_0x43ee89,_0x3c9515){_0x3c9515=_0x3c9515||0xcc;return function(_0x4828be){if(_0x4828be){return _0x43ee89['sendStatus'](_0x3c9515);}return _0x43ee89['status'](_0x3c9515)[_0x5b46('0x29')]();};}function respondWithResult(_0x500380,_0x39fb95){_0x39fb95=_0x39fb95||0xc8;return function(_0x39d5ef){if(_0x39d5ef){return _0x500380[_0x5b46('0x2a')](_0x39fb95)[_0x5b46('0x2b')](_0x39d5ef);}};}function respondWithFilteredResult(_0x7cfe77,_0x4ac6cb){return function(_0x25fa15){if(_0x25fa15){var _0x3224d9=_0x25fa15[_0x5b46('0x2c')],_0x49b487=_0x4ac6cb['offset'],_0x4747a0=_0x4ac6cb[_0x5b46('0x2d')]+_0x4ac6cb[_0x5b46('0x2e')],_0x12f1cb;if(_0x4747a0>=_0x3224d9){_0x4747a0=_0x3224d9;_0x12f1cb=0xc8;}else{_0x12f1cb=0xce;}_0x7cfe77[_0x5b46('0x2a')](_0x12f1cb);return _0x7cfe77[_0x5b46('0x2f')](_0x5b46('0x30'),_0x49b487+'-'+_0x4747a0+'/'+_0x3224d9)[_0x5b46('0x2b')](_0x25fa15);}return null;};}function patchUpdates(_0x246e33){return function(_0x59f4ae){try{jsonpatch[_0x5b46('0x31')](_0x59f4ae,_0x246e33,!![]);}catch(_0x7f42d4){return BPromise[_0x5b46('0x32')](_0x7f42d4);}return _0x59f4ae[_0x5b46('0x33')]();};}function saveUpdates(_0x181ad2,_0x44bf16){return function(_0x26b8e4){if(_0x26b8e4){return _0x26b8e4[_0x5b46('0x34')](_0x181ad2)[_0x5b46('0x1f')](function(_0x151ab0){return _0x151ab0;});}return null;};}function removeEntity(_0x1e4619,_0x22b673){return function(_0x5b7d49){if(_0x5b7d49){return _0x5b7d49['destroy']()[_0x5b46('0x1f')](function(){_0x1e4619[_0x5b46('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x8b2178,_0x53e466){return function(_0x3d9777){if(!_0x3d9777){_0x8b2178['sendStatus'](0x194);}return _0x3d9777;};}function handleError(_0x284d01,_0x411c1c){_0x411c1c=_0x411c1c||0x1f4;return function(_0x538e6b){logger['error'](_0x538e6b[_0x5b46('0x35')]);if(_0x538e6b[_0x5b46('0x36')]){delete _0x538e6b['name'];}_0x284d01[_0x5b46('0x2a')](_0x411c1c)[_0x5b46('0x37')](_0x538e6b);};}exports[_0x5b46('0x38')]=function(_0x4f0859,_0x41361b){var _0x29b493={},_0x2fd050={},_0x4c5824={'count':0x0,'rows':[]};var _0x5ccd70=_[_0x5b46('0x39')](db[_0x5b46('0x3a')][_0x5b46('0x3b')],function(_0x5f166a){return{'name':_0x5f166a['fieldName'],'type':_0x5f166a[_0x5b46('0x3c')]['key']};});_0x2fd050[_0x5b46('0x3d')]=_[_0x5b46('0x39')](_0x5ccd70,'name');_0x2fd050[_0x5b46('0x3e')]=_['keys'](_0x4f0859[_0x5b46('0x3e')]);_0x2fd050[_0x5b46('0x3f')]=_['intersection'](_0x2fd050['model'],_0x2fd050[_0x5b46('0x3e')]);_0x29b493[_0x5b46('0x40')]=_[_0x5b46('0x41')](_0x2fd050[_0x5b46('0x3d')],qs[_0x5b46('0x42')](_0x4f0859['query'][_0x5b46('0x42')]));_0x29b493['attributes']=_0x29b493[_0x5b46('0x40')][_0x5b46('0x43')]?_0x29b493['attributes']:_0x2fd050['model'];if(!_0x4f0859[_0x5b46('0x3e')]['hasOwnProperty'](_0x5b46('0x44'))){_0x29b493[_0x5b46('0x2e')]=qs['limit'](_0x4f0859[_0x5b46('0x3e')][_0x5b46('0x2e')]);_0x29b493[_0x5b46('0x2d')]=qs[_0x5b46('0x2d')](_0x4f0859['query'][_0x5b46('0x2d')]);}_0x29b493[_0x5b46('0x45')]=qs['sort'](_0x4f0859[_0x5b46('0x3e')][_0x5b46('0x46')]);_0x29b493[_0x5b46('0x47')]=qs[_0x5b46('0x3f')](_[_0x5b46('0x48')](_0x4f0859[_0x5b46('0x3e')],_0x2fd050[_0x5b46('0x3f')]));if(_0x4f0859[_0x5b46('0x3e')][_0x5b46('0x49')]){_0x29b493[_0x5b46('0x47')]=_[_0x5b46('0x4a')](_0x29b493[_0x5b46('0x47')],{'$or':_[_0x5b46('0x39')](_0x5ccd70,function(_0x5021ad){if(_0x5021ad[_0x5b46('0x3c')]!==_0x5b46('0x4b')){var _0x2d5a8b={};_0x2d5a8b[_0x5021ad[_0x5b46('0x36')]]={'$like':'%'+_0x4f0859[_0x5b46('0x3e')]['filter']+'%'};return _0x2d5a8b;}})});}_0x29b493=_[_0x5b46('0x4a')]({},_0x29b493,_0x4f0859[_0x5b46('0x4c')]);var _0x3caed4={'where':_0x29b493[_0x5b46('0x47')]};return db[_0x5b46('0x3a')][_0x5b46('0x2c')](_0x3caed4)[_0x5b46('0x1f')](function(_0x108831){_0x4c5824['count']=_0x108831;if(_0x4f0859[_0x5b46('0x3e')][_0x5b46('0x4d')]){_0x29b493[_0x5b46('0x4e')]=[{'all':!![]}];}return db['ServicenowAccount']['findAll'](_0x29b493);})['then'](function(_0x5ea84b){_0x4c5824[_0x5b46('0x4f')]=_0x5ea84b;return _0x4c5824;})[_0x5b46('0x1f')](respondWithFilteredResult(_0x41361b,_0x29b493))['catch'](handleError(_0x41361b,null));};exports[_0x5b46('0x50')]=function(_0x328875,_0x4fc854){var _0x3a23a5={'raw':![],'where':{'id':_0x328875[_0x5b46('0x51')]['id']}},_0x14699d={};_0x14699d[_0x5b46('0x3d')]=_[_0x5b46('0x52')](db['ServicenowAccount']['rawAttributes']);_0x14699d['query']=_['keys'](_0x328875[_0x5b46('0x3e')]);_0x14699d[_0x5b46('0x3f')]=_['intersection'](_0x14699d['model'],_0x14699d[_0x5b46('0x3e')]);_0x3a23a5[_0x5b46('0x40')]=_['intersection'](_0x14699d[_0x5b46('0x3d')],qs[_0x5b46('0x42')](_0x328875[_0x5b46('0x3e')][_0x5b46('0x42')]));_0x3a23a5[_0x5b46('0x40')]=_0x3a23a5['attributes'][_0x5b46('0x43')]?_0x3a23a5[_0x5b46('0x40')]:_0x14699d[_0x5b46('0x3d')];if(_0x328875['query'][_0x5b46('0x4d')]){_0x3a23a5[_0x5b46('0x4e')]=[{'all':!![]}];}_0x3a23a5=_[_0x5b46('0x4a')]({},_0x3a23a5,_0x328875[_0x5b46('0x4c')]);return db[_0x5b46('0x3a')]['find'](_0x3a23a5)[_0x5b46('0x1f')](handleEntityNotFound(_0x4fc854,null))['then'](respondWithResult(_0x4fc854,null))[_0x5b46('0x28')](handleError(_0x4fc854,null));};exports['create']=function(_0xe79857,_0x12ec24){return db['ServicenowAccount']['create'](_0xe79857[_0x5b46('0x53')],{})[_0x5b46('0x1f')](respondWithResult(_0x12ec24,0xc9))[_0x5b46('0x28')](handleError(_0x12ec24,null));};exports[_0x5b46('0x34')]=function(_0x3e39d6,_0x1b00ee){if(_0x3e39d6[_0x5b46('0x53')]['id']){delete _0x3e39d6[_0x5b46('0x53')]['id'];}return db[_0x5b46('0x3a')]['find']({'where':{'id':_0x3e39d6[_0x5b46('0x51')]['id']}})[_0x5b46('0x1f')](handleEntityNotFound(_0x1b00ee,null))[_0x5b46('0x1f')](saveUpdates(_0x3e39d6[_0x5b46('0x53')],null))[_0x5b46('0x1f')](respondWithResult(_0x1b00ee,null))[_0x5b46('0x28')](handleError(_0x1b00ee,null));};exports[_0x5b46('0x54')]=function(_0x1f753c,_0xbdfec8){return db[_0x5b46('0x3a')][_0x5b46('0x55')]({'where':{'id':_0x1f753c[_0x5b46('0x51')]['id']}})[_0x5b46('0x1f')](handleEntityNotFound(_0xbdfec8,null))['then'](removeEntity(_0xbdfec8,null))[_0x5b46('0x28')](handleError(_0xbdfec8,null));};exports[_0x5b46('0x56')]=function(_0x24a9b2,_0x472162,_0x43a388){var _0x3fa97c={};var _0x56613b={};var _0x1d8654;var _0x476c80;return db['ServicenowAccount'][_0x5b46('0x57')]({'where':{'id':_0x24a9b2['params']['id']}})[_0x5b46('0x1f')](handleEntityNotFound(_0x472162,null))[_0x5b46('0x1f')](function(_0x9be3bd){if(_0x9be3bd){_0x1d8654=_0x9be3bd;_0x56613b[_0x5b46('0x3d')]=_[_0x5b46('0x52')](db['ServicenowConfiguration'][_0x5b46('0x3b')]);_0x56613b[_0x5b46('0x3e')]=_[_0x5b46('0x52')](_0x24a9b2[_0x5b46('0x3e')]);_0x56613b[_0x5b46('0x3f')]=_[_0x5b46('0x41')](_0x56613b['model'],_0x56613b['query']);_0x3fa97c[_0x5b46('0x40')]=_[_0x5b46('0x41')](_0x56613b['model'],qs[_0x5b46('0x42')](_0x24a9b2[_0x5b46('0x3e')]['fields']));_0x3fa97c[_0x5b46('0x40')]=_0x3fa97c[_0x5b46('0x40')][_0x5b46('0x43')]?_0x3fa97c[_0x5b46('0x40')]:_0x56613b[_0x5b46('0x3d')];_0x3fa97c[_0x5b46('0x45')]=qs[_0x5b46('0x46')](_0x24a9b2[_0x5b46('0x3e')][_0x5b46('0x46')]);_0x3fa97c['where']=qs[_0x5b46('0x3f')](_[_0x5b46('0x48')](_0x24a9b2['query'],_0x56613b[_0x5b46('0x3f')]));if(_0x24a9b2[_0x5b46('0x3e')][_0x5b46('0x49')]){_0x3fa97c['where']=_[_0x5b46('0x4a')](_0x3fa97c[_0x5b46('0x47')],{'$or':_[_0x5b46('0x39')](_0x3fa97c['attributes'],function(_0x9f4450){var _0x243ed3={};_0x243ed3[_0x9f4450]={'$like':'%'+_0x24a9b2[_0x5b46('0x3e')][_0x5b46('0x49')]+'%'};return _0x243ed3;})});}_0x3fa97c=_[_0x5b46('0x4a')]({},_0x3fa97c,_0x24a9b2['options']);return _0x1d8654[_0x5b46('0x56')](_0x3fa97c);}})[_0x5b46('0x1f')](function(_0x171795){if(_0x171795){_0x476c80=_0x171795[_0x5b46('0x43')];if(!_0x24a9b2['query'][_0x5b46('0x58')](_0x5b46('0x44'))){_0x3fa97c['limit']=qs[_0x5b46('0x2e')](_0x24a9b2[_0x5b46('0x3e')]['limit']);_0x3fa97c[_0x5b46('0x2d')]=qs[_0x5b46('0x2d')](_0x24a9b2[_0x5b46('0x3e')][_0x5b46('0x2d')]);}return _0x1d8654[_0x5b46('0x56')](_0x3fa97c);}})[_0x5b46('0x1f')](function(_0x5cd253){if(_0x5cd253){return _0x5cd253?{'count':_0x476c80,'rows':_0x5cd253}:null;}})[_0x5b46('0x1f')](respondWithResult(_0x472162,null))[_0x5b46('0x28')](handleError(_0x472162,null));};exports['addConfiguration']=function(_0x556d5d,_0x2b43b2,_0x2195f0){if(_0x556d5d['body']['id']){delete _0x556d5d['body']['id'];}return db[_0x5b46('0x3a')][_0x5b46('0x57')]({'where':{'id':_0x556d5d['params']['id']}})[_0x5b46('0x1f')](handleEntityNotFound(_0x2b43b2,null))[_0x5b46('0x1f')](function(_0x3e9ff8){if(_0x3e9ff8){_0x556d5d[_0x5b46('0x53')][_0x5b46('0x59')]=_0x3e9ff8['id'];_0x556d5d[_0x5b46('0x53')][_0x5b46('0x5a')]=integrations['getSubjects'](_0x556d5d['body'][_0x5b46('0x5b')],_0x556d5d[_0x5b46('0x53')][_0x5b46('0x3c')]);_0x556d5d[_0x5b46('0x53')][_0x5b46('0x5c')]=integrations[_0x5b46('0x5d')](_0x556d5d[_0x5b46('0x53')][_0x5b46('0x5b')],_0x556d5d[_0x5b46('0x53')][_0x5b46('0x3c')]);return db[_0x5b46('0x5e')]['create'](_0x556d5d[_0x5b46('0x53')],{'include':[{'model':db[_0x5b46('0x5f')],'as':_0x5b46('0x5a')},{'model':db[_0x5b46('0x5f')],'as':_0x5b46('0x5c')}]});}return null;})[_0x5b46('0x1f')](respondWithResult(_0x2b43b2,null))[_0x5b46('0x28')](handleError(_0x2b43b2,null));};exports[_0x5b46('0x60')]=function(_0x10a077,_0x1cf504,_0x15d58f){var _0x14a244=[_0x5b46('0x61'),_0x5b46('0x62'),'knowledge','subcategory',_0x5b46('0x63'),_0x5b46('0x64'),_0x5b46('0x65'),_0x5b46('0x66'),'category'];var _0x5cc6ce=['parent','made_sla',_0x5b46('0x67'),_0x5b46('0x68'),'upon_reject',_0x5b46('0x69'),_0x5b46('0x6a'),'hold_reason',_0x5b46('0x6b'),'number',_0x5b46('0x6c'),'sys_updated_by',_0x5b46('0x6d'),'user_input',_0x5b46('0x6e'),'sys_domain',_0x5b46('0x6f'),_0x5b46('0x70'),_0x5b46('0x71'),_0x5b46('0x45'),_0x5b46('0x72'),_0x5b46('0x73'),_0x5b46('0x74'),_0x5b46('0x75'),_0x5b46('0x76'),_0x5b46('0x77'),_0x5b46('0x78'),_0x5b46('0x79'),'priority',_0x5b46('0x7a'),'rfc',_0x5b46('0x7b'),'expected_start',_0x5b46('0x7c'),_0x5b46('0x7d'),_0x5b46('0x7e'),_0x5b46('0x7f'),_0x5b46('0x80'),_0x5b46('0x81'),_0x5b46('0x82'),_0x5b46('0x83'),'subcategory',_0x5b46('0x84'),'short_description',_0x5b46('0x63'),_0x5b46('0x85'),_0x5b46('0x86'),_0x5b46('0x87'),_0x5b46('0x88'),_0x5b46('0x89'),'additional_assignee_list','description',_0x5b46('0x8a'),_0x5b46('0x64'),_0x5b46('0x8b'),_0x5b46('0x8c'),_0x5b46('0x8d'),_0x5b46('0x8e'),_0x5b46('0x8f'),_0x5b46('0x90'),_0x5b46('0x91'),'reopened_by',_0x5b46('0x65'),_0x5b46('0x92'),_0x5b46('0x93'),_0x5b46('0x94'),_0x5b46('0x95'),_0x5b46('0x96'),'assigned_to',_0x5b46('0x66'),_0x5b46('0x97'),'sla_due',_0x5b46('0x98'),_0x5b46('0x99'),_0x5b46('0x9a'),_0x5b46('0x9b'),_0x5b46('0x9c'),_0x5b46('0x9d'),_0x5b46('0x9e'),_0x5b46('0x9f'),_0x5b46('0xa0'),_0x5b46('0xa1'),_0x5b46('0xa2')];var _0x1bf65a='';var _0x3f8f6f='';var _0x5f1df8=[];var _0x34a50f='';var _0x5b1cbd='';var _0x55f206=[];var _0x23fb64='';var _0x19ce04='';var _0x3975ed={};var _0x1099f1='';return db['ServicenowAccount'][_0x5b46('0x57')]({'where':{'id':_0x10a077[_0x5b46('0x51')]['id']},'attributes':['id',_0x5b46('0xa3'),_0x5b46('0xa4'),_0x5b46('0xa5'),_0x5b46('0xa6'),_0x5b46('0xa7')]})[_0x5b46('0x1f')](handleEntityNotFound(_0x1cf504,null))[_0x5b46('0x1f')](function(_0x5a5f55){if(_0x5a5f55){_0x1099f1=_0x5a5f55['remoteUri'];var _0x4f1551=_0x1099f1[_0x5b46('0xa8')](-0x1);if(_0x4f1551==='/'){_0x1099f1=_0x1099f1[_0x5b46('0xa9')](0x0,_0x1099f1[_0x5b46('0xaa')](_0x4f1551));}_0x19ce04=util[_0x5b46('0xab')](_0x5b46('0xac'),_0x1099f1);_0x23fb64=util[_0x5b46('0xab')]('%s/api/now/table/',_0x1099f1);_0x3975ed={'user':_0x5a5f55['username'],'pass':_0x5a5f55[_0x5b46('0xa4')]};var _0x4937f1={'method':_0x5b46('0xad'),'uri':_0x19ce04+_0x5b46('0xae'),'auth':_0x3975ed,'json':!![]};return rp(_0x4937f1);}})[_0x5b46('0x1f')](function(_0x50f1ae){if(_0x50f1ae['result'][_0x5b46('0x43')]>0x0){_0x1bf65a=_0x50f1ae[_0x5b46('0xaf')];}console[_0x5b46('0xb0')]('incident\x20table\x20objects',_0x1bf65a);_0x55f206=[];_0x3f8f6f=Object[_0x5b46('0xb1')]([],_0x1bf65a);_[_0x5b46('0xb2')](_0x3f8f6f,function(_0x5d2e03){return!_0x14a244['includes'](_0x5d2e03[_0x5b46('0x36')]);});_0x3f8f6f[_0x5b46('0xb3')](function(_0x453895){var _0x4c049b=createFieldObject(_0x23fb64,_0x3975ed,_0x453895[_0x5b46('0xb4')],_0x453895[_0x5b46('0x36')],_0x453895[_0x5b46('0xb5')],![]);_0x55f206[_0x5b46('0xb6')](_0x4c049b);});return Promise[_0x5b46('0xb7')](_0x55f206);})[_0x5b46('0x1f')](function(_0x1bf117){_0x5f1df8=_0x1bf117;_0x34a50f=Object[_0x5b46('0xb1')]([],_0x1bf65a);console[_0x5b46('0xb0')](_0x5b46('0xb8'),_0x1bf65a);_[_0x5b46('0xb2')](_0x34a50f,function(_0x99e96){return _0x5cc6ce[_0x5b46('0xb9')](_0x99e96['name']);});console['log']('TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom',_0x34a50f);_0x55f206=[];_0x34a50f[_0x5b46('0xb3')](function(_0x4e2967){var _0x23bd95=createFieldObject(_0x23fb64,_0x3975ed,_0x4e2967[_0x5b46('0xb4')],_0x4e2967[_0x5b46('0x36')],_0x4e2967[_0x5b46('0xb5')],!![]);_0x55f206[_0x5b46('0xb6')](_0x23bd95);});return Promise['all'](_0x55f206);})[_0x5b46('0x1f')](function(_0x3d2c10){_0x5b1cbd=_0x3d2c10;var _0x3a1f49=_0x5f1df8['concat'](_0x5b1cbd);return{'count':_0x3a1f49[_0x5b46('0x43')],'rows':_0x3a1f49};})['then'](respondWithResult(_0x1cf504,null))[_0x5b46('0x28')](function(_0xfabf6f){console[_0x5b46('0xb0')]('ServiceNow\x20error:\x20'+_0xfabf6f);var _0x2a3c22=_0x10a077[_0x5b46('0x3e')][_0x5b46('0x1c')]?0x1f4:_0xfabf6f[_0x5b46('0xba')]||0x1f4;logger[_0x5b46('0x24')](_0xfabf6f[_0x5b46('0x35')]);delete _0xfabf6f[_0x5b46('0x36')];if(_0x2a3c22===0x191){_0x2a3c22=0x190;}_0x1cf504[_0x5b46('0x2a')](_0x2a3c22)[_0x5b46('0x37')](_0x10a077['query']['test']?{'message':_0x5b46('0xbb'),'statusCode':_0xfabf6f['statusCode']}:_0xfabf6f);});};function createFieldObject(_0x366a89,_0x11a753,_0x3c171e,_0x26c8be,_0x542f23,_0x145528){return new Promise(function(_0x4d8789,_0xda7f41){var _0x4375f5={'id':_0x26c8be,'name':_0x542f23,'custom':_0x145528};if(_0x3c171e===_0x5b46('0xbc')){_0x4375f5[_0x5b46('0x4c')]=[{'name':'True','value':_0x5b46('0xbd')},{'name':'False','value':_0x5b46('0xbe')}];_0x4d8789(_0x4375f5);}else{var _0xc2c053={'method':_0x5b46('0xad'),'uri':_0x366a89+_0x5b46('0xbf')+_0x26c8be,'auth':_0x11a753,'json':!![]};return rp(_0xc2c053)['then'](function(_0x341ba9){var _0x54407d=[];if(_0x341ba9[_0x5b46('0xaf')][_0x5b46('0x43')]>0x0){_0x341ba9[_0x5b46('0xaf')][_0x5b46('0xb3')](function(_0x125428){if(_0x125428['inactive']===_0x5b46('0xbe')){var _0x89eab7={'name':_0x125428[_0x5b46('0xb5')],'value':_0x125428[_0x5b46('0xc0')]};_0x54407d[_0x5b46('0xb6')](_0x89eab7);}});}_0x4375f5[_0x5b46('0x4c')]=_0x54407d;if(_0x4375f5[_0x5b46('0x4c')][_0x5b46('0x43')]>0x0){_0x4d8789(_0x4375f5);}else{if(_0x145528==![]){_0x4d8789();}else{_0x4d8789(_0x4375f5);}}});}});}
\ No newline at end of file
+var _0x4ac0=['category','parent','caused_by','upon_reject','sys_updated_on','child_incidents','number','sys_updated_by','user_input','sys_created_on','state','sys_created_by','knowledge','cmdb_ci','delivery_plan','impact','active','work_notes_list','business_service','sys_domain_path','rfc','expected_start','opened_at','business_duration','group_list','reopened_time','resolved_at','approval_set','subcategory','short_description','delivery_task','work_start','assignment_group','business_stc','additional_assignee_list','description','close_notes','closed_by','parent_incident','contact_type','reopened_by','urgency','problem_id','activity_due','sla_due','comments_and_work_notes','due_date','sys_mod_count','reopen_count','sys_tags','escalation','location','username','email','serverUrl','remoteUri','substring','lastIndexOf','%s/api/now/doc/table/schema/','format','%s/api/now/table/','password','incident?sysparm_display_value=all','incident\x20table\x20objects','assign','remove','includes','label','all','TCL:\x20_object','log','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','forEach','push','concat','ServiceNow\x20error:\x20','test','Wrong\x20credentials','statusCode','True','true','False','false','sys_choice?sysparm_query=name=incident^element=','value','html-pdf','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../components/integrations/configuration','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','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','end','status','json','count','offset','limit','set','Content-Range','reject','stack','name','send','index','map','ServicenowAccount','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','merge','options','include','findAll','rows','show','params','rawAttributes','find','create','body','destroy','getConfigurations','findOne','ServicenowConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','ServicenowField','made_sla','hold_reason','close_code','notify','incident_state','severity'];(function(_0x462643,_0x3148c6){var _0x280baa=function(_0x214362){while(--_0x214362){_0x462643['push'](_0x462643['shift']());}};_0x280baa(++_0x3148c6);}(_0x4ac0,0x1d1));var _0x04ac=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x4ac0[_0x3b380d];return _0x54502b;};'use strict';var pdf=require(_0x04ac('0x0'));var emlformat=require(_0x04ac('0x1'));var rimraf=require(_0x04ac('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x04ac('0x3'));var rp=require('request-promise');var moment=require(_0x04ac('0x4'));var BPromise=require(_0x04ac('0x5'));var Mustache=require(_0x04ac('0x6'));var util=require(_0x04ac('0x7'));var path=require(_0x04ac('0x8'));var sox=require(_0x04ac('0x9'));var csv=require(_0x04ac('0xa'));var ejs=require(_0x04ac('0xb'));var fs=require('fs');var _=require(_0x04ac('0xc'));var squel=require('squel');var crypto=require(_0x04ac('0xd'));var jsforce=require(_0x04ac('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x04ac('0xa'));var querystring=require(_0x04ac('0xf'));var Papa=require(_0x04ac('0x10'));var Redis=require(_0x04ac('0x11'));var authService=require(_0x04ac('0x12'));var qs=require(_0x04ac('0x13'));var as=require(_0x04ac('0x14'));var hardwareService=require(_0x04ac('0x15'));var logger=require(_0x04ac('0x16'))(_0x04ac('0x17'));var utils=require('../../config/utils');var config=require(_0x04ac('0x18'));var db=require('../../mysqldb')['db'];var integrations=require(_0x04ac('0x19'));var jayson=require(_0x04ac('0x1a'));var client=jayson[_0x04ac('0x1b')][_0x04ac('0x1c')]({'port':0x232a});function checkPasswordPattern(_0x2e11fc,_0x1ff357,_0xd55645){if(_0xd55645){var _0x1d23dd=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1d23dd['test'](_0x1ff357)){return _0x2e11fc;}else{throw new db['Sequelize']['ValidationError'](_0x04ac('0x1d'));}}else{return _0x2e11fc;}}function respondWithRpcPromise(_0x16072e,_0x2aa5f5,_0x516912,_0x419ed0){return new BPromise(function(_0x393dc1,_0x4203e5){var _0x2ad21d=_0x419ed0||client;return _0x2ad21d[_0x04ac('0x1e')](_0x16072e,_0x516912)[_0x04ac('0x1f')](function(_0x1c842e){logger[_0x04ac('0x20')](_0x04ac('0x21'),_0x2aa5f5,_0x04ac('0x22'));logger[_0x04ac('0x23')](_0x04ac('0x24'),_0x2aa5f5,'request\x20sent',JSON[_0x04ac('0x25')](_0x1c842e));if(_0x1c842e[_0x04ac('0x26')]){if(_0x1c842e[_0x04ac('0x26')]['code']===0x1f4){logger['error']('ServicenowAccount,\x20%s,\x20%s',_0x2aa5f5,_0x1c842e[_0x04ac('0x26')][_0x04ac('0x27')]);return _0x4203e5(_0x1c842e[_0x04ac('0x26')][_0x04ac('0x27')]);}logger['error'](_0x04ac('0x21'),_0x2aa5f5,_0x1c842e[_0x04ac('0x26')][_0x04ac('0x27')]);return _0x393dc1(_0x1c842e[_0x04ac('0x26')]['message']);}else{logger[_0x04ac('0x20')](_0x04ac('0x21'),_0x2aa5f5,_0x04ac('0x22'));_0x393dc1(_0x1c842e[_0x04ac('0x28')][_0x04ac('0x27')]);}})[_0x04ac('0x29')](function(_0x2d13d2){logger[_0x04ac('0x26')](_0x04ac('0x21'),_0x2aa5f5,_0x2d13d2);_0x4203e5(_0x2d13d2);});});}function respondWithStatusCode(_0xb70067,_0x3f4e88){_0x3f4e88=_0x3f4e88||0xcc;return function(_0xb82390){if(_0xb82390){return _0xb70067[_0x04ac('0x2a')](_0x3f4e88);}return _0xb70067['status'](_0x3f4e88)[_0x04ac('0x2b')]();};}function respondWithResult(_0x3e2092,_0x870676){_0x870676=_0x870676||0xc8;return function(_0x831f0a){if(_0x831f0a){return _0x3e2092[_0x04ac('0x2c')](_0x870676)[_0x04ac('0x2d')](_0x831f0a);}};}function respondWithFilteredResult(_0x475534,_0x13a993){return function(_0x56bd05){if(_0x56bd05){var _0x24846f=_0x56bd05[_0x04ac('0x2e')],_0x39cc97=_0x13a993[_0x04ac('0x2f')],_0x4adab1=_0x13a993[_0x04ac('0x2f')]+_0x13a993[_0x04ac('0x30')],_0x35e784;if(_0x4adab1>=_0x24846f){_0x4adab1=_0x24846f;_0x35e784=0xc8;}else{_0x35e784=0xce;}_0x475534[_0x04ac('0x2c')](_0x35e784);return _0x475534[_0x04ac('0x31')](_0x04ac('0x32'),_0x39cc97+'-'+_0x4adab1+'/'+_0x24846f)[_0x04ac('0x2d')](_0x56bd05);}return null;};}function patchUpdates(_0x10e881){return function(_0x5cb9ef){try{jsonpatch['apply'](_0x5cb9ef,_0x10e881,!![]);}catch(_0x1934bb){return BPromise[_0x04ac('0x33')](_0x1934bb);}return _0x5cb9ef['save']();};}function saveUpdates(_0x77740d,_0x38dbb8){return function(_0x1188ae){if(_0x1188ae){return _0x1188ae['update'](_0x77740d)[_0x04ac('0x1f')](function(_0xf80fc0){return _0xf80fc0;});}return null;};}function removeEntity(_0x586eea,_0x175aa7){return function(_0x4db384){if(_0x4db384){return _0x4db384['destroy']()['then'](function(){_0x586eea['status'](0xcc)[_0x04ac('0x2b')]();});}};}function handleEntityNotFound(_0x55d7ff,_0x5acee6){return function(_0xa473e3){if(!_0xa473e3){_0x55d7ff[_0x04ac('0x2a')](0x194);}return _0xa473e3;};}function handleError(_0x4928b6,_0x49e4d5){_0x49e4d5=_0x49e4d5||0x1f4;return function(_0x55253f){logger[_0x04ac('0x26')](_0x55253f[_0x04ac('0x34')]);if(_0x55253f[_0x04ac('0x35')]){delete _0x55253f[_0x04ac('0x35')];}_0x4928b6['status'](_0x49e4d5)[_0x04ac('0x36')](_0x55253f);};}exports[_0x04ac('0x37')]=function(_0x4ba085,_0x2b9037){var _0x384c5a={},_0x16979d={},_0x25190c={'count':0x0,'rows':[]};var _0x50661c=_[_0x04ac('0x38')](db[_0x04ac('0x39')]['rawAttributes'],function(_0xa0c5af){return{'name':_0xa0c5af[_0x04ac('0x3a')],'type':_0xa0c5af[_0x04ac('0x3b')][_0x04ac('0x3c')]};});_0x16979d[_0x04ac('0x3d')]=_['map'](_0x50661c,_0x04ac('0x35'));_0x16979d[_0x04ac('0x3e')]=_[_0x04ac('0x3f')](_0x4ba085[_0x04ac('0x3e')]);_0x16979d[_0x04ac('0x40')]=_[_0x04ac('0x41')](_0x16979d[_0x04ac('0x3d')],_0x16979d[_0x04ac('0x3e')]);_0x384c5a[_0x04ac('0x42')]=_[_0x04ac('0x41')](_0x16979d[_0x04ac('0x3d')],qs[_0x04ac('0x43')](_0x4ba085[_0x04ac('0x3e')][_0x04ac('0x43')]));_0x384c5a[_0x04ac('0x42')]=_0x384c5a['attributes'][_0x04ac('0x44')]?_0x384c5a['attributes']:_0x16979d['model'];if(!_0x4ba085[_0x04ac('0x3e')][_0x04ac('0x45')](_0x04ac('0x46'))){_0x384c5a['limit']=qs[_0x04ac('0x30')](_0x4ba085[_0x04ac('0x3e')]['limit']);_0x384c5a['offset']=qs[_0x04ac('0x2f')](_0x4ba085[_0x04ac('0x3e')][_0x04ac('0x2f')]);}_0x384c5a[_0x04ac('0x47')]=qs[_0x04ac('0x48')](_0x4ba085[_0x04ac('0x3e')]['sort']);_0x384c5a[_0x04ac('0x49')]=qs['filters'](_[_0x04ac('0x4a')](_0x4ba085[_0x04ac('0x3e')],_0x16979d['filters']));if(_0x4ba085[_0x04ac('0x3e')]['filter']){_0x384c5a[_0x04ac('0x49')]=_['merge'](_0x384c5a[_0x04ac('0x49')],{'$or':_[_0x04ac('0x38')](_0x50661c,function(_0x302c41){if(_0x302c41[_0x04ac('0x3b')]!==_0x04ac('0x4b')){var _0x8275a4={};_0x8275a4[_0x302c41[_0x04ac('0x35')]]={'$like':'%'+_0x4ba085[_0x04ac('0x3e')][_0x04ac('0x4c')]+'%'};return _0x8275a4;}})});}_0x384c5a=_[_0x04ac('0x4d')]({},_0x384c5a,_0x4ba085[_0x04ac('0x4e')]);var _0x82eca7={'where':_0x384c5a[_0x04ac('0x49')]};return db[_0x04ac('0x39')][_0x04ac('0x2e')](_0x82eca7)[_0x04ac('0x1f')](function(_0x399b99){_0x25190c[_0x04ac('0x2e')]=_0x399b99;if(_0x4ba085[_0x04ac('0x3e')]['includeAll']){_0x384c5a[_0x04ac('0x4f')]=[{'all':!![]}];}return db[_0x04ac('0x39')][_0x04ac('0x50')](_0x384c5a);})[_0x04ac('0x1f')](function(_0x22cc35){_0x25190c[_0x04ac('0x51')]=_0x22cc35;return _0x25190c;})[_0x04ac('0x1f')](respondWithFilteredResult(_0x2b9037,_0x384c5a))['catch'](handleError(_0x2b9037,null));};exports[_0x04ac('0x52')]=function(_0xf44357,_0x30943b){var _0x2390d4={'raw':![],'where':{'id':_0xf44357[_0x04ac('0x53')]['id']}},_0x484d9f={};_0x484d9f[_0x04ac('0x3d')]=_[_0x04ac('0x3f')](db[_0x04ac('0x39')][_0x04ac('0x54')]);_0x484d9f[_0x04ac('0x3e')]=_[_0x04ac('0x3f')](_0xf44357[_0x04ac('0x3e')]);_0x484d9f[_0x04ac('0x40')]=_[_0x04ac('0x41')](_0x484d9f['model'],_0x484d9f['query']);_0x2390d4['attributes']=_[_0x04ac('0x41')](_0x484d9f[_0x04ac('0x3d')],qs[_0x04ac('0x43')](_0xf44357[_0x04ac('0x3e')][_0x04ac('0x43')]));_0x2390d4[_0x04ac('0x42')]=_0x2390d4[_0x04ac('0x42')][_0x04ac('0x44')]?_0x2390d4['attributes']:_0x484d9f[_0x04ac('0x3d')];if(_0xf44357['query']['includeAll']){_0x2390d4[_0x04ac('0x4f')]=[{'all':!![]}];}_0x2390d4=_['merge']({},_0x2390d4,_0xf44357['options']);return db[_0x04ac('0x39')][_0x04ac('0x55')](_0x2390d4)[_0x04ac('0x1f')](handleEntityNotFound(_0x30943b,null))['then'](respondWithResult(_0x30943b,null))['catch'](handleError(_0x30943b,null));};exports[_0x04ac('0x56')]=function(_0x45bbed,_0x8327a0){return db[_0x04ac('0x39')]['create'](_0x45bbed[_0x04ac('0x57')],{})[_0x04ac('0x1f')](respondWithResult(_0x8327a0,0xc9))['catch'](handleError(_0x8327a0,null));};exports['update']=function(_0x3051e9,_0x5668c1){if(_0x3051e9[_0x04ac('0x57')]['id']){delete _0x3051e9[_0x04ac('0x57')]['id'];}return db[_0x04ac('0x39')][_0x04ac('0x55')]({'where':{'id':_0x3051e9[_0x04ac('0x53')]['id']}})[_0x04ac('0x1f')](handleEntityNotFound(_0x5668c1,null))['then'](saveUpdates(_0x3051e9[_0x04ac('0x57')],null))[_0x04ac('0x1f')](respondWithResult(_0x5668c1,null))[_0x04ac('0x29')](handleError(_0x5668c1,null));};exports[_0x04ac('0x58')]=function(_0x554007,_0x3a76f2){return db[_0x04ac('0x39')]['find']({'where':{'id':_0x554007['params']['id']}})[_0x04ac('0x1f')](handleEntityNotFound(_0x3a76f2,null))[_0x04ac('0x1f')](removeEntity(_0x3a76f2,null))[_0x04ac('0x29')](handleError(_0x3a76f2,null));};exports[_0x04ac('0x59')]=function(_0x1d37c9,_0x54c9f4,_0x33c470){var _0x2126d3={};var _0x418d7c={};var _0x3f0011;var _0x533fe2;return db['ServicenowAccount'][_0x04ac('0x5a')]({'where':{'id':_0x1d37c9[_0x04ac('0x53')]['id']}})[_0x04ac('0x1f')](handleEntityNotFound(_0x54c9f4,null))[_0x04ac('0x1f')](function(_0x11801c){if(_0x11801c){_0x3f0011=_0x11801c;_0x418d7c[_0x04ac('0x3d')]=_[_0x04ac('0x3f')](db[_0x04ac('0x5b')][_0x04ac('0x54')]);_0x418d7c['query']=_[_0x04ac('0x3f')](_0x1d37c9[_0x04ac('0x3e')]);_0x418d7c[_0x04ac('0x40')]=_[_0x04ac('0x41')](_0x418d7c[_0x04ac('0x3d')],_0x418d7c[_0x04ac('0x3e')]);_0x2126d3[_0x04ac('0x42')]=_[_0x04ac('0x41')](_0x418d7c[_0x04ac('0x3d')],qs[_0x04ac('0x43')](_0x1d37c9[_0x04ac('0x3e')]['fields']));_0x2126d3['attributes']=_0x2126d3[_0x04ac('0x42')][_0x04ac('0x44')]?_0x2126d3[_0x04ac('0x42')]:_0x418d7c[_0x04ac('0x3d')];_0x2126d3[_0x04ac('0x47')]=qs[_0x04ac('0x48')](_0x1d37c9[_0x04ac('0x3e')][_0x04ac('0x48')]);_0x2126d3[_0x04ac('0x49')]=qs['filters'](_[_0x04ac('0x4a')](_0x1d37c9[_0x04ac('0x3e')],_0x418d7c[_0x04ac('0x40')]));if(_0x1d37c9['query'][_0x04ac('0x4c')]){_0x2126d3[_0x04ac('0x49')]=_[_0x04ac('0x4d')](_0x2126d3[_0x04ac('0x49')],{'$or':_[_0x04ac('0x38')](_0x2126d3[_0x04ac('0x42')],function(_0x2fee5c){var _0x3efafb={};_0x3efafb[_0x2fee5c]={'$like':'%'+_0x1d37c9[_0x04ac('0x3e')][_0x04ac('0x4c')]+'%'};return _0x3efafb;})});}_0x2126d3=_[_0x04ac('0x4d')]({},_0x2126d3,_0x1d37c9[_0x04ac('0x4e')]);return _0x3f0011[_0x04ac('0x59')](_0x2126d3);}})[_0x04ac('0x1f')](function(_0x144862){if(_0x144862){_0x533fe2=_0x144862['length'];if(!_0x1d37c9[_0x04ac('0x3e')][_0x04ac('0x45')]('nolimit')){_0x2126d3[_0x04ac('0x30')]=qs[_0x04ac('0x30')](_0x1d37c9[_0x04ac('0x3e')][_0x04ac('0x30')]);_0x2126d3['offset']=qs[_0x04ac('0x2f')](_0x1d37c9[_0x04ac('0x3e')][_0x04ac('0x2f')]);}return _0x3f0011[_0x04ac('0x59')](_0x2126d3);}})['then'](function(_0x4ff0d1){if(_0x4ff0d1){return _0x4ff0d1?{'count':_0x533fe2,'rows':_0x4ff0d1}:null;}})['then'](respondWithResult(_0x54c9f4,null))[_0x04ac('0x29')](handleError(_0x54c9f4,null));};exports[_0x04ac('0x5c')]=function(_0x523e25,_0x27c74d,_0x22c7fc){if(_0x523e25[_0x04ac('0x57')]['id']){delete _0x523e25[_0x04ac('0x57')]['id'];}return db[_0x04ac('0x39')][_0x04ac('0x5a')]({'where':{'id':_0x523e25[_0x04ac('0x53')]['id']}})[_0x04ac('0x1f')](handleEntityNotFound(_0x27c74d,null))[_0x04ac('0x1f')](function(_0x2310a7){if(_0x2310a7){_0x523e25[_0x04ac('0x57')][_0x04ac('0x5d')]=_0x2310a7['id'];_0x523e25[_0x04ac('0x57')][_0x04ac('0x5e')]=integrations[_0x04ac('0x5f')](_0x523e25[_0x04ac('0x57')][_0x04ac('0x60')],_0x523e25['body'][_0x04ac('0x3b')]);_0x523e25['body'][_0x04ac('0x61')]=integrations['getDescriptions'](_0x523e25[_0x04ac('0x57')][_0x04ac('0x60')],_0x523e25['body']['type']);return db[_0x04ac('0x5b')][_0x04ac('0x56')](_0x523e25[_0x04ac('0x57')],{'include':[{'model':db[_0x04ac('0x62')],'as':_0x04ac('0x5e')},{'model':db[_0x04ac('0x62')],'as':'Descriptions'}]});}return null;})[_0x04ac('0x1f')](respondWithResult(_0x27c74d,null))['catch'](handleError(_0x27c74d,null));};exports['getFields']=function(_0x1e6a7f,_0x4f77f5,_0x646276){var _0x5729f4=[_0x04ac('0x63'),_0x04ac('0x64'),'knowledge','subcategory',_0x04ac('0x65'),_0x04ac('0x66'),_0x04ac('0x67'),_0x04ac('0x68'),_0x04ac('0x69')];var _0x480f8d=[_0x04ac('0x6a'),_0x04ac('0x63'),_0x04ac('0x6b'),'watch_list',_0x04ac('0x6c'),_0x04ac('0x6d'),_0x04ac('0x6e'),_0x04ac('0x64'),'approval_history',_0x04ac('0x6f'),'resolved_by',_0x04ac('0x70'),'opened_by',_0x04ac('0x71'),_0x04ac('0x72'),'sys_domain',_0x04ac('0x73'),_0x04ac('0x74'),_0x04ac('0x75'),_0x04ac('0x47'),'calendar_stc','closed_at',_0x04ac('0x76'),_0x04ac('0x77'),_0x04ac('0x78'),_0x04ac('0x79'),_0x04ac('0x7a'),_0x04ac('0x7b'),'priority',_0x04ac('0x7c'),_0x04ac('0x7d'),'time_worked',_0x04ac('0x7e'),_0x04ac('0x7f'),_0x04ac('0x80'),_0x04ac('0x81'),'work_end',_0x04ac('0x82'),_0x04ac('0x83'),'caller_id',_0x04ac('0x84'),_0x04ac('0x85'),'work_notes',_0x04ac('0x86'),_0x04ac('0x65'),'correlation_display',_0x04ac('0x87'),_0x04ac('0x88'),_0x04ac('0x89'),_0x04ac('0x8a'),_0x04ac('0x8b'),_0x04ac('0x8c'),'calendar_duration',_0x04ac('0x66'),'sys_class_name',_0x04ac('0x8d'),_0x04ac('0x8e'),'follow_up',_0x04ac('0x8f'),'sys_id',_0x04ac('0x90'),_0x04ac('0x91'),_0x04ac('0x67'),_0x04ac('0x92'),_0x04ac('0x93'),'company','reassignment_count',_0x04ac('0x94'),'assigned_to',_0x04ac('0x68'),'comments',_0x04ac('0x95'),'approval',_0x04ac('0x96'),_0x04ac('0x97'),_0x04ac('0x98'),_0x04ac('0x99'),_0x04ac('0x9a'),_0x04ac('0x9b'),'upon_approval','correlation_id',_0x04ac('0x9c'),_0x04ac('0x69')];var _0x46e6b7='';var _0x5eca9d='';var _0x16d62f=[];var _0x5eeb08='';var _0x3c6420='';var _0x52ab5d=[];var _0x224f33='';var _0x328ef1='';var _0x2aabbd={};var _0x14b408='';return db[_0x04ac('0x39')][_0x04ac('0x5a')]({'where':{'id':_0x1e6a7f['params']['id']},'attributes':['id',_0x04ac('0x9d'),'password',_0x04ac('0x9e'),'remoteUri',_0x04ac('0x9f')]})['then'](handleEntityNotFound(_0x4f77f5,null))[_0x04ac('0x1f')](function(_0x48e319){if(_0x48e319){_0x14b408=_0x48e319[_0x04ac('0xa0')];var _0x3426c7=_0x14b408['slice'](-0x1);if(_0x3426c7==='/'){_0x14b408=_0x14b408[_0x04ac('0xa1')](0x0,_0x14b408[_0x04ac('0xa2')](_0x3426c7));}_0x328ef1=util['format'](_0x04ac('0xa3'),_0x14b408);_0x224f33=util[_0x04ac('0xa4')](_0x04ac('0xa5'),_0x14b408);_0x2aabbd={'user':_0x48e319[_0x04ac('0x9d')],'pass':_0x48e319[_0x04ac('0xa6')]};var _0x7f2805={'method':'GET','uri':_0x328ef1+_0x04ac('0xa7'),'auth':_0x2aabbd,'json':!![]};return rp(_0x7f2805);}})[_0x04ac('0x1f')](function(_0x165b38){if(_0x165b38['result'][_0x04ac('0x44')]>0x0){_0x46e6b7=_0x165b38[_0x04ac('0x28')];}console['log'](_0x04ac('0xa8'),_0x46e6b7);_0x52ab5d=[];_0x5eca9d=Object[_0x04ac('0xa9')]([],_0x46e6b7);_[_0x04ac('0xaa')](_0x5eca9d,function(_0x144306){return!_0x5729f4[_0x04ac('0xab')](_0x144306['name']);});_0x5eca9d['forEach'](function(_0x205e4b){var _0x2e692d=createFieldObject(_0x224f33,_0x2aabbd,_0x205e4b['internalType'],_0x205e4b[_0x04ac('0x35')],_0x205e4b[_0x04ac('0xac')],![]);_0x52ab5d['push'](_0x2e692d);});return Promise[_0x04ac('0xad')](_0x52ab5d);})[_0x04ac('0x1f')](function(_0x41acbf){_0x16d62f=_0x41acbf;_0x5eeb08=Object[_0x04ac('0xa9')]([],_0x46e6b7);console['log'](_0x04ac('0xae'),_0x46e6b7);_[_0x04ac('0xaa')](_0x5eeb08,function(_0x13942a){return _0x480f8d['includes'](_0x13942a[_0x04ac('0x35')]);});console[_0x04ac('0xaf')](_0x04ac('0xb0'),_0x5eeb08);_0x52ab5d=[];_0x5eeb08[_0x04ac('0xb1')](function(_0x5d0a97){var _0xa7959c=createFieldObject(_0x224f33,_0x2aabbd,_0x5d0a97['internalType'],_0x5d0a97[_0x04ac('0x35')],_0x5d0a97[_0x04ac('0xac')],!![]);_0x52ab5d[_0x04ac('0xb2')](_0xa7959c);});return Promise[_0x04ac('0xad')](_0x52ab5d);})[_0x04ac('0x1f')](function(_0x3e51b2){_0x3c6420=_0x3e51b2;var _0x2f70d1=_0x16d62f[_0x04ac('0xb3')](_0x3c6420);return{'count':_0x2f70d1[_0x04ac('0x44')],'rows':_0x2f70d1};})[_0x04ac('0x1f')](respondWithResult(_0x4f77f5,null))['catch'](function(_0x1ef099){console[_0x04ac('0xaf')](_0x04ac('0xb4')+_0x1ef099);var _0x50ddf2=_0x1e6a7f[_0x04ac('0x3e')][_0x04ac('0xb5')]?0x1f4:_0x1ef099['statusCode']||0x1f4;logger[_0x04ac('0x26')](_0x1ef099['stack']);delete _0x1ef099[_0x04ac('0x35')];if(_0x50ddf2===0x191){_0x50ddf2=0x190;}_0x4f77f5[_0x04ac('0x2c')](_0x50ddf2)['send'](_0x1e6a7f['query'][_0x04ac('0xb5')]?{'message':_0x04ac('0xb6'),'statusCode':_0x1ef099[_0x04ac('0xb7')]}:_0x1ef099);});};function createFieldObject(_0xedb186,_0x4bf2ea,_0x214169,_0x312c73,_0x59c389,_0x45d43b){return new Promise(function(_0x38587a,_0x16408d){var _0x23051e={'id':_0x312c73,'name':_0x59c389,'custom':_0x45d43b};if(_0x214169==='boolean'){_0x23051e[_0x04ac('0x4e')]=[{'name':_0x04ac('0xb8'),'value':_0x04ac('0xb9')},{'name':_0x04ac('0xba'),'value':_0x04ac('0xbb')}];_0x38587a(_0x23051e);}else{var _0x23896a={'method':'GET','uri':_0xedb186+_0x04ac('0xbc')+_0x312c73,'auth':_0x4bf2ea,'json':!![]};return rp(_0x23896a)[_0x04ac('0x1f')](function(_0x436f35){var _0x385717=[];if(_0x436f35[_0x04ac('0x28')]['length']>0x0){_0x436f35[_0x04ac('0x28')][_0x04ac('0xb1')](function(_0xc83c95){if(_0xc83c95['inactive']===_0x04ac('0xbb')){var _0x269394={'name':_0xc83c95[_0x04ac('0xac')],'value':_0xc83c95[_0x04ac('0xbd')]};_0x385717['push'](_0x269394);}});}_0x23051e[_0x04ac('0x4e')]=_0x385717;if(_0x23051e[_0x04ac('0x4e')]['length']>0x0){_0x38587a(_0x23051e);}else{if(_0x45d43b==![]){_0x38587a();}else{_0x38587a(_0x23051e);}}});}});}
\ No newline at end of file
diff --git a/server/api/intServicenowAccount/intServicenowAccount.model.js b/server/api/intServicenowAccount/intServicenowAccount.model.js
index 8c6ded7..84661b1 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 _0x0e85=['define','ServicenowAccount','int_servicenow_accounts','lodash','util','api','moment','rimraf','./intServicenowAccount.attributes','../../components/integrations/configuration','exports'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x0e85,0x7c));var _0x50e8=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x0e85[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x50e8('0x0'));var util=require(_0x50e8('0x1'));var logger=require('../../config/logger')(_0x50e8('0x2'));var moment=require(_0x50e8('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x50e8('0x4'));var config=require('../../config/environment');var attributes=require(_0x50e8('0x5'));var integrations=require(_0x50e8('0x6'));module[_0x50e8('0x7')]=function(_0xfde42,_0x5e8b01){return _0xfde42[_0x50e8('0x8')](_0x50e8('0x9'),attributes,{'tableName':_0x50e8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2d17=['ServicenowAccount','int_servicenow_accounts','lodash','util','api','moment','request-promise','path','../../config/environment','../../components/integrations/configuration'];(function(_0x3c6a7b,_0x5c561b){var _0x350944=function(_0x59a35b){while(--_0x59a35b){_0x3c6a7b['push'](_0x3c6a7b['shift']());}};_0x350944(++_0x5c561b);}(_0x2d17,0x17e));var _0x72d1=function(_0x4da74e,_0x50dbb3){_0x4da74e=_0x4da74e-0x0;var _0x2188cf=_0x2d17[_0x4da74e];return _0x2188cf;};'use strict';var _=require(_0x72d1('0x0'));var util=require(_0x72d1('0x1'));var logger=require('../../config/logger')(_0x72d1('0x2'));var moment=require(_0x72d1('0x3'));var BPromise=require('bluebird');var rp=require(_0x72d1('0x4'));var fs=require('fs');var path=require(_0x72d1('0x5'));var rimraf=require('rimraf');var config=require(_0x72d1('0x6'));var attributes=require('./intServicenowAccount.attributes');var integrations=require(_0x72d1('0x7'));module['exports']=function(_0x139ba0,_0x239d1f){return _0x139ba0['define'](_0x72d1('0x8'),attributes,{'tableName':_0x72d1('0x9'),'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 1c27cbd..0c4db7c 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 _0xb482=['rpc','../../config/environment','jayson/promise','client','http','request','then','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetServicenowAccount','ServicenowAccount','findAll','options','raw','where','attributes','limit','map','include','model','info','catch','ShowServicenowAccount','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x334841,_0x2bbc4c){var _0x5beb4b=function(_0x4bea72){while(--_0x4bea72){_0x334841['push'](_0x334841['shift']());}};_0x5beb4b(++_0x2bbc4c);}(_0xb482,0x94));var _0x2b48=function(_0x3aa6db,_0x19f196){_0x3aa6db=_0x3aa6db-0x0;var _0x33eee2=_0xb482[_0x3aa6db];return _0x33eee2;};'use strict';var _=require(_0x2b48('0x0'));var util=require(_0x2b48('0x1'));var moment=require('moment');var BPromise=require(_0x2b48('0x2'));var rs=require(_0x2b48('0x3'));var fs=require('fs');var Redis=require(_0x2b48('0x4'));var db=require(_0x2b48('0x5'))['db'];var utils=require(_0x2b48('0x6'));var logger=require(_0x2b48('0x7'))(_0x2b48('0x8'));var config=require(_0x2b48('0x9'));var jayson=require(_0x2b48('0xa'));var client=jayson[_0x2b48('0xb')][_0x2b48('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4a5683,_0x2e2590,_0x66637e){return new BPromise(function(_0x367c03,_0x122d76){return client[_0x2b48('0xd')](_0x4a5683,_0x66637e)[_0x2b48('0xe')](function(_0x3a974f){logger['info'](_0x2b48('0xf'),_0x2e2590,_0x2b48('0x10'));logger[_0x2b48('0x11')](_0x2b48('0x12'),_0x2e2590,_0x2b48('0x10'),JSON[_0x2b48('0x13')](_0x3a974f));if(_0x3a974f[_0x2b48('0x14')]){if(_0x3a974f['error'][_0x2b48('0x15')]===0x1f4){logger[_0x2b48('0x14')](_0x2b48('0xf'),_0x2e2590,_0x3a974f[_0x2b48('0x14')]['message']);return _0x122d76(_0x3a974f[_0x2b48('0x14')][_0x2b48('0x16')]);}logger['error'](_0x2b48('0xf'),_0x2e2590,_0x3a974f[_0x2b48('0x14')][_0x2b48('0x16')]);return _0x367c03(_0x3a974f[_0x2b48('0x14')]['message']);}else{logger['info']('ServicenowAccount,\x20%s,\x20%s',_0x2e2590,_0x2b48('0x10'));_0x367c03(_0x3a974f[_0x2b48('0x17')][_0x2b48('0x16')]);}})['catch'](function(_0x264151){logger['error'](_0x2b48('0xf'),_0x2e2590,_0x264151);_0x122d76(_0x264151);});});}exports[_0x2b48('0x18')]=function(_0x2b65e1){var _0x1c11b2=this;return new Promise(function(_0x1613b2,_0x6e643f){return db[_0x2b48('0x19')][_0x2b48('0x1a')]({'raw':_0x2b65e1[_0x2b48('0x1b')]?_0x2b65e1[_0x2b48('0x1b')][_0x2b48('0x1c')]===undefined?!![]:![]:!![],'where':_0x2b65e1['options']?_0x2b65e1[_0x2b48('0x1b')][_0x2b48('0x1d')]||null:null,'attributes':_0x2b65e1['options']?_0x2b65e1[_0x2b48('0x1b')][_0x2b48('0x1e')]||null:null,'limit':_0x2b65e1[_0x2b48('0x1b')]?_0x2b65e1['options'][_0x2b48('0x1f')]||null:null,'include':_0x2b65e1[_0x2b48('0x1b')]?_0x2b65e1['options']['include']?_[_0x2b48('0x20')](_0x2b65e1[_0x2b48('0x1b')][_0x2b48('0x21')],function(_0x119ca1){return{'model':db[_0x119ca1[_0x2b48('0x22')]],'as':_0x119ca1['as'],'attributes':_0x119ca1[_0x2b48('0x1e')],'include':_0x119ca1['include']?_[_0x2b48('0x20')](_0x119ca1['include'],function(_0x12248d){return{'model':db[_0x12248d['model']],'as':_0x12248d['as'],'attributes':_0x12248d[_0x2b48('0x1e')],'include':_0x12248d[_0x2b48('0x21')]?_[_0x2b48('0x20')](_0x12248d[_0x2b48('0x21')],function(_0x380a11){return{'model':db[_0x380a11[_0x2b48('0x22')]],'as':_0x380a11['as'],'attributes':_0x380a11[_0x2b48('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x2b48('0xe')](function(_0x581513){logger[_0x2b48('0x23')](_0x2b48('0x18'),_0x2b65e1);logger[_0x2b48('0x11')](_0x2b48('0x18'),_0x2b65e1,JSON[_0x2b48('0x13')](_0x581513));_0x1613b2(_0x581513);})[_0x2b48('0x24')](function(_0x5f5a05){logger[_0x2b48('0x14')](_0x2b48('0x18'),_0x5f5a05[_0x2b48('0x16')],_0x2b65e1);_0x6e643f(_0x1c11b2[_0x2b48('0x14')](0x1f4,_0x5f5a05[_0x2b48('0x16')]));});});};exports[_0x2b48('0x25')]=function(_0x1926a3){var _0x4d049b=this;return new Promise(function(_0x2564c5,_0x2cd9bb){return db[_0x2b48('0x19')][_0x2b48('0x26')]({'raw':_0x1926a3[_0x2b48('0x1b')]?_0x1926a3['options'][_0x2b48('0x1c')]===undefined?!![]:![]:!![],'where':_0x1926a3['options']?_0x1926a3['options'][_0x2b48('0x1d')]||null:null,'attributes':_0x1926a3[_0x2b48('0x1b')]?_0x1926a3[_0x2b48('0x1b')]['attributes']||null:null,'include':_0x1926a3[_0x2b48('0x1b')]?_0x1926a3[_0x2b48('0x1b')][_0x2b48('0x21')]?_['map'](_0x1926a3[_0x2b48('0x1b')]['include'],function(_0x8cafd5){return{'model':db[_0x8cafd5['model']],'as':_0x8cafd5['as'],'attributes':_0x8cafd5[_0x2b48('0x1e')],'include':_0x8cafd5[_0x2b48('0x21')]?_['map'](_0x8cafd5['include'],function(_0xa3a591){return{'model':db[_0xa3a591['model']],'as':_0xa3a591['as'],'attributes':_0xa3a591[_0x2b48('0x1e')],'include':_0xa3a591[_0x2b48('0x21')]?_['map'](_0xa3a591[_0x2b48('0x21')],function(_0x45a8a1){return{'model':db[_0x45a8a1[_0x2b48('0x22')]],'as':_0x45a8a1['as'],'attributes':_0x45a8a1['attributes']};}):[]};}):[]};}):[]:[]})[_0x2b48('0xe')](function(_0x419a62){logger[_0x2b48('0x23')](_0x2b48('0x25'),_0x1926a3);logger[_0x2b48('0x11')]('ShowServicenowAccount',_0x1926a3,JSON[_0x2b48('0x13')](_0x419a62));_0x2564c5(_0x419a62);})[_0x2b48('0x24')](function(_0x45b8ee){logger[_0x2b48('0x14')]('ShowServicenowAccount',_0x45b8ee[_0x2b48('0x16')],_0x1926a3);_0x2cd9bb(_0x4d049b['error'](0x1f4,_0x45b8ee[_0x2b48('0x16')]));});});};
\ No newline at end of file
+var _0x3a29=['message','info','request\x20sent','result','catch','options','raw','attributes','include','map','model','GetServicenowAccount','ShowServicenowAccount','ServicenowAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','ServicenowAccount,\x20%s,\x20%s','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x3bd26a,_0x37c34d){var _0x40a154=function(_0xf494c5){while(--_0xf494c5){_0x3bd26a['push'](_0x3bd26a['shift']());}};_0x40a154(++_0x37c34d);}(_0x3a29,0x185));var _0x93a2=function(_0x2fe6fa,_0x4f2c02){_0x2fe6fa=_0x2fe6fa-0x0;var _0x4fce31=_0x3a29[_0x2fe6fa];return _0x4fce31;};'use strict';var _=require(_0x93a2('0x0'));var util=require(_0x93a2('0x1'));var moment=require(_0x93a2('0x2'));var BPromise=require(_0x93a2('0x3'));var rs=require(_0x93a2('0x4'));var fs=require('fs');var Redis=require(_0x93a2('0x5'));var db=require(_0x93a2('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x93a2('0x7'))('rpc');var config=require(_0x93a2('0x8'));var jayson=require(_0x93a2('0x9'));var client=jayson[_0x93a2('0xa')][_0x93a2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3f0651,_0x49b305,_0x9332ea){return new BPromise(function(_0x265cd7,_0x3d9d51){return client[_0x93a2('0xc')](_0x3f0651,_0x9332ea)[_0x93a2('0xd')](function(_0x21d950){logger['info'](_0x93a2('0xe'),_0x49b305,'request\x20sent');logger[_0x93a2('0xf')](_0x93a2('0x10'),_0x49b305,'request\x20sent',JSON['stringify'](_0x21d950));if(_0x21d950['error']){if(_0x21d950[_0x93a2('0x11')][_0x93a2('0x12')]===0x1f4){logger[_0x93a2('0x11')](_0x93a2('0xe'),_0x49b305,_0x21d950[_0x93a2('0x11')][_0x93a2('0x13')]);return _0x3d9d51(_0x21d950['error']['message']);}logger[_0x93a2('0x11')](_0x93a2('0xe'),_0x49b305,_0x21d950[_0x93a2('0x11')][_0x93a2('0x13')]);return _0x265cd7(_0x21d950[_0x93a2('0x11')][_0x93a2('0x13')]);}else{logger[_0x93a2('0x14')](_0x93a2('0xe'),_0x49b305,_0x93a2('0x15'));_0x265cd7(_0x21d950[_0x93a2('0x16')][_0x93a2('0x13')]);}})[_0x93a2('0x17')](function(_0x362ec6){logger[_0x93a2('0x11')](_0x93a2('0xe'),_0x49b305,_0x362ec6);_0x3d9d51(_0x362ec6);});});}exports['GetServicenowAccount']=function(_0x4a33ba){var _0x3f86e2=this;return new Promise(function(_0x119cef,_0x10e923){return db['ServicenowAccount']['findAll']({'raw':_0x4a33ba[_0x93a2('0x18')]?_0x4a33ba['options'][_0x93a2('0x19')]===undefined?!![]:![]:!![],'where':_0x4a33ba[_0x93a2('0x18')]?_0x4a33ba['options']['where']||null:null,'attributes':_0x4a33ba['options']?_0x4a33ba['options'][_0x93a2('0x1a')]||null:null,'limit':_0x4a33ba[_0x93a2('0x18')]?_0x4a33ba['options']['limit']||null:null,'include':_0x4a33ba[_0x93a2('0x18')]?_0x4a33ba['options'][_0x93a2('0x1b')]?_['map'](_0x4a33ba[_0x93a2('0x18')][_0x93a2('0x1b')],function(_0x1946b8){return{'model':db[_0x1946b8['model']],'as':_0x1946b8['as'],'attributes':_0x1946b8['attributes'],'include':_0x1946b8[_0x93a2('0x1b')]?_[_0x93a2('0x1c')](_0x1946b8[_0x93a2('0x1b')],function(_0x39d422){return{'model':db[_0x39d422[_0x93a2('0x1d')]],'as':_0x39d422['as'],'attributes':_0x39d422[_0x93a2('0x1a')],'include':_0x39d422['include']?_[_0x93a2('0x1c')](_0x39d422[_0x93a2('0x1b')],function(_0x2ea1ee){return{'model':db[_0x2ea1ee[_0x93a2('0x1d')]],'as':_0x2ea1ee['as'],'attributes':_0x2ea1ee[_0x93a2('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x93a2('0xd')](function(_0x12c850){logger[_0x93a2('0x14')](_0x93a2('0x1e'),_0x4a33ba);logger['debug']('GetServicenowAccount',_0x4a33ba,JSON['stringify'](_0x12c850));_0x119cef(_0x12c850);})[_0x93a2('0x17')](function(_0x1318f8){logger[_0x93a2('0x11')](_0x93a2('0x1e'),_0x1318f8[_0x93a2('0x13')],_0x4a33ba);_0x10e923(_0x3f86e2[_0x93a2('0x11')](0x1f4,_0x1318f8[_0x93a2('0x13')]));});});};exports[_0x93a2('0x1f')]=function(_0x2fb730){var _0x39091f=this;return new Promise(function(_0x552685,_0x308bec){return db[_0x93a2('0x20')][_0x93a2('0x21')]({'raw':_0x2fb730[_0x93a2('0x18')]?_0x2fb730[_0x93a2('0x18')][_0x93a2('0x19')]===undefined?!![]:![]:!![],'where':_0x2fb730[_0x93a2('0x18')]?_0x2fb730[_0x93a2('0x18')]['where']||null:null,'attributes':_0x2fb730['options']?_0x2fb730[_0x93a2('0x18')][_0x93a2('0x1a')]||null:null,'include':_0x2fb730['options']?_0x2fb730[_0x93a2('0x18')][_0x93a2('0x1b')]?_[_0x93a2('0x1c')](_0x2fb730['options'][_0x93a2('0x1b')],function(_0x3d44d8){return{'model':db[_0x3d44d8[_0x93a2('0x1d')]],'as':_0x3d44d8['as'],'attributes':_0x3d44d8[_0x93a2('0x1a')],'include':_0x3d44d8[_0x93a2('0x1b')]?_[_0x93a2('0x1c')](_0x3d44d8['include'],function(_0xe76894){return{'model':db[_0xe76894[_0x93a2('0x1d')]],'as':_0xe76894['as'],'attributes':_0xe76894[_0x93a2('0x1a')],'include':_0xe76894[_0x93a2('0x1b')]?_[_0x93a2('0x1c')](_0xe76894[_0x93a2('0x1b')],function(_0x1fee0b){return{'model':db[_0x1fee0b['model']],'as':_0x1fee0b['as'],'attributes':_0x1fee0b['attributes']};}):[]};}):[]};}):[]:[]})[_0x93a2('0xd')](function(_0x5d6792){logger[_0x93a2('0x14')]('ShowServicenowAccount',_0x2fb730);logger[_0x93a2('0xf')]('ShowServicenowAccount',_0x2fb730,JSON['stringify'](_0x5d6792));_0x552685(_0x5d6792);})['catch'](function(_0x355685){logger[_0x93a2('0x11')](_0x93a2('0x1f'),_0x355685[_0x93a2('0x13')],_0x2fb730);_0x308bec(_0x39091f[_0x93a2('0x11')](0x1f4,_0x355685[_0x93a2('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/index.js b/server/api/intServicenowConfiguration/index.js
index f2a95bc..01c5df6 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 _0x0c61=['connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowConfiguration.controller','get','/:id','/:id/fields','isAuthenticated','getFields','/:id/subjects','getSubjects','getDescriptions','post','create','update','destroy','util','path'];(function(_0xb4422b,_0x1c837c){var _0x515398=function(_0xf423fd){while(--_0xf423fd){_0xb4422b['push'](_0xb4422b['shift']());}};_0x515398(++_0x1c837c);}(_0x0c61,0x76));var _0x10c6=function(_0x5e1e25,_0xdc1421){_0x5e1e25=_0x5e1e25-0x0;var _0x548e5f=_0x0c61[_0x5e1e25];return _0x548e5f;};'use strict';var multer=require('multer');var util=require(_0x10c6('0x0'));var path=require(_0x10c6('0x1'));var timeout=require(_0x10c6('0x2'));var express=require(_0x10c6('0x3'));var router=express['Router']();var auth=require(_0x10c6('0x4'));var interaction=require(_0x10c6('0x5'));var config=require(_0x10c6('0x6'));var controller=require(_0x10c6('0x7'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x10c6('0x8')](_0x10c6('0x9'),auth['isAuthenticated'](),controller['show']);router['get'](_0x10c6('0xa'),auth[_0x10c6('0xb')](),controller[_0x10c6('0xc')]);router[_0x10c6('0x8')](_0x10c6('0xd'),auth[_0x10c6('0xb')](),controller[_0x10c6('0xe')]);router[_0x10c6('0x8')]('/:id/descriptions',auth[_0x10c6('0xb')](),controller[_0x10c6('0xf')]);router[_0x10c6('0x10')]('/',auth[_0x10c6('0xb')](),controller[_0x10c6('0x11')]);router['put']('/:id',auth[_0x10c6('0xb')](),controller[_0x10c6('0x12')]);router['delete'](_0x10c6('0x9'),auth[_0x10c6('0xb')](),controller[_0x10c6('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xd645=['../../components/auth/service','../../config/environment','./intServicenowConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','multer','path','connect-timeout','Router'];(function(_0x45ba3d,_0x5c9be4){var _0x359ea6=function(_0x3c9da1){while(--_0x3c9da1){_0x45ba3d['push'](_0x45ba3d['shift']());}};_0x359ea6(++_0x5c9be4);}(_0xd645,0xcb));var _0x5d64=function(_0x40aa25,_0x5b92d1){_0x40aa25=_0x40aa25-0x0;var _0x43f972=_0xd645[_0x40aa25];return _0x43f972;};'use strict';var multer=require(_0x5d64('0x0'));var util=require('util');var path=require(_0x5d64('0x1'));var timeout=require(_0x5d64('0x2'));var express=require('express');var router=express[_0x5d64('0x3')]();var auth=require(_0x5d64('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x5d64('0x5'));var controller=require(_0x5d64('0x6'));router[_0x5d64('0x7')]('/',auth[_0x5d64('0x8')](),controller[_0x5d64('0x9')]);router['get'](_0x5d64('0xa'),auth[_0x5d64('0x8')](),controller[_0x5d64('0xb')]);router[_0x5d64('0x7')](_0x5d64('0xc'),auth[_0x5d64('0x8')](),controller[_0x5d64('0xd')]);router['get']('/:id/subjects',auth['isAuthenticated'](),controller[_0x5d64('0xe')]);router[_0x5d64('0x7')](_0x5d64('0xf'),auth[_0x5d64('0x8')](),controller[_0x5d64('0x10')]);router[_0x5d64('0x11')]('/',auth['isAuthenticated'](),controller[_0x5d64('0x12')]);router[_0x5d64('0x13')]('/:id',auth[_0x5d64('0x8')](),controller[_0x5d64('0x14')]);router[_0x5d64('0x15')](_0x5d64('0xa'),auth[_0x5d64('0x8')](),controller[_0x5d64('0x16')]);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 e2f3aa1..29e6f26 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 _0x4585=['STRING','sequelize','exports'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x4585,0x12a));var _0x5458=function(_0x178e48,_0x3c9509){_0x178e48=_0x178e48-0x0;var _0x440d7e=_0x4585[_0x178e48];return _0x440d7e;};'use strict';var Sequelize=require(_0x5458('0x0'));module[_0x5458('0x1')]={'name':{'type':Sequelize[_0x5458('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xa0b2=['sequelize','exports','STRING'];(function(_0x562463,_0x28c932){var _0x1430d7=function(_0x3a9cb9){while(--_0x3a9cb9){_0x562463['push'](_0x562463['shift']());}};_0x1430d7(++_0x28c932);}(_0xa0b2,0xea));var _0x2a0b=function(_0x53b8e0,_0x55d46e){_0x53b8e0=_0x53b8e0-0x0;var _0x10630c=_0xa0b2[_0x53b8e0];return _0x10630c;};'use strict';var Sequelize=require(_0x2a0b('0x0'));module[_0x2a0b('0x1')]={'name':{'type':Sequelize[_0x2a0b('0x2')]},'description':{'type':Sequelize[_0x2a0b('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js
index 88427f9..9b028bc 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 _0x9d4e=['squel','crypto','jsforce','to-csv','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','jayson/promise','client','http','test','Sequelize','ValidationError','request','info','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','end','status','count','offset','limit','set','Content-Range','json','apply','then','destroy','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','options','ServicenowConfiguration','includeAll','include','findAll','rows','show','params','length','find','create','body','update','findOne','getFields','ServicenowField','getSubjects','getDescriptions','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','util','sox','ejs','lodash'];(function(_0xe898d4,_0x2d3187){var _0x124698=function(_0x352a8e){while(--_0x352a8e){_0xe898d4['push'](_0xe898d4['shift']());}};_0x124698(++_0x2d3187);}(_0x9d4e,0x104));var _0xe9d4=function(_0x3a8db5,_0x31cff7){_0x3a8db5=_0x3a8db5-0x0;var _0x2c03cd=_0x9d4e[_0x3a8db5];return _0x2c03cd;};'use strict';var pdf=require(_0xe9d4('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xe9d4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe9d4('0x2'));var rp=require(_0xe9d4('0x3'));var moment=require(_0xe9d4('0x4'));var BPromise=require(_0xe9d4('0x5'));var Mustache=require('mustache');var util=require(_0xe9d4('0x6'));var path=require('path');var sox=require(_0xe9d4('0x7'));var csv=require('to-csv');var ejs=require(_0xe9d4('0x8'));var fs=require('fs');var _=require(_0xe9d4('0x9'));var squel=require(_0xe9d4('0xa'));var crypto=require(_0xe9d4('0xb'));var jsforce=require(_0xe9d4('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xe9d4('0xd'));var querystring=require(_0xe9d4('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xe9d4('0xf'));var qs=require(_0xe9d4('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe9d4('0x11'));var logger=require(_0xe9d4('0x12'))(_0xe9d4('0x13'));var utils=require('../../config/utils');var config=require(_0xe9d4('0x14'));var db=require('../../mysqldb')['db'];var jayson=require(_0xe9d4('0x15'));var client=jayson[_0xe9d4('0x16')][_0xe9d4('0x17')]({'port':0x232a});function checkPasswordPattern(_0x9191f6,_0xab0a48,_0x3546c0){if(_0x3546c0){var _0x52d5f8=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x52d5f8[_0xe9d4('0x18')](_0xab0a48)){return _0x9191f6;}else{throw new db[(_0xe9d4('0x19'))][(_0xe9d4('0x1a'))]('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 _0x9191f6;}}function respondWithRpcPromise(_0xc5fcb3,_0x568b46,_0x21cc7d,_0x2e1262){return new BPromise(function(_0x182a60,_0x544e37){var _0x3e97e9=_0x2e1262||client;return _0x3e97e9[_0xe9d4('0x1b')](_0xc5fcb3,_0x21cc7d)['then'](function(_0x877356){logger[_0xe9d4('0x1c')](_0xe9d4('0x1d'),_0x568b46,_0xe9d4('0x1e'));logger['debug']('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x568b46,_0xe9d4('0x1e'),JSON[_0xe9d4('0x1f')](_0x877356));if(_0x877356[_0xe9d4('0x20')]){if(_0x877356[_0xe9d4('0x20')][_0xe9d4('0x21')]===0x1f4){logger['error'](_0xe9d4('0x1d'),_0x568b46,_0x877356[_0xe9d4('0x20')]['message']);return _0x544e37(_0x877356[_0xe9d4('0x20')][_0xe9d4('0x22')]);}logger['error']('ServicenowConfiguration,\x20%s,\x20%s',_0x568b46,_0x877356[_0xe9d4('0x20')][_0xe9d4('0x22')]);return _0x182a60(_0x877356[_0xe9d4('0x20')][_0xe9d4('0x22')]);}else{logger[_0xe9d4('0x1c')]('ServicenowConfiguration,\x20%s,\x20%s',_0x568b46,_0xe9d4('0x1e'));_0x182a60(_0x877356[_0xe9d4('0x23')][_0xe9d4('0x22')]);}})[_0xe9d4('0x24')](function(_0x29b082){logger[_0xe9d4('0x20')](_0xe9d4('0x1d'),_0x568b46,_0x29b082);_0x544e37(_0x29b082);});});}function respondWithStatusCode(_0x3fcf5e,_0x47eae7){_0x47eae7=_0x47eae7||0xcc;return function(_0x144d02){if(_0x144d02){return _0x3fcf5e[_0xe9d4('0x25')](_0x47eae7);}return _0x3fcf5e['status'](_0x47eae7)[_0xe9d4('0x26')]();};}function respondWithResult(_0x1b2e67,_0x52ea91){_0x52ea91=_0x52ea91||0xc8;return function(_0x40eb93){if(_0x40eb93){return _0x1b2e67[_0xe9d4('0x27')](_0x52ea91)['json'](_0x40eb93);}};}function respondWithFilteredResult(_0x1e3dd6,_0x548595){return function(_0x2069cb){if(_0x2069cb){var _0x4a0bc9=_0x2069cb[_0xe9d4('0x28')],_0x1ff0d6=_0x548595[_0xe9d4('0x29')],_0x334ccc=_0x548595[_0xe9d4('0x29')]+_0x548595[_0xe9d4('0x2a')],_0x31e01c;if(_0x334ccc>=_0x4a0bc9){_0x334ccc=_0x4a0bc9;_0x31e01c=0xc8;}else{_0x31e01c=0xce;}_0x1e3dd6['status'](_0x31e01c);return _0x1e3dd6[_0xe9d4('0x2b')](_0xe9d4('0x2c'),_0x1ff0d6+'-'+_0x334ccc+'/'+_0x4a0bc9)[_0xe9d4('0x2d')](_0x2069cb);}return null;};}function patchUpdates(_0xc363c4){return function(_0x2bafed){try{jsonpatch[_0xe9d4('0x2e')](_0x2bafed,_0xc363c4,!![]);}catch(_0x280dcb){return BPromise['reject'](_0x280dcb);}return _0x2bafed['save']();};}function saveUpdates(_0x8462d9,_0x5b733a){return function(_0x59f750){if(_0x59f750){return _0x59f750['update'](_0x8462d9)[_0xe9d4('0x2f')](function(_0x1ba520){return _0x1ba520;});}return null;};}function removeEntity(_0xeadcb9,_0x16b059){return function(_0x455b71){if(_0x455b71){return _0x455b71[_0xe9d4('0x30')]()['then'](function(){_0xeadcb9['status'](0xcc)[_0xe9d4('0x26')]();});}};}function handleEntityNotFound(_0x2588ac,_0x23f440){return function(_0x20c81b){if(!_0x20c81b){_0x2588ac['sendStatus'](0x194);}return _0x20c81b;};}function handleError(_0x54f011,_0x133699){_0x133699=_0x133699||0x1f4;return function(_0x45472e){logger[_0xe9d4('0x20')](_0x45472e[_0xe9d4('0x31')]);if(_0x45472e[_0xe9d4('0x32')]){delete _0x45472e[_0xe9d4('0x32')];}_0x54f011[_0xe9d4('0x27')](_0x133699)[_0xe9d4('0x33')](_0x45472e);};}exports['index']=function(_0x267a6e,_0x7a746b){var _0x5a7905={},_0x3ed8a8={},_0x1029b7={'count':0x0,'rows':[]};var _0x3ca31b=_[_0xe9d4('0x34')](db['ServicenowConfiguration'][_0xe9d4('0x35')],function(_0x2124b0){return{'name':_0x2124b0[_0xe9d4('0x36')],'type':_0x2124b0[_0xe9d4('0x37')][_0xe9d4('0x38')]};});_0x3ed8a8[_0xe9d4('0x39')]=_[_0xe9d4('0x34')](_0x3ca31b,'name');_0x3ed8a8[_0xe9d4('0x3a')]=_[_0xe9d4('0x3b')](_0x267a6e[_0xe9d4('0x3a')]);_0x3ed8a8['filters']=_[_0xe9d4('0x3c')](_0x3ed8a8[_0xe9d4('0x39')],_0x3ed8a8[_0xe9d4('0x3a')]);_0x5a7905['attributes']=_[_0xe9d4('0x3c')](_0x3ed8a8[_0xe9d4('0x39')],qs['fields'](_0x267a6e[_0xe9d4('0x3a')][_0xe9d4('0x3d')]));_0x5a7905[_0xe9d4('0x3e')]=_0x5a7905[_0xe9d4('0x3e')]['length']?_0x5a7905[_0xe9d4('0x3e')]:_0x3ed8a8[_0xe9d4('0x39')];if(!_0x267a6e['query'][_0xe9d4('0x3f')](_0xe9d4('0x40'))){_0x5a7905['limit']=qs[_0xe9d4('0x2a')](_0x267a6e[_0xe9d4('0x3a')][_0xe9d4('0x2a')]);_0x5a7905['offset']=qs['offset'](_0x267a6e['query'][_0xe9d4('0x29')]);}_0x5a7905[_0xe9d4('0x41')]=qs[_0xe9d4('0x42')](_0x267a6e[_0xe9d4('0x3a')]['sort']);_0x5a7905['where']=qs[_0xe9d4('0x43')](_[_0xe9d4('0x44')](_0x267a6e[_0xe9d4('0x3a')],_0x3ed8a8['filters']));if(_0x267a6e[_0xe9d4('0x3a')][_0xe9d4('0x45')]){_0x5a7905[_0xe9d4('0x46')]=_[_0xe9d4('0x47')](_0x5a7905[_0xe9d4('0x46')],{'$or':_[_0xe9d4('0x34')](_0x3ca31b,function(_0x43300e){if(_0x43300e[_0xe9d4('0x37')]!=='VIRTUAL'){var _0x21f931={};_0x21f931[_0x43300e[_0xe9d4('0x32')]]={'$like':'%'+_0x267a6e['query'][_0xe9d4('0x45')]+'%'};return _0x21f931;}})});}_0x5a7905=_[_0xe9d4('0x47')]({},_0x5a7905,_0x267a6e[_0xe9d4('0x48')]);var _0x448fe2={'where':_0x5a7905[_0xe9d4('0x46')]};return db[_0xe9d4('0x49')][_0xe9d4('0x28')](_0x448fe2)[_0xe9d4('0x2f')](function(_0x30b3bd){_0x1029b7[_0xe9d4('0x28')]=_0x30b3bd;if(_0x267a6e[_0xe9d4('0x3a')][_0xe9d4('0x4a')]){_0x5a7905[_0xe9d4('0x4b')]=[{'all':!![]}];}return db['ServicenowConfiguration'][_0xe9d4('0x4c')](_0x5a7905);})[_0xe9d4('0x2f')](function(_0x2e5f6a){_0x1029b7[_0xe9d4('0x4d')]=_0x2e5f6a;return _0x1029b7;})['then'](respondWithFilteredResult(_0x7a746b,_0x5a7905))['catch'](handleError(_0x7a746b,null));};exports[_0xe9d4('0x4e')]=function(_0x3d1a6e,_0x53412e){var _0xfbd5d={'raw':![],'where':{'id':_0x3d1a6e[_0xe9d4('0x4f')]['id']}},_0x1cf82c={};_0x1cf82c[_0xe9d4('0x39')]=_[_0xe9d4('0x3b')](db['ServicenowConfiguration'][_0xe9d4('0x35')]);_0x1cf82c['query']=_[_0xe9d4('0x3b')](_0x3d1a6e[_0xe9d4('0x3a')]);_0x1cf82c[_0xe9d4('0x43')]=_[_0xe9d4('0x3c')](_0x1cf82c[_0xe9d4('0x39')],_0x1cf82c['query']);_0xfbd5d['attributes']=_[_0xe9d4('0x3c')](_0x1cf82c['model'],qs[_0xe9d4('0x3d')](_0x3d1a6e[_0xe9d4('0x3a')][_0xe9d4('0x3d')]));_0xfbd5d[_0xe9d4('0x3e')]=_0xfbd5d[_0xe9d4('0x3e')][_0xe9d4('0x50')]?_0xfbd5d['attributes']:_0x1cf82c[_0xe9d4('0x39')];if(_0x3d1a6e[_0xe9d4('0x3a')][_0xe9d4('0x4a')]){_0xfbd5d[_0xe9d4('0x4b')]=[{'all':!![]}];}_0xfbd5d=_[_0xe9d4('0x47')]({},_0xfbd5d,_0x3d1a6e[_0xe9d4('0x48')]);return db[_0xe9d4('0x49')][_0xe9d4('0x51')](_0xfbd5d)[_0xe9d4('0x2f')](handleEntityNotFound(_0x53412e,null))[_0xe9d4('0x2f')](respondWithResult(_0x53412e,null))[_0xe9d4('0x24')](handleError(_0x53412e,null));};exports['create']=function(_0x2e26a3,_0x11abe9){return db['ServicenowConfiguration'][_0xe9d4('0x52')](_0x2e26a3[_0xe9d4('0x53')],{})[_0xe9d4('0x2f')](respondWithResult(_0x11abe9,0xc9))['catch'](handleError(_0x11abe9,null));};exports[_0xe9d4('0x54')]=function(_0xeeef6d,_0x5d1bc0){if(_0xeeef6d[_0xe9d4('0x53')]['id']){delete _0xeeef6d['body']['id'];}return db[_0xe9d4('0x49')]['find']({'where':{'id':_0xeeef6d[_0xe9d4('0x4f')]['id']}})['then'](handleEntityNotFound(_0x5d1bc0,null))[_0xe9d4('0x2f')](saveUpdates(_0xeeef6d[_0xe9d4('0x53')],null))['then'](respondWithResult(_0x5d1bc0,null))[_0xe9d4('0x24')](handleError(_0x5d1bc0,null));};exports[_0xe9d4('0x30')]=function(_0x1a93f6,_0x1b44b3){return db[_0xe9d4('0x49')][_0xe9d4('0x51')]({'where':{'id':_0x1a93f6['params']['id']}})[_0xe9d4('0x2f')](handleEntityNotFound(_0x1b44b3,null))[_0xe9d4('0x2f')](removeEntity(_0x1b44b3,null))['catch'](handleError(_0x1b44b3,null));};exports['getFields']=function(_0x35352f,_0x45cbec,_0x27ab60){var _0x242af9={};var _0x4b783d={};var _0x4cac94;var _0x3cb8f7;return db[_0xe9d4('0x49')][_0xe9d4('0x55')]({'where':{'id':_0x35352f[_0xe9d4('0x4f')]['id']}})['then'](handleEntityNotFound(_0x45cbec,null))['then'](function(_0x4c423a){if(_0x4c423a){_0x4cac94=_0x4c423a;_0x4b783d[_0xe9d4('0x39')]=_[_0xe9d4('0x3b')](db['ServicenowField']['rawAttributes']);_0x4b783d[_0xe9d4('0x3a')]=_[_0xe9d4('0x3b')](_0x35352f[_0xe9d4('0x3a')]);_0x4b783d[_0xe9d4('0x43')]=_['intersection'](_0x4b783d[_0xe9d4('0x39')],_0x4b783d[_0xe9d4('0x3a')]);_0x242af9[_0xe9d4('0x3e')]=_[_0xe9d4('0x3c')](_0x4b783d[_0xe9d4('0x39')],qs[_0xe9d4('0x3d')](_0x35352f[_0xe9d4('0x3a')][_0xe9d4('0x3d')]));_0x242af9[_0xe9d4('0x3e')]=_0x242af9[_0xe9d4('0x3e')]['length']?_0x242af9[_0xe9d4('0x3e')]:_0x4b783d[_0xe9d4('0x39')];_0x242af9['order']=qs['sort'](_0x35352f[_0xe9d4('0x3a')][_0xe9d4('0x42')]);_0x242af9[_0xe9d4('0x46')]=qs[_0xe9d4('0x43')](_[_0xe9d4('0x44')](_0x35352f[_0xe9d4('0x3a')],_0x4b783d['filters']));if(_0x35352f[_0xe9d4('0x3a')][_0xe9d4('0x45')]){_0x242af9[_0xe9d4('0x46')]=_[_0xe9d4('0x47')](_0x242af9[_0xe9d4('0x46')],{'$or':_[_0xe9d4('0x34')](_0x242af9[_0xe9d4('0x3e')],function(_0x529c64){var _0x41f5f6={};_0x41f5f6[_0x529c64]={'$like':'%'+_0x35352f[_0xe9d4('0x3a')][_0xe9d4('0x45')]+'%'};return _0x41f5f6;})});}_0x242af9=_[_0xe9d4('0x47')]({},_0x242af9,_0x35352f['options']);return _0x4cac94[_0xe9d4('0x56')](_0x242af9);}})[_0xe9d4('0x2f')](function(_0x497bba){if(_0x497bba){_0x3cb8f7=_0x497bba[_0xe9d4('0x50')];if(!_0x35352f[_0xe9d4('0x3a')][_0xe9d4('0x3f')](_0xe9d4('0x40'))){_0x242af9['limit']=qs[_0xe9d4('0x2a')](_0x35352f[_0xe9d4('0x3a')][_0xe9d4('0x2a')]);_0x242af9[_0xe9d4('0x29')]=qs[_0xe9d4('0x29')](_0x35352f[_0xe9d4('0x3a')]['offset']);}return _0x4cac94[_0xe9d4('0x56')](_0x242af9);}})['then'](function(_0x3f1ca1){if(_0x3f1ca1){return _0x3f1ca1?{'count':_0x3cb8f7,'rows':_0x3f1ca1}:null;}})[_0xe9d4('0x2f')](respondWithResult(_0x45cbec,null))[_0xe9d4('0x24')](handleError(_0x45cbec,null));};exports['getSubjects']=function(_0x4ec33e,_0x404b63,_0x1dbaef){var _0xfb0e6f={};var _0x4e6218={};var _0x5acef1;var _0x1fd610;return db[_0xe9d4('0x49')][_0xe9d4('0x55')]({'where':{'id':_0x4ec33e[_0xe9d4('0x4f')]['id']}})[_0xe9d4('0x2f')](handleEntityNotFound(_0x404b63,null))['then'](function(_0x48ec6a){if(_0x48ec6a){_0x5acef1=_0x48ec6a;_0x4e6218['model']=_[_0xe9d4('0x3b')](db[_0xe9d4('0x57')][_0xe9d4('0x35')]);_0x4e6218['query']=_[_0xe9d4('0x3b')](_0x4ec33e[_0xe9d4('0x3a')]);_0x4e6218[_0xe9d4('0x43')]=_['intersection'](_0x4e6218['model'],_0x4e6218[_0xe9d4('0x3a')]);_0xfb0e6f['attributes']=_[_0xe9d4('0x3c')](_0x4e6218[_0xe9d4('0x39')],qs[_0xe9d4('0x3d')](_0x4ec33e[_0xe9d4('0x3a')][_0xe9d4('0x3d')]));_0xfb0e6f['attributes']=_0xfb0e6f[_0xe9d4('0x3e')][_0xe9d4('0x50')]?_0xfb0e6f['attributes']:_0x4e6218[_0xe9d4('0x39')];_0xfb0e6f['order']=qs[_0xe9d4('0x42')](_0x4ec33e['query']['sort']);_0xfb0e6f['where']=qs[_0xe9d4('0x43')](_[_0xe9d4('0x44')](_0x4ec33e[_0xe9d4('0x3a')],_0x4e6218[_0xe9d4('0x43')]));if(_0x4ec33e[_0xe9d4('0x3a')][_0xe9d4('0x45')]){_0xfb0e6f[_0xe9d4('0x46')]=_[_0xe9d4('0x47')](_0xfb0e6f[_0xe9d4('0x46')],{'$or':_[_0xe9d4('0x34')](_0xfb0e6f[_0xe9d4('0x3e')],function(_0x37a823){var _0x539653={};_0x539653[_0x37a823]={'$like':'%'+_0x4ec33e['query']['filter']+'%'};return _0x539653;})});}_0xfb0e6f=_[_0xe9d4('0x47')]({},_0xfb0e6f,_0x4ec33e[_0xe9d4('0x48')]);return _0x5acef1[_0xe9d4('0x58')](_0xfb0e6f);}})[_0xe9d4('0x2f')](function(_0xd4f331){if(_0xd4f331){_0x1fd610=_0xd4f331[_0xe9d4('0x50')];if(!_0x4ec33e[_0xe9d4('0x3a')][_0xe9d4('0x3f')](_0xe9d4('0x40'))){_0xfb0e6f['limit']=qs['limit'](_0x4ec33e[_0xe9d4('0x3a')][_0xe9d4('0x2a')]);_0xfb0e6f['offset']=qs[_0xe9d4('0x29')](_0x4ec33e[_0xe9d4('0x3a')][_0xe9d4('0x29')]);}return _0x5acef1['getSubjects'](_0xfb0e6f);}})[_0xe9d4('0x2f')](function(_0x216778){if(_0x216778){return _0x216778?{'count':_0x1fd610,'rows':_0x216778}:null;}})[_0xe9d4('0x2f')](respondWithResult(_0x404b63,null))[_0xe9d4('0x24')](handleError(_0x404b63,null));};exports[_0xe9d4('0x59')]=function(_0x2e1eec,_0x4d93b4,_0x4098da){var _0x1e6b69={};var _0x1ebd04={};var _0x488eb2;var _0x37fba7;return db[_0xe9d4('0x49')]['findOne']({'where':{'id':_0x2e1eec[_0xe9d4('0x4f')]['id']}})[_0xe9d4('0x2f')](handleEntityNotFound(_0x4d93b4,null))[_0xe9d4('0x2f')](function(_0x19d5c8){if(_0x19d5c8){_0x488eb2=_0x19d5c8;_0x1ebd04[_0xe9d4('0x39')]=_[_0xe9d4('0x3b')](db[_0xe9d4('0x57')][_0xe9d4('0x35')]);_0x1ebd04[_0xe9d4('0x3a')]=_[_0xe9d4('0x3b')](_0x2e1eec[_0xe9d4('0x3a')]);_0x1ebd04[_0xe9d4('0x43')]=_[_0xe9d4('0x3c')](_0x1ebd04[_0xe9d4('0x39')],_0x1ebd04['query']);_0x1e6b69[_0xe9d4('0x3e')]=_[_0xe9d4('0x3c')](_0x1ebd04[_0xe9d4('0x39')],qs[_0xe9d4('0x3d')](_0x2e1eec[_0xe9d4('0x3a')]['fields']));_0x1e6b69[_0xe9d4('0x3e')]=_0x1e6b69[_0xe9d4('0x3e')][_0xe9d4('0x50')]?_0x1e6b69[_0xe9d4('0x3e')]:_0x1ebd04[_0xe9d4('0x39')];_0x1e6b69[_0xe9d4('0x41')]=qs[_0xe9d4('0x42')](_0x2e1eec[_0xe9d4('0x3a')][_0xe9d4('0x42')]);_0x1e6b69[_0xe9d4('0x46')]=qs[_0xe9d4('0x43')](_[_0xe9d4('0x44')](_0x2e1eec[_0xe9d4('0x3a')],_0x1ebd04[_0xe9d4('0x43')]));if(_0x2e1eec[_0xe9d4('0x3a')][_0xe9d4('0x45')]){_0x1e6b69['where']=_[_0xe9d4('0x47')](_0x1e6b69['where'],{'$or':_['map'](_0x1e6b69[_0xe9d4('0x3e')],function(_0x195a77){var _0x515cbc={};_0x515cbc[_0x195a77]={'$like':'%'+_0x2e1eec[_0xe9d4('0x3a')][_0xe9d4('0x45')]+'%'};return _0x515cbc;})});}_0x1e6b69=_['merge']({},_0x1e6b69,_0x2e1eec[_0xe9d4('0x48')]);return _0x488eb2['getDescriptions'](_0x1e6b69);}})[_0xe9d4('0x2f')](function(_0x5c27fa){if(_0x5c27fa){_0x37fba7=_0x5c27fa[_0xe9d4('0x50')];if(!_0x2e1eec[_0xe9d4('0x3a')][_0xe9d4('0x3f')](_0xe9d4('0x40'))){_0x1e6b69[_0xe9d4('0x2a')]=qs['limit'](_0x2e1eec['query']['limit']);_0x1e6b69[_0xe9d4('0x29')]=qs[_0xe9d4('0x29')](_0x2e1eec[_0xe9d4('0x3a')][_0xe9d4('0x29')]);}return _0x488eb2[_0xe9d4('0x59')](_0x1e6b69);}})['then'](function(_0x317cdc){if(_0x317cdc){return _0x317cdc?{'count':_0x37fba7,'rows':_0x317cdc}:null;}})[_0xe9d4('0x2f')](respondWithResult(_0x4d93b4,null))['catch'](handleError(_0x4d93b4,null));};
\ No newline at end of file
+var _0x2214=['error','code','message','info','result','catch','status','end','count','offset','json','reject','save','update','then','sendStatus','stack','name','send','index','ServicenowConfiguration','rawAttributes','type','key','model','map','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','params','find','create','body','destroy','getFields','findOne','ServicenowField','getSubjects','getDescriptions','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','ejs','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','jayson/promise','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s'];(function(_0x539fb2,_0x5b6718){var _0x4d583d=function(_0x55fa69){while(--_0x55fa69){_0x539fb2['push'](_0x539fb2['shift']());}};_0x4d583d(++_0x5b6718);}(_0x2214,0xf7));var _0x4221=function(_0x49e1f5,_0x951f5f){_0x49e1f5=_0x49e1f5-0x0;var _0x14a6d6=_0x2214[_0x49e1f5];return _0x14a6d6;};'use strict';var pdf=require(_0x4221('0x0'));var emlformat=require(_0x4221('0x1'));var rimraf=require(_0x4221('0x2'));var zipdir=require(_0x4221('0x3'));var jsonpatch=require(_0x4221('0x4'));var rp=require(_0x4221('0x5'));var moment=require(_0x4221('0x6'));var BPromise=require(_0x4221('0x7'));var Mustache=require(_0x4221('0x8'));var util=require('util');var path=require(_0x4221('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x4221('0xa'));var fs=require('fs');var _=require(_0x4221('0xb'));var squel=require(_0x4221('0xc'));var crypto=require(_0x4221('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x4221('0xe'));var toCsv=require(_0x4221('0xf'));var querystring=require(_0x4221('0x10'));var Papa=require(_0x4221('0x11'));var Redis=require(_0x4221('0x12'));var authService=require(_0x4221('0x13'));var qs=require(_0x4221('0x14'));var as=require(_0x4221('0x15'));var hardwareService=require(_0x4221('0x16'));var logger=require(_0x4221('0x17'))(_0x4221('0x18'));var utils=require(_0x4221('0x19'));var config=require(_0x4221('0x1a'));var db=require('../../mysqldb')['db'];var jayson=require(_0x4221('0x1b'));var client=jayson['client'][_0x4221('0x1c')]({'port':0x232a});function checkPasswordPattern(_0x2405bc,_0x4992f3,_0x11a9b0){if(_0x11a9b0){var _0x89d4e1=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x89d4e1[_0x4221('0x1d')](_0x4992f3)){return _0x2405bc;}else{throw new db[(_0x4221('0x1e'))][(_0x4221('0x1f'))](_0x4221('0x20'));}}else{return _0x2405bc;}}function respondWithRpcPromise(_0xb22699,_0x3a0c0d,_0x550cde,_0x1fc89a){return new BPromise(function(_0x35bf1d,_0x5dab0c){var _0x4341ad=_0x1fc89a||client;return _0x4341ad[_0x4221('0x21')](_0xb22699,_0x550cde)['then'](function(_0x2bcf16){logger['info'](_0x4221('0x22'),_0x3a0c0d,_0x4221('0x23'));logger[_0x4221('0x24')](_0x4221('0x25'),_0x3a0c0d,_0x4221('0x23'),JSON['stringify'](_0x2bcf16));if(_0x2bcf16[_0x4221('0x26')]){if(_0x2bcf16[_0x4221('0x26')][_0x4221('0x27')]===0x1f4){logger[_0x4221('0x26')](_0x4221('0x22'),_0x3a0c0d,_0x2bcf16[_0x4221('0x26')][_0x4221('0x28')]);return _0x5dab0c(_0x2bcf16[_0x4221('0x26')][_0x4221('0x28')]);}logger[_0x4221('0x26')](_0x4221('0x22'),_0x3a0c0d,_0x2bcf16['error']['message']);return _0x35bf1d(_0x2bcf16[_0x4221('0x26')][_0x4221('0x28')]);}else{logger[_0x4221('0x29')](_0x4221('0x22'),_0x3a0c0d,_0x4221('0x23'));_0x35bf1d(_0x2bcf16[_0x4221('0x2a')][_0x4221('0x28')]);}})[_0x4221('0x2b')](function(_0xceb8ce){logger[_0x4221('0x26')]('ServicenowConfiguration,\x20%s,\x20%s',_0x3a0c0d,_0xceb8ce);_0x5dab0c(_0xceb8ce);});});}function respondWithStatusCode(_0x2f3f43,_0x417f8c){_0x417f8c=_0x417f8c||0xcc;return function(_0x3c1624){if(_0x3c1624){return _0x2f3f43['sendStatus'](_0x417f8c);}return _0x2f3f43[_0x4221('0x2c')](_0x417f8c)[_0x4221('0x2d')]();};}function respondWithResult(_0x3e24e5,_0x5a31d1){_0x5a31d1=_0x5a31d1||0xc8;return function(_0x48a999){if(_0x48a999){return _0x3e24e5[_0x4221('0x2c')](_0x5a31d1)['json'](_0x48a999);}};}function respondWithFilteredResult(_0x44bdbb,_0x1af858){return function(_0x540972){if(_0x540972){var _0x4cc7d0=_0x540972[_0x4221('0x2e')],_0x1707e0=_0x1af858[_0x4221('0x2f')],_0x13889f=_0x1af858['offset']+_0x1af858['limit'],_0x33d7ec;if(_0x13889f>=_0x4cc7d0){_0x13889f=_0x4cc7d0;_0x33d7ec=0xc8;}else{_0x33d7ec=0xce;}_0x44bdbb['status'](_0x33d7ec);return _0x44bdbb['set']('Content-Range',_0x1707e0+'-'+_0x13889f+'/'+_0x4cc7d0)[_0x4221('0x30')](_0x540972);}return null;};}function patchUpdates(_0x158649){return function(_0x1d1bb1){try{jsonpatch['apply'](_0x1d1bb1,_0x158649,!![]);}catch(_0x5e67c1){return BPromise[_0x4221('0x31')](_0x5e67c1);}return _0x1d1bb1[_0x4221('0x32')]();};}function saveUpdates(_0xf2f910,_0xde2af2){return function(_0x4eeead){if(_0x4eeead){return _0x4eeead[_0x4221('0x33')](_0xf2f910)[_0x4221('0x34')](function(_0x21c829){return _0x21c829;});}return null;};}function removeEntity(_0x2cbe31,_0x353ecc){return function(_0x5f52bc){if(_0x5f52bc){return _0x5f52bc['destroy']()[_0x4221('0x34')](function(){_0x2cbe31[_0x4221('0x2c')](0xcc)[_0x4221('0x2d')]();});}};}function handleEntityNotFound(_0x3b95b8,_0x34fe15){return function(_0x40be7b){if(!_0x40be7b){_0x3b95b8[_0x4221('0x35')](0x194);}return _0x40be7b;};}function handleError(_0x222fde,_0x4f8304){_0x4f8304=_0x4f8304||0x1f4;return function(_0x43fd71){logger[_0x4221('0x26')](_0x43fd71[_0x4221('0x36')]);if(_0x43fd71[_0x4221('0x37')]){delete _0x43fd71[_0x4221('0x37')];}_0x222fde[_0x4221('0x2c')](_0x4f8304)[_0x4221('0x38')](_0x43fd71);};}exports[_0x4221('0x39')]=function(_0x17a703,_0x4b2991){var _0x45a2ee={},_0x58aeea={},_0x275d2a={'count':0x0,'rows':[]};var _0x4e3e5d=_['map'](db[_0x4221('0x3a')][_0x4221('0x3b')],function(_0x182b42){return{'name':_0x182b42['fieldName'],'type':_0x182b42[_0x4221('0x3c')][_0x4221('0x3d')]};});_0x58aeea[_0x4221('0x3e')]=_[_0x4221('0x3f')](_0x4e3e5d,_0x4221('0x37'));_0x58aeea['query']=_[_0x4221('0x40')](_0x17a703[_0x4221('0x41')]);_0x58aeea[_0x4221('0x42')]=_[_0x4221('0x43')](_0x58aeea[_0x4221('0x3e')],_0x58aeea[_0x4221('0x41')]);_0x45a2ee[_0x4221('0x44')]=_['intersection'](_0x58aeea[_0x4221('0x3e')],qs[_0x4221('0x45')](_0x17a703['query']['fields']));_0x45a2ee[_0x4221('0x44')]=_0x45a2ee[_0x4221('0x44')][_0x4221('0x46')]?_0x45a2ee[_0x4221('0x44')]:_0x58aeea[_0x4221('0x3e')];if(!_0x17a703[_0x4221('0x41')][_0x4221('0x47')](_0x4221('0x48'))){_0x45a2ee['limit']=qs[_0x4221('0x49')](_0x17a703[_0x4221('0x41')][_0x4221('0x49')]);_0x45a2ee[_0x4221('0x2f')]=qs[_0x4221('0x2f')](_0x17a703[_0x4221('0x41')]['offset']);}_0x45a2ee[_0x4221('0x4a')]=qs[_0x4221('0x4b')](_0x17a703[_0x4221('0x41')][_0x4221('0x4b')]);_0x45a2ee[_0x4221('0x4c')]=qs['filters'](_[_0x4221('0x4d')](_0x17a703[_0x4221('0x41')],_0x58aeea[_0x4221('0x42')]));if(_0x17a703[_0x4221('0x41')][_0x4221('0x4e')]){_0x45a2ee[_0x4221('0x4c')]=_[_0x4221('0x4f')](_0x45a2ee['where'],{'$or':_[_0x4221('0x3f')](_0x4e3e5d,function(_0x448185){if(_0x448185[_0x4221('0x3c')]!==_0x4221('0x50')){var _0x5efa02={};_0x5efa02[_0x448185[_0x4221('0x37')]]={'$like':'%'+_0x17a703['query'][_0x4221('0x4e')]+'%'};return _0x5efa02;}})});}_0x45a2ee=_[_0x4221('0x4f')]({},_0x45a2ee,_0x17a703[_0x4221('0x51')]);var _0x63465c={'where':_0x45a2ee[_0x4221('0x4c')]};return db[_0x4221('0x3a')][_0x4221('0x2e')](_0x63465c)[_0x4221('0x34')](function(_0x543947){_0x275d2a[_0x4221('0x2e')]=_0x543947;if(_0x17a703['query'][_0x4221('0x52')]){_0x45a2ee[_0x4221('0x53')]=[{'all':!![]}];}return db[_0x4221('0x3a')]['findAll'](_0x45a2ee);})[_0x4221('0x34')](function(_0x46c2aa){_0x275d2a[_0x4221('0x54')]=_0x46c2aa;return _0x275d2a;})[_0x4221('0x34')](respondWithFilteredResult(_0x4b2991,_0x45a2ee))[_0x4221('0x2b')](handleError(_0x4b2991,null));};exports['show']=function(_0x1adacd,_0x590e25){var _0x2011ea={'raw':![],'where':{'id':_0x1adacd[_0x4221('0x55')]['id']}},_0xed3896={};_0xed3896['model']=_[_0x4221('0x40')](db[_0x4221('0x3a')][_0x4221('0x3b')]);_0xed3896[_0x4221('0x41')]=_['keys'](_0x1adacd['query']);_0xed3896[_0x4221('0x42')]=_['intersection'](_0xed3896[_0x4221('0x3e')],_0xed3896[_0x4221('0x41')]);_0x2011ea[_0x4221('0x44')]=_[_0x4221('0x43')](_0xed3896['model'],qs[_0x4221('0x45')](_0x1adacd['query'][_0x4221('0x45')]));_0x2011ea[_0x4221('0x44')]=_0x2011ea[_0x4221('0x44')][_0x4221('0x46')]?_0x2011ea[_0x4221('0x44')]:_0xed3896[_0x4221('0x3e')];if(_0x1adacd[_0x4221('0x41')][_0x4221('0x52')]){_0x2011ea['include']=[{'all':!![]}];}_0x2011ea=_['merge']({},_0x2011ea,_0x1adacd[_0x4221('0x51')]);return db[_0x4221('0x3a')][_0x4221('0x56')](_0x2011ea)['then'](handleEntityNotFound(_0x590e25,null))[_0x4221('0x34')](respondWithResult(_0x590e25,null))[_0x4221('0x2b')](handleError(_0x590e25,null));};exports[_0x4221('0x57')]=function(_0x2cdb76,_0x54a119){return db[_0x4221('0x3a')][_0x4221('0x57')](_0x2cdb76[_0x4221('0x58')],{})['then'](respondWithResult(_0x54a119,0xc9))[_0x4221('0x2b')](handleError(_0x54a119,null));};exports[_0x4221('0x33')]=function(_0x3380ec,_0x47d7e9){if(_0x3380ec['body']['id']){delete _0x3380ec[_0x4221('0x58')]['id'];}return db['ServicenowConfiguration'][_0x4221('0x56')]({'where':{'id':_0x3380ec[_0x4221('0x55')]['id']}})['then'](handleEntityNotFound(_0x47d7e9,null))[_0x4221('0x34')](saveUpdates(_0x3380ec[_0x4221('0x58')],null))[_0x4221('0x34')](respondWithResult(_0x47d7e9,null))[_0x4221('0x2b')](handleError(_0x47d7e9,null));};exports[_0x4221('0x59')]=function(_0x284908,_0x47911a){return db[_0x4221('0x3a')][_0x4221('0x56')]({'where':{'id':_0x284908[_0x4221('0x55')]['id']}})['then'](handleEntityNotFound(_0x47911a,null))['then'](removeEntity(_0x47911a,null))[_0x4221('0x2b')](handleError(_0x47911a,null));};exports[_0x4221('0x5a')]=function(_0x25c44e,_0x2cdf55,_0x5cfe5e){var _0x4ae09c={};var _0x29c078={};var _0xe5c743;var _0x3d3c08;return db['ServicenowConfiguration'][_0x4221('0x5b')]({'where':{'id':_0x25c44e[_0x4221('0x55')]['id']}})['then'](handleEntityNotFound(_0x2cdf55,null))[_0x4221('0x34')](function(_0x545556){if(_0x545556){_0xe5c743=_0x545556;_0x29c078[_0x4221('0x3e')]=_[_0x4221('0x40')](db[_0x4221('0x5c')][_0x4221('0x3b')]);_0x29c078['query']=_['keys'](_0x25c44e[_0x4221('0x41')]);_0x29c078[_0x4221('0x42')]=_[_0x4221('0x43')](_0x29c078[_0x4221('0x3e')],_0x29c078[_0x4221('0x41')]);_0x4ae09c[_0x4221('0x44')]=_[_0x4221('0x43')](_0x29c078[_0x4221('0x3e')],qs[_0x4221('0x45')](_0x25c44e[_0x4221('0x41')][_0x4221('0x45')]));_0x4ae09c[_0x4221('0x44')]=_0x4ae09c['attributes'][_0x4221('0x46')]?_0x4ae09c[_0x4221('0x44')]:_0x29c078['model'];_0x4ae09c[_0x4221('0x4a')]=qs[_0x4221('0x4b')](_0x25c44e[_0x4221('0x41')][_0x4221('0x4b')]);_0x4ae09c[_0x4221('0x4c')]=qs[_0x4221('0x42')](_[_0x4221('0x4d')](_0x25c44e[_0x4221('0x41')],_0x29c078[_0x4221('0x42')]));if(_0x25c44e[_0x4221('0x41')][_0x4221('0x4e')]){_0x4ae09c[_0x4221('0x4c')]=_[_0x4221('0x4f')](_0x4ae09c[_0x4221('0x4c')],{'$or':_['map'](_0x4ae09c[_0x4221('0x44')],function(_0x4106e0){var _0xb81c6c={};_0xb81c6c[_0x4106e0]={'$like':'%'+_0x25c44e['query']['filter']+'%'};return _0xb81c6c;})});}_0x4ae09c=_[_0x4221('0x4f')]({},_0x4ae09c,_0x25c44e[_0x4221('0x51')]);return _0xe5c743[_0x4221('0x5a')](_0x4ae09c);}})[_0x4221('0x34')](function(_0x522be2){if(_0x522be2){_0x3d3c08=_0x522be2[_0x4221('0x46')];if(!_0x25c44e[_0x4221('0x41')][_0x4221('0x47')](_0x4221('0x48'))){_0x4ae09c[_0x4221('0x49')]=qs[_0x4221('0x49')](_0x25c44e[_0x4221('0x41')]['limit']);_0x4ae09c[_0x4221('0x2f')]=qs[_0x4221('0x2f')](_0x25c44e[_0x4221('0x41')][_0x4221('0x2f')]);}return _0xe5c743[_0x4221('0x5a')](_0x4ae09c);}})[_0x4221('0x34')](function(_0x373a9a){if(_0x373a9a){return _0x373a9a?{'count':_0x3d3c08,'rows':_0x373a9a}:null;}})[_0x4221('0x34')](respondWithResult(_0x2cdf55,null))[_0x4221('0x2b')](handleError(_0x2cdf55,null));};exports['getSubjects']=function(_0x1001d5,_0x421103,_0x3f4e4f){var _0x53cc50={};var _0x4d024b={};var _0xe265a4;var _0x63d187;return db[_0x4221('0x3a')][_0x4221('0x5b')]({'where':{'id':_0x1001d5[_0x4221('0x55')]['id']}})[_0x4221('0x34')](handleEntityNotFound(_0x421103,null))['then'](function(_0x46684a){if(_0x46684a){_0xe265a4=_0x46684a;_0x4d024b[_0x4221('0x3e')]=_[_0x4221('0x40')](db[_0x4221('0x5c')]['rawAttributes']);_0x4d024b[_0x4221('0x41')]=_[_0x4221('0x40')](_0x1001d5[_0x4221('0x41')]);_0x4d024b[_0x4221('0x42')]=_['intersection'](_0x4d024b['model'],_0x4d024b[_0x4221('0x41')]);_0x53cc50[_0x4221('0x44')]=_['intersection'](_0x4d024b[_0x4221('0x3e')],qs[_0x4221('0x45')](_0x1001d5['query']['fields']));_0x53cc50[_0x4221('0x44')]=_0x53cc50[_0x4221('0x44')][_0x4221('0x46')]?_0x53cc50['attributes']:_0x4d024b['model'];_0x53cc50['order']=qs[_0x4221('0x4b')](_0x1001d5[_0x4221('0x41')][_0x4221('0x4b')]);_0x53cc50['where']=qs[_0x4221('0x42')](_[_0x4221('0x4d')](_0x1001d5[_0x4221('0x41')],_0x4d024b[_0x4221('0x42')]));if(_0x1001d5[_0x4221('0x41')][_0x4221('0x4e')]){_0x53cc50['where']=_[_0x4221('0x4f')](_0x53cc50[_0x4221('0x4c')],{'$or':_['map'](_0x53cc50[_0x4221('0x44')],function(_0x460530){var _0x18b188={};_0x18b188[_0x460530]={'$like':'%'+_0x1001d5[_0x4221('0x41')][_0x4221('0x4e')]+'%'};return _0x18b188;})});}_0x53cc50=_['merge']({},_0x53cc50,_0x1001d5[_0x4221('0x51')]);return _0xe265a4[_0x4221('0x5d')](_0x53cc50);}})[_0x4221('0x34')](function(_0x1113a0){if(_0x1113a0){_0x63d187=_0x1113a0[_0x4221('0x46')];if(!_0x1001d5[_0x4221('0x41')][_0x4221('0x47')](_0x4221('0x48'))){_0x53cc50[_0x4221('0x49')]=qs['limit'](_0x1001d5['query'][_0x4221('0x49')]);_0x53cc50[_0x4221('0x2f')]=qs['offset'](_0x1001d5[_0x4221('0x41')][_0x4221('0x2f')]);}return _0xe265a4[_0x4221('0x5d')](_0x53cc50);}})[_0x4221('0x34')](function(_0x400c07){if(_0x400c07){return _0x400c07?{'count':_0x63d187,'rows':_0x400c07}:null;}})['then'](respondWithResult(_0x421103,null))[_0x4221('0x2b')](handleError(_0x421103,null));};exports[_0x4221('0x5e')]=function(_0x4b1b6f,_0x15308b,_0x4719ec){var _0x4181a6={};var _0x42bba8={};var _0x4170b1;var _0x201475;return db[_0x4221('0x3a')][_0x4221('0x5b')]({'where':{'id':_0x4b1b6f['params']['id']}})['then'](handleEntityNotFound(_0x15308b,null))['then'](function(_0x2080b0){if(_0x2080b0){_0x4170b1=_0x2080b0;_0x42bba8['model']=_[_0x4221('0x40')](db[_0x4221('0x5c')][_0x4221('0x3b')]);_0x42bba8[_0x4221('0x41')]=_[_0x4221('0x40')](_0x4b1b6f[_0x4221('0x41')]);_0x42bba8[_0x4221('0x42')]=_[_0x4221('0x43')](_0x42bba8[_0x4221('0x3e')],_0x42bba8[_0x4221('0x41')]);_0x4181a6[_0x4221('0x44')]=_['intersection'](_0x42bba8['model'],qs['fields'](_0x4b1b6f[_0x4221('0x41')]['fields']));_0x4181a6[_0x4221('0x44')]=_0x4181a6['attributes'][_0x4221('0x46')]?_0x4181a6[_0x4221('0x44')]:_0x42bba8[_0x4221('0x3e')];_0x4181a6[_0x4221('0x4a')]=qs[_0x4221('0x4b')](_0x4b1b6f[_0x4221('0x41')][_0x4221('0x4b')]);_0x4181a6['where']=qs[_0x4221('0x42')](_[_0x4221('0x4d')](_0x4b1b6f[_0x4221('0x41')],_0x42bba8['filters']));if(_0x4b1b6f[_0x4221('0x41')][_0x4221('0x4e')]){_0x4181a6['where']=_[_0x4221('0x4f')](_0x4181a6['where'],{'$or':_[_0x4221('0x3f')](_0x4181a6['attributes'],function(_0xcf7ea8){var _0x1f1a3a={};_0x1f1a3a[_0xcf7ea8]={'$like':'%'+_0x4b1b6f[_0x4221('0x41')][_0x4221('0x4e')]+'%'};return _0x1f1a3a;})});}_0x4181a6=_['merge']({},_0x4181a6,_0x4b1b6f[_0x4221('0x51')]);return _0x4170b1[_0x4221('0x5e')](_0x4181a6);}})[_0x4221('0x34')](function(_0xf10e0b){if(_0xf10e0b){_0x201475=_0xf10e0b[_0x4221('0x46')];if(!_0x4b1b6f[_0x4221('0x41')][_0x4221('0x47')](_0x4221('0x48'))){_0x4181a6[_0x4221('0x49')]=qs[_0x4221('0x49')](_0x4b1b6f[_0x4221('0x41')][_0x4221('0x49')]);_0x4181a6[_0x4221('0x2f')]=qs[_0x4221('0x2f')](_0x4b1b6f[_0x4221('0x41')][_0x4221('0x2f')]);}return _0x4170b1[_0x4221('0x5e')](_0x4181a6);}})[_0x4221('0x34')](function(_0x4353cd){if(_0x4353cd){return _0x4353cd?{'count':_0x201475,'rows':_0x4353cd}:null;}})[_0x4221('0x34')](respondWithResult(_0x15308b,null))[_0x4221('0x2b')](handleError(_0x15308b,null));};
\ No newline at end of file
diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js
index e2d8bf2..1e11a74 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 _0xb293=['../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./intServicenowConfiguration.attributes','exports','define','ServicenowConfiguration','int_servicenow_configurations','lodash','util'];(function(_0x32c292,_0xb85062){var _0xa37de1=function(_0xdd46ad){while(--_0xdd46ad){_0x32c292['push'](_0x32c292['shift']());}};_0xa37de1(++_0xb85062);}(_0xb293,0x1b8));var _0x3b29=function(_0x34360e,_0x1009d6){_0x34360e=_0x34360e-0x0;var _0x4c19c7=_0xb293[_0x34360e];return _0x4c19c7;};'use strict';var _=require(_0x3b29('0x0'));var util=require(_0x3b29('0x1'));var logger=require(_0x3b29('0x2'))('api');var moment=require(_0x3b29('0x3'));var BPromise=require(_0x3b29('0x4'));var rp=require(_0x3b29('0x5'));var fs=require('fs');var path=require(_0x3b29('0x6'));var rimraf=require('rimraf');var config=require(_0x3b29('0x7'));var attributes=require(_0x3b29('0x8'));module[_0x3b29('0x9')]=function(_0x17a60d,_0x346896){return _0x17a60d[_0x3b29('0xa')](_0x3b29('0xb'),attributes,{'tableName':_0x3b29('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe68a=['util','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','./intServicenowConfiguration.attributes','exports','lodash'];(function(_0x254957,_0x10c53b){var _0x1ef53b=function(_0x2d40a4){while(--_0x2d40a4){_0x254957['push'](_0x254957['shift']());}};_0x1ef53b(++_0x10c53b);}(_0xe68a,0x185));var _0xae68=function(_0x1699e9,_0x1f2652){_0x1699e9=_0x1699e9-0x0;var _0x14b104=_0xe68a[_0x1699e9];return _0x14b104;};'use strict';var _=require(_0xae68('0x0'));var util=require(_0xae68('0x1'));var logger=require(_0xae68('0x2'))(_0xae68('0x3'));var moment=require('moment');var BPromise=require(_0xae68('0x4'));var rp=require(_0xae68('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xae68('0x6'));var config=require(_0xae68('0x7'));var attributes=require(_0xae68('0x8'));module[_0xae68('0x9')]=function(_0x42db59,_0x4e7df0){return _0x42db59['define']('ServicenowConfiguration',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 422bc3f..a9057f9 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 _0x4309=['ioredis','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','stringify','error','code','message','ServicenowConfiguration,\x20%s,\x20%s','result','catch','lodash','util','randomstring'];(function(_0x2b12b0,_0x4480ce){var _0x221d21=function(_0xbdc428){while(--_0xbdc428){_0x2b12b0['push'](_0x2b12b0['shift']());}};_0x221d21(++_0x4480ce);}(_0x4309,0x11a));var _0x9430=function(_0xf86744,_0xcd627){_0xf86744=_0xf86744-0x0;var _0x19f17d=_0x4309[_0xf86744];return _0x19f17d;};'use strict';var _=require(_0x9430('0x0'));var util=require(_0x9430('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9430('0x2'));var fs=require('fs');var Redis=require(_0x9430('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x9430('0x4'));var jayson=require(_0x9430('0x5'));var client=jayson[_0x9430('0x6')][_0x9430('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1bd6b2,_0x1bfdc7,_0x3a4d36){return new BPromise(function(_0x524bac,_0x1d17e4){return client['request'](_0x1bd6b2,_0x3a4d36)[_0x9430('0x8')](function(_0xc3bc11){logger[_0x9430('0x9')]('ServicenowConfiguration,\x20%s,\x20%s',_0x1bfdc7,_0x9430('0xa'));logger[_0x9430('0xb')]('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x1bfdc7,_0x9430('0xa'),JSON[_0x9430('0xc')](_0xc3bc11));if(_0xc3bc11[_0x9430('0xd')]){if(_0xc3bc11[_0x9430('0xd')][_0x9430('0xe')]===0x1f4){logger[_0x9430('0xd')]('ServicenowConfiguration,\x20%s,\x20%s',_0x1bfdc7,_0xc3bc11['error'][_0x9430('0xf')]);return _0x1d17e4(_0xc3bc11['error'][_0x9430('0xf')]);}logger[_0x9430('0xd')](_0x9430('0x10'),_0x1bfdc7,_0xc3bc11[_0x9430('0xd')][_0x9430('0xf')]);return _0x524bac(_0xc3bc11['error'][_0x9430('0xf')]);}else{logger[_0x9430('0x9')](_0x9430('0x10'),_0x1bfdc7,_0x9430('0xa'));_0x524bac(_0xc3bc11[_0x9430('0x11')][_0x9430('0xf')]);}})[_0x9430('0x12')](function(_0x597890){logger[_0x9430('0xd')](_0x9430('0x10'),_0x1bfdc7,_0x597890);_0x1d17e4(_0x597890);});});}
\ No newline at end of file
+var _0xa2d7=['error','code','ServicenowConfiguration,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','../../config/utils','../../config/logger','../../config/environment','request','then','info','request\x20sent','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x5a10b7,_0x1279c7){var _0x5e07ae=function(_0x2f3feb){while(--_0x2f3feb){_0x5a10b7['push'](_0x5a10b7['shift']());}};_0x5e07ae(++_0x1279c7);}(_0xa2d7,0x84));var _0x7a2d=function(_0x221db8,_0x1788f9){_0x221db8=_0x221db8-0x0;var _0x3a20d6=_0xa2d7[_0x221db8];return _0x3a20d6;};'use strict';var _=require('lodash');var util=require(_0x7a2d('0x0'));var moment=require(_0x7a2d('0x1'));var BPromise=require(_0x7a2d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x7a2d('0x3'));var logger=require(_0x7a2d('0x4'))('rpc');var config=require(_0x7a2d('0x5'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3a6647,_0x23a8ed,_0x3ef4b0){return new BPromise(function(_0x3eda34,_0x358fe0){return client[_0x7a2d('0x6')](_0x3a6647,_0x3ef4b0)[_0x7a2d('0x7')](function(_0x2ee9ee){logger[_0x7a2d('0x8')]('ServicenowConfiguration,\x20%s,\x20%s',_0x23a8ed,_0x7a2d('0x9'));logger['debug'](_0x7a2d('0xa'),_0x23a8ed,_0x7a2d('0x9'),JSON[_0x7a2d('0xb')](_0x2ee9ee));if(_0x2ee9ee['error']){if(_0x2ee9ee[_0x7a2d('0xc')][_0x7a2d('0xd')]===0x1f4){logger[_0x7a2d('0xc')](_0x7a2d('0xe'),_0x23a8ed,_0x2ee9ee['error'][_0x7a2d('0xf')]);return _0x358fe0(_0x2ee9ee[_0x7a2d('0xc')][_0x7a2d('0xf')]);}logger[_0x7a2d('0xc')]('ServicenowConfiguration,\x20%s,\x20%s',_0x23a8ed,_0x2ee9ee[_0x7a2d('0xc')][_0x7a2d('0xf')]);return _0x3eda34(_0x2ee9ee['error'][_0x7a2d('0xf')]);}else{logger[_0x7a2d('0x8')]('ServicenowConfiguration,\x20%s,\x20%s',_0x23a8ed,_0x7a2d('0x9'));_0x3eda34(_0x2ee9ee[_0x7a2d('0x10')][_0x7a2d('0xf')]);}})[_0x7a2d('0x11')](function(_0x49ab8a){logger[_0x7a2d('0xc')](_0x7a2d('0xe'),_0x23a8ed,_0x49ab8a);_0x358fe0(_0x49ab8a);});});}
\ No newline at end of file
diff --git a/server/api/intServicenowField/index.js b/server/api/intServicenowField/index.js
index b58896d..1336a36 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 _0xf850=['util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./intServicenowField.controller','get','index','isAuthenticated','show','post','create','put','delete','/:id','destroy','exports','multer'];(function(_0x1c8952,_0x4e0fbb){var _0x323e69=function(_0xad1893){while(--_0xad1893){_0x1c8952['push'](_0x1c8952['shift']());}};_0x323e69(++_0x4e0fbb);}(_0xf850,0x117));var _0x0f85=function(_0x5d50d4,_0x55bb20){_0x5d50d4=_0x5d50d4-0x0;var _0x224504=_0xf850[_0x5d50d4];return _0x224504;};'use strict';var multer=require(_0x0f85('0x0'));var util=require(_0x0f85('0x1'));var path=require(_0x0f85('0x2'));var timeout=require(_0x0f85('0x3'));var express=require(_0x0f85('0x4'));var router=express[_0x0f85('0x5')]();var auth=require(_0x0f85('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x0f85('0x7'));var controller=require(_0x0f85('0x8'));router[_0x0f85('0x9')]('/',auth['isAuthenticated'](),controller[_0x0f85('0xa')]);router[_0x0f85('0x9')]('/:id',auth[_0x0f85('0xb')](),controller[_0x0f85('0xc')]);router[_0x0f85('0xd')]('/',auth[_0x0f85('0xb')](),controller[_0x0f85('0xe')]);router[_0x0f85('0xf')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0x0f85('0x10')](_0x0f85('0x11'),auth[_0x0f85('0xb')](),controller[_0x0f85('0x12')]);module[_0x0f85('0x13')]=router;
\ No newline at end of file
+var _0xef9f=['put','update','delete','destroy','exports','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./intServicenowField.controller','get','isAuthenticated','index','/:id','show','post','create'];(function(_0x58f4cb,_0x31734c){var _0x48d432=function(_0x3f986f){while(--_0x3f986f){_0x58f4cb['push'](_0x58f4cb['shift']());}};_0x48d432(++_0x31734c);}(_0xef9f,0x145));var _0xfef9=function(_0x2a2b0e,_0x1f7010){_0x2a2b0e=_0x2a2b0e-0x0;var _0xab91d7=_0xef9f[_0x2a2b0e];return _0xab91d7;};'use strict';var multer=require(_0xfef9('0x0'));var util=require(_0xfef9('0x1'));var path=require(_0xfef9('0x2'));var timeout=require('connect-timeout');var express=require(_0xfef9('0x3'));var router=express[_0xfef9('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xfef9('0x5'));var config=require(_0xfef9('0x6'));var controller=require(_0xfef9('0x7'));router[_0xfef9('0x8')]('/',auth[_0xfef9('0x9')](),controller[_0xfef9('0xa')]);router[_0xfef9('0x8')](_0xfef9('0xb'),auth[_0xfef9('0x9')](),controller[_0xfef9('0xc')]);router[_0xfef9('0xd')]('/',auth[_0xfef9('0x9')](),controller[_0xfef9('0xe')]);router[_0xfef9('0xf')](_0xfef9('0xb'),auth[_0xfef9('0x9')](),controller[_0xfef9('0x10')]);router[_0xfef9('0x11')]('/:id',auth['isAuthenticated'](),controller[_0xfef9('0x12')]);module[_0xfef9('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/intServicenowField/intServicenowField.attributes.js b/server/api/intServicenowField/intServicenowField.attributes.js
index e2e7faa..5f6c242 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 _0xefc8=['sequelize','exports','string','variable','customVariable','keyValue','STRING','BOOLEAN'];(function(_0xd8a8af,_0x1e93f0){var _0x5b7278=function(_0x458800){while(--_0x458800){_0xd8a8af['push'](_0xd8a8af['shift']());}};_0x5b7278(++_0x1e93f0);}(_0xefc8,0xf8));var _0x8efc=function(_0x49da80,_0x334467){_0x49da80=_0x49da80-0x0;var _0x49eb06=_0xefc8[_0x49da80];return _0x49eb06;};'use strict';var Sequelize=require(_0x8efc('0x0'));module[_0x8efc('0x1')]={'type':{'type':Sequelize['ENUM'](_0x8efc('0x2'),_0x8efc('0x3'),_0x8efc('0x4'),_0x8efc('0x5')),'defaultValue':_0x8efc('0x2')},'content':{'type':Sequelize[_0x8efc('0x6')]},'key':{'type':Sequelize[_0x8efc('0x6')]},'keyType':{'type':Sequelize['ENUM']('string','variable','customVariable')},'keyContent':{'type':Sequelize[_0x8efc('0x6')]},'idField':{'type':Sequelize[_0x8efc('0x6')]},'nameField':{'type':Sequelize[_0x8efc('0x6')]},'customField':{'type':Sequelize[_0x8efc('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8efc('0x6')]}};
\ No newline at end of file
+var _0x4fdc=['BOOLEAN','sequelize','exports','ENUM','customVariable','keyValue','STRING','variable'];(function(_0x140884,_0x509bc9){var _0x4f6531=function(_0xb5d391){while(--_0xb5d391){_0x140884['push'](_0x140884['shift']());}};_0x4f6531(++_0x509bc9);}(_0x4fdc,0xf9));var _0xc4fd=function(_0x2b8dac,_0x1a6488){_0x2b8dac=_0x2b8dac-0x0;var _0x4dbb56=_0x4fdc[_0x2b8dac];return _0x4dbb56;};'use strict';var Sequelize=require(_0xc4fd('0x0'));module[_0xc4fd('0x1')]={'type':{'type':Sequelize[_0xc4fd('0x2')]('string','variable',_0xc4fd('0x3'),_0xc4fd('0x4')),'defaultValue':'string'},'content':{'type':Sequelize[_0xc4fd('0x5')]},'key':{'type':Sequelize[_0xc4fd('0x5')]},'keyType':{'type':Sequelize[_0xc4fd('0x2')]('string',_0xc4fd('0x6'),_0xc4fd('0x3'))},'keyContent':{'type':Sequelize[_0xc4fd('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xc4fd('0x5')]},'customField':{'type':Sequelize[_0xc4fd('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xc4fd('0x5')]}};
\ No newline at end of file
diff --git a/server/api/intServicenowField/intServicenowField.controller.js b/server/api/intServicenowField/intServicenowField.controller.js
index 64a966e..13017d6 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 _0x910d=['sort','where','pick','merge','filter','options','count','includeAll','include','findAll','catch','params','ServicenowField','intersection','find','create','body','html-pdf','rimraf','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','sendStatus','status','end','offset','limit','set','json','apply','reject','save','update','then','destroy','error','stack','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order'];(function(_0x199572,_0x33e667){var _0x13cfa3=function(_0x53c075){while(--_0x53c075){_0x199572['push'](_0x199572['shift']());}};_0x13cfa3(++_0x33e667);}(_0x910d,0x179));var _0xd910=function(_0x4b47fa,_0x5816d1){_0x4b47fa=_0x4b47fa-0x0;var _0x49fb27=_0x910d[_0x4b47fa];return _0x49fb27;};'use strict';var pdf=require(_0xd910('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xd910('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd910('0x2'));var rp=require(_0xd910('0x3'));var moment=require(_0xd910('0x4'));var BPromise=require(_0xd910('0x5'));var Mustache=require(_0xd910('0x6'));var util=require(_0xd910('0x7'));var path=require(_0xd910('0x8'));var sox=require(_0xd910('0x9'));var csv=require(_0xd910('0xa'));var ejs=require(_0xd910('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xd910('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xd910('0xd'));var toCsv=require(_0xd910('0xa'));var querystring=require(_0xd910('0xe'));var Papa=require(_0xd910('0xf'));var Redis=require(_0xd910('0x10'));var authService=require(_0xd910('0x11'));var qs=require(_0xd910('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xd910('0x13'));var logger=require(_0xd910('0x14'))(_0xd910('0x15'));var utils=require(_0xd910('0x16'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x13ed43,_0x4ec3c1){_0x4ec3c1=_0x4ec3c1||0xcc;return function(_0xf1ab9b){if(_0xf1ab9b){return _0x13ed43[_0xd910('0x17')](_0x4ec3c1);}return _0x13ed43[_0xd910('0x18')](_0x4ec3c1)[_0xd910('0x19')]();};}function respondWithResult(_0xc4f51,_0x86dbbd){_0x86dbbd=_0x86dbbd||0xc8;return function(_0x2ed95c){if(_0x2ed95c){return _0xc4f51['status'](_0x86dbbd)['json'](_0x2ed95c);}};}function respondWithFilteredResult(_0xd9060c,_0x16c0b9){return function(_0x3683f9){if(_0x3683f9){var _0x22bd18=_0x3683f9['count'],_0x501ad3=_0x16c0b9[_0xd910('0x1a')],_0x4870e9=_0x16c0b9[_0xd910('0x1a')]+_0x16c0b9[_0xd910('0x1b')],_0x2de140;if(_0x4870e9>=_0x22bd18){_0x4870e9=_0x22bd18;_0x2de140=0xc8;}else{_0x2de140=0xce;}_0xd9060c['status'](_0x2de140);return _0xd9060c[_0xd910('0x1c')]('Content-Range',_0x501ad3+'-'+_0x4870e9+'/'+_0x22bd18)[_0xd910('0x1d')](_0x3683f9);}return null;};}function patchUpdates(_0x535f7b){return function(_0x17c176){try{jsonpatch[_0xd910('0x1e')](_0x17c176,_0x535f7b,!![]);}catch(_0x17cc14){return BPromise[_0xd910('0x1f')](_0x17cc14);}return _0x17c176[_0xd910('0x20')]();};}function saveUpdates(_0x1d68c8,_0x5293ed){return function(_0x1d372b){if(_0x1d372b){return _0x1d372b[_0xd910('0x21')](_0x1d68c8)[_0xd910('0x22')](function(_0x5811c4){return _0x5811c4;});}return null;};}function removeEntity(_0x5363b5,_0x36ce48){return function(_0x543a57){if(_0x543a57){return _0x543a57[_0xd910('0x23')]()[_0xd910('0x22')](function(){_0x5363b5[_0xd910('0x18')](0xcc)[_0xd910('0x19')]();});}};}function handleEntityNotFound(_0x5d99c0,_0x3978d5){return function(_0x13a506){if(!_0x13a506){_0x5d99c0[_0xd910('0x17')](0x194);}return _0x13a506;};}function handleError(_0x5c5ea9,_0x30fd9d){_0x30fd9d=_0x30fd9d||0x1f4;return function(_0x2bb27d){logger[_0xd910('0x24')](_0x2bb27d[_0xd910('0x25')]);if(_0x2bb27d[_0xd910('0x26')]){delete _0x2bb27d[_0xd910('0x26')];}_0x5c5ea9['status'](_0x30fd9d)['send'](_0x2bb27d);};}exports[_0xd910('0x27')]=function(_0x538a8b,_0x49eb12){var _0x374679={},_0x4be888={},_0x20d1bb={'count':0x0,'rows':[]};var _0x41e701=_[_0xd910('0x28')](db['ServicenowField'][_0xd910('0x29')],function(_0x1e4890){return{'name':_0x1e4890[_0xd910('0x2a')],'type':_0x1e4890[_0xd910('0x2b')][_0xd910('0x2c')]};});_0x4be888[_0xd910('0x2d')]=_[_0xd910('0x28')](_0x41e701,'name');_0x4be888[_0xd910('0x2e')]=_[_0xd910('0x2f')](_0x538a8b[_0xd910('0x2e')]);_0x4be888[_0xd910('0x30')]=_['intersection'](_0x4be888[_0xd910('0x2d')],_0x4be888['query']);_0x374679[_0xd910('0x31')]=_['intersection'](_0x4be888['model'],qs['fields'](_0x538a8b[_0xd910('0x2e')][_0xd910('0x32')]));_0x374679[_0xd910('0x31')]=_0x374679[_0xd910('0x31')][_0xd910('0x33')]?_0x374679['attributes']:_0x4be888[_0xd910('0x2d')];if(!_0x538a8b[_0xd910('0x2e')][_0xd910('0x34')](_0xd910('0x35'))){_0x374679['limit']=qs[_0xd910('0x1b')](_0x538a8b['query'][_0xd910('0x1b')]);_0x374679['offset']=qs[_0xd910('0x1a')](_0x538a8b['query'][_0xd910('0x1a')]);}_0x374679[_0xd910('0x36')]=qs[_0xd910('0x37')](_0x538a8b['query']['sort']);_0x374679[_0xd910('0x38')]=qs['filters'](_[_0xd910('0x39')](_0x538a8b[_0xd910('0x2e')],_0x4be888[_0xd910('0x30')]));if(_0x538a8b[_0xd910('0x2e')]['filter']){_0x374679['where']=_[_0xd910('0x3a')](_0x374679['where'],{'$or':_[_0xd910('0x28')](_0x41e701,function(_0x3ebe03){if(_0x3ebe03[_0xd910('0x2b')]!=='VIRTUAL'){var _0x2d419f={};_0x2d419f[_0x3ebe03[_0xd910('0x26')]]={'$like':'%'+_0x538a8b[_0xd910('0x2e')][_0xd910('0x3b')]+'%'};return _0x2d419f;}})});}_0x374679=_[_0xd910('0x3a')]({},_0x374679,_0x538a8b[_0xd910('0x3c')]);var _0xa6481c={'where':_0x374679[_0xd910('0x38')]};return db['ServicenowField'][_0xd910('0x3d')](_0xa6481c)[_0xd910('0x22')](function(_0x2bbfcf){_0x20d1bb[_0xd910('0x3d')]=_0x2bbfcf;if(_0x538a8b[_0xd910('0x2e')][_0xd910('0x3e')]){_0x374679[_0xd910('0x3f')]=[{'all':!![]}];}return db['ServicenowField'][_0xd910('0x40')](_0x374679);})[_0xd910('0x22')](function(_0x1f96b8){_0x20d1bb['rows']=_0x1f96b8;return _0x20d1bb;})['then'](respondWithFilteredResult(_0x49eb12,_0x374679))[_0xd910('0x41')](handleError(_0x49eb12,null));};exports['show']=function(_0x3de510,_0x48a39c){var _0x290ee2={'raw':!![],'where':{'id':_0x3de510[_0xd910('0x42')]['id']}},_0x31b05a={};_0x31b05a[_0xd910('0x2d')]=_[_0xd910('0x2f')](db[_0xd910('0x43')][_0xd910('0x29')]);_0x31b05a[_0xd910('0x2e')]=_[_0xd910('0x2f')](_0x3de510['query']);_0x31b05a[_0xd910('0x30')]=_['intersection'](_0x31b05a[_0xd910('0x2d')],_0x31b05a[_0xd910('0x2e')]);_0x290ee2[_0xd910('0x31')]=_[_0xd910('0x44')](_0x31b05a[_0xd910('0x2d')],qs[_0xd910('0x32')](_0x3de510[_0xd910('0x2e')][_0xd910('0x32')]));_0x290ee2[_0xd910('0x31')]=_0x290ee2[_0xd910('0x31')][_0xd910('0x33')]?_0x290ee2[_0xd910('0x31')]:_0x31b05a[_0xd910('0x2d')];if(_0x3de510[_0xd910('0x2e')][_0xd910('0x3e')]){_0x290ee2['include']=[{'all':!![]}];}_0x290ee2=_['merge']({},_0x290ee2,_0x3de510['options']);return db['ServicenowField'][_0xd910('0x45')](_0x290ee2)['then'](handleEntityNotFound(_0x48a39c,null))[_0xd910('0x22')](respondWithResult(_0x48a39c,null))[_0xd910('0x41')](handleError(_0x48a39c,null));};exports[_0xd910('0x46')]=function(_0x3fb210,_0x27d4a6){return db['ServicenowField'][_0xd910('0x46')](_0x3fb210[_0xd910('0x47')],{})[_0xd910('0x22')](respondWithResult(_0x27d4a6,0xc9))[_0xd910('0x41')](handleError(_0x27d4a6,null));};exports[_0xd910('0x21')]=function(_0x3cd6c4,_0x26569b){if(_0x3cd6c4[_0xd910('0x47')]['id']){delete _0x3cd6c4[_0xd910('0x47')]['id'];}return db[_0xd910('0x43')][_0xd910('0x45')]({'where':{'id':_0x3cd6c4[_0xd910('0x42')]['id']}})[_0xd910('0x22')](handleEntityNotFound(_0x26569b,null))['then'](saveUpdates(_0x3cd6c4[_0xd910('0x47')],null))[_0xd910('0x22')](respondWithResult(_0x26569b,null))['catch'](handleError(_0x26569b,null));};exports[_0xd910('0x23')]=function(_0xc229d7,_0x294fa0){return db[_0xd910('0x43')][_0xd910('0x45')]({'where':{'id':_0xc229d7[_0xd910('0x42')]['id']}})[_0xd910('0x22')](handleEntityNotFound(_0x294fa0,null))[_0xd910('0x22')](removeEntity(_0x294fa0,null))[_0xd910('0x41')](handleError(_0x294fa0,null));};
\ No newline at end of file
+var _0xc5dd=['order','sort','filter','merge','where','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','length','find','create','body','html-pdf','eml-format','rimraf','zip-dir','moment','util','path','sox','to-csv','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','sendStatus','end','status','json','count','offset','limit','set','Content-Range','save','update','then','destroy','error','stack','name','index','map','ServicenowField','fieldName','type','key','model','query','filters','intersection','fields','attributes','hasOwnProperty'];(function(_0x40da2b,_0x4c8c73){var _0x122eb5=function(_0x2fc5f3){while(--_0x2fc5f3){_0x40da2b['push'](_0x40da2b['shift']());}};_0x122eb5(++_0x4c8c73);}(_0xc5dd,0x122));var _0xdc5d=function(_0x4ff448,_0x5cff72){_0x4ff448=_0x4ff448-0x0;var _0x224a01=_0xc5dd[_0x4ff448];return _0x224a01;};'use strict';var pdf=require(_0xdc5d('0x0'));var emlformat=require(_0xdc5d('0x1'));var rimraf=require(_0xdc5d('0x2'));var zipdir=require(_0xdc5d('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xdc5d('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xdc5d('0x5'));var path=require(_0xdc5d('0x6'));var sox=require(_0xdc5d('0x7'));var csv=require(_0xdc5d('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xdc5d('0x9'));var squel=require(_0xdc5d('0xa'));var crypto=require('crypto');var jsforce=require(_0xdc5d('0xb'));var deskjs=require(_0xdc5d('0xc'));var toCsv=require(_0xdc5d('0x8'));var querystring=require('querystring');var Papa=require(_0xdc5d('0xd'));var Redis=require(_0xdc5d('0xe'));var authService=require(_0xdc5d('0xf'));var qs=require(_0xdc5d('0x10'));var as=require(_0xdc5d('0x11'));var hardwareService=require(_0xdc5d('0x12'));var logger=require(_0xdc5d('0x13'))(_0xdc5d('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x484d9c,_0x12af0b){_0x12af0b=_0x12af0b||0xcc;return function(_0x38c259){if(_0x38c259){return _0x484d9c[_0xdc5d('0x15')](_0x12af0b);}return _0x484d9c['status'](_0x12af0b)[_0xdc5d('0x16')]();};}function respondWithResult(_0x1a8860,_0x4a7d4b){_0x4a7d4b=_0x4a7d4b||0xc8;return function(_0x156293){if(_0x156293){return _0x1a8860[_0xdc5d('0x17')](_0x4a7d4b)[_0xdc5d('0x18')](_0x156293);}};}function respondWithFilteredResult(_0x5d02e5,_0xbe0928){return function(_0x5bfe20){if(_0x5bfe20){var _0x41ed95=_0x5bfe20[_0xdc5d('0x19')],_0x4703d3=_0xbe0928[_0xdc5d('0x1a')],_0x305485=_0xbe0928['offset']+_0xbe0928[_0xdc5d('0x1b')],_0x5e1721;if(_0x305485>=_0x41ed95){_0x305485=_0x41ed95;_0x5e1721=0xc8;}else{_0x5e1721=0xce;}_0x5d02e5[_0xdc5d('0x17')](_0x5e1721);return _0x5d02e5[_0xdc5d('0x1c')](_0xdc5d('0x1d'),_0x4703d3+'-'+_0x305485+'/'+_0x41ed95)[_0xdc5d('0x18')](_0x5bfe20);}return null;};}function patchUpdates(_0x37ec48){return function(_0x11414d){try{jsonpatch['apply'](_0x11414d,_0x37ec48,!![]);}catch(_0x39e5fa){return BPromise['reject'](_0x39e5fa);}return _0x11414d[_0xdc5d('0x1e')]();};}function saveUpdates(_0x29ace8,_0x1e35ad){return function(_0x57ddb7){if(_0x57ddb7){return _0x57ddb7[_0xdc5d('0x1f')](_0x29ace8)[_0xdc5d('0x20')](function(_0x464d20){return _0x464d20;});}return null;};}function removeEntity(_0x10d01b,_0xb601ff){return function(_0x8dff3e){if(_0x8dff3e){return _0x8dff3e[_0xdc5d('0x21')]()[_0xdc5d('0x20')](function(){_0x10d01b['status'](0xcc)[_0xdc5d('0x16')]();});}};}function handleEntityNotFound(_0x1da3ca,_0x536c80){return function(_0x3d179a){if(!_0x3d179a){_0x1da3ca[_0xdc5d('0x15')](0x194);}return _0x3d179a;};}function handleError(_0x3a480b,_0x5792c1){_0x5792c1=_0x5792c1||0x1f4;return function(_0x41a32d){logger[_0xdc5d('0x22')](_0x41a32d[_0xdc5d('0x23')]);if(_0x41a32d[_0xdc5d('0x24')]){delete _0x41a32d[_0xdc5d('0x24')];}_0x3a480b[_0xdc5d('0x17')](_0x5792c1)['send'](_0x41a32d);};}exports[_0xdc5d('0x25')]=function(_0x10f3b8,_0x319b64){var _0x19922a={},_0x1f5ccf={},_0x465fdf={'count':0x0,'rows':[]};var _0x5afba4=_[_0xdc5d('0x26')](db[_0xdc5d('0x27')]['rawAttributes'],function(_0x32f8d4){return{'name':_0x32f8d4[_0xdc5d('0x28')],'type':_0x32f8d4[_0xdc5d('0x29')][_0xdc5d('0x2a')]};});_0x1f5ccf[_0xdc5d('0x2b')]=_[_0xdc5d('0x26')](_0x5afba4,_0xdc5d('0x24'));_0x1f5ccf[_0xdc5d('0x2c')]=_['keys'](_0x10f3b8[_0xdc5d('0x2c')]);_0x1f5ccf[_0xdc5d('0x2d')]=_['intersection'](_0x1f5ccf[_0xdc5d('0x2b')],_0x1f5ccf['query']);_0x19922a['attributes']=_[_0xdc5d('0x2e')](_0x1f5ccf['model'],qs[_0xdc5d('0x2f')](_0x10f3b8[_0xdc5d('0x2c')][_0xdc5d('0x2f')]));_0x19922a['attributes']=_0x19922a[_0xdc5d('0x30')]['length']?_0x19922a['attributes']:_0x1f5ccf[_0xdc5d('0x2b')];if(!_0x10f3b8[_0xdc5d('0x2c')][_0xdc5d('0x31')]('nolimit')){_0x19922a['limit']=qs[_0xdc5d('0x1b')](_0x10f3b8['query'][_0xdc5d('0x1b')]);_0x19922a[_0xdc5d('0x1a')]=qs['offset'](_0x10f3b8[_0xdc5d('0x2c')][_0xdc5d('0x1a')]);}_0x19922a[_0xdc5d('0x32')]=qs[_0xdc5d('0x33')](_0x10f3b8[_0xdc5d('0x2c')]['sort']);_0x19922a['where']=qs[_0xdc5d('0x2d')](_['pick'](_0x10f3b8['query'],_0x1f5ccf['filters']));if(_0x10f3b8[_0xdc5d('0x2c')][_0xdc5d('0x34')]){_0x19922a['where']=_[_0xdc5d('0x35')](_0x19922a[_0xdc5d('0x36')],{'$or':_[_0xdc5d('0x26')](_0x5afba4,function(_0x333019){if(_0x333019[_0xdc5d('0x29')]!==_0xdc5d('0x37')){var _0x365399={};_0x365399[_0x333019[_0xdc5d('0x24')]]={'$like':'%'+_0x10f3b8[_0xdc5d('0x2c')][_0xdc5d('0x34')]+'%'};return _0x365399;}})});}_0x19922a=_[_0xdc5d('0x35')]({},_0x19922a,_0x10f3b8[_0xdc5d('0x38')]);var _0x748e27={'where':_0x19922a[_0xdc5d('0x36')]};return db[_0xdc5d('0x27')][_0xdc5d('0x19')](_0x748e27)['then'](function(_0x4b01d9){_0x465fdf['count']=_0x4b01d9;if(_0x10f3b8[_0xdc5d('0x2c')][_0xdc5d('0x39')]){_0x19922a[_0xdc5d('0x3a')]=[{'all':!![]}];}return db[_0xdc5d('0x27')][_0xdc5d('0x3b')](_0x19922a);})['then'](function(_0xe2c743){_0x465fdf[_0xdc5d('0x3c')]=_0xe2c743;return _0x465fdf;})[_0xdc5d('0x20')](respondWithFilteredResult(_0x319b64,_0x19922a))[_0xdc5d('0x3d')](handleError(_0x319b64,null));};exports['show']=function(_0x59dfaa,_0x3c6bbc){var _0x4f2ae1={'raw':!![],'where':{'id':_0x59dfaa[_0xdc5d('0x3e')]['id']}},_0x62b9c4={};_0x62b9c4[_0xdc5d('0x2b')]=_[_0xdc5d('0x3f')](db[_0xdc5d('0x27')]['rawAttributes']);_0x62b9c4[_0xdc5d('0x2c')]=_[_0xdc5d('0x3f')](_0x59dfaa[_0xdc5d('0x2c')]);_0x62b9c4[_0xdc5d('0x2d')]=_[_0xdc5d('0x2e')](_0x62b9c4[_0xdc5d('0x2b')],_0x62b9c4[_0xdc5d('0x2c')]);_0x4f2ae1[_0xdc5d('0x30')]=_[_0xdc5d('0x2e')](_0x62b9c4[_0xdc5d('0x2b')],qs[_0xdc5d('0x2f')](_0x59dfaa[_0xdc5d('0x2c')][_0xdc5d('0x2f')]));_0x4f2ae1[_0xdc5d('0x30')]=_0x4f2ae1[_0xdc5d('0x30')][_0xdc5d('0x40')]?_0x4f2ae1[_0xdc5d('0x30')]:_0x62b9c4[_0xdc5d('0x2b')];if(_0x59dfaa['query'][_0xdc5d('0x39')]){_0x4f2ae1[_0xdc5d('0x3a')]=[{'all':!![]}];}_0x4f2ae1=_[_0xdc5d('0x35')]({},_0x4f2ae1,_0x59dfaa[_0xdc5d('0x38')]);return db[_0xdc5d('0x27')][_0xdc5d('0x41')](_0x4f2ae1)[_0xdc5d('0x20')](handleEntityNotFound(_0x3c6bbc,null))[_0xdc5d('0x20')](respondWithResult(_0x3c6bbc,null))[_0xdc5d('0x3d')](handleError(_0x3c6bbc,null));};exports[_0xdc5d('0x42')]=function(_0x1061ba,_0x131160){return db['ServicenowField']['create'](_0x1061ba['body'],{})['then'](respondWithResult(_0x131160,0xc9))[_0xdc5d('0x3d')](handleError(_0x131160,null));};exports[_0xdc5d('0x1f')]=function(_0x5ec04a,_0x469a22){if(_0x5ec04a[_0xdc5d('0x43')]['id']){delete _0x5ec04a[_0xdc5d('0x43')]['id'];}return db[_0xdc5d('0x27')][_0xdc5d('0x41')]({'where':{'id':_0x5ec04a[_0xdc5d('0x3e')]['id']}})['then'](handleEntityNotFound(_0x469a22,null))[_0xdc5d('0x20')](saveUpdates(_0x5ec04a[_0xdc5d('0x43')],null))[_0xdc5d('0x20')](respondWithResult(_0x469a22,null))[_0xdc5d('0x3d')](handleError(_0x469a22,null));};exports[_0xdc5d('0x21')]=function(_0x371618,_0x150366){return db[_0xdc5d('0x27')][_0xdc5d('0x41')]({'where':{'id':_0x371618[_0xdc5d('0x3e')]['id']}})['then'](handleEntityNotFound(_0x150366,null))[_0xdc5d('0x20')](removeEntity(_0x150366,null))['catch'](handleError(_0x150366,null));};
\ No newline at end of file
diff --git a/server/api/intServicenowField/intServicenowField.model.js b/server/api/intServicenowField/intServicenowField.model.js
index 41fdb44..a117afe 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 _0xd416=['ServicenowField','servicenow_unique_index','idField','FieldId','lodash','util','api','moment','bluebird','request-promise','rimraf','./intServicenowField.attributes','exports','define'];(function(_0x417781,_0x49c2b7){var _0x5017eb=function(_0x28ec7b){while(--_0x28ec7b){_0x417781['push'](_0x417781['shift']());}};_0x5017eb(++_0x49c2b7);}(_0xd416,0x170));var _0x6d41=function(_0x290832,_0x5b0f71){_0x290832=_0x290832-0x0;var _0x471d59=_0xd416[_0x290832];return _0x471d59;};'use strict';var _=require(_0x6d41('0x0'));var util=require(_0x6d41('0x1'));var logger=require('../../config/logger')(_0x6d41('0x2'));var moment=require(_0x6d41('0x3'));var BPromise=require(_0x6d41('0x4'));var rp=require(_0x6d41('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6d41('0x6'));var config=require('../../config/environment');var attributes=require(_0x6d41('0x7'));module[_0x6d41('0x8')]=function(_0x522ea2,_0x1e66c8){return _0x522ea2[_0x6d41('0x9')](_0x6d41('0xa'),attributes,{'tableName':'int_servicenow_fields','paranoid':![],'indexes':[{'name':_0x6d41('0xb'),'fields':[_0x6d41('0xc'),_0x6d41('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x3c34=['ServicenowField','int_servicenow_fields','idField','FieldId','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./intServicenowField.attributes','define'];(function(_0x51724e,_0x4f4bab){var _0x9776ef=function(_0x15c3cf){while(--_0x15c3cf){_0x51724e['push'](_0x51724e['shift']());}};_0x9776ef(++_0x4f4bab);}(_0x3c34,0x162));var _0x43c3=function(_0x2b8077,_0x453634){_0x2b8077=_0x2b8077-0x0;var _0x308091=_0x3c34[_0x2b8077];return _0x308091;};'use strict';var _=require(_0x43c3('0x0'));var util=require('util');var logger=require(_0x43c3('0x1'))(_0x43c3('0x2'));var moment=require('moment');var BPromise=require(_0x43c3('0x3'));var rp=require(_0x43c3('0x4'));var fs=require('fs');var path=require(_0x43c3('0x5'));var rimraf=require(_0x43c3('0x6'));var config=require(_0x43c3('0x7'));var attributes=require(_0x43c3('0x8'));module['exports']=function(_0x1456c6,_0x975508){return _0x1456c6[_0x43c3('0x9')](_0x43c3('0xa'),attributes,{'tableName':_0x43c3('0xb'),'paranoid':![],'indexes':[{'name':'servicenow_unique_index','fields':[_0x43c3('0xc'),_0x43c3('0xd')],'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 40163c0..ad2213b 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 _0x488e=['message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','http','request','ServicenowField,\x20%s,\x20%s','request\x20sent','debug','error'];(function(_0x170994,_0x5adc66){var _0x3c89a3=function(_0x53e7e1){while(--_0x53e7e1){_0x170994['push'](_0x170994['shift']());}};_0x3c89a3(++_0x5adc66);}(_0x488e,0xd5));var _0xe488=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x488e[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xe488('0x0'));var util=require(_0xe488('0x1'));var moment=require(_0xe488('0x2'));var BPromise=require(_0xe488('0x3'));var rs=require(_0xe488('0x4'));var fs=require('fs');var Redis=require(_0xe488('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xe488('0x6'));var logger=require(_0xe488('0x7'))(_0xe488('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xe488('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2f8fe8,_0xcf08e0,_0x309d85){return new BPromise(function(_0x2558ea,_0x338681){return client[_0xe488('0xa')](_0x2f8fe8,_0x309d85)['then'](function(_0x206905){logger['info'](_0xe488('0xb'),_0xcf08e0,_0xe488('0xc'));logger[_0xe488('0xd')]('ServicenowField,\x20%s,\x20%s,\x20%s',_0xcf08e0,'request\x20sent',JSON['stringify'](_0x206905));if(_0x206905[_0xe488('0xe')]){if(_0x206905[_0xe488('0xe')]['code']===0x1f4){logger[_0xe488('0xe')](_0xe488('0xb'),_0xcf08e0,_0x206905[_0xe488('0xe')][_0xe488('0xf')]);return _0x338681(_0x206905[_0xe488('0xe')]['message']);}logger[_0xe488('0xe')](_0xe488('0xb'),_0xcf08e0,_0x206905[_0xe488('0xe')]['message']);return _0x2558ea(_0x206905[_0xe488('0xe')][_0xe488('0xf')]);}else{logger[_0xe488('0x10')]('ServicenowField,\x20%s,\x20%s',_0xcf08e0,'request\x20sent');_0x2558ea(_0x206905[_0xe488('0x11')][_0xe488('0xf')]);}})[_0xe488('0x12')](function(_0x521aac){logger['error'](_0xe488('0xb'),_0xcf08e0,_0x521aac);_0x338681(_0x521aac);});});}
\ No newline at end of file
+var _0x7c31=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','ServicenowField,\x20%s,\x20%s','request\x20sent','debug','ServicenowField,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb'];(function(_0x5c9df0,_0x3cfaf6){var _0x5e45c2=function(_0x19d30b){while(--_0x19d30b){_0x5c9df0['push'](_0x5c9df0['shift']());}};_0x5e45c2(++_0x3cfaf6);}(_0x7c31,0x10e));var _0x17c3=function(_0xdfac90,_0x58ff7b){_0xdfac90=_0xdfac90-0x0;var _0x1c3bc9=_0x7c31[_0xdfac90];return _0x1c3bc9;};'use strict';var _=require(_0x17c3('0x0'));var util=require(_0x17c3('0x1'));var moment=require(_0x17c3('0x2'));var BPromise=require('bluebird');var rs=require(_0x17c3('0x3'));var fs=require('fs');var Redis=require(_0x17c3('0x4'));var db=require(_0x17c3('0x5'))['db'];var utils=require(_0x17c3('0x6'));var logger=require(_0x17c3('0x7'))(_0x17c3('0x8'));var config=require(_0x17c3('0x9'));var jayson=require(_0x17c3('0xa'));var client=jayson['client'][_0x17c3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4dd097,_0x4d334c,_0x64f415){return new BPromise(function(_0x5a479e,_0x13f75d){return client[_0x17c3('0xc')](_0x4dd097,_0x64f415)['then'](function(_0x5023a8){logger[_0x17c3('0xd')](_0x17c3('0xe'),_0x4d334c,_0x17c3('0xf'));logger[_0x17c3('0x10')](_0x17c3('0x11'),_0x4d334c,_0x17c3('0xf'),JSON['stringify'](_0x5023a8));if(_0x5023a8[_0x17c3('0x12')]){if(_0x5023a8[_0x17c3('0x12')][_0x17c3('0x13')]===0x1f4){logger['error'](_0x17c3('0xe'),_0x4d334c,_0x5023a8[_0x17c3('0x12')][_0x17c3('0x14')]);return _0x13f75d(_0x5023a8['error'][_0x17c3('0x14')]);}logger[_0x17c3('0x12')](_0x17c3('0xe'),_0x4d334c,_0x5023a8[_0x17c3('0x12')][_0x17c3('0x14')]);return _0x5a479e(_0x5023a8[_0x17c3('0x12')][_0x17c3('0x14')]);}else{logger[_0x17c3('0xd')]('ServicenowField,\x20%s,\x20%s',_0x4d334c,'request\x20sent');_0x5a479e(_0x5023a8[_0x17c3('0x15')][_0x17c3('0x14')]);}})[_0x17c3('0x16')](function(_0x16b3e4){logger['error']('ServicenowField,\x20%s,\x20%s',_0x4d334c,_0x16b3e4);_0x13f75d(_0x16b3e4);});});}
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/index.js b/server/api/intSugarcrmAccount/index.js
index a5aa277..0fe90c1 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 _0x8d37=['/:id/configurations','addConfiguration','update','delete','destroy','exports','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','./intSugarcrmAccount.controller','isAuthenticated','index','get','/:id','show','getFields','post','create'];(function(_0x22ece4,_0x1d2a23){var _0x26b7a3=function(_0x215cc2){while(--_0x215cc2){_0x22ece4['push'](_0x22ece4['shift']());}};_0x26b7a3(++_0x1d2a23);}(_0x8d37,0xc3));var _0x78d3=function(_0x4de7bc,_0x165c80){_0x4de7bc=_0x4de7bc-0x0;var _0x210fd2=_0x8d37[_0x4de7bc];return _0x210fd2;};'use strict';var multer=require('multer');var util=require(_0x78d3('0x0'));var path=require(_0x78d3('0x1'));var timeout=require(_0x78d3('0x2'));var express=require(_0x78d3('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x78d3('0x4'));var config=require(_0x78d3('0x5'));var controller=require(_0x78d3('0x6'));router['get']('/',auth[_0x78d3('0x7')](),controller[_0x78d3('0x8')]);router[_0x78d3('0x9')](_0x78d3('0xa'),auth[_0x78d3('0x7')](),controller[_0x78d3('0xb')]);router[_0x78d3('0x9')]('/:id/configurations',auth[_0x78d3('0x7')](),controller['getConfigurations']);router['get']('/:id/fields',auth[_0x78d3('0x7')](),controller[_0x78d3('0xc')]);router[_0x78d3('0xd')]('/',auth[_0x78d3('0x7')](),controller[_0x78d3('0xe')]);router[_0x78d3('0xd')](_0x78d3('0xf'),auth[_0x78d3('0x7')](),controller[_0x78d3('0x10')]);router['put'](_0x78d3('0xa'),auth['isAuthenticated'](),controller[_0x78d3('0x11')]);router[_0x78d3('0x12')](_0x78d3('0xa'),auth['isAuthenticated'](),controller[_0x78d3('0x13')]);module[_0x78d3('0x14')]=router;
\ No newline at end of file
+var _0xdc84=['create','post','addConfiguration','update','delete','/:id','destroy','exports','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','./intSugarcrmAccount.controller','get','isAuthenticated','index','show','/:id/configurations','getConfigurations','/:id/fields','getFields'];(function(_0x49ca6b,_0x3ba842){var _0x1d957f=function(_0x12ef94){while(--_0x12ef94){_0x49ca6b['push'](_0x49ca6b['shift']());}};_0x1d957f(++_0x3ba842);}(_0xdc84,0x11c));var _0x4dc8=function(_0x36436d,_0x20292c){_0x36436d=_0x36436d-0x0;var _0x34615d=_0xdc84[_0x36436d];return _0x34615d;};'use strict';var multer=require(_0x4dc8('0x0'));var util=require(_0x4dc8('0x1'));var path=require('path');var timeout=require(_0x4dc8('0x2'));var express=require(_0x4dc8('0x3'));var router=express['Router']();var auth=require(_0x4dc8('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x4dc8('0x5'));var controller=require(_0x4dc8('0x6'));router[_0x4dc8('0x7')]('/',auth[_0x4dc8('0x8')](),controller[_0x4dc8('0x9')]);router[_0x4dc8('0x7')]('/:id',auth['isAuthenticated'](),controller[_0x4dc8('0xa')]);router[_0x4dc8('0x7')](_0x4dc8('0xb'),auth['isAuthenticated'](),controller[_0x4dc8('0xc')]);router[_0x4dc8('0x7')](_0x4dc8('0xd'),auth[_0x4dc8('0x8')](),controller[_0x4dc8('0xe')]);router['post']('/',auth[_0x4dc8('0x8')](),controller[_0x4dc8('0xf')]);router[_0x4dc8('0x10')](_0x4dc8('0xb'),auth[_0x4dc8('0x8')](),controller[_0x4dc8('0x11')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x4dc8('0x12')]);router[_0x4dc8('0x13')](_0x4dc8('0x14'),auth[_0x4dc8('0x8')](),controller[_0x4dc8('0x15')]);module[_0x4dc8('0x16')]=router;
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js
index 6e362f0..62158ef 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 _0x59a8=['remoteUri','sequelize','exports','STRING','username'];(function(_0x221d31,_0x1020c4){var _0x510a21=function(_0x4521dd){while(--_0x4521dd){_0x221d31['push'](_0x221d31['shift']());}};_0x510a21(++_0x1020c4);}(_0x59a8,0x100));var _0x859a=function(_0x2ebec1,_0x568b82){_0x2ebec1=_0x2ebec1-0x0;var _0xaeaa47=_0x59a8[_0x2ebec1];return _0xaeaa47;};'use strict';var Sequelize=require(_0x859a('0x0'));module[_0x859a('0x1')]={'name':{'type':Sequelize[_0x859a('0x2')]},'description':{'type':Sequelize[_0x859a('0x2')]},'username':{'type':Sequelize[_0x859a('0x2')],'unique':_0x859a('0x3')},'password':{'type':Sequelize[_0x859a('0x2')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x859a('0x4')},'serverUrl':{'type':Sequelize[_0x859a('0x2')]}};
\ No newline at end of file
+var _0xc7cb=['username','remoteUri','sequelize','exports','STRING'];(function(_0xa9e5a0,_0x51fafb){var _0x21b584=function(_0x78cb37){while(--_0x78cb37){_0xa9e5a0['push'](_0xa9e5a0['shift']());}};_0x21b584(++_0x51fafb);}(_0xc7cb,0x115));var _0xbc7c=function(_0x10b15d,_0x3cc5b5){_0x10b15d=_0x10b15d-0x0;var _0x44dd13=_0xc7cb[_0x10b15d];return _0x44dd13;};'use strict';var Sequelize=require(_0xbc7c('0x0'));module[_0xbc7c('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xbc7c('0x2')]},'username':{'type':Sequelize[_0xbc7c('0x2')],'unique':_0xbc7c('0x3')},'password':{'type':Sequelize[_0xbc7c('0x2')]},'remoteUri':{'type':Sequelize[_0xbc7c('0x2')],'unique':_0xbc7c('0x4')},'serverUrl':{'type':Sequelize[_0xbc7c('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js
index 22c8af1..02c7117 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 _0x3c5c=['crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','Sequelize','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','debug','stringify','error','code','message','info','result','catch','status','json','count','offset','limit','Content-Range','apply','reject','save','update','destroy','end','name','send','index','map','SugarcrmAccount','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','include','findAll','show','keys','includeAll','create','body','find','params','findOne','SugarcrmConfiguration','getConfigurations','addConfiguration','AccountId','channel','Descriptions','SugarcrmField','Subjects','getFields','assigned_user_id','created_by','description','date_start','duration_hours','duration_minutes','parent_id','parent_name','username','password','remoteUri','slice','substring','lastIndexOf','POST','format','/service/v4_1/rest.php','login','JSON','PLAIN','xCALLY\x20Motion\x20Integration','Invalid\x20Login','%s%s','get_module_fields','Calls','values','module_fields','remove','includes','label','endsWith','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','squel'];(function(_0x1ab61a,_0xa33b62){var _0x5073f4=function(_0x4d5e74){while(--_0x4d5e74){_0x1ab61a['push'](_0x1ab61a['shift']());}};_0x5073f4(++_0xa33b62);}(_0x3c5c,0xfd));var _0xc3c5=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x3c5c[_0x618414];return _0x21c19a;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xc3c5('0x0'));var rimraf=require(_0xc3c5('0x1'));var zipdir=require(_0xc3c5('0x2'));var jsonpatch=require(_0xc3c5('0x3'));var rp=require(_0xc3c5('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xc3c5('0x5'));var util=require('util');var path=require(_0xc3c5('0x6'));var sox=require(_0xc3c5('0x7'));var csv=require(_0xc3c5('0x8'));var ejs=require(_0xc3c5('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xc3c5('0xa'));var crypto=require(_0xc3c5('0xb'));var jsforce=require(_0xc3c5('0xc'));var deskjs=require(_0xc3c5('0xd'));var toCsv=require(_0xc3c5('0x8'));var querystring=require('querystring');var Papa=require(_0xc3c5('0xe'));var Redis=require(_0xc3c5('0xf'));var authService=require(_0xc3c5('0x10'));var qs=require(_0xc3c5('0x11'));var as=require(_0xc3c5('0x12'));var hardwareService=require(_0xc3c5('0x13'));var logger=require(_0xc3c5('0x14'))(_0xc3c5('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0xc3c5('0x16'))['db'];var integrations=require(_0xc3c5('0x17'));var jayson=require(_0xc3c5('0x18'));var client=jayson[_0xc3c5('0x19')]['http']({'port':0x232a});function checkPasswordPattern(_0x4ffab9,_0x518a5a,_0x237bea){if(_0x237bea){var _0x432546=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x432546['test'](_0x518a5a)){return _0x4ffab9;}else{throw new db[(_0xc3c5('0x1a'))]['ValidationError'](_0xc3c5('0x1b'));}}else{return _0x4ffab9;}}function respondWithRpcPromise(_0x21c4fa,_0x220b0c,_0x2b81e3,_0x56ee6b){return new BPromise(function(_0x3d3d8e,_0x4f4fdf){var _0x364358=_0x56ee6b||client;return _0x364358[_0xc3c5('0x1c')](_0x21c4fa,_0x2b81e3)[_0xc3c5('0x1d')](function(_0x38e8c6){logger['info'](_0xc3c5('0x1e'),_0x220b0c,_0xc3c5('0x1f'));logger[_0xc3c5('0x20')]('SugarcrmAccount,\x20%s,\x20%s,\x20%s',_0x220b0c,_0xc3c5('0x1f'),JSON[_0xc3c5('0x21')](_0x38e8c6));if(_0x38e8c6[_0xc3c5('0x22')]){if(_0x38e8c6['error'][_0xc3c5('0x23')]===0x1f4){logger[_0xc3c5('0x22')](_0xc3c5('0x1e'),_0x220b0c,_0x38e8c6['error']['message']);return _0x4f4fdf(_0x38e8c6[_0xc3c5('0x22')][_0xc3c5('0x24')]);}logger['error'](_0xc3c5('0x1e'),_0x220b0c,_0x38e8c6[_0xc3c5('0x22')]['message']);return _0x3d3d8e(_0x38e8c6['error'][_0xc3c5('0x24')]);}else{logger[_0xc3c5('0x25')](_0xc3c5('0x1e'),_0x220b0c,_0xc3c5('0x1f'));_0x3d3d8e(_0x38e8c6[_0xc3c5('0x26')]['message']);}})[_0xc3c5('0x27')](function(_0xf08921){logger['error']('SugarcrmAccount,\x20%s,\x20%s',_0x220b0c,_0xf08921);_0x4f4fdf(_0xf08921);});});}function respondWithStatusCode(_0x30d0bb,_0x44d0e8){_0x44d0e8=_0x44d0e8||0xcc;return function(_0x5cd5fd){if(_0x5cd5fd){return _0x30d0bb['sendStatus'](_0x44d0e8);}return _0x30d0bb[_0xc3c5('0x28')](_0x44d0e8)['end']();};}function respondWithResult(_0xcb4e14,_0x2c0277){_0x2c0277=_0x2c0277||0xc8;return function(_0x552e49){if(_0x552e49){return _0xcb4e14[_0xc3c5('0x28')](_0x2c0277)[_0xc3c5('0x29')](_0x552e49);}};}function respondWithFilteredResult(_0xcaf206,_0x327b61){return function(_0x1c2c21){if(_0x1c2c21){var _0x5b9028=_0x1c2c21[_0xc3c5('0x2a')],_0x4e76a6=_0x327b61['offset'],_0x50c33d=_0x327b61[_0xc3c5('0x2b')]+_0x327b61[_0xc3c5('0x2c')],_0x29980d;if(_0x50c33d>=_0x5b9028){_0x50c33d=_0x5b9028;_0x29980d=0xc8;}else{_0x29980d=0xce;}_0xcaf206['status'](_0x29980d);return _0xcaf206['set'](_0xc3c5('0x2d'),_0x4e76a6+'-'+_0x50c33d+'/'+_0x5b9028)[_0xc3c5('0x29')](_0x1c2c21);}return null;};}function patchUpdates(_0xf65780){return function(_0x6811a2){try{jsonpatch[_0xc3c5('0x2e')](_0x6811a2,_0xf65780,!![]);}catch(_0x1f3648){return BPromise[_0xc3c5('0x2f')](_0x1f3648);}return _0x6811a2[_0xc3c5('0x30')]();};}function saveUpdates(_0x231963,_0x3c3914){return function(_0x481f6f){if(_0x481f6f){return _0x481f6f[_0xc3c5('0x31')](_0x231963)['then'](function(_0x1ab8d8){return _0x1ab8d8;});}return null;};}function removeEntity(_0x417827,_0x4e246a){return function(_0x12c73b){if(_0x12c73b){return _0x12c73b[_0xc3c5('0x32')]()[_0xc3c5('0x1d')](function(){_0x417827[_0xc3c5('0x28')](0xcc)[_0xc3c5('0x33')]();});}};}function handleEntityNotFound(_0x27cd15,_0x3e2fe8){return function(_0x55636a){if(!_0x55636a){_0x27cd15['sendStatus'](0x194);}return _0x55636a;};}function handleError(_0x205812,_0x560c95){_0x560c95=_0x560c95||0x1f4;return function(_0x573141){logger[_0xc3c5('0x22')](_0x573141['stack']);if(_0x573141[_0xc3c5('0x34')]){delete _0x573141['name'];}_0x205812[_0xc3c5('0x28')](_0x560c95)[_0xc3c5('0x35')](_0x573141);};}exports[_0xc3c5('0x36')]=function(_0x51a473,_0x59fa03){var _0x362a0c={},_0x514e5d={},_0x525ac0={'count':0x0,'rows':[]};var _0x1a7001=_[_0xc3c5('0x37')](db[_0xc3c5('0x38')][_0xc3c5('0x39')],function(_0x572321){return{'name':_0x572321[_0xc3c5('0x3a')],'type':_0x572321[_0xc3c5('0x3b')][_0xc3c5('0x3c')]};});_0x514e5d[_0xc3c5('0x3d')]=_[_0xc3c5('0x37')](_0x1a7001,'name');_0x514e5d['query']=_['keys'](_0x51a473[_0xc3c5('0x3e')]);_0x514e5d[_0xc3c5('0x3f')]=_[_0xc3c5('0x40')](_0x514e5d[_0xc3c5('0x3d')],_0x514e5d[_0xc3c5('0x3e')]);_0x362a0c[_0xc3c5('0x41')]=_[_0xc3c5('0x40')](_0x514e5d[_0xc3c5('0x3d')],qs[_0xc3c5('0x42')](_0x51a473['query'][_0xc3c5('0x42')]));_0x362a0c[_0xc3c5('0x41')]=_0x362a0c[_0xc3c5('0x41')][_0xc3c5('0x43')]?_0x362a0c[_0xc3c5('0x41')]:_0x514e5d[_0xc3c5('0x3d')];if(!_0x51a473['query'][_0xc3c5('0x44')](_0xc3c5('0x45'))){_0x362a0c[_0xc3c5('0x2c')]=qs['limit'](_0x51a473[_0xc3c5('0x3e')][_0xc3c5('0x2c')]);_0x362a0c[_0xc3c5('0x2b')]=qs['offset'](_0x51a473[_0xc3c5('0x3e')][_0xc3c5('0x2b')]);}_0x362a0c[_0xc3c5('0x46')]=qs['sort'](_0x51a473['query'][_0xc3c5('0x47')]);_0x362a0c['where']=qs[_0xc3c5('0x3f')](_[_0xc3c5('0x48')](_0x51a473['query'],_0x514e5d['filters']));if(_0x51a473[_0xc3c5('0x3e')][_0xc3c5('0x49')]){_0x362a0c[_0xc3c5('0x4a')]=_[_0xc3c5('0x4b')](_0x362a0c[_0xc3c5('0x4a')],{'$or':_[_0xc3c5('0x37')](_0x1a7001,function(_0x3a0215){if(_0x3a0215[_0xc3c5('0x3b')]!==_0xc3c5('0x4c')){var _0x2b3fbc={};_0x2b3fbc[_0x3a0215[_0xc3c5('0x34')]]={'$like':'%'+_0x51a473[_0xc3c5('0x3e')][_0xc3c5('0x49')]+'%'};return _0x2b3fbc;}})});}_0x362a0c=_[_0xc3c5('0x4b')]({},_0x362a0c,_0x51a473[_0xc3c5('0x4d')]);var _0x5f3fb6={'where':_0x362a0c[_0xc3c5('0x4a')]};return db[_0xc3c5('0x38')][_0xc3c5('0x2a')](_0x5f3fb6)['then'](function(_0x2eab05){_0x525ac0['count']=_0x2eab05;if(_0x51a473['query']['includeAll']){_0x362a0c[_0xc3c5('0x4e')]=[{'all':!![]}];}return db[_0xc3c5('0x38')][_0xc3c5('0x4f')](_0x362a0c);})[_0xc3c5('0x1d')](function(_0x36b32e){_0x525ac0['rows']=_0x36b32e;return _0x525ac0;})['then'](respondWithFilteredResult(_0x59fa03,_0x362a0c))[_0xc3c5('0x27')](handleError(_0x59fa03,null));};exports[_0xc3c5('0x50')]=function(_0x420d44,_0x5dc0b3){var _0x280d92={'raw':![],'where':{'id':_0x420d44['params']['id']}},_0x2ef5f4={};_0x2ef5f4[_0xc3c5('0x3d')]=_[_0xc3c5('0x51')](db[_0xc3c5('0x38')]['rawAttributes']);_0x2ef5f4[_0xc3c5('0x3e')]=_[_0xc3c5('0x51')](_0x420d44['query']);_0x2ef5f4[_0xc3c5('0x3f')]=_['intersection'](_0x2ef5f4[_0xc3c5('0x3d')],_0x2ef5f4[_0xc3c5('0x3e')]);_0x280d92[_0xc3c5('0x41')]=_[_0xc3c5('0x40')](_0x2ef5f4[_0xc3c5('0x3d')],qs['fields'](_0x420d44[_0xc3c5('0x3e')][_0xc3c5('0x42')]));_0x280d92[_0xc3c5('0x41')]=_0x280d92[_0xc3c5('0x41')][_0xc3c5('0x43')]?_0x280d92[_0xc3c5('0x41')]:_0x2ef5f4[_0xc3c5('0x3d')];if(_0x420d44[_0xc3c5('0x3e')][_0xc3c5('0x52')]){_0x280d92['include']=[{'all':!![]}];}_0x280d92=_['merge']({},_0x280d92,_0x420d44[_0xc3c5('0x4d')]);return db['SugarcrmAccount']['find'](_0x280d92)[_0xc3c5('0x1d')](handleEntityNotFound(_0x5dc0b3,null))[_0xc3c5('0x1d')](respondWithResult(_0x5dc0b3,null))['catch'](handleError(_0x5dc0b3,null));};exports['create']=function(_0x563968,_0x3e285f){return db[_0xc3c5('0x38')][_0xc3c5('0x53')](_0x563968[_0xc3c5('0x54')],{})[_0xc3c5('0x1d')](respondWithResult(_0x3e285f,0xc9))['catch'](handleError(_0x3e285f,null));};exports['update']=function(_0x49ab41,_0x43ff30){if(_0x49ab41['body']['id']){delete _0x49ab41[_0xc3c5('0x54')]['id'];}return db[_0xc3c5('0x38')][_0xc3c5('0x55')]({'where':{'id':_0x49ab41[_0xc3c5('0x56')]['id']}})[_0xc3c5('0x1d')](handleEntityNotFound(_0x43ff30,null))[_0xc3c5('0x1d')](saveUpdates(_0x49ab41[_0xc3c5('0x54')],null))['then'](respondWithResult(_0x43ff30,null))['catch'](handleError(_0x43ff30,null));};exports[_0xc3c5('0x32')]=function(_0x3664b3,_0x116479){return db[_0xc3c5('0x38')][_0xc3c5('0x55')]({'where':{'id':_0x3664b3['params']['id']}})[_0xc3c5('0x1d')](handleEntityNotFound(_0x116479,null))['then'](removeEntity(_0x116479,null))['catch'](handleError(_0x116479,null));};exports['getConfigurations']=function(_0x334a09,_0x4a7b45,_0x4174fd){var _0x5927a9={};var _0x614b15={};var _0x53cf77;var _0x42eeb5;return db[_0xc3c5('0x38')][_0xc3c5('0x57')]({'where':{'id':_0x334a09['params']['id']}})[_0xc3c5('0x1d')](handleEntityNotFound(_0x4a7b45,null))['then'](function(_0x176057){if(_0x176057){_0x53cf77=_0x176057;_0x614b15[_0xc3c5('0x3d')]=_[_0xc3c5('0x51')](db[_0xc3c5('0x58')][_0xc3c5('0x39')]);_0x614b15[_0xc3c5('0x3e')]=_['keys'](_0x334a09[_0xc3c5('0x3e')]);_0x614b15[_0xc3c5('0x3f')]=_[_0xc3c5('0x40')](_0x614b15[_0xc3c5('0x3d')],_0x614b15[_0xc3c5('0x3e')]);_0x5927a9[_0xc3c5('0x41')]=_[_0xc3c5('0x40')](_0x614b15[_0xc3c5('0x3d')],qs[_0xc3c5('0x42')](_0x334a09[_0xc3c5('0x3e')]['fields']));_0x5927a9['attributes']=_0x5927a9[_0xc3c5('0x41')][_0xc3c5('0x43')]?_0x5927a9[_0xc3c5('0x41')]:_0x614b15[_0xc3c5('0x3d')];_0x5927a9[_0xc3c5('0x46')]=qs[_0xc3c5('0x47')](_0x334a09[_0xc3c5('0x3e')]['sort']);_0x5927a9[_0xc3c5('0x4a')]=qs[_0xc3c5('0x3f')](_['pick'](_0x334a09[_0xc3c5('0x3e')],_0x614b15['filters']));if(_0x334a09[_0xc3c5('0x3e')]['filter']){_0x5927a9[_0xc3c5('0x4a')]=_[_0xc3c5('0x4b')](_0x5927a9[_0xc3c5('0x4a')],{'$or':_[_0xc3c5('0x37')](_0x5927a9[_0xc3c5('0x41')],function(_0x57a3fd){var _0x195ad3={};_0x195ad3[_0x57a3fd]={'$like':'%'+_0x334a09[_0xc3c5('0x3e')]['filter']+'%'};return _0x195ad3;})});}_0x5927a9=_['merge']({},_0x5927a9,_0x334a09[_0xc3c5('0x4d')]);return _0x53cf77[_0xc3c5('0x59')](_0x5927a9);}})['then'](function(_0x52394a){if(_0x52394a){_0x42eeb5=_0x52394a[_0xc3c5('0x43')];if(!_0x334a09[_0xc3c5('0x3e')][_0xc3c5('0x44')](_0xc3c5('0x45'))){_0x5927a9['limit']=qs['limit'](_0x334a09[_0xc3c5('0x3e')][_0xc3c5('0x2c')]);_0x5927a9[_0xc3c5('0x2b')]=qs['offset'](_0x334a09[_0xc3c5('0x3e')][_0xc3c5('0x2b')]);}return _0x53cf77[_0xc3c5('0x59')](_0x5927a9);}})['then'](function(_0x534c1e){if(_0x534c1e){return _0x534c1e?{'count':_0x42eeb5,'rows':_0x534c1e}:null;}})[_0xc3c5('0x1d')](respondWithResult(_0x4a7b45,null))[_0xc3c5('0x27')](handleError(_0x4a7b45,null));};exports[_0xc3c5('0x5a')]=function(_0x48a414,_0xf700f5,_0x450ad3){if(_0x48a414[_0xc3c5('0x54')]['id']){delete _0x48a414['body']['id'];}return db['SugarcrmAccount'][_0xc3c5('0x57')]({'where':{'id':_0x48a414[_0xc3c5('0x56')]['id']}})[_0xc3c5('0x1d')](handleEntityNotFound(_0xf700f5,null))[_0xc3c5('0x1d')](function(_0x397b35){if(_0x397b35){_0x48a414[_0xc3c5('0x54')][_0xc3c5('0x5b')]=_0x397b35['id'];_0x48a414[_0xc3c5('0x54')]['Subjects']=integrations['getSubjects'](_0x48a414[_0xc3c5('0x54')][_0xc3c5('0x5c')],_0x48a414[_0xc3c5('0x54')][_0xc3c5('0x3b')]);_0x48a414[_0xc3c5('0x54')][_0xc3c5('0x5d')]=integrations['getDescriptions'](_0x48a414[_0xc3c5('0x54')][_0xc3c5('0x5c')],_0x48a414[_0xc3c5('0x54')][_0xc3c5('0x3b')]);return db[_0xc3c5('0x58')][_0xc3c5('0x53')](_0x48a414[_0xc3c5('0x54')],{'include':[{'model':db[_0xc3c5('0x5e')],'as':_0xc3c5('0x5f')},{'model':db[_0xc3c5('0x5e')],'as':_0xc3c5('0x5d')}]});}return null;})[_0xc3c5('0x1d')](respondWithResult(_0xf700f5,null))[_0xc3c5('0x27')](handleError(_0xf700f5,null));};exports[_0xc3c5('0x60')]=function(_0x2ef945,_0x2a4480,_0x4fe0f2){var _0x27b1de='';var _0x5f32a8=['id',_0xc3c5('0x34'),_0xc3c5('0x61'),_0xc3c5('0x62'),_0xc3c5('0x63'),_0xc3c5('0x64'),_0xc3c5('0x65'),_0xc3c5('0x66'),_0xc3c5('0x67'),'parent_type',_0xc3c5('0x68'),'direction'];return db['SugarcrmAccount'][_0xc3c5('0x57')]({'where':{'id':_0x2ef945[_0xc3c5('0x56')]['id']},'attributes':['id',_0xc3c5('0x69'),_0xc3c5('0x6a'),_0xc3c5('0x6b')]})[_0xc3c5('0x1d')](handleEntityNotFound(_0x2a4480,null))[_0xc3c5('0x1d')](function(_0x2aeb12){if(_0x2aeb12){_0x27b1de=_0x2aeb12[_0xc3c5('0x6b')];var _0xbf4844=_0x27b1de[_0xc3c5('0x6c')](-0x1);if(_0xbf4844==='/'){_0x27b1de=_0x27b1de[_0xc3c5('0x6d')](0x0,_0x27b1de[_0xc3c5('0x6e')](_0xbf4844));}return rp({'method':_0xc3c5('0x6f'),'uri':util[_0xc3c5('0x70')]('%s%s',_0x27b1de,_0xc3c5('0x71')),'json':!![],'form':{'method':_0xc3c5('0x72'),'input_type':_0xc3c5('0x73'),'response_type':'JSON','rest_data':JSON[_0xc3c5('0x21')]({'user_auth':{'user_name':_0x2aeb12['username'],'password':_0x2aeb12['password'],'encryption':_0xc3c5('0x74')},'application':_0xc3c5('0x75')})}});}})[_0xc3c5('0x1d')](function(_0x3871af){if(_0x3871af&&_0x3871af['name']!==_0xc3c5('0x76')&&_0x3871af['name']!=='Password\x20Expired'){return rp({'method':'POST','uri':util[_0xc3c5('0x70')](_0xc3c5('0x77'),_0x27b1de,_0xc3c5('0x71')),'json':!![],'form':{'method':_0xc3c5('0x78'),'input_type':'JSON','response_type':_0xc3c5('0x73'),'rest_data':JSON[_0xc3c5('0x21')]({'session':_0x3871af['id'],'module_name':_0xc3c5('0x79')})}})[_0xc3c5('0x1d')](function(_0x1dd136){if(_0x1dd136){var _0x21db34=_[_0xc3c5('0x7a')](_0x1dd136[_0xc3c5('0x7b')]);_[_0xc3c5('0x7c')](_0x21db34,function(_0x4964ee){return _0x5f32a8[_0xc3c5('0x7d')](_0x4964ee[_0xc3c5('0x34')]);});return{'count':_0x21db34['length'],'rows':_['map'](_0x21db34,function(_0x1600fa){return{'id':_0x1600fa['name'],'name':_0x1600fa[_0xc3c5('0x7e')],'custom':_[_0xc3c5('0x7f')](_0x1600fa[_0xc3c5('0x34')],'_c')?!![]:![],'options':_0x1600fa[_0xc3c5('0x4d')]?_['map'](_[_0xc3c5('0x7a')](_0x1600fa[_0xc3c5('0x4d')]),function(_0x79a283){return{'name':_0x79a283['value'],'value':_0x79a283[_0xc3c5('0x34')]};}):[]};})};}})[_0xc3c5('0x1d')](respondWithResult(_0x2a4480,null))[_0xc3c5('0x27')](function(_0x78fb2a){var _0x1e587d=_0x2ef945[_0xc3c5('0x3e')][_0xc3c5('0x80')]?0x1f4:_0x78fb2a[_0xc3c5('0x81')]||0x1f4;logger[_0xc3c5('0x22')](_0xc3c5('0x82'),_0xc3c5('0x60'),_0x1e587d,JSON['stringify'](_0x78fb2a));delete _0x78fb2a[_0xc3c5('0x34')];if(_0x1e587d===0x191){_0x1e587d=0x190;}_0x2a4480[_0xc3c5('0x28')](_0x1e587d)[_0xc3c5('0x35')](_0x2ef945[_0xc3c5('0x3e')][_0xc3c5('0x80')]?{'message':_0xc3c5('0x83'),'statusCode':_0x78fb2a['statusCode']}:_0x78fb2a);});}else{var _0x2d0b12=0x1f4;_0x2a4480[_0xc3c5('0x28')](_0x2d0b12)[_0xc3c5('0x35')]({'message':_0xc3c5('0x83'),'statusCode':0x190});}});};
\ No newline at end of file
+var _0xf50f=['parent_name','direction','username','remoteUri','slice','substring','lastIndexOf','POST','%s%s','JSON','stringify','password','xCALLY\x20Motion\x20Integration','Invalid\x20Login','format','/service/v4_1/rest.php','remove','includes','endsWith','values','value','statusCode','Wrong\x20credentials','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','request\x20sent','debug','error','code','SugarcrmAccount,\x20%s,\x20%s','message','info','catch','sendStatus','end','json','count','offset','limit','status','set','apply','save','destroy','name','send','index','SugarcrmAccount','rawAttributes','type','model','map','filters','intersection','query','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','VIRTUAL','options','includeAll','findAll','show','keys','include','create','body','update','find','params','getConfigurations','SugarcrmConfiguration','length','findOne','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','channel','SugarcrmField','getFields','assigned_user_id','date_start','duration_hours','duration_minutes','parent_id','parent_type'];(function(_0x271a80,_0x268bac){var _0xf8233e=function(_0x825987){while(--_0x825987){_0x271a80['push'](_0x271a80['shift']());}};_0xf8233e(++_0x268bac);}(_0xf50f,0x113));var _0xff50=function(_0x5e8c7a,_0x18eb53){_0x5e8c7a=_0x5e8c7a-0x0;var _0x408701=_0xf50f[_0x5e8c7a];return _0x408701;};'use strict';var pdf=require(_0xff50('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xff50('0x1'));var zipdir=require(_0xff50('0x2'));var jsonpatch=require(_0xff50('0x3'));var rp=require(_0xff50('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xff50('0x5'));var path=require('path');var sox=require(_0xff50('0x6'));var csv=require(_0xff50('0x7'));var ejs=require(_0xff50('0x8'));var fs=require('fs');var _=require(_0xff50('0x9'));var squel=require(_0xff50('0xa'));var crypto=require(_0xff50('0xb'));var jsforce=require(_0xff50('0xc'));var deskjs=require(_0xff50('0xd'));var toCsv=require(_0xff50('0x7'));var querystring=require(_0xff50('0xe'));var Papa=require(_0xff50('0xf'));var Redis=require(_0xff50('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xff50('0x11'));var as=require(_0xff50('0x12'));var hardwareService=require(_0xff50('0x13'));var logger=require(_0xff50('0x14'))('api');var utils=require(_0xff50('0x15'));var config=require('../../config/environment');var db=require(_0xff50('0x16'))['db'];var integrations=require(_0xff50('0x17'));var jayson=require(_0xff50('0x18'));var client=jayson[_0xff50('0x19')][_0xff50('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x245439,_0x3c9e87,_0x35fd5d){if(_0x35fd5d){var _0x5ddd9f=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5ddd9f[_0xff50('0x1b')](_0x3c9e87)){return _0x245439;}else{throw new db[(_0xff50('0x1c'))][(_0xff50('0x1d'))](_0xff50('0x1e'));}}else{return _0x245439;}}function respondWithRpcPromise(_0x2b80f1,_0x50b8d6,_0x4f9abc,_0x3579d7){return new BPromise(function(_0x44e85e,_0x52bb55){var _0x1fc28f=_0x3579d7||client;return _0x1fc28f[_0xff50('0x1f')](_0x2b80f1,_0x4f9abc)[_0xff50('0x20')](function(_0x3819a4){logger['info']('SugarcrmAccount,\x20%s,\x20%s',_0x50b8d6,_0xff50('0x21'));logger[_0xff50('0x22')]('SugarcrmAccount,\x20%s,\x20%s,\x20%s',_0x50b8d6,'request\x20sent',JSON['stringify'](_0x3819a4));if(_0x3819a4[_0xff50('0x23')]){if(_0x3819a4[_0xff50('0x23')][_0xff50('0x24')]===0x1f4){logger['error'](_0xff50('0x25'),_0x50b8d6,_0x3819a4['error'][_0xff50('0x26')]);return _0x52bb55(_0x3819a4[_0xff50('0x23')]['message']);}logger[_0xff50('0x23')]('SugarcrmAccount,\x20%s,\x20%s',_0x50b8d6,_0x3819a4[_0xff50('0x23')]['message']);return _0x44e85e(_0x3819a4[_0xff50('0x23')][_0xff50('0x26')]);}else{logger[_0xff50('0x27')]('SugarcrmAccount,\x20%s,\x20%s',_0x50b8d6,_0xff50('0x21'));_0x44e85e(_0x3819a4['result'][_0xff50('0x26')]);}})[_0xff50('0x28')](function(_0x2802b1){logger[_0xff50('0x23')](_0xff50('0x25'),_0x50b8d6,_0x2802b1);_0x52bb55(_0x2802b1);});});}function respondWithStatusCode(_0x1b97d0,_0x9a7898){_0x9a7898=_0x9a7898||0xcc;return function(_0x3042ca){if(_0x3042ca){return _0x1b97d0[_0xff50('0x29')](_0x9a7898);}return _0x1b97d0['status'](_0x9a7898)[_0xff50('0x2a')]();};}function respondWithResult(_0x1f822c,_0x2e2671){_0x2e2671=_0x2e2671||0xc8;return function(_0x2d43a0){if(_0x2d43a0){return _0x1f822c['status'](_0x2e2671)[_0xff50('0x2b')](_0x2d43a0);}};}function respondWithFilteredResult(_0xb86ac1,_0x583af2){return function(_0x3740b2){if(_0x3740b2){var _0x2f7a51=_0x3740b2[_0xff50('0x2c')],_0x5c89e1=_0x583af2[_0xff50('0x2d')],_0x535823=_0x583af2[_0xff50('0x2d')]+_0x583af2[_0xff50('0x2e')],_0x29f67d;if(_0x535823>=_0x2f7a51){_0x535823=_0x2f7a51;_0x29f67d=0xc8;}else{_0x29f67d=0xce;}_0xb86ac1[_0xff50('0x2f')](_0x29f67d);return _0xb86ac1[_0xff50('0x30')]('Content-Range',_0x5c89e1+'-'+_0x535823+'/'+_0x2f7a51)[_0xff50('0x2b')](_0x3740b2);}return null;};}function patchUpdates(_0xd842cb){return function(_0x345280){try{jsonpatch[_0xff50('0x31')](_0x345280,_0xd842cb,!![]);}catch(_0x5dbf3a){return BPromise['reject'](_0x5dbf3a);}return _0x345280[_0xff50('0x32')]();};}function saveUpdates(_0x11e3bd,_0x18e89c){return function(_0x4d4b8c){if(_0x4d4b8c){return _0x4d4b8c['update'](_0x11e3bd)[_0xff50('0x20')](function(_0x168754){return _0x168754;});}return null;};}function removeEntity(_0x2cc432,_0x57e527){return function(_0x38d012){if(_0x38d012){return _0x38d012[_0xff50('0x33')]()[_0xff50('0x20')](function(){_0x2cc432[_0xff50('0x2f')](0xcc)[_0xff50('0x2a')]();});}};}function handleEntityNotFound(_0x5a1e0a,_0x4d0d96){return function(_0x398a91){if(!_0x398a91){_0x5a1e0a[_0xff50('0x29')](0x194);}return _0x398a91;};}function handleError(_0x4a4ed7,_0xa5da09){_0xa5da09=_0xa5da09||0x1f4;return function(_0x599f85){logger[_0xff50('0x23')](_0x599f85['stack']);if(_0x599f85[_0xff50('0x34')]){delete _0x599f85['name'];}_0x4a4ed7[_0xff50('0x2f')](_0xa5da09)[_0xff50('0x35')](_0x599f85);};}exports[_0xff50('0x36')]=function(_0x37aaa6,_0x2d354d){var _0x46e7e1={},_0x441d26={},_0x1eba11={'count':0x0,'rows':[]};var _0x5b8383=_['map'](db[_0xff50('0x37')][_0xff50('0x38')],function(_0xa2bacf){return{'name':_0xa2bacf['fieldName'],'type':_0xa2bacf[_0xff50('0x39')]['key']};});_0x441d26[_0xff50('0x3a')]=_[_0xff50('0x3b')](_0x5b8383,_0xff50('0x34'));_0x441d26['query']=_['keys'](_0x37aaa6['query']);_0x441d26[_0xff50('0x3c')]=_[_0xff50('0x3d')](_0x441d26[_0xff50('0x3a')],_0x441d26[_0xff50('0x3e')]);_0x46e7e1['attributes']=_[_0xff50('0x3d')](_0x441d26['model'],qs[_0xff50('0x3f')](_0x37aaa6['query'][_0xff50('0x3f')]));_0x46e7e1[_0xff50('0x40')]=_0x46e7e1[_0xff50('0x40')]['length']?_0x46e7e1['attributes']:_0x441d26[_0xff50('0x3a')];if(!_0x37aaa6[_0xff50('0x3e')][_0xff50('0x41')](_0xff50('0x42'))){_0x46e7e1[_0xff50('0x2e')]=qs['limit'](_0x37aaa6['query'][_0xff50('0x2e')]);_0x46e7e1[_0xff50('0x2d')]=qs[_0xff50('0x2d')](_0x37aaa6[_0xff50('0x3e')][_0xff50('0x2d')]);}_0x46e7e1[_0xff50('0x43')]=qs[_0xff50('0x44')](_0x37aaa6['query'][_0xff50('0x44')]);_0x46e7e1['where']=qs['filters'](_[_0xff50('0x45')](_0x37aaa6[_0xff50('0x3e')],_0x441d26[_0xff50('0x3c')]));if(_0x37aaa6[_0xff50('0x3e')][_0xff50('0x46')]){_0x46e7e1['where']=_[_0xff50('0x47')](_0x46e7e1[_0xff50('0x48')],{'$or':_['map'](_0x5b8383,function(_0x259a9f){if(_0x259a9f[_0xff50('0x39')]!==_0xff50('0x49')){var _0x2908ba={};_0x2908ba[_0x259a9f[_0xff50('0x34')]]={'$like':'%'+_0x37aaa6[_0xff50('0x3e')]['filter']+'%'};return _0x2908ba;}})});}_0x46e7e1=_[_0xff50('0x47')]({},_0x46e7e1,_0x37aaa6[_0xff50('0x4a')]);var _0x5e20f1={'where':_0x46e7e1[_0xff50('0x48')]};return db[_0xff50('0x37')][_0xff50('0x2c')](_0x5e20f1)[_0xff50('0x20')](function(_0x14279e){_0x1eba11['count']=_0x14279e;if(_0x37aaa6[_0xff50('0x3e')][_0xff50('0x4b')]){_0x46e7e1['include']=[{'all':!![]}];}return db[_0xff50('0x37')][_0xff50('0x4c')](_0x46e7e1);})[_0xff50('0x20')](function(_0x1bea2a){_0x1eba11['rows']=_0x1bea2a;return _0x1eba11;})[_0xff50('0x20')](respondWithFilteredResult(_0x2d354d,_0x46e7e1))['catch'](handleError(_0x2d354d,null));};exports[_0xff50('0x4d')]=function(_0x5a4155,_0x57a648){var _0x44ad03={'raw':![],'where':{'id':_0x5a4155['params']['id']}},_0x32a0ba={};_0x32a0ba['model']=_['keys'](db[_0xff50('0x37')]['rawAttributes']);_0x32a0ba[_0xff50('0x3e')]=_[_0xff50('0x4e')](_0x5a4155['query']);_0x32a0ba[_0xff50('0x3c')]=_[_0xff50('0x3d')](_0x32a0ba[_0xff50('0x3a')],_0x32a0ba['query']);_0x44ad03['attributes']=_[_0xff50('0x3d')](_0x32a0ba['model'],qs[_0xff50('0x3f')](_0x5a4155[_0xff50('0x3e')][_0xff50('0x3f')]));_0x44ad03[_0xff50('0x40')]=_0x44ad03['attributes']['length']?_0x44ad03[_0xff50('0x40')]:_0x32a0ba[_0xff50('0x3a')];if(_0x5a4155[_0xff50('0x3e')][_0xff50('0x4b')]){_0x44ad03[_0xff50('0x4f')]=[{'all':!![]}];}_0x44ad03=_[_0xff50('0x47')]({},_0x44ad03,_0x5a4155[_0xff50('0x4a')]);return db[_0xff50('0x37')]['find'](_0x44ad03)[_0xff50('0x20')](handleEntityNotFound(_0x57a648,null))[_0xff50('0x20')](respondWithResult(_0x57a648,null))[_0xff50('0x28')](handleError(_0x57a648,null));};exports['create']=function(_0x1fb172,_0x322cc5){return db[_0xff50('0x37')][_0xff50('0x50')](_0x1fb172[_0xff50('0x51')],{})[_0xff50('0x20')](respondWithResult(_0x322cc5,0xc9))['catch'](handleError(_0x322cc5,null));};exports[_0xff50('0x52')]=function(_0x4192bb,_0x450f93){if(_0x4192bb['body']['id']){delete _0x4192bb['body']['id'];}return db[_0xff50('0x37')][_0xff50('0x53')]({'where':{'id':_0x4192bb[_0xff50('0x54')]['id']}})['then'](handleEntityNotFound(_0x450f93,null))[_0xff50('0x20')](saveUpdates(_0x4192bb[_0xff50('0x51')],null))[_0xff50('0x20')](respondWithResult(_0x450f93,null))['catch'](handleError(_0x450f93,null));};exports[_0xff50('0x33')]=function(_0x1fd673,_0x3fb763){return db[_0xff50('0x37')][_0xff50('0x53')]({'where':{'id':_0x1fd673['params']['id']}})[_0xff50('0x20')](handleEntityNotFound(_0x3fb763,null))[_0xff50('0x20')](removeEntity(_0x3fb763,null))[_0xff50('0x28')](handleError(_0x3fb763,null));};exports[_0xff50('0x55')]=function(_0x4044f8,_0x457048,_0x4664b7){var _0x160360={};var _0x1c1c7c={};var _0x4f8812;var _0x4c1cb7;return db['SugarcrmAccount']['findOne']({'where':{'id':_0x4044f8[_0xff50('0x54')]['id']}})['then'](handleEntityNotFound(_0x457048,null))[_0xff50('0x20')](function(_0x33e96c){if(_0x33e96c){_0x4f8812=_0x33e96c;_0x1c1c7c['model']=_['keys'](db[_0xff50('0x56')]['rawAttributes']);_0x1c1c7c[_0xff50('0x3e')]=_[_0xff50('0x4e')](_0x4044f8[_0xff50('0x3e')]);_0x1c1c7c[_0xff50('0x3c')]=_[_0xff50('0x3d')](_0x1c1c7c[_0xff50('0x3a')],_0x1c1c7c['query']);_0x160360['attributes']=_['intersection'](_0x1c1c7c['model'],qs[_0xff50('0x3f')](_0x4044f8[_0xff50('0x3e')][_0xff50('0x3f')]));_0x160360['attributes']=_0x160360[_0xff50('0x40')][_0xff50('0x57')]?_0x160360[_0xff50('0x40')]:_0x1c1c7c[_0xff50('0x3a')];_0x160360[_0xff50('0x43')]=qs[_0xff50('0x44')](_0x4044f8[_0xff50('0x3e')]['sort']);_0x160360[_0xff50('0x48')]=qs[_0xff50('0x3c')](_['pick'](_0x4044f8[_0xff50('0x3e')],_0x1c1c7c[_0xff50('0x3c')]));if(_0x4044f8['query'][_0xff50('0x46')]){_0x160360['where']=_[_0xff50('0x47')](_0x160360[_0xff50('0x48')],{'$or':_['map'](_0x160360['attributes'],function(_0x385f9b){var _0x41d682={};_0x41d682[_0x385f9b]={'$like':'%'+_0x4044f8[_0xff50('0x3e')]['filter']+'%'};return _0x41d682;})});}_0x160360=_[_0xff50('0x47')]({},_0x160360,_0x4044f8[_0xff50('0x4a')]);return _0x4f8812[_0xff50('0x55')](_0x160360);}})[_0xff50('0x20')](function(_0x504126){if(_0x504126){_0x4c1cb7=_0x504126[_0xff50('0x57')];if(!_0x4044f8['query']['hasOwnProperty'](_0xff50('0x42'))){_0x160360[_0xff50('0x2e')]=qs[_0xff50('0x2e')](_0x4044f8[_0xff50('0x3e')]['limit']);_0x160360[_0xff50('0x2d')]=qs[_0xff50('0x2d')](_0x4044f8['query']['offset']);}return _0x4f8812[_0xff50('0x55')](_0x160360);}})['then'](function(_0x35dfaf){if(_0x35dfaf){return _0x35dfaf?{'count':_0x4c1cb7,'rows':_0x35dfaf}:null;}})[_0xff50('0x20')](respondWithResult(_0x457048,null))[_0xff50('0x28')](handleError(_0x457048,null));};exports['addConfiguration']=function(_0x553257,_0x3da61a,_0x3a0761){if(_0x553257[_0xff50('0x51')]['id']){delete _0x553257['body']['id'];}return db[_0xff50('0x37')][_0xff50('0x58')]({'where':{'id':_0x553257[_0xff50('0x54')]['id']}})[_0xff50('0x20')](handleEntityNotFound(_0x3da61a,null))['then'](function(_0x12ce19){if(_0x12ce19){_0x553257['body'][_0xff50('0x59')]=_0x12ce19['id'];_0x553257['body'][_0xff50('0x5a')]=integrations[_0xff50('0x5b')](_0x553257[_0xff50('0x51')]['channel'],_0x553257[_0xff50('0x51')]['type']);_0x553257['body'][_0xff50('0x5c')]=integrations[_0xff50('0x5d')](_0x553257[_0xff50('0x51')][_0xff50('0x5e')],_0x553257['body'][_0xff50('0x39')]);return db['SugarcrmConfiguration']['create'](_0x553257[_0xff50('0x51')],{'include':[{'model':db[_0xff50('0x5f')],'as':_0xff50('0x5a')},{'model':db[_0xff50('0x5f')],'as':_0xff50('0x5c')}]});}return null;})[_0xff50('0x20')](respondWithResult(_0x3da61a,null))[_0xff50('0x28')](handleError(_0x3da61a,null));};exports[_0xff50('0x60')]=function(_0x576952,_0x395067,_0x5800a2){var _0x5860b4='';var _0x4df467=['id',_0xff50('0x34'),_0xff50('0x61'),'created_by','description',_0xff50('0x62'),_0xff50('0x63'),_0xff50('0x64'),_0xff50('0x65'),_0xff50('0x66'),_0xff50('0x67'),_0xff50('0x68')];return db['SugarcrmAccount']['findOne']({'where':{'id':_0x576952[_0xff50('0x54')]['id']},'attributes':['id',_0xff50('0x69'),'password',_0xff50('0x6a')]})[_0xff50('0x20')](handleEntityNotFound(_0x395067,null))[_0xff50('0x20')](function(_0x49a352){if(_0x49a352){_0x5860b4=_0x49a352[_0xff50('0x6a')];var _0x1cb5c7=_0x5860b4[_0xff50('0x6b')](-0x1);if(_0x1cb5c7==='/'){_0x5860b4=_0x5860b4[_0xff50('0x6c')](0x0,_0x5860b4[_0xff50('0x6d')](_0x1cb5c7));}return rp({'method':_0xff50('0x6e'),'uri':util['format'](_0xff50('0x6f'),_0x5860b4,'/service/v4_1/rest.php'),'json':!![],'form':{'method':'login','input_type':'JSON','response_type':_0xff50('0x70'),'rest_data':JSON[_0xff50('0x71')]({'user_auth':{'user_name':_0x49a352[_0xff50('0x69')],'password':_0x49a352[_0xff50('0x72')],'encryption':'PLAIN'},'application':_0xff50('0x73')})}});}})['then'](function(_0x282055){if(_0x282055&&_0x282055[_0xff50('0x34')]!==_0xff50('0x74')&&_0x282055['name']!=='Password\x20Expired'){return rp({'method':_0xff50('0x6e'),'uri':util[_0xff50('0x75')](_0xff50('0x6f'),_0x5860b4,_0xff50('0x76')),'json':!![],'form':{'method':'get_module_fields','input_type':_0xff50('0x70'),'response_type':_0xff50('0x70'),'rest_data':JSON[_0xff50('0x71')]({'session':_0x282055['id'],'module_name':'Calls'})}})[_0xff50('0x20')](function(_0x138d57){if(_0x138d57){var _0x253581=_['values'](_0x138d57['module_fields']);_[_0xff50('0x77')](_0x253581,function(_0x3fb9a0){return _0x4df467[_0xff50('0x78')](_0x3fb9a0[_0xff50('0x34')]);});return{'count':_0x253581[_0xff50('0x57')],'rows':_[_0xff50('0x3b')](_0x253581,function(_0x3e436b){return{'id':_0x3e436b[_0xff50('0x34')],'name':_0x3e436b['label'],'custom':_[_0xff50('0x79')](_0x3e436b[_0xff50('0x34')],'_c')?!![]:![],'options':_0x3e436b[_0xff50('0x4a')]?_[_0xff50('0x3b')](_[_0xff50('0x7a')](_0x3e436b[_0xff50('0x4a')]),function(_0x22c609){return{'name':_0x22c609[_0xff50('0x7b')],'value':_0x22c609[_0xff50('0x34')]};}):[]};})};}})[_0xff50('0x20')](respondWithResult(_0x395067,null))['catch'](function(_0x3d6469){var _0x2fa953=_0x576952[_0xff50('0x3e')][_0xff50('0x1b')]?0x1f4:_0x3d6469[_0xff50('0x7c')]||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s','getFields',_0x2fa953,JSON[_0xff50('0x71')](_0x3d6469));delete _0x3d6469[_0xff50('0x34')];if(_0x2fa953===0x191){_0x2fa953=0x190;}_0x395067[_0xff50('0x2f')](_0x2fa953)[_0xff50('0x35')](_0x576952[_0xff50('0x3e')][_0xff50('0x1b')]?{'message':'Wrong\x20credentials','statusCode':_0x3d6469[_0xff50('0x7c')]}:_0x3d6469);});}else{var _0xde89a6=0x1f4;_0x395067[_0xff50('0x2f')](_0xde89a6)['send']({'message':_0xff50('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 7017042..3ac9aa7 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 _0x3ff7=['../../config/environment','./intSugarcrmAccount.attributes','../../components/integrations/configuration','exports','define','SugarcrmAccount','int_sugarcrm_accounts','util','../../config/logger','api','moment','request-promise','path','rimraf'];(function(_0x5f49c2,_0x37c2ce){var _0x1f7877=function(_0x20be78){while(--_0x20be78){_0x5f49c2['push'](_0x5f49c2['shift']());}};_0x1f7877(++_0x37c2ce);}(_0x3ff7,0x18f));var _0x73ff=function(_0x680821,_0x23e67f){_0x680821=_0x680821-0x0;var _0x3f132c=_0x3ff7[_0x680821];return _0x3f132c;};'use strict';var _=require('lodash');var util=require(_0x73ff('0x0'));var logger=require(_0x73ff('0x1'))(_0x73ff('0x2'));var moment=require(_0x73ff('0x3'));var BPromise=require('bluebird');var rp=require(_0x73ff('0x4'));var fs=require('fs');var path=require(_0x73ff('0x5'));var rimraf=require(_0x73ff('0x6'));var config=require(_0x73ff('0x7'));var attributes=require(_0x73ff('0x8'));var integrations=require(_0x73ff('0x9'));module[_0x73ff('0xa')]=function(_0x5041db,_0x4689af){return _0x5041db[_0x73ff('0xb')](_0x73ff('0xc'),attributes,{'tableName':_0x73ff('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2371=['int_sugarcrm_accounts','util','../../config/logger','request-promise','path','rimraf','../../config/environment','../../components/integrations/configuration','exports','SugarcrmAccount'];(function(_0x3f058e,_0x5d2c72){var _0x3bda50=function(_0x334ace){while(--_0x334ace){_0x3f058e['push'](_0x3f058e['shift']());}};_0x3bda50(++_0x5d2c72);}(_0x2371,0x1b9));var _0x1237=function(_0x1f5a63,_0x511504){_0x1f5a63=_0x1f5a63-0x0;var _0x30bb7a=_0x2371[_0x1f5a63];return _0x30bb7a;};'use strict';var _=require('lodash');var util=require(_0x1237('0x0'));var logger=require(_0x1237('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x1237('0x2'));var fs=require('fs');var path=require(_0x1237('0x3'));var rimraf=require(_0x1237('0x4'));var config=require(_0x1237('0x5'));var attributes=require('./intSugarcrmAccount.attributes');var integrations=require(_0x1237('0x6'));module[_0x1237('0x7')]=function(_0x2ee303,_0x19ff0e){return _0x2ee303['define'](_0x1237('0x8'),attributes,{'tableName':_0x1237('0x9'),'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 1da077d..f56ad82 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 _0x4894=['stringify','error','message','result','catch','GetSugarcrmAccount','SugarcrmAccount','findAll','options','where','attributes','limit','include','map','model','ShowSugarcrmAccount','find','raw','util','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','then','info','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s'];(function(_0x14eb40,_0x2193b2){var _0x3bc8c7=function(_0x5d8a8b){while(--_0x5d8a8b){_0x14eb40['push'](_0x14eb40['shift']());}};_0x3bc8c7(++_0x2193b2);}(_0x4894,0x9a));var _0x4489=function(_0x582990,_0x15a7da){_0x582990=_0x582990-0x0;var _0x3a9cd1=_0x4894[_0x582990];return _0x3a9cd1;};'use strict';var _=require('lodash');var util=require(_0x4489('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4489('0x1'));var fs=require('fs');var Redis=require(_0x4489('0x2'));var db=require(_0x4489('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x4489('0x4'))(_0x4489('0x5'));var config=require(_0x4489('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x4489('0x7')][_0x4489('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xe06530,_0xc17277,_0x478933){return new BPromise(function(_0xbc473c,_0x8bac9a){return client[_0x4489('0x9')](_0xe06530,_0x478933)[_0x4489('0xa')](function(_0x1817bf){logger[_0x4489('0xb')](_0x4489('0xc'),_0xc17277,_0x4489('0xd'));logger[_0x4489('0xe')](_0x4489('0xf'),_0xc17277,_0x4489('0xd'),JSON[_0x4489('0x10')](_0x1817bf));if(_0x1817bf[_0x4489('0x11')]){if(_0x1817bf['error']['code']===0x1f4){logger[_0x4489('0x11')](_0x4489('0xc'),_0xc17277,_0x1817bf[_0x4489('0x11')][_0x4489('0x12')]);return _0x8bac9a(_0x1817bf['error'][_0x4489('0x12')]);}logger[_0x4489('0x11')](_0x4489('0xc'),_0xc17277,_0x1817bf['error'][_0x4489('0x12')]);return _0xbc473c(_0x1817bf['error'][_0x4489('0x12')]);}else{logger[_0x4489('0xb')](_0x4489('0xc'),_0xc17277,'request\x20sent');_0xbc473c(_0x1817bf[_0x4489('0x13')][_0x4489('0x12')]);}})[_0x4489('0x14')](function(_0x979997){logger['error'](_0x4489('0xc'),_0xc17277,_0x979997);_0x8bac9a(_0x979997);});});}exports[_0x4489('0x15')]=function(_0xfedc8b){var _0xf55d42=this;return new Promise(function(_0x223353,_0x2049d8){return db[_0x4489('0x16')][_0x4489('0x17')]({'raw':_0xfedc8b[_0x4489('0x18')]?_0xfedc8b[_0x4489('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0xfedc8b['options']?_0xfedc8b[_0x4489('0x18')][_0x4489('0x19')]||null:null,'attributes':_0xfedc8b['options']?_0xfedc8b[_0x4489('0x18')][_0x4489('0x1a')]||null:null,'limit':_0xfedc8b[_0x4489('0x18')]?_0xfedc8b['options'][_0x4489('0x1b')]||null:null,'include':_0xfedc8b['options']?_0xfedc8b[_0x4489('0x18')][_0x4489('0x1c')]?_[_0x4489('0x1d')](_0xfedc8b[_0x4489('0x18')][_0x4489('0x1c')],function(_0x5e38a4){return{'model':db[_0x5e38a4[_0x4489('0x1e')]],'as':_0x5e38a4['as'],'attributes':_0x5e38a4[_0x4489('0x1a')],'include':_0x5e38a4[_0x4489('0x1c')]?_[_0x4489('0x1d')](_0x5e38a4[_0x4489('0x1c')],function(_0x9ccd4f){return{'model':db[_0x9ccd4f['model']],'as':_0x9ccd4f['as'],'attributes':_0x9ccd4f[_0x4489('0x1a')],'include':_0x9ccd4f['include']?_['map'](_0x9ccd4f[_0x4489('0x1c')],function(_0x5d7a82){return{'model':db[_0x5d7a82['model']],'as':_0x5d7a82['as'],'attributes':_0x5d7a82[_0x4489('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x4489('0xa')](function(_0x101597){logger[_0x4489('0xb')](_0x4489('0x15'),_0xfedc8b);logger[_0x4489('0xe')]('GetSugarcrmAccount',_0xfedc8b,JSON[_0x4489('0x10')](_0x101597));_0x223353(_0x101597);})[_0x4489('0x14')](function(_0x5aa159){logger[_0x4489('0x11')](_0x4489('0x15'),_0x5aa159[_0x4489('0x12')],_0xfedc8b);_0x2049d8(_0xf55d42[_0x4489('0x11')](0x1f4,_0x5aa159[_0x4489('0x12')]));});});};exports[_0x4489('0x1f')]=function(_0x44f21c){var _0x4b5b76=this;return new Promise(function(_0x2a6cd9,_0x12caa1){return db['SugarcrmAccount'][_0x4489('0x20')]({'raw':_0x44f21c[_0x4489('0x18')]?_0x44f21c[_0x4489('0x18')][_0x4489('0x21')]===undefined?!![]:![]:!![],'where':_0x44f21c[_0x4489('0x18')]?_0x44f21c['options'][_0x4489('0x19')]||null:null,'attributes':_0x44f21c['options']?_0x44f21c['options'][_0x4489('0x1a')]||null:null,'include':_0x44f21c['options']?_0x44f21c[_0x4489('0x18')][_0x4489('0x1c')]?_['map'](_0x44f21c['options']['include'],function(_0x2d0420){return{'model':db[_0x2d0420['model']],'as':_0x2d0420['as'],'attributes':_0x2d0420[_0x4489('0x1a')],'include':_0x2d0420[_0x4489('0x1c')]?_[_0x4489('0x1d')](_0x2d0420[_0x4489('0x1c')],function(_0x265de7){return{'model':db[_0x265de7[_0x4489('0x1e')]],'as':_0x265de7['as'],'attributes':_0x265de7['attributes'],'include':_0x265de7['include']?_['map'](_0x265de7[_0x4489('0x1c')],function(_0xc737a7){return{'model':db[_0xc737a7[_0x4489('0x1e')]],'as':_0xc737a7['as'],'attributes':_0xc737a7[_0x4489('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x4489('0xa')](function(_0x426a20){logger[_0x4489('0xb')](_0x4489('0x1f'),_0x44f21c);logger[_0x4489('0xe')]('ShowSugarcrmAccount',_0x44f21c,JSON['stringify'](_0x426a20));_0x2a6cd9(_0x426a20);})[_0x4489('0x14')](function(_0x4e12f6){logger[_0x4489('0x11')](_0x4489('0x1f'),_0x4e12f6[_0x4489('0x12')],_0x44f21c);_0x12caa1(_0x4b5b76[_0x4489('0x11')](0x1f4,_0x4e12f6[_0x4489('0x12')]));});});};
\ No newline at end of file
+var _0x07db=['raw','where','limit','map','include','attributes','model','stringify','ShowSugarcrmAccount','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','then','info','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','SugarcrmAccount,\x20%s,\x20%s','message','result','catch','GetSugarcrmAccount','SugarcrmAccount','options'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x07db,0xb9));var _0xb07d=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x07db[_0x297fd3];return _0x2af381;};'use strict';var _=require(_0xb07d('0x0'));var util=require(_0xb07d('0x1'));var moment=require('moment');var BPromise=require(_0xb07d('0x2'));var rs=require(_0xb07d('0x3'));var fs=require('fs');var Redis=require(_0xb07d('0x4'));var db=require(_0xb07d('0x5'))['db'];var utils=require(_0xb07d('0x6'));var logger=require(_0xb07d('0x7'))(_0xb07d('0x8'));var config=require(_0xb07d('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xb07d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4eb4ae,_0x380ee4,_0x337c02){return new BPromise(function(_0x4f6871,_0x2d7610){return client['request'](_0x4eb4ae,_0x337c02)[_0xb07d('0xb')](function(_0x56d835){logger[_0xb07d('0xc')]('SugarcrmAccount,\x20%s,\x20%s',_0x380ee4,'request\x20sent');logger[_0xb07d('0xd')](_0xb07d('0xe'),_0x380ee4,_0xb07d('0xf'),JSON['stringify'](_0x56d835));if(_0x56d835[_0xb07d('0x10')]){if(_0x56d835[_0xb07d('0x10')][_0xb07d('0x11')]===0x1f4){logger[_0xb07d('0x10')](_0xb07d('0x12'),_0x380ee4,_0x56d835['error'][_0xb07d('0x13')]);return _0x2d7610(_0x56d835['error'][_0xb07d('0x13')]);}logger[_0xb07d('0x10')](_0xb07d('0x12'),_0x380ee4,_0x56d835[_0xb07d('0x10')]['message']);return _0x4f6871(_0x56d835[_0xb07d('0x10')]['message']);}else{logger['info'](_0xb07d('0x12'),_0x380ee4,'request\x20sent');_0x4f6871(_0x56d835[_0xb07d('0x14')]['message']);}})[_0xb07d('0x15')](function(_0x47ff62){logger[_0xb07d('0x10')](_0xb07d('0x12'),_0x380ee4,_0x47ff62);_0x2d7610(_0x47ff62);});});}exports[_0xb07d('0x16')]=function(_0x307224){var _0x52d3cc=this;return new Promise(function(_0x5ae653,_0x66a076){return db[_0xb07d('0x17')]['findAll']({'raw':_0x307224[_0xb07d('0x18')]?_0x307224['options'][_0xb07d('0x19')]===undefined?!![]:![]:!![],'where':_0x307224[_0xb07d('0x18')]?_0x307224[_0xb07d('0x18')][_0xb07d('0x1a')]||null:null,'attributes':_0x307224['options']?_0x307224[_0xb07d('0x18')]['attributes']||null:null,'limit':_0x307224[_0xb07d('0x18')]?_0x307224[_0xb07d('0x18')][_0xb07d('0x1b')]||null:null,'include':_0x307224[_0xb07d('0x18')]?_0x307224['options']['include']?_[_0xb07d('0x1c')](_0x307224[_0xb07d('0x18')][_0xb07d('0x1d')],function(_0x2ad8c0){return{'model':db[_0x2ad8c0['model']],'as':_0x2ad8c0['as'],'attributes':_0x2ad8c0[_0xb07d('0x1e')],'include':_0x2ad8c0[_0xb07d('0x1d')]?_['map'](_0x2ad8c0[_0xb07d('0x1d')],function(_0x253d93){return{'model':db[_0x253d93['model']],'as':_0x253d93['as'],'attributes':_0x253d93[_0xb07d('0x1e')],'include':_0x253d93['include']?_[_0xb07d('0x1c')](_0x253d93[_0xb07d('0x1d')],function(_0x22979a){return{'model':db[_0x22979a[_0xb07d('0x1f')]],'as':_0x22979a['as'],'attributes':_0x22979a['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x582a9d){logger['info']('GetSugarcrmAccount',_0x307224);logger[_0xb07d('0xd')]('GetSugarcrmAccount',_0x307224,JSON[_0xb07d('0x20')](_0x582a9d));_0x5ae653(_0x582a9d);})[_0xb07d('0x15')](function(_0x261768){logger['error']('GetSugarcrmAccount',_0x261768[_0xb07d('0x13')],_0x307224);_0x66a076(_0x52d3cc[_0xb07d('0x10')](0x1f4,_0x261768['message']));});});};exports[_0xb07d('0x21')]=function(_0x4d449e){var _0x2a960e=this;return new Promise(function(_0x4033af,_0x60023b){return db[_0xb07d('0x17')][_0xb07d('0x22')]({'raw':_0x4d449e[_0xb07d('0x18')]?_0x4d449e[_0xb07d('0x18')][_0xb07d('0x19')]===undefined?!![]:![]:!![],'where':_0x4d449e[_0xb07d('0x18')]?_0x4d449e[_0xb07d('0x18')]['where']||null:null,'attributes':_0x4d449e['options']?_0x4d449e[_0xb07d('0x18')][_0xb07d('0x1e')]||null:null,'include':_0x4d449e[_0xb07d('0x18')]?_0x4d449e['options'][_0xb07d('0x1d')]?_['map'](_0x4d449e[_0xb07d('0x18')][_0xb07d('0x1d')],function(_0x2f51c1){return{'model':db[_0x2f51c1[_0xb07d('0x1f')]],'as':_0x2f51c1['as'],'attributes':_0x2f51c1['attributes'],'include':_0x2f51c1[_0xb07d('0x1d')]?_[_0xb07d('0x1c')](_0x2f51c1[_0xb07d('0x1d')],function(_0x590cb7){return{'model':db[_0x590cb7[_0xb07d('0x1f')]],'as':_0x590cb7['as'],'attributes':_0x590cb7['attributes'],'include':_0x590cb7[_0xb07d('0x1d')]?_[_0xb07d('0x1c')](_0x590cb7[_0xb07d('0x1d')],function(_0x2fdcbb){return{'model':db[_0x2fdcbb[_0xb07d('0x1f')]],'as':_0x2fdcbb['as'],'attributes':_0x2fdcbb['attributes']};}):[]};}):[]};}):[]:[]})[_0xb07d('0xb')](function(_0x23040f){logger['info'](_0xb07d('0x21'),_0x4d449e);logger[_0xb07d('0xd')](_0xb07d('0x21'),_0x4d449e,JSON[_0xb07d('0x20')](_0x23040f));_0x4033af(_0x23040f);})['catch'](function(_0x8bc743){logger[_0xb07d('0x10')](_0xb07d('0x21'),_0x8bc743[_0xb07d('0x13')],_0x4d449e);_0x60023b(_0x2a960e[_0xb07d('0x10')](0x1f4,_0x8bc743['message']));});});};
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/index.js b/server/api/intSugarcrmConfiguration/index.js
index c66f312..d9f8b89 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 _0x9293=['Router','../../components/auth/service','../../config/environment','./intSugarcrmConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','post','create','put','update','delete','exports','multer','util','path','connect-timeout','express'];(function(_0x5317b5,_0x4dfd6e){var _0x3b7ce2=function(_0xc146d6){while(--_0xc146d6){_0x5317b5['push'](_0x5317b5['shift']());}};_0x3b7ce2(++_0x4dfd6e);}(_0x9293,0x14b));var _0x3929=function(_0x337ea1,_0x1e73df){_0x337ea1=_0x337ea1-0x0;var _0x49dbc3=_0x9293[_0x337ea1];return _0x49dbc3;};'use strict';var multer=require(_0x3929('0x0'));var util=require(_0x3929('0x1'));var path=require(_0x3929('0x2'));var timeout=require(_0x3929('0x3'));var express=require(_0x3929('0x4'));var router=express[_0x3929('0x5')]();var auth=require(_0x3929('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x3929('0x7'));var controller=require(_0x3929('0x8'));router[_0x3929('0x9')]('/',auth[_0x3929('0xa')](),controller[_0x3929('0xb')]);router[_0x3929('0x9')](_0x3929('0xc'),auth['isAuthenticated'](),controller[_0x3929('0xd')]);router[_0x3929('0x9')](_0x3929('0xe'),auth['isAuthenticated'](),controller[_0x3929('0xf')]);router['get'](_0x3929('0x10'),auth[_0x3929('0xa')](),controller[_0x3929('0x11')]);router[_0x3929('0x9')]('/:id/descriptions',auth[_0x3929('0xa')](),controller['getDescriptions']);router[_0x3929('0x12')]('/',auth[_0x3929('0xa')](),controller[_0x3929('0x13')]);router[_0x3929('0x14')]('/:id',auth[_0x3929('0xa')](),controller[_0x3929('0x15')]);router[_0x3929('0x16')]('/:id',auth[_0x3929('0xa')](),controller['destroy']);module[_0x3929('0x17')]=router;
\ No newline at end of file
+var _0x04e6=['create','put','update','destroy','exports','util','path','express','Router','../../components/auth/service','../../components/interaction/service','./intSugarcrmConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/subjects','getSubjects','getDescriptions','post'];(function(_0x15d756,_0x419438){var _0x191b5f=function(_0x21e0a4){while(--_0x21e0a4){_0x15d756['push'](_0x15d756['shift']());}};_0x191b5f(++_0x419438);}(_0x04e6,0x1be));var _0x604e=function(_0x1ae31c,_0x8dcd2d){_0x1ae31c=_0x1ae31c-0x0;var _0x19519d=_0x04e6[_0x1ae31c];return _0x19519d;};'use strict';var multer=require('multer');var util=require(_0x604e('0x0'));var path=require(_0x604e('0x1'));var timeout=require('connect-timeout');var express=require(_0x604e('0x2'));var router=express[_0x604e('0x3')]();var auth=require(_0x604e('0x4'));var interaction=require(_0x604e('0x5'));var config=require('../../config/environment');var controller=require(_0x604e('0x6'));router[_0x604e('0x7')]('/',auth[_0x604e('0x8')](),controller[_0x604e('0x9')]);router['get'](_0x604e('0xa'),auth[_0x604e('0x8')](),controller[_0x604e('0xb')]);router[_0x604e('0x7')]('/:id/fields',auth[_0x604e('0x8')](),controller['getFields']);router['get'](_0x604e('0xc'),auth[_0x604e('0x8')](),controller[_0x604e('0xd')]);router[_0x604e('0x7')]('/:id/descriptions',auth['isAuthenticated'](),controller[_0x604e('0xe')]);router[_0x604e('0xf')]('/',auth['isAuthenticated'](),controller[_0x604e('0x10')]);router[_0x604e('0x11')](_0x604e('0xa'),auth[_0x604e('0x8')](),controller[_0x604e('0x12')]);router['delete'](_0x604e('0xa'),auth['isAuthenticated'](),controller[_0x604e('0x13')]);module[_0x604e('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js
index 7778c78..45c8cae 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 _0x16db=['exports','STRING','sequelize'];(function(_0xbed8a2,_0x578ae3){var _0x11d4f2=function(_0x49e846){while(--_0x49e846){_0xbed8a2['push'](_0xbed8a2['shift']());}};_0x11d4f2(++_0x578ae3);}(_0x16db,0xd4));var _0xb16d=function(_0x2bf466,_0x4929a5){_0x2bf466=_0x2bf466-0x0;var _0x856885=_0x16db[_0x2bf466];return _0x856885;};'use strict';var Sequelize=require(_0xb16d('0x0'));module[_0xb16d('0x1')]={'name':{'type':Sequelize[_0xb16d('0x2')]},'description':{'type':Sequelize[_0xb16d('0x2')]}};
\ No newline at end of file
+var _0x83d0=['sequelize','exports','STRING'];(function(_0x17e69b,_0x512806){var _0x55eea8=function(_0x510384){while(--_0x510384){_0x17e69b['push'](_0x17e69b['shift']());}};_0x55eea8(++_0x512806);}(_0x83d0,0x8d));var _0x083d=function(_0x3dc5c4,_0x305733){_0x3dc5c4=_0x3dc5c4-0x0;var _0x2f6ec1=_0x83d0[_0x3dc5c4];return _0x2f6ec1;};'use strict';var Sequelize=require(_0x083d('0x0'));module[_0x083d('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x083d('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js
index cc77330..52b03c7 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 _0x283f=['then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','status','end','json','count','offset','Content-Range','apply','save','update','stack','send','map','SugarcrmConfiguration','rawAttributes','fieldName','key','model','name','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','pick','where','merge','type','VIRTUAL','filter','options','include','findAll','catch','show','params','length','includeAll','find','create','body','getFields','findOne','getSubjects','SugarcrmField','getDescriptions','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.'];(function(_0x3e4e06,_0x577430){var _0x58e857=function(_0x19dc70){while(--_0x19dc70){_0x3e4e06['push'](_0x3e4e06['shift']());}};_0x58e857(++_0x577430);}(_0x283f,0x165));var _0xf283=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x283f[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0xf283('0x0'));var emlformat=require(_0xf283('0x1'));var rimraf=require(_0xf283('0x2'));var zipdir=require(_0xf283('0x3'));var jsonpatch=require(_0xf283('0x4'));var rp=require(_0xf283('0x5'));var moment=require(_0xf283('0x6'));var BPromise=require(_0xf283('0x7'));var Mustache=require(_0xf283('0x8'));var util=require('util');var path=require(_0xf283('0x9'));var sox=require(_0xf283('0xa'));var csv=require(_0xf283('0xb'));var ejs=require(_0xf283('0xc'));var fs=require('fs');var _=require(_0xf283('0xd'));var squel=require(_0xf283('0xe'));var crypto=require(_0xf283('0xf'));var jsforce=require('jsforce');var deskjs=require(_0xf283('0x10'));var toCsv=require('to-csv');var querystring=require(_0xf283('0x11'));var Papa=require(_0xf283('0x12'));var Redis=require(_0xf283('0x13'));var authService=require(_0xf283('0x14'));var qs=require(_0xf283('0x15'));var as=require(_0xf283('0x16'));var hardwareService=require(_0xf283('0x17'));var logger=require(_0xf283('0x18'))(_0xf283('0x19'));var utils=require('../../config/utils');var config=require(_0xf283('0x1a'));var db=require(_0xf283('0x1b'))['db'];var jayson=require(_0xf283('0x1c'));var client=jayson[_0xf283('0x1d')][_0xf283('0x1e')]({'port':0x232a});function checkPasswordPattern(_0x995d97,_0x3d98c1,_0x22d0ff){if(_0x22d0ff){var _0x4d8a61=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4d8a61[_0xf283('0x1f')](_0x3d98c1)){return _0x995d97;}else{throw new db[(_0xf283('0x20'))][(_0xf283('0x21'))](_0xf283('0x22'));}}else{return _0x995d97;}}function respondWithRpcPromise(_0x476c79,_0x451968,_0x2e80a5,_0x14063d){return new BPromise(function(_0x23aaa3,_0x189042){var _0x18814a=_0x14063d||client;return _0x18814a['request'](_0x476c79,_0x2e80a5)[_0xf283('0x23')](function(_0x3d7e3a){logger[_0xf283('0x24')](_0xf283('0x25'),_0x451968,_0xf283('0x26'));logger[_0xf283('0x27')](_0xf283('0x28'),_0x451968,_0xf283('0x26'),JSON[_0xf283('0x29')](_0x3d7e3a));if(_0x3d7e3a[_0xf283('0x2a')]){if(_0x3d7e3a['error'][_0xf283('0x2b')]===0x1f4){logger[_0xf283('0x2a')](_0xf283('0x25'),_0x451968,_0x3d7e3a[_0xf283('0x2a')]['message']);return _0x189042(_0x3d7e3a['error'][_0xf283('0x2c')]);}logger[_0xf283('0x2a')](_0xf283('0x25'),_0x451968,_0x3d7e3a[_0xf283('0x2a')][_0xf283('0x2c')]);return _0x23aaa3(_0x3d7e3a['error'][_0xf283('0x2c')]);}else{logger['info'](_0xf283('0x25'),_0x451968,_0xf283('0x26'));_0x23aaa3(_0x3d7e3a[_0xf283('0x2d')][_0xf283('0x2c')]);}})['catch'](function(_0x3136df){logger[_0xf283('0x2a')](_0xf283('0x25'),_0x451968,_0x3136df);_0x189042(_0x3136df);});});}function respondWithStatusCode(_0x454e7a,_0x32b219){_0x32b219=_0x32b219||0xcc;return function(_0x163ddb){if(_0x163ddb){return _0x454e7a[_0xf283('0x2e')](_0x32b219);}return _0x454e7a[_0xf283('0x2f')](_0x32b219)[_0xf283('0x30')]();};}function respondWithResult(_0x518c11,_0x15202f){_0x15202f=_0x15202f||0xc8;return function(_0x324515){if(_0x324515){return _0x518c11['status'](_0x15202f)[_0xf283('0x31')](_0x324515);}};}function respondWithFilteredResult(_0x274508,_0x400bdf){return function(_0x17e5e5){if(_0x17e5e5){var _0x413e6e=_0x17e5e5[_0xf283('0x32')],_0x3b2cbf=_0x400bdf[_0xf283('0x33')],_0x44425a=_0x400bdf[_0xf283('0x33')]+_0x400bdf['limit'],_0x10045c;if(_0x44425a>=_0x413e6e){_0x44425a=_0x413e6e;_0x10045c=0xc8;}else{_0x10045c=0xce;}_0x274508[_0xf283('0x2f')](_0x10045c);return _0x274508['set'](_0xf283('0x34'),_0x3b2cbf+'-'+_0x44425a+'/'+_0x413e6e)[_0xf283('0x31')](_0x17e5e5);}return null;};}function patchUpdates(_0x537b46){return function(_0x317f1f){try{jsonpatch[_0xf283('0x35')](_0x317f1f,_0x537b46,!![]);}catch(_0x24dc4f){return BPromise['reject'](_0x24dc4f);}return _0x317f1f[_0xf283('0x36')]();};}function saveUpdates(_0x141ca6,_0x5c397a){return function(_0x41d77){if(_0x41d77){return _0x41d77[_0xf283('0x37')](_0x141ca6)[_0xf283('0x23')](function(_0x32c7e2){return _0x32c7e2;});}return null;};}function removeEntity(_0x492cdc,_0x2d0ec5){return function(_0x14c736){if(_0x14c736){return _0x14c736['destroy']()[_0xf283('0x23')](function(){_0x492cdc[_0xf283('0x2f')](0xcc)[_0xf283('0x30')]();});}};}function handleEntityNotFound(_0x58c9ff,_0x31c800){return function(_0x2c0a56){if(!_0x2c0a56){_0x58c9ff[_0xf283('0x2e')](0x194);}return _0x2c0a56;};}function handleError(_0x2e1c65,_0x22a48d){_0x22a48d=_0x22a48d||0x1f4;return function(_0x10a5a8){logger[_0xf283('0x2a')](_0x10a5a8[_0xf283('0x38')]);if(_0x10a5a8['name']){delete _0x10a5a8['name'];}_0x2e1c65['status'](_0x22a48d)[_0xf283('0x39')](_0x10a5a8);};}exports['index']=function(_0x35c5c9,_0x103563){var _0xe08535={},_0x323dc4={},_0x1bd10b={'count':0x0,'rows':[]};var _0x2f29a8=_[_0xf283('0x3a')](db[_0xf283('0x3b')][_0xf283('0x3c')],function(_0x192acb){return{'name':_0x192acb[_0xf283('0x3d')],'type':_0x192acb['type'][_0xf283('0x3e')]};});_0x323dc4[_0xf283('0x3f')]=_['map'](_0x2f29a8,_0xf283('0x40'));_0x323dc4[_0xf283('0x41')]=_[_0xf283('0x42')](_0x35c5c9[_0xf283('0x41')]);_0x323dc4[_0xf283('0x43')]=_[_0xf283('0x44')](_0x323dc4[_0xf283('0x3f')],_0x323dc4[_0xf283('0x41')]);_0xe08535[_0xf283('0x45')]=_[_0xf283('0x44')](_0x323dc4[_0xf283('0x3f')],qs[_0xf283('0x46')](_0x35c5c9['query'][_0xf283('0x46')]));_0xe08535[_0xf283('0x45')]=_0xe08535[_0xf283('0x45')]['length']?_0xe08535['attributes']:_0x323dc4[_0xf283('0x3f')];if(!_0x35c5c9['query'][_0xf283('0x47')](_0xf283('0x48'))){_0xe08535[_0xf283('0x49')]=qs['limit'](_0x35c5c9[_0xf283('0x41')][_0xf283('0x49')]);_0xe08535[_0xf283('0x33')]=qs[_0xf283('0x33')](_0x35c5c9[_0xf283('0x41')][_0xf283('0x33')]);}_0xe08535[_0xf283('0x4a')]=qs[_0xf283('0x4b')](_0x35c5c9[_0xf283('0x41')]['sort']);_0xe08535['where']=qs[_0xf283('0x43')](_[_0xf283('0x4c')](_0x35c5c9[_0xf283('0x41')],_0x323dc4['filters']));if(_0x35c5c9['query']['filter']){_0xe08535[_0xf283('0x4d')]=_[_0xf283('0x4e')](_0xe08535[_0xf283('0x4d')],{'$or':_[_0xf283('0x3a')](_0x2f29a8,function(_0x1c3d9d){if(_0x1c3d9d[_0xf283('0x4f')]!==_0xf283('0x50')){var _0x5cfe79={};_0x5cfe79[_0x1c3d9d['name']]={'$like':'%'+_0x35c5c9['query'][_0xf283('0x51')]+'%'};return _0x5cfe79;}})});}_0xe08535=_[_0xf283('0x4e')]({},_0xe08535,_0x35c5c9[_0xf283('0x52')]);var _0x248c54={'where':_0xe08535[_0xf283('0x4d')]};return db['SugarcrmConfiguration'][_0xf283('0x32')](_0x248c54)['then'](function(_0x4db476){_0x1bd10b[_0xf283('0x32')]=_0x4db476;if(_0x35c5c9[_0xf283('0x41')]['includeAll']){_0xe08535[_0xf283('0x53')]=[{'all':!![]}];}return db[_0xf283('0x3b')][_0xf283('0x54')](_0xe08535);})[_0xf283('0x23')](function(_0x3bf54b){_0x1bd10b['rows']=_0x3bf54b;return _0x1bd10b;})['then'](respondWithFilteredResult(_0x103563,_0xe08535))[_0xf283('0x55')](handleError(_0x103563,null));};exports[_0xf283('0x56')]=function(_0x44aa97,_0x5bb765){var _0x4ffe1a={'raw':![],'where':{'id':_0x44aa97[_0xf283('0x57')]['id']}},_0x4704b5={};_0x4704b5['model']=_[_0xf283('0x42')](db[_0xf283('0x3b')][_0xf283('0x3c')]);_0x4704b5['query']=_[_0xf283('0x42')](_0x44aa97['query']);_0x4704b5[_0xf283('0x43')]=_[_0xf283('0x44')](_0x4704b5[_0xf283('0x3f')],_0x4704b5['query']);_0x4ffe1a[_0xf283('0x45')]=_[_0xf283('0x44')](_0x4704b5['model'],qs['fields'](_0x44aa97['query'][_0xf283('0x46')]));_0x4ffe1a[_0xf283('0x45')]=_0x4ffe1a[_0xf283('0x45')][_0xf283('0x58')]?_0x4ffe1a[_0xf283('0x45')]:_0x4704b5[_0xf283('0x3f')];if(_0x44aa97[_0xf283('0x41')][_0xf283('0x59')]){_0x4ffe1a['include']=[{'all':!![]}];}_0x4ffe1a=_[_0xf283('0x4e')]({},_0x4ffe1a,_0x44aa97[_0xf283('0x52')]);return db['SugarcrmConfiguration'][_0xf283('0x5a')](_0x4ffe1a)[_0xf283('0x23')](handleEntityNotFound(_0x5bb765,null))[_0xf283('0x23')](respondWithResult(_0x5bb765,null))[_0xf283('0x55')](handleError(_0x5bb765,null));};exports[_0xf283('0x5b')]=function(_0x13418f,_0x386301){return db[_0xf283('0x3b')][_0xf283('0x5b')](_0x13418f['body'],{})[_0xf283('0x23')](respondWithResult(_0x386301,0xc9))[_0xf283('0x55')](handleError(_0x386301,null));};exports[_0xf283('0x37')]=function(_0x5eb7ba,_0x44bf8f){if(_0x5eb7ba['body']['id']){delete _0x5eb7ba[_0xf283('0x5c')]['id'];}return db[_0xf283('0x3b')][_0xf283('0x5a')]({'where':{'id':_0x5eb7ba[_0xf283('0x57')]['id']}})[_0xf283('0x23')](handleEntityNotFound(_0x44bf8f,null))['then'](saveUpdates(_0x5eb7ba[_0xf283('0x5c')],null))[_0xf283('0x23')](respondWithResult(_0x44bf8f,null))['catch'](handleError(_0x44bf8f,null));};exports['destroy']=function(_0x5a41ae,_0xca557d){return db['SugarcrmConfiguration']['find']({'where':{'id':_0x5a41ae['params']['id']}})[_0xf283('0x23')](handleEntityNotFound(_0xca557d,null))[_0xf283('0x23')](removeEntity(_0xca557d,null))['catch'](handleError(_0xca557d,null));};exports[_0xf283('0x5d')]=function(_0xd84dca,_0x2d7f50,_0x40b94d){var _0xd48ac2={};var _0x131026={};var _0x3285fc;var _0x2cb896;return db[_0xf283('0x3b')][_0xf283('0x5e')]({'where':{'id':_0xd84dca[_0xf283('0x57')]['id']}})[_0xf283('0x23')](handleEntityNotFound(_0x2d7f50,null))[_0xf283('0x23')](function(_0x1d7b40){if(_0x1d7b40){_0x3285fc=_0x1d7b40;_0x131026[_0xf283('0x3f')]=_[_0xf283('0x42')](db['SugarcrmField'][_0xf283('0x3c')]);_0x131026[_0xf283('0x41')]=_[_0xf283('0x42')](_0xd84dca[_0xf283('0x41')]);_0x131026[_0xf283('0x43')]=_[_0xf283('0x44')](_0x131026['model'],_0x131026[_0xf283('0x41')]);_0xd48ac2['attributes']=_[_0xf283('0x44')](_0x131026[_0xf283('0x3f')],qs[_0xf283('0x46')](_0xd84dca[_0xf283('0x41')][_0xf283('0x46')]));_0xd48ac2[_0xf283('0x45')]=_0xd48ac2[_0xf283('0x45')][_0xf283('0x58')]?_0xd48ac2['attributes']:_0x131026[_0xf283('0x3f')];_0xd48ac2[_0xf283('0x4a')]=qs['sort'](_0xd84dca[_0xf283('0x41')]['sort']);_0xd48ac2[_0xf283('0x4d')]=qs['filters'](_[_0xf283('0x4c')](_0xd84dca[_0xf283('0x41')],_0x131026['filters']));if(_0xd84dca[_0xf283('0x41')][_0xf283('0x51')]){_0xd48ac2[_0xf283('0x4d')]=_[_0xf283('0x4e')](_0xd48ac2['where'],{'$or':_[_0xf283('0x3a')](_0xd48ac2[_0xf283('0x45')],function(_0x1b6a07){var _0x58999c={};_0x58999c[_0x1b6a07]={'$like':'%'+_0xd84dca[_0xf283('0x41')][_0xf283('0x51')]+'%'};return _0x58999c;})});}_0xd48ac2=_[_0xf283('0x4e')]({},_0xd48ac2,_0xd84dca[_0xf283('0x52')]);return _0x3285fc[_0xf283('0x5d')](_0xd48ac2);}})[_0xf283('0x23')](function(_0x43ccaa){if(_0x43ccaa){_0x2cb896=_0x43ccaa[_0xf283('0x58')];if(!_0xd84dca[_0xf283('0x41')][_0xf283('0x47')](_0xf283('0x48'))){_0xd48ac2['limit']=qs[_0xf283('0x49')](_0xd84dca[_0xf283('0x41')]['limit']);_0xd48ac2[_0xf283('0x33')]=qs[_0xf283('0x33')](_0xd84dca[_0xf283('0x41')][_0xf283('0x33')]);}return _0x3285fc[_0xf283('0x5d')](_0xd48ac2);}})[_0xf283('0x23')](function(_0x3c16f4){if(_0x3c16f4){return _0x3c16f4?{'count':_0x2cb896,'rows':_0x3c16f4}:null;}})['then'](respondWithResult(_0x2d7f50,null))['catch'](handleError(_0x2d7f50,null));};exports[_0xf283('0x5f')]=function(_0x15b5c0,_0x1a7f1f,_0x23415a){var _0x1468c9={};var _0x31451e={};var _0x35575b;var _0x4d197c;return db[_0xf283('0x3b')][_0xf283('0x5e')]({'where':{'id':_0x15b5c0[_0xf283('0x57')]['id']}})[_0xf283('0x23')](handleEntityNotFound(_0x1a7f1f,null))[_0xf283('0x23')](function(_0x2c5e44){if(_0x2c5e44){_0x35575b=_0x2c5e44;_0x31451e[_0xf283('0x3f')]=_[_0xf283('0x42')](db[_0xf283('0x60')][_0xf283('0x3c')]);_0x31451e[_0xf283('0x41')]=_[_0xf283('0x42')](_0x15b5c0[_0xf283('0x41')]);_0x31451e['filters']=_['intersection'](_0x31451e[_0xf283('0x3f')],_0x31451e['query']);_0x1468c9['attributes']=_['intersection'](_0x31451e[_0xf283('0x3f')],qs['fields'](_0x15b5c0[_0xf283('0x41')]['fields']));_0x1468c9['attributes']=_0x1468c9[_0xf283('0x45')][_0xf283('0x58')]?_0x1468c9['attributes']:_0x31451e[_0xf283('0x3f')];_0x1468c9['order']=qs['sort'](_0x15b5c0[_0xf283('0x41')][_0xf283('0x4b')]);_0x1468c9[_0xf283('0x4d')]=qs[_0xf283('0x43')](_[_0xf283('0x4c')](_0x15b5c0['query'],_0x31451e[_0xf283('0x43')]));if(_0x15b5c0[_0xf283('0x41')][_0xf283('0x51')]){_0x1468c9[_0xf283('0x4d')]=_['merge'](_0x1468c9[_0xf283('0x4d')],{'$or':_[_0xf283('0x3a')](_0x1468c9[_0xf283('0x45')],function(_0x538cf1){var _0x1fbb36={};_0x1fbb36[_0x538cf1]={'$like':'%'+_0x15b5c0[_0xf283('0x41')]['filter']+'%'};return _0x1fbb36;})});}_0x1468c9=_['merge']({},_0x1468c9,_0x15b5c0['options']);return _0x35575b[_0xf283('0x5f')](_0x1468c9);}})['then'](function(_0x3f33af){if(_0x3f33af){_0x4d197c=_0x3f33af['length'];if(!_0x15b5c0[_0xf283('0x41')][_0xf283('0x47')](_0xf283('0x48'))){_0x1468c9[_0xf283('0x49')]=qs[_0xf283('0x49')](_0x15b5c0['query']['limit']);_0x1468c9[_0xf283('0x33')]=qs['offset'](_0x15b5c0[_0xf283('0x41')][_0xf283('0x33')]);}return _0x35575b['getSubjects'](_0x1468c9);}})['then'](function(_0x1e7ac6){if(_0x1e7ac6){return _0x1e7ac6?{'count':_0x4d197c,'rows':_0x1e7ac6}:null;}})[_0xf283('0x23')](respondWithResult(_0x1a7f1f,null))['catch'](handleError(_0x1a7f1f,null));};exports[_0xf283('0x61')]=function(_0x5907a3,_0x2af922,_0xb8e756){var _0x666dce={};var _0x2de7a6={};var _0x1f695e;var _0x1e0436;return db['SugarcrmConfiguration'][_0xf283('0x5e')]({'where':{'id':_0x5907a3['params']['id']}})[_0xf283('0x23')](handleEntityNotFound(_0x2af922,null))[_0xf283('0x23')](function(_0x2245f6){if(_0x2245f6){_0x1f695e=_0x2245f6;_0x2de7a6['model']=_[_0xf283('0x42')](db['SugarcrmField'][_0xf283('0x3c')]);_0x2de7a6[_0xf283('0x41')]=_[_0xf283('0x42')](_0x5907a3[_0xf283('0x41')]);_0x2de7a6[_0xf283('0x43')]=_[_0xf283('0x44')](_0x2de7a6[_0xf283('0x3f')],_0x2de7a6[_0xf283('0x41')]);_0x666dce['attributes']=_[_0xf283('0x44')](_0x2de7a6[_0xf283('0x3f')],qs[_0xf283('0x46')](_0x5907a3['query']['fields']));_0x666dce[_0xf283('0x45')]=_0x666dce[_0xf283('0x45')]['length']?_0x666dce['attributes']:_0x2de7a6['model'];_0x666dce[_0xf283('0x4a')]=qs[_0xf283('0x4b')](_0x5907a3[_0xf283('0x41')][_0xf283('0x4b')]);_0x666dce[_0xf283('0x4d')]=qs[_0xf283('0x43')](_[_0xf283('0x4c')](_0x5907a3[_0xf283('0x41')],_0x2de7a6[_0xf283('0x43')]));if(_0x5907a3[_0xf283('0x41')][_0xf283('0x51')]){_0x666dce['where']=_['merge'](_0x666dce['where'],{'$or':_[_0xf283('0x3a')](_0x666dce[_0xf283('0x45')],function(_0x35e171){var _0x3004da={};_0x3004da[_0x35e171]={'$like':'%'+_0x5907a3[_0xf283('0x41')][_0xf283('0x51')]+'%'};return _0x3004da;})});}_0x666dce=_['merge']({},_0x666dce,_0x5907a3[_0xf283('0x52')]);return _0x1f695e[_0xf283('0x61')](_0x666dce);}})[_0xf283('0x23')](function(_0x14d20f){if(_0x14d20f){_0x1e0436=_0x14d20f[_0xf283('0x58')];if(!_0x5907a3[_0xf283('0x41')]['hasOwnProperty'](_0xf283('0x48'))){_0x666dce[_0xf283('0x49')]=qs[_0xf283('0x49')](_0x5907a3[_0xf283('0x41')][_0xf283('0x49')]);_0x666dce['offset']=qs[_0xf283('0x33')](_0x5907a3['query'][_0xf283('0x33')]);}return _0x1f695e[_0xf283('0x61')](_0x666dce);}})[_0xf283('0x23')](function(_0x3e74fb){if(_0x3e74fb){return _0x3e74fb?{'count':_0x1e0436,'rows':_0x3e74fb}:null;}})[_0xf283('0x23')](respondWithResult(_0x2af922,null))[_0xf283('0x55')](handleError(_0x2af922,null));};
\ No newline at end of file
+var _0x1dcc=['attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','VIRTUAL','options','count','findAll','rows','show','params','includeAll','include','find','create','update','body','destroy','getFields','findOne','SugarcrmField','getSubjects','getDescriptions','html-pdf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','jayson/promise','client','http','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','status','offset','limit','Content-Range','json','apply','save','then','end','sendStatus','stack','name','map','SugarcrmConfiguration','rawAttributes','type','model','query','keys','filters','intersection'];(function(_0x12edae,_0x389154){var _0x2370f7=function(_0x558e03){while(--_0x558e03){_0x12edae['push'](_0x12edae['shift']());}};_0x2370f7(++_0x389154);}(_0x1dcc,0x77));var _0xc1dc=function(_0x2ad270,_0x12bd60){_0x2ad270=_0x2ad270-0x0;var _0x50ef45=_0x1dcc[_0x2ad270];return _0x50ef45;};'use strict';var pdf=require(_0xc1dc('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xc1dc('0x1'));var jsonpatch=require(_0xc1dc('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xc1dc('0x3'));var Mustache=require(_0xc1dc('0x4'));var util=require(_0xc1dc('0x5'));var path=require(_0xc1dc('0x6'));var sox=require(_0xc1dc('0x7'));var csv=require(_0xc1dc('0x8'));var ejs=require(_0xc1dc('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0xc1dc('0xa'));var crypto=require(_0xc1dc('0xb'));var jsforce=require(_0xc1dc('0xc'));var deskjs=require(_0xc1dc('0xd'));var toCsv=require(_0xc1dc('0x8'));var querystring=require(_0xc1dc('0xe'));var Papa=require(_0xc1dc('0xf'));var Redis=require(_0xc1dc('0x10'));var authService=require(_0xc1dc('0x11'));var qs=require(_0xc1dc('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc1dc('0x13'));var logger=require(_0xc1dc('0x14'))('api');var utils=require(_0xc1dc('0x15'));var config=require(_0xc1dc('0x16'));var db=require('../../mysqldb')['db'];var jayson=require(_0xc1dc('0x17'));var client=jayson[_0xc1dc('0x18')][_0xc1dc('0x19')]({'port':0x232a});function checkPasswordPattern(_0x2d407c,_0x41679c,_0x418f8c){if(_0x418f8c){var _0x18a8a2=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x18a8a2['test'](_0x41679c)){return _0x2d407c;}else{throw new db[(_0xc1dc('0x1a'))][(_0xc1dc('0x1b'))](_0xc1dc('0x1c'));}}else{return _0x2d407c;}}function respondWithRpcPromise(_0x775ee4,_0xdfbe60,_0x31191a,_0x209355){return new BPromise(function(_0x1edb66,_0x4b7fd5){var _0x5dd754=_0x209355||client;return _0x5dd754['request'](_0x775ee4,_0x31191a)['then'](function(_0x2e2d8e){logger[_0xc1dc('0x1d')](_0xc1dc('0x1e'),_0xdfbe60,_0xc1dc('0x1f'));logger[_0xc1dc('0x20')](_0xc1dc('0x21'),_0xdfbe60,'request\x20sent',JSON[_0xc1dc('0x22')](_0x2e2d8e));if(_0x2e2d8e[_0xc1dc('0x23')]){if(_0x2e2d8e[_0xc1dc('0x23')]['code']===0x1f4){logger[_0xc1dc('0x23')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xdfbe60,_0x2e2d8e[_0xc1dc('0x23')][_0xc1dc('0x24')]);return _0x4b7fd5(_0x2e2d8e[_0xc1dc('0x23')][_0xc1dc('0x24')]);}logger[_0xc1dc('0x23')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xdfbe60,_0x2e2d8e[_0xc1dc('0x23')][_0xc1dc('0x24')]);return _0x1edb66(_0x2e2d8e[_0xc1dc('0x23')][_0xc1dc('0x24')]);}else{logger['info'](_0xc1dc('0x1e'),_0xdfbe60,_0xc1dc('0x1f'));_0x1edb66(_0x2e2d8e['result'][_0xc1dc('0x24')]);}})[_0xc1dc('0x25')](function(_0x13998b){logger[_0xc1dc('0x23')](_0xc1dc('0x1e'),_0xdfbe60,_0x13998b);_0x4b7fd5(_0x13998b);});});}function respondWithStatusCode(_0x454ed2,_0x55e6f9){_0x55e6f9=_0x55e6f9||0xcc;return function(_0x509a4a){if(_0x509a4a){return _0x454ed2['sendStatus'](_0x55e6f9);}return _0x454ed2[_0xc1dc('0x26')](_0x55e6f9)['end']();};}function respondWithResult(_0x10d1a8,_0x2c6114){_0x2c6114=_0x2c6114||0xc8;return function(_0x413bc7){if(_0x413bc7){return _0x10d1a8['status'](_0x2c6114)['json'](_0x413bc7);}};}function respondWithFilteredResult(_0x2b14de,_0x418072){return function(_0x3a8b7f){if(_0x3a8b7f){var _0x1dc7bc=_0x3a8b7f['count'],_0x1745b2=_0x418072[_0xc1dc('0x27')],_0x1ae9d1=_0x418072['offset']+_0x418072[_0xc1dc('0x28')],_0x560e05;if(_0x1ae9d1>=_0x1dc7bc){_0x1ae9d1=_0x1dc7bc;_0x560e05=0xc8;}else{_0x560e05=0xce;}_0x2b14de['status'](_0x560e05);return _0x2b14de['set'](_0xc1dc('0x29'),_0x1745b2+'-'+_0x1ae9d1+'/'+_0x1dc7bc)[_0xc1dc('0x2a')](_0x3a8b7f);}return null;};}function patchUpdates(_0xfeab2a){return function(_0x2aface){try{jsonpatch[_0xc1dc('0x2b')](_0x2aface,_0xfeab2a,!![]);}catch(_0x285606){return BPromise['reject'](_0x285606);}return _0x2aface[_0xc1dc('0x2c')]();};}function saveUpdates(_0x77eaa7,_0x50b25b){return function(_0x447650){if(_0x447650){return _0x447650['update'](_0x77eaa7)[_0xc1dc('0x2d')](function(_0x320802){return _0x320802;});}return null;};}function removeEntity(_0x374b8e,_0x5e63c0){return function(_0x3ad22e){if(_0x3ad22e){return _0x3ad22e['destroy']()[_0xc1dc('0x2d')](function(){_0x374b8e[_0xc1dc('0x26')](0xcc)[_0xc1dc('0x2e')]();});}};}function handleEntityNotFound(_0x48954f,_0x385773){return function(_0x15957b){if(!_0x15957b){_0x48954f[_0xc1dc('0x2f')](0x194);}return _0x15957b;};}function handleError(_0x221f33,_0x5b8ee4){_0x5b8ee4=_0x5b8ee4||0x1f4;return function(_0x5cbe71){logger['error'](_0x5cbe71[_0xc1dc('0x30')]);if(_0x5cbe71[_0xc1dc('0x31')]){delete _0x5cbe71[_0xc1dc('0x31')];}_0x221f33[_0xc1dc('0x26')](_0x5b8ee4)['send'](_0x5cbe71);};}exports['index']=function(_0x5660e0,_0x46761f){var _0x176d38={},_0x219021={},_0x59dcce={'count':0x0,'rows':[]};var _0x1ca665=_[_0xc1dc('0x32')](db[_0xc1dc('0x33')][_0xc1dc('0x34')],function(_0x583462){return{'name':_0x583462['fieldName'],'type':_0x583462[_0xc1dc('0x35')]['key']};});_0x219021[_0xc1dc('0x36')]=_[_0xc1dc('0x32')](_0x1ca665,_0xc1dc('0x31'));_0x219021[_0xc1dc('0x37')]=_[_0xc1dc('0x38')](_0x5660e0[_0xc1dc('0x37')]);_0x219021[_0xc1dc('0x39')]=_[_0xc1dc('0x3a')](_0x219021[_0xc1dc('0x36')],_0x219021[_0xc1dc('0x37')]);_0x176d38[_0xc1dc('0x3b')]=_[_0xc1dc('0x3a')](_0x219021[_0xc1dc('0x36')],qs[_0xc1dc('0x3c')](_0x5660e0['query'][_0xc1dc('0x3c')]));_0x176d38[_0xc1dc('0x3b')]=_0x176d38[_0xc1dc('0x3b')][_0xc1dc('0x3d')]?_0x176d38[_0xc1dc('0x3b')]:_0x219021['model'];if(!_0x5660e0[_0xc1dc('0x37')][_0xc1dc('0x3e')](_0xc1dc('0x3f'))){_0x176d38[_0xc1dc('0x28')]=qs[_0xc1dc('0x28')](_0x5660e0[_0xc1dc('0x37')][_0xc1dc('0x28')]);_0x176d38[_0xc1dc('0x27')]=qs[_0xc1dc('0x27')](_0x5660e0[_0xc1dc('0x37')]['offset']);}_0x176d38[_0xc1dc('0x40')]=qs[_0xc1dc('0x41')](_0x5660e0['query'][_0xc1dc('0x41')]);_0x176d38['where']=qs[_0xc1dc('0x39')](_[_0xc1dc('0x42')](_0x5660e0[_0xc1dc('0x37')],_0x219021[_0xc1dc('0x39')]));if(_0x5660e0[_0xc1dc('0x37')][_0xc1dc('0x43')]){_0x176d38['where']=_[_0xc1dc('0x44')](_0x176d38[_0xc1dc('0x45')],{'$or':_[_0xc1dc('0x32')](_0x1ca665,function(_0x4a072c){if(_0x4a072c[_0xc1dc('0x35')]!==_0xc1dc('0x46')){var _0x59c76a={};_0x59c76a[_0x4a072c['name']]={'$like':'%'+_0x5660e0['query'][_0xc1dc('0x43')]+'%'};return _0x59c76a;}})});}_0x176d38=_[_0xc1dc('0x44')]({},_0x176d38,_0x5660e0[_0xc1dc('0x47')]);var _0xd8b94={'where':_0x176d38['where']};return db[_0xc1dc('0x33')][_0xc1dc('0x48')](_0xd8b94)['then'](function(_0x1fe9b2){_0x59dcce[_0xc1dc('0x48')]=_0x1fe9b2;if(_0x5660e0[_0xc1dc('0x37')]['includeAll']){_0x176d38['include']=[{'all':!![]}];}return db[_0xc1dc('0x33')][_0xc1dc('0x49')](_0x176d38);})[_0xc1dc('0x2d')](function(_0x36415b){_0x59dcce[_0xc1dc('0x4a')]=_0x36415b;return _0x59dcce;})[_0xc1dc('0x2d')](respondWithFilteredResult(_0x46761f,_0x176d38))[_0xc1dc('0x25')](handleError(_0x46761f,null));};exports[_0xc1dc('0x4b')]=function(_0x233673,_0x51b970){var _0x74756={'raw':![],'where':{'id':_0x233673[_0xc1dc('0x4c')]['id']}},_0x5ec10a={};_0x5ec10a[_0xc1dc('0x36')]=_[_0xc1dc('0x38')](db[_0xc1dc('0x33')][_0xc1dc('0x34')]);_0x5ec10a[_0xc1dc('0x37')]=_[_0xc1dc('0x38')](_0x233673[_0xc1dc('0x37')]);_0x5ec10a[_0xc1dc('0x39')]=_[_0xc1dc('0x3a')](_0x5ec10a[_0xc1dc('0x36')],_0x5ec10a[_0xc1dc('0x37')]);_0x74756[_0xc1dc('0x3b')]=_[_0xc1dc('0x3a')](_0x5ec10a['model'],qs['fields'](_0x233673[_0xc1dc('0x37')][_0xc1dc('0x3c')]));_0x74756['attributes']=_0x74756[_0xc1dc('0x3b')][_0xc1dc('0x3d')]?_0x74756['attributes']:_0x5ec10a[_0xc1dc('0x36')];if(_0x233673['query'][_0xc1dc('0x4d')]){_0x74756[_0xc1dc('0x4e')]=[{'all':!![]}];}_0x74756=_[_0xc1dc('0x44')]({},_0x74756,_0x233673[_0xc1dc('0x47')]);return db[_0xc1dc('0x33')][_0xc1dc('0x4f')](_0x74756)[_0xc1dc('0x2d')](handleEntityNotFound(_0x51b970,null))[_0xc1dc('0x2d')](respondWithResult(_0x51b970,null))[_0xc1dc('0x25')](handleError(_0x51b970,null));};exports[_0xc1dc('0x50')]=function(_0x50ae51,_0x4f97c0){return db[_0xc1dc('0x33')][_0xc1dc('0x50')](_0x50ae51['body'],{})['then'](respondWithResult(_0x4f97c0,0xc9))[_0xc1dc('0x25')](handleError(_0x4f97c0,null));};exports[_0xc1dc('0x51')]=function(_0x35e2a9,_0x267935){if(_0x35e2a9[_0xc1dc('0x52')]['id']){delete _0x35e2a9[_0xc1dc('0x52')]['id'];}return db[_0xc1dc('0x33')][_0xc1dc('0x4f')]({'where':{'id':_0x35e2a9[_0xc1dc('0x4c')]['id']}})['then'](handleEntityNotFound(_0x267935,null))[_0xc1dc('0x2d')](saveUpdates(_0x35e2a9['body'],null))[_0xc1dc('0x2d')](respondWithResult(_0x267935,null))[_0xc1dc('0x25')](handleError(_0x267935,null));};exports[_0xc1dc('0x53')]=function(_0x116e01,_0x3754f7){return db['SugarcrmConfiguration'][_0xc1dc('0x4f')]({'where':{'id':_0x116e01[_0xc1dc('0x4c')]['id']}})[_0xc1dc('0x2d')](handleEntityNotFound(_0x3754f7,null))['then'](removeEntity(_0x3754f7,null))[_0xc1dc('0x25')](handleError(_0x3754f7,null));};exports[_0xc1dc('0x54')]=function(_0x1a21ae,_0x2e5d83,_0xa17370){var _0x2a62cb={};var _0x4284f4={};var _0x4836ba;var _0x5e66da;return db['SugarcrmConfiguration'][_0xc1dc('0x55')]({'where':{'id':_0x1a21ae[_0xc1dc('0x4c')]['id']}})[_0xc1dc('0x2d')](handleEntityNotFound(_0x2e5d83,null))['then'](function(_0x329747){if(_0x329747){_0x4836ba=_0x329747;_0x4284f4[_0xc1dc('0x36')]=_[_0xc1dc('0x38')](db[_0xc1dc('0x56')][_0xc1dc('0x34')]);_0x4284f4['query']=_['keys'](_0x1a21ae[_0xc1dc('0x37')]);_0x4284f4['filters']=_[_0xc1dc('0x3a')](_0x4284f4[_0xc1dc('0x36')],_0x4284f4['query']);_0x2a62cb['attributes']=_[_0xc1dc('0x3a')](_0x4284f4[_0xc1dc('0x36')],qs['fields'](_0x1a21ae[_0xc1dc('0x37')][_0xc1dc('0x3c')]));_0x2a62cb[_0xc1dc('0x3b')]=_0x2a62cb[_0xc1dc('0x3b')]['length']?_0x2a62cb['attributes']:_0x4284f4['model'];_0x2a62cb['order']=qs['sort'](_0x1a21ae['query'][_0xc1dc('0x41')]);_0x2a62cb['where']=qs[_0xc1dc('0x39')](_['pick'](_0x1a21ae[_0xc1dc('0x37')],_0x4284f4['filters']));if(_0x1a21ae[_0xc1dc('0x37')][_0xc1dc('0x43')]){_0x2a62cb[_0xc1dc('0x45')]=_[_0xc1dc('0x44')](_0x2a62cb[_0xc1dc('0x45')],{'$or':_[_0xc1dc('0x32')](_0x2a62cb[_0xc1dc('0x3b')],function(_0x396473){var _0xc3fbd0={};_0xc3fbd0[_0x396473]={'$like':'%'+_0x1a21ae['query']['filter']+'%'};return _0xc3fbd0;})});}_0x2a62cb=_[_0xc1dc('0x44')]({},_0x2a62cb,_0x1a21ae[_0xc1dc('0x47')]);return _0x4836ba[_0xc1dc('0x54')](_0x2a62cb);}})[_0xc1dc('0x2d')](function(_0x122207){if(_0x122207){_0x5e66da=_0x122207[_0xc1dc('0x3d')];if(!_0x1a21ae['query'][_0xc1dc('0x3e')](_0xc1dc('0x3f'))){_0x2a62cb[_0xc1dc('0x28')]=qs[_0xc1dc('0x28')](_0x1a21ae['query'][_0xc1dc('0x28')]);_0x2a62cb[_0xc1dc('0x27')]=qs[_0xc1dc('0x27')](_0x1a21ae['query'][_0xc1dc('0x27')]);}return _0x4836ba['getFields'](_0x2a62cb);}})[_0xc1dc('0x2d')](function(_0x29d6ed){if(_0x29d6ed){return _0x29d6ed?{'count':_0x5e66da,'rows':_0x29d6ed}:null;}})[_0xc1dc('0x2d')](respondWithResult(_0x2e5d83,null))[_0xc1dc('0x25')](handleError(_0x2e5d83,null));};exports[_0xc1dc('0x57')]=function(_0x4a9f83,_0x4748de,_0xa5598f){var _0x408bcb={};var _0x5f46a9={};var _0x5ac82b;var _0x4fc697;return db[_0xc1dc('0x33')]['findOne']({'where':{'id':_0x4a9f83[_0xc1dc('0x4c')]['id']}})['then'](handleEntityNotFound(_0x4748de,null))[_0xc1dc('0x2d')](function(_0x2550bc){if(_0x2550bc){_0x5ac82b=_0x2550bc;_0x5f46a9['model']=_[_0xc1dc('0x38')](db[_0xc1dc('0x56')][_0xc1dc('0x34')]);_0x5f46a9[_0xc1dc('0x37')]=_[_0xc1dc('0x38')](_0x4a9f83['query']);_0x5f46a9[_0xc1dc('0x39')]=_[_0xc1dc('0x3a')](_0x5f46a9['model'],_0x5f46a9['query']);_0x408bcb[_0xc1dc('0x3b')]=_[_0xc1dc('0x3a')](_0x5f46a9['model'],qs[_0xc1dc('0x3c')](_0x4a9f83[_0xc1dc('0x37')]['fields']));_0x408bcb[_0xc1dc('0x3b')]=_0x408bcb['attributes']['length']?_0x408bcb[_0xc1dc('0x3b')]:_0x5f46a9[_0xc1dc('0x36')];_0x408bcb['order']=qs[_0xc1dc('0x41')](_0x4a9f83[_0xc1dc('0x37')]['sort']);_0x408bcb['where']=qs[_0xc1dc('0x39')](_[_0xc1dc('0x42')](_0x4a9f83[_0xc1dc('0x37')],_0x5f46a9[_0xc1dc('0x39')]));if(_0x4a9f83[_0xc1dc('0x37')][_0xc1dc('0x43')]){_0x408bcb['where']=_[_0xc1dc('0x44')](_0x408bcb[_0xc1dc('0x45')],{'$or':_['map'](_0x408bcb[_0xc1dc('0x3b')],function(_0x1cfb1c){var _0x1fabb1={};_0x1fabb1[_0x1cfb1c]={'$like':'%'+_0x4a9f83[_0xc1dc('0x37')][_0xc1dc('0x43')]+'%'};return _0x1fabb1;})});}_0x408bcb=_[_0xc1dc('0x44')]({},_0x408bcb,_0x4a9f83['options']);return _0x5ac82b[_0xc1dc('0x57')](_0x408bcb);}})[_0xc1dc('0x2d')](function(_0x1fe49c){if(_0x1fe49c){_0x4fc697=_0x1fe49c['length'];if(!_0x4a9f83[_0xc1dc('0x37')][_0xc1dc('0x3e')](_0xc1dc('0x3f'))){_0x408bcb[_0xc1dc('0x28')]=qs[_0xc1dc('0x28')](_0x4a9f83[_0xc1dc('0x37')][_0xc1dc('0x28')]);_0x408bcb[_0xc1dc('0x27')]=qs[_0xc1dc('0x27')](_0x4a9f83[_0xc1dc('0x37')]['offset']);}return _0x5ac82b['getSubjects'](_0x408bcb);}})[_0xc1dc('0x2d')](function(_0x5f10e8){if(_0x5f10e8){return _0x5f10e8?{'count':_0x4fc697,'rows':_0x5f10e8}:null;}})[_0xc1dc('0x2d')](respondWithResult(_0x4748de,null))[_0xc1dc('0x25')](handleError(_0x4748de,null));};exports[_0xc1dc('0x58')]=function(_0x6dbca3,_0x2d60ac,_0x5f38f3){var _0x1eb898={};var _0x194e49={};var _0x1cbfbc;var _0x57bf9d;return db[_0xc1dc('0x33')][_0xc1dc('0x55')]({'where':{'id':_0x6dbca3[_0xc1dc('0x4c')]['id']}})[_0xc1dc('0x2d')](handleEntityNotFound(_0x2d60ac,null))[_0xc1dc('0x2d')](function(_0x3c80b1){if(_0x3c80b1){_0x1cbfbc=_0x3c80b1;_0x194e49[_0xc1dc('0x36')]=_[_0xc1dc('0x38')](db[_0xc1dc('0x56')][_0xc1dc('0x34')]);_0x194e49[_0xc1dc('0x37')]=_['keys'](_0x6dbca3['query']);_0x194e49[_0xc1dc('0x39')]=_['intersection'](_0x194e49[_0xc1dc('0x36')],_0x194e49['query']);_0x1eb898[_0xc1dc('0x3b')]=_['intersection'](_0x194e49[_0xc1dc('0x36')],qs[_0xc1dc('0x3c')](_0x6dbca3[_0xc1dc('0x37')]['fields']));_0x1eb898[_0xc1dc('0x3b')]=_0x1eb898[_0xc1dc('0x3b')]['length']?_0x1eb898['attributes']:_0x194e49[_0xc1dc('0x36')];_0x1eb898['order']=qs[_0xc1dc('0x41')](_0x6dbca3['query'][_0xc1dc('0x41')]);_0x1eb898[_0xc1dc('0x45')]=qs[_0xc1dc('0x39')](_[_0xc1dc('0x42')](_0x6dbca3['query'],_0x194e49[_0xc1dc('0x39')]));if(_0x6dbca3[_0xc1dc('0x37')][_0xc1dc('0x43')]){_0x1eb898[_0xc1dc('0x45')]=_[_0xc1dc('0x44')](_0x1eb898[_0xc1dc('0x45')],{'$or':_['map'](_0x1eb898['attributes'],function(_0x1c6b4c){var _0x40bbe7={};_0x40bbe7[_0x1c6b4c]={'$like':'%'+_0x6dbca3[_0xc1dc('0x37')][_0xc1dc('0x43')]+'%'};return _0x40bbe7;})});}_0x1eb898=_[_0xc1dc('0x44')]({},_0x1eb898,_0x6dbca3[_0xc1dc('0x47')]);return _0x1cbfbc['getDescriptions'](_0x1eb898);}})['then'](function(_0x22c2de){if(_0x22c2de){_0x57bf9d=_0x22c2de[_0xc1dc('0x3d')];if(!_0x6dbca3[_0xc1dc('0x37')][_0xc1dc('0x3e')]('nolimit')){_0x1eb898[_0xc1dc('0x28')]=qs[_0xc1dc('0x28')](_0x6dbca3[_0xc1dc('0x37')][_0xc1dc('0x28')]);_0x1eb898[_0xc1dc('0x27')]=qs[_0xc1dc('0x27')](_0x6dbca3[_0xc1dc('0x37')][_0xc1dc('0x27')]);}return _0x1cbfbc[_0xc1dc('0x58')](_0x1eb898);}})[_0xc1dc('0x2d')](function(_0x492231){if(_0x492231){return _0x492231?{'count':_0x57bf9d,'rows':_0x492231}:null;}})[_0xc1dc('0x2d')](respondWithResult(_0x2d60ac,null))[_0xc1dc('0x25')](handleError(_0x2d60ac,null));};
\ No newline at end of file
diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js
index 70dd9b9..5273d65 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 _0x6905=['SugarcrmConfiguration','lodash','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./intSugarcrmConfiguration.attributes','exports','define'];(function(_0x2d1971,_0x20b764){var _0x4d7759=function(_0x56a550){while(--_0x56a550){_0x2d1971['push'](_0x2d1971['shift']());}};_0x4d7759(++_0x20b764);}(_0x6905,0x109));var _0x5690=function(_0xbc2974,_0xec3342){_0xbc2974=_0xbc2974-0x0;var _0x3a5b4f=_0x6905[_0xbc2974];return _0x3a5b4f;};'use strict';var _=require(_0x5690('0x0'));var util=require('util');var logger=require(_0x5690('0x1'))(_0x5690('0x2'));var moment=require(_0x5690('0x3'));var BPromise=require(_0x5690('0x4'));var rp=require(_0x5690('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x5690('0x6'));var attributes=require(_0x5690('0x7'));module[_0x5690('0x8')]=function(_0x3337c3,_0x2609c2){return _0x3337c3[_0x5690('0x9')](_0x5690('0xa'),attributes,{'tableName':'int_sugarcrm_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0a65=['moment','request-promise','../../config/environment','./intSugarcrmConfiguration.attributes','define','SugarcrmConfiguration','int_sugarcrm_configurations','lodash','util','../../config/logger'];(function(_0x145204,_0x30d112){var _0x12cda3=function(_0x21880e){while(--_0x21880e){_0x145204['push'](_0x145204['shift']());}};_0x12cda3(++_0x30d112);}(_0x0a65,0x1ab));var _0x50a6=function(_0x41862f,_0x3d9e3d){_0x41862f=_0x41862f-0x0;var _0x2430bd=_0x0a65[_0x41862f];return _0x2430bd;};'use strict';var _=require(_0x50a6('0x0'));var util=require(_0x50a6('0x1'));var logger=require(_0x50a6('0x2'))('api');var moment=require(_0x50a6('0x3'));var BPromise=require('bluebird');var rp=require(_0x50a6('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x50a6('0x5'));var attributes=require(_0x50a6('0x6'));module['exports']=function(_0x5436cf,_0x170241){return _0x5436cf[_0x50a6('0x7')](_0x50a6('0x8'),attributes,{'tableName':_0x50a6('0x9'),'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 507f230..43c6538 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 _0x2fd3=['rpc','../../config/environment','jayson/promise','client','http','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x1bdafc,_0x128447){var _0x3663c5=function(_0x2ba21e){while(--_0x2ba21e){_0x1bdafc['push'](_0x1bdafc['shift']());}};_0x3663c5(++_0x128447);}(_0x2fd3,0x1ef));var _0x32fd=function(_0x37de2e,_0x302af6){_0x37de2e=_0x37de2e-0x0;var _0x1895d0=_0x2fd3[_0x37de2e];return _0x1895d0;};'use strict';var _=require(_0x32fd('0x0'));var util=require(_0x32fd('0x1'));var moment=require(_0x32fd('0x2'));var BPromise=require(_0x32fd('0x3'));var rs=require(_0x32fd('0x4'));var fs=require('fs');var Redis=require(_0x32fd('0x5'));var db=require(_0x32fd('0x6'))['db'];var utils=require(_0x32fd('0x7'));var logger=require(_0x32fd('0x8'))(_0x32fd('0x9'));var config=require(_0x32fd('0xa'));var jayson=require(_0x32fd('0xb'));var client=jayson[_0x32fd('0xc')][_0x32fd('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x1ce435,_0x7a7586,_0x597b1e){return new BPromise(function(_0x2ac43a,_0x13000b){return client['request'](_0x1ce435,_0x597b1e)[_0x32fd('0xe')](function(_0x58701c){logger[_0x32fd('0xf')](_0x32fd('0x10'),_0x7a7586,_0x32fd('0x11'));logger[_0x32fd('0x12')]('SugarcrmConfiguration,\x20%s,\x20%s,\x20%s',_0x7a7586,_0x32fd('0x11'),JSON[_0x32fd('0x13')](_0x58701c));if(_0x58701c[_0x32fd('0x14')]){if(_0x58701c[_0x32fd('0x14')]['code']===0x1f4){logger[_0x32fd('0x14')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x7a7586,_0x58701c[_0x32fd('0x14')][_0x32fd('0x15')]);return _0x13000b(_0x58701c['error']['message']);}logger[_0x32fd('0x14')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x7a7586,_0x58701c[_0x32fd('0x14')][_0x32fd('0x15')]);return _0x2ac43a(_0x58701c[_0x32fd('0x14')][_0x32fd('0x15')]);}else{logger['info'](_0x32fd('0x10'),_0x7a7586,_0x32fd('0x11'));_0x2ac43a(_0x58701c[_0x32fd('0x16')][_0x32fd('0x15')]);}})[_0x32fd('0x17')](function(_0x2a106d){logger[_0x32fd('0x14')](_0x32fd('0x10'),_0x7a7586,_0x2a106d);_0x13000b(_0x2a106d);});});}
\ No newline at end of file
+var _0xa50d=['catch','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xa50d,0xfe));var _0xda50=function(_0x13fdb1,_0x1c6fba){_0x13fdb1=_0x13fdb1-0x0;var _0x55f710=_0xa50d[_0x13fdb1];return _0x55f710;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xda50('0x0'));var BPromise=require(_0xda50('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xda50('0x2'));var db=require(_0xda50('0x3'))['db'];var utils=require(_0xda50('0x4'));var logger=require(_0xda50('0x5'))(_0xda50('0x6'));var config=require(_0xda50('0x7'));var jayson=require(_0xda50('0x8'));var client=jayson[_0xda50('0x9')][_0xda50('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2a10a0,_0x12b307,_0xaef15e){return new BPromise(function(_0x1ed78b,_0x53abf0){return client[_0xda50('0xb')](_0x2a10a0,_0xaef15e)[_0xda50('0xc')](function(_0x291a11){logger[_0xda50('0xd')](_0xda50('0xe'),_0x12b307,_0xda50('0xf'));logger['debug'](_0xda50('0x10'),_0x12b307,_0xda50('0xf'),JSON[_0xda50('0x11')](_0x291a11));if(_0x291a11['error']){if(_0x291a11[_0xda50('0x12')][_0xda50('0x13')]===0x1f4){logger[_0xda50('0x12')](_0xda50('0xe'),_0x12b307,_0x291a11[_0xda50('0x12')]['message']);return _0x53abf0(_0x291a11[_0xda50('0x12')][_0xda50('0x14')]);}logger[_0xda50('0x12')](_0xda50('0xe'),_0x12b307,_0x291a11[_0xda50('0x12')][_0xda50('0x14')]);return _0x1ed78b(_0x291a11[_0xda50('0x12')][_0xda50('0x14')]);}else{logger[_0xda50('0xd')](_0xda50('0xe'),_0x12b307,_0xda50('0xf'));_0x1ed78b(_0x291a11[_0xda50('0x15')]['message']);}})[_0xda50('0x16')](function(_0x43ba08){logger[_0xda50('0x12')](_0xda50('0xe'),_0x12b307,_0x43ba08);_0x53abf0(_0x43ba08);});});}
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/index.js b/server/api/intSugarcrmField/index.js
index 5fa7b65..5f3c86d 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 _0xe4c3=['get','isAuthenticated','index','/:id','show','post','create','put','update','destroy','exports','multer','connect-timeout','express','../../components/auth/service'];(function(_0x45f426,_0x1db67b){var _0x3d1326=function(_0x1514a7){while(--_0x1514a7){_0x45f426['push'](_0x45f426['shift']());}};_0x3d1326(++_0x1db67b);}(_0xe4c3,0x1dc));var _0x3e4c=function(_0x284403,_0x490b17){_0x284403=_0x284403-0x0;var _0x40c082=_0xe4c3[_0x284403];return _0x40c082;};'use strict';var multer=require(_0x3e4c('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x3e4c('0x1'));var express=require(_0x3e4c('0x2'));var router=express['Router']();var auth=require(_0x3e4c('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intSugarcrmField.controller');router[_0x3e4c('0x4')]('/',auth[_0x3e4c('0x5')](),controller[_0x3e4c('0x6')]);router[_0x3e4c('0x4')](_0x3e4c('0x7'),auth[_0x3e4c('0x5')](),controller[_0x3e4c('0x8')]);router[_0x3e4c('0x9')]('/',auth[_0x3e4c('0x5')](),controller[_0x3e4c('0xa')]);router[_0x3e4c('0xb')](_0x3e4c('0x7'),auth['isAuthenticated'](),controller[_0x3e4c('0xc')]);router['delete']('/:id',auth[_0x3e4c('0x5')](),controller[_0x3e4c('0xd')]);module[_0x3e4c('0xe')]=router;
\ No newline at end of file
+var _0x8062=['post','create','/:id','update','delete','exports','multer','util','path','express','../../components/auth/service','./intSugarcrmField.controller','isAuthenticated','index','get'];(function(_0x9e1d73,_0xcf6479){var _0x1ba603=function(_0x689c74){while(--_0x689c74){_0x9e1d73['push'](_0x9e1d73['shift']());}};_0x1ba603(++_0xcf6479);}(_0x8062,0x114));var _0x2806=function(_0x1cf86c,_0x5ab5a7){_0x1cf86c=_0x1cf86c-0x0;var _0x21dd0c=_0x8062[_0x1cf86c];return _0x21dd0c;};'use strict';var multer=require(_0x2806('0x0'));var util=require(_0x2806('0x1'));var path=require(_0x2806('0x2'));var timeout=require('connect-timeout');var express=require(_0x2806('0x3'));var router=express['Router']();var auth=require(_0x2806('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x2806('0x5'));router['get']('/',auth[_0x2806('0x6')](),controller[_0x2806('0x7')]);router[_0x2806('0x8')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x2806('0x9')]('/',auth['isAuthenticated'](),controller[_0x2806('0xa')]);router['put'](_0x2806('0xb'),auth[_0x2806('0x6')](),controller[_0x2806('0xc')]);router[_0x2806('0xd')]('/:id',auth[_0x2806('0x6')](),controller['destroy']);module[_0x2806('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/intSugarcrmField.attributes.js b/server/api/intSugarcrmField/intSugarcrmField.attributes.js
index a45e198..ff91d01 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 _0x320e=['string','STRING','ENUM','BOOLEAN','sequelize','variable','customVariable','keyValue'];(function(_0x5154e6,_0x3d557e){var _0x4626ad=function(_0x3a3a3a){while(--_0x3a3a3a){_0x5154e6['push'](_0x5154e6['shift']());}};_0x4626ad(++_0x3d557e);}(_0x320e,0x8c));var _0xe320=function(_0x1a27f3,_0x1c082d){_0x1a27f3=_0x1a27f3-0x0;var _0x3ce222=_0x320e[_0x1a27f3];return _0x3ce222;};'use strict';var Sequelize=require(_0xe320('0x0'));module['exports']={'type':{'type':Sequelize['ENUM']('string',_0xe320('0x1'),_0xe320('0x2'),_0xe320('0x3')),'defaultValue':_0xe320('0x4')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0xe320('0x5')]},'keyType':{'type':Sequelize[_0xe320('0x6')](_0xe320('0x4'),_0xe320('0x1'),_0xe320('0x2'))},'keyContent':{'type':Sequelize[_0xe320('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xe320('0x5')]},'customField':{'type':Sequelize[_0xe320('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xe320('0x5')]}};
\ No newline at end of file
+var _0xbeea=['variable','keyValue','STRING','sequelize','ENUM','string'];(function(_0x27eeca,_0x128a0d){var _0x5649ff=function(_0x1bfdf3){while(--_0x1bfdf3){_0x27eeca['push'](_0x27eeca['shift']());}};_0x5649ff(++_0x128a0d);}(_0xbeea,0xb1));var _0xabee=function(_0xcfbd37,_0x17f3d8){_0xcfbd37=_0xcfbd37-0x0;var _0x212feb=_0xbeea[_0xcfbd37];return _0x212feb;};'use strict';var Sequelize=require(_0xabee('0x0'));module['exports']={'type':{'type':Sequelize[_0xabee('0x1')](_0xabee('0x2'),_0xabee('0x3'),'customVariable',_0xabee('0x4')),'defaultValue':'string'},'content':{'type':Sequelize[_0xabee('0x5')]},'key':{'type':Sequelize[_0xabee('0x5')]},'keyType':{'type':Sequelize[_0xabee('0x1')](_0xabee('0x2'),_0xabee('0x3'),'customVariable')},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0xabee('0x5')]},'nameField':{'type':Sequelize[_0xabee('0x5')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xabee('0x5')]}};
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/intSugarcrmField.controller.js b/server/api/intSugarcrmField/intSugarcrmField.controller.js
index d186e75..414813d 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 _0x2f3a=['set','Content-Range','apply','reject','save','destroy','then','stack','name','send','index','map','SugarcrmField','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','fields','attributes','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','show','params','includeAll','find','create','body','catch','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','json','count','offset','limit','status'];(function(_0x3e79c5,_0x4c1e29){var _0x12f3b2=function(_0x260346){while(--_0x260346){_0x3e79c5['push'](_0x3e79c5['shift']());}};_0x12f3b2(++_0x4c1e29);}(_0x2f3a,0x197));var _0xa2f3=function(_0x5eeafb,_0x2571cd){_0x5eeafb=_0x5eeafb-0x0;var _0x4ef916=_0x2f3a[_0x5eeafb];return _0x4ef916;};'use strict';var pdf=require(_0xa2f3('0x0'));var emlformat=require(_0xa2f3('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xa2f3('0x2'));var jsonpatch=require(_0xa2f3('0x3'));var rp=require(_0xa2f3('0x4'));var moment=require(_0xa2f3('0x5'));var BPromise=require(_0xa2f3('0x6'));var Mustache=require('mustache');var util=require(_0xa2f3('0x7'));var path=require('path');var sox=require(_0xa2f3('0x8'));var csv=require(_0xa2f3('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xa2f3('0xa'));var squel=require(_0xa2f3('0xb'));var crypto=require(_0xa2f3('0xc'));var jsforce=require(_0xa2f3('0xd'));var deskjs=require(_0xa2f3('0xe'));var toCsv=require(_0xa2f3('0x9'));var querystring=require(_0xa2f3('0xf'));var Papa=require(_0xa2f3('0x10'));var Redis=require(_0xa2f3('0x11'));var authService=require(_0xa2f3('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xa2f3('0x13'));var hardwareService=require(_0xa2f3('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0xa2f3('0x15'));var config=require(_0xa2f3('0x16'));var db=require(_0xa2f3('0x17'))['db'];function respondWithStatusCode(_0x4f70fd,_0x2b6319){_0x2b6319=_0x2b6319||0xcc;return function(_0x3a6273){if(_0x3a6273){return _0x4f70fd[_0xa2f3('0x18')](_0x2b6319);}return _0x4f70fd['status'](_0x2b6319)[_0xa2f3('0x19')]();};}function respondWithResult(_0x5d392e,_0xb03adf){_0xb03adf=_0xb03adf||0xc8;return function(_0x44af0d){if(_0x44af0d){return _0x5d392e['status'](_0xb03adf)[_0xa2f3('0x1a')](_0x44af0d);}};}function respondWithFilteredResult(_0xa4e6b0,_0x4e37a4){return function(_0x19da57){if(_0x19da57){var _0x42b6a7=_0x19da57[_0xa2f3('0x1b')],_0x588d51=_0x4e37a4[_0xa2f3('0x1c')],_0x4e2faf=_0x4e37a4[_0xa2f3('0x1c')]+_0x4e37a4[_0xa2f3('0x1d')],_0x3329d2;if(_0x4e2faf>=_0x42b6a7){_0x4e2faf=_0x42b6a7;_0x3329d2=0xc8;}else{_0x3329d2=0xce;}_0xa4e6b0[_0xa2f3('0x1e')](_0x3329d2);return _0xa4e6b0[_0xa2f3('0x1f')](_0xa2f3('0x20'),_0x588d51+'-'+_0x4e2faf+'/'+_0x42b6a7)['json'](_0x19da57);}return null;};}function patchUpdates(_0x16b63b){return function(_0x5a0ad6){try{jsonpatch[_0xa2f3('0x21')](_0x5a0ad6,_0x16b63b,!![]);}catch(_0x148a4e){return BPromise[_0xa2f3('0x22')](_0x148a4e);}return _0x5a0ad6[_0xa2f3('0x23')]();};}function saveUpdates(_0x2d23a7,_0x2e57b4){return function(_0x485ff7){if(_0x485ff7){return _0x485ff7['update'](_0x2d23a7)['then'](function(_0x5824b1){return _0x5824b1;});}return null;};}function removeEntity(_0x89100d,_0x44e535){return function(_0x28264c){if(_0x28264c){return _0x28264c[_0xa2f3('0x24')]()[_0xa2f3('0x25')](function(){_0x89100d[_0xa2f3('0x1e')](0xcc)[_0xa2f3('0x19')]();});}};}function handleEntityNotFound(_0x40e837,_0x408455){return function(_0x449ddf){if(!_0x449ddf){_0x40e837['sendStatus'](0x194);}return _0x449ddf;};}function handleError(_0x66e6f5,_0x2c470f){_0x2c470f=_0x2c470f||0x1f4;return function(_0xf454ed){logger['error'](_0xf454ed[_0xa2f3('0x26')]);if(_0xf454ed[_0xa2f3('0x27')]){delete _0xf454ed[_0xa2f3('0x27')];}_0x66e6f5['status'](_0x2c470f)[_0xa2f3('0x28')](_0xf454ed);};}exports[_0xa2f3('0x29')]=function(_0x397c53,_0x5273dd){var _0x22cca0={},_0x368eb3={},_0x39ad0d={'count':0x0,'rows':[]};var _0x9941b=_[_0xa2f3('0x2a')](db[_0xa2f3('0x2b')][_0xa2f3('0x2c')],function(_0x418cfe){return{'name':_0x418cfe[_0xa2f3('0x2d')],'type':_0x418cfe[_0xa2f3('0x2e')][_0xa2f3('0x2f')]};});_0x368eb3['model']=_['map'](_0x9941b,'name');_0x368eb3[_0xa2f3('0x30')]=_[_0xa2f3('0x31')](_0x397c53['query']);_0x368eb3[_0xa2f3('0x32')]=_[_0xa2f3('0x33')](_0x368eb3[_0xa2f3('0x34')],_0x368eb3[_0xa2f3('0x30')]);_0x22cca0['attributes']=_['intersection'](_0x368eb3['model'],qs[_0xa2f3('0x35')](_0x397c53[_0xa2f3('0x30')][_0xa2f3('0x35')]));_0x22cca0[_0xa2f3('0x36')]=_0x22cca0[_0xa2f3('0x36')][_0xa2f3('0x37')]?_0x22cca0[_0xa2f3('0x36')]:_0x368eb3[_0xa2f3('0x34')];if(!_0x397c53[_0xa2f3('0x30')]['hasOwnProperty'](_0xa2f3('0x38'))){_0x22cca0[_0xa2f3('0x1d')]=qs['limit'](_0x397c53[_0xa2f3('0x30')][_0xa2f3('0x1d')]);_0x22cca0[_0xa2f3('0x1c')]=qs[_0xa2f3('0x1c')](_0x397c53[_0xa2f3('0x30')][_0xa2f3('0x1c')]);}_0x22cca0[_0xa2f3('0x39')]=qs[_0xa2f3('0x3a')](_0x397c53[_0xa2f3('0x30')][_0xa2f3('0x3a')]);_0x22cca0[_0xa2f3('0x3b')]=qs[_0xa2f3('0x32')](_[_0xa2f3('0x3c')](_0x397c53['query'],_0x368eb3['filters']));if(_0x397c53[_0xa2f3('0x30')][_0xa2f3('0x3d')]){_0x22cca0[_0xa2f3('0x3b')]=_[_0xa2f3('0x3e')](_0x22cca0[_0xa2f3('0x3b')],{'$or':_['map'](_0x9941b,function(_0x44d82b){if(_0x44d82b[_0xa2f3('0x2e')]!==_0xa2f3('0x3f')){var _0x7e65bc={};_0x7e65bc[_0x44d82b[_0xa2f3('0x27')]]={'$like':'%'+_0x397c53[_0xa2f3('0x30')][_0xa2f3('0x3d')]+'%'};return _0x7e65bc;}})});}_0x22cca0=_[_0xa2f3('0x3e')]({},_0x22cca0,_0x397c53[_0xa2f3('0x40')]);var _0x427a97={'where':_0x22cca0[_0xa2f3('0x3b')]};return db['SugarcrmField'][_0xa2f3('0x1b')](_0x427a97)[_0xa2f3('0x25')](function(_0x4597c3){_0x39ad0d[_0xa2f3('0x1b')]=_0x4597c3;if(_0x397c53[_0xa2f3('0x30')]['includeAll']){_0x22cca0[_0xa2f3('0x41')]=[{'all':!![]}];}return db[_0xa2f3('0x2b')]['findAll'](_0x22cca0);})[_0xa2f3('0x25')](function(_0x3fbfee){_0x39ad0d['rows']=_0x3fbfee;return _0x39ad0d;})['then'](respondWithFilteredResult(_0x5273dd,_0x22cca0))['catch'](handleError(_0x5273dd,null));};exports[_0xa2f3('0x42')]=function(_0x508f87,_0x49412f){var _0x1d75b5={'raw':!![],'where':{'id':_0x508f87[_0xa2f3('0x43')]['id']}},_0x49de17={};_0x49de17[_0xa2f3('0x34')]=_[_0xa2f3('0x31')](db[_0xa2f3('0x2b')][_0xa2f3('0x2c')]);_0x49de17[_0xa2f3('0x30')]=_[_0xa2f3('0x31')](_0x508f87[_0xa2f3('0x30')]);_0x49de17[_0xa2f3('0x32')]=_[_0xa2f3('0x33')](_0x49de17[_0xa2f3('0x34')],_0x49de17['query']);_0x1d75b5[_0xa2f3('0x36')]=_[_0xa2f3('0x33')](_0x49de17['model'],qs[_0xa2f3('0x35')](_0x508f87[_0xa2f3('0x30')]['fields']));_0x1d75b5[_0xa2f3('0x36')]=_0x1d75b5[_0xa2f3('0x36')][_0xa2f3('0x37')]?_0x1d75b5[_0xa2f3('0x36')]:_0x49de17[_0xa2f3('0x34')];if(_0x508f87[_0xa2f3('0x30')][_0xa2f3('0x44')]){_0x1d75b5['include']=[{'all':!![]}];}_0x1d75b5=_['merge']({},_0x1d75b5,_0x508f87[_0xa2f3('0x40')]);return db[_0xa2f3('0x2b')][_0xa2f3('0x45')](_0x1d75b5)['then'](handleEntityNotFound(_0x49412f,null))[_0xa2f3('0x25')](respondWithResult(_0x49412f,null))['catch'](handleError(_0x49412f,null));};exports['create']=function(_0x5dfd0,_0x799ec3){return db[_0xa2f3('0x2b')][_0xa2f3('0x46')](_0x5dfd0[_0xa2f3('0x47')],{})[_0xa2f3('0x25')](respondWithResult(_0x799ec3,0xc9))[_0xa2f3('0x48')](handleError(_0x799ec3,null));};exports['update']=function(_0x39d6ab,_0x5b121a){if(_0x39d6ab['body']['id']){delete _0x39d6ab[_0xa2f3('0x47')]['id'];}return db['SugarcrmField'][_0xa2f3('0x45')]({'where':{'id':_0x39d6ab[_0xa2f3('0x43')]['id']}})['then'](handleEntityNotFound(_0x5b121a,null))[_0xa2f3('0x25')](saveUpdates(_0x39d6ab[_0xa2f3('0x47')],null))['then'](respondWithResult(_0x5b121a,null))['catch'](handleError(_0x5b121a,null));};exports[_0xa2f3('0x24')]=function(_0x49c405,_0x2bcf58){return db['SugarcrmField'][_0xa2f3('0x45')]({'where':{'id':_0x49c405[_0xa2f3('0x43')]['id']}})[_0xa2f3('0x25')](handleEntityNotFound(_0x2bcf58,null))[_0xa2f3('0x25')](removeEntity(_0x2bcf58,null))['catch'](handleError(_0x2bcf58,null));};
\ No newline at end of file
+var _0x45e3=['crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','SugarcrmField','rawAttributes','fieldName','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','merge','where','filter','options','includeAll','rows','catch','show','params','create','body','find','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','util','path','sox','to-csv','ejs','lodash','squel'];(function(_0x942852,_0x6e2c5){var _0x24517a=function(_0x4da2d9){while(--_0x4da2d9){_0x942852['push'](_0x942852['shift']());}};_0x24517a(++_0x6e2c5);}(_0x45e3,0xd1));var _0x345e=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0x45e3[_0x3054be];return _0x3df150;};'use strict';var pdf=require(_0x345e('0x0'));var emlformat=require(_0x345e('0x1'));var rimraf=require(_0x345e('0x2'));var zipdir=require(_0x345e('0x3'));var jsonpatch=require(_0x345e('0x4'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x345e('0x5'));var Mustache=require('mustache');var util=require(_0x345e('0x6'));var path=require(_0x345e('0x7'));var sox=require(_0x345e('0x8'));var csv=require(_0x345e('0x9'));var ejs=require(_0x345e('0xa'));var fs=require('fs');var _=require(_0x345e('0xb'));var squel=require(_0x345e('0xc'));var crypto=require(_0x345e('0xd'));var jsforce=require(_0x345e('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x345e('0x9'));var querystring=require(_0x345e('0xf'));var Papa=require('papaparse');var Redis=require(_0x345e('0x10'));var authService=require(_0x345e('0x11'));var qs=require(_0x345e('0x12'));var as=require(_0x345e('0x13'));var hardwareService=require(_0x345e('0x14'));var logger=require(_0x345e('0x15'))(_0x345e('0x16'));var utils=require(_0x345e('0x17'));var config=require(_0x345e('0x18'));var db=require(_0x345e('0x19'))['db'];function respondWithStatusCode(_0x4b719d,_0x1a7469){_0x1a7469=_0x1a7469||0xcc;return function(_0x554638){if(_0x554638){return _0x4b719d['sendStatus'](_0x1a7469);}return _0x4b719d[_0x345e('0x1a')](_0x1a7469)[_0x345e('0x1b')]();};}function respondWithResult(_0x9d27ee,_0x485405){_0x485405=_0x485405||0xc8;return function(_0x302a2a){if(_0x302a2a){return _0x9d27ee[_0x345e('0x1a')](_0x485405)[_0x345e('0x1c')](_0x302a2a);}};}function respondWithFilteredResult(_0x5ef876,_0xb71727){return function(_0x35db12){if(_0x35db12){var _0x3d4bb1=_0x35db12[_0x345e('0x1d')],_0x249660=_0xb71727[_0x345e('0x1e')],_0x247d48=_0xb71727['offset']+_0xb71727[_0x345e('0x1f')],_0x4b0b8f;if(_0x247d48>=_0x3d4bb1){_0x247d48=_0x3d4bb1;_0x4b0b8f=0xc8;}else{_0x4b0b8f=0xce;}_0x5ef876[_0x345e('0x1a')](_0x4b0b8f);return _0x5ef876[_0x345e('0x20')](_0x345e('0x21'),_0x249660+'-'+_0x247d48+'/'+_0x3d4bb1)[_0x345e('0x1c')](_0x35db12);}return null;};}function patchUpdates(_0x3be2d3){return function(_0x373de7){try{jsonpatch[_0x345e('0x22')](_0x373de7,_0x3be2d3,!![]);}catch(_0x58a122){return BPromise['reject'](_0x58a122);}return _0x373de7[_0x345e('0x23')]();};}function saveUpdates(_0x48af3c,_0x2a0008){return function(_0x461530){if(_0x461530){return _0x461530[_0x345e('0x24')](_0x48af3c)[_0x345e('0x25')](function(_0x3ec4d7){return _0x3ec4d7;});}return null;};}function removeEntity(_0x2c646d,_0x429ded){return function(_0x2eda7b){if(_0x2eda7b){return _0x2eda7b[_0x345e('0x26')]()['then'](function(){_0x2c646d[_0x345e('0x1a')](0xcc)[_0x345e('0x1b')]();});}};}function handleEntityNotFound(_0x25b0b9,_0x3a048d){return function(_0x1a2adc){if(!_0x1a2adc){_0x25b0b9[_0x345e('0x27')](0x194);}return _0x1a2adc;};}function handleError(_0x8948b4,_0x3e2201){_0x3e2201=_0x3e2201||0x1f4;return function(_0x4e3519){logger[_0x345e('0x28')](_0x4e3519[_0x345e('0x29')]);if(_0x4e3519[_0x345e('0x2a')]){delete _0x4e3519['name'];}_0x8948b4[_0x345e('0x1a')](_0x3e2201)[_0x345e('0x2b')](_0x4e3519);};}exports[_0x345e('0x2c')]=function(_0x2aa5a,_0xf3a66e){var _0x3a806f={},_0x1c2194={},_0x50a724={'count':0x0,'rows':[]};var _0x42894a=_[_0x345e('0x2d')](db[_0x345e('0x2e')][_0x345e('0x2f')],function(_0x13bb77){return{'name':_0x13bb77[_0x345e('0x30')],'type':_0x13bb77['type'][_0x345e('0x31')]};});_0x1c2194['model']=_[_0x345e('0x2d')](_0x42894a,'name');_0x1c2194[_0x345e('0x32')]=_[_0x345e('0x33')](_0x2aa5a['query']);_0x1c2194[_0x345e('0x34')]=_[_0x345e('0x35')](_0x1c2194[_0x345e('0x36')],_0x1c2194[_0x345e('0x32')]);_0x3a806f[_0x345e('0x37')]=_['intersection'](_0x1c2194[_0x345e('0x36')],qs['fields'](_0x2aa5a[_0x345e('0x32')][_0x345e('0x38')]));_0x3a806f['attributes']=_0x3a806f[_0x345e('0x37')]['length']?_0x3a806f[_0x345e('0x37')]:_0x1c2194[_0x345e('0x36')];if(!_0x2aa5a[_0x345e('0x32')][_0x345e('0x39')](_0x345e('0x3a'))){_0x3a806f[_0x345e('0x1f')]=qs[_0x345e('0x1f')](_0x2aa5a['query'][_0x345e('0x1f')]);_0x3a806f['offset']=qs[_0x345e('0x1e')](_0x2aa5a[_0x345e('0x32')][_0x345e('0x1e')]);}_0x3a806f[_0x345e('0x3b')]=qs[_0x345e('0x3c')](_0x2aa5a[_0x345e('0x32')][_0x345e('0x3c')]);_0x3a806f['where']=qs[_0x345e('0x34')](_[_0x345e('0x3d')](_0x2aa5a[_0x345e('0x32')],_0x1c2194[_0x345e('0x34')]));if(_0x2aa5a[_0x345e('0x32')]['filter']){_0x3a806f['where']=_[_0x345e('0x3e')](_0x3a806f[_0x345e('0x3f')],{'$or':_[_0x345e('0x2d')](_0x42894a,function(_0x24cca8){if(_0x24cca8['type']!=='VIRTUAL'){var _0x331653={};_0x331653[_0x24cca8[_0x345e('0x2a')]]={'$like':'%'+_0x2aa5a[_0x345e('0x32')][_0x345e('0x40')]+'%'};return _0x331653;}})});}_0x3a806f=_[_0x345e('0x3e')]({},_0x3a806f,_0x2aa5a[_0x345e('0x41')]);var _0x7c726d={'where':_0x3a806f['where']};return db[_0x345e('0x2e')][_0x345e('0x1d')](_0x7c726d)['then'](function(_0x125210){_0x50a724[_0x345e('0x1d')]=_0x125210;if(_0x2aa5a[_0x345e('0x32')][_0x345e('0x42')]){_0x3a806f['include']=[{'all':!![]}];}return db[_0x345e('0x2e')]['findAll'](_0x3a806f);})[_0x345e('0x25')](function(_0x318ab1){_0x50a724[_0x345e('0x43')]=_0x318ab1;return _0x50a724;})[_0x345e('0x25')](respondWithFilteredResult(_0xf3a66e,_0x3a806f))[_0x345e('0x44')](handleError(_0xf3a66e,null));};exports[_0x345e('0x45')]=function(_0x46948d,_0x31c293){var _0x47a68f={'raw':!![],'where':{'id':_0x46948d[_0x345e('0x46')]['id']}},_0x483cee={};_0x483cee[_0x345e('0x36')]=_['keys'](db['SugarcrmField'][_0x345e('0x2f')]);_0x483cee['query']=_[_0x345e('0x33')](_0x46948d['query']);_0x483cee[_0x345e('0x34')]=_[_0x345e('0x35')](_0x483cee['model'],_0x483cee[_0x345e('0x32')]);_0x47a68f[_0x345e('0x37')]=_[_0x345e('0x35')](_0x483cee['model'],qs[_0x345e('0x38')](_0x46948d[_0x345e('0x32')][_0x345e('0x38')]));_0x47a68f[_0x345e('0x37')]=_0x47a68f[_0x345e('0x37')]['length']?_0x47a68f[_0x345e('0x37')]:_0x483cee[_0x345e('0x36')];if(_0x46948d[_0x345e('0x32')][_0x345e('0x42')]){_0x47a68f['include']=[{'all':!![]}];}_0x47a68f=_[_0x345e('0x3e')]({},_0x47a68f,_0x46948d[_0x345e('0x41')]);return db[_0x345e('0x2e')]['find'](_0x47a68f)['then'](handleEntityNotFound(_0x31c293,null))[_0x345e('0x25')](respondWithResult(_0x31c293,null))[_0x345e('0x44')](handleError(_0x31c293,null));};exports[_0x345e('0x47')]=function(_0x2e7f89,_0x7aa0fd){return db['SugarcrmField'][_0x345e('0x47')](_0x2e7f89[_0x345e('0x48')],{})['then'](respondWithResult(_0x7aa0fd,0xc9))[_0x345e('0x44')](handleError(_0x7aa0fd,null));};exports[_0x345e('0x24')]=function(_0x337fc3,_0x52d67c){if(_0x337fc3[_0x345e('0x48')]['id']){delete _0x337fc3[_0x345e('0x48')]['id'];}return db['SugarcrmField']['find']({'where':{'id':_0x337fc3[_0x345e('0x46')]['id']}})[_0x345e('0x25')](handleEntityNotFound(_0x52d67c,null))[_0x345e('0x25')](saveUpdates(_0x337fc3[_0x345e('0x48')],null))[_0x345e('0x25')](respondWithResult(_0x52d67c,null))['catch'](handleError(_0x52d67c,null));};exports['destroy']=function(_0x16ee4f,_0x5461e4){return db[_0x345e('0x2e')][_0x345e('0x49')]({'where':{'id':_0x16ee4f['params']['id']}})['then'](handleEntityNotFound(_0x5461e4,null))[_0x345e('0x25')](removeEntity(_0x5461e4,null))[_0x345e('0x44')](handleError(_0x5461e4,null));};
\ No newline at end of file
diff --git a/server/api/intSugarcrmField/intSugarcrmField.model.js b/server/api/intSugarcrmField/intSugarcrmField.model.js
index 6a09ad2..096cb1a 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 _0xe4c1=['../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./intSugarcrmField.attributes','exports','define','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','idField','FieldId','util'];(function(_0x4df17c,_0x2d2b61){var _0x4e79b5=function(_0x2134a5){while(--_0x2134a5){_0x4df17c['push'](_0x4df17c['shift']());}};_0x4e79b5(++_0x2d2b61);}(_0xe4c1,0x194));var _0x1e4c=function(_0x5ddaac,_0x2697a8){_0x5ddaac=_0x5ddaac-0x0;var _0x2a9c58=_0xe4c1[_0x5ddaac];return _0x2a9c58;};'use strict';var _=require('lodash');var util=require(_0x1e4c('0x0'));var logger=require(_0x1e4c('0x1'))(_0x1e4c('0x2'));var moment=require(_0x1e4c('0x3'));var BPromise=require('bluebird');var rp=require(_0x1e4c('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1e4c('0x5'));var config=require(_0x1e4c('0x6'));var attributes=require(_0x1e4c('0x7'));module[_0x1e4c('0x8')]=function(_0x317e5c,_0x15cb14){return _0x317e5c[_0x1e4c('0x9')](_0x1e4c('0xa'),attributes,{'tableName':_0x1e4c('0xb'),'paranoid':![],'indexes':[{'name':_0x1e4c('0xc'),'fields':[_0x1e4c('0xd'),_0x1e4c('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xbabc=['bluebird','request-promise','rimraf','./intSugarcrmField.attributes','define','idField','lodash','../../config/logger','api','moment'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0xbabc,0xc4));var _0xcbab=function(_0x4fab5f,_0x5038ec){_0x4fab5f=_0x4fab5f-0x0;var _0x1ef72f=_0xbabc[_0x4fab5f];return _0x1ef72f;};'use strict';var _=require(_0xcbab('0x0'));var util=require('util');var logger=require(_0xcbab('0x1'))(_0xcbab('0x2'));var moment=require(_0xcbab('0x3'));var BPromise=require(_0xcbab('0x4'));var rp=require(_0xcbab('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xcbab('0x6'));var config=require('../../config/environment');var attributes=require(_0xcbab('0x7'));module['exports']=function(_0x27477f,_0x28d5d2){return _0x27477f[_0xcbab('0x8')]('SugarcrmField',attributes,{'tableName':'int_sugarcrm_fields','paranoid':![],'indexes':[{'name':'sugarcrm_unique_index','fields':[_0xcbab('0x9'),'FieldId'],'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 e1b0fc7..38585e0 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 _0x14a0=['../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','then','debug','request\x20sent','stringify','error','code','SugarcrmField,\x20%s,\x20%s','message','info','result','catch','util','moment','bluebird','randomstring','ioredis'];(function(_0x5dcfc2,_0x3d5b37){var _0x34f415=function(_0x5e11a0){while(--_0x5e11a0){_0x5dcfc2['push'](_0x5dcfc2['shift']());}};_0x34f415(++_0x3d5b37);}(_0x14a0,0x8e));var _0x014a=function(_0x45cf76,_0x5789fa){_0x45cf76=_0x45cf76-0x0;var _0x57d6ce=_0x14a0[_0x45cf76];return _0x57d6ce;};'use strict';var _=require('lodash');var util=require(_0x014a('0x0'));var moment=require(_0x014a('0x1'));var BPromise=require(_0x014a('0x2'));var rs=require(_0x014a('0x3'));var fs=require('fs');var Redis=require(_0x014a('0x4'));var db=require(_0x014a('0x5'))['db'];var utils=require(_0x014a('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x014a('0x7'));var jayson=require(_0x014a('0x8'));var client=jayson[_0x014a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5a61ac,_0x11b8ce,_0x6d05f2){return new BPromise(function(_0x22f17c,_0x4d943b){return client['request'](_0x5a61ac,_0x6d05f2)[_0x014a('0xa')](function(_0x4f5506){logger['info']('SugarcrmField,\x20%s,\x20%s',_0x11b8ce,'request\x20sent');logger[_0x014a('0xb')]('SugarcrmField,\x20%s,\x20%s,\x20%s',_0x11b8ce,_0x014a('0xc'),JSON[_0x014a('0xd')](_0x4f5506));if(_0x4f5506['error']){if(_0x4f5506[_0x014a('0xe')][_0x014a('0xf')]===0x1f4){logger[_0x014a('0xe')](_0x014a('0x10'),_0x11b8ce,_0x4f5506[_0x014a('0xe')][_0x014a('0x11')]);return _0x4d943b(_0x4f5506[_0x014a('0xe')][_0x014a('0x11')]);}logger[_0x014a('0xe')](_0x014a('0x10'),_0x11b8ce,_0x4f5506[_0x014a('0xe')][_0x014a('0x11')]);return _0x22f17c(_0x4f5506['error'][_0x014a('0x11')]);}else{logger[_0x014a('0x12')]('SugarcrmField,\x20%s,\x20%s',_0x11b8ce,_0x014a('0xc'));_0x22f17c(_0x4f5506[_0x014a('0x13')]['message']);}})[_0x014a('0x14')](function(_0x17e4be){logger[_0x014a('0xe')](_0x014a('0x10'),_0x11b8ce,_0x17e4be);_0x4d943b(_0x17e4be);});});}
\ No newline at end of file
+var _0x1a85=['../../config/logger','rpc','jayson/promise','http','info','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','../../config/utils'];(function(_0x7f3ee6,_0xd4b17c){var _0x1a72e0=function(_0x27ee47){while(--_0x27ee47){_0x7f3ee6['push'](_0x7f3ee6['shift']());}};_0x1a72e0(++_0xd4b17c);}(_0x1a85,0x178));var _0x51a8=function(_0x4dd15b,_0x1d880a){_0x4dd15b=_0x4dd15b-0x0;var _0x2445f2=_0x1a85[_0x4dd15b];return _0x2445f2;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x51a8('0x0'));var BPromise=require(_0x51a8('0x1'));var rs=require(_0x51a8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x51a8('0x3'));var logger=require(_0x51a8('0x4'))(_0x51a8('0x5'));var config=require('../../config/environment');var jayson=require(_0x51a8('0x6'));var client=jayson['client'][_0x51a8('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x5cf430,_0x331117,_0x16a21e){return new BPromise(function(_0x4f3919,_0x228c64){return client['request'](_0x5cf430,_0x16a21e)['then'](function(_0x39e06a){logger[_0x51a8('0x8')](_0x51a8('0x9'),_0x331117,_0x51a8('0xa'));logger[_0x51a8('0xb')](_0x51a8('0xc'),_0x331117,_0x51a8('0xa'),JSON[_0x51a8('0xd')](_0x39e06a));if(_0x39e06a[_0x51a8('0xe')]){if(_0x39e06a[_0x51a8('0xe')][_0x51a8('0xf')]===0x1f4){logger[_0x51a8('0xe')](_0x51a8('0x9'),_0x331117,_0x39e06a[_0x51a8('0xe')][_0x51a8('0x10')]);return _0x228c64(_0x39e06a[_0x51a8('0xe')][_0x51a8('0x10')]);}logger['error'](_0x51a8('0x9'),_0x331117,_0x39e06a[_0x51a8('0xe')][_0x51a8('0x10')]);return _0x4f3919(_0x39e06a['error'][_0x51a8('0x10')]);}else{logger['info'](_0x51a8('0x9'),_0x331117,_0x51a8('0xa'));_0x4f3919(_0x39e06a[_0x51a8('0x11')][_0x51a8('0x10')]);}})[_0x51a8('0x12')](function(_0x3e0603){logger[_0x51a8('0xe')]('SugarcrmField,\x20%s,\x20%s',_0x331117,_0x3e0603);_0x228c64(_0x3e0603);});});}
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/index.js b/server/api/intVtigerAccount/index.js
index 51a54c1..4fc3290 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 _0xe625=['put','update','delete','destroy','exports','multer','connect-timeout','express','../../components/interaction/service','get','isAuthenticated','index','/:id','/:id/configurations','getConfigurations','getFields','post','create','addConfiguration'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xe625,0x8a));var _0x5e62=function(_0x40f3d4,_0x37b5f8){_0x40f3d4=_0x40f3d4-0x0;var _0x20dfe5=_0xe625[_0x40f3d4];return _0x20dfe5;};'use strict';var multer=require(_0x5e62('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x5e62('0x1'));var express=require(_0x5e62('0x2'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x5e62('0x3'));var config=require('../../config/environment');var controller=require('./intVtigerAccount.controller');router[_0x5e62('0x4')]('/',auth[_0x5e62('0x5')](),controller[_0x5e62('0x6')]);router[_0x5e62('0x4')](_0x5e62('0x7'),auth['isAuthenticated'](),controller['show']);router[_0x5e62('0x4')](_0x5e62('0x8'),auth['isAuthenticated'](),controller[_0x5e62('0x9')]);router['get']('/:id/fields',auth['isAuthenticated'](),controller[_0x5e62('0xa')]);router[_0x5e62('0xb')]('/',auth[_0x5e62('0x5')](),controller[_0x5e62('0xc')]);router['post'](_0x5e62('0x8'),auth[_0x5e62('0x5')](),controller[_0x5e62('0xd')]);router[_0x5e62('0xe')](_0x5e62('0x7'),auth[_0x5e62('0x5')](),controller[_0x5e62('0xf')]);router[_0x5e62('0x10')](_0x5e62('0x7'),auth['isAuthenticated'](),controller[_0x5e62('0x11')]);module[_0x5e62('0x12')]=router;
\ No newline at end of file
+var _0xff0d=['multer','path','connect-timeout','../../components/auth/service','../../config/environment','./intVtigerAccount.controller','get','isAuthenticated','show','getConfigurations','getFields','post','create','/:id/configurations','addConfiguration','put','update','delete','destroy'];(function(_0x53da0f,_0x142ae4){var _0x56d563=function(_0x4e6f41){while(--_0x4e6f41){_0x53da0f['push'](_0x53da0f['shift']());}};_0x56d563(++_0x142ae4);}(_0xff0d,0x85));var _0xdff0=function(_0x1a89a1,_0x56d889){_0x1a89a1=_0x1a89a1-0x0;var _0x3d5b46=_0xff0d[_0x1a89a1];return _0x3d5b46;};'use strict';var multer=require(_0xdff0('0x0'));var util=require('util');var path=require(_0xdff0('0x1'));var timeout=require(_0xdff0('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xdff0('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xdff0('0x4'));var controller=require(_0xdff0('0x5'));router[_0xdff0('0x6')]('/',auth[_0xdff0('0x7')](),controller['index']);router[_0xdff0('0x6')]('/:id',auth[_0xdff0('0x7')](),controller[_0xdff0('0x8')]);router['get']('/:id/configurations',auth[_0xdff0('0x7')](),controller[_0xdff0('0x9')]);router[_0xdff0('0x6')]('/:id/fields',auth['isAuthenticated'](),controller[_0xdff0('0xa')]);router[_0xdff0('0xb')]('/',auth[_0xdff0('0x7')](),controller[_0xdff0('0xc')]);router[_0xdff0('0xb')](_0xdff0('0xd'),auth[_0xdff0('0x7')](),controller[_0xdff0('0xe')]);router[_0xdff0('0xf')]('/:id',auth[_0xdff0('0x7')](),controller[_0xdff0('0x10')]);router[_0xdff0('0x11')]('/:id',auth[_0xdff0('0x7')](),controller[_0xdff0('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/intVtigerAccount.attributes.js b/server/api/intVtigerAccount/intVtigerAccount.attributes.js
index 06ae5c4..c32d54e 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 _0x69d2=['STRING','exports'];(function(_0x554624,_0x1fd2df){var _0x2d6e1c=function(_0x11d9f3){while(--_0x11d9f3){_0x554624['push'](_0x554624['shift']());}};_0x2d6e1c(++_0x1fd2df);}(_0x69d2,0x93));var _0x269d=function(_0x2c467e,_0x3cff87){_0x2c467e=_0x2c467e-0x0;var _0x494c76=_0x69d2[_0x2c467e];return _0x494c76;};'use strict';var Sequelize=require('sequelize');module[_0x269d('0x0')]={'name':{'type':Sequelize[_0x269d('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x269d('0x1')]},'username':{'type':Sequelize[_0x269d('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize[_0x269d('0x1')],'allowNull':![],'defaultValue':'HelpDesk'},'remoteUri':{'type':Sequelize[_0x269d('0x1')],'allowNull':![]},'serverUrl':{'type':Sequelize[_0x269d('0x1')]},'accessKey':{'type':Sequelize[_0x269d('0x1')],'allowNull':![]}};
\ No newline at end of file
+var _0x8024=['HelpDesk','sequelize','STRING'];(function(_0x118491,_0x18108b){var _0x418406=function(_0x28bc98){while(--_0x28bc98){_0x118491['push'](_0x118491['shift']());}};_0x418406(++_0x18108b);}(_0x8024,0xdc));var _0x4802=function(_0x10ee1a,_0x31071b){_0x10ee1a=_0x10ee1a-0x0;var _0x18103e=_0x8024[_0x10ee1a];return _0x18103e;};'use strict';var Sequelize=require(_0x4802('0x0'));module['exports']={'name':{'type':Sequelize[_0x4802('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x4802('0x1')]},'username':{'type':Sequelize[_0x4802('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize[_0x4802('0x1')],'allowNull':![],'defaultValue':_0x4802('0x2')},'remoteUri':{'type':Sequelize['STRING'],'allowNull':![]},'serverUrl':{'type':Sequelize[_0x4802('0x1')]},'accessKey':{'type':Sequelize['STRING'],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/intVtigerAccount.controller.js b/server/api/intVtigerAccount/intVtigerAccount.controller.js
index 50658f3..dd40dd4 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 _0x1bec=['count','set','Content-Range','apply','reject','save','destroy','stack','name','send','VtigerAccount','rawAttributes','fieldName','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','offset','sort','where','filters','pick','filter','map','VIRTUAL','merge','includeAll','include','findAll','rows','show','params','keys','options','create','body','update','find','getConfigurations','findOne','VtigerConfiguration','order','AccountId','Subjects','getSubjects','type','Descriptions','getDescriptions','VtigerField','getFields','username','description','moduleName','remoteUri','serverUrl','accessKey','substring','GET','getchallenge','success','POST','login','result','describe','sessionName','autogenerated','reference','owner','remove','includes','editable','false','label','startsWith','cf_','picklistValues','value','log','vTiger\x20error:\x20','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','VtigerAccount,\x20%s,\x20%s','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','catch','sendStatus','status','end','json'];(function(_0x31d8fe,_0x5a4843){var _0xf214f1=function(_0x216aaa){while(--_0x216aaa){_0x31d8fe['push'](_0x31d8fe['shift']());}};_0xf214f1(++_0x5a4843);}(_0x1bec,0x168));var _0xc1be=function(_0x5e944a,_0x2847b4){_0x5e944a=_0x5e944a-0x0;var _0x38f07b=_0x1bec[_0x5e944a];return _0x38f07b;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xc1be('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc1be('0x1'));var rp=require(_0xc1be('0x2'));var moment=require(_0xc1be('0x3'));var BPromise=require(_0xc1be('0x4'));var Mustache=require('mustache');var util=require(_0xc1be('0x5'));var path=require(_0xc1be('0x6'));var sox=require(_0xc1be('0x7'));var csv=require(_0xc1be('0x8'));var ejs=require(_0xc1be('0x9'));var fs=require('fs');var _=require(_0xc1be('0xa'));var squel=require(_0xc1be('0xb'));var crypto=require(_0xc1be('0xc'));var jsforce=require(_0xc1be('0xd'));var deskjs=require(_0xc1be('0xe'));var toCsv=require('to-csv');var querystring=require(_0xc1be('0xf'));var Papa=require(_0xc1be('0x10'));var Redis=require(_0xc1be('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xc1be('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc1be('0x13'));var logger=require(_0xc1be('0x14'))(_0xc1be('0x15'));var utils=require(_0xc1be('0x16'));var config=require('../../config/environment');var db=require(_0xc1be('0x17'))['db'];var integrations=require(_0xc1be('0x18'));var jayson=require(_0xc1be('0x19'));var client=jayson[_0xc1be('0x1a')][_0xc1be('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x3da308,_0x104bc0,_0x484a07){if(_0x484a07){var _0x2e22ba=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2e22ba['test'](_0x104bc0)){return _0x3da308;}else{throw new db[(_0xc1be('0x1c'))][(_0xc1be('0x1d'))](_0xc1be('0x1e'));}}else{return _0x3da308;}}function respondWithRpcPromise(_0x576126,_0x318c33,_0x4123e2,_0x468ae8){return new BPromise(function(_0x56d82e,_0x547f20){var _0xcfd295=_0x468ae8||client;return _0xcfd295[_0xc1be('0x1f')](_0x576126,_0x4123e2)[_0xc1be('0x20')](function(_0x28058c){logger[_0xc1be('0x21')](_0xc1be('0x22'),_0x318c33,'request\x20sent');logger[_0xc1be('0x23')](_0xc1be('0x24'),_0x318c33,_0xc1be('0x25'),JSON['stringify'](_0x28058c));if(_0x28058c[_0xc1be('0x26')]){if(_0x28058c['error']['code']===0x1f4){logger[_0xc1be('0x26')](_0xc1be('0x22'),_0x318c33,_0x28058c[_0xc1be('0x26')][_0xc1be('0x27')]);return _0x547f20(_0x28058c[_0xc1be('0x26')]['message']);}logger[_0xc1be('0x26')](_0xc1be('0x22'),_0x318c33,_0x28058c[_0xc1be('0x26')][_0xc1be('0x27')]);return _0x56d82e(_0x28058c[_0xc1be('0x26')]['message']);}else{logger[_0xc1be('0x21')](_0xc1be('0x22'),_0x318c33,_0xc1be('0x25'));_0x56d82e(_0x28058c['result'][_0xc1be('0x27')]);}})[_0xc1be('0x28')](function(_0x3ff224){logger[_0xc1be('0x26')](_0xc1be('0x22'),_0x318c33,_0x3ff224);_0x547f20(_0x3ff224);});});}function respondWithStatusCode(_0x519d0f,_0x42ac19){_0x42ac19=_0x42ac19||0xcc;return function(_0x28eae1){if(_0x28eae1){return _0x519d0f[_0xc1be('0x29')](_0x42ac19);}return _0x519d0f[_0xc1be('0x2a')](_0x42ac19)[_0xc1be('0x2b')]();};}function respondWithResult(_0x3ec746,_0xda5686){_0xda5686=_0xda5686||0xc8;return function(_0x2648ca){if(_0x2648ca){return _0x3ec746['status'](_0xda5686)[_0xc1be('0x2c')](_0x2648ca);}};}function respondWithFilteredResult(_0x5edac2,_0x2a6233){return function(_0x1bd5f5){if(_0x1bd5f5){var _0x56bcd9=_0x1bd5f5[_0xc1be('0x2d')],_0x132a39=_0x2a6233['offset'],_0x199de2=_0x2a6233['offset']+_0x2a6233['limit'],_0x11730f;if(_0x199de2>=_0x56bcd9){_0x199de2=_0x56bcd9;_0x11730f=0xc8;}else{_0x11730f=0xce;}_0x5edac2['status'](_0x11730f);return _0x5edac2[_0xc1be('0x2e')](_0xc1be('0x2f'),_0x132a39+'-'+_0x199de2+'/'+_0x56bcd9)['json'](_0x1bd5f5);}return null;};}function patchUpdates(_0x46bda9){return function(_0x359cce){try{jsonpatch[_0xc1be('0x30')](_0x359cce,_0x46bda9,!![]);}catch(_0x2f5c69){return BPromise[_0xc1be('0x31')](_0x2f5c69);}return _0x359cce[_0xc1be('0x32')]();};}function saveUpdates(_0x4cc60b,_0x7aa098){return function(_0xc6a3cb){if(_0xc6a3cb){return _0xc6a3cb['update'](_0x4cc60b)[_0xc1be('0x20')](function(_0x48647b){return _0x48647b;});}return null;};}function removeEntity(_0x1a2dd4,_0x569691){return function(_0x15279a){if(_0x15279a){return _0x15279a[_0xc1be('0x33')]()['then'](function(){_0x1a2dd4[_0xc1be('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0xf2a738,_0x24c9b6){return function(_0x995b5a){if(!_0x995b5a){_0xf2a738[_0xc1be('0x29')](0x194);}return _0x995b5a;};}function handleError(_0x495b24,_0x138ca7){_0x138ca7=_0x138ca7||0x1f4;return function(_0x123097){logger['error'](_0x123097[_0xc1be('0x34')]);if(_0x123097[_0xc1be('0x35')]){delete _0x123097['name'];}_0x495b24[_0xc1be('0x2a')](_0x138ca7)[_0xc1be('0x36')](_0x123097);};}exports['index']=function(_0x1c8f77,_0x24fe5c){var _0x1ec727={},_0x25cfb4={},_0x56d264={'count':0x0,'rows':[]};var _0x27f7e3=_['map'](db[_0xc1be('0x37')][_0xc1be('0x38')],function(_0x6ddd18){return{'name':_0x6ddd18[_0xc1be('0x39')],'type':_0x6ddd18['type'][_0xc1be('0x3a')]};});_0x25cfb4[_0xc1be('0x3b')]=_['map'](_0x27f7e3,'name');_0x25cfb4[_0xc1be('0x3c')]=_['keys'](_0x1c8f77['query']);_0x25cfb4['filters']=_[_0xc1be('0x3d')](_0x25cfb4['model'],_0x25cfb4['query']);_0x1ec727[_0xc1be('0x3e')]=_[_0xc1be('0x3d')](_0x25cfb4[_0xc1be('0x3b')],qs[_0xc1be('0x3f')](_0x1c8f77[_0xc1be('0x3c')][_0xc1be('0x3f')]));_0x1ec727[_0xc1be('0x3e')]=_0x1ec727[_0xc1be('0x3e')][_0xc1be('0x40')]?_0x1ec727[_0xc1be('0x3e')]:_0x25cfb4[_0xc1be('0x3b')];if(!_0x1c8f77[_0xc1be('0x3c')][_0xc1be('0x41')](_0xc1be('0x42'))){_0x1ec727[_0xc1be('0x43')]=qs[_0xc1be('0x43')](_0x1c8f77[_0xc1be('0x3c')]['limit']);_0x1ec727[_0xc1be('0x44')]=qs[_0xc1be('0x44')](_0x1c8f77[_0xc1be('0x3c')][_0xc1be('0x44')]);}_0x1ec727['order']=qs[_0xc1be('0x45')](_0x1c8f77[_0xc1be('0x3c')][_0xc1be('0x45')]);_0x1ec727[_0xc1be('0x46')]=qs[_0xc1be('0x47')](_[_0xc1be('0x48')](_0x1c8f77[_0xc1be('0x3c')],_0x25cfb4[_0xc1be('0x47')]));if(_0x1c8f77[_0xc1be('0x3c')][_0xc1be('0x49')]){_0x1ec727[_0xc1be('0x46')]=_['merge'](_0x1ec727[_0xc1be('0x46')],{'$or':_[_0xc1be('0x4a')](_0x27f7e3,function(_0x368685){if(_0x368685['type']!==_0xc1be('0x4b')){var _0x5332bf={};_0x5332bf[_0x368685['name']]={'$like':'%'+_0x1c8f77[_0xc1be('0x3c')]['filter']+'%'};return _0x5332bf;}})});}_0x1ec727=_[_0xc1be('0x4c')]({},_0x1ec727,_0x1c8f77['options']);var _0x5eeaf4={'where':_0x1ec727[_0xc1be('0x46')]};return db['VtigerAccount'][_0xc1be('0x2d')](_0x5eeaf4)['then'](function(_0x32c44d){_0x56d264[_0xc1be('0x2d')]=_0x32c44d;if(_0x1c8f77['query'][_0xc1be('0x4d')]){_0x1ec727[_0xc1be('0x4e')]=[{'all':!![]}];}return db[_0xc1be('0x37')][_0xc1be('0x4f')](_0x1ec727);})[_0xc1be('0x20')](function(_0x47b613){_0x56d264[_0xc1be('0x50')]=_0x47b613;return _0x56d264;})[_0xc1be('0x20')](respondWithFilteredResult(_0x24fe5c,_0x1ec727))[_0xc1be('0x28')](handleError(_0x24fe5c,null));};exports[_0xc1be('0x51')]=function(_0x30ec49,_0x2852fa){var _0x531b47={'raw':![],'where':{'id':_0x30ec49[_0xc1be('0x52')]['id']}},_0x5d14ec={};_0x5d14ec['model']=_[_0xc1be('0x53')](db['VtigerAccount'][_0xc1be('0x38')]);_0x5d14ec[_0xc1be('0x3c')]=_[_0xc1be('0x53')](_0x30ec49['query']);_0x5d14ec[_0xc1be('0x47')]=_['intersection'](_0x5d14ec[_0xc1be('0x3b')],_0x5d14ec[_0xc1be('0x3c')]);_0x531b47[_0xc1be('0x3e')]=_[_0xc1be('0x3d')](_0x5d14ec['model'],qs[_0xc1be('0x3f')](_0x30ec49[_0xc1be('0x3c')]['fields']));_0x531b47[_0xc1be('0x3e')]=_0x531b47[_0xc1be('0x3e')][_0xc1be('0x40')]?_0x531b47[_0xc1be('0x3e')]:_0x5d14ec[_0xc1be('0x3b')];if(_0x30ec49[_0xc1be('0x3c')][_0xc1be('0x4d')]){_0x531b47[_0xc1be('0x4e')]=[{'all':!![]}];}_0x531b47=_[_0xc1be('0x4c')]({},_0x531b47,_0x30ec49[_0xc1be('0x54')]);return db['VtigerAccount']['find'](_0x531b47)[_0xc1be('0x20')](handleEntityNotFound(_0x2852fa,null))[_0xc1be('0x20')](respondWithResult(_0x2852fa,null))[_0xc1be('0x28')](handleError(_0x2852fa,null));};exports['create']=function(_0x26bf0e,_0x2eb0f7){return db[_0xc1be('0x37')][_0xc1be('0x55')](_0x26bf0e[_0xc1be('0x56')],{})['then'](respondWithResult(_0x2eb0f7,0xc9))['catch'](handleError(_0x2eb0f7,null));};exports[_0xc1be('0x57')]=function(_0x1fe08e,_0x1ede93){if(_0x1fe08e['body']['id']){delete _0x1fe08e[_0xc1be('0x56')]['id'];}return db[_0xc1be('0x37')][_0xc1be('0x58')]({'where':{'id':_0x1fe08e[_0xc1be('0x52')]['id']}})[_0xc1be('0x20')](handleEntityNotFound(_0x1ede93,null))[_0xc1be('0x20')](saveUpdates(_0x1fe08e[_0xc1be('0x56')],null))[_0xc1be('0x20')](respondWithResult(_0x1ede93,null))['catch'](handleError(_0x1ede93,null));};exports[_0xc1be('0x33')]=function(_0x2c7c6b,_0x22d472){return db[_0xc1be('0x37')]['find']({'where':{'id':_0x2c7c6b[_0xc1be('0x52')]['id']}})[_0xc1be('0x20')](handleEntityNotFound(_0x22d472,null))[_0xc1be('0x20')](removeEntity(_0x22d472,null))['catch'](handleError(_0x22d472,null));};exports[_0xc1be('0x59')]=function(_0x5e72ca,_0x1fb713,_0x14f5a3){var _0x481361={};var _0xa043be={};var _0x547348;var _0x3b565e;return db[_0xc1be('0x37')][_0xc1be('0x5a')]({'where':{'id':_0x5e72ca[_0xc1be('0x52')]['id']}})['then'](handleEntityNotFound(_0x1fb713,null))[_0xc1be('0x20')](function(_0x419561){if(_0x419561){_0x547348=_0x419561;_0xa043be['model']=_[_0xc1be('0x53')](db[_0xc1be('0x5b')][_0xc1be('0x38')]);_0xa043be[_0xc1be('0x3c')]=_[_0xc1be('0x53')](_0x5e72ca[_0xc1be('0x3c')]);_0xa043be[_0xc1be('0x47')]=_['intersection'](_0xa043be[_0xc1be('0x3b')],_0xa043be[_0xc1be('0x3c')]);_0x481361[_0xc1be('0x3e')]=_[_0xc1be('0x3d')](_0xa043be['model'],qs[_0xc1be('0x3f')](_0x5e72ca[_0xc1be('0x3c')][_0xc1be('0x3f')]));_0x481361[_0xc1be('0x3e')]=_0x481361[_0xc1be('0x3e')][_0xc1be('0x40')]?_0x481361[_0xc1be('0x3e')]:_0xa043be[_0xc1be('0x3b')];_0x481361[_0xc1be('0x5c')]=qs['sort'](_0x5e72ca[_0xc1be('0x3c')][_0xc1be('0x45')]);_0x481361['where']=qs[_0xc1be('0x47')](_[_0xc1be('0x48')](_0x5e72ca['query'],_0xa043be['filters']));if(_0x5e72ca[_0xc1be('0x3c')]['filter']){_0x481361[_0xc1be('0x46')]=_['merge'](_0x481361['where'],{'$or':_[_0xc1be('0x4a')](_0x481361[_0xc1be('0x3e')],function(_0x50ed41){var _0x7d4abd={};_0x7d4abd[_0x50ed41]={'$like':'%'+_0x5e72ca[_0xc1be('0x3c')][_0xc1be('0x49')]+'%'};return _0x7d4abd;})});}_0x481361=_[_0xc1be('0x4c')]({},_0x481361,_0x5e72ca[_0xc1be('0x54')]);return _0x547348[_0xc1be('0x59')](_0x481361);}})['then'](function(_0x40291e){if(_0x40291e){_0x3b565e=_0x40291e['length'];if(!_0x5e72ca[_0xc1be('0x3c')][_0xc1be('0x41')](_0xc1be('0x42'))){_0x481361[_0xc1be('0x43')]=qs['limit'](_0x5e72ca['query']['limit']);_0x481361[_0xc1be('0x44')]=qs['offset'](_0x5e72ca[_0xc1be('0x3c')][_0xc1be('0x44')]);}return _0x547348['getConfigurations'](_0x481361);}})[_0xc1be('0x20')](function(_0x325dd5){if(_0x325dd5){return _0x325dd5?{'count':_0x3b565e,'rows':_0x325dd5}:null;}})['then'](respondWithResult(_0x1fb713,null))[_0xc1be('0x28')](handleError(_0x1fb713,null));};exports['addConfiguration']=function(_0x34efa1,_0x12f00c,_0x2db992){if(_0x34efa1[_0xc1be('0x56')]['id']){delete _0x34efa1['body']['id'];}return db['VtigerAccount'][_0xc1be('0x5a')]({'where':{'id':_0x34efa1[_0xc1be('0x52')]['id']}})[_0xc1be('0x20')](handleEntityNotFound(_0x12f00c,null))[_0xc1be('0x20')](function(_0x53f869){if(_0x53f869){_0x34efa1[_0xc1be('0x56')][_0xc1be('0x5d')]=_0x53f869['id'];_0x34efa1[_0xc1be('0x56')][_0xc1be('0x5e')]=integrations[_0xc1be('0x5f')](_0x34efa1[_0xc1be('0x56')]['channel'],_0x34efa1['body'][_0xc1be('0x60')]);_0x34efa1['body'][_0xc1be('0x61')]=integrations[_0xc1be('0x62')](_0x34efa1[_0xc1be('0x56')]['channel'],_0x34efa1[_0xc1be('0x56')][_0xc1be('0x60')]);return db[_0xc1be('0x5b')][_0xc1be('0x55')](_0x34efa1[_0xc1be('0x56')],{'include':[{'model':db[_0xc1be('0x63')],'as':_0xc1be('0x5e')},{'model':db[_0xc1be('0x63')],'as':_0xc1be('0x61')}]});}return null;})[_0xc1be('0x20')](respondWithResult(_0x12f00c,null))[_0xc1be('0x28')](handleError(_0x12f00c,null));};var md5=require('md5');exports[_0xc1be('0x64')]=function(_0x21e494,_0x10cf55,_0x8fc226){var _0x228369=null;var _0x415346=null;var _0x3d9355=null;var _0x441535=null;var _0x3deca9='';return db['VtigerAccount'][_0xc1be('0x5a')]({'where':{'id':_0x21e494[_0xc1be('0x52')]['id']},'attributes':['id',_0xc1be('0x35'),_0xc1be('0x65'),_0xc1be('0x66'),_0xc1be('0x67'),_0xc1be('0x68'),_0xc1be('0x69'),_0xc1be('0x6a')]})[_0xc1be('0x20')](handleEntityNotFound(_0x10cf55,null))[_0xc1be('0x20')](function(_0x11e31a){if(_0x11e31a){_0x228369=_0x11e31a[_0xc1be('0x65')];_0x415346=_0x11e31a[_0xc1be('0x6a')];_0x3d9355=_0x11e31a['moduleName'];_0x3deca9=_0x11e31a[_0xc1be('0x68')];var _0x2486e4=_0x3deca9['slice'](-0x1);if(_0x2486e4==='/'){_0x3deca9=_0x3deca9[_0xc1be('0x6b')](0x0,_0x3deca9['lastIndexOf'](_0x2486e4));}_0x441535=util['format']('%s/webservice.php',_0x3deca9);var _0x13c603={'method':_0xc1be('0x6c'),'uri':_0x441535,'qs':{'operation':_0xc1be('0x6d'),'username':_0x11e31a[_0xc1be('0x65')]},'json':!![]};return rp(_0x13c603);}})[_0xc1be('0x20')](function(_0x3416fa){if(_0x3416fa[_0xc1be('0x6e')]){var _0x4851b4={'method':_0xc1be('0x6f'),'uri':_0x441535,'form':{'operation':_0xc1be('0x70'),'username':_0x228369,'accessKey':md5(_0x3416fa[_0xc1be('0x71')]['token']+_0x415346)},'json':!![]};return rp(_0x4851b4);}})[_0xc1be('0x20')](function(_0x4ce000){if(_0x4ce000['success']){var _0x4c34a3={'method':_0xc1be('0x6c'),'uri':_0x441535,'qs':{'operation':_0xc1be('0x72'),'username':_0x228369,'sessionName':_0x4ce000[_0xc1be('0x71')][_0xc1be('0x73')],'elementType':_0x3d9355},'json':!![]};return rp(_0x4c34a3);}})['then'](function(_0x3139a3){if(_0x3139a3['success']){var _0x9f18d8=[_0xc1be('0x74'),_0xc1be('0x75'),_0xc1be('0x76')];_[_0xc1be('0x77')](_0x3139a3['result'][_0xc1be('0x3f')],function(_0x42098c){return _0x9f18d8[_0xc1be('0x78')](_0x42098c['type'][_0xc1be('0x35')]);});_[_0xc1be('0x77')](_0x3139a3['result'][_0xc1be('0x3f')],function(_0x1dd710){return _0x1dd710[_0xc1be('0x79')]===_0xc1be('0x7a');});return{'count':_0x3139a3['result']['fields'][_0xc1be('0x40')],'rows':_[_0xc1be('0x4a')](_0x3139a3[_0xc1be('0x71')]['fields'],function(_0xc66c67){return{'id':_0xc66c67[_0xc1be('0x35')],'name':_0xc66c67[_0xc1be('0x7b')],'custom':_[_0xc1be('0x7c')](_0xc66c67[_0xc1be('0x35')],_0xc1be('0x7d'))?!![]:![],'options':_0xc66c67[_0xc1be('0x60')]['name']==='picklist'&&_0xc66c67['type']['picklistValues'][_0xc1be('0x40')]>0x0?_[_0xc1be('0x4a')](_0xc66c67[_0xc1be('0x60')][_0xc1be('0x7e')],function(_0x4c9889){return{'name':_0x4c9889[_0xc1be('0x7b')],'value':_0x4c9889[_0xc1be('0x7f')]};}):[]};})};}})[_0xc1be('0x20')](respondWithResult(_0x10cf55,null))[_0xc1be('0x28')](function(_0x21a77a){console[_0xc1be('0x80')](_0xc1be('0x81')+_0x21a77a);var _0x1f7951=_0x21e494[_0xc1be('0x3c')][_0xc1be('0x82')]?0x1f4:_0x21a77a[_0xc1be('0x83')]||0x1f4;logger[_0xc1be('0x26')](_0xc1be('0x84'),_0xc1be('0x64'),_0x1f7951,JSON[_0xc1be('0x85')](_0x21a77a));delete _0x21a77a['name'];if(_0x1f7951===0x191){_0x1f7951=0x190;}_0x10cf55[_0xc1be('0x2a')](_0x1f7951)[_0xc1be('0x36')](_0x21e494['query']['test']?{'message':_0xc1be('0x86'),'statusCode':_0x21a77a[_0xc1be('0x83')]}:_0x21a77a);});};
\ No newline at end of file
+var _0x7d5b=['options','includeAll','include','rows','show','params','keys','rawAttributes','find','create','body','getConfigurations','findOne','VtigerConfiguration','hasOwnProperty','Subjects','getSubjects','getDescriptions','channel','VtigerField','md5','getFields','username','description','moduleName','remoteUri','serverUrl','accessKey','slice','lastIndexOf','format','%s/webservice.php','success','login','token','GET','autogenerated','reference','owner','includes','remove','editable','false','label','startsWith','picklistValues','value','log','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','ejs','lodash','squel','jsforce','to-csv','querystring','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','VtigerAccount,\x20%s,\x20%s','request\x20sent','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','sendStatus','status','end','json','count','offset','limit','set','apply','reject','save','update','destroy','stack','send','index','map','VtigerAccount','fieldName','type','name','query','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','merge','VIRTUAL','filter'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7d5b,0x131));var _0xb7d5=function(_0x17928f,_0x4ad33f){_0x17928f=_0x17928f-0x0;var _0x500b63=_0x7d5b[_0x17928f];return _0x500b63;};'use strict';var pdf=require(_0xb7d5('0x0'));var emlformat=require(_0xb7d5('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xb7d5('0x2'));var jsonpatch=require(_0xb7d5('0x3'));var rp=require(_0xb7d5('0x4'));var moment=require('moment');var BPromise=require(_0xb7d5('0x5'));var Mustache=require(_0xb7d5('0x6'));var util=require(_0xb7d5('0x7'));var path=require('path');var sox=require(_0xb7d5('0x8'));var csv=require('to-csv');var ejs=require(_0xb7d5('0x9'));var fs=require('fs');var _=require(_0xb7d5('0xa'));var squel=require(_0xb7d5('0xb'));var crypto=require('crypto');var jsforce=require(_0xb7d5('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xb7d5('0xd'));var querystring=require(_0xb7d5('0xe'));var Papa=require('papaparse');var Redis=require(_0xb7d5('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xb7d5('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xb7d5('0x11'))(_0xb7d5('0x12'));var utils=require(_0xb7d5('0x13'));var config=require(_0xb7d5('0x14'));var db=require(_0xb7d5('0x15'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require('jayson/promise');var client=jayson[_0xb7d5('0x16')][_0xb7d5('0x17')]({'port':0x232a});function checkPasswordPattern(_0x421a62,_0x3d912a,_0x2a6a4b){if(_0x2a6a4b){var _0x600ebd=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x600ebd[_0xb7d5('0x18')](_0x3d912a)){return _0x421a62;}else{throw new db[(_0xb7d5('0x19'))][(_0xb7d5('0x1a'))](_0xb7d5('0x1b'));}}else{return _0x421a62;}}function respondWithRpcPromise(_0x120bcb,_0x587769,_0x58fc36,_0x187318){return new BPromise(function(_0x18de19,_0x599180){var _0x551466=_0x187318||client;return _0x551466[_0xb7d5('0x1c')](_0x120bcb,_0x58fc36)[_0xb7d5('0x1d')](function(_0x220444){logger['info'](_0xb7d5('0x1e'),_0x587769,_0xb7d5('0x1f'));logger[_0xb7d5('0x20')](_0xb7d5('0x21'),_0x587769,_0xb7d5('0x1f'),JSON[_0xb7d5('0x22')](_0x220444));if(_0x220444[_0xb7d5('0x23')]){if(_0x220444[_0xb7d5('0x23')][_0xb7d5('0x24')]===0x1f4){logger['error'](_0xb7d5('0x1e'),_0x587769,_0x220444[_0xb7d5('0x23')][_0xb7d5('0x25')]);return _0x599180(_0x220444[_0xb7d5('0x23')]['message']);}logger[_0xb7d5('0x23')]('VtigerAccount,\x20%s,\x20%s',_0x587769,_0x220444[_0xb7d5('0x23')]['message']);return _0x18de19(_0x220444[_0xb7d5('0x23')]['message']);}else{logger[_0xb7d5('0x26')](_0xb7d5('0x1e'),_0x587769,_0xb7d5('0x1f'));_0x18de19(_0x220444[_0xb7d5('0x27')]['message']);}})[_0xb7d5('0x28')](function(_0x278c77){logger[_0xb7d5('0x23')](_0xb7d5('0x1e'),_0x587769,_0x278c77);_0x599180(_0x278c77);});});}function respondWithStatusCode(_0x15337a,_0x44d111){_0x44d111=_0x44d111||0xcc;return function(_0x314124){if(_0x314124){return _0x15337a[_0xb7d5('0x29')](_0x44d111);}return _0x15337a[_0xb7d5('0x2a')](_0x44d111)[_0xb7d5('0x2b')]();};}function respondWithResult(_0x288c72,_0x23731d){_0x23731d=_0x23731d||0xc8;return function(_0x1c19ff){if(_0x1c19ff){return _0x288c72[_0xb7d5('0x2a')](_0x23731d)[_0xb7d5('0x2c')](_0x1c19ff);}};}function respondWithFilteredResult(_0x413baf,_0x7a6cfa){return function(_0x17671e){if(_0x17671e){var _0x555342=_0x17671e[_0xb7d5('0x2d')],_0x41e32b=_0x7a6cfa[_0xb7d5('0x2e')],_0x47161b=_0x7a6cfa[_0xb7d5('0x2e')]+_0x7a6cfa[_0xb7d5('0x2f')],_0x32c7de;if(_0x47161b>=_0x555342){_0x47161b=_0x555342;_0x32c7de=0xc8;}else{_0x32c7de=0xce;}_0x413baf['status'](_0x32c7de);return _0x413baf[_0xb7d5('0x30')]('Content-Range',_0x41e32b+'-'+_0x47161b+'/'+_0x555342)['json'](_0x17671e);}return null;};}function patchUpdates(_0x438562){return function(_0x3f6fe7){try{jsonpatch[_0xb7d5('0x31')](_0x3f6fe7,_0x438562,!![]);}catch(_0x3da4cf){return BPromise[_0xb7d5('0x32')](_0x3da4cf);}return _0x3f6fe7[_0xb7d5('0x33')]();};}function saveUpdates(_0x33bb99,_0x3128d1){return function(_0x2c3971){if(_0x2c3971){return _0x2c3971[_0xb7d5('0x34')](_0x33bb99)[_0xb7d5('0x1d')](function(_0x5b7a40){return _0x5b7a40;});}return null;};}function removeEntity(_0x4cd49e,_0x589661){return function(_0x4e8e64){if(_0x4e8e64){return _0x4e8e64[_0xb7d5('0x35')]()[_0xb7d5('0x1d')](function(){_0x4cd49e[_0xb7d5('0x2a')](0xcc)[_0xb7d5('0x2b')]();});}};}function handleEntityNotFound(_0x43dfd6,_0x503c9d){return function(_0x338996){if(!_0x338996){_0x43dfd6['sendStatus'](0x194);}return _0x338996;};}function handleError(_0x545940,_0x2986df){_0x2986df=_0x2986df||0x1f4;return function(_0x4b0622){logger[_0xb7d5('0x23')](_0x4b0622[_0xb7d5('0x36')]);if(_0x4b0622['name']){delete _0x4b0622['name'];}_0x545940[_0xb7d5('0x2a')](_0x2986df)[_0xb7d5('0x37')](_0x4b0622);};}exports[_0xb7d5('0x38')]=function(_0x5e39f7,_0x412ed9){var _0x477be0={},_0x427578={},_0xf33eb0={'count':0x0,'rows':[]};var _0x1033ed=_[_0xb7d5('0x39')](db[_0xb7d5('0x3a')]['rawAttributes'],function(_0x53a1a6){return{'name':_0x53a1a6[_0xb7d5('0x3b')],'type':_0x53a1a6[_0xb7d5('0x3c')]['key']};});_0x427578['model']=_[_0xb7d5('0x39')](_0x1033ed,_0xb7d5('0x3d'));_0x427578[_0xb7d5('0x3e')]=_['keys'](_0x5e39f7['query']);_0x427578[_0xb7d5('0x3f')]=_[_0xb7d5('0x40')](_0x427578[_0xb7d5('0x41')],_0x427578['query']);_0x477be0[_0xb7d5('0x42')]=_['intersection'](_0x427578['model'],qs[_0xb7d5('0x43')](_0x5e39f7[_0xb7d5('0x3e')][_0xb7d5('0x43')]));_0x477be0['attributes']=_0x477be0[_0xb7d5('0x42')][_0xb7d5('0x44')]?_0x477be0['attributes']:_0x427578[_0xb7d5('0x41')];if(!_0x5e39f7['query']['hasOwnProperty'](_0xb7d5('0x45'))){_0x477be0['limit']=qs['limit'](_0x5e39f7['query'][_0xb7d5('0x2f')]);_0x477be0[_0xb7d5('0x2e')]=qs[_0xb7d5('0x2e')](_0x5e39f7[_0xb7d5('0x3e')][_0xb7d5('0x2e')]);}_0x477be0[_0xb7d5('0x46')]=qs[_0xb7d5('0x47')](_0x5e39f7[_0xb7d5('0x3e')][_0xb7d5('0x47')]);_0x477be0[_0xb7d5('0x48')]=qs[_0xb7d5('0x3f')](_['pick'](_0x5e39f7['query'],_0x427578[_0xb7d5('0x3f')]));if(_0x5e39f7['query']['filter']){_0x477be0[_0xb7d5('0x48')]=_[_0xb7d5('0x49')](_0x477be0[_0xb7d5('0x48')],{'$or':_[_0xb7d5('0x39')](_0x1033ed,function(_0x3ab603){if(_0x3ab603['type']!==_0xb7d5('0x4a')){var _0x1337e8={};_0x1337e8[_0x3ab603['name']]={'$like':'%'+_0x5e39f7[_0xb7d5('0x3e')][_0xb7d5('0x4b')]+'%'};return _0x1337e8;}})});}_0x477be0=_['merge']({},_0x477be0,_0x5e39f7[_0xb7d5('0x4c')]);var _0x430260={'where':_0x477be0[_0xb7d5('0x48')]};return db['VtigerAccount'][_0xb7d5('0x2d')](_0x430260)[_0xb7d5('0x1d')](function(_0x464840){_0xf33eb0[_0xb7d5('0x2d')]=_0x464840;if(_0x5e39f7[_0xb7d5('0x3e')][_0xb7d5('0x4d')]){_0x477be0[_0xb7d5('0x4e')]=[{'all':!![]}];}return db['VtigerAccount']['findAll'](_0x477be0);})[_0xb7d5('0x1d')](function(_0x152efc){_0xf33eb0[_0xb7d5('0x4f')]=_0x152efc;return _0xf33eb0;})[_0xb7d5('0x1d')](respondWithFilteredResult(_0x412ed9,_0x477be0))['catch'](handleError(_0x412ed9,null));};exports[_0xb7d5('0x50')]=function(_0x5f31d9,_0x27df0c){var _0x16e0f1={'raw':![],'where':{'id':_0x5f31d9[_0xb7d5('0x51')]['id']}},_0x2bef19={};_0x2bef19['model']=_[_0xb7d5('0x52')](db[_0xb7d5('0x3a')][_0xb7d5('0x53')]);_0x2bef19[_0xb7d5('0x3e')]=_[_0xb7d5('0x52')](_0x5f31d9[_0xb7d5('0x3e')]);_0x2bef19[_0xb7d5('0x3f')]=_['intersection'](_0x2bef19['model'],_0x2bef19['query']);_0x16e0f1[_0xb7d5('0x42')]=_[_0xb7d5('0x40')](_0x2bef19[_0xb7d5('0x41')],qs['fields'](_0x5f31d9[_0xb7d5('0x3e')]['fields']));_0x16e0f1[_0xb7d5('0x42')]=_0x16e0f1['attributes'][_0xb7d5('0x44')]?_0x16e0f1[_0xb7d5('0x42')]:_0x2bef19['model'];if(_0x5f31d9[_0xb7d5('0x3e')][_0xb7d5('0x4d')]){_0x16e0f1[_0xb7d5('0x4e')]=[{'all':!![]}];}_0x16e0f1=_['merge']({},_0x16e0f1,_0x5f31d9[_0xb7d5('0x4c')]);return db[_0xb7d5('0x3a')][_0xb7d5('0x54')](_0x16e0f1)[_0xb7d5('0x1d')](handleEntityNotFound(_0x27df0c,null))[_0xb7d5('0x1d')](respondWithResult(_0x27df0c,null))[_0xb7d5('0x28')](handleError(_0x27df0c,null));};exports[_0xb7d5('0x55')]=function(_0x4a8b5d,_0x3ae842){return db[_0xb7d5('0x3a')]['create'](_0x4a8b5d[_0xb7d5('0x56')],{})[_0xb7d5('0x1d')](respondWithResult(_0x3ae842,0xc9))['catch'](handleError(_0x3ae842,null));};exports['update']=function(_0x3c99cd,_0x5776e4){if(_0x3c99cd['body']['id']){delete _0x3c99cd['body']['id'];}return db[_0xb7d5('0x3a')][_0xb7d5('0x54')]({'where':{'id':_0x3c99cd[_0xb7d5('0x51')]['id']}})['then'](handleEntityNotFound(_0x5776e4,null))[_0xb7d5('0x1d')](saveUpdates(_0x3c99cd['body'],null))[_0xb7d5('0x1d')](respondWithResult(_0x5776e4,null))[_0xb7d5('0x28')](handleError(_0x5776e4,null));};exports[_0xb7d5('0x35')]=function(_0x45c43b,_0x1ae382){return db[_0xb7d5('0x3a')][_0xb7d5('0x54')]({'where':{'id':_0x45c43b['params']['id']}})[_0xb7d5('0x1d')](handleEntityNotFound(_0x1ae382,null))[_0xb7d5('0x1d')](removeEntity(_0x1ae382,null))[_0xb7d5('0x28')](handleError(_0x1ae382,null));};exports[_0xb7d5('0x57')]=function(_0x53f7e6,_0x22bfb5,_0x3d2b16){var _0x1d409c={};var _0x4b9a3f={};var _0x232d51;var _0x4e7761;return db[_0xb7d5('0x3a')][_0xb7d5('0x58')]({'where':{'id':_0x53f7e6['params']['id']}})[_0xb7d5('0x1d')](handleEntityNotFound(_0x22bfb5,null))[_0xb7d5('0x1d')](function(_0x6d4e6e){if(_0x6d4e6e){_0x232d51=_0x6d4e6e;_0x4b9a3f[_0xb7d5('0x41')]=_[_0xb7d5('0x52')](db[_0xb7d5('0x59')]['rawAttributes']);_0x4b9a3f[_0xb7d5('0x3e')]=_[_0xb7d5('0x52')](_0x53f7e6[_0xb7d5('0x3e')]);_0x4b9a3f[_0xb7d5('0x3f')]=_['intersection'](_0x4b9a3f[_0xb7d5('0x41')],_0x4b9a3f[_0xb7d5('0x3e')]);_0x1d409c[_0xb7d5('0x42')]=_[_0xb7d5('0x40')](_0x4b9a3f['model'],qs[_0xb7d5('0x43')](_0x53f7e6['query']['fields']));_0x1d409c[_0xb7d5('0x42')]=_0x1d409c[_0xb7d5('0x42')][_0xb7d5('0x44')]?_0x1d409c['attributes']:_0x4b9a3f[_0xb7d5('0x41')];_0x1d409c[_0xb7d5('0x46')]=qs[_0xb7d5('0x47')](_0x53f7e6['query'][_0xb7d5('0x47')]);_0x1d409c[_0xb7d5('0x48')]=qs['filters'](_['pick'](_0x53f7e6[_0xb7d5('0x3e')],_0x4b9a3f[_0xb7d5('0x3f')]));if(_0x53f7e6[_0xb7d5('0x3e')]['filter']){_0x1d409c[_0xb7d5('0x48')]=_[_0xb7d5('0x49')](_0x1d409c[_0xb7d5('0x48')],{'$or':_[_0xb7d5('0x39')](_0x1d409c[_0xb7d5('0x42')],function(_0x22bdfb){var _0x18c211={};_0x18c211[_0x22bdfb]={'$like':'%'+_0x53f7e6[_0xb7d5('0x3e')]['filter']+'%'};return _0x18c211;})});}_0x1d409c=_[_0xb7d5('0x49')]({},_0x1d409c,_0x53f7e6[_0xb7d5('0x4c')]);return _0x232d51[_0xb7d5('0x57')](_0x1d409c);}})[_0xb7d5('0x1d')](function(_0x32ec83){if(_0x32ec83){_0x4e7761=_0x32ec83[_0xb7d5('0x44')];if(!_0x53f7e6[_0xb7d5('0x3e')][_0xb7d5('0x5a')]('nolimit')){_0x1d409c['limit']=qs['limit'](_0x53f7e6[_0xb7d5('0x3e')]['limit']);_0x1d409c[_0xb7d5('0x2e')]=qs[_0xb7d5('0x2e')](_0x53f7e6[_0xb7d5('0x3e')]['offset']);}return _0x232d51[_0xb7d5('0x57')](_0x1d409c);}})[_0xb7d5('0x1d')](function(_0x25c580){if(_0x25c580){return _0x25c580?{'count':_0x4e7761,'rows':_0x25c580}:null;}})[_0xb7d5('0x1d')](respondWithResult(_0x22bfb5,null))['catch'](handleError(_0x22bfb5,null));};exports['addConfiguration']=function(_0x2b8c19,_0x2b31a4,_0x1cc8e8){if(_0x2b8c19[_0xb7d5('0x56')]['id']){delete _0x2b8c19[_0xb7d5('0x56')]['id'];}return db[_0xb7d5('0x3a')]['findOne']({'where':{'id':_0x2b8c19[_0xb7d5('0x51')]['id']}})[_0xb7d5('0x1d')](handleEntityNotFound(_0x2b31a4,null))['then'](function(_0x534c9a){if(_0x534c9a){_0x2b8c19[_0xb7d5('0x56')]['AccountId']=_0x534c9a['id'];_0x2b8c19[_0xb7d5('0x56')][_0xb7d5('0x5b')]=integrations[_0xb7d5('0x5c')](_0x2b8c19['body']['channel'],_0x2b8c19[_0xb7d5('0x56')][_0xb7d5('0x3c')]);_0x2b8c19['body']['Descriptions']=integrations[_0xb7d5('0x5d')](_0x2b8c19[_0xb7d5('0x56')][_0xb7d5('0x5e')],_0x2b8c19[_0xb7d5('0x56')][_0xb7d5('0x3c')]);return db[_0xb7d5('0x59')]['create'](_0x2b8c19[_0xb7d5('0x56')],{'include':[{'model':db[_0xb7d5('0x5f')],'as':_0xb7d5('0x5b')},{'model':db['VtigerField'],'as':'Descriptions'}]});}return null;})[_0xb7d5('0x1d')](respondWithResult(_0x2b31a4,null))['catch'](handleError(_0x2b31a4,null));};var md5=require(_0xb7d5('0x60'));exports[_0xb7d5('0x61')]=function(_0x371667,_0x54b801,_0x1df41a){var _0x5606e8=null;var _0x6232d4=null;var _0x2599ac=null;var _0x24e350=null;var _0x199317='';return db[_0xb7d5('0x3a')][_0xb7d5('0x58')]({'where':{'id':_0x371667[_0xb7d5('0x51')]['id']},'attributes':['id',_0xb7d5('0x3d'),_0xb7d5('0x62'),_0xb7d5('0x63'),_0xb7d5('0x64'),_0xb7d5('0x65'),_0xb7d5('0x66'),_0xb7d5('0x67')]})[_0xb7d5('0x1d')](handleEntityNotFound(_0x54b801,null))[_0xb7d5('0x1d')](function(_0x59791b){if(_0x59791b){_0x5606e8=_0x59791b[_0xb7d5('0x62')];_0x6232d4=_0x59791b['accessKey'];_0x2599ac=_0x59791b[_0xb7d5('0x64')];_0x199317=_0x59791b[_0xb7d5('0x65')];var _0x2c5b97=_0x199317[_0xb7d5('0x68')](-0x1);if(_0x2c5b97==='/'){_0x199317=_0x199317['substring'](0x0,_0x199317[_0xb7d5('0x69')](_0x2c5b97));}_0x24e350=util[_0xb7d5('0x6a')](_0xb7d5('0x6b'),_0x199317);var _0x2f29eb={'method':'GET','uri':_0x24e350,'qs':{'operation':'getchallenge','username':_0x59791b['username']},'json':!![]};return rp(_0x2f29eb);}})['then'](function(_0x35b275){if(_0x35b275[_0xb7d5('0x6c')]){var _0x1d8686={'method':'POST','uri':_0x24e350,'form':{'operation':_0xb7d5('0x6d'),'username':_0x5606e8,'accessKey':md5(_0x35b275[_0xb7d5('0x27')][_0xb7d5('0x6e')]+_0x6232d4)},'json':!![]};return rp(_0x1d8686);}})['then'](function(_0x51a672){if(_0x51a672[_0xb7d5('0x6c')]){var _0x3f8225={'method':_0xb7d5('0x6f'),'uri':_0x24e350,'qs':{'operation':'describe','username':_0x5606e8,'sessionName':_0x51a672[_0xb7d5('0x27')]['sessionName'],'elementType':_0x2599ac},'json':!![]};return rp(_0x3f8225);}})[_0xb7d5('0x1d')](function(_0x202c55){if(_0x202c55[_0xb7d5('0x6c')]){var _0x405b22=[_0xb7d5('0x70'),_0xb7d5('0x71'),_0xb7d5('0x72')];_['remove'](_0x202c55[_0xb7d5('0x27')][_0xb7d5('0x43')],function(_0x6051e5){return _0x405b22[_0xb7d5('0x73')](_0x6051e5[_0xb7d5('0x3c')][_0xb7d5('0x3d')]);});_[_0xb7d5('0x74')](_0x202c55[_0xb7d5('0x27')][_0xb7d5('0x43')],function(_0x3a323e){return _0x3a323e[_0xb7d5('0x75')]===_0xb7d5('0x76');});return{'count':_0x202c55[_0xb7d5('0x27')][_0xb7d5('0x43')]['length'],'rows':_[_0xb7d5('0x39')](_0x202c55[_0xb7d5('0x27')]['fields'],function(_0x4af6a3){return{'id':_0x4af6a3[_0xb7d5('0x3d')],'name':_0x4af6a3[_0xb7d5('0x77')],'custom':_[_0xb7d5('0x78')](_0x4af6a3[_0xb7d5('0x3d')],'cf_')?!![]:![],'options':_0x4af6a3[_0xb7d5('0x3c')]['name']==='picklist'&&_0x4af6a3[_0xb7d5('0x3c')][_0xb7d5('0x79')][_0xb7d5('0x44')]>0x0?_[_0xb7d5('0x39')](_0x4af6a3[_0xb7d5('0x3c')][_0xb7d5('0x79')],function(_0x3b73d3){return{'name':_0x3b73d3[_0xb7d5('0x77')],'value':_0x3b73d3[_0xb7d5('0x7a')]};}):[]};})};}})[_0xb7d5('0x1d')](respondWithResult(_0x54b801,null))[_0xb7d5('0x28')](function(_0x9362c6){console[_0xb7d5('0x7b')]('vTiger\x20error:\x20'+_0x9362c6);var _0x48b197=_0x371667[_0xb7d5('0x3e')][_0xb7d5('0x18')]?0x1f4:_0x9362c6[_0xb7d5('0x7c')]||0x1f4;logger[_0xb7d5('0x23')](_0xb7d5('0x7d'),_0xb7d5('0x61'),_0x48b197,JSON[_0xb7d5('0x22')](_0x9362c6));delete _0x9362c6['name'];if(_0x48b197===0x191){_0x48b197=0x190;}_0x54b801[_0xb7d5('0x2a')](_0x48b197)[_0xb7d5('0x37')](_0x371667[_0xb7d5('0x3e')]['test']?{'message':_0xb7d5('0x7e'),'statusCode':_0x9362c6['statusCode']}:_0x9362c6);});};
\ No newline at end of file
diff --git a/server/api/intVtigerAccount/intVtigerAccount.model.js b/server/api/intVtigerAccount/intVtigerAccount.model.js
index 7a044d2..47016c5 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 _0x3478=['api','moment','path','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','exports','define','int_vtiger_accounts','lodash','util'];(function(_0x3da1d4,_0x540524){var _0x5682a5=function(_0x321bcf){while(--_0x321bcf){_0x3da1d4['push'](_0x3da1d4['shift']());}};_0x5682a5(++_0x540524);}(_0x3478,0x174));var _0x8347=function(_0x3f165f,_0x15f551){_0x3f165f=_0x3f165f-0x0;var _0x241a90=_0x3478[_0x3f165f];return _0x241a90;};'use strict';var _=require(_0x8347('0x0'));var util=require(_0x8347('0x1'));var logger=require('../../config/logger')(_0x8347('0x2'));var moment=require(_0x8347('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x8347('0x4'));var rimraf=require('rimraf');var config=require(_0x8347('0x5'));var attributes=require(_0x8347('0x6'));var integrations=require(_0x8347('0x7'));module[_0x8347('0x8')]=function(_0x1fba8f,_0x42ef3e){return _0x1fba8f[_0x8347('0x9')]('VtigerAccount',attributes,{'tableName':_0x8347('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xea85=['bluebird','request-promise','path','rimraf','../../config/environment','./intVtigerAccount.attributes','define','VtigerAccount','int_vtiger_accounts','lodash','util','api','moment'];(function(_0x3ed2ae,_0x1f2259){var _0x251aee=function(_0x573f27){while(--_0x573f27){_0x3ed2ae['push'](_0x3ed2ae['shift']());}};_0x251aee(++_0x1f2259);}(_0xea85,0xd9));var _0x5ea8=function(_0x566acc,_0x5f42ec){_0x566acc=_0x566acc-0x0;var _0x4a6c6e=_0xea85[_0x566acc];return _0x4a6c6e;};'use strict';var _=require(_0x5ea8('0x0'));var util=require(_0x5ea8('0x1'));var logger=require('../../config/logger')(_0x5ea8('0x2'));var moment=require(_0x5ea8('0x3'));var BPromise=require(_0x5ea8('0x4'));var rp=require(_0x5ea8('0x5'));var fs=require('fs');var path=require(_0x5ea8('0x6'));var rimraf=require(_0x5ea8('0x7'));var config=require(_0x5ea8('0x8'));var attributes=require(_0x5ea8('0x9'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x5e5e2a,_0x1e6095){return _0x5e5e2a[_0x5ea8('0xa')](_0x5ea8('0xb'),attributes,{'tableName':_0x5ea8('0xc'),'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 ca5ef5b..4587168 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 _0x112d=['util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','VtigerAccount','findAll','options','raw','where','limit','include','map','model','attributes','GetVtigerAccount','debug','ShowVtigerAccount','lodash'];(function(_0x39d9ec,_0x4ed6e5){var _0x499ff0=function(_0x565eaf){while(--_0x565eaf){_0x39d9ec['push'](_0x39d9ec['shift']());}};_0x499ff0(++_0x4ed6e5);}(_0x112d,0x8f));var _0xd112=function(_0x5a9711,_0x47dfd4){_0x5a9711=_0x5a9711-0x0;var _0xa1633b=_0x112d[_0x5a9711];return _0xa1633b;};'use strict';var _=require(_0xd112('0x0'));var util=require(_0xd112('0x1'));var moment=require('moment');var BPromise=require(_0xd112('0x2'));var rs=require(_0xd112('0x3'));var fs=require('fs');var Redis=require(_0xd112('0x4'));var db=require(_0xd112('0x5'))['db'];var utils=require(_0xd112('0x6'));var logger=require(_0xd112('0x7'))(_0xd112('0x8'));var config=require('../../config/environment');var jayson=require(_0xd112('0x9'));var client=jayson[_0xd112('0xa')][_0xd112('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x44e736,_0x364dee,_0x2b5514){return new BPromise(function(_0x3557a4,_0x34fec1){return client[_0xd112('0xc')](_0x44e736,_0x2b5514)[_0xd112('0xd')](function(_0x20a19b){logger[_0xd112('0xe')](_0xd112('0xf'),_0x364dee,_0xd112('0x10'));logger['debug'](_0xd112('0x11'),_0x364dee,'request\x20sent',JSON[_0xd112('0x12')](_0x20a19b));if(_0x20a19b[_0xd112('0x13')]){if(_0x20a19b['error']['code']===0x1f4){logger['error']('VtigerAccount,\x20%s,\x20%s',_0x364dee,_0x20a19b[_0xd112('0x13')][_0xd112('0x14')]);return _0x34fec1(_0x20a19b['error'][_0xd112('0x14')]);}logger['error'](_0xd112('0xf'),_0x364dee,_0x20a19b[_0xd112('0x13')][_0xd112('0x14')]);return _0x3557a4(_0x20a19b[_0xd112('0x13')][_0xd112('0x14')]);}else{logger[_0xd112('0xe')](_0xd112('0xf'),_0x364dee,_0xd112('0x10'));_0x3557a4(_0x20a19b[_0xd112('0x15')][_0xd112('0x14')]);}})[_0xd112('0x16')](function(_0x413319){logger['error'](_0xd112('0xf'),_0x364dee,_0x413319);_0x34fec1(_0x413319);});});}exports['GetVtigerAccount']=function(_0x3907d2){var _0x1f6e67=this;return new Promise(function(_0x201e1c,_0x185a97){return db[_0xd112('0x17')][_0xd112('0x18')]({'raw':_0x3907d2[_0xd112('0x19')]?_0x3907d2[_0xd112('0x19')][_0xd112('0x1a')]===undefined?!![]:![]:!![],'where':_0x3907d2[_0xd112('0x19')]?_0x3907d2[_0xd112('0x19')][_0xd112('0x1b')]||null:null,'attributes':_0x3907d2[_0xd112('0x19')]?_0x3907d2[_0xd112('0x19')]['attributes']||null:null,'limit':_0x3907d2['options']?_0x3907d2['options'][_0xd112('0x1c')]||null:null,'include':_0x3907d2[_0xd112('0x19')]?_0x3907d2[_0xd112('0x19')][_0xd112('0x1d')]?_[_0xd112('0x1e')](_0x3907d2['options']['include'],function(_0x21160c){return{'model':db[_0x21160c[_0xd112('0x1f')]],'as':_0x21160c['as'],'attributes':_0x21160c[_0xd112('0x20')],'include':_0x21160c[_0xd112('0x1d')]?_[_0xd112('0x1e')](_0x21160c['include'],function(_0x34351b){return{'model':db[_0x34351b[_0xd112('0x1f')]],'as':_0x34351b['as'],'attributes':_0x34351b['attributes'],'include':_0x34351b['include']?_[_0xd112('0x1e')](_0x34351b[_0xd112('0x1d')],function(_0x5e49f3){return{'model':db[_0x5e49f3[_0xd112('0x1f')]],'as':_0x5e49f3['as'],'attributes':_0x5e49f3[_0xd112('0x20')]};}):[]};}):[]};}):[]:[]})[_0xd112('0xd')](function(_0x38fabf){logger[_0xd112('0xe')](_0xd112('0x21'),_0x3907d2);logger[_0xd112('0x22')]('GetVtigerAccount',_0x3907d2,JSON[_0xd112('0x12')](_0x38fabf));_0x201e1c(_0x38fabf);})['catch'](function(_0x4b5f6a){logger[_0xd112('0x13')](_0xd112('0x21'),_0x4b5f6a['message'],_0x3907d2);_0x185a97(_0x1f6e67['error'](0x1f4,_0x4b5f6a['message']));});});};exports['ShowVtigerAccount']=function(_0x4a6649){var _0x52480f=this;return new Promise(function(_0x2910da,_0x22d6b4){return db[_0xd112('0x17')]['find']({'raw':_0x4a6649['options']?_0x4a6649[_0xd112('0x19')][_0xd112('0x1a')]===undefined?!![]:![]:!![],'where':_0x4a6649[_0xd112('0x19')]?_0x4a6649['options'][_0xd112('0x1b')]||null:null,'attributes':_0x4a6649[_0xd112('0x19')]?_0x4a6649['options'][_0xd112('0x20')]||null:null,'include':_0x4a6649['options']?_0x4a6649[_0xd112('0x19')][_0xd112('0x1d')]?_['map'](_0x4a6649[_0xd112('0x19')][_0xd112('0x1d')],function(_0x36725c){return{'model':db[_0x36725c['model']],'as':_0x36725c['as'],'attributes':_0x36725c[_0xd112('0x20')],'include':_0x36725c[_0xd112('0x1d')]?_[_0xd112('0x1e')](_0x36725c[_0xd112('0x1d')],function(_0xfe22f3){return{'model':db[_0xfe22f3[_0xd112('0x1f')]],'as':_0xfe22f3['as'],'attributes':_0xfe22f3[_0xd112('0x20')],'include':_0xfe22f3[_0xd112('0x1d')]?_[_0xd112('0x1e')](_0xfe22f3[_0xd112('0x1d')],function(_0x181f7b){return{'model':db[_0x181f7b[_0xd112('0x1f')]],'as':_0x181f7b['as'],'attributes':_0x181f7b[_0xd112('0x20')]};}):[]};}):[]};}):[]:[]})[_0xd112('0xd')](function(_0x9ec04b){logger[_0xd112('0xe')](_0xd112('0x23'),_0x4a6649);logger['debug'](_0xd112('0x23'),_0x4a6649,JSON[_0xd112('0x12')](_0x9ec04b));_0x2910da(_0x9ec04b);})[_0xd112('0x16')](function(_0x2a7c6b){logger[_0xd112('0x13')](_0xd112('0x23'),_0x2a7c6b['message'],_0x4a6649);_0x22d6b4(_0x52480f[_0xd112('0x13')](0x1f4,_0x2a7c6b[_0xd112('0x14')]));});});};
\ No newline at end of file
+var _0x6238=['../../config/logger','rpc','../../config/environment','client','request','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetVtigerAccount','VtigerAccount','findAll','options','raw','where','include','map','model','attributes','ShowVtigerAccount','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x43b1fb,_0x22e01e){var _0x2eb5bc=function(_0x1622a4){while(--_0x1622a4){_0x43b1fb['push'](_0x43b1fb['shift']());}};_0x2eb5bc(++_0x22e01e);}(_0x6238,0x118));var _0x8623=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x6238[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x8623('0x0'));var util=require(_0x8623('0x1'));var moment=require(_0x8623('0x2'));var BPromise=require(_0x8623('0x3'));var rs=require(_0x8623('0x4'));var fs=require('fs');var Redis=require(_0x8623('0x5'));var db=require(_0x8623('0x6'))['db'];var utils=require(_0x8623('0x7'));var logger=require(_0x8623('0x8'))(_0x8623('0x9'));var config=require(_0x8623('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x8623('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x57ab28,_0x408855,_0x2b1484){return new BPromise(function(_0x2ab910,_0x1b12bd){return client[_0x8623('0xc')](_0x57ab28,_0x2b1484)[_0x8623('0xd')](function(_0x4d3a2c){logger[_0x8623('0xe')](_0x8623('0xf'),_0x408855,_0x8623('0x10'));logger[_0x8623('0x11')](_0x8623('0x12'),_0x408855,'request\x20sent',JSON['stringify'](_0x4d3a2c));if(_0x4d3a2c[_0x8623('0x13')]){if(_0x4d3a2c['error'][_0x8623('0x14')]===0x1f4){logger[_0x8623('0x13')](_0x8623('0xf'),_0x408855,_0x4d3a2c[_0x8623('0x13')][_0x8623('0x15')]);return _0x1b12bd(_0x4d3a2c[_0x8623('0x13')][_0x8623('0x15')]);}logger[_0x8623('0x13')](_0x8623('0xf'),_0x408855,_0x4d3a2c[_0x8623('0x13')]['message']);return _0x2ab910(_0x4d3a2c[_0x8623('0x13')][_0x8623('0x15')]);}else{logger[_0x8623('0xe')](_0x8623('0xf'),_0x408855,_0x8623('0x10'));_0x2ab910(_0x4d3a2c[_0x8623('0x16')][_0x8623('0x15')]);}})[_0x8623('0x17')](function(_0x2a4ec5){logger['error']('VtigerAccount,\x20%s,\x20%s',_0x408855,_0x2a4ec5);_0x1b12bd(_0x2a4ec5);});});}exports[_0x8623('0x18')]=function(_0x323156){var _0x4b7fe2=this;return new Promise(function(_0x12f723,_0x2a71c7){return db[_0x8623('0x19')][_0x8623('0x1a')]({'raw':_0x323156[_0x8623('0x1b')]?_0x323156[_0x8623('0x1b')][_0x8623('0x1c')]===undefined?!![]:![]:!![],'where':_0x323156[_0x8623('0x1b')]?_0x323156['options'][_0x8623('0x1d')]||null:null,'attributes':_0x323156[_0x8623('0x1b')]?_0x323156[_0x8623('0x1b')]['attributes']||null:null,'limit':_0x323156[_0x8623('0x1b')]?_0x323156[_0x8623('0x1b')]['limit']||null:null,'include':_0x323156[_0x8623('0x1b')]?_0x323156['options'][_0x8623('0x1e')]?_[_0x8623('0x1f')](_0x323156['options'][_0x8623('0x1e')],function(_0x4600c9){return{'model':db[_0x4600c9[_0x8623('0x20')]],'as':_0x4600c9['as'],'attributes':_0x4600c9[_0x8623('0x21')],'include':_0x4600c9[_0x8623('0x1e')]?_[_0x8623('0x1f')](_0x4600c9['include'],function(_0x23f32f){return{'model':db[_0x23f32f['model']],'as':_0x23f32f['as'],'attributes':_0x23f32f[_0x8623('0x21')],'include':_0x23f32f[_0x8623('0x1e')]?_[_0x8623('0x1f')](_0x23f32f[_0x8623('0x1e')],function(_0x34fffb){return{'model':db[_0x34fffb[_0x8623('0x20')]],'as':_0x34fffb['as'],'attributes':_0x34fffb[_0x8623('0x21')]};}):[]};}):[]};}):[]:[]})[_0x8623('0xd')](function(_0x13ddce){logger[_0x8623('0xe')](_0x8623('0x18'),_0x323156);logger[_0x8623('0x11')](_0x8623('0x18'),_0x323156,JSON['stringify'](_0x13ddce));_0x12f723(_0x13ddce);})['catch'](function(_0x714668){logger[_0x8623('0x13')]('GetVtigerAccount',_0x714668['message'],_0x323156);_0x2a71c7(_0x4b7fe2[_0x8623('0x13')](0x1f4,_0x714668[_0x8623('0x15')]));});});};exports['ShowVtigerAccount']=function(_0x543f29){var _0x595295=this;return new Promise(function(_0x17e1e3,_0x5728e1){return db[_0x8623('0x19')]['find']({'raw':_0x543f29[_0x8623('0x1b')]?_0x543f29[_0x8623('0x1b')][_0x8623('0x1c')]===undefined?!![]:![]:!![],'where':_0x543f29[_0x8623('0x1b')]?_0x543f29[_0x8623('0x1b')][_0x8623('0x1d')]||null:null,'attributes':_0x543f29[_0x8623('0x1b')]?_0x543f29[_0x8623('0x1b')]['attributes']||null:null,'include':_0x543f29['options']?_0x543f29[_0x8623('0x1b')]['include']?_[_0x8623('0x1f')](_0x543f29[_0x8623('0x1b')][_0x8623('0x1e')],function(_0x3dacc2){return{'model':db[_0x3dacc2[_0x8623('0x20')]],'as':_0x3dacc2['as'],'attributes':_0x3dacc2[_0x8623('0x21')],'include':_0x3dacc2[_0x8623('0x1e')]?_[_0x8623('0x1f')](_0x3dacc2[_0x8623('0x1e')],function(_0x2036ae){return{'model':db[_0x2036ae[_0x8623('0x20')]],'as':_0x2036ae['as'],'attributes':_0x2036ae[_0x8623('0x21')],'include':_0x2036ae['include']?_[_0x8623('0x1f')](_0x2036ae[_0x8623('0x1e')],function(_0x319257){return{'model':db[_0x319257['model']],'as':_0x319257['as'],'attributes':_0x319257['attributes']};}):[]};}):[]};}):[]:[]})[_0x8623('0xd')](function(_0x9123a){logger[_0x8623('0xe')](_0x8623('0x22'),_0x543f29);logger[_0x8623('0x11')](_0x8623('0x22'),_0x543f29,JSON[_0x8623('0x23')](_0x9123a));_0x17e1e3(_0x9123a);})[_0x8623('0x17')](function(_0x53756d){logger[_0x8623('0x13')](_0x8623('0x22'),_0x53756d['message'],_0x543f29);_0x5728e1(_0x595295[_0x8623('0x13')](0x1f4,_0x53756d['message']));});});};
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/index.js b/server/api/intVtigerConfiguration/index.js
index a371315..2a076aa 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 _0xd8b0=['isAuthenticated','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','create','put','update','delete','destroy','exports','multer','util','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','index','get','/:id','show'];(function(_0x3d38ae,_0x51102b){var _0x3757ee=function(_0x22bac8){while(--_0x22bac8){_0x3d38ae['push'](_0x3d38ae['shift']());}};_0x3757ee(++_0x51102b);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var auth=require(_0x0d8b('0x3'));var interaction=require(_0x0d8b('0x4'));var config=require(_0x0d8b('0x5'));var controller=require(_0x0d8b('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x0d8b('0x7')]);router[_0x0d8b('0x8')](_0x0d8b('0x9'),auth['isAuthenticated'](),controller[_0x0d8b('0xa')]);router[_0x0d8b('0x8')]('/:id/fields',auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0x8')](_0x0d8b('0xd'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0x8')](_0x0d8b('0xf'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['post']('/',auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x11')]);router[_0x0d8b('0x12')](_0x0d8b('0x9'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x13')]);router[_0x0d8b('0x14')](_0x0d8b('0x9'),auth[_0x0d8b('0xb')](),controller[_0x0d8b('0x15')]);module[_0x0d8b('0x16')]=router;
\ No newline at end of file
+var _0xb10b=['/:id','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','put','update','delete','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','get','isAuthenticated'];(function(_0x224527,_0x2daeb0){var _0x5cb8ef=function(_0x442991){while(--_0x442991){_0x224527['push'](_0x224527['shift']());}};_0x5cb8ef(++_0x2daeb0);}(_0xb10b,0x12a));var _0xbb10=function(_0x2e2f84,_0x24e46f){_0x2e2f84=_0x2e2f84-0x0;var _0x448191=_0xb10b[_0x2e2f84];return _0x448191;};'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('0x8')](_0xbb10('0xe'),auth[_0xbb10('0x9')](),controller['getSubjects']);router['get'](_0xbb10('0xf'),auth[_0xbb10('0x9')](),controller[_0xbb10('0x10')]);router['post']('/',auth[_0xbb10('0x9')](),controller['create']);router[_0xbb10('0x11')](_0xbb10('0xa'),auth[_0xbb10('0x9')](),controller[_0xbb10('0x12')]);router[_0xbb10('0x13')](_0xbb10('0xa'),auth['isAuthenticated'](),controller[_0xbb10('0x14')]);module[_0xbb10('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js
index 258b249..c521e3c 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 _0x079f=['exports','STRING'];(function(_0x4af01a,_0xf6e46b){var _0x26f63c=function(_0xf1e836){while(--_0xf1e836){_0x4af01a['push'](_0x4af01a['shift']());}};_0x26f63c(++_0xf6e46b);}(_0x079f,0x15e));var _0xf079=function(_0x37dfdb,_0x51140f){_0x37dfdb=_0x37dfdb-0x0;var _0x1f1715=_0x079f[_0x37dfdb];return _0x1f1715;};'use strict';var Sequelize=require('sequelize');module[_0xf079('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xf079('0x1')]}};
\ No newline at end of file
+var _0x05ab=['STRING','sequelize'];(function(_0x45783c,_0x49c56d){var _0x1161da=function(_0x3c5d41){while(--_0x3c5d41){_0x45783c['push'](_0x45783c['shift']());}};_0x1161da(++_0x49c56d);}(_0x05ab,0x1c7));var _0xb05a=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0x05ab[_0x1caf6a];return _0x1bf493;};'use strict';var Sequelize=require(_0xb05a('0x0'));module['exports']={'name':{'type':Sequelize[_0xb05a('0x1')]},'description':{'type':Sequelize[_0xb05a('0x1')]}};
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js
index e0b9e46..92ba283 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 _0x908e=['query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','VIRTUAL','includeAll','include','findAll','rows','show','options','find','create','body','params','findOne','pick','nolimit','getFields','VtigerField','getSubjects','getDescriptions','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','jayson/promise','client','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','VtigerConfiguration,\x20%s,\x20%s','info','result','catch','status','end','json','count','offset','limit','set','apply','reject','save','update','then','destroy','sendStatus','stack','send','index','map','VtigerConfiguration','rawAttributes','fieldName','key','model','name'];(function(_0x465de3,_0x91106c){var _0x55dcab=function(_0x127a11){while(--_0x127a11){_0x465de3['push'](_0x465de3['shift']());}};_0x55dcab(++_0x91106c);}(_0x908e,0x13c));var _0xe908=function(_0x9fa7c1,_0x101488){_0x9fa7c1=_0x9fa7c1-0x0;var _0x82e7aa=_0x908e[_0x9fa7c1];return _0x82e7aa;};'use strict';var pdf=require(_0xe908('0x0'));var emlformat=require(_0xe908('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xe908('0x2'));var jsonpatch=require(_0xe908('0x3'));var rp=require(_0xe908('0x4'));var moment=require(_0xe908('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xe908('0x6'));var util=require(_0xe908('0x7'));var path=require(_0xe908('0x8'));var sox=require(_0xe908('0x9'));var csv=require('to-csv');var ejs=require(_0xe908('0xa'));var fs=require('fs');var _=require(_0xe908('0xb'));var squel=require('squel');var crypto=require(_0xe908('0xc'));var jsforce=require(_0xe908('0xd'));var deskjs=require(_0xe908('0xe'));var toCsv=require(_0xe908('0xf'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xe908('0x10'));var qs=require(_0xe908('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe908('0x12'));var logger=require('../../config/logger')(_0xe908('0x13'));var utils=require(_0xe908('0x14'));var config=require(_0xe908('0x15'));var db=require('../../mysqldb')['db'];var jayson=require(_0xe908('0x16'));var client=jayson[_0xe908('0x17')]['http']({'port':0x232a});function checkPasswordPattern(_0x57d88d,_0x500d5a,_0x19747e){if(_0x19747e){var _0x46acd7=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x46acd7[_0xe908('0x18')](_0x500d5a)){return _0x57d88d;}else{throw new db[(_0xe908('0x19'))][(_0xe908('0x1a'))](_0xe908('0x1b'));}}else{return _0x57d88d;}}function respondWithRpcPromise(_0xe128a5,_0x2f0b55,_0x108e6b,_0x2897e5){return new BPromise(function(_0x4000ba,_0x2cc656){var _0x72e66e=_0x2897e5||client;return _0x72e66e[_0xe908('0x1c')](_0xe128a5,_0x108e6b)['then'](function(_0xa5edaa){logger['info']('VtigerConfiguration,\x20%s,\x20%s',_0x2f0b55,_0xe908('0x1d'));logger[_0xe908('0x1e')](_0xe908('0x1f'),_0x2f0b55,_0xe908('0x1d'),JSON[_0xe908('0x20')](_0xa5edaa));if(_0xa5edaa[_0xe908('0x21')]){if(_0xa5edaa[_0xe908('0x21')][_0xe908('0x22')]===0x1f4){logger[_0xe908('0x21')]('VtigerConfiguration,\x20%s,\x20%s',_0x2f0b55,_0xa5edaa['error'][_0xe908('0x23')]);return _0x2cc656(_0xa5edaa[_0xe908('0x21')][_0xe908('0x23')]);}logger[_0xe908('0x21')](_0xe908('0x24'),_0x2f0b55,_0xa5edaa['error']['message']);return _0x4000ba(_0xa5edaa[_0xe908('0x21')][_0xe908('0x23')]);}else{logger[_0xe908('0x25')](_0xe908('0x24'),_0x2f0b55,_0xe908('0x1d'));_0x4000ba(_0xa5edaa[_0xe908('0x26')]['message']);}})[_0xe908('0x27')](function(_0x26bec7){logger['error'](_0xe908('0x24'),_0x2f0b55,_0x26bec7);_0x2cc656(_0x26bec7);});});}function respondWithStatusCode(_0x25ea98,_0x2e0e04){_0x2e0e04=_0x2e0e04||0xcc;return function(_0x522ecf){if(_0x522ecf){return _0x25ea98['sendStatus'](_0x2e0e04);}return _0x25ea98[_0xe908('0x28')](_0x2e0e04)[_0xe908('0x29')]();};}function respondWithResult(_0x39fbdb,_0x29b14c){_0x29b14c=_0x29b14c||0xc8;return function(_0x14107d){if(_0x14107d){return _0x39fbdb[_0xe908('0x28')](_0x29b14c)[_0xe908('0x2a')](_0x14107d);}};}function respondWithFilteredResult(_0x1be896,_0x48c0a4){return function(_0x76eebc){if(_0x76eebc){var _0xf8e878=_0x76eebc[_0xe908('0x2b')],_0x1101b2=_0x48c0a4[_0xe908('0x2c')],_0x4f6863=_0x48c0a4[_0xe908('0x2c')]+_0x48c0a4[_0xe908('0x2d')],_0x48655c;if(_0x4f6863>=_0xf8e878){_0x4f6863=_0xf8e878;_0x48655c=0xc8;}else{_0x48655c=0xce;}_0x1be896[_0xe908('0x28')](_0x48655c);return _0x1be896[_0xe908('0x2e')]('Content-Range',_0x1101b2+'-'+_0x4f6863+'/'+_0xf8e878)[_0xe908('0x2a')](_0x76eebc);}return null;};}function patchUpdates(_0x2129cb){return function(_0x3823fd){try{jsonpatch[_0xe908('0x2f')](_0x3823fd,_0x2129cb,!![]);}catch(_0x5c15d1){return BPromise[_0xe908('0x30')](_0x5c15d1);}return _0x3823fd[_0xe908('0x31')]();};}function saveUpdates(_0x520015,_0x4e4729){return function(_0xbf1dee){if(_0xbf1dee){return _0xbf1dee[_0xe908('0x32')](_0x520015)[_0xe908('0x33')](function(_0x16a509){return _0x16a509;});}return null;};}function removeEntity(_0x2b388f,_0x22c4bc){return function(_0x2fceea){if(_0x2fceea){return _0x2fceea[_0xe908('0x34')]()[_0xe908('0x33')](function(){_0x2b388f[_0xe908('0x28')](0xcc)[_0xe908('0x29')]();});}};}function handleEntityNotFound(_0x452adc,_0x1ce3a9){return function(_0x429529){if(!_0x429529){_0x452adc[_0xe908('0x35')](0x194);}return _0x429529;};}function handleError(_0x5290e4,_0x1f1f4a){_0x1f1f4a=_0x1f1f4a||0x1f4;return function(_0x526381){logger[_0xe908('0x21')](_0x526381[_0xe908('0x36')]);if(_0x526381['name']){delete _0x526381['name'];}_0x5290e4[_0xe908('0x28')](_0x1f1f4a)[_0xe908('0x37')](_0x526381);};}exports[_0xe908('0x38')]=function(_0x388290,_0x210c52){var _0x16047a={},_0x31da0a={},_0x6abba={'count':0x0,'rows':[]};var _0x53a7ee=_[_0xe908('0x39')](db[_0xe908('0x3a')][_0xe908('0x3b')],function(_0xca8fb9){return{'name':_0xca8fb9[_0xe908('0x3c')],'type':_0xca8fb9['type'][_0xe908('0x3d')]};});_0x31da0a[_0xe908('0x3e')]=_[_0xe908('0x39')](_0x53a7ee,_0xe908('0x3f'));_0x31da0a[_0xe908('0x40')]=_[_0xe908('0x41')](_0x388290[_0xe908('0x40')]);_0x31da0a[_0xe908('0x42')]=_[_0xe908('0x43')](_0x31da0a['model'],_0x31da0a[_0xe908('0x40')]);_0x16047a[_0xe908('0x44')]=_[_0xe908('0x43')](_0x31da0a[_0xe908('0x3e')],qs['fields'](_0x388290[_0xe908('0x40')][_0xe908('0x45')]));_0x16047a['attributes']=_0x16047a[_0xe908('0x44')][_0xe908('0x46')]?_0x16047a['attributes']:_0x31da0a[_0xe908('0x3e')];if(!_0x388290[_0xe908('0x40')][_0xe908('0x47')]('nolimit')){_0x16047a[_0xe908('0x2d')]=qs[_0xe908('0x2d')](_0x388290[_0xe908('0x40')]['limit']);_0x16047a[_0xe908('0x2c')]=qs[_0xe908('0x2c')](_0x388290[_0xe908('0x40')][_0xe908('0x2c')]);}_0x16047a[_0xe908('0x48')]=qs[_0xe908('0x49')](_0x388290[_0xe908('0x40')][_0xe908('0x49')]);_0x16047a[_0xe908('0x4a')]=qs[_0xe908('0x42')](_['pick'](_0x388290[_0xe908('0x40')],_0x31da0a[_0xe908('0x42')]));if(_0x388290['query'][_0xe908('0x4b')]){_0x16047a['where']=_[_0xe908('0x4c')](_0x16047a['where'],{'$or':_['map'](_0x53a7ee,function(_0x5869dd){if(_0x5869dd['type']!==_0xe908('0x4d')){var _0x4f718e={};_0x4f718e[_0x5869dd[_0xe908('0x3f')]]={'$like':'%'+_0x388290['query'][_0xe908('0x4b')]+'%'};return _0x4f718e;}})});}_0x16047a=_['merge']({},_0x16047a,_0x388290['options']);var _0x469f8f={'where':_0x16047a[_0xe908('0x4a')]};return db['VtigerConfiguration'][_0xe908('0x2b')](_0x469f8f)[_0xe908('0x33')](function(_0x42fefb){_0x6abba[_0xe908('0x2b')]=_0x42fefb;if(_0x388290['query'][_0xe908('0x4e')]){_0x16047a[_0xe908('0x4f')]=[{'all':!![]}];}return db[_0xe908('0x3a')][_0xe908('0x50')](_0x16047a);})[_0xe908('0x33')](function(_0x33e7e9){_0x6abba[_0xe908('0x51')]=_0x33e7e9;return _0x6abba;})[_0xe908('0x33')](respondWithFilteredResult(_0x210c52,_0x16047a))['catch'](handleError(_0x210c52,null));};exports[_0xe908('0x52')]=function(_0x497582,_0x47077c){var _0x1606da={'raw':![],'where':{'id':_0x497582['params']['id']}},_0x45cd47={};_0x45cd47['model']=_[_0xe908('0x41')](db[_0xe908('0x3a')]['rawAttributes']);_0x45cd47[_0xe908('0x40')]=_[_0xe908('0x41')](_0x497582[_0xe908('0x40')]);_0x45cd47[_0xe908('0x42')]=_[_0xe908('0x43')](_0x45cd47[_0xe908('0x3e')],_0x45cd47[_0xe908('0x40')]);_0x1606da['attributes']=_[_0xe908('0x43')](_0x45cd47[_0xe908('0x3e')],qs[_0xe908('0x45')](_0x497582[_0xe908('0x40')][_0xe908('0x45')]));_0x1606da['attributes']=_0x1606da['attributes'][_0xe908('0x46')]?_0x1606da[_0xe908('0x44')]:_0x45cd47[_0xe908('0x3e')];if(_0x497582[_0xe908('0x40')][_0xe908('0x4e')]){_0x1606da[_0xe908('0x4f')]=[{'all':!![]}];}_0x1606da=_[_0xe908('0x4c')]({},_0x1606da,_0x497582[_0xe908('0x53')]);return db['VtigerConfiguration'][_0xe908('0x54')](_0x1606da)['then'](handleEntityNotFound(_0x47077c,null))['then'](respondWithResult(_0x47077c,null))[_0xe908('0x27')](handleError(_0x47077c,null));};exports[_0xe908('0x55')]=function(_0xa73c40,_0x361d17){return db['VtigerConfiguration'][_0xe908('0x55')](_0xa73c40[_0xe908('0x56')],{})[_0xe908('0x33')](respondWithResult(_0x361d17,0xc9))['catch'](handleError(_0x361d17,null));};exports['update']=function(_0x5b590a,_0x9cafd7){if(_0x5b590a['body']['id']){delete _0x5b590a[_0xe908('0x56')]['id'];}return db[_0xe908('0x3a')][_0xe908('0x54')]({'where':{'id':_0x5b590a['params']['id']}})[_0xe908('0x33')](handleEntityNotFound(_0x9cafd7,null))['then'](saveUpdates(_0x5b590a['body'],null))[_0xe908('0x33')](respondWithResult(_0x9cafd7,null))[_0xe908('0x27')](handleError(_0x9cafd7,null));};exports[_0xe908('0x34')]=function(_0x1eee63,_0x1e50fe){return db[_0xe908('0x3a')][_0xe908('0x54')]({'where':{'id':_0x1eee63[_0xe908('0x57')]['id']}})['then'](handleEntityNotFound(_0x1e50fe,null))[_0xe908('0x33')](removeEntity(_0x1e50fe,null))['catch'](handleError(_0x1e50fe,null));};exports['getFields']=function(_0x4bae7f,_0xb7e2e8,_0xaf3bc7){var _0xeffec3={};var _0x79ce6a={};var _0x1a2363;var _0x9d3b2d;return db[_0xe908('0x3a')][_0xe908('0x58')]({'where':{'id':_0x4bae7f[_0xe908('0x57')]['id']}})[_0xe908('0x33')](handleEntityNotFound(_0xb7e2e8,null))[_0xe908('0x33')](function(_0x209314){if(_0x209314){_0x1a2363=_0x209314;_0x79ce6a[_0xe908('0x3e')]=_[_0xe908('0x41')](db['VtigerField'][_0xe908('0x3b')]);_0x79ce6a['query']=_[_0xe908('0x41')](_0x4bae7f['query']);_0x79ce6a[_0xe908('0x42')]=_[_0xe908('0x43')](_0x79ce6a[_0xe908('0x3e')],_0x79ce6a[_0xe908('0x40')]);_0xeffec3['attributes']=_[_0xe908('0x43')](_0x79ce6a[_0xe908('0x3e')],qs[_0xe908('0x45')](_0x4bae7f[_0xe908('0x40')][_0xe908('0x45')]));_0xeffec3['attributes']=_0xeffec3['attributes'][_0xe908('0x46')]?_0xeffec3['attributes']:_0x79ce6a[_0xe908('0x3e')];_0xeffec3[_0xe908('0x48')]=qs[_0xe908('0x49')](_0x4bae7f[_0xe908('0x40')]['sort']);_0xeffec3[_0xe908('0x4a')]=qs[_0xe908('0x42')](_[_0xe908('0x59')](_0x4bae7f[_0xe908('0x40')],_0x79ce6a[_0xe908('0x42')]));if(_0x4bae7f[_0xe908('0x40')][_0xe908('0x4b')]){_0xeffec3[_0xe908('0x4a')]=_['merge'](_0xeffec3[_0xe908('0x4a')],{'$or':_[_0xe908('0x39')](_0xeffec3[_0xe908('0x44')],function(_0x139fa4){var _0x3b8a1a={};_0x3b8a1a[_0x139fa4]={'$like':'%'+_0x4bae7f[_0xe908('0x40')][_0xe908('0x4b')]+'%'};return _0x3b8a1a;})});}_0xeffec3=_[_0xe908('0x4c')]({},_0xeffec3,_0x4bae7f[_0xe908('0x53')]);return _0x1a2363['getFields'](_0xeffec3);}})[_0xe908('0x33')](function(_0x207138){if(_0x207138){_0x9d3b2d=_0x207138[_0xe908('0x46')];if(!_0x4bae7f[_0xe908('0x40')][_0xe908('0x47')](_0xe908('0x5a'))){_0xeffec3[_0xe908('0x2d')]=qs[_0xe908('0x2d')](_0x4bae7f['query']['limit']);_0xeffec3[_0xe908('0x2c')]=qs['offset'](_0x4bae7f['query'][_0xe908('0x2c')]);}return _0x1a2363[_0xe908('0x5b')](_0xeffec3);}})[_0xe908('0x33')](function(_0x4f7bb4){if(_0x4f7bb4){return _0x4f7bb4?{'count':_0x9d3b2d,'rows':_0x4f7bb4}:null;}})['then'](respondWithResult(_0xb7e2e8,null))[_0xe908('0x27')](handleError(_0xb7e2e8,null));};exports['getSubjects']=function(_0x1fe320,_0x359e43,_0x35adec){var _0x575ee3={};var _0x5a1d46={};var _0x5b4e28;var _0x59a7c5;return db[_0xe908('0x3a')][_0xe908('0x58')]({'where':{'id':_0x1fe320['params']['id']}})['then'](handleEntityNotFound(_0x359e43,null))[_0xe908('0x33')](function(_0x1b8631){if(_0x1b8631){_0x5b4e28=_0x1b8631;_0x5a1d46['model']=_[_0xe908('0x41')](db[_0xe908('0x5c')][_0xe908('0x3b')]);_0x5a1d46[_0xe908('0x40')]=_['keys'](_0x1fe320[_0xe908('0x40')]);_0x5a1d46[_0xe908('0x42')]=_[_0xe908('0x43')](_0x5a1d46[_0xe908('0x3e')],_0x5a1d46['query']);_0x575ee3['attributes']=_['intersection'](_0x5a1d46[_0xe908('0x3e')],qs[_0xe908('0x45')](_0x1fe320[_0xe908('0x40')][_0xe908('0x45')]));_0x575ee3[_0xe908('0x44')]=_0x575ee3[_0xe908('0x44')][_0xe908('0x46')]?_0x575ee3['attributes']:_0x5a1d46['model'];_0x575ee3[_0xe908('0x48')]=qs[_0xe908('0x49')](_0x1fe320[_0xe908('0x40')][_0xe908('0x49')]);_0x575ee3[_0xe908('0x4a')]=qs['filters'](_[_0xe908('0x59')](_0x1fe320[_0xe908('0x40')],_0x5a1d46['filters']));if(_0x1fe320[_0xe908('0x40')][_0xe908('0x4b')]){_0x575ee3[_0xe908('0x4a')]=_[_0xe908('0x4c')](_0x575ee3[_0xe908('0x4a')],{'$or':_['map'](_0x575ee3[_0xe908('0x44')],function(_0x53f760){var _0x31441a={};_0x31441a[_0x53f760]={'$like':'%'+_0x1fe320[_0xe908('0x40')]['filter']+'%'};return _0x31441a;})});}_0x575ee3=_['merge']({},_0x575ee3,_0x1fe320[_0xe908('0x53')]);return _0x5b4e28[_0xe908('0x5d')](_0x575ee3);}})['then'](function(_0xfd6dd9){if(_0xfd6dd9){_0x59a7c5=_0xfd6dd9[_0xe908('0x46')];if(!_0x1fe320['query']['hasOwnProperty'](_0xe908('0x5a'))){_0x575ee3['limit']=qs[_0xe908('0x2d')](_0x1fe320[_0xe908('0x40')]['limit']);_0x575ee3[_0xe908('0x2c')]=qs[_0xe908('0x2c')](_0x1fe320[_0xe908('0x40')][_0xe908('0x2c')]);}return _0x5b4e28[_0xe908('0x5d')](_0x575ee3);}})[_0xe908('0x33')](function(_0xc443fa){if(_0xc443fa){return _0xc443fa?{'count':_0x59a7c5,'rows':_0xc443fa}:null;}})[_0xe908('0x33')](respondWithResult(_0x359e43,null))[_0xe908('0x27')](handleError(_0x359e43,null));};exports[_0xe908('0x5e')]=function(_0x433a0c,_0x5771a8,_0x58518a){var _0x458a54={};var _0x37bf46={};var _0x3a6c92;var _0x174cd5;return db[_0xe908('0x3a')][_0xe908('0x58')]({'where':{'id':_0x433a0c[_0xe908('0x57')]['id']}})[_0xe908('0x33')](handleEntityNotFound(_0x5771a8,null))[_0xe908('0x33')](function(_0x39a74c){if(_0x39a74c){_0x3a6c92=_0x39a74c;_0x37bf46[_0xe908('0x3e')]=_[_0xe908('0x41')](db[_0xe908('0x5c')][_0xe908('0x3b')]);_0x37bf46[_0xe908('0x40')]=_['keys'](_0x433a0c[_0xe908('0x40')]);_0x37bf46[_0xe908('0x42')]=_[_0xe908('0x43')](_0x37bf46['model'],_0x37bf46[_0xe908('0x40')]);_0x458a54[_0xe908('0x44')]=_[_0xe908('0x43')](_0x37bf46[_0xe908('0x3e')],qs[_0xe908('0x45')](_0x433a0c[_0xe908('0x40')][_0xe908('0x45')]));_0x458a54[_0xe908('0x44')]=_0x458a54[_0xe908('0x44')]['length']?_0x458a54['attributes']:_0x37bf46[_0xe908('0x3e')];_0x458a54[_0xe908('0x48')]=qs[_0xe908('0x49')](_0x433a0c[_0xe908('0x40')][_0xe908('0x49')]);_0x458a54[_0xe908('0x4a')]=qs[_0xe908('0x42')](_[_0xe908('0x59')](_0x433a0c[_0xe908('0x40')],_0x37bf46[_0xe908('0x42')]));if(_0x433a0c[_0xe908('0x40')][_0xe908('0x4b')]){_0x458a54[_0xe908('0x4a')]=_[_0xe908('0x4c')](_0x458a54['where'],{'$or':_[_0xe908('0x39')](_0x458a54[_0xe908('0x44')],function(_0x37219c){var _0x52da18={};_0x52da18[_0x37219c]={'$like':'%'+_0x433a0c['query']['filter']+'%'};return _0x52da18;})});}_0x458a54=_[_0xe908('0x4c')]({},_0x458a54,_0x433a0c[_0xe908('0x53')]);return _0x3a6c92['getDescriptions'](_0x458a54);}})[_0xe908('0x33')](function(_0x12e4be){if(_0x12e4be){_0x174cd5=_0x12e4be[_0xe908('0x46')];if(!_0x433a0c['query'][_0xe908('0x47')]('nolimit')){_0x458a54['limit']=qs[_0xe908('0x2d')](_0x433a0c[_0xe908('0x40')][_0xe908('0x2d')]);_0x458a54['offset']=qs[_0xe908('0x2c')](_0x433a0c[_0xe908('0x40')][_0xe908('0x2c')]);}return _0x3a6c92[_0xe908('0x5e')](_0x458a54);}})['then'](function(_0x13c4f5){if(_0x13c4f5){return _0x13c4f5?{'count':_0x174cd5,'rows':_0x13c4f5}:null;}})[_0xe908('0x33')](respondWithResult(_0x5771a8,null))[_0xe908('0x27')](handleError(_0x5771a8,null));};
\ No newline at end of file
+var _0x8c8e=['destroy','stack','name','index','VtigerConfiguration','rawAttributes','fieldName','type','key','model','map','query','keys','intersection','attributes','length','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','fields','catch','create','body','find','getFields','findOne','VtigerField','hasOwnProperty','getSubjects','getDescriptions','eml-format','zip-dir','request-promise','moment','bluebird','mustache','path','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','VtigerConfiguration,\x20%s,\x20%s','message','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0x8c8e,0xe7));var _0xe8c8=function(_0x425716,_0x3e9d1c){_0x425716=_0x425716-0x0;var _0x2d39af=_0x8c8e[_0x425716];return _0x2d39af;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xe8c8('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe8c8('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe8c8('0x2'));var moment=require(_0xe8c8('0x3'));var BPromise=require(_0xe8c8('0x4'));var Mustache=require(_0xe8c8('0x5'));var util=require('util');var path=require(_0xe8c8('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xe8c8('0x7'));var squel=require(_0xe8c8('0x8'));var crypto=require(_0xe8c8('0x9'));var jsforce=require(_0xe8c8('0xa'));var deskjs=require(_0xe8c8('0xb'));var toCsv=require(_0xe8c8('0xc'));var querystring=require(_0xe8c8('0xd'));var Papa=require('papaparse');var Redis=require(_0xe8c8('0xe'));var authService=require(_0xe8c8('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0xe8c8('0x10'));var hardwareService=require(_0xe8c8('0x11'));var logger=require(_0xe8c8('0x12'))(_0xe8c8('0x13'));var utils=require(_0xe8c8('0x14'));var config=require(_0xe8c8('0x15'));var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var client=jayson[_0xe8c8('0x16')][_0xe8c8('0x17')]({'port':0x232a});function checkPasswordPattern(_0x1b1808,_0x15fa1a,_0x354fab){if(_0x354fab){var _0x1c2056=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1c2056[_0xe8c8('0x18')](_0x15fa1a)){return _0x1b1808;}else{throw new db[(_0xe8c8('0x19'))][(_0xe8c8('0x1a'))](_0xe8c8('0x1b'));}}else{return _0x1b1808;}}function respondWithRpcPromise(_0x3a9fc5,_0x11edaa,_0x1e295c,_0x41ab88){return new BPromise(function(_0xad462d,_0x109575){var _0x3bef29=_0x41ab88||client;return _0x3bef29[_0xe8c8('0x1c')](_0x3a9fc5,_0x1e295c)[_0xe8c8('0x1d')](function(_0x4b9d12){logger[_0xe8c8('0x1e')]('VtigerConfiguration,\x20%s,\x20%s',_0x11edaa,'request\x20sent');logger[_0xe8c8('0x1f')](_0xe8c8('0x20'),_0x11edaa,_0xe8c8('0x21'),JSON[_0xe8c8('0x22')](_0x4b9d12));if(_0x4b9d12['error']){if(_0x4b9d12[_0xe8c8('0x23')][_0xe8c8('0x24')]===0x1f4){logger[_0xe8c8('0x23')](_0xe8c8('0x25'),_0x11edaa,_0x4b9d12[_0xe8c8('0x23')][_0xe8c8('0x26')]);return _0x109575(_0x4b9d12[_0xe8c8('0x23')]['message']);}logger[_0xe8c8('0x23')]('VtigerConfiguration,\x20%s,\x20%s',_0x11edaa,_0x4b9d12[_0xe8c8('0x23')][_0xe8c8('0x26')]);return _0xad462d(_0x4b9d12[_0xe8c8('0x23')][_0xe8c8('0x26')]);}else{logger['info'](_0xe8c8('0x25'),_0x11edaa,_0xe8c8('0x21'));_0xad462d(_0x4b9d12['result'][_0xe8c8('0x26')]);}})['catch'](function(_0x1c76f6){logger['error']('VtigerConfiguration,\x20%s,\x20%s',_0x11edaa,_0x1c76f6);_0x109575(_0x1c76f6);});});}function respondWithStatusCode(_0x5aeaf7,_0x22551a){_0x22551a=_0x22551a||0xcc;return function(_0x3393cb){if(_0x3393cb){return _0x5aeaf7[_0xe8c8('0x27')](_0x22551a);}return _0x5aeaf7[_0xe8c8('0x28')](_0x22551a)[_0xe8c8('0x29')]();};}function respondWithResult(_0x4533b6,_0x3a7223){_0x3a7223=_0x3a7223||0xc8;return function(_0x31bf5c){if(_0x31bf5c){return _0x4533b6['status'](_0x3a7223)[_0xe8c8('0x2a')](_0x31bf5c);}};}function respondWithFilteredResult(_0x9a0ad3,_0x47ca39){return function(_0x2e80f3){if(_0x2e80f3){var _0x33d230=_0x2e80f3[_0xe8c8('0x2b')],_0x3f8026=_0x47ca39[_0xe8c8('0x2c')],_0x415e01=_0x47ca39['offset']+_0x47ca39[_0xe8c8('0x2d')],_0x2e970f;if(_0x415e01>=_0x33d230){_0x415e01=_0x33d230;_0x2e970f=0xc8;}else{_0x2e970f=0xce;}_0x9a0ad3['status'](_0x2e970f);return _0x9a0ad3[_0xe8c8('0x2e')](_0xe8c8('0x2f'),_0x3f8026+'-'+_0x415e01+'/'+_0x33d230)['json'](_0x2e80f3);}return null;};}function patchUpdates(_0x544d6c){return function(_0x44fc4a){try{jsonpatch[_0xe8c8('0x30')](_0x44fc4a,_0x544d6c,!![]);}catch(_0x496245){return BPromise[_0xe8c8('0x31')](_0x496245);}return _0x44fc4a['save']();};}function saveUpdates(_0x466a4d,_0x698e78){return function(_0x39cf21){if(_0x39cf21){return _0x39cf21[_0xe8c8('0x32')](_0x466a4d)[_0xe8c8('0x1d')](function(_0x128036){return _0x128036;});}return null;};}function removeEntity(_0x3b093f,_0x1c3b1e){return function(_0x4cc683){if(_0x4cc683){return _0x4cc683[_0xe8c8('0x33')]()[_0xe8c8('0x1d')](function(){_0x3b093f[_0xe8c8('0x28')](0xcc)[_0xe8c8('0x29')]();});}};}function handleEntityNotFound(_0x3a5bb8,_0x134822){return function(_0x1805c0){if(!_0x1805c0){_0x3a5bb8[_0xe8c8('0x27')](0x194);}return _0x1805c0;};}function handleError(_0x11411c,_0x294b5e){_0x294b5e=_0x294b5e||0x1f4;return function(_0x5db3fe){logger[_0xe8c8('0x23')](_0x5db3fe[_0xe8c8('0x34')]);if(_0x5db3fe[_0xe8c8('0x35')]){delete _0x5db3fe[_0xe8c8('0x35')];}_0x11411c[_0xe8c8('0x28')](_0x294b5e)['send'](_0x5db3fe);};}exports[_0xe8c8('0x36')]=function(_0x903e76,_0x1ef5b8){var _0x3bebb6={},_0x37f0f3={},_0x17eaeb={'count':0x0,'rows':[]};var _0x226445=_['map'](db[_0xe8c8('0x37')][_0xe8c8('0x38')],function(_0x3d0f55){return{'name':_0x3d0f55[_0xe8c8('0x39')],'type':_0x3d0f55[_0xe8c8('0x3a')][_0xe8c8('0x3b')]};});_0x37f0f3[_0xe8c8('0x3c')]=_[_0xe8c8('0x3d')](_0x226445,'name');_0x37f0f3[_0xe8c8('0x3e')]=_[_0xe8c8('0x3f')](_0x903e76[_0xe8c8('0x3e')]);_0x37f0f3['filters']=_[_0xe8c8('0x40')](_0x37f0f3[_0xe8c8('0x3c')],_0x37f0f3[_0xe8c8('0x3e')]);_0x3bebb6[_0xe8c8('0x41')]=_['intersection'](_0x37f0f3['model'],qs['fields'](_0x903e76[_0xe8c8('0x3e')]['fields']));_0x3bebb6[_0xe8c8('0x41')]=_0x3bebb6[_0xe8c8('0x41')][_0xe8c8('0x42')]?_0x3bebb6[_0xe8c8('0x41')]:_0x37f0f3[_0xe8c8('0x3c')];if(!_0x903e76[_0xe8c8('0x3e')]['hasOwnProperty'](_0xe8c8('0x43'))){_0x3bebb6['limit']=qs[_0xe8c8('0x2d')](_0x903e76[_0xe8c8('0x3e')][_0xe8c8('0x2d')]);_0x3bebb6['offset']=qs[_0xe8c8('0x2c')](_0x903e76[_0xe8c8('0x3e')][_0xe8c8('0x2c')]);}_0x3bebb6[_0xe8c8('0x44')]=qs[_0xe8c8('0x45')](_0x903e76[_0xe8c8('0x3e')]['sort']);_0x3bebb6[_0xe8c8('0x46')]=qs[_0xe8c8('0x47')](_[_0xe8c8('0x48')](_0x903e76[_0xe8c8('0x3e')],_0x37f0f3['filters']));if(_0x903e76[_0xe8c8('0x3e')][_0xe8c8('0x49')]){_0x3bebb6[_0xe8c8('0x46')]=_[_0xe8c8('0x4a')](_0x3bebb6[_0xe8c8('0x46')],{'$or':_[_0xe8c8('0x3d')](_0x226445,function(_0xf3ff3c){if(_0xf3ff3c[_0xe8c8('0x3a')]!==_0xe8c8('0x4b')){var _0x5cc7fd={};_0x5cc7fd[_0xf3ff3c[_0xe8c8('0x35')]]={'$like':'%'+_0x903e76['query'][_0xe8c8('0x49')]+'%'};return _0x5cc7fd;}})});}_0x3bebb6=_['merge']({},_0x3bebb6,_0x903e76[_0xe8c8('0x4c')]);var _0x38d613={'where':_0x3bebb6[_0xe8c8('0x46')]};return db[_0xe8c8('0x37')][_0xe8c8('0x2b')](_0x38d613)['then'](function(_0x2e5a86){_0x17eaeb['count']=_0x2e5a86;if(_0x903e76[_0xe8c8('0x3e')][_0xe8c8('0x4d')]){_0x3bebb6[_0xe8c8('0x4e')]=[{'all':!![]}];}return db[_0xe8c8('0x37')][_0xe8c8('0x4f')](_0x3bebb6);})[_0xe8c8('0x1d')](function(_0xde495a){_0x17eaeb[_0xe8c8('0x50')]=_0xde495a;return _0x17eaeb;})['then'](respondWithFilteredResult(_0x1ef5b8,_0x3bebb6))['catch'](handleError(_0x1ef5b8,null));};exports[_0xe8c8('0x51')]=function(_0x9b977d,_0x4691b0){var _0x3c5634={'raw':![],'where':{'id':_0x9b977d[_0xe8c8('0x52')]['id']}},_0x310d3c={};_0x310d3c[_0xe8c8('0x3c')]=_[_0xe8c8('0x3f')](db[_0xe8c8('0x37')][_0xe8c8('0x38')]);_0x310d3c['query']=_[_0xe8c8('0x3f')](_0x9b977d[_0xe8c8('0x3e')]);_0x310d3c[_0xe8c8('0x47')]=_[_0xe8c8('0x40')](_0x310d3c[_0xe8c8('0x3c')],_0x310d3c[_0xe8c8('0x3e')]);_0x3c5634['attributes']=_[_0xe8c8('0x40')](_0x310d3c['model'],qs[_0xe8c8('0x53')](_0x9b977d['query']['fields']));_0x3c5634[_0xe8c8('0x41')]=_0x3c5634['attributes'][_0xe8c8('0x42')]?_0x3c5634[_0xe8c8('0x41')]:_0x310d3c[_0xe8c8('0x3c')];if(_0x9b977d[_0xe8c8('0x3e')][_0xe8c8('0x4d')]){_0x3c5634[_0xe8c8('0x4e')]=[{'all':!![]}];}_0x3c5634=_['merge']({},_0x3c5634,_0x9b977d['options']);return db[_0xe8c8('0x37')]['find'](_0x3c5634)[_0xe8c8('0x1d')](handleEntityNotFound(_0x4691b0,null))[_0xe8c8('0x1d')](respondWithResult(_0x4691b0,null))[_0xe8c8('0x54')](handleError(_0x4691b0,null));};exports[_0xe8c8('0x55')]=function(_0x21492d,_0x26fe34){return db[_0xe8c8('0x37')][_0xe8c8('0x55')](_0x21492d[_0xe8c8('0x56')],{})[_0xe8c8('0x1d')](respondWithResult(_0x26fe34,0xc9))[_0xe8c8('0x54')](handleError(_0x26fe34,null));};exports[_0xe8c8('0x32')]=function(_0x453d89,_0x516645){if(_0x453d89[_0xe8c8('0x56')]['id']){delete _0x453d89[_0xe8c8('0x56')]['id'];}return db[_0xe8c8('0x37')][_0xe8c8('0x57')]({'where':{'id':_0x453d89['params']['id']}})[_0xe8c8('0x1d')](handleEntityNotFound(_0x516645,null))[_0xe8c8('0x1d')](saveUpdates(_0x453d89['body'],null))['then'](respondWithResult(_0x516645,null))[_0xe8c8('0x54')](handleError(_0x516645,null));};exports[_0xe8c8('0x33')]=function(_0xa651a7,_0x2dbf69){return db[_0xe8c8('0x37')][_0xe8c8('0x57')]({'where':{'id':_0xa651a7[_0xe8c8('0x52')]['id']}})['then'](handleEntityNotFound(_0x2dbf69,null))[_0xe8c8('0x1d')](removeEntity(_0x2dbf69,null))['catch'](handleError(_0x2dbf69,null));};exports[_0xe8c8('0x58')]=function(_0x522a17,_0x3acb0e,_0x46c398){var _0x22fe6f={};var _0x3c8850={};var _0x31154e;var _0x380182;return db['VtigerConfiguration'][_0xe8c8('0x59')]({'where':{'id':_0x522a17[_0xe8c8('0x52')]['id']}})[_0xe8c8('0x1d')](handleEntityNotFound(_0x3acb0e,null))['then'](function(_0x4256e9){if(_0x4256e9){_0x31154e=_0x4256e9;_0x3c8850['model']=_['keys'](db[_0xe8c8('0x5a')]['rawAttributes']);_0x3c8850['query']=_['keys'](_0x522a17[_0xe8c8('0x3e')]);_0x3c8850[_0xe8c8('0x47')]=_[_0xe8c8('0x40')](_0x3c8850[_0xe8c8('0x3c')],_0x3c8850[_0xe8c8('0x3e')]);_0x22fe6f[_0xe8c8('0x41')]=_['intersection'](_0x3c8850[_0xe8c8('0x3c')],qs[_0xe8c8('0x53')](_0x522a17[_0xe8c8('0x3e')]['fields']));_0x22fe6f[_0xe8c8('0x41')]=_0x22fe6f['attributes'][_0xe8c8('0x42')]?_0x22fe6f['attributes']:_0x3c8850[_0xe8c8('0x3c')];_0x22fe6f[_0xe8c8('0x44')]=qs['sort'](_0x522a17[_0xe8c8('0x3e')][_0xe8c8('0x45')]);_0x22fe6f[_0xe8c8('0x46')]=qs[_0xe8c8('0x47')](_[_0xe8c8('0x48')](_0x522a17[_0xe8c8('0x3e')],_0x3c8850[_0xe8c8('0x47')]));if(_0x522a17['query'][_0xe8c8('0x49')]){_0x22fe6f[_0xe8c8('0x46')]=_['merge'](_0x22fe6f['where'],{'$or':_['map'](_0x22fe6f[_0xe8c8('0x41')],function(_0xec5b00){var _0x21349c={};_0x21349c[_0xec5b00]={'$like':'%'+_0x522a17[_0xe8c8('0x3e')]['filter']+'%'};return _0x21349c;})});}_0x22fe6f=_['merge']({},_0x22fe6f,_0x522a17[_0xe8c8('0x4c')]);return _0x31154e[_0xe8c8('0x58')](_0x22fe6f);}})[_0xe8c8('0x1d')](function(_0x22baa3){if(_0x22baa3){_0x380182=_0x22baa3[_0xe8c8('0x42')];if(!_0x522a17[_0xe8c8('0x3e')][_0xe8c8('0x5b')](_0xe8c8('0x43'))){_0x22fe6f[_0xe8c8('0x2d')]=qs[_0xe8c8('0x2d')](_0x522a17[_0xe8c8('0x3e')][_0xe8c8('0x2d')]);_0x22fe6f['offset']=qs[_0xe8c8('0x2c')](_0x522a17[_0xe8c8('0x3e')]['offset']);}return _0x31154e[_0xe8c8('0x58')](_0x22fe6f);}})[_0xe8c8('0x1d')](function(_0x184951){if(_0x184951){return _0x184951?{'count':_0x380182,'rows':_0x184951}:null;}})[_0xe8c8('0x1d')](respondWithResult(_0x3acb0e,null))[_0xe8c8('0x54')](handleError(_0x3acb0e,null));};exports[_0xe8c8('0x5c')]=function(_0x42d0bc,_0x2dab10,_0x30df6b){var _0x541c30={};var _0x53fd93={};var _0x1c3c38;var _0x5171a4;return db[_0xe8c8('0x37')][_0xe8c8('0x59')]({'where':{'id':_0x42d0bc[_0xe8c8('0x52')]['id']}})[_0xe8c8('0x1d')](handleEntityNotFound(_0x2dab10,null))[_0xe8c8('0x1d')](function(_0x2a1cdf){if(_0x2a1cdf){_0x1c3c38=_0x2a1cdf;_0x53fd93['model']=_[_0xe8c8('0x3f')](db['VtigerField'][_0xe8c8('0x38')]);_0x53fd93[_0xe8c8('0x3e')]=_[_0xe8c8('0x3f')](_0x42d0bc[_0xe8c8('0x3e')]);_0x53fd93['filters']=_[_0xe8c8('0x40')](_0x53fd93[_0xe8c8('0x3c')],_0x53fd93[_0xe8c8('0x3e')]);_0x541c30[_0xe8c8('0x41')]=_[_0xe8c8('0x40')](_0x53fd93[_0xe8c8('0x3c')],qs[_0xe8c8('0x53')](_0x42d0bc[_0xe8c8('0x3e')][_0xe8c8('0x53')]));_0x541c30[_0xe8c8('0x41')]=_0x541c30['attributes'][_0xe8c8('0x42')]?_0x541c30[_0xe8c8('0x41')]:_0x53fd93[_0xe8c8('0x3c')];_0x541c30[_0xe8c8('0x44')]=qs[_0xe8c8('0x45')](_0x42d0bc[_0xe8c8('0x3e')][_0xe8c8('0x45')]);_0x541c30[_0xe8c8('0x46')]=qs['filters'](_['pick'](_0x42d0bc[_0xe8c8('0x3e')],_0x53fd93[_0xe8c8('0x47')]));if(_0x42d0bc[_0xe8c8('0x3e')]['filter']){_0x541c30['where']=_[_0xe8c8('0x4a')](_0x541c30[_0xe8c8('0x46')],{'$or':_[_0xe8c8('0x3d')](_0x541c30[_0xe8c8('0x41')],function(_0x237d82){var _0x8a356d={};_0x8a356d[_0x237d82]={'$like':'%'+_0x42d0bc[_0xe8c8('0x3e')][_0xe8c8('0x49')]+'%'};return _0x8a356d;})});}_0x541c30=_['merge']({},_0x541c30,_0x42d0bc[_0xe8c8('0x4c')]);return _0x1c3c38[_0xe8c8('0x5c')](_0x541c30);}})[_0xe8c8('0x1d')](function(_0x5cf78b){if(_0x5cf78b){_0x5171a4=_0x5cf78b[_0xe8c8('0x42')];if(!_0x42d0bc[_0xe8c8('0x3e')]['hasOwnProperty'](_0xe8c8('0x43'))){_0x541c30['limit']=qs['limit'](_0x42d0bc['query'][_0xe8c8('0x2d')]);_0x541c30['offset']=qs['offset'](_0x42d0bc[_0xe8c8('0x3e')][_0xe8c8('0x2c')]);}return _0x1c3c38[_0xe8c8('0x5c')](_0x541c30);}})[_0xe8c8('0x1d')](function(_0x1a0ae3){if(_0x1a0ae3){return _0x1a0ae3?{'count':_0x5171a4,'rows':_0x1a0ae3}:null;}})[_0xe8c8('0x1d')](respondWithResult(_0x2dab10,null))[_0xe8c8('0x54')](handleError(_0x2dab10,null));};exports[_0xe8c8('0x5d')]=function(_0x2a9efb,_0x3d1f29,_0x3fc1e0){var _0x2bf023={};var _0x508941={};var _0xfd7cef;var _0xa8a5f5;return db['VtigerConfiguration'][_0xe8c8('0x59')]({'where':{'id':_0x2a9efb['params']['id']}})[_0xe8c8('0x1d')](handleEntityNotFound(_0x3d1f29,null))[_0xe8c8('0x1d')](function(_0x515b24){if(_0x515b24){_0xfd7cef=_0x515b24;_0x508941['model']=_[_0xe8c8('0x3f')](db[_0xe8c8('0x5a')][_0xe8c8('0x38')]);_0x508941[_0xe8c8('0x3e')]=_[_0xe8c8('0x3f')](_0x2a9efb['query']);_0x508941[_0xe8c8('0x47')]=_[_0xe8c8('0x40')](_0x508941[_0xe8c8('0x3c')],_0x508941['query']);_0x2bf023[_0xe8c8('0x41')]=_[_0xe8c8('0x40')](_0x508941['model'],qs[_0xe8c8('0x53')](_0x2a9efb['query'][_0xe8c8('0x53')]));_0x2bf023[_0xe8c8('0x41')]=_0x2bf023['attributes'][_0xe8c8('0x42')]?_0x2bf023[_0xe8c8('0x41')]:_0x508941[_0xe8c8('0x3c')];_0x2bf023['order']=qs[_0xe8c8('0x45')](_0x2a9efb[_0xe8c8('0x3e')][_0xe8c8('0x45')]);_0x2bf023['where']=qs[_0xe8c8('0x47')](_[_0xe8c8('0x48')](_0x2a9efb['query'],_0x508941[_0xe8c8('0x47')]));if(_0x2a9efb[_0xe8c8('0x3e')][_0xe8c8('0x49')]){_0x2bf023[_0xe8c8('0x46')]=_[_0xe8c8('0x4a')](_0x2bf023[_0xe8c8('0x46')],{'$or':_[_0xe8c8('0x3d')](_0x2bf023[_0xe8c8('0x41')],function(_0x3327e7){var _0x3db1b7={};_0x3db1b7[_0x3327e7]={'$like':'%'+_0x2a9efb[_0xe8c8('0x3e')][_0xe8c8('0x49')]+'%'};return _0x3db1b7;})});}_0x2bf023=_[_0xe8c8('0x4a')]({},_0x2bf023,_0x2a9efb['options']);return _0xfd7cef[_0xe8c8('0x5d')](_0x2bf023);}})[_0xe8c8('0x1d')](function(_0x16e820){if(_0x16e820){_0xa8a5f5=_0x16e820['length'];if(!_0x2a9efb['query'][_0xe8c8('0x5b')](_0xe8c8('0x43'))){_0x2bf023[_0xe8c8('0x2d')]=qs[_0xe8c8('0x2d')](_0x2a9efb[_0xe8c8('0x3e')]['limit']);_0x2bf023[_0xe8c8('0x2c')]=qs[_0xe8c8('0x2c')](_0x2a9efb[_0xe8c8('0x3e')]['offset']);}return _0xfd7cef['getDescriptions'](_0x2bf023);}})['then'](function(_0x3b557c){if(_0x3b557c){return _0x3b557c?{'count':_0xa8a5f5,'rows':_0x3b557c}:null;}})[_0xe8c8('0x1d')](respondWithResult(_0x3d1f29,null))['catch'](handleError(_0x3d1f29,null));};
\ No newline at end of file
diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js
index e8ffb71..d96fd53 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 _0x8514=['util','../../config/logger','api','moment','path','rimraf','./intVtigerConfiguration.attributes','exports','VtigerConfiguration','int_vtiger_configurations','lodash'];(function(_0x593cbd,_0x141c5b){var _0x1ea4aa=function(_0x5d42ba){while(--_0x5d42ba){_0x593cbd['push'](_0x593cbd['shift']());}};_0x1ea4aa(++_0x141c5b);}(_0x8514,0x83));var _0x4851=function(_0x435273,_0x532a88){_0x435273=_0x435273-0x0;var _0x4d0857=_0x8514[_0x435273];return _0x4d0857;};'use strict';var _=require(_0x4851('0x0'));var util=require(_0x4851('0x1'));var logger=require(_0x4851('0x2'))(_0x4851('0x3'));var moment=require(_0x4851('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4851('0x5'));var rimraf=require(_0x4851('0x6'));var config=require('../../config/environment');var attributes=require(_0x4851('0x7'));module[_0x4851('0x8')]=function(_0x27ddcc,_0x51e3c6){return _0x27ddcc['define'](_0x4851('0x9'),attributes,{'tableName':_0x4851('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8832=['rimraf','../../config/environment','./intVtigerConfiguration.attributes','exports','define','VtigerConfiguration','int_vtiger_configurations','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x1c5142,_0x30ea72){var _0x1268cb=function(_0xaa2299){while(--_0xaa2299){_0x1c5142['push'](_0x1c5142['shift']());}};_0x1268cb(++_0x30ea72);}(_0x8832,0x13b));var _0x2883=function(_0x579c21,_0x2881ab){_0x579c21=_0x579c21-0x0;var _0x5117c9=_0x8832[_0x579c21];return _0x5117c9;};'use strict';var _=require(_0x2883('0x0'));var util=require(_0x2883('0x1'));var logger=require(_0x2883('0x2'))(_0x2883('0x3'));var moment=require(_0x2883('0x4'));var BPromise=require(_0x2883('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2883('0x6'));var rimraf=require(_0x2883('0x7'));var config=require(_0x2883('0x8'));var attributes=require(_0x2883('0x9'));module[_0x2883('0xa')]=function(_0x194396,_0x365087){return _0x194396[_0x2883('0xb')](_0x2883('0xc'),attributes,{'tableName':_0x2883('0xd'),'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 5e1b8e6..4e9f35f 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 _0x66b2=['message','catch','lodash','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x2d2c16,_0x4e88b6){var _0x53f2fb=function(_0x6b6dac){while(--_0x6b6dac){_0x2d2c16['push'](_0x2d2c16['shift']());}};_0x53f2fb(++_0x4e88b6);}(_0x66b2,0x16b));var _0x266b=function(_0x18fb4c,_0x578f22){_0x18fb4c=_0x18fb4c-0x0;var _0x4a75b3=_0x66b2[_0x18fb4c];return _0x4a75b3;};'use strict';var _=require(_0x266b('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x266b('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x266b('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0x266b('0x3'))(_0x266b('0x4'));var config=require(_0x266b('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x266b('0x6')][_0x266b('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x52e0d5,_0x574be7,_0x10ec27){return new BPromise(function(_0x5b66ae,_0x11a65a){return client[_0x266b('0x8')](_0x52e0d5,_0x10ec27)[_0x266b('0x9')](function(_0x46a549){logger[_0x266b('0xa')](_0x266b('0xb'),_0x574be7,_0x266b('0xc'));logger[_0x266b('0xd')]('VtigerConfiguration,\x20%s,\x20%s,\x20%s',_0x574be7,_0x266b('0xc'),JSON[_0x266b('0xe')](_0x46a549));if(_0x46a549['error']){if(_0x46a549[_0x266b('0xf')][_0x266b('0x10')]===0x1f4){logger['error'](_0x266b('0xb'),_0x574be7,_0x46a549[_0x266b('0xf')][_0x266b('0x11')]);return _0x11a65a(_0x46a549[_0x266b('0xf')][_0x266b('0x11')]);}logger['error']('VtigerConfiguration,\x20%s,\x20%s',_0x574be7,_0x46a549[_0x266b('0xf')][_0x266b('0x11')]);return _0x5b66ae(_0x46a549[_0x266b('0xf')][_0x266b('0x11')]);}else{logger['info'](_0x266b('0xb'),_0x574be7,_0x266b('0xc'));_0x5b66ae(_0x46a549['result'][_0x266b('0x11')]);}})[_0x266b('0x12')](function(_0x5c8e77){logger['error'](_0x266b('0xb'),_0x574be7,_0x5c8e77);_0x11a65a(_0x5c8e77);});});}
\ No newline at end of file
+var _0xdb79=['../../mysqldb','../../config/utils','rpc','../../config/environment','client','request','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x37401d,_0x5846b4){var _0x789d52=function(_0x22c028){while(--_0x22c028){_0x37401d['push'](_0x37401d['shift']());}};_0x789d52(++_0x5846b4);}(_0xdb79,0xf7));var _0x9db7=function(_0x243b2f,_0x30aa15){_0x243b2f=_0x243b2f-0x0;var _0xcb3c2d=_0xdb79[_0x243b2f];return _0xcb3c2d;};'use strict';var _=require(_0x9db7('0x0'));var util=require(_0x9db7('0x1'));var moment=require(_0x9db7('0x2'));var BPromise=require(_0x9db7('0x3'));var rs=require(_0x9db7('0x4'));var fs=require('fs');var Redis=require(_0x9db7('0x5'));var db=require(_0x9db7('0x6'))['db'];var utils=require(_0x9db7('0x7'));var logger=require('../../config/logger')(_0x9db7('0x8'));var config=require(_0x9db7('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x9db7('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x43503b,_0x30049a,_0x4fb087){return new BPromise(function(_0x1c9324,_0x2efa6b){return client[_0x9db7('0xb')](_0x43503b,_0x4fb087)['then'](function(_0x3421b4){logger[_0x9db7('0xc')](_0x9db7('0xd'),_0x30049a,_0x9db7('0xe'));logger[_0x9db7('0xf')](_0x9db7('0x10'),_0x30049a,_0x9db7('0xe'),JSON[_0x9db7('0x11')](_0x3421b4));if(_0x3421b4[_0x9db7('0x12')]){if(_0x3421b4[_0x9db7('0x12')][_0x9db7('0x13')]===0x1f4){logger[_0x9db7('0x12')]('VtigerConfiguration,\x20%s,\x20%s',_0x30049a,_0x3421b4[_0x9db7('0x12')][_0x9db7('0x14')]);return _0x2efa6b(_0x3421b4[_0x9db7('0x12')][_0x9db7('0x14')]);}logger[_0x9db7('0x12')](_0x9db7('0xd'),_0x30049a,_0x3421b4[_0x9db7('0x12')][_0x9db7('0x14')]);return _0x1c9324(_0x3421b4[_0x9db7('0x12')][_0x9db7('0x14')]);}else{logger[_0x9db7('0xc')]('VtigerConfiguration,\x20%s,\x20%s',_0x30049a,_0x9db7('0xe'));_0x1c9324(_0x3421b4[_0x9db7('0x15')][_0x9db7('0x14')]);}})[_0x9db7('0x16')](function(_0x189115){logger[_0x9db7('0x12')](_0x9db7('0xd'),_0x30049a,_0x189115);_0x2efa6b(_0x189115);});});}
\ No newline at end of file
diff --git a/server/api/intVtigerField/index.js b/server/api/intVtigerField/index.js
index 9b0c8f9..be44a51 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 _0x478d=['../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','show','post','update','destroy','multer','util','path','express','Router','../../components/auth/service'];(function(_0x56fbf6,_0x415e02){var _0x14eb2c=function(_0x17ee40){while(--_0x17ee40){_0x56fbf6['push'](_0x56fbf6['shift']());}};_0x14eb2c(++_0x415e02);}(_0x478d,0x162));var _0xd478=function(_0x2ae523,_0x46982e){_0x2ae523=_0x2ae523-0x0;var _0x1fa262=_0x478d[_0x2ae523];return _0x1fa262;};'use strict';var multer=require(_0xd478('0x0'));var util=require(_0xd478('0x1'));var path=require(_0xd478('0x2'));var timeout=require('connect-timeout');var express=require(_0xd478('0x3'));var router=express[_0xd478('0x4')]();var auth=require(_0xd478('0x5'));var interaction=require(_0xd478('0x6'));var config=require(_0xd478('0x7'));var controller=require('./intVtigerField.controller');router[_0xd478('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0xd478('0x9'),auth[_0xd478('0xa')](),controller[_0xd478('0xb')]);router[_0xd478('0xc')]('/',auth[_0xd478('0xa')](),controller['create']);router['put'](_0xd478('0x9'),auth['isAuthenticated'](),controller[_0xd478('0xd')]);router['delete'](_0xd478('0x9'),auth[_0xd478('0xa')](),controller[_0xd478('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0x041b=['destroy','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerField.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete'];(function(_0x2a8c21,_0x163576){var _0x5f3061=function(_0x4dc8eb){while(--_0x4dc8eb){_0x2a8c21['push'](_0x2a8c21['shift']());}};_0x5f3061(++_0x163576);}(_0x041b,0x131));var _0xb041=function(_0x8d0548,_0x4b9c70){_0x8d0548=_0x8d0548-0x0;var _0x383d57=_0x041b[_0x8d0548];return _0x383d57;};'use strict';var multer=require(_0xb041('0x0'));var util=require(_0xb041('0x1'));var path=require(_0xb041('0x2'));var timeout=require(_0xb041('0x3'));var express=require('express');var router=express[_0xb041('0x4')]();var auth=require(_0xb041('0x5'));var interaction=require(_0xb041('0x6'));var config=require(_0xb041('0x7'));var controller=require(_0xb041('0x8'));router[_0xb041('0x9')]('/',auth[_0xb041('0xa')](),controller[_0xb041('0xb')]);router[_0xb041('0x9')](_0xb041('0xc'),auth[_0xb041('0xa')](),controller[_0xb041('0xd')]);router[_0xb041('0xe')]('/',auth[_0xb041('0xa')](),controller[_0xb041('0xf')]);router[_0xb041('0x10')](_0xb041('0xc'),auth[_0xb041('0xa')](),controller['update']);router[_0xb041('0x11')](_0xb041('0xc'),auth[_0xb041('0xa')](),controller[_0xb041('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/intVtigerField/intVtigerField.attributes.js b/server/api/intVtigerField/intVtigerField.attributes.js
index 0fff180..891fd3a 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 _0x3f7d=['exports','ENUM','variable','keyValue','string','STRING','customVariable','BOOLEAN','sequelize'];(function(_0x44ff66,_0x27f548){var _0x136331=function(_0x4c14b5){while(--_0x4c14b5){_0x44ff66['push'](_0x44ff66['shift']());}};_0x136331(++_0x27f548);}(_0x3f7d,0x18b));var _0xd3f7=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3f7d[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0xd3f7('0x0'));module[_0xd3f7('0x1')]={'type':{'type':Sequelize[_0xd3f7('0x2')]('string',_0xd3f7('0x3'),'customVariable',_0xd3f7('0x4')),'defaultValue':_0xd3f7('0x5')},'content':{'type':Sequelize[_0xd3f7('0x6')]},'key':{'type':Sequelize[_0xd3f7('0x6')]},'keyType':{'type':Sequelize[_0xd3f7('0x2')](_0xd3f7('0x5'),_0xd3f7('0x3'),_0xd3f7('0x7'))},'keyContent':{'type':Sequelize[_0xd3f7('0x6')]},'idField':{'type':Sequelize[_0xd3f7('0x6')]},'nameField':{'type':Sequelize[_0xd3f7('0x6')]},'customField':{'type':Sequelize[_0xd3f7('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x72b1=['string','variable','customVariable','keyValue','STRING','BOOLEAN','sequelize','ENUM'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0x72b1,0x16e));var _0x172b=function(_0x484b90,_0x2b8052){_0x484b90=_0x484b90-0x0;var _0x1394d6=_0x72b1[_0x484b90];return _0x1394d6;};'use strict';var Sequelize=require(_0x172b('0x0'));module['exports']={'type':{'type':Sequelize[_0x172b('0x1')](_0x172b('0x2'),_0x172b('0x3'),_0x172b('0x4'),_0x172b('0x5')),'defaultValue':_0x172b('0x2')},'content':{'type':Sequelize[_0x172b('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x172b('0x1')](_0x172b('0x2'),_0x172b('0x3'),_0x172b('0x4'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x172b('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x172b('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intVtigerField/intVtigerField.controller.js b/server/api/intVtigerField/intVtigerField.controller.js
index f07a23c..9ae29d5 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 _0x7ae3=['name','send','rawAttributes','fieldName','type','map','query','keys','filters','attributes','intersection','model','fields','length','hasOwnProperty','limit','sort','filter','where','VIRTUAL','merge','options','VtigerField','includeAll','findAll','rows','catch','params','include','find','create','body','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','apply','reject','save','update','then','destroy','error','stack'];(function(_0xcec8c7,_0x17a20e){var _0x527f8a=function(_0x3c47fa){while(--_0x3c47fa){_0xcec8c7['push'](_0xcec8c7['shift']());}};_0x527f8a(++_0x17a20e);}(_0x7ae3,0xac));var _0x37ae=function(_0x3cfb8d,_0x18fcbe){_0x3cfb8d=_0x3cfb8d-0x0;var _0x2d4270=_0x7ae3[_0x3cfb8d];return _0x2d4270;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x37ae('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x37ae('0x1'));var jsonpatch=require(_0x37ae('0x2'));var rp=require(_0x37ae('0x3'));var moment=require(_0x37ae('0x4'));var BPromise=require(_0x37ae('0x5'));var Mustache=require(_0x37ae('0x6'));var util=require(_0x37ae('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x37ae('0x8'));var ejs=require(_0x37ae('0x9'));var fs=require('fs');var _=require(_0x37ae('0xa'));var squel=require(_0x37ae('0xb'));var crypto=require('crypto');var jsforce=require(_0x37ae('0xc'));var deskjs=require(_0x37ae('0xd'));var toCsv=require('to-csv');var querystring=require(_0x37ae('0xe'));var Papa=require(_0x37ae('0xf'));var Redis=require(_0x37ae('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x37ae('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x37ae('0x12'));var logger=require(_0x37ae('0x13'))(_0x37ae('0x14'));var utils=require('../../config/utils');var config=require(_0x37ae('0x15'));var db=require(_0x37ae('0x16'))['db'];function respondWithStatusCode(_0x5bf87f,_0x51cde5){_0x51cde5=_0x51cde5||0xcc;return function(_0x51b5a4){if(_0x51b5a4){return _0x5bf87f[_0x37ae('0x17')](_0x51cde5);}return _0x5bf87f[_0x37ae('0x18')](_0x51cde5)[_0x37ae('0x19')]();};}function respondWithResult(_0x2084f0,_0x5574ce){_0x5574ce=_0x5574ce||0xc8;return function(_0x2725cc){if(_0x2725cc){return _0x2084f0[_0x37ae('0x18')](_0x5574ce)[_0x37ae('0x1a')](_0x2725cc);}};}function respondWithFilteredResult(_0x33de00,_0x48a97c){return function(_0x446dfb){if(_0x446dfb){var _0x5f2625=_0x446dfb[_0x37ae('0x1b')],_0x26ba79=_0x48a97c[_0x37ae('0x1c')],_0x3c2431=_0x48a97c[_0x37ae('0x1c')]+_0x48a97c['limit'],_0x4a8af6;if(_0x3c2431>=_0x5f2625){_0x3c2431=_0x5f2625;_0x4a8af6=0xc8;}else{_0x4a8af6=0xce;}_0x33de00[_0x37ae('0x18')](_0x4a8af6);return _0x33de00[_0x37ae('0x1d')]('Content-Range',_0x26ba79+'-'+_0x3c2431+'/'+_0x5f2625)[_0x37ae('0x1a')](_0x446dfb);}return null;};}function patchUpdates(_0x13f6e8){return function(_0x5378e8){try{jsonpatch[_0x37ae('0x1e')](_0x5378e8,_0x13f6e8,!![]);}catch(_0x3f55af){return BPromise[_0x37ae('0x1f')](_0x3f55af);}return _0x5378e8[_0x37ae('0x20')]();};}function saveUpdates(_0x546792,_0x5c23e1){return function(_0x49c999){if(_0x49c999){return _0x49c999[_0x37ae('0x21')](_0x546792)[_0x37ae('0x22')](function(_0x3863e9){return _0x3863e9;});}return null;};}function removeEntity(_0x1875f4,_0x45658a){return function(_0x5ee16a){if(_0x5ee16a){return _0x5ee16a[_0x37ae('0x23')]()[_0x37ae('0x22')](function(){_0x1875f4[_0x37ae('0x18')](0xcc)[_0x37ae('0x19')]();});}};}function handleEntityNotFound(_0x1e5d1d,_0x133757){return function(_0x4f8fc8){if(!_0x4f8fc8){_0x1e5d1d['sendStatus'](0x194);}return _0x4f8fc8;};}function handleError(_0x18cb74,_0xbe64de){_0xbe64de=_0xbe64de||0x1f4;return function(_0x1ff7fe){logger[_0x37ae('0x24')](_0x1ff7fe[_0x37ae('0x25')]);if(_0x1ff7fe[_0x37ae('0x26')]){delete _0x1ff7fe[_0x37ae('0x26')];}_0x18cb74['status'](_0xbe64de)[_0x37ae('0x27')](_0x1ff7fe);};}exports['index']=function(_0xe61f2,_0x36a31a){var _0x2c7156={},_0x587fa0={},_0x20386e={'count':0x0,'rows':[]};var _0x184405=_['map'](db['VtigerField'][_0x37ae('0x28')],function(_0x7fa48c){return{'name':_0x7fa48c[_0x37ae('0x29')],'type':_0x7fa48c[_0x37ae('0x2a')]['key']};});_0x587fa0['model']=_[_0x37ae('0x2b')](_0x184405,_0x37ae('0x26'));_0x587fa0[_0x37ae('0x2c')]=_[_0x37ae('0x2d')](_0xe61f2[_0x37ae('0x2c')]);_0x587fa0[_0x37ae('0x2e')]=_['intersection'](_0x587fa0['model'],_0x587fa0[_0x37ae('0x2c')]);_0x2c7156[_0x37ae('0x2f')]=_[_0x37ae('0x30')](_0x587fa0[_0x37ae('0x31')],qs[_0x37ae('0x32')](_0xe61f2[_0x37ae('0x2c')]['fields']));_0x2c7156['attributes']=_0x2c7156[_0x37ae('0x2f')][_0x37ae('0x33')]?_0x2c7156[_0x37ae('0x2f')]:_0x587fa0[_0x37ae('0x31')];if(!_0xe61f2[_0x37ae('0x2c')][_0x37ae('0x34')]('nolimit')){_0x2c7156[_0x37ae('0x35')]=qs[_0x37ae('0x35')](_0xe61f2['query']['limit']);_0x2c7156[_0x37ae('0x1c')]=qs[_0x37ae('0x1c')](_0xe61f2[_0x37ae('0x2c')]['offset']);}_0x2c7156['order']=qs[_0x37ae('0x36')](_0xe61f2['query'][_0x37ae('0x36')]);_0x2c7156['where']=qs[_0x37ae('0x2e')](_['pick'](_0xe61f2[_0x37ae('0x2c')],_0x587fa0['filters']));if(_0xe61f2[_0x37ae('0x2c')][_0x37ae('0x37')]){_0x2c7156[_0x37ae('0x38')]=_['merge'](_0x2c7156[_0x37ae('0x38')],{'$or':_[_0x37ae('0x2b')](_0x184405,function(_0xb7762f){if(_0xb7762f[_0x37ae('0x2a')]!==_0x37ae('0x39')){var _0x2ddcfd={};_0x2ddcfd[_0xb7762f[_0x37ae('0x26')]]={'$like':'%'+_0xe61f2[_0x37ae('0x2c')]['filter']+'%'};return _0x2ddcfd;}})});}_0x2c7156=_[_0x37ae('0x3a')]({},_0x2c7156,_0xe61f2[_0x37ae('0x3b')]);var _0x5e7bb5={'where':_0x2c7156[_0x37ae('0x38')]};return db[_0x37ae('0x3c')]['count'](_0x5e7bb5)[_0x37ae('0x22')](function(_0xa3fa18){_0x20386e[_0x37ae('0x1b')]=_0xa3fa18;if(_0xe61f2[_0x37ae('0x2c')][_0x37ae('0x3d')]){_0x2c7156['include']=[{'all':!![]}];}return db[_0x37ae('0x3c')][_0x37ae('0x3e')](_0x2c7156);})[_0x37ae('0x22')](function(_0x1e947f){_0x20386e[_0x37ae('0x3f')]=_0x1e947f;return _0x20386e;})[_0x37ae('0x22')](respondWithFilteredResult(_0x36a31a,_0x2c7156))[_0x37ae('0x40')](handleError(_0x36a31a,null));};exports['show']=function(_0x1fb36d,_0x3f7a75){var _0x135aca={'raw':!![],'where':{'id':_0x1fb36d[_0x37ae('0x41')]['id']}},_0x2abd4a={};_0x2abd4a[_0x37ae('0x31')]=_[_0x37ae('0x2d')](db[_0x37ae('0x3c')][_0x37ae('0x28')]);_0x2abd4a['query']=_[_0x37ae('0x2d')](_0x1fb36d['query']);_0x2abd4a['filters']=_['intersection'](_0x2abd4a['model'],_0x2abd4a['query']);_0x135aca[_0x37ae('0x2f')]=_[_0x37ae('0x30')](_0x2abd4a[_0x37ae('0x31')],qs[_0x37ae('0x32')](_0x1fb36d[_0x37ae('0x2c')][_0x37ae('0x32')]));_0x135aca[_0x37ae('0x2f')]=_0x135aca[_0x37ae('0x2f')][_0x37ae('0x33')]?_0x135aca['attributes']:_0x2abd4a[_0x37ae('0x31')];if(_0x1fb36d[_0x37ae('0x2c')]['includeAll']){_0x135aca[_0x37ae('0x42')]=[{'all':!![]}];}_0x135aca=_[_0x37ae('0x3a')]({},_0x135aca,_0x1fb36d[_0x37ae('0x3b')]);return db[_0x37ae('0x3c')][_0x37ae('0x43')](_0x135aca)[_0x37ae('0x22')](handleEntityNotFound(_0x3f7a75,null))[_0x37ae('0x22')](respondWithResult(_0x3f7a75,null))['catch'](handleError(_0x3f7a75,null));};exports[_0x37ae('0x44')]=function(_0x3f73c1,_0x2d10f2){return db[_0x37ae('0x3c')][_0x37ae('0x44')](_0x3f73c1[_0x37ae('0x45')],{})[_0x37ae('0x22')](respondWithResult(_0x2d10f2,0xc9))[_0x37ae('0x40')](handleError(_0x2d10f2,null));};exports['update']=function(_0x56c3ba,_0x26a0de){if(_0x56c3ba[_0x37ae('0x45')]['id']){delete _0x56c3ba['body']['id'];}return db[_0x37ae('0x3c')]['find']({'where':{'id':_0x56c3ba[_0x37ae('0x41')]['id']}})[_0x37ae('0x22')](handleEntityNotFound(_0x26a0de,null))[_0x37ae('0x22')](saveUpdates(_0x56c3ba[_0x37ae('0x45')],null))[_0x37ae('0x22')](respondWithResult(_0x26a0de,null))[_0x37ae('0x40')](handleError(_0x26a0de,null));};exports['destroy']=function(_0x359eee,_0x2a164e){return db[_0x37ae('0x3c')][_0x37ae('0x43')]({'where':{'id':_0x359eee['params']['id']}})[_0x37ae('0x22')](handleEntityNotFound(_0x2a164e,null))[_0x37ae('0x22')](removeEntity(_0x2a164e,null))[_0x37ae('0x40')](handleError(_0x2a164e,null));};
\ No newline at end of file
+var _0x4789=['../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','merge','filter','options','includeAll','include','findAll','rows','show','params','keys','VtigerField','find','catch','create','body','destroy','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service'];(function(_0x40a446,_0x5e43d4){var _0x445050=function(_0x34255a){while(--_0x34255a){_0x40a446['push'](_0x40a446['shift']());}};_0x445050(++_0x5e43d4);}(_0x4789,0x81));var _0x9478=function(_0x5ff517,_0x3e4ee0){_0x5ff517=_0x5ff517-0x0;var _0x19a245=_0x4789[_0x5ff517];return _0x19a245;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x9478('0x0'));var zipdir=require(_0x9478('0x1'));var jsonpatch=require(_0x9478('0x2'));var rp=require(_0x9478('0x3'));var moment=require('moment');var BPromise=require(_0x9478('0x4'));var Mustache=require(_0x9478('0x5'));var util=require(_0x9478('0x6'));var path=require(_0x9478('0x7'));var sox=require('sox');var csv=require(_0x9478('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x9478('0x9'));var squel=require(_0x9478('0xa'));var crypto=require(_0x9478('0xb'));var jsforce=require(_0x9478('0xc'));var deskjs=require(_0x9478('0xd'));var toCsv=require(_0x9478('0x8'));var querystring=require(_0x9478('0xe'));var Papa=require(_0x9478('0xf'));var Redis=require('ioredis');var authService=require(_0x9478('0x10'));var qs=require(_0x9478('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9478('0x12'));var logger=require('../../config/logger')(_0x9478('0x13'));var utils=require(_0x9478('0x14'));var config=require(_0x9478('0x15'));var db=require(_0x9478('0x16'))['db'];function respondWithStatusCode(_0x9750f6,_0xa56a1c){_0xa56a1c=_0xa56a1c||0xcc;return function(_0x5af677){if(_0x5af677){return _0x9750f6[_0x9478('0x17')](_0xa56a1c);}return _0x9750f6[_0x9478('0x18')](_0xa56a1c)[_0x9478('0x19')]();};}function respondWithResult(_0x28fde8,_0x50d1d1){_0x50d1d1=_0x50d1d1||0xc8;return function(_0x1d12d2){if(_0x1d12d2){return _0x28fde8[_0x9478('0x18')](_0x50d1d1)[_0x9478('0x1a')](_0x1d12d2);}};}function respondWithFilteredResult(_0x56fdf9,_0xe2915d){return function(_0x2ccf25){if(_0x2ccf25){var _0x4e03cb=_0x2ccf25[_0x9478('0x1b')],_0x27b6c5=_0xe2915d[_0x9478('0x1c')],_0x2ce73d=_0xe2915d['offset']+_0xe2915d[_0x9478('0x1d')],_0x2395da;if(_0x2ce73d>=_0x4e03cb){_0x2ce73d=_0x4e03cb;_0x2395da=0xc8;}else{_0x2395da=0xce;}_0x56fdf9[_0x9478('0x18')](_0x2395da);return _0x56fdf9[_0x9478('0x1e')](_0x9478('0x1f'),_0x27b6c5+'-'+_0x2ce73d+'/'+_0x4e03cb)[_0x9478('0x1a')](_0x2ccf25);}return null;};}function patchUpdates(_0x295b50){return function(_0xd65387){try{jsonpatch['apply'](_0xd65387,_0x295b50,!![]);}catch(_0x5da198){return BPromise[_0x9478('0x20')](_0x5da198);}return _0xd65387[_0x9478('0x21')]();};}function saveUpdates(_0x5106c2,_0x32f6cf){return function(_0x41942d){if(_0x41942d){return _0x41942d[_0x9478('0x22')](_0x5106c2)['then'](function(_0x49f890){return _0x49f890;});}return null;};}function removeEntity(_0x5a0da1,_0x4a5009){return function(_0x44d178){if(_0x44d178){return _0x44d178['destroy']()[_0x9478('0x23')](function(){_0x5a0da1[_0x9478('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x352def,_0x1b40c5){return function(_0x1047cf){if(!_0x1047cf){_0x352def['sendStatus'](0x194);}return _0x1047cf;};}function handleError(_0x3487cf,_0x230c78){_0x230c78=_0x230c78||0x1f4;return function(_0x55f0b3){logger['error'](_0x55f0b3[_0x9478('0x24')]);if(_0x55f0b3[_0x9478('0x25')]){delete _0x55f0b3[_0x9478('0x25')];}_0x3487cf[_0x9478('0x18')](_0x230c78)[_0x9478('0x26')](_0x55f0b3);};}exports[_0x9478('0x27')]=function(_0x4fec12,_0x452c07){var _0xdf528b={},_0x1a021a={},_0x1feb5d={'count':0x0,'rows':[]};var _0xee6044=_[_0x9478('0x28')](db['VtigerField'][_0x9478('0x29')],function(_0x2a68c5){return{'name':_0x2a68c5[_0x9478('0x2a')],'type':_0x2a68c5[_0x9478('0x2b')][_0x9478('0x2c')]};});_0x1a021a[_0x9478('0x2d')]=_[_0x9478('0x28')](_0xee6044,'name');_0x1a021a['query']=_['keys'](_0x4fec12[_0x9478('0x2e')]);_0x1a021a[_0x9478('0x2f')]=_[_0x9478('0x30')](_0x1a021a[_0x9478('0x2d')],_0x1a021a[_0x9478('0x2e')]);_0xdf528b[_0x9478('0x31')]=_[_0x9478('0x30')](_0x1a021a[_0x9478('0x2d')],qs[_0x9478('0x32')](_0x4fec12['query']['fields']));_0xdf528b[_0x9478('0x31')]=_0xdf528b[_0x9478('0x31')][_0x9478('0x33')]?_0xdf528b[_0x9478('0x31')]:_0x1a021a[_0x9478('0x2d')];if(!_0x4fec12['query']['hasOwnProperty'](_0x9478('0x34'))){_0xdf528b[_0x9478('0x1d')]=qs[_0x9478('0x1d')](_0x4fec12['query']['limit']);_0xdf528b[_0x9478('0x1c')]=qs[_0x9478('0x1c')](_0x4fec12['query']['offset']);}_0xdf528b[_0x9478('0x35')]=qs[_0x9478('0x36')](_0x4fec12['query']['sort']);_0xdf528b[_0x9478('0x37')]=qs['filters'](_[_0x9478('0x38')](_0x4fec12[_0x9478('0x2e')],_0x1a021a['filters']));if(_0x4fec12[_0x9478('0x2e')]['filter']){_0xdf528b['where']=_[_0x9478('0x39')](_0xdf528b[_0x9478('0x37')],{'$or':_[_0x9478('0x28')](_0xee6044,function(_0x5a333f){if(_0x5a333f[_0x9478('0x2b')]!=='VIRTUAL'){var _0x540aac={};_0x540aac[_0x5a333f['name']]={'$like':'%'+_0x4fec12['query'][_0x9478('0x3a')]+'%'};return _0x540aac;}})});}_0xdf528b=_[_0x9478('0x39')]({},_0xdf528b,_0x4fec12[_0x9478('0x3b')]);var _0x4c808b={'where':_0xdf528b[_0x9478('0x37')]};return db['VtigerField']['count'](_0x4c808b)[_0x9478('0x23')](function(_0x3b2761){_0x1feb5d['count']=_0x3b2761;if(_0x4fec12['query'][_0x9478('0x3c')]){_0xdf528b[_0x9478('0x3d')]=[{'all':!![]}];}return db['VtigerField'][_0x9478('0x3e')](_0xdf528b);})[_0x9478('0x23')](function(_0x1980ad){_0x1feb5d[_0x9478('0x3f')]=_0x1980ad;return _0x1feb5d;})['then'](respondWithFilteredResult(_0x452c07,_0xdf528b))['catch'](handleError(_0x452c07,null));};exports[_0x9478('0x40')]=function(_0xbc9f49,_0x2ff89e){var _0x307fed={'raw':!![],'where':{'id':_0xbc9f49[_0x9478('0x41')]['id']}},_0x4de932={};_0x4de932[_0x9478('0x2d')]=_[_0x9478('0x42')](db['VtigerField'][_0x9478('0x29')]);_0x4de932[_0x9478('0x2e')]=_[_0x9478('0x42')](_0xbc9f49[_0x9478('0x2e')]);_0x4de932[_0x9478('0x2f')]=_[_0x9478('0x30')](_0x4de932[_0x9478('0x2d')],_0x4de932[_0x9478('0x2e')]);_0x307fed[_0x9478('0x31')]=_[_0x9478('0x30')](_0x4de932[_0x9478('0x2d')],qs[_0x9478('0x32')](_0xbc9f49[_0x9478('0x2e')][_0x9478('0x32')]));_0x307fed[_0x9478('0x31')]=_0x307fed['attributes'][_0x9478('0x33')]?_0x307fed[_0x9478('0x31')]:_0x4de932[_0x9478('0x2d')];if(_0xbc9f49[_0x9478('0x2e')]['includeAll']){_0x307fed['include']=[{'all':!![]}];}_0x307fed=_[_0x9478('0x39')]({},_0x307fed,_0xbc9f49['options']);return db[_0x9478('0x43')][_0x9478('0x44')](_0x307fed)[_0x9478('0x23')](handleEntityNotFound(_0x2ff89e,null))[_0x9478('0x23')](respondWithResult(_0x2ff89e,null))[_0x9478('0x45')](handleError(_0x2ff89e,null));};exports[_0x9478('0x46')]=function(_0x5a8e9e,_0x8a2ab9){return db[_0x9478('0x43')][_0x9478('0x46')](_0x5a8e9e[_0x9478('0x47')],{})[_0x9478('0x23')](respondWithResult(_0x8a2ab9,0xc9))['catch'](handleError(_0x8a2ab9,null));};exports[_0x9478('0x22')]=function(_0x3d8ad2,_0x506f6c){if(_0x3d8ad2[_0x9478('0x47')]['id']){delete _0x3d8ad2['body']['id'];}return db[_0x9478('0x43')][_0x9478('0x44')]({'where':{'id':_0x3d8ad2['params']['id']}})[_0x9478('0x23')](handleEntityNotFound(_0x506f6c,null))['then'](saveUpdates(_0x3d8ad2[_0x9478('0x47')],null))[_0x9478('0x23')](respondWithResult(_0x506f6c,null))[_0x9478('0x45')](handleError(_0x506f6c,null));};exports[_0x9478('0x48')]=function(_0xbd5b4,_0x131996){return db['VtigerField'][_0x9478('0x44')]({'where':{'id':_0xbd5b4[_0x9478('0x41')]['id']}})[_0x9478('0x23')](handleEntityNotFound(_0x131996,null))['then'](removeEntity(_0x131996,null))[_0x9478('0x45')](handleError(_0x131996,null));};
\ No newline at end of file
diff --git a/server/api/intVtigerField/intVtigerField.model.js b/server/api/intVtigerField/intVtigerField.model.js
index 4e912a6..00fba50 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 _0x9957=['rimraf','./intVtigerField.attributes','exports','define','VtigerField','vtiger_unique_index','idField','lodash','util','../../config/logger','api','bluebird','request-promise','path'];(function(_0x2faddb,_0xc18b78){var _0x273c05=function(_0x1a3785){while(--_0x1a3785){_0x2faddb['push'](_0x2faddb['shift']());}};_0x273c05(++_0xc18b78);}(_0x9957,0x93));var _0x7995=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9957[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'int_vtiger_fields','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xd'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x7a54=['int_vtiger_fields','idField','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./intVtigerField.attributes','exports','VtigerField'];(function(_0x52c043,_0x30d33b){var _0x450183=function(_0x3eade1){while(--_0x3eade1){_0x52c043['push'](_0x52c043['shift']());}};_0x450183(++_0x30d33b);}(_0x7a54,0x106));var _0x47a5=function(_0x59b0cd,_0x1e6ca6){_0x59b0cd=_0x59b0cd-0x0;var _0x1fcc7b=_0x7a54[_0x59b0cd];return _0x1fcc7b;};'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':'vtiger_unique_index','fields':[_0x47a5('0xc'),'FieldId'],'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 3267e13..6ce8a4d 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 _0x6f54=['request\x20sent','debug','VtigerField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request','then','info','VtigerField,\x20%s,\x20%s'];(function(_0x5100e9,_0x2c8954){var _0x5c7d2e=function(_0x35766f){while(--_0x35766f){_0x5100e9['push'](_0x5100e9['shift']());}};_0x5c7d2e(++_0x2c8954);}(_0x6f54,0xcf));var _0x46f5=function(_0x4cb791,_0x36c51c){_0x4cb791=_0x4cb791-0x0;var _0x47d0ad=_0x6f54[_0x4cb791];return _0x47d0ad;};'use strict';var _=require(_0x46f5('0x0'));var util=require(_0x46f5('0x1'));var moment=require(_0x46f5('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x46f5('0x3'));var db=require(_0x46f5('0x4'))['db'];var utils=require(_0x46f5('0x5'));var logger=require(_0x46f5('0x6'))('rpc');var config=require(_0x46f5('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x46f5('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x576e52,_0x30d52f,_0x2ef094){return new BPromise(function(_0x227a68,_0x3a2939){return client[_0x46f5('0x9')](_0x576e52,_0x2ef094)[_0x46f5('0xa')](function(_0x927efa){logger[_0x46f5('0xb')](_0x46f5('0xc'),_0x30d52f,_0x46f5('0xd'));logger[_0x46f5('0xe')](_0x46f5('0xf'),_0x30d52f,_0x46f5('0xd'),JSON[_0x46f5('0x10')](_0x927efa));if(_0x927efa['error']){if(_0x927efa[_0x46f5('0x11')][_0x46f5('0x12')]===0x1f4){logger[_0x46f5('0x11')]('VtigerField,\x20%s,\x20%s',_0x30d52f,_0x927efa[_0x46f5('0x11')][_0x46f5('0x13')]);return _0x3a2939(_0x927efa['error'][_0x46f5('0x13')]);}logger[_0x46f5('0x11')](_0x46f5('0xc'),_0x30d52f,_0x927efa[_0x46f5('0x11')]['message']);return _0x227a68(_0x927efa['error'][_0x46f5('0x13')]);}else{logger[_0x46f5('0xb')](_0x46f5('0xc'),_0x30d52f,_0x46f5('0xd'));_0x227a68(_0x927efa[_0x46f5('0x14')][_0x46f5('0x13')]);}})[_0x46f5('0x15')](function(_0x444756){logger[_0x46f5('0x11')](_0x46f5('0xc'),_0x30d52f,_0x444756);_0x3a2939(_0x444756);});});}
\ No newline at end of file
+var _0xe9e8=['info','VtigerField,\x20%s,\x20%s','debug','VtigerField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request'];(function(_0x36e40e,_0x27dbd3){var _0x582c00=function(_0x150b44){while(--_0x150b44){_0x36e40e['push'](_0x36e40e['shift']());}};_0x582c00(++_0x27dbd3);}(_0xe9e8,0x6b));var _0x8e9e=function(_0x5e465d,_0x1d6c1c){_0x5e465d=_0x5e465d-0x0;var _0x44a890=_0xe9e8[_0x5e465d];return _0x44a890;};'use strict';var _=require(_0x8e9e('0x0'));var util=require(_0x8e9e('0x1'));var moment=require(_0x8e9e('0x2'));var BPromise=require(_0x8e9e('0x3'));var rs=require(_0x8e9e('0x4'));var fs=require('fs');var Redis=require(_0x8e9e('0x5'));var db=require(_0x8e9e('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x8e9e('0x7'))(_0x8e9e('0x8'));var config=require(_0x8e9e('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x8e9e('0xa')][_0x8e9e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x204f5c,_0x1fb8d3,_0x58f822){return new BPromise(function(_0x3b5d21,_0x2ae896){return client[_0x8e9e('0xc')](_0x204f5c,_0x58f822)['then'](function(_0x39f5e5){logger[_0x8e9e('0xd')](_0x8e9e('0xe'),_0x1fb8d3,'request\x20sent');logger[_0x8e9e('0xf')](_0x8e9e('0x10'),_0x1fb8d3,_0x8e9e('0x11'),JSON[_0x8e9e('0x12')](_0x39f5e5));if(_0x39f5e5[_0x8e9e('0x13')]){if(_0x39f5e5[_0x8e9e('0x13')][_0x8e9e('0x14')]===0x1f4){logger['error'](_0x8e9e('0xe'),_0x1fb8d3,_0x39f5e5['error'][_0x8e9e('0x15')]);return _0x2ae896(_0x39f5e5[_0x8e9e('0x13')][_0x8e9e('0x15')]);}logger[_0x8e9e('0x13')](_0x8e9e('0xe'),_0x1fb8d3,_0x39f5e5[_0x8e9e('0x13')][_0x8e9e('0x15')]);return _0x3b5d21(_0x39f5e5['error']['message']);}else{logger[_0x8e9e('0xd')](_0x8e9e('0xe'),_0x1fb8d3,'request\x20sent');_0x3b5d21(_0x39f5e5[_0x8e9e('0x16')][_0x8e9e('0x15')]);}})[_0x8e9e('0x17')](function(_0x22b2c7){logger[_0x8e9e('0x13')]('VtigerField,\x20%s,\x20%s',_0x1fb8d3,_0x22b2c7);_0x2ae896(_0x22b2c7);});});}
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/index.js b/server/api/intZendeskAccount/index.js
index 6b072fb..3c7c184 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 _0xb781=['isAuthenticated','/:id','show','/:id/configurations','getConfigurations','getFields','post','create','addConfiguration','update','delete','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','get'];(function(_0x4c63f5,_0x128854){var _0x26e363=function(_0x1a029b){while(--_0x1a029b){_0x4c63f5['push'](_0x4c63f5['shift']());}};_0x26e363(++_0x128854);}(_0xb781,0x1ae));var _0x1b78=function(_0x253d83,_0x342900){_0x253d83=_0x253d83-0x0;var _0x1dae13=_0xb781[_0x253d83];return _0x1dae13;};'use strict';var multer=require(_0x1b78('0x0'));var util=require(_0x1b78('0x1'));var path=require('path');var timeout=require(_0x1b78('0x2'));var express=require(_0x1b78('0x3'));var router=express[_0x1b78('0x4')]();var auth=require(_0x1b78('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intZendeskAccount.controller');router[_0x1b78('0x6')]('/',auth[_0x1b78('0x7')](),controller['index']);router['get'](_0x1b78('0x8'),auth[_0x1b78('0x7')](),controller[_0x1b78('0x9')]);router['get'](_0x1b78('0xa'),auth[_0x1b78('0x7')](),controller[_0x1b78('0xb')]);router['get']('/:id/fields',auth[_0x1b78('0x7')](),controller[_0x1b78('0xc')]);router[_0x1b78('0xd')]('/',auth['isAuthenticated'](),controller[_0x1b78('0xe')]);router[_0x1b78('0xd')](_0x1b78('0xa'),auth[_0x1b78('0x7')](),controller[_0x1b78('0xf')]);router['put'](_0x1b78('0x8'),auth[_0x1b78('0x7')](),controller[_0x1b78('0x10')]);router[_0x1b78('0x11')]('/:id',auth[_0x1b78('0x7')](),controller['destroy']);module[_0x1b78('0x12')]=router;
\ No newline at end of file
+var _0x3ad6=['../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskAccount.controller','get','isAuthenticated','/:id','show','/:id/configurations','/:id/fields','getFields','post','addConfiguration','put','update','delete','exports','path','connect-timeout','express'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x3ad6,0x179));var _0x63ad=function(_0x3c4885,_0x5ec7fe){_0x3c4885=_0x3c4885-0x0;var _0xf71c22=_0x3ad6[_0x3c4885];return _0xf71c22;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x63ad('0x0'));var timeout=require(_0x63ad('0x1'));var express=require(_0x63ad('0x2'));var router=express['Router']();var auth=require(_0x63ad('0x3'));var interaction=require(_0x63ad('0x4'));var config=require(_0x63ad('0x5'));var controller=require(_0x63ad('0x6'));router[_0x63ad('0x7')]('/',auth[_0x63ad('0x8')](),controller['index']);router[_0x63ad('0x7')](_0x63ad('0x9'),auth['isAuthenticated'](),controller[_0x63ad('0xa')]);router[_0x63ad('0x7')](_0x63ad('0xb'),auth[_0x63ad('0x8')](),controller['getConfigurations']);router[_0x63ad('0x7')](_0x63ad('0xc'),auth[_0x63ad('0x8')](),controller[_0x63ad('0xd')]);router[_0x63ad('0xe')]('/',auth[_0x63ad('0x8')](),controller['create']);router[_0x63ad('0xe')]('/:id/configurations',auth[_0x63ad('0x8')](),controller[_0x63ad('0xf')]);router[_0x63ad('0x10')]('/:id',auth[_0x63ad('0x8')](),controller[_0x63ad('0x11')]);router[_0x63ad('0x12')](_0x63ad('0x9'),auth[_0x63ad('0x8')](),controller['destroy']);module[_0x63ad('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/intZendeskAccount.attributes.js b/server/api/intZendeskAccount/intZendeskAccount.attributes.js
index 08167f1..b264650 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 _0xc8fb=['ENUM','password','integrationTab','newTab','STRING','username','remoteUri'];(function(_0x599628,_0x5f5bf6){var _0xbf2469=function(_0x1483b0){while(--_0x1483b0){_0x599628['push'](_0x599628['shift']());}};_0xbf2469(++_0x5f5bf6);}(_0xc8fb,0x1bd));var _0xbc8f=function(_0x2987ee,_0x59257a){_0x2987ee=_0x2987ee-0x0;var _0x1f8b37=_0xc8fb[_0x2987ee];return _0x1f8b37;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xbc8f('0x0')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0xbc8f('0x1')},'password':{'type':Sequelize[_0xbc8f('0x0')]},'token':{'type':Sequelize[_0xbc8f('0x0')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0xbc8f('0x2')},'authType':{'type':Sequelize[_0xbc8f('0x3')](_0xbc8f('0x4'),'token'),'defaultValue':_0xbc8f('0x4')},'serverUrl':{'type':Sequelize[_0xbc8f('0x0')]},'type':{'type':Sequelize[_0xbc8f('0x3')](_0xbc8f('0x5'),_0xbc8f('0x6')),'defaultValue':'integrationTab'}};
\ No newline at end of file
+var _0x15f9=['ENUM','newTab','integrationTab','STRING','username','remoteUri','password'];(function(_0x189a72,_0x4ac342){var _0x2b457a=function(_0x151b57){while(--_0x151b57){_0x189a72['push'](_0x189a72['shift']());}};_0x2b457a(++_0x4ac342);}(_0x15f9,0x176));var _0x915f=function(_0x33ea19,_0x1a450f){_0x33ea19=_0x33ea19-0x0;var _0x3dacd8=_0x15f9[_0x33ea19];return _0x3dacd8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x915f('0x0')]},'description':{'type':Sequelize[_0x915f('0x0')]},'username':{'type':Sequelize[_0x915f('0x0')],'unique':_0x915f('0x1')},'password':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0x915f('0x0')]},'remoteUri':{'type':Sequelize[_0x915f('0x0')],'unique':_0x915f('0x2')},'authType':{'type':Sequelize['ENUM'](_0x915f('0x3'),'token'),'defaultValue':'password'},'serverUrl':{'type':Sequelize[_0x915f('0x0')]},'type':{'type':Sequelize[_0x915f('0x4')]('integrationTab',_0x915f('0x5')),'defaultValue':_0x915f('0x6')}};
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/intZendeskAccount.controller.js b/server/api/intZendeskAccount/intZendeskAccount.controller.js
index 42b1271..3b85005 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 _0xe61c=['apply','reject','save','then','destroy','stack','name','send','index','map','ZendeskAccount','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','includeAll','include','findAll','rows','catch','params','find','create','body','update','getConfigurations','ZendeskConfiguration','pick','addConfiguration','findOne','Subjects','getSubjects','channel','Descriptions','getDescriptions','ZendeskField','username','password','authType','remoteUri','lastIndexOf','GET','%s/%s','ticket_fields','headers','format','%s:%s','toString','token','%s/token:%s','base64','ValidationError','Unknown\x20authentication\x20type','subject','assignee','includes','title','position','system_field_options','custom_field_options','statusCode','getFields','Wrong\x20credentials','html-pdf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','test','Sequelize','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','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','sendStatus','status','count','offset','limit','Content-Range','json'];(function(_0x43259f,_0x16885e){var _0x136393=function(_0x4c807a){while(--_0x4c807a){_0x43259f['push'](_0x43259f['shift']());}};_0x136393(++_0x16885e);}(_0xe61c,0x1cb));var _0xce61=function(_0x3c8e9a,_0x384306){_0x3c8e9a=_0x3c8e9a-0x0;var _0x2d4c57=_0xe61c[_0x3c8e9a];return _0x2d4c57;};'use strict';var pdf=require(_0xce61('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xce61('0x1'));var jsonpatch=require(_0xce61('0x2'));var rp=require(_0xce61('0x3'));var moment=require(_0xce61('0x4'));var BPromise=require(_0xce61('0x5'));var Mustache=require('mustache');var util=require(_0xce61('0x6'));var path=require(_0xce61('0x7'));var sox=require(_0xce61('0x8'));var csv=require(_0xce61('0x9'));var ejs=require(_0xce61('0xa'));var fs=require('fs');var _=require(_0xce61('0xb'));var squel=require(_0xce61('0xc'));var crypto=require(_0xce61('0xd'));var jsforce=require(_0xce61('0xe'));var deskjs=require(_0xce61('0xf'));var toCsv=require('to-csv');var querystring=require(_0xce61('0x10'));var Papa=require(_0xce61('0x11'));var Redis=require(_0xce61('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xce61('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xce61('0x14'));var logger=require(_0xce61('0x15'))('api');var utils=require(_0xce61('0x16'));var config=require(_0xce61('0x17'));var db=require(_0xce61('0x18'))['db'];var integrations=require(_0xce61('0x19'));var jayson=require(_0xce61('0x1a'));var client=jayson[_0xce61('0x1b')][_0xce61('0x1c')]({'port':0x232a});function checkPasswordPattern(_0x505f3b,_0x525a98,_0x572f3d){if(_0x572f3d){var _0x50aed5=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x50aed5[_0xce61('0x1d')](_0x525a98)){return _0x505f3b;}else{throw new db[(_0xce61('0x1e'))]['ValidationError'](_0xce61('0x1f'));}}else{return _0x505f3b;}}function respondWithRpcPromise(_0x2f6197,_0x1fa27e,_0x1be521,_0x366097){return new BPromise(function(_0x436eab,_0x130267){var _0x284bd5=_0x366097||client;return _0x284bd5[_0xce61('0x20')](_0x2f6197,_0x1be521)['then'](function(_0x5dc631){logger[_0xce61('0x21')](_0xce61('0x22'),_0x1fa27e,_0xce61('0x23'));logger[_0xce61('0x24')](_0xce61('0x25'),_0x1fa27e,_0xce61('0x23'),JSON[_0xce61('0x26')](_0x5dc631));if(_0x5dc631['error']){if(_0x5dc631[_0xce61('0x27')]['code']===0x1f4){logger[_0xce61('0x27')]('ZendeskAccount,\x20%s,\x20%s',_0x1fa27e,_0x5dc631[_0xce61('0x27')]['message']);return _0x130267(_0x5dc631['error'][_0xce61('0x28')]);}logger[_0xce61('0x27')](_0xce61('0x22'),_0x1fa27e,_0x5dc631['error']['message']);return _0x436eab(_0x5dc631[_0xce61('0x27')][_0xce61('0x28')]);}else{logger[_0xce61('0x21')](_0xce61('0x22'),_0x1fa27e,_0xce61('0x23'));_0x436eab(_0x5dc631[_0xce61('0x29')]['message']);}})['catch'](function(_0x3005b2){logger[_0xce61('0x27')](_0xce61('0x22'),_0x1fa27e,_0x3005b2);_0x130267(_0x3005b2);});});}function respondWithStatusCode(_0x8f2432,_0x4a35fc){_0x4a35fc=_0x4a35fc||0xcc;return function(_0x402982){if(_0x402982){return _0x8f2432[_0xce61('0x2a')](_0x4a35fc);}return _0x8f2432[_0xce61('0x2b')](_0x4a35fc)['end']();};}function respondWithResult(_0x8cbd32,_0x2978b7){_0x2978b7=_0x2978b7||0xc8;return function(_0x3ec791){if(_0x3ec791){return _0x8cbd32[_0xce61('0x2b')](_0x2978b7)['json'](_0x3ec791);}};}function respondWithFilteredResult(_0x4a81cd,_0x5e8acf){return function(_0x285f5f){if(_0x285f5f){var _0x2f4451=_0x285f5f[_0xce61('0x2c')],_0x186642=_0x5e8acf[_0xce61('0x2d')],_0x46477c=_0x5e8acf[_0xce61('0x2d')]+_0x5e8acf[_0xce61('0x2e')],_0xa79b33;if(_0x46477c>=_0x2f4451){_0x46477c=_0x2f4451;_0xa79b33=0xc8;}else{_0xa79b33=0xce;}_0x4a81cd['status'](_0xa79b33);return _0x4a81cd['set'](_0xce61('0x2f'),_0x186642+'-'+_0x46477c+'/'+_0x2f4451)[_0xce61('0x30')](_0x285f5f);}return null;};}function patchUpdates(_0x817749){return function(_0x3d5aec){try{jsonpatch[_0xce61('0x31')](_0x3d5aec,_0x817749,!![]);}catch(_0x4a1cfc){return BPromise[_0xce61('0x32')](_0x4a1cfc);}return _0x3d5aec[_0xce61('0x33')]();};}function saveUpdates(_0x48a85f,_0x5e90e2){return function(_0x39443d){if(_0x39443d){return _0x39443d['update'](_0x48a85f)[_0xce61('0x34')](function(_0x423faf){return _0x423faf;});}return null;};}function removeEntity(_0x24a89f,_0x58ef68){return function(_0x1bc95d){if(_0x1bc95d){return _0x1bc95d[_0xce61('0x35')]()[_0xce61('0x34')](function(){_0x24a89f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xa5f872,_0x29ac9d){return function(_0xb1df58){if(!_0xb1df58){_0xa5f872[_0xce61('0x2a')](0x194);}return _0xb1df58;};}function handleError(_0x542777,_0x4fe8ba){_0x4fe8ba=_0x4fe8ba||0x1f4;return function(_0x39d5ba){logger[_0xce61('0x27')](_0x39d5ba[_0xce61('0x36')]);if(_0x39d5ba[_0xce61('0x37')]){delete _0x39d5ba[_0xce61('0x37')];}_0x542777['status'](_0x4fe8ba)[_0xce61('0x38')](_0x39d5ba);};}exports[_0xce61('0x39')]=function(_0x8f72fd,_0x40b642){var _0x1b1d64={},_0x3e8c20={},_0x58c264={'count':0x0,'rows':[]};var _0x383255=_[_0xce61('0x3a')](db[_0xce61('0x3b')][_0xce61('0x3c')],function(_0x39d9aa){return{'name':_0x39d9aa['fieldName'],'type':_0x39d9aa[_0xce61('0x3d')][_0xce61('0x3e')]};});_0x3e8c20[_0xce61('0x3f')]=_[_0xce61('0x3a')](_0x383255,_0xce61('0x37'));_0x3e8c20[_0xce61('0x40')]=_[_0xce61('0x41')](_0x8f72fd['query']);_0x3e8c20[_0xce61('0x42')]=_[_0xce61('0x43')](_0x3e8c20['model'],_0x3e8c20['query']);_0x1b1d64['attributes']=_[_0xce61('0x43')](_0x3e8c20['model'],qs[_0xce61('0x44')](_0x8f72fd[_0xce61('0x40')][_0xce61('0x44')]));_0x1b1d64['attributes']=_0x1b1d64[_0xce61('0x45')][_0xce61('0x46')]?_0x1b1d64[_0xce61('0x45')]:_0x3e8c20[_0xce61('0x3f')];if(!_0x8f72fd[_0xce61('0x40')][_0xce61('0x47')](_0xce61('0x48'))){_0x1b1d64['limit']=qs['limit'](_0x8f72fd[_0xce61('0x40')][_0xce61('0x2e')]);_0x1b1d64[_0xce61('0x2d')]=qs[_0xce61('0x2d')](_0x8f72fd['query'][_0xce61('0x2d')]);}_0x1b1d64[_0xce61('0x49')]=qs['sort'](_0x8f72fd['query'][_0xce61('0x4a')]);_0x1b1d64[_0xce61('0x4b')]=qs['filters'](_['pick'](_0x8f72fd[_0xce61('0x40')],_0x3e8c20[_0xce61('0x42')]));if(_0x8f72fd[_0xce61('0x40')][_0xce61('0x4c')]){_0x1b1d64[_0xce61('0x4b')]=_[_0xce61('0x4d')](_0x1b1d64['where'],{'$or':_[_0xce61('0x3a')](_0x383255,function(_0x3d4b20){if(_0x3d4b20[_0xce61('0x3d')]!=='VIRTUAL'){var _0x18bdb7={};_0x18bdb7[_0x3d4b20[_0xce61('0x37')]]={'$like':'%'+_0x8f72fd['query'][_0xce61('0x4c')]+'%'};return _0x18bdb7;}})});}_0x1b1d64=_[_0xce61('0x4d')]({},_0x1b1d64,_0x8f72fd[_0xce61('0x4e')]);var _0x411c5c={'where':_0x1b1d64[_0xce61('0x4b')]};return db[_0xce61('0x3b')][_0xce61('0x2c')](_0x411c5c)[_0xce61('0x34')](function(_0x22273c){_0x58c264[_0xce61('0x2c')]=_0x22273c;if(_0x8f72fd[_0xce61('0x40')][_0xce61('0x4f')]){_0x1b1d64[_0xce61('0x50')]=[{'all':!![]}];}return db['ZendeskAccount'][_0xce61('0x51')](_0x1b1d64);})[_0xce61('0x34')](function(_0x3f11aa){_0x58c264[_0xce61('0x52')]=_0x3f11aa;return _0x58c264;})[_0xce61('0x34')](respondWithFilteredResult(_0x40b642,_0x1b1d64))[_0xce61('0x53')](handleError(_0x40b642,null));};exports['show']=function(_0x1398d9,_0x5caa28){var _0x420d99={'raw':![],'where':{'id':_0x1398d9[_0xce61('0x54')]['id']}},_0x3f67c3={};_0x3f67c3['model']=_['keys'](db[_0xce61('0x3b')][_0xce61('0x3c')]);_0x3f67c3[_0xce61('0x40')]=_['keys'](_0x1398d9[_0xce61('0x40')]);_0x3f67c3[_0xce61('0x42')]=_[_0xce61('0x43')](_0x3f67c3[_0xce61('0x3f')],_0x3f67c3[_0xce61('0x40')]);_0x420d99[_0xce61('0x45')]=_[_0xce61('0x43')](_0x3f67c3[_0xce61('0x3f')],qs[_0xce61('0x44')](_0x1398d9[_0xce61('0x40')][_0xce61('0x44')]));_0x420d99[_0xce61('0x45')]=_0x420d99[_0xce61('0x45')][_0xce61('0x46')]?_0x420d99[_0xce61('0x45')]:_0x3f67c3[_0xce61('0x3f')];if(_0x1398d9[_0xce61('0x40')][_0xce61('0x4f')]){_0x420d99[_0xce61('0x50')]=[{'all':!![]}];}_0x420d99=_[_0xce61('0x4d')]({},_0x420d99,_0x1398d9[_0xce61('0x4e')]);return db[_0xce61('0x3b')][_0xce61('0x55')](_0x420d99)[_0xce61('0x34')](handleEntityNotFound(_0x5caa28,null))[_0xce61('0x34')](respondWithResult(_0x5caa28,null))[_0xce61('0x53')](handleError(_0x5caa28,null));};exports[_0xce61('0x56')]=function(_0x1a4dec,_0x1e94c8){return db[_0xce61('0x3b')]['create'](_0x1a4dec[_0xce61('0x57')],{})[_0xce61('0x34')](respondWithResult(_0x1e94c8,0xc9))['catch'](handleError(_0x1e94c8,null));};exports[_0xce61('0x58')]=function(_0x64b087,_0x2ee152){if(_0x64b087['body']['id']){delete _0x64b087[_0xce61('0x57')]['id'];}return db[_0xce61('0x3b')][_0xce61('0x55')]({'where':{'id':_0x64b087[_0xce61('0x54')]['id']}})['then'](handleEntityNotFound(_0x2ee152,null))['then'](saveUpdates(_0x64b087[_0xce61('0x57')],null))[_0xce61('0x34')](respondWithResult(_0x2ee152,null))[_0xce61('0x53')](handleError(_0x2ee152,null));};exports[_0xce61('0x35')]=function(_0x426e93,_0x5889ee){return db[_0xce61('0x3b')][_0xce61('0x55')]({'where':{'id':_0x426e93['params']['id']}})[_0xce61('0x34')](handleEntityNotFound(_0x5889ee,null))[_0xce61('0x34')](removeEntity(_0x5889ee,null))[_0xce61('0x53')](handleError(_0x5889ee,null));};exports[_0xce61('0x59')]=function(_0x2abfbd,_0x379ec7,_0x1c6010){var _0x3537a9={};var _0x5495f2={};var _0x31243d;var _0xdfd936;return db[_0xce61('0x3b')]['findOne']({'where':{'id':_0x2abfbd[_0xce61('0x54')]['id']}})['then'](handleEntityNotFound(_0x379ec7,null))[_0xce61('0x34')](function(_0x3552ad){if(_0x3552ad){_0x31243d=_0x3552ad;_0x5495f2['model']=_[_0xce61('0x41')](db[_0xce61('0x5a')]['rawAttributes']);_0x5495f2['query']=_['keys'](_0x2abfbd['query']);_0x5495f2[_0xce61('0x42')]=_['intersection'](_0x5495f2[_0xce61('0x3f')],_0x5495f2[_0xce61('0x40')]);_0x3537a9[_0xce61('0x45')]=_['intersection'](_0x5495f2[_0xce61('0x3f')],qs[_0xce61('0x44')](_0x2abfbd[_0xce61('0x40')][_0xce61('0x44')]));_0x3537a9[_0xce61('0x45')]=_0x3537a9[_0xce61('0x45')][_0xce61('0x46')]?_0x3537a9[_0xce61('0x45')]:_0x5495f2[_0xce61('0x3f')];_0x3537a9[_0xce61('0x49')]=qs[_0xce61('0x4a')](_0x2abfbd[_0xce61('0x40')][_0xce61('0x4a')]);_0x3537a9[_0xce61('0x4b')]=qs[_0xce61('0x42')](_[_0xce61('0x5b')](_0x2abfbd['query'],_0x5495f2['filters']));if(_0x2abfbd[_0xce61('0x40')][_0xce61('0x4c')]){_0x3537a9[_0xce61('0x4b')]=_[_0xce61('0x4d')](_0x3537a9['where'],{'$or':_['map'](_0x3537a9[_0xce61('0x45')],function(_0x5b0592){var _0x1c9322={};_0x1c9322[_0x5b0592]={'$like':'%'+_0x2abfbd[_0xce61('0x40')][_0xce61('0x4c')]+'%'};return _0x1c9322;})});}_0x3537a9=_[_0xce61('0x4d')]({},_0x3537a9,_0x2abfbd[_0xce61('0x4e')]);return _0x31243d[_0xce61('0x59')](_0x3537a9);}})[_0xce61('0x34')](function(_0x4590ce){if(_0x4590ce){_0xdfd936=_0x4590ce[_0xce61('0x46')];if(!_0x2abfbd['query'][_0xce61('0x47')](_0xce61('0x48'))){_0x3537a9[_0xce61('0x2e')]=qs[_0xce61('0x2e')](_0x2abfbd[_0xce61('0x40')][_0xce61('0x2e')]);_0x3537a9['offset']=qs[_0xce61('0x2d')](_0x2abfbd[_0xce61('0x40')][_0xce61('0x2d')]);}return _0x31243d['getConfigurations'](_0x3537a9);}})[_0xce61('0x34')](function(_0x44a0bc){if(_0x44a0bc){return _0x44a0bc?{'count':_0xdfd936,'rows':_0x44a0bc}:null;}})[_0xce61('0x34')](respondWithResult(_0x379ec7,null))[_0xce61('0x53')](handleError(_0x379ec7,null));};exports[_0xce61('0x5c')]=function(_0x1b183f,_0x42189b,_0x3b1d67){if(_0x1b183f['body']['id']){delete _0x1b183f[_0xce61('0x57')]['id'];}return db[_0xce61('0x3b')][_0xce61('0x5d')]({'where':{'id':_0x1b183f[_0xce61('0x54')]['id']}})['then'](handleEntityNotFound(_0x42189b,null))['then'](function(_0x2a739f){if(_0x2a739f){_0x1b183f[_0xce61('0x57')]['AccountId']=_0x2a739f['id'];_0x1b183f[_0xce61('0x57')][_0xce61('0x5e')]=integrations[_0xce61('0x5f')](_0x1b183f['body'][_0xce61('0x60')],_0x1b183f[_0xce61('0x57')][_0xce61('0x3d')]);_0x1b183f[_0xce61('0x57')][_0xce61('0x61')]=integrations[_0xce61('0x62')](_0x1b183f[_0xce61('0x57')][_0xce61('0x60')],_0x1b183f[_0xce61('0x57')]['type']);return db['ZendeskConfiguration'][_0xce61('0x56')](_0x1b183f[_0xce61('0x57')],{'include':[{'model':db['ZendeskField'],'as':_0xce61('0x5e')},{'model':db[_0xce61('0x63')],'as':_0xce61('0x61')}]});}return null;})[_0xce61('0x34')](respondWithResult(_0x42189b,null))['catch'](handleError(_0x42189b,null));};exports['getFields']=function(_0x21d7ba,_0x461995,_0x3152d7){var _0x152760='';return db[_0xce61('0x3b')][_0xce61('0x5d')]({'where':{'id':_0x21d7ba[_0xce61('0x54')]['id']},'attributes':['id',_0xce61('0x64'),_0xce61('0x65'),'token',_0xce61('0x66'),_0xce61('0x67')]})[_0xce61('0x34')](handleEntityNotFound(_0x461995,null))[_0xce61('0x34')](function(_0x126220){if(_0x126220){_0x152760=_0x126220[_0xce61('0x67')];var _0x179c0e=_0x152760['slice'](-0x1);if(_0x179c0e==='/'){_0x152760=_0x152760['substring'](0x0,_0x152760[_0xce61('0x68')](_0x179c0e));}var _0x51aee4={'method':_0xce61('0x69'),'uri':util['format'](_0xce61('0x6a'),_0x152760,_0xce61('0x6b')),'json':!![]};switch(_0x126220[_0xce61('0x66')]){case _0xce61('0x65'):_0x51aee4[_0xce61('0x6c')]={'Authorization':util[_0xce61('0x6d')]('Basic\x20%s',new Buffer(util[_0xce61('0x6d')](_0xce61('0x6e'),_0x126220['username'],_0x126220[_0xce61('0x65')]))[_0xce61('0x6f')]('base64'))};break;case _0xce61('0x70'):_0x51aee4[_0xce61('0x6c')]={'Authorization':util[_0xce61('0x6d')]('Basic\x20%s',new Buffer(util['format'](_0xce61('0x71'),_0x126220[_0xce61('0x64')],_0x126220[_0xce61('0x70')]))['toString'](_0xce61('0x72')))};break;default:throw new db[(_0xce61('0x1e'))][(_0xce61('0x73'))](_0xce61('0x74'));}return rp(_0x51aee4);}})[_0xce61('0x34')](function(_0x430602){if(_0x430602){var _0x377832=[_0xce61('0x75'),'description','group',_0xce61('0x76')];_['remove'](_0x430602[_0xce61('0x6b')],function(_0x33d5cb){return _0x377832[_0xce61('0x77')](_0x33d5cb[_0xce61('0x3d')]);});return{'count':_0x430602['ticket_fields']['length'],'rows':_[_0xce61('0x3a')](_0x430602['ticket_fields'],function(_0xf2261c){return{'id':_0xf2261c['id'],'name':_0xf2261c['position']>0x7?_0xf2261c[_0xce61('0x78')]:_0xf2261c[_0xce61('0x3d')],'custom':_0xf2261c[_0xce61('0x79')]>0x7?!![]:![],'options':_0xf2261c[_0xce61('0x7a')]?_0xf2261c[_0xce61('0x7a')]:_0xf2261c[_0xce61('0x7b')]?_0xf2261c[_0xce61('0x7b')]:[]};})};}})[_0xce61('0x34')](respondWithResult(_0x461995,null))[_0xce61('0x53')](function(_0x23e30f){var _0x5d6dfb=_0x21d7ba[_0xce61('0x40')][_0xce61('0x1d')]?0x1f4:_0x23e30f[_0xce61('0x7c')]||0x1f4;logger[_0xce61('0x27')]('getFields,\x20%s,\x20%s,\x20%s',_0xce61('0x7d'),_0x5d6dfb,JSON[_0xce61('0x26')](_0x23e30f));delete _0x23e30f[_0xce61('0x37')];if(_0x5d6dfb===0x191){_0x5d6dfb=0x190;}_0x461995['status'](_0x5d6dfb)[_0xce61('0x38')](_0x21d7ba[_0xce61('0x40')]['test']?{'message':_0xce61('0x7e'),'statusCode':_0x23e30f[_0xce61('0x7c')]}:_0x23e30f);});};
\ No newline at end of file
+var _0x1360=['title','system_field_options','custom_field_options','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../components/integrations/configuration','client','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','error','message','result','catch','end','status','count','limit','apply','reject','save','update','destroy','sendStatus','stack','name','send','index','map','ZendeskAccount','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','sort','where','merge','VIRTUAL','filter','options','includeAll','findAll','rows','show','include','find','create','body','findOne','params','ZendeskConfiguration','order','getConfigurations','addConfiguration','AccountId','getSubjects','channel','Descriptions','getDescriptions','ZendeskField','Subjects','getFields','username','token','authType','remoteUri','slice','substring','lastIndexOf','GET','format','ticket_fields','password','headers','%s:%s','Basic\x20%s','toString','base64','Unknown\x20authentication\x20type','subject','description','group','assignee','remove','includes','position'];(function(_0x36c576,_0x3cd309){var _0x143732=function(_0x52085c){while(--_0x52085c){_0x36c576['push'](_0x36c576['shift']());}};_0x143732(++_0x3cd309);}(_0x1360,0x87));var _0x0136=function(_0x5316c9,_0x1599b8){_0x5316c9=_0x5316c9-0x0;var _0x4b7507=_0x1360[_0x5316c9];return _0x4b7507;};'use strict';var pdf=require(_0x0136('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x0136('0x1'));var zipdir=require(_0x0136('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0136('0x3'));var moment=require(_0x0136('0x4'));var BPromise=require(_0x0136('0x5'));var Mustache=require(_0x0136('0x6'));var util=require(_0x0136('0x7'));var path=require(_0x0136('0x8'));var sox=require(_0x0136('0x9'));var csv=require(_0x0136('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x0136('0xb'));var squel=require('squel');var crypto=require(_0x0136('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x0136('0xa'));var querystring=require(_0x0136('0xd'));var Papa=require(_0x0136('0xe'));var Redis=require(_0x0136('0xf'));var authService=require(_0x0136('0x10'));var qs=require(_0x0136('0x11'));var as=require(_0x0136('0x12'));var hardwareService=require(_0x0136('0x13'));var logger=require(_0x0136('0x14'))(_0x0136('0x15'));var utils=require(_0x0136('0x16'));var config=require(_0x0136('0x17'));var db=require('../../mysqldb')['db'];var integrations=require(_0x0136('0x18'));var jayson=require('jayson/promise');var client=jayson[_0x0136('0x19')]['http']({'port':0x232a});function checkPasswordPattern(_0x5eddb5,_0x3c21d0,_0x53b5b3){if(_0x53b5b3){var _0x5ce018=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5ce018[_0x0136('0x1a')](_0x3c21d0)){return _0x5eddb5;}else{throw new db[(_0x0136('0x1b'))][(_0x0136('0x1c'))](_0x0136('0x1d'));}}else{return _0x5eddb5;}}function respondWithRpcPromise(_0x36f17a,_0x2c8460,_0x2830af,_0x5aba35){return new BPromise(function(_0x1b0839,_0xdcf0ba){var _0x16b67c=_0x5aba35||client;return _0x16b67c[_0x0136('0x1e')](_0x36f17a,_0x2830af)[_0x0136('0x1f')](function(_0x4d455f){logger[_0x0136('0x20')](_0x0136('0x21'),_0x2c8460,_0x0136('0x22'));logger['debug']('ZendeskAccount,\x20%s,\x20%s,\x20%s',_0x2c8460,_0x0136('0x22'),JSON['stringify'](_0x4d455f));if(_0x4d455f[_0x0136('0x23')]){if(_0x4d455f[_0x0136('0x23')]['code']===0x1f4){logger[_0x0136('0x23')]('ZendeskAccount,\x20%s,\x20%s',_0x2c8460,_0x4d455f['error'][_0x0136('0x24')]);return _0xdcf0ba(_0x4d455f[_0x0136('0x23')][_0x0136('0x24')]);}logger[_0x0136('0x23')]('ZendeskAccount,\x20%s,\x20%s',_0x2c8460,_0x4d455f['error']['message']);return _0x1b0839(_0x4d455f[_0x0136('0x23')][_0x0136('0x24')]);}else{logger[_0x0136('0x20')]('ZendeskAccount,\x20%s,\x20%s',_0x2c8460,'request\x20sent');_0x1b0839(_0x4d455f[_0x0136('0x25')][_0x0136('0x24')]);}})[_0x0136('0x26')](function(_0x10177f){logger[_0x0136('0x23')]('ZendeskAccount,\x20%s,\x20%s',_0x2c8460,_0x10177f);_0xdcf0ba(_0x10177f);});});}function respondWithStatusCode(_0x592e5b,_0xe5506a){_0xe5506a=_0xe5506a||0xcc;return function(_0x3b522b){if(_0x3b522b){return _0x592e5b['sendStatus'](_0xe5506a);}return _0x592e5b['status'](_0xe5506a)[_0x0136('0x27')]();};}function respondWithResult(_0x3e0777,_0x15005f){_0x15005f=_0x15005f||0xc8;return function(_0x22306d){if(_0x22306d){return _0x3e0777[_0x0136('0x28')](_0x15005f)['json'](_0x22306d);}};}function respondWithFilteredResult(_0x3a8471,_0x4ff4ac){return function(_0x3461e2){if(_0x3461e2){var _0x129877=_0x3461e2[_0x0136('0x29')],_0x368410=_0x4ff4ac['offset'],_0x203371=_0x4ff4ac['offset']+_0x4ff4ac[_0x0136('0x2a')],_0x18b066;if(_0x203371>=_0x129877){_0x203371=_0x129877;_0x18b066=0xc8;}else{_0x18b066=0xce;}_0x3a8471[_0x0136('0x28')](_0x18b066);return _0x3a8471['set']('Content-Range',_0x368410+'-'+_0x203371+'/'+_0x129877)['json'](_0x3461e2);}return null;};}function patchUpdates(_0x148c31){return function(_0x1581ff){try{jsonpatch[_0x0136('0x2b')](_0x1581ff,_0x148c31,!![]);}catch(_0x284d4c){return BPromise[_0x0136('0x2c')](_0x284d4c);}return _0x1581ff[_0x0136('0x2d')]();};}function saveUpdates(_0x2d9ea3,_0xef7295){return function(_0x17fc78){if(_0x17fc78){return _0x17fc78[_0x0136('0x2e')](_0x2d9ea3)[_0x0136('0x1f')](function(_0x3926c1){return _0x3926c1;});}return null;};}function removeEntity(_0x3ac9a6,_0x15e0bc){return function(_0x543d29){if(_0x543d29){return _0x543d29[_0x0136('0x2f')]()[_0x0136('0x1f')](function(){_0x3ac9a6[_0x0136('0x28')](0xcc)[_0x0136('0x27')]();});}};}function handleEntityNotFound(_0x1ff2d0,_0x24ee44){return function(_0x6900f0){if(!_0x6900f0){_0x1ff2d0[_0x0136('0x30')](0x194);}return _0x6900f0;};}function handleError(_0x217769,_0x34ce1a){_0x34ce1a=_0x34ce1a||0x1f4;return function(_0x91035d){logger[_0x0136('0x23')](_0x91035d[_0x0136('0x31')]);if(_0x91035d['name']){delete _0x91035d[_0x0136('0x32')];}_0x217769[_0x0136('0x28')](_0x34ce1a)[_0x0136('0x33')](_0x91035d);};}exports[_0x0136('0x34')]=function(_0x5b0e92,_0x310d7b){var _0x3153a6={},_0x5edd66={},_0x2d7e32={'count':0x0,'rows':[]};var _0x1a3c1e=_[_0x0136('0x35')](db[_0x0136('0x36')][_0x0136('0x37')],function(_0x1a89cd){return{'name':_0x1a89cd[_0x0136('0x38')],'type':_0x1a89cd[_0x0136('0x39')]['key']};});_0x5edd66[_0x0136('0x3a')]=_[_0x0136('0x35')](_0x1a3c1e,_0x0136('0x32'));_0x5edd66[_0x0136('0x3b')]=_[_0x0136('0x3c')](_0x5b0e92[_0x0136('0x3b')]);_0x5edd66[_0x0136('0x3d')]=_[_0x0136('0x3e')](_0x5edd66[_0x0136('0x3a')],_0x5edd66[_0x0136('0x3b')]);_0x3153a6[_0x0136('0x3f')]=_[_0x0136('0x3e')](_0x5edd66[_0x0136('0x3a')],qs[_0x0136('0x40')](_0x5b0e92[_0x0136('0x3b')][_0x0136('0x40')]));_0x3153a6[_0x0136('0x3f')]=_0x3153a6[_0x0136('0x3f')][_0x0136('0x41')]?_0x3153a6[_0x0136('0x3f')]:_0x5edd66[_0x0136('0x3a')];if(!_0x5b0e92[_0x0136('0x3b')][_0x0136('0x42')](_0x0136('0x43'))){_0x3153a6[_0x0136('0x2a')]=qs[_0x0136('0x2a')](_0x5b0e92[_0x0136('0x3b')][_0x0136('0x2a')]);_0x3153a6[_0x0136('0x44')]=qs[_0x0136('0x44')](_0x5b0e92[_0x0136('0x3b')][_0x0136('0x44')]);}_0x3153a6['order']=qs[_0x0136('0x45')](_0x5b0e92[_0x0136('0x3b')][_0x0136('0x45')]);_0x3153a6[_0x0136('0x46')]=qs[_0x0136('0x3d')](_['pick'](_0x5b0e92['query'],_0x5edd66[_0x0136('0x3d')]));if(_0x5b0e92[_0x0136('0x3b')]['filter']){_0x3153a6[_0x0136('0x46')]=_[_0x0136('0x47')](_0x3153a6['where'],{'$or':_['map'](_0x1a3c1e,function(_0x35fab){if(_0x35fab['type']!==_0x0136('0x48')){var _0x3bac9a={};_0x3bac9a[_0x35fab[_0x0136('0x32')]]={'$like':'%'+_0x5b0e92['query'][_0x0136('0x49')]+'%'};return _0x3bac9a;}})});}_0x3153a6=_['merge']({},_0x3153a6,_0x5b0e92[_0x0136('0x4a')]);var _0x418f0a={'where':_0x3153a6[_0x0136('0x46')]};return db['ZendeskAccount'][_0x0136('0x29')](_0x418f0a)['then'](function(_0x362826){_0x2d7e32['count']=_0x362826;if(_0x5b0e92[_0x0136('0x3b')][_0x0136('0x4b')]){_0x3153a6['include']=[{'all':!![]}];}return db[_0x0136('0x36')][_0x0136('0x4c')](_0x3153a6);})[_0x0136('0x1f')](function(_0x9f18de){_0x2d7e32[_0x0136('0x4d')]=_0x9f18de;return _0x2d7e32;})[_0x0136('0x1f')](respondWithFilteredResult(_0x310d7b,_0x3153a6))[_0x0136('0x26')](handleError(_0x310d7b,null));};exports[_0x0136('0x4e')]=function(_0x4ec014,_0x343b0a){var _0x1ba863={'raw':![],'where':{'id':_0x4ec014['params']['id']}},_0x3c817f={};_0x3c817f[_0x0136('0x3a')]=_[_0x0136('0x3c')](db[_0x0136('0x36')]['rawAttributes']);_0x3c817f['query']=_[_0x0136('0x3c')](_0x4ec014[_0x0136('0x3b')]);_0x3c817f[_0x0136('0x3d')]=_[_0x0136('0x3e')](_0x3c817f[_0x0136('0x3a')],_0x3c817f[_0x0136('0x3b')]);_0x1ba863['attributes']=_['intersection'](_0x3c817f[_0x0136('0x3a')],qs['fields'](_0x4ec014['query']['fields']));_0x1ba863[_0x0136('0x3f')]=_0x1ba863[_0x0136('0x3f')][_0x0136('0x41')]?_0x1ba863['attributes']:_0x3c817f[_0x0136('0x3a')];if(_0x4ec014[_0x0136('0x3b')][_0x0136('0x4b')]){_0x1ba863[_0x0136('0x4f')]=[{'all':!![]}];}_0x1ba863=_[_0x0136('0x47')]({},_0x1ba863,_0x4ec014[_0x0136('0x4a')]);return db[_0x0136('0x36')][_0x0136('0x50')](_0x1ba863)[_0x0136('0x1f')](handleEntityNotFound(_0x343b0a,null))['then'](respondWithResult(_0x343b0a,null))['catch'](handleError(_0x343b0a,null));};exports['create']=function(_0x432e6a,_0x569d48){return db[_0x0136('0x36')][_0x0136('0x51')](_0x432e6a[_0x0136('0x52')],{})[_0x0136('0x1f')](respondWithResult(_0x569d48,0xc9))[_0x0136('0x26')](handleError(_0x569d48,null));};exports[_0x0136('0x2e')]=function(_0x2d7255,_0x1334d5){if(_0x2d7255[_0x0136('0x52')]['id']){delete _0x2d7255[_0x0136('0x52')]['id'];}return db[_0x0136('0x36')]['find']({'where':{'id':_0x2d7255['params']['id']}})[_0x0136('0x1f')](handleEntityNotFound(_0x1334d5,null))[_0x0136('0x1f')](saveUpdates(_0x2d7255[_0x0136('0x52')],null))['then'](respondWithResult(_0x1334d5,null))[_0x0136('0x26')](handleError(_0x1334d5,null));};exports[_0x0136('0x2f')]=function(_0x10522e,_0x49ecde){return db[_0x0136('0x36')][_0x0136('0x50')]({'where':{'id':_0x10522e['params']['id']}})['then'](handleEntityNotFound(_0x49ecde,null))[_0x0136('0x1f')](removeEntity(_0x49ecde,null))['catch'](handleError(_0x49ecde,null));};exports['getConfigurations']=function(_0x513bc6,_0x2bcc96,_0x59773f){var _0x140226={};var _0x5a8e9b={};var _0x606d2e;var _0x42079f;return db[_0x0136('0x36')][_0x0136('0x53')]({'where':{'id':_0x513bc6[_0x0136('0x54')]['id']}})[_0x0136('0x1f')](handleEntityNotFound(_0x2bcc96,null))['then'](function(_0x35bef6){if(_0x35bef6){_0x606d2e=_0x35bef6;_0x5a8e9b[_0x0136('0x3a')]=_[_0x0136('0x3c')](db[_0x0136('0x55')][_0x0136('0x37')]);_0x5a8e9b[_0x0136('0x3b')]=_[_0x0136('0x3c')](_0x513bc6[_0x0136('0x3b')]);_0x5a8e9b[_0x0136('0x3d')]=_['intersection'](_0x5a8e9b[_0x0136('0x3a')],_0x5a8e9b['query']);_0x140226[_0x0136('0x3f')]=_[_0x0136('0x3e')](_0x5a8e9b[_0x0136('0x3a')],qs['fields'](_0x513bc6['query'][_0x0136('0x40')]));_0x140226[_0x0136('0x3f')]=_0x140226['attributes'][_0x0136('0x41')]?_0x140226[_0x0136('0x3f')]:_0x5a8e9b['model'];_0x140226[_0x0136('0x56')]=qs['sort'](_0x513bc6[_0x0136('0x3b')][_0x0136('0x45')]);_0x140226[_0x0136('0x46')]=qs[_0x0136('0x3d')](_['pick'](_0x513bc6[_0x0136('0x3b')],_0x5a8e9b[_0x0136('0x3d')]));if(_0x513bc6[_0x0136('0x3b')][_0x0136('0x49')]){_0x140226[_0x0136('0x46')]=_[_0x0136('0x47')](_0x140226[_0x0136('0x46')],{'$or':_[_0x0136('0x35')](_0x140226['attributes'],function(_0x51fbee){var _0xb6adc5={};_0xb6adc5[_0x51fbee]={'$like':'%'+_0x513bc6[_0x0136('0x3b')][_0x0136('0x49')]+'%'};return _0xb6adc5;})});}_0x140226=_['merge']({},_0x140226,_0x513bc6['options']);return _0x606d2e[_0x0136('0x57')](_0x140226);}})[_0x0136('0x1f')](function(_0x3b16df){if(_0x3b16df){_0x42079f=_0x3b16df[_0x0136('0x41')];if(!_0x513bc6[_0x0136('0x3b')][_0x0136('0x42')](_0x0136('0x43'))){_0x140226[_0x0136('0x2a')]=qs[_0x0136('0x2a')](_0x513bc6[_0x0136('0x3b')][_0x0136('0x2a')]);_0x140226[_0x0136('0x44')]=qs[_0x0136('0x44')](_0x513bc6[_0x0136('0x3b')][_0x0136('0x44')]);}return _0x606d2e['getConfigurations'](_0x140226);}})[_0x0136('0x1f')](function(_0x1e2fba){if(_0x1e2fba){return _0x1e2fba?{'count':_0x42079f,'rows':_0x1e2fba}:null;}})[_0x0136('0x1f')](respondWithResult(_0x2bcc96,null))[_0x0136('0x26')](handleError(_0x2bcc96,null));};exports[_0x0136('0x58')]=function(_0x1c9647,_0x4cbb56,_0x397ebe){if(_0x1c9647[_0x0136('0x52')]['id']){delete _0x1c9647['body']['id'];}return db[_0x0136('0x36')][_0x0136('0x53')]({'where':{'id':_0x1c9647['params']['id']}})[_0x0136('0x1f')](handleEntityNotFound(_0x4cbb56,null))[_0x0136('0x1f')](function(_0x37ebb7){if(_0x37ebb7){_0x1c9647[_0x0136('0x52')][_0x0136('0x59')]=_0x37ebb7['id'];_0x1c9647['body']['Subjects']=integrations[_0x0136('0x5a')](_0x1c9647[_0x0136('0x52')][_0x0136('0x5b')],_0x1c9647[_0x0136('0x52')][_0x0136('0x39')]);_0x1c9647['body'][_0x0136('0x5c')]=integrations[_0x0136('0x5d')](_0x1c9647[_0x0136('0x52')][_0x0136('0x5b')],_0x1c9647[_0x0136('0x52')]['type']);return db['ZendeskConfiguration'][_0x0136('0x51')](_0x1c9647[_0x0136('0x52')],{'include':[{'model':db[_0x0136('0x5e')],'as':_0x0136('0x5f')},{'model':db[_0x0136('0x5e')],'as':_0x0136('0x5c')}]});}return null;})[_0x0136('0x1f')](respondWithResult(_0x4cbb56,null))[_0x0136('0x26')](handleError(_0x4cbb56,null));};exports[_0x0136('0x60')]=function(_0x17b111,_0x5d6526,_0x38cfba){var _0xc6ce13='';return db[_0x0136('0x36')][_0x0136('0x53')]({'where':{'id':_0x17b111[_0x0136('0x54')]['id']},'attributes':['id',_0x0136('0x61'),'password',_0x0136('0x62'),_0x0136('0x63'),_0x0136('0x64')]})[_0x0136('0x1f')](handleEntityNotFound(_0x5d6526,null))[_0x0136('0x1f')](function(_0x4dbbaa){if(_0x4dbbaa){_0xc6ce13=_0x4dbbaa[_0x0136('0x64')];var _0x59b050=_0xc6ce13[_0x0136('0x65')](-0x1);if(_0x59b050==='/'){_0xc6ce13=_0xc6ce13[_0x0136('0x66')](0x0,_0xc6ce13[_0x0136('0x67')](_0x59b050));}var _0x412eb8={'method':_0x0136('0x68'),'uri':util[_0x0136('0x69')]('%s/%s',_0xc6ce13,_0x0136('0x6a')),'json':!![]};switch(_0x4dbbaa[_0x0136('0x63')]){case _0x0136('0x6b'):_0x412eb8[_0x0136('0x6c')]={'Authorization':util[_0x0136('0x69')]('Basic\x20%s',new Buffer(util[_0x0136('0x69')](_0x0136('0x6d'),_0x4dbbaa[_0x0136('0x61')],_0x4dbbaa[_0x0136('0x6b')]))['toString']('base64'))};break;case _0x0136('0x62'):_0x412eb8[_0x0136('0x6c')]={'Authorization':util[_0x0136('0x69')](_0x0136('0x6e'),new Buffer(util[_0x0136('0x69')]('%s/token:%s',_0x4dbbaa[_0x0136('0x61')],_0x4dbbaa[_0x0136('0x62')]))[_0x0136('0x6f')](_0x0136('0x70')))};break;default:throw new db['Sequelize']['ValidationError'](_0x0136('0x71'));}return rp(_0x412eb8);}})[_0x0136('0x1f')](function(_0x535f1b){if(_0x535f1b){var _0x209e7d=[_0x0136('0x72'),_0x0136('0x73'),_0x0136('0x74'),_0x0136('0x75')];_[_0x0136('0x76')](_0x535f1b[_0x0136('0x6a')],function(_0x47dc96){return _0x209e7d[_0x0136('0x77')](_0x47dc96[_0x0136('0x39')]);});return{'count':_0x535f1b['ticket_fields'][_0x0136('0x41')],'rows':_[_0x0136('0x35')](_0x535f1b[_0x0136('0x6a')],function(_0x29c48c){return{'id':_0x29c48c['id'],'name':_0x29c48c[_0x0136('0x78')]>0x7?_0x29c48c[_0x0136('0x79')]:_0x29c48c[_0x0136('0x39')],'custom':_0x29c48c[_0x0136('0x78')]>0x7?!![]:![],'options':_0x29c48c[_0x0136('0x7a')]?_0x29c48c['system_field_options']:_0x29c48c['custom_field_options']?_0x29c48c[_0x0136('0x7b')]:[]};})};}})['then'](respondWithResult(_0x5d6526,null))[_0x0136('0x26')](function(_0x506a2d){var _0x49546c=_0x17b111[_0x0136('0x3b')]['test']?0x1f4:_0x506a2d[_0x0136('0x7c')]||0x1f4;logger[_0x0136('0x23')](_0x0136('0x7d'),_0x0136('0x60'),_0x49546c,JSON[_0x0136('0x7e')](_0x506a2d));delete _0x506a2d[_0x0136('0x32')];if(_0x49546c===0x191){_0x49546c=0x190;}_0x5d6526['status'](_0x49546c)['send'](_0x17b111['query'][_0x0136('0x1a')]?{'message':_0x0136('0x7f'),'statusCode':_0x506a2d[_0x0136('0x7c')]}:_0x506a2d);});};
\ No newline at end of file
diff --git a/server/api/intZendeskAccount/intZendeskAccount.model.js b/server/api/intZendeskAccount/intZendeskAccount.model.js
index 2725171..f56ddcc 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 _0xef89=['../../config/environment','../../components/integrations/configuration','exports','define','ZendeskAccount','int_zendesk_accounts','lodash','util','../../config/logger','moment','request-promise','path','rimraf'];(function(_0x35fb5a,_0x5ec3e4){var _0xd15130=function(_0x94c5e4){while(--_0x94c5e4){_0x35fb5a['push'](_0x35fb5a['shift']());}};_0xd15130(++_0x5ec3e4);}(_0xef89,0xaf));var _0x9ef8=function(_0x389d31,_0x4f2896){_0x389d31=_0x389d31-0x0;var _0x169a24=_0xef89[_0x389d31];return _0x169a24;};'use strict';var _=require(_0x9ef8('0x0'));var util=require(_0x9ef8('0x1'));var logger=require(_0x9ef8('0x2'))('api');var moment=require(_0x9ef8('0x3'));var BPromise=require('bluebird');var rp=require(_0x9ef8('0x4'));var fs=require('fs');var path=require(_0x9ef8('0x5'));var rimraf=require(_0x9ef8('0x6'));var config=require(_0x9ef8('0x7'));var attributes=require('./intZendeskAccount.attributes');var integrations=require(_0x9ef8('0x8'));module[_0x9ef8('0x9')]=function(_0x4c47c8,_0x503d7b){return _0x4c47c8[_0x9ef8('0xa')](_0x9ef8('0xb'),attributes,{'tableName':_0x9ef8('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x43e6=['api','bluebird','request-promise','rimraf','../../config/environment','exports','define','ZendeskAccount','int_zendesk_accounts','../../config/logger'];(function(_0x494d1f,_0x3f72ff){var _0x457b6e=function(_0x38cb16){while(--_0x38cb16){_0x494d1f['push'](_0x494d1f['shift']());}};_0x457b6e(++_0x3f72ff);}(_0x43e6,0x9f));var _0x643e=function(_0x2f503f,_0x29bd35){_0x2f503f=_0x2f503f-0x0;var _0x5511f1=_0x43e6[_0x2f503f];return _0x5511f1;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x643e('0x0'))(_0x643e('0x1'));var moment=require('moment');var BPromise=require(_0x643e('0x2'));var rp=require(_0x643e('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x643e('0x4'));var config=require(_0x643e('0x5'));var attributes=require('./intZendeskAccount.attributes');var integrations=require('../../components/integrations/configuration');module[_0x643e('0x6')]=function(_0x425cfb,_0x1da904){return _0x425cfb[_0x643e('0x7')](_0x643e('0x8'),attributes,{'tableName':_0x643e('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 e9a6c04..c42caec 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 _0xe706=['options','raw','where','attributes','limit','include','map','model','stringify','ShowZendeskAccount','ZendeskAccount','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetZendeskAccount','findAll'];(function(_0x25d5cd,_0x558d9c){var _0x30b7d9=function(_0x3485ca){while(--_0x3485ca){_0x25d5cd['push'](_0x25d5cd['shift']());}};_0x30b7d9(++_0x558d9c);}(_0xe706,0xa3));var _0x6e70=function(_0x490c45,_0x97b829){_0x490c45=_0x490c45-0x0;var _0x82738e=_0xe706[_0x490c45];return _0x82738e;};'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']('ZendeskAccount,\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']('ZendeskAccount,\x20%s,\x20%s',_0x293ce7,_0x161f23);_0x3c4843(_0x161f23);});});}exports[_0x6e70('0x19')]=function(_0x5ea7a5){var _0x28a21f=this;return new Promise(function(_0x173afe,_0x53acdc){return db['ZendeskAccount'][_0x6e70('0x1a')]({'raw':_0x5ea7a5[_0x6e70('0x1b')]?_0x5ea7a5[_0x6e70('0x1b')][_0x6e70('0x1c')]===undefined?!![]:![]:!![],'where':_0x5ea7a5[_0x6e70('0x1b')]?_0x5ea7a5[_0x6e70('0x1b')][_0x6e70('0x1d')]||null:null,'attributes':_0x5ea7a5[_0x6e70('0x1b')]?_0x5ea7a5[_0x6e70('0x1b')][_0x6e70('0x1e')]||null:null,'limit':_0x5ea7a5['options']?_0x5ea7a5[_0x6e70('0x1b')][_0x6e70('0x1f')]||null:null,'include':_0x5ea7a5[_0x6e70('0x1b')]?_0x5ea7a5['options'][_0x6e70('0x20')]?_[_0x6e70('0x21')](_0x5ea7a5[_0x6e70('0x1b')]['include'],function(_0x10fc91){return{'model':db[_0x10fc91['model']],'as':_0x10fc91['as'],'attributes':_0x10fc91['attributes'],'include':_0x10fc91['include']?_[_0x6e70('0x21')](_0x10fc91[_0x6e70('0x20')],function(_0x51d292){return{'model':db[_0x51d292[_0x6e70('0x22')]],'as':_0x51d292['as'],'attributes':_0x51d292[_0x6e70('0x1e')],'include':_0x51d292['include']?_[_0x6e70('0x21')](_0x51d292[_0x6e70('0x20')],function(_0x2bb231){return{'model':db[_0x2bb231['model']],'as':_0x2bb231['as'],'attributes':_0x2bb231['attributes']};}):[]};}):[]};}):[]:[]})[_0x6e70('0xe')](function(_0x3af17f){logger[_0x6e70('0xf')](_0x6e70('0x19'),_0x5ea7a5);logger[_0x6e70('0x12')]('GetZendeskAccount',_0x5ea7a5,JSON[_0x6e70('0x23')](_0x3af17f));_0x173afe(_0x3af17f);})[_0x6e70('0x18')](function(_0xecf336){logger[_0x6e70('0x14')](_0x6e70('0x19'),_0xecf336[_0x6e70('0x16')],_0x5ea7a5);_0x53acdc(_0x28a21f[_0x6e70('0x14')](0x1f4,_0xecf336[_0x6e70('0x16')]));});});};exports[_0x6e70('0x24')]=function(_0x3a5d30){var _0x4b1229=this;return new Promise(function(_0x1b27d8,_0x50d60b){return db[_0x6e70('0x25')]['find']({'raw':_0x3a5d30[_0x6e70('0x1b')]?_0x3a5d30[_0x6e70('0x1b')][_0x6e70('0x1c')]===undefined?!![]:![]:!![],'where':_0x3a5d30['options']?_0x3a5d30[_0x6e70('0x1b')][_0x6e70('0x1d')]||null:null,'attributes':_0x3a5d30['options']?_0x3a5d30[_0x6e70('0x1b')][_0x6e70('0x1e')]||null:null,'include':_0x3a5d30['options']?_0x3a5d30[_0x6e70('0x1b')][_0x6e70('0x20')]?_[_0x6e70('0x21')](_0x3a5d30[_0x6e70('0x1b')][_0x6e70('0x20')],function(_0x1e3e76){return{'model':db[_0x1e3e76[_0x6e70('0x22')]],'as':_0x1e3e76['as'],'attributes':_0x1e3e76[_0x6e70('0x1e')],'include':_0x1e3e76[_0x6e70('0x20')]?_[_0x6e70('0x21')](_0x1e3e76['include'],function(_0x3b9c06){return{'model':db[_0x3b9c06['model']],'as':_0x3b9c06['as'],'attributes':_0x3b9c06[_0x6e70('0x1e')],'include':_0x3b9c06[_0x6e70('0x20')]?_[_0x6e70('0x21')](_0x3b9c06[_0x6e70('0x20')],function(_0x233a83){return{'model':db[_0x233a83[_0x6e70('0x22')]],'as':_0x233a83['as'],'attributes':_0x233a83[_0x6e70('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x6e70('0xe')](function(_0x80bebb){logger[_0x6e70('0xf')](_0x6e70('0x24'),_0x3a5d30);logger[_0x6e70('0x12')](_0x6e70('0x24'),_0x3a5d30,JSON['stringify'](_0x80bebb));_0x1b27d8(_0x80bebb);})['catch'](function(_0x5424eb){logger[_0x6e70('0x14')](_0x6e70('0x24'),_0x5424eb[_0x6e70('0x16')],_0x3a5d30);_0x50d60b(_0x4b1229[_0x6e70('0x14')](0x1f4,_0x5424eb[_0x6e70('0x16')]));});});};
\ No newline at end of file
+var _0xcb91=['../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','attributes','include','map','model','then','ShowZendeskAccount','find','where','moment','bluebird','randomstring','ioredis'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x35485a,_0x91cdd4){_0x35485a=_0x35485a-0x0;var _0x5148e6=_0xcb91[_0x35485a];return _0x5148e6;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1cb9('0x0'));var BPromise=require(_0x1cb9('0x1'));var rs=require(_0x1cb9('0x2'));var fs=require('fs');var Redis=require(_0x1cb9('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x1cb9('0x4'));var logger=require(_0x1cb9('0x5'))('rpc');var config=require(_0x1cb9('0x6'));var jayson=require(_0x1cb9('0x7'));var client=jayson['client'][_0x1cb9('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3f7deb,_0x4ffe20,_0x38737d){return new BPromise(function(_0x12567c,_0x59d1be){return client[_0x1cb9('0x9')](_0x3f7deb,_0x38737d)['then'](function(_0x567139){logger[_0x1cb9('0xa')](_0x1cb9('0xb'),_0x4ffe20,_0x1cb9('0xc'));logger[_0x1cb9('0xd')](_0x1cb9('0xe'),_0x4ffe20,'request\x20sent',JSON[_0x1cb9('0xf')](_0x567139));if(_0x567139[_0x1cb9('0x10')]){if(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x11')]===0x1f4){logger[_0x1cb9('0x10')]('ZendeskAccount,\x20%s,\x20%s',_0x4ffe20,_0x567139['error']['message']);return _0x59d1be(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x12')]);}logger[_0x1cb9('0x10')](_0x1cb9('0xb'),_0x4ffe20,_0x567139['error'][_0x1cb9('0x12')]);return _0x12567c(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x12')]);}else{logger[_0x1cb9('0xa')](_0x1cb9('0xb'),_0x4ffe20,'request\x20sent');_0x12567c(_0x567139['result'][_0x1cb9('0x12')]);}})[_0x1cb9('0x13')](function(_0x3904b7){logger[_0x1cb9('0x10')](_0x1cb9('0xb'),_0x4ffe20,_0x3904b7);_0x59d1be(_0x3904b7);});});}exports[_0x1cb9('0x14')]=function(_0x23d3a9){var _0x4e1340=this;return new Promise(function(_0x479d43,_0x1b2fa6){return db[_0x1cb9('0x15')][_0x1cb9('0x16')]({'raw':_0x23d3a9[_0x1cb9('0x17')]?_0x23d3a9[_0x1cb9('0x17')][_0x1cb9('0x18')]===undefined?!![]:![]:!![],'where':_0x23d3a9[_0x1cb9('0x17')]?_0x23d3a9['options']['where']||null:null,'attributes':_0x23d3a9[_0x1cb9('0x17')]?_0x23d3a9['options'][_0x1cb9('0x19')]||null:null,'limit':_0x23d3a9[_0x1cb9('0x17')]?_0x23d3a9['options']['limit']||null:null,'include':_0x23d3a9[_0x1cb9('0x17')]?_0x23d3a9[_0x1cb9('0x17')][_0x1cb9('0x1a')]?_[_0x1cb9('0x1b')](_0x23d3a9[_0x1cb9('0x17')][_0x1cb9('0x1a')],function(_0x59ebea){return{'model':db[_0x59ebea['model']],'as':_0x59ebea['as'],'attributes':_0x59ebea[_0x1cb9('0x19')],'include':_0x59ebea['include']?_[_0x1cb9('0x1b')](_0x59ebea[_0x1cb9('0x1a')],function(_0x69b4c8){return{'model':db[_0x69b4c8[_0x1cb9('0x1c')]],'as':_0x69b4c8['as'],'attributes':_0x69b4c8[_0x1cb9('0x19')],'include':_0x69b4c8['include']?_[_0x1cb9('0x1b')](_0x69b4c8[_0x1cb9('0x1a')],function(_0x4c8d76){return{'model':db[_0x4c8d76[_0x1cb9('0x1c')]],'as':_0x4c8d76['as'],'attributes':_0x4c8d76[_0x1cb9('0x19')]};}):[]};}):[]};}):[]:[]})[_0x1cb9('0x1d')](function(_0x1804fd){logger[_0x1cb9('0xa')](_0x1cb9('0x14'),_0x23d3a9);logger[_0x1cb9('0xd')](_0x1cb9('0x14'),_0x23d3a9,JSON[_0x1cb9('0xf')](_0x1804fd));_0x479d43(_0x1804fd);})[_0x1cb9('0x13')](function(_0x48888d){logger[_0x1cb9('0x10')]('GetZendeskAccount',_0x48888d[_0x1cb9('0x12')],_0x23d3a9);_0x1b2fa6(_0x4e1340['error'](0x1f4,_0x48888d[_0x1cb9('0x12')]));});});};exports[_0x1cb9('0x1e')]=function(_0x3cd7f5){var _0x2038aa=this;return new Promise(function(_0x561d89,_0x1c701f){return db['ZendeskAccount'][_0x1cb9('0x1f')]({'raw':_0x3cd7f5[_0x1cb9('0x17')]?_0x3cd7f5[_0x1cb9('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x3cd7f5[_0x1cb9('0x17')]?_0x3cd7f5['options'][_0x1cb9('0x20')]||null:null,'attributes':_0x3cd7f5['options']?_0x3cd7f5[_0x1cb9('0x17')][_0x1cb9('0x19')]||null:null,'include':_0x3cd7f5[_0x1cb9('0x17')]?_0x3cd7f5[_0x1cb9('0x17')]['include']?_[_0x1cb9('0x1b')](_0x3cd7f5[_0x1cb9('0x17')][_0x1cb9('0x1a')],function(_0x91a1db){return{'model':db[_0x91a1db[_0x1cb9('0x1c')]],'as':_0x91a1db['as'],'attributes':_0x91a1db[_0x1cb9('0x19')],'include':_0x91a1db[_0x1cb9('0x1a')]?_[_0x1cb9('0x1b')](_0x91a1db[_0x1cb9('0x1a')],function(_0x1de287){return{'model':db[_0x1de287[_0x1cb9('0x1c')]],'as':_0x1de287['as'],'attributes':_0x1de287[_0x1cb9('0x19')],'include':_0x1de287[_0x1cb9('0x1a')]?_['map'](_0x1de287['include'],function(_0x299ff8){return{'model':db[_0x299ff8[_0x1cb9('0x1c')]],'as':_0x299ff8['as'],'attributes':_0x299ff8[_0x1cb9('0x19')]};}):[]};}):[]};}):[]:[]})[_0x1cb9('0x1d')](function(_0x385daa){logger[_0x1cb9('0xa')](_0x1cb9('0x1e'),_0x3cd7f5);logger[_0x1cb9('0xd')]('ShowZendeskAccount',_0x3cd7f5,JSON[_0x1cb9('0xf')](_0x385daa));_0x561d89(_0x385daa);})[_0x1cb9('0x13')](function(_0xefe136){logger['error'](_0x1cb9('0x1e'),_0xefe136['message'],_0x3cd7f5);_0x1c701f(_0x2038aa[_0x1cb9('0x10')](0x1f4,_0xefe136['message']));});});};
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/index.js b/server/api/intZendeskConfiguration/index.js
index 41681a7..ee3eafe 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 _0x7185=['getTags','post','setTags','put','/:id','delete','destroy','exports','util','connect-timeout','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags'];(function(_0x4f808b,_0xe5dc1e){var _0x5d15bc=function(_0x4f1ee7){while(--_0x4f1ee7){_0x4f808b['push'](_0x4f808b['shift']());}};_0x5d15bc(++_0xe5dc1e);}(_0x7185,0xe4));var _0x5718=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x7185[_0x40a045];return _0x1a687c;};'use strict';var multer=require('multer');var util=require(_0x5718('0x0'));var path=require('path');var timeout=require(_0x5718('0x1'));var express=require('express');var router=express['Router']();var auth=require(_0x5718('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0x5718('0x3'));var controller=require('./intZendeskConfiguration.controller');router[_0x5718('0x4')]('/',auth[_0x5718('0x5')](),controller[_0x5718('0x6')]);router[_0x5718('0x4')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x5718('0x4')](_0x5718('0x7'),auth[_0x5718('0x5')](),controller[_0x5718('0x8')]);router[_0x5718('0x4')](_0x5718('0x9'),auth[_0x5718('0x5')](),controller[_0x5718('0xa')]);router[_0x5718('0x4')](_0x5718('0xb'),auth['isAuthenticated'](),controller[_0x5718('0xc')]);router[_0x5718('0x4')](_0x5718('0xd'),auth['isAuthenticated'](),controller[_0x5718('0xe')]);router[_0x5718('0xf')]('/',auth[_0x5718('0x5')](),controller['create']);router[_0x5718('0xf')](_0x5718('0xd'),auth[_0x5718('0x5')](),controller[_0x5718('0x10')]);router[_0x5718('0x11')](_0x5718('0x12'),auth['isAuthenticated'](),controller['update']);router[_0x5718('0x13')](_0x5718('0x12'),auth[_0x5718('0x5')](),controller[_0x5718('0x14')]);module[_0x5718('0x15')]=router;
\ No newline at end of file
+var _0x8521=['express','Router','../../components/interaction/service','../../config/environment','./intZendeskConfiguration.controller','get','isAuthenticated','index','show','/:id/fields','getFields','getSubjects','/:id/tags','getTags','create','post','setTags','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x5cde6f,_0x3d0cc5){var _0x2f3e6e=function(_0x561a5c){while(--_0x561a5c){_0x5cde6f['push'](_0x5cde6f['shift']());}};_0x2f3e6e(++_0x3d0cc5);}(_0x8521,0x1ac));var _0x1852=function(_0xf56b28,_0x18eb5c){_0xf56b28=_0xf56b28-0x0;var _0x4aae66=_0x8521[_0xf56b28];return _0x4aae66;};'use strict';var multer=require(_0x1852('0x0'));var util=require(_0x1852('0x1'));var path=require(_0x1852('0x2'));var timeout=require(_0x1852('0x3'));var express=require(_0x1852('0x4'));var router=express[_0x1852('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x1852('0x6'));var config=require(_0x1852('0x7'));var controller=require(_0x1852('0x8'));router[_0x1852('0x9')]('/',auth[_0x1852('0xa')](),controller[_0x1852('0xb')]);router[_0x1852('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x1852('0xc')]);router[_0x1852('0x9')](_0x1852('0xd'),auth['isAuthenticated'](),controller[_0x1852('0xe')]);router[_0x1852('0x9')]('/:id/subjects',auth[_0x1852('0xa')](),controller[_0x1852('0xf')]);router[_0x1852('0x9')]('/:id/descriptions',auth[_0x1852('0xa')](),controller['getDescriptions']);router[_0x1852('0x9')](_0x1852('0x10'),auth[_0x1852('0xa')](),controller[_0x1852('0x11')]);router['post']('/',auth[_0x1852('0xa')](),controller[_0x1852('0x12')]);router[_0x1852('0x13')]('/:id/tags',auth[_0x1852('0xa')](),controller[_0x1852('0x14')]);router[_0x1852('0x15')](_0x1852('0x16'),auth[_0x1852('0xa')](),controller[_0x1852('0x17')]);router[_0x1852('0x18')]('/:id',auth[_0x1852('0xa')](),controller[_0x1852('0x19')]);module[_0x1852('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js
index 4754e1d..0182009 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 _0x09e8=['STRING','sequelize'];(function(_0x54b283,_0x5eb8a6){var _0x2462b3=function(_0x13fca7){while(--_0x13fca7){_0x54b283['push'](_0x54b283['shift']());}};_0x2462b3(++_0x5eb8a6);}(_0x09e8,0x199));var _0x809e=function(_0x146ebe,_0x3f0d8b){_0x146ebe=_0x146ebe-0x0;var _0x41d09a=_0x09e8[_0x146ebe];return _0x41d09a;};'use strict';var Sequelize=require(_0x809e('0x0'));module['exports']={'name':{'type':Sequelize[_0x809e('0x1')]},'description':{'type':Sequelize[_0x809e('0x1')]}};
\ No newline at end of file
+var _0xe88d=['sequelize','exports','STRING'];(function(_0x223b3e,_0x3aa1aa){var _0x394aa4=function(_0x5a0b3d){while(--_0x5a0b3d){_0x223b3e['push'](_0x223b3e['shift']());}};_0x394aa4(++_0x3aa1aa);}(_0xe88d,0x1f2));var _0xde88=function(_0x40d8d7,_0x30dd5e){_0x40d8d7=_0x40d8d7-0x0;var _0x3454cc=_0xe88d[_0x40d8d7];return _0x3454cc;};'use strict';var Sequelize=require(_0xde88('0x0'));module[_0xde88('0x1')]={'name':{'type':Sequelize[_0xde88('0x2')]},'description':{'type':Sequelize[_0xde88('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js
index 7b289cd..b18d3be 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 _0xc4aa=['ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','sendStatus','status','end','json','offset','limit','Content-Range','apply','reject','update','destroy','stack','send','index','map','ZendeskConfiguration','fieldName','type','model','keys','query','attributes','intersection','fields','length','order','sort','where','filters','pick','filter','merge','VIRTUAL','name','options','count','includeAll','rows','show','rawAttributes','include','create','body','find','params','getFields','ZendeskField','getSubjects','hasOwnProperty','nolimit','getDescriptions','findOne','getTags','setTags','ids','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../mysqldb','jayson/promise','client','test','Sequelize'];(function(_0x2405bc,_0x2f28a1){var _0x5272d4=function(_0x225294){while(--_0x225294){_0x2405bc['push'](_0x2405bc['shift']());}};_0x5272d4(++_0x2f28a1);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x2064e5,_0x4f6fa2){_0x2064e5=_0x2064e5-0x0;var _0x21a233=_0xc4aa[_0x2064e5];return _0x21a233;};'use strict';var pdf=require(_0xac4a('0x0'));var emlformat=require(_0xac4a('0x1'));var rimraf=require(_0xac4a('0x2'));var zipdir=require(_0xac4a('0x3'));var jsonpatch=require(_0xac4a('0x4'));var rp=require(_0xac4a('0x5'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xac4a('0x6'));var path=require(_0xac4a('0x7'));var sox=require(_0xac4a('0x8'));var csv=require(_0xac4a('0x9'));var ejs=require(_0xac4a('0xa'));var fs=require('fs');var _=require(_0xac4a('0xb'));var squel=require(_0xac4a('0xc'));var crypto=require(_0xac4a('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xac4a('0x9'));var querystring=require(_0xac4a('0xe'));var Papa=require(_0xac4a('0xf'));var Redis=require('ioredis');var authService=require(_0xac4a('0x10'));var qs=require(_0xac4a('0x11'));var as=require(_0xac4a('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xac4a('0x13'))('api');var utils=require(_0xac4a('0x14'));var config=require('../../config/environment');var db=require(_0xac4a('0x15'))['db'];var jayson=require(_0xac4a('0x16'));var client=jayson[_0xac4a('0x17')]['http']({'port':0x232a});function checkPasswordPattern(_0x21a79,_0x68424a,_0x247b78){if(_0x247b78){var _0x6e00d4=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x6e00d4[_0xac4a('0x18')](_0x68424a)){return _0x21a79;}else{throw new db[(_0xac4a('0x19'))][(_0xac4a('0x1a'))](_0xac4a('0x1b'));}}else{return _0x21a79;}}function respondWithRpcPromise(_0x190418,_0x42c7fc,_0x11e101,_0x26dbb8){return new BPromise(function(_0x4a2119,_0x402fff){var _0x34d797=_0x26dbb8||client;return _0x34d797[_0xac4a('0x1c')](_0x190418,_0x11e101)[_0xac4a('0x1d')](function(_0x3e88e3){logger[_0xac4a('0x1e')](_0xac4a('0x1f'),_0x42c7fc,_0xac4a('0x20'));logger['debug']('ZendeskConfiguration,\x20%s,\x20%s,\x20%s',_0x42c7fc,_0xac4a('0x20'),JSON[_0xac4a('0x21')](_0x3e88e3));if(_0x3e88e3[_0xac4a('0x22')]){if(_0x3e88e3['error'][_0xac4a('0x23')]===0x1f4){logger[_0xac4a('0x22')](_0xac4a('0x1f'),_0x42c7fc,_0x3e88e3[_0xac4a('0x22')][_0xac4a('0x24')]);return _0x402fff(_0x3e88e3[_0xac4a('0x22')][_0xac4a('0x24')]);}logger[_0xac4a('0x22')]('ZendeskConfiguration,\x20%s,\x20%s',_0x42c7fc,_0x3e88e3[_0xac4a('0x22')][_0xac4a('0x24')]);return _0x4a2119(_0x3e88e3['error'][_0xac4a('0x24')]);}else{logger[_0xac4a('0x1e')](_0xac4a('0x1f'),_0x42c7fc,_0xac4a('0x20'));_0x4a2119(_0x3e88e3['result'][_0xac4a('0x24')]);}})[_0xac4a('0x25')](function(_0x15435c){logger[_0xac4a('0x22')](_0xac4a('0x1f'),_0x42c7fc,_0x15435c);_0x402fff(_0x15435c);});});}function respondWithStatusCode(_0x2b0dc2,_0x222507){_0x222507=_0x222507||0xcc;return function(_0x36054a){if(_0x36054a){return _0x2b0dc2[_0xac4a('0x26')](_0x222507);}return _0x2b0dc2[_0xac4a('0x27')](_0x222507)[_0xac4a('0x28')]();};}function respondWithResult(_0x215a31,_0x14832b){_0x14832b=_0x14832b||0xc8;return function(_0x472c57){if(_0x472c57){return _0x215a31[_0xac4a('0x27')](_0x14832b)[_0xac4a('0x29')](_0x472c57);}};}function respondWithFilteredResult(_0x4e17ce,_0x23b061){return function(_0x267a22){if(_0x267a22){var _0x42a33c=_0x267a22['count'],_0x2772fe=_0x23b061[_0xac4a('0x2a')],_0x116700=_0x23b061[_0xac4a('0x2a')]+_0x23b061[_0xac4a('0x2b')],_0x4a5a9e;if(_0x116700>=_0x42a33c){_0x116700=_0x42a33c;_0x4a5a9e=0xc8;}else{_0x4a5a9e=0xce;}_0x4e17ce['status'](_0x4a5a9e);return _0x4e17ce['set'](_0xac4a('0x2c'),_0x2772fe+'-'+_0x116700+'/'+_0x42a33c)[_0xac4a('0x29')](_0x267a22);}return null;};}function patchUpdates(_0x228629){return function(_0x432066){try{jsonpatch[_0xac4a('0x2d')](_0x432066,_0x228629,!![]);}catch(_0x53d3a5){return BPromise[_0xac4a('0x2e')](_0x53d3a5);}return _0x432066['save']();};}function saveUpdates(_0x30364b,_0x57adcf){return function(_0x17e6de){if(_0x17e6de){return _0x17e6de[_0xac4a('0x2f')](_0x30364b)[_0xac4a('0x1d')](function(_0x228aa7){return _0x228aa7;});}return null;};}function removeEntity(_0x34577f,_0x61e552){return function(_0xbd4591){if(_0xbd4591){return _0xbd4591[_0xac4a('0x30')]()[_0xac4a('0x1d')](function(){_0x34577f[_0xac4a('0x27')](0xcc)[_0xac4a('0x28')]();});}};}function handleEntityNotFound(_0x1634df,_0x1a9be2){return function(_0x1a9d4e){if(!_0x1a9d4e){_0x1634df['sendStatus'](0x194);}return _0x1a9d4e;};}function handleError(_0x30442d,_0x1c41fb){_0x1c41fb=_0x1c41fb||0x1f4;return function(_0x5a4e2b){logger[_0xac4a('0x22')](_0x5a4e2b[_0xac4a('0x31')]);if(_0x5a4e2b['name']){delete _0x5a4e2b['name'];}_0x30442d[_0xac4a('0x27')](_0x1c41fb)[_0xac4a('0x32')](_0x5a4e2b);};}exports[_0xac4a('0x33')]=function(_0x3de9e2,_0x4f5986){var _0x453d02={},_0x2e56c6={},_0x4e7630={'count':0x0,'rows':[]};var _0x37f2ee=_[_0xac4a('0x34')](db[_0xac4a('0x35')]['rawAttributes'],function(_0x121328){return{'name':_0x121328[_0xac4a('0x36')],'type':_0x121328[_0xac4a('0x37')]['key']};});_0x2e56c6[_0xac4a('0x38')]=_[_0xac4a('0x34')](_0x37f2ee,'name');_0x2e56c6['query']=_[_0xac4a('0x39')](_0x3de9e2['query']);_0x2e56c6['filters']=_['intersection'](_0x2e56c6['model'],_0x2e56c6[_0xac4a('0x3a')]);_0x453d02[_0xac4a('0x3b')]=_[_0xac4a('0x3c')](_0x2e56c6[_0xac4a('0x38')],qs[_0xac4a('0x3d')](_0x3de9e2[_0xac4a('0x3a')][_0xac4a('0x3d')]));_0x453d02[_0xac4a('0x3b')]=_0x453d02[_0xac4a('0x3b')][_0xac4a('0x3e')]?_0x453d02[_0xac4a('0x3b')]:_0x2e56c6[_0xac4a('0x38')];if(!_0x3de9e2['query']['hasOwnProperty']('nolimit')){_0x453d02[_0xac4a('0x2b')]=qs[_0xac4a('0x2b')](_0x3de9e2[_0xac4a('0x3a')][_0xac4a('0x2b')]);_0x453d02[_0xac4a('0x2a')]=qs[_0xac4a('0x2a')](_0x3de9e2[_0xac4a('0x3a')][_0xac4a('0x2a')]);}_0x453d02[_0xac4a('0x3f')]=qs[_0xac4a('0x40')](_0x3de9e2['query'][_0xac4a('0x40')]);_0x453d02[_0xac4a('0x41')]=qs[_0xac4a('0x42')](_[_0xac4a('0x43')](_0x3de9e2[_0xac4a('0x3a')],_0x2e56c6['filters']));if(_0x3de9e2[_0xac4a('0x3a')][_0xac4a('0x44')]){_0x453d02['where']=_[_0xac4a('0x45')](_0x453d02['where'],{'$or':_[_0xac4a('0x34')](_0x37f2ee,function(_0x65494e){if(_0x65494e[_0xac4a('0x37')]!==_0xac4a('0x46')){var _0x520e4a={};_0x520e4a[_0x65494e[_0xac4a('0x47')]]={'$like':'%'+_0x3de9e2[_0xac4a('0x3a')][_0xac4a('0x44')]+'%'};return _0x520e4a;}})});}_0x453d02=_[_0xac4a('0x45')]({},_0x453d02,_0x3de9e2[_0xac4a('0x48')]);var _0x4fa9eb={'where':_0x453d02[_0xac4a('0x41')]};return db['ZendeskConfiguration'][_0xac4a('0x49')](_0x4fa9eb)[_0xac4a('0x1d')](function(_0xeca4e9){_0x4e7630['count']=_0xeca4e9;if(_0x3de9e2[_0xac4a('0x3a')][_0xac4a('0x4a')]){_0x453d02['include']=[{'all':!![]}];}return db[_0xac4a('0x35')]['findAll'](_0x453d02);})[_0xac4a('0x1d')](function(_0xe620f6){_0x4e7630[_0xac4a('0x4b')]=_0xe620f6;return _0x4e7630;})['then'](respondWithFilteredResult(_0x4f5986,_0x453d02))['catch'](handleError(_0x4f5986,null));};exports[_0xac4a('0x4c')]=function(_0x4aaeff,_0x18ae96){var _0x566258={'raw':![],'where':{'id':_0x4aaeff['params']['id']}},_0x3d2aaf={};_0x3d2aaf[_0xac4a('0x38')]=_[_0xac4a('0x39')](db[_0xac4a('0x35')][_0xac4a('0x4d')]);_0x3d2aaf['query']=_[_0xac4a('0x39')](_0x4aaeff[_0xac4a('0x3a')]);_0x3d2aaf[_0xac4a('0x42')]=_[_0xac4a('0x3c')](_0x3d2aaf[_0xac4a('0x38')],_0x3d2aaf[_0xac4a('0x3a')]);_0x566258[_0xac4a('0x3b')]=_['intersection'](_0x3d2aaf[_0xac4a('0x38')],qs[_0xac4a('0x3d')](_0x4aaeff['query'][_0xac4a('0x3d')]));_0x566258[_0xac4a('0x3b')]=_0x566258[_0xac4a('0x3b')][_0xac4a('0x3e')]?_0x566258['attributes']:_0x3d2aaf[_0xac4a('0x38')];if(_0x4aaeff[_0xac4a('0x3a')][_0xac4a('0x4a')]){_0x566258[_0xac4a('0x4e')]=[{'all':!![]}];}_0x566258=_[_0xac4a('0x45')]({},_0x566258,_0x4aaeff['options']);return db[_0xac4a('0x35')]['find'](_0x566258)[_0xac4a('0x1d')](handleEntityNotFound(_0x18ae96,null))[_0xac4a('0x1d')](respondWithResult(_0x18ae96,null))['catch'](handleError(_0x18ae96,null));};exports['create']=function(_0x437466,_0x70fdc3){return db['ZendeskConfiguration'][_0xac4a('0x4f')](_0x437466[_0xac4a('0x50')],{})[_0xac4a('0x1d')](respondWithResult(_0x70fdc3,0xc9))[_0xac4a('0x25')](handleError(_0x70fdc3,null));};exports['update']=function(_0x3057d6,_0x108f7c){if(_0x3057d6[_0xac4a('0x50')]['id']){delete _0x3057d6[_0xac4a('0x50')]['id'];}return db[_0xac4a('0x35')][_0xac4a('0x51')]({'where':{'id':_0x3057d6[_0xac4a('0x52')]['id']}})['then'](handleEntityNotFound(_0x108f7c,null))[_0xac4a('0x1d')](saveUpdates(_0x3057d6[_0xac4a('0x50')],null))[_0xac4a('0x1d')](respondWithResult(_0x108f7c,null))[_0xac4a('0x25')](handleError(_0x108f7c,null));};exports[_0xac4a('0x30')]=function(_0x2ac1e9,_0x213df2){return db[_0xac4a('0x35')][_0xac4a('0x51')]({'where':{'id':_0x2ac1e9[_0xac4a('0x52')]['id']}})[_0xac4a('0x1d')](handleEntityNotFound(_0x213df2,null))[_0xac4a('0x1d')](removeEntity(_0x213df2,null))[_0xac4a('0x25')](handleError(_0x213df2,null));};exports[_0xac4a('0x53')]=function(_0x5222f3,_0x11c753,_0x492aae){var _0x13a577={};var _0x479ebc={};var _0x2d598e;var _0x4b7f79;return db[_0xac4a('0x35')]['findOne']({'where':{'id':_0x5222f3[_0xac4a('0x52')]['id']}})['then'](handleEntityNotFound(_0x11c753,null))['then'](function(_0x52c957){if(_0x52c957){_0x2d598e=_0x52c957;_0x479ebc[_0xac4a('0x38')]=_[_0xac4a('0x39')](db[_0xac4a('0x54')][_0xac4a('0x4d')]);_0x479ebc[_0xac4a('0x3a')]=_['keys'](_0x5222f3[_0xac4a('0x3a')]);_0x479ebc['filters']=_[_0xac4a('0x3c')](_0x479ebc['model'],_0x479ebc[_0xac4a('0x3a')]);_0x13a577[_0xac4a('0x3b')]=_[_0xac4a('0x3c')](_0x479ebc[_0xac4a('0x38')],qs[_0xac4a('0x3d')](_0x5222f3[_0xac4a('0x3a')][_0xac4a('0x3d')]));_0x13a577[_0xac4a('0x3b')]=_0x13a577[_0xac4a('0x3b')][_0xac4a('0x3e')]?_0x13a577[_0xac4a('0x3b')]:_0x479ebc[_0xac4a('0x38')];_0x13a577[_0xac4a('0x3f')]=qs[_0xac4a('0x40')](_0x5222f3[_0xac4a('0x3a')][_0xac4a('0x40')]);_0x13a577[_0xac4a('0x41')]=qs['filters'](_[_0xac4a('0x43')](_0x5222f3[_0xac4a('0x3a')],_0x479ebc['filters']));if(_0x5222f3[_0xac4a('0x3a')][_0xac4a('0x44')]){_0x13a577[_0xac4a('0x41')]=_[_0xac4a('0x45')](_0x13a577[_0xac4a('0x41')],{'$or':_['map'](_0x13a577['attributes'],function(_0x45f3c3){var _0x11bb54={};_0x11bb54[_0x45f3c3]={'$like':'%'+_0x5222f3[_0xac4a('0x3a')][_0xac4a('0x44')]+'%'};return _0x11bb54;})});}_0x13a577=_[_0xac4a('0x45')]({},_0x13a577,_0x5222f3[_0xac4a('0x48')]);return _0x2d598e[_0xac4a('0x53')](_0x13a577);}})[_0xac4a('0x1d')](function(_0x44c60b){if(_0x44c60b){_0x4b7f79=_0x44c60b[_0xac4a('0x3e')];if(!_0x5222f3[_0xac4a('0x3a')]['hasOwnProperty']('nolimit')){_0x13a577[_0xac4a('0x2b')]=qs[_0xac4a('0x2b')](_0x5222f3[_0xac4a('0x3a')][_0xac4a('0x2b')]);_0x13a577[_0xac4a('0x2a')]=qs[_0xac4a('0x2a')](_0x5222f3[_0xac4a('0x3a')][_0xac4a('0x2a')]);}return _0x2d598e[_0xac4a('0x53')](_0x13a577);}})[_0xac4a('0x1d')](function(_0xb09b89){if(_0xb09b89){return _0xb09b89?{'count':_0x4b7f79,'rows':_0xb09b89}:null;}})[_0xac4a('0x1d')](respondWithResult(_0x11c753,null))['catch'](handleError(_0x11c753,null));};exports[_0xac4a('0x55')]=function(_0xc74ce8,_0x26bd31,_0x231932){var _0x513976={};var _0xc61e94={};var _0x5a30af;var _0xab4305;return db[_0xac4a('0x35')]['findOne']({'where':{'id':_0xc74ce8['params']['id']}})[_0xac4a('0x1d')](handleEntityNotFound(_0x26bd31,null))[_0xac4a('0x1d')](function(_0x13097f){if(_0x13097f){_0x5a30af=_0x13097f;_0xc61e94['model']=_[_0xac4a('0x39')](db['ZendeskField'][_0xac4a('0x4d')]);_0xc61e94['query']=_['keys'](_0xc74ce8[_0xac4a('0x3a')]);_0xc61e94['filters']=_[_0xac4a('0x3c')](_0xc61e94['model'],_0xc61e94[_0xac4a('0x3a')]);_0x513976[_0xac4a('0x3b')]=_['intersection'](_0xc61e94[_0xac4a('0x38')],qs['fields'](_0xc74ce8[_0xac4a('0x3a')][_0xac4a('0x3d')]));_0x513976['attributes']=_0x513976[_0xac4a('0x3b')]['length']?_0x513976['attributes']:_0xc61e94[_0xac4a('0x38')];_0x513976['order']=qs[_0xac4a('0x40')](_0xc74ce8['query']['sort']);_0x513976[_0xac4a('0x41')]=qs[_0xac4a('0x42')](_[_0xac4a('0x43')](_0xc74ce8['query'],_0xc61e94['filters']));if(_0xc74ce8[_0xac4a('0x3a')][_0xac4a('0x44')]){_0x513976['where']=_['merge'](_0x513976[_0xac4a('0x41')],{'$or':_[_0xac4a('0x34')](_0x513976[_0xac4a('0x3b')],function(_0x36df3d){var _0x1810f7={};_0x1810f7[_0x36df3d]={'$like':'%'+_0xc74ce8[_0xac4a('0x3a')][_0xac4a('0x44')]+'%'};return _0x1810f7;})});}_0x513976=_[_0xac4a('0x45')]({},_0x513976,_0xc74ce8[_0xac4a('0x48')]);return _0x5a30af['getSubjects'](_0x513976);}})[_0xac4a('0x1d')](function(_0x440dc4){if(_0x440dc4){_0xab4305=_0x440dc4[_0xac4a('0x3e')];if(!_0xc74ce8['query'][_0xac4a('0x56')](_0xac4a('0x57'))){_0x513976[_0xac4a('0x2b')]=qs[_0xac4a('0x2b')](_0xc74ce8[_0xac4a('0x3a')]['limit']);_0x513976[_0xac4a('0x2a')]=qs[_0xac4a('0x2a')](_0xc74ce8[_0xac4a('0x3a')][_0xac4a('0x2a')]);}return _0x5a30af[_0xac4a('0x55')](_0x513976);}})[_0xac4a('0x1d')](function(_0xd7bdd6){if(_0xd7bdd6){return _0xd7bdd6?{'count':_0xab4305,'rows':_0xd7bdd6}:null;}})['then'](respondWithResult(_0x26bd31,null))[_0xac4a('0x25')](handleError(_0x26bd31,null));};exports[_0xac4a('0x58')]=function(_0x19bd6f,_0x35a97c,_0x1bb24d){var _0x171c47={};var _0x547eec={};var _0x318bee;var _0x29c772;return db[_0xac4a('0x35')][_0xac4a('0x59')]({'where':{'id':_0x19bd6f['params']['id']}})[_0xac4a('0x1d')](handleEntityNotFound(_0x35a97c,null))['then'](function(_0x4447b5){if(_0x4447b5){_0x318bee=_0x4447b5;_0x547eec[_0xac4a('0x38')]=_['keys'](db['ZendeskField'][_0xac4a('0x4d')]);_0x547eec[_0xac4a('0x3a')]=_[_0xac4a('0x39')](_0x19bd6f['query']);_0x547eec[_0xac4a('0x42')]=_['intersection'](_0x547eec[_0xac4a('0x38')],_0x547eec[_0xac4a('0x3a')]);_0x171c47[_0xac4a('0x3b')]=_[_0xac4a('0x3c')](_0x547eec[_0xac4a('0x38')],qs['fields'](_0x19bd6f['query'][_0xac4a('0x3d')]));_0x171c47[_0xac4a('0x3b')]=_0x171c47[_0xac4a('0x3b')][_0xac4a('0x3e')]?_0x171c47[_0xac4a('0x3b')]:_0x547eec[_0xac4a('0x38')];_0x171c47[_0xac4a('0x3f')]=qs[_0xac4a('0x40')](_0x19bd6f['query']['sort']);_0x171c47[_0xac4a('0x41')]=qs[_0xac4a('0x42')](_[_0xac4a('0x43')](_0x19bd6f[_0xac4a('0x3a')],_0x547eec[_0xac4a('0x42')]));if(_0x19bd6f[_0xac4a('0x3a')][_0xac4a('0x44')]){_0x171c47[_0xac4a('0x41')]=_['merge'](_0x171c47['where'],{'$or':_[_0xac4a('0x34')](_0x171c47[_0xac4a('0x3b')],function(_0x22804e){var _0x371e06={};_0x371e06[_0x22804e]={'$like':'%'+_0x19bd6f[_0xac4a('0x3a')][_0xac4a('0x44')]+'%'};return _0x371e06;})});}_0x171c47=_[_0xac4a('0x45')]({},_0x171c47,_0x19bd6f['options']);return _0x318bee[_0xac4a('0x58')](_0x171c47);}})[_0xac4a('0x1d')](function(_0x3439f3){if(_0x3439f3){_0x29c772=_0x3439f3['length'];if(!_0x19bd6f[_0xac4a('0x3a')][_0xac4a('0x56')](_0xac4a('0x57'))){_0x171c47[_0xac4a('0x2b')]=qs[_0xac4a('0x2b')](_0x19bd6f[_0xac4a('0x3a')][_0xac4a('0x2b')]);_0x171c47[_0xac4a('0x2a')]=qs[_0xac4a('0x2a')](_0x19bd6f['query'][_0xac4a('0x2a')]);}return _0x318bee['getDescriptions'](_0x171c47);}})[_0xac4a('0x1d')](function(_0x1199f6){if(_0x1199f6){return _0x1199f6?{'count':_0x29c772,'rows':_0x1199f6}:null;}})[_0xac4a('0x1d')](respondWithResult(_0x35a97c,null))[_0xac4a('0x25')](handleError(_0x35a97c,null));};exports[_0xac4a('0x5a')]=function(_0x337da7,_0x19766a,_0x5266d3){var _0x2b883a={};var _0x42b3f7={};var _0x279f9b;var _0x3315e7;return db[_0xac4a('0x35')]['findOne']({'where':{'id':_0x337da7[_0xac4a('0x52')]['id']}})[_0xac4a('0x1d')](handleEntityNotFound(_0x19766a,null))['then'](function(_0x55af32){if(_0x55af32){_0x279f9b=_0x55af32;_0x42b3f7[_0xac4a('0x38')]=_[_0xac4a('0x39')](db['Tag'][_0xac4a('0x4d')]);_0x42b3f7[_0xac4a('0x3a')]=_[_0xac4a('0x39')](_0x337da7[_0xac4a('0x3a')]);_0x42b3f7[_0xac4a('0x42')]=_[_0xac4a('0x3c')](_0x42b3f7['model'],_0x42b3f7[_0xac4a('0x3a')]);_0x2b883a[_0xac4a('0x3b')]=_[_0xac4a('0x3c')](_0x42b3f7['model'],qs[_0xac4a('0x3d')](_0x337da7[_0xac4a('0x3a')][_0xac4a('0x3d')]));_0x2b883a[_0xac4a('0x3b')]=_0x2b883a[_0xac4a('0x3b')][_0xac4a('0x3e')]?_0x2b883a['attributes']:_0x42b3f7[_0xac4a('0x38')];_0x2b883a[_0xac4a('0x3f')]=qs['sort'](_0x337da7[_0xac4a('0x3a')]['sort']);_0x2b883a[_0xac4a('0x41')]=qs[_0xac4a('0x42')](_['pick'](_0x337da7[_0xac4a('0x3a')],_0x42b3f7['filters']));if(_0x337da7[_0xac4a('0x3a')]['filter']){_0x2b883a[_0xac4a('0x41')]=_[_0xac4a('0x45')](_0x2b883a[_0xac4a('0x41')],{'$or':_[_0xac4a('0x34')](_0x2b883a[_0xac4a('0x3b')],function(_0x36d8ff){var _0x7e403a={};_0x7e403a[_0x36d8ff]={'$like':'%'+_0x337da7[_0xac4a('0x3a')][_0xac4a('0x44')]+'%'};return _0x7e403a;})});}_0x2b883a=_[_0xac4a('0x45')]({},_0x2b883a,_0x337da7[_0xac4a('0x48')]);return _0x279f9b[_0xac4a('0x5a')](_0x2b883a);}})[_0xac4a('0x1d')](function(_0x4217df){if(_0x4217df){_0x3315e7=_0x4217df['length'];if(!_0x337da7[_0xac4a('0x3a')][_0xac4a('0x56')]('nolimit')){_0x2b883a[_0xac4a('0x2b')]=qs[_0xac4a('0x2b')](_0x337da7[_0xac4a('0x3a')][_0xac4a('0x2b')]);_0x2b883a[_0xac4a('0x2a')]=qs['offset'](_0x337da7[_0xac4a('0x3a')]['offset']);}return _0x279f9b[_0xac4a('0x5a')](_0x2b883a);}})[_0xac4a('0x1d')](function(_0x240ff1){if(_0x240ff1){return _0x240ff1?{'count':_0x3315e7,'rows':_0x240ff1}:null;}})[_0xac4a('0x1d')](respondWithResult(_0x19766a,null))['catch'](handleError(_0x19766a,null));};exports[_0xac4a('0x5b')]=function(_0x55866d,_0x277fd1,_0x40d363){if(_0x55866d[_0xac4a('0x50')]['id']){delete _0x55866d['body']['id'];}return db[_0xac4a('0x35')][_0xac4a('0x59')]({'where':{'id':_0x55866d[_0xac4a('0x52')]['id']}})['then'](handleEntityNotFound(_0x277fd1,null))[_0xac4a('0x1d')](function(_0x25639a){if(_0x25639a){return _0x25639a[_0xac4a('0x5b')](_0x55866d[_0xac4a('0x50')][_0xac4a('0x5c')]||[]);}return null;})[_0xac4a('0x1d')](respondWithResult(_0x277fd1,null))[_0xac4a('0x25')](handleError(_0x277fd1,null));};
\ No newline at end of file
+var _0x1261=['update','then','destroy','stack','name','send','index','map','ZendeskConfiguration','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','count','includeAll','findAll','rows','catch','show','include','create','body','find','params','getFields','findOne','where','options','getSubjects','ZendeskField','getDescriptions','Tag','getTags','setTags','ids','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../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','info','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','ZendeskConfiguration,\x20%s,\x20%s','message','request\x20sent','sendStatus','status','offset','limit','set','apply','save'];(function(_0x376b45,_0x5964fb){var _0x2341b3=function(_0x5a7f01){while(--_0x5a7f01){_0x376b45['push'](_0x376b45['shift']());}};_0x2341b3(++_0x5964fb);}(_0x1261,0x144));var _0x1126=function(_0xb85fd5,_0x3362ae){_0xb85fd5=_0xb85fd5-0x0;var _0x34228e=_0x1261[_0xb85fd5];return _0x34228e;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x1126('0x0'));var rimraf=require(_0x1126('0x1'));var zipdir=require(_0x1126('0x2'));var jsonpatch=require(_0x1126('0x3'));var rp=require(_0x1126('0x4'));var moment=require(_0x1126('0x5'));var BPromise=require(_0x1126('0x6'));var Mustache=require(_0x1126('0x7'));var util=require(_0x1126('0x8'));var path=require(_0x1126('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x1126('0xa'));var fs=require('fs');var _=require(_0x1126('0xb'));var squel=require('squel');var crypto=require(_0x1126('0xc'));var jsforce=require(_0x1126('0xd'));var deskjs=require(_0x1126('0xe'));var toCsv=require(_0x1126('0xf'));var querystring=require(_0x1126('0x10'));var Papa=require('papaparse');var Redis=require(_0x1126('0x11'));var authService=require(_0x1126('0x12'));var qs=require(_0x1126('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1126('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x1126('0x15'));var config=require('../../config/environment');var db=require(_0x1126('0x16'))['db'];var jayson=require(_0x1126('0x17'));var client=jayson[_0x1126('0x18')][_0x1126('0x19')]({'port':0x232a});function checkPasswordPattern(_0xca0355,_0x3f10e9,_0xd8ca42){if(_0xd8ca42){var _0x2048ad=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2048ad[_0x1126('0x1a')](_0x3f10e9)){return _0xca0355;}else{throw new db['Sequelize']['ValidationError'](_0x1126('0x1b'));}}else{return _0xca0355;}}function respondWithRpcPromise(_0x154e20,_0x279455,_0x4be0c6,_0x45149c){return new BPromise(function(_0x4794a7,_0x35fe9f){var _0x42f379=_0x45149c||client;return _0x42f379[_0x1126('0x1c')](_0x154e20,_0x4be0c6)['then'](function(_0x245cd7){logger[_0x1126('0x1d')]('ZendeskConfiguration,\x20%s,\x20%s',_0x279455,'request\x20sent');logger[_0x1126('0x1e')](_0x1126('0x1f'),_0x279455,'request\x20sent',JSON['stringify'](_0x245cd7));if(_0x245cd7[_0x1126('0x20')]){if(_0x245cd7['error'][_0x1126('0x21')]===0x1f4){logger[_0x1126('0x20')](_0x1126('0x22'),_0x279455,_0x245cd7['error'][_0x1126('0x23')]);return _0x35fe9f(_0x245cd7['error']['message']);}logger[_0x1126('0x20')](_0x1126('0x22'),_0x279455,_0x245cd7[_0x1126('0x20')][_0x1126('0x23')]);return _0x4794a7(_0x245cd7['error'][_0x1126('0x23')]);}else{logger[_0x1126('0x1d')]('ZendeskConfiguration,\x20%s,\x20%s',_0x279455,_0x1126('0x24'));_0x4794a7(_0x245cd7['result']['message']);}})['catch'](function(_0x2199d9){logger[_0x1126('0x20')](_0x1126('0x22'),_0x279455,_0x2199d9);_0x35fe9f(_0x2199d9);});});}function respondWithStatusCode(_0x34bcf1,_0x566c09){_0x566c09=_0x566c09||0xcc;return function(_0x1b07a7){if(_0x1b07a7){return _0x34bcf1[_0x1126('0x25')](_0x566c09);}return _0x34bcf1[_0x1126('0x26')](_0x566c09)['end']();};}function respondWithResult(_0x35eec3,_0x375e59){_0x375e59=_0x375e59||0xc8;return function(_0xa293f4){if(_0xa293f4){return _0x35eec3['status'](_0x375e59)['json'](_0xa293f4);}};}function respondWithFilteredResult(_0xeb7d89,_0x39bf0e){return function(_0x55e195){if(_0x55e195){var _0x2fb797=_0x55e195['count'],_0x23d2bc=_0x39bf0e[_0x1126('0x27')],_0x4a334a=_0x39bf0e['offset']+_0x39bf0e[_0x1126('0x28')],_0x3fa694;if(_0x4a334a>=_0x2fb797){_0x4a334a=_0x2fb797;_0x3fa694=0xc8;}else{_0x3fa694=0xce;}_0xeb7d89['status'](_0x3fa694);return _0xeb7d89[_0x1126('0x29')]('Content-Range',_0x23d2bc+'-'+_0x4a334a+'/'+_0x2fb797)['json'](_0x55e195);}return null;};}function patchUpdates(_0x4a53ab){return function(_0x17646e){try{jsonpatch[_0x1126('0x2a')](_0x17646e,_0x4a53ab,!![]);}catch(_0x1cef48){return BPromise['reject'](_0x1cef48);}return _0x17646e[_0x1126('0x2b')]();};}function saveUpdates(_0x226afb,_0x56f7f8){return function(_0x3dd50e){if(_0x3dd50e){return _0x3dd50e[_0x1126('0x2c')](_0x226afb)[_0x1126('0x2d')](function(_0x29fbfa){return _0x29fbfa;});}return null;};}function removeEntity(_0x5836a2,_0x5ecbc3){return function(_0x2a7edc){if(_0x2a7edc){return _0x2a7edc[_0x1126('0x2e')]()[_0x1126('0x2d')](function(){_0x5836a2[_0x1126('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x145314,_0x6f4312){return function(_0x313ebe){if(!_0x313ebe){_0x145314[_0x1126('0x25')](0x194);}return _0x313ebe;};}function handleError(_0x3b0f79,_0x5df232){_0x5df232=_0x5df232||0x1f4;return function(_0x2a0dfe){logger[_0x1126('0x20')](_0x2a0dfe[_0x1126('0x2f')]);if(_0x2a0dfe[_0x1126('0x30')]){delete _0x2a0dfe['name'];}_0x3b0f79['status'](_0x5df232)[_0x1126('0x31')](_0x2a0dfe);};}exports[_0x1126('0x32')]=function(_0x511e6b,_0xde37cf){var _0xf3c21b={},_0x11b0f6={},_0x5c08b9={'count':0x0,'rows':[]};var _0x4b3859=_[_0x1126('0x33')](db[_0x1126('0x34')][_0x1126('0x35')],function(_0x156554){return{'name':_0x156554['fieldName'],'type':_0x156554[_0x1126('0x36')]['key']};});_0x11b0f6[_0x1126('0x37')]=_[_0x1126('0x33')](_0x4b3859,_0x1126('0x30'));_0x11b0f6[_0x1126('0x38')]=_[_0x1126('0x39')](_0x511e6b['query']);_0x11b0f6[_0x1126('0x3a')]=_[_0x1126('0x3b')](_0x11b0f6[_0x1126('0x37')],_0x11b0f6[_0x1126('0x38')]);_0xf3c21b[_0x1126('0x3c')]=_[_0x1126('0x3b')](_0x11b0f6[_0x1126('0x37')],qs['fields'](_0x511e6b[_0x1126('0x38')][_0x1126('0x3d')]));_0xf3c21b[_0x1126('0x3c')]=_0xf3c21b[_0x1126('0x3c')][_0x1126('0x3e')]?_0xf3c21b['attributes']:_0x11b0f6['model'];if(!_0x511e6b[_0x1126('0x38')][_0x1126('0x3f')](_0x1126('0x40'))){_0xf3c21b[_0x1126('0x28')]=qs[_0x1126('0x28')](_0x511e6b[_0x1126('0x38')]['limit']);_0xf3c21b['offset']=qs['offset'](_0x511e6b[_0x1126('0x38')]['offset']);}_0xf3c21b[_0x1126('0x41')]=qs[_0x1126('0x42')](_0x511e6b[_0x1126('0x38')][_0x1126('0x42')]);_0xf3c21b['where']=qs['filters'](_[_0x1126('0x43')](_0x511e6b[_0x1126('0x38')],_0x11b0f6[_0x1126('0x3a')]));if(_0x511e6b['query'][_0x1126('0x44')]){_0xf3c21b['where']=_[_0x1126('0x45')](_0xf3c21b['where'],{'$or':_[_0x1126('0x33')](_0x4b3859,function(_0xe178b4){if(_0xe178b4[_0x1126('0x36')]!=='VIRTUAL'){var _0xfaa3d8={};_0xfaa3d8[_0xe178b4[_0x1126('0x30')]]={'$like':'%'+_0x511e6b[_0x1126('0x38')]['filter']+'%'};return _0xfaa3d8;}})});}_0xf3c21b=_['merge']({},_0xf3c21b,_0x511e6b['options']);var _0x6e78cf={'where':_0xf3c21b['where']};return db[_0x1126('0x34')]['count'](_0x6e78cf)[_0x1126('0x2d')](function(_0x323499){_0x5c08b9[_0x1126('0x46')]=_0x323499;if(_0x511e6b[_0x1126('0x38')][_0x1126('0x47')]){_0xf3c21b['include']=[{'all':!![]}];}return db[_0x1126('0x34')][_0x1126('0x48')](_0xf3c21b);})['then'](function(_0x1a15f8){_0x5c08b9[_0x1126('0x49')]=_0x1a15f8;return _0x5c08b9;})['then'](respondWithFilteredResult(_0xde37cf,_0xf3c21b))[_0x1126('0x4a')](handleError(_0xde37cf,null));};exports[_0x1126('0x4b')]=function(_0x518e0a,_0x3e4eeb){var _0xbdde58={'raw':![],'where':{'id':_0x518e0a['params']['id']}},_0x213a76={};_0x213a76[_0x1126('0x37')]=_[_0x1126('0x39')](db[_0x1126('0x34')][_0x1126('0x35')]);_0x213a76[_0x1126('0x38')]=_[_0x1126('0x39')](_0x518e0a[_0x1126('0x38')]);_0x213a76[_0x1126('0x3a')]=_['intersection'](_0x213a76[_0x1126('0x37')],_0x213a76['query']);_0xbdde58[_0x1126('0x3c')]=_[_0x1126('0x3b')](_0x213a76['model'],qs['fields'](_0x518e0a[_0x1126('0x38')][_0x1126('0x3d')]));_0xbdde58[_0x1126('0x3c')]=_0xbdde58['attributes'][_0x1126('0x3e')]?_0xbdde58[_0x1126('0x3c')]:_0x213a76[_0x1126('0x37')];if(_0x518e0a[_0x1126('0x38')]['includeAll']){_0xbdde58[_0x1126('0x4c')]=[{'all':!![]}];}_0xbdde58=_[_0x1126('0x45')]({},_0xbdde58,_0x518e0a['options']);return db['ZendeskConfiguration']['find'](_0xbdde58)['then'](handleEntityNotFound(_0x3e4eeb,null))[_0x1126('0x2d')](respondWithResult(_0x3e4eeb,null))[_0x1126('0x4a')](handleError(_0x3e4eeb,null));};exports['create']=function(_0x16552b,_0x1c7a2b){return db[_0x1126('0x34')][_0x1126('0x4d')](_0x16552b[_0x1126('0x4e')],{})['then'](respondWithResult(_0x1c7a2b,0xc9))[_0x1126('0x4a')](handleError(_0x1c7a2b,null));};exports[_0x1126('0x2c')]=function(_0x5d6414,_0x322016){if(_0x5d6414[_0x1126('0x4e')]['id']){delete _0x5d6414[_0x1126('0x4e')]['id'];}return db[_0x1126('0x34')][_0x1126('0x4f')]({'where':{'id':_0x5d6414['params']['id']}})[_0x1126('0x2d')](handleEntityNotFound(_0x322016,null))['then'](saveUpdates(_0x5d6414[_0x1126('0x4e')],null))[_0x1126('0x2d')](respondWithResult(_0x322016,null))[_0x1126('0x4a')](handleError(_0x322016,null));};exports['destroy']=function(_0x427add,_0x2340f8){return db['ZendeskConfiguration'][_0x1126('0x4f')]({'where':{'id':_0x427add[_0x1126('0x50')]['id']}})[_0x1126('0x2d')](handleEntityNotFound(_0x2340f8,null))['then'](removeEntity(_0x2340f8,null))[_0x1126('0x4a')](handleError(_0x2340f8,null));};exports[_0x1126('0x51')]=function(_0x22ab18,_0x308ee4,_0x128c94){var _0x26949c={};var _0x30c848={};var _0x114be2;var _0x47e53d;return db[_0x1126('0x34')][_0x1126('0x52')]({'where':{'id':_0x22ab18[_0x1126('0x50')]['id']}})[_0x1126('0x2d')](handleEntityNotFound(_0x308ee4,null))[_0x1126('0x2d')](function(_0x4f5772){if(_0x4f5772){_0x114be2=_0x4f5772;_0x30c848[_0x1126('0x37')]=_[_0x1126('0x39')](db['ZendeskField'][_0x1126('0x35')]);_0x30c848['query']=_[_0x1126('0x39')](_0x22ab18[_0x1126('0x38')]);_0x30c848['filters']=_[_0x1126('0x3b')](_0x30c848[_0x1126('0x37')],_0x30c848[_0x1126('0x38')]);_0x26949c['attributes']=_[_0x1126('0x3b')](_0x30c848['model'],qs['fields'](_0x22ab18[_0x1126('0x38')][_0x1126('0x3d')]));_0x26949c[_0x1126('0x3c')]=_0x26949c[_0x1126('0x3c')][_0x1126('0x3e')]?_0x26949c[_0x1126('0x3c')]:_0x30c848[_0x1126('0x37')];_0x26949c['order']=qs[_0x1126('0x42')](_0x22ab18[_0x1126('0x38')][_0x1126('0x42')]);_0x26949c[_0x1126('0x53')]=qs[_0x1126('0x3a')](_[_0x1126('0x43')](_0x22ab18['query'],_0x30c848['filters']));if(_0x22ab18[_0x1126('0x38')][_0x1126('0x44')]){_0x26949c['where']=_['merge'](_0x26949c['where'],{'$or':_['map'](_0x26949c[_0x1126('0x3c')],function(_0x37b1ab){var _0x3440c5={};_0x3440c5[_0x37b1ab]={'$like':'%'+_0x22ab18['query'][_0x1126('0x44')]+'%'};return _0x3440c5;})});}_0x26949c=_[_0x1126('0x45')]({},_0x26949c,_0x22ab18[_0x1126('0x54')]);return _0x114be2[_0x1126('0x51')](_0x26949c);}})[_0x1126('0x2d')](function(_0x3f007b){if(_0x3f007b){_0x47e53d=_0x3f007b[_0x1126('0x3e')];if(!_0x22ab18['query'][_0x1126('0x3f')](_0x1126('0x40'))){_0x26949c[_0x1126('0x28')]=qs[_0x1126('0x28')](_0x22ab18[_0x1126('0x38')]['limit']);_0x26949c['offset']=qs[_0x1126('0x27')](_0x22ab18[_0x1126('0x38')]['offset']);}return _0x114be2[_0x1126('0x51')](_0x26949c);}})[_0x1126('0x2d')](function(_0x366675){if(_0x366675){return _0x366675?{'count':_0x47e53d,'rows':_0x366675}:null;}})[_0x1126('0x2d')](respondWithResult(_0x308ee4,null))[_0x1126('0x4a')](handleError(_0x308ee4,null));};exports[_0x1126('0x55')]=function(_0x41ce78,_0x247f12,_0xd20fbe){var _0x3d5e15={};var _0x16e48a={};var _0x1228cf;var _0x3dad39;return db['ZendeskConfiguration'][_0x1126('0x52')]({'where':{'id':_0x41ce78[_0x1126('0x50')]['id']}})[_0x1126('0x2d')](handleEntityNotFound(_0x247f12,null))['then'](function(_0x484881){if(_0x484881){_0x1228cf=_0x484881;_0x16e48a[_0x1126('0x37')]=_[_0x1126('0x39')](db[_0x1126('0x56')][_0x1126('0x35')]);_0x16e48a['query']=_['keys'](_0x41ce78['query']);_0x16e48a[_0x1126('0x3a')]=_[_0x1126('0x3b')](_0x16e48a[_0x1126('0x37')],_0x16e48a[_0x1126('0x38')]);_0x3d5e15['attributes']=_[_0x1126('0x3b')](_0x16e48a['model'],qs[_0x1126('0x3d')](_0x41ce78[_0x1126('0x38')][_0x1126('0x3d')]));_0x3d5e15[_0x1126('0x3c')]=_0x3d5e15[_0x1126('0x3c')][_0x1126('0x3e')]?_0x3d5e15[_0x1126('0x3c')]:_0x16e48a['model'];_0x3d5e15[_0x1126('0x41')]=qs['sort'](_0x41ce78[_0x1126('0x38')][_0x1126('0x42')]);_0x3d5e15['where']=qs[_0x1126('0x3a')](_[_0x1126('0x43')](_0x41ce78['query'],_0x16e48a[_0x1126('0x3a')]));if(_0x41ce78[_0x1126('0x38')]['filter']){_0x3d5e15['where']=_[_0x1126('0x45')](_0x3d5e15[_0x1126('0x53')],{'$or':_[_0x1126('0x33')](_0x3d5e15['attributes'],function(_0x4d007b){var _0x4b0fab={};_0x4b0fab[_0x4d007b]={'$like':'%'+_0x41ce78[_0x1126('0x38')]['filter']+'%'};return _0x4b0fab;})});}_0x3d5e15=_['merge']({},_0x3d5e15,_0x41ce78[_0x1126('0x54')]);return _0x1228cf['getSubjects'](_0x3d5e15);}})[_0x1126('0x2d')](function(_0x288a0c){if(_0x288a0c){_0x3dad39=_0x288a0c['length'];if(!_0x41ce78[_0x1126('0x38')][_0x1126('0x3f')](_0x1126('0x40'))){_0x3d5e15[_0x1126('0x28')]=qs[_0x1126('0x28')](_0x41ce78['query'][_0x1126('0x28')]);_0x3d5e15[_0x1126('0x27')]=qs['offset'](_0x41ce78[_0x1126('0x38')][_0x1126('0x27')]);}return _0x1228cf[_0x1126('0x55')](_0x3d5e15);}})[_0x1126('0x2d')](function(_0x2598a7){if(_0x2598a7){return _0x2598a7?{'count':_0x3dad39,'rows':_0x2598a7}:null;}})[_0x1126('0x2d')](respondWithResult(_0x247f12,null))[_0x1126('0x4a')](handleError(_0x247f12,null));};exports[_0x1126('0x57')]=function(_0xeaf964,_0x9a2af0,_0xbe2a8f){var _0x3af321={};var _0x2010a9={};var _0x3b5384;var _0x8bfa0;return db[_0x1126('0x34')]['findOne']({'where':{'id':_0xeaf964[_0x1126('0x50')]['id']}})[_0x1126('0x2d')](handleEntityNotFound(_0x9a2af0,null))[_0x1126('0x2d')](function(_0x1483f4){if(_0x1483f4){_0x3b5384=_0x1483f4;_0x2010a9[_0x1126('0x37')]=_['keys'](db[_0x1126('0x56')]['rawAttributes']);_0x2010a9['query']=_[_0x1126('0x39')](_0xeaf964[_0x1126('0x38')]);_0x2010a9['filters']=_['intersection'](_0x2010a9[_0x1126('0x37')],_0x2010a9[_0x1126('0x38')]);_0x3af321[_0x1126('0x3c')]=_[_0x1126('0x3b')](_0x2010a9[_0x1126('0x37')],qs[_0x1126('0x3d')](_0xeaf964[_0x1126('0x38')][_0x1126('0x3d')]));_0x3af321[_0x1126('0x3c')]=_0x3af321['attributes'][_0x1126('0x3e')]?_0x3af321[_0x1126('0x3c')]:_0x2010a9[_0x1126('0x37')];_0x3af321[_0x1126('0x41')]=qs[_0x1126('0x42')](_0xeaf964[_0x1126('0x38')]['sort']);_0x3af321[_0x1126('0x53')]=qs[_0x1126('0x3a')](_[_0x1126('0x43')](_0xeaf964[_0x1126('0x38')],_0x2010a9[_0x1126('0x3a')]));if(_0xeaf964[_0x1126('0x38')][_0x1126('0x44')]){_0x3af321[_0x1126('0x53')]=_[_0x1126('0x45')](_0x3af321[_0x1126('0x53')],{'$or':_['map'](_0x3af321['attributes'],function(_0x271d7c){var _0x55496f={};_0x55496f[_0x271d7c]={'$like':'%'+_0xeaf964[_0x1126('0x38')]['filter']+'%'};return _0x55496f;})});}_0x3af321=_[_0x1126('0x45')]({},_0x3af321,_0xeaf964['options']);return _0x3b5384[_0x1126('0x57')](_0x3af321);}})['then'](function(_0x5c5044){if(_0x5c5044){_0x8bfa0=_0x5c5044['length'];if(!_0xeaf964[_0x1126('0x38')][_0x1126('0x3f')]('nolimit')){_0x3af321['limit']=qs[_0x1126('0x28')](_0xeaf964[_0x1126('0x38')][_0x1126('0x28')]);_0x3af321['offset']=qs['offset'](_0xeaf964[_0x1126('0x38')]['offset']);}return _0x3b5384[_0x1126('0x57')](_0x3af321);}})[_0x1126('0x2d')](function(_0x41c7f8){if(_0x41c7f8){return _0x41c7f8?{'count':_0x8bfa0,'rows':_0x41c7f8}:null;}})[_0x1126('0x2d')](respondWithResult(_0x9a2af0,null))[_0x1126('0x4a')](handleError(_0x9a2af0,null));};exports['getTags']=function(_0x591c75,_0x5ae7ac,_0xd808db){var _0xfc9fb4={};var _0x3758fa={};var _0x1b8218;var _0x23bd79;return db[_0x1126('0x34')][_0x1126('0x52')]({'where':{'id':_0x591c75[_0x1126('0x50')]['id']}})[_0x1126('0x2d')](handleEntityNotFound(_0x5ae7ac,null))[_0x1126('0x2d')](function(_0x5119a1){if(_0x5119a1){_0x1b8218=_0x5119a1;_0x3758fa[_0x1126('0x37')]=_['keys'](db[_0x1126('0x58')]['rawAttributes']);_0x3758fa[_0x1126('0x38')]=_[_0x1126('0x39')](_0x591c75[_0x1126('0x38')]);_0x3758fa[_0x1126('0x3a')]=_['intersection'](_0x3758fa[_0x1126('0x37')],_0x3758fa[_0x1126('0x38')]);_0xfc9fb4['attributes']=_['intersection'](_0x3758fa[_0x1126('0x37')],qs[_0x1126('0x3d')](_0x591c75[_0x1126('0x38')]['fields']));_0xfc9fb4[_0x1126('0x3c')]=_0xfc9fb4['attributes'][_0x1126('0x3e')]?_0xfc9fb4[_0x1126('0x3c')]:_0x3758fa['model'];_0xfc9fb4[_0x1126('0x41')]=qs[_0x1126('0x42')](_0x591c75[_0x1126('0x38')][_0x1126('0x42')]);_0xfc9fb4[_0x1126('0x53')]=qs['filters'](_[_0x1126('0x43')](_0x591c75[_0x1126('0x38')],_0x3758fa[_0x1126('0x3a')]));if(_0x591c75['query']['filter']){_0xfc9fb4['where']=_[_0x1126('0x45')](_0xfc9fb4[_0x1126('0x53')],{'$or':_[_0x1126('0x33')](_0xfc9fb4[_0x1126('0x3c')],function(_0x4fcca3){var _0x101553={};_0x101553[_0x4fcca3]={'$like':'%'+_0x591c75[_0x1126('0x38')][_0x1126('0x44')]+'%'};return _0x101553;})});}_0xfc9fb4=_[_0x1126('0x45')]({},_0xfc9fb4,_0x591c75[_0x1126('0x54')]);return _0x1b8218['getTags'](_0xfc9fb4);}})[_0x1126('0x2d')](function(_0x21c487){if(_0x21c487){_0x23bd79=_0x21c487['length'];if(!_0x591c75[_0x1126('0x38')]['hasOwnProperty']('nolimit')){_0xfc9fb4[_0x1126('0x28')]=qs['limit'](_0x591c75[_0x1126('0x38')][_0x1126('0x28')]);_0xfc9fb4[_0x1126('0x27')]=qs[_0x1126('0x27')](_0x591c75[_0x1126('0x38')][_0x1126('0x27')]);}return _0x1b8218[_0x1126('0x59')](_0xfc9fb4);}})[_0x1126('0x2d')](function(_0x3762e0){if(_0x3762e0){return _0x3762e0?{'count':_0x23bd79,'rows':_0x3762e0}:null;}})['then'](respondWithResult(_0x5ae7ac,null))[_0x1126('0x4a')](handleError(_0x5ae7ac,null));};exports[_0x1126('0x5a')]=function(_0x1cda9d,_0x369447,_0x5a96ee){if(_0x1cda9d[_0x1126('0x4e')]['id']){delete _0x1cda9d[_0x1126('0x4e')]['id'];}return db[_0x1126('0x34')][_0x1126('0x52')]({'where':{'id':_0x1cda9d['params']['id']}})['then'](handleEntityNotFound(_0x369447,null))['then'](function(_0x3229ee){if(_0x3229ee){return _0x3229ee['setTags'](_0x1cda9d[_0x1126('0x4e')][_0x1126('0x5b')]||[]);}return null;})['then'](respondWithResult(_0x369447,null))['catch'](handleError(_0x369447,null));};
\ No newline at end of file
diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js
index 164e2a4..2936e0a 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 _0x2b10=['exports','int_zendesk_configurations','lodash','util','../../config/logger','api','moment','path','../../config/environment','./intZendeskConfiguration.attributes'];(function(_0x56fbae,_0x5468ac){var _0x35a418=function(_0x2301e7){while(--_0x2301e7){_0x56fbae['push'](_0x56fbae['shift']());}};_0x35a418(++_0x5468ac);}(_0x2b10,0x188));var _0x02b1=function(_0x3fdae2,_0x5e44c2){_0x3fdae2=_0x3fdae2-0x0;var _0x2947c9=_0x2b10[_0x3fdae2];return _0x2947c9;};'use strict';var _=require(_0x02b1('0x0'));var util=require(_0x02b1('0x1'));var logger=require(_0x02b1('0x2'))(_0x02b1('0x3'));var moment=require(_0x02b1('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x02b1('0x5'));var rimraf=require('rimraf');var config=require(_0x02b1('0x6'));var attributes=require(_0x02b1('0x7'));module[_0x02b1('0x8')]=function(_0x3c9595,_0x142356){return _0x3c9595['define']('ZendeskConfiguration',attributes,{'tableName':_0x02b1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x24df=['api','moment','bluebird','path','../../config/environment','./intZendeskConfiguration.attributes','exports','ZendeskConfiguration','lodash','util','../../config/logger'];(function(_0x3fdce3,_0x36312e){var _0x3d5c99=function(_0x11bd94){while(--_0x11bd94){_0x3fdce3['push'](_0x3fdce3['shift']());}};_0x3d5c99(++_0x36312e);}(_0x24df,0x189));var _0xf24d=function(_0x25909b,_0x24d88b){_0x25909b=_0x25909b-0x0;var _0x5669c5=_0x24df[_0x25909b];return _0x5669c5;};'use strict';var _=require(_0xf24d('0x0'));var util=require(_0xf24d('0x1'));var logger=require(_0xf24d('0x2'))(_0xf24d('0x3'));var moment=require(_0xf24d('0x4'));var BPromise=require(_0xf24d('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf24d('0x6'));var rimraf=require('rimraf');var config=require(_0xf24d('0x7'));var attributes=require(_0xf24d('0x8'));module[_0xf24d('0x9')]=function(_0x34f1bb,_0x252ff6){return _0x34f1bb['define'](_0xf24d('0xa'),attributes,{'tableName':'int_zendesk_configurations','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 d9b952b..1787ae0 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 _0x0dc8=['../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','ioredis','../../mysqldb','../../config/utils'];(function(_0x3a464b,_0x432670){var _0x194eef=function(_0x2c94b6){while(--_0x2c94b6){_0x3a464b['push'](_0x3a464b['shift']());}};_0x194eef(++_0x432670);}(_0x0dc8,0x100));var _0x80dc=function(_0x41059a,_0x4df43f){_0x41059a=_0x41059a-0x0;var _0x574108=_0x0dc8[_0x41059a];return _0x574108;};'use strict';var _=require(_0x80dc('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x80dc('0x1'));var db=require(_0x80dc('0x2'))['db'];var utils=require(_0x80dc('0x3'));var logger=require(_0x80dc('0x4'))(_0x80dc('0x5'));var config=require(_0x80dc('0x6'));var jayson=require(_0x80dc('0x7'));var client=jayson['client'][_0x80dc('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xfd1a55,_0x39c70c,_0x3590b0){return new BPromise(function(_0x12abf2,_0x4785d3){return client[_0x80dc('0x9')](_0xfd1a55,_0x3590b0)['then'](function(_0x274094){logger[_0x80dc('0xa')](_0x80dc('0xb'),_0x39c70c,_0x80dc('0xc'));logger[_0x80dc('0xd')](_0x80dc('0xe'),_0x39c70c,'request\x20sent',JSON['stringify'](_0x274094));if(_0x274094['error']){if(_0x274094[_0x80dc('0xf')][_0x80dc('0x10')]===0x1f4){logger[_0x80dc('0xf')](_0x80dc('0xb'),_0x39c70c,_0x274094[_0x80dc('0xf')][_0x80dc('0x11')]);return _0x4785d3(_0x274094['error'][_0x80dc('0x11')]);}logger[_0x80dc('0xf')](_0x80dc('0xb'),_0x39c70c,_0x274094[_0x80dc('0xf')]['message']);return _0x12abf2(_0x274094[_0x80dc('0xf')][_0x80dc('0x11')]);}else{logger[_0x80dc('0xa')](_0x80dc('0xb'),_0x39c70c,_0x80dc('0xc'));_0x12abf2(_0x274094[_0x80dc('0x12')][_0x80dc('0x11')]);}})[_0x80dc('0x13')](function(_0xc3e452){logger[_0x80dc('0xf')](_0x80dc('0xb'),_0x39c70c,_0xc3e452);_0x4785d3(_0xc3e452);});});}
\ No newline at end of file
+var _0x255c=['request','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http'];(function(_0x59aeb3,_0x32f513){var _0x3c6521=function(_0x1129b2){while(--_0x1129b2){_0x59aeb3['push'](_0x59aeb3['shift']());}};_0x3c6521(++_0x32f513);}(_0x255c,0xfd));var _0xc255=function(_0x310fc1,_0x32d346){_0x310fc1=_0x310fc1-0x0;var _0x3d1e75=_0x255c[_0x310fc1];return _0x3d1e75;};'use strict';var _=require(_0xc255('0x0'));var util=require(_0xc255('0x1'));var moment=require(_0xc255('0x2'));var BPromise=require(_0xc255('0x3'));var rs=require(_0xc255('0x4'));var fs=require('fs');var Redis=require(_0xc255('0x5'));var db=require(_0xc255('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xc255('0x7'))(_0xc255('0x8'));var config=require('../../config/environment');var jayson=require(_0xc255('0x9'));var client=jayson['client'][_0xc255('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x21c57d,_0x57a425,_0x53ede8){return new BPromise(function(_0x5cb5ff,_0x50a675){return client[_0xc255('0xb')](_0x21c57d,_0x53ede8)[_0xc255('0xc')](function(_0x5b0018){logger[_0xc255('0xd')](_0xc255('0xe'),_0x57a425,_0xc255('0xf'));logger['debug'](_0xc255('0x10'),_0x57a425,_0xc255('0xf'),JSON[_0xc255('0x11')](_0x5b0018));if(_0x5b0018[_0xc255('0x12')]){if(_0x5b0018['error']['code']===0x1f4){logger[_0xc255('0x12')](_0xc255('0xe'),_0x57a425,_0x5b0018['error']['message']);return _0x50a675(_0x5b0018['error'][_0xc255('0x13')]);}logger[_0xc255('0x12')](_0xc255('0xe'),_0x57a425,_0x5b0018[_0xc255('0x12')][_0xc255('0x13')]);return _0x5cb5ff(_0x5b0018[_0xc255('0x12')]['message']);}else{logger['info'](_0xc255('0xe'),_0x57a425,_0xc255('0xf'));_0x5cb5ff(_0x5b0018[_0xc255('0x14')][_0xc255('0x13')]);}})[_0xc255('0x15')](function(_0x171e8d){logger[_0xc255('0x12')](_0xc255('0xe'),_0x57a425,_0x171e8d);_0x50a675(_0x171e8d);});});}
\ No newline at end of file
diff --git a/server/api/intZendeskField/index.js b/server/api/intZendeskField/index.js
index 3b8aade..4029580 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 _0xccdd=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskField.controller','get','isAuthenticated','index','show','post','create','/:id','update','delete','exports','multer'];(function(_0x217d8b,_0x472bfe){var _0x548cae=function(_0x14a3ac){while(--_0x14a3ac){_0x217d8b['push'](_0x217d8b['shift']());}};_0x548cae(++_0x472bfe);}(_0xccdd,0x71));var _0xdccd=function(_0x163040,_0x38a58c){_0x163040=_0x163040-0x0;var _0x364667=_0xccdd[_0x163040];return _0x364667;};'use strict';var multer=require(_0xdccd('0x0'));var util=require('util');var path=require(_0xdccd('0x1'));var timeout=require(_0xdccd('0x2'));var express=require(_0xdccd('0x3'));var router=express[_0xdccd('0x4')]();var auth=require(_0xdccd('0x5'));var interaction=require(_0xdccd('0x6'));var config=require(_0xdccd('0x7'));var controller=require(_0xdccd('0x8'));router[_0xdccd('0x9')]('/',auth[_0xdccd('0xa')](),controller[_0xdccd('0xb')]);router[_0xdccd('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xdccd('0xc')]);router[_0xdccd('0xd')]('/',auth[_0xdccd('0xa')](),controller[_0xdccd('0xe')]);router['put'](_0xdccd('0xf'),auth[_0xdccd('0xa')](),controller[_0xdccd('0x10')]);router[_0xdccd('0x11')]('/:id',auth[_0xdccd('0xa')](),controller['destroy']);module[_0xdccd('0x12')]=router;
\ No newline at end of file
+var _0xb806=['connect-timeout','express','../../components/interaction/service','get','isAuthenticated','index','/:id','show','create','put','update','delete','destroy','exports','multer'];(function(_0x19aa84,_0x549537){var _0x536146=function(_0x5da480){while(--_0x5da480){_0x19aa84['push'](_0x19aa84['shift']());}};_0x536146(++_0x549537);}(_0xb806,0x95));var _0x6b80=function(_0x5a9c0c,_0x4ec485){_0x5a9c0c=_0x5a9c0c-0x0;var _0x53c77d=_0xb806[_0x5a9c0c];return _0x53c77d;};'use strict';var multer=require(_0x6b80('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x6b80('0x1'));var express=require(_0x6b80('0x2'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x6b80('0x3'));var config=require('../../config/environment');var controller=require('./intZendeskField.controller');router[_0x6b80('0x4')]('/',auth[_0x6b80('0x5')](),controller[_0x6b80('0x6')]);router['get'](_0x6b80('0x7'),auth[_0x6b80('0x5')](),controller[_0x6b80('0x8')]);router['post']('/',auth[_0x6b80('0x5')](),controller[_0x6b80('0x9')]);router[_0x6b80('0xa')](_0x6b80('0x7'),auth[_0x6b80('0x5')](),controller[_0x6b80('0xb')]);router[_0x6b80('0xc')](_0x6b80('0x7'),auth[_0x6b80('0x5')](),controller[_0x6b80('0xd')]);module[_0x6b80('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/intZendeskField/intZendeskField.attributes.js b/server/api/intZendeskField/intZendeskField.attributes.js
index 4449847..9e433f7 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 _0xe233=['variable','customVariable','BOOLEAN','sequelize','string','keyValue','STRING','ENUM'];(function(_0x172660,_0x260d9b){var _0x83204f=function(_0x4d6c80){while(--_0x4d6c80){_0x172660['push'](_0x172660['shift']());}};_0x83204f(++_0x260d9b);}(_0xe233,0x15b));var _0x3e23=function(_0x2e64f6,_0x266fc7){_0x2e64f6=_0x2e64f6-0x0;var _0x584998=_0xe233[_0x2e64f6];return _0x584998;};'use strict';var Sequelize=require(_0x3e23('0x0'));module['exports']={'type':{'type':Sequelize['ENUM'](_0x3e23('0x1'),'variable','customVariable',_0x3e23('0x2')),'defaultValue':_0x3e23('0x1')},'content':{'type':Sequelize[_0x3e23('0x3')]},'key':{'type':Sequelize[_0x3e23('0x3')]},'keyType':{'type':Sequelize[_0x3e23('0x4')]('string',_0x3e23('0x5'),_0x3e23('0x6'))},'keyContent':{'type':Sequelize[_0x3e23('0x3')]},'idField':{'type':Sequelize[_0x3e23('0x3')]},'nameField':{'type':Sequelize[_0x3e23('0x3')]},'customField':{'type':Sequelize[_0x3e23('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x3e23('0x3')]}};
\ No newline at end of file
+var _0x15a9=['ENUM','string','customVariable','keyValue','STRING','variable','BOOLEAN','sequelize','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x15a9,0x18a));var _0x915a=function(_0x3c81c0,_0x43ba7d){_0x3c81c0=_0x3c81c0-0x0;var _0x385f94=_0x15a9[_0x3c81c0];return _0x385f94;};'use strict';var Sequelize=require(_0x915a('0x0'));module[_0x915a('0x1')]={'type':{'type':Sequelize[_0x915a('0x2')](_0x915a('0x3'),'variable',_0x915a('0x4'),_0x915a('0x5')),'defaultValue':_0x915a('0x3')},'content':{'type':Sequelize[_0x915a('0x6')]},'key':{'type':Sequelize[_0x915a('0x6')]},'keyType':{'type':Sequelize[_0x915a('0x2')](_0x915a('0x3'),_0x915a('0x7'),_0x915a('0x4'))},'keyContent':{'type':Sequelize[_0x915a('0x6')]},'idField':{'type':Sequelize[_0x915a('0x6')]},'nameField':{'type':Sequelize[_0x915a('0x6')]},'customField':{'type':Sequelize[_0x915a('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/intZendeskField/intZendeskField.controller.js b/server/api/intZendeskField/intZendeskField.controller.js
index 679b901..2d5ff1f 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 _0xbbfb=['error','name','send','index','ZendeskField','rawAttributes','key','model','map','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','where','pick','filter','merge','type','includeAll','findAll','rows','catch','params','options','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','then','destroy'];(function(_0x5a8166,_0x14acb9){var _0x2846cb=function(_0x4cefff){while(--_0x4cefff){_0x5a8166['push'](_0x5a8166['shift']());}};_0x2846cb(++_0x14acb9);}(_0xbbfb,0xf0));var _0xbbbf=function(_0x47129b,_0x28918b){_0x47129b=_0x47129b-0x0;var _0x2a409d=_0xbbfb[_0x47129b];return _0x2a409d;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xbbbf('0x0'));var rimraf=require(_0xbbbf('0x1'));var zipdir=require(_0xbbbf('0x2'));var jsonpatch=require(_0xbbbf('0x3'));var rp=require('request-promise');var moment=require(_0xbbbf('0x4'));var BPromise=require(_0xbbbf('0x5'));var Mustache=require(_0xbbbf('0x6'));var util=require('util');var path=require(_0xbbbf('0x7'));var sox=require(_0xbbbf('0x8'));var csv=require(_0xbbbf('0x9'));var ejs=require(_0xbbbf('0xa'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xbbbf('0xb'));var jsforce=require(_0xbbbf('0xc'));var deskjs=require(_0xbbbf('0xd'));var toCsv=require('to-csv');var querystring=require(_0xbbbf('0xe'));var Papa=require(_0xbbbf('0xf'));var Redis=require(_0xbbbf('0x10'));var authService=require(_0xbbbf('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xbbbf('0x12'));var hardwareService=require(_0xbbbf('0x13'));var logger=require(_0xbbbf('0x14'))('api');var utils=require(_0xbbbf('0x15'));var config=require(_0xbbbf('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x392fe1,_0x212788){_0x212788=_0x212788||0xcc;return function(_0x255fb3){if(_0x255fb3){return _0x392fe1[_0xbbbf('0x17')](_0x212788);}return _0x392fe1[_0xbbbf('0x18')](_0x212788)[_0xbbbf('0x19')]();};}function respondWithResult(_0x10f8e7,_0x26fb42){_0x26fb42=_0x26fb42||0xc8;return function(_0x304953){if(_0x304953){return _0x10f8e7[_0xbbbf('0x18')](_0x26fb42)[_0xbbbf('0x1a')](_0x304953);}};}function respondWithFilteredResult(_0x5c579d,_0x501430){return function(_0xa41b56){if(_0xa41b56){var _0x54c510=_0xa41b56[_0xbbbf('0x1b')],_0x5197f4=_0x501430[_0xbbbf('0x1c')],_0x3c946d=_0x501430[_0xbbbf('0x1c')]+_0x501430[_0xbbbf('0x1d')],_0x4f8432;if(_0x3c946d>=_0x54c510){_0x3c946d=_0x54c510;_0x4f8432=0xc8;}else{_0x4f8432=0xce;}_0x5c579d[_0xbbbf('0x18')](_0x4f8432);return _0x5c579d[_0xbbbf('0x1e')](_0xbbbf('0x1f'),_0x5197f4+'-'+_0x3c946d+'/'+_0x54c510)['json'](_0xa41b56);}return null;};}function patchUpdates(_0x57fc99){return function(_0x529a14){try{jsonpatch[_0xbbbf('0x20')](_0x529a14,_0x57fc99,!![]);}catch(_0x13e76e){return BPromise[_0xbbbf('0x21')](_0x13e76e);}return _0x529a14['save']();};}function saveUpdates(_0x18daf1,_0x291bf5){return function(_0x4722ff){if(_0x4722ff){return _0x4722ff['update'](_0x18daf1)[_0xbbbf('0x22')](function(_0x56ff2d){return _0x56ff2d;});}return null;};}function removeEntity(_0x16b98c,_0x347506){return function(_0x24669b){if(_0x24669b){return _0x24669b[_0xbbbf('0x23')]()[_0xbbbf('0x22')](function(){_0x16b98c['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x5dd93b,_0x151602){return function(_0x13b0cc){if(!_0x13b0cc){_0x5dd93b[_0xbbbf('0x17')](0x194);}return _0x13b0cc;};}function handleError(_0x623a33,_0x4124f7){_0x4124f7=_0x4124f7||0x1f4;return function(_0x26d1c3){logger[_0xbbbf('0x24')](_0x26d1c3['stack']);if(_0x26d1c3[_0xbbbf('0x25')]){delete _0x26d1c3[_0xbbbf('0x25')];}_0x623a33[_0xbbbf('0x18')](_0x4124f7)[_0xbbbf('0x26')](_0x26d1c3);};}exports[_0xbbbf('0x27')]=function(_0x4daff8,_0x1ca3d2){var _0x3b1732={},_0x34bb6c={},_0x4ac0e6={'count':0x0,'rows':[]};var _0x11afff=_['map'](db[_0xbbbf('0x28')][_0xbbbf('0x29')],function(_0x5bb67a){return{'name':_0x5bb67a['fieldName'],'type':_0x5bb67a['type'][_0xbbbf('0x2a')]};});_0x34bb6c[_0xbbbf('0x2b')]=_[_0xbbbf('0x2c')](_0x11afff,_0xbbbf('0x25'));_0x34bb6c[_0xbbbf('0x2d')]=_[_0xbbbf('0x2e')](_0x4daff8[_0xbbbf('0x2d')]);_0x34bb6c[_0xbbbf('0x2f')]=_['intersection'](_0x34bb6c[_0xbbbf('0x2b')],_0x34bb6c['query']);_0x3b1732[_0xbbbf('0x30')]=_[_0xbbbf('0x31')](_0x34bb6c[_0xbbbf('0x2b')],qs[_0xbbbf('0x32')](_0x4daff8['query'][_0xbbbf('0x32')]));_0x3b1732['attributes']=_0x3b1732[_0xbbbf('0x30')][_0xbbbf('0x33')]?_0x3b1732[_0xbbbf('0x30')]:_0x34bb6c[_0xbbbf('0x2b')];if(!_0x4daff8[_0xbbbf('0x2d')][_0xbbbf('0x34')](_0xbbbf('0x35'))){_0x3b1732['limit']=qs['limit'](_0x4daff8['query'][_0xbbbf('0x1d')]);_0x3b1732[_0xbbbf('0x1c')]=qs[_0xbbbf('0x1c')](_0x4daff8[_0xbbbf('0x2d')]['offset']);}_0x3b1732[_0xbbbf('0x36')]=qs['sort'](_0x4daff8[_0xbbbf('0x2d')]['sort']);_0x3b1732[_0xbbbf('0x37')]=qs[_0xbbbf('0x2f')](_[_0xbbbf('0x38')](_0x4daff8[_0xbbbf('0x2d')],_0x34bb6c['filters']));if(_0x4daff8[_0xbbbf('0x2d')][_0xbbbf('0x39')]){_0x3b1732['where']=_[_0xbbbf('0x3a')](_0x3b1732[_0xbbbf('0x37')],{'$or':_[_0xbbbf('0x2c')](_0x11afff,function(_0x3a3869){if(_0x3a3869[_0xbbbf('0x3b')]!=='VIRTUAL'){var _0x19b8f6={};_0x19b8f6[_0x3a3869['name']]={'$like':'%'+_0x4daff8[_0xbbbf('0x2d')][_0xbbbf('0x39')]+'%'};return _0x19b8f6;}})});}_0x3b1732=_[_0xbbbf('0x3a')]({},_0x3b1732,_0x4daff8['options']);var _0x2ffd99={'where':_0x3b1732['where']};return db[_0xbbbf('0x28')][_0xbbbf('0x1b')](_0x2ffd99)[_0xbbbf('0x22')](function(_0x9d01fa){_0x4ac0e6['count']=_0x9d01fa;if(_0x4daff8[_0xbbbf('0x2d')][_0xbbbf('0x3c')]){_0x3b1732['include']=[{'all':!![]}];}return db[_0xbbbf('0x28')][_0xbbbf('0x3d')](_0x3b1732);})[_0xbbbf('0x22')](function(_0x4072a9){_0x4ac0e6[_0xbbbf('0x3e')]=_0x4072a9;return _0x4ac0e6;})[_0xbbbf('0x22')](respondWithFilteredResult(_0x1ca3d2,_0x3b1732))[_0xbbbf('0x3f')](handleError(_0x1ca3d2,null));};exports['show']=function(_0x483a44,_0x21ad85){var _0x1e6fdc={'raw':!![],'where':{'id':_0x483a44[_0xbbbf('0x40')]['id']}},_0x5838f0={};_0x5838f0[_0xbbbf('0x2b')]=_[_0xbbbf('0x2e')](db[_0xbbbf('0x28')]['rawAttributes']);_0x5838f0[_0xbbbf('0x2d')]=_[_0xbbbf('0x2e')](_0x483a44[_0xbbbf('0x2d')]);_0x5838f0[_0xbbbf('0x2f')]=_['intersection'](_0x5838f0[_0xbbbf('0x2b')],_0x5838f0['query']);_0x1e6fdc['attributes']=_[_0xbbbf('0x31')](_0x5838f0[_0xbbbf('0x2b')],qs[_0xbbbf('0x32')](_0x483a44[_0xbbbf('0x2d')][_0xbbbf('0x32')]));_0x1e6fdc[_0xbbbf('0x30')]=_0x1e6fdc['attributes']['length']?_0x1e6fdc[_0xbbbf('0x30')]:_0x5838f0[_0xbbbf('0x2b')];if(_0x483a44[_0xbbbf('0x2d')][_0xbbbf('0x3c')]){_0x1e6fdc['include']=[{'all':!![]}];}_0x1e6fdc=_[_0xbbbf('0x3a')]({},_0x1e6fdc,_0x483a44[_0xbbbf('0x41')]);return db['ZendeskField'][_0xbbbf('0x42')](_0x1e6fdc)[_0xbbbf('0x22')](handleEntityNotFound(_0x21ad85,null))[_0xbbbf('0x22')](respondWithResult(_0x21ad85,null))[_0xbbbf('0x3f')](handleError(_0x21ad85,null));};exports[_0xbbbf('0x43')]=function(_0x1c967b,_0x36e75a){return db['ZendeskField']['create'](_0x1c967b[_0xbbbf('0x44')],{})[_0xbbbf('0x22')](respondWithResult(_0x36e75a,0xc9))[_0xbbbf('0x3f')](handleError(_0x36e75a,null));};exports['update']=function(_0x3bceff,_0x2b715d){if(_0x3bceff['body']['id']){delete _0x3bceff[_0xbbbf('0x44')]['id'];}return db[_0xbbbf('0x28')][_0xbbbf('0x42')]({'where':{'id':_0x3bceff[_0xbbbf('0x40')]['id']}})['then'](handleEntityNotFound(_0x2b715d,null))[_0xbbbf('0x22')](saveUpdates(_0x3bceff[_0xbbbf('0x44')],null))[_0xbbbf('0x22')](respondWithResult(_0x2b715d,null))[_0xbbbf('0x3f')](handleError(_0x2b715d,null));};exports[_0xbbbf('0x23')]=function(_0xf65387,_0x34bcff){return db[_0xbbbf('0x28')][_0xbbbf('0x42')]({'where':{'id':_0xf65387[_0xbbbf('0x40')]['id']}})[_0xbbbf('0x22')](handleEntityNotFound(_0x34bcff,null))['then'](removeEntity(_0x34bcff,null))[_0xbbbf('0x3f')](handleError(_0x34bcff,null));};
\ No newline at end of file
+var _0xdc33=['type','key','query','keys','intersection','model','attributes','fields','length','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','show','find','catch','create','body','params','destroy','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','apply','reject','save','update','then','error','stack','name','send','map','ZendeskField','rawAttributes','fieldName'];(function(_0x149a11,_0x768ad9){var _0x162487=function(_0x5b726b){while(--_0x5b726b){_0x149a11['push'](_0x149a11['shift']());}};_0x162487(++_0x768ad9);}(_0xdc33,0x66));var _0x3dc3=function(_0x148c56,_0x431219){_0x148c56=_0x148c56-0x0;var _0x47b9d5=_0xdc33[_0x148c56];return _0x47b9d5;};'use strict';var pdf=require(_0x3dc3('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x3dc3('0x1'));var zipdir=require(_0x3dc3('0x2'));var jsonpatch=require(_0x3dc3('0x3'));var rp=require(_0x3dc3('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x3dc3('0x5'));var util=require(_0x3dc3('0x6'));var path=require(_0x3dc3('0x7'));var sox=require(_0x3dc3('0x8'));var csv=require('to-csv');var ejs=require(_0x3dc3('0x9'));var fs=require('fs');var _=require(_0x3dc3('0xa'));var squel=require(_0x3dc3('0xb'));var crypto=require(_0x3dc3('0xc'));var jsforce=require(_0x3dc3('0xd'));var deskjs=require(_0x3dc3('0xe'));var toCsv=require(_0x3dc3('0xf'));var querystring=require(_0x3dc3('0x10'));var Papa=require(_0x3dc3('0x11'));var Redis=require(_0x3dc3('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x3dc3('0x13'));var as=require(_0x3dc3('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3dc3('0x15'))(_0x3dc3('0x16'));var utils=require(_0x3dc3('0x17'));var config=require(_0x3dc3('0x18'));var db=require(_0x3dc3('0x19'))['db'];function respondWithStatusCode(_0x20152f,_0x641d36){_0x641d36=_0x641d36||0xcc;return function(_0x1663f1){if(_0x1663f1){return _0x20152f['sendStatus'](_0x641d36);}return _0x20152f[_0x3dc3('0x1a')](_0x641d36)[_0x3dc3('0x1b')]();};}function respondWithResult(_0x5264ce,_0x19d266){_0x19d266=_0x19d266||0xc8;return function(_0x3b70fb){if(_0x3b70fb){return _0x5264ce[_0x3dc3('0x1a')](_0x19d266)[_0x3dc3('0x1c')](_0x3b70fb);}};}function respondWithFilteredResult(_0x3dea1d,_0x52b143){return function(_0x4d8452){if(_0x4d8452){var _0x3995f8=_0x4d8452[_0x3dc3('0x1d')],_0x5292b7=_0x52b143[_0x3dc3('0x1e')],_0x3d5d96=_0x52b143['offset']+_0x52b143[_0x3dc3('0x1f')],_0x1500f4;if(_0x3d5d96>=_0x3995f8){_0x3d5d96=_0x3995f8;_0x1500f4=0xc8;}else{_0x1500f4=0xce;}_0x3dea1d[_0x3dc3('0x1a')](_0x1500f4);return _0x3dea1d[_0x3dc3('0x20')]('Content-Range',_0x5292b7+'-'+_0x3d5d96+'/'+_0x3995f8)['json'](_0x4d8452);}return null;};}function patchUpdates(_0x29f68e){return function(_0x49aeeb){try{jsonpatch[_0x3dc3('0x21')](_0x49aeeb,_0x29f68e,!![]);}catch(_0x29e047){return BPromise[_0x3dc3('0x22')](_0x29e047);}return _0x49aeeb[_0x3dc3('0x23')]();};}function saveUpdates(_0x2e1992,_0xfa826b){return function(_0x1cffa8){if(_0x1cffa8){return _0x1cffa8[_0x3dc3('0x24')](_0x2e1992)['then'](function(_0x26a2a6){return _0x26a2a6;});}return null;};}function removeEntity(_0x1cff6d,_0x57babe){return function(_0x8ab8d4){if(_0x8ab8d4){return _0x8ab8d4['destroy']()[_0x3dc3('0x25')](function(){_0x1cff6d[_0x3dc3('0x1a')](0xcc)[_0x3dc3('0x1b')]();});}};}function handleEntityNotFound(_0x1cd0ad,_0x4a0b84){return function(_0x1096c0){if(!_0x1096c0){_0x1cd0ad['sendStatus'](0x194);}return _0x1096c0;};}function handleError(_0x402338,_0x4825fb){_0x4825fb=_0x4825fb||0x1f4;return function(_0x557f89){logger[_0x3dc3('0x26')](_0x557f89[_0x3dc3('0x27')]);if(_0x557f89[_0x3dc3('0x28')]){delete _0x557f89[_0x3dc3('0x28')];}_0x402338['status'](_0x4825fb)[_0x3dc3('0x29')](_0x557f89);};}exports['index']=function(_0x4af31b,_0x4a70fc){var _0xbe713c={},_0x29a7d7={},_0x23f395={'count':0x0,'rows':[]};var _0x54f4f8=_[_0x3dc3('0x2a')](db[_0x3dc3('0x2b')][_0x3dc3('0x2c')],function(_0x367723){return{'name':_0x367723[_0x3dc3('0x2d')],'type':_0x367723[_0x3dc3('0x2e')][_0x3dc3('0x2f')]};});_0x29a7d7['model']=_[_0x3dc3('0x2a')](_0x54f4f8,_0x3dc3('0x28'));_0x29a7d7[_0x3dc3('0x30')]=_[_0x3dc3('0x31')](_0x4af31b[_0x3dc3('0x30')]);_0x29a7d7['filters']=_[_0x3dc3('0x32')](_0x29a7d7[_0x3dc3('0x33')],_0x29a7d7[_0x3dc3('0x30')]);_0xbe713c[_0x3dc3('0x34')]=_[_0x3dc3('0x32')](_0x29a7d7[_0x3dc3('0x33')],qs[_0x3dc3('0x35')](_0x4af31b[_0x3dc3('0x30')]['fields']));_0xbe713c[_0x3dc3('0x34')]=_0xbe713c[_0x3dc3('0x34')][_0x3dc3('0x36')]?_0xbe713c[_0x3dc3('0x34')]:_0x29a7d7[_0x3dc3('0x33')];if(!_0x4af31b['query']['hasOwnProperty'](_0x3dc3('0x37'))){_0xbe713c[_0x3dc3('0x1f')]=qs[_0x3dc3('0x1f')](_0x4af31b['query']['limit']);_0xbe713c[_0x3dc3('0x1e')]=qs[_0x3dc3('0x1e')](_0x4af31b['query']['offset']);}_0xbe713c[_0x3dc3('0x38')]=qs[_0x3dc3('0x39')](_0x4af31b[_0x3dc3('0x30')]['sort']);_0xbe713c[_0x3dc3('0x3a')]=qs[_0x3dc3('0x3b')](_['pick'](_0x4af31b[_0x3dc3('0x30')],_0x29a7d7[_0x3dc3('0x3b')]));if(_0x4af31b[_0x3dc3('0x30')][_0x3dc3('0x3c')]){_0xbe713c[_0x3dc3('0x3a')]=_[_0x3dc3('0x3d')](_0xbe713c['where'],{'$or':_[_0x3dc3('0x2a')](_0x54f4f8,function(_0x101019){if(_0x101019[_0x3dc3('0x2e')]!==_0x3dc3('0x3e')){var _0x2c339e={};_0x2c339e[_0x101019[_0x3dc3('0x28')]]={'$like':'%'+_0x4af31b['query'][_0x3dc3('0x3c')]+'%'};return _0x2c339e;}})});}_0xbe713c=_[_0x3dc3('0x3d')]({},_0xbe713c,_0x4af31b[_0x3dc3('0x3f')]);var _0x241d5c={'where':_0xbe713c[_0x3dc3('0x3a')]};return db[_0x3dc3('0x2b')][_0x3dc3('0x1d')](_0x241d5c)[_0x3dc3('0x25')](function(_0x54384f){_0x23f395[_0x3dc3('0x1d')]=_0x54384f;if(_0x4af31b[_0x3dc3('0x30')][_0x3dc3('0x40')]){_0xbe713c[_0x3dc3('0x41')]=[{'all':!![]}];}return db[_0x3dc3('0x2b')][_0x3dc3('0x42')](_0xbe713c);})[_0x3dc3('0x25')](function(_0x905550){_0x23f395['rows']=_0x905550;return _0x23f395;})[_0x3dc3('0x25')](respondWithFilteredResult(_0x4a70fc,_0xbe713c))['catch'](handleError(_0x4a70fc,null));};exports[_0x3dc3('0x43')]=function(_0x1a070c,_0x3ff551){var _0xd7bdac={'raw':!![],'where':{'id':_0x1a070c['params']['id']}},_0x23cc6a={};_0x23cc6a[_0x3dc3('0x33')]=_[_0x3dc3('0x31')](db[_0x3dc3('0x2b')]['rawAttributes']);_0x23cc6a[_0x3dc3('0x30')]=_[_0x3dc3('0x31')](_0x1a070c[_0x3dc3('0x30')]);_0x23cc6a[_0x3dc3('0x3b')]=_[_0x3dc3('0x32')](_0x23cc6a[_0x3dc3('0x33')],_0x23cc6a[_0x3dc3('0x30')]);_0xd7bdac['attributes']=_[_0x3dc3('0x32')](_0x23cc6a['model'],qs['fields'](_0x1a070c[_0x3dc3('0x30')]['fields']));_0xd7bdac[_0x3dc3('0x34')]=_0xd7bdac[_0x3dc3('0x34')][_0x3dc3('0x36')]?_0xd7bdac[_0x3dc3('0x34')]:_0x23cc6a[_0x3dc3('0x33')];if(_0x1a070c[_0x3dc3('0x30')][_0x3dc3('0x40')]){_0xd7bdac[_0x3dc3('0x41')]=[{'all':!![]}];}_0xd7bdac=_[_0x3dc3('0x3d')]({},_0xd7bdac,_0x1a070c['options']);return db[_0x3dc3('0x2b')][_0x3dc3('0x44')](_0xd7bdac)[_0x3dc3('0x25')](handleEntityNotFound(_0x3ff551,null))[_0x3dc3('0x25')](respondWithResult(_0x3ff551,null))[_0x3dc3('0x45')](handleError(_0x3ff551,null));};exports[_0x3dc3('0x46')]=function(_0xfd3a12,_0x4b9e63){return db[_0x3dc3('0x2b')][_0x3dc3('0x46')](_0xfd3a12['body'],{})[_0x3dc3('0x25')](respondWithResult(_0x4b9e63,0xc9))[_0x3dc3('0x45')](handleError(_0x4b9e63,null));};exports[_0x3dc3('0x24')]=function(_0x36de38,_0x44f3a3){if(_0x36de38[_0x3dc3('0x47')]['id']){delete _0x36de38[_0x3dc3('0x47')]['id'];}return db[_0x3dc3('0x2b')][_0x3dc3('0x44')]({'where':{'id':_0x36de38[_0x3dc3('0x48')]['id']}})[_0x3dc3('0x25')](handleEntityNotFound(_0x44f3a3,null))['then'](saveUpdates(_0x36de38[_0x3dc3('0x47')],null))[_0x3dc3('0x25')](respondWithResult(_0x44f3a3,null))['catch'](handleError(_0x44f3a3,null));};exports[_0x3dc3('0x49')]=function(_0x21d9f9,_0x165ea7){return db['ZendeskField']['find']({'where':{'id':_0x21d9f9['params']['id']}})['then'](handleEntityNotFound(_0x165ea7,null))[_0x3dc3('0x25')](removeEntity(_0x165ea7,null))[_0x3dc3('0x45')](handleError(_0x165ea7,null));};
\ No newline at end of file
diff --git a/server/api/intZendeskField/intZendeskField.model.js b/server/api/intZendeskField/intZendeskField.model.js
index bda540a..bb880f5 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 _0x69d3=['moment','bluebird','rimraf','exports','define','ZendeskField','int_zendesk_fields','zendesk_unique_index','idField','FieldId','lodash','util','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x69d3,0xda));var _0x369d=function(_0x19cf48,_0x2514d8){_0x19cf48=_0x19cf48-0x0;var _0x17147a=_0x69d3[_0x19cf48];return _0x17147a;};'use strict';var _=require(_0x369d('0x0'));var util=require(_0x369d('0x1'));var logger=require(_0x369d('0x2'))('api');var moment=require(_0x369d('0x3'));var BPromise=require(_0x369d('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x369d('0x5'));var config=require('../../config/environment');var attributes=require('./intZendeskField.attributes');module[_0x369d('0x6')]=function(_0x2f2a53,_0x18c9f1){return _0x2f2a53[_0x369d('0x7')](_0x369d('0x8'),attributes,{'tableName':_0x369d('0x9'),'paranoid':![],'indexes':[{'name':_0x369d('0xa'),'fields':[_0x369d('0xb'),_0x369d('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8d05=['../../config/logger','api','moment','path','rimraf','../../config/environment','./intZendeskField.attributes','ZendeskField','zendesk_unique_index','idField','FieldId','lodash','util'];(function(_0x1e399a,_0x351c59){var _0x539897=function(_0x2986fa){while(--_0x2986fa){_0x1e399a['push'](_0x1e399a['shift']());}};_0x539897(++_0x351c59);}(_0x8d05,0xe8));var _0x58d0=function(_0x5f2773,_0x1d25dc){_0x5f2773=_0x5f2773-0x0;var _0x4941af=_0x8d05[_0x5f2773];return _0x4941af;};'use strict';var _=require(_0x58d0('0x0'));var util=require(_0x58d0('0x1'));var logger=require(_0x58d0('0x2'))(_0x58d0('0x3'));var moment=require(_0x58d0('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x58d0('0x5'));var rimraf=require(_0x58d0('0x6'));var config=require(_0x58d0('0x7'));var attributes=require(_0x58d0('0x8'));module['exports']=function(_0xdff7f2,_0xb300a9){return _0xdff7f2['define'](_0x58d0('0x9'),attributes,{'tableName':'int_zendesk_fields','paranoid':![],'indexes':[{'name':_0x58d0('0xa'),'fields':[_0x58d0('0xb'),_0x58d0('0xc')],'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 b716115..dfb0704 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 _0xbfd7=['moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','stringify','error','code','ZendeskField,\x20%s,\x20%s','message','result','catch','util'];(function(_0x49b59f,_0x1f3a28){var _0x46f0de=function(_0x3841f1){while(--_0x3841f1){_0x49b59f['push'](_0x49b59f['shift']());}};_0x46f0de(++_0x1f3a28);}(_0xbfd7,0x158));var _0x7bfd=function(_0x4af8b8,_0x191970){_0x4af8b8=_0x4af8b8-0x0;var _0x48e42b=_0xbfd7[_0x4af8b8];return _0x48e42b;};'use strict';var _=require('lodash');var util=require(_0x7bfd('0x0'));var moment=require(_0x7bfd('0x1'));var BPromise=require('bluebird');var rs=require(_0x7bfd('0x2'));var fs=require('fs');var Redis=require(_0x7bfd('0x3'));var db=require(_0x7bfd('0x4'))['db'];var utils=require(_0x7bfd('0x5'));var logger=require(_0x7bfd('0x6'))(_0x7bfd('0x7'));var config=require(_0x7bfd('0x8'));var jayson=require(_0x7bfd('0x9'));var client=jayson[_0x7bfd('0xa')][_0x7bfd('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x111cc2,_0x5670f1,_0x4ebfe8){return new BPromise(function(_0x346908,_0x597199){return client[_0x7bfd('0xc')](_0x111cc2,_0x4ebfe8)[_0x7bfd('0xd')](function(_0x3faf14){logger[_0x7bfd('0xe')]('ZendeskField,\x20%s,\x20%s',_0x5670f1,_0x7bfd('0xf'));logger['debug']('ZendeskField,\x20%s,\x20%s,\x20%s',_0x5670f1,_0x7bfd('0xf'),JSON[_0x7bfd('0x10')](_0x3faf14));if(_0x3faf14[_0x7bfd('0x11')]){if(_0x3faf14['error'][_0x7bfd('0x12')]===0x1f4){logger[_0x7bfd('0x11')](_0x7bfd('0x13'),_0x5670f1,_0x3faf14['error'][_0x7bfd('0x14')]);return _0x597199(_0x3faf14[_0x7bfd('0x11')][_0x7bfd('0x14')]);}logger[_0x7bfd('0x11')](_0x7bfd('0x13'),_0x5670f1,_0x3faf14['error'][_0x7bfd('0x14')]);return _0x346908(_0x3faf14[_0x7bfd('0x11')][_0x7bfd('0x14')]);}else{logger[_0x7bfd('0xe')](_0x7bfd('0x13'),_0x5670f1,_0x7bfd('0xf'));_0x346908(_0x3faf14[_0x7bfd('0x15')]['message']);}})[_0x7bfd('0x16')](function(_0x579714){logger[_0x7bfd('0x11')](_0x7bfd('0x13'),_0x5670f1,_0x579714);_0x597199(_0x579714);});});}
\ No newline at end of file
+var _0x6713=['debug','ZendeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','ZendeskField,\x20%s,\x20%s','request\x20sent'];(function(_0x2cfb48,_0x24b83b){var _0xc4594f=function(_0x3bc089){while(--_0x3bc089){_0x2cfb48['push'](_0x2cfb48['shift']());}};_0xc4594f(++_0x24b83b);}(_0x6713,0xf7));var _0x3671=function(_0x1e9d62,_0x25bb8e){_0x1e9d62=_0x1e9d62-0x0;var _0x56c490=_0x6713[_0x1e9d62];return _0x56c490;};'use strict';var _=require(_0x3671('0x0'));var util=require('util');var moment=require(_0x3671('0x1'));var BPromise=require(_0x3671('0x2'));var rs=require(_0x3671('0x3'));var fs=require('fs');var Redis=require(_0x3671('0x4'));var db=require(_0x3671('0x5'))['db'];var utils=require(_0x3671('0x6'));var logger=require(_0x3671('0x7'))(_0x3671('0x8'));var config=require(_0x3671('0x9'));var jayson=require(_0x3671('0xa'));var client=jayson[_0x3671('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x19bad5,_0x19b641,_0x138a3c){return new BPromise(function(_0xc30fe2,_0x3c53b1){return client[_0x3671('0xc')](_0x19bad5,_0x138a3c)[_0x3671('0xd')](function(_0x4e7f76){logger[_0x3671('0xe')](_0x3671('0xf'),_0x19b641,_0x3671('0x10'));logger[_0x3671('0x11')](_0x3671('0x12'),_0x19b641,'request\x20sent',JSON[_0x3671('0x13')](_0x4e7f76));if(_0x4e7f76[_0x3671('0x14')]){if(_0x4e7f76[_0x3671('0x14')][_0x3671('0x15')]===0x1f4){logger[_0x3671('0x14')](_0x3671('0xf'),_0x19b641,_0x4e7f76[_0x3671('0x14')]['message']);return _0x3c53b1(_0x4e7f76['error']['message']);}logger[_0x3671('0x14')](_0x3671('0xf'),_0x19b641,_0x4e7f76[_0x3671('0x14')]['message']);return _0xc30fe2(_0x4e7f76[_0x3671('0x14')][_0x3671('0x16')]);}else{logger[_0x3671('0xe')](_0x3671('0xf'),_0x19b641,_0x3671('0x10'));_0xc30fe2(_0x4e7f76['result']['message']);}})[_0x3671('0x17')](function(_0x534365){logger[_0x3671('0x14')]('ZendeskField,\x20%s,\x20%s',_0x19b641,_0x534365);_0x3c53b1(_0x534365);});});}
\ No newline at end of file
diff --git a/server/api/intZohoAccount/index.js b/server/api/intZohoAccount/index.js
index 6774e38..f88180d 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 _0x459a=['../../components/interaction/service','../../config/environment','./intZohoAccount.controller','get','isAuthenticated','index','/:id','/:id/configurations','getConfigurations','/:id/fields','post','addConfiguration','put','update','delete','destroy','exports','util','path','express','Router'];(function(_0x199b2a,_0x1be395){var _0x57cb03=function(_0x4ec4df){while(--_0x4ec4df){_0x199b2a['push'](_0x199b2a['shift']());}};_0x57cb03(++_0x1be395);}(_0x459a,0x1a0));var _0xa459=function(_0x4bc65f,_0x39ec43){_0x4bc65f=_0x4bc65f-0x0;var _0x44f85f=_0x459a[_0x4bc65f];return _0x44f85f;};'use strict';var multer=require('multer');var util=require(_0xa459('0x0'));var path=require(_0xa459('0x1'));var timeout=require('connect-timeout');var express=require(_0xa459('0x2'));var router=express[_0xa459('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xa459('0x4'));var config=require(_0xa459('0x5'));var controller=require(_0xa459('0x6'));router[_0xa459('0x7')]('/',auth[_0xa459('0x8')](),controller[_0xa459('0x9')]);router[_0xa459('0x7')](_0xa459('0xa'),auth[_0xa459('0x8')](),controller['show']);router[_0xa459('0x7')](_0xa459('0xb'),auth[_0xa459('0x8')](),controller[_0xa459('0xc')]);router[_0xa459('0x7')](_0xa459('0xd'),auth[_0xa459('0x8')](),controller['getFields']);router[_0xa459('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0xa459('0xe')]('/:id/configurations',auth['isAuthenticated'](),controller[_0xa459('0xf')]);router[_0xa459('0x10')]('/:id',auth[_0xa459('0x8')](),controller[_0xa459('0x11')]);router[_0xa459('0x12')](_0xa459('0xa'),auth[_0xa459('0x8')](),controller[_0xa459('0x13')]);module[_0xa459('0x14')]=router;
\ No newline at end of file
+var _0x0580=['put','update','delete','/:id','destroy','exports','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoAccount.controller','get','isAuthenticated','index','/:id/configurations','/:id/fields','getFields','post','create','addConfiguration'];(function(_0xe8e396,_0x35a1aa){var _0x58dc43=function(_0x3f06fd){while(--_0x3f06fd){_0xe8e396['push'](_0xe8e396['shift']());}};_0x58dc43(++_0x35a1aa);}(_0x0580,0x1d4));var _0x0058=function(_0x530e3b,_0x56b1f5){_0x530e3b=_0x530e3b-0x0;var _0x1041bf=_0x0580[_0x530e3b];return _0x1041bf;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x0058('0x0'));var timeout=require(_0x0058('0x1'));var express=require('express');var router=express['Router']();var auth=require(_0x0058('0x2'));var interaction=require(_0x0058('0x3'));var config=require(_0x0058('0x4'));var controller=require(_0x0058('0x5'));router[_0x0058('0x6')]('/',auth[_0x0058('0x7')](),controller[_0x0058('0x8')]);router[_0x0058('0x6')]('/:id',auth[_0x0058('0x7')](),controller['show']);router[_0x0058('0x6')](_0x0058('0x9'),auth[_0x0058('0x7')](),controller['getConfigurations']);router[_0x0058('0x6')](_0x0058('0xa'),auth['isAuthenticated'](),controller[_0x0058('0xb')]);router[_0x0058('0xc')]('/',auth['isAuthenticated'](),controller[_0x0058('0xd')]);router[_0x0058('0xc')]('/:id/configurations',auth[_0x0058('0x7')](),controller[_0x0058('0xe')]);router[_0x0058('0xf')]('/:id',auth[_0x0058('0x7')](),controller[_0x0058('0x10')]);router[_0x0058('0x11')](_0x0058('0x12'),auth[_0x0058('0x7')](),controller[_0x0058('0x13')]);module[_0x0058('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.attributes.js b/server/api/intZohoAccount/intZohoAccount.attributes.js
index f69d9fd..1b9a892 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 _0x19c4=['STRING'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x19c4,0x1d8));var _0x419c=function(_0x568cf0,_0x1a44cb){_0x568cf0=_0x568cf0-0x0;var _0x360f81=_0x19c4[_0x568cf0];return _0x360f81;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x419c('0x0')]},'description':{'type':Sequelize[_0x419c('0x0')]},'host':{'type':Sequelize[_0x419c('0x0')]},'zone':{'type':Sequelize[_0x419c('0x0')]},'clientId':{'type':Sequelize[_0x419c('0x0')]},'clientSecret':{'type':Sequelize[_0x419c('0x0')]},'serverUrl':{'type':Sequelize[_0x419c('0x0')]},'code':{'type':Sequelize[_0x419c('0x0')]},'refreshToken':{'type':Sequelize[_0x419c('0x0')]}};
\ No newline at end of file
+var _0xa4fb=['sequelize','STRING'];(function(_0x120643,_0x30d2d5){var _0x56fcfa=function(_0x46be07){while(--_0x46be07){_0x120643['push'](_0x120643['shift']());}};_0x56fcfa(++_0x30d2d5);}(_0xa4fb,0x142));var _0xba4f=function(_0x219fa0,_0x18b239){_0x219fa0=_0x219fa0-0x0;var _0xc603fb=_0xa4fb[_0x219fa0];return _0xc603fb;};'use strict';var Sequelize=require(_0xba4f('0x0'));module['exports']={'name':{'type':Sequelize[_0xba4f('0x1')]},'description':{'type':Sequelize[_0xba4f('0x1')]},'host':{'type':Sequelize[_0xba4f('0x1')]},'zone':{'type':Sequelize[_0xba4f('0x1')]},'clientId':{'type':Sequelize[_0xba4f('0x1')]},'clientSecret':{'type':Sequelize[_0xba4f('0x1')]},'serverUrl':{'type':Sequelize['STRING']},'code':{'type':Sequelize[_0xba4f('0x1')]},'refreshToken':{'type':Sequelize[_0xba4f('0x1')]}};
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.controller.js b/server/api/intZohoAccount/intZohoAccount.controller.js
index fa363c2..e24bd10 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 _0x984b=['catch','sendStatus','status','end','json','count','offset','limit','Content-Range','apply','save','update','then','stack','name','send','index','map','ZohoAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','VIRTUAL','filter','merge','includeAll','include','findAll','rows','show','params','find','create','body','getConfigurations','findOne','ZohoConfiguration','pick','options','nolimit','Subjects','getSubjects','channel','Descriptions','getDescriptions','ZohoField','zone','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','/oauth/v2/token','refreshToken','clientSecret','refresh_token','access_token','getFields','host','clientId','serverUrl','slice','substring','Refresh\x20Token\x20not\x20available\x20for\x20the\x20account','format','https://www.zohoapis.%s/crm/v2/settings/fields','Calls','response','Owner','Subject','Description','Call_Duration','Call_Start_Time','Call_Type','includes','system_mandatory','custom_field','picklist','pick_list_values','statusCode','html-pdf','eml-format','rimraf','zip-dir','request-promise','util','path','to-csv','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x4f9c6e,_0x34e263){var _0x35c36f=function(_0x22f4b9){while(--_0x22f4b9){_0x4f9c6e['push'](_0x4f9c6e['shift']());}};_0x35c36f(++_0x34e263);}(_0x984b,0x15b));var _0xb984=function(_0x308670,_0x45155f){_0x308670=_0x308670-0x0;var _0x3a9942=_0x984b[_0x308670];return _0x3a9942;};'use strict';var pdf=require(_0xb984('0x0'));var emlformat=require(_0xb984('0x1'));var rimraf=require(_0xb984('0x2'));var zipdir=require(_0xb984('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xb984('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xb984('0x5'));var path=require(_0xb984('0x6'));var sox=require('sox');var csv=require(_0xb984('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xb984('0x8'));var squel=require(_0xb984('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb984('0xa'));var toCsv=require(_0xb984('0x7'));var querystring=require(_0xb984('0xb'));var Papa=require(_0xb984('0xc'));var Redis=require(_0xb984('0xd'));var authService=require(_0xb984('0xe'));var qs=require(_0xb984('0xf'));var as=require(_0xb984('0x10'));var hardwareService=require(_0xb984('0x11'));var logger=require(_0xb984('0x12'))(_0xb984('0x13'));var utils=require(_0xb984('0x14'));var config=require(_0xb984('0x15'));var db=require(_0xb984('0x16'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require('jayson/promise');var client=jayson[_0xb984('0x17')][_0xb984('0x18')]({'port':0x232a});function checkPasswordPattern(_0x1898f0,_0x219189,_0x3f2e15){if(_0x3f2e15){var _0x1849c9=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x1849c9[_0xb984('0x19')](_0x219189)){return _0x1898f0;}else{throw new db['Sequelize'][(_0xb984('0x1a'))](_0xb984('0x1b'));}}else{return _0x1898f0;}}function respondWithRpcPromise(_0x43d016,_0x56d529,_0x1a8d74,_0x3387b4){return new BPromise(function(_0x5d738c,_0x6c7ed0){var _0x41df72=_0x3387b4||client;return _0x41df72['request'](_0x43d016,_0x1a8d74)['then'](function(_0x395a2d){logger[_0xb984('0x1c')](_0xb984('0x1d'),_0x56d529,_0xb984('0x1e'));logger[_0xb984('0x1f')](_0xb984('0x20'),_0x56d529,_0xb984('0x1e'),JSON[_0xb984('0x21')](_0x395a2d));if(_0x395a2d[_0xb984('0x22')]){if(_0x395a2d[_0xb984('0x22')][_0xb984('0x23')]===0x1f4){logger[_0xb984('0x22')](_0xb984('0x1d'),_0x56d529,_0x395a2d[_0xb984('0x22')]['message']);return _0x6c7ed0(_0x395a2d[_0xb984('0x22')]['message']);}logger[_0xb984('0x22')]('ZohoAccount,\x20%s,\x20%s',_0x56d529,_0x395a2d['error']['message']);return _0x5d738c(_0x395a2d[_0xb984('0x22')][_0xb984('0x24')]);}else{logger[_0xb984('0x1c')](_0xb984('0x1d'),_0x56d529,_0xb984('0x1e'));_0x5d738c(_0x395a2d['result'][_0xb984('0x24')]);}})[_0xb984('0x25')](function(_0x1a68a2){logger[_0xb984('0x22')](_0xb984('0x1d'),_0x56d529,_0x1a68a2);_0x6c7ed0(_0x1a68a2);});});}function respondWithStatusCode(_0x106f7e,_0x5c40f7){_0x5c40f7=_0x5c40f7||0xcc;return function(_0x194fb0){if(_0x194fb0){return _0x106f7e[_0xb984('0x26')](_0x5c40f7);}return _0x106f7e[_0xb984('0x27')](_0x5c40f7)[_0xb984('0x28')]();};}function respondWithResult(_0x4c230c,_0x22f0b9){_0x22f0b9=_0x22f0b9||0xc8;return function(_0x5a9f46){if(_0x5a9f46){return _0x4c230c[_0xb984('0x27')](_0x22f0b9)[_0xb984('0x29')](_0x5a9f46);}};}function respondWithFilteredResult(_0x1f1edf,_0x91c603){return function(_0x55b573){if(_0x55b573){var _0x49b0d1=_0x55b573[_0xb984('0x2a')],_0x3f1b10=_0x91c603[_0xb984('0x2b')],_0x2584bc=_0x91c603[_0xb984('0x2b')]+_0x91c603[_0xb984('0x2c')],_0x329426;if(_0x2584bc>=_0x49b0d1){_0x2584bc=_0x49b0d1;_0x329426=0xc8;}else{_0x329426=0xce;}_0x1f1edf['status'](_0x329426);return _0x1f1edf['set'](_0xb984('0x2d'),_0x3f1b10+'-'+_0x2584bc+'/'+_0x49b0d1)[_0xb984('0x29')](_0x55b573);}return null;};}function patchUpdates(_0x24d470){return function(_0x23eb79){try{jsonpatch[_0xb984('0x2e')](_0x23eb79,_0x24d470,!![]);}catch(_0x23a20e){return BPromise['reject'](_0x23a20e);}return _0x23eb79[_0xb984('0x2f')]();};}function saveUpdates(_0x30aca9,_0x1ab799){return function(_0x5e2ca0){if(_0x5e2ca0){return _0x5e2ca0[_0xb984('0x30')](_0x30aca9)[_0xb984('0x31')](function(_0x42df09){return _0x42df09;});}return null;};}function removeEntity(_0x339497,_0x143f75){return function(_0x2c1092){if(_0x2c1092){return _0x2c1092['destroy']()[_0xb984('0x31')](function(){_0x339497[_0xb984('0x27')](0xcc)['end']();});}};}function handleEntityNotFound(_0x9a5c7a,_0xec6a19){return function(_0x5c2158){if(!_0x5c2158){_0x9a5c7a[_0xb984('0x26')](0x194);}return _0x5c2158;};}function handleError(_0x1fd84f,_0x162cee){_0x162cee=_0x162cee||0x1f4;return function(_0x5cf6b1){logger[_0xb984('0x22')](_0x5cf6b1[_0xb984('0x32')]);if(_0x5cf6b1[_0xb984('0x33')]){delete _0x5cf6b1[_0xb984('0x33')];}_0x1fd84f[_0xb984('0x27')](_0x162cee)[_0xb984('0x34')](_0x5cf6b1);};}exports[_0xb984('0x35')]=function(_0x280ec7,_0x5443e2){var _0x3820e1={},_0x2a8456={},_0x4ed2dd={'count':0x0,'rows':[]};var _0x3f4f83=_[_0xb984('0x36')](db[_0xb984('0x37')][_0xb984('0x38')],function(_0x10716f){return{'name':_0x10716f[_0xb984('0x39')],'type':_0x10716f[_0xb984('0x3a')][_0xb984('0x3b')]};});_0x2a8456[_0xb984('0x3c')]=_[_0xb984('0x36')](_0x3f4f83,_0xb984('0x33'));_0x2a8456[_0xb984('0x3d')]=_[_0xb984('0x3e')](_0x280ec7['query']);_0x2a8456[_0xb984('0x3f')]=_['intersection'](_0x2a8456[_0xb984('0x3c')],_0x2a8456[_0xb984('0x3d')]);_0x3820e1[_0xb984('0x40')]=_[_0xb984('0x41')](_0x2a8456[_0xb984('0x3c')],qs['fields'](_0x280ec7[_0xb984('0x3d')][_0xb984('0x42')]));_0x3820e1[_0xb984('0x40')]=_0x3820e1[_0xb984('0x40')][_0xb984('0x43')]?_0x3820e1[_0xb984('0x40')]:_0x2a8456[_0xb984('0x3c')];if(!_0x280ec7[_0xb984('0x3d')][_0xb984('0x44')]('nolimit')){_0x3820e1[_0xb984('0x2c')]=qs[_0xb984('0x2c')](_0x280ec7[_0xb984('0x3d')]['limit']);_0x3820e1[_0xb984('0x2b')]=qs[_0xb984('0x2b')](_0x280ec7['query'][_0xb984('0x2b')]);}_0x3820e1[_0xb984('0x45')]=qs[_0xb984('0x46')](_0x280ec7[_0xb984('0x3d')][_0xb984('0x46')]);_0x3820e1[_0xb984('0x47')]=qs['filters'](_['pick'](_0x280ec7[_0xb984('0x3d')],_0x2a8456[_0xb984('0x3f')]));if(_0x280ec7['query']['filter']){_0x3820e1['where']=_['merge'](_0x3820e1[_0xb984('0x47')],{'$or':_[_0xb984('0x36')](_0x3f4f83,function(_0x38c43a){if(_0x38c43a[_0xb984('0x3a')]!==_0xb984('0x48')){var _0x1ba497={};_0x1ba497[_0x38c43a['name']]={'$like':'%'+_0x280ec7[_0xb984('0x3d')][_0xb984('0x49')]+'%'};return _0x1ba497;}})});}_0x3820e1=_[_0xb984('0x4a')]({},_0x3820e1,_0x280ec7['options']);var _0x10b222={'where':_0x3820e1[_0xb984('0x47')]};return db[_0xb984('0x37')][_0xb984('0x2a')](_0x10b222)['then'](function(_0x38980c){_0x4ed2dd[_0xb984('0x2a')]=_0x38980c;if(_0x280ec7[_0xb984('0x3d')][_0xb984('0x4b')]){_0x3820e1[_0xb984('0x4c')]=[{'all':!![]}];}return db['ZohoAccount'][_0xb984('0x4d')](_0x3820e1);})[_0xb984('0x31')](function(_0x23c201){_0x4ed2dd[_0xb984('0x4e')]=_0x23c201;return _0x4ed2dd;})[_0xb984('0x31')](respondWithFilteredResult(_0x5443e2,_0x3820e1))['catch'](handleError(_0x5443e2,null));};exports[_0xb984('0x4f')]=function(_0xb4a2e5,_0x5ca2ff){var _0x478ed5={'raw':![],'where':{'id':_0xb4a2e5[_0xb984('0x50')]['id']}},_0x2cb0d7={};_0x2cb0d7[_0xb984('0x3c')]=_['keys'](db['ZohoAccount']['rawAttributes']);_0x2cb0d7['query']=_['keys'](_0xb4a2e5[_0xb984('0x3d')]);_0x2cb0d7[_0xb984('0x3f')]=_[_0xb984('0x41')](_0x2cb0d7['model'],_0x2cb0d7[_0xb984('0x3d')]);_0x478ed5[_0xb984('0x40')]=_['intersection'](_0x2cb0d7[_0xb984('0x3c')],qs[_0xb984('0x42')](_0xb4a2e5[_0xb984('0x3d')][_0xb984('0x42')]));_0x478ed5[_0xb984('0x40')]=_0x478ed5[_0xb984('0x40')][_0xb984('0x43')]?_0x478ed5[_0xb984('0x40')]:_0x2cb0d7[_0xb984('0x3c')];if(_0xb4a2e5[_0xb984('0x3d')][_0xb984('0x4b')]){_0x478ed5[_0xb984('0x4c')]=[{'all':!![]}];}_0x478ed5=_[_0xb984('0x4a')]({},_0x478ed5,_0xb4a2e5['options']);return db[_0xb984('0x37')][_0xb984('0x51')](_0x478ed5)[_0xb984('0x31')](handleEntityNotFound(_0x5ca2ff,null))[_0xb984('0x31')](respondWithResult(_0x5ca2ff,null))[_0xb984('0x25')](handleError(_0x5ca2ff,null));};exports[_0xb984('0x52')]=function(_0xb19132,_0x10cc53){return db[_0xb984('0x37')][_0xb984('0x52')](_0xb19132['body'],{})[_0xb984('0x31')](respondWithResult(_0x10cc53,0xc9))['catch'](handleError(_0x10cc53,null));};exports[_0xb984('0x30')]=function(_0x2b2f31,_0x2a1d28){if(_0x2b2f31[_0xb984('0x53')]['id']){delete _0x2b2f31[_0xb984('0x53')]['id'];}return db[_0xb984('0x37')][_0xb984('0x51')]({'where':{'id':_0x2b2f31[_0xb984('0x50')]['id']}})['then'](handleEntityNotFound(_0x2a1d28,null))[_0xb984('0x31')](saveUpdates(_0x2b2f31[_0xb984('0x53')],null))[_0xb984('0x31')](respondWithResult(_0x2a1d28,null))[_0xb984('0x25')](handleError(_0x2a1d28,null));};exports['destroy']=function(_0x3d7979,_0x25e55f){return db[_0xb984('0x37')]['find']({'where':{'id':_0x3d7979[_0xb984('0x50')]['id']}})[_0xb984('0x31')](handleEntityNotFound(_0x25e55f,null))[_0xb984('0x31')](removeEntity(_0x25e55f,null))[_0xb984('0x25')](handleError(_0x25e55f,null));};exports[_0xb984('0x54')]=function(_0x345c28,_0x40dfb5,_0x59688e){var _0x171b66={};var _0x4061d7={};var _0x174f9a;var _0xfe581e;return db['ZohoAccount'][_0xb984('0x55')]({'where':{'id':_0x345c28[_0xb984('0x50')]['id']}})[_0xb984('0x31')](handleEntityNotFound(_0x40dfb5,null))[_0xb984('0x31')](function(_0x336950){if(_0x336950){_0x174f9a=_0x336950;_0x4061d7[_0xb984('0x3c')]=_['keys'](db[_0xb984('0x56')]['rawAttributes']);_0x4061d7[_0xb984('0x3d')]=_[_0xb984('0x3e')](_0x345c28[_0xb984('0x3d')]);_0x4061d7[_0xb984('0x3f')]=_[_0xb984('0x41')](_0x4061d7['model'],_0x4061d7[_0xb984('0x3d')]);_0x171b66[_0xb984('0x40')]=_['intersection'](_0x4061d7[_0xb984('0x3c')],qs['fields'](_0x345c28[_0xb984('0x3d')]['fields']));_0x171b66[_0xb984('0x40')]=_0x171b66[_0xb984('0x40')][_0xb984('0x43')]?_0x171b66[_0xb984('0x40')]:_0x4061d7[_0xb984('0x3c')];_0x171b66['order']=qs[_0xb984('0x46')](_0x345c28[_0xb984('0x3d')][_0xb984('0x46')]);_0x171b66[_0xb984('0x47')]=qs[_0xb984('0x3f')](_[_0xb984('0x57')](_0x345c28[_0xb984('0x3d')],_0x4061d7[_0xb984('0x3f')]));if(_0x345c28[_0xb984('0x3d')][_0xb984('0x49')]){_0x171b66['where']=_[_0xb984('0x4a')](_0x171b66['where'],{'$or':_[_0xb984('0x36')](_0x171b66[_0xb984('0x40')],function(_0x1355b3){var _0xe1527b={};_0xe1527b[_0x1355b3]={'$like':'%'+_0x345c28['query'][_0xb984('0x49')]+'%'};return _0xe1527b;})});}_0x171b66=_[_0xb984('0x4a')]({},_0x171b66,_0x345c28[_0xb984('0x58')]);return _0x174f9a[_0xb984('0x54')](_0x171b66);}})[_0xb984('0x31')](function(_0x5b27dd){if(_0x5b27dd){_0xfe581e=_0x5b27dd[_0xb984('0x43')];if(!_0x345c28[_0xb984('0x3d')][_0xb984('0x44')](_0xb984('0x59'))){_0x171b66['limit']=qs['limit'](_0x345c28[_0xb984('0x3d')]['limit']);_0x171b66[_0xb984('0x2b')]=qs[_0xb984('0x2b')](_0x345c28[_0xb984('0x3d')][_0xb984('0x2b')]);}return _0x174f9a[_0xb984('0x54')](_0x171b66);}})['then'](function(_0x5ca4d8){if(_0x5ca4d8){return _0x5ca4d8?{'count':_0xfe581e,'rows':_0x5ca4d8}:null;}})[_0xb984('0x31')](respondWithResult(_0x40dfb5,null))['catch'](handleError(_0x40dfb5,null));};exports['addConfiguration']=function(_0x1eb9dc,_0x4c6a38,_0xe3d789){if(_0x1eb9dc[_0xb984('0x53')]['id']){delete _0x1eb9dc[_0xb984('0x53')]['id'];}return db[_0xb984('0x37')][_0xb984('0x55')]({'where':{'id':_0x1eb9dc[_0xb984('0x50')]['id']}})['then'](handleEntityNotFound(_0x4c6a38,null))['then'](function(_0x59975b){if(_0x59975b){_0x1eb9dc[_0xb984('0x53')]['AccountId']=_0x59975b['id'];_0x1eb9dc['body'][_0xb984('0x5a')]=integrations[_0xb984('0x5b')](_0x1eb9dc[_0xb984('0x53')][_0xb984('0x5c')],_0x1eb9dc[_0xb984('0x53')]['type']);_0x1eb9dc[_0xb984('0x53')][_0xb984('0x5d')]=integrations[_0xb984('0x5e')](_0x1eb9dc['body'][_0xb984('0x5c')],_0x1eb9dc[_0xb984('0x53')][_0xb984('0x3a')]);return db[_0xb984('0x56')][_0xb984('0x52')](_0x1eb9dc[_0xb984('0x53')],{'include':[{'model':db['ZohoField'],'as':_0xb984('0x5a')},{'model':db[_0xb984('0x5f')],'as':'Descriptions'}]});}return null;})[_0xb984('0x31')](respondWithResult(_0x4c6a38,null))[_0xb984('0x25')](handleError(_0x4c6a38,null));};function getAccessToken(_0x1c9953){return new Promise(function(_0x3cb72e,_0xd7e4c6){var _0xd8f91f;switch(_0x1c9953[_0xb984('0x60')]){case'US':_0xd8f91f='https://accounts.zoho.com';break;case'AU':_0xd8f91f=_0xb984('0x61');break;case'EU':_0xd8f91f='https://accounts.zoho.eu';break;case'IN':_0xd8f91f=_0xb984('0x62');break;case'CN':_0xd8f91f=_0xb984('0x63');break;default:_0xd8f91f='https://accounts.zoho.eu';break;}var _0x1bfb82={'method':'POST','uri':_0xd8f91f+_0xb984('0x64'),'qs':{'refresh_token':_0x1c9953[_0xb984('0x65')],'client_id':_0x1c9953['clientId'],'client_secret':_0x1c9953[_0xb984('0x66')],'grant_type':_0xb984('0x67')},'json':!![]};return rp(_0x1bfb82)[_0xb984('0x31')](function(_0x722ff5){if(_0x722ff5[_0xb984('0x68')]){_0x3cb72e(_0x722ff5['access_token']);}else{_0xd7e4c6('Unable\x20to\x20retrieve\x20the\x20access\x20token');}})['catch'](function(_0x27c573){_0xd7e4c6(_0x27c573);});});}exports[_0xb984('0x69')]=function(_0x4aabca,_0x48988b,_0x1030c9){var _0x22d5e3,_0x380ecf,_0x36b663,_0x9c4f71,_0x572354;return db['ZohoAccount'][_0xb984('0x55')]({'where':{'id':_0x4aabca['params']['id']},'attributes':['id',_0xb984('0x6a'),_0xb984('0x60'),_0xb984('0x6b'),_0xb984('0x66'),_0xb984('0x6c'),_0xb984('0x23'),'refreshToken']})[_0xb984('0x31')](handleEntityNotFound(_0x48988b,null))[_0xb984('0x31')](function(_0x1679dd){_0x572354=_0x1679dd;_0x22d5e3=_0x572354[_0xb984('0x6a')];_0x380ecf=_0x22d5e3==='zoho.eu'?'eu':'com';_0x36b663=_0x572354['serverUrl'];var _0x484c52=_0x36b663[_0xb984('0x6d')](-0x1);if(_0x484c52==='/'||_0x484c52==='\x5c'||_0x484c52===':'){_0x36b663=_0x36b663[_0xb984('0x6e')](0x0,_0x36b663['lastIndexOf'](_0x484c52));}if(!_0x572354[_0xb984('0x65')]){throw new Error(_0xb984('0x6f'));}return getAccessToken(_0x572354);})['then'](function(_0x540137){if(_0x540137){return rp({'method':'GET','uri':util[_0xb984('0x70')](_0xb984('0x71'),_0x380ecf),'qs':{'module':_0xb984('0x72')},'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x540137},'json':!![]});}})['then'](function(_0x1970cd){if(_0x1970cd){if(_0x1970cd[_0xb984('0x73')]&&_0x1970cd[_0xb984('0x73')][_0xb984('0x22')]){throw new Error(_0x1970cd[_0xb984('0x73')][_0xb984('0x22')][_0xb984('0x24')]);}var _0x1d6f15=[];var _0x247355=[];var _0x4abf73=[_0xb984('0x74'),_0xb984('0x75'),_0xb984('0x76'),'WhoId',_0xb984('0x77'),'Call_Result',_0xb984('0x78'),_0xb984('0x79')];_0x247355=_['remove'](_0x1970cd[_0xb984('0x42')],function(_0x537864){return _0x4abf73[_0xb984('0x7a')](_0x537864['api_name']);});for(var _0x23c519=0x0;_0x23c519<_0x247355[_0xb984('0x43')];_0x23c519++){if(_0x247355[_0x23c519][_0xb984('0x7b')]===![]){_0x1d6f15['push']({'id':_0x247355[_0x23c519]['id'],'name':_0x247355[_0x23c519]['display_label'],'custom':_0x247355[_0x23c519][_0xb984('0x7c')],'options':_0x247355[_0x23c519]['data_type']===_0xb984('0x7d')&&_0x247355[_0x23c519][_0xb984('0x7e')][_0xb984('0x43')]>-0x1?_[_0xb984('0x36')](_0x247355[_0x23c519]['pick_list_values'],function(_0x168191){return{'name':_0x168191,'value':_0x168191};}):[]});}}return{'count':_0x1d6f15[_0xb984('0x43')],'rows':_0x1d6f15};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithResult(_0x48988b,null))[_0xb984('0x25')](function(_0x24c832){var _0x23b652=_0x4aabca['query'][_0xb984('0x19')]?0x1f4:_0x24c832['statusCode']||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s',_0xb984('0x69'),_0x23b652,JSON[_0xb984('0x21')](_0x24c832));delete _0x24c832['name'];if(_0x23b652===0x191){_0x23b652=0x190;}_0x48988b[_0xb984('0x27')](_0x23b652)[_0xb984('0x34')](_0x4aabca['query'][_0xb984('0x19')]?{'message':'Wrong\x20credentials','statusCode':_0x24c832[_0xb984('0x7f')]}:_0x24c832);});};
\ No newline at end of file
+var _0xce39=['lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','../../components/integrations/configuration','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','request\x20sent','error','code','ZohoAccount,\x20%s,\x20%s','message','catch','sendStatus','status','json','limit','set','Content-Range','apply','reject','save','update','end','name','send','index','map','ZohoAccount','rawAttributes','fieldName','type','key','query','keys','filters','model','attributes','intersection','nolimit','offset','sort','filter','merge','where','VIRTUAL','options','count','findAll','show','params','fields','length','includeAll','include','find','create','body','destroy','getConfigurations','findOne','ZohoConfiguration','order','pick','hasOwnProperty','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ZohoField','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','refreshToken','clientId','clientSecret','refresh_token','access_token','getFields','serverUrl','host','zoho.eu','com','slice','substring','lastIndexOf','GET','https://www.zohoapis.%s/crm/v2/settings/fields','Zoho-oauthtoken\x20','response','Owner','Subject','Description','WhoId','Call_Duration','Call_Result','Call_Start_Time','remove','includes','api_name','system_mandatory','push','custom_field','data_type','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','ejs'];(function(_0x44abcb,_0x40f0ce){var _0x2288d9=function(_0x6a5237){while(--_0x6a5237){_0x44abcb['push'](_0x44abcb['shift']());}};_0x2288d9(++_0x40f0ce);}(_0xce39,0x198));var _0x9ce3=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xce39[_0x2641f9];return _0x585741;};'use strict';var pdf=require(_0x9ce3('0x0'));var emlformat=require(_0x9ce3('0x1'));var rimraf=require(_0x9ce3('0x2'));var zipdir=require(_0x9ce3('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9ce3('0x4'));var moment=require(_0x9ce3('0x5'));var BPromise=require(_0x9ce3('0x6'));var Mustache=require('mustache');var util=require(_0x9ce3('0x7'));var path=require(_0x9ce3('0x8'));var sox=require(_0x9ce3('0x9'));var csv=require(_0x9ce3('0xa'));var ejs=require(_0x9ce3('0xb'));var fs=require('fs');var _=require(_0x9ce3('0xc'));var squel=require(_0x9ce3('0xd'));var crypto=require('crypto');var jsforce=require(_0x9ce3('0xe'));var deskjs=require(_0x9ce3('0xf'));var toCsv=require(_0x9ce3('0xa'));var querystring=require(_0x9ce3('0x10'));var Papa=require(_0x9ce3('0x11'));var Redis=require(_0x9ce3('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x9ce3('0x13'));var as=require(_0x9ce3('0x14'));var hardwareService=require(_0x9ce3('0x15'));var logger=require(_0x9ce3('0x16'))(_0x9ce3('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x9ce3('0x18'))['db'];var integrations=require(_0x9ce3('0x19'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function checkPasswordPattern(_0x3a9839,_0x1092b7,_0x2f6efd){if(_0x2f6efd){var _0x16ca8a=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x16ca8a[_0x9ce3('0x1a')](_0x1092b7)){return _0x3a9839;}else{throw new db[(_0x9ce3('0x1b'))][(_0x9ce3('0x1c'))](_0x9ce3('0x1d'));}}else{return _0x3a9839;}}function respondWithRpcPromise(_0x505813,_0x2ad91c,_0x4e2ef1,_0x3f0862){return new BPromise(function(_0x3752cd,_0x470d91){var _0x556f51=_0x3f0862||client;return _0x556f51[_0x9ce3('0x1e')](_0x505813,_0x4e2ef1)[_0x9ce3('0x1f')](function(_0x18f809){logger[_0x9ce3('0x20')]('ZohoAccount,\x20%s,\x20%s',_0x2ad91c,_0x9ce3('0x21'));logger['debug']('ZohoAccount,\x20%s,\x20%s,\x20%s',_0x2ad91c,_0x9ce3('0x21'),JSON['stringify'](_0x18f809));if(_0x18f809[_0x9ce3('0x22')]){if(_0x18f809[_0x9ce3('0x22')][_0x9ce3('0x23')]===0x1f4){logger['error'](_0x9ce3('0x24'),_0x2ad91c,_0x18f809[_0x9ce3('0x22')]['message']);return _0x470d91(_0x18f809[_0x9ce3('0x22')]['message']);}logger[_0x9ce3('0x22')](_0x9ce3('0x24'),_0x2ad91c,_0x18f809[_0x9ce3('0x22')][_0x9ce3('0x25')]);return _0x3752cd(_0x18f809[_0x9ce3('0x22')][_0x9ce3('0x25')]);}else{logger['info'](_0x9ce3('0x24'),_0x2ad91c,_0x9ce3('0x21'));_0x3752cd(_0x18f809['result'][_0x9ce3('0x25')]);}})[_0x9ce3('0x26')](function(_0x3c3c24){logger['error'](_0x9ce3('0x24'),_0x2ad91c,_0x3c3c24);_0x470d91(_0x3c3c24);});});}function respondWithStatusCode(_0x279523,_0x2bf669){_0x2bf669=_0x2bf669||0xcc;return function(_0x542caf){if(_0x542caf){return _0x279523[_0x9ce3('0x27')](_0x2bf669);}return _0x279523[_0x9ce3('0x28')](_0x2bf669)['end']();};}function respondWithResult(_0x4bfd4f,_0x50ebd8){_0x50ebd8=_0x50ebd8||0xc8;return function(_0x56a259){if(_0x56a259){return _0x4bfd4f[_0x9ce3('0x28')](_0x50ebd8)[_0x9ce3('0x29')](_0x56a259);}};}function respondWithFilteredResult(_0x310b15,_0x165644){return function(_0x25d543){if(_0x25d543){var _0x3da41d=_0x25d543['count'],_0x1db59d=_0x165644['offset'],_0x55c97d=_0x165644['offset']+_0x165644[_0x9ce3('0x2a')],_0x3e3848;if(_0x55c97d>=_0x3da41d){_0x55c97d=_0x3da41d;_0x3e3848=0xc8;}else{_0x3e3848=0xce;}_0x310b15['status'](_0x3e3848);return _0x310b15[_0x9ce3('0x2b')](_0x9ce3('0x2c'),_0x1db59d+'-'+_0x55c97d+'/'+_0x3da41d)[_0x9ce3('0x29')](_0x25d543);}return null;};}function patchUpdates(_0x284d9b){return function(_0x34f8d7){try{jsonpatch[_0x9ce3('0x2d')](_0x34f8d7,_0x284d9b,!![]);}catch(_0x3cb911){return BPromise[_0x9ce3('0x2e')](_0x3cb911);}return _0x34f8d7[_0x9ce3('0x2f')]();};}function saveUpdates(_0x1d2471,_0x506b93){return function(_0xc4ba77){if(_0xc4ba77){return _0xc4ba77[_0x9ce3('0x30')](_0x1d2471)['then'](function(_0x2258d6){return _0x2258d6;});}return null;};}function removeEntity(_0x57f982,_0x304b4f){return function(_0x123d5a){if(_0x123d5a){return _0x123d5a['destroy']()['then'](function(){_0x57f982[_0x9ce3('0x28')](0xcc)[_0x9ce3('0x31')]();});}};}function handleEntityNotFound(_0x1c2b04,_0x573199){return function(_0x489d2f){if(!_0x489d2f){_0x1c2b04[_0x9ce3('0x27')](0x194);}return _0x489d2f;};}function handleError(_0x47a60c,_0x5ca200){_0x5ca200=_0x5ca200||0x1f4;return function(_0x1051e3){logger[_0x9ce3('0x22')](_0x1051e3['stack']);if(_0x1051e3['name']){delete _0x1051e3[_0x9ce3('0x32')];}_0x47a60c[_0x9ce3('0x28')](_0x5ca200)[_0x9ce3('0x33')](_0x1051e3);};}exports[_0x9ce3('0x34')]=function(_0x15ccc8,_0x62247){var _0xe370c5={},_0x180a2c={},_0x3e7696={'count':0x0,'rows':[]};var _0x471544=_[_0x9ce3('0x35')](db[_0x9ce3('0x36')][_0x9ce3('0x37')],function(_0x290713){return{'name':_0x290713[_0x9ce3('0x38')],'type':_0x290713[_0x9ce3('0x39')][_0x9ce3('0x3a')]};});_0x180a2c['model']=_[_0x9ce3('0x35')](_0x471544,_0x9ce3('0x32'));_0x180a2c[_0x9ce3('0x3b')]=_[_0x9ce3('0x3c')](_0x15ccc8[_0x9ce3('0x3b')]);_0x180a2c[_0x9ce3('0x3d')]=_['intersection'](_0x180a2c[_0x9ce3('0x3e')],_0x180a2c['query']);_0xe370c5[_0x9ce3('0x3f')]=_[_0x9ce3('0x40')](_0x180a2c['model'],qs['fields'](_0x15ccc8['query']['fields']));_0xe370c5['attributes']=_0xe370c5[_0x9ce3('0x3f')]['length']?_0xe370c5[_0x9ce3('0x3f')]:_0x180a2c['model'];if(!_0x15ccc8['query']['hasOwnProperty'](_0x9ce3('0x41'))){_0xe370c5[_0x9ce3('0x2a')]=qs['limit'](_0x15ccc8['query']['limit']);_0xe370c5['offset']=qs['offset'](_0x15ccc8['query'][_0x9ce3('0x42')]);}_0xe370c5['order']=qs['sort'](_0x15ccc8[_0x9ce3('0x3b')][_0x9ce3('0x43')]);_0xe370c5['where']=qs[_0x9ce3('0x3d')](_['pick'](_0x15ccc8[_0x9ce3('0x3b')],_0x180a2c['filters']));if(_0x15ccc8[_0x9ce3('0x3b')][_0x9ce3('0x44')]){_0xe370c5['where']=_[_0x9ce3('0x45')](_0xe370c5[_0x9ce3('0x46')],{'$or':_[_0x9ce3('0x35')](_0x471544,function(_0x94479){if(_0x94479['type']!==_0x9ce3('0x47')){var _0x54f578={};_0x54f578[_0x94479[_0x9ce3('0x32')]]={'$like':'%'+_0x15ccc8[_0x9ce3('0x3b')][_0x9ce3('0x44')]+'%'};return _0x54f578;}})});}_0xe370c5=_[_0x9ce3('0x45')]({},_0xe370c5,_0x15ccc8[_0x9ce3('0x48')]);var _0x318ecb={'where':_0xe370c5[_0x9ce3('0x46')]};return db['ZohoAccount'][_0x9ce3('0x49')](_0x318ecb)[_0x9ce3('0x1f')](function(_0x282a19){_0x3e7696[_0x9ce3('0x49')]=_0x282a19;if(_0x15ccc8[_0x9ce3('0x3b')]['includeAll']){_0xe370c5['include']=[{'all':!![]}];}return db[_0x9ce3('0x36')][_0x9ce3('0x4a')](_0xe370c5);})['then'](function(_0x474b56){_0x3e7696['rows']=_0x474b56;return _0x3e7696;})[_0x9ce3('0x1f')](respondWithFilteredResult(_0x62247,_0xe370c5))[_0x9ce3('0x26')](handleError(_0x62247,null));};exports[_0x9ce3('0x4b')]=function(_0x53528b,_0x3e2862){var _0xd8a9e={'raw':![],'where':{'id':_0x53528b[_0x9ce3('0x4c')]['id']}},_0x3cfe4b={};_0x3cfe4b['model']=_['keys'](db['ZohoAccount'][_0x9ce3('0x37')]);_0x3cfe4b['query']=_[_0x9ce3('0x3c')](_0x53528b[_0x9ce3('0x3b')]);_0x3cfe4b[_0x9ce3('0x3d')]=_[_0x9ce3('0x40')](_0x3cfe4b[_0x9ce3('0x3e')],_0x3cfe4b[_0x9ce3('0x3b')]);_0xd8a9e[_0x9ce3('0x3f')]=_['intersection'](_0x3cfe4b['model'],qs[_0x9ce3('0x4d')](_0x53528b[_0x9ce3('0x3b')][_0x9ce3('0x4d')]));_0xd8a9e['attributes']=_0xd8a9e['attributes'][_0x9ce3('0x4e')]?_0xd8a9e[_0x9ce3('0x3f')]:_0x3cfe4b['model'];if(_0x53528b[_0x9ce3('0x3b')][_0x9ce3('0x4f')]){_0xd8a9e[_0x9ce3('0x50')]=[{'all':!![]}];}_0xd8a9e=_[_0x9ce3('0x45')]({},_0xd8a9e,_0x53528b['options']);return db['ZohoAccount'][_0x9ce3('0x51')](_0xd8a9e)[_0x9ce3('0x1f')](handleEntityNotFound(_0x3e2862,null))[_0x9ce3('0x1f')](respondWithResult(_0x3e2862,null))[_0x9ce3('0x26')](handleError(_0x3e2862,null));};exports['create']=function(_0x24c72c,_0x1757f6){return db[_0x9ce3('0x36')][_0x9ce3('0x52')](_0x24c72c[_0x9ce3('0x53')],{})[_0x9ce3('0x1f')](respondWithResult(_0x1757f6,0xc9))[_0x9ce3('0x26')](handleError(_0x1757f6,null));};exports[_0x9ce3('0x30')]=function(_0x3aff47,_0x519c81){if(_0x3aff47[_0x9ce3('0x53')]['id']){delete _0x3aff47[_0x9ce3('0x53')]['id'];}return db['ZohoAccount'][_0x9ce3('0x51')]({'where':{'id':_0x3aff47[_0x9ce3('0x4c')]['id']}})[_0x9ce3('0x1f')](handleEntityNotFound(_0x519c81,null))['then'](saveUpdates(_0x3aff47[_0x9ce3('0x53')],null))[_0x9ce3('0x1f')](respondWithResult(_0x519c81,null))[_0x9ce3('0x26')](handleError(_0x519c81,null));};exports[_0x9ce3('0x54')]=function(_0x59f25d,_0x4a3992){return db[_0x9ce3('0x36')][_0x9ce3('0x51')]({'where':{'id':_0x59f25d[_0x9ce3('0x4c')]['id']}})['then'](handleEntityNotFound(_0x4a3992,null))[_0x9ce3('0x1f')](removeEntity(_0x4a3992,null))[_0x9ce3('0x26')](handleError(_0x4a3992,null));};exports[_0x9ce3('0x55')]=function(_0x14a994,_0xd5705b,_0x4802ee){var _0x2ed553={};var _0x9fb03f={};var _0x458825;var _0x539550;return db[_0x9ce3('0x36')][_0x9ce3('0x56')]({'where':{'id':_0x14a994[_0x9ce3('0x4c')]['id']}})[_0x9ce3('0x1f')](handleEntityNotFound(_0xd5705b,null))[_0x9ce3('0x1f')](function(_0x227759){if(_0x227759){_0x458825=_0x227759;_0x9fb03f[_0x9ce3('0x3e')]=_[_0x9ce3('0x3c')](db[_0x9ce3('0x57')]['rawAttributes']);_0x9fb03f[_0x9ce3('0x3b')]=_[_0x9ce3('0x3c')](_0x14a994[_0x9ce3('0x3b')]);_0x9fb03f['filters']=_['intersection'](_0x9fb03f[_0x9ce3('0x3e')],_0x9fb03f[_0x9ce3('0x3b')]);_0x2ed553[_0x9ce3('0x3f')]=_[_0x9ce3('0x40')](_0x9fb03f[_0x9ce3('0x3e')],qs[_0x9ce3('0x4d')](_0x14a994['query'][_0x9ce3('0x4d')]));_0x2ed553[_0x9ce3('0x3f')]=_0x2ed553[_0x9ce3('0x3f')][_0x9ce3('0x4e')]?_0x2ed553[_0x9ce3('0x3f')]:_0x9fb03f[_0x9ce3('0x3e')];_0x2ed553[_0x9ce3('0x58')]=qs['sort'](_0x14a994[_0x9ce3('0x3b')][_0x9ce3('0x43')]);_0x2ed553[_0x9ce3('0x46')]=qs[_0x9ce3('0x3d')](_[_0x9ce3('0x59')](_0x14a994['query'],_0x9fb03f[_0x9ce3('0x3d')]));if(_0x14a994['query'][_0x9ce3('0x44')]){_0x2ed553[_0x9ce3('0x46')]=_[_0x9ce3('0x45')](_0x2ed553['where'],{'$or':_['map'](_0x2ed553[_0x9ce3('0x3f')],function(_0x42b0ab){var _0x4f45df={};_0x4f45df[_0x42b0ab]={'$like':'%'+_0x14a994[_0x9ce3('0x3b')]['filter']+'%'};return _0x4f45df;})});}_0x2ed553=_[_0x9ce3('0x45')]({},_0x2ed553,_0x14a994[_0x9ce3('0x48')]);return _0x458825[_0x9ce3('0x55')](_0x2ed553);}})[_0x9ce3('0x1f')](function(_0x38ce94){if(_0x38ce94){_0x539550=_0x38ce94[_0x9ce3('0x4e')];if(!_0x14a994['query'][_0x9ce3('0x5a')]('nolimit')){_0x2ed553[_0x9ce3('0x2a')]=qs['limit'](_0x14a994[_0x9ce3('0x3b')]['limit']);_0x2ed553[_0x9ce3('0x42')]=qs[_0x9ce3('0x42')](_0x14a994[_0x9ce3('0x3b')][_0x9ce3('0x42')]);}return _0x458825['getConfigurations'](_0x2ed553);}})[_0x9ce3('0x1f')](function(_0x586a49){if(_0x586a49){return _0x586a49?{'count':_0x539550,'rows':_0x586a49}:null;}})[_0x9ce3('0x1f')](respondWithResult(_0xd5705b,null))[_0x9ce3('0x26')](handleError(_0xd5705b,null));};exports[_0x9ce3('0x5b')]=function(_0x40827f,_0x33c5c2,_0x6ac769){if(_0x40827f[_0x9ce3('0x53')]['id']){delete _0x40827f[_0x9ce3('0x53')]['id'];}return db[_0x9ce3('0x36')][_0x9ce3('0x56')]({'where':{'id':_0x40827f[_0x9ce3('0x4c')]['id']}})[_0x9ce3('0x1f')](handleEntityNotFound(_0x33c5c2,null))[_0x9ce3('0x1f')](function(_0x1fa6a1){if(_0x1fa6a1){_0x40827f[_0x9ce3('0x53')][_0x9ce3('0x5c')]=_0x1fa6a1['id'];_0x40827f[_0x9ce3('0x53')][_0x9ce3('0x5d')]=integrations[_0x9ce3('0x5e')](_0x40827f[_0x9ce3('0x53')][_0x9ce3('0x5f')],_0x40827f[_0x9ce3('0x53')][_0x9ce3('0x39')]);_0x40827f['body'][_0x9ce3('0x60')]=integrations[_0x9ce3('0x61')](_0x40827f[_0x9ce3('0x53')][_0x9ce3('0x5f')],_0x40827f[_0x9ce3('0x53')][_0x9ce3('0x39')]);return db[_0x9ce3('0x57')][_0x9ce3('0x52')](_0x40827f[_0x9ce3('0x53')],{'include':[{'model':db[_0x9ce3('0x62')],'as':_0x9ce3('0x5d')},{'model':db[_0x9ce3('0x62')],'as':_0x9ce3('0x60')}]});}return null;})['then'](respondWithResult(_0x33c5c2,null))[_0x9ce3('0x26')](handleError(_0x33c5c2,null));};function getAccessToken(_0x43555e){return new Promise(function(_0x335590,_0x2cb515){var _0x302c4d;switch(_0x43555e['zone']){case'US':_0x302c4d='https://accounts.zoho.com';break;case'AU':_0x302c4d=_0x9ce3('0x63');break;case'EU':_0x302c4d=_0x9ce3('0x64');break;case'IN':_0x302c4d=_0x9ce3('0x65');break;case'CN':_0x302c4d=_0x9ce3('0x66');break;default:_0x302c4d=_0x9ce3('0x64');break;}var _0x3c8c4e={'method':_0x9ce3('0x67'),'uri':_0x302c4d+_0x9ce3('0x68'),'qs':{'refresh_token':_0x43555e[_0x9ce3('0x69')],'client_id':_0x43555e[_0x9ce3('0x6a')],'client_secret':_0x43555e[_0x9ce3('0x6b')],'grant_type':_0x9ce3('0x6c')},'json':!![]};return rp(_0x3c8c4e)['then'](function(_0x569da1){if(_0x569da1[_0x9ce3('0x6d')]){_0x335590(_0x569da1[_0x9ce3('0x6d')]);}else{_0x2cb515('Unable\x20to\x20retrieve\x20the\x20access\x20token');}})[_0x9ce3('0x26')](function(_0x85df6e){_0x2cb515(_0x85df6e);});});}exports[_0x9ce3('0x6e')]=function(_0x5e2f63,_0x3b215f,_0x400aed){var _0x2e1161,_0x53788e,_0x5cd0a9,_0x4f5aca,_0x5da1b4;return db[_0x9ce3('0x36')][_0x9ce3('0x56')]({'where':{'id':_0x5e2f63[_0x9ce3('0x4c')]['id']},'attributes':['id','host','zone','clientId',_0x9ce3('0x6b'),_0x9ce3('0x6f'),_0x9ce3('0x23'),_0x9ce3('0x69')]})['then'](handleEntityNotFound(_0x3b215f,null))['then'](function(_0x628737){_0x5da1b4=_0x628737;_0x2e1161=_0x5da1b4[_0x9ce3('0x70')];_0x53788e=_0x2e1161===_0x9ce3('0x71')?'eu':_0x9ce3('0x72');_0x5cd0a9=_0x5da1b4[_0x9ce3('0x6f')];var _0x5d0a77=_0x5cd0a9[_0x9ce3('0x73')](-0x1);if(_0x5d0a77==='/'||_0x5d0a77==='\x5c'||_0x5d0a77===':'){_0x5cd0a9=_0x5cd0a9[_0x9ce3('0x74')](0x0,_0x5cd0a9[_0x9ce3('0x75')](_0x5d0a77));}if(!_0x5da1b4[_0x9ce3('0x69')]){throw new Error('Refresh\x20Token\x20not\x20available\x20for\x20the\x20account');}return getAccessToken(_0x5da1b4);})[_0x9ce3('0x1f')](function(_0x5cfa6b){if(_0x5cfa6b){return rp({'method':_0x9ce3('0x76'),'uri':util['format'](_0x9ce3('0x77'),_0x53788e),'qs':{'module':'Calls'},'headers':{'Authorization':_0x9ce3('0x78')+_0x5cfa6b},'json':!![]});}})[_0x9ce3('0x1f')](function(_0x4ba806){if(_0x4ba806){if(_0x4ba806[_0x9ce3('0x79')]&&_0x4ba806[_0x9ce3('0x79')][_0x9ce3('0x22')]){throw new Error(_0x4ba806[_0x9ce3('0x79')][_0x9ce3('0x22')][_0x9ce3('0x25')]);}var _0x1103cc=[];var _0x378035=[];var _0x5745cd=[_0x9ce3('0x7a'),_0x9ce3('0x7b'),_0x9ce3('0x7c'),_0x9ce3('0x7d'),_0x9ce3('0x7e'),_0x9ce3('0x7f'),_0x9ce3('0x80'),'Call_Type'];_0x378035=_[_0x9ce3('0x81')](_0x4ba806[_0x9ce3('0x4d')],function(_0x3b07ad){return _0x5745cd[_0x9ce3('0x82')](_0x3b07ad[_0x9ce3('0x83')]);});for(var _0x28ae45=0x0;_0x28ae45<_0x378035[_0x9ce3('0x4e')];_0x28ae45++){if(_0x378035[_0x28ae45][_0x9ce3('0x84')]===![]){_0x1103cc[_0x9ce3('0x85')]({'id':_0x378035[_0x28ae45]['id'],'name':_0x378035[_0x28ae45]['display_label'],'custom':_0x378035[_0x28ae45][_0x9ce3('0x86')],'options':_0x378035[_0x28ae45][_0x9ce3('0x87')]==='picklist'&&_0x378035[_0x28ae45]['pick_list_values'][_0x9ce3('0x4e')]>-0x1?_[_0x9ce3('0x35')](_0x378035[_0x28ae45]['pick_list_values'],function(_0x153ece){return{'name':_0x153ece,'value':_0x153ece};}):[]});}}return{'count':_0x1103cc['length'],'rows':_0x1103cc};}else{return{'count':0x0,'rows':[]};}})[_0x9ce3('0x1f')](respondWithResult(_0x3b215f,null))[_0x9ce3('0x26')](function(_0x3ba35f){var _0x7f3b95=_0x5e2f63['query'][_0x9ce3('0x1a')]?0x1f4:_0x3ba35f[_0x9ce3('0x88')]||0x1f4;logger[_0x9ce3('0x22')](_0x9ce3('0x89'),_0x9ce3('0x6e'),_0x7f3b95,JSON[_0x9ce3('0x8a')](_0x3ba35f));delete _0x3ba35f[_0x9ce3('0x32')];if(_0x7f3b95===0x191){_0x7f3b95=0x190;}_0x3b215f[_0x9ce3('0x28')](_0x7f3b95)[_0x9ce3('0x33')](_0x5e2f63['query'][_0x9ce3('0x1a')]?{'message':_0x9ce3('0x8b'),'statusCode':_0x3ba35f[_0x9ce3('0x88')]}:_0x3ba35f);});};
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.model.js b/server/api/intZohoAccount/intZohoAccount.model.js
index 8532dec..39033e1 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 _0xc26f=['request-promise','path','./intZohoAccount.attributes','../../components/integrations/configuration','exports','int_zoho_accounts','changed','clientId','clientSecret','code','serverUrl','slice','lastIndexOf','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','/oauth/v2/token','authorization_code','application/x-www-form-urlencoded','then','parse','refresh_token','refreshToken','info','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d','name','format','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','catch','error','inspect','host','substring','https://accounts.zoho.eu','POST','lodash','util','../../config/logger','moment','bluebird'];(function(_0x10741c,_0x120459){var _0xfdd4dd=function(_0x3e8f5c){while(--_0x3e8f5c){_0x10741c['push'](_0x10741c['shift']());}};_0xfdd4dd(++_0x120459);}(_0xc26f,0xf7));var _0xfc26=function(_0x1203f,_0x554bbc){_0x1203f=_0x1203f-0x0;var _0x365f0a=_0xc26f[_0x1203f];return _0x365f0a;};'use strict';var _=require(_0xfc26('0x0'));var util=require(_0xfc26('0x1'));var logger=require(_0xfc26('0x2'))('api');var moment=require(_0xfc26('0x3'));var BPromise=require(_0xfc26('0x4'));var rp=require(_0xfc26('0x5'));var fs=require('fs');var path=require(_0xfc26('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xfc26('0x7'));var integrations=require(_0xfc26('0x8'));module[_0xfc26('0x9')]=function(_0x5b778d,_0x36e15c){return _0x5b778d['define']('ZohoAccount',attributes,{'tableName':_0xfc26('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x57eac8,_0x650d7,_0xc31c0b){if(_0x57eac8[_0xfc26('0xb')]('zone')||_0x57eac8[_0xfc26('0xb')]('serverUrl')||_0x57eac8['changed'](_0xfc26('0xc'))||_0x57eac8[_0xfc26('0xb')](_0xfc26('0xd'))||_0x57eac8[_0xfc26('0xb')](_0xfc26('0xe'))||_0x57eac8['changed']('host')){var _0x474a41,_0xbcdb27;_0x474a41=_0x57eac8[_0xfc26('0xf')];var _0x581fc9=_0x474a41[_0xfc26('0x10')](-0x1);if(_0x581fc9==='/'||_0x581fc9==='\x5c'||_0x581fc9===':'){_0x474a41=_0x474a41['substring'](0x0,_0x474a41[_0xfc26('0x11')](_0x581fc9));}switch(_0x57eac8[_0xfc26('0x12')]){case'US':_0xbcdb27=_0xfc26('0x13');break;case'AU':_0xbcdb27=_0xfc26('0x14');break;case'IN':_0xbcdb27=_0xfc26('0x15');break;case'CN':_0xbcdb27=_0xfc26('0x16');break;default:_0xbcdb27='https://accounts.zoho.eu';break;}var _0x5c0ce6={'method':'POST','uri':_0xbcdb27+_0xfc26('0x17'),'form':{'grant_type':_0xfc26('0x18'),'client_id':_0x57eac8['clientId'],'client_secret':_0x57eac8[_0xfc26('0xd')],'redirect_uri':_0x57eac8[_0xfc26('0xf')],'code':_0x57eac8[_0xfc26('0xe')]},'headers':{'Content-Type':_0xfc26('0x19')}};return rp(_0x5c0ce6)[_0xfc26('0x1a')](function(_0x298424){var _0x58ef23=JSON[_0xfc26('0x1b')](_0x298424);if(_0x58ef23[_0xfc26('0x1c')]){_0x57eac8[_0xfc26('0x1d')]=_0x58ef23[_0xfc26('0x1c')];logger[_0xfc26('0x1e')](util['format'](_0xfc26('0x1f'),_0x57eac8[_0xfc26('0x20')],_0x57eac8['id']));}else{logger['error'](util[_0xfc26('0x21')](_0xfc26('0x22'),_0x57eac8[_0xfc26('0x20')],_0x57eac8['id']),util['inspect'](_0x58ef23,{'showHidden':![],'depth':null}));}return _0xc31c0b(null,_0x650d7);})[_0xfc26('0x23')](function(_0x40625c){logger[_0xfc26('0x24')](util[_0xfc26('0x21')]('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x57eac8[_0xfc26('0x20')],_0x57eac8['id']),util[_0xfc26('0x25')](parsedResult,{'showHidden':![],'depth':null}));return _0xc31c0b(_0x40625c);});}else{return _0xc31c0b(null,_0x650d7);}},'beforeUpdate':function(_0x2a8057,_0x3cb630,_0x20e900){if(_0x2a8057[_0xfc26('0xb')]('zone')||_0x2a8057[_0xfc26('0xb')](_0xfc26('0xf'))||_0x2a8057[_0xfc26('0xb')](_0xfc26('0xc'))||_0x2a8057[_0xfc26('0xb')](_0xfc26('0xd'))||_0x2a8057['changed'](_0xfc26('0xe'))||_0x2a8057[_0xfc26('0xb')](_0xfc26('0x26'))){var _0x4ed251,_0x4f2a79;_0x4ed251=_0x2a8057[_0xfc26('0xf')];var _0x4fb028=_0x4ed251[_0xfc26('0x10')](-0x1);if(_0x4fb028==='/'||_0x4fb028==='\x5c'||_0x4fb028===':'){_0x4ed251=_0x4ed251[_0xfc26('0x27')](0x0,_0x4ed251[_0xfc26('0x11')](_0x4fb028));}switch(_0x2a8057['zone']){case'US':_0x4f2a79=_0xfc26('0x13');break;case'AU':_0x4f2a79=_0xfc26('0x14');break;case'IN':_0x4f2a79=_0xfc26('0x15');break;case'CN':_0x4f2a79=_0xfc26('0x16');break;default:_0x4f2a79=_0xfc26('0x28');break;}var _0x18a235={'method':_0xfc26('0x29'),'uri':_0x4f2a79+_0xfc26('0x17'),'form':{'grant_type':_0xfc26('0x18'),'client_id':_0x2a8057[_0xfc26('0xc')],'client_secret':_0x2a8057[_0xfc26('0xd')],'redirect_uri':_0x2a8057[_0xfc26('0xf')],'code':_0x2a8057[_0xfc26('0xe')]},'headers':{'Content-Type':_0xfc26('0x19')}};return rp(_0x18a235)[_0xfc26('0x1a')](function(_0x2efc06){var _0x5c5e35=JSON[_0xfc26('0x1b')](_0x2efc06);if(_0x5c5e35[_0xfc26('0x1c')]){_0x2a8057['refreshToken']=_0x5c5e35[_0xfc26('0x1c')];logger[_0xfc26('0x1e')](util[_0xfc26('0x21')](_0xfc26('0x1f'),_0x2a8057['name'],_0x2a8057['id']));}else{logger[_0xfc26('0x24')](util['format'](_0xfc26('0x22'),_0x2a8057['name'],_0x2a8057['id']),util[_0xfc26('0x25')](_0x5c5e35,{'showHidden':![],'depth':null}));}return _0x20e900(null,_0x3cb630);})[_0xfc26('0x23')](function(_0x3b7aab){logger[_0xfc26('0x24')](util[_0xfc26('0x21')](_0xfc26('0x22'),_0x2a8057[_0xfc26('0x20')],_0x2a8057['id']),util[_0xfc26('0x25')](parsedResult,{'showHidden':![],'depth':null}));return _0x20e900(_0x3b7aab);});}else{return _0x20e900(null,_0x3cb630);}}}});};
\ No newline at end of file
+var _0x0ab6=['zone','parse','error','catch','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','exports','define','ZohoAccount','changed','serverUrl','code','host','substring','lastIndexOf','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','clientId','application/x-www-form-urlencoded','then','refresh_token','refreshToken','format','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','name','inspect','clientSecret','slice'];(function(_0x530026,_0x58fd89){var _0x3bec31=function(_0x389c8a){while(--_0x389c8a){_0x530026['push'](_0x530026['shift']());}};_0x3bec31(++_0x58fd89);}(_0x0ab6,0x19e));var _0x60ab=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x0ab6[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x60ab('0x0'));var util=require(_0x60ab('0x1'));var logger=require(_0x60ab('0x2'))(_0x60ab('0x3'));var moment=require(_0x60ab('0x4'));var BPromise=require(_0x60ab('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x60ab('0x6'));var rimraf=require(_0x60ab('0x7'));var config=require(_0x60ab('0x8'));var attributes=require('./intZohoAccount.attributes');var integrations=require('../../components/integrations/configuration');module[_0x60ab('0x9')]=function(_0x487103,_0x30a203){return _0x487103[_0x60ab('0xa')](_0x60ab('0xb'),attributes,{'tableName':'int_zoho_accounts','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x573e77,_0x4844d2,_0x296924){if(_0x573e77[_0x60ab('0xc')]('zone')||_0x573e77[_0x60ab('0xc')](_0x60ab('0xd'))||_0x573e77[_0x60ab('0xc')]('clientId')||_0x573e77[_0x60ab('0xc')]('clientSecret')||_0x573e77[_0x60ab('0xc')](_0x60ab('0xe'))||_0x573e77[_0x60ab('0xc')](_0x60ab('0xf'))){var _0x21411e,_0x2b3c34;_0x21411e=_0x573e77[_0x60ab('0xd')];var _0x2058a2=_0x21411e['slice'](-0x1);if(_0x2058a2==='/'||_0x2058a2==='\x5c'||_0x2058a2===':'){_0x21411e=_0x21411e[_0x60ab('0x10')](0x0,_0x21411e[_0x60ab('0x11')](_0x2058a2));}switch(_0x573e77['zone']){case'US':_0x2b3c34=_0x60ab('0x12');break;case'AU':_0x2b3c34=_0x60ab('0x13');break;case'IN':_0x2b3c34=_0x60ab('0x14');break;case'CN':_0x2b3c34=_0x60ab('0x15');break;default:_0x2b3c34=_0x60ab('0x16');break;}var _0x5b64cb={'method':_0x60ab('0x17'),'uri':_0x2b3c34+_0x60ab('0x18'),'form':{'grant_type':'authorization_code','client_id':_0x573e77[_0x60ab('0x19')],'client_secret':_0x573e77['clientSecret'],'redirect_uri':_0x573e77[_0x60ab('0xd')],'code':_0x573e77[_0x60ab('0xe')]},'headers':{'Content-Type':_0x60ab('0x1a')}};return rp(_0x5b64cb)[_0x60ab('0x1b')](function(_0x94d50d){var _0x43f259=JSON['parse'](_0x94d50d);if(_0x43f259[_0x60ab('0x1c')]){_0x573e77[_0x60ab('0x1d')]=_0x43f259['refresh_token'];logger['info'](util[_0x60ab('0x1e')](_0x60ab('0x1f'),_0x573e77['name'],_0x573e77['id']));}else{logger['error'](util['format'](_0x60ab('0x20'),_0x573e77[_0x60ab('0x21')],_0x573e77['id']),util['inspect'](_0x43f259,{'showHidden':![],'depth':null}));}return _0x296924(null,_0x4844d2);})['catch'](function(_0x315178){logger['error'](util['format'](_0x60ab('0x20'),_0x573e77['name'],_0x573e77['id']),util[_0x60ab('0x22')](parsedResult,{'showHidden':![],'depth':null}));return _0x296924(_0x315178);});}else{return _0x296924(null,_0x4844d2);}},'beforeUpdate':function(_0x5ce3f4,_0x2e2e1c,_0x30a85c){if(_0x5ce3f4[_0x60ab('0xc')]('zone')||_0x5ce3f4[_0x60ab('0xc')]('serverUrl')||_0x5ce3f4[_0x60ab('0xc')](_0x60ab('0x19'))||_0x5ce3f4[_0x60ab('0xc')](_0x60ab('0x23'))||_0x5ce3f4[_0x60ab('0xc')](_0x60ab('0xe'))||_0x5ce3f4[_0x60ab('0xc')](_0x60ab('0xf'))){var _0x552dbc,_0x390252;_0x552dbc=_0x5ce3f4['serverUrl'];var _0x2b46d8=_0x552dbc[_0x60ab('0x24')](-0x1);if(_0x2b46d8==='/'||_0x2b46d8==='\x5c'||_0x2b46d8===':'){_0x552dbc=_0x552dbc[_0x60ab('0x10')](0x0,_0x552dbc['lastIndexOf'](_0x2b46d8));}switch(_0x5ce3f4[_0x60ab('0x25')]){case'US':_0x390252=_0x60ab('0x12');break;case'AU':_0x390252=_0x60ab('0x13');break;case'IN':_0x390252=_0x60ab('0x14');break;case'CN':_0x390252=_0x60ab('0x15');break;default:_0x390252=_0x60ab('0x16');break;}var _0x2812d0={'method':_0x60ab('0x17'),'uri':_0x390252+_0x60ab('0x18'),'form':{'grant_type':'authorization_code','client_id':_0x5ce3f4[_0x60ab('0x19')],'client_secret':_0x5ce3f4['clientSecret'],'redirect_uri':_0x5ce3f4['serverUrl'],'code':_0x5ce3f4[_0x60ab('0xe')]},'headers':{'Content-Type':_0x60ab('0x1a')}};return rp(_0x2812d0)[_0x60ab('0x1b')](function(_0x3a0a49){var _0x442dfe=JSON[_0x60ab('0x26')](_0x3a0a49);if(_0x442dfe[_0x60ab('0x1c')]){_0x5ce3f4[_0x60ab('0x1d')]=_0x442dfe[_0x60ab('0x1c')];logger['info'](util['format'](_0x60ab('0x1f'),_0x5ce3f4[_0x60ab('0x21')],_0x5ce3f4['id']));}else{logger[_0x60ab('0x27')](util[_0x60ab('0x1e')](_0x60ab('0x20'),_0x5ce3f4[_0x60ab('0x21')],_0x5ce3f4['id']),util[_0x60ab('0x22')](_0x442dfe,{'showHidden':![],'depth':null}));}return _0x30a85c(null,_0x2e2e1c);})[_0x60ab('0x28')](function(_0x43941c){logger[_0x60ab('0x27')](util[_0x60ab('0x1e')](_0x60ab('0x20'),_0x5ce3f4[_0x60ab('0x21')],_0x5ce3f4['id']),util[_0x60ab('0x22')](parsedResult,{'showHidden':![],'depth':null}));return _0x30a85c(_0x43941c);});}else{return _0x30a85c(null,_0x2e2e1c);}}}});};
\ No newline at end of file
diff --git a/server/api/intZohoAccount/intZohoAccount.rpc.js b/server/api/intZohoAccount/intZohoAccount.rpc.js
index 53da83a..813041d 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 _0x4f34=['../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','GetZohoAccount','ZohoAccount','findAll','options','attributes','limit','include','map','model','stringify','ShowZohoAccount','raw','where','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x525480,_0x279c69){var _0x347056=function(_0xb72dfb){while(--_0xb72dfb){_0x525480['push'](_0x525480['shift']());}};_0x347056(++_0x279c69);}(_0x4f34,0xae));var _0x44f3=function(_0x5df049,_0x260c2a){_0x5df049=_0x5df049-0x0;var _0x4886e2=_0x4f34[_0x5df049];return _0x4886e2;};'use strict';var _=require(_0x44f3('0x0'));var util=require(_0x44f3('0x1'));var moment=require(_0x44f3('0x2'));var BPromise=require(_0x44f3('0x3'));var rs=require(_0x44f3('0x4'));var fs=require('fs');var Redis=require(_0x44f3('0x5'));var db=require(_0x44f3('0x6'))['db'];var utils=require(_0x44f3('0x7'));var logger=require('../../config/logger')(_0x44f3('0x8'));var config=require(_0x44f3('0x9'));var jayson=require(_0x44f3('0xa'));var client=jayson[_0x44f3('0xb')][_0x44f3('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xc9527e,_0x5ddf10,_0x3e28f4){return new BPromise(function(_0x5bcf28,_0xb6798b){return client[_0x44f3('0xd')](_0xc9527e,_0x3e28f4)[_0x44f3('0xe')](function(_0x1179f1){logger[_0x44f3('0xf')](_0x44f3('0x10'),_0x5ddf10,_0x44f3('0x11'));logger[_0x44f3('0x12')]('ZohoAccount,\x20%s,\x20%s,\x20%s',_0x5ddf10,'request\x20sent',JSON['stringify'](_0x1179f1));if(_0x1179f1[_0x44f3('0x13')]){if(_0x1179f1[_0x44f3('0x13')]['code']===0x1f4){logger[_0x44f3('0x13')](_0x44f3('0x10'),_0x5ddf10,_0x1179f1[_0x44f3('0x13')][_0x44f3('0x14')]);return _0xb6798b(_0x1179f1[_0x44f3('0x13')][_0x44f3('0x14')]);}logger[_0x44f3('0x13')]('ZohoAccount,\x20%s,\x20%s',_0x5ddf10,_0x1179f1[_0x44f3('0x13')][_0x44f3('0x14')]);return _0x5bcf28(_0x1179f1['error'][_0x44f3('0x14')]);}else{logger[_0x44f3('0xf')](_0x44f3('0x10'),_0x5ddf10,_0x44f3('0x11'));_0x5bcf28(_0x1179f1[_0x44f3('0x15')]['message']);}})[_0x44f3('0x16')](function(_0x1299d3){logger[_0x44f3('0x13')](_0x44f3('0x10'),_0x5ddf10,_0x1299d3);_0xb6798b(_0x1299d3);});});}exports[_0x44f3('0x17')]=function(_0x5e11fa){var _0x147495=this;return new Promise(function(_0x2e1a53,_0x34bfb9){return db[_0x44f3('0x18')][_0x44f3('0x19')]({'raw':_0x5e11fa[_0x44f3('0x1a')]?_0x5e11fa[_0x44f3('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x5e11fa[_0x44f3('0x1a')]?_0x5e11fa[_0x44f3('0x1a')]['where']||null:null,'attributes':_0x5e11fa[_0x44f3('0x1a')]?_0x5e11fa[_0x44f3('0x1a')][_0x44f3('0x1b')]||null:null,'limit':_0x5e11fa['options']?_0x5e11fa[_0x44f3('0x1a')][_0x44f3('0x1c')]||null:null,'include':_0x5e11fa[_0x44f3('0x1a')]?_0x5e11fa[_0x44f3('0x1a')][_0x44f3('0x1d')]?_[_0x44f3('0x1e')](_0x5e11fa[_0x44f3('0x1a')][_0x44f3('0x1d')],function(_0x4f4d0e){return{'model':db[_0x4f4d0e['model']],'as':_0x4f4d0e['as'],'attributes':_0x4f4d0e[_0x44f3('0x1b')],'include':_0x4f4d0e[_0x44f3('0x1d')]?_[_0x44f3('0x1e')](_0x4f4d0e[_0x44f3('0x1d')],function(_0x3da3a6){return{'model':db[_0x3da3a6[_0x44f3('0x1f')]],'as':_0x3da3a6['as'],'attributes':_0x3da3a6[_0x44f3('0x1b')],'include':_0x3da3a6['include']?_['map'](_0x3da3a6[_0x44f3('0x1d')],function(_0x532d2e){return{'model':db[_0x532d2e['model']],'as':_0x532d2e['as'],'attributes':_0x532d2e['attributes']};}):[]};}):[]};}):[]:[]})[_0x44f3('0xe')](function(_0x17530d){logger[_0x44f3('0xf')](_0x44f3('0x17'),_0x5e11fa);logger[_0x44f3('0x12')](_0x44f3('0x17'),_0x5e11fa,JSON[_0x44f3('0x20')](_0x17530d));_0x2e1a53(_0x17530d);})[_0x44f3('0x16')](function(_0x2dfa93){logger[_0x44f3('0x13')](_0x44f3('0x17'),_0x2dfa93[_0x44f3('0x14')],_0x5e11fa);_0x34bfb9(_0x147495[_0x44f3('0x13')](0x1f4,_0x2dfa93[_0x44f3('0x14')]));});});};exports[_0x44f3('0x21')]=function(_0x458a99){var _0x28244f=this;return new Promise(function(_0x2103e6,_0x290b88){return db[_0x44f3('0x18')]['find']({'raw':_0x458a99[_0x44f3('0x1a')]?_0x458a99[_0x44f3('0x1a')][_0x44f3('0x22')]===undefined?!![]:![]:!![],'where':_0x458a99['options']?_0x458a99[_0x44f3('0x1a')][_0x44f3('0x23')]||null:null,'attributes':_0x458a99[_0x44f3('0x1a')]?_0x458a99[_0x44f3('0x1a')][_0x44f3('0x1b')]||null:null,'include':_0x458a99['options']?_0x458a99[_0x44f3('0x1a')]['include']?_[_0x44f3('0x1e')](_0x458a99[_0x44f3('0x1a')]['include'],function(_0x283647){return{'model':db[_0x283647[_0x44f3('0x1f')]],'as':_0x283647['as'],'attributes':_0x283647['attributes'],'include':_0x283647[_0x44f3('0x1d')]?_['map'](_0x283647['include'],function(_0x5561e6){return{'model':db[_0x5561e6[_0x44f3('0x1f')]],'as':_0x5561e6['as'],'attributes':_0x5561e6['attributes'],'include':_0x5561e6['include']?_[_0x44f3('0x1e')](_0x5561e6['include'],function(_0x4572f5){return{'model':db[_0x4572f5[_0x44f3('0x1f')]],'as':_0x4572f5['as'],'attributes':_0x4572f5['attributes']};}):[]};}):[]};}):[]:[]})[_0x44f3('0xe')](function(_0x2e457e){logger['info']('ShowZohoAccount',_0x458a99);logger['debug']('ShowZohoAccount',_0x458a99,JSON[_0x44f3('0x20')](_0x2e457e));_0x2103e6(_0x2e457e);})[_0x44f3('0x16')](function(_0x423f14){logger[_0x44f3('0x13')](_0x44f3('0x21'),_0x423f14['message'],_0x458a99);_0x290b88(_0x28244f[_0x44f3('0x13')](0x1f4,_0x423f14['message']));});});};
\ No newline at end of file
+var _0xe66a=['include','map','model','then','GetZohoAccount','debug','stringify','ZohoAccount','find','raw','ShowZohoAccount','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','ZohoAccount,\x20%s,\x20%s','request\x20sent','ZohoAccount,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','findAll','options','attributes'];(function(_0x1e9aed,_0x23c5be){var _0x3a8c81=function(_0x3e7d97){while(--_0x3e7d97){_0x1e9aed['push'](_0x1e9aed['shift']());}};_0x3a8c81(++_0x23c5be);}(_0xe66a,0x9b));var _0xae66=function(_0x5936ad,_0x199c60){_0x5936ad=_0x5936ad-0x0;var _0x26bed2=_0xe66a[_0x5936ad];return _0x26bed2;};'use strict';var _=require(_0xae66('0x0'));var util=require(_0xae66('0x1'));var moment=require(_0xae66('0x2'));var BPromise=require(_0xae66('0x3'));var rs=require(_0xae66('0x4'));var fs=require('fs');var Redis=require(_0xae66('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xae66('0x6'));var logger=require('../../config/logger')(_0xae66('0x7'));var config=require(_0xae66('0x8'));var jayson=require(_0xae66('0x9'));var client=jayson[_0xae66('0xa')][_0xae66('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4f55e2,_0x3b702f,_0x3f705d){return new BPromise(function(_0xd1ecd3,_0x256849){return client[_0xae66('0xc')](_0x4f55e2,_0x3f705d)['then'](function(_0x83739){logger['info'](_0xae66('0xd'),_0x3b702f,_0xae66('0xe'));logger['debug'](_0xae66('0xf'),_0x3b702f,_0xae66('0xe'),JSON['stringify'](_0x83739));if(_0x83739[_0xae66('0x10')]){if(_0x83739[_0xae66('0x10')][_0xae66('0x11')]===0x1f4){logger[_0xae66('0x10')](_0xae66('0xd'),_0x3b702f,_0x83739['error'][_0xae66('0x12')]);return _0x256849(_0x83739[_0xae66('0x10')][_0xae66('0x12')]);}logger[_0xae66('0x10')](_0xae66('0xd'),_0x3b702f,_0x83739[_0xae66('0x10')][_0xae66('0x12')]);return _0xd1ecd3(_0x83739[_0xae66('0x10')]['message']);}else{logger[_0xae66('0x13')](_0xae66('0xd'),_0x3b702f,'request\x20sent');_0xd1ecd3(_0x83739[_0xae66('0x14')][_0xae66('0x12')]);}})[_0xae66('0x15')](function(_0x22006c){logger[_0xae66('0x10')]('ZohoAccount,\x20%s,\x20%s',_0x3b702f,_0x22006c);_0x256849(_0x22006c);});});}exports['GetZohoAccount']=function(_0x2de165){var _0x193a0b=this;return new Promise(function(_0x1b0563,_0x189d0f){return db['ZohoAccount'][_0xae66('0x16')]({'raw':_0x2de165['options']?_0x2de165['options']['raw']===undefined?!![]:![]:!![],'where':_0x2de165[_0xae66('0x17')]?_0x2de165['options']['where']||null:null,'attributes':_0x2de165['options']?_0x2de165[_0xae66('0x17')][_0xae66('0x18')]||null:null,'limit':_0x2de165['options']?_0x2de165['options']['limit']||null:null,'include':_0x2de165[_0xae66('0x17')]?_0x2de165[_0xae66('0x17')]['include']?_['map'](_0x2de165[_0xae66('0x17')][_0xae66('0x19')],function(_0x17888c){return{'model':db[_0x17888c['model']],'as':_0x17888c['as'],'attributes':_0x17888c[_0xae66('0x18')],'include':_0x17888c['include']?_[_0xae66('0x1a')](_0x17888c['include'],function(_0x1e4430){return{'model':db[_0x1e4430['model']],'as':_0x1e4430['as'],'attributes':_0x1e4430[_0xae66('0x18')],'include':_0x1e4430[_0xae66('0x19')]?_[_0xae66('0x1a')](_0x1e4430[_0xae66('0x19')],function(_0x38fb04){return{'model':db[_0x38fb04[_0xae66('0x1b')]],'as':_0x38fb04['as'],'attributes':_0x38fb04[_0xae66('0x18')]};}):[]};}):[]};}):[]:[]})[_0xae66('0x1c')](function(_0xdf7151){logger[_0xae66('0x13')](_0xae66('0x1d'),_0x2de165);logger[_0xae66('0x1e')](_0xae66('0x1d'),_0x2de165,JSON[_0xae66('0x1f')](_0xdf7151));_0x1b0563(_0xdf7151);})[_0xae66('0x15')](function(_0x5ade55){logger['error'](_0xae66('0x1d'),_0x5ade55[_0xae66('0x12')],_0x2de165);_0x189d0f(_0x193a0b[_0xae66('0x10')](0x1f4,_0x5ade55[_0xae66('0x12')]));});});};exports['ShowZohoAccount']=function(_0x3aefda){var _0x41f29c=this;return new Promise(function(_0x55b25a,_0x57c0ff){return db[_0xae66('0x20')][_0xae66('0x21')]({'raw':_0x3aefda[_0xae66('0x17')]?_0x3aefda['options'][_0xae66('0x22')]===undefined?!![]:![]:!![],'where':_0x3aefda[_0xae66('0x17')]?_0x3aefda['options']['where']||null:null,'attributes':_0x3aefda[_0xae66('0x17')]?_0x3aefda[_0xae66('0x17')]['attributes']||null:null,'include':_0x3aefda[_0xae66('0x17')]?_0x3aefda[_0xae66('0x17')]['include']?_['map'](_0x3aefda[_0xae66('0x17')][_0xae66('0x19')],function(_0xb90ded){return{'model':db[_0xb90ded['model']],'as':_0xb90ded['as'],'attributes':_0xb90ded['attributes'],'include':_0xb90ded[_0xae66('0x19')]?_[_0xae66('0x1a')](_0xb90ded[_0xae66('0x19')],function(_0x1e4a4d){return{'model':db[_0x1e4a4d['model']],'as':_0x1e4a4d['as'],'attributes':_0x1e4a4d['attributes'],'include':_0x1e4a4d[_0xae66('0x19')]?_[_0xae66('0x1a')](_0x1e4a4d[_0xae66('0x19')],function(_0x161a73){return{'model':db[_0x161a73['model']],'as':_0x161a73['as'],'attributes':_0x161a73[_0xae66('0x18')]};}):[]};}):[]};}):[]:[]})[_0xae66('0x1c')](function(_0x4b7092){logger[_0xae66('0x13')]('ShowZohoAccount',_0x3aefda);logger[_0xae66('0x1e')](_0xae66('0x23'),_0x3aefda,JSON[_0xae66('0x1f')](_0x4b7092));_0x55b25a(_0x4b7092);})[_0xae66('0x15')](function(_0x36808c){logger[_0xae66('0x10')](_0xae66('0x23'),_0x36808c[_0xae66('0x12')],_0x3aefda);_0x57c0ff(_0x41f29c[_0xae66('0x10')](0x1f4,_0x36808c[_0xae66('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/index.js b/server/api/intZohoConfiguration/index.js
index c5683dd..a4926f0 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 _0xfbac=['destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','./intZohoConfiguration.controller','get','isAuthenticated','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','update','/:id'];(function(_0x73b91a,_0x4ad315){var _0x5dd4ad=function(_0x3fda1f){while(--_0x3fda1f){_0x73b91a['push'](_0x73b91a['shift']());}};_0x5dd4ad(++_0x4ad315);}(_0xfbac,0x167));var _0xcfba=function(_0x5edbd7,_0x48a911){_0x5edbd7=_0x5edbd7-0x0;var _0x28d351=_0xfbac[_0x5edbd7];return _0x28d351;};'use strict';var multer=require('multer');var util=require(_0xcfba('0x0'));var path=require(_0xcfba('0x1'));var timeout=require(_0xcfba('0x2'));var express=require(_0xcfba('0x3'));var router=express[_0xcfba('0x4')]();var auth=require(_0xcfba('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xcfba('0x6'));router[_0xcfba('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0xcfba('0x7')]('/:id',auth[_0xcfba('0x8')](),controller['show']);router[_0xcfba('0x7')](_0xcfba('0x9'),auth['isAuthenticated'](),controller[_0xcfba('0xa')]);router[_0xcfba('0x7')](_0xcfba('0xb'),auth[_0xcfba('0x8')](),controller[_0xcfba('0xc')]);router[_0xcfba('0x7')](_0xcfba('0xd'),auth[_0xcfba('0x8')](),controller[_0xcfba('0xe')]);router[_0xcfba('0xf')]('/',auth[_0xcfba('0x8')](),controller[_0xcfba('0x10')]);router['put']('/:id',auth[_0xcfba('0x8')](),controller[_0xcfba('0x11')]);router['delete'](_0xcfba('0x12'),auth[_0xcfba('0x8')](),controller[_0xcfba('0x13')]);module[_0xcfba('0x14')]=router;
\ No newline at end of file
+var _0x7269=['get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','exports','multer','util','path','Router','../../components/auth/service','../../config/environment','./intZohoConfiguration.controller'];(function(_0x1a44a3,_0x415cd1){var _0x342d96=function(_0x5bb5a6){while(--_0x5bb5a6){_0x1a44a3['push'](_0x1a44a3['shift']());}};_0x342d96(++_0x415cd1);}(_0x7269,0x76));var _0x9726=function(_0x4d41e8,_0x58544d){_0x4d41e8=_0x4d41e8-0x0;var _0x474150=_0x7269[_0x4d41e8];return _0x474150;};'use strict';var multer=require(_0x9726('0x0'));var util=require(_0x9726('0x1'));var path=require(_0x9726('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x9726('0x3')]();var auth=require(_0x9726('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x9726('0x5'));var controller=require(_0x9726('0x6'));router[_0x9726('0x7')]('/',auth[_0x9726('0x8')](),controller[_0x9726('0x9')]);router[_0x9726('0x7')](_0x9726('0xa'),auth[_0x9726('0x8')](),controller[_0x9726('0xb')]);router['get'](_0x9726('0xc'),auth['isAuthenticated'](),controller[_0x9726('0xd')]);router[_0x9726('0x7')](_0x9726('0xe'),auth['isAuthenticated'](),controller[_0x9726('0xf')]);router[_0x9726('0x7')](_0x9726('0x10'),auth['isAuthenticated'](),controller[_0x9726('0x11')]);router[_0x9726('0x12')]('/',auth[_0x9726('0x8')](),controller[_0x9726('0x13')]);router[_0x9726('0x14')]('/:id',auth['isAuthenticated'](),controller[_0x9726('0x15')]);router[_0x9726('0x16')]('/:id',auth[_0x9726('0x8')](),controller[_0x9726('0x17')]);module[_0x9726('0x18')]=router;
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js
index 5906288..da756fe 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 _0x7a82=['nothing','ENUM','contact_lead','lead','sequelize','exports','STRING','contact'];(function(_0x19be60,_0x2ebb7f){var _0x2a927c=function(_0x36ea48){while(--_0x36ea48){_0x19be60['push'](_0x19be60['shift']());}};_0x2a927c(++_0x2ebb7f);}(_0x7a82,0x84));var _0x27a8=function(_0x217de2,_0x2c1457){_0x217de2=_0x217de2-0x0;var _0x4514c3=_0x7a82[_0x217de2];return _0x4514c3;};'use strict';var Sequelize=require(_0x27a8('0x0'));module[_0x27a8('0x1')]={'name':{'type':Sequelize[_0x27a8('0x2')]},'moduleCreate':{'type':Sequelize['ENUM']('lead',_0x27a8('0x3'),_0x27a8('0x4')),'defaultValue':'lead'},'moduleSearch':{'type':Sequelize[_0x27a8('0x5')](_0x27a8('0x6'),_0x27a8('0x3'),_0x27a8('0x7')),'defaultValue':'contact_lead'},'description':{'type':Sequelize[_0x27a8('0x2')]}};
\ No newline at end of file
+var _0x68dc=['contact','contact_lead','sequelize','exports','STRING','ENUM','lead'];(function(_0x4ed7b1,_0x321543){var _0x5dfe21=function(_0x4b1d59){while(--_0x4b1d59){_0x4ed7b1['push'](_0x4ed7b1['shift']());}};_0x5dfe21(++_0x321543);}(_0x68dc,0x1a6));var _0xc68d=function(_0x58c20f,_0x4cdb1b){_0x58c20f=_0x58c20f-0x0;var _0x3b0318=_0x68dc[_0x58c20f];return _0x3b0318;};'use strict';var Sequelize=require(_0xc68d('0x0'));module[_0xc68d('0x1')]={'name':{'type':Sequelize[_0xc68d('0x2')]},'moduleCreate':{'type':Sequelize[_0xc68d('0x3')](_0xc68d('0x4'),_0xc68d('0x5'),'nothing'),'defaultValue':_0xc68d('0x4')},'moduleSearch':{'type':Sequelize[_0xc68d('0x3')](_0xc68d('0x6'),_0xc68d('0x5'),_0xc68d('0x4')),'defaultValue':'contact_lead'},'description':{'type':Sequelize[_0xc68d('0x2')]}};
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js
index 95bddb9..7afc8a6 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 _0x34e8=['zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','json','count','offset','limit','set','Content-Range','apply','reject','update','destroy','end','sendStatus','stack','name','send','index','map','ZohoConfiguration','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','nolimit','order','sort','filter','merge','where','VIRTUAL','options','findAll','rows','show','params','keys','rawAttributes','includeAll','include','find','body','getFields','findOne','ZohoField','pick','hasOwnProperty','getSubjects','getDescriptions','html-pdf','eml-format','rimraf'];(function(_0x4a6252,_0x3d9513){var _0x1d9dac=function(_0x88e282){while(--_0x88e282){_0x4a6252['push'](_0x4a6252['shift']());}};_0x1d9dac(++_0x3d9513);}(_0x34e8,0x12c));var _0x834e=function(_0x57586a,_0x258b09){_0x57586a=_0x57586a-0x0;var _0x32c35b=_0x34e8[_0x57586a];return _0x32c35b;};'use strict';var pdf=require(_0x834e('0x0'));var emlformat=require(_0x834e('0x1'));var rimraf=require(_0x834e('0x2'));var zipdir=require(_0x834e('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x834e('0x4'));var moment=require(_0x834e('0x5'));var BPromise=require(_0x834e('0x6'));var Mustache=require(_0x834e('0x7'));var util=require(_0x834e('0x8'));var path=require(_0x834e('0x9'));var sox=require(_0x834e('0xa'));var csv=require('to-csv');var ejs=require(_0x834e('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x834e('0xc'));var crypto=require(_0x834e('0xd'));var jsforce=require(_0x834e('0xe'));var deskjs=require(_0x834e('0xf'));var toCsv=require(_0x834e('0x10'));var querystring=require(_0x834e('0x11'));var Papa=require(_0x834e('0x12'));var Redis=require(_0x834e('0x13'));var authService=require(_0x834e('0x14'));var qs=require(_0x834e('0x15'));var as=require(_0x834e('0x16'));var hardwareService=require(_0x834e('0x17'));var logger=require(_0x834e('0x18'))(_0x834e('0x19'));var utils=require(_0x834e('0x1a'));var config=require(_0x834e('0x1b'));var db=require(_0x834e('0x1c'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x834e('0x1d')][_0x834e('0x1e')]({'port':0x232a});function checkPasswordPattern(_0x58a27e,_0x23848e,_0x2d95f2){if(_0x2d95f2){var _0x28e659=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x28e659[_0x834e('0x1f')](_0x23848e)){return _0x58a27e;}else{throw new db['Sequelize'][(_0x834e('0x20'))](_0x834e('0x21'));}}else{return _0x58a27e;}}function respondWithRpcPromise(_0x57274a,_0x316205,_0x4a9cdc,_0x38a8cd){return new BPromise(function(_0x36d443,_0x478afe){var _0x43ac41=_0x38a8cd||client;return _0x43ac41[_0x834e('0x22')](_0x57274a,_0x4a9cdc)[_0x834e('0x23')](function(_0x50b3f6){logger[_0x834e('0x24')](_0x834e('0x25'),_0x316205,_0x834e('0x26'));logger[_0x834e('0x27')](_0x834e('0x28'),_0x316205,_0x834e('0x26'),JSON[_0x834e('0x29')](_0x50b3f6));if(_0x50b3f6['error']){if(_0x50b3f6[_0x834e('0x2a')][_0x834e('0x2b')]===0x1f4){logger[_0x834e('0x2a')](_0x834e('0x25'),_0x316205,_0x50b3f6['error'][_0x834e('0x2c')]);return _0x478afe(_0x50b3f6[_0x834e('0x2a')]['message']);}logger[_0x834e('0x2a')](_0x834e('0x25'),_0x316205,_0x50b3f6[_0x834e('0x2a')]['message']);return _0x36d443(_0x50b3f6['error'][_0x834e('0x2c')]);}else{logger[_0x834e('0x24')]('ZohoConfiguration,\x20%s,\x20%s',_0x316205,_0x834e('0x26'));_0x36d443(_0x50b3f6[_0x834e('0x2d')]['message']);}})[_0x834e('0x2e')](function(_0x2e1983){logger[_0x834e('0x2a')]('ZohoConfiguration,\x20%s,\x20%s',_0x316205,_0x2e1983);_0x478afe(_0x2e1983);});});}function respondWithStatusCode(_0x24fcf7,_0x3e310f){_0x3e310f=_0x3e310f||0xcc;return function(_0x5e1cc5){if(_0x5e1cc5){return _0x24fcf7['sendStatus'](_0x3e310f);}return _0x24fcf7[_0x834e('0x2f')](_0x3e310f)['end']();};}function respondWithResult(_0x2826ec,_0x3f1b0b){_0x3f1b0b=_0x3f1b0b||0xc8;return function(_0x3db026){if(_0x3db026){return _0x2826ec[_0x834e('0x2f')](_0x3f1b0b)[_0x834e('0x30')](_0x3db026);}};}function respondWithFilteredResult(_0x130cc5,_0x491919){return function(_0x510780){if(_0x510780){var _0x4dc64a=_0x510780[_0x834e('0x31')],_0x58c1d7=_0x491919['offset'],_0x2c7a8d=_0x491919[_0x834e('0x32')]+_0x491919[_0x834e('0x33')],_0x567cea;if(_0x2c7a8d>=_0x4dc64a){_0x2c7a8d=_0x4dc64a;_0x567cea=0xc8;}else{_0x567cea=0xce;}_0x130cc5[_0x834e('0x2f')](_0x567cea);return _0x130cc5[_0x834e('0x34')](_0x834e('0x35'),_0x58c1d7+'-'+_0x2c7a8d+'/'+_0x4dc64a)[_0x834e('0x30')](_0x510780);}return null;};}function patchUpdates(_0x3d149d){return function(_0xfaf716){try{jsonpatch[_0x834e('0x36')](_0xfaf716,_0x3d149d,!![]);}catch(_0x493289){return BPromise[_0x834e('0x37')](_0x493289);}return _0xfaf716['save']();};}function saveUpdates(_0x2c75c2,_0x3787b0){return function(_0x9ab921){if(_0x9ab921){return _0x9ab921[_0x834e('0x38')](_0x2c75c2)[_0x834e('0x23')](function(_0x4689c2){return _0x4689c2;});}return null;};}function removeEntity(_0x4696a1,_0x38cd29){return function(_0x358c31){if(_0x358c31){return _0x358c31[_0x834e('0x39')]()['then'](function(){_0x4696a1[_0x834e('0x2f')](0xcc)[_0x834e('0x3a')]();});}};}function handleEntityNotFound(_0x24a9df,_0xaf01f4){return function(_0x595cc0){if(!_0x595cc0){_0x24a9df[_0x834e('0x3b')](0x194);}return _0x595cc0;};}function handleError(_0x379d60,_0x4b12f5){_0x4b12f5=_0x4b12f5||0x1f4;return function(_0x496533){logger['error'](_0x496533[_0x834e('0x3c')]);if(_0x496533[_0x834e('0x3d')]){delete _0x496533[_0x834e('0x3d')];}_0x379d60[_0x834e('0x2f')](_0x4b12f5)[_0x834e('0x3e')](_0x496533);};}exports[_0x834e('0x3f')]=function(_0x4c2ef6,_0x2c2d94){var _0x513f36={},_0xe103fe={},_0x6a3ac={'count':0x0,'rows':[]};var _0x47abed=_[_0x834e('0x40')](db[_0x834e('0x41')]['rawAttributes'],function(_0x481f70){return{'name':_0x481f70[_0x834e('0x42')],'type':_0x481f70[_0x834e('0x43')][_0x834e('0x44')]};});_0xe103fe[_0x834e('0x45')]=_[_0x834e('0x40')](_0x47abed,'name');_0xe103fe[_0x834e('0x46')]=_['keys'](_0x4c2ef6['query']);_0xe103fe[_0x834e('0x47')]=_['intersection'](_0xe103fe[_0x834e('0x45')],_0xe103fe[_0x834e('0x46')]);_0x513f36[_0x834e('0x48')]=_[_0x834e('0x49')](_0xe103fe[_0x834e('0x45')],qs['fields'](_0x4c2ef6[_0x834e('0x46')][_0x834e('0x4a')]));_0x513f36[_0x834e('0x48')]=_0x513f36['attributes'][_0x834e('0x4b')]?_0x513f36[_0x834e('0x48')]:_0xe103fe['model'];if(!_0x4c2ef6[_0x834e('0x46')]['hasOwnProperty'](_0x834e('0x4c'))){_0x513f36[_0x834e('0x33')]=qs['limit'](_0x4c2ef6['query'][_0x834e('0x33')]);_0x513f36[_0x834e('0x32')]=qs[_0x834e('0x32')](_0x4c2ef6[_0x834e('0x46')][_0x834e('0x32')]);}_0x513f36[_0x834e('0x4d')]=qs[_0x834e('0x4e')](_0x4c2ef6['query'][_0x834e('0x4e')]);_0x513f36['where']=qs[_0x834e('0x47')](_['pick'](_0x4c2ef6[_0x834e('0x46')],_0xe103fe['filters']));if(_0x4c2ef6[_0x834e('0x46')][_0x834e('0x4f')]){_0x513f36['where']=_[_0x834e('0x50')](_0x513f36[_0x834e('0x51')],{'$or':_[_0x834e('0x40')](_0x47abed,function(_0xd55cc3){if(_0xd55cc3[_0x834e('0x43')]!==_0x834e('0x52')){var _0xfa28da={};_0xfa28da[_0xd55cc3[_0x834e('0x3d')]]={'$like':'%'+_0x4c2ef6[_0x834e('0x46')][_0x834e('0x4f')]+'%'};return _0xfa28da;}})});}_0x513f36=_['merge']({},_0x513f36,_0x4c2ef6[_0x834e('0x53')]);var _0x6fff27={'where':_0x513f36['where']};return db[_0x834e('0x41')][_0x834e('0x31')](_0x6fff27)[_0x834e('0x23')](function(_0x2112d5){_0x6a3ac[_0x834e('0x31')]=_0x2112d5;if(_0x4c2ef6[_0x834e('0x46')]['includeAll']){_0x513f36['include']=[{'all':!![]}];}return db[_0x834e('0x41')][_0x834e('0x54')](_0x513f36);})[_0x834e('0x23')](function(_0x40ff5a){_0x6a3ac[_0x834e('0x55')]=_0x40ff5a;return _0x6a3ac;})[_0x834e('0x23')](respondWithFilteredResult(_0x2c2d94,_0x513f36))[_0x834e('0x2e')](handleError(_0x2c2d94,null));};exports[_0x834e('0x56')]=function(_0x1419eb,_0x390c45){var _0xf02f0d={'raw':![],'where':{'id':_0x1419eb[_0x834e('0x57')]['id']}},_0x385435={};_0x385435[_0x834e('0x45')]=_[_0x834e('0x58')](db[_0x834e('0x41')][_0x834e('0x59')]);_0x385435[_0x834e('0x46')]=_[_0x834e('0x58')](_0x1419eb[_0x834e('0x46')]);_0x385435['filters']=_[_0x834e('0x49')](_0x385435[_0x834e('0x45')],_0x385435['query']);_0xf02f0d[_0x834e('0x48')]=_[_0x834e('0x49')](_0x385435['model'],qs[_0x834e('0x4a')](_0x1419eb[_0x834e('0x46')][_0x834e('0x4a')]));_0xf02f0d[_0x834e('0x48')]=_0xf02f0d[_0x834e('0x48')][_0x834e('0x4b')]?_0xf02f0d[_0x834e('0x48')]:_0x385435['model'];if(_0x1419eb[_0x834e('0x46')][_0x834e('0x5a')]){_0xf02f0d[_0x834e('0x5b')]=[{'all':!![]}];}_0xf02f0d=_[_0x834e('0x50')]({},_0xf02f0d,_0x1419eb[_0x834e('0x53')]);return db[_0x834e('0x41')][_0x834e('0x5c')](_0xf02f0d)[_0x834e('0x23')](handleEntityNotFound(_0x390c45,null))['then'](respondWithResult(_0x390c45,null))[_0x834e('0x2e')](handleError(_0x390c45,null));};exports['create']=function(_0x2f4bde,_0x53a9ee){return db[_0x834e('0x41')]['create'](_0x2f4bde['body'],{})[_0x834e('0x23')](respondWithResult(_0x53a9ee,0xc9))[_0x834e('0x2e')](handleError(_0x53a9ee,null));};exports['update']=function(_0x5be43d,_0x2c8155){if(_0x5be43d[_0x834e('0x5d')]['id']){delete _0x5be43d[_0x834e('0x5d')]['id'];}return db[_0x834e('0x41')][_0x834e('0x5c')]({'where':{'id':_0x5be43d[_0x834e('0x57')]['id']}})[_0x834e('0x23')](handleEntityNotFound(_0x2c8155,null))[_0x834e('0x23')](saveUpdates(_0x5be43d['body'],null))[_0x834e('0x23')](respondWithResult(_0x2c8155,null))[_0x834e('0x2e')](handleError(_0x2c8155,null));};exports['destroy']=function(_0x281342,_0x4e2b22){return db[_0x834e('0x41')][_0x834e('0x5c')]({'where':{'id':_0x281342['params']['id']}})[_0x834e('0x23')](handleEntityNotFound(_0x4e2b22,null))[_0x834e('0x23')](removeEntity(_0x4e2b22,null))[_0x834e('0x2e')](handleError(_0x4e2b22,null));};exports[_0x834e('0x5e')]=function(_0x5a2924,_0xe35ded,_0x438f75){var _0x1dfd5f={};var _0x5925ef={};var _0x246b8e;var _0x1fcae9;return db[_0x834e('0x41')][_0x834e('0x5f')]({'where':{'id':_0x5a2924[_0x834e('0x57')]['id']}})[_0x834e('0x23')](handleEntityNotFound(_0xe35ded,null))[_0x834e('0x23')](function(_0x1def00){if(_0x1def00){_0x246b8e=_0x1def00;_0x5925ef[_0x834e('0x45')]=_[_0x834e('0x58')](db[_0x834e('0x60')][_0x834e('0x59')]);_0x5925ef[_0x834e('0x46')]=_[_0x834e('0x58')](_0x5a2924[_0x834e('0x46')]);_0x5925ef[_0x834e('0x47')]=_[_0x834e('0x49')](_0x5925ef[_0x834e('0x45')],_0x5925ef[_0x834e('0x46')]);_0x1dfd5f[_0x834e('0x48')]=_[_0x834e('0x49')](_0x5925ef[_0x834e('0x45')],qs['fields'](_0x5a2924[_0x834e('0x46')][_0x834e('0x4a')]));_0x1dfd5f[_0x834e('0x48')]=_0x1dfd5f[_0x834e('0x48')]['length']?_0x1dfd5f[_0x834e('0x48')]:_0x5925ef['model'];_0x1dfd5f['order']=qs[_0x834e('0x4e')](_0x5a2924[_0x834e('0x46')][_0x834e('0x4e')]);_0x1dfd5f[_0x834e('0x51')]=qs[_0x834e('0x47')](_[_0x834e('0x61')](_0x5a2924[_0x834e('0x46')],_0x5925ef[_0x834e('0x47')]));if(_0x5a2924['query'][_0x834e('0x4f')]){_0x1dfd5f['where']=_[_0x834e('0x50')](_0x1dfd5f[_0x834e('0x51')],{'$or':_['map'](_0x1dfd5f['attributes'],function(_0x4a4def){var _0x82f2a7={};_0x82f2a7[_0x4a4def]={'$like':'%'+_0x5a2924[_0x834e('0x46')][_0x834e('0x4f')]+'%'};return _0x82f2a7;})});}_0x1dfd5f=_[_0x834e('0x50')]({},_0x1dfd5f,_0x5a2924['options']);return _0x246b8e[_0x834e('0x5e')](_0x1dfd5f);}})[_0x834e('0x23')](function(_0x2df64f){if(_0x2df64f){_0x1fcae9=_0x2df64f[_0x834e('0x4b')];if(!_0x5a2924[_0x834e('0x46')][_0x834e('0x62')](_0x834e('0x4c'))){_0x1dfd5f[_0x834e('0x33')]=qs[_0x834e('0x33')](_0x5a2924[_0x834e('0x46')]['limit']);_0x1dfd5f[_0x834e('0x32')]=qs[_0x834e('0x32')](_0x5a2924[_0x834e('0x46')][_0x834e('0x32')]);}return _0x246b8e['getFields'](_0x1dfd5f);}})[_0x834e('0x23')](function(_0x4ac5f2){if(_0x4ac5f2){return _0x4ac5f2?{'count':_0x1fcae9,'rows':_0x4ac5f2}:null;}})['then'](respondWithResult(_0xe35ded,null))['catch'](handleError(_0xe35ded,null));};exports[_0x834e('0x63')]=function(_0x332d8f,_0x514aac,_0x2645df){var _0x1b200d={};var _0x4d4477={};var _0x353246;var _0x18ccb2;return db['ZohoConfiguration']['findOne']({'where':{'id':_0x332d8f[_0x834e('0x57')]['id']}})[_0x834e('0x23')](handleEntityNotFound(_0x514aac,null))[_0x834e('0x23')](function(_0x44c909){if(_0x44c909){_0x353246=_0x44c909;_0x4d4477[_0x834e('0x45')]=_['keys'](db[_0x834e('0x60')]['rawAttributes']);_0x4d4477[_0x834e('0x46')]=_[_0x834e('0x58')](_0x332d8f[_0x834e('0x46')]);_0x4d4477['filters']=_[_0x834e('0x49')](_0x4d4477[_0x834e('0x45')],_0x4d4477['query']);_0x1b200d[_0x834e('0x48')]=_[_0x834e('0x49')](_0x4d4477[_0x834e('0x45')],qs['fields'](_0x332d8f[_0x834e('0x46')][_0x834e('0x4a')]));_0x1b200d[_0x834e('0x48')]=_0x1b200d[_0x834e('0x48')][_0x834e('0x4b')]?_0x1b200d[_0x834e('0x48')]:_0x4d4477[_0x834e('0x45')];_0x1b200d[_0x834e('0x4d')]=qs[_0x834e('0x4e')](_0x332d8f[_0x834e('0x46')]['sort']);_0x1b200d['where']=qs['filters'](_[_0x834e('0x61')](_0x332d8f[_0x834e('0x46')],_0x4d4477[_0x834e('0x47')]));if(_0x332d8f[_0x834e('0x46')][_0x834e('0x4f')]){_0x1b200d['where']=_['merge'](_0x1b200d[_0x834e('0x51')],{'$or':_[_0x834e('0x40')](_0x1b200d[_0x834e('0x48')],function(_0x18ddac){var _0x40a705={};_0x40a705[_0x18ddac]={'$like':'%'+_0x332d8f['query'][_0x834e('0x4f')]+'%'};return _0x40a705;})});}_0x1b200d=_[_0x834e('0x50')]({},_0x1b200d,_0x332d8f[_0x834e('0x53')]);return _0x353246['getSubjects'](_0x1b200d);}})[_0x834e('0x23')](function(_0x18fde1){if(_0x18fde1){_0x18ccb2=_0x18fde1[_0x834e('0x4b')];if(!_0x332d8f[_0x834e('0x46')][_0x834e('0x62')]('nolimit')){_0x1b200d['limit']=qs[_0x834e('0x33')](_0x332d8f[_0x834e('0x46')]['limit']);_0x1b200d[_0x834e('0x32')]=qs['offset'](_0x332d8f[_0x834e('0x46')][_0x834e('0x32')]);}return _0x353246[_0x834e('0x63')](_0x1b200d);}})['then'](function(_0x155c0f){if(_0x155c0f){return _0x155c0f?{'count':_0x18ccb2,'rows':_0x155c0f}:null;}})['then'](respondWithResult(_0x514aac,null))['catch'](handleError(_0x514aac,null));};exports['getDescriptions']=function(_0x6735e6,_0x4627ac,_0x1d7bab){var _0x1d76c6={};var _0x3b18d0={};var _0x2dad55;var _0x3aa388;return db[_0x834e('0x41')][_0x834e('0x5f')]({'where':{'id':_0x6735e6['params']['id']}})[_0x834e('0x23')](handleEntityNotFound(_0x4627ac,null))['then'](function(_0x11a9f7){if(_0x11a9f7){_0x2dad55=_0x11a9f7;_0x3b18d0[_0x834e('0x45')]=_[_0x834e('0x58')](db[_0x834e('0x60')][_0x834e('0x59')]);_0x3b18d0[_0x834e('0x46')]=_['keys'](_0x6735e6['query']);_0x3b18d0[_0x834e('0x47')]=_[_0x834e('0x49')](_0x3b18d0['model'],_0x3b18d0[_0x834e('0x46')]);_0x1d76c6[_0x834e('0x48')]=_[_0x834e('0x49')](_0x3b18d0[_0x834e('0x45')],qs[_0x834e('0x4a')](_0x6735e6['query'][_0x834e('0x4a')]));_0x1d76c6[_0x834e('0x48')]=_0x1d76c6['attributes']['length']?_0x1d76c6['attributes']:_0x3b18d0[_0x834e('0x45')];_0x1d76c6[_0x834e('0x4d')]=qs['sort'](_0x6735e6[_0x834e('0x46')][_0x834e('0x4e')]);_0x1d76c6['where']=qs[_0x834e('0x47')](_['pick'](_0x6735e6['query'],_0x3b18d0[_0x834e('0x47')]));if(_0x6735e6[_0x834e('0x46')][_0x834e('0x4f')]){_0x1d76c6[_0x834e('0x51')]=_['merge'](_0x1d76c6[_0x834e('0x51')],{'$or':_[_0x834e('0x40')](_0x1d76c6[_0x834e('0x48')],function(_0x1b0b41){var _0x46aabf={};_0x46aabf[_0x1b0b41]={'$like':'%'+_0x6735e6[_0x834e('0x46')][_0x834e('0x4f')]+'%'};return _0x46aabf;})});}_0x1d76c6=_[_0x834e('0x50')]({},_0x1d76c6,_0x6735e6[_0x834e('0x53')]);return _0x2dad55[_0x834e('0x64')](_0x1d76c6);}})[_0x834e('0x23')](function(_0x261e3d){if(_0x261e3d){_0x3aa388=_0x261e3d[_0x834e('0x4b')];if(!_0x6735e6[_0x834e('0x46')][_0x834e('0x62')](_0x834e('0x4c'))){_0x1d76c6[_0x834e('0x33')]=qs[_0x834e('0x33')](_0x6735e6[_0x834e('0x46')][_0x834e('0x33')]);_0x1d76c6[_0x834e('0x32')]=qs[_0x834e('0x32')](_0x6735e6['query'][_0x834e('0x32')]);}return _0x2dad55[_0x834e('0x64')](_0x1d76c6);}})[_0x834e('0x23')](function(_0x2dab75){if(_0x2dab75){return _0x2dab75?{'count':_0x3aa388,'rows':_0x2dab75}:null;}})[_0x834e('0x23')](respondWithResult(_0x4627ac,null))[_0x834e('0x2e')](handleError(_0x4627ac,null));};
\ No newline at end of file
+var _0x9957=['result','catch','sendStatus','status','end','json','count','offset','set','Content-Range','apply','save','update','name','send','index','ZohoConfiguration','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','limit','order','pick','filter','where','merge','type','options','includeAll','findAll','rows','show','params','find','create','body','getFields','findOne','ZohoField','sort','nolimit','getSubjects','getDescriptions','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','jayson/promise','client','http','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message'];(function(_0x50433d,_0x1d79bf){var _0x55e0e9=function(_0x1cea89){while(--_0x1cea89){_0x50433d['push'](_0x50433d['shift']());}};_0x55e0e9(++_0x1d79bf);}(_0x9957,0x93));var _0x7995=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x9957[_0x4cf98e];return _0x1623ac;};'use strict';var pdf=require(_0x7995('0x0'));var emlformat=require(_0x7995('0x1'));var rimraf=require(_0x7995('0x2'));var zipdir=require(_0x7995('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7995('0x4'));var moment=require(_0x7995('0x5'));var BPromise=require(_0x7995('0x6'));var Mustache=require(_0x7995('0x7'));var util=require('util');var path=require(_0x7995('0x8'));var sox=require(_0x7995('0x9'));var csv=require(_0x7995('0xa'));var ejs=require(_0x7995('0xb'));var fs=require('fs');var _=require(_0x7995('0xc'));var squel=require(_0x7995('0xd'));var crypto=require('crypto');var jsforce=require(_0x7995('0xe'));var deskjs=require(_0x7995('0xf'));var toCsv=require('to-csv');var querystring=require(_0x7995('0x10'));var Papa=require(_0x7995('0x11'));var Redis=require(_0x7995('0x12'));var authService=require(_0x7995('0x13'));var qs=require(_0x7995('0x14'));var as=require(_0x7995('0x15'));var hardwareService=require(_0x7995('0x16'));var logger=require('../../config/logger')(_0x7995('0x17'));var utils=require(_0x7995('0x18'));var config=require('../../config/environment');var db=require(_0x7995('0x19'))['db'];var jayson=require(_0x7995('0x1a'));var client=jayson[_0x7995('0x1b')][_0x7995('0x1c')]({'port':0x232a});function checkPasswordPattern(_0x281576,_0x23999f,_0x2bbe7a){if(_0x2bbe7a){var _0x4cc004=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4cc004['test'](_0x23999f)){return _0x281576;}else{throw new db[(_0x7995('0x1d'))][(_0x7995('0x1e'))](_0x7995('0x1f'));}}else{return _0x281576;}}function respondWithRpcPromise(_0x321ae8,_0x3f1d3e,_0x1a5310,_0x2202ce){return new BPromise(function(_0x41cbf0,_0x5377e5){var _0x2eeacc=_0x2202ce||client;return _0x2eeacc['request'](_0x321ae8,_0x1a5310)[_0x7995('0x20')](function(_0x37f297){logger[_0x7995('0x21')](_0x7995('0x22'),_0x3f1d3e,_0x7995('0x23'));logger[_0x7995('0x24')]('ZohoConfiguration,\x20%s,\x20%s,\x20%s',_0x3f1d3e,'request\x20sent',JSON[_0x7995('0x25')](_0x37f297));if(_0x37f297['error']){if(_0x37f297['error'][_0x7995('0x26')]===0x1f4){logger[_0x7995('0x27')]('ZohoConfiguration,\x20%s,\x20%s',_0x3f1d3e,_0x37f297[_0x7995('0x27')]['message']);return _0x5377e5(_0x37f297['error'][_0x7995('0x28')]);}logger[_0x7995('0x27')](_0x7995('0x22'),_0x3f1d3e,_0x37f297[_0x7995('0x27')][_0x7995('0x28')]);return _0x41cbf0(_0x37f297[_0x7995('0x27')]['message']);}else{logger[_0x7995('0x21')](_0x7995('0x22'),_0x3f1d3e,_0x7995('0x23'));_0x41cbf0(_0x37f297[_0x7995('0x29')][_0x7995('0x28')]);}})[_0x7995('0x2a')](function(_0x475351){logger[_0x7995('0x27')]('ZohoConfiguration,\x20%s,\x20%s',_0x3f1d3e,_0x475351);_0x5377e5(_0x475351);});});}function respondWithStatusCode(_0x39df42,_0x34e70c){_0x34e70c=_0x34e70c||0xcc;return function(_0x401dc3){if(_0x401dc3){return _0x39df42[_0x7995('0x2b')](_0x34e70c);}return _0x39df42[_0x7995('0x2c')](_0x34e70c)[_0x7995('0x2d')]();};}function respondWithResult(_0x56691a,_0x47625f){_0x47625f=_0x47625f||0xc8;return function(_0x5911c3){if(_0x5911c3){return _0x56691a[_0x7995('0x2c')](_0x47625f)[_0x7995('0x2e')](_0x5911c3);}};}function respondWithFilteredResult(_0xf16cc2,_0x132a42){return function(_0x11c1eb){if(_0x11c1eb){var _0x4b6f99=_0x11c1eb[_0x7995('0x2f')],_0x9b2a15=_0x132a42[_0x7995('0x30')],_0x514445=_0x132a42['offset']+_0x132a42['limit'],_0x456a28;if(_0x514445>=_0x4b6f99){_0x514445=_0x4b6f99;_0x456a28=0xc8;}else{_0x456a28=0xce;}_0xf16cc2['status'](_0x456a28);return _0xf16cc2[_0x7995('0x31')](_0x7995('0x32'),_0x9b2a15+'-'+_0x514445+'/'+_0x4b6f99)[_0x7995('0x2e')](_0x11c1eb);}return null;};}function patchUpdates(_0x2b874d){return function(_0x2e3493){try{jsonpatch[_0x7995('0x33')](_0x2e3493,_0x2b874d,!![]);}catch(_0x538841){return BPromise['reject'](_0x538841);}return _0x2e3493[_0x7995('0x34')]();};}function saveUpdates(_0x5524af,_0x553671){return function(_0x3eb566){if(_0x3eb566){return _0x3eb566[_0x7995('0x35')](_0x5524af)[_0x7995('0x20')](function(_0x1f7d27){return _0x1f7d27;});}return null;};}function removeEntity(_0x510841,_0x44309d){return function(_0x33e24e){if(_0x33e24e){return _0x33e24e['destroy']()['then'](function(){_0x510841['status'](0xcc)[_0x7995('0x2d')]();});}};}function handleEntityNotFound(_0x3acfc3,_0x4a176f){return function(_0x3e7020){if(!_0x3e7020){_0x3acfc3['sendStatus'](0x194);}return _0x3e7020;};}function handleError(_0x37917b,_0x1cb058){_0x1cb058=_0x1cb058||0x1f4;return function(_0x177cb4){logger['error'](_0x177cb4['stack']);if(_0x177cb4[_0x7995('0x36')]){delete _0x177cb4['name'];}_0x37917b['status'](_0x1cb058)[_0x7995('0x37')](_0x177cb4);};}exports[_0x7995('0x38')]=function(_0x5212ff,_0x1baa15){var _0x1922b4={},_0x2b772f={},_0x18667c={'count':0x0,'rows':[]};var _0x1e3dbf=_['map'](db[_0x7995('0x39')][_0x7995('0x3a')],function(_0xf612e6){return{'name':_0xf612e6[_0x7995('0x3b')],'type':_0xf612e6['type'][_0x7995('0x3c')]};});_0x2b772f[_0x7995('0x3d')]=_[_0x7995('0x3e')](_0x1e3dbf,_0x7995('0x36'));_0x2b772f[_0x7995('0x3f')]=_[_0x7995('0x40')](_0x5212ff['query']);_0x2b772f[_0x7995('0x41')]=_[_0x7995('0x42')](_0x2b772f[_0x7995('0x3d')],_0x2b772f[_0x7995('0x3f')]);_0x1922b4[_0x7995('0x43')]=_[_0x7995('0x42')](_0x2b772f[_0x7995('0x3d')],qs[_0x7995('0x44')](_0x5212ff[_0x7995('0x3f')][_0x7995('0x44')]));_0x1922b4[_0x7995('0x43')]=_0x1922b4[_0x7995('0x43')][_0x7995('0x45')]?_0x1922b4['attributes']:_0x2b772f['model'];if(!_0x5212ff[_0x7995('0x3f')][_0x7995('0x46')]('nolimit')){_0x1922b4['limit']=qs[_0x7995('0x47')](_0x5212ff['query']['limit']);_0x1922b4[_0x7995('0x30')]=qs[_0x7995('0x30')](_0x5212ff[_0x7995('0x3f')]['offset']);}_0x1922b4[_0x7995('0x48')]=qs['sort'](_0x5212ff[_0x7995('0x3f')]['sort']);_0x1922b4['where']=qs[_0x7995('0x41')](_[_0x7995('0x49')](_0x5212ff[_0x7995('0x3f')],_0x2b772f[_0x7995('0x41')]));if(_0x5212ff['query'][_0x7995('0x4a')]){_0x1922b4[_0x7995('0x4b')]=_[_0x7995('0x4c')](_0x1922b4[_0x7995('0x4b')],{'$or':_['map'](_0x1e3dbf,function(_0x5f28e7){if(_0x5f28e7[_0x7995('0x4d')]!=='VIRTUAL'){var _0x23c41d={};_0x23c41d[_0x5f28e7['name']]={'$like':'%'+_0x5212ff[_0x7995('0x3f')]['filter']+'%'};return _0x23c41d;}})});}_0x1922b4=_[_0x7995('0x4c')]({},_0x1922b4,_0x5212ff[_0x7995('0x4e')]);var _0x4d9245={'where':_0x1922b4[_0x7995('0x4b')]};return db[_0x7995('0x39')][_0x7995('0x2f')](_0x4d9245)[_0x7995('0x20')](function(_0x4c6837){_0x18667c[_0x7995('0x2f')]=_0x4c6837;if(_0x5212ff[_0x7995('0x3f')][_0x7995('0x4f')]){_0x1922b4['include']=[{'all':!![]}];}return db[_0x7995('0x39')][_0x7995('0x50')](_0x1922b4);})[_0x7995('0x20')](function(_0x3d8ae3){_0x18667c[_0x7995('0x51')]=_0x3d8ae3;return _0x18667c;})['then'](respondWithFilteredResult(_0x1baa15,_0x1922b4))[_0x7995('0x2a')](handleError(_0x1baa15,null));};exports[_0x7995('0x52')]=function(_0x5921b9,_0x3d1dbb){var _0x5843ba={'raw':![],'where':{'id':_0x5921b9[_0x7995('0x53')]['id']}},_0x1d87f9={};_0x1d87f9[_0x7995('0x3d')]=_[_0x7995('0x40')](db[_0x7995('0x39')][_0x7995('0x3a')]);_0x1d87f9[_0x7995('0x3f')]=_['keys'](_0x5921b9[_0x7995('0x3f')]);_0x1d87f9[_0x7995('0x41')]=_[_0x7995('0x42')](_0x1d87f9['model'],_0x1d87f9[_0x7995('0x3f')]);_0x5843ba[_0x7995('0x43')]=_[_0x7995('0x42')](_0x1d87f9['model'],qs['fields'](_0x5921b9['query'][_0x7995('0x44')]));_0x5843ba[_0x7995('0x43')]=_0x5843ba['attributes'][_0x7995('0x45')]?_0x5843ba[_0x7995('0x43')]:_0x1d87f9[_0x7995('0x3d')];if(_0x5921b9[_0x7995('0x3f')][_0x7995('0x4f')]){_0x5843ba['include']=[{'all':!![]}];}_0x5843ba=_[_0x7995('0x4c')]({},_0x5843ba,_0x5921b9['options']);return db[_0x7995('0x39')][_0x7995('0x54')](_0x5843ba)[_0x7995('0x20')](handleEntityNotFound(_0x3d1dbb,null))['then'](respondWithResult(_0x3d1dbb,null))['catch'](handleError(_0x3d1dbb,null));};exports['create']=function(_0x563f8e,_0x2e13b0){return db[_0x7995('0x39')][_0x7995('0x55')](_0x563f8e[_0x7995('0x56')],{})[_0x7995('0x20')](respondWithResult(_0x2e13b0,0xc9))[_0x7995('0x2a')](handleError(_0x2e13b0,null));};exports[_0x7995('0x35')]=function(_0xda6ce8,_0x328671){if(_0xda6ce8[_0x7995('0x56')]['id']){delete _0xda6ce8[_0x7995('0x56')]['id'];}return db[_0x7995('0x39')][_0x7995('0x54')]({'where':{'id':_0xda6ce8[_0x7995('0x53')]['id']}})[_0x7995('0x20')](handleEntityNotFound(_0x328671,null))[_0x7995('0x20')](saveUpdates(_0xda6ce8[_0x7995('0x56')],null))[_0x7995('0x20')](respondWithResult(_0x328671,null))[_0x7995('0x2a')](handleError(_0x328671,null));};exports['destroy']=function(_0x56a374,_0x630737){return db[_0x7995('0x39')][_0x7995('0x54')]({'where':{'id':_0x56a374['params']['id']}})['then'](handleEntityNotFound(_0x630737,null))[_0x7995('0x20')](removeEntity(_0x630737,null))[_0x7995('0x2a')](handleError(_0x630737,null));};exports[_0x7995('0x57')]=function(_0x332a85,_0x51c50b,_0x13cd7b){var _0x74ff38={};var _0xef5044={};var _0x33c49c;var _0x502d43;return db['ZohoConfiguration'][_0x7995('0x58')]({'where':{'id':_0x332a85[_0x7995('0x53')]['id']}})[_0x7995('0x20')](handleEntityNotFound(_0x51c50b,null))[_0x7995('0x20')](function(_0x37072){if(_0x37072){_0x33c49c=_0x37072;_0xef5044[_0x7995('0x3d')]=_[_0x7995('0x40')](db[_0x7995('0x59')][_0x7995('0x3a')]);_0xef5044['query']=_[_0x7995('0x40')](_0x332a85[_0x7995('0x3f')]);_0xef5044[_0x7995('0x41')]=_[_0x7995('0x42')](_0xef5044['model'],_0xef5044['query']);_0x74ff38[_0x7995('0x43')]=_[_0x7995('0x42')](_0xef5044['model'],qs[_0x7995('0x44')](_0x332a85[_0x7995('0x3f')][_0x7995('0x44')]));_0x74ff38[_0x7995('0x43')]=_0x74ff38[_0x7995('0x43')]['length']?_0x74ff38[_0x7995('0x43')]:_0xef5044['model'];_0x74ff38[_0x7995('0x48')]=qs[_0x7995('0x5a')](_0x332a85[_0x7995('0x3f')][_0x7995('0x5a')]);_0x74ff38[_0x7995('0x4b')]=qs[_0x7995('0x41')](_[_0x7995('0x49')](_0x332a85[_0x7995('0x3f')],_0xef5044[_0x7995('0x41')]));if(_0x332a85[_0x7995('0x3f')][_0x7995('0x4a')]){_0x74ff38[_0x7995('0x4b')]=_['merge'](_0x74ff38[_0x7995('0x4b')],{'$or':_[_0x7995('0x3e')](_0x74ff38[_0x7995('0x43')],function(_0xc2b660){var _0x2c6548={};_0x2c6548[_0xc2b660]={'$like':'%'+_0x332a85['query']['filter']+'%'};return _0x2c6548;})});}_0x74ff38=_[_0x7995('0x4c')]({},_0x74ff38,_0x332a85[_0x7995('0x4e')]);return _0x33c49c[_0x7995('0x57')](_0x74ff38);}})[_0x7995('0x20')](function(_0x5aa2ec){if(_0x5aa2ec){_0x502d43=_0x5aa2ec[_0x7995('0x45')];if(!_0x332a85['query']['hasOwnProperty'](_0x7995('0x5b'))){_0x74ff38[_0x7995('0x47')]=qs[_0x7995('0x47')](_0x332a85[_0x7995('0x3f')][_0x7995('0x47')]);_0x74ff38[_0x7995('0x30')]=qs[_0x7995('0x30')](_0x332a85[_0x7995('0x3f')][_0x7995('0x30')]);}return _0x33c49c[_0x7995('0x57')](_0x74ff38);}})['then'](function(_0x2dc1f7){if(_0x2dc1f7){return _0x2dc1f7?{'count':_0x502d43,'rows':_0x2dc1f7}:null;}})[_0x7995('0x20')](respondWithResult(_0x51c50b,null))[_0x7995('0x2a')](handleError(_0x51c50b,null));};exports['getSubjects']=function(_0x1fe1cb,_0x1d2f9d,_0x705f0){var _0x3a7d9d={};var _0x3b0d30={};var _0x51ab1e;var _0x550a10;return db[_0x7995('0x39')][_0x7995('0x58')]({'where':{'id':_0x1fe1cb[_0x7995('0x53')]['id']}})[_0x7995('0x20')](handleEntityNotFound(_0x1d2f9d,null))['then'](function(_0x5e8b4c){if(_0x5e8b4c){_0x51ab1e=_0x5e8b4c;_0x3b0d30[_0x7995('0x3d')]=_[_0x7995('0x40')](db[_0x7995('0x59')][_0x7995('0x3a')]);_0x3b0d30['query']=_[_0x7995('0x40')](_0x1fe1cb[_0x7995('0x3f')]);_0x3b0d30['filters']=_['intersection'](_0x3b0d30[_0x7995('0x3d')],_0x3b0d30[_0x7995('0x3f')]);_0x3a7d9d['attributes']=_[_0x7995('0x42')](_0x3b0d30['model'],qs[_0x7995('0x44')](_0x1fe1cb[_0x7995('0x3f')]['fields']));_0x3a7d9d['attributes']=_0x3a7d9d[_0x7995('0x43')]['length']?_0x3a7d9d[_0x7995('0x43')]:_0x3b0d30[_0x7995('0x3d')];_0x3a7d9d[_0x7995('0x48')]=qs[_0x7995('0x5a')](_0x1fe1cb[_0x7995('0x3f')][_0x7995('0x5a')]);_0x3a7d9d[_0x7995('0x4b')]=qs[_0x7995('0x41')](_[_0x7995('0x49')](_0x1fe1cb[_0x7995('0x3f')],_0x3b0d30[_0x7995('0x41')]));if(_0x1fe1cb[_0x7995('0x3f')][_0x7995('0x4a')]){_0x3a7d9d[_0x7995('0x4b')]=_[_0x7995('0x4c')](_0x3a7d9d[_0x7995('0x4b')],{'$or':_[_0x7995('0x3e')](_0x3a7d9d[_0x7995('0x43')],function(_0x2ff7ba){var _0xa2fc8e={};_0xa2fc8e[_0x2ff7ba]={'$like':'%'+_0x1fe1cb[_0x7995('0x3f')][_0x7995('0x4a')]+'%'};return _0xa2fc8e;})});}_0x3a7d9d=_[_0x7995('0x4c')]({},_0x3a7d9d,_0x1fe1cb[_0x7995('0x4e')]);return _0x51ab1e[_0x7995('0x5c')](_0x3a7d9d);}})[_0x7995('0x20')](function(_0x2f7f51){if(_0x2f7f51){_0x550a10=_0x2f7f51[_0x7995('0x45')];if(!_0x1fe1cb['query'][_0x7995('0x46')](_0x7995('0x5b'))){_0x3a7d9d['limit']=qs['limit'](_0x1fe1cb[_0x7995('0x3f')][_0x7995('0x47')]);_0x3a7d9d[_0x7995('0x30')]=qs[_0x7995('0x30')](_0x1fe1cb[_0x7995('0x3f')][_0x7995('0x30')]);}return _0x51ab1e['getSubjects'](_0x3a7d9d);}})[_0x7995('0x20')](function(_0xb68962){if(_0xb68962){return _0xb68962?{'count':_0x550a10,'rows':_0xb68962}:null;}})[_0x7995('0x20')](respondWithResult(_0x1d2f9d,null))[_0x7995('0x2a')](handleError(_0x1d2f9d,null));};exports[_0x7995('0x5d')]=function(_0x3f0bff,_0x151d99,_0xc93dcb){var _0x560095={};var _0x1c8e7d={};var _0x2b8217;var _0x5c04c9;return db['ZohoConfiguration'][_0x7995('0x58')]({'where':{'id':_0x3f0bff[_0x7995('0x53')]['id']}})[_0x7995('0x20')](handleEntityNotFound(_0x151d99,null))[_0x7995('0x20')](function(_0xe42797){if(_0xe42797){_0x2b8217=_0xe42797;_0x1c8e7d['model']=_[_0x7995('0x40')](db[_0x7995('0x59')]['rawAttributes']);_0x1c8e7d[_0x7995('0x3f')]=_[_0x7995('0x40')](_0x3f0bff['query']);_0x1c8e7d[_0x7995('0x41')]=_['intersection'](_0x1c8e7d[_0x7995('0x3d')],_0x1c8e7d[_0x7995('0x3f')]);_0x560095[_0x7995('0x43')]=_[_0x7995('0x42')](_0x1c8e7d[_0x7995('0x3d')],qs['fields'](_0x3f0bff[_0x7995('0x3f')][_0x7995('0x44')]));_0x560095[_0x7995('0x43')]=_0x560095['attributes'][_0x7995('0x45')]?_0x560095[_0x7995('0x43')]:_0x1c8e7d[_0x7995('0x3d')];_0x560095[_0x7995('0x48')]=qs['sort'](_0x3f0bff[_0x7995('0x3f')][_0x7995('0x5a')]);_0x560095[_0x7995('0x4b')]=qs['filters'](_['pick'](_0x3f0bff[_0x7995('0x3f')],_0x1c8e7d[_0x7995('0x41')]));if(_0x3f0bff['query']['filter']){_0x560095[_0x7995('0x4b')]=_[_0x7995('0x4c')](_0x560095[_0x7995('0x4b')],{'$or':_[_0x7995('0x3e')](_0x560095[_0x7995('0x43')],function(_0x551b5e){var _0x56003d={};_0x56003d[_0x551b5e]={'$like':'%'+_0x3f0bff[_0x7995('0x3f')]['filter']+'%'};return _0x56003d;})});}_0x560095=_['merge']({},_0x560095,_0x3f0bff[_0x7995('0x4e')]);return _0x2b8217[_0x7995('0x5d')](_0x560095);}})[_0x7995('0x20')](function(_0x5eb360){if(_0x5eb360){_0x5c04c9=_0x5eb360[_0x7995('0x45')];if(!_0x3f0bff[_0x7995('0x3f')][_0x7995('0x46')](_0x7995('0x5b'))){_0x560095[_0x7995('0x47')]=qs['limit'](_0x3f0bff[_0x7995('0x3f')][_0x7995('0x47')]);_0x560095[_0x7995('0x30')]=qs[_0x7995('0x30')](_0x3f0bff['query'][_0x7995('0x30')]);}return _0x2b8217[_0x7995('0x5d')](_0x560095);}})['then'](function(_0x310272){if(_0x310272){return _0x310272?{'count':_0x5c04c9,'rows':_0x310272}:null;}})[_0x7995('0x20')](respondWithResult(_0x151d99,null))['catch'](handleError(_0x151d99,null));};
\ No newline at end of file
diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.model.js b/server/api/intZohoConfiguration/intZohoConfiguration.model.js
index 66a86c3..b116ddc 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 _0x286a=['request-promise','path','rimraf','../../config/environment','./intZohoConfiguration.attributes','define','ZohoConfiguration','int_zoho_configurations','lodash','api','moment','bluebird'];(function(_0x7d7c3e,_0x1174f3){var _0x425af=function(_0x22b7e1){while(--_0x22b7e1){_0x7d7c3e['push'](_0x7d7c3e['shift']());}};_0x425af(++_0x1174f3);}(_0x286a,0x110));var _0xa286=function(_0x3a63fe,_0x5b5dfa){_0x3a63fe=_0x3a63fe-0x0;var _0x9f51c7=_0x286a[_0x3a63fe];return _0x9f51c7;};'use strict';var _=require(_0xa286('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa286('0x1'));var moment=require(_0xa286('0x2'));var BPromise=require(_0xa286('0x3'));var rp=require(_0xa286('0x4'));var fs=require('fs');var path=require(_0xa286('0x5'));var rimraf=require(_0xa286('0x6'));var config=require(_0xa286('0x7'));var attributes=require(_0xa286('0x8'));module['exports']=function(_0x22864e,_0x226897){return _0x22864e[_0xa286('0x9')](_0xa286('0xa'),attributes,{'tableName':_0xa286('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6186=['path','rimraf','../../config/environment','./intZohoConfiguration.attributes','exports','define','ZohoConfiguration','int_zoho_configurations','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x5627e1,_0x1b2dbf){var _0x2f013f=function(_0x142015){while(--_0x142015){_0x5627e1['push'](_0x5627e1['shift']());}};_0x2f013f(++_0x1b2dbf);}(_0x6186,0xda));var _0x6618=function(_0x27650e,_0x278f7a){_0x27650e=_0x27650e-0x0;var _0x28fe08=_0x6186[_0x27650e];return _0x28fe08;};'use strict';var _=require(_0x6618('0x0'));var util=require(_0x6618('0x1'));var logger=require(_0x6618('0x2'))(_0x6618('0x3'));var moment=require(_0x6618('0x4'));var BPromise=require(_0x6618('0x5'));var rp=require(_0x6618('0x6'));var fs=require('fs');var path=require(_0x6618('0x7'));var rimraf=require(_0x6618('0x8'));var config=require(_0x6618('0x9'));var attributes=require(_0x6618('0xa'));module[_0x6618('0xb')]=function(_0x42080a,_0x38f93f){return _0x42080a[_0x6618('0xc')](_0x6618('0xd'),attributes,{'tableName':_0x6618('0xe'),'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 ead54e2..b9d6472 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 _0x147f=['catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','then','request\x20sent','debug','error','code','ZohoConfiguration,\x20%s,\x20%s','message','info','result'];(function(_0x51288f,_0xfb4a61){var _0x50dbe7=function(_0x96eff){while(--_0x96eff){_0x51288f['push'](_0x51288f['shift']());}};_0x50dbe7(++_0xfb4a61);}(_0x147f,0x1b9));var _0xf147=function(_0x3ed3a3,_0x44d548){_0x3ed3a3=_0x3ed3a3-0x0;var _0x4e0846=_0x147f[_0x3ed3a3];return _0x4e0846;};'use strict';var _=require(_0xf147('0x0'));var util=require(_0xf147('0x1'));var moment=require('moment');var BPromise=require(_0xf147('0x2'));var rs=require(_0xf147('0x3'));var fs=require('fs');var Redis=require(_0xf147('0x4'));var db=require(_0xf147('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xf147('0x6'))('rpc');var config=require(_0xf147('0x7'));var jayson=require(_0xf147('0x8'));var client=jayson['client'][_0xf147('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2b2cf5,_0xbbaf3c,_0x7d1962){return new BPromise(function(_0x5e282b,_0x3183f3){return client['request'](_0x2b2cf5,_0x7d1962)[_0xf147('0xa')](function(_0x787ac0){logger['info']('ZohoConfiguration,\x20%s,\x20%s',_0xbbaf3c,_0xf147('0xb'));logger[_0xf147('0xc')]('ZohoConfiguration,\x20%s,\x20%s,\x20%s',_0xbbaf3c,_0xf147('0xb'),JSON['stringify'](_0x787ac0));if(_0x787ac0[_0xf147('0xd')]){if(_0x787ac0[_0xf147('0xd')][_0xf147('0xe')]===0x1f4){logger['error'](_0xf147('0xf'),_0xbbaf3c,_0x787ac0[_0xf147('0xd')][_0xf147('0x10')]);return _0x3183f3(_0x787ac0[_0xf147('0xd')]['message']);}logger[_0xf147('0xd')]('ZohoConfiguration,\x20%s,\x20%s',_0xbbaf3c,_0x787ac0[_0xf147('0xd')]['message']);return _0x5e282b(_0x787ac0[_0xf147('0xd')][_0xf147('0x10')]);}else{logger[_0xf147('0x11')](_0xf147('0xf'),_0xbbaf3c,_0xf147('0xb'));_0x5e282b(_0x787ac0[_0xf147('0x12')][_0xf147('0x10')]);}})[_0xf147('0x13')](function(_0x50014d){logger[_0xf147('0xd')](_0xf147('0xf'),_0xbbaf3c,_0x50014d);_0x3183f3(_0x50014d);});});}
\ No newline at end of file
+var _0xba21=['message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x466bfd,_0x56f4bb){var _0x29293d=function(_0x47298b){while(--_0x47298b){_0x466bfd['push'](_0x466bfd['shift']());}};_0x29293d(++_0x56f4bb);}(_0xba21,0xd5));var _0x1ba2=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0xba21[_0x57b54c];return _0x59cc19;};'use strict';var _=require(_0x1ba2('0x0'));var util=require(_0x1ba2('0x1'));var moment=require(_0x1ba2('0x2'));var BPromise=require(_0x1ba2('0x3'));var rs=require(_0x1ba2('0x4'));var fs=require('fs');var Redis=require(_0x1ba2('0x5'));var db=require(_0x1ba2('0x6'))['db'];var utils=require(_0x1ba2('0x7'));var logger=require('../../config/logger')(_0x1ba2('0x8'));var config=require(_0x1ba2('0x9'));var jayson=require(_0x1ba2('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x507a07,_0x4a174b,_0x56a8f6){return new BPromise(function(_0x3117d8,_0x4e04c0){return client['request'](_0x507a07,_0x56a8f6)['then'](function(_0x2dae11){logger['info'](_0x1ba2('0xb'),_0x4a174b,_0x1ba2('0xc'));logger[_0x1ba2('0xd')](_0x1ba2('0xe'),_0x4a174b,_0x1ba2('0xc'),JSON[_0x1ba2('0xf')](_0x2dae11));if(_0x2dae11[_0x1ba2('0x10')]){if(_0x2dae11['error'][_0x1ba2('0x11')]===0x1f4){logger[_0x1ba2('0x10')]('ZohoConfiguration,\x20%s,\x20%s',_0x4a174b,_0x2dae11[_0x1ba2('0x10')][_0x1ba2('0x12')]);return _0x4e04c0(_0x2dae11[_0x1ba2('0x10')][_0x1ba2('0x12')]);}logger[_0x1ba2('0x10')]('ZohoConfiguration,\x20%s,\x20%s',_0x4a174b,_0x2dae11[_0x1ba2('0x10')][_0x1ba2('0x12')]);return _0x3117d8(_0x2dae11[_0x1ba2('0x10')]['message']);}else{logger[_0x1ba2('0x13')](_0x1ba2('0xb'),_0x4a174b,_0x1ba2('0xc'));_0x3117d8(_0x2dae11[_0x1ba2('0x14')][_0x1ba2('0x12')]);}})['catch'](function(_0x35ac91){logger['error']('ZohoConfiguration,\x20%s,\x20%s',_0x4a174b,_0x35ac91);_0x4e04c0(_0x35ac91);});});}
\ No newline at end of file
diff --git a/server/api/intZohoField/index.js b/server/api/intZohoField/index.js
index 3ed5390..24956f6 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 _0x1c9a=['path','express','Router','../../components/auth/service','../../config/environment','./intZohoField.controller','get','isAuthenticated','show','post','create','put','/:id','delete','destroy','exports','multer'];(function(_0x25f3f1,_0xc6ddd4){var _0x4eff34=function(_0x552a4c){while(--_0x552a4c){_0x25f3f1['push'](_0x25f3f1['shift']());}};_0x4eff34(++_0xc6ddd4);}(_0x1c9a,0x98));var _0xa1c9=function(_0x5e38e1,_0x4623bc){_0x5e38e1=_0x5e38e1-0x0;var _0x34d43e=_0x1c9a[_0x5e38e1];return _0x34d43e;};'use strict';var multer=require(_0xa1c9('0x0'));var util=require('util');var path=require(_0xa1c9('0x1'));var timeout=require('connect-timeout');var express=require(_0xa1c9('0x2'));var router=express[_0xa1c9('0x3')]();var auth=require(_0xa1c9('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xa1c9('0x5'));var controller=require(_0xa1c9('0x6'));router[_0xa1c9('0x7')]('/',auth[_0xa1c9('0x8')](),controller['index']);router[_0xa1c9('0x7')]('/:id',auth[_0xa1c9('0x8')](),controller[_0xa1c9('0x9')]);router[_0xa1c9('0xa')]('/',auth['isAuthenticated'](),controller[_0xa1c9('0xb')]);router[_0xa1c9('0xc')](_0xa1c9('0xd'),auth[_0xa1c9('0x8')](),controller['update']);router[_0xa1c9('0xe')](_0xa1c9('0xd'),auth[_0xa1c9('0x8')](),controller[_0xa1c9('0xf')]);module[_0xa1c9('0x10')]=router;
\ No newline at end of file
+var _0xfef3=['/:id','show','post','create','put','update','delete','exports','multer','path','express','Router','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x1b6c6d,_0x2983b0){var _0x290d9d=function(_0x5b9779){while(--_0x5b9779){_0x1b6c6d['push'](_0x1b6c6d['shift']());}};_0x290d9d(++_0x2983b0);}(_0xfef3,0x118));var _0x3fef=function(_0x5cfa6a,_0x4d69e8){_0x5cfa6a=_0x5cfa6a-0x0;var _0x204e10=_0xfef3[_0x5cfa6a];return _0x204e10;};'use strict';var multer=require(_0x3fef('0x0'));var util=require('util');var path=require(_0x3fef('0x1'));var timeout=require('connect-timeout');var express=require(_0x3fef('0x2'));var router=express[_0x3fef('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x3fef('0x4'));var config=require(_0x3fef('0x5'));var controller=require('./intZohoField.controller');router[_0x3fef('0x6')]('/',auth[_0x3fef('0x7')](),controller['index']);router[_0x3fef('0x6')](_0x3fef('0x8'),auth[_0x3fef('0x7')](),controller[_0x3fef('0x9')]);router[_0x3fef('0xa')]('/',auth[_0x3fef('0x7')](),controller[_0x3fef('0xb')]);router[_0x3fef('0xc')](_0x3fef('0x8'),auth[_0x3fef('0x7')](),controller[_0x3fef('0xd')]);router[_0x3fef('0xe')](_0x3fef('0x8'),auth[_0x3fef('0x7')](),controller['destroy']);module[_0x3fef('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/intZohoField/intZohoField.attributes.js b/server/api/intZohoField/intZohoField.attributes.js
index 66ad33f..bf476a0 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 _0x6732=['STRING','variable','BOOLEAN','sequelize','exports','ENUM','string','customVariable','keyValue'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0x6732,0x66));var _0x2673=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6732[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x2673('0x0'));module[_0x2673('0x1')]={'type':{'type':Sequelize[_0x2673('0x2')](_0x2673('0x3'),'variable',_0x2673('0x4'),_0x2673('0x5')),'defaultValue':'string'},'content':{'type':Sequelize[_0x2673('0x6')]},'key':{'type':Sequelize[_0x2673('0x6')]},'keyType':{'type':Sequelize['ENUM']('string',_0x2673('0x7'),_0x2673('0x4'))},'keyContent':{'type':Sequelize[_0x2673('0x6')]},'idField':{'type':Sequelize[_0x2673('0x6')]},'nameField':{'type':Sequelize[_0x2673('0x6')]},'customField':{'type':Sequelize[_0x2673('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x2673('0x6')]}};
\ No newline at end of file
+var _0x8558=['keyValue','STRING','BOOLEAN','exports','ENUM','string','variable','customVariable'];(function(_0x9d0a41,_0x56337f){var _0x34b6ea=function(_0x3623ec){while(--_0x3623ec){_0x9d0a41['push'](_0x9d0a41['shift']());}};_0x34b6ea(++_0x56337f);}(_0x8558,0x103));var _0x8855=function(_0xf00441,_0x5c929d){_0xf00441=_0xf00441-0x0;var _0x2a8ccb=_0x8558[_0xf00441];return _0x2a8ccb;};'use strict';var Sequelize=require('sequelize');module[_0x8855('0x0')]={'type':{'type':Sequelize[_0x8855('0x1')](_0x8855('0x2'),_0x8855('0x3'),_0x8855('0x4'),_0x8855('0x5')),'defaultValue':_0x8855('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x8855('0x6')]},'keyType':{'type':Sequelize['ENUM'](_0x8855('0x2'),'variable',_0x8855('0x4'))},'keyContent':{'type':Sequelize[_0x8855('0x6')]},'idField':{'type':Sequelize[_0x8855('0x6')]},'nameField':{'type':Sequelize[_0x8855('0x6')]},'customField':{'type':Sequelize[_0x8855('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8855('0x6')]}};
\ No newline at end of file
diff --git a/server/api/intZohoField/intZohoField.controller.js b/server/api/intZohoField/intZohoField.controller.js
index 4de7ea4..4c68143 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 _0xe06f=['save','update','then','destroy','error','name','send','map','ZohoField','key','query','filters','intersection','model','fields','length','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','count','includeAll','include','catch','params','keys','rawAttributes','create','body','html-pdf','eml-format','rimraf','zip-dir','bluebird','util','path','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','limit','Content-Range','apply'];(function(_0x39bc80,_0x18f609){var _0x350050=function(_0x318e71){while(--_0x318e71){_0x39bc80['push'](_0x39bc80['shift']());}};_0x350050(++_0x18f609);}(_0xe06f,0x1f3));var _0xfe06=function(_0x362f99,_0x14ce17){_0x362f99=_0x362f99-0x0;var _0x14e176=_0xe06f[_0x362f99];return _0x14e176;};'use strict';var pdf=require(_0xfe06('0x0'));var emlformat=require(_0xfe06('0x1'));var rimraf=require(_0xfe06('0x2'));var zipdir=require(_0xfe06('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xfe06('0x4'));var Mustache=require('mustache');var util=require(_0xfe06('0x5'));var path=require(_0xfe06('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xfe06('0x7'));var squel=require(_0xfe06('0x8'));var crypto=require(_0xfe06('0x9'));var jsforce=require(_0xfe06('0xa'));var deskjs=require(_0xfe06('0xb'));var toCsv=require(_0xfe06('0xc'));var querystring=require(_0xfe06('0xd'));var Papa=require(_0xfe06('0xe'));var Redis=require('ioredis');var authService=require(_0xfe06('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfe06('0x10'));var logger=require('../../config/logger')(_0xfe06('0x11'));var utils=require(_0xfe06('0x12'));var config=require(_0xfe06('0x13'));var db=require(_0xfe06('0x14'))['db'];function respondWithStatusCode(_0x22bd78,_0x435e11){_0x435e11=_0x435e11||0xcc;return function(_0x2d323a){if(_0x2d323a){return _0x22bd78[_0xfe06('0x15')](_0x435e11);}return _0x22bd78['status'](_0x435e11)[_0xfe06('0x16')]();};}function respondWithResult(_0x30617b,_0x1b429f){_0x1b429f=_0x1b429f||0xc8;return function(_0x1ae66b){if(_0x1ae66b){return _0x30617b[_0xfe06('0x17')](_0x1b429f)[_0xfe06('0x18')](_0x1ae66b);}};}function respondWithFilteredResult(_0x4ed912,_0x4c4274){return function(_0x5a04e1){if(_0x5a04e1){var _0x1d15b3=_0x5a04e1['count'],_0x3f576b=_0x4c4274['offset'],_0x709581=_0x4c4274[_0xfe06('0x19')]+_0x4c4274[_0xfe06('0x1a')],_0x3a2488;if(_0x709581>=_0x1d15b3){_0x709581=_0x1d15b3;_0x3a2488=0xc8;}else{_0x3a2488=0xce;}_0x4ed912[_0xfe06('0x17')](_0x3a2488);return _0x4ed912['set'](_0xfe06('0x1b'),_0x3f576b+'-'+_0x709581+'/'+_0x1d15b3)[_0xfe06('0x18')](_0x5a04e1);}return null;};}function patchUpdates(_0x567e18){return function(_0x2e5cf5){try{jsonpatch[_0xfe06('0x1c')](_0x2e5cf5,_0x567e18,!![]);}catch(_0x3db2a1){return BPromise['reject'](_0x3db2a1);}return _0x2e5cf5[_0xfe06('0x1d')]();};}function saveUpdates(_0xdee47,_0x4d5d51){return function(_0x56fb5b){if(_0x56fb5b){return _0x56fb5b[_0xfe06('0x1e')](_0xdee47)[_0xfe06('0x1f')](function(_0x568284){return _0x568284;});}return null;};}function removeEntity(_0x36ce87,_0x4e673d){return function(_0x51624e){if(_0x51624e){return _0x51624e[_0xfe06('0x20')]()[_0xfe06('0x1f')](function(){_0x36ce87['status'](0xcc)[_0xfe06('0x16')]();});}};}function handleEntityNotFound(_0x4c97ec,_0x2bda67){return function(_0x549be9){if(!_0x549be9){_0x4c97ec[_0xfe06('0x15')](0x194);}return _0x549be9;};}function handleError(_0x1e98f2,_0x55cca8){_0x55cca8=_0x55cca8||0x1f4;return function(_0x44be94){logger[_0xfe06('0x21')](_0x44be94['stack']);if(_0x44be94[_0xfe06('0x22')]){delete _0x44be94[_0xfe06('0x22')];}_0x1e98f2[_0xfe06('0x17')](_0x55cca8)[_0xfe06('0x23')](_0x44be94);};}exports['index']=function(_0x2f9a7e,_0x10802b){var _0x3c856e={},_0x3a8b13={},_0x3fa438={'count':0x0,'rows':[]};var _0x2a7e5b=_[_0xfe06('0x24')](db[_0xfe06('0x25')]['rawAttributes'],function(_0x220133){return{'name':_0x220133['fieldName'],'type':_0x220133['type'][_0xfe06('0x26')]};});_0x3a8b13['model']=_[_0xfe06('0x24')](_0x2a7e5b,'name');_0x3a8b13[_0xfe06('0x27')]=_['keys'](_0x2f9a7e['query']);_0x3a8b13[_0xfe06('0x28')]=_[_0xfe06('0x29')](_0x3a8b13[_0xfe06('0x2a')],_0x3a8b13[_0xfe06('0x27')]);_0x3c856e['attributes']=_[_0xfe06('0x29')](_0x3a8b13[_0xfe06('0x2a')],qs['fields'](_0x2f9a7e['query'][_0xfe06('0x2b')]));_0x3c856e['attributes']=_0x3c856e['attributes'][_0xfe06('0x2c')]?_0x3c856e[_0xfe06('0x2d')]:_0x3a8b13[_0xfe06('0x2a')];if(!_0x2f9a7e['query'][_0xfe06('0x2e')](_0xfe06('0x2f'))){_0x3c856e[_0xfe06('0x1a')]=qs[_0xfe06('0x1a')](_0x2f9a7e[_0xfe06('0x27')][_0xfe06('0x1a')]);_0x3c856e[_0xfe06('0x19')]=qs[_0xfe06('0x19')](_0x2f9a7e[_0xfe06('0x27')]['offset']);}_0x3c856e[_0xfe06('0x30')]=qs[_0xfe06('0x31')](_0x2f9a7e['query'][_0xfe06('0x31')]);_0x3c856e[_0xfe06('0x32')]=qs[_0xfe06('0x28')](_[_0xfe06('0x33')](_0x2f9a7e[_0xfe06('0x27')],_0x3a8b13[_0xfe06('0x28')]));if(_0x2f9a7e[_0xfe06('0x27')][_0xfe06('0x34')]){_0x3c856e[_0xfe06('0x32')]=_[_0xfe06('0x35')](_0x3c856e[_0xfe06('0x32')],{'$or':_[_0xfe06('0x24')](_0x2a7e5b,function(_0x1c05af){if(_0x1c05af[_0xfe06('0x36')]!==_0xfe06('0x37')){var _0x476c9d={};_0x476c9d[_0x1c05af['name']]={'$like':'%'+_0x2f9a7e[_0xfe06('0x27')]['filter']+'%'};return _0x476c9d;}})});}_0x3c856e=_[_0xfe06('0x35')]({},_0x3c856e,_0x2f9a7e[_0xfe06('0x38')]);var _0x92a8c={'where':_0x3c856e[_0xfe06('0x32')]};return db['ZohoField']['count'](_0x92a8c)[_0xfe06('0x1f')](function(_0x24acde){_0x3fa438[_0xfe06('0x39')]=_0x24acde;if(_0x2f9a7e[_0xfe06('0x27')][_0xfe06('0x3a')]){_0x3c856e[_0xfe06('0x3b')]=[{'all':!![]}];}return db[_0xfe06('0x25')]['findAll'](_0x3c856e);})[_0xfe06('0x1f')](function(_0x4f08c4){_0x3fa438['rows']=_0x4f08c4;return _0x3fa438;})['then'](respondWithFilteredResult(_0x10802b,_0x3c856e))[_0xfe06('0x3c')](handleError(_0x10802b,null));};exports['show']=function(_0x89a221,_0x5ce73b){var _0x3e766e={'raw':!![],'where':{'id':_0x89a221[_0xfe06('0x3d')]['id']}},_0x59fb76={};_0x59fb76['model']=_[_0xfe06('0x3e')](db['ZohoField'][_0xfe06('0x3f')]);_0x59fb76[_0xfe06('0x27')]=_['keys'](_0x89a221[_0xfe06('0x27')]);_0x59fb76[_0xfe06('0x28')]=_[_0xfe06('0x29')](_0x59fb76[_0xfe06('0x2a')],_0x59fb76[_0xfe06('0x27')]);_0x3e766e[_0xfe06('0x2d')]=_[_0xfe06('0x29')](_0x59fb76[_0xfe06('0x2a')],qs[_0xfe06('0x2b')](_0x89a221[_0xfe06('0x27')][_0xfe06('0x2b')]));_0x3e766e[_0xfe06('0x2d')]=_0x3e766e[_0xfe06('0x2d')][_0xfe06('0x2c')]?_0x3e766e[_0xfe06('0x2d')]:_0x59fb76[_0xfe06('0x2a')];if(_0x89a221['query']['includeAll']){_0x3e766e['include']=[{'all':!![]}];}_0x3e766e=_[_0xfe06('0x35')]({},_0x3e766e,_0x89a221['options']);return db['ZohoField']['find'](_0x3e766e)[_0xfe06('0x1f')](handleEntityNotFound(_0x5ce73b,null))[_0xfe06('0x1f')](respondWithResult(_0x5ce73b,null))[_0xfe06('0x3c')](handleError(_0x5ce73b,null));};exports[_0xfe06('0x40')]=function(_0x428c24,_0x3b2746){return db[_0xfe06('0x25')]['create'](_0x428c24[_0xfe06('0x41')],{})[_0xfe06('0x1f')](respondWithResult(_0x3b2746,0xc9))[_0xfe06('0x3c')](handleError(_0x3b2746,null));};exports['update']=function(_0x145f39,_0x4aa37c){if(_0x145f39[_0xfe06('0x41')]['id']){delete _0x145f39[_0xfe06('0x41')]['id'];}return db[_0xfe06('0x25')]['find']({'where':{'id':_0x145f39[_0xfe06('0x3d')]['id']}})[_0xfe06('0x1f')](handleEntityNotFound(_0x4aa37c,null))['then'](saveUpdates(_0x145f39[_0xfe06('0x41')],null))['then'](respondWithResult(_0x4aa37c,null))[_0xfe06('0x3c')](handleError(_0x4aa37c,null));};exports['destroy']=function(_0x3438e3,_0x453dba){return db[_0xfe06('0x25')]['find']({'where':{'id':_0x3438e3[_0xfe06('0x3d')]['id']}})[_0xfe06('0x1f')](handleEntityNotFound(_0x453dba,null))['then'](removeEntity(_0x453dba,null))[_0xfe06('0x3c')](handleError(_0x453dba,null));};
\ No newline at end of file
+var _0xb0a0=['sendStatus','error','stack','name','send','index','map','ZohoField','rawAttributes','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','sox','to-csv','ejs','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','status','json','count','offset','limit','Content-Range','update','then','end'];(function(_0x245fb2,_0x478484){var _0x27c690=function(_0x1cc29e){while(--_0x1cc29e){_0x245fb2['push'](_0x245fb2['shift']());}};_0x27c690(++_0x478484);}(_0xb0a0,0x1bf));var _0x0b0a=function(_0x936f18,_0x110725){_0x936f18=_0x936f18-0x0;var _0x36b3b7=_0xb0a0[_0x936f18];return _0x36b3b7;};'use strict';var pdf=require(_0x0b0a('0x0'));var emlformat=require(_0x0b0a('0x1'));var rimraf=require(_0x0b0a('0x2'));var zipdir=require(_0x0b0a('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0b0a('0x4'));var moment=require(_0x0b0a('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0b0a('0x6'));var util=require(_0x0b0a('0x7'));var path=require('path');var sox=require(_0x0b0a('0x8'));var csv=require(_0x0b0a('0x9'));var ejs=require(_0x0b0a('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x0b0a('0xb'));var crypto=require(_0x0b0a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x0b0a('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0b0a('0xe'));var Redis=require(_0x0b0a('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x0b0a('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x0b0a('0x11'));var utils=require(_0x0b0a('0x12'));var config=require(_0x0b0a('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3c0620,_0x4e19f4){_0x4e19f4=_0x4e19f4||0xcc;return function(_0x5e9cfb){if(_0x5e9cfb){return _0x3c0620['sendStatus'](_0x4e19f4);}return _0x3c0620[_0x0b0a('0x14')](_0x4e19f4)['end']();};}function respondWithResult(_0x295b45,_0x3b165f){_0x3b165f=_0x3b165f||0xc8;return function(_0x3df470){if(_0x3df470){return _0x295b45[_0x0b0a('0x14')](_0x3b165f)[_0x0b0a('0x15')](_0x3df470);}};}function respondWithFilteredResult(_0x51c15a,_0x4de88a){return function(_0x554e98){if(_0x554e98){var _0xd55977=_0x554e98[_0x0b0a('0x16')],_0x1645bd=_0x4de88a[_0x0b0a('0x17')],_0x4321fd=_0x4de88a[_0x0b0a('0x17')]+_0x4de88a[_0x0b0a('0x18')],_0x51be84;if(_0x4321fd>=_0xd55977){_0x4321fd=_0xd55977;_0x51be84=0xc8;}else{_0x51be84=0xce;}_0x51c15a[_0x0b0a('0x14')](_0x51be84);return _0x51c15a['set'](_0x0b0a('0x19'),_0x1645bd+'-'+_0x4321fd+'/'+_0xd55977)[_0x0b0a('0x15')](_0x554e98);}return null;};}function patchUpdates(_0x1089ff){return function(_0xa82192){try{jsonpatch['apply'](_0xa82192,_0x1089ff,!![]);}catch(_0x5be870){return BPromise['reject'](_0x5be870);}return _0xa82192['save']();};}function saveUpdates(_0x29837d,_0x14d7ee){return function(_0x1bd444){if(_0x1bd444){return _0x1bd444[_0x0b0a('0x1a')](_0x29837d)[_0x0b0a('0x1b')](function(_0xaabdb5){return _0xaabdb5;});}return null;};}function removeEntity(_0x37e965,_0x3d0483){return function(_0x451969){if(_0x451969){return _0x451969['destroy']()[_0x0b0a('0x1b')](function(){_0x37e965[_0x0b0a('0x14')](0xcc)[_0x0b0a('0x1c')]();});}};}function handleEntityNotFound(_0x24f3df,_0x130d69){return function(_0x425d6b){if(!_0x425d6b){_0x24f3df[_0x0b0a('0x1d')](0x194);}return _0x425d6b;};}function handleError(_0x45eb3d,_0x25c657){_0x25c657=_0x25c657||0x1f4;return function(_0x48f5a3){logger[_0x0b0a('0x1e')](_0x48f5a3[_0x0b0a('0x1f')]);if(_0x48f5a3[_0x0b0a('0x20')]){delete _0x48f5a3[_0x0b0a('0x20')];}_0x45eb3d[_0x0b0a('0x14')](_0x25c657)[_0x0b0a('0x21')](_0x48f5a3);};}exports[_0x0b0a('0x22')]=function(_0xe79ab2,_0x18c5f7){var _0x3845f9={},_0x25af08={},_0x5a1cf3={'count':0x0,'rows':[]};var _0x49de97=_[_0x0b0a('0x23')](db[_0x0b0a('0x24')][_0x0b0a('0x25')],function(_0x9b344){return{'name':_0x9b344['fieldName'],'type':_0x9b344[_0x0b0a('0x26')][_0x0b0a('0x27')]};});_0x25af08[_0x0b0a('0x28')]=_[_0x0b0a('0x23')](_0x49de97,_0x0b0a('0x20'));_0x25af08[_0x0b0a('0x29')]=_[_0x0b0a('0x2a')](_0xe79ab2[_0x0b0a('0x29')]);_0x25af08[_0x0b0a('0x2b')]=_['intersection'](_0x25af08[_0x0b0a('0x28')],_0x25af08['query']);_0x3845f9[_0x0b0a('0x2c')]=_[_0x0b0a('0x2d')](_0x25af08[_0x0b0a('0x28')],qs['fields'](_0xe79ab2[_0x0b0a('0x29')][_0x0b0a('0x2e')]));_0x3845f9[_0x0b0a('0x2c')]=_0x3845f9[_0x0b0a('0x2c')][_0x0b0a('0x2f')]?_0x3845f9[_0x0b0a('0x2c')]:_0x25af08[_0x0b0a('0x28')];if(!_0xe79ab2[_0x0b0a('0x29')][_0x0b0a('0x30')](_0x0b0a('0x31'))){_0x3845f9[_0x0b0a('0x18')]=qs[_0x0b0a('0x18')](_0xe79ab2['query'][_0x0b0a('0x18')]);_0x3845f9[_0x0b0a('0x17')]=qs[_0x0b0a('0x17')](_0xe79ab2[_0x0b0a('0x29')][_0x0b0a('0x17')]);}_0x3845f9[_0x0b0a('0x32')]=qs[_0x0b0a('0x33')](_0xe79ab2[_0x0b0a('0x29')][_0x0b0a('0x33')]);_0x3845f9['where']=qs['filters'](_['pick'](_0xe79ab2[_0x0b0a('0x29')],_0x25af08[_0x0b0a('0x2b')]));if(_0xe79ab2[_0x0b0a('0x29')][_0x0b0a('0x34')]){_0x3845f9[_0x0b0a('0x35')]=_[_0x0b0a('0x36')](_0x3845f9[_0x0b0a('0x35')],{'$or':_[_0x0b0a('0x23')](_0x49de97,function(_0x342395){if(_0x342395[_0x0b0a('0x26')]!==_0x0b0a('0x37')){var _0x4330ed={};_0x4330ed[_0x342395[_0x0b0a('0x20')]]={'$like':'%'+_0xe79ab2[_0x0b0a('0x29')][_0x0b0a('0x34')]+'%'};return _0x4330ed;}})});}_0x3845f9=_[_0x0b0a('0x36')]({},_0x3845f9,_0xe79ab2[_0x0b0a('0x38')]);var _0x5cfb68={'where':_0x3845f9[_0x0b0a('0x35')]};return db[_0x0b0a('0x24')]['count'](_0x5cfb68)[_0x0b0a('0x1b')](function(_0x5ad751){_0x5a1cf3[_0x0b0a('0x16')]=_0x5ad751;if(_0xe79ab2['query'][_0x0b0a('0x39')]){_0x3845f9[_0x0b0a('0x3a')]=[{'all':!![]}];}return db[_0x0b0a('0x24')][_0x0b0a('0x3b')](_0x3845f9);})[_0x0b0a('0x1b')](function(_0x460cb4){_0x5a1cf3[_0x0b0a('0x3c')]=_0x460cb4;return _0x5a1cf3;})[_0x0b0a('0x1b')](respondWithFilteredResult(_0x18c5f7,_0x3845f9))[_0x0b0a('0x3d')](handleError(_0x18c5f7,null));};exports[_0x0b0a('0x3e')]=function(_0x1f2c57,_0x2c76b8){var _0x4f4f34={'raw':!![],'where':{'id':_0x1f2c57[_0x0b0a('0x3f')]['id']}},_0x3291f2={};_0x3291f2['model']=_['keys'](db['ZohoField'][_0x0b0a('0x25')]);_0x3291f2[_0x0b0a('0x29')]=_['keys'](_0x1f2c57[_0x0b0a('0x29')]);_0x3291f2['filters']=_[_0x0b0a('0x2d')](_0x3291f2[_0x0b0a('0x28')],_0x3291f2[_0x0b0a('0x29')]);_0x4f4f34[_0x0b0a('0x2c')]=_[_0x0b0a('0x2d')](_0x3291f2[_0x0b0a('0x28')],qs['fields'](_0x1f2c57['query'][_0x0b0a('0x2e')]));_0x4f4f34[_0x0b0a('0x2c')]=_0x4f4f34['attributes'][_0x0b0a('0x2f')]?_0x4f4f34[_0x0b0a('0x2c')]:_0x3291f2[_0x0b0a('0x28')];if(_0x1f2c57['query']['includeAll']){_0x4f4f34[_0x0b0a('0x3a')]=[{'all':!![]}];}_0x4f4f34=_['merge']({},_0x4f4f34,_0x1f2c57['options']);return db['ZohoField'][_0x0b0a('0x40')](_0x4f4f34)[_0x0b0a('0x1b')](handleEntityNotFound(_0x2c76b8,null))['then'](respondWithResult(_0x2c76b8,null))[_0x0b0a('0x3d')](handleError(_0x2c76b8,null));};exports[_0x0b0a('0x41')]=function(_0x257b08,_0x371240){return db[_0x0b0a('0x24')][_0x0b0a('0x41')](_0x257b08[_0x0b0a('0x42')],{})[_0x0b0a('0x1b')](respondWithResult(_0x371240,0xc9))['catch'](handleError(_0x371240,null));};exports[_0x0b0a('0x1a')]=function(_0x2bdb7a,_0x3dd558){if(_0x2bdb7a[_0x0b0a('0x42')]['id']){delete _0x2bdb7a['body']['id'];}return db[_0x0b0a('0x24')]['find']({'where':{'id':_0x2bdb7a[_0x0b0a('0x3f')]['id']}})['then'](handleEntityNotFound(_0x3dd558,null))[_0x0b0a('0x1b')](saveUpdates(_0x2bdb7a[_0x0b0a('0x42')],null))[_0x0b0a('0x1b')](respondWithResult(_0x3dd558,null))[_0x0b0a('0x3d')](handleError(_0x3dd558,null));};exports[_0x0b0a('0x43')]=function(_0x332bae,_0x2fda8e){return db[_0x0b0a('0x24')][_0x0b0a('0x40')]({'where':{'id':_0x332bae[_0x0b0a('0x3f')]['id']}})['then'](handleEntityNotFound(_0x2fda8e,null))[_0x0b0a('0x1b')](removeEntity(_0x2fda8e,null))['catch'](handleError(_0x2fda8e,null));};
\ No newline at end of file
diff --git a/server/api/intZohoField/intZohoField.model.js b/server/api/intZohoField/intZohoField.model.js
index d78f921..675d7df 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 _0x01aa=['define','ZohoField','int_zoho_fields','zoho_unique_index','FieldId','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','./intZohoField.attributes','exports'];(function(_0x5b789c,_0x192779){var _0x5b947b=function(_0x449051){while(--_0x449051){_0x5b789c['push'](_0x5b789c['shift']());}};_0x5b947b(++_0x192779);}(_0x01aa,0x1e5));var _0xa01a=function(_0x3995ad,_0x16c2a1){_0x3995ad=_0x3995ad-0x0;var _0x1d4ee6=_0x01aa[_0x3995ad];return _0x1d4ee6;};'use strict';var _=require(_0xa01a('0x0'));var util=require(_0xa01a('0x1'));var logger=require(_0xa01a('0x2'))(_0xa01a('0x3'));var moment=require(_0xa01a('0x4'));var BPromise=require(_0xa01a('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa01a('0x6'));var rimraf=require(_0xa01a('0x7'));var config=require('../../config/environment');var attributes=require(_0xa01a('0x8'));module[_0xa01a('0x9')]=function(_0xff4376,_0x3c5ad2){return _0xff4376[_0xa01a('0xa')](_0xa01a('0xb'),attributes,{'tableName':_0xa01a('0xc'),'paranoid':![],'indexes':[{'name':_0xa01a('0xd'),'fields':['idField',_0xa01a('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x27a8=['zoho_unique_index','FieldId','../../config/logger','api','request-promise','path','./intZohoField.attributes','define','ZohoField','int_zoho_fields'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x27a8,0x156));var _0x827a=function(_0x4c9a67,_0x45183e){_0x4c9a67=_0x4c9a67-0x0;var _0x549e9c=_0x27a8[_0x4c9a67];return _0x549e9c;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x827a('0x0'))(_0x827a('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x827a('0x2'));var fs=require('fs');var path=require(_0x827a('0x3'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x827a('0x4'));module['exports']=function(_0x293744,_0x323b05){return _0x293744[_0x827a('0x5')](_0x827a('0x6'),attributes,{'tableName':_0x827a('0x7'),'paranoid':![],'indexes':[{'name':_0x827a('0x8'),'fields':['idField',_0x827a('0x9')],'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 216f9b3..e380ad1 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 _0xed1f=['request','then','info','ZohoField,\x20%s,\x20%s','debug','request\x20sent','stringify','code','error','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x1302a5,_0x2ae13f){var _0xae9cc9=function(_0x37e676){while(--_0x37e676){_0x1302a5['push'](_0x1302a5['shift']());}};_0xae9cc9(++_0x2ae13f);}(_0xed1f,0x6a));var _0xfed1=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0xed1f[_0x1cc8fe];return _0x230054;};'use strict';var _=require(_0xfed1('0x0'));var util=require(_0xfed1('0x1'));var moment=require(_0xfed1('0x2'));var BPromise=require(_0xfed1('0x3'));var rs=require(_0xfed1('0x4'));var fs=require('fs');var Redis=require(_0xfed1('0x5'));var db=require(_0xfed1('0x6'))['db'];var utils=require(_0xfed1('0x7'));var logger=require(_0xfed1('0x8'))(_0xfed1('0x9'));var config=require(_0xfed1('0xa'));var jayson=require(_0xfed1('0xb'));var client=jayson[_0xfed1('0xc')][_0xfed1('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x380e18,_0x612b38,_0x2a6082){return new BPromise(function(_0x2967ef,_0x568d48){return client[_0xfed1('0xe')](_0x380e18,_0x2a6082)[_0xfed1('0xf')](function(_0x48862d){logger[_0xfed1('0x10')](_0xfed1('0x11'),_0x612b38,'request\x20sent');logger[_0xfed1('0x12')]('ZohoField,\x20%s,\x20%s,\x20%s',_0x612b38,_0xfed1('0x13'),JSON[_0xfed1('0x14')](_0x48862d));if(_0x48862d['error']){if(_0x48862d['error'][_0xfed1('0x15')]===0x1f4){logger[_0xfed1('0x16')]('ZohoField,\x20%s,\x20%s',_0x612b38,_0x48862d[_0xfed1('0x16')]['message']);return _0x568d48(_0x48862d['error'][_0xfed1('0x17')]);}logger[_0xfed1('0x16')]('ZohoField,\x20%s,\x20%s',_0x612b38,_0x48862d[_0xfed1('0x16')]['message']);return _0x2967ef(_0x48862d['error'][_0xfed1('0x17')]);}else{logger[_0xfed1('0x10')](_0xfed1('0x11'),_0x612b38,_0xfed1('0x13'));_0x2967ef(_0x48862d['result'][_0xfed1('0x17')]);}})['catch'](function(_0x36ff34){logger[_0xfed1('0x16')]('ZohoField,\x20%s,\x20%s',_0x612b38,_0x36ff34);_0x568d48(_0x36ff34);});});}
\ No newline at end of file
+var _0x2d17=['ZohoField,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','http','then','info','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x51b8e7,_0x5c70fb){var _0x81fd25=function(_0x20c527){while(--_0x20c527){_0x51b8e7['push'](_0x51b8e7['shift']());}};_0x81fd25(++_0x5c70fb);}(_0x2d17,0x17e));var _0x72d1=function(_0x4f5bad,_0x29fd06){_0x4f5bad=_0x4f5bad-0x0;var _0xedcbfc=_0x2d17[_0x4f5bad];return _0xedcbfc;};'use strict';var _=require(_0x72d1('0x0'));var util=require(_0x72d1('0x1'));var moment=require('moment');var BPromise=require(_0x72d1('0x2'));var rs=require(_0x72d1('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x72d1('0x4'))['db'];var utils=require(_0x72d1('0x5'));var logger=require('../../config/logger')(_0x72d1('0x6'));var config=require('../../config/environment');var jayson=require(_0x72d1('0x7'));var client=jayson['client'][_0x72d1('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x239d1f,_0x5b40a9,_0x477264){return new BPromise(function(_0x422f5a,_0x19e248){return client['request'](_0x239d1f,_0x477264)[_0x72d1('0x9')](function(_0x288362){logger[_0x72d1('0xa')]('ZohoField,\x20%s,\x20%s',_0x5b40a9,_0x72d1('0xb'));logger[_0x72d1('0xc')](_0x72d1('0xd'),_0x5b40a9,_0x72d1('0xb'),JSON[_0x72d1('0xe')](_0x288362));if(_0x288362[_0x72d1('0xf')]){if(_0x288362[_0x72d1('0xf')][_0x72d1('0x10')]===0x1f4){logger[_0x72d1('0xf')](_0x72d1('0x11'),_0x5b40a9,_0x288362['error'][_0x72d1('0x12')]);return _0x19e248(_0x288362[_0x72d1('0xf')][_0x72d1('0x12')]);}logger[_0x72d1('0xf')](_0x72d1('0x11'),_0x5b40a9,_0x288362[_0x72d1('0xf')][_0x72d1('0x12')]);return _0x422f5a(_0x288362[_0x72d1('0xf')][_0x72d1('0x12')]);}else{logger[_0x72d1('0xa')](_0x72d1('0x11'),_0x5b40a9,_0x72d1('0xb'));_0x422f5a(_0x288362[_0x72d1('0x13')]['message']);}})[_0x72d1('0x14')](function(_0x5262b0){logger[_0x72d1('0xf')](_0x72d1('0x11'),_0x5b40a9,_0x5262b0);_0x19e248(_0x5262b0);});});}
\ No newline at end of file
diff --git a/server/api/integration/index.js b/server/api/integration/index.js
index c3312e1..f4e4d88 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 _0xad27=['../../components/auth/service','../../config/environment','exports','multer','path','connect-timeout','express','Router'];(function(_0x375325,_0x57a850){var _0x228f57=function(_0x2ad744){while(--_0x2ad744){_0x375325['push'](_0x375325['shift']());}};_0x228f57(++_0x57a850);}(_0xad27,0x123));var _0x7ad2=function(_0xe514e8,_0x452d9a){_0xe514e8=_0xe514e8-0x0;var _0x5750e3=_0xad27[_0xe514e8];return _0x5750e3;};'use strict';var multer=require(_0x7ad2('0x0'));var util=require('util');var path=require(_0x7ad2('0x1'));var timeout=require(_0x7ad2('0x2'));var express=require(_0x7ad2('0x3'));var router=express[_0x7ad2('0x4')]();var auth=require(_0x7ad2('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x7ad2('0x6'));module[_0x7ad2('0x7')]=router;
\ No newline at end of file
+var _0xda10=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x5d456c,_0x5a07fa){var _0x591c7c=function(_0x114c26){while(--_0x114c26){_0x5d456c['push'](_0x5d456c['shift']());}};_0x591c7c(++_0x5a07fa);}(_0xda10,0x1a5));var _0x0da1=function(_0x5ac067,_0x39a945){_0x5ac067=_0x5ac067-0x0;var _0x167db1=_0xda10[_0x5ac067];return _0x167db1;};'use strict';var multer=require(_0x0da1('0x0'));var util=require(_0x0da1('0x1'));var path=require(_0x0da1('0x2'));var timeout=require(_0x0da1('0x3'));var express=require(_0x0da1('0x4'));var router=express[_0x0da1('0x5')]();var auth=require(_0x0da1('0x6'));var interaction=require(_0x0da1('0x7'));var config=require(_0x0da1('0x8'));module[_0x0da1('0x9')]=router;
\ No newline at end of file
diff --git a/server/api/integration/integration.attributes.js b/server/api/integration/integration.attributes.js
index 99e3d6d..ab620a4 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 _0x1c3a=['STRING','unique_name_and_version','app.js','BOOLEAN','state','exports'];(function(_0x320e39,_0x14eee3){var _0xfb5274=function(_0x294b76){while(--_0x294b76){_0x320e39['push'](_0x320e39['shift']());}};_0xfb5274(++_0x14eee3);}(_0x1c3a,0x1a9));var _0xa1c3=function(_0x39f34f,_0x298f45){_0x39f34f=_0x39f34f-0x0;var _0x59fee1=_0x1c3a[_0x39f34f];return _0x59fee1;};'use strict';var Sequelize=require('sequelize');module[_0xa1c3('0x0')]={'name':{'type':Sequelize[_0xa1c3('0x1')],'allowNull':![],'unique':_0xa1c3('0x2')},'version':{'type':Sequelize[_0xa1c3('0x1')],'allowNull':![],'unique':_0xa1c3('0x2')},'main':{'type':Sequelize[_0xa1c3('0x1')],'defaultValue':_0xa1c3('0x3')},'filename':{'type':Sequelize[_0xa1c3('0x1')]},'path':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xa1c3('0x1')]},'size':{'type':Sequelize['INTEGER']},'active':{'type':Sequelize[_0xa1c3('0x4')],'defaultValue':![]},'author':{'type':Sequelize['STRING']},'logo':{'type':Sequelize[_0xa1c3('0x1')]},'state':{'type':Sequelize[_0xa1c3('0x1')],'unique':_0xa1c3('0x5')},'description':{'type':Sequelize[_0xa1c3('0x1')]},'title':{'type':Sequelize[_0xa1c3('0x1')]},'remoteUri':{'type':Sequelize[_0xa1c3('0x1')]},'link':{'type':Sequelize['STRING'],'defaultValue':'#'}};
\ No newline at end of file
+var _0xb8b1=['state','sequelize','STRING','unique_name_and_version'];(function(_0x1d0199,_0x133fb1){var _0x16537d=function(_0x46e243){while(--_0x46e243){_0x1d0199['push'](_0x1d0199['shift']());}};_0x16537d(++_0x133fb1);}(_0xb8b1,0x1b1));var _0x1b8b=function(_0x3c4e48,_0x43a5eb){_0x3c4e48=_0x3c4e48-0x0;var _0x37fd7e=_0xb8b1[_0x3c4e48];return _0x37fd7e;};'use strict';var Sequelize=require(_0x1b8b('0x0'));module['exports']={'name':{'type':Sequelize[_0x1b8b('0x1')],'allowNull':![],'unique':'unique_name_and_version'},'version':{'type':Sequelize[_0x1b8b('0x1')],'allowNull':![],'unique':_0x1b8b('0x2')},'main':{'type':Sequelize[_0x1b8b('0x1')],'defaultValue':'app.js'},'filename':{'type':Sequelize[_0x1b8b('0x1')]},'path':{'type':Sequelize[_0x1b8b('0x1')]},'type':{'type':Sequelize[_0x1b8b('0x1')]},'size':{'type':Sequelize['INTEGER']},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'author':{'type':Sequelize[_0x1b8b('0x1')]},'logo':{'type':Sequelize['STRING']},'state':{'type':Sequelize[_0x1b8b('0x1')],'unique':_0x1b8b('0x3')},'description':{'type':Sequelize['STRING']},'title':{'type':Sequelize[_0x1b8b('0x1')]},'remoteUri':{'type':Sequelize['STRING']},'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 2a9d4d8..886c234 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 _0x9549=['name','send','index','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','VIRTUAL','Integration','count','include','findAll','catch','show','options','create','body','update','find','params','html-pdf','eml-format','rimraf','zip-dir','request-promise','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','then','destroy','stack'];(function(_0x5a5bf6,_0x5b093a){var _0x333a3e=function(_0x4bbb8f){while(--_0x4bbb8f){_0x5a5bf6['push'](_0x5a5bf6['shift']());}};_0x333a3e(++_0x5b093a);}(_0x9549,0x6a));var _0x9954=function(_0x2bfd54,_0x50ab56){_0x2bfd54=_0x2bfd54-0x0;var _0x711287=_0x9549[_0x2bfd54];return _0x711287;};'use strict';var pdf=require(_0x9954('0x0'));var emlformat=require(_0x9954('0x1'));var rimraf=require(_0x9954('0x2'));var zipdir=require(_0x9954('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9954('0x4'));var moment=require('moment');var BPromise=require(_0x9954('0x5'));var Mustache=require('mustache');var util=require(_0x9954('0x6'));var path=require(_0x9954('0x7'));var sox=require(_0x9954('0x8'));var csv=require(_0x9954('0x9'));var ejs=require(_0x9954('0xa'));var fs=require('fs');var _=require(_0x9954('0xb'));var squel=require('squel');var crypto=require(_0x9954('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x9954('0xd'));var toCsv=require('to-csv');var querystring=require(_0x9954('0xe'));var Papa=require(_0x9954('0xf'));var Redis=require('ioredis');var authService=require(_0x9954('0x10'));var qs=require(_0x9954('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9954('0x12'));var logger=require('../../config/logger')(_0x9954('0x13'));var utils=require('../../config/utils');var config=require(_0x9954('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x47ddc0,_0x4693fe){_0x4693fe=_0x4693fe||0xcc;return function(_0x2caba0){if(_0x2caba0){return _0x47ddc0[_0x9954('0x15')](_0x4693fe);}return _0x47ddc0[_0x9954('0x16')](_0x4693fe)[_0x9954('0x17')]();};}function respondWithResult(_0x41493e,_0x43e99e){_0x43e99e=_0x43e99e||0xc8;return function(_0x15caf6){if(_0x15caf6){return _0x41493e['status'](_0x43e99e)[_0x9954('0x18')](_0x15caf6);}};}function respondWithFilteredResult(_0x2004e7,_0x2765f6){return function(_0x5c86f4){if(_0x5c86f4){var _0x2b5cb=_0x5c86f4['count'],_0x48c2b1=_0x2765f6[_0x9954('0x19')],_0x2a5248=_0x2765f6[_0x9954('0x19')]+_0x2765f6[_0x9954('0x1a')],_0x4c73a6;if(_0x2a5248>=_0x2b5cb){_0x2a5248=_0x2b5cb;_0x4c73a6=0xc8;}else{_0x4c73a6=0xce;}_0x2004e7['status'](_0x4c73a6);return _0x2004e7[_0x9954('0x1b')](_0x9954('0x1c'),_0x48c2b1+'-'+_0x2a5248+'/'+_0x2b5cb)[_0x9954('0x18')](_0x5c86f4);}return null;};}function patchUpdates(_0x25dcc0){return function(_0x15a536){try{jsonpatch[_0x9954('0x1d')](_0x15a536,_0x25dcc0,!![]);}catch(_0x3618c8){return BPromise[_0x9954('0x1e')](_0x3618c8);}return _0x15a536['save']();};}function saveUpdates(_0x4f88fe,_0x4350e9){return function(_0x3a6b56){if(_0x3a6b56){return _0x3a6b56['update'](_0x4f88fe)[_0x9954('0x1f')](function(_0x16a7fb){return _0x16a7fb;});}return null;};}function removeEntity(_0x50952f,_0x5428b2){return function(_0x274fc6){if(_0x274fc6){return _0x274fc6[_0x9954('0x20')]()[_0x9954('0x1f')](function(){_0x50952f[_0x9954('0x16')](0xcc)[_0x9954('0x17')]();});}};}function handleEntityNotFound(_0x52ead0,_0x4cb900){return function(_0xf8bf17){if(!_0xf8bf17){_0x52ead0[_0x9954('0x15')](0x194);}return _0xf8bf17;};}function handleError(_0x5746e1,_0x515f2e){_0x515f2e=_0x515f2e||0x1f4;return function(_0x429e45){logger['error'](_0x429e45[_0x9954('0x21')]);if(_0x429e45[_0x9954('0x22')]){delete _0x429e45['name'];}_0x5746e1['status'](_0x515f2e)[_0x9954('0x23')](_0x429e45);};}exports[_0x9954('0x24')]=function(_0x59aaa9,_0x187e25){var _0x198d17={},_0x4ea3d7={},_0x346c57={'count':0x0,'rows':[]};var _0x48c03b=_['map'](db['Integration'][_0x9954('0x25')],function(_0x7288f1){return{'name':_0x7288f1[_0x9954('0x26')],'type':_0x7288f1[_0x9954('0x27')][_0x9954('0x28')]};});_0x4ea3d7[_0x9954('0x29')]=_[_0x9954('0x2a')](_0x48c03b,'name');_0x4ea3d7[_0x9954('0x2b')]=_[_0x9954('0x2c')](_0x59aaa9[_0x9954('0x2b')]);_0x4ea3d7[_0x9954('0x2d')]=_[_0x9954('0x2e')](_0x4ea3d7['model'],_0x4ea3d7[_0x9954('0x2b')]);_0x198d17[_0x9954('0x2f')]=_[_0x9954('0x2e')](_0x4ea3d7[_0x9954('0x29')],qs[_0x9954('0x30')](_0x59aaa9[_0x9954('0x2b')]['fields']));_0x198d17[_0x9954('0x2f')]=_0x198d17[_0x9954('0x2f')][_0x9954('0x31')]?_0x198d17[_0x9954('0x2f')]:_0x4ea3d7[_0x9954('0x29')];if(!_0x59aaa9[_0x9954('0x2b')][_0x9954('0x32')](_0x9954('0x33'))){_0x198d17[_0x9954('0x1a')]=qs[_0x9954('0x1a')](_0x59aaa9[_0x9954('0x2b')]['limit']);_0x198d17['offset']=qs['offset'](_0x59aaa9[_0x9954('0x2b')][_0x9954('0x19')]);}_0x198d17['order']=qs[_0x9954('0x34')](_0x59aaa9[_0x9954('0x2b')][_0x9954('0x34')]);_0x198d17['where']=qs['filters'](_[_0x9954('0x35')](_0x59aaa9[_0x9954('0x2b')],_0x4ea3d7[_0x9954('0x2d')]));if(_0x59aaa9['query'][_0x9954('0x36')]){_0x198d17[_0x9954('0x37')]=_[_0x9954('0x38')](_0x198d17['where'],{'$or':_['map'](_0x48c03b,function(_0x12965e){if(_0x12965e[_0x9954('0x27')]!==_0x9954('0x39')){var _0xe06963={};_0xe06963[_0x12965e[_0x9954('0x22')]]={'$like':'%'+_0x59aaa9[_0x9954('0x2b')][_0x9954('0x36')]+'%'};return _0xe06963;}})});}_0x198d17=_[_0x9954('0x38')]({},_0x198d17,_0x59aaa9['options']);var _0x5c55c3={'where':_0x198d17[_0x9954('0x37')]};return db[_0x9954('0x3a')][_0x9954('0x3b')](_0x5c55c3)[_0x9954('0x1f')](function(_0x5719f6){_0x346c57[_0x9954('0x3b')]=_0x5719f6;if(_0x59aaa9[_0x9954('0x2b')]['includeAll']){_0x198d17[_0x9954('0x3c')]=[{'all':!![]}];}return db[_0x9954('0x3a')][_0x9954('0x3d')](_0x198d17);})[_0x9954('0x1f')](function(_0x112681){_0x346c57['rows']=_0x112681;return _0x346c57;})['then'](respondWithFilteredResult(_0x187e25,_0x198d17))[_0x9954('0x3e')](handleError(_0x187e25,null));};exports[_0x9954('0x3f')]=function(_0x1c0665,_0x2ed8fd){var _0x1240dc={'raw':![],'where':{'id':_0x1c0665['params']['id']}},_0x20fabc={};_0x20fabc[_0x9954('0x29')]=_[_0x9954('0x2c')](db[_0x9954('0x3a')][_0x9954('0x25')]);_0x20fabc[_0x9954('0x2b')]=_[_0x9954('0x2c')](_0x1c0665[_0x9954('0x2b')]);_0x20fabc[_0x9954('0x2d')]=_['intersection'](_0x20fabc[_0x9954('0x29')],_0x20fabc[_0x9954('0x2b')]);_0x1240dc['attributes']=_['intersection'](_0x20fabc[_0x9954('0x29')],qs[_0x9954('0x30')](_0x1c0665['query'][_0x9954('0x30')]));_0x1240dc[_0x9954('0x2f')]=_0x1240dc[_0x9954('0x2f')][_0x9954('0x31')]?_0x1240dc['attributes']:_0x20fabc[_0x9954('0x29')];if(_0x1c0665[_0x9954('0x2b')]['includeAll']){_0x1240dc[_0x9954('0x3c')]=[{'all':!![]}];}_0x1240dc=_['merge']({},_0x1240dc,_0x1c0665[_0x9954('0x40')]);return db[_0x9954('0x3a')]['find'](_0x1240dc)[_0x9954('0x1f')](handleEntityNotFound(_0x2ed8fd,null))[_0x9954('0x1f')](respondWithResult(_0x2ed8fd,null))[_0x9954('0x3e')](handleError(_0x2ed8fd,null));};exports[_0x9954('0x41')]=function(_0x4b2028,_0x4e39c2){return db[_0x9954('0x3a')]['create'](_0x4b2028[_0x9954('0x42')],{})[_0x9954('0x1f')](respondWithResult(_0x4e39c2,0xc9))[_0x9954('0x3e')](handleError(_0x4e39c2,null));};exports[_0x9954('0x43')]=function(_0x3c42ff,_0xd12714){if(_0x3c42ff['body']['id']){delete _0x3c42ff[_0x9954('0x42')]['id'];}return db[_0x9954('0x3a')][_0x9954('0x44')]({'where':{'id':_0x3c42ff[_0x9954('0x45')]['id']}})[_0x9954('0x1f')](handleEntityNotFound(_0xd12714,null))['then'](saveUpdates(_0x3c42ff[_0x9954('0x42')],null))[_0x9954('0x1f')](respondWithResult(_0xd12714,null))[_0x9954('0x3e')](handleError(_0xd12714,null));};exports[_0x9954('0x20')]=function(_0x56c537,_0x584110){return db[_0x9954('0x3a')][_0x9954('0x44')]({'where':{'id':_0x56c537[_0x9954('0x45')]['id']}})[_0x9954('0x1f')](handleEntityNotFound(_0x584110,null))['then'](removeEntity(_0x584110,null))['catch'](handleError(_0x584110,null));};
\ No newline at end of file
+var _0xf408=['apply','reject','destroy','error','stack','name','send','index','map','Integration','rawAttributes','type','key','query','filters','model','intersection','fields','attributes','length','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','then','includeAll','include','findAll','rows','show','params','keys','find','catch','create','body','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','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','count','offset','limit','status','Content-Range','json'];(function(_0x52c942,_0x328ff8){var _0x269b14=function(_0xfe7e76){while(--_0xfe7e76){_0x52c942['push'](_0x52c942['shift']());}};_0x269b14(++_0x328ff8);}(_0xf408,0x1f0));var _0x8f40=function(_0x302b72,_0x483f35){_0x302b72=_0x302b72-0x0;var _0x48aa64=_0xf408[_0x302b72];return _0x48aa64;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x8f40('0x0'));var rimraf=require(_0x8f40('0x1'));var zipdir=require(_0x8f40('0x2'));var jsonpatch=require(_0x8f40('0x3'));var rp=require(_0x8f40('0x4'));var moment=require(_0x8f40('0x5'));var BPromise=require(_0x8f40('0x6'));var Mustache=require(_0x8f40('0x7'));var util=require(_0x8f40('0x8'));var path=require(_0x8f40('0x9'));var sox=require(_0x8f40('0xa'));var csv=require(_0x8f40('0xb'));var ejs=require(_0x8f40('0xc'));var fs=require('fs');var _=require(_0x8f40('0xd'));var squel=require(_0x8f40('0xe'));var crypto=require(_0x8f40('0xf'));var jsforce=require(_0x8f40('0x10'));var deskjs=require(_0x8f40('0x11'));var toCsv=require('to-csv');var querystring=require(_0x8f40('0x12'));var Papa=require('papaparse');var Redis=require(_0x8f40('0x13'));var authService=require(_0x8f40('0x14'));var qs=require(_0x8f40('0x15'));var as=require(_0x8f40('0x16'));var hardwareService=require(_0x8f40('0x17'));var logger=require(_0x8f40('0x18'))('api');var utils=require(_0x8f40('0x19'));var config=require(_0x8f40('0x1a'));var db=require(_0x8f40('0x1b'))['db'];function respondWithStatusCode(_0x42a7f0,_0x24532a){_0x24532a=_0x24532a||0xcc;return function(_0xe17f2e){if(_0xe17f2e){return _0x42a7f0[_0x8f40('0x1c')](_0x24532a);}return _0x42a7f0['status'](_0x24532a)[_0x8f40('0x1d')]();};}function respondWithResult(_0x332618,_0x4855a6){_0x4855a6=_0x4855a6||0xc8;return function(_0x251b83){if(_0x251b83){return _0x332618['status'](_0x4855a6)['json'](_0x251b83);}};}function respondWithFilteredResult(_0x19d7da,_0x8bbac8){return function(_0x5ae5b){if(_0x5ae5b){var _0xee800=_0x5ae5b[_0x8f40('0x1e')],_0x31f633=_0x8bbac8['offset'],_0x2f4f11=_0x8bbac8[_0x8f40('0x1f')]+_0x8bbac8[_0x8f40('0x20')],_0x3bbaf2;if(_0x2f4f11>=_0xee800){_0x2f4f11=_0xee800;_0x3bbaf2=0xc8;}else{_0x3bbaf2=0xce;}_0x19d7da[_0x8f40('0x21')](_0x3bbaf2);return _0x19d7da['set'](_0x8f40('0x22'),_0x31f633+'-'+_0x2f4f11+'/'+_0xee800)[_0x8f40('0x23')](_0x5ae5b);}return null;};}function patchUpdates(_0xd6abf){return function(_0x3a35ce){try{jsonpatch[_0x8f40('0x24')](_0x3a35ce,_0xd6abf,!![]);}catch(_0x408051){return BPromise[_0x8f40('0x25')](_0x408051);}return _0x3a35ce['save']();};}function saveUpdates(_0x26ffb1,_0xcab187){return function(_0xb0d5f3){if(_0xb0d5f3){return _0xb0d5f3['update'](_0x26ffb1)['then'](function(_0x574b4d){return _0x574b4d;});}return null;};}function removeEntity(_0x114fad,_0x26791c){return function(_0x5f145b){if(_0x5f145b){return _0x5f145b[_0x8f40('0x26')]()['then'](function(){_0x114fad[_0x8f40('0x21')](0xcc)[_0x8f40('0x1d')]();});}};}function handleEntityNotFound(_0x163c73,_0x311f38){return function(_0x511fce){if(!_0x511fce){_0x163c73['sendStatus'](0x194);}return _0x511fce;};}function handleError(_0x25544b,_0x1598c0){_0x1598c0=_0x1598c0||0x1f4;return function(_0x16e3e5){logger[_0x8f40('0x27')](_0x16e3e5[_0x8f40('0x28')]);if(_0x16e3e5[_0x8f40('0x29')]){delete _0x16e3e5[_0x8f40('0x29')];}_0x25544b[_0x8f40('0x21')](_0x1598c0)[_0x8f40('0x2a')](_0x16e3e5);};}exports[_0x8f40('0x2b')]=function(_0x3d93be,_0x14e950){var _0xccd2f6={},_0x4fc8df={},_0x4a18a5={'count':0x0,'rows':[]};var _0x6f8860=_[_0x8f40('0x2c')](db[_0x8f40('0x2d')][_0x8f40('0x2e')],function(_0x11c7ba){return{'name':_0x11c7ba['fieldName'],'type':_0x11c7ba[_0x8f40('0x2f')][_0x8f40('0x30')]};});_0x4fc8df['model']=_[_0x8f40('0x2c')](_0x6f8860,_0x8f40('0x29'));_0x4fc8df[_0x8f40('0x31')]=_['keys'](_0x3d93be['query']);_0x4fc8df[_0x8f40('0x32')]=_['intersection'](_0x4fc8df[_0x8f40('0x33')],_0x4fc8df[_0x8f40('0x31')]);_0xccd2f6['attributes']=_[_0x8f40('0x34')](_0x4fc8df['model'],qs[_0x8f40('0x35')](_0x3d93be[_0x8f40('0x31')][_0x8f40('0x35')]));_0xccd2f6['attributes']=_0xccd2f6[_0x8f40('0x36')][_0x8f40('0x37')]?_0xccd2f6[_0x8f40('0x36')]:_0x4fc8df[_0x8f40('0x33')];if(!_0x3d93be[_0x8f40('0x31')]['hasOwnProperty'](_0x8f40('0x38'))){_0xccd2f6[_0x8f40('0x20')]=qs['limit'](_0x3d93be['query'][_0x8f40('0x20')]);_0xccd2f6['offset']=qs[_0x8f40('0x1f')](_0x3d93be[_0x8f40('0x31')]['offset']);}_0xccd2f6['order']=qs[_0x8f40('0x39')](_0x3d93be[_0x8f40('0x31')][_0x8f40('0x39')]);_0xccd2f6[_0x8f40('0x3a')]=qs[_0x8f40('0x32')](_[_0x8f40('0x3b')](_0x3d93be[_0x8f40('0x31')],_0x4fc8df['filters']));if(_0x3d93be[_0x8f40('0x31')][_0x8f40('0x3c')]){_0xccd2f6[_0x8f40('0x3a')]=_[_0x8f40('0x3d')](_0xccd2f6['where'],{'$or':_['map'](_0x6f8860,function(_0x40d219){if(_0x40d219[_0x8f40('0x2f')]!==_0x8f40('0x3e')){var _0x5aae30={};_0x5aae30[_0x40d219[_0x8f40('0x29')]]={'$like':'%'+_0x3d93be[_0x8f40('0x31')][_0x8f40('0x3c')]+'%'};return _0x5aae30;}})});}_0xccd2f6=_[_0x8f40('0x3d')]({},_0xccd2f6,_0x3d93be[_0x8f40('0x3f')]);var _0x268825={'where':_0xccd2f6[_0x8f40('0x3a')]};return db['Integration']['count'](_0x268825)[_0x8f40('0x40')](function(_0x189ea9){_0x4a18a5[_0x8f40('0x1e')]=_0x189ea9;if(_0x3d93be['query'][_0x8f40('0x41')]){_0xccd2f6[_0x8f40('0x42')]=[{'all':!![]}];}return db[_0x8f40('0x2d')][_0x8f40('0x43')](_0xccd2f6);})['then'](function(_0x1fe82c){_0x4a18a5[_0x8f40('0x44')]=_0x1fe82c;return _0x4a18a5;})[_0x8f40('0x40')](respondWithFilteredResult(_0x14e950,_0xccd2f6))['catch'](handleError(_0x14e950,null));};exports[_0x8f40('0x45')]=function(_0x545a5b,_0x19ff5d){var _0x435251={'raw':![],'where':{'id':_0x545a5b[_0x8f40('0x46')]['id']}},_0x101a09={};_0x101a09['model']=_[_0x8f40('0x47')](db['Integration'][_0x8f40('0x2e')]);_0x101a09[_0x8f40('0x31')]=_[_0x8f40('0x47')](_0x545a5b[_0x8f40('0x31')]);_0x101a09[_0x8f40('0x32')]=_['intersection'](_0x101a09[_0x8f40('0x33')],_0x101a09[_0x8f40('0x31')]);_0x435251[_0x8f40('0x36')]=_[_0x8f40('0x34')](_0x101a09[_0x8f40('0x33')],qs[_0x8f40('0x35')](_0x545a5b['query']['fields']));_0x435251[_0x8f40('0x36')]=_0x435251[_0x8f40('0x36')][_0x8f40('0x37')]?_0x435251[_0x8f40('0x36')]:_0x101a09[_0x8f40('0x33')];if(_0x545a5b[_0x8f40('0x31')][_0x8f40('0x41')]){_0x435251[_0x8f40('0x42')]=[{'all':!![]}];}_0x435251=_[_0x8f40('0x3d')]({},_0x435251,_0x545a5b['options']);return db[_0x8f40('0x2d')][_0x8f40('0x48')](_0x435251)['then'](handleEntityNotFound(_0x19ff5d,null))[_0x8f40('0x40')](respondWithResult(_0x19ff5d,null))[_0x8f40('0x49')](handleError(_0x19ff5d,null));};exports[_0x8f40('0x4a')]=function(_0x2ffa64,_0x2515b0){return db[_0x8f40('0x2d')][_0x8f40('0x4a')](_0x2ffa64[_0x8f40('0x4b')],{})['then'](respondWithResult(_0x2515b0,0xc9))[_0x8f40('0x49')](handleError(_0x2515b0,null));};exports['update']=function(_0x1a02c4,_0x1bd2d5){if(_0x1a02c4[_0x8f40('0x4b')]['id']){delete _0x1a02c4[_0x8f40('0x4b')]['id'];}return db['Integration'][_0x8f40('0x48')]({'where':{'id':_0x1a02c4['params']['id']}})['then'](handleEntityNotFound(_0x1bd2d5,null))['then'](saveUpdates(_0x1a02c4[_0x8f40('0x4b')],null))[_0x8f40('0x40')](respondWithResult(_0x1bd2d5,null))['catch'](handleError(_0x1bd2d5,null));};exports['destroy']=function(_0x271448,_0x26bde5){return db['Integration'][_0x8f40('0x48')]({'where':{'id':_0x271448[_0x8f40('0x46')]['id']}})[_0x8f40('0x40')](handleEntityNotFound(_0x26bde5,null))[_0x8f40('0x40')](removeEntity(_0x26bde5,null))[_0x8f40('0x49')](handleError(_0x26bde5,null));};
\ No newline at end of file
diff --git a/server/api/integration/integration.model.js b/server/api/integration/integration.model.js
index 794a85c..4d28ee0 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 _0x9439=['./integration.attributes','integrations','util','../../config/logger','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x18dfea,_0x43d571){var _0x5222e3=function(_0x3484ae){while(--_0x3484ae){_0x18dfea['push'](_0x18dfea['shift']());}};_0x5222e3(++_0x43d571);}(_0x9439,0x1df));var _0x9943=function(_0x37d1d0,_0x554ba3){_0x37d1d0=_0x37d1d0-0x0;var _0x339c2b=_0x9439[_0x37d1d0];return _0x339c2b;};'use strict';var _=require('lodash');var util=require(_0x9943('0x0'));var logger=require(_0x9943('0x1'))('api');var moment=require(_0x9943('0x2'));var BPromise=require('bluebird');var rp=require(_0x9943('0x3'));var fs=require('fs');var path=require(_0x9943('0x4'));var rimraf=require(_0x9943('0x5'));var config=require(_0x9943('0x6'));var attributes=require(_0x9943('0x7'));module['exports']=function(_0x4b8731,_0x3b39ca){return _0x4b8731['define']('Integration',attributes,{'tableName':_0x9943('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7ba6=['api','moment','bluebird','request-promise','path','rimraf','./integration.attributes','exports','define','integrations','lodash','util','../../config/logger'];(function(_0x5ecfb5,_0x408959){var _0x33c4a5=function(_0x1ad097){while(--_0x1ad097){_0x5ecfb5['push'](_0x5ecfb5['shift']());}};_0x33c4a5(++_0x408959);}(_0x7ba6,0xb3));var _0x67ba=function(_0x494155,_0x58db09){_0x494155=_0x494155-0x0;var _0x17f703=_0x7ba6[_0x494155];return _0x17f703;};'use strict';var _=require(_0x67ba('0x0'));var util=require(_0x67ba('0x1'));var logger=require(_0x67ba('0x2'))(_0x67ba('0x3'));var moment=require(_0x67ba('0x4'));var BPromise=require(_0x67ba('0x5'));var rp=require(_0x67ba('0x6'));var fs=require('fs');var path=require(_0x67ba('0x7'));var rimraf=require(_0x67ba('0x8'));var config=require('../../config/environment');var attributes=require(_0x67ba('0x9'));module[_0x67ba('0xa')]=function(_0x5d2972,_0x30b703){return _0x5d2972[_0x67ba('0xb')]('Integration',attributes,{'tableName':_0x67ba('0xc'),'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 c8a542c..e19d287 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 _0xcf76=['jayson/promise','client','request','then','info','Integration,\x20%s,\x20%s','request\x20sent','error','code','message','result','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment'];(function(_0x1c75bc,_0x474bac){var _0x30578b=function(_0xc94d85){while(--_0xc94d85){_0x1c75bc['push'](_0x1c75bc['shift']());}};_0x30578b(++_0x474bac);}(_0xcf76,0x1df));var _0x6cf7=function(_0x433576,_0x21bbf0){_0x433576=_0x433576-0x0;var _0x120490=_0xcf76[_0x433576];return _0x120490;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6cf7('0x0'));var BPromise=require(_0x6cf7('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6cf7('0x2'));var db=require(_0x6cf7('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x6cf7('0x4'))(_0x6cf7('0x5'));var config=require(_0x6cf7('0x6'));var jayson=require(_0x6cf7('0x7'));var client=jayson[_0x6cf7('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0xa11300,_0x2ca7d5,_0x1d77a9){return new BPromise(function(_0x5ce841,_0x39c5fb){return client[_0x6cf7('0x9')](_0xa11300,_0x1d77a9)[_0x6cf7('0xa')](function(_0x4f0fc3){logger[_0x6cf7('0xb')](_0x6cf7('0xc'),_0x2ca7d5,_0x6cf7('0xd'));logger['debug']('Integration,\x20%s,\x20%s,\x20%s',_0x2ca7d5,_0x6cf7('0xd'),JSON['stringify'](_0x4f0fc3));if(_0x4f0fc3[_0x6cf7('0xe')]){if(_0x4f0fc3['error'][_0x6cf7('0xf')]===0x1f4){logger[_0x6cf7('0xe')](_0x6cf7('0xc'),_0x2ca7d5,_0x4f0fc3['error'][_0x6cf7('0x10')]);return _0x39c5fb(_0x4f0fc3[_0x6cf7('0xe')][_0x6cf7('0x10')]);}logger[_0x6cf7('0xe')](_0x6cf7('0xc'),_0x2ca7d5,_0x4f0fc3[_0x6cf7('0xe')][_0x6cf7('0x10')]);return _0x5ce841(_0x4f0fc3[_0x6cf7('0xe')][_0x6cf7('0x10')]);}else{logger[_0x6cf7('0xb')](_0x6cf7('0xc'),_0x2ca7d5,_0x6cf7('0xd'));_0x5ce841(_0x4f0fc3[_0x6cf7('0x11')]['message']);}})['catch'](function(_0x42498b){logger[_0x6cf7('0xe')]('Integration,\x20%s,\x20%s',_0x2ca7d5,_0x42498b);_0x39c5fb(_0x42498b);});});}
\ No newline at end of file
+var _0x32f6=['../../mysqldb','../../config/utils','../../config/logger','rpc','request','then','info','request\x20sent','debug','error','Integration,\x20%s,\x20%s','message','result','moment','bluebird','ioredis'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x32f6,0xbd));var _0x632f=function(_0xbf8ebe,_0x3b69a5){_0xbf8ebe=_0xbf8ebe-0x0;var _0x1e25e8=_0x32f6[_0xbf8ebe];return _0x1e25e8;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x632f('0x0'));var BPromise=require(_0x632f('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x632f('0x2'));var db=require(_0x632f('0x3'))['db'];var utils=require(_0x632f('0x4'));var logger=require(_0x632f('0x5'))(_0x632f('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3a7a11,_0x2ce053,_0x3c7840){return new BPromise(function(_0x23a925,_0x3e3810){return client[_0x632f('0x7')](_0x3a7a11,_0x3c7840)[_0x632f('0x8')](function(_0x9e509e){logger[_0x632f('0x9')]('Integration,\x20%s,\x20%s',_0x2ce053,_0x632f('0xa'));logger[_0x632f('0xb')]('Integration,\x20%s,\x20%s,\x20%s',_0x2ce053,'request\x20sent',JSON['stringify'](_0x9e509e));if(_0x9e509e['error']){if(_0x9e509e[_0x632f('0xc')]['code']===0x1f4){logger[_0x632f('0xc')](_0x632f('0xd'),_0x2ce053,_0x9e509e[_0x632f('0xc')]['message']);return _0x3e3810(_0x9e509e['error']['message']);}logger['error']('Integration,\x20%s,\x20%s',_0x2ce053,_0x9e509e['error']['message']);return _0x23a925(_0x9e509e[_0x632f('0xc')][_0x632f('0xe')]);}else{logger['info'](_0x632f('0xd'),_0x2ce053,_0x632f('0xa'));_0x23a925(_0x9e509e[_0x632f('0xf')][_0x632f('0xe')]);}})['catch'](function(_0xa81024){logger[_0x632f('0xc')](_0x632f('0xd'),_0x2ce053,_0xa81024);_0x3e3810(_0xa81024);});});}
\ No newline at end of file
diff --git a/server/api/integrationReport/index.js b/server/api/integrationReport/index.js
index d90d43e..75d3376 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 _0x0431=['post','create','put','update','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./integrationReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show'];(function(_0x6375e,_0xe34dba){var _0x482372=function(_0x6d2090){while(--_0x6d2090){_0x6375e['push'](_0x6375e['shift']());}};_0x482372(++_0xe34dba);}(_0x0431,0x11d));var _0x1043=function(_0x11946c,_0x12152c){_0x11946c=_0x11946c-0x0;var _0x383935=_0x0431[_0x11946c];return _0x383935;};'use strict';var multer=require(_0x1043('0x0'));var util=require(_0x1043('0x1'));var path=require(_0x1043('0x2'));var timeout=require(_0x1043('0x3'));var express=require(_0x1043('0x4'));var router=express['Router']();var auth=require(_0x1043('0x5'));var interaction=require(_0x1043('0x6'));var config=require('../../config/environment');var controller=require(_0x1043('0x7'));router[_0x1043('0x8')]('/',auth[_0x1043('0x9')](),controller[_0x1043('0xa')]);router['get'](_0x1043('0xb'),auth['isAuthenticated'](),controller[_0x1043('0xc')]);router['get'](_0x1043('0xd'),auth['isAuthenticated'](),controller[_0x1043('0xe')]);router[_0x1043('0xf')]('/',auth[_0x1043('0x9')](),controller[_0x1043('0x10')]);router[_0x1043('0x11')](_0x1043('0xd'),auth[_0x1043('0x9')](),controller[_0x1043('0x12')]);router['delete'](_0x1043('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0x1043('0x13')]=router;
\ No newline at end of file
+var _0xee0f=['/:id','update','destroy','exports','multer','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./integrationReport.controller','get','isAuthenticated','index','/describe','describe','post','put'];(function(_0x218d84,_0x2f43d2){var _0xdbeedf=function(_0x16db2a){while(--_0x16db2a){_0x218d84['push'](_0x218d84['shift']());}};_0xdbeedf(++_0x2f43d2);}(_0xee0f,0x1ea));var _0xfee0=function(_0x164eb1,_0x198a7d){_0x164eb1=_0x164eb1-0x0;var _0x73311=_0xee0f[_0x164eb1];return _0x73311;};'use strict';var multer=require(_0xfee0('0x0'));var util=require('util');var path=require(_0xfee0('0x1'));var timeout=require('connect-timeout');var express=require(_0xfee0('0x2'));var router=express['Router']();var auth=require(_0xfee0('0x3'));var interaction=require(_0xfee0('0x4'));var config=require(_0xfee0('0x5'));var controller=require(_0xfee0('0x6'));router[_0xfee0('0x7')]('/',auth[_0xfee0('0x8')](),controller[_0xfee0('0x9')]);router[_0xfee0('0x7')](_0xfee0('0xa'),auth[_0xfee0('0x8')](),controller[_0xfee0('0xb')]);router[_0xfee0('0x7')]('/:id',auth[_0xfee0('0x8')](),controller['show']);router[_0xfee0('0xc')]('/',auth[_0xfee0('0x8')](),controller['create']);router[_0xfee0('0xd')](_0xfee0('0xe'),auth['isAuthenticated'](),controller[_0xfee0('0xf')]);router['delete'](_0xfee0('0xe'),auth[_0xfee0('0x8')](),controller[_0xfee0('0x10')]);module[_0xfee0('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/integrationReport/integrationReport.attributes.js b/server/api/integrationReport/integrationReport.attributes.js
index 3209a21..f69f4a1 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 _0xec1a=['RECEIVED','FAILED','STRING','INTEGER','DATE','BOOLEAN','TEXT','SENT','SENDING'];(function(_0x42aa1e,_0x3383ec){var _0x27d0fc=function(_0x34d46f){while(--_0x34d46f){_0x42aa1e['push'](_0x42aa1e['shift']());}};_0x27d0fc(++_0x3383ec);}(_0xec1a,0x9b));var _0xaec1=function(_0xed0de9,_0x44e273){_0xed0de9=_0xed0de9-0x0;var _0x343dea=_0xec1a[_0xed0de9];return _0x343dea;};'use strict';var Sequelize=require('sequelize');module['exports']={'integration':{'type':Sequelize['STRING']},'eventChannel':{'type':Sequelize['STRING']},'exitStatus':{'type':Sequelize[_0xaec1('0x0')]},'ticketId':{'type':Sequelize['STRING']},'integrationId':{'type':Sequelize[_0xaec1('0x1')]},'contacts':{'type':Sequelize[_0xaec1('0x0')]},'uniqueid':{'type':Sequelize[_0xaec1('0x0')]},'calleridnum':{'type':Sequelize[_0xaec1('0x0')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0xaec1('0x0')]},'interface':{'type':Sequelize[_0xaec1('0x0')]},'membername':{'type':Sequelize[_0xaec1('0x0')]},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize[_0xaec1('0x2')]},'holdtime':{'type':Sequelize[_0xaec1('0x1')]},'agentcomplete':{'type':Sequelize[_0xaec1('0x3')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0xaec1('0x2')]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize[_0xaec1('0x3')],'defaultValue':![]},'acwtime':{'type':Sequelize['INTEGER']},'reason':{'type':Sequelize[_0xaec1('0x0')]},'agentringnoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0xaec1('0x2')]},'agentdump':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentdumpAt':{'type':Sequelize['DATE']},'lastevent':{'type':Sequelize[_0xaec1('0x0')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize[_0xaec1('0x1')]},'channelstatedesc':{'type':Sequelize[_0xaec1('0x0')]},'connectedlinenum':{'type':Sequelize[_0xaec1('0x0')]},'connectedlinename':{'type':Sequelize[_0xaec1('0x0')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xaec1('0x0')]},'context':{'type':Sequelize[_0xaec1('0x0')]},'exten':{'type':Sequelize[_0xaec1('0x0')]},'priority':{'type':Sequelize[_0xaec1('0x0')]},'destchannel':{'type':Sequelize[_0xaec1('0x0')]},'destchannelstate':{'type':Sequelize[_0xaec1('0x1')]},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize[_0xaec1('0x0')]},'destcalleridname':{'type':Sequelize[_0xaec1('0x0')]},'destconnectedlinenum':{'type':Sequelize[_0xaec1('0x0')]},'destconnectedlinename':{'type':Sequelize[_0xaec1('0x0')]},'destlanguage':{'type':Sequelize[_0xaec1('0x0')]},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize[_0xaec1('0x0')]},'destexten':{'type':Sequelize[_0xaec1('0x0')]},'destpriority':{'type':Sequelize[_0xaec1('0x0')]},'destuniqueid':{'type':Sequelize[_0xaec1('0x0')]},'messageId':{'type':Sequelize[_0xaec1('0x0')]},'inReplyTo':{'type':Sequelize[_0xaec1('0x0')]},'subject':{'type':Sequelize['STRING']},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0xaec1('0x0')]},'attachment':{'type':Sequelize[_0xaec1('0x4')]},'html':{'type':Sequelize[_0xaec1('0x4')]},'text':{'type':Sequelize[_0xaec1('0x4')]},'status':{'type':Sequelize['ENUM'](_0xaec1('0x5'),_0xaec1('0x6'),_0xaec1('0x7'),_0xaec1('0x8'))},'url':{'type':Sequelize[_0xaec1('0x0')]},'app':{'type':Sequelize[_0xaec1('0x0')]},'appdata':{'type':Sequelize[_0xaec1('0x0')]},'projectId':{'type':Sequelize[_0xaec1('0x1')]}};
\ No newline at end of file
+var _0xc619=['INTEGER','TEXT','ENUM','SENDING','RECEIVED','FAILED','sequelize','exports','STRING','DATE','BOOLEAN'];(function(_0x2ae8ce,_0x2a5a1f){var _0x4bf686=function(_0x41cabf){while(--_0x41cabf){_0x2ae8ce['push'](_0x2ae8ce['shift']());}};_0x4bf686(++_0x2a5a1f);}(_0xc619,0x150));var _0x9c61=function(_0x3aab4f,_0x2fc299){_0x3aab4f=_0x3aab4f-0x0;var _0x3e360d=_0xc619[_0x3aab4f];return _0x3e360d;};'use strict';var Sequelize=require(_0x9c61('0x0'));module[_0x9c61('0x1')]={'integration':{'type':Sequelize[_0x9c61('0x2')]},'eventChannel':{'type':Sequelize['STRING']},'exitStatus':{'type':Sequelize[_0x9c61('0x2')]},'ticketId':{'type':Sequelize[_0x9c61('0x2')]},'integrationId':{'type':Sequelize['INTEGER']},'contacts':{'type':Sequelize[_0x9c61('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x9c61('0x2')]},'queue':{'type':Sequelize[_0x9c61('0x2')]},'interface':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0x9c61('0x2')]},'agentcalledAt':{'type':Sequelize[_0x9c61('0x3')]},'agentconnectAt':{'type':Sequelize[_0x9c61('0x3')]},'holdtime':{'type':Sequelize['INTEGER']},'agentcomplete':{'type':Sequelize[_0x9c61('0x4')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0x9c61('0x3')]},'talktime':{'type':Sequelize[_0x9c61('0x5')]},'agentacw':{'type':Sequelize[_0x9c61('0x4')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x9c61('0x5')]},'reason':{'type':Sequelize[_0x9c61('0x2')]},'agentringnoanswer':{'type':Sequelize[_0x9c61('0x4')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0x9c61('0x3')]},'agentdump':{'type':Sequelize[_0x9c61('0x4')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0x9c61('0x3')]},'lastevent':{'type':Sequelize[_0x9c61('0x2')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0x9c61('0x2')]},'connectedlinenum':{'type':Sequelize[_0x9c61('0x2')]},'connectedlinename':{'type':Sequelize[_0x9c61('0x2')]},'language':{'type':Sequelize[_0x9c61('0x2')]},'accountcode':{'type':Sequelize[_0x9c61('0x2')]},'context':{'type':Sequelize[_0x9c61('0x2')]},'exten':{'type':Sequelize[_0x9c61('0x2')]},'priority':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize[_0x9c61('0x2')]},'destchannelstate':{'type':Sequelize[_0x9c61('0x5')]},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize[_0x9c61('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0x9c61('0x2')]},'destconnectedlinename':{'type':Sequelize[_0x9c61('0x2')]},'destlanguage':{'type':Sequelize[_0x9c61('0x2')]},'destaccountcode':{'type':Sequelize[_0x9c61('0x2')]},'destcontext':{'type':Sequelize[_0x9c61('0x2')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0x9c61('0x2')]},'destuniqueid':{'type':Sequelize[_0x9c61('0x2')]},'messageId':{'type':Sequelize[_0x9c61('0x2')]},'inReplyTo':{'type':Sequelize['STRING']},'subject':{'type':Sequelize[_0x9c61('0x2')]},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x9c61('0x2')]},'attachment':{'type':Sequelize[_0x9c61('0x6')]},'html':{'type':Sequelize['TEXT']},'text':{'type':Sequelize[_0x9c61('0x6')]},'status':{'type':Sequelize[_0x9c61('0x7')]('SENT',_0x9c61('0x8'),_0x9c61('0x9'),_0x9c61('0xa'))},'url':{'type':Sequelize[_0x9c61('0x2')]},'app':{'type':Sequelize['STRING']},'appdata':{'type':Sequelize[_0x9c61('0x2')]},'projectId':{'type':Sequelize[_0x9c61('0x5')]}};
\ No newline at end of file
diff --git a/server/api/integrationReport/integrationReport.controller.js b/server/api/integrationReport/integrationReport.controller.js
index 7241b83..826d9ba 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 _0x5ed9=['papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','limit','set','Content-Range','apply','reject','save','update','then','end','error','stack','name','send','map','IntegrationReport','rawAttributes','fieldName','type','key','keys','attributes','intersection','model','fields','query','length','nolimit','offset','filters','pick','filter','merge','where','VIRTUAL','options','count','includeAll','findAll','catch','show','params','create','body','find','destroy','describe','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','lodash','squel','crypto','jsforce','desk.js'];(function(_0x35034d,_0x26c33d){var _0x50ed42=function(_0x4e0877){while(--_0x4e0877){_0x35034d['push'](_0x35034d['shift']());}};_0x50ed42(++_0x26c33d);}(_0x5ed9,0x1e9));var _0x95ed=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x5ed9[_0x5d4607];return _0x5e4a86;};'use strict';var pdf=require(_0x95ed('0x0'));var emlformat=require(_0x95ed('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x95ed('0x2'));var jsonpatch=require(_0x95ed('0x3'));var rp=require(_0x95ed('0x4'));var moment=require(_0x95ed('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x95ed('0x6'));var util=require(_0x95ed('0x7'));var path=require(_0x95ed('0x8'));var sox=require('sox');var csv=require(_0x95ed('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x95ed('0xa'));var squel=require(_0x95ed('0xb'));var crypto=require(_0x95ed('0xc'));var jsforce=require(_0x95ed('0xd'));var deskjs=require(_0x95ed('0xe'));var toCsv=require(_0x95ed('0x9'));var querystring=require('querystring');var Papa=require(_0x95ed('0xf'));var Redis=require(_0x95ed('0x10'));var authService=require(_0x95ed('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x95ed('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x95ed('0x13'))(_0x95ed('0x14'));var utils=require(_0x95ed('0x15'));var config=require(_0x95ed('0x16'));var db=require(_0x95ed('0x17'))['db'];function respondWithStatusCode(_0x5bccde,_0x5e4571){_0x5e4571=_0x5e4571||0xcc;return function(_0x3da05b){if(_0x3da05b){return _0x5bccde[_0x95ed('0x18')](_0x5e4571);}return _0x5bccde['status'](_0x5e4571)['end']();};}function respondWithResult(_0x2782a5,_0x11671d){_0x11671d=_0x11671d||0xc8;return function(_0x22211f){if(_0x22211f){return _0x2782a5[_0x95ed('0x19')](_0x11671d)['json'](_0x22211f);}};}function respondWithFilteredResult(_0x213355,_0xd3fe73){return function(_0x477b8f){if(_0x477b8f){var _0x597a04=_0x477b8f['count'],_0x5fc6b5=_0xd3fe73['offset'],_0x554c6a=_0xd3fe73['offset']+_0xd3fe73[_0x95ed('0x1a')],_0x23c63f;if(_0x554c6a>=_0x597a04){_0x554c6a=_0x597a04;_0x23c63f=0xc8;}else{_0x23c63f=0xce;}_0x213355['status'](_0x23c63f);return _0x213355[_0x95ed('0x1b')](_0x95ed('0x1c'),_0x5fc6b5+'-'+_0x554c6a+'/'+_0x597a04)['json'](_0x477b8f);}return null;};}function patchUpdates(_0xa5a91){return function(_0x3e9d1e){try{jsonpatch[_0x95ed('0x1d')](_0x3e9d1e,_0xa5a91,!![]);}catch(_0x2a8dc3){return BPromise[_0x95ed('0x1e')](_0x2a8dc3);}return _0x3e9d1e[_0x95ed('0x1f')]();};}function saveUpdates(_0x2d427e,_0x3e05cf){return function(_0x10823b){if(_0x10823b){return _0x10823b[_0x95ed('0x20')](_0x2d427e)['then'](function(_0xd798ec){return _0xd798ec;});}return null;};}function removeEntity(_0x390d09,_0x4e8a5d){return function(_0x5d5afe){if(_0x5d5afe){return _0x5d5afe['destroy']()[_0x95ed('0x21')](function(){_0x390d09[_0x95ed('0x19')](0xcc)[_0x95ed('0x22')]();});}};}function handleEntityNotFound(_0x61d85e,_0x2c0824){return function(_0x19b664){if(!_0x19b664){_0x61d85e[_0x95ed('0x18')](0x194);}return _0x19b664;};}function handleError(_0x416d23,_0x146f74){_0x146f74=_0x146f74||0x1f4;return function(_0x3bcb6d){logger[_0x95ed('0x23')](_0x3bcb6d[_0x95ed('0x24')]);if(_0x3bcb6d[_0x95ed('0x25')]){delete _0x3bcb6d[_0x95ed('0x25')];}_0x416d23['status'](_0x146f74)[_0x95ed('0x26')](_0x3bcb6d);};}exports['index']=function(_0x4c7a2d,_0x2f515d){var _0x2d6df0={},_0x45e403={},_0x3096ad={'count':0x0,'rows':[]};var _0x2d5042=_[_0x95ed('0x27')](db[_0x95ed('0x28')][_0x95ed('0x29')],function(_0x39330d){return{'name':_0x39330d[_0x95ed('0x2a')],'type':_0x39330d[_0x95ed('0x2b')][_0x95ed('0x2c')]};});_0x45e403['model']=_[_0x95ed('0x27')](_0x2d5042,_0x95ed('0x25'));_0x45e403['query']=_[_0x95ed('0x2d')](_0x4c7a2d['query']);_0x45e403['filters']=_['intersection'](_0x45e403['model'],_0x45e403['query']);_0x2d6df0[_0x95ed('0x2e')]=_[_0x95ed('0x2f')](_0x45e403[_0x95ed('0x30')],qs[_0x95ed('0x31')](_0x4c7a2d[_0x95ed('0x32')][_0x95ed('0x31')]));_0x2d6df0[_0x95ed('0x2e')]=_0x2d6df0['attributes'][_0x95ed('0x33')]?_0x2d6df0[_0x95ed('0x2e')]:_0x45e403[_0x95ed('0x30')];if(!_0x4c7a2d['query']['hasOwnProperty'](_0x95ed('0x34'))){_0x2d6df0['limit']=qs['limit'](_0x4c7a2d['query']['limit']);_0x2d6df0[_0x95ed('0x35')]=qs['offset'](_0x4c7a2d[_0x95ed('0x32')][_0x95ed('0x35')]);}_0x2d6df0['order']=qs['sort'](_0x4c7a2d['query']['sort']);_0x2d6df0['where']=qs[_0x95ed('0x36')](_[_0x95ed('0x37')](_0x4c7a2d[_0x95ed('0x32')],_0x45e403[_0x95ed('0x36')]));if(_0x4c7a2d[_0x95ed('0x32')][_0x95ed('0x38')]){_0x2d6df0['where']=_[_0x95ed('0x39')](_0x2d6df0[_0x95ed('0x3a')],{'$or':_[_0x95ed('0x27')](_0x2d5042,function(_0x5218a3){if(_0x5218a3[_0x95ed('0x2b')]!==_0x95ed('0x3b')){var _0x355623={};_0x355623[_0x5218a3[_0x95ed('0x25')]]={'$like':'%'+_0x4c7a2d[_0x95ed('0x32')][_0x95ed('0x38')]+'%'};return _0x355623;}})});}_0x2d6df0=_[_0x95ed('0x39')]({},_0x2d6df0,_0x4c7a2d[_0x95ed('0x3c')]);var _0x4f9306={'where':_0x2d6df0['where']};return db['IntegrationReport'][_0x95ed('0x3d')](_0x4f9306)[_0x95ed('0x21')](function(_0x237e8b){_0x3096ad[_0x95ed('0x3d')]=_0x237e8b;if(_0x4c7a2d[_0x95ed('0x32')][_0x95ed('0x3e')]){_0x2d6df0['include']=[{'all':!![]}];}return db[_0x95ed('0x28')][_0x95ed('0x3f')](_0x2d6df0);})[_0x95ed('0x21')](function(_0x5aeb8b){_0x3096ad['rows']=_0x5aeb8b;return _0x3096ad;})[_0x95ed('0x21')](respondWithFilteredResult(_0x2f515d,_0x2d6df0))[_0x95ed('0x40')](handleError(_0x2f515d,null));};exports[_0x95ed('0x41')]=function(_0x3a81df,_0x3754a7){var _0x5c4c54={'raw':![],'where':{'id':_0x3a81df[_0x95ed('0x42')]['id']}},_0x5c068f={};_0x5c068f[_0x95ed('0x30')]=_[_0x95ed('0x2d')](db[_0x95ed('0x28')]['rawAttributes']);_0x5c068f[_0x95ed('0x32')]=_['keys'](_0x3a81df[_0x95ed('0x32')]);_0x5c068f[_0x95ed('0x36')]=_[_0x95ed('0x2f')](_0x5c068f['model'],_0x5c068f[_0x95ed('0x32')]);_0x5c4c54[_0x95ed('0x2e')]=_[_0x95ed('0x2f')](_0x5c068f['model'],qs['fields'](_0x3a81df[_0x95ed('0x32')]['fields']));_0x5c4c54[_0x95ed('0x2e')]=_0x5c4c54['attributes'][_0x95ed('0x33')]?_0x5c4c54[_0x95ed('0x2e')]:_0x5c068f[_0x95ed('0x30')];if(_0x3a81df[_0x95ed('0x32')][_0x95ed('0x3e')]){_0x5c4c54['include']=[{'all':!![]}];}_0x5c4c54=_[_0x95ed('0x39')]({},_0x5c4c54,_0x3a81df[_0x95ed('0x3c')]);return db[_0x95ed('0x28')]['find'](_0x5c4c54)[_0x95ed('0x21')](handleEntityNotFound(_0x3754a7,null))['then'](respondWithResult(_0x3754a7,null))[_0x95ed('0x40')](handleError(_0x3754a7,null));};exports[_0x95ed('0x43')]=function(_0x5f2444,_0x34e5e4){return db[_0x95ed('0x28')]['create'](_0x5f2444['body'],{})[_0x95ed('0x21')](respondWithResult(_0x34e5e4,0xc9))['catch'](handleError(_0x34e5e4,null));};exports[_0x95ed('0x20')]=function(_0x5288e6,_0x118be3){if(_0x5288e6[_0x95ed('0x44')]['id']){delete _0x5288e6[_0x95ed('0x44')]['id'];}return db[_0x95ed('0x28')][_0x95ed('0x45')]({'where':{'id':_0x5288e6['params']['id']}})[_0x95ed('0x21')](handleEntityNotFound(_0x118be3,null))[_0x95ed('0x21')](saveUpdates(_0x5288e6[_0x95ed('0x44')],null))[_0x95ed('0x21')](respondWithResult(_0x118be3,null))[_0x95ed('0x40')](handleError(_0x118be3,null));};exports[_0x95ed('0x46')]=function(_0x25f27d,_0x26cd04){return db[_0x95ed('0x28')][_0x95ed('0x45')]({'where':{'id':_0x25f27d[_0x95ed('0x42')]['id']}})[_0x95ed('0x21')](handleEntityNotFound(_0x26cd04,null))[_0x95ed('0x21')](removeEntity(_0x26cd04,null))['catch'](handleError(_0x26cd04,null));};exports[_0x95ed('0x47')]=function(_0x6b718e,_0x5d63b5){return db[_0x95ed('0x28')]['describe']()[_0x95ed('0x21')](respondWithResult(_0x5d63b5,null))[_0x95ed('0x40')](handleError(_0x5d63b5,null));};
\ No newline at end of file
+var _0xb78e=['describe','html-pdf','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','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','Content-Range','apply','update','then','error','stack','name','send','map','IntegrationReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','merge','options','count','includeAll','include','rows','catch','show','params','keys','length','create','body','find'];(function(_0x23a757,_0x22f2d1){var _0x4359b3=function(_0x1a1923){while(--_0x1a1923){_0x23a757['push'](_0x23a757['shift']());}};_0x4359b3(++_0x22f2d1);}(_0xb78e,0x1c9));var _0xeb78=function(_0xc765,_0x8e6b67){_0xc765=_0xc765-0x0;var _0x14b8bf=_0xb78e[_0xc765];return _0x14b8bf;};'use strict';var pdf=require(_0xeb78('0x0'));var emlformat=require(_0xeb78('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xeb78('0x2'));var jsonpatch=require(_0xeb78('0x3'));var rp=require(_0xeb78('0x4'));var moment=require(_0xeb78('0x5'));var BPromise=require(_0xeb78('0x6'));var Mustache=require(_0xeb78('0x7'));var util=require(_0xeb78('0x8'));var path=require(_0xeb78('0x9'));var sox=require('sox');var csv=require(_0xeb78('0xa'));var ejs=require(_0xeb78('0xb'));var fs=require('fs');var _=require(_0xeb78('0xc'));var squel=require(_0xeb78('0xd'));var crypto=require(_0xeb78('0xe'));var jsforce=require(_0xeb78('0xf'));var deskjs=require(_0xeb78('0x10'));var toCsv=require('to-csv');var querystring=require(_0xeb78('0x11'));var Papa=require(_0xeb78('0x12'));var Redis=require(_0xeb78('0x13'));var authService=require(_0xeb78('0x14'));var qs=require(_0xeb78('0x15'));var as=require(_0xeb78('0x16'));var hardwareService=require(_0xeb78('0x17'));var logger=require(_0xeb78('0x18'))(_0xeb78('0x19'));var utils=require('../../config/utils');var config=require(_0xeb78('0x1a'));var db=require(_0xeb78('0x1b'))['db'];function respondWithStatusCode(_0x3725e3,_0x259df2){_0x259df2=_0x259df2||0xcc;return function(_0x9dbe51){if(_0x9dbe51){return _0x3725e3[_0xeb78('0x1c')](_0x259df2);}return _0x3725e3[_0xeb78('0x1d')](_0x259df2)[_0xeb78('0x1e')]();};}function respondWithResult(_0x41bec0,_0x9bcc79){_0x9bcc79=_0x9bcc79||0xc8;return function(_0x5d50cf){if(_0x5d50cf){return _0x41bec0[_0xeb78('0x1d')](_0x9bcc79)[_0xeb78('0x1f')](_0x5d50cf);}};}function respondWithFilteredResult(_0x4e8b8c,_0x538485){return function(_0x53be89){if(_0x53be89){var _0x23a0d0=_0x53be89['count'],_0x50ebae=_0x538485[_0xeb78('0x20')],_0xa28d5e=_0x538485['offset']+_0x538485[_0xeb78('0x21')],_0x247cb1;if(_0xa28d5e>=_0x23a0d0){_0xa28d5e=_0x23a0d0;_0x247cb1=0xc8;}else{_0x247cb1=0xce;}_0x4e8b8c[_0xeb78('0x1d')](_0x247cb1);return _0x4e8b8c['set'](_0xeb78('0x22'),_0x50ebae+'-'+_0xa28d5e+'/'+_0x23a0d0)[_0xeb78('0x1f')](_0x53be89);}return null;};}function patchUpdates(_0x1cb338){return function(_0x5368ad){try{jsonpatch[_0xeb78('0x23')](_0x5368ad,_0x1cb338,!![]);}catch(_0x2c43c5){return BPromise['reject'](_0x2c43c5);}return _0x5368ad['save']();};}function saveUpdates(_0x455e30,_0x106c5d){return function(_0x42eacb){if(_0x42eacb){return _0x42eacb[_0xeb78('0x24')](_0x455e30)[_0xeb78('0x25')](function(_0x425de5){return _0x425de5;});}return null;};}function removeEntity(_0x2cf7cc,_0x3ea071){return function(_0x18f08d){if(_0x18f08d){return _0x18f08d['destroy']()['then'](function(){_0x2cf7cc['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3c8e66,_0x5b15d8){return function(_0x2159c1){if(!_0x2159c1){_0x3c8e66[_0xeb78('0x1c')](0x194);}return _0x2159c1;};}function handleError(_0x566336,_0x777ca3){_0x777ca3=_0x777ca3||0x1f4;return function(_0x4ac816){logger[_0xeb78('0x26')](_0x4ac816[_0xeb78('0x27')]);if(_0x4ac816[_0xeb78('0x28')]){delete _0x4ac816[_0xeb78('0x28')];}_0x566336['status'](_0x777ca3)[_0xeb78('0x29')](_0x4ac816);};}exports['index']=function(_0x31ad03,_0x23295a){var _0x4493bb={},_0x5263fc={},_0x1028ba={'count':0x0,'rows':[]};var _0x1e7d56=_[_0xeb78('0x2a')](db[_0xeb78('0x2b')][_0xeb78('0x2c')],function(_0x3516b8){return{'name':_0x3516b8[_0xeb78('0x2d')],'type':_0x3516b8[_0xeb78('0x2e')][_0xeb78('0x2f')]};});_0x5263fc[_0xeb78('0x30')]=_[_0xeb78('0x2a')](_0x1e7d56,'name');_0x5263fc['query']=_['keys'](_0x31ad03[_0xeb78('0x31')]);_0x5263fc[_0xeb78('0x32')]=_[_0xeb78('0x33')](_0x5263fc['model'],_0x5263fc[_0xeb78('0x31')]);_0x4493bb[_0xeb78('0x34')]=_[_0xeb78('0x33')](_0x5263fc[_0xeb78('0x30')],qs[_0xeb78('0x35')](_0x31ad03[_0xeb78('0x31')][_0xeb78('0x35')]));_0x4493bb[_0xeb78('0x34')]=_0x4493bb[_0xeb78('0x34')]['length']?_0x4493bb[_0xeb78('0x34')]:_0x5263fc['model'];if(!_0x31ad03[_0xeb78('0x31')][_0xeb78('0x36')](_0xeb78('0x37'))){_0x4493bb[_0xeb78('0x21')]=qs[_0xeb78('0x21')](_0x31ad03[_0xeb78('0x31')]['limit']);_0x4493bb['offset']=qs[_0xeb78('0x20')](_0x31ad03[_0xeb78('0x31')][_0xeb78('0x20')]);}_0x4493bb[_0xeb78('0x38')]=qs[_0xeb78('0x39')](_0x31ad03['query'][_0xeb78('0x39')]);_0x4493bb[_0xeb78('0x3a')]=qs[_0xeb78('0x32')](_[_0xeb78('0x3b')](_0x31ad03[_0xeb78('0x31')],_0x5263fc[_0xeb78('0x32')]));if(_0x31ad03['query']['filter']){_0x4493bb['where']=_['merge'](_0x4493bb[_0xeb78('0x3a')],{'$or':_[_0xeb78('0x2a')](_0x1e7d56,function(_0x24a6e3){if(_0x24a6e3['type']!==_0xeb78('0x3c')){var _0x194cb5={};_0x194cb5[_0x24a6e3['name']]={'$like':'%'+_0x31ad03['query']['filter']+'%'};return _0x194cb5;}})});}_0x4493bb=_[_0xeb78('0x3d')]({},_0x4493bb,_0x31ad03[_0xeb78('0x3e')]);var _0x1ec55a={'where':_0x4493bb['where']};return db[_0xeb78('0x2b')][_0xeb78('0x3f')](_0x1ec55a)[_0xeb78('0x25')](function(_0x4fb001){_0x1028ba[_0xeb78('0x3f')]=_0x4fb001;if(_0x31ad03[_0xeb78('0x31')][_0xeb78('0x40')]){_0x4493bb[_0xeb78('0x41')]=[{'all':!![]}];}return db['IntegrationReport']['findAll'](_0x4493bb);})[_0xeb78('0x25')](function(_0xa0284a){_0x1028ba[_0xeb78('0x42')]=_0xa0284a;return _0x1028ba;})[_0xeb78('0x25')](respondWithFilteredResult(_0x23295a,_0x4493bb))[_0xeb78('0x43')](handleError(_0x23295a,null));};exports[_0xeb78('0x44')]=function(_0x200600,_0x37d604){var _0x47567d={'raw':![],'where':{'id':_0x200600[_0xeb78('0x45')]['id']}},_0x571552={};_0x571552[_0xeb78('0x30')]=_[_0xeb78('0x46')](db['IntegrationReport'][_0xeb78('0x2c')]);_0x571552['query']=_[_0xeb78('0x46')](_0x200600[_0xeb78('0x31')]);_0x571552[_0xeb78('0x32')]=_['intersection'](_0x571552[_0xeb78('0x30')],_0x571552[_0xeb78('0x31')]);_0x47567d[_0xeb78('0x34')]=_[_0xeb78('0x33')](_0x571552[_0xeb78('0x30')],qs['fields'](_0x200600[_0xeb78('0x31')][_0xeb78('0x35')]));_0x47567d['attributes']=_0x47567d[_0xeb78('0x34')][_0xeb78('0x47')]?_0x47567d[_0xeb78('0x34')]:_0x571552['model'];if(_0x200600[_0xeb78('0x31')][_0xeb78('0x40')]){_0x47567d[_0xeb78('0x41')]=[{'all':!![]}];}_0x47567d=_[_0xeb78('0x3d')]({},_0x47567d,_0x200600[_0xeb78('0x3e')]);return db[_0xeb78('0x2b')]['find'](_0x47567d)['then'](handleEntityNotFound(_0x37d604,null))[_0xeb78('0x25')](respondWithResult(_0x37d604,null))[_0xeb78('0x43')](handleError(_0x37d604,null));};exports['create']=function(_0x108f8b,_0x3ee867){return db[_0xeb78('0x2b')][_0xeb78('0x48')](_0x108f8b[_0xeb78('0x49')],{})[_0xeb78('0x25')](respondWithResult(_0x3ee867,0xc9))[_0xeb78('0x43')](handleError(_0x3ee867,null));};exports[_0xeb78('0x24')]=function(_0x9d5b17,_0x2ba296){if(_0x9d5b17[_0xeb78('0x49')]['id']){delete _0x9d5b17[_0xeb78('0x49')]['id'];}return db[_0xeb78('0x2b')][_0xeb78('0x4a')]({'where':{'id':_0x9d5b17[_0xeb78('0x45')]['id']}})['then'](handleEntityNotFound(_0x2ba296,null))[_0xeb78('0x25')](saveUpdates(_0x9d5b17[_0xeb78('0x49')],null))[_0xeb78('0x25')](respondWithResult(_0x2ba296,null))[_0xeb78('0x43')](handleError(_0x2ba296,null));};exports['destroy']=function(_0x35cedb,_0x135106){return db[_0xeb78('0x2b')][_0xeb78('0x4a')]({'where':{'id':_0x35cedb[_0xeb78('0x45')]['id']}})['then'](handleEntityNotFound(_0x135106,null))['then'](removeEntity(_0x135106,null))['catch'](handleError(_0x135106,null));};exports[_0xeb78('0x4b')]=function(_0x21ee21,_0x554c2e){return db[_0xeb78('0x2b')][_0xeb78('0x4b')]()[_0xeb78('0x25')](respondWithResult(_0x554c2e,null))['catch'](handleError(_0x554c2e,null));};
\ No newline at end of file
diff --git a/server/api/integrationReport/integrationReport.model.js b/server/api/integrationReport/integrationReport.model.js
index f8d1000..0ba046e 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 _0xdb3e=['./integrationReport.attributes','report_integration','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x5cd363,_0x1c168c){var _0x31fb2b=function(_0x4de445){while(--_0x4de445){_0x5cd363['push'](_0x5cd363['shift']());}};_0x31fb2b(++_0x1c168c);}(_0xdb3e,0x174));var _0xedb3=function(_0x3809d0,_0x312ed8){_0x3809d0=_0x3809d0-0x0;var _0x30e18b=_0xdb3e[_0x3809d0];return _0x30e18b;};'use strict';var _=require(_0xedb3('0x0'));var util=require('util');var logger=require(_0xedb3('0x1'))(_0xedb3('0x2'));var moment=require(_0xedb3('0x3'));var BPromise=require(_0xedb3('0x4'));var rp=require(_0xedb3('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xedb3('0x6'));var config=require(_0xedb3('0x7'));var attributes=require(_0xedb3('0x8'));module['exports']=function(_0x22d140,_0x48e63c){return _0x22d140['define']('IntegrationReport',attributes,{'tableName':_0xedb3('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfb55=['rimraf','../../config/environment','./integrationReport.attributes','exports','IntegrationReport','report_integration','lodash','api','moment','bluebird','path'];(function(_0xdd0c1e,_0x3edb06){var _0x323c9a=function(_0x2a0839){while(--_0x2a0839){_0xdd0c1e['push'](_0xdd0c1e['shift']());}};_0x323c9a(++_0x3edb06);}(_0xfb55,0x145));var _0x5fb5=function(_0x50dbc8,_0x588878){_0x50dbc8=_0x50dbc8-0x0;var _0x35a5b6=_0xfb55[_0x50dbc8];return _0x35a5b6;};'use strict';var _=require(_0x5fb5('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x5fb5('0x1'));var moment=require(_0x5fb5('0x2'));var BPromise=require(_0x5fb5('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5fb5('0x4'));var rimraf=require(_0x5fb5('0x5'));var config=require(_0x5fb5('0x6'));var attributes=require(_0x5fb5('0x7'));module[_0x5fb5('0x8')]=function(_0x33ce65,_0xa528f){return _0x33ce65['define'](_0x5fb5('0x9'),attributes,{'tableName':_0x5fb5('0xa'),'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 22d76d3..d137bf5 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 _0x5eb8=['info','IntegrationReport,\x20%s,\x20%s','request\x20sent','debug','IntegrationReport,\x20%s,\x20%s,\x20%s','error','message','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x308260,_0x167c0b){var _0x3b9be5=function(_0x32eac7){while(--_0x32eac7){_0x308260['push'](_0x308260['shift']());}};_0x3b9be5(++_0x167c0b);}(_0x5eb8,0xb0));var _0x85eb=function(_0x382e89,_0x4768c0){_0x382e89=_0x382e89-0x0;var _0x3a1318=_0x5eb8[_0x382e89];return _0x3a1318;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x85eb('0x0'));var BPromise=require(_0x85eb('0x1'));var rs=require(_0x85eb('0x2'));var fs=require('fs');var Redis=require(_0x85eb('0x3'));var db=require(_0x85eb('0x4'))['db'];var utils=require(_0x85eb('0x5'));var logger=require(_0x85eb('0x6'))(_0x85eb('0x7'));var config=require(_0x85eb('0x8'));var jayson=require(_0x85eb('0x9'));var client=jayson[_0x85eb('0xa')][_0x85eb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4a8814,_0x16d7b9,_0x3af658){return new BPromise(function(_0x448345,_0x5cd4ec){return client[_0x85eb('0xc')](_0x4a8814,_0x3af658)['then'](function(_0x1f0036){logger[_0x85eb('0xd')](_0x85eb('0xe'),_0x16d7b9,_0x85eb('0xf'));logger[_0x85eb('0x10')](_0x85eb('0x11'),_0x16d7b9,_0x85eb('0xf'),JSON['stringify'](_0x1f0036));if(_0x1f0036[_0x85eb('0x12')]){if(_0x1f0036[_0x85eb('0x12')]['code']===0x1f4){logger[_0x85eb('0x12')](_0x85eb('0xe'),_0x16d7b9,_0x1f0036[_0x85eb('0x12')][_0x85eb('0x13')]);return _0x5cd4ec(_0x1f0036['error']['message']);}logger[_0x85eb('0x12')]('IntegrationReport,\x20%s,\x20%s',_0x16d7b9,_0x1f0036[_0x85eb('0x12')][_0x85eb('0x13')]);return _0x448345(_0x1f0036[_0x85eb('0x12')][_0x85eb('0x13')]);}else{logger[_0x85eb('0xd')]('IntegrationReport,\x20%s,\x20%s',_0x16d7b9,_0x85eb('0xf'));_0x448345(_0x1f0036['result'][_0x85eb('0x13')]);}})[_0x85eb('0x14')](function(_0x3e23e8){logger[_0x85eb('0x12')]('IntegrationReport,\x20%s,\x20%s',_0x16d7b9,_0x3e23e8);_0x5cd4ec(_0x3e23e8);});});}
\ No newline at end of file
+var _0x0713=['IntegrationReport,\x20%s,\x20%s','request\x20sent','debug','IntegrationReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x3da3fb,_0x129418){var _0x56b4ce=function(_0x3b766a){while(--_0x3b766a){_0x3da3fb['push'](_0x3da3fb['shift']());}};_0x56b4ce(++_0x129418);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3071('0x0'));var BPromise=require(_0x3071('0x1'));var rs=require(_0x3071('0x2'));var fs=require('fs');var Redis=require(_0x3071('0x3'));var db=require(_0x3071('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3071('0x5'))(_0x3071('0x6'));var config=require(_0x3071('0x7'));var jayson=require(_0x3071('0x8'));var client=jayson[_0x3071('0x9')][_0x3071('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d3dd6,_0x2f1e87,_0xbd737f){return new BPromise(function(_0x22274c,_0x3e9a5e){return client[_0x3071('0xb')](_0x1d3dd6,_0xbd737f)[_0x3071('0xc')](function(_0x4a36ec){logger[_0x3071('0xd')](_0x3071('0xe'),_0x2f1e87,_0x3071('0xf'));logger[_0x3071('0x10')](_0x3071('0x11'),_0x2f1e87,'request\x20sent',JSON[_0x3071('0x12')](_0x4a36ec));if(_0x4a36ec[_0x3071('0x13')]){if(_0x4a36ec[_0x3071('0x13')][_0x3071('0x14')]===0x1f4){logger[_0x3071('0x13')]('IntegrationReport,\x20%s,\x20%s',_0x2f1e87,_0x4a36ec['error'][_0x3071('0x15')]);return _0x3e9a5e(_0x4a36ec['error'][_0x3071('0x15')]);}logger[_0x3071('0x13')]('IntegrationReport,\x20%s,\x20%s',_0x2f1e87,_0x4a36ec[_0x3071('0x13')]['message']);return _0x22274c(_0x4a36ec[_0x3071('0x13')][_0x3071('0x15')]);}else{logger[_0x3071('0xd')](_0x3071('0xe'),_0x2f1e87,_0x3071('0xf'));_0x22274c(_0x4a36ec[_0x3071('0x16')][_0x3071('0x15')]);}})[_0x3071('0x17')](function(_0x21aad3){logger[_0x3071('0x13')]('IntegrationReport,\x20%s,\x20%s',_0x2f1e87,_0x21aad3);_0x3e9a5e(_0x21aad3);});});}
\ No newline at end of file
diff --git a/server/api/interval/index.js b/server/api/interval/index.js
index d80006a..c25f7d8 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 _0x9957=['../../config/environment','get','isAuthenticated','index','/:id','/:id/sub_intervals','getIntervals','post','create','/:id/sub_intervals/create_many','addIntervals','put','update','delete','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x1ccdf7,_0x215d5a){var _0x52a0ae=function(_0x40324a){while(--_0x40324a){_0x1ccdf7['push'](_0x1ccdf7['shift']());}};_0x52a0ae(++_0x215d5a);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var auth=require(_0x7995('0x5'));var interaction=require(_0x7995('0x6'));var config=require(_0x7995('0x7'));var controller=require('./interval.controller');router[_0x7995('0x8')]('/',auth[_0x7995('0x9')](),controller[_0x7995('0xa')]);router[_0x7995('0x8')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller['show']);router[_0x7995('0x8')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0xe')]('/',auth[_0x7995('0x9')](),controller[_0x7995('0xf')]);router[_0x7995('0xe')](_0x7995('0xc'),auth[_0x7995('0x9')](),controller['addInterval']);router[_0x7995('0xe')](_0x7995('0x10'),auth['isAuthenticated'](),controller[_0x7995('0x11')]);router[_0x7995('0x12')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xb'),auth['isAuthenticated'](),controller['destroy']);module[_0x7995('0x15')]=router;
\ No newline at end of file
+var _0x55ca=['/:id/sub_intervals','addInterval','/:id/sub_intervals/create_many','addIntervals','put','update','destroy','exports','multer','util','Router','../../components/auth/service','../../config/environment','./interval.controller','get','isAuthenticated','index','/:id','show','getIntervals','create','post'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x55ca,0x126));var _0xa55c=function(_0x405385,_0x56f573){_0x405385=_0x405385-0x0;var _0x43837b=_0x55ca[_0x405385];return _0x43837b;};'use strict';var multer=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xa55c('0x2')]();var auth=require(_0xa55c('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xa55c('0x4'));var controller=require(_0xa55c('0x5'));router[_0xa55c('0x6')]('/',auth[_0xa55c('0x7')](),controller[_0xa55c('0x8')]);router[_0xa55c('0x6')](_0xa55c('0x9'),auth['isAuthenticated'](),controller[_0xa55c('0xa')]);router[_0xa55c('0x6')]('/:id/sub_intervals',auth[_0xa55c('0x7')](),controller[_0xa55c('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xa55c('0xc')]);router[_0xa55c('0xd')](_0xa55c('0xe'),auth[_0xa55c('0x7')](),controller[_0xa55c('0xf')]);router[_0xa55c('0xd')](_0xa55c('0x10'),auth[_0xa55c('0x7')](),controller[_0xa55c('0x11')]);router[_0xa55c('0x12')]('/:id',auth['isAuthenticated'](),controller[_0xa55c('0x13')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xa55c('0x14')]);module[_0xa55c('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 b25f5c3..d7b0a6e 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 _0x19e8=['exports','STRING','sequelize'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x19e8,0x146));var _0x819e=function(_0x164080,_0x3ccf98){_0x164080=_0x164080-0x0;var _0x5c565b=_0x19e8[_0x164080];return _0x5c565b;};'use strict';var Sequelize=require(_0x819e('0x0'));module[_0x819e('0x1')]={'name':{'type':Sequelize[_0x819e('0x2')]},'description':{'type':Sequelize[_0x819e('0x2')]},'interval':{'type':Sequelize[_0x819e('0x2')],'allowNull':!![]}};
\ No newline at end of file
+var _0x1221=['STRING','exports'];(function(_0x304800,_0x3b082c){var _0x3bd63e=function(_0x37d76a){while(--_0x37d76a){_0x304800['push'](_0x304800['shift']());}};_0x3bd63e(++_0x3b082c);}(_0x1221,0xcf));var _0x1122=function(_0x5433bd,_0x11c06c){_0x5433bd=_0x5433bd-0x0;var _0x2821ef=_0x1221[_0x5433bd];return _0x2821ef;};'use strict';var Sequelize=require('sequelize');module[_0x1122('0x0')]={'name':{'type':Sequelize[_0x1122('0x1')]},'description':{'type':Sequelize[_0x1122('0x1')]},'interval':{'type':Sequelize[_0x1122('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 7146e2d..cfa4f30 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 _0x9c44=['length','nolimit','limit','sort','where','pick','filter','merge','type','VIRTUAL','count','includeAll','include','findAll','rows','catch','show','options','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','addInterval','IntervalId','order','getIntervals','hasOwnProperty','addIntervals','findOne','sequelize','bulkCreate','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../mysqldb','../../components/extensions/rewrite','status','end','json','offset','set','Content-Range','reject','save','update','then','destroy','get','Intervals','UserProfileResource','sendStatus','stack','name','index','map','Interval','rawAttributes','model','query','keys','filters','intersection','fields','attributes'];(function(_0x3b1f16,_0x84ec05){var _0x272eb0=function(_0x127073){while(--_0x127073){_0x3b1f16['push'](_0x3b1f16['shift']());}};_0x272eb0(++_0x84ec05);}(_0x9c44,0x178));var _0x49c4=function(_0x4d613c,_0x55f220){_0x4d613c=_0x4d613c-0x0;var _0x301fe3=_0x9c44[_0x4d613c];return _0x301fe3;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x49c4('0x0'));var zipdir=require(_0x49c4('0x1'));var jsonpatch=require(_0x49c4('0x2'));var rp=require(_0x49c4('0x3'));var moment=require(_0x49c4('0x4'));var BPromise=require(_0x49c4('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x49c4('0x6'));var sox=require('sox');var csv=require(_0x49c4('0x7'));var ejs=require(_0x49c4('0x8'));var fs=require('fs');var _=require(_0x49c4('0x9'));var squel=require(_0x49c4('0xa'));var crypto=require(_0x49c4('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x49c4('0xc'));var toCsv=require(_0x49c4('0x7'));var querystring=require(_0x49c4('0xd'));var Papa=require(_0x49c4('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x49c4('0xf'));var as=require(_0x49c4('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x49c4('0x11'))(_0x49c4('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x49c4('0x13'))['db'];var extensions=require(_0x49c4('0x14'));function respondWithStatusCode(_0x5487cd,_0x7df3a9){_0x7df3a9=_0x7df3a9||0xcc;return function(_0x403bfb){if(_0x403bfb){return _0x5487cd['sendStatus'](_0x7df3a9);}return _0x5487cd[_0x49c4('0x15')](_0x7df3a9)[_0x49c4('0x16')]();};}function respondWithResult(_0x21f15a,_0x2decee){_0x2decee=_0x2decee||0xc8;return function(_0x12777c){if(_0x12777c){return _0x21f15a[_0x49c4('0x15')](_0x2decee)[_0x49c4('0x17')](_0x12777c);}};}function respondWithFilteredResult(_0x3de397,_0x58d177){return function(_0x3acd06){if(_0x3acd06){var _0x141003=_0x3acd06['count'],_0x13a2db=_0x58d177[_0x49c4('0x18')],_0x81e831=_0x58d177[_0x49c4('0x18')]+_0x58d177['limit'],_0x2abc78;if(_0x81e831>=_0x141003){_0x81e831=_0x141003;_0x2abc78=0xc8;}else{_0x2abc78=0xce;}_0x3de397['status'](_0x2abc78);return _0x3de397[_0x49c4('0x19')](_0x49c4('0x1a'),_0x13a2db+'-'+_0x81e831+'/'+_0x141003)[_0x49c4('0x17')](_0x3acd06);}return null;};}function patchUpdates(_0x59f29b){return function(_0x24856d){try{jsonpatch['apply'](_0x24856d,_0x59f29b,!![]);}catch(_0x2cbd50){return BPromise[_0x49c4('0x1b')](_0x2cbd50);}return _0x24856d[_0x49c4('0x1c')]();};}function saveUpdates(_0x291526,_0x382040){return function(_0x41078c){if(_0x41078c){return _0x41078c[_0x49c4('0x1d')](_0x291526)[_0x49c4('0x1e')](function(_0x2197d2){return _0x2197d2;});}return null;};}function removeEntity(_0x578447,_0x527126){return function(_0x57f502){if(_0x57f502){return _0x57f502[_0x49c4('0x1f')]()['then'](function(){var _0x592bb8=_0x57f502[_0x49c4('0x20')]({'plain':!![]});var _0x15581b=_0x49c4('0x21');return db[_0x49c4('0x22')]['destroy']({'where':{'type':_0x15581b,'resourceId':_0x592bb8['id']}})['then'](function(){return _0x57f502;});})[_0x49c4('0x1e')](function(){_0x578447[_0x49c4('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x207358,_0x43e014){return function(_0x210159){if(!_0x210159){_0x207358[_0x49c4('0x23')](0x194);}return _0x210159;};}function handleError(_0x531d92,_0x543ea2){_0x543ea2=_0x543ea2||0x1f4;return function(_0x449960){logger['error'](_0x449960[_0x49c4('0x24')]);if(_0x449960[_0x49c4('0x25')]){delete _0x449960[_0x49c4('0x25')];}_0x531d92[_0x49c4('0x15')](_0x543ea2)['send'](_0x449960);};}exports[_0x49c4('0x26')]=function(_0x2b2793,_0x46e04d){var _0x4f28a2={},_0x6329b3={},_0x29f835={'count':0x0,'rows':[]};var _0x26ba17=_[_0x49c4('0x27')](db[_0x49c4('0x28')][_0x49c4('0x29')],function(_0x46f7ea){return{'name':_0x46f7ea['fieldName'],'type':_0x46f7ea['type']['key']};});_0x6329b3[_0x49c4('0x2a')]=_[_0x49c4('0x27')](_0x26ba17,_0x49c4('0x25'));_0x6329b3[_0x49c4('0x2b')]=_[_0x49c4('0x2c')](_0x2b2793['query']);_0x6329b3[_0x49c4('0x2d')]=_[_0x49c4('0x2e')](_0x6329b3[_0x49c4('0x2a')],_0x6329b3[_0x49c4('0x2b')]);_0x4f28a2['attributes']=_['intersection'](_0x6329b3[_0x49c4('0x2a')],qs[_0x49c4('0x2f')](_0x2b2793[_0x49c4('0x2b')][_0x49c4('0x2f')]));_0x4f28a2[_0x49c4('0x30')]=_0x4f28a2['attributes'][_0x49c4('0x31')]?_0x4f28a2[_0x49c4('0x30')]:_0x6329b3[_0x49c4('0x2a')];if(!_0x2b2793['query']['hasOwnProperty'](_0x49c4('0x32'))){_0x4f28a2[_0x49c4('0x33')]=qs[_0x49c4('0x33')](_0x2b2793[_0x49c4('0x2b')][_0x49c4('0x33')]);_0x4f28a2[_0x49c4('0x18')]=qs[_0x49c4('0x18')](_0x2b2793[_0x49c4('0x2b')][_0x49c4('0x18')]);}_0x4f28a2['order']=qs[_0x49c4('0x34')](_0x2b2793['query'][_0x49c4('0x34')]);_0x4f28a2[_0x49c4('0x35')]=qs[_0x49c4('0x2d')](_[_0x49c4('0x36')](_0x2b2793['query'],_0x6329b3[_0x49c4('0x2d')]));if(_0x2b2793[_0x49c4('0x2b')][_0x49c4('0x37')]){_0x4f28a2['where']=_[_0x49c4('0x38')](_0x4f28a2[_0x49c4('0x35')],{'$or':_[_0x49c4('0x27')](_0x26ba17,function(_0x5e5366){if(_0x5e5366[_0x49c4('0x39')]!==_0x49c4('0x3a')){var _0x143916={};_0x143916[_0x5e5366[_0x49c4('0x25')]]={'$like':'%'+_0x2b2793[_0x49c4('0x2b')][_0x49c4('0x37')]+'%'};return _0x143916;}})});}_0x4f28a2=_[_0x49c4('0x38')]({},_0x4f28a2,_0x2b2793['options']);var _0x2d2510={'where':_0x4f28a2[_0x49c4('0x35')]};return db[_0x49c4('0x28')][_0x49c4('0x3b')](_0x2d2510)[_0x49c4('0x1e')](function(_0x29dd5d){_0x29f835[_0x49c4('0x3b')]=_0x29dd5d;if(_0x2b2793[_0x49c4('0x2b')][_0x49c4('0x3c')]){_0x4f28a2[_0x49c4('0x3d')]=[{'all':!![]}];}return db[_0x49c4('0x28')][_0x49c4('0x3e')](_0x4f28a2);})[_0x49c4('0x1e')](function(_0x4e38bc){_0x29f835[_0x49c4('0x3f')]=_0x4e38bc;return _0x29f835;})['then'](respondWithFilteredResult(_0x46e04d,_0x4f28a2))[_0x49c4('0x40')](handleError(_0x46e04d,null));};exports[_0x49c4('0x41')]=function(_0x28d4fb,_0x1480da){var _0x239327={'raw':!![],'where':{'id':_0x28d4fb['params']['id']}},_0x281b83={};_0x281b83['model']=_[_0x49c4('0x2c')](db[_0x49c4('0x28')][_0x49c4('0x29')]);_0x281b83[_0x49c4('0x2b')]=_['keys'](_0x28d4fb[_0x49c4('0x2b')]);_0x281b83[_0x49c4('0x2d')]=_[_0x49c4('0x2e')](_0x281b83[_0x49c4('0x2a')],_0x281b83[_0x49c4('0x2b')]);_0x239327[_0x49c4('0x30')]=_[_0x49c4('0x2e')](_0x281b83[_0x49c4('0x2a')],qs[_0x49c4('0x2f')](_0x28d4fb['query'][_0x49c4('0x2f')]));_0x239327['attributes']=_0x239327[_0x49c4('0x30')][_0x49c4('0x31')]?_0x239327[_0x49c4('0x30')]:_0x281b83[_0x49c4('0x2a')];if(_0x28d4fb[_0x49c4('0x2b')]['includeAll']){_0x239327[_0x49c4('0x3d')]=[{'all':!![]}];}_0x239327=_[_0x49c4('0x38')]({},_0x239327,_0x28d4fb[_0x49c4('0x42')]);return db[_0x49c4('0x28')][_0x49c4('0x43')](_0x239327)[_0x49c4('0x1e')](handleEntityNotFound(_0x1480da,null))[_0x49c4('0x1e')](respondWithResult(_0x1480da,null))['catch'](handleError(_0x1480da,null));};exports[_0x49c4('0x44')]=function(_0x5cfff9,_0x3f7379){return db[_0x49c4('0x28')][_0x49c4('0x44')](_0x5cfff9[_0x49c4('0x45')],{})[_0x49c4('0x1e')](function(_0x30bea5){var _0x2c6be1=_0x5cfff9['user'][_0x49c4('0x20')]({'plain':!![]});if(!_0x2c6be1)throw new Error(_0x49c4('0x46'));if(_0x2c6be1['role']===_0x49c4('0x47')){var _0xaece5f=_0x30bea5[_0x49c4('0x20')]({'plain':!![]});var _0x242afc='Intervals';return db['UserProfileSection'][_0x49c4('0x43')]({'where':{'name':_0x242afc,'userProfileId':_0x2c6be1['userProfileId']},'raw':!![]})[_0x49c4('0x1e')](function(_0x1f941f){if(_0x1f941f&&_0x1f941f[_0x49c4('0x48')]===0x0){return db[_0x49c4('0x22')][_0x49c4('0x44')]({'name':_0xaece5f[_0x49c4('0x25')],'resourceId':_0xaece5f['id'],'type':_0x1f941f[_0x49c4('0x25')],'sectionId':_0x1f941f['id']},{})['then'](function(){return _0x30bea5;});}else{return _0x30bea5;}})[_0x49c4('0x40')](function(_0x1550ce){logger[_0x49c4('0x49')](_0x49c4('0x4a'),_0x1550ce);throw _0x1550ce;});}return _0x30bea5;})[_0x49c4('0x1e')](respondWithResult(_0x3f7379,0xc9))[_0x49c4('0x40')](handleError(_0x3f7379,null));};exports[_0x49c4('0x1d')]=function(_0x25d174,_0x1e0b4f){if(_0x25d174[_0x49c4('0x45')]['id']){delete _0x25d174['body']['id'];}return db['Interval'][_0x49c4('0x43')]({'where':{'id':_0x25d174[_0x49c4('0x4b')]['id']}})['then'](handleEntityNotFound(_0x1e0b4f,null))['then'](saveUpdates(_0x25d174[_0x49c4('0x45')],null))['then'](respondWithResult(_0x1e0b4f,null))['catch'](handleError(_0x1e0b4f,null));};exports[_0x49c4('0x1f')]=function(_0x4081a5,_0x4a0a93){return db[_0x49c4('0x28')][_0x49c4('0x43')]({'where':{'id':_0x4081a5[_0x49c4('0x4b')]['id']}})[_0x49c4('0x1e')](handleEntityNotFound(_0x4a0a93,null))['then'](removeEntity(_0x4a0a93,null))[_0x49c4('0x40')](handleError(_0x4a0a93,null));};exports[_0x49c4('0x4c')]=function(_0x207572,_0x208208,_0x73840f){if(_0x207572[_0x49c4('0x45')]['id']){delete _0x207572['body']['id'];}return db['Interval'][_0x49c4('0x43')]({'where':{'id':_0x207572[_0x49c4('0x4b')]['id']}})[_0x49c4('0x1e')](handleEntityNotFound(_0x208208,null))[_0x49c4('0x1e')](function(_0x23288e){if(_0x23288e){_0x207572[_0x49c4('0x45')][_0x49c4('0x4d')]=_0x23288e['id'];return db['Interval'][_0x49c4('0x44')](_0x207572[_0x49c4('0x45')]);}})['then'](respondWithResult(_0x208208,null))[_0x49c4('0x40')](handleError(_0x208208,null));};exports['getIntervals']=function(_0x2f966c,_0x147ebd,_0x9eaa84){var _0x2fe89a={};var _0x845f7e={};var _0x3e44d7;var _0x3eb66d;return db[_0x49c4('0x28')]['findOne']({'where':{'id':_0x2f966c[_0x49c4('0x4b')]['id']}})[_0x49c4('0x1e')](handleEntityNotFound(_0x147ebd,null))['then'](function(_0x10dec7){if(_0x10dec7){_0x3e44d7=_0x10dec7;_0x845f7e[_0x49c4('0x2a')]=_['keys'](db[_0x49c4('0x28')][_0x49c4('0x29')]);_0x845f7e['query']=_['keys'](_0x2f966c['query']);_0x845f7e['filters']=_[_0x49c4('0x2e')](_0x845f7e['model'],_0x845f7e[_0x49c4('0x2b')]);_0x2fe89a[_0x49c4('0x30')]=_['intersection'](_0x845f7e[_0x49c4('0x2a')],qs[_0x49c4('0x2f')](_0x2f966c['query'][_0x49c4('0x2f')]));_0x2fe89a[_0x49c4('0x30')]=_0x2fe89a[_0x49c4('0x30')][_0x49c4('0x31')]?_0x2fe89a['attributes']:_0x845f7e[_0x49c4('0x2a')];_0x2fe89a[_0x49c4('0x4e')]=qs[_0x49c4('0x34')](_0x2f966c[_0x49c4('0x2b')]['sort']);_0x2fe89a[_0x49c4('0x35')]=qs['filters'](_['pick'](_0x2f966c['query'],_0x845f7e['filters']));if(_0x2f966c[_0x49c4('0x2b')][_0x49c4('0x37')]){_0x2fe89a[_0x49c4('0x35')]=_[_0x49c4('0x38')](_0x2fe89a['where'],{'$or':_['map'](_0x2fe89a[_0x49c4('0x30')],function(_0x109b81){var _0x342326={};_0x342326[_0x109b81]={'$like':'%'+_0x2f966c[_0x49c4('0x2b')][_0x49c4('0x37')]+'%'};return _0x342326;})});}_0x2fe89a=_[_0x49c4('0x38')]({},_0x2fe89a,_0x2f966c[_0x49c4('0x42')]);return _0x3e44d7[_0x49c4('0x4f')](_0x2fe89a);}})['then'](function(_0x2276db){if(_0x2276db){_0x3eb66d=_0x2276db['length'];if(!_0x2f966c[_0x49c4('0x2b')][_0x49c4('0x50')](_0x49c4('0x32'))){_0x2fe89a[_0x49c4('0x33')]=qs[_0x49c4('0x33')](_0x2f966c[_0x49c4('0x2b')][_0x49c4('0x33')]);_0x2fe89a[_0x49c4('0x18')]=qs[_0x49c4('0x18')](_0x2f966c[_0x49c4('0x2b')][_0x49c4('0x18')]);}return _0x3e44d7[_0x49c4('0x4f')](_0x2fe89a);}})[_0x49c4('0x1e')](function(_0x14bd09){if(_0x14bd09){return _0x14bd09?{'count':_0x3eb66d,'rows':_0x14bd09}:null;}})[_0x49c4('0x1e')](respondWithResult(_0x147ebd,null))[_0x49c4('0x40')](handleError(_0x147ebd,null));};exports[_0x49c4('0x51')]=function(_0x3485c0,_0x4e1544,_0x5ec201){return db[_0x49c4('0x28')][_0x49c4('0x52')]({'where':{'id':_0x3485c0['params']['id']}})[_0x49c4('0x1e')](handleEntityNotFound(_0x4e1544,null))[_0x49c4('0x1e')](function(_0x2939fd){if(_0x2939fd){return db[_0x49c4('0x53')]['transaction'](function(_0x5a14a5){return db['Interval'][_0x49c4('0x1f')]({'where':{'IntervalId':_0x3485c0[_0x49c4('0x4b')]['id']},'transaction':_0x5a14a5})[_0x49c4('0x1e')](function(_0x2f4289){var _0x118fc4=_[_0x49c4('0x27')](_0x3485c0[_0x49c4('0x45')],function(_0x3692a4){delete _0x3692a4['id'];_0x3692a4[_0x49c4('0x4d')]=_0x3485c0['params']['id'];return _0x3692a4;});return db[_0x49c4('0x28')][_0x49c4('0x54')](_0x118fc4,{'transaction':_0x5a14a5});});})[_0x49c4('0x1e')](function(){return db['Interval'][_0x49c4('0x3e')]({'where':{'IntervalId':_0x3485c0[_0x49c4('0x4b')]['id']}});});}})[_0x49c4('0x1e')](respondWithResult(_0x4e1544,null))[_0x49c4('0x40')](handleError(_0x4e1544,null));};
\ No newline at end of file
+var _0x70e0=['findAll','rows','catch','show','keys','includeAll','include','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','find','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','addInterval','getIntervals','findOne','order','hasOwnProperty','addIntervals','transaction','IntervalId','bulkCreate','html-pdf','eml-format','rimraf','request-promise','moment','bluebird','mustache','path','to-csv','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/extensions/rewrite','end','status','json','offset','limit','set','apply','update','destroy','then','get','Intervals','sendStatus','stack','name','send','index','rawAttributes','fieldName','key','model','map','intersection','query','attributes','fields','length','sort','pick','filters','filter','merge','where','type','VIRTUAL','options','Interval','count'];(function(_0x2e53e1,_0x12aed1){var _0x3a23de=function(_0xd84699){while(--_0xd84699){_0x2e53e1['push'](_0x2e53e1['shift']());}};_0x3a23de(++_0x12aed1);}(_0x70e0,0x17b));var _0x070e=function(_0x2b5ba9,_0x269216){_0x2b5ba9=_0x2b5ba9-0x0;var _0x38dfef=_0x70e0[_0x2b5ba9];return _0x38dfef;};'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 as=require(_0x070e('0xf'));var hardwareService=require(_0x070e('0x10'));var logger=require(_0x070e('0x11'))(_0x070e('0x12'));var utils=require(_0x070e('0x13'));var config=require(_0x070e('0x14'));var db=require(_0x070e('0x15'))['db'];var extensions=require(_0x070e('0x16'));function respondWithStatusCode(_0x39d2b9,_0x5bf079){_0x5bf079=_0x5bf079||0xcc;return function(_0x2930b8){if(_0x2930b8){return _0x39d2b9['sendStatus'](_0x5bf079);}return _0x39d2b9['status'](_0x5bf079)[_0x070e('0x17')]();};}function respondWithResult(_0x56c7ba,_0x4a33d2){_0x4a33d2=_0x4a33d2||0xc8;return function(_0x5bae0f){if(_0x5bae0f){return _0x56c7ba[_0x070e('0x18')](_0x4a33d2)[_0x070e('0x19')](_0x5bae0f);}};}function respondWithFilteredResult(_0x51d14d,_0x5d3a38){return function(_0x373d86){if(_0x373d86){var _0xeae1a5=_0x373d86['count'],_0x180897=_0x5d3a38[_0x070e('0x1a')],_0x19d9da=_0x5d3a38[_0x070e('0x1a')]+_0x5d3a38[_0x070e('0x1b')],_0x5bc71e;if(_0x19d9da>=_0xeae1a5){_0x19d9da=_0xeae1a5;_0x5bc71e=0xc8;}else{_0x5bc71e=0xce;}_0x51d14d[_0x070e('0x18')](_0x5bc71e);return _0x51d14d[_0x070e('0x1c')]('Content-Range',_0x180897+'-'+_0x19d9da+'/'+_0xeae1a5)[_0x070e('0x19')](_0x373d86);}return null;};}function patchUpdates(_0x168dc6){return function(_0x1ad3de){try{jsonpatch[_0x070e('0x1d')](_0x1ad3de,_0x168dc6,!![]);}catch(_0x259893){return BPromise['reject'](_0x259893);}return _0x1ad3de['save']();};}function saveUpdates(_0x4e958f,_0x9907cf){return function(_0x3004f0){if(_0x3004f0){return _0x3004f0[_0x070e('0x1e')](_0x4e958f)['then'](function(_0x5b184){return _0x5b184;});}return null;};}function removeEntity(_0x5dc5d2,_0xf8dd5d){return function(_0x3f6985){if(_0x3f6985){return _0x3f6985[_0x070e('0x1f')]()[_0x070e('0x20')](function(){var _0x28a1c3=_0x3f6985[_0x070e('0x21')]({'plain':!![]});var _0xe405e=_0x070e('0x22');return db['UserProfileResource'][_0x070e('0x1f')]({'where':{'type':_0xe405e,'resourceId':_0x28a1c3['id']}})[_0x070e('0x20')](function(){return _0x3f6985;});})[_0x070e('0x20')](function(){_0x5dc5d2['status'](0xcc)[_0x070e('0x17')]();});}};}function handleEntityNotFound(_0x5f3e9d,_0x4a2dbd){return function(_0x2ccbd7){if(!_0x2ccbd7){_0x5f3e9d[_0x070e('0x23')](0x194);}return _0x2ccbd7;};}function handleError(_0x41deb1,_0x1743cc){_0x1743cc=_0x1743cc||0x1f4;return function(_0x4763c6){logger['error'](_0x4763c6[_0x070e('0x24')]);if(_0x4763c6[_0x070e('0x25')]){delete _0x4763c6[_0x070e('0x25')];}_0x41deb1[_0x070e('0x18')](_0x1743cc)[_0x070e('0x26')](_0x4763c6);};}exports[_0x070e('0x27')]=function(_0x1a1892,_0x26373b){var _0x5e8326={},_0x282344={},_0x351641={'count':0x0,'rows':[]};var _0x3a16d0=_['map'](db['Interval'][_0x070e('0x28')],function(_0x46065c){return{'name':_0x46065c[_0x070e('0x29')],'type':_0x46065c['type'][_0x070e('0x2a')]};});_0x282344[_0x070e('0x2b')]=_[_0x070e('0x2c')](_0x3a16d0,_0x070e('0x25'));_0x282344['query']=_['keys'](_0x1a1892['query']);_0x282344['filters']=_[_0x070e('0x2d')](_0x282344['model'],_0x282344[_0x070e('0x2e')]);_0x5e8326[_0x070e('0x2f')]=_['intersection'](_0x282344['model'],qs[_0x070e('0x30')](_0x1a1892[_0x070e('0x2e')]['fields']));_0x5e8326['attributes']=_0x5e8326[_0x070e('0x2f')][_0x070e('0x31')]?_0x5e8326[_0x070e('0x2f')]:_0x282344[_0x070e('0x2b')];if(!_0x1a1892[_0x070e('0x2e')]['hasOwnProperty']('nolimit')){_0x5e8326[_0x070e('0x1b')]=qs[_0x070e('0x1b')](_0x1a1892[_0x070e('0x2e')][_0x070e('0x1b')]);_0x5e8326[_0x070e('0x1a')]=qs['offset'](_0x1a1892[_0x070e('0x2e')][_0x070e('0x1a')]);}_0x5e8326['order']=qs[_0x070e('0x32')](_0x1a1892[_0x070e('0x2e')]['sort']);_0x5e8326['where']=qs['filters'](_[_0x070e('0x33')](_0x1a1892[_0x070e('0x2e')],_0x282344[_0x070e('0x34')]));if(_0x1a1892[_0x070e('0x2e')][_0x070e('0x35')]){_0x5e8326['where']=_[_0x070e('0x36')](_0x5e8326[_0x070e('0x37')],{'$or':_[_0x070e('0x2c')](_0x3a16d0,function(_0x487276){if(_0x487276[_0x070e('0x38')]!==_0x070e('0x39')){var _0x165c16={};_0x165c16[_0x487276['name']]={'$like':'%'+_0x1a1892[_0x070e('0x2e')][_0x070e('0x35')]+'%'};return _0x165c16;}})});}_0x5e8326=_['merge']({},_0x5e8326,_0x1a1892[_0x070e('0x3a')]);var _0x5d689b={'where':_0x5e8326[_0x070e('0x37')]};return db[_0x070e('0x3b')][_0x070e('0x3c')](_0x5d689b)[_0x070e('0x20')](function(_0xd03404){_0x351641['count']=_0xd03404;if(_0x1a1892[_0x070e('0x2e')]['includeAll']){_0x5e8326['include']=[{'all':!![]}];}return db[_0x070e('0x3b')][_0x070e('0x3d')](_0x5e8326);})[_0x070e('0x20')](function(_0x4d52ff){_0x351641[_0x070e('0x3e')]=_0x4d52ff;return _0x351641;})[_0x070e('0x20')](respondWithFilteredResult(_0x26373b,_0x5e8326))[_0x070e('0x3f')](handleError(_0x26373b,null));};exports[_0x070e('0x40')]=function(_0x4a4ee3,_0x13e4e0){var _0x5851ab={'raw':!![],'where':{'id':_0x4a4ee3['params']['id']}},_0x544b53={};_0x544b53[_0x070e('0x2b')]=_[_0x070e('0x41')](db[_0x070e('0x3b')][_0x070e('0x28')]);_0x544b53[_0x070e('0x2e')]=_['keys'](_0x4a4ee3[_0x070e('0x2e')]);_0x544b53['filters']=_[_0x070e('0x2d')](_0x544b53[_0x070e('0x2b')],_0x544b53[_0x070e('0x2e')]);_0x5851ab['attributes']=_['intersection'](_0x544b53[_0x070e('0x2b')],qs['fields'](_0x4a4ee3[_0x070e('0x2e')][_0x070e('0x30')]));_0x5851ab[_0x070e('0x2f')]=_0x5851ab['attributes'][_0x070e('0x31')]?_0x5851ab[_0x070e('0x2f')]:_0x544b53['model'];if(_0x4a4ee3['query'][_0x070e('0x42')]){_0x5851ab[_0x070e('0x43')]=[{'all':!![]}];}_0x5851ab=_[_0x070e('0x36')]({},_0x5851ab,_0x4a4ee3[_0x070e('0x3a')]);return db[_0x070e('0x3b')]['find'](_0x5851ab)[_0x070e('0x20')](handleEntityNotFound(_0x13e4e0,null))[_0x070e('0x20')](respondWithResult(_0x13e4e0,null))[_0x070e('0x3f')](handleError(_0x13e4e0,null));};exports[_0x070e('0x44')]=function(_0x79eaa0,_0xcd1c61){return db[_0x070e('0x3b')][_0x070e('0x44')](_0x79eaa0[_0x070e('0x45')],{})[_0x070e('0x20')](function(_0x210c4d){var _0x3be553=_0x79eaa0[_0x070e('0x46')][_0x070e('0x21')]({'plain':!![]});if(!_0x3be553)throw new Error(_0x070e('0x47'));if(_0x3be553['role']===_0x070e('0x46')){var _0xa7a41b=_0x210c4d[_0x070e('0x21')]({'plain':!![]});var _0x249e3f=_0x070e('0x22');return db[_0x070e('0x48')][_0x070e('0x49')]({'where':{'name':_0x249e3f,'userProfileId':_0x3be553[_0x070e('0x4a')]},'raw':!![]})[_0x070e('0x20')](function(_0x5744c5){if(_0x5744c5&&_0x5744c5[_0x070e('0x4b')]===0x0){return db['UserProfileResource'][_0x070e('0x44')]({'name':_0xa7a41b[_0x070e('0x25')],'resourceId':_0xa7a41b['id'],'type':_0x5744c5['name'],'sectionId':_0x5744c5['id']},{})[_0x070e('0x20')](function(){return _0x210c4d;});}else{return _0x210c4d;}})[_0x070e('0x3f')](function(_0x25466f){logger[_0x070e('0x4c')](_0x070e('0x4d'),_0x25466f);throw _0x25466f;});}return _0x210c4d;})[_0x070e('0x20')](respondWithResult(_0xcd1c61,0xc9))[_0x070e('0x3f')](handleError(_0xcd1c61,null));};exports['update']=function(_0x296978,_0x5bacbd){if(_0x296978['body']['id']){delete _0x296978[_0x070e('0x45')]['id'];}return db[_0x070e('0x3b')][_0x070e('0x49')]({'where':{'id':_0x296978[_0x070e('0x4e')]['id']}})[_0x070e('0x20')](handleEntityNotFound(_0x5bacbd,null))[_0x070e('0x20')](saveUpdates(_0x296978[_0x070e('0x45')],null))[_0x070e('0x20')](respondWithResult(_0x5bacbd,null))['catch'](handleError(_0x5bacbd,null));};exports[_0x070e('0x1f')]=function(_0x51d27d,_0x564d82){return db[_0x070e('0x3b')][_0x070e('0x49')]({'where':{'id':_0x51d27d['params']['id']}})[_0x070e('0x20')](handleEntityNotFound(_0x564d82,null))[_0x070e('0x20')](removeEntity(_0x564d82,null))[_0x070e('0x3f')](handleError(_0x564d82,null));};exports[_0x070e('0x4f')]=function(_0x1aacfc,_0x382ce3,_0x1b36cd){if(_0x1aacfc['body']['id']){delete _0x1aacfc['body']['id'];}return db['Interval'][_0x070e('0x49')]({'where':{'id':_0x1aacfc[_0x070e('0x4e')]['id']}})[_0x070e('0x20')](handleEntityNotFound(_0x382ce3,null))[_0x070e('0x20')](function(_0x5ac0b5){if(_0x5ac0b5){_0x1aacfc[_0x070e('0x45')]['IntervalId']=_0x5ac0b5['id'];return db[_0x070e('0x3b')][_0x070e('0x44')](_0x1aacfc[_0x070e('0x45')]);}})[_0x070e('0x20')](respondWithResult(_0x382ce3,null))[_0x070e('0x3f')](handleError(_0x382ce3,null));};exports[_0x070e('0x50')]=function(_0x5561ed,_0x20ff87,_0x18e8d0){var _0x8aaf00={};var _0x533431={};var _0x1d7873;var _0x1da803;return db['Interval'][_0x070e('0x51')]({'where':{'id':_0x5561ed['params']['id']}})[_0x070e('0x20')](handleEntityNotFound(_0x20ff87,null))['then'](function(_0x4cb86f){if(_0x4cb86f){_0x1d7873=_0x4cb86f;_0x533431['model']=_[_0x070e('0x41')](db[_0x070e('0x3b')][_0x070e('0x28')]);_0x533431[_0x070e('0x2e')]=_[_0x070e('0x41')](_0x5561ed[_0x070e('0x2e')]);_0x533431['filters']=_[_0x070e('0x2d')](_0x533431['model'],_0x533431[_0x070e('0x2e')]);_0x8aaf00['attributes']=_[_0x070e('0x2d')](_0x533431[_0x070e('0x2b')],qs['fields'](_0x5561ed[_0x070e('0x2e')]['fields']));_0x8aaf00[_0x070e('0x2f')]=_0x8aaf00[_0x070e('0x2f')][_0x070e('0x31')]?_0x8aaf00[_0x070e('0x2f')]:_0x533431[_0x070e('0x2b')];_0x8aaf00[_0x070e('0x52')]=qs[_0x070e('0x32')](_0x5561ed[_0x070e('0x2e')][_0x070e('0x32')]);_0x8aaf00[_0x070e('0x37')]=qs[_0x070e('0x34')](_[_0x070e('0x33')](_0x5561ed[_0x070e('0x2e')],_0x533431[_0x070e('0x34')]));if(_0x5561ed['query'][_0x070e('0x35')]){_0x8aaf00[_0x070e('0x37')]=_[_0x070e('0x36')](_0x8aaf00[_0x070e('0x37')],{'$or':_['map'](_0x8aaf00[_0x070e('0x2f')],function(_0x4e8e58){var _0x398f54={};_0x398f54[_0x4e8e58]={'$like':'%'+_0x5561ed[_0x070e('0x2e')][_0x070e('0x35')]+'%'};return _0x398f54;})});}_0x8aaf00=_[_0x070e('0x36')]({},_0x8aaf00,_0x5561ed['options']);return _0x1d7873[_0x070e('0x50')](_0x8aaf00);}})[_0x070e('0x20')](function(_0x240ec9){if(_0x240ec9){_0x1da803=_0x240ec9[_0x070e('0x31')];if(!_0x5561ed['query'][_0x070e('0x53')]('nolimit')){_0x8aaf00[_0x070e('0x1b')]=qs[_0x070e('0x1b')](_0x5561ed[_0x070e('0x2e')][_0x070e('0x1b')]);_0x8aaf00[_0x070e('0x1a')]=qs['offset'](_0x5561ed[_0x070e('0x2e')][_0x070e('0x1a')]);}return _0x1d7873[_0x070e('0x50')](_0x8aaf00);}})[_0x070e('0x20')](function(_0x5591dd){if(_0x5591dd){return _0x5591dd?{'count':_0x1da803,'rows':_0x5591dd}:null;}})[_0x070e('0x20')](respondWithResult(_0x20ff87,null))['catch'](handleError(_0x20ff87,null));};exports[_0x070e('0x54')]=function(_0x44e465,_0x1214d2,_0x57585e){return db[_0x070e('0x3b')]['findOne']({'where':{'id':_0x44e465[_0x070e('0x4e')]['id']}})['then'](handleEntityNotFound(_0x1214d2,null))[_0x070e('0x20')](function(_0x17b28c){if(_0x17b28c){return db['sequelize'][_0x070e('0x55')](function(_0x53f9a8){return db[_0x070e('0x3b')][_0x070e('0x1f')]({'where':{'IntervalId':_0x44e465['params']['id']},'transaction':_0x53f9a8})['then'](function(_0x29ee66){var _0x3022cd=_[_0x070e('0x2c')](_0x44e465[_0x070e('0x45')],function(_0x25f1d0){delete _0x25f1d0['id'];_0x25f1d0[_0x070e('0x56')]=_0x44e465[_0x070e('0x4e')]['id'];return _0x25f1d0;});return db[_0x070e('0x3b')][_0x070e('0x57')](_0x3022cd,{'transaction':_0x53f9a8});});})[_0x070e('0x20')](function(){return db[_0x070e('0x3b')][_0x070e('0x3d')]({'where':{'IntervalId':_0x44e465[_0x070e('0x4e')]['id']}});});}})['then'](respondWithResult(_0x1214d2,null))[_0x070e('0x3f')](handleError(_0x1214d2,null));};
\ No newline at end of file
diff --git a/server/api/interval/interval.model.js b/server/api/interval/interval.model.js
index f0f74f8..981823c 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 _0x0487=['util','../../config/logger','api','moment','bluebird','path','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports','define','Interval','rewrite','lodash'];(function(_0x122096,_0x60c295){var _0x3d1966=function(_0x3d569e){while(--_0x3d569e){_0x122096['push'](_0x122096['shift']());}};_0x3d1966(++_0x60c295);}(_0x0487,0x14f));var _0x7048=function(_0x308213,_0x224541){_0x308213=_0x308213-0x0;var _0x2e1619=_0x0487[_0x308213];return _0x2e1619;};'use strict';var _=require(_0x7048('0x0'));var util=require(_0x7048('0x1'));var logger=require(_0x7048('0x2'))(_0x7048('0x3'));var moment=require(_0x7048('0x4'));var BPromise=require(_0x7048('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7048('0x6'));var rimraf=require('rimraf');var config=require(_0x7048('0x7'));var attributes=require(_0x7048('0x8'));var extensions=require(_0x7048('0x9'));module[_0x7048('0xa')]=function(_0x53c160,_0x2aaedd){return _0x53c160[_0x7048('0xb')](_0x7048('0xc'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x40c685,_0x5c900b){extensions[_0x7048('0xd')](_0x53c160,_0x40c685);},'afterBulkCreate':function(_0x40fc92,_0x375f3a,_0x162940){_0x162940();extensions[_0x7048('0xd')](_0x53c160,_0x40fc92[0x0]);},'afterUpdate':function(_0x477512,_0x186cb3){extensions['rewrite'](_0x53c160,_0x477512);},'afterDestroy':function(_0x2eba6e,_0x164ed9){extensions[_0x7048('0xd')](_0x53c160,_0x2eba6e);}}});};
\ No newline at end of file
+var _0x9809=['request-promise','path','rimraf','../../config/environment','./interval.attributes','exports','define','tools_intervals','rewrite','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x5399bf,_0x3c697d){var _0x35f624=function(_0x431794){while(--_0x431794){_0x5399bf['push'](_0x5399bf['shift']());}};_0x35f624(++_0x3c697d);}(_0x9809,0x1da));var _0x9980=function(_0x103e46,_0x3377e9){_0x103e46=_0x103e46-0x0;var _0x3ed429=_0x9809[_0x103e46];return _0x3ed429;};'use strict';var _=require(_0x9980('0x0'));var util=require(_0x9980('0x1'));var logger=require(_0x9980('0x2'))(_0x9980('0x3'));var moment=require(_0x9980('0x4'));var BPromise=require(_0x9980('0x5'));var rp=require(_0x9980('0x6'));var fs=require('fs');var path=require(_0x9980('0x7'));var rimraf=require(_0x9980('0x8'));var config=require(_0x9980('0x9'));var attributes=require(_0x9980('0xa'));var extensions=require('../../components/extensions/rewrite');module[_0x9980('0xb')]=function(_0x477af4,_0x55914b){return _0x477af4[_0x9980('0xc')]('Interval',attributes,{'tableName':_0x9980('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x333a73,_0x4d545d){extensions[_0x9980('0xe')](_0x477af4,_0x333a73);},'afterBulkCreate':function(_0x2553c0,_0x2d893b,_0x29ec92){_0x29ec92();extensions[_0x9980('0xe')](_0x477af4,_0x2553c0[0x0]);},'afterUpdate':function(_0x3b118c,_0x119f9c){extensions[_0x9980('0xe')](_0x477af4,_0x3b118c);},'afterDestroy':function(_0x2f9459,_0x2d933b){extensions[_0x9980('0xe')](_0x477af4,_0x2f9459);}}});};
\ No newline at end of file
diff --git a/server/api/interval/interval.rpc.js b/server/api/interval/interval.rpc.js
index 4f020f2..acca11b 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 _0xec5c=['options','attributes','limit','include','model','map','then','ShowInterval','find','raw','where','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','Interval,\x20%s,\x20%s','request\x20sent','debug','Interval,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','GetInterval','Interval','findAll'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xec5c,0x13b));var _0xcec5=function(_0x2fd0f0,_0x4b634e){_0x2fd0f0=_0x2fd0f0-0x0;var _0x57f71a=_0xec5c[_0x2fd0f0];return _0x57f71a;};'use strict';var _=require(_0xcec5('0x0'));var util=require(_0xcec5('0x1'));var moment=require(_0xcec5('0x2'));var BPromise=require(_0xcec5('0x3'));var rs=require(_0xcec5('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xcec5('0x5'));var logger=require(_0xcec5('0x6'))(_0xcec5('0x7'));var config=require(_0xcec5('0x8'));var jayson=require(_0xcec5('0x9'));var client=jayson[_0xcec5('0xa')][_0xcec5('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1f21f6,_0x1ca190,_0x407a7c){return new BPromise(function(_0x5f2115,_0xb1df5d){return client[_0xcec5('0xc')](_0x1f21f6,_0x407a7c)['then'](function(_0x418f88){logger['info'](_0xcec5('0xd'),_0x1ca190,_0xcec5('0xe'));logger[_0xcec5('0xf')](_0xcec5('0x10'),_0x1ca190,_0xcec5('0xe'),JSON[_0xcec5('0x11')](_0x418f88));if(_0x418f88[_0xcec5('0x12')]){if(_0x418f88[_0xcec5('0x12')][_0xcec5('0x13')]===0x1f4){logger[_0xcec5('0x12')](_0xcec5('0xd'),_0x1ca190,_0x418f88[_0xcec5('0x12')]['message']);return _0xb1df5d(_0x418f88[_0xcec5('0x12')][_0xcec5('0x14')]);}logger[_0xcec5('0x12')](_0xcec5('0xd'),_0x1ca190,_0x418f88['error'][_0xcec5('0x14')]);return _0x5f2115(_0x418f88[_0xcec5('0x12')]['message']);}else{logger[_0xcec5('0x15')](_0xcec5('0xd'),_0x1ca190,_0xcec5('0xe'));_0x5f2115(_0x418f88[_0xcec5('0x16')][_0xcec5('0x14')]);}})[_0xcec5('0x17')](function(_0x1a2cac){logger[_0xcec5('0x12')](_0xcec5('0xd'),_0x1ca190,_0x1a2cac);_0xb1df5d(_0x1a2cac);});});}exports[_0xcec5('0x18')]=function(_0x4e6e6c){var _0x456331=this;return new Promise(function(_0xc891fb,_0x6d9d96){return db[_0xcec5('0x19')][_0xcec5('0x1a')]({'raw':_0x4e6e6c['options']?_0x4e6e6c[_0xcec5('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x4e6e6c[_0xcec5('0x1b')]?_0x4e6e6c[_0xcec5('0x1b')]['where']||null:null,'attributes':_0x4e6e6c[_0xcec5('0x1b')]?_0x4e6e6c[_0xcec5('0x1b')][_0xcec5('0x1c')]||null:null,'limit':_0x4e6e6c[_0xcec5('0x1b')]?_0x4e6e6c[_0xcec5('0x1b')][_0xcec5('0x1d')]||null:null,'include':_0x4e6e6c[_0xcec5('0x1b')]?_0x4e6e6c[_0xcec5('0x1b')][_0xcec5('0x1e')]?_['map'](_0x4e6e6c[_0xcec5('0x1b')][_0xcec5('0x1e')],function(_0x7b7a27){return{'model':db[_0x7b7a27[_0xcec5('0x1f')]],'as':_0x7b7a27['as'],'attributes':_0x7b7a27[_0xcec5('0x1c')],'include':_0x7b7a27[_0xcec5('0x1e')]?_[_0xcec5('0x20')](_0x7b7a27[_0xcec5('0x1e')],function(_0x315663){return{'model':db[_0x315663[_0xcec5('0x1f')]],'as':_0x315663['as'],'attributes':_0x315663[_0xcec5('0x1c')],'include':_0x315663['include']?_[_0xcec5('0x20')](_0x315663[_0xcec5('0x1e')],function(_0x53ab04){return{'model':db[_0x53ab04[_0xcec5('0x1f')]],'as':_0x53ab04['as'],'attributes':_0x53ab04[_0xcec5('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xcec5('0x21')](function(_0x4c7cdf){logger[_0xcec5('0x15')](_0xcec5('0x18'),_0x4e6e6c);logger[_0xcec5('0xf')](_0xcec5('0x18'),_0x4e6e6c,JSON['stringify'](_0x4c7cdf));_0xc891fb(_0x4c7cdf);})[_0xcec5('0x17')](function(_0x42bb4e){logger['error'](_0xcec5('0x18'),_0x42bb4e[_0xcec5('0x14')],_0x4e6e6c);_0x6d9d96(_0x456331[_0xcec5('0x12')](0x1f4,_0x42bb4e[_0xcec5('0x14')]));});});};exports[_0xcec5('0x22')]=function(_0x4af149){var _0x5bd76f=this;return new Promise(function(_0x550002,_0x1213f7){return db[_0xcec5('0x19')][_0xcec5('0x23')]({'raw':_0x4af149[_0xcec5('0x1b')]?_0x4af149[_0xcec5('0x1b')][_0xcec5('0x24')]===undefined?!![]:![]:!![],'where':_0x4af149[_0xcec5('0x1b')]?_0x4af149[_0xcec5('0x1b')][_0xcec5('0x25')]||null:null,'attributes':_0x4af149[_0xcec5('0x1b')]?_0x4af149['options']['attributes']||null:null,'include':_0x4af149['options']?_0x4af149[_0xcec5('0x1b')]['include']?_[_0xcec5('0x20')](_0x4af149[_0xcec5('0x1b')]['include'],function(_0x4bf688){return{'model':db[_0x4bf688[_0xcec5('0x1f')]],'as':_0x4bf688['as'],'attributes':_0x4bf688[_0xcec5('0x1c')],'include':_0x4bf688[_0xcec5('0x1e')]?_[_0xcec5('0x20')](_0x4bf688[_0xcec5('0x1e')],function(_0x5f1c2f){return{'model':db[_0x5f1c2f['model']],'as':_0x5f1c2f['as'],'attributes':_0x5f1c2f[_0xcec5('0x1c')],'include':_0x5f1c2f['include']?_['map'](_0x5f1c2f[_0xcec5('0x1e')],function(_0x16a48b){return{'model':db[_0x16a48b[_0xcec5('0x1f')]],'as':_0x16a48b['as'],'attributes':_0x16a48b[_0xcec5('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xcec5('0x21')](function(_0x545d74){logger[_0xcec5('0x15')]('ShowInterval',_0x4af149);logger['debug'](_0xcec5('0x22'),_0x4af149,JSON[_0xcec5('0x11')](_0x545d74));_0x550002(_0x545d74);})[_0xcec5('0x17')](function(_0x327863){logger['error'](_0xcec5('0x22'),_0x327863[_0xcec5('0x14')],_0x4af149);_0x1213f7(_0x5bd76f['error'](0x1f4,_0x327863[_0xcec5('0x14')]));});});};
\ No newline at end of file
+var _0xa1a6=['Interval,\x20%s,\x20%s','catch','GetInterval','Interval','findAll','options','raw','where','attributes','limit','map','include','then','stringify','ShowInterval','find','model','lodash','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','error','code','message'];(function(_0x580b15,_0x28afa4){var _0x1adb1b=function(_0x47a01f){while(--_0x47a01f){_0x580b15['push'](_0x580b15['shift']());}};_0x1adb1b(++_0x28afa4);}(_0xa1a6,0x165));var _0x6a1a=function(_0x178f52,_0x5d9675){_0x178f52=_0x178f52-0x0;var _0x556f99=_0xa1a6[_0x178f52];return _0x556f99;};'use strict';var _=require(_0x6a1a('0x0'));var util=require(_0x6a1a('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x6a1a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6a1a('0x3'))['db'];var utils=require(_0x6a1a('0x4'));var logger=require(_0x6a1a('0x5'))(_0x6a1a('0x6'));var config=require(_0x6a1a('0x7'));var jayson=require(_0x6a1a('0x8'));var client=jayson[_0x6a1a('0x9')][_0x6a1a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4d73fa,_0x30db00,_0x267014){return new BPromise(function(_0x55bfdd,_0x11c478){return client[_0x6a1a('0xb')](_0x4d73fa,_0x267014)['then'](function(_0x170ad1){logger[_0x6a1a('0xc')]('Interval,\x20%s,\x20%s',_0x30db00,_0x6a1a('0xd'));logger['debug']('Interval,\x20%s,\x20%s,\x20%s',_0x30db00,'request\x20sent',JSON['stringify'](_0x170ad1));if(_0x170ad1['error']){if(_0x170ad1[_0x6a1a('0xe')][_0x6a1a('0xf')]===0x1f4){logger[_0x6a1a('0xe')]('Interval,\x20%s,\x20%s',_0x30db00,_0x170ad1[_0x6a1a('0xe')][_0x6a1a('0x10')]);return _0x11c478(_0x170ad1[_0x6a1a('0xe')][_0x6a1a('0x10')]);}logger[_0x6a1a('0xe')](_0x6a1a('0x11'),_0x30db00,_0x170ad1['error'][_0x6a1a('0x10')]);return _0x55bfdd(_0x170ad1[_0x6a1a('0xe')]['message']);}else{logger[_0x6a1a('0xc')](_0x6a1a('0x11'),_0x30db00,_0x6a1a('0xd'));_0x55bfdd(_0x170ad1['result']['message']);}})[_0x6a1a('0x12')](function(_0x1fdba7){logger[_0x6a1a('0xe')]('Interval,\x20%s,\x20%s',_0x30db00,_0x1fdba7);_0x11c478(_0x1fdba7);});});}exports[_0x6a1a('0x13')]=function(_0x4e387a){var _0x207c4a=this;return new Promise(function(_0x48e86d,_0x16c7e6){return db[_0x6a1a('0x14')][_0x6a1a('0x15')]({'raw':_0x4e387a[_0x6a1a('0x16')]?_0x4e387a[_0x6a1a('0x16')][_0x6a1a('0x17')]===undefined?!![]:![]:!![],'where':_0x4e387a[_0x6a1a('0x16')]?_0x4e387a[_0x6a1a('0x16')][_0x6a1a('0x18')]||null:null,'attributes':_0x4e387a[_0x6a1a('0x16')]?_0x4e387a['options'][_0x6a1a('0x19')]||null:null,'limit':_0x4e387a[_0x6a1a('0x16')]?_0x4e387a['options'][_0x6a1a('0x1a')]||null:null,'include':_0x4e387a[_0x6a1a('0x16')]?_0x4e387a[_0x6a1a('0x16')]['include']?_[_0x6a1a('0x1b')](_0x4e387a['options'][_0x6a1a('0x1c')],function(_0x13cf65){return{'model':db[_0x13cf65['model']],'as':_0x13cf65['as'],'attributes':_0x13cf65[_0x6a1a('0x19')],'include':_0x13cf65[_0x6a1a('0x1c')]?_[_0x6a1a('0x1b')](_0x13cf65[_0x6a1a('0x1c')],function(_0x4318c3){return{'model':db[_0x4318c3['model']],'as':_0x4318c3['as'],'attributes':_0x4318c3['attributes'],'include':_0x4318c3[_0x6a1a('0x1c')]?_[_0x6a1a('0x1b')](_0x4318c3[_0x6a1a('0x1c')],function(_0x2b1068){return{'model':db[_0x2b1068['model']],'as':_0x2b1068['as'],'attributes':_0x2b1068[_0x6a1a('0x19')]};}):[]};}):[]};}):[]:[]})[_0x6a1a('0x1d')](function(_0x2edb4c){logger[_0x6a1a('0xc')]('GetInterval',_0x4e387a);logger['debug'](_0x6a1a('0x13'),_0x4e387a,JSON[_0x6a1a('0x1e')](_0x2edb4c));_0x48e86d(_0x2edb4c);})[_0x6a1a('0x12')](function(_0x46c7c6){logger[_0x6a1a('0xe')](_0x6a1a('0x13'),_0x46c7c6['message'],_0x4e387a);_0x16c7e6(_0x207c4a[_0x6a1a('0xe')](0x1f4,_0x46c7c6['message']));});});};exports[_0x6a1a('0x1f')]=function(_0x3a745f){var _0x5248ee=this;return new Promise(function(_0x59a3e4,_0x3f340b){return db[_0x6a1a('0x14')][_0x6a1a('0x20')]({'raw':_0x3a745f[_0x6a1a('0x16')]?_0x3a745f[_0x6a1a('0x16')][_0x6a1a('0x17')]===undefined?!![]:![]:!![],'where':_0x3a745f['options']?_0x3a745f['options'][_0x6a1a('0x18')]||null:null,'attributes':_0x3a745f['options']?_0x3a745f[_0x6a1a('0x16')][_0x6a1a('0x19')]||null:null,'include':_0x3a745f['options']?_0x3a745f['options'][_0x6a1a('0x1c')]?_[_0x6a1a('0x1b')](_0x3a745f['options'][_0x6a1a('0x1c')],function(_0x272c07){return{'model':db[_0x272c07[_0x6a1a('0x21')]],'as':_0x272c07['as'],'attributes':_0x272c07[_0x6a1a('0x19')],'include':_0x272c07[_0x6a1a('0x1c')]?_['map'](_0x272c07[_0x6a1a('0x1c')],function(_0x2e8927){return{'model':db[_0x2e8927[_0x6a1a('0x21')]],'as':_0x2e8927['as'],'attributes':_0x2e8927[_0x6a1a('0x19')],'include':_0x2e8927['include']?_[_0x6a1a('0x1b')](_0x2e8927['include'],function(_0xa1a7be){return{'model':db[_0xa1a7be[_0x6a1a('0x21')]],'as':_0xa1a7be['as'],'attributes':_0xa1a7be[_0x6a1a('0x19')]};}):[]};}):[]};}):[]:[]})[_0x6a1a('0x1d')](function(_0x278351){logger[_0x6a1a('0xc')](_0x6a1a('0x1f'),_0x3a745f);logger['debug'](_0x6a1a('0x1f'),_0x3a745f,JSON[_0x6a1a('0x1e')](_0x278351));_0x59a3e4(_0x278351);})['catch'](function(_0x3b2c1c){logger[_0x6a1a('0xe')](_0x6a1a('0x1f'),_0x3b2c1c[_0x6a1a('0x10')],_0x3a745f);_0x3f340b(_0x5248ee[_0x6a1a('0xe')](0x1f4,_0x3b2c1c[_0x6a1a('0x10')]));});});};
\ No newline at end of file
diff --git a/server/api/jira/index.js b/server/api/jira/index.js
index a5d7746..3597d2d 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 _0x70d1=['../../components/auth/service','./jira.controller','isAuthenticated','send','Router'];(function(_0x19fbc5,_0x5ad165){var _0x44135a=function(_0x19e767){while(--_0x19e767){_0x19fbc5['push'](_0x19fbc5['shift']());}};_0x44135a(++_0x5ad165);}(_0x70d1,0xbd));var _0x170d=function(_0x4f8b6a,_0x2ead69){_0x4f8b6a=_0x4f8b6a-0x0;var _0x192d31=_0x70d1[_0x4f8b6a];return _0x192d31;};'use strict';var express=require('express');var router=express[_0x170d('0x0')]();var auth=require(_0x170d('0x1'));var controller=require(_0x170d('0x2'));router['post']('/',auth[_0x170d('0x3')](),controller[_0x170d('0x4')]);module['exports']=router;
\ No newline at end of file
+var _0xa7a7=['./jira.controller','post','isAuthenticated','send','exports','../../components/auth/service'];(function(_0x2bb8df,_0x2e3dff){var _0x11f564=function(_0x1fef02){while(--_0x1fef02){_0x2bb8df['push'](_0x2bb8df['shift']());}};_0x11f564(++_0x2e3dff);}(_0xa7a7,0xad));var _0x7a7a=function(_0x4547d5,_0x91d898){_0x4547d5=_0x4547d5-0x0;var _0x81ad1f=_0xa7a7[_0x4547d5];return _0x81ad1f;};'use strict';var express=require('express');var router=express['Router']();var auth=require(_0x7a7a('0x0'));var controller=require(_0x7a7a('0x1'));router[_0x7a7a('0x2')]('/',auth[_0x7a7a('0x3')](),controller[_0x7a7a('0x4')]);module[_0x7a7a('0x5')]=router;
\ No newline at end of file
diff --git a/server/api/jira/jira.controller.js b/server/api/jira/jira.controller.js
index 1d035d1..cd2a72b 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 _0x345c=['description','issuetype','Bug','fields','customfield_11500','email','customfield_11501','oldToken','customfield_11502','newToken','name','customfield_10102','track.xcallymotion.com','/rest/api/2/issue','POST','application/json','Basic\x20','base64','stringify','setEncoding','utf8','data','end','status','statusCode','json','parse','error','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','write','openIssue','send','headers','x-forwarded-for','connection','remoteAddress','socket','body','bluebird','https','../../config/logger','api','support','key','summary','Report','\x20from\x20'];(function(_0xfa634c,_0x414e0e){var _0x73e478=function(_0xac2a51){while(--_0xac2a51){_0xfa634c['push'](_0xfa634c['shift']());}};_0x73e478(++_0x414e0e);}(_0x345c,0x147));var _0xc345=function(_0x34330d,_0x3584cc){_0x34330d=_0x34330d-0x0;var _0x9e2646=_0x345c[_0x34330d];return _0x9e2646;};'use strict';var BPromise=require(_0xc345('0x0'));var https=require(_0xc345('0x1'));var logger=require(_0xc345('0x2'))(_0xc345('0x3'));var USERNAME=_0xc345('0x4');var PASSWORD='3eAmWpBVP0';function openIssue(_0x3702c8,_0x29ef2b){var _0x33bcac={'fields':{'project':{'key':_0x3702c8[_0xc345('0x5')]||'MOTGUI'},'summary':(_0x3702c8[_0xc345('0x6')]||_0xc345('0x7'))+_0xc345('0x8')+_0x3702c8['ip'],'description':_0x3702c8[_0xc345('0x9')]||JSON['stringify'](_0x3702c8),'issuetype':{'name':_0x3702c8[_0xc345('0xa')]||_0xc345('0xb')}}};_0x33bcac[_0xc345('0xc')][_0xc345('0xd')]=_0x3702c8[_0xc345('0xe')];_0x33bcac[_0xc345('0xc')][_0xc345('0xf')]=_0x3702c8[_0xc345('0x10')];_0x33bcac[_0xc345('0xc')][_0xc345('0x11')]=_0x3702c8[_0xc345('0x12')];_0x33bcac[_0xc345('0xc')]['customfield_11503']=_0x3702c8[_0xc345('0x13')];_0x33bcac[_0xc345('0xc')]['customfield_11504']=_0x3702c8['reason'];_0x33bcac[_0xc345('0xc')][_0xc345('0x14')]=_0x3702c8['ip'];var _0x28c4a3={'host':_0xc345('0x15'),'port':0x1bb,'path':_0xc345('0x16'),'method':_0xc345('0x17'),'timeout':0x4e20,'headers':{'Content-Type':_0xc345('0x18'),'Authorization':_0xc345('0x19')+new Buffer(USERNAME+':'+PASSWORD)['toString'](_0xc345('0x1a'))}};var _0x359ace=JSON[_0xc345('0x1b')](_0x33bcac);var _0x3fa8fc=https['request'](_0x28c4a3,function(_0x370b32){_0x370b32[_0xc345('0x1c')](_0xc345('0x1d'));var _0x50728a='';_0x370b32['on'](_0xc345('0x1e'),function(_0x56a245){_0x50728a+=_0x56a245;});_0x370b32['on'](_0xc345('0x1f'),function(){if(_0x29ef2b){return _0x29ef2b[_0xc345('0x20')](_0x370b32[_0xc345('0x21')])[_0xc345('0x22')](JSON[_0xc345('0x23')](_0x50728a));}});});_0x3fa8fc['on'](_0xc345('0x24'),function(_0x3be1e2){if(_0x29ef2b){return _0x29ef2b[_0xc345('0x20')](0x1f4)[_0xc345('0x22')]({'errors':[{'message':_0xc345('0x25'),'type':_0xc345('0x26')}]});}});_0x3fa8fc[_0xc345('0x27')](_0x359ace);_0x3fa8fc['end']();}exports[_0xc345('0x28')]=openIssue;exports[_0xc345('0x29')]=function(_0x5e89c0,_0x2be6c8){_0x5e89c0['body']['ip']=_0x5e89c0[_0xc345('0x2a')][_0xc345('0x2b')]||_0x5e89c0[_0xc345('0x2c')][_0xc345('0x2d')]||_0x5e89c0[_0xc345('0x2e')][_0xc345('0x2d')]||_0x5e89c0['connection'][_0xc345('0x2e')]['remoteAddress'];return openIssue(_0x5e89c0[_0xc345('0x2f')],_0x2be6c8);};
\ No newline at end of file
+var _0xcd67=['utf8','end','status','statusCode','parse','error','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','write','openIssue','send','body','x-forwarded-for','connection','socket','remoteAddress','bluebird','https','../../config/logger','api','support','3eAmWpBVP0','MOTGUI','summary','\x20from\x20','description','stringify','Bug','customfield_11500','email','fields','customfield_11501','newToken','name','customfield_11504','reason','customfield_10102','track.xcallymotion.com','/rest/api/2/issue','POST','application/json','Basic\x20','toString','request','setEncoding'];(function(_0x3ee9b2,_0xa090bb){var _0x51ac3e=function(_0x8ba28d){while(--_0x8ba28d){_0x3ee9b2['push'](_0x3ee9b2['shift']());}};_0x51ac3e(++_0xa090bb);}(_0xcd67,0x11e));var _0x7cd6=function(_0x2f2bd8,_0x1638b5){_0x2f2bd8=_0x2f2bd8-0x0;var _0x30388a=_0xcd67[_0x2f2bd8];return _0x30388a;};'use strict';var BPromise=require(_0x7cd6('0x0'));var https=require(_0x7cd6('0x1'));var logger=require(_0x7cd6('0x2'))(_0x7cd6('0x3'));var USERNAME=_0x7cd6('0x4');var PASSWORD=_0x7cd6('0x5');function openIssue(_0x14c27c,_0x14a14d){var _0x59d874={'fields':{'project':{'key':_0x14c27c['key']||_0x7cd6('0x6')},'summary':(_0x14c27c[_0x7cd6('0x7')]||'Report')+_0x7cd6('0x8')+_0x14c27c['ip'],'description':_0x14c27c[_0x7cd6('0x9')]||JSON[_0x7cd6('0xa')](_0x14c27c),'issuetype':{'name':_0x14c27c['issuetype']||_0x7cd6('0xb')}}};_0x59d874['fields'][_0x7cd6('0xc')]=_0x14c27c[_0x7cd6('0xd')];_0x59d874[_0x7cd6('0xe')][_0x7cd6('0xf')]=_0x14c27c['oldToken'];_0x59d874[_0x7cd6('0xe')]['customfield_11502']=_0x14c27c[_0x7cd6('0x10')];_0x59d874['fields']['customfield_11503']=_0x14c27c[_0x7cd6('0x11')];_0x59d874[_0x7cd6('0xe')][_0x7cd6('0x12')]=_0x14c27c[_0x7cd6('0x13')];_0x59d874['fields'][_0x7cd6('0x14')]=_0x14c27c['ip'];var _0x5c7e94={'host':_0x7cd6('0x15'),'port':0x1bb,'path':_0x7cd6('0x16'),'method':_0x7cd6('0x17'),'timeout':0x4e20,'headers':{'Content-Type':_0x7cd6('0x18'),'Authorization':_0x7cd6('0x19')+new Buffer(USERNAME+':'+PASSWORD)[_0x7cd6('0x1a')]('base64')}};var _0x5a4374=JSON[_0x7cd6('0xa')](_0x59d874);var _0x382efc=https[_0x7cd6('0x1b')](_0x5c7e94,function(_0x19dc32){_0x19dc32[_0x7cd6('0x1c')](_0x7cd6('0x1d'));var _0x982912='';_0x19dc32['on']('data',function(_0xc45e97){_0x982912+=_0xc45e97;});_0x19dc32['on'](_0x7cd6('0x1e'),function(){if(_0x14a14d){return _0x14a14d[_0x7cd6('0x1f')](_0x19dc32[_0x7cd6('0x20')])['json'](JSON[_0x7cd6('0x21')](_0x982912));}});});_0x382efc['on'](_0x7cd6('0x22'),function(_0x4778dc){if(_0x14a14d){return _0x14a14d['status'](0x1f4)['json']({'errors':[{'message':_0x7cd6('0x23'),'type':_0x7cd6('0x24')}]});}});_0x382efc[_0x7cd6('0x25')](_0x5a4374);_0x382efc['end']();}exports[_0x7cd6('0x26')]=openIssue;exports[_0x7cd6('0x27')]=function(_0xd3282e,_0x35ce39){_0xd3282e[_0x7cd6('0x28')]['ip']=_0xd3282e['headers'][_0x7cd6('0x29')]||_0xd3282e[_0x7cd6('0x2a')]['remoteAddress']||_0xd3282e['socket']['remoteAddress']||_0xd3282e[_0x7cd6('0x2a')][_0x7cd6('0x2b')][_0x7cd6('0x2c')];return openIssue(_0xd3282e[_0x7cd6('0x28')],_0x35ce39);};
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/index.js b/server/api/jscriptyAnswerReport/index.js
index 8d6a162..3f31c38 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 _0x83f2=['isAuthenticated','/describe','describe','/:id','show','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./jscriptyAnswerReport.controller','get'];(function(_0x11a453,_0x548fb1){var _0x26e707=function(_0x10383b){while(--_0x10383b){_0x11a453['push'](_0x11a453['shift']());}};_0x26e707(++_0x548fb1);}(_0x83f2,0x137));var _0x283f=function(_0x3c3ebd,_0x324a30){_0x3c3ebd=_0x3c3ebd-0x0;var _0x383b2d=_0x83f2[_0x3c3ebd];return _0x383b2d;};'use strict';var multer=require(_0x283f('0x0'));var util=require(_0x283f('0x1'));var path=require(_0x283f('0x2'));var timeout=require(_0x283f('0x3'));var express=require('express');var router=express[_0x283f('0x4')]();var auth=require(_0x283f('0x5'));var interaction=require(_0x283f('0x6'));var config=require('../../config/environment');var controller=require(_0x283f('0x7'));router[_0x283f('0x8')]('/',auth[_0x283f('0x9')](),controller['index']);router[_0x283f('0x8')](_0x283f('0xa'),auth[_0x283f('0x9')](),controller[_0x283f('0xb')]);router['get'](_0x283f('0xc'),auth[_0x283f('0x9')](),controller[_0x283f('0xd')]);router[_0x283f('0xe')]('/',auth[_0x283f('0x9')](),controller[_0x283f('0xf')]);router['put'](_0x283f('0xc'),auth['isAuthenticated'](),controller[_0x283f('0x10')]);router[_0x283f('0x11')]('/:id',auth[_0x283f('0x9')](),controller[_0x283f('0x12')]);module[_0x283f('0x13')]=router;
\ No newline at end of file
+var _0x3b31=['put','/:id','update','delete','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../config/environment','./jscriptyAnswerReport.controller','get','isAuthenticated','index','/describe','describe','show','post'];(function(_0x3dc269,_0x48a7d5){var _0x4e9df7=function(_0x541ddf){while(--_0x541ddf){_0x3dc269['push'](_0x3dc269['shift']());}};_0x4e9df7(++_0x48a7d5);}(_0x3b31,0x182));var _0x13b3=function(_0x161835,_0x3788eb){_0x161835=_0x161835-0x0;var _0x199077=_0x3b31[_0x161835];return _0x199077;};'use strict';var multer=require(_0x13b3('0x0'));var util=require('util');var path=require(_0x13b3('0x1'));var timeout=require(_0x13b3('0x2'));var express=require(_0x13b3('0x3'));var router=express['Router']();var auth=require(_0x13b3('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x13b3('0x5'));var controller=require(_0x13b3('0x6'));router[_0x13b3('0x7')]('/',auth[_0x13b3('0x8')](),controller[_0x13b3('0x9')]);router[_0x13b3('0x7')](_0x13b3('0xa'),auth['isAuthenticated'](),controller[_0x13b3('0xb')]);router[_0x13b3('0x7')]('/:id',auth[_0x13b3('0x8')](),controller[_0x13b3('0xc')]);router[_0x13b3('0xd')]('/',auth[_0x13b3('0x8')](),controller['create']);router[_0x13b3('0xe')](_0x13b3('0xf'),auth['isAuthenticated'](),controller[_0x13b3('0x10')]);router[_0x13b3('0x11')](_0x13b3('0xf'),auth[_0x13b3('0x8')](),controller[_0x13b3('0x12')]);module[_0x13b3('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 cc99b02..e789b16 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 _0xc11e=['STRING','TEXT','sequelize','exports'];(function(_0x18dd84,_0x5f2ba0){var _0x5e740c=function(_0x388c69){while(--_0x388c69){_0x18dd84['push'](_0x18dd84['shift']());}};_0x5e740c(++_0x5f2ba0);}(_0xc11e,0x1a6));var _0xec11=function(_0x34a118,_0xbff87c){_0x34a118=_0x34a118-0x0;var _0x18f5ed=_0xc11e[_0x34a118];return _0x18f5ed;};'use strict';var Sequelize=require(_0xec11('0x0'));module[_0xec11('0x1')]={'question':{'type':Sequelize[_0xec11('0x2')]},'answer':{'type':Sequelize[_0xec11('0x3')]('long')},'membername':{'type':Sequelize[_0xec11('0x2')]},'projectname':{'type':Sequelize[_0xec11('0x2')]},'queue':{'type':Sequelize[_0xec11('0x2')]},'uniqueid':{'type':Sequelize[_0xec11('0x2')]},'calleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xec11('0x2')]},'questionId':{'type':Sequelize[_0xec11('0x2')]}};
\ No newline at end of file
+var _0x66f5=['long','STRING','sequelize','exports'];(function(_0x287059,_0x499940){var _0x225c79=function(_0x3aa36e){while(--_0x3aa36e){_0x287059['push'](_0x287059['shift']());}};_0x225c79(++_0x499940);}(_0x66f5,0x1f2));var _0x566f=function(_0x165230,_0x10f019){_0x165230=_0x165230-0x0;var _0x3cc4e7=_0x66f5[_0x165230];return _0x3cc4e7;};'use strict';var Sequelize=require(_0x566f('0x0'));module[_0x566f('0x1')]={'question':{'type':Sequelize['STRING']},'answer':{'type':Sequelize['TEXT'](_0x566f('0x2'))},'membername':{'type':Sequelize[_0x566f('0x3')]},'projectname':{'type':Sequelize[_0x566f('0x3')]},'queue':{'type':Sequelize[_0x566f('0x3')]},'uniqueid':{'type':Sequelize[_0x566f('0x3')]},'calleridname':{'type':Sequelize[_0x566f('0x3')]},'calleridnum':{'type':Sequelize[_0x566f('0x3')]},'questionId':{'type':Sequelize[_0x566f('0x3')]}};
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js
index 12010c7..2e34eed 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 _0xa77e=['crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','limit','reject','save','update','end','error','stack','name','index','map','JscriptyAnswerReport','fieldName','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','where','filter','merge','VIRTUAL','options','then','includeAll','findAll','catch','show','params','keys','rawAttributes','include','create','body','find','destroy','describe','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash'];(function(_0x3e0078,_0x4fd8db){var _0x5e0e51=function(_0x41043b){while(--_0x41043b){_0x3e0078['push'](_0x3e0078['shift']());}};_0x5e0e51(++_0x4fd8db);}(_0xa77e,0x197));var _0xea77=function(_0x150409,_0x54ee98){_0x150409=_0x150409-0x0;var _0x5a395b=_0xa77e[_0x150409];return _0x5a395b;};'use strict';var pdf=require(_0xea77('0x0'));var emlformat=require(_0xea77('0x1'));var rimraf=require(_0xea77('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xea77('0x3'));var rp=require(_0xea77('0x4'));var moment=require(_0xea77('0x5'));var BPromise=require(_0xea77('0x6'));var Mustache=require(_0xea77('0x7'));var util=require(_0xea77('0x8'));var path=require(_0xea77('0x9'));var sox=require('sox');var csv=require(_0xea77('0xa'));var ejs=require(_0xea77('0xb'));var fs=require('fs');var _=require(_0xea77('0xc'));var squel=require('squel');var crypto=require(_0xea77('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xea77('0xe'));var toCsv=require(_0xea77('0xa'));var querystring=require('querystring');var Papa=require(_0xea77('0xf'));var Redis=require(_0xea77('0x10'));var authService=require(_0xea77('0x11'));var qs=require(_0xea77('0x12'));var as=require(_0xea77('0x13'));var hardwareService=require(_0xea77('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0xea77('0x15'));var config=require(_0xea77('0x16'));var db=require(_0xea77('0x17'))['db'];function respondWithStatusCode(_0x3f89d8,_0x13dbaf){_0x13dbaf=_0x13dbaf||0xcc;return function(_0x1c6b55){if(_0x1c6b55){return _0x3f89d8[_0xea77('0x18')](_0x13dbaf);}return _0x3f89d8['status'](_0x13dbaf)['end']();};}function respondWithResult(_0x17cdcf,_0x5c0f4e){_0x5c0f4e=_0x5c0f4e||0xc8;return function(_0x155a62){if(_0x155a62){return _0x17cdcf[_0xea77('0x19')](_0x5c0f4e)[_0xea77('0x1a')](_0x155a62);}};}function respondWithFilteredResult(_0x6864de,_0x1ddf3e){return function(_0x3a2909){if(_0x3a2909){var _0x1053a4=_0x3a2909[_0xea77('0x1b')],_0x5381c2=_0x1ddf3e[_0xea77('0x1c')],_0xa96498=_0x1ddf3e['offset']+_0x1ddf3e[_0xea77('0x1d')],_0x1bc790;if(_0xa96498>=_0x1053a4){_0xa96498=_0x1053a4;_0x1bc790=0xc8;}else{_0x1bc790=0xce;}_0x6864de[_0xea77('0x19')](_0x1bc790);return _0x6864de['set']('Content-Range',_0x5381c2+'-'+_0xa96498+'/'+_0x1053a4)[_0xea77('0x1a')](_0x3a2909);}return null;};}function patchUpdates(_0x4902c2){return function(_0x104521){try{jsonpatch['apply'](_0x104521,_0x4902c2,!![]);}catch(_0x4a7baa){return BPromise[_0xea77('0x1e')](_0x4a7baa);}return _0x104521[_0xea77('0x1f')]();};}function saveUpdates(_0x4490e8,_0x4b6eee){return function(_0x3a2fae){if(_0x3a2fae){return _0x3a2fae[_0xea77('0x20')](_0x4490e8)['then'](function(_0x2e21f0){return _0x2e21f0;});}return null;};}function removeEntity(_0x335445,_0x3a1e54){return function(_0x42eee0){if(_0x42eee0){return _0x42eee0['destroy']()['then'](function(){_0x335445[_0xea77('0x19')](0xcc)[_0xea77('0x21')]();});}};}function handleEntityNotFound(_0x3031ba,_0x163244){return function(_0x36a429){if(!_0x36a429){_0x3031ba[_0xea77('0x18')](0x194);}return _0x36a429;};}function handleError(_0x1a915a,_0x2d7df0){_0x2d7df0=_0x2d7df0||0x1f4;return function(_0x7f4fde){logger[_0xea77('0x22')](_0x7f4fde[_0xea77('0x23')]);if(_0x7f4fde[_0xea77('0x24')]){delete _0x7f4fde[_0xea77('0x24')];}_0x1a915a[_0xea77('0x19')](_0x2d7df0)['send'](_0x7f4fde);};}exports[_0xea77('0x25')]=function(_0x43d45e,_0x4adf71){var _0x2c4b42={},_0xecbf1b={},_0x3804b3={'count':0x0,'rows':[]};var _0x4d43fb=_[_0xea77('0x26')](db[_0xea77('0x27')]['rawAttributes'],function(_0xb447a0){return{'name':_0xb447a0[_0xea77('0x28')],'type':_0xb447a0['type'][_0xea77('0x29')]};});_0xecbf1b[_0xea77('0x2a')]=_['map'](_0x4d43fb,_0xea77('0x24'));_0xecbf1b[_0xea77('0x2b')]=_['keys'](_0x43d45e[_0xea77('0x2b')]);_0xecbf1b[_0xea77('0x2c')]=_[_0xea77('0x2d')](_0xecbf1b[_0xea77('0x2a')],_0xecbf1b[_0xea77('0x2b')]);_0x2c4b42[_0xea77('0x2e')]=_[_0xea77('0x2d')](_0xecbf1b[_0xea77('0x2a')],qs[_0xea77('0x2f')](_0x43d45e[_0xea77('0x2b')][_0xea77('0x2f')]));_0x2c4b42[_0xea77('0x2e')]=_0x2c4b42['attributes'][_0xea77('0x30')]?_0x2c4b42[_0xea77('0x2e')]:_0xecbf1b[_0xea77('0x2a')];if(!_0x43d45e['query'][_0xea77('0x31')]('nolimit')){_0x2c4b42[_0xea77('0x1d')]=qs[_0xea77('0x1d')](_0x43d45e[_0xea77('0x2b')][_0xea77('0x1d')]);_0x2c4b42[_0xea77('0x1c')]=qs[_0xea77('0x1c')](_0x43d45e[_0xea77('0x2b')][_0xea77('0x1c')]);}_0x2c4b42[_0xea77('0x32')]=qs['sort'](_0x43d45e[_0xea77('0x2b')]['sort']);_0x2c4b42[_0xea77('0x33')]=qs[_0xea77('0x2c')](_['pick'](_0x43d45e[_0xea77('0x2b')],_0xecbf1b[_0xea77('0x2c')]));if(_0x43d45e[_0xea77('0x2b')][_0xea77('0x34')]){_0x2c4b42[_0xea77('0x33')]=_[_0xea77('0x35')](_0x2c4b42[_0xea77('0x33')],{'$or':_[_0xea77('0x26')](_0x4d43fb,function(_0x1f32bf){if(_0x1f32bf['type']!==_0xea77('0x36')){var _0x444e8d={};_0x444e8d[_0x1f32bf[_0xea77('0x24')]]={'$like':'%'+_0x43d45e['query'][_0xea77('0x34')]+'%'};return _0x444e8d;}})});}_0x2c4b42=_['merge']({},_0x2c4b42,_0x43d45e[_0xea77('0x37')]);var _0x482a6f={'where':_0x2c4b42[_0xea77('0x33')]};return db[_0xea77('0x27')][_0xea77('0x1b')](_0x482a6f)[_0xea77('0x38')](function(_0x99079c){_0x3804b3[_0xea77('0x1b')]=_0x99079c;if(_0x43d45e[_0xea77('0x2b')][_0xea77('0x39')]){_0x2c4b42['include']=[{'all':!![]}];}return db[_0xea77('0x27')][_0xea77('0x3a')](_0x2c4b42);})[_0xea77('0x38')](function(_0x3ecd16){_0x3804b3['rows']=_0x3ecd16;return _0x3804b3;})['then'](respondWithFilteredResult(_0x4adf71,_0x2c4b42))[_0xea77('0x3b')](handleError(_0x4adf71,null));};exports[_0xea77('0x3c')]=function(_0x536bcf,_0x704019){var _0x1bddd3={'raw':!![],'where':{'id':_0x536bcf[_0xea77('0x3d')]['id']}},_0x31d869={};_0x31d869['model']=_[_0xea77('0x3e')](db[_0xea77('0x27')][_0xea77('0x3f')]);_0x31d869[_0xea77('0x2b')]=_['keys'](_0x536bcf['query']);_0x31d869[_0xea77('0x2c')]=_[_0xea77('0x2d')](_0x31d869[_0xea77('0x2a')],_0x31d869[_0xea77('0x2b')]);_0x1bddd3[_0xea77('0x2e')]=_[_0xea77('0x2d')](_0x31d869[_0xea77('0x2a')],qs['fields'](_0x536bcf['query'][_0xea77('0x2f')]));_0x1bddd3[_0xea77('0x2e')]=_0x1bddd3[_0xea77('0x2e')][_0xea77('0x30')]?_0x1bddd3[_0xea77('0x2e')]:_0x31d869['model'];if(_0x536bcf['query'][_0xea77('0x39')]){_0x1bddd3[_0xea77('0x40')]=[{'all':!![]}];}_0x1bddd3=_[_0xea77('0x35')]({},_0x1bddd3,_0x536bcf[_0xea77('0x37')]);return db[_0xea77('0x27')]['find'](_0x1bddd3)[_0xea77('0x38')](handleEntityNotFound(_0x704019,null))['then'](respondWithResult(_0x704019,null))['catch'](handleError(_0x704019,null));};exports[_0xea77('0x41')]=function(_0x526bf1,_0x5b62a5){return db[_0xea77('0x27')]['create'](_0x526bf1[_0xea77('0x42')],{})[_0xea77('0x38')](respondWithResult(_0x5b62a5,0xc9))['catch'](handleError(_0x5b62a5,null));};exports[_0xea77('0x20')]=function(_0x5e3096,_0x3a3d89){if(_0x5e3096[_0xea77('0x42')]['id']){delete _0x5e3096[_0xea77('0x42')]['id'];}return db[_0xea77('0x27')][_0xea77('0x43')]({'where':{'id':_0x5e3096[_0xea77('0x3d')]['id']}})[_0xea77('0x38')](handleEntityNotFound(_0x3a3d89,null))[_0xea77('0x38')](saveUpdates(_0x5e3096[_0xea77('0x42')],null))[_0xea77('0x38')](respondWithResult(_0x3a3d89,null))[_0xea77('0x3b')](handleError(_0x3a3d89,null));};exports[_0xea77('0x44')]=function(_0x449a52,_0x2e3822){return db[_0xea77('0x27')][_0xea77('0x43')]({'where':{'id':_0x449a52[_0xea77('0x3d')]['id']}})[_0xea77('0x38')](handleEntityNotFound(_0x2e3822,null))[_0xea77('0x38')](removeEntity(_0x2e3822,null))[_0xea77('0x3b')](handleError(_0x2e3822,null));};exports[_0xea77('0x45')]=function(_0x321ec7,_0x1be08f){return db['JscriptyAnswerReport'][_0xea77('0x45')]()[_0xea77('0x38')](respondWithResult(_0x1be08f,null))[_0xea77('0x3b')](handleError(_0x1be08f,null));};
\ No newline at end of file
+var _0xb838=['nolimit','order','sort','where','filter','type','VIRTUAL','merge','JscriptyAnswerReport','count','include','findAll','rows','catch','show','params','includeAll','options','create','body','find','destroy','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','Content-Range','apply','reject','save','update','then','name','send','index','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0xe2d14f,_0x49fd0e){var _0x4522d2=function(_0x1bf09a){while(--_0x1bf09a){_0xe2d14f['push'](_0xe2d14f['shift']());}};_0x4522d2(++_0x49fd0e);}(_0xb838,0x14b));var _0x8b83=function(_0x3bd303,_0x4d74e0){_0x3bd303=_0x3bd303-0x0;var _0x4e1b05=_0xb838[_0x3bd303];return _0x4e1b05;};'use strict';var pdf=require(_0x8b83('0x0'));var emlformat=require(_0x8b83('0x1'));var rimraf=require(_0x8b83('0x2'));var zipdir=require(_0x8b83('0x3'));var jsonpatch=require(_0x8b83('0x4'));var rp=require(_0x8b83('0x5'));var moment=require(_0x8b83('0x6'));var BPromise=require(_0x8b83('0x7'));var Mustache=require(_0x8b83('0x8'));var util=require(_0x8b83('0x9'));var path=require(_0x8b83('0xa'));var sox=require(_0x8b83('0xb'));var csv=require(_0x8b83('0xc'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x8b83('0xd'));var squel=require('squel');var crypto=require(_0x8b83('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x8b83('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x8b83('0x10'));var Redis=require(_0x8b83('0x11'));var authService=require(_0x8b83('0x12'));var qs=require(_0x8b83('0x13'));var as=require(_0x8b83('0x14'));var hardwareService=require(_0x8b83('0x15'));var logger=require('../../config/logger')(_0x8b83('0x16'));var utils=require(_0x8b83('0x17'));var config=require(_0x8b83('0x18'));var db=require(_0x8b83('0x19'))['db'];function respondWithStatusCode(_0x193663,_0x41faee){_0x41faee=_0x41faee||0xcc;return function(_0x1df688){if(_0x1df688){return _0x193663[_0x8b83('0x1a')](_0x41faee);}return _0x193663[_0x8b83('0x1b')](_0x41faee)[_0x8b83('0x1c')]();};}function respondWithResult(_0x4502d0,_0x238b99){_0x238b99=_0x238b99||0xc8;return function(_0x352a4d){if(_0x352a4d){return _0x4502d0['status'](_0x238b99)[_0x8b83('0x1d')](_0x352a4d);}};}function respondWithFilteredResult(_0x406517,_0x5bfa7e){return function(_0xd19fa5){if(_0xd19fa5){var _0x514382=_0xd19fa5['count'],_0x4ed029=_0x5bfa7e['offset'],_0x1db97f=_0x5bfa7e[_0x8b83('0x1e')]+_0x5bfa7e[_0x8b83('0x1f')],_0x57919d;if(_0x1db97f>=_0x514382){_0x1db97f=_0x514382;_0x57919d=0xc8;}else{_0x57919d=0xce;}_0x406517[_0x8b83('0x1b')](_0x57919d);return _0x406517['set'](_0x8b83('0x20'),_0x4ed029+'-'+_0x1db97f+'/'+_0x514382)['json'](_0xd19fa5);}return null;};}function patchUpdates(_0x2b5406){return function(_0x49f4e9){try{jsonpatch[_0x8b83('0x21')](_0x49f4e9,_0x2b5406,!![]);}catch(_0x12b219){return BPromise[_0x8b83('0x22')](_0x12b219);}return _0x49f4e9[_0x8b83('0x23')]();};}function saveUpdates(_0x1d69fa,_0x45774c){return function(_0xe8eb68){if(_0xe8eb68){return _0xe8eb68[_0x8b83('0x24')](_0x1d69fa)[_0x8b83('0x25')](function(_0xdef204){return _0xdef204;});}return null;};}function removeEntity(_0x3e1e1c,_0x5b83d2){return function(_0x4cbe4f){if(_0x4cbe4f){return _0x4cbe4f['destroy']()[_0x8b83('0x25')](function(){_0x3e1e1c[_0x8b83('0x1b')](0xcc)[_0x8b83('0x1c')]();});}};}function handleEntityNotFound(_0x40548b,_0x2bd977){return function(_0x224473){if(!_0x224473){_0x40548b['sendStatus'](0x194);}return _0x224473;};}function handleError(_0x81c677,_0x1463b4){_0x1463b4=_0x1463b4||0x1f4;return function(_0x31158f){logger['error'](_0x31158f['stack']);if(_0x31158f['name']){delete _0x31158f[_0x8b83('0x26')];}_0x81c677[_0x8b83('0x1b')](_0x1463b4)[_0x8b83('0x27')](_0x31158f);};}exports[_0x8b83('0x28')]=function(_0x2d7648,_0xc1da56){var _0x3eb22e={},_0x37961f={},_0x2e6e98={'count':0x0,'rows':[]};var _0x4bd1cc=_[_0x8b83('0x29')](db['JscriptyAnswerReport'][_0x8b83('0x2a')],function(_0x240ea5){return{'name':_0x240ea5[_0x8b83('0x2b')],'type':_0x240ea5['type'][_0x8b83('0x2c')]};});_0x37961f[_0x8b83('0x2d')]=_['map'](_0x4bd1cc,_0x8b83('0x26'));_0x37961f[_0x8b83('0x2e')]=_[_0x8b83('0x2f')](_0x2d7648['query']);_0x37961f[_0x8b83('0x30')]=_[_0x8b83('0x31')](_0x37961f[_0x8b83('0x2d')],_0x37961f[_0x8b83('0x2e')]);_0x3eb22e[_0x8b83('0x32')]=_[_0x8b83('0x31')](_0x37961f[_0x8b83('0x2d')],qs[_0x8b83('0x33')](_0x2d7648[_0x8b83('0x2e')]['fields']));_0x3eb22e['attributes']=_0x3eb22e['attributes'][_0x8b83('0x34')]?_0x3eb22e['attributes']:_0x37961f[_0x8b83('0x2d')];if(!_0x2d7648[_0x8b83('0x2e')][_0x8b83('0x35')](_0x8b83('0x36'))){_0x3eb22e['limit']=qs[_0x8b83('0x1f')](_0x2d7648[_0x8b83('0x2e')][_0x8b83('0x1f')]);_0x3eb22e['offset']=qs['offset'](_0x2d7648[_0x8b83('0x2e')][_0x8b83('0x1e')]);}_0x3eb22e[_0x8b83('0x37')]=qs['sort'](_0x2d7648[_0x8b83('0x2e')][_0x8b83('0x38')]);_0x3eb22e[_0x8b83('0x39')]=qs['filters'](_['pick'](_0x2d7648['query'],_0x37961f[_0x8b83('0x30')]));if(_0x2d7648[_0x8b83('0x2e')][_0x8b83('0x3a')]){_0x3eb22e[_0x8b83('0x39')]=_['merge'](_0x3eb22e[_0x8b83('0x39')],{'$or':_['map'](_0x4bd1cc,function(_0xcae600){if(_0xcae600[_0x8b83('0x3b')]!==_0x8b83('0x3c')){var _0x125120={};_0x125120[_0xcae600[_0x8b83('0x26')]]={'$like':'%'+_0x2d7648[_0x8b83('0x2e')]['filter']+'%'};return _0x125120;}})});}_0x3eb22e=_[_0x8b83('0x3d')]({},_0x3eb22e,_0x2d7648['options']);var _0x2cadce={'where':_0x3eb22e[_0x8b83('0x39')]};return db[_0x8b83('0x3e')][_0x8b83('0x3f')](_0x2cadce)[_0x8b83('0x25')](function(_0x34137c){_0x2e6e98[_0x8b83('0x3f')]=_0x34137c;if(_0x2d7648['query']['includeAll']){_0x3eb22e[_0x8b83('0x40')]=[{'all':!![]}];}return db[_0x8b83('0x3e')][_0x8b83('0x41')](_0x3eb22e);})[_0x8b83('0x25')](function(_0x503292){_0x2e6e98[_0x8b83('0x42')]=_0x503292;return _0x2e6e98;})[_0x8b83('0x25')](respondWithFilteredResult(_0xc1da56,_0x3eb22e))[_0x8b83('0x43')](handleError(_0xc1da56,null));};exports[_0x8b83('0x44')]=function(_0x435223,_0x450c60){var _0x39c531={'raw':!![],'where':{'id':_0x435223[_0x8b83('0x45')]['id']}},_0x57e28e={};_0x57e28e['model']=_[_0x8b83('0x2f')](db[_0x8b83('0x3e')][_0x8b83('0x2a')]);_0x57e28e[_0x8b83('0x2e')]=_[_0x8b83('0x2f')](_0x435223[_0x8b83('0x2e')]);_0x57e28e[_0x8b83('0x30')]=_[_0x8b83('0x31')](_0x57e28e['model'],_0x57e28e[_0x8b83('0x2e')]);_0x39c531[_0x8b83('0x32')]=_[_0x8b83('0x31')](_0x57e28e[_0x8b83('0x2d')],qs[_0x8b83('0x33')](_0x435223[_0x8b83('0x2e')][_0x8b83('0x33')]));_0x39c531[_0x8b83('0x32')]=_0x39c531['attributes'][_0x8b83('0x34')]?_0x39c531[_0x8b83('0x32')]:_0x57e28e[_0x8b83('0x2d')];if(_0x435223[_0x8b83('0x2e')][_0x8b83('0x46')]){_0x39c531[_0x8b83('0x40')]=[{'all':!![]}];}_0x39c531=_[_0x8b83('0x3d')]({},_0x39c531,_0x435223[_0x8b83('0x47')]);return db['JscriptyAnswerReport']['find'](_0x39c531)[_0x8b83('0x25')](handleEntityNotFound(_0x450c60,null))[_0x8b83('0x25')](respondWithResult(_0x450c60,null))['catch'](handleError(_0x450c60,null));};exports[_0x8b83('0x48')]=function(_0x292e83,_0x3111ea){return db['JscriptyAnswerReport'][_0x8b83('0x48')](_0x292e83[_0x8b83('0x49')],{})[_0x8b83('0x25')](respondWithResult(_0x3111ea,0xc9))[_0x8b83('0x43')](handleError(_0x3111ea,null));};exports[_0x8b83('0x24')]=function(_0x20fde5,_0xdd6af0){if(_0x20fde5[_0x8b83('0x49')]['id']){delete _0x20fde5[_0x8b83('0x49')]['id'];}return db['JscriptyAnswerReport'][_0x8b83('0x4a')]({'where':{'id':_0x20fde5[_0x8b83('0x45')]['id']}})[_0x8b83('0x25')](handleEntityNotFound(_0xdd6af0,null))[_0x8b83('0x25')](saveUpdates(_0x20fde5['body'],null))['then'](respondWithResult(_0xdd6af0,null))[_0x8b83('0x43')](handleError(_0xdd6af0,null));};exports[_0x8b83('0x4b')]=function(_0x8802a0,_0x55b734){return db['JscriptyAnswerReport'][_0x8b83('0x4a')]({'where':{'id':_0x8802a0['params']['id']}})[_0x8b83('0x25')](handleEntityNotFound(_0x55b734,null))['then'](removeEntity(_0x55b734,null))[_0x8b83('0x43')](handleError(_0x55b734,null));};exports[_0x8b83('0x4c')]=function(_0x3a9af6,_0x5da80c){return db[_0x8b83('0x3e')][_0x8b83('0x4c')]()[_0x8b83('0x25')](respondWithResult(_0x5da80c,null))['catch'](handleError(_0x5da80c,null));};
\ No newline at end of file
diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js
index 48c0768..549d5eb 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 _0x4c1b=['lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./jscriptyAnswerReport.attributes','exports','define','report_jscripty_answers'];(function(_0x1c7d1c,_0x5ef6b0){var _0x31563e=function(_0x439499){while(--_0x439499){_0x1c7d1c['push'](_0x1c7d1c['shift']());}};_0x31563e(++_0x5ef6b0);}(_0x4c1b,0xd8));var _0xb4c1=function(_0x9527f8,_0x59a557){_0x9527f8=_0x9527f8-0x0;var _0x113df5=_0x4c1b[_0x9527f8];return _0x113df5;};'use strict';var _=require(_0xb4c1('0x0'));var util=require(_0xb4c1('0x1'));var logger=require(_0xb4c1('0x2'))(_0xb4c1('0x3'));var moment=require('moment');var BPromise=require(_0xb4c1('0x4'));var rp=require(_0xb4c1('0x5'));var fs=require('fs');var path=require(_0xb4c1('0x6'));var rimraf=require('rimraf');var config=require(_0xb4c1('0x7'));var attributes=require(_0xb4c1('0x8'));module[_0xb4c1('0x9')]=function(_0x4d268d,_0x3f3531){return _0x4d268d[_0xb4c1('0xa')]('JscriptyAnswerReport',attributes,{'tableName':_0xb4c1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xeea3=['lodash','../../config/logger','api','moment','bluebird','path','rimraf','./jscriptyAnswerReport.attributes','exports','JscriptyAnswerReport','report_jscripty_answers'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xeea3,0x1ad));var _0x3eea=function(_0x1ee879,_0x3bfed2){_0x1ee879=_0x1ee879-0x0;var _0x672a7a=_0xeea3[_0x1ee879];return _0x672a7a;};'use strict';var _=require(_0x3eea('0x0'));var util=require('util');var logger=require(_0x3eea('0x1'))(_0x3eea('0x2'));var moment=require(_0x3eea('0x3'));var BPromise=require(_0x3eea('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3eea('0x5'));var rimraf=require(_0x3eea('0x6'));var config=require('../../config/environment');var attributes=require(_0x3eea('0x7'));module[_0x3eea('0x8')]=function(_0x2c4471,_0x446ef0){return _0x2c4471['define'](_0x3eea('0x9'),attributes,{'tableName':_0x3eea('0xa'),'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 67265d1..88be0d3 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 _0xb29c=['request','then','request\x20sent','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error','JscriptyAnswerReport,\x20%s,\x20%s','message','info','result','lodash','util','moment','bluebird','ioredis','../../config/logger','jayson/promise','client'];(function(_0x59ab1d,_0x4900ec){var _0x45b4e1=function(_0x3ba352){while(--_0x3ba352){_0x59ab1d['push'](_0x59ab1d['shift']());}};_0x45b4e1(++_0x4900ec);}(_0xb29c,0x174));var _0xcb29=function(_0x2a4b6c,_0x2cac39){_0x2a4b6c=_0x2a4b6c-0x0;var _0x3daa18=_0xb29c[_0x2a4b6c];return _0x3daa18;};'use strict';var _=require(_0xcb29('0x0'));var util=require(_0xcb29('0x1'));var moment=require(_0xcb29('0x2'));var BPromise=require(_0xcb29('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xcb29('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xcb29('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xcb29('0x6'));var client=jayson[_0xcb29('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x23d332,_0x33be7f,_0xaa0d78){return new BPromise(function(_0x1e5768,_0x44cdc9){return client[_0xcb29('0x8')](_0x23d332,_0xaa0d78)[_0xcb29('0x9')](function(_0x2cce4c){logger['info']('JscriptyAnswerReport,\x20%s,\x20%s',_0x33be7f,_0xcb29('0xa'));logger[_0xcb29('0xb')](_0xcb29('0xc'),_0x33be7f,_0xcb29('0xa'),JSON[_0xcb29('0xd')](_0x2cce4c));if(_0x2cce4c[_0xcb29('0xe')]){if(_0x2cce4c[_0xcb29('0xe')]['code']===0x1f4){logger[_0xcb29('0xe')](_0xcb29('0xf'),_0x33be7f,_0x2cce4c[_0xcb29('0xe')][_0xcb29('0x10')]);return _0x44cdc9(_0x2cce4c['error'][_0xcb29('0x10')]);}logger[_0xcb29('0xe')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x33be7f,_0x2cce4c[_0xcb29('0xe')][_0xcb29('0x10')]);return _0x1e5768(_0x2cce4c[_0xcb29('0xe')][_0xcb29('0x10')]);}else{logger[_0xcb29('0x11')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x33be7f,'request\x20sent');_0x1e5768(_0x2cce4c[_0xcb29('0x12')][_0xcb29('0x10')]);}})['catch'](function(_0x4e55e5){logger['error']('JscriptyAnswerReport,\x20%s,\x20%s',_0x33be7f,_0x4e55e5);_0x44cdc9(_0x4e55e5);});});}
\ No newline at end of file
+var _0xe487=['util','moment','randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','info','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','JscriptyAnswerReport,\x20%s,\x20%s','message','result','catch'];(function(_0x278e3c,_0x1c9cfd){var _0x3e2d9b=function(_0x34d928){while(--_0x34d928){_0x278e3c['push'](_0x278e3c['shift']());}};_0x3e2d9b(++_0x1c9cfd);}(_0xe487,0x1a2));var _0x7e48=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe487[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x7e48('0x0'));var moment=require(_0x7e48('0x1'));var BPromise=require('bluebird');var rs=require(_0x7e48('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7e48('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x7e48('0x4'))(_0x7e48('0x5'));var config=require('../../config/environment');var jayson=require(_0x7e48('0x6'));var client=jayson[_0x7e48('0x7')][_0x7e48('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3c8aba,_0x1fd30c,_0x2c7ca9){return new BPromise(function(_0x196e58,_0x3a39fc){return client[_0x7e48('0x9')](_0x3c8aba,_0x2c7ca9)[_0x7e48('0xa')](function(_0x15b815){logger[_0x7e48('0xb')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x1fd30c,'request\x20sent');logger[_0x7e48('0xc')](_0x7e48('0xd'),_0x1fd30c,_0x7e48('0xe'),JSON[_0x7e48('0xf')](_0x15b815));if(_0x15b815[_0x7e48('0x10')]){if(_0x15b815['error'][_0x7e48('0x11')]===0x1f4){logger[_0x7e48('0x10')](_0x7e48('0x12'),_0x1fd30c,_0x15b815[_0x7e48('0x10')][_0x7e48('0x13')]);return _0x3a39fc(_0x15b815[_0x7e48('0x10')][_0x7e48('0x13')]);}logger[_0x7e48('0x10')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x1fd30c,_0x15b815[_0x7e48('0x10')][_0x7e48('0x13')]);return _0x196e58(_0x15b815[_0x7e48('0x10')][_0x7e48('0x13')]);}else{logger[_0x7e48('0xb')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x1fd30c,_0x7e48('0xe'));_0x196e58(_0x15b815[_0x7e48('0x14')][_0x7e48('0x13')]);}})[_0x7e48('0x15')](function(_0x45fd56){logger[_0x7e48('0x10')](_0x7e48('0x12'),_0x1fd30c,_0x45fd56);_0x3a39fc(_0x45fd56);});});}
\ No newline at end of file
diff --git a/server/api/jscriptyProject/index.js b/server/api/jscriptyProject/index.js
index 835b883..ca5978d 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 _0xbe64=['delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','isAuthenticated','get','/:id','/:id/sessions','getSessions','/:id/answers','getAnswers','post','create','put','update'];(function(_0x41ba06,_0x4f1ea0){var _0xdfca10=function(_0x105cf9){while(--_0x105cf9){_0x41ba06['push'](_0x41ba06['shift']());}};_0xdfca10(++_0x4f1ea0);}(_0xbe64,0x173));var _0x4be6=function(_0x3e6d5d,_0x264c7a){_0x3e6d5d=_0x3e6d5d-0x0;var _0x238923=_0xbe64[_0x3e6d5d];return _0x238923;};'use strict';var multer=require(_0x4be6('0x0'));var util=require(_0x4be6('0x1'));var path=require(_0x4be6('0x2'));var timeout=require(_0x4be6('0x3'));var express=require(_0x4be6('0x4'));var router=express[_0x4be6('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x4be6('0x6'));var config=require(_0x4be6('0x7'));var controller=require(_0x4be6('0x8'));router['get']('/',auth[_0x4be6('0x9')](),controller['index']);router[_0x4be6('0xa')](_0x4be6('0xb'),auth[_0x4be6('0x9')](),controller['show']);router['get'](_0x4be6('0xc'),auth[_0x4be6('0x9')](),controller[_0x4be6('0xd')]);router[_0x4be6('0xa')](_0x4be6('0xe'),auth[_0x4be6('0x9')](),controller[_0x4be6('0xf')]);router[_0x4be6('0xa')]('/:id/summary',auth[_0x4be6('0x9')](),timeout('30s'),controller['getSummary']);router[_0x4be6('0x10')]('/',auth[_0x4be6('0x9')](),controller[_0x4be6('0x11')]);router['post']('/:id/clone',auth[_0x4be6('0x9')](),controller['clone']);router[_0x4be6('0x12')](_0x4be6('0xb'),auth['isAuthenticated'](),controller[_0x4be6('0x13')]);router[_0x4be6('0x14')](_0x4be6('0xb'),auth[_0x4be6('0x9')](),controller[_0x4be6('0x15')]);module[_0x4be6('0x16')]=router;
\ No newline at end of file
+var _0x3e6f=['/:id/answers','getAnswers','/:id/summary','30s','getSummary','post','/:id/clone','put','update','delete','exports','multer','util','path','connect-timeout','Router','../../components/interaction/service','./jscriptyProject.controller','get','isAuthenticated','index','/:id','show','/:id/sessions','getSessions'];(function(_0x594d09,_0x302fb9){var _0xd07832=function(_0x2b6c14){while(--_0x2b6c14){_0x594d09['push'](_0x594d09['shift']());}};_0xd07832(++_0x302fb9);}(_0x3e6f,0x88));var _0xf3e6=function(_0x71f842,_0x4622a5){_0x71f842=_0x71f842-0x0;var _0x22f982=_0x3e6f[_0x71f842];return _0x22f982;};'use strict';var multer=require(_0xf3e6('0x0'));var util=require(_0xf3e6('0x1'));var path=require(_0xf3e6('0x2'));var timeout=require(_0xf3e6('0x3'));var express=require('express');var router=express[_0xf3e6('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xf3e6('0x5'));var config=require('../../config/environment');var controller=require(_0xf3e6('0x6'));router[_0xf3e6('0x7')]('/',auth[_0xf3e6('0x8')](),controller[_0xf3e6('0x9')]);router[_0xf3e6('0x7')](_0xf3e6('0xa'),auth[_0xf3e6('0x8')](),controller[_0xf3e6('0xb')]);router['get'](_0xf3e6('0xc'),auth[_0xf3e6('0x8')](),controller[_0xf3e6('0xd')]);router[_0xf3e6('0x7')](_0xf3e6('0xe'),auth['isAuthenticated'](),controller[_0xf3e6('0xf')]);router[_0xf3e6('0x7')](_0xf3e6('0x10'),auth[_0xf3e6('0x8')](),timeout(_0xf3e6('0x11')),controller[_0xf3e6('0x12')]);router[_0xf3e6('0x13')]('/',auth[_0xf3e6('0x8')](),controller['create']);router[_0xf3e6('0x13')](_0xf3e6('0x14'),auth['isAuthenticated'](),controller['clone']);router[_0xf3e6('0x15')]('/:id',auth['isAuthenticated'](),controller[_0xf3e6('0x16')]);router[_0xf3e6('0x17')](_0xf3e6('0xa'),auth[_0xf3e6('0x8')](),controller['destroy']);module[_0xf3e6('0x18')]=router;
\ No newline at end of file
diff --git a/server/api/jscriptyProject/jscriptyProject.attributes.js b/server/api/jscriptyProject/jscriptyProject.attributes.js
index f607e88..87a6de3 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 _0xc364=['exports','STRING','name','TEXT','isObjectLike','setDataValue','formData','stringify','isString','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','description','BOOLEAN','sequelize','lodash','util'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xc364,0x1ed));var _0x4c36=function(_0x15f71b,_0x156c53){_0x15f71b=_0x15f71b-0x0;var _0x54f41f=_0xc364[_0x15f71b];return _0x54f41f;};'use strict';var Sequelize=require(_0x4c36('0x0'));var _=require(_0x4c36('0x1'));var util=require(_0x4c36('0x2'));module[_0x4c36('0x3')]={'name':{'type':Sequelize[_0x4c36('0x4')],'unique':_0x4c36('0x5')},'description':{'type':Sequelize[_0x4c36('0x4')]},'formData':{'type':Sequelize[_0x4c36('0x6')]('long'),'set':function(_0xb6928a){if(_[_0x4c36('0x7')](_0xb6928a)){this[_0x4c36('0x8')](_0x4c36('0x9'),JSON[_0x4c36('0xa')](_0xb6928a));}else if(_[_0x4c36('0xb')](_0xb6928a)){this[_0x4c36('0x8')](_0x4c36('0x9'),_0xb6928a);}else{this[_0x4c36('0x8')](_0x4c36('0x9'),util[_0x4c36('0xc')](_0x4c36('0xd'),this['getDataValue'](_0x4c36('0x5'))||'',this['getDataValue'](_0x4c36('0xe'))||''));}}},'enableUncompleteSave':{'type':Sequelize[_0x4c36('0xf')],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0x930a=['description','BOOLEAN','sequelize','STRING','isObjectLike','formData','stringify','isString','setDataValue','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue','name'];(function(_0x5ac905,_0x1fb98a){var _0x5d4fcc=function(_0x1b8b84){while(--_0x1b8b84){_0x5ac905['push'](_0x5ac905['shift']());}};_0x5d4fcc(++_0x1fb98a);}(_0x930a,0x1a2));var _0xa930=function(_0x11005e,_0x20c3d2){_0x11005e=_0x11005e-0x0;var _0x29338f=_0x930a[_0x11005e];return _0x29338f;};'use strict';var Sequelize=require(_0xa930('0x0'));var _=require('lodash');var util=require('util');module['exports']={'name':{'type':Sequelize[_0xa930('0x1')],'unique':'name'},'description':{'type':Sequelize['STRING']},'formData':{'type':Sequelize['TEXT']('long'),'set':function(_0x25aa48){if(_[_0xa930('0x2')](_0x25aa48)){this['setDataValue'](_0xa930('0x3'),JSON[_0xa930('0x4')](_0x25aa48));}else if(_[_0xa930('0x5')](_0x25aa48)){this['setDataValue'](_0xa930('0x3'),_0x25aa48);}else{this[_0xa930('0x6')](_0xa930('0x3'),util[_0xa930('0x7')](_0xa930('0x8'),this[_0xa930('0x9')](_0xa930('0xa'))||'',this[_0xa930('0x9')](_0xa930('0xb'))||''));}}},'enableUncompleteSave':{'type':Sequelize[_0xa930('0xc')],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0xa930('0xc')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/jscriptyProject/jscriptyProject.controller.js b/server/api/jscriptyProject/jscriptyProject.controller.js
index fb3a73f..6b5b4d9 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 _0x54c5=['where','filters','filter','merge','VIRTUAL','count','includeAll','include','findAll','rows','catch','options','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','omit','updatedAt','createdAt','findOne','JscriptySessionReport','pick','ProjectId','getAnswers','JscriptyAnswerReport','nolimit','number','fromCharCode','toString','indexOf','getSummary','startTime','starttime','parse','JscriptyQuestionReport','-createdAt','questionId','question','format','SessionId','isEmpty','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv','attachment;\x20filename=','Jscripty_Project_%d_Summary_%s.csv','setHeader','Content-type','text/csv','download','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','set','apply','reject','update','destroy','get','Projects','UserProfileResource','then','error','stack','name','send','index','map','JscriptyProject','rawAttributes','fieldName','type','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','order','sort'];(function(_0x4d515d,_0x108c96){var _0x58fe07=function(_0x2e18bf){while(--_0x2e18bf){_0x4d515d['push'](_0x4d515d['shift']());}};_0x58fe07(++_0x108c96);}(_0x54c5,0xab));var _0x554c=function(_0x2851a6,_0x4f01ab){_0x2851a6=_0x2851a6-0x0;var _0x497c2b=_0x54c5[_0x2851a6];return _0x497c2b;};'use strict';var pdf=require(_0x554c('0x0'));var emlformat=require(_0x554c('0x1'));var rimraf=require(_0x554c('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x554c('0x3'));var rp=require(_0x554c('0x4'));var moment=require(_0x554c('0x5'));var BPromise=require(_0x554c('0x6'));var Mustache=require('mustache');var util=require(_0x554c('0x7'));var path=require(_0x554c('0x8'));var sox=require('sox');var csv=require(_0x554c('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x554c('0xa'));var squel=require('squel');var crypto=require(_0x554c('0xb'));var jsforce=require(_0x554c('0xc'));var deskjs=require(_0x554c('0xd'));var toCsv=require(_0x554c('0x9'));var querystring=require(_0x554c('0xe'));var Papa=require(_0x554c('0xf'));var Redis=require(_0x554c('0x10'));var authService=require(_0x554c('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x554c('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x554c('0x13'))(_0x554c('0x14'));var utils=require(_0x554c('0x15'));var config=require(_0x554c('0x16'));var db=require(_0x554c('0x17'))['db'];function respondWithStatusCode(_0x571166,_0x4dc97b){_0x4dc97b=_0x4dc97b||0xcc;return function(_0x2093f7){if(_0x2093f7){return _0x571166[_0x554c('0x18')](_0x4dc97b);}return _0x571166[_0x554c('0x19')](_0x4dc97b)[_0x554c('0x1a')]();};}function respondWithResult(_0x38abfd,_0x2e69dd){_0x2e69dd=_0x2e69dd||0xc8;return function(_0x2d2416){if(_0x2d2416){return _0x38abfd[_0x554c('0x19')](_0x2e69dd)[_0x554c('0x1b')](_0x2d2416);}};}function respondWithFilteredResult(_0x128567,_0x22b013){return function(_0x11bd7a){if(_0x11bd7a){var _0x149136=_0x11bd7a['count'],_0x904aa2=_0x22b013[_0x554c('0x1c')],_0x280f91=_0x22b013['offset']+_0x22b013[_0x554c('0x1d')],_0x258229;if(_0x280f91>=_0x149136){_0x280f91=_0x149136;_0x258229=0xc8;}else{_0x258229=0xce;}_0x128567[_0x554c('0x19')](_0x258229);return _0x128567[_0x554c('0x1e')]('Content-Range',_0x904aa2+'-'+_0x280f91+'/'+_0x149136)[_0x554c('0x1b')](_0x11bd7a);}return null;};}function patchUpdates(_0x315b8d){return function(_0x17c606){try{jsonpatch[_0x554c('0x1f')](_0x17c606,_0x315b8d,!![]);}catch(_0x42db11){return BPromise[_0x554c('0x20')](_0x42db11);}return _0x17c606['save']();};}function saveUpdates(_0x3c49d3,_0x515667){return function(_0x157689){if(_0x157689){return _0x157689[_0x554c('0x21')](_0x3c49d3)['then'](function(_0x3316d9){return _0x3316d9;});}return null;};}function removeEntity(_0x37071c,_0x82295b){return function(_0x230b30){if(_0x230b30){return _0x230b30[_0x554c('0x22')]()['then'](function(){var _0xdcef94=_0x230b30[_0x554c('0x23')]({'plain':!![]});var _0x1ee53b=_0x554c('0x24');return db[_0x554c('0x25')][_0x554c('0x22')]({'where':{'type':_0x1ee53b,'resourceId':_0xdcef94['id']}})[_0x554c('0x26')](function(){return _0x230b30;});})[_0x554c('0x26')](function(){_0x37071c[_0x554c('0x19')](0xcc)[_0x554c('0x1a')]();});}};}function handleEntityNotFound(_0x5a6ca1,_0x3c0f76){return function(_0x263b30){if(!_0x263b30){_0x5a6ca1[_0x554c('0x18')](0x194);}return _0x263b30;};}function handleError(_0x1c8034,_0xd47de1){_0xd47de1=_0xd47de1||0x1f4;return function(_0x245d65){logger[_0x554c('0x27')](_0x245d65[_0x554c('0x28')]);if(_0x245d65[_0x554c('0x29')]){delete _0x245d65['name'];}_0x1c8034[_0x554c('0x19')](_0xd47de1)[_0x554c('0x2a')](_0x245d65);};}exports[_0x554c('0x2b')]=function(_0x21eb7f,_0x4fcc25){var _0x4e6347={},_0x4ceb50={},_0x3feb7a={'count':0x0,'rows':[]};var _0x2bfe9a=_[_0x554c('0x2c')](db[_0x554c('0x2d')][_0x554c('0x2e')],function(_0x4d6b29){return{'name':_0x4d6b29[_0x554c('0x2f')],'type':_0x4d6b29[_0x554c('0x30')]['key']};});_0x4ceb50[_0x554c('0x31')]=_[_0x554c('0x2c')](_0x2bfe9a,_0x554c('0x29'));_0x4ceb50[_0x554c('0x32')]=_[_0x554c('0x33')](_0x21eb7f['query']);_0x4ceb50['filters']=_[_0x554c('0x34')](_0x4ceb50[_0x554c('0x31')],_0x4ceb50[_0x554c('0x32')]);_0x4e6347[_0x554c('0x35')]=_[_0x554c('0x34')](_0x4ceb50['model'],qs[_0x554c('0x36')](_0x21eb7f[_0x554c('0x32')][_0x554c('0x36')]));_0x4e6347[_0x554c('0x35')]=_0x4e6347['attributes'][_0x554c('0x37')]?_0x4e6347[_0x554c('0x35')]:_0x4ceb50[_0x554c('0x31')];if(!_0x21eb7f[_0x554c('0x32')][_0x554c('0x38')]('nolimit')){_0x4e6347['limit']=qs['limit'](_0x21eb7f[_0x554c('0x32')][_0x554c('0x1d')]);_0x4e6347[_0x554c('0x1c')]=qs[_0x554c('0x1c')](_0x21eb7f[_0x554c('0x32')][_0x554c('0x1c')]);}_0x4e6347[_0x554c('0x39')]=qs[_0x554c('0x3a')](_0x21eb7f[_0x554c('0x32')][_0x554c('0x3a')]);_0x4e6347[_0x554c('0x3b')]=qs[_0x554c('0x3c')](_['pick'](_0x21eb7f[_0x554c('0x32')],_0x4ceb50[_0x554c('0x3c')]));if(_0x21eb7f[_0x554c('0x32')][_0x554c('0x3d')]){_0x4e6347[_0x554c('0x3b')]=_[_0x554c('0x3e')](_0x4e6347[_0x554c('0x3b')],{'$or':_[_0x554c('0x2c')](_0x2bfe9a,function(_0x37f29c){if(_0x37f29c[_0x554c('0x30')]!==_0x554c('0x3f')){var _0x323b85={};_0x323b85[_0x37f29c[_0x554c('0x29')]]={'$like':'%'+_0x21eb7f[_0x554c('0x32')][_0x554c('0x3d')]+'%'};return _0x323b85;}})});}_0x4e6347=_[_0x554c('0x3e')]({},_0x4e6347,_0x21eb7f['options']);var _0x41d50c={'where':_0x4e6347[_0x554c('0x3b')]};return db[_0x554c('0x2d')][_0x554c('0x40')](_0x41d50c)['then'](function(_0x3ed8fd){_0x3feb7a[_0x554c('0x40')]=_0x3ed8fd;if(_0x21eb7f['query'][_0x554c('0x41')]){_0x4e6347[_0x554c('0x42')]=[{'all':!![]}];}return db[_0x554c('0x2d')][_0x554c('0x43')](_0x4e6347);})[_0x554c('0x26')](function(_0x557122){_0x3feb7a[_0x554c('0x44')]=_0x557122;return _0x3feb7a;})[_0x554c('0x26')](respondWithFilteredResult(_0x4fcc25,_0x4e6347))[_0x554c('0x45')](handleError(_0x4fcc25,null));};exports['show']=function(_0x2280cf,_0x583452){var _0x405727={'raw':![],'where':{'id':_0x2280cf['params']['id']}},_0x38712d={};_0x38712d[_0x554c('0x31')]=_[_0x554c('0x33')](db[_0x554c('0x2d')][_0x554c('0x2e')]);_0x38712d[_0x554c('0x32')]=_[_0x554c('0x33')](_0x2280cf[_0x554c('0x32')]);_0x38712d['filters']=_[_0x554c('0x34')](_0x38712d[_0x554c('0x31')],_0x38712d[_0x554c('0x32')]);_0x405727[_0x554c('0x35')]=_[_0x554c('0x34')](_0x38712d[_0x554c('0x31')],qs[_0x554c('0x36')](_0x2280cf[_0x554c('0x32')][_0x554c('0x36')]));_0x405727['attributes']=_0x405727[_0x554c('0x35')]['length']?_0x405727[_0x554c('0x35')]:_0x38712d[_0x554c('0x31')];if(_0x2280cf[_0x554c('0x32')]['includeAll']){_0x405727[_0x554c('0x42')]=[{'all':!![]}];}_0x405727=_[_0x554c('0x3e')]({},_0x405727,_0x2280cf[_0x554c('0x46')]);return db[_0x554c('0x2d')][_0x554c('0x47')](_0x405727)[_0x554c('0x26')](handleEntityNotFound(_0x583452,null))[_0x554c('0x26')](respondWithResult(_0x583452,null))['catch'](handleError(_0x583452,null));};exports[_0x554c('0x48')]=function(_0x591092,_0x3498da){return db['JscriptyProject']['create'](_0x591092[_0x554c('0x49')],{})['then'](function(_0x2e9916){var _0xba6b2e=_0x591092['user'][_0x554c('0x23')]({'plain':!![]});if(!_0xba6b2e)throw new Error(_0x554c('0x4a'));if(_0xba6b2e[_0x554c('0x4b')]===_0x554c('0x4c')){var _0x5337fa=_0x2e9916[_0x554c('0x23')]({'plain':!![]});var _0x257335=_0x554c('0x24');return db[_0x554c('0x4d')][_0x554c('0x47')]({'where':{'name':_0x257335,'userProfileId':_0xba6b2e[_0x554c('0x4e')]},'raw':!![]})[_0x554c('0x26')](function(_0x2a18a7){if(_0x2a18a7&&_0x2a18a7[_0x554c('0x4f')]===0x0){return db[_0x554c('0x25')][_0x554c('0x48')]({'name':_0x5337fa['name'],'resourceId':_0x5337fa['id'],'type':_0x2a18a7[_0x554c('0x29')],'sectionId':_0x2a18a7['id']},{})['then'](function(){return _0x2e9916;});}else{return _0x2e9916;}})[_0x554c('0x45')](function(_0x2c0380){logger[_0x554c('0x27')](_0x554c('0x50'),_0x2c0380);throw _0x2c0380;});}return _0x2e9916;})['then'](respondWithResult(_0x3498da,0xc9))['catch'](handleError(_0x3498da,null));};exports['clone']=function(_0x339f63,_0x5b5fd6){var _0x48f7d1={'where':{'id':_0x339f63[_0x554c('0x51')]['id']}},_0x4aed83={};_0x4aed83['model']=_['keys'](db[_0x554c('0x2d')][_0x554c('0x2e')]);_0x48f7d1[_0x554c('0x35')]=_[_0x554c('0x34')](_0x4aed83[_0x554c('0x31')],qs[_0x554c('0x36')](_0x339f63[_0x554c('0x32')][_0x554c('0x36')]));_0x48f7d1[_0x554c('0x35')]=_0x48f7d1[_0x554c('0x35')]['length']?_0x48f7d1['attributes']:_0x4aed83[_0x554c('0x31')];if(_0x339f63[_0x554c('0x32')][_0x554c('0x41')]){_0x48f7d1[_0x554c('0x42')]=[{'all':!![]}];}_0x48f7d1=_[_0x554c('0x3e')]({},_0x48f7d1,_0x339f63[_0x554c('0x46')]);return db[_0x554c('0x2d')][_0x554c('0x47')](_0x48f7d1)['then'](handleEntityNotFound(_0x5b5fd6,null))[_0x554c('0x26')](function(_0x4a2bf3){if(_0x4a2bf3){var _0x55f1b1=_0x4a2bf3[_0x554c('0x23')]({'plain':!![]});_0x55f1b1=qs[_0x554c('0x52')](_0x55f1b1,['id','createdAt',_0x554c('0x53')]);_0x339f63['body']=_[_0x554c('0x52')](_0x339f63['body'],['id',_0x554c('0x54'),_0x554c('0x53')]);return db[_0x554c('0x2d')][_0x554c('0x48')](_[_0x554c('0x3e')](_0x55f1b1,_0x339f63['body']),{'include':_0x339f63[_0x554c('0x32')][_0x554c('0x41')]?[{'all':!![]}]:undefined})[_0x554c('0x26')](function(_0x59903d){var _0xddc67b=_0x339f63[_0x554c('0x4c')][_0x554c('0x23')]({'plain':!![]});if(!_0xddc67b)throw new Error(_0x554c('0x4a'));if(_0xddc67b[_0x554c('0x4b')]==='user'){var _0x27cc9b=_0x59903d[_0x554c('0x23')]({'plain':!![]});var _0x420c1c=_0x554c('0x24');return db['UserProfileSection'][_0x554c('0x47')]({'where':{'name':_0x420c1c,'userProfileId':_0xddc67b['userProfileId']},'raw':!![]})['then'](function(_0x2ee93c){if(_0x2ee93c&&_0x2ee93c[_0x554c('0x4f')]===0x0){return db[_0x554c('0x25')][_0x554c('0x48')]({'name':_0x27cc9b[_0x554c('0x29')],'resourceId':_0x27cc9b['id'],'type':_0x2ee93c[_0x554c('0x29')],'sectionId':_0x2ee93c['id']},{})[_0x554c('0x26')](function(){return _0x59903d;});}else{return _0x59903d;}})[_0x554c('0x45')](function(_0x533baa){logger[_0x554c('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x533baa);throw _0x533baa;});}return _0x59903d;});}})['then'](respondWithResult(_0x5b5fd6,0xc9))[_0x554c('0x45')](handleError(_0x5b5fd6,null));};exports[_0x554c('0x21')]=function(_0x2abf50,_0xf95f4c){if(_0x2abf50[_0x554c('0x49')]['id']){delete _0x2abf50[_0x554c('0x49')]['id'];}return db[_0x554c('0x2d')][_0x554c('0x47')]({'where':{'id':_0x2abf50['params']['id']}})[_0x554c('0x26')](handleEntityNotFound(_0xf95f4c,null))[_0x554c('0x26')](saveUpdates(_0x2abf50['body'],null))[_0x554c('0x26')](respondWithResult(_0xf95f4c,null))[_0x554c('0x45')](handleError(_0xf95f4c,null));};exports[_0x554c('0x22')]=function(_0x4bb82e,_0x5b8f25){return db['JscriptyProject'][_0x554c('0x47')]({'where':{'id':_0x4bb82e[_0x554c('0x51')]['id']}})['then'](handleEntityNotFound(_0x5b8f25,null))[_0x554c('0x26')](removeEntity(_0x5b8f25,null))['catch'](handleError(_0x5b8f25,null));};exports['getSessions']=function(_0x570c1b,_0x4fa046,_0x32123d){var _0x45f71f={'raw':!![],'where':{}};var _0x3fa0b7={};var _0x99d0d1={'count':0x0,'rows':[]};return db[_0x554c('0x2d')][_0x554c('0x55')]({'where':{'id':_0x570c1b[_0x554c('0x51')]['id']}})[_0x554c('0x26')](handleEntityNotFound(_0x4fa046,null))['then'](function(_0x2e0e44){if(_0x2e0e44){_0x3fa0b7[_0x554c('0x31')]=_[_0x554c('0x33')](db[_0x554c('0x56')][_0x554c('0x2e')]);_0x3fa0b7['query']=_[_0x554c('0x33')](_0x570c1b[_0x554c('0x32')]);_0x3fa0b7[_0x554c('0x3c')]=_['intersection'](_0x3fa0b7[_0x554c('0x31')],_0x3fa0b7[_0x554c('0x32')]);_0x45f71f[_0x554c('0x35')]=_[_0x554c('0x34')](_0x3fa0b7[_0x554c('0x31')],qs[_0x554c('0x36')](_0x570c1b[_0x554c('0x32')]['fields']));_0x45f71f['attributes']=_0x45f71f[_0x554c('0x35')]['length']?_0x45f71f[_0x554c('0x35')]:_0x3fa0b7['model'];if(!_0x570c1b[_0x554c('0x32')][_0x554c('0x38')]('nolimit')){_0x45f71f[_0x554c('0x1d')]=qs[_0x554c('0x1d')](_0x570c1b[_0x554c('0x32')]['limit']);_0x45f71f[_0x554c('0x1c')]=qs[_0x554c('0x1c')](_0x570c1b[_0x554c('0x32')][_0x554c('0x1c')]);}_0x45f71f['order']=qs[_0x554c('0x3a')](_0x570c1b[_0x554c('0x32')][_0x554c('0x3a')]);_0x45f71f[_0x554c('0x3b')]=qs[_0x554c('0x3c')](_[_0x554c('0x57')](_0x570c1b[_0x554c('0x32')],_0x3fa0b7[_0x554c('0x3c')]));_0x45f71f['where'][_0x554c('0x58')]=_0x2e0e44['id'];if(_0x570c1b[_0x554c('0x32')][_0x554c('0x3d')]){_0x45f71f['where']=_[_0x554c('0x3e')](_0x45f71f[_0x554c('0x3b')],{'$or':_[_0x554c('0x2c')](_0x45f71f[_0x554c('0x35')],function(_0x1c9ef7){var _0x30fbc3={};_0x30fbc3[_0x1c9ef7]={'$like':'%'+_0x570c1b[_0x554c('0x32')][_0x554c('0x3d')]+'%'};return _0x30fbc3;})});}_0x45f71f=_[_0x554c('0x3e')]({},_0x45f71f,_0x570c1b[_0x554c('0x46')]);return db[_0x554c('0x56')][_0x554c('0x40')]({'where':_0x45f71f[_0x554c('0x3b')]})[_0x554c('0x26')](function(_0x110535){_0x99d0d1[_0x554c('0x40')]=_0x110535;if(_0x570c1b[_0x554c('0x32')]['includeAll']){_0x45f71f['include']=[{'all':!![]}];}return db['JscriptySessionReport'][_0x554c('0x43')](_0x45f71f);})[_0x554c('0x26')](function(_0x5c5cbe){_0x99d0d1[_0x554c('0x44')]=_0x5c5cbe;return _0x99d0d1;});}})[_0x554c('0x26')](respondWithFilteredResult(_0x4fa046,_0x45f71f))[_0x554c('0x45')](handleError(_0x4fa046,null));};exports[_0x554c('0x59')]=function(_0x405b46,_0x54dca6,_0x5d311c){var _0x525d29={'raw':!![],'where':{}};var _0x12225a={};var _0x14b1a4={'count':0x0,'rows':[]};return db['JscriptyProject']['findOne']({'where':{'id':_0x405b46['params']['id']}})[_0x554c('0x26')](handleEntityNotFound(_0x54dca6,null))[_0x554c('0x26')](function(_0x109561){if(_0x109561){_0x12225a[_0x554c('0x31')]=_['keys'](db[_0x554c('0x5a')]['rawAttributes']);_0x12225a[_0x554c('0x32')]=_[_0x554c('0x33')](_0x405b46[_0x554c('0x32')]);_0x12225a[_0x554c('0x3c')]=_['intersection'](_0x12225a[_0x554c('0x31')],_0x12225a[_0x554c('0x32')]);_0x525d29[_0x554c('0x35')]=_[_0x554c('0x34')](_0x12225a[_0x554c('0x31')],qs['fields'](_0x405b46[_0x554c('0x32')][_0x554c('0x36')]));_0x525d29[_0x554c('0x35')]=_0x525d29[_0x554c('0x35')]['length']?_0x525d29[_0x554c('0x35')]:_0x12225a['model'];if(!_0x405b46[_0x554c('0x32')]['hasOwnProperty'](_0x554c('0x5b'))){_0x525d29[_0x554c('0x1d')]=qs[_0x554c('0x1d')](_0x405b46['query']['limit']);_0x525d29['offset']=qs[_0x554c('0x1c')](_0x405b46[_0x554c('0x32')][_0x554c('0x1c')]);}_0x525d29[_0x554c('0x39')]=qs['sort'](_0x405b46[_0x554c('0x32')][_0x554c('0x3a')]);_0x525d29[_0x554c('0x3b')]=qs[_0x554c('0x3c')](_[_0x554c('0x57')](_0x405b46[_0x554c('0x32')],_0x12225a[_0x554c('0x3c')]));_0x525d29['where']['ProjectId']=_0x109561['id'];if(_0x405b46[_0x554c('0x32')][_0x554c('0x3d')]){_0x525d29[_0x554c('0x3b')]=_[_0x554c('0x3e')](_0x525d29[_0x554c('0x3b')],{'$or':_[_0x554c('0x2c')](_0x525d29['attributes'],function(_0x292992){var _0x293658={};_0x293658[_0x292992]={'$like':'%'+_0x405b46[_0x554c('0x32')][_0x554c('0x3d')]+'%'};return _0x293658;})});}_0x525d29=_[_0x554c('0x3e')]({},_0x525d29,_0x405b46[_0x554c('0x46')]);return db[_0x554c('0x5a')][_0x554c('0x40')]({'where':_0x525d29[_0x554c('0x3b')]})[_0x554c('0x26')](function(_0x32c76a){_0x14b1a4[_0x554c('0x40')]=_0x32c76a;if(_0x405b46[_0x554c('0x32')][_0x554c('0x41')]){_0x525d29[_0x554c('0x42')]=[{'all':!![]}];}return db[_0x554c('0x5a')][_0x554c('0x43')](_0x525d29);})[_0x554c('0x26')](function(_0x5a1c1c){_0x14b1a4[_0x554c('0x44')]=_0x5a1c1c;return _0x14b1a4;});}})[_0x554c('0x26')](respondWithFilteredResult(_0x54dca6,_0x525d29))[_0x554c('0x45')](handleError(_0x54dca6,null));};function char(_0x843ed0){return _0x554c('0x5c')===typeof _0x843ed0?String[_0x554c('0x5d')][_0x554c('0x1f')](null,arguments):_0x843ed0;}function needsEncapsulation(_0x1eb74f){return!!_0x1eb74f&&(_0x1eb74f[_0x554c('0x5e')]()[_0x554c('0x5f')](char(0xd))>=0x0||_0x1eb74f['toString']()[_0x554c('0x5f')](char(0xa))>=0x0||_0x1eb74f[_0x554c('0x5e')]()['indexOf'](char(0x2c))>=0x0||_0x1eb74f['toString']()['indexOf'](char(0x22))>=0x0);}function encapsulate(_0x188fa2){var _0x5cf8cf=char(0x22),_0x441237='\x5c'+char(0x22),_0x398129=_0x188fa2['toString']()['replace'](new RegExp(_0x5cf8cf,'g'),_0x441237);return _0x5cf8cf+_0x398129+_0x5cf8cf;}exports[_0x554c('0x60')]=function(_0x17fd4c,_0x3f1aa1,_0x27cadd){var _0x219fbc,_0x352592;var _0x453887={'where':{'ProjectId':_0x17fd4c[_0x554c('0x51')]['id']}};if(_0x17fd4c[_0x554c('0x32')][_0x554c('0x61')]){_0x453887[_0x554c('0x3b')][_0x554c('0x62')]=JSON[_0x554c('0x63')](_0x17fd4c[_0x554c('0x32')]['startTime']);}return db['JscriptySessionReport']['findAll'](_0x453887)['then'](handleEntityNotFound(_0x3f1aa1,null))[_0x554c('0x26')](function(_0x2fbba8){if(_0x2fbba8){_0x219fbc=_0x2fbba8;return db[_0x554c('0x64')][_0x554c('0x43')]({'where':{'SessionId':{'$in':_[_0x554c('0x2c')](_0x219fbc,'id')},'ProjectId':_0x17fd4c[_0x554c('0x51')]['id']},'order':_0x554c('0x65')});}})['then'](handleEntityNotFound(_0x3f1aa1,null))[_0x554c('0x26')](function(_0x48c354){if(_0x48c354){_0x352592=_0x48c354;var _0x24e2c4={};for(var _0x586e23=0x0,_0x4b0e16=_0x352592[_0x554c('0x37')];_0x586e23<_0x4b0e16;_0x586e23++){if(!_0x24e2c4['hasOwnProperty'](_0x352592[_0x586e23][_0x554c('0x66')])){_0x24e2c4[_0x352592[_0x586e23]['questionId']]=needsEncapsulation(_0x352592[_0x586e23]['question'])?encapsulate(_0x352592[_0x586e23]['question']):_0x352592[_0x586e23][_0x554c('0x67')];}}var _0x502749=[],_0x1d4101={};for(var _0x46f67b=0x0,_0x6ca9f6=_0x219fbc['length'];_0x46f67b<_0x6ca9f6;_0x46f67b++){_0x1d4101={'ProjectId':_0x17fd4c['params']['id'],'SessionId':_0x219fbc[_0x46f67b]['id'],'StartTime':moment(_0x219fbc[_0x46f67b][_0x554c('0x62')])[_0x554c('0x68')]('YYYY-MM-DD\x20HH:mm:ss')};for(var _0x2a5065=0x0,_0x383c23=_0x352592['length'];_0x2a5065<_0x383c23;_0x2a5065++){if(_0x352592[_0x2a5065][_0x554c('0x69')]==_0x219fbc[_0x46f67b]['id']&&_0x24e2c4['hasOwnProperty'](_0x352592[_0x2a5065][_0x554c('0x66')])){_0x1d4101[_0x24e2c4[_0x352592[_0x2a5065][_0x554c('0x66')]]]=_0x352592[_0x2a5065]['answer'];}}for(var _0x29528f in _0x24e2c4){if(!_0x1d4101[_0x554c('0x38')](_0x24e2c4[_0x29528f])){_0x1d4101[_0x24e2c4[_0x29528f]]=null;}}_0x502749['push'](_0x1d4101);}return _0x502749;}})['then'](function(_0x17d406){if(!_[_0x554c('0x6a')](_0x17d406)){var _0x345fca=toCsv(_0x17d406);var _0x4e5b1a=Date['now']();fs[_0x554c('0x6b')](util[_0x554c('0x68')](_0x554c('0x6c'),_0x17fd4c[_0x554c('0x51')]['id'],_0x4e5b1a),_0x345fca);_0x3f1aa1['setHeader']('Content-disposition',_0x554c('0x6d')+util[_0x554c('0x68')](_0x554c('0x6e'),_0x17fd4c[_0x554c('0x51')]['id'],_0x4e5b1a));_0x3f1aa1[_0x554c('0x6f')](_0x554c('0x70'),_0x554c('0x71'));return _0x3f1aa1[_0x554c('0x72')](util['format'](_0x554c('0x6c'),_0x17fd4c[_0x554c('0x51')]['id'],_0x4e5b1a));}else{return _0x3f1aa1[_0x554c('0x18')](0xcc);}})[_0x554c('0x45')](handleError(_0x3f1aa1,null));};
\ No newline at end of file
+var _0x7298=['get','role','userProfileId','autoAssociation','error','clone','params','omit','createdAt','updatedAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','update','getSessions','JscriptySessionReport','hasOwnProperty','options','getAnswers','JscriptyAnswerReport','order','findAll','number','toString','indexOf','replace','getSummary','starttime','startTime','-createdAt','questionId','question','YYYY-MM-DD\x20HH:mm:ss','SessionId','answer','push','isEmpty','now','format','/tmp/Jscripty_Project_%d_Summary_%s.csv','setHeader','Jscripty_Project_%d_Summary_%s.csv','text/csv','download','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','status','end','json','count','offset','limit','Content-Range','apply','reject','save','then','destroy','Projects','UserProfileResource','sendStatus','name','send','index','map','JscriptyProject','rawAttributes','type','key','query','filters','intersection','model','attributes','fields','length','nolimit','sort','pick','filter','where','VIRTUAL','merge','includeAll','rows','catch','show','keys','include','find','create','body','user'];(function(_0xd9fd40,_0x37d572){var _0x244d56=function(_0x4cefbc){while(--_0x4cefbc){_0xd9fd40['push'](_0xd9fd40['shift']());}};_0x244d56(++_0x37d572);}(_0x7298,0x177));var _0x8729=function(_0x14e43d,_0x818227){_0x14e43d=_0x14e43d-0x0;var _0xf59db5=_0x7298[_0x14e43d];return _0xf59db5;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x8729('0x0'));var rimraf=require(_0x8729('0x1'));var zipdir=require(_0x8729('0x2'));var jsonpatch=require(_0x8729('0x3'));var rp=require(_0x8729('0x4'));var moment=require(_0x8729('0x5'));var BPromise=require(_0x8729('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x8729('0x7'));var sox=require('sox');var csv=require(_0x8729('0x8'));var ejs=require(_0x8729('0x9'));var fs=require('fs');var _=require(_0x8729('0xa'));var squel=require(_0x8729('0xb'));var crypto=require(_0x8729('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x8729('0x8'));var querystring=require(_0x8729('0xd'));var Papa=require(_0x8729('0xe'));var Redis=require(_0x8729('0xf'));var authService=require(_0x8729('0x10'));var qs=require(_0x8729('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x8729('0x12'))(_0x8729('0x13'));var utils=require(_0x8729('0x14'));var config=require(_0x8729('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x28a14e,_0x5c536b){_0x5c536b=_0x5c536b||0xcc;return function(_0x495971){if(_0x495971){return _0x28a14e['sendStatus'](_0x5c536b);}return _0x28a14e[_0x8729('0x16')](_0x5c536b)[_0x8729('0x17')]();};}function respondWithResult(_0x1c606c,_0x3ee1a4){_0x3ee1a4=_0x3ee1a4||0xc8;return function(_0x34ebe9){if(_0x34ebe9){return _0x1c606c[_0x8729('0x16')](_0x3ee1a4)[_0x8729('0x18')](_0x34ebe9);}};}function respondWithFilteredResult(_0x33ab08,_0xc5b6d4){return function(_0x337088){if(_0x337088){var _0x1f0249=_0x337088[_0x8729('0x19')],_0x57bb8f=_0xc5b6d4['offset'],_0xf8c2f9=_0xc5b6d4[_0x8729('0x1a')]+_0xc5b6d4[_0x8729('0x1b')],_0x35844b;if(_0xf8c2f9>=_0x1f0249){_0xf8c2f9=_0x1f0249;_0x35844b=0xc8;}else{_0x35844b=0xce;}_0x33ab08[_0x8729('0x16')](_0x35844b);return _0x33ab08['set'](_0x8729('0x1c'),_0x57bb8f+'-'+_0xf8c2f9+'/'+_0x1f0249)[_0x8729('0x18')](_0x337088);}return null;};}function patchUpdates(_0x26b2ca){return function(_0x2f0ae5){try{jsonpatch[_0x8729('0x1d')](_0x2f0ae5,_0x26b2ca,!![]);}catch(_0x42f7fe){return BPromise[_0x8729('0x1e')](_0x42f7fe);}return _0x2f0ae5[_0x8729('0x1f')]();};}function saveUpdates(_0x18529d,_0x4718b2){return function(_0x3a60e9){if(_0x3a60e9){return _0x3a60e9['update'](_0x18529d)[_0x8729('0x20')](function(_0x5db599){return _0x5db599;});}return null;};}function removeEntity(_0x375696,_0x3c7c1c){return function(_0x2ab541){if(_0x2ab541){return _0x2ab541[_0x8729('0x21')]()[_0x8729('0x20')](function(){var _0x5b2ad4=_0x2ab541['get']({'plain':!![]});var _0x432d0e=_0x8729('0x22');return db[_0x8729('0x23')][_0x8729('0x21')]({'where':{'type':_0x432d0e,'resourceId':_0x5b2ad4['id']}})[_0x8729('0x20')](function(){return _0x2ab541;});})[_0x8729('0x20')](function(){_0x375696[_0x8729('0x16')](0xcc)[_0x8729('0x17')]();});}};}function handleEntityNotFound(_0x55fe7a,_0x359f57){return function(_0x51713a){if(!_0x51713a){_0x55fe7a[_0x8729('0x24')](0x194);}return _0x51713a;};}function handleError(_0x468e7c,_0x19d792){_0x19d792=_0x19d792||0x1f4;return function(_0x4a6818){logger['error'](_0x4a6818['stack']);if(_0x4a6818[_0x8729('0x25')]){delete _0x4a6818[_0x8729('0x25')];}_0x468e7c[_0x8729('0x16')](_0x19d792)[_0x8729('0x26')](_0x4a6818);};}exports[_0x8729('0x27')]=function(_0x5f2a67,_0x31f105){var _0x516cda={},_0x4aab03={},_0x319461={'count':0x0,'rows':[]};var _0x41db35=_[_0x8729('0x28')](db[_0x8729('0x29')][_0x8729('0x2a')],function(_0x3eaaee){return{'name':_0x3eaaee['fieldName'],'type':_0x3eaaee[_0x8729('0x2b')][_0x8729('0x2c')]};});_0x4aab03['model']=_['map'](_0x41db35,_0x8729('0x25'));_0x4aab03[_0x8729('0x2d')]=_['keys'](_0x5f2a67[_0x8729('0x2d')]);_0x4aab03[_0x8729('0x2e')]=_[_0x8729('0x2f')](_0x4aab03[_0x8729('0x30')],_0x4aab03[_0x8729('0x2d')]);_0x516cda[_0x8729('0x31')]=_[_0x8729('0x2f')](_0x4aab03[_0x8729('0x30')],qs[_0x8729('0x32')](_0x5f2a67[_0x8729('0x2d')]['fields']));_0x516cda[_0x8729('0x31')]=_0x516cda[_0x8729('0x31')][_0x8729('0x33')]?_0x516cda[_0x8729('0x31')]:_0x4aab03[_0x8729('0x30')];if(!_0x5f2a67[_0x8729('0x2d')]['hasOwnProperty'](_0x8729('0x34'))){_0x516cda[_0x8729('0x1b')]=qs[_0x8729('0x1b')](_0x5f2a67[_0x8729('0x2d')][_0x8729('0x1b')]);_0x516cda[_0x8729('0x1a')]=qs['offset'](_0x5f2a67[_0x8729('0x2d')][_0x8729('0x1a')]);}_0x516cda['order']=qs[_0x8729('0x35')](_0x5f2a67[_0x8729('0x2d')][_0x8729('0x35')]);_0x516cda['where']=qs[_0x8729('0x2e')](_[_0x8729('0x36')](_0x5f2a67[_0x8729('0x2d')],_0x4aab03['filters']));if(_0x5f2a67[_0x8729('0x2d')][_0x8729('0x37')]){_0x516cda[_0x8729('0x38')]=_['merge'](_0x516cda[_0x8729('0x38')],{'$or':_[_0x8729('0x28')](_0x41db35,function(_0x5cc06a){if(_0x5cc06a[_0x8729('0x2b')]!==_0x8729('0x39')){var _0x2fa298={};_0x2fa298[_0x5cc06a[_0x8729('0x25')]]={'$like':'%'+_0x5f2a67[_0x8729('0x2d')][_0x8729('0x37')]+'%'};return _0x2fa298;}})});}_0x516cda=_[_0x8729('0x3a')]({},_0x516cda,_0x5f2a67['options']);var _0x5b1322={'where':_0x516cda[_0x8729('0x38')]};return db[_0x8729('0x29')][_0x8729('0x19')](_0x5b1322)['then'](function(_0x2abd32){_0x319461[_0x8729('0x19')]=_0x2abd32;if(_0x5f2a67[_0x8729('0x2d')][_0x8729('0x3b')]){_0x516cda['include']=[{'all':!![]}];}return db[_0x8729('0x29')]['findAll'](_0x516cda);})['then'](function(_0x1e76b0){_0x319461[_0x8729('0x3c')]=_0x1e76b0;return _0x319461;})[_0x8729('0x20')](respondWithFilteredResult(_0x31f105,_0x516cda))[_0x8729('0x3d')](handleError(_0x31f105,null));};exports[_0x8729('0x3e')]=function(_0x349e99,_0x1768c6){var _0x33ed3b={'raw':![],'where':{'id':_0x349e99['params']['id']}},_0x4f2d2a={};_0x4f2d2a['model']=_[_0x8729('0x3f')](db['JscriptyProject']['rawAttributes']);_0x4f2d2a[_0x8729('0x2d')]=_['keys'](_0x349e99['query']);_0x4f2d2a[_0x8729('0x2e')]=_[_0x8729('0x2f')](_0x4f2d2a[_0x8729('0x30')],_0x4f2d2a['query']);_0x33ed3b[_0x8729('0x31')]=_[_0x8729('0x2f')](_0x4f2d2a['model'],qs['fields'](_0x349e99[_0x8729('0x2d')][_0x8729('0x32')]));_0x33ed3b[_0x8729('0x31')]=_0x33ed3b[_0x8729('0x31')][_0x8729('0x33')]?_0x33ed3b[_0x8729('0x31')]:_0x4f2d2a['model'];if(_0x349e99['query'][_0x8729('0x3b')]){_0x33ed3b[_0x8729('0x40')]=[{'all':!![]}];}_0x33ed3b=_['merge']({},_0x33ed3b,_0x349e99['options']);return db['JscriptyProject'][_0x8729('0x41')](_0x33ed3b)[_0x8729('0x20')](handleEntityNotFound(_0x1768c6,null))['then'](respondWithResult(_0x1768c6,null))[_0x8729('0x3d')](handleError(_0x1768c6,null));};exports[_0x8729('0x42')]=function(_0x51a6e8,_0x15a4ae){return db['JscriptyProject'][_0x8729('0x42')](_0x51a6e8[_0x8729('0x43')],{})[_0x8729('0x20')](function(_0x28ae0f){var _0x517bc1=_0x51a6e8[_0x8729('0x44')][_0x8729('0x45')]({'plain':!![]});if(!_0x517bc1)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x517bc1[_0x8729('0x46')]===_0x8729('0x44')){var _0x56a52e=_0x28ae0f['get']({'plain':!![]});var _0x262b25=_0x8729('0x22');return db['UserProfileSection'][_0x8729('0x41')]({'where':{'name':_0x262b25,'userProfileId':_0x517bc1[_0x8729('0x47')]},'raw':!![]})[_0x8729('0x20')](function(_0x2e42f5){if(_0x2e42f5&&_0x2e42f5[_0x8729('0x48')]===0x0){return db[_0x8729('0x23')]['create']({'name':_0x56a52e[_0x8729('0x25')],'resourceId':_0x56a52e['id'],'type':_0x2e42f5['name'],'sectionId':_0x2e42f5['id']},{})[_0x8729('0x20')](function(){return _0x28ae0f;});}else{return _0x28ae0f;}})[_0x8729('0x3d')](function(_0x39ce9f){logger[_0x8729('0x49')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x39ce9f);throw _0x39ce9f;});}return _0x28ae0f;})['then'](respondWithResult(_0x15a4ae,0xc9))[_0x8729('0x3d')](handleError(_0x15a4ae,null));};exports[_0x8729('0x4a')]=function(_0x2b5df0,_0x39a91f){var _0x4e4561={'where':{'id':_0x2b5df0[_0x8729('0x4b')]['id']}},_0x470cf1={};_0x470cf1[_0x8729('0x30')]=_[_0x8729('0x3f')](db[_0x8729('0x29')]['rawAttributes']);_0x4e4561[_0x8729('0x31')]=_[_0x8729('0x2f')](_0x470cf1['model'],qs[_0x8729('0x32')](_0x2b5df0[_0x8729('0x2d')][_0x8729('0x32')]));_0x4e4561[_0x8729('0x31')]=_0x4e4561['attributes'][_0x8729('0x33')]?_0x4e4561[_0x8729('0x31')]:_0x470cf1[_0x8729('0x30')];if(_0x2b5df0['query']['includeAll']){_0x4e4561['include']=[{'all':!![]}];}_0x4e4561=_[_0x8729('0x3a')]({},_0x4e4561,_0x2b5df0['options']);return db['JscriptyProject']['find'](_0x4e4561)[_0x8729('0x20')](handleEntityNotFound(_0x39a91f,null))[_0x8729('0x20')](function(_0x49b6fd){if(_0x49b6fd){var _0x3fee07=_0x49b6fd[_0x8729('0x45')]({'plain':!![]});_0x3fee07=qs[_0x8729('0x4c')](_0x3fee07,['id',_0x8729('0x4d'),_0x8729('0x4e')]);_0x2b5df0[_0x8729('0x43')]=_[_0x8729('0x4c')](_0x2b5df0[_0x8729('0x43')],['id',_0x8729('0x4d'),_0x8729('0x4e')]);return db[_0x8729('0x29')][_0x8729('0x42')](_[_0x8729('0x3a')](_0x3fee07,_0x2b5df0[_0x8729('0x43')]),{'include':_0x2b5df0['query'][_0x8729('0x3b')]?[{'all':!![]}]:undefined})[_0x8729('0x20')](function(_0x6f1f6a){var _0x3cae34=_0x2b5df0[_0x8729('0x44')]['get']({'plain':!![]});if(!_0x3cae34)throw new Error(_0x8729('0x4f'));if(_0x3cae34['role']===_0x8729('0x44')){var _0x247640=_0x6f1f6a[_0x8729('0x45')]({'plain':!![]});var _0x30516b=_0x8729('0x22');return db['UserProfileSection']['find']({'where':{'name':_0x30516b,'userProfileId':_0x3cae34['userProfileId']},'raw':!![]})[_0x8729('0x20')](function(_0x4b183c){if(_0x4b183c&&_0x4b183c[_0x8729('0x48')]===0x0){return db['UserProfileResource'][_0x8729('0x42')]({'name':_0x247640[_0x8729('0x25')],'resourceId':_0x247640['id'],'type':_0x4b183c['name'],'sectionId':_0x4b183c['id']},{})[_0x8729('0x20')](function(){return _0x6f1f6a;});}else{return _0x6f1f6a;}})['catch'](function(_0x471c16){logger[_0x8729('0x49')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x471c16);throw _0x471c16;});}return _0x6f1f6a;});}})[_0x8729('0x20')](respondWithResult(_0x39a91f,0xc9))[_0x8729('0x3d')](handleError(_0x39a91f,null));};exports[_0x8729('0x50')]=function(_0x4e9d87,_0x529c39){if(_0x4e9d87['body']['id']){delete _0x4e9d87['body']['id'];}return db[_0x8729('0x29')]['find']({'where':{'id':_0x4e9d87[_0x8729('0x4b')]['id']}})['then'](handleEntityNotFound(_0x529c39,null))[_0x8729('0x20')](saveUpdates(_0x4e9d87[_0x8729('0x43')],null))[_0x8729('0x20')](respondWithResult(_0x529c39,null))[_0x8729('0x3d')](handleError(_0x529c39,null));};exports[_0x8729('0x21')]=function(_0x54d3f9,_0x1cd922){return db[_0x8729('0x29')][_0x8729('0x41')]({'where':{'id':_0x54d3f9['params']['id']}})[_0x8729('0x20')](handleEntityNotFound(_0x1cd922,null))['then'](removeEntity(_0x1cd922,null))['catch'](handleError(_0x1cd922,null));};exports[_0x8729('0x51')]=function(_0x3897a9,_0x3c0bad,_0x2e65dc){var _0x438dc2={'raw':!![],'where':{}};var _0xed1230={};var _0x3b91af={'count':0x0,'rows':[]};return db['JscriptyProject']['findOne']({'where':{'id':_0x3897a9[_0x8729('0x4b')]['id']}})[_0x8729('0x20')](handleEntityNotFound(_0x3c0bad,null))[_0x8729('0x20')](function(_0x131031){if(_0x131031){_0xed1230[_0x8729('0x30')]=_[_0x8729('0x3f')](db[_0x8729('0x52')][_0x8729('0x2a')]);_0xed1230[_0x8729('0x2d')]=_[_0x8729('0x3f')](_0x3897a9[_0x8729('0x2d')]);_0xed1230['filters']=_[_0x8729('0x2f')](_0xed1230['model'],_0xed1230['query']);_0x438dc2[_0x8729('0x31')]=_[_0x8729('0x2f')](_0xed1230['model'],qs[_0x8729('0x32')](_0x3897a9[_0x8729('0x2d')][_0x8729('0x32')]));_0x438dc2['attributes']=_0x438dc2[_0x8729('0x31')][_0x8729('0x33')]?_0x438dc2[_0x8729('0x31')]:_0xed1230[_0x8729('0x30')];if(!_0x3897a9['query'][_0x8729('0x53')](_0x8729('0x34'))){_0x438dc2[_0x8729('0x1b')]=qs[_0x8729('0x1b')](_0x3897a9[_0x8729('0x2d')][_0x8729('0x1b')]);_0x438dc2[_0x8729('0x1a')]=qs['offset'](_0x3897a9[_0x8729('0x2d')][_0x8729('0x1a')]);}_0x438dc2['order']=qs[_0x8729('0x35')](_0x3897a9[_0x8729('0x2d')]['sort']);_0x438dc2['where']=qs['filters'](_['pick'](_0x3897a9['query'],_0xed1230[_0x8729('0x2e')]));_0x438dc2[_0x8729('0x38')]['ProjectId']=_0x131031['id'];if(_0x3897a9[_0x8729('0x2d')]['filter']){_0x438dc2[_0x8729('0x38')]=_['merge'](_0x438dc2[_0x8729('0x38')],{'$or':_[_0x8729('0x28')](_0x438dc2['attributes'],function(_0xf2df22){var _0x1e8df0={};_0x1e8df0[_0xf2df22]={'$like':'%'+_0x3897a9[_0x8729('0x2d')]['filter']+'%'};return _0x1e8df0;})});}_0x438dc2=_[_0x8729('0x3a')]({},_0x438dc2,_0x3897a9[_0x8729('0x54')]);return db['JscriptySessionReport'][_0x8729('0x19')]({'where':_0x438dc2['where']})[_0x8729('0x20')](function(_0x25b4e1){_0x3b91af[_0x8729('0x19')]=_0x25b4e1;if(_0x3897a9[_0x8729('0x2d')][_0x8729('0x3b')]){_0x438dc2[_0x8729('0x40')]=[{'all':!![]}];}return db['JscriptySessionReport']['findAll'](_0x438dc2);})[_0x8729('0x20')](function(_0x55cfaf){_0x3b91af[_0x8729('0x3c')]=_0x55cfaf;return _0x3b91af;});}})[_0x8729('0x20')](respondWithFilteredResult(_0x3c0bad,_0x438dc2))['catch'](handleError(_0x3c0bad,null));};exports[_0x8729('0x55')]=function(_0x1748d0,_0x18b9ac,_0x5ece50){var _0x2ba237={'raw':!![],'where':{}};var _0x13623c={};var _0x4b40a5={'count':0x0,'rows':[]};return db['JscriptyProject']['findOne']({'where':{'id':_0x1748d0[_0x8729('0x4b')]['id']}})['then'](handleEntityNotFound(_0x18b9ac,null))[_0x8729('0x20')](function(_0x1176e5){if(_0x1176e5){_0x13623c[_0x8729('0x30')]=_[_0x8729('0x3f')](db[_0x8729('0x56')][_0x8729('0x2a')]);_0x13623c[_0x8729('0x2d')]=_[_0x8729('0x3f')](_0x1748d0[_0x8729('0x2d')]);_0x13623c[_0x8729('0x2e')]=_['intersection'](_0x13623c['model'],_0x13623c[_0x8729('0x2d')]);_0x2ba237['attributes']=_['intersection'](_0x13623c['model'],qs['fields'](_0x1748d0['query'][_0x8729('0x32')]));_0x2ba237[_0x8729('0x31')]=_0x2ba237[_0x8729('0x31')][_0x8729('0x33')]?_0x2ba237[_0x8729('0x31')]:_0x13623c['model'];if(!_0x1748d0['query'][_0x8729('0x53')](_0x8729('0x34'))){_0x2ba237[_0x8729('0x1b')]=qs[_0x8729('0x1b')](_0x1748d0['query'][_0x8729('0x1b')]);_0x2ba237[_0x8729('0x1a')]=qs[_0x8729('0x1a')](_0x1748d0[_0x8729('0x2d')][_0x8729('0x1a')]);}_0x2ba237[_0x8729('0x57')]=qs['sort'](_0x1748d0[_0x8729('0x2d')][_0x8729('0x35')]);_0x2ba237[_0x8729('0x38')]=qs[_0x8729('0x2e')](_[_0x8729('0x36')](_0x1748d0[_0x8729('0x2d')],_0x13623c[_0x8729('0x2e')]));_0x2ba237['where']['ProjectId']=_0x1176e5['id'];if(_0x1748d0[_0x8729('0x2d')]['filter']){_0x2ba237[_0x8729('0x38')]=_['merge'](_0x2ba237['where'],{'$or':_[_0x8729('0x28')](_0x2ba237[_0x8729('0x31')],function(_0x3a32d4){var _0x5dd31a={};_0x5dd31a[_0x3a32d4]={'$like':'%'+_0x1748d0[_0x8729('0x2d')][_0x8729('0x37')]+'%'};return _0x5dd31a;})});}_0x2ba237=_[_0x8729('0x3a')]({},_0x2ba237,_0x1748d0['options']);return db[_0x8729('0x56')]['count']({'where':_0x2ba237[_0x8729('0x38')]})[_0x8729('0x20')](function(_0x188dbe){_0x4b40a5[_0x8729('0x19')]=_0x188dbe;if(_0x1748d0[_0x8729('0x2d')][_0x8729('0x3b')]){_0x2ba237[_0x8729('0x40')]=[{'all':!![]}];}return db['JscriptyAnswerReport'][_0x8729('0x58')](_0x2ba237);})[_0x8729('0x20')](function(_0x239ab8){_0x4b40a5[_0x8729('0x3c')]=_0x239ab8;return _0x4b40a5;});}})['then'](respondWithFilteredResult(_0x18b9ac,_0x2ba237))[_0x8729('0x3d')](handleError(_0x18b9ac,null));};function char(_0x2fa41b){return _0x8729('0x59')===typeof _0x2fa41b?String['fromCharCode'][_0x8729('0x1d')](null,arguments):_0x2fa41b;}function needsEncapsulation(_0x2f3da3){return!!_0x2f3da3&&(_0x2f3da3[_0x8729('0x5a')]()['indexOf'](char(0xd))>=0x0||_0x2f3da3[_0x8729('0x5a')]()[_0x8729('0x5b')](char(0xa))>=0x0||_0x2f3da3[_0x8729('0x5a')]()[_0x8729('0x5b')](char(0x2c))>=0x0||_0x2f3da3[_0x8729('0x5a')]()[_0x8729('0x5b')](char(0x22))>=0x0);}function encapsulate(_0x59f94c){var _0x48ed72=char(0x22),_0xa29f46='\x5c'+char(0x22),_0x2e1d14=_0x59f94c[_0x8729('0x5a')]()[_0x8729('0x5c')](new RegExp(_0x48ed72,'g'),_0xa29f46);return _0x48ed72+_0x2e1d14+_0x48ed72;}exports[_0x8729('0x5d')]=function(_0x1674f5,_0x3d65e4,_0x1b5724){var _0x37c9f7,_0x522eaa;var _0x21c9ca={'where':{'ProjectId':_0x1674f5[_0x8729('0x4b')]['id']}};if(_0x1674f5[_0x8729('0x2d')]['startTime']){_0x21c9ca[_0x8729('0x38')][_0x8729('0x5e')]=JSON['parse'](_0x1674f5[_0x8729('0x2d')][_0x8729('0x5f')]);}return db[_0x8729('0x52')][_0x8729('0x58')](_0x21c9ca)[_0x8729('0x20')](handleEntityNotFound(_0x3d65e4,null))['then'](function(_0x209dd0){if(_0x209dd0){_0x37c9f7=_0x209dd0;return db['JscriptyQuestionReport'][_0x8729('0x58')]({'where':{'SessionId':{'$in':_['map'](_0x37c9f7,'id')},'ProjectId':_0x1674f5[_0x8729('0x4b')]['id']},'order':_0x8729('0x60')});}})[_0x8729('0x20')](handleEntityNotFound(_0x3d65e4,null))['then'](function(_0x48e791){if(_0x48e791){_0x522eaa=_0x48e791;var _0x3b557a={};for(var _0x31bdc9=0x0,_0x4d336f=_0x522eaa[_0x8729('0x33')];_0x31bdc9<_0x4d336f;_0x31bdc9++){if(!_0x3b557a[_0x8729('0x53')](_0x522eaa[_0x31bdc9][_0x8729('0x61')])){_0x3b557a[_0x522eaa[_0x31bdc9][_0x8729('0x61')]]=needsEncapsulation(_0x522eaa[_0x31bdc9]['question'])?encapsulate(_0x522eaa[_0x31bdc9]['question']):_0x522eaa[_0x31bdc9][_0x8729('0x62')];}}var _0x2136cb=[],_0x4628a6={};for(var _0x4ae3db=0x0,_0x5ba8c1=_0x37c9f7[_0x8729('0x33')];_0x4ae3db<_0x5ba8c1;_0x4ae3db++){_0x4628a6={'ProjectId':_0x1674f5[_0x8729('0x4b')]['id'],'SessionId':_0x37c9f7[_0x4ae3db]['id'],'StartTime':moment(_0x37c9f7[_0x4ae3db]['starttime'])['format'](_0x8729('0x63'))};for(var _0x32a979=0x0,_0x6ff061=_0x522eaa['length'];_0x32a979<_0x6ff061;_0x32a979++){if(_0x522eaa[_0x32a979][_0x8729('0x64')]==_0x37c9f7[_0x4ae3db]['id']&&_0x3b557a[_0x8729('0x53')](_0x522eaa[_0x32a979][_0x8729('0x61')])){_0x4628a6[_0x3b557a[_0x522eaa[_0x32a979]['questionId']]]=_0x522eaa[_0x32a979][_0x8729('0x65')];}}for(var _0x51b256 in _0x3b557a){if(!_0x4628a6[_0x8729('0x53')](_0x3b557a[_0x51b256])){_0x4628a6[_0x3b557a[_0x51b256]]=null;}}_0x2136cb[_0x8729('0x66')](_0x4628a6);}return _0x2136cb;}})[_0x8729('0x20')](function(_0xf396d5){if(!_[_0x8729('0x67')](_0xf396d5)){var _0x2067ba=toCsv(_0xf396d5);var _0x43a455=Date[_0x8729('0x68')]();fs['writeFileSync'](util[_0x8729('0x69')](_0x8729('0x6a'),_0x1674f5[_0x8729('0x4b')]['id'],_0x43a455),_0x2067ba);_0x3d65e4[_0x8729('0x6b')]('Content-disposition','attachment;\x20filename='+util[_0x8729('0x69')](_0x8729('0x6c'),_0x1674f5[_0x8729('0x4b')]['id'],_0x43a455));_0x3d65e4['setHeader']('Content-type',_0x8729('0x6d'));return _0x3d65e4[_0x8729('0x6e')](util[_0x8729('0x69')](_0x8729('0x6a'),_0x1674f5['params']['id'],_0x43a455));}else{return _0x3d65e4['sendStatus'](0xcc);}})[_0x8729('0x3d')](handleError(_0x3d65e4,null));};
\ No newline at end of file
diff --git a/server/api/jscriptyProject/jscriptyProject.model.js b/server/api/jscriptyProject/jscriptyProject.model.js
index e46dd04..83c06a2 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 _0x4d4a=['path','rimraf','../../config/environment','exports','define','JscriptyProject','util','moment','bluebird','request-promise'];(function(_0x5200c4,_0x4d59a6){var _0x36cb24=function(_0x41bf1f){while(--_0x41bf1f){_0x5200c4['push'](_0x5200c4['shift']());}};_0x36cb24(++_0x4d59a6);}(_0x4d4a,0x74));var _0xa4d4=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x4d4a[_0x17d9e3];return _0x14192d;};'use strict';var _=require('lodash');var util=require(_0xa4d4('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0xa4d4('0x1'));var BPromise=require(_0xa4d4('0x2'));var rp=require(_0xa4d4('0x3'));var fs=require('fs');var path=require(_0xa4d4('0x4'));var rimraf=require(_0xa4d4('0x5'));var config=require(_0xa4d4('0x6'));var attributes=require('./jscriptyProject.attributes');module[_0xa4d4('0x7')]=function(_0x494af6,_0x55dfca){return _0x494af6[_0xa4d4('0x8')](_0xa4d4('0x9'),attributes,{'tableName':'jscripty_projects','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd166=['request-promise','path','rimraf','../../config/environment','./jscriptyProject.attributes','exports','JscriptyProject','jscripty_projects','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x44d5a4,_0x2e1506){var _0x285ba9=function(_0x57ec11){while(--_0x57ec11){_0x44d5a4['push'](_0x44d5a4['shift']());}};_0x285ba9(++_0x2e1506);}(_0xd166,0xf6));var _0x6d16=function(_0x2a1080,_0x4587c9){_0x2a1080=_0x2a1080-0x0;var _0x3a939a=_0xd166[_0x2a1080];return _0x3a939a;};'use strict';var _=require(_0x6d16('0x0'));var util=require(_0x6d16('0x1'));var logger=require(_0x6d16('0x2'))(_0x6d16('0x3'));var moment=require(_0x6d16('0x4'));var BPromise=require(_0x6d16('0x5'));var rp=require(_0x6d16('0x6'));var fs=require('fs');var path=require(_0x6d16('0x7'));var rimraf=require(_0x6d16('0x8'));var config=require(_0x6d16('0x9'));var attributes=require(_0x6d16('0xa'));module[_0x6d16('0xb')]=function(_0x4280e1,_0x2b3e31){return _0x4280e1['define'](_0x6d16('0xc'),attributes,{'tableName':_0x6d16('0xd'),'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 0e1de65..b342aef 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 _0x408e=['request\x20sent','stringify','error','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','then','info','JscriptyProject,\x20%s,\x20%s','debug','JscriptyProject,\x20%s,\x20%s,\x20%s'];(function(_0x54d5ac,_0x31a3f8){var _0x28dc98=function(_0x53a362){while(--_0x53a362){_0x54d5ac['push'](_0x54d5ac['shift']());}};_0x28dc98(++_0x31a3f8);}(_0x408e,0x1e6));var _0xe408=function(_0x15942a,_0x13b58c){_0x15942a=_0x15942a-0x0;var _0x36a9fb=_0x408e[_0x15942a];return _0x36a9fb;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xe408('0x0'));var BPromise=require(_0xe408('0x1'));var rs=require(_0xe408('0x2'));var fs=require('fs');var Redis=require(_0xe408('0x3'));var db=require(_0xe408('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xe408('0x5'))(_0xe408('0x6'));var config=require('../../config/environment');var jayson=require(_0xe408('0x7'));var client=jayson[_0xe408('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x7de91e,_0x5cb606,_0x55ac8c){return new BPromise(function(_0x132566,_0x15d209){return client['request'](_0x7de91e,_0x55ac8c)[_0xe408('0x9')](function(_0x27c3b3){logger[_0xe408('0xa')](_0xe408('0xb'),_0x5cb606,'request\x20sent');logger[_0xe408('0xc')](_0xe408('0xd'),_0x5cb606,_0xe408('0xe'),JSON[_0xe408('0xf')](_0x27c3b3));if(_0x27c3b3[_0xe408('0x10')]){if(_0x27c3b3['error']['code']===0x1f4){logger['error'](_0xe408('0xb'),_0x5cb606,_0x27c3b3[_0xe408('0x10')][_0xe408('0x11')]);return _0x15d209(_0x27c3b3['error'][_0xe408('0x11')]);}logger[_0xe408('0x10')](_0xe408('0xb'),_0x5cb606,_0x27c3b3['error'][_0xe408('0x11')]);return _0x132566(_0x27c3b3[_0xe408('0x10')][_0xe408('0x11')]);}else{logger[_0xe408('0xa')](_0xe408('0xb'),_0x5cb606,_0xe408('0xe'));_0x132566(_0x27c3b3[_0xe408('0x12')][_0xe408('0x11')]);}})[_0xe408('0x13')](function(_0x3c0a9e){logger[_0xe408('0x10')](_0xe408('0xb'),_0x5cb606,_0x3c0a9e);_0x15d209(_0x3c0a9e);});});}
\ No newline at end of file
+var _0x3b52=['result','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x3b52,0x1cf));var _0x23b5=function(_0x22a88c,_0x32e902){_0x22a88c=_0x22a88c-0x0;var _0x16beac=_0x3b52[_0x22a88c];return _0x16beac;};'use strict';var _=require(_0x23b5('0x0'));var util=require('util');var moment=require(_0x23b5('0x1'));var BPromise=require(_0x23b5('0x2'));var rs=require(_0x23b5('0x3'));var fs=require('fs');var Redis=require(_0x23b5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x23b5('0x5'));var logger=require('../../config/logger')(_0x23b5('0x6'));var config=require(_0x23b5('0x7'));var jayson=require(_0x23b5('0x8'));var client=jayson['client'][_0x23b5('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3950ca,_0x4b45bc,_0x64f578){return new BPromise(function(_0x31a36a,_0x4b1844){return client[_0x23b5('0xa')](_0x3950ca,_0x64f578)[_0x23b5('0xb')](function(_0x24a6cc){logger[_0x23b5('0xc')](_0x23b5('0xd'),_0x4b45bc,_0x23b5('0xe'));logger[_0x23b5('0xf')]('JscriptyProject,\x20%s,\x20%s,\x20%s',_0x4b45bc,_0x23b5('0xe'),JSON[_0x23b5('0x10')](_0x24a6cc));if(_0x24a6cc[_0x23b5('0x11')]){if(_0x24a6cc[_0x23b5('0x11')][_0x23b5('0x12')]===0x1f4){logger[_0x23b5('0x11')](_0x23b5('0xd'),_0x4b45bc,_0x24a6cc['error'][_0x23b5('0x13')]);return _0x4b1844(_0x24a6cc['error']['message']);}logger[_0x23b5('0x11')]('JscriptyProject,\x20%s,\x20%s',_0x4b45bc,_0x24a6cc['error'][_0x23b5('0x13')]);return _0x31a36a(_0x24a6cc['error'][_0x23b5('0x13')]);}else{logger[_0x23b5('0xc')](_0x23b5('0xd'),_0x4b45bc,_0x23b5('0xe'));_0x31a36a(_0x24a6cc[_0x23b5('0x14')][_0x23b5('0x13')]);}})['catch'](function(_0x26badd){logger[_0x23b5('0x11')]('JscriptyProject,\x20%s,\x20%s',_0x4b45bc,_0x26badd);_0x4b1844(_0x26badd);});});}
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/index.js b/server/api/jscriptyQuestionReport/index.js
index 711e9cb..04e0af9 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 _0xf3e7=['../../config/environment','./jscriptyQuestionReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post','create','put','destroy','exports','path','Router','../../components/auth/service'];(function(_0xbf3f20,_0x5bf459){var _0x4b8870=function(_0x59962d){while(--_0x59962d){_0xbf3f20['push'](_0xbf3f20['shift']());}};_0x4b8870(++_0x5bf459);}(_0xf3e7,0xad));var _0x7f3e=function(_0x3802f3,_0x4364e7){_0x3802f3=_0x3802f3-0x0;var _0x212c72=_0xf3e7[_0x3802f3];return _0x212c72;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x7f3e('0x0'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x7f3e('0x1')]();var auth=require(_0x7f3e('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0x7f3e('0x3'));var controller=require(_0x7f3e('0x4'));router[_0x7f3e('0x5')]('/',auth[_0x7f3e('0x6')](),controller[_0x7f3e('0x7')]);router[_0x7f3e('0x5')](_0x7f3e('0x8'),auth[_0x7f3e('0x6')](),controller[_0x7f3e('0x9')]);router['get'](_0x7f3e('0xa'),auth[_0x7f3e('0x6')](),controller['show']);router[_0x7f3e('0xb')]('/',auth[_0x7f3e('0x6')](),controller[_0x7f3e('0xc')]);router[_0x7f3e('0xd')](_0x7f3e('0xa'),auth[_0x7f3e('0x6')](),controller['update']);router['delete'](_0x7f3e('0xa'),auth[_0x7f3e('0x6')](),controller[_0x7f3e('0xe')]);module[_0x7f3e('0xf')]=router;
\ No newline at end of file
+var _0x53a0=['create','put','delete','destroy','multer','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./jscriptyQuestionReport.controller','get','isAuthenticated','/describe','describe','/:id','show','post'];(function(_0x50c492,_0x5c1e67){var _0x3505a8=function(_0x2f7937){while(--_0x2f7937){_0x50c492['push'](_0x50c492['shift']());}};_0x3505a8(++_0x5c1e67);}(_0x53a0,0x1d8));var _0x053a=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x53a0[_0x17d9e3];return _0x14192d;};'use strict';var multer=require(_0x053a('0x0'));var util=require(_0x053a('0x1'));var path=require('path');var timeout=require(_0x053a('0x2'));var express=require(_0x053a('0x3'));var router=express['Router']();var auth=require(_0x053a('0x4'));var interaction=require(_0x053a('0x5'));var config=require('../../config/environment');var controller=require(_0x053a('0x6'));router[_0x053a('0x7')]('/',auth[_0x053a('0x8')](),controller['index']);router[_0x053a('0x7')](_0x053a('0x9'),auth[_0x053a('0x8')](),controller[_0x053a('0xa')]);router['get'](_0x053a('0xb'),auth[_0x053a('0x8')](),controller[_0x053a('0xc')]);router[_0x053a('0xd')]('/',auth[_0x053a('0x8')](),controller[_0x053a('0xe')]);router[_0x053a('0xf')](_0x053a('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x053a('0x10')](_0x053a('0xb'),auth[_0x053a('0x8')](),controller[_0x053a('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js
index 8cd666e..40180c0 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 _0xb828=['STRING','TEXT','sequelize'];(function(_0x2dcf9e,_0x424c7b){var _0xaed68e=function(_0x775c6f){while(--_0x775c6f){_0x2dcf9e['push'](_0x2dcf9e['shift']());}};_0xaed68e(++_0x424c7b);}(_0xb828,0x1eb));var _0x8b82=function(_0x3441e9,_0x269c8a){_0x3441e9=_0x3441e9-0x0;var _0x7f9ada=_0xb828[_0x3441e9];return _0x7f9ada;};'use strict';var Sequelize=require(_0x8b82('0x0'));module['exports']={'question':{'type':Sequelize[_0x8b82('0x1')]},'answer':{'type':Sequelize[_0x8b82('0x2')]('long')},'membername':{'type':Sequelize[_0x8b82('0x1')]},'projectname':{'type':Sequelize[_0x8b82('0x1')]},'queue':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x8b82('0x1')]},'calleridnum':{'type':Sequelize[_0x8b82('0x1')]},'questionId':{'type':Sequelize[_0x8b82('0x1')]}};
\ No newline at end of file
+var _0x66e3=['sequelize','STRING','TEXT','long'];(function(_0x199572,_0x33e667){var _0x13cfa3=function(_0x53c075){while(--_0x53c075){_0x199572['push'](_0x199572['shift']());}};_0x13cfa3(++_0x33e667);}(_0x66e3,0xf0));var _0x366e=function(_0x48357b,_0x320618){_0x48357b=_0x48357b-0x0;var _0x29f49c=_0x66e3[_0x48357b];return _0x29f49c;};'use strict';var Sequelize=require(_0x366e('0x0'));module['exports']={'question':{'type':Sequelize[_0x366e('0x1')]},'answer':{'type':Sequelize[_0x366e('0x2')](_0x366e('0x3'))},'membername':{'type':Sequelize[_0x366e('0x1')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x366e('0x1')]},'uniqueid':{'type':Sequelize[_0x366e('0x1')]},'calleridname':{'type':Sequelize[_0x366e('0x1')]},'calleridnum':{'type':Sequelize[_0x366e('0x1')]},'questionId':{'type':Sequelize[_0x366e('0x1')]}};
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js
index 26e6954..f471f1d 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 _0xb6e3=['offset','limit','set','Content-Range','apply','save','update','then','destroy','sendStatus','error','stack','name','send','JscriptyQuestionReport','rawAttributes','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','find','create','body','params','describe','html-pdf','eml-format','fast-json-patch','bluebird','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','status','end','json'];(function(_0x3238bd,_0x4ea3ef){var _0xdc7a7e=function(_0x275fbc){while(--_0x275fbc){_0x3238bd['push'](_0x3238bd['shift']());}};_0xdc7a7e(++_0x4ea3ef);}(_0xb6e3,0x143));var _0x3b6e=function(_0x1e4360,_0x930b9b){_0x1e4360=_0x1e4360-0x0;var _0x31e6b4=_0xb6e3[_0x1e4360];return _0x31e6b4;};'use strict';var pdf=require(_0x3b6e('0x0'));var emlformat=require(_0x3b6e('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x3b6e('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x3b6e('0x3'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x3b6e('0x4'));var ejs=require(_0x3b6e('0x5'));var fs=require('fs');var _=require(_0x3b6e('0x6'));var squel=require(_0x3b6e('0x7'));var crypto=require(_0x3b6e('0x8'));var jsforce=require('jsforce');var deskjs=require(_0x3b6e('0x9'));var toCsv=require(_0x3b6e('0x4'));var querystring=require(_0x3b6e('0xa'));var Papa=require(_0x3b6e('0xb'));var Redis=require(_0x3b6e('0xc'));var authService=require(_0x3b6e('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0x3b6e('0xe'));var hardwareService=require(_0x3b6e('0xf'));var logger=require('../../config/logger')(_0x3b6e('0x10'));var utils=require(_0x3b6e('0x11'));var config=require(_0x3b6e('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3136eb,_0x2256ae){_0x2256ae=_0x2256ae||0xcc;return function(_0x2f6aa6){if(_0x2f6aa6){return _0x3136eb['sendStatus'](_0x2256ae);}return _0x3136eb[_0x3b6e('0x13')](_0x2256ae)[_0x3b6e('0x14')]();};}function respondWithResult(_0x59fa51,_0x1a16b3){_0x1a16b3=_0x1a16b3||0xc8;return function(_0x4cc5c3){if(_0x4cc5c3){return _0x59fa51['status'](_0x1a16b3)[_0x3b6e('0x15')](_0x4cc5c3);}};}function respondWithFilteredResult(_0x3584d0,_0x5b62af){return function(_0x19e7dd){if(_0x19e7dd){var _0x4b14ad=_0x19e7dd['count'],_0x56bfaf=_0x5b62af[_0x3b6e('0x16')],_0x56730d=_0x5b62af[_0x3b6e('0x16')]+_0x5b62af[_0x3b6e('0x17')],_0x285ae5;if(_0x56730d>=_0x4b14ad){_0x56730d=_0x4b14ad;_0x285ae5=0xc8;}else{_0x285ae5=0xce;}_0x3584d0[_0x3b6e('0x13')](_0x285ae5);return _0x3584d0[_0x3b6e('0x18')](_0x3b6e('0x19'),_0x56bfaf+'-'+_0x56730d+'/'+_0x4b14ad)[_0x3b6e('0x15')](_0x19e7dd);}return null;};}function patchUpdates(_0x425a7e){return function(_0x406f23){try{jsonpatch[_0x3b6e('0x1a')](_0x406f23,_0x425a7e,!![]);}catch(_0xa27d8f){return BPromise['reject'](_0xa27d8f);}return _0x406f23[_0x3b6e('0x1b')]();};}function saveUpdates(_0x501ac9,_0x20bced){return function(_0x55bd4c){if(_0x55bd4c){return _0x55bd4c[_0x3b6e('0x1c')](_0x501ac9)[_0x3b6e('0x1d')](function(_0x1c2b9d){return _0x1c2b9d;});}return null;};}function removeEntity(_0x4f551f,_0x5ed260){return function(_0x27ab8f){if(_0x27ab8f){return _0x27ab8f[_0x3b6e('0x1e')]()[_0x3b6e('0x1d')](function(){_0x4f551f[_0x3b6e('0x13')](0xcc)[_0x3b6e('0x14')]();});}};}function handleEntityNotFound(_0x5308fd,_0x28b555){return function(_0x52ae7e){if(!_0x52ae7e){_0x5308fd[_0x3b6e('0x1f')](0x194);}return _0x52ae7e;};}function handleError(_0x318250,_0x23efd4){_0x23efd4=_0x23efd4||0x1f4;return function(_0x1c6b3e){logger[_0x3b6e('0x20')](_0x1c6b3e[_0x3b6e('0x21')]);if(_0x1c6b3e['name']){delete _0x1c6b3e[_0x3b6e('0x22')];}_0x318250[_0x3b6e('0x13')](_0x23efd4)[_0x3b6e('0x23')](_0x1c6b3e);};}exports['index']=function(_0x2fa4bb,_0x266879){var _0x4188f6={},_0x128fd8={},_0x3abb9f={'count':0x0,'rows':[]};var _0x41a603=_['map'](db[_0x3b6e('0x24')][_0x3b6e('0x25')],function(_0x56c216){return{'name':_0x56c216['fieldName'],'type':_0x56c216[_0x3b6e('0x26')][_0x3b6e('0x27')]};});_0x128fd8[_0x3b6e('0x28')]=_[_0x3b6e('0x29')](_0x41a603,'name');_0x128fd8[_0x3b6e('0x2a')]=_[_0x3b6e('0x2b')](_0x2fa4bb[_0x3b6e('0x2a')]);_0x128fd8[_0x3b6e('0x2c')]=_[_0x3b6e('0x2d')](_0x128fd8['model'],_0x128fd8[_0x3b6e('0x2a')]);_0x4188f6['attributes']=_[_0x3b6e('0x2d')](_0x128fd8[_0x3b6e('0x28')],qs[_0x3b6e('0x2e')](_0x2fa4bb[_0x3b6e('0x2a')][_0x3b6e('0x2e')]));_0x4188f6[_0x3b6e('0x2f')]=_0x4188f6[_0x3b6e('0x2f')][_0x3b6e('0x30')]?_0x4188f6[_0x3b6e('0x2f')]:_0x128fd8['model'];if(!_0x2fa4bb['query'][_0x3b6e('0x31')](_0x3b6e('0x32'))){_0x4188f6[_0x3b6e('0x17')]=qs[_0x3b6e('0x17')](_0x2fa4bb[_0x3b6e('0x2a')][_0x3b6e('0x17')]);_0x4188f6[_0x3b6e('0x16')]=qs[_0x3b6e('0x16')](_0x2fa4bb[_0x3b6e('0x2a')][_0x3b6e('0x16')]);}_0x4188f6['order']=qs[_0x3b6e('0x33')](_0x2fa4bb[_0x3b6e('0x2a')][_0x3b6e('0x33')]);_0x4188f6['where']=qs[_0x3b6e('0x2c')](_[_0x3b6e('0x34')](_0x2fa4bb[_0x3b6e('0x2a')],_0x128fd8['filters']));if(_0x2fa4bb['query'][_0x3b6e('0x35')]){_0x4188f6[_0x3b6e('0x36')]=_[_0x3b6e('0x37')](_0x4188f6[_0x3b6e('0x36')],{'$or':_[_0x3b6e('0x29')](_0x41a603,function(_0x242b30){if(_0x242b30['type']!==_0x3b6e('0x38')){var _0x4635dd={};_0x4635dd[_0x242b30[_0x3b6e('0x22')]]={'$like':'%'+_0x2fa4bb[_0x3b6e('0x2a')]['filter']+'%'};return _0x4635dd;}})});}_0x4188f6=_['merge']({},_0x4188f6,_0x2fa4bb[_0x3b6e('0x39')]);var _0x3576cd={'where':_0x4188f6['where']};return db[_0x3b6e('0x24')][_0x3b6e('0x3a')](_0x3576cd)['then'](function(_0x3f7701){_0x3abb9f[_0x3b6e('0x3a')]=_0x3f7701;if(_0x2fa4bb[_0x3b6e('0x2a')][_0x3b6e('0x3b')]){_0x4188f6[_0x3b6e('0x3c')]=[{'all':!![]}];}return db[_0x3b6e('0x24')][_0x3b6e('0x3d')](_0x4188f6);})[_0x3b6e('0x1d')](function(_0x2f4fd0){_0x3abb9f[_0x3b6e('0x3e')]=_0x2f4fd0;return _0x3abb9f;})['then'](respondWithFilteredResult(_0x266879,_0x4188f6))[_0x3b6e('0x3f')](handleError(_0x266879,null));};exports['show']=function(_0xa5fa91,_0x3b7888){var _0x1bd786={'raw':!![],'where':{'id':_0xa5fa91['params']['id']}},_0x5cb84a={};_0x5cb84a[_0x3b6e('0x28')]=_['keys'](db['JscriptyQuestionReport'][_0x3b6e('0x25')]);_0x5cb84a['query']=_[_0x3b6e('0x2b')](_0xa5fa91[_0x3b6e('0x2a')]);_0x5cb84a['filters']=_[_0x3b6e('0x2d')](_0x5cb84a[_0x3b6e('0x28')],_0x5cb84a[_0x3b6e('0x2a')]);_0x1bd786[_0x3b6e('0x2f')]=_[_0x3b6e('0x2d')](_0x5cb84a[_0x3b6e('0x28')],qs['fields'](_0xa5fa91[_0x3b6e('0x2a')][_0x3b6e('0x2e')]));_0x1bd786[_0x3b6e('0x2f')]=_0x1bd786[_0x3b6e('0x2f')][_0x3b6e('0x30')]?_0x1bd786['attributes']:_0x5cb84a[_0x3b6e('0x28')];if(_0xa5fa91[_0x3b6e('0x2a')]['includeAll']){_0x1bd786[_0x3b6e('0x3c')]=[{'all':!![]}];}_0x1bd786=_[_0x3b6e('0x37')]({},_0x1bd786,_0xa5fa91['options']);return db[_0x3b6e('0x24')][_0x3b6e('0x40')](_0x1bd786)[_0x3b6e('0x1d')](handleEntityNotFound(_0x3b7888,null))['then'](respondWithResult(_0x3b7888,null))['catch'](handleError(_0x3b7888,null));};exports[_0x3b6e('0x41')]=function(_0x3716d0,_0xbf46e1){return db[_0x3b6e('0x24')][_0x3b6e('0x41')](_0x3716d0['body'],{})[_0x3b6e('0x1d')](respondWithResult(_0xbf46e1,0xc9))['catch'](handleError(_0xbf46e1,null));};exports[_0x3b6e('0x1c')]=function(_0xb06f68,_0xf22142){if(_0xb06f68['body']['id']){delete _0xb06f68[_0x3b6e('0x42')]['id'];}return db['JscriptyQuestionReport'][_0x3b6e('0x40')]({'where':{'id':_0xb06f68[_0x3b6e('0x43')]['id']}})[_0x3b6e('0x1d')](handleEntityNotFound(_0xf22142,null))[_0x3b6e('0x1d')](saveUpdates(_0xb06f68[_0x3b6e('0x42')],null))[_0x3b6e('0x1d')](respondWithResult(_0xf22142,null))['catch'](handleError(_0xf22142,null));};exports[_0x3b6e('0x1e')]=function(_0x35a9d2,_0x38c3f9){return db[_0x3b6e('0x24')][_0x3b6e('0x40')]({'where':{'id':_0x35a9d2[_0x3b6e('0x43')]['id']}})[_0x3b6e('0x1d')](handleEntityNotFound(_0x38c3f9,null))[_0x3b6e('0x1d')](removeEntity(_0x38c3f9,null))[_0x3b6e('0x3f')](handleError(_0x38c3f9,null));};exports[_0x3b6e('0x44')]=function(_0x21bbff,_0x13e259){return db[_0x3b6e('0x24')][_0x3b6e('0x44')]()['then'](respondWithResult(_0x13e259,null))[_0x3b6e('0x3f')](handleError(_0x13e259,null));};
\ No newline at end of file
+var _0xf286=['attributes','fields','query','length','hasOwnProperty','sort','where','filters','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','find','create','body','describe','html-pdf','eml-format','zip-dir','mustache','util','path','to-csv','lodash','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','Content-Range','reject','save','update','destroy','then','error','stack','name','index','map','JscriptyQuestionReport','rawAttributes','key','keys','intersection','model'];(function(_0x55f1e4,_0x2a7b9e){var _0x195102=function(_0x236b80){while(--_0x236b80){_0x55f1e4['push'](_0x55f1e4['shift']());}};_0x195102(++_0x2a7b9e);}(_0xf286,0x1de));var _0x6f28=function(_0x256d6a,_0x2f002f){_0x256d6a=_0x256d6a-0x0;var _0x460058=_0xf286[_0x256d6a];return _0x460058;};'use strict';var pdf=require(_0x6f28('0x0'));var emlformat=require(_0x6f28('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x6f28('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x6f28('0x3'));var util=require(_0x6f28('0x4'));var path=require(_0x6f28('0x5'));var sox=require('sox');var csv=require(_0x6f28('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x6f28('0x7'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x6f28('0x8'));var toCsv=require(_0x6f28('0x6'));var querystring=require(_0x6f28('0x9'));var Papa=require(_0x6f28('0xa'));var Redis=require('ioredis');var authService=require(_0x6f28('0xb'));var qs=require(_0x6f28('0xc'));var as=require(_0x6f28('0xd'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6f28('0xe'));var utils=require(_0x6f28('0xf'));var config=require(_0x6f28('0x10'));var db=require(_0x6f28('0x11'))['db'];function respondWithStatusCode(_0x47b90a,_0x46b3d2){_0x46b3d2=_0x46b3d2||0xcc;return function(_0x3381fb){if(_0x3381fb){return _0x47b90a[_0x6f28('0x12')](_0x46b3d2);}return _0x47b90a[_0x6f28('0x13')](_0x46b3d2)[_0x6f28('0x14')]();};}function respondWithResult(_0x1bd900,_0x19f716){_0x19f716=_0x19f716||0xc8;return function(_0x967a11){if(_0x967a11){return _0x1bd900[_0x6f28('0x13')](_0x19f716)[_0x6f28('0x15')](_0x967a11);}};}function respondWithFilteredResult(_0x166b50,_0x8c0972){return function(_0xcf9a08){if(_0xcf9a08){var _0x4b9a98=_0xcf9a08[_0x6f28('0x16')],_0x34a558=_0x8c0972[_0x6f28('0x17')],_0x2c8f78=_0x8c0972[_0x6f28('0x17')]+_0x8c0972[_0x6f28('0x18')],_0xc42f18;if(_0x2c8f78>=_0x4b9a98){_0x2c8f78=_0x4b9a98;_0xc42f18=0xc8;}else{_0xc42f18=0xce;}_0x166b50[_0x6f28('0x13')](_0xc42f18);return _0x166b50['set'](_0x6f28('0x19'),_0x34a558+'-'+_0x2c8f78+'/'+_0x4b9a98)[_0x6f28('0x15')](_0xcf9a08);}return null;};}function patchUpdates(_0x37ab78){return function(_0x3cdfc6){try{jsonpatch['apply'](_0x3cdfc6,_0x37ab78,!![]);}catch(_0xd44add){return BPromise[_0x6f28('0x1a')](_0xd44add);}return _0x3cdfc6[_0x6f28('0x1b')]();};}function saveUpdates(_0x8aa0e2,_0x5576ee){return function(_0x1c5b41){if(_0x1c5b41){return _0x1c5b41[_0x6f28('0x1c')](_0x8aa0e2)['then'](function(_0x372bdd){return _0x372bdd;});}return null;};}function removeEntity(_0x5f02aa,_0x303327){return function(_0x4fc4fd){if(_0x4fc4fd){return _0x4fc4fd[_0x6f28('0x1d')]()[_0x6f28('0x1e')](function(){_0x5f02aa['status'](0xcc)[_0x6f28('0x14')]();});}};}function handleEntityNotFound(_0x5560ff,_0x31f460){return function(_0x5cc3c2){if(!_0x5cc3c2){_0x5560ff[_0x6f28('0x12')](0x194);}return _0x5cc3c2;};}function handleError(_0x455183,_0x128542){_0x128542=_0x128542||0x1f4;return function(_0x416c27){logger[_0x6f28('0x1f')](_0x416c27[_0x6f28('0x20')]);if(_0x416c27['name']){delete _0x416c27[_0x6f28('0x21')];}_0x455183[_0x6f28('0x13')](_0x128542)['send'](_0x416c27);};}exports[_0x6f28('0x22')]=function(_0x3b0c05,_0x4943f8){var _0x2ed005={},_0x3e5988={},_0x48ab68={'count':0x0,'rows':[]};var _0x2bba7a=_[_0x6f28('0x23')](db[_0x6f28('0x24')][_0x6f28('0x25')],function(_0xc0ffb4){return{'name':_0xc0ffb4['fieldName'],'type':_0xc0ffb4['type'][_0x6f28('0x26')]};});_0x3e5988['model']=_[_0x6f28('0x23')](_0x2bba7a,'name');_0x3e5988['query']=_[_0x6f28('0x27')](_0x3b0c05['query']);_0x3e5988['filters']=_[_0x6f28('0x28')](_0x3e5988[_0x6f28('0x29')],_0x3e5988['query']);_0x2ed005[_0x6f28('0x2a')]=_[_0x6f28('0x28')](_0x3e5988[_0x6f28('0x29')],qs[_0x6f28('0x2b')](_0x3b0c05[_0x6f28('0x2c')][_0x6f28('0x2b')]));_0x2ed005[_0x6f28('0x2a')]=_0x2ed005['attributes'][_0x6f28('0x2d')]?_0x2ed005[_0x6f28('0x2a')]:_0x3e5988['model'];if(!_0x3b0c05[_0x6f28('0x2c')][_0x6f28('0x2e')]('nolimit')){_0x2ed005['limit']=qs[_0x6f28('0x18')](_0x3b0c05[_0x6f28('0x2c')][_0x6f28('0x18')]);_0x2ed005[_0x6f28('0x17')]=qs['offset'](_0x3b0c05[_0x6f28('0x2c')]['offset']);}_0x2ed005['order']=qs['sort'](_0x3b0c05[_0x6f28('0x2c')][_0x6f28('0x2f')]);_0x2ed005[_0x6f28('0x30')]=qs[_0x6f28('0x31')](_['pick'](_0x3b0c05[_0x6f28('0x2c')],_0x3e5988[_0x6f28('0x31')]));if(_0x3b0c05[_0x6f28('0x2c')][_0x6f28('0x32')]){_0x2ed005[_0x6f28('0x30')]=_[_0x6f28('0x33')](_0x2ed005[_0x6f28('0x30')],{'$or':_[_0x6f28('0x23')](_0x2bba7a,function(_0x49439d){if(_0x49439d[_0x6f28('0x34')]!==_0x6f28('0x35')){var _0x1a3f07={};_0x1a3f07[_0x49439d[_0x6f28('0x21')]]={'$like':'%'+_0x3b0c05['query']['filter']+'%'};return _0x1a3f07;}})});}_0x2ed005=_[_0x6f28('0x33')]({},_0x2ed005,_0x3b0c05[_0x6f28('0x36')]);var _0x29352d={'where':_0x2ed005[_0x6f28('0x30')]};return db[_0x6f28('0x24')][_0x6f28('0x16')](_0x29352d)[_0x6f28('0x1e')](function(_0x46adc9){_0x48ab68[_0x6f28('0x16')]=_0x46adc9;if(_0x3b0c05[_0x6f28('0x2c')][_0x6f28('0x37')]){_0x2ed005[_0x6f28('0x38')]=[{'all':!![]}];}return db[_0x6f28('0x24')][_0x6f28('0x39')](_0x2ed005);})[_0x6f28('0x1e')](function(_0x50aabb){_0x48ab68[_0x6f28('0x3a')]=_0x50aabb;return _0x48ab68;})[_0x6f28('0x1e')](respondWithFilteredResult(_0x4943f8,_0x2ed005))[_0x6f28('0x3b')](handleError(_0x4943f8,null));};exports['show']=function(_0xa749cc,_0x54964c){var _0x716af2={'raw':!![],'where':{'id':_0xa749cc[_0x6f28('0x3c')]['id']}},_0x4b2c9f={};_0x4b2c9f[_0x6f28('0x29')]=_[_0x6f28('0x27')](db['JscriptyQuestionReport']['rawAttributes']);_0x4b2c9f[_0x6f28('0x2c')]=_[_0x6f28('0x27')](_0xa749cc[_0x6f28('0x2c')]);_0x4b2c9f[_0x6f28('0x31')]=_[_0x6f28('0x28')](_0x4b2c9f[_0x6f28('0x29')],_0x4b2c9f['query']);_0x716af2[_0x6f28('0x2a')]=_[_0x6f28('0x28')](_0x4b2c9f['model'],qs[_0x6f28('0x2b')](_0xa749cc[_0x6f28('0x2c')]['fields']));_0x716af2['attributes']=_0x716af2[_0x6f28('0x2a')]['length']?_0x716af2['attributes']:_0x4b2c9f[_0x6f28('0x29')];if(_0xa749cc[_0x6f28('0x2c')][_0x6f28('0x37')]){_0x716af2[_0x6f28('0x38')]=[{'all':!![]}];}_0x716af2=_[_0x6f28('0x33')]({},_0x716af2,_0xa749cc[_0x6f28('0x36')]);return db[_0x6f28('0x24')][_0x6f28('0x3d')](_0x716af2)['then'](handleEntityNotFound(_0x54964c,null))[_0x6f28('0x1e')](respondWithResult(_0x54964c,null))['catch'](handleError(_0x54964c,null));};exports[_0x6f28('0x3e')]=function(_0x45a45d,_0x2c65b3){return db['JscriptyQuestionReport'][_0x6f28('0x3e')](_0x45a45d[_0x6f28('0x3f')],{})[_0x6f28('0x1e')](respondWithResult(_0x2c65b3,0xc9))[_0x6f28('0x3b')](handleError(_0x2c65b3,null));};exports['update']=function(_0x5d95e2,_0x2dc78a){if(_0x5d95e2['body']['id']){delete _0x5d95e2[_0x6f28('0x3f')]['id'];}return db[_0x6f28('0x24')][_0x6f28('0x3d')]({'where':{'id':_0x5d95e2[_0x6f28('0x3c')]['id']}})[_0x6f28('0x1e')](handleEntityNotFound(_0x2dc78a,null))[_0x6f28('0x1e')](saveUpdates(_0x5d95e2[_0x6f28('0x3f')],null))[_0x6f28('0x1e')](respondWithResult(_0x2dc78a,null))[_0x6f28('0x3b')](handleError(_0x2dc78a,null));};exports[_0x6f28('0x1d')]=function(_0x54fb4d,_0x43bc9f){return db[_0x6f28('0x24')][_0x6f28('0x3d')]({'where':{'id':_0x54fb4d[_0x6f28('0x3c')]['id']}})[_0x6f28('0x1e')](handleEntityNotFound(_0x43bc9f,null))['then'](removeEntity(_0x43bc9f,null))['catch'](handleError(_0x43bc9f,null));};exports[_0x6f28('0x40')]=function(_0x4f0f75,_0x2e338e){return db[_0x6f28('0x24')][_0x6f28('0x40')]()['then'](respondWithResult(_0x2e338e,null))[_0x6f28('0x3b')](handleError(_0x2e338e,null));};
\ No newline at end of file
diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js
index 3c364c1..647a5b3 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 _0x2a03=['JscriptyQuestionReport','report_jscripty_questions','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./jscriptyQuestionReport.attributes','exports','define'];(function(_0x5c1ae8,_0x210dba){var _0x54385b=function(_0x51e04f){while(--_0x51e04f){_0x5c1ae8['push'](_0x5c1ae8['shift']());}};_0x54385b(++_0x210dba);}(_0x2a03,0x9e));var _0x32a0=function(_0x15b33d,_0x3a17b0){_0x15b33d=_0x15b33d-0x0;var _0x3b09b6=_0x2a03[_0x15b33d];return _0x3b09b6;};'use strict';var _=require(_0x32a0('0x0'));var util=require(_0x32a0('0x1'));var logger=require(_0x32a0('0x2'))(_0x32a0('0x3'));var moment=require(_0x32a0('0x4'));var BPromise=require(_0x32a0('0x5'));var rp=require(_0x32a0('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x32a0('0x7'));var config=require('../../config/environment');var attributes=require(_0x32a0('0x8'));module[_0x32a0('0x9')]=function(_0x821538,_0x3f9e59){return _0x821538[_0x32a0('0xa')](_0x32a0('0xb'),attributes,{'tableName':_0x32a0('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3f5d=['JscriptyQuestionReport','report_jscripty_questions','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./jscriptyQuestionReport.attributes','exports','define'];(function(_0x34021d,_0x753aa6){var _0x16597b=function(_0x2d040a){while(--_0x2d040a){_0x34021d['push'](_0x34021d['shift']());}};_0x16597b(++_0x753aa6);}(_0x3f5d,0xaa));var _0xd3f5=function(_0x51e880,_0x50d425){_0x51e880=_0x51e880-0x0;var _0x3b6e64=_0x3f5d[_0x51e880];return _0x3b6e64;};'use strict';var _=require(_0xd3f5('0x0'));var util=require(_0xd3f5('0x1'));var logger=require(_0xd3f5('0x2'))(_0xd3f5('0x3'));var moment=require(_0xd3f5('0x4'));var BPromise=require(_0xd3f5('0x5'));var rp=require(_0xd3f5('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd3f5('0x7'));var config=require(_0xd3f5('0x8'));var attributes=require(_0xd3f5('0x9'));module[_0xd3f5('0xa')]=function(_0x6018ee,_0x715631){return _0x6018ee[_0xd3f5('0xb')](_0xd3f5('0xc'),attributes,{'tableName':_0xd3f5('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 aa7b46d..40d17a0 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 _0x6754=['lodash','util','moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','then','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x6754,0x108));var _0x4675=function(_0x544f1d,_0x2b946a){_0x544f1d=_0x544f1d-0x0;var _0xa329a7=_0x6754[_0x544f1d];return _0xa329a7;};'use strict';var _=require(_0x4675('0x0'));var util=require(_0x4675('0x1'));var moment=require(_0x4675('0x2'));var BPromise=require(_0x4675('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4675('0x4'))['db'];var utils=require(_0x4675('0x5'));var logger=require('../../config/logger')(_0x4675('0x6'));var config=require(_0x4675('0x7'));var jayson=require(_0x4675('0x8'));var client=jayson['client'][_0x4675('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x592202,_0x46ede2,_0x1a0a4c){return new BPromise(function(_0x3ac882,_0x38f93a){return client['request'](_0x592202,_0x1a0a4c)[_0x4675('0xa')](function(_0x2fea48){logger[_0x4675('0xb')](_0x4675('0xc'),_0x46ede2,_0x4675('0xd'));logger[_0x4675('0xe')](_0x4675('0xf'),_0x46ede2,_0x4675('0xd'),JSON[_0x4675('0x10')](_0x2fea48));if(_0x2fea48[_0x4675('0x11')]){if(_0x2fea48[_0x4675('0x11')][_0x4675('0x12')]===0x1f4){logger[_0x4675('0x11')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x46ede2,_0x2fea48[_0x4675('0x11')]['message']);return _0x38f93a(_0x2fea48[_0x4675('0x11')]['message']);}logger[_0x4675('0x11')](_0x4675('0xc'),_0x46ede2,_0x2fea48[_0x4675('0x11')][_0x4675('0x13')]);return _0x3ac882(_0x2fea48[_0x4675('0x11')][_0x4675('0x13')]);}else{logger['info']('JscriptyQuestionReport,\x20%s,\x20%s',_0x46ede2,'request\x20sent');_0x3ac882(_0x2fea48[_0x4675('0x14')][_0x4675('0x13')]);}})[_0x4675('0x15')](function(_0x4e803e){logger[_0x4675('0x11')](_0x4675('0xc'),_0x46ede2,_0x4e803e);_0x38f93a(_0x4e803e);});});}
\ No newline at end of file
+var _0x02ba=['debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','JscriptyQuestionReport,\x20%s,\x20%s'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x02ba,0xda));var _0xa02b=function(_0x486aa6,_0x34ce3d){_0x486aa6=_0x486aa6-0x0;var _0xb380f6=_0x02ba[_0x486aa6];return _0xb380f6;};'use strict';var _=require('lodash');var util=require(_0xa02b('0x0'));var moment=require('moment');var BPromise=require(_0xa02b('0x1'));var rs=require(_0xa02b('0x2'));var fs=require('fs');var Redis=require(_0xa02b('0x3'));var db=require(_0xa02b('0x4'))['db'];var utils=require(_0xa02b('0x5'));var logger=require(_0xa02b('0x6'))(_0xa02b('0x7'));var config=require('../../config/environment');var jayson=require(_0xa02b('0x8'));var client=jayson[_0xa02b('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x101146,_0x4d86b7,_0x5f30f7){return new BPromise(function(_0x4fe0b9,_0x2c64c5){return client[_0xa02b('0xa')](_0x101146,_0x5f30f7)[_0xa02b('0xb')](function(_0x25700e){logger['info'](_0xa02b('0xc'),_0x4d86b7,'request\x20sent');logger[_0xa02b('0xd')](_0xa02b('0xe'),_0x4d86b7,_0xa02b('0xf'),JSON[_0xa02b('0x10')](_0x25700e));if(_0x25700e[_0xa02b('0x11')]){if(_0x25700e[_0xa02b('0x11')]['code']===0x1f4){logger[_0xa02b('0x11')](_0xa02b('0xc'),_0x4d86b7,_0x25700e['error'][_0xa02b('0x12')]);return _0x2c64c5(_0x25700e[_0xa02b('0x11')][_0xa02b('0x12')]);}logger[_0xa02b('0x11')](_0xa02b('0xc'),_0x4d86b7,_0x25700e[_0xa02b('0x11')]['message']);return _0x4fe0b9(_0x25700e[_0xa02b('0x11')]['message']);}else{logger[_0xa02b('0x13')](_0xa02b('0xc'),_0x4d86b7,_0xa02b('0xf'));_0x4fe0b9(_0x25700e['result'][_0xa02b('0x12')]);}})[_0xa02b('0x14')](function(_0x33bf53){logger['error'](_0xa02b('0xc'),_0x4d86b7,_0x33bf53);_0x2c64c5(_0x33bf53);});});}
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/index.js b/server/api/jscriptySessionReport/index.js
index 066ed10..6163fa8 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 _0x3036=['describe','/:id','isAuthenticated','show','/:id/questions','getQuestions','create','put','delete','destroy','exports','path','connect-timeout','express','../../components/auth/service','get','index','/describe'];(function(_0x2f1762,_0xab43df){var _0x8ab21=function(_0xf6c1f5){while(--_0xf6c1f5){_0x2f1762['push'](_0x2f1762['shift']());}};_0x8ab21(++_0xab43df);}(_0x3036,0x1a9));var _0x6303=function(_0x23940a,_0x3708d8){_0x23940a=_0x23940a-0x0;var _0x21d480=_0x3036[_0x23940a];return _0x21d480;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x6303('0x0'));var timeout=require(_0x6303('0x1'));var express=require(_0x6303('0x2'));var router=express['Router']();var auth=require(_0x6303('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./jscriptySessionReport.controller');router[_0x6303('0x4')]('/',auth['isAuthenticated'](),controller[_0x6303('0x5')]);router[_0x6303('0x4')](_0x6303('0x6'),auth['isAuthenticated'](),controller[_0x6303('0x7')]);router[_0x6303('0x4')](_0x6303('0x8'),auth[_0x6303('0x9')](),controller[_0x6303('0xa')]);router[_0x6303('0x4')](_0x6303('0xb'),auth[_0x6303('0x9')](),controller[_0x6303('0xc')]);router['post']('/',auth[_0x6303('0x9')](),controller[_0x6303('0xd')]);router[_0x6303('0xe')](_0x6303('0x8'),auth[_0x6303('0x9')](),controller['update']);router[_0x6303('0xf')](_0x6303('0x8'),auth[_0x6303('0x9')](),controller[_0x6303('0x10')]);module[_0x6303('0x11')]=router;
\ No newline at end of file
+var _0x2ce1=['delete','destroy','exports','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./jscriptySessionReport.controller','isAuthenticated','index','get','/:id','/:id/questions','getQuestions','put','update'];(function(_0x391a96,_0x37fa91){var _0x3c9b51=function(_0x3d3737){while(--_0x3d3737){_0x391a96['push'](_0x391a96['shift']());}};_0x3c9b51(++_0x37fa91);}(_0x2ce1,0x8b));var _0x12ce=function(_0x4c7a74,_0x2ad0b4){_0x4c7a74=_0x4c7a74-0x0;var _0x5c4048=_0x2ce1[_0x4c7a74];return _0x5c4048;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x12ce('0x0'));var express=require(_0x12ce('0x1'));var router=express[_0x12ce('0x2')]();var auth=require(_0x12ce('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x12ce('0x4'));var controller=require(_0x12ce('0x5'));router['get']('/',auth[_0x12ce('0x6')](),controller[_0x12ce('0x7')]);router[_0x12ce('0x8')]('/describe',auth[_0x12ce('0x6')](),controller['describe']);router[_0x12ce('0x8')](_0x12ce('0x9'),auth[_0x12ce('0x6')](),controller['show']);router[_0x12ce('0x8')](_0x12ce('0xa'),auth[_0x12ce('0x6')](),controller[_0x12ce('0xb')]);router['post']('/',auth[_0x12ce('0x6')](),controller['create']);router[_0x12ce('0xc')]('/:id',auth['isAuthenticated'](),controller[_0x12ce('0xd')]);router[_0x12ce('0xe')](_0x12ce('0x9'),auth[_0x12ce('0x6')](),controller[_0x12ce('0xf')]);module[_0x12ce('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js
index b0cf983..b7d5eb1 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 _0x8454=['BOOLEAN','sequelize','exports','DATE','setDataValue','starttime','endtime','format','STRING'];(function(_0xf25a0b,_0x249f3c){var _0x44639c=function(_0x429f86){while(--_0x429f86){_0xf25a0b['push'](_0xf25a0b['shift']());}};_0x44639c(++_0x249f3c);}(_0x8454,0xd0));var _0x4845=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x8454[_0x4cf98e];return _0x1623ac;};'use strict';var moment=require('moment');var Sequelize=require(_0x4845('0x0'));module[_0x4845('0x1')]={'starttime':{'type':Sequelize[_0x4845('0x2')],'set':function(_0x47130a){this[_0x4845('0x3')](_0x4845('0x4'),_0x47130a);this[_0x4845('0x3')](_0x4845('0x5'),moment()[_0x4845('0x6')]('YYYY-MM-DD\x20HH:mm:ss'));}},'endtime':{'type':Sequelize[_0x4845('0x2')]},'membername':{'type':Sequelize[_0x4845('0x7')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x4845('0x7')]},'uniqueid':{'type':Sequelize[_0x4845('0x7')]},'calleridname':{'type':Sequelize[_0x4845('0x7')]},'calleridnum':{'type':Sequelize[_0x4845('0x7')]},'completed':{'type':Sequelize[_0x4845('0x8')],'defaultValue':![]}};
\ No newline at end of file
+var _0x1ff5=['format','YYYY-MM-DD\x20HH:mm:ss','STRING','BOOLEAN','sequelize','exports','DATE','setDataValue','starttime'];(function(_0x2d4eba,_0x348848){var _0x21141d=function(_0x7f6893){while(--_0x7f6893){_0x2d4eba['push'](_0x2d4eba['shift']());}};_0x21141d(++_0x348848);}(_0x1ff5,0x190));var _0x51ff=function(_0x5abd83,_0x29f739){_0x5abd83=_0x5abd83-0x0;var _0x3810f7=_0x1ff5[_0x5abd83];return _0x3810f7;};'use strict';var moment=require('moment');var Sequelize=require(_0x51ff('0x0'));module[_0x51ff('0x1')]={'starttime':{'type':Sequelize[_0x51ff('0x2')],'set':function(_0x5e2816){this[_0x51ff('0x3')](_0x51ff('0x4'),_0x5e2816);this[_0x51ff('0x3')]('endtime',moment()[_0x51ff('0x5')](_0x51ff('0x6')));}},'endtime':{'type':Sequelize[_0x51ff('0x2')]},'membername':{'type':Sequelize[_0x51ff('0x7')]},'projectname':{'type':Sequelize[_0x51ff('0x7')]},'queue':{'type':Sequelize[_0x51ff('0x7')]},'uniqueid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x51ff('0x7')]},'completed':{'type':Sequelize[_0x51ff('0x8')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js
index bfed087..c555ae5 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 _0xce2f=['find','create','body','describe','pick','SessionId','JscriptyQuestionReport','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','sox','ejs','squel','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','save','update','then','destroy','error','name','index','map','JscriptySessionReport','key','filters','intersection','model','query','attributes','fields','length','hasOwnProperty','order','sort','where','merge','type','filter','options','include','findAll','rows','catch','show','params','keys','includeAll'];(function(_0x1e1314,_0x16d3e5){var _0x4e3ded=function(_0x16bfd4){while(--_0x16bfd4){_0x1e1314['push'](_0x1e1314['shift']());}};_0x4e3ded(++_0x16d3e5);}(_0xce2f,0xd6));var _0xfce2=function(_0x5367c8,_0x403599){_0x5367c8=_0x5367c8-0x0;var _0x59d1ca=_0xce2f[_0x5367c8];return _0x59d1ca;};'use strict';var pdf=require(_0xfce2('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xfce2('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfce2('0x2'));var rp=require(_0xfce2('0x3'));var moment=require(_0xfce2('0x4'));var BPromise=require(_0xfce2('0x5'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xfce2('0x6'));var csv=require('to-csv');var ejs=require(_0xfce2('0x7'));var fs=require('fs');var _=require('lodash');var squel=require(_0xfce2('0x8'));var crypto=require('crypto');var jsforce=require(_0xfce2('0x9'));var deskjs=require(_0xfce2('0xa'));var toCsv=require(_0xfce2('0xb'));var querystring=require('querystring');var Papa=require(_0xfce2('0xc'));var Redis=require(_0xfce2('0xd'));var authService=require(_0xfce2('0xe'));var qs=require(_0xfce2('0xf'));var as=require(_0xfce2('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xfce2('0x11'))(_0xfce2('0x12'));var utils=require(_0xfce2('0x13'));var config=require(_0xfce2('0x14'));var db=require(_0xfce2('0x15'))['db'];function respondWithStatusCode(_0x34b3cf,_0x2a0f49){_0x2a0f49=_0x2a0f49||0xcc;return function(_0x2a54a0){if(_0x2a54a0){return _0x34b3cf[_0xfce2('0x16')](_0x2a0f49);}return _0x34b3cf[_0xfce2('0x17')](_0x2a0f49)[_0xfce2('0x18')]();};}function respondWithResult(_0x282175,_0x5d5a0b){_0x5d5a0b=_0x5d5a0b||0xc8;return function(_0x3933cd){if(_0x3933cd){return _0x282175[_0xfce2('0x17')](_0x5d5a0b)['json'](_0x3933cd);}};}function respondWithFilteredResult(_0x324077,_0xed754a){return function(_0x17de3d){if(_0x17de3d){var _0x3bd097=_0x17de3d[_0xfce2('0x19')],_0x1a677a=_0xed754a['offset'],_0x2844e2=_0xed754a[_0xfce2('0x1a')]+_0xed754a[_0xfce2('0x1b')],_0x48884b;if(_0x2844e2>=_0x3bd097){_0x2844e2=_0x3bd097;_0x48884b=0xc8;}else{_0x48884b=0xce;}_0x324077['status'](_0x48884b);return _0x324077[_0xfce2('0x1c')]('Content-Range',_0x1a677a+'-'+_0x2844e2+'/'+_0x3bd097)['json'](_0x17de3d);}return null;};}function patchUpdates(_0x585352){return function(_0x1e6d37){try{jsonpatch['apply'](_0x1e6d37,_0x585352,!![]);}catch(_0x54535d){return BPromise['reject'](_0x54535d);}return _0x1e6d37[_0xfce2('0x1d')]();};}function saveUpdates(_0x71d548,_0x3579a3){return function(_0x4597bb){if(_0x4597bb){return _0x4597bb[_0xfce2('0x1e')](_0x71d548)[_0xfce2('0x1f')](function(_0x5aa308){return _0x5aa308;});}return null;};}function removeEntity(_0x31a55a,_0x94e412){return function(_0x1742e6){if(_0x1742e6){return _0x1742e6[_0xfce2('0x20')]()['then'](function(){_0x31a55a[_0xfce2('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1b36ee,_0x100d03){return function(_0x38a961){if(!_0x38a961){_0x1b36ee[_0xfce2('0x16')](0x194);}return _0x38a961;};}function handleError(_0x6270b1,_0x212726){_0x212726=_0x212726||0x1f4;return function(_0x43aed7){logger[_0xfce2('0x21')](_0x43aed7['stack']);if(_0x43aed7['name']){delete _0x43aed7[_0xfce2('0x22')];}_0x6270b1[_0xfce2('0x17')](_0x212726)['send'](_0x43aed7);};}exports[_0xfce2('0x23')]=function(_0x593fd6,_0x48952c){var _0x380067={},_0x261784={},_0x46edd0={'count':0x0,'rows':[]};var _0x572500=_[_0xfce2('0x24')](db[_0xfce2('0x25')]['rawAttributes'],function(_0x4902ea){return{'name':_0x4902ea['fieldName'],'type':_0x4902ea['type'][_0xfce2('0x26')]};});_0x261784['model']=_[_0xfce2('0x24')](_0x572500,'name');_0x261784['query']=_['keys'](_0x593fd6['query']);_0x261784[_0xfce2('0x27')]=_[_0xfce2('0x28')](_0x261784[_0xfce2('0x29')],_0x261784[_0xfce2('0x2a')]);_0x380067[_0xfce2('0x2b')]=_[_0xfce2('0x28')](_0x261784[_0xfce2('0x29')],qs[_0xfce2('0x2c')](_0x593fd6[_0xfce2('0x2a')][_0xfce2('0x2c')]));_0x380067[_0xfce2('0x2b')]=_0x380067[_0xfce2('0x2b')][_0xfce2('0x2d')]?_0x380067[_0xfce2('0x2b')]:_0x261784[_0xfce2('0x29')];if(!_0x593fd6[_0xfce2('0x2a')][_0xfce2('0x2e')]('nolimit')){_0x380067[_0xfce2('0x1b')]=qs[_0xfce2('0x1b')](_0x593fd6['query'][_0xfce2('0x1b')]);_0x380067[_0xfce2('0x1a')]=qs['offset'](_0x593fd6[_0xfce2('0x2a')][_0xfce2('0x1a')]);}_0x380067[_0xfce2('0x2f')]=qs[_0xfce2('0x30')](_0x593fd6['query'][_0xfce2('0x30')]);_0x380067['where']=qs[_0xfce2('0x27')](_['pick'](_0x593fd6[_0xfce2('0x2a')],_0x261784[_0xfce2('0x27')]));if(_0x593fd6[_0xfce2('0x2a')]['filter']){_0x380067[_0xfce2('0x31')]=_[_0xfce2('0x32')](_0x380067['where'],{'$or':_[_0xfce2('0x24')](_0x572500,function(_0x3769d5){if(_0x3769d5[_0xfce2('0x33')]!=='VIRTUAL'){var _0x3c8e86={};_0x3c8e86[_0x3769d5[_0xfce2('0x22')]]={'$like':'%'+_0x593fd6[_0xfce2('0x2a')][_0xfce2('0x34')]+'%'};return _0x3c8e86;}})});}_0x380067=_['merge']({},_0x380067,_0x593fd6[_0xfce2('0x35')]);var _0x1566a0={'where':_0x380067[_0xfce2('0x31')]};return db['JscriptySessionReport']['count'](_0x1566a0)[_0xfce2('0x1f')](function(_0x281583){_0x46edd0[_0xfce2('0x19')]=_0x281583;if(_0x593fd6[_0xfce2('0x2a')]['includeAll']){_0x380067[_0xfce2('0x36')]=[{'all':!![]}];}return db['JscriptySessionReport'][_0xfce2('0x37')](_0x380067);})[_0xfce2('0x1f')](function(_0x300012){_0x46edd0[_0xfce2('0x38')]=_0x300012;return _0x46edd0;})[_0xfce2('0x1f')](respondWithFilteredResult(_0x48952c,_0x380067))[_0xfce2('0x39')](handleError(_0x48952c,null));};exports[_0xfce2('0x3a')]=function(_0x45301e,_0x1416dc){var _0x1d2c84={'raw':!![],'where':{'id':_0x45301e[_0xfce2('0x3b')]['id']}},_0x267e8c={};_0x267e8c['model']=_[_0xfce2('0x3c')](db['JscriptySessionReport']['rawAttributes']);_0x267e8c['query']=_[_0xfce2('0x3c')](_0x45301e[_0xfce2('0x2a')]);_0x267e8c['filters']=_[_0xfce2('0x28')](_0x267e8c[_0xfce2('0x29')],_0x267e8c[_0xfce2('0x2a')]);_0x1d2c84['attributes']=_[_0xfce2('0x28')](_0x267e8c['model'],qs[_0xfce2('0x2c')](_0x45301e[_0xfce2('0x2a')]['fields']));_0x1d2c84[_0xfce2('0x2b')]=_0x1d2c84[_0xfce2('0x2b')][_0xfce2('0x2d')]?_0x1d2c84[_0xfce2('0x2b')]:_0x267e8c[_0xfce2('0x29')];if(_0x45301e[_0xfce2('0x2a')][_0xfce2('0x3d')]){_0x1d2c84[_0xfce2('0x36')]=[{'all':!![]}];}_0x1d2c84=_[_0xfce2('0x32')]({},_0x1d2c84,_0x45301e[_0xfce2('0x35')]);return db['JscriptySessionReport'][_0xfce2('0x3e')](_0x1d2c84)['then'](handleEntityNotFound(_0x1416dc,null))[_0xfce2('0x1f')](respondWithResult(_0x1416dc,null))[_0xfce2('0x39')](handleError(_0x1416dc,null));};exports['create']=function(_0x18c25c,_0xdd440){return db[_0xfce2('0x25')][_0xfce2('0x3f')](_0x18c25c[_0xfce2('0x40')],{})[_0xfce2('0x1f')](respondWithResult(_0xdd440,0xc9))[_0xfce2('0x39')](handleError(_0xdd440,null));};exports[_0xfce2('0x1e')]=function(_0x401789,_0x10fa96){if(_0x401789[_0xfce2('0x40')]['id']){delete _0x401789[_0xfce2('0x40')]['id'];}return db[_0xfce2('0x25')][_0xfce2('0x3e')]({'where':{'id':_0x401789[_0xfce2('0x3b')]['id']}})[_0xfce2('0x1f')](handleEntityNotFound(_0x10fa96,null))[_0xfce2('0x1f')](saveUpdates(_0x401789[_0xfce2('0x40')],null))[_0xfce2('0x1f')](respondWithResult(_0x10fa96,null))[_0xfce2('0x39')](handleError(_0x10fa96,null));};exports[_0xfce2('0x20')]=function(_0x44d8fc,_0x2a3077){return db['JscriptySessionReport'][_0xfce2('0x3e')]({'where':{'id':_0x44d8fc[_0xfce2('0x3b')]['id']}})['then'](handleEntityNotFound(_0x2a3077,null))[_0xfce2('0x1f')](removeEntity(_0x2a3077,null))['catch'](handleError(_0x2a3077,null));};exports[_0xfce2('0x41')]=function(_0x54233d,_0x34e2f5){return db[_0xfce2('0x25')][_0xfce2('0x41')]()[_0xfce2('0x1f')](respondWithResult(_0x34e2f5,null))[_0xfce2('0x39')](handleError(_0x34e2f5,null));};exports['getQuestions']=function(_0x4517a4,_0x13e506,_0x852045){var _0x49f6fb={'raw':!![],'where':{}};var _0x4481b4={};var _0x28aeda={'count':0x0,'rows':[]};return db['JscriptySessionReport']['findOne']({'where':{'id':_0x4517a4[_0xfce2('0x3b')]['id']}})['then'](handleEntityNotFound(_0x13e506,null))[_0xfce2('0x1f')](function(_0x4ff3fa){if(_0x4ff3fa){_0x4481b4[_0xfce2('0x29')]=_[_0xfce2('0x3c')](db['JscriptyQuestionReport']['rawAttributes']);_0x4481b4[_0xfce2('0x2a')]=_[_0xfce2('0x3c')](_0x4517a4[_0xfce2('0x2a')]);_0x4481b4['filters']=_[_0xfce2('0x28')](_0x4481b4[_0xfce2('0x29')],_0x4481b4[_0xfce2('0x2a')]);_0x49f6fb[_0xfce2('0x2b')]=_['intersection'](_0x4481b4[_0xfce2('0x29')],qs['fields'](_0x4517a4[_0xfce2('0x2a')][_0xfce2('0x2c')]));_0x49f6fb[_0xfce2('0x2b')]=_0x49f6fb['attributes'][_0xfce2('0x2d')]?_0x49f6fb[_0xfce2('0x2b')]:_0x4481b4['model'];if(!_0x4517a4[_0xfce2('0x2a')][_0xfce2('0x2e')]('nolimit')){_0x49f6fb[_0xfce2('0x1b')]=qs['limit'](_0x4517a4[_0xfce2('0x2a')]['limit']);_0x49f6fb[_0xfce2('0x1a')]=qs[_0xfce2('0x1a')](_0x4517a4[_0xfce2('0x2a')]['offset']);}_0x49f6fb[_0xfce2('0x2f')]=qs[_0xfce2('0x30')](_0x4517a4[_0xfce2('0x2a')]['sort']);_0x49f6fb[_0xfce2('0x31')]=qs[_0xfce2('0x27')](_[_0xfce2('0x42')](_0x4517a4['query'],_0x4481b4['filters']));_0x49f6fb['where'][_0xfce2('0x43')]=_0x4ff3fa['id'];if(_0x4517a4[_0xfce2('0x2a')][_0xfce2('0x34')]){_0x49f6fb[_0xfce2('0x31')]=_[_0xfce2('0x32')](_0x49f6fb[_0xfce2('0x31')],{'$or':_[_0xfce2('0x24')](_0x49f6fb[_0xfce2('0x2b')],function(_0x1bb1b4){var _0x1d6b7a={};_0x1d6b7a[_0x1bb1b4]={'$like':'%'+_0x4517a4[_0xfce2('0x2a')][_0xfce2('0x34')]+'%'};return _0x1d6b7a;})});}_0x49f6fb=_[_0xfce2('0x32')]({},_0x49f6fb,_0x4517a4[_0xfce2('0x35')]);return db[_0xfce2('0x44')][_0xfce2('0x19')]({'where':_0x49f6fb[_0xfce2('0x31')]})[_0xfce2('0x1f')](function(_0x10ee40){_0x28aeda[_0xfce2('0x19')]=_0x10ee40;if(_0x4517a4['query'][_0xfce2('0x3d')]){_0x49f6fb[_0xfce2('0x36')]=[{'all':!![]}];}return db[_0xfce2('0x44')][_0xfce2('0x37')](_0x49f6fb);})[_0xfce2('0x1f')](function(_0x1d33e6){_0x28aeda[_0xfce2('0x38')]=_0x1d33e6;return _0x28aeda;});}})['then'](respondWithFilteredResult(_0x13e506,_0x49f6fb))[_0xfce2('0x39')](handleError(_0x13e506,null));};
\ No newline at end of file
+var _0x980b=['rimraf','fast-json-patch','request-promise','moment','mustache','sox','ejs','crypto','jsforce','querystring','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','destroy','then','error','stack','name','fieldName','type','model','map','query','keys','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','pick','filters','where','merge','VIRTUAL','filter','options','JscriptySessionReport','findAll','rows','catch','show','rawAttributes','includeAll','find','create','body','params','getQuestions','findOne','JscriptyQuestionReport','html-pdf','eml-format'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0x980b,0x1e1));var _0xb980=function(_0x247e28,_0x4e1eb7){_0x247e28=_0x247e28-0x0;var _0x5579b0=_0x980b[_0x247e28];return _0x5579b0;};'use strict';var pdf=require(_0xb980('0x0'));var emlformat=require(_0xb980('0x1'));var rimraf=require(_0xb980('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb980('0x3'));var rp=require(_0xb980('0x4'));var moment=require(_0xb980('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xb980('0x6'));var util=require('util');var path=require('path');var sox=require(_0xb980('0x7'));var csv=require('to-csv');var ejs=require(_0xb980('0x8'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xb980('0x9'));var jsforce=require(_0xb980('0xa'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xb980('0xb'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xb980('0xc'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb980('0xd'));var logger=require(_0xb980('0xe'))('api');var utils=require(_0xb980('0xf'));var config=require(_0xb980('0x10'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4b80a8,_0x3db893){_0x3db893=_0x3db893||0xcc;return function(_0x256eac){if(_0x256eac){return _0x4b80a8[_0xb980('0x11')](_0x3db893);}return _0x4b80a8[_0xb980('0x12')](_0x3db893)[_0xb980('0x13')]();};}function respondWithResult(_0xe4dd8e,_0x53fda3){_0x53fda3=_0x53fda3||0xc8;return function(_0x5c00dc){if(_0x5c00dc){return _0xe4dd8e[_0xb980('0x12')](_0x53fda3)[_0xb980('0x14')](_0x5c00dc);}};}function respondWithFilteredResult(_0x3d1dd0,_0x38a029){return function(_0x3670c6){if(_0x3670c6){var _0x55c729=_0x3670c6[_0xb980('0x15')],_0x42be45=_0x38a029[_0xb980('0x16')],_0x4e424b=_0x38a029['offset']+_0x38a029[_0xb980('0x17')],_0x37c3ef;if(_0x4e424b>=_0x55c729){_0x4e424b=_0x55c729;_0x37c3ef=0xc8;}else{_0x37c3ef=0xce;}_0x3d1dd0[_0xb980('0x12')](_0x37c3ef);return _0x3d1dd0[_0xb980('0x18')](_0xb980('0x19'),_0x42be45+'-'+_0x4e424b+'/'+_0x55c729)[_0xb980('0x14')](_0x3670c6);}return null;};}function patchUpdates(_0x57c1d8){return function(_0x15d7a3){try{jsonpatch[_0xb980('0x1a')](_0x15d7a3,_0x57c1d8,!![]);}catch(_0x145091){return BPromise[_0xb980('0x1b')](_0x145091);}return _0x15d7a3['save']();};}function saveUpdates(_0x473193,_0x4d6af9){return function(_0x119176){if(_0x119176){return _0x119176[_0xb980('0x1c')](_0x473193)['then'](function(_0x3792ea){return _0x3792ea;});}return null;};}function removeEntity(_0x10b699,_0x374314){return function(_0x4c80b6){if(_0x4c80b6){return _0x4c80b6[_0xb980('0x1d')]()[_0xb980('0x1e')](function(){_0x10b699[_0xb980('0x12')](0xcc)[_0xb980('0x13')]();});}};}function handleEntityNotFound(_0x143d27,_0x515178){return function(_0x2287d7){if(!_0x2287d7){_0x143d27[_0xb980('0x11')](0x194);}return _0x2287d7;};}function handleError(_0x8502a9,_0x414863){_0x414863=_0x414863||0x1f4;return function(_0x5bbbc3){logger[_0xb980('0x1f')](_0x5bbbc3[_0xb980('0x20')]);if(_0x5bbbc3[_0xb980('0x21')]){delete _0x5bbbc3['name'];}_0x8502a9[_0xb980('0x12')](_0x414863)['send'](_0x5bbbc3);};}exports['index']=function(_0x3e8595,_0x2464c1){var _0x14f32d={},_0x4db293={},_0x3c7a83={'count':0x0,'rows':[]};var _0x1d457f=_['map'](db['JscriptySessionReport']['rawAttributes'],function(_0x2492e3){return{'name':_0x2492e3[_0xb980('0x22')],'type':_0x2492e3[_0xb980('0x23')]['key']};});_0x4db293[_0xb980('0x24')]=_[_0xb980('0x25')](_0x1d457f,_0xb980('0x21'));_0x4db293[_0xb980('0x26')]=_[_0xb980('0x27')](_0x3e8595[_0xb980('0x26')]);_0x4db293['filters']=_['intersection'](_0x4db293['model'],_0x4db293[_0xb980('0x26')]);_0x14f32d[_0xb980('0x28')]=_[_0xb980('0x29')](_0x4db293[_0xb980('0x24')],qs[_0xb980('0x2a')](_0x3e8595[_0xb980('0x26')][_0xb980('0x2a')]));_0x14f32d[_0xb980('0x28')]=_0x14f32d[_0xb980('0x28')][_0xb980('0x2b')]?_0x14f32d[_0xb980('0x28')]:_0x4db293['model'];if(!_0x3e8595[_0xb980('0x26')][_0xb980('0x2c')](_0xb980('0x2d'))){_0x14f32d[_0xb980('0x17')]=qs[_0xb980('0x17')](_0x3e8595[_0xb980('0x26')][_0xb980('0x17')]);_0x14f32d['offset']=qs[_0xb980('0x16')](_0x3e8595[_0xb980('0x26')][_0xb980('0x16')]);}_0x14f32d[_0xb980('0x2e')]=qs[_0xb980('0x2f')](_0x3e8595[_0xb980('0x26')][_0xb980('0x2f')]);_0x14f32d['where']=qs['filters'](_[_0xb980('0x30')](_0x3e8595[_0xb980('0x26')],_0x4db293[_0xb980('0x31')]));if(_0x3e8595['query']['filter']){_0x14f32d[_0xb980('0x32')]=_[_0xb980('0x33')](_0x14f32d[_0xb980('0x32')],{'$or':_[_0xb980('0x25')](_0x1d457f,function(_0x23dc89){if(_0x23dc89[_0xb980('0x23')]!==_0xb980('0x34')){var _0xacb7aa={};_0xacb7aa[_0x23dc89[_0xb980('0x21')]]={'$like':'%'+_0x3e8595[_0xb980('0x26')][_0xb980('0x35')]+'%'};return _0xacb7aa;}})});}_0x14f32d=_[_0xb980('0x33')]({},_0x14f32d,_0x3e8595[_0xb980('0x36')]);var _0x578602={'where':_0x14f32d[_0xb980('0x32')]};return db[_0xb980('0x37')][_0xb980('0x15')](_0x578602)[_0xb980('0x1e')](function(_0x48a177){_0x3c7a83[_0xb980('0x15')]=_0x48a177;if(_0x3e8595[_0xb980('0x26')]['includeAll']){_0x14f32d['include']=[{'all':!![]}];}return db['JscriptySessionReport'][_0xb980('0x38')](_0x14f32d);})[_0xb980('0x1e')](function(_0x34d9d2){_0x3c7a83[_0xb980('0x39')]=_0x34d9d2;return _0x3c7a83;})['then'](respondWithFilteredResult(_0x2464c1,_0x14f32d))[_0xb980('0x3a')](handleError(_0x2464c1,null));};exports[_0xb980('0x3b')]=function(_0x16d965,_0x27caa5){var _0x4dcdac={'raw':!![],'where':{'id':_0x16d965['params']['id']}},_0x155577={};_0x155577['model']=_[_0xb980('0x27')](db[_0xb980('0x37')][_0xb980('0x3c')]);_0x155577[_0xb980('0x26')]=_[_0xb980('0x27')](_0x16d965[_0xb980('0x26')]);_0x155577['filters']=_[_0xb980('0x29')](_0x155577[_0xb980('0x24')],_0x155577['query']);_0x4dcdac[_0xb980('0x28')]=_[_0xb980('0x29')](_0x155577['model'],qs[_0xb980('0x2a')](_0x16d965[_0xb980('0x26')]['fields']));_0x4dcdac['attributes']=_0x4dcdac[_0xb980('0x28')][_0xb980('0x2b')]?_0x4dcdac[_0xb980('0x28')]:_0x155577[_0xb980('0x24')];if(_0x16d965[_0xb980('0x26')][_0xb980('0x3d')]){_0x4dcdac['include']=[{'all':!![]}];}_0x4dcdac=_[_0xb980('0x33')]({},_0x4dcdac,_0x16d965['options']);return db[_0xb980('0x37')][_0xb980('0x3e')](_0x4dcdac)[_0xb980('0x1e')](handleEntityNotFound(_0x27caa5,null))[_0xb980('0x1e')](respondWithResult(_0x27caa5,null))[_0xb980('0x3a')](handleError(_0x27caa5,null));};exports[_0xb980('0x3f')]=function(_0x5730df,_0xe5e09c){return db[_0xb980('0x37')][_0xb980('0x3f')](_0x5730df[_0xb980('0x40')],{})[_0xb980('0x1e')](respondWithResult(_0xe5e09c,0xc9))[_0xb980('0x3a')](handleError(_0xe5e09c,null));};exports[_0xb980('0x1c')]=function(_0x59e3d3,_0x3710f8){if(_0x59e3d3[_0xb980('0x40')]['id']){delete _0x59e3d3[_0xb980('0x40')]['id'];}return db['JscriptySessionReport'][_0xb980('0x3e')]({'where':{'id':_0x59e3d3['params']['id']}})[_0xb980('0x1e')](handleEntityNotFound(_0x3710f8,null))['then'](saveUpdates(_0x59e3d3[_0xb980('0x40')],null))[_0xb980('0x1e')](respondWithResult(_0x3710f8,null))[_0xb980('0x3a')](handleError(_0x3710f8,null));};exports['destroy']=function(_0x14fc4b,_0x2adf3b){return db[_0xb980('0x37')][_0xb980('0x3e')]({'where':{'id':_0x14fc4b[_0xb980('0x41')]['id']}})[_0xb980('0x1e')](handleEntityNotFound(_0x2adf3b,null))['then'](removeEntity(_0x2adf3b,null))[_0xb980('0x3a')](handleError(_0x2adf3b,null));};exports['describe']=function(_0xb77497,_0x3c37f2){return db['JscriptySessionReport']['describe']()[_0xb980('0x1e')](respondWithResult(_0x3c37f2,null))['catch'](handleError(_0x3c37f2,null));};exports[_0xb980('0x42')]=function(_0x47b995,_0x3dd1a9,_0x344137){var _0x69900c={'raw':!![],'where':{}};var _0x1af3bd={};var _0x3e4bac={'count':0x0,'rows':[]};return db[_0xb980('0x37')][_0xb980('0x43')]({'where':{'id':_0x47b995['params']['id']}})[_0xb980('0x1e')](handleEntityNotFound(_0x3dd1a9,null))[_0xb980('0x1e')](function(_0x11323b){if(_0x11323b){_0x1af3bd['model']=_[_0xb980('0x27')](db[_0xb980('0x44')][_0xb980('0x3c')]);_0x1af3bd[_0xb980('0x26')]=_[_0xb980('0x27')](_0x47b995['query']);_0x1af3bd[_0xb980('0x31')]=_[_0xb980('0x29')](_0x1af3bd[_0xb980('0x24')],_0x1af3bd[_0xb980('0x26')]);_0x69900c[_0xb980('0x28')]=_[_0xb980('0x29')](_0x1af3bd[_0xb980('0x24')],qs[_0xb980('0x2a')](_0x47b995[_0xb980('0x26')][_0xb980('0x2a')]));_0x69900c[_0xb980('0x28')]=_0x69900c[_0xb980('0x28')]['length']?_0x69900c[_0xb980('0x28')]:_0x1af3bd[_0xb980('0x24')];if(!_0x47b995[_0xb980('0x26')]['hasOwnProperty'](_0xb980('0x2d'))){_0x69900c[_0xb980('0x17')]=qs[_0xb980('0x17')](_0x47b995['query'][_0xb980('0x17')]);_0x69900c[_0xb980('0x16')]=qs[_0xb980('0x16')](_0x47b995[_0xb980('0x26')][_0xb980('0x16')]);}_0x69900c[_0xb980('0x2e')]=qs[_0xb980('0x2f')](_0x47b995[_0xb980('0x26')][_0xb980('0x2f')]);_0x69900c[_0xb980('0x32')]=qs['filters'](_[_0xb980('0x30')](_0x47b995[_0xb980('0x26')],_0x1af3bd['filters']));_0x69900c[_0xb980('0x32')]['SessionId']=_0x11323b['id'];if(_0x47b995['query'][_0xb980('0x35')]){_0x69900c[_0xb980('0x32')]=_['merge'](_0x69900c[_0xb980('0x32')],{'$or':_[_0xb980('0x25')](_0x69900c[_0xb980('0x28')],function(_0x428149){var _0x4634dc={};_0x4634dc[_0x428149]={'$like':'%'+_0x47b995[_0xb980('0x26')][_0xb980('0x35')]+'%'};return _0x4634dc;})});}_0x69900c=_['merge']({},_0x69900c,_0x47b995['options']);return db[_0xb980('0x44')][_0xb980('0x15')]({'where':_0x69900c[_0xb980('0x32')]})['then'](function(_0x38cda3){_0x3e4bac['count']=_0x38cda3;if(_0x47b995['query'][_0xb980('0x3d')]){_0x69900c['include']=[{'all':!![]}];}return db[_0xb980('0x44')][_0xb980('0x38')](_0x69900c);})[_0xb980('0x1e')](function(_0x53828d){_0x3e4bac['rows']=_0x53828d;return _0x3e4bac;});}})[_0xb980('0x1e')](respondWithFilteredResult(_0x3dd1a9,_0x69900c))['catch'](handleError(_0x3dd1a9,null));};
\ No newline at end of file
diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.model.js b/server/api/jscriptySessionReport/jscriptySessionReport.model.js
index ac100ce..5fc2496 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 _0x13b8=['rimraf','./jscriptySessionReport.attributes','define','JscriptySessionReport','report_jscripty_sessions','lodash','util','../../config/logger','api','request-promise','path'];(function(_0x34102a,_0x2e6ac0){var _0x847099=function(_0x3178de){while(--_0x3178de){_0x34102a['push'](_0x34102a['shift']());}};_0x847099(++_0x2e6ac0);}(_0x13b8,0x1d3));var _0x813b=function(_0x33032e,_0x31411a){_0x33032e=_0x33032e-0x0;var _0x13316b=_0x13b8[_0x33032e];return _0x13316b;};'use strict';var _=require(_0x813b('0x0'));var util=require(_0x813b('0x1'));var logger=require(_0x813b('0x2'))(_0x813b('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x813b('0x4'));var fs=require('fs');var path=require(_0x813b('0x5'));var rimraf=require(_0x813b('0x6'));var config=require('../../config/environment');var attributes=require(_0x813b('0x7'));module['exports']=function(_0x431d52,_0x1d7b81){return _0x431d52[_0x813b('0x8')](_0x813b('0x9'),attributes,{'tableName':_0x813b('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1f71=['JscriptySessionReport','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptySessionReport.attributes','exports','define'];(function(_0xb87d55,_0x578ce1){var _0x1c31c8=function(_0x2c0c64){while(--_0x2c0c64){_0xb87d55['push'](_0xb87d55['shift']());}};_0x1c31c8(++_0x578ce1);}(_0x1f71,0xaa));var _0x11f7=function(_0x5994bb,_0x35648c){_0x5994bb=_0x5994bb-0x0;var _0x2e1e11=_0x1f71[_0x5994bb];return _0x2e1e11;};'use strict';var _=require('lodash');var util=require(_0x11f7('0x0'));var logger=require(_0x11f7('0x1'))(_0x11f7('0x2'));var moment=require(_0x11f7('0x3'));var BPromise=require(_0x11f7('0x4'));var rp=require(_0x11f7('0x5'));var fs=require('fs');var path=require(_0x11f7('0x6'));var rimraf=require(_0x11f7('0x7'));var config=require(_0x11f7('0x8'));var attributes=require(_0x11f7('0x9'));module[_0x11f7('0xa')]=function(_0x5110aa,_0x48f717){return _0x5110aa[_0x11f7('0xb')](_0x11f7('0xc'),attributes,{'tableName':'report_jscripty_sessions','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 0bd9479..59fd69f 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 _0xb62e=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','JscriptySessionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util'];(function(_0x5d92d2,_0x399d73){var _0x5e6d11=function(_0x5029a2){while(--_0x5029a2){_0x5d92d2['push'](_0x5d92d2['shift']());}};_0x5e6d11(++_0x399d73);}(_0xb62e,0x1de));var _0xeb62=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xb62e[_0x6131cd];return _0x47e916;};'use strict';var _=require(_0xeb62('0x0'));var util=require(_0xeb62('0x1'));var moment=require(_0xeb62('0x2'));var BPromise=require(_0xeb62('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xeb62('0x4'));var db=require(_0xeb62('0x5'))['db'];var utils=require(_0xeb62('0x6'));var logger=require(_0xeb62('0x7'))(_0xeb62('0x8'));var config=require(_0xeb62('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xeb62('0xa')][_0xeb62('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x31f5ea,_0x5e0dc4,_0x2065a0){return new BPromise(function(_0xab7049,_0x1e10ae){return client[_0xeb62('0xc')](_0x31f5ea,_0x2065a0)['then'](function(_0x5cdef3){logger[_0xeb62('0xd')](_0xeb62('0xe'),_0x5e0dc4,_0xeb62('0xf'));logger[_0xeb62('0x10')](_0xeb62('0x11'),_0x5e0dc4,_0xeb62('0xf'),JSON[_0xeb62('0x12')](_0x5cdef3));if(_0x5cdef3[_0xeb62('0x13')]){if(_0x5cdef3[_0xeb62('0x13')][_0xeb62('0x14')]===0x1f4){logger['error'](_0xeb62('0xe'),_0x5e0dc4,_0x5cdef3[_0xeb62('0x13')][_0xeb62('0x15')]);return _0x1e10ae(_0x5cdef3[_0xeb62('0x13')]['message']);}logger[_0xeb62('0x13')](_0xeb62('0xe'),_0x5e0dc4,_0x5cdef3[_0xeb62('0x13')]['message']);return _0xab7049(_0x5cdef3[_0xeb62('0x13')][_0xeb62('0x15')]);}else{logger[_0xeb62('0xd')]('JscriptySessionReport,\x20%s,\x20%s',_0x5e0dc4,_0xeb62('0xf'));_0xab7049(_0x5cdef3[_0xeb62('0x16')][_0xeb62('0x15')]);}})[_0xeb62('0x17')](function(_0x3fb280){logger[_0xeb62('0x13')](_0xeb62('0xe'),_0x5e0dc4,_0x3fb280);_0x1e10ae(_0x3fb280);});});}
\ No newline at end of file
+var _0x1b48=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','JscriptySessionReport,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','../../mysqldb'];(function(_0x26b908,_0x2d1d49){var _0x2dcaa2=function(_0x37077b){while(--_0x37077b){_0x26b908['push'](_0x26b908['shift']());}};_0x2dcaa2(++_0x2d1d49);}(_0x1b48,0xc2));var _0x81b4=function(_0x5f2647,_0x3dfa49){_0x5f2647=_0x5f2647-0x0;var _0xb95215=_0x1b48[_0x5f2647];return _0xb95215;};'use strict';var _=require('lodash');var util=require(_0x81b4('0x0'));var moment=require(_0x81b4('0x1'));var BPromise=require(_0x81b4('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x81b4('0x3'))['db'];var utils=require(_0x81b4('0x4'));var logger=require(_0x81b4('0x5'))(_0x81b4('0x6'));var config=require(_0x81b4('0x7'));var jayson=require(_0x81b4('0x8'));var client=jayson['client'][_0x81b4('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1153ff,_0x3d82f3,_0x194f41){return new BPromise(function(_0x28557e,_0xa81e87){return client[_0x81b4('0xa')](_0x1153ff,_0x194f41)[_0x81b4('0xb')](function(_0x4d1219){logger[_0x81b4('0xc')]('JscriptySessionReport,\x20%s,\x20%s',_0x3d82f3,'request\x20sent');logger[_0x81b4('0xd')](_0x81b4('0xe'),_0x3d82f3,_0x81b4('0xf'),JSON[_0x81b4('0x10')](_0x4d1219));if(_0x4d1219[_0x81b4('0x11')]){if(_0x4d1219[_0x81b4('0x11')]['code']===0x1f4){logger[_0x81b4('0x11')](_0x81b4('0x12'),_0x3d82f3,_0x4d1219[_0x81b4('0x11')]['message']);return _0xa81e87(_0x4d1219[_0x81b4('0x11')][_0x81b4('0x13')]);}logger[_0x81b4('0x11')](_0x81b4('0x12'),_0x3d82f3,_0x4d1219['error'][_0x81b4('0x13')]);return _0x28557e(_0x4d1219['error'][_0x81b4('0x13')]);}else{logger['info'](_0x81b4('0x12'),_0x3d82f3,'request\x20sent');_0x28557e(_0x4d1219[_0x81b4('0x14')][_0x81b4('0x13')]);}})[_0x81b4('0x15')](function(_0x2e3801){logger[_0x81b4('0x11')](_0x81b4('0x12'),_0x3d82f3,_0x2e3801);_0xa81e87(_0x2e3801);});});}
\ No newline at end of file
diff --git a/server/api/license/index.js b/server/api/license/index.js
index 5770f28..85e9b69 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 _0x9b66=['index','/:id','isAuthenticated','update','exports','multer','util','path','connect-timeout','express','Router','../../config/environment','get'];(function(_0x2eba36,_0x362e5b){var _0xb6690c=function(_0x5349a6){while(--_0x5349a6){_0x2eba36['push'](_0x2eba36['shift']());}};_0xb6690c(++_0x362e5b);}(_0x9b66,0x13d));var _0x69b6=function(_0x6d366d,_0x2a5701){_0x6d366d=_0x6d366d-0x0;var _0x9000b9=_0x9b66[_0x6d366d];return _0x9000b9;};'use strict';var multer=require(_0x69b6('0x0'));var util=require(_0x69b6('0x1'));var path=require(_0x69b6('0x2'));var timeout=require(_0x69b6('0x3'));var express=require(_0x69b6('0x4'));var router=express[_0x69b6('0x5')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x69b6('0x6'));var controller=require('./license.controller');router[_0x69b6('0x7')]('/',controller[_0x69b6('0x8')]);router['put'](_0x69b6('0x9'),auth[_0x69b6('0xa')](),controller[_0x69b6('0xb')]);module[_0x69b6('0xc')]=router;
\ No newline at end of file
+var _0x9d54=['../../config/environment','./license.controller','get','put','/:id','isAuthenticated','update','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x9d54,0x19d));var _0x49d5=function(_0x48762c,_0x2c00e6){_0x48762c=_0x48762c-0x0;var _0x11296b=_0x9d54[_0x48762c];return _0x11296b;};'use strict';var multer=require(_0x49d5('0x0'));var util=require(_0x49d5('0x1'));var path=require(_0x49d5('0x2'));var timeout=require('connect-timeout');var express=require(_0x49d5('0x3'));var router=express[_0x49d5('0x4')]();var auth=require(_0x49d5('0x5'));var interaction=require(_0x49d5('0x6'));var config=require(_0x49d5('0x7'));var controller=require(_0x49d5('0x8'));router[_0x49d5('0x9')]('/',controller['index']);router[_0x49d5('0xa')](_0x49d5('0xb'),auth[_0x49d5('0xc')](),controller[_0x49d5('0xd')]);module[_0x49d5('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/license/license.attributes.js b/server/api/license/license.attributes.js
index 0b7d11b..90de53a 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 _0x1261=['exports','TEXT','STRING','INTEGER'];(function(_0x36f661,_0x5ea7da){var _0x194f1b=function(_0x1f76c6){while(--_0x1f76c6){_0x36f661['push'](_0x36f661['shift']());}};_0x194f1b(++_0x5ea7da);}(_0x1261,0x144));var _0x1126=function(_0x17e69b,_0x512806){_0x17e69b=_0x17e69b-0x0;var _0x55eea8=_0x1261[_0x17e69b];return _0x55eea8;};'use strict';var Sequelize=require('sequelize');module[_0x1126('0x0')]={'license':{'type':Sequelize[_0x1126('0x1')]},'data1':{'type':Sequelize[_0x1126('0x2')]},'data2':{'type':Sequelize[_0x1126('0x2')]},'chatLicenseExceeded':{'type':Sequelize[_0x1126('0x3')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x31f0=['TEXT','STRING','INTEGER','sequelize'];(function(_0x1e1d07,_0x299b1e){var _0x225dce=function(_0x21fb0a){while(--_0x21fb0a){_0x1e1d07['push'](_0x1e1d07['shift']());}};_0x225dce(++_0x299b1e);}(_0x31f0,0xb7));var _0x031f=function(_0x2264cd,_0x5eccdf){_0x2264cd=_0x2264cd-0x0;var _0xb422e0=_0x31f0[_0x2264cd];return _0xb422e0;};'use strict';var Sequelize=require(_0x031f('0x0'));module['exports']={'license':{'type':Sequelize[_0x031f('0x1')]},'data1':{'type':Sequelize['STRING']},'data2':{'type':Sequelize[_0x031f('0x2')]},'chatLicenseExceeded':{'type':Sequelize[_0x031f('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 e5653b7..ebb4ba3 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 _0x986c=['find','get','checkLicense','key','demo','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','../../config/license/util','index','License','rawAttributes','query','keys','intersection','model','fields','attributes','length','merge','options','getLicense','catch','body'];(function(_0x1ee7e4,_0x4ba132){var _0x4a99aa=function(_0x115d2d){while(--_0x115d2d){_0x1ee7e4['push'](_0x1ee7e4['shift']());}};_0x4a99aa(++_0x4ba132);}(_0x986c,0x140));var _0xc986=function(_0x1ba357,_0x41f228){_0x1ba357=_0x1ba357-0x0;var _0x27faf9=_0x986c[_0x1ba357];return _0x27faf9;};'use strict';var pdf=require(_0xc986('0x0'));var emlformat=require(_0xc986('0x1'));var rimraf=require(_0xc986('0x2'));var zipdir=require(_0xc986('0x3'));var jsonpatch=require(_0xc986('0x4'));var rp=require(_0xc986('0x5'));var moment=require(_0xc986('0x6'));var BPromise=require(_0xc986('0x7'));var Mustache=require(_0xc986('0x8'));var util=require(_0xc986('0x9'));var path=require('path');var sox=require(_0xc986('0xa'));var csv=require(_0xc986('0xb'));var ejs=require(_0xc986('0xc'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xc986('0xd'));var jsforce=require(_0xc986('0xe'));var deskjs=require(_0xc986('0xf'));var toCsv=require('to-csv');var querystring=require(_0xc986('0x10'));var Papa=require(_0xc986('0x11'));var Redis=require(_0xc986('0x12'));var authService=require(_0xc986('0x13'));var qs=require(_0xc986('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc986('0x15'));var logger=require(_0xc986('0x16'))('api');var utils=require(_0xc986('0x17'));var config=require('../../config/environment');var db=require(_0xc986('0x18'))['db'];function respondWithStatusCode(_0x3155a2,_0x281cd9){_0x281cd9=_0x281cd9||0xcc;return function(_0x1daef7){if(_0x1daef7){return _0x3155a2[_0xc986('0x19')](_0x281cd9);}return _0x3155a2[_0xc986('0x1a')](_0x281cd9)[_0xc986('0x1b')]();};}function respondWithResult(_0xcaa101,_0x5c03f){_0x5c03f=_0x5c03f||0xc8;return function(_0x3e4fe5){if(_0x3e4fe5){return _0xcaa101['status'](_0x5c03f)[_0xc986('0x1c')](_0x3e4fe5);}};}function respondWithFilteredResult(_0x5d0f2d,_0x19ad56){return function(_0x24a3bb){if(_0x24a3bb){var _0x5cbfaf=_0x24a3bb[_0xc986('0x1d')],_0x4af97e=_0x19ad56[_0xc986('0x1e')],_0x4c7e7d=_0x19ad56[_0xc986('0x1e')]+_0x19ad56['limit'],_0x392f13;if(_0x4c7e7d>=_0x5cbfaf){_0x4c7e7d=_0x5cbfaf;_0x392f13=0xc8;}else{_0x392f13=0xce;}_0x5d0f2d[_0xc986('0x1a')](_0x392f13);return _0x5d0f2d['set'](_0xc986('0x1f'),_0x4af97e+'-'+_0x4c7e7d+'/'+_0x5cbfaf)[_0xc986('0x1c')](_0x24a3bb);}return null;};}function patchUpdates(_0x100f75){return function(_0x28dcdc){try{jsonpatch[_0xc986('0x20')](_0x28dcdc,_0x100f75,!![]);}catch(_0x30d42){return BPromise[_0xc986('0x21')](_0x30d42);}return _0x28dcdc[_0xc986('0x22')]();};}function saveUpdates(_0x4fcb6c,_0x59a9b7){return function(_0x1db976){if(_0x1db976){return _0x1db976[_0xc986('0x23')](_0x4fcb6c)[_0xc986('0x24')](function(_0x4972cc){return _0x4972cc;});}return null;};}function removeEntity(_0x47fc02,_0x2ec99a){return function(_0x1ddca4){if(_0x1ddca4){return _0x1ddca4[_0xc986('0x25')]()[_0xc986('0x24')](function(){_0x47fc02[_0xc986('0x1a')](0xcc)[_0xc986('0x1b')]();});}};}function handleEntityNotFound(_0x5c41f9,_0x19b896){return function(_0x36c89b){if(!_0x36c89b){_0x5c41f9[_0xc986('0x19')](0x194);}return _0x36c89b;};}function handleError(_0x3d8f56,_0x2ad875){_0x2ad875=_0x2ad875||0x1f4;return function(_0xa87dab){logger[_0xc986('0x26')](_0xa87dab[_0xc986('0x27')]);if(_0xa87dab[_0xc986('0x28')]){delete _0xa87dab['name'];}_0x3d8f56[_0xc986('0x1a')](_0x2ad875)[_0xc986('0x29')](_0xa87dab);};}var utilLicense=require(_0xc986('0x2a'));exports[_0xc986('0x2b')]=function(_0x3748fd,_0x4b603a){var _0x34f4ee={'raw':!![],'where':{'id':0x1}},_0x6eecc2={};_0x6eecc2['model']=_['keys'](db[_0xc986('0x2c')][_0xc986('0x2d')]);_0x6eecc2[_0xc986('0x2e')]=_[_0xc986('0x2f')](_0x3748fd[_0xc986('0x2e')]);_0x6eecc2['filters']=_[_0xc986('0x30')](_0x6eecc2[_0xc986('0x31')],_0x6eecc2[_0xc986('0x2e')]);_0x34f4ee['attributes']=_[_0xc986('0x30')](_0x6eecc2[_0xc986('0x31')],qs[_0xc986('0x32')](_0x3748fd[_0xc986('0x2e')]['fields']));_0x34f4ee[_0xc986('0x33')]=_0x34f4ee[_0xc986('0x33')][_0xc986('0x34')]?_0x34f4ee['attributes']:_0x6eecc2[_0xc986('0x31')];_0x34f4ee=_[_0xc986('0x35')]({},_0x34f4ee,_0x3748fd[_0xc986('0x36')]);return utilLicense[_0xc986('0x37')](_0x34f4ee)[_0xc986('0x24')](respondWithResult(_0x4b603a,null))[_0xc986('0x38')](handleError(_0x4b603a,null));};exports[_0xc986('0x23')]=function(_0x2316c4,_0x2241c3){if(_0x2316c4['body']['id']){delete _0x2316c4[_0xc986('0x39')]['id'];}return db[_0xc986('0x2c')][_0xc986('0x3a')]({'where':{'id':_0x2316c4['params']['id']}})[_0xc986('0x24')](handleEntityNotFound(_0x2241c3,null))[_0xc986('0x24')](function(_0x5e64f2){var _0x5e9e00=_0x5e64f2[_0xc986('0x3b')]({'plain':!![]});return utilLicense[_0xc986('0x3c')](_0x5e9e00,_0x2316c4[_0xc986('0x39')][_0xc986('0x3d')]);})['then'](function(_0x43fc1c){if(!_0x43fc1c[_0xc986('0x3e')]){return saveUpdates(_0x2316c4['body'],null);}return _0x43fc1c;})[_0xc986('0x24')](respondWithResult(_0x2241c3,null))['catch'](handleError(_0x2241c3,null));};
\ No newline at end of file
+var _0x0dd3=['intersection','attributes','fields','merge','options','getLicense','body','find','get','checkLicense','key','demo','catch','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','apply','save','update','then','destroy','error','name','send','../../config/license/util','model','License','rawAttributes','query','keys','filters'];(function(_0x3a1b66,_0x23203c){var _0x217090=function(_0x308d14){while(--_0x308d14){_0x3a1b66['push'](_0x3a1b66['shift']());}};_0x217090(++_0x23203c);}(_0x0dd3,0x1cd));var _0x30dd=function(_0x235484,_0x5c9e03){_0x235484=_0x235484-0x0;var _0x367a5d=_0x0dd3[_0x235484];return _0x367a5d;};'use strict';var pdf=require(_0x30dd('0x0'));var emlformat=require(_0x30dd('0x1'));var rimraf=require(_0x30dd('0x2'));var zipdir=require(_0x30dd('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x30dd('0x4'));var moment=require(_0x30dd('0x5'));var BPromise=require(_0x30dd('0x6'));var Mustache=require(_0x30dd('0x7'));var util=require(_0x30dd('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x30dd('0x9'));var ejs=require(_0x30dd('0xa'));var fs=require('fs');var _=require(_0x30dd('0xb'));var squel=require(_0x30dd('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x30dd('0xd'));var toCsv=require(_0x30dd('0x9'));var querystring=require(_0x30dd('0xe'));var Papa=require(_0x30dd('0xf'));var Redis=require(_0x30dd('0x10'));var authService=require(_0x30dd('0x11'));var qs=require(_0x30dd('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x30dd('0x13'));var logger=require(_0x30dd('0x14'))('api');var utils=require('../../config/utils');var config=require(_0x30dd('0x15'));var db=require(_0x30dd('0x16'))['db'];function respondWithStatusCode(_0x42f216,_0x428e3a){_0x428e3a=_0x428e3a||0xcc;return function(_0x379ac5){if(_0x379ac5){return _0x42f216[_0x30dd('0x17')](_0x428e3a);}return _0x42f216[_0x30dd('0x18')](_0x428e3a)[_0x30dd('0x19')]();};}function respondWithResult(_0x20094f,_0x9824ac){_0x9824ac=_0x9824ac||0xc8;return function(_0x3b9a43){if(_0x3b9a43){return _0x20094f['status'](_0x9824ac)['json'](_0x3b9a43);}};}function respondWithFilteredResult(_0x2a7ba9,_0x52443e){return function(_0x2ccefc){if(_0x2ccefc){var _0x517184=_0x2ccefc[_0x30dd('0x1a')],_0xdf035d=_0x52443e[_0x30dd('0x1b')],_0x346b6b=_0x52443e['offset']+_0x52443e['limit'],_0x192815;if(_0x346b6b>=_0x517184){_0x346b6b=_0x517184;_0x192815=0xc8;}else{_0x192815=0xce;}_0x2a7ba9[_0x30dd('0x18')](_0x192815);return _0x2a7ba9['set']('Content-Range',_0xdf035d+'-'+_0x346b6b+'/'+_0x517184)['json'](_0x2ccefc);}return null;};}function patchUpdates(_0x283d69){return function(_0x1a72bb){try{jsonpatch[_0x30dd('0x1c')](_0x1a72bb,_0x283d69,!![]);}catch(_0x2ea908){return BPromise['reject'](_0x2ea908);}return _0x1a72bb[_0x30dd('0x1d')]();};}function saveUpdates(_0x5e5790,_0x37ea08){return function(_0x3cfba8){if(_0x3cfba8){return _0x3cfba8[_0x30dd('0x1e')](_0x5e5790)[_0x30dd('0x1f')](function(_0x1df909){return _0x1df909;});}return null;};}function removeEntity(_0x203645,_0x260f96){return function(_0x451157){if(_0x451157){return _0x451157[_0x30dd('0x20')]()[_0x30dd('0x1f')](function(){_0x203645['status'](0xcc)[_0x30dd('0x19')]();});}};}function handleEntityNotFound(_0x24e795,_0x3bfd7b){return function(_0x26a194){if(!_0x26a194){_0x24e795[_0x30dd('0x17')](0x194);}return _0x26a194;};}function handleError(_0x1a7655,_0x402ce6){_0x402ce6=_0x402ce6||0x1f4;return function(_0x1ef77f){logger[_0x30dd('0x21')](_0x1ef77f['stack']);if(_0x1ef77f[_0x30dd('0x22')]){delete _0x1ef77f[_0x30dd('0x22')];}_0x1a7655[_0x30dd('0x18')](_0x402ce6)[_0x30dd('0x23')](_0x1ef77f);};}var utilLicense=require(_0x30dd('0x24'));exports['index']=function(_0x95b56,_0x5bd496){var _0x2fc98d={'raw':!![],'where':{'id':0x1}},_0x4d1076={};_0x4d1076[_0x30dd('0x25')]=_['keys'](db[_0x30dd('0x26')][_0x30dd('0x27')]);_0x4d1076[_0x30dd('0x28')]=_[_0x30dd('0x29')](_0x95b56[_0x30dd('0x28')]);_0x4d1076[_0x30dd('0x2a')]=_[_0x30dd('0x2b')](_0x4d1076[_0x30dd('0x25')],_0x4d1076['query']);_0x2fc98d[_0x30dd('0x2c')]=_[_0x30dd('0x2b')](_0x4d1076[_0x30dd('0x25')],qs[_0x30dd('0x2d')](_0x95b56[_0x30dd('0x28')][_0x30dd('0x2d')]));_0x2fc98d[_0x30dd('0x2c')]=_0x2fc98d[_0x30dd('0x2c')]['length']?_0x2fc98d[_0x30dd('0x2c')]:_0x4d1076[_0x30dd('0x25')];_0x2fc98d=_[_0x30dd('0x2e')]({},_0x2fc98d,_0x95b56[_0x30dd('0x2f')]);return utilLicense[_0x30dd('0x30')](_0x2fc98d)[_0x30dd('0x1f')](respondWithResult(_0x5bd496,null))['catch'](handleError(_0x5bd496,null));};exports[_0x30dd('0x1e')]=function(_0x10523b,_0x10f7e9){if(_0x10523b['body']['id']){delete _0x10523b[_0x30dd('0x31')]['id'];}return db['License'][_0x30dd('0x32')]({'where':{'id':_0x10523b['params']['id']}})['then'](handleEntityNotFound(_0x10f7e9,null))['then'](function(_0x503cd0){var _0x47d8eb=_0x503cd0[_0x30dd('0x33')]({'plain':!![]});return utilLicense[_0x30dd('0x34')](_0x47d8eb,_0x10523b[_0x30dd('0x31')][_0x30dd('0x35')]);})[_0x30dd('0x1f')](function(_0xc33c86){if(!_0xc33c86[_0x30dd('0x36')]){return saveUpdates(_0x10523b[_0x30dd('0x31')],null);}return _0xc33c86;})[_0x30dd('0x1f')](respondWithResult(_0x10f7e9,null))[_0x30dd('0x37')](handleError(_0x10f7e9,null));};
\ No newline at end of file
diff --git a/server/api/license/license.model.js b/server/api/license/license.model.js
index 7c80217..f2cdc71 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 _0x8d4c=['util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','./license.attributes','exports','License','lodash'];(function(_0x4a53d,_0x58a95e){var _0x27410e=function(_0x38fc90){while(--_0x38fc90){_0x4a53d['push'](_0x4a53d['shift']());}};_0x27410e(++_0x58a95e);}(_0x8d4c,0x133));var _0xc8d4=function(_0xd36ecf,_0xbc090b){_0xd36ecf=_0xd36ecf-0x0;var _0x15847a=_0x8d4c[_0xd36ecf];return _0x15847a;};'use strict';var _=require(_0xc8d4('0x0'));var util=require(_0xc8d4('0x1'));var logger=require(_0xc8d4('0x2'))(_0xc8d4('0x3'));var moment=require('moment');var BPromise=require(_0xc8d4('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc8d4('0x5'));var rimraf=require(_0xc8d4('0x6'));var config=require(_0xc8d4('0x7'));var attributes=require(_0xc8d4('0x8'));module[_0xc8d4('0x9')]=function(_0x46e961,_0x3f9ee2){return _0x46e961['define'](_0xc8d4('0xa'),attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x525e=['exports','define','license','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./license.attributes'];(function(_0x4d692a,_0x5c1506){var _0x9ef565=function(_0x2e17c8){while(--_0x2e17c8){_0x4d692a['push'](_0x4d692a['shift']());}};_0x9ef565(++_0x5c1506);}(_0x525e,0x78));var _0xe525=function(_0x423a08,_0x2448cb){_0x423a08=_0x423a08-0x0;var _0x1ee81e=_0x525e[_0x423a08];return _0x1ee81e;};'use strict';var _=require(_0xe525('0x0'));var util=require(_0xe525('0x1'));var logger=require(_0xe525('0x2'))(_0xe525('0x3'));var moment=require(_0xe525('0x4'));var BPromise=require(_0xe525('0x5'));var rp=require(_0xe525('0x6'));var fs=require('fs');var path=require(_0xe525('0x7'));var rimraf=require('rimraf');var config=require(_0xe525('0x8'));var attributes=require(_0xe525('0x9'));module[_0xe525('0xa')]=function(_0x59a6b6,_0x4c68a3){return _0x59a6b6[_0xe525('0xb')]('License',attributes,{'tableName':_0xe525('0xc'),'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 3d0744f..cde80e8 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 _0x5e14=['debug','error','code','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','License,\x20%s,\x20%s','request\x20sent'];(function(_0x3cb731,_0x207931){var _0x5566e9=function(_0x1e64b2){while(--_0x1e64b2){_0x3cb731['push'](_0x3cb731['shift']());}};_0x5566e9(++_0x207931);}(_0x5e14,0x164));var _0x45e1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5e14[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x45e1('0x0'));var util=require(_0x45e1('0x1'));var moment=require(_0x45e1('0x2'));var BPromise=require(_0x45e1('0x3'));var rs=require(_0x45e1('0x4'));var fs=require('fs');var Redis=require(_0x45e1('0x5'));var db=require(_0x45e1('0x6'))['db'];var utils=require(_0x45e1('0x7'));var logger=require(_0x45e1('0x8'))(_0x45e1('0x9'));var config=require(_0x45e1('0xa'));var jayson=require(_0x45e1('0xb'));var client=jayson[_0x45e1('0xc')][_0x45e1('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x26ee2e,_0xff82a2,_0x111f7c){return new BPromise(function(_0x4062de,_0x2296b3){return client[_0x45e1('0xe')](_0x26ee2e,_0x111f7c)[_0x45e1('0xf')](function(_0x1c57cf){logger['info'](_0x45e1('0x10'),_0xff82a2,_0x45e1('0x11'));logger[_0x45e1('0x12')]('License,\x20%s,\x20%s,\x20%s',_0xff82a2,_0x45e1('0x11'),JSON['stringify'](_0x1c57cf));if(_0x1c57cf[_0x45e1('0x13')]){if(_0x1c57cf[_0x45e1('0x13')][_0x45e1('0x14')]===0x1f4){logger[_0x45e1('0x13')](_0x45e1('0x10'),_0xff82a2,_0x1c57cf[_0x45e1('0x13')][_0x45e1('0x15')]);return _0x2296b3(_0x1c57cf['error'][_0x45e1('0x15')]);}logger[_0x45e1('0x13')](_0x45e1('0x10'),_0xff82a2,_0x1c57cf[_0x45e1('0x13')][_0x45e1('0x15')]);return _0x4062de(_0x1c57cf[_0x45e1('0x13')][_0x45e1('0x15')]);}else{logger['info']('License,\x20%s,\x20%s',_0xff82a2,_0x45e1('0x11'));_0x4062de(_0x1c57cf['result']['message']);}})['catch'](function(_0x1f8e39){logger[_0x45e1('0x13')](_0x45e1('0x10'),_0xff82a2,_0x1f8e39);_0x2296b3(_0x1f8e39);});});}
\ No newline at end of file
+var _0x58e5=['lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','client','info','request\x20sent','debug','License,\x20%s,\x20%s,\x20%s','error','code','License,\x20%s,\x20%s','message','result','catch'];(function(_0x3befb5,_0x35d658){var _0x19f257=function(_0x1a2bd4){while(--_0x1a2bd4){_0x3befb5['push'](_0x3befb5['shift']());}};_0x19f257(++_0x35d658);}(_0x58e5,0xd1));var _0x558e=function(_0xef8146,_0x459c34){_0xef8146=_0xef8146-0x0;var _0x5a6cb0=_0x58e5[_0xef8146];return _0x5a6cb0;};'use strict';var _=require(_0x558e('0x0'));var util=require(_0x558e('0x1'));var moment=require(_0x558e('0x2'));var BPromise=require(_0x558e('0x3'));var rs=require(_0x558e('0x4'));var fs=require('fs');var Redis=require(_0x558e('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x558e('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x558e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x558e('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2887fe,_0xdf6e1e,_0x533a69){return new BPromise(function(_0x58c368,_0x5a26b8){return client['request'](_0x2887fe,_0x533a69)['then'](function(_0x29c7ac){logger[_0x558e('0x9')]('License,\x20%s,\x20%s',_0xdf6e1e,_0x558e('0xa'));logger[_0x558e('0xb')](_0x558e('0xc'),_0xdf6e1e,_0x558e('0xa'),JSON['stringify'](_0x29c7ac));if(_0x29c7ac[_0x558e('0xd')]){if(_0x29c7ac['error'][_0x558e('0xe')]===0x1f4){logger[_0x558e('0xd')](_0x558e('0xf'),_0xdf6e1e,_0x29c7ac[_0x558e('0xd')]['message']);return _0x5a26b8(_0x29c7ac[_0x558e('0xd')][_0x558e('0x10')]);}logger['error'](_0x558e('0xf'),_0xdf6e1e,_0x29c7ac[_0x558e('0xd')]['message']);return _0x58c368(_0x29c7ac[_0x558e('0xd')]['message']);}else{logger[_0x558e('0x9')](_0x558e('0xf'),_0xdf6e1e,'request\x20sent');_0x58c368(_0x29c7ac[_0x558e('0x11')][_0x558e('0x10')]);}})[_0x558e('0x12')](function(_0x15040f){logger['error'](_0x558e('0xf'),_0xdf6e1e,_0x15040f);_0x5a26b8(_0x15040f);});});}
\ No newline at end of file
diff --git a/server/api/mailAccount/index.js b/server/api/mailAccount/index.js
index b694dec..704862e 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 _0xdf2c=['addDisposition','/:id/canned_answers','addAnswer','create','addImap','addSmtp','addInteraction','addApplications','/:id/send','send','addAgents','put','update','delete','removeDispositions','removeAnswers','removeSmtp','destroy','exports','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','index','/describe','/:id','show','/:id/in_servers','getImap','/:id/out_servers','getSmtp','/:id/interactions','getInteractions','/:id/applications','getApplications','/:id/messages','getMessages','/:id/verify','/:id/users','post','/:id/dispositions'];(function(_0x36a5d5,_0xf25c69){var _0x1c356e=function(_0x106192){while(--_0x106192){_0x36a5d5['push'](_0x36a5d5['shift']());}};_0x1c356e(++_0xf25c69);}(_0xdf2c,0x1ba));var _0xcdf2=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xdf2c[_0x502c7d];return _0x30b7ed;};'use strict';var multer=require(_0xcdf2('0x0'));var util=require(_0xcdf2('0x1'));var path=require(_0xcdf2('0x2'));var timeout=require(_0xcdf2('0x3'));var express=require(_0xcdf2('0x4'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xcdf2('0x5'));var config=require(_0xcdf2('0x6'));var controller=require(_0xcdf2('0x7'));router[_0xcdf2('0x8')]('/',auth[_0xcdf2('0x9')](),controller[_0xcdf2('0xa')]);router[_0xcdf2('0x8')](_0xcdf2('0xb'),auth[_0xcdf2('0x9')](),controller['describe']);router[_0xcdf2('0x8')](_0xcdf2('0xc'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0xd')]);router[_0xcdf2('0x8')]('/:id/dispositions',auth['isAuthenticated'](),controller['getDispositions']);router['get']('/:id/canned_answers',auth[_0xcdf2('0x9')](),controller['getAnswers']);router[_0xcdf2('0x8')](_0xcdf2('0xe'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0xf')]);router[_0xcdf2('0x8')](_0xcdf2('0x10'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x11')]);router['get'](_0xcdf2('0x12'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x13')]);router['get'](_0xcdf2('0x14'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x15')]);router[_0xcdf2('0x8')](_0xcdf2('0x16'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x17')]);router[_0xcdf2('0x8')](_0xcdf2('0x18'),auth['isAuthenticated'](),controller['verifySmtp']);router[_0xcdf2('0x8')](_0xcdf2('0x19'),auth[_0xcdf2('0x9')](),controller['getAgents']);router[_0xcdf2('0x1a')](_0xcdf2('0x1b'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x1c')]);router[_0xcdf2('0x1a')](_0xcdf2('0x1d'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x1e')]);router[_0xcdf2('0x1a')]('/',auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x1f')]);router[_0xcdf2('0x1a')](_0xcdf2('0xe'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x20')]);router[_0xcdf2('0x1a')](_0xcdf2('0x10'),auth['isAuthenticated'](),controller[_0xcdf2('0x21')]);router[_0xcdf2('0x1a')](_0xcdf2('0x12'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x22')]);router[_0xcdf2('0x1a')](_0xcdf2('0x14'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x23')]);router[_0xcdf2('0x1a')](_0xcdf2('0x24'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x25')]);router[_0xcdf2('0x1a')](_0xcdf2('0x19'),auth['isAuthenticated'](),controller[_0xcdf2('0x26')]);router[_0xcdf2('0x27')](_0xcdf2('0xc'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x28')]);router[_0xcdf2('0x29')](_0xcdf2('0x1b'),auth['isAuthenticated'](),controller[_0xcdf2('0x2a')]);router[_0xcdf2('0x29')](_0xcdf2('0x1d'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x2b')]);router['delete'](_0xcdf2('0xe'),auth[_0xcdf2('0x9')](),controller['removeImap']);router[_0xcdf2('0x29')](_0xcdf2('0x10'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x2c')]);router['delete'](_0xcdf2('0xc'),auth[_0xcdf2('0x9')](),controller[_0xcdf2('0x2d')]);router[_0xcdf2('0x29')](_0xcdf2('0x19'),auth['isAuthenticated'](),controller['removeAgents']);module[_0xcdf2('0x2e')]=router;
\ No newline at end of file
+var _0x77c3=['removeAnswers','removeImap','removeSmtp','destroy','removeAgents','exports','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','/describe','isAuthenticated','describe','/:id','/:id/dispositions','getDispositions','getAnswers','/:id/in_servers','getImap','/:id/out_servers','getSmtp','/:id/interactions','getInteractions','/:id/applications','getApplications','getMessages','/:id/verify','verifySmtp','getAgents','post','addDisposition','/:id/canned_answers','addAnswer','create','addSmtp','addInteraction','addApplications','send','/:id/users','addAgents','put','update','delete','removeDispositions'];(function(_0x5783f4,_0x4a9e0a){var _0x28e380=function(_0x1ffc49){while(--_0x1ffc49){_0x5783f4['push'](_0x5783f4['shift']());}};_0x28e380(++_0x4a9e0a);}(_0x77c3,0x99));var _0x377c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x77c3[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x377c('0x0'));var path=require(_0x377c('0x1'));var timeout=require(_0x377c('0x2'));var express=require('express');var router=express[_0x377c('0x3')]();var auth=require(_0x377c('0x4'));var interaction=require(_0x377c('0x5'));var config=require(_0x377c('0x6'));var controller=require(_0x377c('0x7'));router[_0x377c('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x377c('0x8')](_0x377c('0x9'),auth[_0x377c('0xa')](),controller[_0x377c('0xb')]);router[_0x377c('0x8')](_0x377c('0xc'),auth['isAuthenticated'](),controller['show']);router['get'](_0x377c('0xd'),auth['isAuthenticated'](),controller[_0x377c('0xe')]);router[_0x377c('0x8')]('/:id/canned_answers',auth[_0x377c('0xa')](),controller[_0x377c('0xf')]);router[_0x377c('0x8')](_0x377c('0x10'),auth[_0x377c('0xa')](),controller[_0x377c('0x11')]);router[_0x377c('0x8')](_0x377c('0x12'),auth[_0x377c('0xa')](),controller[_0x377c('0x13')]);router['get'](_0x377c('0x14'),auth[_0x377c('0xa')](),controller[_0x377c('0x15')]);router['get'](_0x377c('0x16'),auth[_0x377c('0xa')](),controller[_0x377c('0x17')]);router[_0x377c('0x8')]('/:id/messages',auth[_0x377c('0xa')](),controller[_0x377c('0x18')]);router['get'](_0x377c('0x19'),auth[_0x377c('0xa')](),controller[_0x377c('0x1a')]);router['get']('/:id/users',auth[_0x377c('0xa')](),controller[_0x377c('0x1b')]);router[_0x377c('0x1c')](_0x377c('0xd'),auth['isAuthenticated'](),controller[_0x377c('0x1d')]);router[_0x377c('0x1c')](_0x377c('0x1e'),auth[_0x377c('0xa')](),controller[_0x377c('0x1f')]);router[_0x377c('0x1c')]('/',auth[_0x377c('0xa')](),controller[_0x377c('0x20')]);router[_0x377c('0x1c')](_0x377c('0x10'),auth[_0x377c('0xa')](),controller['addImap']);router[_0x377c('0x1c')](_0x377c('0x12'),auth[_0x377c('0xa')](),controller[_0x377c('0x21')]);router[_0x377c('0x1c')]('/:id/interactions',auth[_0x377c('0xa')](),controller[_0x377c('0x22')]);router['post'](_0x377c('0x16'),auth[_0x377c('0xa')](),controller[_0x377c('0x23')]);router['post']('/:id/send',auth[_0x377c('0xa')](),controller[_0x377c('0x24')]);router[_0x377c('0x1c')](_0x377c('0x25'),auth[_0x377c('0xa')](),controller[_0x377c('0x26')]);router[_0x377c('0x27')](_0x377c('0xc'),auth[_0x377c('0xa')](),controller[_0x377c('0x28')]);router[_0x377c('0x29')](_0x377c('0xd'),auth[_0x377c('0xa')](),controller[_0x377c('0x2a')]);router[_0x377c('0x29')](_0x377c('0x1e'),auth[_0x377c('0xa')](),controller[_0x377c('0x2b')]);router[_0x377c('0x29')](_0x377c('0x10'),auth['isAuthenticated'](),controller[_0x377c('0x2c')]);router[_0x377c('0x29')](_0x377c('0x12'),auth['isAuthenticated'](),controller[_0x377c('0x2d')]);router['delete']('/:id',auth[_0x377c('0xa')](),controller[_0x377c('0x2e')]);router[_0x377c('0x29')](_0x377c('0x25'),auth[_0x377c('0xa')](),controller[_0x377c('0x2f')]);module[_0x377c('0x30')]=router;
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.attributes.js b/server/api/mailAccount/mailAccount.attributes.js
index 30aba24..23be884 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 _0x21e3=['Arial,Helvetica,sans-serif','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','mandatoryDisposition','sequelize','exports','STRING','BOOLEAN'];(function(_0x308ed8,_0x1462ea){var _0x1f9326=function(_0x2ec9c1){while(--_0x2ec9c1){_0x308ed8['push'](_0x308ed8['shift']());}};_0x1f9326(++_0x1462ea);}(_0x21e3,0x11c));var _0x321e=function(_0x111f31,_0x443846){_0x111f31=_0x111f31-0x0;var _0x1d8223=_0x21e3[_0x111f31];return _0x1d8223;};'use strict';var Sequelize=require(_0x321e('0x0'));module[_0x321e('0x1')]={'description':{'type':Sequelize['STRING']},'name':{'type':Sequelize[_0x321e('0x2')],'allowNull':![]},'service':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize[_0x321e('0x3')],'defaultValue':!![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'template':{'type':Sequelize['TEXT']},'markAsUnread':{'type':Sequelize[_0x321e('0x3')],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x321e('0x2')],'allowNull':![],'defaultValue':_0x321e('0x4')},'fontSize':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize[_0x321e('0x5')],'defaultValue':function(){return _0x321e('0x6');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x321e('0x3')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x321e('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x321e('0x3')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x321e('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x321e('0x3')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x321e('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x321e('0x7')],'allowNull':!![],'defaultValue':null,'comment':_0x321e('0x8')},'mandatoryDisposition':{'type':Sequelize[_0x321e('0x3')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x14c430){if(!_0x14c430)this[_0x321e('0x9')](_0x321e('0xa'),null);this[_0x321e('0x9')](_0x321e('0xb'),_0x14c430);}}};
\ No newline at end of file
+var _0x8928=['INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','STRING','BOOLEAN','TEXT','Arial,Helvetica,sans-serif','UNSIGNED','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}} Subject\x20:\x20{{message.subject}}'];(function(_0x147497,_0x43e433){var _0x35f45=function(_0x584421){while(--_0x584421){_0x147497['push'](_0x147497['shift']());}};_0x35f45(++_0x43e433);}(_0x8928,0xf7));var _0x8892=function(_0x536a17,_0xbae71a){_0x536a17=_0x536a17-0x0;var _0x57a17f=_0x8928[_0x536a17];return _0x57a17f;};'use strict';var Sequelize=require('sequelize');module['exports']={'description':{'type':Sequelize[_0x8892('0x0')]},'name':{'type':Sequelize[_0x8892('0x0')],'allowNull':![]},'service':{'type':Sequelize[_0x8892('0x1')],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize[_0x8892('0x1')],'defaultValue':!![]},'key':{'type':Sequelize[_0x8892('0x0')],'allowNull':![]},'template':{'type':Sequelize[_0x8892('0x2')]},'markAsUnread':{'type':Sequelize[_0x8892('0x1')],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x8892('0x0')],'allowNull':![],'defaultValue':_0x8892('0x3')},'fontSize':{'type':Sequelize['INTEGER'](0x2)[_0x8892('0x4')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x8892('0x5');}},'notificationSound':{'type':Sequelize[_0x8892('0x1')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x8892('0x1')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x8892('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x8892('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0x8892('0x7')},'mandatoryDisposition':{'type':Sequelize[_0x8892('0x1')],'defaultValue':![],'comment':_0x8892('0x8'),'set':function(_0x42ab06){if(!_0x42ab06)this[_0x8892('0x9')](_0x8892('0xa'),null);this['setDataValue']('mandatoryDisposition',_0x42ab06);}}};
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.controller.js b/server/api/mailAccount/mailAccount.controller.js
index c312409..7041002 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 _0x7e80=['removeAgents','isArray','userMailAccount:remove','getAgents','html-pdf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','./mailAccount.socket','jayson/promise','client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','MailAccount,\x20%s,\x20%s','request\x20sent','error','code','message','result','sendStatus','status','json','count','offset','limit','apply','reject','save','then','get','MailAccounts','UserProfileResource','destroy','end','stack','name','send','index','MailServerIn','Imap','MailServerOut','Pause','mandatoryDispositionPause','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','MailAccount','include','rows','catch','show','params','Smtp','rawAttributes','includeAll','update','body','find','describe','Disposition','create','getDispositions','findOne','MailAccountId','findAll','removeDispositions','ids','CannedAnswer','removeAnswers','email','ListId','isNil','active','description','cauthentication','user','cuser','password','pass','cpassword','host','port','service','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','addImap','removeImap','setImap','getSmtp','addSmtp','removeSmtp','setSmtp','MailInteraction','addInteraction','getInteractions','CmContact','Contact','User','Owner','fullname','internal','Tag','Tags','tag','addApplications','sequelize','transaction','MailApplication','priority','getApplications','getMessages','MailMessage','$gte','split','Contacts','updatedAt','from','format','%s\x20<%s>','attachments','join','root','server/files/attachments','basename','authentication','auth','secure','SendMail','sendMail','List\x20not\x20found','List','messageId','subject','attach','out','YYYY-MM-DD\x20HH:mm:ss','verifySmtp','VerifySmtp','addAgents','omit','emit'];(function(_0x53dc2f,_0x352f5f){var _0x2db8b6=function(_0x1c82c9){while(--_0x1c82c9){_0x53dc2f['push'](_0x53dc2f['shift']());}};_0x2db8b6(++_0x352f5f);}(_0x7e80,0xc3));var _0x07e8=function(_0x324e58,_0x5667bf){_0x324e58=_0x324e58-0x0;var _0x41bda1=_0x7e80[_0x324e58];return _0x41bda1;};'use strict';var pdf=require(_0x07e8('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x07e8('0x1'));var rp=require(_0x07e8('0x2'));var moment=require('moment');var BPromise=require(_0x07e8('0x3'));var Mustache=require(_0x07e8('0x4'));var util=require(_0x07e8('0x5'));var path=require(_0x07e8('0x6'));var sox=require(_0x07e8('0x7'));var csv=require(_0x07e8('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x07e8('0x9'));var squel=require('squel');var crypto=require(_0x07e8('0xa'));var jsforce=require(_0x07e8('0xb'));var deskjs=require(_0x07e8('0xc'));var toCsv=require('to-csv');var querystring=require(_0x07e8('0xd'));var Papa=require(_0x07e8('0xe'));var Redis=require(_0x07e8('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x07e8('0x10'));var as=require(_0x07e8('0x11'));var hardwareService=require(_0x07e8('0x12'));var logger=require(_0x07e8('0x13'))(_0x07e8('0x14'));var utils=require('../../config/utils');var config=require(_0x07e8('0x15'));var db=require(_0x07e8('0x16'))['db'];config[_0x07e8('0x17')]=_[_0x07e8('0x18')](config['redis'],{'host':_0x07e8('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x07e8('0x17')]));require(_0x07e8('0x1a'))['register'](socket);var jayson=require(_0x07e8('0x1b'));var client=jayson[_0x07e8('0x1c')][_0x07e8('0x1d')]({'port':0x232b});function checkPasswordPattern(_0x346894,_0x46980d,_0x4e3455){if(_0x4e3455){var _0x42f491=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x42f491[_0x07e8('0x1e')](_0x46980d)){return _0x346894;}else{throw new db['Sequelize'][(_0x07e8('0x1f'))](_0x07e8('0x20'));}}else{return _0x346894;}}function respondWithRpcPromise(_0x51c857,_0x459b5f,_0x13c2dd,_0x5c2558){return new BPromise(function(_0xa5d4ac,_0x3237ff){var _0x30e1dd=_0x5c2558||client;return _0x30e1dd[_0x07e8('0x21')](_0x51c857,_0x13c2dd)['then'](function(_0xbaeef7){logger[_0x07e8('0x22')](_0x07e8('0x23'),_0x459b5f,_0x07e8('0x24'));logger['debug']('MailAccount,\x20%s,\x20%s,\x20%s',_0x459b5f,_0x07e8('0x24'),JSON['stringify'](_0xbaeef7));if(_0xbaeef7[_0x07e8('0x25')]){if(_0xbaeef7[_0x07e8('0x25')][_0x07e8('0x26')]===0x1f4){logger[_0x07e8('0x25')](_0x07e8('0x23'),_0x459b5f,_0xbaeef7[_0x07e8('0x25')][_0x07e8('0x27')]);return _0x3237ff(_0xbaeef7[_0x07e8('0x25')][_0x07e8('0x27')]);}logger[_0x07e8('0x25')](_0x07e8('0x23'),_0x459b5f,_0xbaeef7[_0x07e8('0x25')]['message']);return _0xa5d4ac(_0xbaeef7[_0x07e8('0x25')][_0x07e8('0x27')]);}else{logger[_0x07e8('0x22')](_0x07e8('0x23'),_0x459b5f,'request\x20sent');_0xa5d4ac(_0xbaeef7[_0x07e8('0x28')][_0x07e8('0x27')]);}})['catch'](function(_0x4b74bf){logger[_0x07e8('0x25')]('MailAccount,\x20%s,\x20%s',_0x459b5f,_0x4b74bf);_0x3237ff(_0x4b74bf);});});}function respondWithStatusCode(_0x41ecf5,_0xf9384a){_0xf9384a=_0xf9384a||0xcc;return function(_0x1b6ef2){if(_0x1b6ef2){return _0x41ecf5[_0x07e8('0x29')](_0xf9384a);}return _0x41ecf5['status'](_0xf9384a)['end']();};}function respondWithResult(_0x144570,_0xc5c8be){_0xc5c8be=_0xc5c8be||0xc8;return function(_0x110110){if(_0x110110){return _0x144570[_0x07e8('0x2a')](_0xc5c8be)[_0x07e8('0x2b')](_0x110110);}};}function respondWithFilteredResult(_0xd24724,_0x110c06){return function(_0x5ec716){if(_0x5ec716){var _0x249afd=_0x5ec716[_0x07e8('0x2c')],_0x4e08cc=_0x110c06[_0x07e8('0x2d')],_0x2a2c1f=_0x110c06[_0x07e8('0x2d')]+_0x110c06[_0x07e8('0x2e')],_0x1a59f2;if(_0x2a2c1f>=_0x249afd){_0x2a2c1f=_0x249afd;_0x1a59f2=0xc8;}else{_0x1a59f2=0xce;}_0xd24724[_0x07e8('0x2a')](_0x1a59f2);return _0xd24724['set']('Content-Range',_0x4e08cc+'-'+_0x2a2c1f+'/'+_0x249afd)['json'](_0x5ec716);}return null;};}function patchUpdates(_0x507324){return function(_0x58c89f){try{jsonpatch[_0x07e8('0x2f')](_0x58c89f,_0x507324,!![]);}catch(_0x58fc4e){return BPromise[_0x07e8('0x30')](_0x58fc4e);}return _0x58c89f[_0x07e8('0x31')]();};}function saveUpdates(_0x51dc1e,_0x21f97e){return function(_0x44b6c3){if(_0x44b6c3){return _0x44b6c3['update'](_0x51dc1e)[_0x07e8('0x32')](function(_0x563293){return _0x563293;});}return null;};}function removeEntity(_0x569af6,_0x899e8b){return function(_0x2d3db3){if(_0x2d3db3){return _0x2d3db3['destroy']()['then'](function(){var _0x54b6ef=_0x2d3db3[_0x07e8('0x33')]({'plain':!![]});var _0x2e9ee7=_0x07e8('0x34');return db[_0x07e8('0x35')][_0x07e8('0x36')]({'where':{'type':_0x2e9ee7,'resourceId':_0x54b6ef['id']}})[_0x07e8('0x32')](function(){return _0x2d3db3;});})[_0x07e8('0x32')](function(){_0x569af6[_0x07e8('0x2a')](0xcc)[_0x07e8('0x37')]();});}};}function handleEntityNotFound(_0x2d2b7e,_0x3dee37){return function(_0x872472){if(!_0x872472){_0x2d2b7e[_0x07e8('0x29')](0x194);}return _0x872472;};}function handleError(_0x247efd,_0x8b5af7){_0x8b5af7=_0x8b5af7||0x1f4;return function(_0x11ae92){logger['error'](_0x11ae92[_0x07e8('0x38')]);if(_0x11ae92[_0x07e8('0x39')]){delete _0x11ae92[_0x07e8('0x39')];}_0x247efd[_0x07e8('0x2a')](_0x8b5af7)[_0x07e8('0x3a')](_0x11ae92);};}exports[_0x07e8('0x3b')]=function(_0x16859d,_0x21ba6b){var _0x48b574={'include':[{'model':db[_0x07e8('0x3c')],'as':_0x07e8('0x3d')},{'model':db[_0x07e8('0x3e')],'as':'Smtp'},{'model':db[_0x07e8('0x3f')],'as':_0x07e8('0x40')}]},_0x362ad2={},_0x573f5e={'count':0x0,'rows':[]};var _0x55dc17=_[_0x07e8('0x41')](db['MailAccount']['rawAttributes'],function(_0x2a01e0){return{'name':_0x2a01e0[_0x07e8('0x42')],'type':_0x2a01e0[_0x07e8('0x43')][_0x07e8('0x44')]};});_0x362ad2[_0x07e8('0x45')]=_['map'](_0x55dc17,_0x07e8('0x39'));_0x362ad2[_0x07e8('0x46')]=_[_0x07e8('0x47')](_0x16859d[_0x07e8('0x46')]);_0x362ad2[_0x07e8('0x48')]=_[_0x07e8('0x49')](_0x362ad2['model'],_0x362ad2[_0x07e8('0x46')]);_0x48b574[_0x07e8('0x4a')]=_[_0x07e8('0x49')](_0x362ad2[_0x07e8('0x45')],qs[_0x07e8('0x4b')](_0x16859d[_0x07e8('0x46')][_0x07e8('0x4b')]));_0x48b574[_0x07e8('0x4a')]=_0x48b574[_0x07e8('0x4a')][_0x07e8('0x4c')]?_0x48b574[_0x07e8('0x4a')]:_0x362ad2[_0x07e8('0x45')];if(!_0x16859d['query'][_0x07e8('0x4d')](_0x07e8('0x4e'))){_0x48b574[_0x07e8('0x2e')]=qs[_0x07e8('0x2e')](_0x16859d[_0x07e8('0x46')]['limit']);_0x48b574[_0x07e8('0x2d')]=qs[_0x07e8('0x2d')](_0x16859d[_0x07e8('0x46')]['offset']);}_0x48b574[_0x07e8('0x4f')]=qs[_0x07e8('0x50')](_0x16859d[_0x07e8('0x46')][_0x07e8('0x50')]);_0x48b574['where']=qs[_0x07e8('0x48')](_[_0x07e8('0x51')](_0x16859d[_0x07e8('0x46')],_0x362ad2[_0x07e8('0x48')]));if(_0x16859d[_0x07e8('0x46')][_0x07e8('0x52')]){_0x48b574[_0x07e8('0x53')]=_[_0x07e8('0x54')](_0x48b574[_0x07e8('0x53')],{'$or':_[_0x07e8('0x41')](_0x55dc17,function(_0x467c65){if(_0x467c65[_0x07e8('0x43')]!==_0x07e8('0x55')){var _0x58461d={};_0x58461d[_0x467c65['name']]={'$like':'%'+_0x16859d['query']['filter']+'%'};return _0x58461d;}})});}_0x48b574=_[_0x07e8('0x54')]({},_0x48b574,_0x16859d[_0x07e8('0x56')]);var _0x5abb4f={'where':_0x48b574[_0x07e8('0x53')]};return db[_0x07e8('0x57')][_0x07e8('0x2c')](_0x5abb4f)[_0x07e8('0x32')](function(_0x4e0cc3){_0x573f5e['count']=_0x4e0cc3;if(_0x16859d[_0x07e8('0x46')]['includeAll']){_0x48b574[_0x07e8('0x58')]=[{'all':!![]}];}return db[_0x07e8('0x57')]['findAll'](_0x48b574);})['then'](function(_0xf10f73){_0x573f5e[_0x07e8('0x59')]=_0xf10f73;return _0x573f5e;})[_0x07e8('0x32')](respondWithFilteredResult(_0x21ba6b,_0x48b574))[_0x07e8('0x5a')](handleError(_0x21ba6b,null));};exports[_0x07e8('0x5b')]=function(_0x2aa2d0,_0x54daa1){var _0x39a955={'raw':![],'where':{'id':_0x2aa2d0[_0x07e8('0x5c')]['id']},'include':[{'model':db[_0x07e8('0x3c')],'as':'Imap'},{'model':db[_0x07e8('0x3e')],'as':_0x07e8('0x5d')},{'model':db[_0x07e8('0x3f')],'as':'mandatoryDispositionPause'}]},_0x5d98a0={};_0x5d98a0[_0x07e8('0x45')]=_[_0x07e8('0x47')](db[_0x07e8('0x57')][_0x07e8('0x5e')]);_0x5d98a0[_0x07e8('0x46')]=_['keys'](_0x2aa2d0[_0x07e8('0x46')]);_0x5d98a0[_0x07e8('0x48')]=_[_0x07e8('0x49')](_0x5d98a0[_0x07e8('0x45')],_0x5d98a0[_0x07e8('0x46')]);_0x39a955[_0x07e8('0x4a')]=_[_0x07e8('0x49')](_0x5d98a0['model'],qs[_0x07e8('0x4b')](_0x2aa2d0['query']['fields']));_0x39a955[_0x07e8('0x4a')]=_0x39a955['attributes'][_0x07e8('0x4c')]?_0x39a955[_0x07e8('0x4a')]:_0x5d98a0[_0x07e8('0x45')];if(_0x2aa2d0[_0x07e8('0x46')][_0x07e8('0x5f')]){_0x39a955[_0x07e8('0x58')]=[{'all':!![]}];}_0x39a955=_[_0x07e8('0x54')]({},_0x39a955,_0x2aa2d0[_0x07e8('0x56')]);return db[_0x07e8('0x57')]['find'](_0x39a955)['then'](handleEntityNotFound(_0x54daa1,null))[_0x07e8('0x32')](respondWithResult(_0x54daa1,null))[_0x07e8('0x5a')](handleError(_0x54daa1,null));};exports[_0x07e8('0x60')]=function(_0x3b34e,_0x11320b){if(_0x3b34e[_0x07e8('0x61')]['id']){delete _0x3b34e[_0x07e8('0x61')]['id'];}return db[_0x07e8('0x57')][_0x07e8('0x62')]({'where':{'id':_0x3b34e[_0x07e8('0x5c')]['id']},'include':[{'model':db[_0x07e8('0x3c')],'as':_0x07e8('0x3d')},{'model':db[_0x07e8('0x3e')],'as':'Smtp'},{'model':db[_0x07e8('0x3f')],'as':_0x07e8('0x40')}]})[_0x07e8('0x32')](handleEntityNotFound(_0x11320b,null))['then'](saveUpdates(_0x3b34e['body'],null))['then'](function(_0x3075b3){if(_0x3075b3&&_0x3b34e['body'][_0x07e8('0x3d')]){return db[_0x07e8('0x3c')][_0x07e8('0x60')](_0x3b34e[_0x07e8('0x61')][_0x07e8('0x3d')],{'where':{'MailAccountId':_0x3075b3['id']}})[_0x07e8('0x32')](function(){return _0x3075b3;});}return _0x3075b3;})[_0x07e8('0x32')](function(_0x284092){if(_0x284092&&_0x3b34e[_0x07e8('0x61')]['Smtp']){return db[_0x07e8('0x3e')]['update'](_0x3b34e[_0x07e8('0x61')][_0x07e8('0x5d')],{'where':{'MailAccountId':_0x284092['id']}})['then'](function(){return _0x284092;});}return _0x284092;})[_0x07e8('0x32')](respondWithResult(_0x11320b,null))[_0x07e8('0x5a')](handleError(_0x11320b,null));};exports[_0x07e8('0x63')]=function(_0x544b06,_0x584ccc){return db[_0x07e8('0x57')][_0x07e8('0x63')]()[_0x07e8('0x32')](respondWithResult(_0x584ccc,null))[_0x07e8('0x5a')](handleError(_0x584ccc,null));};exports['addDisposition']=function(_0x373cd6,_0x192ae4,_0x3d40c8){if(_0x373cd6['body']['id']){delete _0x373cd6[_0x07e8('0x61')]['id'];}return db[_0x07e8('0x57')][_0x07e8('0x62')]({'where':{'id':_0x373cd6[_0x07e8('0x5c')]['id']}})['then'](handleEntityNotFound(_0x192ae4,null))['then'](function(_0xa9b568){if(_0xa9b568){_0x373cd6[_0x07e8('0x61')]['MailAccountId']=_0xa9b568['id'];return db[_0x07e8('0x64')][_0x07e8('0x65')](_0x373cd6[_0x07e8('0x61')]);}})[_0x07e8('0x32')](respondWithResult(_0x192ae4,null))['catch'](handleError(_0x192ae4,null));};exports[_0x07e8('0x66')]=function(_0x2e1b10,_0x3327f7,_0x1abb78){var _0x4300cd={'raw':![],'where':{}};var _0x4c5585={};var _0x63e1d={'count':0x0,'rows':[]};return db[_0x07e8('0x57')][_0x07e8('0x67')]({'where':{'id':_0x2e1b10[_0x07e8('0x5c')]['id']}})['then'](handleEntityNotFound(_0x3327f7,null))[_0x07e8('0x32')](function(_0x96a9fd){if(_0x96a9fd){_0x4c5585[_0x07e8('0x45')]=_[_0x07e8('0x47')](db[_0x07e8('0x64')][_0x07e8('0x5e')]);_0x4c5585[_0x07e8('0x46')]=_[_0x07e8('0x47')](_0x2e1b10['query']);_0x4c5585[_0x07e8('0x48')]=_[_0x07e8('0x49')](_0x4c5585['model'],_0x4c5585[_0x07e8('0x46')]);_0x4300cd[_0x07e8('0x4a')]=_['intersection'](_0x4c5585[_0x07e8('0x45')],qs[_0x07e8('0x4b')](_0x2e1b10[_0x07e8('0x46')][_0x07e8('0x4b')]));_0x4300cd[_0x07e8('0x4a')]=_0x4300cd[_0x07e8('0x4a')][_0x07e8('0x4c')]?_0x4300cd['attributes']:_0x4c5585['model'];if(!_0x2e1b10[_0x07e8('0x46')][_0x07e8('0x4d')]('nolimit')){_0x4300cd['limit']=qs[_0x07e8('0x2e')](_0x2e1b10[_0x07e8('0x46')][_0x07e8('0x2e')]);_0x4300cd[_0x07e8('0x2d')]=qs[_0x07e8('0x2d')](_0x2e1b10[_0x07e8('0x46')]['offset']);}_0x4300cd['order']=qs[_0x07e8('0x50')](_0x2e1b10[_0x07e8('0x46')]['sort']);_0x4300cd[_0x07e8('0x53')]=qs[_0x07e8('0x48')](_['pick'](_0x2e1b10[_0x07e8('0x46')],_0x4c5585[_0x07e8('0x48')]));_0x4300cd[_0x07e8('0x53')][_0x07e8('0x68')]=_0x96a9fd['id'];if(_0x2e1b10['query'][_0x07e8('0x52')]){_0x4300cd['where']=_['merge'](_0x4300cd[_0x07e8('0x53')],{'$or':_[_0x07e8('0x41')](_0x4300cd[_0x07e8('0x4a')],function(_0x4a6c4b){var _0x4d051d={};_0x4d051d[_0x4a6c4b]={'$like':'%'+_0x2e1b10['query'][_0x07e8('0x52')]+'%'};return _0x4d051d;})});}_0x4300cd=_['merge']({},_0x4300cd,_0x2e1b10[_0x07e8('0x56')]);return db[_0x07e8('0x64')][_0x07e8('0x2c')]({'where':_0x4300cd[_0x07e8('0x53')]})[_0x07e8('0x32')](function(_0x2a52c1){_0x63e1d['count']=_0x2a52c1;if(_0x2e1b10['query'][_0x07e8('0x5f')]){_0x4300cd[_0x07e8('0x58')]=[{'all':!![]}];}return db[_0x07e8('0x64')][_0x07e8('0x69')](_0x4300cd);})[_0x07e8('0x32')](function(_0xa329cb){_0x63e1d['rows']=_0xa329cb;return _0x63e1d;});}})[_0x07e8('0x32')](respondWithFilteredResult(_0x3327f7,_0x4300cd))[_0x07e8('0x5a')](handleError(_0x3327f7,null));};exports[_0x07e8('0x6a')]=function(_0x581cee,_0x364f05,_0x1111ba){return db[_0x07e8('0x57')][_0x07e8('0x62')]({'where':{'id':_0x581cee['params']['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x364f05,null))['then'](function(_0x3b6776){if(_0x3b6776){return _0x3b6776[_0x07e8('0x6a')](_0x581cee[_0x07e8('0x46')][_0x07e8('0x6b')]);}})[_0x07e8('0x32')](respondWithStatusCode(_0x364f05,null))['catch'](handleError(_0x364f05,null));};exports['addAnswer']=function(_0x222ebe,_0x321a04,_0x42255a){if(_0x222ebe[_0x07e8('0x61')]['id']){delete _0x222ebe[_0x07e8('0x61')]['id'];}return db['MailAccount']['find']({'where':{'id':_0x222ebe[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x321a04,null))[_0x07e8('0x32')](function(_0x23a9f0){if(_0x23a9f0){_0x222ebe['body'][_0x07e8('0x68')]=_0x23a9f0['id'];return db['CannedAnswer'][_0x07e8('0x65')](_0x222ebe[_0x07e8('0x61')]);}})[_0x07e8('0x32')](respondWithResult(_0x321a04,null))[_0x07e8('0x5a')](handleError(_0x321a04,null));};exports['getAnswers']=function(_0x18abd3,_0x47c5e3,_0x479390){var _0x2048be={'raw':![],'where':{}};var _0x57156f={};var _0x71a886={'count':0x0,'rows':[]};return db[_0x07e8('0x57')][_0x07e8('0x67')]({'where':{'id':_0x18abd3[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x47c5e3,null))[_0x07e8('0x32')](function(_0x49e970){if(_0x49e970){_0x57156f[_0x07e8('0x45')]=_[_0x07e8('0x47')](db['CannedAnswer'][_0x07e8('0x5e')]);_0x57156f[_0x07e8('0x46')]=_[_0x07e8('0x47')](_0x18abd3[_0x07e8('0x46')]);_0x57156f['filters']=_[_0x07e8('0x49')](_0x57156f[_0x07e8('0x45')],_0x57156f[_0x07e8('0x46')]);_0x2048be['attributes']=_['intersection'](_0x57156f[_0x07e8('0x45')],qs[_0x07e8('0x4b')](_0x18abd3[_0x07e8('0x46')]['fields']));_0x2048be[_0x07e8('0x4a')]=_0x2048be[_0x07e8('0x4a')][_0x07e8('0x4c')]?_0x2048be[_0x07e8('0x4a')]:_0x57156f[_0x07e8('0x45')];if(!_0x18abd3['query'][_0x07e8('0x4d')](_0x07e8('0x4e'))){_0x2048be['limit']=qs[_0x07e8('0x2e')](_0x18abd3[_0x07e8('0x46')][_0x07e8('0x2e')]);_0x2048be['offset']=qs[_0x07e8('0x2d')](_0x18abd3[_0x07e8('0x46')][_0x07e8('0x2d')]);}_0x2048be['order']=qs[_0x07e8('0x50')](_0x18abd3[_0x07e8('0x46')]['sort']);_0x2048be['where']=qs[_0x07e8('0x48')](_[_0x07e8('0x51')](_0x18abd3['query'],_0x57156f['filters']));_0x2048be['where'][_0x07e8('0x68')]=_0x49e970['id'];if(_0x18abd3['query'][_0x07e8('0x52')]){_0x2048be[_0x07e8('0x53')]=_[_0x07e8('0x54')](_0x2048be[_0x07e8('0x53')],{'$or':_[_0x07e8('0x41')](_0x2048be[_0x07e8('0x4a')],function(_0x5a43d6){var _0x4e9d1b={};_0x4e9d1b[_0x5a43d6]={'$like':'%'+_0x18abd3[_0x07e8('0x46')][_0x07e8('0x52')]+'%'};return _0x4e9d1b;})});}_0x2048be=_[_0x07e8('0x54')]({},_0x2048be,_0x18abd3[_0x07e8('0x56')]);return db[_0x07e8('0x6c')][_0x07e8('0x2c')]({'where':_0x2048be['where']})[_0x07e8('0x32')](function(_0xa146e5){_0x71a886[_0x07e8('0x2c')]=_0xa146e5;if(_0x18abd3[_0x07e8('0x46')][_0x07e8('0x5f')]){_0x2048be[_0x07e8('0x58')]=[{'all':!![]}];}return db['CannedAnswer'][_0x07e8('0x69')](_0x2048be);})[_0x07e8('0x32')](function(_0x3a5add){_0x71a886['rows']=_0x3a5add;return _0x71a886;});}})[_0x07e8('0x32')](respondWithFilteredResult(_0x47c5e3,_0x2048be))['catch'](handleError(_0x47c5e3,null));};exports[_0x07e8('0x6d')]=function(_0x486a69,_0x2e645f,_0x28c4ad){return db[_0x07e8('0x57')][_0x07e8('0x62')]({'where':{'id':_0x486a69[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x2e645f,null))[_0x07e8('0x32')](function(_0x45d087){if(_0x45d087){return _0x45d087[_0x07e8('0x6d')](_0x486a69[_0x07e8('0x46')][_0x07e8('0x6b')]);}})['then'](respondWithStatusCode(_0x2e645f,null))['catch'](handleError(_0x2e645f,null));};exports[_0x07e8('0x65')]=function(_0x2f96da,_0x4deba1){var _0x56db9e={'name':_0x2f96da[_0x07e8('0x61')][_0x07e8('0x39')],'key':_0x2f96da['body'][_0x07e8('0x44')],'email':_0x2f96da[_0x07e8('0x61')][_0x07e8('0x6e')],'ListId':_0x2f96da[_0x07e8('0x61')][_0x07e8('0x6f')],'active':!_[_0x07e8('0x70')](_0x2f96da[_0x07e8('0x61')][_0x07e8('0x71')])?_0x2f96da[_0x07e8('0x61')][_0x07e8('0x71')]:!![],'description':_0x2f96da[_0x07e8('0x61')][_0x07e8('0x72')]||null,'Imap':{},'Smtp':{}};if(_['isNil'](_0x2f96da[_0x07e8('0x61')]['cservice'])){if(_0x2f96da[_0x07e8('0x61')][_0x07e8('0x73')]){_0x56db9e['Imap'][_0x07e8('0x74')]=_0x56db9e[_0x07e8('0x5d')]['user']=_0x2f96da['body'][_0x07e8('0x75')];_0x56db9e[_0x07e8('0x3d')][_0x07e8('0x76')]=_0x56db9e[_0x07e8('0x5d')][_0x07e8('0x77')]=_0x2f96da[_0x07e8('0x61')][_0x07e8('0x78')];}else{_0x56db9e[_0x07e8('0x3d')]['authentication']=_0x56db9e[_0x07e8('0x5d')]['authentication']=![];}_0x56db9e[_0x07e8('0x3d')][_0x07e8('0x79')]=_0x2f96da[_0x07e8('0x61')]['Imap'][_0x07e8('0x79')];_0x56db9e[_0x07e8('0x3d')]['port']=_0x2f96da[_0x07e8('0x61')][_0x07e8('0x3d')][_0x07e8('0x7a')];_0x56db9e[_0x07e8('0x5d')][_0x07e8('0x79')]=_0x2f96da[_0x07e8('0x61')][_0x07e8('0x5d')][_0x07e8('0x79')];_0x56db9e['Smtp'][_0x07e8('0x7a')]=_0x2f96da[_0x07e8('0x61')]['Smtp'][_0x07e8('0x7a')];}else{_0x56db9e['Imap'][_0x07e8('0x7b')]=_0x56db9e[_0x07e8('0x5d')][_0x07e8('0x7b')]=_0x2f96da[_0x07e8('0x61')]['cservice'];_0x56db9e[_0x07e8('0x3d')][_0x07e8('0x74')]=_0x56db9e[_0x07e8('0x5d')][_0x07e8('0x74')]=_0x2f96da['body'][_0x07e8('0x75')];_0x56db9e[_0x07e8('0x3d')]['password']=_0x56db9e[_0x07e8('0x5d')][_0x07e8('0x77')]=_0x2f96da[_0x07e8('0x61')][_0x07e8('0x78')];}return db[_0x07e8('0x57')][_0x07e8('0x65')](_0x56db9e,{'include':[{'model':db[_0x07e8('0x3e')],'as':_0x07e8('0x5d')},{'model':db['MailServerIn'],'as':_0x07e8('0x3d')}]})[_0x07e8('0x32')](function(_0x7d8a82){var _0x592599=_0x2f96da[_0x07e8('0x74')]['get']({'plain':!![]});if(!_0x592599)throw new Error(_0x07e8('0x7c'));if(_0x592599[_0x07e8('0x7d')]==='user'){var _0x24f679=_0x7d8a82[_0x07e8('0x33')]({'plain':!![]});return db[_0x07e8('0x7e')][_0x07e8('0x62')]({'where':{'name':_0x07e8('0x34'),'userProfileId':_0x592599[_0x07e8('0x7f')]},'raw':!![]})['then'](function(_0x4d5193){if(_0x4d5193&&_0x4d5193[_0x07e8('0x80')]===0x0){return db['UserProfileResource'][_0x07e8('0x65')]({'name':_0x24f679[_0x07e8('0x39')],'resourceId':_0x24f679['id'],'type':_0x4d5193[_0x07e8('0x39')],'sectionId':_0x4d5193['id']},{})[_0x07e8('0x32')](function(){return _0x7d8a82;});}else{return _0x7d8a82;}})[_0x07e8('0x5a')](function(_0x221cfb){logger['error'](_0x07e8('0x81'),_0x221cfb);throw _0x221cfb;});}return _0x7d8a82;})[_0x07e8('0x32')](respondWithResult(_0x4deba1,0xc9))[_0x07e8('0x5a')](handleError(_0x4deba1,null));};exports[_0x07e8('0x82')]=function(_0x295db0,_0xf09129,_0x527032){return db[_0x07e8('0x57')][_0x07e8('0x67')]({'where':{'id':_0x295db0[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0xf09129,null))['then'](function(_0x1d323e){if(_0x1d323e){return _0x1d323e[_0x07e8('0x82')]();}return null;})[_0x07e8('0x32')](respondWithResult(_0xf09129,null))[_0x07e8('0x5a')](handleError(_0xf09129,null));};exports[_0x07e8('0x83')]=function(_0x270292,_0x5bd05e,_0x2afe91){if(_0x270292['body']['id']){delete _0x270292[_0x07e8('0x61')]['id'];}return db[_0x07e8('0x57')][_0x07e8('0x62')]({'where':{'id':_0x270292[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x5bd05e,null))[_0x07e8('0x32')](function(_0x3fc73c){if(_0x3fc73c){_0x270292['body'][_0x07e8('0x68')]=_0x3fc73c['id'];return db[_0x07e8('0x3c')]['create'](_0x270292[_0x07e8('0x61')]);}})['then'](respondWithResult(_0x5bd05e,null))[_0x07e8('0x5a')](handleError(_0x5bd05e,null));};exports[_0x07e8('0x84')]=function(_0x4b1772,_0x4daea2,_0x47bb44){return db[_0x07e8('0x57')]['findOne']({'where':{'id':_0x4b1772['params']['id']}})['then'](handleEntityNotFound(_0x4daea2,null))[_0x07e8('0x32')](function(_0x45b44a){if(_0x45b44a){return _0x45b44a[_0x07e8('0x85')](null);}return null;})['then'](respondWithStatusCode(_0x4daea2,null))[_0x07e8('0x5a')](handleError(_0x4daea2,null));};exports[_0x07e8('0x86')]=function(_0x294ac0,_0x21897a,_0x5bcb46){return db[_0x07e8('0x57')][_0x07e8('0x67')]({'where':{'id':_0x294ac0[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x21897a,null))['then'](function(_0x296437){if(_0x296437){return _0x296437['getSmtp']();}return null;})['then'](respondWithResult(_0x21897a,null))['catch'](handleError(_0x21897a,null));};exports[_0x07e8('0x87')]=function(_0x5954d1,_0x5720af,_0x24605e){if(_0x5954d1[_0x07e8('0x61')]['id']){delete _0x5954d1['body']['id'];}return db[_0x07e8('0x57')]['find']({'where':{'id':_0x5954d1[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x5720af,null))[_0x07e8('0x32')](function(_0x1a0735){if(_0x1a0735){_0x5954d1['body']['MailAccountId']=_0x1a0735['id'];return db['MailServerOut']['create'](_0x5954d1[_0x07e8('0x61')]);}})['then'](respondWithResult(_0x5720af,null))[_0x07e8('0x5a')](handleError(_0x5720af,null));};exports[_0x07e8('0x88')]=function(_0x4265e0,_0x404d34,_0x1a2bf9){return db['MailAccount'][_0x07e8('0x67')]({'where':{'id':_0x4265e0[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x404d34,null))[_0x07e8('0x32')](function(_0x430f69){if(_0x430f69){return _0x430f69[_0x07e8('0x89')](null);}return null;})['then'](respondWithStatusCode(_0x404d34,null))['catch'](handleError(_0x404d34,null));};exports['addInteraction']=function(_0x423a32,_0x50cc27,_0x113af9){return db[_0x07e8('0x8a')]['find']({'where':{'id':_0x423a32[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x50cc27,null))['then'](function(_0x4f12e7){if(_0x4f12e7){return _0x4f12e7[_0x07e8('0x8b')](_0x423a32[_0x07e8('0x61')][_0x07e8('0x6b')],_['omit'](_0x423a32[_0x07e8('0x61')],['ids','id'])||{});}})[_0x07e8('0x32')](respondWithResult(_0x50cc27,null))[_0x07e8('0x5a')](handleError(_0x50cc27,null));};exports[_0x07e8('0x8c')]=function(_0x438f94,_0x46c344,_0x471c69){var _0x1d6526={'raw':![],'where':{}};var _0x36b672={};var _0x38b90e={'count':0x0,'rows':[]};return db[_0x07e8('0x57')]['findOne']({'where':{'id':_0x438f94[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x46c344,null))[_0x07e8('0x32')](function(_0x3f0f8f){if(_0x3f0f8f){_0x36b672['model']=_[_0x07e8('0x47')](db[_0x07e8('0x8a')][_0x07e8('0x5e')]);_0x36b672['query']=_['keys'](_0x438f94[_0x07e8('0x46')]);_0x36b672['filters']=_[_0x07e8('0x49')](_0x36b672[_0x07e8('0x45')],_0x36b672[_0x07e8('0x46')]);_0x1d6526[_0x07e8('0x4a')]=_['intersection'](_0x36b672[_0x07e8('0x45')],qs['fields'](_0x438f94[_0x07e8('0x46')][_0x07e8('0x4b')]));_0x1d6526['attributes']=_0x1d6526['attributes']['length']?_0x1d6526['attributes']:_0x36b672[_0x07e8('0x45')];if(!_0x438f94['query'][_0x07e8('0x4d')](_0x07e8('0x4e'))){_0x1d6526['limit']=qs[_0x07e8('0x2e')](_0x438f94['query'][_0x07e8('0x2e')]);_0x1d6526[_0x07e8('0x2d')]=qs['offset'](_0x438f94['query']['offset']);}_0x1d6526[_0x07e8('0x4f')]=qs[_0x07e8('0x50')](_0x438f94['query'][_0x07e8('0x50')]);_0x1d6526[_0x07e8('0x53')]=qs[_0x07e8('0x48')](_[_0x07e8('0x51')](_0x438f94[_0x07e8('0x46')],_0x36b672[_0x07e8('0x48')]));_0x1d6526['where'][_0x07e8('0x68')]=_0x3f0f8f['id'];if(_0x438f94[_0x07e8('0x46')][_0x07e8('0x52')]){_0x1d6526[_0x07e8('0x53')]=_[_0x07e8('0x54')](_0x1d6526['where'],{'$or':_[_0x07e8('0x41')](_0x1d6526[_0x07e8('0x4a')],function(_0x5c7c43){var _0x4e77a7={};_0x4e77a7[_0x5c7c43]={'$like':'%'+_0x438f94[_0x07e8('0x46')][_0x07e8('0x52')]+'%'};return _0x4e77a7;})});}_0x1d6526=_[_0x07e8('0x54')]({},_0x1d6526,_0x438f94[_0x07e8('0x56')]);return db[_0x07e8('0x8a')][_0x07e8('0x2c')]({'where':_0x1d6526[_0x07e8('0x53')]})[_0x07e8('0x32')](function(_0x11c12d){_0x38b90e[_0x07e8('0x2c')]=_0x11c12d;if(_0x438f94[_0x07e8('0x46')][_0x07e8('0x5f')]){_0x1d6526['include']=[{'model':db[_0x07e8('0x8d')],'as':_0x07e8('0x8e'),'required':![]},{'model':db[_0x07e8('0x8f')],'as':_0x07e8('0x90'),'attributes':[_0x07e8('0x39'),_0x07e8('0x91'),_0x07e8('0x92')],'required':![]},{'model':db[_0x07e8('0x93')],'as':_0x07e8('0x94'),'attributes':['id','name','color'],'where':_0x438f94[_0x07e8('0x46')][_0x07e8('0x95')]?{'id':_0x438f94[_0x07e8('0x46')]['tag']}:undefined,'required':_0x438f94[_0x07e8('0x46')][_0x07e8('0x95')]?!![]:![]}];}return db['MailInteraction']['findAll'](_0x1d6526);})[_0x07e8('0x32')](function(_0x158fb7){_0x38b90e['rows']=_0x158fb7;return _0x38b90e;});}})[_0x07e8('0x32')](respondWithFilteredResult(_0x46c344,_0x1d6526))[_0x07e8('0x5a')](handleError(_0x46c344,null));};exports[_0x07e8('0x96')]=function(_0x23cc48,_0x260251,_0x57b075){return db['MailAccount'][_0x07e8('0x67')]({'where':{'id':_0x23cc48[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x260251,null))[_0x07e8('0x32')](function(_0x43a1b9){if(_0x43a1b9){return db[_0x07e8('0x97')][_0x07e8('0x98')](function(_0x1fddb3){return db[_0x07e8('0x99')][_0x07e8('0x36')]({'where':{'MailAccountId':_0x23cc48[_0x07e8('0x5c')]['id']},'transaction':_0x1fddb3})['then'](function(_0x1d6213){var _0x492b25=_[_0x07e8('0x41')](_0x23cc48[_0x07e8('0x61')],function(_0x4e7c14){_0x4e7c14[_0x07e8('0x68')]=_0x23cc48[_0x07e8('0x5c')]['id'];return _0x4e7c14;});return db['MailApplication']['bulkCreate'](_0x492b25,{'transaction':_0x1fddb3});});})['then'](function(){return db[_0x07e8('0x99')]['findAndCountAll']({'where':{'MailAccountId':_0x23cc48[_0x07e8('0x5c')]['id']},'order':_0x07e8('0x9a')});});}})[_0x07e8('0x32')](respondWithResult(_0x260251,null))['catch'](handleError(_0x260251,null));};exports[_0x07e8('0x9b')]=function(_0x30c2a7,_0x9baade,_0x4f8dbe){var _0x35e5ca={};var _0x3f2563={};var _0x470153;var _0x5af89c;return db['MailAccount']['findOne']({'where':{'id':_0x30c2a7['params']['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x9baade,null))[_0x07e8('0x32')](function(_0x465a1e){if(_0x465a1e){_0x470153=_0x465a1e;_0x3f2563[_0x07e8('0x45')]=_[_0x07e8('0x47')](db[_0x07e8('0x99')]['rawAttributes']);_0x3f2563[_0x07e8('0x46')]=_[_0x07e8('0x47')](_0x30c2a7[_0x07e8('0x46')]);_0x3f2563[_0x07e8('0x48')]=_[_0x07e8('0x49')](_0x3f2563[_0x07e8('0x45')],_0x3f2563[_0x07e8('0x46')]);_0x35e5ca['attributes']=_[_0x07e8('0x49')](_0x3f2563['model'],qs['fields'](_0x30c2a7[_0x07e8('0x46')][_0x07e8('0x4b')]));_0x35e5ca[_0x07e8('0x4a')]=_0x35e5ca[_0x07e8('0x4a')][_0x07e8('0x4c')]?_0x35e5ca[_0x07e8('0x4a')]:_0x3f2563['model'];_0x35e5ca[_0x07e8('0x4f')]=qs['sort'](_0x30c2a7[_0x07e8('0x46')][_0x07e8('0x50')]);_0x35e5ca['where']=qs[_0x07e8('0x48')](_['pick'](_0x30c2a7['query'],_0x3f2563[_0x07e8('0x48')]));if(_0x30c2a7[_0x07e8('0x46')]['filter']){_0x35e5ca[_0x07e8('0x53')]=_[_0x07e8('0x54')](_0x35e5ca[_0x07e8('0x53')],{'$or':_[_0x07e8('0x41')](_0x35e5ca[_0x07e8('0x4a')],function(_0x51645b){var _0x14b521={};_0x14b521[_0x51645b]={'$like':'%'+_0x30c2a7[_0x07e8('0x46')][_0x07e8('0x52')]+'%'};return _0x14b521;})});}_0x35e5ca=_[_0x07e8('0x54')]({},_0x35e5ca,_0x30c2a7[_0x07e8('0x56')]);return _0x470153['getApplications'](_0x35e5ca);}})[_0x07e8('0x32')](function(_0x713e4d){if(_0x713e4d){_0x5af89c=_0x713e4d[_0x07e8('0x4c')];if(!_0x30c2a7[_0x07e8('0x46')]['hasOwnProperty'](_0x07e8('0x4e'))){_0x35e5ca[_0x07e8('0x2e')]=qs['limit'](_0x30c2a7[_0x07e8('0x46')][_0x07e8('0x2e')]);_0x35e5ca[_0x07e8('0x2d')]=qs['offset'](_0x30c2a7[_0x07e8('0x46')][_0x07e8('0x2d')]);}return _0x470153['getApplications'](_0x35e5ca);}})[_0x07e8('0x32')](function(_0x5b40bd){if(_0x5b40bd){return _0x5b40bd?{'count':_0x5af89c,'rows':_0x5b40bd}:null;}})['then'](respondWithResult(_0x9baade,null))['catch'](handleError(_0x9baade,null));};exports[_0x07e8('0x9c')]=function(_0x86cd3d,_0x172342,_0x22454f){var _0x5d95c8={'raw':!![],'where':{}};var _0x9c7891={};var _0x10a140={'count':0x0,'rows':[]};return db[_0x07e8('0x57')]['findOne']({'where':{'id':_0x86cd3d[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x172342,null))[_0x07e8('0x32')](function(_0x2efae2){if(_0x2efae2){_0x9c7891[_0x07e8('0x45')]=_[_0x07e8('0x47')](db[_0x07e8('0x9d')]['rawAttributes']);_0x9c7891[_0x07e8('0x46')]=_['keys'](_0x86cd3d['query']);_0x9c7891[_0x07e8('0x48')]=_[_0x07e8('0x49')](_0x9c7891['model'],_0x9c7891['query']);_0x5d95c8[_0x07e8('0x4a')]=_['intersection'](_0x9c7891[_0x07e8('0x45')],qs[_0x07e8('0x4b')](_0x86cd3d[_0x07e8('0x46')]['fields']));_0x5d95c8[_0x07e8('0x4a')]=_0x5d95c8['attributes'][_0x07e8('0x4c')]?_0x5d95c8[_0x07e8('0x4a')]:_0x9c7891[_0x07e8('0x45')];if(!_0x86cd3d[_0x07e8('0x46')][_0x07e8('0x4d')](_0x07e8('0x4e'))){_0x5d95c8[_0x07e8('0x2e')]=qs[_0x07e8('0x2e')](_0x86cd3d[_0x07e8('0x46')][_0x07e8('0x2e')]);_0x5d95c8['offset']=qs[_0x07e8('0x2d')](_0x86cd3d['query'][_0x07e8('0x2d')]);}_0x5d95c8[_0x07e8('0x4f')]=qs[_0x07e8('0x50')](_0x86cd3d[_0x07e8('0x46')][_0x07e8('0x50')]);_0x5d95c8[_0x07e8('0x53')]=qs['filters'](_[_0x07e8('0x51')](_0x86cd3d['query'],_0x9c7891['filters']));_0x5d95c8[_0x07e8('0x53')][_0x07e8('0x68')]=_0x2efae2['id'];if(_0x86cd3d[_0x07e8('0x46')][_0x07e8('0x52')]){_0x5d95c8[_0x07e8('0x53')]=_['merge'](_0x5d95c8[_0x07e8('0x53')],{'$or':_[_0x07e8('0x41')](_0x5d95c8[_0x07e8('0x4a')],function(_0x3b46ca){var _0x2d6434={};_0x2d6434[_0x3b46ca]={'$like':'%'+_0x86cd3d[_0x07e8('0x46')][_0x07e8('0x52')]+'%'};return _0x2d6434;})});}if(_0x86cd3d['query'][_0x07e8('0x9e')]){var _0x212252=_0x86cd3d[_0x07e8('0x46')][_0x07e8('0x9e')][_0x07e8('0x9f')](',');var _0x104ce1={};_0x104ce1[_0x212252[0x0]]={'$gte':moment(_0x212252[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x5d95c8[_0x07e8('0x53')]=_[_0x07e8('0x54')](_0x5d95c8['where'],_0x104ce1);}_0x5d95c8=_[_0x07e8('0x54')]({},_0x5d95c8,_0x86cd3d[_0x07e8('0x56')]);return db[_0x07e8('0x9d')][_0x07e8('0x2c')]({'where':_0x5d95c8['where']})['then'](function(_0xcc53f9){_0x10a140[_0x07e8('0x2c')]=_0xcc53f9;if(_0x86cd3d[_0x07e8('0x46')][_0x07e8('0x5f')]){_0x5d95c8[_0x07e8('0x58')]=[{'all':!![]}];}return db[_0x07e8('0x9d')][_0x07e8('0x69')](_0x5d95c8);})[_0x07e8('0x32')](function(_0x19a857){_0x10a140[_0x07e8('0x59')]=_0x19a857;return _0x10a140;});}})[_0x07e8('0x32')](respondWithFilteredResult(_0x172342,_0x5d95c8))[_0x07e8('0x5a')](handleError(_0x172342,null));};exports[_0x07e8('0x3a')]=function(_0x5acb2a,_0x528500,_0x58c7ab){var _0x22064b,_0x34a56a={},_0x3322af;if(_0x5acb2a['body']['to']){_0x3322af=_0x5acb2a[_0x07e8('0x61')]['to'][_0x07e8('0x9f')](',')[0x0];}return db[_0x07e8('0x57')][_0x07e8('0x62')]({'where':{'id':_0x5acb2a[_0x07e8('0x5c')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x07e8('0x8d')],'as':_0x07e8('0xa0'),'where':{'email':_0x3322af},'limit':0x1,'order':[[_0x07e8('0xa1'),'DESC']]}]},{'model':db[_0x07e8('0x3e')],'as':_0x07e8('0x5d'),'raw':!![]}]})[_0x07e8('0x32')](handleEntityNotFound(_0x528500,null))[_0x07e8('0x32')](function(_0x3666a6){if(_0x3666a6){_0x22064b=_0x3666a6;if(_0x3666a6[_0x07e8('0x5d')]){if(_[_0x07e8('0x70')](_0x5acb2a[_0x07e8('0x61')][_0x07e8('0xa2')])){_0x5acb2a['body']['from']=util[_0x07e8('0xa3')](_0x07e8('0xa4'),_0x3666a6[_0x07e8('0x39')],_0x3666a6['email']||_0x3666a6[_0x07e8('0x5d')][_0x07e8('0x74')]);}if(_0x5acb2a[_0x07e8('0x61')][_0x07e8('0xa5')]&&_0x5acb2a[_0x07e8('0x61')][_0x07e8('0xa5')][_0x07e8('0x4c')]){for(var _0xbd6105=0x0;_0xbd6105<_0x5acb2a[_0x07e8('0x61')][_0x07e8('0xa5')]['length'];_0xbd6105+=0x1){_0x5acb2a[_0x07e8('0x61')]['attachments'][_0xbd6105]={'filename':_0x5acb2a['body']['attachments'][_0xbd6105][_0x07e8('0x39')],'path':path[_0x07e8('0xa6')](config[_0x07e8('0xa7')],_0x07e8('0xa8'),_0x5acb2a[_0x07e8('0x61')][_0x07e8('0xa5')][_0xbd6105][_0x07e8('0xa9')])};}}var _0x52a1c5={'tls':{'rejectUnauthorized':![]}};if(_[_0x07e8('0x70')](_0x3666a6[_0x07e8('0x5d')][_0x07e8('0x7b')])){if(_0x3666a6['Smtp'][_0x07e8('0xaa')]){_0x52a1c5[_0x07e8('0xab')]={'user':_0x3666a6[_0x07e8('0x5d')][_0x07e8('0x74')],'pass':_0x3666a6[_0x07e8('0x5d')][_0x07e8('0x77')]};}_0x52a1c5[_0x07e8('0x79')]=_0x3666a6['Smtp'][_0x07e8('0x79')];_0x52a1c5[_0x07e8('0x7a')]=_0x3666a6['Smtp'][_0x07e8('0x7a')];_0x52a1c5[_0x07e8('0xac')]=_0x3666a6[_0x07e8('0x5d')][_0x07e8('0xac')];}else{_0x52a1c5[_0x07e8('0x7b')]=_0x3666a6[_0x07e8('0x5d')][_0x07e8('0x7b')];_0x52a1c5['auth']={'user':_0x3666a6['Smtp']['user'],'pass':_0x3666a6[_0x07e8('0x5d')][_0x07e8('0x77')]};}return respondWithRpcPromise(_0x07e8('0xad'),_0x07e8('0xae'),{'account':_0x52a1c5,'message':_0x5acb2a[_0x07e8('0x61')]});}else{throw new Error(_0x07e8('0xaf'));}}})[_0x07e8('0x32')](function(_0x511cd6){if(_0x511cd6){_0x34a56a=_0x511cd6;if(_0x22064b[_0x07e8('0xb0')]){if(_0x22064b[_0x07e8('0xb0')]['Contacts']['length']){return _0x22064b['List']['Contacts'][0x0];}else{return db[_0x07e8('0x8d')]['create'](_['defaults'](_0x5acb2a[_0x07e8('0x61')],{'firstName':_0x5acb2a[_0x07e8('0x61')]['to'],'email':_0x5acb2a[_0x07e8('0x61')]['to'],'phone':_0x5acb2a['body']['to'],'ListId':_0x22064b['ListId']}));}}else{throw new Error(_0x07e8('0xaf'));}}})[_0x07e8('0x32')](function(_0x507aac){if(_0x507aac){var _0x53cab2={'UserId':_0x5acb2a[_0x07e8('0x74')]['id'],'ContactId':_0x507aac['id'],'MailAccountId':_0x22064b['id'],'inReplyTo':_0x34a56a[_0x07e8('0xb1')],'to':_0x5acb2a[_0x07e8('0x61')][_0x07e8('0xa2')],'cc':_0x5acb2a[_0x07e8('0x61')]['cc'],'subject':_0x5acb2a['body'][_0x07e8('0xb2')],'attach':_0x5acb2a[_0x07e8('0x61')][_0x07e8('0xb3')],'firstMsgDirection':'out','lastMsgAt':moment()[_0x07e8('0xa3')]('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgDirection':_0x07e8('0xb4'),'lastMsgBody':_0x5acb2a[_0x07e8('0x61')][_0x07e8('0x61')],'Messages':[_[_0x07e8('0x54')](_0x5acb2a[_0x07e8('0x61')],{'messageId':_0x34a56a[_0x07e8('0xb1')],'sentAt':moment()[_0x07e8('0xa3')](_0x07e8('0xb5')),'read':!![],'MailAccountId':_0x22064b['id'],'UserId':_0x5acb2a[_0x07e8('0x74')]['id'],'ContactId':_0x507aac['id']})]};if(_0x5acb2a['body']['Interaction']){_0x53cab2=_['merge'](_0x53cab2,_0x5acb2a[_0x07e8('0x61')]['Interaction']);}return db[_0x07e8('0x8a')][_0x07e8('0x65')](_0x53cab2,{'include':[{'model':db[_0x07e8('0x9d')],'as':'Messages'}]});}})[_0x07e8('0x32')](respondWithResult(_0x528500,null))[_0x07e8('0x5a')](handleError(_0x528500,null));};exports[_0x07e8('0xb6')]=function(_0x2adc3e,_0x19c8ea,_0x2d774d){return db['MailAccount']['find']({'where':{'id':_0x2adc3e[_0x07e8('0x5c')]['id']},'include':[{'model':db[_0x07e8('0x3e')],'as':'Smtp','raw':!![]}]})['then'](handleEntityNotFound(_0x19c8ea,null))[_0x07e8('0x32')](function(_0x4688ea){if(_0x4688ea&&_0x4688ea['Smtp']){var _0x5ac02d={'id':_0x4688ea['id'],'tls':{'rejectUnauthorized':![]}};if(_0x4688ea[_0x07e8('0x5d')][_0x07e8('0x7b')]){_0x5ac02d[_0x07e8('0x7b')]=_0x4688ea['Smtp'][_0x07e8('0x7b')];}else{_0x5ac02d[_0x07e8('0x79')]=_0x4688ea['Smtp']['host'];_0x5ac02d[_0x07e8('0x7a')]=_0x4688ea[_0x07e8('0x5d')][_0x07e8('0x7a')];_0x5ac02d[_0x07e8('0xac')]=_0x4688ea['Smtp'][_0x07e8('0xac')];}if(_0x4688ea[_0x07e8('0x5d')][_0x07e8('0xaa')]){_0x5ac02d[_0x07e8('0xab')]={'user':_0x4688ea['Smtp']['user'],'pass':_0x4688ea['Smtp'][_0x07e8('0x77')]};}return respondWithRpcPromise(_0x07e8('0xb7'),_0x07e8('0xb6'),{'account':_0x5ac02d});}})[_0x07e8('0x32')](respondWithResult(_0x19c8ea,null))[_0x07e8('0x5a')](handleError(_0x19c8ea,null));};exports[_0x07e8('0x36')]=function(_0xad9ce2,_0x5b9018){return db['MailAccount']['find']({'where':{'id':_0xad9ce2[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x5b9018,null))['then'](function(_0x2864b4){if(_0x2864b4&&_0x2864b4[_0x07e8('0x7b')]){throw new db['Sequelize'][(_0x07e8('0x1f'))]('You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account');}return _0x2864b4;})[_0x07e8('0x32')](removeEntity(_0x5b9018,null))[_0x07e8('0x5a')](handleError(_0x5b9018,null));};exports['addAgents']=function(_0x1ea1bc,_0x41a612,_0x71c7c3){return db['MailAccount'][_0x07e8('0x62')]({'where':{'id':_0x1ea1bc[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x41a612,null))[_0x07e8('0x32')](function(_0x171dba){if(_0x171dba){return _0x171dba[_0x07e8('0xb8')](_0x1ea1bc['body'][_0x07e8('0x6b')],_[_0x07e8('0xb9')](_0x1ea1bc['body'],[_0x07e8('0x6b'),'id'])||{})['spread'](function(_0x3c6216){for(var _0x28ec2b=0x0;_0x28ec2b<_0x1ea1bc[_0x07e8('0x61')][_0x07e8('0x6b')][_0x07e8('0x4c')];_0x28ec2b+=0x1){socket[_0x07e8('0xba')]('userMailAccount:save',{'UserId':_0x1ea1bc[_0x07e8('0x61')][_0x07e8('0x6b')][_0x28ec2b],'MailAccountId':_0x1ea1bc[_0x07e8('0x5c')]['id']});}return _0x3c6216;});}})[_0x07e8('0x32')](respondWithResult(_0x41a612,null))[_0x07e8('0x5a')](handleError(_0x41a612,null));};exports[_0x07e8('0xbb')]=function(_0x1878f4,_0x57a462,_0x1dae8a){return db['MailAccount'][_0x07e8('0x62')]({'where':{'id':_0x1878f4['params']['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x57a462,null))[_0x07e8('0x32')](function(_0x2ec33b){if(_0x2ec33b){return _0x2ec33b[_0x07e8('0xbb')](_0x1878f4[_0x07e8('0x46')]['ids'])[_0x07e8('0x32')](function(){if(_[_0x07e8('0xbc')](_0x1878f4['query'][_0x07e8('0x6b')])){for(var _0xcf4b85=0x0;_0xcf4b85<_0x1878f4[_0x07e8('0x46')][_0x07e8('0x6b')][_0x07e8('0x4c')];_0xcf4b85+=0x1){socket[_0x07e8('0xba')]('userMailAccount:remove',{'UserId':Number(_0x1878f4[_0x07e8('0x46')][_0x07e8('0x6b')][_0xcf4b85]),'MailAccountId':Number(_0x1878f4[_0x07e8('0x5c')]['id'])});}}else{socket[_0x07e8('0xba')](_0x07e8('0xbd'),{'UserId':Number(_0x1878f4[_0x07e8('0x46')][_0x07e8('0x6b')]),'MailAccountId':Number(_0x1878f4[_0x07e8('0x5c')]['id'])});}});}})[_0x07e8('0x32')](respondWithStatusCode(_0x57a462,null))[_0x07e8('0x5a')](handleError(_0x57a462,null));};exports[_0x07e8('0xbe')]=function(_0x5ae154,_0x24c116,_0x13ae3b){var _0x20f1a1={};var _0x33b46a={};var _0x4973bf;var _0x1111d1;return db['MailAccount'][_0x07e8('0x67')]({'where':{'id':_0x5ae154[_0x07e8('0x5c')]['id']}})[_0x07e8('0x32')](handleEntityNotFound(_0x24c116,null))[_0x07e8('0x32')](function(_0xbe6380){if(_0xbe6380){_0x4973bf=_0xbe6380;_0x33b46a[_0x07e8('0x45')]=_[_0x07e8('0x47')](db[_0x07e8('0x8f')][_0x07e8('0x5e')]);_0x33b46a[_0x07e8('0x46')]=_[_0x07e8('0x47')](_0x5ae154['query']);_0x33b46a[_0x07e8('0x48')]=_[_0x07e8('0x49')](_0x33b46a[_0x07e8('0x45')],_0x33b46a['query']);_0x20f1a1[_0x07e8('0x4a')]=_[_0x07e8('0x49')](_0x33b46a['model'],qs[_0x07e8('0x4b')](_0x5ae154['query'][_0x07e8('0x4b')]));_0x20f1a1[_0x07e8('0x4a')]=_0x20f1a1[_0x07e8('0x4a')][_0x07e8('0x4c')]?_0x20f1a1[_0x07e8('0x4a')]:_0x33b46a[_0x07e8('0x45')];_0x20f1a1[_0x07e8('0x4f')]=qs[_0x07e8('0x50')](_0x5ae154[_0x07e8('0x46')][_0x07e8('0x50')]);_0x20f1a1[_0x07e8('0x53')]=qs['filters'](_[_0x07e8('0x51')](_0x5ae154[_0x07e8('0x46')],_0x33b46a[_0x07e8('0x48')]));if(_0x5ae154[_0x07e8('0x46')][_0x07e8('0x52')]){_0x20f1a1['where']=_[_0x07e8('0x54')](_0x20f1a1[_0x07e8('0x53')],{'$or':_[_0x07e8('0x41')](_0x20f1a1[_0x07e8('0x4a')],function(_0x523e0c){var _0x46e38f={};_0x46e38f[_0x523e0c]={'$like':'%'+_0x5ae154[_0x07e8('0x46')]['filter']+'%'};return _0x46e38f;})});}_0x20f1a1=_[_0x07e8('0x54')]({},_0x20f1a1,_0x5ae154[_0x07e8('0x56')]);return _0x4973bf[_0x07e8('0xbe')](_0x20f1a1);}})[_0x07e8('0x32')](function(_0x6cefa7){if(_0x6cefa7){_0x1111d1=_0x6cefa7[_0x07e8('0x4c')];if(!_0x5ae154['query'][_0x07e8('0x4d')](_0x07e8('0x4e'))){_0x20f1a1[_0x07e8('0x2e')]=qs[_0x07e8('0x2e')](_0x5ae154[_0x07e8('0x46')][_0x07e8('0x2e')]);_0x20f1a1[_0x07e8('0x2d')]=qs['offset'](_0x5ae154[_0x07e8('0x46')][_0x07e8('0x2d')]);}return _0x4973bf['getAgents'](_0x20f1a1);}})[_0x07e8('0x32')](function(_0x350f33){if(_0x350f33){return _0x350f33?{'count':_0x1111d1,'rows':_0x350f33}:null;}})[_0x07e8('0x32')](respondWithResult(_0x24c116,null))[_0x07e8('0x5a')](handleError(_0x24c116,null));};
\ No newline at end of file
+var _0x2a58=['Contact','User','Owner','internal','Tag','Tags','color','tag','addApplications','sequelize','transaction','MailApplication','findAndCountAll','priority','getApplications','getMessages','MailMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','send','CmList','List','CmContact','Contacts','updatedAt','DESC','from','attachments','join','server/files/attachments','basename','auth','secure','SendMail','List\x20not\x20found','messageId','attach','out','Interaction','Messages','verifySmtp','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','spread','emit','userMailAccount:save','removeAgents','userMailAccount:remove','getAgents','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./mailAccount.socket','register','jayson/promise','client','http','test','Sequelize','ValidationError','request','then','info','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','error','code','message','MailAccount,\x20%s,\x20%s','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','update','destroy','get','UserProfileResource','name','index','Imap','Smtp','Pause','map','MailAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','show','MailServerIn','MailServerOut','mandatoryDispositionPause','include','options','find','body','params','describe','addDisposition','Disposition','create','getDispositions','findOne','MailAccountId','removeDispositions','ids','CannedAnswer','removeAnswers','email','ListId','isNil','active','cservice','cauthentication','user','cuser','password','pass','cpassword','authentication','host','port','service','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','MailAccounts','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','addImap','setImap','getSmtp','removeSmtp','MailInteraction','omit','getInteractions'];(function(_0xc9cd47,_0x35a546){var _0x26827e=function(_0x32d967){while(--_0x32d967){_0xc9cd47['push'](_0xc9cd47['shift']());}};_0x26827e(++_0x35a546);}(_0x2a58,0xef));var _0x82a5=function(_0x52857c,_0x2cd3ce){_0x52857c=_0x52857c-0x0;var _0x1aa01e=_0x2a58[_0x52857c];return _0x1aa01e;};'use strict';var pdf=require(_0x82a5('0x0'));var emlformat=require(_0x82a5('0x1'));var rimraf=require(_0x82a5('0x2'));var zipdir=require(_0x82a5('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x82a5('0x4'));var moment=require(_0x82a5('0x5'));var BPromise=require(_0x82a5('0x6'));var Mustache=require(_0x82a5('0x7'));var util=require(_0x82a5('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x82a5('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x82a5('0xa'));var squel=require('squel');var crypto=require(_0x82a5('0xb'));var jsforce=require(_0x82a5('0xc'));var deskjs=require(_0x82a5('0xd'));var toCsv=require('to-csv');var querystring=require(_0x82a5('0xe'));var Papa=require(_0x82a5('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x82a5('0x10'));var as=require(_0x82a5('0x11'));var hardwareService=require(_0x82a5('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0x82a5('0x13'));var config=require(_0x82a5('0x14'));var db=require(_0x82a5('0x15'))['db'];config[_0x82a5('0x16')]=_['defaults'](config[_0x82a5('0x16')],{'host':_0x82a5('0x17'),'port':0x18eb});var socket=require(_0x82a5('0x18'))(new Redis(config[_0x82a5('0x16')]));require(_0x82a5('0x19'))[_0x82a5('0x1a')](socket);var jayson=require(_0x82a5('0x1b'));var client=jayson[_0x82a5('0x1c')][_0x82a5('0x1d')]({'port':0x232b});function checkPasswordPattern(_0x37c1eb,_0x56be7e,_0x34d025){if(_0x34d025){var _0x39f49e=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x39f49e[_0x82a5('0x1e')](_0x56be7e)){return _0x37c1eb;}else{throw new db[(_0x82a5('0x1f'))][(_0x82a5('0x20'))]('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 _0x37c1eb;}}function respondWithRpcPromise(_0x473f02,_0x1a307b,_0x3cbb30,_0x1a5f39){return new BPromise(function(_0x37ecae,_0x575d3b){var _0x1de5b2=_0x1a5f39||client;return _0x1de5b2[_0x82a5('0x21')](_0x473f02,_0x3cbb30)[_0x82a5('0x22')](function(_0x109673){logger[_0x82a5('0x23')]('MailAccount,\x20%s,\x20%s',_0x1a307b,_0x82a5('0x24'));logger[_0x82a5('0x25')](_0x82a5('0x26'),_0x1a307b,'request\x20sent',JSON['stringify'](_0x109673));if(_0x109673[_0x82a5('0x27')]){if(_0x109673[_0x82a5('0x27')][_0x82a5('0x28')]===0x1f4){logger[_0x82a5('0x27')]('MailAccount,\x20%s,\x20%s',_0x1a307b,_0x109673['error'][_0x82a5('0x29')]);return _0x575d3b(_0x109673['error'][_0x82a5('0x29')]);}logger[_0x82a5('0x27')](_0x82a5('0x2a'),_0x1a307b,_0x109673[_0x82a5('0x27')]['message']);return _0x37ecae(_0x109673[_0x82a5('0x27')]['message']);}else{logger[_0x82a5('0x23')](_0x82a5('0x2a'),_0x1a307b,'request\x20sent');_0x37ecae(_0x109673['result']['message']);}})[_0x82a5('0x2b')](function(_0x1a613f){logger['error'](_0x82a5('0x2a'),_0x1a307b,_0x1a613f);_0x575d3b(_0x1a613f);});});}function respondWithStatusCode(_0x5df928,_0x573850){_0x573850=_0x573850||0xcc;return function(_0x1ab2f0){if(_0x1ab2f0){return _0x5df928[_0x82a5('0x2c')](_0x573850);}return _0x5df928[_0x82a5('0x2d')](_0x573850)[_0x82a5('0x2e')]();};}function respondWithResult(_0x2563ac,_0x3be6b1){_0x3be6b1=_0x3be6b1||0xc8;return function(_0x5d0c91){if(_0x5d0c91){return _0x2563ac[_0x82a5('0x2d')](_0x3be6b1)[_0x82a5('0x2f')](_0x5d0c91);}};}function respondWithFilteredResult(_0xb27bf9,_0x471593){return function(_0x26953d){if(_0x26953d){var _0x277ffb=_0x26953d[_0x82a5('0x30')],_0x2c2bec=_0x471593[_0x82a5('0x31')],_0x36449=_0x471593[_0x82a5('0x31')]+_0x471593[_0x82a5('0x32')],_0x3e73cb;if(_0x36449>=_0x277ffb){_0x36449=_0x277ffb;_0x3e73cb=0xc8;}else{_0x3e73cb=0xce;}_0xb27bf9['status'](_0x3e73cb);return _0xb27bf9[_0x82a5('0x33')](_0x82a5('0x34'),_0x2c2bec+'-'+_0x36449+'/'+_0x277ffb)['json'](_0x26953d);}return null;};}function patchUpdates(_0x45ff53){return function(_0x2e0e4a){try{jsonpatch['apply'](_0x2e0e4a,_0x45ff53,!![]);}catch(_0x2db65d){return BPromise[_0x82a5('0x35')](_0x2db65d);}return _0x2e0e4a['save']();};}function saveUpdates(_0x2ee4d6,_0x424f0a){return function(_0x3dfc33){if(_0x3dfc33){return _0x3dfc33[_0x82a5('0x36')](_0x2ee4d6)[_0x82a5('0x22')](function(_0x1934b1){return _0x1934b1;});}return null;};}function removeEntity(_0x58fe9a,_0x52fc14){return function(_0x6e84ee){if(_0x6e84ee){return _0x6e84ee[_0x82a5('0x37')]()[_0x82a5('0x22')](function(){var _0x2c11b4=_0x6e84ee[_0x82a5('0x38')]({'plain':!![]});var _0x31ec04='MailAccounts';return db[_0x82a5('0x39')][_0x82a5('0x37')]({'where':{'type':_0x31ec04,'resourceId':_0x2c11b4['id']}})['then'](function(){return _0x6e84ee;});})[_0x82a5('0x22')](function(){_0x58fe9a[_0x82a5('0x2d')](0xcc)[_0x82a5('0x2e')]();});}};}function handleEntityNotFound(_0x14f605,_0x4b8f2a){return function(_0x451c9b){if(!_0x451c9b){_0x14f605[_0x82a5('0x2c')](0x194);}return _0x451c9b;};}function handleError(_0x3236c3,_0x5aecdc){_0x5aecdc=_0x5aecdc||0x1f4;return function(_0x4bc7ee){logger['error'](_0x4bc7ee['stack']);if(_0x4bc7ee[_0x82a5('0x3a')]){delete _0x4bc7ee[_0x82a5('0x3a')];}_0x3236c3['status'](_0x5aecdc)['send'](_0x4bc7ee);};}exports[_0x82a5('0x3b')]=function(_0x2064d6,_0x55f857){var _0x19283f={'include':[{'model':db['MailServerIn'],'as':_0x82a5('0x3c')},{'model':db['MailServerOut'],'as':_0x82a5('0x3d')},{'model':db[_0x82a5('0x3e')],'as':'mandatoryDispositionPause'}]},_0x9a22f7={},_0x613ced={'count':0x0,'rows':[]};var _0x5e8303=_[_0x82a5('0x3f')](db[_0x82a5('0x40')][_0x82a5('0x41')],function(_0x187ef0){return{'name':_0x187ef0[_0x82a5('0x42')],'type':_0x187ef0[_0x82a5('0x43')][_0x82a5('0x44')]};});_0x9a22f7[_0x82a5('0x45')]=_[_0x82a5('0x3f')](_0x5e8303,_0x82a5('0x3a'));_0x9a22f7[_0x82a5('0x46')]=_[_0x82a5('0x47')](_0x2064d6[_0x82a5('0x46')]);_0x9a22f7[_0x82a5('0x48')]=_[_0x82a5('0x49')](_0x9a22f7['model'],_0x9a22f7[_0x82a5('0x46')]);_0x19283f[_0x82a5('0x4a')]=_[_0x82a5('0x49')](_0x9a22f7['model'],qs[_0x82a5('0x4b')](_0x2064d6[_0x82a5('0x46')][_0x82a5('0x4b')]));_0x19283f[_0x82a5('0x4a')]=_0x19283f[_0x82a5('0x4a')][_0x82a5('0x4c')]?_0x19283f[_0x82a5('0x4a')]:_0x9a22f7[_0x82a5('0x45')];if(!_0x2064d6[_0x82a5('0x46')][_0x82a5('0x4d')](_0x82a5('0x4e'))){_0x19283f[_0x82a5('0x32')]=qs[_0x82a5('0x32')](_0x2064d6['query'][_0x82a5('0x32')]);_0x19283f[_0x82a5('0x31')]=qs['offset'](_0x2064d6[_0x82a5('0x46')][_0x82a5('0x31')]);}_0x19283f[_0x82a5('0x4f')]=qs[_0x82a5('0x50')](_0x2064d6[_0x82a5('0x46')][_0x82a5('0x50')]);_0x19283f[_0x82a5('0x51')]=qs[_0x82a5('0x48')](_[_0x82a5('0x52')](_0x2064d6['query'],_0x9a22f7[_0x82a5('0x48')]));if(_0x2064d6[_0x82a5('0x46')][_0x82a5('0x53')]){_0x19283f[_0x82a5('0x51')]=_[_0x82a5('0x54')](_0x19283f[_0x82a5('0x51')],{'$or':_[_0x82a5('0x3f')](_0x5e8303,function(_0x56074c){if(_0x56074c[_0x82a5('0x43')]!==_0x82a5('0x55')){var _0x11998e={};_0x11998e[_0x56074c[_0x82a5('0x3a')]]={'$like':'%'+_0x2064d6['query'][_0x82a5('0x53')]+'%'};return _0x11998e;}})});}_0x19283f=_[_0x82a5('0x54')]({},_0x19283f,_0x2064d6['options']);var _0x1aa2b5={'where':_0x19283f[_0x82a5('0x51')]};return db[_0x82a5('0x40')][_0x82a5('0x30')](_0x1aa2b5)[_0x82a5('0x22')](function(_0x569406){_0x613ced[_0x82a5('0x30')]=_0x569406;if(_0x2064d6['query'][_0x82a5('0x56')]){_0x19283f['include']=[{'all':!![]}];}return db[_0x82a5('0x40')][_0x82a5('0x57')](_0x19283f);})[_0x82a5('0x22')](function(_0x113ebf){_0x613ced[_0x82a5('0x58')]=_0x113ebf;return _0x613ced;})[_0x82a5('0x22')](respondWithFilteredResult(_0x55f857,_0x19283f))['catch'](handleError(_0x55f857,null));};exports[_0x82a5('0x59')]=function(_0x2ebe80,_0x322c37){var _0x55b7c5={'raw':![],'where':{'id':_0x2ebe80['params']['id']},'include':[{'model':db[_0x82a5('0x5a')],'as':_0x82a5('0x3c')},{'model':db[_0x82a5('0x5b')],'as':_0x82a5('0x3d')},{'model':db[_0x82a5('0x3e')],'as':_0x82a5('0x5c')}]},_0x1b4acf={};_0x1b4acf[_0x82a5('0x45')]=_[_0x82a5('0x47')](db[_0x82a5('0x40')][_0x82a5('0x41')]);_0x1b4acf['query']=_[_0x82a5('0x47')](_0x2ebe80['query']);_0x1b4acf[_0x82a5('0x48')]=_[_0x82a5('0x49')](_0x1b4acf[_0x82a5('0x45')],_0x1b4acf[_0x82a5('0x46')]);_0x55b7c5[_0x82a5('0x4a')]=_[_0x82a5('0x49')](_0x1b4acf[_0x82a5('0x45')],qs[_0x82a5('0x4b')](_0x2ebe80[_0x82a5('0x46')][_0x82a5('0x4b')]));_0x55b7c5['attributes']=_0x55b7c5[_0x82a5('0x4a')][_0x82a5('0x4c')]?_0x55b7c5[_0x82a5('0x4a')]:_0x1b4acf[_0x82a5('0x45')];if(_0x2ebe80[_0x82a5('0x46')][_0x82a5('0x56')]){_0x55b7c5[_0x82a5('0x5d')]=[{'all':!![]}];}_0x55b7c5=_[_0x82a5('0x54')]({},_0x55b7c5,_0x2ebe80[_0x82a5('0x5e')]);return db[_0x82a5('0x40')][_0x82a5('0x5f')](_0x55b7c5)['then'](handleEntityNotFound(_0x322c37,null))['then'](respondWithResult(_0x322c37,null))['catch'](handleError(_0x322c37,null));};exports['update']=function(_0x486995,_0x565e05){if(_0x486995[_0x82a5('0x60')]['id']){delete _0x486995['body']['id'];}return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x486995[_0x82a5('0x61')]['id']},'include':[{'model':db[_0x82a5('0x5a')],'as':_0x82a5('0x3c')},{'model':db[_0x82a5('0x5b')],'as':_0x82a5('0x3d')},{'model':db['Pause'],'as':_0x82a5('0x5c')}]})[_0x82a5('0x22')](handleEntityNotFound(_0x565e05,null))['then'](saveUpdates(_0x486995[_0x82a5('0x60')],null))[_0x82a5('0x22')](function(_0x15729a){if(_0x15729a&&_0x486995[_0x82a5('0x60')][_0x82a5('0x3c')]){return db[_0x82a5('0x5a')][_0x82a5('0x36')](_0x486995[_0x82a5('0x60')]['Imap'],{'where':{'MailAccountId':_0x15729a['id']}})[_0x82a5('0x22')](function(){return _0x15729a;});}return _0x15729a;})[_0x82a5('0x22')](function(_0xdf0d94){if(_0xdf0d94&&_0x486995[_0x82a5('0x60')][_0x82a5('0x3d')]){return db[_0x82a5('0x5b')]['update'](_0x486995['body'][_0x82a5('0x3d')],{'where':{'MailAccountId':_0xdf0d94['id']}})[_0x82a5('0x22')](function(){return _0xdf0d94;});}return _0xdf0d94;})[_0x82a5('0x22')](respondWithResult(_0x565e05,null))[_0x82a5('0x2b')](handleError(_0x565e05,null));};exports[_0x82a5('0x62')]=function(_0x34072f,_0x2f9ab3){return db[_0x82a5('0x40')][_0x82a5('0x62')]()[_0x82a5('0x22')](respondWithResult(_0x2f9ab3,null))[_0x82a5('0x2b')](handleError(_0x2f9ab3,null));};exports[_0x82a5('0x63')]=function(_0x19eaf3,_0x130b8c,_0x107c09){if(_0x19eaf3[_0x82a5('0x60')]['id']){delete _0x19eaf3[_0x82a5('0x60')]['id'];}return db[_0x82a5('0x40')]['find']({'where':{'id':_0x19eaf3[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x130b8c,null))[_0x82a5('0x22')](function(_0x58fa1d){if(_0x58fa1d){_0x19eaf3[_0x82a5('0x60')]['MailAccountId']=_0x58fa1d['id'];return db[_0x82a5('0x64')][_0x82a5('0x65')](_0x19eaf3[_0x82a5('0x60')]);}})[_0x82a5('0x22')](respondWithResult(_0x130b8c,null))[_0x82a5('0x2b')](handleError(_0x130b8c,null));};exports[_0x82a5('0x66')]=function(_0xd24467,_0x28a0d8,_0x5c4531){var _0x225110={'raw':![],'where':{}};var _0x3e3ac0={};var _0x5a084c={'count':0x0,'rows':[]};return db[_0x82a5('0x40')][_0x82a5('0x67')]({'where':{'id':_0xd24467['params']['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x28a0d8,null))[_0x82a5('0x22')](function(_0x62dcec){if(_0x62dcec){_0x3e3ac0[_0x82a5('0x45')]=_[_0x82a5('0x47')](db[_0x82a5('0x64')][_0x82a5('0x41')]);_0x3e3ac0[_0x82a5('0x46')]=_[_0x82a5('0x47')](_0xd24467[_0x82a5('0x46')]);_0x3e3ac0[_0x82a5('0x48')]=_[_0x82a5('0x49')](_0x3e3ac0['model'],_0x3e3ac0[_0x82a5('0x46')]);_0x225110[_0x82a5('0x4a')]=_[_0x82a5('0x49')](_0x3e3ac0[_0x82a5('0x45')],qs[_0x82a5('0x4b')](_0xd24467['query'][_0x82a5('0x4b')]));_0x225110[_0x82a5('0x4a')]=_0x225110[_0x82a5('0x4a')][_0x82a5('0x4c')]?_0x225110[_0x82a5('0x4a')]:_0x3e3ac0[_0x82a5('0x45')];if(!_0xd24467[_0x82a5('0x46')][_0x82a5('0x4d')]('nolimit')){_0x225110[_0x82a5('0x32')]=qs[_0x82a5('0x32')](_0xd24467['query']['limit']);_0x225110[_0x82a5('0x31')]=qs[_0x82a5('0x31')](_0xd24467[_0x82a5('0x46')][_0x82a5('0x31')]);}_0x225110[_0x82a5('0x4f')]=qs[_0x82a5('0x50')](_0xd24467['query'][_0x82a5('0x50')]);_0x225110['where']=qs[_0x82a5('0x48')](_['pick'](_0xd24467[_0x82a5('0x46')],_0x3e3ac0[_0x82a5('0x48')]));_0x225110[_0x82a5('0x51')][_0x82a5('0x68')]=_0x62dcec['id'];if(_0xd24467['query'][_0x82a5('0x53')]){_0x225110[_0x82a5('0x51')]=_['merge'](_0x225110[_0x82a5('0x51')],{'$or':_[_0x82a5('0x3f')](_0x225110[_0x82a5('0x4a')],function(_0x5b2b72){var _0x1a4a6b={};_0x1a4a6b[_0x5b2b72]={'$like':'%'+_0xd24467[_0x82a5('0x46')][_0x82a5('0x53')]+'%'};return _0x1a4a6b;})});}_0x225110=_[_0x82a5('0x54')]({},_0x225110,_0xd24467[_0x82a5('0x5e')]);return db[_0x82a5('0x64')][_0x82a5('0x30')]({'where':_0x225110['where']})[_0x82a5('0x22')](function(_0x5577e4){_0x5a084c['count']=_0x5577e4;if(_0xd24467[_0x82a5('0x46')]['includeAll']){_0x225110[_0x82a5('0x5d')]=[{'all':!![]}];}return db[_0x82a5('0x64')][_0x82a5('0x57')](_0x225110);})[_0x82a5('0x22')](function(_0x14cfc){_0x5a084c[_0x82a5('0x58')]=_0x14cfc;return _0x5a084c;});}})[_0x82a5('0x22')](respondWithFilteredResult(_0x28a0d8,_0x225110))[_0x82a5('0x2b')](handleError(_0x28a0d8,null));};exports[_0x82a5('0x69')]=function(_0x1c0942,_0x1eaf31,_0x29eb0c){return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x1c0942[_0x82a5('0x61')]['id']}})['then'](handleEntityNotFound(_0x1eaf31,null))[_0x82a5('0x22')](function(_0x305d70){if(_0x305d70){return _0x305d70['removeDispositions'](_0x1c0942[_0x82a5('0x46')][_0x82a5('0x6a')]);}})[_0x82a5('0x22')](respondWithStatusCode(_0x1eaf31,null))[_0x82a5('0x2b')](handleError(_0x1eaf31,null));};exports['addAnswer']=function(_0x5b26e5,_0x3777f7,_0x2a8393){if(_0x5b26e5[_0x82a5('0x60')]['id']){delete _0x5b26e5[_0x82a5('0x60')]['id'];}return db['MailAccount'][_0x82a5('0x5f')]({'where':{'id':_0x5b26e5[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x3777f7,null))[_0x82a5('0x22')](function(_0x3766bf){if(_0x3766bf){_0x5b26e5[_0x82a5('0x60')][_0x82a5('0x68')]=_0x3766bf['id'];return db[_0x82a5('0x6b')][_0x82a5('0x65')](_0x5b26e5['body']);}})['then'](respondWithResult(_0x3777f7,null))[_0x82a5('0x2b')](handleError(_0x3777f7,null));};exports['getAnswers']=function(_0x16bbe3,_0x2e5d0b,_0x22d9ab){var _0x172e79={'raw':![],'where':{}};var _0x43fdc8={};var _0x32033d={'count':0x0,'rows':[]};return db['MailAccount'][_0x82a5('0x67')]({'where':{'id':_0x16bbe3['params']['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x2e5d0b,null))[_0x82a5('0x22')](function(_0x81d23a){if(_0x81d23a){_0x43fdc8['model']=_[_0x82a5('0x47')](db[_0x82a5('0x6b')][_0x82a5('0x41')]);_0x43fdc8[_0x82a5('0x46')]=_[_0x82a5('0x47')](_0x16bbe3[_0x82a5('0x46')]);_0x43fdc8[_0x82a5('0x48')]=_[_0x82a5('0x49')](_0x43fdc8[_0x82a5('0x45')],_0x43fdc8[_0x82a5('0x46')]);_0x172e79['attributes']=_[_0x82a5('0x49')](_0x43fdc8[_0x82a5('0x45')],qs['fields'](_0x16bbe3['query'][_0x82a5('0x4b')]));_0x172e79[_0x82a5('0x4a')]=_0x172e79[_0x82a5('0x4a')][_0x82a5('0x4c')]?_0x172e79['attributes']:_0x43fdc8[_0x82a5('0x45')];if(!_0x16bbe3[_0x82a5('0x46')][_0x82a5('0x4d')]('nolimit')){_0x172e79[_0x82a5('0x32')]=qs[_0x82a5('0x32')](_0x16bbe3[_0x82a5('0x46')][_0x82a5('0x32')]);_0x172e79[_0x82a5('0x31')]=qs['offset'](_0x16bbe3[_0x82a5('0x46')][_0x82a5('0x31')]);}_0x172e79[_0x82a5('0x4f')]=qs[_0x82a5('0x50')](_0x16bbe3[_0x82a5('0x46')][_0x82a5('0x50')]);_0x172e79[_0x82a5('0x51')]=qs['filters'](_[_0x82a5('0x52')](_0x16bbe3[_0x82a5('0x46')],_0x43fdc8[_0x82a5('0x48')]));_0x172e79[_0x82a5('0x51')][_0x82a5('0x68')]=_0x81d23a['id'];if(_0x16bbe3[_0x82a5('0x46')][_0x82a5('0x53')]){_0x172e79['where']=_[_0x82a5('0x54')](_0x172e79['where'],{'$or':_[_0x82a5('0x3f')](_0x172e79[_0x82a5('0x4a')],function(_0x13e690){var _0xdf761b={};_0xdf761b[_0x13e690]={'$like':'%'+_0x16bbe3[_0x82a5('0x46')]['filter']+'%'};return _0xdf761b;})});}_0x172e79=_[_0x82a5('0x54')]({},_0x172e79,_0x16bbe3[_0x82a5('0x5e')]);return db[_0x82a5('0x6b')][_0x82a5('0x30')]({'where':_0x172e79[_0x82a5('0x51')]})[_0x82a5('0x22')](function(_0x3c758e){_0x32033d[_0x82a5('0x30')]=_0x3c758e;if(_0x16bbe3['query'][_0x82a5('0x56')]){_0x172e79[_0x82a5('0x5d')]=[{'all':!![]}];}return db[_0x82a5('0x6b')]['findAll'](_0x172e79);})['then'](function(_0x3a37d4){_0x32033d[_0x82a5('0x58')]=_0x3a37d4;return _0x32033d;});}})[_0x82a5('0x22')](respondWithFilteredResult(_0x2e5d0b,_0x172e79))['catch'](handleError(_0x2e5d0b,null));};exports[_0x82a5('0x6c')]=function(_0x27c71e,_0x170963,_0x3ac805){return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x27c71e[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x170963,null))['then'](function(_0xa0a84a){if(_0xa0a84a){return _0xa0a84a[_0x82a5('0x6c')](_0x27c71e[_0x82a5('0x46')][_0x82a5('0x6a')]);}})['then'](respondWithStatusCode(_0x170963,null))[_0x82a5('0x2b')](handleError(_0x170963,null));};exports['create']=function(_0x1d7d06,_0x4448e0){var _0x251132={'name':_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x3a')],'key':_0x1d7d06['body']['key'],'email':_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x6d')],'ListId':_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x6e')],'active':!_[_0x82a5('0x6f')](_0x1d7d06[_0x82a5('0x60')]['active'])?_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x70')]:!![],'description':_0x1d7d06[_0x82a5('0x60')]['description']||null,'Imap':{},'Smtp':{}};if(_['isNil'](_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x71')])){if(_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x72')]){_0x251132[_0x82a5('0x3c')][_0x82a5('0x73')]=_0x251132[_0x82a5('0x3d')][_0x82a5('0x73')]=_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x74')];_0x251132[_0x82a5('0x3c')][_0x82a5('0x75')]=_0x251132[_0x82a5('0x3d')][_0x82a5('0x76')]=_0x1d7d06['body'][_0x82a5('0x77')];}else{_0x251132[_0x82a5('0x3c')][_0x82a5('0x78')]=_0x251132[_0x82a5('0x3d')][_0x82a5('0x78')]=![];}_0x251132[_0x82a5('0x3c')][_0x82a5('0x79')]=_0x1d7d06['body'][_0x82a5('0x3c')][_0x82a5('0x79')];_0x251132[_0x82a5('0x3c')]['port']=_0x1d7d06['body'][_0x82a5('0x3c')]['port'];_0x251132[_0x82a5('0x3d')][_0x82a5('0x79')]=_0x1d7d06[_0x82a5('0x60')]['Smtp'][_0x82a5('0x79')];_0x251132[_0x82a5('0x3d')][_0x82a5('0x7a')]=_0x1d7d06[_0x82a5('0x60')]['Smtp'][_0x82a5('0x7a')];}else{_0x251132[_0x82a5('0x3c')][_0x82a5('0x7b')]=_0x251132[_0x82a5('0x3d')][_0x82a5('0x7b')]=_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x71')];_0x251132['Imap'][_0x82a5('0x73')]=_0x251132[_0x82a5('0x3d')][_0x82a5('0x73')]=_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x74')];_0x251132[_0x82a5('0x3c')][_0x82a5('0x75')]=_0x251132[_0x82a5('0x3d')][_0x82a5('0x76')]=_0x1d7d06[_0x82a5('0x60')][_0x82a5('0x77')];}return db[_0x82a5('0x40')][_0x82a5('0x65')](_0x251132,{'include':[{'model':db['MailServerOut'],'as':_0x82a5('0x3d')},{'model':db[_0x82a5('0x5a')],'as':_0x82a5('0x3c')}]})['then'](function(_0x38c82e){var _0x1348ec=_0x1d7d06[_0x82a5('0x73')][_0x82a5('0x38')]({'plain':!![]});if(!_0x1348ec)throw new Error(_0x82a5('0x7c'));if(_0x1348ec[_0x82a5('0x7d')]===_0x82a5('0x73')){var _0x2963fc=_0x38c82e['get']({'plain':!![]});return db[_0x82a5('0x7e')][_0x82a5('0x5f')]({'where':{'name':_0x82a5('0x7f'),'userProfileId':_0x1348ec['userProfileId']},'raw':!![]})[_0x82a5('0x22')](function(_0x44ba95){if(_0x44ba95&&_0x44ba95['autoAssociation']===0x0){return db[_0x82a5('0x39')][_0x82a5('0x65')]({'name':_0x2963fc[_0x82a5('0x3a')],'resourceId':_0x2963fc['id'],'type':_0x44ba95[_0x82a5('0x3a')],'sectionId':_0x44ba95['id']},{})[_0x82a5('0x22')](function(){return _0x38c82e;});}else{return _0x38c82e;}})[_0x82a5('0x2b')](function(_0x404a37){logger[_0x82a5('0x27')](_0x82a5('0x80'),_0x404a37);throw _0x404a37;});}return _0x38c82e;})[_0x82a5('0x22')](respondWithResult(_0x4448e0,0xc9))[_0x82a5('0x2b')](handleError(_0x4448e0,null));};exports[_0x82a5('0x81')]=function(_0x39c0cd,_0x228fea,_0x5f1005){return db['MailAccount']['findOne']({'where':{'id':_0x39c0cd[_0x82a5('0x61')]['id']}})['then'](handleEntityNotFound(_0x228fea,null))[_0x82a5('0x22')](function(_0x129ad1){if(_0x129ad1){return _0x129ad1[_0x82a5('0x81')]();}return null;})[_0x82a5('0x22')](respondWithResult(_0x228fea,null))[_0x82a5('0x2b')](handleError(_0x228fea,null));};exports[_0x82a5('0x82')]=function(_0x3c1e68,_0x5ad6b0,_0x51bba4){if(_0x3c1e68[_0x82a5('0x60')]['id']){delete _0x3c1e68[_0x82a5('0x60')]['id'];}return db['MailAccount']['find']({'where':{'id':_0x3c1e68[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x5ad6b0,null))[_0x82a5('0x22')](function(_0x1b6f55){if(_0x1b6f55){_0x3c1e68[_0x82a5('0x60')][_0x82a5('0x68')]=_0x1b6f55['id'];return db[_0x82a5('0x5a')][_0x82a5('0x65')](_0x3c1e68['body']);}})[_0x82a5('0x22')](respondWithResult(_0x5ad6b0,null))[_0x82a5('0x2b')](handleError(_0x5ad6b0,null));};exports['removeImap']=function(_0x2b4ea5,_0x4f0a0a,_0x50b600){return db[_0x82a5('0x40')]['findOne']({'where':{'id':_0x2b4ea5[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x4f0a0a,null))[_0x82a5('0x22')](function(_0x13a77d){if(_0x13a77d){return _0x13a77d[_0x82a5('0x83')](null);}return null;})['then'](respondWithStatusCode(_0x4f0a0a,null))[_0x82a5('0x2b')](handleError(_0x4f0a0a,null));};exports[_0x82a5('0x84')]=function(_0x4b8474,_0xac3592,_0x407506){return db[_0x82a5('0x40')][_0x82a5('0x67')]({'where':{'id':_0x4b8474[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0xac3592,null))[_0x82a5('0x22')](function(_0x4e9393){if(_0x4e9393){return _0x4e9393[_0x82a5('0x84')]();}return null;})[_0x82a5('0x22')](respondWithResult(_0xac3592,null))[_0x82a5('0x2b')](handleError(_0xac3592,null));};exports['addSmtp']=function(_0x5b77b3,_0x4c951d,_0xbc8bd1){if(_0x5b77b3[_0x82a5('0x60')]['id']){delete _0x5b77b3['body']['id'];}return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x5b77b3['params']['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x4c951d,null))[_0x82a5('0x22')](function(_0x276be0){if(_0x276be0){_0x5b77b3[_0x82a5('0x60')]['MailAccountId']=_0x276be0['id'];return db[_0x82a5('0x5b')][_0x82a5('0x65')](_0x5b77b3['body']);}})[_0x82a5('0x22')](respondWithResult(_0x4c951d,null))[_0x82a5('0x2b')](handleError(_0x4c951d,null));};exports[_0x82a5('0x85')]=function(_0x31a63e,_0x4beac7,_0x43b47c){return db[_0x82a5('0x40')][_0x82a5('0x67')]({'where':{'id':_0x31a63e['params']['id']}})['then'](handleEntityNotFound(_0x4beac7,null))['then'](function(_0xb6ab9f){if(_0xb6ab9f){return _0xb6ab9f['setSmtp'](null);}return null;})[_0x82a5('0x22')](respondWithStatusCode(_0x4beac7,null))['catch'](handleError(_0x4beac7,null));};exports['addInteraction']=function(_0x1af473,_0x2701b8,_0x4abb33){return db[_0x82a5('0x86')][_0x82a5('0x5f')]({'where':{'id':_0x1af473[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x2701b8,null))[_0x82a5('0x22')](function(_0x185cf5){if(_0x185cf5){return _0x185cf5['addInteraction'](_0x1af473[_0x82a5('0x60')]['ids'],_[_0x82a5('0x87')](_0x1af473[_0x82a5('0x60')],[_0x82a5('0x6a'),'id'])||{});}})[_0x82a5('0x22')](respondWithResult(_0x2701b8,null))[_0x82a5('0x2b')](handleError(_0x2701b8,null));};exports[_0x82a5('0x88')]=function(_0x3e9f03,_0x3b6fbd,_0x4904c9){var _0x5d53de={'raw':![],'where':{}};var _0x507f7d={};var _0x1a3a98={'count':0x0,'rows':[]};return db[_0x82a5('0x40')][_0x82a5('0x67')]({'where':{'id':_0x3e9f03[_0x82a5('0x61')]['id']}})['then'](handleEntityNotFound(_0x3b6fbd,null))[_0x82a5('0x22')](function(_0x4964e0){if(_0x4964e0){_0x507f7d['model']=_[_0x82a5('0x47')](db[_0x82a5('0x86')][_0x82a5('0x41')]);_0x507f7d['query']=_[_0x82a5('0x47')](_0x3e9f03['query']);_0x507f7d[_0x82a5('0x48')]=_[_0x82a5('0x49')](_0x507f7d['model'],_0x507f7d['query']);_0x5d53de[_0x82a5('0x4a')]=_['intersection'](_0x507f7d['model'],qs['fields'](_0x3e9f03['query']['fields']));_0x5d53de['attributes']=_0x5d53de[_0x82a5('0x4a')]['length']?_0x5d53de['attributes']:_0x507f7d['model'];if(!_0x3e9f03[_0x82a5('0x46')][_0x82a5('0x4d')]('nolimit')){_0x5d53de['limit']=qs[_0x82a5('0x32')](_0x3e9f03[_0x82a5('0x46')][_0x82a5('0x32')]);_0x5d53de[_0x82a5('0x31')]=qs[_0x82a5('0x31')](_0x3e9f03['query']['offset']);}_0x5d53de[_0x82a5('0x4f')]=qs[_0x82a5('0x50')](_0x3e9f03[_0x82a5('0x46')][_0x82a5('0x50')]);_0x5d53de[_0x82a5('0x51')]=qs[_0x82a5('0x48')](_[_0x82a5('0x52')](_0x3e9f03['query'],_0x507f7d['filters']));_0x5d53de[_0x82a5('0x51')][_0x82a5('0x68')]=_0x4964e0['id'];if(_0x3e9f03[_0x82a5('0x46')]['filter']){_0x5d53de[_0x82a5('0x51')]=_[_0x82a5('0x54')](_0x5d53de[_0x82a5('0x51')],{'$or':_[_0x82a5('0x3f')](_0x5d53de[_0x82a5('0x4a')],function(_0x40a1c1){var _0x579e12={};_0x579e12[_0x40a1c1]={'$like':'%'+_0x3e9f03[_0x82a5('0x46')][_0x82a5('0x53')]+'%'};return _0x579e12;})});}_0x5d53de=_[_0x82a5('0x54')]({},_0x5d53de,_0x3e9f03[_0x82a5('0x5e')]);return db[_0x82a5('0x86')][_0x82a5('0x30')]({'where':_0x5d53de['where']})[_0x82a5('0x22')](function(_0xb7ce75){_0x1a3a98[_0x82a5('0x30')]=_0xb7ce75;if(_0x3e9f03[_0x82a5('0x46')][_0x82a5('0x56')]){_0x5d53de[_0x82a5('0x5d')]=[{'model':db['CmContact'],'as':_0x82a5('0x89'),'required':![]},{'model':db[_0x82a5('0x8a')],'as':_0x82a5('0x8b'),'attributes':[_0x82a5('0x3a'),'fullname',_0x82a5('0x8c')],'required':![]},{'model':db[_0x82a5('0x8d')],'as':_0x82a5('0x8e'),'attributes':['id',_0x82a5('0x3a'),_0x82a5('0x8f')],'where':_0x3e9f03['query'][_0x82a5('0x90')]?{'id':_0x3e9f03[_0x82a5('0x46')][_0x82a5('0x90')]}:undefined,'required':_0x3e9f03[_0x82a5('0x46')][_0x82a5('0x90')]?!![]:![]}];}return db[_0x82a5('0x86')][_0x82a5('0x57')](_0x5d53de);})['then'](function(_0x3307b7){_0x1a3a98[_0x82a5('0x58')]=_0x3307b7;return _0x1a3a98;});}})['then'](respondWithFilteredResult(_0x3b6fbd,_0x5d53de))[_0x82a5('0x2b')](handleError(_0x3b6fbd,null));};exports[_0x82a5('0x91')]=function(_0x274248,_0x36c05f,_0x305728){return db[_0x82a5('0x40')][_0x82a5('0x67')]({'where':{'id':_0x274248[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x36c05f,null))[_0x82a5('0x22')](function(_0x8d6f29){if(_0x8d6f29){return db[_0x82a5('0x92')][_0x82a5('0x93')](function(_0x1aa8cd){return db[_0x82a5('0x94')][_0x82a5('0x37')]({'where':{'MailAccountId':_0x274248['params']['id']},'transaction':_0x1aa8cd})['then'](function(_0x234062){var _0x2f5ce0=_[_0x82a5('0x3f')](_0x274248[_0x82a5('0x60')],function(_0x5f4fa7){_0x5f4fa7['MailAccountId']=_0x274248[_0x82a5('0x61')]['id'];return _0x5f4fa7;});return db[_0x82a5('0x94')]['bulkCreate'](_0x2f5ce0,{'transaction':_0x1aa8cd});});})[_0x82a5('0x22')](function(){return db[_0x82a5('0x94')][_0x82a5('0x95')]({'where':{'MailAccountId':_0x274248[_0x82a5('0x61')]['id']},'order':_0x82a5('0x96')});});}})['then'](respondWithResult(_0x36c05f,null))[_0x82a5('0x2b')](handleError(_0x36c05f,null));};exports['getApplications']=function(_0x596956,_0x381158,_0x21c4e9){var _0x3282c4={};var _0x5d326b={};var _0x1323bd;var _0x49bf95;return db[_0x82a5('0x40')][_0x82a5('0x67')]({'where':{'id':_0x596956[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x381158,null))[_0x82a5('0x22')](function(_0x770463){if(_0x770463){_0x1323bd=_0x770463;_0x5d326b[_0x82a5('0x45')]=_[_0x82a5('0x47')](db['MailApplication'][_0x82a5('0x41')]);_0x5d326b[_0x82a5('0x46')]=_[_0x82a5('0x47')](_0x596956[_0x82a5('0x46')]);_0x5d326b['filters']=_[_0x82a5('0x49')](_0x5d326b[_0x82a5('0x45')],_0x5d326b[_0x82a5('0x46')]);_0x3282c4[_0x82a5('0x4a')]=_['intersection'](_0x5d326b[_0x82a5('0x45')],qs['fields'](_0x596956['query']['fields']));_0x3282c4[_0x82a5('0x4a')]=_0x3282c4[_0x82a5('0x4a')][_0x82a5('0x4c')]?_0x3282c4[_0x82a5('0x4a')]:_0x5d326b[_0x82a5('0x45')];_0x3282c4['order']=qs[_0x82a5('0x50')](_0x596956[_0x82a5('0x46')]['sort']);_0x3282c4['where']=qs['filters'](_[_0x82a5('0x52')](_0x596956[_0x82a5('0x46')],_0x5d326b[_0x82a5('0x48')]));if(_0x596956[_0x82a5('0x46')][_0x82a5('0x53')]){_0x3282c4[_0x82a5('0x51')]=_[_0x82a5('0x54')](_0x3282c4[_0x82a5('0x51')],{'$or':_[_0x82a5('0x3f')](_0x3282c4['attributes'],function(_0x23de64){var _0x481529={};_0x481529[_0x23de64]={'$like':'%'+_0x596956[_0x82a5('0x46')][_0x82a5('0x53')]+'%'};return _0x481529;})});}_0x3282c4=_[_0x82a5('0x54')]({},_0x3282c4,_0x596956[_0x82a5('0x5e')]);return _0x1323bd['getApplications'](_0x3282c4);}})[_0x82a5('0x22')](function(_0x2e7aa6){if(_0x2e7aa6){_0x49bf95=_0x2e7aa6[_0x82a5('0x4c')];if(!_0x596956[_0x82a5('0x46')][_0x82a5('0x4d')](_0x82a5('0x4e'))){_0x3282c4[_0x82a5('0x32')]=qs[_0x82a5('0x32')](_0x596956[_0x82a5('0x46')][_0x82a5('0x32')]);_0x3282c4[_0x82a5('0x31')]=qs['offset'](_0x596956['query'][_0x82a5('0x31')]);}return _0x1323bd[_0x82a5('0x97')](_0x3282c4);}})[_0x82a5('0x22')](function(_0xcbac19){if(_0xcbac19){return _0xcbac19?{'count':_0x49bf95,'rows':_0xcbac19}:null;}})[_0x82a5('0x22')](respondWithResult(_0x381158,null))[_0x82a5('0x2b')](handleError(_0x381158,null));};exports[_0x82a5('0x98')]=function(_0x6e383,_0x4d4fef,_0x588762){var _0x10dab2={'raw':!![],'where':{}};var _0x456927={};var _0x25a86a={'count':0x0,'rows':[]};return db['MailAccount'][_0x82a5('0x67')]({'where':{'id':_0x6e383[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x4d4fef,null))[_0x82a5('0x22')](function(_0x54f318){if(_0x54f318){_0x456927['model']=_[_0x82a5('0x47')](db[_0x82a5('0x99')][_0x82a5('0x41')]);_0x456927[_0x82a5('0x46')]=_[_0x82a5('0x47')](_0x6e383[_0x82a5('0x46')]);_0x456927[_0x82a5('0x48')]=_[_0x82a5('0x49')](_0x456927['model'],_0x456927[_0x82a5('0x46')]);_0x10dab2['attributes']=_[_0x82a5('0x49')](_0x456927[_0x82a5('0x45')],qs['fields'](_0x6e383['query'][_0x82a5('0x4b')]));_0x10dab2[_0x82a5('0x4a')]=_0x10dab2['attributes'][_0x82a5('0x4c')]?_0x10dab2[_0x82a5('0x4a')]:_0x456927[_0x82a5('0x45')];if(!_0x6e383[_0x82a5('0x46')][_0x82a5('0x4d')](_0x82a5('0x4e'))){_0x10dab2[_0x82a5('0x32')]=qs[_0x82a5('0x32')](_0x6e383[_0x82a5('0x46')][_0x82a5('0x32')]);_0x10dab2['offset']=qs[_0x82a5('0x31')](_0x6e383[_0x82a5('0x46')][_0x82a5('0x31')]);}_0x10dab2[_0x82a5('0x4f')]=qs['sort'](_0x6e383['query'][_0x82a5('0x50')]);_0x10dab2[_0x82a5('0x51')]=qs['filters'](_[_0x82a5('0x52')](_0x6e383[_0x82a5('0x46')],_0x456927['filters']));_0x10dab2[_0x82a5('0x51')][_0x82a5('0x68')]=_0x54f318['id'];if(_0x6e383[_0x82a5('0x46')][_0x82a5('0x53')]){_0x10dab2[_0x82a5('0x51')]=_['merge'](_0x10dab2[_0x82a5('0x51')],{'$or':_[_0x82a5('0x3f')](_0x10dab2['attributes'],function(_0x1b34f6){var _0x1d0523={};_0x1d0523[_0x1b34f6]={'$like':'%'+_0x6e383[_0x82a5('0x46')]['filter']+'%'};return _0x1d0523;})});}if(_0x6e383[_0x82a5('0x46')][_0x82a5('0x9a')]){var _0x54d6fe=_0x6e383[_0x82a5('0x46')]['$gte'][_0x82a5('0x9b')](',');var _0x49ae87={};_0x49ae87[_0x54d6fe[0x0]]={'$gte':moment(_0x54d6fe[0x1])[_0x82a5('0x9c')](_0x82a5('0x9d'))};_0x10dab2[_0x82a5('0x51')]=_[_0x82a5('0x54')](_0x10dab2[_0x82a5('0x51')],_0x49ae87);}_0x10dab2=_[_0x82a5('0x54')]({},_0x10dab2,_0x6e383[_0x82a5('0x5e')]);return db['MailMessage'][_0x82a5('0x30')]({'where':_0x10dab2[_0x82a5('0x51')]})[_0x82a5('0x22')](function(_0x51ce25){_0x25a86a[_0x82a5('0x30')]=_0x51ce25;if(_0x6e383[_0x82a5('0x46')][_0x82a5('0x56')]){_0x10dab2[_0x82a5('0x5d')]=[{'all':!![]}];}return db['MailMessage']['findAll'](_0x10dab2);})[_0x82a5('0x22')](function(_0x40ae13){_0x25a86a[_0x82a5('0x58')]=_0x40ae13;return _0x25a86a;});}})['then'](respondWithFilteredResult(_0x4d4fef,_0x10dab2))[_0x82a5('0x2b')](handleError(_0x4d4fef,null));};exports[_0x82a5('0x9e')]=function(_0x6efde5,_0x175354,_0x16a9b5){var _0x261269,_0x55fb98={},_0x387b79;if(_0x6efde5[_0x82a5('0x60')]['to']){_0x387b79=_0x6efde5['body']['to'][_0x82a5('0x9b')](',')[0x0];}return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x6efde5[_0x82a5('0x61')]['id']},'include':[{'model':db[_0x82a5('0x9f')],'as':_0x82a5('0xa0'),'include':[{'model':db[_0x82a5('0xa1')],'as':_0x82a5('0xa2'),'where':{'email':_0x387b79},'limit':0x1,'order':[[_0x82a5('0xa3'),_0x82a5('0xa4')]]}]},{'model':db['MailServerOut'],'as':'Smtp','raw':!![]}]})[_0x82a5('0x22')](handleEntityNotFound(_0x175354,null))[_0x82a5('0x22')](function(_0x34d56f){if(_0x34d56f){_0x261269=_0x34d56f;if(_0x34d56f[_0x82a5('0x3d')]){if(_[_0x82a5('0x6f')](_0x6efde5['body'][_0x82a5('0xa5')])){_0x6efde5[_0x82a5('0x60')]['from']=util[_0x82a5('0x9c')]('%s\x20<%s>',_0x34d56f[_0x82a5('0x3a')],_0x34d56f[_0x82a5('0x6d')]||_0x34d56f['Smtp']['user']);}if(_0x6efde5[_0x82a5('0x60')][_0x82a5('0xa6')]&&_0x6efde5[_0x82a5('0x60')][_0x82a5('0xa6')][_0x82a5('0x4c')]){for(var _0x36acfe=0x0;_0x36acfe<_0x6efde5['body'][_0x82a5('0xa6')][_0x82a5('0x4c')];_0x36acfe+=0x1){_0x6efde5[_0x82a5('0x60')]['attachments'][_0x36acfe]={'filename':_0x6efde5[_0x82a5('0x60')][_0x82a5('0xa6')][_0x36acfe]['name'],'path':path[_0x82a5('0xa7')](config['root'],_0x82a5('0xa8'),_0x6efde5[_0x82a5('0x60')][_0x82a5('0xa6')][_0x36acfe][_0x82a5('0xa9')])};}}var _0x331ef3={'tls':{'rejectUnauthorized':![]}};if(_[_0x82a5('0x6f')](_0x34d56f[_0x82a5('0x3d')]['service'])){if(_0x34d56f[_0x82a5('0x3d')][_0x82a5('0x78')]){_0x331ef3[_0x82a5('0xaa')]={'user':_0x34d56f[_0x82a5('0x3d')][_0x82a5('0x73')],'pass':_0x34d56f[_0x82a5('0x3d')][_0x82a5('0x76')]};}_0x331ef3[_0x82a5('0x79')]=_0x34d56f['Smtp'][_0x82a5('0x79')];_0x331ef3[_0x82a5('0x7a')]=_0x34d56f[_0x82a5('0x3d')][_0x82a5('0x7a')];_0x331ef3[_0x82a5('0xab')]=_0x34d56f[_0x82a5('0x3d')][_0x82a5('0xab')];}else{_0x331ef3[_0x82a5('0x7b')]=_0x34d56f[_0x82a5('0x3d')]['service'];_0x331ef3['auth']={'user':_0x34d56f['Smtp'][_0x82a5('0x73')],'pass':_0x34d56f[_0x82a5('0x3d')][_0x82a5('0x76')]};}return respondWithRpcPromise(_0x82a5('0xac'),'sendMail',{'account':_0x331ef3,'message':_0x6efde5['body']});}else{throw new Error(_0x82a5('0xad'));}}})[_0x82a5('0x22')](function(_0x2de1d){if(_0x2de1d){_0x55fb98=_0x2de1d;if(_0x261269['List']){if(_0x261269[_0x82a5('0xa0')]['Contacts'][_0x82a5('0x4c')]){return _0x261269[_0x82a5('0xa0')][_0x82a5('0xa2')][0x0];}else{return db[_0x82a5('0xa1')][_0x82a5('0x65')](_['defaults'](_0x6efde5['body'],{'firstName':_0x6efde5['body']['to'],'email':_0x6efde5['body']['to'],'phone':_0x6efde5['body']['to'],'ListId':_0x261269[_0x82a5('0x6e')]}));}}else{throw new Error('List\x20not\x20found');}}})['then'](function(_0x166b6f){if(_0x166b6f){var _0x2e0ba9={'UserId':_0x6efde5['user']['id'],'ContactId':_0x166b6f['id'],'MailAccountId':_0x261269['id'],'inReplyTo':_0x55fb98[_0x82a5('0xae')],'to':_0x6efde5['body'][_0x82a5('0xa5')],'cc':_0x6efde5['body']['cc'],'subject':_0x6efde5[_0x82a5('0x60')]['subject'],'attach':_0x6efde5['body'][_0x82a5('0xaf')],'firstMsgDirection':'out','lastMsgAt':moment()[_0x82a5('0x9c')](_0x82a5('0x9d')),'lastMsgDirection':_0x82a5('0xb0'),'lastMsgBody':_0x6efde5['body'][_0x82a5('0x60')],'Messages':[_[_0x82a5('0x54')](_0x6efde5[_0x82a5('0x60')],{'messageId':_0x55fb98[_0x82a5('0xae')],'sentAt':moment()[_0x82a5('0x9c')](_0x82a5('0x9d')),'read':!![],'MailAccountId':_0x261269['id'],'UserId':_0x6efde5['user']['id'],'ContactId':_0x166b6f['id']})]};if(_0x6efde5[_0x82a5('0x60')][_0x82a5('0xb1')]){_0x2e0ba9=_[_0x82a5('0x54')](_0x2e0ba9,_0x6efde5['body'][_0x82a5('0xb1')]);}return db[_0x82a5('0x86')][_0x82a5('0x65')](_0x2e0ba9,{'include':[{'model':db[_0x82a5('0x99')],'as':_0x82a5('0xb2')}]});}})[_0x82a5('0x22')](respondWithResult(_0x175354,null))[_0x82a5('0x2b')](handleError(_0x175354,null));};exports[_0x82a5('0xb3')]=function(_0x4f509e,_0x49ad27,_0x180f73){return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x4f509e['params']['id']},'include':[{'model':db[_0x82a5('0x5b')],'as':'Smtp','raw':!![]}]})[_0x82a5('0x22')](handleEntityNotFound(_0x49ad27,null))[_0x82a5('0x22')](function(_0x493311){if(_0x493311&&_0x493311['Smtp']){var _0xa3d3f0={'id':_0x493311['id'],'tls':{'rejectUnauthorized':![]}};if(_0x493311[_0x82a5('0x3d')][_0x82a5('0x7b')]){_0xa3d3f0[_0x82a5('0x7b')]=_0x493311[_0x82a5('0x3d')]['service'];}else{_0xa3d3f0['host']=_0x493311[_0x82a5('0x3d')][_0x82a5('0x79')];_0xa3d3f0[_0x82a5('0x7a')]=_0x493311['Smtp'][_0x82a5('0x7a')];_0xa3d3f0[_0x82a5('0xab')]=_0x493311['Smtp'][_0x82a5('0xab')];}if(_0x493311['Smtp'][_0x82a5('0x78')]){_0xa3d3f0['auth']={'user':_0x493311[_0x82a5('0x3d')][_0x82a5('0x73')],'pass':_0x493311['Smtp'][_0x82a5('0x76')]};}return respondWithRpcPromise('VerifySmtp',_0x82a5('0xb3'),{'account':_0xa3d3f0});}})[_0x82a5('0x22')](respondWithResult(_0x49ad27,null))[_0x82a5('0x2b')](handleError(_0x49ad27,null));};exports[_0x82a5('0x37')]=function(_0x1ca49f,_0x571f10){return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x1ca49f[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x571f10,null))['then'](function(_0x1e8c16){if(_0x1e8c16&&_0x1e8c16['service']){throw new db[(_0x82a5('0x1f'))]['ValidationError'](_0x82a5('0xb4'));}return _0x1e8c16;})[_0x82a5('0x22')](removeEntity(_0x571f10,null))[_0x82a5('0x2b')](handleError(_0x571f10,null));};exports[_0x82a5('0xb5')]=function(_0x5c86b1,_0xaea271,_0x4e132a){return db[_0x82a5('0x40')]['find']({'where':{'id':_0x5c86b1[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0xaea271,null))['then'](function(_0x2d0113){if(_0x2d0113){return _0x2d0113['addAgents'](_0x5c86b1[_0x82a5('0x60')]['ids'],_[_0x82a5('0x87')](_0x5c86b1[_0x82a5('0x60')],[_0x82a5('0x6a'),'id'])||{})[_0x82a5('0xb6')](function(_0x3f1bd3){for(var _0x9e263e=0x0;_0x9e263e<_0x5c86b1['body'][_0x82a5('0x6a')][_0x82a5('0x4c')];_0x9e263e+=0x1){socket[_0x82a5('0xb7')](_0x82a5('0xb8'),{'UserId':_0x5c86b1['body'][_0x82a5('0x6a')][_0x9e263e],'MailAccountId':_0x5c86b1[_0x82a5('0x61')]['id']});}return _0x3f1bd3;});}})[_0x82a5('0x22')](respondWithResult(_0xaea271,null))['catch'](handleError(_0xaea271,null));};exports[_0x82a5('0xb9')]=function(_0x1eb279,_0x3c3b2e,_0x30d320){return db[_0x82a5('0x40')][_0x82a5('0x5f')]({'where':{'id':_0x1eb279[_0x82a5('0x61')]['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x3c3b2e,null))[_0x82a5('0x22')](function(_0x4ada10){if(_0x4ada10){return _0x4ada10[_0x82a5('0xb9')](_0x1eb279[_0x82a5('0x46')][_0x82a5('0x6a')])[_0x82a5('0x22')](function(){if(_['isArray'](_0x1eb279[_0x82a5('0x46')][_0x82a5('0x6a')])){for(var _0x60783a=0x0;_0x60783a<_0x1eb279[_0x82a5('0x46')]['ids'][_0x82a5('0x4c')];_0x60783a+=0x1){socket[_0x82a5('0xb7')](_0x82a5('0xba'),{'UserId':Number(_0x1eb279[_0x82a5('0x46')][_0x82a5('0x6a')][_0x60783a]),'MailAccountId':Number(_0x1eb279['params']['id'])});}}else{socket['emit'](_0x82a5('0xba'),{'UserId':Number(_0x1eb279[_0x82a5('0x46')][_0x82a5('0x6a')]),'MailAccountId':Number(_0x1eb279[_0x82a5('0x61')]['id'])});}});}})['then'](respondWithStatusCode(_0x3c3b2e,null))[_0x82a5('0x2b')](handleError(_0x3c3b2e,null));};exports[_0x82a5('0xbb')]=function(_0x3f40f5,_0x2e8259,_0x51501b){var _0x515fa5={};var _0xda5e72={};var _0x423e0d;var _0x50f423;return db[_0x82a5('0x40')]['findOne']({'where':{'id':_0x3f40f5['params']['id']}})[_0x82a5('0x22')](handleEntityNotFound(_0x2e8259,null))[_0x82a5('0x22')](function(_0x1ec3f8){if(_0x1ec3f8){_0x423e0d=_0x1ec3f8;_0xda5e72['model']=_[_0x82a5('0x47')](db[_0x82a5('0x8a')][_0x82a5('0x41')]);_0xda5e72[_0x82a5('0x46')]=_[_0x82a5('0x47')](_0x3f40f5[_0x82a5('0x46')]);_0xda5e72['filters']=_[_0x82a5('0x49')](_0xda5e72['model'],_0xda5e72[_0x82a5('0x46')]);_0x515fa5['attributes']=_['intersection'](_0xda5e72[_0x82a5('0x45')],qs[_0x82a5('0x4b')](_0x3f40f5[_0x82a5('0x46')][_0x82a5('0x4b')]));_0x515fa5['attributes']=_0x515fa5['attributes'][_0x82a5('0x4c')]?_0x515fa5[_0x82a5('0x4a')]:_0xda5e72['model'];_0x515fa5[_0x82a5('0x4f')]=qs['sort'](_0x3f40f5[_0x82a5('0x46')][_0x82a5('0x50')]);_0x515fa5['where']=qs[_0x82a5('0x48')](_[_0x82a5('0x52')](_0x3f40f5[_0x82a5('0x46')],_0xda5e72[_0x82a5('0x48')]));if(_0x3f40f5[_0x82a5('0x46')][_0x82a5('0x53')]){_0x515fa5[_0x82a5('0x51')]=_[_0x82a5('0x54')](_0x515fa5[_0x82a5('0x51')],{'$or':_['map'](_0x515fa5['attributes'],function(_0x49ffdf){var _0x37bfb8={};_0x37bfb8[_0x49ffdf]={'$like':'%'+_0x3f40f5[_0x82a5('0x46')][_0x82a5('0x53')]+'%'};return _0x37bfb8;})});}_0x515fa5=_[_0x82a5('0x54')]({},_0x515fa5,_0x3f40f5[_0x82a5('0x5e')]);return _0x423e0d[_0x82a5('0xbb')](_0x515fa5);}})[_0x82a5('0x22')](function(_0x1ed208){if(_0x1ed208){_0x50f423=_0x1ed208[_0x82a5('0x4c')];if(!_0x3f40f5[_0x82a5('0x46')][_0x82a5('0x4d')]('nolimit')){_0x515fa5[_0x82a5('0x32')]=qs[_0x82a5('0x32')](_0x3f40f5['query'][_0x82a5('0x32')]);_0x515fa5[_0x82a5('0x31')]=qs['offset'](_0x3f40f5[_0x82a5('0x46')]['offset']);}return _0x423e0d[_0x82a5('0xbb')](_0x515fa5);}})[_0x82a5('0x22')](function(_0x57be76){if(_0x57be76){return _0x57be76?{'count':_0x50f423,'rows':_0x57be76}:null;}})[_0x82a5('0x22')](respondWithResult(_0x2e8259,null))[_0x82a5('0x2b')](handleError(_0x2e8259,null));};
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.events.js b/server/api/mailAccount/mailAccount.events.js
index 629531b..ec8a7be 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 _0xf57b=['exports','../../mysqldb','MailAccount','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0xcb585e,_0x122c3f){var _0x5cc5a5=function(_0x5458c4){while(--_0x5458c4){_0xcb585e['push'](_0xcb585e['shift']());}};_0x5cc5a5(++_0x122c3f);}(_0xf57b,0x191));var _0xbf57=function(_0x3677d0,_0x2bb040){_0x3677d0=_0x3677d0-0x0;var _0x4f3d02=_0xf57b[_0x3677d0];return _0x4f3d02;};'use strict';var EventEmitter=require('events');var MailAccount=require(_0xbf57('0x0'))['db'][_0xbf57('0x1')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0xbf57('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xbf57('0x3'),'afterDestroy':_0xbf57('0x4')};function emitEvent(_0x54fda1){return function(_0x4b0d74,_0x46d083,_0x127589){MailAccountEvents[_0xbf57('0x5')](_0x54fda1+':'+_0x4b0d74['id'],_0x4b0d74);MailAccountEvents['emit'](_0x54fda1,_0x4b0d74);_0x127589(null);};}for(var e in events){if(events[_0xbf57('0x6')](e)){var event=events[e];MailAccount['hook'](e,emitEvent(event));}}module[_0xbf57('0x7')]=MailAccountEvents;
\ No newline at end of file
+var _0x02e9=['../../mysqldb','MailAccount','setMaxListeners','save','update','remove','emit','exports','events'];(function(_0x2186b9,_0x3a655b){var _0x4cb478=function(_0x2fadfa){while(--_0x2fadfa){_0x2186b9['push'](_0x2186b9['shift']());}};_0x4cb478(++_0x3a655b);}(_0x02e9,0x116));var _0x902e=function(_0xf248ef,_0x1d057b){_0xf248ef=_0xf248ef-0x0;var _0x3cb062=_0x02e9[_0xf248ef];return _0x3cb062;};'use strict';var EventEmitter=require(_0x902e('0x0'));var MailAccount=require(_0x902e('0x1'))['db'][_0x902e('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x902e('0x3')](0x0);var events={'afterCreate':_0x902e('0x4'),'afterUpdate':_0x902e('0x5'),'afterDestroy':_0x902e('0x6')};function emitEvent(_0x42d579){return function(_0x13e5ee,_0x119add,_0x1ac0ec){MailAccountEvents[_0x902e('0x7')](_0x42d579+':'+_0x13e5ee['id'],_0x13e5ee);MailAccountEvents[_0x902e('0x7')](_0x42d579,_0x13e5ee);_0x1ac0ec(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailAccount['hook'](e,emitEvent(event));}}module[_0x902e('0x8')]=MailAccountEvents;
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.model.js b/server/api/mailAccount/mailAccount.model.js
index 70acef0..549e71a 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 _0x5df3=['api','moment','bluebird','request-promise','path','./mailAccount.attributes','exports','define','MailAccount','mail_accounts','lodash'];(function(_0xefd519,_0xc62635){var _0x4bb882=function(_0x37e0a1){while(--_0x37e0a1){_0xefd519['push'](_0xefd519['shift']());}};_0x4bb882(++_0xc62635);}(_0x5df3,0x15f));var _0x35df=function(_0x5e6116,_0x4bae08){_0x5e6116=_0x5e6116-0x0;var _0x29bf86=_0x5df3[_0x5e6116];return _0x29bf86;};'use strict';var _=require(_0x35df('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x35df('0x1'));var moment=require(_0x35df('0x2'));var BPromise=require(_0x35df('0x3'));var rp=require(_0x35df('0x4'));var fs=require('fs');var path=require(_0x35df('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x35df('0x6'));module[_0x35df('0x7')]=function(_0x25d21a,_0x5817f9){return _0x25d21a[_0x35df('0x8')](_0x35df('0x9'),attributes,{'tableName':_0x35df('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x613c=['request-promise','path','rimraf','../../config/environment','exports','define','mail_accounts','lodash','util','api'];(function(_0x3c9bdf,_0x3b30cd){var _0x5664a6=function(_0x4ea55c){while(--_0x4ea55c){_0x3c9bdf['push'](_0x3c9bdf['shift']());}};_0x5664a6(++_0x3b30cd);}(_0x613c,0xd9));var _0xc613=function(_0x511637,_0x5467de){_0x511637=_0x511637-0x0;var _0x14d591=_0x613c[_0x511637];return _0x14d591;};'use strict';var _=require(_0xc613('0x0'));var util=require(_0xc613('0x1'));var logger=require('../../config/logger')(_0xc613('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xc613('0x3'));var fs=require('fs');var path=require(_0xc613('0x4'));var rimraf=require(_0xc613('0x5'));var config=require(_0xc613('0x6'));var attributes=require('./mailAccount.attributes');module[_0xc613('0x7')]=function(_0x31d092,_0x441019){return _0x31d092[_0xc613('0x8')]('MailAccount',attributes,{'tableName':_0xc613('0x9'),'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 2b5b9ac..6c980da 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 _0xcc73=['ShowMailAccount','NotifyMailAccount','body','mail','difference','keys','CmContact','rawAttributes','createdAt','updatedAt','ListId','isNil','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','account','CmList','List','Contacts','DESC','MailApplication','MailServerOut','Smtp','get','Applications','applications','list','priority','asc','push','close','autoclose','*,*,*,*','contact','messageId','generate','subject','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','MailMessage','inReplyTo','create','Contact\x20not\x20found','spread','update','interaction','attachments','originTo','bcc','Attachment','Attachments','UserId','name','agent','waitForTheAssignedAgent','Start','startRouting','util','moment','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','request','info','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','MailAccount,\x20%s,\x20%s','message','result','catch','MailAccount','findAll','raw','options','where','attributes','include','map','model','then','GetMailAccount','find'];(function(_0x4012b0,_0x1a6169){var _0x43ac67=function(_0x4c6094){while(--_0x4c6094){_0x4012b0['push'](_0x4012b0['shift']());}};_0x43ac67(++_0x1a6169);}(_0xcc73,0x1cb));var _0x3cc7=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xcc73[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var util=require(_0x3cc7('0x0'));var moment=require(_0x3cc7('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3cc7('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x3cc7('0x3'));var logger=require('../../config/logger')('rpc');var config=require(_0x3cc7('0x4'));var jayson=require(_0x3cc7('0x5'));var client=jayson[_0x3cc7('0x6')][_0x3cc7('0x7')]({'port':0x232c});config[_0x3cc7('0x8')]=_['defaults'](config[_0x3cc7('0x8')],{'host':_0x3cc7('0x9'),'port':0x18eb});var socket=require(_0x3cc7('0xa'))(new Redis(config[_0x3cc7('0x8')]));require('./mailAccount.socket')[_0x3cc7('0xb')](socket);function respondWithRpcPromise(_0x44005b,_0xafd349,_0x45541c){return new BPromise(function(_0x26f61a,_0xaa9aa1){return client[_0x3cc7('0xc')](_0x44005b,_0x45541c)['then'](function(_0x5390c7){logger[_0x3cc7('0xd')]('MailAccount,\x20%s,\x20%s',_0xafd349,_0x3cc7('0xe'));logger[_0x3cc7('0xf')](_0x3cc7('0x10'),_0xafd349,_0x3cc7('0xe'),JSON[_0x3cc7('0x11')](_0x5390c7));if(_0x5390c7[_0x3cc7('0x12')]){if(_0x5390c7[_0x3cc7('0x12')][_0x3cc7('0x13')]===0x1f4){logger[_0x3cc7('0x12')](_0x3cc7('0x14'),_0xafd349,_0x5390c7[_0x3cc7('0x12')][_0x3cc7('0x15')]);return _0xaa9aa1(_0x5390c7[_0x3cc7('0x12')][_0x3cc7('0x15')]);}logger[_0x3cc7('0x12')](_0x3cc7('0x14'),_0xafd349,_0x5390c7[_0x3cc7('0x12')][_0x3cc7('0x15')]);return _0x26f61a(_0x5390c7[_0x3cc7('0x12')][_0x3cc7('0x15')]);}else{logger[_0x3cc7('0xd')](_0x3cc7('0x14'),_0xafd349,_0x3cc7('0xe'));_0x26f61a(_0x5390c7[_0x3cc7('0x16')][_0x3cc7('0x15')]);}})[_0x3cc7('0x17')](function(_0x1545a0){logger[_0x3cc7('0x12')](_0x3cc7('0x14'),_0xafd349,_0x1545a0);_0xaa9aa1(_0x1545a0);});});}exports['GetMailAccount']=function(_0x4d2396){var _0x2ee8f6=this;return new Promise(function(_0x4836fa,_0x41c9fb){return db[_0x3cc7('0x18')][_0x3cc7('0x19')]({'raw':_0x4d2396['options']?_0x4d2396['options'][_0x3cc7('0x1a')]===undefined?!![]:![]:!![],'where':_0x4d2396[_0x3cc7('0x1b')]?_0x4d2396['options'][_0x3cc7('0x1c')]||null:null,'attributes':_0x4d2396[_0x3cc7('0x1b')]?_0x4d2396['options'][_0x3cc7('0x1d')]||null:null,'limit':_0x4d2396['options']?_0x4d2396[_0x3cc7('0x1b')]['limit']||null:null,'include':_0x4d2396[_0x3cc7('0x1b')]?_0x4d2396[_0x3cc7('0x1b')][_0x3cc7('0x1e')]?_[_0x3cc7('0x1f')](_0x4d2396[_0x3cc7('0x1b')][_0x3cc7('0x1e')],function(_0x534cea){return{'model':db[_0x534cea[_0x3cc7('0x20')]],'as':_0x534cea['as'],'attributes':_0x534cea[_0x3cc7('0x1d')],'include':_0x534cea[_0x3cc7('0x1e')]?_['map'](_0x534cea[_0x3cc7('0x1e')],function(_0x595e7e){return{'model':db[_0x595e7e['model']],'as':_0x595e7e['as'],'attributes':_0x595e7e['attributes'],'include':_0x595e7e[_0x3cc7('0x1e')]?_[_0x3cc7('0x1f')](_0x595e7e['include'],function(_0x5518cf){return{'model':db[_0x5518cf[_0x3cc7('0x20')]],'as':_0x5518cf['as'],'attributes':_0x5518cf[_0x3cc7('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x3cc7('0x21')](function(_0x40a01c){logger[_0x3cc7('0xd')](_0x3cc7('0x22'),_0x4d2396);logger[_0x3cc7('0xf')](_0x3cc7('0x22'),_0x4d2396,JSON[_0x3cc7('0x11')](_0x40a01c));_0x4836fa(_0x40a01c);})[_0x3cc7('0x17')](function(_0x30480e){logger[_0x3cc7('0x12')](_0x3cc7('0x22'),_0x30480e[_0x3cc7('0x15')],_0x4d2396);_0x41c9fb(_0x2ee8f6['error'](0x1f4,_0x30480e[_0x3cc7('0x15')]));});});};exports['ShowMailAccount']=function(_0x4f4536){var _0x5f4c6f=this;return new Promise(function(_0x6ee10e,_0x71cfb7){return db[_0x3cc7('0x18')][_0x3cc7('0x23')]({'raw':_0x4f4536[_0x3cc7('0x1b')]?_0x4f4536[_0x3cc7('0x1b')][_0x3cc7('0x1a')]===undefined?!![]:![]:!![],'where':_0x4f4536[_0x3cc7('0x1b')]?_0x4f4536[_0x3cc7('0x1b')][_0x3cc7('0x1c')]||null:null,'attributes':_0x4f4536[_0x3cc7('0x1b')]?_0x4f4536['options'][_0x3cc7('0x1d')]||null:null,'include':_0x4f4536[_0x3cc7('0x1b')]?_0x4f4536[_0x3cc7('0x1b')]['include']?_['map'](_0x4f4536[_0x3cc7('0x1b')][_0x3cc7('0x1e')],function(_0x581650){return{'model':db[_0x581650[_0x3cc7('0x20')]],'as':_0x581650['as'],'attributes':_0x581650['attributes'],'include':_0x581650[_0x3cc7('0x1e')]?_[_0x3cc7('0x1f')](_0x581650['include'],function(_0x96847b){return{'model':db[_0x96847b[_0x3cc7('0x20')]],'as':_0x96847b['as'],'attributes':_0x96847b[_0x3cc7('0x1d')],'include':_0x96847b[_0x3cc7('0x1e')]?_[_0x3cc7('0x1f')](_0x96847b[_0x3cc7('0x1e')],function(_0x5771c2){return{'model':db[_0x5771c2[_0x3cc7('0x20')]],'as':_0x5771c2['as'],'attributes':_0x5771c2[_0x3cc7('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x24409c){logger[_0x3cc7('0xd')]('ShowMailAccount',_0x4f4536);logger[_0x3cc7('0xf')]('ShowMailAccount',_0x4f4536,JSON[_0x3cc7('0x11')](_0x24409c));_0x6ee10e(_0x24409c);})[_0x3cc7('0x17')](function(_0xfc1cb){logger[_0x3cc7('0x12')](_0x3cc7('0x24'),_0xfc1cb[_0x3cc7('0x15')],_0x4f4536);_0x71cfb7(_0x5f4c6f[_0x3cc7('0x12')](0x1f4,_0xfc1cb[_0x3cc7('0x15')]));});});};exports[_0x3cc7('0x25')]=function(_0x1d00e4){var _0x1d3b4f=this;return new Promise(function(_0xb44605,_0x594c99){var _0x131fb5={'body':_0x1d00e4[_0x3cc7('0x26')],'channel':_0x3cc7('0x27')};var _0x2fecea=_[_0x3cc7('0x28')](_[_0x3cc7('0x29')](db[_0x3cc7('0x2a')][_0x3cc7('0x2b')]),[_0x3cc7('0x2c'),_0x3cc7('0x2d'),'CompanyId',_0x3cc7('0x2e')]);var _0xda646c=![];if(_0x1d00e4[_0x3cc7('0x26')]['id']){delete _0x1d00e4[_0x3cc7('0x26')]['id'];}if(_[_0x3cc7('0x2f')](_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x30')])){return _0x594c99(_0x1d3b4f['error'](0x1f4,_0x3cc7('0x31')));}if(_[_0x3cc7('0x2f')](_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x26')])||_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x26')]===''){return _0x594c99(_0x1d3b4f[_0x3cc7('0x12')](0x1f4,_0x3cc7('0x32')));}if(_['isNil'](_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x33')])){return _0x594c99(_0x1d3b4f['error'](0x1f4,_0x3cc7('0x34')+_0x2fecea));}if(!_[_0x3cc7('0x35')](_0x2fecea,_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x33')])){return _0x594c99(_0x1d3b4f[_0x3cc7('0x12')](0x1f4,_0x3cc7('0x36')+_0x2fecea));}var _0x9625d0={};_0x9625d0[_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x33')]]=_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x30')];return db[_0x3cc7('0x18')][_0x3cc7('0x23')]({'where':{'id':_0x1d00e4[_0x3cc7('0x37')]['id']},'include':[{'model':db[_0x3cc7('0x38')],'as':_0x3cc7('0x39'),'include':[{'model':db['CmContact'],'as':_0x3cc7('0x3a'),'where':_0x9625d0,'limit':0x1,'order':[[_0x3cc7('0x2d'),_0x3cc7('0x3b')]]}]},{'model':db[_0x3cc7('0x3c')],'as':'Applications'},{'model':db[_0x3cc7('0x3d')],'as':_0x3cc7('0x3e')}]})['then'](function(_0x16cae2){if(_0x16cae2&&_0x16cae2[_0x3cc7('0x39')]){var _0x46ab08=_0x16cae2[_0x3cc7('0x3f')]({'plain':!![]});_0x131fb5[_0x3cc7('0x37')]=_['omit'](_0x46ab08,[_0x3cc7('0x40'),'List']);_0x131fb5[_0x3cc7('0x41')]=_0x46ab08[_0x3cc7('0x40')];_0x131fb5[_0x3cc7('0x42')]=_0x46ab08[_0x3cc7('0x39')];_0x131fb5[_0x3cc7('0x41')]=_['orderBy'](_0x131fb5[_0x3cc7('0x41')],[_0x3cc7('0x43')],[_0x3cc7('0x44')]);if(_0x131fb5[_0x3cc7('0x37')]&&_0x131fb5[_0x3cc7('0x37')]['autoclose']){_0x131fb5[_0x3cc7('0x41')][_0x3cc7('0x45')]({'id':0x0,'priority':_0x131fb5[_0x3cc7('0x41')]['length']+0x1,'app':_0x3cc7('0x46'),'appdata':_0x3cc7('0x47'),'interval':_0x3cc7('0x48')});}if(_0x131fb5[_0x3cc7('0x37')]['Applications']){delete _0x131fb5[_0x3cc7('0x37')][_0x3cc7('0x40')];}if(_0x131fb5[_0x3cc7('0x37')][_0x3cc7('0x39')]){delete _0x131fb5[_0x3cc7('0x37')][_0x3cc7('0x39')];}if(_0x46ab08[_0x3cc7('0x39')][_0x3cc7('0x3a')]['length']){return _0x46ab08['List']['Contacts'][0x0];}var _0x15033f=_['defaults'](_0x1d00e4[_0x3cc7('0x26')],{'firstName':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x30')],'ListId':_0x46ab08[_0x3cc7('0x2e')]});_0x15033f[_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x33')]]=_0x1d00e4[_0x3cc7('0x26')]['from'];return db[_0x3cc7('0x2a')]['create'](_0x15033f);}else{throw new Error('List\x20not\x20found');}})[_0x3cc7('0x21')](function(_0x181a70){_0x131fb5[_0x3cc7('0x49')]=_0x181a70;if(_0x181a70){if(!_0x1d00e4['body'][_0x3cc7('0x15')]['messageId']){_0x1d00e4['body'][_0x3cc7('0x15')][_0x3cc7('0x4a')]=rs[_0x3cc7('0x4b')]()+'\x20'+_0x1d00e4[_0x3cc7('0x26')]['message'][_0x3cc7('0x30')];}var _0x2dfedc={'ContactId':_0x181a70['id'],'MailAccountId':_0x1d00e4[_0x3cc7('0x37')]['id'],'inReplyTo':_0x1d00e4[_0x3cc7('0x26')]['message'][_0x3cc7('0x4a')],'to':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')][_0x3cc7('0x30')],'cc':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')]['cc'],'subject':_0x1d00e4['body']['message'][_0x3cc7('0x4c')],'attach':_0x1d00e4['body']['message'][_0x3cc7('0x4d')],'lastMsgAt':moment()[_0x3cc7('0x4e')](_0x3cc7('0x4f')),'lastMsgDirection':'in','lastMsgBody':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x26')]};return db[_0x3cc7('0x50')][_0x3cc7('0x23')]({'where':{'closed':![],'MailAccountId':_0x1d00e4[_0x3cc7('0x37')]['id']},'include':[{'model':db[_0x3cc7('0x51')],'as':'Messages','attributes':[_0x3cc7('0x4a')],'where':{'messageId':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')][_0x3cc7('0x52')]}}]})['then'](function(_0x2c972e){if(_0x2c972e){return[_0x2c972e,![]];}return db['MailInteraction'][_0x3cc7('0x53')](_0x2dfedc)['then'](function(_0x2b2dac){return[_0x2b2dac,!![]];});});}else{throw new Error(_0x3cc7('0x54'));}})[_0x3cc7('0x55')](function(_0x58fd9a,_0x522fc4){if(_0x58fd9a){_0xda646c=_0x522fc4;if(!_0x522fc4){return _0x58fd9a[_0x3cc7('0x56')]({'inReplyTo':_0x1d00e4['body'][_0x3cc7('0x15')][_0x3cc7('0x4a')],'to':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')]['from'],'cc':_0x1d00e4['body']['message']['cc'],'subject':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')][_0x3cc7('0x4c')],'attach':_0x58fd9a[_0x3cc7('0x4d')]?_0x58fd9a[_0x3cc7('0x4d')]:_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')][_0x3cc7('0x4d')],'substatus':null,'substatusAt':moment()['format'](_0x3cc7('0x4f')),'lastMsgAt':moment()[_0x3cc7('0x4e')](_0x3cc7('0x4f')),'lastMsgDirection':'in','lastMsgBody':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x26')]});}else{return _0x58fd9a;}}})[_0x3cc7('0x21')](function(_0x3b0e1e){_0x131fb5['interaction']=_0x3b0e1e[_0x3cc7('0x3f')]({'plain':!![]});_0x131fb5[_0x3cc7('0x57')]['created']=_0xda646c;return db[_0x3cc7('0x51')]['create']({'body':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x26')],'MailAccountId':_0x1d00e4[_0x3cc7('0x37')]['id'],'MailInteractionId':_0x3b0e1e['id'],'direction':'in','ContactId':_0x131fb5['contact']['id'],'messageId':_0x1d00e4[_0x3cc7('0x26')]['message'][_0x3cc7('0x4a')],'from':_0x1d00e4[_0x3cc7('0x26')]['message'][_0x3cc7('0x30')],'to':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')]['to'],'cc':_0x1d00e4['body']['message']['cc'],'subject':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')]['subject'],'attach':_0x1d00e4[_0x3cc7('0x26')]['message'][_0x3cc7('0x4d')],'Attachments':_0x1d00e4[_0x3cc7('0x26')]['message'][_0x3cc7('0x58')],'originTo':_0x1d00e4['body'][_0x3cc7('0x15')][_0x3cc7('0x59')],'originCc':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')]['originCc'],'bcc':_0x1d00e4[_0x3cc7('0x26')][_0x3cc7('0x15')][_0x3cc7('0x5a')]},{'include':[{'model':db[_0x3cc7('0x5b')],'as':_0x3cc7('0x5c')}]});})[_0x3cc7('0x21')](function(_0x132b84){_0x131fb5[_0x3cc7('0x15')]=_0x132b84;if(_0x131fb5[_0x3cc7('0x57')][_0x3cc7('0x5d')]){return db['User'][_0x3cc7('0x23')]({'attributes':['id',_0x3cc7('0x5e')],'where':{'id':_0x131fb5[_0x3cc7('0x57')][_0x3cc7('0x5d')]}})[_0x3cc7('0x21')](function(_0x4717ac){if(_0x4717ac){_0x131fb5[_0x3cc7('0x41')]['unshift']({'id':0x0,'priority':0x0,'app':_0x3cc7('0x5f'),'appdata':_0x4717ac[_0x3cc7('0x5e')]+','+(_0x131fb5[_0x3cc7('0x37')][_0x3cc7('0x60')]||0xa),'interval':_0x3cc7('0x48')});}return respondWithRpcPromise(_0x3cc7('0x61'),_0x3cc7('0x62'),_0x131fb5);});}return respondWithRpcPromise(_0x3cc7('0x61'),'startRouting',_0x131fb5);})['then'](function(_0x4ec43a){_0xb44605(_0x4ec43a);})['catch'](function(_0x5198fb){_0x594c99(_0x1d3b4f[_0x3cc7('0x12')](0x1f4,_0x5198fb[_0x3cc7('0x15')]));});});};
\ No newline at end of file
+var _0xf2c7=['request\x20sent','debug','error','message','result','GetMailAccount','MailAccount','findAll','options','raw','where','attributes','limit','map','include','model','stringify','catch','find','ShowMailAccount','NotifyMailAccount','body','difference','CmContact','rawAttributes','createdAt','updatedAt','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','account','CmList','List','DESC','MailApplication','Applications','Smtp','omit','applications','list','orderBy','priority','asc','push','length','close','autoclose','Contacts','ListId','create','List\x20not\x20found','messageId','subject','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','inReplyTo','Contact\x20not\x20found','spread','interaction','created','MailMessage','contact','originTo','originCc','Attachment','UserId','User','name','unshift','agent','waitForTheAssignedAgent','*,*,*,*','Start','startRouting','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','jayson/promise','client','redis','defaults','socket.io-emitter','./mailAccount.socket','register','request','then','info','MailAccount,\x20%s,\x20%s'];(function(_0x316624,_0x1d755c){var _0x1a1699=function(_0x13febc){while(--_0x13febc){_0x316624['push'](_0x316624['shift']());}};_0x1a1699(++_0x1d755c);}(_0xf2c7,0x1d8));var _0x7f2c=function(_0x4b2863,_0x494899){_0x4b2863=_0x4b2863-0x0;var _0x567d67=_0xf2c7[_0x4b2863];return _0x567d67;};'use strict';var _=require(_0x7f2c('0x0'));var util=require(_0x7f2c('0x1'));var moment=require(_0x7f2c('0x2'));var BPromise=require(_0x7f2c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7f2c('0x4'));var db=require(_0x7f2c('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x7f2c('0x6'));var config=require('../../config/environment');var jayson=require(_0x7f2c('0x7'));var client=jayson[_0x7f2c('0x8')]['http']({'port':0x232c});config[_0x7f2c('0x9')]=_[_0x7f2c('0xa')](config[_0x7f2c('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x7f2c('0xb'))(new Redis(config[_0x7f2c('0x9')]));require(_0x7f2c('0xc'))[_0x7f2c('0xd')](socket);function respondWithRpcPromise(_0x364e2a,_0x2e93d9,_0x4d60eb){return new BPromise(function(_0x34c9f2,_0x17754c){return client[_0x7f2c('0xe')](_0x364e2a,_0x4d60eb)[_0x7f2c('0xf')](function(_0x2247d3){logger[_0x7f2c('0x10')](_0x7f2c('0x11'),_0x2e93d9,_0x7f2c('0x12'));logger[_0x7f2c('0x13')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x2e93d9,_0x7f2c('0x12'),JSON['stringify'](_0x2247d3));if(_0x2247d3[_0x7f2c('0x14')]){if(_0x2247d3[_0x7f2c('0x14')]['code']===0x1f4){logger['error'](_0x7f2c('0x11'),_0x2e93d9,_0x2247d3[_0x7f2c('0x14')]['message']);return _0x17754c(_0x2247d3[_0x7f2c('0x14')][_0x7f2c('0x15')]);}logger['error'](_0x7f2c('0x11'),_0x2e93d9,_0x2247d3[_0x7f2c('0x14')][_0x7f2c('0x15')]);return _0x34c9f2(_0x2247d3[_0x7f2c('0x14')][_0x7f2c('0x15')]);}else{logger[_0x7f2c('0x10')](_0x7f2c('0x11'),_0x2e93d9,_0x7f2c('0x12'));_0x34c9f2(_0x2247d3[_0x7f2c('0x16')][_0x7f2c('0x15')]);}})['catch'](function(_0x591f54){logger[_0x7f2c('0x14')](_0x7f2c('0x11'),_0x2e93d9,_0x591f54);_0x17754c(_0x591f54);});});}exports[_0x7f2c('0x17')]=function(_0x2d66d8){var _0x277164=this;return new Promise(function(_0x1d1528,_0x130e51){return db[_0x7f2c('0x18')][_0x7f2c('0x19')]({'raw':_0x2d66d8[_0x7f2c('0x1a')]?_0x2d66d8[_0x7f2c('0x1a')][_0x7f2c('0x1b')]===undefined?!![]:![]:!![],'where':_0x2d66d8[_0x7f2c('0x1a')]?_0x2d66d8[_0x7f2c('0x1a')][_0x7f2c('0x1c')]||null:null,'attributes':_0x2d66d8[_0x7f2c('0x1a')]?_0x2d66d8['options'][_0x7f2c('0x1d')]||null:null,'limit':_0x2d66d8[_0x7f2c('0x1a')]?_0x2d66d8['options'][_0x7f2c('0x1e')]||null:null,'include':_0x2d66d8[_0x7f2c('0x1a')]?_0x2d66d8[_0x7f2c('0x1a')]['include']?_[_0x7f2c('0x1f')](_0x2d66d8[_0x7f2c('0x1a')][_0x7f2c('0x20')],function(_0x5198c9){return{'model':db[_0x5198c9[_0x7f2c('0x21')]],'as':_0x5198c9['as'],'attributes':_0x5198c9[_0x7f2c('0x1d')],'include':_0x5198c9[_0x7f2c('0x20')]?_['map'](_0x5198c9[_0x7f2c('0x20')],function(_0x4f5059){return{'model':db[_0x4f5059[_0x7f2c('0x21')]],'as':_0x4f5059['as'],'attributes':_0x4f5059[_0x7f2c('0x1d')],'include':_0x4f5059[_0x7f2c('0x20')]?_[_0x7f2c('0x1f')](_0x4f5059[_0x7f2c('0x20')],function(_0x50ad96){return{'model':db[_0x50ad96[_0x7f2c('0x21')]],'as':_0x50ad96['as'],'attributes':_0x50ad96[_0x7f2c('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2f6729){logger[_0x7f2c('0x10')](_0x7f2c('0x17'),_0x2d66d8);logger[_0x7f2c('0x13')](_0x7f2c('0x17'),_0x2d66d8,JSON[_0x7f2c('0x22')](_0x2f6729));_0x1d1528(_0x2f6729);})[_0x7f2c('0x23')](function(_0x241a68){logger[_0x7f2c('0x14')](_0x7f2c('0x17'),_0x241a68[_0x7f2c('0x15')],_0x2d66d8);_0x130e51(_0x277164[_0x7f2c('0x14')](0x1f4,_0x241a68[_0x7f2c('0x15')]));});});};exports['ShowMailAccount']=function(_0x21e2e9){var _0x5613e9=this;return new Promise(function(_0xb69430,_0x192fd1){return db[_0x7f2c('0x18')][_0x7f2c('0x24')]({'raw':_0x21e2e9['options']?_0x21e2e9['options'][_0x7f2c('0x1b')]===undefined?!![]:![]:!![],'where':_0x21e2e9[_0x7f2c('0x1a')]?_0x21e2e9[_0x7f2c('0x1a')][_0x7f2c('0x1c')]||null:null,'attributes':_0x21e2e9[_0x7f2c('0x1a')]?_0x21e2e9[_0x7f2c('0x1a')][_0x7f2c('0x1d')]||null:null,'include':_0x21e2e9['options']?_0x21e2e9[_0x7f2c('0x1a')][_0x7f2c('0x20')]?_[_0x7f2c('0x1f')](_0x21e2e9[_0x7f2c('0x1a')][_0x7f2c('0x20')],function(_0x4faa68){return{'model':db[_0x4faa68[_0x7f2c('0x21')]],'as':_0x4faa68['as'],'attributes':_0x4faa68[_0x7f2c('0x1d')],'include':_0x4faa68[_0x7f2c('0x20')]?_[_0x7f2c('0x1f')](_0x4faa68[_0x7f2c('0x20')],function(_0x2683b2){return{'model':db[_0x2683b2[_0x7f2c('0x21')]],'as':_0x2683b2['as'],'attributes':_0x2683b2[_0x7f2c('0x1d')],'include':_0x2683b2[_0x7f2c('0x20')]?_[_0x7f2c('0x1f')](_0x2683b2['include'],function(_0x48ff74){return{'model':db[_0x48ff74[_0x7f2c('0x21')]],'as':_0x48ff74['as'],'attributes':_0x48ff74['attributes']};}):[]};}):[]};}):[]:[]})[_0x7f2c('0xf')](function(_0xb35f03){logger[_0x7f2c('0x10')](_0x7f2c('0x25'),_0x21e2e9);logger['debug'](_0x7f2c('0x25'),_0x21e2e9,JSON['stringify'](_0xb35f03));_0xb69430(_0xb35f03);})[_0x7f2c('0x23')](function(_0xafd302){logger[_0x7f2c('0x14')](_0x7f2c('0x25'),_0xafd302[_0x7f2c('0x15')],_0x21e2e9);_0x192fd1(_0x5613e9[_0x7f2c('0x14')](0x1f4,_0xafd302['message']));});});};exports[_0x7f2c('0x26')]=function(_0x4cdc44){var _0x5eb47d=this;return new Promise(function(_0x292e45,_0xf7e6a9){var _0x562a0c={'body':_0x4cdc44[_0x7f2c('0x27')],'channel':'mail'};var _0x2ffb78=_[_0x7f2c('0x28')](_['keys'](db[_0x7f2c('0x29')][_0x7f2c('0x2a')]),[_0x7f2c('0x2b'),_0x7f2c('0x2c'),'CompanyId','ListId']);var _0x580836=![];if(_0x4cdc44[_0x7f2c('0x27')]['id']){delete _0x4cdc44[_0x7f2c('0x27')]['id'];}if(_[_0x7f2c('0x2d')](_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x2e')])){return _0xf7e6a9(_0x5eb47d['error'](0x1f4,'from\x20is\x20mandatory'));}if(_[_0x7f2c('0x2d')](_0x4cdc44[_0x7f2c('0x27')]['body'])||_0x4cdc44['body'][_0x7f2c('0x27')]===''){return _0xf7e6a9(_0x5eb47d[_0x7f2c('0x14')](0x1f4,_0x7f2c('0x2f')));}if(_[_0x7f2c('0x2d')](_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x30')])){return _0xf7e6a9(_0x5eb47d[_0x7f2c('0x14')](0x1f4,_0x7f2c('0x31')+_0x2ffb78));}if(!_[_0x7f2c('0x32')](_0x2ffb78,_0x4cdc44[_0x7f2c('0x27')]['mapKey'])){return _0xf7e6a9(_0x5eb47d['error'](0x1f4,_0x7f2c('0x33')+_0x2ffb78));}var _0x5c0c68={};_0x5c0c68[_0x4cdc44[_0x7f2c('0x27')]['mapKey']]=_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x2e')];return db[_0x7f2c('0x18')]['find']({'where':{'id':_0x4cdc44[_0x7f2c('0x34')]['id']},'include':[{'model':db[_0x7f2c('0x35')],'as':_0x7f2c('0x36'),'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x5c0c68,'limit':0x1,'order':[[_0x7f2c('0x2c'),_0x7f2c('0x37')]]}]},{'model':db[_0x7f2c('0x38')],'as':_0x7f2c('0x39')},{'model':db['MailServerOut'],'as':_0x7f2c('0x3a')}]})[_0x7f2c('0xf')](function(_0x400a94){if(_0x400a94&&_0x400a94[_0x7f2c('0x36')]){var _0x669224=_0x400a94['get']({'plain':!![]});_0x562a0c[_0x7f2c('0x34')]=_[_0x7f2c('0x3b')](_0x669224,[_0x7f2c('0x39'),_0x7f2c('0x36')]);_0x562a0c[_0x7f2c('0x3c')]=_0x669224[_0x7f2c('0x39')];_0x562a0c[_0x7f2c('0x3d')]=_0x669224[_0x7f2c('0x36')];_0x562a0c['applications']=_[_0x7f2c('0x3e')](_0x562a0c[_0x7f2c('0x3c')],[_0x7f2c('0x3f')],[_0x7f2c('0x40')]);if(_0x562a0c[_0x7f2c('0x34')]&&_0x562a0c[_0x7f2c('0x34')]['autoclose']){_0x562a0c['applications'][_0x7f2c('0x41')]({'id':0x0,'priority':_0x562a0c[_0x7f2c('0x3c')][_0x7f2c('0x42')]+0x1,'app':_0x7f2c('0x43'),'appdata':_0x7f2c('0x44'),'interval':'*,*,*,*'});}if(_0x562a0c[_0x7f2c('0x34')]['Applications']){delete _0x562a0c[_0x7f2c('0x34')][_0x7f2c('0x39')];}if(_0x562a0c[_0x7f2c('0x34')][_0x7f2c('0x36')]){delete _0x562a0c[_0x7f2c('0x34')]['List'];}if(_0x669224[_0x7f2c('0x36')][_0x7f2c('0x45')][_0x7f2c('0x42')]){return _0x669224['List'][_0x7f2c('0x45')][0x0];}var _0x4d163a=_[_0x7f2c('0xa')](_0x4cdc44['body'],{'firstName':_0x4cdc44[_0x7f2c('0x27')]['from'],'ListId':_0x669224[_0x7f2c('0x46')]});_0x4d163a[_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x30')]]=_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x2e')];return db['CmContact'][_0x7f2c('0x47')](_0x4d163a);}else{throw new Error(_0x7f2c('0x48'));}})[_0x7f2c('0xf')](function(_0x1acba2){_0x562a0c['contact']=_0x1acba2;if(_0x1acba2){if(!_0x4cdc44[_0x7f2c('0x27')]['message'][_0x7f2c('0x49')]){_0x4cdc44[_0x7f2c('0x27')]['message'][_0x7f2c('0x49')]=rs['generate']()+'\x20'+_0x4cdc44['body']['message'][_0x7f2c('0x2e')];}var _0x48a1b8={'ContactId':_0x1acba2['id'],'MailAccountId':_0x4cdc44[_0x7f2c('0x34')]['id'],'inReplyTo':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')][_0x7f2c('0x49')],'to':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')]['from'],'cc':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')]['cc'],'subject':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')][_0x7f2c('0x4a')],'attach':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')][_0x7f2c('0x4b')],'lastMsgAt':moment()[_0x7f2c('0x4c')](_0x7f2c('0x4d')),'lastMsgDirection':'in','lastMsgBody':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x27')]};return db[_0x7f2c('0x4e')]['find']({'where':{'closed':![],'MailAccountId':_0x4cdc44[_0x7f2c('0x34')]['id']},'include':[{'model':db['MailMessage'],'as':'Messages','attributes':[_0x7f2c('0x49')],'where':{'messageId':_0x4cdc44['body'][_0x7f2c('0x15')][_0x7f2c('0x4f')]}}]})[_0x7f2c('0xf')](function(_0x30f0fe){if(_0x30f0fe){return[_0x30f0fe,![]];}return db[_0x7f2c('0x4e')][_0x7f2c('0x47')](_0x48a1b8)[_0x7f2c('0xf')](function(_0x5f3cfc){return[_0x5f3cfc,!![]];});});}else{throw new Error(_0x7f2c('0x50'));}})[_0x7f2c('0x51')](function(_0x1cf88e,_0x3a9604){if(_0x1cf88e){_0x580836=_0x3a9604;if(!_0x3a9604){return _0x1cf88e['update']({'inReplyTo':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')]['messageId'],'to':_0x4cdc44[_0x7f2c('0x27')]['message'][_0x7f2c('0x2e')],'cc':_0x4cdc44['body'][_0x7f2c('0x15')]['cc'],'subject':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')][_0x7f2c('0x4a')],'attach':_0x1cf88e[_0x7f2c('0x4b')]?_0x1cf88e['attach']:_0x4cdc44['body'][_0x7f2c('0x15')][_0x7f2c('0x4b')],'substatus':null,'substatusAt':moment()[_0x7f2c('0x4c')](_0x7f2c('0x4d')),'lastMsgAt':moment()[_0x7f2c('0x4c')](_0x7f2c('0x4d')),'lastMsgDirection':'in','lastMsgBody':_0x4cdc44['body'][_0x7f2c('0x27')]});}else{return _0x1cf88e;}}})[_0x7f2c('0xf')](function(_0x4e3733){_0x562a0c[_0x7f2c('0x52')]=_0x4e3733['get']({'plain':!![]});_0x562a0c['interaction'][_0x7f2c('0x53')]=_0x580836;return db[_0x7f2c('0x54')][_0x7f2c('0x47')]({'body':_0x4cdc44[_0x7f2c('0x27')]['body'],'MailAccountId':_0x4cdc44[_0x7f2c('0x34')]['id'],'MailInteractionId':_0x4e3733['id'],'direction':'in','ContactId':_0x562a0c[_0x7f2c('0x55')]['id'],'messageId':_0x4cdc44[_0x7f2c('0x27')]['message']['messageId'],'from':_0x4cdc44['body'][_0x7f2c('0x15')][_0x7f2c('0x2e')],'to':_0x4cdc44['body']['message']['to'],'cc':_0x4cdc44[_0x7f2c('0x27')]['message']['cc'],'subject':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')]['subject'],'attach':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')]['attach'],'Attachments':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')]['attachments'],'originTo':_0x4cdc44['body']['message'][_0x7f2c('0x56')],'originCc':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')][_0x7f2c('0x57')],'bcc':_0x4cdc44[_0x7f2c('0x27')][_0x7f2c('0x15')]['bcc']},{'include':[{'model':db[_0x7f2c('0x58')],'as':'Attachments'}]});})[_0x7f2c('0xf')](function(_0x41b4e2){_0x562a0c[_0x7f2c('0x15')]=_0x41b4e2;if(_0x562a0c[_0x7f2c('0x52')][_0x7f2c('0x59')]){return db[_0x7f2c('0x5a')][_0x7f2c('0x24')]({'attributes':['id',_0x7f2c('0x5b')],'where':{'id':_0x562a0c[_0x7f2c('0x52')][_0x7f2c('0x59')]}})['then'](function(_0x3ef9ef){if(_0x3ef9ef){_0x562a0c[_0x7f2c('0x3c')][_0x7f2c('0x5c')]({'id':0x0,'priority':0x0,'app':_0x7f2c('0x5d'),'appdata':_0x3ef9ef[_0x7f2c('0x5b')]+','+(_0x562a0c[_0x7f2c('0x34')][_0x7f2c('0x5e')]||0xa),'interval':_0x7f2c('0x5f')});}return respondWithRpcPromise('Start','startRouting',_0x562a0c);});}return respondWithRpcPromise(_0x7f2c('0x60'),_0x7f2c('0x61'),_0x562a0c);})[_0x7f2c('0xf')](function(_0x23e70){_0x292e45(_0x23e70);})[_0x7f2c('0x23')](function(_0x2b1a6e){_0xf7e6a9(_0x5eb47d['error'](0x1f4,_0x2b1a6e['message']));});});};
\ No newline at end of file
diff --git a/server/api/mailAccount/mailAccount.socket.js b/server/api/mailAccount/mailAccount.socket.js
index ee770e1..5fd7a4f 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 _0x2159=['save','remove','update','emit','removeListener','register','mailAccount:','./mailAccount.events'];(function(_0x3809bc,_0x5e4975){var _0x5096e6=function(_0x42b0bc){while(--_0x42b0bc){_0x3809bc['push'](_0x3809bc['shift']());}};_0x5096e6(++_0x5e4975);}(_0x2159,0x17f));var _0x9215=function(_0x2fc9e2,_0x1bdb51){_0x2fc9e2=_0x2fc9e2-0x0;var _0x2d1b9c=_0x2159[_0x2fc9e2];return _0x2d1b9c;};'use strict';var MailAccountEvents=require(_0x9215('0x0'));var events=[_0x9215('0x1'),_0x9215('0x2'),_0x9215('0x3')];function createListener(_0x4b113a,_0x1474c7){return function(_0x4ca557){_0x1474c7[_0x9215('0x4')](_0x4b113a,_0x4ca557);};}function removeListener(_0x3128f9,_0x202c8d){return function(){MailAccountEvents[_0x9215('0x5')](_0x3128f9,_0x202c8d);};}exports[_0x9215('0x6')]=function(_0x1fd854){for(var _0x3be70d=0x0,_0x383bb1=events['length'];_0x3be70d<_0x383bb1;_0x3be70d++){var _0x419fb3=events[_0x3be70d];var _0x245ee1=createListener(_0x9215('0x7')+_0x419fb3,_0x1fd854);MailAccountEvents['on'](_0x419fb3,_0x245ee1);}};
\ No newline at end of file
+var _0xfd6e=['./mailAccount.events','remove','length'];(function(_0x2718b1,_0x4e9a78){var _0x59bfb1=function(_0x10fdae){while(--_0x10fdae){_0x2718b1['push'](_0x2718b1['shift']());}};_0x59bfb1(++_0x4e9a78);}(_0xfd6e,0x16e));var _0xefd6=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xfd6e[_0x2641f9];return _0x585741;};'use strict';var MailAccountEvents=require(_0xefd6('0x0'));var events=['save',_0xefd6('0x1'),'update'];function createListener(_0x229dfe,_0x41b7d0){return function(_0x54e608){_0x41b7d0['emit'](_0x229dfe,_0x54e608);};}function removeListener(_0x5f4c49,_0x27d881){return function(){MailAccountEvents['removeListener'](_0x5f4c49,_0x27d881);};}exports['register']=function(_0x24af45){for(var _0x23f8c3=0x0,_0x26e108=events[_0xefd6('0x2')];_0x23f8c3<_0x26e108;_0x23f8c3++){var _0x340765=events[_0x23f8c3];var _0x5da399=createListener('mailAccount:'+_0x340765,_0x24af45);MailAccountEvents['on'](_0x340765,_0x5da399);}};
\ No newline at end of file
diff --git a/server/api/mailApplication/index.js b/server/api/mailApplication/index.js
index 6e7d406..f922d7e 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 _0x1339=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailApplication.controller','/:id','isAuthenticated','show','update','delete','destroy','exports','path','connect-timeout'];(function(_0x1e35bd,_0x40ee90){var _0x2c379d=function(_0x347fa7){while(--_0x347fa7){_0x1e35bd['push'](_0x1e35bd['shift']());}};_0x2c379d(++_0x40ee90);}(_0x1339,0x1ed));var _0x9133=function(_0x149047,_0x5b64de){_0x149047=_0x149047-0x0;var _0xd6cf3e=_0x1339[_0x149047];return _0xd6cf3e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x9133('0x0'));var timeout=require(_0x9133('0x1'));var express=require(_0x9133('0x2'));var router=express[_0x9133('0x3')]();var auth=require(_0x9133('0x4'));var interaction=require(_0x9133('0x5'));var config=require(_0x9133('0x6'));var controller=require(_0x9133('0x7'));router['get'](_0x9133('0x8'),auth[_0x9133('0x9')](),controller[_0x9133('0xa')]);router['put'](_0x9133('0x8'),auth[_0x9133('0x9')](),controller[_0x9133('0xb')]);router[_0x9133('0xc')](_0x9133('0x8'),auth[_0x9133('0x9')](),controller[_0x9133('0xd')]);module[_0x9133('0xe')]=router;
\ No newline at end of file
+var _0x1d2d=['multer','util','path','connect-timeout','express','../../components/auth/service','./mailApplication.controller','get','/:id','isAuthenticated','show','put','update','delete','destroy','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1d2d,0xf0));var _0xd1d2=function(_0x519557,_0x1128a0){_0x519557=_0x519557-0x0;var _0x580b9e=_0x1d2d[_0x519557];return _0x580b9e;};'use strict';var multer=require(_0xd1d2('0x0'));var util=require(_0xd1d2('0x1'));var path=require(_0xd1d2('0x2'));var timeout=require(_0xd1d2('0x3'));var express=require(_0xd1d2('0x4'));var router=express['Router']();var auth=require(_0xd1d2('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xd1d2('0x6'));router[_0xd1d2('0x7')](_0xd1d2('0x8'),auth[_0xd1d2('0x9')](),controller[_0xd1d2('0xa')]);router[_0xd1d2('0xb')]('/:id',auth[_0xd1d2('0x9')](),controller[_0xd1d2('0xc')]);router[_0xd1d2('0xd')](_0xd1d2('0x8'),auth[_0xd1d2('0x9')](),controller[_0xd1d2('0xe')]);module[_0xd1d2('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.attributes.js b/server/api/mailApplication/mailApplication.attributes.js
index fef7055..ad1a9f5 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 _0xe72e=['STRING','noop','TEXT','sequelize','exports','INTEGER'];(function(_0x2f168e,_0x44429f){var _0x21edb2=function(_0x4c7a26){while(--_0x4c7a26){_0x2f168e['push'](_0x2f168e['shift']());}};_0x21edb2(++_0x44429f);}(_0xe72e,0x16b));var _0xee72=function(_0x4d971d,_0x4c91ea){_0x4d971d=_0x4d971d-0x0;var _0x2d5e2b=_0xe72e[_0x4d971d];return _0x2d5e2b;};'use strict';var Sequelize=require(_0xee72('0x0'));module[_0xee72('0x1')]={'priority':{'type':Sequelize[_0xee72('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xee72('0x3')],'allowNull':![],'defaultValue':_0xee72('0x4')},'appdata':{'type':Sequelize[_0xee72('0x5')]()},'description':{'type':Sequelize[_0xee72('0x3')]},'interval':{'type':Sequelize[_0xee72('0x3')],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
+var _0x5121=['STRING','noop','TEXT','sequelize','exports'];(function(_0x42b551,_0x469d15){var _0x5797d0=function(_0x388913){while(--_0x388913){_0x42b551['push'](_0x42b551['shift']());}};_0x5797d0(++_0x469d15);}(_0x5121,0xa3));var _0x1512=function(_0x2df1f2,_0x58d388){_0x2df1f2=_0x2df1f2-0x0;var _0x38652b=_0x5121[_0x2df1f2];return _0x38652b;};'use strict';var Sequelize=require(_0x1512('0x0'));module[_0x1512('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x1512('0x2')],'allowNull':![],'defaultValue':_0x1512('0x3')},'appdata':{'type':Sequelize[_0x1512('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x1512('0x2')],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.controller.js b/server/api/mailApplication/mailApplication.controller.js
index 0b7b7b4..c869213 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 _0x56f3=['../../config/environment','../../mysqldb','sendStatus','status','json','offset','reject','update','destroy','then','end','stack','name','send','show','params','model','MailApplication','query','keys','filters','intersection','attributes','fields','length','includeAll','include','options','find','catch','body','eml-format','rimraf','zip-dir','moment','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils'];(function(_0x32d457,_0x1a39c9){var _0x338386=function(_0x199d7a){while(--_0x199d7a){_0x32d457['push'](_0x32d457['shift']());}};_0x338386(++_0x1a39c9);}(_0x56f3,0x87));var _0x356f=function(_0x1e3ee1,_0x4f67db){_0x1e3ee1=_0x1e3ee1-0x0;var _0x5bb066=_0x56f3[_0x1e3ee1];return _0x5bb066;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x356f('0x0'));var rimraf=require(_0x356f('0x1'));var zipdir=require(_0x356f('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x356f('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x356f('0x4'));var path=require(_0x356f('0x5'));var sox=require(_0x356f('0x6'));var csv=require(_0x356f('0x7'));var ejs=require(_0x356f('0x8'));var fs=require('fs');var _=require(_0x356f('0x9'));var squel=require('squel');var crypto=require(_0x356f('0xa'));var jsforce=require(_0x356f('0xb'));var deskjs=require(_0x356f('0xc'));var toCsv=require(_0x356f('0x7'));var querystring=require('querystring');var Papa=require(_0x356f('0xd'));var Redis=require(_0x356f('0xe'));var authService=require(_0x356f('0xf'));var qs=require(_0x356f('0x10'));var as=require(_0x356f('0x11'));var hardwareService=require(_0x356f('0x12'));var logger=require('../../config/logger')(_0x356f('0x13'));var utils=require(_0x356f('0x14'));var config=require(_0x356f('0x15'));var db=require(_0x356f('0x16'))['db'];function respondWithStatusCode(_0x329d02,_0x22c3f7){_0x22c3f7=_0x22c3f7||0xcc;return function(_0x4f094c){if(_0x4f094c){return _0x329d02[_0x356f('0x17')](_0x22c3f7);}return _0x329d02[_0x356f('0x18')](_0x22c3f7)['end']();};}function respondWithResult(_0x2fb1ec,_0x231e34){_0x231e34=_0x231e34||0xc8;return function(_0x19e635){if(_0x19e635){return _0x2fb1ec['status'](_0x231e34)[_0x356f('0x19')](_0x19e635);}};}function respondWithFilteredResult(_0x45eef0,_0x241469){return function(_0x3e7ead){if(_0x3e7ead){var _0x4fa818=_0x3e7ead['count'],_0x239dde=_0x241469[_0x356f('0x1a')],_0x4299da=_0x241469[_0x356f('0x1a')]+_0x241469['limit'],_0x409bd7;if(_0x4299da>=_0x4fa818){_0x4299da=_0x4fa818;_0x409bd7=0xc8;}else{_0x409bd7=0xce;}_0x45eef0[_0x356f('0x18')](_0x409bd7);return _0x45eef0['set']('Content-Range',_0x239dde+'-'+_0x4299da+'/'+_0x4fa818)[_0x356f('0x19')](_0x3e7ead);}return null;};}function patchUpdates(_0x5c971f){return function(_0x872c89){try{jsonpatch['apply'](_0x872c89,_0x5c971f,!![]);}catch(_0x268b63){return BPromise[_0x356f('0x1b')](_0x268b63);}return _0x872c89['save']();};}function saveUpdates(_0x3b7ca7,_0x55226c){return function(_0xbecdd1){if(_0xbecdd1){return _0xbecdd1[_0x356f('0x1c')](_0x3b7ca7)['then'](function(_0x45bd1f){return _0x45bd1f;});}return null;};}function removeEntity(_0x17f513,_0x4797fd){return function(_0x4fe102){if(_0x4fe102){return _0x4fe102[_0x356f('0x1d')]()[_0x356f('0x1e')](function(){_0x17f513[_0x356f('0x18')](0xcc)[_0x356f('0x1f')]();});}};}function handleEntityNotFound(_0x5cc633,_0x51d8e8){return function(_0x1e6c0d){if(!_0x1e6c0d){_0x5cc633[_0x356f('0x17')](0x194);}return _0x1e6c0d;};}function handleError(_0xf649d8,_0x88534){_0x88534=_0x88534||0x1f4;return function(_0x4ecfba){logger['error'](_0x4ecfba[_0x356f('0x20')]);if(_0x4ecfba[_0x356f('0x21')]){delete _0x4ecfba[_0x356f('0x21')];}_0xf649d8[_0x356f('0x18')](_0x88534)[_0x356f('0x22')](_0x4ecfba);};}exports[_0x356f('0x23')]=function(_0x23b21c,_0x13ef75){var _0x20ce31={'raw':!![],'where':{'id':_0x23b21c[_0x356f('0x24')]['id']}},_0xc18fc2={};_0xc18fc2[_0x356f('0x25')]=_['keys'](db[_0x356f('0x26')]['rawAttributes']);_0xc18fc2[_0x356f('0x27')]=_[_0x356f('0x28')](_0x23b21c[_0x356f('0x27')]);_0xc18fc2[_0x356f('0x29')]=_[_0x356f('0x2a')](_0xc18fc2['model'],_0xc18fc2['query']);_0x20ce31[_0x356f('0x2b')]=_[_0x356f('0x2a')](_0xc18fc2[_0x356f('0x25')],qs[_0x356f('0x2c')](_0x23b21c[_0x356f('0x27')][_0x356f('0x2c')]));_0x20ce31['attributes']=_0x20ce31[_0x356f('0x2b')][_0x356f('0x2d')]?_0x20ce31[_0x356f('0x2b')]:_0xc18fc2[_0x356f('0x25')];if(_0x23b21c[_0x356f('0x27')][_0x356f('0x2e')]){_0x20ce31[_0x356f('0x2f')]=[{'all':!![]}];}_0x20ce31=_['merge']({},_0x20ce31,_0x23b21c[_0x356f('0x30')]);return db[_0x356f('0x26')][_0x356f('0x31')](_0x20ce31)[_0x356f('0x1e')](handleEntityNotFound(_0x13ef75,null))[_0x356f('0x1e')](respondWithResult(_0x13ef75,null))[_0x356f('0x32')](handleError(_0x13ef75,null));};exports[_0x356f('0x1c')]=function(_0x15c41b,_0xfd08f1){if(_0x15c41b[_0x356f('0x33')]['id']){delete _0x15c41b[_0x356f('0x33')]['id'];}return db['MailApplication'][_0x356f('0x31')]({'where':{'id':_0x15c41b[_0x356f('0x24')]['id']}})[_0x356f('0x1e')](handleEntityNotFound(_0xfd08f1,null))[_0x356f('0x1e')](saveUpdates(_0x15c41b['body'],null))[_0x356f('0x1e')](respondWithResult(_0xfd08f1,null))['catch'](handleError(_0xfd08f1,null));};exports[_0x356f('0x1d')]=function(_0x4f5168,_0x17f48f){return db[_0x356f('0x26')][_0x356f('0x31')]({'where':{'id':_0x4f5168[_0x356f('0x24')]['id']}})[_0x356f('0x1e')](handleEntityNotFound(_0x17f48f,null))[_0x356f('0x1e')](removeEntity(_0x17f48f,null))[_0x356f('0x32')](handleError(_0x17f48f,null));};
\ No newline at end of file
+var _0x150a=['rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','count','offset','limit','set','apply','reject','update','destroy','then','end','stack','name','show','params','model','keys','MailApplication','query','intersection','fields','attributes','includeAll','include','merge','options','catch','body','find','html-pdf','eml-format'];(function(_0x137963,_0x29f175){var _0x171aa9=function(_0x636f14){while(--_0x636f14){_0x137963['push'](_0x137963['shift']());}};_0x171aa9(++_0x29f175);}(_0x150a,0x148));var _0xa150=function(_0x3f8e20,_0x1daf92){_0x3f8e20=_0x3f8e20-0x0;var _0x54b65e=_0x150a[_0x3f8e20];return _0x54b65e;};'use strict';var pdf=require(_0xa150('0x0'));var emlformat=require(_0xa150('0x1'));var rimraf=require(_0xa150('0x2'));var zipdir=require(_0xa150('0x3'));var jsonpatch=require(_0xa150('0x4'));var rp=require(_0xa150('0x5'));var moment=require(_0xa150('0x6'));var BPromise=require(_0xa150('0x7'));var Mustache=require('mustache');var util=require('util');var path=require(_0xa150('0x8'));var sox=require(_0xa150('0x9'));var csv=require(_0xa150('0xa'));var ejs=require(_0xa150('0xb'));var fs=require('fs');var _=require(_0xa150('0xc'));var squel=require(_0xa150('0xd'));var crypto=require(_0xa150('0xe'));var jsforce=require(_0xa150('0xf'));var deskjs=require(_0xa150('0x10'));var toCsv=require(_0xa150('0xa'));var querystring=require(_0xa150('0x11'));var Papa=require(_0xa150('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa150('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa150('0x14'));var logger=require(_0xa150('0x15'))(_0xa150('0x16'));var utils=require(_0xa150('0x17'));var config=require('../../config/environment');var db=require(_0xa150('0x18'))['db'];function respondWithStatusCode(_0x476e4f,_0x26d40e){_0x26d40e=_0x26d40e||0xcc;return function(_0x35bfd8){if(_0x35bfd8){return _0x476e4f[_0xa150('0x19')](_0x26d40e);}return _0x476e4f[_0xa150('0x1a')](_0x26d40e)['end']();};}function respondWithResult(_0x300029,_0x10e233){_0x10e233=_0x10e233||0xc8;return function(_0x1f529e){if(_0x1f529e){return _0x300029[_0xa150('0x1a')](_0x10e233)['json'](_0x1f529e);}};}function respondWithFilteredResult(_0x39b363,_0x46e60f){return function(_0x3e7311){if(_0x3e7311){var _0x636278=_0x3e7311[_0xa150('0x1b')],_0x2b96ef=_0x46e60f['offset'],_0x43b89a=_0x46e60f[_0xa150('0x1c')]+_0x46e60f[_0xa150('0x1d')],_0x5b18e0;if(_0x43b89a>=_0x636278){_0x43b89a=_0x636278;_0x5b18e0=0xc8;}else{_0x5b18e0=0xce;}_0x39b363[_0xa150('0x1a')](_0x5b18e0);return _0x39b363[_0xa150('0x1e')]('Content-Range',_0x2b96ef+'-'+_0x43b89a+'/'+_0x636278)['json'](_0x3e7311);}return null;};}function patchUpdates(_0x285662){return function(_0x398845){try{jsonpatch[_0xa150('0x1f')](_0x398845,_0x285662,!![]);}catch(_0x468449){return BPromise[_0xa150('0x20')](_0x468449);}return _0x398845['save']();};}function saveUpdates(_0x51dc06,_0x2a1f06){return function(_0x27d749){if(_0x27d749){return _0x27d749[_0xa150('0x21')](_0x51dc06)['then'](function(_0x25e611){return _0x25e611;});}return null;};}function removeEntity(_0x4efcc8,_0x8e9598){return function(_0x59b8d4){if(_0x59b8d4){return _0x59b8d4[_0xa150('0x22')]()[_0xa150('0x23')](function(){_0x4efcc8[_0xa150('0x1a')](0xcc)[_0xa150('0x24')]();});}};}function handleEntityNotFound(_0x3b98b4,_0xd73377){return function(_0x421d26){if(!_0x421d26){_0x3b98b4[_0xa150('0x19')](0x194);}return _0x421d26;};}function handleError(_0x5d85a2,_0x31aa27){_0x31aa27=_0x31aa27||0x1f4;return function(_0x3beaa7){logger['error'](_0x3beaa7[_0xa150('0x25')]);if(_0x3beaa7[_0xa150('0x26')]){delete _0x3beaa7[_0xa150('0x26')];}_0x5d85a2[_0xa150('0x1a')](_0x31aa27)['send'](_0x3beaa7);};}exports[_0xa150('0x27')]=function(_0x2c9892,_0x2ef714){var _0x2f8160={'raw':!![],'where':{'id':_0x2c9892[_0xa150('0x28')]['id']}},_0xc96662={};_0xc96662[_0xa150('0x29')]=_[_0xa150('0x2a')](db[_0xa150('0x2b')]['rawAttributes']);_0xc96662[_0xa150('0x2c')]=_[_0xa150('0x2a')](_0x2c9892[_0xa150('0x2c')]);_0xc96662['filters']=_[_0xa150('0x2d')](_0xc96662[_0xa150('0x29')],_0xc96662[_0xa150('0x2c')]);_0x2f8160['attributes']=_[_0xa150('0x2d')](_0xc96662[_0xa150('0x29')],qs[_0xa150('0x2e')](_0x2c9892[_0xa150('0x2c')][_0xa150('0x2e')]));_0x2f8160[_0xa150('0x2f')]=_0x2f8160['attributes']['length']?_0x2f8160[_0xa150('0x2f')]:_0xc96662[_0xa150('0x29')];if(_0x2c9892[_0xa150('0x2c')][_0xa150('0x30')]){_0x2f8160[_0xa150('0x31')]=[{'all':!![]}];}_0x2f8160=_[_0xa150('0x32')]({},_0x2f8160,_0x2c9892[_0xa150('0x33')]);return db[_0xa150('0x2b')]['find'](_0x2f8160)['then'](handleEntityNotFound(_0x2ef714,null))['then'](respondWithResult(_0x2ef714,null))[_0xa150('0x34')](handleError(_0x2ef714,null));};exports[_0xa150('0x21')]=function(_0x120e22,_0x3b481b){if(_0x120e22[_0xa150('0x35')]['id']){delete _0x120e22[_0xa150('0x35')]['id'];}return db[_0xa150('0x2b')][_0xa150('0x36')]({'where':{'id':_0x120e22[_0xa150('0x28')]['id']}})[_0xa150('0x23')](handleEntityNotFound(_0x3b481b,null))[_0xa150('0x23')](saveUpdates(_0x120e22[_0xa150('0x35')],null))[_0xa150('0x23')](respondWithResult(_0x3b481b,null))[_0xa150('0x34')](handleError(_0x3b481b,null));};exports[_0xa150('0x22')]=function(_0x524fe9,_0x51e4fd){return db['MailApplication'][_0xa150('0x36')]({'where':{'id':_0x524fe9['params']['id']}})['then'](handleEntityNotFound(_0x51e4fd,null))[_0xa150('0x23')](removeEntity(_0x51e4fd,null))['catch'](handleError(_0x51e4fd,null));};
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.model.js b/server/api/mailApplication/mailApplication.model.js
index a8a9ae0..bc3305c 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 _0xb96d=['exports','MailApplication','mail_applications','utf8mb4_unicode_ci','util','../../config/logger','api','bluebird','request-promise','path','./mailApplication.attributes'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xb96d,0x9e));var _0xdb96=function(_0x3d4876,_0x366386){_0x3d4876=_0x3d4876-0x0;var _0x58ca9d=_0xb96d[_0x3d4876];return _0x58ca9d;};'use strict';var _=require('lodash');var util=require(_0xdb96('0x0'));var logger=require(_0xdb96('0x1'))(_0xdb96('0x2'));var moment=require('moment');var BPromise=require(_0xdb96('0x3'));var rp=require(_0xdb96('0x4'));var fs=require('fs');var path=require(_0xdb96('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xdb96('0x6'));module[_0xdb96('0x7')]=function(_0x3690b3,_0x3e1d84){return _0x3690b3['define'](_0xdb96('0x8'),attributes,{'tableName':_0xdb96('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xdb96('0xa')});};
\ No newline at end of file
+var _0xb44a=['moment','path','../../config/environment','./mailApplication.attributes','exports','define','MailApplication','mail_applications','utf8mb4','utf8mb4_unicode_ci','../../config/logger'];(function(_0x1f3f4f,_0x2eb964){var _0x1f85ec=function(_0x13189e){while(--_0x13189e){_0x1f3f4f['push'](_0x1f3f4f['shift']());}};_0x1f85ec(++_0x2eb964);}(_0xb44a,0x1c2));var _0xab44=function(_0x96ad7d,_0x1017ba){_0x96ad7d=_0x96ad7d-0x0;var _0x32d63a=_0xb44a[_0x96ad7d];return _0x32d63a;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xab44('0x0'))('api');var moment=require(_0xab44('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xab44('0x2'));var rimraf=require('rimraf');var config=require(_0xab44('0x3'));var attributes=require(_0xab44('0x4'));module[_0xab44('0x5')]=function(_0x28681a,_0x2f3948){return _0x28681a[_0xab44('0x6')](_0xab44('0x7'),attributes,{'tableName':_0xab44('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xab44('0x9'),'collate':_0xab44('0xa')});};
\ No newline at end of file
diff --git a/server/api/mailApplication/mailApplication.rpc.js b/server/api/mailApplication/mailApplication.rpc.js
index ae1a8ee..503a9ad 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 _0xa28f=['catch','body','options','where','limit','UpdateMailApplication','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','MailApplication,\x20%s,\x20%s','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent'];(function(_0x39a8c7,_0x3761ae){var _0x3c62e8=function(_0x3b8879){while(--_0x3b8879){_0x39a8c7['push'](_0x39a8c7['shift']());}};_0x3c62e8(++_0x3761ae);}(_0xa28f,0xe7));var _0xfa28=function(_0x17e5ca,_0x544706){_0x17e5ca=_0x17e5ca-0x0;var _0x4c0e7c=_0xa28f[_0x17e5ca];return _0x4c0e7c;};'use strict';var _=require(_0xfa28('0x0'));var util=require('util');var moment=require(_0xfa28('0x1'));var BPromise=require('bluebird');var rs=require(_0xfa28('0x2'));var fs=require('fs');var Redis=require(_0xfa28('0x3'));var db=require(_0xfa28('0x4'))['db'];var utils=require(_0xfa28('0x5'));var logger=require(_0xfa28('0x6'))(_0xfa28('0x7'));var config=require(_0xfa28('0x8'));var jayson=require(_0xfa28('0x9'));var client=jayson[_0xfa28('0xa')][_0xfa28('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4513d7,_0x43d16c,_0x17108c){return new BPromise(function(_0x3952bc,_0x10321b){return client['request'](_0x4513d7,_0x17108c)['then'](function(_0x52ca06){logger['info'](_0xfa28('0xc'),_0x43d16c,'request\x20sent');logger[_0xfa28('0xd')](_0xfa28('0xe'),_0x43d16c,'request\x20sent',JSON[_0xfa28('0xf')](_0x52ca06));if(_0x52ca06[_0xfa28('0x10')]){if(_0x52ca06[_0xfa28('0x10')]['code']===0x1f4){logger[_0xfa28('0x10')]('MailApplication,\x20%s,\x20%s',_0x43d16c,_0x52ca06[_0xfa28('0x10')][_0xfa28('0x11')]);return _0x10321b(_0x52ca06['error'][_0xfa28('0x11')]);}logger[_0xfa28('0x10')](_0xfa28('0xc'),_0x43d16c,_0x52ca06[_0xfa28('0x10')]['message']);return _0x3952bc(_0x52ca06[_0xfa28('0x10')][_0xfa28('0x11')]);}else{logger['info']('MailApplication,\x20%s,\x20%s',_0x43d16c,_0xfa28('0x12'));_0x3952bc(_0x52ca06['result'][_0xfa28('0x11')]);}})[_0xfa28('0x13')](function(_0x246d0e){logger[_0xfa28('0x10')]('MailApplication,\x20%s,\x20%s',_0x43d16c,_0x246d0e);_0x10321b(_0x246d0e);});});}exports['UpdateMailApplication']=function(_0x1ad01d){var _0x17ae0b=this;return new Promise(function(_0x38e008,_0x3e7afc){return db['MailApplication']['update'](_0x1ad01d[_0xfa28('0x14')],{'raw':_0x1ad01d['options']?_0x1ad01d[_0xfa28('0x15')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1ad01d[_0xfa28('0x15')]?_0x1ad01d['options'][_0xfa28('0x16')]||null:null,'attributes':_0x1ad01d[_0xfa28('0x15')]?_0x1ad01d[_0xfa28('0x15')]['attributes']||null:null,'limit':_0x1ad01d[_0xfa28('0x15')]?_0x1ad01d['options'][_0xfa28('0x17')]||null:null})['then'](function(_0x2c3368){logger['info']('UpdateMailApplication',_0x1ad01d);logger[_0xfa28('0xd')](_0xfa28('0x18'),_0x1ad01d,JSON[_0xfa28('0xf')](_0x2c3368));_0x38e008(_0x2c3368);})['catch'](function(_0x141e2c){logger['error'](_0xfa28('0x18'),_0x141e2c[_0xfa28('0x11')],_0x1ad01d);_0x3e7afc(_0x17ae0b['error'](0x1f4,_0x141e2c[_0xfa28('0x11')]));});});};
\ No newline at end of file
+var _0xc145=['stringify','error','code','message','result','UpdateMailApplication','MailApplication','update','body','options','where','attributes','limit','then','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','MailApplication,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x463415,_0x37f55b){var _0x5580bc=function(_0x4a7b94){while(--_0x4a7b94){_0x463415['push'](_0x463415['shift']());}};_0x5580bc(++_0x37f55b);}(_0xc145,0x1a2));var _0x5c14=function(_0x25db8e,_0x1c74f6){_0x25db8e=_0x25db8e-0x0;var _0x4ce646=_0xc145[_0x25db8e];return _0x4ce646;};'use strict';var _=require('lodash');var util=require(_0x5c14('0x0'));var moment=require(_0x5c14('0x1'));var BPromise=require(_0x5c14('0x2'));var rs=require(_0x5c14('0x3'));var fs=require('fs');var Redis=require(_0x5c14('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x5c14('0x5'));var logger=require(_0x5c14('0x6'))(_0x5c14('0x7'));var config=require(_0x5c14('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x5c14('0x9')][_0x5c14('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x27d5d1,_0x418824,_0x5d845f){return new BPromise(function(_0x438c8f,_0x3e3470){return client[_0x5c14('0xb')](_0x27d5d1,_0x5d845f)['then'](function(_0x433d27){logger[_0x5c14('0xc')](_0x5c14('0xd'),_0x418824,_0x5c14('0xe'));logger[_0x5c14('0xf')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x418824,'request\x20sent',JSON[_0x5c14('0x10')](_0x433d27));if(_0x433d27[_0x5c14('0x11')]){if(_0x433d27['error'][_0x5c14('0x12')]===0x1f4){logger[_0x5c14('0x11')](_0x5c14('0xd'),_0x418824,_0x433d27['error'][_0x5c14('0x13')]);return _0x3e3470(_0x433d27['error'][_0x5c14('0x13')]);}logger[_0x5c14('0x11')]('MailApplication,\x20%s,\x20%s',_0x418824,_0x433d27[_0x5c14('0x11')][_0x5c14('0x13')]);return _0x438c8f(_0x433d27['error']['message']);}else{logger[_0x5c14('0xc')]('MailApplication,\x20%s,\x20%s',_0x418824,_0x5c14('0xe'));_0x438c8f(_0x433d27[_0x5c14('0x14')]['message']);}})['catch'](function(_0x2de9f9){logger[_0x5c14('0x11')](_0x5c14('0xd'),_0x418824,_0x2de9f9);_0x3e3470(_0x2de9f9);});});}exports[_0x5c14('0x15')]=function(_0x1c1b4e){var _0x400324=this;return new Promise(function(_0x53b014,_0x4ef432){return db[_0x5c14('0x16')][_0x5c14('0x17')](_0x1c1b4e[_0x5c14('0x18')],{'raw':_0x1c1b4e['options']?_0x1c1b4e[_0x5c14('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1c1b4e[_0x5c14('0x19')]?_0x1c1b4e[_0x5c14('0x19')][_0x5c14('0x1a')]||null:null,'attributes':_0x1c1b4e['options']?_0x1c1b4e['options'][_0x5c14('0x1b')]||null:null,'limit':_0x1c1b4e[_0x5c14('0x19')]?_0x1c1b4e[_0x5c14('0x19')][_0x5c14('0x1c')]||null:null})[_0x5c14('0x1d')](function(_0x41e914){logger[_0x5c14('0xc')](_0x5c14('0x15'),_0x1c1b4e);logger[_0x5c14('0xf')](_0x5c14('0x15'),_0x1c1b4e,JSON['stringify'](_0x41e914));_0x53b014(_0x41e914);})[_0x5c14('0x1e')](function(_0x48d598){logger[_0x5c14('0x11')](_0x5c14('0x15'),_0x48d598[_0x5c14('0x13')],_0x1c1b4e);_0x4ef432(_0x400324[_0x5c14('0x11')](0x1f4,_0x48d598[_0x5c14('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/mailInteraction/index.js b/server/api/mailInteraction/index.js
index f19ed75..ac03922 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 _0x975a=['delete','/:id/tags','removeTags','multer','util','path','connect-timeout','Router','../../components/interaction/service','./mailInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/messages','getMessages','/:id/download','post','create','addMessage','tracked','mail','addTags','mailinteraction:update','update','mailinteraction:destroy','destroy'];(function(_0x243a8a,_0x117b04){var _0x1300f6=function(_0x364a4b){while(--_0x364a4b){_0x243a8a['push'](_0x243a8a['shift']());}};_0x1300f6(++_0x117b04);}(_0x975a,0x142));var _0xa975=function(_0x4b5d94,_0x2ca9de){_0x4b5d94=_0x4b5d94-0x0;var _0x9f6cbd=_0x975a[_0x4b5d94];return _0x9f6cbd;};'use strict';var multer=require(_0xa975('0x0'));var util=require(_0xa975('0x1'));var path=require(_0xa975('0x2'));var timeout=require(_0xa975('0x3'));var express=require('express');var router=express[_0xa975('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xa975('0x5'));var config=require('../../config/environment');var controller=require(_0xa975('0x6'));router[_0xa975('0x7')]('/',auth[_0xa975('0x8')](),controller[_0xa975('0x9')]);router[_0xa975('0x7')](_0xa975('0xa'),auth[_0xa975('0x8')](),controller[_0xa975('0xb')]);router[_0xa975('0x7')](_0xa975('0xc'),auth[_0xa975('0x8')](),controller['show']);router['get'](_0xa975('0xd'),auth['isAuthenticated'](),controller[_0xa975('0xe')]);router[_0xa975('0x7')](_0xa975('0xf'),auth['isAuthenticated'](),controller['download']);router[_0xa975('0x10')]('/',auth[_0xa975('0x8')](),controller[_0xa975('0x11')]);router[_0xa975('0x10')]('/:id/messages',auth[_0xa975('0x8')](),controller[_0xa975('0x12')]);router['post']('/:id/tags',auth[_0xa975('0x8')](),interaction[_0xa975('0x13')](_0xa975('0x14'),'mailinteraction:addtags'),controller[_0xa975('0x15')]);router['put']('/:id',auth[_0xa975('0x8')](),interaction[_0xa975('0x13')](_0xa975('0x14'),_0xa975('0x16')),controller[_0xa975('0x17')]);router['delete'](_0xa975('0xc'),auth[_0xa975('0x8')](),interaction[_0xa975('0x13')](_0xa975('0x14'),_0xa975('0x18')),controller[_0xa975('0x19')]);router[_0xa975('0x1a')](_0xa975('0x1b'),auth['isAuthenticated'](),controller[_0xa975('0x1c')]);module['exports']=router;
\ No newline at end of file
+var _0xedf2=['tracked','mailinteraction:addtags','addTags','/:id','mail','mailinteraction:update','update','delete','mailinteraction:destroy','destroy','removeTags','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id/messages','/:id/download','download','create','/:id/tags'];(function(_0x5a5395,_0x5361f6){var _0x4da43d=function(_0x149941){while(--_0x149941){_0x5a5395['push'](_0x5a5395['shift']());}};_0x4da43d(++_0x5361f6);}(_0xedf2,0xa2));var _0x2edf=function(_0x32c772,_0x19d5d3){_0x32c772=_0x32c772-0x0;var _0x1f27f0=_0xedf2[_0x32c772];return _0x1f27f0;};'use strict';var multer=require('multer');var util=require(_0x2edf('0x0'));var path=require('path');var timeout=require(_0x2edf('0x1'));var express=require(_0x2edf('0x2'));var router=express[_0x2edf('0x3')]();var auth=require(_0x2edf('0x4'));var interaction=require(_0x2edf('0x5'));var config=require(_0x2edf('0x6'));var controller=require(_0x2edf('0x7'));router[_0x2edf('0x8')]('/',auth[_0x2edf('0x9')](),controller[_0x2edf('0xa')]);router[_0x2edf('0x8')](_0x2edf('0xb'),auth[_0x2edf('0x9')](),controller[_0x2edf('0xc')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router[_0x2edf('0x8')](_0x2edf('0xd'),auth[_0x2edf('0x9')](),controller['getMessages']);router['get'](_0x2edf('0xe'),auth[_0x2edf('0x9')](),controller[_0x2edf('0xf')]);router['post']('/',auth[_0x2edf('0x9')](),controller[_0x2edf('0x10')]);router['post'](_0x2edf('0xd'),auth['isAuthenticated'](),controller['addMessage']);router['post'](_0x2edf('0x11'),auth[_0x2edf('0x9')](),interaction[_0x2edf('0x12')]('mail',_0x2edf('0x13')),controller[_0x2edf('0x14')]);router['put'](_0x2edf('0x15'),auth[_0x2edf('0x9')](),interaction[_0x2edf('0x12')](_0x2edf('0x16'),_0x2edf('0x17')),controller[_0x2edf('0x18')]);router[_0x2edf('0x19')]('/:id',auth['isAuthenticated'](),interaction['tracked']('mail',_0x2edf('0x1a')),controller[_0x2edf('0x1b')]);router[_0x2edf('0x19')]('/:id/tags',auth[_0x2edf('0x9')](),controller[_0x2edf('0x1c')]);module[_0x2edf('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 ce3c47a..04e35d2 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 _0xa15a=['STRING','TEXT','long','ENUM','out','sequelize','iconv','exports','BOOLEAN','DATE'];(function(_0x1ffa15,_0x5a407b){var _0x40dcad=function(_0x1ea0bc){while(--_0x1ea0bc){_0x1ffa15['push'](_0x1ffa15['shift']());}};_0x40dcad(++_0x5a407b);}(_0xa15a,0xb9));var _0xaa15=function(_0x1c4962,_0x4ca693){_0x1c4962=_0x1c4962-0x0;var _0x794a47=_0xa15a[_0x1c4962];return _0x794a47;};'use strict';var Sequelize=require(_0xaa15('0x0'));var iconv=require(_0xaa15('0x1'));module[_0xaa15('0x2')]={'closed':{'type':Sequelize[_0xaa15('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xaa15('0x4')]},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0xaa15('0x5')](0x1fe)},'to':{'type':Sequelize[_0xaa15('0x5')]},'cc':{'type':Sequelize[_0xaa15('0x6')](_0xaa15('0x7'))},'subject':{'type':Sequelize['TEXT']()},'attach':{'type':Sequelize[_0xaa15('0x3')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0xaa15('0x4')]},'substatus':{'type':Sequelize['STRING'](0x3c)},'substatusAt':{'type':Sequelize[_0xaa15('0x4')]},'firstMsgDirection':{'type':Sequelize[_0xaa15('0x8')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xaa15('0x4')]},'lastMsgDirection':{'type':Sequelize[_0xaa15('0x8')]('in',_0xaa15('0x9')),'defaultValue':'in','allowNull':![]},'lastMsgBody':{'type':Sequelize[_0xaa15('0x6')](_0xaa15('0x7'))},'lastMsgText':{'type':Sequelize['TEXT']('long')}};
\ No newline at end of file
+var _0x0271=['BOOLEAN','DATE','STRING','TEXT','long','ENUM','out','sequelize','exports'];(function(_0x295fe9,_0x345828){var _0x3b80df=function(_0x85b4dc){while(--_0x85b4dc){_0x295fe9['push'](_0x295fe9['shift']());}};_0x3b80df(++_0x345828);}(_0x0271,0x7c));var _0x1027=function(_0x235155,_0x369750){_0x235155=_0x235155-0x0;var _0x2432e3=_0x0271[_0x235155];return _0x2432e3;};'use strict';var Sequelize=require(_0x1027('0x0'));var iconv=require('iconv');module[_0x1027('0x1')]={'closed':{'type':Sequelize[_0x1027('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x1027('0x3')]},'disposition':{'type':Sequelize[_0x1027('0x4')]},'note':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0x1027('0x4')](0x1fe)},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x1027('0x5')](_0x1027('0x6'))},'subject':{'type':Sequelize[_0x1027('0x5')]()},'attach':{'type':Sequelize[_0x1027('0x2')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x1027('0x3')]},'substatus':{'type':Sequelize[_0x1027('0x4')](0x3c)},'substatusAt':{'type':Sequelize[_0x1027('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x1027('0x7')]('in',_0x1027('0x8')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x1027('0x3')]},'lastMsgDirection':{'type':Sequelize[_0x1027('0x7')]('in',_0x1027('0x8')),'defaultValue':'in','allowNull':![]},'lastMsgBody':{'type':Sequelize[_0x1027('0x5')](_0x1027('0x6'))},'lastMsgText':{'type':Sequelize[_0x1027('0x5')]('long')}};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.controller.js b/server/api/mailInteraction/mailInteraction.controller.js
index da8bea8..a420d3b 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 _0x46f4=['getMessages','format','YYYY-MM-DD\x20HH:mm:ss','findAll','addTags','setTags','spread','emit','mailInteractionTags:save','removeTags','download','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','Attachment','Messages','subject','each','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','bcc','headers','Bcc','Attachments','basename','build','writeFileSync','message%d.eml','log','err','unlinkSync','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','html-to-text','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailInteraction.socket','register','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','error','name','send','Users','map','fullname','Tags','split','forEach','push','MailInteraction','findOne','lastMsgBody','lastMsgText','trimStart','fromString','catch','index','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','select','field','color','from','tools_tags','u.id','u.fullname','user_has_mail_interactions','mail_interactions','left_join','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','users','o.id\x20=\x20i.UserId','a.id\x20=\x20i.MailAccountId','mail_messages','me.MailInteractionId\x20=\x20i.id','expr','search','parseSearch','sqlOperator','conditions','unreadMessages','value','having','`\x20>\x200','Contact','$substring','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','find','buildExpression','text','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','operator','UserId','start','plainBody','keys','some','isEmpty','MailAccountId','i.MailAccountId\x20IN\x20?','concat','createdAt','$gte','parse','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','read','`unreadMessages`\x20>\x200','tag','filter','replace','\x27\x27\x27\x27','isNumeric','isEmail','c.email\x20LIKE\x20?','MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','group','i.id','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','DESC','t.id\x20IN\x20?','resolve','journey','i.MailAccountId\x20IS\x20NOT\x20NULL','user','i.MailAccountId\x20IS\x20NULL','toString','sequelize','merge','fields','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','i.createdAt','i.updatedAt','i.closed','i.closedAt','i.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','i.disposition','i.substatus','i.ContactId','i.MailAccountId','c.firstName','c.lastName','Contact.lastName','c.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','GROUP_CONCAT(DISTINCT\x20t.id)','TagIds','ui.MailInteractionId\x20IN\x20?','MailInteractionId','Setting','enableEmailPreview','rows','show','params','includeAll','include','options','create','body','describe','addMessage','MailMessage','ids','omit'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0x46f4,0x115));var _0x446f=function(_0x1ad82b,_0x120c70){_0x1ad82b=_0x1ad82b-0x0;var _0x7c0138=_0x46f4[_0x1ad82b];return _0x7c0138;};'use strict';var pdf=require(_0x446f('0x0'));var emlformat=require(_0x446f('0x1'));var rimraf=require(_0x446f('0x2'));var zipdir=require(_0x446f('0x3'));var jsonpatch=require(_0x446f('0x4'));var rp=require(_0x446f('0x5'));var moment=require('moment');var BPromise=require(_0x446f('0x6'));var Mustache=require(_0x446f('0x7'));var util=require('util');var path=require(_0x446f('0x8'));var sox=require('sox');var csv=require(_0x446f('0x9'));var ejs=require(_0x446f('0xa'));var fs=require('fs');var _=require(_0x446f('0xb'));var squel=require(_0x446f('0xc'));var crypto=require(_0x446f('0xd'));var jsforce=require(_0x446f('0xe'));var deskjs=require(_0x446f('0xf'));var toCsv=require(_0x446f('0x9'));var querystring=require(_0x446f('0x10'));var Papa=require(_0x446f('0x11'));var htmlToText=require(_0x446f('0x12'));var Redis=require(_0x446f('0x13'));var authService=require(_0x446f('0x14'));var qs=require(_0x446f('0x15'));var as=require(_0x446f('0x16'));var hardwareService=require(_0x446f('0x17'));var logger=require(_0x446f('0x18'))(_0x446f('0x19'));var utils=require(_0x446f('0x1a'));var config=require('../../config/environment');var db=require(_0x446f('0x1b'))['db'];config[_0x446f('0x1c')]=_[_0x446f('0x1d')](config[_0x446f('0x1c')],{'host':_0x446f('0x1e'),'port':0x18eb});var socket=require(_0x446f('0x1f'))(new Redis(config[_0x446f('0x1c')]));require(_0x446f('0x20'))[_0x446f('0x21')](socket);function respondWithStatusCode(_0x22c25d,_0x562b98){_0x562b98=_0x562b98||0xcc;return function(_0x371b35){if(_0x371b35){return _0x22c25d[_0x446f('0x22')](_0x562b98);}return _0x22c25d[_0x446f('0x23')](_0x562b98)[_0x446f('0x24')]();};}function respondWithResult(_0x20a8ab,_0x2bac5f){_0x2bac5f=_0x2bac5f||0xc8;return function(_0x468cf4){if(_0x468cf4){return _0x20a8ab[_0x446f('0x23')](_0x2bac5f)[_0x446f('0x25')](_0x468cf4);}};}function respondWithFilteredResult(_0x17cc32,_0x1322f6){return function(_0x2433d9){if(_0x2433d9){var _0x3effad=_0x2433d9[_0x446f('0x26')],_0x456cf4=_0x1322f6[_0x446f('0x27')],_0x4d2639=_0x1322f6[_0x446f('0x27')]+_0x1322f6[_0x446f('0x28')],_0x4c0df5;if(_0x4d2639>=_0x3effad){_0x4d2639=_0x3effad;_0x4c0df5=0xc8;}else{_0x4c0df5=0xce;}_0x17cc32['status'](_0x4c0df5);return _0x17cc32[_0x446f('0x29')](_0x446f('0x2a'),_0x456cf4+'-'+_0x4d2639+'/'+_0x3effad)['json'](_0x2433d9);}return null;};}function patchUpdates(_0x473eaf){return function(_0x5ac28d){try{jsonpatch[_0x446f('0x2b')](_0x5ac28d,_0x473eaf,!![]);}catch(_0x30327c){return BPromise[_0x446f('0x2c')](_0x30327c);}return _0x5ac28d[_0x446f('0x2d')]();};}function saveUpdates(_0x2289f6,_0x5854f3){return function(_0x66ef2c){if(_0x66ef2c){return _0x66ef2c[_0x446f('0x2e')](_0x2289f6)[_0x446f('0x2f')](function(_0x604c19){return _0x604c19;});}return null;};}function removeEntity(_0xa6f427,_0x286c78){return function(_0x4622e7){if(_0x4622e7){return _0x4622e7['destroy']()[_0x446f('0x2f')](function(){_0xa6f427[_0x446f('0x23')](0xcc)[_0x446f('0x24')]();});}};}function handleEntityNotFound(_0x22493f,_0x53b4ab){return function(_0x5e1303){if(!_0x5e1303){_0x22493f[_0x446f('0x22')](0x194);}return _0x5e1303;};}function handleError(_0xcecebb,_0x546dd9){_0x546dd9=_0x546dd9||0x1f4;return function(_0x5e4d5d){logger[_0x446f('0x30')](_0x5e4d5d['stack']);if(_0x5e4d5d[_0x446f('0x31')]){delete _0x5e4d5d[_0x446f('0x31')];}_0xcecebb[_0x446f('0x23')](_0x546dd9)[_0x446f('0x32')](_0x5e4d5d);};}function getInteractionUsers(_0x4d7536,_0x2188a5){return new BPromise(function(_0x1b6dc9,_0x123579){try{if(_0x2188a5[_0x4d7536['id']]){_0x4d7536[_0x446f('0x33')]=_[_0x446f('0x34')](_0x2188a5[_0x4d7536['id']],function(_0x14aac3){return{'id':_0x14aac3['id'],'fullname':_0x14aac3[_0x446f('0x35')]};});}}catch(_0x4286f0){_0x123579(_0x4286f0);}_0x1b6dc9(_0x4d7536);});}function getInteractionTags(_0x1850d2,_0x44b7fc){return new BPromise(function(_0x5dcfe1,_0x3ef549){try{if(_0x1850d2['TagIds']){_0x1850d2[_0x446f('0x36')]=[];_0x1850d2['TagIds'][_0x446f('0x37')](',')[_0x446f('0x38')](function(_0x5f03f1){_0x1850d2[_0x446f('0x36')][_0x446f('0x39')](_0x44b7fc[_0x5f03f1]);});}delete _0x1850d2['TagIds'];}catch(_0x53bede){_0x3ef549(_0x53bede);}_0x5dcfe1(_0x1850d2);});}function getLastMessageText(_0x3035b0){return new BPromise(function(_0x1e30c7,_0x53c1d3){return db[_0x446f('0x3a')][_0x446f('0x3b')]({'where':{'id':_0x3035b0['id']},'attributes':[_0x446f('0x3c'),_0x446f('0x3d')],'raw':!![]})['then'](function(_0x3f7990){if(!_0x3f7990[_0x446f('0x3d')]){_0x3035b0['lastMsgText']=_[_0x446f('0x3e')](htmlToText[_0x446f('0x3f')](_0x3f7990[_0x446f('0x3c')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]}));}else{_0x3035b0[_0x446f('0x3d')]=_0x3f7990[_0x446f('0x3d')];}_0x1e30c7(_0x3035b0);})[_0x446f('0x40')](function(_0x16216a){_0x53c1d3(_0x16216a);});});}function updateMailInteraction(_0x56bf93,_0x26bd2a,_0x2e8e40,_0x1f9de0){return new BPromise(function(_0x5374c1,_0x2adb61){return getInteractionUsers(_0x56bf93,_0x2e8e40)['then'](function(_0x403fef){return getInteractionTags(_0x403fef,_0x26bd2a);})[_0x446f('0x2f')](function(_0x566671){if(_0x1f9de0){_0x5374c1(getLastMessageText(_0x566671));}else{_0x5374c1(_0x566671);}})[_0x446f('0x40')](function(_0x272501){_0x2adb61(_0x272501);});});}exports[_0x446f('0x41')]=function(_0xcf2ad8,_0x516b63){var _0x330526={},_0x63d3fe={},_0x3480d9={'count':0x0,'rows':[]};var _0x36b756=_[_0x446f('0x34')](db[_0x446f('0x3a')][_0x446f('0x42')],function(_0x25319f){return{'name':_0x25319f[_0x446f('0x43')],'type':_0x25319f[_0x446f('0x44')][_0x446f('0x45')]};});_0x63d3fe[_0x446f('0x46')]=_[_0x446f('0x34')](_0x36b756,_0x446f('0x31'));_0x63d3fe[_0x446f('0x47')]=_['keys'](_0xcf2ad8[_0x446f('0x47')]);_0x63d3fe[_0x446f('0x48')]=_[_0x446f('0x49')](_0x63d3fe[_0x446f('0x46')],_0x63d3fe[_0x446f('0x47')]);_0x330526[_0x446f('0x4a')]=_['intersection'](_0x63d3fe[_0x446f('0x46')],qs['fields'](_0xcf2ad8[_0x446f('0x47')]['fields']));_0x330526[_0x446f('0x4a')]=_0x330526[_0x446f('0x4a')][_0x446f('0x4b')]?_0x330526[_0x446f('0x4a')]:_0x63d3fe['model'];if(!_0xcf2ad8['query'][_0x446f('0x4c')](_0x446f('0x4d'))){_0x330526['limit']=qs[_0x446f('0x28')](_0xcf2ad8['query'][_0x446f('0x28')]);_0x330526[_0x446f('0x27')]=qs[_0x446f('0x27')](_0xcf2ad8[_0x446f('0x47')][_0x446f('0x27')]);}_0x330526[_0x446f('0x4e')]=qs['sort'](_0xcf2ad8[_0x446f('0x47')][_0x446f('0x4f')]);_0x330526[_0x446f('0x50')]=qs[_0x446f('0x48')](_[_0x446f('0x51')](_0xcf2ad8['query'],_0x63d3fe[_0x446f('0x48')]));var _0x52e02b=[];var _0xf2dd3c=squel[_0x446f('0x52')]()[_0x446f('0x53')]('id')[_0x446f('0x53')](_0x446f('0x31'))['field'](_0x446f('0x54'))[_0x446f('0x55')](_0x446f('0x56'));var _0x5aabc1=squel['select']()[_0x446f('0x53')](_0x446f('0x57'))['field'](_0x446f('0x58'))[_0x446f('0x53')]('ui.MailInteractionId')[_0x446f('0x55')](_0x446f('0x59'),'ui')['left_join']('users','u','u.id\x20=\x20ui.UserId');var _0x14d916=squel[_0x446f('0x52')]()['from'](_0x446f('0x5a'),'i')[_0x446f('0x5b')](_0x446f('0x5c'),'c',_0x446f('0x5d'))[_0x446f('0x5b')](_0x446f('0x5e'),'o',_0x446f('0x5f'))[_0x446f('0x5b')]('mail_accounts','a',_0x446f('0x60'))[_0x446f('0x5b')](_0x446f('0x61'),'me',_0x446f('0x62'))[_0x446f('0x5b')]('mail_interaction_has_tags','it','it.MailInteractionId\x20=\x20i.id')[_0x446f('0x5b')]('tools_tags','t','t.id\x20=\x20it.TagId');var _0x445d9f=squel[_0x446f('0x63')]();var _0x316d6d=[];var _0x4bf525=squel['expr']();var _0x3ed636;if(_0xcf2ad8[_0x446f('0x47')][_0x446f('0x64')]){_0x3ed636=as[_0x446f('0x65')](_0xcf2ad8[_0x446f('0x47')][_0x446f('0x64')]);var _0x117226=_0x3ed636[_0x446f('0x66')];for(var _0x4cef33=0x0;_0x4cef33<_0x3ed636[_0x446f('0x67')][_0x446f('0x4b')];_0x4cef33++){var _0x4e7282=_0x3ed636[_0x446f('0x67')][_0x4cef33];var _0x534550='i';var _0xd52f44=_['find'](_0x36b756,[_0x446f('0x31'),_0x4e7282[_0x446f('0x53')]]);if(!_0xd52f44){switch(_0x4e7282[_0x446f('0x53')]){case _0x446f('0x68'):if(_0x4e7282[_0x446f('0x69')]==0x1){_0x14d916[_0x446f('0x6a')]('`'+_0x4e7282[_0x446f('0x53')]+'`\x20=\x200');}else{_0x14d916[_0x446f('0x6a')]('`'+_0x4e7282[_0x446f('0x53')]+_0x446f('0x6b'));}break;case _0x446f('0x6c'):if(_0x4e7282['operator']===_0x446f('0x6d')){if(_0x4e7282[_0x446f('0x69')]['split']('\x20')[_0x446f('0x4b')]>0x1){_0x445d9f[_0x117226](_0x446f('0x6e'),qs[_0x446f('0x6f')](_0x4e7282[_0x446f('0x69')]),null);}else{var _0x23e720='%'+_0x4e7282[_0x446f('0x69')]+'%';_0x445d9f[_0x117226]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x23e720,_0x23e720,_0x23e720);}}else{_0xd52f44=_[_0x446f('0x70')](_0x36b756,[_0x446f('0x31'),'ContactId']);_0x4e7282[_0x446f('0x53')]='ContactId';_0x7e8eb=as[_0x446f('0x71')](_0x534550,_0xd52f44[_0x446f('0x44')],_0x4e7282);_0x445d9f[_0x117226](_0x7e8eb[_0x446f('0x72')],_0x7e8eb[_0x446f('0x69')]['start'],_0x7e8eb[_0x446f('0x69')]['end']);}break;case _0x446f('0x73'):var _0x1cc06e=_0x4e7282['value']['split'](',')['map'](function(_0x1ff059){return Number(_0x1ff059);});_0x1cc06e[_0x446f('0x38')](function(_0x201b8d){_0x4bf525['or'](_0x446f('0x74'),'%,'+_0x201b8d+',%');});_0x316d6d=_[_0x446f('0x75')](_0x316d6d,_0x1cc06e);break;case _0x446f('0x76'):if(_0x4e7282[_0x446f('0x77')]===_0x446f('0x6d')){_0x445d9f[_0x117226]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x4e7282[_0x446f('0x69')]+'%',null);}else{_0xd52f44=_['find'](_0x36b756,[_0x446f('0x31'),'UserId']);_0x4e7282[_0x446f('0x53')]=_0x446f('0x78');_0x7e8eb=as[_0x446f('0x71')](_0x534550,_0xd52f44['type'],_0x4e7282);_0x445d9f[_0x117226](_0x7e8eb[_0x446f('0x72')],_0x7e8eb[_0x446f('0x69')][_0x446f('0x79')],_0x7e8eb['value'][_0x446f('0x24')]);}break;case _0x446f('0x7a'):_0x7e8eb=as[_0x446f('0x71')]('me',null,_0x4e7282);_0x445d9f[_0x117226](_0x7e8eb['text'],_0x7e8eb[_0x446f('0x69')][_0x446f('0x79')],_0x7e8eb[_0x446f('0x69')][_0x446f('0x24')]);break;}}else{var _0x7e8eb=as[_0x446f('0x71')](_0x534550,_0xd52f44[_0x446f('0x44')],_0x4e7282);_0x445d9f[_0x117226](_0x7e8eb[_0x446f('0x72')],_0x7e8eb[_0x446f('0x69')][_0x446f('0x79')],_0x7e8eb['value'][_0x446f('0x24')]);}}}else{var _0x914b5a=_(_0xcf2ad8[_0x446f('0x47')])[_0x446f('0x7b')]()[_0x446f('0x34')](function(_0x3b49a9){return _[_0x446f('0x7c')](_0x36b756,['name',_0x3b49a9])?_0x3b49a9:undefined;})['compact']()[_0x446f('0x69')]();if(!_[_0x446f('0x7d')](_0x914b5a)){_0x914b5a['forEach'](function(_0x55e0b6){if(_0x55e0b6===_0x446f('0x7e')){_0x14d916[_0x446f('0x50')](_0x446f('0x7f'),[][_0x446f('0x80')](_0xcf2ad8[_0x446f('0x47')][_0x55e0b6]));}else if(_0x55e0b6===_0x446f('0x81')){var _0x32c48d=JSON['parse'](_0xcf2ad8[_0x446f('0x47')][_0x55e0b6])[_0x446f('0x82')];var _0x57e039=JSON[_0x446f('0x83')](_0xcf2ad8[_0x446f('0x47')][_0x55e0b6])['$lte'];_0x14d916['where'](_0x446f('0x84'),_0x32c48d,_0x57e039);}else{if(_0xcf2ad8[_0x446f('0x47')][_0x55e0b6]===_0x446f('0x85')){_0x14d916[_0x446f('0x50')]('i.'+_0x55e0b6+_0x446f('0x86'));}else{_0x14d916[_0x446f('0x50')]('i.'+_0x55e0b6+'\x20=\x20?',_0xcf2ad8['query'][_0x55e0b6]);}}});}if(_0xcf2ad8[_0x446f('0x47')][_0x446f('0x87')]){if(_0xcf2ad8[_0x446f('0x47')][_0x446f('0x87')]==0x1){_0x14d916['having']('`unreadMessages`\x20=\x200');}else{_0x14d916[_0x446f('0x6a')](_0x446f('0x88'));}}if(_0xcf2ad8[_0x446f('0x47')][_0x446f('0x89')]){_0x316d6d=_['isArray'](_0xcf2ad8[_0x446f('0x47')]['tag'])?_0xcf2ad8[_0x446f('0x47')][_0x446f('0x89')]:new Array(_0xcf2ad8[_0x446f('0x47')][_0x446f('0x89')]);_0x316d6d['forEach'](function(_0x2e8a51){_0x4bf525['or'](_0x446f('0x74'),'%,'+_0x2e8a51+',%');});}if(_0xcf2ad8[_0x446f('0x47')][_0x446f('0x8a')]){var _0x23d225=_0xcf2ad8[_0x446f('0x47')][_0x446f('0x8a')][_0x446f('0x8b')]('\x5c','\x5c\x5c')[_0x446f('0x8b')]('\x27\x27',_0x446f('0x8c'));if(qs[_0x446f('0x8d')](_0x23d225)){_0x445d9f['or']('i.id\x20LIKE\x20?',_0x23d225+'%');}else if(qs[_0x446f('0x8e')](_0x23d225)){_0x445d9f['or'](_0x446f('0x8f'),_0x23d225+'%');}else{_0x445d9f['or']('MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0x446f('0x6f')](_0x23d225))['or'](_0x446f('0x90'),qs[_0x446f('0x6f')](_0x23d225));}}}_0x14d916[_0x446f('0x50')](_0x445d9f);_0x14d916[_0x446f('0x91')](_0x446f('0x92'));var _0x327d06={'type':db['Sequelize'][_0x446f('0x93')][_0x446f('0x94')],'raw':!![]};var _0x2d31c8=_0x14d916[_0x446f('0x95')]();_0x2d31c8[_0x446f('0x53')](_0x446f('0x92'));_0x2d31c8[_0x446f('0x53')](_0x446f('0x96'),'unreadMessages');if(_0x330526[_0x446f('0x4e')]){_0x330526[_0x446f('0x4e')][_0x446f('0x38')](function(_0xdaaa64){_0x14d916['order']('i.'+_0xdaaa64[0x0],_0xdaaa64[0x1]===_0x446f('0x97')?![]:!![]);});}if(!_['isEmpty'](_0x316d6d)){_0x14d916[_0x446f('0x6a')](_0x4bf525);_0x2d31c8[_0x446f('0x50')](_0x446f('0x98'),_0x316d6d);}BPromise[_0x446f('0x99')]()[_0x446f('0x2f')](function(){if(!_0x3ed636){if(_0xcf2ad8[_0x446f('0x47')][_0x446f('0x7e')]||_0xcf2ad8[_0x446f('0x47')][_0x446f('0x9a')])return;_0x2d31c8[_0x446f('0x50')](_0x446f('0x9b'));_0x14d916[_0x446f('0x50')](_0x446f('0x9b'));return;}return _0xcf2ad8[_0x446f('0x9c')]['getMailAccounts']({'attributes':['id'],'raw':!![]})[_0x446f('0x2f')](function(_0x3cc92c){if(_[_0x446f('0x7d')](_0x3cc92c)){_0x2d31c8[_0x446f('0x50')](_0x446f('0x9d'));_0x14d916[_0x446f('0x50')](_0x446f('0x9d'));}else{_0x2d31c8[_0x446f('0x50')](_0x446f('0x7f'),_[_0x446f('0x34')](_0x3cc92c,'id'));_0x14d916[_0x446f('0x50')](_0x446f('0x7f'),_[_0x446f('0x34')](_0x3cc92c,'id'));}});})[_0x446f('0x2f')](function(){db['sequelize'][_0x446f('0x47')](_0x2d31c8[_0x446f('0x9e')](),_0x327d06)[_0x446f('0x2f')](function(_0x2bf4a0){_0x3480d9[_0x446f('0x26')]=_0x2bf4a0[_0x446f('0x4b')];if(_0x3480d9[_0x446f('0x26')]===0x0)return[];return db[_0x446f('0x9f')]['query'](_0xf2dd3c[_0x446f('0x9e')](),_0x327d06)[_0x446f('0x2f')](function(_0x256901){_0x52e02b=_['keyBy'](_0x256901,'id');_0x327d06=_[_0x446f('0xa0')](_0x327d06,{'model':db[_0x446f('0x3a')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0xcf2ad8[_0x446f('0x47')][_0x446f('0xa1')]){_0x330526[_0x446f('0x4a')][_0x446f('0x38')](function(_0x59f9ff){_0x14d916['field']('i.'+_0x59f9ff);});}else{_0x14d916['field'](_0x446f('0x96'),_0x446f('0x68'));_0x14d916[_0x446f('0x53')](_0x446f('0xa2'),_0x446f('0xa3'));_0x14d916[_0x446f('0x53')](_0x446f('0xa4'),_0x446f('0xa5'));_0x14d916[_0x446f('0x53')](_0x446f('0x92'));_0x14d916[_0x446f('0x53')](_0x446f('0xa6'));_0x14d916[_0x446f('0x53')](_0x446f('0xa7'));_0x14d916[_0x446f('0x53')](_0x446f('0xa8'));_0x14d916[_0x446f('0x53')](_0x446f('0xa9'));_0x14d916[_0x446f('0x53')](_0x446f('0xaa'));_0x14d916[_0x446f('0x53')](_0x446f('0xab'));_0x14d916['field'](_0x446f('0xac'));_0x14d916[_0x446f('0x53')](_0x446f('0xad'));_0x14d916[_0x446f('0x53')](_0x446f('0xae'));_0x14d916[_0x446f('0x53')](_0x446f('0xaf'));_0x14d916[_0x446f('0x53')]('i.to');_0x14d916[_0x446f('0x53')](_0x446f('0xb0'));_0x14d916['field'](_0x446f('0xb1'));_0x14d916['field']('i.UserId');_0x14d916[_0x446f('0x53')](_0x446f('0xb2'),'Contact.firstName');_0x14d916['field'](_0x446f('0xb3'),_0x446f('0xb4'));_0x14d916[_0x446f('0x53')](_0x446f('0xb5'),'Contact.email');_0x14d916['field'](_0x446f('0xb6'),_0x446f('0xb7'));_0x14d916[_0x446f('0x53')](_0x446f('0xb8'),_0x446f('0xb9'));_0x14d916[_0x446f('0x53')](_0x446f('0xba'),_0x446f('0xbb'));_0x14d916[_0x446f('0x53')](_0x446f('0xbc'),_0x446f('0xbd'));_0x14d916[_0x446f('0x53')]('o.internal','Owner.internal');_0x14d916['field'](_0x446f('0xbe'),_0x446f('0xbf'));}_0x14d916[_0x446f('0x28')](_0x330526[_0x446f('0x28')]);_0x14d916['offset'](_0x330526[_0x446f('0x27')]);return db[_0x446f('0x9f')]['query'](_0x14d916['toString'](),_0x327d06);})[_0x446f('0x2f')](function(_0x253064){_0x5aabc1['where'](_0x446f('0xc0'),_[_0x446f('0x34')](_0x253064,'id'));return db[_0x446f('0x9f')][_0x446f('0x47')](_0x5aabc1['toString'](),_0x327d06)['then'](function(_0x11f18d){var _0xcb91a=_['groupBy'](_0x11f18d,_0x446f('0xc1'));var _0x3d1680=[];return db[_0x446f('0xc2')][_0x446f('0x3b')]({'attributes':[_0x446f('0xc3')],'raw':!![]})[_0x446f('0x2f')](function(_0x51ab92){var _0x54668c=_0x51ab92['enableEmailPreview'];_0x253064[_0x446f('0x38')](function(_0x2031cd){_0x3d1680['push'](updateMailInteraction(_0x2031cd,_0x52e02b,_0xcb91a,_0x54668c));});return BPromise['all'](_0x3d1680);});});});})[_0x446f('0x2f')](function(_0x4b0e5a){_0x3480d9[_0x446f('0xc4')]=_0x4b0e5a;return _0x3480d9;})[_0x446f('0x2f')](respondWithFilteredResult(_0x516b63,_0x330526));})[_0x446f('0x40')](handleError(_0x516b63,null));};exports[_0x446f('0xc5')]=function(_0x574ce5,_0x42365d){var _0x11a6f3={'raw':![],'where':{'id':_0x574ce5[_0x446f('0xc6')]['id']}},_0x377ce5={};_0x377ce5[_0x446f('0x46')]=_[_0x446f('0x7b')](db[_0x446f('0x3a')][_0x446f('0x42')]);_0x377ce5[_0x446f('0x47')]=_[_0x446f('0x7b')](_0x574ce5[_0x446f('0x47')]);_0x377ce5[_0x446f('0x48')]=_['intersection'](_0x377ce5[_0x446f('0x46')],_0x377ce5[_0x446f('0x47')]);_0x11a6f3[_0x446f('0x4a')]=_['intersection'](_0x377ce5[_0x446f('0x46')],qs[_0x446f('0xa1')](_0x574ce5[_0x446f('0x47')][_0x446f('0xa1')]));_0x11a6f3['attributes']=_0x11a6f3['attributes'][_0x446f('0x4b')]?_0x11a6f3[_0x446f('0x4a')]:_0x377ce5[_0x446f('0x46')];if(_0x574ce5[_0x446f('0x47')][_0x446f('0xc7')]){_0x11a6f3[_0x446f('0xc8')]=[{'all':!![]}];}_0x11a6f3=_[_0x446f('0xa0')]({},_0x11a6f3,_0x574ce5[_0x446f('0xc9')]);return db[_0x446f('0x3a')][_0x446f('0x70')](_0x11a6f3)['then'](handleEntityNotFound(_0x42365d,null))['then'](respondWithResult(_0x42365d,null))[_0x446f('0x40')](handleError(_0x42365d,null));};exports[_0x446f('0xca')]=function(_0x414a15,_0x2f507b){return db[_0x446f('0x3a')]['create'](_0x414a15[_0x446f('0xcb')],{})[_0x446f('0x2f')](respondWithResult(_0x2f507b,0xc9))[_0x446f('0x40')](handleError(_0x2f507b,null));};exports[_0x446f('0x2e')]=function(_0x37f100,_0xfd85f0){if(_0x37f100['body']['id']){delete _0x37f100[_0x446f('0xcb')]['id'];}return db[_0x446f('0x3a')][_0x446f('0x70')]({'where':{'id':_0x37f100[_0x446f('0xc6')]['id']}})[_0x446f('0x2f')](handleEntityNotFound(_0xfd85f0,null))[_0x446f('0x2f')](saveUpdates(_0x37f100[_0x446f('0xcb')],null))[_0x446f('0x2f')](respondWithResult(_0xfd85f0,null))['catch'](handleError(_0xfd85f0,null));};exports['destroy']=function(_0x1100db,_0x52762b){return db[_0x446f('0x3a')][_0x446f('0x70')]({'where':{'id':_0x1100db['params']['id']}})[_0x446f('0x2f')](handleEntityNotFound(_0x52762b,null))[_0x446f('0x2f')](removeEntity(_0x52762b,null))[_0x446f('0x40')](handleError(_0x52762b,null));};exports[_0x446f('0xcc')]=function(_0x5d1774,_0x187f0a){return db[_0x446f('0x3a')]['describe']()[_0x446f('0x2f')](respondWithResult(_0x187f0a,null))[_0x446f('0x40')](handleError(_0x187f0a,null));};exports[_0x446f('0xcd')]=function(_0xa7542,_0x3f789d,_0x5a1b4e){return db[_0x446f('0xce')][_0x446f('0x70')]({'where':{'id':_0xa7542[_0x446f('0xc6')]['id']}})[_0x446f('0x2f')](handleEntityNotFound(_0x3f789d,null))[_0x446f('0x2f')](function(_0x5f0f14){if(_0x5f0f14){return _0x5f0f14['addMessage'](_0xa7542[_0x446f('0xcb')][_0x446f('0xcf')],_[_0x446f('0xd0')](_0xa7542['body'],[_0x446f('0xcf'),'id'])||{});}})['then'](respondWithResult(_0x3f789d,null))[_0x446f('0x40')](handleError(_0x3f789d,null));};exports[_0x446f('0xd1')]=function(_0x12d74f,_0x15eefe,_0x6a3cbe){var _0x2d09d3={'raw':![],'where':{}};var _0x466911={};var _0x16e6db={'count':0x0,'rows':[]};return db['MailInteraction']['findOne']({'where':{'id':_0x12d74f[_0x446f('0xc6')]['id']}})['then'](handleEntityNotFound(_0x15eefe,null))[_0x446f('0x2f')](function(_0x48cfeb){if(_0x48cfeb){_0x466911[_0x446f('0x46')]=_['keys'](db[_0x446f('0xce')][_0x446f('0x42')]);_0x466911['query']=_[_0x446f('0x7b')](_0x12d74f[_0x446f('0x47')]);_0x466911[_0x446f('0x48')]=_['intersection'](_0x466911[_0x446f('0x46')],_0x466911[_0x446f('0x47')]);_0x2d09d3[_0x446f('0x4a')]=_['intersection'](_0x466911['model'],qs[_0x446f('0xa1')](_0x12d74f[_0x446f('0x47')]['fields']));_0x2d09d3[_0x446f('0x4a')]=_0x2d09d3[_0x446f('0x4a')][_0x446f('0x4b')]?_0x2d09d3['attributes']:_0x466911[_0x446f('0x46')];if(!_0x12d74f[_0x446f('0x47')]['hasOwnProperty'](_0x446f('0x4d'))){_0x2d09d3['limit']=qs[_0x446f('0x28')](_0x12d74f[_0x446f('0x47')][_0x446f('0x28')]);_0x2d09d3['offset']=qs[_0x446f('0x27')](_0x12d74f[_0x446f('0x47')][_0x446f('0x27')]);}_0x2d09d3['order']=qs[_0x446f('0x4f')](_0x12d74f[_0x446f('0x47')]['sort']);_0x2d09d3['where']=qs['filters'](_[_0x446f('0x51')](_0x12d74f[_0x446f('0x47')],_0x466911[_0x446f('0x48')]));_0x2d09d3['where'][_0x446f('0xc1')]=_0x48cfeb['id'];if(_0x12d74f['query'][_0x446f('0x8a')]){_0x2d09d3[_0x446f('0x50')]=_[_0x446f('0xa0')](_0x2d09d3[_0x446f('0x50')],{'$or':_[_0x446f('0x34')](_0x2d09d3[_0x446f('0x4a')],function(_0x38d7ae){var _0x1da05a={};_0x1da05a[_0x38d7ae]={'$like':'%'+_0x12d74f[_0x446f('0x47')]['filter']+'%'};return _0x1da05a;})});}if(_0x12d74f['query'][_0x446f('0x82')]){var _0x12da25=_0x12d74f[_0x446f('0x47')][_0x446f('0x82')][_0x446f('0x37')](',');var _0x2fa158={};_0x2fa158[_0x12da25[0x0]]={'$gte':moment(_0x12da25[0x1])[_0x446f('0xd2')](_0x446f('0xd3'))};_0x2d09d3[_0x446f('0x50')]=_[_0x446f('0xa0')](_0x2d09d3['where'],_0x2fa158);}_0x2d09d3=_[_0x446f('0xa0')]({},_0x2d09d3,_0x12d74f[_0x446f('0xc9')]);return db[_0x446f('0xce')]['count']({'where':_0x2d09d3[_0x446f('0x50')]})[_0x446f('0x2f')](function(_0x40a373){_0x16e6db[_0x446f('0x26')]=_0x40a373;if(_0x12d74f[_0x446f('0x47')]['includeAll']){_0x2d09d3['include']=[{'all':!![]}];}return db[_0x446f('0xce')][_0x446f('0xd4')](_0x2d09d3);})[_0x446f('0x2f')](function(_0x4019a5){_0x16e6db[_0x446f('0xc4')]=_0x4019a5;return _0x16e6db;});}})[_0x446f('0x2f')](respondWithFilteredResult(_0x15eefe,_0x2d09d3))[_0x446f('0x40')](handleError(_0x15eefe,null));};exports[_0x446f('0xd5')]=function(_0x590920,_0x3587f6,_0x5b7b4c){return db['MailInteraction'][_0x446f('0x70')]({'where':{'id':_0x590920['params']['id']}})['then'](handleEntityNotFound(_0x3587f6,null))[_0x446f('0x2f')](function(_0x5da15e){if(_0x5da15e){return _0x5da15e[_0x446f('0xd6')](_0x590920[_0x446f('0xcb')][_0x446f('0xcf')],_['omit'](_0x590920['body'],['ids','id'])||{})[_0x446f('0xd7')](function(){return db['Tag'][_0x446f('0xd4')]({'attributes':['id',_0x446f('0x31'),_0x446f('0x54')],'where':{'id':_0x590920[_0x446f('0xcb')][_0x446f('0xcf')]}});})[_0x446f('0x2f')](function(_0x3be807){socket[_0x446f('0xd8')](_0x446f('0xd9'),{'id':Number(_0x590920[_0x446f('0xc6')]['id']),'tags':_0x3be807||[]});return{'id':Number(_0x590920[_0x446f('0xc6')]['id']),'tags':_0x3be807||[]};});}})[_0x446f('0x2f')](respondWithResult(_0x3587f6,null))['catch'](handleError(_0x3587f6,null));};exports[_0x446f('0xda')]=function(_0x332d1e,_0x4814db,_0x418544){return db[_0x446f('0x3a')]['find']({'where':{'id':_0x332d1e[_0x446f('0xc6')]['id']}})[_0x446f('0x2f')](handleEntityNotFound(_0x4814db,null))[_0x446f('0x2f')](function(_0x556f5d){if(_0x556f5d){return _0x556f5d[_0x446f('0xda')](_0x332d1e[_0x446f('0x47')][_0x446f('0xcf')]);}})[_0x446f('0x2f')](respondWithStatusCode(_0x4814db,null))[_0x446f('0x40')](handleError(_0x4814db,null));};exports[_0x446f('0xdb')]=function(_0x4e491c,_0xa47191){var _0x40d675=moment()['unix']()['toString']();var _0x13e1e8=path[_0x446f('0xdc')](config[_0x446f('0xdd')],_0x446f('0xde'),_0x446f('0xdf'),_0x446f('0xe0'));var _0x3c84ac=path['join'](config['root'],'server',_0x446f('0xdf'),_0x446f('0xe1'));var _0x1e0407=path[_0x446f('0xdc')](_0x13e1e8,_0x40d675);var _0x3301d5=util[_0x446f('0xd2')](_0x446f('0xe2'),_0x4e491c[_0x446f('0xc6')]['id'],_0x40d675);var _0x310275=path[_0x446f('0xdc')](_0x13e1e8,_0x3301d5);var _0x1d573f=[];if(_0x4e491c['query'][_0x446f('0xe1')]){_0x1d573f['push']({'model':db[_0x446f('0xe3')],'as':'Attachments','raw':!![]});}var _0x5998d9=[{'model':db[_0x446f('0xce')],'as':_0x446f('0xe4'),'attributes':['id',_0x446f('0xcb'),'from','to','cc','bcc',_0x446f('0xe5'),_0x446f('0x81')],'where':{'secret':![]},'order':qs[_0x446f('0x4f')]('id'),'include':_0x1d573f}];return db[_0x446f('0x3a')]['find']({'where':{'id':_0x4e491c[_0x446f('0xc6')]['id']},'include':_0x5998d9})[_0x446f('0x2f')](handleEntityNotFound(_0xa47191,null))['then'](function(_0x29e715){if(_0x29e715&&_0x29e715['Messages']){var _0x3011df=_0x29e715['get']({'plain':!![]});fs['mkdirSync'](_0x1e0407);return BPromise[_0x446f('0xe6')](_0x3011df[_0x446f('0xe4')],function(_0x203ebb,_0x2573a3){var _0x52566b={'from':_0x203ebb['from'],'to':_0x203ebb['to'],'subject':_0x203ebb[_0x446f('0xe5')],'html':_0x203ebb[_0x446f('0xcb')],'headers':{'Date':moment(_0x203ebb[_0x446f('0x81')])[_0x446f('0xd2')](_0x446f('0xe7'))},'attachments':[]};if(_0x203ebb['cc']){_0x52566b['headers']['Cc']=_0x203ebb['cc'];}if(_0x203ebb[_0x446f('0xe8')]){_0x52566b[_0x446f('0xe9')][_0x446f('0xea')]=_0x203ebb['bcc'];}return new BPromise(function(_0xf0ea61,_0x15a8d6){if(_0x203ebb[_0x446f('0xeb')]){for(var _0x35bf9e=0x0;_0x35bf9e<_0x203ebb[_0x446f('0xeb')][_0x446f('0x4b')];_0x35bf9e++){var _0x1e2421=_0x203ebb[_0x446f('0xeb')][_0x35bf9e];var _0x1a6108=path[_0x446f('0xdc')](_0x3c84ac,_0x1e2421[_0x446f('0xec')]);if(fs['existsSync'](_0x1a6108)){_0x52566b['attachments']['push']({'name':_0x1e2421['name'],'contentType':_0x1e2421['type'],'data':fs['readFileSync'](_0x1a6108)});}}}emlformat[_0x446f('0xed')](_0x52566b,function(_0x1a0ac0,_0x1f2c55){if(_0x1a0ac0)return _0x15a8d6(_0x1a0ac0);fs[_0x446f('0xee')](path[_0x446f('0xdc')](_0x1e0407,util['format'](_0x446f('0xef'),_0x2573a3)),_0x1f2c55);return _0xf0ea61(_0x1f2c55);});});})['then'](function(){return new BPromise(function(_0x5b0ed7,_0x5521ef){zipdir(_0x1e0407,{'saveTo':_0x310275},function(_0x4f1b68,_0x3a6354){if(_0x4f1b68)return _0x5521ef(_0x4f1b68);return _0x5b0ed7(_0x3a6354);});})[_0x446f('0x2f')](function(){return new BPromise(function(_0x2d9990,_0x566a9c){rimraf(_0x1e0407,function(_0x3d1a9b){if(_0x3d1a9b)_0x566a9c(_0x3d1a9b);return _0x2d9990();});});})[_0x446f('0x2f')](function(){return _0xa47191['download'](_0x310275,_0x3301d5,function(_0x3142f9){if(_0x3142f9){console[_0x446f('0xf0')](_0x446f('0xf1'),_0x3142f9);}else{fs[_0x446f('0xf2')](_0x310275);}});});});}else{return _0xa47191['sendStatus'](0xc8);}})[_0x446f('0x40')](handleError(_0xa47191,null));};
\ No newline at end of file
+var _0xa991=['send','Users','map','fullname','TagIds','split','forEach','Tags','push','MailInteraction','findOne','lastMsgBody','lastMsgText','trimStart','fromString','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','offset','order','sort','where','pick','select','field','color','u.id','u.fullname','ui.MailInteractionId','from','user_has_mail_interactions','left_join','users','mail_interactions','cm_contacts','a.id\x20=\x20i.MailAccountId','mail_interaction_has_tags','tools_tags','t.id\x20=\x20it.TagId','expr','parseSearch','sqlOperator','conditions','length','find','value','having','`\x20=\x200','Contact','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','start','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','plainBody','some','compact','isEmpty','i.MailAccountId\x20IN\x20?','createdAt','parse','$gte','$lte','null','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','isArray','filter','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','isEmail','MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','group','i.id','Sequelize','QueryTypes','SELECT','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages','DESC','t.id\x20IN\x20?','resolve','MailAccountId','journey','user','getMailAccounts','i.MailAccountId\x20IS\x20NULL','sequelize','toString','merge','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','i.createdAt','i.updatedAt','i.closedAt','i.attach','i.subject','i.disposition','i.to','i.ContactId','i.MailAccountId','i.UserId','c.firstName','Contact.firstName','c.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','groupBy','enableEmailPreview','all','show','params','includeAll','include','options','catch','create','body','destroy','describe','MailMessage','addMessage','omit','ids','getMessages','nolimit','MailInteractionId','findAll','rows','addTags','setTags','spread','emit','mailInteractionTags:save','removeTags','download','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','Attachment','Messages','bcc','subject','get','format','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','Attachments','basename','existsSync','build','writeFileSync','message%d.eml','unlinkSync','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailInteraction.socket','status','end','count','limit','set','Content-Range','json','reject','save','update','then','sendStatus','error','name'];(function(_0x568f96,_0x32d489){var _0x5a053a=function(_0x5570ce){while(--_0x5570ce){_0x568f96['push'](_0x568f96['shift']());}};_0x5a053a(++_0x32d489);}(_0xa991,0xc0));var _0x1a99=function(_0x6cf19c,_0x2f3f02){_0x6cf19c=_0x6cf19c-0x0;var _0xce14f3=_0xa991[_0x6cf19c];return _0xce14f3;};'use strict';var pdf=require(_0x1a99('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x1a99('0x1'));var zipdir=require(_0x1a99('0x2'));var jsonpatch=require(_0x1a99('0x3'));var rp=require(_0x1a99('0x4'));var moment=require(_0x1a99('0x5'));var BPromise=require(_0x1a99('0x6'));var Mustache=require(_0x1a99('0x7'));var util=require(_0x1a99('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x1a99('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x1a99('0xa'));var squel=require('squel');var crypto=require(_0x1a99('0xb'));var jsforce=require(_0x1a99('0xc'));var deskjs=require(_0x1a99('0xd'));var toCsv=require('to-csv');var querystring=require(_0x1a99('0xe'));var Papa=require('papaparse');var htmlToText=require('html-to-text');var Redis=require(_0x1a99('0xf'));var authService=require(_0x1a99('0x10'));var qs=require(_0x1a99('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x1a99('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x1a99('0x13'))['db'];config[_0x1a99('0x14')]=_[_0x1a99('0x15')](config['redis'],{'host':_0x1a99('0x16'),'port':0x18eb});var socket=require(_0x1a99('0x17'))(new Redis(config[_0x1a99('0x14')]));require(_0x1a99('0x18'))['register'](socket);function respondWithStatusCode(_0x5944be,_0x19f58){_0x19f58=_0x19f58||0xcc;return function(_0x1f0f54){if(_0x1f0f54){return _0x5944be['sendStatus'](_0x19f58);}return _0x5944be[_0x1a99('0x19')](_0x19f58)[_0x1a99('0x1a')]();};}function respondWithResult(_0x13521d,_0x4fbdee){_0x4fbdee=_0x4fbdee||0xc8;return function(_0x4d0ba0){if(_0x4d0ba0){return _0x13521d[_0x1a99('0x19')](_0x4fbdee)['json'](_0x4d0ba0);}};}function respondWithFilteredResult(_0x430151,_0x9a3fe6){return function(_0x3d8ef5){if(_0x3d8ef5){var _0x3dc6b5=_0x3d8ef5[_0x1a99('0x1b')],_0x3146d0=_0x9a3fe6['offset'],_0x163dfe=_0x9a3fe6['offset']+_0x9a3fe6[_0x1a99('0x1c')],_0x75fba6;if(_0x163dfe>=_0x3dc6b5){_0x163dfe=_0x3dc6b5;_0x75fba6=0xc8;}else{_0x75fba6=0xce;}_0x430151['status'](_0x75fba6);return _0x430151[_0x1a99('0x1d')](_0x1a99('0x1e'),_0x3146d0+'-'+_0x163dfe+'/'+_0x3dc6b5)[_0x1a99('0x1f')](_0x3d8ef5);}return null;};}function patchUpdates(_0xf31155){return function(_0x2a874b){try{jsonpatch['apply'](_0x2a874b,_0xf31155,!![]);}catch(_0x3812c4){return BPromise[_0x1a99('0x20')](_0x3812c4);}return _0x2a874b[_0x1a99('0x21')]();};}function saveUpdates(_0x408406,_0x2167a1){return function(_0x397d0a){if(_0x397d0a){return _0x397d0a[_0x1a99('0x22')](_0x408406)['then'](function(_0x2082d3){return _0x2082d3;});}return null;};}function removeEntity(_0x1db7f0,_0x5ae821){return function(_0x439fb5){if(_0x439fb5){return _0x439fb5['destroy']()[_0x1a99('0x23')](function(){_0x1db7f0['status'](0xcc)[_0x1a99('0x1a')]();});}};}function handleEntityNotFound(_0x9ea715,_0x1263ed){return function(_0x9c288a){if(!_0x9c288a){_0x9ea715[_0x1a99('0x24')](0x194);}return _0x9c288a;};}function handleError(_0x547185,_0x335fa0){_0x335fa0=_0x335fa0||0x1f4;return function(_0x4b69e5){logger[_0x1a99('0x25')](_0x4b69e5['stack']);if(_0x4b69e5['name']){delete _0x4b69e5[_0x1a99('0x26')];}_0x547185['status'](_0x335fa0)[_0x1a99('0x27')](_0x4b69e5);};}function getInteractionUsers(_0xe69dd6,_0x589a80){return new BPromise(function(_0x5f561b,_0x2d08bc){try{if(_0x589a80[_0xe69dd6['id']]){_0xe69dd6[_0x1a99('0x28')]=_[_0x1a99('0x29')](_0x589a80[_0xe69dd6['id']],function(_0x38c5f4){return{'id':_0x38c5f4['id'],'fullname':_0x38c5f4[_0x1a99('0x2a')]};});}}catch(_0x4eb491){_0x2d08bc(_0x4eb491);}_0x5f561b(_0xe69dd6);});}function getInteractionTags(_0x6c4e92,_0x44a1b7){return new BPromise(function(_0x41b1b7,_0x39b379){try{if(_0x6c4e92[_0x1a99('0x2b')]){_0x6c4e92['Tags']=[];_0x6c4e92[_0x1a99('0x2b')][_0x1a99('0x2c')](',')[_0x1a99('0x2d')](function(_0x483dcc){_0x6c4e92[_0x1a99('0x2e')][_0x1a99('0x2f')](_0x44a1b7[_0x483dcc]);});}delete _0x6c4e92[_0x1a99('0x2b')];}catch(_0x29de1e){_0x39b379(_0x29de1e);}_0x41b1b7(_0x6c4e92);});}function getLastMessageText(_0x1bc117){return new BPromise(function(_0x198489,_0x3c5fbf){return db[_0x1a99('0x30')][_0x1a99('0x31')]({'where':{'id':_0x1bc117['id']},'attributes':[_0x1a99('0x32'),_0x1a99('0x33')],'raw':!![]})[_0x1a99('0x23')](function(_0x27016a){if(!_0x27016a[_0x1a99('0x33')]){_0x1bc117[_0x1a99('0x33')]=_[_0x1a99('0x34')](htmlToText[_0x1a99('0x35')](_0x27016a[_0x1a99('0x32')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]}));}else{_0x1bc117[_0x1a99('0x33')]=_0x27016a['lastMsgText'];}_0x198489(_0x1bc117);})['catch'](function(_0xf2df38){_0x3c5fbf(_0xf2df38);});});}function updateMailInteraction(_0x17615f,_0x1cada5,_0x1f62d2,_0x426e4b){return new BPromise(function(_0xaf5b45,_0x2ca9ff){return getInteractionUsers(_0x17615f,_0x1f62d2)['then'](function(_0x252c66){return getInteractionTags(_0x252c66,_0x1cada5);})['then'](function(_0x4fb4bc){if(_0x426e4b){_0xaf5b45(getLastMessageText(_0x4fb4bc));}else{_0xaf5b45(_0x4fb4bc);}})['catch'](function(_0xf5a8a0){_0x2ca9ff(_0xf5a8a0);});});}exports['index']=function(_0x506791,_0x431fac){var _0x5d3163={},_0x575f01={},_0x31caea={'count':0x0,'rows':[]};var _0x2a0ffe=_['map'](db[_0x1a99('0x30')][_0x1a99('0x36')],function(_0x1540b4){return{'name':_0x1540b4[_0x1a99('0x37')],'type':_0x1540b4[_0x1a99('0x38')][_0x1a99('0x39')]};});_0x575f01['model']=_[_0x1a99('0x29')](_0x2a0ffe,_0x1a99('0x26'));_0x575f01[_0x1a99('0x3a')]=_[_0x1a99('0x3b')](_0x506791[_0x1a99('0x3a')]);_0x575f01[_0x1a99('0x3c')]=_[_0x1a99('0x3d')](_0x575f01[_0x1a99('0x3e')],_0x575f01[_0x1a99('0x3a')]);_0x5d3163[_0x1a99('0x3f')]=_[_0x1a99('0x3d')](_0x575f01['model'],qs['fields'](_0x506791[_0x1a99('0x3a')][_0x1a99('0x40')]));_0x5d3163[_0x1a99('0x3f')]=_0x5d3163[_0x1a99('0x3f')]['length']?_0x5d3163[_0x1a99('0x3f')]:_0x575f01[_0x1a99('0x3e')];if(!_0x506791['query'][_0x1a99('0x41')]('nolimit')){_0x5d3163[_0x1a99('0x1c')]=qs[_0x1a99('0x1c')](_0x506791['query'][_0x1a99('0x1c')]);_0x5d3163[_0x1a99('0x42')]=qs['offset'](_0x506791[_0x1a99('0x3a')][_0x1a99('0x42')]);}_0x5d3163[_0x1a99('0x43')]=qs[_0x1a99('0x44')](_0x506791['query']['sort']);_0x5d3163[_0x1a99('0x45')]=qs[_0x1a99('0x3c')](_[_0x1a99('0x46')](_0x506791[_0x1a99('0x3a')],_0x575f01['filters']));var _0x472167=[];var _0x14c52a=squel[_0x1a99('0x47')]()['field']('id')[_0x1a99('0x48')](_0x1a99('0x26'))[_0x1a99('0x48')](_0x1a99('0x49'))['from']('tools_tags');var _0xd721f8=squel[_0x1a99('0x47')]()[_0x1a99('0x48')](_0x1a99('0x4a'))[_0x1a99('0x48')](_0x1a99('0x4b'))[_0x1a99('0x48')](_0x1a99('0x4c'))[_0x1a99('0x4d')](_0x1a99('0x4e'),'ui')[_0x1a99('0x4f')](_0x1a99('0x50'),'u','u.id\x20=\x20ui.UserId');var _0x137838=squel[_0x1a99('0x47')]()[_0x1a99('0x4d')](_0x1a99('0x51'),'i')[_0x1a99('0x4f')](_0x1a99('0x52'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x1a99('0x4f')](_0x1a99('0x50'),'o','o.id\x20=\x20i.UserId')[_0x1a99('0x4f')]('mail_accounts','a',_0x1a99('0x53'))[_0x1a99('0x4f')]('mail_messages','me','me.MailInteractionId\x20=\x20i.id')['left_join'](_0x1a99('0x54'),'it','it.MailInteractionId\x20=\x20i.id')['left_join'](_0x1a99('0x55'),'t',_0x1a99('0x56'));var _0x21babb=squel[_0x1a99('0x57')]();var _0x7328b7=[];var _0x263679=squel[_0x1a99('0x57')]();var _0x405435;if(_0x506791[_0x1a99('0x3a')]['search']){_0x405435=as[_0x1a99('0x58')](_0x506791[_0x1a99('0x3a')]['search']);var _0x288e8e=_0x405435[_0x1a99('0x59')];for(var _0x5cb756=0x0;_0x5cb756<_0x405435[_0x1a99('0x5a')][_0x1a99('0x5b')];_0x5cb756++){var _0x1738c2=_0x405435[_0x1a99('0x5a')][_0x5cb756];var _0x54d0bc='i';var _0x328f1a=_[_0x1a99('0x5c')](_0x2a0ffe,[_0x1a99('0x26'),_0x1738c2[_0x1a99('0x48')]]);if(!_0x328f1a){switch(_0x1738c2[_0x1a99('0x48')]){case'unreadMessages':if(_0x1738c2[_0x1a99('0x5d')]==0x1){_0x137838[_0x1a99('0x5e')]('`'+_0x1738c2[_0x1a99('0x48')]+_0x1a99('0x5f'));}else{_0x137838[_0x1a99('0x5e')]('`'+_0x1738c2['field']+'`\x20>\x200');}break;case _0x1a99('0x60'):if(_0x1738c2['operator']==='$substring'){if(_0x1738c2[_0x1a99('0x5d')]['split']('\x20')[_0x1a99('0x5b')]>0x1){_0x21babb[_0x288e8e](_0x1a99('0x61'),qs['getFullTextValue'](_0x1738c2[_0x1a99('0x5d')]),null);}else{var _0xd7c3bd='%'+_0x1738c2['value']+'%';_0x21babb[_0x288e8e](_0x1a99('0x62'),_0xd7c3bd,_0xd7c3bd,_0xd7c3bd);}}else{_0x328f1a=_['find'](_0x2a0ffe,[_0x1a99('0x26'),_0x1a99('0x63')]);_0x1738c2[_0x1a99('0x48')]=_0x1a99('0x63');_0x5917f0=as[_0x1a99('0x64')](_0x54d0bc,_0x328f1a['type'],_0x1738c2);_0x21babb[_0x288e8e](_0x5917f0[_0x1a99('0x65')],_0x5917f0[_0x1a99('0x5d')][_0x1a99('0x66')],_0x5917f0[_0x1a99('0x5d')][_0x1a99('0x1a')]);}break;case'Tag':var _0x5b71c6=_0x1738c2['value'][_0x1a99('0x2c')](',')[_0x1a99('0x29')](function(_0x245faa){return Number(_0x245faa);});_0x5b71c6[_0x1a99('0x2d')](function(_0xc0357e){_0x263679['or'](_0x1a99('0x67'),'%,'+_0xc0357e+',%');});_0x7328b7=_[_0x1a99('0x68')](_0x7328b7,_0x5b71c6);break;case _0x1a99('0x69'):if(_0x1738c2['operator']==='$substring'){_0x21babb[_0x288e8e](_0x1a99('0x6a'),'%'+_0x1738c2['value']+'%',null);}else{_0x328f1a=_[_0x1a99('0x5c')](_0x2a0ffe,[_0x1a99('0x26'),_0x1a99('0x6b')]);_0x1738c2[_0x1a99('0x48')]=_0x1a99('0x6b');_0x5917f0=as[_0x1a99('0x64')](_0x54d0bc,_0x328f1a['type'],_0x1738c2);_0x21babb[_0x288e8e](_0x5917f0[_0x1a99('0x65')],_0x5917f0[_0x1a99('0x5d')][_0x1a99('0x66')],_0x5917f0[_0x1a99('0x5d')][_0x1a99('0x1a')]);}break;case _0x1a99('0x6c'):_0x5917f0=as['buildExpression']('me',null,_0x1738c2);_0x21babb[_0x288e8e](_0x5917f0[_0x1a99('0x65')],_0x5917f0[_0x1a99('0x5d')]['start'],_0x5917f0[_0x1a99('0x5d')]['end']);break;}}else{var _0x5917f0=as[_0x1a99('0x64')](_0x54d0bc,_0x328f1a[_0x1a99('0x38')],_0x1738c2);_0x21babb[_0x288e8e](_0x5917f0[_0x1a99('0x65')],_0x5917f0[_0x1a99('0x5d')][_0x1a99('0x66')],_0x5917f0[_0x1a99('0x5d')][_0x1a99('0x1a')]);}}}else{var _0x2b2de4=_(_0x506791[_0x1a99('0x3a')])[_0x1a99('0x3b')]()[_0x1a99('0x29')](function(_0x11439c){return _[_0x1a99('0x6d')](_0x2a0ffe,[_0x1a99('0x26'),_0x11439c])?_0x11439c:undefined;})[_0x1a99('0x6e')]()[_0x1a99('0x5d')]();if(!_[_0x1a99('0x6f')](_0x2b2de4)){_0x2b2de4['forEach'](function(_0x70c550){if(_0x70c550==='MailAccountId'){_0x137838[_0x1a99('0x45')](_0x1a99('0x70'),[]['concat'](_0x506791[_0x1a99('0x3a')][_0x70c550]));}else if(_0x70c550===_0x1a99('0x71')){var _0x48a74c=JSON[_0x1a99('0x72')](_0x506791[_0x1a99('0x3a')][_0x70c550])[_0x1a99('0x73')];var _0x6baa6e=JSON[_0x1a99('0x72')](_0x506791[_0x1a99('0x3a')][_0x70c550])[_0x1a99('0x74')];_0x137838['where']('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x48a74c,_0x6baa6e);}else{if(_0x506791[_0x1a99('0x3a')][_0x70c550]===_0x1a99('0x75')){_0x137838[_0x1a99('0x45')]('i.'+_0x70c550+'\x20IS\x20NULL');}else{_0x137838[_0x1a99('0x45')]('i.'+_0x70c550+'\x20=\x20?',_0x506791[_0x1a99('0x3a')][_0x70c550]);}}});}if(_0x506791[_0x1a99('0x3a')][_0x1a99('0x76')]){if(_0x506791[_0x1a99('0x3a')][_0x1a99('0x76')]==0x1){_0x137838[_0x1a99('0x5e')](_0x1a99('0x77'));}else{_0x137838[_0x1a99('0x5e')](_0x1a99('0x78'));}}if(_0x506791['query'][_0x1a99('0x79')]){_0x7328b7=_[_0x1a99('0x7a')](_0x506791[_0x1a99('0x3a')][_0x1a99('0x79')])?_0x506791[_0x1a99('0x3a')][_0x1a99('0x79')]:new Array(_0x506791['query'][_0x1a99('0x79')]);_0x7328b7[_0x1a99('0x2d')](function(_0x4ec14d){_0x263679['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x4ec14d+',%');});}if(_0x506791[_0x1a99('0x3a')]['filter']){var _0x133e9a=_0x506791[_0x1a99('0x3a')][_0x1a99('0x7b')]['replace']('\x5c','\x5c\x5c')[_0x1a99('0x7c')]('\x27\x27',_0x1a99('0x7d'));if(qs[_0x1a99('0x7e')](_0x133e9a)){_0x21babb['or'](_0x1a99('0x7f'),_0x133e9a+'%');}else if(qs[_0x1a99('0x80')](_0x133e9a)){_0x21babb['or']('c.email\x20LIKE\x20?',_0x133e9a+'%');}else{_0x21babb['or'](_0x1a99('0x81'),qs[_0x1a99('0x82')](_0x133e9a))['or'](_0x1a99('0x83'),qs[_0x1a99('0x82')](_0x133e9a));}}}_0x137838[_0x1a99('0x45')](_0x21babb);_0x137838[_0x1a99('0x84')](_0x1a99('0x85'));var _0x378c7f={'type':db[_0x1a99('0x86')][_0x1a99('0x87')][_0x1a99('0x88')],'raw':!![]};var _0x4fd7b9=_0x137838['clone']();_0x4fd7b9[_0x1a99('0x48')](_0x1a99('0x85'));_0x4fd7b9[_0x1a99('0x48')](_0x1a99('0x89'),_0x1a99('0x8a'));if(_0x5d3163['order']){_0x5d3163[_0x1a99('0x43')][_0x1a99('0x2d')](function(_0xb515ba){_0x137838[_0x1a99('0x43')]('i.'+_0xb515ba[0x0],_0xb515ba[0x1]===_0x1a99('0x8b')?![]:!![]);});}if(!_[_0x1a99('0x6f')](_0x7328b7)){_0x137838[_0x1a99('0x5e')](_0x263679);_0x4fd7b9['where'](_0x1a99('0x8c'),_0x7328b7);}BPromise[_0x1a99('0x8d')]()['then'](function(){if(!_0x405435){if(_0x506791[_0x1a99('0x3a')][_0x1a99('0x8e')]||_0x506791[_0x1a99('0x3a')][_0x1a99('0x8f')])return;_0x4fd7b9[_0x1a99('0x45')]('i.MailAccountId\x20IS\x20NOT\x20NULL');_0x137838[_0x1a99('0x45')]('i.MailAccountId\x20IS\x20NOT\x20NULL');return;}return _0x506791[_0x1a99('0x90')][_0x1a99('0x91')]({'attributes':['id'],'raw':!![]})[_0x1a99('0x23')](function(_0x18df1e){if(_[_0x1a99('0x6f')](_0x18df1e)){_0x4fd7b9[_0x1a99('0x45')](_0x1a99('0x92'));_0x137838[_0x1a99('0x45')](_0x1a99('0x92'));}else{_0x4fd7b9[_0x1a99('0x45')]('i.MailAccountId\x20IN\x20?',_[_0x1a99('0x29')](_0x18df1e,'id'));_0x137838[_0x1a99('0x45')](_0x1a99('0x70'),_[_0x1a99('0x29')](_0x18df1e,'id'));}});})[_0x1a99('0x23')](function(){db[_0x1a99('0x93')][_0x1a99('0x3a')](_0x4fd7b9[_0x1a99('0x94')](),_0x378c7f)[_0x1a99('0x23')](function(_0x4d777c){_0x31caea[_0x1a99('0x1b')]=_0x4d777c[_0x1a99('0x5b')];if(_0x31caea['count']===0x0)return[];return db[_0x1a99('0x93')]['query'](_0x14c52a['toString'](),_0x378c7f)[_0x1a99('0x23')](function(_0x14a489){_0x472167=_['keyBy'](_0x14a489,'id');_0x378c7f=_[_0x1a99('0x95')](_0x378c7f,{'model':db[_0x1a99('0x30')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x506791[_0x1a99('0x3a')][_0x1a99('0x40')]){_0x5d3163[_0x1a99('0x3f')][_0x1a99('0x2d')](function(_0x2b1d9a){_0x137838[_0x1a99('0x48')]('i.'+_0x2b1d9a);});}else{_0x137838[_0x1a99('0x48')](_0x1a99('0x89'),_0x1a99('0x8a'));_0x137838[_0x1a99('0x48')](_0x1a99('0x96'),_0x1a99('0x97'));_0x137838[_0x1a99('0x48')](_0x1a99('0x98'),_0x1a99('0x99'));_0x137838[_0x1a99('0x48')](_0x1a99('0x85'));_0x137838['field'](_0x1a99('0x9a'));_0x137838[_0x1a99('0x48')](_0x1a99('0x9b'));_0x137838[_0x1a99('0x48')]('i.closed');_0x137838[_0x1a99('0x48')](_0x1a99('0x9c'));_0x137838[_0x1a99('0x48')](_0x1a99('0x9d'));_0x137838['field']('i.lastMsgAt');_0x137838['field']('i.lastMsgDirection');_0x137838[_0x1a99('0x48')](_0x1a99('0x9e'));_0x137838[_0x1a99('0x48')](_0x1a99('0x9f'));_0x137838['field']('i.substatus');_0x137838[_0x1a99('0x48')](_0x1a99('0xa0'));_0x137838[_0x1a99('0x48')](_0x1a99('0xa1'));_0x137838[_0x1a99('0x48')](_0x1a99('0xa2'));_0x137838[_0x1a99('0x48')](_0x1a99('0xa3'));_0x137838[_0x1a99('0x48')](_0x1a99('0xa4'),_0x1a99('0xa5'));_0x137838['field'](_0x1a99('0xa6'),'Contact.lastName');_0x137838['field'](_0x1a99('0xa7'),_0x1a99('0xa8'));_0x137838['field'](_0x1a99('0xa9'),_0x1a99('0xaa'));_0x137838[_0x1a99('0x48')](_0x1a99('0xab'),'Contact.mobile');_0x137838[_0x1a99('0x48')](_0x1a99('0xac'),_0x1a99('0xad'));_0x137838[_0x1a99('0x48')](_0x1a99('0xae'),_0x1a99('0xaf'));_0x137838[_0x1a99('0x48')](_0x1a99('0xb0'),_0x1a99('0xb1'));_0x137838[_0x1a99('0x48')](_0x1a99('0xb2'),_0x1a99('0x2b'));}_0x137838[_0x1a99('0x1c')](_0x5d3163[_0x1a99('0x1c')]);_0x137838['offset'](_0x5d3163['offset']);return db[_0x1a99('0x93')][_0x1a99('0x3a')](_0x137838[_0x1a99('0x94')](),_0x378c7f);})[_0x1a99('0x23')](function(_0x53dca3){_0xd721f8[_0x1a99('0x45')]('ui.MailInteractionId\x20IN\x20?',_[_0x1a99('0x29')](_0x53dca3,'id'));return db[_0x1a99('0x93')][_0x1a99('0x3a')](_0xd721f8['toString'](),_0x378c7f)[_0x1a99('0x23')](function(_0x1953ec){var _0xf52d70=_[_0x1a99('0xb3')](_0x1953ec,'MailInteractionId');var _0x389467=[];return db['Setting'][_0x1a99('0x31')]({'attributes':[_0x1a99('0xb4')],'raw':!![]})[_0x1a99('0x23')](function(_0x2d90ee){var _0x11f3a2=_0x2d90ee[_0x1a99('0xb4')];_0x53dca3[_0x1a99('0x2d')](function(_0x298b93){_0x389467[_0x1a99('0x2f')](updateMailInteraction(_0x298b93,_0x472167,_0xf52d70,_0x11f3a2));});return BPromise[_0x1a99('0xb5')](_0x389467);});});});})[_0x1a99('0x23')](function(_0xc90ee0){_0x31caea['rows']=_0xc90ee0;return _0x31caea;})['then'](respondWithFilteredResult(_0x431fac,_0x5d3163));})['catch'](handleError(_0x431fac,null));};exports[_0x1a99('0xb6')]=function(_0x2ecef4,_0x477c18){var _0x118eac={'raw':![],'where':{'id':_0x2ecef4[_0x1a99('0xb7')]['id']}},_0x248386={};_0x248386[_0x1a99('0x3e')]=_[_0x1a99('0x3b')](db['MailInteraction'][_0x1a99('0x36')]);_0x248386['query']=_[_0x1a99('0x3b')](_0x2ecef4[_0x1a99('0x3a')]);_0x248386[_0x1a99('0x3c')]=_['intersection'](_0x248386[_0x1a99('0x3e')],_0x248386[_0x1a99('0x3a')]);_0x118eac['attributes']=_[_0x1a99('0x3d')](_0x248386[_0x1a99('0x3e')],qs['fields'](_0x2ecef4['query'][_0x1a99('0x40')]));_0x118eac[_0x1a99('0x3f')]=_0x118eac[_0x1a99('0x3f')]['length']?_0x118eac[_0x1a99('0x3f')]:_0x248386[_0x1a99('0x3e')];if(_0x2ecef4['query'][_0x1a99('0xb8')]){_0x118eac[_0x1a99('0xb9')]=[{'all':!![]}];}_0x118eac=_['merge']({},_0x118eac,_0x2ecef4[_0x1a99('0xba')]);return db[_0x1a99('0x30')][_0x1a99('0x5c')](_0x118eac)[_0x1a99('0x23')](handleEntityNotFound(_0x477c18,null))['then'](respondWithResult(_0x477c18,null))[_0x1a99('0xbb')](handleError(_0x477c18,null));};exports[_0x1a99('0xbc')]=function(_0x41cb1b,_0x206046){return db[_0x1a99('0x30')]['create'](_0x41cb1b[_0x1a99('0xbd')],{})[_0x1a99('0x23')](respondWithResult(_0x206046,0xc9))['catch'](handleError(_0x206046,null));};exports[_0x1a99('0x22')]=function(_0x283400,_0x6ccc0c){if(_0x283400['body']['id']){delete _0x283400['body']['id'];}return db[_0x1a99('0x30')][_0x1a99('0x5c')]({'where':{'id':_0x283400['params']['id']}})[_0x1a99('0x23')](handleEntityNotFound(_0x6ccc0c,null))['then'](saveUpdates(_0x283400['body'],null))[_0x1a99('0x23')](respondWithResult(_0x6ccc0c,null))[_0x1a99('0xbb')](handleError(_0x6ccc0c,null));};exports[_0x1a99('0xbe')]=function(_0x58ae89,_0xbbdcaa){return db['MailInteraction']['find']({'where':{'id':_0x58ae89['params']['id']}})['then'](handleEntityNotFound(_0xbbdcaa,null))['then'](removeEntity(_0xbbdcaa,null))[_0x1a99('0xbb')](handleError(_0xbbdcaa,null));};exports[_0x1a99('0xbf')]=function(_0x58eddd,_0x25bb34){return db[_0x1a99('0x30')][_0x1a99('0xbf')]()[_0x1a99('0x23')](respondWithResult(_0x25bb34,null))[_0x1a99('0xbb')](handleError(_0x25bb34,null));};exports['addMessage']=function(_0x4dd1ae,_0x5473fe,_0x299499){return db[_0x1a99('0xc0')][_0x1a99('0x5c')]({'where':{'id':_0x4dd1ae['params']['id']}})[_0x1a99('0x23')](handleEntityNotFound(_0x5473fe,null))[_0x1a99('0x23')](function(_0x2b41b9){if(_0x2b41b9){return _0x2b41b9[_0x1a99('0xc1')](_0x4dd1ae[_0x1a99('0xbd')]['ids'],_[_0x1a99('0xc2')](_0x4dd1ae[_0x1a99('0xbd')],[_0x1a99('0xc3'),'id'])||{});}})[_0x1a99('0x23')](respondWithResult(_0x5473fe,null))[_0x1a99('0xbb')](handleError(_0x5473fe,null));};exports[_0x1a99('0xc4')]=function(_0x3bc751,_0x3ce421,_0x579069){var _0xaaff95={'raw':![],'where':{}};var _0x1e105a={};var _0x46b183={'count':0x0,'rows':[]};return db[_0x1a99('0x30')][_0x1a99('0x31')]({'where':{'id':_0x3bc751[_0x1a99('0xb7')]['id']}})[_0x1a99('0x23')](handleEntityNotFound(_0x3ce421,null))[_0x1a99('0x23')](function(_0x50abc7){if(_0x50abc7){_0x1e105a[_0x1a99('0x3e')]=_['keys'](db['MailMessage']['rawAttributes']);_0x1e105a[_0x1a99('0x3a')]=_['keys'](_0x3bc751['query']);_0x1e105a['filters']=_[_0x1a99('0x3d')](_0x1e105a[_0x1a99('0x3e')],_0x1e105a[_0x1a99('0x3a')]);_0xaaff95['attributes']=_['intersection'](_0x1e105a['model'],qs[_0x1a99('0x40')](_0x3bc751[_0x1a99('0x3a')][_0x1a99('0x40')]));_0xaaff95[_0x1a99('0x3f')]=_0xaaff95[_0x1a99('0x3f')][_0x1a99('0x5b')]?_0xaaff95[_0x1a99('0x3f')]:_0x1e105a[_0x1a99('0x3e')];if(!_0x3bc751[_0x1a99('0x3a')][_0x1a99('0x41')](_0x1a99('0xc5'))){_0xaaff95[_0x1a99('0x1c')]=qs[_0x1a99('0x1c')](_0x3bc751['query'][_0x1a99('0x1c')]);_0xaaff95['offset']=qs[_0x1a99('0x42')](_0x3bc751[_0x1a99('0x3a')][_0x1a99('0x42')]);}_0xaaff95[_0x1a99('0x43')]=qs[_0x1a99('0x44')](_0x3bc751[_0x1a99('0x3a')][_0x1a99('0x44')]);_0xaaff95[_0x1a99('0x45')]=qs[_0x1a99('0x3c')](_[_0x1a99('0x46')](_0x3bc751[_0x1a99('0x3a')],_0x1e105a[_0x1a99('0x3c')]));_0xaaff95[_0x1a99('0x45')][_0x1a99('0xc6')]=_0x50abc7['id'];if(_0x3bc751[_0x1a99('0x3a')][_0x1a99('0x7b')]){_0xaaff95[_0x1a99('0x45')]=_[_0x1a99('0x95')](_0xaaff95[_0x1a99('0x45')],{'$or':_[_0x1a99('0x29')](_0xaaff95[_0x1a99('0x3f')],function(_0x336b15){var _0x12d3b2={};_0x12d3b2[_0x336b15]={'$like':'%'+_0x3bc751[_0x1a99('0x3a')]['filter']+'%'};return _0x12d3b2;})});}if(_0x3bc751['query'][_0x1a99('0x73')]){var _0x31546b=_0x3bc751[_0x1a99('0x3a')][_0x1a99('0x73')][_0x1a99('0x2c')](',');var _0x11edf2={};_0x11edf2[_0x31546b[0x0]]={'$gte':moment(_0x31546b[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0xaaff95[_0x1a99('0x45')]=_[_0x1a99('0x95')](_0xaaff95['where'],_0x11edf2);}_0xaaff95=_[_0x1a99('0x95')]({},_0xaaff95,_0x3bc751['options']);return db[_0x1a99('0xc0')][_0x1a99('0x1b')]({'where':_0xaaff95[_0x1a99('0x45')]})['then'](function(_0x2e48c9){_0x46b183[_0x1a99('0x1b')]=_0x2e48c9;if(_0x3bc751[_0x1a99('0x3a')][_0x1a99('0xb8')]){_0xaaff95['include']=[{'all':!![]}];}return db[_0x1a99('0xc0')][_0x1a99('0xc7')](_0xaaff95);})['then'](function(_0xe3e15b){_0x46b183[_0x1a99('0xc8')]=_0xe3e15b;return _0x46b183;});}})['then'](respondWithFilteredResult(_0x3ce421,_0xaaff95))[_0x1a99('0xbb')](handleError(_0x3ce421,null));};exports[_0x1a99('0xc9')]=function(_0x512083,_0x207cb8,_0x592aeb){return db[_0x1a99('0x30')]['find']({'where':{'id':_0x512083[_0x1a99('0xb7')]['id']}})[_0x1a99('0x23')](handleEntityNotFound(_0x207cb8,null))[_0x1a99('0x23')](function(_0x5ea892){if(_0x5ea892){return _0x5ea892[_0x1a99('0xca')](_0x512083[_0x1a99('0xbd')][_0x1a99('0xc3')],_[_0x1a99('0xc2')](_0x512083[_0x1a99('0xbd')],[_0x1a99('0xc3'),'id'])||{})[_0x1a99('0xcb')](function(){return db['Tag'][_0x1a99('0xc7')]({'attributes':['id','name',_0x1a99('0x49')],'where':{'id':_0x512083['body'][_0x1a99('0xc3')]}});})['then'](function(_0x49a6ce){socket[_0x1a99('0xcc')](_0x1a99('0xcd'),{'id':Number(_0x512083[_0x1a99('0xb7')]['id']),'tags':_0x49a6ce||[]});return{'id':Number(_0x512083[_0x1a99('0xb7')]['id']),'tags':_0x49a6ce||[]};});}})[_0x1a99('0x23')](respondWithResult(_0x207cb8,null))[_0x1a99('0xbb')](handleError(_0x207cb8,null));};exports[_0x1a99('0xce')]=function(_0x17de75,_0x2dbe32,_0x479dcd){return db[_0x1a99('0x30')][_0x1a99('0x5c')]({'where':{'id':_0x17de75[_0x1a99('0xb7')]['id']}})[_0x1a99('0x23')](handleEntityNotFound(_0x2dbe32,null))[_0x1a99('0x23')](function(_0x16a487){if(_0x16a487){return _0x16a487[_0x1a99('0xce')](_0x17de75[_0x1a99('0x3a')][_0x1a99('0xc3')]);}})[_0x1a99('0x23')](respondWithStatusCode(_0x2dbe32,null))['catch'](handleError(_0x2dbe32,null));};exports[_0x1a99('0xcf')]=function(_0xee1f0f,_0x139015){var _0x1ab6be=moment()['unix']()[_0x1a99('0x94')]();var _0x57601e=path[_0x1a99('0xd0')](config[_0x1a99('0xd1')],_0x1a99('0xd2'),_0x1a99('0xd3'),_0x1a99('0xd4'));var _0x8f4b=path[_0x1a99('0xd0')](config[_0x1a99('0xd1')],_0x1a99('0xd2'),'files',_0x1a99('0xd5'));var _0x537f10=path[_0x1a99('0xd0')](_0x57601e,_0x1ab6be);var _0x59f880=util['format'](_0x1a99('0xd6'),_0xee1f0f[_0x1a99('0xb7')]['id'],_0x1ab6be);var _0x5d0605=path[_0x1a99('0xd0')](_0x57601e,_0x59f880);var _0x2d50ff=[];if(_0xee1f0f[_0x1a99('0x3a')][_0x1a99('0xd5')]){_0x2d50ff['push']({'model':db[_0x1a99('0xd7')],'as':'Attachments','raw':!![]});}var _0x446b19=[{'model':db[_0x1a99('0xc0')],'as':_0x1a99('0xd8'),'attributes':['id',_0x1a99('0xbd'),_0x1a99('0x4d'),'to','cc',_0x1a99('0xd9'),_0x1a99('0xda'),_0x1a99('0x71')],'where':{'secret':![]},'order':qs[_0x1a99('0x44')]('id'),'include':_0x2d50ff}];return db[_0x1a99('0x30')][_0x1a99('0x5c')]({'where':{'id':_0xee1f0f[_0x1a99('0xb7')]['id']},'include':_0x446b19})[_0x1a99('0x23')](handleEntityNotFound(_0x139015,null))[_0x1a99('0x23')](function(_0x14aa56){if(_0x14aa56&&_0x14aa56[_0x1a99('0xd8')]){var _0x11b78c=_0x14aa56[_0x1a99('0xdb')]({'plain':!![]});fs['mkdirSync'](_0x537f10);return BPromise['each'](_0x11b78c['Messages'],function(_0x2e5627,_0x24bebf){var _0x5457cd={'from':_0x2e5627[_0x1a99('0x4d')],'to':_0x2e5627['to'],'subject':_0x2e5627['subject'],'html':_0x2e5627[_0x1a99('0xbd')],'headers':{'Date':moment(_0x2e5627[_0x1a99('0x71')])[_0x1a99('0xdc')](_0x1a99('0xdd'))},'attachments':[]};if(_0x2e5627['cc']){_0x5457cd[_0x1a99('0xde')]['Cc']=_0x2e5627['cc'];}if(_0x2e5627[_0x1a99('0xd9')]){_0x5457cd['headers'][_0x1a99('0xdf')]=_0x2e5627[_0x1a99('0xd9')];}return new BPromise(function(_0x4766e2,_0x368127){if(_0x2e5627['Attachments']){for(var _0x35d735=0x0;_0x35d735<_0x2e5627[_0x1a99('0xe0')][_0x1a99('0x5b')];_0x35d735++){var _0x2fb60d=_0x2e5627['Attachments'][_0x35d735];var _0x428033=path[_0x1a99('0xd0')](_0x8f4b,_0x2fb60d[_0x1a99('0xe1')]);if(fs[_0x1a99('0xe2')](_0x428033)){_0x5457cd[_0x1a99('0xd5')][_0x1a99('0x2f')]({'name':_0x2fb60d[_0x1a99('0x26')],'contentType':_0x2fb60d[_0x1a99('0x38')],'data':fs['readFileSync'](_0x428033)});}}}emlformat[_0x1a99('0xe3')](_0x5457cd,function(_0x295718,_0x2ab427){if(_0x295718)return _0x368127(_0x295718);fs[_0x1a99('0xe4')](path['join'](_0x537f10,util[_0x1a99('0xdc')](_0x1a99('0xe5'),_0x24bebf)),_0x2ab427);return _0x4766e2(_0x2ab427);});});})['then'](function(){return new BPromise(function(_0x3c929f,_0x453215){zipdir(_0x537f10,{'saveTo':_0x5d0605},function(_0x108dcc,_0x3a39ca){if(_0x108dcc)return _0x453215(_0x108dcc);return _0x3c929f(_0x3a39ca);});})[_0x1a99('0x23')](function(){return new BPromise(function(_0x3fb50e,_0x2be670){rimraf(_0x537f10,function(_0x1b98f8){if(_0x1b98f8)_0x2be670(_0x1b98f8);return _0x3fb50e();});});})[_0x1a99('0x23')](function(){return _0x139015[_0x1a99('0xcf')](_0x5d0605,_0x59f880,function(_0x3123cd){if(_0x3123cd){console['log']('err',_0x3123cd);}else{fs[_0x1a99('0xe6')](_0x5d0605);}});});});}else{return _0x139015[_0x1a99('0x24')](0xc8);}})[_0x1a99('0xbb')](handleError(_0x139015,null));};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.events.js b/server/api/mailInteraction/mailInteraction.events.js
index 3e9f79c..a0a19d9 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 _0x2a96=['Users','setDataValue','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','MailInteraction','MailMessage','setMaxListeners','save','update','remove','then'];(function(_0x2c60e8,_0x5a0bba){var _0x535d66=function(_0x192c0c){while(--_0x192c0c){_0x2c60e8['push'](_0x2c60e8['shift']());}};_0x535d66(++_0x5a0bba);}(_0x2a96,0x13b));var _0x62a9=function(_0x7fd4eb,_0x3a3d90){_0x7fd4eb=_0x7fd4eb-0x0;var _0x42e5e3=_0x2a96[_0x7fd4eb];return _0x42e5e3;};'use strict';var EventEmitter=require(_0x62a9('0x0'));var MailInteraction=require(_0x62a9('0x1'))['db'][_0x62a9('0x2')];var MailMessage=require(_0x62a9('0x1'))['db'][_0x62a9('0x3')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x62a9('0x4')](0x0);var events={'afterCreate':_0x62a9('0x5'),'afterUpdate':_0x62a9('0x6'),'afterDestroy':_0x62a9('0x7')};function emitEvent(_0x461c42){return function(_0x3fbade,_0x354eaa,_0x1f383e){_0x3fbade['getUsers']({'attributes':['id'],'raw':!![]})[_0x62a9('0x8')](function(_0x5630f2){_0x3fbade['setDataValue'](_0x62a9('0x9'),_0x5630f2['map'](function(_0x276535){return{'id':_0x276535['id']};}));return MailMessage['findAll']({'where':{'MailInteractionId':_0x3fbade['id'],'direction':'in','read':![]},'raw':!![]});})[_0x62a9('0x8')](function(_0x46b642){_0x3fbade[_0x62a9('0xa')](_0x62a9('0xb'),_0x46b642[_0x62a9('0xc')]);MailInteractionEvents[_0x62a9('0xd')](_0x461c42+':'+_0x3fbade['id'],_0x3fbade);MailInteractionEvents[_0x62a9('0xd')](_0x461c42,_0x3fbade);_0x1f383e(null);})[_0x62a9('0xe')](_0x1f383e(null));};}for(var e in events){if(events[_0x62a9('0xf')](e)){var event=events[e];MailInteraction[_0x62a9('0x10')](e,emitEvent(event));}}module[_0x62a9('0x11')]=MailInteractionEvents;
\ No newline at end of file
+var _0xdac5=['length','emit','catch','exports','events','../../mysqldb','MailInteraction','setMaxListeners','remove','getUsers','then','setDataValue','Users','map','findAll','unreadMessages'];(function(_0x49052b,_0x3ba709){var _0x48c045=function(_0x41ac38){while(--_0x41ac38){_0x49052b['push'](_0x49052b['shift']());}};_0x48c045(++_0x3ba709);}(_0xdac5,0x64));var _0x5dac=function(_0x61318e,_0x257bc9){_0x61318e=_0x61318e-0x0;var _0x1c575b=_0xdac5[_0x61318e];return _0x1c575b;};'use strict';var EventEmitter=require(_0x5dac('0x0'));var MailInteraction=require(_0x5dac('0x1'))['db'][_0x5dac('0x2')];var MailMessage=require(_0x5dac('0x1'))['db']['MailMessage'];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x5dac('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x5dac('0x4')};function emitEvent(_0x18466a){return function(_0x43a864,_0x824906,_0x369ddd){_0x43a864[_0x5dac('0x5')]({'attributes':['id'],'raw':!![]})[_0x5dac('0x6')](function(_0x29d49f){_0x43a864[_0x5dac('0x7')](_0x5dac('0x8'),_0x29d49f[_0x5dac('0x9')](function(_0x470e31){return{'id':_0x470e31['id']};}));return MailMessage[_0x5dac('0xa')]({'where':{'MailInteractionId':_0x43a864['id'],'direction':'in','read':![]},'raw':!![]});})[_0x5dac('0x6')](function(_0x5f2b23){_0x43a864['setDataValue'](_0x5dac('0xb'),_0x5f2b23[_0x5dac('0xc')]);MailInteractionEvents[_0x5dac('0xd')](_0x18466a+':'+_0x43a864['id'],_0x43a864);MailInteractionEvents[_0x5dac('0xd')](_0x18466a,_0x43a864);_0x369ddd(null);})[_0x5dac('0xe')](_0x369ddd(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailInteraction['hook'](e,emitEvent(event));}}module[_0x5dac('0xf')]=MailInteractionEvents;
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.model.js b/server/api/mailInteraction/mailInteraction.model.js
index 054d39b..f5b9cfb 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 _0xc36d=['update','then','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','./mailInteraction.attributes','exports','define','mail_interactions','fti_mail_interactions','subject','FULLTEXT','substatusAt','format','YYYY-MM-DD\x20HH:mm:ss','closedAt','changed','substatus','closed','models','get','MailMessage'];(function(_0x56d970,_0x42c6e6){var _0x9180e6=function(_0x38b9d9){while(--_0x38b9d9){_0x56d970['push'](_0x56d970['shift']());}};_0x9180e6(++_0x42c6e6);}(_0xc36d,0x7d));var _0xdc36=function(_0x48f038,_0x2bde84){_0x48f038=_0x48f038-0x0;var _0x2edc62=_0xc36d[_0x48f038];return _0x2edc62;};'use strict';var _=require(_0xdc36('0x0'));var util=require(_0xdc36('0x1'));var logger=require(_0xdc36('0x2'))(_0xdc36('0x3'));var moment=require(_0xdc36('0x4'));var BPromise=require(_0xdc36('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdc36('0x6'));var rimraf=require(_0xdc36('0x7'));var config=require('../../config/environment');var attributes=require(_0xdc36('0x8'));module[_0xdc36('0x9')]=function(_0x186c58,_0x11ad3b){return _0x186c58[_0xdc36('0xa')]('MailInteraction',attributes,{'tableName':_0xdc36('0xb'),'paranoid':![],'indexes':[{'name':_0xdc36('0xc'),'fields':[_0xdc36('0xd'),'to'],'type':_0xdc36('0xe')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x4f82be,_0x20d00a,_0x23956b){if(_0x4f82be['substatus']){_0x4f82be[_0xdc36('0xf')]=moment()[_0xdc36('0x10')](_0xdc36('0x11'));}if(_0x4f82be['closed']){_0x4f82be[_0xdc36('0x12')]=moment()[_0xdc36('0x10')]('YYYY-MM-DD\x20HH:mm:ss');}_0x23956b(null,_0x20d00a);},'beforeUpdate':function(_0x4d7d26,_0x3107bc,_0x276692){if(_0x4d7d26[_0xdc36('0x13')](_0xdc36('0x14'))){_0x4d7d26['substatusAt']=_0x4d7d26[_0xdc36('0x14')]?moment()[_0xdc36('0x10')](_0xdc36('0x11')):null;}if(_0x4d7d26[_0xdc36('0x13')](_0xdc36('0x15'))){_0x4d7d26[_0xdc36('0x12')]=moment()[_0xdc36('0x10')](_0xdc36('0x11'));_0x4d7d26['substatus']=null;_0x4d7d26[_0xdc36('0xf')]=null;}_0x276692(null,_0x4d7d26);},'afterUpdate':function(_0x526ac8,_0x4baf2e,_0x59c88f){var _0x64f61e=_0x186c58[_0xdc36('0x16')];var _0x5a498f=_0x526ac8[_0xdc36('0x17')]({'plain':!![]});if(_0x5a498f[_0xdc36('0x15')]){return _0x64f61e[_0xdc36('0x18')][_0xdc36('0x19')]({'read':!![]},{'where':{'MailInteractionId':_0x5a498f['id']}})[_0xdc36('0x1a')](function(){_0x59c88f();})[_0xdc36('0x1b')](function(_0x59ee8e){_0x59c88f(_0x59ee8e);});}else{_0x59c88f();}}},'charset':_0xdc36('0x1c'),'collate':_0xdc36('0x1d')});};
\ No newline at end of file
+var _0x9000=['closedAt','YYYY-MM-DD\x20HH:mm:ss','changed','get','MailMessage','then','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailInteraction.attributes','exports','MailInteraction','mail_interactions','fti_mail_interactions','substatus','substatusAt','format','closed'];(function(_0x16d6a5,_0x51cabf){var _0x1bfc8f=function(_0x46c173){while(--_0x46c173){_0x16d6a5['push'](_0x16d6a5['shift']());}};_0x1bfc8f(++_0x51cabf);}(_0x9000,0x19e));var _0x0900=function(_0x40a825,_0x3bac79){_0x40a825=_0x40a825-0x0;var _0x273a54=_0x9000[_0x40a825];return _0x273a54;};'use strict';var _=require(_0x0900('0x0'));var util=require(_0x0900('0x1'));var logger=require('../../config/logger')(_0x0900('0x2'));var moment=require(_0x0900('0x3'));var BPromise=require(_0x0900('0x4'));var rp=require(_0x0900('0x5'));var fs=require('fs');var path=require(_0x0900('0x6'));var rimraf=require(_0x0900('0x7'));var config=require(_0x0900('0x8'));var attributes=require(_0x0900('0x9'));module[_0x0900('0xa')]=function(_0x50b1ad,_0x1c7c0b){return _0x50b1ad['define'](_0x0900('0xb'),attributes,{'tableName':_0x0900('0xc'),'paranoid':![],'indexes':[{'name':_0x0900('0xd'),'fields':['subject','to'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x30aff2,_0x75e296,_0x2c8efa){if(_0x30aff2[_0x0900('0xe')]){_0x30aff2[_0x0900('0xf')]=moment()[_0x0900('0x10')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x30aff2[_0x0900('0x11')]){_0x30aff2[_0x0900('0x12')]=moment()[_0x0900('0x10')](_0x0900('0x13'));}_0x2c8efa(null,_0x75e296);},'beforeUpdate':function(_0x101e43,_0x157701,_0xe8ae24){if(_0x101e43[_0x0900('0x14')](_0x0900('0xe'))){_0x101e43[_0x0900('0xf')]=_0x101e43['substatus']?moment()[_0x0900('0x10')](_0x0900('0x13')):null;}if(_0x101e43['changed'](_0x0900('0x11'))){_0x101e43[_0x0900('0x12')]=moment()['format'](_0x0900('0x13'));_0x101e43['substatus']=null;_0x101e43[_0x0900('0xf')]=null;}_0xe8ae24(null,_0x101e43);},'afterUpdate':function(_0xb184b6,_0x2eba4d,_0x34512f){var _0x4bbe8f=_0x50b1ad['models'];var _0x2a6b91=_0xb184b6[_0x0900('0x15')]({'plain':!![]});if(_0x2a6b91[_0x0900('0x11')]){return _0x4bbe8f[_0x0900('0x16')]['update']({'read':!![]},{'where':{'MailInteractionId':_0x2a6b91['id']}})[_0x0900('0x17')](function(){_0x34512f();})[_0x0900('0x18')](function(_0x958b2f){_0x34512f(_0x958b2f);});}else{_0x34512f();}}},'charset':_0x0900('0x19'),'collate':_0x0900('0x1a')});};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.rpc.js b/server/api/mailInteraction/mailInteraction.rpc.js
index 271a3ab..9c935b5 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 _0x8e63=['debug','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateMailInteraction','MailInteraction','options','where','limit','AddTagsToMailInteraction','body','ids','omit','spread','AddTags','util','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http','redis','defaults','./mailInteraction.socket','register','then','info','MailInteraction,\x20%s,\x20%s','request\x20sent'];(function(_0x59ee13,_0x529aee){var _0x9399b0=function(_0x173849){while(--_0x173849){_0x59ee13['push'](_0x59ee13['shift']());}};_0x9399b0(++_0x529aee);}(_0x8e63,0x7c));var _0x38e6=function(_0x2a1945,_0x21aa18){_0x2a1945=_0x2a1945-0x0;var _0x1e182e=_0x8e63[_0x2a1945];return _0x1e182e;};'use strict';var _=require('lodash');var util=require(_0x38e6('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x38e6('0x1'));var fs=require('fs');var Redis=require(_0x38e6('0x2'));var db=require(_0x38e6('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x38e6('0x4'));var config=require(_0x38e6('0x5'));var jayson=require(_0x38e6('0x6'));var client=jayson['client'][_0x38e6('0x7')]({'port':0x232a});config[_0x38e6('0x8')]=_[_0x38e6('0x9')](config[_0x38e6('0x8')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x38e6('0x8')]));require(_0x38e6('0xa'))[_0x38e6('0xb')](socket);function respondWithRpcPromise(_0x37ea60,_0x438258,_0x58ccc2){return new BPromise(function(_0x563697,_0x27826e){return client['request'](_0x37ea60,_0x58ccc2)[_0x38e6('0xc')](function(_0x4a97e3){logger[_0x38e6('0xd')](_0x38e6('0xe'),_0x438258,_0x38e6('0xf'));logger[_0x38e6('0x10')](_0x38e6('0x11'),_0x438258,'request\x20sent',JSON[_0x38e6('0x12')](_0x4a97e3));if(_0x4a97e3[_0x38e6('0x13')]){if(_0x4a97e3['error'][_0x38e6('0x14')]===0x1f4){logger[_0x38e6('0x13')](_0x38e6('0xe'),_0x438258,_0x4a97e3[_0x38e6('0x13')][_0x38e6('0x15')]);return _0x27826e(_0x4a97e3[_0x38e6('0x13')]['message']);}logger[_0x38e6('0x13')](_0x38e6('0xe'),_0x438258,_0x4a97e3[_0x38e6('0x13')][_0x38e6('0x15')]);return _0x563697(_0x4a97e3[_0x38e6('0x13')]['message']);}else{logger[_0x38e6('0xd')]('MailInteraction,\x20%s,\x20%s',_0x438258,_0x38e6('0xf'));_0x563697(_0x4a97e3[_0x38e6('0x16')][_0x38e6('0x15')]);}})[_0x38e6('0x17')](function(_0x5d82ba){logger[_0x38e6('0x13')]('MailInteraction,\x20%s,\x20%s',_0x438258,_0x5d82ba);_0x27826e(_0x5d82ba);});});}exports[_0x38e6('0x18')]=function(_0x193aa2){var _0x1781d3=this;return new Promise(function(_0x137e09,_0x3f1d54){return db[_0x38e6('0x19')]['update'](_0x193aa2['body'],{'raw':_0x193aa2['options']?_0x193aa2[_0x38e6('0x1a')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x193aa2['options']?_0x193aa2[_0x38e6('0x1a')][_0x38e6('0x1b')]||null:null,'attributes':_0x193aa2[_0x38e6('0x1a')]?_0x193aa2[_0x38e6('0x1a')]['attributes']||null:null,'limit':_0x193aa2[_0x38e6('0x1a')]?_0x193aa2[_0x38e6('0x1a')][_0x38e6('0x1c')]||null:null})['then'](function(_0x832025){logger[_0x38e6('0xd')](_0x38e6('0x18'),_0x193aa2);logger[_0x38e6('0x10')](_0x38e6('0x18'),_0x193aa2,JSON[_0x38e6('0x12')](_0x832025));_0x137e09(_0x832025);})[_0x38e6('0x17')](function(_0x167b28){logger['error'](_0x38e6('0x18'),_0x167b28['message'],_0x193aa2);_0x3f1d54(_0x1781d3[_0x38e6('0x13')](0x1f4,_0x167b28[_0x38e6('0x15')]));});});};exports[_0x38e6('0x1d')]=function(_0x16ed33){return new Promise(function(_0x43f05f,_0x1afc04){return db[_0x38e6('0x19')]['find']({'where':_0x16ed33[_0x38e6('0x1a')]?_0x16ed33[_0x38e6('0x1a')][_0x38e6('0x1b')]||null:null})[_0x38e6('0xc')](function(_0x3dbbe5){if(_0x3dbbe5){return _0x3dbbe5['addTags'](_0x16ed33[_0x38e6('0x1e')][_0x38e6('0x1f')],_[_0x38e6('0x20')](_0x16ed33[_0x38e6('0x1e')],[_0x38e6('0x1f'),'id'])||{});}})[_0x38e6('0x21')](function(_0x1fe0e7){logger['info'](_0x38e6('0x22'),_0x16ed33);logger[_0x38e6('0x10')](_0x38e6('0x22'),_0x16ed33,JSON[_0x38e6('0x12')](_0x1fe0e7));_0x43f05f(_0x1fe0e7);})[_0x38e6('0x17')](function(_0x1403df){logger[_0x38e6('0x13')]('AddTags',_0x1403df[_0x38e6('0x15')],_0x16ed33);_0x1afc04(_this[_0x38e6('0x13')](0x1f4,_0x1403df[_0x38e6('0x15')]));});});};
\ No newline at end of file
+var _0x3299=['error','message','catch','UpdateMailInteraction','MailInteraction','update','body','options','where','then','AddTagsToMailInteraction','find','ids','spread','AddTags','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./mailInteraction.socket','register','info','MailInteraction,\x20%s,\x20%s','request\x20sent','debug','MailInteraction,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x4fdf44,_0x4e8679){var _0x2c52b3=function(_0x52f92d){while(--_0x52f92d){_0x4fdf44['push'](_0x4fdf44['shift']());}};_0x2c52b3(++_0x4e8679);}(_0x3299,0x1bc));var _0x9329=function(_0x10fb07,_0xa5bcef){_0x10fb07=_0x10fb07-0x0;var _0x43389f=_0x3299[_0x10fb07];return _0x43389f;};'use strict';var _=require('lodash');var util=require(_0x9329('0x0'));var moment=require(_0x9329('0x1'));var BPromise=require(_0x9329('0x2'));var rs=require(_0x9329('0x3'));var fs=require('fs');var Redis=require(_0x9329('0x4'));var db=require(_0x9329('0x5'))['db'];var utils=require(_0x9329('0x6'));var logger=require(_0x9329('0x7'))(_0x9329('0x8'));var config=require(_0x9329('0x9'));var jayson=require(_0x9329('0xa'));var client=jayson[_0x9329('0xb')][_0x9329('0xc')]({'port':0x232a});config[_0x9329('0xd')]=_[_0x9329('0xe')](config[_0x9329('0xd')],{'host':_0x9329('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9329('0xd')]));require(_0x9329('0x10'))[_0x9329('0x11')](socket);function respondWithRpcPromise(_0x171f53,_0x330155,_0x53d176){return new BPromise(function(_0x181558,_0x354e9b){return client['request'](_0x171f53,_0x53d176)['then'](function(_0x5d72d0){logger[_0x9329('0x12')](_0x9329('0x13'),_0x330155,_0x9329('0x14'));logger[_0x9329('0x15')](_0x9329('0x16'),_0x330155,'request\x20sent',JSON[_0x9329('0x17')](_0x5d72d0));if(_0x5d72d0[_0x9329('0x18')]){if(_0x5d72d0[_0x9329('0x18')]['code']===0x1f4){logger[_0x9329('0x18')](_0x9329('0x13'),_0x330155,_0x5d72d0['error'][_0x9329('0x19')]);return _0x354e9b(_0x5d72d0[_0x9329('0x18')]['message']);}logger[_0x9329('0x18')](_0x9329('0x13'),_0x330155,_0x5d72d0[_0x9329('0x18')][_0x9329('0x19')]);return _0x181558(_0x5d72d0['error'][_0x9329('0x19')]);}else{logger['info'](_0x9329('0x13'),_0x330155,_0x9329('0x14'));_0x181558(_0x5d72d0['result'][_0x9329('0x19')]);}})[_0x9329('0x1a')](function(_0x5aa406){logger[_0x9329('0x18')]('MailInteraction,\x20%s,\x20%s',_0x330155,_0x5aa406);_0x354e9b(_0x5aa406);});});}exports[_0x9329('0x1b')]=function(_0x488ddc){var _0x38fdbf=this;return new Promise(function(_0x4d978a,_0x6676d7){return db[_0x9329('0x1c')][_0x9329('0x1d')](_0x488ddc[_0x9329('0x1e')],{'raw':_0x488ddc[_0x9329('0x1f')]?_0x488ddc[_0x9329('0x1f')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x488ddc[_0x9329('0x1f')]?_0x488ddc[_0x9329('0x1f')][_0x9329('0x20')]||null:null,'attributes':_0x488ddc[_0x9329('0x1f')]?_0x488ddc[_0x9329('0x1f')]['attributes']||null:null,'limit':_0x488ddc[_0x9329('0x1f')]?_0x488ddc[_0x9329('0x1f')]['limit']||null:null})[_0x9329('0x21')](function(_0x84dacf){logger[_0x9329('0x12')](_0x9329('0x1b'),_0x488ddc);logger['debug']('UpdateMailInteraction',_0x488ddc,JSON[_0x9329('0x17')](_0x84dacf));_0x4d978a(_0x84dacf);})[_0x9329('0x1a')](function(_0x4419fc){logger['error'](_0x9329('0x1b'),_0x4419fc['message'],_0x488ddc);_0x6676d7(_0x38fdbf[_0x9329('0x18')](0x1f4,_0x4419fc[_0x9329('0x19')]));});});};exports[_0x9329('0x22')]=function(_0x573209){return new Promise(function(_0x57ba4b,_0x36765a){return db['MailInteraction'][_0x9329('0x23')]({'where':_0x573209['options']?_0x573209[_0x9329('0x1f')]['where']||null:null})[_0x9329('0x21')](function(_0x469fa5){if(_0x469fa5){return _0x469fa5['addTags'](_0x573209[_0x9329('0x1e')][_0x9329('0x24')],_['omit'](_0x573209[_0x9329('0x1e')],[_0x9329('0x24'),'id'])||{});}})[_0x9329('0x25')](function(_0x333bc2){logger['info']('AddTags',_0x573209);logger['debug'](_0x9329('0x26'),_0x573209,JSON['stringify'](_0x333bc2));_0x57ba4b(_0x333bc2);})[_0x9329('0x1a')](function(_0x5a1a33){logger[_0x9329('0x18')](_0x9329('0x26'),_0x5a1a33['message'],_0x573209);_0x36765a(_this[_0x9329('0x18')](0x1f4,_0x5a1a33[_0x9329('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/mailInteraction/mailInteraction.socket.js b/server/api/mailInteraction/mailInteraction.socket.js
index 4c666df..8968cb6 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 _0xf2ac=['save','remove','update','length','mailInteraction:','./mailInteraction.events'];(function(_0x1f0bc5,_0x41eb60){var _0x4127ef=function(_0x23dd8b){while(--_0x23dd8b){_0x1f0bc5['push'](_0x1f0bc5['shift']());}};_0x4127ef(++_0x41eb60);}(_0xf2ac,0x1cd));var _0xcf2a=function(_0x1e2ee0,_0x4bfff2){_0x1e2ee0=_0x1e2ee0-0x0;var _0xf07915=_0xf2ac[_0x1e2ee0];return _0xf07915;};'use strict';var MailInteractionEvents=require(_0xcf2a('0x0'));var events=[_0xcf2a('0x1'),_0xcf2a('0x2'),_0xcf2a('0x3')];function createListener(_0x8f9766,_0x47dcda){return function(_0x1fc0a1){_0x47dcda['emit'](_0x8f9766,_0x1fc0a1);};}function removeListener(_0x313a58,_0x3a7010){return function(){MailInteractionEvents['removeListener'](_0x313a58,_0x3a7010);};}exports['register']=function(_0x535e2a){for(var _0x43d013=0x0,_0x18590b=events[_0xcf2a('0x4')];_0x43d013<_0x18590b;_0x43d013++){var _0x3bee5c=events[_0x43d013];var _0x1297b4=createListener(_0xcf2a('0x5')+_0x3bee5c,_0x535e2a);MailInteractionEvents['on'](_0x3bee5c,_0x1297b4);}};
\ No newline at end of file
+var _0x0144=['update','emit','removeListener','register','length','mailInteraction:','./mailInteraction.events','remove'];(function(_0x40579e,_0x1f4bcc){var _0x406aee=function(_0x149f47){while(--_0x149f47){_0x40579e['push'](_0x40579e['shift']());}};_0x406aee(++_0x1f4bcc);}(_0x0144,0x16e));var _0x4014=function(_0x55e08b,_0x421620){_0x55e08b=_0x55e08b-0x0;var _0xd1a7ff=_0x0144[_0x55e08b];return _0xd1a7ff;};'use strict';var MailInteractionEvents=require(_0x4014('0x0'));var events=['save',_0x4014('0x1'),_0x4014('0x2')];function createListener(_0xa9245b,_0x220b6b){return function(_0x54e407){_0x220b6b[_0x4014('0x3')](_0xa9245b,_0x54e407);};}function removeListener(_0x48cb88,_0x3cf902){return function(){MailInteractionEvents[_0x4014('0x4')](_0x48cb88,_0x3cf902);};}exports[_0x4014('0x5')]=function(_0x3b606b){for(var _0x43eba2=0x0,_0x1e0a51=events[_0x4014('0x6')];_0x43eba2<_0x1e0a51;_0x43eba2++){var _0x161980=events[_0x43eba2];var _0x5801ce=createListener(_0x4014('0x7')+_0x161980,_0x3b606b);MailInteractionEvents['on'](_0x161980,_0x5801ce);}};
\ No newline at end of file
diff --git a/server/api/mailMessage/index.js b/server/api/mailMessage/index.js
index e9a6b8b..018507d 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 _0x9a19=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailMessage.controller','get','isAuthenticated','index','/describe','/:id','/:id/download','download','post','mail','mailmessage:create','create','put','update','/:id/accept','accept','/:id/reject','reject','destroy','exports','multer','util','path','express'];(function(_0x353530,_0x2ba8dd){var _0x3815b8=function(_0x205909){while(--_0x205909){_0x353530['push'](_0x353530['shift']());}};_0x3815b8(++_0x2ba8dd);}(_0x9a19,0x114));var _0x99a1=function(_0x11a220,_0x4e470a){_0x11a220=_0x11a220-0x0;var _0x20d8fe=_0x9a19[_0x11a220];return _0x20d8fe;};'use strict';var multer=require(_0x99a1('0x0'));var util=require(_0x99a1('0x1'));var path=require(_0x99a1('0x2'));var timeout=require('connect-timeout');var express=require(_0x99a1('0x3'));var router=express[_0x99a1('0x4')]();var auth=require(_0x99a1('0x5'));var interaction=require(_0x99a1('0x6'));var config=require(_0x99a1('0x7'));var controller=require(_0x99a1('0x8'));router[_0x99a1('0x9')]('/',auth[_0x99a1('0xa')](),controller[_0x99a1('0xb')]);router[_0x99a1('0x9')](_0x99a1('0xc'),auth['isAuthenticated'](),controller['describe']);router['get'](_0x99a1('0xd'),auth[_0x99a1('0xa')](),controller['show']);router['get'](_0x99a1('0xe'),auth[_0x99a1('0xa')](),controller[_0x99a1('0xf')]);router[_0x99a1('0x10')]('/',auth[_0x99a1('0xa')](),interaction['tracked'](_0x99a1('0x11'),_0x99a1('0x12')),controller[_0x99a1('0x13')]);router[_0x99a1('0x14')](_0x99a1('0xd'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x15')]);router[_0x99a1('0x14')](_0x99a1('0x16'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x17')]);router[_0x99a1('0x14')](_0x99a1('0x18'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x19')]);router['delete'](_0x99a1('0xd'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x1a')]);module[_0x99a1('0x1b')]=router;
\ No newline at end of file
+var _0x9a19=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailMessage.controller','get','isAuthenticated','index','/describe','/:id','/:id/download','download','post','mail','mailmessage:create','create','put','update','/:id/accept','accept','/:id/reject','reject','destroy','exports','multer','util','path','express'];(function(_0x524584,_0x538dc6){var _0x4b99ca=function(_0x898ea1){while(--_0x898ea1){_0x524584['push'](_0x524584['shift']());}};_0x4b99ca(++_0x538dc6);}(_0x9a19,0x114));var _0x99a1=function(_0x53bcc3,_0x364374){_0x53bcc3=_0x53bcc3-0x0;var _0x47c959=_0x9a19[_0x53bcc3];return _0x47c959;};'use strict';var multer=require(_0x99a1('0x0'));var util=require(_0x99a1('0x1'));var path=require(_0x99a1('0x2'));var timeout=require('connect-timeout');var express=require(_0x99a1('0x3'));var router=express[_0x99a1('0x4')]();var auth=require(_0x99a1('0x5'));var interaction=require(_0x99a1('0x6'));var config=require(_0x99a1('0x7'));var controller=require(_0x99a1('0x8'));router[_0x99a1('0x9')]('/',auth[_0x99a1('0xa')](),controller[_0x99a1('0xb')]);router[_0x99a1('0x9')](_0x99a1('0xc'),auth['isAuthenticated'](),controller['describe']);router['get'](_0x99a1('0xd'),auth[_0x99a1('0xa')](),controller['show']);router['get'](_0x99a1('0xe'),auth[_0x99a1('0xa')](),controller[_0x99a1('0xf')]);router[_0x99a1('0x10')]('/',auth[_0x99a1('0xa')](),interaction['tracked'](_0x99a1('0x11'),_0x99a1('0x12')),controller[_0x99a1('0x13')]);router[_0x99a1('0x14')](_0x99a1('0xd'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x15')]);router[_0x99a1('0x14')](_0x99a1('0x16'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x17')]);router[_0x99a1('0x14')](_0x99a1('0x18'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x19')]);router['delete'](_0x99a1('0xd'),auth[_0x99a1('0xa')](),controller[_0x99a1('0x1a')]);module[_0x99a1('0x1b')]=router;
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.attributes.js b/server/api/mailMessage/mailMessage.attributes.js
index 274f69e..98c311c 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 _0x0f97=['lodash','exports','TEXT','long','medium','BOOLEAN','ENUM','out','DATE','INTEGER','sequelize'];(function(_0x1af05b,_0x5134b5){var _0x5be7cc=function(_0x2d4ac0){while(--_0x2d4ac0){_0x1af05b['push'](_0x1af05b['shift']());}};_0x5be7cc(++_0x5134b5);}(_0x0f97,0x196));var _0x70f9=function(_0x264d4d,_0x118fb5){_0x264d4d=_0x264d4d-0x0;var _0xc917e2=_0x0f97[_0x264d4d];return _0xc917e2;};'use strict';var Sequelize=require(_0x70f9('0x0'));var _=require(_0x70f9('0x1'));module[_0x70f9('0x2')]={'body':{'type':Sequelize[_0x70f9('0x3')](_0x70f9('0x4')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x70f9('0x3')](_0x70f9('0x5'))},'read':{'type':Sequelize[_0x70f9('0x6')],'defaultValue':![]},'direction':{'type':Sequelize[_0x70f9('0x7')]('in',_0x70f9('0x8')),'defaultValue':_0x70f9('0x8'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0x1fe)},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize[_0x70f9('0x3')](_0x70f9('0x4'))},'cc':{'type':Sequelize[_0x70f9('0x3')](_0x70f9('0x4'))},'bcc':{'type':Sequelize['TEXT']('long')},'subject':{'type':Sequelize[_0x70f9('0x3')]},'sentAt':{'type':Sequelize[_0x70f9('0x9')]},'attach':{'type':Sequelize[_0x70f9('0xa')],'defaultValue':0x0},'secret':{'type':Sequelize[_0x70f9('0x6')],'defaultValue':![]},'readAt':{'type':Sequelize['DATE']},'originTo':{'type':Sequelize['TEXT']('long')},'originCc':{'type':Sequelize['TEXT'](_0x70f9('0x4'))}};
\ No newline at end of file
+var _0xcabe=['sequelize','exports','TEXT','medium','ENUM','out','STRING','long','DATE'];(function(_0x2882da,_0x467427){var _0x351813=function(_0x195616){while(--_0x195616){_0x2882da['push'](_0x2882da['shift']());}};_0x351813(++_0x467427);}(_0xcabe,0x1ef));var _0xecab=function(_0x1b2c64,_0x4d1ed0){_0x1b2c64=_0x1b2c64-0x0;var _0x22fb21=_0xcabe[_0x1b2c64];return _0x22fb21;};'use strict';var Sequelize=require(_0xecab('0x0'));var _=require('lodash');module[_0xecab('0x1')]={'body':{'type':Sequelize[_0xecab('0x2')]('long'),'allowNull':![]},'plainBody':{'type':Sequelize[_0xecab('0x2')](_0xecab('0x3'))},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xecab('0x4')]('in',_0xecab('0x5')),'defaultValue':_0xecab('0x5'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0x1fe)},'from':{'type':Sequelize[_0xecab('0x6')]},'to':{'type':Sequelize[_0xecab('0x2')](_0xecab('0x7'))},'cc':{'type':Sequelize[_0xecab('0x2')](_0xecab('0x7'))},'bcc':{'type':Sequelize[_0xecab('0x2')](_0xecab('0x7'))},'subject':{'type':Sequelize[_0xecab('0x2')]},'sentAt':{'type':Sequelize[_0xecab('0x8')]},'attach':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'readAt':{'type':Sequelize[_0xecab('0x8')]},'originTo':{'type':Sequelize[_0xecab('0x2')]('long')},'originCc':{'type':Sequelize[_0xecab('0x2')](_0xecab('0x7'))}};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.controller.js b/server/api/mailMessage/mailMessage.controller.js
index 11f31aa..916895a 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 _0x6df2=['message','end','status','count','offset','limit','set','Content-Range','json','reject','save','update','destroy','sendStatus','stack','name','index','map','rawAttributes','fieldName','type','model','query','keys','filters','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','MailMessage','includeAll','include','findAll','catch','show','params','intersection','body','find','describe','direction','out','secret','split','MailAccount','findOne','MailAccountId','CmList','List','Contacts','updatedAt','DESC','MailServerOut','isNil','Smtp','host','port','secure','authentication','service','auth','user','pass','attachments','join','root','server/files/attachments','create','List\x20not\x20found','sendMail','messageId','format','mail-interactions','mail','read','readAt','YYYY-MM-DD\x20HH:mm:ss','UserId','Contact','get','MailInteraction','MailInteractionId','interaction','role','acceptMessage','manual','interface','channel','event','accept','EventManager','acceptmessage','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','rejectmessage','unix','toString','server','files','message-%s.eml','from','bcc','subject','Attachment','Attachments','createdAt','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','basename','existsSync','push','build','writeFileSync','download','log','err','unlinkSync','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailMessage.socket','register','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','MailMessage,\x20%s,\x20%s','debug','MailMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6df2,0x12b));var _0x26df=function(_0x55e661,_0x434680){_0x55e661=_0x55e661-0x0;var _0x2c2238=_0x6df2[_0x55e661];return _0x2c2238;};'use strict';var pdf=require(_0x26df('0x0'));var emlformat=require(_0x26df('0x1'));var rimraf=require(_0x26df('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x26df('0x3'));var rp=require(_0x26df('0x4'));var moment=require(_0x26df('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x26df('0x6'));var path=require(_0x26df('0x7'));var sox=require(_0x26df('0x8'));var csv=require(_0x26df('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x26df('0xa'));var squel=require(_0x26df('0xb'));var crypto=require(_0x26df('0xc'));var jsforce=require(_0x26df('0xd'));var deskjs=require(_0x26df('0xe'));var toCsv=require(_0x26df('0x9'));var querystring=require(_0x26df('0xf'));var Papa=require(_0x26df('0x10'));var Redis=require(_0x26df('0x11'));var authService=require(_0x26df('0x12'));var qs=require(_0x26df('0x13'));var as=require(_0x26df('0x14'));var hardwareService=require(_0x26df('0x15'));var logger=require(_0x26df('0x16'))(_0x26df('0x17'));var utils=require('../../config/utils');var config=require(_0x26df('0x18'));var db=require(_0x26df('0x19'))['db'];config[_0x26df('0x1a')]=_[_0x26df('0x1b')](config[_0x26df('0x1a')],{'host':_0x26df('0x1c'),'port':0x18eb});var socket=require(_0x26df('0x1d'))(new Redis(config[_0x26df('0x1a')]));require(_0x26df('0x1e'))[_0x26df('0x1f')](socket);var jayson=require('jayson/promise');var client=jayson[_0x26df('0x20')][_0x26df('0x21')]({'port':0x232c});var client9003=jayson[_0x26df('0x20')][_0x26df('0x21')]({'port':0x232b});var client9002=jayson[_0x26df('0x20')][_0x26df('0x21')]({'port':0x232a});function checkPasswordPattern(_0x560634,_0x5a291a,_0x4d1005){if(_0x4d1005){var _0x4f3a54=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4f3a54[_0x26df('0x22')](_0x5a291a)){return _0x560634;}else{throw new db[(_0x26df('0x23'))][(_0x26df('0x24'))](_0x26df('0x25'));}}else{return _0x560634;}}function respondWithRpcPromise(_0x51670f,_0x1e69c2,_0x4c1572,_0x347dba){return new BPromise(function(_0x516676,_0x4c1e9c){var _0x52484f=_0x347dba||client;return _0x52484f['request'](_0x51670f,_0x4c1572)[_0x26df('0x26')](function(_0x2f5477){logger[_0x26df('0x27')](_0x26df('0x28'),_0x1e69c2,'request\x20sent');logger[_0x26df('0x29')](_0x26df('0x2a'),_0x1e69c2,_0x26df('0x2b'),JSON[_0x26df('0x2c')](_0x2f5477));if(_0x2f5477['error']){if(_0x2f5477[_0x26df('0x2d')][_0x26df('0x2e')]===0x1f4){logger[_0x26df('0x2d')](_0x26df('0x28'),_0x1e69c2,_0x2f5477[_0x26df('0x2d')][_0x26df('0x2f')]);return _0x4c1e9c(_0x2f5477['error'][_0x26df('0x2f')]);}logger[_0x26df('0x2d')](_0x26df('0x28'),_0x1e69c2,_0x2f5477['error'][_0x26df('0x2f')]);return _0x516676(_0x2f5477[_0x26df('0x2d')][_0x26df('0x2f')]);}else{logger[_0x26df('0x27')](_0x26df('0x28'),_0x1e69c2,'request\x20sent');_0x516676(_0x2f5477['result'][_0x26df('0x2f')]);}})['catch'](function(_0x192bc2){logger['error']('MailMessage,\x20%s,\x20%s',_0x1e69c2,_0x192bc2);_0x4c1e9c(_0x192bc2);});});}function respondWithStatusCode(_0x244c9c,_0x3ed4e5){_0x3ed4e5=_0x3ed4e5||0xcc;return function(_0x12739f){if(_0x12739f){return _0x244c9c['sendStatus'](_0x3ed4e5);}return _0x244c9c['status'](_0x3ed4e5)[_0x26df('0x30')]();};}function respondWithResult(_0x274774,_0x7f2882){_0x7f2882=_0x7f2882||0xc8;return function(_0x3cf52c){if(_0x3cf52c){return _0x274774[_0x26df('0x31')](_0x7f2882)['json'](_0x3cf52c);}};}function respondWithFilteredResult(_0x386ba5,_0x17d430){return function(_0x444cef){if(_0x444cef){var _0x4bcb2b=_0x444cef[_0x26df('0x32')],_0x401164=_0x17d430['offset'],_0x171611=_0x17d430[_0x26df('0x33')]+_0x17d430[_0x26df('0x34')],_0x2a6261;if(_0x171611>=_0x4bcb2b){_0x171611=_0x4bcb2b;_0x2a6261=0xc8;}else{_0x2a6261=0xce;}_0x386ba5[_0x26df('0x31')](_0x2a6261);return _0x386ba5[_0x26df('0x35')](_0x26df('0x36'),_0x401164+'-'+_0x171611+'/'+_0x4bcb2b)[_0x26df('0x37')](_0x444cef);}return null;};}function patchUpdates(_0x2d3e96){return function(_0xa2f2ad){try{jsonpatch['apply'](_0xa2f2ad,_0x2d3e96,!![]);}catch(_0x109a34){return BPromise[_0x26df('0x38')](_0x109a34);}return _0xa2f2ad[_0x26df('0x39')]();};}function saveUpdates(_0x5affe7,_0x2c6676){return function(_0x33f339){if(_0x33f339){return _0x33f339[_0x26df('0x3a')](_0x5affe7)['then'](function(_0x1d7479){return _0x1d7479;});}return null;};}function removeEntity(_0x29e3e5,_0x569a26){return function(_0x2b37f3){if(_0x2b37f3){return _0x2b37f3[_0x26df('0x3b')]()[_0x26df('0x26')](function(){_0x29e3e5[_0x26df('0x31')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2aaf9b,_0x47b775){return function(_0x32f44f){if(!_0x32f44f){_0x2aaf9b[_0x26df('0x3c')](0x194);}return _0x32f44f;};}function handleError(_0x15c3cf,_0x440ca3){_0x440ca3=_0x440ca3||0x1f4;return function(_0x35dcd6){logger[_0x26df('0x2d')](_0x35dcd6[_0x26df('0x3d')]);if(_0x35dcd6[_0x26df('0x3e')]){delete _0x35dcd6['name'];}_0x15c3cf[_0x26df('0x31')](_0x440ca3)['send'](_0x35dcd6);};}exports[_0x26df('0x3f')]=function(_0x56326c,_0x5f39ae){var _0x5253a3={},_0xbc5070={},_0x51c687={'count':0x0,'rows':[]};var _0x59bec7=_[_0x26df('0x40')](db['MailMessage'][_0x26df('0x41')],function(_0x3048d7){return{'name':_0x3048d7[_0x26df('0x42')],'type':_0x3048d7[_0x26df('0x43')]['key']};});_0xbc5070[_0x26df('0x44')]=_[_0x26df('0x40')](_0x59bec7,_0x26df('0x3e'));_0xbc5070[_0x26df('0x45')]=_[_0x26df('0x46')](_0x56326c['query']);_0xbc5070[_0x26df('0x47')]=_['intersection'](_0xbc5070[_0x26df('0x44')],_0xbc5070[_0x26df('0x45')]);_0x5253a3['attributes']=_['intersection'](_0xbc5070[_0x26df('0x44')],qs[_0x26df('0x48')](_0x56326c[_0x26df('0x45')][_0x26df('0x48')]));_0x5253a3['attributes']=_0x5253a3[_0x26df('0x49')][_0x26df('0x4a')]?_0x5253a3[_0x26df('0x49')]:_0xbc5070[_0x26df('0x44')];if(!_0x56326c[_0x26df('0x45')][_0x26df('0x4b')](_0x26df('0x4c'))){_0x5253a3[_0x26df('0x34')]=qs[_0x26df('0x34')](_0x56326c[_0x26df('0x45')]['limit']);_0x5253a3[_0x26df('0x33')]=qs[_0x26df('0x33')](_0x56326c[_0x26df('0x45')][_0x26df('0x33')]);}_0x5253a3[_0x26df('0x4d')]=qs[_0x26df('0x4e')](_0x56326c[_0x26df('0x45')]['sort']);_0x5253a3[_0x26df('0x4f')]=qs[_0x26df('0x47')](_['pick'](_0x56326c[_0x26df('0x45')],_0xbc5070[_0x26df('0x47')]));if(_0x56326c[_0x26df('0x45')][_0x26df('0x50')]){_0x5253a3['where']=_['merge'](_0x5253a3['where'],{'$or':_[_0x26df('0x40')](_0x59bec7,function(_0x48d806){if(_0x48d806['type']!=='VIRTUAL'){var _0x4a4a2a={};_0x4a4a2a[_0x48d806[_0x26df('0x3e')]]={'$like':'%'+_0x56326c[_0x26df('0x45')][_0x26df('0x50')]+'%'};return _0x4a4a2a;}})});}_0x5253a3=_[_0x26df('0x51')]({},_0x5253a3,_0x56326c[_0x26df('0x52')]);var _0x434a78={'where':_0x5253a3[_0x26df('0x4f')]};return db[_0x26df('0x53')]['count'](_0x434a78)[_0x26df('0x26')](function(_0x593663){_0x51c687['count']=_0x593663;if(_0x56326c['query'][_0x26df('0x54')]){_0x5253a3[_0x26df('0x55')]=[{'all':!![]}];}return db[_0x26df('0x53')][_0x26df('0x56')](_0x5253a3);})[_0x26df('0x26')](function(_0x1d362d){_0x51c687['rows']=_0x1d362d;return _0x51c687;})[_0x26df('0x26')](respondWithFilteredResult(_0x5f39ae,_0x5253a3))[_0x26df('0x57')](handleError(_0x5f39ae,null));};exports[_0x26df('0x58')]=function(_0x2b7e71,_0x5ad11c){var _0x17b93b={'raw':!![],'where':{'id':_0x2b7e71[_0x26df('0x59')]['id']}},_0x255f0d={};_0x255f0d[_0x26df('0x44')]=_[_0x26df('0x46')](db[_0x26df('0x53')][_0x26df('0x41')]);_0x255f0d[_0x26df('0x45')]=_['keys'](_0x2b7e71[_0x26df('0x45')]);_0x255f0d[_0x26df('0x47')]=_[_0x26df('0x5a')](_0x255f0d[_0x26df('0x44')],_0x255f0d[_0x26df('0x45')]);_0x17b93b[_0x26df('0x49')]=_[_0x26df('0x5a')](_0x255f0d[_0x26df('0x44')],qs[_0x26df('0x48')](_0x2b7e71[_0x26df('0x45')][_0x26df('0x48')]));_0x17b93b[_0x26df('0x49')]=_0x17b93b['attributes'][_0x26df('0x4a')]?_0x17b93b[_0x26df('0x49')]:_0x255f0d[_0x26df('0x44')];if(_0x2b7e71[_0x26df('0x45')][_0x26df('0x54')]){_0x17b93b[_0x26df('0x55')]=[{'all':!![]}];}_0x17b93b=_[_0x26df('0x51')]({},_0x17b93b,_0x2b7e71[_0x26df('0x52')]);return db['MailMessage']['find'](_0x17b93b)[_0x26df('0x26')](handleEntityNotFound(_0x5ad11c,null))[_0x26df('0x26')](respondWithResult(_0x5ad11c,null))[_0x26df('0x57')](handleError(_0x5ad11c,null));};exports[_0x26df('0x3a')]=function(_0x20b401,_0x1a172d){if(_0x20b401[_0x26df('0x5b')]['id']){delete _0x20b401['body']['id'];}return db['MailMessage'][_0x26df('0x5c')]({'where':{'id':_0x20b401['params']['id']}})[_0x26df('0x26')](handleEntityNotFound(_0x1a172d,null))[_0x26df('0x26')](saveUpdates(_0x20b401[_0x26df('0x5b')],null))[_0x26df('0x26')](respondWithResult(_0x1a172d,null))[_0x26df('0x57')](handleError(_0x1a172d,null));};exports['destroy']=function(_0x23d1fd,_0x57a6ad){return db[_0x26df('0x53')][_0x26df('0x5c')]({'where':{'id':_0x23d1fd[_0x26df('0x59')]['id']}})[_0x26df('0x26')](handleEntityNotFound(_0x57a6ad,null))[_0x26df('0x26')](removeEntity(_0x57a6ad,null))[_0x26df('0x57')](handleError(_0x57a6ad,null));};exports[_0x26df('0x5d')]=function(_0x5afc09,_0xf82192){return db[_0x26df('0x53')][_0x26df('0x5d')]()[_0x26df('0x26')](respondWithResult(_0xf82192,null))[_0x26df('0x57')](handleError(_0xf82192,null));};exports['create']=function(_0xddb4ab,_0x3c78c0){return db[_0x26df('0x53')]['create'](_0xddb4ab[_0x26df('0x5b')])[_0x26df('0x26')](function(_0x44344f){if(_0x44344f){if(_0x44344f[_0x26df('0x5e')]===_0x26df('0x5f')&&!_0x44344f[_0x26df('0x60')]){var _0x4f4ea3,_0x419ece,_0xe498f5;if(_0xddb4ab['body']['to']){_0x419ece=_0xddb4ab[_0x26df('0x5b')]['to'][_0x26df('0x61')](',')[0x0];}return db[_0x26df('0x62')][_0x26df('0x63')]({'where':{'id':_0x44344f[_0x26df('0x64')]},'include':[{'model':db[_0x26df('0x65')],'as':_0x26df('0x66'),'include':[{'model':db['CmContact'],'as':_0x26df('0x67'),'where':{'email':_0x419ece},'limit':0x1,'order':[[_0x26df('0x68'),_0x26df('0x69')]]}]},{'model':db[_0x26df('0x6a')],'as':'Smtp','raw':!![]}]})[_0x26df('0x26')](function(_0x2d4070){_0x4f4ea3=_0x2d4070;if(_0x4f4ea3&&_0x4f4ea3['Smtp']){var _0x159134={'tls':{'rejectUnauthorized':![]}};if(_[_0x26df('0x6b')](_0x4f4ea3[_0x26df('0x6c')]['service'])){_0x159134[_0x26df('0x6d')]=_0x4f4ea3[_0x26df('0x6c')]['host'];_0x159134[_0x26df('0x6e')]=_0x4f4ea3[_0x26df('0x6c')]['port'];_0x159134[_0x26df('0x6f')]=_0x4f4ea3[_0x26df('0x6c')][_0x26df('0x6f')];if(_0x4f4ea3[_0x26df('0x6c')][_0x26df('0x70')]){_0x159134['auth']={'user':_0x4f4ea3['Smtp']['user'],'pass':_0x4f4ea3['Smtp']['pass']};}}else{_0x159134[_0x26df('0x71')]=_0x4f4ea3[_0x26df('0x6c')][_0x26df('0x71')];_0x159134[_0x26df('0x72')]={'user':_0x4f4ea3[_0x26df('0x6c')][_0x26df('0x73')],'pass':_0x4f4ea3['Smtp'][_0x26df('0x74')]};_0x159134[_0x26df('0x6f')]=_0x4f4ea3[_0x26df('0x6c')][_0x26df('0x6f')];}if(_0xddb4ab[_0x26df('0x5b')]['attachments']&&_0xddb4ab['body'][_0x26df('0x75')]['length']){for(var _0xf11130=0x0;_0xf11130<_0xddb4ab['body'][_0x26df('0x75')][_0x26df('0x4a')];_0xf11130+=0x1){_0xddb4ab[_0x26df('0x5b')][_0x26df('0x75')][_0xf11130]={'filename':_0xddb4ab[_0x26df('0x5b')][_0x26df('0x75')][_0xf11130]['name'],'path':path[_0x26df('0x76')](config[_0x26df('0x77')],_0x26df('0x78'),_0xddb4ab[_0x26df('0x5b')][_0x26df('0x75')][_0xf11130]['basename'])};}}_0xe498f5={'account':_0x159134,'message':_0xddb4ab['body']};return;}})[_0x26df('0x26')](function(){if(_0x4f4ea3[_0x26df('0x66')]){if(_0x4f4ea3[_0x26df('0x66')][_0x26df('0x67')][_0x26df('0x4a')]){return _0x4f4ea3[_0x26df('0x66')][_0x26df('0x67')][0x0];}else{return db['CmContact'][_0x26df('0x79')](_[_0x26df('0x1b')](_0xddb4ab[_0x26df('0x5b')],{'firstName':_0xddb4ab[_0x26df('0x5b')]['to'],'email':_0xddb4ab[_0x26df('0x5b')]['to'],'phone':_0xddb4ab[_0x26df('0x5b')]['to'],'ListId':_0x4f4ea3['ListId']}));}}else{throw new Error(_0x26df('0x7a'));}})[_0x26df('0x26')](function(){if(_0xe498f5){return respondWithRpcPromise('SendMail',_0x26df('0x7b'),_0xe498f5,client9003)[_0x26df('0x26')](function(_0x2e7a77){return _0x44344f[_0x26df('0x3a')]({'read':!![],'messageId':_0x2e7a77[_0x26df('0x7c')],'sentAt':moment()[_0x26df('0x7d')]('YYYY-MM-DD\x20HH:mm:ss')});})[_0x26df('0x57')](function(_0x1f35e0){logger[_0x26df('0x2d')]('%s',JSON['stringify'](_0x1f35e0));return _0x44344f;});}return _0x44344f;});}return _0x44344f;}})[_0x26df('0x26')](respondWithResult(_0x3c78c0,0xc9))[_0x26df('0x57')](handleError(_0x3c78c0,null));};var interaction_log=require(_0x26df('0x16'))(_0x26df('0x7e'));exports['accept']=function(_0x245d4a,_0x44d9ca,_0x288b6c){var _0x3a9efe={'channel':_0x26df('0x7f')};if(_0x245d4a[_0x26df('0x5b')]['id']){delete _0x245d4a[_0x26df('0x5b')]['id'];}_0x245d4a[_0x26df('0x5b')][_0x26df('0x80')]=!![];_0x245d4a[_0x26df('0x5b')][_0x26df('0x81')]=moment()[_0x26df('0x7d')](_0x26df('0x82'));_0x245d4a[_0x26df('0x5b')][_0x26df('0x83')]=_0x245d4a[_0x26df('0x5b')]['UserId']||_0x245d4a['user']['id'];return db[_0x26df('0x53')][_0x26df('0x5c')]({'where':{'id':_0x245d4a[_0x26df('0x59')]['id'],'UserId':null},'include':[{'model':db['CmContact'],'as':_0x26df('0x84')}]})[_0x26df('0x26')](handleEntityNotFound(_0x44d9ca,null))['then'](saveUpdates(_0x245d4a['body'],null))['then'](function(_0x10732d){if(_0x10732d){_0x3a9efe[_0x26df('0x2f')]=_0x10732d[_0x26df('0x85')]({'plain':!![]});return db[_0x26df('0x86')][_0x26df('0x5c')]({'where':{'id':_0x10732d[_0x26df('0x87')]}});}return null;})[_0x26df('0x26')](handleEntityNotFound(_0x44d9ca,null))['then'](function(_0xb8dcac){if(_0xb8dcac){return _0xb8dcac[_0x26df('0x3a')]({'UserId':_0x245d4a[_0x26df('0x5b')][_0x26df('0x83')],'read1stAt':_[_0x26df('0x6b')](_0xb8dcac['read1stAt'])?moment()[_0x26df('0x7d')](_0x26df('0x82')):undefined});}return null;})[_0x26df('0x26')](function(_0x5056f8){if(_0x5056f8){_0x3a9efe[_0x26df('0x88')]=_0x5056f8[_0x26df('0x85')]({'plain':!![]});interaction_log[_0x26df('0x27')]('[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x245d4a[_0x26df('0x73')]['id'],_0x245d4a[_0x26df('0x73')][_0x26df('0x3e')],_0x245d4a['user'][_0x26df('0x89')],_0x3a9efe[_0x26df('0x88')]['id'],_0x245d4a[_0x26df('0x5b')]?JSON[_0x26df('0x2c')](_0x245d4a[_0x26df('0x5b')]):'null');return respondWithRpcPromise('AcceptMessage',_0x26df('0x8a'),_0x3a9efe);}return null;})[_0x26df('0x26')](function(_0x3b74e4){if(_0x3b74e4){if(_0x245d4a[_0x26df('0x5b')][_0x26df('0x8b')]){_0x3a9efe[_0x26df('0x2f')][_0x26df('0x8c')]=util[_0x26df('0x7d')]('SIP/%s',_0x245d4a['user'][_0x26df('0x3e')]);_0x3a9efe['message'][_0x26df('0x8d')]=_0x3a9efe[_0x26df('0x8d')];_0x3a9efe[_0x26df('0x2f')][_0x26df('0x8e')]=_0x26df('0x8f');return respondWithRpcPromise('EventManager',_0x26df('0x90'),{'event':_0x26df('0x91'),'message':_0x3a9efe[_0x26df('0x2f')]},client9002)[_0x26df('0x26')](function(){return _0x3a9efe;});}return _0x3a9efe;}return null;})['then'](respondWithResult(_0x44d9ca,null))[_0x26df('0x57')](handleError(_0x44d9ca,null));};var interaction_log=require(_0x26df('0x16'))(_0x26df('0x7e'));exports[_0x26df('0x38')]=function(_0x3b3787,_0x5ee153,_0x4d057f){var _0x40aa9f={'agent':{},'channel':_0x26df('0x7f')};if(_0x3b3787[_0x26df('0x5b')]['id']){delete _0x3b3787['body']['id'];}_0x3b3787[_0x26df('0x5b')]['UserId']=_0x3b3787[_0x26df('0x5b')][_0x26df('0x83')]||_0x3b3787[_0x26df('0x73')]['id'];_0x40aa9f['agent']['id']=_0x3b3787[_0x26df('0x5b')][_0x26df('0x83')];return db[_0x26df('0x53')][_0x26df('0x5c')]({'where':{'id':_0x3b3787[_0x26df('0x59')]['id'],'UserId':null}})[_0x26df('0x26')](handleEntityNotFound(_0x5ee153,null))[_0x26df('0x26')](function(_0x401922){if(_0x401922){_0x40aa9f[_0x26df('0x2f')]=_0x401922[_0x26df('0x85')]({'plain':!![]});return db[_0x26df('0x86')][_0x26df('0x5c')]({'where':{'id':_0x401922[_0x26df('0x87')]}});}return null;})[_0x26df('0x26')](handleEntityNotFound(_0x5ee153,null))['then'](function(_0x157621){if(_0x157621){_0x40aa9f['interaction']=_0x157621['get']({'plain':!![]});interaction_log[_0x26df('0x27')](_0x26df('0x92'),_0x3b3787[_0x26df('0x73')]['id'],_0x3b3787['user'][_0x26df('0x3e')],_0x3b3787['user'][_0x26df('0x89')],_0x40aa9f[_0x26df('0x88')]['id'],_0x3b3787[_0x26df('0x5b')]?JSON[_0x26df('0x2c')](_0x3b3787[_0x26df('0x5b')]):'null');return respondWithRpcPromise(_0x26df('0x93'),_0x26df('0x94'),_0x40aa9f);}return null;})[_0x26df('0x26')](function(_0x48025d){if(_0x48025d){_0x48025d['message'][_0x26df('0x8c')]=util[_0x26df('0x7d')]('SIP/%s',_0x3b3787[_0x26df('0x73')]['name']);_0x48025d['message']['channel']=_0x40aa9f[_0x26df('0x8d')];_0x48025d[_0x26df('0x2f')][_0x26df('0x8e')]=_0x26df('0x38');respondWithRpcPromise('EventManager',_0x26df('0x90'),{'event':_0x26df('0x95'),'message':_0x48025d['message']},client9002);return _0x40aa9f;}return null;})['then'](respondWithResult(_0x5ee153,null))[_0x26df('0x57')](handleError(_0x5ee153,null));};exports['download']=function(_0x2a20df,_0x1d89ee){var _0x21ebe4=moment()[_0x26df('0x96')]()[_0x26df('0x97')]();var _0x41e681=path['join'](config[_0x26df('0x77')],_0x26df('0x98'),_0x26df('0x99'),'tmp');var _0x3a90e6=path[_0x26df('0x76')](config[_0x26df('0x77')],_0x26df('0x98'),'files',_0x26df('0x75'));var _0x3fd49d=util[_0x26df('0x7d')](_0x26df('0x9a'),_0x21ebe4);return db[_0x26df('0x53')][_0x26df('0x5c')]({'where':{'id':_0x2a20df[_0x26df('0x59')]['id']},'attributes':['id',_0x26df('0x5b'),_0x26df('0x9b'),'to','cc',_0x26df('0x9c'),_0x26df('0x9d'),'createdAt'],'include':_0x2a20df['query'][_0x26df('0x75')]?[{'model':db[_0x26df('0x9e')],'as':_0x26df('0x9f')}]:undefined})[_0x26df('0x26')](handleEntityNotFound(_0x1d89ee,null))[_0x26df('0x26')](function(_0x3df8f1){if(_0x3df8f1){var _0x3db25f=_0x3df8f1;var _0x4bf7f9={'from':_0x3db25f[_0x26df('0x9b')],'to':_0x3db25f['to'],'subject':_0x3db25f[_0x26df('0x9d')],'html':_0x3db25f['body'],'headers':{'Date':moment(_0x3db25f[_0x26df('0xa0')])[_0x26df('0x7d')](_0x26df('0xa1'))},'attachments':[]};if(_0x3df8f1['cc']){_0x4bf7f9['headers']['Cc']=_0x3df8f1['cc'];}if(_0x3df8f1['bcc']){_0x4bf7f9[_0x26df('0xa2')][_0x26df('0xa3')]=_0x3df8f1['bcc'];}return new BPromise(function(_0x458a46,_0x30f6ee){if(_0x3df8f1[_0x26df('0x9f')]){for(var _0x50e9e7=0x0;_0x50e9e7<_0x3df8f1['Attachments'][_0x26df('0x4a')];_0x50e9e7++){var _0x474ae3=_0x3df8f1['Attachments'][_0x50e9e7];var _0x5995cb=path[_0x26df('0x76')](_0x3a90e6,_0x474ae3[_0x26df('0xa4')]);if(fs[_0x26df('0xa5')](_0x5995cb)){_0x4bf7f9[_0x26df('0x75')][_0x26df('0xa6')]({'name':_0x474ae3[_0x26df('0x3e')],'contentType':_0x474ae3['type'],'data':fs['readFileSync'](_0x5995cb)});}}}emlformat[_0x26df('0xa7')](_0x4bf7f9,function(_0x1c50e7,_0x14e85b){if(_0x1c50e7)return _0x30f6ee(_0x1c50e7);fs[_0x26df('0xa8')](path[_0x26df('0x76')](_0x41e681,_0x3fd49d),_0x14e85b);return _0x458a46(_0x14e85b);});});}})[_0x26df('0x26')](function(_0x3af0df){if(_0x3af0df){return _0x1d89ee[_0x26df('0xa9')](path[_0x26df('0x76')](_0x41e681,_0x3fd49d),_0x3fd49d,function(_0x4c82df){if(_0x4c82df){console[_0x26df('0xaa')](_0x26df('0xab'),_0x4c82df);}else{fs[_0x26df('0xac')](path[_0x26df('0x76')](_0x41e681,_0x3fd49d));}});}})[_0x26df('0x57')](handleError(_0x1d89ee,null));};
\ No newline at end of file
+var _0xec5e=['Contacts','DESC','MailServerOut','Smtp','isNil','service','host','port','secure','authentication','auth','user','pass','attachments','join','server/files/attachments','basename','CmContact','defaults','ListId','List\x20not\x20found','SendMail','sendMail','messageId','format','YYYY-MM-DD\x20HH:mm:ss','accept','mail','read','readAt','UserId','get','MailInteraction','MailInteractionId','read1stAt','info','role','interaction','acceptMessage','interface','SIP/%s','channel','event','EventManager','acceptmessage','mail-interactions','agent','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','rejectMessage','reject','download','unix','root','files','server','from','bcc','subject','createdAt','Attachment','headers','Bcc','Attachments','existsSync','push','readFileSync','build','writeFileSync','err','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','redis','localhost','socket.io-emitter','./mailMessage.socket','register','jayson/promise','client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request\x20sent','debug','stringify','error','code','MailMessage,\x20%s,\x20%s','message','result','sendStatus','status','end','offset','Content-Range','json','apply','update','then','destroy','name','send','index','map','MailMessage','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','length','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','catch','show','find','body','params','describe','create','direction','out','split','MailAccountId','CmList','List'];(function(_0x39def1,_0xe38627){var _0x40ad14=function(_0x1cf573){while(--_0x1cf573){_0x39def1['push'](_0x39def1['shift']());}};_0x40ad14(++_0xe38627);}(_0xec5e,0x196));var _0xeec5=function(_0xa96436,_0x656eb1){_0xa96436=_0xa96436-0x0;var _0x310513=_0xec5e[_0xa96436];return _0x310513;};'use strict';var pdf=require(_0xeec5('0x0'));var emlformat=require(_0xeec5('0x1'));var rimraf=require(_0xeec5('0x2'));var zipdir=require(_0xeec5('0x3'));var jsonpatch=require(_0xeec5('0x4'));var rp=require(_0xeec5('0x5'));var moment=require(_0xeec5('0x6'));var BPromise=require(_0xeec5('0x7'));var Mustache=require('mustache');var util=require('util');var path=require(_0xeec5('0x8'));var sox=require(_0xeec5('0x9'));var csv=require(_0xeec5('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xeec5('0xb'));var squel=require('squel');var crypto=require(_0xeec5('0xc'));var jsforce=require(_0xeec5('0xd'));var deskjs=require(_0xeec5('0xe'));var toCsv=require(_0xeec5('0xa'));var querystring=require(_0xeec5('0xf'));var Papa=require(_0xeec5('0x10'));var Redis=require(_0xeec5('0x11'));var authService=require(_0xeec5('0x12'));var qs=require(_0xeec5('0x13'));var as=require(_0xeec5('0x14'));var hardwareService=require(_0xeec5('0x15'));var logger=require(_0xeec5('0x16'))('api');var utils=require(_0xeec5('0x17'));var config=require(_0xeec5('0x18'));var db=require('../../mysqldb')['db'];config[_0xeec5('0x19')]=_['defaults'](config['redis'],{'host':_0xeec5('0x1a'),'port':0x18eb});var socket=require(_0xeec5('0x1b'))(new Redis(config['redis']));require(_0xeec5('0x1c'))[_0xeec5('0x1d')](socket);var jayson=require(_0xeec5('0x1e'));var client=jayson[_0xeec5('0x1f')][_0xeec5('0x20')]({'port':0x232c});var client9003=jayson[_0xeec5('0x1f')][_0xeec5('0x20')]({'port':0x232b});var client9002=jayson[_0xeec5('0x1f')][_0xeec5('0x20')]({'port':0x232a});function checkPasswordPattern(_0x1c0b87,_0x5d4b43,_0x1e39dd){if(_0x1e39dd){var _0x43ebd8=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x43ebd8[_0xeec5('0x21')](_0x5d4b43)){return _0x1c0b87;}else{throw new db['Sequelize'][(_0xeec5('0x22'))](_0xeec5('0x23'));}}else{return _0x1c0b87;}}function respondWithRpcPromise(_0x286920,_0x5a675b,_0x5b1e15,_0x5139f0){return new BPromise(function(_0x336a80,_0x305950){var _0x365b9c=_0x5139f0||client;return _0x365b9c['request'](_0x286920,_0x5b1e15)['then'](function(_0x12b959){logger['info']('MailMessage,\x20%s,\x20%s',_0x5a675b,_0xeec5('0x24'));logger[_0xeec5('0x25')]('MailMessage,\x20%s,\x20%s,\x20%s',_0x5a675b,_0xeec5('0x24'),JSON[_0xeec5('0x26')](_0x12b959));if(_0x12b959['error']){if(_0x12b959[_0xeec5('0x27')][_0xeec5('0x28')]===0x1f4){logger[_0xeec5('0x27')](_0xeec5('0x29'),_0x5a675b,_0x12b959['error'][_0xeec5('0x2a')]);return _0x305950(_0x12b959[_0xeec5('0x27')][_0xeec5('0x2a')]);}logger[_0xeec5('0x27')](_0xeec5('0x29'),_0x5a675b,_0x12b959[_0xeec5('0x27')]['message']);return _0x336a80(_0x12b959['error'][_0xeec5('0x2a')]);}else{logger['info'](_0xeec5('0x29'),_0x5a675b,_0xeec5('0x24'));_0x336a80(_0x12b959[_0xeec5('0x2b')]['message']);}})['catch'](function(_0x2f3327){logger['error'](_0xeec5('0x29'),_0x5a675b,_0x2f3327);_0x305950(_0x2f3327);});});}function respondWithStatusCode(_0x3ef1f0,_0xadd46d){_0xadd46d=_0xadd46d||0xcc;return function(_0x5e9f56){if(_0x5e9f56){return _0x3ef1f0[_0xeec5('0x2c')](_0xadd46d);}return _0x3ef1f0[_0xeec5('0x2d')](_0xadd46d)[_0xeec5('0x2e')]();};}function respondWithResult(_0x253fc7,_0xacefd3){_0xacefd3=_0xacefd3||0xc8;return function(_0xa5e7cf){if(_0xa5e7cf){return _0x253fc7[_0xeec5('0x2d')](_0xacefd3)['json'](_0xa5e7cf);}};}function respondWithFilteredResult(_0x5691ee,_0x556da8){return function(_0x2f8076){if(_0x2f8076){var _0x212e85=_0x2f8076['count'],_0x447ba0=_0x556da8[_0xeec5('0x2f')],_0x1b994a=_0x556da8[_0xeec5('0x2f')]+_0x556da8['limit'],_0xd7e2af;if(_0x1b994a>=_0x212e85){_0x1b994a=_0x212e85;_0xd7e2af=0xc8;}else{_0xd7e2af=0xce;}_0x5691ee[_0xeec5('0x2d')](_0xd7e2af);return _0x5691ee['set'](_0xeec5('0x30'),_0x447ba0+'-'+_0x1b994a+'/'+_0x212e85)[_0xeec5('0x31')](_0x2f8076);}return null;};}function patchUpdates(_0xa657b2){return function(_0x3172e4){try{jsonpatch[_0xeec5('0x32')](_0x3172e4,_0xa657b2,!![]);}catch(_0x3ddc55){return BPromise['reject'](_0x3ddc55);}return _0x3172e4['save']();};}function saveUpdates(_0x57dfb4,_0x4cec41){return function(_0x3544bb){if(_0x3544bb){return _0x3544bb[_0xeec5('0x33')](_0x57dfb4)[_0xeec5('0x34')](function(_0x125236){return _0x125236;});}return null;};}function removeEntity(_0x2f29ea,_0xec074e){return function(_0x419524){if(_0x419524){return _0x419524[_0xeec5('0x35')]()[_0xeec5('0x34')](function(){_0x2f29ea[_0xeec5('0x2d')](0xcc)[_0xeec5('0x2e')]();});}};}function handleEntityNotFound(_0x63780f,_0x2c7ed7){return function(_0x212bda){if(!_0x212bda){_0x63780f[_0xeec5('0x2c')](0x194);}return _0x212bda;};}function handleError(_0x424695,_0x42d71f){_0x42d71f=_0x42d71f||0x1f4;return function(_0xc0d5f0){logger[_0xeec5('0x27')](_0xc0d5f0['stack']);if(_0xc0d5f0['name']){delete _0xc0d5f0[_0xeec5('0x36')];}_0x424695[_0xeec5('0x2d')](_0x42d71f)[_0xeec5('0x37')](_0xc0d5f0);};}exports[_0xeec5('0x38')]=function(_0xe67143,_0x5b8dfa){var _0x2a1628={},_0x7e7ea8={},_0x2ab844={'count':0x0,'rows':[]};var _0x5bc25a=_[_0xeec5('0x39')](db[_0xeec5('0x3a')][_0xeec5('0x3b')],function(_0x548501){return{'name':_0x548501[_0xeec5('0x3c')],'type':_0x548501[_0xeec5('0x3d')][_0xeec5('0x3e')]};});_0x7e7ea8[_0xeec5('0x3f')]=_[_0xeec5('0x39')](_0x5bc25a,_0xeec5('0x36'));_0x7e7ea8['query']=_[_0xeec5('0x40')](_0xe67143[_0xeec5('0x41')]);_0x7e7ea8[_0xeec5('0x42')]=_[_0xeec5('0x43')](_0x7e7ea8[_0xeec5('0x3f')],_0x7e7ea8[_0xeec5('0x41')]);_0x2a1628['attributes']=_['intersection'](_0x7e7ea8['model'],qs[_0xeec5('0x44')](_0xe67143[_0xeec5('0x41')][_0xeec5('0x44')]));_0x2a1628[_0xeec5('0x45')]=_0x2a1628[_0xeec5('0x45')][_0xeec5('0x46')]?_0x2a1628[_0xeec5('0x45')]:_0x7e7ea8[_0xeec5('0x3f')];if(!_0xe67143[_0xeec5('0x41')]['hasOwnProperty'](_0xeec5('0x47'))){_0x2a1628[_0xeec5('0x48')]=qs[_0xeec5('0x48')](_0xe67143['query'][_0xeec5('0x48')]);_0x2a1628[_0xeec5('0x2f')]=qs['offset'](_0xe67143[_0xeec5('0x41')][_0xeec5('0x2f')]);}_0x2a1628[_0xeec5('0x49')]=qs[_0xeec5('0x4a')](_0xe67143[_0xeec5('0x41')][_0xeec5('0x4a')]);_0x2a1628[_0xeec5('0x4b')]=qs[_0xeec5('0x42')](_[_0xeec5('0x4c')](_0xe67143[_0xeec5('0x41')],_0x7e7ea8[_0xeec5('0x42')]));if(_0xe67143[_0xeec5('0x41')][_0xeec5('0x4d')]){_0x2a1628['where']=_[_0xeec5('0x4e')](_0x2a1628[_0xeec5('0x4b')],{'$or':_[_0xeec5('0x39')](_0x5bc25a,function(_0x23eb78){if(_0x23eb78[_0xeec5('0x3d')]!==_0xeec5('0x4f')){var _0x127b82={};_0x127b82[_0x23eb78['name']]={'$like':'%'+_0xe67143[_0xeec5('0x41')][_0xeec5('0x4d')]+'%'};return _0x127b82;}})});}_0x2a1628=_[_0xeec5('0x4e')]({},_0x2a1628,_0xe67143[_0xeec5('0x50')]);var _0x398aa2={'where':_0x2a1628[_0xeec5('0x4b')]};return db[_0xeec5('0x3a')][_0xeec5('0x51')](_0x398aa2)['then'](function(_0x7fd15a){_0x2ab844[_0xeec5('0x51')]=_0x7fd15a;if(_0xe67143[_0xeec5('0x41')][_0xeec5('0x52')]){_0x2a1628[_0xeec5('0x53')]=[{'all':!![]}];}return db[_0xeec5('0x3a')][_0xeec5('0x54')](_0x2a1628);})[_0xeec5('0x34')](function(_0x217bfb){_0x2ab844['rows']=_0x217bfb;return _0x2ab844;})[_0xeec5('0x34')](respondWithFilteredResult(_0x5b8dfa,_0x2a1628))[_0xeec5('0x55')](handleError(_0x5b8dfa,null));};exports[_0xeec5('0x56')]=function(_0x351fef,_0x20d4d1){var _0x1bbc14={'raw':!![],'where':{'id':_0x351fef['params']['id']}},_0x5d768f={};_0x5d768f[_0xeec5('0x3f')]=_[_0xeec5('0x40')](db['MailMessage'][_0xeec5('0x3b')]);_0x5d768f[_0xeec5('0x41')]=_[_0xeec5('0x40')](_0x351fef[_0xeec5('0x41')]);_0x5d768f[_0xeec5('0x42')]=_[_0xeec5('0x43')](_0x5d768f[_0xeec5('0x3f')],_0x5d768f['query']);_0x1bbc14['attributes']=_['intersection'](_0x5d768f['model'],qs[_0xeec5('0x44')](_0x351fef[_0xeec5('0x41')][_0xeec5('0x44')]));_0x1bbc14['attributes']=_0x1bbc14[_0xeec5('0x45')][_0xeec5('0x46')]?_0x1bbc14['attributes']:_0x5d768f[_0xeec5('0x3f')];if(_0x351fef[_0xeec5('0x41')][_0xeec5('0x52')]){_0x1bbc14[_0xeec5('0x53')]=[{'all':!![]}];}_0x1bbc14=_['merge']({},_0x1bbc14,_0x351fef[_0xeec5('0x50')]);return db[_0xeec5('0x3a')][_0xeec5('0x57')](_0x1bbc14)[_0xeec5('0x34')](handleEntityNotFound(_0x20d4d1,null))[_0xeec5('0x34')](respondWithResult(_0x20d4d1,null))[_0xeec5('0x55')](handleError(_0x20d4d1,null));};exports[_0xeec5('0x33')]=function(_0x42bd83,_0x5981f8){if(_0x42bd83[_0xeec5('0x58')]['id']){delete _0x42bd83[_0xeec5('0x58')]['id'];}return db[_0xeec5('0x3a')][_0xeec5('0x57')]({'where':{'id':_0x42bd83[_0xeec5('0x59')]['id']}})[_0xeec5('0x34')](handleEntityNotFound(_0x5981f8,null))[_0xeec5('0x34')](saveUpdates(_0x42bd83[_0xeec5('0x58')],null))['then'](respondWithResult(_0x5981f8,null))['catch'](handleError(_0x5981f8,null));};exports[_0xeec5('0x35')]=function(_0x4e3206,_0x35e9bc){return db[_0xeec5('0x3a')]['find']({'where':{'id':_0x4e3206[_0xeec5('0x59')]['id']}})[_0xeec5('0x34')](handleEntityNotFound(_0x35e9bc,null))[_0xeec5('0x34')](removeEntity(_0x35e9bc,null))['catch'](handleError(_0x35e9bc,null));};exports[_0xeec5('0x5a')]=function(_0x5b1b78,_0x59e11d){return db[_0xeec5('0x3a')][_0xeec5('0x5a')]()[_0xeec5('0x34')](respondWithResult(_0x59e11d,null))[_0xeec5('0x55')](handleError(_0x59e11d,null));};exports[_0xeec5('0x5b')]=function(_0x213f88,_0x115870){return db[_0xeec5('0x3a')][_0xeec5('0x5b')](_0x213f88[_0xeec5('0x58')])[_0xeec5('0x34')](function(_0x237b60){if(_0x237b60){if(_0x237b60[_0xeec5('0x5c')]===_0xeec5('0x5d')&&!_0x237b60['secret']){var _0x4c9767,_0x5a5707,_0x5308a5;if(_0x213f88[_0xeec5('0x58')]['to']){_0x5a5707=_0x213f88[_0xeec5('0x58')]['to'][_0xeec5('0x5e')](',')[0x0];}return db['MailAccount']['findOne']({'where':{'id':_0x237b60[_0xeec5('0x5f')]},'include':[{'model':db[_0xeec5('0x60')],'as':_0xeec5('0x61'),'include':[{'model':db['CmContact'],'as':_0xeec5('0x62'),'where':{'email':_0x5a5707},'limit':0x1,'order':[['updatedAt',_0xeec5('0x63')]]}]},{'model':db[_0xeec5('0x64')],'as':_0xeec5('0x65'),'raw':!![]}]})[_0xeec5('0x34')](function(_0x46eed0){_0x4c9767=_0x46eed0;if(_0x4c9767&&_0x4c9767[_0xeec5('0x65')]){var _0x2ccc2f={'tls':{'rejectUnauthorized':![]}};if(_[_0xeec5('0x66')](_0x4c9767[_0xeec5('0x65')][_0xeec5('0x67')])){_0x2ccc2f[_0xeec5('0x68')]=_0x4c9767['Smtp']['host'];_0x2ccc2f['port']=_0x4c9767[_0xeec5('0x65')][_0xeec5('0x69')];_0x2ccc2f[_0xeec5('0x6a')]=_0x4c9767['Smtp']['secure'];if(_0x4c9767['Smtp'][_0xeec5('0x6b')]){_0x2ccc2f[_0xeec5('0x6c')]={'user':_0x4c9767['Smtp'][_0xeec5('0x6d')],'pass':_0x4c9767[_0xeec5('0x65')][_0xeec5('0x6e')]};}}else{_0x2ccc2f['service']=_0x4c9767[_0xeec5('0x65')][_0xeec5('0x67')];_0x2ccc2f[_0xeec5('0x6c')]={'user':_0x4c9767[_0xeec5('0x65')][_0xeec5('0x6d')],'pass':_0x4c9767[_0xeec5('0x65')]['pass']};_0x2ccc2f[_0xeec5('0x6a')]=_0x4c9767['Smtp'][_0xeec5('0x6a')];}if(_0x213f88[_0xeec5('0x58')]['attachments']&&_0x213f88[_0xeec5('0x58')]['attachments'][_0xeec5('0x46')]){for(var _0x17f097=0x0;_0x17f097<_0x213f88['body']['attachments']['length'];_0x17f097+=0x1){_0x213f88[_0xeec5('0x58')]['attachments'][_0x17f097]={'filename':_0x213f88['body'][_0xeec5('0x6f')][_0x17f097][_0xeec5('0x36')],'path':path[_0xeec5('0x70')](config['root'],_0xeec5('0x71'),_0x213f88[_0xeec5('0x58')][_0xeec5('0x6f')][_0x17f097][_0xeec5('0x72')])};}}_0x5308a5={'account':_0x2ccc2f,'message':_0x213f88[_0xeec5('0x58')]};return;}})[_0xeec5('0x34')](function(){if(_0x4c9767[_0xeec5('0x61')]){if(_0x4c9767[_0xeec5('0x61')]['Contacts'][_0xeec5('0x46')]){return _0x4c9767[_0xeec5('0x61')][_0xeec5('0x62')][0x0];}else{return db[_0xeec5('0x73')][_0xeec5('0x5b')](_[_0xeec5('0x74')](_0x213f88[_0xeec5('0x58')],{'firstName':_0x213f88[_0xeec5('0x58')]['to'],'email':_0x213f88['body']['to'],'phone':_0x213f88[_0xeec5('0x58')]['to'],'ListId':_0x4c9767[_0xeec5('0x75')]}));}}else{throw new Error(_0xeec5('0x76'));}})[_0xeec5('0x34')](function(){if(_0x5308a5){return respondWithRpcPromise(_0xeec5('0x77'),_0xeec5('0x78'),_0x5308a5,client9003)[_0xeec5('0x34')](function(_0x347d4c){return _0x237b60[_0xeec5('0x33')]({'read':!![],'messageId':_0x347d4c[_0xeec5('0x79')],'sentAt':moment()[_0xeec5('0x7a')](_0xeec5('0x7b'))});})['catch'](function(_0x2b46e7){logger[_0xeec5('0x27')]('%s',JSON[_0xeec5('0x26')](_0x2b46e7));return _0x237b60;});}return _0x237b60;});}return _0x237b60;}})[_0xeec5('0x34')](respondWithResult(_0x115870,0xc9))[_0xeec5('0x55')](handleError(_0x115870,null));};var interaction_log=require('../../config/logger')('mail-interactions');exports[_0xeec5('0x7c')]=function(_0x4dbc45,_0x59a645,_0x1511c8){var _0x43d5e4={'channel':_0xeec5('0x7d')};if(_0x4dbc45[_0xeec5('0x58')]['id']){delete _0x4dbc45[_0xeec5('0x58')]['id'];}_0x4dbc45[_0xeec5('0x58')][_0xeec5('0x7e')]=!![];_0x4dbc45[_0xeec5('0x58')][_0xeec5('0x7f')]=moment()[_0xeec5('0x7a')]('YYYY-MM-DD\x20HH:mm:ss');_0x4dbc45[_0xeec5('0x58')][_0xeec5('0x80')]=_0x4dbc45[_0xeec5('0x58')][_0xeec5('0x80')]||_0x4dbc45[_0xeec5('0x6d')]['id'];return db[_0xeec5('0x3a')][_0xeec5('0x57')]({'where':{'id':_0x4dbc45[_0xeec5('0x59')]['id'],'UserId':null},'include':[{'model':db[_0xeec5('0x73')],'as':'Contact'}]})[_0xeec5('0x34')](handleEntityNotFound(_0x59a645,null))[_0xeec5('0x34')](saveUpdates(_0x4dbc45[_0xeec5('0x58')],null))[_0xeec5('0x34')](function(_0x5214f4){if(_0x5214f4){_0x43d5e4[_0xeec5('0x2a')]=_0x5214f4[_0xeec5('0x81')]({'plain':!![]});return db[_0xeec5('0x82')][_0xeec5('0x57')]({'where':{'id':_0x5214f4[_0xeec5('0x83')]}});}return null;})[_0xeec5('0x34')](handleEntityNotFound(_0x59a645,null))[_0xeec5('0x34')](function(_0x315479){if(_0x315479){return _0x315479['update']({'UserId':_0x4dbc45['body'][_0xeec5('0x80')],'read1stAt':_[_0xeec5('0x66')](_0x315479[_0xeec5('0x84')])?moment()[_0xeec5('0x7a')](_0xeec5('0x7b')):undefined});}return null;})[_0xeec5('0x34')](function(_0x4dd18e){if(_0x4dd18e){_0x43d5e4['interaction']=_0x4dd18e['get']({'plain':!![]});interaction_log[_0xeec5('0x85')]('[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x4dbc45['user']['id'],_0x4dbc45[_0xeec5('0x6d')][_0xeec5('0x36')],_0x4dbc45[_0xeec5('0x6d')][_0xeec5('0x86')],_0x43d5e4[_0xeec5('0x87')]['id'],_0x4dbc45[_0xeec5('0x58')]?JSON[_0xeec5('0x26')](_0x4dbc45[_0xeec5('0x58')]):'null');return respondWithRpcPromise('AcceptMessage',_0xeec5('0x88'),_0x43d5e4);}return null;})['then'](function(_0x3024bd){if(_0x3024bd){if(_0x4dbc45[_0xeec5('0x58')]['manual']){_0x43d5e4[_0xeec5('0x2a')][_0xeec5('0x89')]=util[_0xeec5('0x7a')](_0xeec5('0x8a'),_0x4dbc45['user'][_0xeec5('0x36')]);_0x43d5e4[_0xeec5('0x2a')]['channel']=_0x43d5e4[_0xeec5('0x8b')];_0x43d5e4[_0xeec5('0x2a')][_0xeec5('0x8c')]='accept';return respondWithRpcPromise('EventManager',_0xeec5('0x8d'),{'event':_0xeec5('0x8e'),'message':_0x43d5e4[_0xeec5('0x2a')]},client9002)[_0xeec5('0x34')](function(){return _0x43d5e4;});}return _0x43d5e4;}return null;})['then'](respondWithResult(_0x59a645,null))[_0xeec5('0x55')](handleError(_0x59a645,null));};var interaction_log=require(_0xeec5('0x16'))(_0xeec5('0x8f'));exports['reject']=function(_0x1bca4c,_0x362b8c,_0x240c9b){var _0x176a44={'agent':{},'channel':_0xeec5('0x7d')};if(_0x1bca4c[_0xeec5('0x58')]['id']){delete _0x1bca4c[_0xeec5('0x58')]['id'];}_0x1bca4c[_0xeec5('0x58')][_0xeec5('0x80')]=_0x1bca4c[_0xeec5('0x58')][_0xeec5('0x80')]||_0x1bca4c['user']['id'];_0x176a44[_0xeec5('0x90')]['id']=_0x1bca4c[_0xeec5('0x58')][_0xeec5('0x80')];return db[_0xeec5('0x3a')][_0xeec5('0x57')]({'where':{'id':_0x1bca4c[_0xeec5('0x59')]['id'],'UserId':null}})[_0xeec5('0x34')](handleEntityNotFound(_0x362b8c,null))['then'](function(_0x99d74f){if(_0x99d74f){_0x176a44[_0xeec5('0x2a')]=_0x99d74f['get']({'plain':!![]});return db[_0xeec5('0x82')]['find']({'where':{'id':_0x99d74f[_0xeec5('0x83')]}});}return null;})[_0xeec5('0x34')](handleEntityNotFound(_0x362b8c,null))[_0xeec5('0x34')](function(_0x14bcb0){if(_0x14bcb0){_0x176a44[_0xeec5('0x87')]=_0x14bcb0[_0xeec5('0x81')]({'plain':!![]});interaction_log['info'](_0xeec5('0x91'),_0x1bca4c[_0xeec5('0x6d')]['id'],_0x1bca4c[_0xeec5('0x6d')][_0xeec5('0x36')],_0x1bca4c[_0xeec5('0x6d')]['role'],_0x176a44['interaction']['id'],_0x1bca4c[_0xeec5('0x58')]?JSON[_0xeec5('0x26')](_0x1bca4c['body']):_0xeec5('0x92'));return respondWithRpcPromise('RejectMessage',_0xeec5('0x93'),_0x176a44);}return null;})['then'](function(_0x482ad3){if(_0x482ad3){_0x482ad3[_0xeec5('0x2a')][_0xeec5('0x89')]=util[_0xeec5('0x7a')]('SIP/%s',_0x1bca4c[_0xeec5('0x6d')][_0xeec5('0x36')]);_0x482ad3[_0xeec5('0x2a')][_0xeec5('0x8b')]=_0x176a44[_0xeec5('0x8b')];_0x482ad3[_0xeec5('0x2a')][_0xeec5('0x8c')]=_0xeec5('0x94');respondWithRpcPromise(_0xeec5('0x8d'),_0xeec5('0x8d'),{'event':'rejectmessage','message':_0x482ad3[_0xeec5('0x2a')]},client9002);return _0x176a44;}return null;})[_0xeec5('0x34')](respondWithResult(_0x362b8c,null))[_0xeec5('0x55')](handleError(_0x362b8c,null));};exports[_0xeec5('0x95')]=function(_0x12464f,_0x2b0b9f){var _0x349716=moment()[_0xeec5('0x96')]()['toString']();var _0xa2e0cb=path[_0xeec5('0x70')](config[_0xeec5('0x97')],'server',_0xeec5('0x98'),'tmp');var _0x5f4974=path[_0xeec5('0x70')](config[_0xeec5('0x97')],_0xeec5('0x99'),_0xeec5('0x98'),_0xeec5('0x6f'));var _0x1f1db6=util[_0xeec5('0x7a')]('message-%s.eml',_0x349716);return db[_0xeec5('0x3a')][_0xeec5('0x57')]({'where':{'id':_0x12464f['params']['id']},'attributes':['id','body',_0xeec5('0x9a'),'to','cc',_0xeec5('0x9b'),_0xeec5('0x9c'),_0xeec5('0x9d')],'include':_0x12464f[_0xeec5('0x41')][_0xeec5('0x6f')]?[{'model':db[_0xeec5('0x9e')],'as':'Attachments'}]:undefined})[_0xeec5('0x34')](handleEntityNotFound(_0x2b0b9f,null))[_0xeec5('0x34')](function(_0x391f94){if(_0x391f94){var _0x3d7910=_0x391f94;var _0x4e260e={'from':_0x3d7910[_0xeec5('0x9a')],'to':_0x3d7910['to'],'subject':_0x3d7910[_0xeec5('0x9c')],'html':_0x3d7910[_0xeec5('0x58')],'headers':{'Date':moment(_0x3d7910[_0xeec5('0x9d')])[_0xeec5('0x7a')]('ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ')},'attachments':[]};if(_0x391f94['cc']){_0x4e260e[_0xeec5('0x9f')]['Cc']=_0x391f94['cc'];}if(_0x391f94['bcc']){_0x4e260e['headers'][_0xeec5('0xa0')]=_0x391f94['bcc'];}return new BPromise(function(_0x25e0d8,_0x15f2e2){if(_0x391f94[_0xeec5('0xa1')]){for(var _0x2aad79=0x0;_0x2aad79<_0x391f94[_0xeec5('0xa1')][_0xeec5('0x46')];_0x2aad79++){var _0x44cc83=_0x391f94[_0xeec5('0xa1')][_0x2aad79];var _0x154574=path[_0xeec5('0x70')](_0x5f4974,_0x44cc83[_0xeec5('0x72')]);if(fs[_0xeec5('0xa2')](_0x154574)){_0x4e260e[_0xeec5('0x6f')][_0xeec5('0xa3')]({'name':_0x44cc83[_0xeec5('0x36')],'contentType':_0x44cc83[_0xeec5('0x3d')],'data':fs[_0xeec5('0xa4')](_0x154574)});}}}emlformat[_0xeec5('0xa5')](_0x4e260e,function(_0x3bd762,_0xaa3d7a){if(_0x3bd762)return _0x15f2e2(_0x3bd762);fs[_0xeec5('0xa6')](path['join'](_0xa2e0cb,_0x1f1db6),_0xaa3d7a);return _0x25e0d8(_0xaa3d7a);});});}})['then'](function(_0x3c1bb3){if(_0x3c1bb3){return _0x2b0b9f[_0xeec5('0x95')](path['join'](_0xa2e0cb,_0x1f1db6),_0x1f1db6,function(_0x3a25c4){if(_0x3a25c4){console['log'](_0xeec5('0xa7'),_0x3a25c4);}else{fs['unlinkSync'](path[_0xeec5('0x70')](_0xa2e0cb,_0x1f1db6));}});}})[_0xeec5('0x55')](handleError(_0x2b0b9f,null));};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.events.js b/server/api/mailMessage/mailMessage.events.js
index f928d23..fde51b1 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 _0x81de=['emit','hasOwnProperty','exports','events','setMaxListeners','remove'];(function(_0x5539b9,_0x226b75){var _0x349aa0=function(_0x4dee86){while(--_0x4dee86){_0x5539b9['push'](_0x5539b9['shift']());}};_0x349aa0(++_0x226b75);}(_0x81de,0x111));var _0xe81d=function(_0x50ecd2,_0x12c4a9){_0x50ecd2=_0x50ecd2-0x0;var _0x1f5e4f=_0x81de[_0x50ecd2];return _0x1f5e4f;};'use strict';var EventEmitter=require(_0xe81d('0x0'));var MailMessage=require('../../mysqldb')['db']['MailMessage'];var MailMessageEvents=new EventEmitter();MailMessageEvents[_0xe81d('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xe81d('0x2')};function emitEvent(_0x4cb525){return function(_0x3beb87,_0x58c4c7,_0xac2c3e){MailMessageEvents[_0xe81d('0x3')](_0x4cb525+':'+_0x3beb87['id'],_0x3beb87);MailMessageEvents[_0xe81d('0x3')](_0x4cb525,_0x3beb87);_0xac2c3e(null);};}for(var e in events){if(events[_0xe81d('0x4')](e)){var event=events[e];MailMessage['hook'](e,emitEvent(event));}}module[_0xe81d('0x5')]=MailMessageEvents;
\ No newline at end of file
+var _0xb403=['exports','events','../../mysqldb','MailMessage','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x199c03,_0x3254aa){var _0x11a7d4=function(_0x49e1da){while(--_0x49e1da){_0x199c03['push'](_0x199c03['shift']());}};_0x11a7d4(++_0x3254aa);}(_0xb403,0xf1));var _0x3b40=function(_0x1c37fe,_0x10a098){_0x1c37fe=_0x1c37fe-0x0;var _0x45e904=_0xb403[_0x1c37fe];return _0x45e904;};'use strict';var EventEmitter=require(_0x3b40('0x0'));var MailMessage=require(_0x3b40('0x1'))['db'][_0x3b40('0x2')];var MailMessageEvents=new EventEmitter();MailMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x3b40('0x3'),'afterUpdate':_0x3b40('0x4'),'afterDestroy':_0x3b40('0x5')};function emitEvent(_0x21e554){return function(_0x27722f,_0x414e30,_0x35e197){MailMessageEvents[_0x3b40('0x6')](_0x21e554+':'+_0x27722f['id'],_0x27722f);MailMessageEvents[_0x3b40('0x6')](_0x21e554,_0x27722f);_0x35e197(null);};}for(var e in events){if(events[_0x3b40('0x7')](e)){var event=events[e];MailMessage[_0x3b40('0x8')](e,emitEvent(event));}}module[_0x3b40('0x9')]=MailMessageEvents;
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.model.js b/server/api/mailMessage/mailMessage.model.js
index 10f24a3..833623a 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 _0x9e93=['request-promise','html-to-text','rimraf','../../config/environment','exports','define','MailMessage','mail_messages','messageId','plainBody','subject','models','direction','toLowerCase','out','secret','isNil','UserId','MailInteraction','findOne','MailInteractionId','createdAt','body','catch','error','utf8mb4','lodash','../../config/logger','api','moment','bluebird'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x9e93,0x1cc));var _0x39e9=function(_0x19b3f9,_0xade753){_0x19b3f9=_0x19b3f9-0x0;var _0x18c3f6=_0x9e93[_0x19b3f9];return _0x18c3f6;};'use strict';var _=require(_0x39e9('0x0'));var util=require('util');var logger=require(_0x39e9('0x1'))(_0x39e9('0x2'));var moment=require(_0x39e9('0x3'));var BPromise=require(_0x39e9('0x4'));var rp=require(_0x39e9('0x5'));var htmlToText=require(_0x39e9('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x39e9('0x7'));var config=require(_0x39e9('0x8'));var attributes=require('./mailMessage.attributes');module[_0x39e9('0x9')]=function(_0x58bca9,_0x3f99ce){return _0x58bca9[_0x39e9('0xa')](_0x39e9('0xb'),attributes,{'tableName':_0x39e9('0xc'),'paranoid':![],'indexes':[{'name':_0x39e9('0xd'),'fields':[_0x39e9('0xd')]},{'name':'fti_mail_messages','fields':[_0x39e9('0xe'),_0x39e9('0xf')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x559138,_0x6e21d9,_0x3f94f2){if(_0x559138['body']){_0x559138['plainBody']=htmlToText['fromString'](_0x559138['body'],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x3f94f2(null,_0x6e21d9);},'afterCreate':function(_0x3599ff,_0xdae75c,_0xe03316){var _0x19634e=_0x58bca9[_0x39e9('0x10')];var _0x5309f4=_0x3599ff['get']({'plain':!![]});if(_0x5309f4[_0x39e9('0x11')][_0x39e9('0x12')]()==='in'||_0x5309f4[_0x39e9('0x11')][_0x39e9('0x12')]()===_0x39e9('0x13')&&!_0x5309f4[_0x39e9('0x14')]&&!_[_0x39e9('0x15')](_0x5309f4[_0x39e9('0x16')])){_0x19634e[_0x39e9('0x17')][_0x39e9('0x18')]({'where':{'id':_0x5309f4[_0x39e9('0x19')]}})['then'](function(_0x2325d8){if(_0x2325d8){_0x2325d8['update']({'lastMsgAt':_0x5309f4[_0x39e9('0x1a')],'lastMsgDirection':_0x5309f4['direction'][_0x39e9('0x12')](),'lastMsgBody':_0x5309f4[_0x39e9('0x1b')]});}})[_0x39e9('0x1c')](function(_0x1e527d){console[_0x39e9('0x1d')](_0x1e527d);});}_0xe03316();}},'charset':_0x39e9('0x1e'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x6f56=['plainBody','subject','FULLTEXT','body','fromString','models','direction','toLowerCase','out','secret','UserId','MailInteraction','findOne','MailInteractionId','then','update','createdAt','error','utf8mb4','lodash','../../config/logger','api','bluebird','request-promise','html-to-text','./mailMessage.attributes','exports','MailMessage','messageId','fti_mail_messages'];(function(_0x3d42d8,_0x4cffaa){var _0x27fc41=function(_0x3a363b){while(--_0x3a363b){_0x3d42d8['push'](_0x3d42d8['shift']());}};_0x27fc41(++_0x4cffaa);}(_0x6f56,0xc7));var _0x66f5=function(_0x280fb3,_0x33d9a5){_0x280fb3=_0x280fb3-0x0;var _0x52f8bf=_0x6f56[_0x280fb3];return _0x52f8bf;};'use strict';var _=require(_0x66f5('0x0'));var util=require('util');var logger=require(_0x66f5('0x1'))(_0x66f5('0x2'));var moment=require('moment');var BPromise=require(_0x66f5('0x3'));var rp=require(_0x66f5('0x4'));var htmlToText=require(_0x66f5('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x66f5('0x6'));module[_0x66f5('0x7')]=function(_0x958c16,_0x90a30e){return _0x958c16['define'](_0x66f5('0x8'),attributes,{'tableName':'mail_messages','paranoid':![],'indexes':[{'name':_0x66f5('0x9'),'fields':[_0x66f5('0x9')]},{'name':_0x66f5('0xa'),'fields':[_0x66f5('0xb'),_0x66f5('0xc')],'type':_0x66f5('0xd')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x3770cb,_0x25803d,_0x5300bb){if(_0x3770cb[_0x66f5('0xe')]){_0x3770cb[_0x66f5('0xb')]=htmlToText[_0x66f5('0xf')](_0x3770cb[_0x66f5('0xe')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x5300bb(null,_0x25803d);},'afterCreate':function(_0x25d7e4,_0x1c3e39,_0x407daa){var _0x173403=_0x958c16[_0x66f5('0x10')];var _0x149ee7=_0x25d7e4['get']({'plain':!![]});if(_0x149ee7[_0x66f5('0x11')][_0x66f5('0x12')]()==='in'||_0x149ee7['direction'][_0x66f5('0x12')]()===_0x66f5('0x13')&&!_0x149ee7[_0x66f5('0x14')]&&!_['isNil'](_0x149ee7[_0x66f5('0x15')])){_0x173403[_0x66f5('0x16')][_0x66f5('0x17')]({'where':{'id':_0x149ee7[_0x66f5('0x18')]}})[_0x66f5('0x19')](function(_0x3739c0){if(_0x3739c0){_0x3739c0[_0x66f5('0x1a')]({'lastMsgAt':_0x149ee7[_0x66f5('0x1b')],'lastMsgDirection':_0x149ee7['direction'][_0x66f5('0x12')](),'lastMsgBody':_0x149ee7[_0x66f5('0xe')]});}})['catch'](function(_0x378ecc){console[_0x66f5('0x1c')](_0x378ecc);});}_0x407daa();}},'charset':_0x66f5('0x1d'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.rpc.js b/server/api/mailMessage/mailMessage.rpc.js
index 3b42230..cfed610 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 _0xeda8=['request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','CreateMailMessage','MailMessage','create','options','raw','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','then','info','MailMessage,\x20%s,\x20%s'];(function(_0x170362,_0x1bf09a){var _0x2fd172=function(_0x525b86){while(--_0x525b86){_0x170362['push'](_0x170362['shift']());}};_0x2fd172(++_0x1bf09a);}(_0xeda8,0x104));var _0x8eda=function(_0x1d31da,_0xdb97ec){_0x1d31da=_0x1d31da-0x0;var _0x2dcde9=_0xeda8[_0x1d31da];return _0x2dcde9;};'use strict';var _=require(_0x8eda('0x0'));var util=require(_0x8eda('0x1'));var moment=require('moment');var BPromise=require(_0x8eda('0x2'));var rs=require(_0x8eda('0x3'));var fs=require('fs');var Redis=require(_0x8eda('0x4'));var db=require(_0x8eda('0x5'))['db'];var utils=require(_0x8eda('0x6'));var logger=require(_0x8eda('0x7'))(_0x8eda('0x8'));var config=require(_0x8eda('0x9'));var jayson=require(_0x8eda('0xa'));var client=jayson[_0x8eda('0xb')][_0x8eda('0xc')]({'port':0x232a});config[_0x8eda('0xd')]=_['defaults'](config[_0x8eda('0xd')],{'host':_0x8eda('0xe'),'port':0x18eb});var socket=require(_0x8eda('0xf'))(new Redis(config[_0x8eda('0xd')]));require('./mailMessage.socket')['register'](socket);function respondWithRpcPromise(_0x488849,_0x4fbf0a,_0xe69181){return new BPromise(function(_0x2d3739,_0x41442d){return client['request'](_0x488849,_0xe69181)[_0x8eda('0x10')](function(_0x5a80ca){logger[_0x8eda('0x11')](_0x8eda('0x12'),_0x4fbf0a,_0x8eda('0x13'));logger[_0x8eda('0x14')](_0x8eda('0x15'),_0x4fbf0a,_0x8eda('0x13'),JSON[_0x8eda('0x16')](_0x5a80ca));if(_0x5a80ca[_0x8eda('0x17')]){if(_0x5a80ca['error']['code']===0x1f4){logger[_0x8eda('0x17')](_0x8eda('0x12'),_0x4fbf0a,_0x5a80ca['error'][_0x8eda('0x18')]);return _0x41442d(_0x5a80ca[_0x8eda('0x17')][_0x8eda('0x18')]);}logger['error'](_0x8eda('0x12'),_0x4fbf0a,_0x5a80ca['error'][_0x8eda('0x18')]);return _0x2d3739(_0x5a80ca['error'][_0x8eda('0x18')]);}else{logger['info'](_0x8eda('0x12'),_0x4fbf0a,_0x8eda('0x13'));_0x2d3739(_0x5a80ca['result']['message']);}})[_0x8eda('0x19')](function(_0x1b7e94){logger[_0x8eda('0x17')](_0x8eda('0x12'),_0x4fbf0a,_0x1b7e94);_0x41442d(_0x1b7e94);});});}exports[_0x8eda('0x1a')]=function(_0x1b46ee){var _0x4fb4ee=this;return new Promise(function(_0x7081dd,_0x850cce){return db[_0x8eda('0x1b')][_0x8eda('0x1c')](_0x1b46ee['body'],{'raw':_0x1b46ee[_0x8eda('0x1d')]?_0x1b46ee['options'][_0x8eda('0x1e')]===undefined?!![]:![]:!![]})['then'](function(_0x1033d6){logger[_0x8eda('0x11')]('CreateMailMessage',_0x1b46ee);logger['debug']('CreateMailMessage',_0x1b46ee,JSON[_0x8eda('0x16')](_0x1033d6));_0x7081dd(_0x1033d6);})[_0x8eda('0x19')](function(_0x5be84f){logger[_0x8eda('0x17')](_0x8eda('0x1a'),_0x5be84f['message'],_0x1b46ee);_0x850cce(_0x4fb4ee[_0x8eda('0x17')](0x1f4,_0x5be84f[_0x8eda('0x18')]));});});};
\ No newline at end of file
+var _0x510e=['stringify','error','code','MailMessage,\x20%s,\x20%s','message','result','catch','CreateMailMessage','MailMessage','body','options','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./mailMessage.socket','register','request','then','info','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s'];(function(_0x47eb27,_0x22d4fc){var _0xe8cae8=function(_0x2fd189){while(--_0x2fd189){_0x47eb27['push'](_0x47eb27['shift']());}};_0xe8cae8(++_0x22d4fc);}(_0x510e,0x1ed));var _0xe510=function(_0x15c421,_0x6366f7){_0x15c421=_0x15c421-0x0;var _0x5e5ed5=_0x510e[_0x15c421];return _0x5e5ed5;};'use strict';var _=require(_0xe510('0x0'));var util=require(_0xe510('0x1'));var moment=require(_0xe510('0x2'));var BPromise=require(_0xe510('0x3'));var rs=require(_0xe510('0x4'));var fs=require('fs');var Redis=require(_0xe510('0x5'));var db=require(_0xe510('0x6'))['db'];var utils=require(_0xe510('0x7'));var logger=require(_0xe510('0x8'))('rpc');var config=require(_0xe510('0x9'));var jayson=require(_0xe510('0xa'));var client=jayson[_0xe510('0xb')][_0xe510('0xc')]({'port':0x232a});config[_0xe510('0xd')]=_[_0xe510('0xe')](config[_0xe510('0xd')],{'host':_0xe510('0xf'),'port':0x18eb});var socket=require(_0xe510('0x10'))(new Redis(config[_0xe510('0xd')]));require(_0xe510('0x11'))[_0xe510('0x12')](socket);function respondWithRpcPromise(_0x2f28c1,_0x149f35,_0x521561){return new BPromise(function(_0x23de7b,_0x34ee7d){return client[_0xe510('0x13')](_0x2f28c1,_0x521561)[_0xe510('0x14')](function(_0x46445a){logger[_0xe510('0x15')]('MailMessage,\x20%s,\x20%s',_0x149f35,_0xe510('0x16'));logger[_0xe510('0x17')](_0xe510('0x18'),_0x149f35,_0xe510('0x16'),JSON[_0xe510('0x19')](_0x46445a));if(_0x46445a[_0xe510('0x1a')]){if(_0x46445a[_0xe510('0x1a')][_0xe510('0x1b')]===0x1f4){logger[_0xe510('0x1a')](_0xe510('0x1c'),_0x149f35,_0x46445a[_0xe510('0x1a')][_0xe510('0x1d')]);return _0x34ee7d(_0x46445a['error'][_0xe510('0x1d')]);}logger['error']('MailMessage,\x20%s,\x20%s',_0x149f35,_0x46445a[_0xe510('0x1a')][_0xe510('0x1d')]);return _0x23de7b(_0x46445a[_0xe510('0x1a')][_0xe510('0x1d')]);}else{logger[_0xe510('0x15')](_0xe510('0x1c'),_0x149f35,_0xe510('0x16'));_0x23de7b(_0x46445a[_0xe510('0x1e')]['message']);}})[_0xe510('0x1f')](function(_0x421de0){logger[_0xe510('0x1a')](_0xe510('0x1c'),_0x149f35,_0x421de0);_0x34ee7d(_0x421de0);});});}exports[_0xe510('0x20')]=function(_0x228d03){var _0x3ac39c=this;return new Promise(function(_0x55222e,_0xd3237){return db[_0xe510('0x21')]['create'](_0x228d03[_0xe510('0x22')],{'raw':_0x228d03[_0xe510('0x23')]?_0x228d03['options'][_0xe510('0x24')]===undefined?!![]:![]:!![]})[_0xe510('0x14')](function(_0x4a0c3d){logger[_0xe510('0x15')](_0xe510('0x20'),_0x228d03);logger[_0xe510('0x17')](_0xe510('0x20'),_0x228d03,JSON[_0xe510('0x19')](_0x4a0c3d));_0x55222e(_0x4a0c3d);})['catch'](function(_0x3c3b0a){logger['error']('CreateMailMessage',_0x3c3b0a['message'],_0x228d03);_0xd3237(_0x3ac39c[_0xe510('0x1a')](0x1f4,_0x3c3b0a[_0xe510('0x1d')]));});});};
\ No newline at end of file
diff --git a/server/api/mailMessage/mailMessage.socket.js b/server/api/mailMessage/mailMessage.socket.js
index 85ac2e1..13fc091 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 _0x0c84=['remove','update','emit','register','length','./mailMessage.events','save'];(function(_0x10a904,_0x2bf292){var _0x53815a=function(_0x2e6ce4){while(--_0x2e6ce4){_0x10a904['push'](_0x10a904['shift']());}};_0x53815a(++_0x2bf292);}(_0x0c84,0xad));var _0x40c8=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0x0c84[_0x5f0089];return _0x193892;};'use strict';var MailMessageEvents=require(_0x40c8('0x0'));var events=[_0x40c8('0x1'),_0x40c8('0x2'),_0x40c8('0x3')];function createListener(_0x5b9cc2,_0x3dcedc){return function(_0x18000c){_0x3dcedc[_0x40c8('0x4')](_0x5b9cc2,_0x18000c);};}function removeListener(_0x75791c,_0xb8c90c){return function(){MailMessageEvents['removeListener'](_0x75791c,_0xb8c90c);};}exports[_0x40c8('0x5')]=function(_0x2ad3ab){for(var _0x227b53=0x0,_0x308f83=events[_0x40c8('0x6')];_0x227b53<_0x308f83;_0x227b53++){var _0x48c0ed=events[_0x227b53];var _0x5a489e=createListener('mailMessage:'+_0x48c0ed,_0x2ad3ab);MailMessageEvents['on'](_0x48c0ed,_0x5a489e);}};
\ No newline at end of file
+var _0x5ee0=['update','emit','length','mailMessage:','./mailMessage.events','save','remove'];(function(_0x29f0f6,_0x28b548){var _0x333dfc=function(_0x3add8b){while(--_0x3add8b){_0x29f0f6['push'](_0x29f0f6['shift']());}};_0x333dfc(++_0x28b548);}(_0x5ee0,0x17e));var _0x05ee=function(_0x416450,_0x21192f){_0x416450=_0x416450-0x0;var _0x25e359=_0x5ee0[_0x416450];return _0x25e359;};'use strict';var MailMessageEvents=require(_0x05ee('0x0'));var events=[_0x05ee('0x1'),_0x05ee('0x2'),_0x05ee('0x3')];function createListener(_0x13e339,_0x25180c){return function(_0x46786b){_0x25180c[_0x05ee('0x4')](_0x13e339,_0x46786b);};}function removeListener(_0x503ba1,_0x48a7eb){return function(){MailMessageEvents['removeListener'](_0x503ba1,_0x48a7eb);};}exports['register']=function(_0x530802){for(var _0x32fd61=0x0,_0x232aff=events[_0x05ee('0x5')];_0x32fd61<_0x232aff;_0x32fd61++){var _0x57dd68=events[_0x32fd61];var _0x304238=createListener(_0x05ee('0x6')+_0x57dd68,_0x530802);MailMessageEvents['on'](_0x57dd68,_0x304238);}};
\ No newline at end of file
diff --git a/server/api/mailQueue/index.js b/server/api/mailQueue/index.js
index fece3b8..d43058d 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 _0x4add=['connect-timeout','express','Router','../../components/auth/service','../../config/environment','./mailQueue.controller','get','isAuthenticated','index','describe','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','/:id','delete','removeAgents','exports','util','path'];(function(_0x337945,_0xb161ed){var _0x3f38a8=function(_0x4dd541){while(--_0x4dd541){_0x337945['push'](_0x337945['shift']());}};_0x3f38a8(++_0xb161ed);}(_0x4add,0x14e));var _0xd4ad=function(_0x1bb6ba,_0x4cd427){_0x1bb6ba=_0x1bb6ba-0x0;var _0x56f82e=_0x4add[_0x1bb6ba];return _0x56f82e;};'use strict';var multer=require('multer');var util=require(_0xd4ad('0x0'));var path=require(_0xd4ad('0x1'));var timeout=require(_0xd4ad('0x2'));var express=require(_0xd4ad('0x3'));var router=express[_0xd4ad('0x4')]();var auth=require(_0xd4ad('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xd4ad('0x6'));var controller=require(_0xd4ad('0x7'));router[_0xd4ad('0x8')]('/',auth[_0xd4ad('0x9')](),controller[_0xd4ad('0xa')]);router[_0xd4ad('0x8')]('/describe',auth[_0xd4ad('0x9')](),controller[_0xd4ad('0xb')]);router['get']('/:id',auth[_0xd4ad('0x9')](),controller[_0xd4ad('0xc')]);router['get'](_0xd4ad('0xd'),auth[_0xd4ad('0x9')](),controller[_0xd4ad('0xe')]);router[_0xd4ad('0x8')](_0xd4ad('0xf'),auth[_0xd4ad('0x9')](),controller[_0xd4ad('0x10')]);router[_0xd4ad('0x8')](_0xd4ad('0x11'),auth[_0xd4ad('0x9')](),controller[_0xd4ad('0x12')]);router[_0xd4ad('0x13')]('/',auth[_0xd4ad('0x9')](),controller[_0xd4ad('0x14')]);router[_0xd4ad('0x13')](_0xd4ad('0xf'),auth['isAuthenticated'](),controller[_0xd4ad('0x15')]);router['post'](_0xd4ad('0x11'),auth[_0xd4ad('0x9')](),controller[_0xd4ad('0x16')]);router[_0xd4ad('0x17')](_0xd4ad('0x18'),auth['isAuthenticated'](),controller['update']);router[_0xd4ad('0x19')]('/:id',auth['isAuthenticated'](),controller['destroy']);router[_0xd4ad('0x19')]('/:id/teams',auth[_0xd4ad('0x9')](),controller['removeTeams']);router[_0xd4ad('0x19')]('/:id/users',auth[_0xd4ad('0x9')](),controller[_0xd4ad('0x1a')]);module[_0xd4ad('0x1b')]=router;
\ No newline at end of file
+var _0xae7f=['/:id/members','/:id/teams','getTeams','/:id/users','post','create','addTeams','delete','removeTeams','exports','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailQueue.controller','index','get','/describe','isAuthenticated','describe','/:id','show'];(function(_0x3d84b6,_0x8f2138){var _0xc9b1b8=function(_0x3bc611){while(--_0x3bc611){_0x3d84b6['push'](_0x3d84b6['shift']());}};_0xc9b1b8(++_0x8f2138);}(_0xae7f,0x136));var _0xfae7=function(_0x16ecc5,_0x29b1f4){_0x16ecc5=_0x16ecc5-0x0;var _0x4bca5a=_0xae7f[_0x16ecc5];return _0x4bca5a;};'use strict';var multer=require('multer');var util=require(_0xfae7('0x0'));var path=require(_0xfae7('0x1'));var timeout=require('connect-timeout');var express=require(_0xfae7('0x2'));var router=express[_0xfae7('0x3')]();var auth=require(_0xfae7('0x4'));var interaction=require(_0xfae7('0x5'));var config=require(_0xfae7('0x6'));var controller=require(_0xfae7('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0xfae7('0x8')]);router[_0xfae7('0x9')](_0xfae7('0xa'),auth[_0xfae7('0xb')](),controller[_0xfae7('0xc')]);router['get'](_0xfae7('0xd'),auth[_0xfae7('0xb')](),controller[_0xfae7('0xe')]);router['get'](_0xfae7('0xf'),auth[_0xfae7('0xb')](),controller['getMembers']);router[_0xfae7('0x9')](_0xfae7('0x10'),auth[_0xfae7('0xb')](),controller[_0xfae7('0x11')]);router[_0xfae7('0x9')](_0xfae7('0x12'),auth['isAuthenticated'](),controller['getAgents']);router[_0xfae7('0x13')]('/',auth[_0xfae7('0xb')](),controller[_0xfae7('0x14')]);router[_0xfae7('0x13')](_0xfae7('0x10'),auth[_0xfae7('0xb')](),controller[_0xfae7('0x15')]);router[_0xfae7('0x13')](_0xfae7('0x12'),auth['isAuthenticated'](),controller['addAgents']);router['put']('/:id',auth[_0xfae7('0xb')](),controller['update']);router[_0xfae7('0x16')](_0xfae7('0xd'),auth[_0xfae7('0xb')](),controller['destroy']);router['delete'](_0xfae7('0x10'),auth['isAuthenticated'](),controller[_0xfae7('0x17')]);router[_0xfae7('0x16')](_0xfae7('0x12'),auth['isAuthenticated'](),controller['removeAgents']);module[_0xfae7('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 423fa19..84e6e84 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 _0x4f67=['roundrobin','sequelize','exports','rrmemory','beepall'];(function(_0xe87a0,_0x30f09e){var _0x12a4f1=function(_0x327cd9){while(--_0x327cd9){_0xe87a0['push'](_0xe87a0['shift']());}};_0x12a4f1(++_0x30f09e);}(_0x4f67,0xba));var _0x74f6=function(_0x54b396,_0x3612ee){_0x54b396=_0x54b396-0x0;var _0x532e6d=_0x4f67[_0x54b396];return _0x532e6d;};'use strict';var Sequelize=require(_0x74f6('0x0'));module[_0x74f6('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x74f6('0x2'),_0x74f6('0x3'),_0x74f6('0x4'))}};
\ No newline at end of file
+var _0x74cd=['beepall','roundrobin','sequelize','exports','name','STRING','ENUM','rrmemory'];(function(_0x3df84b,_0x580421){var _0x998783=function(_0x5092f3){while(--_0x5092f3){_0x3df84b['push'](_0x3df84b['shift']());}};_0x998783(++_0x580421);}(_0x74cd,0x162));var _0xd74c=function(_0x4eec9b,_0x4aea09){_0x4eec9b=_0x4eec9b-0x0;var _0x2e3849=_0x74cd[_0x4eec9b];return _0x2e3849;};'use strict';var Sequelize=require(_0xd74c('0x0'));module[_0xd74c('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xd74c('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xd74c('0x3')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xd74c('0x4')](_0xd74c('0x5'),_0xd74c('0x6'),_0xd74c('0x7'))}};
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.controller.js b/server/api/mailQueue/mailQueue.controller.js
index 48a05a2..cc425dd 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 _0x2ed1=['pick','filter','merge','VIRTUAL','include','findAll','rows','catch','show','includeAll','options','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','getMembers','findOne','rawAttributes','order','MailQueueId','UserMailQueue','User','findAndCountAll','mailPause','updatedAt','createdAt','format','%s/%s','SIP','getTeams','Team','nolimit','addTeams','ids','voicePause','interface','flatMap','Agents','sequelize','transaction','each','findOrCreate','forEach','emit','removeTeams','field','team_has_mail_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','MailQueueId\x20=\x20?','ut.UserId\x20=\x20?','QueryTypes','every','TeamId','includes','all','compact','value','userMailQueue:remove','addAgents','omit','spread','removeAgents','isArray','getAgents','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailQueue.socket','register','sendStatus','end','status','json','count','offset','limit','set','Content-Range','reject','save','update','then','destroy','get','MailQueues','UserProfileResource','error','stack','name','index','MailQueue','fieldName','type','key','model','map','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','sort','where'];(function(_0xd085b7,_0x1f7ba9){var _0xd9cf4a=function(_0x102e89){while(--_0x102e89){_0xd085b7['push'](_0xd085b7['shift']());}};_0xd9cf4a(++_0x1f7ba9);}(_0x2ed1,0x162));var _0x12ed=function(_0x56d731,_0x43b048){_0x56d731=_0x56d731-0x0;var _0x369072=_0x2ed1[_0x56d731];return _0x369072;};'use strict';var pdf=require(_0x12ed('0x0'));var emlformat=require(_0x12ed('0x1'));var rimraf=require(_0x12ed('0x2'));var zipdir=require(_0x12ed('0x3'));var jsonpatch=require(_0x12ed('0x4'));var rp=require(_0x12ed('0x5'));var moment=require(_0x12ed('0x6'));var BPromise=require('bluebird');var Mustache=require(_0x12ed('0x7'));var util=require('util');var path=require(_0x12ed('0x8'));var sox=require(_0x12ed('0x9'));var csv=require('to-csv');var ejs=require(_0x12ed('0xa'));var fs=require('fs');var _=require(_0x12ed('0xb'));var squel=require(_0x12ed('0xc'));var crypto=require('crypto');var jsforce=require(_0x12ed('0xd'));var deskjs=require(_0x12ed('0xe'));var toCsv=require('to-csv');var querystring=require(_0x12ed('0xf'));var Papa=require(_0x12ed('0x10'));var Redis=require(_0x12ed('0x11'));var authService=require(_0x12ed('0x12'));var qs=require(_0x12ed('0x13'));var as=require(_0x12ed('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x12ed('0x15'))(_0x12ed('0x16'));var utils=require(_0x12ed('0x17'));var config=require(_0x12ed('0x18'));var db=require(_0x12ed('0x19'))['db'];config[_0x12ed('0x1a')]=_[_0x12ed('0x1b')](config[_0x12ed('0x1a')],{'host':_0x12ed('0x1c'),'port':0x18eb});var socket=require(_0x12ed('0x1d'))(new Redis(config[_0x12ed('0x1a')]));require(_0x12ed('0x1e'))[_0x12ed('0x1f')](socket);function respondWithStatusCode(_0x19e2db,_0x3a28aa){_0x3a28aa=_0x3a28aa||0xcc;return function(_0xae325d){if(_0xae325d){return _0x19e2db[_0x12ed('0x20')](_0x3a28aa);}return _0x19e2db['status'](_0x3a28aa)[_0x12ed('0x21')]();};}function respondWithResult(_0x24e83f,_0x43c32f){_0x43c32f=_0x43c32f||0xc8;return function(_0x43e4c0){if(_0x43e4c0){return _0x24e83f[_0x12ed('0x22')](_0x43c32f)[_0x12ed('0x23')](_0x43e4c0);}};}function respondWithFilteredResult(_0x35b2d8,_0x2d31a1){return function(_0x5a187e){if(_0x5a187e){var _0x310d24=_0x5a187e[_0x12ed('0x24')],_0x44c3c2=_0x2d31a1[_0x12ed('0x25')],_0x239606=_0x2d31a1[_0x12ed('0x25')]+_0x2d31a1[_0x12ed('0x26')],_0x29a101;if(_0x239606>=_0x310d24){_0x239606=_0x310d24;_0x29a101=0xc8;}else{_0x29a101=0xce;}_0x35b2d8[_0x12ed('0x22')](_0x29a101);return _0x35b2d8[_0x12ed('0x27')](_0x12ed('0x28'),_0x44c3c2+'-'+_0x239606+'/'+_0x310d24)[_0x12ed('0x23')](_0x5a187e);}return null;};}function patchUpdates(_0x4c8471){return function(_0x160aed){try{jsonpatch['apply'](_0x160aed,_0x4c8471,!![]);}catch(_0x57e4fe){return BPromise[_0x12ed('0x29')](_0x57e4fe);}return _0x160aed[_0x12ed('0x2a')]();};}function saveUpdates(_0x22ba51,_0x6c6d50){return function(_0xb81607){if(_0xb81607){return _0xb81607[_0x12ed('0x2b')](_0x22ba51)[_0x12ed('0x2c')](function(_0x294e07){return _0x294e07;});}return null;};}function removeEntity(_0x484e91,_0x356b07){return function(_0x2ffc76){if(_0x2ffc76){return _0x2ffc76[_0x12ed('0x2d')]()['then'](function(){var _0x2e2031=_0x2ffc76[_0x12ed('0x2e')]({'plain':!![]});var _0x408804=_0x12ed('0x2f');return db[_0x12ed('0x30')][_0x12ed('0x2d')]({'where':{'type':_0x408804,'resourceId':_0x2e2031['id']}})[_0x12ed('0x2c')](function(){return _0x2ffc76;});})[_0x12ed('0x2c')](function(){_0x484e91[_0x12ed('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x828d9,_0xe38efa){return function(_0x28bb70){if(!_0x28bb70){_0x828d9[_0x12ed('0x20')](0x194);}return _0x28bb70;};}function handleError(_0x40a89c,_0x540d0f){_0x540d0f=_0x540d0f||0x1f4;return function(_0x5d9105){logger[_0x12ed('0x31')](_0x5d9105[_0x12ed('0x32')]);if(_0x5d9105[_0x12ed('0x33')]){delete _0x5d9105[_0x12ed('0x33')];}_0x40a89c['status'](_0x540d0f)['send'](_0x5d9105);};}exports[_0x12ed('0x34')]=function(_0x21d2b0,_0x3556e2){var _0x24596a={},_0x533d5f={},_0x3445d4={'count':0x0,'rows':[]};var _0x157320=_['map'](db[_0x12ed('0x35')]['rawAttributes'],function(_0x110776){return{'name':_0x110776[_0x12ed('0x36')],'type':_0x110776[_0x12ed('0x37')][_0x12ed('0x38')]};});_0x533d5f[_0x12ed('0x39')]=_[_0x12ed('0x3a')](_0x157320,_0x12ed('0x33'));_0x533d5f['query']=_[_0x12ed('0x3b')](_0x21d2b0[_0x12ed('0x3c')]);_0x533d5f[_0x12ed('0x3d')]=_[_0x12ed('0x3e')](_0x533d5f[_0x12ed('0x39')],_0x533d5f[_0x12ed('0x3c')]);_0x24596a['attributes']=_[_0x12ed('0x3e')](_0x533d5f[_0x12ed('0x39')],qs[_0x12ed('0x3f')](_0x21d2b0[_0x12ed('0x3c')]['fields']));_0x24596a[_0x12ed('0x40')]=_0x24596a['attributes'][_0x12ed('0x41')]?_0x24596a['attributes']:_0x533d5f[_0x12ed('0x39')];if(!_0x21d2b0[_0x12ed('0x3c')][_0x12ed('0x42')]('nolimit')){_0x24596a[_0x12ed('0x26')]=qs[_0x12ed('0x26')](_0x21d2b0['query'][_0x12ed('0x26')]);_0x24596a[_0x12ed('0x25')]=qs[_0x12ed('0x25')](_0x21d2b0[_0x12ed('0x3c')][_0x12ed('0x25')]);}_0x24596a['order']=qs[_0x12ed('0x43')](_0x21d2b0[_0x12ed('0x3c')]['sort']);_0x24596a[_0x12ed('0x44')]=qs['filters'](_[_0x12ed('0x45')](_0x21d2b0[_0x12ed('0x3c')],_0x533d5f[_0x12ed('0x3d')]));if(_0x21d2b0[_0x12ed('0x3c')][_0x12ed('0x46')]){_0x24596a[_0x12ed('0x44')]=_[_0x12ed('0x47')](_0x24596a['where'],{'$or':_[_0x12ed('0x3a')](_0x157320,function(_0x85a560){if(_0x85a560[_0x12ed('0x37')]!==_0x12ed('0x48')){var _0x5072a5={};_0x5072a5[_0x85a560[_0x12ed('0x33')]]={'$like':'%'+_0x21d2b0[_0x12ed('0x3c')][_0x12ed('0x46')]+'%'};return _0x5072a5;}})});}_0x24596a=_[_0x12ed('0x47')]({},_0x24596a,_0x21d2b0['options']);var _0x18e525={'where':_0x24596a[_0x12ed('0x44')]};return db[_0x12ed('0x35')][_0x12ed('0x24')](_0x18e525)['then'](function(_0x2b63ae){_0x3445d4[_0x12ed('0x24')]=_0x2b63ae;if(_0x21d2b0[_0x12ed('0x3c')]['includeAll']){_0x24596a[_0x12ed('0x49')]=[{'all':!![]}];}return db['MailQueue'][_0x12ed('0x4a')](_0x24596a);})[_0x12ed('0x2c')](function(_0x38d452){_0x3445d4[_0x12ed('0x4b')]=_0x38d452;return _0x3445d4;})['then'](respondWithFilteredResult(_0x3556e2,_0x24596a))[_0x12ed('0x4c')](handleError(_0x3556e2,null));};exports[_0x12ed('0x4d')]=function(_0x57a751,_0x4ad36f){var _0x1f8fd4={'raw':!![],'where':{'id':_0x57a751['params']['id']}},_0x3a97f0={};_0x3a97f0[_0x12ed('0x39')]=_[_0x12ed('0x3b')](db[_0x12ed('0x35')]['rawAttributes']);_0x3a97f0[_0x12ed('0x3c')]=_[_0x12ed('0x3b')](_0x57a751['query']);_0x3a97f0[_0x12ed('0x3d')]=_['intersection'](_0x3a97f0[_0x12ed('0x39')],_0x3a97f0[_0x12ed('0x3c')]);_0x1f8fd4[_0x12ed('0x40')]=_[_0x12ed('0x3e')](_0x3a97f0['model'],qs[_0x12ed('0x3f')](_0x57a751[_0x12ed('0x3c')][_0x12ed('0x3f')]));_0x1f8fd4[_0x12ed('0x40')]=_0x1f8fd4[_0x12ed('0x40')][_0x12ed('0x41')]?_0x1f8fd4[_0x12ed('0x40')]:_0x3a97f0['model'];if(_0x57a751[_0x12ed('0x3c')][_0x12ed('0x4e')]){_0x1f8fd4['include']=[{'all':!![]}];}_0x1f8fd4=_[_0x12ed('0x47')]({},_0x1f8fd4,_0x57a751[_0x12ed('0x4f')]);return db[_0x12ed('0x35')]['find'](_0x1f8fd4)[_0x12ed('0x2c')](handleEntityNotFound(_0x4ad36f,null))[_0x12ed('0x2c')](respondWithResult(_0x4ad36f,null))[_0x12ed('0x4c')](handleError(_0x4ad36f,null));};exports[_0x12ed('0x50')]=function(_0x1c6253,_0xfad325){return db['MailQueue'][_0x12ed('0x50')](_0x1c6253[_0x12ed('0x51')],{})[_0x12ed('0x2c')](function(_0x2eb423){var _0x31920c=_0x1c6253['user'][_0x12ed('0x2e')]({'plain':!![]});if(!_0x31920c)throw new Error(_0x12ed('0x52'));if(_0x31920c[_0x12ed('0x53')]==='user'){var _0x3575c7=_0x2eb423['get']({'plain':!![]});var _0x3dd105=_0x12ed('0x2f');return db[_0x12ed('0x54')][_0x12ed('0x55')]({'where':{'name':_0x3dd105,'userProfileId':_0x31920c[_0x12ed('0x56')]},'raw':!![]})['then'](function(_0xeca271){if(_0xeca271&&_0xeca271[_0x12ed('0x57')]===0x0){return db['UserProfileResource'][_0x12ed('0x50')]({'name':_0x3575c7[_0x12ed('0x33')],'resourceId':_0x3575c7['id'],'type':_0xeca271[_0x12ed('0x33')],'sectionId':_0xeca271['id']},{})[_0x12ed('0x2c')](function(){return _0x2eb423;});}else{return _0x2eb423;}})[_0x12ed('0x4c')](function(_0x5ca06b){logger[_0x12ed('0x31')](_0x12ed('0x58'),_0x5ca06b);throw _0x5ca06b;});}return _0x2eb423;})[_0x12ed('0x2c')](respondWithResult(_0xfad325,0xc9))[_0x12ed('0x4c')](handleError(_0xfad325,null));};exports[_0x12ed('0x2b')]=function(_0x37c0e3,_0x505b51){if(_0x37c0e3[_0x12ed('0x51')]['id']){delete _0x37c0e3[_0x12ed('0x51')]['id'];}return db[_0x12ed('0x35')][_0x12ed('0x55')]({'where':{'id':_0x37c0e3[_0x12ed('0x59')]['id']}})[_0x12ed('0x2c')](handleEntityNotFound(_0x505b51,null))[_0x12ed('0x2c')](saveUpdates(_0x37c0e3[_0x12ed('0x51')],null))['then'](respondWithResult(_0x505b51,null))[_0x12ed('0x4c')](handleError(_0x505b51,null));};exports[_0x12ed('0x2d')]=function(_0x2267b2,_0x4cfe96){return db[_0x12ed('0x35')][_0x12ed('0x55')]({'where':{'id':_0x2267b2['params']['id']}})[_0x12ed('0x2c')](handleEntityNotFound(_0x4cfe96,null))[_0x12ed('0x2c')](removeEntity(_0x4cfe96,null))[_0x12ed('0x4c')](handleError(_0x4cfe96,null));};exports['describe']=function(_0x401e3b,_0xa3836a){return db[_0x12ed('0x35')]['describe']()[_0x12ed('0x2c')](respondWithResult(_0xa3836a,null))[_0x12ed('0x4c')](handleError(_0xa3836a,null));};exports[_0x12ed('0x5a')]=function(_0x2bf7c5,_0x42ce6b,_0x4770bf){var _0x1e4412={'raw':!![],'where':{}},_0x3f0c9a={},_0xc0f023;return db[_0x12ed('0x35')][_0x12ed('0x5b')]({'where':{'id':_0x2bf7c5['params']['id']}})[_0x12ed('0x2c')](handleEntityNotFound(_0x42ce6b,null))['then'](function(_0x56b0fe){if(_0x56b0fe){_0xc0f023=_0x56b0fe[_0x12ed('0x2e')]({'plain':!![]});_0x3f0c9a[_0x12ed('0x39')]=_[_0x12ed('0x3b')](db['UserMailQueue'][_0x12ed('0x5c')]);_0x3f0c9a[_0x12ed('0x3c')]=_[_0x12ed('0x3b')](_0x2bf7c5[_0x12ed('0x3c')]);_0x3f0c9a[_0x12ed('0x3d')]=_['intersection'](_0x3f0c9a[_0x12ed('0x39')],_0x3f0c9a[_0x12ed('0x3c')]);_0x1e4412[_0x12ed('0x40')]=_[_0x12ed('0x3e')](_0x3f0c9a[_0x12ed('0x39')],qs[_0x12ed('0x3f')](_0x2bf7c5[_0x12ed('0x3c')][_0x12ed('0x3f')]));_0x1e4412[_0x12ed('0x40')]=_0x1e4412[_0x12ed('0x40')][_0x12ed('0x41')]?_0x1e4412[_0x12ed('0x40')]:_0x3f0c9a[_0x12ed('0x39')];if(!_0x2bf7c5[_0x12ed('0x3c')][_0x12ed('0x42')]('nolimit')){_0x1e4412[_0x12ed('0x26')]=qs[_0x12ed('0x26')](_0x2bf7c5[_0x12ed('0x3c')][_0x12ed('0x26')]);_0x1e4412[_0x12ed('0x25')]=qs[_0x12ed('0x25')](_0x2bf7c5[_0x12ed('0x3c')][_0x12ed('0x25')]);}_0x1e4412[_0x12ed('0x5d')]=qs['sort'](_0x2bf7c5[_0x12ed('0x3c')]['sort']);_0x1e4412[_0x12ed('0x44')]=qs[_0x12ed('0x3d')](_[_0x12ed('0x45')](_0x2bf7c5['query'],_0x3f0c9a[_0x12ed('0x3d')]));_0x1e4412[_0x12ed('0x44')][_0x12ed('0x5e')]=_0x56b0fe['id'];if(_0x2bf7c5[_0x12ed('0x3c')][_0x12ed('0x46')]){_0x1e4412['where']=_[_0x12ed('0x47')](_0x1e4412[_0x12ed('0x44')],{'$or':_[_0x12ed('0x3a')](_0x1e4412[_0x12ed('0x40')],function(_0x4a458f){var _0x4183f1={};_0x4183f1[_0x4a458f]={'$like':'%'+_0x2bf7c5[_0x12ed('0x3c')][_0x12ed('0x46')]+'%'};return _0x4183f1;})});}_0x1e4412=_[_0x12ed('0x47')]({},_0x1e4412,_0x2bf7c5[_0x12ed('0x4f')]);return db[_0x12ed('0x5f')][_0x12ed('0x4a')](_0x1e4412);}})['then'](function(_0x51b065){if(_0x51b065){return db[_0x12ed('0x60')][_0x12ed('0x61')]({'where':{'id':_[_0x12ed('0x3a')](_0x51b065,'UserId'),'role':'agent'},'attributes':['id',_0x12ed('0x33'),_0x12ed('0x62'),_0x12ed('0x63'),_0x12ed('0x64')]});}})[_0x12ed('0x2c')](function(_0x5ac2fc){if(_0x5ac2fc){return{'count':_0x5ac2fc[_0x12ed('0x24')],'rows':_[_0x12ed('0x3a')](_0x5ac2fc[_0x12ed('0x4b')],function(_0xe7179f){return{'membername':_0xe7179f[_0x12ed('0x33')],'UserId':_0xe7179f['id'],'queue_name':_0xc0f023[_0x12ed('0x33')],'MailQueueId':_0xc0f023['id'],'interface':util[_0x12ed('0x65')](_0x12ed('0x66'),_0x12ed('0x67'),_0xe7179f[_0x12ed('0x33')]),'penalty':0x0,'paused':_0xe7179f[_0x12ed('0x62')],'createdAt':_0xe7179f[_0x12ed('0x64')],'updatedAt':_0xe7179f[_0x12ed('0x63')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x42ce6b,_0x1e4412))[_0x12ed('0x4c')](handleError(_0x42ce6b,null));};exports[_0x12ed('0x68')]=function(_0x1460e4,_0x1404b5,_0x210736){var _0x429f53={};var _0x343a9c={};var _0x5169e6;var _0x5b8488;return db['MailQueue'][_0x12ed('0x5b')]({'where':{'id':_0x1460e4[_0x12ed('0x59')]['id']}})[_0x12ed('0x2c')](handleEntityNotFound(_0x1404b5,null))[_0x12ed('0x2c')](function(_0x554304){if(_0x554304){_0x5169e6=_0x554304;_0x343a9c[_0x12ed('0x39')]=_[_0x12ed('0x3b')](db[_0x12ed('0x69')][_0x12ed('0x5c')]);_0x343a9c[_0x12ed('0x3c')]=_[_0x12ed('0x3b')](_0x1460e4[_0x12ed('0x3c')]);_0x343a9c[_0x12ed('0x3d')]=_[_0x12ed('0x3e')](_0x343a9c[_0x12ed('0x39')],_0x343a9c[_0x12ed('0x3c')]);_0x429f53[_0x12ed('0x40')]=_[_0x12ed('0x3e')](_0x343a9c[_0x12ed('0x39')],qs['fields'](_0x1460e4[_0x12ed('0x3c')][_0x12ed('0x3f')]));_0x429f53['attributes']=_0x429f53['attributes'][_0x12ed('0x41')]?_0x429f53[_0x12ed('0x40')]:_0x343a9c[_0x12ed('0x39')];_0x429f53[_0x12ed('0x5d')]=qs['sort'](_0x1460e4['query'][_0x12ed('0x43')]);_0x429f53[_0x12ed('0x44')]=qs[_0x12ed('0x3d')](_['pick'](_0x1460e4[_0x12ed('0x3c')],_0x343a9c[_0x12ed('0x3d')]));if(_0x1460e4['query']['filter']){_0x429f53[_0x12ed('0x44')]=_[_0x12ed('0x47')](_0x429f53['where'],{'$or':_[_0x12ed('0x3a')](_0x429f53[_0x12ed('0x40')],function(_0x325801){var _0x49105f={};_0x49105f[_0x325801]={'$like':'%'+_0x1460e4['query']['filter']+'%'};return _0x49105f;})});}_0x429f53=_[_0x12ed('0x47')]({},_0x429f53,_0x1460e4['options']);return _0x5169e6['getTeams'](_0x429f53);}})[_0x12ed('0x2c')](function(_0x4315b0){if(_0x4315b0){_0x5b8488=_0x4315b0[_0x12ed('0x41')];if(!_0x1460e4[_0x12ed('0x3c')]['hasOwnProperty'](_0x12ed('0x6a'))){_0x429f53[_0x12ed('0x26')]=qs[_0x12ed('0x26')](_0x1460e4[_0x12ed('0x3c')][_0x12ed('0x26')]);_0x429f53[_0x12ed('0x25')]=qs[_0x12ed('0x25')](_0x1460e4['query']['offset']);}return _0x5169e6[_0x12ed('0x68')](_0x429f53);}})[_0x12ed('0x2c')](function(_0x2da24d){if(_0x2da24d){return _0x2da24d?{'count':_0x5b8488,'rows':_0x2da24d}:null;}})['then'](respondWithResult(_0x1404b5,null))[_0x12ed('0x4c')](handleError(_0x1404b5,null));};exports[_0x12ed('0x6b')]=function(_0x528aa9,_0x5c96bb,_0x2054b5){var _0x34a0c3=_0x528aa9[_0x12ed('0x51')][_0x12ed('0x6c')];return db[_0x12ed('0x69')][_0x12ed('0x4a')]({'where':{'id':_0x34a0c3},'attributes':['id'],'include':[{'model':db[_0x12ed('0x60')],'as':'Agents','attributes':['id','name','online',_0x12ed('0x6d'),_0x12ed('0x6e')],'raw':!![]}]})[_0x12ed('0x2c')](function(_0x42040c){if(_0x42040c){var _0x3ab8d3=_[_0x12ed('0x6f')](_0x42040c,function(_0x4f6827){var _0x25e014=_0x4f6827['get']({'plain':!![]});return _0x25e014[_0x12ed('0x70')];});return db[_0x12ed('0x35')][_0x12ed('0x55')]({'where':{'id':_0x528aa9[_0x12ed('0x59')]['id']}})[_0x12ed('0x2c')](function(_0x337ad9){return db[_0x12ed('0x71')][_0x12ed('0x72')](function(_0x3dc233){return _0x337ad9[_0x12ed('0x6b')](_0x34a0c3,{'transaction':_0x3dc233})['then'](function(){return BPromise[_0x12ed('0x73')](_0x3ab8d3,function(_0x41f561){return db[_0x12ed('0x5f')][_0x12ed('0x74')]({'where':{'UserId':_0x41f561['id'],'MailQueueId':_0x528aa9[_0x12ed('0x59')]['id']},'transaction':_0x3dc233});});})['then'](function(){_0x3ab8d3[_0x12ed('0x75')](function(_0x3b5077){socket[_0x12ed('0x76')]('userMailQueue:save',{'UserId':_0x3b5077['id'],'MailQueueId':_0x337ad9['id']});});});});});}})['then'](respondWithStatusCode(_0x5c96bb,null))[_0x12ed('0x4c')](handleError(_0x5c96bb,null));};exports[_0x12ed('0x77')]=function(_0x4becae,_0x2a4cce,_0x167ac8){return db[_0x12ed('0x69')][_0x12ed('0x4a')]({'where':{'id':_0x4becae[_0x12ed('0x3c')][_0x12ed('0x6c')]},'attributes':['id'],'include':[{'model':db[_0x12ed('0x60')],'as':_0x12ed('0x70'),'attributes':['id'],'raw':!![]}]})[_0x12ed('0x2c')](handleEntityNotFound(_0x2a4cce,null))[_0x12ed('0x2c')](function(_0x56f272){var _0x284873=_[_0x12ed('0x3a')](_0x56f272,'id');var _0x11d5fa=[];var _0x281b4a=[];var _0x3850f6=squel['select']();_0x3850f6[_0x12ed('0x78')]('tq.TeamId')['from'](_0x12ed('0x79'),'tq')[_0x12ed('0x7a')](_0x12ed('0x7b'),'ut',_0x12ed('0x7c'))[_0x12ed('0x44')](_0x12ed('0x7d'),_0x4becae[_0x12ed('0x59')]['id']);for(var _0x39b468=0x0;_0x39b468<_0x56f272[_0x12ed('0x41')];_0x39b468+=0x1){let _0x4ab663=_0x56f272[_0x39b468];for(var _0x15158d=0x0;_0x15158d<_0x4ab663['Agents'][_0x12ed('0x41')];_0x15158d+=0x1){let _0x3ea50f=_0x4ab663[_0x12ed('0x70')][_0x15158d];var _0x3a5dfa=_0x3850f6['clone']();_0x3a5dfa['where'](_0x12ed('0x7e'),_0x3ea50f['id']);_0x281b4a['push'](db[_0x12ed('0x71')][_0x12ed('0x3c')](_0x3a5dfa['toString'](),{'type':db[_0x12ed('0x71')][_0x12ed('0x7f')]['SELECT']})[_0x12ed('0x2c')](function(_0x5592b1){if(_0x5592b1[_0x12ed('0x41')]===0x1){return _0x3ea50f['id'];}else{var _0x27d60a=_[_0x12ed('0x80')](_[_0x12ed('0x3a')](_0x5592b1,_0x12ed('0x81')),function(_0x1ae9ca){return _[_0x12ed('0x82')](_0x284873,_0x1ae9ca);});if(_0x27d60a){return _0x3ea50f['id'];}}}));}}return BPromise[_0x12ed('0x83')](_0x281b4a)[_0x12ed('0x2c')](function(_0x1ba980){_0x11d5fa=_(_0x11d5fa)['union'](_0x1ba980)[_0x12ed('0x84')]()[_0x12ed('0x85')]();return db[_0x12ed('0x35')]['find']({'where':{'id':_0x4becae[_0x12ed('0x59')]['id']}})[_0x12ed('0x2c')](function(_0x44436e){return db[_0x12ed('0x71')][_0x12ed('0x72')](function(_0x3c1f0e){return _0x44436e[_0x12ed('0x77')](_0x4becae[_0x12ed('0x3c')][_0x12ed('0x6c')],{'transaction':_0x3c1f0e})[_0x12ed('0x2c')](function(){if(!_['isEmpty'](_0x11d5fa)){return _0x44436e['removeAgents'](_0x11d5fa,{'transaction':_0x3c1f0e});}})[_0x12ed('0x2c')](function(){_0x11d5fa['forEach'](function(_0x4cdd13){socket[_0x12ed('0x76')](_0x12ed('0x86'),{'UserId':_0x4cdd13,'MailQueueId':_0x44436e['id']});});});});});});})[_0x12ed('0x2c')](respondWithStatusCode(_0x2a4cce,null))[_0x12ed('0x4c')](handleError(_0x2a4cce,null));};exports[_0x12ed('0x87')]=function(_0x2587b8,_0x52c29d,_0x4c20c5){return db[_0x12ed('0x35')][_0x12ed('0x55')]({'where':{'id':_0x2587b8[_0x12ed('0x59')]['id']}})['then'](handleEntityNotFound(_0x52c29d,null))[_0x12ed('0x2c')](function(_0x5e7683){if(_0x5e7683){return _0x5e7683['addAgents'](_0x2587b8['body']['ids'],_[_0x12ed('0x88')](_0x2587b8[_0x12ed('0x51')],[_0x12ed('0x6c'),'id'])||{})[_0x12ed('0x89')](function(_0x555cf9){for(var _0x416025=0x0;_0x416025<_0x2587b8[_0x12ed('0x51')][_0x12ed('0x6c')]['length'];_0x416025+=0x1){socket[_0x12ed('0x76')]('userMailQueue:save',{'UserId':_0x2587b8['body'][_0x12ed('0x6c')][_0x416025],'MailQueueId':_0x2587b8[_0x12ed('0x59')]['id']});}return _0x555cf9;});}})[_0x12ed('0x2c')](respondWithResult(_0x52c29d,null))[_0x12ed('0x4c')](handleError(_0x52c29d,null));};exports[_0x12ed('0x8a')]=function(_0x4e9e6c,_0x1ab44c,_0x108cc9){return db[_0x12ed('0x35')][_0x12ed('0x55')]({'where':{'id':_0x4e9e6c[_0x12ed('0x59')]['id']}})[_0x12ed('0x2c')](handleEntityNotFound(_0x1ab44c,null))[_0x12ed('0x2c')](function(_0xde9e68){if(_0xde9e68){return _0xde9e68['removeAgents'](_0x4e9e6c[_0x12ed('0x3c')]['ids'])['then'](function(){if(_[_0x12ed('0x8b')](_0x4e9e6c['query']['ids'])){for(var _0x4bccf9=0x0;_0x4bccf9<_0x4e9e6c[_0x12ed('0x3c')][_0x12ed('0x6c')][_0x12ed('0x41')];_0x4bccf9+=0x1){socket[_0x12ed('0x76')](_0x12ed('0x86'),{'UserId':Number(_0x4e9e6c[_0x12ed('0x3c')][_0x12ed('0x6c')][_0x4bccf9]),'MailQueueId':Number(_0x4e9e6c[_0x12ed('0x59')]['id'])});}}else{socket['emit'](_0x12ed('0x86'),{'UserId':Number(_0x4e9e6c[_0x12ed('0x3c')]['ids']),'MailQueueId':Number(_0x4e9e6c[_0x12ed('0x59')]['id'])});}});}})[_0x12ed('0x2c')](respondWithStatusCode(_0x1ab44c,null))[_0x12ed('0x4c')](handleError(_0x1ab44c,null));};exports[_0x12ed('0x8c')]=function(_0x42c4b4,_0x43b15d,_0x438987){var _0x40d7b4={};var _0x28cf93={};var _0x2994d5;var _0x3cd897;return db[_0x12ed('0x35')][_0x12ed('0x5b')]({'where':{'id':_0x42c4b4['params']['id']}})['then'](handleEntityNotFound(_0x43b15d,null))['then'](function(_0x47695a){if(_0x47695a){_0x2994d5=_0x47695a;_0x28cf93[_0x12ed('0x39')]=_[_0x12ed('0x3b')](db['User'][_0x12ed('0x5c')]);_0x28cf93[_0x12ed('0x3c')]=_[_0x12ed('0x3b')](_0x42c4b4['query']);_0x28cf93['filters']=_[_0x12ed('0x3e')](_0x28cf93[_0x12ed('0x39')],_0x28cf93['query']);_0x40d7b4[_0x12ed('0x40')]=_[_0x12ed('0x3e')](_0x28cf93[_0x12ed('0x39')],qs[_0x12ed('0x3f')](_0x42c4b4[_0x12ed('0x3c')][_0x12ed('0x3f')]));_0x40d7b4[_0x12ed('0x40')]=_0x40d7b4[_0x12ed('0x40')][_0x12ed('0x41')]?_0x40d7b4['attributes']:_0x28cf93['model'];_0x40d7b4[_0x12ed('0x5d')]=qs['sort'](_0x42c4b4[_0x12ed('0x3c')][_0x12ed('0x43')]);_0x40d7b4['where']=qs[_0x12ed('0x3d')](_[_0x12ed('0x45')](_0x42c4b4[_0x12ed('0x3c')],_0x28cf93[_0x12ed('0x3d')]));if(_0x42c4b4['query'][_0x12ed('0x46')]){_0x40d7b4[_0x12ed('0x44')]=_[_0x12ed('0x47')](_0x40d7b4[_0x12ed('0x44')],{'$or':_['map'](_0x40d7b4[_0x12ed('0x40')],function(_0x53629e){var _0x4629d1={};_0x4629d1[_0x53629e]={'$like':'%'+_0x42c4b4['query']['filter']+'%'};return _0x4629d1;})});}_0x40d7b4=_[_0x12ed('0x47')]({},_0x40d7b4,_0x42c4b4[_0x12ed('0x4f')]);return _0x2994d5['getAgents'](_0x40d7b4);}})[_0x12ed('0x2c')](function(_0x33c097){if(_0x33c097){_0x3cd897=_0x33c097[_0x12ed('0x41')];if(!_0x42c4b4['query'][_0x12ed('0x42')](_0x12ed('0x6a'))){_0x40d7b4[_0x12ed('0x26')]=qs[_0x12ed('0x26')](_0x42c4b4['query'][_0x12ed('0x26')]);_0x40d7b4[_0x12ed('0x25')]=qs[_0x12ed('0x25')](_0x42c4b4[_0x12ed('0x3c')][_0x12ed('0x25')]);}return _0x2994d5['getAgents'](_0x40d7b4);}})[_0x12ed('0x2c')](function(_0x30369c){if(_0x30369c){return _0x30369c?{'count':_0x3cd897,'rows':_0x30369c}:null;}})[_0x12ed('0x2c')](respondWithResult(_0x43b15d,null))[_0x12ed('0x4c')](handleError(_0x43b15d,null));};
\ No newline at end of file
+var _0xa273=['%s/%s','SIP','mailPause','getTeams','findOne','nolimit','addTeams','Team','Agents','online','voicePause','flatMap','sequelize','each','findOrCreate','forEach','emit','removeTeams','ids','field','tq.TeamId','from','team_has_mail_queues','join','MailQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','QueryTypes','SELECT','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','userMailQueue:remove','addAgents','omit','userMailQueue:save','isArray','getAgents','html-pdf','eml-format','zip-dir','request-promise','bluebird','mustache','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','register','sendStatus','status','json','count','offset','limit','set','apply','save','update','destroy','then','MailQueues','end','error','name','index','map','MailQueue','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','order','sort','where','merge','VIRTUAL','options','include','findAll','rows','show','params','keys','find','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','UserMailQueue','hasOwnProperty','pick','MailQueueId','filter','User','findAndCountAll','UserId','agent','updatedAt','createdAt','format'];(function(_0x592b13,_0x3f3a48){var _0x362545=function(_0x25096c){while(--_0x25096c){_0x592b13['push'](_0x592b13['shift']());}};_0x362545(++_0x3f3a48);}(_0xa273,0x139));var _0x3a27=function(_0x5e4dec,_0x3da94a){_0x5e4dec=_0x5e4dec-0x0;var _0x39851b=_0xa273[_0x5e4dec];return _0x39851b;};'use strict';var pdf=require(_0x3a27('0x0'));var emlformat=require(_0x3a27('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x3a27('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3a27('0x3'));var moment=require('moment');var BPromise=require(_0x3a27('0x4'));var Mustache=require(_0x3a27('0x5'));var util=require('util');var path=require(_0x3a27('0x6'));var sox=require(_0x3a27('0x7'));var csv=require(_0x3a27('0x8'));var ejs=require(_0x3a27('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x3a27('0xa'));var jsforce=require(_0x3a27('0xb'));var deskjs=require(_0x3a27('0xc'));var toCsv=require(_0x3a27('0x8'));var querystring=require(_0x3a27('0xd'));var Papa=require(_0x3a27('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x3a27('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3a27('0x10'))(_0x3a27('0x11'));var utils=require(_0x3a27('0x12'));var config=require(_0x3a27('0x13'));var db=require(_0x3a27('0x14'))['db'];config[_0x3a27('0x15')]=_['defaults'](config['redis'],{'host':_0x3a27('0x16'),'port':0x18eb});var socket=require(_0x3a27('0x17'))(new Redis(config[_0x3a27('0x15')]));require('./mailQueue.socket')[_0x3a27('0x18')](socket);function respondWithStatusCode(_0x578e9f,_0x238507){_0x238507=_0x238507||0xcc;return function(_0x509fb7){if(_0x509fb7){return _0x578e9f[_0x3a27('0x19')](_0x238507);}return _0x578e9f['status'](_0x238507)['end']();};}function respondWithResult(_0x2e75fd,_0x54faad){_0x54faad=_0x54faad||0xc8;return function(_0x5b6904){if(_0x5b6904){return _0x2e75fd[_0x3a27('0x1a')](_0x54faad)[_0x3a27('0x1b')](_0x5b6904);}};}function respondWithFilteredResult(_0x3a65cc,_0x5e385c){return function(_0x4f818a){if(_0x4f818a){var _0x340c28=_0x4f818a[_0x3a27('0x1c')],_0x7bc5c4=_0x5e385c[_0x3a27('0x1d')],_0x30a39c=_0x5e385c[_0x3a27('0x1d')]+_0x5e385c[_0x3a27('0x1e')],_0x4c8231;if(_0x30a39c>=_0x340c28){_0x30a39c=_0x340c28;_0x4c8231=0xc8;}else{_0x4c8231=0xce;}_0x3a65cc['status'](_0x4c8231);return _0x3a65cc[_0x3a27('0x1f')]('Content-Range',_0x7bc5c4+'-'+_0x30a39c+'/'+_0x340c28)[_0x3a27('0x1b')](_0x4f818a);}return null;};}function patchUpdates(_0x2435ec){return function(_0x4ef00a){try{jsonpatch[_0x3a27('0x20')](_0x4ef00a,_0x2435ec,!![]);}catch(_0x19b3aa){return BPromise['reject'](_0x19b3aa);}return _0x4ef00a[_0x3a27('0x21')]();};}function saveUpdates(_0x33c265,_0x233e3c){return function(_0x4989b9){if(_0x4989b9){return _0x4989b9[_0x3a27('0x22')](_0x33c265)['then'](function(_0x2b331b){return _0x2b331b;});}return null;};}function removeEntity(_0x174bef,_0x157d6a){return function(_0x11a237){if(_0x11a237){return _0x11a237[_0x3a27('0x23')]()[_0x3a27('0x24')](function(){var _0x37e2e8=_0x11a237['get']({'plain':!![]});var _0x2c61ea=_0x3a27('0x25');return db['UserProfileResource'][_0x3a27('0x23')]({'where':{'type':_0x2c61ea,'resourceId':_0x37e2e8['id']}})[_0x3a27('0x24')](function(){return _0x11a237;});})[_0x3a27('0x24')](function(){_0x174bef[_0x3a27('0x1a')](0xcc)[_0x3a27('0x26')]();});}};}function handleEntityNotFound(_0x323129,_0x17cf83){return function(_0x388c56){if(!_0x388c56){_0x323129[_0x3a27('0x19')](0x194);}return _0x388c56;};}function handleError(_0x57a06f,_0x505e63){_0x505e63=_0x505e63||0x1f4;return function(_0x6a8466){logger[_0x3a27('0x27')](_0x6a8466['stack']);if(_0x6a8466[_0x3a27('0x28')]){delete _0x6a8466[_0x3a27('0x28')];}_0x57a06f['status'](_0x505e63)['send'](_0x6a8466);};}exports[_0x3a27('0x29')]=function(_0x254e42,_0x106e7f){var _0x299288={},_0x3b1d79={},_0x255dff={'count':0x0,'rows':[]};var _0x29c815=_[_0x3a27('0x2a')](db[_0x3a27('0x2b')][_0x3a27('0x2c')],function(_0x83730e){return{'name':_0x83730e[_0x3a27('0x2d')],'type':_0x83730e[_0x3a27('0x2e')][_0x3a27('0x2f')]};});_0x3b1d79[_0x3a27('0x30')]=_[_0x3a27('0x2a')](_0x29c815,_0x3a27('0x28'));_0x3b1d79[_0x3a27('0x31')]=_['keys'](_0x254e42[_0x3a27('0x31')]);_0x3b1d79[_0x3a27('0x32')]=_['intersection'](_0x3b1d79[_0x3a27('0x30')],_0x3b1d79['query']);_0x299288[_0x3a27('0x33')]=_[_0x3a27('0x34')](_0x3b1d79['model'],qs[_0x3a27('0x35')](_0x254e42['query'][_0x3a27('0x35')]));_0x299288[_0x3a27('0x33')]=_0x299288[_0x3a27('0x33')][_0x3a27('0x36')]?_0x299288[_0x3a27('0x33')]:_0x3b1d79[_0x3a27('0x30')];if(!_0x254e42[_0x3a27('0x31')]['hasOwnProperty']('nolimit')){_0x299288[_0x3a27('0x1e')]=qs[_0x3a27('0x1e')](_0x254e42[_0x3a27('0x31')][_0x3a27('0x1e')]);_0x299288[_0x3a27('0x1d')]=qs[_0x3a27('0x1d')](_0x254e42['query']['offset']);}_0x299288[_0x3a27('0x37')]=qs['sort'](_0x254e42[_0x3a27('0x31')][_0x3a27('0x38')]);_0x299288[_0x3a27('0x39')]=qs[_0x3a27('0x32')](_['pick'](_0x254e42[_0x3a27('0x31')],_0x3b1d79[_0x3a27('0x32')]));if(_0x254e42[_0x3a27('0x31')]['filter']){_0x299288['where']=_[_0x3a27('0x3a')](_0x299288[_0x3a27('0x39')],{'$or':_['map'](_0x29c815,function(_0x403aed){if(_0x403aed[_0x3a27('0x2e')]!==_0x3a27('0x3b')){var _0x585884={};_0x585884[_0x403aed[_0x3a27('0x28')]]={'$like':'%'+_0x254e42[_0x3a27('0x31')]['filter']+'%'};return _0x585884;}})});}_0x299288=_[_0x3a27('0x3a')]({},_0x299288,_0x254e42[_0x3a27('0x3c')]);var _0x3a4e95={'where':_0x299288[_0x3a27('0x39')]};return db['MailQueue']['count'](_0x3a4e95)['then'](function(_0x5b93da){_0x255dff[_0x3a27('0x1c')]=_0x5b93da;if(_0x254e42['query']['includeAll']){_0x299288[_0x3a27('0x3d')]=[{'all':!![]}];}return db[_0x3a27('0x2b')][_0x3a27('0x3e')](_0x299288);})[_0x3a27('0x24')](function(_0x9980e3){_0x255dff[_0x3a27('0x3f')]=_0x9980e3;return _0x255dff;})[_0x3a27('0x24')](respondWithFilteredResult(_0x106e7f,_0x299288))['catch'](handleError(_0x106e7f,null));};exports[_0x3a27('0x40')]=function(_0x17ff53,_0x38d581){var _0x23cc37={'raw':!![],'where':{'id':_0x17ff53[_0x3a27('0x41')]['id']}},_0x2b0d6d={};_0x2b0d6d[_0x3a27('0x30')]=_[_0x3a27('0x42')](db[_0x3a27('0x2b')][_0x3a27('0x2c')]);_0x2b0d6d[_0x3a27('0x31')]=_[_0x3a27('0x42')](_0x17ff53[_0x3a27('0x31')]);_0x2b0d6d[_0x3a27('0x32')]=_[_0x3a27('0x34')](_0x2b0d6d['model'],_0x2b0d6d[_0x3a27('0x31')]);_0x23cc37['attributes']=_[_0x3a27('0x34')](_0x2b0d6d[_0x3a27('0x30')],qs[_0x3a27('0x35')](_0x17ff53[_0x3a27('0x31')][_0x3a27('0x35')]));_0x23cc37['attributes']=_0x23cc37[_0x3a27('0x33')][_0x3a27('0x36')]?_0x23cc37['attributes']:_0x2b0d6d[_0x3a27('0x30')];if(_0x17ff53[_0x3a27('0x31')]['includeAll']){_0x23cc37[_0x3a27('0x3d')]=[{'all':!![]}];}_0x23cc37=_[_0x3a27('0x3a')]({},_0x23cc37,_0x17ff53[_0x3a27('0x3c')]);return db['MailQueue'][_0x3a27('0x43')](_0x23cc37)[_0x3a27('0x24')](handleEntityNotFound(_0x38d581,null))[_0x3a27('0x24')](respondWithResult(_0x38d581,null))[_0x3a27('0x44')](handleError(_0x38d581,null));};exports[_0x3a27('0x45')]=function(_0x473425,_0x11d249){return db[_0x3a27('0x2b')]['create'](_0x473425['body'],{})[_0x3a27('0x24')](function(_0x2bce4e){var _0x3862d5=_0x473425[_0x3a27('0x46')]['get']({'plain':!![]});if(!_0x3862d5)throw new Error(_0x3a27('0x47'));if(_0x3862d5[_0x3a27('0x48')]===_0x3a27('0x46')){var _0x3f2256=_0x2bce4e[_0x3a27('0x49')]({'plain':!![]});var _0x1b712f=_0x3a27('0x25');return db[_0x3a27('0x4a')][_0x3a27('0x43')]({'where':{'name':_0x1b712f,'userProfileId':_0x3862d5['userProfileId']},'raw':!![]})[_0x3a27('0x24')](function(_0x1f0795){if(_0x1f0795&&_0x1f0795['autoAssociation']===0x0){return db[_0x3a27('0x4b')][_0x3a27('0x45')]({'name':_0x3f2256['name'],'resourceId':_0x3f2256['id'],'type':_0x1f0795[_0x3a27('0x28')],'sectionId':_0x1f0795['id']},{})[_0x3a27('0x24')](function(){return _0x2bce4e;});}else{return _0x2bce4e;}})['catch'](function(_0x314e00){logger['error'](_0x3a27('0x4c'),_0x314e00);throw _0x314e00;});}return _0x2bce4e;})['then'](respondWithResult(_0x11d249,0xc9))[_0x3a27('0x44')](handleError(_0x11d249,null));};exports['update']=function(_0x23929f,_0x52a59e){if(_0x23929f[_0x3a27('0x4d')]['id']){delete _0x23929f[_0x3a27('0x4d')]['id'];}return db[_0x3a27('0x2b')][_0x3a27('0x43')]({'where':{'id':_0x23929f[_0x3a27('0x41')]['id']}})['then'](handleEntityNotFound(_0x52a59e,null))[_0x3a27('0x24')](saveUpdates(_0x23929f[_0x3a27('0x4d')],null))['then'](respondWithResult(_0x52a59e,null))['catch'](handleError(_0x52a59e,null));};exports[_0x3a27('0x23')]=function(_0x2f2011,_0xd85eeb){return db[_0x3a27('0x2b')][_0x3a27('0x43')]({'where':{'id':_0x2f2011[_0x3a27('0x41')]['id']}})[_0x3a27('0x24')](handleEntityNotFound(_0xd85eeb,null))[_0x3a27('0x24')](removeEntity(_0xd85eeb,null))[_0x3a27('0x44')](handleError(_0xd85eeb,null));};exports['describe']=function(_0x57f4b4,_0x4d42ec){return db['MailQueue'][_0x3a27('0x4e')]()[_0x3a27('0x24')](respondWithResult(_0x4d42ec,null))['catch'](handleError(_0x4d42ec,null));};exports[_0x3a27('0x4f')]=function(_0x2f92e4,_0x545377,_0x30648a){var _0x49662a={'raw':!![],'where':{}},_0x250b9a={},_0x3610fe;return db[_0x3a27('0x2b')]['findOne']({'where':{'id':_0x2f92e4['params']['id']}})[_0x3a27('0x24')](handleEntityNotFound(_0x545377,null))['then'](function(_0x41d804){if(_0x41d804){_0x3610fe=_0x41d804[_0x3a27('0x49')]({'plain':!![]});_0x250b9a[_0x3a27('0x30')]=_[_0x3a27('0x42')](db[_0x3a27('0x50')]['rawAttributes']);_0x250b9a['query']=_[_0x3a27('0x42')](_0x2f92e4[_0x3a27('0x31')]);_0x250b9a[_0x3a27('0x32')]=_['intersection'](_0x250b9a['model'],_0x250b9a[_0x3a27('0x31')]);_0x49662a[_0x3a27('0x33')]=_['intersection'](_0x250b9a[_0x3a27('0x30')],qs['fields'](_0x2f92e4['query'][_0x3a27('0x35')]));_0x49662a['attributes']=_0x49662a[_0x3a27('0x33')][_0x3a27('0x36')]?_0x49662a['attributes']:_0x250b9a[_0x3a27('0x30')];if(!_0x2f92e4[_0x3a27('0x31')][_0x3a27('0x51')]('nolimit')){_0x49662a[_0x3a27('0x1e')]=qs[_0x3a27('0x1e')](_0x2f92e4[_0x3a27('0x31')]['limit']);_0x49662a[_0x3a27('0x1d')]=qs['offset'](_0x2f92e4['query']['offset']);}_0x49662a['order']=qs[_0x3a27('0x38')](_0x2f92e4[_0x3a27('0x31')][_0x3a27('0x38')]);_0x49662a['where']=qs[_0x3a27('0x32')](_[_0x3a27('0x52')](_0x2f92e4['query'],_0x250b9a['filters']));_0x49662a[_0x3a27('0x39')][_0x3a27('0x53')]=_0x41d804['id'];if(_0x2f92e4[_0x3a27('0x31')][_0x3a27('0x54')]){_0x49662a[_0x3a27('0x39')]=_['merge'](_0x49662a[_0x3a27('0x39')],{'$or':_[_0x3a27('0x2a')](_0x49662a[_0x3a27('0x33')],function(_0x2aab79){var _0xe20ecb={};_0xe20ecb[_0x2aab79]={'$like':'%'+_0x2f92e4[_0x3a27('0x31')][_0x3a27('0x54')]+'%'};return _0xe20ecb;})});}_0x49662a=_[_0x3a27('0x3a')]({},_0x49662a,_0x2f92e4[_0x3a27('0x3c')]);return db[_0x3a27('0x50')]['findAll'](_0x49662a);}})[_0x3a27('0x24')](function(_0x1afe88){if(_0x1afe88){return db[_0x3a27('0x55')][_0x3a27('0x56')]({'where':{'id':_['map'](_0x1afe88,_0x3a27('0x57')),'role':_0x3a27('0x58')},'attributes':['id',_0x3a27('0x28'),'mailPause',_0x3a27('0x59'),_0x3a27('0x5a')]});}})['then'](function(_0x1cd7ff){if(_0x1cd7ff){return{'count':_0x1cd7ff['count'],'rows':_[_0x3a27('0x2a')](_0x1cd7ff['rows'],function(_0x2d3eb3){return{'membername':_0x2d3eb3[_0x3a27('0x28')],'UserId':_0x2d3eb3['id'],'queue_name':_0x3610fe['name'],'MailQueueId':_0x3610fe['id'],'interface':util[_0x3a27('0x5b')](_0x3a27('0x5c'),_0x3a27('0x5d'),_0x2d3eb3['name']),'penalty':0x0,'paused':_0x2d3eb3[_0x3a27('0x5e')],'createdAt':_0x2d3eb3[_0x3a27('0x5a')],'updatedAt':_0x2d3eb3['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x3a27('0x24')](respondWithFilteredResult(_0x545377,_0x49662a))['catch'](handleError(_0x545377,null));};exports[_0x3a27('0x5f')]=function(_0x5b28f7,_0x4ab577,_0x58c59e){var _0x5afa8b={};var _0x64c6e7={};var _0x4cf9d2;var _0x1a7cef;return db['MailQueue'][_0x3a27('0x60')]({'where':{'id':_0x5b28f7['params']['id']}})[_0x3a27('0x24')](handleEntityNotFound(_0x4ab577,null))[_0x3a27('0x24')](function(_0x1a90c7){if(_0x1a90c7){_0x4cf9d2=_0x1a90c7;_0x64c6e7[_0x3a27('0x30')]=_[_0x3a27('0x42')](db['Team']['rawAttributes']);_0x64c6e7['query']=_[_0x3a27('0x42')](_0x5b28f7['query']);_0x64c6e7[_0x3a27('0x32')]=_[_0x3a27('0x34')](_0x64c6e7[_0x3a27('0x30')],_0x64c6e7['query']);_0x5afa8b['attributes']=_[_0x3a27('0x34')](_0x64c6e7['model'],qs[_0x3a27('0x35')](_0x5b28f7['query']['fields']));_0x5afa8b['attributes']=_0x5afa8b[_0x3a27('0x33')]['length']?_0x5afa8b[_0x3a27('0x33')]:_0x64c6e7[_0x3a27('0x30')];_0x5afa8b[_0x3a27('0x37')]=qs[_0x3a27('0x38')](_0x5b28f7[_0x3a27('0x31')]['sort']);_0x5afa8b[_0x3a27('0x39')]=qs['filters'](_[_0x3a27('0x52')](_0x5b28f7['query'],_0x64c6e7[_0x3a27('0x32')]));if(_0x5b28f7[_0x3a27('0x31')][_0x3a27('0x54')]){_0x5afa8b[_0x3a27('0x39')]=_[_0x3a27('0x3a')](_0x5afa8b[_0x3a27('0x39')],{'$or':_[_0x3a27('0x2a')](_0x5afa8b['attributes'],function(_0x592a01){var _0x5f1e94={};_0x5f1e94[_0x592a01]={'$like':'%'+_0x5b28f7[_0x3a27('0x31')][_0x3a27('0x54')]+'%'};return _0x5f1e94;})});}_0x5afa8b=_[_0x3a27('0x3a')]({},_0x5afa8b,_0x5b28f7['options']);return _0x4cf9d2[_0x3a27('0x5f')](_0x5afa8b);}})['then'](function(_0x561207){if(_0x561207){_0x1a7cef=_0x561207[_0x3a27('0x36')];if(!_0x5b28f7['query']['hasOwnProperty'](_0x3a27('0x61'))){_0x5afa8b['limit']=qs['limit'](_0x5b28f7[_0x3a27('0x31')]['limit']);_0x5afa8b[_0x3a27('0x1d')]=qs['offset'](_0x5b28f7[_0x3a27('0x31')][_0x3a27('0x1d')]);}return _0x4cf9d2[_0x3a27('0x5f')](_0x5afa8b);}})[_0x3a27('0x24')](function(_0x32f505){if(_0x32f505){return _0x32f505?{'count':_0x1a7cef,'rows':_0x32f505}:null;}})['then'](respondWithResult(_0x4ab577,null))[_0x3a27('0x44')](handleError(_0x4ab577,null));};exports[_0x3a27('0x62')]=function(_0x15a23e,_0x257a78,_0x3608e0){var _0x5a7ec7=_0x15a23e[_0x3a27('0x4d')]['ids'];return db[_0x3a27('0x63')]['findAll']({'where':{'id':_0x5a7ec7},'attributes':['id'],'include':[{'model':db[_0x3a27('0x55')],'as':_0x3a27('0x64'),'attributes':['id',_0x3a27('0x28'),_0x3a27('0x65'),_0x3a27('0x66'),'interface'],'raw':!![]}]})[_0x3a27('0x24')](function(_0x568bc5){if(_0x568bc5){var _0x5602a8=_[_0x3a27('0x67')](_0x568bc5,function(_0x4c4d7c){var _0x9fd623=_0x4c4d7c[_0x3a27('0x49')]({'plain':!![]});return _0x9fd623[_0x3a27('0x64')];});return db[_0x3a27('0x2b')][_0x3a27('0x43')]({'where':{'id':_0x15a23e[_0x3a27('0x41')]['id']}})[_0x3a27('0x24')](function(_0x35e7bb){return db[_0x3a27('0x68')]['transaction'](function(_0x4863e8){return _0x35e7bb[_0x3a27('0x62')](_0x5a7ec7,{'transaction':_0x4863e8})[_0x3a27('0x24')](function(){return BPromise[_0x3a27('0x69')](_0x5602a8,function(_0x27aeae){return db['UserMailQueue'][_0x3a27('0x6a')]({'where':{'UserId':_0x27aeae['id'],'MailQueueId':_0x15a23e[_0x3a27('0x41')]['id']},'transaction':_0x4863e8});});})[_0x3a27('0x24')](function(){_0x5602a8[_0x3a27('0x6b')](function(_0x413576){socket[_0x3a27('0x6c')]('userMailQueue:save',{'UserId':_0x413576['id'],'MailQueueId':_0x35e7bb['id']});});});});});}})[_0x3a27('0x24')](respondWithStatusCode(_0x257a78,null))[_0x3a27('0x44')](handleError(_0x257a78,null));};exports[_0x3a27('0x6d')]=function(_0x98920b,_0x3de98c,_0x297619){return db[_0x3a27('0x63')][_0x3a27('0x3e')]({'where':{'id':_0x98920b[_0x3a27('0x31')][_0x3a27('0x6e')]},'attributes':['id'],'include':[{'model':db[_0x3a27('0x55')],'as':_0x3a27('0x64'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x3de98c,null))[_0x3a27('0x24')](function(_0x233c8d){var _0x53deda=_[_0x3a27('0x2a')](_0x233c8d,'id');var _0x5e8d18=[];var _0x4b7687=[];var _0x3cd25e=squel['select']();_0x3cd25e[_0x3a27('0x6f')](_0x3a27('0x70'))[_0x3a27('0x71')](_0x3a27('0x72'),'tq')[_0x3a27('0x73')]('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0x3a27('0x39')](_0x3a27('0x74'),_0x98920b[_0x3a27('0x41')]['id']);for(var _0x8e15d3=0x0;_0x8e15d3<_0x233c8d[_0x3a27('0x36')];_0x8e15d3+=0x1){let _0x1b2b18=_0x233c8d[_0x8e15d3];for(var _0x467396=0x0;_0x467396<_0x1b2b18[_0x3a27('0x64')][_0x3a27('0x36')];_0x467396+=0x1){let _0x1da83c=_0x1b2b18[_0x3a27('0x64')][_0x467396];var _0x3b8252=_0x3cd25e['clone']();_0x3b8252[_0x3a27('0x39')](_0x3a27('0x75'),_0x1da83c['id']);_0x4b7687[_0x3a27('0x76')](db[_0x3a27('0x68')][_0x3a27('0x31')](_0x3b8252['toString'](),{'type':db[_0x3a27('0x68')][_0x3a27('0x77')][_0x3a27('0x78')]})[_0x3a27('0x24')](function(_0x572837){if(_0x572837[_0x3a27('0x36')]===0x1){return _0x1da83c['id'];}else{var _0x4899b2=_['every'](_[_0x3a27('0x2a')](_0x572837,_0x3a27('0x79')),function(_0x2c82bc){return _[_0x3a27('0x7a')](_0x53deda,_0x2c82bc);});if(_0x4899b2){return _0x1da83c['id'];}}}));}}return BPromise[_0x3a27('0x7b')](_0x4b7687)['then'](function(_0x592ca5){_0x5e8d18=_(_0x5e8d18)[_0x3a27('0x7c')](_0x592ca5)[_0x3a27('0x7d')]()[_0x3a27('0x7e')]();return db[_0x3a27('0x2b')][_0x3a27('0x43')]({'where':{'id':_0x98920b['params']['id']}})[_0x3a27('0x24')](function(_0x2eb06c){return db['sequelize']['transaction'](function(_0x4c0011){return _0x2eb06c[_0x3a27('0x6d')](_0x98920b[_0x3a27('0x31')][_0x3a27('0x6e')],{'transaction':_0x4c0011})[_0x3a27('0x24')](function(){if(!_[_0x3a27('0x7f')](_0x5e8d18)){return _0x2eb06c[_0x3a27('0x80')](_0x5e8d18,{'transaction':_0x4c0011});}})[_0x3a27('0x24')](function(){_0x5e8d18[_0x3a27('0x6b')](function(_0x5de6f3){socket['emit'](_0x3a27('0x81'),{'UserId':_0x5de6f3,'MailQueueId':_0x2eb06c['id']});});});});});});})[_0x3a27('0x24')](respondWithStatusCode(_0x3de98c,null))[_0x3a27('0x44')](handleError(_0x3de98c,null));};exports[_0x3a27('0x82')]=function(_0xe78408,_0x22e826,_0x738069){return db[_0x3a27('0x2b')][_0x3a27('0x43')]({'where':{'id':_0xe78408['params']['id']}})[_0x3a27('0x24')](handleEntityNotFound(_0x22e826,null))[_0x3a27('0x24')](function(_0x34f6e0){if(_0x34f6e0){return _0x34f6e0[_0x3a27('0x82')](_0xe78408[_0x3a27('0x4d')][_0x3a27('0x6e')],_[_0x3a27('0x83')](_0xe78408['body'],['ids','id'])||{})['spread'](function(_0x1406e6){for(var _0x139e7b=0x0;_0x139e7b<_0xe78408[_0x3a27('0x4d')][_0x3a27('0x6e')][_0x3a27('0x36')];_0x139e7b+=0x1){socket[_0x3a27('0x6c')](_0x3a27('0x84'),{'UserId':_0xe78408[_0x3a27('0x4d')][_0x3a27('0x6e')][_0x139e7b],'MailQueueId':_0xe78408['params']['id']});}return _0x1406e6;});}})[_0x3a27('0x24')](respondWithResult(_0x22e826,null))['catch'](handleError(_0x22e826,null));};exports[_0x3a27('0x80')]=function(_0x4eb315,_0x516018,_0xedb07b){return db[_0x3a27('0x2b')][_0x3a27('0x43')]({'where':{'id':_0x4eb315['params']['id']}})['then'](handleEntityNotFound(_0x516018,null))[_0x3a27('0x24')](function(_0x32f051){if(_0x32f051){return _0x32f051['removeAgents'](_0x4eb315[_0x3a27('0x31')]['ids'])['then'](function(){if(_[_0x3a27('0x85')](_0x4eb315[_0x3a27('0x31')][_0x3a27('0x6e')])){for(var _0x21f4b3=0x0;_0x21f4b3<_0x4eb315[_0x3a27('0x31')][_0x3a27('0x6e')]['length'];_0x21f4b3+=0x1){socket['emit'](_0x3a27('0x81'),{'UserId':Number(_0x4eb315[_0x3a27('0x31')][_0x3a27('0x6e')][_0x21f4b3]),'MailQueueId':Number(_0x4eb315[_0x3a27('0x41')]['id'])});}}else{socket[_0x3a27('0x6c')]('userMailQueue:remove',{'UserId':Number(_0x4eb315[_0x3a27('0x31')][_0x3a27('0x6e')]),'MailQueueId':Number(_0x4eb315['params']['id'])});}});}})[_0x3a27('0x24')](respondWithStatusCode(_0x516018,null))['catch'](handleError(_0x516018,null));};exports['getAgents']=function(_0x43432f,_0x54f4d7,_0x1bd94b){var _0x26ad88={};var _0x3239a9={};var _0x3a7130;var _0x49924a;return db['MailQueue'][_0x3a27('0x60')]({'where':{'id':_0x43432f['params']['id']}})[_0x3a27('0x24')](handleEntityNotFound(_0x54f4d7,null))[_0x3a27('0x24')](function(_0x4274cd){if(_0x4274cd){_0x3a7130=_0x4274cd;_0x3239a9[_0x3a27('0x30')]=_[_0x3a27('0x42')](db['User'][_0x3a27('0x2c')]);_0x3239a9[_0x3a27('0x31')]=_[_0x3a27('0x42')](_0x43432f[_0x3a27('0x31')]);_0x3239a9[_0x3a27('0x32')]=_['intersection'](_0x3239a9[_0x3a27('0x30')],_0x3239a9['query']);_0x26ad88[_0x3a27('0x33')]=_[_0x3a27('0x34')](_0x3239a9[_0x3a27('0x30')],qs[_0x3a27('0x35')](_0x43432f[_0x3a27('0x31')][_0x3a27('0x35')]));_0x26ad88[_0x3a27('0x33')]=_0x26ad88[_0x3a27('0x33')][_0x3a27('0x36')]?_0x26ad88[_0x3a27('0x33')]:_0x3239a9[_0x3a27('0x30')];_0x26ad88[_0x3a27('0x37')]=qs[_0x3a27('0x38')](_0x43432f[_0x3a27('0x31')]['sort']);_0x26ad88['where']=qs[_0x3a27('0x32')](_['pick'](_0x43432f[_0x3a27('0x31')],_0x3239a9[_0x3a27('0x32')]));if(_0x43432f[_0x3a27('0x31')][_0x3a27('0x54')]){_0x26ad88[_0x3a27('0x39')]=_[_0x3a27('0x3a')](_0x26ad88[_0x3a27('0x39')],{'$or':_['map'](_0x26ad88['attributes'],function(_0x2d1067){var _0x3700a0={};_0x3700a0[_0x2d1067]={'$like':'%'+_0x43432f[_0x3a27('0x31')][_0x3a27('0x54')]+'%'};return _0x3700a0;})});}_0x26ad88=_['merge']({},_0x26ad88,_0x43432f['options']);return _0x3a7130[_0x3a27('0x86')](_0x26ad88);}})['then'](function(_0x5750a5){if(_0x5750a5){_0x49924a=_0x5750a5[_0x3a27('0x36')];if(!_0x43432f[_0x3a27('0x31')][_0x3a27('0x51')](_0x3a27('0x61'))){_0x26ad88[_0x3a27('0x1e')]=qs[_0x3a27('0x1e')](_0x43432f[_0x3a27('0x31')][_0x3a27('0x1e')]);_0x26ad88[_0x3a27('0x1d')]=qs[_0x3a27('0x1d')](_0x43432f['query'][_0x3a27('0x1d')]);}return _0x3a7130['getAgents'](_0x26ad88);}})['then'](function(_0x5812ad){if(_0x5812ad){return _0x5812ad?{'count':_0x49924a,'rows':_0x5812ad}:null;}})[_0x3a27('0x24')](respondWithResult(_0x54f4d7,null))[_0x3a27('0x44')](handleError(_0x54f4d7,null));};
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.events.js b/server/api/mailQueue/mailQueue.events.js
index a59e850..b0c9b1c 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 _0x4176=['remove','emit','hook','exports','events','../../mysqldb','MailQueue','setMaxListeners','save','update'];(function(_0x268324,_0x2deac2){var _0x304497=function(_0x7dcc3d){while(--_0x7dcc3d){_0x268324['push'](_0x268324['shift']());}};_0x304497(++_0x2deac2);}(_0x4176,0x18a));var _0x6417=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x4176[_0x1ac595];return _0x455fff;};'use strict';var EventEmitter=require(_0x6417('0x0'));var MailQueue=require(_0x6417('0x1'))['db'][_0x6417('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0x6417('0x3')](0x0);var events={'afterCreate':_0x6417('0x4'),'afterUpdate':_0x6417('0x5'),'afterDestroy':_0x6417('0x6')};function emitEvent(_0x122940){return function(_0x1d60ed,_0x1fda98,_0x32bd02){MailQueueEvents[_0x6417('0x7')](_0x122940+':'+_0x1d60ed['id'],_0x1d60ed);MailQueueEvents['emit'](_0x122940,_0x1d60ed);_0x32bd02(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailQueue[_0x6417('0x8')](e,emitEvent(event));}}module[_0x6417('0x9')]=MailQueueEvents;
\ No newline at end of file
+var _0x1571=['../../mysqldb','update','remove','emit','hook'];(function(_0x59fef5,_0x4a0ac3){var _0x186f3c=function(_0x5c04d1){while(--_0x5c04d1){_0x59fef5['push'](_0x59fef5['shift']());}};_0x186f3c(++_0x4a0ac3);}(_0x1571,0xbe));var _0x1157=function(_0x506f64,_0x395f5a){_0x506f64=_0x506f64-0x0;var _0x389fdb=_0x1571[_0x506f64];return _0x389fdb;};'use strict';var EventEmitter=require('events');var MailQueue=require(_0x1157('0x0'))['db']['MailQueue'];var MailQueueEvents=new EventEmitter();MailQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x1157('0x1'),'afterDestroy':_0x1157('0x2')};function emitEvent(_0x19a3c0){return function(_0x59ec13,_0x419913,_0x18c887){MailQueueEvents['emit'](_0x19a3c0+':'+_0x59ec13['id'],_0x59ec13);MailQueueEvents[_0x1157('0x3')](_0x19a3c0,_0x59ec13);_0x18c887(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailQueue[_0x1157('0x4')](e,emitEvent(event));}}module['exports']=MailQueueEvents;
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.model.js b/server/api/mailQueue/mailQueue.model.js
index a176b11..e90afd7 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 _0x9793=['../../config/environment','./mailQueue.attributes','exports','define','MailQueue','mail_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x50e593,_0x3ae998){var _0x3821d0=function(_0x53c295){while(--_0x53c295){_0x50e593['push'](_0x50e593['shift']());}};_0x3821d0(++_0x3ae998);}(_0x9793,0x1d7));var _0x3979=function(_0x335159,_0x5c0405){_0x335159=_0x335159-0x0;var _0x41ce53=_0x9793[_0x335159];return _0x41ce53;};'use strict';var _=require(_0x3979('0x0'));var util=require(_0x3979('0x1'));var logger=require(_0x3979('0x2'))(_0x3979('0x3'));var moment=require(_0x3979('0x4'));var BPromise=require(_0x3979('0x5'));var rp=require(_0x3979('0x6'));var fs=require('fs');var path=require(_0x3979('0x7'));var rimraf=require(_0x3979('0x8'));var config=require(_0x3979('0x9'));var attributes=require(_0x3979('0xa'));module[_0x3979('0xb')]=function(_0x3ec409,_0x381a56){return _0x3ec409[_0x3979('0xc')](_0x3979('0xd'),attributes,{'tableName':_0x3979('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x01b0=['bluebird','request-promise','path','../../config/environment','./mailQueue.attributes','define','MailQueue','mail_queues','lodash','../../config/logger','api','moment'];(function(_0x50aa28,_0x25c500){var _0x2f9b54=function(_0x46f767){while(--_0x46f767){_0x50aa28['push'](_0x50aa28['shift']());}};_0x2f9b54(++_0x25c500);}(_0x01b0,0x80));var _0x001b=function(_0x476b8b,_0x1ce6d9){_0x476b8b=_0x476b8b-0x0;var _0x30f928=_0x01b0[_0x476b8b];return _0x30f928;};'use strict';var _=require(_0x001b('0x0'));var util=require('util');var logger=require(_0x001b('0x1'))(_0x001b('0x2'));var moment=require(_0x001b('0x3'));var BPromise=require(_0x001b('0x4'));var rp=require(_0x001b('0x5'));var fs=require('fs');var path=require(_0x001b('0x6'));var rimraf=require('rimraf');var config=require(_0x001b('0x7'));var attributes=require(_0x001b('0x8'));module['exports']=function(_0x4f3db7,_0x4fdaaf){return _0x4f3db7[_0x001b('0x9')](_0x001b('0xa'),attributes,{'tableName':_0x001b('0xb'),'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 a60228a..28cd122 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 _0xcfac=['request\x20sent','stringify','error','code','message','result','catch','GetMailQueue','MailQueue','findAll','options','raw','where','attributes','include','map','model','find','ShowMailQueue','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','MailQueue,\x20%s,\x20%s','debug'];(function(_0x20fc00,_0x43eeb9){var _0x3cd800=function(_0x298cb4){while(--_0x298cb4){_0x20fc00['push'](_0x20fc00['shift']());}};_0x3cd800(++_0x43eeb9);}(_0xcfac,0x163));var _0xccfa=function(_0x33e522,_0x1b1723){_0x33e522=_0x33e522-0x0;var _0x26b31d=_0xcfac[_0x33e522];return _0x26b31d;};'use strict';var _=require('lodash');var util=require(_0xccfa('0x0'));var moment=require(_0xccfa('0x1'));var BPromise=require(_0xccfa('0x2'));var rs=require(_0xccfa('0x3'));var fs=require('fs');var Redis=require(_0xccfa('0x4'));var db=require(_0xccfa('0x5'))['db'];var utils=require(_0xccfa('0x6'));var logger=require(_0xccfa('0x7'))(_0xccfa('0x8'));var config=require(_0xccfa('0x9'));var jayson=require(_0xccfa('0xa'));var client=jayson[_0xccfa('0xb')][_0xccfa('0xc')]({'port':0x232a});config[_0xccfa('0xd')]=_[_0xccfa('0xe')](config[_0xccfa('0xd')],{'host':_0xccfa('0xf'),'port':0x18eb});var socket=require(_0xccfa('0x10'))(new Redis(config[_0xccfa('0xd')]));require('./mailQueue.socket')[_0xccfa('0x11')](socket);function respondWithRpcPromise(_0x4060b4,_0x555510,_0xabb9f7){return new BPromise(function(_0x39feff,_0x492d1b){return client[_0xccfa('0x12')](_0x4060b4,_0xabb9f7)[_0xccfa('0x13')](function(_0x2d0eb8){logger[_0xccfa('0x14')](_0xccfa('0x15'),_0x555510,'request\x20sent');logger[_0xccfa('0x16')]('MailQueue,\x20%s,\x20%s,\x20%s',_0x555510,_0xccfa('0x17'),JSON[_0xccfa('0x18')](_0x2d0eb8));if(_0x2d0eb8[_0xccfa('0x19')]){if(_0x2d0eb8[_0xccfa('0x19')][_0xccfa('0x1a')]===0x1f4){logger[_0xccfa('0x19')](_0xccfa('0x15'),_0x555510,_0x2d0eb8[_0xccfa('0x19')][_0xccfa('0x1b')]);return _0x492d1b(_0x2d0eb8[_0xccfa('0x19')][_0xccfa('0x1b')]);}logger[_0xccfa('0x19')]('MailQueue,\x20%s,\x20%s',_0x555510,_0x2d0eb8['error'][_0xccfa('0x1b')]);return _0x39feff(_0x2d0eb8[_0xccfa('0x19')]['message']);}else{logger[_0xccfa('0x14')]('MailQueue,\x20%s,\x20%s',_0x555510,_0xccfa('0x17'));_0x39feff(_0x2d0eb8[_0xccfa('0x1c')][_0xccfa('0x1b')]);}})[_0xccfa('0x1d')](function(_0x392f5b){logger[_0xccfa('0x19')]('MailQueue,\x20%s,\x20%s',_0x555510,_0x392f5b);_0x492d1b(_0x392f5b);});});}exports[_0xccfa('0x1e')]=function(_0x10c87a){var _0x50f3ca=this;return new Promise(function(_0x5f3379,_0x5bdc61){return db[_0xccfa('0x1f')][_0xccfa('0x20')]({'raw':_0x10c87a[_0xccfa('0x21')]?_0x10c87a['options'][_0xccfa('0x22')]===undefined?!![]:![]:!![],'where':_0x10c87a[_0xccfa('0x21')]?_0x10c87a['options'][_0xccfa('0x23')]||null:null,'attributes':_0x10c87a[_0xccfa('0x21')]?_0x10c87a[_0xccfa('0x21')][_0xccfa('0x24')]||null:null,'limit':_0x10c87a[_0xccfa('0x21')]?_0x10c87a[_0xccfa('0x21')]['limit']||null:null,'include':_0x10c87a['options']?_0x10c87a[_0xccfa('0x21')][_0xccfa('0x25')]?_[_0xccfa('0x26')](_0x10c87a['options']['include'],function(_0xdaa55d){return{'model':db[_0xdaa55d[_0xccfa('0x27')]],'as':_0xdaa55d['as'],'attributes':_0xdaa55d[_0xccfa('0x24')],'include':_0xdaa55d['include']?_[_0xccfa('0x26')](_0xdaa55d[_0xccfa('0x25')],function(_0x1263a4){return{'model':db[_0x1263a4['model']],'as':_0x1263a4['as'],'attributes':_0x1263a4[_0xccfa('0x24')],'include':_0x1263a4[_0xccfa('0x25')]?_['map'](_0x1263a4[_0xccfa('0x25')],function(_0x4c23cc){return{'model':db[_0x4c23cc[_0xccfa('0x27')]],'as':_0x4c23cc['as'],'attributes':_0x4c23cc['attributes']};}):[]};}):[]};}):[]:[]})[_0xccfa('0x13')](function(_0x1ab9ce){logger[_0xccfa('0x14')](_0xccfa('0x1e'),_0x10c87a);logger[_0xccfa('0x16')](_0xccfa('0x1e'),_0x10c87a,JSON['stringify'](_0x1ab9ce));_0x5f3379(_0x1ab9ce);})[_0xccfa('0x1d')](function(_0x5e7c50){logger['error'](_0xccfa('0x1e'),_0x5e7c50[_0xccfa('0x1b')],_0x10c87a);_0x5bdc61(_0x50f3ca[_0xccfa('0x19')](0x1f4,_0x5e7c50['message']));});});};exports['ShowMailQueue']=function(_0xe3fa01){var _0x6c7814=this;return new Promise(function(_0x33ef56,_0x4578ef){return db[_0xccfa('0x1f')][_0xccfa('0x28')]({'raw':_0xe3fa01[_0xccfa('0x21')]?_0xe3fa01[_0xccfa('0x21')]['raw']===undefined?!![]:![]:!![],'where':_0xe3fa01[_0xccfa('0x21')]?_0xe3fa01['options']['where']||null:null,'attributes':_0xe3fa01[_0xccfa('0x21')]?_0xe3fa01[_0xccfa('0x21')]['attributes']||null:null,'include':_0xe3fa01['options']?_0xe3fa01[_0xccfa('0x21')]['include']?_[_0xccfa('0x26')](_0xe3fa01[_0xccfa('0x21')][_0xccfa('0x25')],function(_0x1d0fad){return{'model':db[_0x1d0fad['model']],'as':_0x1d0fad['as'],'attributes':_0x1d0fad['attributes'],'include':_0x1d0fad[_0xccfa('0x25')]?_[_0xccfa('0x26')](_0x1d0fad[_0xccfa('0x25')],function(_0x46f2fd){return{'model':db[_0x46f2fd[_0xccfa('0x27')]],'as':_0x46f2fd['as'],'attributes':_0x46f2fd[_0xccfa('0x24')],'include':_0x46f2fd[_0xccfa('0x25')]?_[_0xccfa('0x26')](_0x46f2fd[_0xccfa('0x25')],function(_0x28523d){return{'model':db[_0x28523d[_0xccfa('0x27')]],'as':_0x28523d['as'],'attributes':_0x28523d['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x102b3d){logger[_0xccfa('0x14')](_0xccfa('0x29'),_0xe3fa01);logger['debug'](_0xccfa('0x29'),_0xe3fa01,JSON[_0xccfa('0x18')](_0x102b3d));_0x33ef56(_0x102b3d);})[_0xccfa('0x1d')](function(_0x3b3fb7){logger[_0xccfa('0x19')](_0xccfa('0x29'),_0x3b3fb7[_0xccfa('0x1b')],_0xe3fa01);_0x4578ef(_0x6c7814[_0xccfa('0x19')](0x1f4,_0x3b3fb7[_0xccfa('0x1b')]));});});};
\ No newline at end of file
+var _0xa0e5=['client','redis','defaults','localhost','socket.io-emitter','register','request','then','info','MailQueue,\x20%s,\x20%s','MailQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','catch','GetMailQueue','findAll','options','raw','where','attributes','limit','include','map','model','ShowMailQueue','MailQueue','find','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0x11de96,_0x3b172b){var _0x26d213=function(_0x178662){while(--_0x178662){_0x11de96['push'](_0x11de96['shift']());}};_0x26d213(++_0x3b172b);}(_0xa0e5,0x6f));var _0x5a0e=function(_0x3530cd,_0x40dc83){_0x3530cd=_0x3530cd-0x0;var _0x4b6d19=_0xa0e5[_0x3530cd];return _0x4b6d19;};'use strict';var _=require(_0x5a0e('0x0'));var util=require('util');var moment=require(_0x5a0e('0x1'));var BPromise=require(_0x5a0e('0x2'));var rs=require(_0x5a0e('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5a0e('0x4'))['db'];var utils=require(_0x5a0e('0x5'));var logger=require('../../config/logger')(_0x5a0e('0x6'));var config=require(_0x5a0e('0x7'));var jayson=require(_0x5a0e('0x8'));var client=jayson[_0x5a0e('0x9')]['http']({'port':0x232a});config[_0x5a0e('0xa')]=_[_0x5a0e('0xb')](config[_0x5a0e('0xa')],{'host':_0x5a0e('0xc'),'port':0x18eb});var socket=require(_0x5a0e('0xd'))(new Redis(config[_0x5a0e('0xa')]));require('./mailQueue.socket')[_0x5a0e('0xe')](socket);function respondWithRpcPromise(_0x275eb1,_0x817f95,_0x372335){return new BPromise(function(_0x40494d,_0xb3b4c9){return client[_0x5a0e('0xf')](_0x275eb1,_0x372335)[_0x5a0e('0x10')](function(_0x3ec250){logger[_0x5a0e('0x11')](_0x5a0e('0x12'),_0x817f95,'request\x20sent');logger['debug'](_0x5a0e('0x13'),_0x817f95,_0x5a0e('0x14'),JSON[_0x5a0e('0x15')](_0x3ec250));if(_0x3ec250['error']){if(_0x3ec250['error'][_0x5a0e('0x16')]===0x1f4){logger[_0x5a0e('0x17')]('MailQueue,\x20%s,\x20%s',_0x817f95,_0x3ec250['error'][_0x5a0e('0x18')]);return _0xb3b4c9(_0x3ec250[_0x5a0e('0x17')][_0x5a0e('0x18')]);}logger['error'](_0x5a0e('0x12'),_0x817f95,_0x3ec250[_0x5a0e('0x17')][_0x5a0e('0x18')]);return _0x40494d(_0x3ec250[_0x5a0e('0x17')][_0x5a0e('0x18')]);}else{logger[_0x5a0e('0x11')]('MailQueue,\x20%s,\x20%s',_0x817f95,_0x5a0e('0x14'));_0x40494d(_0x3ec250[_0x5a0e('0x19')][_0x5a0e('0x18')]);}})[_0x5a0e('0x1a')](function(_0x145d7f){logger[_0x5a0e('0x17')](_0x5a0e('0x12'),_0x817f95,_0x145d7f);_0xb3b4c9(_0x145d7f);});});}exports[_0x5a0e('0x1b')]=function(_0x315c81){var _0x5bcd62=this;return new Promise(function(_0xa89934,_0xb1026c){return db['MailQueue'][_0x5a0e('0x1c')]({'raw':_0x315c81[_0x5a0e('0x1d')]?_0x315c81[_0x5a0e('0x1d')][_0x5a0e('0x1e')]===undefined?!![]:![]:!![],'where':_0x315c81[_0x5a0e('0x1d')]?_0x315c81[_0x5a0e('0x1d')][_0x5a0e('0x1f')]||null:null,'attributes':_0x315c81[_0x5a0e('0x1d')]?_0x315c81[_0x5a0e('0x1d')][_0x5a0e('0x20')]||null:null,'limit':_0x315c81[_0x5a0e('0x1d')]?_0x315c81['options'][_0x5a0e('0x21')]||null:null,'include':_0x315c81[_0x5a0e('0x1d')]?_0x315c81[_0x5a0e('0x1d')][_0x5a0e('0x22')]?_[_0x5a0e('0x23')](_0x315c81[_0x5a0e('0x1d')][_0x5a0e('0x22')],function(_0x5ae36e){return{'model':db[_0x5ae36e[_0x5a0e('0x24')]],'as':_0x5ae36e['as'],'attributes':_0x5ae36e[_0x5a0e('0x20')],'include':_0x5ae36e['include']?_['map'](_0x5ae36e[_0x5a0e('0x22')],function(_0x3b6b61){return{'model':db[_0x3b6b61[_0x5a0e('0x24')]],'as':_0x3b6b61['as'],'attributes':_0x3b6b61['attributes'],'include':_0x3b6b61[_0x5a0e('0x22')]?_[_0x5a0e('0x23')](_0x3b6b61['include'],function(_0x5ca1e0){return{'model':db[_0x5ca1e0['model']],'as':_0x5ca1e0['as'],'attributes':_0x5ca1e0[_0x5a0e('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1c5c87){logger['info'](_0x5a0e('0x1b'),_0x315c81);logger['debug'](_0x5a0e('0x1b'),_0x315c81,JSON[_0x5a0e('0x15')](_0x1c5c87));_0xa89934(_0x1c5c87);})['catch'](function(_0x5adcae){logger[_0x5a0e('0x17')](_0x5a0e('0x1b'),_0x5adcae[_0x5a0e('0x18')],_0x315c81);_0xb1026c(_0x5bcd62['error'](0x1f4,_0x5adcae[_0x5a0e('0x18')]));});});};exports[_0x5a0e('0x25')]=function(_0x534647){var _0x1420ea=this;return new Promise(function(_0x4f88cd,_0x2f8493){return db[_0x5a0e('0x26')][_0x5a0e('0x27')]({'raw':_0x534647[_0x5a0e('0x1d')]?_0x534647[_0x5a0e('0x1d')][_0x5a0e('0x1e')]===undefined?!![]:![]:!![],'where':_0x534647['options']?_0x534647[_0x5a0e('0x1d')][_0x5a0e('0x1f')]||null:null,'attributes':_0x534647[_0x5a0e('0x1d')]?_0x534647[_0x5a0e('0x1d')]['attributes']||null:null,'include':_0x534647['options']?_0x534647[_0x5a0e('0x1d')][_0x5a0e('0x22')]?_[_0x5a0e('0x23')](_0x534647['options'][_0x5a0e('0x22')],function(_0x36f908){return{'model':db[_0x36f908['model']],'as':_0x36f908['as'],'attributes':_0x36f908[_0x5a0e('0x20')],'include':_0x36f908['include']?_['map'](_0x36f908[_0x5a0e('0x22')],function(_0x3d117c){return{'model':db[_0x3d117c[_0x5a0e('0x24')]],'as':_0x3d117c['as'],'attributes':_0x3d117c[_0x5a0e('0x20')],'include':_0x3d117c[_0x5a0e('0x22')]?_[_0x5a0e('0x23')](_0x3d117c['include'],function(_0x2b6cb6){return{'model':db[_0x2b6cb6['model']],'as':_0x2b6cb6['as'],'attributes':_0x2b6cb6[_0x5a0e('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1d9cf9){logger[_0x5a0e('0x11')]('ShowMailQueue',_0x534647);logger['debug'](_0x5a0e('0x25'),_0x534647,JSON[_0x5a0e('0x15')](_0x1d9cf9));_0x4f88cd(_0x1d9cf9);})[_0x5a0e('0x1a')](function(_0x547ac4){logger[_0x5a0e('0x17')](_0x5a0e('0x25'),_0x547ac4['message'],_0x534647);_0x2f8493(_0x1420ea['error'](0x1f4,_0x547ac4[_0x5a0e('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/mailQueue/mailQueue.socket.js b/server/api/mailQueue/mailQueue.socket.js
index 948ee59..5cb068d 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 _0x7974=['./mailQueue.events','save','remove','update','emit','register','length'];(function(_0x314ca9,_0x2561dd){var _0x498a70=function(_0x25b073){while(--_0x25b073){_0x314ca9['push'](_0x314ca9['shift']());}};_0x498a70(++_0x2561dd);}(_0x7974,0x12d));var _0x4797=function(_0x125ff8,_0x41925f){_0x125ff8=_0x125ff8-0x0;var _0x2d9ef=_0x7974[_0x125ff8];return _0x2d9ef;};'use strict';var MailQueueEvents=require(_0x4797('0x0'));var events=[_0x4797('0x1'),_0x4797('0x2'),_0x4797('0x3')];function createListener(_0x4d0825,_0xc01e81){return function(_0x5321ef){_0xc01e81[_0x4797('0x4')](_0x4d0825,_0x5321ef);};}function removeListener(_0x3b347c,_0x498f39){return function(){MailQueueEvents['removeListener'](_0x3b347c,_0x498f39);};}exports[_0x4797('0x5')]=function(_0x2e017a){for(var _0x39f960=0x0,_0x741b8d=events[_0x4797('0x6')];_0x39f960<_0x741b8d;_0x39f960++){var _0x5a0f8c=events[_0x39f960];var _0x5dcea7=createListener('mailQueue:'+_0x5a0f8c,_0x2e017a);MailQueueEvents['on'](_0x5a0f8c,_0x5dcea7);}};
\ No newline at end of file
+var _0x438a=['removeListener','register','mailQueue:','./mailQueue.events','save','update','emit'];(function(_0x164eca,_0x555e28){var _0x2ce562=function(_0x148ca6){while(--_0x148ca6){_0x164eca['push'](_0x164eca['shift']());}};_0x2ce562(++_0x555e28);}(_0x438a,0xf1));var _0xa438=function(_0x521b4c,_0x31b98d){_0x521b4c=_0x521b4c-0x0;var _0x18c2b0=_0x438a[_0x521b4c];return _0x18c2b0;};'use strict';var MailQueueEvents=require(_0xa438('0x0'));var events=[_0xa438('0x1'),'remove',_0xa438('0x2')];function createListener(_0x43c1f8,_0x363939){return function(_0x534a7a){_0x363939[_0xa438('0x3')](_0x43c1f8,_0x534a7a);};}function removeListener(_0x2e5b67,_0x29e080){return function(){MailQueueEvents[_0xa438('0x4')](_0x2e5b67,_0x29e080);};}exports[_0xa438('0x5')]=function(_0x1ba2fe){for(var _0xfd93e6=0x0,_0x56e046=events['length'];_0xfd93e6<_0x56e046;_0xfd93e6++){var _0x150253=events[_0xfd93e6];var _0x5f5b4d=createListener(_0xa438('0x6')+_0x150253,_0x1ba2fe);MailQueueEvents['on'](_0x150253,_0x5f5b4d);}};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/index.js b/server/api/mailQueueReport/index.js
index f46a129..a7258e4 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 _0x6879=['post','create','update','delete','multer','path','connect-timeout','express','Router','../../config/environment','./mailQueueReport.controller','index','get','/describe','isAuthenticated','/:id'];(function(_0x3f0b90,_0x4182eb){var _0x85d358=function(_0x120305){while(--_0x120305){_0x3f0b90['push'](_0x3f0b90['shift']());}};_0x85d358(++_0x4182eb);}(_0x6879,0x1b4));var _0x9687=function(_0x1be813,_0x22d0a0){_0x1be813=_0x1be813-0x0;var _0x375a11=_0x6879[_0x1be813];return _0x375a11;};'use strict';var multer=require(_0x9687('0x0'));var util=require('util');var path=require(_0x9687('0x1'));var timeout=require(_0x9687('0x2'));var express=require(_0x9687('0x3'));var router=express[_0x9687('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x9687('0x5'));var controller=require(_0x9687('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x9687('0x7')]);router[_0x9687('0x8')](_0x9687('0x9'),auth[_0x9687('0xa')](),controller['describe']);router[_0x9687('0x8')](_0x9687('0xb'),auth[_0x9687('0xa')](),controller['show']);router[_0x9687('0xc')]('/',auth[_0x9687('0xa')](),controller[_0x9687('0xd')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x9687('0xe')]);router[_0x9687('0xf')](_0x9687('0xb'),auth[_0x9687('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xedfb=['destroy','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../config/environment','./mailQueueReport.controller','get','isAuthenticated','index','/describe','/:id','show','post','create','put','update','delete'];(function(_0x5e8460,_0x2003b5){var _0x3d50fd=function(_0x4c499f){while(--_0x4c499f){_0x5e8460['push'](_0x5e8460['shift']());}};_0x3d50fd(++_0x2003b5);}(_0xedfb,0x191));var _0xbedf=function(_0x1fbdd1,_0x17323f){_0x1fbdd1=_0x1fbdd1-0x0;var _0x3319a2=_0xedfb[_0x1fbdd1];return _0x3319a2;};'use strict';var multer=require(_0xbedf('0x0'));var util=require(_0xbedf('0x1'));var path=require(_0xbedf('0x2'));var timeout=require(_0xbedf('0x3'));var express=require(_0xbedf('0x4'));var router=express['Router']();var auth=require(_0xbedf('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xbedf('0x6'));var controller=require(_0xbedf('0x7'));router[_0xbedf('0x8')]('/',auth[_0xbedf('0x9')](),controller[_0xbedf('0xa')]);router['get'](_0xbedf('0xb'),auth[_0xbedf('0x9')](),controller['describe']);router[_0xbedf('0x8')](_0xbedf('0xc'),auth[_0xbedf('0x9')](),controller[_0xbedf('0xd')]);router[_0xbedf('0xe')]('/',auth[_0xbedf('0x9')](),controller[_0xbedf('0xf')]);router[_0xbedf('0x10')]('/:id',auth[_0xbedf('0x9')](),controller[_0xbedf('0x11')]);router[_0xbedf('0x12')](_0xbedf('0xc'),auth['isAuthenticated'](),controller[_0xbedf('0x13')]);module[_0xbedf('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.attributes.js b/server/api/mailQueueReport/mailQueueReport.attributes.js
index 8cee184..17619d3 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 _0xa4ec=['sequelize','exports','STRING','DATE'];(function(_0x3270a4,_0x2fed88){var _0x2767b3=function(_0x5d5d94){while(--_0x5d5d94){_0x3270a4['push'](_0x3270a4['shift']());}};_0x2767b3(++_0x2fed88);}(_0xa4ec,0x1c8));var _0xca4e=function(_0x373dee,_0x1a8c45){_0x373dee=_0x373dee-0x0;var _0x46798f=_0xa4ec[_0x373dee];return _0x46798f;};'use strict';var moment=require('moment');var Sequelize=require(_0xca4e('0x0'));module[_0xca4e('0x1')]={'uniqueid':{'type':Sequelize[_0xca4e('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0xca4e('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0xca4e('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0xca4e('0x3')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x41cf=['exports','STRING','DATE','moment','sequelize'];(function(_0x49748c,_0x3d2005){var _0xedf6b6=function(_0x11628d){while(--_0x11628d){_0x49748c['push'](_0x49748c['shift']());}};_0xedf6b6(++_0x3d2005);}(_0x41cf,0x1e3));var _0xf41c=function(_0x3b0731,_0xcf9925){_0x3b0731=_0x3b0731-0x0;var _0x4204d7=_0x41cf[_0x3b0731];return _0x4204d7;};'use strict';var moment=require(_0xf41c('0x0'));var Sequelize=require(_0xf41c('0x1'));module[_0xf41c('0x2')]={'uniqueid':{'type':Sequelize[_0xf41c('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0xf41c('0x3')]},'joinAt':{'type':Sequelize[_0xf41c('0x4')]},'leaveAt':{'type':Sequelize[_0xf41c('0x4')]},'acceptAt':{'type':Sequelize[_0xf41c('0x4')]},'exitAt':{'type':Sequelize[_0xf41c('0x4')]},'reason':{'type':Sequelize[_0xf41c('0x3')]}};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.controller.js b/server/api/mailQueueReport/mailQueueReport.controller.js
index 78e54e8..326f078 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 _0x00f4=['merge','VIRTUAL','includeAll','findAll','catch','show','params','include','find','create','body','describe','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','sendStatus','status','json','count','offset','limit','set','apply','reject','then','destroy','error','stack','name','map','MailQueueReport','rawAttributes','type','key','model','query','attributes','intersection','fields','order','sort','where','filters','filter'];(function(_0x2ec153,_0x67b68d){var _0x3610d4=function(_0x2bc046){while(--_0x2bc046){_0x2ec153['push'](_0x2ec153['shift']());}};_0x3610d4(++_0x67b68d);}(_0x00f4,0x8a));var _0x400f=function(_0x451d9b,_0x3e5f74){_0x451d9b=_0x451d9b-0x0;var _0x1964fb=_0x00f4[_0x451d9b];return _0x1964fb;};'use strict';var pdf=require(_0x400f('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x400f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x400f('0x2'));var rp=require(_0x400f('0x3'));var moment=require(_0x400f('0x4'));var BPromise=require(_0x400f('0x5'));var Mustache=require(_0x400f('0x6'));var util=require('util');var path=require(_0x400f('0x7'));var sox=require(_0x400f('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x400f('0x9'));var squel=require(_0x400f('0xa'));var crypto=require(_0x400f('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x400f('0xc'));var toCsv=require('to-csv');var querystring=require(_0x400f('0xd'));var Papa=require(_0x400f('0xe'));var Redis=require(_0x400f('0xf'));var authService=require(_0x400f('0x10'));var qs=require(_0x400f('0x11'));var as=require(_0x400f('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x400f('0x13'))(_0x400f('0x14'));var utils=require(_0x400f('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x542187,_0xfb136c){_0xfb136c=_0xfb136c||0xcc;return function(_0x2f5738){if(_0x2f5738){return _0x542187[_0x400f('0x16')](_0xfb136c);}return _0x542187['status'](_0xfb136c)['end']();};}function respondWithResult(_0x202d57,_0x432527){_0x432527=_0x432527||0xc8;return function(_0x1c6739){if(_0x1c6739){return _0x202d57[_0x400f('0x17')](_0x432527)[_0x400f('0x18')](_0x1c6739);}};}function respondWithFilteredResult(_0x11faad,_0x2820d1){return function(_0x2f4db5){if(_0x2f4db5){var _0x480d6a=_0x2f4db5[_0x400f('0x19')],_0x569d2a=_0x2820d1['offset'],_0x15ac5c=_0x2820d1[_0x400f('0x1a')]+_0x2820d1[_0x400f('0x1b')],_0x3a2038;if(_0x15ac5c>=_0x480d6a){_0x15ac5c=_0x480d6a;_0x3a2038=0xc8;}else{_0x3a2038=0xce;}_0x11faad[_0x400f('0x17')](_0x3a2038);return _0x11faad[_0x400f('0x1c')]('Content-Range',_0x569d2a+'-'+_0x15ac5c+'/'+_0x480d6a)[_0x400f('0x18')](_0x2f4db5);}return null;};}function patchUpdates(_0x11f1ea){return function(_0xeed82f){try{jsonpatch[_0x400f('0x1d')](_0xeed82f,_0x11f1ea,!![]);}catch(_0x534b85){return BPromise[_0x400f('0x1e')](_0x534b85);}return _0xeed82f['save']();};}function saveUpdates(_0x352444,_0x38edca){return function(_0x4d5818){if(_0x4d5818){return _0x4d5818['update'](_0x352444)[_0x400f('0x1f')](function(_0x5cafc2){return _0x5cafc2;});}return null;};}function removeEntity(_0x1196ef,_0x171524){return function(_0x3d9bb3){if(_0x3d9bb3){return _0x3d9bb3[_0x400f('0x20')]()['then'](function(){_0x1196ef[_0x400f('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x586c44,_0x479759){return function(_0x1b57fd){if(!_0x1b57fd){_0x586c44[_0x400f('0x16')](0x194);}return _0x1b57fd;};}function handleError(_0x9ad09,_0x2be19f){_0x2be19f=_0x2be19f||0x1f4;return function(_0x3c8189){logger[_0x400f('0x21')](_0x3c8189[_0x400f('0x22')]);if(_0x3c8189[_0x400f('0x23')]){delete _0x3c8189[_0x400f('0x23')];}_0x9ad09[_0x400f('0x17')](_0x2be19f)['send'](_0x3c8189);};}exports['index']=function(_0x5d01ae,_0x3444e3){var _0x2135d9={},_0x1c4334={},_0x417cba={'count':0x0,'rows':[]};var _0x31c6d0=_[_0x400f('0x24')](db[_0x400f('0x25')][_0x400f('0x26')],function(_0x27276d){return{'name':_0x27276d['fieldName'],'type':_0x27276d[_0x400f('0x27')][_0x400f('0x28')]};});_0x1c4334[_0x400f('0x29')]=_['map'](_0x31c6d0,_0x400f('0x23'));_0x1c4334[_0x400f('0x2a')]=_['keys'](_0x5d01ae[_0x400f('0x2a')]);_0x1c4334['filters']=_['intersection'](_0x1c4334[_0x400f('0x29')],_0x1c4334['query']);_0x2135d9[_0x400f('0x2b')]=_[_0x400f('0x2c')](_0x1c4334[_0x400f('0x29')],qs[_0x400f('0x2d')](_0x5d01ae[_0x400f('0x2a')][_0x400f('0x2d')]));_0x2135d9[_0x400f('0x2b')]=_0x2135d9['attributes']['length']?_0x2135d9[_0x400f('0x2b')]:_0x1c4334[_0x400f('0x29')];if(!_0x5d01ae['query']['hasOwnProperty']('nolimit')){_0x2135d9[_0x400f('0x1b')]=qs[_0x400f('0x1b')](_0x5d01ae[_0x400f('0x2a')][_0x400f('0x1b')]);_0x2135d9[_0x400f('0x1a')]=qs['offset'](_0x5d01ae[_0x400f('0x2a')]['offset']);}_0x2135d9[_0x400f('0x2e')]=qs[_0x400f('0x2f')](_0x5d01ae['query']['sort']);_0x2135d9[_0x400f('0x30')]=qs[_0x400f('0x31')](_['pick'](_0x5d01ae[_0x400f('0x2a')],_0x1c4334[_0x400f('0x31')]));if(_0x5d01ae[_0x400f('0x2a')][_0x400f('0x32')]){_0x2135d9[_0x400f('0x30')]=_[_0x400f('0x33')](_0x2135d9[_0x400f('0x30')],{'$or':_[_0x400f('0x24')](_0x31c6d0,function(_0x52d9e1){if(_0x52d9e1[_0x400f('0x27')]!==_0x400f('0x34')){var _0x52aa84={};_0x52aa84[_0x52d9e1['name']]={'$like':'%'+_0x5d01ae[_0x400f('0x2a')][_0x400f('0x32')]+'%'};return _0x52aa84;}})});}_0x2135d9=_['merge']({},_0x2135d9,_0x5d01ae['options']);var _0x236f3d={'where':_0x2135d9['where']};return db[_0x400f('0x25')][_0x400f('0x19')](_0x236f3d)[_0x400f('0x1f')](function(_0x100c2f){_0x417cba[_0x400f('0x19')]=_0x100c2f;if(_0x5d01ae[_0x400f('0x2a')][_0x400f('0x35')]){_0x2135d9['include']=[{'all':!![]}];}return db[_0x400f('0x25')][_0x400f('0x36')](_0x2135d9);})[_0x400f('0x1f')](function(_0x5764bb){_0x417cba['rows']=_0x5764bb;return _0x417cba;})[_0x400f('0x1f')](respondWithFilteredResult(_0x3444e3,_0x2135d9))[_0x400f('0x37')](handleError(_0x3444e3,null));};exports[_0x400f('0x38')]=function(_0x314bd6,_0x57bc2d){var _0x59e72c={'raw':!![],'where':{'id':_0x314bd6[_0x400f('0x39')]['id']}},_0x315baa={};_0x315baa[_0x400f('0x29')]=_['keys'](db['MailQueueReport'][_0x400f('0x26')]);_0x315baa[_0x400f('0x2a')]=_['keys'](_0x314bd6[_0x400f('0x2a')]);_0x315baa[_0x400f('0x31')]=_[_0x400f('0x2c')](_0x315baa['model'],_0x315baa['query']);_0x59e72c[_0x400f('0x2b')]=_[_0x400f('0x2c')](_0x315baa[_0x400f('0x29')],qs[_0x400f('0x2d')](_0x314bd6[_0x400f('0x2a')][_0x400f('0x2d')]));_0x59e72c[_0x400f('0x2b')]=_0x59e72c['attributes']['length']?_0x59e72c[_0x400f('0x2b')]:_0x315baa[_0x400f('0x29')];if(_0x314bd6['query'][_0x400f('0x35')]){_0x59e72c[_0x400f('0x3a')]=[{'all':!![]}];}_0x59e72c=_[_0x400f('0x33')]({},_0x59e72c,_0x314bd6['options']);return db['MailQueueReport'][_0x400f('0x3b')](_0x59e72c)[_0x400f('0x1f')](handleEntityNotFound(_0x57bc2d,null))[_0x400f('0x1f')](respondWithResult(_0x57bc2d,null))['catch'](handleError(_0x57bc2d,null));};exports[_0x400f('0x3c')]=function(_0x34effc,_0x538ce5){return db[_0x400f('0x25')][_0x400f('0x3c')](_0x34effc[_0x400f('0x3d')],{})[_0x400f('0x1f')](respondWithResult(_0x538ce5,0xc9))['catch'](handleError(_0x538ce5,null));};exports['update']=function(_0x35c63e,_0x318e45){if(_0x35c63e[_0x400f('0x3d')]['id']){delete _0x35c63e[_0x400f('0x3d')]['id'];}return db[_0x400f('0x25')][_0x400f('0x3b')]({'where':{'id':_0x35c63e['params']['id']}})[_0x400f('0x1f')](handleEntityNotFound(_0x318e45,null))[_0x400f('0x1f')](saveUpdates(_0x35c63e[_0x400f('0x3d')],null))[_0x400f('0x1f')](respondWithResult(_0x318e45,null))[_0x400f('0x37')](handleError(_0x318e45,null));};exports[_0x400f('0x20')]=function(_0x318f3e,_0x2adc67){return db['MailQueueReport'][_0x400f('0x3b')]({'where':{'id':_0x318f3e[_0x400f('0x39')]['id']}})[_0x400f('0x1f')](handleEntityNotFound(_0x2adc67,null))[_0x400f('0x1f')](removeEntity(_0x2adc67,null))[_0x400f('0x37')](handleError(_0x2adc67,null));};exports[_0x400f('0x3e')]=function(_0x28624f,_0x112392){return db[_0x400f('0x25')]['describe']()['then'](respondWithResult(_0x112392,null))[_0x400f('0x37')](handleError(_0x112392,null));};
\ No newline at end of file
+var _0xe1e4=['describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','set','Content-Range','reject','save','update','then','destroy','error','name','send','index','map','fieldName','type','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','limit','order','filters','pick','filter','where','merge','MailQueueReport','count','findAll','rows','catch','show','params','keys','rawAttributes','includeAll','create','body','find'];(function(_0x10bdbd,_0x419ac7){var _0x5a8d17=function(_0x40e534){while(--_0x40e534){_0x10bdbd['push'](_0x10bdbd['shift']());}};_0x5a8d17(++_0x419ac7);}(_0xe1e4,0x178));var _0x4e1e=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xe1e4[_0x4565bf];return _0x5610ba;};'use strict';var pdf=require(_0x4e1e('0x0'));var emlformat=require(_0x4e1e('0x1'));var rimraf=require(_0x4e1e('0x2'));var zipdir=require(_0x4e1e('0x3'));var jsonpatch=require(_0x4e1e('0x4'));var rp=require(_0x4e1e('0x5'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x4e1e('0x6'));var util=require(_0x4e1e('0x7'));var path=require(_0x4e1e('0x8'));var sox=require(_0x4e1e('0x9'));var csv=require(_0x4e1e('0xa'));var ejs=require(_0x4e1e('0xb'));var fs=require('fs');var _=require(_0x4e1e('0xc'));var squel=require(_0x4e1e('0xd'));var crypto=require(_0x4e1e('0xe'));var jsforce=require(_0x4e1e('0xf'));var deskjs=require(_0x4e1e('0x10'));var toCsv=require('to-csv');var querystring=require(_0x4e1e('0x11'));var Papa=require('papaparse');var Redis=require(_0x4e1e('0x12'));var authService=require(_0x4e1e('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x4e1e('0x14'));var hardwareService=require(_0x4e1e('0x15'));var logger=require(_0x4e1e('0x16'))(_0x4e1e('0x17'));var utils=require(_0x4e1e('0x18'));var config=require(_0x4e1e('0x19'));var db=require(_0x4e1e('0x1a'))['db'];function respondWithStatusCode(_0x1aed40,_0xd646c7){_0xd646c7=_0xd646c7||0xcc;return function(_0x51ccd3){if(_0x51ccd3){return _0x1aed40[_0x4e1e('0x1b')](_0xd646c7);}return _0x1aed40['status'](_0xd646c7)[_0x4e1e('0x1c')]();};}function respondWithResult(_0x1686ba,_0x1995a7){_0x1995a7=_0x1995a7||0xc8;return function(_0x3678bd){if(_0x3678bd){return _0x1686ba[_0x4e1e('0x1d')](_0x1995a7)[_0x4e1e('0x1e')](_0x3678bd);}};}function respondWithFilteredResult(_0x49d680,_0x52b2e6){return function(_0x4777e2){if(_0x4777e2){var _0xb55bf3=_0x4777e2['count'],_0x4162d5=_0x52b2e6[_0x4e1e('0x1f')],_0xcecc79=_0x52b2e6[_0x4e1e('0x1f')]+_0x52b2e6['limit'],_0x3e96f3;if(_0xcecc79>=_0xb55bf3){_0xcecc79=_0xb55bf3;_0x3e96f3=0xc8;}else{_0x3e96f3=0xce;}_0x49d680[_0x4e1e('0x1d')](_0x3e96f3);return _0x49d680[_0x4e1e('0x20')](_0x4e1e('0x21'),_0x4162d5+'-'+_0xcecc79+'/'+_0xb55bf3)[_0x4e1e('0x1e')](_0x4777e2);}return null;};}function patchUpdates(_0x2cbcb9){return function(_0x386bb3){try{jsonpatch['apply'](_0x386bb3,_0x2cbcb9,!![]);}catch(_0x1252ab){return BPromise[_0x4e1e('0x22')](_0x1252ab);}return _0x386bb3[_0x4e1e('0x23')]();};}function saveUpdates(_0x32830e,_0x94fbb7){return function(_0xe0a35d){if(_0xe0a35d){return _0xe0a35d[_0x4e1e('0x24')](_0x32830e)[_0x4e1e('0x25')](function(_0x44a89b){return _0x44a89b;});}return null;};}function removeEntity(_0xbfe123,_0xde5637){return function(_0x119683){if(_0x119683){return _0x119683[_0x4e1e('0x26')]()[_0x4e1e('0x25')](function(){_0xbfe123[_0x4e1e('0x1d')](0xcc)[_0x4e1e('0x1c')]();});}};}function handleEntityNotFound(_0x3fe2a1,_0x3d6ca0){return function(_0x223a7d){if(!_0x223a7d){_0x3fe2a1[_0x4e1e('0x1b')](0x194);}return _0x223a7d;};}function handleError(_0x5e9091,_0x6c0fd1){_0x6c0fd1=_0x6c0fd1||0x1f4;return function(_0x3e7d7c){logger[_0x4e1e('0x27')](_0x3e7d7c['stack']);if(_0x3e7d7c['name']){delete _0x3e7d7c[_0x4e1e('0x28')];}_0x5e9091['status'](_0x6c0fd1)[_0x4e1e('0x29')](_0x3e7d7c);};}exports[_0x4e1e('0x2a')]=function(_0x2ad2f1,_0x20b289){var _0xe85588={},_0x9567ba={},_0x17af2a={'count':0x0,'rows':[]};var _0x3bee7d=_[_0x4e1e('0x2b')](db['MailQueueReport']['rawAttributes'],function(_0x3e0336){return{'name':_0x3e0336[_0x4e1e('0x2c')],'type':_0x3e0336[_0x4e1e('0x2d')]['key']};});_0x9567ba['model']=_[_0x4e1e('0x2b')](_0x3bee7d,_0x4e1e('0x28'));_0x9567ba[_0x4e1e('0x2e')]=_['keys'](_0x2ad2f1['query']);_0x9567ba['filters']=_[_0x4e1e('0x2f')](_0x9567ba[_0x4e1e('0x30')],_0x9567ba[_0x4e1e('0x2e')]);_0xe85588[_0x4e1e('0x31')]=_[_0x4e1e('0x2f')](_0x9567ba['model'],qs[_0x4e1e('0x32')](_0x2ad2f1[_0x4e1e('0x2e')][_0x4e1e('0x32')]));_0xe85588['attributes']=_0xe85588[_0x4e1e('0x31')][_0x4e1e('0x33')]?_0xe85588[_0x4e1e('0x31')]:_0x9567ba[_0x4e1e('0x30')];if(!_0x2ad2f1['query'][_0x4e1e('0x34')](_0x4e1e('0x35'))){_0xe85588['limit']=qs['limit'](_0x2ad2f1['query'][_0x4e1e('0x36')]);_0xe85588[_0x4e1e('0x1f')]=qs[_0x4e1e('0x1f')](_0x2ad2f1[_0x4e1e('0x2e')]['offset']);}_0xe85588[_0x4e1e('0x37')]=qs['sort'](_0x2ad2f1[_0x4e1e('0x2e')]['sort']);_0xe85588['where']=qs[_0x4e1e('0x38')](_[_0x4e1e('0x39')](_0x2ad2f1[_0x4e1e('0x2e')],_0x9567ba[_0x4e1e('0x38')]));if(_0x2ad2f1[_0x4e1e('0x2e')][_0x4e1e('0x3a')]){_0xe85588[_0x4e1e('0x3b')]=_['merge'](_0xe85588[_0x4e1e('0x3b')],{'$or':_['map'](_0x3bee7d,function(_0x1b021a){if(_0x1b021a[_0x4e1e('0x2d')]!=='VIRTUAL'){var _0x152c24={};_0x152c24[_0x1b021a[_0x4e1e('0x28')]]={'$like':'%'+_0x2ad2f1[_0x4e1e('0x2e')][_0x4e1e('0x3a')]+'%'};return _0x152c24;}})});}_0xe85588=_[_0x4e1e('0x3c')]({},_0xe85588,_0x2ad2f1['options']);var _0x95916c={'where':_0xe85588[_0x4e1e('0x3b')]};return db[_0x4e1e('0x3d')][_0x4e1e('0x3e')](_0x95916c)['then'](function(_0x40bf91){_0x17af2a['count']=_0x40bf91;if(_0x2ad2f1[_0x4e1e('0x2e')]['includeAll']){_0xe85588['include']=[{'all':!![]}];}return db['MailQueueReport'][_0x4e1e('0x3f')](_0xe85588);})[_0x4e1e('0x25')](function(_0x17973a){_0x17af2a[_0x4e1e('0x40')]=_0x17973a;return _0x17af2a;})['then'](respondWithFilteredResult(_0x20b289,_0xe85588))[_0x4e1e('0x41')](handleError(_0x20b289,null));};exports[_0x4e1e('0x42')]=function(_0x151c14,_0x592ab3){var _0x111cd8={'raw':!![],'where':{'id':_0x151c14[_0x4e1e('0x43')]['id']}},_0x101970={};_0x101970[_0x4e1e('0x30')]=_[_0x4e1e('0x44')](db[_0x4e1e('0x3d')][_0x4e1e('0x45')]);_0x101970[_0x4e1e('0x2e')]=_[_0x4e1e('0x44')](_0x151c14[_0x4e1e('0x2e')]);_0x101970['filters']=_[_0x4e1e('0x2f')](_0x101970[_0x4e1e('0x30')],_0x101970['query']);_0x111cd8[_0x4e1e('0x31')]=_[_0x4e1e('0x2f')](_0x101970[_0x4e1e('0x30')],qs[_0x4e1e('0x32')](_0x151c14[_0x4e1e('0x2e')][_0x4e1e('0x32')]));_0x111cd8[_0x4e1e('0x31')]=_0x111cd8[_0x4e1e('0x31')][_0x4e1e('0x33')]?_0x111cd8['attributes']:_0x101970[_0x4e1e('0x30')];if(_0x151c14[_0x4e1e('0x2e')][_0x4e1e('0x46')]){_0x111cd8['include']=[{'all':!![]}];}_0x111cd8=_['merge']({},_0x111cd8,_0x151c14['options']);return db['MailQueueReport']['find'](_0x111cd8)[_0x4e1e('0x25')](handleEntityNotFound(_0x592ab3,null))[_0x4e1e('0x25')](respondWithResult(_0x592ab3,null))['catch'](handleError(_0x592ab3,null));};exports[_0x4e1e('0x47')]=function(_0x387ef9,_0x5c22a9){return db['MailQueueReport'][_0x4e1e('0x47')](_0x387ef9[_0x4e1e('0x48')],{})['then'](respondWithResult(_0x5c22a9,0xc9))[_0x4e1e('0x41')](handleError(_0x5c22a9,null));};exports['update']=function(_0x50bf2c,_0x2c0ad4){if(_0x50bf2c[_0x4e1e('0x48')]['id']){delete _0x50bf2c['body']['id'];}return db[_0x4e1e('0x3d')]['find']({'where':{'id':_0x50bf2c[_0x4e1e('0x43')]['id']}})[_0x4e1e('0x25')](handleEntityNotFound(_0x2c0ad4,null))[_0x4e1e('0x25')](saveUpdates(_0x50bf2c[_0x4e1e('0x48')],null))[_0x4e1e('0x25')](respondWithResult(_0x2c0ad4,null))[_0x4e1e('0x41')](handleError(_0x2c0ad4,null));};exports['destroy']=function(_0x3da405,_0x2d18e8){return db[_0x4e1e('0x3d')][_0x4e1e('0x49')]({'where':{'id':_0x3da405['params']['id']}})[_0x4e1e('0x25')](handleEntityNotFound(_0x2d18e8,null))['then'](removeEntity(_0x2d18e8,null))[_0x4e1e('0x41')](handleError(_0x2d18e8,null));};exports['describe']=function(_0x5e42f8,_0x1ae6d0){return db[_0x4e1e('0x3d')][_0x4e1e('0x4a')]()[_0x4e1e('0x25')](respondWithResult(_0x1ae6d0,null))[_0x4e1e('0x41')](handleError(_0x1ae6d0,null));};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.model.js b/server/api/mailQueueReport/mailQueueReport.model.js
index 859caa2..cc4ec04 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 _0x18c9=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailQueueReport.attributes','define','MailQueueReport','report_mail_queue','lodash'];(function(_0x1a54b6,_0x375fe5){var _0x19198a=function(_0x5dab47){while(--_0x5dab47){_0x1a54b6['push'](_0x1a54b6['shift']());}};_0x19198a(++_0x375fe5);}(_0x18c9,0x1bf));var _0x918c=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x18c9[_0x138adb];return _0x1b27f2;};'use strict';var _=require(_0x918c('0x0'));var util=require(_0x918c('0x1'));var logger=require(_0x918c('0x2'))(_0x918c('0x3'));var moment=require(_0x918c('0x4'));var BPromise=require(_0x918c('0x5'));var rp=require(_0x918c('0x6'));var fs=require('fs');var path=require(_0x918c('0x7'));var rimraf=require(_0x918c('0x8'));var config=require(_0x918c('0x9'));var attributes=require(_0x918c('0xa'));module['exports']=function(_0x5ce772,_0x21e279){return _0x5ce772[_0x918c('0xb')](_0x918c('0xc'),attributes,{'tableName':_0x918c('0xd'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x4783=['MailQueueReport','report_mail_queue','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./mailQueueReport.attributes','define'];(function(_0x9071ce,_0x5dc2a4){var _0x233f59=function(_0x34f55a){while(--_0x34f55a){_0x9071ce['push'](_0x9071ce['shift']());}};_0x233f59(++_0x5dc2a4);}(_0x4783,0xce));var _0x3478=function(_0x37df59,_0x5aad35){_0x37df59=_0x37df59-0x0;var _0x4860ef=_0x4783[_0x37df59];return _0x4860ef;};'use strict';var _=require('lodash');var util=require(_0x3478('0x0'));var logger=require(_0x3478('0x1'))(_0x3478('0x2'));var moment=require(_0x3478('0x3'));var BPromise=require(_0x3478('0x4'));var rp=require(_0x3478('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3478('0x6'));var config=require(_0x3478('0x7'));var attributes=require(_0x3478('0x8'));module['exports']=function(_0x457090,_0x6cd5e4){return _0x457090[_0x3478('0x9')](_0x3478('0xa'),attributes,{'tableName':_0x3478('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailQueueReport/mailQueueReport.rpc.js b/server/api/mailQueueReport/mailQueueReport.rpc.js
index c3acdfc..586d1c8 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 _0xdb28=['UpdateMailQueueReport','MailQueueReport','update','raw','where','limit','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','CreateMailQueueReport','create','body','options'];(function(_0x4ffafb,_0x20171a){var _0x4ab472=function(_0x1afc75){while(--_0x1afc75){_0x4ffafb['push'](_0x4ffafb['shift']());}};_0x4ab472(++_0x20171a);}(_0xdb28,0x106));var _0x8db2=function(_0x238543,_0x34be35){_0x238543=_0x238543-0x0;var _0x33c630=_0xdb28[_0x238543];return _0x33c630;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});}exports[_0x8db2('0x16')]=function(_0x3fddc2){var _0x2efd06=this;return new Promise(function(_0x46ce14,_0x51d60d){return db['MailQueueReport'][_0x8db2('0x17')](_0x3fddc2[_0x8db2('0x18')],{'raw':_0x3fddc2[_0x8db2('0x19')]?_0x3fddc2[_0x8db2('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x8db2('0xc')](function(_0x36a9ff){logger[_0x8db2('0x14')](_0x8db2('0x16'),_0x3fddc2);logger[_0x8db2('0xf')]('CreateMailQueueReport',_0x3fddc2,JSON[_0x8db2('0x10')](_0x36a9ff));_0x46ce14(_0x36a9ff);})[_0x8db2('0x15')](function(_0x18f69c){logger[_0x8db2('0x11')](_0x8db2('0x16'),_0x18f69c[_0x8db2('0x13')],_0x3fddc2);_0x51d60d(_0x2efd06[_0x8db2('0x11')](0x1f4,_0x18f69c['message']));});});};exports[_0x8db2('0x1a')]=function(_0x4f6516){var _0x5725f0=this;return new Promise(function(_0x52a9ca,_0x4d923c){return db[_0x8db2('0x1b')][_0x8db2('0x1c')](_0x4f6516[_0x8db2('0x18')],{'raw':_0x4f6516[_0x8db2('0x19')]?_0x4f6516[_0x8db2('0x19')][_0x8db2('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4f6516['options']?_0x4f6516[_0x8db2('0x19')][_0x8db2('0x1e')]||null:null,'attributes':_0x4f6516[_0x8db2('0x19')]?_0x4f6516[_0x8db2('0x19')]['attributes']||null:null,'limit':_0x4f6516[_0x8db2('0x19')]?_0x4f6516[_0x8db2('0x19')][_0x8db2('0x1f')]||null:null})[_0x8db2('0xc')](function(_0xbe5ece){logger[_0x8db2('0x14')](_0x8db2('0x1a'),_0x4f6516);logger[_0x8db2('0xf')](_0x8db2('0x1a'),_0x4f6516,JSON['stringify'](_0xbe5ece));_0x52a9ca(_0xbe5ece);})[_0x8db2('0x15')](function(_0x50b28d){logger['error'](_0x8db2('0x1a'),_0x50b28d[_0x8db2('0x13')],_0x4f6516);_0x4d923c(_0x5725f0[_0x8db2('0x11')](0x1f4,_0x50b28d['message']));});});};
\ No newline at end of file
+var _0x2542=['info','MailQueueReport,\x20%s,\x20%s','debug','MailQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','CreateMailQueueReport','create','body','options','raw','MailQueueReport','update','where','attributes','limit','UpdateMailQueueReport','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x5b9cd5,_0x12d891){var _0x3f1db1=function(_0x3731d4){while(--_0x3731d4){_0x5b9cd5['push'](_0x5b9cd5['shift']());}};_0x3f1db1(++_0x12d891);}(_0x2542,0x169));var _0x2254=function(_0x27919b,_0x47449e){_0x27919b=_0x27919b-0x0;var _0x594fc8=_0x2542[_0x27919b];return _0x594fc8;};'use strict';var _=require(_0x2254('0x0'));var util=require(_0x2254('0x1'));var moment=require(_0x2254('0x2'));var BPromise=require(_0x2254('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2254('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2254('0x5'));var logger=require(_0x2254('0x6'))(_0x2254('0x7'));var config=require(_0x2254('0x8'));var jayson=require(_0x2254('0x9'));var client=jayson['client'][_0x2254('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe8ca50,_0x2ee7ee,_0x3c45ec){return new BPromise(function(_0x1637ad,_0x477b47){return client[_0x2254('0xb')](_0xe8ca50,_0x3c45ec)[_0x2254('0xc')](function(_0xb395da){logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,'request\x20sent');logger[_0x2254('0xf')](_0x2254('0x10'),_0x2ee7ee,_0x2254('0x11'),JSON[_0x2254('0x12')](_0xb395da));if(_0xb395da['error']){if(_0xb395da['error'][_0x2254('0x13')]===0x1f4){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);return _0x477b47(_0xb395da[_0x2254('0x14')]['message']);}logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da['error'][_0x2254('0x15')]);return _0x1637ad(_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);}else{logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,_0x2254('0x11'));_0x1637ad(_0xb395da['result'][_0x2254('0x15')]);}})['catch'](function(_0x327d6d){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0x327d6d);_0x477b47(_0x327d6d);});});}exports[_0x2254('0x16')]=function(_0x1ae11e){var _0x34f90e=this;return new Promise(function(_0x497724,_0x51b395){return db['MailQueueReport'][_0x2254('0x17')](_0x1ae11e[_0x2254('0x18')],{'raw':_0x1ae11e[_0x2254('0x19')]?_0x1ae11e[_0x2254('0x19')][_0x2254('0x1a')]===undefined?!![]:![]:!![]})[_0x2254('0xc')](function(_0x487f72){logger[_0x2254('0xd')](_0x2254('0x16'),_0x1ae11e);logger[_0x2254('0xf')]('CreateMailQueueReport',_0x1ae11e,JSON['stringify'](_0x487f72));_0x497724(_0x487f72);})['catch'](function(_0x1e8a98){logger[_0x2254('0x14')](_0x2254('0x16'),_0x1e8a98['message'],_0x1ae11e);_0x51b395(_0x34f90e['error'](0x1f4,_0x1e8a98['message']));});});};exports['UpdateMailQueueReport']=function(_0x5e5edb){var _0x4f797d=this;return new Promise(function(_0x1aa71f,_0x9d6ccf){return db[_0x2254('0x1b')][_0x2254('0x1c')](_0x5e5edb[_0x2254('0x18')],{'raw':_0x5e5edb[_0x2254('0x19')]?_0x5e5edb['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5e5edb[_0x2254('0x19')]?_0x5e5edb['options'][_0x2254('0x1d')]||null:null,'attributes':_0x5e5edb[_0x2254('0x19')]?_0x5e5edb[_0x2254('0x19')][_0x2254('0x1e')]||null:null,'limit':_0x5e5edb[_0x2254('0x19')]?_0x5e5edb['options'][_0x2254('0x1f')]||null:null})[_0x2254('0xc')](function(_0x21285d){logger[_0x2254('0xd')](_0x2254('0x20'),_0x5e5edb);logger[_0x2254('0xf')](_0x2254('0x20'),_0x5e5edb,JSON[_0x2254('0x12')](_0x21285d));_0x1aa71f(_0x21285d);})[_0x2254('0x21')](function(_0x221db9){logger[_0x2254('0x14')](_0x2254('0x20'),_0x221db9[_0x2254('0x15')],_0x5e5edb);_0x9d6ccf(_0x4f797d[_0x2254('0x14')](0x1f4,_0x221db9[_0x2254('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/mailServerIn/index.js b/server/api/mailServerIn/index.js
index fdcdaef..adce9a9 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 _0x7828=['../../components/interaction/service','../../config/environment','util','path','connect-timeout','express','../../components/auth/service'];(function(_0x158793,_0x3cf450){var _0x5eb2bc=function(_0x43a433){while(--_0x43a433){_0x158793['push'](_0x158793['shift']());}};_0x5eb2bc(++_0x3cf450);}(_0x7828,0x191));var _0x8782=function(_0x5b2ce9,_0x59fbdd){_0x5b2ce9=_0x5b2ce9-0x0;var _0x3da0ad=_0x7828[_0x5b2ce9];return _0x3da0ad;};'use strict';var multer=require('multer');var util=require(_0x8782('0x0'));var path=require(_0x8782('0x1'));var timeout=require(_0x8782('0x2'));var express=require(_0x8782('0x3'));var router=express['Router']();var auth=require(_0x8782('0x4'));var interaction=require(_0x8782('0x5'));var config=require(_0x8782('0x6'));module['exports']=router;
\ No newline at end of file
+var _0xdfcd=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','exports','util','path','connect-timeout'];(function(_0x161985,_0x202209){var _0x1cbd5b=function(_0x39e8bd){while(--_0x39e8bd){_0x161985['push'](_0x161985['shift']());}};_0x1cbd5b(++_0x202209);}(_0xdfcd,0x135));var _0xddfc=function(_0x480f2e,_0x43dc06){_0x480f2e=_0x480f2e-0x0;var _0x31d315=_0xdfcd[_0x480f2e];return _0x31d315;};'use strict';var multer=require('multer');var util=require(_0xddfc('0x0'));var path=require(_0xddfc('0x1'));var timeout=require(_0xddfc('0x2'));var express=require('express');var router=express[_0xddfc('0x3')]();var auth=require(_0xddfc('0x4'));var interaction=require(_0xddfc('0x5'));var config=require(_0xddfc('0x6'));module[_0xddfc('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/mailServerIn/mailServerIn.attributes.js b/server/api/mailServerIn/mailServerIn.attributes.js
index 937aa99..1dbcfb1 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 _0x946e=['INBOX','sequelize','exports','STRING','username','INTEGER','BOOLEAN'];(function(_0xdf3832,_0x2e1253){var _0x499bb6=function(_0x4b9925){while(--_0x4b9925){_0xdf3832['push'](_0xdf3832['shift']());}};_0x499bb6(++_0x2e1253);}(_0x946e,0x143));var _0xe946=function(_0x5837a1,_0x2e4315){_0x5837a1=_0x5837a1-0x0;var _0x10de5f=_0x946e[_0x5837a1];return _0x10de5f;};'use strict';var Sequelize=require(_0xe946('0x0'));module[_0xe946('0x1')]={'description':{'type':Sequelize[_0xe946('0x2')]},'host':{'type':Sequelize[_0xe946('0x2')]},'authentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'user':{'type':Sequelize[_0xe946('0x2')],'unique':_0xe946('0x3')},'password':{'type':Sequelize[_0xe946('0x2')]},'port':{'type':Sequelize[_0xe946('0x4')]},'tls':{'type':Sequelize[_0xe946('0x5')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0xe946('0x2')],'defaultValue':_0xe946('0x6')},'connTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0xe946('0x4')],'defaultValue':0x5},'service':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x0c86=['sequelize','exports','STRING','BOOLEAN','username','INTEGER'];(function(_0x4dc998,_0xc89c5b){var _0x533a5a=function(_0x1eb262){while(--_0x1eb262){_0x4dc998['push'](_0x4dc998['shift']());}};_0x533a5a(++_0xc89c5b);}(_0x0c86,0x1c2));var _0x60c8=function(_0x5dd511,_0x375d07){_0x5dd511=_0x5dd511-0x0;var _0x128597=_0x0c86[_0x5dd511];return _0x128597;};'use strict';var Sequelize=require(_0x60c8('0x0'));module[_0x60c8('0x1')]={'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0x60c8('0x2')]},'authentication':{'type':Sequelize[_0x60c8('0x3')],'defaultValue':!![]},'user':{'type':Sequelize[_0x60c8('0x2')],'unique':_0x60c8('0x4')},'password':{'type':Sequelize[_0x60c8('0x2')]},'port':{'type':Sequelize[_0x60c8('0x5')]},'tls':{'type':Sequelize[_0x60c8('0x3')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0x60c8('0x2')],'defaultValue':'INBOX'},'connTimeout':{'type':Sequelize[_0x60c8('0x5')],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x60c8('0x5')],'defaultValue':0x5},'service':{'type':Sequelize[_0x60c8('0x2')]}};
\ No newline at end of file
diff --git a/server/api/mailServerIn/mailServerIn.model.js b/server/api/mailServerIn/mailServerIn.model.js
index fcb69db..0482f29 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 _0xbc9d=['./mailServerIn.attributes','exports','define','mail_servers_in','lodash','util','../../config/logger','api','moment','rimraf','../../config/environment'];(function(_0xdcc3c2,_0xa52871){var _0x4862e9=function(_0x28d356){while(--_0x28d356){_0xdcc3c2['push'](_0xdcc3c2['shift']());}};_0x4862e9(++_0xa52871);}(_0xbc9d,0xb4));var _0xdbc9=function(_0x264dec,_0x590e22){_0x264dec=_0x264dec-0x0;var _0x2f12f5=_0xbc9d[_0x264dec];return _0x2f12f5;};'use strict';var _=require(_0xdbc9('0x0'));var util=require(_0xdbc9('0x1'));var logger=require(_0xdbc9('0x2'))(_0xdbc9('0x3'));var moment=require(_0xdbc9('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xdbc9('0x5'));var config=require(_0xdbc9('0x6'));var attributes=require(_0xdbc9('0x7'));module[_0xdbc9('0x8')]=function(_0x6ab397,_0x7c4c55){return _0x6ab397[_0xdbc9('0x9')]('MailServerIn',attributes,{'tableName':_0xdbc9('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb6fa=['lodash','api','request-promise','path','../../config/environment','./mailServerIn.attributes','exports','define','MailServerIn','mail_servers_in'];(function(_0x26da06,_0x44caa0){var _0x30d5a0=function(_0x4f4cf0){while(--_0x4f4cf0){_0x26da06['push'](_0x26da06['shift']());}};_0x30d5a0(++_0x44caa0);}(_0xb6fa,0x1c2));var _0xab6f=function(_0x5cc8,_0x1faa02){_0x5cc8=_0x5cc8-0x0;var _0x450661=_0xb6fa[_0x5cc8];return _0x450661;};'use strict';var _=require(_0xab6f('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xab6f('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xab6f('0x2'));var fs=require('fs');var path=require(_0xab6f('0x3'));var rimraf=require('rimraf');var config=require(_0xab6f('0x4'));var attributes=require(_0xab6f('0x5'));module[_0xab6f('0x6')]=function(_0x2d9d01,_0x156df7){return _0x2d9d01[_0xab6f('0x7')](_0xab6f('0x8'),attributes,{'tableName':_0xab6f('0x9'),'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 f82a2fd..3a5e8cb 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 _0xd349=['lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','MailServerIn,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','GetMailServerIn','findAll','options','raw','where','attributes','limit','include','map','model','stringify'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xd349,0x140));var _0x9d34=function(_0x7562d7,_0x416f67){_0x7562d7=_0x7562d7-0x0;var _0x4e33cf=_0xd349[_0x7562d7];return _0x4e33cf;};'use strict';var _=require(_0x9d34('0x0'));var util=require(_0x9d34('0x1'));var moment=require('moment');var BPromise=require(_0x9d34('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9d34('0x3'));var db=require(_0x9d34('0x4'))['db'];var utils=require(_0x9d34('0x5'));var logger=require(_0x9d34('0x6'))(_0x9d34('0x7'));var config=require(_0x9d34('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x9d34('0x9')][_0x9d34('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x10b16d,_0x5a4214,_0x5c715d){return new BPromise(function(_0x286d0a,_0x1db9d0){return client[_0x9d34('0xb')](_0x10b16d,_0x5c715d)[_0x9d34('0xc')](function(_0x1fc615){logger[_0x9d34('0xd')](_0x9d34('0xe'),_0x5a4214,_0x9d34('0xf'));logger[_0x9d34('0x10')]('MailServerIn,\x20%s,\x20%s,\x20%s',_0x5a4214,_0x9d34('0xf'),JSON['stringify'](_0x1fc615));if(_0x1fc615[_0x9d34('0x11')]){if(_0x1fc615['error']['code']===0x1f4){logger[_0x9d34('0x11')](_0x9d34('0xe'),_0x5a4214,_0x1fc615[_0x9d34('0x11')]['message']);return _0x1db9d0(_0x1fc615['error']['message']);}logger[_0x9d34('0x11')](_0x9d34('0xe'),_0x5a4214,_0x1fc615[_0x9d34('0x11')][_0x9d34('0x12')]);return _0x286d0a(_0x1fc615['error'][_0x9d34('0x12')]);}else{logger[_0x9d34('0xd')](_0x9d34('0xe'),_0x5a4214,'request\x20sent');_0x286d0a(_0x1fc615[_0x9d34('0x13')][_0x9d34('0x12')]);}})[_0x9d34('0x14')](function(_0x508f84){logger['error'](_0x9d34('0xe'),_0x5a4214,_0x508f84);_0x1db9d0(_0x508f84);});});}exports[_0x9d34('0x15')]=function(_0x5358b3){var _0x55c903=this;return new Promise(function(_0x19d58c,_0x17b071){return db['MailServerIn'][_0x9d34('0x16')]({'raw':_0x5358b3[_0x9d34('0x17')]?_0x5358b3[_0x9d34('0x17')][_0x9d34('0x18')]===undefined?!![]:![]:!![],'where':_0x5358b3['options']?_0x5358b3[_0x9d34('0x17')][_0x9d34('0x19')]||null:null,'attributes':_0x5358b3[_0x9d34('0x17')]?_0x5358b3[_0x9d34('0x17')][_0x9d34('0x1a')]||null:null,'limit':_0x5358b3[_0x9d34('0x17')]?_0x5358b3[_0x9d34('0x17')][_0x9d34('0x1b')]||null:null,'include':_0x5358b3[_0x9d34('0x17')]?_0x5358b3[_0x9d34('0x17')][_0x9d34('0x1c')]?_[_0x9d34('0x1d')](_0x5358b3['options'][_0x9d34('0x1c')],function(_0x27590a){return{'model':db[_0x27590a[_0x9d34('0x1e')]],'as':_0x27590a['as'],'attributes':_0x27590a[_0x9d34('0x1a')],'include':_0x27590a[_0x9d34('0x1c')]?_[_0x9d34('0x1d')](_0x27590a[_0x9d34('0x1c')],function(_0x231b1d){return{'model':db[_0x231b1d[_0x9d34('0x1e')]],'as':_0x231b1d['as'],'attributes':_0x231b1d[_0x9d34('0x1a')],'include':_0x231b1d['include']?_[_0x9d34('0x1d')](_0x231b1d[_0x9d34('0x1c')],function(_0x3790b3){return{'model':db[_0x3790b3[_0x9d34('0x1e')]],'as':_0x3790b3['as'],'attributes':_0x3790b3[_0x9d34('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x9d34('0xc')](function(_0x252f0e){logger['info'](_0x9d34('0x15'),_0x5358b3);logger['debug'](_0x9d34('0x15'),_0x5358b3,JSON[_0x9d34('0x1f')](_0x252f0e));_0x19d58c(_0x252f0e);})[_0x9d34('0x14')](function(_0x57b19e){logger[_0x9d34('0x11')]('GetMailServerIn',_0x57b19e[_0x9d34('0x12')],_0x5358b3);_0x17b071(_0x55c903[_0x9d34('0x11')](0x1f4,_0x57b19e[_0x9d34('0x12')]));});});};
\ No newline at end of file
+var _0x6b63=['attributes','map','GetMailServerIn','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','MailServerIn,\x20%s,\x20%s','request\x20sent','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','findAll','options','raw','where','include','model'];(function(_0x3888ae,_0x5c8de7){var _0x2e8ad7=function(_0x423ff8){while(--_0x423ff8){_0x3888ae['push'](_0x3888ae['shift']());}};_0x2e8ad7(++_0x5c8de7);}(_0x6b63,0x19b));var _0x36b6=function(_0x2ace8c,_0x521a13){_0x2ace8c=_0x2ace8c-0x0;var _0x5cfdf9=_0x6b63[_0x2ace8c];return _0x5cfdf9;};'use strict';var _=require(_0x36b6('0x0'));var util=require('util');var moment=require(_0x36b6('0x1'));var BPromise=require(_0x36b6('0x2'));var rs=require(_0x36b6('0x3'));var fs=require('fs');var Redis=require(_0x36b6('0x4'));var db=require(_0x36b6('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x36b6('0x6'))(_0x36b6('0x7'));var config=require(_0x36b6('0x8'));var jayson=require(_0x36b6('0x9'));var client=jayson[_0x36b6('0xa')][_0x36b6('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4d8d77,_0x30e796,_0xfb11df){return new BPromise(function(_0x44cc1a,_0x104649){return client[_0x36b6('0xc')](_0x4d8d77,_0xfb11df)[_0x36b6('0xd')](function(_0xc4bb7b){logger['info'](_0x36b6('0xe'),_0x30e796,_0x36b6('0xf'));logger[_0x36b6('0x10')](_0x36b6('0x11'),_0x30e796,'request\x20sent',JSON[_0x36b6('0x12')](_0xc4bb7b));if(_0xc4bb7b[_0x36b6('0x13')]){if(_0xc4bb7b['error'][_0x36b6('0x14')]===0x1f4){logger[_0x36b6('0x13')](_0x36b6('0xe'),_0x30e796,_0xc4bb7b[_0x36b6('0x13')]['message']);return _0x104649(_0xc4bb7b[_0x36b6('0x13')]['message']);}logger[_0x36b6('0x13')](_0x36b6('0xe'),_0x30e796,_0xc4bb7b[_0x36b6('0x13')][_0x36b6('0x15')]);return _0x44cc1a(_0xc4bb7b[_0x36b6('0x13')][_0x36b6('0x15')]);}else{logger[_0x36b6('0x16')](_0x36b6('0xe'),_0x30e796,_0x36b6('0xf'));_0x44cc1a(_0xc4bb7b[_0x36b6('0x17')][_0x36b6('0x15')]);}})[_0x36b6('0x18')](function(_0x3eefa8){logger[_0x36b6('0x13')](_0x36b6('0xe'),_0x30e796,_0x3eefa8);_0x104649(_0x3eefa8);});});}exports['GetMailServerIn']=function(_0x2e8ff0){var _0xc7429a=this;return new Promise(function(_0x357955,_0x3ed596){return db['MailServerIn'][_0x36b6('0x19')]({'raw':_0x2e8ff0[_0x36b6('0x1a')]?_0x2e8ff0[_0x36b6('0x1a')][_0x36b6('0x1b')]===undefined?!![]:![]:!![],'where':_0x2e8ff0[_0x36b6('0x1a')]?_0x2e8ff0[_0x36b6('0x1a')][_0x36b6('0x1c')]||null:null,'attributes':_0x2e8ff0[_0x36b6('0x1a')]?_0x2e8ff0[_0x36b6('0x1a')]['attributes']||null:null,'limit':_0x2e8ff0[_0x36b6('0x1a')]?_0x2e8ff0[_0x36b6('0x1a')]['limit']||null:null,'include':_0x2e8ff0[_0x36b6('0x1a')]?_0x2e8ff0[_0x36b6('0x1a')][_0x36b6('0x1d')]?_['map'](_0x2e8ff0['options']['include'],function(_0xb4e9c8){return{'model':db[_0xb4e9c8[_0x36b6('0x1e')]],'as':_0xb4e9c8['as'],'attributes':_0xb4e9c8[_0x36b6('0x1f')],'include':_0xb4e9c8[_0x36b6('0x1d')]?_['map'](_0xb4e9c8['include'],function(_0x3eb50d){return{'model':db[_0x3eb50d[_0x36b6('0x1e')]],'as':_0x3eb50d['as'],'attributes':_0x3eb50d[_0x36b6('0x1f')],'include':_0x3eb50d[_0x36b6('0x1d')]?_[_0x36b6('0x20')](_0x3eb50d['include'],function(_0x19d384){return{'model':db[_0x19d384[_0x36b6('0x1e')]],'as':_0x19d384['as'],'attributes':_0x19d384[_0x36b6('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x36b6('0xd')](function(_0x5807bd){logger[_0x36b6('0x16')](_0x36b6('0x21'),_0x2e8ff0);logger[_0x36b6('0x10')](_0x36b6('0x21'),_0x2e8ff0,JSON[_0x36b6('0x12')](_0x5807bd));_0x357955(_0x5807bd);})[_0x36b6('0x18')](function(_0x585116){logger[_0x36b6('0x13')](_0x36b6('0x21'),_0x585116[_0x36b6('0x15')],_0x2e8ff0);_0x3ed596(_0xc7429a[_0x36b6('0x13')](0x1f4,_0x585116['message']));});});};
\ No newline at end of file
diff --git a/server/api/mailServerOut/index.js b/server/api/mailServerOut/index.js
index 7d731b2..37abed5 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 _0x128a=['show','create','put','update','delete','/:id','destroy','util','path','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailServerOut.controller','isAuthenticated','get'];(function(_0x14b9af,_0x34cdfb){var _0x27e97c=function(_0x1d703a){while(--_0x1d703a){_0x14b9af['push'](_0x14b9af['shift']());}};_0x27e97c(++_0x34cdfb);}(_0x128a,0x70));var _0xa128=function(_0x543a4e,_0x544f2e){_0x543a4e=_0x543a4e-0x0;var _0x27a3a9=_0x128a[_0x543a4e];return _0x27a3a9;};'use strict';var multer=require('multer');var util=require(_0xa128('0x0'));var path=require(_0xa128('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require(_0xa128('0x2'));var interaction=require(_0xa128('0x3'));var config=require(_0xa128('0x4'));var controller=require(_0xa128('0x5'));router['get']('/',auth[_0xa128('0x6')](),controller['index']);router[_0xa128('0x7')]('/:id',auth[_0xa128('0x6')](),controller[_0xa128('0x8')]);router['post']('/',auth[_0xa128('0x6')](),controller[_0xa128('0x9')]);router[_0xa128('0xa')]('/:id',auth[_0xa128('0x6')](),controller[_0xa128('0xb')]);router[_0xa128('0xc')](_0xa128('0xd'),auth[_0xa128('0x6')](),controller[_0xa128('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0xbfd8=['connect-timeout','express','Router','../../components/auth/service','../../config/environment','./mailServerOut.controller','get','index','/:id','isAuthenticated','post','create','put','update','delete','destroy','multer','path'];(function(_0x3f479b,_0xaea36b){var _0x3fe57f=function(_0x3e5cfd){while(--_0x3e5cfd){_0x3f479b['push'](_0x3f479b['shift']());}};_0x3fe57f(++_0xaea36b);}(_0xbfd8,0x154));var _0x8bfd=function(_0x533bcc,_0x1ba26f){_0x533bcc=_0x533bcc-0x0;var _0x364d38=_0xbfd8[_0x533bcc];return _0x364d38;};'use strict';var multer=require(_0x8bfd('0x0'));var util=require('util');var path=require(_0x8bfd('0x1'));var timeout=require(_0x8bfd('0x2'));var express=require(_0x8bfd('0x3'));var router=express[_0x8bfd('0x4')]();var auth=require(_0x8bfd('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x8bfd('0x6'));var controller=require(_0x8bfd('0x7'));router[_0x8bfd('0x8')]('/',auth['isAuthenticated'](),controller[_0x8bfd('0x9')]);router[_0x8bfd('0x8')](_0x8bfd('0xa'),auth[_0x8bfd('0xb')](),controller['show']);router[_0x8bfd('0xc')]('/',auth[_0x8bfd('0xb')](),controller[_0x8bfd('0xd')]);router[_0x8bfd('0xe')](_0x8bfd('0xa'),auth[_0x8bfd('0xb')](),controller[_0x8bfd('0xf')]);router[_0x8bfd('0x10')](_0x8bfd('0xa'),auth[_0x8bfd('0xb')](),controller[_0x8bfd('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/mailServerOut/mailServerOut.attributes.js b/server/api/mailServerOut/mailServerOut.attributes.js
index 3323774..f1c2422 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 _0x66c7=['STRING','INTEGER','BOOLEAN','sequelize','exports'];(function(_0xde9059,_0x750aab){var _0x23197d=function(_0x457724){while(--_0x457724){_0xde9059['push'](_0xde9059['shift']());}};_0x23197d(++_0x750aab);}(_0x66c7,0x15c));var _0x766c=function(_0x53d318,_0x4cbd94){_0x53d318=_0x53d318-0x0;var _0x2a1ba5=_0x66c7[_0x53d318];return _0x2a1ba5;};'use strict';var Sequelize=require(_0x766c('0x0'));module[_0x766c('0x1')]={'description':{'type':Sequelize[_0x766c('0x2')]},'host':{'type':Sequelize['STRING']},'user':{'type':Sequelize[_0x766c('0x2')]},'pass':{'type':Sequelize[_0x766c('0x2')]},'port':{'type':Sequelize[_0x766c('0x3')]},'secure':{'type':Sequelize[_0x766c('0x4')],'defaultValue':![]},'service':{'type':Sequelize[_0x766c('0x2')]},'authentication':{'type':Sequelize[_0x766c('0x4')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x6d38=['STRING','INTEGER','BOOLEAN','exports'];(function(_0x1fb1c1,_0x4ebe69){var _0x1622df=function(_0x52b793){while(--_0x52b793){_0x1fb1c1['push'](_0x1fb1c1['shift']());}};_0x1622df(++_0x4ebe69);}(_0x6d38,0x1ef));var _0x86d3=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x6d38[_0x138adb];return _0x1b27f2;};'use strict';var Sequelize=require('sequelize');module[_0x86d3('0x0')]={'description':{'type':Sequelize[_0x86d3('0x1')]},'host':{'type':Sequelize[_0x86d3('0x1')]},'user':{'type':Sequelize['STRING']},'pass':{'type':Sequelize['STRING']},'port':{'type':Sequelize[_0x86d3('0x2')]},'secure':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'service':{'type':Sequelize[_0x86d3('0x1')]},'authentication':{'type':Sequelize[_0x86d3('0x3')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/mailServerOut/mailServerOut.controller.js b/server/api/mailServerOut/mailServerOut.controller.js
index 06296e8..4913167 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 _0xddfc=['nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','catch','show','params','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','update','then','destroy','error','name','send','map','MailServerOut','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0xe91676,_0x3cd3de){var _0x2838ae=function(_0x44a81d){while(--_0x44a81d){_0xe91676['push'](_0xe91676['shift']());}};_0x2838ae(++_0x3cd3de);}(_0xddfc,0x183));var _0xcddf=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0xddfc[_0x138adb];return _0x1b27f2;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xcddf('0x0'));var rimraf=require(_0xcddf('0x1'));var zipdir=require(_0xcddf('0x2'));var jsonpatch=require(_0xcddf('0x3'));var rp=require(_0xcddf('0x4'));var moment=require(_0xcddf('0x5'));var BPromise=require(_0xcddf('0x6'));var Mustache=require(_0xcddf('0x7'));var util=require(_0xcddf('0x8'));var path=require(_0xcddf('0x9'));var sox=require(_0xcddf('0xa'));var csv=require(_0xcddf('0xb'));var ejs=require(_0xcddf('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0xcddf('0xd'));var crypto=require(_0xcddf('0xe'));var jsforce=require(_0xcddf('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xcddf('0xb'));var querystring=require(_0xcddf('0x10'));var Papa=require('papaparse');var Redis=require(_0xcddf('0x11'));var authService=require(_0xcddf('0x12'));var qs=require(_0xcddf('0x13'));var as=require(_0xcddf('0x14'));var hardwareService=require(_0xcddf('0x15'));var logger=require(_0xcddf('0x16'))(_0xcddf('0x17'));var utils=require(_0xcddf('0x18'));var config=require('../../config/environment');var db=require(_0xcddf('0x19'))['db'];function respondWithStatusCode(_0xa5dd8c,_0x5d6a6d){_0x5d6a6d=_0x5d6a6d||0xcc;return function(_0x65bf4b){if(_0x65bf4b){return _0xa5dd8c[_0xcddf('0x1a')](_0x5d6a6d);}return _0xa5dd8c[_0xcddf('0x1b')](_0x5d6a6d)[_0xcddf('0x1c')]();};}function respondWithResult(_0x574d41,_0x329d2d){_0x329d2d=_0x329d2d||0xc8;return function(_0x404f69){if(_0x404f69){return _0x574d41['status'](_0x329d2d)[_0xcddf('0x1d')](_0x404f69);}};}function respondWithFilteredResult(_0x482953,_0x3ceac1){return function(_0x281ba6){if(_0x281ba6){var _0x528e9f=_0x281ba6[_0xcddf('0x1e')],_0x1c6a4e=_0x3ceac1[_0xcddf('0x1f')],_0x240db9=_0x3ceac1[_0xcddf('0x1f')]+_0x3ceac1[_0xcddf('0x20')],_0x254211;if(_0x240db9>=_0x528e9f){_0x240db9=_0x528e9f;_0x254211=0xc8;}else{_0x254211=0xce;}_0x482953[_0xcddf('0x1b')](_0x254211);return _0x482953[_0xcddf('0x21')](_0xcddf('0x22'),_0x1c6a4e+'-'+_0x240db9+'/'+_0x528e9f)['json'](_0x281ba6);}return null;};}function patchUpdates(_0xf048a6){return function(_0x245f87){try{jsonpatch['apply'](_0x245f87,_0xf048a6,!![]);}catch(_0x40aa59){return BPromise[_0xcddf('0x23')](_0x40aa59);}return _0x245f87[_0xcddf('0x24')]();};}function saveUpdates(_0x49b4c2,_0x687fd4){return function(_0x235b40){if(_0x235b40){return _0x235b40[_0xcddf('0x25')](_0x49b4c2)[_0xcddf('0x26')](function(_0xb1b9d5){return _0xb1b9d5;});}return null;};}function removeEntity(_0x49cece,_0x3bf12e){return function(_0x1d970f){if(_0x1d970f){return _0x1d970f[_0xcddf('0x27')]()[_0xcddf('0x26')](function(){_0x49cece[_0xcddf('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2aaaf3,_0x52d7b3){return function(_0x16c969){if(!_0x16c969){_0x2aaaf3[_0xcddf('0x1a')](0x194);}return _0x16c969;};}function handleError(_0x146fe2,_0x2aca4b){_0x2aca4b=_0x2aca4b||0x1f4;return function(_0x36244f){logger[_0xcddf('0x28')](_0x36244f['stack']);if(_0x36244f[_0xcddf('0x29')]){delete _0x36244f[_0xcddf('0x29')];}_0x146fe2[_0xcddf('0x1b')](_0x2aca4b)[_0xcddf('0x2a')](_0x36244f);};}exports['index']=function(_0xb7cc6c,_0x4fb47f){var _0x4de065={},_0x94f458={},_0x115191={'count':0x0,'rows':[]};var _0x3c7001=_[_0xcddf('0x2b')](db[_0xcddf('0x2c')][_0xcddf('0x2d')],function(_0x1ba578){return{'name':_0x1ba578['fieldName'],'type':_0x1ba578[_0xcddf('0x2e')][_0xcddf('0x2f')]};});_0x94f458[_0xcddf('0x30')]=_[_0xcddf('0x2b')](_0x3c7001,_0xcddf('0x29'));_0x94f458[_0xcddf('0x31')]=_[_0xcddf('0x32')](_0xb7cc6c[_0xcddf('0x31')]);_0x94f458[_0xcddf('0x33')]=_[_0xcddf('0x34')](_0x94f458[_0xcddf('0x30')],_0x94f458['query']);_0x4de065[_0xcddf('0x35')]=_[_0xcddf('0x34')](_0x94f458[_0xcddf('0x30')],qs[_0xcddf('0x36')](_0xb7cc6c[_0xcddf('0x31')]['fields']));_0x4de065[_0xcddf('0x35')]=_0x4de065[_0xcddf('0x35')][_0xcddf('0x37')]?_0x4de065[_0xcddf('0x35')]:_0x94f458[_0xcddf('0x30')];if(!_0xb7cc6c[_0xcddf('0x31')][_0xcddf('0x38')](_0xcddf('0x39'))){_0x4de065['limit']=qs[_0xcddf('0x20')](_0xb7cc6c[_0xcddf('0x31')][_0xcddf('0x20')]);_0x4de065[_0xcddf('0x1f')]=qs['offset'](_0xb7cc6c['query'][_0xcddf('0x1f')]);}_0x4de065[_0xcddf('0x3a')]=qs[_0xcddf('0x3b')](_0xb7cc6c[_0xcddf('0x31')][_0xcddf('0x3b')]);_0x4de065[_0xcddf('0x3c')]=qs[_0xcddf('0x33')](_[_0xcddf('0x3d')](_0xb7cc6c[_0xcddf('0x31')],_0x94f458[_0xcddf('0x33')]));if(_0xb7cc6c[_0xcddf('0x31')][_0xcddf('0x3e')]){_0x4de065[_0xcddf('0x3c')]=_[_0xcddf('0x3f')](_0x4de065['where'],{'$or':_[_0xcddf('0x2b')](_0x3c7001,function(_0x47992d){if(_0x47992d['type']!==_0xcddf('0x40')){var _0x15d086={};_0x15d086[_0x47992d['name']]={'$like':'%'+_0xb7cc6c['query'][_0xcddf('0x3e')]+'%'};return _0x15d086;}})});}_0x4de065=_[_0xcddf('0x3f')]({},_0x4de065,_0xb7cc6c[_0xcddf('0x41')]);var _0x1e0714={'where':_0x4de065[_0xcddf('0x3c')]};return db[_0xcddf('0x2c')][_0xcddf('0x1e')](_0x1e0714)['then'](function(_0x44339a){_0x115191[_0xcddf('0x1e')]=_0x44339a;if(_0xb7cc6c[_0xcddf('0x31')][_0xcddf('0x42')]){_0x4de065[_0xcddf('0x43')]=[{'all':!![]}];}return db[_0xcddf('0x2c')]['findAll'](_0x4de065);})[_0xcddf('0x26')](function(_0x77533c){_0x115191['rows']=_0x77533c;return _0x115191;})[_0xcddf('0x26')](respondWithFilteredResult(_0x4fb47f,_0x4de065))[_0xcddf('0x44')](handleError(_0x4fb47f,null));};exports[_0xcddf('0x45')]=function(_0xd0d846,_0x1e36c0){var _0x1b8b62={'raw':!![],'where':{'id':_0xd0d846[_0xcddf('0x46')]['id']}},_0x16777d={};_0x16777d[_0xcddf('0x30')]=_[_0xcddf('0x32')](db[_0xcddf('0x2c')][_0xcddf('0x2d')]);_0x16777d[_0xcddf('0x31')]=_[_0xcddf('0x32')](_0xd0d846[_0xcddf('0x31')]);_0x16777d[_0xcddf('0x33')]=_[_0xcddf('0x34')](_0x16777d[_0xcddf('0x30')],_0x16777d['query']);_0x1b8b62[_0xcddf('0x35')]=_['intersection'](_0x16777d['model'],qs[_0xcddf('0x36')](_0xd0d846['query'][_0xcddf('0x36')]));_0x1b8b62['attributes']=_0x1b8b62[_0xcddf('0x35')][_0xcddf('0x37')]?_0x1b8b62[_0xcddf('0x35')]:_0x16777d[_0xcddf('0x30')];if(_0xd0d846[_0xcddf('0x31')][_0xcddf('0x42')]){_0x1b8b62[_0xcddf('0x43')]=[{'all':!![]}];}_0x1b8b62=_[_0xcddf('0x3f')]({},_0x1b8b62,_0xd0d846[_0xcddf('0x41')]);return db[_0xcddf('0x2c')][_0xcddf('0x47')](_0x1b8b62)[_0xcddf('0x26')](handleEntityNotFound(_0x1e36c0,null))[_0xcddf('0x26')](respondWithResult(_0x1e36c0,null))[_0xcddf('0x44')](handleError(_0x1e36c0,null));};exports[_0xcddf('0x48')]=function(_0x3dda86,_0x116762){return db[_0xcddf('0x2c')][_0xcddf('0x48')](_0x3dda86[_0xcddf('0x49')],{})[_0xcddf('0x26')](respondWithResult(_0x116762,0xc9))[_0xcddf('0x44')](handleError(_0x116762,null));};exports[_0xcddf('0x25')]=function(_0x177c3c,_0x204268){if(_0x177c3c[_0xcddf('0x49')]['id']){delete _0x177c3c[_0xcddf('0x49')]['id'];}return db[_0xcddf('0x2c')]['find']({'where':{'id':_0x177c3c[_0xcddf('0x46')]['id']}})['then'](handleEntityNotFound(_0x204268,null))[_0xcddf('0x26')](saveUpdates(_0x177c3c[_0xcddf('0x49')],null))[_0xcddf('0x26')](respondWithResult(_0x204268,null))[_0xcddf('0x44')](handleError(_0x204268,null));};exports[_0xcddf('0x27')]=function(_0x522504,_0xcc7a97){return db[_0xcddf('0x2c')][_0xcddf('0x47')]({'where':{'id':_0x522504['params']['id']}})[_0xcddf('0x26')](handleEntityNotFound(_0xcc7a97,null))[_0xcddf('0x26')](removeEntity(_0xcc7a97,null))['catch'](handleError(_0xcc7a97,null));};
\ No newline at end of file
+var _0xbf24=['update','then','destroy','sendStatus','stack','name','send','MailServerOut','rawAttributes','fieldName','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','keys','find','create','body','params','eml-format','zip-dir','fast-json-patch','moment','mustache','util','path','to-csv','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','status','end','count','offset','set','Content-Range','json','apply','reject','save'];(function(_0x553a87,_0x1d621f){var _0x12d1e6=function(_0x41ae48){while(--_0x41ae48){_0x553a87['push'](_0x553a87['shift']());}};_0x12d1e6(++_0x1d621f);}(_0xbf24,0x187));var _0x4bf2=function(_0x9bb5cb,_0x1f8301){_0x9bb5cb=_0x9bb5cb-0x0;var _0x3d611c=_0xbf24[_0x9bb5cb];return _0x3d611c;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x4bf2('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4bf2('0x1'));var jsonpatch=require(_0x4bf2('0x2'));var rp=require('request-promise');var moment=require(_0x4bf2('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x4bf2('0x4'));var util=require(_0x4bf2('0x5'));var path=require(_0x4bf2('0x6'));var sox=require('sox');var csv=require(_0x4bf2('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x4bf2('0x8'));var squel=require(_0x4bf2('0x9'));var crypto=require(_0x4bf2('0xa'));var jsforce=require(_0x4bf2('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x4bf2('0x7'));var querystring=require(_0x4bf2('0xc'));var Papa=require('papaparse');var Redis=require(_0x4bf2('0xd'));var authService=require(_0x4bf2('0xe'));var qs=require(_0x4bf2('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4bf2('0x10'));var logger=require(_0x4bf2('0x11'))('api');var utils=require(_0x4bf2('0x12'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x323237,_0x54349a){_0x54349a=_0x54349a||0xcc;return function(_0x343863){if(_0x343863){return _0x323237['sendStatus'](_0x54349a);}return _0x323237[_0x4bf2('0x13')](_0x54349a)[_0x4bf2('0x14')]();};}function respondWithResult(_0x37c731,_0x47a90f){_0x47a90f=_0x47a90f||0xc8;return function(_0x342f47){if(_0x342f47){return _0x37c731[_0x4bf2('0x13')](_0x47a90f)['json'](_0x342f47);}};}function respondWithFilteredResult(_0x40fbdd,_0x386a9a){return function(_0x513760){if(_0x513760){var _0x421538=_0x513760[_0x4bf2('0x15')],_0x34c5a8=_0x386a9a[_0x4bf2('0x16')],_0x46e6f7=_0x386a9a['offset']+_0x386a9a['limit'],_0x2a3215;if(_0x46e6f7>=_0x421538){_0x46e6f7=_0x421538;_0x2a3215=0xc8;}else{_0x2a3215=0xce;}_0x40fbdd[_0x4bf2('0x13')](_0x2a3215);return _0x40fbdd[_0x4bf2('0x17')](_0x4bf2('0x18'),_0x34c5a8+'-'+_0x46e6f7+'/'+_0x421538)[_0x4bf2('0x19')](_0x513760);}return null;};}function patchUpdates(_0x268f6c){return function(_0xc5403d){try{jsonpatch[_0x4bf2('0x1a')](_0xc5403d,_0x268f6c,!![]);}catch(_0xde15f){return BPromise[_0x4bf2('0x1b')](_0xde15f);}return _0xc5403d[_0x4bf2('0x1c')]();};}function saveUpdates(_0xb666b0,_0x10236b){return function(_0x17848b){if(_0x17848b){return _0x17848b[_0x4bf2('0x1d')](_0xb666b0)[_0x4bf2('0x1e')](function(_0x2e20f7){return _0x2e20f7;});}return null;};}function removeEntity(_0x2e4da7,_0xc0d451){return function(_0x30489){if(_0x30489){return _0x30489[_0x4bf2('0x1f')]()['then'](function(){_0x2e4da7[_0x4bf2('0x13')](0xcc)[_0x4bf2('0x14')]();});}};}function handleEntityNotFound(_0x53bf08,_0x20e558){return function(_0x29a02b){if(!_0x29a02b){_0x53bf08[_0x4bf2('0x20')](0x194);}return _0x29a02b;};}function handleError(_0x3befac,_0xebbcbe){_0xebbcbe=_0xebbcbe||0x1f4;return function(_0x3199f7){logger['error'](_0x3199f7[_0x4bf2('0x21')]);if(_0x3199f7[_0x4bf2('0x22')]){delete _0x3199f7[_0x4bf2('0x22')];}_0x3befac['status'](_0xebbcbe)[_0x4bf2('0x23')](_0x3199f7);};}exports['index']=function(_0x345893,_0x207351){var _0x364d25={},_0x479c3c={},_0x86444e={'count':0x0,'rows':[]};var _0x5a136c=_['map'](db[_0x4bf2('0x24')][_0x4bf2('0x25')],function(_0x5a7a7c){return{'name':_0x5a7a7c[_0x4bf2('0x26')],'type':_0x5a7a7c['type'][_0x4bf2('0x27')]};});_0x479c3c[_0x4bf2('0x28')]=_[_0x4bf2('0x29')](_0x5a136c,_0x4bf2('0x22'));_0x479c3c[_0x4bf2('0x2a')]=_['keys'](_0x345893[_0x4bf2('0x2a')]);_0x479c3c[_0x4bf2('0x2b')]=_[_0x4bf2('0x2c')](_0x479c3c[_0x4bf2('0x28')],_0x479c3c[_0x4bf2('0x2a')]);_0x364d25[_0x4bf2('0x2d')]=_[_0x4bf2('0x2c')](_0x479c3c['model'],qs['fields'](_0x345893[_0x4bf2('0x2a')][_0x4bf2('0x2e')]));_0x364d25['attributes']=_0x364d25['attributes'][_0x4bf2('0x2f')]?_0x364d25[_0x4bf2('0x2d')]:_0x479c3c[_0x4bf2('0x28')];if(!_0x345893['query'][_0x4bf2('0x30')](_0x4bf2('0x31'))){_0x364d25[_0x4bf2('0x32')]=qs['limit'](_0x345893[_0x4bf2('0x2a')][_0x4bf2('0x32')]);_0x364d25['offset']=qs[_0x4bf2('0x16')](_0x345893['query']['offset']);}_0x364d25[_0x4bf2('0x33')]=qs[_0x4bf2('0x34')](_0x345893[_0x4bf2('0x2a')][_0x4bf2('0x34')]);_0x364d25['where']=qs[_0x4bf2('0x2b')](_[_0x4bf2('0x35')](_0x345893[_0x4bf2('0x2a')],_0x479c3c[_0x4bf2('0x2b')]));if(_0x345893['query'][_0x4bf2('0x36')]){_0x364d25[_0x4bf2('0x37')]=_[_0x4bf2('0x38')](_0x364d25[_0x4bf2('0x37')],{'$or':_[_0x4bf2('0x29')](_0x5a136c,function(_0x10a869){if(_0x10a869['type']!==_0x4bf2('0x39')){var _0x2ed333={};_0x2ed333[_0x10a869[_0x4bf2('0x22')]]={'$like':'%'+_0x345893[_0x4bf2('0x2a')][_0x4bf2('0x36')]+'%'};return _0x2ed333;}})});}_0x364d25=_[_0x4bf2('0x38')]({},_0x364d25,_0x345893[_0x4bf2('0x3a')]);var _0x3a97b7={'where':_0x364d25[_0x4bf2('0x37')]};return db[_0x4bf2('0x24')][_0x4bf2('0x15')](_0x3a97b7)['then'](function(_0x5b741d){_0x86444e[_0x4bf2('0x15')]=_0x5b741d;if(_0x345893[_0x4bf2('0x2a')][_0x4bf2('0x3b')]){_0x364d25[_0x4bf2('0x3c')]=[{'all':!![]}];}return db['MailServerOut'][_0x4bf2('0x3d')](_0x364d25);})['then'](function(_0x523427){_0x86444e[_0x4bf2('0x3e')]=_0x523427;return _0x86444e;})[_0x4bf2('0x1e')](respondWithFilteredResult(_0x207351,_0x364d25))[_0x4bf2('0x3f')](handleError(_0x207351,null));};exports[_0x4bf2('0x40')]=function(_0x532f8e,_0x365d5d){var _0x55a296={'raw':!![],'where':{'id':_0x532f8e['params']['id']}},_0x5a531b={};_0x5a531b['model']=_[_0x4bf2('0x41')](db[_0x4bf2('0x24')][_0x4bf2('0x25')]);_0x5a531b[_0x4bf2('0x2a')]=_[_0x4bf2('0x41')](_0x532f8e['query']);_0x5a531b['filters']=_[_0x4bf2('0x2c')](_0x5a531b[_0x4bf2('0x28')],_0x5a531b[_0x4bf2('0x2a')]);_0x55a296[_0x4bf2('0x2d')]=_[_0x4bf2('0x2c')](_0x5a531b[_0x4bf2('0x28')],qs['fields'](_0x532f8e[_0x4bf2('0x2a')]['fields']));_0x55a296[_0x4bf2('0x2d')]=_0x55a296['attributes'][_0x4bf2('0x2f')]?_0x55a296[_0x4bf2('0x2d')]:_0x5a531b[_0x4bf2('0x28')];if(_0x532f8e[_0x4bf2('0x2a')][_0x4bf2('0x3b')]){_0x55a296[_0x4bf2('0x3c')]=[{'all':!![]}];}_0x55a296=_['merge']({},_0x55a296,_0x532f8e[_0x4bf2('0x3a')]);return db[_0x4bf2('0x24')][_0x4bf2('0x42')](_0x55a296)[_0x4bf2('0x1e')](handleEntityNotFound(_0x365d5d,null))[_0x4bf2('0x1e')](respondWithResult(_0x365d5d,null))[_0x4bf2('0x3f')](handleError(_0x365d5d,null));};exports[_0x4bf2('0x43')]=function(_0x55c6d1,_0x21fb96){return db[_0x4bf2('0x24')][_0x4bf2('0x43')](_0x55c6d1['body'],{})[_0x4bf2('0x1e')](respondWithResult(_0x21fb96,0xc9))[_0x4bf2('0x3f')](handleError(_0x21fb96,null));};exports['update']=function(_0x1e2475,_0x3f8317){if(_0x1e2475[_0x4bf2('0x44')]['id']){delete _0x1e2475['body']['id'];}return db[_0x4bf2('0x24')][_0x4bf2('0x42')]({'where':{'id':_0x1e2475[_0x4bf2('0x45')]['id']}})['then'](handleEntityNotFound(_0x3f8317,null))['then'](saveUpdates(_0x1e2475[_0x4bf2('0x44')],null))['then'](respondWithResult(_0x3f8317,null))[_0x4bf2('0x3f')](handleError(_0x3f8317,null));};exports[_0x4bf2('0x1f')]=function(_0x3430a9,_0x1cac71){return db[_0x4bf2('0x24')][_0x4bf2('0x42')]({'where':{'id':_0x3430a9[_0x4bf2('0x45')]['id']}})[_0x4bf2('0x1e')](handleEntityNotFound(_0x1cac71,null))[_0x4bf2('0x1e')](removeEntity(_0x1cac71,null))[_0x4bf2('0x3f')](handleError(_0x1cac71,null));};
\ No newline at end of file
diff --git a/server/api/mailServerOut/mailServerOut.model.js b/server/api/mailServerOut/mailServerOut.model.js
index 7aea20d..deec08b 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 _0x687b=['rimraf','../../config/environment','./mailServerOut.attributes','exports','define','MailServerOut','lodash','util','../../config/logger','api','request-promise','path'];(function(_0x544700,_0x37f134){var _0x39260b=function(_0x4faf4a){while(--_0x4faf4a){_0x544700['push'](_0x544700['shift']());}};_0x39260b(++_0x37f134);}(_0x687b,0x14a));var _0xb687=function(_0x3ee9b2,_0xa090bb){_0x3ee9b2=_0x3ee9b2-0x0;var _0x51ac3e=_0x687b[_0x3ee9b2];return _0x51ac3e;};'use strict';var _=require(_0xb687('0x0'));var util=require(_0xb687('0x1'));var logger=require(_0xb687('0x2'))(_0xb687('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xb687('0x4'));var fs=require('fs');var path=require(_0xb687('0x5'));var rimraf=require(_0xb687('0x6'));var config=require(_0xb687('0x7'));var attributes=require(_0xb687('0x8'));module[_0xb687('0x9')]=function(_0x16ccf3,_0xf43a1f){return _0x16ccf3[_0xb687('0xa')](_0xb687('0xb'),attributes,{'tableName':'mail_servers_out','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x53ec=['bluebird','path','../../config/environment','./mailServerOut.attributes','define','MailServerOut','lodash','util','../../config/logger','api','moment'];(function(_0x1ba70a,_0x25c208){var _0x30857a=function(_0x289925){while(--_0x289925){_0x1ba70a['push'](_0x1ba70a['shift']());}};_0x30857a(++_0x25c208);}(_0x53ec,0x192));var _0xc53e=function(_0x35f2d6,_0x1eacc1){_0x35f2d6=_0x35f2d6-0x0;var _0x33a492=_0x53ec[_0x35f2d6];return _0x33a492;};'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':'mail_servers_out','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 bd27448..c38f194 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 _0x47ad=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','MailServerOut,\x20%s,\x20%s,\x20%s','stringify','code','MailServerOut,\x20%s,\x20%s','error','message','request\x20sent','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x2b8787,_0xf2e4e1){var _0x11a82a=function(_0x5550f8){while(--_0x5550f8){_0x2b8787['push'](_0x2b8787['shift']());}};_0x11a82a(++_0xf2e4e1);}(_0x47ad,0xa9));var _0xd47a=function(_0x2f3b14,_0x554f94){_0x2f3b14=_0x2f3b14-0x0;var _0x20e924=_0x47ad[_0x2f3b14];return _0x20e924;};'use strict';var _=require(_0xd47a('0x0'));var util=require(_0xd47a('0x1'));var moment=require(_0xd47a('0x2'));var BPromise=require(_0xd47a('0x3'));var rs=require(_0xd47a('0x4'));var fs=require('fs');var Redis=require(_0xd47a('0x5'));var db=require(_0xd47a('0x6'))['db'];var utils=require(_0xd47a('0x7'));var logger=require(_0xd47a('0x8'))(_0xd47a('0x9'));var config=require(_0xd47a('0xa'));var jayson=require(_0xd47a('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x46e02d,_0x7b88d2,_0x536c7b){return new BPromise(function(_0x5c5278,_0x2f95a2){return client['request'](_0x46e02d,_0x536c7b)[_0xd47a('0xc')](function(_0x30fca1){logger[_0xd47a('0xd')]('MailServerOut,\x20%s,\x20%s',_0x7b88d2,'request\x20sent');logger['debug'](_0xd47a('0xe'),_0x7b88d2,'request\x20sent',JSON[_0xd47a('0xf')](_0x30fca1));if(_0x30fca1['error']){if(_0x30fca1['error'][_0xd47a('0x10')]===0x1f4){logger['error'](_0xd47a('0x11'),_0x7b88d2,_0x30fca1[_0xd47a('0x12')][_0xd47a('0x13')]);return _0x2f95a2(_0x30fca1[_0xd47a('0x12')][_0xd47a('0x13')]);}logger['error']('MailServerOut,\x20%s,\x20%s',_0x7b88d2,_0x30fca1[_0xd47a('0x12')][_0xd47a('0x13')]);return _0x5c5278(_0x30fca1[_0xd47a('0x12')][_0xd47a('0x13')]);}else{logger[_0xd47a('0xd')](_0xd47a('0x11'),_0x7b88d2,_0xd47a('0x14'));_0x5c5278(_0x30fca1['result']['message']);}})[_0xd47a('0x15')](function(_0x3467fe){logger[_0xd47a('0x12')](_0xd47a('0x11'),_0x7b88d2,_0x3467fe);_0x2f95a2(_0x3467fe);});});}
\ No newline at end of file
+var _0x2f9f=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','error','code','message','MailServerOut,\x20%s,\x20%s','catch'];(function(_0x18fb16,_0x45edbc){var _0x147b0d=function(_0x5b1b00){while(--_0x5b1b00){_0x18fb16['push'](_0x18fb16['shift']());}};_0x147b0d(++_0x45edbc);}(_0x2f9f,0x1d4));var _0xf2f9=function(_0x4c3d23,_0xeb5cfa){_0x4c3d23=_0x4c3d23-0x0;var _0x5d46bc=_0x2f9f[_0x4c3d23];return _0x5d46bc;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf2f9('0x0'));var rs=require(_0xf2f9('0x1'));var fs=require('fs');var Redis=require(_0xf2f9('0x2'));var db=require(_0xf2f9('0x3'))['db'];var utils=require(_0xf2f9('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xf2f9('0x5'));var jayson=require(_0xf2f9('0x6'));var client=jayson['client'][_0xf2f9('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x5a2764,_0x346c2f,_0x2cdf6f){return new BPromise(function(_0x4da350,_0x54451e){return client[_0xf2f9('0x8')](_0x5a2764,_0x2cdf6f)[_0xf2f9('0x9')](function(_0x285cf3){logger[_0xf2f9('0xa')]('MailServerOut,\x20%s,\x20%s',_0x346c2f,_0xf2f9('0xb'));logger[_0xf2f9('0xc')]('MailServerOut,\x20%s,\x20%s,\x20%s',_0x346c2f,_0xf2f9('0xb'),JSON['stringify'](_0x285cf3));if(_0x285cf3[_0xf2f9('0xd')]){if(_0x285cf3[_0xf2f9('0xd')][_0xf2f9('0xe')]===0x1f4){logger['error']('MailServerOut,\x20%s,\x20%s',_0x346c2f,_0x285cf3[_0xf2f9('0xd')][_0xf2f9('0xf')]);return _0x54451e(_0x285cf3[_0xf2f9('0xd')][_0xf2f9('0xf')]);}logger[_0xf2f9('0xd')](_0xf2f9('0x10'),_0x346c2f,_0x285cf3[_0xf2f9('0xd')][_0xf2f9('0xf')]);return _0x4da350(_0x285cf3[_0xf2f9('0xd')][_0xf2f9('0xf')]);}else{logger[_0xf2f9('0xa')](_0xf2f9('0x10'),_0x346c2f,_0xf2f9('0xb'));_0x4da350(_0x285cf3['result']['message']);}})[_0xf2f9('0x11')](function(_0x5efc6f){logger['error'](_0xf2f9('0x10'),_0x346c2f,_0x5efc6f);_0x54451e(_0x5efc6f);});});}
\ No newline at end of file
diff --git a/server/api/mailSubstatus/index.js b/server/api/mailSubstatus/index.js
index cbb2416..151c29b 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 _0xc7a1=['describe','get','/:id','show','post','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailSubstatus.controller','isAuthenticated','index','/describe'];(function(_0x490123,_0x5dee58){var _0x5e18b2=function(_0x31ccf5){while(--_0x31ccf5){_0x490123['push'](_0x490123['shift']());}};_0x5e18b2(++_0x5dee58);}(_0xc7a1,0x1d7));var _0x1c7a=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xc7a1[_0x2641f9];return _0x585741;};'use strict';var multer=require(_0x1c7a('0x0'));var util=require(_0x1c7a('0x1'));var path=require(_0x1c7a('0x2'));var timeout=require(_0x1c7a('0x3'));var express=require(_0x1c7a('0x4'));var router=express[_0x1c7a('0x5')]();var auth=require(_0x1c7a('0x6'));var interaction=require(_0x1c7a('0x7'));var config=require(_0x1c7a('0x8'));var controller=require(_0x1c7a('0x9'));router['get']('/',auth[_0x1c7a('0xa')](),controller[_0x1c7a('0xb')]);router['get'](_0x1c7a('0xc'),auth[_0x1c7a('0xa')](),controller[_0x1c7a('0xd')]);router[_0x1c7a('0xe')](_0x1c7a('0xf'),auth[_0x1c7a('0xa')](),controller[_0x1c7a('0x10')]);router[_0x1c7a('0x11')]('/',auth[_0x1c7a('0xa')](),controller['create']);router[_0x1c7a('0x12')](_0x1c7a('0xf'),auth[_0x1c7a('0xa')](),controller['update']);router[_0x1c7a('0x13')](_0x1c7a('0xf'),auth[_0x1c7a('0xa')](),controller[_0x1c7a('0x14')]);module[_0x1c7a('0x15')]=router;
\ No newline at end of file
+var _0x60e3=['get','index','isAuthenticated','/:id','show','post','create','put','update','destroy','exports','multer','util','connect-timeout','Router','../../components/auth/service','./mailSubstatus.controller'];(function(_0x1df9b0,_0x38552e){var _0x30f032=function(_0x443812){while(--_0x443812){_0x1df9b0['push'](_0x1df9b0['shift']());}};_0x30f032(++_0x38552e);}(_0x60e3,0x1c5));var _0x360e=function(_0x411050,_0x45bf98){_0x411050=_0x411050-0x0;var _0x21f0e3=_0x60e3[_0x411050];return _0x21f0e3;};'use strict';var multer=require(_0x360e('0x0'));var util=require(_0x360e('0x1'));var path=require('path');var timeout=require(_0x360e('0x2'));var express=require('express');var router=express[_0x360e('0x3')]();var auth=require(_0x360e('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x360e('0x5'));router[_0x360e('0x6')]('/',auth['isAuthenticated'](),controller[_0x360e('0x7')]);router[_0x360e('0x6')]('/describe',auth[_0x360e('0x8')](),controller['describe']);router[_0x360e('0x6')](_0x360e('0x9'),auth[_0x360e('0x8')](),controller[_0x360e('0xa')]);router[_0x360e('0xb')]('/',auth['isAuthenticated'](),controller[_0x360e('0xc')]);router[_0x360e('0xd')](_0x360e('0x9'),auth[_0x360e('0x8')](),controller[_0x360e('0xe')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x360e('0xf')]);module[_0x360e('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/mailSubstatus/mailSubstatus.attributes.js b/server/api/mailSubstatus/mailSubstatus.attributes.js
index fa8fa8e..0150e85 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. *
// * *
// *************************************************************************
-'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x7409=['name','STRING','sequelize','exports'];(function(_0x1fb161,_0x4b42f7){var _0x217efd=function(_0x5b3166){while(--_0x5b3166){_0x1fb161['push'](_0x1fb161['shift']());}};_0x217efd(++_0x4b42f7);}(_0x7409,0x6e));var _0x9740=function(_0x2330fd,_0x56e9c7){_0x2330fd=_0x2330fd-0x0;var _0x5c1eba=_0x7409[_0x2330fd];return _0x5c1eba;};'use strict';var Sequelize=require(_0x9740('0x0'));module[_0x9740('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x9740('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x9740('0x3')]}};
\ No newline at end of file
diff --git a/server/api/mailSubstatus/mailSubstatus.controller.js b/server/api/mailSubstatus/mailSubstatus.controller.js
index f33e96f..d97e526 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 _0xafc4=['fieldName','type','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','map','VIRTUAL','merge','options','include','findAll','rows','params','includeAll','find','create','body','catch','describe','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','MailSubstatus','rawAttributes'];(function(_0x599f45,_0x5952c7){var _0x11e4a2=function(_0xcc78e6){while(--_0xcc78e6){_0x599f45['push'](_0x599f45['shift']());}};_0x11e4a2(++_0x5952c7);}(_0xafc4,0x69));var _0x4afc=function(_0x1fd036,_0x35ddf5){_0x1fd036=_0x1fd036-0x0;var _0x1b257d=_0xafc4[_0x1fd036];return _0x1b257d;};'use strict';var pdf=require(_0x4afc('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x4afc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4afc('0x2'));var rp=require(_0x4afc('0x3'));var moment=require(_0x4afc('0x4'));var BPromise=require(_0x4afc('0x5'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x4afc('0x6'));var csv=require(_0x4afc('0x7'));var ejs=require(_0x4afc('0x8'));var fs=require('fs');var _=require(_0x4afc('0x9'));var squel=require(_0x4afc('0xa'));var crypto=require(_0x4afc('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x4afc('0xc'));var toCsv=require(_0x4afc('0x7'));var querystring=require(_0x4afc('0xd'));var Papa=require(_0x4afc('0xe'));var Redis=require(_0x4afc('0xf'));var authService=require(_0x4afc('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4afc('0x11'));var logger=require('../../config/logger')(_0x4afc('0x12'));var utils=require(_0x4afc('0x13'));var config=require('../../config/environment');var db=require(_0x4afc('0x14'))['db'];function respondWithStatusCode(_0x3fb54a,_0x2b191c){_0x2b191c=_0x2b191c||0xcc;return function(_0x2768bf){if(_0x2768bf){return _0x3fb54a[_0x4afc('0x15')](_0x2b191c);}return _0x3fb54a[_0x4afc('0x16')](_0x2b191c)[_0x4afc('0x17')]();};}function respondWithResult(_0x23b03e,_0x5effb4){_0x5effb4=_0x5effb4||0xc8;return function(_0x26f3f1){if(_0x26f3f1){return _0x23b03e[_0x4afc('0x16')](_0x5effb4)[_0x4afc('0x18')](_0x26f3f1);}};}function respondWithFilteredResult(_0x1e2c31,_0x5f2dc9){return function(_0x4e32e8){if(_0x4e32e8){var _0x2452ae=_0x4e32e8[_0x4afc('0x19')],_0x4f3127=_0x5f2dc9[_0x4afc('0x1a')],_0x23ae30=_0x5f2dc9[_0x4afc('0x1a')]+_0x5f2dc9[_0x4afc('0x1b')],_0x24ed6d;if(_0x23ae30>=_0x2452ae){_0x23ae30=_0x2452ae;_0x24ed6d=0xc8;}else{_0x24ed6d=0xce;}_0x1e2c31[_0x4afc('0x16')](_0x24ed6d);return _0x1e2c31[_0x4afc('0x1c')](_0x4afc('0x1d'),_0x4f3127+'-'+_0x23ae30+'/'+_0x2452ae)[_0x4afc('0x18')](_0x4e32e8);}return null;};}function patchUpdates(_0x178229){return function(_0x543f0c){try{jsonpatch[_0x4afc('0x1e')](_0x543f0c,_0x178229,!![]);}catch(_0x25603b){return BPromise[_0x4afc('0x1f')](_0x25603b);}return _0x543f0c[_0x4afc('0x20')]();};}function saveUpdates(_0x557a7e,_0x3bddc0){return function(_0x30eda3){if(_0x30eda3){return _0x30eda3[_0x4afc('0x21')](_0x557a7e)[_0x4afc('0x22')](function(_0x1559b8){return _0x1559b8;});}return null;};}function removeEntity(_0x3add4c,_0x3ad7a5){return function(_0x573a75){if(_0x573a75){return _0x573a75[_0x4afc('0x23')]()[_0x4afc('0x22')](function(){_0x3add4c['status'](0xcc)[_0x4afc('0x17')]();});}};}function handleEntityNotFound(_0x4e9a48,_0x1aa676){return function(_0x2a0314){if(!_0x2a0314){_0x4e9a48[_0x4afc('0x15')](0x194);}return _0x2a0314;};}function handleError(_0x2876f2,_0x86dbd4){_0x86dbd4=_0x86dbd4||0x1f4;return function(_0x28a86c){logger[_0x4afc('0x24')](_0x28a86c[_0x4afc('0x25')]);if(_0x28a86c[_0x4afc('0x26')]){delete _0x28a86c[_0x4afc('0x26')];}_0x2876f2[_0x4afc('0x16')](_0x86dbd4)[_0x4afc('0x27')](_0x28a86c);};}exports[_0x4afc('0x28')]=function(_0x55842c,_0xc3952e){var _0x244f6c={},_0x2d6112={},_0x4e254d={'count':0x0,'rows':[]};var _0x52212d=_['map'](db[_0x4afc('0x29')][_0x4afc('0x2a')],function(_0x5e4747){return{'name':_0x5e4747[_0x4afc('0x2b')],'type':_0x5e4747[_0x4afc('0x2c')]['key']};});_0x2d6112['model']=_['map'](_0x52212d,_0x4afc('0x26'));_0x2d6112[_0x4afc('0x2d')]=_[_0x4afc('0x2e')](_0x55842c[_0x4afc('0x2d')]);_0x2d6112[_0x4afc('0x2f')]=_[_0x4afc('0x30')](_0x2d6112['model'],_0x2d6112[_0x4afc('0x2d')]);_0x244f6c[_0x4afc('0x31')]=_[_0x4afc('0x30')](_0x2d6112[_0x4afc('0x32')],qs[_0x4afc('0x33')](_0x55842c[_0x4afc('0x2d')][_0x4afc('0x33')]));_0x244f6c[_0x4afc('0x31')]=_0x244f6c['attributes'][_0x4afc('0x34')]?_0x244f6c['attributes']:_0x2d6112['model'];if(!_0x55842c[_0x4afc('0x2d')][_0x4afc('0x35')](_0x4afc('0x36'))){_0x244f6c[_0x4afc('0x1b')]=qs[_0x4afc('0x1b')](_0x55842c[_0x4afc('0x2d')]['limit']);_0x244f6c[_0x4afc('0x1a')]=qs[_0x4afc('0x1a')](_0x55842c[_0x4afc('0x2d')][_0x4afc('0x1a')]);}_0x244f6c[_0x4afc('0x37')]=qs[_0x4afc('0x38')](_0x55842c['query'][_0x4afc('0x38')]);_0x244f6c[_0x4afc('0x39')]=qs[_0x4afc('0x2f')](_[_0x4afc('0x3a')](_0x55842c['query'],_0x2d6112['filters']));if(_0x55842c[_0x4afc('0x2d')][_0x4afc('0x3b')]){_0x244f6c[_0x4afc('0x39')]=_['merge'](_0x244f6c['where'],{'$or':_[_0x4afc('0x3c')](_0x52212d,function(_0x4a06cf){if(_0x4a06cf['type']!==_0x4afc('0x3d')){var _0x1dc853={};_0x1dc853[_0x4a06cf[_0x4afc('0x26')]]={'$like':'%'+_0x55842c[_0x4afc('0x2d')][_0x4afc('0x3b')]+'%'};return _0x1dc853;}})});}_0x244f6c=_[_0x4afc('0x3e')]({},_0x244f6c,_0x55842c[_0x4afc('0x3f')]);var _0x29c0df={'where':_0x244f6c[_0x4afc('0x39')]};return db[_0x4afc('0x29')][_0x4afc('0x19')](_0x29c0df)[_0x4afc('0x22')](function(_0x15c6cb){_0x4e254d[_0x4afc('0x19')]=_0x15c6cb;if(_0x55842c[_0x4afc('0x2d')]['includeAll']){_0x244f6c[_0x4afc('0x40')]=[{'all':!![]}];}return db[_0x4afc('0x29')][_0x4afc('0x41')](_0x244f6c);})[_0x4afc('0x22')](function(_0x12db1d){_0x4e254d[_0x4afc('0x42')]=_0x12db1d;return _0x4e254d;})[_0x4afc('0x22')](respondWithFilteredResult(_0xc3952e,_0x244f6c))['catch'](handleError(_0xc3952e,null));};exports['show']=function(_0x5ee5d7,_0x43bd0f){var _0x105c03={'raw':!![],'where':{'id':_0x5ee5d7[_0x4afc('0x43')]['id']}},_0x5c515a={};_0x5c515a[_0x4afc('0x32')]=_[_0x4afc('0x2e')](db[_0x4afc('0x29')]['rawAttributes']);_0x5c515a[_0x4afc('0x2d')]=_[_0x4afc('0x2e')](_0x5ee5d7[_0x4afc('0x2d')]);_0x5c515a[_0x4afc('0x2f')]=_[_0x4afc('0x30')](_0x5c515a[_0x4afc('0x32')],_0x5c515a['query']);_0x105c03[_0x4afc('0x31')]=_['intersection'](_0x5c515a[_0x4afc('0x32')],qs[_0x4afc('0x33')](_0x5ee5d7[_0x4afc('0x2d')]['fields']));_0x105c03['attributes']=_0x105c03[_0x4afc('0x31')][_0x4afc('0x34')]?_0x105c03[_0x4afc('0x31')]:_0x5c515a[_0x4afc('0x32')];if(_0x5ee5d7[_0x4afc('0x2d')][_0x4afc('0x44')]){_0x105c03[_0x4afc('0x40')]=[{'all':!![]}];}_0x105c03=_[_0x4afc('0x3e')]({},_0x105c03,_0x5ee5d7['options']);return db[_0x4afc('0x29')][_0x4afc('0x45')](_0x105c03)['then'](handleEntityNotFound(_0x43bd0f,null))[_0x4afc('0x22')](respondWithResult(_0x43bd0f,null))['catch'](handleError(_0x43bd0f,null));};exports[_0x4afc('0x46')]=function(_0x24a731,_0x16c6c4){return db['MailSubstatus'][_0x4afc('0x46')](_0x24a731[_0x4afc('0x47')],{})[_0x4afc('0x22')](respondWithResult(_0x16c6c4,0xc9))[_0x4afc('0x48')](handleError(_0x16c6c4,null));};exports[_0x4afc('0x21')]=function(_0x19a0ac,_0x5d9d90){if(_0x19a0ac['body']['id']){delete _0x19a0ac['body']['id'];}return db[_0x4afc('0x29')][_0x4afc('0x45')]({'where':{'id':_0x19a0ac[_0x4afc('0x43')]['id']}})[_0x4afc('0x22')](handleEntityNotFound(_0x5d9d90,null))[_0x4afc('0x22')](saveUpdates(_0x19a0ac[_0x4afc('0x47')],null))[_0x4afc('0x22')](respondWithResult(_0x5d9d90,null))[_0x4afc('0x48')](handleError(_0x5d9d90,null));};exports[_0x4afc('0x23')]=function(_0x464f94,_0x48dbe3){return db[_0x4afc('0x29')]['find']({'where':{'id':_0x464f94['params']['id']}})[_0x4afc('0x22')](handleEntityNotFound(_0x48dbe3,null))['then'](removeEntity(_0x48dbe3,null))[_0x4afc('0x48')](handleError(_0x48dbe3,null));};exports[_0x4afc('0x49')]=function(_0x2fe2ae,_0x2cafc3){return db['MailSubstatus'][_0x4afc('0x49')]()['then'](respondWithResult(_0x2cafc3,null))[_0x4afc('0x48')](handleError(_0x2cafc3,null));};
\ No newline at end of file
+var _0xd8fb=['order','sort','where','filter','merge','VIRTUAL','count','include','findAll','rows','show','params','includeAll','options','find','catch','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','bluebird','mustache','path','sox','ejs','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','set','save','update','then','destroy','error','stack','name','index','map','MailSubstatus','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','limit'];(function(_0x3bb83b,_0x1e17ae){var _0x371429=function(_0x608dd){while(--_0x608dd){_0x3bb83b['push'](_0x3bb83b['shift']());}};_0x371429(++_0x1e17ae);}(_0xd8fb,0x99));var _0xbd8f=function(_0x19a2fe,_0x2dfc81){_0x19a2fe=_0x19a2fe-0x0;var _0x205e42=_0xd8fb[_0x19a2fe];return _0x205e42;};'use strict';var pdf=require(_0xbd8f('0x0'));var emlformat=require(_0xbd8f('0x1'));var rimraf=require(_0xbd8f('0x2'));var zipdir=require(_0xbd8f('0x3'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xbd8f('0x4'));var Mustache=require(_0xbd8f('0x5'));var util=require('util');var path=require(_0xbd8f('0x6'));var sox=require(_0xbd8f('0x7'));var csv=require('to-csv');var ejs=require(_0xbd8f('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0xbd8f('0x9'));var crypto=require('crypto');var jsforce=require(_0xbd8f('0xa'));var deskjs=require(_0xbd8f('0xb'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xbd8f('0xc'));var Redis=require(_0xbd8f('0xd'));var authService=require(_0xbd8f('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0xbd8f('0xf'));var hardwareService=require(_0xbd8f('0x10'));var logger=require('../../config/logger')('api');var utils=require(_0xbd8f('0x11'));var config=require(_0xbd8f('0x12'));var db=require(_0xbd8f('0x13'))['db'];function respondWithStatusCode(_0x5d5705,_0x230988){_0x230988=_0x230988||0xcc;return function(_0x159f09){if(_0x159f09){return _0x5d5705[_0xbd8f('0x14')](_0x230988);}return _0x5d5705[_0xbd8f('0x15')](_0x230988)[_0xbd8f('0x16')]();};}function respondWithResult(_0x383ea5,_0x37d4d5){_0x37d4d5=_0x37d4d5||0xc8;return function(_0x29ffe8){if(_0x29ffe8){return _0x383ea5[_0xbd8f('0x15')](_0x37d4d5)['json'](_0x29ffe8);}};}function respondWithFilteredResult(_0x31573c,_0x829fb2){return function(_0xa57e91){if(_0xa57e91){var _0x10d72e=_0xa57e91['count'],_0x4da96f=_0x829fb2[_0xbd8f('0x17')],_0x174929=_0x829fb2[_0xbd8f('0x17')]+_0x829fb2['limit'],_0x63db18;if(_0x174929>=_0x10d72e){_0x174929=_0x10d72e;_0x63db18=0xc8;}else{_0x63db18=0xce;}_0x31573c[_0xbd8f('0x15')](_0x63db18);return _0x31573c[_0xbd8f('0x18')]('Content-Range',_0x4da96f+'-'+_0x174929+'/'+_0x10d72e)['json'](_0xa57e91);}return null;};}function patchUpdates(_0x33f77c){return function(_0x5d2fdb){try{jsonpatch['apply'](_0x5d2fdb,_0x33f77c,!![]);}catch(_0x159c7b){return BPromise['reject'](_0x159c7b);}return _0x5d2fdb[_0xbd8f('0x19')]();};}function saveUpdates(_0x7f46d4,_0xb47c8e){return function(_0x897f25){if(_0x897f25){return _0x897f25[_0xbd8f('0x1a')](_0x7f46d4)[_0xbd8f('0x1b')](function(_0x24cff5){return _0x24cff5;});}return null;};}function removeEntity(_0x90eff8,_0x2fbe3b){return function(_0x775acc){if(_0x775acc){return _0x775acc[_0xbd8f('0x1c')]()[_0xbd8f('0x1b')](function(){_0x90eff8[_0xbd8f('0x15')](0xcc)[_0xbd8f('0x16')]();});}};}function handleEntityNotFound(_0x320ede,_0xd11ae){return function(_0x395b1b){if(!_0x395b1b){_0x320ede['sendStatus'](0x194);}return _0x395b1b;};}function handleError(_0x359ead,_0x9fa3b1){_0x9fa3b1=_0x9fa3b1||0x1f4;return function(_0x1f9fcc){logger[_0xbd8f('0x1d')](_0x1f9fcc[_0xbd8f('0x1e')]);if(_0x1f9fcc[_0xbd8f('0x1f')]){delete _0x1f9fcc[_0xbd8f('0x1f')];}_0x359ead[_0xbd8f('0x15')](_0x9fa3b1)['send'](_0x1f9fcc);};}exports[_0xbd8f('0x20')]=function(_0x421f3e,_0x5a3a8c){var _0x339df7={},_0x557daa={},_0x41b2a6={'count':0x0,'rows':[]};var _0x30d62e=_[_0xbd8f('0x21')](db[_0xbd8f('0x22')][_0xbd8f('0x23')],function(_0x247b07){return{'name':_0x247b07['fieldName'],'type':_0x247b07[_0xbd8f('0x24')][_0xbd8f('0x25')]};});_0x557daa[_0xbd8f('0x26')]=_[_0xbd8f('0x21')](_0x30d62e,_0xbd8f('0x1f'));_0x557daa[_0xbd8f('0x27')]=_[_0xbd8f('0x28')](_0x421f3e['query']);_0x557daa[_0xbd8f('0x29')]=_[_0xbd8f('0x2a')](_0x557daa[_0xbd8f('0x26')],_0x557daa[_0xbd8f('0x27')]);_0x339df7['attributes']=_['intersection'](_0x557daa[_0xbd8f('0x26')],qs[_0xbd8f('0x2b')](_0x421f3e[_0xbd8f('0x27')][_0xbd8f('0x2b')]));_0x339df7['attributes']=_0x339df7[_0xbd8f('0x2c')][_0xbd8f('0x2d')]?_0x339df7[_0xbd8f('0x2c')]:_0x557daa[_0xbd8f('0x26')];if(!_0x421f3e[_0xbd8f('0x27')]['hasOwnProperty'](_0xbd8f('0x2e'))){_0x339df7[_0xbd8f('0x2f')]=qs[_0xbd8f('0x2f')](_0x421f3e[_0xbd8f('0x27')][_0xbd8f('0x2f')]);_0x339df7['offset']=qs[_0xbd8f('0x17')](_0x421f3e['query'][_0xbd8f('0x17')]);}_0x339df7[_0xbd8f('0x30')]=qs[_0xbd8f('0x31')](_0x421f3e[_0xbd8f('0x27')][_0xbd8f('0x31')]);_0x339df7[_0xbd8f('0x32')]=qs['filters'](_['pick'](_0x421f3e['query'],_0x557daa[_0xbd8f('0x29')]));if(_0x421f3e[_0xbd8f('0x27')][_0xbd8f('0x33')]){_0x339df7[_0xbd8f('0x32')]=_[_0xbd8f('0x34')](_0x339df7[_0xbd8f('0x32')],{'$or':_[_0xbd8f('0x21')](_0x30d62e,function(_0x30c1c2){if(_0x30c1c2[_0xbd8f('0x24')]!==_0xbd8f('0x35')){var _0x3d4c9a={};_0x3d4c9a[_0x30c1c2[_0xbd8f('0x1f')]]={'$like':'%'+_0x421f3e[_0xbd8f('0x27')][_0xbd8f('0x33')]+'%'};return _0x3d4c9a;}})});}_0x339df7=_[_0xbd8f('0x34')]({},_0x339df7,_0x421f3e['options']);var _0x2f22e1={'where':_0x339df7[_0xbd8f('0x32')]};return db['MailSubstatus'][_0xbd8f('0x36')](_0x2f22e1)[_0xbd8f('0x1b')](function(_0x3d3902){_0x41b2a6['count']=_0x3d3902;if(_0x421f3e[_0xbd8f('0x27')]['includeAll']){_0x339df7[_0xbd8f('0x37')]=[{'all':!![]}];}return db[_0xbd8f('0x22')][_0xbd8f('0x38')](_0x339df7);})['then'](function(_0x25031d){_0x41b2a6[_0xbd8f('0x39')]=_0x25031d;return _0x41b2a6;})[_0xbd8f('0x1b')](respondWithFilteredResult(_0x5a3a8c,_0x339df7))['catch'](handleError(_0x5a3a8c,null));};exports[_0xbd8f('0x3a')]=function(_0x3d82ef,_0x2c1397){var _0x351027={'raw':!![],'where':{'id':_0x3d82ef[_0xbd8f('0x3b')]['id']}},_0x280d95={};_0x280d95[_0xbd8f('0x26')]=_[_0xbd8f('0x28')](db[_0xbd8f('0x22')]['rawAttributes']);_0x280d95['query']=_[_0xbd8f('0x28')](_0x3d82ef[_0xbd8f('0x27')]);_0x280d95[_0xbd8f('0x29')]=_[_0xbd8f('0x2a')](_0x280d95['model'],_0x280d95[_0xbd8f('0x27')]);_0x351027[_0xbd8f('0x2c')]=_[_0xbd8f('0x2a')](_0x280d95[_0xbd8f('0x26')],qs[_0xbd8f('0x2b')](_0x3d82ef['query']['fields']));_0x351027[_0xbd8f('0x2c')]=_0x351027['attributes'][_0xbd8f('0x2d')]?_0x351027[_0xbd8f('0x2c')]:_0x280d95[_0xbd8f('0x26')];if(_0x3d82ef[_0xbd8f('0x27')][_0xbd8f('0x3c')]){_0x351027[_0xbd8f('0x37')]=[{'all':!![]}];}_0x351027=_[_0xbd8f('0x34')]({},_0x351027,_0x3d82ef[_0xbd8f('0x3d')]);return db['MailSubstatus'][_0xbd8f('0x3e')](_0x351027)[_0xbd8f('0x1b')](handleEntityNotFound(_0x2c1397,null))[_0xbd8f('0x1b')](respondWithResult(_0x2c1397,null))[_0xbd8f('0x3f')](handleError(_0x2c1397,null));};exports[_0xbd8f('0x40')]=function(_0x43298f,_0x272f70){return db[_0xbd8f('0x22')]['create'](_0x43298f[_0xbd8f('0x41')],{})[_0xbd8f('0x1b')](respondWithResult(_0x272f70,0xc9))[_0xbd8f('0x3f')](handleError(_0x272f70,null));};exports[_0xbd8f('0x1a')]=function(_0x2fdbd0,_0x1e40f2){if(_0x2fdbd0[_0xbd8f('0x41')]['id']){delete _0x2fdbd0[_0xbd8f('0x41')]['id'];}return db[_0xbd8f('0x22')][_0xbd8f('0x3e')]({'where':{'id':_0x2fdbd0[_0xbd8f('0x3b')]['id']}})[_0xbd8f('0x1b')](handleEntityNotFound(_0x1e40f2,null))[_0xbd8f('0x1b')](saveUpdates(_0x2fdbd0[_0xbd8f('0x41')],null))[_0xbd8f('0x1b')](respondWithResult(_0x1e40f2,null))[_0xbd8f('0x3f')](handleError(_0x1e40f2,null));};exports[_0xbd8f('0x1c')]=function(_0x148293,_0x2668a4){return db['MailSubstatus'][_0xbd8f('0x3e')]({'where':{'id':_0x148293[_0xbd8f('0x3b')]['id']}})[_0xbd8f('0x1b')](handleEntityNotFound(_0x2668a4,null))[_0xbd8f('0x1b')](removeEntity(_0x2668a4,null))['catch'](handleError(_0x2668a4,null));};exports[_0xbd8f('0x42')]=function(_0x5a33c5,_0x9bfe93){return db[_0xbd8f('0x22')][_0xbd8f('0x42')]()[_0xbd8f('0x1b')](respondWithResult(_0x9bfe93,null))['catch'](handleError(_0x9bfe93,null));};
\ No newline at end of file
diff --git a/server/api/mailSubstatus/mailSubstatus.model.js b/server/api/mailSubstatus/mailSubstatus.model.js
index 8b9db94..1aab054 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 _0x9d5b=['exports','MailSubstatus','mail_substatuses','util','../../config/logger','api','moment','bluebird','path','../../config/environment','./mailSubstatus.attributes'];(function(_0x5d2803,_0xf375bd){var _0xdcad2c=function(_0x3c3a98){while(--_0x3c3a98){_0x5d2803['push'](_0x5d2803['shift']());}};_0xdcad2c(++_0xf375bd);}(_0x9d5b,0x14d));var _0xb9d5=function(_0x2615f2,_0x13a7e4){_0x2615f2=_0x2615f2-0x0;var _0x6bdcdb=_0x9d5b[_0x2615f2];return _0x6bdcdb;};'use strict';var _=require('lodash');var util=require(_0xb9d5('0x0'));var logger=require(_0xb9d5('0x1'))(_0xb9d5('0x2'));var moment=require(_0xb9d5('0x3'));var BPromise=require(_0xb9d5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb9d5('0x5'));var rimraf=require('rimraf');var config=require(_0xb9d5('0x6'));var attributes=require(_0xb9d5('0x7'));module[_0xb9d5('0x8')]=function(_0x39d8fe,_0x422a92){return _0x39d8fe['define'](_0xb9d5('0x9'),attributes,{'tableName':_0xb9d5('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1131=['define','util','bluebird','request-promise','path','rimraf','../../config/environment','./mailSubstatus.attributes'];(function(_0x2bc3f4,_0x470b26){var _0x14ac53=function(_0x5121bd){while(--_0x5121bd){_0x2bc3f4['push'](_0x2bc3f4['shift']());}};_0x14ac53(++_0x470b26);}(_0x1131,0x71));var _0x1113=function(_0x47b84e,_0x38c1d0){_0x47b84e=_0x47b84e-0x0;var _0x39b582=_0x1131[_0x47b84e];return _0x39b582;};'use strict';var _=require('lodash');var util=require(_0x1113('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x1113('0x1'));var rp=require(_0x1113('0x2'));var fs=require('fs');var path=require(_0x1113('0x3'));var rimraf=require(_0x1113('0x4'));var config=require(_0x1113('0x5'));var attributes=require(_0x1113('0x6'));module['exports']=function(_0x3880aa,_0x4e6389){return _0x3880aa[_0x1113('0x7')]('MailSubstatus',attributes,{'tableName':'mail_substatuses','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 9b62e58..21d3d1a 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 _0x6c76=['request\x20sent','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../config/logger','rpc','jayson/promise','client','request','info','MailSubstatus,\x20%s,\x20%s'];(function(_0x4d7241,_0x32aa1f){var _0x59d9e2=function(_0x30e273){while(--_0x30e273){_0x4d7241['push'](_0x4d7241['shift']());}};_0x59d9e2(++_0x32aa1f);}(_0x6c76,0x184));var _0x66c7=function(_0x2b080,_0x26a48a){_0x2b080=_0x2b080-0x0;var _0x30401b=_0x6c76[_0x2b080];return _0x30401b;};'use strict';var _=require(_0x66c7('0x0'));var util=require(_0x66c7('0x1'));var moment=require(_0x66c7('0x2'));var BPromise=require('bluebird');var rs=require(_0x66c7('0x3'));var fs=require('fs');var Redis=require(_0x66c7('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x66c7('0x5'))(_0x66c7('0x6'));var config=require('../../config/environment');var jayson=require(_0x66c7('0x7'));var client=jayson[_0x66c7('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x23408c,_0x4dffcd,_0x4fa6ce){return new BPromise(function(_0x208d06,_0x2b0065){return client[_0x66c7('0x9')](_0x23408c,_0x4fa6ce)['then'](function(_0x20c010){logger[_0x66c7('0xa')](_0x66c7('0xb'),_0x4dffcd,_0x66c7('0xc'));logger['debug'](_0x66c7('0xd'),_0x4dffcd,_0x66c7('0xc'),JSON[_0x66c7('0xe')](_0x20c010));if(_0x20c010[_0x66c7('0xf')]){if(_0x20c010[_0x66c7('0xf')][_0x66c7('0x10')]===0x1f4){logger[_0x66c7('0xf')]('MailSubstatus,\x20%s,\x20%s',_0x4dffcd,_0x20c010[_0x66c7('0xf')][_0x66c7('0x11')]);return _0x2b0065(_0x20c010[_0x66c7('0xf')][_0x66c7('0x11')]);}logger[_0x66c7('0xf')](_0x66c7('0xb'),_0x4dffcd,_0x20c010[_0x66c7('0xf')][_0x66c7('0x11')]);return _0x208d06(_0x20c010[_0x66c7('0xf')]['message']);}else{logger[_0x66c7('0xa')]('MailSubstatus,\x20%s,\x20%s',_0x4dffcd,_0x66c7('0xc'));_0x208d06(_0x20c010[_0x66c7('0x12')][_0x66c7('0x11')]);}})[_0x66c7('0x13')](function(_0x22b262){logger['error']('MailSubstatus,\x20%s,\x20%s',_0x4dffcd,_0x22b262);_0x2b0065(_0x22b262);});});}
\ No newline at end of file
+var _0xa75b=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','MailSubstatus,\x20%s,\x20%s','request\x20sent','debug','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2f6c2e,_0x3af1a9){var _0x5c2e2d=function(_0x5928bf){while(--_0x5928bf){_0x2f6c2e['push'](_0x2f6c2e['shift']());}};_0x5c2e2d(++_0x3af1a9);}(_0xa75b,0x170));var _0xba75=function(_0x5263ea,_0x4f75f6){_0x5263ea=_0x5263ea-0x0;var _0x2cca92=_0xa75b[_0x5263ea];return _0x2cca92;};'use strict';var _=require(_0xba75('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xba75('0x1'));var rs=require(_0xba75('0x2'));var fs=require('fs');var Redis=require(_0xba75('0x3'));var db=require(_0xba75('0x4'))['db'];var utils=require(_0xba75('0x5'));var logger=require(_0xba75('0x6'))(_0xba75('0x7'));var config=require(_0xba75('0x8'));var jayson=require(_0xba75('0x9'));var client=jayson[_0xba75('0xa')][_0xba75('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x238a33,_0x3ccab5,_0x5c79e3){return new BPromise(function(_0x4b842d,_0x731cae){return client['request'](_0x238a33,_0x5c79e3)['then'](function(_0x218dbd){logger['info'](_0xba75('0xc'),_0x3ccab5,_0xba75('0xd'));logger[_0xba75('0xe')](_0xba75('0xf'),_0x3ccab5,_0xba75('0xd'),JSON[_0xba75('0x10')](_0x218dbd));if(_0x218dbd[_0xba75('0x11')]){if(_0x218dbd[_0xba75('0x11')][_0xba75('0x12')]===0x1f4){logger[_0xba75('0x11')](_0xba75('0xc'),_0x3ccab5,_0x218dbd[_0xba75('0x11')]['message']);return _0x731cae(_0x218dbd['error'][_0xba75('0x13')]);}logger['error'](_0xba75('0xc'),_0x3ccab5,_0x218dbd[_0xba75('0x11')][_0xba75('0x13')]);return _0x4b842d(_0x218dbd[_0xba75('0x11')]['message']);}else{logger[_0xba75('0x14')](_0xba75('0xc'),_0x3ccab5,_0xba75('0xd'));_0x4b842d(_0x218dbd[_0xba75('0x15')][_0xba75('0x13')]);}})['catch'](function(_0x350a9d){logger[_0xba75('0x11')](_0xba75('0xc'),_0x3ccab5,_0x350a9d);_0x731cae(_0x350a9d);});});}
\ No newline at end of file
diff --git a/server/api/mailTransferReport/index.js b/server/api/mailTransferReport/index.js
index 28277ea..41bbb80 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 _0x9e40=['../../components/auth/service','../../config/environment','./mailTransferReport.controller','get','isAuthenticated','show','create','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','Router'];(function(_0x4808a8,_0x132845){var _0x3ad33d=function(_0x148cfa){while(--_0x148cfa){_0x4808a8['push'](_0x4808a8['shift']());}};_0x3ad33d(++_0x132845);}(_0x9e40,0x199));var _0x09e4=function(_0x3c2f45,_0x2bdbe0){_0x3c2f45=_0x3c2f45-0x0;var _0x7839c7=_0x9e40[_0x3c2f45];return _0x7839c7;};'use strict';var multer=require(_0x09e4('0x0'));var util=require(_0x09e4('0x1'));var path=require(_0x09e4('0x2'));var timeout=require(_0x09e4('0x3'));var express=require('express');var router=express[_0x09e4('0x4')]();var auth=require(_0x09e4('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x09e4('0x6'));var controller=require(_0x09e4('0x7'));router[_0x09e4('0x8')]('/',auth[_0x09e4('0x9')](),controller['index']);router[_0x09e4('0x8')]('/describe',auth['isAuthenticated'](),controller['describe']);router['get']('/:id',auth[_0x09e4('0x9')](),controller[_0x09e4('0xa')]);router['post']('/',auth[_0x09e4('0x9')](),controller[_0x09e4('0xb')]);router[_0x09e4('0xc')](_0x09e4('0xd'),auth[_0x09e4('0x9')](),controller[_0x09e4('0xe')]);router[_0x09e4('0xf')]('/:id',auth[_0x09e4('0x9')](),controller[_0x09e4('0x10')]);module[_0x09e4('0x11')]=router;
\ No newline at end of file
+var _0x1de8=['destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','post','create'];(function(_0x73b866,_0x44f23b){var _0x2d6b32=function(_0x230993){while(--_0x230993){_0x73b866['push'](_0x73b866['shift']());}};_0x2d6b32(++_0x44f23b);}(_0x1de8,0x182));var _0x81de=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0x1de8[_0x311c35];return _0x5cc50c;};'use strict';var multer=require(_0x81de('0x0'));var util=require('util');var path=require(_0x81de('0x1'));var timeout=require(_0x81de('0x2'));var express=require(_0x81de('0x3'));var router=express[_0x81de('0x4')]();var auth=require(_0x81de('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x81de('0x6'));var controller=require('./mailTransferReport.controller');router[_0x81de('0x7')]('/',auth[_0x81de('0x8')](),controller['index']);router['get'](_0x81de('0x9'),auth[_0x81de('0x8')](),controller[_0x81de('0xa')]);router[_0x81de('0x7')](_0x81de('0xb'),auth[_0x81de('0x8')](),controller['show']);router[_0x81de('0xc')]('/',auth[_0x81de('0x8')](),controller[_0x81de('0xd')]);router['put'](_0x81de('0xb'),auth[_0x81de('0x8')](),controller['update']);router['delete'](_0x81de('0xb'),auth[_0x81de('0x8')](),controller[_0x81de('0xe')]);module[_0x81de('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.attributes.js b/server/api/mailTransferReport/mailTransferReport.attributes.js
index 67f54ee..8512a15 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 _0x4509=['exports','STRING','account','agent','queue','DATE','sequelize'];(function(_0x3a9661,_0x530b12){var _0x5bb119=function(_0x1278f){while(--_0x1278f){_0x3a9661['push'](_0x3a9661['shift']());}};_0x5bb119(++_0x530b12);}(_0x4509,0x18e));var _0x9450=function(_0x23738b,_0x5e039d){_0x23738b=_0x23738b-0x0;var _0x11c2a4=_0x4509[_0x23738b];return _0x11c2a4;};'use strict';var moment=require('moment');var Sequelize=require(_0x9450('0x0'));module[_0x9450('0x1')]={'uniqueid':{'type':Sequelize[_0x9450('0x2')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x9450('0x3'),_0x9450('0x4'),_0x9450('0x5')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize[_0x9450('0x6')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
+var _0xfc11=['agent','queue','NOW','moment','sequelize','exports','STRING','ENUM','account'];(function(_0xad2680,_0x46aeda){var _0x16a60b=function(_0x204606){while(--_0x204606){_0xad2680['push'](_0xad2680['shift']());}};_0x16a60b(++_0x46aeda);}(_0xfc11,0x8a));var _0x1fc1=function(_0x3a333a,_0x417b45){_0x3a333a=_0x3a333a-0x0;var _0x21f515=_0xfc11[_0x3a333a];return _0x21f515;};'use strict';var moment=require(_0x1fc1('0x0'));var Sequelize=require(_0x1fc1('0x1'));module[_0x1fc1('0x2')]={'uniqueid':{'type':Sequelize[_0x1fc1('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x1fc1('0x4')](_0x1fc1('0x5'),_0x1fc1('0x6'),_0x1fc1('0x7')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x1fc1('0x8')]}};
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.controller.js b/server/api/mailTransferReport/mailTransferReport.controller.js
index 9a8b8df..9aa090c 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 _0x9957=['eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','reject','save','then','destroy','error','stack','name','send','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','fields','attributes','pick','filter','where','merge','VIRTUAL','options','MailTransferReport','count','includeAll','include','findAll','rows','show','find','catch','create','body','update','params','describe','html-pdf'];(function(_0x235506,_0x458531){var _0x417e23=function(_0x3e57af){while(--_0x3e57af){_0x235506['push'](_0x235506['shift']());}};_0x417e23(++_0x458531);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'use strict';var pdf=require(_0x7995('0x0'));var emlformat=require(_0x7995('0x1'));var rimraf=require(_0x7995('0x2'));var zipdir=require(_0x7995('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7995('0x4'));var moment=require(_0x7995('0x5'));var BPromise=require(_0x7995('0x6'));var Mustache=require(_0x7995('0x7'));var util=require('util');var path=require(_0x7995('0x8'));var sox=require(_0x7995('0x9'));var csv=require(_0x7995('0xa'));var ejs=require(_0x7995('0xb'));var fs=require('fs');var _=require(_0x7995('0xc'));var squel=require(_0x7995('0xd'));var crypto=require('crypto');var jsforce=require(_0x7995('0xe'));var deskjs=require(_0x7995('0xf'));var toCsv=require('to-csv');var querystring=require(_0x7995('0x10'));var Papa=require(_0x7995('0x11'));var Redis=require(_0x7995('0x12'));var authService=require(_0x7995('0x13'));var qs=require(_0x7995('0x14'));var as=require(_0x7995('0x15'));var hardwareService=require(_0x7995('0x16'));var logger=require('../../config/logger')(_0x7995('0x17'));var utils=require(_0x7995('0x18'));var config=require('../../config/environment');var db=require(_0x7995('0x19'))['db'];function respondWithStatusCode(_0x2cb37a,_0x19a27e){_0x19a27e=_0x19a27e||0xcc;return function(_0x385f00){if(_0x385f00){return _0x2cb37a[_0x7995('0x1a')](_0x19a27e);}return _0x2cb37a[_0x7995('0x1b')](_0x19a27e)[_0x7995('0x1c')]();};}function respondWithResult(_0x4cc004,_0x58f5ad){_0x58f5ad=_0x58f5ad||0xc8;return function(_0x2b4e94){if(_0x2b4e94){return _0x4cc004[_0x7995('0x1b')](_0x58f5ad)[_0x7995('0x1d')](_0x2b4e94);}};}function respondWithFilteredResult(_0x321ae8,_0x3f1d3e){return function(_0x1a5310){if(_0x1a5310){var _0x2202ce=_0x1a5310['count'],_0x41cbf0=_0x3f1d3e[_0x7995('0x1e')],_0x5377e5=_0x3f1d3e[_0x7995('0x1e')]+_0x3f1d3e[_0x7995('0x1f')],_0x2eeacc;if(_0x5377e5>=_0x2202ce){_0x5377e5=_0x2202ce;_0x2eeacc=0xc8;}else{_0x2eeacc=0xce;}_0x321ae8[_0x7995('0x1b')](_0x2eeacc);return _0x321ae8[_0x7995('0x20')](_0x7995('0x21'),_0x41cbf0+'-'+_0x5377e5+'/'+_0x2202ce)['json'](_0x1a5310);}return null;};}function patchUpdates(_0x54c9ae){return function(_0x2536c8){try{jsonpatch['apply'](_0x2536c8,_0x54c9ae,!![]);}catch(_0x555f74){return BPromise[_0x7995('0x22')](_0x555f74);}return _0x2536c8[_0x7995('0x23')]();};}function saveUpdates(_0x4cbe10,_0x3a9b54){return function(_0x51f276){if(_0x51f276){return _0x51f276['update'](_0x4cbe10)[_0x7995('0x24')](function(_0x327b1f){return _0x327b1f;});}return null;};}function removeEntity(_0x350fd9,_0x1a8568){return function(_0x460924){if(_0x460924){return _0x460924[_0x7995('0x25')]()['then'](function(){_0x350fd9[_0x7995('0x1b')](0xcc)[_0x7995('0x1c')]();});}};}function handleEntityNotFound(_0x204507,_0x285437){return function(_0x563799){if(!_0x563799){_0x204507[_0x7995('0x1a')](0x194);}return _0x563799;};}function handleError(_0x475351,_0x472195){_0x472195=_0x472195||0x1f4;return function(_0x59405a){logger[_0x7995('0x26')](_0x59405a[_0x7995('0x27')]);if(_0x59405a[_0x7995('0x28')]){delete _0x59405a[_0x7995('0x28')];}_0x475351[_0x7995('0x1b')](_0x472195)[_0x7995('0x29')](_0x59405a);};}exports['index']=function(_0x47625f,_0x5911c3){var _0x229742={},_0x49bc7e={},_0xf16cc2={'count':0x0,'rows':[]};var _0x132a42=_[_0x7995('0x2a')](db['MailTransferReport'][_0x7995('0x2b')],function(_0x514445){return{'name':_0x514445[_0x7995('0x2c')],'type':_0x514445[_0x7995('0x2d')][_0x7995('0x2e')]};});_0x49bc7e['model']=_['map'](_0x132a42,'name');_0x49bc7e[_0x7995('0x2f')]=_[_0x7995('0x30')](_0x47625f[_0x7995('0x2f')]);_0x49bc7e[_0x7995('0x31')]=_[_0x7995('0x32')](_0x49bc7e[_0x7995('0x33')],_0x49bc7e['query']);_0x229742['attributes']=_[_0x7995('0x32')](_0x49bc7e['model'],qs[_0x7995('0x34')](_0x47625f[_0x7995('0x2f')][_0x7995('0x34')]));_0x229742[_0x7995('0x35')]=_0x229742[_0x7995('0x35')]['length']?_0x229742[_0x7995('0x35')]:_0x49bc7e[_0x7995('0x33')];if(!_0x47625f['query']['hasOwnProperty']('nolimit')){_0x229742[_0x7995('0x1f')]=qs[_0x7995('0x1f')](_0x47625f['query'][_0x7995('0x1f')]);_0x229742['offset']=qs[_0x7995('0x1e')](_0x47625f[_0x7995('0x2f')][_0x7995('0x1e')]);}_0x229742['order']=qs['sort'](_0x47625f[_0x7995('0x2f')]['sort']);_0x229742['where']=qs[_0x7995('0x31')](_[_0x7995('0x36')](_0x47625f['query'],_0x49bc7e[_0x7995('0x31')]));if(_0x47625f[_0x7995('0x2f')][_0x7995('0x37')]){_0x229742[_0x7995('0x38')]=_[_0x7995('0x39')](_0x229742['where'],{'$or':_[_0x7995('0x2a')](_0x132a42,function(_0x242713){if(_0x242713[_0x7995('0x2d')]!==_0x7995('0x3a')){var _0x4b1541={};_0x4b1541[_0x242713[_0x7995('0x28')]]={'$like':'%'+_0x47625f[_0x7995('0x2f')][_0x7995('0x37')]+'%'};return _0x4b1541;}})});}_0x229742=_[_0x7995('0x39')]({},_0x229742,_0x47625f[_0x7995('0x3b')]);var _0x1035dc={'where':_0x229742['where']};return db[_0x7995('0x3c')][_0x7995('0x3d')](_0x1035dc)[_0x7995('0x24')](function(_0x2ea47f){_0xf16cc2[_0x7995('0x3d')]=_0x2ea47f;if(_0x47625f[_0x7995('0x2f')][_0x7995('0x3e')]){_0x229742[_0x7995('0x3f')]=[{'all':!![]}];}return db[_0x7995('0x3c')][_0x7995('0x40')](_0x229742);})[_0x7995('0x24')](function(_0x270d52){_0xf16cc2[_0x7995('0x41')]=_0x270d52;return _0xf16cc2;})['then'](respondWithFilteredResult(_0x5911c3,_0x229742))['catch'](handleError(_0x5911c3,null));};exports[_0x7995('0x42')]=function(_0x7325e8,_0x58523e){var _0x4b0855={'raw':!![],'where':{'id':_0x7325e8['params']['id']}},_0x3f8522={};_0x3f8522['model']=_[_0x7995('0x30')](db[_0x7995('0x3c')][_0x7995('0x2b')]);_0x3f8522['query']=_[_0x7995('0x30')](_0x7325e8['query']);_0x3f8522[_0x7995('0x31')]=_['intersection'](_0x3f8522['model'],_0x3f8522[_0x7995('0x2f')]);_0x4b0855[_0x7995('0x35')]=_[_0x7995('0x32')](_0x3f8522[_0x7995('0x33')],qs['fields'](_0x7325e8[_0x7995('0x2f')][_0x7995('0x34')]));_0x4b0855[_0x7995('0x35')]=_0x4b0855[_0x7995('0x35')]['length']?_0x4b0855['attributes']:_0x3f8522[_0x7995('0x33')];if(_0x7325e8['query'][_0x7995('0x3e')]){_0x4b0855['include']=[{'all':!![]}];}_0x4b0855=_[_0x7995('0x39')]({},_0x4b0855,_0x7325e8['options']);return db[_0x7995('0x3c')][_0x7995('0x43')](_0x4b0855)['then'](handleEntityNotFound(_0x58523e,null))[_0x7995('0x24')](respondWithResult(_0x58523e,null))[_0x7995('0x44')](handleError(_0x58523e,null));};exports[_0x7995('0x45')]=function(_0xb70a51,_0x4c6837){return db[_0x7995('0x3c')][_0x7995('0x45')](_0xb70a51[_0x7995('0x46')],{})['then'](respondWithResult(_0x4c6837,0xc9))[_0x7995('0x44')](handleError(_0x4c6837,null));};exports[_0x7995('0x47')]=function(_0x511567,_0x3d8ae3){if(_0x511567[_0x7995('0x46')]['id']){delete _0x511567['body']['id'];}return db[_0x7995('0x3c')][_0x7995('0x43')]({'where':{'id':_0x511567['params']['id']}})[_0x7995('0x24')](handleEntityNotFound(_0x3d8ae3,null))['then'](saveUpdates(_0x511567[_0x7995('0x46')],null))[_0x7995('0x24')](respondWithResult(_0x3d8ae3,null))[_0x7995('0x44')](handleError(_0x3d8ae3,null));};exports[_0x7995('0x25')]=function(_0xddf537,_0x14b537){return db[_0x7995('0x3c')]['find']({'where':{'id':_0xddf537[_0x7995('0x48')]['id']}})[_0x7995('0x24')](handleEntityNotFound(_0x14b537,null))[_0x7995('0x24')](removeEntity(_0x14b537,null))['catch'](handleError(_0x14b537,null));};exports[_0x7995('0x49')]=function(_0x1fe77e,_0x12d4b8){return db['MailTransferReport']['describe']()['then'](respondWithResult(_0x12d4b8,null))[_0x7995('0x44')](handleError(_0x12d4b8,null));};
\ No newline at end of file
+var _0x7a54=['Content-Range','apply','reject','save','then','destroy','sendStatus','error','name','send','map','MailTransferReport','rawAttributes','fieldName','type','key','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','filter','where','merge','VIRTUAL','count','includeAll','findAll','rows','catch','show','params','include','options','find','create','body','update','describe','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','set'];(function(_0x3b0c1e,_0x19b87d){var _0x2af679=function(_0x13869d){while(--_0x13869d){_0x3b0c1e['push'](_0x3b0c1e['shift']());}};_0x2af679(++_0x19b87d);}(_0x7a54,0x106));var _0x47a5=function(_0x4a38e6,_0x57e658){_0x4a38e6=_0x4a38e6-0x0;var _0xeb1143=_0x7a54[_0x4a38e6];return _0xeb1143;};'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 as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var db=require(_0x47a5('0x14'))['db'];function respondWithStatusCode(_0xd612dd,_0xd308b8){_0xd308b8=_0xd308b8||0xcc;return function(_0x1eae59){if(_0x1eae59){return _0xd612dd['sendStatus'](_0xd308b8);}return _0xd612dd[_0x47a5('0x15')](_0xd308b8)[_0x47a5('0x16')]();};}function respondWithResult(_0x1cf309,_0x711793){_0x711793=_0x711793||0xc8;return function(_0x139f25){if(_0x139f25){return _0x1cf309[_0x47a5('0x15')](_0x711793)[_0x47a5('0x17')](_0x139f25);}};}function respondWithFilteredResult(_0x190faa,_0x4e99a8){return function(_0x362359){if(_0x362359){var _0x11faf5=_0x362359['count'],_0x3b001e=_0x4e99a8['offset'],_0x2a2cbb=_0x4e99a8[_0x47a5('0x18')]+_0x4e99a8['limit'],_0x1ef44c;if(_0x2a2cbb>=_0x11faf5){_0x2a2cbb=_0x11faf5;_0x1ef44c=0xc8;}else{_0x1ef44c=0xce;}_0x190faa['status'](_0x1ef44c);return _0x190faa[_0x47a5('0x19')](_0x47a5('0x1a'),_0x3b001e+'-'+_0x2a2cbb+'/'+_0x11faf5)[_0x47a5('0x17')](_0x362359);}return null;};}function patchUpdates(_0x1ef371){return function(_0x477b1d){try{jsonpatch[_0x47a5('0x1b')](_0x477b1d,_0x1ef371,!![]);}catch(_0x2763d6){return BPromise[_0x47a5('0x1c')](_0x2763d6);}return _0x477b1d[_0x47a5('0x1d')]();};}function saveUpdates(_0x4a9fcb,_0x1570bc){return function(_0xf160ba){if(_0xf160ba){return _0xf160ba['update'](_0x4a9fcb)[_0x47a5('0x1e')](function(_0x1f03f7){return _0x1f03f7;});}return null;};}function removeEntity(_0x36874d,_0x4c5910){return function(_0xb8ae6c){if(_0xb8ae6c){return _0xb8ae6c[_0x47a5('0x1f')]()[_0x47a5('0x1e')](function(){_0x36874d[_0x47a5('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0xe2dea9,_0x385687){return function(_0x513981){if(!_0x513981){_0xe2dea9[_0x47a5('0x20')](0x194);}return _0x513981;};}function handleError(_0xc4cd63,_0x4437f1){_0x4437f1=_0x4437f1||0x1f4;return function(_0x129ce5){logger[_0x47a5('0x21')](_0x129ce5['stack']);if(_0x129ce5['name']){delete _0x129ce5[_0x47a5('0x22')];}_0xc4cd63['status'](_0x4437f1)[_0x47a5('0x23')](_0x129ce5);};}exports['index']=function(_0x23cb77,_0x378208){var _0x36ad34={},_0x1dac65={},_0x21f296={'count':0x0,'rows':[]};var _0x3ba0b7=_[_0x47a5('0x24')](db[_0x47a5('0x25')][_0x47a5('0x26')],function(_0x361bfa){return{'name':_0x361bfa[_0x47a5('0x27')],'type':_0x361bfa[_0x47a5('0x28')][_0x47a5('0x29')]};});_0x1dac65['model']=_[_0x47a5('0x24')](_0x3ba0b7,'name');_0x1dac65[_0x47a5('0x2a')]=_[_0x47a5('0x2b')](_0x23cb77[_0x47a5('0x2a')]);_0x1dac65['filters']=_[_0x47a5('0x2c')](_0x1dac65[_0x47a5('0x2d')],_0x1dac65[_0x47a5('0x2a')]);_0x36ad34[_0x47a5('0x2e')]=_['intersection'](_0x1dac65['model'],qs[_0x47a5('0x2f')](_0x23cb77[_0x47a5('0x2a')]['fields']));_0x36ad34['attributes']=_0x36ad34[_0x47a5('0x2e')][_0x47a5('0x30')]?_0x36ad34['attributes']:_0x1dac65[_0x47a5('0x2d')];if(!_0x23cb77['query'][_0x47a5('0x31')](_0x47a5('0x32'))){_0x36ad34['limit']=qs['limit'](_0x23cb77[_0x47a5('0x2a')]['limit']);_0x36ad34[_0x47a5('0x18')]=qs[_0x47a5('0x18')](_0x23cb77[_0x47a5('0x2a')]['offset']);}_0x36ad34[_0x47a5('0x33')]=qs['sort'](_0x23cb77['query'][_0x47a5('0x34')]);_0x36ad34['where']=qs[_0x47a5('0x35')](_['pick'](_0x23cb77[_0x47a5('0x2a')],_0x1dac65[_0x47a5('0x35')]));if(_0x23cb77[_0x47a5('0x2a')][_0x47a5('0x36')]){_0x36ad34[_0x47a5('0x37')]=_[_0x47a5('0x38')](_0x36ad34[_0x47a5('0x37')],{'$or':_[_0x47a5('0x24')](_0x3ba0b7,function(_0x1a0d23){if(_0x1a0d23['type']!==_0x47a5('0x39')){var _0x10f136={};_0x10f136[_0x1a0d23['name']]={'$like':'%'+_0x23cb77[_0x47a5('0x2a')][_0x47a5('0x36')]+'%'};return _0x10f136;}})});}_0x36ad34=_[_0x47a5('0x38')]({},_0x36ad34,_0x23cb77['options']);var _0x101f70={'where':_0x36ad34[_0x47a5('0x37')]};return db['MailTransferReport'][_0x47a5('0x3a')](_0x101f70)[_0x47a5('0x1e')](function(_0x54ae35){_0x21f296['count']=_0x54ae35;if(_0x23cb77['query'][_0x47a5('0x3b')]){_0x36ad34['include']=[{'all':!![]}];}return db[_0x47a5('0x25')][_0x47a5('0x3c')](_0x36ad34);})[_0x47a5('0x1e')](function(_0x111f0d){_0x21f296[_0x47a5('0x3d')]=_0x111f0d;return _0x21f296;})[_0x47a5('0x1e')](respondWithFilteredResult(_0x378208,_0x36ad34))[_0x47a5('0x3e')](handleError(_0x378208,null));};exports[_0x47a5('0x3f')]=function(_0x3fa2a8,_0x36a24e){var _0x280500={'raw':!![],'where':{'id':_0x3fa2a8[_0x47a5('0x40')]['id']}},_0x1658e8={};_0x1658e8['model']=_[_0x47a5('0x2b')](db[_0x47a5('0x25')][_0x47a5('0x26')]);_0x1658e8[_0x47a5('0x2a')]=_['keys'](_0x3fa2a8[_0x47a5('0x2a')]);_0x1658e8['filters']=_['intersection'](_0x1658e8['model'],_0x1658e8['query']);_0x280500[_0x47a5('0x2e')]=_['intersection'](_0x1658e8[_0x47a5('0x2d')],qs[_0x47a5('0x2f')](_0x3fa2a8[_0x47a5('0x2a')]['fields']));_0x280500[_0x47a5('0x2e')]=_0x280500[_0x47a5('0x2e')]['length']?_0x280500['attributes']:_0x1658e8[_0x47a5('0x2d')];if(_0x3fa2a8['query'][_0x47a5('0x3b')]){_0x280500[_0x47a5('0x41')]=[{'all':!![]}];}_0x280500=_[_0x47a5('0x38')]({},_0x280500,_0x3fa2a8[_0x47a5('0x42')]);return db[_0x47a5('0x25')][_0x47a5('0x43')](_0x280500)[_0x47a5('0x1e')](handleEntityNotFound(_0x36a24e,null))[_0x47a5('0x1e')](respondWithResult(_0x36a24e,null))[_0x47a5('0x3e')](handleError(_0x36a24e,null));};exports[_0x47a5('0x44')]=function(_0x24ecb1,_0x3c3ebf){return db[_0x47a5('0x25')][_0x47a5('0x44')](_0x24ecb1[_0x47a5('0x45')],{})[_0x47a5('0x1e')](respondWithResult(_0x3c3ebf,0xc9))['catch'](handleError(_0x3c3ebf,null));};exports[_0x47a5('0x46')]=function(_0x23bb04,_0x49eab1){if(_0x23bb04['body']['id']){delete _0x23bb04[_0x47a5('0x45')]['id'];}return db['MailTransferReport'][_0x47a5('0x43')]({'where':{'id':_0x23bb04[_0x47a5('0x40')]['id']}})['then'](handleEntityNotFound(_0x49eab1,null))['then'](saveUpdates(_0x23bb04[_0x47a5('0x45')],null))['then'](respondWithResult(_0x49eab1,null))[_0x47a5('0x3e')](handleError(_0x49eab1,null));};exports[_0x47a5('0x1f')]=function(_0x3548bc,_0x3e12a7){return db[_0x47a5('0x25')][_0x47a5('0x43')]({'where':{'id':_0x3548bc[_0x47a5('0x40')]['id']}})['then'](handleEntityNotFound(_0x3e12a7,null))['then'](removeEntity(_0x3e12a7,null))[_0x47a5('0x3e')](handleError(_0x3e12a7,null));};exports[_0x47a5('0x47')]=function(_0x1163e3,_0x9ea93e){return db[_0x47a5('0x25')][_0x47a5('0x47')]()[_0x47a5('0x1e')](respondWithResult(_0x9ea93e,null))['catch'](handleError(_0x9ea93e,null));};
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.model.js b/server/api/mailTransferReport/mailTransferReport.model.js
index a2f0528..5523ef9 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 _0xe691=['path','rimraf','../../config/environment','exports','define','MailTransferReport','report_mail_transfer','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise'];(function(_0x1b5d37,_0x10c48b){var _0x2bf18f=function(_0x54c6e6){while(--_0x54c6e6){_0x1b5d37['push'](_0x1b5d37['shift']());}};_0x2bf18f(++_0x10c48b);}(_0xe691,0x120));var _0x1e69=function(_0x7791d5,_0xdab65f){_0x7791d5=_0x7791d5-0x0;var _0x5ce288=_0xe691[_0x7791d5];return _0x5ce288;};'use strict';var _=require(_0x1e69('0x0'));var util=require(_0x1e69('0x1'));var logger=require(_0x1e69('0x2'))(_0x1e69('0x3'));var moment=require('moment');var BPromise=require(_0x1e69('0x4'));var rp=require(_0x1e69('0x5'));var fs=require('fs');var path=require(_0x1e69('0x6'));var rimraf=require(_0x1e69('0x7'));var config=require(_0x1e69('0x8'));var attributes=require('./mailTransferReport.attributes');module[_0x1e69('0x9')]=function(_0x154f30,_0x3ddfe1){return _0x154f30[_0x1e69('0xa')](_0x1e69('0xb'),attributes,{'tableName':_0x1e69('0xc'),'paranoid':![],'indexes':[{'name':_0x1e69('0xd'),'fields':[_0x1e69('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x78e2=['bluebird','request-promise','path','rimraf','../../config/environment','./mailTransferReport.attributes','exports','MailTransferReport','report_mail_transfer','uniqueid','../../config/logger','api','moment'];(function(_0x3d42d8,_0x4cffaa){var _0x27fc41=function(_0x3a363b){while(--_0x3a363b){_0x3d42d8['push'](_0x3d42d8['shift']());}};_0x27fc41(++_0x4cffaa);}(_0x78e2,0x8c));var _0x278e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x78e2[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x278e('0x0'))(_0x278e('0x1'));var moment=require(_0x278e('0x2'));var BPromise=require(_0x278e('0x3'));var rp=require(_0x278e('0x4'));var fs=require('fs');var path=require(_0x278e('0x5'));var rimraf=require(_0x278e('0x6'));var config=require(_0x278e('0x7'));var attributes=require(_0x278e('0x8'));module[_0x278e('0x9')]=function(_0x40f058,_0x33a3ce){return _0x40f058['define'](_0x278e('0xa'),attributes,{'tableName':_0x278e('0xb'),'paranoid':![],'indexes':[{'name':_0x278e('0xc'),'fields':[_0x278e('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/mailTransferReport/mailTransferReport.rpc.js b/server/api/mailTransferReport/mailTransferReport.rpc.js
index f4d06b7..ed72163 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 _0x4183=['../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','MailTransferReport,\x20%s,\x20%s','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0xc272f,_0x49b2fe){var _0x1fdc03=function(_0x21798a){while(--_0x21798a){_0xc272f['push'](_0xc272f['shift']());}};_0x1fdc03(++_0x49b2fe);}(_0x4183,0x118));var _0x3418=function(_0xc74a57,_0xa1f280){_0xc74a57=_0xc74a57-0x0;var _0x540b62=_0x4183[_0xc74a57];return _0x540b62;};'use strict';var _=require(_0x3418('0x0'));var util=require(_0x3418('0x1'));var moment=require(_0x3418('0x2'));var BPromise=require(_0x3418('0x3'));var rs=require(_0x3418('0x4'));var fs=require('fs');var Redis=require(_0x3418('0x5'));var db=require(_0x3418('0x6'))['db'];var utils=require(_0x3418('0x7'));var logger=require(_0x3418('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3418('0x9'));var client=jayson[_0x3418('0xa')][_0x3418('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x54ce72,_0x2ccc39,_0x1e2f45){return new BPromise(function(_0x578741,_0x24f826){return client[_0x3418('0xc')](_0x54ce72,_0x1e2f45)['then'](function(_0x10dee6){logger['info'](_0x3418('0xd'),_0x2ccc39,'request\x20sent');logger[_0x3418('0xe')](_0x3418('0xf'),_0x2ccc39,_0x3418('0x10'),JSON['stringify'](_0x10dee6));if(_0x10dee6[_0x3418('0x11')]){if(_0x10dee6[_0x3418('0x11')][_0x3418('0x12')]===0x1f4){logger[_0x3418('0x11')](_0x3418('0xd'),_0x2ccc39,_0x10dee6['error'][_0x3418('0x13')]);return _0x24f826(_0x10dee6[_0x3418('0x11')]['message']);}logger[_0x3418('0x11')](_0x3418('0xd'),_0x2ccc39,_0x10dee6[_0x3418('0x11')][_0x3418('0x13')]);return _0x578741(_0x10dee6['error']['message']);}else{logger[_0x3418('0x14')]('MailTransferReport,\x20%s,\x20%s',_0x2ccc39,_0x3418('0x10'));_0x578741(_0x10dee6['result'][_0x3418('0x13')]);}})[_0x3418('0x15')](function(_0x30ffca){logger['error'](_0x3418('0xd'),_0x2ccc39,_0x30ffca);_0x24f826(_0x30ffca);});});}
\ No newline at end of file
+var _0x2e18=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','lodash','util','moment','randomstring','ioredis','../../mysqldb'];(function(_0x3d2b8d,_0xc6912e){var _0x466678=function(_0x3ec57c){while(--_0x3ec57c){_0x3d2b8d['push'](_0x3d2b8d['shift']());}};_0x466678(++_0xc6912e);}(_0x2e18,0x1c6));var _0x82e1=function(_0x4ff09b,_0x53f67d){_0x4ff09b=_0x4ff09b-0x0;var _0x3f5c2e=_0x2e18[_0x4ff09b];return _0x3f5c2e;};'use strict';var _=require(_0x82e1('0x0'));var util=require(_0x82e1('0x1'));var moment=require(_0x82e1('0x2'));var BPromise=require('bluebird');var rs=require(_0x82e1('0x3'));var fs=require('fs');var Redis=require(_0x82e1('0x4'));var db=require(_0x82e1('0x5'))['db'];var utils=require(_0x82e1('0x6'));var logger=require(_0x82e1('0x7'))(_0x82e1('0x8'));var config=require(_0x82e1('0x9'));var jayson=require(_0x82e1('0xa'));var client=jayson[_0x82e1('0xb')][_0x82e1('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x251c14,_0x4f8d59,_0x196382){return new BPromise(function(_0x4a5a1a,_0x5f5770){return client[_0x82e1('0xd')](_0x251c14,_0x196382)[_0x82e1('0xe')](function(_0xe8da38){logger[_0x82e1('0xf')](_0x82e1('0x10'),_0x4f8d59,_0x82e1('0x11'));logger['debug'](_0x82e1('0x12'),_0x4f8d59,'request\x20sent',JSON[_0x82e1('0x13')](_0xe8da38));if(_0xe8da38[_0x82e1('0x14')]){if(_0xe8da38[_0x82e1('0x14')][_0x82e1('0x15')]===0x1f4){logger[_0x82e1('0x14')](_0x82e1('0x10'),_0x4f8d59,_0xe8da38[_0x82e1('0x14')]['message']);return _0x5f5770(_0xe8da38[_0x82e1('0x14')][_0x82e1('0x16')]);}logger['error'](_0x82e1('0x10'),_0x4f8d59,_0xe8da38[_0x82e1('0x14')]['message']);return _0x4a5a1a(_0xe8da38['error'][_0x82e1('0x16')]);}else{logger['info'](_0x82e1('0x10'),_0x4f8d59,_0x82e1('0x11'));_0x4a5a1a(_0xe8da38['result'][_0x82e1('0x16')]);}})['catch'](function(_0x56b853){logger[_0x82e1('0x14')](_0x82e1('0x10'),_0x4f8d59,_0x56b853);_0x5f5770(_0x56b853);});});}
\ No newline at end of file
diff --git a/server/api/memberReport/index.js b/server/api/memberReport/index.js
index 8687542..66af711 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 _0xe70f=['./memberReport.controller','get','isAuthenticated','index','describe','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x75cd7e,_0x2e8d0f){var _0x2a5846=function(_0x598d9f){while(--_0x598d9f){_0x75cd7e['push'](_0x75cd7e['shift']());}};_0x2a5846(++_0x2e8d0f);}(_0xe70f,0x10b));var _0xfe70=function(_0x2ebe8b,_0x47e416){_0x2ebe8b=_0x2ebe8b-0x0;var _0x35b1a1=_0xe70f[_0x2ebe8b];return _0x35b1a1;};'use strict';var multer=require(_0xfe70('0x0'));var util=require(_0xfe70('0x1'));var path=require(_0xfe70('0x2'));var timeout=require(_0xfe70('0x3'));var express=require(_0xfe70('0x4'));var router=express[_0xfe70('0x5')]();var auth=require(_0xfe70('0x6'));var interaction=require(_0xfe70('0x7'));var config=require(_0xfe70('0x8'));var controller=require(_0xfe70('0x9'));router[_0xfe70('0xa')]('/',auth[_0xfe70('0xb')](),controller[_0xfe70('0xc')]);router[_0xfe70('0xa')]('/describe',auth[_0xfe70('0xb')](),controller[_0xfe70('0xd')]);router[_0xfe70('0xa')](_0xfe70('0xe'),auth[_0xfe70('0xb')](),controller[_0xfe70('0xf')]);router[_0xfe70('0x10')]('/',auth[_0xfe70('0xb')](),controller[_0xfe70('0x11')]);router[_0xfe70('0x12')]('/:id',auth['isAuthenticated'](),controller[_0xfe70('0x13')]);router[_0xfe70('0x14')](_0xfe70('0xe'),auth[_0xfe70('0xb')](),controller[_0xfe70('0x15')]);module[_0xfe70('0x16')]=router;
\ No newline at end of file
+var _0x27c9=['delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./memberReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','create','put','update'];(function(_0x4a747d,_0x3b747f){var _0x3a5b5c=function(_0x4b3e81){while(--_0x4b3e81){_0x4a747d['push'](_0x4a747d['shift']());}};_0x3a5b5c(++_0x3b747f);}(_0x27c9,0x1e7));var _0x927c=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x27c9[_0x2f5ac5];return _0x37c9a8;};'use strict';var multer=require(_0x927c('0x0'));var util=require(_0x927c('0x1'));var path=require(_0x927c('0x2'));var timeout=require('connect-timeout');var express=require(_0x927c('0x3'));var router=express[_0x927c('0x4')]();var auth=require(_0x927c('0x5'));var interaction=require(_0x927c('0x6'));var config=require(_0x927c('0x7'));var controller=require(_0x927c('0x8'));router[_0x927c('0x9')]('/',auth[_0x927c('0xa')](),controller[_0x927c('0xb')]);router['get'](_0x927c('0xc'),auth[_0x927c('0xa')](),controller[_0x927c('0xd')]);router[_0x927c('0x9')](_0x927c('0xe'),auth[_0x927c('0xa')](),controller[_0x927c('0xf')]);router['post']('/',auth[_0x927c('0xa')](),controller[_0x927c('0x10')]);router[_0x927c('0x11')](_0x927c('0xe'),auth[_0x927c('0xa')](),controller[_0x927c('0x12')]);router[_0x927c('0x13')](_0x927c('0xe'),auth[_0x927c('0xa')](),controller[_0x927c('0x14')]);module[_0x927c('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.attributes.js b/server/api/memberReport/memberReport.attributes.js
index aab9ce9..b093750 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 _0xd211=['talk:[destination]','talk:[dial\x20string]','talk:[queue]','moment','exports','STRING','DEFAULT\x20PAUSE','LOGIN,\x20PAUSE,\x20TALKING','INTEGER','DATE','getDataValue','enterAt','setDataValue','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[start]'];(function(_0x39e84d,_0x11931d){var _0x1991bc=function(_0xc81e32){while(--_0xc81e32){_0x39e84d['push'](_0x39e84d['shift']());}};_0x1991bc(++_0x11931d);}(_0xd211,0xd5));var _0x1d21=function(_0x3d5924,_0x574410){_0x3d5924=_0x3d5924-0x0;var _0x35a65f=_0xd211[_0x3d5924];return _0x35a65f;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x1d21('0x0'));module[_0x1d21('0x1')]={'channel':{'type':Sequelize[_0x1d21('0x2')]},'membername':{'type':Sequelize[_0x1d21('0x2')]},'interface':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x1d21('0x2')],'defaultValue':_0x1d21('0x3'),'comment':_0x1d21('0x4')},'duration':{'type':Sequelize[_0x1d21('0x5')]},'enterAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x1d21('0x6')],'set':function(_0x56c16c){var _0x50850a=moment(_0x56c16c);var _0x45e1ae=moment(this[_0x1d21('0x7')](_0x1d21('0x8')));var _0x349bc4=_0x50850a['diff'](_0x45e1ae,'seconds');this[_0x1d21('0x9')]('exitAt',_0x56c16c);this[_0x1d21('0x9')]('duration',_0x349bc4||null);}},'data1':{'type':Sequelize[_0x1d21('0x2')],'comment':_0x1d21('0xa')},'data2':{'type':Sequelize[_0x1d21('0x2')],'comment':_0x1d21('0xb')},'data3':{'type':Sequelize[_0x1d21('0x2')],'comment':_0x1d21('0xc')},'data4':{'type':Sequelize['STRING'],'comment':_0x1d21('0xd')},'data5':{'type':Sequelize[_0x1d21('0x2')],'comment':_0x1d21('0xe')},'role':{'type':Sequelize['STRING']},'internal':{'type':Sequelize[_0x1d21('0x5')]},'uniqueid':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x405c=['talk:[queue]','sequelize','moment','exports','STRING','DATE','getDataValue','enterAt','diff','setDataValue','duration','talk:[destination]','talk:[dial\x20string]'];(function(_0x307c41,_0x22d7d1){var _0xea2d0=function(_0x97cb9a){while(--_0x97cb9a){_0x307c41['push'](_0x307c41['shift']());}};_0xea2d0(++_0x22d7d1);}(_0x405c,0x187));var _0xc405=function(_0x281165,_0x47220d){_0x281165=_0x281165-0x0;var _0x4c70df=_0x405c[_0x281165];return _0x4c70df;};'use strict';var Sequelize=require(_0xc405('0x0'));var moment=require(_0xc405('0x1'));module[_0xc405('0x2')]={'channel':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0xc405('0x3')]},'interface':{'type':Sequelize[_0xc405('0x3')]},'type':{'type':Sequelize[_0xc405('0x3')],'defaultValue':'DEFAULT\x20PAUSE','comment':'LOGIN,\x20PAUSE,\x20TALKING'},'duration':{'type':Sequelize['INTEGER']},'enterAt':{'type':Sequelize[_0xc405('0x4')]},'exitAt':{'type':Sequelize['DATE'],'set':function(_0x447f9a){var _0x3b0e80=moment(_0x447f9a);var _0x5185b7=moment(this[_0xc405('0x5')](_0xc405('0x6')));var _0x39810f=_0x3b0e80[_0xc405('0x7')](_0x5185b7,'seconds');this[_0xc405('0x8')]('exitAt',_0x447f9a);this[_0xc405('0x8')](_0xc405('0x9'),_0x39810f||null);}},'data1':{'type':Sequelize[_0xc405('0x3')],'comment':'talk:[inbound,\x20outbound],\x20pause:[reason]'},'data2':{'type':Sequelize[_0xc405('0x3')],'comment':'talk:[start]'},'data3':{'type':Sequelize['STRING'],'comment':_0xc405('0xa')},'data4':{'type':Sequelize[_0xc405('0x3')],'comment':_0xc405('0xb')},'data5':{'type':Sequelize['STRING'],'comment':_0xc405('0xc')},'role':{'type':Sequelize[_0xc405('0x3')]},'internal':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize[_0xc405('0x3')]}};
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.controller.js b/server/api/memberReport/memberReport.controller.js
index f220d27..709aad2 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 _0x1eb4=['../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','set','apply','reject','save','update','then','destroy','error','stack','name','index','map','MemberReport','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','order','sort','where','filters','filter','merge','VIRTUAL','options','count','includeAll','include','rows','catch','show','params','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api'];(function(_0x1b4002,_0x5b4094){var _0x1716f3=function(_0x47cfd1){while(--_0x47cfd1){_0x1b4002['push'](_0x1b4002['shift']());}};_0x1716f3(++_0x5b4094);}(_0x1eb4,0x7c));var _0x41eb=function(_0x5e4c44,_0x51bc70){_0x5e4c44=_0x5e4c44-0x0;var _0x12041c=_0x1eb4[_0x5e4c44];return _0x12041c;};'use strict';var pdf=require(_0x41eb('0x0'));var emlformat=require(_0x41eb('0x1'));var rimraf=require(_0x41eb('0x2'));var zipdir=require(_0x41eb('0x3'));var jsonpatch=require(_0x41eb('0x4'));var rp=require(_0x41eb('0x5'));var moment=require(_0x41eb('0x6'));var BPromise=require('bluebird');var Mustache=require(_0x41eb('0x7'));var util=require('util');var path=require('path');var sox=require(_0x41eb('0x8'));var csv=require(_0x41eb('0x9'));var ejs=require(_0x41eb('0xa'));var fs=require('fs');var _=require(_0x41eb('0xb'));var squel=require(_0x41eb('0xc'));var crypto=require('crypto');var jsforce=require(_0x41eb('0xd'));var deskjs=require(_0x41eb('0xe'));var toCsv=require(_0x41eb('0x9'));var querystring=require(_0x41eb('0xf'));var Papa=require('papaparse');var Redis=require(_0x41eb('0x10'));var authService=require(_0x41eb('0x11'));var qs=require(_0x41eb('0x12'));var as=require(_0x41eb('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x41eb('0x14'))(_0x41eb('0x15'));var utils=require(_0x41eb('0x16'));var config=require('../../config/environment');var db=require(_0x41eb('0x17'))['db'];function respondWithStatusCode(_0x651cb,_0x241387){_0x241387=_0x241387||0xcc;return function(_0x3e1e7f){if(_0x3e1e7f){return _0x651cb[_0x41eb('0x18')](_0x241387);}return _0x651cb[_0x41eb('0x19')](_0x241387)[_0x41eb('0x1a')]();};}function respondWithResult(_0x59a8fa,_0x42d116){_0x42d116=_0x42d116||0xc8;return function(_0x357fc4){if(_0x357fc4){return _0x59a8fa[_0x41eb('0x19')](_0x42d116)[_0x41eb('0x1b')](_0x357fc4);}};}function respondWithFilteredResult(_0xd1ca10,_0x4370b8){return function(_0x16fa67){if(_0x16fa67){var _0x30f7c0=_0x16fa67['count'],_0x5d6f05=_0x4370b8[_0x41eb('0x1c')],_0x5e4ce4=_0x4370b8[_0x41eb('0x1c')]+_0x4370b8[_0x41eb('0x1d')],_0x3027b;if(_0x5e4ce4>=_0x30f7c0){_0x5e4ce4=_0x30f7c0;_0x3027b=0xc8;}else{_0x3027b=0xce;}_0xd1ca10['status'](_0x3027b);return _0xd1ca10[_0x41eb('0x1e')]('Content-Range',_0x5d6f05+'-'+_0x5e4ce4+'/'+_0x30f7c0)[_0x41eb('0x1b')](_0x16fa67);}return null;};}function patchUpdates(_0x112835){return function(_0x49ac93){try{jsonpatch[_0x41eb('0x1f')](_0x49ac93,_0x112835,!![]);}catch(_0x2000f5){return BPromise[_0x41eb('0x20')](_0x2000f5);}return _0x49ac93[_0x41eb('0x21')]();};}function saveUpdates(_0x79a959,_0x19f025){return function(_0x4aad40){if(_0x4aad40){return _0x4aad40[_0x41eb('0x22')](_0x79a959)[_0x41eb('0x23')](function(_0x3254e2){return _0x3254e2;});}return null;};}function removeEntity(_0x19a726,_0x4ba617){return function(_0x3fb7c7){if(_0x3fb7c7){return _0x3fb7c7[_0x41eb('0x24')]()[_0x41eb('0x23')](function(){_0x19a726['status'](0xcc)[_0x41eb('0x1a')]();});}};}function handleEntityNotFound(_0x5b7d25,_0xddfc57){return function(_0x46e643){if(!_0x46e643){_0x5b7d25[_0x41eb('0x18')](0x194);}return _0x46e643;};}function handleError(_0xb06690,_0x55d562){_0x55d562=_0x55d562||0x1f4;return function(_0x466f8a){logger[_0x41eb('0x25')](_0x466f8a[_0x41eb('0x26')]);if(_0x466f8a[_0x41eb('0x27')]){delete _0x466f8a['name'];}_0xb06690[_0x41eb('0x19')](_0x55d562)['send'](_0x466f8a);};}exports[_0x41eb('0x28')]=function(_0x4d7873,_0x566ab1){var _0x2df7f2={},_0x3314e2={},_0x2098c1={'count':0x0,'rows':[]};var _0x480209=_[_0x41eb('0x29')](db[_0x41eb('0x2a')][_0x41eb('0x2b')],function(_0x2cc29b){return{'name':_0x2cc29b[_0x41eb('0x2c')],'type':_0x2cc29b[_0x41eb('0x2d')][_0x41eb('0x2e')]};});_0x3314e2[_0x41eb('0x2f')]=_[_0x41eb('0x29')](_0x480209,_0x41eb('0x27'));_0x3314e2[_0x41eb('0x30')]=_[_0x41eb('0x31')](_0x4d7873[_0x41eb('0x30')]);_0x3314e2['filters']=_['intersection'](_0x3314e2[_0x41eb('0x2f')],_0x3314e2['query']);_0x2df7f2['attributes']=_[_0x41eb('0x32')](_0x3314e2[_0x41eb('0x2f')],qs['fields'](_0x4d7873[_0x41eb('0x30')][_0x41eb('0x33')]));_0x2df7f2[_0x41eb('0x34')]=_0x2df7f2[_0x41eb('0x34')][_0x41eb('0x35')]?_0x2df7f2[_0x41eb('0x34')]:_0x3314e2[_0x41eb('0x2f')];if(!_0x4d7873[_0x41eb('0x30')]['hasOwnProperty']('nolimit')){_0x2df7f2[_0x41eb('0x1d')]=qs[_0x41eb('0x1d')](_0x4d7873['query'][_0x41eb('0x1d')]);_0x2df7f2[_0x41eb('0x1c')]=qs[_0x41eb('0x1c')](_0x4d7873[_0x41eb('0x30')][_0x41eb('0x1c')]);}_0x2df7f2[_0x41eb('0x36')]=qs[_0x41eb('0x37')](_0x4d7873[_0x41eb('0x30')][_0x41eb('0x37')]);_0x2df7f2[_0x41eb('0x38')]=qs[_0x41eb('0x39')](_['pick'](_0x4d7873[_0x41eb('0x30')],_0x3314e2[_0x41eb('0x39')]));if(_0x4d7873[_0x41eb('0x30')][_0x41eb('0x3a')]){_0x2df7f2[_0x41eb('0x38')]=_[_0x41eb('0x3b')](_0x2df7f2['where'],{'$or':_[_0x41eb('0x29')](_0x480209,function(_0x7db28e){if(_0x7db28e['type']!==_0x41eb('0x3c')){var _0x152995={};_0x152995[_0x7db28e[_0x41eb('0x27')]]={'$like':'%'+_0x4d7873[_0x41eb('0x30')][_0x41eb('0x3a')]+'%'};return _0x152995;}})});}_0x2df7f2=_[_0x41eb('0x3b')]({},_0x2df7f2,_0x4d7873[_0x41eb('0x3d')]);var _0x5b7fa8={'where':_0x2df7f2[_0x41eb('0x38')]};return db['MemberReport'][_0x41eb('0x3e')](_0x5b7fa8)[_0x41eb('0x23')](function(_0x5b1248){_0x2098c1['count']=_0x5b1248;if(_0x4d7873[_0x41eb('0x30')][_0x41eb('0x3f')]){_0x2df7f2[_0x41eb('0x40')]=[{'all':!![]}];}return db['MemberReport']['findAll'](_0x2df7f2);})['then'](function(_0x5e35d5){_0x2098c1[_0x41eb('0x41')]=_0x5e35d5;return _0x2098c1;})[_0x41eb('0x23')](respondWithFilteredResult(_0x566ab1,_0x2df7f2))[_0x41eb('0x42')](handleError(_0x566ab1,null));};exports[_0x41eb('0x43')]=function(_0x2e0bb5,_0x2950da){var _0x4bd7dd={'raw':!![],'where':{'id':_0x2e0bb5[_0x41eb('0x44')]['id']}},_0x373bcb={};_0x373bcb[_0x41eb('0x2f')]=_[_0x41eb('0x31')](db['MemberReport']['rawAttributes']);_0x373bcb[_0x41eb('0x30')]=_['keys'](_0x2e0bb5['query']);_0x373bcb[_0x41eb('0x39')]=_['intersection'](_0x373bcb[_0x41eb('0x2f')],_0x373bcb[_0x41eb('0x30')]);_0x4bd7dd[_0x41eb('0x34')]=_[_0x41eb('0x32')](_0x373bcb['model'],qs['fields'](_0x2e0bb5['query'][_0x41eb('0x33')]));_0x4bd7dd['attributes']=_0x4bd7dd[_0x41eb('0x34')][_0x41eb('0x35')]?_0x4bd7dd['attributes']:_0x373bcb[_0x41eb('0x2f')];if(_0x2e0bb5[_0x41eb('0x30')][_0x41eb('0x3f')]){_0x4bd7dd['include']=[{'all':!![]}];}_0x4bd7dd=_[_0x41eb('0x3b')]({},_0x4bd7dd,_0x2e0bb5['options']);return db[_0x41eb('0x2a')][_0x41eb('0x45')](_0x4bd7dd)[_0x41eb('0x23')](handleEntityNotFound(_0x2950da,null))[_0x41eb('0x23')](respondWithResult(_0x2950da,null))[_0x41eb('0x42')](handleError(_0x2950da,null));};exports[_0x41eb('0x46')]=function(_0x42eaac,_0x2680b0){return db[_0x41eb('0x2a')]['create'](_0x42eaac['body'],{})['then'](respondWithResult(_0x2680b0,0xc9))[_0x41eb('0x42')](handleError(_0x2680b0,null));};exports['update']=function(_0x4d1091,_0x4da1fb){if(_0x4d1091['body']['id']){delete _0x4d1091['body']['id'];}return db['MemberReport'][_0x41eb('0x45')]({'where':{'id':_0x4d1091[_0x41eb('0x44')]['id']}})[_0x41eb('0x23')](handleEntityNotFound(_0x4da1fb,null))[_0x41eb('0x23')](saveUpdates(_0x4d1091[_0x41eb('0x47')],null))[_0x41eb('0x23')](respondWithResult(_0x4da1fb,null))['catch'](handleError(_0x4da1fb,null));};exports[_0x41eb('0x24')]=function(_0x282b9b,_0x538133){return db[_0x41eb('0x2a')][_0x41eb('0x45')]({'where':{'id':_0x282b9b[_0x41eb('0x44')]['id']}})[_0x41eb('0x23')](handleEntityNotFound(_0x538133,null))[_0x41eb('0x23')](removeEntity(_0x538133,null))[_0x41eb('0x42')](handleError(_0x538133,null));};exports['describe']=function(_0x2d673b,_0x5a74bb){return db[_0x41eb('0x2a')][_0x41eb('0x48')]()[_0x41eb('0x23')](respondWithResult(_0x5a74bb,null))[_0x41eb('0x42')](handleError(_0x5a74bb,null));};
\ No newline at end of file
+var _0x5b9c=['nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','length','find','create','body','params','describe','eml-format','rimraf','request-promise','moment','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','json','apply','reject','save','update','then','destroy','error','name','index','map','MemberReport','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty'];(function(_0x188832,_0x49101d){var _0x2b990f=function(_0x231635){while(--_0x231635){_0x188832['push'](_0x188832['shift']());}};_0x2b990f(++_0x49101d);}(_0x5b9c,0xa3));var _0xc5b9=function(_0x34ecb3,_0x458c4e){_0x34ecb3=_0x34ecb3-0x0;var _0x571db7=_0x5b9c[_0x34ecb3];return _0x571db7;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xc5b9('0x0'));var rimraf=require(_0xc5b9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xc5b9('0x2'));var moment=require(_0xc5b9('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xc5b9('0x4'));var path=require('path');var sox=require(_0xc5b9('0x5'));var csv=require(_0xc5b9('0x6'));var ejs=require(_0xc5b9('0x7'));var fs=require('fs');var _=require(_0xc5b9('0x8'));var squel=require(_0xc5b9('0x9'));var crypto=require(_0xc5b9('0xa'));var jsforce=require(_0xc5b9('0xb'));var deskjs=require(_0xc5b9('0xc'));var toCsv=require(_0xc5b9('0x6'));var querystring=require('querystring');var Papa=require(_0xc5b9('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xc5b9('0xe'));var as=require(_0xc5b9('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc5b9('0x10'))(_0xc5b9('0x11'));var utils=require(_0xc5b9('0x12'));var config=require(_0xc5b9('0x13'));var db=require(_0xc5b9('0x14'))['db'];function respondWithStatusCode(_0x33a852,_0x253f1d){_0x253f1d=_0x253f1d||0xcc;return function(_0xbb379a){if(_0xbb379a){return _0x33a852[_0xc5b9('0x15')](_0x253f1d);}return _0x33a852[_0xc5b9('0x16')](_0x253f1d)[_0xc5b9('0x17')]();};}function respondWithResult(_0x4fe83b,_0x18be77){_0x18be77=_0x18be77||0xc8;return function(_0x168f7b){if(_0x168f7b){return _0x4fe83b[_0xc5b9('0x16')](_0x18be77)['json'](_0x168f7b);}};}function respondWithFilteredResult(_0x367d98,_0x29cfbf){return function(_0xa14994){if(_0xa14994){var _0x4b2415=_0xa14994[_0xc5b9('0x18')],_0x47ccb7=_0x29cfbf[_0xc5b9('0x19')],_0x1788e2=_0x29cfbf[_0xc5b9('0x19')]+_0x29cfbf[_0xc5b9('0x1a')],_0x59f088;if(_0x1788e2>=_0x4b2415){_0x1788e2=_0x4b2415;_0x59f088=0xc8;}else{_0x59f088=0xce;}_0x367d98[_0xc5b9('0x16')](_0x59f088);return _0x367d98['set']('Content-Range',_0x47ccb7+'-'+_0x1788e2+'/'+_0x4b2415)[_0xc5b9('0x1b')](_0xa14994);}return null;};}function patchUpdates(_0x5ca4f8){return function(_0x4ef974){try{jsonpatch[_0xc5b9('0x1c')](_0x4ef974,_0x5ca4f8,!![]);}catch(_0x916512){return BPromise[_0xc5b9('0x1d')](_0x916512);}return _0x4ef974[_0xc5b9('0x1e')]();};}function saveUpdates(_0x12daa4,_0x3b192d){return function(_0x8bb669){if(_0x8bb669){return _0x8bb669[_0xc5b9('0x1f')](_0x12daa4)[_0xc5b9('0x20')](function(_0x4975b2){return _0x4975b2;});}return null;};}function removeEntity(_0x520c0b,_0x38b6ee){return function(_0x158877){if(_0x158877){return _0x158877[_0xc5b9('0x21')]()[_0xc5b9('0x20')](function(){_0x520c0b[_0xc5b9('0x16')](0xcc)[_0xc5b9('0x17')]();});}};}function handleEntityNotFound(_0x45274b,_0x481a84){return function(_0x2189d2){if(!_0x2189d2){_0x45274b[_0xc5b9('0x15')](0x194);}return _0x2189d2;};}function handleError(_0x2358b4,_0x3f24f3){_0x3f24f3=_0x3f24f3||0x1f4;return function(_0x30e2a3){logger[_0xc5b9('0x22')](_0x30e2a3['stack']);if(_0x30e2a3[_0xc5b9('0x23')]){delete _0x30e2a3[_0xc5b9('0x23')];}_0x2358b4['status'](_0x3f24f3)['send'](_0x30e2a3);};}exports[_0xc5b9('0x24')]=function(_0x185ab0,_0x264187){var _0x484d1e={},_0x32252f={},_0x19569e={'count':0x0,'rows':[]};var _0x58a1c9=_[_0xc5b9('0x25')](db[_0xc5b9('0x26')][_0xc5b9('0x27')],function(_0x3e634b){return{'name':_0x3e634b[_0xc5b9('0x28')],'type':_0x3e634b[_0xc5b9('0x29')]['key']};});_0x32252f[_0xc5b9('0x2a')]=_[_0xc5b9('0x25')](_0x58a1c9,_0xc5b9('0x23'));_0x32252f[_0xc5b9('0x2b')]=_[_0xc5b9('0x2c')](_0x185ab0[_0xc5b9('0x2b')]);_0x32252f[_0xc5b9('0x2d')]=_[_0xc5b9('0x2e')](_0x32252f[_0xc5b9('0x2a')],_0x32252f[_0xc5b9('0x2b')]);_0x484d1e[_0xc5b9('0x2f')]=_[_0xc5b9('0x2e')](_0x32252f[_0xc5b9('0x2a')],qs[_0xc5b9('0x30')](_0x185ab0[_0xc5b9('0x2b')][_0xc5b9('0x30')]));_0x484d1e[_0xc5b9('0x2f')]=_0x484d1e['attributes']['length']?_0x484d1e[_0xc5b9('0x2f')]:_0x32252f[_0xc5b9('0x2a')];if(!_0x185ab0[_0xc5b9('0x2b')][_0xc5b9('0x31')](_0xc5b9('0x32'))){_0x484d1e[_0xc5b9('0x1a')]=qs[_0xc5b9('0x1a')](_0x185ab0[_0xc5b9('0x2b')]['limit']);_0x484d1e[_0xc5b9('0x19')]=qs[_0xc5b9('0x19')](_0x185ab0[_0xc5b9('0x2b')][_0xc5b9('0x19')]);}_0x484d1e[_0xc5b9('0x33')]=qs[_0xc5b9('0x34')](_0x185ab0['query'][_0xc5b9('0x34')]);_0x484d1e['where']=qs[_0xc5b9('0x2d')](_[_0xc5b9('0x35')](_0x185ab0[_0xc5b9('0x2b')],_0x32252f[_0xc5b9('0x2d')]));if(_0x185ab0[_0xc5b9('0x2b')][_0xc5b9('0x36')]){_0x484d1e[_0xc5b9('0x37')]=_[_0xc5b9('0x38')](_0x484d1e[_0xc5b9('0x37')],{'$or':_[_0xc5b9('0x25')](_0x58a1c9,function(_0x131333){if(_0x131333['type']!==_0xc5b9('0x39')){var _0x4c62a4={};_0x4c62a4[_0x131333[_0xc5b9('0x23')]]={'$like':'%'+_0x185ab0['query'][_0xc5b9('0x36')]+'%'};return _0x4c62a4;}})});}_0x484d1e=_[_0xc5b9('0x38')]({},_0x484d1e,_0x185ab0[_0xc5b9('0x3a')]);var _0x2b5adb={'where':_0x484d1e[_0xc5b9('0x37')]};return db[_0xc5b9('0x26')]['count'](_0x2b5adb)['then'](function(_0x41faa){_0x19569e[_0xc5b9('0x18')]=_0x41faa;if(_0x185ab0[_0xc5b9('0x2b')][_0xc5b9('0x3b')]){_0x484d1e[_0xc5b9('0x3c')]=[{'all':!![]}];}return db[_0xc5b9('0x26')][_0xc5b9('0x3d')](_0x484d1e);})[_0xc5b9('0x20')](function(_0x42f342){_0x19569e[_0xc5b9('0x3e')]=_0x42f342;return _0x19569e;})[_0xc5b9('0x20')](respondWithFilteredResult(_0x264187,_0x484d1e))[_0xc5b9('0x3f')](handleError(_0x264187,null));};exports[_0xc5b9('0x40')]=function(_0x1e2082,_0x238bec){var _0x36bcc3={'raw':!![],'where':{'id':_0x1e2082['params']['id']}},_0x4715bf={};_0x4715bf[_0xc5b9('0x2a')]=_[_0xc5b9('0x2c')](db['MemberReport'][_0xc5b9('0x27')]);_0x4715bf[_0xc5b9('0x2b')]=_[_0xc5b9('0x2c')](_0x1e2082[_0xc5b9('0x2b')]);_0x4715bf[_0xc5b9('0x2d')]=_[_0xc5b9('0x2e')](_0x4715bf['model'],_0x4715bf[_0xc5b9('0x2b')]);_0x36bcc3['attributes']=_[_0xc5b9('0x2e')](_0x4715bf[_0xc5b9('0x2a')],qs[_0xc5b9('0x30')](_0x1e2082['query']['fields']));_0x36bcc3[_0xc5b9('0x2f')]=_0x36bcc3[_0xc5b9('0x2f')][_0xc5b9('0x41')]?_0x36bcc3['attributes']:_0x4715bf[_0xc5b9('0x2a')];if(_0x1e2082[_0xc5b9('0x2b')][_0xc5b9('0x3b')]){_0x36bcc3['include']=[{'all':!![]}];}_0x36bcc3=_[_0xc5b9('0x38')]({},_0x36bcc3,_0x1e2082[_0xc5b9('0x3a')]);return db['MemberReport'][_0xc5b9('0x42')](_0x36bcc3)[_0xc5b9('0x20')](handleEntityNotFound(_0x238bec,null))[_0xc5b9('0x20')](respondWithResult(_0x238bec,null))['catch'](handleError(_0x238bec,null));};exports[_0xc5b9('0x43')]=function(_0x5074a9,_0x141f4e){return db[_0xc5b9('0x26')]['create'](_0x5074a9[_0xc5b9('0x44')],{})[_0xc5b9('0x20')](respondWithResult(_0x141f4e,0xc9))[_0xc5b9('0x3f')](handleError(_0x141f4e,null));};exports[_0xc5b9('0x1f')]=function(_0x32c9ce,_0x469d80){if(_0x32c9ce[_0xc5b9('0x44')]['id']){delete _0x32c9ce['body']['id'];}return db['MemberReport'][_0xc5b9('0x42')]({'where':{'id':_0x32c9ce[_0xc5b9('0x45')]['id']}})[_0xc5b9('0x20')](handleEntityNotFound(_0x469d80,null))[_0xc5b9('0x20')](saveUpdates(_0x32c9ce[_0xc5b9('0x44')],null))[_0xc5b9('0x20')](respondWithResult(_0x469d80,null))[_0xc5b9('0x3f')](handleError(_0x469d80,null));};exports[_0xc5b9('0x21')]=function(_0x386c98,_0x349f39){return db[_0xc5b9('0x26')][_0xc5b9('0x42')]({'where':{'id':_0x386c98[_0xc5b9('0x45')]['id']}})[_0xc5b9('0x20')](handleEntityNotFound(_0x349f39,null))[_0xc5b9('0x20')](removeEntity(_0x349f39,null))[_0xc5b9('0x3f')](handleError(_0x349f39,null));};exports[_0xc5b9('0x46')]=function(_0x1e4991,_0xebe934){return db[_0xc5b9('0x26')][_0xc5b9('0x46')]()[_0xc5b9('0x20')](respondWithResult(_0xebe934,null))[_0xc5b9('0x3f')](handleError(_0xebe934,null));};
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.model.js b/server/api/memberReport/memberReport.model.js
index 70e1ebd..22148bb 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 _0x20a1=['bluebird','request-promise','rimraf','./memberReport.attributes','exports','define','membername','interface','../../config/logger','api','moment'];(function(_0x11ce46,_0x177a85){var _0x368a1e=function(_0x425454){while(--_0x425454){_0x11ce46['push'](_0x11ce46['shift']());}};_0x368a1e(++_0x177a85);}(_0x20a1,0x147));var _0x120a=function(_0x155c9b,_0x39edb1){_0x155c9b=_0x155c9b-0x0;var _0x429dc0=_0x20a1[_0x155c9b];return _0x429dc0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x120a('0x0'))(_0x120a('0x1'));var moment=require(_0x120a('0x2'));var BPromise=require(_0x120a('0x3'));var rp=require(_0x120a('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x120a('0x5'));var config=require('../../config/environment');var attributes=require(_0x120a('0x6'));module[_0x120a('0x7')]=function(_0x272220,_0x5bcd0b){return _0x272220[_0x120a('0x8')]('MemberReport',attributes,{'tableName':'report_member','paranoid':![],'indexes':[{'name':'membername_interface','fields':[_0x120a('0x9'),_0x120a('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2bab=['report_member','membername_interface','membername','interface','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','define','MemberReport'];(function(_0x41edd2,_0x589c5b){var _0x2e5f55=function(_0x4ed187){while(--_0x4ed187){_0x41edd2['push'](_0x41edd2['shift']());}};_0x2e5f55(++_0x589c5b);}(_0x2bab,0x6d));var _0xb2ba=function(_0xe70e4b,_0x37b706){_0xe70e4b=_0xe70e4b-0x0;var _0x47e28f=_0x2bab[_0xe70e4b];return _0x47e28f;};'use strict';var _=require(_0xb2ba('0x0'));var util=require(_0xb2ba('0x1'));var logger=require(_0xb2ba('0x2'))(_0xb2ba('0x3'));var moment=require(_0xb2ba('0x4'));var BPromise=require(_0xb2ba('0x5'));var rp=require(_0xb2ba('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb2ba('0x7'));var config=require(_0xb2ba('0x8'));var attributes=require('./memberReport.attributes');module['exports']=function(_0x53171c,_0xe234df){return _0x53171c[_0xb2ba('0x9')](_0xb2ba('0xa'),attributes,{'tableName':_0xb2ba('0xb'),'paranoid':![],'indexes':[{'name':_0xb2ba('0xc'),'fields':[_0xb2ba('0xd'),_0xb2ba('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/memberReport/memberReport.rpc.js b/server/api/memberReport/memberReport.rpc.js
index e4e5a99..9b6b743 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 _0x9c70=['MemberReport,\x20%s,\x20%s,\x20%s','error','message','MemberReport','options','raw','attributes','limit','map','include','model','then','GetMemberReport','stringify','CreateMemberReport','body','UpdateMemberReport','update','where','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x21deab,_0x2e7da9){var _0x4b3817=function(_0xe8b8f6){while(--_0xe8b8f6){_0x21deab['push'](_0x21deab['shift']());}};_0x4b3817(++_0x2e7da9);}(_0x9c70,0xc3));var _0x09c7=function(_0x521f06,_0x1f8e7c){_0x521f06=_0x521f06-0x0;var _0x410a40=_0x9c70[_0x521f06];return _0x410a40;};'use strict';var _=require(_0x09c7('0x0'));var util=require(_0x09c7('0x1'));var moment=require(_0x09c7('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x09c7('0x3'));var db=require(_0x09c7('0x4'))['db'];var utils=require(_0x09c7('0x5'));var logger=require('../../config/logger')(_0x09c7('0x6'));var config=require(_0x09c7('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x09c7('0x8')][_0x09c7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x54bc14,_0x1a56ba,_0x4102f7){return new BPromise(function(_0x5723bc,_0x3a86ef){return client[_0x09c7('0xa')](_0x54bc14,_0x4102f7)['then'](function(_0x4acd16){logger[_0x09c7('0xb')](_0x09c7('0xc'),_0x1a56ba,_0x09c7('0xd'));logger[_0x09c7('0xe')](_0x09c7('0xf'),_0x1a56ba,_0x09c7('0xd'),JSON['stringify'](_0x4acd16));if(_0x4acd16[_0x09c7('0x10')]){if(_0x4acd16[_0x09c7('0x10')]['code']===0x1f4){logger[_0x09c7('0x10')]('MemberReport,\x20%s,\x20%s',_0x1a56ba,_0x4acd16['error'][_0x09c7('0x11')]);return _0x3a86ef(_0x4acd16['error'][_0x09c7('0x11')]);}logger['error'](_0x09c7('0xc'),_0x1a56ba,_0x4acd16[_0x09c7('0x10')][_0x09c7('0x11')]);return _0x5723bc(_0x4acd16['error']['message']);}else{logger['info'](_0x09c7('0xc'),_0x1a56ba,'request\x20sent');_0x5723bc(_0x4acd16['result'][_0x09c7('0x11')]);}})['catch'](function(_0x2e09d7){logger[_0x09c7('0x10')](_0x09c7('0xc'),_0x1a56ba,_0x2e09d7);_0x3a86ef(_0x2e09d7);});});}exports['GetMemberReport']=function(_0x5ab9c1){var _0x1a6be7=this;return new Promise(function(_0x2e3c3b,_0x578af6){return db[_0x09c7('0x12')]['findAll']({'raw':_0x5ab9c1[_0x09c7('0x13')]?_0x5ab9c1[_0x09c7('0x13')][_0x09c7('0x14')]===undefined?!![]:![]:!![],'where':_0x5ab9c1[_0x09c7('0x13')]?_0x5ab9c1[_0x09c7('0x13')]['where']||null:null,'attributes':_0x5ab9c1[_0x09c7('0x13')]?_0x5ab9c1[_0x09c7('0x13')][_0x09c7('0x15')]||null:null,'limit':_0x5ab9c1[_0x09c7('0x13')]?_0x5ab9c1['options'][_0x09c7('0x16')]||null:null,'include':_0x5ab9c1['options']?_0x5ab9c1[_0x09c7('0x13')]['include']?_[_0x09c7('0x17')](_0x5ab9c1[_0x09c7('0x13')][_0x09c7('0x18')],function(_0x4b1092){return{'model':db[_0x4b1092[_0x09c7('0x19')]],'as':_0x4b1092['as'],'attributes':_0x4b1092[_0x09c7('0x15')],'include':_0x4b1092['include']?_[_0x09c7('0x17')](_0x4b1092[_0x09c7('0x18')],function(_0x25a73a){return{'model':db[_0x25a73a[_0x09c7('0x19')]],'as':_0x25a73a['as'],'attributes':_0x25a73a[_0x09c7('0x15')],'include':_0x25a73a[_0x09c7('0x18')]?_[_0x09c7('0x17')](_0x25a73a[_0x09c7('0x18')],function(_0x241714){return{'model':db[_0x241714[_0x09c7('0x19')]],'as':_0x241714['as'],'attributes':_0x241714[_0x09c7('0x15')]};}):[]};}):[]};}):[]:[]})[_0x09c7('0x1a')](function(_0x27ead6){logger[_0x09c7('0xb')](_0x09c7('0x1b'),_0x5ab9c1);logger[_0x09c7('0xe')]('GetMemberReport',_0x5ab9c1,JSON[_0x09c7('0x1c')](_0x27ead6));_0x2e3c3b(_0x27ead6);})['catch'](function(_0x4c8539){logger[_0x09c7('0x10')]('GetMemberReport',_0x4c8539[_0x09c7('0x11')],_0x5ab9c1);_0x578af6(_0x1a6be7[_0x09c7('0x10')](0x1f4,_0x4c8539[_0x09c7('0x11')]));});});};exports[_0x09c7('0x1d')]=function(_0x396c9b){var _0x2d0c7c=this;return new Promise(function(_0x43c1dd,_0xe279f7){return db[_0x09c7('0x12')]['create'](_0x396c9b[_0x09c7('0x1e')],{'raw':_0x396c9b[_0x09c7('0x13')]?_0x396c9b[_0x09c7('0x13')]['raw']===undefined?!![]:![]:!![]})[_0x09c7('0x1a')](function(_0x3d8527){logger[_0x09c7('0xb')]('CreateMemberReport',_0x396c9b);logger['debug']('CreateMemberReport',_0x396c9b,JSON[_0x09c7('0x1c')](_0x3d8527));_0x43c1dd(_0x3d8527);})['catch'](function(_0x8c8f7a){logger[_0x09c7('0x10')](_0x09c7('0x1d'),_0x8c8f7a[_0x09c7('0x11')],_0x396c9b);_0xe279f7(_0x2d0c7c[_0x09c7('0x10')](0x1f4,_0x8c8f7a[_0x09c7('0x11')]));});});};exports[_0x09c7('0x1f')]=function(_0x1d2a27){var _0x170430=this;return new Promise(function(_0x732c36,_0x233fd8){return db[_0x09c7('0x12')][_0x09c7('0x20')](_0x1d2a27[_0x09c7('0x1e')],{'raw':_0x1d2a27[_0x09c7('0x13')]?_0x1d2a27[_0x09c7('0x13')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1d2a27[_0x09c7('0x13')]?_0x1d2a27['options'][_0x09c7('0x21')]||null:null,'attributes':_0x1d2a27['options']?_0x1d2a27[_0x09c7('0x13')][_0x09c7('0x15')]||null:null,'limit':_0x1d2a27['options']?_0x1d2a27[_0x09c7('0x13')][_0x09c7('0x16')]||null:null})[_0x09c7('0x1a')](function(_0x490692){logger[_0x09c7('0xb')](_0x09c7('0x1f'),_0x1d2a27);logger[_0x09c7('0xe')](_0x09c7('0x1f'),_0x1d2a27,JSON[_0x09c7('0x1c')](_0x490692));_0x732c36(_0x490692);})[_0x09c7('0x22')](function(_0x31c946){logger[_0x09c7('0x10')](_0x09c7('0x1f'),_0x31c946[_0x09c7('0x11')],_0x1d2a27);_0x233fd8(_0x170430['error'](0x1f4,_0x31c946['message']));});});};
\ No newline at end of file
+var _0x7f21=['rpc','../../config/environment','jayson/promise','http','request','then','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','error','code','message','result','GetMemberReport','MemberReport','options','raw','where','limit','include','map','attributes','model','stringify','catch','CreateMemberReport','create','body','UpdateMemberReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x524768,_0x5aaaf5){var _0x306773=function(_0x55c79c){while(--_0x55c79c){_0x524768['push'](_0x524768['shift']());}};_0x306773(++_0x5aaaf5);}(_0x7f21,0x1d7));var _0x17f2=function(_0x3b2c7d,_0x5704e7){_0x3b2c7d=_0x3b2c7d-0x0;var _0x382143=_0x7f21[_0x3b2c7d];return _0x382143;};'use strict';var _=require(_0x17f2('0x0'));var util=require(_0x17f2('0x1'));var moment=require(_0x17f2('0x2'));var BPromise=require(_0x17f2('0x3'));var rs=require(_0x17f2('0x4'));var fs=require('fs');var Redis=require(_0x17f2('0x5'));var db=require(_0x17f2('0x6'))['db'];var utils=require(_0x17f2('0x7'));var logger=require(_0x17f2('0x8'))(_0x17f2('0x9'));var config=require(_0x17f2('0xa'));var jayson=require(_0x17f2('0xb'));var client=jayson['client'][_0x17f2('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x358203,_0x288939,_0x23ec35){return new BPromise(function(_0x2cc54a,_0x2a27ee){return client[_0x17f2('0xd')](_0x358203,_0x23ec35)[_0x17f2('0xe')](function(_0x131a98){logger[_0x17f2('0xf')](_0x17f2('0x10'),_0x288939,_0x17f2('0x11'));logger[_0x17f2('0x12')](_0x17f2('0x13'),_0x288939,_0x17f2('0x11'),JSON['stringify'](_0x131a98));if(_0x131a98[_0x17f2('0x14')]){if(_0x131a98[_0x17f2('0x14')][_0x17f2('0x15')]===0x1f4){logger['error'](_0x17f2('0x10'),_0x288939,_0x131a98[_0x17f2('0x14')][_0x17f2('0x16')]);return _0x2a27ee(_0x131a98[_0x17f2('0x14')][_0x17f2('0x16')]);}logger[_0x17f2('0x14')](_0x17f2('0x10'),_0x288939,_0x131a98['error'][_0x17f2('0x16')]);return _0x2cc54a(_0x131a98[_0x17f2('0x14')]['message']);}else{logger[_0x17f2('0xf')](_0x17f2('0x10'),_0x288939,'request\x20sent');_0x2cc54a(_0x131a98[_0x17f2('0x17')][_0x17f2('0x16')]);}})['catch'](function(_0x199840){logger[_0x17f2('0x14')]('MemberReport,\x20%s,\x20%s',_0x288939,_0x199840);_0x2a27ee(_0x199840);});});}exports[_0x17f2('0x18')]=function(_0x55a717){var _0x50e461=this;return new Promise(function(_0x36155e,_0x2a2a98){return db[_0x17f2('0x19')]['findAll']({'raw':_0x55a717[_0x17f2('0x1a')]?_0x55a717[_0x17f2('0x1a')][_0x17f2('0x1b')]===undefined?!![]:![]:!![],'where':_0x55a717['options']?_0x55a717[_0x17f2('0x1a')][_0x17f2('0x1c')]||null:null,'attributes':_0x55a717[_0x17f2('0x1a')]?_0x55a717[_0x17f2('0x1a')]['attributes']||null:null,'limit':_0x55a717[_0x17f2('0x1a')]?_0x55a717[_0x17f2('0x1a')][_0x17f2('0x1d')]||null:null,'include':_0x55a717[_0x17f2('0x1a')]?_0x55a717[_0x17f2('0x1a')][_0x17f2('0x1e')]?_[_0x17f2('0x1f')](_0x55a717[_0x17f2('0x1a')]['include'],function(_0x50f467){return{'model':db[_0x50f467['model']],'as':_0x50f467['as'],'attributes':_0x50f467[_0x17f2('0x20')],'include':_0x50f467[_0x17f2('0x1e')]?_[_0x17f2('0x1f')](_0x50f467[_0x17f2('0x1e')],function(_0x55da77){return{'model':db[_0x55da77[_0x17f2('0x21')]],'as':_0x55da77['as'],'attributes':_0x55da77[_0x17f2('0x20')],'include':_0x55da77[_0x17f2('0x1e')]?_[_0x17f2('0x1f')](_0x55da77['include'],function(_0x2a7bd2){return{'model':db[_0x2a7bd2['model']],'as':_0x2a7bd2['as'],'attributes':_0x2a7bd2[_0x17f2('0x20')]};}):[]};}):[]};}):[]:[]})[_0x17f2('0xe')](function(_0xc54bae){logger[_0x17f2('0xf')](_0x17f2('0x18'),_0x55a717);logger['debug']('GetMemberReport',_0x55a717,JSON[_0x17f2('0x22')](_0xc54bae));_0x36155e(_0xc54bae);})[_0x17f2('0x23')](function(_0x2de99f){logger['error']('GetMemberReport',_0x2de99f['message'],_0x55a717);_0x2a2a98(_0x50e461[_0x17f2('0x14')](0x1f4,_0x2de99f[_0x17f2('0x16')]));});});};exports[_0x17f2('0x24')]=function(_0x340b04){var _0x4eb3b5=this;return new Promise(function(_0x34bc02,_0x2f5f65){return db[_0x17f2('0x19')][_0x17f2('0x25')](_0x340b04[_0x17f2('0x26')],{'raw':_0x340b04[_0x17f2('0x1a')]?_0x340b04[_0x17f2('0x1a')][_0x17f2('0x1b')]===undefined?!![]:![]:!![]})[_0x17f2('0xe')](function(_0x1e6ed4){logger['info'](_0x17f2('0x24'),_0x340b04);logger[_0x17f2('0x12')](_0x17f2('0x24'),_0x340b04,JSON[_0x17f2('0x22')](_0x1e6ed4));_0x34bc02(_0x1e6ed4);})[_0x17f2('0x23')](function(_0x1bcf89){logger['error'](_0x17f2('0x24'),_0x1bcf89[_0x17f2('0x16')],_0x340b04);_0x2f5f65(_0x4eb3b5[_0x17f2('0x14')](0x1f4,_0x1bcf89[_0x17f2('0x16')]));});});};exports['UpdateMemberReport']=function(_0x3f06f6){var _0x2ab628=this;return new Promise(function(_0x4dc518,_0x6c43e2){return db[_0x17f2('0x19')]['update'](_0x3f06f6['body'],{'raw':_0x3f06f6[_0x17f2('0x1a')]?_0x3f06f6[_0x17f2('0x1a')][_0x17f2('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f06f6[_0x17f2('0x1a')]?_0x3f06f6[_0x17f2('0x1a')][_0x17f2('0x1c')]||null:null,'attributes':_0x3f06f6['options']?_0x3f06f6[_0x17f2('0x1a')][_0x17f2('0x20')]||null:null,'limit':_0x3f06f6[_0x17f2('0x1a')]?_0x3f06f6['options'][_0x17f2('0x1d')]||null:null})[_0x17f2('0xe')](function(_0x1caf40){logger[_0x17f2('0xf')](_0x17f2('0x27'),_0x3f06f6);logger[_0x17f2('0x12')]('UpdateMemberReport',_0x3f06f6,JSON[_0x17f2('0x22')](_0x1caf40));_0x4dc518(_0x1caf40);})[_0x17f2('0x23')](function(_0x57526a){logger['error'](_0x17f2('0x27'),_0x57526a[_0x17f2('0x16')],_0x3f06f6);_0x6c43e2(_0x2ab628[_0x17f2('0x14')](0x1f4,_0x57526a[_0x17f2('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/migration/index.js b/server/api/migration/index.js
index 61a77ee..2977dd4 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 _0x6e6c=['./migration.controller','index','exports','multer','util','connect-timeout','express','../../components/interaction/service'];(function(_0x531a19,_0x43e019){var _0x4845d2=function(_0x4c9b62){while(--_0x4c9b62){_0x531a19['push'](_0x531a19['shift']());}};_0x4845d2(++_0x43e019);}(_0x6e6c,0xc3));var _0xc6e6=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x6e6c[_0x2dafbe];return _0x58a45a;};'use strict';var multer=require(_0xc6e6('0x0'));var util=require(_0xc6e6('0x1'));var path=require('path');var timeout=require(_0xc6e6('0x2'));var express=require(_0xc6e6('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0xc6e6('0x4'));var config=require('../../config/environment');var controller=require(_0xc6e6('0x5'));router['get']('/',controller[_0xc6e6('0x6')]);module[_0xc6e6('0x7')]=router;
\ No newline at end of file
+var _0x02ce=['util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./migration.controller','get','index','exports','multer'];(function(_0x28a482,_0x16363b){var _0x31fd07=function(_0x272f9f){while(--_0x272f9f){_0x28a482['push'](_0x28a482['shift']());}};_0x31fd07(++_0x16363b);}(_0x02ce,0x1ac));var _0xe02c=function(_0x776c0f,_0x5f5a9a){_0x776c0f=_0x776c0f-0x0;var _0x3e6caa=_0x02ce[_0x776c0f];return _0x3e6caa;};'use strict';var multer=require(_0xe02c('0x0'));var util=require(_0xe02c('0x1'));var path=require(_0xe02c('0x2'));var timeout=require('connect-timeout');var express=require(_0xe02c('0x3'));var router=express['Router']();var auth=require(_0xe02c('0x4'));var interaction=require(_0xe02c('0x5'));var config=require(_0xe02c('0x6'));var controller=require(_0xe02c('0x7'));router[_0xe02c('0x8')]('/',controller[_0xe02c('0x9')]);module[_0xe02c('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 efb82b2..4fa1edb 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 _0x9330=['sequelize','version'];(function(_0x481274,_0x2674c1){var _0x4d4f35=function(_0x28d305){while(--_0x28d305){_0x481274['push'](_0x481274['shift']());}};_0x4d4f35(++_0x2674c1);}(_0x9330,0x14a));var _0x0933=function(_0x2da3f7,_0x8b6f0){_0x2da3f7=_0x2da3f7-0x0;var _0x28633f=_0x9330[_0x2da3f7];return _0x28633f;};'use strict';var Sequelize=require(_0x0933('0x0'));module['exports']={'version':{'type':Sequelize['STRING'],'unique':_0x0933('0x1')}};
\ No newline at end of file
+var _0x2381=['version','exports','STRING'];(function(_0x1e2112,_0x2b2e6c){var _0x492d2d=function(_0x457b10){while(--_0x457b10){_0x1e2112['push'](_0x1e2112['shift']());}};_0x492d2d(++_0x2b2e6c);}(_0x2381,0xcd));var _0x1238=function(_0xae7c2f,_0xf31e04){_0xae7c2f=_0xae7c2f-0x0;var _0x5d7001=_0x2381[_0xae7c2f];return _0x5d7001;};'use strict';var Sequelize=require('sequelize');module[_0x1238('0x0')]={'version':{'type':Sequelize[_0x1238('0x1')],'unique':_0x1238('0x2')}};
\ No newline at end of file
diff --git a/server/api/migration/migration.controller.js b/server/api/migration/migration.controller.js
index 8fc2e08..18ce3b6 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 _0x5f2f=['desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../mysqldb','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','end','error','stack','name','send','index','map','fieldName','type','query','keys','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','Migration','then','include','rows','catch','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','lodash','squel','jsforce'];(function(_0x34fded,_0x5183d0){var _0x279283=function(_0x323541){while(--_0x323541){_0x34fded['push'](_0x34fded['shift']());}};_0x279283(++_0x5183d0);}(_0x5f2f,0x73));var _0xf5f2=function(_0x4c1736,_0x2e3450){_0x4c1736=_0x4c1736-0x0;var _0x12543a=_0x5f2f[_0x4c1736];return _0x12543a;};'use strict';var pdf=require(_0xf5f2('0x0'));var emlformat=require(_0xf5f2('0x1'));var rimraf=require(_0xf5f2('0x2'));var zipdir=require(_0xf5f2('0x3'));var jsonpatch=require(_0xf5f2('0x4'));var rp=require(_0xf5f2('0x5'));var moment=require(_0xf5f2('0x6'));var BPromise=require(_0xf5f2('0x7'));var Mustache=require('mustache');var util=require('util');var path=require(_0xf5f2('0x8'));var sox=require(_0xf5f2('0x9'));var csv=require(_0xf5f2('0xa'));var ejs=require(_0xf5f2('0xb'));var fs=require('fs');var _=require(_0xf5f2('0xc'));var squel=require(_0xf5f2('0xd'));var crypto=require('crypto');var jsforce=require(_0xf5f2('0xe'));var deskjs=require(_0xf5f2('0xf'));var toCsv=require(_0xf5f2('0xa'));var querystring=require('querystring');var Papa=require(_0xf5f2('0x10'));var Redis=require(_0xf5f2('0x11'));var authService=require(_0xf5f2('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xf5f2('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xf5f2('0x14'));var utils=require(_0xf5f2('0x15'));var config=require('../../config/environment');var db=require(_0xf5f2('0x16'))['db'];function respondWithStatusCode(_0x14b51f,_0x331482){_0x331482=_0x331482||0xcc;return function(_0x3f2997){if(_0x3f2997){return _0x14b51f[_0xf5f2('0x17')](_0x331482);}return _0x14b51f[_0xf5f2('0x18')](_0x331482)['end']();};}function respondWithResult(_0x5850f4,_0xea612c){_0xea612c=_0xea612c||0xc8;return function(_0x269909){if(_0x269909){return _0x5850f4[_0xf5f2('0x18')](_0xea612c)[_0xf5f2('0x19')](_0x269909);}};}function respondWithFilteredResult(_0x4d97fc,_0xafe430){return function(_0x286197){if(_0x286197){var _0x17d656=_0x286197[_0xf5f2('0x1a')],_0x1b6dd2=_0xafe430[_0xf5f2('0x1b')],_0x23e23a=_0xafe430[_0xf5f2('0x1b')]+_0xafe430[_0xf5f2('0x1c')],_0x3a9dbb;if(_0x23e23a>=_0x17d656){_0x23e23a=_0x17d656;_0x3a9dbb=0xc8;}else{_0x3a9dbb=0xce;}_0x4d97fc[_0xf5f2('0x18')](_0x3a9dbb);return _0x4d97fc[_0xf5f2('0x1d')](_0xf5f2('0x1e'),_0x1b6dd2+'-'+_0x23e23a+'/'+_0x17d656)[_0xf5f2('0x19')](_0x286197);}return null;};}function patchUpdates(_0x3cf5ea){return function(_0x626999){try{jsonpatch[_0xf5f2('0x1f')](_0x626999,_0x3cf5ea,!![]);}catch(_0x56acc5){return BPromise[_0xf5f2('0x20')](_0x56acc5);}return _0x626999[_0xf5f2('0x21')]();};}function saveUpdates(_0x49dac2,_0x47acfc){return function(_0x2d2805){if(_0x2d2805){return _0x2d2805[_0xf5f2('0x22')](_0x49dac2)['then'](function(_0x45b74f){return _0x45b74f;});}return null;};}function removeEntity(_0x170042,_0x39e44a){return function(_0x39c024){if(_0x39c024){return _0x39c024[_0xf5f2('0x23')]()['then'](function(){_0x170042[_0xf5f2('0x18')](0xcc)[_0xf5f2('0x24')]();});}};}function handleEntityNotFound(_0x4e8bda,_0x2833fe){return function(_0x287ad5){if(!_0x287ad5){_0x4e8bda['sendStatus'](0x194);}return _0x287ad5;};}function handleError(_0x529f07,_0x5f1124){_0x5f1124=_0x5f1124||0x1f4;return function(_0x3f79d5){logger[_0xf5f2('0x25')](_0x3f79d5[_0xf5f2('0x26')]);if(_0x3f79d5[_0xf5f2('0x27')]){delete _0x3f79d5[_0xf5f2('0x27')];}_0x529f07[_0xf5f2('0x18')](_0x5f1124)[_0xf5f2('0x28')](_0x3f79d5);};}exports[_0xf5f2('0x29')]=function(_0x4ab014,_0xaa2602){var _0x102449={},_0x375ca8={},_0x31bfcb={'count':0x0,'rows':[]};var _0x198c73=_[_0xf5f2('0x2a')](db['Migration']['rawAttributes'],function(_0x22c826){return{'name':_0x22c826[_0xf5f2('0x2b')],'type':_0x22c826[_0xf5f2('0x2c')]['key']};});_0x375ca8['model']=_[_0xf5f2('0x2a')](_0x198c73,_0xf5f2('0x27'));_0x375ca8[_0xf5f2('0x2d')]=_[_0xf5f2('0x2e')](_0x4ab014[_0xf5f2('0x2d')]);_0x375ca8['filters']=_['intersection'](_0x375ca8[_0xf5f2('0x2f')],_0x375ca8['query']);_0x102449[_0xf5f2('0x30')]=_['intersection'](_0x375ca8[_0xf5f2('0x2f')],qs[_0xf5f2('0x31')](_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x31')]));_0x102449[_0xf5f2('0x30')]=_0x102449[_0xf5f2('0x30')][_0xf5f2('0x32')]?_0x102449[_0xf5f2('0x30')]:_0x375ca8['model'];if(!_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x33')](_0xf5f2('0x34'))){_0x102449[_0xf5f2('0x1c')]=qs[_0xf5f2('0x1c')](_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x1c')]);_0x102449['offset']=qs[_0xf5f2('0x1b')](_0x4ab014[_0xf5f2('0x2d')]['offset']);}_0x102449[_0xf5f2('0x35')]=qs['sort'](_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x36')]);_0x102449[_0xf5f2('0x37')]=qs[_0xf5f2('0x38')](_['pick'](_0x4ab014['query'],_0x375ca8[_0xf5f2('0x38')]));if(_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x39')]){_0x102449['where']=_[_0xf5f2('0x3a')](_0x102449['where'],{'$or':_[_0xf5f2('0x2a')](_0x198c73,function(_0x566c47){if(_0x566c47[_0xf5f2('0x2c')]!==_0xf5f2('0x3b')){var _0x5337a6={};_0x5337a6[_0x566c47[_0xf5f2('0x27')]]={'$like':'%'+_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x39')]+'%'};return _0x5337a6;}})});}_0x102449=_[_0xf5f2('0x3a')]({},_0x102449,_0x4ab014['options']);var _0x5d2d82={'where':_0x102449[_0xf5f2('0x37')]};return db[_0xf5f2('0x3c')][_0xf5f2('0x1a')](_0x5d2d82)[_0xf5f2('0x3d')](function(_0x2c7f65){_0x31bfcb[_0xf5f2('0x1a')]=_0x2c7f65;if(_0x4ab014[_0xf5f2('0x2d')]['includeAll']){_0x102449[_0xf5f2('0x3e')]=[{'all':!![]}];}return db[_0xf5f2('0x3c')]['findAll'](_0x102449);})[_0xf5f2('0x3d')](function(_0x3f3895){_0x31bfcb[_0xf5f2('0x3f')]=_0x3f3895;return _0x31bfcb;})[_0xf5f2('0x3d')](respondWithFilteredResult(_0xaa2602,_0x102449))[_0xf5f2('0x40')](handleError(_0xaa2602,null));};
\ No newline at end of file
+var _0x5f2f=['desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../mysqldb','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','destroy','end','error','stack','name','send','index','map','fieldName','type','query','keys','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','Migration','then','include','rows','catch','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','lodash','squel','jsforce'];(function(_0x2f7eaf,_0x1847f7){var _0x165904=function(_0x2afcf6){while(--_0x2afcf6){_0x2f7eaf['push'](_0x2f7eaf['shift']());}};_0x165904(++_0x1847f7);}(_0x5f2f,0x73));var _0xf5f2=function(_0x15dbd4,_0x42be0d){_0x15dbd4=_0x15dbd4-0x0;var _0x4ecafc=_0x5f2f[_0x15dbd4];return _0x4ecafc;};'use strict';var pdf=require(_0xf5f2('0x0'));var emlformat=require(_0xf5f2('0x1'));var rimraf=require(_0xf5f2('0x2'));var zipdir=require(_0xf5f2('0x3'));var jsonpatch=require(_0xf5f2('0x4'));var rp=require(_0xf5f2('0x5'));var moment=require(_0xf5f2('0x6'));var BPromise=require(_0xf5f2('0x7'));var Mustache=require('mustache');var util=require('util');var path=require(_0xf5f2('0x8'));var sox=require(_0xf5f2('0x9'));var csv=require(_0xf5f2('0xa'));var ejs=require(_0xf5f2('0xb'));var fs=require('fs');var _=require(_0xf5f2('0xc'));var squel=require(_0xf5f2('0xd'));var crypto=require('crypto');var jsforce=require(_0xf5f2('0xe'));var deskjs=require(_0xf5f2('0xf'));var toCsv=require(_0xf5f2('0xa'));var querystring=require('querystring');var Papa=require(_0xf5f2('0x10'));var Redis=require(_0xf5f2('0x11'));var authService=require(_0xf5f2('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xf5f2('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xf5f2('0x14'));var utils=require(_0xf5f2('0x15'));var config=require('../../config/environment');var db=require(_0xf5f2('0x16'))['db'];function respondWithStatusCode(_0x14b51f,_0x331482){_0x331482=_0x331482||0xcc;return function(_0x3f2997){if(_0x3f2997){return _0x14b51f[_0xf5f2('0x17')](_0x331482);}return _0x14b51f[_0xf5f2('0x18')](_0x331482)['end']();};}function respondWithResult(_0x5850f4,_0xea612c){_0xea612c=_0xea612c||0xc8;return function(_0x269909){if(_0x269909){return _0x5850f4[_0xf5f2('0x18')](_0xea612c)[_0xf5f2('0x19')](_0x269909);}};}function respondWithFilteredResult(_0x4d97fc,_0xafe430){return function(_0x286197){if(_0x286197){var _0x17d656=_0x286197[_0xf5f2('0x1a')],_0x1b6dd2=_0xafe430[_0xf5f2('0x1b')],_0x23e23a=_0xafe430[_0xf5f2('0x1b')]+_0xafe430[_0xf5f2('0x1c')],_0x3a9dbb;if(_0x23e23a>=_0x17d656){_0x23e23a=_0x17d656;_0x3a9dbb=0xc8;}else{_0x3a9dbb=0xce;}_0x4d97fc[_0xf5f2('0x18')](_0x3a9dbb);return _0x4d97fc[_0xf5f2('0x1d')](_0xf5f2('0x1e'),_0x1b6dd2+'-'+_0x23e23a+'/'+_0x17d656)[_0xf5f2('0x19')](_0x286197);}return null;};}function patchUpdates(_0x3cf5ea){return function(_0x626999){try{jsonpatch[_0xf5f2('0x1f')](_0x626999,_0x3cf5ea,!![]);}catch(_0x56acc5){return BPromise[_0xf5f2('0x20')](_0x56acc5);}return _0x626999[_0xf5f2('0x21')]();};}function saveUpdates(_0x49dac2,_0x47acfc){return function(_0x2d2805){if(_0x2d2805){return _0x2d2805[_0xf5f2('0x22')](_0x49dac2)['then'](function(_0x45b74f){return _0x45b74f;});}return null;};}function removeEntity(_0x170042,_0x39e44a){return function(_0x39c024){if(_0x39c024){return _0x39c024[_0xf5f2('0x23')]()['then'](function(){_0x170042[_0xf5f2('0x18')](0xcc)[_0xf5f2('0x24')]();});}};}function handleEntityNotFound(_0x4e8bda,_0x2833fe){return function(_0x287ad5){if(!_0x287ad5){_0x4e8bda['sendStatus'](0x194);}return _0x287ad5;};}function handleError(_0x529f07,_0x5f1124){_0x5f1124=_0x5f1124||0x1f4;return function(_0x3f79d5){logger[_0xf5f2('0x25')](_0x3f79d5[_0xf5f2('0x26')]);if(_0x3f79d5[_0xf5f2('0x27')]){delete _0x3f79d5[_0xf5f2('0x27')];}_0x529f07[_0xf5f2('0x18')](_0x5f1124)[_0xf5f2('0x28')](_0x3f79d5);};}exports[_0xf5f2('0x29')]=function(_0x4ab014,_0xaa2602){var _0x102449={},_0x375ca8={},_0x31bfcb={'count':0x0,'rows':[]};var _0x198c73=_[_0xf5f2('0x2a')](db['Migration']['rawAttributes'],function(_0x22c826){return{'name':_0x22c826[_0xf5f2('0x2b')],'type':_0x22c826[_0xf5f2('0x2c')]['key']};});_0x375ca8['model']=_[_0xf5f2('0x2a')](_0x198c73,_0xf5f2('0x27'));_0x375ca8[_0xf5f2('0x2d')]=_[_0xf5f2('0x2e')](_0x4ab014[_0xf5f2('0x2d')]);_0x375ca8['filters']=_['intersection'](_0x375ca8[_0xf5f2('0x2f')],_0x375ca8['query']);_0x102449[_0xf5f2('0x30')]=_['intersection'](_0x375ca8[_0xf5f2('0x2f')],qs[_0xf5f2('0x31')](_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x31')]));_0x102449[_0xf5f2('0x30')]=_0x102449[_0xf5f2('0x30')][_0xf5f2('0x32')]?_0x102449[_0xf5f2('0x30')]:_0x375ca8['model'];if(!_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x33')](_0xf5f2('0x34'))){_0x102449[_0xf5f2('0x1c')]=qs[_0xf5f2('0x1c')](_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x1c')]);_0x102449['offset']=qs[_0xf5f2('0x1b')](_0x4ab014[_0xf5f2('0x2d')]['offset']);}_0x102449[_0xf5f2('0x35')]=qs['sort'](_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x36')]);_0x102449[_0xf5f2('0x37')]=qs[_0xf5f2('0x38')](_['pick'](_0x4ab014['query'],_0x375ca8[_0xf5f2('0x38')]));if(_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x39')]){_0x102449['where']=_[_0xf5f2('0x3a')](_0x102449['where'],{'$or':_[_0xf5f2('0x2a')](_0x198c73,function(_0x566c47){if(_0x566c47[_0xf5f2('0x2c')]!==_0xf5f2('0x3b')){var _0x5337a6={};_0x5337a6[_0x566c47[_0xf5f2('0x27')]]={'$like':'%'+_0x4ab014[_0xf5f2('0x2d')][_0xf5f2('0x39')]+'%'};return _0x5337a6;}})});}_0x102449=_[_0xf5f2('0x3a')]({},_0x102449,_0x4ab014['options']);var _0x5d2d82={'where':_0x102449[_0xf5f2('0x37')]};return db[_0xf5f2('0x3c')][_0xf5f2('0x1a')](_0x5d2d82)[_0xf5f2('0x3d')](function(_0x2c7f65){_0x31bfcb[_0xf5f2('0x1a')]=_0x2c7f65;if(_0x4ab014[_0xf5f2('0x2d')]['includeAll']){_0x102449[_0xf5f2('0x3e')]=[{'all':!![]}];}return db[_0xf5f2('0x3c')]['findAll'](_0x102449);})[_0xf5f2('0x3d')](function(_0x3f3895){_0x31bfcb[_0xf5f2('0x3f')]=_0x3f3895;return _0x31bfcb;})[_0xf5f2('0x3d')](respondWithFilteredResult(_0xaa2602,_0x102449))[_0xf5f2('0x40')](handleError(_0xaa2602,null));};
\ No newline at end of file
diff --git a/server/api/migration/migration.model.js b/server/api/migration/migration.model.js
index 6995c6e..aaed71a 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 _0x7b29=['path','rimraf','./migration.attributes','exports','define','migrations','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x153e99,_0x1bb4dc){var _0xbe6dc3=function(_0x399d11){while(--_0x399d11){_0x153e99['push'](_0x153e99['shift']());}};_0xbe6dc3(++_0x1bb4dc);}(_0x7b29,0x7f));var _0x97b2=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x7b29[_0x502c7d];return _0x30b7ed;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x97b2('0x0'))(_0x97b2('0x1'));var moment=require(_0x97b2('0x2'));var BPromise=require(_0x97b2('0x3'));var rp=require(_0x97b2('0x4'));var fs=require('fs');var path=require(_0x97b2('0x5'));var rimraf=require(_0x97b2('0x6'));var config=require('../../config/environment');var attributes=require(_0x97b2('0x7'));module[_0x97b2('0x8')]=function(_0x4b5a15,_0x3f96d5){return _0x4b5a15[_0x97b2('0x9')]('Migration',attributes,{'tableName':_0x97b2('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbfa4=['./migration.attributes','exports','Migration','lodash','util','api','moment','request-promise','path','rimraf'];(function(_0x5f363e,_0x5c29e8){var _0x263a9f=function(_0x5eec9a){while(--_0x5eec9a){_0x5f363e['push'](_0x5f363e['shift']());}};_0x263a9f(++_0x5c29e8);}(_0xbfa4,0xf3));var _0x4bfa=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xbfa4[_0x8de54f];return _0x14cba4;};'use strict';var _=require(_0x4bfa('0x0'));var util=require(_0x4bfa('0x1'));var logger=require('../../config/logger')(_0x4bfa('0x2'));var moment=require(_0x4bfa('0x3'));var BPromise=require('bluebird');var rp=require(_0x4bfa('0x4'));var fs=require('fs');var path=require(_0x4bfa('0x5'));var rimraf=require(_0x4bfa('0x6'));var config=require('../../config/environment');var attributes=require(_0x4bfa('0x7'));module[_0x4bfa('0x8')]=function(_0x26f404,_0x2775f7){return _0x26f404['define'](_0x4bfa('0x9'),attributes,{'tableName':'migrations','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 d1f0cab..1e1da87 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 _0x275c=['../../config/logger','../../config/environment','client','http','info','Migration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0x275c,0x70));var _0xc275=function(_0x426272,_0x14aa29){_0x426272=_0x426272-0x0;var _0x214d6a=_0x275c[_0x426272];return _0x214d6a;};'use strict';var _=require(_0xc275('0x0'));var util=require(_0xc275('0x1'));var moment=require(_0xc275('0x2'));var BPromise=require(_0xc275('0x3'));var rs=require(_0xc275('0x4'));var fs=require('fs');var Redis=require(_0xc275('0x5'));var db=require(_0xc275('0x6'))['db'];var utils=require(_0xc275('0x7'));var logger=require(_0xc275('0x8'))('rpc');var config=require(_0xc275('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xc275('0xa')][_0xc275('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4cc29b,_0x25a21e,_0x91ff9d){return new BPromise(function(_0x16a30f,_0x558eb5){return client['request'](_0x4cc29b,_0x91ff9d)['then'](function(_0x604bea){logger[_0xc275('0xc')](_0xc275('0xd'),_0x25a21e,_0xc275('0xe'));logger[_0xc275('0xf')]('Migration,\x20%s,\x20%s,\x20%s',_0x25a21e,_0xc275('0xe'),JSON[_0xc275('0x10')](_0x604bea));if(_0x604bea['error']){if(_0x604bea[_0xc275('0x11')][_0xc275('0x12')]===0x1f4){logger[_0xc275('0x11')](_0xc275('0xd'),_0x25a21e,_0x604bea['error'][_0xc275('0x13')]);return _0x558eb5(_0x604bea['error']['message']);}logger[_0xc275('0x11')](_0xc275('0xd'),_0x25a21e,_0x604bea[_0xc275('0x11')][_0xc275('0x13')]);return _0x16a30f(_0x604bea[_0xc275('0x11')][_0xc275('0x13')]);}else{logger['info'](_0xc275('0xd'),_0x25a21e,'request\x20sent');_0x16a30f(_0x604bea['result'][_0xc275('0x13')]);}})['catch'](function(_0x1e856a){logger[_0xc275('0x11')](_0xc275('0xd'),_0x25a21e,_0x1e856a);_0x558eb5(_0x1e856a);});});}
\ No newline at end of file
+var _0xcfaa=['lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','Migration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch'];(function(_0x17eda4,_0x361e23){var _0x3036d5=function(_0x3a05b2){while(--_0x3a05b2){_0x17eda4['push'](_0x17eda4['shift']());}};_0x3036d5(++_0x361e23);}(_0xcfaa,0xdc));var _0xacfa=function(_0x1447c5,_0x5ed413){_0x1447c5=_0x1447c5-0x0;var _0x393a79=_0xcfaa[_0x1447c5];return _0x393a79;};'use strict';var _=require(_0xacfa('0x0'));var util=require(_0xacfa('0x1'));var moment=require(_0xacfa('0x2'));var BPromise=require(_0xacfa('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xacfa('0x4'));var db=require(_0xacfa('0x5'))['db'];var utils=require(_0xacfa('0x6'));var logger=require('../../config/logger')(_0xacfa('0x7'));var config=require(_0xacfa('0x8'));var jayson=require(_0xacfa('0x9'));var client=jayson[_0xacfa('0xa')][_0xacfa('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x54ba21,_0x5d33c7,_0x12ba2a){return new BPromise(function(_0x539857,_0x4eaf0e){return client[_0xacfa('0xc')](_0x54ba21,_0x12ba2a)['then'](function(_0x25276a){logger['info'](_0xacfa('0xd'),_0x5d33c7,_0xacfa('0xe'));logger[_0xacfa('0xf')]('Migration,\x20%s,\x20%s,\x20%s',_0x5d33c7,_0xacfa('0xe'),JSON[_0xacfa('0x10')](_0x25276a));if(_0x25276a[_0xacfa('0x11')]){if(_0x25276a[_0xacfa('0x11')][_0xacfa('0x12')]===0x1f4){logger[_0xacfa('0x11')](_0xacfa('0xd'),_0x5d33c7,_0x25276a['error'][_0xacfa('0x13')]);return _0x4eaf0e(_0x25276a[_0xacfa('0x11')][_0xacfa('0x13')]);}logger[_0xacfa('0x11')]('Migration,\x20%s,\x20%s',_0x5d33c7,_0x25276a[_0xacfa('0x11')]['message']);return _0x539857(_0x25276a[_0xacfa('0x11')][_0xacfa('0x13')]);}else{logger[_0xacfa('0x14')](_0xacfa('0xd'),_0x5d33c7,'request\x20sent');_0x539857(_0x25276a['result'][_0xacfa('0x13')]);}})[_0xacfa('0x15')](function(_0x50a804){logger[_0xacfa('0x11')]('Migration,\x20%s,\x20%s',_0x5d33c7,_0x50a804);_0x4eaf0e(_0x50a804);});});}
\ No newline at end of file
diff --git a/server/api/network/index.js b/server/api/network/index.js
index b92eb94..99a81fb 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 _0x1218=['../../components/interaction/service','./network.controller','get','index','/:id','isAuthenticated','show','post','create','put','delete','destroy','exports','multer','path','express','Router','../../components/auth/service'];(function(_0x3806e6,_0x2f55d1){var _0x43aea8=function(_0x3c9928){while(--_0x3c9928){_0x3806e6['push'](_0x3806e6['shift']());}};_0x43aea8(++_0x2f55d1);}(_0x1218,0x151));var _0x8121=function(_0x299603,_0x55f0d8){_0x299603=_0x299603-0x0;var _0xe20aed=_0x1218[_0x299603];return _0xe20aed;};'use strict';var multer=require(_0x8121('0x0'));var util=require('util');var path=require(_0x8121('0x1'));var timeout=require('connect-timeout');var express=require(_0x8121('0x2'));var router=express[_0x8121('0x3')]();var auth=require(_0x8121('0x4'));var interaction=require(_0x8121('0x5'));var config=require('../../config/environment');var controller=require(_0x8121('0x6'));router[_0x8121('0x7')]('/',auth['isAuthenticated'](),controller[_0x8121('0x8')]);router[_0x8121('0x7')](_0x8121('0x9'),auth[_0x8121('0xa')](),controller[_0x8121('0xb')]);router[_0x8121('0xc')]('/',auth[_0x8121('0xa')](),controller[_0x8121('0xd')]);router[_0x8121('0xe')](_0x8121('0x9'),auth[_0x8121('0xa')](),controller['update']);router[_0x8121('0xf')](_0x8121('0x9'),auth[_0x8121('0xa')](),controller[_0x8121('0x10')]);module[_0x8121('0x11')]=router;
\ No newline at end of file
+var _0x6717=['exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','post','create','put','/:id','delete','destroy'];(function(_0x47abd0,_0x23c009){var _0x1b66bf=function(_0x37ca4d){while(--_0x37ca4d){_0x47abd0['push'](_0x47abd0['shift']());}};_0x1b66bf(++_0x23c009);}(_0x6717,0x1a1));var _0x7671=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6717[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x7671('0x0'));var path=require('path');var timeout=require(_0x7671('0x1'));var express=require(_0x7671('0x2'));var router=express[_0x7671('0x3')]();var auth=require(_0x7671('0x4'));var interaction=require(_0x7671('0x5'));var config=require('../../config/environment');var controller=require('./network.controller');router[_0x7671('0x6')]('/',auth[_0x7671('0x7')](),controller[_0x7671('0x8')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router[_0x7671('0x9')]('/',auth[_0x7671('0x7')](),controller[_0x7671('0xa')]);router[_0x7671('0xb')](_0x7671('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x7671('0xd')](_0x7671('0xc'),auth[_0x7671('0x7')](),controller[_0x7671('0xe')]);module[_0x7671('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/network/network.attributes.js b/server/api/network/network.attributes.js
index 3c0e81e..5227a76 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 _0xa9e0=['STRING','sequelize','exports','ENUM','stun'];(function(_0x3da6f6,_0x2cb607){var _0x38f44e=function(_0x2a9f1d){while(--_0x2a9f1d){_0x3da6f6['push'](_0x3da6f6['shift']());}};_0x38f44e(++_0x2cb607);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2a6809,_0x44edde){_0x2a6809=_0x2a6809-0x0;var _0x11c371=_0xa9e0[_0x2a6809];return _0x11c371;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'type':{'type':Sequelize[_0x0a9e('0x2')]('localnet','externip',_0x0a9e('0x3'),'turn')},'value':{'type':Sequelize[_0x0a9e('0x4')]},'username':{'type':Sequelize[_0x0a9e('0x4')]},'password':{'type':Sequelize[_0x0a9e('0x4')]}};
\ No newline at end of file
+var _0xa9e0=['STRING','sequelize','exports','ENUM','stun'];(function(_0x3059b6,_0x1304d8){var _0x55cfc9=function(_0x21133e){while(--_0x21133e){_0x3059b6['push'](_0x3059b6['shift']());}};_0x55cfc9(++_0x1304d8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x92c450,_0x41f1e3){_0x92c450=_0x92c450-0x0;var _0x2a9599=_0xa9e0[_0x92c450];return _0x2a9599;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'type':{'type':Sequelize[_0x0a9e('0x2')]('localnet','externip',_0x0a9e('0x3'),'turn')},'value':{'type':Sequelize[_0x0a9e('0x4')]},'username':{'type':Sequelize[_0x0a9e('0x4')]},'password':{'type':Sequelize[_0x0a9e('0x4')]}};
\ No newline at end of file
diff --git a/server/api/network/network.controller.js b/server/api/network/network.controller.js
index 893c284..298a43e 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 _0x89e8=['length','hasOwnProperty','offset','sort','where','filters','filter','merge','VIRTUAL','options','Network','includeAll','include','findAll','show','params','fields','find','create','sequelize','transaction','body','STUN','root','writeFileSync','/etc/asterisk/stun_xcally.conf','Reload','res_stun_monitor.so','toUpperCase','TURN','readFileSync','join','server/files/templates/network.ejs','render','format','/etc/asterisk/sip_xcally_%s.conf','chan_sip.so','update','server/files/templates/stun_multiple.ejs','server/files/templates/turn_multiple.ejs','utf8','/etc/asterisk/turn_xcally.conf','toLowerCase','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','jayson/promise','client','http','test','ValidationError','request','info','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','stringify','error','code','Network,\x20%s,\x20%s','message','result','catch','sendStatus','end','json','count','limit','status','set','apply','reject','then','destroy','name','send','rawAttributes','fieldName','type','key','model','map','keys','query','intersection','attributes'];(function(_0x7a112,_0x2eb4a0){var _0x136dc5=function(_0x437650){while(--_0x437650){_0x7a112['push'](_0x7a112['shift']());}};_0x136dc5(++_0x2eb4a0);}(_0x89e8,0x96));var _0x889e=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x89e8[_0xbca1b1];return _0x4e1686;};'use strict';var pdf=require(_0x889e('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x889e('0x1'));var zipdir=require(_0x889e('0x2'));var jsonpatch=require(_0x889e('0x3'));var rp=require(_0x889e('0x4'));var moment=require(_0x889e('0x5'));var BPromise=require(_0x889e('0x6'));var Mustache=require('mustache');var util=require(_0x889e('0x7'));var path=require(_0x889e('0x8'));var sox=require('sox');var csv=require(_0x889e('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x889e('0xa'));var squel=require(_0x889e('0xb'));var crypto=require(_0x889e('0xc'));var jsforce=require(_0x889e('0xd'));var deskjs=require(_0x889e('0xe'));var toCsv=require(_0x889e('0x9'));var querystring=require(_0x889e('0xf'));var Papa=require(_0x889e('0x10'));var Redis=require(_0x889e('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x889e('0x12'));var as=require(_0x889e('0x13'));var hardwareService=require(_0x889e('0x14'));var logger=require(_0x889e('0x15'))('api');var utils=require(_0x889e('0x16'));var config=require('../../config/environment');var db=require(_0x889e('0x17'))['db'];var jayson=require(_0x889e('0x18'));var client=jayson[_0x889e('0x19')][_0x889e('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x1aa08e,_0x53993f,_0x5ecceb){if(_0x5ecceb){var _0x66494c=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x66494c[_0x889e('0x1b')](_0x53993f)){return _0x1aa08e;}else{throw new db['Sequelize'][(_0x889e('0x1c'))]('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 _0x1aa08e;}}function respondWithRpcPromise(_0x17397b,_0x4868e5,_0xe53cbd,_0x3cb1eb){return new BPromise(function(_0x565ac9,_0x32cda0){var _0x51d128=_0x3cb1eb||client;return _0x51d128[_0x889e('0x1d')](_0x17397b,_0xe53cbd)['then'](function(_0x3b24b1){logger[_0x889e('0x1e')]('Network,\x20%s,\x20%s',_0x4868e5,_0x889e('0x1f'));logger[_0x889e('0x20')](_0x889e('0x21'),_0x4868e5,_0x889e('0x1f'),JSON[_0x889e('0x22')](_0x3b24b1));if(_0x3b24b1[_0x889e('0x23')]){if(_0x3b24b1[_0x889e('0x23')][_0x889e('0x24')]===0x1f4){logger['error'](_0x889e('0x25'),_0x4868e5,_0x3b24b1['error'][_0x889e('0x26')]);return _0x32cda0(_0x3b24b1[_0x889e('0x23')]['message']);}logger['error'](_0x889e('0x25'),_0x4868e5,_0x3b24b1[_0x889e('0x23')]['message']);return _0x565ac9(_0x3b24b1[_0x889e('0x23')]['message']);}else{logger[_0x889e('0x1e')](_0x889e('0x25'),_0x4868e5,_0x889e('0x1f'));_0x565ac9(_0x3b24b1[_0x889e('0x27')][_0x889e('0x26')]);}})[_0x889e('0x28')](function(_0x2b5539){logger[_0x889e('0x23')](_0x889e('0x25'),_0x4868e5,_0x2b5539);_0x32cda0(_0x2b5539);});});}function respondWithStatusCode(_0x48a5be,_0x24322b){_0x24322b=_0x24322b||0xcc;return function(_0x2609e7){if(_0x2609e7){return _0x48a5be[_0x889e('0x29')](_0x24322b);}return _0x48a5be['status'](_0x24322b)[_0x889e('0x2a')]();};}function respondWithResult(_0x4f69f3,_0xb5e193){_0xb5e193=_0xb5e193||0xc8;return function(_0x5429dc){if(_0x5429dc){return _0x4f69f3['status'](_0xb5e193)[_0x889e('0x2b')](_0x5429dc);}};}function respondWithFilteredResult(_0x2246d7,_0x2d5250){return function(_0x216507){if(_0x216507){var _0x49a58d=_0x216507[_0x889e('0x2c')],_0x53408f=_0x2d5250['offset'],_0x4ccd1f=_0x2d5250['offset']+_0x2d5250[_0x889e('0x2d')],_0x114376;if(_0x4ccd1f>=_0x49a58d){_0x4ccd1f=_0x49a58d;_0x114376=0xc8;}else{_0x114376=0xce;}_0x2246d7[_0x889e('0x2e')](_0x114376);return _0x2246d7[_0x889e('0x2f')]('Content-Range',_0x53408f+'-'+_0x4ccd1f+'/'+_0x49a58d)[_0x889e('0x2b')](_0x216507);}return null;};}function patchUpdates(_0x135f9f){return function(_0x1f2cd3){try{jsonpatch[_0x889e('0x30')](_0x1f2cd3,_0x135f9f,!![]);}catch(_0x19d754){return BPromise[_0x889e('0x31')](_0x19d754);}return _0x1f2cd3['save']();};}function saveUpdates(_0xd0aa36,_0x46892e){return function(_0x1e7191){if(_0x1e7191){return _0x1e7191['update'](_0xd0aa36)[_0x889e('0x32')](function(_0x4b52e6){return _0x4b52e6;});}return null;};}function removeEntity(_0x2249de,_0x5e936b){return function(_0x453172){if(_0x453172){return _0x453172[_0x889e('0x33')]()[_0x889e('0x32')](function(){_0x2249de[_0x889e('0x2e')](0xcc)[_0x889e('0x2a')]();});}};}function handleEntityNotFound(_0x2f962f,_0x17a523){return function(_0x6e4c87){if(!_0x6e4c87){_0x2f962f[_0x889e('0x29')](0x194);}return _0x6e4c87;};}function handleError(_0x145aa8,_0x3d7880){_0x3d7880=_0x3d7880||0x1f4;return function(_0x3d3ca4){logger[_0x889e('0x23')](_0x3d3ca4['stack']);if(_0x3d3ca4[_0x889e('0x34')]){delete _0x3d3ca4['name'];}_0x145aa8['status'](_0x3d7880)[_0x889e('0x35')](_0x3d3ca4);};}exports['index']=function(_0x256849,_0x4d70e8){var _0x2a0512={},_0x5c0ff4={},_0x478937={'count':0x0,'rows':[]};var _0x159a96=_['map'](db['Network'][_0x889e('0x36')],function(_0x56101d){return{'name':_0x56101d[_0x889e('0x37')],'type':_0x56101d[_0x889e('0x38')][_0x889e('0x39')]};});_0x5c0ff4[_0x889e('0x3a')]=_[_0x889e('0x3b')](_0x159a96,'name');_0x5c0ff4['query']=_[_0x889e('0x3c')](_0x256849[_0x889e('0x3d')]);_0x5c0ff4['filters']=_[_0x889e('0x3e')](_0x5c0ff4[_0x889e('0x3a')],_0x5c0ff4[_0x889e('0x3d')]);_0x2a0512['attributes']=_[_0x889e('0x3e')](_0x5c0ff4[_0x889e('0x3a')],qs['fields'](_0x256849[_0x889e('0x3d')]['fields']));_0x2a0512[_0x889e('0x3f')]=_0x2a0512[_0x889e('0x3f')][_0x889e('0x40')]?_0x2a0512[_0x889e('0x3f')]:_0x5c0ff4[_0x889e('0x3a')];if(!_0x256849['query'][_0x889e('0x41')]('nolimit')){_0x2a0512['limit']=qs['limit'](_0x256849[_0x889e('0x3d')][_0x889e('0x2d')]);_0x2a0512[_0x889e('0x42')]=qs[_0x889e('0x42')](_0x256849[_0x889e('0x3d')][_0x889e('0x42')]);}_0x2a0512['order']=qs[_0x889e('0x43')](_0x256849[_0x889e('0x3d')][_0x889e('0x43')]);_0x2a0512[_0x889e('0x44')]=qs['filters'](_['pick'](_0x256849['query'],_0x5c0ff4[_0x889e('0x45')]));if(_0x256849[_0x889e('0x3d')][_0x889e('0x46')]){_0x2a0512[_0x889e('0x44')]=_[_0x889e('0x47')](_0x2a0512[_0x889e('0x44')],{'$or':_['map'](_0x159a96,function(_0x2f958a){if(_0x2f958a[_0x889e('0x38')]!==_0x889e('0x48')){var _0xf440e5={};_0xf440e5[_0x2f958a['name']]={'$like':'%'+_0x256849[_0x889e('0x3d')][_0x889e('0x46')]+'%'};return _0xf440e5;}})});}_0x2a0512=_[_0x889e('0x47')]({},_0x2a0512,_0x256849[_0x889e('0x49')]);var _0x20ea1d={'where':_0x2a0512[_0x889e('0x44')]};return db[_0x889e('0x4a')][_0x889e('0x2c')](_0x20ea1d)[_0x889e('0x32')](function(_0x502cdb){_0x478937[_0x889e('0x2c')]=_0x502cdb;if(_0x256849['query'][_0x889e('0x4b')]){_0x2a0512[_0x889e('0x4c')]=[{'all':!![]}];}return db[_0x889e('0x4a')][_0x889e('0x4d')](_0x2a0512);})[_0x889e('0x32')](function(_0x36a191){_0x478937['rows']=_0x36a191;return _0x478937;})[_0x889e('0x32')](respondWithFilteredResult(_0x4d70e8,_0x2a0512))[_0x889e('0x28')](handleError(_0x4d70e8,null));};exports[_0x889e('0x4e')]=function(_0x4122e1,_0x1ff0d8){var _0x1ee591={'raw':!![],'where':{'id':_0x4122e1[_0x889e('0x4f')]['id']}},_0x432b78={};_0x432b78[_0x889e('0x3a')]=_[_0x889e('0x3c')](db['Network']['rawAttributes']);_0x432b78[_0x889e('0x3d')]=_[_0x889e('0x3c')](_0x4122e1[_0x889e('0x3d')]);_0x432b78['filters']=_[_0x889e('0x3e')](_0x432b78[_0x889e('0x3a')],_0x432b78[_0x889e('0x3d')]);_0x1ee591[_0x889e('0x3f')]=_[_0x889e('0x3e')](_0x432b78[_0x889e('0x3a')],qs[_0x889e('0x50')](_0x4122e1[_0x889e('0x3d')][_0x889e('0x50')]));_0x1ee591[_0x889e('0x3f')]=_0x1ee591[_0x889e('0x3f')]['length']?_0x1ee591['attributes']:_0x432b78[_0x889e('0x3a')];if(_0x4122e1['query'][_0x889e('0x4b')]){_0x1ee591[_0x889e('0x4c')]=[{'all':!![]}];}_0x1ee591=_[_0x889e('0x47')]({},_0x1ee591,_0x4122e1[_0x889e('0x49')]);return db[_0x889e('0x4a')][_0x889e('0x51')](_0x1ee591)['then'](handleEntityNotFound(_0x1ff0d8,null))[_0x889e('0x32')](respondWithResult(_0x1ff0d8,null))[_0x889e('0x28')](handleError(_0x1ff0d8,null));};exports[_0x889e('0x52')]=function(_0x3539ee,_0xc94455,_0x253ae9){var _0x1b4216;return db[_0x889e('0x53')][_0x889e('0x54')](function(_0x5d63e3){return db[_0x889e('0x4a')]['create'](_0x3539ee[_0x889e('0x55')],{'raw':!![]})[_0x889e('0x32')](function(_0x480aaf){_0x1b4216=_0x480aaf;return db[_0x889e('0x4a')]['findAll']({'where':{'type':_0x3539ee[_0x889e('0x55')]['type']},'raw':!![]});})['then'](function(_0x441bc5){if(_0x1b4216[_0x889e('0x38')]['toUpperCase']()==_0x889e('0x56')){var _0x33b657=fs['readFileSync'](path['join'](config[_0x889e('0x57')],'server/files/templates/stun_multiple.ejs'),'utf8');var _0x5944eb=ejs['render'](_0x33b657,{'networks':_0x441bc5||[]});fs[_0x889e('0x58')](_0x889e('0x59'),_0x5944eb);return respondWithRpcPromise(_0x889e('0x5a'),'create',{'module':_0x889e('0x5b')});}else if(_0x1b4216[_0x889e('0x38')][_0x889e('0x5c')]()==_0x889e('0x5d')){var _0x1153b0=fs[_0x889e('0x5e')](path[_0x889e('0x5f')](config[_0x889e('0x57')],'server/files/templates/turn_multiple.ejs'),'utf8');var _0x23d9aa=ejs['render'](_0x1153b0,{'networks':_0x441bc5||[]});fs[_0x889e('0x58')]('/etc/asterisk/turn_xcally.conf',_0x23d9aa);return respondWithRpcPromise('Reload',_0x889e('0x52'),{'module':_0x889e('0x5b')});}else{var _0x13387c=fs[_0x889e('0x5e')](path[_0x889e('0x5f')](config['root'],_0x889e('0x60')),'utf8');var _0x505241=ejs[_0x889e('0x61')](_0x13387c,{'networks':_0x441bc5||[]});fs[_0x889e('0x58')](util[_0x889e('0x62')](_0x889e('0x63'),_0x3539ee[_0x889e('0x55')][_0x889e('0x38')]['toLowerCase']()),_0x505241);return respondWithRpcPromise('Reload',_0x889e('0x52'),{'module':_0x889e('0x64')});}return null;})[_0x889e('0x32')](function(){return _0x1b4216;});})['then'](respondWithResult(_0xc94455,0xc9))[_0x889e('0x28')](handleError(_0xc94455,null));};exports[_0x889e('0x65')]=function(_0x24071d,_0xf59a80,_0x4ca2aa){var _0x440e5a;return db[_0x889e('0x53')][_0x889e('0x54')](function(_0x2b5428){return db[_0x889e('0x4a')][_0x889e('0x51')]({'where':{'id':_0x24071d[_0x889e('0x4f')]['id']}})[_0x889e('0x32')](handleEntityNotFound(_0xf59a80,null))[_0x889e('0x32')](saveUpdates(_0x24071d['body'],null))[_0x889e('0x32')](function(_0x4b6f2d){if(_0x4b6f2d){_0x440e5a=_0x4b6f2d;return db[_0x889e('0x4a')][_0x889e('0x4d')]({'where':{'type':_0x440e5a['type']},'raw':!![]});}return null;})[_0x889e('0x32')](function(_0x3db91e){if(_0x440e5a[_0x889e('0x38')][_0x889e('0x5c')]()==_0x889e('0x56')){var _0x38c801=fs['readFileSync'](path['join'](config[_0x889e('0x57')],_0x889e('0x66')),'utf8');var _0x2079a2=ejs['render'](_0x38c801,{'networks':_0x3db91e||[]});fs[_0x889e('0x58')](_0x889e('0x59'),_0x2079a2);return respondWithRpcPromise(_0x889e('0x5a'),_0x889e('0x65'),{'module':'res_stun_monitor.so'});}else if(_0x440e5a[_0x889e('0x38')][_0x889e('0x5c')]()==_0x889e('0x5d')){var _0x3bd050=fs[_0x889e('0x5e')](path['join'](config['root'],_0x889e('0x67')),_0x889e('0x68'));var _0x3e1a5=ejs['render'](_0x3bd050,{'networks':_0x3db91e||[]});fs[_0x889e('0x58')](_0x889e('0x69'),_0x3e1a5);return respondWithRpcPromise(_0x889e('0x5a'),'update',{'module':_0x889e('0x5b')});}else{var _0x5a2e15=fs[_0x889e('0x5e')](path[_0x889e('0x5f')](config[_0x889e('0x57')],_0x889e('0x60')),_0x889e('0x68'));var _0x34d659=ejs['render'](_0x5a2e15,{'networks':_0x3db91e||[]});fs['writeFileSync'](util['format'](_0x889e('0x63'),_0x24071d[_0x889e('0x55')][_0x889e('0x38')][_0x889e('0x6a')]()),_0x34d659);return respondWithRpcPromise(_0x889e('0x5a'),_0x889e('0x65'),{'module':_0x889e('0x64')});}return null;})[_0x889e('0x32')](function(_0x5f4a9f){if(_0x5f4a9f){return _0x440e5a;}return null;});})[_0x889e('0x32')](respondWithResult(_0xf59a80,null))[_0x889e('0x28')](handleError(_0xf59a80,null));};exports[_0x889e('0x33')]=function(_0x7da045,_0x572c1b,_0x4d5cc7){var _0x4a9718;return db[_0x889e('0x4a')][_0x889e('0x51')]({'where':{'id':_0x7da045[_0x889e('0x4f')]['id']}})['then'](function(_0x24f69e){_0x4a9718=_0x24f69e;return _0x24f69e;})[_0x889e('0x32')](handleEntityNotFound(_0x572c1b,null))[_0x889e('0x32')](removeEntity(_0x572c1b,null))['then'](function(){if(_0x4a9718){return db['Network'][_0x889e('0x4d')]({'where':{'type':_0x4a9718[_0x889e('0x38')]},'raw':!![]});}})[_0x889e('0x32')](function(_0x345bc4){if(_0x4a9718['type'][_0x889e('0x5c')]()==_0x889e('0x56')){var _0x29829d=fs['readFileSync'](path[_0x889e('0x5f')](config['root'],_0x889e('0x66')),_0x889e('0x68'));var _0x534771=ejs[_0x889e('0x61')](_0x29829d,{'networks':_0x345bc4||[]});fs[_0x889e('0x58')](_0x889e('0x59'),_0x534771);return respondWithRpcPromise('Reload','destroy',{'module':'res_stun_monitor.so'});}else if(_0x4a9718[_0x889e('0x38')][_0x889e('0x5c')]()=='TURN'){var _0x45f1c6=fs[_0x889e('0x5e')](path['join'](config[_0x889e('0x57')],_0x889e('0x67')),_0x889e('0x68'));var _0x2cfb79=ejs[_0x889e('0x61')](_0x45f1c6,{'networks':_0x345bc4||[]});fs[_0x889e('0x58')](_0x889e('0x69'),_0x2cfb79);return respondWithRpcPromise(_0x889e('0x5a'),_0x889e('0x33'),{'module':'res_stun_monitor.so'});}else{var _0x441155=fs[_0x889e('0x5e')](path['join'](config[_0x889e('0x57')],_0x889e('0x60')),_0x889e('0x68'));var _0x129456=ejs['render'](_0x441155,{'networks':_0x345bc4||[]});fs[_0x889e('0x58')](util[_0x889e('0x62')]('/etc/asterisk/sip_xcally_%s.conf',_0x7da045[_0x889e('0x55')][_0x889e('0x38')]['toLowerCase']()),_0x129456);return respondWithRpcPromise(_0x889e('0x5a'),_0x889e('0x33'),{'module':_0x889e('0x64')});}return null;})[_0x889e('0x28')](handleError(_0x572c1b,null));};
\ No newline at end of file
+var _0x1474=['count','offset','limit','Content-Range','apply','save','update','then','stack','name','send','map','Network','type','key','query','keys','filters','intersection','attributes','model','fields','length','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','toUpperCase','STUN','join','root','server/files/templates/stun_multiple.ejs','utf8','render','/etc/asterisk/stun_xcally.conf','res_stun_monitor.so','TURN','readFileSync','writeFileSync','/etc/asterisk/turn_xcally.conf','Reload','server/files/templates/network.ejs','/etc/asterisk/sip_xcally_%s.conf','transaction','find','format','toLowerCase','chan_sip.so','destroy','server/files/templates/turn_multiple.ejs','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','Network,\x20%s,\x20%s','debug','Network,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','sendStatus','end','status','json'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x1474,0x114));var _0x4147=function(_0xd49fef,_0x23f01e){_0xd49fef=_0xd49fef-0x0;var _0x304be8=_0x1474[_0xd49fef];return _0x304be8;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x4147('0x0'));var rimraf=require(_0x4147('0x1'));var zipdir=require(_0x4147('0x2'));var jsonpatch=require(_0x4147('0x3'));var rp=require(_0x4147('0x4'));var moment=require(_0x4147('0x5'));var BPromise=require(_0x4147('0x6'));var Mustache=require(_0x4147('0x7'));var util=require('util');var path=require(_0x4147('0x8'));var sox=require(_0x4147('0x9'));var csv=require(_0x4147('0xa'));var ejs=require(_0x4147('0xb'));var fs=require('fs');var _=require(_0x4147('0xc'));var squel=require(_0x4147('0xd'));var crypto=require('crypto');var jsforce=require(_0x4147('0xe'));var deskjs=require(_0x4147('0xf'));var toCsv=require(_0x4147('0xa'));var querystring=require(_0x4147('0x10'));var Papa=require(_0x4147('0x11'));var Redis=require(_0x4147('0x12'));var authService=require(_0x4147('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x4147('0x14'));var hardwareService=require(_0x4147('0x15'));var logger=require(_0x4147('0x16'))('api');var utils=require('../../config/utils');var config=require(_0x4147('0x17'));var db=require('../../mysqldb')['db'];var jayson=require(_0x4147('0x18'));var client=jayson[_0x4147('0x19')][_0x4147('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x566378,_0x43eb1a,_0x634e74){if(_0x634e74){var _0x45c450=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x45c450[_0x4147('0x1b')](_0x43eb1a)){return _0x566378;}else{throw new db[(_0x4147('0x1c'))][(_0x4147('0x1d'))](_0x4147('0x1e'));}}else{return _0x566378;}}function respondWithRpcPromise(_0x4eee6d,_0x417c4d,_0x2a6253,_0x46107d){return new BPromise(function(_0x2d0e31,_0x5a2509){var _0x466655=_0x46107d||client;return _0x466655[_0x4147('0x1f')](_0x4eee6d,_0x2a6253)['then'](function(_0x34d51a){logger[_0x4147('0x20')](_0x4147('0x21'),_0x417c4d,'request\x20sent');logger[_0x4147('0x22')](_0x4147('0x23'),_0x417c4d,_0x4147('0x24'),JSON[_0x4147('0x25')](_0x34d51a));if(_0x34d51a[_0x4147('0x26')]){if(_0x34d51a[_0x4147('0x26')]['code']===0x1f4){logger[_0x4147('0x26')](_0x4147('0x21'),_0x417c4d,_0x34d51a[_0x4147('0x26')][_0x4147('0x27')]);return _0x5a2509(_0x34d51a[_0x4147('0x26')][_0x4147('0x27')]);}logger[_0x4147('0x26')]('Network,\x20%s,\x20%s',_0x417c4d,_0x34d51a['error'][_0x4147('0x27')]);return _0x2d0e31(_0x34d51a['error']['message']);}else{logger[_0x4147('0x20')](_0x4147('0x21'),_0x417c4d,_0x4147('0x24'));_0x2d0e31(_0x34d51a[_0x4147('0x28')][_0x4147('0x27')]);}})['catch'](function(_0x1b69ea){logger['error'](_0x4147('0x21'),_0x417c4d,_0x1b69ea);_0x5a2509(_0x1b69ea);});});}function respondWithStatusCode(_0x4789e4,_0x26ffa9){_0x26ffa9=_0x26ffa9||0xcc;return function(_0x4e39a9){if(_0x4e39a9){return _0x4789e4[_0x4147('0x29')](_0x26ffa9);}return _0x4789e4['status'](_0x26ffa9)[_0x4147('0x2a')]();};}function respondWithResult(_0x18581b,_0x230bc8){_0x230bc8=_0x230bc8||0xc8;return function(_0x39bca9){if(_0x39bca9){return _0x18581b[_0x4147('0x2b')](_0x230bc8)[_0x4147('0x2c')](_0x39bca9);}};}function respondWithFilteredResult(_0x2bf7d7,_0xd6e073){return function(_0x18a912){if(_0x18a912){var _0x22b253=_0x18a912[_0x4147('0x2d')],_0x264b91=_0xd6e073[_0x4147('0x2e')],_0x3e570b=_0xd6e073['offset']+_0xd6e073[_0x4147('0x2f')],_0x497643;if(_0x3e570b>=_0x22b253){_0x3e570b=_0x22b253;_0x497643=0xc8;}else{_0x497643=0xce;}_0x2bf7d7[_0x4147('0x2b')](_0x497643);return _0x2bf7d7['set'](_0x4147('0x30'),_0x264b91+'-'+_0x3e570b+'/'+_0x22b253)[_0x4147('0x2c')](_0x18a912);}return null;};}function patchUpdates(_0x52c9e9){return function(_0x57f80e){try{jsonpatch[_0x4147('0x31')](_0x57f80e,_0x52c9e9,!![]);}catch(_0x1945e5){return BPromise['reject'](_0x1945e5);}return _0x57f80e[_0x4147('0x32')]();};}function saveUpdates(_0x2366df,_0x4f08c7){return function(_0x416b67){if(_0x416b67){return _0x416b67[_0x4147('0x33')](_0x2366df)[_0x4147('0x34')](function(_0x3940ad){return _0x3940ad;});}return null;};}function removeEntity(_0x3e4545,_0x31295e){return function(_0x14a2c6){if(_0x14a2c6){return _0x14a2c6['destroy']()[_0x4147('0x34')](function(){_0x3e4545['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x51e96d,_0x5ad9be){return function(_0x24e09e){if(!_0x24e09e){_0x51e96d[_0x4147('0x29')](0x194);}return _0x24e09e;};}function handleError(_0x18fb15,_0x5761a7){_0x5761a7=_0x5761a7||0x1f4;return function(_0x5d6bec){logger['error'](_0x5d6bec[_0x4147('0x35')]);if(_0x5d6bec['name']){delete _0x5d6bec[_0x4147('0x36')];}_0x18fb15['status'](_0x5761a7)[_0x4147('0x37')](_0x5d6bec);};}exports['index']=function(_0x4f34ea,_0x3b248a){var _0x16ed90={},_0x14acbf={},_0x539e60={'count':0x0,'rows':[]};var _0x2bf1b3=_[_0x4147('0x38')](db[_0x4147('0x39')]['rawAttributes'],function(_0x5c67b2){return{'name':_0x5c67b2['fieldName'],'type':_0x5c67b2[_0x4147('0x3a')][_0x4147('0x3b')]};});_0x14acbf['model']=_[_0x4147('0x38')](_0x2bf1b3,_0x4147('0x36'));_0x14acbf[_0x4147('0x3c')]=_[_0x4147('0x3d')](_0x4f34ea[_0x4147('0x3c')]);_0x14acbf[_0x4147('0x3e')]=_[_0x4147('0x3f')](_0x14acbf['model'],_0x14acbf['query']);_0x16ed90[_0x4147('0x40')]=_[_0x4147('0x3f')](_0x14acbf[_0x4147('0x41')],qs[_0x4147('0x42')](_0x4f34ea['query'][_0x4147('0x42')]));_0x16ed90[_0x4147('0x40')]=_0x16ed90[_0x4147('0x40')][_0x4147('0x43')]?_0x16ed90['attributes']:_0x14acbf['model'];if(!_0x4f34ea['query']['hasOwnProperty']('nolimit')){_0x16ed90[_0x4147('0x2f')]=qs[_0x4147('0x2f')](_0x4f34ea[_0x4147('0x3c')]['limit']);_0x16ed90[_0x4147('0x2e')]=qs[_0x4147('0x2e')](_0x4f34ea[_0x4147('0x3c')][_0x4147('0x2e')]);}_0x16ed90[_0x4147('0x44')]=qs['sort'](_0x4f34ea['query'][_0x4147('0x45')]);_0x16ed90[_0x4147('0x46')]=qs[_0x4147('0x3e')](_['pick'](_0x4f34ea[_0x4147('0x3c')],_0x14acbf['filters']));if(_0x4f34ea[_0x4147('0x3c')][_0x4147('0x47')]){_0x16ed90[_0x4147('0x46')]=_[_0x4147('0x48')](_0x16ed90[_0x4147('0x46')],{'$or':_[_0x4147('0x38')](_0x2bf1b3,function(_0x3c582a){if(_0x3c582a[_0x4147('0x3a')]!==_0x4147('0x49')){var _0x2f6508={};_0x2f6508[_0x3c582a[_0x4147('0x36')]]={'$like':'%'+_0x4f34ea[_0x4147('0x3c')]['filter']+'%'};return _0x2f6508;}})});}_0x16ed90=_[_0x4147('0x48')]({},_0x16ed90,_0x4f34ea[_0x4147('0x4a')]);var _0x787fd={'where':_0x16ed90['where']};return db[_0x4147('0x39')][_0x4147('0x2d')](_0x787fd)[_0x4147('0x34')](function(_0x35145a){_0x539e60[_0x4147('0x2d')]=_0x35145a;if(_0x4f34ea[_0x4147('0x3c')][_0x4147('0x4b')]){_0x16ed90[_0x4147('0x4c')]=[{'all':!![]}];}return db[_0x4147('0x39')][_0x4147('0x4d')](_0x16ed90);})[_0x4147('0x34')](function(_0x4de49c){_0x539e60[_0x4147('0x4e')]=_0x4de49c;return _0x539e60;})[_0x4147('0x34')](respondWithFilteredResult(_0x3b248a,_0x16ed90))[_0x4147('0x4f')](handleError(_0x3b248a,null));};exports[_0x4147('0x50')]=function(_0x215692,_0x35a725){var _0x2ef70e={'raw':!![],'where':{'id':_0x215692[_0x4147('0x51')]['id']}},_0x3a041b={};_0x3a041b[_0x4147('0x41')]=_[_0x4147('0x3d')](db['Network']['rawAttributes']);_0x3a041b[_0x4147('0x3c')]=_[_0x4147('0x3d')](_0x215692['query']);_0x3a041b[_0x4147('0x3e')]=_[_0x4147('0x3f')](_0x3a041b['model'],_0x3a041b[_0x4147('0x3c')]);_0x2ef70e[_0x4147('0x40')]=_[_0x4147('0x3f')](_0x3a041b[_0x4147('0x41')],qs['fields'](_0x215692[_0x4147('0x3c')][_0x4147('0x42')]));_0x2ef70e[_0x4147('0x40')]=_0x2ef70e[_0x4147('0x40')][_0x4147('0x43')]?_0x2ef70e[_0x4147('0x40')]:_0x3a041b[_0x4147('0x41')];if(_0x215692[_0x4147('0x3c')][_0x4147('0x4b')]){_0x2ef70e[_0x4147('0x4c')]=[{'all':!![]}];}_0x2ef70e=_['merge']({},_0x2ef70e,_0x215692[_0x4147('0x4a')]);return db[_0x4147('0x39')]['find'](_0x2ef70e)[_0x4147('0x34')](handleEntityNotFound(_0x35a725,null))[_0x4147('0x34')](respondWithResult(_0x35a725,null))[_0x4147('0x4f')](handleError(_0x35a725,null));};exports[_0x4147('0x52')]=function(_0x254806,_0x2cdb24,_0x47a115){var _0xf6761e;return db['sequelize']['transaction'](function(_0x2c8a3a){return db[_0x4147('0x39')][_0x4147('0x52')](_0x254806[_0x4147('0x53')],{'raw':!![]})[_0x4147('0x34')](function(_0x2d4c1b){_0xf6761e=_0x2d4c1b;return db[_0x4147('0x39')][_0x4147('0x4d')]({'where':{'type':_0x254806[_0x4147('0x53')][_0x4147('0x3a')]},'raw':!![]});})[_0x4147('0x34')](function(_0x51db3f){if(_0xf6761e[_0x4147('0x3a')][_0x4147('0x54')]()==_0x4147('0x55')){var _0x1a5b7b=fs['readFileSync'](path[_0x4147('0x56')](config[_0x4147('0x57')],_0x4147('0x58')),_0x4147('0x59'));var _0x2be9a3=ejs[_0x4147('0x5a')](_0x1a5b7b,{'networks':_0x51db3f||[]});fs['writeFileSync'](_0x4147('0x5b'),_0x2be9a3);return respondWithRpcPromise('Reload',_0x4147('0x52'),{'module':_0x4147('0x5c')});}else if(_0xf6761e[_0x4147('0x3a')]['toUpperCase']()==_0x4147('0x5d')){var _0x4e9732=fs[_0x4147('0x5e')](path[_0x4147('0x56')](config[_0x4147('0x57')],'server/files/templates/turn_multiple.ejs'),_0x4147('0x59'));var _0x4d4924=ejs['render'](_0x4e9732,{'networks':_0x51db3f||[]});fs[_0x4147('0x5f')](_0x4147('0x60'),_0x4d4924);return respondWithRpcPromise(_0x4147('0x61'),_0x4147('0x52'),{'module':_0x4147('0x5c')});}else{var _0x276a8c=fs[_0x4147('0x5e')](path[_0x4147('0x56')](config[_0x4147('0x57')],_0x4147('0x62')),_0x4147('0x59'));var _0x46b4ec=ejs[_0x4147('0x5a')](_0x276a8c,{'networks':_0x51db3f||[]});fs[_0x4147('0x5f')](util['format'](_0x4147('0x63'),_0x254806[_0x4147('0x53')]['type']['toLowerCase']()),_0x46b4ec);return respondWithRpcPromise(_0x4147('0x61'),_0x4147('0x52'),{'module':'chan_sip.so'});}return null;})[_0x4147('0x34')](function(){return _0xf6761e;});})['then'](respondWithResult(_0x2cdb24,0xc9))[_0x4147('0x4f')](handleError(_0x2cdb24,null));};exports['update']=function(_0x2eb9f5,_0x5861ef,_0x1e5546){var _0x4240c9;return db['sequelize'][_0x4147('0x64')](function(_0x5d2921){return db['Network'][_0x4147('0x65')]({'where':{'id':_0x2eb9f5[_0x4147('0x51')]['id']}})[_0x4147('0x34')](handleEntityNotFound(_0x5861ef,null))['then'](saveUpdates(_0x2eb9f5['body'],null))[_0x4147('0x34')](function(_0x2eb80e){if(_0x2eb80e){_0x4240c9=_0x2eb80e;return db['Network']['findAll']({'where':{'type':_0x4240c9[_0x4147('0x3a')]},'raw':!![]});}return null;})[_0x4147('0x34')](function(_0x1700fb){if(_0x4240c9[_0x4147('0x3a')][_0x4147('0x54')]()==_0x4147('0x55')){var _0x4f9b5b=fs[_0x4147('0x5e')](path[_0x4147('0x56')](config['root'],_0x4147('0x58')),'utf8');var _0x501e64=ejs[_0x4147('0x5a')](_0x4f9b5b,{'networks':_0x1700fb||[]});fs[_0x4147('0x5f')](_0x4147('0x5b'),_0x501e64);return respondWithRpcPromise(_0x4147('0x61'),_0x4147('0x33'),{'module':_0x4147('0x5c')});}else if(_0x4240c9['type'][_0x4147('0x54')]()==_0x4147('0x5d')){var _0x27cd2e=fs[_0x4147('0x5e')](path[_0x4147('0x56')](config['root'],'server/files/templates/turn_multiple.ejs'),_0x4147('0x59'));var _0x1f7493=ejs['render'](_0x27cd2e,{'networks':_0x1700fb||[]});fs['writeFileSync'](_0x4147('0x60'),_0x1f7493);return respondWithRpcPromise(_0x4147('0x61'),_0x4147('0x33'),{'module':'res_stun_monitor.so'});}else{var _0x226532=fs['readFileSync'](path[_0x4147('0x56')](config[_0x4147('0x57')],'server/files/templates/network.ejs'),_0x4147('0x59'));var _0x55dc72=ejs['render'](_0x226532,{'networks':_0x1700fb||[]});fs[_0x4147('0x5f')](util[_0x4147('0x66')](_0x4147('0x63'),_0x2eb9f5[_0x4147('0x53')]['type'][_0x4147('0x67')]()),_0x55dc72);return respondWithRpcPromise(_0x4147('0x61'),_0x4147('0x33'),{'module':_0x4147('0x68')});}return null;})['then'](function(_0x4f5278){if(_0x4f5278){return _0x4240c9;}return null;});})['then'](respondWithResult(_0x5861ef,null))[_0x4147('0x4f')](handleError(_0x5861ef,null));};exports['destroy']=function(_0x36686c,_0x1d9339,_0x37f470){var _0x41db02;return db[_0x4147('0x39')][_0x4147('0x65')]({'where':{'id':_0x36686c[_0x4147('0x51')]['id']}})['then'](function(_0x584fc6){_0x41db02=_0x584fc6;return _0x584fc6;})['then'](handleEntityNotFound(_0x1d9339,null))[_0x4147('0x34')](removeEntity(_0x1d9339,null))[_0x4147('0x34')](function(){if(_0x41db02){return db['Network'][_0x4147('0x4d')]({'where':{'type':_0x41db02[_0x4147('0x3a')]},'raw':!![]});}})[_0x4147('0x34')](function(_0x3dc50d){if(_0x41db02['type'][_0x4147('0x54')]()==_0x4147('0x55')){var _0x15aeeb=fs[_0x4147('0x5e')](path['join'](config['root'],'server/files/templates/stun_multiple.ejs'),_0x4147('0x59'));var _0x470ce3=ejs[_0x4147('0x5a')](_0x15aeeb,{'networks':_0x3dc50d||[]});fs[_0x4147('0x5f')](_0x4147('0x5b'),_0x470ce3);return respondWithRpcPromise('Reload',_0x4147('0x69'),{'module':_0x4147('0x5c')});}else if(_0x41db02[_0x4147('0x3a')]['toUpperCase']()=='TURN'){var _0x1b04fe=fs[_0x4147('0x5e')](path[_0x4147('0x56')](config[_0x4147('0x57')],_0x4147('0x6a')),_0x4147('0x59'));var _0x4db708=ejs[_0x4147('0x5a')](_0x1b04fe,{'networks':_0x3dc50d||[]});fs['writeFileSync'](_0x4147('0x60'),_0x4db708);return respondWithRpcPromise('Reload',_0x4147('0x69'),{'module':_0x4147('0x5c')});}else{var _0x31938b=fs[_0x4147('0x5e')](path[_0x4147('0x56')](config[_0x4147('0x57')],_0x4147('0x62')),_0x4147('0x59'));var _0xef0932=ejs['render'](_0x31938b,{'networks':_0x3dc50d||[]});fs['writeFileSync'](util[_0x4147('0x66')](_0x4147('0x63'),_0x36686c[_0x4147('0x53')]['type'][_0x4147('0x67')]()),_0xef0932);return respondWithRpcPromise(_0x4147('0x61'),_0x4147('0x69'),{'module':_0x4147('0x68')});}return null;})[_0x4147('0x4f')](handleError(_0x1d9339,null));};
\ No newline at end of file
diff --git a/server/api/network/network.model.js b/server/api/network/network.model.js
index fb89a1b..fae3adc 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 _0x728f=['rimraf','../../config/environment','exports','define','network','lodash','util','request-promise','path'];(function(_0x390805,_0x2e18ae){var _0x5e3e55=function(_0x16c536){while(--_0x16c536){_0x390805['push'](_0x390805['shift']());}};_0x5e3e55(++_0x2e18ae);}(_0x728f,0x16d));var _0xf728=function(_0x1f97dc,_0x49ec38){_0x1f97dc=_0x1f97dc-0x0;var _0xd8f15a=_0x728f[_0x1f97dc];return _0xd8f15a;};'use strict';var _=require(_0xf728('0x0'));var util=require(_0xf728('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xf728('0x2'));var fs=require('fs');var path=require(_0xf728('0x3'));var rimraf=require(_0xf728('0x4'));var config=require(_0xf728('0x5'));var attributes=require('./network.attributes');module[_0xf728('0x6')]=function(_0x47806a,_0x2ee85e){return _0x47806a[_0xf728('0x7')]('Network',attributes,{'tableName':_0xf728('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7b22=['moment','request-promise','path','rimraf','../../config/environment','exports','define','network','lodash','util','api'];(function(_0x438d47,_0x3b9e59){var _0x175b21=function(_0x422f8d){while(--_0x422f8d){_0x438d47['push'](_0x438d47['shift']());}};_0x175b21(++_0x3b9e59);}(_0x7b22,0x17e));var _0x27b2=function(_0x5c846d,_0x5c02ce){_0x5c846d=_0x5c846d-0x0;var _0xd064e4=_0x7b22[_0x5c846d];return _0xd064e4;};'use strict';var _=require(_0x27b2('0x0'));var util=require(_0x27b2('0x1'));var logger=require('../../config/logger')(_0x27b2('0x2'));var moment=require(_0x27b2('0x3'));var BPromise=require('bluebird');var rp=require(_0x27b2('0x4'));var fs=require('fs');var path=require(_0x27b2('0x5'));var rimraf=require(_0x27b2('0x6'));var config=require(_0x27b2('0x7'));var attributes=require('./network.attributes');module[_0x27b2('0x8')]=function(_0x386b0e,_0x164226){return _0x386b0e[_0x27b2('0x9')]('Network',attributes,{'tableName':_0x27b2('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 c979aee..d3525ed 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 _0x29a0=['result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','Network,\x20%s,\x20%s','debug','Network,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x2e4aa2,_0x11956a){var _0x5e6092=function(_0x4c12c2){while(--_0x4c12c2){_0x2e4aa2['push'](_0x2e4aa2['shift']());}};_0x5e6092(++_0x11956a);}(_0x29a0,0xd1));var _0x029a=function(_0x3c82d9,_0x4eb470){_0x3c82d9=_0x3c82d9-0x0;var _0x3d4f42=_0x29a0[_0x3c82d9];return _0x3d4f42;};'use strict';var _=require(_0x029a('0x0'));var util=require('util');var moment=require(_0x029a('0x1'));var BPromise=require(_0x029a('0x2'));var rs=require(_0x029a('0x3'));var fs=require('fs');var Redis=require(_0x029a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x029a('0x5'));var logger=require(_0x029a('0x6'))(_0x029a('0x7'));var config=require(_0x029a('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x029a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x274559,_0x3ca5fb,_0x552642){return new BPromise(function(_0x398837,_0x1c71f9){return client[_0x029a('0xa')](_0x274559,_0x552642)[_0x029a('0xb')](function(_0x159703){logger[_0x029a('0xc')](_0x029a('0xd'),_0x3ca5fb,'request\x20sent');logger[_0x029a('0xe')](_0x029a('0xf'),_0x3ca5fb,_0x029a('0x10'),JSON[_0x029a('0x11')](_0x159703));if(_0x159703[_0x029a('0x12')]){if(_0x159703['error'][_0x029a('0x13')]===0x1f4){logger[_0x029a('0x12')](_0x029a('0xd'),_0x3ca5fb,_0x159703['error'][_0x029a('0x14')]);return _0x1c71f9(_0x159703[_0x029a('0x12')][_0x029a('0x14')]);}logger[_0x029a('0x12')](_0x029a('0xd'),_0x3ca5fb,_0x159703[_0x029a('0x12')][_0x029a('0x14')]);return _0x398837(_0x159703[_0x029a('0x12')][_0x029a('0x14')]);}else{logger[_0x029a('0xc')](_0x029a('0xd'),_0x3ca5fb,_0x029a('0x10'));_0x398837(_0x159703[_0x029a('0x15')][_0x029a('0x14')]);}})[_0x029a('0x16')](function(_0x43833b){logger[_0x029a('0x12')](_0x029a('0xd'),_0x3ca5fb,_0x43833b);_0x1c71f9(_0x43833b);});});}
\ No newline at end of file
+var _0x39c9=['bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','info','Network,\x20%s,\x20%s','debug','Network,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x23e999,_0x11297a){var _0xedb644=function(_0xb37c91){while(--_0xb37c91){_0x23e999['push'](_0x23e999['shift']());}};_0xedb644(++_0x11297a);}(_0x39c9,0x1c5));var _0x939c=function(_0x41d9a8,_0x386c27){_0x41d9a8=_0x41d9a8-0x0;var _0x146498=_0x39c9[_0x41d9a8];return _0x146498;};'use strict';var _=require(_0x939c('0x0'));var util=require(_0x939c('0x1'));var moment=require(_0x939c('0x2'));var BPromise=require(_0x939c('0x3'));var rs=require(_0x939c('0x4'));var fs=require('fs');var Redis=require(_0x939c('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x939c('0x6'));var logger=require('../../config/logger')(_0x939c('0x7'));var config=require(_0x939c('0x8'));var jayson=require(_0x939c('0x9'));var client=jayson[_0x939c('0xa')][_0x939c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x81b6ad,_0x43089c,_0x1ea9f0){return new BPromise(function(_0x23a11b,_0x21ed1b){return client['request'](_0x81b6ad,_0x1ea9f0)[_0x939c('0xc')](function(_0x334cb3){logger[_0x939c('0xd')](_0x939c('0xe'),_0x43089c,'request\x20sent');logger[_0x939c('0xf')](_0x939c('0x10'),_0x43089c,_0x939c('0x11'),JSON[_0x939c('0x12')](_0x334cb3));if(_0x334cb3['error']){if(_0x334cb3[_0x939c('0x13')][_0x939c('0x14')]===0x1f4){logger[_0x939c('0x13')](_0x939c('0xe'),_0x43089c,_0x334cb3[_0x939c('0x13')][_0x939c('0x15')]);return _0x21ed1b(_0x334cb3[_0x939c('0x13')][_0x939c('0x15')]);}logger[_0x939c('0x13')](_0x939c('0xe'),_0x43089c,_0x334cb3['error'][_0x939c('0x15')]);return _0x23a11b(_0x334cb3['error'][_0x939c('0x15')]);}else{logger['info'](_0x939c('0xe'),_0x43089c,_0x939c('0x11'));_0x23a11b(_0x334cb3[_0x939c('0x16')][_0x939c('0x15')]);}})[_0x939c('0x17')](function(_0x5d509b){logger['error'](_0x939c('0xe'),_0x43089c,_0x5d509b);_0x21ed1b(_0x5d509b);});});}
\ No newline at end of file
diff --git a/server/api/notification/index.js b/server/api/notification/index.js
index e0b6c0a..8bd7779 100644
--- a/server/api/notification/index.js
+++ b/server/api/notification/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3842=['../../components/auth/service','../../components/interaction/service','isAuthenticated','exports','multer','util','path','connect-timeout','express'];(function(_0x4f9ebe,_0x30d101){var _0x3f7681=function(_0x3b8848){while(--_0x3b8848){_0x4f9ebe['push'](_0x4f9ebe['shift']());}};_0x3f7681(++_0x30d101);}(_0x3842,0x94));var _0x2384=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x3842[_0x19950b];return _0x3c6b41;};'use strict';var multer=require(_0x2384('0x0'));var util=require(_0x2384('0x1'));var path=require(_0x2384('0x2'));var timeout=require(_0x2384('0x3'));var express=require(_0x2384('0x4'));var router=express['Router']();var auth=require(_0x2384('0x5'));var interaction=require(_0x2384('0x6'));var config=require('../../config/environment');var controller=require('./notification.controller');router['post']('/',auth[_0x2384('0x7')](),controller['sendNotification']);module[_0x2384('0x8')]=router;
\ No newline at end of file
+var _0xf2ee=['./notification.controller','post','isAuthenticated','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../config/environment'];(function(_0x4968ab,_0x484549){var _0x34a589=function(_0xa21184){while(--_0xa21184){_0x4968ab['push'](_0x4968ab['shift']());}};_0x34a589(++_0x484549);}(_0xf2ee,0x1a6));var _0xef2e=function(_0x2798a9,_0x5649ca){_0x2798a9=_0x2798a9-0x0;var _0x5e4a3c=_0xf2ee[_0x2798a9];return _0x5e4a3c;};'use strict';var multer=require(_0xef2e('0x0'));var util=require(_0xef2e('0x1'));var path=require(_0xef2e('0x2'));var timeout=require(_0xef2e('0x3'));var express=require(_0xef2e('0x4'));var router=express['Router']();var auth=require(_0xef2e('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xef2e('0x6'));var controller=require(_0xef2e('0x7'));router[_0xef2e('0x8')]('/',auth[_0xef2e('0x9')](),controller['sendNotification']);module[_0xef2e('0xa')]=router;
\ No newline at end of file
diff --git a/server/api/notification/notification.attributes.js b/server/api/notification/notification.attributes.js
index ddc660f..5375f3f 100644
--- a/server/api/notification/notification.attributes.js
+++ b/server/api/notification/notification.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x66c9=['STRING','BOOLEAN','sequelize','exports','TEXT'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x66c9,0xb6));var _0x966c=function(_0x237936,_0x40360d){_0x237936=_0x237936-0x0;var _0x54168d=_0x66c9[_0x237936];return _0x54168d;};'use strict';var Sequelize=require(_0x966c('0x0'));module[_0x966c('0x1')]={'body':{'type':Sequelize[_0x966c('0x2')]},'senderName':{'type':Sequelize[_0x966c('0x3')]},'recipientsId':{'type':Sequelize[_0x966c('0x2')]},'recipientsDescription':{'type':Sequelize['STRING']},'beep':{'type':Sequelize[_0x966c('0x4')]}};
\ No newline at end of file
+var _0xc948=['BOOLEAN','sequelize','exports','STRING','TEXT'];(function(_0x320e1f,_0x1ada5e){var _0x1c7ae2=function(_0x13e28c){while(--_0x13e28c){_0x320e1f['push'](_0x320e1f['shift']());}};_0x1c7ae2(++_0x1ada5e);}(_0xc948,0x1aa));var _0x8c94=function(_0xff471b,_0x190835){_0xff471b=_0xff471b-0x0;var _0x2b0d1b=_0xc948[_0xff471b];return _0x2b0d1b;};'use strict';var Sequelize=require(_0x8c94('0x0'));module[_0x8c94('0x1')]={'body':{'type':Sequelize['TEXT']},'senderName':{'type':Sequelize[_0x8c94('0x2')]},'recipientsId':{'type':Sequelize[_0x8c94('0x3')]},'recipientsDescription':{'type':Sequelize[_0x8c94('0x2')]},'beep':{'type':Sequelize[_0x8c94('0x4')]}};
\ No newline at end of file
diff --git a/server/api/notification/notification.controller.js b/server/api/notification/notification.controller.js
index d7cc772..543c755 100644
--- a/server/api/notification/notification.controller.js
+++ b/server/api/notification/notification.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6347=['recipients','parse','Invalid\x20\x27recipients\x27\x20object','faxqueue','openchannelqueue','whatsappqueue','team','user','some','includes','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','recipientsDescription','isEmpty','beep','SenderId','recipientsId','sortBy','join','sequelize','transaction','create','forEach','emit','catch','Template','html','Invalid\x20\x27TemplateId\x27\x20parameter','render','startCase','User','union','queue','replace','Queue','ids','push','all','findOne','getAgents','map','html-pdf','eml-format','rimraf','request-promise','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','defaults','redis','localhost','socket.io-emitter','./notification.socket','register','sendStatus','status','end','count','offset','limit','Content-Range','json','apply','reject','save','then','destroy','error','stack','name','send','sendNotification','body','text','hasOwnProperty','TemplateId','ValidationError','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','view','Sequelize','Missing\x20\x27view\x27\x20parameter'];(function(_0x152f4a,_0x1e889a){var _0x1719db=function(_0x1eb0e4){while(--_0x1eb0e4){_0x152f4a['push'](_0x152f4a['shift']());}};_0x1719db(++_0x1e889a);}(_0x6347,0x154));var _0x7634=function(_0x37df65,_0x4fcd72){_0x37df65=_0x37df65-0x0;var _0x9987ab=_0x6347[_0x37df65];return _0x9987ab;};'use strict';var pdf=require(_0x7634('0x0'));var emlformat=require(_0x7634('0x1'));var rimraf=require(_0x7634('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x7634('0x3'));var moment=require('moment');var BPromise=require(_0x7634('0x4'));var Mustache=require('mustache');var util=require(_0x7634('0x5'));var path=require(_0x7634('0x6'));var sox=require(_0x7634('0x7'));var csv=require(_0x7634('0x8'));var ejs=require(_0x7634('0x9'));var fs=require('fs');var _=require(_0x7634('0xa'));var squel=require(_0x7634('0xb'));var crypto=require(_0x7634('0xc'));var jsforce=require(_0x7634('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x7634('0x8'));var querystring=require(_0x7634('0xe'));var Papa=require(_0x7634('0xf'));var Redis=require(_0x7634('0x10'));var authService=require(_0x7634('0x11'));var qs=require(_0x7634('0x12'));var as=require(_0x7634('0x13'));var hardwareService=require(_0x7634('0x14'));var logger=require(_0x7634('0x15'))('api');var utils=require('../../config/utils');var config=require(_0x7634('0x16'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x7634('0x17')](config[_0x7634('0x18')],{'host':_0x7634('0x19'),'port':0x18eb});var socket=require(_0x7634('0x1a'))(new Redis(config[_0x7634('0x18')]));require(_0x7634('0x1b'))[_0x7634('0x1c')](socket);function respondWithStatusCode(_0x844b42,_0x4c91e8){_0x4c91e8=_0x4c91e8||0xcc;return function(_0x557354){if(_0x557354){return _0x844b42[_0x7634('0x1d')](_0x4c91e8);}return _0x844b42[_0x7634('0x1e')](_0x4c91e8)[_0x7634('0x1f')]();};}function respondWithResult(_0x47caf1,_0xc2f9f8){_0xc2f9f8=_0xc2f9f8||0xc8;return function(_0x3666bb){if(_0x3666bb){return _0x47caf1['status'](_0xc2f9f8)['json'](_0x3666bb);}};}function respondWithFilteredResult(_0x10ce00,_0x5cfe92){return function(_0x127dc8){if(_0x127dc8){var _0x50d82c=_0x127dc8[_0x7634('0x20')],_0x4f339a=_0x5cfe92['offset'],_0x296c7a=_0x5cfe92[_0x7634('0x21')]+_0x5cfe92[_0x7634('0x22')],_0x2a10a0;if(_0x296c7a>=_0x50d82c){_0x296c7a=_0x50d82c;_0x2a10a0=0xc8;}else{_0x2a10a0=0xce;}_0x10ce00[_0x7634('0x1e')](_0x2a10a0);return _0x10ce00['set'](_0x7634('0x23'),_0x4f339a+'-'+_0x296c7a+'/'+_0x50d82c)[_0x7634('0x24')](_0x127dc8);}return null;};}function patchUpdates(_0x34e818){return function(_0x5ac25c){try{jsonpatch[_0x7634('0x25')](_0x5ac25c,_0x34e818,!![]);}catch(_0x3ec564){return BPromise[_0x7634('0x26')](_0x3ec564);}return _0x5ac25c[_0x7634('0x27')]();};}function saveUpdates(_0x1c093d,_0x3eb0ad){return function(_0x236179){if(_0x236179){return _0x236179['update'](_0x1c093d)[_0x7634('0x28')](function(_0x3e7cea){return _0x3e7cea;});}return null;};}function removeEntity(_0x3a031b,_0x529a73){return function(_0x1fd32){if(_0x1fd32){return _0x1fd32[_0x7634('0x29')]()[_0x7634('0x28')](function(){_0x3a031b[_0x7634('0x1e')](0xcc)[_0x7634('0x1f')]();});}};}function handleEntityNotFound(_0x324364,_0x2db528){return function(_0x440af0){if(!_0x440af0){_0x324364[_0x7634('0x1d')](0x194);}return _0x440af0;};}function handleError(_0x1db078,_0x4dcec1){_0x4dcec1=_0x4dcec1||0x1f4;return function(_0x53bf42){logger[_0x7634('0x2a')](_0x53bf42[_0x7634('0x2b')]);if(_0x53bf42['name']){delete _0x53bf42[_0x7634('0x2c')];}_0x1db078[_0x7634('0x1e')](_0x4dcec1)[_0x7634('0x2d')](_0x53bf42);};}exports[_0x7634('0x2e')]=function(_0x4ac181,_0x5f2550,_0x450fe1){if(!_0x4ac181[_0x7634('0x2f')]['hasOwnProperty'](_0x7634('0x30'))&&!_0x4ac181[_0x7634('0x2f')][_0x7634('0x31')](_0x7634('0x32'))){throw new db['Sequelize'][(_0x7634('0x33'))](_0x7634('0x34'));}else{if(_0x4ac181[_0x7634('0x2f')][_0x7634('0x31')](_0x7634('0x32'))&&!_0x4ac181[_0x7634('0x2f')]['hasOwnProperty'](_0x7634('0x35'))){throw new db[(_0x7634('0x36'))][(_0x7634('0x33'))](_0x7634('0x37'));}if(!_0x4ac181[_0x7634('0x2f')][_0x7634('0x31')](_0x7634('0x38'))){throw new db['Sequelize'][(_0x7634('0x33'))]('Missing\x20\x27recipients\x27\x20parameter');}else{try{var _0x980d49=JSON[_0x7634('0x39')](_0x4ac181[_0x7634('0x2f')][_0x7634('0x38')]);}catch(_0x3004e2){logger[_0x7634('0x2a')](_0x3004e2);throw new db[(_0x7634('0x36'))][(_0x7634('0x33'))](_0x7634('0x3a'));}var _0x6ecf42=['chatqueue',_0x7634('0x3b'),'mailqueue',_0x7634('0x3c'),'smsqueue','voicequeue',_0x7634('0x3d'),_0x7634('0x3e'),_0x7634('0x3f')];if(_[_0x7634('0x40')](_0x980d49,function(_0x2997e3){return!_[_0x7634('0x41')](_0x6ecf42,_0x2997e3[_0x7634('0x42')][_0x7634('0x43')]());})){throw new db[(_0x7634('0x36'))][(_0x7634('0x33'))](_0x7634('0x44'));}}}var _0x30915a={};_0x30915a[_0x7634('0x45')]=_0x4ac181['body'][_0x7634('0x31')](_0x7634('0x45'))?_0x4ac181['body']['senderName']:_0x4ac181[_0x7634('0x3f')]['fullname'];_0x30915a[_0x7634('0x46')]=_[_0x7634('0x47')](_0x4ac181[_0x7634('0x2f')][_0x7634('0x46')])?null:_0x4ac181['body'][_0x7634('0x46')];_0x30915a[_0x7634('0x48')]=_0x4ac181[_0x7634('0x2f')][_0x7634('0x48')]||![];_0x30915a[_0x7634('0x49')]=_0x4ac181[_0x7634('0x3f')]['id'];return getContent(_0x4ac181[_0x7634('0x2f')])[_0x7634('0x28')](function(_0x41182c){_0x30915a['body']=_0x41182c;return getRecipients(_0x980d49);})['then'](function(_0x33ae78){_0x30915a[_0x7634('0x4a')]=_[_0x7634('0x4b')](_0x33ae78)[_0x7634('0x4c')](',');return db[_0x7634('0x4d')][_0x7634('0x4e')](function(_0x2dc3f1){return db['Notification'][_0x7634('0x4f')](_0x30915a,{'raw':!![],'transaction':_0x2dc3f1})[_0x7634('0x28')](function(_0x147dfe){var _0x4e1d06={'sender':_0x30915a[_0x7634('0x45')],'description':_0x30915a[_0x7634('0x46')],'content':_0x30915a[_0x7634('0x2f')],'beep':_0x30915a[_0x7634('0x48')]};_0x33ae78[_0x7634('0x50')](function(_0x60e50e){_0x4e1d06['recipient']=_0x60e50e;socket[_0x7634('0x51')]('notification:send',_0x4e1d06);});return _0x147dfe;});});})[_0x7634('0x28')](respondWithResult(_0x5f2550,0xc9))[_0x7634('0x52')](handleError(_0x5f2550,null));};function getContent(_0x1aa387){return new BPromise(function(_0x4deb25,_0x1cf755){if(_0x1aa387[_0x7634('0x30')]){_0x4deb25(_0x1aa387[_0x7634('0x30')]);return;}return db[_0x7634('0x53')]['findOne']({'attributes':[_0x7634('0x54')],'where':{'id':_0x1aa387[_0x7634('0x32')]},'raw':!![]})[_0x7634('0x28')](function(_0x5d325f){if(!_0x5d325f)throw new db[(_0x7634('0x36'))][(_0x7634('0x33'))](_0x7634('0x55'));var _0x14cf7a=Mustache[_0x7634('0x56')](_0x5d325f['html'],_0x1aa387['view']);_0x4deb25(_0x14cf7a);})[_0x7634('0x52')](function(_0x4740c8){_0x1cf755(_0x4740c8);});});}function getRecipients(_0x2b432f){return new BPromise(function(_0x2a6aac,_0x2ef48c){var _0x18f8f2=[];var _0x214ebd=[];_0x2b432f[_0x7634('0x50')](function(_0x1900be){var _0x135bda=_[_0x7634('0x57')](_0x1900be[_0x7634('0x42')][_0x7634('0x43')]());if(_0x135bda===_0x7634('0x58')){_0x18f8f2=_[_0x7634('0x59')](_0x18f8f2,_0x1900be['ids']);}else{if(_[_0x7634('0x41')](_0x135bda,_0x7634('0x5a')))_0x135bda=_0x135bda[_0x7634('0x5b')](_0x7634('0x5a'),_0x7634('0x5c'));_0x1900be[_0x7634('0x5d')][_0x7634('0x50')](function(_0x12b5c9){_0x214ebd[_0x7634('0x5e')](getAgents(_0x135bda,_0x12b5c9));});}});return BPromise[_0x7634('0x5f')](_0x214ebd)[_0x7634('0x28')](function(_0x288a17){_0x18f8f2=_[_0x7634('0x59')](_0x18f8f2,_['flatten'](_0x288a17));_0x2a6aac(_0x18f8f2);})[_0x7634('0x52')](function(_0x24e70e){_0x2ef48c(_0x24e70e);});});}function getAgents(_0x3aa86a,_0x23349e){return new BPromise(function(_0x2dbe8b,_0x47c8ee){return db[_0x3aa86a][_0x7634('0x60')]({'where':{'id':_0x23349e}})[_0x7634('0x28')](function(_0x4ed824){return _0x4ed824[_0x7634('0x61')]({'attributes':['id'],'raw':!![]})[_0x7634('0x28')](function(_0x1561d5){var _0x976602=_[_0x7634('0x62')](_0x1561d5,'id');_0x2dbe8b(_0x976602);});})['catch'](function(_0x438665){_0x47c8ee(_0x438665);});});}
\ No newline at end of file
+var _0x7480=['destroy','error','name','send','sendNotification','text','body','hasOwnProperty','Sequelize','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','TemplateId','view','ValidationError','recipients','Missing\x20\x27recipients\x27\x20parameter','parse','Invalid\x20\x27recipients\x27\x20object','chatqueue','faxqueue','mailqueue','voicequeue','whatsappqueue','team','includes','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','user','recipientsDescription','isEmpty','beep','SenderId','recipientsId','sortBy','sequelize','Notification','forEach','recipient','emit','notification:send','catch','Template','findOne','html','Invalid\x20\x27TemplateId\x27\x20parameter','render','startCase','User','union','ids','replace','all','flatten','map','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','redis','defaults','localhost','socket.io-emitter','end','status','json','offset','limit','Content-Range','reject','update','then'];(function(_0x4036b6,_0x5adaf2){var _0x358588=function(_0x1e817e){while(--_0x1e817e){_0x4036b6['push'](_0x4036b6['shift']());}};_0x358588(++_0x5adaf2);}(_0x7480,0x94));var _0x0748=function(_0x1b00b8,_0x52cef9){_0x1b00b8=_0x1b00b8-0x0;var _0x11248a=_0x7480[_0x1b00b8];return _0x11248a;};'use strict';var pdf=require(_0x0748('0x0'));var emlformat=require(_0x0748('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x0748('0x2'));var jsonpatch=require(_0x0748('0x3'));var rp=require(_0x0748('0x4'));var moment=require(_0x0748('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0748('0x6'));var util=require('util');var path=require(_0x0748('0x7'));var sox=require(_0x0748('0x8'));var csv=require(_0x0748('0x9'));var ejs=require(_0x0748('0xa'));var fs=require('fs');var _=require(_0x0748('0xb'));var squel=require(_0x0748('0xc'));var crypto=require(_0x0748('0xd'));var jsforce=require(_0x0748('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x0748('0x9'));var querystring=require(_0x0748('0xf'));var Papa=require(_0x0748('0x10'));var Redis=require(_0x0748('0x11'));var authService=require(_0x0748('0x12'));var qs=require(_0x0748('0x13'));var as=require(_0x0748('0x14'));var hardwareService=require(_0x0748('0x15'));var logger=require(_0x0748('0x16'))(_0x0748('0x17'));var utils=require('../../config/utils');var config=require(_0x0748('0x18'));var db=require('../../mysqldb')['db'];config[_0x0748('0x19')]=_[_0x0748('0x1a')](config[_0x0748('0x19')],{'host':_0x0748('0x1b'),'port':0x18eb});var socket=require(_0x0748('0x1c'))(new Redis(config[_0x0748('0x19')]));require('./notification.socket')['register'](socket);function respondWithStatusCode(_0x47cb28,_0xe177cd){_0xe177cd=_0xe177cd||0xcc;return function(_0x1eb70c){if(_0x1eb70c){return _0x47cb28['sendStatus'](_0xe177cd);}return _0x47cb28['status'](_0xe177cd)[_0x0748('0x1d')]();};}function respondWithResult(_0x150ec7,_0x511eb5){_0x511eb5=_0x511eb5||0xc8;return function(_0x51ac85){if(_0x51ac85){return _0x150ec7[_0x0748('0x1e')](_0x511eb5)[_0x0748('0x1f')](_0x51ac85);}};}function respondWithFilteredResult(_0x761441,_0x2630be){return function(_0x41afc4){if(_0x41afc4){var _0x4384ae=_0x41afc4['count'],_0x34684d=_0x2630be['offset'],_0x1648aa=_0x2630be[_0x0748('0x20')]+_0x2630be[_0x0748('0x21')],_0x552997;if(_0x1648aa>=_0x4384ae){_0x1648aa=_0x4384ae;_0x552997=0xc8;}else{_0x552997=0xce;}_0x761441['status'](_0x552997);return _0x761441['set'](_0x0748('0x22'),_0x34684d+'-'+_0x1648aa+'/'+_0x4384ae)[_0x0748('0x1f')](_0x41afc4);}return null;};}function patchUpdates(_0x4cec35){return function(_0x4dbbf4){try{jsonpatch['apply'](_0x4dbbf4,_0x4cec35,!![]);}catch(_0x35f552){return BPromise[_0x0748('0x23')](_0x35f552);}return _0x4dbbf4['save']();};}function saveUpdates(_0x484953,_0x5f5897){return function(_0x4bb776){if(_0x4bb776){return _0x4bb776[_0x0748('0x24')](_0x484953)[_0x0748('0x25')](function(_0x14cfdf){return _0x14cfdf;});}return null;};}function removeEntity(_0x551292,_0x2db83a){return function(_0x406dcc){if(_0x406dcc){return _0x406dcc[_0x0748('0x26')]()[_0x0748('0x25')](function(){_0x551292['status'](0xcc)[_0x0748('0x1d')]();});}};}function handleEntityNotFound(_0x1adf05,_0x511ee9){return function(_0x198b5a){if(!_0x198b5a){_0x1adf05['sendStatus'](0x194);}return _0x198b5a;};}function handleError(_0x3551bb,_0x1d1037){_0x1d1037=_0x1d1037||0x1f4;return function(_0x2d6c82){logger[_0x0748('0x27')](_0x2d6c82['stack']);if(_0x2d6c82['name']){delete _0x2d6c82[_0x0748('0x28')];}_0x3551bb[_0x0748('0x1e')](_0x1d1037)[_0x0748('0x29')](_0x2d6c82);};}exports[_0x0748('0x2a')]=function(_0x2636c4,_0x357ba7,_0x10fb92){if(!_0x2636c4['body']['hasOwnProperty'](_0x0748('0x2b'))&&!_0x2636c4[_0x0748('0x2c')][_0x0748('0x2d')]('TemplateId')){throw new db[(_0x0748('0x2e'))]['ValidationError'](_0x0748('0x2f'));}else{if(_0x2636c4[_0x0748('0x2c')][_0x0748('0x2d')](_0x0748('0x30'))&&!_0x2636c4[_0x0748('0x2c')][_0x0748('0x2d')](_0x0748('0x31'))){throw new db[(_0x0748('0x2e'))][(_0x0748('0x32'))]('Missing\x20\x27view\x27\x20parameter');}if(!_0x2636c4[_0x0748('0x2c')][_0x0748('0x2d')](_0x0748('0x33'))){throw new db[(_0x0748('0x2e'))]['ValidationError'](_0x0748('0x34'));}else{try{var _0x3f5b9b=JSON[_0x0748('0x35')](_0x2636c4[_0x0748('0x2c')]['recipients']);}catch(_0x1fdf83){logger[_0x0748('0x27')](_0x1fdf83);throw new db[(_0x0748('0x2e'))][(_0x0748('0x32'))](_0x0748('0x36'));}var _0x81d104=[_0x0748('0x37'),_0x0748('0x38'),_0x0748('0x39'),'openchannelqueue','smsqueue',_0x0748('0x3a'),_0x0748('0x3b'),_0x0748('0x3c'),'user'];if(_['some'](_0x3f5b9b,function(_0x360b23){return!_[_0x0748('0x3d')](_0x81d104,_0x360b23[_0x0748('0x3e')][_0x0748('0x3f')]());})){throw new db[(_0x0748('0x2e'))]['ValidationError'](_0x0748('0x40'));}}}var _0x271451={};_0x271451[_0x0748('0x41')]=_0x2636c4[_0x0748('0x2c')]['hasOwnProperty'](_0x0748('0x41'))?_0x2636c4[_0x0748('0x2c')][_0x0748('0x41')]:_0x2636c4[_0x0748('0x42')]['fullname'];_0x271451[_0x0748('0x43')]=_[_0x0748('0x44')](_0x2636c4[_0x0748('0x2c')][_0x0748('0x43')])?null:_0x2636c4[_0x0748('0x2c')][_0x0748('0x43')];_0x271451[_0x0748('0x45')]=_0x2636c4['body'][_0x0748('0x45')]||![];_0x271451[_0x0748('0x46')]=_0x2636c4[_0x0748('0x42')]['id'];return getContent(_0x2636c4[_0x0748('0x2c')])[_0x0748('0x25')](function(_0x455e34){_0x271451[_0x0748('0x2c')]=_0x455e34;return getRecipients(_0x3f5b9b);})[_0x0748('0x25')](function(_0x3827a9){_0x271451[_0x0748('0x47')]=_[_0x0748('0x48')](_0x3827a9)['join'](',');return db[_0x0748('0x49')]['transaction'](function(_0x1e789d){return db[_0x0748('0x4a')]['create'](_0x271451,{'raw':!![],'transaction':_0x1e789d})[_0x0748('0x25')](function(_0x1c11f2){var _0x1e5191={'sender':_0x271451[_0x0748('0x41')],'description':_0x271451['recipientsDescription'],'content':_0x271451[_0x0748('0x2c')],'beep':_0x271451[_0x0748('0x45')]};_0x3827a9[_0x0748('0x4b')](function(_0x122243){_0x1e5191[_0x0748('0x4c')]=_0x122243;socket[_0x0748('0x4d')](_0x0748('0x4e'),_0x1e5191);});return _0x1c11f2;});});})[_0x0748('0x25')](respondWithResult(_0x357ba7,0xc9))[_0x0748('0x4f')](handleError(_0x357ba7,null));};function getContent(_0x2497f4){return new BPromise(function(_0x541450,_0x1e2914){if(_0x2497f4[_0x0748('0x2b')]){_0x541450(_0x2497f4[_0x0748('0x2b')]);return;}return db[_0x0748('0x50')][_0x0748('0x51')]({'attributes':[_0x0748('0x52')],'where':{'id':_0x2497f4[_0x0748('0x30')]},'raw':!![]})[_0x0748('0x25')](function(_0x4f7791){if(!_0x4f7791)throw new db[(_0x0748('0x2e'))][(_0x0748('0x32'))](_0x0748('0x53'));var _0x17659c=Mustache[_0x0748('0x54')](_0x4f7791['html'],_0x2497f4[_0x0748('0x31')]);_0x541450(_0x17659c);})['catch'](function(_0x5597cd){_0x1e2914(_0x5597cd);});});}function getRecipients(_0x2305ea){return new BPromise(function(_0x4d7d64,_0x555bd9){var _0x5a396a=[];var _0x255544=[];_0x2305ea[_0x0748('0x4b')](function(_0x1a8eee){var _0x2f9843=_[_0x0748('0x55')](_0x1a8eee[_0x0748('0x3e')]['toLowerCase']());if(_0x2f9843===_0x0748('0x56')){_0x5a396a=_[_0x0748('0x57')](_0x5a396a,_0x1a8eee[_0x0748('0x58')]);}else{if(_['includes'](_0x2f9843,'queue'))_0x2f9843=_0x2f9843[_0x0748('0x59')]('queue','Queue');_0x1a8eee[_0x0748('0x58')][_0x0748('0x4b')](function(_0x2d3cb2){_0x255544['push'](getAgents(_0x2f9843,_0x2d3cb2));});}});return BPromise[_0x0748('0x5a')](_0x255544)[_0x0748('0x25')](function(_0x21f856){_0x5a396a=_[_0x0748('0x57')](_0x5a396a,_[_0x0748('0x5b')](_0x21f856));_0x4d7d64(_0x5a396a);})[_0x0748('0x4f')](function(_0xabe2d2){_0x555bd9(_0xabe2d2);});});}function getAgents(_0x5a3220,_0x1a8e1a){return new BPromise(function(_0x480da8,_0x16a901){return db[_0x5a3220]['findOne']({'where':{'id':_0x1a8e1a}})[_0x0748('0x25')](function(_0x5c3f76){return _0x5c3f76['getAgents']({'attributes':['id'],'raw':!![]})['then'](function(_0x2a21cf){var _0x3cf02e=_[_0x0748('0x5c')](_0x2a21cf,'id');_0x480da8(_0x3cf02e);});})[_0x0748('0x4f')](function(_0x5e6781){_0x16a901(_0x5e6781);});});}
\ No newline at end of file
diff --git a/server/api/notification/notification.events.js b/server/api/notification/notification.events.js
index 19320c5..36d7160 100644
--- a/server/api/notification/notification.events.js
+++ b/server/api/notification/notification.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdb28=['Notification','setMaxListeners','update','remove','emit','exports','events','../../mysqldb'];(function(_0x28cf98,_0x4ed326){var _0x196c5e=function(_0x560639){while(--_0x560639){_0x28cf98['push'](_0x28cf98['shift']());}};_0x196c5e(++_0x4ed326);}(_0xdb28,0x106));var _0x8db2=function(_0x2e6cac,_0x1e5262){_0x2e6cac=_0x2e6cac-0x0;var _0x5e76e9=_0xdb28[_0x2e6cac];return _0x5e76e9;};'use strict';var EventEmitter=require(_0x8db2('0x0'));var Notification=require(_0x8db2('0x1'))['db'][_0x8db2('0x2')];var NotificationEvents=new EventEmitter();NotificationEvents[_0x8db2('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x8db2('0x4'),'afterDestroy':_0x8db2('0x5')};function emitEvent(_0xfcf49f){return function(_0x4426fe,_0x11109e,_0x52bf99){NotificationEvents[_0x8db2('0x6')](_0xfcf49f+':'+_0x4426fe['id'],_0x4426fe);NotificationEvents[_0x8db2('0x6')](_0xfcf49f,_0x4426fe);_0x52bf99(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Notification['hook'](e,emitEvent(event));}}module[_0x8db2('0x7')]=NotificationEvents;
\ No newline at end of file
+var _0x757a=['../../mysqldb','Notification','remove','emit','hasOwnProperty','hook'];(function(_0x176dae,_0xe1b203){var _0x2fc794=function(_0x499717){while(--_0x499717){_0x176dae['push'](_0x176dae['shift']());}};_0x2fc794(++_0xe1b203);}(_0x757a,0xde));var _0xa757=function(_0x4683f8,_0x2db7bb){_0x4683f8=_0x4683f8-0x0;var _0x38dcb3=_0x757a[_0x4683f8];return _0x38dcb3;};'use strict';var EventEmitter=require('events');var Notification=require(_0xa757('0x0'))['db'][_0xa757('0x1')];var NotificationEvents=new EventEmitter();NotificationEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xa757('0x2')};function emitEvent(_0x1721c6){return function(_0x1c2932,_0x453d07,_0x32630d){NotificationEvents[_0xa757('0x3')](_0x1721c6+':'+_0x1c2932['id'],_0x1c2932);NotificationEvents['emit'](_0x1721c6,_0x1c2932);_0x32630d(null);};}for(var e in events){if(events[_0xa757('0x4')](e)){var event=events[e];Notification[_0xa757('0x5')](e,emitEvent(event));}}module['exports']=NotificationEvents;
\ No newline at end of file
diff --git a/server/api/notification/notification.model.js b/server/api/notification/notification.model.js
index 9f66d58..bd9dcd4 100644
--- a/server/api/notification/notification.model.js
+++ b/server/api/notification/notification.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf537=['Notification','notifications','lodash','util','../../config/logger','moment','request-promise','path','rimraf','./notification.attributes','exports'];(function(_0x3e2480,_0x2eed70){var _0x652c0=function(_0xaae5d2){while(--_0xaae5d2){_0x3e2480['push'](_0x3e2480['shift']());}};_0x652c0(++_0x2eed70);}(_0xf537,0xa7));var _0x7f53=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf537[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x7f53('0x0'));var util=require(_0x7f53('0x1'));var logger=require(_0x7f53('0x2'))('api');var moment=require(_0x7f53('0x3'));var BPromise=require('bluebird');var rp=require(_0x7f53('0x4'));var fs=require('fs');var path=require(_0x7f53('0x5'));var rimraf=require(_0x7f53('0x6'));var config=require('../../config/environment');var attributes=require(_0x7f53('0x7'));module[_0x7f53('0x8')]=function(_0xaf2234,_0x148a50){return _0xaf2234['define'](_0x7f53('0x9'),attributes,{'tableName':_0x7f53('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x09f2=['moment','bluebird','path','rimraf','../../config/environment','./notification.attributes','Notification','notifications','utf8mb4_unicode_ci','lodash','util','../../config/logger','api'];(function(_0x8663dc,_0x28b7ad){var _0x4440d7=function(_0x406bc0){while(--_0x406bc0){_0x8663dc['push'](_0x8663dc['shift']());}};_0x4440d7(++_0x28b7ad);}(_0x09f2,0xf3));var _0x209f=function(_0x41047d,_0x335179){_0x41047d=_0x41047d-0x0;var _0x50148b=_0x09f2[_0x41047d];return _0x50148b;};'use strict';var _=require(_0x209f('0x0'));var util=require(_0x209f('0x1'));var logger=require(_0x209f('0x2'))(_0x209f('0x3'));var moment=require(_0x209f('0x4'));var BPromise=require(_0x209f('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x209f('0x6'));var rimraf=require(_0x209f('0x7'));var config=require(_0x209f('0x8'));var attributes=require(_0x209f('0x9'));module['exports']=function(_0x5b9d27,_0xebeffe){return _0x5b9d27['define'](_0x209f('0xa'),attributes,{'tableName':_0x209f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x209f('0xc')});};
\ No newline at end of file
diff --git a/server/api/notification/notification.rpc.js b/server/api/notification/notification.rpc.js
index c4cdfd7..2b1219a 100644
--- a/server/api/notification/notification.rpc.js
+++ b/server/api/notification/notification.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2a0a=['../../config/logger','rpc','jayson/promise','client','http','redis','socket.io-emitter','request','then','info','Notification,\x20%s,\x20%s','debug','Notification,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x1203f,_0x554bbc){var _0x365f0a=function(_0x3531d0){while(--_0x3531d0){_0x1203f['push'](_0x1203f['shift']());}};_0x365f0a(++_0x554bbc);}(_0x2a0a,0x162));var _0xa2a0=function(_0x53b280,_0x2e1bdb){_0x53b280=_0x53b280-0x0;var _0x599754=_0x2a0a[_0x53b280];return _0x599754;};'use strict';var _=require(_0xa2a0('0x0'));var util=require(_0xa2a0('0x1'));var moment=require(_0xa2a0('0x2'));var BPromise=require(_0xa2a0('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa2a0('0x4'));var db=require(_0xa2a0('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xa2a0('0x6'))(_0xa2a0('0x7'));var config=require('../../config/environment');var jayson=require(_0xa2a0('0x8'));var client=jayson[_0xa2a0('0x9')][_0xa2a0('0xa')]({'port':0x232a});config[_0xa2a0('0xb')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xa2a0('0xc'))(new Redis(config[_0xa2a0('0xb')]));require('./notification.socket')['register'](socket);function respondWithRpcPromise(_0x3eabd1,_0x15cebc,_0x5ac4df){return new BPromise(function(_0x4b5566,_0x4a32b0){return client[_0xa2a0('0xd')](_0x3eabd1,_0x5ac4df)[_0xa2a0('0xe')](function(_0x3cab7f){logger[_0xa2a0('0xf')](_0xa2a0('0x10'),_0x15cebc,'request\x20sent');logger[_0xa2a0('0x11')](_0xa2a0('0x12'),_0x15cebc,_0xa2a0('0x13'),JSON['stringify'](_0x3cab7f));if(_0x3cab7f[_0xa2a0('0x14')]){if(_0x3cab7f[_0xa2a0('0x14')]['code']===0x1f4){logger[_0xa2a0('0x14')]('Notification,\x20%s,\x20%s',_0x15cebc,_0x3cab7f[_0xa2a0('0x14')][_0xa2a0('0x15')]);return _0x4a32b0(_0x3cab7f[_0xa2a0('0x14')][_0xa2a0('0x15')]);}logger[_0xa2a0('0x14')](_0xa2a0('0x10'),_0x15cebc,_0x3cab7f[_0xa2a0('0x14')][_0xa2a0('0x15')]);return _0x4b5566(_0x3cab7f[_0xa2a0('0x14')][_0xa2a0('0x15')]);}else{logger[_0xa2a0('0xf')](_0xa2a0('0x10'),_0x15cebc,_0xa2a0('0x13'));_0x4b5566(_0x3cab7f[_0xa2a0('0x16')][_0xa2a0('0x15')]);}})[_0xa2a0('0x17')](function(_0xa7dc56){logger[_0xa2a0('0x14')](_0xa2a0('0x10'),_0x15cebc,_0xa7dc56);_0x4a32b0(_0xa7dc56);});});}
\ No newline at end of file
+var _0x6120=['then','debug','Notification,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','Notification,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','./notification.socket','register'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6120,0xad));var _0x0612=function(_0x38e6f5,_0x119f80){_0x38e6f5=_0x38e6f5-0x0;var _0x559763=_0x6120[_0x38e6f5];return _0x559763;};'use strict';var _=require(_0x0612('0x0'));var util=require(_0x0612('0x1'));var moment=require(_0x0612('0x2'));var BPromise=require(_0x0612('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0612('0x4'));var db=require(_0x0612('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0612('0x6'))(_0x0612('0x7'));var config=require('../../config/environment');var jayson=require(_0x0612('0x8'));var client=jayson[_0x0612('0x9')][_0x0612('0xa')]({'port':0x232a});config[_0x0612('0xb')]=_[_0x0612('0xc')](config[_0x0612('0xb')],{'host':_0x0612('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0612('0xb')]));require(_0x0612('0xe'))[_0x0612('0xf')](socket);function respondWithRpcPromise(_0x29fef6,_0x52edcd,_0x4c9a26){return new BPromise(function(_0xb4a213,_0xbfd80e){return client['request'](_0x29fef6,_0x4c9a26)[_0x0612('0x10')](function(_0x2ded70){logger['info']('Notification,\x20%s,\x20%s',_0x52edcd,'request\x20sent');logger[_0x0612('0x11')](_0x0612('0x12'),_0x52edcd,_0x0612('0x13'),JSON['stringify'](_0x2ded70));if(_0x2ded70[_0x0612('0x14')]){if(_0x2ded70[_0x0612('0x14')][_0x0612('0x15')]===0x1f4){logger[_0x0612('0x14')](_0x0612('0x16'),_0x52edcd,_0x2ded70[_0x0612('0x14')][_0x0612('0x17')]);return _0xbfd80e(_0x2ded70['error'][_0x0612('0x17')]);}logger['error'](_0x0612('0x16'),_0x52edcd,_0x2ded70[_0x0612('0x14')][_0x0612('0x17')]);return _0xb4a213(_0x2ded70['error']['message']);}else{logger[_0x0612('0x18')](_0x0612('0x16'),_0x52edcd,_0x0612('0x13'));_0xb4a213(_0x2ded70[_0x0612('0x19')]['message']);}})[_0x0612('0x1a')](function(_0x2d4a4b){logger[_0x0612('0x14')](_0x0612('0x16'),_0x52edcd,_0x2d4a4b);_0xbfd80e(_0x2d4a4b);});});}
\ No newline at end of file
diff --git a/server/api/notification/notification.socket.js b/server/api/notification/notification.socket.js
index 682a04c..d6b74b4 100644
--- a/server/api/notification/notification.socket.js
+++ b/server/api/notification/notification.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf66d=['removeListener','register','length','notification:','./notification.events','remove','update','emit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf66d,0x84));var _0xdf66=function(_0x9aada2,_0xd2d349){_0x9aada2=_0x9aada2-0x0;var _0x196dff=_0xf66d[_0x9aada2];return _0x196dff;};'use strict';var NotificationEvents=require(_0xdf66('0x0'));var events=['save',_0xdf66('0x1'),_0xdf66('0x2')];function createListener(_0x29586b,_0xfd3d30){return function(_0x2f51a6){_0xfd3d30[_0xdf66('0x3')](_0x29586b,_0x2f51a6);};}function removeListener(_0x3cc219,_0x3d3e8b){return function(){NotificationEvents[_0xdf66('0x4')](_0x3cc219,_0x3d3e8b);};}exports[_0xdf66('0x5')]=function(_0x55953e){for(var _0x501284=0x0,_0x7ae0e=events[_0xdf66('0x6')];_0x501284<_0x7ae0e;_0x501284++){var _0x55002b=events[_0x501284];var _0x479296=createListener(_0xdf66('0x7')+_0x55002b,_0x55953e);NotificationEvents['on'](_0x55002b,_0x479296);}};
\ No newline at end of file
+var _0xdb0a=['notification:','./notification.events','update','emit','removeListener','register'];(function(_0x1d6f82,_0x1e3208){var _0x1d9c09=function(_0x1312a3){while(--_0x1312a3){_0x1d6f82['push'](_0x1d6f82['shift']());}};_0x1d9c09(++_0x1e3208);}(_0xdb0a,0x1b1));var _0xadb0=function(_0x33e76f,_0x3dc4c3){_0x33e76f=_0x33e76f-0x0;var _0x5edadc=_0xdb0a[_0x33e76f];return _0x5edadc;};'use strict';var NotificationEvents=require(_0xadb0('0x0'));var events=['save','remove',_0xadb0('0x1')];function createListener(_0x50d857,_0xc9947c){return function(_0xab0f4b){_0xc9947c[_0xadb0('0x2')](_0x50d857,_0xab0f4b);};}function removeListener(_0x146cfd,_0x47a3d1){return function(){NotificationEvents[_0xadb0('0x3')](_0x146cfd,_0x47a3d1);};}exports[_0xadb0('0x4')]=function(_0x38f0b7){for(var _0x35a5df=0x0,_0x533182=events['length'];_0x35a5df<_0x533182;_0x35a5df++){var _0xa3330f=events[_0x35a5df];var _0x2d2475=createListener(_0xadb0('0x5')+_0xa3330f,_0x38f0b7);NotificationEvents['on'](_0xa3330f,_0x2d2475);}};
\ No newline at end of file
diff --git a/server/api/openchannelAccount/index.js b/server/api/openchannelAccount/index.js
index 8a83a5f..8c53e0e 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 _0x81cc=['getAnswers','/:id/applications','getApplications','/:id/interactions','getInteractions','/:id/users','post','create','/:id/dispositions','/:id/canned_answers','addAnswer','/:id/notify','notify','/:id','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','multer','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelAccount.controller','get','index','/describe','describe','isAuthenticated','show','getDispositions'];(function(_0x44268d,_0xad8443){var _0x4be92d=function(_0x8a57ff){while(--_0x8a57ff){_0x44268d['push'](_0x44268d['shift']());}};_0x4be92d(++_0xad8443);}(_0x81cc,0x1f0));var _0xc81c=function(_0x1463a7,_0x4e8cc6){_0x1463a7=_0x1463a7-0x0;var _0x31bed3=_0x81cc[_0x1463a7];return _0x31bed3;};'use strict';var multer=require(_0xc81c('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xc81c('0x1'));var express=require('express');var router=express[_0xc81c('0x2')]();var auth=require(_0xc81c('0x3'));var interaction=require(_0xc81c('0x4'));var config=require(_0xc81c('0x5'));var controller=require(_0xc81c('0x6'));router[_0xc81c('0x7')]('/',auth['isAuthenticated'](),controller[_0xc81c('0x8')]);router[_0xc81c('0x7')](_0xc81c('0x9'),auth['isAuthenticated'](),controller[_0xc81c('0xa')]);router[_0xc81c('0x7')]('/:id',auth[_0xc81c('0xb')](),controller[_0xc81c('0xc')]);router[_0xc81c('0x7')]('/:id/dispositions',auth[_0xc81c('0xb')](),controller[_0xc81c('0xd')]);router[_0xc81c('0x7')]('/:id/canned_answers',auth[_0xc81c('0xb')](),controller[_0xc81c('0xe')]);router[_0xc81c('0x7')](_0xc81c('0xf'),auth['isAuthenticated'](),controller[_0xc81c('0x10')]);router[_0xc81c('0x7')](_0xc81c('0x11'),auth[_0xc81c('0xb')](),controller[_0xc81c('0x12')]);router[_0xc81c('0x7')](_0xc81c('0x13'),auth[_0xc81c('0xb')](),controller['getAgents']);router[_0xc81c('0x14')]('/',auth[_0xc81c('0xb')](),controller[_0xc81c('0x15')]);router[_0xc81c('0x14')](_0xc81c('0x16'),auth['isAuthenticated'](),controller['addDisposition']);router[_0xc81c('0x14')](_0xc81c('0x17'),auth['isAuthenticated'](),controller[_0xc81c('0x18')]);router['post'](_0xc81c('0x19'),controller[_0xc81c('0x1a')]);router[_0xc81c('0x14')](_0xc81c('0xf'),auth[_0xc81c('0xb')](),controller['addApplications']);router[_0xc81c('0x14')]('/:id/users',auth[_0xc81c('0xb')](),controller['addAgents']);router[_0xc81c('0x14')]('/:id/send',auth['isAuthenticated'](),controller['send']);router['put'](_0xc81c('0x1b'),auth[_0xc81c('0xb')](),controller[_0xc81c('0x1c')]);router[_0xc81c('0x1d')]('/:id',auth['isAuthenticated'](),controller[_0xc81c('0x1e')]);router[_0xc81c('0x1d')](_0xc81c('0x16'),auth[_0xc81c('0xb')](),controller[_0xc81c('0x1f')]);router[_0xc81c('0x1d')](_0xc81c('0x17'),auth[_0xc81c('0xb')](),controller[_0xc81c('0x20')]);router[_0xc81c('0x1d')](_0xc81c('0x13'),auth[_0xc81c('0xb')](),controller[_0xc81c('0x21')]);module['exports']=router;
\ No newline at end of file
+var _0xe539=['destroy','delete','removeDispositions','removeAnswers','removeAgents','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./openchannelAccount.controller','get','isAuthenticated','index','describe','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/interactions','getInteractions','/:id/users','post','create','addDisposition','addAnswer','/:id/notify','notify','/:id/applications','addApplications','addAgents','send','update'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0xe539,0x163));var _0x9e53=function(_0x1778e1,_0x3e1727){_0x1778e1=_0x1778e1-0x0;var _0x2bc4c6=_0xe539[_0x1778e1];return _0x2bc4c6;};'use strict';var multer=require(_0x9e53('0x0'));var util=require('util');var path=require(_0x9e53('0x1'));var timeout=require(_0x9e53('0x2'));var express=require(_0x9e53('0x3'));var router=express[_0x9e53('0x4')]();var auth=require(_0x9e53('0x5'));var interaction=require(_0x9e53('0x6'));var config=require('../../config/environment');var controller=require(_0x9e53('0x7'));router[_0x9e53('0x8')]('/',auth[_0x9e53('0x9')](),controller[_0x9e53('0xa')]);router[_0x9e53('0x8')]('/describe',auth[_0x9e53('0x9')](),controller[_0x9e53('0xb')]);router[_0x9e53('0x8')]('/:id',auth[_0x9e53('0x9')](),controller['show']);router[_0x9e53('0x8')](_0x9e53('0xc'),auth['isAuthenticated'](),controller[_0x9e53('0xd')]);router[_0x9e53('0x8')](_0x9e53('0xe'),auth[_0x9e53('0x9')](),controller[_0x9e53('0xf')]);router['get']('/:id/applications',auth[_0x9e53('0x9')](),controller['getApplications']);router[_0x9e53('0x8')](_0x9e53('0x10'),auth['isAuthenticated'](),controller[_0x9e53('0x11')]);router[_0x9e53('0x8')](_0x9e53('0x12'),auth[_0x9e53('0x9')](),controller['getAgents']);router[_0x9e53('0x13')]('/',auth[_0x9e53('0x9')](),controller[_0x9e53('0x14')]);router[_0x9e53('0x13')](_0x9e53('0xc'),auth[_0x9e53('0x9')](),controller[_0x9e53('0x15')]);router[_0x9e53('0x13')](_0x9e53('0xe'),auth['isAuthenticated'](),controller[_0x9e53('0x16')]);router[_0x9e53('0x13')](_0x9e53('0x17'),controller[_0x9e53('0x18')]);router['post'](_0x9e53('0x19'),auth[_0x9e53('0x9')](),controller[_0x9e53('0x1a')]);router['post'](_0x9e53('0x12'),auth[_0x9e53('0x9')](),controller[_0x9e53('0x1b')]);router[_0x9e53('0x13')]('/:id/send',auth['isAuthenticated'](),controller[_0x9e53('0x1c')]);router['put']('/:id',auth[_0x9e53('0x9')](),controller[_0x9e53('0x1d')]);router['delete']('/:id',auth[_0x9e53('0x9')](),controller[_0x9e53('0x1e')]);router[_0x9e53('0x1f')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0x9e53('0x20')]);router['delete'](_0x9e53('0xe'),auth['isAuthenticated'](),controller[_0x9e53('0x21')]);router[_0x9e53('0x1f')](_0x9e53('0x12'),auth[_0x9e53('0x9')](),controller[_0x9e53('0x22')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.attributes.js b/server/api/openchannelAccount/openchannelAccount.attributes.js
index f3dda14..3546369 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 _0x41a0=['STRING','name','generate','TEXT','BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x41a0,0xa6));var _0x041a=function(_0x352a0c,_0xae529a){_0x352a0c=_0x352a0c-0x0;var _0x23e35e=_0x41a0[_0x352a0c];return _0x23e35e;};'use strict';var Sequelize=require(_0x041a('0x0'));var rs=require(_0x041a('0x1'));module[_0x041a('0x2')]={'name':{'type':Sequelize[_0x041a('0x3')],'unique':_0x041a('0x4'),'allowNull':![]},'description':{'type':Sequelize[_0x041a('0x3')]},'token':{'type':Sequelize[_0x041a('0x3')],'defaultValue':function(){return rs[_0x041a('0x5')]();}},'replyUri':{'type':Sequelize[_0x041a('0x3')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x041a('0x3')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x041a('0x6')],'defaultValue':function(){return'Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x041a('0x7')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x041a('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x041a('0x3')]},'queueTransfer':{'type':Sequelize[_0x041a('0x7')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x041a('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x041a('0x7')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x041a('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x041a('0x7')],'defaultValue':![],'comment':_0x041a('0x9'),'set':function(_0x5a75e8){if(!_0x5a75e8)this[_0x041a('0xa')](_0x041a('0xb'),null);this['setDataValue'](_0x041a('0xc'),_0x5a75e8);}}};
\ No newline at end of file
+var _0x0740=['mandatoryDispositionPauseId','sequelize','randomstring','exports','STRING','name','generate','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue'];(function(_0x5c79ff,_0x133442){var _0x53acc6=function(_0x6ded20){while(--_0x6ded20){_0x5c79ff['push'](_0x5c79ff['shift']());}};_0x53acc6(++_0x133442);}(_0x0740,0xc1));var _0x0074=function(_0x4435f3,_0x3efd2a){_0x4435f3=_0x4435f3-0x0;var _0x1c5e1d=_0x0740[_0x4435f3];return _0x1c5e1d;};'use strict';var Sequelize=require(_0x0074('0x0'));var rs=require(_0x0074('0x1'));module[_0x0074('0x2')]={'name':{'type':Sequelize[_0x0074('0x3')],'unique':_0x0074('0x4'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0x0074('0x3')],'defaultValue':function(){return rs[_0x0074('0x5')]();}},'replyUri':{'type':Sequelize[_0x0074('0x3')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x0074('0x6');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x0074('0x7')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x0074('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize['STRING']},'queueTransfer':{'type':Sequelize[_0x0074('0x7')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x0074('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x0074('0x7')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x0074('0x7')],'defaultValue':![],'comment':_0x0074('0x9'),'set':function(_0x1392cf){if(!_0x1392cf)this[_0x0074('0xa')](_0x0074('0xb'),null);this['setDataValue']('mandatoryDisposition',_0x1392cf);}}};
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.controller.js b/server/api/openchannelAccount/openchannelAccount.controller.js
index ef8fe2b..2983df3 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 _0xd2fc=['asc','defaults','contact','firstName','lastName','threadId','OpenchannelInteraction','externalUrl','ContactId','messageId','interaction','created','autoclose','push','close','unmanaged','*,*,*,*','OpenchannelMessage','AttachmentId','UserId','unshift','agent','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','sequelize','transaction','OpenchannelApplication','bulkCreate','findAndCountAll','getApplications','getInteractions','Contact','User','Owner','fullname','internal','Tag','color','tag','addAgents','emit','userOpenchannelAccount:save','isArray','userOpenchannelAccount:remove','getAgents','out','Messages','dataValues','html-pdf','rimraf','moment','bluebird','util','to-csv','ejs','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','localhost','socket.io-emitter','./openchannelAccount.socket','jayson/promise','client','http','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','request\x20sent','debug','error','code','OpenchannelAccount,\x20%s,\x20%s','message','result','status','end','json','count','offset','limit','set','apply','reject','save','update','destroy','then','get','OpenchannelAccounts','stack','name','send','index','mandatoryDispositionPause','map','OpenchannelAccount','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','hasOwnProperty','nolimit','where','filter','merge','VIRTUAL','options','includeAll','include','rows','params','Pause','length','find','catch','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','OpnechannelAccountId','Disposition','getDispositions','order','sort','pick','OpenchannelAccountId','findAll','ids','addAnswer','CannedAnswer','getAnswers','findOne','removeAnswers','notify','openchannel','CmContact','describe','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','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','CmList','List','Contacts','DESC','Applications','account','applications','orderBy','priority'];(function(_0x57524e,_0x236f11){var _0x4a0867=function(_0x472b27){while(--_0x472b27){_0x57524e['push'](_0x57524e['shift']());}};_0x4a0867(++_0x236f11);}(_0xd2fc,0xea));var _0xcd2f=function(_0x2bcc27,_0x208df4){_0x2bcc27=_0x2bcc27-0x0;var _0x25ad68=_0xd2fc[_0x2bcc27];return _0x25ad68;};'use strict';var pdf=require(_0xcd2f('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xcd2f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xcd2f('0x2'));var BPromise=require(_0xcd2f('0x3'));var Mustache=require('mustache');var util=require(_0xcd2f('0x4'));var path=require('path');var sox=require('sox');var csv=require(_0xcd2f('0x5'));var ejs=require(_0xcd2f('0x6'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xcd2f('0x7'));var jsforce=require(_0xcd2f('0x8'));var deskjs=require(_0xcd2f('0x9'));var toCsv=require(_0xcd2f('0x5'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xcd2f('0xa'));var authService=require(_0xcd2f('0xb'));var qs=require('../../components/parsers/qs');var as=require(_0xcd2f('0xc'));var hardwareService=require(_0xcd2f('0xd'));var logger=require(_0xcd2f('0xe'))(_0xcd2f('0xf'));var utils=require(_0xcd2f('0x10'));var config=require(_0xcd2f('0x11'));var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config['redis'],{'host':_0xcd2f('0x12'),'port':0x18eb});var socket=require(_0xcd2f('0x13'))(new Redis(config['redis']));require(_0xcd2f('0x14'))['register'](socket);var jayson=require(_0xcd2f('0x15'));var client=jayson[_0xcd2f('0x16')][_0xcd2f('0x17')]({'port':0x232c});var client9002=jayson[_0xcd2f('0x16')][_0xcd2f('0x17')]({'port':0x232a});function checkPasswordPattern(_0x292475,_0x259912,_0x5c4018){if(_0x5c4018){var _0x4dbcff=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4dbcff['test'](_0x259912)){return _0x292475;}else{throw new db[(_0xcd2f('0x18'))][(_0xcd2f('0x19'))](_0xcd2f('0x1a'));}}else{return _0x292475;}}function respondWithRpcPromise(_0x4b300d,_0x34c186,_0x3d24e2,_0x394e8f){return new BPromise(function(_0x25b0ea,_0x12020b){var _0x13b096=_0x394e8f||client;return _0x13b096[_0xcd2f('0x1b')](_0x4b300d,_0x3d24e2)['then'](function(_0x2079d8){logger[_0xcd2f('0x1c')]('OpenchannelAccount,\x20%s,\x20%s',_0x34c186,_0xcd2f('0x1d'));logger[_0xcd2f('0x1e')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x34c186,_0xcd2f('0x1d'),JSON['stringify'](_0x2079d8));if(_0x2079d8[_0xcd2f('0x1f')]){if(_0x2079d8[_0xcd2f('0x1f')][_0xcd2f('0x20')]===0x1f4){logger['error'](_0xcd2f('0x21'),_0x34c186,_0x2079d8[_0xcd2f('0x1f')][_0xcd2f('0x22')]);return _0x12020b(_0x2079d8[_0xcd2f('0x1f')][_0xcd2f('0x22')]);}logger[_0xcd2f('0x1f')](_0xcd2f('0x21'),_0x34c186,_0x2079d8['error']['message']);return _0x25b0ea(_0x2079d8[_0xcd2f('0x1f')][_0xcd2f('0x22')]);}else{logger[_0xcd2f('0x1c')](_0xcd2f('0x21'),_0x34c186,_0xcd2f('0x1d'));_0x25b0ea(_0x2079d8[_0xcd2f('0x23')][_0xcd2f('0x22')]);}})['catch'](function(_0x22f6e4){logger[_0xcd2f('0x1f')]('OpenchannelAccount,\x20%s,\x20%s',_0x34c186,_0x22f6e4);_0x12020b(_0x22f6e4);});});}function respondWithStatusCode(_0x8b5636,_0x3abbc6){_0x3abbc6=_0x3abbc6||0xcc;return function(_0x13c781){if(_0x13c781){return _0x8b5636['sendStatus'](_0x3abbc6);}return _0x8b5636[_0xcd2f('0x24')](_0x3abbc6)[_0xcd2f('0x25')]();};}function respondWithResult(_0x263062,_0x582692){_0x582692=_0x582692||0xc8;return function(_0x47d62b){if(_0x47d62b){return _0x263062[_0xcd2f('0x24')](_0x582692)[_0xcd2f('0x26')](_0x47d62b);}};}function respondWithFilteredResult(_0x4c6a03,_0x50b438){return function(_0x2c9e68){if(_0x2c9e68){var _0x26a8c5=_0x2c9e68[_0xcd2f('0x27')],_0x9ef351=_0x50b438[_0xcd2f('0x28')],_0x10246c=_0x50b438['offset']+_0x50b438[_0xcd2f('0x29')],_0xbd72c9;if(_0x10246c>=_0x26a8c5){_0x10246c=_0x26a8c5;_0xbd72c9=0xc8;}else{_0xbd72c9=0xce;}_0x4c6a03[_0xcd2f('0x24')](_0xbd72c9);return _0x4c6a03[_0xcd2f('0x2a')]('Content-Range',_0x9ef351+'-'+_0x10246c+'/'+_0x26a8c5)[_0xcd2f('0x26')](_0x2c9e68);}return null;};}function patchUpdates(_0x18bf2c){return function(_0x51fe2c){try{jsonpatch[_0xcd2f('0x2b')](_0x51fe2c,_0x18bf2c,!![]);}catch(_0x58df77){return BPromise[_0xcd2f('0x2c')](_0x58df77);}return _0x51fe2c[_0xcd2f('0x2d')]();};}function saveUpdates(_0x2d4531,_0x83e419){return function(_0x593327){if(_0x593327){return _0x593327[_0xcd2f('0x2e')](_0x2d4531)['then'](function(_0x18de69){return _0x18de69;});}return null;};}function removeEntity(_0x51594c,_0x482c87){return function(_0x96cce0){if(_0x96cce0){return _0x96cce0[_0xcd2f('0x2f')]()[_0xcd2f('0x30')](function(){var _0x52755e=_0x96cce0[_0xcd2f('0x31')]({'plain':!![]});var _0x248821=_0xcd2f('0x32');return db['UserProfileResource'][_0xcd2f('0x2f')]({'where':{'type':_0x248821,'resourceId':_0x52755e['id']}})['then'](function(){return _0x96cce0;});})['then'](function(){_0x51594c[_0xcd2f('0x24')](0xcc)[_0xcd2f('0x25')]();});}};}function handleEntityNotFound(_0x7d756c,_0x3bd267){return function(_0x21b784){if(!_0x21b784){_0x7d756c['sendStatus'](0x194);}return _0x21b784;};}function handleError(_0xb32d8a,_0x265237){_0x265237=_0x265237||0x1f4;return function(_0x1245ba){logger['error'](_0x1245ba[_0xcd2f('0x33')]);if(_0x1245ba['name']){delete _0x1245ba[_0xcd2f('0x34')];}_0xb32d8a['status'](_0x265237)[_0xcd2f('0x35')](_0x1245ba);};}exports[_0xcd2f('0x36')]=function(_0x3f40e8,_0x2d9e96){var _0x44c429={'include':[{'model':db['Pause'],'as':_0xcd2f('0x37')}]},_0x3d512b={},_0x230255={'count':0x0,'rows':[]};var _0x2e577a=_[_0xcd2f('0x38')](db[_0xcd2f('0x39')][_0xcd2f('0x3a')],function(_0x1f3a9f){return{'name':_0x1f3a9f[_0xcd2f('0x3b')],'type':_0x1f3a9f[_0xcd2f('0x3c')][_0xcd2f('0x3d')]};});_0x3d512b[_0xcd2f('0x3e')]=_[_0xcd2f('0x38')](_0x2e577a,'name');_0x3d512b['query']=_[_0xcd2f('0x3f')](_0x3f40e8['query']);_0x3d512b[_0xcd2f('0x40')]=_[_0xcd2f('0x41')](_0x3d512b[_0xcd2f('0x3e')],_0x3d512b[_0xcd2f('0x42')]);_0x44c429[_0xcd2f('0x43')]=_[_0xcd2f('0x41')](_0x3d512b['model'],qs[_0xcd2f('0x44')](_0x3f40e8[_0xcd2f('0x42')][_0xcd2f('0x44')]));_0x44c429['attributes']=_0x44c429[_0xcd2f('0x43')]['length']?_0x44c429[_0xcd2f('0x43')]:_0x3d512b[_0xcd2f('0x3e')];if(!_0x3f40e8[_0xcd2f('0x42')][_0xcd2f('0x45')](_0xcd2f('0x46'))){_0x44c429[_0xcd2f('0x29')]=qs[_0xcd2f('0x29')](_0x3f40e8['query']['limit']);_0x44c429[_0xcd2f('0x28')]=qs[_0xcd2f('0x28')](_0x3f40e8['query'][_0xcd2f('0x28')]);}_0x44c429['order']=qs['sort'](_0x3f40e8[_0xcd2f('0x42')]['sort']);_0x44c429[_0xcd2f('0x47')]=qs['filters'](_['pick'](_0x3f40e8[_0xcd2f('0x42')],_0x3d512b['filters']));if(_0x3f40e8['query'][_0xcd2f('0x48')]){_0x44c429[_0xcd2f('0x47')]=_[_0xcd2f('0x49')](_0x44c429[_0xcd2f('0x47')],{'$or':_[_0xcd2f('0x38')](_0x2e577a,function(_0x5129b2){if(_0x5129b2[_0xcd2f('0x3c')]!==_0xcd2f('0x4a')){var _0x253603={};_0x253603[_0x5129b2['name']]={'$like':'%'+_0x3f40e8['query'][_0xcd2f('0x48')]+'%'};return _0x253603;}})});}_0x44c429=_[_0xcd2f('0x49')]({},_0x44c429,_0x3f40e8[_0xcd2f('0x4b')]);var _0xf799af={'where':_0x44c429[_0xcd2f('0x47')]};return db[_0xcd2f('0x39')][_0xcd2f('0x27')](_0xf799af)[_0xcd2f('0x30')](function(_0x107a6d){_0x230255[_0xcd2f('0x27')]=_0x107a6d;if(_0x3f40e8[_0xcd2f('0x42')][_0xcd2f('0x4c')]){_0x44c429[_0xcd2f('0x4d')]=[{'all':!![]}];}return db['OpenchannelAccount']['findAll'](_0x44c429);})[_0xcd2f('0x30')](function(_0x5e2cc6){_0x230255[_0xcd2f('0x4e')]=_0x5e2cc6;return _0x230255;})[_0xcd2f('0x30')](respondWithFilteredResult(_0x2d9e96,_0x44c429))['catch'](handleError(_0x2d9e96,null));};exports['show']=function(_0x199563,_0x66f10f){var _0x575701={'raw':![],'where':{'id':_0x199563[_0xcd2f('0x4f')]['id']},'include':[{'model':db[_0xcd2f('0x50')],'as':_0xcd2f('0x37')}]},_0x55ea9f={};_0x55ea9f[_0xcd2f('0x3e')]=_[_0xcd2f('0x3f')](db[_0xcd2f('0x39')][_0xcd2f('0x3a')]);_0x55ea9f[_0xcd2f('0x42')]=_[_0xcd2f('0x3f')](_0x199563[_0xcd2f('0x42')]);_0x55ea9f[_0xcd2f('0x40')]=_['intersection'](_0x55ea9f[_0xcd2f('0x3e')],_0x55ea9f[_0xcd2f('0x42')]);_0x575701[_0xcd2f('0x43')]=_['intersection'](_0x55ea9f[_0xcd2f('0x3e')],qs[_0xcd2f('0x44')](_0x199563[_0xcd2f('0x42')][_0xcd2f('0x44')]));_0x575701[_0xcd2f('0x43')]=_0x575701['attributes'][_0xcd2f('0x51')]?_0x575701['attributes']:_0x55ea9f['model'];if(_0x199563[_0xcd2f('0x42')][_0xcd2f('0x4c')]){_0x575701['include']=[{'all':!![]}];}_0x575701=_['merge']({},_0x575701,_0x199563['options']);return db[_0xcd2f('0x39')][_0xcd2f('0x52')](_0x575701)['then'](handleEntityNotFound(_0x66f10f,null))[_0xcd2f('0x30')](respondWithResult(_0x66f10f,null))[_0xcd2f('0x53')](handleError(_0x66f10f,null));};exports[_0xcd2f('0x54')]=function(_0x5c8184,_0x532522){return db[_0xcd2f('0x39')][_0xcd2f('0x54')](_0x5c8184[_0xcd2f('0x55')],{})[_0xcd2f('0x30')](function(_0x2b0264){var _0x196868=_0x5c8184['user'][_0xcd2f('0x31')]({'plain':!![]});if(!_0x196868)throw new Error(_0xcd2f('0x56'));if(_0x196868[_0xcd2f('0x57')]===_0xcd2f('0x58')){var _0x3dbd8d=_0x2b0264[_0xcd2f('0x31')]({'plain':!![]});var _0x2c8521=_0xcd2f('0x32');return db['UserProfileSection'][_0xcd2f('0x52')]({'where':{'name':_0x2c8521,'userProfileId':_0x196868['userProfileId']},'raw':!![]})[_0xcd2f('0x30')](function(_0x2fc969){if(_0x2fc969&&_0x2fc969[_0xcd2f('0x59')]===0x0){return db[_0xcd2f('0x5a')]['create']({'name':_0x3dbd8d[_0xcd2f('0x34')],'resourceId':_0x3dbd8d['id'],'type':_0x2fc969[_0xcd2f('0x34')],'sectionId':_0x2fc969['id']},{})[_0xcd2f('0x30')](function(){return _0x2b0264;});}else{return _0x2b0264;}})[_0xcd2f('0x53')](function(_0x273dc7){logger['error'](_0xcd2f('0x5b'),_0x273dc7);throw _0x273dc7;});}return _0x2b0264;})[_0xcd2f('0x30')](respondWithResult(_0x532522,0xc9))[_0xcd2f('0x53')](handleError(_0x532522,null));};exports['update']=function(_0x102f47,_0xeec9f0){if(_0x102f47['body']['id']){delete _0x102f47['body']['id'];}return db[_0xcd2f('0x39')]['find']({'where':{'id':_0x102f47[_0xcd2f('0x4f')]['id']},'include':[{'model':db[_0xcd2f('0x50')],'as':_0xcd2f('0x37')}]})[_0xcd2f('0x30')](handleEntityNotFound(_0xeec9f0,null))[_0xcd2f('0x30')](saveUpdates(_0x102f47[_0xcd2f('0x55')],null))['then'](respondWithResult(_0xeec9f0,null))[_0xcd2f('0x53')](handleError(_0xeec9f0,null));};exports['destroy']=function(_0x5b536e,_0x55a2ec){return db[_0xcd2f('0x39')]['find']({'where':{'id':_0x5b536e[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0x55a2ec,null))[_0xcd2f('0x30')](removeEntity(_0x55a2ec,null))['catch'](handleError(_0x55a2ec,null));};exports['describe']=function(_0x33d810,_0x43974c){return db[_0xcd2f('0x39')]['describe']()[_0xcd2f('0x30')](respondWithResult(_0x43974c,null))[_0xcd2f('0x53')](handleError(_0x43974c,null));};exports['addDisposition']=function(_0x559116,_0xd96db5,_0x10606d){if(_0x559116[_0xcd2f('0x55')]['id']){delete _0x559116[_0xcd2f('0x55')]['id'];}return db['OpenchannelAccount'][_0xcd2f('0x52')]({'where':{'id':_0x559116[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0xd96db5,null))[_0xcd2f('0x30')](function(_0x4192eb){if(_0x4192eb){_0x559116[_0xcd2f('0x55')][_0xcd2f('0x5c')]=_0x4192eb['id'];return db[_0xcd2f('0x5d')][_0xcd2f('0x54')](_0x559116[_0xcd2f('0x55')]);}})['then'](respondWithResult(_0xd96db5,null))['catch'](handleError(_0xd96db5,null));};exports[_0xcd2f('0x5e')]=function(_0x2c9ac3,_0x132f36,_0x212b6e){var _0x2ebe42={'raw':![],'where':{}};var _0x391ec5={};var _0x9c7b39={'count':0x0,'rows':[]};return db[_0xcd2f('0x39')]['findOne']({'where':{'id':_0x2c9ac3[_0xcd2f('0x4f')]['id']}})['then'](handleEntityNotFound(_0x132f36,null))[_0xcd2f('0x30')](function(_0x3ace6f){if(_0x3ace6f){_0x391ec5[_0xcd2f('0x3e')]=_['keys'](db[_0xcd2f('0x5d')][_0xcd2f('0x3a')]);_0x391ec5['query']=_['keys'](_0x2c9ac3[_0xcd2f('0x42')]);_0x391ec5['filters']=_['intersection'](_0x391ec5[_0xcd2f('0x3e')],_0x391ec5[_0xcd2f('0x42')]);_0x2ebe42[_0xcd2f('0x43')]=_[_0xcd2f('0x41')](_0x391ec5[_0xcd2f('0x3e')],qs[_0xcd2f('0x44')](_0x2c9ac3[_0xcd2f('0x42')]['fields']));_0x2ebe42[_0xcd2f('0x43')]=_0x2ebe42['attributes'][_0xcd2f('0x51')]?_0x2ebe42[_0xcd2f('0x43')]:_0x391ec5['model'];if(!_0x2c9ac3[_0xcd2f('0x42')][_0xcd2f('0x45')](_0xcd2f('0x46'))){_0x2ebe42['limit']=qs[_0xcd2f('0x29')](_0x2c9ac3['query'][_0xcd2f('0x29')]);_0x2ebe42['offset']=qs[_0xcd2f('0x28')](_0x2c9ac3[_0xcd2f('0x42')][_0xcd2f('0x28')]);}_0x2ebe42[_0xcd2f('0x5f')]=qs['sort'](_0x2c9ac3[_0xcd2f('0x42')][_0xcd2f('0x60')]);_0x2ebe42[_0xcd2f('0x47')]=qs[_0xcd2f('0x40')](_[_0xcd2f('0x61')](_0x2c9ac3[_0xcd2f('0x42')],_0x391ec5[_0xcd2f('0x40')]));_0x2ebe42['where'][_0xcd2f('0x62')]=_0x3ace6f['id'];if(_0x2c9ac3[_0xcd2f('0x42')]['filter']){_0x2ebe42[_0xcd2f('0x47')]=_[_0xcd2f('0x49')](_0x2ebe42[_0xcd2f('0x47')],{'$or':_[_0xcd2f('0x38')](_0x2ebe42[_0xcd2f('0x43')],function(_0x2228dc){var _0x1dabae={};_0x1dabae[_0x2228dc]={'$like':'%'+_0x2c9ac3['query'][_0xcd2f('0x48')]+'%'};return _0x1dabae;})});}_0x2ebe42=_[_0xcd2f('0x49')]({},_0x2ebe42,_0x2c9ac3[_0xcd2f('0x4b')]);return db[_0xcd2f('0x5d')][_0xcd2f('0x27')]({'where':_0x2ebe42[_0xcd2f('0x47')]})['then'](function(_0x579a24){_0x9c7b39[_0xcd2f('0x27')]=_0x579a24;if(_0x2c9ac3[_0xcd2f('0x42')][_0xcd2f('0x4c')]){_0x2ebe42[_0xcd2f('0x4d')]=[{'all':!![]}];}return db[_0xcd2f('0x5d')][_0xcd2f('0x63')](_0x2ebe42);})[_0xcd2f('0x30')](function(_0x17c05){_0x9c7b39[_0xcd2f('0x4e')]=_0x17c05;return _0x9c7b39;});}})['then'](respondWithFilteredResult(_0x132f36,_0x2ebe42))[_0xcd2f('0x53')](handleError(_0x132f36,null));};exports['removeDispositions']=function(_0x3f738a,_0x8eaada,_0x3d2cf4){return db['OpenchannelAccount'][_0xcd2f('0x52')]({'where':{'id':_0x3f738a[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0x8eaada,null))['then'](function(_0x196144){if(_0x196144){return _0x196144['removeDispositions'](_0x3f738a[_0xcd2f('0x42')][_0xcd2f('0x64')]);}})[_0xcd2f('0x30')](respondWithStatusCode(_0x8eaada,null))[_0xcd2f('0x53')](handleError(_0x8eaada,null));};exports[_0xcd2f('0x65')]=function(_0x372383,_0x2188fd,_0x8301be){if(_0x372383[_0xcd2f('0x55')]['id']){delete _0x372383[_0xcd2f('0x55')]['id'];}return db[_0xcd2f('0x39')][_0xcd2f('0x52')]({'where':{'id':_0x372383[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0x2188fd,null))[_0xcd2f('0x30')](function(_0x5010c4){if(_0x5010c4){_0x372383['body'][_0xcd2f('0x62')]=_0x5010c4['id'];return db[_0xcd2f('0x66')][_0xcd2f('0x54')](_0x372383[_0xcd2f('0x55')]);}})[_0xcd2f('0x30')](respondWithResult(_0x2188fd,null))[_0xcd2f('0x53')](handleError(_0x2188fd,null));};exports[_0xcd2f('0x67')]=function(_0x281000,_0xddd558,_0x40af6f){var _0x23d339={'raw':![],'where':{}};var _0x2f759b={};var _0x3846f9={'count':0x0,'rows':[]};return db[_0xcd2f('0x39')][_0xcd2f('0x68')]({'where':{'id':_0x281000[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0xddd558,null))['then'](function(_0x44873e){if(_0x44873e){_0x2f759b[_0xcd2f('0x3e')]=_['keys'](db['CannedAnswer'][_0xcd2f('0x3a')]);_0x2f759b[_0xcd2f('0x42')]=_[_0xcd2f('0x3f')](_0x281000[_0xcd2f('0x42')]);_0x2f759b[_0xcd2f('0x40')]=_[_0xcd2f('0x41')](_0x2f759b[_0xcd2f('0x3e')],_0x2f759b[_0xcd2f('0x42')]);_0x23d339[_0xcd2f('0x43')]=_[_0xcd2f('0x41')](_0x2f759b['model'],qs[_0xcd2f('0x44')](_0x281000[_0xcd2f('0x42')][_0xcd2f('0x44')]));_0x23d339[_0xcd2f('0x43')]=_0x23d339[_0xcd2f('0x43')]['length']?_0x23d339['attributes']:_0x2f759b[_0xcd2f('0x3e')];if(!_0x281000[_0xcd2f('0x42')][_0xcd2f('0x45')](_0xcd2f('0x46'))){_0x23d339[_0xcd2f('0x29')]=qs['limit'](_0x281000[_0xcd2f('0x42')][_0xcd2f('0x29')]);_0x23d339[_0xcd2f('0x28')]=qs['offset'](_0x281000[_0xcd2f('0x42')][_0xcd2f('0x28')]);}_0x23d339[_0xcd2f('0x5f')]=qs[_0xcd2f('0x60')](_0x281000[_0xcd2f('0x42')][_0xcd2f('0x60')]);_0x23d339[_0xcd2f('0x47')]=qs['filters'](_[_0xcd2f('0x61')](_0x281000['query'],_0x2f759b[_0xcd2f('0x40')]));_0x23d339[_0xcd2f('0x47')][_0xcd2f('0x62')]=_0x44873e['id'];if(_0x281000[_0xcd2f('0x42')][_0xcd2f('0x48')]){_0x23d339[_0xcd2f('0x47')]=_[_0xcd2f('0x49')](_0x23d339[_0xcd2f('0x47')],{'$or':_[_0xcd2f('0x38')](_0x23d339[_0xcd2f('0x43')],function(_0x21e46f){var _0x15fcc1={};_0x15fcc1[_0x21e46f]={'$like':'%'+_0x281000[_0xcd2f('0x42')][_0xcd2f('0x48')]+'%'};return _0x15fcc1;})});}_0x23d339=_[_0xcd2f('0x49')]({},_0x23d339,_0x281000[_0xcd2f('0x4b')]);return db['CannedAnswer'][_0xcd2f('0x27')]({'where':_0x23d339['where']})['then'](function(_0x44e1b0){_0x3846f9[_0xcd2f('0x27')]=_0x44e1b0;if(_0x281000[_0xcd2f('0x42')][_0xcd2f('0x4c')]){_0x23d339[_0xcd2f('0x4d')]=[{'all':!![]}];}return db[_0xcd2f('0x66')][_0xcd2f('0x63')](_0x23d339);})[_0xcd2f('0x30')](function(_0xdcb2a0){_0x3846f9[_0xcd2f('0x4e')]=_0xdcb2a0;return _0x3846f9;});}})['then'](respondWithFilteredResult(_0xddd558,_0x23d339))[_0xcd2f('0x53')](handleError(_0xddd558,null));};exports[_0xcd2f('0x69')]=function(_0x32475a,_0x262284,_0x5d49c3){return db[_0xcd2f('0x39')]['find']({'where':{'id':_0x32475a[_0xcd2f('0x4f')]['id']}})['then'](handleEntityNotFound(_0x262284,null))['then'](function(_0x2045f0){if(_0x2045f0){return _0x2045f0[_0xcd2f('0x69')](_0x32475a[_0xcd2f('0x42')][_0xcd2f('0x64')]);}})[_0xcd2f('0x30')](respondWithStatusCode(_0x262284,null))[_0xcd2f('0x53')](handleError(_0x262284,null));};exports[_0xcd2f('0x6a')]=function(_0x37f9e4,_0x3c1e3b,_0x3bc6a6){var _0x3d1578={'body':_0x37f9e4['body'],'channel':_0xcd2f('0x6b')};var _0x1fbbea=[];var _0x4802aa=[];var _0x2b3ff7={};var _0x1e5b81=![];return db[_0xcd2f('0x6c')][_0xcd2f('0x6d')]()[_0xcd2f('0x30')](function(_0x5365ec){if(!_0x5365ec){throw new db[(_0xcd2f('0x18'))][(_0xcd2f('0x19'))](_0xcd2f('0x6e'));}_0x1fbbea=_[_0xcd2f('0x6f')](_[_0xcd2f('0x3f')](_0x5365ec),[_0xcd2f('0x70'),_0xcd2f('0x71')]);_0x4802aa=_[_0xcd2f('0x6f')](_[_0xcd2f('0x3f')](_0x5365ec),[_0xcd2f('0x70'),'updatedAt',_0xcd2f('0x72'),_0xcd2f('0x73')]);if(_0x37f9e4[_0xcd2f('0x55')]['id']){delete _0x37f9e4[_0xcd2f('0x55')]['id'];}if(_[_0xcd2f('0x74')](_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x75')])){throw new db[(_0xcd2f('0x18'))][(_0xcd2f('0x19'))]('from\x20is\x20mandatory');}if(_[_0xcd2f('0x74')](_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x55')])||_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x55')]===''){throw new db[(_0xcd2f('0x18'))][(_0xcd2f('0x19'))](_0xcd2f('0x76'));}if(_[_0xcd2f('0x74')](_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x77')])){throw new db[(_0xcd2f('0x18'))][(_0xcd2f('0x19'))](_0xcd2f('0x78')+_0x4802aa);}if(!_[_0xcd2f('0x79')](_0x4802aa,_0x37f9e4['body'][_0xcd2f('0x77')])){throw new db['Sequelize'][(_0xcd2f('0x19'))](_0xcd2f('0x7a')+_0x4802aa);}_0x2b3ff7[_0x37f9e4['body']['mapKey']]=_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x75')];})[_0xcd2f('0x30')](function(){return db[_0xcd2f('0x39')][_0xcd2f('0x52')]({'where':{'id':_0x37f9e4[_0xcd2f('0x4f')]['id']},'include':[{'model':db[_0xcd2f('0x7b')],'as':_0xcd2f('0x7c'),'include':[{'model':db[_0xcd2f('0x6c')],'as':_0xcd2f('0x7d'),'where':_0x2b3ff7,'limit':0x1,'order':[[_0xcd2f('0x71'),_0xcd2f('0x7e')]]}]},{'model':db['OpenchannelApplication'],'as':_0xcd2f('0x7f')}]});})[_0xcd2f('0x30')](handleEntityNotFound(_0x3c1e3b,null))[_0xcd2f('0x30')](function(_0x392d7a){if(_0x392d7a&&_0x392d7a[_0xcd2f('0x7c')]){_0x3d1578[_0xcd2f('0x80')]=_0x392d7a;_0x3d1578[_0xcd2f('0x81')]=_0x392d7a['Applications'];_0x3d1578['list']=_0x392d7a['List'];_0x3d1578[_0xcd2f('0x81')]=_[_0xcd2f('0x82')](_0x3d1578[_0xcd2f('0x81')],[_0xcd2f('0x83')],[_0xcd2f('0x84')]);if(_0x3d1578[_0xcd2f('0x80')][_0xcd2f('0x7f')]){delete _0x3d1578[_0xcd2f('0x80')][_0xcd2f('0x7f')];}if(_0x3d1578[_0xcd2f('0x80')][_0xcd2f('0x7c')]&&_0x3d1578[_0xcd2f('0x80')][_0xcd2f('0x7c')][_0xcd2f('0x7d')]['length']){return _0x3d1578[_0xcd2f('0x80')][_0xcd2f('0x7c')][_0xcd2f('0x7d')][0x0];}var _0x1563b8=_[_0xcd2f('0x85')](_0x37f9e4[_0xcd2f('0x55')],{'firstName':_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x75')],'ListId':_0x392d7a[_0xcd2f('0x73')]});_0x1563b8[_0x37f9e4['body'][_0xcd2f('0x77')]]=_0x37f9e4['body']['from'];return db[_0xcd2f('0x6c')][_0xcd2f('0x54')](_0x1563b8,{'fields':_0x1fbbea,'raw':!![]});}})['then'](handleEntityNotFound(_0x3c1e3b,null))['then'](function(_0x52359c){_0x3d1578[_0xcd2f('0x86')]=_0x52359c;if(_0x52359c){var _0x472b67={'ContactId':_0x52359c['id'],'OpenchannelAccountId':_0x37f9e4['params']['id'],'from':(_0x52359c[_0xcd2f('0x87')]||'')+'\x20'+(_0x52359c[_0xcd2f('0x88')]||'')};var _0xa1169a={'OpenchannelAccountId':_0x37f9e4[_0xcd2f('0x4f')]['id'],'closed':![]};if(_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x89')]){_0xa1169a[_0xcd2f('0x89')]=_0x37f9e4[_0xcd2f('0x55')]['threadId'];return db[_0xcd2f('0x8a')][_0xcd2f('0x52')]({'where':_0xa1169a})[_0xcd2f('0x30')](function(_0x444d3a){if(_0x444d3a){return[_0x444d3a,![]];}_0x472b67['threadId']=_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x89')];_0x472b67[_0xcd2f('0x8b')]=_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x8b')];return db[_0xcd2f('0x8a')][_0xcd2f('0x54')](_0x472b67)[_0xcd2f('0x30')](function(_0x540eb9){return[_0x540eb9,!![]];});});}else{_0xa1169a[_0xcd2f('0x89')]=null;}_0xa1169a[_0xcd2f('0x8c')]=_0x52359c['id'];return db['OpenchannelInteraction']['find']({'where':_0xa1169a})[_0xcd2f('0x30')](function(_0x3eb87d){if(_0x3eb87d){return[_0x3eb87d,![]];}return db[_0xcd2f('0x8a')][_0xcd2f('0x54')](_0x472b67)['then'](function(_0x52de2b){return[_0x52de2b,!![]];});});}})['spread'](function(_0x28f2ed,_0x563e61){if(_0x28f2ed){_0x1e5b81=_0x563e61;if(!_0x563e61){var _0x4d101e={'from':(_0x3d1578[_0xcd2f('0x86')][_0xcd2f('0x87')]||'')+'\x20'+(_0x3d1578['contact'][_0xcd2f('0x88')]||'')};if(_0x37f9e4['body'][_0xcd2f('0x89')]&&_0x37f9e4['body']['messageId']&&_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x89')]!=_0x37f9e4['body']['messageId']){_0x4d101e['threadId']=_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x8d')];}return _0x28f2ed[_0xcd2f('0x2e')](_0x4d101e);}else{return _0x28f2ed;}}})[_0xcd2f('0x30')](function(_0x3e6f82){_0x3d1578[_0xcd2f('0x8e')]=_0x3e6f82[_0xcd2f('0x31')]({'plain':!![]});_0x3d1578['interaction']['created']=_0x1e5b81;if(_0x3d1578[_0xcd2f('0x8e')][_0xcd2f('0x8f')]){if(_0x3d1578[_0xcd2f('0x80')][_0xcd2f('0x90')]){_0x3d1578[_0xcd2f('0x81')][_0xcd2f('0x91')]({'id':0x0,'priority':_0x3d1578[_0xcd2f('0x81')][_0xcd2f('0x51')]+0x1,'app':_0xcd2f('0x92'),'appdata':_0xcd2f('0x93'),'interval':_0xcd2f('0x94')});}}return db[_0xcd2f('0x95')][_0xcd2f('0x54')]({'body':_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x55')],'OpenchannelAccountId':_0x37f9e4[_0xcd2f('0x4f')]['id'],'OpenchannelInteractionId':_0x3e6f82['id'],'direction':'in','ContactId':_0x3d1578[_0xcd2f('0x86')]['id'],'AttachmentId':_0x37f9e4[_0xcd2f('0x55')][_0xcd2f('0x96')]});})[_0xcd2f('0x30')](function(_0x442342){_0x3d1578['message']=_0x442342;if(_0x3d1578[_0xcd2f('0x8e')][_0xcd2f('0x97')]){return db['User'][_0xcd2f('0x52')]({'attributes':['id',_0xcd2f('0x34')],'where':{'id':_0x3d1578[_0xcd2f('0x8e')]['UserId']}})[_0xcd2f('0x30')](function(_0x5c6726){if(_0x5c6726){_0x3d1578[_0xcd2f('0x81')][_0xcd2f('0x98')]({'id':0x0,'priority':0x0,'app':_0xcd2f('0x99'),'appdata':_0x5c6726['name']+','+(_0x3d1578['account'][_0xcd2f('0x9a')]||0xa),'interval':_0xcd2f('0x94')});_0x3d1578[_0xcd2f('0x9b')]=![];}return respondWithRpcPromise(_0xcd2f('0x9c'),_0xcd2f('0x9d'),_0x3d1578);});}return respondWithRpcPromise(_0xcd2f('0x9c'),'startRouting',_0x3d1578);})['then'](function(_0x207e08){respondWithRpcPromise(_0xcd2f('0x9e'),_0xcd2f('0x9e'),{'event':_0xcd2f('0x6a'),'message':_0x207e08},client9002);return _0x207e08;})[_0xcd2f('0x30')](respondWithResult(_0x3c1e3b,null))['catch'](handleError(_0x3c1e3b,null));};exports['addApplications']=function(_0x2f1980,_0x54edec,_0x866356){return db[_0xcd2f('0x39')][_0xcd2f('0x68')]({'where':{'id':_0x2f1980[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0x54edec,null))[_0xcd2f('0x30')](function(_0x21738b){if(_0x21738b){return db[_0xcd2f('0x9f')][_0xcd2f('0xa0')](function(_0x5ee793){return db[_0xcd2f('0xa1')][_0xcd2f('0x2f')]({'where':{'OpenchannelAccountId':_0x2f1980[_0xcd2f('0x4f')]['id']},'transaction':_0x5ee793})[_0xcd2f('0x30')](function(_0x3fd005){var _0x40929e=_['map'](_0x2f1980['body'],function(_0x337703){_0x337703['OpenchannelAccountId']=_0x2f1980[_0xcd2f('0x4f')]['id'];return _0x337703;});return db[_0xcd2f('0xa1')][_0xcd2f('0xa2')](_0x40929e,{'transaction':_0x5ee793});});})['then'](function(){return db[_0xcd2f('0xa1')][_0xcd2f('0xa3')]({'where':{'OpenchannelAccountId':_0x2f1980[_0xcd2f('0x4f')]['id']},'order':_0xcd2f('0x83')});});}})['then'](respondWithResult(_0x54edec,null))[_0xcd2f('0x53')](handleError(_0x54edec,null));};exports[_0xcd2f('0xa4')]=function(_0x1e4548,_0x584ec5,_0x6b51e7){var _0x3ef92b={};var _0x123b4d={};var _0x373366;var _0x1c9173;return db['OpenchannelAccount'][_0xcd2f('0x68')]({'where':{'id':_0x1e4548[_0xcd2f('0x4f')]['id']}})['then'](handleEntityNotFound(_0x584ec5,null))[_0xcd2f('0x30')](function(_0x6d2090){if(_0x6d2090){_0x373366=_0x6d2090;_0x123b4d['model']=_[_0xcd2f('0x3f')](db['OpenchannelApplication'][_0xcd2f('0x3a')]);_0x123b4d[_0xcd2f('0x42')]=_[_0xcd2f('0x3f')](_0x1e4548[_0xcd2f('0x42')]);_0x123b4d[_0xcd2f('0x40')]=_[_0xcd2f('0x41')](_0x123b4d[_0xcd2f('0x3e')],_0x123b4d[_0xcd2f('0x42')]);_0x3ef92b[_0xcd2f('0x43')]=_[_0xcd2f('0x41')](_0x123b4d[_0xcd2f('0x3e')],qs[_0xcd2f('0x44')](_0x1e4548[_0xcd2f('0x42')][_0xcd2f('0x44')]));_0x3ef92b[_0xcd2f('0x43')]=_0x3ef92b[_0xcd2f('0x43')][_0xcd2f('0x51')]?_0x3ef92b[_0xcd2f('0x43')]:_0x123b4d[_0xcd2f('0x3e')];_0x3ef92b[_0xcd2f('0x5f')]=qs['sort'](_0x1e4548['query'][_0xcd2f('0x60')]);_0x3ef92b[_0xcd2f('0x47')]=qs['filters'](_[_0xcd2f('0x61')](_0x1e4548[_0xcd2f('0x42')],_0x123b4d[_0xcd2f('0x40')]));if(_0x1e4548[_0xcd2f('0x42')][_0xcd2f('0x48')]){_0x3ef92b[_0xcd2f('0x47')]=_['merge'](_0x3ef92b[_0xcd2f('0x47')],{'$or':_['map'](_0x3ef92b['attributes'],function(_0x2de92d){var _0x302c75={};_0x302c75[_0x2de92d]={'$like':'%'+_0x1e4548[_0xcd2f('0x42')]['filter']+'%'};return _0x302c75;})});}_0x3ef92b=_[_0xcd2f('0x49')]({},_0x3ef92b,_0x1e4548[_0xcd2f('0x4b')]);return _0x373366[_0xcd2f('0xa4')](_0x3ef92b);}})[_0xcd2f('0x30')](function(_0x4d60cc){if(_0x4d60cc){_0x1c9173=_0x4d60cc[_0xcd2f('0x51')];if(!_0x1e4548[_0xcd2f('0x42')][_0xcd2f('0x45')](_0xcd2f('0x46'))){_0x3ef92b[_0xcd2f('0x29')]=qs['limit'](_0x1e4548[_0xcd2f('0x42')][_0xcd2f('0x29')]);_0x3ef92b[_0xcd2f('0x28')]=qs[_0xcd2f('0x28')](_0x1e4548[_0xcd2f('0x42')][_0xcd2f('0x28')]);}return _0x373366[_0xcd2f('0xa4')](_0x3ef92b);}})[_0xcd2f('0x30')](function(_0x371838){if(_0x371838){return _0x371838?{'count':_0x1c9173,'rows':_0x371838}:null;}})['then'](respondWithResult(_0x584ec5,null))[_0xcd2f('0x53')](handleError(_0x584ec5,null));};exports[_0xcd2f('0xa5')]=function(_0xaa2036,_0x5dcec8,_0x4de8ac){var _0x3c58e8={'raw':![],'where':{}};var _0x119abd={};var _0x3bb474={'count':0x0,'rows':[]};return db[_0xcd2f('0x39')][_0xcd2f('0x68')]({'where':{'id':_0xaa2036[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0x5dcec8,null))[_0xcd2f('0x30')](function(_0x80111f){if(_0x80111f){_0x119abd['model']=_[_0xcd2f('0x3f')](db[_0xcd2f('0x8a')][_0xcd2f('0x3a')]);_0x119abd[_0xcd2f('0x42')]=_[_0xcd2f('0x3f')](_0xaa2036[_0xcd2f('0x42')]);_0x119abd[_0xcd2f('0x40')]=_['intersection'](_0x119abd[_0xcd2f('0x3e')],_0x119abd[_0xcd2f('0x42')]);_0x3c58e8[_0xcd2f('0x43')]=_[_0xcd2f('0x41')](_0x119abd['model'],qs[_0xcd2f('0x44')](_0xaa2036['query'][_0xcd2f('0x44')]));_0x3c58e8[_0xcd2f('0x43')]=_0x3c58e8['attributes'][_0xcd2f('0x51')]?_0x3c58e8[_0xcd2f('0x43')]:_0x119abd[_0xcd2f('0x3e')];if(!_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0x45')](_0xcd2f('0x46'))){_0x3c58e8['limit']=qs[_0xcd2f('0x29')](_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0x29')]);_0x3c58e8['offset']=qs[_0xcd2f('0x28')](_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0x28')]);}_0x3c58e8[_0xcd2f('0x5f')]=qs[_0xcd2f('0x60')](_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0x60')]);_0x3c58e8[_0xcd2f('0x47')]=qs[_0xcd2f('0x40')](_[_0xcd2f('0x61')](_0xaa2036[_0xcd2f('0x42')],_0x119abd['filters']));_0x3c58e8[_0xcd2f('0x47')]['OpenchannelAccountId']=_0x80111f['id'];if(_0xaa2036['query'][_0xcd2f('0x48')]){_0x3c58e8['where']=_[_0xcd2f('0x49')](_0x3c58e8[_0xcd2f('0x47')],{'$or':_[_0xcd2f('0x38')](_0x3c58e8[_0xcd2f('0x43')],function(_0x250e5d){var _0x2b210b={};_0x2b210b[_0x250e5d]={'$like':'%'+_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0x48')]+'%'};return _0x2b210b;})});}_0x3c58e8=_[_0xcd2f('0x49')]({},_0x3c58e8,_0xaa2036['options']);return db[_0xcd2f('0x8a')][_0xcd2f('0x27')]({'where':_0x3c58e8[_0xcd2f('0x47')]})[_0xcd2f('0x30')](function(_0x21d821){_0x3bb474[_0xcd2f('0x27')]=_0x21d821;if(_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0x4c')]){_0x3c58e8[_0xcd2f('0x4d')]=[{'model':db[_0xcd2f('0x6c')],'as':_0xcd2f('0xa6'),'required':![]},{'model':db[_0xcd2f('0xa7')],'as':_0xcd2f('0xa8'),'attributes':[_0xcd2f('0x34'),_0xcd2f('0xa9'),_0xcd2f('0xaa')],'required':![]},{'model':db[_0xcd2f('0xab')],'as':'Tags','attributes':['id',_0xcd2f('0x34'),_0xcd2f('0xac')],'where':_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0xad')]?{'id':_0xaa2036[_0xcd2f('0x42')][_0xcd2f('0xad')]}:undefined,'required':_0xaa2036[_0xcd2f('0x42')]['tag']?!![]:![]}];}return db[_0xcd2f('0x8a')][_0xcd2f('0x63')](_0x3c58e8);})[_0xcd2f('0x30')](function(_0x1a7e87){_0x3bb474['rows']=_0x1a7e87;return _0x3bb474;});}})[_0xcd2f('0x30')](respondWithFilteredResult(_0x5dcec8,_0x3c58e8))[_0xcd2f('0x53')](handleError(_0x5dcec8,null));};exports[_0xcd2f('0xae')]=function(_0x5cf9cd,_0x262bee,_0x569da4){return db[_0xcd2f('0x39')][_0xcd2f('0x52')]({'where':{'id':_0x5cf9cd[_0xcd2f('0x4f')]['id']}})['then'](handleEntityNotFound(_0x262bee,null))[_0xcd2f('0x30')](function(_0x334e58){if(_0x334e58){return _0x334e58['addAgents'](_0x5cf9cd[_0xcd2f('0x55')][_0xcd2f('0x64')],_['omit'](_0x5cf9cd[_0xcd2f('0x55')],[_0xcd2f('0x64'),'id'])||{})['spread'](function(_0x18eafc){for(var _0x131381=0x0;_0x131381<_0x5cf9cd['body'][_0xcd2f('0x64')][_0xcd2f('0x51')];_0x131381+=0x1){socket[_0xcd2f('0xaf')](_0xcd2f('0xb0'),{'UserId':_0x5cf9cd[_0xcd2f('0x55')][_0xcd2f('0x64')][_0x131381],'OpenchannelAccountId':_0x5cf9cd[_0xcd2f('0x4f')]['id']});}return _0x18eafc;});}})['then'](respondWithResult(_0x262bee,null))[_0xcd2f('0x53')](handleError(_0x262bee,null));};exports['removeAgents']=function(_0x42f2bd,_0x457230,_0x4bb23f){return db[_0xcd2f('0x39')][_0xcd2f('0x52')]({'where':{'id':_0x42f2bd['params']['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0x457230,null))['then'](function(_0x4d49b1){if(_0x4d49b1){return _0x4d49b1['removeAgents'](_0x42f2bd[_0xcd2f('0x42')][_0xcd2f('0x64')])[_0xcd2f('0x30')](function(){if(_[_0xcd2f('0xb1')](_0x42f2bd['query'][_0xcd2f('0x64')])){for(var _0xc48fa=0x0;_0xc48fa<_0x42f2bd[_0xcd2f('0x42')][_0xcd2f('0x64')][_0xcd2f('0x51')];_0xc48fa+=0x1){socket['emit'](_0xcd2f('0xb2'),{'UserId':Number(_0x42f2bd['query'][_0xcd2f('0x64')][_0xc48fa]),'OpenchannelAccountId':Number(_0x42f2bd[_0xcd2f('0x4f')]['id'])});}}else{socket[_0xcd2f('0xaf')](_0xcd2f('0xb2'),{'UserId':Number(_0x42f2bd['query'][_0xcd2f('0x64')]),'OpenchannelAccountId':Number(_0x42f2bd['params']['id'])});}});}})[_0xcd2f('0x30')](respondWithStatusCode(_0x457230,null))[_0xcd2f('0x53')](handleError(_0x457230,null));};exports[_0xcd2f('0xb3')]=function(_0x43a0e6,_0x349eb8,_0x2ec16c){var _0x475bdc={};var _0x2d76e7={};var _0x4b2b92;var _0xa949d0;return db[_0xcd2f('0x39')][_0xcd2f('0x68')]({'where':{'id':_0x43a0e6[_0xcd2f('0x4f')]['id']}})['then'](handleEntityNotFound(_0x349eb8,null))['then'](function(_0x399755){if(_0x399755){_0x4b2b92=_0x399755;_0x2d76e7['model']=_[_0xcd2f('0x3f')](db[_0xcd2f('0xa7')][_0xcd2f('0x3a')]);_0x2d76e7['query']=_[_0xcd2f('0x3f')](_0x43a0e6['query']);_0x2d76e7['filters']=_[_0xcd2f('0x41')](_0x2d76e7[_0xcd2f('0x3e')],_0x2d76e7[_0xcd2f('0x42')]);_0x475bdc[_0xcd2f('0x43')]=_[_0xcd2f('0x41')](_0x2d76e7[_0xcd2f('0x3e')],qs[_0xcd2f('0x44')](_0x43a0e6[_0xcd2f('0x42')]['fields']));_0x475bdc[_0xcd2f('0x43')]=_0x475bdc['attributes'][_0xcd2f('0x51')]?_0x475bdc[_0xcd2f('0x43')]:_0x2d76e7['model'];_0x475bdc[_0xcd2f('0x5f')]=qs['sort'](_0x43a0e6[_0xcd2f('0x42')]['sort']);_0x475bdc[_0xcd2f('0x47')]=qs[_0xcd2f('0x40')](_[_0xcd2f('0x61')](_0x43a0e6[_0xcd2f('0x42')],_0x2d76e7[_0xcd2f('0x40')]));if(_0x43a0e6[_0xcd2f('0x42')][_0xcd2f('0x48')]){_0x475bdc[_0xcd2f('0x47')]=_[_0xcd2f('0x49')](_0x475bdc[_0xcd2f('0x47')],{'$or':_[_0xcd2f('0x38')](_0x475bdc[_0xcd2f('0x43')],function(_0x1791cc){var _0x4d3d5e={};_0x4d3d5e[_0x1791cc]={'$like':'%'+_0x43a0e6[_0xcd2f('0x42')][_0xcd2f('0x48')]+'%'};return _0x4d3d5e;})});}_0x475bdc=_['merge']({},_0x475bdc,_0x43a0e6[_0xcd2f('0x4b')]);return _0x4b2b92[_0xcd2f('0xb3')](_0x475bdc);}})[_0xcd2f('0x30')](function(_0x173abe){if(_0x173abe){_0xa949d0=_0x173abe['length'];if(!_0x43a0e6[_0xcd2f('0x42')][_0xcd2f('0x45')](_0xcd2f('0x46'))){_0x475bdc['limit']=qs[_0xcd2f('0x29')](_0x43a0e6[_0xcd2f('0x42')]['limit']);_0x475bdc['offset']=qs[_0xcd2f('0x28')](_0x43a0e6[_0xcd2f('0x42')][_0xcd2f('0x28')]);}return _0x4b2b92['getAgents'](_0x475bdc);}})[_0xcd2f('0x30')](function(_0xa009b3){if(_0xa009b3){return _0xa009b3?{'count':_0xa949d0,'rows':_0xa009b3}:null;}})[_0xcd2f('0x30')](respondWithResult(_0x349eb8,null))[_0xcd2f('0x53')](handleError(_0x349eb8,null));};exports[_0xcd2f('0x35')]=function(_0x39200a,_0x4ddce6,_0x286595){var _0x42ae70,_0xd4803b,_0x51a3dc;if(_[_0xcd2f('0x74')](_0x39200a[_0xcd2f('0x55')][_0xcd2f('0x55')])||_0x39200a['body'][_0xcd2f('0x55')]===''){throw new db[(_0xcd2f('0x18'))]['ValidationError'](_0xcd2f('0x76'));}if(_[_0xcd2f('0x74')](_0x39200a[_0xcd2f('0x55')]['to'])){}_0x42ae70=_0x39200a[_0xcd2f('0x55')]['to'];return db[_0xcd2f('0x39')][_0xcd2f('0x68')]({'where':{'id':_0x39200a[_0xcd2f('0x4f')]['id']}})[_0xcd2f('0x30')](handleEntityNotFound(_0x4ddce6,null))[_0xcd2f('0x30')](function(_0x596b17){if(_0x596b17){return db[_0xcd2f('0x39')][_0xcd2f('0x52')]({'where':{'id':_0x596b17['id']},'include':[{'model':db[_0xcd2f('0x7b')],'as':'List','include':[{'model':db['CmContact'],'as':_0xcd2f('0x7d'),'where':{[_0x596b17[_0xcd2f('0x77')]]:_0x42ae70},'limit':0x1,'order':[[_0xcd2f('0x71'),'DESC']]}]}]})[_0xcd2f('0x30')](handleEntityNotFound(_0x4ddce6,null))[_0xcd2f('0x30')](function(_0x28652a){if(_0x28652a&&_0x28652a['List']){_0xd4803b=_0x28652a[_0xcd2f('0x31')]({'plain':!![]});if(_0xd4803b[_0xcd2f('0x7c')]&&_0xd4803b[_0xcd2f('0x7c')][_0xcd2f('0x7d')][_0xcd2f('0x51')]){return _0xd4803b[_0xcd2f('0x7c')]['Contacts'][0x0];}return db[_0xcd2f('0x6c')][_0xcd2f('0x54')](_[_0xcd2f('0x85')](_0x39200a['body'],{'firstName':_0x42ae70,[_0x28652a['mapKey']]:_0x42ae70,'phone':_0x42ae70,'ListId':_0xd4803b[_0xcd2f('0x73')]}));}})[_0xcd2f('0x30')](handleEntityNotFound(_0x4ddce6,null))[_0xcd2f('0x30')](function(_0x3e4ed4){if(_0x3e4ed4){_0x51a3dc=_0x3e4ed4;return db[_0xcd2f('0x8a')][_0xcd2f('0x52')]({'where':{'ContactId':_0x51a3dc['id'],'closed':![],'OpenchannelAccountId':_0xd4803b['id']}})[_0xcd2f('0x30')](function(_0x3fb449){if(_0x3fb449){return[_0x3fb449,![]];}return db[_0xcd2f('0x8a')][_0xcd2f('0x54')]({'UserId':_0x39200a[_0xcd2f('0x58')]['id'],'ContactId':_0x51a3dc['id'],'OpenchannelAccountId':_0xd4803b['id'],'lastMsgDirection':_0xcd2f('0xb4'),'Messages':[_[_0xcd2f('0x49')](_0x39200a[_0xcd2f('0x55')],{'read':![],'body':_0x39200a[_0xcd2f('0x55')][_0xcd2f('0x55')],'OpenchannelAccountId':_0xd4803b['id'],'UserId':_0x39200a[_0xcd2f('0x58')]['id'],'ContactId':_0x51a3dc['id']})]},{'include':[{'model':db[_0xcd2f('0x95')],'as':'Messages'}]})[_0xcd2f('0x30')](function(_0x353508){return[_0x353508,!![]];});});}})['spread'](function(_0x36cfe5,_0x5ee988){if(_0x5ee988){return _0x36cfe5;}return db[_0xcd2f('0x95')][_0xcd2f('0x54')](_[_0xcd2f('0x49')](_0x39200a[_0xcd2f('0x55')],{'read':![],'body':_0x39200a[_0xcd2f('0x55')][_0xcd2f('0x55')],'OpenchannelAccountId':_0xd4803b['id'],'OpenchannelInteractionId':_0x36cfe5['id'],'UserId':_0x39200a[_0xcd2f('0x58')]['id'],'ContactId':_0x51a3dc['id']}))['then'](function(_0x113fab){_0x36cfe5['dataValues'][_0xcd2f('0xb5')]=[];_0x36cfe5[_0xcd2f('0xb6')][_0xcd2f('0xb5')][_0xcd2f('0x91')](_0x113fab[_0xcd2f('0xb6')]);return _0x36cfe5;});});}})['then'](respondWithResult(_0x4ddce6,null))[_0xcd2f('0x53')](handleError(_0x4ddce6,null));};
\ No newline at end of file
+var _0xe750=['getApplications','Contact','Owner','Tag','Tags','color','tag','addAgents','omit','emit','removeAgents','isArray','userOpenchannelAccount:remove','getAgents','out','OpenchannelMessage','Messages','html-pdf','eml-format','fast-json-patch','request-promise','moment','bluebird','util','lodash','squel','crypto','desk.js','to-csv','querystring','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','redis','jayson/promise','client','http','test','Sequelize','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','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','end','status','count','offset','limit','set','Content-Range','json','apply','reject','save','update','destroy','OpenchannelAccounts','sendStatus','stack','name','send','index','mandatoryDispositionPause','OpenchannelAccount','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','sort','where','pick','filter','map','VIRTUAL','merge','options','includeAll','include','findAll','rows','Pause','keys','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','OpnechannelAccountId','Disposition','getDispositions','findOne','nolimit','order','OpenchannelAccountId','removeDispositions','ids','addAnswer','CannedAnswer','removeAnswers','notify','CmContact','ValidationError','difference','createdAt','updatedAt','CompanyId','ListId','from','from\x20is\x20mandatory','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','DESC','OpenchannelApplication','Applications','List','account','applications','orderBy','priority','asc','Contacts','defaults','contact','firstName','threadId','OpenchannelInteraction','externalUrl','spread','lastName','messageId','interaction','created','autoclose','push','close','unmanaged','*,*,*,*','AttachmentId','UserId','User','unshift','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','addApplications','sequelize','transaction','bulkCreate','findAndCountAll'];(function(_0x1be0fe,_0x39708b){var _0x56a675=function(_0x131420){while(--_0x131420){_0x1be0fe['push'](_0x1be0fe['shift']());}};_0x56a675(++_0x39708b);}(_0xe750,0xc6));var _0x0e75=function(_0x1b9bcb,_0x4cdba9){_0x1b9bcb=_0x1b9bcb-0x0;var _0x462588=_0xe750[_0x1b9bcb];return _0x462588;};'use strict';var pdf=require(_0x0e75('0x0'));var emlformat=require(_0x0e75('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x0e75('0x2'));var rp=require(_0x0e75('0x3'));var moment=require(_0x0e75('0x4'));var BPromise=require(_0x0e75('0x5'));var Mustache=require('mustache');var util=require(_0x0e75('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x0e75('0x7'));var squel=require(_0x0e75('0x8'));var crypto=require(_0x0e75('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x0e75('0xa'));var toCsv=require(_0x0e75('0xb'));var querystring=require(_0x0e75('0xc'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x0e75('0xd'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0e75('0xe'));var logger=require('../../config/logger')(_0x0e75('0xf'));var utils=require(_0x0e75('0x10'));var config=require(_0x0e75('0x11'));var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config[_0x0e75('0x12')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./openchannelAccount.socket')['register'](socket);var jayson=require(_0x0e75('0x13'));var client=jayson['client']['http']({'port':0x232c});var client9002=jayson[_0x0e75('0x14')][_0x0e75('0x15')]({'port':0x232a});function checkPasswordPattern(_0x78634d,_0x4f69b6,_0x46eb09){if(_0x46eb09){var _0xf84b80=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0xf84b80[_0x0e75('0x16')](_0x4f69b6)){return _0x78634d;}else{throw new db[(_0x0e75('0x17'))]['ValidationError'](_0x0e75('0x18'));}}else{return _0x78634d;}}function respondWithRpcPromise(_0x5d4691,_0x5ed682,_0x1a7545,_0x485e25){return new BPromise(function(_0x5ca91c,_0x1079f7){var _0x400df4=_0x485e25||client;return _0x400df4[_0x0e75('0x19')](_0x5d4691,_0x1a7545)[_0x0e75('0x1a')](function(_0x1de84d){logger[_0x0e75('0x1b')](_0x0e75('0x1c'),_0x5ed682,_0x0e75('0x1d'));logger[_0x0e75('0x1e')](_0x0e75('0x1f'),_0x5ed682,_0x0e75('0x1d'),JSON[_0x0e75('0x20')](_0x1de84d));if(_0x1de84d['error']){if(_0x1de84d[_0x0e75('0x21')]['code']===0x1f4){logger[_0x0e75('0x21')]('OpenchannelAccount,\x20%s,\x20%s',_0x5ed682,_0x1de84d[_0x0e75('0x21')]['message']);return _0x1079f7(_0x1de84d[_0x0e75('0x21')][_0x0e75('0x22')]);}logger['error'](_0x0e75('0x1c'),_0x5ed682,_0x1de84d[_0x0e75('0x21')][_0x0e75('0x22')]);return _0x5ca91c(_0x1de84d[_0x0e75('0x21')][_0x0e75('0x22')]);}else{logger[_0x0e75('0x1b')](_0x0e75('0x1c'),_0x5ed682,_0x0e75('0x1d'));_0x5ca91c(_0x1de84d[_0x0e75('0x23')][_0x0e75('0x22')]);}})[_0x0e75('0x24')](function(_0x3b32f6){logger[_0x0e75('0x21')](_0x0e75('0x1c'),_0x5ed682,_0x3b32f6);_0x1079f7(_0x3b32f6);});});}function respondWithStatusCode(_0x474409,_0x263a35){_0x263a35=_0x263a35||0xcc;return function(_0x216f66){if(_0x216f66){return _0x474409['sendStatus'](_0x263a35);}return _0x474409['status'](_0x263a35)[_0x0e75('0x25')]();};}function respondWithResult(_0x477a0e,_0x4b59e8){_0x4b59e8=_0x4b59e8||0xc8;return function(_0x3c85a7){if(_0x3c85a7){return _0x477a0e[_0x0e75('0x26')](_0x4b59e8)['json'](_0x3c85a7);}};}function respondWithFilteredResult(_0x57dcfa,_0x5c61d3){return function(_0x4fa329){if(_0x4fa329){var _0x5e1381=_0x4fa329[_0x0e75('0x27')],_0x223377=_0x5c61d3[_0x0e75('0x28')],_0x2bdc34=_0x5c61d3[_0x0e75('0x28')]+_0x5c61d3[_0x0e75('0x29')],_0x429027;if(_0x2bdc34>=_0x5e1381){_0x2bdc34=_0x5e1381;_0x429027=0xc8;}else{_0x429027=0xce;}_0x57dcfa[_0x0e75('0x26')](_0x429027);return _0x57dcfa[_0x0e75('0x2a')](_0x0e75('0x2b'),_0x223377+'-'+_0x2bdc34+'/'+_0x5e1381)[_0x0e75('0x2c')](_0x4fa329);}return null;};}function patchUpdates(_0x27e44b){return function(_0x4f8f85){try{jsonpatch[_0x0e75('0x2d')](_0x4f8f85,_0x27e44b,!![]);}catch(_0x1196c4){return BPromise[_0x0e75('0x2e')](_0x1196c4);}return _0x4f8f85[_0x0e75('0x2f')]();};}function saveUpdates(_0x47e806,_0x1ff227){return function(_0x4c18c5){if(_0x4c18c5){return _0x4c18c5[_0x0e75('0x30')](_0x47e806)[_0x0e75('0x1a')](function(_0x4ada52){return _0x4ada52;});}return null;};}function removeEntity(_0x26f13f,_0x5799d3){return function(_0x517b41){if(_0x517b41){return _0x517b41[_0x0e75('0x31')]()[_0x0e75('0x1a')](function(){var _0x4393c6=_0x517b41['get']({'plain':!![]});var _0x1c6812=_0x0e75('0x32');return db['UserProfileResource'][_0x0e75('0x31')]({'where':{'type':_0x1c6812,'resourceId':_0x4393c6['id']}})[_0x0e75('0x1a')](function(){return _0x517b41;});})['then'](function(){_0x26f13f[_0x0e75('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x53e57e,_0x24f59b){return function(_0x490d3c){if(!_0x490d3c){_0x53e57e[_0x0e75('0x33')](0x194);}return _0x490d3c;};}function handleError(_0x342ad9,_0x3fbd29){_0x3fbd29=_0x3fbd29||0x1f4;return function(_0x294a15){logger['error'](_0x294a15[_0x0e75('0x34')]);if(_0x294a15[_0x0e75('0x35')]){delete _0x294a15[_0x0e75('0x35')];}_0x342ad9[_0x0e75('0x26')](_0x3fbd29)[_0x0e75('0x36')](_0x294a15);};}exports[_0x0e75('0x37')]=function(_0x27a9fd,_0x47a7ca){var _0x57a606={'include':[{'model':db['Pause'],'as':_0x0e75('0x38')}]},_0x20364f={},_0x1f62b5={'count':0x0,'rows':[]};var _0xf2414d=_['map'](db[_0x0e75('0x39')][_0x0e75('0x3a')],function(_0x45d823){return{'name':_0x45d823[_0x0e75('0x3b')],'type':_0x45d823[_0x0e75('0x3c')][_0x0e75('0x3d')]};});_0x20364f[_0x0e75('0x3e')]=_['map'](_0xf2414d,_0x0e75('0x35'));_0x20364f[_0x0e75('0x3f')]=_['keys'](_0x27a9fd[_0x0e75('0x3f')]);_0x20364f[_0x0e75('0x40')]=_[_0x0e75('0x41')](_0x20364f['model'],_0x20364f[_0x0e75('0x3f')]);_0x57a606['attributes']=_['intersection'](_0x20364f['model'],qs[_0x0e75('0x42')](_0x27a9fd['query']['fields']));_0x57a606['attributes']=_0x57a606[_0x0e75('0x43')][_0x0e75('0x44')]?_0x57a606[_0x0e75('0x43')]:_0x20364f[_0x0e75('0x3e')];if(!_0x27a9fd[_0x0e75('0x3f')][_0x0e75('0x45')]('nolimit')){_0x57a606[_0x0e75('0x29')]=qs[_0x0e75('0x29')](_0x27a9fd['query'][_0x0e75('0x29')]);_0x57a606[_0x0e75('0x28')]=qs[_0x0e75('0x28')](_0x27a9fd['query'][_0x0e75('0x28')]);}_0x57a606['order']=qs[_0x0e75('0x46')](_0x27a9fd[_0x0e75('0x3f')][_0x0e75('0x46')]);_0x57a606[_0x0e75('0x47')]=qs['filters'](_[_0x0e75('0x48')](_0x27a9fd[_0x0e75('0x3f')],_0x20364f[_0x0e75('0x40')]));if(_0x27a9fd[_0x0e75('0x3f')][_0x0e75('0x49')]){_0x57a606[_0x0e75('0x47')]=_['merge'](_0x57a606[_0x0e75('0x47')],{'$or':_[_0x0e75('0x4a')](_0xf2414d,function(_0x262b90){if(_0x262b90['type']!==_0x0e75('0x4b')){var _0x264516={};_0x264516[_0x262b90[_0x0e75('0x35')]]={'$like':'%'+_0x27a9fd[_0x0e75('0x3f')][_0x0e75('0x49')]+'%'};return _0x264516;}})});}_0x57a606=_[_0x0e75('0x4c')]({},_0x57a606,_0x27a9fd[_0x0e75('0x4d')]);var _0x938735={'where':_0x57a606[_0x0e75('0x47')]};return db['OpenchannelAccount'][_0x0e75('0x27')](_0x938735)[_0x0e75('0x1a')](function(_0x36cc17){_0x1f62b5['count']=_0x36cc17;if(_0x27a9fd[_0x0e75('0x3f')][_0x0e75('0x4e')]){_0x57a606[_0x0e75('0x4f')]=[{'all':!![]}];}return db[_0x0e75('0x39')][_0x0e75('0x50')](_0x57a606);})[_0x0e75('0x1a')](function(_0x2fe257){_0x1f62b5[_0x0e75('0x51')]=_0x2fe257;return _0x1f62b5;})['then'](respondWithFilteredResult(_0x47a7ca,_0x57a606))[_0x0e75('0x24')](handleError(_0x47a7ca,null));};exports['show']=function(_0x52cff4,_0x74ee0){var _0x8c99db={'raw':![],'where':{'id':_0x52cff4['params']['id']},'include':[{'model':db[_0x0e75('0x52')],'as':'mandatoryDispositionPause'}]},_0x3a61f0={};_0x3a61f0['model']=_[_0x0e75('0x53')](db[_0x0e75('0x39')][_0x0e75('0x3a')]);_0x3a61f0['query']=_[_0x0e75('0x53')](_0x52cff4[_0x0e75('0x3f')]);_0x3a61f0[_0x0e75('0x40')]=_[_0x0e75('0x41')](_0x3a61f0[_0x0e75('0x3e')],_0x3a61f0[_0x0e75('0x3f')]);_0x8c99db[_0x0e75('0x43')]=_[_0x0e75('0x41')](_0x3a61f0[_0x0e75('0x3e')],qs[_0x0e75('0x42')](_0x52cff4[_0x0e75('0x3f')][_0x0e75('0x42')]));_0x8c99db['attributes']=_0x8c99db[_0x0e75('0x43')][_0x0e75('0x44')]?_0x8c99db[_0x0e75('0x43')]:_0x3a61f0['model'];if(_0x52cff4[_0x0e75('0x3f')]['includeAll']){_0x8c99db[_0x0e75('0x4f')]=[{'all':!![]}];}_0x8c99db=_[_0x0e75('0x4c')]({},_0x8c99db,_0x52cff4[_0x0e75('0x4d')]);return db['OpenchannelAccount']['find'](_0x8c99db)[_0x0e75('0x1a')](handleEntityNotFound(_0x74ee0,null))[_0x0e75('0x1a')](respondWithResult(_0x74ee0,null))[_0x0e75('0x24')](handleError(_0x74ee0,null));};exports[_0x0e75('0x54')]=function(_0x32a537,_0x17ad9b){return db[_0x0e75('0x39')][_0x0e75('0x54')](_0x32a537[_0x0e75('0x55')],{})[_0x0e75('0x1a')](function(_0x375dda){var _0x4b6dbd=_0x32a537['user'][_0x0e75('0x56')]({'plain':!![]});if(!_0x4b6dbd)throw new Error(_0x0e75('0x57'));if(_0x4b6dbd[_0x0e75('0x58')]===_0x0e75('0x59')){var _0x1a8aad=_0x375dda[_0x0e75('0x56')]({'plain':!![]});var _0x8a654f=_0x0e75('0x32');return db[_0x0e75('0x5a')][_0x0e75('0x5b')]({'where':{'name':_0x8a654f,'userProfileId':_0x4b6dbd['userProfileId']},'raw':!![]})[_0x0e75('0x1a')](function(_0x2390b3){if(_0x2390b3&&_0x2390b3[_0x0e75('0x5c')]===0x0){return db[_0x0e75('0x5d')]['create']({'name':_0x1a8aad['name'],'resourceId':_0x1a8aad['id'],'type':_0x2390b3[_0x0e75('0x35')],'sectionId':_0x2390b3['id']},{})[_0x0e75('0x1a')](function(){return _0x375dda;});}else{return _0x375dda;}})[_0x0e75('0x24')](function(_0x48d950){logger[_0x0e75('0x21')](_0x0e75('0x5e'),_0x48d950);throw _0x48d950;});}return _0x375dda;})['then'](respondWithResult(_0x17ad9b,0xc9))['catch'](handleError(_0x17ad9b,null));};exports[_0x0e75('0x30')]=function(_0x176c83,_0x54decc){if(_0x176c83['body']['id']){delete _0x176c83[_0x0e75('0x55')]['id'];}return db[_0x0e75('0x39')]['find']({'where':{'id':_0x176c83[_0x0e75('0x5f')]['id']},'include':[{'model':db[_0x0e75('0x52')],'as':_0x0e75('0x38')}]})['then'](handleEntityNotFound(_0x54decc,null))[_0x0e75('0x1a')](saveUpdates(_0x176c83['body'],null))[_0x0e75('0x1a')](respondWithResult(_0x54decc,null))['catch'](handleError(_0x54decc,null));};exports[_0x0e75('0x31')]=function(_0x11d41d,_0x3e80c0){return db[_0x0e75('0x39')]['find']({'where':{'id':_0x11d41d['params']['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x3e80c0,null))['then'](removeEntity(_0x3e80c0,null))[_0x0e75('0x24')](handleError(_0x3e80c0,null));};exports[_0x0e75('0x60')]=function(_0x127dbe,_0x384978){return db['OpenchannelAccount'][_0x0e75('0x60')]()['then'](respondWithResult(_0x384978,null))[_0x0e75('0x24')](handleError(_0x384978,null));};exports['addDisposition']=function(_0x5e2daa,_0x1c55df,_0x40960c){if(_0x5e2daa[_0x0e75('0x55')]['id']){delete _0x5e2daa[_0x0e75('0x55')]['id'];}return db[_0x0e75('0x39')][_0x0e75('0x5b')]({'where':{'id':_0x5e2daa[_0x0e75('0x5f')]['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x1c55df,null))[_0x0e75('0x1a')](function(_0x1cccd8){if(_0x1cccd8){_0x5e2daa[_0x0e75('0x55')][_0x0e75('0x61')]=_0x1cccd8['id'];return db[_0x0e75('0x62')][_0x0e75('0x54')](_0x5e2daa[_0x0e75('0x55')]);}})[_0x0e75('0x1a')](respondWithResult(_0x1c55df,null))[_0x0e75('0x24')](handleError(_0x1c55df,null));};exports[_0x0e75('0x63')]=function(_0x40f91f,_0x3732cf,_0x3890b8){var _0x4c6072={'raw':![],'where':{}};var _0x41d50e={};var _0x20d331={'count':0x0,'rows':[]};return db[_0x0e75('0x39')][_0x0e75('0x64')]({'where':{'id':_0x40f91f[_0x0e75('0x5f')]['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x3732cf,null))[_0x0e75('0x1a')](function(_0x22468d){if(_0x22468d){_0x41d50e[_0x0e75('0x3e')]=_['keys'](db['Disposition'][_0x0e75('0x3a')]);_0x41d50e[_0x0e75('0x3f')]=_['keys'](_0x40f91f[_0x0e75('0x3f')]);_0x41d50e[_0x0e75('0x40')]=_[_0x0e75('0x41')](_0x41d50e['model'],_0x41d50e['query']);_0x4c6072[_0x0e75('0x43')]=_[_0x0e75('0x41')](_0x41d50e[_0x0e75('0x3e')],qs[_0x0e75('0x42')](_0x40f91f[_0x0e75('0x3f')][_0x0e75('0x42')]));_0x4c6072[_0x0e75('0x43')]=_0x4c6072[_0x0e75('0x43')][_0x0e75('0x44')]?_0x4c6072[_0x0e75('0x43')]:_0x41d50e['model'];if(!_0x40f91f[_0x0e75('0x3f')]['hasOwnProperty'](_0x0e75('0x65'))){_0x4c6072[_0x0e75('0x29')]=qs['limit'](_0x40f91f[_0x0e75('0x3f')][_0x0e75('0x29')]);_0x4c6072[_0x0e75('0x28')]=qs[_0x0e75('0x28')](_0x40f91f[_0x0e75('0x3f')]['offset']);}_0x4c6072[_0x0e75('0x66')]=qs['sort'](_0x40f91f[_0x0e75('0x3f')][_0x0e75('0x46')]);_0x4c6072[_0x0e75('0x47')]=qs[_0x0e75('0x40')](_[_0x0e75('0x48')](_0x40f91f[_0x0e75('0x3f')],_0x41d50e['filters']));_0x4c6072['where'][_0x0e75('0x67')]=_0x22468d['id'];if(_0x40f91f[_0x0e75('0x3f')]['filter']){_0x4c6072[_0x0e75('0x47')]=_['merge'](_0x4c6072[_0x0e75('0x47')],{'$or':_['map'](_0x4c6072[_0x0e75('0x43')],function(_0x279552){var _0x19ba50={};_0x19ba50[_0x279552]={'$like':'%'+_0x40f91f[_0x0e75('0x3f')][_0x0e75('0x49')]+'%'};return _0x19ba50;})});}_0x4c6072=_[_0x0e75('0x4c')]({},_0x4c6072,_0x40f91f[_0x0e75('0x4d')]);return db['Disposition'][_0x0e75('0x27')]({'where':_0x4c6072['where']})['then'](function(_0x5ab703){_0x20d331['count']=_0x5ab703;if(_0x40f91f[_0x0e75('0x3f')][_0x0e75('0x4e')]){_0x4c6072[_0x0e75('0x4f')]=[{'all':!![]}];}return db[_0x0e75('0x62')][_0x0e75('0x50')](_0x4c6072);})[_0x0e75('0x1a')](function(_0x8747ee){_0x20d331[_0x0e75('0x51')]=_0x8747ee;return _0x20d331;});}})[_0x0e75('0x1a')](respondWithFilteredResult(_0x3732cf,_0x4c6072))[_0x0e75('0x24')](handleError(_0x3732cf,null));};exports[_0x0e75('0x68')]=function(_0xdb63ed,_0x387493,_0x1662b8){return db[_0x0e75('0x39')]['find']({'where':{'id':_0xdb63ed['params']['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x387493,null))['then'](function(_0x4989f4){if(_0x4989f4){return _0x4989f4[_0x0e75('0x68')](_0xdb63ed[_0x0e75('0x3f')][_0x0e75('0x69')]);}})[_0x0e75('0x1a')](respondWithStatusCode(_0x387493,null))[_0x0e75('0x24')](handleError(_0x387493,null));};exports[_0x0e75('0x6a')]=function(_0x40530c,_0x9ae6b2,_0x3862b6){if(_0x40530c[_0x0e75('0x55')]['id']){delete _0x40530c['body']['id'];}return db['OpenchannelAccount'][_0x0e75('0x5b')]({'where':{'id':_0x40530c['params']['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x9ae6b2,null))['then'](function(_0x49daeb){if(_0x49daeb){_0x40530c['body'][_0x0e75('0x67')]=_0x49daeb['id'];return db[_0x0e75('0x6b')]['create'](_0x40530c['body']);}})['then'](respondWithResult(_0x9ae6b2,null))[_0x0e75('0x24')](handleError(_0x9ae6b2,null));};exports['getAnswers']=function(_0x47594a,_0x4e16d2,_0x1a7900){var _0x16758a={'raw':![],'where':{}};var _0x40b650={};var _0x5819dd={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0x0e75('0x64')]({'where':{'id':_0x47594a[_0x0e75('0x5f')]['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x4e16d2,null))[_0x0e75('0x1a')](function(_0x9dad8f){if(_0x9dad8f){_0x40b650[_0x0e75('0x3e')]=_['keys'](db[_0x0e75('0x6b')][_0x0e75('0x3a')]);_0x40b650['query']=_[_0x0e75('0x53')](_0x47594a[_0x0e75('0x3f')]);_0x40b650[_0x0e75('0x40')]=_[_0x0e75('0x41')](_0x40b650[_0x0e75('0x3e')],_0x40b650[_0x0e75('0x3f')]);_0x16758a['attributes']=_[_0x0e75('0x41')](_0x40b650[_0x0e75('0x3e')],qs[_0x0e75('0x42')](_0x47594a[_0x0e75('0x3f')][_0x0e75('0x42')]));_0x16758a[_0x0e75('0x43')]=_0x16758a[_0x0e75('0x43')]['length']?_0x16758a[_0x0e75('0x43')]:_0x40b650[_0x0e75('0x3e')];if(!_0x47594a[_0x0e75('0x3f')][_0x0e75('0x45')](_0x0e75('0x65'))){_0x16758a[_0x0e75('0x29')]=qs[_0x0e75('0x29')](_0x47594a[_0x0e75('0x3f')]['limit']);_0x16758a[_0x0e75('0x28')]=qs['offset'](_0x47594a[_0x0e75('0x3f')][_0x0e75('0x28')]);}_0x16758a[_0x0e75('0x66')]=qs[_0x0e75('0x46')](_0x47594a[_0x0e75('0x3f')][_0x0e75('0x46')]);_0x16758a['where']=qs[_0x0e75('0x40')](_[_0x0e75('0x48')](_0x47594a[_0x0e75('0x3f')],_0x40b650[_0x0e75('0x40')]));_0x16758a[_0x0e75('0x47')][_0x0e75('0x67')]=_0x9dad8f['id'];if(_0x47594a['query'][_0x0e75('0x49')]){_0x16758a[_0x0e75('0x47')]=_['merge'](_0x16758a['where'],{'$or':_[_0x0e75('0x4a')](_0x16758a[_0x0e75('0x43')],function(_0x3574ca){var _0x1f6811={};_0x1f6811[_0x3574ca]={'$like':'%'+_0x47594a[_0x0e75('0x3f')][_0x0e75('0x49')]+'%'};return _0x1f6811;})});}_0x16758a=_[_0x0e75('0x4c')]({},_0x16758a,_0x47594a[_0x0e75('0x4d')]);return db[_0x0e75('0x6b')][_0x0e75('0x27')]({'where':_0x16758a['where']})[_0x0e75('0x1a')](function(_0x403353){_0x5819dd[_0x0e75('0x27')]=_0x403353;if(_0x47594a[_0x0e75('0x3f')]['includeAll']){_0x16758a[_0x0e75('0x4f')]=[{'all':!![]}];}return db[_0x0e75('0x6b')][_0x0e75('0x50')](_0x16758a);})[_0x0e75('0x1a')](function(_0xcbfc8c){_0x5819dd[_0x0e75('0x51')]=_0xcbfc8c;return _0x5819dd;});}})[_0x0e75('0x1a')](respondWithFilteredResult(_0x4e16d2,_0x16758a))[_0x0e75('0x24')](handleError(_0x4e16d2,null));};exports['removeAnswers']=function(_0x2b7612,_0x1718b0,_0x3a70e1){return db[_0x0e75('0x39')][_0x0e75('0x5b')]({'where':{'id':_0x2b7612[_0x0e75('0x5f')]['id']}})['then'](handleEntityNotFound(_0x1718b0,null))[_0x0e75('0x1a')](function(_0x567724){if(_0x567724){return _0x567724[_0x0e75('0x6c')](_0x2b7612[_0x0e75('0x3f')][_0x0e75('0x69')]);}})[_0x0e75('0x1a')](respondWithStatusCode(_0x1718b0,null))[_0x0e75('0x24')](handleError(_0x1718b0,null));};exports[_0x0e75('0x6d')]=function(_0x25fd65,_0x293ed1,_0x25fa18){var _0x4f9c80={'body':_0x25fd65['body'],'channel':'openchannel'};var _0x5a607e=[];var _0x46784c=[];var _0x103802={};var _0x380fee=![];return db[_0x0e75('0x6e')][_0x0e75('0x60')]()['then'](function(_0x2e2469){if(!_0x2e2469){throw new db[(_0x0e75('0x17'))][(_0x0e75('0x6f'))]('no\x20available\x20attributes');}_0x5a607e=_[_0x0e75('0x70')](_['keys'](_0x2e2469),[_0x0e75('0x71'),_0x0e75('0x72')]);_0x46784c=_['difference'](_['keys'](_0x2e2469),['createdAt',_0x0e75('0x72'),_0x0e75('0x73'),_0x0e75('0x74')]);if(_0x25fd65[_0x0e75('0x55')]['id']){delete _0x25fd65[_0x0e75('0x55')]['id'];}if(_['isNil'](_0x25fd65[_0x0e75('0x55')][_0x0e75('0x75')])){throw new db[(_0x0e75('0x17'))][(_0x0e75('0x6f'))](_0x0e75('0x76'));}if(_[_0x0e75('0x77')](_0x25fd65['body'][_0x0e75('0x55')])||_0x25fd65[_0x0e75('0x55')][_0x0e75('0x55')]===''){throw new db[(_0x0e75('0x17'))][(_0x0e75('0x6f'))](_0x0e75('0x78'));}if(_['isNil'](_0x25fd65[_0x0e75('0x55')][_0x0e75('0x79')])){throw new db['Sequelize'][(_0x0e75('0x6f'))](_0x0e75('0x7a')+_0x46784c);}if(!_['includes'](_0x46784c,_0x25fd65[_0x0e75('0x55')]['mapKey'])){throw new db['Sequelize']['ValidationError']('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x46784c);}_0x103802[_0x25fd65['body'][_0x0e75('0x79')]]=_0x25fd65['body'][_0x0e75('0x75')];})['then'](function(){return db[_0x0e75('0x39')][_0x0e75('0x5b')]({'where':{'id':_0x25fd65[_0x0e75('0x5f')]['id']},'include':[{'model':db[_0x0e75('0x7b')],'as':'List','include':[{'model':db[_0x0e75('0x6e')],'as':'Contacts','where':_0x103802,'limit':0x1,'order':[[_0x0e75('0x72'),_0x0e75('0x7c')]]}]},{'model':db[_0x0e75('0x7d')],'as':_0x0e75('0x7e')}]});})['then'](handleEntityNotFound(_0x293ed1,null))[_0x0e75('0x1a')](function(_0x2f9da7){if(_0x2f9da7&&_0x2f9da7[_0x0e75('0x7f')]){_0x4f9c80[_0x0e75('0x80')]=_0x2f9da7;_0x4f9c80[_0x0e75('0x81')]=_0x2f9da7[_0x0e75('0x7e')];_0x4f9c80['list']=_0x2f9da7['List'];_0x4f9c80[_0x0e75('0x81')]=_[_0x0e75('0x82')](_0x4f9c80['applications'],[_0x0e75('0x83')],[_0x0e75('0x84')]);if(_0x4f9c80['account'][_0x0e75('0x7e')]){delete _0x4f9c80[_0x0e75('0x80')][_0x0e75('0x7e')];}if(_0x4f9c80[_0x0e75('0x80')][_0x0e75('0x7f')]&&_0x4f9c80[_0x0e75('0x80')]['List']['Contacts'][_0x0e75('0x44')]){return _0x4f9c80[_0x0e75('0x80')]['List'][_0x0e75('0x85')][0x0];}var _0x540999=_[_0x0e75('0x86')](_0x25fd65[_0x0e75('0x55')],{'firstName':_0x25fd65[_0x0e75('0x55')][_0x0e75('0x75')],'ListId':_0x2f9da7[_0x0e75('0x74')]});_0x540999[_0x25fd65[_0x0e75('0x55')]['mapKey']]=_0x25fd65[_0x0e75('0x55')][_0x0e75('0x75')];return db[_0x0e75('0x6e')][_0x0e75('0x54')](_0x540999,{'fields':_0x5a607e,'raw':!![]});}})[_0x0e75('0x1a')](handleEntityNotFound(_0x293ed1,null))['then'](function(_0x52dc04){_0x4f9c80[_0x0e75('0x87')]=_0x52dc04;if(_0x52dc04){var _0x539736={'ContactId':_0x52dc04['id'],'OpenchannelAccountId':_0x25fd65[_0x0e75('0x5f')]['id'],'from':(_0x52dc04[_0x0e75('0x88')]||'')+'\x20'+(_0x52dc04['lastName']||'')};var _0x212d81={'OpenchannelAccountId':_0x25fd65[_0x0e75('0x5f')]['id'],'closed':![]};if(_0x25fd65[_0x0e75('0x55')][_0x0e75('0x89')]){_0x212d81[_0x0e75('0x89')]=_0x25fd65[_0x0e75('0x55')][_0x0e75('0x89')];return db[_0x0e75('0x8a')]['find']({'where':_0x212d81})['then'](function(_0xcb5baa){if(_0xcb5baa){return[_0xcb5baa,![]];}_0x539736[_0x0e75('0x89')]=_0x25fd65['body'][_0x0e75('0x89')];_0x539736['externalUrl']=_0x25fd65[_0x0e75('0x55')][_0x0e75('0x8b')];return db[_0x0e75('0x8a')][_0x0e75('0x54')](_0x539736)[_0x0e75('0x1a')](function(_0x3dff55){return[_0x3dff55,!![]];});});}else{_0x212d81[_0x0e75('0x89')]=null;}_0x212d81['ContactId']=_0x52dc04['id'];return db[_0x0e75('0x8a')][_0x0e75('0x5b')]({'where':_0x212d81})[_0x0e75('0x1a')](function(_0x26a2d4){if(_0x26a2d4){return[_0x26a2d4,![]];}return db[_0x0e75('0x8a')]['create'](_0x539736)[_0x0e75('0x1a')](function(_0x996848){return[_0x996848,!![]];});});}})[_0x0e75('0x8c')](function(_0x115a28,_0x4758be){if(_0x115a28){_0x380fee=_0x4758be;if(!_0x4758be){var _0x19da92={'from':(_0x4f9c80[_0x0e75('0x87')]['firstName']||'')+'\x20'+(_0x4f9c80[_0x0e75('0x87')][_0x0e75('0x8d')]||'')};if(_0x25fd65[_0x0e75('0x55')][_0x0e75('0x89')]&&_0x25fd65[_0x0e75('0x55')][_0x0e75('0x8e')]&&_0x25fd65[_0x0e75('0x55')][_0x0e75('0x89')]!=_0x25fd65[_0x0e75('0x55')][_0x0e75('0x8e')]){_0x19da92[_0x0e75('0x89')]=_0x25fd65[_0x0e75('0x55')][_0x0e75('0x8e')];}return _0x115a28['update'](_0x19da92);}else{return _0x115a28;}}})[_0x0e75('0x1a')](function(_0x3394c2){_0x4f9c80[_0x0e75('0x8f')]=_0x3394c2[_0x0e75('0x56')]({'plain':!![]});_0x4f9c80[_0x0e75('0x8f')]['created']=_0x380fee;if(_0x4f9c80['interaction'][_0x0e75('0x90')]){if(_0x4f9c80[_0x0e75('0x80')][_0x0e75('0x91')]){_0x4f9c80[_0x0e75('0x81')][_0x0e75('0x92')]({'id':0x0,'priority':_0x4f9c80['applications']['length']+0x1,'app':_0x0e75('0x93'),'appdata':_0x0e75('0x94'),'interval':_0x0e75('0x95')});}}return db['OpenchannelMessage']['create']({'body':_0x25fd65['body']['body'],'OpenchannelAccountId':_0x25fd65[_0x0e75('0x5f')]['id'],'OpenchannelInteractionId':_0x3394c2['id'],'direction':'in','ContactId':_0x4f9c80['contact']['id'],'AttachmentId':_0x25fd65[_0x0e75('0x55')][_0x0e75('0x96')]});})['then'](function(_0x35732c){_0x4f9c80[_0x0e75('0x22')]=_0x35732c;if(_0x4f9c80[_0x0e75('0x8f')][_0x0e75('0x97')]){return db[_0x0e75('0x98')]['find']({'attributes':['id',_0x0e75('0x35')],'where':{'id':_0x4f9c80['interaction'][_0x0e75('0x97')]}})[_0x0e75('0x1a')](function(_0x2c383a){if(_0x2c383a){_0x4f9c80[_0x0e75('0x81')][_0x0e75('0x99')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x2c383a[_0x0e75('0x35')]+','+(_0x4f9c80[_0x0e75('0x80')][_0x0e75('0x9a')]||0xa),'interval':_0x0e75('0x95')});_0x4f9c80[_0x0e75('0x9b')]=![];}return respondWithRpcPromise(_0x0e75('0x9c'),'startRouting',_0x4f9c80);});}return respondWithRpcPromise(_0x0e75('0x9c'),_0x0e75('0x9d'),_0x4f9c80);})[_0x0e75('0x1a')](function(_0xd8034b){respondWithRpcPromise(_0x0e75('0x9e'),_0x0e75('0x9e'),{'event':_0x0e75('0x6d'),'message':_0xd8034b},client9002);return _0xd8034b;})[_0x0e75('0x1a')](respondWithResult(_0x293ed1,null))[_0x0e75('0x24')](handleError(_0x293ed1,null));};exports[_0x0e75('0x9f')]=function(_0x32b2cb,_0x17eb3f,_0x24f62c){return db['OpenchannelAccount'][_0x0e75('0x64')]({'where':{'id':_0x32b2cb[_0x0e75('0x5f')]['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x17eb3f,null))['then'](function(_0x4fcff0){if(_0x4fcff0){return db[_0x0e75('0xa0')][_0x0e75('0xa1')](function(_0x4db625){return db[_0x0e75('0x7d')][_0x0e75('0x31')]({'where':{'OpenchannelAccountId':_0x32b2cb[_0x0e75('0x5f')]['id']},'transaction':_0x4db625})['then'](function(_0x4637e7){var _0x113eea=_['map'](_0x32b2cb[_0x0e75('0x55')],function(_0x1e389e){_0x1e389e['OpenchannelAccountId']=_0x32b2cb['params']['id'];return _0x1e389e;});return db[_0x0e75('0x7d')][_0x0e75('0xa2')](_0x113eea,{'transaction':_0x4db625});});})[_0x0e75('0x1a')](function(){return db['OpenchannelApplication'][_0x0e75('0xa3')]({'where':{'OpenchannelAccountId':_0x32b2cb['params']['id']},'order':_0x0e75('0x83')});});}})[_0x0e75('0x1a')](respondWithResult(_0x17eb3f,null))[_0x0e75('0x24')](handleError(_0x17eb3f,null));};exports[_0x0e75('0xa4')]=function(_0x4a2a30,_0x2485d5,_0x1d75c5){var _0x2a1a33={};var _0x153e69={};var _0x157805;var _0x1f8e7a;return db[_0x0e75('0x39')][_0x0e75('0x64')]({'where':{'id':_0x4a2a30[_0x0e75('0x5f')]['id']}})['then'](handleEntityNotFound(_0x2485d5,null))[_0x0e75('0x1a')](function(_0x397926){if(_0x397926){_0x157805=_0x397926;_0x153e69[_0x0e75('0x3e')]=_[_0x0e75('0x53')](db[_0x0e75('0x7d')]['rawAttributes']);_0x153e69[_0x0e75('0x3f')]=_[_0x0e75('0x53')](_0x4a2a30[_0x0e75('0x3f')]);_0x153e69[_0x0e75('0x40')]=_['intersection'](_0x153e69[_0x0e75('0x3e')],_0x153e69[_0x0e75('0x3f')]);_0x2a1a33[_0x0e75('0x43')]=_[_0x0e75('0x41')](_0x153e69['model'],qs['fields'](_0x4a2a30['query'][_0x0e75('0x42')]));_0x2a1a33['attributes']=_0x2a1a33[_0x0e75('0x43')][_0x0e75('0x44')]?_0x2a1a33['attributes']:_0x153e69[_0x0e75('0x3e')];_0x2a1a33[_0x0e75('0x66')]=qs[_0x0e75('0x46')](_0x4a2a30[_0x0e75('0x3f')][_0x0e75('0x46')]);_0x2a1a33['where']=qs[_0x0e75('0x40')](_[_0x0e75('0x48')](_0x4a2a30[_0x0e75('0x3f')],_0x153e69[_0x0e75('0x40')]));if(_0x4a2a30[_0x0e75('0x3f')][_0x0e75('0x49')]){_0x2a1a33[_0x0e75('0x47')]=_[_0x0e75('0x4c')](_0x2a1a33[_0x0e75('0x47')],{'$or':_[_0x0e75('0x4a')](_0x2a1a33['attributes'],function(_0x4e55ea){var _0x31b9b8={};_0x31b9b8[_0x4e55ea]={'$like':'%'+_0x4a2a30[_0x0e75('0x3f')]['filter']+'%'};return _0x31b9b8;})});}_0x2a1a33=_[_0x0e75('0x4c')]({},_0x2a1a33,_0x4a2a30[_0x0e75('0x4d')]);return _0x157805[_0x0e75('0xa4')](_0x2a1a33);}})[_0x0e75('0x1a')](function(_0x333d7b){if(_0x333d7b){_0x1f8e7a=_0x333d7b['length'];if(!_0x4a2a30[_0x0e75('0x3f')][_0x0e75('0x45')](_0x0e75('0x65'))){_0x2a1a33[_0x0e75('0x29')]=qs[_0x0e75('0x29')](_0x4a2a30[_0x0e75('0x3f')][_0x0e75('0x29')]);_0x2a1a33[_0x0e75('0x28')]=qs[_0x0e75('0x28')](_0x4a2a30['query'][_0x0e75('0x28')]);}return _0x157805[_0x0e75('0xa4')](_0x2a1a33);}})[_0x0e75('0x1a')](function(_0x1d6f09){if(_0x1d6f09){return _0x1d6f09?{'count':_0x1f8e7a,'rows':_0x1d6f09}:null;}})['then'](respondWithResult(_0x2485d5,null))[_0x0e75('0x24')](handleError(_0x2485d5,null));};exports['getInteractions']=function(_0x17e7cd,_0x1176dd,_0x2e20ab){var _0x1f3755={'raw':![],'where':{}};var _0x868b60={};var _0x17aeee={'count':0x0,'rows':[]};return db[_0x0e75('0x39')][_0x0e75('0x64')]({'where':{'id':_0x17e7cd[_0x0e75('0x5f')]['id']}})['then'](handleEntityNotFound(_0x1176dd,null))[_0x0e75('0x1a')](function(_0x5511e5){if(_0x5511e5){_0x868b60[_0x0e75('0x3e')]=_[_0x0e75('0x53')](db['OpenchannelInteraction']['rawAttributes']);_0x868b60['query']=_[_0x0e75('0x53')](_0x17e7cd[_0x0e75('0x3f')]);_0x868b60['filters']=_[_0x0e75('0x41')](_0x868b60['model'],_0x868b60[_0x0e75('0x3f')]);_0x1f3755[_0x0e75('0x43')]=_[_0x0e75('0x41')](_0x868b60[_0x0e75('0x3e')],qs['fields'](_0x17e7cd[_0x0e75('0x3f')][_0x0e75('0x42')]));_0x1f3755['attributes']=_0x1f3755[_0x0e75('0x43')]['length']?_0x1f3755[_0x0e75('0x43')]:_0x868b60['model'];if(!_0x17e7cd[_0x0e75('0x3f')][_0x0e75('0x45')]('nolimit')){_0x1f3755[_0x0e75('0x29')]=qs[_0x0e75('0x29')](_0x17e7cd[_0x0e75('0x3f')][_0x0e75('0x29')]);_0x1f3755[_0x0e75('0x28')]=qs[_0x0e75('0x28')](_0x17e7cd[_0x0e75('0x3f')]['offset']);}_0x1f3755[_0x0e75('0x66')]=qs[_0x0e75('0x46')](_0x17e7cd[_0x0e75('0x3f')][_0x0e75('0x46')]);_0x1f3755[_0x0e75('0x47')]=qs[_0x0e75('0x40')](_[_0x0e75('0x48')](_0x17e7cd[_0x0e75('0x3f')],_0x868b60[_0x0e75('0x40')]));_0x1f3755[_0x0e75('0x47')]['OpenchannelAccountId']=_0x5511e5['id'];if(_0x17e7cd[_0x0e75('0x3f')]['filter']){_0x1f3755[_0x0e75('0x47')]=_[_0x0e75('0x4c')](_0x1f3755['where'],{'$or':_[_0x0e75('0x4a')](_0x1f3755['attributes'],function(_0x102f23){var _0x40e949={};_0x40e949[_0x102f23]={'$like':'%'+_0x17e7cd[_0x0e75('0x3f')]['filter']+'%'};return _0x40e949;})});}_0x1f3755=_[_0x0e75('0x4c')]({},_0x1f3755,_0x17e7cd[_0x0e75('0x4d')]);return db[_0x0e75('0x8a')]['count']({'where':_0x1f3755['where']})[_0x0e75('0x1a')](function(_0x53188b){_0x17aeee[_0x0e75('0x27')]=_0x53188b;if(_0x17e7cd[_0x0e75('0x3f')][_0x0e75('0x4e')]){_0x1f3755[_0x0e75('0x4f')]=[{'model':db['CmContact'],'as':_0x0e75('0xa5'),'required':![]},{'model':db[_0x0e75('0x98')],'as':_0x0e75('0xa6'),'attributes':[_0x0e75('0x35'),'fullname','internal'],'required':![]},{'model':db[_0x0e75('0xa7')],'as':_0x0e75('0xa8'),'attributes':['id',_0x0e75('0x35'),_0x0e75('0xa9')],'where':_0x17e7cd[_0x0e75('0x3f')][_0x0e75('0xaa')]?{'id':_0x17e7cd['query']['tag']}:undefined,'required':_0x17e7cd['query'][_0x0e75('0xaa')]?!![]:![]}];}return db['OpenchannelInteraction'][_0x0e75('0x50')](_0x1f3755);})[_0x0e75('0x1a')](function(_0x42bb7d){_0x17aeee[_0x0e75('0x51')]=_0x42bb7d;return _0x17aeee;});}})[_0x0e75('0x1a')](respondWithFilteredResult(_0x1176dd,_0x1f3755))[_0x0e75('0x24')](handleError(_0x1176dd,null));};exports[_0x0e75('0xab')]=function(_0x996a43,_0x56af3b,_0x5d38c1){return db[_0x0e75('0x39')]['find']({'where':{'id':_0x996a43[_0x0e75('0x5f')]['id']}})['then'](handleEntityNotFound(_0x56af3b,null))['then'](function(_0x3957e6){if(_0x3957e6){return _0x3957e6[_0x0e75('0xab')](_0x996a43[_0x0e75('0x55')]['ids'],_[_0x0e75('0xac')](_0x996a43[_0x0e75('0x55')],['ids','id'])||{})[_0x0e75('0x8c')](function(_0xc78dc){for(var _0x1aad37=0x0;_0x1aad37<_0x996a43['body'][_0x0e75('0x69')][_0x0e75('0x44')];_0x1aad37+=0x1){socket[_0x0e75('0xad')]('userOpenchannelAccount:save',{'UserId':_0x996a43['body'][_0x0e75('0x69')][_0x1aad37],'OpenchannelAccountId':_0x996a43[_0x0e75('0x5f')]['id']});}return _0xc78dc;});}})[_0x0e75('0x1a')](respondWithResult(_0x56af3b,null))[_0x0e75('0x24')](handleError(_0x56af3b,null));};exports[_0x0e75('0xae')]=function(_0x5b0f1f,_0x1ee59e,_0x1840a0){return db[_0x0e75('0x39')]['find']({'where':{'id':_0x5b0f1f[_0x0e75('0x5f')]['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x1ee59e,null))[_0x0e75('0x1a')](function(_0x9a55d8){if(_0x9a55d8){return _0x9a55d8[_0x0e75('0xae')](_0x5b0f1f[_0x0e75('0x3f')]['ids'])[_0x0e75('0x1a')](function(){if(_[_0x0e75('0xaf')](_0x5b0f1f['query'][_0x0e75('0x69')])){for(var _0xa636fd=0x0;_0xa636fd<_0x5b0f1f[_0x0e75('0x3f')][_0x0e75('0x69')][_0x0e75('0x44')];_0xa636fd+=0x1){socket['emit']('userOpenchannelAccount:remove',{'UserId':Number(_0x5b0f1f[_0x0e75('0x3f')][_0x0e75('0x69')][_0xa636fd]),'OpenchannelAccountId':Number(_0x5b0f1f[_0x0e75('0x5f')]['id'])});}}else{socket[_0x0e75('0xad')](_0x0e75('0xb0'),{'UserId':Number(_0x5b0f1f[_0x0e75('0x3f')][_0x0e75('0x69')]),'OpenchannelAccountId':Number(_0x5b0f1f[_0x0e75('0x5f')]['id'])});}});}})['then'](respondWithStatusCode(_0x1ee59e,null))['catch'](handleError(_0x1ee59e,null));};exports[_0x0e75('0xb1')]=function(_0x4d42d8,_0x465ada,_0x3fd662){var _0x3e7deb={};var _0x440225={};var _0x2cb66f;var _0x26379f;return db[_0x0e75('0x39')][_0x0e75('0x64')]({'where':{'id':_0x4d42d8[_0x0e75('0x5f')]['id']}})[_0x0e75('0x1a')](handleEntityNotFound(_0x465ada,null))[_0x0e75('0x1a')](function(_0x48cf60){if(_0x48cf60){_0x2cb66f=_0x48cf60;_0x440225[_0x0e75('0x3e')]=_[_0x0e75('0x53')](db[_0x0e75('0x98')][_0x0e75('0x3a')]);_0x440225[_0x0e75('0x3f')]=_[_0x0e75('0x53')](_0x4d42d8['query']);_0x440225['filters']=_[_0x0e75('0x41')](_0x440225[_0x0e75('0x3e')],_0x440225[_0x0e75('0x3f')]);_0x3e7deb[_0x0e75('0x43')]=_[_0x0e75('0x41')](_0x440225[_0x0e75('0x3e')],qs[_0x0e75('0x42')](_0x4d42d8['query'][_0x0e75('0x42')]));_0x3e7deb[_0x0e75('0x43')]=_0x3e7deb[_0x0e75('0x43')][_0x0e75('0x44')]?_0x3e7deb[_0x0e75('0x43')]:_0x440225[_0x0e75('0x3e')];_0x3e7deb[_0x0e75('0x66')]=qs['sort'](_0x4d42d8[_0x0e75('0x3f')][_0x0e75('0x46')]);_0x3e7deb[_0x0e75('0x47')]=qs['filters'](_['pick'](_0x4d42d8[_0x0e75('0x3f')],_0x440225['filters']));if(_0x4d42d8['query'][_0x0e75('0x49')]){_0x3e7deb[_0x0e75('0x47')]=_[_0x0e75('0x4c')](_0x3e7deb[_0x0e75('0x47')],{'$or':_[_0x0e75('0x4a')](_0x3e7deb[_0x0e75('0x43')],function(_0x441944){var _0x267d6a={};_0x267d6a[_0x441944]={'$like':'%'+_0x4d42d8[_0x0e75('0x3f')]['filter']+'%'};return _0x267d6a;})});}_0x3e7deb=_[_0x0e75('0x4c')]({},_0x3e7deb,_0x4d42d8['options']);return _0x2cb66f[_0x0e75('0xb1')](_0x3e7deb);}})[_0x0e75('0x1a')](function(_0x18231d){if(_0x18231d){_0x26379f=_0x18231d[_0x0e75('0x44')];if(!_0x4d42d8[_0x0e75('0x3f')][_0x0e75('0x45')](_0x0e75('0x65'))){_0x3e7deb['limit']=qs[_0x0e75('0x29')](_0x4d42d8['query'][_0x0e75('0x29')]);_0x3e7deb[_0x0e75('0x28')]=qs[_0x0e75('0x28')](_0x4d42d8[_0x0e75('0x3f')][_0x0e75('0x28')]);}return _0x2cb66f[_0x0e75('0xb1')](_0x3e7deb);}})[_0x0e75('0x1a')](function(_0x461df7){if(_0x461df7){return _0x461df7?{'count':_0x26379f,'rows':_0x461df7}:null;}})[_0x0e75('0x1a')](respondWithResult(_0x465ada,null))[_0x0e75('0x24')](handleError(_0x465ada,null));};exports[_0x0e75('0x36')]=function(_0x3e30fc,_0x170740,_0x38b369){var _0x2baebf,_0x2f5989,_0x559e07;if(_[_0x0e75('0x77')](_0x3e30fc[_0x0e75('0x55')][_0x0e75('0x55')])||_0x3e30fc[_0x0e75('0x55')][_0x0e75('0x55')]===''){throw new db[(_0x0e75('0x17'))][(_0x0e75('0x6f'))](_0x0e75('0x78'));}if(_[_0x0e75('0x77')](_0x3e30fc['body']['to'])){}_0x2baebf=_0x3e30fc['body']['to'];return db[_0x0e75('0x39')]['findOne']({'where':{'id':_0x3e30fc[_0x0e75('0x5f')]['id']}})['then'](handleEntityNotFound(_0x170740,null))[_0x0e75('0x1a')](function(_0x4f6ff1){if(_0x4f6ff1){return db['OpenchannelAccount']['find']({'where':{'id':_0x4f6ff1['id']},'include':[{'model':db[_0x0e75('0x7b')],'as':_0x0e75('0x7f'),'include':[{'model':db['CmContact'],'as':_0x0e75('0x85'),'where':{[_0x4f6ff1['mapKey']]:_0x2baebf},'limit':0x1,'order':[['updatedAt','DESC']]}]}]})['then'](handleEntityNotFound(_0x170740,null))[_0x0e75('0x1a')](function(_0x18f41f){if(_0x18f41f&&_0x18f41f[_0x0e75('0x7f')]){_0x2f5989=_0x18f41f[_0x0e75('0x56')]({'plain':!![]});if(_0x2f5989[_0x0e75('0x7f')]&&_0x2f5989[_0x0e75('0x7f')]['Contacts'][_0x0e75('0x44')]){return _0x2f5989['List'][_0x0e75('0x85')][0x0];}return db[_0x0e75('0x6e')]['create'](_[_0x0e75('0x86')](_0x3e30fc[_0x0e75('0x55')],{'firstName':_0x2baebf,[_0x18f41f[_0x0e75('0x79')]]:_0x2baebf,'phone':_0x2baebf,'ListId':_0x2f5989[_0x0e75('0x74')]}));}})[_0x0e75('0x1a')](handleEntityNotFound(_0x170740,null))['then'](function(_0x5f3e9a){if(_0x5f3e9a){_0x559e07=_0x5f3e9a;return db[_0x0e75('0x8a')]['find']({'where':{'ContactId':_0x559e07['id'],'closed':![],'OpenchannelAccountId':_0x2f5989['id']}})['then'](function(_0x1c2e62){if(_0x1c2e62){return[_0x1c2e62,![]];}return db[_0x0e75('0x8a')][_0x0e75('0x54')]({'UserId':_0x3e30fc['user']['id'],'ContactId':_0x559e07['id'],'OpenchannelAccountId':_0x2f5989['id'],'lastMsgDirection':_0x0e75('0xb2'),'Messages':[_[_0x0e75('0x4c')](_0x3e30fc[_0x0e75('0x55')],{'read':![],'body':_0x3e30fc[_0x0e75('0x55')][_0x0e75('0x55')],'OpenchannelAccountId':_0x2f5989['id'],'UserId':_0x3e30fc[_0x0e75('0x59')]['id'],'ContactId':_0x559e07['id']})]},{'include':[{'model':db[_0x0e75('0xb3')],'as':'Messages'}]})[_0x0e75('0x1a')](function(_0x57cd72){return[_0x57cd72,!![]];});});}})[_0x0e75('0x8c')](function(_0x52db01,_0x4f6aeb){if(_0x4f6aeb){return _0x52db01;}return db[_0x0e75('0xb3')][_0x0e75('0x54')](_['merge'](_0x3e30fc[_0x0e75('0x55')],{'read':![],'body':_0x3e30fc['body']['body'],'OpenchannelAccountId':_0x2f5989['id'],'OpenchannelInteractionId':_0x52db01['id'],'UserId':_0x3e30fc[_0x0e75('0x59')]['id'],'ContactId':_0x559e07['id']}))[_0x0e75('0x1a')](function(_0x192c65){_0x52db01['dataValues'][_0x0e75('0xb4')]=[];_0x52db01['dataValues'][_0x0e75('0xb4')][_0x0e75('0x92')](_0x192c65['dataValues']);return _0x52db01;});});}})[_0x0e75('0x1a')](respondWithResult(_0x170740,null))[_0x0e75('0x24')](handleError(_0x170740,null));};
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.events.js b/server/api/openchannelAccount/openchannelAccount.events.js
index 9bf44d8..b77dfa6 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 _0x36a9=['update','remove','emit','hook','exports','events','../../mysqldb','OpenchannelAccount','setMaxListeners','save'];(function(_0x45c262,_0x2e3ce5){var _0x4f2ba6=function(_0x4912d1){while(--_0x4912d1){_0x45c262['push'](_0x45c262['shift']());}};_0x4f2ba6(++_0x2e3ce5);}(_0x36a9,0x159));var _0x936a=function(_0x35d056,_0x278a53){_0x35d056=_0x35d056-0x0;var _0x385ec1=_0x36a9[_0x35d056];return _0x385ec1;};'use strict';var EventEmitter=require(_0x936a('0x0'));var OpenchannelAccount=require(_0x936a('0x1'))['db'][_0x936a('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x936a('0x3')](0x0);var events={'afterCreate':_0x936a('0x4'),'afterUpdate':_0x936a('0x5'),'afterDestroy':_0x936a('0x6')};function emitEvent(_0x24383a){return function(_0xb46454,_0x5a2b13,_0x2a89f8){OpenchannelAccountEvents[_0x936a('0x7')](_0x24383a+':'+_0xb46454['id'],_0xb46454);OpenchannelAccountEvents[_0x936a('0x7')](_0x24383a,_0xb46454);_0x2a89f8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelAccount[_0x936a('0x8')](e,emitEvent(event));}}module[_0x936a('0x9')]=OpenchannelAccountEvents;
\ No newline at end of file
+var _0xeaaa=['emit','hook','exports','../../mysqldb','setMaxListeners','update','remove'];(function(_0x4d2b0a,_0x1c7a43){var _0x26eac2=function(_0x5d85ac){while(--_0x5d85ac){_0x4d2b0a['push'](_0x4d2b0a['shift']());}};_0x26eac2(++_0x1c7a43);}(_0xeaaa,0x1d8));var _0xaeaa=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xeaaa[_0x397e5f];return _0x5302b8;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require(_0xaeaa('0x0'))['db']['OpenchannelAccount'];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0xaeaa('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xaeaa('0x2'),'afterDestroy':_0xaeaa('0x3')};function emitEvent(_0x30441d){return function(_0x727cfb,_0x244bc3,_0x35cee6){OpenchannelAccountEvents[_0xaeaa('0x4')](_0x30441d+':'+_0x727cfb['id'],_0x727cfb);OpenchannelAccountEvents[_0xaeaa('0x4')](_0x30441d,_0x727cfb);_0x35cee6(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelAccount[_0xaeaa('0x5')](e,emitEvent(event));}}module[_0xaeaa('0x6')]=OpenchannelAccountEvents;
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.model.js b/server/api/openchannelAccount/openchannelAccount.model.js
index eeeca38..b9349e2 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 _0x37ca=['../../config/logger','moment','request-promise','path','rimraf','../../config/environment','./openchannelAccount.attributes','define','OpenchannelAccount','openchannel_accounts','lodash','util'];(function(_0x2fd141,_0x988722){var _0x2324e1=function(_0x2ec951){while(--_0x2ec951){_0x2fd141['push'](_0x2fd141['shift']());}};_0x2324e1(++_0x988722);}(_0x37ca,0x112));var _0xa37c=function(_0x59b677,_0xf359aa){_0x59b677=_0x59b677-0x0;var _0x5bb449=_0x37ca[_0x59b677];return _0x5bb449;};'use strict';var _=require(_0xa37c('0x0'));var util=require(_0xa37c('0x1'));var logger=require(_0xa37c('0x2'))('api');var moment=require(_0xa37c('0x3'));var BPromise=require('bluebird');var rp=require(_0xa37c('0x4'));var fs=require('fs');var path=require(_0xa37c('0x5'));var rimraf=require(_0xa37c('0x6'));var config=require(_0xa37c('0x7'));var attributes=require(_0xa37c('0x8'));module['exports']=function(_0x537fcb,_0x36902a){return _0x537fcb[_0xa37c('0x9')](_0xa37c('0xa'),attributes,{'tableName':_0xa37c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6edf=['rimraf','./openchannelAccount.attributes','exports','define','OpenchannelAccount','openchannel_accounts','lodash','../../config/logger','api','request-promise'];(function(_0x22adff,_0x502139){var _0x44d32b=function(_0x5e410e){while(--_0x5e410e){_0x22adff['push'](_0x22adff['shift']());}};_0x44d32b(++_0x502139);}(_0x6edf,0xd8));var _0xf6ed=function(_0x4163e5,_0x2f0071){_0x4163e5=_0x4163e5-0x0;var _0x4c600a=_0x6edf[_0x4163e5];return _0x4c600a;};'use strict';var _=require(_0xf6ed('0x0'));var util=require('util');var logger=require(_0xf6ed('0x1'))(_0xf6ed('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xf6ed('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf6ed('0x4'));var config=require('../../config/environment');var attributes=require(_0xf6ed('0x5'));module[_0xf6ed('0x6')]=function(_0x223dee,_0x302f69){return _0x223dee[_0xf6ed('0x7')](_0xf6ed('0x8'),attributes,{'tableName':_0xf6ed('0x9'),'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 f388352..169955b 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 _0x8026=['OpenchannelAccount,\x20%s,\x20%s','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./openchannelAccount.socket','register','request','then','info'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x8026,0xa0));var _0x6802=function(_0x367995,_0x129ae2){_0x367995=_0x367995-0x0;var _0x22daa8=_0x8026[_0x367995];return _0x22daa8;};'use strict';var _=require(_0x6802('0x0'));var util=require('util');var moment=require(_0x6802('0x1'));var BPromise=require(_0x6802('0x2'));var rs=require(_0x6802('0x3'));var fs=require('fs');var Redis=require(_0x6802('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x6802('0x5'));var logger=require(_0x6802('0x6'))(_0x6802('0x7'));var config=require(_0x6802('0x8'));var jayson=require(_0x6802('0x9'));var client=jayson[_0x6802('0xa')][_0x6802('0xb')]({'port':0x232a});config[_0x6802('0xc')]=_[_0x6802('0xd')](config[_0x6802('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x6802('0xe'))(new Redis(config[_0x6802('0xc')]));require(_0x6802('0xf'))[_0x6802('0x10')](socket);function respondWithRpcPromise(_0x2ad6c9,_0x248afc,_0x426c20){return new BPromise(function(_0x7641d7,_0x3f753c){return client[_0x6802('0x11')](_0x2ad6c9,_0x426c20)[_0x6802('0x12')](function(_0x39612f){logger[_0x6802('0x13')](_0x6802('0x14'),_0x248afc,'request\x20sent');logger[_0x6802('0x15')](_0x6802('0x16'),_0x248afc,_0x6802('0x17'),JSON[_0x6802('0x18')](_0x39612f));if(_0x39612f[_0x6802('0x19')]){if(_0x39612f['error'][_0x6802('0x1a')]===0x1f4){logger[_0x6802('0x19')](_0x6802('0x14'),_0x248afc,_0x39612f[_0x6802('0x19')][_0x6802('0x1b')]);return _0x3f753c(_0x39612f['error'][_0x6802('0x1b')]);}logger[_0x6802('0x19')](_0x6802('0x14'),_0x248afc,_0x39612f['error']['message']);return _0x7641d7(_0x39612f[_0x6802('0x19')]['message']);}else{logger[_0x6802('0x13')]('OpenchannelAccount,\x20%s,\x20%s',_0x248afc,_0x6802('0x17'));_0x7641d7(_0x39612f[_0x6802('0x1c')][_0x6802('0x1b')]);}})[_0x6802('0x1d')](function(_0x3b4df1){logger[_0x6802('0x19')](_0x6802('0x14'),_0x248afc,_0x3b4df1);_0x3f753c(_0x3b4df1);});});}
\ No newline at end of file
+var _0xca2a=['socket.io-emitter','./openchannelAccount.socket','register','then','info','OpenchannelAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','redis','defaults','localhost'];(function(_0x286726,_0x20a337){var _0xcd4fe9=function(_0x4d7da6){while(--_0x4d7da6){_0x286726['push'](_0x286726['shift']());}};_0xcd4fe9(++_0x20a337);}(_0xca2a,0x188));var _0xaca2=function(_0x1f4a96,_0x247bd0){_0x1f4a96=_0x1f4a96-0x0;var _0x2edc06=_0xca2a[_0x1f4a96];return _0x2edc06;};'use strict';var _=require(_0xaca2('0x0'));var util=require(_0xaca2('0x1'));var moment=require('moment');var BPromise=require(_0xaca2('0x2'));var rs=require(_0xaca2('0x3'));var fs=require('fs');var Redis=require(_0xaca2('0x4'));var db=require(_0xaca2('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xaca2('0x6'))(_0xaca2('0x7'));var config=require('../../config/environment');var jayson=require(_0xaca2('0x8'));var client=jayson[_0xaca2('0x9')]['http']({'port':0x232a});config[_0xaca2('0xa')]=_[_0xaca2('0xb')](config[_0xaca2('0xa')],{'host':_0xaca2('0xc'),'port':0x18eb});var socket=require(_0xaca2('0xd'))(new Redis(config[_0xaca2('0xa')]));require(_0xaca2('0xe'))[_0xaca2('0xf')](socket);function respondWithRpcPromise(_0x46a110,_0x54b8ee,_0x2e9032){return new BPromise(function(_0x84100,_0x1873b4){return client['request'](_0x46a110,_0x2e9032)[_0xaca2('0x10')](function(_0x117dce){logger[_0xaca2('0x11')](_0xaca2('0x12'),_0x54b8ee,'request\x20sent');logger[_0xaca2('0x13')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x54b8ee,_0xaca2('0x14'),JSON[_0xaca2('0x15')](_0x117dce));if(_0x117dce[_0xaca2('0x16')]){if(_0x117dce['error'][_0xaca2('0x17')]===0x1f4){logger[_0xaca2('0x16')](_0xaca2('0x12'),_0x54b8ee,_0x117dce['error'][_0xaca2('0x18')]);return _0x1873b4(_0x117dce[_0xaca2('0x16')][_0xaca2('0x18')]);}logger['error'](_0xaca2('0x12'),_0x54b8ee,_0x117dce['error'][_0xaca2('0x18')]);return _0x84100(_0x117dce[_0xaca2('0x16')][_0xaca2('0x18')]);}else{logger[_0xaca2('0x11')](_0xaca2('0x12'),_0x54b8ee,_0xaca2('0x14'));_0x84100(_0x117dce[_0xaca2('0x19')][_0xaca2('0x18')]);}})[_0xaca2('0x1a')](function(_0x1c0fe5){logger[_0xaca2('0x16')](_0xaca2('0x12'),_0x54b8ee,_0x1c0fe5);_0x1873b4(_0x1c0fe5);});});}
\ No newline at end of file
diff --git a/server/api/openchannelAccount/openchannelAccount.socket.js b/server/api/openchannelAccount/openchannelAccount.socket.js
index fffb628..b3d9c93 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 _0x73c6=['length','openchannelAccount:','./openchannelAccount.events','save','remove','update','emit','removeListener','register'];(function(_0x1e6e4e,_0x2b1b09){var _0x3d746b=function(_0x4483dd){while(--_0x4483dd){_0x1e6e4e['push'](_0x1e6e4e['shift']());}};_0x3d746b(++_0x2b1b09);}(_0x73c6,0x65));var _0x673c=function(_0xbd08b4,_0x4790ed){_0xbd08b4=_0xbd08b4-0x0;var _0x314f1e=_0x73c6[_0xbd08b4];return _0x314f1e;};'use strict';var OpenchannelAccountEvents=require(_0x673c('0x0'));var events=[_0x673c('0x1'),_0x673c('0x2'),_0x673c('0x3')];function createListener(_0x5cd6c9,_0x58db46){return function(_0x3d20c9){_0x58db46[_0x673c('0x4')](_0x5cd6c9,_0x3d20c9);};}function removeListener(_0x2c1bd1,_0x198128){return function(){OpenchannelAccountEvents[_0x673c('0x5')](_0x2c1bd1,_0x198128);};}exports[_0x673c('0x6')]=function(_0x51cbd4){for(var _0x4e05b6=0x0,_0x26b8f8=events[_0x673c('0x7')];_0x4e05b6<_0x26b8f8;_0x4e05b6++){var _0xdbf198=events[_0x4e05b6];var _0x2fc8ec=createListener(_0x673c('0x8')+_0xdbf198,_0x51cbd4);OpenchannelAccountEvents['on'](_0xdbf198,_0x2fc8ec);}};
\ No newline at end of file
+var _0xee02=['./openchannelAccount.events','save','remove','update','emit','openchannelAccount:'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xee02,0xfc));var _0x2ee0=function(_0x319e2e,_0x2f727f){_0x319e2e=_0x319e2e-0x0;var _0x302524=_0xee02[_0x319e2e];return _0x302524;};'use strict';var OpenchannelAccountEvents=require(_0x2ee0('0x0'));var events=[_0x2ee0('0x1'),_0x2ee0('0x2'),_0x2ee0('0x3')];function createListener(_0x53f91a,_0x1c0b07){return function(_0x557b89){_0x1c0b07[_0x2ee0('0x4')](_0x53f91a,_0x557b89);};}function removeListener(_0x6a2607,_0x58828e){return function(){OpenchannelAccountEvents['removeListener'](_0x6a2607,_0x58828e);};}exports['register']=function(_0x4ed21e){for(var _0x475221=0x0,_0x5cf220=events['length'];_0x475221<_0x5cf220;_0x475221++){var _0x507a4a=events[_0x475221];var _0x12f48a=createListener(_0x2ee0('0x5')+_0x507a4a,_0x4ed21e);OpenchannelAccountEvents['on'](_0x507a4a,_0x12f48a);}};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/index.js b/server/api/openchannelApplication/index.js
index 1568048..9fb353d 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 _0x116e=['express','Router','../../components/auth/service','../../components/interaction/service','./openchannelApplication.controller','get','isAuthenticated','index','/:id','post','put','destroy','exports','connect-timeout'];(function(_0x41f925,_0x4b108b){var _0x11d63b=function(_0xcde4e0){while(--_0xcde4e0){_0x41f925['push'](_0x41f925['shift']());}};_0x11d63b(++_0x4b108b);}(_0x116e,0x1e9));var _0xe116=function(_0x4c1ec2,_0x4f42b7){_0x4c1ec2=_0x4c1ec2-0x0;var _0x3f6f1c=_0x116e[_0x4c1ec2];return _0x3f6f1c;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xe116('0x0'));var express=require(_0xe116('0x1'));var router=express[_0xe116('0x2')]();var auth=require(_0xe116('0x3'));var interaction=require(_0xe116('0x4'));var config=require('../../config/environment');var controller=require(_0xe116('0x5'));router[_0xe116('0x6')]('/',auth[_0xe116('0x7')](),controller[_0xe116('0x8')]);router[_0xe116('0x6')](_0xe116('0x9'),auth[_0xe116('0x7')](),controller['show']);router[_0xe116('0xa')]('/',auth[_0xe116('0x7')](),controller['create']);router[_0xe116('0xb')](_0xe116('0x9'),auth[_0xe116('0x7')](),controller['update']);router['delete'](_0xe116('0x9'),auth[_0xe116('0x7')](),controller[_0xe116('0xc')]);module[_0xe116('0xd')]=router;
\ No newline at end of file
+var _0x3f29=['multer','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelApplication.controller','get','index','/:id','isAuthenticated','show','post','put','update','delete'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3f29,0x1dc));var _0x93f2=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x3f29[_0x4243a3];return _0x1b2a33;};'use strict';var multer=require(_0x93f2('0x0'));var util=require('util');var path=require(_0x93f2('0x1'));var timeout=require('connect-timeout');var express=require(_0x93f2('0x2'));var router=express[_0x93f2('0x3')]();var auth=require(_0x93f2('0x4'));var interaction=require(_0x93f2('0x5'));var config=require(_0x93f2('0x6'));var controller=require(_0x93f2('0x7'));router[_0x93f2('0x8')]('/',auth['isAuthenticated'](),controller[_0x93f2('0x9')]);router['get'](_0x93f2('0xa'),auth[_0x93f2('0xb')](),controller[_0x93f2('0xc')]);router[_0x93f2('0xd')]('/',auth[_0x93f2('0xb')](),controller['create']);router[_0x93f2('0xe')](_0x93f2('0xa'),auth[_0x93f2('0xb')](),controller[_0x93f2('0xf')]);router[_0x93f2('0x10')](_0x93f2('0xa'),auth[_0x93f2('0xb')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.attributes.js b/server/api/openchannelApplication/openchannelApplication.attributes.js
index cc1c7b1..73e9fa8 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 _0x3977=['*,*,*,*','sequelize','exports','INTEGER','noop','TEXT','STRING'];(function(_0x11b3cf,_0x35b20e){var _0x391231=function(_0x3ca371){while(--_0x3ca371){_0x11b3cf['push'](_0x11b3cf['shift']());}};_0x391231(++_0x35b20e);}(_0x3977,0x71));var _0x7397=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x3977[_0x19e35c];return _0x3e1fe8;};'use strict';var Sequelize=require(_0x7397('0x0'));module[_0x7397('0x1')]={'priority':{'type':Sequelize[_0x7397('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x7397('0x3')},'appdata':{'type':Sequelize[_0x7397('0x4')]()},'description':{'type':Sequelize[_0x7397('0x5')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x7397('0x6')}};
\ No newline at end of file
+var _0xe6b7=['sequelize','INTEGER','STRING','*,*,*,*'];(function(_0x1f3505,_0x23fb16){var _0x330c1f=function(_0x464bbc){while(--_0x464bbc){_0x1f3505['push'](_0x1f3505['shift']());}};_0x330c1f(++_0x23fb16);}(_0xe6b7,0x118));var _0x7e6b=function(_0x134448,_0x591d7b){_0x134448=_0x134448-0x0;var _0x2d52a1=_0xe6b7[_0x134448];return _0x2d52a1;};'use strict';var Sequelize=require(_0x7e6b('0x0'));module['exports']={'priority':{'type':Sequelize[_0x7e6b('0x1')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x7e6b('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x7e6b('0x3')}};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.controller.js b/server/api/openchannelApplication/openchannelApplication.controller.js
index ea02273..6080d69 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 _0xb05d=['includeAll','OpenchannelApplication','findAll','catch','show','params','find','create','body','update','html-pdf','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','end','status','json','count','offset','set','apply','reject','destroy','then','sendStatus','error','stack','send','index','map','rawAttributes','fieldName','key','model','name','query','keys','filters','intersection','fields','attributes','length','nolimit','limit','order','sort','where','pick','type','VIRTUAL','merge','options'];(function(_0x494861,_0x47b38d){var _0x5167fb=function(_0xa8a96b){while(--_0xa8a96b){_0x494861['push'](_0x494861['shift']());}};_0x5167fb(++_0x47b38d);}(_0xb05d,0xdf));var _0xdb05=function(_0x5c619e,_0x1bccdf){_0x5c619e=_0x5c619e-0x0;var _0x445cf8=_0xb05d[_0x5c619e];return _0x445cf8;};'use strict';var pdf=require(_0xdb05('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xdb05('0x1'));var zipdir=require(_0xdb05('0x2'));var jsonpatch=require(_0xdb05('0x3'));var rp=require('request-promise');var moment=require(_0xdb05('0x4'));var BPromise=require(_0xdb05('0x5'));var Mustache=require(_0xdb05('0x6'));var util=require(_0xdb05('0x7'));var path=require('path');var sox=require(_0xdb05('0x8'));var csv=require('to-csv');var ejs=require(_0xdb05('0x9'));var fs=require('fs');var _=require(_0xdb05('0xa'));var squel=require(_0xdb05('0xb'));var crypto=require(_0xdb05('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xdb05('0xd'));var toCsv=require('to-csv');var querystring=require(_0xdb05('0xe'));var Papa=require(_0xdb05('0xf'));var Redis=require('ioredis');var authService=require(_0xdb05('0x10'));var qs=require(_0xdb05('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xdb05('0x12'));var logger=require('../../config/logger')(_0xdb05('0x13'));var utils=require(_0xdb05('0x14'));var config=require(_0xdb05('0x15'));var db=require(_0xdb05('0x16'))['db'];function respondWithStatusCode(_0x4f8cb3,_0x182313){_0x182313=_0x182313||0xcc;return function(_0x2eeb61){if(_0x2eeb61){return _0x4f8cb3['sendStatus'](_0x182313);}return _0x4f8cb3['status'](_0x182313)[_0xdb05('0x17')]();};}function respondWithResult(_0x41eb5d,_0x23d518){_0x23d518=_0x23d518||0xc8;return function(_0x1a1c9e){if(_0x1a1c9e){return _0x41eb5d[_0xdb05('0x18')](_0x23d518)[_0xdb05('0x19')](_0x1a1c9e);}};}function respondWithFilteredResult(_0x4dd029,_0x4ae089){return function(_0x2ef1e1){if(_0x2ef1e1){var _0x27652c=_0x2ef1e1[_0xdb05('0x1a')],_0x5ca886=_0x4ae089['offset'],_0x238662=_0x4ae089[_0xdb05('0x1b')]+_0x4ae089['limit'],_0x1c4056;if(_0x238662>=_0x27652c){_0x238662=_0x27652c;_0x1c4056=0xc8;}else{_0x1c4056=0xce;}_0x4dd029['status'](_0x1c4056);return _0x4dd029[_0xdb05('0x1c')]('Content-Range',_0x5ca886+'-'+_0x238662+'/'+_0x27652c)[_0xdb05('0x19')](_0x2ef1e1);}return null;};}function patchUpdates(_0x66dae6){return function(_0x4e53b0){try{jsonpatch[_0xdb05('0x1d')](_0x4e53b0,_0x66dae6,!![]);}catch(_0x522451){return BPromise[_0xdb05('0x1e')](_0x522451);}return _0x4e53b0['save']();};}function saveUpdates(_0x205c99,_0x37072f){return function(_0x3f833a){if(_0x3f833a){return _0x3f833a['update'](_0x205c99)['then'](function(_0x3865ee){return _0x3865ee;});}return null;};}function removeEntity(_0x48fea2,_0x4ad268){return function(_0x57636f){if(_0x57636f){return _0x57636f[_0xdb05('0x1f')]()[_0xdb05('0x20')](function(){_0x48fea2['status'](0xcc)[_0xdb05('0x17')]();});}};}function handleEntityNotFound(_0x38a782,_0x2f1d51){return function(_0x32dbb6){if(!_0x32dbb6){_0x38a782[_0xdb05('0x21')](0x194);}return _0x32dbb6;};}function handleError(_0x19829e,_0x33ce75){_0x33ce75=_0x33ce75||0x1f4;return function(_0x161a1f){logger[_0xdb05('0x22')](_0x161a1f[_0xdb05('0x23')]);if(_0x161a1f['name']){delete _0x161a1f['name'];}_0x19829e['status'](_0x33ce75)[_0xdb05('0x24')](_0x161a1f);};}exports[_0xdb05('0x25')]=function(_0x406527,_0x412820){var _0x37993a={},_0x2f964a={},_0x3354c7={'count':0x0,'rows':[]};var _0x3cb768=_[_0xdb05('0x26')](db['OpenchannelApplication'][_0xdb05('0x27')],function(_0x135c17){return{'name':_0x135c17[_0xdb05('0x28')],'type':_0x135c17['type'][_0xdb05('0x29')]};});_0x2f964a[_0xdb05('0x2a')]=_[_0xdb05('0x26')](_0x3cb768,_0xdb05('0x2b'));_0x2f964a[_0xdb05('0x2c')]=_[_0xdb05('0x2d')](_0x406527['query']);_0x2f964a[_0xdb05('0x2e')]=_[_0xdb05('0x2f')](_0x2f964a[_0xdb05('0x2a')],_0x2f964a[_0xdb05('0x2c')]);_0x37993a['attributes']=_['intersection'](_0x2f964a[_0xdb05('0x2a')],qs['fields'](_0x406527['query'][_0xdb05('0x30')]));_0x37993a['attributes']=_0x37993a[_0xdb05('0x31')][_0xdb05('0x32')]?_0x37993a['attributes']:_0x2f964a[_0xdb05('0x2a')];if(!_0x406527[_0xdb05('0x2c')]['hasOwnProperty'](_0xdb05('0x33'))){_0x37993a[_0xdb05('0x34')]=qs[_0xdb05('0x34')](_0x406527[_0xdb05('0x2c')]['limit']);_0x37993a[_0xdb05('0x1b')]=qs[_0xdb05('0x1b')](_0x406527['query']['offset']);}_0x37993a[_0xdb05('0x35')]=qs[_0xdb05('0x36')](_0x406527[_0xdb05('0x2c')][_0xdb05('0x36')]);_0x37993a[_0xdb05('0x37')]=qs[_0xdb05('0x2e')](_[_0xdb05('0x38')](_0x406527[_0xdb05('0x2c')],_0x2f964a[_0xdb05('0x2e')]));if(_0x406527['query']['filter']){_0x37993a[_0xdb05('0x37')]=_['merge'](_0x37993a[_0xdb05('0x37')],{'$or':_[_0xdb05('0x26')](_0x3cb768,function(_0x5d2222){if(_0x5d2222[_0xdb05('0x39')]!==_0xdb05('0x3a')){var _0x57038c={};_0x57038c[_0x5d2222[_0xdb05('0x2b')]]={'$like':'%'+_0x406527[_0xdb05('0x2c')]['filter']+'%'};return _0x57038c;}})});}_0x37993a=_[_0xdb05('0x3b')]({},_0x37993a,_0x406527[_0xdb05('0x3c')]);var _0x39fec8={'where':_0x37993a[_0xdb05('0x37')]};return db['OpenchannelApplication'][_0xdb05('0x1a')](_0x39fec8)[_0xdb05('0x20')](function(_0x3e75eb){_0x3354c7[_0xdb05('0x1a')]=_0x3e75eb;if(_0x406527[_0xdb05('0x2c')][_0xdb05('0x3d')]){_0x37993a['include']=[{'all':!![]}];}return db[_0xdb05('0x3e')][_0xdb05('0x3f')](_0x37993a);})['then'](function(_0x8de769){_0x3354c7['rows']=_0x8de769;return _0x3354c7;})[_0xdb05('0x20')](respondWithFilteredResult(_0x412820,_0x37993a))[_0xdb05('0x40')](handleError(_0x412820,null));};exports[_0xdb05('0x41')]=function(_0x1a7358,_0x51716d){var _0x2b8736={'raw':!![],'where':{'id':_0x1a7358[_0xdb05('0x42')]['id']}},_0x27fc06={};_0x27fc06[_0xdb05('0x2a')]=_['keys'](db['OpenchannelApplication']['rawAttributes']);_0x27fc06['query']=_['keys'](_0x1a7358[_0xdb05('0x2c')]);_0x27fc06[_0xdb05('0x2e')]=_[_0xdb05('0x2f')](_0x27fc06[_0xdb05('0x2a')],_0x27fc06[_0xdb05('0x2c')]);_0x2b8736[_0xdb05('0x31')]=_[_0xdb05('0x2f')](_0x27fc06[_0xdb05('0x2a')],qs[_0xdb05('0x30')](_0x1a7358['query'][_0xdb05('0x30')]));_0x2b8736[_0xdb05('0x31')]=_0x2b8736[_0xdb05('0x31')][_0xdb05('0x32')]?_0x2b8736[_0xdb05('0x31')]:_0x27fc06[_0xdb05('0x2a')];if(_0x1a7358['query'][_0xdb05('0x3d')]){_0x2b8736['include']=[{'all':!![]}];}_0x2b8736=_[_0xdb05('0x3b')]({},_0x2b8736,_0x1a7358[_0xdb05('0x3c')]);return db['OpenchannelApplication'][_0xdb05('0x43')](_0x2b8736)[_0xdb05('0x20')](handleEntityNotFound(_0x51716d,null))['then'](respondWithResult(_0x51716d,null))[_0xdb05('0x40')](handleError(_0x51716d,null));};exports[_0xdb05('0x44')]=function(_0x49d6c6,_0x3fb17d){return db['OpenchannelApplication']['create'](_0x49d6c6[_0xdb05('0x45')],{})['then'](respondWithResult(_0x3fb17d,0xc9))['catch'](handleError(_0x3fb17d,null));};exports[_0xdb05('0x46')]=function(_0x3a1358,_0x2bf91e){if(_0x3a1358[_0xdb05('0x45')]['id']){delete _0x3a1358[_0xdb05('0x45')]['id'];}return db[_0xdb05('0x3e')][_0xdb05('0x43')]({'where':{'id':_0x3a1358[_0xdb05('0x42')]['id']}})[_0xdb05('0x20')](handleEntityNotFound(_0x2bf91e,null))[_0xdb05('0x20')](saveUpdates(_0x3a1358[_0xdb05('0x45')],null))['then'](respondWithResult(_0x2bf91e,null))[_0xdb05('0x40')](handleError(_0x2bf91e,null));};exports[_0xdb05('0x1f')]=function(_0x50fe9c,_0x3631cd){return db[_0xdb05('0x3e')][_0xdb05('0x43')]({'where':{'id':_0x50fe9c[_0xdb05('0x42')]['id']}})[_0xdb05('0x20')](handleEntityNotFound(_0x3631cd,null))[_0xdb05('0x20')](removeEntity(_0x3631cd,null))[_0xdb05('0x40')](handleError(_0x3631cd,null));};
\ No newline at end of file
+var _0x7b37=['include','OpenchannelApplication','findAll','rows','show','params','keys','filters','length','find','catch','create','body','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','status','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','end','sendStatus','error','stack','send','index','fieldName','type','key','map','name','query','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','where','merge','VIRTUAL','filter','options','includeAll'];(function(_0x11c93e,_0xd3235e){var _0x3d1726=function(_0x3dc228){while(--_0x3dc228){_0x11c93e['push'](_0x11c93e['shift']());}};_0x3d1726(++_0xd3235e);}(_0x7b37,0x141));var _0x77b3=function(_0x52ab84,_0x384d32){_0x52ab84=_0x52ab84-0x0;var _0x481d6a=_0x7b37[_0x52ab84];return _0x481d6a;};'use strict';var pdf=require(_0x77b3('0x0'));var emlformat=require(_0x77b3('0x1'));var rimraf=require(_0x77b3('0x2'));var zipdir=require(_0x77b3('0x3'));var jsonpatch=require(_0x77b3('0x4'));var rp=require(_0x77b3('0x5'));var moment=require(_0x77b3('0x6'));var BPromise=require(_0x77b3('0x7'));var Mustache=require(_0x77b3('0x8'));var util=require(_0x77b3('0x9'));var path=require(_0x77b3('0xa'));var sox=require(_0x77b3('0xb'));var csv=require(_0x77b3('0xc'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x77b3('0xd'));var squel=require(_0x77b3('0xe'));var crypto=require(_0x77b3('0xf'));var jsforce=require(_0x77b3('0x10'));var deskjs=require(_0x77b3('0x11'));var toCsv=require(_0x77b3('0xc'));var querystring=require('querystring');var Papa=require(_0x77b3('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x77b3('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x77b3('0x14'));var logger=require(_0x77b3('0x15'))(_0x77b3('0x16'));var utils=require('../../config/utils');var config=require(_0x77b3('0x17'));var db=require(_0x77b3('0x18'))['db'];function respondWithStatusCode(_0x23dc15,_0x56657c){_0x56657c=_0x56657c||0xcc;return function(_0x317c27){if(_0x317c27){return _0x23dc15['sendStatus'](_0x56657c);}return _0x23dc15[_0x77b3('0x19')](_0x56657c)['end']();};}function respondWithResult(_0x42cc7d,_0x375820){_0x375820=_0x375820||0xc8;return function(_0x4270f2){if(_0x4270f2){return _0x42cc7d['status'](_0x375820)['json'](_0x4270f2);}};}function respondWithFilteredResult(_0x4570fc,_0x311b5e){return function(_0x57b499){if(_0x57b499){var _0x16ea78=_0x57b499[_0x77b3('0x1a')],_0x2721eb=_0x311b5e[_0x77b3('0x1b')],_0x389922=_0x311b5e[_0x77b3('0x1b')]+_0x311b5e[_0x77b3('0x1c')],_0xd1b3d8;if(_0x389922>=_0x16ea78){_0x389922=_0x16ea78;_0xd1b3d8=0xc8;}else{_0xd1b3d8=0xce;}_0x4570fc['status'](_0xd1b3d8);return _0x4570fc[_0x77b3('0x1d')](_0x77b3('0x1e'),_0x2721eb+'-'+_0x389922+'/'+_0x16ea78)['json'](_0x57b499);}return null;};}function patchUpdates(_0x3ee092){return function(_0x9abfa5){try{jsonpatch[_0x77b3('0x1f')](_0x9abfa5,_0x3ee092,!![]);}catch(_0x53c1bf){return BPromise[_0x77b3('0x20')](_0x53c1bf);}return _0x9abfa5[_0x77b3('0x21')]();};}function saveUpdates(_0x1ae2d8,_0x202b06){return function(_0x1269bc){if(_0x1269bc){return _0x1269bc[_0x77b3('0x22')](_0x1ae2d8)[_0x77b3('0x23')](function(_0x4a4ff3){return _0x4a4ff3;});}return null;};}function removeEntity(_0x195a54,_0x18f952){return function(_0x56bb96){if(_0x56bb96){return _0x56bb96[_0x77b3('0x24')]()[_0x77b3('0x23')](function(){_0x195a54[_0x77b3('0x19')](0xcc)[_0x77b3('0x25')]();});}};}function handleEntityNotFound(_0x4134ab,_0x216b6a){return function(_0x4f327a){if(!_0x4f327a){_0x4134ab[_0x77b3('0x26')](0x194);}return _0x4f327a;};}function handleError(_0x7087a9,_0x480178){_0x480178=_0x480178||0x1f4;return function(_0x3c9116){logger[_0x77b3('0x27')](_0x3c9116[_0x77b3('0x28')]);if(_0x3c9116['name']){delete _0x3c9116['name'];}_0x7087a9['status'](_0x480178)[_0x77b3('0x29')](_0x3c9116);};}exports[_0x77b3('0x2a')]=function(_0xfac6fb,_0x1274f5){var _0x45bfd5={},_0x306703={},_0xc99b44={'count':0x0,'rows':[]};var _0x1da9ee=_['map'](db['OpenchannelApplication']['rawAttributes'],function(_0x4fd810){return{'name':_0x4fd810[_0x77b3('0x2b')],'type':_0x4fd810[_0x77b3('0x2c')][_0x77b3('0x2d')]};});_0x306703['model']=_[_0x77b3('0x2e')](_0x1da9ee,_0x77b3('0x2f'));_0x306703[_0x77b3('0x30')]=_['keys'](_0xfac6fb[_0x77b3('0x30')]);_0x306703['filters']=_[_0x77b3('0x31')](_0x306703[_0x77b3('0x32')],_0x306703['query']);_0x45bfd5[_0x77b3('0x33')]=_[_0x77b3('0x31')](_0x306703[_0x77b3('0x32')],qs[_0x77b3('0x34')](_0xfac6fb['query'][_0x77b3('0x34')]));_0x45bfd5[_0x77b3('0x33')]=_0x45bfd5[_0x77b3('0x33')]['length']?_0x45bfd5[_0x77b3('0x33')]:_0x306703[_0x77b3('0x32')];if(!_0xfac6fb[_0x77b3('0x30')][_0x77b3('0x35')](_0x77b3('0x36'))){_0x45bfd5['limit']=qs['limit'](_0xfac6fb['query'][_0x77b3('0x1c')]);_0x45bfd5[_0x77b3('0x1b')]=qs[_0x77b3('0x1b')](_0xfac6fb[_0x77b3('0x30')][_0x77b3('0x1b')]);}_0x45bfd5[_0x77b3('0x37')]=qs[_0x77b3('0x38')](_0xfac6fb[_0x77b3('0x30')][_0x77b3('0x38')]);_0x45bfd5['where']=qs['filters'](_[_0x77b3('0x39')](_0xfac6fb[_0x77b3('0x30')],_0x306703['filters']));if(_0xfac6fb['query']['filter']){_0x45bfd5[_0x77b3('0x3a')]=_[_0x77b3('0x3b')](_0x45bfd5[_0x77b3('0x3a')],{'$or':_[_0x77b3('0x2e')](_0x1da9ee,function(_0x41c503){if(_0x41c503[_0x77b3('0x2c')]!==_0x77b3('0x3c')){var _0x445d27={};_0x445d27[_0x41c503[_0x77b3('0x2f')]]={'$like':'%'+_0xfac6fb[_0x77b3('0x30')][_0x77b3('0x3d')]+'%'};return _0x445d27;}})});}_0x45bfd5=_['merge']({},_0x45bfd5,_0xfac6fb[_0x77b3('0x3e')]);var _0x3da990={'where':_0x45bfd5[_0x77b3('0x3a')]};return db['OpenchannelApplication']['count'](_0x3da990)[_0x77b3('0x23')](function(_0x367c5b){_0xc99b44['count']=_0x367c5b;if(_0xfac6fb['query'][_0x77b3('0x3f')]){_0x45bfd5[_0x77b3('0x40')]=[{'all':!![]}];}return db[_0x77b3('0x41')][_0x77b3('0x42')](_0x45bfd5);})[_0x77b3('0x23')](function(_0x4715eb){_0xc99b44[_0x77b3('0x43')]=_0x4715eb;return _0xc99b44;})[_0x77b3('0x23')](respondWithFilteredResult(_0x1274f5,_0x45bfd5))['catch'](handleError(_0x1274f5,null));};exports[_0x77b3('0x44')]=function(_0x2adae9,_0x4d0d14){var _0x3606c1={'raw':!![],'where':{'id':_0x2adae9[_0x77b3('0x45')]['id']}},_0x501d6a={};_0x501d6a['model']=_[_0x77b3('0x46')](db['OpenchannelApplication']['rawAttributes']);_0x501d6a[_0x77b3('0x30')]=_[_0x77b3('0x46')](_0x2adae9[_0x77b3('0x30')]);_0x501d6a[_0x77b3('0x47')]=_['intersection'](_0x501d6a[_0x77b3('0x32')],_0x501d6a[_0x77b3('0x30')]);_0x3606c1[_0x77b3('0x33')]=_[_0x77b3('0x31')](_0x501d6a[_0x77b3('0x32')],qs[_0x77b3('0x34')](_0x2adae9['query'][_0x77b3('0x34')]));_0x3606c1[_0x77b3('0x33')]=_0x3606c1['attributes'][_0x77b3('0x48')]?_0x3606c1['attributes']:_0x501d6a[_0x77b3('0x32')];if(_0x2adae9[_0x77b3('0x30')][_0x77b3('0x3f')]){_0x3606c1['include']=[{'all':!![]}];}_0x3606c1=_['merge']({},_0x3606c1,_0x2adae9['options']);return db['OpenchannelApplication'][_0x77b3('0x49')](_0x3606c1)[_0x77b3('0x23')](handleEntityNotFound(_0x4d0d14,null))[_0x77b3('0x23')](respondWithResult(_0x4d0d14,null))[_0x77b3('0x4a')](handleError(_0x4d0d14,null));};exports[_0x77b3('0x4b')]=function(_0x5ec8d6,_0x3e5435){return db[_0x77b3('0x41')][_0x77b3('0x4b')](_0x5ec8d6['body'],{})[_0x77b3('0x23')](respondWithResult(_0x3e5435,0xc9))[_0x77b3('0x4a')](handleError(_0x3e5435,null));};exports[_0x77b3('0x22')]=function(_0x502525,_0x5f4de0){if(_0x502525[_0x77b3('0x4c')]['id']){delete _0x502525[_0x77b3('0x4c')]['id'];}return db[_0x77b3('0x41')][_0x77b3('0x49')]({'where':{'id':_0x502525[_0x77b3('0x45')]['id']}})[_0x77b3('0x23')](handleEntityNotFound(_0x5f4de0,null))['then'](saveUpdates(_0x502525['body'],null))[_0x77b3('0x23')](respondWithResult(_0x5f4de0,null))[_0x77b3('0x4a')](handleError(_0x5f4de0,null));};exports[_0x77b3('0x24')]=function(_0x5e9a10,_0x50d20d){return db['OpenchannelApplication'][_0x77b3('0x49')]({'where':{'id':_0x5e9a10[_0x77b3('0x45')]['id']}})[_0x77b3('0x23')](handleEntityNotFound(_0x50d20d,null))[_0x77b3('0x23')](removeEntity(_0x50d20d,null))[_0x77b3('0x4a')](handleError(_0x50d20d,null));};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.model.js b/server/api/openchannelApplication/openchannelApplication.model.js
index e3a9cd1..4f9fc29 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 _0x4e16=['../../config/logger','request-promise','path','rimraf','../../config/environment','./openchannelApplication.attributes','define','OpenchannelApplication','openchannel_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util'];(function(_0x21fec0,_0x2f9a99){var _0xcf272e=function(_0x18e35d){while(--_0x18e35d){_0x21fec0['push'](_0x21fec0['shift']());}};_0xcf272e(++_0x2f9a99);}(_0x4e16,0x15d));var _0x64e1=function(_0x42f6d1,_0x52c740){_0x42f6d1=_0x42f6d1-0x0;var _0x50ae08=_0x4e16[_0x42f6d1];return _0x50ae08;};'use strict';var _=require(_0x64e1('0x0'));var util=require(_0x64e1('0x1'));var logger=require(_0x64e1('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x64e1('0x3'));var fs=require('fs');var path=require(_0x64e1('0x4'));var rimraf=require(_0x64e1('0x5'));var config=require(_0x64e1('0x6'));var attributes=require(_0x64e1('0x7'));module['exports']=function(_0x25cf2d,_0x419581){return _0x25cf2d[_0x64e1('0x8')](_0x64e1('0x9'),attributes,{'tableName':_0x64e1('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x64e1('0xb'),'collate':_0x64e1('0xc')});};
\ No newline at end of file
+var _0x7067=['OpenchannelApplication','utf8mb4','lodash','bluebird','path','rimraf','../../config/environment','./openchannelApplication.attributes','exports','define'];(function(_0x270f68,_0x27b339){var _0x3fb87c=function(_0x221e7a){while(--_0x221e7a){_0x270f68['push'](_0x270f68['shift']());}};_0x3fb87c(++_0x27b339);}(_0x7067,0x160));var _0x7706=function(_0x11d7e4,_0x3382b0){_0x11d7e4=_0x11d7e4-0x0;var _0x17e252=_0x7067[_0x11d7e4];return _0x17e252;};'use strict';var _=require(_0x7706('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x7706('0x1'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7706('0x2'));var rimraf=require(_0x7706('0x3'));var config=require(_0x7706('0x4'));var attributes=require(_0x7706('0x5'));module[_0x7706('0x6')]=function(_0x3937f8,_0x334d49){return _0x3937f8[_0x7706('0x7')](_0x7706('0x8'),attributes,{'tableName':'openchannel_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x7706('0x9'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/openchannelApplication/openchannelApplication.rpc.js b/server/api/openchannelApplication/openchannelApplication.rpc.js
index 47a7510..46665bc 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 _0xd8b0=['OpenchannelApplication','body','options','raw','where','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent','debug','OpenchannelApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateOpenchannelApplication'];(function(_0xcfd89f,_0x106e8f){var _0x59acd4=function(_0x2e187c){while(--_0x2e187c){_0xcfd89f['push'](_0xcfd89f['shift']());}};_0x59acd4(++_0x106e8f);}(_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')]['update'](_0x5fecbd[_0x0d8b('0x18')],{'raw':_0x5fecbd[_0x0d8b('0x19')]?_0x5fecbd[_0x0d8b('0x19')][_0x0d8b('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5fecbd[_0x0d8b('0x19')]?_0x5fecbd[_0x0d8b('0x19')][_0x0d8b('0x1b')]||null:null,'attributes':_0x5fecbd[_0x0d8b('0x19')]?_0x5fecbd['options']['attributes']||null:null,'limit':_0x5fecbd[_0x0d8b('0x19')]?_0x5fecbd['options']['limit']||null:null})['then'](function(_0x238728){logger[_0x0d8b('0xb')](_0x0d8b('0x16'),_0x5fecbd);logger[_0x0d8b('0xe')](_0x0d8b('0x16'),_0x5fecbd,JSON[_0x0d8b('0x10')](_0x238728));_0x18dd2d(_0x238728);})[_0x0d8b('0x15')](function(_0x4562cb){logger[_0x0d8b('0x11')]('UpdateOpenchannelApplication',_0x4562cb[_0x0d8b('0x13')],_0x5fecbd);_0x264b39(_0x333674[_0x0d8b('0x11')](0x1f4,_0x4562cb['message']));});});};
\ No newline at end of file
+var _0xb10b=['then','info','OpenchannelApplication,\x20%s,\x20%s','OpenchannelApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','UpdateOpenchannelApplication','OpenchannelApplication','update','options','raw','where','attributes','limit','debug','catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request'];(function(_0x687c6a,_0x106f7c){var _0x597248=function(_0x5d91d1){while(--_0x5d91d1){_0x687c6a['push'](_0x687c6a['shift']());}};_0x597248(++_0x106f7c);}(_0xb10b,0x12a));var _0xbb10=function(_0x48c612,_0x432076){_0x48c612=_0x48c612-0x0;var _0x5f0583=_0xb10b[_0x48c612];return _0x5f0583;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')](_0x378da8['body'],{'raw':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x378da8['options']?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1b')]||null:null,'limit':_0x378da8['options']?_0x378da8['options'][_0xbb10('0x1c')]||null:null})[_0xbb10('0xc')](function(_0x2e911d){logger[_0xbb10('0xd')](_0xbb10('0x15'),_0x378da8);logger[_0xbb10('0x1d')](_0xbb10('0x15'),_0x378da8,JSON[_0xbb10('0x11')](_0x2e911d));_0x575cca(_0x2e911d);})[_0xbb10('0x1e')](function(_0x395404){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x395404['message'],_0x378da8);_0x30efc6(_0x1682a4['error'](0x1f4,_0x395404['message']));});});};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/index.js b/server/api/openchannelInteraction/index.js
index b626fc4..3161eb8 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 _0xa19d=['/:id','openchannelinteraction:update','delete','destroy','removeTags','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./openchannelInteraction.controller','get','isAuthenticated','index','show','/:id/messages','getMessages','/:id/download','download','create','post','addMessage','/:id/tags','tracked','openchannel','openchannelinteraction:addtags','put'];(function(_0xd5e96a,_0x574e90){var _0x2e962b=function(_0x105e92){while(--_0x105e92){_0xd5e96a['push'](_0xd5e96a['shift']());}};_0x2e962b(++_0x574e90);}(_0xa19d,0x1d5));var _0xda19=function(_0x55d2fb,_0x535daa){_0x55d2fb=_0x55d2fb-0x0;var _0x4beb62=_0xa19d[_0x55d2fb];return _0x4beb62;};'use strict';var multer=require(_0xda19('0x0'));var util=require(_0xda19('0x1'));var path=require(_0xda19('0x2'));var timeout=require(_0xda19('0x3'));var express=require('express');var router=express[_0xda19('0x4')]();var auth=require(_0xda19('0x5'));var interaction=require(_0xda19('0x6'));var config=require('../../config/environment');var controller=require(_0xda19('0x7'));router[_0xda19('0x8')]('/',auth[_0xda19('0x9')](),controller[_0xda19('0xa')]);router[_0xda19('0x8')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0xda19('0x8')]('/:id',auth[_0xda19('0x9')](),controller[_0xda19('0xb')]);router[_0xda19('0x8')](_0xda19('0xc'),auth['isAuthenticated'](),controller[_0xda19('0xd')]);router['get'](_0xda19('0xe'),auth[_0xda19('0x9')](),controller[_0xda19('0xf')]);router['post']('/',auth[_0xda19('0x9')](),controller[_0xda19('0x10')]);router[_0xda19('0x11')](_0xda19('0xc'),auth[_0xda19('0x9')](),controller[_0xda19('0x12')]);router[_0xda19('0x11')](_0xda19('0x13'),auth[_0xda19('0x9')](),interaction[_0xda19('0x14')](_0xda19('0x15'),_0xda19('0x16')),controller['addTags']);router[_0xda19('0x17')](_0xda19('0x18'),auth['isAuthenticated'](),interaction[_0xda19('0x14')](_0xda19('0x15'),_0xda19('0x19')),controller['update']);router[_0xda19('0x1a')](_0xda19('0x18'),auth[_0xda19('0x9')](),interaction[_0xda19('0x14')](_0xda19('0x15'),'openchannelinteraction:destroy'),controller[_0xda19('0x1b')]);router[_0xda19('0x1a')](_0xda19('0x13'),auth['isAuthenticated'](),controller[_0xda19('0x1c')]);module['exports']=router;
\ No newline at end of file
+var _0x69f0=['get','isAuthenticated','index','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','/:id/tags','openchannelinteraction:addtags','openchannelinteraction:update','update','delete','openchannel','openchannelinteraction:destroy','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service'];(function(_0xae60e2,_0x8508c9){var _0x48eee6=function(_0x5c3e9f){while(--_0x5c3e9f){_0xae60e2['push'](_0xae60e2['shift']());}};_0x48eee6(++_0x8508c9);}(_0x69f0,0xb6));var _0x069f=function(_0x48413f,_0x58c0d2){_0x48413f=_0x48413f-0x0;var _0x2d9cc7=_0x69f0[_0x48413f];return _0x2d9cc7;};'use strict';var multer=require(_0x069f('0x0'));var util=require(_0x069f('0x1'));var path=require(_0x069f('0x2'));var timeout=require(_0x069f('0x3'));var express=require('express');var router=express[_0x069f('0x4')]();var auth=require(_0x069f('0x5'));var interaction=require(_0x069f('0x6'));var config=require('../../config/environment');var controller=require('./openchannelInteraction.controller');router[_0x069f('0x7')]('/',auth[_0x069f('0x8')](),controller[_0x069f('0x9')]);router[_0x069f('0x7')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0x069f('0x7')](_0x069f('0xa'),auth['isAuthenticated'](),controller[_0x069f('0xb')]);router[_0x069f('0x7')](_0x069f('0xc'),auth[_0x069f('0x8')](),controller[_0x069f('0xd')]);router['get'](_0x069f('0xe'),auth[_0x069f('0x8')](),controller[_0x069f('0xf')]);router[_0x069f('0x10')]('/',auth[_0x069f('0x8')](),controller[_0x069f('0x11')]);router[_0x069f('0x10')]('/:id/messages',auth[_0x069f('0x8')](),controller['addMessage']);router['post'](_0x069f('0x12'),auth['isAuthenticated'](),interaction['tracked']('openchannel',_0x069f('0x13')),controller['addTags']);router['put'](_0x069f('0xa'),auth['isAuthenticated'](),interaction['tracked']('openchannel',_0x069f('0x14')),controller[_0x069f('0x15')]);router[_0x069f('0x16')](_0x069f('0xa'),auth['isAuthenticated'](),interaction['tracked'](_0x069f('0x17'),_0x069f('0x18')),controller[_0x069f('0x19')]);router[_0x069f('0x16')](_0x069f('0x12'),auth[_0x069f('0x8')](),controller['removeTags']);module[_0x069f('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.attributes.js b/server/api/openchannelInteraction/openchannelInteraction.attributes.js
index a8cdcf9..444ca2f 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 _0xd900=['STRING','DATE','ENUM','out','sequelize','exports','BOOLEAN'];(function(_0x3740fe,_0x6c543c){var _0x55492b=function(_0x1f851f){while(--_0x1f851f){_0x3740fe['push'](_0x3740fe['shift']());}};_0x55492b(++_0x6c543c);}(_0xd900,0xd6));var _0x0d90=function(_0x311e78,_0xbcf8ca){_0x311e78=_0x311e78-0x0;var _0x44fef6=_0xd900[_0x311e78];return _0x44fef6;};'use strict';var Sequelize=require(_0x0d90('0x0'));module[_0x0d90('0x1')]={'closed':{'type':Sequelize[_0x0d90('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x0d90('0x3')]},'read1stAt':{'type':Sequelize[_0x0d90('0x4')]},'threadId':{'type':Sequelize['STRING']},'externalUrl':{'type':Sequelize[_0x0d90('0x3')]},'lastMsgAt':{'type':Sequelize[_0x0d90('0x4')]},'lastMsgDirection':{'type':Sequelize[_0x0d90('0x5')]('in',_0x0d90('0x6')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xc0b9=['exports','BOOLEAN','DATE','STRING','ENUM','out','sequelize'];(function(_0x4ba30a,_0x21acc9){var _0x432587=function(_0xfcd330){while(--_0xfcd330){_0x4ba30a['push'](_0x4ba30a['shift']());}};_0x432587(++_0x21acc9);}(_0xc0b9,0x1e2));var _0x9c0b=function(_0x234764,_0x46a96e){_0x234764=_0x234764-0x0;var _0x12d8da=_0xc0b9[_0x234764];return _0x12d8da;};'use strict';var Sequelize=require(_0x9c0b('0x0'));module[_0x9c0b('0x1')]={'closed':{'type':Sequelize[_0x9c0b('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x9c0b('0x3')]},'threadId':{'type':Sequelize[_0x9c0b('0x4')]},'externalUrl':{'type':Sequelize[_0x9c0b('0x4')]},'lastMsgAt':{'type':Sequelize[_0x9c0b('0x3')]},'lastMsgDirection':{'type':Sequelize[_0x9c0b('0x5')]('in',_0x9c0b('0x6')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0x9c0b('0x4')]}};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.controller.js b/server/api/openchannelInteraction/openchannelInteraction.controller.js
index d6fdb83..bac3eec 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 _0xfa41=['parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','`unreadMessages`\x20>\x200','tag','isArray','filter','replace','isNumeric','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','i.from\x20LIKE\x20?','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','group','i.id','Sequelize','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','order','t.id\x20IN\x20?','resolve','OpenchannelAccountId','journey','i.OpenchannelAccountId\x20IS\x20NOT\x20NULL','user','getOpenchannelAccounts','i.OpenchannelAccountId\x20IS\x20NULL','toString','keyBy','merge','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','i.*','c.firstName','Contact.firstName','Contact.lastName','c.email','Contact.email','c.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','sequelize','ui.OpenchannelInteractionId\x20IN\x20?','groupBy','OpenchannelInteractionId','rows','show','params','includeAll','include','options','create','body','describe','addMessage','ids','omit','getMessages','findOne','OpenchannelMessage','format','YYYY-MM-DD\x20HH:mm:ss','addTags','setTags','spread','findAll','emit','openchannelInteractionTags:save','removeTags','download','join','server','files','transcript-%d-%s.zip','push','lastName','Attachment','Messages','direction','secret','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
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','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\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
\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%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
\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
\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{{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
\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
\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%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
\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
','%s\x20#%d','Openchannel','YYYY-MM-DD','Owner','N.A.','closed','closedAt','Private','basename','createReadStream','pipe','createWriteStream','out','System','firstName','root','downloadInteraction.html','transcript-','log','unlinkSync','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','localhost','./openchannelInteraction.socket','register','sendStatus','status','json','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','Users','fullname','TagIds','Tags','split','catch','index','OpenchannelInteraction','rawAttributes','fieldName','type','model','keys','filters','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','sort','where','field','color','select','u.fullname','ui.OpenchannelInteractionId','from','user_has_openchannel_interactions','users','u.id\x20=\x20ui.UserId','openchannel_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','left_join','o.id\x20=\x20i.UserId','openchannel_accounts','a.id\x20=\x20i.OpenchannelAccountId','openchannel_messages','me.OpenchannelInteractionId\x20=\x20i.id','it.OpenchannelInteractionId\x20=\x20i.id','expr','search','sqlOperator','conditions','find','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','Contact','operator','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','text','start','Tag','map','forEach','union','User','$substring','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','buildExpression','some','compact','isEmpty','i.OpenchannelAccountId\x20IN\x20?','concat','createdAt'];(function(_0x956552,_0x106973){var _0x35b027=function(_0x2f0109){while(--_0x2f0109){_0x956552['push'](_0x956552['shift']());}};_0x35b027(++_0x106973);}(_0xfa41,0x74));var _0x1fa4=function(_0x7bdda5,_0x3358f5){_0x7bdda5=_0x7bdda5-0x0;var _0x45be29=_0xfa41[_0x7bdda5];return _0x45be29;};'use strict';var pdf=require(_0x1fa4('0x0'));var emlformat=require(_0x1fa4('0x1'));var rimraf=require(_0x1fa4('0x2'));var zipdir=require(_0x1fa4('0x3'));var jsonpatch=require(_0x1fa4('0x4'));var rp=require(_0x1fa4('0x5'));var moment=require('moment');var BPromise=require(_0x1fa4('0x6'));var Mustache=require(_0x1fa4('0x7'));var util=require(_0x1fa4('0x8'));var path=require(_0x1fa4('0x9'));var sox=require('sox');var csv=require(_0x1fa4('0xa'));var ejs=require(_0x1fa4('0xb'));var fs=require('fs');var _=require(_0x1fa4('0xc'));var squel=require(_0x1fa4('0xd'));var crypto=require(_0x1fa4('0xe'));var jsforce=require(_0x1fa4('0xf'));var deskjs=require(_0x1fa4('0x10'));var toCsv=require(_0x1fa4('0xa'));var querystring=require(_0x1fa4('0x11'));var Papa=require(_0x1fa4('0x12'));var Redis=require(_0x1fa4('0x13'));var authService=require(_0x1fa4('0x14'));var qs=require(_0x1fa4('0x15'));var as=require(_0x1fa4('0x16'));var hardwareService=require(_0x1fa4('0x17'));var logger=require(_0x1fa4('0x18'))(_0x1fa4('0x19'));var utils=require(_0x1fa4('0x1a'));var config=require('../../config/environment');var db=require(_0x1fa4('0x1b'))['db'];config['redis']=_['defaults'](config[_0x1fa4('0x1c')],{'host':_0x1fa4('0x1d'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1fa4('0x1c')]));require(_0x1fa4('0x1e'))[_0x1fa4('0x1f')](socket);function respondWithStatusCode(_0x2ba5d3,_0x56d3d3){_0x56d3d3=_0x56d3d3||0xcc;return function(_0x50b2ba){if(_0x50b2ba){return _0x2ba5d3[_0x1fa4('0x20')](_0x56d3d3);}return _0x2ba5d3[_0x1fa4('0x21')](_0x56d3d3)['end']();};}function respondWithResult(_0x9b9a73,_0x3d841f){_0x3d841f=_0x3d841f||0xc8;return function(_0x333876){if(_0x333876){return _0x9b9a73[_0x1fa4('0x21')](_0x3d841f)[_0x1fa4('0x22')](_0x333876);}};}function respondWithFilteredResult(_0x45aa2d,_0x169a7d){return function(_0x4ad375){if(_0x4ad375){var _0x5e8e51=_0x4ad375[_0x1fa4('0x23')],_0x1bb25d=_0x169a7d['offset'],_0x1ff2ca=_0x169a7d[_0x1fa4('0x24')]+_0x169a7d['limit'],_0x27fc91;if(_0x1ff2ca>=_0x5e8e51){_0x1ff2ca=_0x5e8e51;_0x27fc91=0xc8;}else{_0x27fc91=0xce;}_0x45aa2d[_0x1fa4('0x21')](_0x27fc91);return _0x45aa2d[_0x1fa4('0x25')](_0x1fa4('0x26'),_0x1bb25d+'-'+_0x1ff2ca+'/'+_0x5e8e51)['json'](_0x4ad375);}return null;};}function patchUpdates(_0x16c2f7){return function(_0xd1b136){try{jsonpatch[_0x1fa4('0x27')](_0xd1b136,_0x16c2f7,!![]);}catch(_0x5f15db){return BPromise[_0x1fa4('0x28')](_0x5f15db);}return _0xd1b136[_0x1fa4('0x29')]();};}function saveUpdates(_0x5b884e,_0x33def8){return function(_0x3c6b85){if(_0x3c6b85){return _0x3c6b85[_0x1fa4('0x2a')](_0x5b884e)[_0x1fa4('0x2b')](function(_0x1450d8){return _0x1450d8;});}return null;};}function removeEntity(_0x6f241a,_0x31a198){return function(_0x33c00e){if(_0x33c00e){return _0x33c00e[_0x1fa4('0x2c')]()['then'](function(){_0x6f241a[_0x1fa4('0x21')](0xcc)[_0x1fa4('0x2d')]();});}};}function handleEntityNotFound(_0x54127e,_0x5ced17){return function(_0x37496c){if(!_0x37496c){_0x54127e[_0x1fa4('0x20')](0x194);}return _0x37496c;};}function handleError(_0x557662,_0x18480b){_0x18480b=_0x18480b||0x1f4;return function(_0x4c82c3){logger[_0x1fa4('0x2e')](_0x4c82c3[_0x1fa4('0x2f')]);if(_0x4c82c3[_0x1fa4('0x30')]){delete _0x4c82c3['name'];}_0x557662[_0x1fa4('0x21')](_0x18480b)['send'](_0x4c82c3);};}function getInteractionUsers(_0x4e223d,_0x520f12){return new BPromise(function(_0xae7dd6,_0x4873a9){try{if(_0x520f12[_0x4e223d['id']]){_0x4e223d[_0x1fa4('0x31')]=_['map'](_0x520f12[_0x4e223d['id']],function(_0x47c715){return{'id':_0x47c715['id'],'fullname':_0x47c715[_0x1fa4('0x32')]};});}}catch(_0x951aaf){_0x4873a9(_0x951aaf);}_0xae7dd6(_0x4e223d);});}function getInteractionTags(_0xb13146,_0x56193e){return new BPromise(function(_0x28d245,_0x2685e7){try{if(_0xb13146[_0x1fa4('0x33')]){_0xb13146[_0x1fa4('0x34')]=[];_0xb13146['TagIds'][_0x1fa4('0x35')](',')['forEach'](function(_0x326fda){_0xb13146[_0x1fa4('0x34')]['push'](_0x56193e[_0x326fda]);});}delete _0xb13146[_0x1fa4('0x33')];}catch(_0x5bdd86){_0x2685e7(_0x5bdd86);}_0x28d245(_0xb13146);});}function updateOpenchannelInteraction(_0xca75a9,_0x359759,_0x156060){return new BPromise(function(_0x3561c5,_0x1c7e57){return getInteractionUsers(_0xca75a9,_0x156060)['then'](function(_0x2409e2){return getInteractionTags(_0x2409e2,_0x359759);})[_0x1fa4('0x2b')](function(_0x550af5){_0x3561c5(_0x550af5);})[_0x1fa4('0x36')](function(_0x282aa8){_0x1c7e57(_0x282aa8);});});}exports[_0x1fa4('0x37')]=function(_0x4fcdbb,_0x14226b){var _0x328255={},_0x68aa06={},_0x4525bd={'count':0x0,'rows':[]};var _0x433829=_['map'](db[_0x1fa4('0x38')][_0x1fa4('0x39')],function(_0x4e741c){return{'name':_0x4e741c[_0x1fa4('0x3a')],'type':_0x4e741c[_0x1fa4('0x3b')]['key']};});_0x68aa06[_0x1fa4('0x3c')]=_['map'](_0x433829,_0x1fa4('0x30'));_0x68aa06['query']=_[_0x1fa4('0x3d')](_0x4fcdbb['query']);_0x68aa06[_0x1fa4('0x3e')]=_['intersection'](_0x68aa06['model'],_0x68aa06[_0x1fa4('0x3f')]);_0x328255[_0x1fa4('0x40')]=_[_0x1fa4('0x41')](_0x68aa06[_0x1fa4('0x3c')],qs[_0x1fa4('0x42')](_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x42')]));_0x328255['attributes']=_0x328255[_0x1fa4('0x40')][_0x1fa4('0x43')]?_0x328255['attributes']:_0x68aa06[_0x1fa4('0x3c')];if(!_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x44')](_0x1fa4('0x45'))){_0x328255[_0x1fa4('0x46')]=qs[_0x1fa4('0x46')](_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x46')]);_0x328255[_0x1fa4('0x24')]=qs[_0x1fa4('0x24')](_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x24')]);}_0x328255['order']=qs[_0x1fa4('0x47')](_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x47')]);_0x328255[_0x1fa4('0x48')]=qs['filters'](_['pick'](_0x4fcdbb['query'],_0x68aa06['filters']));var _0x41aaa2=[];var _0x59436d=squel['select']()[_0x1fa4('0x49')]('id')['field'](_0x1fa4('0x30'))[_0x1fa4('0x49')](_0x1fa4('0x4a'))['from']('tools_tags');var _0x3bd46d=squel[_0x1fa4('0x4b')]()[_0x1fa4('0x49')]('u.id')[_0x1fa4('0x49')](_0x1fa4('0x4c'))['field'](_0x1fa4('0x4d'))[_0x1fa4('0x4e')](_0x1fa4('0x4f'),'ui')['left_join'](_0x1fa4('0x50'),'u',_0x1fa4('0x51'));var _0x10acfa=squel[_0x1fa4('0x4b')]()[_0x1fa4('0x4e')](_0x1fa4('0x52'),'i')['left_join'](_0x1fa4('0x53'),'c',_0x1fa4('0x54'))[_0x1fa4('0x55')](_0x1fa4('0x50'),'o',_0x1fa4('0x56'))[_0x1fa4('0x55')](_0x1fa4('0x57'),'a',_0x1fa4('0x58'))['left_join'](_0x1fa4('0x59'),'me',_0x1fa4('0x5a'))[_0x1fa4('0x55')]('openchannel_interaction_has_tags','it',_0x1fa4('0x5b'))['left_join']('tools_tags','t','t.id\x20=\x20it.TagId');var _0x335001=squel[_0x1fa4('0x5c')]();var _0xb6a37a=[];var _0x1389e1=squel['expr']();var _0x239c7b;if(_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x5d')]){_0x239c7b=as['parseSearch'](_0x4fcdbb[_0x1fa4('0x3f')]['search']);var _0x270f1d=_0x239c7b[_0x1fa4('0x5e')];for(var _0x36bf9b=0x0;_0x36bf9b<_0x239c7b[_0x1fa4('0x5f')][_0x1fa4('0x43')];_0x36bf9b++){var _0x1626ff=_0x239c7b['conditions'][_0x36bf9b];var _0x5cad72='i';var _0x1ae851=_[_0x1fa4('0x60')](_0x433829,[_0x1fa4('0x30'),_0x1626ff[_0x1fa4('0x49')]]);if(!_0x1ae851){switch(_0x1626ff[_0x1fa4('0x49')]){case _0x1fa4('0x61'):if(_0x1626ff[_0x1fa4('0x62')]==0x1){_0x10acfa[_0x1fa4('0x63')]('`'+_0x1626ff[_0x1fa4('0x49')]+_0x1fa4('0x64'));}else{_0x10acfa[_0x1fa4('0x63')]('`'+_0x1626ff[_0x1fa4('0x49')]+_0x1fa4('0x65'));}break;case _0x1fa4('0x66'):if(_0x1626ff[_0x1fa4('0x67')]==='$substring'){if(_0x1626ff['value'][_0x1fa4('0x35')]('\x20')[_0x1fa4('0x43')]>0x1){_0x335001[_0x270f1d](_0x1fa4('0x68'),qs[_0x1fa4('0x69')](_0x1626ff[_0x1fa4('0x62')]),null);}else{var _0x56e286='%'+_0x1626ff['value']+'%';_0x335001[_0x270f1d](_0x1fa4('0x6a'),_0x56e286,_0x56e286,_0x56e286);}}else{_0x1ae851=_['find'](_0x433829,[_0x1fa4('0x30'),_0x1fa4('0x6b')]);_0x1626ff[_0x1fa4('0x49')]=_0x1fa4('0x6b');_0x388d82=as['buildExpression'](_0x5cad72,_0x1ae851[_0x1fa4('0x3b')],_0x1626ff);_0x335001[_0x270f1d](_0x388d82[_0x1fa4('0x6c')],_0x388d82[_0x1fa4('0x62')][_0x1fa4('0x6d')],_0x388d82['value'][_0x1fa4('0x2d')]);}break;case _0x1fa4('0x6e'):var _0x12cd3f=_0x1626ff[_0x1fa4('0x62')]['split'](',')[_0x1fa4('0x6f')](function(_0x1481a4){return Number(_0x1481a4);});_0x12cd3f[_0x1fa4('0x70')](function(_0x2fcec7){_0x1389e1['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x2fcec7+',%');});_0xb6a37a=_[_0x1fa4('0x71')](_0xb6a37a,_0x12cd3f);break;case _0x1fa4('0x72'):if(_0x1626ff[_0x1fa4('0x67')]===_0x1fa4('0x73')){_0x335001[_0x270f1d](_0x1fa4('0x74'),'%'+_0x1626ff[_0x1fa4('0x62')]+'%',null);}else{_0x1ae851=_[_0x1fa4('0x60')](_0x433829,[_0x1fa4('0x30'),'UserId']);_0x1626ff[_0x1fa4('0x49')]=_0x1fa4('0x75');_0x388d82=as['buildExpression'](_0x5cad72,_0x1ae851[_0x1fa4('0x3b')],_0x1626ff);_0x335001[_0x270f1d](_0x388d82[_0x1fa4('0x6c')],_0x388d82['value'][_0x1fa4('0x6d')],_0x388d82[_0x1fa4('0x62')][_0x1fa4('0x2d')]);}break;case'body':_0x388d82=as[_0x1fa4('0x76')]('me',null,_0x1626ff);_0x335001[_0x270f1d](_0x388d82[_0x1fa4('0x6c')],_0x388d82['value'][_0x1fa4('0x6d')],_0x388d82[_0x1fa4('0x62')]['end']);break;}}else{var _0x388d82=as[_0x1fa4('0x76')](_0x5cad72,_0x1ae851[_0x1fa4('0x3b')],_0x1626ff);_0x335001[_0x270f1d](_0x388d82[_0x1fa4('0x6c')],_0x388d82[_0x1fa4('0x62')][_0x1fa4('0x6d')],_0x388d82[_0x1fa4('0x62')][_0x1fa4('0x2d')]);}}}else{var _0x10d7f9=_(_0x4fcdbb[_0x1fa4('0x3f')])[_0x1fa4('0x3d')]()[_0x1fa4('0x6f')](function(_0x37091b){return _[_0x1fa4('0x77')](_0x433829,[_0x1fa4('0x30'),_0x37091b])?_0x37091b:undefined;})[_0x1fa4('0x78')]()[_0x1fa4('0x62')]();if(!_[_0x1fa4('0x79')](_0x10d7f9)){_0x10d7f9[_0x1fa4('0x70')](function(_0x30a345){if(_0x30a345==='OpenchannelAccountId'){_0x10acfa[_0x1fa4('0x48')](_0x1fa4('0x7a'),[][_0x1fa4('0x7b')](_0x4fcdbb[_0x1fa4('0x3f')][_0x30a345]));}else if(_0x30a345===_0x1fa4('0x7c')){var _0x1d6aaa=JSON[_0x1fa4('0x7d')](_0x4fcdbb[_0x1fa4('0x3f')][_0x30a345])[_0x1fa4('0x7e')];var _0x57782f=JSON[_0x1fa4('0x7d')](_0x4fcdbb[_0x1fa4('0x3f')][_0x30a345])[_0x1fa4('0x7f')];_0x10acfa[_0x1fa4('0x48')](_0x1fa4('0x80'),_0x1d6aaa,_0x57782f);}else{if(_0x4fcdbb['query'][_0x30a345]===_0x1fa4('0x81')){_0x10acfa[_0x1fa4('0x48')]('i.'+_0x30a345+'\x20IS\x20NULL');}else{_0x10acfa['where']('i.'+_0x30a345+_0x1fa4('0x82'),_0x4fcdbb[_0x1fa4('0x3f')][_0x30a345]);}}});}if(_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x83')]){if(_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x83')]==0x1){_0x10acfa['having']('`unreadMessages`\x20=\x200');}else{_0x10acfa[_0x1fa4('0x63')](_0x1fa4('0x84'));}}if(_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x85')]){_0xb6a37a=_[_0x1fa4('0x86')](_0x4fcdbb['query'][_0x1fa4('0x85')])?_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x85')]:new Array(_0x4fcdbb['query'][_0x1fa4('0x85')]);_0xb6a37a[_0x1fa4('0x70')](function(_0x104531){_0x1389e1['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x104531+',%');});}if(_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x87')]){var _0x41759b=_0x4fcdbb['query'][_0x1fa4('0x87')][_0x1fa4('0x88')]('\x5c','\x5c\x5c')['replace']('\x27\x27','\x27\x27\x27\x27');if(qs[_0x1fa4('0x89')](_0x41759b)){_0x335001['or']('i.id\x20LIKE\x20?',_0x41759b+'%');}else{_0x335001['or'](_0x1fa4('0x8a'),qs[_0x1fa4('0x69')](_0x41759b))['or'](_0x1fa4('0x8b'),_0x41759b+'%')['or'](_0x1fa4('0x8c'),_0x41759b+'%');}}}_0x10acfa[_0x1fa4('0x48')](_0x335001);_0x10acfa[_0x1fa4('0x8d')](_0x1fa4('0x8e'));var _0x218ba6={'type':db[_0x1fa4('0x8f')]['QueryTypes']['SELECT'],'raw':!![]};var _0xaa56a8=_0x10acfa[_0x1fa4('0x90')]();_0xaa56a8[_0x1fa4('0x49')](_0x1fa4('0x8e'));_0xaa56a8[_0x1fa4('0x49')](_0x1fa4('0x91'),_0x1fa4('0x61'));if(_0x328255[_0x1fa4('0x92')]){_0x328255['order']['forEach'](function(_0x5b1c96){_0x10acfa['order']('i.'+_0x5b1c96[0x0],_0x5b1c96[0x1]==='DESC'?![]:!![]);});}if(!_[_0x1fa4('0x79')](_0xb6a37a)){_0x10acfa['having'](_0x1389e1);_0xaa56a8[_0x1fa4('0x48')](_0x1fa4('0x93'),_0xb6a37a);}BPromise[_0x1fa4('0x94')]()[_0x1fa4('0x2b')](function(){if(!_0x239c7b){if(_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x95')]||_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x96')])return;_0xaa56a8[_0x1fa4('0x48')](_0x1fa4('0x97'));_0x10acfa[_0x1fa4('0x48')]('i.OpenchannelAccountId\x20IS\x20NOT\x20NULL');return;}return _0x4fcdbb[_0x1fa4('0x98')][_0x1fa4('0x99')]({'attributes':['id'],'raw':!![]})['then'](function(_0x36df0b){if(_[_0x1fa4('0x79')](_0x36df0b)){_0xaa56a8[_0x1fa4('0x48')](_0x1fa4('0x9a'));_0x10acfa['where'](_0x1fa4('0x9a'));}else{_0xaa56a8['where']('i.OpenchannelAccountId\x20IN\x20?',_[_0x1fa4('0x6f')](_0x36df0b,'id'));_0x10acfa[_0x1fa4('0x48')](_0x1fa4('0x7a'),_['map'](_0x36df0b,'id'));}});})['then'](function(){db['sequelize']['query'](_0xaa56a8[_0x1fa4('0x9b')](),_0x218ba6)[_0x1fa4('0x2b')](function(_0x210ad2){_0x4525bd[_0x1fa4('0x23')]=_0x210ad2[_0x1fa4('0x43')];if(_0x4525bd[_0x1fa4('0x23')]===0x0)return[];return db['sequelize']['query'](_0x59436d[_0x1fa4('0x9b')](),_0x218ba6)['then'](function(_0xfe79d3){_0x41aaa2=_[_0x1fa4('0x9c')](_0xfe79d3,'id');_0x218ba6=_[_0x1fa4('0x9d')](_0x218ba6,{'model':db[_0x1fa4('0x38')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x4fcdbb[_0x1fa4('0x3f')][_0x1fa4('0x42')]){_0x328255[_0x1fa4('0x40')][_0x1fa4('0x70')](function(_0x133828){_0x10acfa[_0x1fa4('0x49')]('i.'+_0x133828);});}else{_0x10acfa['field'](_0x1fa4('0x91'),'unreadMessages');_0x10acfa[_0x1fa4('0x49')]('a.key',_0x1fa4('0x9e'));_0x10acfa['field'](_0x1fa4('0x9f'),_0x1fa4('0xa0'));_0x10acfa['field'](_0x1fa4('0xa1'));_0x10acfa['field'](_0x1fa4('0xa2'),_0x1fa4('0xa3'));_0x10acfa[_0x1fa4('0x49')]('c.lastName',_0x1fa4('0xa4'));_0x10acfa[_0x1fa4('0x49')](_0x1fa4('0xa5'),_0x1fa4('0xa6'));_0x10acfa[_0x1fa4('0x49')](_0x1fa4('0xa7'),'Contact.phone');_0x10acfa[_0x1fa4('0x49')](_0x1fa4('0xa8'),_0x1fa4('0xa9'));_0x10acfa[_0x1fa4('0x49')](_0x1fa4('0xaa'),_0x1fa4('0xab'));_0x10acfa[_0x1fa4('0x49')](_0x1fa4('0xac'),_0x1fa4('0xad'));_0x10acfa[_0x1fa4('0x49')]('o.internal',_0x1fa4('0xae'));_0x10acfa[_0x1fa4('0x49')](_0x1fa4('0xaf'),_0x1fa4('0x33'));}_0x10acfa[_0x1fa4('0x46')](_0x328255[_0x1fa4('0x46')]);_0x10acfa[_0x1fa4('0x24')](_0x328255[_0x1fa4('0x24')]);return db[_0x1fa4('0xb0')][_0x1fa4('0x3f')](_0x10acfa[_0x1fa4('0x9b')](),_0x218ba6);})[_0x1fa4('0x2b')](function(_0x33244f){_0x3bd46d[_0x1fa4('0x48')](_0x1fa4('0xb1'),_['map'](_0x33244f,'id'));return db[_0x1fa4('0xb0')][_0x1fa4('0x3f')](_0x3bd46d[_0x1fa4('0x9b')](),_0x218ba6)[_0x1fa4('0x2b')](function(_0x3e3a4a){var _0x56e6c1=_[_0x1fa4('0xb2')](_0x3e3a4a,_0x1fa4('0xb3'));var _0x344794=[];_0x33244f[_0x1fa4('0x70')](function(_0x6d7467){_0x344794['push'](updateOpenchannelInteraction(_0x6d7467,_0x41aaa2,_0x56e6c1));});return BPromise['all'](_0x344794);});});})['then'](function(_0xf27aad){_0x4525bd[_0x1fa4('0xb4')]=_0xf27aad;return _0x4525bd;})[_0x1fa4('0x2b')](respondWithFilteredResult(_0x14226b,_0x328255));})['catch'](handleError(_0x14226b,null));};exports[_0x1fa4('0xb5')]=function(_0x32184b,_0x4f0fde){var _0x4e142d={'raw':![],'where':{'id':_0x32184b[_0x1fa4('0xb6')]['id']}},_0x4ecb34={};_0x4ecb34[_0x1fa4('0x3c')]=_[_0x1fa4('0x3d')](db[_0x1fa4('0x38')]['rawAttributes']);_0x4ecb34[_0x1fa4('0x3f')]=_[_0x1fa4('0x3d')](_0x32184b['query']);_0x4ecb34[_0x1fa4('0x3e')]=_[_0x1fa4('0x41')](_0x4ecb34[_0x1fa4('0x3c')],_0x4ecb34[_0x1fa4('0x3f')]);_0x4e142d[_0x1fa4('0x40')]=_[_0x1fa4('0x41')](_0x4ecb34[_0x1fa4('0x3c')],qs[_0x1fa4('0x42')](_0x32184b[_0x1fa4('0x3f')][_0x1fa4('0x42')]));_0x4e142d['attributes']=_0x4e142d[_0x1fa4('0x40')][_0x1fa4('0x43')]?_0x4e142d[_0x1fa4('0x40')]:_0x4ecb34[_0x1fa4('0x3c')];if(_0x32184b[_0x1fa4('0x3f')][_0x1fa4('0xb7')]){_0x4e142d[_0x1fa4('0xb8')]=[{'all':!![]}];}_0x4e142d=_['merge']({},_0x4e142d,_0x32184b[_0x1fa4('0xb9')]);return db[_0x1fa4('0x38')][_0x1fa4('0x60')](_0x4e142d)['then'](handleEntityNotFound(_0x4f0fde,null))[_0x1fa4('0x2b')](respondWithResult(_0x4f0fde,null))[_0x1fa4('0x36')](handleError(_0x4f0fde,null));};exports[_0x1fa4('0xba')]=function(_0x6d008d,_0x3e51c1){return db[_0x1fa4('0x38')]['create'](_0x6d008d[_0x1fa4('0xbb')],{})[_0x1fa4('0x2b')](respondWithResult(_0x3e51c1,0xc9))[_0x1fa4('0x36')](handleError(_0x3e51c1,null));};exports[_0x1fa4('0x2a')]=function(_0x128a56,_0x56700e){if(_0x128a56['body']['id']){delete _0x128a56[_0x1fa4('0xbb')]['id'];}return db['OpenchannelInteraction']['find']({'where':{'id':_0x128a56['params']['id']}})[_0x1fa4('0x2b')](handleEntityNotFound(_0x56700e,null))[_0x1fa4('0x2b')](saveUpdates(_0x128a56['body'],null))['then'](respondWithResult(_0x56700e,null))[_0x1fa4('0x36')](handleError(_0x56700e,null));};exports[_0x1fa4('0x2c')]=function(_0x4c9e70,_0x1e8e5d){return db[_0x1fa4('0x38')][_0x1fa4('0x60')]({'where':{'id':_0x4c9e70['params']['id']}})[_0x1fa4('0x2b')](handleEntityNotFound(_0x1e8e5d,null))[_0x1fa4('0x2b')](removeEntity(_0x1e8e5d,null))['catch'](handleError(_0x1e8e5d,null));};exports[_0x1fa4('0xbc')]=function(_0x182fa6,_0x427ddb){return db[_0x1fa4('0x38')][_0x1fa4('0xbc')]()[_0x1fa4('0x2b')](respondWithResult(_0x427ddb,null))[_0x1fa4('0x36')](handleError(_0x427ddb,null));};exports[_0x1fa4('0xbd')]=function(_0x231c5b,_0x53a283,_0x3f03ef){return db['OpenchannelMessage'][_0x1fa4('0x60')]({'where':{'id':_0x231c5b[_0x1fa4('0xb6')]['id']}})[_0x1fa4('0x2b')](handleEntityNotFound(_0x53a283,null))['then'](function(_0x54ec69){if(_0x54ec69){return _0x54ec69[_0x1fa4('0xbd')](_0x231c5b[_0x1fa4('0xbb')][_0x1fa4('0xbe')],_[_0x1fa4('0xbf')](_0x231c5b[_0x1fa4('0xbb')],[_0x1fa4('0xbe'),'id'])||{});}})[_0x1fa4('0x2b')](respondWithResult(_0x53a283,null))[_0x1fa4('0x36')](handleError(_0x53a283,null));};exports[_0x1fa4('0xc0')]=function(_0x1e0b4c,_0xa1bb2b,_0x50bb05){var _0x3fe1c8={'raw':![],'where':{}};var _0x1958d9={};var _0x14facb={'count':0x0,'rows':[]};return db['OpenchannelInteraction'][_0x1fa4('0xc1')]({'where':{'id':_0x1e0b4c[_0x1fa4('0xb6')]['id']}})[_0x1fa4('0x2b')](handleEntityNotFound(_0xa1bb2b,null))[_0x1fa4('0x2b')](function(_0x2963d4){if(_0x2963d4){_0x1958d9[_0x1fa4('0x3c')]=_[_0x1fa4('0x3d')](db[_0x1fa4('0xc2')][_0x1fa4('0x39')]);_0x1958d9['query']=_[_0x1fa4('0x3d')](_0x1e0b4c[_0x1fa4('0x3f')]);_0x1958d9[_0x1fa4('0x3e')]=_[_0x1fa4('0x41')](_0x1958d9[_0x1fa4('0x3c')],_0x1958d9[_0x1fa4('0x3f')]);_0x3fe1c8[_0x1fa4('0x40')]=_[_0x1fa4('0x41')](_0x1958d9[_0x1fa4('0x3c')],qs[_0x1fa4('0x42')](_0x1e0b4c[_0x1fa4('0x3f')]['fields']));_0x3fe1c8[_0x1fa4('0x40')]=_0x3fe1c8['attributes'][_0x1fa4('0x43')]?_0x3fe1c8[_0x1fa4('0x40')]:_0x1958d9[_0x1fa4('0x3c')];if(!_0x1e0b4c[_0x1fa4('0x3f')][_0x1fa4('0x44')](_0x1fa4('0x45'))){_0x3fe1c8[_0x1fa4('0x46')]=qs[_0x1fa4('0x46')](_0x1e0b4c[_0x1fa4('0x3f')][_0x1fa4('0x46')]);_0x3fe1c8[_0x1fa4('0x24')]=qs[_0x1fa4('0x24')](_0x1e0b4c[_0x1fa4('0x3f')]['offset']);}_0x3fe1c8[_0x1fa4('0x92')]=qs[_0x1fa4('0x47')](_0x1e0b4c[_0x1fa4('0x3f')][_0x1fa4('0x47')]);_0x3fe1c8[_0x1fa4('0x48')]=qs[_0x1fa4('0x3e')](_['pick'](_0x1e0b4c[_0x1fa4('0x3f')],_0x1958d9[_0x1fa4('0x3e')]));_0x3fe1c8[_0x1fa4('0x48')]['OpenchannelInteractionId']=_0x2963d4['id'];if(_0x1e0b4c['query'][_0x1fa4('0x87')]){_0x3fe1c8['where']=_['merge'](_0x3fe1c8[_0x1fa4('0x48')],{'$or':_[_0x1fa4('0x6f')](_0x3fe1c8[_0x1fa4('0x40')],function(_0x3176d4){var _0x54063a={};_0x54063a[_0x3176d4]={'$like':'%'+_0x1e0b4c[_0x1fa4('0x3f')][_0x1fa4('0x87')]+'%'};return _0x54063a;})});}if(_0x1e0b4c[_0x1fa4('0x3f')][_0x1fa4('0x7e')]){var _0x4943d3=_0x1e0b4c[_0x1fa4('0x3f')]['$gte'][_0x1fa4('0x35')](',');var _0x3f8483={};_0x3f8483[_0x4943d3[0x0]]={'$gte':moment(_0x4943d3[0x1])[_0x1fa4('0xc3')](_0x1fa4('0xc4'))};_0x3fe1c8['where']=_[_0x1fa4('0x9d')](_0x3fe1c8['where'],_0x3f8483);}_0x3fe1c8=_['merge']({},_0x3fe1c8,_0x1e0b4c['options']);return db[_0x1fa4('0xc2')][_0x1fa4('0x23')]({'where':_0x3fe1c8[_0x1fa4('0x48')]})[_0x1fa4('0x2b')](function(_0x2a317c){_0x14facb['count']=_0x2a317c;if(_0x1e0b4c[_0x1fa4('0x3f')][_0x1fa4('0xb7')]){_0x3fe1c8[_0x1fa4('0xb8')]=[{'all':!![]}];}return db[_0x1fa4('0xc2')]['findAll'](_0x3fe1c8);})[_0x1fa4('0x2b')](function(_0x367c7f){_0x14facb['rows']=_0x367c7f;return _0x14facb;});}})[_0x1fa4('0x2b')](respondWithFilteredResult(_0xa1bb2b,_0x3fe1c8))['catch'](handleError(_0xa1bb2b,null));};exports[_0x1fa4('0xc5')]=function(_0x3715fd,_0x1b0f57,_0x36e712){return db['OpenchannelInteraction'][_0x1fa4('0x60')]({'where':{'id':_0x3715fd[_0x1fa4('0xb6')]['id']}})[_0x1fa4('0x2b')](handleEntityNotFound(_0x1b0f57,null))['then'](function(_0x39eaad){if(_0x39eaad){return _0x39eaad[_0x1fa4('0xc6')](_0x3715fd[_0x1fa4('0xbb')]['ids'],_[_0x1fa4('0xbf')](_0x3715fd['body'],['ids','id'])||{})[_0x1fa4('0xc7')](function(){return db[_0x1fa4('0x6e')][_0x1fa4('0xc8')]({'attributes':['id','name',_0x1fa4('0x4a')],'where':{'id':_0x3715fd[_0x1fa4('0xbb')]['ids']}});})['then'](function(_0x202cd4){socket[_0x1fa4('0xc9')](_0x1fa4('0xca'),{'id':Number(_0x3715fd['params']['id']),'tags':_0x202cd4||[]});return{'id':Number(_0x3715fd['params']['id']),'tags':_0x202cd4||[]};});}})[_0x1fa4('0x2b')](respondWithResult(_0x1b0f57,null))['catch'](handleError(_0x1b0f57,null));};exports[_0x1fa4('0xcb')]=function(_0x560c53,_0x39d733,_0x179df5){return db[_0x1fa4('0x38')]['find']({'where':{'id':_0x560c53[_0x1fa4('0xb6')]['id']}})[_0x1fa4('0x2b')](handleEntityNotFound(_0x39d733,null))[_0x1fa4('0x2b')](function(_0x2b61e6){if(_0x2b61e6){return _0x2b61e6[_0x1fa4('0xcb')](_0x560c53['query'][_0x1fa4('0xbe')]);}})[_0x1fa4('0x2b')](respondWithStatusCode(_0x39d733,null))[_0x1fa4('0x36')](handleError(_0x39d733,null));};exports[_0x1fa4('0xcc')]=function(_0x1c48ea,_0x443207){var _0x157a86=moment()['unix']()[_0x1fa4('0x9b')]();var _0x303332=path[_0x1fa4('0xcd')](config['root'],_0x1fa4('0xce'),_0x1fa4('0xcf'),'tmp');var _0x936544=path[_0x1fa4('0xcd')](config['root'],_0x1fa4('0xce'),'files','attachments');var _0x476a3a=path['join'](_0x303332,_0x157a86);var _0x5d1bf0=util[_0x1fa4('0xc3')](_0x1fa4('0xd0'),_0x1c48ea[_0x1fa4('0xb6')]['id'],_0x157a86);var _0x5324c4=path[_0x1fa4('0xcd')](_0x303332,_0x5d1bf0);var _0x56dbb9=[];_0x56dbb9[_0x1fa4('0xd1')]({'model':db['User'],'as':_0x1fa4('0x72'),'attributes':['id',_0x1fa4('0x32')],'raw':!![]});_0x56dbb9[_0x1fa4('0xd1')]({'model':db['CmContact'],'as':'Contact','attributes':['id','firstName',_0x1fa4('0xd2')],'raw':!![]});if(_0x1c48ea['query']['attachments']){_0x56dbb9[_0x1fa4('0xd1')]({'model':db[_0x1fa4('0xd3')],'as':_0x1fa4('0xd3'),'raw':!![]});}var _0x879c21=[{'model':db[_0x1fa4('0xc2')],'as':_0x1fa4('0xd4'),'attributes':['id',_0x1fa4('0xbb'),_0x1fa4('0x7c'),_0x1fa4('0xd5'),_0x1fa4('0xd6'),_0x1fa4('0x83')],'include':_0x56dbb9}];_0x879c21[_0x1fa4('0xd1')]({'model':db['OpenchannelAccount'],'as':_0x1fa4('0xd7'),'attributes':['id',_0x1fa4('0x30')]});_0x879c21[_0x1fa4('0xd1')]({'model':db[_0x1fa4('0x72')],'as':'Owner','attributes':['id',_0x1fa4('0x32')]});return db[_0x1fa4('0x38')][_0x1fa4('0x60')]({'where':{'id':_0x1c48ea[_0x1fa4('0xb6')]['id']},'include':_0x879c21})[_0x1fa4('0x2b')](handleEntityNotFound(_0x443207,null))[_0x1fa4('0x2b')](function(_0x415ef8){if(_0x415ef8){var _0x17e7cd=_0x415ef8[_0x1fa4('0xd8')]({'plain':!![]});fs['mkdirSync'](_0x476a3a);var _0x5c9528={'format':'A4','border':'10px','header':{'height':_0x1fa4('0xd9'),'contents':{'first':_0x1fa4('0xda')}},'footer':{'height':_0x1fa4('0xdb'),'contents':{'default':util['format'](_0x1fa4('0xdc'),util['format'](_0x1fa4('0xdd'),_0x1fa4('0xde'),_0x17e7cd['id']),moment()['format'](_0x1fa4('0xdf'))[_0x1fa4('0x9b')]())}}};var _0x2cf541={'channel':_0x1fa4('0xde'),'account':_0x17e7cd[_0x1fa4('0xd7')]['name'],'agent':_0x17e7cd[_0x1fa4('0xe0')]?_0x17e7cd['Owner'][_0x1fa4('0x32')]:_0x1fa4('0xe1'),'createdAt':moment(_0x17e7cd[_0x1fa4('0x7c')])['format'](_0x1fa4('0xc4'))['toString'](),'closedAt':_0x17e7cd[_0x1fa4('0xe2')]?moment(_0x17e7cd[_0x1fa4('0xe3')])['format'](_0x1fa4('0xc4'))[_0x1fa4('0x9b')]():'','disposition':_0x17e7cd['disposition'],'visibility':_0x17e7cd['threadId']?'Public':_0x1fa4('0xe4'),'messages':_(_0x17e7cd[_0x1fa4('0xd4')])[_0x1fa4('0x87')]({'secret':![]})['map'](function(_0x3ae858){if(_0x3ae858[_0x1fa4('0xd3')]){var _0x24a5c2=path[_0x1fa4('0xcd')](_0x936544,_0x3ae858['Attachment'][_0x1fa4('0xe5')]);if(fs['existsSync'](_0x24a5c2)){fs[_0x1fa4('0xe6')](_0x24a5c2)[_0x1fa4('0xe7')](fs[_0x1fa4('0xe8')](path[_0x1fa4('0xcd')](_0x476a3a,_0x3ae858['Attachment'][_0x1fa4('0xe5')])));}}return{'date':moment(_0x3ae858[_0x1fa4('0x7c')])[_0x1fa4('0xc3')]('YYYY-MM-DD\x20HH:mm:ss')[_0x1fa4('0x9b')](),'sender':_0x3ae858[_0x1fa4('0xd5')]===_0x1fa4('0xe9')?_0x3ae858[_0x1fa4('0x72')]?_0x3ae858[_0x1fa4('0x72')][_0x1fa4('0x32')]:_0x1fa4('0xea'):_0x3ae858[_0x1fa4('0x66')][_0x1fa4('0xeb')]+(_0x3ae858[_0x1fa4('0x66')]['lastName']?'\x20'+_0x3ae858[_0x1fa4('0x66')][_0x1fa4('0xd2')]:''),'body':_0x3ae858['Attachment']?_0x3ae858[_0x1fa4('0xd3')][_0x1fa4('0xe5')]:_0x3ae858['body'],'direction':_0x3ae858[_0x1fa4('0xd5')]===_0x1fa4('0xe9')?'A':'C','secret':_0x3ae858[_0x1fa4('0xd6')],'read':_0x3ae858[_0x1fa4('0x83')],'attachment':_0x3ae858[_0x1fa4('0xd3')]};})[_0x1fa4('0x62')]()};return ejs['renderFile'](path['join'](config[_0x1fa4('0xec')],'server','views',_0x1fa4('0xed')),{'interaction':_0x2cf541})[_0x1fa4('0x2b')](function(_0x1702f1){return new BPromise(function(_0x24acc1,_0x222702){pdf['create'](_0x1702f1,_0x5c9528)['toFile'](path['join'](_0x476a3a,_0x1fa4('0xee')+_0x17e7cd['id']+'-'+_0x157a86+'.pdf'),function(_0x4c407b,_0x833115){if(_0x4c407b)return _0x222702(_0x4c407b);_0x24acc1(_0x833115);});});})[_0x1fa4('0x2b')](function(){return new BPromise(function(_0x11e31a,_0x2b0131){zipdir(_0x476a3a,{'saveTo':_0x5324c4},function(_0x2de9ad,_0x4c2afc){if(_0x2de9ad)return _0x2b0131(_0x2de9ad);return _0x11e31a(_0x4c2afc);});})[_0x1fa4('0x2b')](function(){return new BPromise(function(_0x4b5eca,_0x5c6314){rimraf(_0x476a3a,function(_0x231b13){if(_0x231b13)_0x5c6314(_0x231b13);return _0x4b5eca();});});})['then'](function(){return _0x443207[_0x1fa4('0xcc')](_0x5324c4,_0x5d1bf0,function(_0x5c6e8a){if(_0x5c6e8a){console[_0x1fa4('0xef')]('err',_0x5c6e8a);}else{fs[_0x1fa4('0xf0')](_0x5324c4);}});});});}else{return _0x443207[_0x1fa4('0x20')](0xc8);}})[_0x1fa4('0x36')](handleError(_0x443207,null));};
\ No newline at end of file
+var _0x6a4a=['update','then','destroy','error','stack','name','send','Users','map','fullname','TagIds','Tags','push','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','nolimit','order','sort','pick','select','field','color','from','tools_tags','u.fullname','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','openchannel_accounts','a.id\x20=\x20i.OpenchannelAccountId','openchannel_messages','me.OpenchannelInteractionId\x20=\x20i.id','openchannel_interaction_has_tags','it.OpenchannelInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','parseSearch','sqlOperator','conditions','find','value','having','`\x20=\x200','`\x20>\x200','Contact','operator','$substring','split','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','type','text','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','start','some','isEmpty','forEach','OpenchannelAccountId','where','createdAt','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','`unreadMessages`\x20>\x200','isArray','tag','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','i.from\x20LIKE\x20?','group','i.id','Sequelize','QueryTypes','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages','DESC','t.id\x20IN\x20?','journey','i.OpenchannelAccountId\x20IS\x20NOT\x20NULL','user','getOpenchannelAccounts','i.OpenchannelAccountId\x20IS\x20NULL','i.OpenchannelAccountId\x20IN\x20?','sequelize','toString','length','OpenchannelInteraction','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','i.*','c.firstName','c.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','ui.OpenchannelInteractionId\x20IN\x20?','groupBy','OpenchannelInteractionId','all','rows','catch','show','params','include','merge','create','body','describe','addMessage','ids','findOne','OpenchannelMessage','filter','format','YYYY-MM-DD\x20HH:mm:ss','includeAll','findAll','setTags','omit','Tag','openchannelInteractionTags:save','removeTags','download','unix','root','server','files','tmp','join','transcript-%d-%s.zip','CmContact','lastName','Attachment','Messages','direction','Owner','get','mkdirSync','10px','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\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
\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%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
\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
\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{{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
\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
\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%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
\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
','%s\x20#%d','Openchannel','YYYY-MM-DD','Account','N.A.','closed','closedAt','disposition','threadId','Public','Private','existsSync','createReadStream','pipe','createWriteStream','basename','out','System','renderFile','views','toFile','transcript-','err','unlinkSync','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','ejs','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','sendStatus','status','end','json','count','offset','limit','set','apply','reject','save'];(function(_0x4c57f3,_0x9f9270){var _0x2ac0bc=function(_0x48ecff){while(--_0x48ecff){_0x4c57f3['push'](_0x4c57f3['shift']());}};_0x2ac0bc(++_0x9f9270);}(_0x6a4a,0xcc));var _0xa6a4=function(_0x3cae69,_0x233c38){_0x3cae69=_0x3cae69-0x0;var _0x3128eb=_0x6a4a[_0x3cae69];return _0x3128eb;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xa6a4('0x0'));var jsonpatch=require(_0xa6a4('0x1'));var rp=require(_0xa6a4('0x2'));var moment=require(_0xa6a4('0x3'));var BPromise=require(_0xa6a4('0x4'));var Mustache=require('mustache');var util=require(_0xa6a4('0x5'));var path=require('path');var sox=require(_0xa6a4('0x6'));var csv=require('to-csv');var ejs=require(_0xa6a4('0x7'));var fs=require('fs');var _=require('lodash');var squel=require(_0xa6a4('0x8'));var crypto=require('crypto');var jsforce=require(_0xa6a4('0x9'));var deskjs=require(_0xa6a4('0xa'));var toCsv=require(_0xa6a4('0xb'));var querystring=require(_0xa6a4('0xc'));var Papa=require(_0xa6a4('0xd'));var Redis=require(_0xa6a4('0xe'));var authService=require(_0xa6a4('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0xa6a4('0x10'));var hardwareService=require(_0xa6a4('0x11'));var logger=require(_0xa6a4('0x12'))(_0xa6a4('0x13'));var utils=require(_0xa6a4('0x14'));var config=require(_0xa6a4('0x15'));var db=require('../../mysqldb')['db'];config[_0xa6a4('0x16')]=_[_0xa6a4('0x17')](config[_0xa6a4('0x16')],{'host':_0xa6a4('0x18'),'port':0x18eb});var socket=require(_0xa6a4('0x19'))(new Redis(config['redis']));require('./openchannelInteraction.socket')['register'](socket);function respondWithStatusCode(_0x53fe1c,_0x9b47b5){_0x9b47b5=_0x9b47b5||0xcc;return function(_0x5ce93f){if(_0x5ce93f){return _0x53fe1c[_0xa6a4('0x1a')](_0x9b47b5);}return _0x53fe1c[_0xa6a4('0x1b')](_0x9b47b5)[_0xa6a4('0x1c')]();};}function respondWithResult(_0xa231af,_0x364f0a){_0x364f0a=_0x364f0a||0xc8;return function(_0x1def44){if(_0x1def44){return _0xa231af[_0xa6a4('0x1b')](_0x364f0a)[_0xa6a4('0x1d')](_0x1def44);}};}function respondWithFilteredResult(_0x4ecab5,_0x3561b8){return function(_0x1aaf71){if(_0x1aaf71){var _0x57a4ec=_0x1aaf71[_0xa6a4('0x1e')],_0x29c5c8=_0x3561b8[_0xa6a4('0x1f')],_0x3f7565=_0x3561b8[_0xa6a4('0x1f')]+_0x3561b8[_0xa6a4('0x20')],_0x3ef5e8;if(_0x3f7565>=_0x57a4ec){_0x3f7565=_0x57a4ec;_0x3ef5e8=0xc8;}else{_0x3ef5e8=0xce;}_0x4ecab5[_0xa6a4('0x1b')](_0x3ef5e8);return _0x4ecab5[_0xa6a4('0x21')]('Content-Range',_0x29c5c8+'-'+_0x3f7565+'/'+_0x57a4ec)['json'](_0x1aaf71);}return null;};}function patchUpdates(_0x452f25){return function(_0x5a0645){try{jsonpatch[_0xa6a4('0x22')](_0x5a0645,_0x452f25,!![]);}catch(_0x4d0032){return BPromise[_0xa6a4('0x23')](_0x4d0032);}return _0x5a0645[_0xa6a4('0x24')]();};}function saveUpdates(_0x399897,_0x4d06b2){return function(_0x481e00){if(_0x481e00){return _0x481e00[_0xa6a4('0x25')](_0x399897)[_0xa6a4('0x26')](function(_0x1cc4f6){return _0x1cc4f6;});}return null;};}function removeEntity(_0x3ac3f4,_0x1ecc9f){return function(_0x5cd00b){if(_0x5cd00b){return _0x5cd00b[_0xa6a4('0x27')]()[_0xa6a4('0x26')](function(){_0x3ac3f4['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x12ed73,_0x477ef5){return function(_0x208d57){if(!_0x208d57){_0x12ed73['sendStatus'](0x194);}return _0x208d57;};}function handleError(_0x24c4c6,_0x4b54f1){_0x4b54f1=_0x4b54f1||0x1f4;return function(_0x1de189){logger[_0xa6a4('0x28')](_0x1de189[_0xa6a4('0x29')]);if(_0x1de189[_0xa6a4('0x2a')]){delete _0x1de189[_0xa6a4('0x2a')];}_0x24c4c6[_0xa6a4('0x1b')](_0x4b54f1)[_0xa6a4('0x2b')](_0x1de189);};}function getInteractionUsers(_0x1bf671,_0x38bed9){return new BPromise(function(_0x58c5d9,_0x9f946e){try{if(_0x38bed9[_0x1bf671['id']]){_0x1bf671[_0xa6a4('0x2c')]=_[_0xa6a4('0x2d')](_0x38bed9[_0x1bf671['id']],function(_0x291f8c){return{'id':_0x291f8c['id'],'fullname':_0x291f8c[_0xa6a4('0x2e')]};});}}catch(_0x247ef6){_0x9f946e(_0x247ef6);}_0x58c5d9(_0x1bf671);});}function getInteractionTags(_0x27da55,_0x5342b6){return new BPromise(function(_0x556657,_0x3c7930){try{if(_0x27da55[_0xa6a4('0x2f')]){_0x27da55[_0xa6a4('0x30')]=[];_0x27da55[_0xa6a4('0x2f')]['split'](',')['forEach'](function(_0x1b4d78){_0x27da55[_0xa6a4('0x30')][_0xa6a4('0x31')](_0x5342b6[_0x1b4d78]);});}delete _0x27da55[_0xa6a4('0x2f')];}catch(_0x1cb2a8){_0x3c7930(_0x1cb2a8);}_0x556657(_0x27da55);});}function updateOpenchannelInteraction(_0x466ad5,_0x542353,_0x33a6bb){return new BPromise(function(_0x5d17d7,_0x2519c5){return getInteractionUsers(_0x466ad5,_0x33a6bb)[_0xa6a4('0x26')](function(_0x245af2){return getInteractionTags(_0x245af2,_0x542353);})[_0xa6a4('0x26')](function(_0x4eb588){_0x5d17d7(_0x4eb588);})['catch'](function(_0x3a58e7){_0x2519c5(_0x3a58e7);});});}exports['index']=function(_0x1a3b88,_0x5157d0){var _0x209b4f={},_0x1275a9={},_0x61177e={'count':0x0,'rows':[]};var _0x16fcae=_[_0xa6a4('0x2d')](db['OpenchannelInteraction'][_0xa6a4('0x32')],function(_0x1aa32e){return{'name':_0x1aa32e[_0xa6a4('0x33')],'type':_0x1aa32e['type'][_0xa6a4('0x34')]};});_0x1275a9[_0xa6a4('0x35')]=_['map'](_0x16fcae,'name');_0x1275a9['query']=_[_0xa6a4('0x36')](_0x1a3b88[_0xa6a4('0x37')]);_0x1275a9[_0xa6a4('0x38')]=_[_0xa6a4('0x39')](_0x1275a9['model'],_0x1275a9[_0xa6a4('0x37')]);_0x209b4f[_0xa6a4('0x3a')]=_[_0xa6a4('0x39')](_0x1275a9['model'],qs[_0xa6a4('0x3b')](_0x1a3b88['query'][_0xa6a4('0x3b')]));_0x209b4f[_0xa6a4('0x3a')]=_0x209b4f['attributes']['length']?_0x209b4f[_0xa6a4('0x3a')]:_0x1275a9[_0xa6a4('0x35')];if(!_0x1a3b88[_0xa6a4('0x37')]['hasOwnProperty'](_0xa6a4('0x3c'))){_0x209b4f['limit']=qs['limit'](_0x1a3b88['query'][_0xa6a4('0x20')]);_0x209b4f[_0xa6a4('0x1f')]=qs[_0xa6a4('0x1f')](_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x1f')]);}_0x209b4f[_0xa6a4('0x3d')]=qs[_0xa6a4('0x3e')](_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x3e')]);_0x209b4f['where']=qs[_0xa6a4('0x38')](_[_0xa6a4('0x3f')](_0x1a3b88[_0xa6a4('0x37')],_0x1275a9['filters']));var _0x4b6706=[];var _0x3598e4=squel[_0xa6a4('0x40')]()[_0xa6a4('0x41')]('id')[_0xa6a4('0x41')]('name')['field'](_0xa6a4('0x42'))[_0xa6a4('0x43')](_0xa6a4('0x44'));var _0x326439=squel['select']()[_0xa6a4('0x41')]('u.id')[_0xa6a4('0x41')](_0xa6a4('0x45'))['field'](_0xa6a4('0x46'))[_0xa6a4('0x43')](_0xa6a4('0x47'),'ui')[_0xa6a4('0x48')](_0xa6a4('0x49'),'u',_0xa6a4('0x4a'));var _0x263687=squel[_0xa6a4('0x40')]()[_0xa6a4('0x43')](_0xa6a4('0x4b'),'i')[_0xa6a4('0x48')](_0xa6a4('0x4c'),'c',_0xa6a4('0x4d'))[_0xa6a4('0x48')](_0xa6a4('0x49'),'o','o.id\x20=\x20i.UserId')[_0xa6a4('0x48')](_0xa6a4('0x4e'),'a',_0xa6a4('0x4f'))[_0xa6a4('0x48')](_0xa6a4('0x50'),'me',_0xa6a4('0x51'))['left_join'](_0xa6a4('0x52'),'it',_0xa6a4('0x53'))['left_join'](_0xa6a4('0x44'),'t',_0xa6a4('0x54'));var _0x4a8f36=squel[_0xa6a4('0x55')]();var _0x3da966=[];var _0x270582=squel['expr']();var _0x3660ab;if(_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x56')]){_0x3660ab=as[_0xa6a4('0x57')](_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x56')]);var _0x1430fe=_0x3660ab[_0xa6a4('0x58')];for(var _0x323965=0x0;_0x323965<_0x3660ab[_0xa6a4('0x59')]['length'];_0x323965++){var _0x1a2b80=_0x3660ab['conditions'][_0x323965];var _0x405a49='i';var _0x2d03bc=_[_0xa6a4('0x5a')](_0x16fcae,['name',_0x1a2b80[_0xa6a4('0x41')]]);if(!_0x2d03bc){switch(_0x1a2b80[_0xa6a4('0x41')]){case'unreadMessages':if(_0x1a2b80[_0xa6a4('0x5b')]==0x1){_0x263687[_0xa6a4('0x5c')]('`'+_0x1a2b80[_0xa6a4('0x41')]+_0xa6a4('0x5d'));}else{_0x263687[_0xa6a4('0x5c')]('`'+_0x1a2b80['field']+_0xa6a4('0x5e'));}break;case _0xa6a4('0x5f'):if(_0x1a2b80[_0xa6a4('0x60')]===_0xa6a4('0x61')){if(_0x1a2b80['value'][_0xa6a4('0x62')]('\x20')['length']>0x1){_0x4a8f36[_0x1430fe](_0xa6a4('0x63'),qs[_0xa6a4('0x64')](_0x1a2b80['value']),null);}else{var _0x3fdd42='%'+_0x1a2b80['value']+'%';_0x4a8f36[_0x1430fe](_0xa6a4('0x65'),_0x3fdd42,_0x3fdd42,_0x3fdd42);}}else{_0x2d03bc=_[_0xa6a4('0x5a')](_0x16fcae,[_0xa6a4('0x2a'),_0xa6a4('0x66')]);_0x1a2b80[_0xa6a4('0x41')]='ContactId';_0x3d5224=as[_0xa6a4('0x67')](_0x405a49,_0x2d03bc[_0xa6a4('0x68')],_0x1a2b80);_0x4a8f36[_0x1430fe](_0x3d5224[_0xa6a4('0x69')],_0x3d5224['value']['start'],_0x3d5224[_0xa6a4('0x5b')][_0xa6a4('0x1c')]);}break;case'Tag':var _0x5b31d0=_0x1a2b80[_0xa6a4('0x5b')]['split'](',')[_0xa6a4('0x2d')](function(_0x61ce67){return Number(_0x61ce67);});_0x5b31d0['forEach'](function(_0x589c9c){_0x270582['or'](_0xa6a4('0x6a'),'%,'+_0x589c9c+',%');});_0x3da966=_[_0xa6a4('0x6b')](_0x3da966,_0x5b31d0);break;case _0xa6a4('0x6c'):if(_0x1a2b80['operator']===_0xa6a4('0x61')){_0x4a8f36[_0x1430fe](_0xa6a4('0x6d'),'%'+_0x1a2b80[_0xa6a4('0x5b')]+'%',null);}else{_0x2d03bc=_[_0xa6a4('0x5a')](_0x16fcae,['name',_0xa6a4('0x6e')]);_0x1a2b80[_0xa6a4('0x41')]=_0xa6a4('0x6e');_0x3d5224=as['buildExpression'](_0x405a49,_0x2d03bc[_0xa6a4('0x68')],_0x1a2b80);_0x4a8f36[_0x1430fe](_0x3d5224[_0xa6a4('0x69')],_0x3d5224[_0xa6a4('0x5b')][_0xa6a4('0x6f')],_0x3d5224[_0xa6a4('0x5b')]['end']);}break;case'body':_0x3d5224=as[_0xa6a4('0x67')]('me',null,_0x1a2b80);_0x4a8f36[_0x1430fe](_0x3d5224[_0xa6a4('0x69')],_0x3d5224[_0xa6a4('0x5b')][_0xa6a4('0x6f')],_0x3d5224['value'][_0xa6a4('0x1c')]);break;}}else{var _0x3d5224=as[_0xa6a4('0x67')](_0x405a49,_0x2d03bc['type'],_0x1a2b80);_0x4a8f36[_0x1430fe](_0x3d5224[_0xa6a4('0x69')],_0x3d5224[_0xa6a4('0x5b')][_0xa6a4('0x6f')],_0x3d5224[_0xa6a4('0x5b')]['end']);}}}else{var _0x5ab3e5=_(_0x1a3b88[_0xa6a4('0x37')])['keys']()['map'](function(_0x2072ad){return _[_0xa6a4('0x70')](_0x16fcae,[_0xa6a4('0x2a'),_0x2072ad])?_0x2072ad:undefined;})['compact']()[_0xa6a4('0x5b')]();if(!_[_0xa6a4('0x71')](_0x5ab3e5)){_0x5ab3e5[_0xa6a4('0x72')](function(_0x16180e){if(_0x16180e===_0xa6a4('0x73')){_0x263687[_0xa6a4('0x74')]('i.OpenchannelAccountId\x20IN\x20?',[]['concat'](_0x1a3b88[_0xa6a4('0x37')][_0x16180e]));}else if(_0x16180e===_0xa6a4('0x75')){var _0x29b21e=JSON[_0xa6a4('0x76')](_0x1a3b88[_0xa6a4('0x37')][_0x16180e])[_0xa6a4('0x77')];var _0x396a33=JSON[_0xa6a4('0x76')](_0x1a3b88['query'][_0x16180e])[_0xa6a4('0x78')];_0x263687[_0xa6a4('0x74')](_0xa6a4('0x79'),_0x29b21e,_0x396a33);}else{if(_0x1a3b88[_0xa6a4('0x37')][_0x16180e]===_0xa6a4('0x7a')){_0x263687['where']('i.'+_0x16180e+'\x20IS\x20NULL');}else{_0x263687[_0xa6a4('0x74')]('i.'+_0x16180e+_0xa6a4('0x7b'),_0x1a3b88[_0xa6a4('0x37')][_0x16180e]);}}});}if(_0x1a3b88[_0xa6a4('0x37')]['read']){if(_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x7c')]==0x1){_0x263687['having']('`unreadMessages`\x20=\x200');}else{_0x263687['having'](_0xa6a4('0x7d'));}}if(_0x1a3b88[_0xa6a4('0x37')]['tag']){_0x3da966=_[_0xa6a4('0x7e')](_0x1a3b88[_0xa6a4('0x37')]['tag'])?_0x1a3b88['query'][_0xa6a4('0x7f')]:new Array(_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x7f')]);_0x3da966[_0xa6a4('0x72')](function(_0x2580e8){_0x270582['or'](_0xa6a4('0x6a'),'%,'+_0x2580e8+',%');});}if(_0x1a3b88[_0xa6a4('0x37')]['filter']){var _0x2bdcc3=_0x1a3b88['query']['filter'][_0xa6a4('0x80')]('\x5c','\x5c\x5c')['replace']('\x27\x27',_0xa6a4('0x81'));if(qs[_0xa6a4('0x82')](_0x2bdcc3)){_0x4a8f36['or'](_0xa6a4('0x83'),_0x2bdcc3+'%');}else{_0x4a8f36['or'](_0xa6a4('0x84'),qs[_0xa6a4('0x64')](_0x2bdcc3))['or'](_0xa6a4('0x85'),_0x2bdcc3+'%')['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x2bdcc3+'%');}}}_0x263687[_0xa6a4('0x74')](_0x4a8f36);_0x263687[_0xa6a4('0x86')](_0xa6a4('0x87'));var _0x377d21={'type':db[_0xa6a4('0x88')][_0xa6a4('0x89')]['SELECT'],'raw':!![]};var _0x2c3a22=_0x263687[_0xa6a4('0x8a')]();_0x2c3a22[_0xa6a4('0x41')](_0xa6a4('0x87'));_0x2c3a22['field'](_0xa6a4('0x8b'),_0xa6a4('0x8c'));if(_0x209b4f[_0xa6a4('0x3d')]){_0x209b4f[_0xa6a4('0x3d')][_0xa6a4('0x72')](function(_0x3b2873){_0x263687[_0xa6a4('0x3d')]('i.'+_0x3b2873[0x0],_0x3b2873[0x1]===_0xa6a4('0x8d')?![]:!![]);});}if(!_['isEmpty'](_0x3da966)){_0x263687['having'](_0x270582);_0x2c3a22[_0xa6a4('0x74')](_0xa6a4('0x8e'),_0x3da966);}BPromise['resolve']()['then'](function(){if(!_0x3660ab){if(_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x73')]||_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x8f')])return;_0x2c3a22[_0xa6a4('0x74')](_0xa6a4('0x90'));_0x263687[_0xa6a4('0x74')](_0xa6a4('0x90'));return;}return _0x1a3b88[_0xa6a4('0x91')][_0xa6a4('0x92')]({'attributes':['id'],'raw':!![]})[_0xa6a4('0x26')](function(_0x310804){if(_[_0xa6a4('0x71')](_0x310804)){_0x2c3a22[_0xa6a4('0x74')]('i.OpenchannelAccountId\x20IS\x20NULL');_0x263687[_0xa6a4('0x74')](_0xa6a4('0x93'));}else{_0x2c3a22['where'](_0xa6a4('0x94'),_[_0xa6a4('0x2d')](_0x310804,'id'));_0x263687[_0xa6a4('0x74')](_0xa6a4('0x94'),_[_0xa6a4('0x2d')](_0x310804,'id'));}});})[_0xa6a4('0x26')](function(){db[_0xa6a4('0x95')]['query'](_0x2c3a22[_0xa6a4('0x96')](),_0x377d21)[_0xa6a4('0x26')](function(_0x1433a6){_0x61177e['count']=_0x1433a6[_0xa6a4('0x97')];if(_0x61177e['count']===0x0)return[];return db[_0xa6a4('0x95')][_0xa6a4('0x37')](_0x3598e4[_0xa6a4('0x96')](),_0x377d21)[_0xa6a4('0x26')](function(_0x4537a0){_0x4b6706=_['keyBy'](_0x4537a0,'id');_0x377d21=_['merge'](_0x377d21,{'model':db[_0xa6a4('0x98')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x1a3b88[_0xa6a4('0x37')][_0xa6a4('0x3b')]){_0x209b4f[_0xa6a4('0x3a')][_0xa6a4('0x72')](function(_0x266fdd){_0x263687[_0xa6a4('0x41')]('i.'+_0x266fdd);});}else{_0x263687[_0xa6a4('0x41')](_0xa6a4('0x8b'),_0xa6a4('0x8c'));_0x263687[_0xa6a4('0x41')](_0xa6a4('0x99'),_0xa6a4('0x9a'));_0x263687[_0xa6a4('0x41')](_0xa6a4('0x9b'),_0xa6a4('0x9c'));_0x263687[_0xa6a4('0x41')](_0xa6a4('0x9d'));_0x263687[_0xa6a4('0x41')](_0xa6a4('0x9e'),'Contact.firstName');_0x263687[_0xa6a4('0x41')](_0xa6a4('0x9f'),'Contact.lastName');_0x263687[_0xa6a4('0x41')](_0xa6a4('0xa0'),_0xa6a4('0xa1'));_0x263687['field'](_0xa6a4('0xa2'),_0xa6a4('0xa3'));_0x263687[_0xa6a4('0x41')](_0xa6a4('0xa4'),_0xa6a4('0xa5'));_0x263687[_0xa6a4('0x41')](_0xa6a4('0xa6'),'Contact.fax');_0x263687[_0xa6a4('0x41')](_0xa6a4('0xa7'),_0xa6a4('0xa8'));_0x263687[_0xa6a4('0x41')](_0xa6a4('0xa9'),_0xa6a4('0xaa'));_0x263687[_0xa6a4('0x41')]('GROUP_CONCAT(DISTINCT\x20t.id)','TagIds');}_0x263687[_0xa6a4('0x20')](_0x209b4f[_0xa6a4('0x20')]);_0x263687[_0xa6a4('0x1f')](_0x209b4f[_0xa6a4('0x1f')]);return db[_0xa6a4('0x95')]['query'](_0x263687['toString'](),_0x377d21);})[_0xa6a4('0x26')](function(_0xc1c262){_0x326439[_0xa6a4('0x74')](_0xa6a4('0xab'),_[_0xa6a4('0x2d')](_0xc1c262,'id'));return db[_0xa6a4('0x95')][_0xa6a4('0x37')](_0x326439[_0xa6a4('0x96')](),_0x377d21)[_0xa6a4('0x26')](function(_0x4f97e9){var _0x3d0512=_[_0xa6a4('0xac')](_0x4f97e9,_0xa6a4('0xad'));var _0x1cca43=[];_0xc1c262['forEach'](function(_0xc3b8d1){_0x1cca43[_0xa6a4('0x31')](updateOpenchannelInteraction(_0xc3b8d1,_0x4b6706,_0x3d0512));});return BPromise[_0xa6a4('0xae')](_0x1cca43);});});})['then'](function(_0x385acd){_0x61177e[_0xa6a4('0xaf')]=_0x385acd;return _0x61177e;})['then'](respondWithFilteredResult(_0x5157d0,_0x209b4f));})[_0xa6a4('0xb0')](handleError(_0x5157d0,null));};exports[_0xa6a4('0xb1')]=function(_0x52e7cb,_0x4d4c66){var _0x360d9c={'raw':![],'where':{'id':_0x52e7cb[_0xa6a4('0xb2')]['id']}},_0xdf388d={};_0xdf388d[_0xa6a4('0x35')]=_[_0xa6a4('0x36')](db[_0xa6a4('0x98')][_0xa6a4('0x32')]);_0xdf388d[_0xa6a4('0x37')]=_['keys'](_0x52e7cb[_0xa6a4('0x37')]);_0xdf388d[_0xa6a4('0x38')]=_[_0xa6a4('0x39')](_0xdf388d[_0xa6a4('0x35')],_0xdf388d[_0xa6a4('0x37')]);_0x360d9c[_0xa6a4('0x3a')]=_[_0xa6a4('0x39')](_0xdf388d[_0xa6a4('0x35')],qs[_0xa6a4('0x3b')](_0x52e7cb[_0xa6a4('0x37')][_0xa6a4('0x3b')]));_0x360d9c['attributes']=_0x360d9c[_0xa6a4('0x3a')]['length']?_0x360d9c['attributes']:_0xdf388d[_0xa6a4('0x35')];if(_0x52e7cb[_0xa6a4('0x37')]['includeAll']){_0x360d9c[_0xa6a4('0xb3')]=[{'all':!![]}];}_0x360d9c=_[_0xa6a4('0xb4')]({},_0x360d9c,_0x52e7cb['options']);return db['OpenchannelInteraction'][_0xa6a4('0x5a')](_0x360d9c)[_0xa6a4('0x26')](handleEntityNotFound(_0x4d4c66,null))[_0xa6a4('0x26')](respondWithResult(_0x4d4c66,null))[_0xa6a4('0xb0')](handleError(_0x4d4c66,null));};exports[_0xa6a4('0xb5')]=function(_0x4f9cd7,_0x43c408){return db[_0xa6a4('0x98')][_0xa6a4('0xb5')](_0x4f9cd7[_0xa6a4('0xb6')],{})[_0xa6a4('0x26')](respondWithResult(_0x43c408,0xc9))[_0xa6a4('0xb0')](handleError(_0x43c408,null));};exports[_0xa6a4('0x25')]=function(_0x1c2261,_0x384bba){if(_0x1c2261['body']['id']){delete _0x1c2261['body']['id'];}return db[_0xa6a4('0x98')][_0xa6a4('0x5a')]({'where':{'id':_0x1c2261[_0xa6a4('0xb2')]['id']}})[_0xa6a4('0x26')](handleEntityNotFound(_0x384bba,null))[_0xa6a4('0x26')](saveUpdates(_0x1c2261[_0xa6a4('0xb6')],null))['then'](respondWithResult(_0x384bba,null))[_0xa6a4('0xb0')](handleError(_0x384bba,null));};exports['destroy']=function(_0x151936,_0x21f76f){return db['OpenchannelInteraction'][_0xa6a4('0x5a')]({'where':{'id':_0x151936[_0xa6a4('0xb2')]['id']}})[_0xa6a4('0x26')](handleEntityNotFound(_0x21f76f,null))[_0xa6a4('0x26')](removeEntity(_0x21f76f,null))['catch'](handleError(_0x21f76f,null));};exports['describe']=function(_0x14a768,_0x249cac){return db[_0xa6a4('0x98')][_0xa6a4('0xb7')]()[_0xa6a4('0x26')](respondWithResult(_0x249cac,null))[_0xa6a4('0xb0')](handleError(_0x249cac,null));};exports[_0xa6a4('0xb8')]=function(_0x4414a5,_0x3dcaa9,_0x42f915){return db['OpenchannelMessage'][_0xa6a4('0x5a')]({'where':{'id':_0x4414a5['params']['id']}})[_0xa6a4('0x26')](handleEntityNotFound(_0x3dcaa9,null))[_0xa6a4('0x26')](function(_0x293c29){if(_0x293c29){return _0x293c29[_0xa6a4('0xb8')](_0x4414a5[_0xa6a4('0xb6')][_0xa6a4('0xb9')],_['omit'](_0x4414a5['body'],[_0xa6a4('0xb9'),'id'])||{});}})[_0xa6a4('0x26')](respondWithResult(_0x3dcaa9,null))['catch'](handleError(_0x3dcaa9,null));};exports['getMessages']=function(_0x5c660d,_0x348fa5,_0x553aee){var _0x1e26ea={'raw':![],'where':{}};var _0x116cd0={};var _0x4fbcef={'count':0x0,'rows':[]};return db['OpenchannelInteraction'][_0xa6a4('0xba')]({'where':{'id':_0x5c660d[_0xa6a4('0xb2')]['id']}})[_0xa6a4('0x26')](handleEntityNotFound(_0x348fa5,null))[_0xa6a4('0x26')](function(_0x219eff){if(_0x219eff){_0x116cd0[_0xa6a4('0x35')]=_[_0xa6a4('0x36')](db[_0xa6a4('0xbb')][_0xa6a4('0x32')]);_0x116cd0[_0xa6a4('0x37')]=_[_0xa6a4('0x36')](_0x5c660d[_0xa6a4('0x37')]);_0x116cd0[_0xa6a4('0x38')]=_[_0xa6a4('0x39')](_0x116cd0['model'],_0x116cd0[_0xa6a4('0x37')]);_0x1e26ea['attributes']=_['intersection'](_0x116cd0[_0xa6a4('0x35')],qs['fields'](_0x5c660d[_0xa6a4('0x37')][_0xa6a4('0x3b')]));_0x1e26ea[_0xa6a4('0x3a')]=_0x1e26ea[_0xa6a4('0x3a')]['length']?_0x1e26ea[_0xa6a4('0x3a')]:_0x116cd0[_0xa6a4('0x35')];if(!_0x5c660d['query']['hasOwnProperty'](_0xa6a4('0x3c'))){_0x1e26ea[_0xa6a4('0x20')]=qs['limit'](_0x5c660d[_0xa6a4('0x37')][_0xa6a4('0x20')]);_0x1e26ea[_0xa6a4('0x1f')]=qs['offset'](_0x5c660d[_0xa6a4('0x37')][_0xa6a4('0x1f')]);}_0x1e26ea[_0xa6a4('0x3d')]=qs[_0xa6a4('0x3e')](_0x5c660d[_0xa6a4('0x37')][_0xa6a4('0x3e')]);_0x1e26ea['where']=qs[_0xa6a4('0x38')](_[_0xa6a4('0x3f')](_0x5c660d[_0xa6a4('0x37')],_0x116cd0['filters']));_0x1e26ea[_0xa6a4('0x74')][_0xa6a4('0xad')]=_0x219eff['id'];if(_0x5c660d['query'][_0xa6a4('0xbc')]){_0x1e26ea['where']=_[_0xa6a4('0xb4')](_0x1e26ea['where'],{'$or':_[_0xa6a4('0x2d')](_0x1e26ea[_0xa6a4('0x3a')],function(_0x24e476){var _0x57c8c9={};_0x57c8c9[_0x24e476]={'$like':'%'+_0x5c660d['query']['filter']+'%'};return _0x57c8c9;})});}if(_0x5c660d[_0xa6a4('0x37')][_0xa6a4('0x77')]){var _0x16be2c=_0x5c660d['query'][_0xa6a4('0x77')]['split'](',');var _0x42c169={};_0x42c169[_0x16be2c[0x0]]={'$gte':moment(_0x16be2c[0x1])[_0xa6a4('0xbd')](_0xa6a4('0xbe'))};_0x1e26ea[_0xa6a4('0x74')]=_[_0xa6a4('0xb4')](_0x1e26ea[_0xa6a4('0x74')],_0x42c169);}_0x1e26ea=_['merge']({},_0x1e26ea,_0x5c660d['options']);return db[_0xa6a4('0xbb')][_0xa6a4('0x1e')]({'where':_0x1e26ea[_0xa6a4('0x74')]})[_0xa6a4('0x26')](function(_0x5a3983){_0x4fbcef[_0xa6a4('0x1e')]=_0x5a3983;if(_0x5c660d[_0xa6a4('0x37')][_0xa6a4('0xbf')]){_0x1e26ea[_0xa6a4('0xb3')]=[{'all':!![]}];}return db[_0xa6a4('0xbb')][_0xa6a4('0xc0')](_0x1e26ea);})[_0xa6a4('0x26')](function(_0xf9a356){_0x4fbcef['rows']=_0xf9a356;return _0x4fbcef;});}})['then'](respondWithFilteredResult(_0x348fa5,_0x1e26ea))['catch'](handleError(_0x348fa5,null));};exports['addTags']=function(_0x59ca92,_0x4b64e4,_0xc07e66){return db[_0xa6a4('0x98')][_0xa6a4('0x5a')]({'where':{'id':_0x59ca92[_0xa6a4('0xb2')]['id']}})['then'](handleEntityNotFound(_0x4b64e4,null))[_0xa6a4('0x26')](function(_0x1d5473){if(_0x1d5473){return _0x1d5473[_0xa6a4('0xc1')](_0x59ca92[_0xa6a4('0xb6')][_0xa6a4('0xb9')],_[_0xa6a4('0xc2')](_0x59ca92['body'],[_0xa6a4('0xb9'),'id'])||{})['spread'](function(){return db[_0xa6a4('0xc3')]['findAll']({'attributes':['id',_0xa6a4('0x2a'),_0xa6a4('0x42')],'where':{'id':_0x59ca92[_0xa6a4('0xb6')][_0xa6a4('0xb9')]}});})[_0xa6a4('0x26')](function(_0x3d80f6){socket['emit'](_0xa6a4('0xc4'),{'id':Number(_0x59ca92['params']['id']),'tags':_0x3d80f6||[]});return{'id':Number(_0x59ca92[_0xa6a4('0xb2')]['id']),'tags':_0x3d80f6||[]};});}})['then'](respondWithResult(_0x4b64e4,null))[_0xa6a4('0xb0')](handleError(_0x4b64e4,null));};exports[_0xa6a4('0xc5')]=function(_0x3794a5,_0x376c5c,_0x56aef7){return db[_0xa6a4('0x98')][_0xa6a4('0x5a')]({'where':{'id':_0x3794a5[_0xa6a4('0xb2')]['id']}})[_0xa6a4('0x26')](handleEntityNotFound(_0x376c5c,null))[_0xa6a4('0x26')](function(_0xabaf16){if(_0xabaf16){return _0xabaf16[_0xa6a4('0xc5')](_0x3794a5[_0xa6a4('0x37')]['ids']);}})[_0xa6a4('0x26')](respondWithStatusCode(_0x376c5c,null))[_0xa6a4('0xb0')](handleError(_0x376c5c,null));};exports[_0xa6a4('0xc6')]=function(_0x5e8ba4,_0x542ae5){var _0x10b7c5=moment()[_0xa6a4('0xc7')]()[_0xa6a4('0x96')]();var _0x274a2d=path['join'](config[_0xa6a4('0xc8')],_0xa6a4('0xc9'),_0xa6a4('0xca'),_0xa6a4('0xcb'));var _0x29a037=path[_0xa6a4('0xcc')](config['root'],_0xa6a4('0xc9'),_0xa6a4('0xca'),'attachments');var _0x5a10ac=path[_0xa6a4('0xcc')](_0x274a2d,_0x10b7c5);var _0x38fec9=util[_0xa6a4('0xbd')](_0xa6a4('0xcd'),_0x5e8ba4['params']['id'],_0x10b7c5);var _0x1fcdd4=path[_0xa6a4('0xcc')](_0x274a2d,_0x38fec9);var _0x583955=[];_0x583955[_0xa6a4('0x31')]({'model':db['User'],'as':_0xa6a4('0x6c'),'attributes':['id',_0xa6a4('0x2e')],'raw':!![]});_0x583955[_0xa6a4('0x31')]({'model':db[_0xa6a4('0xce')],'as':'Contact','attributes':['id','firstName',_0xa6a4('0xcf')],'raw':!![]});if(_0x5e8ba4[_0xa6a4('0x37')]['attachments']){_0x583955['push']({'model':db[_0xa6a4('0xd0')],'as':_0xa6a4('0xd0'),'raw':!![]});}var _0x3770c6=[{'model':db[_0xa6a4('0xbb')],'as':_0xa6a4('0xd1'),'attributes':['id',_0xa6a4('0xb6'),'createdAt',_0xa6a4('0xd2'),'secret',_0xa6a4('0x7c')],'include':_0x583955}];_0x3770c6[_0xa6a4('0x31')]({'model':db['OpenchannelAccount'],'as':'Account','attributes':['id',_0xa6a4('0x2a')]});_0x3770c6['push']({'model':db[_0xa6a4('0x6c')],'as':_0xa6a4('0xd3'),'attributes':['id','fullname']});return db[_0xa6a4('0x98')][_0xa6a4('0x5a')]({'where':{'id':_0x5e8ba4[_0xa6a4('0xb2')]['id']},'include':_0x3770c6})[_0xa6a4('0x26')](handleEntityNotFound(_0x542ae5,null))[_0xa6a4('0x26')](function(_0x53a7ac){if(_0x53a7ac){var _0x219a0a=_0x53a7ac[_0xa6a4('0xd4')]({'plain':!![]});fs[_0xa6a4('0xd5')](_0x5a10ac);var _0x2eb875={'format':'A4','border':_0xa6a4('0xd6'),'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
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'}},'footer':{'height':_0xa6a4('0xd7'),'contents':{'default':util[_0xa6a4('0xbd')](_0xa6a4('0xd8'),util[_0xa6a4('0xbd')](_0xa6a4('0xd9'),_0xa6a4('0xda'),_0x219a0a['id']),moment()['format'](_0xa6a4('0xdb'))['toString']())}}};var _0x3494d2={'channel':_0xa6a4('0xda'),'account':_0x219a0a[_0xa6a4('0xdc')]['name'],'agent':_0x219a0a['Owner']?_0x219a0a[_0xa6a4('0xd3')][_0xa6a4('0x2e')]:_0xa6a4('0xdd'),'createdAt':moment(_0x219a0a['createdAt'])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0xa6a4('0x96')](),'closedAt':_0x219a0a[_0xa6a4('0xde')]?moment(_0x219a0a[_0xa6a4('0xdf')])[_0xa6a4('0xbd')]('YYYY-MM-DD\x20HH:mm:ss')[_0xa6a4('0x96')]():'','disposition':_0x219a0a[_0xa6a4('0xe0')],'visibility':_0x219a0a[_0xa6a4('0xe1')]?_0xa6a4('0xe2'):_0xa6a4('0xe3'),'messages':_(_0x219a0a[_0xa6a4('0xd1')])[_0xa6a4('0xbc')]({'secret':![]})['map'](function(_0x46a4e4){if(_0x46a4e4[_0xa6a4('0xd0')]){var _0x24b683=path[_0xa6a4('0xcc')](_0x29a037,_0x46a4e4[_0xa6a4('0xd0')]['basename']);if(fs[_0xa6a4('0xe4')](_0x24b683)){fs[_0xa6a4('0xe5')](_0x24b683)[_0xa6a4('0xe6')](fs[_0xa6a4('0xe7')](path['join'](_0x5a10ac,_0x46a4e4[_0xa6a4('0xd0')][_0xa6a4('0xe8')])));}}return{'date':moment(_0x46a4e4[_0xa6a4('0x75')])[_0xa6a4('0xbd')]('YYYY-MM-DD\x20HH:mm:ss')[_0xa6a4('0x96')](),'sender':_0x46a4e4[_0xa6a4('0xd2')]===_0xa6a4('0xe9')?_0x46a4e4[_0xa6a4('0x6c')]?_0x46a4e4[_0xa6a4('0x6c')][_0xa6a4('0x2e')]:_0xa6a4('0xea'):_0x46a4e4[_0xa6a4('0x5f')]['firstName']+(_0x46a4e4['Contact'][_0xa6a4('0xcf')]?'\x20'+_0x46a4e4[_0xa6a4('0x5f')]['lastName']:''),'body':_0x46a4e4[_0xa6a4('0xd0')]?_0x46a4e4['Attachment'][_0xa6a4('0xe8')]:_0x46a4e4[_0xa6a4('0xb6')],'direction':_0x46a4e4[_0xa6a4('0xd2')]===_0xa6a4('0xe9')?'A':'C','secret':_0x46a4e4['secret'],'read':_0x46a4e4['read'],'attachment':_0x46a4e4[_0xa6a4('0xd0')]};})['value']()};return ejs[_0xa6a4('0xeb')](path[_0xa6a4('0xcc')](config[_0xa6a4('0xc8')],'server',_0xa6a4('0xec'),'downloadInteraction.html'),{'interaction':_0x3494d2})[_0xa6a4('0x26')](function(_0x425ffb){return new BPromise(function(_0x3ef0d0,_0x5d2c03){pdf[_0xa6a4('0xb5')](_0x425ffb,_0x2eb875)[_0xa6a4('0xed')](path[_0xa6a4('0xcc')](_0x5a10ac,_0xa6a4('0xee')+_0x219a0a['id']+'-'+_0x10b7c5+'.pdf'),function(_0x12aff1,_0x225ebc){if(_0x12aff1)return _0x5d2c03(_0x12aff1);_0x3ef0d0(_0x225ebc);});});})[_0xa6a4('0x26')](function(){return new BPromise(function(_0xce72f4,_0x6eca10){zipdir(_0x5a10ac,{'saveTo':_0x1fcdd4},function(_0x21c0fc,_0xd6ba14){if(_0x21c0fc)return _0x6eca10(_0x21c0fc);return _0xce72f4(_0xd6ba14);});})[_0xa6a4('0x26')](function(){return new BPromise(function(_0x9ac4bd,_0x5e99a3){rimraf(_0x5a10ac,function(_0x51b740){if(_0x51b740)_0x5e99a3(_0x51b740);return _0x9ac4bd();});});})[_0xa6a4('0x26')](function(){return _0x542ae5[_0xa6a4('0xc6')](_0x1fcdd4,_0x38fec9,function(_0x1d3262){if(_0x1d3262){console['log'](_0xa6a4('0xef'),_0x1d3262);}else{fs[_0xa6a4('0xf0')](_0x1fcdd4);}});});});}else{return _0x542ae5[_0xa6a4('0x1a')](0xc8);}})[_0xa6a4('0xb0')](handleError(_0x542ae5,null));};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.events.js b/server/api/openchannelInteraction/openchannelInteraction.events.js
index 12ccc6c..36d52fb 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 _0xfe95=['getUsers','setDataValue','Users','map','findAll','then','unreadMessages','length','catch','hasOwnProperty','exports','events','../../mysqldb','OpenchannelInteraction','OpenchannelMessage','save','update'];(function(_0x32aa67,_0x4dfe8e){var _0x4f73c5=function(_0x495fca){while(--_0x495fca){_0x32aa67['push'](_0x32aa67['shift']());}};_0x4f73c5(++_0x4dfe8e);}(_0xfe95,0x1e7));var _0x5fe9=function(_0x1a0600,_0x41feef){_0x1a0600=_0x1a0600-0x0;var _0x734670=_0xfe95[_0x1a0600];return _0x734670;};'use strict';var EventEmitter=require(_0x5fe9('0x0'));var OpenchannelInteraction=require(_0x5fe9('0x1'))['db'][_0x5fe9('0x2')];var OpenchannelMessage=require('../../mysqldb')['db'][_0x5fe9('0x3')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x5fe9('0x4'),'afterUpdate':_0x5fe9('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5b0793){return function(_0x31ddff,_0x215479,_0x44f920){_0x31ddff[_0x5fe9('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x34673b){_0x31ddff[_0x5fe9('0x7')](_0x5fe9('0x8'),_0x34673b[_0x5fe9('0x9')](function(_0xf842fc){return{'id':_0xf842fc['id']};}));return OpenchannelMessage[_0x5fe9('0xa')]({'where':{'OpenchannelInteractionId':_0x31ddff['id'],'direction':'in','read':![]},'raw':!![]});})[_0x5fe9('0xb')](function(_0x672a5d){_0x31ddff['setDataValue'](_0x5fe9('0xc'),_0x672a5d[_0x5fe9('0xd')]);OpenchannelInteractionEvents['emit'](_0x5b0793+':'+_0x31ddff['id'],_0x31ddff);OpenchannelInteractionEvents['emit'](_0x5b0793,_0x31ddff);_0x44f920(null);})[_0x5fe9('0xe')](_0x44f920(null));};}for(var e in events){if(events[_0x5fe9('0xf')](e)){var event=events[e];OpenchannelInteraction['hook'](e,emitEvent(event));}}module[_0x5fe9('0x10')]=OpenchannelInteractionEvents;
\ No newline at end of file
+var _0x1363=['../../mysqldb','OpenchannelMessage','setMaxListeners','save','remove','getUsers','setDataValue','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','events','OpenchannelInteraction'];(function(_0x2d37f4,_0x4384b8){var _0x396225=function(_0x56e51f){while(--_0x56e51f){_0x2d37f4['push'](_0x2d37f4['shift']());}};_0x396225(++_0x4384b8);}(_0x1363,0xec));var _0x3136=function(_0x13fd84,_0x77c1b2){_0x13fd84=_0x13fd84-0x0;var _0x5680b4=_0x1363[_0x13fd84];return _0x5680b4;};'use strict';var EventEmitter=require(_0x3136('0x0'));var OpenchannelInteraction=require('../../mysqldb')['db'][_0x3136('0x1')];var OpenchannelMessage=require(_0x3136('0x2'))['db'][_0x3136('0x3')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x3136('0x4')](0x0);var events={'afterCreate':_0x3136('0x5'),'afterUpdate':'update','afterDestroy':_0x3136('0x6')};function emitEvent(_0xfb910f){return function(_0x57656a,_0x19a10c,_0x48738b){_0x57656a[_0x3136('0x7')]({'attributes':['id'],'raw':!![]})['then'](function(_0x2427d6){_0x57656a[_0x3136('0x8')]('Users',_0x2427d6[_0x3136('0x9')](function(_0x215668){return{'id':_0x215668['id']};}));return OpenchannelMessage[_0x3136('0xa')]({'where':{'OpenchannelInteractionId':_0x57656a['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x5f11d1){_0x57656a[_0x3136('0x8')](_0x3136('0xb'),_0x5f11d1[_0x3136('0xc')]);OpenchannelInteractionEvents[_0x3136('0xd')](_0xfb910f+':'+_0x57656a['id'],_0x57656a);OpenchannelInteractionEvents['emit'](_0xfb910f,_0x57656a);_0x48738b(null);})[_0x3136('0xe')](_0x48738b(null));};}for(var e in events){if(events[_0x3136('0xf')](e)){var event=events[e];OpenchannelInteraction[_0x3136('0x10')](e,emitEvent(event));}}module['exports']=OpenchannelInteractionEvents;
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.model.js b/server/api/openchannelInteraction/openchannelInteraction.model.js
index 39f9350..e794bde 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 _0x1115=['openchannel_interactions','changed','closed','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','OpenchannelInteraction'];(function(_0x33fd0f,_0x542e76){var _0x3dc8d5=function(_0x2c5d2d){while(--_0x2c5d2d){_0x33fd0f['push'](_0x33fd0f['shift']());}};_0x3dc8d5(++_0x542e76);}(_0x1115,0x1b6));var _0x5111=function(_0x421612,_0x43def4){_0x421612=_0x421612-0x0;var _0x5f1d39=_0x1115[_0x421612];return _0x5f1d39;};'use strict';var _=require('lodash');var util=require(_0x5111('0x0'));var logger=require(_0x5111('0x1'))(_0x5111('0x2'));var moment=require(_0x5111('0x3'));var BPromise=require(_0x5111('0x4'));var rp=require(_0x5111('0x5'));var fs=require('fs');var path=require(_0x5111('0x6'));var rimraf=require(_0x5111('0x7'));var config=require(_0x5111('0x8'));var attributes=require('./openchannelInteraction.attributes');module['exports']=function(_0x467c3a,_0x115ba7){return _0x467c3a['define'](_0x5111('0x9'),attributes,{'tableName':_0x5111('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x54d5ae,_0x42a3c5,_0x5e629a){if(_0x54d5ae[_0x5111('0xb')](_0x5111('0xc'))){_0x54d5ae['closedAt']=moment()['format'](_0x5111('0xd'));}_0x5e629a(null,_0x54d5ae);}}});};
\ No newline at end of file
+var _0x038b=['path','rimraf','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','changed','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','bluebird'];(function(_0x5eb546,_0x1773b7){var _0x50419d=function(_0x28aa79){while(--_0x28aa79){_0x5eb546['push'](_0x5eb546['shift']());}};_0x50419d(++_0x1773b7);}(_0x038b,0x114));var _0xb038=function(_0x3927cc,_0x558330){_0x3927cc=_0x3927cc-0x0;var _0x2cd444=_0x038b[_0x3927cc];return _0x2cd444;};'use strict';var _=require('lodash');var util=require(_0xb038('0x0'));var logger=require(_0xb038('0x1'))(_0xb038('0x2'));var moment=require('moment');var BPromise=require(_0xb038('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb038('0x4'));var rimraf=require(_0xb038('0x5'));var config=require('../../config/environment');var attributes=require(_0xb038('0x6'));module[_0xb038('0x7')]=function(_0x4fe092,_0x54e1e7){return _0x4fe092[_0xb038('0x8')](_0xb038('0x9'),attributes,{'tableName':_0xb038('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4b4085,_0x48a4d7,_0x462e8f){if(_0x4b4085[_0xb038('0xb')]('closed')){_0x4b4085['closedAt']=moment()[_0xb038('0xc')](_0xb038('0xd'));}_0x462e8f(null,_0x4b4085);}}});};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.rpc.js b/server/api/openchannelInteraction/openchannelInteraction.rpc.js
index c019e49..3691917 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 _0xccb3=['client','http','redis','defaults','socket.io-emitter','./openchannelInteraction.socket','register','request','then','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','raw','where','attributes','limit','AddTagsToOpenchannelInteraction','find','ids','omit','spread','AddTags','lodash','moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0x1f7af5,_0x5902ba){var _0x576a87=function(_0x52bec1){while(--_0x52bec1){_0x1f7af5['push'](_0x1f7af5['shift']());}};_0x576a87(++_0x5902ba);}(_0xccb3,0xca));var _0x3ccb=function(_0x3815c2,_0x1f54e3){_0x3815c2=_0x3815c2-0x0;var _0x271f88=_0xccb3[_0x3815c2];return _0x271f88;};'use strict';var _=require(_0x3ccb('0x0'));var util=require('util');var moment=require(_0x3ccb('0x1'));var BPromise=require(_0x3ccb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3ccb('0x3'))['db'];var utils=require(_0x3ccb('0x4'));var logger=require('../../config/logger')(_0x3ccb('0x5'));var config=require(_0x3ccb('0x6'));var jayson=require(_0x3ccb('0x7'));var client=jayson[_0x3ccb('0x8')][_0x3ccb('0x9')]({'port':0x232a});config[_0x3ccb('0xa')]=_[_0x3ccb('0xb')](config[_0x3ccb('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x3ccb('0xc'))(new Redis(config[_0x3ccb('0xa')]));require(_0x3ccb('0xd'))[_0x3ccb('0xe')](socket);function respondWithRpcPromise(_0x1b9dfa,_0xd713f5,_0x5ec784){return new BPromise(function(_0x386364,_0x4d5032){return client[_0x3ccb('0xf')](_0x1b9dfa,_0x5ec784)[_0x3ccb('0x10')](function(_0x1a05d1){logger['info'](_0x3ccb('0x11'),_0xd713f5,_0x3ccb('0x12'));logger[_0x3ccb('0x13')](_0x3ccb('0x14'),_0xd713f5,_0x3ccb('0x12'),JSON['stringify'](_0x1a05d1));if(_0x1a05d1[_0x3ccb('0x15')]){if(_0x1a05d1[_0x3ccb('0x15')][_0x3ccb('0x16')]===0x1f4){logger['error'](_0x3ccb('0x11'),_0xd713f5,_0x1a05d1[_0x3ccb('0x15')][_0x3ccb('0x17')]);return _0x4d5032(_0x1a05d1['error'][_0x3ccb('0x17')]);}logger['error'](_0x3ccb('0x11'),_0xd713f5,_0x1a05d1[_0x3ccb('0x15')][_0x3ccb('0x17')]);return _0x386364(_0x1a05d1[_0x3ccb('0x15')][_0x3ccb('0x17')]);}else{logger[_0x3ccb('0x18')](_0x3ccb('0x11'),_0xd713f5,'request\x20sent');_0x386364(_0x1a05d1[_0x3ccb('0x19')][_0x3ccb('0x17')]);}})[_0x3ccb('0x1a')](function(_0x323cd4){logger[_0x3ccb('0x15')](_0x3ccb('0x11'),_0xd713f5,_0x323cd4);_0x4d5032(_0x323cd4);});});}exports[_0x3ccb('0x1b')]=function(_0x458270){var _0x3a2d30=this;return new Promise(function(_0x35ce38,_0x595e67){return db[_0x3ccb('0x1c')][_0x3ccb('0x1d')](_0x458270[_0x3ccb('0x1e')],{'raw':_0x458270[_0x3ccb('0x1f')]?_0x458270[_0x3ccb('0x1f')][_0x3ccb('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x458270['options']?_0x458270['options'][_0x3ccb('0x21')]||null:null,'attributes':_0x458270[_0x3ccb('0x1f')]?_0x458270[_0x3ccb('0x1f')][_0x3ccb('0x22')]||null:null,'limit':_0x458270[_0x3ccb('0x1f')]?_0x458270[_0x3ccb('0x1f')][_0x3ccb('0x23')]||null:null})['then'](function(_0x326362){logger[_0x3ccb('0x18')](_0x3ccb('0x1b'),_0x458270);logger[_0x3ccb('0x13')](_0x3ccb('0x1b'),_0x458270,JSON['stringify'](_0x326362));_0x35ce38(_0x326362);})['catch'](function(_0x1ab47d){logger['error'](_0x3ccb('0x1b'),_0x1ab47d['message'],_0x458270);_0x595e67(_0x3a2d30['error'](0x1f4,_0x1ab47d[_0x3ccb('0x17')]));});});};exports[_0x3ccb('0x24')]=function(_0xb303a4){return new Promise(function(_0x4938ac,_0x2d042d){return db['OpenchannelInteraction'][_0x3ccb('0x25')]({'where':_0xb303a4[_0x3ccb('0x1f')]?_0xb303a4[_0x3ccb('0x1f')]['where']||null:null})[_0x3ccb('0x10')](function(_0x216792){if(_0x216792){return _0x216792['addTags'](_0xb303a4[_0x3ccb('0x1e')][_0x3ccb('0x26')],_[_0x3ccb('0x27')](_0xb303a4['body'],['ids','id'])||{});}})[_0x3ccb('0x28')](function(_0x4df1d6){logger[_0x3ccb('0x18')](_0x3ccb('0x29'),_0xb303a4);logger['debug']('AddTags',_0xb303a4,JSON['stringify'](_0x4df1d6));_0x4938ac(_0x4df1d6);})[_0x3ccb('0x1a')](function(_0x37c149){logger['error'](_0x3ccb('0x29'),_0x37c149[_0x3ccb('0x17')],_0xb303a4);_0x2d042d(_this[_0x3ccb('0x15')](0x1f4,_0x37c149['message']));});});};
\ No newline at end of file
+var _0x0823=['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','message','result','UpdateOpenchannelInteraction','OpenchannelInteraction','update','options','raw','attributes','limit','catch','addTags','body','ids','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0823,0x119));var _0x3082=function(_0xe3d4a2,_0x5dbf95){_0xe3d4a2=_0xe3d4a2-0x0;var _0x131efb=_0x0823[_0xe3d4a2];return _0x131efb;};'use strict';var _=require(_0x3082('0x0'));var util=require(_0x3082('0x1'));var moment=require(_0x3082('0x2'));var BPromise=require(_0x3082('0x3'));var rs=require(_0x3082('0x4'));var fs=require('fs');var Redis=require(_0x3082('0x5'));var db=require(_0x3082('0x6'))['db'];var utils=require(_0x3082('0x7'));var logger=require('../../config/logger')(_0x3082('0x8'));var config=require(_0x3082('0x9'));var jayson=require(_0x3082('0xa'));var client=jayson[_0x3082('0xb')][_0x3082('0xc')]({'port':0x232a});config[_0x3082('0xd')]=_['defaults'](config[_0x3082('0xd')],{'host':_0x3082('0xe'),'port':0x18eb});var socket=require(_0x3082('0xf'))(new Redis(config[_0x3082('0xd')]));require(_0x3082('0x10'))[_0x3082('0x11')](socket);function respondWithRpcPromise(_0x25991e,_0x742f86,_0x244d4a){return new BPromise(function(_0x37bc0c,_0x12df6f){return client[_0x3082('0x12')](_0x25991e,_0x244d4a)[_0x3082('0x13')](function(_0x2ddf39){logger[_0x3082('0x14')](_0x3082('0x15'),_0x742f86,_0x3082('0x16'));logger[_0x3082('0x17')](_0x3082('0x18'),_0x742f86,_0x3082('0x16'),JSON[_0x3082('0x19')](_0x2ddf39));if(_0x2ddf39[_0x3082('0x1a')]){if(_0x2ddf39['error']['code']===0x1f4){logger[_0x3082('0x1a')](_0x3082('0x15'),_0x742f86,_0x2ddf39[_0x3082('0x1a')]['message']);return _0x12df6f(_0x2ddf39[_0x3082('0x1a')][_0x3082('0x1b')]);}logger[_0x3082('0x1a')]('OpenchannelInteraction,\x20%s,\x20%s',_0x742f86,_0x2ddf39[_0x3082('0x1a')]['message']);return _0x37bc0c(_0x2ddf39[_0x3082('0x1a')][_0x3082('0x1b')]);}else{logger[_0x3082('0x14')](_0x3082('0x15'),_0x742f86,'request\x20sent');_0x37bc0c(_0x2ddf39[_0x3082('0x1c')][_0x3082('0x1b')]);}})['catch'](function(_0x3b4164){logger[_0x3082('0x1a')](_0x3082('0x15'),_0x742f86,_0x3b4164);_0x12df6f(_0x3b4164);});});}exports[_0x3082('0x1d')]=function(_0x59f2ed){var _0x25142a=this;return new Promise(function(_0x4af899,_0x212787){return db[_0x3082('0x1e')][_0x3082('0x1f')](_0x59f2ed['body'],{'raw':_0x59f2ed[_0x3082('0x20')]?_0x59f2ed[_0x3082('0x20')][_0x3082('0x21')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59f2ed[_0x3082('0x20')]?_0x59f2ed[_0x3082('0x20')]['where']||null:null,'attributes':_0x59f2ed[_0x3082('0x20')]?_0x59f2ed[_0x3082('0x20')][_0x3082('0x22')]||null:null,'limit':_0x59f2ed[_0x3082('0x20')]?_0x59f2ed[_0x3082('0x20')][_0x3082('0x23')]||null:null})[_0x3082('0x13')](function(_0x10800d){logger[_0x3082('0x14')](_0x3082('0x1d'),_0x59f2ed);logger['debug'](_0x3082('0x1d'),_0x59f2ed,JSON['stringify'](_0x10800d));_0x4af899(_0x10800d);})[_0x3082('0x24')](function(_0x4f9eaf){logger[_0x3082('0x1a')](_0x3082('0x1d'),_0x4f9eaf[_0x3082('0x1b')],_0x59f2ed);_0x212787(_0x25142a['error'](0x1f4,_0x4f9eaf[_0x3082('0x1b')]));});});};exports['AddTagsToOpenchannelInteraction']=function(_0x3b2a59){return new Promise(function(_0x52ef01,_0x3c342b){return db[_0x3082('0x1e')]['find']({'where':_0x3b2a59[_0x3082('0x20')]?_0x3b2a59[_0x3082('0x20')]['where']||null:null})[_0x3082('0x13')](function(_0x5d0021){if(_0x5d0021){return _0x5d0021[_0x3082('0x25')](_0x3b2a59[_0x3082('0x26')][_0x3082('0x27')],_['omit'](_0x3b2a59['body'],[_0x3082('0x27'),'id'])||{});}})[_0x3082('0x28')](function(_0x9d3a4b){logger[_0x3082('0x14')]('AddTags',_0x3b2a59);logger[_0x3082('0x17')](_0x3082('0x29'),_0x3b2a59,JSON[_0x3082('0x19')](_0x9d3a4b));_0x52ef01(_0x9d3a4b);})[_0x3082('0x24')](function(_0x1d3ed1){logger[_0x3082('0x1a')](_0x3082('0x29'),_0x1d3ed1['message'],_0x3b2a59);_0x3c342b(_this['error'](0x1f4,_0x1d3ed1[_0x3082('0x1b')]));});});};
\ No newline at end of file
diff --git a/server/api/openchannelInteraction/openchannelInteraction.socket.js b/server/api/openchannelInteraction/openchannelInteraction.socket.js
index 1e8da99..c7d6bcb 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 _0xfff8=['update','emit','removeListener','register','openchannelInteraction:','./openchannelInteraction.events','remove'];(function(_0x4fd4d7,_0x5ee716){var _0x5dc79c=function(_0x43b76c){while(--_0x43b76c){_0x4fd4d7['push'](_0x4fd4d7['shift']());}};_0x5dc79c(++_0x5ee716);}(_0xfff8,0x139));var _0x8fff=function(_0x5e58c8,_0x116a61){_0x5e58c8=_0x5e58c8-0x0;var _0x21cdcd=_0xfff8[_0x5e58c8];return _0x21cdcd;};'use strict';var OpenchannelInteractionEvents=require(_0x8fff('0x0'));var events=['save',_0x8fff('0x1'),_0x8fff('0x2')];function createListener(_0x55b63e,_0x5a8340){return function(_0x57a1bd){_0x5a8340[_0x8fff('0x3')](_0x55b63e,_0x57a1bd);};}function removeListener(_0x48b00b,_0x1ca5d7){return function(){OpenchannelInteractionEvents[_0x8fff('0x4')](_0x48b00b,_0x1ca5d7);};}exports[_0x8fff('0x5')]=function(_0x602290){for(var _0x88c32b=0x0,_0x77a353=events['length'];_0x88c32b<_0x77a353;_0x88c32b++){var _0x4ac867=events[_0x88c32b];var _0x23ec0f=createListener(_0x8fff('0x6')+_0x4ac867,_0x602290);OpenchannelInteractionEvents['on'](_0x4ac867,_0x23ec0f);}};
\ No newline at end of file
+var _0xffc7=['length','openchannelInteraction:','./openchannelInteraction.events','save','remove','update','emit','register'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0xffc7,0x192));var _0x7ffc=function(_0x142762,_0x5520b3){_0x142762=_0x142762-0x0;var _0x22281e=_0xffc7[_0x142762];return _0x22281e;};'use strict';var OpenchannelInteractionEvents=require(_0x7ffc('0x0'));var events=[_0x7ffc('0x1'),_0x7ffc('0x2'),_0x7ffc('0x3')];function createListener(_0x263751,_0x563381){return function(_0x239729){_0x563381[_0x7ffc('0x4')](_0x263751,_0x239729);};}function removeListener(_0x31dbaf,_0x1ffb8c){return function(){OpenchannelInteractionEvents['removeListener'](_0x31dbaf,_0x1ffb8c);};}exports[_0x7ffc('0x5')]=function(_0x109b9f){for(var _0x4c4106=0x0,_0x500531=events[_0x7ffc('0x6')];_0x4c4106<_0x500531;_0x4c4106++){var _0x35d825=events[_0x4c4106];var _0x4c4a62=createListener(_0x7ffc('0x7')+_0x35d825,_0x109b9f);OpenchannelInteractionEvents['on'](_0x35d825,_0x4c4a62);}};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/index.js b/server/api/openchannelMessage/index.js
index 5f62d2a..0288c18 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 _0x2552=['path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./openchannelMessage.controller','get','isAuthenticated','/describe','/:id','post','tracked','openchannel','openchannelmessage:create','create','put','update','/:id/accept','/:id/reject','reject','delete','exports'];(function(_0x4a59e5,_0x2c3c00){var _0x510376=function(_0x529c16){while(--_0x529c16){_0x4a59e5['push'](_0x4a59e5['shift']());}};_0x510376(++_0x2c3c00);}(_0x2552,0xc6));var _0x2255=function(_0x1670fb,_0x47c22c){_0x1670fb=_0x1670fb-0x0;var _0x5774d5=_0x2552[_0x1670fb];return _0x5774d5;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x2255('0x0'));var timeout=require(_0x2255('0x1'));var express=require(_0x2255('0x2'));var router=express['Router']();var auth=require(_0x2255('0x3'));var interaction=require(_0x2255('0x4'));var config=require('../../config/environment');var controller=require(_0x2255('0x5'));router[_0x2255('0x6')]('/',auth[_0x2255('0x7')](),controller['index']);router[_0x2255('0x6')](_0x2255('0x8'),auth[_0x2255('0x7')](),controller['describe']);router[_0x2255('0x6')](_0x2255('0x9'),auth[_0x2255('0x7')](),controller['show']);router[_0x2255('0xa')]('/',auth[_0x2255('0x7')](),interaction[_0x2255('0xb')](_0x2255('0xc'),_0x2255('0xd')),controller[_0x2255('0xe')]);router[_0x2255('0xf')](_0x2255('0x9'),auth['isAuthenticated'](),controller[_0x2255('0x10')]);router[_0x2255('0xf')](_0x2255('0x11'),auth['isAuthenticated'](),controller['accept']);router[_0x2255('0xf')](_0x2255('0x12'),auth['isAuthenticated'](),controller[_0x2255('0x13')]);router[_0x2255('0x14')](_0x2255('0x9'),auth[_0x2255('0x7')](),controller['destroy']);module[_0x2255('0x15')]=router;
\ No newline at end of file
+var _0x1dcb=['destroy','exports','util','path','connect-timeout','../../components/auth/service','../../config/environment','./openchannelMessage.controller','get','isAuthenticated','/describe','describe','/:id','show','openchannel','create','update','put','/:id/accept','accept','/:id/reject'];(function(_0x3a4564,_0x2f661c){var _0x1bafdb=function(_0x284c91){while(--_0x284c91){_0x3a4564['push'](_0x3a4564['shift']());}};_0x1bafdb(++_0x2f661c);}(_0x1dcb,0x1a6));var _0xb1dc=function(_0xb3ca6a,_0x551f45){_0xb3ca6a=_0xb3ca6a-0x0;var _0x5946c2=_0x1dcb[_0xb3ca6a];return _0x5946c2;};'use strict';var multer=require('multer');var util=require(_0xb1dc('0x0'));var path=require(_0xb1dc('0x1'));var timeout=require(_0xb1dc('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xb1dc('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xb1dc('0x4'));var controller=require(_0xb1dc('0x5'));router[_0xb1dc('0x6')]('/',auth[_0xb1dc('0x7')](),controller['index']);router[_0xb1dc('0x6')](_0xb1dc('0x8'),auth[_0xb1dc('0x7')](),controller[_0xb1dc('0x9')]);router[_0xb1dc('0x6')](_0xb1dc('0xa'),auth[_0xb1dc('0x7')](),controller[_0xb1dc('0xb')]);router['post']('/',auth['isAuthenticated'](),interaction['tracked'](_0xb1dc('0xc'),'openchannelmessage:create'),controller[_0xb1dc('0xd')]);router['put'](_0xb1dc('0xa'),auth[_0xb1dc('0x7')](),controller[_0xb1dc('0xe')]);router[_0xb1dc('0xf')](_0xb1dc('0x10'),auth[_0xb1dc('0x7')](),controller[_0xb1dc('0x11')]);router[_0xb1dc('0xf')](_0xb1dc('0x12'),auth[_0xb1dc('0x7')](),controller['reject']);router['delete'](_0xb1dc('0xa'),auth['isAuthenticated'](),controller[_0xb1dc('0x13')]);module[_0xb1dc('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.attributes.js b/server/api/openchannelMessage/openchannelMessage.attributes.js
index 2087bd8..8c6ccab 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 _0x4a58=['BOOLEAN','out','sequelize','exports','medium'];(function(_0x2c0d7b,_0x4ec918){var _0x3c769f=function(_0x13fb48){while(--_0x13fb48){_0x2c0d7b['push'](_0x2c0d7b['shift']());}};_0x3c769f(++_0x4ec918);}(_0x4a58,0x9d));var _0x84a5=function(_0x15df7f,_0x318875){_0x15df7f=_0x15df7f-0x0;var _0x2cb715=_0x4a58[_0x15df7f];return _0x2cb715;};'use strict';var Sequelize=require(_0x84a5('0x0'));module[_0x84a5('0x1')]={'body':{'type':Sequelize['TEXT'](_0x84a5('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x84a5('0x3')],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x84a5('0x4')),'defaultValue':_0x84a5('0x4'),'allowNull':![]},'readAt':{'type':Sequelize['DATE']}};
\ No newline at end of file
+var _0xf530=['BOOLEAN','ENUM','DATE','sequelize','exports','TEXT','medium'];(function(_0x4fa969,_0x5757a9){var _0x186f76=function(_0x1cfe2c){while(--_0x1cfe2c){_0x4fa969['push'](_0x4fa969['shift']());}};_0x186f76(++_0x5757a9);}(_0xf530,0xc0));var _0x0f53=function(_0x5ba5f2,_0x5dbf18){_0x5ba5f2=_0x5ba5f2-0x0;var _0x377fdb=_0xf530[_0x5ba5f2];return _0x377fdb;};'use strict';var Sequelize=require(_0x0f53('0x0'));module[_0x0f53('0x1')]={'body':{'type':Sequelize[_0x0f53('0x2')](_0x0f53('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize[_0x0f53('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x0f53('0x5')]('in','out'),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x0f53('0x6')]}};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.controller.js b/server/api/openchannelMessage/openchannelMessage.controller.js
index 8562c2c..31e1da8 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 _0xa33d=['hasOwnProperty','nolimit','limit','offset','order','where','filters','filter','merge','VIRTUAL','options','includeAll','findAll','rows','show','params','keys','include','body','catch','update','destroy','find','describe','openchannel-interactions','accept','openchannel','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','CmContact','OpenchannelInteraction','OpenchannelInteractionId','isNil','read1stAt','interaction','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','stringify','AcceptMessage','acceptMessage','interface','SIP/%s','channel','event','EventManager','acceptmessage','agent','get','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','RejectMessage','rejectMessage','rejectmessage','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','to-csv','ejs','lodash','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','defaults','socket.io-emitter','redis','./openchannelMessage.socket','client','http','test','Sequelize','request','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','status','json','count','set','Content-Range','reject','save','end','sendStatus','stack','name','send','index','map','OpenchannelMessage','rawAttributes','fieldName','type','key','model','query','intersection','fields','attributes','length'];(function(_0x23d835,_0x64e2d){var _0x25c808=function(_0x5609b1){while(--_0x5609b1){_0x23d835['push'](_0x23d835['shift']());}};_0x25c808(++_0x64e2d);}(_0xa33d,0x1a4));var _0xda33=function(_0x5d61c4,_0xac76da){_0x5d61c4=_0x5d61c4-0x0;var _0x2c49fc=_0xa33d[_0x5d61c4];return _0x2c49fc;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xda33('0x0'));var zipdir=require(_0xda33('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xda33('0x2'));var moment=require('moment');var BPromise=require(_0xda33('0x3'));var Mustache=require(_0xda33('0x4'));var util=require(_0xda33('0x5'));var path=require(_0xda33('0x6'));var sox=require('sox');var csv=require(_0xda33('0x7'));var ejs=require(_0xda33('0x8'));var fs=require('fs');var _=require(_0xda33('0x9'));var squel=require('squel');var crypto=require(_0xda33('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xda33('0xb'));var toCsv=require(_0xda33('0x7'));var querystring=require(_0xda33('0xc'));var Papa=require('papaparse');var Redis=require(_0xda33('0xd'));var authService=require(_0xda33('0xe'));var qs=require(_0xda33('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xda33('0x10'))(_0xda33('0x11'));var utils=require(_0xda33('0x12'));var config=require(_0xda33('0x13'));var db=require(_0xda33('0x14'))['db'];config['redis']=_[_0xda33('0x15')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xda33('0x16'))(new Redis(config[_0xda33('0x17')]));require(_0xda33('0x18'))['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0xda33('0x19')][_0xda33('0x1a')]({'port':0x232c});var client9002=jayson[_0xda33('0x19')][_0xda33('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x1b9784,_0x1c6552,_0x981c4f){if(_0x981c4f){var _0x26f272=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x26f272[_0xda33('0x1b')](_0x1c6552)){return _0x1b9784;}else{throw new db[(_0xda33('0x1c'))]['ValidationError']('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x1b9784;}}function respondWithRpcPromise(_0x360e16,_0x31e8f1,_0x18aa3d,_0x2c8f5){return new BPromise(function(_0x4cc13f,_0x5a2a14){var _0x3b2cd6=_0x2c8f5||client;return _0x3b2cd6[_0xda33('0x1d')](_0x360e16,_0x18aa3d)[_0xda33('0x1e')](function(_0x36f9f4){logger[_0xda33('0x1f')](_0xda33('0x20'),_0x31e8f1,_0xda33('0x21'));logger[_0xda33('0x22')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x31e8f1,_0xda33('0x21'),JSON['stringify'](_0x36f9f4));if(_0x36f9f4['error']){if(_0x36f9f4[_0xda33('0x23')][_0xda33('0x24')]===0x1f4){logger[_0xda33('0x23')]('OpenchannelMessage,\x20%s,\x20%s',_0x31e8f1,_0x36f9f4[_0xda33('0x23')][_0xda33('0x25')]);return _0x5a2a14(_0x36f9f4[_0xda33('0x23')]['message']);}logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0x31e8f1,_0x36f9f4[_0xda33('0x23')]['message']);return _0x4cc13f(_0x36f9f4[_0xda33('0x23')][_0xda33('0x25')]);}else{logger['info'](_0xda33('0x20'),_0x31e8f1,_0xda33('0x21'));_0x4cc13f(_0x36f9f4[_0xda33('0x26')][_0xda33('0x25')]);}})['catch'](function(_0x191502){logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0x31e8f1,_0x191502);_0x5a2a14(_0x191502);});});}function respondWithStatusCode(_0x2f6236,_0x35ce22){_0x35ce22=_0x35ce22||0xcc;return function(_0x4e138e){if(_0x4e138e){return _0x2f6236['sendStatus'](_0x35ce22);}return _0x2f6236['status'](_0x35ce22)['end']();};}function respondWithResult(_0x12ab7b,_0x2e9b8e){_0x2e9b8e=_0x2e9b8e||0xc8;return function(_0x2bf76a){if(_0x2bf76a){return _0x12ab7b[_0xda33('0x27')](_0x2e9b8e)[_0xda33('0x28')](_0x2bf76a);}};}function respondWithFilteredResult(_0x3c069d,_0xaf555d){return function(_0x1214cf){if(_0x1214cf){var _0x2e9050=_0x1214cf[_0xda33('0x29')],_0x5c3214=_0xaf555d['offset'],_0xb35634=_0xaf555d['offset']+_0xaf555d['limit'],_0x143909;if(_0xb35634>=_0x2e9050){_0xb35634=_0x2e9050;_0x143909=0xc8;}else{_0x143909=0xce;}_0x3c069d[_0xda33('0x27')](_0x143909);return _0x3c069d[_0xda33('0x2a')](_0xda33('0x2b'),_0x5c3214+'-'+_0xb35634+'/'+_0x2e9050)[_0xda33('0x28')](_0x1214cf);}return null;};}function patchUpdates(_0x33fc04){return function(_0x65b449){try{jsonpatch['apply'](_0x65b449,_0x33fc04,!![]);}catch(_0xf6325d){return BPromise[_0xda33('0x2c')](_0xf6325d);}return _0x65b449[_0xda33('0x2d')]();};}function saveUpdates(_0x4ca553,_0x56865d){return function(_0x7f0f2d){if(_0x7f0f2d){return _0x7f0f2d['update'](_0x4ca553)[_0xda33('0x1e')](function(_0x12cbbe){return _0x12cbbe;});}return null;};}function removeEntity(_0x2f0286,_0x3312ff){return function(_0x19b485){if(_0x19b485){return _0x19b485['destroy']()[_0xda33('0x1e')](function(){_0x2f0286[_0xda33('0x27')](0xcc)[_0xda33('0x2e')]();});}};}function handleEntityNotFound(_0xce47d0,_0x31deb5){return function(_0x221a34){if(!_0x221a34){_0xce47d0[_0xda33('0x2f')](0x194);}return _0x221a34;};}function handleError(_0x31060c,_0x280815){_0x280815=_0x280815||0x1f4;return function(_0x141f17){logger[_0xda33('0x23')](_0x141f17[_0xda33('0x30')]);if(_0x141f17['name']){delete _0x141f17[_0xda33('0x31')];}_0x31060c[_0xda33('0x27')](_0x280815)[_0xda33('0x32')](_0x141f17);};}exports[_0xda33('0x33')]=function(_0x9ea066,_0x2a53af){var _0x517004={},_0x3311b1={},_0x2268a8={'count':0x0,'rows':[]};var _0x4fc2ae=_[_0xda33('0x34')](db[_0xda33('0x35')][_0xda33('0x36')],function(_0x2244f0){return{'name':_0x2244f0[_0xda33('0x37')],'type':_0x2244f0[_0xda33('0x38')][_0xda33('0x39')]};});_0x3311b1[_0xda33('0x3a')]=_['map'](_0x4fc2ae,_0xda33('0x31'));_0x3311b1['query']=_['keys'](_0x9ea066[_0xda33('0x3b')]);_0x3311b1['filters']=_['intersection'](_0x3311b1[_0xda33('0x3a')],_0x3311b1[_0xda33('0x3b')]);_0x517004['attributes']=_[_0xda33('0x3c')](_0x3311b1[_0xda33('0x3a')],qs[_0xda33('0x3d')](_0x9ea066[_0xda33('0x3b')][_0xda33('0x3d')]));_0x517004['attributes']=_0x517004[_0xda33('0x3e')][_0xda33('0x3f')]?_0x517004[_0xda33('0x3e')]:_0x3311b1[_0xda33('0x3a')];if(!_0x9ea066[_0xda33('0x3b')][_0xda33('0x40')](_0xda33('0x41'))){_0x517004[_0xda33('0x42')]=qs['limit'](_0x9ea066[_0xda33('0x3b')]['limit']);_0x517004[_0xda33('0x43')]=qs[_0xda33('0x43')](_0x9ea066['query']['offset']);}_0x517004[_0xda33('0x44')]=qs['sort'](_0x9ea066[_0xda33('0x3b')]['sort']);_0x517004[_0xda33('0x45')]=qs['filters'](_['pick'](_0x9ea066[_0xda33('0x3b')],_0x3311b1[_0xda33('0x46')]));if(_0x9ea066[_0xda33('0x3b')][_0xda33('0x47')]){_0x517004[_0xda33('0x45')]=_[_0xda33('0x48')](_0x517004['where'],{'$or':_[_0xda33('0x34')](_0x4fc2ae,function(_0x2429f8){if(_0x2429f8[_0xda33('0x38')]!==_0xda33('0x49')){var _0x4d6824={};_0x4d6824[_0x2429f8['name']]={'$like':'%'+_0x9ea066['query'][_0xda33('0x47')]+'%'};return _0x4d6824;}})});}_0x517004=_[_0xda33('0x48')]({},_0x517004,_0x9ea066[_0xda33('0x4a')]);var _0x401faa={'where':_0x517004['where']};return db['OpenchannelMessage'][_0xda33('0x29')](_0x401faa)[_0xda33('0x1e')](function(_0x286261){_0x2268a8['count']=_0x286261;if(_0x9ea066[_0xda33('0x3b')][_0xda33('0x4b')]){_0x517004['include']=[{'all':!![]}];}return db['OpenchannelMessage'][_0xda33('0x4c')](_0x517004);})[_0xda33('0x1e')](function(_0x31355a){_0x2268a8[_0xda33('0x4d')]=_0x31355a;return _0x2268a8;})['then'](respondWithFilteredResult(_0x2a53af,_0x517004))['catch'](handleError(_0x2a53af,null));};exports[_0xda33('0x4e')]=function(_0xc5328d,_0x79b276){var _0x368904={'raw':!![],'where':{'id':_0xc5328d[_0xda33('0x4f')]['id']}},_0x329c87={};_0x329c87['model']=_[_0xda33('0x50')](db[_0xda33('0x35')][_0xda33('0x36')]);_0x329c87[_0xda33('0x3b')]=_[_0xda33('0x50')](_0xc5328d['query']);_0x329c87[_0xda33('0x46')]=_[_0xda33('0x3c')](_0x329c87[_0xda33('0x3a')],_0x329c87[_0xda33('0x3b')]);_0x368904[_0xda33('0x3e')]=_[_0xda33('0x3c')](_0x329c87[_0xda33('0x3a')],qs[_0xda33('0x3d')](_0xc5328d['query'][_0xda33('0x3d')]));_0x368904[_0xda33('0x3e')]=_0x368904[_0xda33('0x3e')][_0xda33('0x3f')]?_0x368904[_0xda33('0x3e')]:_0x329c87[_0xda33('0x3a')];if(_0xc5328d[_0xda33('0x3b')][_0xda33('0x4b')]){_0x368904[_0xda33('0x51')]=[{'all':!![]}];}_0x368904=_['merge']({},_0x368904,_0xc5328d[_0xda33('0x4a')]);return db[_0xda33('0x35')]['find'](_0x368904)[_0xda33('0x1e')](handleEntityNotFound(_0x79b276,null))[_0xda33('0x1e')](respondWithResult(_0x79b276,null))['catch'](handleError(_0x79b276,null));};exports['create']=function(_0xd83616,_0x564475){return db['OpenchannelMessage']['create'](_0xd83616[_0xda33('0x52')],{})[_0xda33('0x1e')](respondWithResult(_0x564475,0xc9))[_0xda33('0x53')](handleError(_0x564475,null));};exports[_0xda33('0x54')]=function(_0x438945,_0x45bd7f){if(_0x438945[_0xda33('0x52')]['id']){delete _0x438945['body']['id'];}return db[_0xda33('0x35')]['find']({'where':{'id':_0x438945[_0xda33('0x4f')]['id']}})['then'](handleEntityNotFound(_0x45bd7f,null))[_0xda33('0x1e')](saveUpdates(_0x438945[_0xda33('0x52')],null))[_0xda33('0x1e')](respondWithResult(_0x45bd7f,null))[_0xda33('0x53')](handleError(_0x45bd7f,null));};exports[_0xda33('0x55')]=function(_0x438ba9,_0xaf6e2a){return db['OpenchannelMessage'][_0xda33('0x56')]({'where':{'id':_0x438ba9[_0xda33('0x4f')]['id']}})[_0xda33('0x1e')](handleEntityNotFound(_0xaf6e2a,null))[_0xda33('0x1e')](removeEntity(_0xaf6e2a,null))[_0xda33('0x53')](handleError(_0xaf6e2a,null));};exports[_0xda33('0x57')]=function(_0xd50ff2,_0x4235c8){return db['OpenchannelMessage'][_0xda33('0x57')]()[_0xda33('0x1e')](respondWithResult(_0x4235c8,null))[_0xda33('0x53')](handleError(_0x4235c8,null));};var interaction_log=require(_0xda33('0x10'))(_0xda33('0x58'));exports[_0xda33('0x59')]=function(_0x4297e0,_0x5b20a2,_0x275ff2){var _0x5cb512={'channel':_0xda33('0x5a')};if(_0x4297e0[_0xda33('0x52')]['id']){delete _0x4297e0[_0xda33('0x52')]['id'];}_0x4297e0[_0xda33('0x52')][_0xda33('0x5b')]=!![];_0x4297e0[_0xda33('0x52')][_0xda33('0x5c')]=moment()[_0xda33('0x5d')](_0xda33('0x5e'));_0x4297e0[_0xda33('0x52')][_0xda33('0x5f')]=_0x4297e0[_0xda33('0x52')][_0xda33('0x5f')]||_0x4297e0['user']['id'];return db[_0xda33('0x35')][_0xda33('0x56')]({'where':{'id':_0x4297e0[_0xda33('0x4f')]['id'],'UserId':null},'include':[{'model':db[_0xda33('0x60')],'as':'Contact'}]})['then'](handleEntityNotFound(_0x5b20a2,null))[_0xda33('0x1e')](saveUpdates(_0x4297e0[_0xda33('0x52')],null))[_0xda33('0x1e')](function(_0x4ee3fa){if(_0x4ee3fa){_0x5cb512['message']=_0x4ee3fa['get']({'plain':!![]});return db[_0xda33('0x61')][_0xda33('0x56')]({'where':{'id':_0x4ee3fa[_0xda33('0x62')]}});}return null;})[_0xda33('0x1e')](handleEntityNotFound(_0x5b20a2,null))['then'](function(_0x36a1e5){if(_0x36a1e5){return _0x36a1e5['update']({'UserId':_0x4297e0[_0xda33('0x52')]['UserId'],'read1stAt':_[_0xda33('0x63')](_0x36a1e5[_0xda33('0x64')])?moment()[_0xda33('0x5d')](_0xda33('0x5e')):undefined});}return null;})['then'](function(_0x8f39d2){if(_0x8f39d2){_0x5cb512[_0xda33('0x65')]=_0x8f39d2['get']({'plain':!![]});interaction_log[_0xda33('0x1f')](_0xda33('0x66'),_0x4297e0[_0xda33('0x67')]['id'],_0x4297e0['user'][_0xda33('0x31')],_0x4297e0[_0xda33('0x67')]['role'],_0x5cb512[_0xda33('0x65')]['id'],_0x4297e0['body']?JSON[_0xda33('0x68')](_0x4297e0[_0xda33('0x52')]):'null');return respondWithRpcPromise(_0xda33('0x69'),_0xda33('0x6a'),_0x5cb512);}return null;})[_0xda33('0x1e')](function(_0x114bf1){if(_0x114bf1){if(_0x4297e0[_0xda33('0x52')]['manual']){_0x5cb512[_0xda33('0x25')][_0xda33('0x6b')]=util[_0xda33('0x5d')](_0xda33('0x6c'),_0x4297e0[_0xda33('0x67')]['name']);_0x5cb512['message'][_0xda33('0x6d')]=_0x5cb512[_0xda33('0x6d')];_0x5cb512[_0xda33('0x25')][_0xda33('0x6e')]=_0xda33('0x59');return respondWithRpcPromise(_0xda33('0x6f'),_0xda33('0x6f'),{'event':_0xda33('0x70'),'message':_0x5cb512['message']},client9002)[_0xda33('0x1e')](function(){return _0x5cb512;});}return _0x5cb512;}return null;})['then'](respondWithResult(_0x5b20a2,null))[_0xda33('0x53')](handleError(_0x5b20a2,null));};var interaction_log=require('../../config/logger')(_0xda33('0x58'));exports[_0xda33('0x2c')]=function(_0x5dc428,_0x431151,_0x2c2877){var _0x57ecd6={'agent':{},'channel':_0xda33('0x5a')};if(_0x5dc428['body']['id']){delete _0x5dc428[_0xda33('0x52')]['id'];}_0x5dc428[_0xda33('0x52')][_0xda33('0x5f')]=_0x5dc428[_0xda33('0x52')][_0xda33('0x5f')]||_0x5dc428[_0xda33('0x67')]['id'];_0x57ecd6[_0xda33('0x71')]['id']=_0x5dc428[_0xda33('0x52')][_0xda33('0x5f')];return db[_0xda33('0x35')][_0xda33('0x56')]({'where':{'id':_0x5dc428[_0xda33('0x4f')]['id'],'UserId':null}})[_0xda33('0x1e')](handleEntityNotFound(_0x431151,null))['then'](function(_0x21e1df){if(_0x21e1df){_0x57ecd6[_0xda33('0x25')]=_0x21e1df[_0xda33('0x72')]({'plain':!![]});return db['OpenchannelInteraction'][_0xda33('0x56')]({'where':{'id':_0x21e1df['OpenchannelInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x431151,null))[_0xda33('0x1e')](function(_0x3dff3d){if(_0x3dff3d){_0x57ecd6[_0xda33('0x65')]=_0x3dff3d['get']({'plain':!![]});interaction_log[_0xda33('0x1f')](_0xda33('0x73'),_0x5dc428['user']['id'],_0x5dc428[_0xda33('0x67')]['name'],_0x5dc428[_0xda33('0x67')][_0xda33('0x74')],_0x57ecd6['interaction']['id'],_0x5dc428[_0xda33('0x52')]?JSON[_0xda33('0x68')](_0x5dc428[_0xda33('0x52')]):_0xda33('0x75'));return respondWithRpcPromise(_0xda33('0x76'),_0xda33('0x77'),_0x57ecd6);}return null;})['then'](function(_0x36fcc1){if(_0x36fcc1){_0x36fcc1[_0xda33('0x25')][_0xda33('0x6b')]=util[_0xda33('0x5d')](_0xda33('0x6c'),_0x5dc428[_0xda33('0x67')][_0xda33('0x31')]);_0x36fcc1[_0xda33('0x25')][_0xda33('0x6d')]=_0x57ecd6[_0xda33('0x6d')];_0x36fcc1[_0xda33('0x25')][_0xda33('0x6e')]=_0xda33('0x2c');respondWithRpcPromise('EventManager',_0xda33('0x6f'),{'event':_0xda33('0x78'),'message':_0x36fcc1[_0xda33('0x25')]},client9002);return _0x57ecd6;}return null;})[_0xda33('0x1e')](respondWithResult(_0x431151,null))[_0xda33('0x53')](handleError(_0x431151,null));};
\ No newline at end of file
+var _0xef94=['../../config/logger','api','../../config/utils','redis','defaults','socket.io-emitter','./openchannelMessage.socket','register','jayson/promise','client','Sequelize','ValidationError','request','info','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelMessage,\x20%s,\x20%s','message','status','end','json','count','offset','limit','Content-Range','save','update','then','name','send','index','map','OpenchannelMessage','rawAttributes','fieldName','type','query','intersection','model','attributes','fields','length','nolimit','order','sort','filters','filter','where','merge','options','includeAll','findAll','rows','catch','show','params','keys','include','find','create','body','destroy','describe','openchannel-interactions','accept','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','Contact','get','OpenchannelInteraction','OpenchannelInteractionId','isNil','interaction','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','AcceptMessage','acceptMessage','manual','SIP/%s','channel','event','EventManager','acceptmessage','reject','openchannel','agent','null','RejectMessage','rejectMessage','interface','rejectmessage','html-pdf','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x175efc,_0x100325){var _0xac1bf3=function(_0x11f832){while(--_0x11f832){_0x175efc['push'](_0x175efc['shift']());}};_0xac1bf3(++_0x100325);}(_0xef94,0x151));var _0x4ef9=function(_0xf8faf8,_0x27fe3f){_0xf8faf8=_0xf8faf8-0x0;var _0x5ad0ba=_0xef94[_0xf8faf8];return _0x5ad0ba;};'use strict';var pdf=require(_0x4ef9('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x4ef9('0x1'));var zipdir=require(_0x4ef9('0x2'));var jsonpatch=require(_0x4ef9('0x3'));var rp=require('request-promise');var moment=require(_0x4ef9('0x4'));var BPromise=require(_0x4ef9('0x5'));var Mustache=require(_0x4ef9('0x6'));var util=require(_0x4ef9('0x7'));var path=require(_0x4ef9('0x8'));var sox=require(_0x4ef9('0x9'));var csv=require(_0x4ef9('0xa'));var ejs=require(_0x4ef9('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x4ef9('0xc'));var jsforce=require(_0x4ef9('0xd'));var deskjs=require(_0x4ef9('0xe'));var toCsv=require(_0x4ef9('0xa'));var querystring=require('querystring');var Papa=require(_0x4ef9('0xf'));var Redis=require(_0x4ef9('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x4ef9('0x11'));var as=require(_0x4ef9('0x12'));var hardwareService=require(_0x4ef9('0x13'));var logger=require(_0x4ef9('0x14'))(_0x4ef9('0x15'));var utils=require(_0x4ef9('0x16'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x4ef9('0x17')]=_[_0x4ef9('0x18')](config[_0x4ef9('0x17')],{'host':'localhost','port':0x18eb});var socket=require(_0x4ef9('0x19'))(new Redis(config[_0x4ef9('0x17')]));require(_0x4ef9('0x1a'))[_0x4ef9('0x1b')](socket);var jayson=require(_0x4ef9('0x1c'));var client=jayson[_0x4ef9('0x1d')]['http']({'port':0x232c});var client9002=jayson[_0x4ef9('0x1d')]['http']({'port':0x232a});function checkPasswordPattern(_0x3c7aec,_0x23ae44,_0x4c85ae){if(_0x4c85ae){var _0x2e8b5d=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2e8b5d['test'](_0x23ae44)){return _0x3c7aec;}else{throw new db[(_0x4ef9('0x1e'))][(_0x4ef9('0x1f'))]('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 _0x3c7aec;}}function respondWithRpcPromise(_0x19be73,_0x3e1f75,_0x3497ec,_0x5a9306){return new BPromise(function(_0x2300a0,_0x52b939){var _0x113f88=_0x5a9306||client;return _0x113f88[_0x4ef9('0x20')](_0x19be73,_0x3497ec)['then'](function(_0x34f761){logger[_0x4ef9('0x21')]('OpenchannelMessage,\x20%s,\x20%s',_0x3e1f75,_0x4ef9('0x22'));logger[_0x4ef9('0x23')](_0x4ef9('0x24'),_0x3e1f75,_0x4ef9('0x22'),JSON[_0x4ef9('0x25')](_0x34f761));if(_0x34f761[_0x4ef9('0x26')]){if(_0x34f761[_0x4ef9('0x26')][_0x4ef9('0x27')]===0x1f4){logger[_0x4ef9('0x26')](_0x4ef9('0x28'),_0x3e1f75,_0x34f761[_0x4ef9('0x26')][_0x4ef9('0x29')]);return _0x52b939(_0x34f761[_0x4ef9('0x26')]['message']);}logger['error'](_0x4ef9('0x28'),_0x3e1f75,_0x34f761[_0x4ef9('0x26')][_0x4ef9('0x29')]);return _0x2300a0(_0x34f761[_0x4ef9('0x26')][_0x4ef9('0x29')]);}else{logger[_0x4ef9('0x21')]('OpenchannelMessage,\x20%s,\x20%s',_0x3e1f75,_0x4ef9('0x22'));_0x2300a0(_0x34f761['result'][_0x4ef9('0x29')]);}})['catch'](function(_0x2e23e7){logger[_0x4ef9('0x26')](_0x4ef9('0x28'),_0x3e1f75,_0x2e23e7);_0x52b939(_0x2e23e7);});});}function respondWithStatusCode(_0x7c3521,_0x19840e){_0x19840e=_0x19840e||0xcc;return function(_0x47ec86){if(_0x47ec86){return _0x7c3521['sendStatus'](_0x19840e);}return _0x7c3521[_0x4ef9('0x2a')](_0x19840e)[_0x4ef9('0x2b')]();};}function respondWithResult(_0x24ccc1,_0x25c8a6){_0x25c8a6=_0x25c8a6||0xc8;return function(_0x2292cc){if(_0x2292cc){return _0x24ccc1[_0x4ef9('0x2a')](_0x25c8a6)[_0x4ef9('0x2c')](_0x2292cc);}};}function respondWithFilteredResult(_0x2bfd28,_0x76ad5d){return function(_0x33e11a){if(_0x33e11a){var _0x48223e=_0x33e11a[_0x4ef9('0x2d')],_0x3c64ca=_0x76ad5d[_0x4ef9('0x2e')],_0x20b67e=_0x76ad5d[_0x4ef9('0x2e')]+_0x76ad5d[_0x4ef9('0x2f')],_0x8ff677;if(_0x20b67e>=_0x48223e){_0x20b67e=_0x48223e;_0x8ff677=0xc8;}else{_0x8ff677=0xce;}_0x2bfd28[_0x4ef9('0x2a')](_0x8ff677);return _0x2bfd28['set'](_0x4ef9('0x30'),_0x3c64ca+'-'+_0x20b67e+'/'+_0x48223e)[_0x4ef9('0x2c')](_0x33e11a);}return null;};}function patchUpdates(_0x237ca2){return function(_0xe78c5e){try{jsonpatch['apply'](_0xe78c5e,_0x237ca2,!![]);}catch(_0x332c38){return BPromise['reject'](_0x332c38);}return _0xe78c5e[_0x4ef9('0x31')]();};}function saveUpdates(_0x1dc8cc,_0x270044){return function(_0x583b34){if(_0x583b34){return _0x583b34[_0x4ef9('0x32')](_0x1dc8cc)[_0x4ef9('0x33')](function(_0x1a5ce7){return _0x1a5ce7;});}return null;};}function removeEntity(_0x352c69,_0x19d14d){return function(_0x3280f9){if(_0x3280f9){return _0x3280f9['destroy']()[_0x4ef9('0x33')](function(){_0x352c69['status'](0xcc)[_0x4ef9('0x2b')]();});}};}function handleEntityNotFound(_0x48b3d5,_0x184458){return function(_0x1a5cd7){if(!_0x1a5cd7){_0x48b3d5['sendStatus'](0x194);}return _0x1a5cd7;};}function handleError(_0x425b74,_0x215c66){_0x215c66=_0x215c66||0x1f4;return function(_0x1d2355){logger['error'](_0x1d2355['stack']);if(_0x1d2355[_0x4ef9('0x34')]){delete _0x1d2355[_0x4ef9('0x34')];}_0x425b74['status'](_0x215c66)[_0x4ef9('0x35')](_0x1d2355);};}exports[_0x4ef9('0x36')]=function(_0x2ec962,_0x2dd04e){var _0x546abb={},_0x1f24ec={},_0x47a261={'count':0x0,'rows':[]};var _0x31f88f=_[_0x4ef9('0x37')](db[_0x4ef9('0x38')][_0x4ef9('0x39')],function(_0x57c7fa){return{'name':_0x57c7fa[_0x4ef9('0x3a')],'type':_0x57c7fa[_0x4ef9('0x3b')]['key']};});_0x1f24ec['model']=_[_0x4ef9('0x37')](_0x31f88f,'name');_0x1f24ec[_0x4ef9('0x3c')]=_['keys'](_0x2ec962[_0x4ef9('0x3c')]);_0x1f24ec['filters']=_[_0x4ef9('0x3d')](_0x1f24ec[_0x4ef9('0x3e')],_0x1f24ec[_0x4ef9('0x3c')]);_0x546abb[_0x4ef9('0x3f')]=_[_0x4ef9('0x3d')](_0x1f24ec[_0x4ef9('0x3e')],qs[_0x4ef9('0x40')](_0x2ec962['query'][_0x4ef9('0x40')]));_0x546abb[_0x4ef9('0x3f')]=_0x546abb[_0x4ef9('0x3f')][_0x4ef9('0x41')]?_0x546abb['attributes']:_0x1f24ec[_0x4ef9('0x3e')];if(!_0x2ec962[_0x4ef9('0x3c')]['hasOwnProperty'](_0x4ef9('0x42'))){_0x546abb[_0x4ef9('0x2f')]=qs[_0x4ef9('0x2f')](_0x2ec962[_0x4ef9('0x3c')][_0x4ef9('0x2f')]);_0x546abb[_0x4ef9('0x2e')]=qs[_0x4ef9('0x2e')](_0x2ec962['query'][_0x4ef9('0x2e')]);}_0x546abb[_0x4ef9('0x43')]=qs['sort'](_0x2ec962[_0x4ef9('0x3c')][_0x4ef9('0x44')]);_0x546abb['where']=qs[_0x4ef9('0x45')](_['pick'](_0x2ec962['query'],_0x1f24ec[_0x4ef9('0x45')]));if(_0x2ec962['query'][_0x4ef9('0x46')]){_0x546abb[_0x4ef9('0x47')]=_[_0x4ef9('0x48')](_0x546abb[_0x4ef9('0x47')],{'$or':_[_0x4ef9('0x37')](_0x31f88f,function(_0x4b20da){if(_0x4b20da[_0x4ef9('0x3b')]!=='VIRTUAL'){var _0x6a3f4f={};_0x6a3f4f[_0x4b20da[_0x4ef9('0x34')]]={'$like':'%'+_0x2ec962['query'][_0x4ef9('0x46')]+'%'};return _0x6a3f4f;}})});}_0x546abb=_['merge']({},_0x546abb,_0x2ec962[_0x4ef9('0x49')]);var _0x11d3ea={'where':_0x546abb['where']};return db[_0x4ef9('0x38')]['count'](_0x11d3ea)[_0x4ef9('0x33')](function(_0x34a65f){_0x47a261[_0x4ef9('0x2d')]=_0x34a65f;if(_0x2ec962['query'][_0x4ef9('0x4a')]){_0x546abb['include']=[{'all':!![]}];}return db[_0x4ef9('0x38')][_0x4ef9('0x4b')](_0x546abb);})[_0x4ef9('0x33')](function(_0x21715e){_0x47a261[_0x4ef9('0x4c')]=_0x21715e;return _0x47a261;})[_0x4ef9('0x33')](respondWithFilteredResult(_0x2dd04e,_0x546abb))[_0x4ef9('0x4d')](handleError(_0x2dd04e,null));};exports[_0x4ef9('0x4e')]=function(_0x12d0d4,_0x47a2f6){var _0x60e84a={'raw':!![],'where':{'id':_0x12d0d4[_0x4ef9('0x4f')]['id']}},_0x1a0c76={};_0x1a0c76['model']=_[_0x4ef9('0x50')](db[_0x4ef9('0x38')]['rawAttributes']);_0x1a0c76[_0x4ef9('0x3c')]=_['keys'](_0x12d0d4[_0x4ef9('0x3c')]);_0x1a0c76[_0x4ef9('0x45')]=_[_0x4ef9('0x3d')](_0x1a0c76[_0x4ef9('0x3e')],_0x1a0c76['query']);_0x60e84a['attributes']=_[_0x4ef9('0x3d')](_0x1a0c76[_0x4ef9('0x3e')],qs[_0x4ef9('0x40')](_0x12d0d4['query']['fields']));_0x60e84a[_0x4ef9('0x3f')]=_0x60e84a['attributes']['length']?_0x60e84a[_0x4ef9('0x3f')]:_0x1a0c76[_0x4ef9('0x3e')];if(_0x12d0d4[_0x4ef9('0x3c')][_0x4ef9('0x4a')]){_0x60e84a[_0x4ef9('0x51')]=[{'all':!![]}];}_0x60e84a=_['merge']({},_0x60e84a,_0x12d0d4[_0x4ef9('0x49')]);return db[_0x4ef9('0x38')][_0x4ef9('0x52')](_0x60e84a)['then'](handleEntityNotFound(_0x47a2f6,null))[_0x4ef9('0x33')](respondWithResult(_0x47a2f6,null))['catch'](handleError(_0x47a2f6,null));};exports[_0x4ef9('0x53')]=function(_0x2a3ca3,_0x5d444f){return db[_0x4ef9('0x38')][_0x4ef9('0x53')](_0x2a3ca3[_0x4ef9('0x54')],{})[_0x4ef9('0x33')](respondWithResult(_0x5d444f,0xc9))['catch'](handleError(_0x5d444f,null));};exports['update']=function(_0x1ba869,_0x434df7){if(_0x1ba869[_0x4ef9('0x54')]['id']){delete _0x1ba869['body']['id'];}return db[_0x4ef9('0x38')][_0x4ef9('0x52')]({'where':{'id':_0x1ba869[_0x4ef9('0x4f')]['id']}})[_0x4ef9('0x33')](handleEntityNotFound(_0x434df7,null))['then'](saveUpdates(_0x1ba869[_0x4ef9('0x54')],null))[_0x4ef9('0x33')](respondWithResult(_0x434df7,null))[_0x4ef9('0x4d')](handleError(_0x434df7,null));};exports[_0x4ef9('0x55')]=function(_0x4af0bd,_0x56b584){return db[_0x4ef9('0x38')]['find']({'where':{'id':_0x4af0bd[_0x4ef9('0x4f')]['id']}})[_0x4ef9('0x33')](handleEntityNotFound(_0x56b584,null))[_0x4ef9('0x33')](removeEntity(_0x56b584,null))[_0x4ef9('0x4d')](handleError(_0x56b584,null));};exports[_0x4ef9('0x56')]=function(_0xa54620,_0x374a91){return db['OpenchannelMessage']['describe']()[_0x4ef9('0x33')](respondWithResult(_0x374a91,null))['catch'](handleError(_0x374a91,null));};var interaction_log=require(_0x4ef9('0x14'))(_0x4ef9('0x57'));exports[_0x4ef9('0x58')]=function(_0x477809,_0x3e6ad4,_0x21c086){var _0x29dfac={'channel':'openchannel'};if(_0x477809[_0x4ef9('0x54')]['id']){delete _0x477809[_0x4ef9('0x54')]['id'];}_0x477809[_0x4ef9('0x54')][_0x4ef9('0x59')]=!![];_0x477809[_0x4ef9('0x54')][_0x4ef9('0x5a')]=moment()[_0x4ef9('0x5b')](_0x4ef9('0x5c'));_0x477809[_0x4ef9('0x54')]['UserId']=_0x477809[_0x4ef9('0x54')][_0x4ef9('0x5d')]||_0x477809[_0x4ef9('0x5e')]['id'];return db['OpenchannelMessage'][_0x4ef9('0x52')]({'where':{'id':_0x477809[_0x4ef9('0x4f')]['id'],'UserId':null},'include':[{'model':db['CmContact'],'as':_0x4ef9('0x5f')}]})[_0x4ef9('0x33')](handleEntityNotFound(_0x3e6ad4,null))[_0x4ef9('0x33')](saveUpdates(_0x477809[_0x4ef9('0x54')],null))['then'](function(_0x2eb599){if(_0x2eb599){_0x29dfac[_0x4ef9('0x29')]=_0x2eb599[_0x4ef9('0x60')]({'plain':!![]});return db[_0x4ef9('0x61')]['find']({'where':{'id':_0x2eb599[_0x4ef9('0x62')]}});}return null;})[_0x4ef9('0x33')](handleEntityNotFound(_0x3e6ad4,null))[_0x4ef9('0x33')](function(_0x329339){if(_0x329339){return _0x329339[_0x4ef9('0x32')]({'UserId':_0x477809['body'][_0x4ef9('0x5d')],'read1stAt':_[_0x4ef9('0x63')](_0x329339['read1stAt'])?moment()[_0x4ef9('0x5b')](_0x4ef9('0x5c')):undefined});}return null;})[_0x4ef9('0x33')](function(_0x3dcd5c){if(_0x3dcd5c){_0x29dfac[_0x4ef9('0x64')]=_0x3dcd5c[_0x4ef9('0x60')]({'plain':!![]});interaction_log[_0x4ef9('0x21')](_0x4ef9('0x65'),_0x477809[_0x4ef9('0x5e')]['id'],_0x477809[_0x4ef9('0x5e')][_0x4ef9('0x34')],_0x477809[_0x4ef9('0x5e')][_0x4ef9('0x66')],_0x29dfac['interaction']['id'],_0x477809[_0x4ef9('0x54')]?JSON[_0x4ef9('0x25')](_0x477809[_0x4ef9('0x54')]):'null');return respondWithRpcPromise(_0x4ef9('0x67'),_0x4ef9('0x68'),_0x29dfac);}return null;})[_0x4ef9('0x33')](function(_0x31eb21){if(_0x31eb21){if(_0x477809['body'][_0x4ef9('0x69')]){_0x29dfac[_0x4ef9('0x29')]['interface']=util[_0x4ef9('0x5b')](_0x4ef9('0x6a'),_0x477809[_0x4ef9('0x5e')][_0x4ef9('0x34')]);_0x29dfac[_0x4ef9('0x29')][_0x4ef9('0x6b')]=_0x29dfac['channel'];_0x29dfac['message'][_0x4ef9('0x6c')]='accept';return respondWithRpcPromise(_0x4ef9('0x6d'),_0x4ef9('0x6d'),{'event':_0x4ef9('0x6e'),'message':_0x29dfac[_0x4ef9('0x29')]},client9002)[_0x4ef9('0x33')](function(){return _0x29dfac;});}return _0x29dfac;}return null;})[_0x4ef9('0x33')](respondWithResult(_0x3e6ad4,null))[_0x4ef9('0x4d')](handleError(_0x3e6ad4,null));};var interaction_log=require(_0x4ef9('0x14'))(_0x4ef9('0x57'));exports[_0x4ef9('0x6f')]=function(_0x4d4aac,_0x2b45b1,_0x3c9bc1){var _0x26054c={'agent':{},'channel':_0x4ef9('0x70')};if(_0x4d4aac[_0x4ef9('0x54')]['id']){delete _0x4d4aac[_0x4ef9('0x54')]['id'];}_0x4d4aac['body'][_0x4ef9('0x5d')]=_0x4d4aac[_0x4ef9('0x54')]['UserId']||_0x4d4aac[_0x4ef9('0x5e')]['id'];_0x26054c[_0x4ef9('0x71')]['id']=_0x4d4aac[_0x4ef9('0x54')][_0x4ef9('0x5d')];return db[_0x4ef9('0x38')][_0x4ef9('0x52')]({'where':{'id':_0x4d4aac[_0x4ef9('0x4f')]['id'],'UserId':null}})[_0x4ef9('0x33')](handleEntityNotFound(_0x2b45b1,null))['then'](function(_0x2d59ce){if(_0x2d59ce){_0x26054c[_0x4ef9('0x29')]=_0x2d59ce['get']({'plain':!![]});return db[_0x4ef9('0x61')][_0x4ef9('0x52')]({'where':{'id':_0x2d59ce['OpenchannelInteractionId']}});}return null;})[_0x4ef9('0x33')](handleEntityNotFound(_0x2b45b1,null))[_0x4ef9('0x33')](function(_0x285b89){if(_0x285b89){_0x26054c['interaction']=_0x285b89[_0x4ef9('0x60')]({'plain':!![]});interaction_log[_0x4ef9('0x21')]('[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x4d4aac[_0x4ef9('0x5e')]['id'],_0x4d4aac[_0x4ef9('0x5e')][_0x4ef9('0x34')],_0x4d4aac[_0x4ef9('0x5e')][_0x4ef9('0x66')],_0x26054c['interaction']['id'],_0x4d4aac[_0x4ef9('0x54')]?JSON[_0x4ef9('0x25')](_0x4d4aac['body']):_0x4ef9('0x72'));return respondWithRpcPromise(_0x4ef9('0x73'),_0x4ef9('0x74'),_0x26054c);}return null;})[_0x4ef9('0x33')](function(_0x38fa01){if(_0x38fa01){_0x38fa01[_0x4ef9('0x29')][_0x4ef9('0x75')]=util['format'](_0x4ef9('0x6a'),_0x4d4aac[_0x4ef9('0x5e')][_0x4ef9('0x34')]);_0x38fa01[_0x4ef9('0x29')][_0x4ef9('0x6b')]=_0x26054c[_0x4ef9('0x6b')];_0x38fa01[_0x4ef9('0x29')]['event']='reject';respondWithRpcPromise(_0x4ef9('0x6d'),_0x4ef9('0x6d'),{'event':_0x4ef9('0x76'),'message':_0x38fa01[_0x4ef9('0x29')]},client9002);return _0x26054c;}return null;})[_0x4ef9('0x33')](respondWithResult(_0x2b45b1,null))['catch'](handleError(_0x2b45b1,null));};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.events.js b/server/api/openchannelMessage/openchannelMessage.events.js
index 0f3f022..2a83520 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 _0x36c9=['remove','emit','hasOwnProperty','hook','../../mysqldb','OpenchannelMessage','setMaxListeners','save','update'];(function(_0x46aff0,_0x122890){var _0x9d78cf=function(_0x3f14cb){while(--_0x3f14cb){_0x46aff0['push'](_0x46aff0['shift']());}};_0x9d78cf(++_0x122890);}(_0x36c9,0x163));var _0x936c=function(_0x57a8e8,_0x559564){_0x57a8e8=_0x57a8e8-0x0;var _0x2a365b=_0x36c9[_0x57a8e8];return _0x2a365b;};'use strict';var EventEmitter=require('events');var OpenchannelMessage=require(_0x936c('0x0'))['db'][_0x936c('0x1')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0x936c('0x2')](0x0);var events={'afterCreate':_0x936c('0x3'),'afterUpdate':_0x936c('0x4'),'afterDestroy':_0x936c('0x5')};function emitEvent(_0x5eb345){return function(_0x5d0c7a,_0x59add7,_0x13eba9){OpenchannelMessageEvents['emit'](_0x5eb345+':'+_0x5d0c7a['id'],_0x5d0c7a);OpenchannelMessageEvents[_0x936c('0x6')](_0x5eb345,_0x5d0c7a);_0x13eba9(null);};}for(var e in events){if(events[_0x936c('0x7')](e)){var event=events[e];OpenchannelMessage[_0x936c('0x8')](e,emitEvent(event));}}module['exports']=OpenchannelMessageEvents;
\ No newline at end of file
+var _0x7fb0=['exports','events','../../mysqldb','save','remove','emit','hook'];(function(_0x1029c4,_0x5beaab){var _0x505371=function(_0xd33d47){while(--_0xd33d47){_0x1029c4['push'](_0x1029c4['shift']());}};_0x505371(++_0x5beaab);}(_0x7fb0,0x189));var _0x07fb=function(_0x3f3b41,_0x41d7c4){_0x3f3b41=_0x3f3b41-0x0;var _0x50cb76=_0x7fb0[_0x3f3b41];return _0x50cb76;};'use strict';var EventEmitter=require(_0x07fb('0x0'));var OpenchannelMessage=require(_0x07fb('0x1'))['db']['OpenchannelMessage'];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x07fb('0x2'),'afterUpdate':'update','afterDestroy':_0x07fb('0x3')};function emitEvent(_0x5e19fc){return function(_0x35ef83,_0x1eb5ef,_0x46fb08){OpenchannelMessageEvents['emit'](_0x5e19fc+':'+_0x35ef83['id'],_0x35ef83);OpenchannelMessageEvents[_0x07fb('0x4')](_0x5e19fc,_0x35ef83);_0x46fb08(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelMessage[_0x07fb('0x5')](e,emitEvent(event));}}module[_0x07fb('0x6')]=OpenchannelMessageEvents;
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.model.js b/server/api/openchannelMessage/openchannelMessage.model.js
index 4076a12..883eb1b 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 _0xd8bf=['replyUri','method','POST','body','threadId','finally','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./openchannelMessage.attributes','exports','define','OpenchannelMessage','openchannel_messages','FULLTEXT','models','get','direction','toLowerCase','secret','isNil','UserId','OpenchannelInteraction','OpenchannelInteractionId','then','update','createdAt','catch','error','describe','OpenchannelAccount','find','OpenchannelAccountId','CmContact','Contact','keys','info','OpenchannelMessage,\x20%s,\x20%s','afterCreate','format','Forwarding\x20message\x20%d\x20to\x20%s','Interactions','Interaction'];(function(_0x32a3f2,_0x2f3f17){var _0x118c65=function(_0x1fa1a1){while(--_0x1fa1a1){_0x32a3f2['push'](_0x32a3f2['shift']());}};_0x118c65(++_0x2f3f17);}(_0xd8bf,0x18f));var _0xfd8b=function(_0x3d7522,_0x3a360e){_0x3d7522=_0x3d7522-0x0;var _0x395008=_0xd8bf[_0x3d7522];return _0x395008;};'use strict';var _=require('lodash');var util=require(_0xfd8b('0x0'));var logger=require(_0xfd8b('0x1'))(_0xfd8b('0x2'));var moment=require(_0xfd8b('0x3'));var BPromise=require(_0xfd8b('0x4'));var rp=require(_0xfd8b('0x5'));var fs=require('fs');var path=require(_0xfd8b('0x6'));var rimraf=require(_0xfd8b('0x7'));var config=require('../../config/environment');var attributes=require(_0xfd8b('0x8'));module[_0xfd8b('0x9')]=function(_0x10bac0,_0x21296d){return _0x10bac0[_0xfd8b('0xa')](_0xfd8b('0xb'),attributes,{'tableName':_0xfd8b('0xc'),'paranoid':![],'indexes':[{'name':'fti_openchannel_messages','fields':['body'],'type':_0xfd8b('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1d953b,_0x5244ea,_0x319b8d){var _0x1b99ed=_0x10bac0[_0xfd8b('0xe')];var _0x3b6ccb=_0x1d953b[_0xfd8b('0xf')]({'plain':!![]});if(_0x3b6ccb[_0xfd8b('0x10')]['toLowerCase']()==='in'||_0x3b6ccb[_0xfd8b('0x10')][_0xfd8b('0x11')]()==='out'&&!_0x3b6ccb[_0xfd8b('0x12')]&&!_[_0xfd8b('0x13')](_0x3b6ccb[_0xfd8b('0x14')])){_0x1b99ed[_0xfd8b('0x15')]['findOne']({'where':{'id':_0x3b6ccb[_0xfd8b('0x16')]}})[_0xfd8b('0x17')](function(_0x267c01){if(_0x267c01){_0x267c01[_0xfd8b('0x18')]({'lastMsgAt':_0x3b6ccb[_0xfd8b('0x19')],'lastMsgDirection':_0x3b6ccb[_0xfd8b('0x10')][_0xfd8b('0x11')]()});}})[_0xfd8b('0x1a')](function(_0x1b62cf){console[_0xfd8b('0x1b')](_0x1b62cf);});}if(_0x3b6ccb['direction']==='out'&&!_0x3b6ccb[_0xfd8b('0x12')]){var _0x3a1236;_0x1b99ed['CmContact'][_0xfd8b('0x1c')]()[_0xfd8b('0x17')](function(_0x33480f){return _0x1b99ed[_0xfd8b('0x1d')][_0xfd8b('0x1e')]({'where':{'id':_0x3b6ccb[_0xfd8b('0x1f')]},'include':[{'model':_0x1b99ed['OpenchannelInteraction'],'as':'Interactions','where':{'id':_0x3b6ccb[_0xfd8b('0x16')]},'limit':0x1,'include':[{'model':_0x1b99ed[_0xfd8b('0x20')],'as':_0xfd8b('0x21'),'attributes':_[_0xfd8b('0x22')](_0x33480f)}]}]});})[_0xfd8b('0x17')](function(_0x2cbf34){_0x3a1236=_0x2cbf34['get']({'plain':!![]});if(_0x3a1236&&_0x3a1236['replyUri']){logger[_0xfd8b('0x23')](_0xfd8b('0x24'),_0xfd8b('0x25'),util[_0xfd8b('0x26')](_0xfd8b('0x27'),_0x3b6ccb['id'],_0x3a1236['replyUri']));if(_0x3a1236[_0xfd8b('0x28')]&&_0x3a1236['Interactions']['length']){_0x3b6ccb[_0xfd8b('0x29')]=_['omit'](_0x3a1236[_0xfd8b('0x28')][0x0],_0xfd8b('0x21'));_0x3b6ccb[_0xfd8b('0x21')]=_0x3a1236[_0xfd8b('0x28')][0x0][_0xfd8b('0x21')];}var _0x5244ea={'method':'POST','uri':encodeURI(_0x3a1236[_0xfd8b('0x2a')]),'json':!![],'resolveWithFullResponse':!![]};switch(_0x5244ea[_0xfd8b('0x2b')]){case'GET':_0x5244ea['qs']=_0x3b6ccb;break;case _0xfd8b('0x2c'):_0x5244ea[_0xfd8b('0x2d')]=_0x3b6ccb;break;}return rp(_0x5244ea)[_0xfd8b('0x17')](function(_0x117e1e){logger[_0xfd8b('0x23')](_0xfd8b('0x24'),_0xfd8b('0x25'),util['format']('Message\x20%d\x20forwarded\x20to\x20%s',_0x3b6ccb['id'],_0x3a1236[_0xfd8b('0x2a')]));if(_0x117e1e[_0xfd8b('0x2d')][_0xfd8b('0x2e')]&&_0x117e1e[_0xfd8b('0x2d')][_0xfd8b('0x2e')]!=_0x3b6ccb[_0xfd8b('0x29')]['threadId']){return _0x1b99ed[_0xfd8b('0x15')][_0xfd8b('0x18')]({'threadId':_0x117e1e[_0xfd8b('0x2d')][_0xfd8b('0x2e')]},{'logging':!![],'where':{'id':_0x3b6ccb[_0xfd8b('0x29')]['id']}});}else{return;}})['then'](function(){return _0x1d953b[_0xfd8b('0x18')]({'read':!![]});})[_0xfd8b('0x1a')](function(_0x33467c){logger[_0xfd8b('0x1b')](_0xfd8b('0x24'),_0xfd8b('0x25'),util['inspect'](_0x33467c,{'showHidden':![],'depth':null}));_0x319b8d();});}else{_0x319b8d();}})[_0xfd8b('0x2f')](function(){_0x319b8d();});}else{_0x319b8d();}}},'charset':'utf8mb4','collate':_0xfd8b('0x30')});};
\ No newline at end of file
+var _0xb146=['api','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','OpenchannelMessage','openchannel_messages','fti_openchannel_messages','body','FULLTEXT','models','direction','toLowerCase','secret','isNil','OpenchannelInteraction','findOne','OpenchannelInteractionId','then','update','createdAt','catch','error','out','CmContact','OpenchannelAccount','OpenchannelAccountId','Interactions','Contact','keys','get','replyUri','info','format','Forwarding\x20message\x20%d\x20to\x20%s','Interaction','omit','POST','method','GET','OpenchannelMessage,\x20%s,\x20%s','afterCreate','Message\x20%d\x20forwarded\x20to\x20%s','threadId','inspect','finally','utf8mb4','lodash','util','../../config/logger'];(function(_0x1c32eb,_0x5db92c){var _0x41f4bd=function(_0x209b40){while(--_0x209b40){_0x1c32eb['push'](_0x1c32eb['shift']());}};_0x41f4bd(++_0x5db92c);}(_0xb146,0x1da));var _0x6b14=function(_0xda12de,_0x321368){_0xda12de=_0xda12de-0x0;var _0x523c3d=_0xb146[_0xda12de];return _0x523c3d;};'use strict';var _=require(_0x6b14('0x0'));var util=require(_0x6b14('0x1'));var logger=require(_0x6b14('0x2'))(_0x6b14('0x3'));var moment=require('moment');var BPromise=require(_0x6b14('0x4'));var rp=require(_0x6b14('0x5'));var fs=require('fs');var path=require(_0x6b14('0x6'));var rimraf=require(_0x6b14('0x7'));var config=require(_0x6b14('0x8'));var attributes=require('./openchannelMessage.attributes');module[_0x6b14('0x9')]=function(_0x49fecd,_0x218fa){return _0x49fecd[_0x6b14('0xa')](_0x6b14('0xb'),attributes,{'tableName':_0x6b14('0xc'),'paranoid':![],'indexes':[{'name':_0x6b14('0xd'),'fields':[_0x6b14('0xe')],'type':_0x6b14('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0xd181bd,_0x25106d,_0x16e298){var _0x1646e9=_0x49fecd[_0x6b14('0x10')];var _0x347337=_0xd181bd['get']({'plain':!![]});if(_0x347337[_0x6b14('0x11')][_0x6b14('0x12')]()==='in'||_0x347337[_0x6b14('0x11')][_0x6b14('0x12')]()==='out'&&!_0x347337[_0x6b14('0x13')]&&!_[_0x6b14('0x14')](_0x347337['UserId'])){_0x1646e9[_0x6b14('0x15')][_0x6b14('0x16')]({'where':{'id':_0x347337[_0x6b14('0x17')]}})[_0x6b14('0x18')](function(_0x1bbe01){if(_0x1bbe01){_0x1bbe01[_0x6b14('0x19')]({'lastMsgAt':_0x347337[_0x6b14('0x1a')],'lastMsgDirection':_0x347337[_0x6b14('0x11')][_0x6b14('0x12')]()});}})[_0x6b14('0x1b')](function(_0x113d06){console[_0x6b14('0x1c')](_0x113d06);});}if(_0x347337[_0x6b14('0x11')]===_0x6b14('0x1d')&&!_0x347337[_0x6b14('0x13')]){var _0x129196;_0x1646e9[_0x6b14('0x1e')]['describe']()[_0x6b14('0x18')](function(_0x12fb98){return _0x1646e9[_0x6b14('0x1f')]['find']({'where':{'id':_0x347337[_0x6b14('0x20')]},'include':[{'model':_0x1646e9[_0x6b14('0x15')],'as':_0x6b14('0x21'),'where':{'id':_0x347337[_0x6b14('0x17')]},'limit':0x1,'include':[{'model':_0x1646e9['CmContact'],'as':_0x6b14('0x22'),'attributes':_[_0x6b14('0x23')](_0x12fb98)}]}]});})['then'](function(_0x3736a1){_0x129196=_0x3736a1[_0x6b14('0x24')]({'plain':!![]});if(_0x129196&&_0x129196[_0x6b14('0x25')]){logger[_0x6b14('0x26')]('OpenchannelMessage,\x20%s,\x20%s','afterCreate',util[_0x6b14('0x27')](_0x6b14('0x28'),_0x347337['id'],_0x129196[_0x6b14('0x25')]));if(_0x129196[_0x6b14('0x21')]&&_0x129196[_0x6b14('0x21')]['length']){_0x347337[_0x6b14('0x29')]=_[_0x6b14('0x2a')](_0x129196['Interactions'][0x0],_0x6b14('0x22'));_0x347337[_0x6b14('0x22')]=_0x129196['Interactions'][0x0]['Contact'];}var _0x25106d={'method':_0x6b14('0x2b'),'uri':encodeURI(_0x129196[_0x6b14('0x25')]),'json':!![],'resolveWithFullResponse':!![]};switch(_0x25106d[_0x6b14('0x2c')]){case _0x6b14('0x2d'):_0x25106d['qs']=_0x347337;break;case'POST':_0x25106d[_0x6b14('0xe')]=_0x347337;break;}return rp(_0x25106d)['then'](function(_0x2eb94e){logger[_0x6b14('0x26')](_0x6b14('0x2e'),_0x6b14('0x2f'),util[_0x6b14('0x27')](_0x6b14('0x30'),_0x347337['id'],_0x129196['replyUri']));if(_0x2eb94e[_0x6b14('0xe')]['threadId']&&_0x2eb94e[_0x6b14('0xe')][_0x6b14('0x31')]!=_0x347337['Interaction'][_0x6b14('0x31')]){return _0x1646e9[_0x6b14('0x15')][_0x6b14('0x19')]({'threadId':_0x2eb94e[_0x6b14('0xe')][_0x6b14('0x31')]},{'logging':!![],'where':{'id':_0x347337['Interaction']['id']}});}else{return;}})[_0x6b14('0x18')](function(){return _0xd181bd['update']({'read':!![]});})['catch'](function(_0x46b709){logger[_0x6b14('0x1c')](_0x6b14('0x2e'),'afterCreate',util[_0x6b14('0x32')](_0x46b709,{'showHidden':![],'depth':null}));_0x16e298();});}else{_0x16e298();}})[_0x6b14('0x33')](function(){_0x16e298();});}else{_0x16e298();}}},'charset':_0x6b14('0x34'),'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 7f19220..267aff9 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 _0x3a6d=['result','catch','CreateOpenchannelMessage','OpenchannelMessage','create','body','options','raw','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./openchannelMessage.socket','register','request','then','info','OpenchannelMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','OpenchannelMessage,\x20%s,\x20%s'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x3a6d,0x143));var _0xd3a6=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0x3a6d[_0x8c43de];return _0xa6591b;};'use strict';var _=require(_0xd3a6('0x0'));var util=require(_0xd3a6('0x1'));var moment=require('moment');var BPromise=require(_0xd3a6('0x2'));var rs=require(_0xd3a6('0x3'));var fs=require('fs');var Redis=require(_0xd3a6('0x4'));var db=require(_0xd3a6('0x5'))['db'];var utils=require(_0xd3a6('0x6'));var logger=require('../../config/logger')(_0xd3a6('0x7'));var config=require(_0xd3a6('0x8'));var jayson=require(_0xd3a6('0x9'));var client=jayson[_0xd3a6('0xa')][_0xd3a6('0xb')]({'port':0x232a});config[_0xd3a6('0xc')]=_['defaults'](config[_0xd3a6('0xc')],{'host':_0xd3a6('0xd'),'port':0x18eb});var socket=require(_0xd3a6('0xe'))(new Redis(config[_0xd3a6('0xc')]));require(_0xd3a6('0xf'))[_0xd3a6('0x10')](socket);function respondWithRpcPromise(_0x1dbcce,_0x4094a2,_0x1f04cd){return new BPromise(function(_0x5ab5a9,_0x172513){return client[_0xd3a6('0x11')](_0x1dbcce,_0x1f04cd)[_0xd3a6('0x12')](function(_0x225399){logger[_0xd3a6('0x13')]('OpenchannelMessage,\x20%s,\x20%s',_0x4094a2,'request\x20sent');logger['debug'](_0xd3a6('0x14'),_0x4094a2,_0xd3a6('0x15'),JSON[_0xd3a6('0x16')](_0x225399));if(_0x225399[_0xd3a6('0x17')]){if(_0x225399[_0xd3a6('0x17')][_0xd3a6('0x18')]===0x1f4){logger[_0xd3a6('0x17')]('OpenchannelMessage,\x20%s,\x20%s',_0x4094a2,_0x225399[_0xd3a6('0x17')][_0xd3a6('0x19')]);return _0x172513(_0x225399[_0xd3a6('0x17')]['message']);}logger[_0xd3a6('0x17')](_0xd3a6('0x1a'),_0x4094a2,_0x225399[_0xd3a6('0x17')]['message']);return _0x5ab5a9(_0x225399[_0xd3a6('0x17')]['message']);}else{logger['info'](_0xd3a6('0x1a'),_0x4094a2,_0xd3a6('0x15'));_0x5ab5a9(_0x225399[_0xd3a6('0x1b')][_0xd3a6('0x19')]);}})[_0xd3a6('0x1c')](function(_0x2e64d0){logger[_0xd3a6('0x17')]('OpenchannelMessage,\x20%s,\x20%s',_0x4094a2,_0x2e64d0);_0x172513(_0x2e64d0);});});}exports[_0xd3a6('0x1d')]=function(_0x4e78ec){var _0x6c6d21=this;return new Promise(function(_0x7fa2c0,_0x12f2c1){return db[_0xd3a6('0x1e')][_0xd3a6('0x1f')](_0x4e78ec[_0xd3a6('0x20')],{'raw':_0x4e78ec['options']?_0x4e78ec[_0xd3a6('0x21')][_0xd3a6('0x22')]===undefined?!![]:![]:!![]})['then'](function(_0x543a6a){logger['info']('CreateOpenchannelMessage',_0x4e78ec);logger['debug'](_0xd3a6('0x1d'),_0x4e78ec,JSON[_0xd3a6('0x16')](_0x543a6a));_0x7fa2c0(_0x543a6a);})[_0xd3a6('0x1c')](function(_0x5abd33){logger[_0xd3a6('0x17')]('CreateOpenchannelMessage',_0x5abd33[_0xd3a6('0x19')],_0x4e78ec);_0x12f2c1(_0x6c6d21[_0xd3a6('0x17')](0x1f4,_0x5abd33[_0xd3a6('0x19')]));});});};
\ No newline at end of file
+var _0x287e=['./openchannelMessage.socket','register','request','then','OpenchannelMessage,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info','result','CreateOpenchannelMessage','create','body','options','raw','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','redis','socket.io-emitter'];(function(_0x410ca2,_0x4359b7){var _0xa7b1f7=function(_0x817a13){while(--_0x817a13){_0x410ca2['push'](_0x410ca2['shift']());}};_0xa7b1f7(++_0x4359b7);}(_0x287e,0x1e3));var _0xe287=function(_0x331569,_0x42a73f){_0x331569=_0x331569-0x0;var _0x2bef37=_0x287e[_0x331569];return _0x2bef37;};'use strict';var _=require(_0xe287('0x0'));var util=require(_0xe287('0x1'));var moment=require(_0xe287('0x2'));var BPromise=require(_0xe287('0x3'));var rs=require(_0xe287('0x4'));var fs=require('fs');var Redis=require(_0xe287('0x5'));var db=require(_0xe287('0x6'))['db'];var utils=require(_0xe287('0x7'));var logger=require(_0xe287('0x8'))('rpc');var config=require(_0xe287('0x9'));var jayson=require(_0xe287('0xa'));var client=jayson['client']['http']({'port':0x232a});config[_0xe287('0xb')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xe287('0xc'))(new Redis(config[_0xe287('0xb')]));require(_0xe287('0xd'))[_0xe287('0xe')](socket);function respondWithRpcPromise(_0x1e781d,_0x3e82a2,_0x3a492a){return new BPromise(function(_0x3dddb2,_0x2690e6){return client[_0xe287('0xf')](_0x1e781d,_0x3a492a)[_0xe287('0x10')](function(_0x1c200f){logger['info'](_0xe287('0x11'),_0x3e82a2,'request\x20sent');logger[_0xe287('0x12')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x3e82a2,_0xe287('0x13'),JSON['stringify'](_0x1c200f));if(_0x1c200f[_0xe287('0x14')]){if(_0x1c200f[_0xe287('0x14')][_0xe287('0x15')]===0x1f4){logger[_0xe287('0x14')](_0xe287('0x11'),_0x3e82a2,_0x1c200f['error'][_0xe287('0x16')]);return _0x2690e6(_0x1c200f['error'][_0xe287('0x16')]);}logger[_0xe287('0x14')]('OpenchannelMessage,\x20%s,\x20%s',_0x3e82a2,_0x1c200f[_0xe287('0x14')]['message']);return _0x3dddb2(_0x1c200f['error'][_0xe287('0x16')]);}else{logger[_0xe287('0x17')](_0xe287('0x11'),_0x3e82a2,'request\x20sent');_0x3dddb2(_0x1c200f[_0xe287('0x18')]['message']);}})['catch'](function(_0x1f23df){logger[_0xe287('0x14')]('OpenchannelMessage,\x20%s,\x20%s',_0x3e82a2,_0x1f23df);_0x2690e6(_0x1f23df);});});}exports[_0xe287('0x19')]=function(_0x509877){var _0x241873=this;return new Promise(function(_0x219b2f,_0x411e16){return db['OpenchannelMessage'][_0xe287('0x1a')](_0x509877[_0xe287('0x1b')],{'raw':_0x509877[_0xe287('0x1c')]?_0x509877[_0xe287('0x1c')][_0xe287('0x1d')]===undefined?!![]:![]:!![]})[_0xe287('0x10')](function(_0x3e971a){logger[_0xe287('0x17')]('CreateOpenchannelMessage',_0x509877);logger[_0xe287('0x12')](_0xe287('0x19'),_0x509877,JSON['stringify'](_0x3e971a));_0x219b2f(_0x3e971a);})[_0xe287('0x1e')](function(_0x4da623){logger[_0xe287('0x14')](_0xe287('0x19'),_0x4da623[_0xe287('0x16')],_0x509877);_0x411e16(_0x241873['error'](0x1f4,_0x4da623['message']));});});};
\ No newline at end of file
diff --git a/server/api/openchannelMessage/openchannelMessage.socket.js b/server/api/openchannelMessage/openchannelMessage.socket.js
index 4b25961..3967502 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 _0xcb91=['remove','update','emit','removeListener','register'];(function(_0xc344dd,_0x3b733a){var _0x2160b9=function(_0x579a59){while(--_0x579a59){_0xc344dd['push'](_0xc344dd['shift']());}};_0x2160b9(++_0x3b733a);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x4d8a8f,_0x2afd4c){_0x4d8a8f=_0x4d8a8f-0x0;var _0xfc4adc=_0xcb91[_0x4d8a8f];return _0xfc4adc;};'use strict';var OpenchannelMessageEvents=require('./openchannelMessage.events');var events=['save',_0x1cb9('0x0'),_0x1cb9('0x1')];function createListener(_0x17d4ec,_0x22c4b8){return function(_0x4c37e8){_0x22c4b8[_0x1cb9('0x2')](_0x17d4ec,_0x4c37e8);};}function removeListener(_0x2c17b8,_0x545a34){return function(){OpenchannelMessageEvents[_0x1cb9('0x3')](_0x2c17b8,_0x545a34);};}exports[_0x1cb9('0x4')]=function(_0x53ffbd){for(var _0x226b69=0x0,_0x3f7deb=events['length'];_0x226b69<_0x3f7deb;_0x226b69++){var _0x38737d=events[_0x226b69];var _0x12567c=createListener('openchannelMessage:'+_0x38737d,_0x53ffbd);OpenchannelMessageEvents['on'](_0x38737d,_0x12567c);}};
\ No newline at end of file
+var _0xb43b=['./openchannelMessage.events','save','update','emit','removeListener','length','openchannelMessage:'];(function(_0x427d3a,_0x23724c){var _0xe5c521=function(_0x77b277){while(--_0x77b277){_0x427d3a['push'](_0x427d3a['shift']());}};_0xe5c521(++_0x23724c);}(_0xb43b,0x1b2));var _0xbb43=function(_0x5d2f23,_0x1152cb){_0x5d2f23=_0x5d2f23-0x0;var _0x10f629=_0xb43b[_0x5d2f23];return _0x10f629;};'use strict';var OpenchannelMessageEvents=require(_0xbb43('0x0'));var events=[_0xbb43('0x1'),'remove',_0xbb43('0x2')];function createListener(_0x1995f8,_0x22bc86){return function(_0x4cf605){_0x22bc86[_0xbb43('0x3')](_0x1995f8,_0x4cf605);};}function removeListener(_0x41aff6,_0x351254){return function(){OpenchannelMessageEvents[_0xbb43('0x4')](_0x41aff6,_0x351254);};}exports['register']=function(_0x491fb9){for(var _0x378df5=0x0,_0x553520=events[_0xbb43('0x5')];_0x378df5<_0x553520;_0x378df5++){var _0x1ccd49=events[_0x378df5];var _0x2a2f11=createListener(_0xbb43('0x6')+_0x1ccd49,_0x491fb9);OpenchannelMessageEvents['on'](_0x1ccd49,_0x2a2f11);}};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/index.js b/server/api/openchannelQueue/index.js
index c803aef..45a8dc6 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 _0x8110=['../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','isAuthenticated','describe','/:id','show','/:id/members','getMembers','getTeams','post','create','/:id/teams','addAgents','update','delete','destroy','removeTeams','removeAgents','exports','util','Router'];(function(_0x3619c8,_0x2a2856){var _0x3b5291=function(_0x14cac4){while(--_0x14cac4){_0x3619c8['push'](_0x3619c8['shift']());}};_0x3b5291(++_0x2a2856);}(_0x8110,0x185));var _0x0811=function(_0x20f22e,_0x1ed3b1){_0x20f22e=_0x20f22e-0x0;var _0x21aaf1=_0x8110[_0x20f22e];return _0x21aaf1;};'use strict';var multer=require('multer');var util=require(_0x0811('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0811('0x1')]();var auth=require('../../components/auth/service');var interaction=require(_0x0811('0x2'));var config=require(_0x0811('0x3'));var controller=require(_0x0811('0x4'));router[_0x0811('0x5')]('/',auth[_0x0811('0x6')](),controller['index']);router[_0x0811('0x5')]('/describe',auth[_0x0811('0x6')](),controller[_0x0811('0x7')]);router[_0x0811('0x5')](_0x0811('0x8'),auth[_0x0811('0x6')](),controller[_0x0811('0x9')]);router[_0x0811('0x5')](_0x0811('0xa'),auth[_0x0811('0x6')](),controller[_0x0811('0xb')]);router[_0x0811('0x5')]('/:id/teams',auth['isAuthenticated'](),controller[_0x0811('0xc')]);router[_0x0811('0x5')]('/:id/users',auth[_0x0811('0x6')](),controller['getAgents']);router[_0x0811('0xd')]('/',auth[_0x0811('0x6')](),controller[_0x0811('0xe')]);router[_0x0811('0xd')](_0x0811('0xf'),auth['isAuthenticated'](),controller['addTeams']);router[_0x0811('0xd')]('/:id/users',auth['isAuthenticated'](),controller[_0x0811('0x10')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x0811('0x11')]);router[_0x0811('0x12')](_0x0811('0x8'),auth[_0x0811('0x6')](),controller[_0x0811('0x13')]);router['delete'](_0x0811('0xf'),auth[_0x0811('0x6')](),controller[_0x0811('0x14')]);router[_0x0811('0x12')]('/:id/users',auth['isAuthenticated'](),controller[_0x0811('0x15')]);module[_0x0811('0x16')]=router;
\ No newline at end of file
+var _0x8ba0=['update','delete','destroy','removeAgents','exports','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','put'];(function(_0x357765,_0x9d9c7){var _0xd19403=function(_0x185730){while(--_0x185730){_0x357765['push'](_0x357765['shift']());}};_0xd19403(++_0x9d9c7);}(_0x8ba0,0x1c7));var _0x08ba=function(_0x447cae,_0x4d1684){_0x447cae=_0x447cae-0x0;var _0x4870ec=_0x8ba0[_0x447cae];return _0x4870ec;};'use strict';var multer=require(_0x08ba('0x0'));var util=require(_0x08ba('0x1'));var path=require(_0x08ba('0x2'));var timeout=require(_0x08ba('0x3'));var express=require(_0x08ba('0x4'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x08ba('0x5'));var config=require(_0x08ba('0x6'));var controller=require(_0x08ba('0x7'));router[_0x08ba('0x8')]('/',auth[_0x08ba('0x9')](),controller[_0x08ba('0xa')]);router['get'](_0x08ba('0xb'),auth[_0x08ba('0x9')](),controller[_0x08ba('0xc')]);router[_0x08ba('0x8')](_0x08ba('0xd'),auth['isAuthenticated'](),controller[_0x08ba('0xe')]);router['get'](_0x08ba('0xf'),auth['isAuthenticated'](),controller[_0x08ba('0x10')]);router[_0x08ba('0x8')](_0x08ba('0x11'),auth[_0x08ba('0x9')](),controller[_0x08ba('0x12')]);router[_0x08ba('0x8')](_0x08ba('0x13'),auth[_0x08ba('0x9')](),controller[_0x08ba('0x14')]);router[_0x08ba('0x15')]('/',auth[_0x08ba('0x9')](),controller[_0x08ba('0x16')]);router['post'](_0x08ba('0x11'),auth[_0x08ba('0x9')](),controller[_0x08ba('0x17')]);router[_0x08ba('0x15')](_0x08ba('0x13'),auth[_0x08ba('0x9')](),controller['addAgents']);router[_0x08ba('0x18')](_0x08ba('0xd'),auth[_0x08ba('0x9')](),controller[_0x08ba('0x19')]);router[_0x08ba('0x1a')]('/:id',auth[_0x08ba('0x9')](),controller[_0x08ba('0x1b')]);router['delete'](_0x08ba('0x11'),auth['isAuthenticated'](),controller['removeTeams']);router[_0x08ba('0x1a')](_0x08ba('0x13'),auth[_0x08ba('0x9')](),controller[_0x08ba('0x1c')]);module[_0x08ba('0x1d')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.attributes.js b/server/api/openchannelQueue/openchannelQueue.attributes.js
index dbba34c..e4119de 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 _0x56b9=['sequelize','exports','STRING','name','INTEGER','rrmemory','roundrobin'];(function(_0x51c7dd,_0x873ea3){var _0x1b606f=function(_0x5ca977){while(--_0x5ca977){_0x51c7dd['push'](_0x51c7dd['shift']());}};_0x1b606f(++_0x873ea3);}(_0x56b9,0x196));var _0x956b=function(_0x2cba12,_0x14460a){_0x2cba12=_0x2cba12-0x0;var _0x25935a=_0x56b9[_0x2cba12];return _0x25935a;};'use strict';var Sequelize=require(_0x956b('0x0'));module[_0x956b('0x1')]={'name':{'type':Sequelize[_0x956b('0x2')],'unique':_0x956b('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x956b('0x2')]},'timeout':{'type':Sequelize[_0x956b('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x956b('0x5'),'beepall',_0x956b('0x6'))}};
\ No newline at end of file
+var _0x2525=['sequelize','exports','STRING','name','INTEGER','ENUM','rrmemory','beepall'];(function(_0x4dfd91,_0x48f645){var _0x2da8d4=function(_0x4644ae){while(--_0x4644ae){_0x4dfd91['push'](_0x4dfd91['shift']());}};_0x2da8d4(++_0x48f645);}(_0x2525,0x1f0));var _0x5252=function(_0x5b561d,_0x422b7c){_0x5b561d=_0x5b561d-0x0;var _0x431060=_0x2525[_0x5b561d];return _0x431060;};'use strict';var Sequelize=require(_0x5252('0x0'));module[_0x5252('0x1')]={'name':{'type':Sequelize[_0x5252('0x2')],'unique':_0x5252('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x5252('0x2')]},'timeout':{'type':Sequelize[_0x5252('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x5252('0x5')](_0x5252('0x6'),_0x5252('0x7'),'roundrobin')}};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.controller.js b/server/api/openchannelQueue/openchannelQueue.controller.js
index 9d53631..934b99c 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 _0xef02=['flatMap','Agents','sequelize','emit','userOpenchannelQueue:save','select','field','tq.TeamId','from','join','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','every','includes','all','union','compact','value','transaction','ids','isEmpty','forEach','userOpenchannelQueue:remove','addAgents','omit','spread','removeAgents','isArray','getAgents','html-pdf','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','sendStatus','status','end','json','offset','limit','set','apply','reject','save','then','get','OpenchannelQueues','UserProfileResource','destroy','error','stack','name','send','map','OpenchannelQueue','rawAttributes','fieldName','key','model','query','keys','filters','attributes','intersection','length','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','params','fields','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','getMembers','findOne','UserOpenchannelQueue','hasOwnProperty','OpenchannelQueueId','User','UserId','agent','openchannelPause','createdAt','format','%s/%s','SIP','updatedAt','getTeams','Team','order','nolimit','addTeams','online','voicePause','interface'];(function(_0x4af443,_0x532e5e){var _0x5b08ec=function(_0x39bc3a){while(--_0x39bc3a){_0x4af443['push'](_0x4af443['shift']());}};_0x5b08ec(++_0x532e5e);}(_0xef02,0x1bb));var _0x2ef0=function(_0x493a51,_0x45128c){_0x493a51=_0x493a51-0x0;var _0xc85756=_0xef02[_0x493a51];return _0xc85756;};'use strict';var pdf=require(_0x2ef0('0x0'));var emlformat=require(_0x2ef0('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x2ef0('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2ef0('0x3'));var moment=require(_0x2ef0('0x4'));var BPromise=require(_0x2ef0('0x5'));var Mustache=require(_0x2ef0('0x6'));var util=require(_0x2ef0('0x7'));var path=require('path');var sox=require(_0x2ef0('0x8'));var csv=require(_0x2ef0('0x9'));var ejs=require(_0x2ef0('0xa'));var fs=require('fs');var _=require(_0x2ef0('0xb'));var squel=require(_0x2ef0('0xc'));var crypto=require(_0x2ef0('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x2ef0('0xe'));var Papa=require(_0x2ef0('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x2ef0('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2ef0('0x11'))(_0x2ef0('0x12'));var utils=require(_0x2ef0('0x13'));var config=require(_0x2ef0('0x14'));var db=require('../../mysqldb')['db'];config[_0x2ef0('0x15')]=_[_0x2ef0('0x16')](config[_0x2ef0('0x15')],{'host':_0x2ef0('0x17'),'port':0x18eb});var socket=require(_0x2ef0('0x18'))(new Redis(config[_0x2ef0('0x15')]));require(_0x2ef0('0x19'))['register'](socket);function respondWithStatusCode(_0x52ef12,_0x2ebd26){_0x2ebd26=_0x2ebd26||0xcc;return function(_0x447bf3){if(_0x447bf3){return _0x52ef12[_0x2ef0('0x1a')](_0x2ebd26);}return _0x52ef12[_0x2ef0('0x1b')](_0x2ebd26)[_0x2ef0('0x1c')]();};}function respondWithResult(_0x55383c,_0xa48cfe){_0xa48cfe=_0xa48cfe||0xc8;return function(_0x4229a0){if(_0x4229a0){return _0x55383c['status'](_0xa48cfe)[_0x2ef0('0x1d')](_0x4229a0);}};}function respondWithFilteredResult(_0x132025,_0x21c676){return function(_0x3f4315){if(_0x3f4315){var _0x6d861a=_0x3f4315['count'],_0x1b6836=_0x21c676[_0x2ef0('0x1e')],_0x5a47fb=_0x21c676[_0x2ef0('0x1e')]+_0x21c676[_0x2ef0('0x1f')],_0x263aea;if(_0x5a47fb>=_0x6d861a){_0x5a47fb=_0x6d861a;_0x263aea=0xc8;}else{_0x263aea=0xce;}_0x132025[_0x2ef0('0x1b')](_0x263aea);return _0x132025[_0x2ef0('0x20')]('Content-Range',_0x1b6836+'-'+_0x5a47fb+'/'+_0x6d861a)[_0x2ef0('0x1d')](_0x3f4315);}return null;};}function patchUpdates(_0x42de06){return function(_0x11bae6){try{jsonpatch[_0x2ef0('0x21')](_0x11bae6,_0x42de06,!![]);}catch(_0x378e6d){return BPromise[_0x2ef0('0x22')](_0x378e6d);}return _0x11bae6[_0x2ef0('0x23')]();};}function saveUpdates(_0x4c4263,_0x26cb89){return function(_0x38715d){if(_0x38715d){return _0x38715d['update'](_0x4c4263)[_0x2ef0('0x24')](function(_0x38ae00){return _0x38ae00;});}return null;};}function removeEntity(_0x5531a8,_0x568bcf){return function(_0x12e5ec){if(_0x12e5ec){return _0x12e5ec['destroy']()['then'](function(){var _0x50ade4=_0x12e5ec[_0x2ef0('0x25')]({'plain':!![]});var _0x14cbfe=_0x2ef0('0x26');return db[_0x2ef0('0x27')][_0x2ef0('0x28')]({'where':{'type':_0x14cbfe,'resourceId':_0x50ade4['id']}})[_0x2ef0('0x24')](function(){return _0x12e5ec;});})[_0x2ef0('0x24')](function(){_0x5531a8[_0x2ef0('0x1b')](0xcc)[_0x2ef0('0x1c')]();});}};}function handleEntityNotFound(_0x24b4c2,_0x1670a8){return function(_0x1ef926){if(!_0x1ef926){_0x24b4c2[_0x2ef0('0x1a')](0x194);}return _0x1ef926;};}function handleError(_0x53237,_0x543a36){_0x543a36=_0x543a36||0x1f4;return function(_0x3f32aa){logger[_0x2ef0('0x29')](_0x3f32aa[_0x2ef0('0x2a')]);if(_0x3f32aa['name']){delete _0x3f32aa[_0x2ef0('0x2b')];}_0x53237[_0x2ef0('0x1b')](_0x543a36)[_0x2ef0('0x2c')](_0x3f32aa);};}exports['index']=function(_0x417232,_0x1afcb1){var _0x1a2dc1={},_0x459fd8={},_0x432ad5={'count':0x0,'rows':[]};var _0x53c048=_[_0x2ef0('0x2d')](db[_0x2ef0('0x2e')][_0x2ef0('0x2f')],function(_0x24684f){return{'name':_0x24684f[_0x2ef0('0x30')],'type':_0x24684f['type'][_0x2ef0('0x31')]};});_0x459fd8[_0x2ef0('0x32')]=_['map'](_0x53c048,_0x2ef0('0x2b'));_0x459fd8[_0x2ef0('0x33')]=_[_0x2ef0('0x34')](_0x417232[_0x2ef0('0x33')]);_0x459fd8[_0x2ef0('0x35')]=_['intersection'](_0x459fd8[_0x2ef0('0x32')],_0x459fd8[_0x2ef0('0x33')]);_0x1a2dc1[_0x2ef0('0x36')]=_[_0x2ef0('0x37')](_0x459fd8['model'],qs['fields'](_0x417232[_0x2ef0('0x33')]['fields']));_0x1a2dc1[_0x2ef0('0x36')]=_0x1a2dc1[_0x2ef0('0x36')][_0x2ef0('0x38')]?_0x1a2dc1['attributes']:_0x459fd8[_0x2ef0('0x32')];if(!_0x417232['query']['hasOwnProperty']('nolimit')){_0x1a2dc1[_0x2ef0('0x1f')]=qs['limit'](_0x417232[_0x2ef0('0x33')]['limit']);_0x1a2dc1['offset']=qs[_0x2ef0('0x1e')](_0x417232[_0x2ef0('0x33')]['offset']);}_0x1a2dc1['order']=qs[_0x2ef0('0x39')](_0x417232[_0x2ef0('0x33')]['sort']);_0x1a2dc1[_0x2ef0('0x3a')]=qs[_0x2ef0('0x35')](_[_0x2ef0('0x3b')](_0x417232['query'],_0x459fd8[_0x2ef0('0x35')]));if(_0x417232[_0x2ef0('0x33')][_0x2ef0('0x3c')]){_0x1a2dc1[_0x2ef0('0x3a')]=_[_0x2ef0('0x3d')](_0x1a2dc1[_0x2ef0('0x3a')],{'$or':_[_0x2ef0('0x2d')](_0x53c048,function(_0x275f0e){if(_0x275f0e['type']!==_0x2ef0('0x3e')){var _0x21265a={};_0x21265a[_0x275f0e[_0x2ef0('0x2b')]]={'$like':'%'+_0x417232[_0x2ef0('0x33')][_0x2ef0('0x3c')]+'%'};return _0x21265a;}})});}_0x1a2dc1=_['merge']({},_0x1a2dc1,_0x417232[_0x2ef0('0x3f')]);var _0x54e4ab={'where':_0x1a2dc1['where']};return db[_0x2ef0('0x2e')][_0x2ef0('0x40')](_0x54e4ab)['then'](function(_0x1817fc){_0x432ad5[_0x2ef0('0x40')]=_0x1817fc;if(_0x417232[_0x2ef0('0x33')][_0x2ef0('0x41')]){_0x1a2dc1[_0x2ef0('0x42')]=[{'all':!![]}];}return db[_0x2ef0('0x2e')][_0x2ef0('0x43')](_0x1a2dc1);})[_0x2ef0('0x24')](function(_0x4e7450){_0x432ad5[_0x2ef0('0x44')]=_0x4e7450;return _0x432ad5;})[_0x2ef0('0x24')](respondWithFilteredResult(_0x1afcb1,_0x1a2dc1))[_0x2ef0('0x45')](handleError(_0x1afcb1,null));};exports['show']=function(_0x15a9eb,_0xe3b36f){var _0x257f81={'raw':!![],'where':{'id':_0x15a9eb[_0x2ef0('0x46')]['id']}},_0x1186a4={};_0x1186a4['model']=_[_0x2ef0('0x34')](db[_0x2ef0('0x2e')][_0x2ef0('0x2f')]);_0x1186a4[_0x2ef0('0x33')]=_[_0x2ef0('0x34')](_0x15a9eb['query']);_0x1186a4[_0x2ef0('0x35')]=_[_0x2ef0('0x37')](_0x1186a4['model'],_0x1186a4['query']);_0x257f81[_0x2ef0('0x36')]=_['intersection'](_0x1186a4[_0x2ef0('0x32')],qs[_0x2ef0('0x47')](_0x15a9eb['query'][_0x2ef0('0x47')]));_0x257f81[_0x2ef0('0x36')]=_0x257f81[_0x2ef0('0x36')][_0x2ef0('0x38')]?_0x257f81['attributes']:_0x1186a4[_0x2ef0('0x32')];if(_0x15a9eb[_0x2ef0('0x33')]['includeAll']){_0x257f81[_0x2ef0('0x42')]=[{'all':!![]}];}_0x257f81=_[_0x2ef0('0x3d')]({},_0x257f81,_0x15a9eb[_0x2ef0('0x3f')]);return db['OpenchannelQueue'][_0x2ef0('0x48')](_0x257f81)['then'](handleEntityNotFound(_0xe3b36f,null))[_0x2ef0('0x24')](respondWithResult(_0xe3b36f,null))[_0x2ef0('0x45')](handleError(_0xe3b36f,null));};exports[_0x2ef0('0x49')]=function(_0x4352ac,_0x188716){return db[_0x2ef0('0x2e')][_0x2ef0('0x49')](_0x4352ac[_0x2ef0('0x4a')],{})[_0x2ef0('0x24')](function(_0xe93d2b){var _0x2224fd=_0x4352ac[_0x2ef0('0x4b')]['get']({'plain':!![]});if(!_0x2224fd)throw new Error(_0x2ef0('0x4c'));if(_0x2224fd['role']===_0x2ef0('0x4b')){var _0x262d23=_0xe93d2b[_0x2ef0('0x25')]({'plain':!![]});var _0x101bf5=_0x2ef0('0x26');return db[_0x2ef0('0x4d')][_0x2ef0('0x48')]({'where':{'name':_0x101bf5,'userProfileId':_0x2224fd[_0x2ef0('0x4e')]},'raw':!![]})[_0x2ef0('0x24')](function(_0x52e85c){if(_0x52e85c&&_0x52e85c[_0x2ef0('0x4f')]===0x0){return db[_0x2ef0('0x27')]['create']({'name':_0x262d23[_0x2ef0('0x2b')],'resourceId':_0x262d23['id'],'type':_0x52e85c[_0x2ef0('0x2b')],'sectionId':_0x52e85c['id']},{})[_0x2ef0('0x24')](function(){return _0xe93d2b;});}else{return _0xe93d2b;}})[_0x2ef0('0x45')](function(_0x11d3f2){logger[_0x2ef0('0x29')](_0x2ef0('0x50'),_0x11d3f2);throw _0x11d3f2;});}return _0xe93d2b;})[_0x2ef0('0x24')](respondWithResult(_0x188716,0xc9))[_0x2ef0('0x45')](handleError(_0x188716,null));};exports[_0x2ef0('0x51')]=function(_0x289e44,_0x20fdd1){if(_0x289e44[_0x2ef0('0x4a')]['id']){delete _0x289e44[_0x2ef0('0x4a')]['id'];}return db[_0x2ef0('0x2e')][_0x2ef0('0x48')]({'where':{'id':_0x289e44[_0x2ef0('0x46')]['id']}})[_0x2ef0('0x24')](handleEntityNotFound(_0x20fdd1,null))[_0x2ef0('0x24')](saveUpdates(_0x289e44[_0x2ef0('0x4a')],null))[_0x2ef0('0x24')](respondWithResult(_0x20fdd1,null))[_0x2ef0('0x45')](handleError(_0x20fdd1,null));};exports['destroy']=function(_0x26417b,_0x4e6908){return db[_0x2ef0('0x2e')][_0x2ef0('0x48')]({'where':{'id':_0x26417b[_0x2ef0('0x46')]['id']}})[_0x2ef0('0x24')](handleEntityNotFound(_0x4e6908,null))[_0x2ef0('0x24')](removeEntity(_0x4e6908,null))['catch'](handleError(_0x4e6908,null));};exports[_0x2ef0('0x52')]=function(_0x3d63e8,_0x488511){return db[_0x2ef0('0x2e')][_0x2ef0('0x52')]()[_0x2ef0('0x24')](respondWithResult(_0x488511,null))[_0x2ef0('0x45')](handleError(_0x488511,null));};exports[_0x2ef0('0x53')]=function(_0x3b0557,_0x130db8,_0x53a336){var _0xa0c647={'raw':!![],'where':{}},_0x54e7b2={},_0x3948e9;return db[_0x2ef0('0x2e')][_0x2ef0('0x54')]({'where':{'id':_0x3b0557[_0x2ef0('0x46')]['id']}})[_0x2ef0('0x24')](handleEntityNotFound(_0x130db8,null))[_0x2ef0('0x24')](function(_0x439ebf){if(_0x439ebf){_0x3948e9=_0x439ebf[_0x2ef0('0x25')]({'plain':!![]});_0x54e7b2[_0x2ef0('0x32')]=_[_0x2ef0('0x34')](db[_0x2ef0('0x55')][_0x2ef0('0x2f')]);_0x54e7b2[_0x2ef0('0x33')]=_[_0x2ef0('0x34')](_0x3b0557[_0x2ef0('0x33')]);_0x54e7b2['filters']=_[_0x2ef0('0x37')](_0x54e7b2[_0x2ef0('0x32')],_0x54e7b2['query']);_0xa0c647['attributes']=_[_0x2ef0('0x37')](_0x54e7b2[_0x2ef0('0x32')],qs['fields'](_0x3b0557['query'][_0x2ef0('0x47')]));_0xa0c647[_0x2ef0('0x36')]=_0xa0c647[_0x2ef0('0x36')][_0x2ef0('0x38')]?_0xa0c647['attributes']:_0x54e7b2[_0x2ef0('0x32')];if(!_0x3b0557[_0x2ef0('0x33')][_0x2ef0('0x56')]('nolimit')){_0xa0c647[_0x2ef0('0x1f')]=qs['limit'](_0x3b0557[_0x2ef0('0x33')]['limit']);_0xa0c647['offset']=qs[_0x2ef0('0x1e')](_0x3b0557['query'][_0x2ef0('0x1e')]);}_0xa0c647['order']=qs[_0x2ef0('0x39')](_0x3b0557[_0x2ef0('0x33')][_0x2ef0('0x39')]);_0xa0c647[_0x2ef0('0x3a')]=qs[_0x2ef0('0x35')](_[_0x2ef0('0x3b')](_0x3b0557[_0x2ef0('0x33')],_0x54e7b2[_0x2ef0('0x35')]));_0xa0c647[_0x2ef0('0x3a')][_0x2ef0('0x57')]=_0x439ebf['id'];if(_0x3b0557[_0x2ef0('0x33')][_0x2ef0('0x3c')]){_0xa0c647[_0x2ef0('0x3a')]=_[_0x2ef0('0x3d')](_0xa0c647['where'],{'$or':_['map'](_0xa0c647[_0x2ef0('0x36')],function(_0x18d2b9){var _0x5d705c={};_0x5d705c[_0x18d2b9]={'$like':'%'+_0x3b0557['query'][_0x2ef0('0x3c')]+'%'};return _0x5d705c;})});}_0xa0c647=_[_0x2ef0('0x3d')]({},_0xa0c647,_0x3b0557[_0x2ef0('0x3f')]);return db[_0x2ef0('0x55')]['findAll'](_0xa0c647);}})['then'](function(_0x3f97ee){if(_0x3f97ee){return db[_0x2ef0('0x58')]['findAndCountAll']({'where':{'id':_[_0x2ef0('0x2d')](_0x3f97ee,_0x2ef0('0x59')),'role':_0x2ef0('0x5a')},'attributes':['id',_0x2ef0('0x2b'),_0x2ef0('0x5b'),'updatedAt',_0x2ef0('0x5c')]});}})[_0x2ef0('0x24')](function(_0x2cf3e7){if(_0x2cf3e7){return{'count':_0x2cf3e7['count'],'rows':_[_0x2ef0('0x2d')](_0x2cf3e7['rows'],function(_0x229e35){return{'membername':_0x229e35[_0x2ef0('0x2b')],'UserId':_0x229e35['id'],'queue_name':_0x3948e9['name'],'OpenchannelQueueId':_0x3948e9['id'],'interface':util[_0x2ef0('0x5d')](_0x2ef0('0x5e'),_0x2ef0('0x5f'),_0x229e35['name']),'penalty':0x0,'paused':_0x229e35[_0x2ef0('0x5b')],'createdAt':_0x229e35['createdAt'],'updatedAt':_0x229e35[_0x2ef0('0x60')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x2ef0('0x24')](respondWithFilteredResult(_0x130db8,_0xa0c647))[_0x2ef0('0x45')](handleError(_0x130db8,null));};exports[_0x2ef0('0x61')]=function(_0x2411e1,_0x3d35f8,_0x49d485){var _0x2d0476={};var _0x46e61f={};var _0x444ec7;var _0x60b412;return db[_0x2ef0('0x2e')]['findOne']({'where':{'id':_0x2411e1[_0x2ef0('0x46')]['id']}})[_0x2ef0('0x24')](handleEntityNotFound(_0x3d35f8,null))['then'](function(_0x515f88){if(_0x515f88){_0x444ec7=_0x515f88;_0x46e61f[_0x2ef0('0x32')]=_['keys'](db[_0x2ef0('0x62')][_0x2ef0('0x2f')]);_0x46e61f[_0x2ef0('0x33')]=_['keys'](_0x2411e1[_0x2ef0('0x33')]);_0x46e61f[_0x2ef0('0x35')]=_['intersection'](_0x46e61f[_0x2ef0('0x32')],_0x46e61f['query']);_0x2d0476['attributes']=_[_0x2ef0('0x37')](_0x46e61f[_0x2ef0('0x32')],qs['fields'](_0x2411e1[_0x2ef0('0x33')][_0x2ef0('0x47')]));_0x2d0476[_0x2ef0('0x36')]=_0x2d0476[_0x2ef0('0x36')][_0x2ef0('0x38')]?_0x2d0476['attributes']:_0x46e61f[_0x2ef0('0x32')];_0x2d0476[_0x2ef0('0x63')]=qs['sort'](_0x2411e1[_0x2ef0('0x33')][_0x2ef0('0x39')]);_0x2d0476['where']=qs['filters'](_[_0x2ef0('0x3b')](_0x2411e1[_0x2ef0('0x33')],_0x46e61f[_0x2ef0('0x35')]));if(_0x2411e1[_0x2ef0('0x33')]['filter']){_0x2d0476['where']=_[_0x2ef0('0x3d')](_0x2d0476[_0x2ef0('0x3a')],{'$or':_[_0x2ef0('0x2d')](_0x2d0476['attributes'],function(_0x1dd88a){var _0x1d41f6={};_0x1d41f6[_0x1dd88a]={'$like':'%'+_0x2411e1[_0x2ef0('0x33')][_0x2ef0('0x3c')]+'%'};return _0x1d41f6;})});}_0x2d0476=_[_0x2ef0('0x3d')]({},_0x2d0476,_0x2411e1[_0x2ef0('0x3f')]);return _0x444ec7['getTeams'](_0x2d0476);}})[_0x2ef0('0x24')](function(_0x3ac46a){if(_0x3ac46a){_0x60b412=_0x3ac46a[_0x2ef0('0x38')];if(!_0x2411e1[_0x2ef0('0x33')]['hasOwnProperty'](_0x2ef0('0x64'))){_0x2d0476['limit']=qs['limit'](_0x2411e1[_0x2ef0('0x33')][_0x2ef0('0x1f')]);_0x2d0476[_0x2ef0('0x1e')]=qs[_0x2ef0('0x1e')](_0x2411e1[_0x2ef0('0x33')]['offset']);}return _0x444ec7['getTeams'](_0x2d0476);}})['then'](function(_0x3ac409){if(_0x3ac409){return _0x3ac409?{'count':_0x60b412,'rows':_0x3ac409}:null;}})['then'](respondWithResult(_0x3d35f8,null))[_0x2ef0('0x45')](handleError(_0x3d35f8,null));};exports[_0x2ef0('0x65')]=function(_0x2f0caa,_0x7207c0,_0x531fe7){var _0x5ade2e=_0x2f0caa['body']['ids'];return db[_0x2ef0('0x62')][_0x2ef0('0x43')]({'where':{'id':_0x5ade2e},'attributes':['id'],'include':[{'model':db[_0x2ef0('0x58')],'as':'Agents','attributes':['id',_0x2ef0('0x2b'),_0x2ef0('0x66'),_0x2ef0('0x67'),_0x2ef0('0x68')],'raw':!![]}]})[_0x2ef0('0x24')](function(_0xb7e249){if(_0xb7e249){var _0x1408a9=_[_0x2ef0('0x69')](_0xb7e249,function(_0x393141){var _0x1e4854=_0x393141[_0x2ef0('0x25')]({'plain':!![]});return _0x1e4854[_0x2ef0('0x6a')];});return db[_0x2ef0('0x2e')][_0x2ef0('0x48')]({'where':{'id':_0x2f0caa['params']['id']}})['then'](function(_0x43b5c7){return db[_0x2ef0('0x6b')]['transaction'](function(_0x17f01d){return _0x43b5c7[_0x2ef0('0x65')](_0x5ade2e,{'transaction':_0x17f01d})['then'](function(){return BPromise['each'](_0x1408a9,function(_0x152775){return db[_0x2ef0('0x55')]['findOrCreate']({'where':{'UserId':_0x152775['id'],'OpenchannelQueueId':_0x2f0caa['params']['id']},'transaction':_0x17f01d});});})[_0x2ef0('0x24')](function(){_0x1408a9['forEach'](function(_0xd8f500){socket[_0x2ef0('0x6c')](_0x2ef0('0x6d'),{'UserId':_0xd8f500['id'],'OpenchannelQueueId':_0x43b5c7['id']});});});});});}})[_0x2ef0('0x24')](respondWithStatusCode(_0x7207c0,null))[_0x2ef0('0x45')](handleError(_0x7207c0,null));};exports['removeTeams']=function(_0x1fff53,_0x3be261,_0x22e370){return db[_0x2ef0('0x62')][_0x2ef0('0x43')]({'where':{'id':_0x1fff53[_0x2ef0('0x33')]['ids']},'attributes':['id'],'include':[{'model':db[_0x2ef0('0x58')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x2ef0('0x24')](handleEntityNotFound(_0x3be261,null))[_0x2ef0('0x24')](function(_0x1c6bc6){var _0x1ac294=_[_0x2ef0('0x2d')](_0x1c6bc6,'id');var _0x353cb5=[];var _0x3ccaec=[];var _0x3e3201=squel[_0x2ef0('0x6e')]();_0x3e3201[_0x2ef0('0x6f')](_0x2ef0('0x70'))[_0x2ef0('0x71')]('team_has_openchannel_queues','tq')[_0x2ef0('0x72')]('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0x2ef0('0x3a')]('OpenchannelQueueId\x20=\x20?',_0x1fff53['params']['id']);for(var _0x261ee7=0x0;_0x261ee7<_0x1c6bc6[_0x2ef0('0x38')];_0x261ee7+=0x1){let _0x267f2c=_0x1c6bc6[_0x261ee7];for(var _0x515a75=0x0;_0x515a75<_0x267f2c[_0x2ef0('0x6a')]['length'];_0x515a75+=0x1){let _0x3273fd=_0x267f2c[_0x2ef0('0x6a')][_0x515a75];var _0x50d534=_0x3e3201[_0x2ef0('0x73')]();_0x50d534[_0x2ef0('0x3a')](_0x2ef0('0x74'),_0x3273fd['id']);_0x3ccaec[_0x2ef0('0x75')](db['sequelize'][_0x2ef0('0x33')](_0x50d534[_0x2ef0('0x76')](),{'type':db[_0x2ef0('0x6b')][_0x2ef0('0x77')]['SELECT']})['then'](function(_0x1ee865){if(_0x1ee865[_0x2ef0('0x38')]===0x1){return _0x3273fd['id'];}else{var _0x545e2e=_[_0x2ef0('0x78')](_[_0x2ef0('0x2d')](_0x1ee865,'TeamId'),function(_0x189c32){return _[_0x2ef0('0x79')](_0x1ac294,_0x189c32);});if(_0x545e2e){return _0x3273fd['id'];}}}));}}return BPromise[_0x2ef0('0x7a')](_0x3ccaec)['then'](function(_0x32a3b3){_0x353cb5=_(_0x353cb5)[_0x2ef0('0x7b')](_0x32a3b3)[_0x2ef0('0x7c')]()[_0x2ef0('0x7d')]();return db[_0x2ef0('0x2e')][_0x2ef0('0x48')]({'where':{'id':_0x1fff53[_0x2ef0('0x46')]['id']}})[_0x2ef0('0x24')](function(_0x1d0af7){return db[_0x2ef0('0x6b')][_0x2ef0('0x7e')](function(_0x1ab6a7){return _0x1d0af7['removeTeams'](_0x1fff53[_0x2ef0('0x33')][_0x2ef0('0x7f')],{'transaction':_0x1ab6a7})[_0x2ef0('0x24')](function(){if(!_[_0x2ef0('0x80')](_0x353cb5)){return _0x1d0af7['removeAgents'](_0x353cb5,{'transaction':_0x1ab6a7});}})['then'](function(){_0x353cb5[_0x2ef0('0x81')](function(_0x16fc48){socket['emit'](_0x2ef0('0x82'),{'UserId':_0x16fc48,'OpenchannelQueueId':_0x1d0af7['id']});});});});});});})[_0x2ef0('0x24')](respondWithStatusCode(_0x3be261,null))[_0x2ef0('0x45')](handleError(_0x3be261,null));};exports['addAgents']=function(_0x4cea9a,_0x4ea9e0,_0x1f9abe){return db['OpenchannelQueue'][_0x2ef0('0x48')]({'where':{'id':_0x4cea9a['params']['id']}})[_0x2ef0('0x24')](handleEntityNotFound(_0x4ea9e0,null))['then'](function(_0x1b98a6){if(_0x1b98a6){return _0x1b98a6[_0x2ef0('0x83')](_0x4cea9a[_0x2ef0('0x4a')][_0x2ef0('0x7f')],_[_0x2ef0('0x84')](_0x4cea9a['body'],[_0x2ef0('0x7f'),'id'])||{})[_0x2ef0('0x85')](function(_0x2e9970){for(var _0x141195=0x0;_0x141195<_0x4cea9a[_0x2ef0('0x4a')]['ids'][_0x2ef0('0x38')];_0x141195+=0x1){socket[_0x2ef0('0x6c')]('userOpenchannelQueue:save',{'UserId':_0x4cea9a['body'][_0x2ef0('0x7f')][_0x141195],'OpenchannelQueueId':_0x4cea9a[_0x2ef0('0x46')]['id']});}return _0x2e9970;});}})[_0x2ef0('0x24')](respondWithResult(_0x4ea9e0,null))[_0x2ef0('0x45')](handleError(_0x4ea9e0,null));};exports[_0x2ef0('0x86')]=function(_0xe7cfff,_0x5a3384,_0x4cead8){return db[_0x2ef0('0x2e')][_0x2ef0('0x48')]({'where':{'id':_0xe7cfff['params']['id']}})[_0x2ef0('0x24')](handleEntityNotFound(_0x5a3384,null))['then'](function(_0x27beaf){if(_0x27beaf){return _0x27beaf[_0x2ef0('0x86')](_0xe7cfff[_0x2ef0('0x33')]['ids'])['then'](function(){if(_[_0x2ef0('0x87')](_0xe7cfff[_0x2ef0('0x33')][_0x2ef0('0x7f')])){for(var _0x49c6ff=0x0;_0x49c6ff<_0xe7cfff[_0x2ef0('0x33')][_0x2ef0('0x7f')][_0x2ef0('0x38')];_0x49c6ff+=0x1){socket[_0x2ef0('0x6c')](_0x2ef0('0x82'),{'UserId':Number(_0xe7cfff['query'][_0x2ef0('0x7f')][_0x49c6ff]),'OpenchannelQueueId':Number(_0xe7cfff[_0x2ef0('0x46')]['id'])});}}else{socket[_0x2ef0('0x6c')](_0x2ef0('0x82'),{'UserId':Number(_0xe7cfff[_0x2ef0('0x33')][_0x2ef0('0x7f')]),'OpenchannelQueueId':Number(_0xe7cfff[_0x2ef0('0x46')]['id'])});}});}})[_0x2ef0('0x24')](respondWithStatusCode(_0x5a3384,null))['catch'](handleError(_0x5a3384,null));};exports[_0x2ef0('0x88')]=function(_0x422867,_0x4886b4,_0x3113ee){var _0x3c11ff={};var _0x1176e6={};var _0x4f946d;var _0x5b4b25;return db[_0x2ef0('0x2e')][_0x2ef0('0x54')]({'where':{'id':_0x422867[_0x2ef0('0x46')]['id']}})[_0x2ef0('0x24')](handleEntityNotFound(_0x4886b4,null))['then'](function(_0x28e2b1){if(_0x28e2b1){_0x4f946d=_0x28e2b1;_0x1176e6[_0x2ef0('0x32')]=_[_0x2ef0('0x34')](db[_0x2ef0('0x58')][_0x2ef0('0x2f')]);_0x1176e6['query']=_[_0x2ef0('0x34')](_0x422867['query']);_0x1176e6[_0x2ef0('0x35')]=_['intersection'](_0x1176e6[_0x2ef0('0x32')],_0x1176e6[_0x2ef0('0x33')]);_0x3c11ff[_0x2ef0('0x36')]=_['intersection'](_0x1176e6['model'],qs[_0x2ef0('0x47')](_0x422867[_0x2ef0('0x33')][_0x2ef0('0x47')]));_0x3c11ff[_0x2ef0('0x36')]=_0x3c11ff['attributes']['length']?_0x3c11ff[_0x2ef0('0x36')]:_0x1176e6[_0x2ef0('0x32')];_0x3c11ff['order']=qs[_0x2ef0('0x39')](_0x422867[_0x2ef0('0x33')][_0x2ef0('0x39')]);_0x3c11ff[_0x2ef0('0x3a')]=qs[_0x2ef0('0x35')](_['pick'](_0x422867[_0x2ef0('0x33')],_0x1176e6[_0x2ef0('0x35')]));if(_0x422867['query'][_0x2ef0('0x3c')]){_0x3c11ff[_0x2ef0('0x3a')]=_[_0x2ef0('0x3d')](_0x3c11ff[_0x2ef0('0x3a')],{'$or':_[_0x2ef0('0x2d')](_0x3c11ff['attributes'],function(_0x56bf16){var _0xe37454={};_0xe37454[_0x56bf16]={'$like':'%'+_0x422867[_0x2ef0('0x33')][_0x2ef0('0x3c')]+'%'};return _0xe37454;})});}_0x3c11ff=_[_0x2ef0('0x3d')]({},_0x3c11ff,_0x422867[_0x2ef0('0x3f')]);return _0x4f946d['getAgents'](_0x3c11ff);}})[_0x2ef0('0x24')](function(_0x5a16e0){if(_0x5a16e0){_0x5b4b25=_0x5a16e0[_0x2ef0('0x38')];if(!_0x422867['query'][_0x2ef0('0x56')](_0x2ef0('0x64'))){_0x3c11ff[_0x2ef0('0x1f')]=qs[_0x2ef0('0x1f')](_0x422867[_0x2ef0('0x33')][_0x2ef0('0x1f')]);_0x3c11ff[_0x2ef0('0x1e')]=qs[_0x2ef0('0x1e')](_0x422867[_0x2ef0('0x33')][_0x2ef0('0x1e')]);}return _0x4f946d[_0x2ef0('0x88')](_0x3c11ff);}})[_0x2ef0('0x24')](function(_0x2baf2a){if(_0x2baf2a){return _0x2baf2a?{'count':_0x5b4b25,'rows':_0x2baf2a}:null;}})[_0x2ef0('0x24')](respondWithResult(_0x4886b4,null))[_0x2ef0('0x45')](handleError(_0x4886b4,null));};
\ No newline at end of file
+var _0x5961=['defaults','localhost','socket.io-emitter','redis','sendStatus','status','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','get','OpenchannelQueues','UserProfileResource','destroy','error','stack','name','send','index','map','OpenchannelQueue','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','order','sort','where','merge','VIRTUAL','filter','options','includeAll','findAll','rows','catch','params','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','findOne','UserOpenchannelQueue','nolimit','pick','OpenchannelQueueId','User','findAndCountAll','UserId','updatedAt','createdAt','format','%s/%s','getTeams','Team','hasOwnProperty','addTeams','ids','voicePause','flatMap','Agents','sequelize','findOrCreate','forEach','emit','removeTeams','select','tq.TeamId','from','team_has_openchannel_queues','join','clone','ut.UserId\x20=\x20?','push','toString','SELECT','every','TeamId','includes','all','compact','value','transaction','isEmpty','removeAgents','addAgents','spread','userOpenchannelQueue:save','userOpenchannelQueue:remove','getAgents','html-pdf','zip-dir','fast-json-patch','moment','bluebird','mustache','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb'];(function(_0x431477,_0xbc03e6){var _0x11826f=function(_0xaad378){while(--_0xaad378){_0x431477['push'](_0x431477['shift']());}};_0x11826f(++_0xbc03e6);}(_0x5961,0x6f));var _0x1596=function(_0x445101,_0x2414bf){_0x445101=_0x445101-0x0;var _0x3c3d04=_0x5961[_0x445101];return _0x3c3d04;};'use strict';var pdf=require(_0x1596('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x1596('0x1'));var jsonpatch=require(_0x1596('0x2'));var rp=require('request-promise');var moment=require(_0x1596('0x3'));var BPromise=require(_0x1596('0x4'));var Mustache=require(_0x1596('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x1596('0x6'));var ejs=require(_0x1596('0x7'));var fs=require('fs');var _=require(_0x1596('0x8'));var squel=require(_0x1596('0x9'));var crypto=require(_0x1596('0xa'));var jsforce=require(_0x1596('0xb'));var deskjs=require(_0x1596('0xc'));var toCsv=require(_0x1596('0x6'));var querystring=require(_0x1596('0xd'));var Papa=require(_0x1596('0xe'));var Redis=require(_0x1596('0xf'));var authService=require(_0x1596('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x1596('0x11'));var hardwareService=require(_0x1596('0x12'));var logger=require(_0x1596('0x13'))(_0x1596('0x14'));var utils=require('../../config/utils');var config=require(_0x1596('0x15'));var db=require(_0x1596('0x16'))['db'];config['redis']=_[_0x1596('0x17')](config['redis'],{'host':_0x1596('0x18'),'port':0x18eb});var socket=require(_0x1596('0x19'))(new Redis(config[_0x1596('0x1a')]));require('./openchannelQueue.socket')['register'](socket);function respondWithStatusCode(_0x5ae247,_0x1bb3db){_0x1bb3db=_0x1bb3db||0xcc;return function(_0x1fd329){if(_0x1fd329){return _0x5ae247[_0x1596('0x1b')](_0x1bb3db);}return _0x5ae247[_0x1596('0x1c')](_0x1bb3db)['end']();};}function respondWithResult(_0x384f35,_0x37626f){_0x37626f=_0x37626f||0xc8;return function(_0x39e714){if(_0x39e714){return _0x384f35[_0x1596('0x1c')](_0x37626f)[_0x1596('0x1d')](_0x39e714);}};}function respondWithFilteredResult(_0x57a75c,_0x1af66f){return function(_0x1da2c0){if(_0x1da2c0){var _0x368044=_0x1da2c0[_0x1596('0x1e')],_0x31cf6a=_0x1af66f[_0x1596('0x1f')],_0x2a9b86=_0x1af66f['offset']+_0x1af66f[_0x1596('0x20')],_0x56817d;if(_0x2a9b86>=_0x368044){_0x2a9b86=_0x368044;_0x56817d=0xc8;}else{_0x56817d=0xce;}_0x57a75c[_0x1596('0x1c')](_0x56817d);return _0x57a75c[_0x1596('0x21')](_0x1596('0x22'),_0x31cf6a+'-'+_0x2a9b86+'/'+_0x368044)[_0x1596('0x1d')](_0x1da2c0);}return null;};}function patchUpdates(_0x4880e7){return function(_0x4fa13d){try{jsonpatch[_0x1596('0x23')](_0x4fa13d,_0x4880e7,!![]);}catch(_0x45ea16){return BPromise[_0x1596('0x24')](_0x45ea16);}return _0x4fa13d[_0x1596('0x25')]();};}function saveUpdates(_0x547b68,_0x2b224f){return function(_0x229f74){if(_0x229f74){return _0x229f74[_0x1596('0x26')](_0x547b68)[_0x1596('0x27')](function(_0x43e2c6){return _0x43e2c6;});}return null;};}function removeEntity(_0x2012c9,_0xef5dda){return function(_0x1d1ce2){if(_0x1d1ce2){return _0x1d1ce2['destroy']()[_0x1596('0x27')](function(){var _0x28616a=_0x1d1ce2[_0x1596('0x28')]({'plain':!![]});var _0x3a19cf=_0x1596('0x29');return db[_0x1596('0x2a')][_0x1596('0x2b')]({'where':{'type':_0x3a19cf,'resourceId':_0x28616a['id']}})[_0x1596('0x27')](function(){return _0x1d1ce2;});})['then'](function(){_0x2012c9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3c591d,_0x718118){return function(_0x480693){if(!_0x480693){_0x3c591d['sendStatus'](0x194);}return _0x480693;};}function handleError(_0x2fc1c9,_0x1564cd){_0x1564cd=_0x1564cd||0x1f4;return function(_0x1373e4){logger[_0x1596('0x2c')](_0x1373e4[_0x1596('0x2d')]);if(_0x1373e4[_0x1596('0x2e')]){delete _0x1373e4[_0x1596('0x2e')];}_0x2fc1c9[_0x1596('0x1c')](_0x1564cd)[_0x1596('0x2f')](_0x1373e4);};}exports[_0x1596('0x30')]=function(_0x2e4af1,_0x3d01a6){var _0x36bee5={},_0x59e0f0={},_0x399721={'count':0x0,'rows':[]};var _0x4793b1=_[_0x1596('0x31')](db[_0x1596('0x32')][_0x1596('0x33')],function(_0x257aae){return{'name':_0x257aae[_0x1596('0x34')],'type':_0x257aae[_0x1596('0x35')][_0x1596('0x36')]};});_0x59e0f0[_0x1596('0x37')]=_['map'](_0x4793b1,_0x1596('0x2e'));_0x59e0f0[_0x1596('0x38')]=_[_0x1596('0x39')](_0x2e4af1[_0x1596('0x38')]);_0x59e0f0[_0x1596('0x3a')]=_[_0x1596('0x3b')](_0x59e0f0['model'],_0x59e0f0[_0x1596('0x38')]);_0x36bee5[_0x1596('0x3c')]=_[_0x1596('0x3b')](_0x59e0f0[_0x1596('0x37')],qs['fields'](_0x2e4af1['query'][_0x1596('0x3d')]));_0x36bee5['attributes']=_0x36bee5[_0x1596('0x3c')][_0x1596('0x3e')]?_0x36bee5['attributes']:_0x59e0f0[_0x1596('0x37')];if(!_0x2e4af1[_0x1596('0x38')]['hasOwnProperty']('nolimit')){_0x36bee5['limit']=qs[_0x1596('0x20')](_0x2e4af1[_0x1596('0x38')][_0x1596('0x20')]);_0x36bee5['offset']=qs[_0x1596('0x1f')](_0x2e4af1[_0x1596('0x38')][_0x1596('0x1f')]);}_0x36bee5[_0x1596('0x3f')]=qs[_0x1596('0x40')](_0x2e4af1[_0x1596('0x38')][_0x1596('0x40')]);_0x36bee5[_0x1596('0x41')]=qs[_0x1596('0x3a')](_['pick'](_0x2e4af1['query'],_0x59e0f0['filters']));if(_0x2e4af1[_0x1596('0x38')]['filter']){_0x36bee5[_0x1596('0x41')]=_[_0x1596('0x42')](_0x36bee5[_0x1596('0x41')],{'$or':_[_0x1596('0x31')](_0x4793b1,function(_0x5e1cb7){if(_0x5e1cb7['type']!==_0x1596('0x43')){var _0x54e1ee={};_0x54e1ee[_0x5e1cb7['name']]={'$like':'%'+_0x2e4af1['query'][_0x1596('0x44')]+'%'};return _0x54e1ee;}})});}_0x36bee5=_['merge']({},_0x36bee5,_0x2e4af1[_0x1596('0x45')]);var _0x404928={'where':_0x36bee5[_0x1596('0x41')]};return db[_0x1596('0x32')][_0x1596('0x1e')](_0x404928)['then'](function(_0x154f35){_0x399721[_0x1596('0x1e')]=_0x154f35;if(_0x2e4af1[_0x1596('0x38')][_0x1596('0x46')]){_0x36bee5['include']=[{'all':!![]}];}return db[_0x1596('0x32')][_0x1596('0x47')](_0x36bee5);})[_0x1596('0x27')](function(_0x52131e){_0x399721[_0x1596('0x48')]=_0x52131e;return _0x399721;})[_0x1596('0x27')](respondWithFilteredResult(_0x3d01a6,_0x36bee5))[_0x1596('0x49')](handleError(_0x3d01a6,null));};exports['show']=function(_0x2b0c00,_0x24ccd8){var _0x58457a={'raw':!![],'where':{'id':_0x2b0c00[_0x1596('0x4a')]['id']}},_0x4acfc5={};_0x4acfc5[_0x1596('0x37')]=_[_0x1596('0x39')](db['OpenchannelQueue'][_0x1596('0x33')]);_0x4acfc5[_0x1596('0x38')]=_['keys'](_0x2b0c00[_0x1596('0x38')]);_0x4acfc5[_0x1596('0x3a')]=_[_0x1596('0x3b')](_0x4acfc5[_0x1596('0x37')],_0x4acfc5[_0x1596('0x38')]);_0x58457a[_0x1596('0x3c')]=_[_0x1596('0x3b')](_0x4acfc5[_0x1596('0x37')],qs[_0x1596('0x3d')](_0x2b0c00[_0x1596('0x38')]['fields']));_0x58457a[_0x1596('0x3c')]=_0x58457a[_0x1596('0x3c')][_0x1596('0x3e')]?_0x58457a['attributes']:_0x4acfc5['model'];if(_0x2b0c00['query']['includeAll']){_0x58457a[_0x1596('0x4b')]=[{'all':!![]}];}_0x58457a=_[_0x1596('0x42')]({},_0x58457a,_0x2b0c00['options']);return db[_0x1596('0x32')][_0x1596('0x4c')](_0x58457a)['then'](handleEntityNotFound(_0x24ccd8,null))['then'](respondWithResult(_0x24ccd8,null))[_0x1596('0x49')](handleError(_0x24ccd8,null));};exports['create']=function(_0x277f73,_0xf58242){return db[_0x1596('0x32')][_0x1596('0x4d')](_0x277f73[_0x1596('0x4e')],{})[_0x1596('0x27')](function(_0x5ae536){var _0x53f644=_0x277f73[_0x1596('0x4f')][_0x1596('0x28')]({'plain':!![]});if(!_0x53f644)throw new Error(_0x1596('0x50'));if(_0x53f644[_0x1596('0x51')]===_0x1596('0x4f')){var _0x49d7f9=_0x5ae536[_0x1596('0x28')]({'plain':!![]});var _0x1fdad7=_0x1596('0x29');return db['UserProfileSection'][_0x1596('0x4c')]({'where':{'name':_0x1fdad7,'userProfileId':_0x53f644[_0x1596('0x52')]},'raw':!![]})[_0x1596('0x27')](function(_0xbd62fb){if(_0xbd62fb&&_0xbd62fb['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x49d7f9['name'],'resourceId':_0x49d7f9['id'],'type':_0xbd62fb['name'],'sectionId':_0xbd62fb['id']},{})[_0x1596('0x27')](function(){return _0x5ae536;});}else{return _0x5ae536;}})[_0x1596('0x49')](function(_0x28268e){logger[_0x1596('0x2c')](_0x1596('0x53'),_0x28268e);throw _0x28268e;});}return _0x5ae536;})['then'](respondWithResult(_0xf58242,0xc9))[_0x1596('0x49')](handleError(_0xf58242,null));};exports[_0x1596('0x26')]=function(_0x506583,_0xee8487){if(_0x506583[_0x1596('0x4e')]['id']){delete _0x506583[_0x1596('0x4e')]['id'];}return db[_0x1596('0x32')]['find']({'where':{'id':_0x506583[_0x1596('0x4a')]['id']}})['then'](handleEntityNotFound(_0xee8487,null))[_0x1596('0x27')](saveUpdates(_0x506583[_0x1596('0x4e')],null))[_0x1596('0x27')](respondWithResult(_0xee8487,null))[_0x1596('0x49')](handleError(_0xee8487,null));};exports[_0x1596('0x2b')]=function(_0x232145,_0x45c053){return db[_0x1596('0x32')][_0x1596('0x4c')]({'where':{'id':_0x232145['params']['id']}})['then'](handleEntityNotFound(_0x45c053,null))['then'](removeEntity(_0x45c053,null))[_0x1596('0x49')](handleError(_0x45c053,null));};exports[_0x1596('0x54')]=function(_0x38f673,_0x2f0581){return db[_0x1596('0x32')][_0x1596('0x54')]()[_0x1596('0x27')](respondWithResult(_0x2f0581,null))['catch'](handleError(_0x2f0581,null));};exports['getMembers']=function(_0x2a46ae,_0x403f3f,_0x186763){var _0xbe4495={'raw':!![],'where':{}},_0x354d91={},_0x42bfc9;return db['OpenchannelQueue'][_0x1596('0x55')]({'where':{'id':_0x2a46ae[_0x1596('0x4a')]['id']}})[_0x1596('0x27')](handleEntityNotFound(_0x403f3f,null))[_0x1596('0x27')](function(_0x59bc36){if(_0x59bc36){_0x42bfc9=_0x59bc36[_0x1596('0x28')]({'plain':!![]});_0x354d91[_0x1596('0x37')]=_[_0x1596('0x39')](db[_0x1596('0x56')][_0x1596('0x33')]);_0x354d91[_0x1596('0x38')]=_['keys'](_0x2a46ae[_0x1596('0x38')]);_0x354d91['filters']=_[_0x1596('0x3b')](_0x354d91['model'],_0x354d91[_0x1596('0x38')]);_0xbe4495[_0x1596('0x3c')]=_[_0x1596('0x3b')](_0x354d91[_0x1596('0x37')],qs[_0x1596('0x3d')](_0x2a46ae['query'][_0x1596('0x3d')]));_0xbe4495[_0x1596('0x3c')]=_0xbe4495[_0x1596('0x3c')][_0x1596('0x3e')]?_0xbe4495[_0x1596('0x3c')]:_0x354d91[_0x1596('0x37')];if(!_0x2a46ae[_0x1596('0x38')]['hasOwnProperty'](_0x1596('0x57'))){_0xbe4495[_0x1596('0x20')]=qs[_0x1596('0x20')](_0x2a46ae[_0x1596('0x38')][_0x1596('0x20')]);_0xbe4495['offset']=qs[_0x1596('0x1f')](_0x2a46ae[_0x1596('0x38')]['offset']);}_0xbe4495[_0x1596('0x3f')]=qs[_0x1596('0x40')](_0x2a46ae[_0x1596('0x38')][_0x1596('0x40')]);_0xbe4495[_0x1596('0x41')]=qs['filters'](_[_0x1596('0x58')](_0x2a46ae['query'],_0x354d91[_0x1596('0x3a')]));_0xbe4495[_0x1596('0x41')][_0x1596('0x59')]=_0x59bc36['id'];if(_0x2a46ae['query'][_0x1596('0x44')]){_0xbe4495[_0x1596('0x41')]=_[_0x1596('0x42')](_0xbe4495[_0x1596('0x41')],{'$or':_[_0x1596('0x31')](_0xbe4495[_0x1596('0x3c')],function(_0x5ae649){var _0xcfaf33={};_0xcfaf33[_0x5ae649]={'$like':'%'+_0x2a46ae[_0x1596('0x38')]['filter']+'%'};return _0xcfaf33;})});}_0xbe4495=_['merge']({},_0xbe4495,_0x2a46ae[_0x1596('0x45')]);return db[_0x1596('0x56')]['findAll'](_0xbe4495);}})[_0x1596('0x27')](function(_0x1c39af){if(_0x1c39af){return db[_0x1596('0x5a')][_0x1596('0x5b')]({'where':{'id':_[_0x1596('0x31')](_0x1c39af,_0x1596('0x5c')),'role':'agent'},'attributes':['id',_0x1596('0x2e'),'openchannelPause',_0x1596('0x5d'),_0x1596('0x5e')]});}})['then'](function(_0x3e20d9){if(_0x3e20d9){return{'count':_0x3e20d9[_0x1596('0x1e')],'rows':_[_0x1596('0x31')](_0x3e20d9[_0x1596('0x48')],function(_0x1903a6){return{'membername':_0x1903a6['name'],'UserId':_0x1903a6['id'],'queue_name':_0x42bfc9[_0x1596('0x2e')],'OpenchannelQueueId':_0x42bfc9['id'],'interface':util[_0x1596('0x5f')](_0x1596('0x60'),'SIP',_0x1903a6[_0x1596('0x2e')]),'penalty':0x0,'paused':_0x1903a6['openchannelPause'],'createdAt':_0x1903a6[_0x1596('0x5e')],'updatedAt':_0x1903a6[_0x1596('0x5d')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x1596('0x27')](respondWithFilteredResult(_0x403f3f,_0xbe4495))[_0x1596('0x49')](handleError(_0x403f3f,null));};exports[_0x1596('0x61')]=function(_0xa0a4da,_0x487eae,_0x3001f7){var _0x1763ed={};var _0x516ff4={};var _0x257c76;var _0x132093;return db[_0x1596('0x32')][_0x1596('0x55')]({'where':{'id':_0xa0a4da[_0x1596('0x4a')]['id']}})['then'](handleEntityNotFound(_0x487eae,null))[_0x1596('0x27')](function(_0x1958d3){if(_0x1958d3){_0x257c76=_0x1958d3;_0x516ff4['model']=_[_0x1596('0x39')](db[_0x1596('0x62')][_0x1596('0x33')]);_0x516ff4[_0x1596('0x38')]=_[_0x1596('0x39')](_0xa0a4da[_0x1596('0x38')]);_0x516ff4[_0x1596('0x3a')]=_[_0x1596('0x3b')](_0x516ff4[_0x1596('0x37')],_0x516ff4[_0x1596('0x38')]);_0x1763ed[_0x1596('0x3c')]=_[_0x1596('0x3b')](_0x516ff4[_0x1596('0x37')],qs[_0x1596('0x3d')](_0xa0a4da[_0x1596('0x38')]['fields']));_0x1763ed['attributes']=_0x1763ed[_0x1596('0x3c')][_0x1596('0x3e')]?_0x1763ed[_0x1596('0x3c')]:_0x516ff4[_0x1596('0x37')];_0x1763ed[_0x1596('0x3f')]=qs[_0x1596('0x40')](_0xa0a4da[_0x1596('0x38')][_0x1596('0x40')]);_0x1763ed['where']=qs['filters'](_[_0x1596('0x58')](_0xa0a4da[_0x1596('0x38')],_0x516ff4[_0x1596('0x3a')]));if(_0xa0a4da[_0x1596('0x38')]['filter']){_0x1763ed[_0x1596('0x41')]=_['merge'](_0x1763ed['where'],{'$or':_[_0x1596('0x31')](_0x1763ed['attributes'],function(_0x1f4f3d){var _0x299e5d={};_0x299e5d[_0x1f4f3d]={'$like':'%'+_0xa0a4da['query'][_0x1596('0x44')]+'%'};return _0x299e5d;})});}_0x1763ed=_[_0x1596('0x42')]({},_0x1763ed,_0xa0a4da[_0x1596('0x45')]);return _0x257c76[_0x1596('0x61')](_0x1763ed);}})[_0x1596('0x27')](function(_0x4a5b1b){if(_0x4a5b1b){_0x132093=_0x4a5b1b['length'];if(!_0xa0a4da[_0x1596('0x38')][_0x1596('0x63')](_0x1596('0x57'))){_0x1763ed[_0x1596('0x20')]=qs[_0x1596('0x20')](_0xa0a4da[_0x1596('0x38')][_0x1596('0x20')]);_0x1763ed[_0x1596('0x1f')]=qs[_0x1596('0x1f')](_0xa0a4da[_0x1596('0x38')]['offset']);}return _0x257c76['getTeams'](_0x1763ed);}})[_0x1596('0x27')](function(_0xf04684){if(_0xf04684){return _0xf04684?{'count':_0x132093,'rows':_0xf04684}:null;}})[_0x1596('0x27')](respondWithResult(_0x487eae,null))[_0x1596('0x49')](handleError(_0x487eae,null));};exports[_0x1596('0x64')]=function(_0x2d1a38,_0x5b12ad,_0x392246){var _0x44c303=_0x2d1a38[_0x1596('0x4e')][_0x1596('0x65')];return db['Team'][_0x1596('0x47')]({'where':{'id':_0x44c303},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0x1596('0x2e'),'online',_0x1596('0x66'),'interface'],'raw':!![]}]})[_0x1596('0x27')](function(_0x1ca0bd){if(_0x1ca0bd){var _0x548b59=_[_0x1596('0x67')](_0x1ca0bd,function(_0x41305a){var _0x4a2649=_0x41305a[_0x1596('0x28')]({'plain':!![]});return _0x4a2649[_0x1596('0x68')];});return db[_0x1596('0x32')][_0x1596('0x4c')]({'where':{'id':_0x2d1a38[_0x1596('0x4a')]['id']}})[_0x1596('0x27')](function(_0x1b8922){return db[_0x1596('0x69')]['transaction'](function(_0x538918){return _0x1b8922['addTeams'](_0x44c303,{'transaction':_0x538918})[_0x1596('0x27')](function(){return BPromise['each'](_0x548b59,function(_0x1e3370){return db['UserOpenchannelQueue'][_0x1596('0x6a')]({'where':{'UserId':_0x1e3370['id'],'OpenchannelQueueId':_0x2d1a38[_0x1596('0x4a')]['id']},'transaction':_0x538918});});})[_0x1596('0x27')](function(){_0x548b59[_0x1596('0x6b')](function(_0x2bd871){socket[_0x1596('0x6c')]('userOpenchannelQueue:save',{'UserId':_0x2bd871['id'],'OpenchannelQueueId':_0x1b8922['id']});});});});});}})[_0x1596('0x27')](respondWithStatusCode(_0x5b12ad,null))['catch'](handleError(_0x5b12ad,null));};exports[_0x1596('0x6d')]=function(_0x244a9d,_0x5b7e59,_0x30a6a5){return db[_0x1596('0x62')][_0x1596('0x47')]({'where':{'id':_0x244a9d['query'][_0x1596('0x65')]},'attributes':['id'],'include':[{'model':db[_0x1596('0x5a')],'as':_0x1596('0x68'),'attributes':['id'],'raw':!![]}]})[_0x1596('0x27')](handleEntityNotFound(_0x5b7e59,null))[_0x1596('0x27')](function(_0x3b9aab){var _0x39775a=_['map'](_0x3b9aab,'id');var _0xcc0434=[];var _0x2fcd93=[];var _0x2c314e=squel[_0x1596('0x6e')]();_0x2c314e['field'](_0x1596('0x6f'))[_0x1596('0x70')](_0x1596('0x71'),'tq')[_0x1596('0x72')]('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0x1596('0x41')]('OpenchannelQueueId\x20=\x20?',_0x244a9d[_0x1596('0x4a')]['id']);for(var _0x3031b4=0x0;_0x3031b4<_0x3b9aab['length'];_0x3031b4+=0x1){let _0x2a020d=_0x3b9aab[_0x3031b4];for(var _0x5bf496=0x0;_0x5bf496<_0x2a020d[_0x1596('0x68')][_0x1596('0x3e')];_0x5bf496+=0x1){let _0x39580a=_0x2a020d['Agents'][_0x5bf496];var _0x3d60ef=_0x2c314e[_0x1596('0x73')]();_0x3d60ef[_0x1596('0x41')](_0x1596('0x74'),_0x39580a['id']);_0x2fcd93[_0x1596('0x75')](db[_0x1596('0x69')][_0x1596('0x38')](_0x3d60ef[_0x1596('0x76')](),{'type':db[_0x1596('0x69')]['QueryTypes'][_0x1596('0x77')]})['then'](function(_0x1f25e8){if(_0x1f25e8[_0x1596('0x3e')]===0x1){return _0x39580a['id'];}else{var _0x3e40a2=_[_0x1596('0x78')](_['map'](_0x1f25e8,_0x1596('0x79')),function(_0x49e29b){return _[_0x1596('0x7a')](_0x39775a,_0x49e29b);});if(_0x3e40a2){return _0x39580a['id'];}}}));}}return BPromise[_0x1596('0x7b')](_0x2fcd93)[_0x1596('0x27')](function(_0x4ae7b3){_0xcc0434=_(_0xcc0434)['union'](_0x4ae7b3)[_0x1596('0x7c')]()[_0x1596('0x7d')]();return db[_0x1596('0x32')][_0x1596('0x4c')]({'where':{'id':_0x244a9d[_0x1596('0x4a')]['id']}})[_0x1596('0x27')](function(_0x43ebac){return db[_0x1596('0x69')][_0x1596('0x7e')](function(_0x456b59){return _0x43ebac[_0x1596('0x6d')](_0x244a9d[_0x1596('0x38')][_0x1596('0x65')],{'transaction':_0x456b59})[_0x1596('0x27')](function(){if(!_[_0x1596('0x7f')](_0xcc0434)){return _0x43ebac[_0x1596('0x80')](_0xcc0434,{'transaction':_0x456b59});}})[_0x1596('0x27')](function(){_0xcc0434[_0x1596('0x6b')](function(_0x28825d){socket[_0x1596('0x6c')]('userOpenchannelQueue:remove',{'UserId':_0x28825d,'OpenchannelQueueId':_0x43ebac['id']});});});});});});})['then'](respondWithStatusCode(_0x5b7e59,null))[_0x1596('0x49')](handleError(_0x5b7e59,null));};exports[_0x1596('0x81')]=function(_0x35bd4e,_0x1e3ea5,_0x5fc05f){return db[_0x1596('0x32')][_0x1596('0x4c')]({'where':{'id':_0x35bd4e[_0x1596('0x4a')]['id']}})[_0x1596('0x27')](handleEntityNotFound(_0x1e3ea5,null))[_0x1596('0x27')](function(_0x44543c){if(_0x44543c){return _0x44543c[_0x1596('0x81')](_0x35bd4e[_0x1596('0x4e')][_0x1596('0x65')],_['omit'](_0x35bd4e[_0x1596('0x4e')],['ids','id'])||{})[_0x1596('0x82')](function(_0x37bc91){for(var _0x13b446=0x0;_0x13b446<_0x35bd4e[_0x1596('0x4e')][_0x1596('0x65')][_0x1596('0x3e')];_0x13b446+=0x1){socket[_0x1596('0x6c')](_0x1596('0x83'),{'UserId':_0x35bd4e[_0x1596('0x4e')][_0x1596('0x65')][_0x13b446],'OpenchannelQueueId':_0x35bd4e['params']['id']});}return _0x37bc91;});}})[_0x1596('0x27')](respondWithResult(_0x1e3ea5,null))[_0x1596('0x49')](handleError(_0x1e3ea5,null));};exports[_0x1596('0x80')]=function(_0x2a785c,_0x37ad98,_0x5c1ece){return db[_0x1596('0x32')][_0x1596('0x4c')]({'where':{'id':_0x2a785c[_0x1596('0x4a')]['id']}})[_0x1596('0x27')](handleEntityNotFound(_0x37ad98,null))[_0x1596('0x27')](function(_0x9f68fc){if(_0x9f68fc){return _0x9f68fc[_0x1596('0x80')](_0x2a785c[_0x1596('0x38')][_0x1596('0x65')])['then'](function(){if(_['isArray'](_0x2a785c[_0x1596('0x38')][_0x1596('0x65')])){for(var _0x1c8345=0x0;_0x1c8345<_0x2a785c[_0x1596('0x38')][_0x1596('0x65')][_0x1596('0x3e')];_0x1c8345+=0x1){socket[_0x1596('0x6c')](_0x1596('0x84'),{'UserId':Number(_0x2a785c['query'][_0x1596('0x65')][_0x1c8345]),'OpenchannelQueueId':Number(_0x2a785c[_0x1596('0x4a')]['id'])});}}else{socket[_0x1596('0x6c')](_0x1596('0x84'),{'UserId':Number(_0x2a785c[_0x1596('0x38')][_0x1596('0x65')]),'OpenchannelQueueId':Number(_0x2a785c[_0x1596('0x4a')]['id'])});}});}})['then'](respondWithStatusCode(_0x37ad98,null))[_0x1596('0x49')](handleError(_0x37ad98,null));};exports[_0x1596('0x85')]=function(_0x41e170,_0x51dff3,_0x4766cc){var _0xdcc112={};var _0x259929={};var _0x52902b;var _0x16f3ff;return db['OpenchannelQueue'][_0x1596('0x55')]({'where':{'id':_0x41e170[_0x1596('0x4a')]['id']}})[_0x1596('0x27')](handleEntityNotFound(_0x51dff3,null))[_0x1596('0x27')](function(_0x2d9e10){if(_0x2d9e10){_0x52902b=_0x2d9e10;_0x259929['model']=_[_0x1596('0x39')](db['User'][_0x1596('0x33')]);_0x259929[_0x1596('0x38')]=_[_0x1596('0x39')](_0x41e170[_0x1596('0x38')]);_0x259929[_0x1596('0x3a')]=_[_0x1596('0x3b')](_0x259929[_0x1596('0x37')],_0x259929['query']);_0xdcc112[_0x1596('0x3c')]=_[_0x1596('0x3b')](_0x259929[_0x1596('0x37')],qs[_0x1596('0x3d')](_0x41e170[_0x1596('0x38')][_0x1596('0x3d')]));_0xdcc112[_0x1596('0x3c')]=_0xdcc112[_0x1596('0x3c')][_0x1596('0x3e')]?_0xdcc112[_0x1596('0x3c')]:_0x259929['model'];_0xdcc112[_0x1596('0x3f')]=qs[_0x1596('0x40')](_0x41e170[_0x1596('0x38')][_0x1596('0x40')]);_0xdcc112[_0x1596('0x41')]=qs['filters'](_[_0x1596('0x58')](_0x41e170[_0x1596('0x38')],_0x259929[_0x1596('0x3a')]));if(_0x41e170[_0x1596('0x38')]['filter']){_0xdcc112['where']=_['merge'](_0xdcc112[_0x1596('0x41')],{'$or':_['map'](_0xdcc112[_0x1596('0x3c')],function(_0x4c3e46){var _0x1d7439={};_0x1d7439[_0x4c3e46]={'$like':'%'+_0x41e170[_0x1596('0x38')][_0x1596('0x44')]+'%'};return _0x1d7439;})});}_0xdcc112=_[_0x1596('0x42')]({},_0xdcc112,_0x41e170[_0x1596('0x45')]);return _0x52902b[_0x1596('0x85')](_0xdcc112);}})[_0x1596('0x27')](function(_0x79dd16){if(_0x79dd16){_0x16f3ff=_0x79dd16[_0x1596('0x3e')];if(!_0x41e170['query']['hasOwnProperty'](_0x1596('0x57'))){_0xdcc112[_0x1596('0x20')]=qs[_0x1596('0x20')](_0x41e170[_0x1596('0x38')][_0x1596('0x20')]);_0xdcc112['offset']=qs[_0x1596('0x1f')](_0x41e170[_0x1596('0x38')][_0x1596('0x1f')]);}return _0x52902b[_0x1596('0x85')](_0xdcc112);}})['then'](function(_0x653cc9){if(_0x653cc9){return _0x653cc9?{'count':_0x16f3ff,'rows':_0x653cc9}:null;}})[_0x1596('0x27')](respondWithResult(_0x51dff3,null))[_0x1596('0x49')](handleError(_0x51dff3,null));};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.events.js b/server/api/openchannelQueue/openchannelQueue.events.js
index 1bee7bd..8916ac9 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 _0x0ab4=['save','update','remove','emit','hasOwnProperty','hook','exports','events','OpenchannelQueue','setMaxListeners'];(function(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0x0ab4,0x165));var _0x40ab=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0ab4[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x40ab('0x0'));var OpenchannelQueue=require('../../mysqldb')['db'][_0x40ab('0x1')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x40ab('0x2')](0x0);var events={'afterCreate':_0x40ab('0x3'),'afterUpdate':_0x40ab('0x4'),'afterDestroy':_0x40ab('0x5')};function emitEvent(_0x2b9bf3){return function(_0x51b669,_0x353638,_0x66c2bd){OpenchannelQueueEvents[_0x40ab('0x6')](_0x2b9bf3+':'+_0x51b669['id'],_0x51b669);OpenchannelQueueEvents[_0x40ab('0x6')](_0x2b9bf3,_0x51b669);_0x66c2bd(null);};}for(var e in events){if(events[_0x40ab('0x7')](e)){var event=events[e];OpenchannelQueue[_0x40ab('0x8')](e,emitEvent(event));}}module[_0x40ab('0x9')]=OpenchannelQueueEvents;
\ No newline at end of file
+var _0xeef9=['../../mysqldb','OpenchannelQueue','update','remove','emit','hasOwnProperty','exports','events'];(function(_0x45a6ef,_0x4e9b9e){var _0x3867e6=function(_0x344add){while(--_0x344add){_0x45a6ef['push'](_0x45a6ef['shift']());}};_0x3867e6(++_0x4e9b9e);}(_0xeef9,0x7f));var _0x9eef=function(_0x50e545,_0x342948){_0x50e545=_0x50e545-0x0;var _0x181af8=_0xeef9[_0x50e545];return _0x181af8;};'use strict';var EventEmitter=require(_0x9eef('0x0'));var OpenchannelQueue=require(_0x9eef('0x1'))['db'][_0x9eef('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x9eef('0x3'),'afterDestroy':_0x9eef('0x4')};function emitEvent(_0x289960){return function(_0x3aaa7c,_0xb32f07,_0x9a49e6){OpenchannelQueueEvents['emit'](_0x289960+':'+_0x3aaa7c['id'],_0x3aaa7c);OpenchannelQueueEvents[_0x9eef('0x5')](_0x289960,_0x3aaa7c);_0x9a49e6(null);};}for(var e in events){if(events[_0x9eef('0x6')](e)){var event=events[e];OpenchannelQueue['hook'](e,emitEvent(event));}}module[_0x9eef('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 7baaa1b..90c6a76 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 _0x808e=['rimraf','../../config/environment','./openchannelQueue.attributes','exports','define','OpenchannelQueue','openchannel_queues','lodash','moment','request-promise','path'];(function(_0x252b4e,_0x57c182){var _0xdc0f09=function(_0x42176b){while(--_0x42176b){_0x252b4e['push'](_0x252b4e['shift']());}};_0xdc0f09(++_0x57c182);}(_0x808e,0x104));var _0xe808=function(_0x37bd26,_0x5ad346){_0x37bd26=_0x37bd26-0x0;var _0xe83dc4=_0x808e[_0x37bd26];return _0xe83dc4;};'use strict';var _=require(_0xe808('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xe808('0x1'));var BPromise=require('bluebird');var rp=require(_0xe808('0x2'));var fs=require('fs');var path=require(_0xe808('0x3'));var rimraf=require(_0xe808('0x4'));var config=require(_0xe808('0x5'));var attributes=require(_0xe808('0x6'));module[_0xe808('0x7')]=function(_0x49e994,_0x44b667){return _0x49e994[_0xe808('0x8')](_0xe808('0x9'),attributes,{'tableName':_0xe808('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0f0a=['lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./openchannelQueue.attributes','exports','define','openchannel_queues'];(function(_0x125a77,_0x5ca9a9){var _0x303b64=function(_0x8ae0e0){while(--_0x8ae0e0){_0x125a77['push'](_0x125a77['shift']());}};_0x303b64(++_0x5ca9a9);}(_0x0f0a,0x6c));var _0xa0f0=function(_0x507188,_0x5b0cac){_0x507188=_0x507188-0x0;var _0x597cda=_0x0f0a[_0x507188];return _0x597cda;};'use strict';var _=require(_0xa0f0('0x0'));var util=require(_0xa0f0('0x1'));var logger=require(_0xa0f0('0x2'))(_0xa0f0('0x3'));var moment=require('moment');var BPromise=require(_0xa0f0('0x4'));var rp=require(_0xa0f0('0x5'));var fs=require('fs');var path=require(_0xa0f0('0x6'));var rimraf=require('rimraf');var config=require(_0xa0f0('0x7'));var attributes=require(_0xa0f0('0x8'));module[_0xa0f0('0x9')]=function(_0x475050,_0x434e69){return _0x475050[_0xa0f0('0xa')]('OpenchannelQueue',attributes,{'tableName':_0xa0f0('0xb'),'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 602736c..cbf7911 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 _0x4d18=['options','where','limit','include','map','attributes','model','ShowOpenchannelQueue','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','then','info','OpenchannelQueue,\x20%s,\x20%s','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','GetOpenchannelQueue','OpenchannelQueue','findAll'];(function(_0x14ed07,_0x3ec11e){var _0x43e5f9=function(_0x3fc1d2){while(--_0x3fc1d2){_0x14ed07['push'](_0x14ed07['shift']());}};_0x43e5f9(++_0x3ec11e);}(_0x4d18,0x1aa));var _0x84d1=function(_0x5ad8b4,_0x28beaa){_0x5ad8b4=_0x5ad8b4-0x0;var _0x1f078e=_0x4d18[_0x5ad8b4];return _0x1f078e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x84d1('0x0'));var BPromise=require(_0x84d1('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x84d1('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x84d1('0x3'));var logger=require(_0x84d1('0x4'))(_0x84d1('0x5'));var config=require(_0x84d1('0x6'));var jayson=require(_0x84d1('0x7'));var client=jayson[_0x84d1('0x8')]['http']({'port':0x232a});config[_0x84d1('0x9')]=_[_0x84d1('0xa')](config[_0x84d1('0x9')],{'host':_0x84d1('0xb'),'port':0x18eb});var socket=require(_0x84d1('0xc'))(new Redis(config[_0x84d1('0x9')]));require(_0x84d1('0xd'))[_0x84d1('0xe')](socket);function respondWithRpcPromise(_0x209cf6,_0x45cd4d,_0x72327e){return new BPromise(function(_0x523935,_0x551360){return client[_0x84d1('0xf')](_0x209cf6,_0x72327e)[_0x84d1('0x10')](function(_0x279d3a){logger[_0x84d1('0x11')](_0x84d1('0x12'),_0x45cd4d,'request\x20sent');logger[_0x84d1('0x13')](_0x84d1('0x14'),_0x45cd4d,_0x84d1('0x15'),JSON[_0x84d1('0x16')](_0x279d3a));if(_0x279d3a[_0x84d1('0x17')]){if(_0x279d3a['error'][_0x84d1('0x18')]===0x1f4){logger[_0x84d1('0x17')](_0x84d1('0x12'),_0x45cd4d,_0x279d3a[_0x84d1('0x17')][_0x84d1('0x19')]);return _0x551360(_0x279d3a[_0x84d1('0x17')][_0x84d1('0x19')]);}logger['error'](_0x84d1('0x12'),_0x45cd4d,_0x279d3a[_0x84d1('0x17')][_0x84d1('0x19')]);return _0x523935(_0x279d3a[_0x84d1('0x17')][_0x84d1('0x19')]);}else{logger[_0x84d1('0x11')](_0x84d1('0x12'),_0x45cd4d,_0x84d1('0x15'));_0x523935(_0x279d3a['result']['message']);}})[_0x84d1('0x1a')](function(_0xdc4e64){logger[_0x84d1('0x17')](_0x84d1('0x12'),_0x45cd4d,_0xdc4e64);_0x551360(_0xdc4e64);});});}exports[_0x84d1('0x1b')]=function(_0x1fb127){var _0x2a13f0=this;return new Promise(function(_0x3b1b38,_0x3a1ec6){return db[_0x84d1('0x1c')][_0x84d1('0x1d')]({'raw':_0x1fb127[_0x84d1('0x1e')]?_0x1fb127[_0x84d1('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x1fb127[_0x84d1('0x1e')]?_0x1fb127[_0x84d1('0x1e')][_0x84d1('0x1f')]||null:null,'attributes':_0x1fb127[_0x84d1('0x1e')]?_0x1fb127[_0x84d1('0x1e')]['attributes']||null:null,'limit':_0x1fb127[_0x84d1('0x1e')]?_0x1fb127[_0x84d1('0x1e')][_0x84d1('0x20')]||null:null,'include':_0x1fb127[_0x84d1('0x1e')]?_0x1fb127['options'][_0x84d1('0x21')]?_[_0x84d1('0x22')](_0x1fb127[_0x84d1('0x1e')][_0x84d1('0x21')],function(_0x15da28){return{'model':db[_0x15da28['model']],'as':_0x15da28['as'],'attributes':_0x15da28[_0x84d1('0x23')],'include':_0x15da28[_0x84d1('0x21')]?_[_0x84d1('0x22')](_0x15da28['include'],function(_0x15ed06){return{'model':db[_0x15ed06[_0x84d1('0x24')]],'as':_0x15ed06['as'],'attributes':_0x15ed06[_0x84d1('0x23')],'include':_0x15ed06[_0x84d1('0x21')]?_[_0x84d1('0x22')](_0x15ed06[_0x84d1('0x21')],function(_0x1dcedb){return{'model':db[_0x1dcedb[_0x84d1('0x24')]],'as':_0x1dcedb['as'],'attributes':_0x1dcedb['attributes']};}):[]};}):[]};}):[]:[]})[_0x84d1('0x10')](function(_0x941689){logger[_0x84d1('0x11')](_0x84d1('0x1b'),_0x1fb127);logger[_0x84d1('0x13')]('GetOpenchannelQueue',_0x1fb127,JSON[_0x84d1('0x16')](_0x941689));_0x3b1b38(_0x941689);})[_0x84d1('0x1a')](function(_0x3efef9){logger['error']('GetOpenchannelQueue',_0x3efef9[_0x84d1('0x19')],_0x1fb127);_0x3a1ec6(_0x2a13f0[_0x84d1('0x17')](0x1f4,_0x3efef9[_0x84d1('0x19')]));});});};exports[_0x84d1('0x25')]=function(_0x406688){var _0x263d04=this;return new Promise(function(_0x50db02,_0x583890){return db[_0x84d1('0x1c')]['find']({'raw':_0x406688[_0x84d1('0x1e')]?_0x406688['options']['raw']===undefined?!![]:![]:!![],'where':_0x406688[_0x84d1('0x1e')]?_0x406688[_0x84d1('0x1e')]['where']||null:null,'attributes':_0x406688[_0x84d1('0x1e')]?_0x406688[_0x84d1('0x1e')]['attributes']||null:null,'include':_0x406688[_0x84d1('0x1e')]?_0x406688[_0x84d1('0x1e')]['include']?_[_0x84d1('0x22')](_0x406688[_0x84d1('0x1e')]['include'],function(_0x140205){return{'model':db[_0x140205[_0x84d1('0x24')]],'as':_0x140205['as'],'attributes':_0x140205[_0x84d1('0x23')],'include':_0x140205[_0x84d1('0x21')]?_[_0x84d1('0x22')](_0x140205['include'],function(_0x14e381){return{'model':db[_0x14e381['model']],'as':_0x14e381['as'],'attributes':_0x14e381[_0x84d1('0x23')],'include':_0x14e381[_0x84d1('0x21')]?_[_0x84d1('0x22')](_0x14e381[_0x84d1('0x21')],function(_0x5c53b9){return{'model':db[_0x5c53b9[_0x84d1('0x24')]],'as':_0x5c53b9['as'],'attributes':_0x5c53b9[_0x84d1('0x23')]};}):[]};}):[]};}):[]:[]})[_0x84d1('0x10')](function(_0x4ad5dd){logger[_0x84d1('0x11')](_0x84d1('0x25'),_0x406688);logger[_0x84d1('0x13')]('ShowOpenchannelQueue',_0x406688,JSON[_0x84d1('0x16')](_0x4ad5dd));_0x50db02(_0x4ad5dd);})[_0x84d1('0x1a')](function(_0x1f5440){logger[_0x84d1('0x17')]('ShowOpenchannelQueue',_0x1f5440[_0x84d1('0x19')],_0x406688);_0x583890(_0x263d04[_0x84d1('0x17')](0x1f4,_0x1f5440[_0x84d1('0x19')]));});});};
\ No newline at end of file
+var _0x29d0=['ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','attributes','limit','include','map','model','then','find','ShowOpenchannelQueue','lodash','util','moment','bluebird','randomstring'];(function(_0x4a0d90,_0x1440d7){var _0x4074ef=function(_0x43049c){while(--_0x43049c){_0x4a0d90['push'](_0x4a0d90['shift']());}};_0x4074ef(++_0x1440d7);}(_0x29d0,0x82));var _0x029d=function(_0x8f3e8f,_0xf5e227){_0x8f3e8f=_0x8f3e8f-0x0;var _0x48b7bc=_0x29d0[_0x8f3e8f];return _0x48b7bc;};'use strict';var _=require(_0x029d('0x0'));var util=require(_0x029d('0x1'));var moment=require(_0x029d('0x2'));var BPromise=require(_0x029d('0x3'));var rs=require(_0x029d('0x4'));var fs=require('fs');var Redis=require(_0x029d('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x029d('0x6'));var logger=require(_0x029d('0x7'))(_0x029d('0x8'));var config=require(_0x029d('0x9'));var jayson=require(_0x029d('0xa'));var client=jayson[_0x029d('0xb')][_0x029d('0xc')]({'port':0x232a});config[_0x029d('0xd')]=_[_0x029d('0xe')](config[_0x029d('0xd')],{'host':_0x029d('0xf'),'port':0x18eb});var socket=require(_0x029d('0x10'))(new Redis(config[_0x029d('0xd')]));require(_0x029d('0x11'))[_0x029d('0x12')](socket);function respondWithRpcPromise(_0x384534,_0x4725ac,_0x545890){return new BPromise(function(_0x197706,_0x1aca1a){return client[_0x029d('0x13')](_0x384534,_0x545890)['then'](function(_0x1b0b2e){logger['info'](_0x029d('0x14'),_0x4725ac,_0x029d('0x15'));logger[_0x029d('0x16')](_0x029d('0x17'),_0x4725ac,_0x029d('0x15'),JSON[_0x029d('0x18')](_0x1b0b2e));if(_0x1b0b2e['error']){if(_0x1b0b2e[_0x029d('0x19')][_0x029d('0x1a')]===0x1f4){logger['error'](_0x029d('0x14'),_0x4725ac,_0x1b0b2e['error'][_0x029d('0x1b')]);return _0x1aca1a(_0x1b0b2e[_0x029d('0x19')][_0x029d('0x1b')]);}logger[_0x029d('0x19')](_0x029d('0x14'),_0x4725ac,_0x1b0b2e[_0x029d('0x19')]['message']);return _0x197706(_0x1b0b2e[_0x029d('0x19')][_0x029d('0x1b')]);}else{logger[_0x029d('0x1c')](_0x029d('0x14'),_0x4725ac,'request\x20sent');_0x197706(_0x1b0b2e[_0x029d('0x1d')][_0x029d('0x1b')]);}})[_0x029d('0x1e')](function(_0x25c081){logger[_0x029d('0x19')](_0x029d('0x14'),_0x4725ac,_0x25c081);_0x1aca1a(_0x25c081);});});}exports[_0x029d('0x1f')]=function(_0x1688f4){var _0xeff588=this;return new Promise(function(_0x3ed2f4,_0x420125){return db[_0x029d('0x20')][_0x029d('0x21')]({'raw':_0x1688f4[_0x029d('0x22')]?_0x1688f4[_0x029d('0x22')][_0x029d('0x23')]===undefined?!![]:![]:!![],'where':_0x1688f4[_0x029d('0x22')]?_0x1688f4[_0x029d('0x22')][_0x029d('0x24')]||null:null,'attributes':_0x1688f4['options']?_0x1688f4[_0x029d('0x22')][_0x029d('0x25')]||null:null,'limit':_0x1688f4[_0x029d('0x22')]?_0x1688f4[_0x029d('0x22')][_0x029d('0x26')]||null:null,'include':_0x1688f4[_0x029d('0x22')]?_0x1688f4[_0x029d('0x22')][_0x029d('0x27')]?_[_0x029d('0x28')](_0x1688f4['options']['include'],function(_0x2abec9){return{'model':db[_0x2abec9['model']],'as':_0x2abec9['as'],'attributes':_0x2abec9[_0x029d('0x25')],'include':_0x2abec9[_0x029d('0x27')]?_[_0x029d('0x28')](_0x2abec9[_0x029d('0x27')],function(_0x4176e5){return{'model':db[_0x4176e5['model']],'as':_0x4176e5['as'],'attributes':_0x4176e5[_0x029d('0x25')],'include':_0x4176e5[_0x029d('0x27')]?_[_0x029d('0x28')](_0x4176e5[_0x029d('0x27')],function(_0x1055b2){return{'model':db[_0x1055b2[_0x029d('0x29')]],'as':_0x1055b2['as'],'attributes':_0x1055b2[_0x029d('0x25')]};}):[]};}):[]};}):[]:[]})[_0x029d('0x2a')](function(_0x45250){logger[_0x029d('0x1c')](_0x029d('0x1f'),_0x1688f4);logger[_0x029d('0x16')](_0x029d('0x1f'),_0x1688f4,JSON[_0x029d('0x18')](_0x45250));_0x3ed2f4(_0x45250);})['catch'](function(_0x334a7e){logger[_0x029d('0x19')]('GetOpenchannelQueue',_0x334a7e[_0x029d('0x1b')],_0x1688f4);_0x420125(_0xeff588['error'](0x1f4,_0x334a7e['message']));});});};exports['ShowOpenchannelQueue']=function(_0x1ff1e0){var _0x1363cd=this;return new Promise(function(_0x4ef667,_0x174fed){return db[_0x029d('0x20')][_0x029d('0x2b')]({'raw':_0x1ff1e0['options']?_0x1ff1e0['options']['raw']===undefined?!![]:![]:!![],'where':_0x1ff1e0[_0x029d('0x22')]?_0x1ff1e0[_0x029d('0x22')][_0x029d('0x24')]||null:null,'attributes':_0x1ff1e0[_0x029d('0x22')]?_0x1ff1e0[_0x029d('0x22')][_0x029d('0x25')]||null:null,'include':_0x1ff1e0[_0x029d('0x22')]?_0x1ff1e0['options']['include']?_['map'](_0x1ff1e0[_0x029d('0x22')][_0x029d('0x27')],function(_0x3c4b66){return{'model':db[_0x3c4b66[_0x029d('0x29')]],'as':_0x3c4b66['as'],'attributes':_0x3c4b66[_0x029d('0x25')],'include':_0x3c4b66[_0x029d('0x27')]?_[_0x029d('0x28')](_0x3c4b66['include'],function(_0x433210){return{'model':db[_0x433210[_0x029d('0x29')]],'as':_0x433210['as'],'attributes':_0x433210['attributes'],'include':_0x433210[_0x029d('0x27')]?_[_0x029d('0x28')](_0x433210[_0x029d('0x27')],function(_0x169a42){return{'model':db[_0x169a42[_0x029d('0x29')]],'as':_0x169a42['as'],'attributes':_0x169a42[_0x029d('0x25')]};}):[]};}):[]};}):[]:[]})[_0x029d('0x2a')](function(_0x183dec){logger['info'](_0x029d('0x2c'),_0x1ff1e0);logger['debug'](_0x029d('0x2c'),_0x1ff1e0,JSON['stringify'](_0x183dec));_0x4ef667(_0x183dec);})['catch'](function(_0x548b31){logger[_0x029d('0x19')](_0x029d('0x2c'),_0x548b31[_0x029d('0x1b')],_0x1ff1e0);_0x174fed(_0x1363cd[_0x029d('0x19')](0x1f4,_0x548b31['message']));});});};
\ No newline at end of file
diff --git a/server/api/openchannelQueue/openchannelQueue.socket.js b/server/api/openchannelQueue/openchannelQueue.socket.js
index 7815e6b..14e5788 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 _0x836b=['./openchannelQueue.events','update','removeListener','register','length','openchannelQueue:'];(function(_0x32ac3c,_0x417ec1){var _0x2b74be=function(_0x57c941){while(--_0x57c941){_0x32ac3c['push'](_0x32ac3c['shift']());}};_0x2b74be(++_0x417ec1);}(_0x836b,0x17a));var _0xb836=function(_0x5d103a,_0x5c9c25){_0x5d103a=_0x5d103a-0x0;var _0x140e0b=_0x836b[_0x5d103a];return _0x140e0b;};'use strict';var OpenchannelQueueEvents=require(_0xb836('0x0'));var events=['save','remove',_0xb836('0x1')];function createListener(_0x1e4b5f,_0x21e675){return function(_0x2c9a7f){_0x21e675['emit'](_0x1e4b5f,_0x2c9a7f);};}function removeListener(_0x1f6613,_0x437405){return function(){OpenchannelQueueEvents[_0xb836('0x2')](_0x1f6613,_0x437405);};}exports[_0xb836('0x3')]=function(_0x3e5d83){for(var _0x16f7e8=0x0,_0xf121e0=events[_0xb836('0x4')];_0x16f7e8<_0xf121e0;_0x16f7e8++){var _0x462d97=events[_0x16f7e8];var _0x3f4da6=createListener(_0xb836('0x5')+_0x462d97,_0x3e5d83);OpenchannelQueueEvents['on'](_0x462d97,_0x3f4da6);}};
\ No newline at end of file
+var _0x994b=['register','openchannelQueue:','./openchannelQueue.events','save','remove','update','emit','removeListener'];(function(_0xe391c1,_0x27eaef){var _0x558743=function(_0x5d638a){while(--_0x5d638a){_0xe391c1['push'](_0xe391c1['shift']());}};_0x558743(++_0x27eaef);}(_0x994b,0x12a));var _0xb994=function(_0x5b58ba,_0x16159f){_0x5b58ba=_0x5b58ba-0x0;var _0xc67099=_0x994b[_0x5b58ba];return _0xc67099;};'use strict';var OpenchannelQueueEvents=require(_0xb994('0x0'));var events=[_0xb994('0x1'),_0xb994('0x2'),_0xb994('0x3')];function createListener(_0x17d8fa,_0x3954f0){return function(_0x5d45c1){_0x3954f0[_0xb994('0x4')](_0x17d8fa,_0x5d45c1);};}function removeListener(_0x36f26b,_0x3d5794){return function(){OpenchannelQueueEvents[_0xb994('0x5')](_0x36f26b,_0x3d5794);};}exports[_0xb994('0x6')]=function(_0x57aef9){for(var _0x88ef5=0x0,_0x413203=events['length'];_0x88ef5<_0x413203;_0x88ef5++){var _0x497636=events[_0x88ef5];var _0x4ee4ba=createListener(_0xb994('0x7')+_0x497636,_0x57aef9);OpenchannelQueueEvents['on'](_0x497636,_0x4ee4ba);}};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/index.js b/server/api/openchannelQueueReport/index.js
index d307b1b..4f48f4e 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 _0x3316=['destroy','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','./openchannelQueueReport.controller','get','isAuthenticated','index','/describe','/:id','show','post','create','put','update','delete'];(function(_0x1d05be,_0x9b5f1d){var _0x4cef9e=function(_0x6dd588){while(--_0x6dd588){_0x1d05be['push'](_0x1d05be['shift']());}};_0x4cef9e(++_0x9b5f1d);}(_0x3316,0x119));var _0x6331=function(_0x4333c0,_0x1b8b7d){_0x4333c0=_0x4333c0-0x0;var _0x1ea60b=_0x3316[_0x4333c0];return _0x1ea60b;};'use strict';var multer=require(_0x6331('0x0'));var util=require(_0x6331('0x1'));var path=require(_0x6331('0x2'));var timeout=require(_0x6331('0x3'));var express=require(_0x6331('0x4'));var router=express[_0x6331('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x6331('0x6'));var config=require('../../config/environment');var controller=require(_0x6331('0x7'));router[_0x6331('0x8')]('/',auth[_0x6331('0x9')](),controller[_0x6331('0xa')]);router[_0x6331('0x8')](_0x6331('0xb'),auth['isAuthenticated'](),controller['describe']);router[_0x6331('0x8')](_0x6331('0xc'),auth[_0x6331('0x9')](),controller[_0x6331('0xd')]);router[_0x6331('0xe')]('/',auth['isAuthenticated'](),controller[_0x6331('0xf')]);router[_0x6331('0x10')](_0x6331('0xc'),auth[_0x6331('0x9')](),controller[_0x6331('0x11')]);router[_0x6331('0x12')](_0x6331('0xc'),auth[_0x6331('0x9')](),controller[_0x6331('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xc7a3=['delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueueReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create','put','update'];(function(_0x2f2d88,_0x33a00a){var _0xb34fd3=function(_0x59fe77){while(--_0x59fe77){_0x2f2d88['push'](_0x2f2d88['shift']());}};_0xb34fd3(++_0x33a00a);}(_0xc7a3,0x10b));var _0x3c7a=function(_0x850c3,_0x1c58d7){_0x850c3=_0x850c3-0x0;var _0xd669a6=_0xc7a3[_0x850c3];return _0xd669a6;};'use strict';var multer=require(_0x3c7a('0x0'));var util=require(_0x3c7a('0x1'));var path=require(_0x3c7a('0x2'));var timeout=require(_0x3c7a('0x3'));var express=require(_0x3c7a('0x4'));var router=express[_0x3c7a('0x5')]();var auth=require(_0x3c7a('0x6'));var interaction=require(_0x3c7a('0x7'));var config=require(_0x3c7a('0x8'));var controller=require(_0x3c7a('0x9'));router[_0x3c7a('0xa')]('/',auth[_0x3c7a('0xb')](),controller[_0x3c7a('0xc')]);router['get'](_0x3c7a('0xd'),auth[_0x3c7a('0xb')](),controller[_0x3c7a('0xe')]);router[_0x3c7a('0xa')](_0x3c7a('0xf'),auth[_0x3c7a('0xb')](),controller[_0x3c7a('0x10')]);router[_0x3c7a('0x11')]('/',auth[_0x3c7a('0xb')](),controller[_0x3c7a('0x12')]);router[_0x3c7a('0x13')]('/:id',auth[_0x3c7a('0xb')](),controller[_0x3c7a('0x14')]);router[_0x3c7a('0x15')](_0x3c7a('0xf'),auth[_0x3c7a('0xb')](),controller[_0x3c7a('0x16')]);module[_0x3c7a('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js
index e912d50..9b476e3 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 _0x09ce=['STRING','DATE','sequelize'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x09ce,0xd7));var _0xe09c=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x09ce[_0x40a045];return _0x1a687c;};'use strict';var moment=require('moment');var Sequelize=require(_0xe09c('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0xe09c('0x1')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0xe09c('0x2')]},'leaveAt':{'type':Sequelize[_0xe09c('0x2')]},'acceptAt':{'type':Sequelize[_0xe09c('0x2')]},'exitAt':{'type':Sequelize[_0xe09c('0x2')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x17b9=['sequelize','exports','STRING','DATE'];(function(_0x31d6b8,_0x2dd463){var _0xc5f68d=function(_0x3eae93){while(--_0x3eae93){_0x31d6b8['push'](_0x31d6b8['shift']());}};_0xc5f68d(++_0x2dd463);}(_0x17b9,0xfc));var _0x917b=function(_0x520454,_0x6b780c){_0x520454=_0x520454-0x0;var _0x2f3996=_0x17b9[_0x520454];return _0x2f3996;};'use strict';var moment=require('moment');var Sequelize=require(_0x917b('0x0'));module[_0x917b('0x1')]={'uniqueid':{'type':Sequelize[_0x917b('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x917b('0x2')]},'joinAt':{'type':Sequelize[_0x917b('0x3')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x917b('0x3')]},'exitAt':{'type':Sequelize[_0x917b('0x3')]},'reason':{'type':Sequelize[_0x917b('0x2')]}};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js
index c585707..08ce371 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 _0x0e56=['sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','catch','show','params','find','create','body','describe','html-pdf','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','count','offset','limit','set','apply','reject','update','then','destroy','sendStatus','error','stack','name','index','map','OpenchannelQueueReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order'];(function(_0x100ea5,_0x2f13b4){var _0x1c331=function(_0x247f46){while(--_0x247f46){_0x100ea5['push'](_0x100ea5['shift']());}};_0x1c331(++_0x2f13b4);}(_0x0e56,0xf5));var _0x60e5=function(_0x19cb1a,_0x4ce1b2){_0x19cb1a=_0x19cb1a-0x0;var _0x399650=_0x0e56[_0x19cb1a];return _0x399650;};'use strict';var pdf=require(_0x60e5('0x0'));var emlformat=require(_0x60e5('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x60e5('0x2'));var jsonpatch=require(_0x60e5('0x3'));var rp=require('request-promise');var moment=require(_0x60e5('0x4'));var BPromise=require(_0x60e5('0x5'));var Mustache=require(_0x60e5('0x6'));var util=require(_0x60e5('0x7'));var path=require(_0x60e5('0x8'));var sox=require(_0x60e5('0x9'));var csv=require(_0x60e5('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x60e5('0xb'));var squel=require(_0x60e5('0xc'));var crypto=require(_0x60e5('0xd'));var jsforce=require(_0x60e5('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x60e5('0xa'));var querystring=require(_0x60e5('0xf'));var Papa=require(_0x60e5('0x10'));var Redis=require(_0x60e5('0x11'));var authService=require(_0x60e5('0x12'));var qs=require(_0x60e5('0x13'));var as=require(_0x60e5('0x14'));var hardwareService=require(_0x60e5('0x15'));var logger=require(_0x60e5('0x16'))(_0x60e5('0x17'));var utils=require(_0x60e5('0x18'));var config=require(_0x60e5('0x19'));var db=require(_0x60e5('0x1a'))['db'];function respondWithStatusCode(_0x15df04,_0x8338f8){_0x8338f8=_0x8338f8||0xcc;return function(_0x697e3){if(_0x697e3){return _0x15df04['sendStatus'](_0x8338f8);}return _0x15df04[_0x60e5('0x1b')](_0x8338f8)['end']();};}function respondWithResult(_0x5864ab,_0x1180a0){_0x1180a0=_0x1180a0||0xc8;return function(_0xb5fac2){if(_0xb5fac2){return _0x5864ab['status'](_0x1180a0)[_0x60e5('0x1c')](_0xb5fac2);}};}function respondWithFilteredResult(_0xa12117,_0x426620){return function(_0x3ee0b7){if(_0x3ee0b7){var _0x546cfc=_0x3ee0b7[_0x60e5('0x1d')],_0x23a88e=_0x426620[_0x60e5('0x1e')],_0x622ead=_0x426620[_0x60e5('0x1e')]+_0x426620[_0x60e5('0x1f')],_0x3fbc43;if(_0x622ead>=_0x546cfc){_0x622ead=_0x546cfc;_0x3fbc43=0xc8;}else{_0x3fbc43=0xce;}_0xa12117[_0x60e5('0x1b')](_0x3fbc43);return _0xa12117[_0x60e5('0x20')]('Content-Range',_0x23a88e+'-'+_0x622ead+'/'+_0x546cfc)['json'](_0x3ee0b7);}return null;};}function patchUpdates(_0x55038c){return function(_0x4e2d93){try{jsonpatch[_0x60e5('0x21')](_0x4e2d93,_0x55038c,!![]);}catch(_0x3bea31){return BPromise[_0x60e5('0x22')](_0x3bea31);}return _0x4e2d93['save']();};}function saveUpdates(_0x3478c6,_0x68c78){return function(_0x2069a0){if(_0x2069a0){return _0x2069a0[_0x60e5('0x23')](_0x3478c6)[_0x60e5('0x24')](function(_0x3a9701){return _0x3a9701;});}return null;};}function removeEntity(_0x26829e,_0x184544){return function(_0x443665){if(_0x443665){return _0x443665[_0x60e5('0x25')]()[_0x60e5('0x24')](function(){_0x26829e['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2c29dc,_0x518741){return function(_0x5a2b4d){if(!_0x5a2b4d){_0x2c29dc[_0x60e5('0x26')](0x194);}return _0x5a2b4d;};}function handleError(_0x58e43b,_0x200da3){_0x200da3=_0x200da3||0x1f4;return function(_0x2cf444){logger[_0x60e5('0x27')](_0x2cf444[_0x60e5('0x28')]);if(_0x2cf444[_0x60e5('0x29')]){delete _0x2cf444['name'];}_0x58e43b[_0x60e5('0x1b')](_0x200da3)['send'](_0x2cf444);};}exports[_0x60e5('0x2a')]=function(_0x661169,_0x95fe05){var _0x59d16f={},_0xefae42={},_0x1f6eb4={'count':0x0,'rows':[]};var _0x5ed766=_[_0x60e5('0x2b')](db[_0x60e5('0x2c')][_0x60e5('0x2d')],function(_0x49ba26){return{'name':_0x49ba26[_0x60e5('0x2e')],'type':_0x49ba26[_0x60e5('0x2f')][_0x60e5('0x30')]};});_0xefae42[_0x60e5('0x31')]=_[_0x60e5('0x2b')](_0x5ed766,_0x60e5('0x29'));_0xefae42[_0x60e5('0x32')]=_[_0x60e5('0x33')](_0x661169[_0x60e5('0x32')]);_0xefae42[_0x60e5('0x34')]=_[_0x60e5('0x35')](_0xefae42[_0x60e5('0x31')],_0xefae42['query']);_0x59d16f[_0x60e5('0x36')]=_[_0x60e5('0x35')](_0xefae42[_0x60e5('0x31')],qs[_0x60e5('0x37')](_0x661169['query']['fields']));_0x59d16f['attributes']=_0x59d16f[_0x60e5('0x36')][_0x60e5('0x38')]?_0x59d16f[_0x60e5('0x36')]:_0xefae42[_0x60e5('0x31')];if(!_0x661169[_0x60e5('0x32')]['hasOwnProperty'](_0x60e5('0x39'))){_0x59d16f[_0x60e5('0x1f')]=qs[_0x60e5('0x1f')](_0x661169[_0x60e5('0x32')]['limit']);_0x59d16f['offset']=qs[_0x60e5('0x1e')](_0x661169['query'][_0x60e5('0x1e')]);}_0x59d16f[_0x60e5('0x3a')]=qs[_0x60e5('0x3b')](_0x661169[_0x60e5('0x32')]['sort']);_0x59d16f[_0x60e5('0x3c')]=qs[_0x60e5('0x34')](_[_0x60e5('0x3d')](_0x661169[_0x60e5('0x32')],_0xefae42['filters']));if(_0x661169[_0x60e5('0x32')][_0x60e5('0x3e')]){_0x59d16f[_0x60e5('0x3c')]=_['merge'](_0x59d16f[_0x60e5('0x3c')],{'$or':_[_0x60e5('0x2b')](_0x5ed766,function(_0x2fd9f2){if(_0x2fd9f2[_0x60e5('0x2f')]!==_0x60e5('0x3f')){var _0x1f8fcd={};_0x1f8fcd[_0x2fd9f2['name']]={'$like':'%'+_0x661169['query'][_0x60e5('0x3e')]+'%'};return _0x1f8fcd;}})});}_0x59d16f=_[_0x60e5('0x40')]({},_0x59d16f,_0x661169[_0x60e5('0x41')]);var _0x4f4355={'where':_0x59d16f['where']};return db[_0x60e5('0x2c')][_0x60e5('0x1d')](_0x4f4355)[_0x60e5('0x24')](function(_0x284b58){_0x1f6eb4['count']=_0x284b58;if(_0x661169[_0x60e5('0x32')][_0x60e5('0x42')]){_0x59d16f[_0x60e5('0x43')]=[{'all':!![]}];}return db[_0x60e5('0x2c')][_0x60e5('0x44')](_0x59d16f);})[_0x60e5('0x24')](function(_0xaa7481){_0x1f6eb4['rows']=_0xaa7481;return _0x1f6eb4;})[_0x60e5('0x24')](respondWithFilteredResult(_0x95fe05,_0x59d16f))[_0x60e5('0x45')](handleError(_0x95fe05,null));};exports[_0x60e5('0x46')]=function(_0x478113,_0x24b090){var _0x740a1e={'raw':!![],'where':{'id':_0x478113[_0x60e5('0x47')]['id']}},_0x2d2803={};_0x2d2803[_0x60e5('0x31')]=_[_0x60e5('0x33')](db['OpenchannelQueueReport'][_0x60e5('0x2d')]);_0x2d2803[_0x60e5('0x32')]=_['keys'](_0x478113[_0x60e5('0x32')]);_0x2d2803[_0x60e5('0x34')]=_[_0x60e5('0x35')](_0x2d2803[_0x60e5('0x31')],_0x2d2803[_0x60e5('0x32')]);_0x740a1e[_0x60e5('0x36')]=_[_0x60e5('0x35')](_0x2d2803[_0x60e5('0x31')],qs[_0x60e5('0x37')](_0x478113['query'][_0x60e5('0x37')]));_0x740a1e[_0x60e5('0x36')]=_0x740a1e[_0x60e5('0x36')]['length']?_0x740a1e['attributes']:_0x2d2803[_0x60e5('0x31')];if(_0x478113[_0x60e5('0x32')][_0x60e5('0x42')]){_0x740a1e[_0x60e5('0x43')]=[{'all':!![]}];}_0x740a1e=_[_0x60e5('0x40')]({},_0x740a1e,_0x478113['options']);return db[_0x60e5('0x2c')][_0x60e5('0x48')](_0x740a1e)['then'](handleEntityNotFound(_0x24b090,null))['then'](respondWithResult(_0x24b090,null))[_0x60e5('0x45')](handleError(_0x24b090,null));};exports[_0x60e5('0x49')]=function(_0x212efe,_0x343a70){return db['OpenchannelQueueReport']['create'](_0x212efe[_0x60e5('0x4a')],{})[_0x60e5('0x24')](respondWithResult(_0x343a70,0xc9))[_0x60e5('0x45')](handleError(_0x343a70,null));};exports['update']=function(_0x253d96,_0x41d74c){if(_0x253d96[_0x60e5('0x4a')]['id']){delete _0x253d96[_0x60e5('0x4a')]['id'];}return db[_0x60e5('0x2c')]['find']({'where':{'id':_0x253d96['params']['id']}})['then'](handleEntityNotFound(_0x41d74c,null))[_0x60e5('0x24')](saveUpdates(_0x253d96[_0x60e5('0x4a')],null))[_0x60e5('0x24')](respondWithResult(_0x41d74c,null))[_0x60e5('0x45')](handleError(_0x41d74c,null));};exports[_0x60e5('0x25')]=function(_0x3ea0a6,_0x440338){return db[_0x60e5('0x2c')]['find']({'where':{'id':_0x3ea0a6[_0x60e5('0x47')]['id']}})[_0x60e5('0x24')](handleEntityNotFound(_0x440338,null))[_0x60e5('0x24')](removeEntity(_0x440338,null))[_0x60e5('0x45')](handleError(_0x440338,null));};exports[_0x60e5('0x4b')]=function(_0x27c921,_0x5b1944){return db[_0x60e5('0x2c')][_0x60e5('0x4b')]()[_0x60e5('0x24')](respondWithResult(_0x5b1944,null))[_0x60e5('0x45')](handleError(_0x5b1944,null));};
\ No newline at end of file
+var _0x9f0e=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','reject','save','update','destroy','then','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','merge','VIRTUAL','filter','OpenchannelQueueReport','includeAll','include','findAll','rows','catch','options','find','body','params','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis'];(function(_0x4d3b50,_0x362d0c){var _0x257998=function(_0x500790){while(--_0x500790){_0x4d3b50['push'](_0x4d3b50['shift']());}};_0x257998(++_0x362d0c);}(_0x9f0e,0x116));var _0xe9f0=function(_0x4bd2c3,_0x9de6c1){_0x4bd2c3=_0x4bd2c3-0x0;var _0x52e14c=_0x9f0e[_0x4bd2c3];return _0x52e14c;};'use strict';var pdf=require(_0xe9f0('0x0'));var emlformat=require(_0xe9f0('0x1'));var rimraf=require(_0xe9f0('0x2'));var zipdir=require(_0xe9f0('0x3'));var jsonpatch=require(_0xe9f0('0x4'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xe9f0('0x5'));var Mustache=require(_0xe9f0('0x6'));var util=require(_0xe9f0('0x7'));var path=require(_0xe9f0('0x8'));var sox=require(_0xe9f0('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xe9f0('0xa'));var squel=require(_0xe9f0('0xb'));var crypto=require(_0xe9f0('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xe9f0('0xd'));var toCsv=require(_0xe9f0('0xe'));var querystring=require(_0xe9f0('0xf'));var Papa=require(_0xe9f0('0x10'));var Redis=require(_0xe9f0('0x11'));var authService=require(_0xe9f0('0x12'));var qs=require(_0xe9f0('0x13'));var as=require(_0xe9f0('0x14'));var hardwareService=require(_0xe9f0('0x15'));var logger=require('../../config/logger')(_0xe9f0('0x16'));var utils=require(_0xe9f0('0x17'));var config=require(_0xe9f0('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x207fac,_0x586763){_0x586763=_0x586763||0xcc;return function(_0x367545){if(_0x367545){return _0x207fac[_0xe9f0('0x19')](_0x586763);}return _0x207fac[_0xe9f0('0x1a')](_0x586763)[_0xe9f0('0x1b')]();};}function respondWithResult(_0x55a388,_0x2cf75d){_0x2cf75d=_0x2cf75d||0xc8;return function(_0x5a10c6){if(_0x5a10c6){return _0x55a388[_0xe9f0('0x1a')](_0x2cf75d)[_0xe9f0('0x1c')](_0x5a10c6);}};}function respondWithFilteredResult(_0x3800e8,_0x59320d){return function(_0x28bfac){if(_0x28bfac){var _0x33e9e4=_0x28bfac[_0xe9f0('0x1d')],_0x2e68ef=_0x59320d[_0xe9f0('0x1e')],_0x598eee=_0x59320d[_0xe9f0('0x1e')]+_0x59320d[_0xe9f0('0x1f')],_0xaa7aa6;if(_0x598eee>=_0x33e9e4){_0x598eee=_0x33e9e4;_0xaa7aa6=0xc8;}else{_0xaa7aa6=0xce;}_0x3800e8[_0xe9f0('0x1a')](_0xaa7aa6);return _0x3800e8[_0xe9f0('0x20')]('Content-Range',_0x2e68ef+'-'+_0x598eee+'/'+_0x33e9e4)[_0xe9f0('0x1c')](_0x28bfac);}return null;};}function patchUpdates(_0x19e090){return function(_0x232f2c){try{jsonpatch['apply'](_0x232f2c,_0x19e090,!![]);}catch(_0x35e841){return BPromise[_0xe9f0('0x21')](_0x35e841);}return _0x232f2c[_0xe9f0('0x22')]();};}function saveUpdates(_0x43f399,_0x5ba788){return function(_0x33f143){if(_0x33f143){return _0x33f143[_0xe9f0('0x23')](_0x43f399)['then'](function(_0x51e03f){return _0x51e03f;});}return null;};}function removeEntity(_0x4cc403,_0x12fe9f){return function(_0xa1ddc){if(_0xa1ddc){return _0xa1ddc[_0xe9f0('0x24')]()[_0xe9f0('0x25')](function(){_0x4cc403[_0xe9f0('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x229fe0,_0x38b7ee){return function(_0x437d43){if(!_0x437d43){_0x229fe0[_0xe9f0('0x19')](0x194);}return _0x437d43;};}function handleError(_0x3ca991,_0x372ffd){_0x372ffd=_0x372ffd||0x1f4;return function(_0x37c0fc){logger[_0xe9f0('0x26')](_0x37c0fc[_0xe9f0('0x27')]);if(_0x37c0fc[_0xe9f0('0x28')]){delete _0x37c0fc['name'];}_0x3ca991[_0xe9f0('0x1a')](_0x372ffd)[_0xe9f0('0x29')](_0x37c0fc);};}exports[_0xe9f0('0x2a')]=function(_0x1a8478,_0x4cf1b1){var _0x212a38={},_0x2613fd={},_0x856ac8={'count':0x0,'rows':[]};var _0x1f98a7=_[_0xe9f0('0x2b')](db['OpenchannelQueueReport'][_0xe9f0('0x2c')],function(_0xdc16bc){return{'name':_0xdc16bc[_0xe9f0('0x2d')],'type':_0xdc16bc[_0xe9f0('0x2e')][_0xe9f0('0x2f')]};});_0x2613fd[_0xe9f0('0x30')]=_[_0xe9f0('0x2b')](_0x1f98a7,_0xe9f0('0x28'));_0x2613fd[_0xe9f0('0x31')]=_[_0xe9f0('0x32')](_0x1a8478[_0xe9f0('0x31')]);_0x2613fd[_0xe9f0('0x33')]=_[_0xe9f0('0x34')](_0x2613fd[_0xe9f0('0x30')],_0x2613fd[_0xe9f0('0x31')]);_0x212a38[_0xe9f0('0x35')]=_[_0xe9f0('0x34')](_0x2613fd[_0xe9f0('0x30')],qs[_0xe9f0('0x36')](_0x1a8478[_0xe9f0('0x31')][_0xe9f0('0x36')]));_0x212a38[_0xe9f0('0x35')]=_0x212a38[_0xe9f0('0x35')][_0xe9f0('0x37')]?_0x212a38['attributes']:_0x2613fd['model'];if(!_0x1a8478['query'][_0xe9f0('0x38')]('nolimit')){_0x212a38[_0xe9f0('0x1f')]=qs[_0xe9f0('0x1f')](_0x1a8478['query'][_0xe9f0('0x1f')]);_0x212a38['offset']=qs['offset'](_0x1a8478['query'][_0xe9f0('0x1e')]);}_0x212a38[_0xe9f0('0x39')]=qs['sort'](_0x1a8478[_0xe9f0('0x31')][_0xe9f0('0x3a')]);_0x212a38[_0xe9f0('0x3b')]=qs['filters'](_['pick'](_0x1a8478[_0xe9f0('0x31')],_0x2613fd[_0xe9f0('0x33')]));if(_0x1a8478[_0xe9f0('0x31')]['filter']){_0x212a38[_0xe9f0('0x3b')]=_[_0xe9f0('0x3c')](_0x212a38[_0xe9f0('0x3b')],{'$or':_[_0xe9f0('0x2b')](_0x1f98a7,function(_0x2b38de){if(_0x2b38de['type']!==_0xe9f0('0x3d')){var _0x3a2b23={};_0x3a2b23[_0x2b38de[_0xe9f0('0x28')]]={'$like':'%'+_0x1a8478['query'][_0xe9f0('0x3e')]+'%'};return _0x3a2b23;}})});}_0x212a38=_[_0xe9f0('0x3c')]({},_0x212a38,_0x1a8478['options']);var _0x317278={'where':_0x212a38['where']};return db[_0xe9f0('0x3f')]['count'](_0x317278)['then'](function(_0x51eda3){_0x856ac8['count']=_0x51eda3;if(_0x1a8478['query'][_0xe9f0('0x40')]){_0x212a38[_0xe9f0('0x41')]=[{'all':!![]}];}return db[_0xe9f0('0x3f')][_0xe9f0('0x42')](_0x212a38);})[_0xe9f0('0x25')](function(_0xd9b61b){_0x856ac8[_0xe9f0('0x43')]=_0xd9b61b;return _0x856ac8;})[_0xe9f0('0x25')](respondWithFilteredResult(_0x4cf1b1,_0x212a38))[_0xe9f0('0x44')](handleError(_0x4cf1b1,null));};exports['show']=function(_0x1e2016,_0x3eeea3){var _0x36b00a={'raw':!![],'where':{'id':_0x1e2016['params']['id']}},_0x571366={};_0x571366[_0xe9f0('0x30')]=_['keys'](db[_0xe9f0('0x3f')][_0xe9f0('0x2c')]);_0x571366[_0xe9f0('0x31')]=_[_0xe9f0('0x32')](_0x1e2016['query']);_0x571366[_0xe9f0('0x33')]=_[_0xe9f0('0x34')](_0x571366[_0xe9f0('0x30')],_0x571366[_0xe9f0('0x31')]);_0x36b00a[_0xe9f0('0x35')]=_['intersection'](_0x571366[_0xe9f0('0x30')],qs[_0xe9f0('0x36')](_0x1e2016[_0xe9f0('0x31')][_0xe9f0('0x36')]));_0x36b00a[_0xe9f0('0x35')]=_0x36b00a['attributes'][_0xe9f0('0x37')]?_0x36b00a['attributes']:_0x571366['model'];if(_0x1e2016[_0xe9f0('0x31')][_0xe9f0('0x40')]){_0x36b00a['include']=[{'all':!![]}];}_0x36b00a=_[_0xe9f0('0x3c')]({},_0x36b00a,_0x1e2016[_0xe9f0('0x45')]);return db[_0xe9f0('0x3f')][_0xe9f0('0x46')](_0x36b00a)[_0xe9f0('0x25')](handleEntityNotFound(_0x3eeea3,null))[_0xe9f0('0x25')](respondWithResult(_0x3eeea3,null))[_0xe9f0('0x44')](handleError(_0x3eeea3,null));};exports['create']=function(_0x8b8da3,_0x4a6e2a){return db[_0xe9f0('0x3f')]['create'](_0x8b8da3[_0xe9f0('0x47')],{})['then'](respondWithResult(_0x4a6e2a,0xc9))[_0xe9f0('0x44')](handleError(_0x4a6e2a,null));};exports[_0xe9f0('0x23')]=function(_0x422324,_0x4c94e9){if(_0x422324[_0xe9f0('0x47')]['id']){delete _0x422324[_0xe9f0('0x47')]['id'];}return db[_0xe9f0('0x3f')][_0xe9f0('0x46')]({'where':{'id':_0x422324[_0xe9f0('0x48')]['id']}})[_0xe9f0('0x25')](handleEntityNotFound(_0x4c94e9,null))[_0xe9f0('0x25')](saveUpdates(_0x422324[_0xe9f0('0x47')],null))[_0xe9f0('0x25')](respondWithResult(_0x4c94e9,null))[_0xe9f0('0x44')](handleError(_0x4c94e9,null));};exports[_0xe9f0('0x24')]=function(_0x1325a2,_0x57beee){return db['OpenchannelQueueReport'][_0xe9f0('0x46')]({'where':{'id':_0x1325a2[_0xe9f0('0x48')]['id']}})[_0xe9f0('0x25')](handleEntityNotFound(_0x57beee,null))['then'](removeEntity(_0x57beee,null))[_0xe9f0('0x44')](handleError(_0x57beee,null));};exports['describe']=function(_0x323e1e,_0x3c69c0){return db[_0xe9f0('0x3f')][_0xe9f0('0x49')]()['then'](respondWithResult(_0x3c69c0,null))[_0xe9f0('0x44')](handleError(_0x3c69c0,null));};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.model.js b/server/api/openchannelQueueReport/openchannelQueueReport.model.js
index 0de12a5..c476059 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 _0x4812=['report_openchannel_queue','uniqueid','lodash','util','api','moment','bluebird','request-promise','rimraf','./openchannelQueueReport.attributes','define','OpenchannelQueueReport'];(function(_0x45a72a,_0x43d983){var _0x28744b=function(_0x3ec478){while(--_0x3ec478){_0x45a72a['push'](_0x45a72a['shift']());}};_0x28744b(++_0x43d983);}(_0x4812,0x10a));var _0x2481=function(_0x358f00,_0x5f311e){_0x358f00=_0x358f00-0x0;var _0x3c47a6=_0x4812[_0x358f00];return _0x3c47a6;};'use strict';var _=require(_0x2481('0x0'));var util=require(_0x2481('0x1'));var logger=require('../../config/logger')(_0x2481('0x2'));var moment=require(_0x2481('0x3'));var BPromise=require(_0x2481('0x4'));var rp=require(_0x2481('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2481('0x6'));var config=require('../../config/environment');var attributes=require(_0x2481('0x7'));module['exports']=function(_0x18f3f6,_0x314499){return _0x18f3f6[_0x2481('0x8')](_0x2481('0x9'),attributes,{'tableName':_0x2481('0xa'),'paranoid':![],'indexes':[{'name':_0x2481('0xb'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x80fb=['./openchannelQueueReport.attributes','exports','define','OpenchannelQueueReport','report_openchannel_queue','uniqueid','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x3c4fd4,_0x31ba50){var _0x4f8458=function(_0x5e1d3e){while(--_0x5e1d3e){_0x3c4fd4['push'](_0x3c4fd4['shift']());}};_0x4f8458(++_0x31ba50);}(_0x80fb,0x11e));var _0xb80f=function(_0x3c2a69,_0x4c8b41){_0x3c2a69=_0x3c2a69-0x0;var _0x596bc8=_0x80fb[_0x3c2a69];return _0x596bc8;};'use strict';var _=require('lodash');var util=require(_0xb80f('0x0'));var logger=require(_0xb80f('0x1'))('api');var moment=require(_0xb80f('0x2'));var BPromise=require(_0xb80f('0x3'));var rp=require(_0xb80f('0x4'));var fs=require('fs');var path=require(_0xb80f('0x5'));var rimraf=require(_0xb80f('0x6'));var config=require(_0xb80f('0x7'));var attributes=require(_0xb80f('0x8'));module[_0xb80f('0x9')]=function(_0x52d81c,_0x1676a9){return _0x52d81c[_0xb80f('0xa')](_0xb80f('0xb'),attributes,{'tableName':_0xb80f('0xc'),'paranoid':![],'indexes':[{'name':_0xb80f('0xd'),'fields':[_0xb80f('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js
index 3196940..42d75b9 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 _0xbff5=['randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','request','OpenchannelQueueReport,\x20%s,\x20%s','request\x20sent','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','create','options','raw','then','CreateOpenchannelQueueReport','debug','catch','UpdateOpenchannelQueueReport','OpenchannelQueueReport','body','where','lodash','util','moment','bluebird'];(function(_0x440f25,_0x3146fd){var _0x154db5=function(_0x5f3673){while(--_0x5f3673){_0x440f25['push'](_0x440f25['shift']());}};_0x154db5(++_0x3146fd);}(_0xbff5,0x1bc));var _0x5bff=function(_0x1c5575,_0x26097b){_0x1c5575=_0x1c5575-0x0;var _0x4e1cfc=_0xbff5[_0x1c5575];return _0x4e1cfc;};'use strict';var _=require(_0x5bff('0x0'));var util=require(_0x5bff('0x1'));var moment=require(_0x5bff('0x2'));var BPromise=require(_0x5bff('0x3'));var rs=require(_0x5bff('0x4'));var fs=require('fs');var Redis=require(_0x5bff('0x5'));var db=require(_0x5bff('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x5bff('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x5bff('0x8'));var client=jayson[_0x5bff('0x9')][_0x5bff('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xa54c57,_0x43605a,_0xd4b9dc){return new BPromise(function(_0x1acb49,_0x139c99){return client[_0x5bff('0xb')](_0xa54c57,_0xd4b9dc)['then'](function(_0x20e26f){logger['info'](_0x5bff('0xc'),_0x43605a,_0x5bff('0xd'));logger['debug'](_0x5bff('0xe'),_0x43605a,'request\x20sent',JSON[_0x5bff('0xf')](_0x20e26f));if(_0x20e26f['error']){if(_0x20e26f[_0x5bff('0x10')][_0x5bff('0x11')]===0x1f4){logger['error'](_0x5bff('0xc'),_0x43605a,_0x20e26f['error'][_0x5bff('0x12')]);return _0x139c99(_0x20e26f[_0x5bff('0x10')]['message']);}logger[_0x5bff('0x10')](_0x5bff('0xc'),_0x43605a,_0x20e26f['error']['message']);return _0x1acb49(_0x20e26f[_0x5bff('0x10')][_0x5bff('0x12')]);}else{logger[_0x5bff('0x13')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x43605a,_0x5bff('0xd'));_0x1acb49(_0x20e26f[_0x5bff('0x14')][_0x5bff('0x12')]);}})['catch'](function(_0x3ffbbc){logger[_0x5bff('0x10')](_0x5bff('0xc'),_0x43605a,_0x3ffbbc);_0x139c99(_0x3ffbbc);});});}exports['CreateOpenchannelQueueReport']=function(_0xc9fbc3){var _0x279c22=this;return new Promise(function(_0x36653b,_0x32cf60){return db['OpenchannelQueueReport'][_0x5bff('0x15')](_0xc9fbc3['body'],{'raw':_0xc9fbc3[_0x5bff('0x16')]?_0xc9fbc3['options'][_0x5bff('0x17')]===undefined?!![]:![]:!![]})[_0x5bff('0x18')](function(_0x2a83ce){logger[_0x5bff('0x13')](_0x5bff('0x19'),_0xc9fbc3);logger[_0x5bff('0x1a')](_0x5bff('0x19'),_0xc9fbc3,JSON[_0x5bff('0xf')](_0x2a83ce));_0x36653b(_0x2a83ce);})[_0x5bff('0x1b')](function(_0x490bc1){logger[_0x5bff('0x10')](_0x5bff('0x19'),_0x490bc1[_0x5bff('0x12')],_0xc9fbc3);_0x32cf60(_0x279c22[_0x5bff('0x10')](0x1f4,_0x490bc1[_0x5bff('0x12')]));});});};exports[_0x5bff('0x1c')]=function(_0x3913fd){var _0x1ea853=this;return new Promise(function(_0x5e2ae8,_0x5741d9){return db[_0x5bff('0x1d')]['update'](_0x3913fd[_0x5bff('0x1e')],{'raw':_0x3913fd[_0x5bff('0x16')]?_0x3913fd[_0x5bff('0x16')][_0x5bff('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3913fd[_0x5bff('0x16')]?_0x3913fd[_0x5bff('0x16')][_0x5bff('0x1f')]||null:null,'attributes':_0x3913fd[_0x5bff('0x16')]?_0x3913fd['options']['attributes']||null:null,'limit':_0x3913fd[_0x5bff('0x16')]?_0x3913fd[_0x5bff('0x16')]['limit']||null:null})[_0x5bff('0x18')](function(_0x588078){logger['info'](_0x5bff('0x1c'),_0x3913fd);logger['debug'](_0x5bff('0x1c'),_0x3913fd,JSON[_0x5bff('0xf')](_0x588078));_0x5e2ae8(_0x588078);})[_0x5bff('0x1b')](function(_0x11d48a){logger['error'](_0x5bff('0x1c'),_0x11d48a['message'],_0x3913fd);_0x5741d9(_0x1ea853[_0x5bff('0x10')](0x1f4,_0x11d48a['message']));});});};
\ No newline at end of file
+var _0x430c=['limit','lodash','bluebird','randomstring','ioredis','../../config/environment','jayson/promise','http','request','then','info','OpenchannelQueueReport,\x20%s,\x20%s','debug','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','body','options','raw','catch','UpdateOpenchannelQueueReport','OpenchannelQueueReport','where','attributes'];(function(_0x245545,_0x4983b3){var _0x106a5f=function(_0x278277){while(--_0x278277){_0x245545['push'](_0x245545['shift']());}};_0x106a5f(++_0x4983b3);}(_0x430c,0x1a1));var _0xc430=function(_0x725b8e,_0xc22b48){_0x725b8e=_0x725b8e-0x0;var _0x43ac45=_0x430c[_0x725b8e];return _0x43ac45;};'use strict';var _=require(_0xc430('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc430('0x1'));var rs=require(_0xc430('0x2'));var fs=require('fs');var Redis=require(_0xc430('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xc430('0x4'));var jayson=require(_0xc430('0x5'));var client=jayson['client'][_0xc430('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x4de44f,_0x212354,_0x2e51c6){return new BPromise(function(_0x814a90,_0x13ae66){return client[_0xc430('0x7')](_0x4de44f,_0x2e51c6)[_0xc430('0x8')](function(_0x861581){logger[_0xc430('0x9')](_0xc430('0xa'),_0x212354,'request\x20sent');logger[_0xc430('0xb')](_0xc430('0xc'),_0x212354,'request\x20sent',JSON[_0xc430('0xd')](_0x861581));if(_0x861581['error']){if(_0x861581[_0xc430('0xe')]['code']===0x1f4){logger[_0xc430('0xe')](_0xc430('0xa'),_0x212354,_0x861581[_0xc430('0xe')][_0xc430('0xf')]);return _0x13ae66(_0x861581[_0xc430('0xe')][_0xc430('0xf')]);}logger[_0xc430('0xe')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x212354,_0x861581['error'][_0xc430('0xf')]);return _0x814a90(_0x861581[_0xc430('0xe')][_0xc430('0xf')]);}else{logger[_0xc430('0x9')](_0xc430('0xa'),_0x212354,'request\x20sent');_0x814a90(_0x861581[_0xc430('0x10')]['message']);}})['catch'](function(_0x2e7987){logger[_0xc430('0xe')](_0xc430('0xa'),_0x212354,_0x2e7987);_0x13ae66(_0x2e7987);});});}exports['CreateOpenchannelQueueReport']=function(_0x5d3acc){var _0x36d112=this;return new Promise(function(_0x4c1937,_0x2bcb21){return db['OpenchannelQueueReport']['create'](_0x5d3acc[_0xc430('0x11')],{'raw':_0x5d3acc['options']?_0x5d3acc[_0xc430('0x12')][_0xc430('0x13')]===undefined?!![]:![]:!![]})[_0xc430('0x8')](function(_0x1f90bb){logger[_0xc430('0x9')]('CreateOpenchannelQueueReport',_0x5d3acc);logger[_0xc430('0xb')]('CreateOpenchannelQueueReport',_0x5d3acc,JSON['stringify'](_0x1f90bb));_0x4c1937(_0x1f90bb);})[_0xc430('0x14')](function(_0x2ea352){logger[_0xc430('0xe')]('CreateOpenchannelQueueReport',_0x2ea352[_0xc430('0xf')],_0x5d3acc);_0x2bcb21(_0x36d112['error'](0x1f4,_0x2ea352[_0xc430('0xf')]));});});};exports[_0xc430('0x15')]=function(_0x4efecd){var _0x31b4f1=this;return new Promise(function(_0x3cdbd3,_0x48f67a){return db[_0xc430('0x16')]['update'](_0x4efecd[_0xc430('0x11')],{'raw':_0x4efecd['options']?_0x4efecd[_0xc430('0x12')][_0xc430('0x13')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4efecd['options']?_0x4efecd[_0xc430('0x12')][_0xc430('0x17')]||null:null,'attributes':_0x4efecd[_0xc430('0x12')]?_0x4efecd[_0xc430('0x12')][_0xc430('0x18')]||null:null,'limit':_0x4efecd['options']?_0x4efecd[_0xc430('0x12')][_0xc430('0x19')]||null:null})[_0xc430('0x8')](function(_0x1591e3){logger['info'](_0xc430('0x15'),_0x4efecd);logger['debug'](_0xc430('0x15'),_0x4efecd,JSON['stringify'](_0x1591e3));_0x3cdbd3(_0x1591e3);})[_0xc430('0x14')](function(_0x1045c0){logger[_0xc430('0xe')](_0xc430('0x15'),_0x1045c0['message'],_0x4efecd);_0x48f67a(_0x31b4f1[_0xc430('0xe')](0x1f4,_0x1045c0[_0xc430('0xf')]));});});};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/index.js b/server/api/openchannelTransferReport/index.js
index d1e9b33..948cc8a 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 _0xa9e0=['put','destroy','exports','multer','util','path','Router','../../components/interaction/service','../../config/environment','./openchannelTransferReport.controller','get','isAuthenticated','/describe','/:id','post','create'];(function(_0x4ca333,_0x1218a3){var _0x13b2e1=function(_0x1eaf45){while(--_0x1eaf45){_0x4ca333['push'](_0x4ca333['shift']());}};_0x13b2e1(++_0x1218a3);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0xa9e0[_0xf50820];return _0x2a9b10;};'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['describe']);router['get'](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth[_0x0a9e('0x8')](),controller[_0x0a9e('0xc')]);router[_0x0a9e('0xd')](_0x0a9e('0xa'),auth[_0x0a9e('0x8')](),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xe')]);module[_0x0a9e('0xf')]=router;
\ No newline at end of file
+var _0xa9e0=['put','destroy','exports','multer','util','path','Router','../../components/interaction/service','../../config/environment','./openchannelTransferReport.controller','get','isAuthenticated','/describe','/:id','post','create'];(function(_0x48961c,_0x280e9d){var _0x1d895d=function(_0x248ffa){while(--_0x248ffa){_0x48961c['push'](_0x48961c['shift']());}};_0x1d895d(++_0x280e9d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x37bd26,_0x5ad346){_0x37bd26=_0x37bd26-0x0;var _0xe83dc4=_0xa9e0[_0x37bd26];return _0xe83dc4;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var 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['describe']);router['get'](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth[_0x0a9e('0x8')](),controller[_0x0a9e('0xc')]);router[_0x0a9e('0xd')](_0x0a9e('0xa'),auth[_0x0a9e('0x8')](),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xe')]);module[_0x0a9e('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js
index 28cbe9a..6df2bc5 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 _0x1a17=['exports','STRING','ENUM','account','agent','queue','DATE','moment'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x1a17,0xdf));var _0x71a1=function(_0x1b6c6d,_0x2983b0){_0x1b6c6d=_0x1b6c6d-0x0;var _0x290d9d=_0x1a17[_0x1b6c6d];return _0x290d9d;};'use strict';var moment=require(_0x71a1('0x0'));var Sequelize=require('sequelize');module[_0x71a1('0x1')]={'uniqueid':{'type':Sequelize[_0x71a1('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x71a1('0x3')](_0x71a1('0x4'),_0x71a1('0x5'),'queue'),'allowNull':![],'defaultValue':_0x71a1('0x6')},'transferredAt':{'type':Sequelize[_0x71a1('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}};
\ No newline at end of file
+var _0x5c5c=['exports','ENUM','queue','DATE','NOW','sequelize'];(function(_0x431c88,_0x2fe00e){var _0x3603a8=function(_0x2ba08c){while(--_0x2ba08c){_0x431c88['push'](_0x431c88['shift']());}};_0x3603a8(++_0x2fe00e);}(_0x5c5c,0x65));var _0xc5c5=function(_0x15251b,_0x1f22f0){_0x15251b=_0x15251b-0x0;var _0x181da3=_0x5c5c[_0x15251b];return _0x181da3;};'use strict';var moment=require('moment');var Sequelize=require(_0xc5c5('0x0'));module[_0xc5c5('0x1')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xc5c5('0x2')]('account','agent',_0xc5c5('0x3')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize[_0xc5c5('0x4')],'allowNull':![],'defaultValue':Sequelize[_0xc5c5('0x5')]}};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js
index 100b7b3..77b0190 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 _0xa799=['order','sort','where','pick','filter','VIRTUAL','options','OpenchannelTransferReport','includeAll','include','findAll','rows','show','params','keys','find','catch','body','describe','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','status','end','json','count','offset','limit','set','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','rawAttributes','key','map','query','filters','intersection','model','attributes','fields','length','hasOwnProperty'];(function(_0x272141,_0x3b04cc){var _0x4ae045=function(_0x4085d7){while(--_0x4085d7){_0x272141['push'](_0x272141['shift']());}};_0x4ae045(++_0x3b04cc);}(_0xa799,0xa1));var _0x9a79=function(_0x511012,_0x5045ec){_0x511012=_0x511012-0x0;var _0x38e37f=_0xa799[_0x511012];return _0x38e37f;};'use strict';var pdf=require(_0x9a79('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x9a79('0x1'));var zipdir=require(_0x9a79('0x2'));var jsonpatch=require(_0x9a79('0x3'));var rp=require(_0x9a79('0x4'));var moment=require(_0x9a79('0x5'));var BPromise=require(_0x9a79('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x9a79('0x7'));var sox=require(_0x9a79('0x8'));var csv=require(_0x9a79('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x9a79('0xa'));var squel=require(_0x9a79('0xb'));var crypto=require('crypto');var jsforce=require(_0x9a79('0xc'));var deskjs=require(_0x9a79('0xd'));var toCsv=require(_0x9a79('0x9'));var querystring=require(_0x9a79('0xe'));var Papa=require(_0x9a79('0xf'));var Redis=require(_0x9a79('0x10'));var authService=require(_0x9a79('0x11'));var qs=require(_0x9a79('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9a79('0x13'))('api');var utils=require(_0x9a79('0x14'));var config=require(_0x9a79('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xd48934,_0x33e8a2){_0x33e8a2=_0x33e8a2||0xcc;return function(_0x3d479d){if(_0x3d479d){return _0xd48934['sendStatus'](_0x33e8a2);}return _0xd48934[_0x9a79('0x16')](_0x33e8a2)[_0x9a79('0x17')]();};}function respondWithResult(_0x22dba7,_0x5e9191){_0x5e9191=_0x5e9191||0xc8;return function(_0xe0f9eb){if(_0xe0f9eb){return _0x22dba7[_0x9a79('0x16')](_0x5e9191)[_0x9a79('0x18')](_0xe0f9eb);}};}function respondWithFilteredResult(_0xd0c538,_0x33fb46){return function(_0x2ecc39){if(_0x2ecc39){var _0x56d615=_0x2ecc39[_0x9a79('0x19')],_0x2033e4=_0x33fb46[_0x9a79('0x1a')],_0x3ee91c=_0x33fb46[_0x9a79('0x1a')]+_0x33fb46[_0x9a79('0x1b')],_0x39f287;if(_0x3ee91c>=_0x56d615){_0x3ee91c=_0x56d615;_0x39f287=0xc8;}else{_0x39f287=0xce;}_0xd0c538[_0x9a79('0x16')](_0x39f287);return _0xd0c538[_0x9a79('0x1c')]('Content-Range',_0x2033e4+'-'+_0x3ee91c+'/'+_0x56d615)[_0x9a79('0x18')](_0x2ecc39);}return null;};}function patchUpdates(_0x47f6bf){return function(_0x2232e9){try{jsonpatch[_0x9a79('0x1d')](_0x2232e9,_0x47f6bf,!![]);}catch(_0x722d76){return BPromise[_0x9a79('0x1e')](_0x722d76);}return _0x2232e9[_0x9a79('0x1f')]();};}function saveUpdates(_0x36c38d,_0x4a4ffd){return function(_0x226416){if(_0x226416){return _0x226416[_0x9a79('0x20')](_0x36c38d)[_0x9a79('0x21')](function(_0xd3f8eb){return _0xd3f8eb;});}return null;};}function removeEntity(_0x39bee7,_0x470219){return function(_0x4665e3){if(_0x4665e3){return _0x4665e3[_0x9a79('0x22')]()['then'](function(){_0x39bee7['status'](0xcc)[_0x9a79('0x17')]();});}};}function handleEntityNotFound(_0x142c81,_0x558fc5){return function(_0x553832){if(!_0x553832){_0x142c81[_0x9a79('0x23')](0x194);}return _0x553832;};}function handleError(_0x50372b,_0xdf5e97){_0xdf5e97=_0xdf5e97||0x1f4;return function(_0x280665){logger[_0x9a79('0x24')](_0x280665[_0x9a79('0x25')]);if(_0x280665[_0x9a79('0x26')]){delete _0x280665[_0x9a79('0x26')];}_0x50372b[_0x9a79('0x16')](_0xdf5e97)[_0x9a79('0x27')](_0x280665);};}exports[_0x9a79('0x28')]=function(_0xc37ead,_0x2770f3){var _0x1c9af9={},_0x17fa1f={},_0x3e8e67={'count':0x0,'rows':[]};var _0x110f54=_['map'](db['OpenchannelTransferReport'][_0x9a79('0x29')],function(_0x21f0e5){return{'name':_0x21f0e5['fieldName'],'type':_0x21f0e5['type'][_0x9a79('0x2a')]};});_0x17fa1f['model']=_[_0x9a79('0x2b')](_0x110f54,'name');_0x17fa1f[_0x9a79('0x2c')]=_['keys'](_0xc37ead[_0x9a79('0x2c')]);_0x17fa1f[_0x9a79('0x2d')]=_[_0x9a79('0x2e')](_0x17fa1f[_0x9a79('0x2f')],_0x17fa1f[_0x9a79('0x2c')]);_0x1c9af9[_0x9a79('0x30')]=_['intersection'](_0x17fa1f[_0x9a79('0x2f')],qs[_0x9a79('0x31')](_0xc37ead[_0x9a79('0x2c')][_0x9a79('0x31')]));_0x1c9af9[_0x9a79('0x30')]=_0x1c9af9[_0x9a79('0x30')][_0x9a79('0x32')]?_0x1c9af9[_0x9a79('0x30')]:_0x17fa1f[_0x9a79('0x2f')];if(!_0xc37ead[_0x9a79('0x2c')][_0x9a79('0x33')]('nolimit')){_0x1c9af9[_0x9a79('0x1b')]=qs[_0x9a79('0x1b')](_0xc37ead[_0x9a79('0x2c')][_0x9a79('0x1b')]);_0x1c9af9[_0x9a79('0x1a')]=qs['offset'](_0xc37ead[_0x9a79('0x2c')][_0x9a79('0x1a')]);}_0x1c9af9[_0x9a79('0x34')]=qs[_0x9a79('0x35')](_0xc37ead[_0x9a79('0x2c')]['sort']);_0x1c9af9[_0x9a79('0x36')]=qs[_0x9a79('0x2d')](_[_0x9a79('0x37')](_0xc37ead[_0x9a79('0x2c')],_0x17fa1f[_0x9a79('0x2d')]));if(_0xc37ead[_0x9a79('0x2c')][_0x9a79('0x38')]){_0x1c9af9[_0x9a79('0x36')]=_['merge'](_0x1c9af9[_0x9a79('0x36')],{'$or':_['map'](_0x110f54,function(_0x134c55){if(_0x134c55['type']!==_0x9a79('0x39')){var _0x54dfff={};_0x54dfff[_0x134c55[_0x9a79('0x26')]]={'$like':'%'+_0xc37ead[_0x9a79('0x2c')][_0x9a79('0x38')]+'%'};return _0x54dfff;}})});}_0x1c9af9=_['merge']({},_0x1c9af9,_0xc37ead[_0x9a79('0x3a')]);var _0x3ed70f={'where':_0x1c9af9['where']};return db[_0x9a79('0x3b')]['count'](_0x3ed70f)[_0x9a79('0x21')](function(_0x1ff643){_0x3e8e67[_0x9a79('0x19')]=_0x1ff643;if(_0xc37ead[_0x9a79('0x2c')][_0x9a79('0x3c')]){_0x1c9af9[_0x9a79('0x3d')]=[{'all':!![]}];}return db[_0x9a79('0x3b')][_0x9a79('0x3e')](_0x1c9af9);})['then'](function(_0x1bab32){_0x3e8e67[_0x9a79('0x3f')]=_0x1bab32;return _0x3e8e67;})[_0x9a79('0x21')](respondWithFilteredResult(_0x2770f3,_0x1c9af9))['catch'](handleError(_0x2770f3,null));};exports[_0x9a79('0x40')]=function(_0x5c6630,_0x54f36a){var _0x42b48a={'raw':!![],'where':{'id':_0x5c6630[_0x9a79('0x41')]['id']}},_0x54b978={};_0x54b978[_0x9a79('0x2f')]=_[_0x9a79('0x42')](db[_0x9a79('0x3b')][_0x9a79('0x29')]);_0x54b978[_0x9a79('0x2c')]=_[_0x9a79('0x42')](_0x5c6630[_0x9a79('0x2c')]);_0x54b978[_0x9a79('0x2d')]=_['intersection'](_0x54b978[_0x9a79('0x2f')],_0x54b978[_0x9a79('0x2c')]);_0x42b48a[_0x9a79('0x30')]=_[_0x9a79('0x2e')](_0x54b978[_0x9a79('0x2f')],qs[_0x9a79('0x31')](_0x5c6630[_0x9a79('0x2c')][_0x9a79('0x31')]));_0x42b48a[_0x9a79('0x30')]=_0x42b48a[_0x9a79('0x30')]['length']?_0x42b48a[_0x9a79('0x30')]:_0x54b978[_0x9a79('0x2f')];if(_0x5c6630[_0x9a79('0x2c')][_0x9a79('0x3c')]){_0x42b48a[_0x9a79('0x3d')]=[{'all':!![]}];}_0x42b48a=_['merge']({},_0x42b48a,_0x5c6630['options']);return db['OpenchannelTransferReport'][_0x9a79('0x43')](_0x42b48a)[_0x9a79('0x21')](handleEntityNotFound(_0x54f36a,null))['then'](respondWithResult(_0x54f36a,null))[_0x9a79('0x44')](handleError(_0x54f36a,null));};exports['create']=function(_0x41493e,_0xc7d2b3){return db[_0x9a79('0x3b')]['create'](_0x41493e[_0x9a79('0x45')],{})['then'](respondWithResult(_0xc7d2b3,0xc9))[_0x9a79('0x44')](handleError(_0xc7d2b3,null));};exports[_0x9a79('0x20')]=function(_0x18677f,_0x5976d2){if(_0x18677f[_0x9a79('0x45')]['id']){delete _0x18677f[_0x9a79('0x45')]['id'];}return db[_0x9a79('0x3b')][_0x9a79('0x43')]({'where':{'id':_0x18677f[_0x9a79('0x41')]['id']}})['then'](handleEntityNotFound(_0x5976d2,null))[_0x9a79('0x21')](saveUpdates(_0x18677f['body'],null))[_0x9a79('0x21')](respondWithResult(_0x5976d2,null))[_0x9a79('0x44')](handleError(_0x5976d2,null));};exports[_0x9a79('0x22')]=function(_0x130b9c,_0x1c173e){return db[_0x9a79('0x3b')][_0x9a79('0x43')]({'where':{'id':_0x130b9c[_0x9a79('0x41')]['id']}})[_0x9a79('0x21')](handleEntityNotFound(_0x1c173e,null))['then'](removeEntity(_0x1c173e,null))[_0x9a79('0x44')](handleError(_0x1c173e,null));};exports[_0x9a79('0x46')]=function(_0x51f459,_0x4a6d5d){return db['OpenchannelTransferReport'][_0x9a79('0x46')]()[_0x9a79('0x21')](respondWithResult(_0x4a6d5d,null))['catch'](handleError(_0x4a6d5d,null));};
\ No newline at end of file
+var _0x76f3=['where','filter','VIRTUAL','findAll','rows','catch','params','rawAttributes','include','merge','options','find','create','update','body','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','save','then','destroy','error','name','send','map','OpenchannelTransferReport','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort'];(function(_0x373417,_0x2fd862){var _0x529e45=function(_0x4aface){while(--_0x4aface){_0x373417['push'](_0x373417['shift']());}};_0x529e45(++_0x2fd862);}(_0x76f3,0x182));var _0x376f=function(_0x364677,_0x2aca45){_0x364677=_0x364677-0x0;var _0x4281ba=_0x76f3[_0x364677];return _0x4281ba;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x376f('0x0'));var rimraf=require(_0x376f('0x1'));var zipdir=require(_0x376f('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x376f('0x3'));var moment=require(_0x376f('0x4'));var BPromise=require(_0x376f('0x5'));var Mustache=require(_0x376f('0x6'));var util=require(_0x376f('0x7'));var path=require(_0x376f('0x8'));var sox=require(_0x376f('0x9'));var csv=require('to-csv');var ejs=require(_0x376f('0xa'));var fs=require('fs');var _=require(_0x376f('0xb'));var squel=require('squel');var crypto=require(_0x376f('0xc'));var jsforce=require(_0x376f('0xd'));var deskjs=require(_0x376f('0xe'));var toCsv=require(_0x376f('0xf'));var querystring=require(_0x376f('0x10'));var Papa=require('papaparse');var Redis=require(_0x376f('0x11'));var authService=require(_0x376f('0x12'));var qs=require(_0x376f('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x376f('0x14'));var logger=require(_0x376f('0x15'))('api');var utils=require(_0x376f('0x16'));var config=require('../../config/environment');var db=require(_0x376f('0x17'))['db'];function respondWithStatusCode(_0x306213,_0x6c7844){_0x6c7844=_0x6c7844||0xcc;return function(_0x488ead){if(_0x488ead){return _0x306213[_0x376f('0x18')](_0x6c7844);}return _0x306213[_0x376f('0x19')](_0x6c7844)[_0x376f('0x1a')]();};}function respondWithResult(_0x5a2598,_0x470038){_0x470038=_0x470038||0xc8;return function(_0x2fe5f4){if(_0x2fe5f4){return _0x5a2598[_0x376f('0x19')](_0x470038)[_0x376f('0x1b')](_0x2fe5f4);}};}function respondWithFilteredResult(_0x2c35b9,_0x3d1f1d){return function(_0x20e2f1){if(_0x20e2f1){var _0x409613=_0x20e2f1[_0x376f('0x1c')],_0x40c785=_0x3d1f1d[_0x376f('0x1d')],_0x43b993=_0x3d1f1d['offset']+_0x3d1f1d['limit'],_0x52371f;if(_0x43b993>=_0x409613){_0x43b993=_0x409613;_0x52371f=0xc8;}else{_0x52371f=0xce;}_0x2c35b9[_0x376f('0x19')](_0x52371f);return _0x2c35b9[_0x376f('0x1e')](_0x376f('0x1f'),_0x40c785+'-'+_0x43b993+'/'+_0x409613)[_0x376f('0x1b')](_0x20e2f1);}return null;};}function patchUpdates(_0x22386e){return function(_0x4ea285){try{jsonpatch[_0x376f('0x20')](_0x4ea285,_0x22386e,!![]);}catch(_0x3e2216){return BPromise[_0x376f('0x21')](_0x3e2216);}return _0x4ea285[_0x376f('0x22')]();};}function saveUpdates(_0x5c9803,_0x4682c7){return function(_0x897694){if(_0x897694){return _0x897694['update'](_0x5c9803)[_0x376f('0x23')](function(_0x24df4e){return _0x24df4e;});}return null;};}function removeEntity(_0x406dbd,_0x30b0d8){return function(_0x3b76e9){if(_0x3b76e9){return _0x3b76e9[_0x376f('0x24')]()['then'](function(){_0x406dbd[_0x376f('0x19')](0xcc)[_0x376f('0x1a')]();});}};}function handleEntityNotFound(_0x4c4e19,_0x5e2870){return function(_0x1bd006){if(!_0x1bd006){_0x4c4e19[_0x376f('0x18')](0x194);}return _0x1bd006;};}function handleError(_0x70fb03,_0x2b2fe8){_0x2b2fe8=_0x2b2fe8||0x1f4;return function(_0x3fdccd){logger[_0x376f('0x25')](_0x3fdccd['stack']);if(_0x3fdccd[_0x376f('0x26')]){delete _0x3fdccd['name'];}_0x70fb03[_0x376f('0x19')](_0x2b2fe8)[_0x376f('0x27')](_0x3fdccd);};}exports['index']=function(_0x4f7f26,_0x39599b){var _0x56894e={},_0x5597a4={},_0x378a28={'count':0x0,'rows':[]};var _0x10969f=_[_0x376f('0x28')](db[_0x376f('0x29')]['rawAttributes'],function(_0x248ce4){return{'name':_0x248ce4[_0x376f('0x2a')],'type':_0x248ce4[_0x376f('0x2b')][_0x376f('0x2c')]};});_0x5597a4[_0x376f('0x2d')]=_[_0x376f('0x28')](_0x10969f,_0x376f('0x26'));_0x5597a4[_0x376f('0x2e')]=_[_0x376f('0x2f')](_0x4f7f26['query']);_0x5597a4[_0x376f('0x30')]=_['intersection'](_0x5597a4[_0x376f('0x2d')],_0x5597a4[_0x376f('0x2e')]);_0x56894e[_0x376f('0x31')]=_[_0x376f('0x32')](_0x5597a4['model'],qs[_0x376f('0x33')](_0x4f7f26[_0x376f('0x2e')][_0x376f('0x33')]));_0x56894e[_0x376f('0x31')]=_0x56894e[_0x376f('0x31')][_0x376f('0x34')]?_0x56894e['attributes']:_0x5597a4[_0x376f('0x2d')];if(!_0x4f7f26[_0x376f('0x2e')][_0x376f('0x35')](_0x376f('0x36'))){_0x56894e['limit']=qs[_0x376f('0x37')](_0x4f7f26['query'][_0x376f('0x37')]);_0x56894e[_0x376f('0x1d')]=qs[_0x376f('0x1d')](_0x4f7f26[_0x376f('0x2e')][_0x376f('0x1d')]);}_0x56894e[_0x376f('0x38')]=qs[_0x376f('0x39')](_0x4f7f26[_0x376f('0x2e')][_0x376f('0x39')]);_0x56894e[_0x376f('0x3a')]=qs[_0x376f('0x30')](_['pick'](_0x4f7f26[_0x376f('0x2e')],_0x5597a4[_0x376f('0x30')]));if(_0x4f7f26[_0x376f('0x2e')][_0x376f('0x3b')]){_0x56894e[_0x376f('0x3a')]=_['merge'](_0x56894e[_0x376f('0x3a')],{'$or':_['map'](_0x10969f,function(_0xd1e0d4){if(_0xd1e0d4[_0x376f('0x2b')]!==_0x376f('0x3c')){var _0x3643ae={};_0x3643ae[_0xd1e0d4['name']]={'$like':'%'+_0x4f7f26['query'][_0x376f('0x3b')]+'%'};return _0x3643ae;}})});}_0x56894e=_['merge']({},_0x56894e,_0x4f7f26['options']);var _0x2da704={'where':_0x56894e['where']};return db['OpenchannelTransferReport']['count'](_0x2da704)[_0x376f('0x23')](function(_0x54add5){_0x378a28[_0x376f('0x1c')]=_0x54add5;if(_0x4f7f26['query']['includeAll']){_0x56894e['include']=[{'all':!![]}];}return db['OpenchannelTransferReport'][_0x376f('0x3d')](_0x56894e);})['then'](function(_0xa0bdb5){_0x378a28[_0x376f('0x3e')]=_0xa0bdb5;return _0x378a28;})[_0x376f('0x23')](respondWithFilteredResult(_0x39599b,_0x56894e))[_0x376f('0x3f')](handleError(_0x39599b,null));};exports['show']=function(_0x1cc606,_0x4b0710){var _0x12e206={'raw':!![],'where':{'id':_0x1cc606[_0x376f('0x40')]['id']}},_0x5b697d={};_0x5b697d[_0x376f('0x2d')]=_[_0x376f('0x2f')](db[_0x376f('0x29')][_0x376f('0x41')]);_0x5b697d[_0x376f('0x2e')]=_['keys'](_0x1cc606[_0x376f('0x2e')]);_0x5b697d[_0x376f('0x30')]=_[_0x376f('0x32')](_0x5b697d[_0x376f('0x2d')],_0x5b697d[_0x376f('0x2e')]);_0x12e206['attributes']=_['intersection'](_0x5b697d['model'],qs[_0x376f('0x33')](_0x1cc606[_0x376f('0x2e')][_0x376f('0x33')]));_0x12e206['attributes']=_0x12e206['attributes'][_0x376f('0x34')]?_0x12e206[_0x376f('0x31')]:_0x5b697d['model'];if(_0x1cc606['query']['includeAll']){_0x12e206[_0x376f('0x42')]=[{'all':!![]}];}_0x12e206=_[_0x376f('0x43')]({},_0x12e206,_0x1cc606[_0x376f('0x44')]);return db[_0x376f('0x29')][_0x376f('0x45')](_0x12e206)['then'](handleEntityNotFound(_0x4b0710,null))[_0x376f('0x23')](respondWithResult(_0x4b0710,null))[_0x376f('0x3f')](handleError(_0x4b0710,null));};exports[_0x376f('0x46')]=function(_0x5f36a1,_0xfc322){return db[_0x376f('0x29')][_0x376f('0x46')](_0x5f36a1['body'],{})['then'](respondWithResult(_0xfc322,0xc9))[_0x376f('0x3f')](handleError(_0xfc322,null));};exports[_0x376f('0x47')]=function(_0x52f936,_0xfe536e){if(_0x52f936[_0x376f('0x48')]['id']){delete _0x52f936['body']['id'];}return db['OpenchannelTransferReport'][_0x376f('0x45')]({'where':{'id':_0x52f936[_0x376f('0x40')]['id']}})[_0x376f('0x23')](handleEntityNotFound(_0xfe536e,null))[_0x376f('0x23')](saveUpdates(_0x52f936[_0x376f('0x48')],null))[_0x376f('0x23')](respondWithResult(_0xfe536e,null))['catch'](handleError(_0xfe536e,null));};exports[_0x376f('0x24')]=function(_0x19d3eb,_0x2aac69){return db[_0x376f('0x29')][_0x376f('0x45')]({'where':{'id':_0x19d3eb[_0x376f('0x40')]['id']}})[_0x376f('0x23')](handleEntityNotFound(_0x2aac69,null))[_0x376f('0x23')](removeEntity(_0x2aac69,null))[_0x376f('0x3f')](handleError(_0x2aac69,null));};exports[_0x376f('0x49')]=function(_0x21c973,_0x5142bc){return db[_0x376f('0x29')]['describe']()[_0x376f('0x23')](respondWithResult(_0x5142bc,null))[_0x376f('0x3f')](handleError(_0x5142bc,null));};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.model.js b/server/api/openchannelTransferReport/openchannelTransferReport.model.js
index dd6c65b..7eb1d96 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 _0xfed7=['define','report_openchannel_transfer','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./openchannelTransferReport.attributes','exports'];(function(_0x5bfc2f,_0x2523a3){var _0x29d2c0=function(_0x4a1657){while(--_0x4a1657){_0x5bfc2f['push'](_0x5bfc2f['shift']());}};_0x29d2c0(++_0x2523a3);}(_0xfed7,0x1d1));var _0x7fed=function(_0x9dd37c,_0x3e255e){_0x9dd37c=_0x9dd37c-0x0;var _0x2a522c=_0xfed7[_0x9dd37c];return _0x2a522c;};'use strict';var _=require(_0x7fed('0x0'));var util=require(_0x7fed('0x1'));var logger=require(_0x7fed('0x2'))(_0x7fed('0x3'));var moment=require(_0x7fed('0x4'));var BPromise=require(_0x7fed('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7fed('0x6'));var rimraf=require(_0x7fed('0x7'));var config=require(_0x7fed('0x8'));var attributes=require(_0x7fed('0x9'));module[_0x7fed('0xa')]=function(_0x51710f,_0x51285a){return _0x51710f[_0x7fed('0xb')]('OpenchannelTransferReport',attributes,{'tableName':_0x7fed('0xc'),'paranoid':![],'indexes':[{'name':_0x7fed('0xd'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xbc8d=['uniqueid','lodash','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./openchannelTransferReport.attributes','exports','define','report_openchannel_transfer'];(function(_0x3bae6c,_0x2a0be4){var _0x2954e8=function(_0x2e7b20){while(--_0x2e7b20){_0x3bae6c['push'](_0x3bae6c['shift']());}};_0x2954e8(++_0x2a0be4);}(_0xbc8d,0x17a));var _0xdbc8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbc8d[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xdbc8('0x0'));var util=require('util');var logger=require(_0xdbc8('0x1'))(_0xdbc8('0x2'));var moment=require(_0xdbc8('0x3'));var BPromise=require(_0xdbc8('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdbc8('0x5'));var rimraf=require(_0xdbc8('0x6'));var config=require(_0xdbc8('0x7'));var attributes=require(_0xdbc8('0x8'));module[_0xdbc8('0x9')]=function(_0x55cd8b,_0x16bee1){return _0x55cd8b[_0xdbc8('0xa')]('OpenchannelTransferReport',attributes,{'tableName':_0xdbc8('0xb'),'paranoid':![],'indexes':[{'name':_0xdbc8('0xc'),'fields':[_0xdbc8('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js
index 90aa3e2..b69bb12 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 _0x5450=['client','http','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/environment','jayson/promise'];(function(_0x8d4fe5,_0x566a74){var _0xf7a309=function(_0x320db5){while(--_0x320db5){_0x8d4fe5['push'](_0x8d4fe5['shift']());}};_0xf7a309(++_0x566a74);}(_0x5450,0x133));var _0x0545=function(_0x1e7b16,_0x4607a1){_0x1e7b16=_0x1e7b16-0x0;var _0x37fadc=_0x5450[_0x1e7b16];return _0x37fadc;};'use strict';var _=require(_0x0545('0x0'));var util=require(_0x0545('0x1'));var moment=require(_0x0545('0x2'));var BPromise=require(_0x0545('0x3'));var rs=require(_0x0545('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x0545('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x0545('0x6'));var jayson=require(_0x0545('0x7'));var client=jayson[_0x0545('0x8')][_0x0545('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4f9021,_0x17e35e,_0x4bd399){return new BPromise(function(_0xbe73b7,_0x32989b){return client[_0x0545('0xa')](_0x4f9021,_0x4bd399)[_0x0545('0xb')](function(_0x5ef38e){logger[_0x0545('0xc')](_0x0545('0xd'),_0x17e35e,_0x0545('0xe'));logger[_0x0545('0xf')](_0x0545('0x10'),_0x17e35e,_0x0545('0xe'),JSON[_0x0545('0x11')](_0x5ef38e));if(_0x5ef38e[_0x0545('0x12')]){if(_0x5ef38e[_0x0545('0x12')][_0x0545('0x13')]===0x1f4){logger[_0x0545('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x17e35e,_0x5ef38e[_0x0545('0x12')][_0x0545('0x14')]);return _0x32989b(_0x5ef38e['error'][_0x0545('0x14')]);}logger[_0x0545('0x12')](_0x0545('0xd'),_0x17e35e,_0x5ef38e[_0x0545('0x12')][_0x0545('0x14')]);return _0xbe73b7(_0x5ef38e[_0x0545('0x12')][_0x0545('0x14')]);}else{logger['info'](_0x0545('0xd'),_0x17e35e,'request\x20sent');_0xbe73b7(_0x5ef38e['result']['message']);}})['catch'](function(_0x1d35d6){logger[_0x0545('0x12')](_0x0545('0xd'),_0x17e35e,_0x1d35d6);_0x32989b(_0x1d35d6);});});}
\ No newline at end of file
+var _0x2706=['moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','util'];(function(_0xf9d4aa,_0x3a58e1){var _0x5d32ed=function(_0x330f0c){while(--_0x330f0c){_0xf9d4aa['push'](_0xf9d4aa['shift']());}};_0x5d32ed(++_0x3a58e1);}(_0x2706,0x107));var _0x6270=function(_0x308189,_0x501a2b){_0x308189=_0x308189-0x0;var _0x468397=_0x2706[_0x308189];return _0x468397;};'use strict';var _=require('lodash');var util=require(_0x6270('0x0'));var moment=require(_0x6270('0x1'));var BPromise=require(_0x6270('0x2'));var rs=require(_0x6270('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6270('0x4'))['db'];var utils=require(_0x6270('0x5'));var logger=require(_0x6270('0x6'))(_0x6270('0x7'));var config=require(_0x6270('0x8'));var jayson=require(_0x6270('0x9'));var client=jayson[_0x6270('0xa')][_0x6270('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4fac3f,_0x4f700e,_0x2e6a1b){return new BPromise(function(_0x585bc1,_0x35a6e3){return client[_0x6270('0xc')](_0x4fac3f,_0x2e6a1b)[_0x6270('0xd')](function(_0xea69a0){logger[_0x6270('0xe')](_0x6270('0xf'),_0x4f700e,'request\x20sent');logger[_0x6270('0x10')](_0x6270('0x11'),_0x4f700e,_0x6270('0x12'),JSON[_0x6270('0x13')](_0xea69a0));if(_0xea69a0[_0x6270('0x14')]){if(_0xea69a0['error']['code']===0x1f4){logger[_0x6270('0x14')](_0x6270('0xf'),_0x4f700e,_0xea69a0['error']['message']);return _0x35a6e3(_0xea69a0['error'][_0x6270('0x15')]);}logger['error'](_0x6270('0xf'),_0x4f700e,_0xea69a0['error']['message']);return _0x585bc1(_0xea69a0['error'][_0x6270('0x15')]);}else{logger[_0x6270('0xe')](_0x6270('0xf'),_0x4f700e,'request\x20sent');_0x585bc1(_0xea69a0['result'][_0x6270('0x15')]);}})['catch'](function(_0x26ceb9){logger[_0x6270('0x14')](_0x6270('0xf'),_0x4f700e,_0x26ceb9);_0x35a6e3(_0x26ceb9);});});}
\ No newline at end of file
diff --git a/server/api/pause/index.js b/server/api/pause/index.js
index dd7c581..8531a19 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 _0x4a91=['express','Router','../../components/auth/service','../../config/environment','isAuthenticated','index','get','/:id','post','create','delete','destroy','exports','util','connect-timeout'];(function(_0x511c76,_0x4d7488){var _0x312611=function(_0x36d433){while(--_0x36d433){_0x511c76['push'](_0x511c76['shift']());}};_0x312611(++_0x4d7488);}(_0x4a91,0x157));var _0x14a9=function(_0x12f688,_0x585c25){_0x12f688=_0x12f688-0x0;var _0x59c3de=_0x4a91[_0x12f688];return _0x59c3de;};'use strict';var multer=require('multer');var util=require(_0x14a9('0x0'));var path=require('path');var timeout=require(_0x14a9('0x1'));var express=require(_0x14a9('0x2'));var router=express[_0x14a9('0x3')]();var auth=require(_0x14a9('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x14a9('0x5'));var controller=require('./pause.controller');router['get']('/',auth[_0x14a9('0x6')](),controller[_0x14a9('0x7')]);router[_0x14a9('0x8')](_0x14a9('0x9'),auth[_0x14a9('0x6')](),controller['show']);router[_0x14a9('0xa')]('/',auth[_0x14a9('0x6')](),controller[_0x14a9('0xb')]);router['put'](_0x14a9('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x14a9('0xc')]('/:id',auth[_0x14a9('0x6')](),controller[_0x14a9('0xd')]);module[_0x14a9('0xe')]=router;
\ No newline at end of file
+var _0xaa9e=['create','put','update','delete','destroy','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./pause.controller','get','index','/:id','isAuthenticated','show'];(function(_0x445830,_0x3d15d0){var _0x14116b=function(_0x2d40a9){while(--_0x2d40a9){_0x445830['push'](_0x445830['shift']());}};_0x14116b(++_0x3d15d0);}(_0xaa9e,0x148));var _0xeaa9=function(_0x525c7b,_0x488fcc){_0x525c7b=_0x525c7b-0x0;var _0x27b33e=_0xaa9e[_0x525c7b];return _0x27b33e;};'use strict';var multer=require(_0xeaa9('0x0'));var util=require(_0xeaa9('0x1'));var path=require(_0xeaa9('0x2'));var timeout=require(_0xeaa9('0x3'));var express=require(_0xeaa9('0x4'));var router=express['Router']();var auth=require(_0xeaa9('0x5'));var interaction=require(_0xeaa9('0x6'));var config=require(_0xeaa9('0x7'));var controller=require(_0xeaa9('0x8'));router[_0xeaa9('0x9')]('/',auth['isAuthenticated'](),controller[_0xeaa9('0xa')]);router[_0xeaa9('0x9')](_0xeaa9('0xb'),auth[_0xeaa9('0xc')](),controller[_0xeaa9('0xd')]);router['post']('/',auth[_0xeaa9('0xc')](),controller[_0xeaa9('0xe')]);router[_0xeaa9('0xf')](_0xeaa9('0xb'),auth[_0xeaa9('0xc')](),controller[_0xeaa9('0x10')]);router[_0xeaa9('0x11')](_0xeaa9('0xb'),auth[_0xeaa9('0xc')](),controller[_0xeaa9('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/pause/pause.attributes.js b/server/api/pause/pause.attributes.js
index d9715fa..db9bc97 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 _0xdac8=['sequelize','exports','name'];(function(_0x40fc02,_0x3a58d8){var _0x5e4e9a=function(_0x4f8c1c){while(--_0x4f8c1c){_0x40fc02['push'](_0x40fc02['shift']());}};_0x5e4e9a(++_0x3a58d8);}(_0xdac8,0x1da));var _0x8dac=function(_0x3fa762,_0x442c7a){_0x3fa762=_0x3fa762-0x0;var _0x55c155=_0xdac8[_0x3fa762];return _0x55c155;};'use strict';var Sequelize=require(_0x8dac('0x0'));module[_0x8dac('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x8dac('0x2'),'allowNull':![]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x8cb5=['STRING','name','sequelize','exports'];(function(_0xb27b8b,_0x4e2965){var _0x356ea5=function(_0x3b65d6){while(--_0x3b65d6){_0xb27b8b['push'](_0xb27b8b['shift']());}};_0x356ea5(++_0x4e2965);}(_0x8cb5,0x6e));var _0x58cb=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x8cb5[_0x502c7d];return _0x30b7ed;};'use strict';var Sequelize=require(_0x58cb('0x0'));module[_0x58cb('0x1')]={'name':{'type':Sequelize[_0x58cb('0x2')],'unique':_0x58cb('0x3'),'allowNull':![]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js
index 04d71c6..6122ed5 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 _0xa6ad=['hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','catch','show','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','find','params','html-pdf','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','ejs','lodash','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','save','update','then','get','Pauses','UserProfileResource','destroy','error','name','send','map','Pause','rawAttributes','fieldName','key','model','query','keys','filters','attributes','intersection','fields','length'];(function(_0x55f01b,_0x1c5b95){var _0x3b2edc=function(_0x4c05cc){while(--_0x4c05cc){_0x55f01b['push'](_0x55f01b['shift']());}};_0x3b2edc(++_0x1c5b95);}(_0xa6ad,0x1a7));var _0xda6a=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0xa6ad[_0x44946b];return _0x249bc4;};'use strict';var pdf=require(_0xda6a('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xda6a('0x1'));var zipdir=require(_0xda6a('0x2'));var jsonpatch=require(_0xda6a('0x3'));var rp=require('request-promise');var moment=require(_0xda6a('0x4'));var BPromise=require(_0xda6a('0x5'));var Mustache=require(_0xda6a('0x6'));var util=require('util');var path=require(_0xda6a('0x7'));var sox=require(_0xda6a('0x8'));var csv=require('to-csv');var ejs=require(_0xda6a('0x9'));var fs=require('fs');var _=require(_0xda6a('0xa'));var squel=require(_0xda6a('0xb'));var crypto=require(_0xda6a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xda6a('0xd'));var toCsv=require(_0xda6a('0xe'));var querystring=require(_0xda6a('0xf'));var Papa=require('papaparse');var Redis=require(_0xda6a('0x10'));var authService=require(_0xda6a('0x11'));var qs=require(_0xda6a('0x12'));var as=require(_0xda6a('0x13'));var hardwareService=require(_0xda6a('0x14'));var logger=require('../../config/logger')(_0xda6a('0x15'));var utils=require('../../config/utils');var config=require(_0xda6a('0x16'));var db=require(_0xda6a('0x17'))['db'];function respondWithStatusCode(_0x2dae70,_0x52e8ce){_0x52e8ce=_0x52e8ce||0xcc;return function(_0x11a199){if(_0x11a199){return _0x2dae70[_0xda6a('0x18')](_0x52e8ce);}return _0x2dae70['status'](_0x52e8ce)[_0xda6a('0x19')]();};}function respondWithResult(_0x92f715,_0x56c891){_0x56c891=_0x56c891||0xc8;return function(_0x1e0d41){if(_0x1e0d41){return _0x92f715[_0xda6a('0x1a')](_0x56c891)[_0xda6a('0x1b')](_0x1e0d41);}};}function respondWithFilteredResult(_0x14818f,_0x1cf318){return function(_0x1ca44c){if(_0x1ca44c){var _0x533bf9=_0x1ca44c[_0xda6a('0x1c')],_0x8ec316=_0x1cf318[_0xda6a('0x1d')],_0x11a483=_0x1cf318['offset']+_0x1cf318[_0xda6a('0x1e')],_0x35f364;if(_0x11a483>=_0x533bf9){_0x11a483=_0x533bf9;_0x35f364=0xc8;}else{_0x35f364=0xce;}_0x14818f[_0xda6a('0x1a')](_0x35f364);return _0x14818f[_0xda6a('0x1f')](_0xda6a('0x20'),_0x8ec316+'-'+_0x11a483+'/'+_0x533bf9)[_0xda6a('0x1b')](_0x1ca44c);}return null;};}function patchUpdates(_0x4a4958){return function(_0x34b791){try{jsonpatch[_0xda6a('0x21')](_0x34b791,_0x4a4958,!![]);}catch(_0x26d98b){return BPromise['reject'](_0x26d98b);}return _0x34b791[_0xda6a('0x22')]();};}function saveUpdates(_0xbf7cc,_0x2af8b4){return function(_0x1aea93){if(_0x1aea93){return _0x1aea93[_0xda6a('0x23')](_0xbf7cc)[_0xda6a('0x24')](function(_0x1d176d){return _0x1d176d;});}return null;};}function removeEntity(_0x9d4062,_0x128dc2){return function(_0x37f82c){if(_0x37f82c){return _0x37f82c['destroy']()[_0xda6a('0x24')](function(){var _0x4f43d4=_0x37f82c[_0xda6a('0x25')]({'plain':!![]});var _0x21a544=_0xda6a('0x26');return db[_0xda6a('0x27')][_0xda6a('0x28')]({'where':{'type':_0x21a544,'resourceId':_0x4f43d4['id']}})[_0xda6a('0x24')](function(){return _0x37f82c;});})[_0xda6a('0x24')](function(){_0x9d4062[_0xda6a('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x45d515,_0x1c9a19){return function(_0x3ae545){if(!_0x3ae545){_0x45d515['sendStatus'](0x194);}return _0x3ae545;};}function handleError(_0x1f9e2e,_0x2a86e1){_0x2a86e1=_0x2a86e1||0x1f4;return function(_0x490545){logger[_0xda6a('0x29')](_0x490545['stack']);if(_0x490545[_0xda6a('0x2a')]){delete _0x490545[_0xda6a('0x2a')];}_0x1f9e2e[_0xda6a('0x1a')](_0x2a86e1)[_0xda6a('0x2b')](_0x490545);};}exports['index']=function(_0x3f1411,_0xe76338){var _0x18f527={},_0x50c45a={},_0x12fec5={'count':0x0,'rows':[]};var _0x3064f2=_[_0xda6a('0x2c')](db[_0xda6a('0x2d')][_0xda6a('0x2e')],function(_0x1af3b9){return{'name':_0x1af3b9[_0xda6a('0x2f')],'type':_0x1af3b9['type'][_0xda6a('0x30')]};});_0x50c45a[_0xda6a('0x31')]=_[_0xda6a('0x2c')](_0x3064f2,'name');_0x50c45a[_0xda6a('0x32')]=_[_0xda6a('0x33')](_0x3f1411[_0xda6a('0x32')]);_0x50c45a[_0xda6a('0x34')]=_['intersection'](_0x50c45a[_0xda6a('0x31')],_0x50c45a[_0xda6a('0x32')]);_0x18f527[_0xda6a('0x35')]=_[_0xda6a('0x36')](_0x50c45a[_0xda6a('0x31')],qs[_0xda6a('0x37')](_0x3f1411['query']['fields']));_0x18f527[_0xda6a('0x35')]=_0x18f527['attributes'][_0xda6a('0x38')]?_0x18f527[_0xda6a('0x35')]:_0x50c45a['model'];if(!_0x3f1411['query'][_0xda6a('0x39')](_0xda6a('0x3a'))){_0x18f527[_0xda6a('0x1e')]=qs[_0xda6a('0x1e')](_0x3f1411[_0xda6a('0x32')][_0xda6a('0x1e')]);_0x18f527[_0xda6a('0x1d')]=qs[_0xda6a('0x1d')](_0x3f1411[_0xda6a('0x32')]['offset']);}_0x18f527[_0xda6a('0x3b')]=qs['sort'](_0x3f1411['query'][_0xda6a('0x3c')]);_0x18f527[_0xda6a('0x3d')]=qs[_0xda6a('0x34')](_[_0xda6a('0x3e')](_0x3f1411[_0xda6a('0x32')],_0x50c45a[_0xda6a('0x34')]));if(_0x3f1411[_0xda6a('0x32')][_0xda6a('0x3f')]){_0x18f527[_0xda6a('0x3d')]=_[_0xda6a('0x40')](_0x18f527['where'],{'$or':_[_0xda6a('0x2c')](_0x3064f2,function(_0xedcc17){if(_0xedcc17['type']!==_0xda6a('0x41')){var _0x4c12fb={};_0x4c12fb[_0xedcc17[_0xda6a('0x2a')]]={'$like':'%'+_0x3f1411['query'][_0xda6a('0x3f')]+'%'};return _0x4c12fb;}})});}_0x18f527=_['merge']({},_0x18f527,_0x3f1411['options']);var _0x35323a={'where':_0x18f527[_0xda6a('0x3d')]};return db[_0xda6a('0x2d')][_0xda6a('0x1c')](_0x35323a)[_0xda6a('0x24')](function(_0x349c00){_0x12fec5['count']=_0x349c00;if(_0x3f1411[_0xda6a('0x32')][_0xda6a('0x42')]){_0x18f527[_0xda6a('0x43')]=[{'all':!![]}];}return db[_0xda6a('0x2d')][_0xda6a('0x44')](_0x18f527);})[_0xda6a('0x24')](function(_0xcea97e){_0x12fec5['rows']=_0xcea97e;return _0x12fec5;})[_0xda6a('0x24')](respondWithFilteredResult(_0xe76338,_0x18f527))[_0xda6a('0x45')](handleError(_0xe76338,null));};exports[_0xda6a('0x46')]=function(_0x35b6a9,_0x513089){var _0x5b39dc={'raw':!![],'where':{'id':_0x35b6a9['params']['id']}},_0x3e09fc={};_0x3e09fc[_0xda6a('0x31')]=_[_0xda6a('0x33')](db['Pause'][_0xda6a('0x2e')]);_0x3e09fc['query']=_['keys'](_0x35b6a9[_0xda6a('0x32')]);_0x3e09fc[_0xda6a('0x34')]=_[_0xda6a('0x36')](_0x3e09fc[_0xda6a('0x31')],_0x3e09fc[_0xda6a('0x32')]);_0x5b39dc[_0xda6a('0x35')]=_[_0xda6a('0x36')](_0x3e09fc['model'],qs[_0xda6a('0x37')](_0x35b6a9['query']['fields']));_0x5b39dc[_0xda6a('0x35')]=_0x5b39dc[_0xda6a('0x35')][_0xda6a('0x38')]?_0x5b39dc[_0xda6a('0x35')]:_0x3e09fc[_0xda6a('0x31')];if(_0x35b6a9['query'][_0xda6a('0x42')]){_0x5b39dc[_0xda6a('0x43')]=[{'all':!![]}];}_0x5b39dc=_['merge']({},_0x5b39dc,_0x35b6a9[_0xda6a('0x47')]);return db[_0xda6a('0x2d')]['find'](_0x5b39dc)[_0xda6a('0x24')](handleEntityNotFound(_0x513089,null))[_0xda6a('0x24')](respondWithResult(_0x513089,null))[_0xda6a('0x45')](handleError(_0x513089,null));};exports[_0xda6a('0x48')]=function(_0x3453ef,_0x3f98a4){return db[_0xda6a('0x2d')][_0xda6a('0x48')](_0x3453ef[_0xda6a('0x49')],{})[_0xda6a('0x24')](function(_0x397235){var _0x5c8cb3=_0x3453ef[_0xda6a('0x4a')][_0xda6a('0x25')]({'plain':!![]});if(!_0x5c8cb3)throw new Error(_0xda6a('0x4b'));if(_0x5c8cb3[_0xda6a('0x4c')]===_0xda6a('0x4a')){var _0x3cf705=_0x397235['get']({'plain':!![]});var _0x22c55b=_0xda6a('0x26');return db['UserProfileSection']['find']({'where':{'name':_0x22c55b,'userProfileId':_0x5c8cb3[_0xda6a('0x4d')]},'raw':!![]})[_0xda6a('0x24')](function(_0x12f26c){if(_0x12f26c&&_0x12f26c['autoAssociation']===0x0){return db[_0xda6a('0x27')][_0xda6a('0x48')]({'name':_0x3cf705[_0xda6a('0x2a')],'resourceId':_0x3cf705['id'],'type':_0x12f26c['name'],'sectionId':_0x12f26c['id']},{})[_0xda6a('0x24')](function(){return _0x397235;});}else{return _0x397235;}})[_0xda6a('0x45')](function(_0x48b3ec){logger[_0xda6a('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x48b3ec);throw _0x48b3ec;});}return _0x397235;})[_0xda6a('0x24')](respondWithResult(_0x3f98a4,0xc9))[_0xda6a('0x45')](handleError(_0x3f98a4,null));};exports[_0xda6a('0x23')]=function(_0x4cb110,_0x5d3951){if(_0x4cb110[_0xda6a('0x49')]['id']){delete _0x4cb110[_0xda6a('0x49')]['id'];}return db[_0xda6a('0x2d')][_0xda6a('0x4e')]({'where':{'id':_0x4cb110[_0xda6a('0x4f')]['id']}})[_0xda6a('0x24')](handleEntityNotFound(_0x5d3951,null))['then'](saveUpdates(_0x4cb110[_0xda6a('0x49')],null))[_0xda6a('0x24')](respondWithResult(_0x5d3951,null))[_0xda6a('0x45')](handleError(_0x5d3951,null));};exports[_0xda6a('0x28')]=function(_0x387687,_0x2dd1d7){return db[_0xda6a('0x2d')]['find']({'where':{'id':_0x387687[_0xda6a('0x4f')]['id']}})[_0xda6a('0x24')](handleEntityNotFound(_0x2dd1d7,null))[_0xda6a('0x24')](removeEntity(_0x2dd1d7,null))['catch'](handleError(_0x2dd1d7,null));};
\ No newline at end of file
+var _0xd639=['fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','rows','catch','params','create','user','role','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','Content-Range','apply','reject','save','then','get','Pauses','UserProfileResource','destroy','sendStatus','error','name','index','map','Pause','rawAttributes'];(function(_0x91ed5c,_0xdb6b34){var _0x2387d8=function(_0x1a9d15){while(--_0x1a9d15){_0x91ed5c['push'](_0x91ed5c['shift']());}};_0x2387d8(++_0xdb6b34);}(_0xd639,0x1b1));var _0x9d63=function(_0x59bf25,_0x21bcdf){_0x59bf25=_0x59bf25-0x0;var _0x42f222=_0xd639[_0x59bf25];return _0x42f222;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x9d63('0x0'));var rimraf=require(_0x9d63('0x1'));var zipdir=require(_0x9d63('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9d63('0x3'));var moment=require(_0x9d63('0x4'));var BPromise=require(_0x9d63('0x5'));var Mustache=require(_0x9d63('0x6'));var util=require('util');var path=require(_0x9d63('0x7'));var sox=require(_0x9d63('0x8'));var csv=require(_0x9d63('0x9'));var ejs=require(_0x9d63('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x9d63('0xb'));var crypto=require('crypto');var jsforce=require(_0x9d63('0xc'));var deskjs=require(_0x9d63('0xd'));var toCsv=require(_0x9d63('0x9'));var querystring=require('querystring');var Papa=require(_0x9d63('0xe'));var Redis=require(_0x9d63('0xf'));var authService=require(_0x9d63('0x10'));var qs=require(_0x9d63('0x11'));var as=require(_0x9d63('0x12'));var hardwareService=require(_0x9d63('0x13'));var logger=require(_0x9d63('0x14'))(_0x9d63('0x15'));var utils=require(_0x9d63('0x16'));var config=require(_0x9d63('0x17'));var db=require(_0x9d63('0x18'))['db'];function respondWithStatusCode(_0x47d72e,_0x1a50dc){_0x1a50dc=_0x1a50dc||0xcc;return function(_0x4de57c){if(_0x4de57c){return _0x47d72e['sendStatus'](_0x1a50dc);}return _0x47d72e[_0x9d63('0x19')](_0x1a50dc)[_0x9d63('0x1a')]();};}function respondWithResult(_0x2bc37a,_0x5069d4){_0x5069d4=_0x5069d4||0xc8;return function(_0x229e2c){if(_0x229e2c){return _0x2bc37a[_0x9d63('0x19')](_0x5069d4)[_0x9d63('0x1b')](_0x229e2c);}};}function respondWithFilteredResult(_0x168900,_0x361118){return function(_0x4e946d){if(_0x4e946d){var _0x56a94f=_0x4e946d[_0x9d63('0x1c')],_0x5742de=_0x361118[_0x9d63('0x1d')],_0x555bc0=_0x361118[_0x9d63('0x1d')]+_0x361118[_0x9d63('0x1e')],_0x436aaa;if(_0x555bc0>=_0x56a94f){_0x555bc0=_0x56a94f;_0x436aaa=0xc8;}else{_0x436aaa=0xce;}_0x168900[_0x9d63('0x19')](_0x436aaa);return _0x168900['set'](_0x9d63('0x1f'),_0x5742de+'-'+_0x555bc0+'/'+_0x56a94f)[_0x9d63('0x1b')](_0x4e946d);}return null;};}function patchUpdates(_0x329098){return function(_0x1d6c81){try{jsonpatch[_0x9d63('0x20')](_0x1d6c81,_0x329098,!![]);}catch(_0x394277){return BPromise[_0x9d63('0x21')](_0x394277);}return _0x1d6c81[_0x9d63('0x22')]();};}function saveUpdates(_0x5a0250,_0xd42853){return function(_0x283667){if(_0x283667){return _0x283667['update'](_0x5a0250)[_0x9d63('0x23')](function(_0x53ea7a){return _0x53ea7a;});}return null;};}function removeEntity(_0x30bef3,_0x18a48f){return function(_0x82791f){if(_0x82791f){return _0x82791f['destroy']()['then'](function(){var _0xb07f36=_0x82791f[_0x9d63('0x24')]({'plain':!![]});var _0x44e2f9=_0x9d63('0x25');return db[_0x9d63('0x26')][_0x9d63('0x27')]({'where':{'type':_0x44e2f9,'resourceId':_0xb07f36['id']}})[_0x9d63('0x23')](function(){return _0x82791f;});})['then'](function(){_0x30bef3[_0x9d63('0x19')](0xcc)[_0x9d63('0x1a')]();});}};}function handleEntityNotFound(_0xc6ca0,_0x4536c6){return function(_0xb93c9f){if(!_0xb93c9f){_0xc6ca0[_0x9d63('0x28')](0x194);}return _0xb93c9f;};}function handleError(_0x260b80,_0x4bee8e){_0x4bee8e=_0x4bee8e||0x1f4;return function(_0x10783a){logger[_0x9d63('0x29')](_0x10783a['stack']);if(_0x10783a[_0x9d63('0x2a')]){delete _0x10783a[_0x9d63('0x2a')];}_0x260b80[_0x9d63('0x19')](_0x4bee8e)['send'](_0x10783a);};}exports[_0x9d63('0x2b')]=function(_0x52593a,_0x34f6ec){var _0x11452e={},_0x371635={},_0x311e63={'count':0x0,'rows':[]};var _0x411533=_[_0x9d63('0x2c')](db[_0x9d63('0x2d')][_0x9d63('0x2e')],function(_0x5e8163){return{'name':_0x5e8163[_0x9d63('0x2f')],'type':_0x5e8163[_0x9d63('0x30')]['key']};});_0x371635[_0x9d63('0x31')]=_['map'](_0x411533,'name');_0x371635[_0x9d63('0x32')]=_[_0x9d63('0x33')](_0x52593a[_0x9d63('0x32')]);_0x371635[_0x9d63('0x34')]=_[_0x9d63('0x35')](_0x371635['model'],_0x371635[_0x9d63('0x32')]);_0x11452e[_0x9d63('0x36')]=_[_0x9d63('0x35')](_0x371635[_0x9d63('0x31')],qs[_0x9d63('0x37')](_0x52593a[_0x9d63('0x32')]['fields']));_0x11452e[_0x9d63('0x36')]=_0x11452e['attributes'][_0x9d63('0x38')]?_0x11452e['attributes']:_0x371635[_0x9d63('0x31')];if(!_0x52593a[_0x9d63('0x32')][_0x9d63('0x39')](_0x9d63('0x3a'))){_0x11452e[_0x9d63('0x1e')]=qs['limit'](_0x52593a[_0x9d63('0x32')]['limit']);_0x11452e[_0x9d63('0x1d')]=qs[_0x9d63('0x1d')](_0x52593a[_0x9d63('0x32')][_0x9d63('0x1d')]);}_0x11452e[_0x9d63('0x3b')]=qs[_0x9d63('0x3c')](_0x52593a[_0x9d63('0x32')]['sort']);_0x11452e[_0x9d63('0x3d')]=qs[_0x9d63('0x34')](_[_0x9d63('0x3e')](_0x52593a['query'],_0x371635[_0x9d63('0x34')]));if(_0x52593a[_0x9d63('0x32')][_0x9d63('0x3f')]){_0x11452e[_0x9d63('0x3d')]=_[_0x9d63('0x40')](_0x11452e['where'],{'$or':_[_0x9d63('0x2c')](_0x411533,function(_0x1f2f8a){if(_0x1f2f8a[_0x9d63('0x30')]!==_0x9d63('0x41')){var _0x420071={};_0x420071[_0x1f2f8a[_0x9d63('0x2a')]]={'$like':'%'+_0x52593a[_0x9d63('0x32')][_0x9d63('0x3f')]+'%'};return _0x420071;}})});}_0x11452e=_['merge']({},_0x11452e,_0x52593a[_0x9d63('0x42')]);var _0x51602a={'where':_0x11452e[_0x9d63('0x3d')]};return db['Pause'][_0x9d63('0x1c')](_0x51602a)[_0x9d63('0x23')](function(_0x50b12d){_0x311e63[_0x9d63('0x1c')]=_0x50b12d;if(_0x52593a[_0x9d63('0x32')]['includeAll']){_0x11452e['include']=[{'all':!![]}];}return db[_0x9d63('0x2d')]['findAll'](_0x11452e);})[_0x9d63('0x23')](function(_0x2d0440){_0x311e63[_0x9d63('0x43')]=_0x2d0440;return _0x311e63;})['then'](respondWithFilteredResult(_0x34f6ec,_0x11452e))[_0x9d63('0x44')](handleError(_0x34f6ec,null));};exports['show']=function(_0x3a53c2,_0x1b5f4a){var _0x142dfe={'raw':!![],'where':{'id':_0x3a53c2[_0x9d63('0x45')]['id']}},_0x136e6d={};_0x136e6d[_0x9d63('0x31')]=_[_0x9d63('0x33')](db[_0x9d63('0x2d')][_0x9d63('0x2e')]);_0x136e6d[_0x9d63('0x32')]=_[_0x9d63('0x33')](_0x3a53c2[_0x9d63('0x32')]);_0x136e6d[_0x9d63('0x34')]=_[_0x9d63('0x35')](_0x136e6d[_0x9d63('0x31')],_0x136e6d[_0x9d63('0x32')]);_0x142dfe[_0x9d63('0x36')]=_[_0x9d63('0x35')](_0x136e6d['model'],qs[_0x9d63('0x37')](_0x3a53c2['query']['fields']));_0x142dfe['attributes']=_0x142dfe[_0x9d63('0x36')][_0x9d63('0x38')]?_0x142dfe[_0x9d63('0x36')]:_0x136e6d[_0x9d63('0x31')];if(_0x3a53c2[_0x9d63('0x32')]['includeAll']){_0x142dfe['include']=[{'all':!![]}];}_0x142dfe=_['merge']({},_0x142dfe,_0x3a53c2[_0x9d63('0x42')]);return db[_0x9d63('0x2d')]['find'](_0x142dfe)[_0x9d63('0x23')](handleEntityNotFound(_0x1b5f4a,null))[_0x9d63('0x23')](respondWithResult(_0x1b5f4a,null))[_0x9d63('0x44')](handleError(_0x1b5f4a,null));};exports[_0x9d63('0x46')]=function(_0x1b1353,_0x29281f){return db[_0x9d63('0x2d')][_0x9d63('0x46')](_0x1b1353['body'],{})[_0x9d63('0x23')](function(_0x7ba95b){var _0x37bc9a=_0x1b1353[_0x9d63('0x47')]['get']({'plain':!![]});if(!_0x37bc9a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x37bc9a[_0x9d63('0x48')]===_0x9d63('0x47')){var _0x3b50e5=_0x7ba95b['get']({'plain':!![]});var _0x3156dc='Pauses';return db[_0x9d63('0x49')][_0x9d63('0x4a')]({'where':{'name':_0x3156dc,'userProfileId':_0x37bc9a[_0x9d63('0x4b')]},'raw':!![]})[_0x9d63('0x23')](function(_0x137149){if(_0x137149&&_0x137149[_0x9d63('0x4c')]===0x0){return db[_0x9d63('0x26')][_0x9d63('0x46')]({'name':_0x3b50e5[_0x9d63('0x2a')],'resourceId':_0x3b50e5['id'],'type':_0x137149[_0x9d63('0x2a')],'sectionId':_0x137149['id']},{})[_0x9d63('0x23')](function(){return _0x7ba95b;});}else{return _0x7ba95b;}})[_0x9d63('0x44')](function(_0x6ac14){logger[_0x9d63('0x29')](_0x9d63('0x4d'),_0x6ac14);throw _0x6ac14;});}return _0x7ba95b;})[_0x9d63('0x23')](respondWithResult(_0x29281f,0xc9))[_0x9d63('0x44')](handleError(_0x29281f,null));};exports[_0x9d63('0x4e')]=function(_0x10265e,_0x41c40d){if(_0x10265e[_0x9d63('0x4f')]['id']){delete _0x10265e[_0x9d63('0x4f')]['id'];}return db[_0x9d63('0x2d')][_0x9d63('0x4a')]({'where':{'id':_0x10265e['params']['id']}})[_0x9d63('0x23')](handleEntityNotFound(_0x41c40d,null))['then'](saveUpdates(_0x10265e[_0x9d63('0x4f')],null))[_0x9d63('0x23')](respondWithResult(_0x41c40d,null))[_0x9d63('0x44')](handleError(_0x41c40d,null));};exports[_0x9d63('0x27')]=function(_0xde97aa,_0x588860){return db[_0x9d63('0x2d')]['find']({'where':{'id':_0xde97aa['params']['id']}})[_0x9d63('0x23')](handleEntityNotFound(_0x588860,null))[_0x9d63('0x23')](removeEntity(_0x588860,null))[_0x9d63('0x44')](handleError(_0x588860,null));};
\ No newline at end of file
diff --git a/server/api/pause/pause.model.js b/server/api/pause/pause.model.js
index be1880a..f6402fe 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 _0x4b17=['tools_pauses','lodash','../../config/logger','moment','bluebird','path','./pause.attributes','exports','define','Pause'];(function(_0x2ae357,_0x8ed582){var _0xc5a2a0=function(_0x1cee68){while(--_0x1cee68){_0x2ae357['push'](_0x2ae357['shift']());}};_0xc5a2a0(++_0x8ed582);}(_0x4b17,0x10f));var _0x74b1=function(_0x1314d4,_0xb0b16d){_0x1314d4=_0x1314d4-0x0;var _0x584ba5=_0x4b17[_0x1314d4];return _0x584ba5;};'use strict';var _=require(_0x74b1('0x0'));var util=require('util');var logger=require(_0x74b1('0x1'))('api');var moment=require(_0x74b1('0x2'));var BPromise=require(_0x74b1('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x74b1('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x74b1('0x5'));module[_0x74b1('0x6')]=function(_0x379dcc,_0x3873a6){return _0x379dcc[_0x74b1('0x7')](_0x74b1('0x8'),attributes,{'tableName':_0x74b1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdf4d=['rimraf','../../config/environment','define','Pause','tools_pauses','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x17c5d4,_0x54ed79){var _0x1fcf5f=function(_0x4bf1d8){while(--_0x4bf1d8){_0x17c5d4['push'](_0x17c5d4['shift']());}};_0x1fcf5f(++_0x54ed79);}(_0xdf4d,0xcb));var _0xddf4=function(_0x358881,_0x1b748c){_0x358881=_0x358881-0x0;var _0x76792d=_0xdf4d[_0x358881];return _0x76792d;};'use strict';var _=require('lodash');var util=require(_0xddf4('0x0'));var logger=require(_0xddf4('0x1'))('api');var moment=require(_0xddf4('0x2'));var BPromise=require(_0xddf4('0x3'));var rp=require(_0xddf4('0x4'));var fs=require('fs');var path=require(_0xddf4('0x5'));var rimraf=require(_0xddf4('0x6'));var config=require(_0xddf4('0x7'));var attributes=require('./pause.attributes');module['exports']=function(_0x1472f7,_0x33cca5){return _0x1472f7[_0xddf4('0x8')](_0xddf4('0x9'),attributes,{'tableName':_0xddf4('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 c357ef0..e72ed3a 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 _0x3c8c=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','request','then','info','Pause,\x20%s,\x20%s','request\x20sent','debug','Pause,\x20%s,\x20%s,\x20%s','error','message','result','catch','Pause','find','options','raw','attributes','include','map','model','ShowPause','lodash','util','moment','bluebird'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x3c8c,0xb0));var _0xc3c8=function(_0x47e68c,_0x563c81){_0x47e68c=_0x47e68c-0x0;var _0x194924=_0x3c8c[_0x47e68c];return _0x194924;};'use strict';var _=require(_0xc3c8('0x0'));var util=require(_0xc3c8('0x1'));var moment=require(_0xc3c8('0x2'));var BPromise=require(_0xc3c8('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc3c8('0x4'));var db=require(_0xc3c8('0x5'))['db'];var utils=require(_0xc3c8('0x6'));var logger=require(_0xc3c8('0x7'))(_0xc3c8('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xc3c8('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1c0d7b,_0x25ec09,_0x4e1cf9){return new BPromise(function(_0x21e167,_0x28094){return client[_0xc3c8('0xa')](_0x1c0d7b,_0x4e1cf9)[_0xc3c8('0xb')](function(_0x4085c1){logger[_0xc3c8('0xc')](_0xc3c8('0xd'),_0x25ec09,_0xc3c8('0xe'));logger[_0xc3c8('0xf')](_0xc3c8('0x10'),_0x25ec09,'request\x20sent',JSON['stringify'](_0x4085c1));if(_0x4085c1[_0xc3c8('0x11')]){if(_0x4085c1[_0xc3c8('0x11')]['code']===0x1f4){logger[_0xc3c8('0x11')]('Pause,\x20%s,\x20%s',_0x25ec09,_0x4085c1[_0xc3c8('0x11')][_0xc3c8('0x12')]);return _0x28094(_0x4085c1['error']['message']);}logger['error'](_0xc3c8('0xd'),_0x25ec09,_0x4085c1[_0xc3c8('0x11')]['message']);return _0x21e167(_0x4085c1[_0xc3c8('0x11')][_0xc3c8('0x12')]);}else{logger[_0xc3c8('0xc')](_0xc3c8('0xd'),_0x25ec09,_0xc3c8('0xe'));_0x21e167(_0x4085c1[_0xc3c8('0x13')][_0xc3c8('0x12')]);}})[_0xc3c8('0x14')](function(_0x3ef852){logger['error']('Pause,\x20%s,\x20%s',_0x25ec09,_0x3ef852);_0x28094(_0x3ef852);});});}exports['ShowPause']=function(_0x35cb8c){var _0xefba5d=this;return new Promise(function(_0x42ebd3,_0x31d080){return db[_0xc3c8('0x15')][_0xc3c8('0x16')]({'raw':_0x35cb8c[_0xc3c8('0x17')]?_0x35cb8c['options'][_0xc3c8('0x18')]===undefined?!![]:![]:!![],'where':_0x35cb8c[_0xc3c8('0x17')]?_0x35cb8c[_0xc3c8('0x17')]['where']||null:null,'attributes':_0x35cb8c[_0xc3c8('0x17')]?_0x35cb8c[_0xc3c8('0x17')][_0xc3c8('0x19')]||null:null,'include':_0x35cb8c[_0xc3c8('0x17')]?_0x35cb8c[_0xc3c8('0x17')][_0xc3c8('0x1a')]?_[_0xc3c8('0x1b')](_0x35cb8c[_0xc3c8('0x17')][_0xc3c8('0x1a')],function(_0x1e4f58){return{'model':db[_0x1e4f58[_0xc3c8('0x1c')]],'as':_0x1e4f58['as'],'attributes':_0x1e4f58['attributes'],'include':_0x1e4f58[_0xc3c8('0x1a')]?_['map'](_0x1e4f58[_0xc3c8('0x1a')],function(_0x2528ba){return{'model':db[_0x2528ba[_0xc3c8('0x1c')]],'as':_0x2528ba['as'],'attributes':_0x2528ba[_0xc3c8('0x19')],'include':_0x2528ba[_0xc3c8('0x1a')]?_[_0xc3c8('0x1b')](_0x2528ba['include'],function(_0x2af186){return{'model':db[_0x2af186[_0xc3c8('0x1c')]],'as':_0x2af186['as'],'attributes':_0x2af186[_0xc3c8('0x19')]};}):[]};}):[]};}):[]:[]})[_0xc3c8('0xb')](function(_0x3fbe8e){logger[_0xc3c8('0xc')](_0xc3c8('0x1d'),_0x35cb8c);logger[_0xc3c8('0xf')](_0xc3c8('0x1d'),_0x35cb8c,JSON['stringify'](_0x3fbe8e));_0x42ebd3(_0x3fbe8e);})[_0xc3c8('0x14')](function(_0x151531){logger['error'](_0xc3c8('0x1d'),_0x151531[_0xc3c8('0x12')],_0x35cb8c);_0x31d080(_0xefba5d[_0xc3c8('0x11')](0x1f4,_0x151531[_0xc3c8('0x12')]));});});};
\ No newline at end of file
+var _0xf21a=['stringify','error','code','Pause,\x20%s,\x20%s','message','info','catch','ShowPause','Pause','find','options','raw','where','attributes','include','map','model','then','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','debug','Pause,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf21a,0x1aa));var _0xaf21=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0xf21a[_0x19950b];return _0x3c6b41;};'use strict';var _=require(_0xaf21('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xaf21('0x1'));var rs=require(_0xaf21('0x2'));var fs=require('fs');var Redis=require(_0xaf21('0x3'));var db=require(_0xaf21('0x4'))['db'];var utils=require(_0xaf21('0x5'));var logger=require(_0xaf21('0x6'))(_0xaf21('0x7'));var config=require(_0xaf21('0x8'));var jayson=require(_0xaf21('0x9'));var client=jayson[_0xaf21('0xa')][_0xaf21('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x561470,_0x166466,_0x1340bf){return new BPromise(function(_0x37f5d0,_0x2137c6){return client[_0xaf21('0xc')](_0x561470,_0x1340bf)['then'](function(_0x33e7e7){logger['info']('Pause,\x20%s,\x20%s',_0x166466,'request\x20sent');logger[_0xaf21('0xd')](_0xaf21('0xe'),_0x166466,_0xaf21('0xf'),JSON[_0xaf21('0x10')](_0x33e7e7));if(_0x33e7e7[_0xaf21('0x11')]){if(_0x33e7e7[_0xaf21('0x11')][_0xaf21('0x12')]===0x1f4){logger[_0xaf21('0x11')](_0xaf21('0x13'),_0x166466,_0x33e7e7[_0xaf21('0x11')]['message']);return _0x2137c6(_0x33e7e7[_0xaf21('0x11')][_0xaf21('0x14')]);}logger[_0xaf21('0x11')](_0xaf21('0x13'),_0x166466,_0x33e7e7[_0xaf21('0x11')][_0xaf21('0x14')]);return _0x37f5d0(_0x33e7e7[_0xaf21('0x11')]['message']);}else{logger[_0xaf21('0x15')](_0xaf21('0x13'),_0x166466,_0xaf21('0xf'));_0x37f5d0(_0x33e7e7['result']['message']);}})[_0xaf21('0x16')](function(_0x36c92f){logger[_0xaf21('0x11')](_0xaf21('0x13'),_0x166466,_0x36c92f);_0x2137c6(_0x36c92f);});});}exports[_0xaf21('0x17')]=function(_0x26eb37){var _0x1119b4=this;return new Promise(function(_0x9293ab,_0x233b81){return db[_0xaf21('0x18')][_0xaf21('0x19')]({'raw':_0x26eb37[_0xaf21('0x1a')]?_0x26eb37[_0xaf21('0x1a')][_0xaf21('0x1b')]===undefined?!![]:![]:!![],'where':_0x26eb37[_0xaf21('0x1a')]?_0x26eb37[_0xaf21('0x1a')][_0xaf21('0x1c')]||null:null,'attributes':_0x26eb37[_0xaf21('0x1a')]?_0x26eb37['options'][_0xaf21('0x1d')]||null:null,'include':_0x26eb37[_0xaf21('0x1a')]?_0x26eb37[_0xaf21('0x1a')][_0xaf21('0x1e')]?_[_0xaf21('0x1f')](_0x26eb37[_0xaf21('0x1a')][_0xaf21('0x1e')],function(_0x25fc88){return{'model':db[_0x25fc88['model']],'as':_0x25fc88['as'],'attributes':_0x25fc88[_0xaf21('0x1d')],'include':_0x25fc88['include']?_['map'](_0x25fc88[_0xaf21('0x1e')],function(_0x35fabf){return{'model':db[_0x35fabf[_0xaf21('0x20')]],'as':_0x35fabf['as'],'attributes':_0x35fabf[_0xaf21('0x1d')],'include':_0x35fabf['include']?_[_0xaf21('0x1f')](_0x35fabf['include'],function(_0x34ac6a){return{'model':db[_0x34ac6a[_0xaf21('0x20')]],'as':_0x34ac6a['as'],'attributes':_0x34ac6a[_0xaf21('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xaf21('0x21')](function(_0x4db715){logger['info'](_0xaf21('0x17'),_0x26eb37);logger[_0xaf21('0xd')](_0xaf21('0x17'),_0x26eb37,JSON[_0xaf21('0x10')](_0x4db715));_0x9293ab(_0x4db715);})[_0xaf21('0x16')](function(_0x558e0f){logger[_0xaf21('0x11')](_0xaf21('0x17'),_0x558e0f[_0xaf21('0x14')],_0x26eb37);_0x233b81(_0x1119b4[_0xaf21('0x11')](0x1f4,_0x558e0f['message']));});});};
\ No newline at end of file
diff --git a/server/api/plugin/index.js b/server/api/plugin/index.js
index 25f6c62..6c57c73 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 _0xabc1=['format','%s-%s%s','basename','now','extname','post','single','file','upload','webhookPost','put','update','delete','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','get','index','/webhook','webhookGet','/:id','isAuthenticated','show','diskStorage','join','root','server/files/plugins','originalname','replace'];(function(_0x5b748f,_0x288b9f){var _0xbe3e67=function(_0x304621){while(--_0x304621){_0x5b748f['push'](_0x5b748f['shift']());}};_0xbe3e67(++_0x288b9f);}(_0xabc1,0x18e));var _0x1abc=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xabc1[_0x2641f9];return _0x585741;};'use strict';var multer=require(_0x1abc('0x0'));var util=require(_0x1abc('0x1'));var path=require(_0x1abc('0x2'));var timeout=require(_0x1abc('0x3'));var express=require(_0x1abc('0x4'));var router=express['Router']();var auth=require(_0x1abc('0x5'));var interaction=require(_0x1abc('0x6'));var config=require(_0x1abc('0x7'));var controller=require(_0x1abc('0x8'));router[_0x1abc('0x9')]('/',auth['isAuthenticated'](),controller[_0x1abc('0xa')]);router[_0x1abc('0x9')](_0x1abc('0xb'),controller[_0x1abc('0xc')]);router[_0x1abc('0x9')](_0x1abc('0xd'),auth[_0x1abc('0xe')](),controller[_0x1abc('0xf')]);router['get']('/:id/download',auth[_0x1abc('0xe')](),controller['download']);var upload=multer({'storage':multer[_0x1abc('0x10')]({'destination':function(_0x5538a4,_0x448af6,_0x442396){_0x442396(null,path[_0x1abc('0x11')](config[_0x1abc('0x12')],_0x1abc('0x13')));},'filename':function(_0x2a9eaa,_0x2e154c,_0x183f00){_0x2e154c[_0x1abc('0x14')]=_0x2e154c[_0x1abc('0x14')][_0x1abc('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x183f00(null,util[_0x1abc('0x16')](_0x1abc('0x17'),path[_0x1abc('0x18')](_0x2e154c[_0x1abc('0x14')],path['extname'](_0x2e154c[_0x1abc('0x14')])),Date[_0x1abc('0x19')](),path[_0x1abc('0x1a')](_0x2e154c[_0x1abc('0x14')])));}})});router[_0x1abc('0x1b')]('/',upload[_0x1abc('0x1c')](_0x1abc('0x1d')),controller[_0x1abc('0x1e')]);router[_0x1abc('0x1b')](_0x1abc('0xb'),controller[_0x1abc('0x1f')]);router[_0x1abc('0x20')](_0x1abc('0xd'),auth[_0x1abc('0xe')](),controller[_0x1abc('0x21')]);router[_0x1abc('0x22')](_0x1abc('0xd'),auth['isAuthenticated'](),controller[_0x1abc('0x22')]);module['exports']=router;
\ No newline at end of file
+var _0xa201=['originalname','replace','format','basename','extname','post','single','file','/webhook','webhookPost','put','update','exports','multer','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','isAuthenticated','index','get','webhookGet','/:id','show','/:id/download','download','diskStorage','join','root','server/files/plugins'];(function(_0x596fba,_0x34ad5e){var _0x3ed0f8=function(_0x771b4d){while(--_0x771b4d){_0x596fba['push'](_0x596fba['shift']());}};_0x3ed0f8(++_0x34ad5e);}(_0xa201,0x8d));var _0x1a20=function(_0x5c9a1c,_0x5d85e1){_0x5c9a1c=_0x5c9a1c-0x0;var _0x63d9ce=_0xa201[_0x5c9a1c];return _0x63d9ce;};'use strict';var multer=require(_0x1a20('0x0'));var util=require('util');var path=require(_0x1a20('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x1a20('0x2')]();var auth=require(_0x1a20('0x3'));var interaction=require(_0x1a20('0x4'));var config=require(_0x1a20('0x5'));var controller=require(_0x1a20('0x6'));router['get']('/',auth[_0x1a20('0x7')](),controller[_0x1a20('0x8')]);router[_0x1a20('0x9')]('/webhook',controller[_0x1a20('0xa')]);router[_0x1a20('0x9')](_0x1a20('0xb'),auth[_0x1a20('0x7')](),controller[_0x1a20('0xc')]);router['get'](_0x1a20('0xd'),auth[_0x1a20('0x7')](),controller[_0x1a20('0xe')]);var upload=multer({'storage':multer[_0x1a20('0xf')]({'destination':function(_0x33c2af,_0x47c2a4,_0x1a3fdc){_0x1a3fdc(null,path[_0x1a20('0x10')](config[_0x1a20('0x11')],_0x1a20('0x12')));},'filename':function(_0x55ed66,_0x12bff6,_0x8c777e){_0x12bff6[_0x1a20('0x13')]=_0x12bff6['originalname'][_0x1a20('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x8c777e(null,util[_0x1a20('0x15')]('%s-%s%s',path[_0x1a20('0x16')](_0x12bff6[_0x1a20('0x13')],path[_0x1a20('0x17')](_0x12bff6[_0x1a20('0x13')])),Date['now'](),path[_0x1a20('0x17')](_0x12bff6['originalname'])));}})});router[_0x1a20('0x18')]('/',upload[_0x1a20('0x19')](_0x1a20('0x1a')),controller['upload']);router[_0x1a20('0x18')](_0x1a20('0x1b'),controller[_0x1a20('0x1c')]);router[_0x1a20('0x1d')](_0x1a20('0xb'),auth[_0x1a20('0x7')](),controller[_0x1a20('0x1e')]);router['delete'](_0x1a20('0xb'),auth[_0x1a20('0x7')](),controller['delete']);module[_0x1a20('0x1f')]=router;
\ No newline at end of file
diff --git a/server/api/plugin/plugin.attributes.js b/server/api/plugin/plugin.attributes.js
index ef8e82a..5f54d98 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 _0x858d=['script','TEXT','BOOLEAN','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','adminOnly','agentOnly','never','always','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize','exports','STRING','ENUM','html'];(function(_0xfb42e6,_0x5f5d4b){var _0x27265b=function(_0x163e81){while(--_0x163e81){_0xfb42e6['push'](_0xfb42e6['shift']());}};_0x27265b(++_0x5f5d4b);}(_0x858d,0x1d7));var _0xd858=function(_0x33d0e0,_0x196c37){_0x33d0e0=_0x33d0e0-0x0;var _0xdc79ad=_0x858d[_0x33d0e0];return _0xdc79ad;};'use strict';var Sequelize=require(_0xd858('0x0'));module[_0xd858('0x1')]={'name':{'type':Sequelize[_0xd858('0x2')]},'type':{'type':Sequelize[_0xd858('0x3')](_0xd858('0x4'),_0xd858('0x5'))},'description':{'type':Sequelize['TEXT']},'version':{'type':Sequelize[_0xd858('0x6')]},'path':{'type':Sequelize[_0xd858('0x2')],'comment':'The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.'},'active':{'type':Sequelize[_0xd858('0x7')],'defaultValue':0x0,'comment':_0xd858('0x8')},'sidebar':{'type':Sequelize[_0xd858('0x3')](_0xd858('0x9'),_0xd858('0xa'),'always',_0xd858('0xb')),'defaultValue':_0xd858('0xc'),'comment':_0xd858('0xd')},'icon':{'type':Sequelize[_0xd858('0x2')]},'adminUrl':{'type':Sequelize['STRING']},'agentUrl':{'type':Sequelize[_0xd858('0x2')]},'scriptName':{'type':Sequelize[_0xd858('0x2')]},'scriptPath':{'type':Sequelize[_0xd858('0x2')]}};
\ No newline at end of file
+var _0xd93c=['Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize','exports','STRING','ENUM','script','TEXT','BOOLEAN','adminOnly','agentOnly','always','never'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xd93c,0x1bd));var _0xcd93=function(_0x30080e,_0x23e2d5){_0x30080e=_0x30080e-0x0;var _0x54f5bd=_0xd93c[_0x30080e];return _0x54f5bd;};'use strict';var Sequelize=require(_0xcd93('0x0'));module[_0xcd93('0x1')]={'name':{'type':Sequelize[_0xcd93('0x2')]},'type':{'type':Sequelize[_0xcd93('0x3')]('html',_0xcd93('0x4'))},'description':{'type':Sequelize[_0xcd93('0x5')]},'version':{'type':Sequelize[_0xcd93('0x5')]},'path':{'type':Sequelize[_0xcd93('0x2')],'comment':'The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.'},'active':{'type':Sequelize[_0xcd93('0x6')],'defaultValue':0x0,'comment':'Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.'},'sidebar':{'type':Sequelize['ENUM'](_0xcd93('0x7'),_0xcd93('0x8'),_0xcd93('0x9'),_0xcd93('0xa')),'defaultValue':_0xcd93('0x9'),'comment':_0xcd93('0xb')},'icon':{'type':Sequelize['STRING']},'adminUrl':{'type':Sequelize[_0xcd93('0x2')]},'agentUrl':{'type':Sequelize[_0xcd93('0x2')]},'scriptName':{'type':Sequelize[_0xcd93('0x2')]},'scriptPath':{'type':Sequelize[_0xcd93('0x2')]}};
\ No newline at end of file
diff --git a/server/api/plugin/plugin.controller.js b/server/api/plugin/plugin.controller.js
index 4a44b05..9cbaa84 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 _0xc66d=['get','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','delete','dirname','webhookGet','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','port','\x27PORT\x27\x20parameter\x20not\x20specified','hostname','http://localhost:','encoding','method','headers','content-length','content-type','endsWith','statusCode','webhookPost','%s%s','html-pdf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','extract-zip','rimraf','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','save','then','Plugins','UserProfileResource','error','stack','name','send','index','map','Plugin','rawAttributes','fieldName','type','key','model','keys','filters','intersection','attributes','fields','query','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','VIRTUAL','count','includeAll','rows','catch','show','params','include','options','find','download','server/files/plugins','createWriteStream','zip','warning','code','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','glob','**/*','root','basename','node_modules/**/*','join','attachments/**/*','finalize','close','Plugin\x20not\x20found','format','%s.zip','Error\x20while\x20downloading\x20the\x20plugin','unlinkSync','Download\x20completed','info','Temporary\x20file\x20removed','upload','file','extname','filename','Plugin\x20upload\x20filepath:\x20%s','Plugin\x20upload\x20destination:\x20%s','0777','readdirSync','Invalid\x20plugin\x20structure','lstatSync','isFile','some','manifest.json','Plugin\x20manifest\x20missing','readFileSync','parse','undefined','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20type\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','parameters','Invalid\x20manifest:\x20parameters\x20missing','html','views','admin','agent','Invalid\x20manifest:\x20no\x20view\x20specified','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','Invalid\x20manifest:\x20script\x20path\x20missing','Invalid\x20manifest:\x20invalid\x20type','description','sidebar','always','icon','icon-apps','test','Warning:\x20admin\x20view\x20not\x20specified','Warning:\x20agent\x20view\x20not\x20specified','scriptPath','plugins','create','body','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user'];(function(_0x590851,_0x496bee){var _0x3b0115=function(_0x5140cc){while(--_0x5140cc){_0x590851['push'](_0x590851['shift']());}};_0x3b0115(++_0x496bee);}(_0xc66d,0xcb));var _0xdc66=function(_0x4f5912,_0x35a297){_0x4f5912=_0x4f5912-0x0;var _0x4d69de=_0xc66d[_0x4f5912];return _0x4d69de;};'use strict';var pdf=require(_0xdc66('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xdc66('0x1'));var jsonpatch=require(_0xdc66('0x2'));var rp=require(_0xdc66('0x3'));var moment=require(_0xdc66('0x4'));var BPromise=require(_0xdc66('0x5'));var Mustache=require(_0xdc66('0x6'));var util=require('util');var path=require(_0xdc66('0x7'));var sox=require(_0xdc66('0x8'));var csv=require(_0xdc66('0x9'));var ejs=require(_0xdc66('0xa'));var fs=require('fs');var _=require(_0xdc66('0xb'));var squel=require('squel');var crypto=require(_0xdc66('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xdc66('0xd'));var toCsv=require('to-csv');var querystring=require(_0xdc66('0xe'));var Papa=require(_0xdc66('0xf'));var extract=require(_0xdc66('0x10'));var rimraf=require(_0xdc66('0x11'));var archiver=require('archiver');var Redis=require('ioredis');var authService=require(_0xdc66('0x12'));var qs=require(_0xdc66('0x13'));var as=require(_0xdc66('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xdc66('0x15'))(_0xdc66('0x16'));var utils=require(_0xdc66('0x17'));var config=require(_0xdc66('0x18'));var db=require(_0xdc66('0x19'))['db'];config[_0xdc66('0x1a')]=_[_0xdc66('0x1b')](config[_0xdc66('0x1a')],{'host':_0xdc66('0x1c'),'port':0x18eb});var socket=require(_0xdc66('0x1d'))(new Redis(config[_0xdc66('0x1a')]));require('./plugin.socket')[_0xdc66('0x1e')](socket);function respondWithStatusCode(_0x3c81a8,_0x1970a7){_0x1970a7=_0x1970a7||0xcc;return function(_0x54e113){if(_0x54e113){return _0x3c81a8[_0xdc66('0x1f')](_0x1970a7);}return _0x3c81a8[_0xdc66('0x20')](_0x1970a7)[_0xdc66('0x21')]();};}function respondWithResult(_0x4b4f80,_0x2d1a1a){_0x2d1a1a=_0x2d1a1a||0xc8;return function(_0x218d02){if(_0x218d02){return _0x4b4f80[_0xdc66('0x20')](_0x2d1a1a)[_0xdc66('0x22')](_0x218d02);}};}function respondWithFilteredResult(_0x245b70,_0x228bb9){return function(_0x461833){if(_0x461833){var _0x577ea1=_0x461833['count'],_0x403ebf=_0x228bb9[_0xdc66('0x23')],_0x3f7c67=_0x228bb9[_0xdc66('0x23')]+_0x228bb9[_0xdc66('0x24')],_0xbad61;if(_0x3f7c67>=_0x577ea1){_0x3f7c67=_0x577ea1;_0xbad61=0xc8;}else{_0xbad61=0xce;}_0x245b70[_0xdc66('0x20')](_0xbad61);return _0x245b70[_0xdc66('0x25')](_0xdc66('0x26'),_0x403ebf+'-'+_0x3f7c67+'/'+_0x577ea1)[_0xdc66('0x22')](_0x461833);}return null;};}function patchUpdates(_0x34c688){return function(_0x4bee00){try{jsonpatch[_0xdc66('0x27')](_0x4bee00,_0x34c688,!![]);}catch(_0x1081ba){return BPromise[_0xdc66('0x28')](_0x1081ba);}return _0x4bee00[_0xdc66('0x29')]();};}function saveUpdates(_0x4b4553,_0x541048){return function(_0x413b36){if(_0x413b36){return _0x413b36['update'](_0x4b4553)['then'](function(_0x6833ed){return _0x6833ed;});}return null;};}function removeEntity(_0x1ba0cb,_0x22dbef){return function(_0x523954){if(_0x523954){return _0x523954['destroy']()[_0xdc66('0x2a')](function(){var _0x1faba2=_0x523954['get']({'plain':!![]});var _0x16355f=_0xdc66('0x2b');return db[_0xdc66('0x2c')]['destroy']({'where':{'type':_0x16355f,'resourceId':_0x1faba2['id']}})[_0xdc66('0x2a')](function(){return _0x523954;});})[_0xdc66('0x2a')](function(){_0x1ba0cb[_0xdc66('0x20')](0xcc)[_0xdc66('0x21')]();});}};}function handleEntityNotFound(_0x1b851e,_0x54fa85){return function(_0x569dd5){if(!_0x569dd5){_0x1b851e[_0xdc66('0x1f')](0x194);}return _0x569dd5;};}function handleError(_0x4ce3ed,_0xe2fc53){_0xe2fc53=_0xe2fc53||0x1f4;return function(_0xf78990){logger[_0xdc66('0x2d')](_0xf78990[_0xdc66('0x2e')]);if(_0xf78990[_0xdc66('0x2f')]){delete _0xf78990[_0xdc66('0x2f')];}_0x4ce3ed[_0xdc66('0x20')](_0xe2fc53)[_0xdc66('0x30')](_0xf78990);};}exports[_0xdc66('0x31')]=function(_0x4c1db7,_0x1a7771){var _0x496cd3={},_0x58eb63={},_0x1ed3ac={'count':0x0,'rows':[]};var _0x29f848=_[_0xdc66('0x32')](db[_0xdc66('0x33')][_0xdc66('0x34')],function(_0x3494a4){return{'name':_0x3494a4[_0xdc66('0x35')],'type':_0x3494a4[_0xdc66('0x36')][_0xdc66('0x37')]};});_0x58eb63[_0xdc66('0x38')]=_[_0xdc66('0x32')](_0x29f848,'name');_0x58eb63['query']=_[_0xdc66('0x39')](_0x4c1db7['query']);_0x58eb63[_0xdc66('0x3a')]=_[_0xdc66('0x3b')](_0x58eb63[_0xdc66('0x38')],_0x58eb63['query']);_0x496cd3[_0xdc66('0x3c')]=_[_0xdc66('0x3b')](_0x58eb63['model'],qs[_0xdc66('0x3d')](_0x4c1db7[_0xdc66('0x3e')]['fields']));_0x496cd3[_0xdc66('0x3c')]=_0x496cd3['attributes'][_0xdc66('0x3f')]?_0x496cd3[_0xdc66('0x3c')]:_0x58eb63[_0xdc66('0x38')];if(!_0x4c1db7[_0xdc66('0x3e')][_0xdc66('0x40')](_0xdc66('0x41'))){_0x496cd3[_0xdc66('0x24')]=qs[_0xdc66('0x24')](_0x4c1db7[_0xdc66('0x3e')]['limit']);_0x496cd3[_0xdc66('0x23')]=qs['offset'](_0x4c1db7[_0xdc66('0x3e')][_0xdc66('0x23')]);}_0x496cd3['order']=qs[_0xdc66('0x42')](_0x4c1db7[_0xdc66('0x3e')][_0xdc66('0x42')]);_0x496cd3['where']=qs[_0xdc66('0x3a')](_[_0xdc66('0x43')](_0x4c1db7[_0xdc66('0x3e')],_0x58eb63['filters']));if(_0x4c1db7[_0xdc66('0x3e')][_0xdc66('0x44')]){_0x496cd3[_0xdc66('0x45')]=_[_0xdc66('0x46')](_0x496cd3[_0xdc66('0x45')],{'$or':_[_0xdc66('0x32')](_0x29f848,function(_0x2bf072){if(_0x2bf072[_0xdc66('0x36')]!==_0xdc66('0x47')){var _0x1215ea={};_0x1215ea[_0x2bf072[_0xdc66('0x2f')]]={'$like':'%'+_0x4c1db7[_0xdc66('0x3e')][_0xdc66('0x44')]+'%'};return _0x1215ea;}})});}_0x496cd3=_['merge']({},_0x496cd3,_0x4c1db7['options']);var _0x1d461e={'where':_0x496cd3[_0xdc66('0x45')]};return db[_0xdc66('0x33')][_0xdc66('0x48')](_0x1d461e)['then'](function(_0x172ebd){_0x1ed3ac[_0xdc66('0x48')]=_0x172ebd;if(_0x4c1db7[_0xdc66('0x3e')][_0xdc66('0x49')]){_0x496cd3['include']=[{'all':!![]}];}return db[_0xdc66('0x33')]['findAll'](_0x496cd3);})[_0xdc66('0x2a')](function(_0x34c22e){_0x1ed3ac[_0xdc66('0x4a')]=_0x34c22e;return _0x1ed3ac;})['then'](respondWithFilteredResult(_0x1a7771,_0x496cd3))[_0xdc66('0x4b')](handleError(_0x1a7771,null));};exports[_0xdc66('0x4c')]=function(_0x4bd57e,_0x26cb41){var _0x167fed={'raw':!![],'where':{'id':_0x4bd57e[_0xdc66('0x4d')]['id']}},_0x52d17f={};_0x52d17f[_0xdc66('0x38')]=_[_0xdc66('0x39')](db['Plugin'][_0xdc66('0x34')]);_0x52d17f[_0xdc66('0x3e')]=_[_0xdc66('0x39')](_0x4bd57e[_0xdc66('0x3e')]);_0x52d17f[_0xdc66('0x3a')]=_[_0xdc66('0x3b')](_0x52d17f[_0xdc66('0x38')],_0x52d17f['query']);_0x167fed['attributes']=_[_0xdc66('0x3b')](_0x52d17f['model'],qs[_0xdc66('0x3d')](_0x4bd57e[_0xdc66('0x3e')][_0xdc66('0x3d')]));_0x167fed[_0xdc66('0x3c')]=_0x167fed[_0xdc66('0x3c')]['length']?_0x167fed[_0xdc66('0x3c')]:_0x52d17f[_0xdc66('0x38')];if(_0x4bd57e['query'][_0xdc66('0x49')]){_0x167fed[_0xdc66('0x4e')]=[{'all':!![]}];}_0x167fed=_[_0xdc66('0x46')]({},_0x167fed,_0x4bd57e[_0xdc66('0x4f')]);return db[_0xdc66('0x33')][_0xdc66('0x50')](_0x167fed)[_0xdc66('0x2a')](handleEntityNotFound(_0x26cb41,null))[_0xdc66('0x2a')](respondWithResult(_0x26cb41,null))[_0xdc66('0x4b')](handleError(_0x26cb41,null));};exports[_0xdc66('0x51')]=function(_0x876620,_0x40d13e,_0x3ed2fc){return db[_0xdc66('0x33')]['find']({'where':{'id':_0x876620[_0xdc66('0x4d')]['id']},'attributes':[_0xdc66('0x2f'),_0xdc66('0x7')],'raw':!![]})[_0xdc66('0x2a')](handleEntityNotFound(_0x40d13e,null))['then'](function(_0x7ea7fb){if(_0x7ea7fb){var _0x30ad11=path['join'](config['root'],_0xdc66('0x52'),util['format']('%s.zip',path['basename'](_0x7ea7fb[_0xdc66('0x7')])));var _0x30bb09=fs[_0xdc66('0x53')](_0x30ad11);var _0x10ba65=archiver(_0xdc66('0x54'),{'zlib':{'level':0x9}});_0x10ba65['on'](_0xdc66('0x55'),function(_0x18c03a){if(_0x18c03a[_0xdc66('0x56')]==='ENOENT'){logger[_0xdc66('0x2d')](_0x18c03a);}else{throw new db[(_0xdc66('0x57'))][(_0xdc66('0x58'))]('Error\x20while\x20generating\x20the\x20zip\x20archive');}});_0x10ba65['on']('error',function(_0x477467){throw new db[(_0xdc66('0x57'))][(_0xdc66('0x58'))](_0xdc66('0x59'));});_0x10ba65['pipe'](_0x30bb09);_0x10ba65[_0xdc66('0x5a')](_0xdc66('0x5b'),{'cwd':path['join'](config[_0xdc66('0x5c')],_0xdc66('0x52'),path['dirname'](_0x7ea7fb['path'])),'ignore':[path['join'](path[_0xdc66('0x5d')](_0x7ea7fb['path']),_0xdc66('0x5e')),path[_0xdc66('0x5f')](path[_0xdc66('0x5d')](_0x7ea7fb['path']),_0xdc66('0x60'))],'nodir':!![]})[_0xdc66('0x61')]();_0x30bb09['on'](_0xdc66('0x62'),function(){if(!fs['existsSync'](_0x30ad11)){throw new db['Sequelize'][(_0xdc66('0x58'))](_0xdc66('0x63'));}return _0x40d13e['download'](_0x30ad11,util[_0xdc66('0x64')](_0xdc66('0x65'),path[_0xdc66('0x5d')](_0x7ea7fb['path'])),function(_0x48dee1){if(_0x48dee1){throw new db[(_0xdc66('0x57'))][(_0xdc66('0x58'))](_0xdc66('0x66'));}fs[_0xdc66('0x67')](_0x30ad11);logger['info'](_0xdc66('0x68'));logger[_0xdc66('0x69')](_0xdc66('0x6a'));});});}return null;})[_0xdc66('0x4b')](handleError(_0x40d13e,null));};exports[_0xdc66('0x6b')]=function(_0x449711,_0x50681d,_0x282beb){var _0x225e0d=path[_0xdc66('0x5d')](_0x449711[_0xdc66('0x6c')]['filename'],path[_0xdc66('0x6d')](_0x449711['file'][_0xdc66('0x6e')]));var _0x3f7f3a=path[_0xdc66('0x5f')](config['root'],'server/files/plugins',_0x449711[_0xdc66('0x6c')][_0xdc66('0x6e')]);var _0x4a1578=path['join'](config[_0xdc66('0x5c')],'server/files/plugins',_0x225e0d);logger[_0xdc66('0x69')](_0xdc66('0x6f'),_0x3f7f3a);logger[_0xdc66('0x69')](_0xdc66('0x70'),_0x4a1578);try{fs['chmodSync'](_0x3f7f3a,parseInt(_0xdc66('0x71'),0x8));extract(_0x3f7f3a,{'dir':_0x4a1578},function(_0xcea733){if(_0xcea733){logger[_0xdc66('0x2d')](_0xcea733);handleError(_0xcea733,!![]);};var _0x51cd63=fs[_0xdc66('0x72')](_0x4a1578);if(_0x51cd63[_0xdc66('0x3f')]>0x1){removeReferences(_0x3f7f3a,_0x4a1578);logger[_0xdc66('0x2d')]('Invalid\x20plugin\x20structure');return _0x282beb(new Error(_0xdc66('0x73')));}var _0xe13ace=fs[_0xdc66('0x74')](path[_0xdc66('0x5f')](_0x4a1578,_0x51cd63[0x0]));if(_0xe13ace[_0xdc66('0x75')]()){removeReferences(_0x3f7f3a,_0x4a1578);logger[_0xdc66('0x2d')]('Invalid\x20plugin\x20structure');return _0x282beb(new Error(_0xdc66('0x73')));}if(_0xe13ace['isDirectory']()){var _0x504c63=fs['readdirSync'](path['join'](_0x4a1578,_0x51cd63[0x0]));if(_0x504c63[_0xdc66('0x3f')]===0x0){removeReferences(_0x3f7f3a,_0x4a1578);logger[_0xdc66('0x2d')](_0xdc66('0x73'));return _0x282beb(new Error(_0xdc66('0x73')));}var _0x7c5d19=_0x504c63[_0xdc66('0x76')](function(_0x35656d){return _0x35656d===_0xdc66('0x77');});if(!_0x7c5d19){return _0x282beb(new Error(_0xdc66('0x78')));}var _0x5e5696=fs[_0xdc66('0x79')](path[_0xdc66('0x5f')](_0x4a1578,_0x51cd63[0x0],_0xdc66('0x77')));var _0x50d6e5=JSON[_0xdc66('0x7a')](_0x5e5696);if(_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x2f')]){return _0x282beb(new Error(_0xdc66('0x7c')));}if(_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x36')]){return _0x282beb(new Error(_0xdc66('0x7d')));}if(_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x7e')]){return _0x282beb(new Error(_0xdc66('0x7f')));}if(_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x80')]){return _0x282beb(new Error(_0xdc66('0x81')));}if(_0x50d6e5[_0xdc66('0x36')]===_0xdc66('0x82')){if(_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')]){return _0x282beb(new Error('Invalid\x20manifest:\x20views\x20missing'));}if('undefined'==typeof _0x50d6e5[_0xdc66('0x80')]['views'][_0xdc66('0x84')]&&_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x80')]['views'][_0xdc66('0x85')]){return _0x282beb(new Error(_0xdc66('0x86')));}}else if(_0x50d6e5['type']==='script'){if(_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x80')][_0xdc66('0x87')]){return _0x282beb(new Error(_0xdc66('0x88')));}if(_0xdc66('0x7b')==typeof _0x50d6e5[_0xdc66('0x80')]['scriptPath']){return _0x282beb(new Error(_0xdc66('0x89')));}}else{return _0x282beb(new Error(_0xdc66('0x8a')));}var _0x2b2670=_0x50d6e5[_0xdc66('0x2f')];var _0x502d33=_0x50d6e5[_0xdc66('0x8b')];var _0x59cac1=_0x50d6e5[_0xdc66('0x36')];var _0x4e75ea=_0x50d6e5[_0xdc66('0x8c')]?_0x50d6e5[_0xdc66('0x8c')]:_0xdc66('0x8d');var _0x2ff6b3=_0x50d6e5[_0xdc66('0x8e')]?_0x50d6e5['icon']:_0xdc66('0x8f');var _0x449c33='';var _0x1fb4f2='';var _0xcf3d7b='';var _0x645982='';var _0x522531=_0x50d6e5[_0xdc66('0x7e')];if(_0x59cac1===_0xdc66('0x82')){if(_0xdc66('0x7b')!=typeof _0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')]['admin']){var _0x39cc63=_0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')][_0xdc66('0x84')];if(!/^(f|ht)tps?:\/\//i[_0xdc66('0x90')](_0x39cc63)){_0x449c33=path[_0xdc66('0x5f')]('plugins',_0x225e0d,_0x51cd63[0x0],_0x39cc63);}else{_0x449c33=_0x39cc63;}}else{logger[_0xdc66('0x69')](_0xdc66('0x91'));}if('undefined'!=typeof _0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')][_0xdc66('0x85')]){var _0x228ebe=_0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')][_0xdc66('0x85')];if(!/^(f|ht)tps?:\/\//i[_0xdc66('0x90')](_0x228ebe)){_0x1fb4f2=path[_0xdc66('0x5f')]('plugins',_0x225e0d,_0x51cd63[0x0],_0x228ebe);}else{_0x1fb4f2=_0x228ebe;}}else{logger[_0xdc66('0x69')](_0xdc66('0x92'));}}else if(_0x59cac1==='script'){_0xcf3d7b=_0x50d6e5[_0xdc66('0x80')][_0xdc66('0x87')];_0x645982=_0x50d6e5[_0xdc66('0x80')][_0xdc66('0x93')];if('undefined'!=typeof _0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')]){if(_0xdc66('0x7b')!=typeof _0x50d6e5[_0xdc66('0x80')]['views'][_0xdc66('0x84')]){var _0x39cc63=_0x50d6e5[_0xdc66('0x80')]['views'][_0xdc66('0x84')];if(!/^(f|ht)tps?:\/\//i['test'](_0x39cc63)){_0x449c33=path['join'](_0xdc66('0x94'),_0x225e0d,_0x51cd63[0x0],_0x39cc63);}else{_0x449c33=_0x39cc63;}}if('undefined'!=typeof _0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')][_0xdc66('0x85')]){var _0x228ebe=_0x50d6e5[_0xdc66('0x80')][_0xdc66('0x83')][_0xdc66('0x85')];if(!/^(f|ht)tps?:\/\//i[_0xdc66('0x90')](_0x228ebe)){_0x1fb4f2=path['join'](_0xdc66('0x94'),_0x225e0d,_0x51cd63[0x0],_0x228ebe);}else{_0x1fb4f2=_0x228ebe;}}}}var _0x2e7187={'name':_0x2b2670,'description':_0x502d33,'path':path[_0xdc66('0x5f')](_0x225e0d,_0x51cd63[0x0]),'type':_0x59cac1,'sidebar':_0x4e75ea,'icon':_0x2ff6b3,'adminUrl':_0x449c33,'agentUrl':_0x1fb4f2,'scriptName':_0xcf3d7b,'scriptPath':_0x645982,'version':_0x522531};removeReferences(_0x3f7f3a,null);return db['Plugin'][_0xdc66('0x95')](_0x2e7187)[_0xdc66('0x2a')](function(_0x5cab4b){var _0x41cf2d={'role':_0x449711[_0xdc66('0x96')][_0xdc66('0x97')],'userProfileId':_0x449711[_0xdc66('0x96')][_0xdc66('0x98')]};if(!_0x41cf2d)throw new Error(_0xdc66('0x99'));if(_0x41cf2d[_0xdc66('0x97')]===_0xdc66('0x9a')){var _0x5213d1=_0x5cab4b[_0xdc66('0x9b')]({'plain':!![]});return db[_0xdc66('0x9c')][_0xdc66('0x50')]({'where':{'name':_0xdc66('0x2b'),'userProfileId':_0x41cf2d[_0xdc66('0x98')]},'raw':!![]})[_0xdc66('0x2a')](function(_0x4bb929){if(_0x4bb929&&_0x4bb929[_0xdc66('0x9d')]===0x0){return db['UserProfileResource'][_0xdc66('0x95')]({'name':_0x5213d1['name'],'resourceId':_0x5213d1['id'],'type':_0x4bb929[_0xdc66('0x2f')],'sectionId':_0x4bb929['id']},{})[_0xdc66('0x2a')](function(){return _0x5cab4b;});}else{return _0x5cab4b;}})[_0xdc66('0x4b')](function(_0x4f7230){logger[_0xdc66('0x2d')](_0xdc66('0x9e'),_0x4f7230);throw _0x4f7230;});}return _0x5cab4b;})[_0xdc66('0x2a')](respondWithResult(_0x50681d,null))[_0xdc66('0x4b')](handleError(_0x50681d,null));}});}catch(_0x30ecc4){_0x50681d[_0xdc66('0x20')](0x1f4)[_0xdc66('0x30')](_0x30ecc4);}};function removeReferences(_0x44c48f,_0x4476ae){try{if(_0x44c48f){fs['unlinkSync'](_0x44c48f);logger[_0xdc66('0x69')](_0xdc66('0x9f'));}if(_0x4476ae){rimraf(_0x4476ae,function(){});logger[_0xdc66('0x69')](_0xdc66('0xa0'));}}catch(_0x4da8ce){logger['error'](_0x4da8ce);}}exports['update']=function(_0x56b54e,_0xa6203a,_0x28963f){return db[_0xdc66('0x33')][_0xdc66('0x50')]({'where':{'id':_0x56b54e['params']['id']}})[_0xdc66('0x2a')](handleEntityNotFound(_0xa6203a,null))[_0xdc66('0x2a')](saveUpdates(_0x56b54e[_0xdc66('0x96')],null))[_0xdc66('0x2a')](respondWithResult(_0xa6203a,null))[_0xdc66('0x4b')](handleError(_0xa6203a,null));};exports[_0xdc66('0xa1')]=function(_0x4eda26,_0x2fbdbf,_0x4d4941){return db[_0xdc66('0x33')][_0xdc66('0x50')]({'where':{'id':_0x4eda26[_0xdc66('0x4d')]['id']}})[_0xdc66('0x2a')](function(_0x2e505c){if(_0x2e505c){return _0x2e505c['destroy']();}})[_0xdc66('0x2a')](function(_0x3cee28){rimraf(path[_0xdc66('0x5f')](config[_0xdc66('0x5c')],_0xdc66('0x52'),path[_0xdc66('0xa2')](_0x3cee28[_0xdc66('0x7')])),function(){});return _0x3cee28;})['then'](handleEntityNotFound(_0x2fbdbf,null))[_0xdc66('0x2a')](respondWithStatusCode(_0x2fbdbf,null))[_0xdc66('0x4b')](handleError(_0x2fbdbf,null));};exports[_0xdc66('0xa3')]=function(_0x2dd9ba,_0x5f3ced,_0x18c3c8){return BPromise[_0xdc66('0xa4')]()[_0xdc66('0x2a')](function(){if(!_0x2dd9ba[_0xdc66('0x3e')]['path']){throw new Error(_0xdc66('0xa5'));}if(!_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0xa6')]){throw new Error(_0xdc66('0xa7'));}var _0xf91d5f=_0x2dd9ba[_0xdc66('0x3e')]['hostname']?_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0xa8')]+':'+_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0xa6')]:_0xdc66('0xa9')+_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0xa6')];var _0x2de1a9=_0x2dd9ba['query'][_0xdc66('0x22')]?_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0x22')]:!![];var _0x2852e3=_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0xaa')]?_0x2dd9ba['query'][_0xdc66('0xaa')]:null;var _0x4c796c={'method':_0x2dd9ba[_0xdc66('0xab')],'uri':util[_0xdc66('0x64')]('%s%s',_0xf91d5f,_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0x7')]),'json':_0x2de1a9,'resolveWithFullResponse':!![],'encoding':_0x2852e3,'qs':_0x2dd9ba[_0xdc66('0x3e')]};if(_0x2dd9ba[_0xdc66('0xac')]){_0x4c796c[_0xdc66('0xac')]=_0x2dd9ba[_0xdc66('0xac')];if(_0x4c796c[_0xdc66('0xac')][_0xdc66('0xad')]){delete _0x4c796c[_0xdc66('0xac')][_0xdc66('0xad')];}}if(_0x4c796c['headers'][_0xdc66('0xae')]){delete _0x4c796c[_0xdc66('0xac')]['content-type'];}return rp(_0x4c796c);})[_0xdc66('0x2a')](function(_0x3a9bd9){if(_0x3a9bd9){_0x5f3ced[_0xdc66('0x25')](_0x3a9bd9['headers']);logger[_0xdc66('0x69')](_0x3a9bd9[_0xdc66('0x96')]);if(_[_0xdc66('0xaf')](_0x2dd9ba[_0xdc66('0x3e')][_0xdc66('0x7')],_0xdc66('0x51'))&&_0x3a9bd9[_0xdc66('0xb0')]==0x1f4){return _0x5f3ced[_0xdc66('0x1f')](_0x3a9bd9[_0xdc66('0xb0')]);}else{return _0x5f3ced[_0xdc66('0x20')](_0x3a9bd9[_0xdc66('0xb0')])[_0xdc66('0x30')](_0x3a9bd9['body']);}}else{return _0x5f3ced[_0xdc66('0x1f')](0xc8);}})[_0xdc66('0x4b')](handleError(_0x5f3ced,null));};exports[_0xdc66('0xb1')]=function(_0x1cc7bb,_0x2c7668,_0x2732a1){return BPromise[_0xdc66('0xa4')]()[_0xdc66('0x2a')](function(){if(!_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0x7')]){throw new Error(_0xdc66('0xa5'));}if(!_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0xa6')]){throw new Error(_0xdc66('0xa7'));}var _0x3eafdd=_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0xa8')]?_0x1cc7bb['query']['hostname']+':'+_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0xa6')]:_0xdc66('0xa9')+_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0xa6')];var _0x3e15bf=_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0x22')]?_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0x22')]:!![];var _0x5cc9a8=_0x1cc7bb['query']['encoding']?_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0xaa')]:null;var _0x2cad3f={'method':_0x1cc7bb[_0xdc66('0xab')],'uri':util[_0xdc66('0x64')](_0xdc66('0xb2'),_0x3eafdd,_0x1cc7bb[_0xdc66('0x3e')][_0xdc66('0x7')]),'json':_0x3e15bf,'resolveWithFullResponse':!![],'encoding':_0x5cc9a8,'body':_0x1cc7bb[_0xdc66('0x96')]};if(_0x1cc7bb[_0xdc66('0xac')]){_0x2cad3f[_0xdc66('0xac')]=_0x1cc7bb[_0xdc66('0xac')];if(_0x2cad3f[_0xdc66('0xac')][_0xdc66('0xad')]){delete _0x2cad3f[_0xdc66('0xac')][_0xdc66('0xad')];}}if(_0x2cad3f['headers'][_0xdc66('0xae')]){delete _0x2cad3f[_0xdc66('0xac')][_0xdc66('0xae')];}return rp(_0x2cad3f);})[_0xdc66('0x2a')](function(_0x12a20){if(_0x12a20){_0x2c7668[_0xdc66('0x25')](_0x12a20[_0xdc66('0xac')]);logger[_0xdc66('0x69')](_0x12a20[_0xdc66('0x96')]);return _0x2c7668[_0xdc66('0x20')](_0x12a20[_0xdc66('0xb0')])['send'](_0x12a20[_0xdc66('0x96')]);}else{return _0x2c7668[_0xdc66('0x1f')](0xc8);}})['catch'](handleError(_0x2c7668,null));};
\ No newline at end of file
+var _0x2f38=['Plugin\x20manifest\x20missing','readFileSync','parse','undefined','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20type\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','parameters','Invalid\x20manifest:\x20parameters\x20missing','html','views','admin','agent','Invalid\x20manifest:\x20no\x20view\x20specified','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','scriptPath','Invalid\x20manifest:\x20script\x20path\x20missing','Invalid\x20manifest:\x20invalid\x20type','sidebar','always','icon','icon-apps','Warning:\x20admin\x20view\x20not\x20specified','test','plugins','script','create','body','role','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','Plugins','userProfileId','autoAssociation','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','webhookGet','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','port','hostname','method','%s%s','headers','content-length','content-type','endsWith','statusCode','webhookPost','http://localhost:','encoding','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','extract-zip','archiver','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','redis','socket.io-emitter','register','sendStatus','status','json','set','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','end','error','name','send','index','map','Plugin','rawAttributes','type','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','limit','offset','sort','filters','pick','filter','where','merge','VIRTUAL','count','includeAll','include','findAll','catch','show','options','find','download','params','join','root','format','%s.zip','createWriteStream','zip','code','ENOENT','Sequelize','Error','**/*','server/files/plugins','dirname','basename','path','attachments/**/*','finalize','close','Plugin\x20not\x20found','Error\x20while\x20downloading\x20the\x20plugin','unlinkSync','info','Download\x20completed','Temporary\x20file\x20removed','file','filename','extname','Plugin\x20upload\x20filepath:\x20%s','Plugin\x20upload\x20destination:\x20%s','chmodSync','0777','readdirSync','Invalid\x20plugin\x20structure','lstatSync','isFile','isDirectory','some','manifest.json'];(function(_0x285c85,_0x132c21){var _0x2f81cd=function(_0x9b9962){while(--_0x9b9962){_0x285c85['push'](_0x285c85['shift']());}};_0x2f81cd(++_0x132c21);}(_0x2f38,0xdf));var _0x82f3=function(_0x23d78e,_0x263ad3){_0x23d78e=_0x23d78e-0x0;var _0x20d0f1=_0x2f38[_0x23d78e];return _0x20d0f1;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x82f3('0x0'));var rimraf=require(_0x82f3('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x82f3('0x2'));var rp=require(_0x82f3('0x3'));var moment=require(_0x82f3('0x4'));var BPromise=require(_0x82f3('0x5'));var Mustache=require(_0x82f3('0x6'));var util=require(_0x82f3('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x82f3('0x8'));var ejs=require(_0x82f3('0x9'));var fs=require('fs');var _=require(_0x82f3('0xa'));var squel=require('squel');var crypto=require(_0x82f3('0xb'));var jsforce=require(_0x82f3('0xc'));var deskjs=require(_0x82f3('0xd'));var toCsv=require(_0x82f3('0x8'));var querystring=require(_0x82f3('0xe'));var Papa=require(_0x82f3('0xf'));var extract=require(_0x82f3('0x10'));var rimraf=require('rimraf');var archiver=require(_0x82f3('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x82f3('0x12'));var as=require(_0x82f3('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x82f3('0x14'))(_0x82f3('0x15'));var utils=require(_0x82f3('0x16'));var config=require(_0x82f3('0x17'));var db=require('../../mysqldb')['db'];config[_0x82f3('0x18')]=_['defaults'](config[_0x82f3('0x18')],{'host':'localhost','port':0x18eb});var socket=require(_0x82f3('0x19'))(new Redis(config[_0x82f3('0x18')]));require('./plugin.socket')[_0x82f3('0x1a')](socket);function respondWithStatusCode(_0x55beeb,_0x4f2d2d){_0x4f2d2d=_0x4f2d2d||0xcc;return function(_0xe980b4){if(_0xe980b4){return _0x55beeb[_0x82f3('0x1b')](_0x4f2d2d);}return _0x55beeb[_0x82f3('0x1c')](_0x4f2d2d)['end']();};}function respondWithResult(_0xecc3f1,_0x426758){_0x426758=_0x426758||0xc8;return function(_0x19a1df){if(_0x19a1df){return _0xecc3f1[_0x82f3('0x1c')](_0x426758)[_0x82f3('0x1d')](_0x19a1df);}};}function respondWithFilteredResult(_0x4342f3,_0x30374b){return function(_0x3c68dc){if(_0x3c68dc){var _0x2f8ebd=_0x3c68dc['count'],_0x5a17e8=_0x30374b['offset'],_0x2552c3=_0x30374b['offset']+_0x30374b['limit'],_0x1bc048;if(_0x2552c3>=_0x2f8ebd){_0x2552c3=_0x2f8ebd;_0x1bc048=0xc8;}else{_0x1bc048=0xce;}_0x4342f3[_0x82f3('0x1c')](_0x1bc048);return _0x4342f3[_0x82f3('0x1e')](_0x82f3('0x1f'),_0x5a17e8+'-'+_0x2552c3+'/'+_0x2f8ebd)[_0x82f3('0x1d')](_0x3c68dc);}return null;};}function patchUpdates(_0x40ce83){return function(_0x26b2c0){try{jsonpatch[_0x82f3('0x20')](_0x26b2c0,_0x40ce83,!![]);}catch(_0x5da463){return BPromise[_0x82f3('0x21')](_0x5da463);}return _0x26b2c0[_0x82f3('0x22')]();};}function saveUpdates(_0x315240,_0x465b2e){return function(_0x8d4d86){if(_0x8d4d86){return _0x8d4d86[_0x82f3('0x23')](_0x315240)[_0x82f3('0x24')](function(_0x1fff15){return _0x1fff15;});}return null;};}function removeEntity(_0x2696f2,_0x47ff0a){return function(_0xeab921){if(_0xeab921){return _0xeab921[_0x82f3('0x25')]()[_0x82f3('0x24')](function(){var _0x32f7ec=_0xeab921[_0x82f3('0x26')]({'plain':!![]});var _0x1ff74a='Plugins';return db[_0x82f3('0x27')][_0x82f3('0x25')]({'where':{'type':_0x1ff74a,'resourceId':_0x32f7ec['id']}})[_0x82f3('0x24')](function(){return _0xeab921;});})[_0x82f3('0x24')](function(){_0x2696f2[_0x82f3('0x1c')](0xcc)[_0x82f3('0x28')]();});}};}function handleEntityNotFound(_0x2ee313,_0x14c2fa){return function(_0x27205c){if(!_0x27205c){_0x2ee313['sendStatus'](0x194);}return _0x27205c;};}function handleError(_0x22f667,_0x3c4eef){_0x3c4eef=_0x3c4eef||0x1f4;return function(_0x51b443){logger[_0x82f3('0x29')](_0x51b443['stack']);if(_0x51b443['name']){delete _0x51b443[_0x82f3('0x2a')];}_0x22f667[_0x82f3('0x1c')](_0x3c4eef)[_0x82f3('0x2b')](_0x51b443);};}exports[_0x82f3('0x2c')]=function(_0x233a0a,_0x454851){var _0x1ad59b={},_0x2990b9={},_0x1444f7={'count':0x0,'rows':[]};var _0x4ff25b=_[_0x82f3('0x2d')](db[_0x82f3('0x2e')][_0x82f3('0x2f')],function(_0x57ef1d){return{'name':_0x57ef1d['fieldName'],'type':_0x57ef1d[_0x82f3('0x30')][_0x82f3('0x31')]};});_0x2990b9[_0x82f3('0x32')]=_['map'](_0x4ff25b,_0x82f3('0x2a'));_0x2990b9[_0x82f3('0x33')]=_[_0x82f3('0x34')](_0x233a0a[_0x82f3('0x33')]);_0x2990b9['filters']=_['intersection'](_0x2990b9['model'],_0x2990b9[_0x82f3('0x33')]);_0x1ad59b['attributes']=_[_0x82f3('0x35')](_0x2990b9[_0x82f3('0x32')],qs['fields'](_0x233a0a[_0x82f3('0x33')][_0x82f3('0x36')]));_0x1ad59b[_0x82f3('0x37')]=_0x1ad59b[_0x82f3('0x37')][_0x82f3('0x38')]?_0x1ad59b[_0x82f3('0x37')]:_0x2990b9['model'];if(!_0x233a0a[_0x82f3('0x33')][_0x82f3('0x39')]('nolimit')){_0x1ad59b['limit']=qs['limit'](_0x233a0a['query'][_0x82f3('0x3a')]);_0x1ad59b['offset']=qs[_0x82f3('0x3b')](_0x233a0a[_0x82f3('0x33')]['offset']);}_0x1ad59b['order']=qs[_0x82f3('0x3c')](_0x233a0a[_0x82f3('0x33')][_0x82f3('0x3c')]);_0x1ad59b['where']=qs[_0x82f3('0x3d')](_[_0x82f3('0x3e')](_0x233a0a[_0x82f3('0x33')],_0x2990b9['filters']));if(_0x233a0a[_0x82f3('0x33')][_0x82f3('0x3f')]){_0x1ad59b[_0x82f3('0x40')]=_[_0x82f3('0x41')](_0x1ad59b[_0x82f3('0x40')],{'$or':_['map'](_0x4ff25b,function(_0x482c90){if(_0x482c90[_0x82f3('0x30')]!==_0x82f3('0x42')){var _0xecba4a={};_0xecba4a[_0x482c90[_0x82f3('0x2a')]]={'$like':'%'+_0x233a0a[_0x82f3('0x33')][_0x82f3('0x3f')]+'%'};return _0xecba4a;}})});}_0x1ad59b=_[_0x82f3('0x41')]({},_0x1ad59b,_0x233a0a['options']);var _0x24f056={'where':_0x1ad59b[_0x82f3('0x40')]};return db[_0x82f3('0x2e')][_0x82f3('0x43')](_0x24f056)[_0x82f3('0x24')](function(_0xced682){_0x1444f7[_0x82f3('0x43')]=_0xced682;if(_0x233a0a[_0x82f3('0x33')][_0x82f3('0x44')]){_0x1ad59b[_0x82f3('0x45')]=[{'all':!![]}];}return db[_0x82f3('0x2e')][_0x82f3('0x46')](_0x1ad59b);})[_0x82f3('0x24')](function(_0x259f98){_0x1444f7['rows']=_0x259f98;return _0x1444f7;})[_0x82f3('0x24')](respondWithFilteredResult(_0x454851,_0x1ad59b))[_0x82f3('0x47')](handleError(_0x454851,null));};exports[_0x82f3('0x48')]=function(_0x595862,_0xe67edd){var _0x178225={'raw':!![],'where':{'id':_0x595862['params']['id']}},_0x14d6ba={};_0x14d6ba[_0x82f3('0x32')]=_[_0x82f3('0x34')](db[_0x82f3('0x2e')][_0x82f3('0x2f')]);_0x14d6ba['query']=_[_0x82f3('0x34')](_0x595862[_0x82f3('0x33')]);_0x14d6ba[_0x82f3('0x3d')]=_['intersection'](_0x14d6ba[_0x82f3('0x32')],_0x14d6ba[_0x82f3('0x33')]);_0x178225['attributes']=_['intersection'](_0x14d6ba['model'],qs[_0x82f3('0x36')](_0x595862[_0x82f3('0x33')]['fields']));_0x178225['attributes']=_0x178225[_0x82f3('0x37')][_0x82f3('0x38')]?_0x178225[_0x82f3('0x37')]:_0x14d6ba[_0x82f3('0x32')];if(_0x595862[_0x82f3('0x33')][_0x82f3('0x44')]){_0x178225[_0x82f3('0x45')]=[{'all':!![]}];}_0x178225=_[_0x82f3('0x41')]({},_0x178225,_0x595862[_0x82f3('0x49')]);return db[_0x82f3('0x2e')][_0x82f3('0x4a')](_0x178225)['then'](handleEntityNotFound(_0xe67edd,null))[_0x82f3('0x24')](respondWithResult(_0xe67edd,null))[_0x82f3('0x47')](handleError(_0xe67edd,null));};exports[_0x82f3('0x4b')]=function(_0x12824a,_0x36efe9,_0xc770e6){return db['Plugin'][_0x82f3('0x4a')]({'where':{'id':_0x12824a[_0x82f3('0x4c')]['id']},'attributes':[_0x82f3('0x2a'),'path'],'raw':!![]})[_0x82f3('0x24')](handleEntityNotFound(_0x36efe9,null))[_0x82f3('0x24')](function(_0x881fde){if(_0x881fde){var _0x335505=path[_0x82f3('0x4d')](config[_0x82f3('0x4e')],'server/files/plugins',util[_0x82f3('0x4f')](_0x82f3('0x50'),path['basename'](_0x881fde['path'])));var _0x51a6f8=fs[_0x82f3('0x51')](_0x335505);var _0xd08720=archiver(_0x82f3('0x52'),{'zlib':{'level':0x9}});_0xd08720['on']('warning',function(_0x293069){if(_0x293069[_0x82f3('0x53')]===_0x82f3('0x54')){logger[_0x82f3('0x29')](_0x293069);}else{throw new db[(_0x82f3('0x55'))][(_0x82f3('0x56'))]('Error\x20while\x20generating\x20the\x20zip\x20archive');}});_0xd08720['on'](_0x82f3('0x29'),function(_0x174e12){throw new db['Sequelize'][(_0x82f3('0x56'))]('Error\x20while\x20generating\x20the\x20zip\x20archive');});_0xd08720['pipe'](_0x51a6f8);_0xd08720['glob'](_0x82f3('0x57'),{'cwd':path['join'](config['root'],_0x82f3('0x58'),path[_0x82f3('0x59')](_0x881fde['path'])),'ignore':[path[_0x82f3('0x4d')](path[_0x82f3('0x5a')](_0x881fde['path']),'node_modules/**/*'),path[_0x82f3('0x4d')](path['basename'](_0x881fde[_0x82f3('0x5b')]),_0x82f3('0x5c'))],'nodir':!![]})[_0x82f3('0x5d')]();_0x51a6f8['on'](_0x82f3('0x5e'),function(){if(!fs['existsSync'](_0x335505)){throw new db[(_0x82f3('0x55'))][(_0x82f3('0x56'))](_0x82f3('0x5f'));}return _0x36efe9[_0x82f3('0x4b')](_0x335505,util['format'](_0x82f3('0x50'),path[_0x82f3('0x5a')](_0x881fde[_0x82f3('0x5b')])),function(_0x4397cf){if(_0x4397cf){throw new db[(_0x82f3('0x55'))]['Error'](_0x82f3('0x60'));}fs[_0x82f3('0x61')](_0x335505);logger[_0x82f3('0x62')](_0x82f3('0x63'));logger[_0x82f3('0x62')](_0x82f3('0x64'));});});}return null;})[_0x82f3('0x47')](handleError(_0x36efe9,null));};exports['upload']=function(_0x128c86,_0x1543e2,_0x38326c){var _0x32187d=path['basename'](_0x128c86[_0x82f3('0x65')][_0x82f3('0x66')],path[_0x82f3('0x67')](_0x128c86[_0x82f3('0x65')]['filename']));var _0x2bcc13=path[_0x82f3('0x4d')](config[_0x82f3('0x4e')],_0x82f3('0x58'),_0x128c86[_0x82f3('0x65')]['filename']);var _0x5c1db5=path[_0x82f3('0x4d')](config['root'],_0x82f3('0x58'),_0x32187d);logger[_0x82f3('0x62')](_0x82f3('0x68'),_0x2bcc13);logger[_0x82f3('0x62')](_0x82f3('0x69'),_0x5c1db5);try{fs[_0x82f3('0x6a')](_0x2bcc13,parseInt(_0x82f3('0x6b'),0x8));extract(_0x2bcc13,{'dir':_0x5c1db5},function(_0x4a64a6){if(_0x4a64a6){logger[_0x82f3('0x29')](_0x4a64a6);handleError(_0x4a64a6,!![]);};var _0x365e37=fs[_0x82f3('0x6c')](_0x5c1db5);if(_0x365e37['length']>0x1){removeReferences(_0x2bcc13,_0x5c1db5);logger[_0x82f3('0x29')](_0x82f3('0x6d'));return _0x38326c(new Error(_0x82f3('0x6d')));}var _0xa2d7f3=fs[_0x82f3('0x6e')](path['join'](_0x5c1db5,_0x365e37[0x0]));if(_0xa2d7f3[_0x82f3('0x6f')]()){removeReferences(_0x2bcc13,_0x5c1db5);logger[_0x82f3('0x29')](_0x82f3('0x6d'));return _0x38326c(new Error(_0x82f3('0x6d')));}if(_0xa2d7f3[_0x82f3('0x70')]()){var _0x3580c1=fs[_0x82f3('0x6c')](path[_0x82f3('0x4d')](_0x5c1db5,_0x365e37[0x0]));if(_0x3580c1[_0x82f3('0x38')]===0x0){removeReferences(_0x2bcc13,_0x5c1db5);logger[_0x82f3('0x29')]('Invalid\x20plugin\x20structure');return _0x38326c(new Error(_0x82f3('0x6d')));}var _0x496bff=_0x3580c1[_0x82f3('0x71')](function(_0x1b337e){return _0x1b337e===_0x82f3('0x72');});if(!_0x496bff){return _0x38326c(new Error(_0x82f3('0x73')));}var _0x5d12db=fs[_0x82f3('0x74')](path['join'](_0x5c1db5,_0x365e37[0x0],_0x82f3('0x72')));var _0x3ca7b2=JSON[_0x82f3('0x75')](_0x5d12db);if(_0x82f3('0x76')==typeof _0x3ca7b2[_0x82f3('0x2a')]){return _0x38326c(new Error(_0x82f3('0x77')));}if(_0x82f3('0x76')==typeof _0x3ca7b2[_0x82f3('0x30')]){return _0x38326c(new Error(_0x82f3('0x78')));}if(_0x82f3('0x76')==typeof _0x3ca7b2[_0x82f3('0x79')]){return _0x38326c(new Error(_0x82f3('0x7a')));}if(_0x82f3('0x76')==typeof _0x3ca7b2[_0x82f3('0x7b')]){return _0x38326c(new Error(_0x82f3('0x7c')));}if(_0x3ca7b2[_0x82f3('0x30')]===_0x82f3('0x7d')){if(_0x82f3('0x76')==typeof _0x3ca7b2[_0x82f3('0x7b')]['views']){return _0x38326c(new Error('Invalid\x20manifest:\x20views\x20missing'));}if('undefined'==typeof _0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x7e')][_0x82f3('0x7f')]&&_0x82f3('0x76')==typeof _0x3ca7b2['parameters'][_0x82f3('0x7e')][_0x82f3('0x80')]){return _0x38326c(new Error(_0x82f3('0x81')));}}else if(_0x3ca7b2[_0x82f3('0x30')]==='script'){if('undefined'==typeof _0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x82')]){return _0x38326c(new Error(_0x82f3('0x83')));}if(_0x82f3('0x76')==typeof _0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x84')]){return _0x38326c(new Error(_0x82f3('0x85')));}}else{return _0x38326c(new Error(_0x82f3('0x86')));}var _0x23bbb4=_0x3ca7b2[_0x82f3('0x2a')];var _0x494bb9=_0x3ca7b2['description'];var _0x2b1aee=_0x3ca7b2[_0x82f3('0x30')];var _0x37e215=_0x3ca7b2['sidebar']?_0x3ca7b2[_0x82f3('0x87')]:_0x82f3('0x88');var _0xa134b5=_0x3ca7b2[_0x82f3('0x89')]?_0x3ca7b2[_0x82f3('0x89')]:_0x82f3('0x8a');var _0x3c183e='';var _0x2f44b0='';var _0x18c860='';var _0x2fac0f='';var _0x5d0faa=_0x3ca7b2[_0x82f3('0x79')];if(_0x2b1aee===_0x82f3('0x7d')){if('undefined'!=typeof _0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x7e')][_0x82f3('0x7f')]){var _0x278188=_0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x7e')]['admin'];if(!/^(f|ht)tps?:\/\//i['test'](_0x278188)){_0x3c183e=path[_0x82f3('0x4d')]('plugins',_0x32187d,_0x365e37[0x0],_0x278188);}else{_0x3c183e=_0x278188;}}else{logger[_0x82f3('0x62')](_0x82f3('0x8b'));}if(_0x82f3('0x76')!=typeof _0x3ca7b2[_0x82f3('0x7b')]['views']['agent']){var _0x1cd074=_0x3ca7b2['parameters']['views'][_0x82f3('0x80')];if(!/^(f|ht)tps?:\/\//i[_0x82f3('0x8c')](_0x1cd074)){_0x2f44b0=path[_0x82f3('0x4d')](_0x82f3('0x8d'),_0x32187d,_0x365e37[0x0],_0x1cd074);}else{_0x2f44b0=_0x1cd074;}}else{logger['info']('Warning:\x20agent\x20view\x20not\x20specified');}}else if(_0x2b1aee===_0x82f3('0x8e')){_0x18c860=_0x3ca7b2['parameters'][_0x82f3('0x82')];_0x2fac0f=_0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x84')];if(_0x82f3('0x76')!=typeof _0x3ca7b2['parameters'][_0x82f3('0x7e')]){if(_0x82f3('0x76')!=typeof _0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x7e')][_0x82f3('0x7f')]){var _0x278188=_0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x7e')]['admin'];if(!/^(f|ht)tps?:\/\//i['test'](_0x278188)){_0x3c183e=path[_0x82f3('0x4d')](_0x82f3('0x8d'),_0x32187d,_0x365e37[0x0],_0x278188);}else{_0x3c183e=_0x278188;}}if(_0x82f3('0x76')!=typeof _0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x7e')][_0x82f3('0x80')]){var _0x1cd074=_0x3ca7b2[_0x82f3('0x7b')][_0x82f3('0x7e')][_0x82f3('0x80')];if(!/^(f|ht)tps?:\/\//i[_0x82f3('0x8c')](_0x1cd074)){_0x2f44b0=path['join'](_0x82f3('0x8d'),_0x32187d,_0x365e37[0x0],_0x1cd074);}else{_0x2f44b0=_0x1cd074;}}}}var _0x39d869={'name':_0x23bbb4,'description':_0x494bb9,'path':path[_0x82f3('0x4d')](_0x32187d,_0x365e37[0x0]),'type':_0x2b1aee,'sidebar':_0x37e215,'icon':_0xa134b5,'adminUrl':_0x3c183e,'agentUrl':_0x2f44b0,'scriptName':_0x18c860,'scriptPath':_0x2fac0f,'version':_0x5d0faa};removeReferences(_0x2bcc13,null);return db['Plugin'][_0x82f3('0x8f')](_0x39d869)[_0x82f3('0x24')](function(_0x195b1b){var _0x3779ab={'role':_0x128c86[_0x82f3('0x90')][_0x82f3('0x91')],'userProfileId':_0x128c86[_0x82f3('0x90')]['userProfileId']};if(!_0x3779ab)throw new Error(_0x82f3('0x92'));if(_0x3779ab[_0x82f3('0x91')]===_0x82f3('0x93')){var _0x2d91d1=_0x195b1b[_0x82f3('0x26')]({'plain':!![]});return db[_0x82f3('0x94')][_0x82f3('0x4a')]({'where':{'name':_0x82f3('0x95'),'userProfileId':_0x3779ab[_0x82f3('0x96')]},'raw':!![]})['then'](function(_0x2a61e6){if(_0x2a61e6&&_0x2a61e6[_0x82f3('0x97')]===0x0){return db[_0x82f3('0x27')][_0x82f3('0x8f')]({'name':_0x2d91d1[_0x82f3('0x2a')],'resourceId':_0x2d91d1['id'],'type':_0x2a61e6[_0x82f3('0x2a')],'sectionId':_0x2a61e6['id']},{})[_0x82f3('0x24')](function(){return _0x195b1b;});}else{return _0x195b1b;}})[_0x82f3('0x47')](function(_0x425cdd){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x425cdd);throw _0x425cdd;});}return _0x195b1b;})['then'](respondWithResult(_0x1543e2,null))[_0x82f3('0x47')](handleError(_0x1543e2,null));}});}catch(_0xa6f190){_0x1543e2[_0x82f3('0x1c')](0x1f4)[_0x82f3('0x2b')](_0xa6f190);}};function removeReferences(_0x4f145f,_0x319871){try{if(_0x4f145f){fs[_0x82f3('0x61')](_0x4f145f);logger[_0x82f3('0x62')](_0x82f3('0x98'));}if(_0x319871){rimraf(_0x319871,function(){});logger['info'](_0x82f3('0x99'));}}catch(_0x332b38){logger[_0x82f3('0x29')](_0x332b38);}}exports[_0x82f3('0x23')]=function(_0x46e9ae,_0x30530e,_0x563aef){return db[_0x82f3('0x2e')][_0x82f3('0x4a')]({'where':{'id':_0x46e9ae[_0x82f3('0x4c')]['id']}})[_0x82f3('0x24')](handleEntityNotFound(_0x30530e,null))[_0x82f3('0x24')](saveUpdates(_0x46e9ae[_0x82f3('0x90')],null))[_0x82f3('0x24')](respondWithResult(_0x30530e,null))[_0x82f3('0x47')](handleError(_0x30530e,null));};exports['delete']=function(_0x58114f,_0x4a7c49,_0x301c75){return db[_0x82f3('0x2e')]['find']({'where':{'id':_0x58114f[_0x82f3('0x4c')]['id']}})[_0x82f3('0x24')](function(_0x2790f7){if(_0x2790f7){return _0x2790f7['destroy']();}})[_0x82f3('0x24')](function(_0x403615){rimraf(path[_0x82f3('0x4d')](config[_0x82f3('0x4e')],_0x82f3('0x58'),path['dirname'](_0x403615[_0x82f3('0x5b')])),function(){});return _0x403615;})[_0x82f3('0x24')](handleEntityNotFound(_0x4a7c49,null))[_0x82f3('0x24')](respondWithStatusCode(_0x4a7c49,null))[_0x82f3('0x47')](handleError(_0x4a7c49,null));};exports[_0x82f3('0x9a')]=function(_0x4bc01f,_0x514f22,_0x2e66e6){return BPromise[_0x82f3('0x9b')]()[_0x82f3('0x24')](function(){if(!_0x4bc01f['query']['path']){throw new Error(_0x82f3('0x9c'));}if(!_0x4bc01f[_0x82f3('0x33')][_0x82f3('0x9d')]){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0x3e65d8=_0x4bc01f[_0x82f3('0x33')][_0x82f3('0x9e')]?_0x4bc01f[_0x82f3('0x33')][_0x82f3('0x9e')]+':'+_0x4bc01f['query'][_0x82f3('0x9d')]:'http://localhost:'+_0x4bc01f[_0x82f3('0x33')][_0x82f3('0x9d')];var _0x51522e=_0x4bc01f[_0x82f3('0x33')][_0x82f3('0x1d')]?_0x4bc01f[_0x82f3('0x33')][_0x82f3('0x1d')]:!![];var _0x2443bb=_0x4bc01f[_0x82f3('0x33')]['encoding']?_0x4bc01f[_0x82f3('0x33')]['encoding']:null;var _0x2e7555={'method':_0x4bc01f[_0x82f3('0x9f')],'uri':util['format'](_0x82f3('0xa0'),_0x3e65d8,_0x4bc01f[_0x82f3('0x33')]['path']),'json':_0x51522e,'resolveWithFullResponse':!![],'encoding':_0x2443bb,'qs':_0x4bc01f[_0x82f3('0x33')]};if(_0x4bc01f[_0x82f3('0xa1')]){_0x2e7555['headers']=_0x4bc01f['headers'];if(_0x2e7555['headers']['content-length']){delete _0x2e7555[_0x82f3('0xa1')][_0x82f3('0xa2')];}}if(_0x2e7555[_0x82f3('0xa1')][_0x82f3('0xa3')]){delete _0x2e7555[_0x82f3('0xa1')]['content-type'];}return rp(_0x2e7555);})['then'](function(_0xc7add7){if(_0xc7add7){_0x514f22[_0x82f3('0x1e')](_0xc7add7[_0x82f3('0xa1')]);logger[_0x82f3('0x62')](_0xc7add7[_0x82f3('0x90')]);if(_[_0x82f3('0xa4')](_0x4bc01f[_0x82f3('0x33')]['path'],_0x82f3('0x4b'))&&_0xc7add7[_0x82f3('0xa5')]==0x1f4){return _0x514f22[_0x82f3('0x1b')](_0xc7add7[_0x82f3('0xa5')]);}else{return _0x514f22[_0x82f3('0x1c')](_0xc7add7[_0x82f3('0xa5')])[_0x82f3('0x2b')](_0xc7add7['body']);}}else{return _0x514f22[_0x82f3('0x1b')](0xc8);}})['catch'](handleError(_0x514f22,null));};exports[_0x82f3('0xa6')]=function(_0x5cf417,_0x6ccb5,_0x334c47){return BPromise[_0x82f3('0x9b')]()[_0x82f3('0x24')](function(){if(!_0x5cf417['query'][_0x82f3('0x5b')]){throw new Error(_0x82f3('0x9c'));}if(!_0x5cf417[_0x82f3('0x33')][_0x82f3('0x9d')]){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0x3b813e=_0x5cf417[_0x82f3('0x33')][_0x82f3('0x9e')]?_0x5cf417[_0x82f3('0x33')]['hostname']+':'+_0x5cf417['query'][_0x82f3('0x9d')]:_0x82f3('0xa7')+_0x5cf417[_0x82f3('0x33')][_0x82f3('0x9d')];var _0xf1f521=_0x5cf417[_0x82f3('0x33')][_0x82f3('0x1d')]?_0x5cf417[_0x82f3('0x33')]['json']:!![];var _0x45456f=_0x5cf417['query'][_0x82f3('0xa8')]?_0x5cf417['query'][_0x82f3('0xa8')]:null;var _0x3a63af={'method':_0x5cf417['method'],'uri':util[_0x82f3('0x4f')](_0x82f3('0xa0'),_0x3b813e,_0x5cf417[_0x82f3('0x33')][_0x82f3('0x5b')]),'json':_0xf1f521,'resolveWithFullResponse':!![],'encoding':_0x45456f,'body':_0x5cf417['body']};if(_0x5cf417[_0x82f3('0xa1')]){_0x3a63af[_0x82f3('0xa1')]=_0x5cf417['headers'];if(_0x3a63af[_0x82f3('0xa1')][_0x82f3('0xa2')]){delete _0x3a63af[_0x82f3('0xa1')][_0x82f3('0xa2')];}}if(_0x3a63af['headers'][_0x82f3('0xa3')]){delete _0x3a63af[_0x82f3('0xa1')][_0x82f3('0xa3')];}return rp(_0x3a63af);})[_0x82f3('0x24')](function(_0x2a8bee){if(_0x2a8bee){_0x6ccb5[_0x82f3('0x1e')](_0x2a8bee['headers']);logger['info'](_0x2a8bee[_0x82f3('0x90')]);return _0x6ccb5[_0x82f3('0x1c')](_0x2a8bee[_0x82f3('0xa5')])[_0x82f3('0x2b')](_0x2a8bee[_0x82f3('0x90')]);}else{return _0x6ccb5['sendStatus'](0xc8);}})[_0x82f3('0x47')](handleError(_0x6ccb5,null));};
\ No newline at end of file
diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js
index 69b50f1..37c84c5 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 _0x0424=['exports','Plugin','setMaxListeners','save','update','emit','hasOwnProperty','hook'];(function(_0x301854,_0x39302f){var _0x50203c=function(_0x459341){while(--_0x459341){_0x301854['push'](_0x301854['shift']());}};_0x50203c(++_0x39302f);}(_0x0424,0x159));var _0x4042=function(_0x3130b5,_0x23faf7){_0x3130b5=_0x3130b5-0x0;var _0xa6d8a3=_0x0424[_0x3130b5];return _0xa6d8a3;};'use strict';var EventEmitter=require('events');var Plugin=require('../../mysqldb')['db'][_0x4042('0x0')];var PluginEvents=new EventEmitter();PluginEvents[_0x4042('0x1')](0x0);var events={'afterCreate':_0x4042('0x2'),'afterUpdate':_0x4042('0x3'),'afterDestroy':'remove'};function emitEvent(_0x3cd879){return function(_0x519987,_0x491eae,_0x20d8df){PluginEvents[_0x4042('0x4')](_0x3cd879+':'+_0x519987['id'],_0x519987);PluginEvents[_0x4042('0x4')](_0x3cd879,_0x519987);_0x20d8df(null);};}for(var e in events){if(events[_0x4042('0x5')](e)){var event=events[e];Plugin[_0x4042('0x6')](e,emitEvent(event));}}module[_0x4042('0x7')]=PluginEvents;
\ No newline at end of file
+var _0x781d=['hasOwnProperty','exports','events','../../mysqldb','save','update','remove','emit'];(function(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0x781d,0x14a));var _0xd781=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x781d[_0x501510];return _0x1e6ee5;};'use strict';var EventEmitter=require(_0xd781('0x0'));var Plugin=require(_0xd781('0x1'))['db']['Plugin'];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd781('0x2'),'afterUpdate':_0xd781('0x3'),'afterDestroy':_0xd781('0x4')};function emitEvent(_0x1a9f94){return function(_0xfd915d,_0x42258e,_0x446534){PluginEvents[_0xd781('0x5')](_0x1a9f94+':'+_0xfd915d['id'],_0xfd915d);PluginEvents[_0xd781('0x5')](_0x1a9f94,_0xfd915d);_0x446534(null);};}for(var e in events){if(events[_0xd781('0x6')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0xd781('0x7')]=PluginEvents;
\ No newline at end of file
diff --git a/server/api/plugin/plugin.model.js b/server/api/plugin/plugin.model.js
index 50b0d8c..e980efb 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 _0x8958=['define','Plugin','plugins','util','request-promise','rimraf','../../config/environment','./plugin.attributes'];(function(_0x23975d,_0x4ee5c8){var _0x11ad3f=function(_0x2b7ded){while(--_0x2b7ded){_0x23975d['push'](_0x23975d['shift']());}};_0x11ad3f(++_0x4ee5c8);}(_0x8958,0x93));var _0x8895=function(_0x1f2a4a,_0x3d6ce5){_0x1f2a4a=_0x1f2a4a-0x0;var _0x2ab6fa=_0x8958[_0x1f2a4a];return _0x2ab6fa;};'use strict';var _=require('lodash');var util=require(_0x8895('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x8895('0x1'));var fs=require('fs');var path=require('path');var rimraf=require(_0x8895('0x2'));var config=require(_0x8895('0x3'));var attributes=require(_0x8895('0x4'));module['exports']=function(_0x22fa52,_0x2f03ad){return _0x22fa52[_0x8895('0x5')](_0x8895('0x6'),attributes,{'tableName':_0x8895('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0e85=['api','moment','rimraf','./plugin.attributes','exports','Plugin','plugins','lodash','util'];(function(_0x5c7b0c,_0x248628){var _0x5318b9=function(_0x45ed9d){while(--_0x45ed9d){_0x5c7b0c['push'](_0x5c7b0c['shift']());}};_0x5318b9(++_0x248628);}(_0x0e85,0x7c));var _0x50e8=function(_0x47fd36,_0x41535d){_0x47fd36=_0x47fd36-0x0;var _0x21a0fc=_0x0e85[_0x47fd36];return _0x21a0fc;};'use strict';var _=require(_0x50e8('0x0'));var util=require(_0x50e8('0x1'));var logger=require('../../config/logger')(_0x50e8('0x2'));var moment=require(_0x50e8('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x50e8('0x4'));var config=require('../../config/environment');var attributes=require(_0x50e8('0x5'));module[_0x50e8('0x6')]=function(_0xe3151e,_0xfde42){return _0xe3151e['define'](_0x50e8('0x7'),attributes,{'tableName':_0x50e8('0x8'),'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 247cf97..ff109af 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 _0xf4f4=['localhost','socket.io-emitter','./plugin.socket','register','request','then','Plugin,\x20%s,\x20%s','request\x20sent','debug','Plugin,\x20%s,\x20%s,\x20%s','error','message','result','catch','CreatePlugin','body','options','info','stringify','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults'];(function(_0x58aa25,_0x5d5cd9){var _0x199279=function(_0x3433b8){while(--_0x3433b8){_0x58aa25['push'](_0x58aa25['shift']());}};_0x199279(++_0x5d5cd9);}(_0xf4f4,0x15d));var _0x4f4f=function(_0x59d0cc,_0xa7c52b){_0x59d0cc=_0x59d0cc-0x0;var _0x2ae79f=_0xf4f4[_0x59d0cc];return _0x2ae79f;};'use strict';var _=require(_0x4f4f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x4f4f('0x1'));var rs=require(_0x4f4f('0x2'));var fs=require('fs');var Redis=require(_0x4f4f('0x3'));var db=require(_0x4f4f('0x4'))['db'];var utils=require(_0x4f4f('0x5'));var logger=require(_0x4f4f('0x6'))(_0x4f4f('0x7'));var config=require(_0x4f4f('0x8'));var jayson=require(_0x4f4f('0x9'));var client=jayson[_0x4f4f('0xa')][_0x4f4f('0xb')]({'port':0x232a});config[_0x4f4f('0xc')]=_[_0x4f4f('0xd')](config[_0x4f4f('0xc')],{'host':_0x4f4f('0xe'),'port':0x18eb});var socket=require(_0x4f4f('0xf'))(new Redis(config['redis']));require(_0x4f4f('0x10'))[_0x4f4f('0x11')](socket);function respondWithRpcPromise(_0x2b29e0,_0x21041d,_0x36b431){return new BPromise(function(_0x2aefdf,_0x4af8ce){return client[_0x4f4f('0x12')](_0x2b29e0,_0x36b431)[_0x4f4f('0x13')](function(_0x5388ab){logger['info'](_0x4f4f('0x14'),_0x21041d,_0x4f4f('0x15'));logger[_0x4f4f('0x16')](_0x4f4f('0x17'),_0x21041d,'request\x20sent',JSON['stringify'](_0x5388ab));if(_0x5388ab['error']){if(_0x5388ab[_0x4f4f('0x18')]['code']===0x1f4){logger[_0x4f4f('0x18')](_0x4f4f('0x14'),_0x21041d,_0x5388ab['error'][_0x4f4f('0x19')]);return _0x4af8ce(_0x5388ab[_0x4f4f('0x18')][_0x4f4f('0x19')]);}logger[_0x4f4f('0x18')]('Plugin,\x20%s,\x20%s',_0x21041d,_0x5388ab['error'][_0x4f4f('0x19')]);return _0x2aefdf(_0x5388ab[_0x4f4f('0x18')][_0x4f4f('0x19')]);}else{logger['info']('Plugin,\x20%s,\x20%s',_0x21041d,_0x4f4f('0x15'));_0x2aefdf(_0x5388ab[_0x4f4f('0x1a')][_0x4f4f('0x19')]);}})[_0x4f4f('0x1b')](function(_0x5f16e3){logger[_0x4f4f('0x18')](_0x4f4f('0x14'),_0x21041d,_0x5f16e3);_0x4af8ce(_0x5f16e3);});});}exports[_0x4f4f('0x1c')]=function(_0x5ddf0d){var _0x1e9b37=this;return new Promise(function(_0x3bc451,_0x23c2eb){return db['Plugin']['create'](_0x5ddf0d[_0x4f4f('0x1d')],{'raw':_0x5ddf0d[_0x4f4f('0x1e')]?_0x5ddf0d[_0x4f4f('0x1e')]['raw']===undefined?!![]:![]:!![]})[_0x4f4f('0x13')](function(_0x316117){logger[_0x4f4f('0x1f')]('CreatePlugin',_0x5ddf0d);logger['debug'](_0x4f4f('0x1c'),_0x5ddf0d,JSON[_0x4f4f('0x20')](_0x316117));_0x3bc451(_0x316117);})[_0x4f4f('0x1b')](function(_0x52e512){logger['error'](_0x4f4f('0x1c'),_0x52e512[_0x4f4f('0x19')],_0x5ddf0d);_0x23c2eb(_0x1e9b37['error'](0x1f4,_0x52e512[_0x4f4f('0x19')]));});});};
\ No newline at end of file
+var _0x726e=['rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./plugin.socket','register','info','Plugin,\x20%s,\x20%s','request\x20sent','debug','Plugin,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreatePlugin','Plugin','raw','then','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x4ee36a,_0x251663){var _0x275e3a=function(_0x480321){while(--_0x480321){_0x4ee36a['push'](_0x4ee36a['shift']());}};_0x275e3a(++_0x251663);}(_0x726e,0x130));var _0xe726=function(_0x588791,_0x35a42e){_0x588791=_0x588791-0x0;var _0x28937a=_0x726e[_0x588791];return _0x28937a;};'use strict';var _=require(_0xe726('0x0'));var util=require(_0xe726('0x1'));var moment=require('moment');var BPromise=require(_0xe726('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe726('0x3'))['db'];var utils=require(_0xe726('0x4'));var logger=require(_0xe726('0x5'))(_0xe726('0x6'));var config=require(_0xe726('0x7'));var jayson=require(_0xe726('0x8'));var client=jayson[_0xe726('0x9')][_0xe726('0xa')]({'port':0x232a});config[_0xe726('0xb')]=_[_0xe726('0xc')](config[_0xe726('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xe726('0xd'))(new Redis(config[_0xe726('0xb')]));require(_0xe726('0xe'))[_0xe726('0xf')](socket);function respondWithRpcPromise(_0x16fa33,_0x362288,_0xbdc433){return new BPromise(function(_0x2f7588,_0x3418f5){return client['request'](_0x16fa33,_0xbdc433)['then'](function(_0x5d5599){logger[_0xe726('0x10')](_0xe726('0x11'),_0x362288,_0xe726('0x12'));logger[_0xe726('0x13')](_0xe726('0x14'),_0x362288,_0xe726('0x12'),JSON[_0xe726('0x15')](_0x5d5599));if(_0x5d5599['error']){if(_0x5d5599[_0xe726('0x16')][_0xe726('0x17')]===0x1f4){logger[_0xe726('0x16')](_0xe726('0x11'),_0x362288,_0x5d5599[_0xe726('0x16')][_0xe726('0x18')]);return _0x3418f5(_0x5d5599[_0xe726('0x16')][_0xe726('0x18')]);}logger[_0xe726('0x16')](_0xe726('0x11'),_0x362288,_0x5d5599['error'][_0xe726('0x18')]);return _0x2f7588(_0x5d5599['error'][_0xe726('0x18')]);}else{logger[_0xe726('0x10')](_0xe726('0x11'),_0x362288,_0xe726('0x12'));_0x2f7588(_0x5d5599[_0xe726('0x19')]['message']);}})[_0xe726('0x1a')](function(_0x36369a){logger[_0xe726('0x16')]('Plugin,\x20%s,\x20%s',_0x362288,_0x36369a);_0x3418f5(_0x36369a);});});}exports[_0xe726('0x1b')]=function(_0x2816b2){var _0x345b8c=this;return new Promise(function(_0x5d7dcc,_0x4ae112){return db[_0xe726('0x1c')]['create'](_0x2816b2['body'],{'raw':_0x2816b2['options']?_0x2816b2['options'][_0xe726('0x1d')]===undefined?!![]:![]:!![]})[_0xe726('0x1e')](function(_0x3cfabb){logger[_0xe726('0x10')]('CreatePlugin',_0x2816b2);logger[_0xe726('0x13')]('CreatePlugin',_0x2816b2,JSON['stringify'](_0x3cfabb));_0x5d7dcc(_0x3cfabb);})['catch'](function(_0x130c04){logger[_0xe726('0x16')](_0xe726('0x1b'),_0x130c04[_0xe726('0x18')],_0x2816b2);_0x4ae112(_0x345b8c[_0xe726('0x16')](0x1f4,_0x130c04['message']));});});};
\ No newline at end of file
diff --git a/server/api/plugin/plugin.socket.js b/server/api/plugin/plugin.socket.js
index c7832aa..3c52f3d 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 _0x2ae0=['length','remove','update','removeListener','register'];(function(_0xf73c09,_0x4e424e){var _0xa8923c=function(_0x4831c1){while(--_0x4831c1){_0xf73c09['push'](_0xf73c09['shift']());}};_0xa8923c(++_0x4e424e);}(_0x2ae0,0x137));var _0x02ae=function(_0x4a9cdc,_0x1a9aec){_0x4a9cdc=_0x4a9cdc-0x0;var _0x261ee2=_0x2ae0[_0x4a9cdc];return _0x261ee2;};'use strict';var PluginEvents=require('./plugin.events');var events=['save',_0x02ae('0x0'),_0x02ae('0x1')];function createListener(_0x40e60b,_0x47cb93){return function(_0x335028){_0x47cb93['emit'](_0x40e60b,_0x335028);};}function removeListener(_0x4c3571,_0x6f31aa){return function(){PluginEvents[_0x02ae('0x2')](_0x4c3571,_0x6f31aa);};}exports[_0x02ae('0x3')]=function(_0x57ba27){for(var _0xa78209=0x0,_0x3dd475=events[_0x02ae('0x4')];_0xa78209<_0x3dd475;_0xa78209++){var _0x288b0e=events[_0xa78209];var _0x54f327=createListener('plugin:'+_0x288b0e,_0x57ba27);PluginEvents['on'](_0x288b0e,_0x54f327);}};
\ No newline at end of file
+var _0x83f6=['plugin:','./plugin.events','save','remove','emit','removeListener','register'];(function(_0xae2a1f,_0x29eaca){var _0x3fc6e2=function(_0x4288f0){while(--_0x4288f0){_0xae2a1f['push'](_0xae2a1f['shift']());}};_0x3fc6e2(++_0x29eaca);}(_0x83f6,0x1dd));var _0x683f=function(_0x55c485,_0x3fe77e){_0x55c485=_0x55c485-0x0;var _0x6bb521=_0x83f6[_0x55c485];return _0x6bb521;};'use strict';var PluginEvents=require(_0x683f('0x0'));var events=[_0x683f('0x1'),_0x683f('0x2'),'update'];function createListener(_0x3e61f5,_0x3b83a7){return function(_0x6ccab){_0x3b83a7[_0x683f('0x3')](_0x3e61f5,_0x6ccab);};}function removeListener(_0x14a988,_0x5ccb79){return function(){PluginEvents[_0x683f('0x4')](_0x14a988,_0x5ccb79);};}exports[_0x683f('0x5')]=function(_0x36ba4c){for(var _0x59fe20=0x0,_0x32a955=events['length'];_0x59fe20<_0x32a955;_0x59fe20++){var _0x815ad=events[_0x59fe20];var _0x27760f=createListener(_0x683f('0x6')+_0x815ad,_0x36ba4c);PluginEvents['on'](_0x815ad,_0x27760f);}};
\ No newline at end of file
diff --git a/server/api/pm2/index.js b/server/api/pm2/index.js
index f8f9ddb..f8d6f48 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 _0xd6cd=['/:id','destroy','express','Router','../../components/auth/service','./pm2.controller','get','isAuthenticated','index','show','post','create','put','delete'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xd6cd,0x1d0));var _0xdd6c=function(_0x5af882,_0x5ee19a){_0x5af882=_0x5af882-0x0;var _0x1021c0=_0xd6cd[_0x5af882];return _0x1021c0;};'use strict';var express=require(_0xdd6c('0x0'));var router=express[_0xdd6c('0x1')]();var auth=require(_0xdd6c('0x2'));var controller=require(_0xdd6c('0x3'));router[_0xdd6c('0x4')]('/',auth[_0xdd6c('0x5')](),controller[_0xdd6c('0x6')]);router[_0xdd6c('0x4')]('/:id',auth[_0xdd6c('0x5')](),controller[_0xdd6c('0x7')]);router[_0xdd6c('0x8')]('/',auth[_0xdd6c('0x5')](),controller[_0xdd6c('0x9')]);router[_0xdd6c('0xa')]('/:id',auth[_0xdd6c('0x5')](),controller['update']);router[_0xdd6c('0xb')](_0xdd6c('0xc'),auth[_0xdd6c('0x5')](),controller[_0xdd6c('0xd')]);module['exports']=router;
\ No newline at end of file
+var _0xb084=['isAuthenticated','index','/:id','show','create','put','update','delete','destroy','exports','express','./pm2.controller','get'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xb084,0x169));var _0x4b08=function(_0x95095e,_0x1151a6){_0x95095e=_0x95095e-0x0;var _0x3ea7f7=_0xb084[_0x95095e];return _0x3ea7f7;};'use strict';var express=require(_0x4b08('0x0'));var router=express['Router']();var auth=require('../../components/auth/service');var controller=require(_0x4b08('0x1'));router[_0x4b08('0x2')]('/',auth[_0x4b08('0x3')](),controller[_0x4b08('0x4')]);router[_0x4b08('0x2')](_0x4b08('0x5'),auth['isAuthenticated'](),controller[_0x4b08('0x6')]);router['post']('/',auth[_0x4b08('0x3')](),controller[_0x4b08('0x7')]);router[_0x4b08('0x8')](_0x4b08('0x5'),auth[_0x4b08('0x3')](),controller[_0x4b08('0x9')]);router[_0x4b08('0xa')](_0x4b08('0x5'),auth[_0x4b08('0x3')](),controller[_0x4b08('0xb')]);module[_0x4b08('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 f9d3173..7b7818d 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 _0x8c5b=['dump','Missing\x20name\x20and/or\x20path','restart','Unknown\x20status','destroy','delete','../../config/pm2','../../config/logger','api','child_process','exec','status','error','stack','name','send','npm\x20install','info','index','list','reject','length','then','catch','show','params','create','script','../../files/plugins','body','cwd','chdir','dirname','start'];(function(_0x555ff2,_0x4ece49){var _0x2eba05=function(_0x5473b5){while(--_0x5473b5){_0x555ff2['push'](_0x555ff2['shift']());}};_0x2eba05(++_0x4ece49);}(_0x8c5b,0x8e));var _0xb8c5=function(_0x463183,_0x56bd4e){_0x463183=_0x463183-0x0;var _0xd5fe56=_0x8c5b[_0x463183];return _0xd5fe56;};'use strict';var _=require('lodash');var pm2=require(_0xb8c5('0x0'));var logger=require(_0xb8c5('0x1'))(_0xb8c5('0x2'));var path=require('path');var exec=require(_0xb8c5('0x3'))[_0xb8c5('0x4')];var BPromise=require('bluebird');function handleEntityNotFound(_0x1e93dd,_0x48dc7d){return function(_0x2d4c9b){if(!_0x2d4c9b){_0x1e93dd['sendStatus'](0x194);;}return _0x2d4c9b;};}function respondWithResult(_0xdb851d,_0x1adb2e){_0x1adb2e=_0x1adb2e||0xc8;return function(_0x25cece){if(_0x25cece){return _0xdb851d[_0xb8c5('0x5')](_0x1adb2e)['json'](_0x25cece);}return null;};}function handleError(_0x920263,_0x5c0a55){_0x5c0a55=_0x5c0a55||0x1f4;return function(_0x30cbb5){logger[_0xb8c5('0x6')](_0x30cbb5[_0xb8c5('0x7')]);if(_0x30cbb5[_0xb8c5('0x8')]){delete _0x30cbb5[_0xb8c5('0x8')];}_0x920263[_0xb8c5('0x5')](_0x5c0a55)[_0xb8c5('0x9')](_0x30cbb5);};}function execChildProcess(){return new BPromise(function(_0x24539a,_0x4580a5){exec(_0xb8c5('0xa'),function(_0x360e00,_0x573162,_0x313464){logger[_0xb8c5('0xb')](_0x573162);logger[_0xb8c5('0xb')](_0x313464);if(_0x360e00){logger[_0xb8c5('0x6')](_0x360e00);return _0x4580a5(_0x360e00);}return _0x24539a(_0x573162);});});}exports[_0xb8c5('0xc')]=function(_0x537174,_0x1dcb7e){return pm2[_0xb8c5('0xd')]()['then'](function(_0x370af5){if(_0x370af5){var _0x5b9d05=_[_0xb8c5('0xe')](_0x370af5,function(_0x4dc00e){return _0x4dc00e[_0xb8c5('0x8')]==='express'||_0x4dc00e[_0xb8c5('0x8')]==='motion2';});return{'rows':_0x5b9d05,'count':_0x5b9d05[_0xb8c5('0xf')]};}return null;})[_0xb8c5('0x10')](respondWithResult(_0x1dcb7e,null))[_0xb8c5('0x11')](handleError(_0x1dcb7e,null));};exports[_0xb8c5('0x12')]=function(_0x377e86,_0x5ec425){return pm2['describe'](_0x377e86[_0xb8c5('0x13')]['id'])[_0xb8c5('0x10')](respondWithResult(_0x5ec425,null))[_0xb8c5('0x10')](handleEntityNotFound(_0x5ec425,null))[_0xb8c5('0x11')](handleError(_0x5ec425,null));};exports[_0xb8c5('0x14')]=function(_0x144062,_0x2e3424){if(_0x144062['body'][_0xb8c5('0x8')]&&_0x144062['body'][_0xb8c5('0x15')]){var _0x1333ce=path['join'](__dirname,_0xb8c5('0x16'),_0x144062[_0xb8c5('0x17')]['script']);var _0x57c71a=process[_0xb8c5('0x18')]();process[_0xb8c5('0x19')](path[_0xb8c5('0x1a')](_0x1333ce));return execChildProcess()[_0xb8c5('0x10')](function(_0x3e0456){process[_0xb8c5('0x19')](_0x57c71a);return pm2[_0xb8c5('0x1b')]({'name':_0x144062['body']['name'],'script':_0x1333ce});})[_0xb8c5('0x10')](function(_0x442f4d){pm2[_0xb8c5('0x1c')]();return _0x442f4d[0x0];})[_0xb8c5('0x10')](respondWithResult(_0x2e3424,0xc9))[_0xb8c5('0x11')](handleError(_0x2e3424,null));}else{return _0x2e3424[_0xb8c5('0x5')](0x1f4)['send']({'message':_0xb8c5('0x1d')});}};exports['update']=function(_0x3519f3,_0x6b4eb3){if(_0x3519f3['body']['id']){delete _0x3519f3[_0xb8c5('0x17')]['id'];}var _0x59e0fd={'online':_0xb8c5('0x1e'),'stopped':'stop'};if(_0x59e0fd['hasOwnProperty'](_0x3519f3['body'][_0xb8c5('0x5')])){return pm2[_0x59e0fd[_0x3519f3[_0xb8c5('0x17')][_0xb8c5('0x5')]]](_0x3519f3[_0xb8c5('0x13')]['id'])[_0xb8c5('0x10')](respondWithResult(_0x6b4eb3,0xc8))[_0xb8c5('0x11')](handleError(_0x6b4eb3,null));}else{return _0x6b4eb3[_0xb8c5('0x5')](0x1f4)['send']({'message':_0xb8c5('0x1f')});}};exports[_0xb8c5('0x20')]=function(_0x40b6f9,_0x210924){if(_0x40b6f9[_0xb8c5('0x17')]['id']){delete _0x40b6f9[_0xb8c5('0x17')]['id'];}if(_0x40b6f9[_0xb8c5('0x13')]['id']){return pm2[_0xb8c5('0x21')](_0x40b6f9[_0xb8c5('0x13')]['id'])[_0xb8c5('0x10')](function(_0x32004f){pm2['dump']();return _0x32004f[0x0];})[_0xb8c5('0x10')](respondWithResult(_0x210924,null))[_0xb8c5('0x11')](handleError(_0x210924,null));}else{return _0x210924['status'](0x1f4)[_0xb8c5('0x9')]({'message':'Unknown\x20id'});}};
\ No newline at end of file
+var _0xfd3e=['api','child_process','exec','bluebird','sendStatus','json','error','name','send','npm\x20install','info','index','list','then','express','motion2','length','catch','show','describe','params','create','body','../../files/plugins','script','cwd','dirname','chdir','start','status','Missing\x20name\x20and/or\x20path','update','restart','hasOwnProperty','destroy','delete','dump','lodash','../../config/logger'];(function(_0x3ab9ee,_0x4a74b8){var _0x82ee88=function(_0x6ccc7e){while(--_0x6ccc7e){_0x3ab9ee['push'](_0x3ab9ee['shift']());}};_0x82ee88(++_0x4a74b8);}(_0xfd3e,0x1d2));var _0xefd3=function(_0x45f697,_0x58dfda){_0x45f697=_0x45f697-0x0;var _0x1a579f=_0xfd3e[_0x45f697];return _0x1a579f;};'use strict';var _=require(_0xefd3('0x0'));var pm2=require('../../config/pm2');var logger=require(_0xefd3('0x1'))(_0xefd3('0x2'));var path=require('path');var exec=require(_0xefd3('0x3'))[_0xefd3('0x4')];var BPromise=require(_0xefd3('0x5'));function handleEntityNotFound(_0x1f104d,_0x568273){return function(_0x3cf9e6){if(!_0x3cf9e6){_0x1f104d[_0xefd3('0x6')](0x194);;}return _0x3cf9e6;};}function respondWithResult(_0x524e4c,_0x54ee3c){_0x54ee3c=_0x54ee3c||0xc8;return function(_0x12028f){if(_0x12028f){return _0x524e4c['status'](_0x54ee3c)[_0xefd3('0x7')](_0x12028f);}return null;};}function handleError(_0x2a6315,_0x3c00c9){_0x3c00c9=_0x3c00c9||0x1f4;return function(_0x3eef6c){logger[_0xefd3('0x8')](_0x3eef6c['stack']);if(_0x3eef6c[_0xefd3('0x9')]){delete _0x3eef6c[_0xefd3('0x9')];}_0x2a6315['status'](_0x3c00c9)[_0xefd3('0xa')](_0x3eef6c);};}function execChildProcess(){return new BPromise(function(_0x2dc9c3,_0xbc071b){exec(_0xefd3('0xb'),function(_0x52adaa,_0x1252db,_0x5b34a0){logger[_0xefd3('0xc')](_0x1252db);logger['info'](_0x5b34a0);if(_0x52adaa){logger[_0xefd3('0x8')](_0x52adaa);return _0xbc071b(_0x52adaa);}return _0x2dc9c3(_0x1252db);});});}exports[_0xefd3('0xd')]=function(_0x5209e6,_0x55d6ca){return pm2[_0xefd3('0xe')]()[_0xefd3('0xf')](function(_0x97bf66){if(_0x97bf66){var _0x19296c=_['reject'](_0x97bf66,function(_0x3d11ae){return _0x3d11ae[_0xefd3('0x9')]===_0xefd3('0x10')||_0x3d11ae[_0xefd3('0x9')]===_0xefd3('0x11');});return{'rows':_0x19296c,'count':_0x19296c[_0xefd3('0x12')]};}return null;})[_0xefd3('0xf')](respondWithResult(_0x55d6ca,null))[_0xefd3('0x13')](handleError(_0x55d6ca,null));};exports[_0xefd3('0x14')]=function(_0x8d4521,_0x432633){return pm2[_0xefd3('0x15')](_0x8d4521[_0xefd3('0x16')]['id'])[_0xefd3('0xf')](respondWithResult(_0x432633,null))['then'](handleEntityNotFound(_0x432633,null))[_0xefd3('0x13')](handleError(_0x432633,null));};exports[_0xefd3('0x17')]=function(_0x48b978,_0x292d6b){if(_0x48b978[_0xefd3('0x18')][_0xefd3('0x9')]&&_0x48b978[_0xefd3('0x18')]['script']){var _0x34b174=path['join'](__dirname,_0xefd3('0x19'),_0x48b978[_0xefd3('0x18')][_0xefd3('0x1a')]);var _0x1842fd=process[_0xefd3('0x1b')]();process['chdir'](path[_0xefd3('0x1c')](_0x34b174));return execChildProcess()[_0xefd3('0xf')](function(_0x28de9b){process[_0xefd3('0x1d')](_0x1842fd);return pm2[_0xefd3('0x1e')]({'name':_0x48b978['body'][_0xefd3('0x9')],'script':_0x34b174});})[_0xefd3('0xf')](function(_0x291097){pm2['dump']();return _0x291097[0x0];})[_0xefd3('0xf')](respondWithResult(_0x292d6b,0xc9))['catch'](handleError(_0x292d6b,null));}else{return _0x292d6b[_0xefd3('0x1f')](0x1f4)[_0xefd3('0xa')]({'message':_0xefd3('0x20')});}};exports[_0xefd3('0x21')]=function(_0x43aaeb,_0x499ac2){if(_0x43aaeb['body']['id']){delete _0x43aaeb[_0xefd3('0x18')]['id'];}var _0x10a204={'online':_0xefd3('0x22'),'stopped':'stop'};if(_0x10a204[_0xefd3('0x23')](_0x43aaeb[_0xefd3('0x18')][_0xefd3('0x1f')])){return pm2[_0x10a204[_0x43aaeb['body'][_0xefd3('0x1f')]]](_0x43aaeb[_0xefd3('0x16')]['id'])['then'](respondWithResult(_0x499ac2,0xc8))[_0xefd3('0x13')](handleError(_0x499ac2,null));}else{return _0x499ac2['status'](0x1f4)[_0xefd3('0xa')]({'message':'Unknown\x20status'});}};exports[_0xefd3('0x24')]=function(_0x1d16c4,_0x3a0a41){if(_0x1d16c4[_0xefd3('0x18')]['id']){delete _0x1d16c4[_0xefd3('0x18')]['id'];}if(_0x1d16c4['params']['id']){return pm2[_0xefd3('0x25')](_0x1d16c4['params']['id'])[_0xefd3('0xf')](function(_0x44f2a1){pm2[_0xefd3('0x26')]();return _0x44f2a1[0x0];})['then'](respondWithResult(_0x3a0a41,null))['catch'](handleError(_0x3a0a41,null));}else{return _0x3a0a41[_0xefd3('0x1f')](0x1f4)[_0xefd3('0xa')]({'message':'Unknown\x20id'});}};
\ No newline at end of file
diff --git a/server/api/reportAgentPreview/index.js b/server/api/reportAgentPreview/index.js
index 05cc78c..df3e717 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 _0x9721=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x55a89e,_0x1a05ab){var _0x3aa2bd=function(_0x4b9d09){while(--_0x4b9d09){_0x55a89e['push'](_0x55a89e['shift']());}};_0x3aa2bd(++_0x1a05ab);}(_0x9721,0x9c));var _0x1972=function(_0xfe2ace,_0xcd55fd){_0xfe2ace=_0xfe2ace-0x0;var _0x4f4544=_0x9721[_0xfe2ace];return _0x4f4544;};'use strict';var multer=require(_0x1972('0x0'));var util=require(_0x1972('0x1'));var path=require(_0x1972('0x2'));var timeout=require(_0x1972('0x3'));var express=require(_0x1972('0x4'));var router=express[_0x1972('0x5')]();var auth=require(_0x1972('0x6'));var interaction=require(_0x1972('0x7'));var config=require('../../config/environment');module[_0x1972('0x8')]=router;
\ No newline at end of file
+var _0xd77f=['multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','exports'];(function(_0x1db9c9,_0x358fb5){var _0x2e02ef=function(_0x4e3b6d){while(--_0x4e3b6d){_0x1db9c9['push'](_0x1db9c9['shift']());}};_0x2e02ef(++_0x358fb5);}(_0xd77f,0x150));var _0xfd77=function(_0x50ff21,_0x5a2db4){_0x50ff21=_0x50ff21-0x0;var _0x7ba395=_0xd77f[_0x50ff21];return _0x7ba395;};'use strict';var multer=require(_0xfd77('0x0'));var util=require('util');var path=require(_0xfd77('0x1'));var timeout=require(_0xfd77('0x2'));var express=require(_0xfd77('0x3'));var router=express[_0xfd77('0x4')]();var auth=require(_0xfd77('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xfd77('0x6'));module[_0xfd77('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/reportAgentPreview/reportAgentPreview.attributes.js b/server/api/reportAgentPreview/reportAgentPreview.attributes.js
index 9c2f77f..9baf8bc 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 _0xcc3e=['INTEGER','STRING','DATE','sequelize','exports'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xcc3e,0x184));var _0xecc3=function(_0x34955d,_0x472963){_0x34955d=_0x34955d-0x0;var _0x1dc6d8=_0xcc3e[_0x34955d];return _0x1dc6d8;};'use strict';var Sequelize=require(_0xecc3('0x0'));module[_0xecc3('0x1')]={'state':{'type':Sequelize[_0xecc3('0x2')](0x2)},'statedesc':{'type':Sequelize[_0xecc3('0x3')]},'scheduledat':{'type':Sequelize['DATE']},'uniqueid':{'type':Sequelize[_0xecc3('0x3')]},'starttime':{'type':Sequelize['DATE']},'responsetime':{'type':Sequelize[_0xecc3('0x4')]},'ringtime':{'type':Sequelize[_0xecc3('0x2')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0xecc3('0x3')]},'campaigntype':{'type':Sequelize[_0xecc3('0x3')]},'membername':{'type':Sequelize[_0xecc3('0x3')]}};
\ No newline at end of file
+var _0x71bf=['sequelize','exports','INTEGER','STRING','DATE'];(function(_0x5c6039,_0x4d1b84){var _0x342226=function(_0x3d2654){while(--_0x3d2654){_0x5c6039['push'](_0x5c6039['shift']());}};_0x342226(++_0x4d1b84);}(_0x71bf,0xf0));var _0xf71b=function(_0x5a4c93,_0x283aa8){_0x5a4c93=_0x5a4c93-0x0;var _0x421ff4=_0x71bf[_0x5a4c93];return _0x421ff4;};'use strict';var Sequelize=require(_0xf71b('0x0'));module[_0xf71b('0x1')]={'state':{'type':Sequelize[_0xf71b('0x2')](0x2)},'statedesc':{'type':Sequelize[_0xf71b('0x3')]},'scheduledat':{'type':Sequelize['DATE']},'uniqueid':{'type':Sequelize[_0xf71b('0x3')]},'starttime':{'type':Sequelize[_0xf71b('0x4')]},'responsetime':{'type':Sequelize[_0xf71b('0x4')]},'ringtime':{'type':Sequelize[_0xf71b('0x2')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0xf71b('0x3')]},'campaigntype':{'type':Sequelize[_0xf71b('0x3')]},'membername':{'type':Sequelize[_0xf71b('0x3')]}};
\ No newline at end of file
diff --git a/server/api/reportAgentPreview/reportAgentPreview.model.js b/server/api/reportAgentPreview/reportAgentPreview.model.js
index 399b2a0..a0fcf8a 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 _0x84db=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','exports','ReportAgentPreview','report_agent_preview'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0x84db,0x134));var _0xb84d=function(_0x4c9aae,_0x210e8f){_0x4c9aae=_0x4c9aae-0x0;var _0x20e0a7=_0x84db[_0x4c9aae];return _0x20e0a7;};'use strict';var _=require(_0xb84d('0x0'));var util=require(_0xb84d('0x1'));var logger=require(_0xb84d('0x2'))(_0xb84d('0x3'));var moment=require(_0xb84d('0x4'));var BPromise=require(_0xb84d('0x5'));var rp=require(_0xb84d('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb84d('0x7'));var config=require('../../config/environment');var attributes=require('./reportAgentPreview.attributes');module[_0xb84d('0x8')]=function(_0x5745b3,_0x58a9c2){return _0x5745b3['define'](_0xb84d('0x9'),attributes,{'tableName':_0xb84d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6b29=['util','api','moment','bluebird','../../config/environment','./reportAgentPreview.attributes','exports','define','ReportAgentPreview','report_agent_preview','lodash'];(function(_0x2def84,_0x22a636){var _0xf7c73e=function(_0x5519b6){while(--_0x5519b6){_0x2def84['push'](_0x2def84['shift']());}};_0xf7c73e(++_0x22a636);}(_0x6b29,0x128));var _0x96b2=function(_0x54d4a8,_0x585a59){_0x54d4a8=_0x54d4a8-0x0;var _0x3b321b=_0x6b29[_0x54d4a8];return _0x3b321b;};'use strict';var _=require(_0x96b2('0x0'));var util=require(_0x96b2('0x1'));var logger=require('../../config/logger')(_0x96b2('0x2'));var moment=require(_0x96b2('0x3'));var BPromise=require(_0x96b2('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x96b2('0x5'));var attributes=require(_0x96b2('0x6'));module[_0x96b2('0x7')]=function(_0x47d896,_0x1095db){return _0x47d896[_0x96b2('0x8')](_0x96b2('0x9'),attributes,{'tableName':_0x96b2('0xa'),'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 a5bec85..f225ba3 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 _0xb0ab=['../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','stringify','error','ReportAgentPreview,\x20%s,\x20%s','message','result','catch','CreateReportAgentPreview','ReportAgentPreview','body','options','raw','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x3d00db,_0x3692b3){var _0x41f115=function(_0x3c94fd){while(--_0x3c94fd){_0x3d00db['push'](_0x3d00db['shift']());}};_0x41f115(++_0x3692b3);}(_0xb0ab,0x14b));var _0xbb0a=function(_0x177bfa,_0x4906a6){_0x177bfa=_0x177bfa-0x0;var _0x844971=_0xb0ab[_0x177bfa];return _0x844971;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xbb0a('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbb0a('0x1'));var db=require(_0xbb0a('0x2'))['db'];var utils=require(_0xbb0a('0x3'));var logger=require(_0xbb0a('0x4'))('rpc');var config=require(_0xbb0a('0x5'));var jayson=require(_0xbb0a('0x6'));var client=jayson[_0xbb0a('0x7')][_0xbb0a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4d1739,_0x3446e4,_0xdc12bf){return new BPromise(function(_0x16a89f,_0x59b2e0){return client['request'](_0x4d1739,_0xdc12bf)[_0xbb0a('0x9')](function(_0x22f7bb){logger[_0xbb0a('0xa')]('ReportAgentPreview,\x20%s,\x20%s',_0x3446e4,_0xbb0a('0xb'));logger[_0xbb0a('0xc')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x3446e4,_0xbb0a('0xb'),JSON[_0xbb0a('0xd')](_0x22f7bb));if(_0x22f7bb[_0xbb0a('0xe')]){if(_0x22f7bb[_0xbb0a('0xe')]['code']===0x1f4){logger['error'](_0xbb0a('0xf'),_0x3446e4,_0x22f7bb[_0xbb0a('0xe')][_0xbb0a('0x10')]);return _0x59b2e0(_0x22f7bb[_0xbb0a('0xe')][_0xbb0a('0x10')]);}logger[_0xbb0a('0xe')](_0xbb0a('0xf'),_0x3446e4,_0x22f7bb[_0xbb0a('0xe')][_0xbb0a('0x10')]);return _0x16a89f(_0x22f7bb[_0xbb0a('0xe')][_0xbb0a('0x10')]);}else{logger[_0xbb0a('0xa')](_0xbb0a('0xf'),_0x3446e4,'request\x20sent');_0x16a89f(_0x22f7bb[_0xbb0a('0x11')]['message']);}})[_0xbb0a('0x12')](function(_0x4373a2){logger[_0xbb0a('0xe')](_0xbb0a('0xf'),_0x3446e4,_0x4373a2);_0x59b2e0(_0x4373a2);});});}exports[_0xbb0a('0x13')]=function(_0x5cecde){var _0x711a0f=this;return new Promise(function(_0x6847c2,_0x5af2b0){return db[_0xbb0a('0x14')]['create'](_0x5cecde[_0xbb0a('0x15')],{'raw':_0x5cecde['options']?_0x5cecde[_0xbb0a('0x16')][_0xbb0a('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x22d548){logger['info'](_0xbb0a('0x13'),_0x5cecde);logger[_0xbb0a('0xc')](_0xbb0a('0x13'),_0x5cecde,JSON[_0xbb0a('0xd')](_0x22d548));_0x6847c2(_0x22d548);})[_0xbb0a('0x12')](function(_0x251f23){logger[_0xbb0a('0xe')](_0xbb0a('0x13'),_0x251f23['message'],_0x5cecde);_0x5af2b0(_0x711a0f[_0xbb0a('0xe')](0x1f4,_0x251f23['message']));});});};
\ No newline at end of file
+var _0x3de2=['info','request\x20sent','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','ReportAgentPreview,\x20%s,\x20%s','message','result','catch','ReportAgentPreview','options','raw','CreateReportAgentPreview','debug','util','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','then'];(function(_0x4991d2,_0x405d04){var _0x580e2e=function(_0x4ccd0e){while(--_0x4ccd0e){_0x4991d2['push'](_0x4991d2['shift']());}};_0x580e2e(++_0x405d04);}(_0x3de2,0x98));var _0x23de=function(_0x1928c9,_0x13a6d1){_0x1928c9=_0x1928c9-0x0;var _0x51b5fb=_0x3de2[_0x1928c9];return _0x51b5fb;};'use strict';var _=require('lodash');var util=require(_0x23de('0x0'));var moment=require('moment');var BPromise=require(_0x23de('0x1'));var rs=require(_0x23de('0x2'));var fs=require('fs');var Redis=require(_0x23de('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x23de('0x4'));var config=require(_0x23de('0x5'));var jayson=require(_0x23de('0x6'));var client=jayson[_0x23de('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4a3d7c,_0x4f117e,_0x239268){return new BPromise(function(_0x130ad2,_0x233f9c){return client['request'](_0x4a3d7c,_0x239268)[_0x23de('0x8')](function(_0x2b0950){logger[_0x23de('0x9')]('ReportAgentPreview,\x20%s,\x20%s',_0x4f117e,_0x23de('0xa'));logger['debug'](_0x23de('0xb'),_0x4f117e,_0x23de('0xa'),JSON[_0x23de('0xc')](_0x2b0950));if(_0x2b0950['error']){if(_0x2b0950[_0x23de('0xd')]['code']===0x1f4){logger[_0x23de('0xd')](_0x23de('0xe'),_0x4f117e,_0x2b0950[_0x23de('0xd')][_0x23de('0xf')]);return _0x233f9c(_0x2b0950[_0x23de('0xd')]['message']);}logger[_0x23de('0xd')](_0x23de('0xe'),_0x4f117e,_0x2b0950[_0x23de('0xd')]['message']);return _0x130ad2(_0x2b0950[_0x23de('0xd')][_0x23de('0xf')]);}else{logger[_0x23de('0x9')]('ReportAgentPreview,\x20%s,\x20%s',_0x4f117e,_0x23de('0xa'));_0x130ad2(_0x2b0950[_0x23de('0x10')][_0x23de('0xf')]);}})[_0x23de('0x11')](function(_0x26836b){logger[_0x23de('0xd')](_0x23de('0xe'),_0x4f117e,_0x26836b);_0x233f9c(_0x26836b);});});}exports['CreateReportAgentPreview']=function(_0x52b859){var _0x14eada=this;return new Promise(function(_0x50935a,_0x43efb3){return db[_0x23de('0x12')]['create'](_0x52b859['body'],{'raw':_0x52b859[_0x23de('0x13')]?_0x52b859[_0x23de('0x13')][_0x23de('0x14')]===undefined?!![]:![]:!![]})[_0x23de('0x8')](function(_0x44b646){logger[_0x23de('0x9')](_0x23de('0x15'),_0x52b859);logger[_0x23de('0x16')](_0x23de('0x15'),_0x52b859,JSON[_0x23de('0xc')](_0x44b646));_0x50935a(_0x44b646);})[_0x23de('0x11')](function(_0x33895f){logger[_0x23de('0xd')](_0x23de('0x15'),_0x33895f['message'],_0x52b859);_0x43efb3(_0x14eada[_0x23de('0xd')](0x1f4,_0x33895f[_0x23de('0xf')]));});});};
\ No newline at end of file
diff --git a/server/api/rpc/index.js b/server/api/rpc/index.js
index 40b9f9a..41b10e1 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 _0x4137=['/voice/queues/channels','voiceQueuesChannels','/voice/queues/channels/:uniqueid','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelHangup','/voice/queues/channels/:uniqueid/redirect/:exten','voiceQueuesChannelRedirect','/voice/queues/:id','showVoiceQueues','outbound','/outbound/channels','outboundChannels','/agents','agents','put','/agents/:id/capacity','telephones','trunks','/campaigns','campaigns','/fax/accounts','faxAccounts','/chat/queues/waitinginteractions','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','/openchannel/queues/waitinginteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','/fax/queues/waitinginteractions','post','queueNotify','mail','/mail/queues/:id','showMailQueues','chat','showChatQueues','fax','/fax/queues/:id','showFaxQueues','/openchannel/queues/:id/notify','openchannel','/openchannel/queues/:id','showOpenchannelQueues','/sms/queues/:id/notify','multer','util','path','express','Router','../../components/auth/service','./rpc.controller','get','/voice/channels','isAuthenticated','voiceChannels','voiceChannelMixMonitor','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','voiceQueues','/chat/queues','chatQueues','/mail/queues','mailQueues','mailAccounts','/sms/queues','smsQueues','/voice/queues/preview/:id','voiceQueuesPreview'];(function(_0x409353,_0xe9f04d){var _0x4f4b59=function(_0x64b587){while(--_0x64b587){_0x409353['push'](_0x409353['shift']());}};_0x4f4b59(++_0xe9f04d);}(_0x4137,0xf8));var _0x7413=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x4137[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x7413('0x0'));var util=require(_0x7413('0x1'));var path=require(_0x7413('0x2'));var express=require(_0x7413('0x3'));var router=express[_0x7413('0x4')]();var auth=require(_0x7413('0x5'));var controller=require(_0x7413('0x6'));router[_0x7413('0x7')](_0x7413('0x8'),auth[_0x7413('0x9')](),controller[_0x7413('0xa')]);router[_0x7413('0x7')]('/voice/channels/:uniqueid/mixmonitor',auth[_0x7413('0x9')](),controller[_0x7413('0xb')]);router[_0x7413('0x7')](_0x7413('0xc'),auth['isAuthenticated'](),controller[_0x7413('0xd')]);router[_0x7413('0x7')]('/voice/queues',auth[_0x7413('0x9')](),controller[_0x7413('0xe')]);router['get'](_0x7413('0xf'),auth[_0x7413('0x9')](),controller[_0x7413('0x10')]);router[_0x7413('0x7')](_0x7413('0x11'),auth['isAuthenticated'](),controller[_0x7413('0x12')]);router[_0x7413('0x7')]('/mail/accounts',auth[_0x7413('0x9')](),controller[_0x7413('0x13')]);router[_0x7413('0x7')]('/openchannel/queues',auth['isAuthenticated'](),controller['openchannelQueues']);router[_0x7413('0x7')](_0x7413('0x14'),auth['isAuthenticated'](),controller[_0x7413('0x15')]);router[_0x7413('0x7')]('/fax/queues',auth[_0x7413('0x9')](),controller['faxQueues']);router['get'](_0x7413('0x16'),auth['isAuthenticated'](),controller[_0x7413('0x17')]);router['get'](_0x7413('0x18'),auth[_0x7413('0x9')](),controller[_0x7413('0x19')]);router[_0x7413('0x7')](_0x7413('0x1a'),auth[_0x7413('0x9')](),controller['voiceQueuesChannel']);router[_0x7413('0x7')](_0x7413('0x1b'),auth[_0x7413('0x9')](),controller[_0x7413('0x1c')]);router['get'](_0x7413('0x1d'),auth[_0x7413('0x9')](),controller[_0x7413('0x1e')]);router[_0x7413('0x7')](_0x7413('0x1f'),auth[_0x7413('0x9')](),controller[_0x7413('0x20')]);router[_0x7413('0x7')]('/outbound',auth['isAuthenticated'](),controller[_0x7413('0x21')]);router['get'](_0x7413('0x22'),auth[_0x7413('0x9')](),controller[_0x7413('0x23')]);router[_0x7413('0x7')](_0x7413('0x24'),auth[_0x7413('0x9')](),controller[_0x7413('0x25')]);router[_0x7413('0x26')](_0x7413('0x27'),auth['isAuthenticated'](),controller['agentCapacity']);router[_0x7413('0x7')]('/telephones',auth[_0x7413('0x9')](),controller[_0x7413('0x28')]);router[_0x7413('0x7')]('/trunks',auth[_0x7413('0x9')](),controller[_0x7413('0x29')]);router[_0x7413('0x7')](_0x7413('0x2a'),auth[_0x7413('0x9')](),controller[_0x7413('0x2b')]);router['get'](_0x7413('0x2c'),auth['isAuthenticated'](),controller[_0x7413('0x2d')]);router[_0x7413('0x7')](_0x7413('0x2e'),auth[_0x7413('0x9')](),controller[_0x7413('0x2f')]);router[_0x7413('0x7')]('/mail/queues/waitinginteractions',auth[_0x7413('0x9')](),controller[_0x7413('0x30')]);router[_0x7413('0x7')](_0x7413('0x31'),auth[_0x7413('0x9')](),controller[_0x7413('0x32')]);router[_0x7413('0x7')]('/sms/queues/waitinginteractions',auth[_0x7413('0x9')](),controller[_0x7413('0x33')]);router[_0x7413('0x7')](_0x7413('0x34'),auth[_0x7413('0x9')](),controller['faxQueuesWaitingInteractions']);router[_0x7413('0x35')]('/mail/queues/:id/notify',auth[_0x7413('0x9')](),controller[_0x7413('0x36')](_0x7413('0x37')));router['get'](_0x7413('0x38'),auth['isAuthenticated'](),controller[_0x7413('0x39')]);router[_0x7413('0x35')]('/chat/queues/:id/notify',auth['isAuthenticated'](),controller[_0x7413('0x36')](_0x7413('0x3a')));router[_0x7413('0x7')]('/chat/queues/:id',auth['isAuthenticated'](),controller[_0x7413('0x3b')]);router['post']('/fax/queues/:id/notify',auth[_0x7413('0x9')](),controller['queueNotify'](_0x7413('0x3c')));router[_0x7413('0x7')](_0x7413('0x3d'),auth[_0x7413('0x9')](),controller[_0x7413('0x3e')]);router['post'](_0x7413('0x3f'),auth[_0x7413('0x9')](),controller[_0x7413('0x36')](_0x7413('0x40')));router[_0x7413('0x7')](_0x7413('0x41'),auth[_0x7413('0x9')](),controller[_0x7413('0x42')]);router[_0x7413('0x35')](_0x7413('0x43'),auth[_0x7413('0x9')](),controller[_0x7413('0x36')]('sms'));router[_0x7413('0x7')]('/sms/queues/:id',auth['isAuthenticated'](),controller['showSmsQueues']);router['post']('/agents/:id/notify',auth[_0x7413('0x9')](),controller['agentNotify']);module['exports']=router;
\ No newline at end of file
+var _0x4bf7=['multer','path','Router','./rpc.controller','get','/voice/channels','isAuthenticated','/voice/channels/:uniqueid/mixmonitor','voiceChannelMixMonitor','/voice/channels/:uniqueid/stopmixmonitor','/voice/queues','voiceQueues','/chat/queues','chatQueues','/mail/queues','mailQueues','/mail/accounts','/sms/queues','smsQueues','faxQueues','/voice/queues/preview/:id','voiceQueuesPreview','/voice/queues/channels','voiceQueuesChannels','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelRedirect','/voice/queues/:id','showVoiceQueues','/outbound','outbound','/outbound/channels','outboundChannels','agents','put','/agents/:id/capacity','/telephones','telephones','/trunks','trunks','/campaigns','campaigns','/fax/accounts','faxAccounts','/chat/queues/waitinginteractions','chatQueuesWaitingInteractions','/mail/queues/waitinginteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','/sms/queues/waitinginteractions','smsQueuesWaitingInteractions','/fax/queues/waitinginteractions','faxQueuesWaitingInteractions','post','/mail/queues/:id/notify','showMailQueues','/chat/queues/:id','showChatQueues','/fax/queues/:id/notify','fax','/fax/queues/:id','showFaxQueues','queueNotify','/sms/queues/:id','showSmsQueues','/agents/:id/notify','agentNotify','exports'];(function(_0x272155,_0x94dfb8){var _0x34ac16=function(_0x6197e2){while(--_0x6197e2){_0x272155['push'](_0x272155['shift']());}};_0x34ac16(++_0x94dfb8);}(_0x4bf7,0x198));var _0x74bf=function(_0x4b5344,_0x92959){_0x4b5344=_0x4b5344-0x0;var _0x2317d3=_0x4bf7[_0x4b5344];return _0x2317d3;};'use strict';var multer=require(_0x74bf('0x0'));var util=require('util');var path=require(_0x74bf('0x1'));var express=require('express');var router=express[_0x74bf('0x2')]();var auth=require('../../components/auth/service');var controller=require(_0x74bf('0x3'));router[_0x74bf('0x4')](_0x74bf('0x5'),auth[_0x74bf('0x6')](),controller['voiceChannels']);router['get'](_0x74bf('0x7'),auth['isAuthenticated'](),controller[_0x74bf('0x8')]);router[_0x74bf('0x4')](_0x74bf('0x9'),auth[_0x74bf('0x6')](),controller['voiceChannelStopMixMonitor']);router['get'](_0x74bf('0xa'),auth[_0x74bf('0x6')](),controller[_0x74bf('0xb')]);router[_0x74bf('0x4')](_0x74bf('0xc'),auth[_0x74bf('0x6')](),controller[_0x74bf('0xd')]);router['get'](_0x74bf('0xe'),auth[_0x74bf('0x6')](),controller[_0x74bf('0xf')]);router[_0x74bf('0x4')](_0x74bf('0x10'),auth[_0x74bf('0x6')](),controller['mailAccounts']);router[_0x74bf('0x4')]('/openchannel/queues',auth['isAuthenticated'](),controller['openchannelQueues']);router[_0x74bf('0x4')](_0x74bf('0x11'),auth['isAuthenticated'](),controller[_0x74bf('0x12')]);router['get']('/fax/queues',auth['isAuthenticated'](),controller[_0x74bf('0x13')]);router[_0x74bf('0x4')](_0x74bf('0x14'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x15')]);router[_0x74bf('0x4')](_0x74bf('0x16'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x17')]);router[_0x74bf('0x4')]('/voice/queues/channels/:uniqueid',auth[_0x74bf('0x6')](),controller[_0x74bf('0x18')]);router['get'](_0x74bf('0x19'),auth['isAuthenticated'](),controller['voiceQueuesChannelHangup']);router['get']('/voice/queues/channels/:uniqueid/redirect/:exten',auth[_0x74bf('0x6')](),controller[_0x74bf('0x1a')]);router[_0x74bf('0x4')](_0x74bf('0x1b'),auth['isAuthenticated'](),controller[_0x74bf('0x1c')]);router[_0x74bf('0x4')](_0x74bf('0x1d'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x1e')]);router[_0x74bf('0x4')](_0x74bf('0x1f'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x20')]);router['get']('/agents',auth[_0x74bf('0x6')](),controller[_0x74bf('0x21')]);router[_0x74bf('0x22')](_0x74bf('0x23'),auth[_0x74bf('0x6')](),controller['agentCapacity']);router[_0x74bf('0x4')](_0x74bf('0x24'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x25')]);router['get'](_0x74bf('0x26'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x27')]);router[_0x74bf('0x4')](_0x74bf('0x28'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x29')]);router[_0x74bf('0x4')](_0x74bf('0x2a'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x2b')]);router[_0x74bf('0x4')](_0x74bf('0x2c'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x2d')]);router['get'](_0x74bf('0x2e'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x2f')]);router[_0x74bf('0x4')]('/openchannel/queues/waitinginteractions',auth['isAuthenticated'](),controller[_0x74bf('0x30')]);router[_0x74bf('0x4')](_0x74bf('0x31'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x32')]);router['get'](_0x74bf('0x33'),auth['isAuthenticated'](),controller[_0x74bf('0x34')]);router[_0x74bf('0x35')](_0x74bf('0x36'),auth['isAuthenticated'](),controller['queueNotify']('mail'));router[_0x74bf('0x4')]('/mail/queues/:id',auth[_0x74bf('0x6')](),controller[_0x74bf('0x37')]);router['post']('/chat/queues/:id/notify',auth[_0x74bf('0x6')](),controller['queueNotify']('chat'));router['get'](_0x74bf('0x38'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x39')]);router[_0x74bf('0x35')](_0x74bf('0x3a'),auth[_0x74bf('0x6')](),controller['queueNotify'](_0x74bf('0x3b')));router[_0x74bf('0x4')](_0x74bf('0x3c'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x3d')]);router['post']('/openchannel/queues/:id/notify',auth[_0x74bf('0x6')](),controller[_0x74bf('0x3e')]('openchannel'));router[_0x74bf('0x4')]('/openchannel/queues/:id',auth['isAuthenticated'](),controller['showOpenchannelQueues']);router[_0x74bf('0x35')]('/sms/queues/:id/notify',auth[_0x74bf('0x6')](),controller[_0x74bf('0x3e')]('sms'));router[_0x74bf('0x4')](_0x74bf('0x3f'),auth[_0x74bf('0x6')](),controller[_0x74bf('0x40')]);router[_0x74bf('0x35')](_0x74bf('0x41'),auth['isAuthenticated'](),controller[_0x74bf('0x42')]);module[_0x74bf('0x43')]=router;
\ No newline at end of file
diff --git a/server/api/rpc/rpc.controller.js b/server/api/rpc/rpc.controller.js
index be1c105..a53e3e4 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 _0x9563=['FaxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','SmsQueuesWaitingInteractions','faxQueuesWaitingInteractions','FaxQueuesWaitingInteractions','capitalize','chat','Website','Account','Queue','\x20Queue\x20not\x20found','Message','findOne','messageId','Interaction','update','queue','MessageId','TransferReport','create','Start','queueTransferTimeout','*,*,*,*','channel','User','agent','\x20Message\x20not\x20found','agentTransferTimeout','bluebird','moment','../../mysqldb','client','http','request','error','code','message','result','status','json','sendStatus','stack','name','isNil','rows','find','VoiceChannels','query','then','catch','voiceChannelMixMonitor','merge','params','voiceChannelStopMixMonitor','VoiceChannelStopMixMonitor','voiceQueues','voiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','Outbound','outboundChannels','OutboundChannels','agents','Agents','agentCapacity','body','interaction','user','hasOwnProperty','findAll','INTERACTION','YYYY-MM-DD\x20HH:mm:ss','length','updateAttributes','findOrCreate','interface','format','internal','AgentCapacity','capacity','trunks','campaigns','Campaigns','chatQueues','ChatQueues','mailQueues','MailQueues','showMailQueues','mailAccounts','MailAccounts','openchannelQueues','OpenchannelQueues','smsQueues','SmsQueues','faxQueues','FaxQueues','showFaxQueues','faxAccounts'];(function(_0x5339e5,_0x280582){var _0x2c7d75=function(_0x275142){while(--_0x275142){_0x5339e5['push'](_0x5339e5['shift']());}};_0x2c7d75(++_0x280582);}(_0x9563,0x1c4));var _0x3956=function(_0x3b93b1,_0x2d3e07){_0x3b93b1=_0x3b93b1-0x0;var _0x5403aa=_0x9563[_0x3b93b1];return _0x5403aa;};'use strict';var BPromise=require(_0x3956('0x0'));var moment=require(_0x3956('0x1'));var _=require('lodash');var util=require('util');var db=require(_0x3956('0x2'))['db'];var logger=require('../../config/logger')('api');var jayson=require('jayson/promise');var amiClient=jayson[_0x3956('0x3')][_0x3956('0x4')]({'port':0x232a});var mailClient=jayson[_0x3956('0x3')][_0x3956('0x4')]({'port':0x232b});var routingClient=jayson[_0x3956('0x3')]['http']({'port':0x232c});function respondWithRpcPromise(_0x1cc92f,_0x9493a3,_0x101321){return new BPromise(function(_0x4d3404,_0x9601c3){var _0x50e2da=_0x101321?_0x101321:amiClient;return _0x50e2da[_0x3956('0x5')](_0x1cc92f,_0x9493a3)['then'](function(_0x3b9a0a){if(_0x3b9a0a[_0x3956('0x6')]){if(_0x3b9a0a['error'][_0x3956('0x7')]===0x1f4){return _0x9601c3(_0x3b9a0a[_0x3956('0x6')][_0x3956('0x8')]);}return _0x4d3404(_0x3b9a0a[_0x3956('0x6')][_0x3956('0x8')]);}else{_0x4d3404(_0x3b9a0a[_0x3956('0x9')]);}})['catch'](function(_0x25257a){_0x9601c3(_0x25257a);});});}function respondWithResult(_0x8b4eed,_0x40c53c){_0x40c53c=_0x40c53c||0xc8;return function(_0xbf920f){if(_0xbf920f){return _0x8b4eed[_0x3956('0xa')](_0x40c53c)[_0x3956('0xb')](_0xbf920f);}return _0x8b4eed[_0x3956('0xc')](0x194);};}function handleError(_0x445c9b,_0x5cc988){_0x5cc988=_0x5cc988||0x1f4;return function(_0x264874){logger['error'](_0x264874[_0x3956('0xd')]);if(_0x264874['name']){delete _0x264874[_0x3956('0xe')];}_0x445c9b['status'](_0x5cc988)['send'](_0x264874);};}function findById(_0xa5a94){return function(_0x2b1eaf){if(!_[_0x3956('0xf')](_0xa5a94)&&!_[_0x3956('0xf')](_0x2b1eaf)&&!_['isNil'](_0x2b1eaf[_0x3956('0x10')])){return _[_0x3956('0x11')](_0x2b1eaf[_0x3956('0x10')],function(_0x1738c7){return _0x1738c7['id']==_0xa5a94;});}return null;};}exports['voiceChannels']=function(_0x5926c5,_0x1c6251){return respondWithRpcPromise(_0x3956('0x12'),_0x5926c5[_0x3956('0x13')])[_0x3956('0x14')](respondWithResult(_0x1c6251,null))[_0x3956('0x15')](handleError(_0x1c6251,null));};exports[_0x3956('0x16')]=function(_0xe6c506,_0x32caea){return respondWithRpcPromise('VoiceChannelMixMonitor',_[_0x3956('0x17')](_0xe6c506[_0x3956('0x13')],_0xe6c506[_0x3956('0x18')]))['then'](respondWithResult(_0x32caea,null))[_0x3956('0x15')](handleError(_0x32caea,null));};exports[_0x3956('0x19')]=function(_0x1f01b2,_0x45e3f8){return respondWithRpcPromise(_0x3956('0x1a'),_[_0x3956('0x17')](_0x1f01b2[_0x3956('0x13')],_0x1f01b2[_0x3956('0x18')]))[_0x3956('0x14')](respondWithResult(_0x45e3f8,null))['catch'](handleError(_0x45e3f8,null));};exports[_0x3956('0x1b')]=function(_0x2b2e86,_0x357d18){return respondWithRpcPromise('VoiceQueues',_0x2b2e86[_0x3956('0x13')])[_0x3956('0x14')](respondWithResult(_0x357d18,null))[_0x3956('0x15')](handleError(_0x357d18,null));};exports['showVoiceQueues']=function(_0x1ad0c8,_0x4a6a1d){return respondWithRpcPromise('VoiceQueues',_0x1ad0c8[_0x3956('0x13')])[_0x3956('0x14')](findById(_0x1ad0c8[_0x3956('0x18')]['id']))['then'](respondWithResult(_0x4a6a1d,null))[_0x3956('0x15')](handleError(_0x4a6a1d,null));};exports[_0x3956('0x1c')]=function(_0x1fe49a,_0x2b6342){return respondWithRpcPromise('VoiceQueuesPreview',_[_0x3956('0x17')](_0x1fe49a[_0x3956('0x13')],_0x1fe49a['params']))['then'](respondWithResult(_0x2b6342,null))['catch'](handleError(_0x2b6342,null));};exports[_0x3956('0x1d')]=function(_0x142b68,_0x5b9a41){return respondWithRpcPromise(_0x3956('0x1e'),_0x142b68[_0x3956('0x13')])[_0x3956('0x14')](respondWithResult(_0x5b9a41,null))[_0x3956('0x15')](handleError(_0x5b9a41,null));};exports[_0x3956('0x1f')]=function(_0x1171aa,_0x14e1d0){return respondWithRpcPromise('VoiceQueuesChannel',_[_0x3956('0x17')](_0x1171aa[_0x3956('0x13')],_0x1171aa[_0x3956('0x18')]))[_0x3956('0x14')](respondWithResult(_0x14e1d0,null))[_0x3956('0x15')](handleError(_0x14e1d0,null));};exports['voiceQueuesChannelHangup']=function(_0x3c8a7f,_0x4bac9d){return respondWithRpcPromise(_0x3956('0x20'),_[_0x3956('0x17')](_0x3c8a7f[_0x3956('0x13')],_0x3c8a7f[_0x3956('0x18')]))[_0x3956('0x14')](respondWithResult(_0x4bac9d,null))['catch'](handleError(_0x4bac9d,null));};exports[_0x3956('0x21')]=function(_0x442bdc,_0xc1acac){return respondWithRpcPromise('VoiceQueuesChannelRedirect',_[_0x3956('0x17')](_0x442bdc[_0x3956('0x13')],_0x442bdc[_0x3956('0x18')]))[_0x3956('0x14')](respondWithResult(_0xc1acac,null))[_0x3956('0x15')](handleError(_0xc1acac,null));};exports['outbound']=function(_0x7910df,_0x2bec36){return respondWithRpcPromise(_0x3956('0x22'),_0x7910df[_0x3956('0x13')])[_0x3956('0x14')](respondWithResult(_0x2bec36,null))[_0x3956('0x15')](handleError(_0x2bec36,null));};exports[_0x3956('0x23')]=function(_0x559522,_0x199363){return respondWithRpcPromise(_0x3956('0x24'),_0x559522['query'])[_0x3956('0x14')](respondWithResult(_0x199363,null))['catch'](handleError(_0x199363,null));};exports[_0x3956('0x25')]=function(_0x565d5f,_0x15485e){var _0x5c32cb;return respondWithRpcPromise(_0x3956('0x26'),_0x565d5f[_0x3956('0x13')])[_0x3956('0x14')](function(_0x1add33){_0x5c32cb=_0x1add33;return respondWithRpcPromise(_0x3956('0x26'),_0x565d5f[_0x3956('0x13')],routingClient);})[_0x3956('0x14')](function(_0x1781ef){return _[_0x3956('0x17')]({},_0x1781ef,_0x5c32cb);})['then'](respondWithResult(_0x15485e,null))[_0x3956('0x15')](handleError(_0x15485e,null));};exports[_0x3956('0x27')]=function(_0x1285f8,_0x3e3c52){if(_0x1285f8[_0x3956('0x28')]&&_0x1285f8['body'][_0x3956('0x29')]&&_0x1285f8[_0x3956('0x2a')]&&_0x1285f8['user'][_0x3956('0xe')]){for(var _0x11f1ba in _0x1285f8['body'][_0x3956('0x29')]){if(_0x1285f8['body'][_0x3956('0x29')][_0x3956('0x2b')](_0x11f1ba)){db['MemberReport'][_0x3956('0x2c')]({'where':{'channel':_0x11f1ba,'membername':_0x1285f8[_0x3956('0x2a')]['name'],'type':_0x3956('0x2d'),'exitAt':null,'uniqueid':_0x1285f8[_0x3956('0x28')][_0x3956('0x29')][_0x11f1ba]&&_0x1285f8['body'][_0x3956('0x29')][_0x11f1ba]['length']?{'$notIn':_0x1285f8[_0x3956('0x28')][_0x3956('0x29')][_0x11f1ba]}:{'$ne':null}}})['then'](function(_0x280b58){var _0x5a531f=moment()['format'](_0x3956('0x2e'));for(var _0x300939=0x0,_0x443d49=_0x280b58[_0x3956('0x2f')];_0x300939<_0x443d49;_0x300939+=0x1){_0x280b58[_0x300939][_0x3956('0x30')]({'exitAt':_0x5a531f});}});for(var _0x388dc2=0x0;_0x388dc2<_0x1285f8['body'][_0x3956('0x29')][_0x11f1ba]['length'];_0x388dc2+=0x1){db['MemberReport'][_0x3956('0x31')]({'where':{'channel':_0x11f1ba,'membername':_0x1285f8[_0x3956('0x2a')][_0x3956('0xe')],'type':_0x3956('0x2d'),'uniqueid':_0x1285f8['body']['interaction'][_0x11f1ba][_0x388dc2],'exitAt':null},'defaults':{'channel':_0x11f1ba,'membername':_0x1285f8['user']['name'],'interface':_[_0x3956('0xf')](_0x1285f8[_0x3956('0x2a')][_0x3956('0x32')])?util[_0x3956('0x33')]('SIP/%s',_0x1285f8[_0x3956('0x2a')][_0x3956('0xe')]):_0x1285f8[_0x3956('0x2a')][_0x3956('0x32')],'type':_0x3956('0x2d'),'enterAt':moment()[_0x3956('0x33')]('YYYY-MM-DD\x20HH:mm:ss'),'role':'agent','internal':_0x1285f8['user'][_0x3956('0x34')],'uniqueid':_0x1285f8[_0x3956('0x28')][_0x3956('0x29')][_0x11f1ba][_0x388dc2]}});}}}}return respondWithRpcPromise(_0x3956('0x35'),{'id':_0x1285f8[_0x3956('0x18')]['id'],'capacity':_0x1285f8['body'][_0x3956('0x36')]},routingClient)[_0x3956('0x14')](respondWithResult(_0x3e3c52,null))[_0x3956('0x15')](handleError(_0x3e3c52,null));};exports['telephones']=function(_0x47d31b,_0x4ad74b){return respondWithRpcPromise('Telephones',_0x47d31b[_0x3956('0x13')])[_0x3956('0x14')](respondWithResult(_0x4ad74b,null))['catch'](handleError(_0x4ad74b,null));};exports[_0x3956('0x37')]=function(_0x5602d1,_0x49a66b){return respondWithRpcPromise('Trunks',_0x5602d1[_0x3956('0x13')])['then'](respondWithResult(_0x49a66b,null))['catch'](handleError(_0x49a66b,null));};exports[_0x3956('0x38')]=function(_0x71be66,_0x534ef3){return respondWithRpcPromise(_0x3956('0x39'),_0x71be66[_0x3956('0x13')])[_0x3956('0x14')](respondWithResult(_0x534ef3,null))['catch'](handleError(_0x534ef3,null));};exports[_0x3956('0x3a')]=function(_0x321ad7,_0x2a4ec2){return respondWithRpcPromise(_0x3956('0x3b'),_0x321ad7['query'],routingClient)[_0x3956('0x14')](respondWithResult(_0x2a4ec2,null))[_0x3956('0x15')](handleError(_0x2a4ec2,null));};exports['showChatQueues']=function(_0x4e9f39,_0x2e0d6c){return respondWithRpcPromise(_0x3956('0x3b'),_0x4e9f39[_0x3956('0x13')],routingClient)[_0x3956('0x14')](findById(_0x4e9f39['params']['id']))[_0x3956('0x14')](respondWithResult(_0x2e0d6c,null))[_0x3956('0x15')](handleError(_0x2e0d6c,null));};exports[_0x3956('0x3c')]=function(_0xf15ab3,_0x1ff79d){return respondWithRpcPromise(_0x3956('0x3d'),_0xf15ab3['query'],routingClient)['then'](respondWithResult(_0x1ff79d,null))[_0x3956('0x15')](handleError(_0x1ff79d,null));};exports[_0x3956('0x3e')]=function(_0x2fedaa,_0x599985){return respondWithRpcPromise('MailQueues',_0x2fedaa[_0x3956('0x13')],routingClient)[_0x3956('0x14')](findById(_0x2fedaa['params']['id']))[_0x3956('0x14')](respondWithResult(_0x599985,null))['catch'](handleError(_0x599985,null));};exports[_0x3956('0x3f')]=function(_0x529820,_0x4ce1da){return respondWithRpcPromise(_0x3956('0x40'),_0x529820[_0x3956('0x13')],mailClient)[_0x3956('0x14')](respondWithResult(_0x4ce1da,null))[_0x3956('0x15')](handleError(_0x4ce1da,null));};exports[_0x3956('0x41')]=function(_0x280ad6,_0x27fcd8){return respondWithRpcPromise(_0x3956('0x42'),_0x280ad6[_0x3956('0x13')],routingClient)['then'](respondWithResult(_0x27fcd8,null))['catch'](handleError(_0x27fcd8,null));};exports['showOpenchannelQueues']=function(_0x3e3a03,_0x3f6463){return respondWithRpcPromise(_0x3956('0x42'),_0x3e3a03['query'],routingClient)[_0x3956('0x14')](findById(_0x3e3a03[_0x3956('0x18')]['id']))[_0x3956('0x14')](respondWithResult(_0x3f6463,null))[_0x3956('0x15')](handleError(_0x3f6463,null));};exports[_0x3956('0x43')]=function(_0x423ead,_0x1c8dcf){return respondWithRpcPromise('SmsQueues',_0x423ead[_0x3956('0x13')],routingClient)[_0x3956('0x14')](respondWithResult(_0x1c8dcf,null))[_0x3956('0x15')](handleError(_0x1c8dcf,null));};exports['showSmsQueues']=function(_0x299e4e,_0x4ea4f0){return respondWithRpcPromise(_0x3956('0x44'),_0x299e4e['query'],routingClient)[_0x3956('0x14')](findById(_0x299e4e[_0x3956('0x18')]['id']))[_0x3956('0x14')](respondWithResult(_0x4ea4f0,null))['catch'](handleError(_0x4ea4f0,null));};exports[_0x3956('0x45')]=function(_0x257b81,_0x4f1125){return respondWithRpcPromise(_0x3956('0x46'),_0x257b81[_0x3956('0x13')],routingClient)['then'](respondWithResult(_0x4f1125,null))[_0x3956('0x15')](handleError(_0x4f1125,null));};exports[_0x3956('0x47')]=function(_0x448f82,_0x1ac178){return respondWithRpcPromise(_0x3956('0x46'),_0x448f82[_0x3956('0x13')],routingClient)[_0x3956('0x14')](findById(_0x448f82['params']['id']))['then'](respondWithResult(_0x1ac178,null))[_0x3956('0x15')](handleError(_0x1ac178,null));};exports[_0x3956('0x48')]=function(_0x36d752,_0x17ca18){return respondWithRpcPromise(_0x3956('0x49'),_0x36d752['query'])['then'](respondWithResult(_0x17ca18,null))[_0x3956('0x15')](handleError(_0x17ca18,null));};exports[_0x3956('0x4a')]=function(_0x10236c,_0x5221d1){return respondWithRpcPromise(_0x3956('0x4b'),_0x10236c[_0x3956('0x13')],routingClient)[_0x3956('0x14')](respondWithResult(_0x5221d1,null))[_0x3956('0x15')](handleError(_0x5221d1,null));};exports[_0x3956('0x4c')]=function(_0x504aa1,_0x48e95e){return respondWithRpcPromise('MailQueuesWaitingInteractions',_0x504aa1[_0x3956('0x13')],routingClient)['then'](respondWithResult(_0x48e95e,null))[_0x3956('0x15')](handleError(_0x48e95e,null));};exports['openchannelQueuesWaitingInteractions']=function(_0x4247a6,_0x367103){return respondWithRpcPromise(_0x3956('0x4d'),_0x4247a6[_0x3956('0x13')],routingClient)['then'](respondWithResult(_0x367103,null))[_0x3956('0x15')](handleError(_0x367103,null));};exports[_0x3956('0x4e')]=function(_0x5cf1ad,_0x5eb0d3){return respondWithRpcPromise(_0x3956('0x4f'),_0x5cf1ad[_0x3956('0x13')],routingClient)[_0x3956('0x14')](respondWithResult(_0x5eb0d3,null))[_0x3956('0x15')](handleError(_0x5eb0d3,null));};exports[_0x3956('0x50')]=function(_0x3f1b6b,_0x377a08){return respondWithRpcPromise(_0x3956('0x51'),_0x3f1b6b['query'],routingClient)[_0x3956('0x14')](respondWithResult(_0x377a08,null))['catch'](handleError(_0x377a08,null));};exports['queueNotify']=function(_0x2e199e){return function(_0x55b9a6,_0x44fbf1){var _0x38e93a,_0x2dab4c;var _0x2aef52=_[_0x3956('0x52')](_0x2e199e);var _0x37fc97=_0x2e199e===_0x3956('0x53')?_0x3956('0x54'):_0x3956('0x55');return db[_0x2aef52+_0x3956('0x56')]['findOne']({'raw':!![],'where':{'id':_0x55b9a6['params']['id']}})[_0x3956('0x14')](function(_0x52e237){if(_['isNil'](_0x52e237)){throw new Error(_0x2aef52+_0x3956('0x57'));}_0x38e93a=_0x52e237;return db[_0x2aef52+_0x3956('0x58')][_0x3956('0x59')]({'where':{'id':_0x55b9a6[_0x3956('0x28')][_0x3956('0x5a')]},'include':[{'model':db[_0x2aef52+_0x3956('0x5b')],'as':'Interaction'},{'model':db[_0x2aef52+_0x37fc97],'as':_0x3956('0x55')}]});})[_0x3956('0x14')](function(_0x24738a){if(_[_0x3956('0xf')](_0x24738a)){throw new Error(_0x2aef52+'\x20Message\x20not\x20found');}_0x2dab4c=_0x24738a;return _0x24738a[_0x3956('0x5c')]({'read':0x0,'readAt':null,'UserId':null});})[_0x3956('0x14')](function(){var _0x4fb210={'uniqueid':_0x2e199e+'.'+_0x2dab4c['id']+'.'+_0x2dab4c[_0x3956('0x5b')]['id'],'FromUserId':_0x55b9a6[_0x3956('0x2a')]['id'],'type':_0x3956('0x5d')};_0x4fb210[_0x2aef52+_0x3956('0x5e')]=_0x2dab4c['id'];_0x4fb210[_0x2aef52+'InteractionId']=_0x2dab4c[_0x3956('0x5b')]['id'];_0x4fb210['From'+_0x2aef52+_0x37fc97+'Id']=_0x2dab4c['Account']['id'];_0x4fb210['To'+_0x2aef52+'QueueId']=_0x38e93a['id'];return db[_0x2aef52+_0x3956('0x5f')][_0x3956('0x60')](_0x4fb210);})[_0x3956('0x14')](function(){return respondWithRpcPromise(_0x3956('0x61'),{'channel':_0x2e199e,'interaction':_0x2dab4c[_0x3956('0x5b')],'message':_0x2dab4c,'account':_0x2dab4c[_0x3956('0x55')],'applications':[{'id':0x0,'priority':0x1,'app':_0x3956('0x5d'),'appdata':_0x38e93a['name']+','+(_0x2dab4c[_0x3956('0x55')][_0x3956('0x62')]||0x12c),'interval':_0x3956('0x63')}]},routingClient);})['then'](respondWithResult(_0x44fbf1,null))[_0x3956('0x15')](handleError(_0x44fbf1,null));};};exports['agentNotify']=function(_0x21e9e9,_0x31df90){var _0xc08a32,_0x100641;if(_[_0x3956('0xf')](_0x21e9e9[_0x3956('0x28')][_0x3956('0x64')])){throw new Error('Channel\x20field\x20is\x20mandatory');}var _0x5aee93=_0x21e9e9[_0x3956('0x28')][_0x3956('0x64')];var _0xe9811a=_['capitalize'](_0x5aee93);var _0x6e5655=_0x5aee93===_0x3956('0x53')?'Website':_0x3956('0x55');return db[_0x3956('0x65')][_0x3956('0x59')]({'raw':!![],'where':{'id':_0x21e9e9[_0x3956('0x18')]['id'],'role':_0x3956('0x66')}})['then'](function(_0x5944b4){if(_[_0x3956('0xf')](_0x5944b4)){throw new Error('Agent\x20not\x20found');}_0xc08a32=_0x5944b4;return db[_0xe9811a+_0x3956('0x58')][_0x3956('0x59')]({'where':{'id':_0x21e9e9[_0x3956('0x28')][_0x3956('0x5a')]},'include':[{'model':db[_0xe9811a+_0x3956('0x5b')],'as':_0x3956('0x5b')},{'model':db[_0xe9811a+_0x6e5655],'as':'Account'}]});})[_0x3956('0x14')](function(_0x321d17){if(_[_0x3956('0xf')](_0x321d17)){throw new Error(_0xe9811a+_0x3956('0x67'));}_0x100641=_0x321d17;return _0x321d17['update']({'read':0x0,'readAt':null,'UserId':null});})[_0x3956('0x14')](function(){var _0x1015d9={'uniqueid':_0x5aee93+'.'+_0x100641['id']+'.'+_0x100641[_0x3956('0x5b')]['id'],'FromUserId':_0x21e9e9[_0x3956('0x2a')]['id'],'type':_0x3956('0x5d'),'ToUserId':_0xc08a32['id']};_0x1015d9[_0xe9811a+_0x3956('0x5e')]=_0x100641['id'];_0x1015d9[_0xe9811a+'InteractionId']=_0x100641[_0x3956('0x5b')]['id'];_0x1015d9['From'+_0xe9811a+_0x6e5655+'Id']=_0x100641[_0x3956('0x55')]['id'];return db[_0xe9811a+'TransferReport']['create'](_0x1015d9);})['then'](function(){return respondWithRpcPromise(_0x3956('0x61'),{'channel':_0x5aee93,'interaction':_0x100641[_0x3956('0x5b')],'message':_0x100641,'account':_0x100641[_0x3956('0x55')],'applications':[{'id':0x0,'priority':0x1,'app':_0x3956('0x66'),'appdata':_0xc08a32[_0x3956('0xe')]+','+(_0x100641[_0x3956('0x55')][_0x3956('0x68')]||0x12c),'interval':'*,*,*,*'}]},routingClient);})['then'](respondWithResult(_0x31df90,null))[_0x3956('0x15')](handleError(_0x31df90,null));};
\ No newline at end of file
+var _0x1d07=['hasOwnProperty','MemberReport','findAll','INTERACTION','format','length','findOrCreate','interface','SIP/%s','agent','internal','AgentCapacity','capacity','Campaigns','ChatQueues','mailQueues','MailQueues','showMailQueues','mailAccounts','openchannelQueues','OpenchannelQueues','smsQueues','SmsQueues','showSmsQueues','showFaxQueues','faxAccounts','FaxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','MailQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','FaxQueuesWaitingInteractions','queueNotify','capitalize','findOne','Message','Interaction','Account','\x20Message\x20not\x20found','queue','MessageId','InteractionId','TransferReport','create','Start','*,*,*,*','channel','Channel\x20field\x20is\x20mandatory','chat','Website','User','update','From','agentTransferTimeout','moment','../../mysqldb','../../config/logger','api','jayson/promise','client','http','request','then','error','code','message','result','catch','json','sendStatus','stack','name','send','isNil','rows','find','voiceChannels','query','voiceChannelMixMonitor','VoiceChannelMixMonitor','merge','params','voiceChannelStopMixMonitor','VoiceQueues','showVoiceQueues','VoiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel','voiceQueuesChannelRedirect','VoiceQueuesChannelRedirect','Outbound','agents','Agents','agentCapacity','body','interaction','user'];(function(_0xd108b7,_0x8acbc8){var _0x529edd=function(_0x2cd9dc){while(--_0x2cd9dc){_0xd108b7['push'](_0xd108b7['shift']());}};_0x529edd(++_0x8acbc8);}(_0x1d07,0x1c8));var _0x71d0=function(_0x51020b,_0x38c2c7){_0x51020b=_0x51020b-0x0;var _0x371e47=_0x1d07[_0x51020b];return _0x371e47;};'use strict';var BPromise=require('bluebird');var moment=require(_0x71d0('0x0'));var _=require('lodash');var util=require('util');var db=require(_0x71d0('0x1'))['db'];var logger=require(_0x71d0('0x2'))(_0x71d0('0x3'));var jayson=require(_0x71d0('0x4'));var amiClient=jayson[_0x71d0('0x5')]['http']({'port':0x232a});var mailClient=jayson[_0x71d0('0x5')][_0x71d0('0x6')]({'port':0x232b});var routingClient=jayson[_0x71d0('0x5')][_0x71d0('0x6')]({'port':0x232c});function respondWithRpcPromise(_0x1aacc3,_0x259c20,_0x497e70){return new BPromise(function(_0x1e9cbd,_0x304e60){var _0x189511=_0x497e70?_0x497e70:amiClient;return _0x189511[_0x71d0('0x7')](_0x1aacc3,_0x259c20)[_0x71d0('0x8')](function(_0x1055f5){if(_0x1055f5[_0x71d0('0x9')]){if(_0x1055f5[_0x71d0('0x9')][_0x71d0('0xa')]===0x1f4){return _0x304e60(_0x1055f5['error'][_0x71d0('0xb')]);}return _0x1e9cbd(_0x1055f5[_0x71d0('0x9')][_0x71d0('0xb')]);}else{_0x1e9cbd(_0x1055f5[_0x71d0('0xc')]);}})[_0x71d0('0xd')](function(_0x1d3505){_0x304e60(_0x1d3505);});});}function respondWithResult(_0x251578,_0x4a9eb0){_0x4a9eb0=_0x4a9eb0||0xc8;return function(_0x49eead){if(_0x49eead){return _0x251578['status'](_0x4a9eb0)[_0x71d0('0xe')](_0x49eead);}return _0x251578[_0x71d0('0xf')](0x194);};}function handleError(_0x39e6ef,_0x301ca5){_0x301ca5=_0x301ca5||0x1f4;return function(_0x1bce34){logger[_0x71d0('0x9')](_0x1bce34[_0x71d0('0x10')]);if(_0x1bce34[_0x71d0('0x11')]){delete _0x1bce34[_0x71d0('0x11')];}_0x39e6ef['status'](_0x301ca5)[_0x71d0('0x12')](_0x1bce34);};}function findById(_0x44bcc4){return function(_0x2f05f2){if(!_[_0x71d0('0x13')](_0x44bcc4)&&!_[_0x71d0('0x13')](_0x2f05f2)&&!_[_0x71d0('0x13')](_0x2f05f2[_0x71d0('0x14')])){return _[_0x71d0('0x15')](_0x2f05f2[_0x71d0('0x14')],function(_0x2e377a){return _0x2e377a['id']==_0x44bcc4;});}return null;};}exports[_0x71d0('0x16')]=function(_0x228114,_0x32921f){return respondWithRpcPromise('VoiceChannels',_0x228114[_0x71d0('0x17')])[_0x71d0('0x8')](respondWithResult(_0x32921f,null))[_0x71d0('0xd')](handleError(_0x32921f,null));};exports[_0x71d0('0x18')]=function(_0x1cf20c,_0xfb4b7c){return respondWithRpcPromise(_0x71d0('0x19'),_[_0x71d0('0x1a')](_0x1cf20c['query'],_0x1cf20c[_0x71d0('0x1b')]))[_0x71d0('0x8')](respondWithResult(_0xfb4b7c,null))[_0x71d0('0xd')](handleError(_0xfb4b7c,null));};exports[_0x71d0('0x1c')]=function(_0x37d733,_0x1c53b7){return respondWithRpcPromise('VoiceChannelStopMixMonitor',_[_0x71d0('0x1a')](_0x37d733[_0x71d0('0x17')],_0x37d733['params']))[_0x71d0('0x8')](respondWithResult(_0x1c53b7,null))[_0x71d0('0xd')](handleError(_0x1c53b7,null));};exports['voiceQueues']=function(_0x46cba5,_0x39abd1){return respondWithRpcPromise(_0x71d0('0x1d'),_0x46cba5['query'])[_0x71d0('0x8')](respondWithResult(_0x39abd1,null))['catch'](handleError(_0x39abd1,null));};exports[_0x71d0('0x1e')]=function(_0x5d2834,_0x560ba4){return respondWithRpcPromise(_0x71d0('0x1d'),_0x5d2834[_0x71d0('0x17')])[_0x71d0('0x8')](findById(_0x5d2834[_0x71d0('0x1b')]['id']))[_0x71d0('0x8')](respondWithResult(_0x560ba4,null))[_0x71d0('0xd')](handleError(_0x560ba4,null));};exports['voiceQueuesPreview']=function(_0x43b763,_0x42360e){return respondWithRpcPromise(_0x71d0('0x1f'),_[_0x71d0('0x1a')](_0x43b763['query'],_0x43b763['params']))[_0x71d0('0x8')](respondWithResult(_0x42360e,null))['catch'](handleError(_0x42360e,null));};exports[_0x71d0('0x20')]=function(_0x151746,_0x3df253){return respondWithRpcPromise(_0x71d0('0x21'),_0x151746[_0x71d0('0x17')])[_0x71d0('0x8')](respondWithResult(_0x3df253,null))[_0x71d0('0xd')](handleError(_0x3df253,null));};exports[_0x71d0('0x22')]=function(_0x716a6e,_0x454af4){return respondWithRpcPromise('VoiceQueuesChannel',_[_0x71d0('0x1a')](_0x716a6e[_0x71d0('0x17')],_0x716a6e[_0x71d0('0x1b')]))[_0x71d0('0x8')](respondWithResult(_0x454af4,null))['catch'](handleError(_0x454af4,null));};exports['voiceQueuesChannelHangup']=function(_0x5e6a3e,_0x3018c3){return respondWithRpcPromise('VoiceQueuesChannelHangup',_[_0x71d0('0x1a')](_0x5e6a3e[_0x71d0('0x17')],_0x5e6a3e[_0x71d0('0x1b')]))[_0x71d0('0x8')](respondWithResult(_0x3018c3,null))['catch'](handleError(_0x3018c3,null));};exports[_0x71d0('0x23')]=function(_0xfe9c09,_0x50b72b){return respondWithRpcPromise(_0x71d0('0x24'),_[_0x71d0('0x1a')](_0xfe9c09[_0x71d0('0x17')],_0xfe9c09['params']))[_0x71d0('0x8')](respondWithResult(_0x50b72b,null))[_0x71d0('0xd')](handleError(_0x50b72b,null));};exports['outbound']=function(_0xd7f466,_0x33ffe9){return respondWithRpcPromise(_0x71d0('0x25'),_0xd7f466[_0x71d0('0x17')])[_0x71d0('0x8')](respondWithResult(_0x33ffe9,null))[_0x71d0('0xd')](handleError(_0x33ffe9,null));};exports['outboundChannels']=function(_0x58c4c8,_0x48bc0a){return respondWithRpcPromise('OutboundChannels',_0x58c4c8['query'])[_0x71d0('0x8')](respondWithResult(_0x48bc0a,null))['catch'](handleError(_0x48bc0a,null));};exports[_0x71d0('0x26')]=function(_0x15e06a,_0x316907){var _0x23bbd8;return respondWithRpcPromise('Agents',_0x15e06a[_0x71d0('0x17')])[_0x71d0('0x8')](function(_0x2120dc){_0x23bbd8=_0x2120dc;return respondWithRpcPromise(_0x71d0('0x27'),_0x15e06a['query'],routingClient);})['then'](function(_0x4182ca){return _[_0x71d0('0x1a')]({},_0x4182ca,_0x23bbd8);})[_0x71d0('0x8')](respondWithResult(_0x316907,null))[_0x71d0('0xd')](handleError(_0x316907,null));};exports[_0x71d0('0x28')]=function(_0x40c817,_0x333a73){if(_0x40c817['body']&&_0x40c817[_0x71d0('0x29')][_0x71d0('0x2a')]&&_0x40c817['user']&&_0x40c817[_0x71d0('0x2b')][_0x71d0('0x11')]){for(var _0x5eaa8d in _0x40c817[_0x71d0('0x29')][_0x71d0('0x2a')]){if(_0x40c817['body'][_0x71d0('0x2a')][_0x71d0('0x2c')](_0x5eaa8d)){db[_0x71d0('0x2d')][_0x71d0('0x2e')]({'where':{'channel':_0x5eaa8d,'membername':_0x40c817[_0x71d0('0x2b')][_0x71d0('0x11')],'type':_0x71d0('0x2f'),'exitAt':null,'uniqueid':_0x40c817['body']['interaction'][_0x5eaa8d]&&_0x40c817[_0x71d0('0x29')][_0x71d0('0x2a')][_0x5eaa8d]['length']?{'$notIn':_0x40c817[_0x71d0('0x29')]['interaction'][_0x5eaa8d]}:{'$ne':null}}})[_0x71d0('0x8')](function(_0x573a0f){var _0x1a0c00=moment()[_0x71d0('0x30')]('YYYY-MM-DD\x20HH:mm:ss');for(var _0x32c8fe=0x0,_0x540df2=_0x573a0f[_0x71d0('0x31')];_0x32c8fe<_0x540df2;_0x32c8fe+=0x1){_0x573a0f[_0x32c8fe]['updateAttributes']({'exitAt':_0x1a0c00});}});for(var _0x3ec230=0x0;_0x3ec230<_0x40c817[_0x71d0('0x29')][_0x71d0('0x2a')][_0x5eaa8d][_0x71d0('0x31')];_0x3ec230+=0x1){db[_0x71d0('0x2d')][_0x71d0('0x32')]({'where':{'channel':_0x5eaa8d,'membername':_0x40c817['user'][_0x71d0('0x11')],'type':_0x71d0('0x2f'),'uniqueid':_0x40c817['body'][_0x71d0('0x2a')][_0x5eaa8d][_0x3ec230],'exitAt':null},'defaults':{'channel':_0x5eaa8d,'membername':_0x40c817[_0x71d0('0x2b')][_0x71d0('0x11')],'interface':_[_0x71d0('0x13')](_0x40c817[_0x71d0('0x2b')][_0x71d0('0x33')])?util[_0x71d0('0x30')](_0x71d0('0x34'),_0x40c817[_0x71d0('0x2b')][_0x71d0('0x11')]):_0x40c817[_0x71d0('0x2b')][_0x71d0('0x33')],'type':_0x71d0('0x2f'),'enterAt':moment()[_0x71d0('0x30')]('YYYY-MM-DD\x20HH:mm:ss'),'role':_0x71d0('0x35'),'internal':_0x40c817[_0x71d0('0x2b')][_0x71d0('0x36')],'uniqueid':_0x40c817[_0x71d0('0x29')][_0x71d0('0x2a')][_0x5eaa8d][_0x3ec230]}});}}}}return respondWithRpcPromise(_0x71d0('0x37'),{'id':_0x40c817[_0x71d0('0x1b')]['id'],'capacity':_0x40c817[_0x71d0('0x29')][_0x71d0('0x38')]},routingClient)['then'](respondWithResult(_0x333a73,null))[_0x71d0('0xd')](handleError(_0x333a73,null));};exports['telephones']=function(_0x432c4d,_0x11e019){return respondWithRpcPromise('Telephones',_0x432c4d[_0x71d0('0x17')])['then'](respondWithResult(_0x11e019,null))[_0x71d0('0xd')](handleError(_0x11e019,null));};exports['trunks']=function(_0x5f2be7,_0x206a63){return respondWithRpcPromise('Trunks',_0x5f2be7[_0x71d0('0x17')])[_0x71d0('0x8')](respondWithResult(_0x206a63,null))['catch'](handleError(_0x206a63,null));};exports['campaigns']=function(_0x2e5917,_0x5a3a8f){return respondWithRpcPromise(_0x71d0('0x39'),_0x2e5917[_0x71d0('0x17')])[_0x71d0('0x8')](respondWithResult(_0x5a3a8f,null))[_0x71d0('0xd')](handleError(_0x5a3a8f,null));};exports['chatQueues']=function(_0x36347e,_0x12b4fd){return respondWithRpcPromise(_0x71d0('0x3a'),_0x36347e[_0x71d0('0x17')],routingClient)['then'](respondWithResult(_0x12b4fd,null))[_0x71d0('0xd')](handleError(_0x12b4fd,null));};exports['showChatQueues']=function(_0xe448ad,_0x3cf71b){return respondWithRpcPromise('ChatQueues',_0xe448ad[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](findById(_0xe448ad[_0x71d0('0x1b')]['id']))[_0x71d0('0x8')](respondWithResult(_0x3cf71b,null))[_0x71d0('0xd')](handleError(_0x3cf71b,null));};exports[_0x71d0('0x3b')]=function(_0xde035e,_0x23191a){return respondWithRpcPromise(_0x71d0('0x3c'),_0xde035e[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](respondWithResult(_0x23191a,null))[_0x71d0('0xd')](handleError(_0x23191a,null));};exports[_0x71d0('0x3d')]=function(_0x5acd21,_0x3b4d75){return respondWithRpcPromise('MailQueues',_0x5acd21[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](findById(_0x5acd21[_0x71d0('0x1b')]['id']))[_0x71d0('0x8')](respondWithResult(_0x3b4d75,null))[_0x71d0('0xd')](handleError(_0x3b4d75,null));};exports[_0x71d0('0x3e')]=function(_0x366092,_0x53978f){return respondWithRpcPromise('MailAccounts',_0x366092[_0x71d0('0x17')],mailClient)[_0x71d0('0x8')](respondWithResult(_0x53978f,null))[_0x71d0('0xd')](handleError(_0x53978f,null));};exports[_0x71d0('0x3f')]=function(_0x2bfe6b,_0x20db5d){return respondWithRpcPromise(_0x71d0('0x40'),_0x2bfe6b[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](respondWithResult(_0x20db5d,null))['catch'](handleError(_0x20db5d,null));};exports['showOpenchannelQueues']=function(_0x202691,_0x2298d1){return respondWithRpcPromise(_0x71d0('0x40'),_0x202691[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](findById(_0x202691[_0x71d0('0x1b')]['id']))[_0x71d0('0x8')](respondWithResult(_0x2298d1,null))['catch'](handleError(_0x2298d1,null));};exports[_0x71d0('0x41')]=function(_0x3158fa,_0x26ed3b){return respondWithRpcPromise(_0x71d0('0x42'),_0x3158fa[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](respondWithResult(_0x26ed3b,null))[_0x71d0('0xd')](handleError(_0x26ed3b,null));};exports[_0x71d0('0x43')]=function(_0x423e7e,_0x59e39a){return respondWithRpcPromise(_0x71d0('0x42'),_0x423e7e[_0x71d0('0x17')],routingClient)['then'](findById(_0x423e7e[_0x71d0('0x1b')]['id']))['then'](respondWithResult(_0x59e39a,null))[_0x71d0('0xd')](handleError(_0x59e39a,null));};exports['faxQueues']=function(_0x2a9606,_0x2c8fce){return respondWithRpcPromise('FaxQueues',_0x2a9606['query'],routingClient)[_0x71d0('0x8')](respondWithResult(_0x2c8fce,null))[_0x71d0('0xd')](handleError(_0x2c8fce,null));};exports[_0x71d0('0x44')]=function(_0x37e156,_0x51579f){return respondWithRpcPromise('FaxQueues',_0x37e156['query'],routingClient)['then'](findById(_0x37e156['params']['id']))[_0x71d0('0x8')](respondWithResult(_0x51579f,null))[_0x71d0('0xd')](handleError(_0x51579f,null));};exports[_0x71d0('0x45')]=function(_0x1c25ff,_0x4610f7){return respondWithRpcPromise(_0x71d0('0x46'),_0x1c25ff[_0x71d0('0x17')])['then'](respondWithResult(_0x4610f7,null))['catch'](handleError(_0x4610f7,null));};exports[_0x71d0('0x47')]=function(_0x5469cc,_0x40123c){return respondWithRpcPromise(_0x71d0('0x48'),_0x5469cc[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](respondWithResult(_0x40123c,null))['catch'](handleError(_0x40123c,null));};exports['mailQueuesWaitingInteractions']=function(_0x3904d1,_0x4f015a){return respondWithRpcPromise(_0x71d0('0x49'),_0x3904d1[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](respondWithResult(_0x4f015a,null))[_0x71d0('0xd')](handleError(_0x4f015a,null));};exports['openchannelQueuesWaitingInteractions']=function(_0x32aa91,_0x132fb6){return respondWithRpcPromise(_0x71d0('0x4a'),_0x32aa91[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](respondWithResult(_0x132fb6,null))[_0x71d0('0xd')](handleError(_0x132fb6,null));};exports[_0x71d0('0x4b')]=function(_0x58cdc4,_0x1f8571){return respondWithRpcPromise('SmsQueuesWaitingInteractions',_0x58cdc4[_0x71d0('0x17')],routingClient)[_0x71d0('0x8')](respondWithResult(_0x1f8571,null))[_0x71d0('0xd')](handleError(_0x1f8571,null));};exports[_0x71d0('0x4c')]=function(_0x3dcb6b,_0x1527b9){return respondWithRpcPromise(_0x71d0('0x4d'),_0x3dcb6b[_0x71d0('0x17')],routingClient)['then'](respondWithResult(_0x1527b9,null))[_0x71d0('0xd')](handleError(_0x1527b9,null));};exports[_0x71d0('0x4e')]=function(_0x7e785c){return function(_0x1ec40d,_0x340334){var _0x404fea,_0x18989a;var _0x2384bc=_[_0x71d0('0x4f')](_0x7e785c);var _0x5573f6=_0x7e785c==='chat'?'Website':'Account';return db[_0x2384bc+'Queue'][_0x71d0('0x50')]({'raw':!![],'where':{'id':_0x1ec40d[_0x71d0('0x1b')]['id']}})[_0x71d0('0x8')](function(_0x47b5e5){if(_[_0x71d0('0x13')](_0x47b5e5)){throw new Error(_0x2384bc+'\x20Queue\x20not\x20found');}_0x404fea=_0x47b5e5;return db[_0x2384bc+_0x71d0('0x51')][_0x71d0('0x50')]({'where':{'id':_0x1ec40d[_0x71d0('0x29')]['messageId']},'include':[{'model':db[_0x2384bc+_0x71d0('0x52')],'as':_0x71d0('0x52')},{'model':db[_0x2384bc+_0x5573f6],'as':_0x71d0('0x53')}]});})[_0x71d0('0x8')](function(_0x4dcbd8){if(_['isNil'](_0x4dcbd8)){throw new Error(_0x2384bc+_0x71d0('0x54'));}_0x18989a=_0x4dcbd8;return _0x4dcbd8['update']({'read':0x0,'readAt':null,'UserId':null});})[_0x71d0('0x8')](function(){var _0x451c60={'uniqueid':_0x7e785c+'.'+_0x18989a['id']+'.'+_0x18989a[_0x71d0('0x52')]['id'],'FromUserId':_0x1ec40d[_0x71d0('0x2b')]['id'],'type':_0x71d0('0x55')};_0x451c60[_0x2384bc+_0x71d0('0x56')]=_0x18989a['id'];_0x451c60[_0x2384bc+_0x71d0('0x57')]=_0x18989a['Interaction']['id'];_0x451c60['From'+_0x2384bc+_0x5573f6+'Id']=_0x18989a['Account']['id'];_0x451c60['To'+_0x2384bc+'QueueId']=_0x404fea['id'];return db[_0x2384bc+_0x71d0('0x58')][_0x71d0('0x59')](_0x451c60);})[_0x71d0('0x8')](function(){return respondWithRpcPromise(_0x71d0('0x5a'),{'channel':_0x7e785c,'interaction':_0x18989a[_0x71d0('0x52')],'message':_0x18989a,'account':_0x18989a[_0x71d0('0x53')],'applications':[{'id':0x0,'priority':0x1,'app':_0x71d0('0x55'),'appdata':_0x404fea['name']+','+(_0x18989a[_0x71d0('0x53')]['queueTransferTimeout']||0x12c),'interval':_0x71d0('0x5b')}]},routingClient);})[_0x71d0('0x8')](respondWithResult(_0x340334,null))['catch'](handleError(_0x340334,null));};};exports['agentNotify']=function(_0x479ece,_0x3fc4a1){var _0x507643,_0x47ef02;if(_[_0x71d0('0x13')](_0x479ece[_0x71d0('0x29')][_0x71d0('0x5c')])){throw new Error(_0x71d0('0x5d'));}var _0x561431=_0x479ece[_0x71d0('0x29')]['channel'];var _0x1d4423=_[_0x71d0('0x4f')](_0x561431);var _0x40e6b9=_0x561431===_0x71d0('0x5e')?_0x71d0('0x5f'):'Account';return db[_0x71d0('0x60')]['findOne']({'raw':!![],'where':{'id':_0x479ece[_0x71d0('0x1b')]['id'],'role':_0x71d0('0x35')}})[_0x71d0('0x8')](function(_0x12a93e){if(_[_0x71d0('0x13')](_0x12a93e)){throw new Error('Agent\x20not\x20found');}_0x507643=_0x12a93e;return db[_0x1d4423+_0x71d0('0x51')][_0x71d0('0x50')]({'where':{'id':_0x479ece[_0x71d0('0x29')]['messageId']},'include':[{'model':db[_0x1d4423+_0x71d0('0x52')],'as':'Interaction'},{'model':db[_0x1d4423+_0x40e6b9],'as':_0x71d0('0x53')}]});})[_0x71d0('0x8')](function(_0x107025){if(_[_0x71d0('0x13')](_0x107025)){throw new Error(_0x1d4423+_0x71d0('0x54'));}_0x47ef02=_0x107025;return _0x107025[_0x71d0('0x61')]({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0x2753ab={'uniqueid':_0x561431+'.'+_0x47ef02['id']+'.'+_0x47ef02[_0x71d0('0x52')]['id'],'FromUserId':_0x479ece[_0x71d0('0x2b')]['id'],'type':_0x71d0('0x55'),'ToUserId':_0x507643['id']};_0x2753ab[_0x1d4423+_0x71d0('0x56')]=_0x47ef02['id'];_0x2753ab[_0x1d4423+_0x71d0('0x57')]=_0x47ef02[_0x71d0('0x52')]['id'];_0x2753ab[_0x71d0('0x62')+_0x1d4423+_0x40e6b9+'Id']=_0x47ef02[_0x71d0('0x53')]['id'];return db[_0x1d4423+_0x71d0('0x58')]['create'](_0x2753ab);})[_0x71d0('0x8')](function(){return respondWithRpcPromise(_0x71d0('0x5a'),{'channel':_0x561431,'interaction':_0x47ef02[_0x71d0('0x52')],'message':_0x47ef02,'account':_0x47ef02[_0x71d0('0x53')],'applications':[{'id':0x0,'priority':0x1,'app':_0x71d0('0x35'),'appdata':_0x507643['name']+','+(_0x47ef02[_0x71d0('0x53')][_0x71d0('0x63')]||0x12c),'interval':'*,*,*,*'}]},routingClient);})[_0x71d0('0x8')](respondWithResult(_0x3fc4a1,null))[_0x71d0('0xd')](handleError(_0x3fc4a1,null));};
\ No newline at end of file
diff --git a/server/api/schedule/index.js b/server/api/schedule/index.js
index 80f82e5..6acb8f9 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 _0xf3b7=['../../components/interaction/service','../../config/environment','./schedule.controller','get','isAuthenticated','index','/:id','show','run','post','create','put','delete','destroy','multer','util','connect-timeout','express'];(function(_0x5ad0c6,_0x56ee17){var _0x167958=function(_0x32dd81){while(--_0x32dd81){_0x5ad0c6['push'](_0x5ad0c6['shift']());}};_0x167958(++_0x56ee17);}(_0xf3b7,0x19a));var _0x7f3b=function(_0x293ec2,_0x349298){_0x293ec2=_0x293ec2-0x0;var _0x44b081=_0xf3b7[_0x293ec2];return _0x44b081;};'use strict';var multer=require(_0x7f3b('0x0'));var util=require(_0x7f3b('0x1'));var path=require('path');var timeout=require(_0x7f3b('0x2'));var express=require(_0x7f3b('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x7f3b('0x4'));var config=require(_0x7f3b('0x5'));var controller=require(_0x7f3b('0x6'));router[_0x7f3b('0x7')]('/',auth[_0x7f3b('0x8')](),controller[_0x7f3b('0x9')]);router[_0x7f3b('0x7')](_0x7f3b('0xa'),auth[_0x7f3b('0x8')](),controller[_0x7f3b('0xb')]);router[_0x7f3b('0x7')]('/:id/run',auth[_0x7f3b('0x8')](),controller[_0x7f3b('0xc')]);router[_0x7f3b('0xd')]('/',auth[_0x7f3b('0x8')](),controller[_0x7f3b('0xe')]);router[_0x7f3b('0xf')](_0x7f3b('0xa'),auth[_0x7f3b('0x8')](),controller['update']);router[_0x7f3b('0x10')](_0x7f3b('0xa'),auth[_0x7f3b('0x8')](),controller[_0x7f3b('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0x194e=['delete','destroy','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','show','run','create','put','update'];(function(_0x2a2673,_0x368539){var _0x475bc5=function(_0x44ef62){while(--_0x44ef62){_0x2a2673['push'](_0x2a2673['shift']());}};_0x475bc5(++_0x368539);}(_0x194e,0x1de));var _0xe194=function(_0x6cef08,_0x493c5e){_0x6cef08=_0x6cef08-0x0;var _0x5a002f=_0x194e[_0x6cef08];return _0x5a002f;};'use strict';var multer=require(_0xe194('0x0'));var util=require(_0xe194('0x1'));var path=require('path');var timeout=require(_0xe194('0x2'));var express=require(_0xe194('0x3'));var router=express[_0xe194('0x4')]();var auth=require(_0xe194('0x5'));var interaction=require(_0xe194('0x6'));var config=require(_0xe194('0x7'));var controller=require('./schedule.controller');router[_0xe194('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xe194('0x8')](_0xe194('0x9'),auth[_0xe194('0xa')](),controller[_0xe194('0xb')]);router[_0xe194('0x8')]('/:id/run',auth['isAuthenticated'](),controller[_0xe194('0xc')]);router['post']('/',auth[_0xe194('0xa')](),controller[_0xe194('0xd')]);router[_0xe194('0xe')]('/:id',auth['isAuthenticated'](),controller[_0xe194('0xf')]);router[_0xe194('0x10')](_0xe194('0x9'),auth[_0xe194('0xa')](),controller[_0xe194('0x11')]);module[_0xe194('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/schedule/schedule.attributes.js b/server/api/schedule/schedule.attributes.js
index a94d4e2..b076903 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 _0xf981=['default','TEXT','sequelize','exports','STRING','BOOLEAN','0\x200\x20*\x20*\x20*','DATE','INTEGER','ENUM','years','quarters','months','hours','days','csv','pdf','xlsx','custom'];(function(_0x3ac71b,_0x584a85){var _0x147198=function(_0x340f79){while(--_0x340f79){_0x3ac71b['push'](_0x3ac71b['shift']());}};_0x147198(++_0x584a85);}(_0xf981,0xe6));var _0x1f98=function(_0x13c9e1,_0x4d9bb){_0x13c9e1=_0x13c9e1-0x0;var _0x236ef7=_0xf981[_0x13c9e1];return _0x236ef7;};'use strict';var Sequelize=require(_0x1f98('0x0'));module[_0x1f98('0x1')]={'name':{'type':Sequelize[_0x1f98('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x1f98('0x2')]},'active':{'type':Sequelize[_0x1f98('0x3')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0x1f98('0x2')],'allowNull':![],'defaultValue':_0x1f98('0x4')},'startAt':{'type':Sequelize[_0x1f98('0x5')],'allowNull':![]},'endAt':{'type':Sequelize['DATE'],'allowNull':![]},'subtractNumber':{'type':Sequelize[_0x1f98('0x6')],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x1f98('0x7')](_0x1f98('0x8'),_0x1f98('0x9'),_0x1f98('0xa'),'weeks','days',_0x1f98('0xb'),'minutes'),'allowNull':![],'defaultValue':_0x1f98('0xc')},'output':{'type':Sequelize[_0x1f98('0x7')](_0x1f98('0xd'),_0x1f98('0xe'),_0x1f98('0xf')),'allowNull':![],'defaultValue':'csv'},'type':{'type':Sequelize[_0x1f98('0x7')](_0x1f98('0x10'),_0x1f98('0x11')),'allowNull':![],'defaultValue':_0x1f98('0x10')},'sendMail':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize[_0x1f98('0x2')]},'cc':{'type':Sequelize['TEXT']},'bcc':{'type':Sequelize[_0x1f98('0x12')]},'sendIfEmpty':{'type':Sequelize[_0x1f98('0x3')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x553a=['STRING','BOOLEAN','DATE','years','weeks','days','hours','csv','pdf','xlsx','custom','TEXT','exports'];(function(_0x1e7944,_0x5a1ee7){var _0x4be825=function(_0x14932d){while(--_0x14932d){_0x1e7944['push'](_0x1e7944['shift']());}};_0x4be825(++_0x5a1ee7);}(_0x553a,0x192));var _0xa553=function(_0x25a386,_0x4acd61){_0x25a386=_0x25a386-0x0;var _0x4d3d47=_0x553a[_0x25a386];return _0x4d3d47;};'use strict';var Sequelize=require('sequelize');module[_0xa553('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0xa553('0x1')]},'active':{'type':Sequelize[_0xa553('0x2')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0xa553('0x1')],'allowNull':![],'defaultValue':'0\x200\x20*\x20*\x20*'},'startAt':{'type':Sequelize['DATE'],'allowNull':![]},'endAt':{'type':Sequelize[_0xa553('0x3')],'allowNull':![]},'subtractNumber':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize['ENUM'](_0xa553('0x4'),'quarters','months',_0xa553('0x5'),_0xa553('0x6'),_0xa553('0x7'),'minutes'),'allowNull':![],'defaultValue':_0xa553('0x6')},'output':{'type':Sequelize['ENUM'](_0xa553('0x8'),_0xa553('0x9'),_0xa553('0xa')),'allowNull':![],'defaultValue':'csv'},'type':{'type':Sequelize['ENUM'](_0xa553('0xb'),'default'),'allowNull':![],'defaultValue':_0xa553('0xb')},'sendMail':{'type':Sequelize[_0xa553('0x2')],'defaultValue':![]},'email':{'type':Sequelize[_0xa553('0x1')]},'cc':{'type':Sequelize['TEXT']},'bcc':{'type':Sequelize[_0xa553('0xc')]},'sendIfEmpty':{'type':Sequelize[_0xa553('0x2')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/schedule/schedule.controller.js b/server/api/schedule/schedule.controller.js
index 8403af2..f107e12 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 _0x615a=['request-promise','moment','bluebird','mustache','path','sox','to-csv','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','sendStatus','status','offset','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','get','UserProfileResource','end','stack','name','send','index','map','Schedule','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','merge','VIRTUAL','options','where','count','includeAll','show','params','include','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Scheduler','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','run','../../config/schedule','html-pdf','fast-json-patch'];(function(_0x1019cc,_0x2e1565){var _0xeb82fb=function(_0xba56cd){while(--_0xba56cd){_0x1019cc['push'](_0x1019cc['shift']());}};_0xeb82fb(++_0x2e1565);}(_0x615a,0x193));var _0xa615=function(_0x543c51,_0xff0084){_0x543c51=_0x543c51-0x0;var _0x360555=_0x615a[_0x543c51];return _0x360555;};'use strict';var pdf=require(_0xa615('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xa615('0x1'));var rp=require(_0xa615('0x2'));var moment=require(_0xa615('0x3'));var BPromise=require(_0xa615('0x4'));var Mustache=require(_0xa615('0x5'));var util=require('util');var path=require(_0xa615('0x6'));var sox=require(_0xa615('0x7'));var csv=require(_0xa615('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xa615('0x9'));var crypto=require(_0xa615('0xa'));var jsforce=require(_0xa615('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xa615('0xc'));var Papa=require(_0xa615('0xd'));var Redis=require(_0xa615('0xe'));var authService=require(_0xa615('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0xa615('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa615('0x11'))(_0xa615('0x12'));var utils=require(_0xa615('0x13'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x53594b,_0x48bf95){_0x48bf95=_0x48bf95||0xcc;return function(_0x44a0e4){if(_0x44a0e4){return _0x53594b[_0xa615('0x14')](_0x48bf95);}return _0x53594b[_0xa615('0x15')](_0x48bf95)['end']();};}function respondWithResult(_0x23ab3c,_0x58cddf){_0x58cddf=_0x58cddf||0xc8;return function(_0x3c309e){if(_0x3c309e){return _0x23ab3c[_0xa615('0x15')](_0x58cddf)['json'](_0x3c309e);}};}function respondWithFilteredResult(_0x3d69dd,_0x4d1abb){return function(_0x437768){if(_0x437768){var _0x391bea=_0x437768['count'],_0x386cb1=_0x4d1abb[_0xa615('0x16')],_0x517b8f=_0x4d1abb[_0xa615('0x16')]+_0x4d1abb[_0xa615('0x17')],_0x2fcf73;if(_0x517b8f>=_0x391bea){_0x517b8f=_0x391bea;_0x2fcf73=0xc8;}else{_0x2fcf73=0xce;}_0x3d69dd[_0xa615('0x15')](_0x2fcf73);return _0x3d69dd[_0xa615('0x18')](_0xa615('0x19'),_0x386cb1+'-'+_0x517b8f+'/'+_0x391bea)[_0xa615('0x1a')](_0x437768);}return null;};}function patchUpdates(_0x3eaf4a){return function(_0x1471b3){try{jsonpatch[_0xa615('0x1b')](_0x1471b3,_0x3eaf4a,!![]);}catch(_0x212e8b){return BPromise[_0xa615('0x1c')](_0x212e8b);}return _0x1471b3[_0xa615('0x1d')]();};}function saveUpdates(_0x55d989,_0x3bb894){return function(_0x5dff63){if(_0x5dff63){return _0x5dff63[_0xa615('0x1e')](_0x55d989)[_0xa615('0x1f')](function(_0xd3083a){return _0xd3083a;});}return null;};}function removeEntity(_0x22d01d,_0x1ca93d){return function(_0x487230){if(_0x487230){return _0x487230[_0xa615('0x20')]()[_0xa615('0x1f')](function(){var _0xf061a3=_0x487230[_0xa615('0x21')]({'plain':!![]});var _0x267bec='Scheduler';return db[_0xa615('0x22')]['destroy']({'where':{'type':_0x267bec,'resourceId':_0xf061a3['id']}})[_0xa615('0x1f')](function(){return _0x487230;});})['then'](function(){_0x22d01d[_0xa615('0x15')](0xcc)[_0xa615('0x23')]();});}};}function handleEntityNotFound(_0x237b9e,_0x219993){return function(_0x3b1631){if(!_0x3b1631){_0x237b9e[_0xa615('0x14')](0x194);}return _0x3b1631;};}function handleError(_0x4e62f7,_0x4a083c){_0x4a083c=_0x4a083c||0x1f4;return function(_0x52eeb6){logger['error'](_0x52eeb6[_0xa615('0x24')]);if(_0x52eeb6[_0xa615('0x25')]){delete _0x52eeb6[_0xa615('0x25')];}_0x4e62f7['status'](_0x4a083c)[_0xa615('0x26')](_0x52eeb6);};}exports[_0xa615('0x27')]=function(_0x4bbeea,_0x5a2662){var _0x82cc1e={},_0x24e74f={},_0x485f42={'count':0x0,'rows':[]};var _0x281c88=_[_0xa615('0x28')](db[_0xa615('0x29')][_0xa615('0x2a')],function(_0x4de441){return{'name':_0x4de441['fieldName'],'type':_0x4de441[_0xa615('0x2b')][_0xa615('0x2c')]};});_0x24e74f[_0xa615('0x2d')]=_[_0xa615('0x28')](_0x281c88,_0xa615('0x25'));_0x24e74f[_0xa615('0x2e')]=_[_0xa615('0x2f')](_0x4bbeea[_0xa615('0x2e')]);_0x24e74f[_0xa615('0x30')]=_[_0xa615('0x31')](_0x24e74f[_0xa615('0x2d')],_0x24e74f[_0xa615('0x2e')]);_0x82cc1e[_0xa615('0x32')]=_[_0xa615('0x31')](_0x24e74f[_0xa615('0x2d')],qs[_0xa615('0x33')](_0x4bbeea[_0xa615('0x2e')]['fields']));_0x82cc1e[_0xa615('0x32')]=_0x82cc1e['attributes'][_0xa615('0x34')]?_0x82cc1e[_0xa615('0x32')]:_0x24e74f[_0xa615('0x2d')];if(!_0x4bbeea[_0xa615('0x2e')]['hasOwnProperty'](_0xa615('0x35'))){_0x82cc1e['limit']=qs[_0xa615('0x17')](_0x4bbeea[_0xa615('0x2e')]['limit']);_0x82cc1e['offset']=qs['offset'](_0x4bbeea['query'][_0xa615('0x16')]);}_0x82cc1e[_0xa615('0x36')]=qs[_0xa615('0x37')](_0x4bbeea[_0xa615('0x2e')][_0xa615('0x37')]);_0x82cc1e['where']=qs['filters'](_[_0xa615('0x38')](_0x4bbeea[_0xa615('0x2e')],_0x24e74f[_0xa615('0x30')]));if(_0x4bbeea[_0xa615('0x2e')][_0xa615('0x39')]){_0x82cc1e['where']=_[_0xa615('0x3a')](_0x82cc1e['where'],{'$or':_['map'](_0x281c88,function(_0x565302){if(_0x565302[_0xa615('0x2b')]!==_0xa615('0x3b')){var _0x5da1fd={};_0x5da1fd[_0x565302[_0xa615('0x25')]]={'$like':'%'+_0x4bbeea[_0xa615('0x2e')][_0xa615('0x39')]+'%'};return _0x5da1fd;}})});}_0x82cc1e=_['merge']({},_0x82cc1e,_0x4bbeea[_0xa615('0x3c')]);var _0x1bf0e6={'where':_0x82cc1e[_0xa615('0x3d')]};return db['Schedule'][_0xa615('0x3e')](_0x1bf0e6)[_0xa615('0x1f')](function(_0x649ca4){_0x485f42[_0xa615('0x3e')]=_0x649ca4;if(_0x4bbeea[_0xa615('0x2e')][_0xa615('0x3f')]){_0x82cc1e['include']=[{'all':!![]}];}return db[_0xa615('0x29')]['findAll'](_0x82cc1e);})[_0xa615('0x1f')](function(_0x4eb270){_0x485f42['rows']=_0x4eb270;return _0x485f42;})[_0xa615('0x1f')](respondWithFilteredResult(_0x5a2662,_0x82cc1e))['catch'](handleError(_0x5a2662,null));};exports[_0xa615('0x40')]=function(_0x365cac,_0x4a3cc7){var _0x1ce9e3={'raw':![],'where':{'id':_0x365cac[_0xa615('0x41')]['id']}},_0x5e8ac3={};_0x5e8ac3['model']=_[_0xa615('0x2f')](db[_0xa615('0x29')][_0xa615('0x2a')]);_0x5e8ac3[_0xa615('0x2e')]=_[_0xa615('0x2f')](_0x365cac[_0xa615('0x2e')]);_0x5e8ac3[_0xa615('0x30')]=_['intersection'](_0x5e8ac3[_0xa615('0x2d')],_0x5e8ac3[_0xa615('0x2e')]);_0x1ce9e3[_0xa615('0x32')]=_[_0xa615('0x31')](_0x5e8ac3[_0xa615('0x2d')],qs['fields'](_0x365cac['query']['fields']));_0x1ce9e3[_0xa615('0x32')]=_0x1ce9e3[_0xa615('0x32')][_0xa615('0x34')]?_0x1ce9e3['attributes']:_0x5e8ac3[_0xa615('0x2d')];if(_0x365cac[_0xa615('0x2e')][_0xa615('0x3f')]){_0x1ce9e3[_0xa615('0x42')]=[{'all':!![]}];}_0x1ce9e3=_['merge']({},_0x1ce9e3,_0x365cac['options']);return db[_0xa615('0x29')][_0xa615('0x43')](_0x1ce9e3)[_0xa615('0x1f')](handleEntityNotFound(_0x4a3cc7,null))['then'](respondWithResult(_0x4a3cc7,null))[_0xa615('0x44')](handleError(_0x4a3cc7,null));};exports[_0xa615('0x45')]=function(_0x32027e,_0x3b8ad1){return db[_0xa615('0x29')]['create'](_0x32027e[_0xa615('0x46')],{})[_0xa615('0x1f')](function(_0x5ec752){var _0x97ccab=_0x32027e[_0xa615('0x47')]['get']({'plain':!![]});if(!_0x97ccab)throw new Error(_0xa615('0x48'));if(_0x97ccab[_0xa615('0x49')]===_0xa615('0x47')){var _0x15202f=_0x5ec752[_0xa615('0x21')]({'plain':!![]});var _0x53bfff=_0xa615('0x4a');return db[_0xa615('0x4b')][_0xa615('0x43')]({'where':{'name':_0x53bfff,'userProfileId':_0x97ccab[_0xa615('0x4c')]},'raw':!![]})['then'](function(_0x36ee92){if(_0x36ee92&&_0x36ee92[_0xa615('0x4d')]===0x0){return db[_0xa615('0x22')]['create']({'name':_0x15202f['name'],'resourceId':_0x15202f['id'],'type':_0x36ee92[_0xa615('0x25')],'sectionId':_0x36ee92['id']},{})[_0xa615('0x1f')](function(){return _0x5ec752;});}else{return _0x5ec752;}})[_0xa615('0x44')](function(_0x4eba00){logger['error'](_0xa615('0x4e'),_0x4eba00);throw _0x4eba00;});}return _0x5ec752;})[_0xa615('0x1f')](respondWithResult(_0x3b8ad1,0xc9))[_0xa615('0x44')](handleError(_0x3b8ad1,null));};exports['update']=function(_0xb897c2,_0x49568c){if(_0xb897c2[_0xa615('0x46')]['id']){delete _0xb897c2['body']['id'];}return db[_0xa615('0x29')][_0xa615('0x43')]({'where':{'id':_0xb897c2[_0xa615('0x41')]['id']}})[_0xa615('0x1f')](handleEntityNotFound(_0x49568c,null))[_0xa615('0x1f')](saveUpdates(_0xb897c2[_0xa615('0x46')],null))[_0xa615('0x1f')](respondWithResult(_0x49568c,null))[_0xa615('0x44')](handleError(_0x49568c,null));};exports[_0xa615('0x20')]=function(_0x1aedf6,_0x3290c8){return db[_0xa615('0x29')][_0xa615('0x43')]({'where':{'id':_0x1aedf6[_0xa615('0x41')]['id']}})['then'](handleEntityNotFound(_0x3290c8,null))[_0xa615('0x1f')](removeEntity(_0x3290c8,null))['catch'](handleError(_0x3290c8,null));};exports[_0xa615('0x4f')]=function(_0x2196aa,_0x174f25,_0x485f5a){var _0x1fe63f=require(_0xa615('0x50'));return db[_0xa615('0x29')]['find']({'where':{'id':_0x2196aa[_0xa615('0x41')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x174f25,null))[_0xa615('0x1f')](function(){_0x1fe63f['run'](_0x2196aa[_0xa615('0x41')]['id']);})[_0xa615('0x1f')](respondWithStatusCode(_0x174f25,null))[_0xa615('0x44')](handleError(_0x174f25,null));};
\ No newline at end of file
+var _0x714a=['lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','set','Content-Range','reject','save','update','destroy','then','get','Scheduler','UserProfileResource','error','stack','name','index','map','Schedule','rawAttributes','type','key','model','query','keys','intersection','attributes','length','nolimit','limit','offset','order','where','filters','pick','filter','VIRTUAL','merge','options','count','includeAll','include','rows','catch','show','params','find','create','body','user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','run','html-pdf','eml-format','zip-dir','request-promise','moment','bluebird','util','path','sox','ejs'];(function(_0x1fe01d,_0x5c5cb6){var _0x3a4d48=function(_0x4636a0){while(--_0x4636a0){_0x1fe01d['push'](_0x1fe01d['shift']());}};_0x3a4d48(++_0x5c5cb6);}(_0x714a,0x18b));var _0xa714=function(_0x546106,_0x3845b3){_0x546106=_0x546106-0x0;var _0x3d0f34=_0x714a[_0x546106];return _0x3d0f34;};'use strict';var pdf=require(_0xa714('0x0'));var emlformat=require(_0xa714('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xa714('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa714('0x3'));var moment=require(_0xa714('0x4'));var BPromise=require(_0xa714('0x5'));var Mustache=require('mustache');var util=require(_0xa714('0x6'));var path=require(_0xa714('0x7'));var sox=require(_0xa714('0x8'));var csv=require('to-csv');var ejs=require(_0xa714('0x9'));var fs=require('fs');var _=require(_0xa714('0xa'));var squel=require(_0xa714('0xb'));var crypto=require(_0xa714('0xc'));var jsforce=require(_0xa714('0xd'));var deskjs=require(_0xa714('0xe'));var toCsv=require('to-csv');var querystring=require(_0xa714('0xf'));var Papa=require('papaparse');var Redis=require(_0xa714('0x10'));var authService=require(_0xa714('0x11'));var qs=require(_0xa714('0x12'));var as=require(_0xa714('0x13'));var hardwareService=require(_0xa714('0x14'));var logger=require(_0xa714('0x15'))(_0xa714('0x16'));var utils=require(_0xa714('0x17'));var config=require(_0xa714('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4fc7d3,_0x4375a9){_0x4375a9=_0x4375a9||0xcc;return function(_0x18b494){if(_0x18b494){return _0x4fc7d3[_0xa714('0x19')](_0x4375a9);}return _0x4fc7d3[_0xa714('0x1a')](_0x4375a9)[_0xa714('0x1b')]();};}function respondWithResult(_0x13b8c8,_0x545360){_0x545360=_0x545360||0xc8;return function(_0x4ce347){if(_0x4ce347){return _0x13b8c8[_0xa714('0x1a')](_0x545360)[_0xa714('0x1c')](_0x4ce347);}};}function respondWithFilteredResult(_0x4b83af,_0x2d12f7){return function(_0x5ab1d5){if(_0x5ab1d5){var _0x529a75=_0x5ab1d5['count'],_0x69defa=_0x2d12f7['offset'],_0x5c5556=_0x2d12f7['offset']+_0x2d12f7['limit'],_0x563cc9;if(_0x5c5556>=_0x529a75){_0x5c5556=_0x529a75;_0x563cc9=0xc8;}else{_0x563cc9=0xce;}_0x4b83af[_0xa714('0x1a')](_0x563cc9);return _0x4b83af[_0xa714('0x1d')](_0xa714('0x1e'),_0x69defa+'-'+_0x5c5556+'/'+_0x529a75)['json'](_0x5ab1d5);}return null;};}function patchUpdates(_0x1b502a){return function(_0x463bb7){try{jsonpatch['apply'](_0x463bb7,_0x1b502a,!![]);}catch(_0x28cb54){return BPromise[_0xa714('0x1f')](_0x28cb54);}return _0x463bb7[_0xa714('0x20')]();};}function saveUpdates(_0x332d6f,_0x5af93f){return function(_0x550bac){if(_0x550bac){return _0x550bac[_0xa714('0x21')](_0x332d6f)['then'](function(_0x41432d){return _0x41432d;});}return null;};}function removeEntity(_0x33ca25,_0x77c119){return function(_0x49a50e){if(_0x49a50e){return _0x49a50e[_0xa714('0x22')]()[_0xa714('0x23')](function(){var _0x3315fa=_0x49a50e[_0xa714('0x24')]({'plain':!![]});var _0x393fd2=_0xa714('0x25');return db[_0xa714('0x26')][_0xa714('0x22')]({'where':{'type':_0x393fd2,'resourceId':_0x3315fa['id']}})[_0xa714('0x23')](function(){return _0x49a50e;});})['then'](function(){_0x33ca25[_0xa714('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x263548,_0x301bf6){return function(_0x5cb494){if(!_0x5cb494){_0x263548[_0xa714('0x19')](0x194);}return _0x5cb494;};}function handleError(_0x5315b0,_0x521498){_0x521498=_0x521498||0x1f4;return function(_0x1ef3ab){logger[_0xa714('0x27')](_0x1ef3ab[_0xa714('0x28')]);if(_0x1ef3ab[_0xa714('0x29')]){delete _0x1ef3ab[_0xa714('0x29')];}_0x5315b0[_0xa714('0x1a')](_0x521498)['send'](_0x1ef3ab);};}exports[_0xa714('0x2a')]=function(_0x3e1260,_0x115f28){var _0x5beb67={},_0x17b813={},_0x34e128={'count':0x0,'rows':[]};var _0x462602=_[_0xa714('0x2b')](db[_0xa714('0x2c')][_0xa714('0x2d')],function(_0x27ceb9){return{'name':_0x27ceb9['fieldName'],'type':_0x27ceb9[_0xa714('0x2e')][_0xa714('0x2f')]};});_0x17b813[_0xa714('0x30')]=_['map'](_0x462602,_0xa714('0x29'));_0x17b813[_0xa714('0x31')]=_[_0xa714('0x32')](_0x3e1260[_0xa714('0x31')]);_0x17b813['filters']=_[_0xa714('0x33')](_0x17b813['model'],_0x17b813[_0xa714('0x31')]);_0x5beb67[_0xa714('0x34')]=_[_0xa714('0x33')](_0x17b813[_0xa714('0x30')],qs['fields'](_0x3e1260[_0xa714('0x31')]['fields']));_0x5beb67[_0xa714('0x34')]=_0x5beb67[_0xa714('0x34')][_0xa714('0x35')]?_0x5beb67[_0xa714('0x34')]:_0x17b813[_0xa714('0x30')];if(!_0x3e1260[_0xa714('0x31')]['hasOwnProperty'](_0xa714('0x36'))){_0x5beb67[_0xa714('0x37')]=qs['limit'](_0x3e1260['query'][_0xa714('0x37')]);_0x5beb67[_0xa714('0x38')]=qs[_0xa714('0x38')](_0x3e1260['query'][_0xa714('0x38')]);}_0x5beb67[_0xa714('0x39')]=qs['sort'](_0x3e1260[_0xa714('0x31')]['sort']);_0x5beb67[_0xa714('0x3a')]=qs[_0xa714('0x3b')](_[_0xa714('0x3c')](_0x3e1260['query'],_0x17b813['filters']));if(_0x3e1260['query'][_0xa714('0x3d')]){_0x5beb67['where']=_['merge'](_0x5beb67[_0xa714('0x3a')],{'$or':_[_0xa714('0x2b')](_0x462602,function(_0x3e320d){if(_0x3e320d[_0xa714('0x2e')]!==_0xa714('0x3e')){var _0x4bc9b3={};_0x4bc9b3[_0x3e320d['name']]={'$like':'%'+_0x3e1260[_0xa714('0x31')][_0xa714('0x3d')]+'%'};return _0x4bc9b3;}})});}_0x5beb67=_[_0xa714('0x3f')]({},_0x5beb67,_0x3e1260[_0xa714('0x40')]);var _0xe8c155={'where':_0x5beb67[_0xa714('0x3a')]};return db['Schedule'][_0xa714('0x41')](_0xe8c155)[_0xa714('0x23')](function(_0x3316ec){_0x34e128[_0xa714('0x41')]=_0x3316ec;if(_0x3e1260[_0xa714('0x31')][_0xa714('0x42')]){_0x5beb67[_0xa714('0x43')]=[{'all':!![]}];}return db[_0xa714('0x2c')]['findAll'](_0x5beb67);})[_0xa714('0x23')](function(_0x551f02){_0x34e128[_0xa714('0x44')]=_0x551f02;return _0x34e128;})['then'](respondWithFilteredResult(_0x115f28,_0x5beb67))[_0xa714('0x45')](handleError(_0x115f28,null));};exports[_0xa714('0x46')]=function(_0x36d66e,_0x70e0cf){var _0x2fc6d1={'raw':![],'where':{'id':_0x36d66e[_0xa714('0x47')]['id']}},_0x3733b1={};_0x3733b1[_0xa714('0x30')]=_[_0xa714('0x32')](db[_0xa714('0x2c')][_0xa714('0x2d')]);_0x3733b1['query']=_[_0xa714('0x32')](_0x36d66e['query']);_0x3733b1[_0xa714('0x3b')]=_[_0xa714('0x33')](_0x3733b1[_0xa714('0x30')],_0x3733b1[_0xa714('0x31')]);_0x2fc6d1[_0xa714('0x34')]=_[_0xa714('0x33')](_0x3733b1[_0xa714('0x30')],qs['fields'](_0x36d66e[_0xa714('0x31')]['fields']));_0x2fc6d1[_0xa714('0x34')]=_0x2fc6d1[_0xa714('0x34')][_0xa714('0x35')]?_0x2fc6d1[_0xa714('0x34')]:_0x3733b1['model'];if(_0x36d66e['query'][_0xa714('0x42')]){_0x2fc6d1[_0xa714('0x43')]=[{'all':!![]}];}_0x2fc6d1=_[_0xa714('0x3f')]({},_0x2fc6d1,_0x36d66e[_0xa714('0x40')]);return db[_0xa714('0x2c')][_0xa714('0x48')](_0x2fc6d1)[_0xa714('0x23')](handleEntityNotFound(_0x70e0cf,null))[_0xa714('0x23')](respondWithResult(_0x70e0cf,null))[_0xa714('0x45')](handleError(_0x70e0cf,null));};exports[_0xa714('0x49')]=function(_0x217c2f,_0x55423c){return db[_0xa714('0x2c')][_0xa714('0x49')](_0x217c2f[_0xa714('0x4a')],{})[_0xa714('0x23')](function(_0x4f749b){var _0x2d0697=_0x217c2f[_0xa714('0x4b')][_0xa714('0x24')]({'plain':!![]});if(!_0x2d0697)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2d0697[_0xa714('0x4c')]===_0xa714('0x4b')){var _0x25283e=_0x4f749b[_0xa714('0x24')]({'plain':!![]});var _0x31633e='Scheduler';return db[_0xa714('0x4d')][_0xa714('0x48')]({'where':{'name':_0x31633e,'userProfileId':_0x2d0697['userProfileId']},'raw':!![]})[_0xa714('0x23')](function(_0x492eef){if(_0x492eef&&_0x492eef[_0xa714('0x4e')]===0x0){return db[_0xa714('0x26')][_0xa714('0x49')]({'name':_0x25283e['name'],'resourceId':_0x25283e['id'],'type':_0x492eef[_0xa714('0x29')],'sectionId':_0x492eef['id']},{})[_0xa714('0x23')](function(){return _0x4f749b;});}else{return _0x4f749b;}})['catch'](function(_0x118e65){logger['error'](_0xa714('0x4f'),_0x118e65);throw _0x118e65;});}return _0x4f749b;})[_0xa714('0x23')](respondWithResult(_0x55423c,0xc9))[_0xa714('0x45')](handleError(_0x55423c,null));};exports[_0xa714('0x21')]=function(_0x5437f0,_0x30d57a){if(_0x5437f0['body']['id']){delete _0x5437f0[_0xa714('0x4a')]['id'];}return db[_0xa714('0x2c')]['find']({'where':{'id':_0x5437f0[_0xa714('0x47')]['id']}})[_0xa714('0x23')](handleEntityNotFound(_0x30d57a,null))[_0xa714('0x23')](saveUpdates(_0x5437f0['body'],null))[_0xa714('0x23')](respondWithResult(_0x30d57a,null))[_0xa714('0x45')](handleError(_0x30d57a,null));};exports[_0xa714('0x22')]=function(_0x4097b0,_0xf28338){return db[_0xa714('0x2c')][_0xa714('0x48')]({'where':{'id':_0x4097b0['params']['id']}})[_0xa714('0x23')](handleEntityNotFound(_0xf28338,null))[_0xa714('0x23')](removeEntity(_0xf28338,null))['catch'](handleError(_0xf28338,null));};exports[_0xa714('0x50')]=function(_0x3a48e3,_0x24ff5a,_0x58b8e9){var _0x23660c=require('../../config/schedule');return db[_0xa714('0x2c')][_0xa714('0x48')]({'where':{'id':_0x3a48e3['params']['id']},'raw':!![]})['then'](handleEntityNotFound(_0x24ff5a,null))['then'](function(){_0x23660c[_0xa714('0x50')](_0x3a48e3['params']['id']);})['then'](respondWithStatusCode(_0x24ff5a,null))[_0xa714('0x45')](handleError(_0x24ff5a,null));};
\ No newline at end of file
diff --git a/server/api/schedule/schedule.model.js b/server/api/schedule/schedule.model.js
index 0fd730e..2219fa5 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 _0x5122=['./schedule.attributes','exports','define','tools_schedules','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x199b1f,_0x4ed849){var _0x267ac9=function(_0x184ac6){while(--_0x184ac6){_0x199b1f['push'](_0x199b1f['shift']());}};_0x267ac9(++_0x4ed849);}(_0x5122,0x130));var _0x2512=function(_0x500711,_0x4c69ea){_0x500711=_0x500711-0x0;var _0x30efa2=_0x5122[_0x500711];return _0x30efa2;};'use strict';var _=require(_0x2512('0x0'));var util=require(_0x2512('0x1'));var logger=require(_0x2512('0x2'))('api');var moment=require(_0x2512('0x3'));var BPromise=require(_0x2512('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2512('0x5'));var rimraf=require(_0x2512('0x6'));var config=require(_0x2512('0x7'));var attributes=require(_0x2512('0x8'));module[_0x2512('0x9')]=function(_0x834f2d,_0x5a40b3){return _0x834f2d[_0x2512('0xa')]('Schedule',attributes,{'tableName':_0x2512('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x917f=['./schedule.attributes','define','Schedule','tools_schedules','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x23dcfb,_0x3e6283){var _0x51459b=function(_0x2823f9){while(--_0x2823f9){_0x23dcfb['push'](_0x23dcfb['shift']());}};_0x51459b(++_0x3e6283);}(_0x917f,0x9e));var _0xf917=function(_0x428f98,_0x3e2485){_0x428f98=_0x428f98-0x0;var _0x2bcf39=_0x917f[_0x428f98];return _0x2bcf39;};'use strict';var _=require(_0xf917('0x0'));var util=require(_0xf917('0x1'));var logger=require(_0xf917('0x2'))(_0xf917('0x3'));var moment=require(_0xf917('0x4'));var BPromise=require(_0xf917('0x5'));var rp=require(_0xf917('0x6'));var fs=require('fs');var path=require(_0xf917('0x7'));var rimraf=require(_0xf917('0x8'));var config=require(_0xf917('0x9'));var attributes=require(_0xf917('0xa'));module['exports']=function(_0xdc2a9c,_0xff3fc9){return _0xdc2a9c[_0xf917('0xb')](_0xf917('0xc'),attributes,{'tableName':_0xf917('0xd'),'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 c73def6..ff51cc1 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 _0xb986=['jayson/promise','http','request','then','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','Schedule,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x50b750,_0xe5817b){var _0x1b60a8=function(_0x23a6e8){while(--_0x23a6e8){_0x50b750['push'](_0x50b750['shift']());}};_0x1b60a8(++_0xe5817b);}(_0xb986,0xb7));var _0x6b98=function(_0xdb58c7,_0x1b5393){_0xdb58c7=_0xdb58c7-0x0;var _0xf5372d=_0xb986[_0xdb58c7];return _0xf5372d;};'use strict';var _=require(_0x6b98('0x0'));var util=require(_0x6b98('0x1'));var moment=require(_0x6b98('0x2'));var BPromise=require(_0x6b98('0x3'));var rs=require(_0x6b98('0x4'));var fs=require('fs');var Redis=require(_0x6b98('0x5'));var db=require(_0x6b98('0x6'))['db'];var utils=require(_0x6b98('0x7'));var logger=require(_0x6b98('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x6b98('0x9'));var client=jayson['client'][_0x6b98('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x55c8ad,_0x3fc00f,_0x57db29){return new BPromise(function(_0x599177,_0x31e64c){return client[_0x6b98('0xb')](_0x55c8ad,_0x57db29)[_0x6b98('0xc')](function(_0x3f2c6d){logger['info']('Schedule,\x20%s,\x20%s',_0x3fc00f,_0x6b98('0xd'));logger[_0x6b98('0xe')](_0x6b98('0xf'),_0x3fc00f,_0x6b98('0xd'),JSON[_0x6b98('0x10')](_0x3f2c6d));if(_0x3f2c6d[_0x6b98('0x11')]){if(_0x3f2c6d['error'][_0x6b98('0x12')]===0x1f4){logger[_0x6b98('0x11')](_0x6b98('0x13'),_0x3fc00f,_0x3f2c6d[_0x6b98('0x11')][_0x6b98('0x14')]);return _0x31e64c(_0x3f2c6d['error'][_0x6b98('0x14')]);}logger[_0x6b98('0x11')](_0x6b98('0x13'),_0x3fc00f,_0x3f2c6d[_0x6b98('0x11')][_0x6b98('0x14')]);return _0x599177(_0x3f2c6d[_0x6b98('0x11')]['message']);}else{logger[_0x6b98('0x15')](_0x6b98('0x13'),_0x3fc00f,_0x6b98('0xd'));_0x599177(_0x3f2c6d[_0x6b98('0x16')][_0x6b98('0x14')]);}})[_0x6b98('0x17')](function(_0x2171a2){logger[_0x6b98('0x11')](_0x6b98('0x13'),_0x3fc00f,_0x2171a2);_0x31e64c(_0x2171a2);});});}
\ No newline at end of file
+var _0xe522=['rpc','client','http','then','info','Schedule,\x20%s,\x20%s','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x4aaea7,_0x2f4598){var _0x4bae83=function(_0x511513){while(--_0x511513){_0x4aaea7['push'](_0x4aaea7['shift']());}};_0x4bae83(++_0x2f4598);}(_0xe522,0xf5));var _0x2e52=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0xe522[_0x1035c1];return _0x308d67;};'use strict';var _=require(_0x2e52('0x0'));var util=require(_0x2e52('0x1'));var moment=require(_0x2e52('0x2'));var BPromise=require(_0x2e52('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2e52('0x4'));var db=require(_0x2e52('0x5'))['db'];var utils=require(_0x2e52('0x6'));var logger=require('../../config/logger')(_0x2e52('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x2e52('0x8')][_0x2e52('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x452821,_0x4f6829,_0x136db7){return new BPromise(function(_0x32086c,_0x2f7ca6){return client['request'](_0x452821,_0x136db7)[_0x2e52('0xa')](function(_0x28974e){logger[_0x2e52('0xb')](_0x2e52('0xc'),_0x4f6829,_0x2e52('0xd'));logger[_0x2e52('0xe')](_0x2e52('0xf'),_0x4f6829,'request\x20sent',JSON[_0x2e52('0x10')](_0x28974e));if(_0x28974e[_0x2e52('0x11')]){if(_0x28974e[_0x2e52('0x11')][_0x2e52('0x12')]===0x1f4){logger[_0x2e52('0x11')](_0x2e52('0xc'),_0x4f6829,_0x28974e[_0x2e52('0x11')][_0x2e52('0x13')]);return _0x2f7ca6(_0x28974e['error'][_0x2e52('0x13')]);}logger[_0x2e52('0x11')](_0x2e52('0xc'),_0x4f6829,_0x28974e[_0x2e52('0x11')]['message']);return _0x32086c(_0x28974e['error'][_0x2e52('0x13')]);}else{logger[_0x2e52('0xb')](_0x2e52('0xc'),_0x4f6829,_0x2e52('0xd'));_0x32086c(_0x28974e[_0x2e52('0x14')]['message']);}})['catch'](function(_0x44e9cd){logger[_0x2e52('0x11')](_0x2e52('0xc'),_0x4f6829,_0x44e9cd);_0x2f7ca6(_0x44e9cd);});});}
\ No newline at end of file
diff --git a/server/api/screenRecording/index.js b/server/api/screenRecording/index.js
index 0bf6c74..e0905d3 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 _0xbb14=['show','/:id/download','post','create','put','/:id','update','delete','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','/describe','isAuthenticated'];(function(_0xb053,_0x92ad){var _0x127acb=function(_0x4eca9b){while(--_0x4eca9b){_0xb053['push'](_0xb053['shift']());}};_0x127acb(++_0x92ad);}(_0xbb14,0x1c0));var _0x4bb1=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0xbb14[_0x1ac595];return _0x455fff;};'use strict';var multer=require(_0x4bb1('0x0'));var util=require(_0x4bb1('0x1'));var path=require('path');var timeout=require(_0x4bb1('0x2'));var express=require(_0x4bb1('0x3'));var router=express[_0x4bb1('0x4')]();var auth=require(_0x4bb1('0x5'));var interaction=require(_0x4bb1('0x6'));var config=require(_0x4bb1('0x7'));var controller=require('./screenRecording.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x4bb1('0x8')]);router[_0x4bb1('0x9')](_0x4bb1('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x4bb1('0x9')]('/:id',auth[_0x4bb1('0xb')](),controller[_0x4bb1('0xc')]);router[_0x4bb1('0x9')](_0x4bb1('0xd'),auth[_0x4bb1('0xb')](),controller['download']);router[_0x4bb1('0xe')]('/',auth['isAuthenticated'](),controller[_0x4bb1('0xf')]);router[_0x4bb1('0x10')](_0x4bb1('0x11'),auth[_0x4bb1('0xb')](),controller[_0x4bb1('0x12')]);router[_0x4bb1('0x13')]('/:id',auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x0c5a=['index','/describe','show','/:id/download','download','post','create','put','update','delete','/:id','destroy','exports','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./screenRecording.controller','get','isAuthenticated'];(function(_0x4e82f3,_0x302c08){var _0x3a2f53=function(_0x4e8e16){while(--_0x4e8e16){_0x4e82f3['push'](_0x4e82f3['shift']());}};_0x3a2f53(++_0x302c08);}(_0x0c5a,0x1ab));var _0xa0c5=function(_0x2685a7,_0x450764){_0x2685a7=_0x2685a7-0x0;var _0x443d29=_0x0c5a[_0x2685a7];return _0x443d29;};'use strict';var multer=require('multer');var util=require(_0xa0c5('0x0'));var path=require(_0xa0c5('0x1'));var timeout=require(_0xa0c5('0x2'));var express=require(_0xa0c5('0x3'));var router=express[_0xa0c5('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xa0c5('0x5'));var config=require(_0xa0c5('0x6'));var controller=require(_0xa0c5('0x7'));router[_0xa0c5('0x8')]('/',auth[_0xa0c5('0x9')](),controller[_0xa0c5('0xa')]);router[_0xa0c5('0x8')](_0xa0c5('0xb'),auth[_0xa0c5('0x9')](),controller['describe']);router[_0xa0c5('0x8')]('/:id',auth[_0xa0c5('0x9')](),controller[_0xa0c5('0xc')]);router['get'](_0xa0c5('0xd'),auth[_0xa0c5('0x9')](),controller[_0xa0c5('0xe')]);router[_0xa0c5('0xf')]('/',auth[_0xa0c5('0x9')](),controller[_0xa0c5('0x10')]);router[_0xa0c5('0x11')]('/:id',auth[_0xa0c5('0x9')](),controller[_0xa0c5('0x12')]);router[_0xa0c5('0x13')](_0xa0c5('0x14'),auth[_0xa0c5('0x9')](),controller[_0xa0c5('0x15')]);module[_0xa0c5('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 cb9d692..bc54929 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 _0xb458=['STRING','replace','setDataValue','INTEGER','startedAt','closedAt','format','MM-DD-YYYY\x20HH:mm','DATE','toString','createdAt','updatedAt','sequelize','moment','path','VIRTUAL','getDataValue','value','extname'];(function(_0x1969a7,_0x5a133a){var _0x3d665f=function(_0x39c64b){while(--_0x39c64b){_0x1969a7['push'](_0x1969a7['shift']());}};_0x3d665f(++_0x5a133a);}(_0xb458,0x103));var _0x8b45=function(_0x1591a0,_0x110161){_0x1591a0=_0x1591a0-0x0;var _0x16590b=_0xb458[_0x1591a0];return _0x16590b;};'use strict';var Sequelize=require(_0x8b45('0x0'));var moment=require(_0x8b45('0x1'));var path=require(_0x8b45('0x2'));var config=require('../../config/environment');module['exports']={'format':{'type':Sequelize[_0x8b45('0x3')],'get':function(){return this[_0x8b45('0x4')](_0x8b45('0x5'))?path[_0x8b45('0x6')](this['getDataValue'](_0x8b45('0x5'))):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0x8b45('0x7')],'set':function(_0x12bd05){var _0x2daa9a=_0x12bd05[_0x8b45('0x8')](/\\/g,'/');this[_0x8b45('0x9')]('value',_0x2daa9a);}},'rating':{'type':Sequelize[_0x8b45('0xa')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x8b45('0xa')],'set':function(_0x33f30e){this[_0x8b45('0x9')](_0x8b45('0xb'),moment()['subtract'](_0x33f30e,'ms'));this[_0x8b45('0x9')](_0x8b45('0xc'),moment());this['setDataValue']('duration',_0x33f30e);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x8b45('0xb')))[_0x8b45('0xd')](_0x8b45('0xe'))['toString']();}},'closedAt':{'type':Sequelize[_0x8b45('0xf')],'get':function(){return moment(this[_0x8b45('0x4')](_0x8b45('0xc')))[_0x8b45('0xd')](_0x8b45('0xe'))[_0x8b45('0x10')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0x8b45('0x11')))[_0x8b45('0xd')](_0x8b45('0xe'))[_0x8b45('0x10')]();}},'updatedAt':{'type':Sequelize[_0x8b45('0xf')],'get':function(){return moment(this[_0x8b45('0x4')](_0x8b45('0x12')))[_0x8b45('0xd')](_0x8b45('0xe'))[_0x8b45('0x10')]();}}};
\ No newline at end of file
+var _0x8958=['INTEGER','setDataValue','startedAt','subtract','closedAt','DATE','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt','moment','getDataValue','extname','value','STRING','replace'];(function(_0x2f1762,_0xab43df){var _0x8ab21=function(_0xf6c1f5){while(--_0xf6c1f5){_0x2f1762['push'](_0x2f1762['shift']());}};_0x8ab21(++_0xab43df);}(_0x8958,0x93));var _0x8895=function(_0x5603f0,_0x47ba75){_0x5603f0=_0x5603f0-0x0;var _0x5a1f6a=_0x8958[_0x5603f0];return _0x5a1f6a;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x8895('0x0'));var path=require('path');var config=require('../../config/environment');module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x8895('0x1')]('value')?path[_0x8895('0x2')](this[_0x8895('0x1')](_0x8895('0x3'))):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x8895('0x4')]},'value':{'type':Sequelize[_0x8895('0x4')],'set':function(_0x124e1e){var _0x40cec6=_0x124e1e[_0x8895('0x5')](/\\/g,'/');this['setDataValue'](_0x8895('0x3'),_0x40cec6);}},'rating':{'type':Sequelize[_0x8895('0x6')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x8895('0x6')],'set':function(_0x24fe49){this[_0x8895('0x7')](_0x8895('0x8'),moment()[_0x8895('0x9')](_0x24fe49,'ms'));this[_0x8895('0x7')](_0x8895('0xa'),moment());this[_0x8895('0x7')]('duration',_0x24fe49);}},'startedAt':{'type':Sequelize[_0x8895('0xb')],'get':function(){return moment(this[_0x8895('0x1')](_0x8895('0x8')))[_0x8895('0xc')](_0x8895('0xd'))[_0x8895('0xe')]();}},'closedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x8895('0x1')](_0x8895('0xa')))[_0x8895('0xc')]('MM-DD-YYYY\x20HH:mm')['toString']();}},'createdAt':{'type':Sequelize[_0x8895('0xb')],'get':function(){return moment(this['getDataValue'](_0x8895('0xf')))[_0x8895('0xc')](_0x8895('0xd'))[_0x8895('0xe')]();}},'updatedAt':{'type':Sequelize[_0x8895('0xb')],'get':function(){return moment(this['getDataValue'](_0x8895('0x10')))[_0x8895('0xc')](_0x8895('0xd'))[_0x8895('0xe')]();}}};
\ No newline at end of file
diff --git a/server/api/screenRecording/screenRecording.controller.js b/server/api/screenRecording/screenRecording.controller.js
index d3d17da..5200873 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 _0x8692=['order','sort','filter','VIRTUAL','merge','options','where','count','findAll','rows','params','includeAll','find','catch','create','body','createdAt','describe','download','../../components/encryptor','uniqueid','server/files/screen_recordings','value','%s.cypher','existsSync','decryptFile','secrets','recording','join','root','Sequelize','ScreenRecording\x20not\x20found','filename','unlink','Not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','isNil','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','end','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','json','offset','limit','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','map','ScreenRecording','rawAttributes','type','model','differenceBy','format','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x5b4b93,_0x43e509){var _0x663462=function(_0x1f3e53){while(--_0x1f3e53){_0x5b4b93['push'](_0x5b4b93['shift']());}};_0x663462(++_0x43e509);}(_0x8692,0x1bb));var _0x2869=function(_0x19e084,_0x40860e){_0x19e084=_0x19e084-0x0;var _0x2f6f65=_0x8692[_0x19e084];return _0x2f6f65;};'use strict';var pdf=require(_0x2869('0x0'));var emlformat=require(_0x2869('0x1'));var rimraf=require(_0x2869('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2869('0x3'));var rp=require(_0x2869('0x4'));var moment=require(_0x2869('0x5'));var BPromise=require(_0x2869('0x6'));var Mustache=require(_0x2869('0x7'));var util=require(_0x2869('0x8'));var path=require(_0x2869('0x9'));var sox=require('sox');var csv=require(_0x2869('0xa'));var ejs=require(_0x2869('0xb'));var fs=require('fs');var _=require(_0x2869('0xc'));var squel=require(_0x2869('0xd'));var crypto=require(_0x2869('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x2869('0xa'));var querystring=require(_0x2869('0xf'));var Papa=require(_0x2869('0x10'));var Redis=require(_0x2869('0x11'));var authService=require(_0x2869('0x12'));var qs=require(_0x2869('0x13'));var as=require(_0x2869('0x14'));var hardwareService=require(_0x2869('0x15'));var logger=require(_0x2869('0x16'))('api');var utils=require('../../config/utils');var config=require(_0x2869('0x17'));var db=require(_0x2869('0x18'))['db'];function respondWithStatusCode(_0x4e5ae1,_0x544acd){_0x544acd=_0x544acd||0xcc;return function(_0x5d1323){if(_0x5d1323){return _0x4e5ae1[_0x2869('0x19')](_0x544acd);}return _0x4e5ae1[_0x2869('0x1a')](_0x544acd)['end']();};}function respondWithResult(_0x352d56,_0x3050ed){_0x3050ed=_0x3050ed||0xc8;return function(_0x31063a){if(_0x31063a){return _0x352d56['status'](_0x3050ed)[_0x2869('0x1b')](_0x31063a);}};}function respondWithFilteredResult(_0x1c30d3,_0xbe0723){return function(_0x3832a2){if(_0x3832a2){var _0x16ab71=_0x3832a2['count'],_0x3b27fa=_0xbe0723[_0x2869('0x1c')],_0x3b08e7=_0xbe0723[_0x2869('0x1c')]+_0xbe0723[_0x2869('0x1d')],_0x35ec95;if(_0x3b08e7>=_0x16ab71){_0x3b08e7=_0x16ab71;_0x35ec95=0xc8;}else{_0x35ec95=0xce;}_0x1c30d3[_0x2869('0x1a')](_0x35ec95);return _0x1c30d3[_0x2869('0x1e')](_0x2869('0x1f'),_0x3b27fa+'-'+_0x3b08e7+'/'+_0x16ab71)[_0x2869('0x1b')](_0x3832a2);}return null;};}function patchUpdates(_0x5d955a){return function(_0x39004f){try{jsonpatch[_0x2869('0x20')](_0x39004f,_0x5d955a,!![]);}catch(_0x580279){return BPromise['reject'](_0x580279);}return _0x39004f[_0x2869('0x21')]();};}function saveUpdates(_0x33a451,_0x5aa0cb){return function(_0x79b6d1){if(_0x79b6d1){return _0x79b6d1[_0x2869('0x22')](_0x33a451)[_0x2869('0x23')](function(_0x115172){return _0x115172;});}return null;};}function removeEntity(_0x4af143,_0x1282e2){return function(_0x2e69c6){if(_0x2e69c6){return _0x2e69c6[_0x2869('0x24')]()[_0x2869('0x23')](function(){_0x4af143[_0x2869('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1246c9,_0x53e8db){return function(_0x11214f){if(!_0x11214f){_0x1246c9['sendStatus'](0x194);}return _0x11214f;};}function handleError(_0x3379c3,_0x13b1da){_0x13b1da=_0x13b1da||0x1f4;return function(_0x10f157){logger[_0x2869('0x25')](_0x10f157[_0x2869('0x26')]);if(_0x10f157[_0x2869('0x27')]){delete _0x10f157[_0x2869('0x27')];}_0x3379c3[_0x2869('0x1a')](_0x13b1da)[_0x2869('0x28')](_0x10f157);};}exports['index']=function(_0x1d666f,_0x3ee18d){var _0x720b7e={},_0x3663f3={},_0x2d9f10={'count':0x0,'rows':[]};var _0x42acd3=_[_0x2869('0x29')](db[_0x2869('0x2a')][_0x2869('0x2b')],function(_0x3a0a60){return{'name':_0x3a0a60['fieldName'],'type':_0x3a0a60[_0x2869('0x2c')]['key']};});_0x3663f3[_0x2869('0x2d')]=_[_0x2869('0x2e')](_[_0x2869('0x29')](_0x42acd3,'name'),[_0x2869('0x2f')]);_0x3663f3[_0x2869('0x30')]=_[_0x2869('0x31')](_0x1d666f[_0x2869('0x30')]);_0x3663f3[_0x2869('0x32')]=_[_0x2869('0x33')](_0x3663f3[_0x2869('0x2d')],_0x3663f3['query']);_0x720b7e[_0x2869('0x34')]=_['intersection'](_0x3663f3[_0x2869('0x2d')],qs[_0x2869('0x35')](_0x1d666f[_0x2869('0x30')]['fields']));_0x720b7e[_0x2869('0x34')]=_0x720b7e['attributes'][_0x2869('0x36')]?_0x720b7e[_0x2869('0x34')]:_0x3663f3[_0x2869('0x2d')];if(!_0x1d666f[_0x2869('0x30')][_0x2869('0x37')](_0x2869('0x38'))){_0x720b7e['limit']=qs[_0x2869('0x1d')](_0x1d666f[_0x2869('0x30')][_0x2869('0x1d')]);_0x720b7e[_0x2869('0x1c')]=qs[_0x2869('0x1c')](_0x1d666f[_0x2869('0x30')][_0x2869('0x1c')]);}_0x720b7e[_0x2869('0x39')]=qs[_0x2869('0x3a')](_0x1d666f[_0x2869('0x30')][_0x2869('0x3a')]);_0x720b7e['where']=qs['filters'](_['pick'](_0x1d666f['query'],_0x3663f3[_0x2869('0x32')]));if(_0x1d666f['query'][_0x2869('0x3b')]){_0x720b7e['where']=_['merge'](_0x720b7e['where'],{'$or':_[_0x2869('0x29')](_0x42acd3,function(_0x261ee2){if(_0x261ee2[_0x2869('0x2c')]!==_0x2869('0x3c')){var _0x1fc3ae={};_0x1fc3ae[_0x261ee2['name']]={'$like':'%'+_0x1d666f[_0x2869('0x30')][_0x2869('0x3b')]+'%'};return _0x1fc3ae;}})});}_0x720b7e=_[_0x2869('0x3d')]({},_0x720b7e,_0x1d666f[_0x2869('0x3e')]);var _0x3575c4={'where':_0x720b7e[_0x2869('0x3f')]};return db[_0x2869('0x2a')]['count'](_0x3575c4)[_0x2869('0x23')](function(_0x119443){_0x2d9f10[_0x2869('0x40')]=_0x119443;if(_0x1d666f[_0x2869('0x30')]['includeAll']){_0x720b7e['include']=[{'all':!![]}];}return db['ScreenRecording'][_0x2869('0x41')](_0x720b7e);})[_0x2869('0x23')](function(_0x8dc3bc){_0x2d9f10[_0x2869('0x42')]=_0x8dc3bc;return _0x2d9f10;})[_0x2869('0x23')](respondWithFilteredResult(_0x3ee18d,_0x720b7e))['catch'](handleError(_0x3ee18d,null));};exports['show']=function(_0x251612,_0x13d507){var _0x3a70a5={'raw':![],'where':{'id':_0x251612[_0x2869('0x43')]['id']}},_0x39c563={};_0x39c563['model']=_[_0x2869('0x31')](db[_0x2869('0x2a')][_0x2869('0x2b')]);_0x39c563[_0x2869('0x30')]=_[_0x2869('0x31')](_0x251612[_0x2869('0x30')]);_0x39c563[_0x2869('0x32')]=_['intersection'](_0x39c563[_0x2869('0x2d')],_0x39c563[_0x2869('0x30')]);_0x3a70a5[_0x2869('0x34')]=_['intersection'](_0x39c563['model'],qs[_0x2869('0x35')](_0x251612['query'][_0x2869('0x35')]));_0x3a70a5[_0x2869('0x34')]=_0x3a70a5['attributes'][_0x2869('0x36')]?_0x3a70a5['attributes']:_0x39c563[_0x2869('0x2d')];if(_0x251612[_0x2869('0x30')][_0x2869('0x44')]){_0x3a70a5['include']=[{'all':!![]}];}_0x3a70a5=_[_0x2869('0x3d')]({},_0x3a70a5,_0x251612[_0x2869('0x3e')]);return db['ScreenRecording'][_0x2869('0x45')](_0x3a70a5)[_0x2869('0x23')](handleEntityNotFound(_0x13d507,null))[_0x2869('0x23')](respondWithResult(_0x13d507,null))[_0x2869('0x46')](handleError(_0x13d507,null));};exports[_0x2869('0x47')]=function(_0x1719b2,_0x3976f6){return db[_0x2869('0x2a')][_0x2869('0x47')](_0x1719b2[_0x2869('0x48')],{})[_0x2869('0x23')](respondWithResult(_0x3976f6,0xc9))[_0x2869('0x46')](handleError(_0x3976f6,null));};exports['update']=function(_0x284455,_0x1962e5){if(_0x284455[_0x2869('0x48')]['id']){delete _0x284455[_0x2869('0x48')]['id'];}delete _0x284455[_0x2869('0x48')]['duration'];delete _0x284455['body'][_0x2869('0x49')];delete _0x284455[_0x2869('0x48')]['closedAt'];delete _0x284455[_0x2869('0x48')]['value'];return db[_0x2869('0x2a')][_0x2869('0x45')]({'where':{'id':_0x284455[_0x2869('0x43')]['id']}})['then'](handleEntityNotFound(_0x1962e5,null))[_0x2869('0x23')](saveUpdates(_0x284455[_0x2869('0x48')],null))[_0x2869('0x23')](respondWithResult(_0x1962e5,null))[_0x2869('0x46')](handleError(_0x1962e5,null));};exports['describe']=function(_0x51ccaa,_0x395484){return db[_0x2869('0x2a')][_0x2869('0x4a')]()['then'](respondWithResult(_0x395484,null))[_0x2869('0x46')](handleError(_0x395484,null));};exports[_0x2869('0x4b')]=function(_0x72deb0,_0x305e1f,_0x27e238){var _0x20cf42=require(_0x2869('0x4c'));var _0x2b9902=![];var _0x425b9b={};if(_0x72deb0[_0x2869('0x30')][_0x2869('0x2c')]&&_0x72deb0['query'][_0x2869('0x2c')]==='uniqueid'){_0x425b9b[_0x2869('0x4d')]=_0x72deb0['params']['id'];}else{_0x425b9b['id']=_0x72deb0[_0x2869('0x43')]['id'];}return db[_0x2869('0x2a')][_0x2869('0x45')]({'where':_0x425b9b,'attributes':['id','value'],'raw':!![]})[_0x2869('0x23')](handleEntityNotFound(_0x305e1f,null))[_0x2869('0x23')](function(_0x2a2c06){if(_0x2a2c06){var _0x39fecc=path['join'](config['root'],_0x2869('0x4e'),_0x2a2c06[_0x2869('0x4f')]);var _0x163bda=util[_0x2869('0x2f')](_0x2869('0x50'),_0x39fecc);if(fs[_0x2869('0x51')](_0x163bda)){_0x2b9902=!![];return _0x20cf42[_0x2869('0x52')](_0x163bda,_0x39fecc,config[_0x2869('0x53')][_0x2869('0x54')])[_0x2869('0x23')](function(){return _0x2a2c06;});}return _0x2a2c06;}})[_0x2869('0x23')](function(_0x2504dc){if(_0x2504dc){var _0x2ccd51=path[_0x2869('0x55')](config[_0x2869('0x56')],_0x2869('0x4e'),_0x2504dc[_0x2869('0x4f')]);if(!fs[_0x2869('0x51')](_0x2ccd51)){throw new db[(_0x2869('0x57'))]['ValidationError'](_0x2869('0x58'));}if(_0x2504dc[_0x2869('0x59')]){return _0x305e1f['download'](_0x2ccd51,_0x2504dc[_0x2869('0x59')]+path['extname'](_0x2ccd51),function(){if(_0x2b9902){fs[_0x2869('0x5a')](_0x2ccd51);}});}else{return _0x305e1f[_0x2869('0x4b')](_0x2ccd51,function(_0x2f78a5){if(_0x2b9902){fs[_0x2869('0x5a')](_0x2ccd51);}});}}})[_0x2869('0x46')](function(_0x523ff6){if(_0x523ff6['message']===_0x2869('0x58')){_0x305e1f[_0x2869('0x1a')](0x194)[_0x2869('0x28')](_0x2869('0x5b'));}else{return handleError(_0x305e1f,null);}});};exports['destroy']=function(_0x22f90e,_0x5f11ad){return db[_0x2869('0x2a')][_0x2869('0x45')]({'where':{'id':_0x22f90e[_0x2869('0x43')]['id']}})['then'](function(_0x36417c){if(!_0x36417c)throw new ReferenceError('Entity\x20not\x20found');return _0x36417c;})['then'](function(_0xf6ca29){var _0x42f7a1=path['join'](config['root'],_0x2869('0x4e'),_0xf6ca29['value']);logger[_0x2869('0x5c')](_0x2869('0x5d'),_0x42f7a1);if(!_[_0x2869('0x5e')](_0xf6ca29[_0x2869('0x4f')])&&fs['existsSync'](_0x42f7a1)){logger[_0x2869('0x5c')](_0x2869('0x5f')+_0x42f7a1+_0x2869('0x60'));fs[_0x2869('0x61')](_0x42f7a1);}_0x42f7a1=_0x42f7a1+_0x2869('0x62');if(!_[_0x2869('0x5e')](_0xf6ca29[_0x2869('0x4f')])&&fs[_0x2869('0x51')](_0x42f7a1)){logger[_0x2869('0x5c')](_0x2869('0x5f')+_0x42f7a1+_0x2869('0x60'));fs['unlinkSync'](_0x42f7a1);}return _0xf6ca29;})[_0x2869('0x23')](function(_0x255360){if(!_0x255360)throw new InternalError();return _0x255360['destroy']();})[_0x2869('0x23')](function(){_0x5f11ad['status'](0xcc)[_0x2869('0x63')]();})['catch'](handleError(_0x5f11ad,null));};
\ No newline at end of file
+var _0x979a=['../../config/environment','sendStatus','status','end','count','offset','limit','set','Content-Range','json','reject','save','update','then','destroy','error','stack','name','send','index','map','ScreenRecording','fieldName','key','differenceBy','format','query','keys','filters','intersection','model','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','VIRTUAL','merge','options','include','findAll','rows','show','rawAttributes','fields','includeAll','find','catch','create','body','duration','closedAt','value','params','describe','download','uniqueid','root','server/files/screen_recordings','existsSync','decryptFile','recording','join','filename','unlink','message','Not\x20found','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','isNil','File:\x20\x22','html-pdf','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../config/license/hardware','api','../../config/utils'];(function(_0x5da27f,_0x504b76){var _0x54a3fb=function(_0x3b65a8){while(--_0x3b65a8){_0x5da27f['push'](_0x5da27f['shift']());}};_0x54a3fb(++_0x504b76);}(_0x979a,0x17c));var _0xa979=function(_0x3ae812,_0x57767f){_0x3ae812=_0x3ae812-0x0;var _0x3f6639=_0x979a[_0x3ae812];return _0x3f6639;};'use strict';var pdf=require(_0xa979('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xa979('0x1'));var zipdir=require(_0xa979('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xa979('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xa979('0x4'));var util=require(_0xa979('0x5'));var path=require(_0xa979('0x6'));var sox=require(_0xa979('0x7'));var csv=require(_0xa979('0x8'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xa979('0x9'));var squel=require(_0xa979('0xa'));var crypto=require(_0xa979('0xb'));var jsforce=require(_0xa979('0xc'));var deskjs=require(_0xa979('0xd'));var toCsv=require(_0xa979('0x8'));var querystring=require(_0xa979('0xe'));var Papa=require(_0xa979('0xf'));var Redis=require('ioredis');var authService=require(_0xa979('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa979('0x11'));var logger=require('../../config/logger')(_0xa979('0x12'));var utils=require(_0xa979('0x13'));var config=require(_0xa979('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x6e7632,_0x7254fa){_0x7254fa=_0x7254fa||0xcc;return function(_0x399b64){if(_0x399b64){return _0x6e7632[_0xa979('0x15')](_0x7254fa);}return _0x6e7632[_0xa979('0x16')](_0x7254fa)[_0xa979('0x17')]();};}function respondWithResult(_0x32ae20,_0x1763a7){_0x1763a7=_0x1763a7||0xc8;return function(_0x2d2f0b){if(_0x2d2f0b){return _0x32ae20['status'](_0x1763a7)['json'](_0x2d2f0b);}};}function respondWithFilteredResult(_0x1ee766,_0x782082){return function(_0x2b2775){if(_0x2b2775){var _0x219fc4=_0x2b2775[_0xa979('0x18')],_0x8940a=_0x782082[_0xa979('0x19')],_0x3eedf0=_0x782082[_0xa979('0x19')]+_0x782082[_0xa979('0x1a')],_0x15e72d;if(_0x3eedf0>=_0x219fc4){_0x3eedf0=_0x219fc4;_0x15e72d=0xc8;}else{_0x15e72d=0xce;}_0x1ee766['status'](_0x15e72d);return _0x1ee766[_0xa979('0x1b')](_0xa979('0x1c'),_0x8940a+'-'+_0x3eedf0+'/'+_0x219fc4)[_0xa979('0x1d')](_0x2b2775);}return null;};}function patchUpdates(_0x4ca754){return function(_0x3e0c02){try{jsonpatch['apply'](_0x3e0c02,_0x4ca754,!![]);}catch(_0x22c558){return BPromise[_0xa979('0x1e')](_0x22c558);}return _0x3e0c02[_0xa979('0x1f')]();};}function saveUpdates(_0x2b9fd7,_0x250c8e){return function(_0x31027a){if(_0x31027a){return _0x31027a[_0xa979('0x20')](_0x2b9fd7)[_0xa979('0x21')](function(_0x311555){return _0x311555;});}return null;};}function removeEntity(_0x1c548c,_0x47b823){return function(_0x289ec7){if(_0x289ec7){return _0x289ec7[_0xa979('0x22')]()[_0xa979('0x21')](function(){_0x1c548c[_0xa979('0x16')](0xcc)[_0xa979('0x17')]();});}};}function handleEntityNotFound(_0x388ee4,_0x1c0f64){return function(_0x372614){if(!_0x372614){_0x388ee4[_0xa979('0x15')](0x194);}return _0x372614;};}function handleError(_0x251a49,_0x114d1d){_0x114d1d=_0x114d1d||0x1f4;return function(_0x30c2e3){logger[_0xa979('0x23')](_0x30c2e3[_0xa979('0x24')]);if(_0x30c2e3[_0xa979('0x25')]){delete _0x30c2e3[_0xa979('0x25')];}_0x251a49[_0xa979('0x16')](_0x114d1d)[_0xa979('0x26')](_0x30c2e3);};}exports[_0xa979('0x27')]=function(_0x1519f9,_0x59e61f){var _0x2d747c={},_0x1eaa3d={},_0x4ee825={'count':0x0,'rows':[]};var _0x546671=_[_0xa979('0x28')](db[_0xa979('0x29')]['rawAttributes'],function(_0x4b9342){return{'name':_0x4b9342[_0xa979('0x2a')],'type':_0x4b9342['type'][_0xa979('0x2b')]};});_0x1eaa3d['model']=_[_0xa979('0x2c')](_[_0xa979('0x28')](_0x546671,_0xa979('0x25')),[_0xa979('0x2d')]);_0x1eaa3d[_0xa979('0x2e')]=_[_0xa979('0x2f')](_0x1519f9[_0xa979('0x2e')]);_0x1eaa3d[_0xa979('0x30')]=_[_0xa979('0x31')](_0x1eaa3d[_0xa979('0x32')],_0x1eaa3d[_0xa979('0x2e')]);_0x2d747c[_0xa979('0x33')]=_[_0xa979('0x31')](_0x1eaa3d[_0xa979('0x32')],qs['fields'](_0x1519f9['query']['fields']));_0x2d747c[_0xa979('0x33')]=_0x2d747c[_0xa979('0x33')][_0xa979('0x34')]?_0x2d747c[_0xa979('0x33')]:_0x1eaa3d[_0xa979('0x32')];if(!_0x1519f9['query'][_0xa979('0x35')](_0xa979('0x36'))){_0x2d747c[_0xa979('0x1a')]=qs[_0xa979('0x1a')](_0x1519f9[_0xa979('0x2e')][_0xa979('0x1a')]);_0x2d747c[_0xa979('0x19')]=qs[_0xa979('0x19')](_0x1519f9[_0xa979('0x2e')]['offset']);}_0x2d747c[_0xa979('0x37')]=qs[_0xa979('0x38')](_0x1519f9[_0xa979('0x2e')][_0xa979('0x38')]);_0x2d747c[_0xa979('0x39')]=qs['filters'](_[_0xa979('0x3a')](_0x1519f9[_0xa979('0x2e')],_0x1eaa3d[_0xa979('0x30')]));if(_0x1519f9[_0xa979('0x2e')][_0xa979('0x3b')]){_0x2d747c[_0xa979('0x39')]=_['merge'](_0x2d747c[_0xa979('0x39')],{'$or':_[_0xa979('0x28')](_0x546671,function(_0x177ff4){if(_0x177ff4[_0xa979('0x3c')]!==_0xa979('0x3d')){var _0x352c08={};_0x352c08[_0x177ff4[_0xa979('0x25')]]={'$like':'%'+_0x1519f9[_0xa979('0x2e')]['filter']+'%'};return _0x352c08;}})});}_0x2d747c=_[_0xa979('0x3e')]({},_0x2d747c,_0x1519f9[_0xa979('0x3f')]);var _0x3b88de={'where':_0x2d747c[_0xa979('0x39')]};return db[_0xa979('0x29')][_0xa979('0x18')](_0x3b88de)[_0xa979('0x21')](function(_0x5e6bbf){_0x4ee825[_0xa979('0x18')]=_0x5e6bbf;if(_0x1519f9[_0xa979('0x2e')]['includeAll']){_0x2d747c[_0xa979('0x40')]=[{'all':!![]}];}return db[_0xa979('0x29')][_0xa979('0x41')](_0x2d747c);})[_0xa979('0x21')](function(_0x5ec28a){_0x4ee825[_0xa979('0x42')]=_0x5ec28a;return _0x4ee825;})['then'](respondWithFilteredResult(_0x59e61f,_0x2d747c))['catch'](handleError(_0x59e61f,null));};exports[_0xa979('0x43')]=function(_0x3a7527,_0x56ea63){var _0x194c13={'raw':![],'where':{'id':_0x3a7527['params']['id']}},_0xca0b62={};_0xca0b62[_0xa979('0x32')]=_[_0xa979('0x2f')](db[_0xa979('0x29')][_0xa979('0x44')]);_0xca0b62[_0xa979('0x2e')]=_[_0xa979('0x2f')](_0x3a7527[_0xa979('0x2e')]);_0xca0b62[_0xa979('0x30')]=_[_0xa979('0x31')](_0xca0b62['model'],_0xca0b62['query']);_0x194c13['attributes']=_[_0xa979('0x31')](_0xca0b62['model'],qs['fields'](_0x3a7527[_0xa979('0x2e')][_0xa979('0x45')]));_0x194c13[_0xa979('0x33')]=_0x194c13[_0xa979('0x33')][_0xa979('0x34')]?_0x194c13[_0xa979('0x33')]:_0xca0b62[_0xa979('0x32')];if(_0x3a7527['query'][_0xa979('0x46')]){_0x194c13[_0xa979('0x40')]=[{'all':!![]}];}_0x194c13=_['merge']({},_0x194c13,_0x3a7527[_0xa979('0x3f')]);return db['ScreenRecording'][_0xa979('0x47')](_0x194c13)['then'](handleEntityNotFound(_0x56ea63,null))['then'](respondWithResult(_0x56ea63,null))[_0xa979('0x48')](handleError(_0x56ea63,null));};exports[_0xa979('0x49')]=function(_0x1b8845,_0x448af8){return db[_0xa979('0x29')]['create'](_0x1b8845['body'],{})['then'](respondWithResult(_0x448af8,0xc9))[_0xa979('0x48')](handleError(_0x448af8,null));};exports[_0xa979('0x20')]=function(_0x4b536e,_0x77e56d){if(_0x4b536e['body']['id']){delete _0x4b536e['body']['id'];}delete _0x4b536e[_0xa979('0x4a')][_0xa979('0x4b')];delete _0x4b536e[_0xa979('0x4a')]['createdAt'];delete _0x4b536e['body'][_0xa979('0x4c')];delete _0x4b536e['body'][_0xa979('0x4d')];return db[_0xa979('0x29')][_0xa979('0x47')]({'where':{'id':_0x4b536e[_0xa979('0x4e')]['id']}})['then'](handleEntityNotFound(_0x77e56d,null))['then'](saveUpdates(_0x4b536e['body'],null))['then'](respondWithResult(_0x77e56d,null))[_0xa979('0x48')](handleError(_0x77e56d,null));};exports[_0xa979('0x4f')]=function(_0x16817d,_0x22e85a){return db['ScreenRecording'][_0xa979('0x4f')]()[_0xa979('0x21')](respondWithResult(_0x22e85a,null))[_0xa979('0x48')](handleError(_0x22e85a,null));};exports[_0xa979('0x50')]=function(_0x3c1a7e,_0x20cb8a,_0x32c8df){var _0x379e0b=require('../../components/encryptor');var _0x580edc=![];var _0x4c0823={};if(_0x3c1a7e[_0xa979('0x2e')][_0xa979('0x3c')]&&_0x3c1a7e[_0xa979('0x2e')][_0xa979('0x3c')]===_0xa979('0x51')){_0x4c0823[_0xa979('0x51')]=_0x3c1a7e[_0xa979('0x4e')]['id'];}else{_0x4c0823['id']=_0x3c1a7e[_0xa979('0x4e')]['id'];}return db[_0xa979('0x29')][_0xa979('0x47')]({'where':_0x4c0823,'attributes':['id','value'],'raw':!![]})[_0xa979('0x21')](handleEntityNotFound(_0x20cb8a,null))['then'](function(_0x28f6cb){if(_0x28f6cb){var _0x3f560d=path['join'](config[_0xa979('0x52')],_0xa979('0x53'),_0x28f6cb[_0xa979('0x4d')]);var _0x178de4=util[_0xa979('0x2d')]('%s.cypher',_0x3f560d);if(fs[_0xa979('0x54')](_0x178de4)){_0x580edc=!![];return _0x379e0b[_0xa979('0x55')](_0x178de4,_0x3f560d,config['secrets'][_0xa979('0x56')])[_0xa979('0x21')](function(){return _0x28f6cb;});}return _0x28f6cb;}})[_0xa979('0x21')](function(_0x21cf28){if(_0x21cf28){var _0x22f87c=path[_0xa979('0x57')](config[_0xa979('0x52')],_0xa979('0x53'),_0x21cf28[_0xa979('0x4d')]);if(!fs[_0xa979('0x54')](_0x22f87c)){throw new db['Sequelize']['ValidationError']('ScreenRecording\x20not\x20found');}if(_0x21cf28[_0xa979('0x58')]){return _0x20cb8a[_0xa979('0x50')](_0x22f87c,_0x21cf28[_0xa979('0x58')]+path['extname'](_0x22f87c),function(){if(_0x580edc){fs[_0xa979('0x59')](_0x22f87c);}});}else{return _0x20cb8a[_0xa979('0x50')](_0x22f87c,function(_0x5984a1){if(_0x580edc){fs[_0xa979('0x59')](_0x22f87c);}});}}})[_0xa979('0x48')](function(_0x26f3a9){if(_0x26f3a9[_0xa979('0x5a')]==='ScreenRecording\x20not\x20found'){_0x20cb8a[_0xa979('0x16')](0x194)['send'](_0xa979('0x5b'));}else{return handleError(_0x20cb8a,null);}});};exports['destroy']=function(_0x84ca3c,_0x4c175e){return db[_0xa979('0x29')][_0xa979('0x47')]({'where':{'id':_0x84ca3c[_0xa979('0x4e')]['id']}})[_0xa979('0x21')](function(_0x5326ab){if(!_0x5326ab)throw new ReferenceError(_0xa979('0x5c'));return _0x5326ab;})[_0xa979('0x21')](function(_0x5a743a){var _0x548128=path[_0xa979('0x57')](config[_0xa979('0x52')],_0xa979('0x53'),_0x5a743a[_0xa979('0x4d')]);logger[_0xa979('0x5d')](_0xa979('0x5e'),_0x548128);if(!_['isNil'](_0x5a743a[_0xa979('0x4d')])&&fs[_0xa979('0x54')](_0x548128)){logger['info']('File:\x20\x22'+_0x548128+_0xa979('0x5f'));fs[_0xa979('0x60')](_0x548128);}_0x548128=_0x548128+_0xa979('0x61');if(!_[_0xa979('0x62')](_0x5a743a[_0xa979('0x4d')])&&fs[_0xa979('0x54')](_0x548128)){logger['info'](_0xa979('0x63')+_0x548128+_0xa979('0x5f'));fs[_0xa979('0x60')](_0x548128);}return _0x5a743a;})[_0xa979('0x21')](function(_0x3512e3){if(!_0x3512e3)throw new InternalError();return _0x3512e3[_0xa979('0x22')]();})['then'](function(){_0x4c175e[_0xa979('0x16')](0xcc)[_0xa979('0x17')]();})[_0xa979('0x48')](handleError(_0x4c175e,null));};
\ No newline at end of file
diff --git a/server/api/screenRecording/screenRecording.model.js b/server/api/screenRecording/screenRecording.model.js
index 213f3bf..803698d 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 _0xedfb=['path','rimraf','../../config/environment','./screenRecording.attributes','exports','define','ScreenRecording','interactionid','lodash','api','moment','bluebird','request-promise'];(function(_0x3633e3,_0x4bb4ab){var _0x20026c=function(_0x179743){while(--_0x179743){_0x3633e3['push'](_0x3633e3['shift']());}};_0x20026c(++_0x4bb4ab);}(_0xedfb,0x174));var _0xbedf=function(_0x3194e3,_0x125eb3){_0x3194e3=_0x3194e3-0x0;var _0x3e1f94=_0xedfb[_0x3194e3];return _0x3e1f94;};'use strict';var _=require(_0xbedf('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xbedf('0x1'));var moment=require(_0xbedf('0x2'));var BPromise=require(_0xbedf('0x3'));var rp=require(_0xbedf('0x4'));var fs=require('fs');var path=require(_0xbedf('0x5'));var rimraf=require(_0xbedf('0x6'));var config=require(_0xbedf('0x7'));var attributes=require(_0xbedf('0x8'));module[_0xbedf('0x9')]=function(_0x63f18b,_0x583d34){return _0x63f18b[_0xbedf('0xa')](_0xbedf('0xb'),attributes,{'tableName':'screen_recordings','paranoid':![],'indexes':[{'name':'interactionid','fields':[_0xbedf('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xddaf=['api','moment','path','rimraf','../../config/environment','./screenRecording.attributes','exports','define','ScreenRecording','screen_recordings','interactionid','lodash','util','../../config/logger'];(function(_0x22d606,_0x274cdd){var _0x2b03d0=function(_0x4aa4d7){while(--_0x4aa4d7){_0x22d606['push'](_0x22d606['shift']());}};_0x2b03d0(++_0x274cdd);}(_0xddaf,0x15b));var _0xfdda=function(_0x1f6c20,_0x12bd9e){_0x1f6c20=_0x1f6c20-0x0;var _0x1ab1e9=_0xddaf[_0x1f6c20];return _0x1ab1e9;};'use strict';var _=require(_0xfdda('0x0'));var util=require(_0xfdda('0x1'));var logger=require(_0xfdda('0x2'))(_0xfdda('0x3'));var moment=require(_0xfdda('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xfdda('0x5'));var rimraf=require(_0xfdda('0x6'));var config=require(_0xfdda('0x7'));var attributes=require(_0xfdda('0x8'));module[_0xfdda('0x9')]=function(_0x455dba,_0x5ddbc1){return _0x455dba[_0xfdda('0xa')](_0xfdda('0xb'),attributes,{'tableName':_0xfdda('0xc'),'paranoid':![],'indexes':[{'name':_0xfdda('0xd'),'fields':[_0xfdda('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/screenRecording/screenRecording.rpc.js b/server/api/screenRecording/screenRecording.rpc.js
index 675b735..eccbb64 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 _0xa9e0=['http','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','debug','ScreenRecording,\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(_0x2cd072,_0x311aca){var _0x3ec46f=function(_0x252aba){while(--_0x252aba){_0x2cd072['push'](_0x2cd072['shift']());}};_0x3ec46f(++_0x311aca);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xa9e0[_0x5ddb1c];return _0x354adc;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','ScreenRecording,\x20%s,\x20%s','request\x20sent','debug','ScreenRecording,\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(_0x20c9ce,_0x428ee7){var _0xd158a1=function(_0x9db3c4){while(--_0x9db3c4){_0x20c9ce['push'](_0x20c9ce['shift']());}};_0xd158a1(++_0x428ee7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3e112d,_0x2bb132){_0x3e112d=_0x3e112d-0x0;var _0x531c31=_0xa9e0[_0x3e112d];return _0x531c31;};'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/setting/index.js b/server/api/setting/index.js
index fd5a4c6..828e557 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 _0xaf27=['server/files/images/logos/','addFavicon','put','/:id','update','exports','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','/:id/logo','getLogoLogin','/:id/gdpr','/:id/preferred','/:id/favicon','getFavicon','diskStorage','root','format','extname','single','file','%s%s','originalname','/:id/logo_login','addLogoLogin','join','preferred','post'];(function(_0x24eb28,_0x263f3e){var _0x241634=function(_0x108f18){while(--_0x108f18){_0x24eb28['push'](_0x24eb28['shift']());}};_0x241634(++_0x263f3e);}(_0xaf27,0x102));var _0x7af2=function(_0x3050b5,_0x182c6a){_0x3050b5=_0x3050b5-0x0;var _0x37cceb=_0xaf27[_0x3050b5];return _0x37cceb;};'use strict';var multer=require('multer');var util=require(_0x7af2('0x0'));var path=require(_0x7af2('0x1'));var timeout=require(_0x7af2('0x2'));var express=require('express');var router=express[_0x7af2('0x3')]();var auth=require(_0x7af2('0x4'));var interaction=require(_0x7af2('0x5'));var config=require(_0x7af2('0x6'));var controller=require('./setting.controller');router[_0x7af2('0x7')]('/',auth[_0x7af2('0x8')](),controller[_0x7af2('0x9')]);router[_0x7af2('0x7')]('/:id',controller[_0x7af2('0xa')]);router[_0x7af2('0x7')](_0x7af2('0xb'),controller['getLogo']);router[_0x7af2('0x7')]('/:id/logo_login',controller[_0x7af2('0xc')]);router[_0x7af2('0x7')](_0x7af2('0xd'),controller['gdpr']);router['get'](_0x7af2('0xe'),controller['getPreferred']);router['get'](_0x7af2('0xf'),controller[_0x7af2('0x10')]);var upload=multer({'storage':multer[_0x7af2('0x11')]({'destination':function(_0x4dfcb6,_0x2ec08c,_0xa9e4d7){_0xa9e4d7(null,path['join'](config[_0x7af2('0x12')],'server/files/images/logos/'));},'filename':function(_0x3fb087,_0x54a43f,_0x98c8e7){_0x98c8e7(null,util[_0x7af2('0x13')]('%s%s','logo',path[_0x7af2('0x14')](_0x54a43f['originalname'])));}})});router['post'](_0x7af2('0xb'),upload[_0x7af2('0x15')](_0x7af2('0x16')),controller['addLogo']);var upload=multer({'storage':multer[_0x7af2('0x11')]({'destination':function(_0x11a51c,_0x32c8ec,_0x11d1f9){_0x11d1f9(null,path['join'](config[_0x7af2('0x12')],'server/files/images/logos/'));},'filename':function(_0x3c96e0,_0x49db93,_0x457fa2){_0x457fa2(null,util[_0x7af2('0x13')](_0x7af2('0x17'),'logologin',path['extname'](_0x49db93[_0x7af2('0x18')])));}})});router['post'](_0x7af2('0x19'),upload[_0x7af2('0x15')](_0x7af2('0x16')),controller[_0x7af2('0x1a')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5cc4ae,_0x17cbd7,_0x539de0){_0x539de0(null,path[_0x7af2('0x1b')](config[_0x7af2('0x12')],'server/files/images/logos/'));},'filename':function(_0x164227,_0x37f2a5,_0x5a5cfd){_0x5a5cfd(null,util[_0x7af2('0x13')](_0x7af2('0x17'),_0x7af2('0x1c'),path[_0x7af2('0x14')](_0x37f2a5[_0x7af2('0x18')])));}})});router[_0x7af2('0x1d')]('/:id/preferred',upload[_0x7af2('0x15')](_0x7af2('0x16')),controller['addPreferred']);var upload=multer({'storage':multer[_0x7af2('0x11')]({'destination':function(_0xb97c8f,_0x5d989d,_0x280d9a){_0x280d9a(null,path[_0x7af2('0x1b')](config['root'],_0x7af2('0x1e')));},'filename':function(_0x1d6731,_0x29d78f,_0x1cc979){_0x1cc979(null,util[_0x7af2('0x13')](_0x7af2('0x17'),'favicon',path[_0x7af2('0x14')](_0x29d78f['originalname'])));}})});router[_0x7af2('0x1d')](_0x7af2('0xf'),upload['single'](_0x7af2('0x16')),controller[_0x7af2('0x1f')]);router[_0x7af2('0x20')](_0x7af2('0x21'),auth[_0x7af2('0x8')](),controller[_0x7af2('0x22')]);module[_0x7af2('0x23')]=router;
\ No newline at end of file
+var _0x2208=['/:id/gdpr','/:id/preferred','/:id/favicon','getFavicon','diskStorage','root','format','%s%s','logo','extname','originalname','post','addLogo','join','logologin','single','file','server/files/images/logos/','preferred','addFavicon','put','update','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/logo','/:id/logo_login','getLogoLogin'];(function(_0x4efb56,_0x1ef9b0){var _0x4daf4e=function(_0x34681f){while(--_0x34681f){_0x4efb56['push'](_0x4efb56['shift']());}};_0x4daf4e(++_0x1ef9b0);}(_0x2208,0x1c4));var _0x8220=function(_0x55aa3f,_0x3bf6bc){_0x55aa3f=_0x55aa3f-0x0;var _0x2c9fdc=_0x2208[_0x55aa3f];return _0x2c9fdc;};'use strict';var multer=require(_0x8220('0x0'));var util=require(_0x8220('0x1'));var path=require(_0x8220('0x2'));var timeout=require(_0x8220('0x3'));var express=require(_0x8220('0x4'));var router=express[_0x8220('0x5')]();var auth=require(_0x8220('0x6'));var interaction=require(_0x8220('0x7'));var config=require(_0x8220('0x8'));var controller=require('./setting.controller');router[_0x8220('0x9')]('/',auth[_0x8220('0xa')](),controller[_0x8220('0xb')]);router[_0x8220('0x9')](_0x8220('0xc'),controller['show']);router['get'](_0x8220('0xd'),controller['getLogo']);router[_0x8220('0x9')](_0x8220('0xe'),controller[_0x8220('0xf')]);router[_0x8220('0x9')](_0x8220('0x10'),controller['gdpr']);router[_0x8220('0x9')](_0x8220('0x11'),controller['getPreferred']);router[_0x8220('0x9')](_0x8220('0x12'),controller[_0x8220('0x13')]);var upload=multer({'storage':multer[_0x8220('0x14')]({'destination':function(_0x434137,_0x5495ec,_0x53c963){_0x53c963(null,path['join'](config[_0x8220('0x15')],'server/files/images/logos/'));},'filename':function(_0xc7f229,_0x5a106a,_0x426175){_0x426175(null,util[_0x8220('0x16')](_0x8220('0x17'),_0x8220('0x18'),path[_0x8220('0x19')](_0x5a106a[_0x8220('0x1a')])));}})});router[_0x8220('0x1b')](_0x8220('0xd'),upload['single']('file'),controller[_0x8220('0x1c')]);var upload=multer({'storage':multer[_0x8220('0x14')]({'destination':function(_0x3499f8,_0x14ef93,_0x23576b){_0x23576b(null,path[_0x8220('0x1d')](config[_0x8220('0x15')],'server/files/images/logos/'));},'filename':function(_0x4cbd20,_0x485b00,_0x1f444f){_0x1f444f(null,util[_0x8220('0x16')](_0x8220('0x17'),_0x8220('0x1e'),path[_0x8220('0x19')](_0x485b00[_0x8220('0x1a')])));}})});router[_0x8220('0x1b')](_0x8220('0xe'),upload[_0x8220('0x1f')](_0x8220('0x20')),controller['addLogoLogin']);var upload=multer({'storage':multer[_0x8220('0x14')]({'destination':function(_0x2a2c7c,_0x1debe0,_0x2f4943){_0x2f4943(null,path['join'](config[_0x8220('0x15')],_0x8220('0x21')));},'filename':function(_0x26dc21,_0x578d4f,_0xf5a2cf){_0xf5a2cf(null,util[_0x8220('0x16')](_0x8220('0x17'),_0x8220('0x22'),path[_0x8220('0x19')](_0x578d4f[_0x8220('0x1a')])));}})});router[_0x8220('0x1b')]('/:id/preferred',upload['single']('file'),controller['addPreferred']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1e662c,_0x7389a0,_0x3c1582){_0x3c1582(null,path[_0x8220('0x1d')](config[_0x8220('0x15')],'server/files/images/logos/'));},'filename':function(_0x3e5958,_0x52f0f3,_0x55a50a){_0x55a50a(null,util[_0x8220('0x16')](_0x8220('0x17'),'favicon',path[_0x8220('0x19')](_0x52f0f3[_0x8220('0x1a')])));}})});router[_0x8220('0x1b')]('/:id/favicon',upload[_0x8220('0x1f')](_0x8220('0x20')),controller[_0x8220('0x23')]);router[_0x8220('0x24')](_0x8220('0xc'),auth[_0x8220('0xa')](),controller[_0x8220('0x25')]);module[_0x8220('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 c9e61b0..24af9b0 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 _0xb65b=['https://www.xcally.com/bar/phonebar/autoupdater.xml','exports','INTEGER','min_internal','min_mailbox','STRING','/var/opt/motion2/server/files/sounds/converted','BOOLEAN'];(function(_0x2c9e54,_0x178247){var _0x25d074=function(_0x14e87e){while(--_0x14e87e){_0x2c9e54['push'](_0x2c9e54['shift']());}};_0x25d074(++_0x178247);}(_0xb65b,0x139));var _0xbb65=function(_0x1143e8,_0x3aeac0){_0x1143e8=_0x1143e8-0x0;var _0x559b59=_0xb65b[_0x1143e8];return _0x559b59;};'use strict';var Sequelize=require('sequelize');module[_0xbb65('0x0')]={'min_internal':{'type':Sequelize[_0xbb65('0x1')](0xb),'unique':_0xbb65('0x2'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0xbb65('0x1')](0xb),'unique':_0xbb65('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize[_0xbb65('0x1')](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0xbb65('0x4')],'defaultValue':_0xbb65('0x5')},'logo':{'type':Sequelize[_0xbb65('0x4')]},'defaultLogo':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0xbb65('0x4')]},'defaultLoginLogo':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0xbb65('0x4')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0xbb65('0x4')]},'turnaddr':{'type':Sequelize[_0xbb65('0x4')]},'turnusername':{'type':Sequelize['STRING']},'turnpassword':{'type':Sequelize[_0xbb65('0x4')]},'pageTitle':{'type':Sequelize['STRING']},'defaultPageTitle':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0xbb65('0x1')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0xbb65('0x4')],'defaultValue':_0xbb65('0x7')},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0xbb65('0x1')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0xbb65('0x1')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0xbb65('0x4')],'defaultValue':'alternate'},'chatTimeout':{'type':Sequelize[_0xbb65('0x1')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'preferred':{'type':Sequelize[_0xbb65('0x4')]},'defaultPreferred':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize[_0xbb65('0x4')]},'allowedLoginAttempts':{'type':Sequelize[_0xbb65('0x1')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0xbb65('0x1')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0xbb65('0x4')]},'defaultFavicon':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0xbb65('0x1')],'defaultValue':0xa,'validate':{'min':0xa}},'googleSsoEnabled':{'type':Sequelize[_0xbb65('0x6')],'defaultValue':![]}};
\ No newline at end of file
+var _0x3fbf=['alternate','sequelize','min_mailbox','INTEGER','STRING','BOOLEAN','https://www.xcally.com/bar/phonebar/autoupdater.xml'];(function(_0x3b3e86,_0x3b66f0){var _0x4683cb=function(_0x37cd0e){while(--_0x37cd0e){_0x3b3e86['push'](_0x3b3e86['shift']());}};_0x4683cb(++_0x3b66f0);}(_0x3fbf,0x1ac));var _0xf3fb=function(_0x2e65ee,_0x29dad9){_0x2e65ee=_0x2e65ee-0x0;var _0x4c712a=_0x3fbf[_0x2e65ee];return _0x4c712a;};'use strict';var Sequelize=require(_0xf3fb('0x0'));module['exports']={'min_internal':{'type':Sequelize['INTEGER'](0xb),'unique':'min_internal','defaultValue':0x3e8},'min_mailbox':{'type':Sequelize['INTEGER'](0xb),'unique':_0xf3fb('0x1'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize[_0xf3fb('0x2')](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0xf3fb('0x3')],'defaultValue':'/var/opt/motion2/server/files/sounds/converted'},'logo':{'type':Sequelize[_0xf3fb('0x3')]},'defaultLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0xf3fb('0x3')]},'defaultLoginLogo':{'type':Sequelize[_0xf3fb('0x4')],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0xf3fb('0x3')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0xf3fb('0x4')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0xf3fb('0x4')],'defaultValue':!![]},'firstSetup':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0xf3fb('0x3')]},'turnaddr':{'type':Sequelize[_0xf3fb('0x3')]},'turnusername':{'type':Sequelize[_0xf3fb('0x3')]},'turnpassword':{'type':Sequelize['STRING']},'pageTitle':{'type':Sequelize['STRING']},'defaultPageTitle':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0xf3fb('0x4')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0xf3fb('0x2')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0xf3fb('0x3')],'defaultValue':_0xf3fb('0x5')},'enableEmailPreview':{'type':Sequelize[_0xf3fb('0x4')],'defaultValue':![]},'split':{'type':Sequelize[_0xf3fb('0x4')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize[_0xf3fb('0x2')],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0xf3fb('0x2')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0xf3fb('0x3')],'defaultValue':_0xf3fb('0x6')},'chatTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0xf3fb('0x4')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0xf3fb('0x3')]},'defaultPreferred':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'rtlSupport':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize[_0xf3fb('0x3')]},'allowedLoginAttempts':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'blockDuration':{'type':Sequelize['INTEGER'],'defaultValue':0xa},'favicon':{'type':Sequelize['STRING']},'defaultFavicon':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0xf3fb('0x2')],'defaultValue':0xa,'validate':{'min':0xa}},'googleSsoEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js
index d3b7ffa..09bcb56 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 _0x9431=['util','sox','ejs','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../mysqldb','client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','error','code','message','catch','sendStatus','status','end','json','count','offset','set','apply','save','stack','name','send','Setting','rawAttributes','fieldName','type','map','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','limit','order','sort','where','pick','filter','merge','options','includeAll','findAll','rows','params','update','body','find','addLogo','file','logo','filename','../../config/license/util','getLogo','server/files/images/logos','getLicense','loginLogo','preferred','favicon','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','join','root','toLower','default_logo.png','upperFirst','Sequelize','\x20not\x20found','getLogoLogin','default_loginLogo.png','default','existsSync','securePassword','addPreferred','getPreferred','default_preferred.png','custom','download','default_favicon.ico','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache'];(function(_0x494bb7,_0xa514ac){var _0x3892a3=function(_0x2acedc){while(--_0x2acedc){_0x494bb7['push'](_0x494bb7['shift']());}};_0x3892a3(++_0xa514ac);}(_0x9431,0x14b));var _0x1943=function(_0x40f00f,_0x343156){_0x40f00f=_0x40f00f-0x0;var _0x42c16d=_0x9431[_0x40f00f];return _0x42c16d;};'use strict';var pdf=require(_0x1943('0x0'));var emlformat=require(_0x1943('0x1'));var rimraf=require(_0x1943('0x2'));var zipdir=require(_0x1943('0x3'));var jsonpatch=require(_0x1943('0x4'));var rp=require(_0x1943('0x5'));var moment=require(_0x1943('0x6'));var BPromise=require('bluebird');var Mustache=require(_0x1943('0x7'));var util=require(_0x1943('0x8'));var path=require('path');var sox=require(_0x1943('0x9'));var csv=require('to-csv');var ejs=require(_0x1943('0xa'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x1943('0xb'));var jsforce=require(_0x1943('0xc'));var deskjs=require(_0x1943('0xd'));var toCsv=require(_0x1943('0xe'));var querystring=require('querystring');var Papa=require(_0x1943('0xf'));var Redis=require(_0x1943('0x10'));var authService=require(_0x1943('0x11'));var qs=require(_0x1943('0x12'));var as=require(_0x1943('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1943('0x14'))('api');var utils=require('../../config/utils');var config=require(_0x1943('0x15'));var db=require(_0x1943('0x16'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x1943('0x17')][_0x1943('0x18')]({'port':0x232a});function checkPasswordPattern(_0x533e09,_0x3a2021,_0xe349ac){if(_0xe349ac){var _0x168595=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x168595[_0x1943('0x19')](_0x3a2021)){return _0x533e09;}else{throw new db['Sequelize'][(_0x1943('0x1a'))](_0x1943('0x1b'));}}else{return _0x533e09;}}function respondWithRpcPromise(_0x2f4474,_0x4e8d4d,_0x2ce7ff,_0x1d88f4){return new BPromise(function(_0x3b70d6,_0x41cd41){var _0x295194=_0x1d88f4||client;return _0x295194[_0x1943('0x1c')](_0x2f4474,_0x2ce7ff)[_0x1943('0x1d')](function(_0x56c38e){logger[_0x1943('0x1e')](_0x1943('0x1f'),_0x4e8d4d,_0x1943('0x20'));logger[_0x1943('0x21')](_0x1943('0x22'),_0x4e8d4d,_0x1943('0x20'),JSON['stringify'](_0x56c38e));if(_0x56c38e['error']){if(_0x56c38e[_0x1943('0x23')][_0x1943('0x24')]===0x1f4){logger[_0x1943('0x23')]('Setting,\x20%s,\x20%s',_0x4e8d4d,_0x56c38e['error'][_0x1943('0x25')]);return _0x41cd41(_0x56c38e[_0x1943('0x23')][_0x1943('0x25')]);}logger[_0x1943('0x23')]('Setting,\x20%s,\x20%s',_0x4e8d4d,_0x56c38e[_0x1943('0x23')][_0x1943('0x25')]);return _0x3b70d6(_0x56c38e['error'][_0x1943('0x25')]);}else{logger[_0x1943('0x1e')]('Setting,\x20%s,\x20%s',_0x4e8d4d,_0x1943('0x20'));_0x3b70d6(_0x56c38e['result'][_0x1943('0x25')]);}})[_0x1943('0x26')](function(_0x3acd45){logger[_0x1943('0x23')](_0x1943('0x1f'),_0x4e8d4d,_0x3acd45);_0x41cd41(_0x3acd45);});});}function respondWithStatusCode(_0x3135bc,_0x2c9f74){_0x2c9f74=_0x2c9f74||0xcc;return function(_0x5d4020){if(_0x5d4020){return _0x3135bc[_0x1943('0x27')](_0x2c9f74);}return _0x3135bc[_0x1943('0x28')](_0x2c9f74)[_0x1943('0x29')]();};}function respondWithResult(_0x5ead4f,_0x94a0e){_0x94a0e=_0x94a0e||0xc8;return function(_0x17120f){if(_0x17120f){return _0x5ead4f[_0x1943('0x28')](_0x94a0e)[_0x1943('0x2a')](_0x17120f);}};}function respondWithFilteredResult(_0x287afd,_0x1fc011){return function(_0x126899){if(_0x126899){var _0x17157b=_0x126899[_0x1943('0x2b')],_0x44d427=_0x1fc011[_0x1943('0x2c')],_0x594bc5=_0x1fc011[_0x1943('0x2c')]+_0x1fc011['limit'],_0xafcc0a;if(_0x594bc5>=_0x17157b){_0x594bc5=_0x17157b;_0xafcc0a=0xc8;}else{_0xafcc0a=0xce;}_0x287afd[_0x1943('0x28')](_0xafcc0a);return _0x287afd[_0x1943('0x2d')]('Content-Range',_0x44d427+'-'+_0x594bc5+'/'+_0x17157b)[_0x1943('0x2a')](_0x126899);}return null;};}function patchUpdates(_0x4ae7fe){return function(_0x602b2f){try{jsonpatch[_0x1943('0x2e')](_0x602b2f,_0x4ae7fe,!![]);}catch(_0x3369ce){return BPromise['reject'](_0x3369ce);}return _0x602b2f[_0x1943('0x2f')]();};}function saveUpdates(_0x235aaf,_0x2100c3){return function(_0x45af16){if(_0x45af16){return _0x45af16['update'](_0x235aaf)['then'](function(_0x1ea215){return _0x1ea215;});}return null;};}function removeEntity(_0xccdeaa,_0x4bb80b){return function(_0xb9a9d2){if(_0xb9a9d2){return _0xb9a9d2['destroy']()['then'](function(){_0xccdeaa[_0x1943('0x28')](0xcc)[_0x1943('0x29')]();});}};}function handleEntityNotFound(_0x495336,_0x17aedc){return function(_0x42a07e){if(!_0x42a07e){_0x495336[_0x1943('0x27')](0x194);}return _0x42a07e;};}function handleError(_0x58aa4c,_0x22937a){_0x22937a=_0x22937a||0x1f4;return function(_0x4cf88f){logger['error'](_0x4cf88f[_0x1943('0x30')]);if(_0x4cf88f[_0x1943('0x31')]){delete _0x4cf88f[_0x1943('0x31')];}_0x58aa4c['status'](_0x22937a)[_0x1943('0x32')](_0x4cf88f);};}exports['index']=function(_0x227e6f,_0x4e5606){var _0x4bcc8e={},_0x3e9220={},_0x3270f3={'count':0x0,'rows':[]};var _0x449231=_['map'](db[_0x1943('0x33')][_0x1943('0x34')],function(_0x2d3e35){return{'name':_0x2d3e35[_0x1943('0x35')],'type':_0x2d3e35[_0x1943('0x36')]['key']};});_0x3e9220['model']=_[_0x1943('0x37')](_0x449231,_0x1943('0x31'));_0x3e9220[_0x1943('0x38')]=_[_0x1943('0x39')](_0x227e6f[_0x1943('0x38')]);_0x3e9220[_0x1943('0x3a')]=_[_0x1943('0x3b')](_0x3e9220['model'],_0x3e9220[_0x1943('0x38')]);_0x4bcc8e[_0x1943('0x3c')]=_[_0x1943('0x3b')](_0x3e9220[_0x1943('0x3d')],qs[_0x1943('0x3e')](_0x227e6f[_0x1943('0x38')][_0x1943('0x3e')]));_0x4bcc8e[_0x1943('0x3c')]=_0x4bcc8e['attributes'][_0x1943('0x3f')]?_0x4bcc8e[_0x1943('0x3c')]:_0x3e9220[_0x1943('0x3d')];if(!_0x227e6f[_0x1943('0x38')][_0x1943('0x40')]('nolimit')){_0x4bcc8e[_0x1943('0x41')]=qs['limit'](_0x227e6f['query'][_0x1943('0x41')]);_0x4bcc8e[_0x1943('0x2c')]=qs[_0x1943('0x2c')](_0x227e6f[_0x1943('0x38')][_0x1943('0x2c')]);}_0x4bcc8e[_0x1943('0x42')]=qs[_0x1943('0x43')](_0x227e6f[_0x1943('0x38')][_0x1943('0x43')]);_0x4bcc8e[_0x1943('0x44')]=qs[_0x1943('0x3a')](_[_0x1943('0x45')](_0x227e6f[_0x1943('0x38')],_0x3e9220[_0x1943('0x3a')]));if(_0x227e6f[_0x1943('0x38')][_0x1943('0x46')]){_0x4bcc8e[_0x1943('0x44')]=_['merge'](_0x4bcc8e[_0x1943('0x44')],{'$or':_[_0x1943('0x37')](_0x449231,function(_0x423e52){if(_0x423e52[_0x1943('0x36')]!=='VIRTUAL'){var _0x49c5d6={};_0x49c5d6[_0x423e52['name']]={'$like':'%'+_0x227e6f[_0x1943('0x38')][_0x1943('0x46')]+'%'};return _0x49c5d6;}})});}_0x4bcc8e=_[_0x1943('0x47')]({},_0x4bcc8e,_0x227e6f[_0x1943('0x48')]);var _0x4dbdd0={'where':_0x4bcc8e[_0x1943('0x44')]};return db[_0x1943('0x33')][_0x1943('0x2b')](_0x4dbdd0)[_0x1943('0x1d')](function(_0x3f0a20){_0x3270f3['count']=_0x3f0a20;if(_0x227e6f['query'][_0x1943('0x49')]){_0x4bcc8e['include']=[{'all':!![]}];}return db[_0x1943('0x33')][_0x1943('0x4a')](_0x4bcc8e);})[_0x1943('0x1d')](function(_0x5d2b55){_0x3270f3[_0x1943('0x4b')]=_0x5d2b55;return _0x3270f3;})[_0x1943('0x1d')](respondWithFilteredResult(_0x4e5606,_0x4bcc8e))[_0x1943('0x26')](handleError(_0x4e5606,null));};exports['show']=function(_0xeac411,_0x302ea1){var _0x247ccf={'raw':![],'where':{'id':_0xeac411[_0x1943('0x4c')]['id']}},_0x47761e={};_0x47761e[_0x1943('0x3d')]=_[_0x1943('0x39')](db[_0x1943('0x33')]['rawAttributes']);_0x47761e['query']=_[_0x1943('0x39')](_0xeac411[_0x1943('0x38')]);_0x47761e[_0x1943('0x3a')]=_[_0x1943('0x3b')](_0x47761e[_0x1943('0x3d')],_0x47761e[_0x1943('0x38')]);_0x247ccf[_0x1943('0x3c')]=_[_0x1943('0x3b')](_0x47761e[_0x1943('0x3d')],qs['fields'](_0xeac411['query'][_0x1943('0x3e')]));_0x247ccf[_0x1943('0x3c')]=_0x247ccf[_0x1943('0x3c')][_0x1943('0x3f')]?_0x247ccf[_0x1943('0x3c')]:_0x47761e[_0x1943('0x3d')];if(_0xeac411['query']['includeAll']){_0x247ccf['include']=[{'all':!![]}];}_0x247ccf=_[_0x1943('0x47')]({},_0x247ccf,_0xeac411[_0x1943('0x48')]);return db[_0x1943('0x33')]['find'](_0x247ccf)[_0x1943('0x1d')](handleEntityNotFound(_0x302ea1,null))[_0x1943('0x1d')](respondWithResult(_0x302ea1,null))['catch'](handleError(_0x302ea1,null));};exports[_0x1943('0x4d')]=function(_0x1b21c9,_0xd6785a){if(_0x1b21c9[_0x1943('0x4e')]['id']){delete _0x1b21c9[_0x1943('0x4e')]['id'];}return db['Setting'][_0x1943('0x4f')]({'where':{'id':_0x1b21c9[_0x1943('0x4c')]['id']}})[_0x1943('0x1d')](handleEntityNotFound(_0xd6785a,null))['then'](saveUpdates(_0x1b21c9['body'],null))[_0x1943('0x1d')](respondWithResult(_0xd6785a,null))[_0x1943('0x26')](handleError(_0xd6785a,null));};exports[_0x1943('0x50')]=function(_0x288162,_0x4a24b1,_0x52dc7b){if(_0x288162[_0x1943('0x51')]&&_0x288162[_0x1943('0x51')]['filename']){_0x288162[_0x1943('0x4e')][_0x1943('0x52')]=_0x288162[_0x1943('0x51')][_0x1943('0x53')];}return db[_0x1943('0x33')][_0x1943('0x4f')]({'where':{'id':_0x288162['params']['id']}})[_0x1943('0x1d')](handleEntityNotFound(_0x4a24b1,null))['then'](saveUpdates(_0x288162[_0x1943('0x4e')],null))['then'](respondWithResult(_0x4a24b1,null))[_0x1943('0x26')](handleError(_0x4a24b1,null));};exports['addLogoLogin']=function(_0x4a21bc,_0x4e20f7,_0x1a9675){if(_0x4a21bc[_0x1943('0x51')]&&_0x4a21bc[_0x1943('0x51')][_0x1943('0x53')]){_0x4a21bc[_0x1943('0x4e')]['loginLogo']=_0x4a21bc[_0x1943('0x51')][_0x1943('0x53')];}return db[_0x1943('0x33')][_0x1943('0x4f')]({'where':{'id':_0x4a21bc['params']['id']}})[_0x1943('0x1d')](handleEntityNotFound(_0x4e20f7,null))[_0x1943('0x1d')](saveUpdates(_0x4a21bc[_0x1943('0x4e')],null))[_0x1943('0x1d')](respondWithResult(_0x4e20f7,null))[_0x1943('0x26')](handleError(_0x4e20f7,null));};var utilLicense=require(_0x1943('0x54'));exports[_0x1943('0x55')]=function(_0x53d8f0,_0x5e2470,_0x5d9656){var _0x59a1f9=_0x1943('0x56');var _0x4c0bb5={'custom':![]};return utilLicense[_0x1943('0x57')]()[_0x1943('0x1d')](function(_0x187d11){if(_0x187d11){_0x4c0bb5=_0x187d11;}return db[_0x1943('0x33')]['find']({'where':{'id':_0x53d8f0[_0x1943('0x4c')]['id']},'attributes':[_0x1943('0x52'),_0x1943('0x58'),_0x1943('0x59'),_0x1943('0x5a'),_0x1943('0x5b'),_0x1943('0x5c'),_0x1943('0x5d'),_0x1943('0x5e')],'raw':!![]});})[_0x1943('0x1d')](handleEntityNotFound(_0x5e2470,null))[_0x1943('0x1d')](function(_0x214b94){if(_0x214b94){var _0x2ed08d=_0x214b94[_0x1943('0x52')]&&fs['existsSync'](path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x59a1f9,_[_0x1943('0x61')](_0x214b94['logo'])))?path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x59a1f9,_[_0x1943('0x61')](_0x214b94[_0x1943('0x52')])):path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x59a1f9,_[_0x1943('0x61')](_0x1943('0x62')));var _0x27dce9='default'+_[_0x1943('0x63')]('logo');if(_0x214b94[_0x27dce9]||!_0x4c0bb5['custom']){_0x2ed08d=path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x59a1f9,_[_0x1943('0x61')]('default_logo.png'));}if(!fs['existsSync'](_0x2ed08d)){throw new db[(_0x1943('0x64'))][(_0x1943('0x1a'))](_[_0x1943('0x63')](_0x1943('0x52'))+_0x1943('0x65'));}return _0x5e2470['download'](_0x2ed08d);}})['catch'](handleError(_0x5e2470,null));};var utilLicense=require('../../config/license/util');exports[_0x1943('0x66')]=function(_0x42d37a,_0x98f1f4,_0x1c1eca){var _0x3a2210=_0x1943('0x56');var _0x13b14c={'custom':![]};return utilLicense[_0x1943('0x57')]()[_0x1943('0x1d')](function(_0x467b18){if(_0x467b18){_0x13b14c=_0x467b18;}return db[_0x1943('0x33')][_0x1943('0x4f')]({'where':{'id':_0x42d37a['params']['id']},'attributes':[_0x1943('0x52'),_0x1943('0x58'),_0x1943('0x59'),_0x1943('0x5a'),'defaultLogo','defaultLoginLogo',_0x1943('0x5d'),_0x1943('0x5e')],'raw':!![]});})[_0x1943('0x1d')](handleEntityNotFound(_0x98f1f4,null))[_0x1943('0x1d')](function(_0x3f8bba){if(_0x3f8bba){var _0x5c4cf6=_0x3f8bba[_0x1943('0x58')]&&fs['existsSync'](path[_0x1943('0x5f')](config['root'],_0x3a2210,_['toLower'](_0x3f8bba[_0x1943('0x58')])))?path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x3a2210,_[_0x1943('0x61')](_0x3f8bba[_0x1943('0x58')])):path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x3a2210,_[_0x1943('0x61')](_0x1943('0x67')));var _0x5f3a92=_0x1943('0x68')+_['upperFirst']('loginLogo');if(_0x3f8bba[_0x5f3a92]||!_0x13b14c['custom']){_0x5c4cf6=path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x3a2210,_[_0x1943('0x61')](_0x1943('0x67')));}if(!fs[_0x1943('0x69')](_0x5c4cf6)){throw new db[(_0x1943('0x64'))][(_0x1943('0x1a'))](_['upperFirst'](_0x1943('0x58'))+_0x1943('0x65'));}return _0x98f1f4['download'](_0x5c4cf6);}})[_0x1943('0x26')](handleError(_0x98f1f4,null));};exports['gdpr']=function(_0x577355,_0x3e809d){return db[_0x1943('0x33')][_0x1943('0x4f')]({'where':{'id':_0x577355[_0x1943('0x4c')]['id']},'attributes':[_0x1943('0x6a')]})[_0x1943('0x1d')](respondWithResult(_0x3e809d,null))[_0x1943('0x26')](handleError(_0x3e809d,null));};exports[_0x1943('0x6b')]=function(_0x2e040d,_0x1aff6f,_0x10cc29){if(_0x2e040d[_0x1943('0x51')]&&_0x2e040d['file'][_0x1943('0x53')]){_0x2e040d['body'][_0x1943('0x59')]=_0x2e040d[_0x1943('0x51')][_0x1943('0x53')];}return db[_0x1943('0x33')]['find']({'where':{'id':_0x2e040d[_0x1943('0x4c')]['id']}})[_0x1943('0x1d')](handleEntityNotFound(_0x1aff6f,null))[_0x1943('0x1d')](saveUpdates(_0x2e040d['body'],null))[_0x1943('0x1d')](respondWithResult(_0x1aff6f,null))['catch'](handleError(_0x1aff6f,null));};var utilLicense=require('../../config/license/util');exports[_0x1943('0x6c')]=function(_0x1665eb,_0x11c262,_0x11d3ee){var _0x2fae3e=_0x1943('0x56');var _0x15c2f6={'custom':![]};return utilLicense[_0x1943('0x57')]()[_0x1943('0x1d')](function(_0x45c960){if(_0x45c960){_0x15c2f6=_0x45c960;}return db[_0x1943('0x33')][_0x1943('0x4f')]({'where':{'id':_0x1665eb[_0x1943('0x4c')]['id']},'attributes':[_0x1943('0x52'),_0x1943('0x58'),'preferred',_0x1943('0x5a'),_0x1943('0x5b'),'defaultLoginLogo',_0x1943('0x5d'),_0x1943('0x5e')],'raw':!![]});})['then'](handleEntityNotFound(_0x11c262,null))[_0x1943('0x1d')](function(_0x37f5c4){if(_0x37f5c4){var _0x386bf4=_0x37f5c4[_0x1943('0x59')]&&fs[_0x1943('0x69')](path['join'](config[_0x1943('0x60')],_0x2fae3e,_[_0x1943('0x61')](_0x37f5c4['preferred'])))?path['join'](config[_0x1943('0x60')],_0x2fae3e,_[_0x1943('0x61')](_0x37f5c4[_0x1943('0x59')])):path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x2fae3e,_[_0x1943('0x61')](_0x1943('0x6d')));var _0x1553eb=_0x1943('0x68')+_[_0x1943('0x63')](_0x1943('0x59'));if(_0x37f5c4[_0x1553eb]||!_0x15c2f6[_0x1943('0x6e')]||!_0x15c2f6[_0x1943('0x59')]){_0x386bf4=path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x2fae3e,_['toLower'](_0x1943('0x6d')));}if(!fs[_0x1943('0x69')](_0x386bf4)){throw new db['Sequelize'][(_0x1943('0x1a'))](_[_0x1943('0x63')](_0x1943('0x59'))+_0x1943('0x65'));}return _0x11c262[_0x1943('0x6f')](_0x386bf4);}})[_0x1943('0x26')](handleError(_0x11c262,null));};exports['addFavicon']=function(_0x450237,_0xdadceb,_0x468876){if(_0x450237[_0x1943('0x51')]&&_0x450237[_0x1943('0x51')]['filename']){_0x450237[_0x1943('0x4e')]['favicon']=_0x450237[_0x1943('0x51')]['filename'];}return db['Setting'][_0x1943('0x4f')]({'where':{'id':_0x450237['params']['id']}})[_0x1943('0x1d')](handleEntityNotFound(_0xdadceb,null))[_0x1943('0x1d')](saveUpdates(_0x450237['body'],null))[_0x1943('0x1d')](respondWithResult(_0xdadceb,null))[_0x1943('0x26')](handleError(_0xdadceb,null));};var utilLicense=require('../../config/license/util');exports['getFavicon']=function(_0x2cfb47,_0x55ac81,_0x3f4fdf){var _0x4a697b=_0x1943('0x56');var _0x55c862={'custom':![]};return utilLicense['getLicense']()[_0x1943('0x1d')](function(_0x116775){if(_0x116775){_0x55c862=_0x116775;}return db[_0x1943('0x33')]['find']({'where':{'id':_0x2cfb47[_0x1943('0x4c')]['id']},'attributes':['logo',_0x1943('0x58'),_0x1943('0x59'),_0x1943('0x5a'),'defaultLogo','defaultLoginLogo',_0x1943('0x5d'),_0x1943('0x5e')],'raw':!![]});})[_0x1943('0x1d')](handleEntityNotFound(_0x55ac81,null))[_0x1943('0x1d')](function(_0x1d1733){if(_0x1d1733){var _0xee4a7c=_0x1d1733['favicon']&&fs['existsSync'](path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x4a697b,_[_0x1943('0x61')](_0x1d1733[_0x1943('0x5a')])))?path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x4a697b,_[_0x1943('0x61')](_0x1d1733['favicon'])):path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x4a697b,_[_0x1943('0x61')](_0x1943('0x70')));var _0x306e52=_0x1943('0x68')+_[_0x1943('0x63')]('favicon');if(_0x1d1733[_0x306e52]||!_0x55c862[_0x1943('0x6e')]){_0xee4a7c=path[_0x1943('0x5f')](config[_0x1943('0x60')],_0x4a697b,_[_0x1943('0x61')]('default_favicon.ico'));}if(!fs[_0x1943('0x69')](_0xee4a7c)){throw new db[(_0x1943('0x64'))][(_0x1943('0x1a'))](_[_0x1943('0x63')](_0x1943('0x5a'))+_0x1943('0x65'));}return _0x55ac81[_0x1943('0x6f')](_0xee4a7c);}})['catch'](handleError(_0x55ac81,null));};
\ No newline at end of file
+var _0x1a80=['filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','findAll','rows','include','find','update','body','params','addLogo','file','filename','../../config/license/util','getLogo','server/files/images/logos','getLicense','logo','loginLogo','preferred','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','existsSync','root','toLower','join','default_logo.png','default','upperFirst','custom','download','getLogoLogin','favicon','default_loginLogo.png','gdpr','addPreferred','getPreferred','default_preferred.png','\x20not\x20found','addFavicon','getFavicon','default_favicon.ico','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','squel','crypto','querystring','papaparse','ioredis','../../components/parsers/qs','api','../../config/environment','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','count','offset','limit','set','Content-Range','apply','reject','destroy','stack','name','send','index','Setting','rawAttributes','type','key','model','map','query','keys'];(function(_0x20c567,_0x489cc8){var _0xdc7b7b=function(_0x4a58b0){while(--_0x4a58b0){_0x20c567['push'](_0x20c567['shift']());}};_0xdc7b7b(++_0x489cc8);}(_0x1a80,0x122));var _0x01a8=function(_0x2ecaea,_0x3731be){_0x2ecaea=_0x2ecaea-0x0;var _0x235ff4=_0x1a80[_0x2ecaea];return _0x235ff4;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x01a8('0x0'));var rimraf=require(_0x01a8('0x1'));var zipdir=require(_0x01a8('0x2'));var jsonpatch=require(_0x01a8('0x3'));var rp=require(_0x01a8('0x4'));var moment=require('moment');var BPromise=require(_0x01a8('0x5'));var Mustache=require('mustache');var util=require(_0x01a8('0x6'));var path=require(_0x01a8('0x7'));var sox=require(_0x01a8('0x8'));var csv=require(_0x01a8('0x9'));var ejs=require(_0x01a8('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x01a8('0xb'));var crypto=require(_0x01a8('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x01a8('0x9'));var querystring=require(_0x01a8('0xd'));var Papa=require(_0x01a8('0xe'));var Redis=require(_0x01a8('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x01a8('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x01a8('0x11'));var utils=require('../../config/utils');var config=require(_0x01a8('0x12'));var db=require('../../mysqldb')['db'];var jayson=require(_0x01a8('0x13'));var client=jayson[_0x01a8('0x14')][_0x01a8('0x15')]({'port':0x232a});function checkPasswordPattern(_0x4a80db,_0x2d3587,_0x8235c3){if(_0x8235c3){var _0x56783b=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x56783b[_0x01a8('0x16')](_0x2d3587)){return _0x4a80db;}else{throw new db[(_0x01a8('0x17'))][(_0x01a8('0x18'))](_0x01a8('0x19'));}}else{return _0x4a80db;}}function respondWithRpcPromise(_0x561808,_0xbb800b,_0x5aad34,_0x5551c4){return new BPromise(function(_0x2626ae,_0x597021){var _0x4b7a69=_0x5551c4||client;return _0x4b7a69['request'](_0x561808,_0x5aad34)[_0x01a8('0x1a')](function(_0x1fb450){logger[_0x01a8('0x1b')](_0x01a8('0x1c'),_0xbb800b,_0x01a8('0x1d'));logger[_0x01a8('0x1e')](_0x01a8('0x1f'),_0xbb800b,_0x01a8('0x1d'),JSON[_0x01a8('0x20')](_0x1fb450));if(_0x1fb450[_0x01a8('0x21')]){if(_0x1fb450[_0x01a8('0x21')][_0x01a8('0x22')]===0x1f4){logger['error'](_0x01a8('0x1c'),_0xbb800b,_0x1fb450[_0x01a8('0x21')][_0x01a8('0x23')]);return _0x597021(_0x1fb450[_0x01a8('0x21')]['message']);}logger[_0x01a8('0x21')](_0x01a8('0x1c'),_0xbb800b,_0x1fb450[_0x01a8('0x21')][_0x01a8('0x23')]);return _0x2626ae(_0x1fb450[_0x01a8('0x21')]['message']);}else{logger[_0x01a8('0x1b')](_0x01a8('0x1c'),_0xbb800b,_0x01a8('0x1d'));_0x2626ae(_0x1fb450[_0x01a8('0x24')][_0x01a8('0x23')]);}})[_0x01a8('0x25')](function(_0x388970){logger['error']('Setting,\x20%s,\x20%s',_0xbb800b,_0x388970);_0x597021(_0x388970);});});}function respondWithStatusCode(_0x29e3c7,_0x361027){_0x361027=_0x361027||0xcc;return function(_0x585b23){if(_0x585b23){return _0x29e3c7['sendStatus'](_0x361027);}return _0x29e3c7[_0x01a8('0x26')](_0x361027)[_0x01a8('0x27')]();};}function respondWithResult(_0x32b213,_0x408557){_0x408557=_0x408557||0xc8;return function(_0x10a342){if(_0x10a342){return _0x32b213[_0x01a8('0x26')](_0x408557)[_0x01a8('0x28')](_0x10a342);}};}function respondWithFilteredResult(_0x1dc316,_0x4edc78){return function(_0x303d8e){if(_0x303d8e){var _0xf431b=_0x303d8e[_0x01a8('0x29')],_0x496b83=_0x4edc78[_0x01a8('0x2a')],_0x33930a=_0x4edc78[_0x01a8('0x2a')]+_0x4edc78[_0x01a8('0x2b')],_0xf89d3f;if(_0x33930a>=_0xf431b){_0x33930a=_0xf431b;_0xf89d3f=0xc8;}else{_0xf89d3f=0xce;}_0x1dc316[_0x01a8('0x26')](_0xf89d3f);return _0x1dc316[_0x01a8('0x2c')](_0x01a8('0x2d'),_0x496b83+'-'+_0x33930a+'/'+_0xf431b)[_0x01a8('0x28')](_0x303d8e);}return null;};}function patchUpdates(_0x2ae695){return function(_0x2ebd91){try{jsonpatch[_0x01a8('0x2e')](_0x2ebd91,_0x2ae695,!![]);}catch(_0x5bab94){return BPromise[_0x01a8('0x2f')](_0x5bab94);}return _0x2ebd91['save']();};}function saveUpdates(_0x5198d9,_0x2380b2){return function(_0x180294){if(_0x180294){return _0x180294['update'](_0x5198d9)[_0x01a8('0x1a')](function(_0x4b3f7c){return _0x4b3f7c;});}return null;};}function removeEntity(_0xe5039d,_0x2f4239){return function(_0x14320e){if(_0x14320e){return _0x14320e[_0x01a8('0x30')]()['then'](function(){_0xe5039d[_0x01a8('0x26')](0xcc)[_0x01a8('0x27')]();});}};}function handleEntityNotFound(_0x32df6e,_0x1d275c){return function(_0x520a10){if(!_0x520a10){_0x32df6e['sendStatus'](0x194);}return _0x520a10;};}function handleError(_0xe992ef,_0x4a869a){_0x4a869a=_0x4a869a||0x1f4;return function(_0x155e8a){logger['error'](_0x155e8a[_0x01a8('0x31')]);if(_0x155e8a[_0x01a8('0x32')]){delete _0x155e8a['name'];}_0xe992ef[_0x01a8('0x26')](_0x4a869a)[_0x01a8('0x33')](_0x155e8a);};}exports[_0x01a8('0x34')]=function(_0x36cb05,_0x59665d){var _0x408a6f={},_0x4fe57a={},_0x354d63={'count':0x0,'rows':[]};var _0x281783=_['map'](db[_0x01a8('0x35')][_0x01a8('0x36')],function(_0x2a9b23){return{'name':_0x2a9b23['fieldName'],'type':_0x2a9b23[_0x01a8('0x37')][_0x01a8('0x38')]};});_0x4fe57a[_0x01a8('0x39')]=_[_0x01a8('0x3a')](_0x281783,_0x01a8('0x32'));_0x4fe57a[_0x01a8('0x3b')]=_[_0x01a8('0x3c')](_0x36cb05[_0x01a8('0x3b')]);_0x4fe57a[_0x01a8('0x3d')]=_['intersection'](_0x4fe57a[_0x01a8('0x39')],_0x4fe57a[_0x01a8('0x3b')]);_0x408a6f['attributes']=_[_0x01a8('0x3e')](_0x4fe57a['model'],qs[_0x01a8('0x3f')](_0x36cb05[_0x01a8('0x3b')][_0x01a8('0x3f')]));_0x408a6f[_0x01a8('0x40')]=_0x408a6f[_0x01a8('0x40')]['length']?_0x408a6f[_0x01a8('0x40')]:_0x4fe57a[_0x01a8('0x39')];if(!_0x36cb05['query'][_0x01a8('0x41')](_0x01a8('0x42'))){_0x408a6f[_0x01a8('0x2b')]=qs[_0x01a8('0x2b')](_0x36cb05[_0x01a8('0x3b')][_0x01a8('0x2b')]);_0x408a6f['offset']=qs[_0x01a8('0x2a')](_0x36cb05['query'][_0x01a8('0x2a')]);}_0x408a6f[_0x01a8('0x43')]=qs[_0x01a8('0x44')](_0x36cb05['query']['sort']);_0x408a6f['where']=qs[_0x01a8('0x3d')](_[_0x01a8('0x45')](_0x36cb05[_0x01a8('0x3b')],_0x4fe57a[_0x01a8('0x3d')]));if(_0x36cb05['query'][_0x01a8('0x46')]){_0x408a6f[_0x01a8('0x47')]=_['merge'](_0x408a6f[_0x01a8('0x47')],{'$or':_['map'](_0x281783,function(_0x531d3c){if(_0x531d3c['type']!==_0x01a8('0x48')){var _0x4b5490={};_0x4b5490[_0x531d3c[_0x01a8('0x32')]]={'$like':'%'+_0x36cb05['query'][_0x01a8('0x46')]+'%'};return _0x4b5490;}})});}_0x408a6f=_[_0x01a8('0x49')]({},_0x408a6f,_0x36cb05[_0x01a8('0x4a')]);var _0x23cb82={'where':_0x408a6f['where']};return db[_0x01a8('0x35')][_0x01a8('0x29')](_0x23cb82)['then'](function(_0xad55d){_0x354d63['count']=_0xad55d;if(_0x36cb05['query'][_0x01a8('0x4b')]){_0x408a6f['include']=[{'all':!![]}];}return db['Setting'][_0x01a8('0x4c')](_0x408a6f);})[_0x01a8('0x1a')](function(_0x51210d){_0x354d63[_0x01a8('0x4d')]=_0x51210d;return _0x354d63;})['then'](respondWithFilteredResult(_0x59665d,_0x408a6f))[_0x01a8('0x25')](handleError(_0x59665d,null));};exports['show']=function(_0x559da8,_0x9eec2a){var _0x22e31a={'raw':![],'where':{'id':_0x559da8['params']['id']}},_0x1cef79={};_0x1cef79['model']=_[_0x01a8('0x3c')](db[_0x01a8('0x35')][_0x01a8('0x36')]);_0x1cef79[_0x01a8('0x3b')]=_[_0x01a8('0x3c')](_0x559da8[_0x01a8('0x3b')]);_0x1cef79[_0x01a8('0x3d')]=_[_0x01a8('0x3e')](_0x1cef79[_0x01a8('0x39')],_0x1cef79[_0x01a8('0x3b')]);_0x22e31a[_0x01a8('0x40')]=_['intersection'](_0x1cef79[_0x01a8('0x39')],qs[_0x01a8('0x3f')](_0x559da8[_0x01a8('0x3b')][_0x01a8('0x3f')]));_0x22e31a[_0x01a8('0x40')]=_0x22e31a['attributes']['length']?_0x22e31a['attributes']:_0x1cef79[_0x01a8('0x39')];if(_0x559da8[_0x01a8('0x3b')][_0x01a8('0x4b')]){_0x22e31a[_0x01a8('0x4e')]=[{'all':!![]}];}_0x22e31a=_['merge']({},_0x22e31a,_0x559da8[_0x01a8('0x4a')]);return db[_0x01a8('0x35')][_0x01a8('0x4f')](_0x22e31a)[_0x01a8('0x1a')](handleEntityNotFound(_0x9eec2a,null))['then'](respondWithResult(_0x9eec2a,null))[_0x01a8('0x25')](handleError(_0x9eec2a,null));};exports[_0x01a8('0x50')]=function(_0x30d806,_0x471fe0){if(_0x30d806[_0x01a8('0x51')]['id']){delete _0x30d806[_0x01a8('0x51')]['id'];}return db[_0x01a8('0x35')]['find']({'where':{'id':_0x30d806[_0x01a8('0x52')]['id']}})['then'](handleEntityNotFound(_0x471fe0,null))[_0x01a8('0x1a')](saveUpdates(_0x30d806[_0x01a8('0x51')],null))[_0x01a8('0x1a')](respondWithResult(_0x471fe0,null))[_0x01a8('0x25')](handleError(_0x471fe0,null));};exports[_0x01a8('0x53')]=function(_0x19c433,_0x18c350,_0x6c6566){if(_0x19c433[_0x01a8('0x54')]&&_0x19c433['file'][_0x01a8('0x55')]){_0x19c433[_0x01a8('0x51')]['logo']=_0x19c433['file'][_0x01a8('0x55')];}return db[_0x01a8('0x35')]['find']({'where':{'id':_0x19c433[_0x01a8('0x52')]['id']}})[_0x01a8('0x1a')](handleEntityNotFound(_0x18c350,null))[_0x01a8('0x1a')](saveUpdates(_0x19c433[_0x01a8('0x51')],null))[_0x01a8('0x1a')](respondWithResult(_0x18c350,null))[_0x01a8('0x25')](handleError(_0x18c350,null));};exports['addLogoLogin']=function(_0x4abd81,_0x543b2c,_0x48387a){if(_0x4abd81[_0x01a8('0x54')]&&_0x4abd81[_0x01a8('0x54')][_0x01a8('0x55')]){_0x4abd81[_0x01a8('0x51')]['loginLogo']=_0x4abd81[_0x01a8('0x54')][_0x01a8('0x55')];}return db[_0x01a8('0x35')][_0x01a8('0x4f')]({'where':{'id':_0x4abd81[_0x01a8('0x52')]['id']}})[_0x01a8('0x1a')](handleEntityNotFound(_0x543b2c,null))[_0x01a8('0x1a')](saveUpdates(_0x4abd81[_0x01a8('0x51')],null))[_0x01a8('0x1a')](respondWithResult(_0x543b2c,null))['catch'](handleError(_0x543b2c,null));};var utilLicense=require(_0x01a8('0x56'));exports[_0x01a8('0x57')]=function(_0x1454c4,_0x285169,_0x33aac5){var _0x15c676=_0x01a8('0x58');var _0x34b037={'custom':![]};return utilLicense[_0x01a8('0x59')]()[_0x01a8('0x1a')](function(_0x155c57){if(_0x155c57){_0x34b037=_0x155c57;}return db[_0x01a8('0x35')][_0x01a8('0x4f')]({'where':{'id':_0x1454c4[_0x01a8('0x52')]['id']},'attributes':[_0x01a8('0x5a'),_0x01a8('0x5b'),_0x01a8('0x5c'),'favicon',_0x01a8('0x5d'),_0x01a8('0x5e'),_0x01a8('0x5f'),_0x01a8('0x60')],'raw':!![]});})[_0x01a8('0x1a')](handleEntityNotFound(_0x285169,null))[_0x01a8('0x1a')](function(_0x43c5a8){if(_0x43c5a8){var _0x52838e=_0x43c5a8[_0x01a8('0x5a')]&&fs[_0x01a8('0x61')](path['join'](config[_0x01a8('0x62')],_0x15c676,_[_0x01a8('0x63')](_0x43c5a8[_0x01a8('0x5a')])))?path['join'](config[_0x01a8('0x62')],_0x15c676,_[_0x01a8('0x63')](_0x43c5a8['logo'])):path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x15c676,_[_0x01a8('0x63')](_0x01a8('0x65')));var _0x35d169=_0x01a8('0x66')+_[_0x01a8('0x67')](_0x01a8('0x5a'));if(_0x43c5a8[_0x35d169]||!_0x34b037[_0x01a8('0x68')]){_0x52838e=path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x15c676,_[_0x01a8('0x63')](_0x01a8('0x65')));}if(!fs[_0x01a8('0x61')](_0x52838e)){throw new db[(_0x01a8('0x17'))][(_0x01a8('0x18'))](_[_0x01a8('0x67')]('logo')+'\x20not\x20found');}return _0x285169[_0x01a8('0x69')](_0x52838e);}})[_0x01a8('0x25')](handleError(_0x285169,null));};var utilLicense=require(_0x01a8('0x56'));exports[_0x01a8('0x6a')]=function(_0xc2846b,_0x3daa4f,_0xcac9e8){var _0x30535e=_0x01a8('0x58');var _0x264b5b={'custom':![]};return utilLicense[_0x01a8('0x59')]()['then'](function(_0x29e849){if(_0x29e849){_0x264b5b=_0x29e849;}return db[_0x01a8('0x35')][_0x01a8('0x4f')]({'where':{'id':_0xc2846b[_0x01a8('0x52')]['id']},'attributes':['logo',_0x01a8('0x5b'),_0x01a8('0x5c'),_0x01a8('0x6b'),'defaultLogo',_0x01a8('0x5e'),_0x01a8('0x5f'),_0x01a8('0x60')],'raw':!![]});})[_0x01a8('0x1a')](handleEntityNotFound(_0x3daa4f,null))['then'](function(_0x4918df){if(_0x4918df){var _0x2e7ac9=_0x4918df['loginLogo']&&fs[_0x01a8('0x61')](path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x30535e,_[_0x01a8('0x63')](_0x4918df['loginLogo'])))?path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x30535e,_['toLower'](_0x4918df[_0x01a8('0x5b')])):path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x30535e,_[_0x01a8('0x63')](_0x01a8('0x6c')));var _0x1eb7db='default'+_['upperFirst'](_0x01a8('0x5b'));if(_0x4918df[_0x1eb7db]||!_0x264b5b['custom']){_0x2e7ac9=path['join'](config[_0x01a8('0x62')],_0x30535e,_[_0x01a8('0x63')](_0x01a8('0x6c')));}if(!fs['existsSync'](_0x2e7ac9)){throw new db['Sequelize'][(_0x01a8('0x18'))](_[_0x01a8('0x67')]('loginLogo')+'\x20not\x20found');}return _0x3daa4f[_0x01a8('0x69')](_0x2e7ac9);}})['catch'](handleError(_0x3daa4f,null));};exports[_0x01a8('0x6d')]=function(_0x372889,_0x528e1f){return db['Setting']['find']({'where':{'id':_0x372889[_0x01a8('0x52')]['id']},'attributes':['securePassword']})[_0x01a8('0x1a')](respondWithResult(_0x528e1f,null))[_0x01a8('0x25')](handleError(_0x528e1f,null));};exports[_0x01a8('0x6e')]=function(_0x59d876,_0x3c286d,_0x20dc9b){if(_0x59d876[_0x01a8('0x54')]&&_0x59d876[_0x01a8('0x54')][_0x01a8('0x55')]){_0x59d876[_0x01a8('0x51')]['preferred']=_0x59d876['file']['filename'];}return db['Setting'][_0x01a8('0x4f')]({'where':{'id':_0x59d876[_0x01a8('0x52')]['id']}})[_0x01a8('0x1a')](handleEntityNotFound(_0x3c286d,null))[_0x01a8('0x1a')](saveUpdates(_0x59d876[_0x01a8('0x51')],null))[_0x01a8('0x1a')](respondWithResult(_0x3c286d,null))[_0x01a8('0x25')](handleError(_0x3c286d,null));};var utilLicense=require(_0x01a8('0x56'));exports[_0x01a8('0x6f')]=function(_0x583f38,_0x482c65,_0x3b9bae){var _0x5bdd23=_0x01a8('0x58');var _0x4fce37={'custom':![]};return utilLicense[_0x01a8('0x59')]()[_0x01a8('0x1a')](function(_0x1dbbb9){if(_0x1dbbb9){_0x4fce37=_0x1dbbb9;}return db['Setting']['find']({'where':{'id':_0x583f38['params']['id']},'attributes':['logo',_0x01a8('0x5b'),_0x01a8('0x5c'),_0x01a8('0x6b'),_0x01a8('0x5d'),_0x01a8('0x5e'),_0x01a8('0x5f'),'defaultFavicon'],'raw':!![]});})['then'](handleEntityNotFound(_0x482c65,null))[_0x01a8('0x1a')](function(_0x1f539a){if(_0x1f539a){var _0x3c6fd1=_0x1f539a[_0x01a8('0x5c')]&&fs[_0x01a8('0x61')](path[_0x01a8('0x64')](config['root'],_0x5bdd23,_[_0x01a8('0x63')](_0x1f539a[_0x01a8('0x5c')])))?path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x5bdd23,_[_0x01a8('0x63')](_0x1f539a[_0x01a8('0x5c')])):path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x5bdd23,_[_0x01a8('0x63')](_0x01a8('0x70')));var _0x35c62f=_0x01a8('0x66')+_[_0x01a8('0x67')](_0x01a8('0x5c'));if(_0x1f539a[_0x35c62f]||!_0x4fce37[_0x01a8('0x68')]||!_0x4fce37[_0x01a8('0x5c')]){_0x3c6fd1=path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x5bdd23,_[_0x01a8('0x63')]('default_preferred.png'));}if(!fs[_0x01a8('0x61')](_0x3c6fd1)){throw new db[(_0x01a8('0x17'))][(_0x01a8('0x18'))](_['upperFirst']('preferred')+_0x01a8('0x71'));}return _0x482c65['download'](_0x3c6fd1);}})[_0x01a8('0x25')](handleError(_0x482c65,null));};exports[_0x01a8('0x72')]=function(_0x2abb6a,_0x2e1a53,_0x18b12f){if(_0x2abb6a[_0x01a8('0x54')]&&_0x2abb6a[_0x01a8('0x54')][_0x01a8('0x55')]){_0x2abb6a[_0x01a8('0x51')]['favicon']=_0x2abb6a['file'][_0x01a8('0x55')];}return db[_0x01a8('0x35')][_0x01a8('0x4f')]({'where':{'id':_0x2abb6a['params']['id']}})[_0x01a8('0x1a')](handleEntityNotFound(_0x2e1a53,null))[_0x01a8('0x1a')](saveUpdates(_0x2abb6a['body'],null))[_0x01a8('0x1a')](respondWithResult(_0x2e1a53,null))[_0x01a8('0x25')](handleError(_0x2e1a53,null));};var utilLicense=require('../../config/license/util');exports[_0x01a8('0x73')]=function(_0x17739e,_0x2a2ab9,_0x1df5df){var _0x55d99e=_0x01a8('0x58');var _0x3cdc97={'custom':![]};return utilLicense[_0x01a8('0x59')]()[_0x01a8('0x1a')](function(_0xbf9364){if(_0xbf9364){_0x3cdc97=_0xbf9364;}return db[_0x01a8('0x35')][_0x01a8('0x4f')]({'where':{'id':_0x17739e['params']['id']},'attributes':[_0x01a8('0x5a'),_0x01a8('0x5b'),'preferred',_0x01a8('0x6b'),_0x01a8('0x5d'),_0x01a8('0x5e'),_0x01a8('0x5f'),_0x01a8('0x60')],'raw':!![]});})[_0x01a8('0x1a')](handleEntityNotFound(_0x2a2ab9,null))[_0x01a8('0x1a')](function(_0xcfca9b){if(_0xcfca9b){var _0xc5d53a=_0xcfca9b[_0x01a8('0x6b')]&&fs[_0x01a8('0x61')](path['join'](config[_0x01a8('0x62')],_0x55d99e,_[_0x01a8('0x63')](_0xcfca9b['favicon'])))?path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x55d99e,_['toLower'](_0xcfca9b['favicon'])):path[_0x01a8('0x64')](config['root'],_0x55d99e,_[_0x01a8('0x63')](_0x01a8('0x74')));var _0x29f98d=_0x01a8('0x66')+_[_0x01a8('0x67')](_0x01a8('0x6b'));if(_0xcfca9b[_0x29f98d]||!_0x3cdc97[_0x01a8('0x68')]){_0xc5d53a=path[_0x01a8('0x64')](config[_0x01a8('0x62')],_0x55d99e,_['toLower'](_0x01a8('0x74')));}if(!fs['existsSync'](_0xc5d53a)){throw new db['Sequelize'][(_0x01a8('0x18'))](_[_0x01a8('0x67')]('favicon')+_0x01a8('0x71'));}return _0x2a2ab9[_0x01a8('0x69')](_0xc5d53a);}})[_0x01a8('0x25')](handleError(_0x2a2ab9,null));};
\ No newline at end of file
diff --git a/server/api/setting/setting.model.js b/server/api/setting/setting.model.js
index 4dc702d..c0a92dd 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 _0x6614=['moment','request-promise','path','../../config/environment','./setting.attributes','exports','define','settings','lodash','util','../../config/logger'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x6614,0xef));var _0x4661=function(_0xb3c46e,_0x5c15f0){_0xb3c46e=_0xb3c46e-0x0;var _0x43ad16=_0x6614[_0xb3c46e];return _0x43ad16;};'use strict';var _=require(_0x4661('0x0'));var util=require(_0x4661('0x1'));var logger=require(_0x4661('0x2'))('api');var moment=require(_0x4661('0x3'));var BPromise=require('bluebird');var rp=require(_0x4661('0x4'));var fs=require('fs');var path=require(_0x4661('0x5'));var rimraf=require('rimraf');var config=require(_0x4661('0x6'));var attributes=require(_0x4661('0x7'));module[_0x4661('0x8')]=function(_0x27a3ef,_0x174035){return _0x27a3ef[_0x4661('0x9')]('Setting',attributes,{'tableName':_0x4661('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4311=['../../config/environment','exports','Setting','lodash','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x133277,_0xb1d6b2){var _0x5b4a22=function(_0x484c26){while(--_0x484c26){_0x133277['push'](_0x133277['shift']());}};_0x5b4a22(++_0xb1d6b2);}(_0x4311,0x161));var _0x1431=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x4311[_0x502c7d];return _0x30b7ed;};'use strict';var _=require(_0x1431('0x0'));var util=require('util');var logger=require(_0x1431('0x1'))(_0x1431('0x2'));var moment=require(_0x1431('0x3'));var BPromise=require(_0x1431('0x4'));var rp=require(_0x1431('0x5'));var fs=require('fs');var path=require(_0x1431('0x6'));var rimraf=require('rimraf');var config=require(_0x1431('0x7'));var attributes=require('./setting.attributes');module[_0x1431('0x8')]=function(_0x4f0bcb,_0x350070){return _0x4f0bcb['define'](_0x1431('0x9'),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 aed2691..63f676f 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 _0xe060=['ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','error','code','message','catch','util','bluebird','randomstring'];(function(_0x391992,_0x1a3feb){var _0x52000=function(_0x1a9a53){while(--_0x1a9a53){_0x391992['push'](_0x391992['shift']());}};_0x52000(++_0x1a3feb);}(_0xe060,0x13d));var _0x0e06=function(_0x2a390b,_0xf49f9b){_0x2a390b=_0x2a390b-0x0;var _0x5df10a=_0xe060[_0x2a390b];return _0x5df10a;};'use strict';var _=require('lodash');var util=require(_0x0e06('0x0'));var moment=require('moment');var BPromise=require(_0x0e06('0x1'));var rs=require(_0x0e06('0x2'));var fs=require('fs');var Redis=require(_0x0e06('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0e06('0x4'));var logger=require(_0x0e06('0x5'))(_0x0e06('0x6'));var config=require('../../config/environment');var jayson=require(_0x0e06('0x7'));var client=jayson[_0x0e06('0x8')][_0x0e06('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x541ccd,_0x170af7,_0x4565e1){return new BPromise(function(_0x3af938,_0x388a87){return client[_0x0e06('0xa')](_0x541ccd,_0x4565e1)[_0x0e06('0xb')](function(_0x5ab1c4){logger[_0x0e06('0xc')](_0x0e06('0xd'),_0x170af7,_0x0e06('0xe'));logger['debug'](_0x0e06('0xf'),_0x170af7,_0x0e06('0xe'),JSON['stringify'](_0x5ab1c4));if(_0x5ab1c4[_0x0e06('0x10')]){if(_0x5ab1c4[_0x0e06('0x10')][_0x0e06('0x11')]===0x1f4){logger[_0x0e06('0x10')](_0x0e06('0xd'),_0x170af7,_0x5ab1c4[_0x0e06('0x10')][_0x0e06('0x12')]);return _0x388a87(_0x5ab1c4[_0x0e06('0x10')][_0x0e06('0x12')]);}logger[_0x0e06('0x10')]('Setting,\x20%s,\x20%s',_0x170af7,_0x5ab1c4['error']['message']);return _0x3af938(_0x5ab1c4[_0x0e06('0x10')][_0x0e06('0x12')]);}else{logger[_0x0e06('0xc')](_0x0e06('0xd'),_0x170af7,_0x0e06('0xe'));_0x3af938(_0x5ab1c4['result']['message']);}})[_0x0e06('0x13')](function(_0x4e2911){logger[_0x0e06('0x10')]('Setting,\x20%s,\x20%s',_0x170af7,_0x4e2911);_0x388a87(_0x4e2911);});});}
\ No newline at end of file
+var _0xb514=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','Setting,\x20%s,\x20%s,\x20%s','error','code','message','Setting,\x20%s,\x20%s','request\x20sent','result','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0x36e92e,_0x17f709){var _0x95e2a8=function(_0x41a543){while(--_0x41a543){_0x36e92e['push'](_0x36e92e['shift']());}};_0x95e2a8(++_0x17f709);}(_0xb514,0x176));var _0x4b51=function(_0x3cb30b,_0x504b3e){_0x3cb30b=_0x3cb30b-0x0;var _0x2ca717=_0xb514[_0x3cb30b];return _0x2ca717;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x4b51('0x0'));var rs=require(_0x4b51('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4b51('0x2'))['db'];var utils=require(_0x4b51('0x3'));var logger=require(_0x4b51('0x4'))(_0x4b51('0x5'));var config=require(_0x4b51('0x6'));var jayson=require(_0x4b51('0x7'));var client=jayson[_0x4b51('0x8')][_0x4b51('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x307627,_0x158c2d,_0x2e4062){return new BPromise(function(_0x122490,_0x3493d5){return client[_0x4b51('0xa')](_0x307627,_0x2e4062)[_0x4b51('0xb')](function(_0x37d18b){logger[_0x4b51('0xc')]('Setting,\x20%s,\x20%s',_0x158c2d,'request\x20sent');logger[_0x4b51('0xd')](_0x4b51('0xe'),_0x158c2d,'request\x20sent',JSON['stringify'](_0x37d18b));if(_0x37d18b[_0x4b51('0xf')]){if(_0x37d18b[_0x4b51('0xf')][_0x4b51('0x10')]===0x1f4){logger[_0x4b51('0xf')]('Setting,\x20%s,\x20%s',_0x158c2d,_0x37d18b[_0x4b51('0xf')][_0x4b51('0x11')]);return _0x3493d5(_0x37d18b[_0x4b51('0xf')][_0x4b51('0x11')]);}logger['error']('Setting,\x20%s,\x20%s',_0x158c2d,_0x37d18b[_0x4b51('0xf')][_0x4b51('0x11')]);return _0x122490(_0x37d18b[_0x4b51('0xf')]['message']);}else{logger[_0x4b51('0xc')](_0x4b51('0x12'),_0x158c2d,_0x4b51('0x13'));_0x122490(_0x37d18b[_0x4b51('0x14')][_0x4b51('0x11')]);}})['catch'](function(_0x58a4d7){logger[_0x4b51('0xf')](_0x4b51('0x12'),_0x158c2d,_0x58a4d7);_0x3493d5(_0x58a4d7);});});}
\ No newline at end of file
diff --git a/server/api/smsAccount/index.js b/server/api/smsAccount/index.js
index e5f2d25..d069c06 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 _0xb2bb=['../../components/auth/service','../../components/interaction/service','./smsAccount.controller','get','index','/describe','isAuthenticated','describe','/:id','show','/:id/dispositions','getDispositions','getAnswers','/:id/applications','getApplications','/:id/interactions','getInteractions','/:id/status','statusGet','post','create','addDisposition','/:id/canned_answers','/:id/notify','addApplications','/:id/send','send','status','/:id/users','addAgents','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','multer','express','Router'];(function(_0x4cd8af,_0x29347c){var _0x2c6c7f=function(_0x3bdac8){while(--_0x3bdac8){_0x4cd8af['push'](_0x4cd8af['shift']());}};_0x2c6c7f(++_0x29347c);}(_0xb2bb,0x183));var _0xbb2b=function(_0x136619,_0x31c9b2){_0x136619=_0x136619-0x0;var _0x38c4a5=_0xb2bb[_0x136619];return _0x38c4a5;};'use strict';var multer=require(_0xbb2b('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xbb2b('0x1'));var router=express[_0xbb2b('0x2')]();var auth=require(_0xbb2b('0x3'));var interaction=require(_0xbb2b('0x4'));var config=require('../../config/environment');var controller=require(_0xbb2b('0x5'));router[_0xbb2b('0x6')]('/',auth['isAuthenticated'](),controller[_0xbb2b('0x7')]);router['get'](_0xbb2b('0x8'),auth[_0xbb2b('0x9')](),controller[_0xbb2b('0xa')]);router[_0xbb2b('0x6')](_0xbb2b('0xb'),auth[_0xbb2b('0x9')](),controller[_0xbb2b('0xc')]);router[_0xbb2b('0x6')](_0xbb2b('0xd'),auth['isAuthenticated'](),controller[_0xbb2b('0xe')]);router[_0xbb2b('0x6')]('/:id/canned_answers',auth[_0xbb2b('0x9')](),controller[_0xbb2b('0xf')]);router[_0xbb2b('0x6')](_0xbb2b('0x10'),auth['isAuthenticated'](),controller[_0xbb2b('0x11')]);router[_0xbb2b('0x6')](_0xbb2b('0x12'),auth[_0xbb2b('0x9')](),controller[_0xbb2b('0x13')]);router['get'](_0xbb2b('0x14'),controller[_0xbb2b('0x15')]);router[_0xbb2b('0x6')]('/:id/users',auth[_0xbb2b('0x9')](),controller['getAgents']);router[_0xbb2b('0x16')]('/',auth['isAuthenticated'](),controller[_0xbb2b('0x17')]);router[_0xbb2b('0x16')](_0xbb2b('0xd'),auth[_0xbb2b('0x9')](),controller[_0xbb2b('0x18')]);router['post'](_0xbb2b('0x19'),auth[_0xbb2b('0x9')](),controller['addAnswer']);router['post'](_0xbb2b('0x1a'),controller['notify']);router['post'](_0xbb2b('0x10'),auth[_0xbb2b('0x9')](),controller[_0xbb2b('0x1b')]);router['post'](_0xbb2b('0x1c'),auth['isAuthenticated'](),controller[_0xbb2b('0x1d')]);router[_0xbb2b('0x16')](_0xbb2b('0x14'),controller[_0xbb2b('0x1e')]);router['post'](_0xbb2b('0x1f'),auth['isAuthenticated'](),controller[_0xbb2b('0x20')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xbb2b('0x21')]);router[_0xbb2b('0x22')](_0xbb2b('0xb'),auth[_0xbb2b('0x9')](),controller[_0xbb2b('0x23')]);router[_0xbb2b('0x22')](_0xbb2b('0xd'),auth[_0xbb2b('0x9')](),controller[_0xbb2b('0x24')]);router[_0xbb2b('0x22')]('/:id/canned_answers',auth[_0xbb2b('0x9')](),controller[_0xbb2b('0x25')]);router['delete']('/:id/users',auth['isAuthenticated'](),controller[_0xbb2b('0x26')]);module['exports']=router;
\ No newline at end of file
+var _0x40d9=['getAnswers','/:id/applications','/:id/interactions','getInteractions','/:id/users','getAgents','post','create','addDisposition','/:id/notify','notify','addApplications','/:id/send','send','/:id/status','status','addAgents','put','/:id','delete','destroy','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsAccount.controller','isAuthenticated','index','get','describe','show','/:id/dispositions','/:id/canned_answers'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x40d9,0xa1));var _0x940d=function(_0xe4257e,_0x2003c2){_0xe4257e=_0xe4257e-0x0;var _0x54ddab=_0x40d9[_0xe4257e];return _0x54ddab;};'use strict';var multer=require('multer');var util=require(_0x940d('0x0'));var path=require(_0x940d('0x1'));var timeout=require('connect-timeout');var express=require(_0x940d('0x2'));var router=express['Router']();var auth=require(_0x940d('0x3'));var interaction=require(_0x940d('0x4'));var config=require(_0x940d('0x5'));var controller=require(_0x940d('0x6'));router['get']('/',auth[_0x940d('0x7')](),controller[_0x940d('0x8')]);router[_0x940d('0x9')]('/describe',auth[_0x940d('0x7')](),controller[_0x940d('0xa')]);router[_0x940d('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x940d('0xb')]);router[_0x940d('0x9')](_0x940d('0xc'),auth[_0x940d('0x7')](),controller['getDispositions']);router[_0x940d('0x9')](_0x940d('0xd'),auth[_0x940d('0x7')](),controller[_0x940d('0xe')]);router['get'](_0x940d('0xf'),auth[_0x940d('0x7')](),controller['getApplications']);router[_0x940d('0x9')](_0x940d('0x10'),auth['isAuthenticated'](),controller[_0x940d('0x11')]);router[_0x940d('0x9')]('/:id/status',controller['statusGet']);router[_0x940d('0x9')](_0x940d('0x12'),auth[_0x940d('0x7')](),controller[_0x940d('0x13')]);router[_0x940d('0x14')]('/',auth[_0x940d('0x7')](),controller[_0x940d('0x15')]);router[_0x940d('0x14')]('/:id/dispositions',auth[_0x940d('0x7')](),controller[_0x940d('0x16')]);router[_0x940d('0x14')](_0x940d('0xd'),auth['isAuthenticated'](),controller['addAnswer']);router[_0x940d('0x14')](_0x940d('0x17'),controller[_0x940d('0x18')]);router[_0x940d('0x14')]('/:id/applications',auth[_0x940d('0x7')](),controller[_0x940d('0x19')]);router[_0x940d('0x14')](_0x940d('0x1a'),auth[_0x940d('0x7')](),controller[_0x940d('0x1b')]);router[_0x940d('0x14')](_0x940d('0x1c'),controller[_0x940d('0x1d')]);router[_0x940d('0x14')](_0x940d('0x12'),auth['isAuthenticated'](),controller[_0x940d('0x1e')]);router[_0x940d('0x1f')](_0x940d('0x20'),auth['isAuthenticated'](),controller['update']);router[_0x940d('0x21')]('/:id',auth[_0x940d('0x7')](),controller[_0x940d('0x22')]);router['delete'](_0x940d('0xc'),auth[_0x940d('0x7')](),controller['removeDispositions']);router[_0x940d('0x21')](_0x940d('0xd'),auth[_0x940d('0x7')](),controller['removeAnswers']);router[_0x940d('0x21')](_0x940d('0x12'),auth[_0x940d('0x7')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.attributes.js b/server/api/smsAccount/smsAccount.attributes.js
index 09f4873..87db651 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 _0x3726=['mandatoryDispositionPauseId','randomstring','exports','STRING','name','generate','ENUM','twilio','skebby','connectel','clicksend','plivo','clickatell','csc','infobip','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'];(function(_0x5cffe0,_0x171828){var _0x5db91f=function(_0x281b30){while(--_0x281b30){_0x5cffe0['push'](_0x5cffe0['shift']());}};_0x5db91f(++_0x171828);}(_0x3726,0x1e1));var _0x6372=function(_0x57fc5c,_0x1981a0){_0x57fc5c=_0x57fc5c-0x0;var _0xc96d84=_0x3726[_0x57fc5c];return _0xc96d84;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x6372('0x0'));module[_0x6372('0x1')]={'name':{'type':Sequelize[_0x6372('0x2')],'unique':_0x6372('0x3'),'allowNull':![]},'key':{'type':Sequelize[_0x6372('0x2')],'allowNull':![]},'remote':{'type':Sequelize[_0x6372('0x2')],'allowNull':![]},'token':{'type':Sequelize[_0x6372('0x2')],'defaultValue':function(){return rs[_0x6372('0x4')]();}},'phone':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x6372('0x5')](_0x6372('0x6'),_0x6372('0x7'),_0x6372('0x8'),_0x6372('0x9'),_0x6372('0xa'),_0x6372('0xb'),_0x6372('0xc'),_0x6372('0xd'),'intelepeer')},'accountSid':{'type':Sequelize[_0x6372('0x2')]},'authId':{'type':Sequelize[_0x6372('0x2')]},'authToken':{'type':Sequelize['STRING']},'smsMethod':{'type':Sequelize[_0x6372('0x5')]('SI','TI','GP')},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize['STRING']},'apiKey':{'type':Sequelize[_0x6372('0x2')]},'senderString':{'type':Sequelize[_0x6372('0x2')]},'deliveryReport':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'description':{'type':Sequelize[_0x6372('0x2')]},'notificationTemplate':{'type':Sequelize[_0x6372('0xe')],'defaultValue':function(){return _0x6372('0xf');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x6372('0x10')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x6372('0x11')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x6372('0x10')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x6372('0x11')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize['STRING']},'mandatoryDispositionPauseId':{'type':Sequelize[_0x6372('0x11')],'comment':_0x6372('0x12')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x52e82d){if(!_0x52e82d)this['setDataValue'](_0x6372('0x13'),null);this['setDataValue']('mandatoryDisposition',_0x52e82d);}}};
\ No newline at end of file
+var _0xbc17=['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','sequelize','randomstring','exports','STRING','generate','ENUM','skebby','clicksend','plivo','clickatell','csc','infobip','intelepeer','BOOLEAN'];(function(_0x4882c9,_0x3c0b40){var _0x3fab3c=function(_0x4b13b5){while(--_0x4b13b5){_0x4882c9['push'](_0x4882c9['shift']());}};_0x3fab3c(++_0x3c0b40);}(_0xbc17,0xee));var _0x7bc1=function(_0x31cdff,_0x545438){_0x31cdff=_0x31cdff-0x0;var _0x14091f=_0xbc17[_0x31cdff];return _0x14091f;};'use strict';var Sequelize=require(_0x7bc1('0x0'));var rs=require(_0x7bc1('0x1'));module[_0x7bc1('0x2')]={'name':{'type':Sequelize[_0x7bc1('0x3')],'unique':'name','allowNull':![]},'key':{'type':Sequelize[_0x7bc1('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x7bc1('0x3')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x7bc1('0x4')]();}},'phone':{'type':Sequelize[_0x7bc1('0x3')]},'type':{'type':Sequelize[_0x7bc1('0x5')]('twilio',_0x7bc1('0x6'),'connectel',_0x7bc1('0x7'),_0x7bc1('0x8'),_0x7bc1('0x9'),_0x7bc1('0xa'),_0x7bc1('0xb'),_0x7bc1('0xc'))},'accountSid':{'type':Sequelize[_0x7bc1('0x3')]},'authId':{'type':Sequelize['STRING']},'authToken':{'type':Sequelize[_0x7bc1('0x3')]},'smsMethod':{'type':Sequelize[_0x7bc1('0x5')]('SI','TI','GP')},'username':{'type':Sequelize[_0x7bc1('0x3')]},'password':{'type':Sequelize['STRING']},'apiKey':{'type':Sequelize[_0x7bc1('0x3')]},'senderString':{'type':Sequelize[_0x7bc1('0x3')]},'deliveryReport':{'type':Sequelize[_0x7bc1('0xd')],'defaultValue':![]},'description':{'type':Sequelize[_0x7bc1('0x3')]},'notificationTemplate':{'type':Sequelize[_0x7bc1('0xe')],'defaultValue':function(){return _0x7bc1('0xf');}},'notificationSound':{'type':Sequelize[_0x7bc1('0xd')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x7bc1('0xd')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x7bc1('0x10')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x7bc1('0x10')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x7bc1('0xd')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x7bc1('0x10')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0x7bc1('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x7bc1('0x10')],'comment':_0x7bc1('0x11')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x7bc1('0x12'),'set':function(_0x168d5b){if(!_0x168d5b)this[_0x7bc1('0x13')](_0x7bc1('0x14'),null);this[_0x7bc1('0x13')]('mandatoryDisposition',_0x168d5b);}}};
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.controller.js b/server/api/smsAccount/smsAccount.controller.js
index dde3a72..f4a5c0b 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 _0x8cda=['getApplications','getInteractions','Contact','fullname','internal','Tag','color','tag','to\x20is\x20mandatory','DESC','List','Messages','SmsMessage','dataValues','push','log','endpoint\x20/status\x20POST\x20/','skebby_dispatch_id','requestid','statusInt','clicksend','status_code','groupName','DELIVERED','intelepeer','redif','inspect','ACCEPTD','message-id','state','addAgents','emit','userSmsAccount:save','removeAgents','isArray','userSmsAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','jayson/promise','http','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','sendStatus','status','end','json','limit','set','Content-Range','reject','save','update','destroy','get','SmsAccounts','UserProfileResource','name','send','index','map','SmsAccount','rawAttributes','fieldName','type','key','query','filters','intersection','model','fields','attributes','length','offset','order','where','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','show','params','Pause','mandatoryDispositionPause','keys','find','create','role','user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','SmsAccountId','Disposition','getDispositions','findOne','hasOwnProperty','sort','pick','removeDispositions','addAnswer','CannedAnswer','getAnswers','nolimit','removeAnswers','ids','sms','SmsApplication','account','applications','orderBy','Applications','CmContact','Sequelize','no\x20available\x20attributes','difference','createdAt','updatedAt','ListId','mobile','twilio','from','From','Body','skebby','sender','text','connectel','messageId','message_id','plivo','Text','MessageUUID','infobip','results','csc','originatingAddress','segmentedMessage','clickatell','fromNumber','replyMessageId','refid','isNil','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','list','omit','contact','SmsInteraction','spread','interaction','created','unmanaged','*,*,*,*','ContactId','AttachmentId','User','UserId','agent','waitForTheAssignedAgent','Start','startRouting','receiveMessage','entity\x20found','stringify','Content-Type','text/xml','addApplications','sequelize','transaction','bulkCreate','findAndCountAll','priority'];(function(_0x209fbf,_0x3ac008){var _0x4d7573=function(_0x3be425){while(--_0x3be425){_0x209fbf['push'](_0x209fbf['shift']());}};_0x4d7573(++_0x3ac008);}(_0x8cda,0x1db));var _0xa8cd=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x8cda[_0x20a584];return _0x4b41a8;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xa8cd('0x0'));var rimraf=require(_0xa8cd('0x1'));var zipdir=require(_0xa8cd('0x2'));var jsonpatch=require(_0xa8cd('0x3'));var rp=require(_0xa8cd('0x4'));var moment=require(_0xa8cd('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xa8cd('0x6'));var util=require(_0xa8cd('0x7'));var path=require(_0xa8cd('0x8'));var sox=require('sox');var csv=require(_0xa8cd('0x9'));var ejs=require(_0xa8cd('0xa'));var fs=require('fs');var _=require(_0xa8cd('0xb'));var squel=require(_0xa8cd('0xc'));var crypto=require(_0xa8cd('0xd'));var jsforce=require(_0xa8cd('0xe'));var deskjs=require(_0xa8cd('0xf'));var toCsv=require(_0xa8cd('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xa8cd('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xa8cd('0x11'));var hardwareService=require(_0xa8cd('0x12'));var logger=require('../../config/logger')(_0xa8cd('0x13'));var utils=require(_0xa8cd('0x14'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0xa8cd('0x15')]=_[_0xa8cd('0x16')](config[_0xa8cd('0x15')],{'host':_0xa8cd('0x17'),'port':0x18eb});var socket=require(_0xa8cd('0x18'))(new Redis(config['redis']));require(_0xa8cd('0x19'))['register'](socket);var jayson=require(_0xa8cd('0x1a'));var client=jayson['client'][_0xa8cd('0x1b')]({'port':0x232c});function checkPasswordPattern(_0x52d73b,_0x1970c1,_0x4f244b){if(_0x4f244b){var _0x9fe9b0=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x9fe9b0['test'](_0x1970c1)){return _0x52d73b;}else{throw new db['Sequelize'][(_0xa8cd('0x1c'))](_0xa8cd('0x1d'));}}else{return _0x52d73b;}}function respondWithRpcPromise(_0x2494cf,_0x177ca2,_0x55c494,_0x128a90){return new BPromise(function(_0x52252b,_0x1cacd5){var _0x2ef224=_0x128a90||client;return _0x2ef224['request'](_0x2494cf,_0x55c494)[_0xa8cd('0x1e')](function(_0x1260e5){logger['info'](_0xa8cd('0x1f'),_0x177ca2,_0xa8cd('0x20'));logger[_0xa8cd('0x21')](_0xa8cd('0x22'),_0x177ca2,_0xa8cd('0x20'),JSON['stringify'](_0x1260e5));if(_0x1260e5[_0xa8cd('0x23')]){if(_0x1260e5[_0xa8cd('0x23')][_0xa8cd('0x24')]===0x1f4){logger[_0xa8cd('0x23')]('SmsAccount,\x20%s,\x20%s',_0x177ca2,_0x1260e5[_0xa8cd('0x23')]['message']);return _0x1cacd5(_0x1260e5['error'][_0xa8cd('0x25')]);}logger[_0xa8cd('0x23')]('SmsAccount,\x20%s,\x20%s',_0x177ca2,_0x1260e5[_0xa8cd('0x23')][_0xa8cd('0x25')]);return _0x52252b(_0x1260e5[_0xa8cd('0x23')][_0xa8cd('0x25')]);}else{logger[_0xa8cd('0x26')](_0xa8cd('0x1f'),_0x177ca2,_0xa8cd('0x20'));_0x52252b(_0x1260e5['result'][_0xa8cd('0x25')]);}})[_0xa8cd('0x27')](function(_0x3c4c22){logger[_0xa8cd('0x23')](_0xa8cd('0x1f'),_0x177ca2,_0x3c4c22);_0x1cacd5(_0x3c4c22);});});}function respondWithStatusCode(_0x433a5d,_0x4e5230){_0x4e5230=_0x4e5230||0xcc;return function(_0x38946b){if(_0x38946b){return _0x433a5d[_0xa8cd('0x28')](_0x4e5230);}return _0x433a5d[_0xa8cd('0x29')](_0x4e5230)[_0xa8cd('0x2a')]();};}function respondWithResult(_0xe973cb,_0x2241f8){_0x2241f8=_0x2241f8||0xc8;return function(_0x3285d8){if(_0x3285d8){return _0xe973cb[_0xa8cd('0x29')](_0x2241f8)[_0xa8cd('0x2b')](_0x3285d8);}};}function respondWithFilteredResult(_0x22cf82,_0x31cab1){return function(_0x9e953f){if(_0x9e953f){var _0x471052=_0x9e953f['count'],_0x44ea2f=_0x31cab1['offset'],_0x2b4c53=_0x31cab1['offset']+_0x31cab1[_0xa8cd('0x2c')],_0x3c188f;if(_0x2b4c53>=_0x471052){_0x2b4c53=_0x471052;_0x3c188f=0xc8;}else{_0x3c188f=0xce;}_0x22cf82[_0xa8cd('0x29')](_0x3c188f);return _0x22cf82[_0xa8cd('0x2d')](_0xa8cd('0x2e'),_0x44ea2f+'-'+_0x2b4c53+'/'+_0x471052)[_0xa8cd('0x2b')](_0x9e953f);}return null;};}function patchUpdates(_0x3ffa3e){return function(_0x53830e){try{jsonpatch['apply'](_0x53830e,_0x3ffa3e,!![]);}catch(_0x48c9c1){return BPromise[_0xa8cd('0x2f')](_0x48c9c1);}return _0x53830e[_0xa8cd('0x30')]();};}function saveUpdates(_0x251eb6,_0x10b5a7){return function(_0x266e05){if(_0x266e05){return _0x266e05[_0xa8cd('0x31')](_0x251eb6)[_0xa8cd('0x1e')](function(_0x572862){return _0x572862;});}return null;};}function removeEntity(_0x446d5c,_0x25c91d){return function(_0x5bbe35){if(_0x5bbe35){return _0x5bbe35[_0xa8cd('0x32')]()[_0xa8cd('0x1e')](function(){var _0x2ae8ed=_0x5bbe35[_0xa8cd('0x33')]({'plain':!![]});var _0x49d00e=_0xa8cd('0x34');return db[_0xa8cd('0x35')]['destroy']({'where':{'type':_0x49d00e,'resourceId':_0x2ae8ed['id']}})[_0xa8cd('0x1e')](function(){return _0x5bbe35;});})[_0xa8cd('0x1e')](function(){_0x446d5c[_0xa8cd('0x29')](0xcc)[_0xa8cd('0x2a')]();});}};}function handleEntityNotFound(_0x5b1245,_0x5136d9){return function(_0x334f52){if(!_0x334f52){_0x5b1245['sendStatus'](0x194);}return _0x334f52;};}function handleError(_0x103a20,_0x5f588e){_0x5f588e=_0x5f588e||0x1f4;return function(_0x12d37f){logger[_0xa8cd('0x23')](_0x12d37f['stack']);if(_0x12d37f[_0xa8cd('0x36')]){delete _0x12d37f[_0xa8cd('0x36')];}_0x103a20[_0xa8cd('0x29')](_0x5f588e)[_0xa8cd('0x37')](_0x12d37f);};}exports[_0xa8cd('0x38')]=function(_0x10e92e,_0x1b595e){var _0x5100d5={'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x2437b0={},_0x140879={'count':0x0,'rows':[]};var _0x111621=_[_0xa8cd('0x39')](db[_0xa8cd('0x3a')][_0xa8cd('0x3b')],function(_0x26274f){return{'name':_0x26274f[_0xa8cd('0x3c')],'type':_0x26274f[_0xa8cd('0x3d')][_0xa8cd('0x3e')]};});_0x2437b0['model']=_[_0xa8cd('0x39')](_0x111621,'name');_0x2437b0[_0xa8cd('0x3f')]=_['keys'](_0x10e92e[_0xa8cd('0x3f')]);_0x2437b0[_0xa8cd('0x40')]=_[_0xa8cd('0x41')](_0x2437b0[_0xa8cd('0x42')],_0x2437b0['query']);_0x5100d5['attributes']=_['intersection'](_0x2437b0['model'],qs[_0xa8cd('0x43')](_0x10e92e[_0xa8cd('0x3f')]['fields']));_0x5100d5[_0xa8cd('0x44')]=_0x5100d5[_0xa8cd('0x44')][_0xa8cd('0x45')]?_0x5100d5[_0xa8cd('0x44')]:_0x2437b0[_0xa8cd('0x42')];if(!_0x10e92e[_0xa8cd('0x3f')]['hasOwnProperty']('nolimit')){_0x5100d5[_0xa8cd('0x2c')]=qs[_0xa8cd('0x2c')](_0x10e92e[_0xa8cd('0x3f')][_0xa8cd('0x2c')]);_0x5100d5['offset']=qs[_0xa8cd('0x46')](_0x10e92e[_0xa8cd('0x3f')][_0xa8cd('0x46')]);}_0x5100d5[_0xa8cd('0x47')]=qs['sort'](_0x10e92e['query']['sort']);_0x5100d5[_0xa8cd('0x48')]=qs[_0xa8cd('0x40')](_['pick'](_0x10e92e[_0xa8cd('0x3f')],_0x2437b0[_0xa8cd('0x40')]));if(_0x10e92e[_0xa8cd('0x3f')][_0xa8cd('0x49')]){_0x5100d5[_0xa8cd('0x48')]=_[_0xa8cd('0x4a')](_0x5100d5['where'],{'$or':_['map'](_0x111621,function(_0x541401){if(_0x541401[_0xa8cd('0x3d')]!==_0xa8cd('0x4b')){var _0x97f52a={};_0x97f52a[_0x541401[_0xa8cd('0x36')]]={'$like':'%'+_0x10e92e[_0xa8cd('0x3f')][_0xa8cd('0x49')]+'%'};return _0x97f52a;}})});}_0x5100d5=_[_0xa8cd('0x4a')]({},_0x5100d5,_0x10e92e[_0xa8cd('0x4c')]);var _0x125d4d={'where':_0x5100d5['where']};return db['SmsAccount'][_0xa8cd('0x4d')](_0x125d4d)['then'](function(_0x227ba8){_0x140879[_0xa8cd('0x4d')]=_0x227ba8;if(_0x10e92e[_0xa8cd('0x3f')][_0xa8cd('0x4e')]){_0x5100d5[_0xa8cd('0x4f')]=[{'all':!![]}];}return db['SmsAccount'][_0xa8cd('0x50')](_0x5100d5);})['then'](function(_0x128d2b){_0x140879[_0xa8cd('0x51')]=_0x128d2b;return _0x140879;})[_0xa8cd('0x1e')](respondWithFilteredResult(_0x1b595e,_0x5100d5))[_0xa8cd('0x27')](handleError(_0x1b595e,null));};exports[_0xa8cd('0x52')]=function(_0x3c0177,_0x16a7b4){var _0x152464={'raw':![],'where':{'id':_0x3c0177[_0xa8cd('0x53')]['id']},'include':[{'model':db[_0xa8cd('0x54')],'as':_0xa8cd('0x55')}]},_0x101d4d={};_0x101d4d[_0xa8cd('0x42')]=_[_0xa8cd('0x56')](db[_0xa8cd('0x3a')]['rawAttributes']);_0x101d4d['query']=_[_0xa8cd('0x56')](_0x3c0177[_0xa8cd('0x3f')]);_0x101d4d['filters']=_[_0xa8cd('0x41')](_0x101d4d[_0xa8cd('0x42')],_0x101d4d['query']);_0x152464[_0xa8cd('0x44')]=_[_0xa8cd('0x41')](_0x101d4d[_0xa8cd('0x42')],qs['fields'](_0x3c0177[_0xa8cd('0x3f')][_0xa8cd('0x43')]));_0x152464[_0xa8cd('0x44')]=_0x152464[_0xa8cd('0x44')][_0xa8cd('0x45')]?_0x152464[_0xa8cd('0x44')]:_0x101d4d['model'];if(_0x3c0177[_0xa8cd('0x3f')][_0xa8cd('0x4e')]){_0x152464[_0xa8cd('0x4f')]=[{'all':!![]}];}_0x152464=_[_0xa8cd('0x4a')]({},_0x152464,_0x3c0177[_0xa8cd('0x4c')]);return db['SmsAccount'][_0xa8cd('0x57')](_0x152464)['then'](handleEntityNotFound(_0x16a7b4,null))[_0xa8cd('0x1e')](respondWithResult(_0x16a7b4,null))[_0xa8cd('0x27')](handleError(_0x16a7b4,null));};exports['create']=function(_0x29bcf7,_0x2ad797){return db[_0xa8cd('0x3a')][_0xa8cd('0x58')](_0x29bcf7['body'],{})[_0xa8cd('0x1e')](function(_0x53f6f6){var _0x44caf0=_0x29bcf7['user']['get']({'plain':!![]});if(!_0x44caf0)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x44caf0[_0xa8cd('0x59')]===_0xa8cd('0x5a')){var _0x1f9d44=_0x53f6f6[_0xa8cd('0x33')]({'plain':!![]});var _0x36b866='SmsAccounts';return db[_0xa8cd('0x5b')][_0xa8cd('0x57')]({'where':{'name':_0x36b866,'userProfileId':_0x44caf0[_0xa8cd('0x5c')]},'raw':!![]})[_0xa8cd('0x1e')](function(_0x353fd1){if(_0x353fd1&&_0x353fd1['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x1f9d44[_0xa8cd('0x36')],'resourceId':_0x1f9d44['id'],'type':_0x353fd1[_0xa8cd('0x36')],'sectionId':_0x353fd1['id']},{})[_0xa8cd('0x1e')](function(){return _0x53f6f6;});}else{return _0x53f6f6;}})[_0xa8cd('0x27')](function(_0x1f4ec9){logger[_0xa8cd('0x23')](_0xa8cd('0x5d'),_0x1f4ec9);throw _0x1f4ec9;});}return _0x53f6f6;})[_0xa8cd('0x1e')](respondWithResult(_0x2ad797,0xc9))['catch'](handleError(_0x2ad797,null));};exports[_0xa8cd('0x31')]=function(_0x210870,_0x11b1ed){if(_0x210870[_0xa8cd('0x5e')]['id']){delete _0x210870['body']['id'];}return db['SmsAccount']['find']({'where':{'id':_0x210870[_0xa8cd('0x53')]['id']},'include':[{'model':db['Pause'],'as':_0xa8cd('0x55')}]})[_0xa8cd('0x1e')](handleEntityNotFound(_0x11b1ed,null))[_0xa8cd('0x1e')](saveUpdates(_0x210870[_0xa8cd('0x5e')],null))[_0xa8cd('0x1e')](respondWithResult(_0x11b1ed,null))[_0xa8cd('0x27')](handleError(_0x11b1ed,null));};exports[_0xa8cd('0x32')]=function(_0x107a3f,_0x58ea63){return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x107a3f[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x58ea63,null))['then'](removeEntity(_0x58ea63,null))['catch'](handleError(_0x58ea63,null));};exports[_0xa8cd('0x5f')]=function(_0x4f2c47,_0x3b7fa4){return db[_0xa8cd('0x3a')][_0xa8cd('0x5f')]()[_0xa8cd('0x1e')](respondWithResult(_0x3b7fa4,null))[_0xa8cd('0x27')](handleError(_0x3b7fa4,null));};exports['addDisposition']=function(_0x37c733,_0x1dcb95,_0x1cb2c9){if(_0x37c733[_0xa8cd('0x5e')]['id']){delete _0x37c733[_0xa8cd('0x5e')]['id'];}return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x37c733['params']['id']}})['then'](handleEntityNotFound(_0x1dcb95,null))[_0xa8cd('0x1e')](function(_0x381fc9){if(_0x381fc9){_0x37c733[_0xa8cd('0x5e')][_0xa8cd('0x60')]=_0x381fc9['id'];return db[_0xa8cd('0x61')]['create'](_0x37c733[_0xa8cd('0x5e')]);}})['then'](respondWithResult(_0x1dcb95,null))['catch'](handleError(_0x1dcb95,null));};exports[_0xa8cd('0x62')]=function(_0x5d5f87,_0x37d816,_0xcea569){var _0x25fc91={'raw':![],'where':{}};var _0x1c284a={};var _0x40f204={'count':0x0,'rows':[]};return db['SmsAccount'][_0xa8cd('0x63')]({'where':{'id':_0x5d5f87['params']['id']}})['then'](handleEntityNotFound(_0x37d816,null))[_0xa8cd('0x1e')](function(_0x20ff08){if(_0x20ff08){_0x1c284a[_0xa8cd('0x42')]=_[_0xa8cd('0x56')](db['Disposition'][_0xa8cd('0x3b')]);_0x1c284a['query']=_[_0xa8cd('0x56')](_0x5d5f87[_0xa8cd('0x3f')]);_0x1c284a['filters']=_[_0xa8cd('0x41')](_0x1c284a[_0xa8cd('0x42')],_0x1c284a[_0xa8cd('0x3f')]);_0x25fc91[_0xa8cd('0x44')]=_[_0xa8cd('0x41')](_0x1c284a[_0xa8cd('0x42')],qs[_0xa8cd('0x43')](_0x5d5f87[_0xa8cd('0x3f')]['fields']));_0x25fc91[_0xa8cd('0x44')]=_0x25fc91['attributes'][_0xa8cd('0x45')]?_0x25fc91['attributes']:_0x1c284a[_0xa8cd('0x42')];if(!_0x5d5f87[_0xa8cd('0x3f')][_0xa8cd('0x64')]('nolimit')){_0x25fc91[_0xa8cd('0x2c')]=qs['limit'](_0x5d5f87[_0xa8cd('0x3f')][_0xa8cd('0x2c')]);_0x25fc91[_0xa8cd('0x46')]=qs[_0xa8cd('0x46')](_0x5d5f87['query']['offset']);}_0x25fc91['order']=qs[_0xa8cd('0x65')](_0x5d5f87['query']['sort']);_0x25fc91[_0xa8cd('0x48')]=qs[_0xa8cd('0x40')](_[_0xa8cd('0x66')](_0x5d5f87[_0xa8cd('0x3f')],_0x1c284a[_0xa8cd('0x40')]));_0x25fc91[_0xa8cd('0x48')][_0xa8cd('0x60')]=_0x20ff08['id'];if(_0x5d5f87[_0xa8cd('0x3f')][_0xa8cd('0x49')]){_0x25fc91['where']=_[_0xa8cd('0x4a')](_0x25fc91[_0xa8cd('0x48')],{'$or':_['map'](_0x25fc91[_0xa8cd('0x44')],function(_0xf5408f){var _0x126b07={};_0x126b07[_0xf5408f]={'$like':'%'+_0x5d5f87[_0xa8cd('0x3f')][_0xa8cd('0x49')]+'%'};return _0x126b07;})});}_0x25fc91=_[_0xa8cd('0x4a')]({},_0x25fc91,_0x5d5f87[_0xa8cd('0x4c')]);return db[_0xa8cd('0x61')][_0xa8cd('0x4d')]({'where':_0x25fc91[_0xa8cd('0x48')]})[_0xa8cd('0x1e')](function(_0x596875){_0x40f204[_0xa8cd('0x4d')]=_0x596875;if(_0x5d5f87[_0xa8cd('0x3f')][_0xa8cd('0x4e')]){_0x25fc91[_0xa8cd('0x4f')]=[{'all':!![]}];}return db[_0xa8cd('0x61')][_0xa8cd('0x50')](_0x25fc91);})[_0xa8cd('0x1e')](function(_0x5e22c6){_0x40f204['rows']=_0x5e22c6;return _0x40f204;});}})[_0xa8cd('0x1e')](respondWithFilteredResult(_0x37d816,_0x25fc91))[_0xa8cd('0x27')](handleError(_0x37d816,null));};exports[_0xa8cd('0x67')]=function(_0x2bd16b,_0x5ee8d1,_0x3b87ee){return db[_0xa8cd('0x3a')]['find']({'where':{'id':_0x2bd16b[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x5ee8d1,null))[_0xa8cd('0x1e')](function(_0x2b4fbf){if(_0x2b4fbf){return _0x2b4fbf[_0xa8cd('0x67')](_0x2bd16b[_0xa8cd('0x3f')]['ids']);}})[_0xa8cd('0x1e')](respondWithStatusCode(_0x5ee8d1,null))[_0xa8cd('0x27')](handleError(_0x5ee8d1,null));};exports[_0xa8cd('0x68')]=function(_0x365e48,_0x2f2674,_0x30027f){if(_0x365e48[_0xa8cd('0x5e')]['id']){delete _0x365e48[_0xa8cd('0x5e')]['id'];}return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x365e48[_0xa8cd('0x53')]['id']}})['then'](handleEntityNotFound(_0x2f2674,null))[_0xa8cd('0x1e')](function(_0x37fa74){if(_0x37fa74){_0x365e48[_0xa8cd('0x5e')][_0xa8cd('0x60')]=_0x37fa74['id'];return db[_0xa8cd('0x69')][_0xa8cd('0x58')](_0x365e48['body']);}})[_0xa8cd('0x1e')](respondWithResult(_0x2f2674,null))[_0xa8cd('0x27')](handleError(_0x2f2674,null));};exports[_0xa8cd('0x6a')]=function(_0x2d2e83,_0x195cbb,_0x489f4b){var _0x11f2aa={'raw':![],'where':{}};var _0x6d6da6={};var _0x1a4f68={'count':0x0,'rows':[]};return db['SmsAccount'][_0xa8cd('0x63')]({'where':{'id':_0x2d2e83[_0xa8cd('0x53')]['id']}})['then'](handleEntityNotFound(_0x195cbb,null))['then'](function(_0x20e94d){if(_0x20e94d){_0x6d6da6[_0xa8cd('0x42')]=_[_0xa8cd('0x56')](db['CannedAnswer'][_0xa8cd('0x3b')]);_0x6d6da6[_0xa8cd('0x3f')]=_[_0xa8cd('0x56')](_0x2d2e83['query']);_0x6d6da6[_0xa8cd('0x40')]=_[_0xa8cd('0x41')](_0x6d6da6[_0xa8cd('0x42')],_0x6d6da6[_0xa8cd('0x3f')]);_0x11f2aa[_0xa8cd('0x44')]=_[_0xa8cd('0x41')](_0x6d6da6[_0xa8cd('0x42')],qs[_0xa8cd('0x43')](_0x2d2e83[_0xa8cd('0x3f')]['fields']));_0x11f2aa['attributes']=_0x11f2aa[_0xa8cd('0x44')][_0xa8cd('0x45')]?_0x11f2aa[_0xa8cd('0x44')]:_0x6d6da6['model'];if(!_0x2d2e83[_0xa8cd('0x3f')][_0xa8cd('0x64')](_0xa8cd('0x6b'))){_0x11f2aa[_0xa8cd('0x2c')]=qs[_0xa8cd('0x2c')](_0x2d2e83[_0xa8cd('0x3f')][_0xa8cd('0x2c')]);_0x11f2aa[_0xa8cd('0x46')]=qs[_0xa8cd('0x46')](_0x2d2e83['query'][_0xa8cd('0x46')]);}_0x11f2aa[_0xa8cd('0x47')]=qs[_0xa8cd('0x65')](_0x2d2e83[_0xa8cd('0x3f')]['sort']);_0x11f2aa[_0xa8cd('0x48')]=qs['filters'](_[_0xa8cd('0x66')](_0x2d2e83[_0xa8cd('0x3f')],_0x6d6da6['filters']));_0x11f2aa[_0xa8cd('0x48')][_0xa8cd('0x60')]=_0x20e94d['id'];if(_0x2d2e83['query'][_0xa8cd('0x49')]){_0x11f2aa['where']=_[_0xa8cd('0x4a')](_0x11f2aa[_0xa8cd('0x48')],{'$or':_[_0xa8cd('0x39')](_0x11f2aa[_0xa8cd('0x44')],function(_0xdc6491){var _0x40701f={};_0x40701f[_0xdc6491]={'$like':'%'+_0x2d2e83[_0xa8cd('0x3f')][_0xa8cd('0x49')]+'%'};return _0x40701f;})});}_0x11f2aa=_['merge']({},_0x11f2aa,_0x2d2e83[_0xa8cd('0x4c')]);return db[_0xa8cd('0x69')]['count']({'where':_0x11f2aa[_0xa8cd('0x48')]})[_0xa8cd('0x1e')](function(_0x17e56a){_0x1a4f68[_0xa8cd('0x4d')]=_0x17e56a;if(_0x2d2e83['query'][_0xa8cd('0x4e')]){_0x11f2aa[_0xa8cd('0x4f')]=[{'all':!![]}];}return db[_0xa8cd('0x69')][_0xa8cd('0x50')](_0x11f2aa);})[_0xa8cd('0x1e')](function(_0x2adf40){_0x1a4f68['rows']=_0x2adf40;return _0x1a4f68;});}})[_0xa8cd('0x1e')](respondWithFilteredResult(_0x195cbb,_0x11f2aa))['catch'](handleError(_0x195cbb,null));};exports[_0xa8cd('0x6c')]=function(_0x543dbd,_0x497f6c,_0x7d91b6){return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x543dbd[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x497f6c,null))[_0xa8cd('0x1e')](function(_0x388dc2){if(_0x388dc2){return _0x388dc2['removeAnswers'](_0x543dbd[_0xa8cd('0x3f')][_0xa8cd('0x6d')]);}})[_0xa8cd('0x1e')](respondWithStatusCode(_0x497f6c,null))[_0xa8cd('0x27')](handleError(_0x497f6c,null));};exports['notify']=function(_0x17c394,_0x54bbe7,_0x50f88f){var _0xf1d4c0={'channel':_0xa8cd('0x6e')};var _0x523aa2=[];var _0x3ca5cb=[];var _0x43aece={};return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x17c394['params']['id']},'include':[{'model':db[_0xa8cd('0x6f')],'as':'Applications'}]})['then'](handleEntityNotFound(_0x54bbe7,null))['then'](function(_0x2e1683){_0xf1d4c0[_0xa8cd('0x70')]=_0x2e1683;_0xf1d4c0[_0xa8cd('0x71')]=_[_0xa8cd('0x72')](_0x2e1683[_0xa8cd('0x73')],['priority'],['asc']);if(_0xf1d4c0[_0xa8cd('0x70')][_0xa8cd('0x73')]){delete _0xf1d4c0['account'][_0xa8cd('0x73')];}return db[_0xa8cd('0x74')][_0xa8cd('0x5f')]();})[_0xa8cd('0x1e')](function(_0x2d82b0){if(!_0x2d82b0){throw new db[(_0xa8cd('0x75'))][(_0xa8cd('0x1c'))](_0xa8cd('0x76'));}_0x523aa2=_[_0xa8cd('0x77')](_[_0xa8cd('0x56')](_0x2d82b0),[_0xa8cd('0x78'),'updatedAt']);_0x3ca5cb=_[_0xa8cd('0x77')](_['keys'](_0x2d82b0),[_0xa8cd('0x78'),_0xa8cd('0x79'),'CompanyId',_0xa8cd('0x7a')]);_0xf1d4c0['body']={'mapKey':_0xa8cd('0x7b')};if(_0xf1d4c0[_0xa8cd('0x70')][_0xa8cd('0x3d')]){switch(_0xf1d4c0['account'][_0xa8cd('0x3d')]){case _0xa8cd('0x7c'):_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x7e')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x5e')]=_0x17c394['body'][_0xa8cd('0x7f')];_0xf1d4c0['body']['messageId']=_0x17c394['body']['MessageSid'];break;case _0xa8cd('0x80'):_0xf1d4c0['body'][_0xa8cd('0x7d')]='+'+_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x81')];_0xf1d4c0['body'][_0xa8cd('0x5e')]=_0x17c394['body'][_0xa8cd('0x82')];break;case _0xa8cd('0x83'):_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x7d')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x5e')]=_0x17c394['body']['message'];break;case'clicksend':_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x7d')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x5e')]=_0x17c394[_0xa8cd('0x5e')]['body'];_0xf1d4c0['body'][_0xa8cd('0x84')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x85')];break;case _0xa8cd('0x86'):_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x7e')];_0xf1d4c0['body']['body']=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x87')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x84')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x88')];break;case _0xa8cd('0x89'):_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]='+'+_0x17c394[_0xa8cd('0x5e')]['results'][0x0][_0xa8cd('0x7d')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x5e')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x8a')][0x0][_0xa8cd('0x82')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x84')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x8a')][0x0][_0xa8cd('0x84')];break;case _0xa8cd('0x8b'):_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x8c')];_0xf1d4c0['body']['body']=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x8d')][_0xa8cd('0x25')];break;case _0xa8cd('0x8e'):_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]=_0x17c394['body'][_0xa8cd('0x8f')];_0xf1d4c0['body'][_0xa8cd('0x5e')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x82')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x84')]=_0x17c394['body'][_0xa8cd('0x90')];break;case'intelepeer':_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x7d')];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x5e')]=_0x17c394[_0xa8cd('0x5e')]['message'];_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x84')]=_0x17c394[_0xa8cd('0x5e')][_0xa8cd('0x91')];break;}}if(_0xf1d4c0[_0xa8cd('0x5e')]['id']){delete _0xf1d4c0[_0xa8cd('0x5e')]['id'];}if(_[_0xa8cd('0x92')](_0xf1d4c0['body'][_0xa8cd('0x7d')])){throw new db[(_0xa8cd('0x75'))][(_0xa8cd('0x1c'))](_0xa8cd('0x93'));}if(_[_0xa8cd('0x92')](_0xf1d4c0['body'][_0xa8cd('0x5e')])||_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x5e')]===''){throw new db[(_0xa8cd('0x75'))][(_0xa8cd('0x1c'))](_0xa8cd('0x94'));}if(_['isNil'](_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x95')])){throw new db[(_0xa8cd('0x75'))][(_0xa8cd('0x1c'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x3ca5cb);}if(!_[_0xa8cd('0x96')](_0x3ca5cb,_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x95')])){throw new db[(_0xa8cd('0x75'))][(_0xa8cd('0x1c'))](_0xa8cd('0x97')+_0x3ca5cb);}_0x43aece[_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x95')]]=_0xf1d4c0['body'][_0xa8cd('0x7d')];return db[_0xa8cd('0x98')][_0xa8cd('0x57')]({'where':{'id':_0xf1d4c0[_0xa8cd('0x70')][_0xa8cd('0x7a')]},'include':[{'model':db[_0xa8cd('0x74')],'as':_0xa8cd('0x99'),'where':_0x43aece,'limit':0x1,'order':[[_0xa8cd('0x79'),'DESC']]}]});})[_0xa8cd('0x1e')](handleEntityNotFound(_0x54bbe7,null))[_0xa8cd('0x1e')](function(_0x5af9a3){if(_0x5af9a3){_0xf1d4c0[_0xa8cd('0x9a')]=_[_0xa8cd('0x9b')](_0x5af9a3,[_0xa8cd('0x99')]);if(_0x5af9a3[_0xa8cd('0x99')][_0xa8cd('0x45')]){return _0x5af9a3[_0xa8cd('0x99')][0x0];}var _0x3e90dc=_[_0xa8cd('0x16')](_0xf1d4c0[_0xa8cd('0x5e')],{'firstName':_0xf1d4c0['body'][_0xa8cd('0x7d')],'ListId':_0x5af9a3['id']});_0x3e90dc[_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x95')]]=_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x7d')];return db['CmContact'][_0xa8cd('0x58')](_0x3e90dc,{'fields':_0x523aa2,'raw':!![]});}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x54bbe7,null))[_0xa8cd('0x1e')](function(_0x5444b0){if(_0x5444b0){_0xf1d4c0[_0xa8cd('0x9c')]=_0x5444b0;var _0x355308={'ContactId':_0x5444b0['id'],'phone':_0xf1d4c0['body'][_0xa8cd('0x7d')],'SmsAccountId':_0x17c394['params']['id']};var _0x52c462={'ContactId':_0x5444b0['id'],'SmsAccountId':_0x17c394[_0xa8cd('0x53')]['id'],'closed':![]};return db['SmsInteraction'][_0xa8cd('0x57')]({'where':_0x52c462})[_0xa8cd('0x1e')](function(_0x409fe6){if(_0x409fe6){return[_0x409fe6,![]];}return db[_0xa8cd('0x9d')][_0xa8cd('0x58')](_0x355308)[_0xa8cd('0x1e')](function(_0x517c2d){return[_0x517c2d,!![]];});});}})[_0xa8cd('0x9e')](function(_0x185925,_0xdb1c9f){_0xf1d4c0[_0xa8cd('0x9f')]=_0x185925[_0xa8cd('0x33')]({'plain':!![]});_0xf1d4c0[_0xa8cd('0x9f')][_0xa8cd('0xa0')]=![];if(_0xdb1c9f){if(_0xf1d4c0[_0xa8cd('0x70')]['autoclose']){_0xf1d4c0['applications']['push']({'id':0x0,'priority':_0xf1d4c0[_0xa8cd('0x71')]['length']+0x1,'app':'close','appdata':_0xa8cd('0xa1'),'interval':_0xa8cd('0xa2')});}_0xf1d4c0[_0xa8cd('0x9f')][_0xa8cd('0xa0')]=!![];}return db['SmsMessage'][_0xa8cd('0x58')]({'phone':_0xf1d4c0[_0xa8cd('0x5e')]['from'],'messageId':_0xf1d4c0['body'][_0xa8cd('0x84')],'body':_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0x5e')],'SmsAccountId':_0x17c394[_0xa8cd('0x53')]['id'],'SmsInteractionId':_0x185925['id'],'direction':'in','ContactId':_0x185925[_0xa8cd('0xa3')],'AttachmentId':_0xf1d4c0[_0xa8cd('0x5e')][_0xa8cd('0xa4')]});})['then'](function(_0x135f10){_0xf1d4c0['message']=_0x135f10;if(_0xf1d4c0[_0xa8cd('0x9f')]['UserId']){return db[_0xa8cd('0xa5')][_0xa8cd('0x57')]({'attributes':['id','name'],'where':{'id':_0xf1d4c0[_0xa8cd('0x9f')][_0xa8cd('0xa6')]}})[_0xa8cd('0x1e')](function(_0x1b50b2){if(_0x1b50b2){_0xf1d4c0[_0xa8cd('0x71')]['unshift']({'id':0x0,'priority':0x0,'app':_0xa8cd('0xa7'),'appdata':_0x1b50b2[_0xa8cd('0x36')]+','+(_0xf1d4c0[_0xa8cd('0x70')][_0xa8cd('0xa8')]||0xa),'interval':_0xa8cd('0xa2')});}return respondWithRpcPromise(_0xa8cd('0xa9'),_0xa8cd('0xaa'),_0xf1d4c0);});}return respondWithRpcPromise(_0xa8cd('0xa9'),_0xa8cd('0xaa'),_0xf1d4c0);})[_0xa8cd('0x1e')](function(_0x82a72e){if(_0x82a72e){var _0xd93b27=0xc8;var _0x576944=_0xa8cd('0xab');logger[_0xa8cd('0x26')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x576944,_0xd93b27,_0xa8cd('0xac'));logger[_0xa8cd('0x21')]('SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s',_0x576944,_0xd93b27,_0xa8cd('0xac'),JSON[_0xa8cd('0xad')](_0x82a72e));if(_0xf1d4c0[_0xa8cd('0x70')][_0xa8cd('0x3d')]===_0xa8cd('0x7c')){return _0x54bbe7[_0xa8cd('0x29')](_0xd93b27)[_0xa8cd('0x2d')](_0xa8cd('0xae'),_0xa8cd('0xaf'))[_0xa8cd('0x37')]('\x0a ');}else{return _0x54bbe7[_0xa8cd('0x29')](_0xd93b27)[_0xa8cd('0x2b')](_0x82a72e);}}})[_0xa8cd('0x27')](handleError(_0x54bbe7,null));};exports[_0xa8cd('0xb0')]=function(_0x110227,_0x6fcb2c,_0x3786c0){return db[_0xa8cd('0x3a')][_0xa8cd('0x63')]({'where':{'id':_0x110227[_0xa8cd('0x53')]['id']}})['then'](handleEntityNotFound(_0x6fcb2c,null))['then'](function(_0xf53059){if(_0xf53059){return db[_0xa8cd('0xb1')][_0xa8cd('0xb2')](function(_0x161ea0){return db[_0xa8cd('0x6f')][_0xa8cd('0x32')]({'where':{'SmsAccountId':_0x110227[_0xa8cd('0x53')]['id']},'transaction':_0x161ea0})[_0xa8cd('0x1e')](function(_0x5d23b6){var _0x4b4587=_[_0xa8cd('0x39')](_0x110227['body'],function(_0x5e6ca1){_0x5e6ca1['SmsAccountId']=_0x110227[_0xa8cd('0x53')]['id'];return _0x5e6ca1;});return db['SmsApplication'][_0xa8cd('0xb3')](_0x4b4587,{'transaction':_0x161ea0});});})['then'](function(){return db['SmsApplication'][_0xa8cd('0xb4')]({'where':{'SmsAccountId':_0x110227[_0xa8cd('0x53')]['id']},'order':_0xa8cd('0xb5')});});}})[_0xa8cd('0x1e')](respondWithResult(_0x6fcb2c,null))[_0xa8cd('0x27')](handleError(_0x6fcb2c,null));};exports['getApplications']=function(_0x4630d1,_0x54a5ad,_0x1dec45){var _0x323a1e={};var _0x38f58e={};var _0x2814c1;var _0x2a78a6;return db[_0xa8cd('0x3a')]['findOne']({'where':{'id':_0x4630d1[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x54a5ad,null))[_0xa8cd('0x1e')](function(_0x1279e0){if(_0x1279e0){_0x2814c1=_0x1279e0;_0x38f58e['model']=_[_0xa8cd('0x56')](db[_0xa8cd('0x6f')][_0xa8cd('0x3b')]);_0x38f58e[_0xa8cd('0x3f')]=_[_0xa8cd('0x56')](_0x4630d1[_0xa8cd('0x3f')]);_0x38f58e[_0xa8cd('0x40')]=_[_0xa8cd('0x41')](_0x38f58e[_0xa8cd('0x42')],_0x38f58e[_0xa8cd('0x3f')]);_0x323a1e[_0xa8cd('0x44')]=_[_0xa8cd('0x41')](_0x38f58e['model'],qs[_0xa8cd('0x43')](_0x4630d1[_0xa8cd('0x3f')][_0xa8cd('0x43')]));_0x323a1e['attributes']=_0x323a1e['attributes'][_0xa8cd('0x45')]?_0x323a1e[_0xa8cd('0x44')]:_0x38f58e[_0xa8cd('0x42')];_0x323a1e[_0xa8cd('0x47')]=qs[_0xa8cd('0x65')](_0x4630d1[_0xa8cd('0x3f')]['sort']);_0x323a1e['where']=qs[_0xa8cd('0x40')](_['pick'](_0x4630d1['query'],_0x38f58e['filters']));if(_0x4630d1[_0xa8cd('0x3f')][_0xa8cd('0x49')]){_0x323a1e['where']=_[_0xa8cd('0x4a')](_0x323a1e[_0xa8cd('0x48')],{'$or':_[_0xa8cd('0x39')](_0x323a1e[_0xa8cd('0x44')],function(_0x700ef6){var _0x1545ad={};_0x1545ad[_0x700ef6]={'$like':'%'+_0x4630d1[_0xa8cd('0x3f')][_0xa8cd('0x49')]+'%'};return _0x1545ad;})});}_0x323a1e=_[_0xa8cd('0x4a')]({},_0x323a1e,_0x4630d1[_0xa8cd('0x4c')]);return _0x2814c1['getApplications'](_0x323a1e);}})[_0xa8cd('0x1e')](function(_0x4ff072){if(_0x4ff072){_0x2a78a6=_0x4ff072[_0xa8cd('0x45')];if(!_0x4630d1[_0xa8cd('0x3f')]['hasOwnProperty'](_0xa8cd('0x6b'))){_0x323a1e[_0xa8cd('0x2c')]=qs[_0xa8cd('0x2c')](_0x4630d1['query'][_0xa8cd('0x2c')]);_0x323a1e['offset']=qs['offset'](_0x4630d1[_0xa8cd('0x3f')]['offset']);}return _0x2814c1[_0xa8cd('0xb6')](_0x323a1e);}})['then'](function(_0x23f29d){if(_0x23f29d){return _0x23f29d?{'count':_0x2a78a6,'rows':_0x23f29d}:null;}})[_0xa8cd('0x1e')](respondWithResult(_0x54a5ad,null))[_0xa8cd('0x27')](handleError(_0x54a5ad,null));};exports[_0xa8cd('0xb7')]=function(_0x500552,_0x218511,_0x4fb4ec){var _0x216dc8={'raw':![],'where':{}};var _0x3ee062={};var _0x43c7f2={'count':0x0,'rows':[]};return db[_0xa8cd('0x3a')][_0xa8cd('0x63')]({'where':{'id':_0x500552[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x218511,null))['then'](function(_0x253d9f){if(_0x253d9f){_0x3ee062[_0xa8cd('0x42')]=_[_0xa8cd('0x56')](db[_0xa8cd('0x9d')]['rawAttributes']);_0x3ee062['query']=_[_0xa8cd('0x56')](_0x500552[_0xa8cd('0x3f')]);_0x3ee062[_0xa8cd('0x40')]=_[_0xa8cd('0x41')](_0x3ee062[_0xa8cd('0x42')],_0x3ee062[_0xa8cd('0x3f')]);_0x216dc8[_0xa8cd('0x44')]=_[_0xa8cd('0x41')](_0x3ee062[_0xa8cd('0x42')],qs[_0xa8cd('0x43')](_0x500552[_0xa8cd('0x3f')]['fields']));_0x216dc8['attributes']=_0x216dc8[_0xa8cd('0x44')][_0xa8cd('0x45')]?_0x216dc8[_0xa8cd('0x44')]:_0x3ee062[_0xa8cd('0x42')];if(!_0x500552[_0xa8cd('0x3f')][_0xa8cd('0x64')](_0xa8cd('0x6b'))){_0x216dc8[_0xa8cd('0x2c')]=qs[_0xa8cd('0x2c')](_0x500552[_0xa8cd('0x3f')]['limit']);_0x216dc8[_0xa8cd('0x46')]=qs[_0xa8cd('0x46')](_0x500552[_0xa8cd('0x3f')]['offset']);}_0x216dc8[_0xa8cd('0x47')]=qs[_0xa8cd('0x65')](_0x500552[_0xa8cd('0x3f')][_0xa8cd('0x65')]);_0x216dc8[_0xa8cd('0x48')]=qs[_0xa8cd('0x40')](_['pick'](_0x500552['query'],_0x3ee062['filters']));_0x216dc8['where'][_0xa8cd('0x60')]=_0x253d9f['id'];if(_0x500552[_0xa8cd('0x3f')]['filter']){_0x216dc8[_0xa8cd('0x48')]=_[_0xa8cd('0x4a')](_0x216dc8[_0xa8cd('0x48')],{'$or':_[_0xa8cd('0x39')](_0x216dc8[_0xa8cd('0x44')],function(_0x1eed25){var _0x2d55f8={};_0x2d55f8[_0x1eed25]={'$like':'%'+_0x500552[_0xa8cd('0x3f')][_0xa8cd('0x49')]+'%'};return _0x2d55f8;})});}_0x216dc8=_[_0xa8cd('0x4a')]({},_0x216dc8,_0x500552[_0xa8cd('0x4c')]);return db['SmsInteraction']['count']({'where':_0x216dc8[_0xa8cd('0x48')]})['then'](function(_0x39f4f9){_0x43c7f2[_0xa8cd('0x4d')]=_0x39f4f9;if(_0x500552[_0xa8cd('0x3f')][_0xa8cd('0x4e')]){_0x216dc8[_0xa8cd('0x4f')]=[{'model':db[_0xa8cd('0x74')],'as':_0xa8cd('0xb8'),'required':![]},{'model':db[_0xa8cd('0xa5')],'as':'Owner','attributes':[_0xa8cd('0x36'),_0xa8cd('0xb9'),_0xa8cd('0xba')],'required':![]},{'model':db[_0xa8cd('0xbb')],'as':'Tags','attributes':['id',_0xa8cd('0x36'),_0xa8cd('0xbc')],'where':_0x500552[_0xa8cd('0x3f')][_0xa8cd('0xbd')]?{'id':_0x500552['query'][_0xa8cd('0xbd')]}:undefined,'required':_0x500552['query'][_0xa8cd('0xbd')]?!![]:![]}];}return db['SmsInteraction'][_0xa8cd('0x50')](_0x216dc8);})[_0xa8cd('0x1e')](function(_0x5a27ba){_0x43c7f2[_0xa8cd('0x51')]=_0x5a27ba;return _0x43c7f2;});}})[_0xa8cd('0x1e')](respondWithFilteredResult(_0x218511,_0x216dc8))[_0xa8cd('0x27')](handleError(_0x218511,null));};exports[_0xa8cd('0x37')]=function(_0x36f07e,_0x93de39,_0x9e289d){var _0x1c5858,_0x1327b7,_0x104043;if(_[_0xa8cd('0x92')](_0x36f07e[_0xa8cd('0x5e')]['body'])||_0x36f07e[_0xa8cd('0x5e')][_0xa8cd('0x5e')]===''){throw new db[(_0xa8cd('0x75'))]['ValidationError'](_0xa8cd('0x94'));}if(_[_0xa8cd('0x92')](_0x36f07e[_0xa8cd('0x5e')]['to'])){throw new db[(_0xa8cd('0x75'))][(_0xa8cd('0x1c'))](_0xa8cd('0xbe'));}_0x1c5858=_0x36f07e['body']['to'];return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x36f07e[_0xa8cd('0x53')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0xa8cd('0x74')],'as':'Contacts','where':{'mobile':_0x1c5858},'limit':0x1,'order':[[_0xa8cd('0x79'),_0xa8cd('0xbf')]]}]}]})[_0xa8cd('0x1e')](handleEntityNotFound(_0x93de39,null))[_0xa8cd('0x1e')](function(_0x59746f){if(_0x59746f&&_0x59746f[_0xa8cd('0xc0')]){_0x1327b7=_0x59746f[_0xa8cd('0x33')]({'plain':!![]});if(_0x1327b7['List']&&_0x1327b7[_0xa8cd('0xc0')][_0xa8cd('0x99')]['length']){return _0x1327b7[_0xa8cd('0xc0')][_0xa8cd('0x99')][0x0];}return db[_0xa8cd('0x74')]['create'](_[_0xa8cd('0x16')](_0x36f07e[_0xa8cd('0x5e')],{'firstName':_0x1c5858,'mobile':_0x1c5858,'phone':_0x1c5858,'ListId':_0x1327b7[_0xa8cd('0x7a')]}));}})['then'](handleEntityNotFound(_0x93de39,null))[_0xa8cd('0x1e')](function(_0xa43e92){if(_0xa43e92){_0x104043=_0xa43e92;return db[_0xa8cd('0x9d')][_0xa8cd('0x57')]({'where':{'ContactId':_0x104043['id'],'closed':![],'SmsAccountId':_0x1327b7['id']}})[_0xa8cd('0x1e')](function(_0x1d5bd2){if(_0x1d5bd2){return[_0x1d5bd2,![]];}return db[_0xa8cd('0x9d')][_0xa8cd('0x58')]({'UserId':_0x36f07e[_0xa8cd('0x5a')]['id'],'ContactId':_0x104043['id'],'SmsAccountId':_0x1327b7['id'],'phone':_0x1c5858,'firstMsgDirection':'out','Messages':[_['merge'](_0x36f07e[_0xa8cd('0x5e')],{'read':![],'body':_0x36f07e[_0xa8cd('0x5e')][_0xa8cd('0x5e')],'phone':_0x1c5858,'SmsAccountId':_0x1327b7['id'],'UserId':_0x36f07e[_0xa8cd('0x5a')]['id'],'ContactId':_0x104043['id']})]},{'include':[{'model':db['SmsMessage'],'as':_0xa8cd('0xc1')}]})[_0xa8cd('0x1e')](function(_0x511612){return[_0x511612,!![]];});});}})[_0xa8cd('0x9e')](function(_0x5445fd,_0x4edcaa){if(_0x4edcaa){return _0x5445fd;}return db[_0xa8cd('0xc2')]['create'](_[_0xa8cd('0x4a')](_0x36f07e[_0xa8cd('0x5e')],{'read':![],'body':_0x36f07e[_0xa8cd('0x5e')]['body'],'phone':_0x1c5858,'SmsAccountId':_0x1327b7['id'],'SmsInteractionId':_0x5445fd['id'],'UserId':_0x36f07e[_0xa8cd('0x5a')]['id'],'ContactId':_0x104043['id']}))[_0xa8cd('0x1e')](function(_0x1a49f9){_0x5445fd[_0xa8cd('0xc3')]['Messages']=[];_0x5445fd[_0xa8cd('0xc3')][_0xa8cd('0xc1')][_0xa8cd('0xc4')](_0x1a49f9['dataValues']);return _0x5445fd;});})[_0xa8cd('0x1e')](respondWithResult(_0x93de39,null))[_0xa8cd('0x27')](handleError(_0x93de39,null));};exports[_0xa8cd('0x29')]=function(_0x2f1824,_0x2f1645,_0x4ac992){if(_0x2f1824[_0xa8cd('0x5e')]['id']){delete _0x2f1824[_0xa8cd('0x5e')]['id'];}console[_0xa8cd('0xc5')](_0xa8cd('0xc6'),_0x2f1824[_0xa8cd('0x5e')]);var _0x3bd735,_0x5999d5,_0x3b2d91;return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x2f1824[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x2f1645,null))[_0xa8cd('0x1e')](function(_0x2fb276){if(_0x2fb276){_0x3b2d91=_0x2fb276;logger[_0xa8cd('0x21')]('SmsAccount,\x20%s,\x20%s,\x20%s','status','received\x20delivery\x20report\x20from',_0x2fb276['type'],util['inspect'](_0x2f1824['body'],{'showHidden':![],'depth':null}));switch(_0x2fb276['type']){case _0xa8cd('0x80'):if(_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xc7')]&&_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0x29')]){_0x5999d5=_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0x29')];return db[_0xa8cd('0xc2')][_0xa8cd('0x57')]({'where':{'messageId':_0x2f1824['body'][_0xa8cd('0xc7')]}});}break;case _0xa8cd('0x83'):if(_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xc8')]&&_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xc9')]){_0x5999d5=_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xc9')];return db[_0xa8cd('0xc2')][_0xa8cd('0x57')]({'where':{'messageId':_0x2f1824['body']['requestid']}});}break;case _0xa8cd('0xca'):if(_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0x85')]&&_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xcb')]){_0x5999d5=_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xcb')];return db[_0xa8cd('0xc2')][_0xa8cd('0x57')]({'where':{'messageId':_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0x85')]}});}break;case _0xa8cd('0x89'):var _0x591d62=_0x2f1824['body'][_0xa8cd('0x8a')][0x0];if(_0x591d62['messageId']&&_0x591d62[_0xa8cd('0x29')][_0xa8cd('0xcc')]===_0xa8cd('0xcd')){_0x5999d5=_0x591d62['status'][_0xa8cd('0xcc')];return db[_0xa8cd('0xc2')]['find']({'where':{'messageId':_0x591d62['messageId']}});}break;case'clickatell':if(_0x2f1824[_0xa8cd('0x5e')]['messageId']&&_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0x29')]){_0x5999d5=_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0x29')];return db[_0xa8cd('0xc2')][_0xa8cd('0x57')]({'where':{'messageId':_0x2f1824['body'][_0xa8cd('0x84')]}});}break;case _0xa8cd('0xce'):if(_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xcf')]&&_0x2f1824['body'][_0xa8cd('0x29')]){_0x5999d5=_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0x29')];return db[_0xa8cd('0xc2')]['find']({'where':{'messageId':_0x2f1824[_0xa8cd('0x5e')][_0xa8cd('0xcf')]}});}break;}}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x2f1645,null))[_0xa8cd('0x1e')](function(_0x22bcde){if(_0x22bcde){_0x3bd735=_0x22bcde;switch(_0x3b2d91['type']){case _0xa8cd('0x80'):if(_0x5999d5===_0xa8cd('0xcd')){return _0x3bd735[_0xa8cd('0x31')]({'read':!![]});}else{logger[_0xa8cd('0x23')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xa8cd('0x29'),_0xa8cd('0x80'),util[_0xa8cd('0xd0')](_0x2f1824[_0xa8cd('0x5e')],{'showHidden':![],'depth':null}));}break;case _0xa8cd('0x83'):if(_0x5999d5==='1'){return _0x3bd735[_0xa8cd('0x31')]({'read':!![]});}else{logger['error'](_0xa8cd('0x22'),_0xa8cd('0x29'),'skebby',util[_0xa8cd('0xd0')](_0x2f1824[_0xa8cd('0x5e')],{'showHidden':![],'depth':null}));}break;case _0xa8cd('0xca'):if(!_0x2f1824[_0xa8cd('0x5e')]['error_code']&&_0x5999d5>=0xc8&&_0x5999d5<=0xce){return _0x3bd735['update']({'read':!![]});}else{logger[_0xa8cd('0x23')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xa8cd('0x29'),'clicksend',util['inspect'](_0x2f1824['body'],{'showHidden':![],'depth':null}));}break;case _0xa8cd('0x89'):var _0x235b8e=_0x2f1824['body'][_0xa8cd('0x8a')][0x0];if(_0x235b8e[_0xa8cd('0x29')][_0xa8cd('0xcc')]===_0xa8cd('0xcd')){return _0x3bd735[_0xa8cd('0x31')]({'read':!![]});}else{logger[_0xa8cd('0x23')](_0xa8cd('0x22'),_0xa8cd('0x29'),'infobip',util[_0xa8cd('0xd0')](_0x2f1824[_0xa8cd('0x5e')],{'showHidden':![],'depth':null}));}break;case _0xa8cd('0x8e'):if(_0x5999d5=='DELIVERED_TO_GATEWAY'||_0x5999d5=='RECEIVED_BY_RECIPIENT'){return _0x3bd735['update']({'read':!![]});}else{logger[_0xa8cd('0x23')](_0xa8cd('0x22'),_0xa8cd('0x29'),'clickatell',util['inspect'](_0x2f1824[_0xa8cd('0x5e')],{'showHidden':![],'depth':null}));}break;case _0xa8cd('0xce'):if(_0x5999d5==='DELIVRD'||_0x5999d5===_0xa8cd('0xd1')){return _0x3bd735[_0xa8cd('0x31')]({'read':!![]});}else{logger[_0xa8cd('0x23')](_0xa8cd('0x22'),_0xa8cd('0x29'),_0xa8cd('0xce'),util[_0xa8cd('0xd0')](_0x2f1824[_0xa8cd('0x5e')],{'showHidden':![],'depth':null}));}break;}return _0x3bd735;}})[_0xa8cd('0x1e')](respondWithResult(_0x2f1645,null))[_0xa8cd('0x27')](handleError(_0x2f1645,null));};exports['statusGet']=function(_0x21f97e,_0x578211,_0x5e9225){var _0x30ba86,_0x59f5c4,_0x1180ba;return db['SmsAccount'][_0xa8cd('0x57')]({'where':{'id':_0x21f97e[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x578211,null))[_0xa8cd('0x1e')](function(_0x254b9f){if(_0x254b9f){_0x1180ba=_0x254b9f;logger['debug'](_0xa8cd('0x22'),_0xa8cd('0x29'),'received\x20delivery\x20report\x20from',_0x254b9f[_0xa8cd('0x3d')],util[_0xa8cd('0xd0')](_0x21f97e['query'],{'showHidden':![],'depth':null}));switch(_0x254b9f['type']){case _0xa8cd('0x8b'):if(_0x21f97e[_0xa8cd('0x3f')][_0xa8cd('0xd2')]&&_0x21f97e[_0xa8cd('0x3f')][_0xa8cd('0xd3')]){_0x59f5c4=_0x21f97e[_0xa8cd('0x3f')]['state'];return db[_0xa8cd('0xc2')][_0xa8cd('0x57')]({'where':{'messageId':_0x21f97e[_0xa8cd('0x3f')][_0xa8cd('0xd2')]}});}break;}}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x578211,null))['then'](function(_0x2310bc){if(_0x2310bc){_0x30ba86=_0x2310bc;switch(_0x1180ba[_0xa8cd('0x3d')]){case _0xa8cd('0x8b'):if(_0x59f5c4==='2'||_0x59f5c4==='6'){return _0x30ba86[_0xa8cd('0x31')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0xa8cd('0x29'),'csc',util['inspect'](_0x21f97e[_0xa8cd('0x3f')],{'showHidden':![],'depth':null}));};break;}return _0x30ba86;}})['then'](respondWithResult(_0x578211,null))[_0xa8cd('0x27')](handleError(_0x578211,null));};exports['addAgents']=function(_0x212bf9,_0x259ec7,_0x392a68){return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x212bf9['params']['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x259ec7,null))['then'](function(_0x31712a){if(_0x31712a){return _0x31712a[_0xa8cd('0xd4')](_0x212bf9[_0xa8cd('0x5e')][_0xa8cd('0x6d')],_[_0xa8cd('0x9b')](_0x212bf9['body'],[_0xa8cd('0x6d'),'id'])||{})[_0xa8cd('0x9e')](function(_0x2dbe59){for(var _0x36d719=0x0;_0x36d719<_0x212bf9[_0xa8cd('0x5e')][_0xa8cd('0x6d')][_0xa8cd('0x45')];_0x36d719+=0x1){socket[_0xa8cd('0xd5')](_0xa8cd('0xd6'),{'UserId':_0x212bf9[_0xa8cd('0x5e')][_0xa8cd('0x6d')][_0x36d719],'SmsAccountId':_0x212bf9[_0xa8cd('0x53')]['id']});}return _0x2dbe59;});}})[_0xa8cd('0x1e')](respondWithResult(_0x259ec7,null))['catch'](handleError(_0x259ec7,null));};exports['removeAgents']=function(_0x37c995,_0x23a9eb,_0x884467){return db[_0xa8cd('0x3a')][_0xa8cd('0x57')]({'where':{'id':_0x37c995[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0x23a9eb,null))[_0xa8cd('0x1e')](function(_0x55730a){if(_0x55730a){return _0x55730a[_0xa8cd('0xd7')](_0x37c995[_0xa8cd('0x3f')][_0xa8cd('0x6d')])[_0xa8cd('0x1e')](function(){if(_[_0xa8cd('0xd8')](_0x37c995[_0xa8cd('0x3f')][_0xa8cd('0x6d')])){for(var _0x51a8c0=0x0;_0x51a8c0<_0x37c995[_0xa8cd('0x3f')][_0xa8cd('0x6d')]['length'];_0x51a8c0+=0x1){socket['emit'](_0xa8cd('0xd9'),{'UserId':Number(_0x37c995[_0xa8cd('0x3f')][_0xa8cd('0x6d')][_0x51a8c0]),'SmsAccountId':Number(_0x37c995['params']['id'])});}}else{socket[_0xa8cd('0xd5')](_0xa8cd('0xd9'),{'UserId':Number(_0x37c995[_0xa8cd('0x3f')][_0xa8cd('0x6d')]),'SmsAccountId':Number(_0x37c995['params']['id'])});}});}})['then'](respondWithStatusCode(_0x23a9eb,null))['catch'](handleError(_0x23a9eb,null));};exports[_0xa8cd('0xda')]=function(_0x4ff054,_0xdf1115,_0x11ccf5){var _0x439cc0={};var _0x733187={};var _0x32f678;var _0x515a55;return db['SmsAccount'][_0xa8cd('0x63')]({'where':{'id':_0x4ff054[_0xa8cd('0x53')]['id']}})[_0xa8cd('0x1e')](handleEntityNotFound(_0xdf1115,null))[_0xa8cd('0x1e')](function(_0x5b6198){if(_0x5b6198){_0x32f678=_0x5b6198;_0x733187[_0xa8cd('0x42')]=_[_0xa8cd('0x56')](db[_0xa8cd('0xa5')][_0xa8cd('0x3b')]);_0x733187['query']=_['keys'](_0x4ff054[_0xa8cd('0x3f')]);_0x733187[_0xa8cd('0x40')]=_[_0xa8cd('0x41')](_0x733187[_0xa8cd('0x42')],_0x733187['query']);_0x439cc0['attributes']=_[_0xa8cd('0x41')](_0x733187['model'],qs[_0xa8cd('0x43')](_0x4ff054[_0xa8cd('0x3f')][_0xa8cd('0x43')]));_0x439cc0[_0xa8cd('0x44')]=_0x439cc0[_0xa8cd('0x44')]['length']?_0x439cc0[_0xa8cd('0x44')]:_0x733187[_0xa8cd('0x42')];_0x439cc0[_0xa8cd('0x47')]=qs[_0xa8cd('0x65')](_0x4ff054[_0xa8cd('0x3f')][_0xa8cd('0x65')]);_0x439cc0[_0xa8cd('0x48')]=qs[_0xa8cd('0x40')](_[_0xa8cd('0x66')](_0x4ff054[_0xa8cd('0x3f')],_0x733187['filters']));if(_0x4ff054[_0xa8cd('0x3f')][_0xa8cd('0x49')]){_0x439cc0[_0xa8cd('0x48')]=_[_0xa8cd('0x4a')](_0x439cc0[_0xa8cd('0x48')],{'$or':_['map'](_0x439cc0[_0xa8cd('0x44')],function(_0x5cfd02){var _0x277b38={};_0x277b38[_0x5cfd02]={'$like':'%'+_0x4ff054[_0xa8cd('0x3f')]['filter']+'%'};return _0x277b38;})});}_0x439cc0=_[_0xa8cd('0x4a')]({},_0x439cc0,_0x4ff054[_0xa8cd('0x4c')]);return _0x32f678[_0xa8cd('0xda')](_0x439cc0);}})[_0xa8cd('0x1e')](function(_0xb14ed3){if(_0xb14ed3){_0x515a55=_0xb14ed3[_0xa8cd('0x45')];if(!_0x4ff054[_0xa8cd('0x3f')][_0xa8cd('0x64')](_0xa8cd('0x6b'))){_0x439cc0[_0xa8cd('0x2c')]=qs[_0xa8cd('0x2c')](_0x4ff054['query'][_0xa8cd('0x2c')]);_0x439cc0[_0xa8cd('0x46')]=qs[_0xa8cd('0x46')](_0x4ff054['query'][_0xa8cd('0x46')]);}return _0x32f678[_0xa8cd('0xda')](_0x439cc0);}})[_0xa8cd('0x1e')](function(_0x1d949d){if(_0x1d949d){return _0x1d949d?{'count':_0x515a55,'rows':_0x1d949d}:null;}})['then'](respondWithResult(_0xdf1115,null))[_0xa8cd('0x27')](handleError(_0xdf1115,null));};
\ No newline at end of file
+var _0x6931=['../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','client','test','request','then','SmsAccount,\x20%s,\x20%s','request\x20sent','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','status','end','json','count','offset','Content-Range','apply','reject','save','update','destroy','get','SmsAccounts','UserProfileResource','sendStatus','stack','name','index','Pause','mandatoryDispositionPause','map','SmsAccount','rawAttributes','fieldName','type','key','model','keys','attributes','intersection','length','query','nolimit','limit','order','sort','filters','filter','where','VIRTUAL','merge','options','include','findAll','params','fields','includeAll','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','body','describe','SmsAccountId','Disposition','getDispositions','hasOwnProperty','pick','rows','removeDispositions','ids','addAnswer','getAnswers','findOne','CannedAnswer','removeAnswers','sms','SmsApplication','Applications','account','applications','orderBy','priority','asc','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','CompanyId','from','From','Body','messageId','MessageSid','skebby','sender','text','connectel','clicksend','message_id','plivo','Text','results','csc','originatingAddress','segmentedMessage','fromNumber','replyMessageId','intelepeer','refid','isNil','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','updatedAt','DESC','list','Contacts','contact','SmsInteraction','spread','interaction','created','autoclose','unmanaged','*,*,*,*','SmsMessage','ContactId','AttachmentId','UserId','Start','startRouting','receiveMessage','entity\x20found','debug','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','twilio','set','Content-Type','\x0a ','sequelize','findAndCountAll','getApplications','Contact','User','Owner','fullname','internal','Tags','color','tag','send','List','user','out','Messages','dataValues','push','endpoint\x20/status\x20POST\x20/','received\x20delivery\x20report\x20from','inspect','skebby_dispatch_id','requestid','statusInt','status_code','infobip','groupName','redif','DELIVERED','error_code','clickatell','RECEIVED_BY_RECIPIENT','DELIVRD','ACCEPTD','state','message-id','addAgents','omit','emit','userSmsAccount:save','removeAgents','userSmsAccount:remove','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x4afcf1,_0x1f34e0){var _0x377f36=function(_0x2969ed){while(--_0x2969ed){_0x4afcf1['push'](_0x4afcf1['shift']());}};_0x377f36(++_0x1f34e0);}(_0x6931,0x1a9));var _0x1693=function(_0x23c297,_0x4a1467){_0x23c297=_0x23c297-0x0;var _0x542435=_0x6931[_0x23c297];return _0x542435;};'use strict';var pdf=require(_0x1693('0x0'));var emlformat=require(_0x1693('0x1'));var rimraf=require(_0x1693('0x2'));var zipdir=require(_0x1693('0x3'));var jsonpatch=require(_0x1693('0x4'));var rp=require(_0x1693('0x5'));var moment=require(_0x1693('0x6'));var BPromise=require(_0x1693('0x7'));var Mustache=require('mustache');var util=require(_0x1693('0x8'));var path=require(_0x1693('0x9'));var sox=require(_0x1693('0xa'));var csv=require(_0x1693('0xb'));var ejs=require(_0x1693('0xc'));var fs=require('fs');var _=require('lodash');var squel=require(_0x1693('0xd'));var crypto=require(_0x1693('0xe'));var jsforce=require(_0x1693('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x1693('0xb'));var querystring=require(_0x1693('0x10'));var Papa=require(_0x1693('0x11'));var Redis=require(_0x1693('0x12'));var authService=require(_0x1693('0x13'));var qs=require(_0x1693('0x14'));var as=require(_0x1693('0x15'));var hardwareService=require(_0x1693('0x16'));var logger=require(_0x1693('0x17'))(_0x1693('0x18'));var utils=require(_0x1693('0x19'));var config=require('../../config/environment');var db=require(_0x1693('0x1a'))['db'];config[_0x1693('0x1b')]=_[_0x1693('0x1c')](config[_0x1693('0x1b')],{'host':_0x1693('0x1d'),'port':0x18eb});var socket=require(_0x1693('0x1e'))(new Redis(config[_0x1693('0x1b')]));require('./smsAccount.socket')[_0x1693('0x1f')](socket);var jayson=require('jayson/promise');var client=jayson[_0x1693('0x20')]['http']({'port':0x232c});function checkPasswordPattern(_0x6704d4,_0x380cf5,_0x4db220){if(_0x4db220){var _0x5a4fb3=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5a4fb3[_0x1693('0x21')](_0x380cf5)){return _0x6704d4;}else{throw new db['Sequelize']['ValidationError']('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x6704d4;}}function respondWithRpcPromise(_0x1eb3ef,_0x4b8bb2,_0x49e7fb,_0x2a3bc2){return new BPromise(function(_0x1a270b,_0x7ef2){var _0xdd00ed=_0x2a3bc2||client;return _0xdd00ed[_0x1693('0x22')](_0x1eb3ef,_0x49e7fb)[_0x1693('0x23')](function(_0x4c3977){logger['info'](_0x1693('0x24'),_0x4b8bb2,_0x1693('0x25'));logger['debug'](_0x1693('0x26'),_0x4b8bb2,_0x1693('0x25'),JSON[_0x1693('0x27')](_0x4c3977));if(_0x4c3977[_0x1693('0x28')]){if(_0x4c3977[_0x1693('0x28')]['code']===0x1f4){logger[_0x1693('0x28')](_0x1693('0x24'),_0x4b8bb2,_0x4c3977[_0x1693('0x28')][_0x1693('0x29')]);return _0x7ef2(_0x4c3977[_0x1693('0x28')][_0x1693('0x29')]);}logger['error'](_0x1693('0x24'),_0x4b8bb2,_0x4c3977['error'][_0x1693('0x29')]);return _0x1a270b(_0x4c3977[_0x1693('0x28')][_0x1693('0x29')]);}else{logger['info'](_0x1693('0x24'),_0x4b8bb2,_0x1693('0x25'));_0x1a270b(_0x4c3977[_0x1693('0x2a')][_0x1693('0x29')]);}})[_0x1693('0x2b')](function(_0x459c39){logger[_0x1693('0x28')]('SmsAccount,\x20%s,\x20%s',_0x4b8bb2,_0x459c39);_0x7ef2(_0x459c39);});});}function respondWithStatusCode(_0x2d0806,_0x4ef8eb){_0x4ef8eb=_0x4ef8eb||0xcc;return function(_0x3e7ccf){if(_0x3e7ccf){return _0x2d0806['sendStatus'](_0x4ef8eb);}return _0x2d0806[_0x1693('0x2c')](_0x4ef8eb)[_0x1693('0x2d')]();};}function respondWithResult(_0x437eb9,_0x148438){_0x148438=_0x148438||0xc8;return function(_0x5888d7){if(_0x5888d7){return _0x437eb9[_0x1693('0x2c')](_0x148438)[_0x1693('0x2e')](_0x5888d7);}};}function respondWithFilteredResult(_0x5484d4,_0x48f0c5){return function(_0x372585){if(_0x372585){var _0x48ea39=_0x372585[_0x1693('0x2f')],_0x4ea713=_0x48f0c5['offset'],_0x5ce409=_0x48f0c5[_0x1693('0x30')]+_0x48f0c5['limit'],_0x2e3bf8;if(_0x5ce409>=_0x48ea39){_0x5ce409=_0x48ea39;_0x2e3bf8=0xc8;}else{_0x2e3bf8=0xce;}_0x5484d4[_0x1693('0x2c')](_0x2e3bf8);return _0x5484d4['set'](_0x1693('0x31'),_0x4ea713+'-'+_0x5ce409+'/'+_0x48ea39)[_0x1693('0x2e')](_0x372585);}return null;};}function patchUpdates(_0x15a9a8){return function(_0x5b4c17){try{jsonpatch[_0x1693('0x32')](_0x5b4c17,_0x15a9a8,!![]);}catch(_0x43fd01){return BPromise[_0x1693('0x33')](_0x43fd01);}return _0x5b4c17[_0x1693('0x34')]();};}function saveUpdates(_0x459a86,_0x30ee2b){return function(_0x26c86f){if(_0x26c86f){return _0x26c86f[_0x1693('0x35')](_0x459a86)[_0x1693('0x23')](function(_0x3e9dd5){return _0x3e9dd5;});}return null;};}function removeEntity(_0x37b8ec,_0x21c346){return function(_0x4c4c65){if(_0x4c4c65){return _0x4c4c65[_0x1693('0x36')]()['then'](function(){var _0xfa23ff=_0x4c4c65[_0x1693('0x37')]({'plain':!![]});var _0xe94f0b=_0x1693('0x38');return db[_0x1693('0x39')][_0x1693('0x36')]({'where':{'type':_0xe94f0b,'resourceId':_0xfa23ff['id']}})[_0x1693('0x23')](function(){return _0x4c4c65;});})[_0x1693('0x23')](function(){_0x37b8ec[_0x1693('0x2c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x163731,_0x10bfbc){return function(_0x15cf6a){if(!_0x15cf6a){_0x163731[_0x1693('0x3a')](0x194);}return _0x15cf6a;};}function handleError(_0x355c70,_0x3b37a1){_0x3b37a1=_0x3b37a1||0x1f4;return function(_0x3a49cf){logger[_0x1693('0x28')](_0x3a49cf[_0x1693('0x3b')]);if(_0x3a49cf[_0x1693('0x3c')]){delete _0x3a49cf['name'];}_0x355c70['status'](_0x3b37a1)['send'](_0x3a49cf);};}exports[_0x1693('0x3d')]=function(_0x2f1f6e,_0x36ce16){var _0x2eb8da={'include':[{'model':db[_0x1693('0x3e')],'as':_0x1693('0x3f')}]},_0x361330={},_0x4a5462={'count':0x0,'rows':[]};var _0x1502a1=_[_0x1693('0x40')](db[_0x1693('0x41')][_0x1693('0x42')],function(_0x4a6455){return{'name':_0x4a6455[_0x1693('0x43')],'type':_0x4a6455[_0x1693('0x44')][_0x1693('0x45')]};});_0x361330[_0x1693('0x46')]=_[_0x1693('0x40')](_0x1502a1,_0x1693('0x3c'));_0x361330['query']=_[_0x1693('0x47')](_0x2f1f6e['query']);_0x361330['filters']=_['intersection'](_0x361330['model'],_0x361330['query']);_0x2eb8da[_0x1693('0x48')]=_[_0x1693('0x49')](_0x361330[_0x1693('0x46')],qs['fields'](_0x2f1f6e['query']['fields']));_0x2eb8da[_0x1693('0x48')]=_0x2eb8da[_0x1693('0x48')][_0x1693('0x4a')]?_0x2eb8da['attributes']:_0x361330[_0x1693('0x46')];if(!_0x2f1f6e[_0x1693('0x4b')]['hasOwnProperty'](_0x1693('0x4c'))){_0x2eb8da['limit']=qs[_0x1693('0x4d')](_0x2f1f6e[_0x1693('0x4b')][_0x1693('0x4d')]);_0x2eb8da['offset']=qs[_0x1693('0x30')](_0x2f1f6e['query'][_0x1693('0x30')]);}_0x2eb8da[_0x1693('0x4e')]=qs[_0x1693('0x4f')](_0x2f1f6e[_0x1693('0x4b')][_0x1693('0x4f')]);_0x2eb8da['where']=qs['filters'](_['pick'](_0x2f1f6e[_0x1693('0x4b')],_0x361330[_0x1693('0x50')]));if(_0x2f1f6e[_0x1693('0x4b')][_0x1693('0x51')]){_0x2eb8da[_0x1693('0x52')]=_['merge'](_0x2eb8da[_0x1693('0x52')],{'$or':_[_0x1693('0x40')](_0x1502a1,function(_0x4614e1){if(_0x4614e1[_0x1693('0x44')]!==_0x1693('0x53')){var _0x4ae5d8={};_0x4ae5d8[_0x4614e1['name']]={'$like':'%'+_0x2f1f6e[_0x1693('0x4b')][_0x1693('0x51')]+'%'};return _0x4ae5d8;}})});}_0x2eb8da=_[_0x1693('0x54')]({},_0x2eb8da,_0x2f1f6e[_0x1693('0x55')]);var _0x4743d0={'where':_0x2eb8da['where']};return db['SmsAccount'][_0x1693('0x2f')](_0x4743d0)[_0x1693('0x23')](function(_0x57d3ea){_0x4a5462[_0x1693('0x2f')]=_0x57d3ea;if(_0x2f1f6e[_0x1693('0x4b')]['includeAll']){_0x2eb8da[_0x1693('0x56')]=[{'all':!![]}];}return db[_0x1693('0x41')][_0x1693('0x57')](_0x2eb8da);})[_0x1693('0x23')](function(_0x1e3a52){_0x4a5462['rows']=_0x1e3a52;return _0x4a5462;})[_0x1693('0x23')](respondWithFilteredResult(_0x36ce16,_0x2eb8da))['catch'](handleError(_0x36ce16,null));};exports['show']=function(_0x48d822,_0x178434){var _0x58696b={'raw':![],'where':{'id':_0x48d822[_0x1693('0x58')]['id']},'include':[{'model':db[_0x1693('0x3e')],'as':_0x1693('0x3f')}]},_0x4d7f9c={};_0x4d7f9c[_0x1693('0x46')]=_[_0x1693('0x47')](db[_0x1693('0x41')][_0x1693('0x42')]);_0x4d7f9c['query']=_['keys'](_0x48d822['query']);_0x4d7f9c[_0x1693('0x50')]=_[_0x1693('0x49')](_0x4d7f9c[_0x1693('0x46')],_0x4d7f9c['query']);_0x58696b[_0x1693('0x48')]=_[_0x1693('0x49')](_0x4d7f9c['model'],qs[_0x1693('0x59')](_0x48d822[_0x1693('0x4b')][_0x1693('0x59')]));_0x58696b['attributes']=_0x58696b[_0x1693('0x48')][_0x1693('0x4a')]?_0x58696b[_0x1693('0x48')]:_0x4d7f9c[_0x1693('0x46')];if(_0x48d822[_0x1693('0x4b')][_0x1693('0x5a')]){_0x58696b[_0x1693('0x56')]=[{'all':!![]}];}_0x58696b=_[_0x1693('0x54')]({},_0x58696b,_0x48d822[_0x1693('0x55')]);return db[_0x1693('0x41')]['find'](_0x58696b)[_0x1693('0x23')](handleEntityNotFound(_0x178434,null))[_0x1693('0x23')](respondWithResult(_0x178434,null))[_0x1693('0x2b')](handleError(_0x178434,null));};exports[_0x1693('0x5b')]=function(_0x45a1d2,_0x51f25b){return db[_0x1693('0x41')]['create'](_0x45a1d2['body'],{})[_0x1693('0x23')](function(_0x4983ac){var _0x50cebf=_0x45a1d2['user'][_0x1693('0x37')]({'plain':!![]});if(!_0x50cebf)throw new Error(_0x1693('0x5c'));if(_0x50cebf[_0x1693('0x5d')]==='user'){var _0x434987=_0x4983ac[_0x1693('0x37')]({'plain':!![]});var _0x2c54b6=_0x1693('0x38');return db[_0x1693('0x5e')][_0x1693('0x5f')]({'where':{'name':_0x2c54b6,'userProfileId':_0x50cebf['userProfileId']},'raw':!![]})[_0x1693('0x23')](function(_0x28df3e){if(_0x28df3e&&_0x28df3e[_0x1693('0x60')]===0x0){return db[_0x1693('0x39')][_0x1693('0x5b')]({'name':_0x434987['name'],'resourceId':_0x434987['id'],'type':_0x28df3e['name'],'sectionId':_0x28df3e['id']},{})['then'](function(){return _0x4983ac;});}else{return _0x4983ac;}})['catch'](function(_0x10a19c){logger[_0x1693('0x28')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x10a19c);throw _0x10a19c;});}return _0x4983ac;})[_0x1693('0x23')](respondWithResult(_0x51f25b,0xc9))[_0x1693('0x2b')](handleError(_0x51f25b,null));};exports[_0x1693('0x35')]=function(_0x1e29b6,_0xe4d730){if(_0x1e29b6[_0x1693('0x61')]['id']){delete _0x1e29b6['body']['id'];}return db[_0x1693('0x41')]['find']({'where':{'id':_0x1e29b6['params']['id']},'include':[{'model':db[_0x1693('0x3e')],'as':_0x1693('0x3f')}]})[_0x1693('0x23')](handleEntityNotFound(_0xe4d730,null))[_0x1693('0x23')](saveUpdates(_0x1e29b6[_0x1693('0x61')],null))['then'](respondWithResult(_0xe4d730,null))[_0x1693('0x2b')](handleError(_0xe4d730,null));};exports[_0x1693('0x36')]=function(_0x3e6469,_0x439c36){return db[_0x1693('0x41')]['find']({'where':{'id':_0x3e6469[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x439c36,null))[_0x1693('0x23')](removeEntity(_0x439c36,null))[_0x1693('0x2b')](handleError(_0x439c36,null));};exports['describe']=function(_0x2a309c,_0x12f40d){return db[_0x1693('0x41')][_0x1693('0x62')]()[_0x1693('0x23')](respondWithResult(_0x12f40d,null))[_0x1693('0x2b')](handleError(_0x12f40d,null));};exports['addDisposition']=function(_0x5bd7c4,_0x52f1a1,_0x6909bf){if(_0x5bd7c4[_0x1693('0x61')]['id']){delete _0x5bd7c4['body']['id'];}return db[_0x1693('0x41')][_0x1693('0x5f')]({'where':{'id':_0x5bd7c4['params']['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x52f1a1,null))['then'](function(_0xec49ff){if(_0xec49ff){_0x5bd7c4[_0x1693('0x61')][_0x1693('0x63')]=_0xec49ff['id'];return db[_0x1693('0x64')][_0x1693('0x5b')](_0x5bd7c4[_0x1693('0x61')]);}})[_0x1693('0x23')](respondWithResult(_0x52f1a1,null))[_0x1693('0x2b')](handleError(_0x52f1a1,null));};exports[_0x1693('0x65')]=function(_0x584a14,_0x3753c3,_0x4c651d){var _0x4f5bdf={'raw':![],'where':{}};var _0x1efe8a={};var _0x11c164={'count':0x0,'rows':[]};return db[_0x1693('0x41')]['findOne']({'where':{'id':_0x584a14[_0x1693('0x58')]['id']}})['then'](handleEntityNotFound(_0x3753c3,null))[_0x1693('0x23')](function(_0x2bc97c){if(_0x2bc97c){_0x1efe8a[_0x1693('0x46')]=_['keys'](db['Disposition'][_0x1693('0x42')]);_0x1efe8a[_0x1693('0x4b')]=_[_0x1693('0x47')](_0x584a14['query']);_0x1efe8a[_0x1693('0x50')]=_['intersection'](_0x1efe8a[_0x1693('0x46')],_0x1efe8a[_0x1693('0x4b')]);_0x4f5bdf[_0x1693('0x48')]=_[_0x1693('0x49')](_0x1efe8a['model'],qs[_0x1693('0x59')](_0x584a14[_0x1693('0x4b')][_0x1693('0x59')]));_0x4f5bdf[_0x1693('0x48')]=_0x4f5bdf[_0x1693('0x48')][_0x1693('0x4a')]?_0x4f5bdf[_0x1693('0x48')]:_0x1efe8a[_0x1693('0x46')];if(!_0x584a14[_0x1693('0x4b')][_0x1693('0x66')](_0x1693('0x4c'))){_0x4f5bdf[_0x1693('0x4d')]=qs[_0x1693('0x4d')](_0x584a14[_0x1693('0x4b')][_0x1693('0x4d')]);_0x4f5bdf[_0x1693('0x30')]=qs['offset'](_0x584a14['query'][_0x1693('0x30')]);}_0x4f5bdf[_0x1693('0x4e')]=qs['sort'](_0x584a14[_0x1693('0x4b')][_0x1693('0x4f')]);_0x4f5bdf[_0x1693('0x52')]=qs['filters'](_[_0x1693('0x67')](_0x584a14[_0x1693('0x4b')],_0x1efe8a[_0x1693('0x50')]));_0x4f5bdf[_0x1693('0x52')][_0x1693('0x63')]=_0x2bc97c['id'];if(_0x584a14[_0x1693('0x4b')][_0x1693('0x51')]){_0x4f5bdf[_0x1693('0x52')]=_['merge'](_0x4f5bdf[_0x1693('0x52')],{'$or':_['map'](_0x4f5bdf[_0x1693('0x48')],function(_0x442af0){var _0x1e7554={};_0x1e7554[_0x442af0]={'$like':'%'+_0x584a14[_0x1693('0x4b')]['filter']+'%'};return _0x1e7554;})});}_0x4f5bdf=_[_0x1693('0x54')]({},_0x4f5bdf,_0x584a14['options']);return db[_0x1693('0x64')][_0x1693('0x2f')]({'where':_0x4f5bdf[_0x1693('0x52')]})[_0x1693('0x23')](function(_0x282ed8){_0x11c164[_0x1693('0x2f')]=_0x282ed8;if(_0x584a14[_0x1693('0x4b')][_0x1693('0x5a')]){_0x4f5bdf['include']=[{'all':!![]}];}return db[_0x1693('0x64')]['findAll'](_0x4f5bdf);})['then'](function(_0x1c89e4){_0x11c164[_0x1693('0x68')]=_0x1c89e4;return _0x11c164;});}})[_0x1693('0x23')](respondWithFilteredResult(_0x3753c3,_0x4f5bdf))[_0x1693('0x2b')](handleError(_0x3753c3,null));};exports[_0x1693('0x69')]=function(_0x5c9a85,_0x58c1c6,_0x46ceba){return db[_0x1693('0x41')][_0x1693('0x5f')]({'where':{'id':_0x5c9a85[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x58c1c6,null))['then'](function(_0x4492fb){if(_0x4492fb){return _0x4492fb[_0x1693('0x69')](_0x5c9a85[_0x1693('0x4b')][_0x1693('0x6a')]);}})[_0x1693('0x23')](respondWithStatusCode(_0x58c1c6,null))['catch'](handleError(_0x58c1c6,null));};exports[_0x1693('0x6b')]=function(_0x1ff6d5,_0x237fd8,_0xa2adc4){if(_0x1ff6d5[_0x1693('0x61')]['id']){delete _0x1ff6d5[_0x1693('0x61')]['id'];}return db[_0x1693('0x41')]['find']({'where':{'id':_0x1ff6d5[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x237fd8,null))[_0x1693('0x23')](function(_0x535d7a){if(_0x535d7a){_0x1ff6d5[_0x1693('0x61')][_0x1693('0x63')]=_0x535d7a['id'];return db['CannedAnswer'][_0x1693('0x5b')](_0x1ff6d5[_0x1693('0x61')]);}})[_0x1693('0x23')](respondWithResult(_0x237fd8,null))['catch'](handleError(_0x237fd8,null));};exports[_0x1693('0x6c')]=function(_0x5a3922,_0x1f721d,_0x38fbc2){var _0x35b96d={'raw':![],'where':{}};var _0x20901a={};var _0x33e2e1={'count':0x0,'rows':[]};return db['SmsAccount'][_0x1693('0x6d')]({'where':{'id':_0x5a3922[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x1f721d,null))['then'](function(_0x533612){if(_0x533612){_0x20901a[_0x1693('0x46')]=_[_0x1693('0x47')](db['CannedAnswer'][_0x1693('0x42')]);_0x20901a['query']=_[_0x1693('0x47')](_0x5a3922[_0x1693('0x4b')]);_0x20901a['filters']=_[_0x1693('0x49')](_0x20901a['model'],_0x20901a['query']);_0x35b96d[_0x1693('0x48')]=_[_0x1693('0x49')](_0x20901a['model'],qs['fields'](_0x5a3922[_0x1693('0x4b')][_0x1693('0x59')]));_0x35b96d['attributes']=_0x35b96d[_0x1693('0x48')][_0x1693('0x4a')]?_0x35b96d[_0x1693('0x48')]:_0x20901a['model'];if(!_0x5a3922['query'][_0x1693('0x66')](_0x1693('0x4c'))){_0x35b96d[_0x1693('0x4d')]=qs[_0x1693('0x4d')](_0x5a3922[_0x1693('0x4b')][_0x1693('0x4d')]);_0x35b96d[_0x1693('0x30')]=qs['offset'](_0x5a3922['query'][_0x1693('0x30')]);}_0x35b96d[_0x1693('0x4e')]=qs[_0x1693('0x4f')](_0x5a3922[_0x1693('0x4b')][_0x1693('0x4f')]);_0x35b96d['where']=qs['filters'](_['pick'](_0x5a3922[_0x1693('0x4b')],_0x20901a[_0x1693('0x50')]));_0x35b96d[_0x1693('0x52')]['SmsAccountId']=_0x533612['id'];if(_0x5a3922['query'][_0x1693('0x51')]){_0x35b96d['where']=_[_0x1693('0x54')](_0x35b96d[_0x1693('0x52')],{'$or':_['map'](_0x35b96d[_0x1693('0x48')],function(_0x1807fa){var _0x447818={};_0x447818[_0x1807fa]={'$like':'%'+_0x5a3922[_0x1693('0x4b')][_0x1693('0x51')]+'%'};return _0x447818;})});}_0x35b96d=_[_0x1693('0x54')]({},_0x35b96d,_0x5a3922[_0x1693('0x55')]);return db[_0x1693('0x6e')][_0x1693('0x2f')]({'where':_0x35b96d[_0x1693('0x52')]})[_0x1693('0x23')](function(_0x545ab8){_0x33e2e1[_0x1693('0x2f')]=_0x545ab8;if(_0x5a3922[_0x1693('0x4b')]['includeAll']){_0x35b96d[_0x1693('0x56')]=[{'all':!![]}];}return db[_0x1693('0x6e')][_0x1693('0x57')](_0x35b96d);})[_0x1693('0x23')](function(_0x35bbea){_0x33e2e1[_0x1693('0x68')]=_0x35bbea;return _0x33e2e1;});}})[_0x1693('0x23')](respondWithFilteredResult(_0x1f721d,_0x35b96d))[_0x1693('0x2b')](handleError(_0x1f721d,null));};exports[_0x1693('0x6f')]=function(_0x166887,_0x2a10f9,_0x4de909){return db[_0x1693('0x41')][_0x1693('0x5f')]({'where':{'id':_0x166887[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x2a10f9,null))[_0x1693('0x23')](function(_0x35681a){if(_0x35681a){return _0x35681a[_0x1693('0x6f')](_0x166887[_0x1693('0x4b')][_0x1693('0x6a')]);}})[_0x1693('0x23')](respondWithStatusCode(_0x2a10f9,null))['catch'](handleError(_0x2a10f9,null));};exports['notify']=function(_0x7dc835,_0x4936cb,_0x921c42){var _0x4d7d3f={'channel':_0x1693('0x70')};var _0x51c8c6=[];var _0x5b224a=[];var _0x19abe8={};return db[_0x1693('0x41')][_0x1693('0x5f')]({'where':{'id':_0x7dc835[_0x1693('0x58')]['id']},'include':[{'model':db[_0x1693('0x71')],'as':_0x1693('0x72')}]})[_0x1693('0x23')](handleEntityNotFound(_0x4936cb,null))[_0x1693('0x23')](function(_0x314ff6){_0x4d7d3f[_0x1693('0x73')]=_0x314ff6;_0x4d7d3f[_0x1693('0x74')]=_[_0x1693('0x75')](_0x314ff6['Applications'],[_0x1693('0x76')],[_0x1693('0x77')]);if(_0x4d7d3f[_0x1693('0x73')][_0x1693('0x72')]){delete _0x4d7d3f['account'][_0x1693('0x72')];}return db[_0x1693('0x78')][_0x1693('0x62')]();})[_0x1693('0x23')](function(_0x470b20){if(!_0x470b20){throw new db[(_0x1693('0x79'))][(_0x1693('0x7a'))](_0x1693('0x7b'));}_0x51c8c6=_[_0x1693('0x7c')](_['keys'](_0x470b20),[_0x1693('0x7d'),'updatedAt']);_0x5b224a=_[_0x1693('0x7c')](_[_0x1693('0x47')](_0x470b20),['createdAt','updatedAt',_0x1693('0x7e'),'ListId']);_0x4d7d3f['body']={'mapKey':'mobile'};if(_0x4d7d3f[_0x1693('0x73')][_0x1693('0x44')]){switch(_0x4d7d3f[_0x1693('0x73')][_0x1693('0x44')]){case'twilio':_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x80')];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x61')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x81')];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x82')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x83')];break;case _0x1693('0x84'):_0x4d7d3f['body'][_0x1693('0x7f')]='+'+_0x7dc835[_0x1693('0x61')][_0x1693('0x85')];_0x4d7d3f['body']['body']=_0x7dc835[_0x1693('0x61')][_0x1693('0x86')];break;case _0x1693('0x87'):_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x7f')];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x61')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x29')];break;case _0x1693('0x88'):_0x4d7d3f['body'][_0x1693('0x7f')]=_0x7dc835['body'][_0x1693('0x7f')];_0x4d7d3f['body']['body']=_0x7dc835['body'][_0x1693('0x61')];_0x4d7d3f[_0x1693('0x61')]['messageId']=_0x7dc835[_0x1693('0x61')][_0x1693('0x89')];break;case _0x1693('0x8a'):_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x80')];_0x4d7d3f[_0x1693('0x61')]['body']=_0x7dc835[_0x1693('0x61')][_0x1693('0x8b')];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x82')]=_0x7dc835['body']['MessageUUID'];break;case'infobip':_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')]='+'+_0x7dc835[_0x1693('0x61')][_0x1693('0x8c')][0x0][_0x1693('0x7f')];_0x4d7d3f[_0x1693('0x61')]['body']=_0x7dc835[_0x1693('0x61')]['results'][0x0]['text'];_0x4d7d3f[_0x1693('0x61')]['messageId']=_0x7dc835['body'][_0x1693('0x8c')][0x0][_0x1693('0x82')];break;case _0x1693('0x8d'):_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x8e')];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x61')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x8f')]['message'];break;case'clickatell':_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x90')];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x61')]=_0x7dc835[_0x1693('0x61')]['text'];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x82')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x91')];break;case _0x1693('0x92'):_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')]=_0x7dc835[_0x1693('0x61')]['from'];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x61')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x29')];_0x4d7d3f[_0x1693('0x61')][_0x1693('0x82')]=_0x7dc835[_0x1693('0x61')][_0x1693('0x93')];break;}}if(_0x4d7d3f[_0x1693('0x61')]['id']){delete _0x4d7d3f[_0x1693('0x61')]['id'];}if(_[_0x1693('0x94')](_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')])){throw new db[(_0x1693('0x79'))][(_0x1693('0x7a'))](_0x1693('0x95'));}if(_['isNil'](_0x4d7d3f[_0x1693('0x61')][_0x1693('0x61')])||_0x4d7d3f[_0x1693('0x61')]['body']===''){throw new db['Sequelize'][(_0x1693('0x7a'))](_0x1693('0x96'));}if(_[_0x1693('0x94')](_0x4d7d3f[_0x1693('0x61')][_0x1693('0x97')])){throw new db['Sequelize'][(_0x1693('0x7a'))](_0x1693('0x98')+_0x5b224a);}if(!_[_0x1693('0x99')](_0x5b224a,_0x4d7d3f[_0x1693('0x61')][_0x1693('0x97')])){throw new db[(_0x1693('0x79'))][(_0x1693('0x7a'))](_0x1693('0x9a')+_0x5b224a);}_0x19abe8[_0x4d7d3f[_0x1693('0x61')][_0x1693('0x97')]]=_0x4d7d3f['body']['from'];return db[_0x1693('0x9b')][_0x1693('0x5f')]({'where':{'id':_0x4d7d3f['account']['ListId']},'include':[{'model':db[_0x1693('0x78')],'as':'Contacts','where':_0x19abe8,'limit':0x1,'order':[[_0x1693('0x9c'),_0x1693('0x9d')]]}]});})[_0x1693('0x23')](handleEntityNotFound(_0x4936cb,null))[_0x1693('0x23')](function(_0x335a46){if(_0x335a46){_0x4d7d3f[_0x1693('0x9e')]=_['omit'](_0x335a46,[_0x1693('0x9f')]);if(_0x335a46[_0x1693('0x9f')][_0x1693('0x4a')]){return _0x335a46[_0x1693('0x9f')][0x0];}var _0x519b5f=_[_0x1693('0x1c')](_0x4d7d3f[_0x1693('0x61')],{'firstName':_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')],'ListId':_0x335a46['id']});_0x519b5f[_0x4d7d3f[_0x1693('0x61')][_0x1693('0x97')]]=_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')];return db[_0x1693('0x78')][_0x1693('0x5b')](_0x519b5f,{'fields':_0x51c8c6,'raw':!![]});}})['then'](handleEntityNotFound(_0x4936cb,null))[_0x1693('0x23')](function(_0x3f8122){if(_0x3f8122){_0x4d7d3f[_0x1693('0xa0')]=_0x3f8122;var _0x594ba2={'ContactId':_0x3f8122['id'],'phone':_0x4d7d3f['body']['from'],'SmsAccountId':_0x7dc835[_0x1693('0x58')]['id']};var _0x4318fe={'ContactId':_0x3f8122['id'],'SmsAccountId':_0x7dc835[_0x1693('0x58')]['id'],'closed':![]};return db[_0x1693('0xa1')]['find']({'where':_0x4318fe})[_0x1693('0x23')](function(_0x38df20){if(_0x38df20){return[_0x38df20,![]];}return db[_0x1693('0xa1')]['create'](_0x594ba2)[_0x1693('0x23')](function(_0x57a9ac){return[_0x57a9ac,!![]];});});}})[_0x1693('0xa2')](function(_0x5b6900,_0x20a6aa){_0x4d7d3f[_0x1693('0xa3')]=_0x5b6900[_0x1693('0x37')]({'plain':!![]});_0x4d7d3f[_0x1693('0xa3')][_0x1693('0xa4')]=![];if(_0x20a6aa){if(_0x4d7d3f['account'][_0x1693('0xa5')]){_0x4d7d3f['applications']['push']({'id':0x0,'priority':_0x4d7d3f[_0x1693('0x74')][_0x1693('0x4a')]+0x1,'app':'close','appdata':_0x1693('0xa6'),'interval':_0x1693('0xa7')});}_0x4d7d3f['interaction'][_0x1693('0xa4')]=!![];}return db[_0x1693('0xa8')][_0x1693('0x5b')]({'phone':_0x4d7d3f[_0x1693('0x61')][_0x1693('0x7f')],'messageId':_0x4d7d3f[_0x1693('0x61')]['messageId'],'body':_0x4d7d3f['body'][_0x1693('0x61')],'SmsAccountId':_0x7dc835[_0x1693('0x58')]['id'],'SmsInteractionId':_0x5b6900['id'],'direction':'in','ContactId':_0x5b6900[_0x1693('0xa9')],'AttachmentId':_0x4d7d3f[_0x1693('0x61')][_0x1693('0xaa')]});})[_0x1693('0x23')](function(_0x50c463){_0x4d7d3f[_0x1693('0x29')]=_0x50c463;if(_0x4d7d3f[_0x1693('0xa3')][_0x1693('0xab')]){return db['User'][_0x1693('0x5f')]({'attributes':['id',_0x1693('0x3c')],'where':{'id':_0x4d7d3f[_0x1693('0xa3')]['UserId']}})[_0x1693('0x23')](function(_0x3f0397){if(_0x3f0397){_0x4d7d3f['applications']['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x3f0397[_0x1693('0x3c')]+','+(_0x4d7d3f[_0x1693('0x73')]['waitForTheAssignedAgent']||0xa),'interval':_0x1693('0xa7')});}return respondWithRpcPromise(_0x1693('0xac'),_0x1693('0xad'),_0x4d7d3f);});}return respondWithRpcPromise(_0x1693('0xac'),_0x1693('0xad'),_0x4d7d3f);})[_0x1693('0x23')](function(_0x464e4a){if(_0x464e4a){var _0x3a529f=0xc8;var _0x86d658=_0x1693('0xae');logger['info']('SmsAccount,\x20%s,\x20%s,\x20%s',_0x86d658,_0x3a529f,_0x1693('0xaf'));logger[_0x1693('0xb0')](_0x1693('0xb1'),_0x86d658,_0x3a529f,_0x1693('0xaf'),JSON['stringify'](_0x464e4a));if(_0x4d7d3f[_0x1693('0x73')][_0x1693('0x44')]===_0x1693('0xb2')){return _0x4936cb[_0x1693('0x2c')](_0x3a529f)[_0x1693('0xb3')](_0x1693('0xb4'),'text/xml')['send'](_0x1693('0xb5'));}else{return _0x4936cb['status'](_0x3a529f)[_0x1693('0x2e')](_0x464e4a);}}})[_0x1693('0x2b')](handleError(_0x4936cb,null));};exports['addApplications']=function(_0x1667da,_0x4eb84a,_0x35021d){return db[_0x1693('0x41')][_0x1693('0x6d')]({'where':{'id':_0x1667da[_0x1693('0x58')]['id']}})['then'](handleEntityNotFound(_0x4eb84a,null))[_0x1693('0x23')](function(_0x4be771){if(_0x4be771){return db[_0x1693('0xb6')]['transaction'](function(_0x22deee){return db[_0x1693('0x71')][_0x1693('0x36')]({'where':{'SmsAccountId':_0x1667da[_0x1693('0x58')]['id']},'transaction':_0x22deee})[_0x1693('0x23')](function(_0x5e7a82){var _0x41178a=_['map'](_0x1667da[_0x1693('0x61')],function(_0x3c8eb4){_0x3c8eb4[_0x1693('0x63')]=_0x1667da[_0x1693('0x58')]['id'];return _0x3c8eb4;});return db[_0x1693('0x71')]['bulkCreate'](_0x41178a,{'transaction':_0x22deee});});})['then'](function(){return db['SmsApplication'][_0x1693('0xb7')]({'where':{'SmsAccountId':_0x1667da[_0x1693('0x58')]['id']},'order':_0x1693('0x76')});});}})[_0x1693('0x23')](respondWithResult(_0x4eb84a,null))[_0x1693('0x2b')](handleError(_0x4eb84a,null));};exports[_0x1693('0xb8')]=function(_0x532a19,_0x57f975,_0xb7da0d){var _0x21f99e={};var _0xefe190={};var _0x527d48;var _0x374c90;return db[_0x1693('0x41')][_0x1693('0x6d')]({'where':{'id':_0x532a19['params']['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x57f975,null))[_0x1693('0x23')](function(_0x404789){if(_0x404789){_0x527d48=_0x404789;_0xefe190['model']=_[_0x1693('0x47')](db[_0x1693('0x71')][_0x1693('0x42')]);_0xefe190['query']=_[_0x1693('0x47')](_0x532a19['query']);_0xefe190[_0x1693('0x50')]=_['intersection'](_0xefe190[_0x1693('0x46')],_0xefe190[_0x1693('0x4b')]);_0x21f99e[_0x1693('0x48')]=_['intersection'](_0xefe190[_0x1693('0x46')],qs[_0x1693('0x59')](_0x532a19['query'][_0x1693('0x59')]));_0x21f99e[_0x1693('0x48')]=_0x21f99e[_0x1693('0x48')][_0x1693('0x4a')]?_0x21f99e[_0x1693('0x48')]:_0xefe190[_0x1693('0x46')];_0x21f99e[_0x1693('0x4e')]=qs[_0x1693('0x4f')](_0x532a19[_0x1693('0x4b')][_0x1693('0x4f')]);_0x21f99e[_0x1693('0x52')]=qs['filters'](_[_0x1693('0x67')](_0x532a19['query'],_0xefe190[_0x1693('0x50')]));if(_0x532a19['query']['filter']){_0x21f99e[_0x1693('0x52')]=_[_0x1693('0x54')](_0x21f99e[_0x1693('0x52')],{'$or':_[_0x1693('0x40')](_0x21f99e[_0x1693('0x48')],function(_0x7a77ca){var _0x436698={};_0x436698[_0x7a77ca]={'$like':'%'+_0x532a19[_0x1693('0x4b')][_0x1693('0x51')]+'%'};return _0x436698;})});}_0x21f99e=_['merge']({},_0x21f99e,_0x532a19[_0x1693('0x55')]);return _0x527d48['getApplications'](_0x21f99e);}})[_0x1693('0x23')](function(_0x6d494e){if(_0x6d494e){_0x374c90=_0x6d494e[_0x1693('0x4a')];if(!_0x532a19[_0x1693('0x4b')][_0x1693('0x66')](_0x1693('0x4c'))){_0x21f99e[_0x1693('0x4d')]=qs[_0x1693('0x4d')](_0x532a19['query'][_0x1693('0x4d')]);_0x21f99e[_0x1693('0x30')]=qs['offset'](_0x532a19[_0x1693('0x4b')][_0x1693('0x30')]);}return _0x527d48[_0x1693('0xb8')](_0x21f99e);}})[_0x1693('0x23')](function(_0x5c34b2){if(_0x5c34b2){return _0x5c34b2?{'count':_0x374c90,'rows':_0x5c34b2}:null;}})['then'](respondWithResult(_0x57f975,null))[_0x1693('0x2b')](handleError(_0x57f975,null));};exports['getInteractions']=function(_0x2d0258,_0x4a6ead,_0x15700d){var _0x5207cf={'raw':![],'where':{}};var _0x51432d={};var _0x4b6935={'count':0x0,'rows':[]};return db['SmsAccount'][_0x1693('0x6d')]({'where':{'id':_0x2d0258[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x4a6ead,null))[_0x1693('0x23')](function(_0x48e095){if(_0x48e095){_0x51432d[_0x1693('0x46')]=_[_0x1693('0x47')](db[_0x1693('0xa1')][_0x1693('0x42')]);_0x51432d['query']=_['keys'](_0x2d0258[_0x1693('0x4b')]);_0x51432d['filters']=_['intersection'](_0x51432d['model'],_0x51432d[_0x1693('0x4b')]);_0x5207cf[_0x1693('0x48')]=_[_0x1693('0x49')](_0x51432d[_0x1693('0x46')],qs[_0x1693('0x59')](_0x2d0258['query'][_0x1693('0x59')]));_0x5207cf['attributes']=_0x5207cf['attributes'][_0x1693('0x4a')]?_0x5207cf[_0x1693('0x48')]:_0x51432d[_0x1693('0x46')];if(!_0x2d0258[_0x1693('0x4b')]['hasOwnProperty'](_0x1693('0x4c'))){_0x5207cf['limit']=qs[_0x1693('0x4d')](_0x2d0258['query']['limit']);_0x5207cf[_0x1693('0x30')]=qs[_0x1693('0x30')](_0x2d0258['query']['offset']);}_0x5207cf[_0x1693('0x4e')]=qs[_0x1693('0x4f')](_0x2d0258[_0x1693('0x4b')]['sort']);_0x5207cf[_0x1693('0x52')]=qs[_0x1693('0x50')](_[_0x1693('0x67')](_0x2d0258[_0x1693('0x4b')],_0x51432d[_0x1693('0x50')]));_0x5207cf[_0x1693('0x52')][_0x1693('0x63')]=_0x48e095['id'];if(_0x2d0258[_0x1693('0x4b')][_0x1693('0x51')]){_0x5207cf[_0x1693('0x52')]=_[_0x1693('0x54')](_0x5207cf[_0x1693('0x52')],{'$or':_['map'](_0x5207cf[_0x1693('0x48')],function(_0x1edc95){var _0x7ebe6a={};_0x7ebe6a[_0x1edc95]={'$like':'%'+_0x2d0258['query'][_0x1693('0x51')]+'%'};return _0x7ebe6a;})});}_0x5207cf=_[_0x1693('0x54')]({},_0x5207cf,_0x2d0258['options']);return db[_0x1693('0xa1')][_0x1693('0x2f')]({'where':_0x5207cf['where']})[_0x1693('0x23')](function(_0x55d53d){_0x4b6935[_0x1693('0x2f')]=_0x55d53d;if(_0x2d0258['query'][_0x1693('0x5a')]){_0x5207cf[_0x1693('0x56')]=[{'model':db[_0x1693('0x78')],'as':_0x1693('0xb9'),'required':![]},{'model':db[_0x1693('0xba')],'as':_0x1693('0xbb'),'attributes':[_0x1693('0x3c'),_0x1693('0xbc'),_0x1693('0xbd')],'required':![]},{'model':db['Tag'],'as':_0x1693('0xbe'),'attributes':['id','name',_0x1693('0xbf')],'where':_0x2d0258['query'][_0x1693('0xc0')]?{'id':_0x2d0258['query'][_0x1693('0xc0')]}:undefined,'required':_0x2d0258['query'][_0x1693('0xc0')]?!![]:![]}];}return db[_0x1693('0xa1')][_0x1693('0x57')](_0x5207cf);})['then'](function(_0x509781){_0x4b6935['rows']=_0x509781;return _0x4b6935;});}})[_0x1693('0x23')](respondWithFilteredResult(_0x4a6ead,_0x5207cf))[_0x1693('0x2b')](handleError(_0x4a6ead,null));};exports[_0x1693('0xc1')]=function(_0x45aeca,_0x57a8d0,_0x2f951a){var _0x45a8c4,_0x529fac,_0x583a66;if(_[_0x1693('0x94')](_0x45aeca[_0x1693('0x61')][_0x1693('0x61')])||_0x45aeca[_0x1693('0x61')][_0x1693('0x61')]===''){throw new db[(_0x1693('0x79'))][(_0x1693('0x7a'))](_0x1693('0x96'));}if(_[_0x1693('0x94')](_0x45aeca['body']['to'])){throw new db[(_0x1693('0x79'))][(_0x1693('0x7a'))]('to\x20is\x20mandatory');}_0x45a8c4=_0x45aeca['body']['to'];return db['SmsAccount']['find']({'where':{'id':_0x45aeca[_0x1693('0x58')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x1693('0x78')],'as':'Contacts','where':{'mobile':_0x45a8c4},'limit':0x1,'order':[[_0x1693('0x9c'),'DESC']]}]}]})[_0x1693('0x23')](handleEntityNotFound(_0x57a8d0,null))['then'](function(_0x4538b2){if(_0x4538b2&&_0x4538b2['List']){_0x529fac=_0x4538b2['get']({'plain':!![]});if(_0x529fac[_0x1693('0xc2')]&&_0x529fac['List'][_0x1693('0x9f')][_0x1693('0x4a')]){return _0x529fac[_0x1693('0xc2')][_0x1693('0x9f')][0x0];}return db['CmContact'][_0x1693('0x5b')](_['defaults'](_0x45aeca[_0x1693('0x61')],{'firstName':_0x45a8c4,'mobile':_0x45a8c4,'phone':_0x45a8c4,'ListId':_0x529fac['ListId']}));}})[_0x1693('0x23')](handleEntityNotFound(_0x57a8d0,null))[_0x1693('0x23')](function(_0x547315){if(_0x547315){_0x583a66=_0x547315;return db[_0x1693('0xa1')][_0x1693('0x5f')]({'where':{'ContactId':_0x583a66['id'],'closed':![],'SmsAccountId':_0x529fac['id']}})[_0x1693('0x23')](function(_0x2975fa){if(_0x2975fa){return[_0x2975fa,![]];}return db[_0x1693('0xa1')][_0x1693('0x5b')]({'UserId':_0x45aeca[_0x1693('0xc3')]['id'],'ContactId':_0x583a66['id'],'SmsAccountId':_0x529fac['id'],'phone':_0x45a8c4,'firstMsgDirection':_0x1693('0xc4'),'Messages':[_[_0x1693('0x54')](_0x45aeca[_0x1693('0x61')],{'read':![],'body':_0x45aeca[_0x1693('0x61')][_0x1693('0x61')],'phone':_0x45a8c4,'SmsAccountId':_0x529fac['id'],'UserId':_0x45aeca['user']['id'],'ContactId':_0x583a66['id']})]},{'include':[{'model':db['SmsMessage'],'as':_0x1693('0xc5')}]})[_0x1693('0x23')](function(_0x47f112){return[_0x47f112,!![]];});});}})[_0x1693('0xa2')](function(_0x5de6db,_0xbdb07f){if(_0xbdb07f){return _0x5de6db;}return db[_0x1693('0xa8')]['create'](_[_0x1693('0x54')](_0x45aeca[_0x1693('0x61')],{'read':![],'body':_0x45aeca['body'][_0x1693('0x61')],'phone':_0x45a8c4,'SmsAccountId':_0x529fac['id'],'SmsInteractionId':_0x5de6db['id'],'UserId':_0x45aeca[_0x1693('0xc3')]['id'],'ContactId':_0x583a66['id']}))['then'](function(_0x11ad69){_0x5de6db[_0x1693('0xc6')][_0x1693('0xc5')]=[];_0x5de6db['dataValues'][_0x1693('0xc5')][_0x1693('0xc7')](_0x11ad69['dataValues']);return _0x5de6db;});})[_0x1693('0x23')](respondWithResult(_0x57a8d0,null))[_0x1693('0x2b')](handleError(_0x57a8d0,null));};exports[_0x1693('0x2c')]=function(_0x3a1eee,_0x4a1cfc,_0x2da426){if(_0x3a1eee['body']['id']){delete _0x3a1eee[_0x1693('0x61')]['id'];}console['log'](_0x1693('0xc8'),_0x3a1eee[_0x1693('0x61')]);var _0x2c9e92,_0x5725e5,_0x2c622e;return db[_0x1693('0x41')]['find']({'where':{'id':_0x3a1eee[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x4a1cfc,null))['then'](function(_0x24a407){if(_0x24a407){_0x2c622e=_0x24a407;logger[_0x1693('0xb0')](_0x1693('0x26'),_0x1693('0x2c'),_0x1693('0xc9'),_0x24a407[_0x1693('0x44')],util[_0x1693('0xca')](_0x3a1eee[_0x1693('0x61')],{'showHidden':![],'depth':null}));switch(_0x24a407[_0x1693('0x44')]){case _0x1693('0x84'):if(_0x3a1eee[_0x1693('0x61')][_0x1693('0xcb')]&&_0x3a1eee['body'][_0x1693('0x2c')]){_0x5725e5=_0x3a1eee[_0x1693('0x61')][_0x1693('0x2c')];return db[_0x1693('0xa8')][_0x1693('0x5f')]({'where':{'messageId':_0x3a1eee[_0x1693('0x61')]['skebby_dispatch_id']}});}break;case'connectel':if(_0x3a1eee[_0x1693('0x61')][_0x1693('0xcc')]&&_0x3a1eee[_0x1693('0x61')]['statusInt']){_0x5725e5=_0x3a1eee['body'][_0x1693('0xcd')];return db['SmsMessage'][_0x1693('0x5f')]({'where':{'messageId':_0x3a1eee[_0x1693('0x61')]['requestid']}});}break;case'clicksend':if(_0x3a1eee[_0x1693('0x61')][_0x1693('0x89')]&&_0x3a1eee[_0x1693('0x61')]['status_code']){_0x5725e5=_0x3a1eee['body'][_0x1693('0xce')];return db[_0x1693('0xa8')]['find']({'where':{'messageId':_0x3a1eee[_0x1693('0x61')][_0x1693('0x89')]}});}break;case _0x1693('0xcf'):var _0xf4b9d2=_0x3a1eee[_0x1693('0x61')][_0x1693('0x8c')][0x0];if(_0xf4b9d2[_0x1693('0x82')]&&_0xf4b9d2['status'][_0x1693('0xd0')]==='DELIVERED'){_0x5725e5=_0xf4b9d2['status']['groupName'];return db['SmsMessage'][_0x1693('0x5f')]({'where':{'messageId':_0xf4b9d2['messageId']}});}break;case'clickatell':if(_0x3a1eee[_0x1693('0x61')][_0x1693('0x82')]&&_0x3a1eee[_0x1693('0x61')][_0x1693('0x2c')]){_0x5725e5=_0x3a1eee[_0x1693('0x61')][_0x1693('0x2c')];return db[_0x1693('0xa8')]['find']({'where':{'messageId':_0x3a1eee[_0x1693('0x61')][_0x1693('0x82')]}});}break;case _0x1693('0x92'):if(_0x3a1eee['body']['redif']&&_0x3a1eee[_0x1693('0x61')][_0x1693('0x2c')]){_0x5725e5=_0x3a1eee[_0x1693('0x61')][_0x1693('0x2c')];return db['SmsMessage'][_0x1693('0x5f')]({'where':{'messageId':_0x3a1eee[_0x1693('0x61')][_0x1693('0xd1')]}});}break;}}})[_0x1693('0x23')](handleEntityNotFound(_0x4a1cfc,null))['then'](function(_0x55c0d6){if(_0x55c0d6){_0x2c9e92=_0x55c0d6;switch(_0x2c622e[_0x1693('0x44')]){case _0x1693('0x84'):if(_0x5725e5===_0x1693('0xd2')){return _0x2c9e92[_0x1693('0x35')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s','status',_0x1693('0x84'),util[_0x1693('0xca')](_0x3a1eee[_0x1693('0x61')],{'showHidden':![],'depth':null}));}break;case _0x1693('0x87'):if(_0x5725e5==='1'){return _0x2c9e92['update']({'read':!![]});}else{logger[_0x1693('0x28')]('SmsAccount,\x20%s,\x20%s,\x20%s','status',_0x1693('0x84'),util[_0x1693('0xca')](_0x3a1eee[_0x1693('0x61')],{'showHidden':![],'depth':null}));}break;case _0x1693('0x88'):if(!_0x3a1eee[_0x1693('0x61')][_0x1693('0xd3')]&&_0x5725e5>=0xc8&&_0x5725e5<=0xce){return _0x2c9e92['update']({'read':!![]});}else{logger[_0x1693('0x28')](_0x1693('0x26'),_0x1693('0x2c'),'clicksend',util[_0x1693('0xca')](_0x3a1eee[_0x1693('0x61')],{'showHidden':![],'depth':null}));}break;case _0x1693('0xcf'):var _0x3e8fdd=_0x3a1eee[_0x1693('0x61')][_0x1693('0x8c')][0x0];if(_0x3e8fdd[_0x1693('0x2c')][_0x1693('0xd0')]===_0x1693('0xd2')){return _0x2c9e92[_0x1693('0x35')]({'read':!![]});}else{logger[_0x1693('0x28')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x1693('0x2c'),'infobip',util[_0x1693('0xca')](_0x3a1eee['body'],{'showHidden':![],'depth':null}));}break;case _0x1693('0xd4'):if(_0x5725e5=='DELIVERED_TO_GATEWAY'||_0x5725e5==_0x1693('0xd5')){return _0x2c9e92['update']({'read':!![]});}else{logger[_0x1693('0x28')](_0x1693('0x26'),_0x1693('0x2c'),_0x1693('0xd4'),util[_0x1693('0xca')](_0x3a1eee[_0x1693('0x61')],{'showHidden':![],'depth':null}));}break;case'intelepeer':if(_0x5725e5===_0x1693('0xd6')||_0x5725e5===_0x1693('0xd7')){return _0x2c9e92[_0x1693('0x35')]({'read':!![]});}else{logger['error'](_0x1693('0x26'),_0x1693('0x2c'),_0x1693('0x92'),util[_0x1693('0xca')](_0x3a1eee[_0x1693('0x61')],{'showHidden':![],'depth':null}));}break;}return _0x2c9e92;}})[_0x1693('0x23')](respondWithResult(_0x4a1cfc,null))[_0x1693('0x2b')](handleError(_0x4a1cfc,null));};exports['statusGet']=function(_0xf62802,_0x510062,_0x40d2f8){var _0xec70fb,_0x24ee0f,_0x4830a8;return db['SmsAccount'][_0x1693('0x5f')]({'where':{'id':_0xf62802['params']['id']}})['then'](handleEntityNotFound(_0x510062,null))[_0x1693('0x23')](function(_0x4f55e6){if(_0x4f55e6){_0x4830a8=_0x4f55e6;logger[_0x1693('0xb0')](_0x1693('0x26'),_0x1693('0x2c'),_0x1693('0xc9'),_0x4f55e6[_0x1693('0x44')],util['inspect'](_0xf62802[_0x1693('0x4b')],{'showHidden':![],'depth':null}));switch(_0x4f55e6[_0x1693('0x44')]){case _0x1693('0x8d'):if(_0xf62802[_0x1693('0x4b')]['message-id']&&_0xf62802[_0x1693('0x4b')][_0x1693('0xd8')]){_0x24ee0f=_0xf62802[_0x1693('0x4b')][_0x1693('0xd8')];return db[_0x1693('0xa8')]['find']({'where':{'messageId':_0xf62802[_0x1693('0x4b')][_0x1693('0xd9')]}});}break;}}})['then'](handleEntityNotFound(_0x510062,null))[_0x1693('0x23')](function(_0x1a79e0){if(_0x1a79e0){_0xec70fb=_0x1a79e0;switch(_0x4830a8[_0x1693('0x44')]){case _0x1693('0x8d'):if(_0x24ee0f==='2'||_0x24ee0f==='6'){return _0xec70fb[_0x1693('0x35')]({'read':!![]});}else{logger[_0x1693('0x28')](_0x1693('0x26'),_0x1693('0x2c'),_0x1693('0x8d'),util[_0x1693('0xca')](_0xf62802[_0x1693('0x4b')],{'showHidden':![],'depth':null}));};break;}return _0xec70fb;}})['then'](respondWithResult(_0x510062,null))[_0x1693('0x2b')](handleError(_0x510062,null));};exports[_0x1693('0xda')]=function(_0x16b561,_0x5b6065,_0x5db6f5){return db[_0x1693('0x41')][_0x1693('0x5f')]({'where':{'id':_0x16b561[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x5b6065,null))[_0x1693('0x23')](function(_0x19af50){if(_0x19af50){return _0x19af50[_0x1693('0xda')](_0x16b561[_0x1693('0x61')][_0x1693('0x6a')],_[_0x1693('0xdb')](_0x16b561['body'],['ids','id'])||{})[_0x1693('0xa2')](function(_0x5ee306){for(var _0x419afc=0x0;_0x419afc<_0x16b561['body'][_0x1693('0x6a')][_0x1693('0x4a')];_0x419afc+=0x1){socket[_0x1693('0xdc')](_0x1693('0xdd'),{'UserId':_0x16b561['body'][_0x1693('0x6a')][_0x419afc],'SmsAccountId':_0x16b561[_0x1693('0x58')]['id']});}return _0x5ee306;});}})[_0x1693('0x23')](respondWithResult(_0x5b6065,null))['catch'](handleError(_0x5b6065,null));};exports[_0x1693('0xde')]=function(_0x1bbc00,_0x5d737c,_0x328316){return db['SmsAccount'][_0x1693('0x5f')]({'where':{'id':_0x1bbc00[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x5d737c,null))['then'](function(_0x262de9){if(_0x262de9){return _0x262de9[_0x1693('0xde')](_0x1bbc00[_0x1693('0x4b')][_0x1693('0x6a')])[_0x1693('0x23')](function(){if(_['isArray'](_0x1bbc00['query'][_0x1693('0x6a')])){for(var _0x5e49bd=0x0;_0x5e49bd<_0x1bbc00[_0x1693('0x4b')][_0x1693('0x6a')]['length'];_0x5e49bd+=0x1){socket[_0x1693('0xdc')](_0x1693('0xdf'),{'UserId':Number(_0x1bbc00[_0x1693('0x4b')]['ids'][_0x5e49bd]),'SmsAccountId':Number(_0x1bbc00[_0x1693('0x58')]['id'])});}}else{socket[_0x1693('0xdc')]('userSmsAccount:remove',{'UserId':Number(_0x1bbc00[_0x1693('0x4b')]['ids']),'SmsAccountId':Number(_0x1bbc00[_0x1693('0x58')]['id'])});}});}})[_0x1693('0x23')](respondWithStatusCode(_0x5d737c,null))[_0x1693('0x2b')](handleError(_0x5d737c,null));};exports['getAgents']=function(_0x2238c4,_0x9bf368,_0x5caca0){var _0x39212b={};var _0x335f87={};var _0x46f78c;var _0x2c92a4;return db[_0x1693('0x41')][_0x1693('0x6d')]({'where':{'id':_0x2238c4[_0x1693('0x58')]['id']}})[_0x1693('0x23')](handleEntityNotFound(_0x9bf368,null))['then'](function(_0x1859da){if(_0x1859da){_0x46f78c=_0x1859da;_0x335f87[_0x1693('0x46')]=_[_0x1693('0x47')](db[_0x1693('0xba')][_0x1693('0x42')]);_0x335f87['query']=_['keys'](_0x2238c4[_0x1693('0x4b')]);_0x335f87[_0x1693('0x50')]=_[_0x1693('0x49')](_0x335f87[_0x1693('0x46')],_0x335f87[_0x1693('0x4b')]);_0x39212b[_0x1693('0x48')]=_[_0x1693('0x49')](_0x335f87[_0x1693('0x46')],qs[_0x1693('0x59')](_0x2238c4[_0x1693('0x4b')][_0x1693('0x59')]));_0x39212b[_0x1693('0x48')]=_0x39212b[_0x1693('0x48')]['length']?_0x39212b[_0x1693('0x48')]:_0x335f87[_0x1693('0x46')];_0x39212b[_0x1693('0x4e')]=qs[_0x1693('0x4f')](_0x2238c4[_0x1693('0x4b')]['sort']);_0x39212b[_0x1693('0x52')]=qs['filters'](_[_0x1693('0x67')](_0x2238c4[_0x1693('0x4b')],_0x335f87['filters']));if(_0x2238c4[_0x1693('0x4b')][_0x1693('0x51')]){_0x39212b[_0x1693('0x52')]=_['merge'](_0x39212b[_0x1693('0x52')],{'$or':_[_0x1693('0x40')](_0x39212b['attributes'],function(_0x1275be){var _0x13404e={};_0x13404e[_0x1275be]={'$like':'%'+_0x2238c4[_0x1693('0x4b')]['filter']+'%'};return _0x13404e;})});}_0x39212b=_[_0x1693('0x54')]({},_0x39212b,_0x2238c4['options']);return _0x46f78c['getAgents'](_0x39212b);}})[_0x1693('0x23')](function(_0x22fbdd){if(_0x22fbdd){_0x2c92a4=_0x22fbdd[_0x1693('0x4a')];if(!_0x2238c4[_0x1693('0x4b')][_0x1693('0x66')](_0x1693('0x4c'))){_0x39212b['limit']=qs['limit'](_0x2238c4[_0x1693('0x4b')][_0x1693('0x4d')]);_0x39212b[_0x1693('0x30')]=qs[_0x1693('0x30')](_0x2238c4[_0x1693('0x4b')][_0x1693('0x30')]);}return _0x46f78c['getAgents'](_0x39212b);}})[_0x1693('0x23')](function(_0x59582d){if(_0x59582d){return _0x59582d?{'count':_0x2c92a4,'rows':_0x59582d}:null;}})['then'](respondWithResult(_0x9bf368,null))['catch'](handleError(_0x9bf368,null));};
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.events.js b/server/api/smsAccount/smsAccount.events.js
index 5a75208..ac11c96 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 _0x5307=['emit','hasOwnProperty','hook','events','../../mysqldb','setMaxListeners','save','update','remove'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0x5307,0x162));var _0x7530=function(_0x149c32,_0x402129){_0x149c32=_0x149c32-0x0;var _0x26626f=_0x5307[_0x149c32];return _0x26626f;};'use strict';var EventEmitter=require(_0x7530('0x0'));var SmsAccount=require(_0x7530('0x1'))['db']['SmsAccount'];var SmsAccountEvents=new EventEmitter();SmsAccountEvents[_0x7530('0x2')](0x0);var events={'afterCreate':_0x7530('0x3'),'afterUpdate':_0x7530('0x4'),'afterDestroy':_0x7530('0x5')};function emitEvent(_0x1565a8){return function(_0x3e91b9,_0x18bdb9,_0x1fae5a){SmsAccountEvents[_0x7530('0x6')](_0x1565a8+':'+_0x3e91b9['id'],_0x3e91b9);SmsAccountEvents[_0x7530('0x6')](_0x1565a8,_0x3e91b9);_0x1fae5a(null);};}for(var e in events){if(events[_0x7530('0x7')](e)){var event=events[e];SmsAccount[_0x7530('0x8')](e,emitEvent(event));}}module['exports']=SmsAccountEvents;
\ No newline at end of file
+var _0x2ea3=['exports','events','../../mysqldb','setMaxListeners','save','update','remove','emit','hook'];(function(_0x461996,_0xfc39b){var _0x2cd79f=function(_0x441130){while(--_0x441130){_0x461996['push'](_0x461996['shift']());}};_0x2cd79f(++_0xfc39b);}(_0x2ea3,0x196));var _0x32ea=function(_0xb65759,_0x1b1b9a){_0xb65759=_0xb65759-0x0;var _0x11a85e=_0x2ea3[_0xb65759];return _0x11a85e;};'use strict';var EventEmitter=require(_0x32ea('0x0'));var SmsAccount=require(_0x32ea('0x1'))['db']['SmsAccount'];var SmsAccountEvents=new EventEmitter();SmsAccountEvents[_0x32ea('0x2')](0x0);var events={'afterCreate':_0x32ea('0x3'),'afterUpdate':_0x32ea('0x4'),'afterDestroy':_0x32ea('0x5')};function emitEvent(_0x5f470e){return function(_0x22cc18,_0x1f459b,_0x59b0d7){SmsAccountEvents[_0x32ea('0x6')](_0x5f470e+':'+_0x22cc18['id'],_0x22cc18);SmsAccountEvents[_0x32ea('0x6')](_0x5f470e,_0x22cc18);_0x59b0d7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsAccount[_0x32ea('0x7')](e,emitEvent(event));}}module[_0x32ea('0x8')]=SmsAccountEvents;
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.model.js b/server/api/smsAccount/smsAccount.model.js
index d8c1b75..f5359f8 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 _0x24c2=['rimraf','../../config/environment','./smsAccount.attributes','exports','define','sms_accounts','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x404957,_0x5192a4){var _0x4e0365=function(_0x4f6cd7){while(--_0x4f6cd7){_0x404957['push'](_0x404957['shift']());}};_0x4e0365(++_0x5192a4);}(_0x24c2,0x1f4));var _0x224c=function(_0xb67c46,_0x524256){_0xb67c46=_0xb67c46-0x0;var _0x4742e2=_0x24c2[_0xb67c46];return _0x4742e2;};'use strict';var _=require(_0x224c('0x0'));var util=require(_0x224c('0x1'));var logger=require(_0x224c('0x2'))(_0x224c('0x3'));var moment=require(_0x224c('0x4'));var BPromise=require('bluebird');var rp=require(_0x224c('0x5'));var fs=require('fs');var path=require(_0x224c('0x6'));var rimraf=require(_0x224c('0x7'));var config=require(_0x224c('0x8'));var attributes=require(_0x224c('0x9'));module[_0x224c('0xa')]=function(_0x5b58ae,_0x1f1658){return _0x5b58ae[_0x224c('0xb')]('SmsAccount',attributes,{'tableName':_0x224c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb383=['../../config/environment','./smsAccount.attributes','exports','define','SmsAccount','lodash','util','api','bluebird','request-promise'];(function(_0xa540b0,_0x3b1e9c){var _0x2b0bd=function(_0x384faf){while(--_0x384faf){_0xa540b0['push'](_0xa540b0['shift']());}};_0x2b0bd(++_0x3b1e9c);}(_0xb383,0x87));var _0x3b38=function(_0x933de6,_0x44951d){_0x933de6=_0x933de6-0x0;var _0x2bd659=_0xb383[_0x933de6];return _0x2bd659;};'use strict';var _=require(_0x3b38('0x0'));var util=require(_0x3b38('0x1'));var logger=require('../../config/logger')(_0x3b38('0x2'));var moment=require('moment');var BPromise=require(_0x3b38('0x3'));var rp=require(_0x3b38('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x3b38('0x5'));var attributes=require(_0x3b38('0x6'));module[_0x3b38('0x7')]=function(_0x523df7,_0x5c4802){return _0x523df7[_0x3b38('0x8')](_0x3b38('0x9'),attributes,{'tableName':'sms_accounts','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 f605802..6680e4d 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 _0x507e=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./smsAccount.socket','then','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','ShowSmsAccount','SmsAccount','options','where','include','map','model','attributes','lodash','util','moment'];(function(_0x488bfd,_0x55f4ed){var _0x2633c5=function(_0x3f5e9b){while(--_0x3f5e9b){_0x488bfd['push'](_0x488bfd['shift']());}};_0x2633c5(++_0x55f4ed);}(_0x507e,0x165));var _0xe507=function(_0x1f71d8,_0x278518){_0x1f71d8=_0x1f71d8-0x0;var _0x10b045=_0x507e[_0x1f71d8];return _0x10b045;};'use strict';var _=require(_0xe507('0x0'));var util=require(_0xe507('0x1'));var moment=require(_0xe507('0x2'));var BPromise=require(_0xe507('0x3'));var rs=require(_0xe507('0x4'));var fs=require('fs');var Redis=require(_0xe507('0x5'));var db=require(_0xe507('0x6'))['db'];var utils=require(_0xe507('0x7'));var logger=require(_0xe507('0x8'))('rpc');var config=require(_0xe507('0x9'));var jayson=require(_0xe507('0xa'));var client=jayson[_0xe507('0xb')][_0xe507('0xc')]({'port':0x232a});config[_0xe507('0xd')]=_[_0xe507('0xe')](config[_0xe507('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0xe507('0xf'))(new Redis(config[_0xe507('0xd')]));require(_0xe507('0x10'))['register'](socket);function respondWithRpcPromise(_0x3cf623,_0x52db40,_0x50d416){return new BPromise(function(_0x33b9f6,_0x14c305){return client['request'](_0x3cf623,_0x50d416)[_0xe507('0x11')](function(_0x569fac){logger['info'](_0xe507('0x12'),_0x52db40,_0xe507('0x13'));logger[_0xe507('0x14')](_0xe507('0x15'),_0x52db40,'request\x20sent',JSON[_0xe507('0x16')](_0x569fac));if(_0x569fac[_0xe507('0x17')]){if(_0x569fac[_0xe507('0x17')][_0xe507('0x18')]===0x1f4){logger['error'](_0xe507('0x12'),_0x52db40,_0x569fac[_0xe507('0x17')][_0xe507('0x19')]);return _0x14c305(_0x569fac[_0xe507('0x17')][_0xe507('0x19')]);}logger[_0xe507('0x17')](_0xe507('0x12'),_0x52db40,_0x569fac['error'][_0xe507('0x19')]);return _0x33b9f6(_0x569fac[_0xe507('0x17')]['message']);}else{logger[_0xe507('0x1a')](_0xe507('0x12'),_0x52db40,_0xe507('0x13'));_0x33b9f6(_0x569fac['result'][_0xe507('0x19')]);}})[_0xe507('0x1b')](function(_0x56286f){logger[_0xe507('0x17')](_0xe507('0x12'),_0x52db40,_0x56286f);_0x14c305(_0x56286f);});});}exports[_0xe507('0x1c')]=function(_0x4e61b5){var _0x190416=this;return new Promise(function(_0xcaaddb,_0x3dbff0){return db[_0xe507('0x1d')]['find']({'raw':_0x4e61b5[_0xe507('0x1e')]?_0x4e61b5[_0xe507('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x4e61b5['options']?_0x4e61b5[_0xe507('0x1e')][_0xe507('0x1f')]||null:null,'attributes':_0x4e61b5[_0xe507('0x1e')]?_0x4e61b5['options']['attributes']||null:null,'include':_0x4e61b5[_0xe507('0x1e')]?_0x4e61b5[_0xe507('0x1e')][_0xe507('0x20')]?_[_0xe507('0x21')](_0x4e61b5[_0xe507('0x1e')]['include'],function(_0x3c0e36){return{'model':db[_0x3c0e36[_0xe507('0x22')]],'as':_0x3c0e36['as'],'attributes':_0x3c0e36[_0xe507('0x23')],'include':_0x3c0e36[_0xe507('0x20')]?_['map'](_0x3c0e36[_0xe507('0x20')],function(_0x40f7f4){return{'model':db[_0x40f7f4[_0xe507('0x22')]],'as':_0x40f7f4['as'],'attributes':_0x40f7f4[_0xe507('0x23')],'include':_0x40f7f4[_0xe507('0x20')]?_[_0xe507('0x21')](_0x40f7f4[_0xe507('0x20')],function(_0x30cf99){return{'model':db[_0x30cf99['model']],'as':_0x30cf99['as'],'attributes':_0x30cf99[_0xe507('0x23')]};}):[]};}):[]};}):[]:[]})[_0xe507('0x11')](function(_0x1e1e6e){logger['info'](_0xe507('0x1c'),_0x4e61b5);logger[_0xe507('0x14')](_0xe507('0x1c'),_0x4e61b5,JSON[_0xe507('0x16')](_0x1e1e6e));_0xcaaddb(_0x1e1e6e);})[_0xe507('0x1b')](function(_0x4e5e55){logger[_0xe507('0x17')](_0xe507('0x1c'),_0x4e5e55[_0xe507('0x19')],_0x4e61b5);_0x3dbff0(_0x190416['error'](0x1f4,_0x4e5e55[_0xe507('0x19')]));});});};
\ No newline at end of file
+var _0x6fec=['../../config/utils','rpc','../../config/environment','client','http','redis','defaults','socket.io-emitter','./smsAccount.socket','then','info','SmsAccount,\x20%s,\x20%s','debug','SmsAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','SmsAccount','find','options','raw','where','attributes','include','map','model','ShowSmsAccount','util','moment','bluebird','../../mysqldb'];(function(_0x1ab180,_0x382b2c){var _0xfb2c2d=function(_0x1c5fd3){while(--_0x1c5fd3){_0x1ab180['push'](_0x1ab180['shift']());}};_0xfb2c2d(++_0x382b2c);}(_0x6fec,0xa1));var _0xc6fe=function(_0x28b788,_0x1bf13a){_0x28b788=_0x28b788-0x0;var _0x24655b=_0x6fec[_0x28b788];return _0x24655b;};'use strict';var _=require('lodash');var util=require(_0xc6fe('0x0'));var moment=require(_0xc6fe('0x1'));var BPromise=require(_0xc6fe('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc6fe('0x3'))['db'];var utils=require(_0xc6fe('0x4'));var logger=require('../../config/logger')(_0xc6fe('0x5'));var config=require(_0xc6fe('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xc6fe('0x7')][_0xc6fe('0x8')]({'port':0x232a});config[_0xc6fe('0x9')]=_[_0xc6fe('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xc6fe('0xb'))(new Redis(config['redis']));require(_0xc6fe('0xc'))['register'](socket);function respondWithRpcPromise(_0x2437b5,_0x45d4b8,_0x5e3d56){return new BPromise(function(_0x24d2a1,_0x491e88){return client['request'](_0x2437b5,_0x5e3d56)[_0xc6fe('0xd')](function(_0x487460){logger[_0xc6fe('0xe')](_0xc6fe('0xf'),_0x45d4b8,'request\x20sent');logger[_0xc6fe('0x10')](_0xc6fe('0x11'),_0x45d4b8,_0xc6fe('0x12'),JSON[_0xc6fe('0x13')](_0x487460));if(_0x487460[_0xc6fe('0x14')]){if(_0x487460[_0xc6fe('0x14')]['code']===0x1f4){logger[_0xc6fe('0x14')](_0xc6fe('0xf'),_0x45d4b8,_0x487460['error'][_0xc6fe('0x15')]);return _0x491e88(_0x487460[_0xc6fe('0x14')]['message']);}logger[_0xc6fe('0x14')](_0xc6fe('0xf'),_0x45d4b8,_0x487460[_0xc6fe('0x14')][_0xc6fe('0x15')]);return _0x24d2a1(_0x487460[_0xc6fe('0x14')]['message']);}else{logger['info'](_0xc6fe('0xf'),_0x45d4b8,_0xc6fe('0x12'));_0x24d2a1(_0x487460['result'][_0xc6fe('0x15')]);}})[_0xc6fe('0x16')](function(_0x45a269){logger[_0xc6fe('0x14')](_0xc6fe('0xf'),_0x45d4b8,_0x45a269);_0x491e88(_0x45a269);});});}exports['ShowSmsAccount']=function(_0x193984){var _0x1be5b5=this;return new Promise(function(_0x23d131,_0xe63f8d){return db[_0xc6fe('0x17')][_0xc6fe('0x18')]({'raw':_0x193984[_0xc6fe('0x19')]?_0x193984[_0xc6fe('0x19')][_0xc6fe('0x1a')]===undefined?!![]:![]:!![],'where':_0x193984[_0xc6fe('0x19')]?_0x193984[_0xc6fe('0x19')][_0xc6fe('0x1b')]||null:null,'attributes':_0x193984[_0xc6fe('0x19')]?_0x193984[_0xc6fe('0x19')][_0xc6fe('0x1c')]||null:null,'include':_0x193984[_0xc6fe('0x19')]?_0x193984[_0xc6fe('0x19')][_0xc6fe('0x1d')]?_[_0xc6fe('0x1e')](_0x193984['options'][_0xc6fe('0x1d')],function(_0x2165b){return{'model':db[_0x2165b['model']],'as':_0x2165b['as'],'attributes':_0x2165b[_0xc6fe('0x1c')],'include':_0x2165b[_0xc6fe('0x1d')]?_[_0xc6fe('0x1e')](_0x2165b[_0xc6fe('0x1d')],function(_0x144031){return{'model':db[_0x144031['model']],'as':_0x144031['as'],'attributes':_0x144031[_0xc6fe('0x1c')],'include':_0x144031[_0xc6fe('0x1d')]?_[_0xc6fe('0x1e')](_0x144031[_0xc6fe('0x1d')],function(_0x3f7b1b){return{'model':db[_0x3f7b1b[_0xc6fe('0x1f')]],'as':_0x3f7b1b['as'],'attributes':_0x3f7b1b[_0xc6fe('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xfa4d45){logger[_0xc6fe('0xe')](_0xc6fe('0x20'),_0x193984);logger[_0xc6fe('0x10')](_0xc6fe('0x20'),_0x193984,JSON[_0xc6fe('0x13')](_0xfa4d45));_0x23d131(_0xfa4d45);})[_0xc6fe('0x16')](function(_0x54fb96){logger[_0xc6fe('0x14')](_0xc6fe('0x20'),_0x54fb96[_0xc6fe('0x15')],_0x193984);_0xe63f8d(_0x1be5b5['error'](0x1f4,_0x54fb96['message']));});});};
\ No newline at end of file
diff --git a/server/api/smsAccount/smsAccount.socket.js b/server/api/smsAccount/smsAccount.socket.js
index 2810bf3..0532dcc 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 _0x6df4=['./smsAccount.events','remove','update','emit','register','smsAccount:'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6df4,0x78));var _0x46df=function(_0x418549,_0x11b13d){_0x418549=_0x418549-0x0;var _0x288826=_0x6df4[_0x418549];return _0x288826;};'use strict';var SmsAccountEvents=require(_0x46df('0x0'));var events=['save',_0x46df('0x1'),_0x46df('0x2')];function createListener(_0x5a588d,_0x548054){return function(_0x4dee34){_0x548054[_0x46df('0x3')](_0x5a588d,_0x4dee34);};}function removeListener(_0x531ff8,_0x4b4bbb){return function(){SmsAccountEvents['removeListener'](_0x531ff8,_0x4b4bbb);};}exports[_0x46df('0x4')]=function(_0x4a683c){for(var _0x3ef819=0x0,_0x402f5a=events['length'];_0x3ef819<_0x402f5a;_0x3ef819++){var _0x1fe76f=events[_0x3ef819];var _0x5e14fb=createListener(_0x46df('0x5')+_0x1fe76f,_0x4a683c);SmsAccountEvents['on'](_0x1fe76f,_0x5e14fb);}};
\ No newline at end of file
+var _0x29a1=['update','emit','removeListener','register','length','save','remove'];(function(_0x49f913,_0x12ccd8){var _0xf48ea5=function(_0xfd48b0){while(--_0xfd48b0){_0x49f913['push'](_0x49f913['shift']());}};_0xf48ea5(++_0x12ccd8);}(_0x29a1,0x98));var _0x129a=function(_0x3aee92,_0x27d8e4){_0x3aee92=_0x3aee92-0x0;var _0x3a59fb=_0x29a1[_0x3aee92];return _0x3a59fb;};'use strict';var SmsAccountEvents=require('./smsAccount.events');var events=[_0x129a('0x0'),_0x129a('0x1'),_0x129a('0x2')];function createListener(_0xca2d1f,_0x1e3b06){return function(_0x32de03){_0x1e3b06[_0x129a('0x3')](_0xca2d1f,_0x32de03);};}function removeListener(_0x37ea8a,_0x5ee4c5){return function(){SmsAccountEvents[_0x129a('0x4')](_0x37ea8a,_0x5ee4c5);};}exports[_0x129a('0x5')]=function(_0x374cb2){for(var _0x4853a2=0x0,_0x1d39b4=events[_0x129a('0x6')];_0x4853a2<_0x1d39b4;_0x4853a2++){var _0x3cb4c5=events[_0x4853a2];var _0xa516aa=createListener('smsAccount:'+_0x3cb4c5,_0x374cb2);SmsAccountEvents['on'](_0x3cb4c5,_0xa516aa);}};
\ No newline at end of file
diff --git a/server/api/smsApplication/index.js b/server/api/smsApplication/index.js
index e35081f..3994c55 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 _0x9ee5=['../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id','show','post','put','update','delete','destroy','exports','util','express','Router','../../components/auth/service'];(function(_0x58d3c5,_0x5865c6){var _0x4722f8=function(_0x27218d){while(--_0x27218d){_0x58d3c5['push'](_0x58d3c5['shift']());}};_0x4722f8(++_0x5865c6);}(_0x9ee5,0x10c));var _0x59ee=function(_0x2ea1b5,_0x3772c3){_0x2ea1b5=_0x2ea1b5-0x0;var _0x302557=_0x9ee5[_0x2ea1b5];return _0x302557;};'use strict';var multer=require('multer');var util=require(_0x59ee('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x59ee('0x1'));var router=express[_0x59ee('0x2')]();var auth=require(_0x59ee('0x3'));var interaction=require(_0x59ee('0x4'));var config=require(_0x59ee('0x5'));var controller=require('./smsApplication.controller');router['get']('/',auth[_0x59ee('0x6')](),controller[_0x59ee('0x7')]);router[_0x59ee('0x8')](_0x59ee('0x9'),auth['isAuthenticated'](),controller[_0x59ee('0xa')]);router[_0x59ee('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x59ee('0xc')](_0x59ee('0x9'),auth['isAuthenticated'](),controller[_0x59ee('0xd')]);router[_0x59ee('0xe')]('/:id',auth[_0x59ee('0x6')](),controller[_0x59ee('0xf')]);module[_0x59ee('0x10')]=router;
\ No newline at end of file
+var _0xc217=['destroy','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsApplication.controller','get','isAuthenticated','show','post','create','/:id','update','delete'];(function(_0x1c2051,_0x4cb6b9){var _0x2b58a0=function(_0x4308df){while(--_0x4308df){_0x1c2051['push'](_0x1c2051['shift']());}};_0x2b58a0(++_0x4cb6b9);}(_0xc217,0x7f));var _0x7c21=function(_0x3a60b8,_0x47caab){_0x3a60b8=_0x3a60b8-0x0;var _0x4eb583=_0xc217[_0x3a60b8];return _0x4eb583;};'use strict';var multer=require(_0x7c21('0x0'));var util=require(_0x7c21('0x1'));var path=require(_0x7c21('0x2'));var timeout=require('connect-timeout');var express=require(_0x7c21('0x3'));var router=express[_0x7c21('0x4')]();var auth=require(_0x7c21('0x5'));var interaction=require(_0x7c21('0x6'));var config=require(_0x7c21('0x7'));var controller=require(_0x7c21('0x8'));router[_0x7c21('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x7c21('0x9')]('/:id',auth[_0x7c21('0xa')](),controller[_0x7c21('0xb')]);router[_0x7c21('0xc')]('/',auth[_0x7c21('0xa')](),controller[_0x7c21('0xd')]);router['put'](_0x7c21('0xe'),auth[_0x7c21('0xa')](),controller[_0x7c21('0xf')]);router[_0x7c21('0x10')](_0x7c21('0xe'),auth[_0x7c21('0xa')](),controller[_0x7c21('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/smsApplication/smsApplication.attributes.js b/server/api/smsApplication/smsApplication.attributes.js
index f126056..7284873 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 _0x41ee=['sequelize','exports','STRING','TEXT','*,*,*,*'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x41ee,0x9b));var _0xe41e=function(_0x3997be,_0x3e8a1d){_0x3997be=_0x3997be-0x0;var _0x1c4093=_0x41ee[_0x3997be];return _0x1c4093;};'use strict';var Sequelize=require(_0xe41e('0x0'));module[_0xe41e('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0xe41e('0x2')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0xe41e('0x3')]()},'description':{'type':Sequelize[_0xe41e('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0xe41e('0x4')}};
\ No newline at end of file
+var _0xce74=['*,*,*,*','exports','STRING','TEXT'];(function(_0x3bc70c,_0x13e48f){var _0x377f1d=function(_0x3cd0b9){while(--_0x3cd0b9){_0x3bc70c['push'](_0x3bc70c['shift']());}};_0x377f1d(++_0x13e48f);}(_0xce74,0x171));var _0x4ce7=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0xce74[_0x1035c1];return _0x308d67;};'use strict';var Sequelize=require('sequelize');module[_0x4ce7('0x0')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x4ce7('0x1')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0x4ce7('0x2')]()},'description':{'type':Sequelize[_0x4ce7('0x1')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x4ce7('0x3')}};
\ No newline at end of file
diff --git a/server/api/smsApplication/smsApplication.controller.js b/server/api/smsApplication/smsApplication.controller.js
index 3a5101d..c27554a 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 _0xfb30=['sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','reject','save','update','destroy','then','error','name','index','SmsApplication','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','body','html-pdf','eml-format','fast-json-patch','moment','bluebird','mustache','util','path'];(function(_0x4af23c,_0x50e294){var _0x194b63=function(_0x44f871){while(--_0x44f871){_0x4af23c['push'](_0x4af23c['shift']());}};_0x194b63(++_0x50e294);}(_0xfb30,0x88));var _0x0fb3=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xfb30[_0xa464c9];return _0x3d73c4;};'use strict';var pdf=require(_0x0fb3('0x0'));var emlformat=require(_0x0fb3('0x1'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x0fb3('0x2'));var rp=require('request-promise');var moment=require(_0x0fb3('0x3'));var BPromise=require(_0x0fb3('0x4'));var Mustache=require(_0x0fb3('0x5'));var util=require(_0x0fb3('0x6'));var path=require(_0x0fb3('0x7'));var sox=require(_0x0fb3('0x8'));var csv=require(_0x0fb3('0x9'));var ejs=require(_0x0fb3('0xa'));var fs=require('fs');var _=require(_0x0fb3('0xb'));var squel=require(_0x0fb3('0xc'));var crypto=require(_0x0fb3('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x0fb3('0xe'));var toCsv=require('to-csv');var querystring=require(_0x0fb3('0xf'));var Papa=require(_0x0fb3('0x10'));var Redis=require(_0x0fb3('0x11'));var authService=require(_0x0fb3('0x12'));var qs=require(_0x0fb3('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x0fb3('0x14'))(_0x0fb3('0x15'));var utils=require(_0x0fb3('0x16'));var config=require(_0x0fb3('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2c2d47,_0x419d55){_0x419d55=_0x419d55||0xcc;return function(_0x4eddbe){if(_0x4eddbe){return _0x2c2d47[_0x0fb3('0x18')](_0x419d55);}return _0x2c2d47[_0x0fb3('0x19')](_0x419d55)[_0x0fb3('0x1a')]();};}function respondWithResult(_0x73896d,_0xb2742){_0xb2742=_0xb2742||0xc8;return function(_0x116af7){if(_0x116af7){return _0x73896d[_0x0fb3('0x19')](_0xb2742)[_0x0fb3('0x1b')](_0x116af7);}};}function respondWithFilteredResult(_0x5aad95,_0x28eb50){return function(_0x390f57){if(_0x390f57){var _0x38db4c=_0x390f57[_0x0fb3('0x1c')],_0x3bfca3=_0x28eb50[_0x0fb3('0x1d')],_0x46e99b=_0x28eb50['offset']+_0x28eb50[_0x0fb3('0x1e')],_0x17f406;if(_0x46e99b>=_0x38db4c){_0x46e99b=_0x38db4c;_0x17f406=0xc8;}else{_0x17f406=0xce;}_0x5aad95['status'](_0x17f406);return _0x5aad95['set']('Content-Range',_0x3bfca3+'-'+_0x46e99b+'/'+_0x38db4c)[_0x0fb3('0x1b')](_0x390f57);}return null;};}function patchUpdates(_0x398678){return function(_0xdeabe7){try{jsonpatch['apply'](_0xdeabe7,_0x398678,!![]);}catch(_0x13b8c3){return BPromise[_0x0fb3('0x1f')](_0x13b8c3);}return _0xdeabe7[_0x0fb3('0x20')]();};}function saveUpdates(_0x230a44,_0x40ddf6){return function(_0x4bf44){if(_0x4bf44){return _0x4bf44[_0x0fb3('0x21')](_0x230a44)['then'](function(_0x19e292){return _0x19e292;});}return null;};}function removeEntity(_0x4704cc,_0x242953){return function(_0x3c53e7){if(_0x3c53e7){return _0x3c53e7[_0x0fb3('0x22')]()[_0x0fb3('0x23')](function(){_0x4704cc['status'](0xcc)[_0x0fb3('0x1a')]();});}};}function handleEntityNotFound(_0xeb97c8,_0x2e678a){return function(_0x2ebfcb){if(!_0x2ebfcb){_0xeb97c8[_0x0fb3('0x18')](0x194);}return _0x2ebfcb;};}function handleError(_0x37d1e3,_0x17b330){_0x17b330=_0x17b330||0x1f4;return function(_0x1f05c4){logger[_0x0fb3('0x24')](_0x1f05c4['stack']);if(_0x1f05c4[_0x0fb3('0x25')]){delete _0x1f05c4['name'];}_0x37d1e3[_0x0fb3('0x19')](_0x17b330)['send'](_0x1f05c4);};}exports[_0x0fb3('0x26')]=function(_0x4668b4,_0xa3db94){var _0xfa169c={},_0x551238={},_0x4bd3cf={'count':0x0,'rows':[]};var _0x9e47ed=_['map'](db[_0x0fb3('0x27')][_0x0fb3('0x28')],function(_0x1d9987){return{'name':_0x1d9987[_0x0fb3('0x29')],'type':_0x1d9987[_0x0fb3('0x2a')][_0x0fb3('0x2b')]};});_0x551238[_0x0fb3('0x2c')]=_[_0x0fb3('0x2d')](_0x9e47ed,_0x0fb3('0x25'));_0x551238[_0x0fb3('0x2e')]=_[_0x0fb3('0x2f')](_0x4668b4[_0x0fb3('0x2e')]);_0x551238[_0x0fb3('0x30')]=_[_0x0fb3('0x31')](_0x551238[_0x0fb3('0x2c')],_0x551238[_0x0fb3('0x2e')]);_0xfa169c[_0x0fb3('0x32')]=_[_0x0fb3('0x31')](_0x551238[_0x0fb3('0x2c')],qs['fields'](_0x4668b4[_0x0fb3('0x2e')][_0x0fb3('0x33')]));_0xfa169c['attributes']=_0xfa169c[_0x0fb3('0x32')][_0x0fb3('0x34')]?_0xfa169c['attributes']:_0x551238[_0x0fb3('0x2c')];if(!_0x4668b4['query'][_0x0fb3('0x35')](_0x0fb3('0x36'))){_0xfa169c['limit']=qs[_0x0fb3('0x1e')](_0x4668b4[_0x0fb3('0x2e')]['limit']);_0xfa169c[_0x0fb3('0x1d')]=qs['offset'](_0x4668b4[_0x0fb3('0x2e')][_0x0fb3('0x1d')]);}_0xfa169c[_0x0fb3('0x37')]=qs[_0x0fb3('0x38')](_0x4668b4[_0x0fb3('0x2e')][_0x0fb3('0x38')]);_0xfa169c[_0x0fb3('0x39')]=qs['filters'](_[_0x0fb3('0x3a')](_0x4668b4[_0x0fb3('0x2e')],_0x551238[_0x0fb3('0x30')]));if(_0x4668b4[_0x0fb3('0x2e')][_0x0fb3('0x3b')]){_0xfa169c[_0x0fb3('0x39')]=_[_0x0fb3('0x3c')](_0xfa169c['where'],{'$or':_[_0x0fb3('0x2d')](_0x9e47ed,function(_0x3d5814){if(_0x3d5814[_0x0fb3('0x2a')]!==_0x0fb3('0x3d')){var _0x5d6c2d={};_0x5d6c2d[_0x3d5814[_0x0fb3('0x25')]]={'$like':'%'+_0x4668b4['query'][_0x0fb3('0x3b')]+'%'};return _0x5d6c2d;}})});}_0xfa169c=_['merge']({},_0xfa169c,_0x4668b4[_0x0fb3('0x3e')]);var _0x247d39={'where':_0xfa169c[_0x0fb3('0x39')]};return db[_0x0fb3('0x27')]['count'](_0x247d39)[_0x0fb3('0x23')](function(_0x4704f9){_0x4bd3cf[_0x0fb3('0x1c')]=_0x4704f9;if(_0x4668b4[_0x0fb3('0x2e')][_0x0fb3('0x3f')]){_0xfa169c[_0x0fb3('0x40')]=[{'all':!![]}];}return db[_0x0fb3('0x27')][_0x0fb3('0x41')](_0xfa169c);})[_0x0fb3('0x23')](function(_0x2c7de0){_0x4bd3cf[_0x0fb3('0x42')]=_0x2c7de0;return _0x4bd3cf;})['then'](respondWithFilteredResult(_0xa3db94,_0xfa169c))[_0x0fb3('0x43')](handleError(_0xa3db94,null));};exports[_0x0fb3('0x44')]=function(_0xa5c977,_0x580c06){var _0x45f666={'raw':!![],'where':{'id':_0xa5c977[_0x0fb3('0x45')]['id']}},_0x2a5fe3={};_0x2a5fe3[_0x0fb3('0x2c')]=_[_0x0fb3('0x2f')](db['SmsApplication'][_0x0fb3('0x28')]);_0x2a5fe3['query']=_[_0x0fb3('0x2f')](_0xa5c977['query']);_0x2a5fe3[_0x0fb3('0x30')]=_[_0x0fb3('0x31')](_0x2a5fe3[_0x0fb3('0x2c')],_0x2a5fe3[_0x0fb3('0x2e')]);_0x45f666[_0x0fb3('0x32')]=_[_0x0fb3('0x31')](_0x2a5fe3[_0x0fb3('0x2c')],qs[_0x0fb3('0x33')](_0xa5c977[_0x0fb3('0x2e')][_0x0fb3('0x33')]));_0x45f666['attributes']=_0x45f666[_0x0fb3('0x32')]['length']?_0x45f666[_0x0fb3('0x32')]:_0x2a5fe3[_0x0fb3('0x2c')];if(_0xa5c977[_0x0fb3('0x2e')][_0x0fb3('0x3f')]){_0x45f666[_0x0fb3('0x40')]=[{'all':!![]}];}_0x45f666=_[_0x0fb3('0x3c')]({},_0x45f666,_0xa5c977[_0x0fb3('0x3e')]);return db[_0x0fb3('0x27')][_0x0fb3('0x46')](_0x45f666)[_0x0fb3('0x23')](handleEntityNotFound(_0x580c06,null))[_0x0fb3('0x23')](respondWithResult(_0x580c06,null))[_0x0fb3('0x43')](handleError(_0x580c06,null));};exports['create']=function(_0x229d73,_0x104d1b){return db[_0x0fb3('0x27')]['create'](_0x229d73['body'],{})['then'](respondWithResult(_0x104d1b,0xc9))[_0x0fb3('0x43')](handleError(_0x104d1b,null));};exports[_0x0fb3('0x21')]=function(_0x289360,_0x5c3cca){if(_0x289360[_0x0fb3('0x47')]['id']){delete _0x289360[_0x0fb3('0x47')]['id'];}return db[_0x0fb3('0x27')]['find']({'where':{'id':_0x289360['params']['id']}})['then'](handleEntityNotFound(_0x5c3cca,null))[_0x0fb3('0x23')](saveUpdates(_0x289360[_0x0fb3('0x47')],null))[_0x0fb3('0x23')](respondWithResult(_0x5c3cca,null))[_0x0fb3('0x43')](handleError(_0x5c3cca,null));};exports[_0x0fb3('0x22')]=function(_0x5c22de,_0x3dc8f7){return db[_0x0fb3('0x27')]['find']({'where':{'id':_0x5c22de[_0x0fb3('0x45')]['id']}})[_0x0fb3('0x23')](handleEntityNotFound(_0x3dc8f7,null))[_0x0fb3('0x23')](removeEntity(_0x3dc8f7,null))[_0x0fb3('0x43')](handleError(_0x3dc8f7,null));};
\ No newline at end of file
+var _0x69c5=['offset','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','stack','name','send','index','map','SmsApplication','rawAttributes','type','key','query','keys','filters','intersection','model','fields','attributes','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','length','find','create','body','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count'];(function(_0x3f581f,_0x4ea03c){var _0x1e0d19=function(_0x2b9d8a){while(--_0x2b9d8a){_0x3f581f['push'](_0x3f581f['shift']());}};_0x1e0d19(++_0x4ea03c);}(_0x69c5,0x7a));var _0x569c=function(_0x163b23,_0x1fe80a){_0x163b23=_0x163b23-0x0;var _0x17c9a9=_0x69c5[_0x163b23];return _0x17c9a9;};'use strict';var pdf=require(_0x569c('0x0'));var emlformat=require(_0x569c('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x569c('0x2'));var jsonpatch=require(_0x569c('0x3'));var rp=require(_0x569c('0x4'));var moment=require('moment');var BPromise=require(_0x569c('0x5'));var Mustache=require(_0x569c('0x6'));var util=require(_0x569c('0x7'));var path=require(_0x569c('0x8'));var sox=require(_0x569c('0x9'));var csv=require(_0x569c('0xa'));var ejs=require(_0x569c('0xb'));var fs=require('fs');var _=require(_0x569c('0xc'));var squel=require(_0x569c('0xd'));var crypto=require(_0x569c('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x569c('0xf'));var toCsv=require(_0x569c('0xa'));var querystring=require(_0x569c('0x10'));var Papa=require('papaparse');var Redis=require(_0x569c('0x11'));var authService=require(_0x569c('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x569c('0x13'));var hardwareService=require(_0x569c('0x14'));var logger=require(_0x569c('0x15'))(_0x569c('0x16'));var utils=require(_0x569c('0x17'));var config=require(_0x569c('0x18'));var db=require(_0x569c('0x19'))['db'];function respondWithStatusCode(_0x56f648,_0x15b3ee){_0x15b3ee=_0x15b3ee||0xcc;return function(_0x564da4){if(_0x564da4){return _0x56f648['sendStatus'](_0x15b3ee);}return _0x56f648[_0x569c('0x1a')](_0x15b3ee)[_0x569c('0x1b')]();};}function respondWithResult(_0x52c7d1,_0x1e3204){_0x1e3204=_0x1e3204||0xc8;return function(_0x2edf37){if(_0x2edf37){return _0x52c7d1[_0x569c('0x1a')](_0x1e3204)[_0x569c('0x1c')](_0x2edf37);}};}function respondWithFilteredResult(_0xa098e8,_0x476065){return function(_0x1f29cc){if(_0x1f29cc){var _0x1fb40e=_0x1f29cc[_0x569c('0x1d')],_0xea04f9=_0x476065[_0x569c('0x1e')],_0x2ad1d2=_0x476065[_0x569c('0x1e')]+_0x476065['limit'],_0x2cd0cb;if(_0x2ad1d2>=_0x1fb40e){_0x2ad1d2=_0x1fb40e;_0x2cd0cb=0xc8;}else{_0x2cd0cb=0xce;}_0xa098e8[_0x569c('0x1a')](_0x2cd0cb);return _0xa098e8[_0x569c('0x1f')](_0x569c('0x20'),_0xea04f9+'-'+_0x2ad1d2+'/'+_0x1fb40e)['json'](_0x1f29cc);}return null;};}function patchUpdates(_0x2296c4){return function(_0x4e13fc){try{jsonpatch[_0x569c('0x21')](_0x4e13fc,_0x2296c4,!![]);}catch(_0xbabb12){return BPromise[_0x569c('0x22')](_0xbabb12);}return _0x4e13fc[_0x569c('0x23')]();};}function saveUpdates(_0x4ace07,_0x1fef93){return function(_0x2dcb41){if(_0x2dcb41){return _0x2dcb41[_0x569c('0x24')](_0x4ace07)[_0x569c('0x25')](function(_0x3a319f){return _0x3a319f;});}return null;};}function removeEntity(_0x2f75d6,_0x178a98){return function(_0x2a9938){if(_0x2a9938){return _0x2a9938[_0x569c('0x26')]()['then'](function(){_0x2f75d6['status'](0xcc)[_0x569c('0x1b')]();});}};}function handleEntityNotFound(_0x1cded8,_0x41f55e){return function(_0x4b3c38){if(!_0x4b3c38){_0x1cded8[_0x569c('0x27')](0x194);}return _0x4b3c38;};}function handleError(_0x21dae4,_0x477159){_0x477159=_0x477159||0x1f4;return function(_0x5d6b35){logger['error'](_0x5d6b35[_0x569c('0x28')]);if(_0x5d6b35[_0x569c('0x29')]){delete _0x5d6b35[_0x569c('0x29')];}_0x21dae4[_0x569c('0x1a')](_0x477159)[_0x569c('0x2a')](_0x5d6b35);};}exports[_0x569c('0x2b')]=function(_0x4730aa,_0x1aa140){var _0x74d829={},_0x2fe68d={},_0x406b3f={'count':0x0,'rows':[]};var _0x56e0f4=_[_0x569c('0x2c')](db[_0x569c('0x2d')][_0x569c('0x2e')],function(_0x126891){return{'name':_0x126891['fieldName'],'type':_0x126891[_0x569c('0x2f')][_0x569c('0x30')]};});_0x2fe68d['model']=_[_0x569c('0x2c')](_0x56e0f4,_0x569c('0x29'));_0x2fe68d[_0x569c('0x31')]=_[_0x569c('0x32')](_0x4730aa[_0x569c('0x31')]);_0x2fe68d[_0x569c('0x33')]=_[_0x569c('0x34')](_0x2fe68d[_0x569c('0x35')],_0x2fe68d[_0x569c('0x31')]);_0x74d829['attributes']=_[_0x569c('0x34')](_0x2fe68d[_0x569c('0x35')],qs[_0x569c('0x36')](_0x4730aa[_0x569c('0x31')]['fields']));_0x74d829[_0x569c('0x37')]=_0x74d829['attributes']['length']?_0x74d829[_0x569c('0x37')]:_0x2fe68d[_0x569c('0x35')];if(!_0x4730aa[_0x569c('0x31')][_0x569c('0x38')](_0x569c('0x39'))){_0x74d829[_0x569c('0x3a')]=qs[_0x569c('0x3a')](_0x4730aa[_0x569c('0x31')][_0x569c('0x3a')]);_0x74d829[_0x569c('0x1e')]=qs[_0x569c('0x1e')](_0x4730aa[_0x569c('0x31')][_0x569c('0x1e')]);}_0x74d829['order']=qs['sort'](_0x4730aa[_0x569c('0x31')][_0x569c('0x3b')]);_0x74d829[_0x569c('0x3c')]=qs[_0x569c('0x33')](_[_0x569c('0x3d')](_0x4730aa['query'],_0x2fe68d['filters']));if(_0x4730aa[_0x569c('0x31')][_0x569c('0x3e')]){_0x74d829[_0x569c('0x3c')]=_[_0x569c('0x3f')](_0x74d829[_0x569c('0x3c')],{'$or':_[_0x569c('0x2c')](_0x56e0f4,function(_0x3f31dc){if(_0x3f31dc[_0x569c('0x2f')]!==_0x569c('0x40')){var _0x59da1a={};_0x59da1a[_0x3f31dc['name']]={'$like':'%'+_0x4730aa[_0x569c('0x31')][_0x569c('0x3e')]+'%'};return _0x59da1a;}})});}_0x74d829=_[_0x569c('0x3f')]({},_0x74d829,_0x4730aa[_0x569c('0x41')]);var _0x358160={'where':_0x74d829[_0x569c('0x3c')]};return db[_0x569c('0x2d')][_0x569c('0x1d')](_0x358160)[_0x569c('0x25')](function(_0x53e7fd){_0x406b3f[_0x569c('0x1d')]=_0x53e7fd;if(_0x4730aa['query'][_0x569c('0x42')]){_0x74d829[_0x569c('0x43')]=[{'all':!![]}];}return db[_0x569c('0x2d')][_0x569c('0x44')](_0x74d829);})[_0x569c('0x25')](function(_0x304d28){_0x406b3f[_0x569c('0x45')]=_0x304d28;return _0x406b3f;})[_0x569c('0x25')](respondWithFilteredResult(_0x1aa140,_0x74d829))[_0x569c('0x46')](handleError(_0x1aa140,null));};exports['show']=function(_0x3d689b,_0x4bda10){var _0x10cb99={'raw':!![],'where':{'id':_0x3d689b[_0x569c('0x47')]['id']}},_0x30920e={};_0x30920e['model']=_[_0x569c('0x32')](db[_0x569c('0x2d')][_0x569c('0x2e')]);_0x30920e['query']=_[_0x569c('0x32')](_0x3d689b[_0x569c('0x31')]);_0x30920e[_0x569c('0x33')]=_[_0x569c('0x34')](_0x30920e[_0x569c('0x35')],_0x30920e['query']);_0x10cb99['attributes']=_['intersection'](_0x30920e[_0x569c('0x35')],qs[_0x569c('0x36')](_0x3d689b[_0x569c('0x31')][_0x569c('0x36')]));_0x10cb99['attributes']=_0x10cb99[_0x569c('0x37')][_0x569c('0x48')]?_0x10cb99[_0x569c('0x37')]:_0x30920e[_0x569c('0x35')];if(_0x3d689b[_0x569c('0x31')]['includeAll']){_0x10cb99[_0x569c('0x43')]=[{'all':!![]}];}_0x10cb99=_[_0x569c('0x3f')]({},_0x10cb99,_0x3d689b[_0x569c('0x41')]);return db[_0x569c('0x2d')][_0x569c('0x49')](_0x10cb99)[_0x569c('0x25')](handleEntityNotFound(_0x4bda10,null))[_0x569c('0x25')](respondWithResult(_0x4bda10,null))[_0x569c('0x46')](handleError(_0x4bda10,null));};exports[_0x569c('0x4a')]=function(_0x28ee36,_0x58812e){return db['SmsApplication'][_0x569c('0x4a')](_0x28ee36[_0x569c('0x4b')],{})[_0x569c('0x25')](respondWithResult(_0x58812e,0xc9))['catch'](handleError(_0x58812e,null));};exports[_0x569c('0x24')]=function(_0x2e4a4e,_0x1474a2){if(_0x2e4a4e[_0x569c('0x4b')]['id']){delete _0x2e4a4e[_0x569c('0x4b')]['id'];}return db['SmsApplication'][_0x569c('0x49')]({'where':{'id':_0x2e4a4e[_0x569c('0x47')]['id']}})[_0x569c('0x25')](handleEntityNotFound(_0x1474a2,null))[_0x569c('0x25')](saveUpdates(_0x2e4a4e[_0x569c('0x4b')],null))[_0x569c('0x25')](respondWithResult(_0x1474a2,null))[_0x569c('0x46')](handleError(_0x1474a2,null));};exports[_0x569c('0x26')]=function(_0x35d453,_0x24afcc){return db[_0x569c('0x2d')][_0x569c('0x49')]({'where':{'id':_0x35d453[_0x569c('0x47')]['id']}})[_0x569c('0x25')](handleEntityNotFound(_0x24afcc,null))[_0x569c('0x25')](removeEntity(_0x24afcc,null))[_0x569c('0x46')](handleError(_0x24afcc,null));};
\ No newline at end of file
diff --git a/server/api/smsApplication/smsApplication.model.js b/server/api/smsApplication/smsApplication.model.js
index 2e2d935..b8acade 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 _0x8435=['utf8mb4_unicode_ci','lodash','util','moment','bluebird','request-promise','path','rimraf','exports','define','SmsApplication','sms_applications','utf8mb4'];(function(_0x3b0e37,_0x3e77ff){var _0x42dffe=function(_0x38b2bd){while(--_0x38b2bd){_0x3b0e37['push'](_0x3b0e37['shift']());}};_0x42dffe(++_0x3e77ff);}(_0x8435,0xeb));var _0x5843=function(_0x3844a7,_0x329a97){_0x3844a7=_0x3844a7-0x0;var _0x3fe6bd=_0x8435[_0x3844a7];return _0x3fe6bd;};'use strict';var _=require(_0x5843('0x0'));var util=require(_0x5843('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x5843('0x2'));var BPromise=require(_0x5843('0x3'));var rp=require(_0x5843('0x4'));var fs=require('fs');var path=require(_0x5843('0x5'));var rimraf=require(_0x5843('0x6'));var config=require('../../config/environment');var attributes=require('./smsApplication.attributes');module[_0x5843('0x7')]=function(_0x49e36f,_0x58e71b){return _0x49e36f[_0x5843('0x8')](_0x5843('0x9'),attributes,{'tableName':_0x5843('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x5843('0xb'),'collate':_0x5843('0xc')});};
\ No newline at end of file
+var _0x90fe=['sms_applications','utf8mb4','lodash','util','moment','bluebird','request-promise','path','rimraf','./smsApplication.attributes','define'];(function(_0x411708,_0x3d6870){var _0x4497c3=function(_0x4589de){while(--_0x4589de){_0x411708['push'](_0x411708['shift']());}};_0x4497c3(++_0x3d6870);}(_0x90fe,0x1ba));var _0xe90f=function(_0x5b3e15,_0x378c94){_0x5b3e15=_0x5b3e15-0x0;var _0x45cf13=_0x90fe[_0x5b3e15];return _0x45cf13;};'use strict';var _=require(_0xe90f('0x0'));var util=require(_0xe90f('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xe90f('0x2'));var BPromise=require(_0xe90f('0x3'));var rp=require(_0xe90f('0x4'));var fs=require('fs');var path=require(_0xe90f('0x5'));var rimraf=require(_0xe90f('0x6'));var config=require('../../config/environment');var attributes=require(_0xe90f('0x7'));module['exports']=function(_0x20920f,_0x1e0757){return _0x20920f[_0xe90f('0x8')]('SmsApplication',attributes,{'tableName':_0xe90f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe90f('0xa'),'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 66e5ad9..1a4d97f 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 _0x55a5=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird'];(function(_0x1813db,_0x3314b6){var _0x9154c1=function(_0x19a80a){while(--_0x19a80a){_0x1813db['push'](_0x1813db['shift']());}};_0x9154c1(++_0x3314b6);}(_0x55a5,0xf7));var _0x555a=function(_0x4b9dc9,_0x14b3a2){_0x4b9dc9=_0x4b9dc9-0x0;var _0x57b302=_0x55a5[_0x4b9dc9];return _0x57b302;};'use strict';var _=require(_0x555a('0x0'));var util=require('util');var moment=require(_0x555a('0x1'));var BPromise=require(_0x555a('0x2'));var rs=require(_0x555a('0x3'));var fs=require('fs');var Redis=require(_0x555a('0x4'));var db=require(_0x555a('0x5'))['db'];var utils=require(_0x555a('0x6'));var logger=require(_0x555a('0x7'))(_0x555a('0x8'));var config=require(_0x555a('0x9'));var jayson=require(_0x555a('0xa'));var client=jayson[_0x555a('0xb')][_0x555a('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x365c37,_0x347461,_0x475b8d){return new BPromise(function(_0x4b5b8e,_0x2fed2e){return client[_0x555a('0xd')](_0x365c37,_0x475b8d)[_0x555a('0xe')](function(_0x23aeab){logger[_0x555a('0xf')](_0x555a('0x10'),_0x347461,_0x555a('0x11'));logger[_0x555a('0x12')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x347461,_0x555a('0x11'),JSON[_0x555a('0x13')](_0x23aeab));if(_0x23aeab[_0x555a('0x14')]){if(_0x23aeab[_0x555a('0x14')][_0x555a('0x15')]===0x1f4){logger['error']('SmsApplication,\x20%s,\x20%s',_0x347461,_0x23aeab['error']['message']);return _0x2fed2e(_0x23aeab[_0x555a('0x14')][_0x555a('0x16')]);}logger[_0x555a('0x14')](_0x555a('0x10'),_0x347461,_0x23aeab[_0x555a('0x14')][_0x555a('0x16')]);return _0x4b5b8e(_0x23aeab[_0x555a('0x14')][_0x555a('0x16')]);}else{logger['info']('SmsApplication,\x20%s,\x20%s',_0x347461,'request\x20sent');_0x4b5b8e(_0x23aeab[_0x555a('0x17')][_0x555a('0x16')]);}})[_0x555a('0x18')](function(_0x5ef2c2){logger[_0x555a('0x14')](_0x555a('0x10'),_0x347461,_0x5ef2c2);_0x2fed2e(_0x5ef2c2);});});}
\ No newline at end of file
+var _0x1d25=['request\x20sent','SmsApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','info','SmsApplication,\x20%s,\x20%s'];(function(_0x3f11c4,_0x51b684){var _0x437c14=function(_0x54a079){while(--_0x54a079){_0x3f11c4['push'](_0x3f11c4['shift']());}};_0x437c14(++_0x51b684);}(_0x1d25,0xba));var _0x51d2=function(_0xd4636c,_0x34dbf6){_0xd4636c=_0xd4636c-0x0;var _0x5ee17d=_0x1d25[_0xd4636c];return _0x5ee17d;};'use strict';var _=require(_0x51d2('0x0'));var util=require(_0x51d2('0x1'));var moment=require(_0x51d2('0x2'));var BPromise=require(_0x51d2('0x3'));var rs=require(_0x51d2('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x51d2('0x5'))['db'];var utils=require(_0x51d2('0x6'));var logger=require('../../config/logger')(_0x51d2('0x7'));var config=require(_0x51d2('0x8'));var jayson=require(_0x51d2('0x9'));var client=jayson[_0x51d2('0xa')][_0x51d2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2e6956,_0x56edda,_0x18e8a9){return new BPromise(function(_0x5a6b5f,_0x419156){return client['request'](_0x2e6956,_0x18e8a9)['then'](function(_0x30d7d0){logger[_0x51d2('0xc')](_0x51d2('0xd'),_0x56edda,_0x51d2('0xe'));logger['debug'](_0x51d2('0xf'),_0x56edda,_0x51d2('0xe'),JSON[_0x51d2('0x10')](_0x30d7d0));if(_0x30d7d0[_0x51d2('0x11')]){if(_0x30d7d0[_0x51d2('0x11')]['code']===0x1f4){logger[_0x51d2('0x11')](_0x51d2('0xd'),_0x56edda,_0x30d7d0['error']['message']);return _0x419156(_0x30d7d0[_0x51d2('0x11')][_0x51d2('0x12')]);}logger[_0x51d2('0x11')](_0x51d2('0xd'),_0x56edda,_0x30d7d0[_0x51d2('0x11')]['message']);return _0x5a6b5f(_0x30d7d0[_0x51d2('0x11')]['message']);}else{logger[_0x51d2('0xc')](_0x51d2('0xd'),_0x56edda,_0x51d2('0xe'));_0x5a6b5f(_0x30d7d0['result'][_0x51d2('0x12')]);}})[_0x51d2('0x13')](function(_0x14a682){logger[_0x51d2('0x11')](_0x51d2('0xd'),_0x56edda,_0x14a682);_0x419156(_0x14a682);});});}
\ No newline at end of file
diff --git a/server/api/smsInteraction/index.js b/server/api/smsInteraction/index.js
index d563a93..d59d399 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 _0xffdd=['post','create','/:id/tags','sms','smsinteraction:addtags','addTags','put','tracked','smsinteraction:update','delete','destroy','removeTags','exports','multer','util','path','Router','../../components/auth/service','../../config/environment','./smsInteraction.controller','get','isAuthenticated','describe','/:id','show','download'];(function(_0x1350ee,_0x38d5f5){var _0x2335c3=function(_0x2d90c1){while(--_0x2d90c1){_0x1350ee['push'](_0x1350ee['shift']());}};_0x2335c3(++_0x38d5f5);}(_0xffdd,0x193));var _0xdffd=function(_0x3a0dfc,_0x346cb4){_0x3a0dfc=_0x3a0dfc-0x0;var _0x42dbfe=_0xffdd[_0x3a0dfc];return _0x42dbfe;};'use strict';var multer=require(_0xdffd('0x0'));var util=require(_0xdffd('0x1'));var path=require(_0xdffd('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xdffd('0x3')]();var auth=require(_0xdffd('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xdffd('0x5'));var controller=require(_0xdffd('0x6'));router[_0xdffd('0x7')]('/',auth[_0xdffd('0x8')](),controller['index']);router['get']('/describe',auth[_0xdffd('0x8')](),controller[_0xdffd('0x9')]);router[_0xdffd('0x7')](_0xdffd('0xa'),auth[_0xdffd('0x8')](),controller[_0xdffd('0xb')]);router[_0xdffd('0x7')]('/:id/messages',auth['isAuthenticated'](),controller['getMessages']);router[_0xdffd('0x7')]('/:id/download',auth['isAuthenticated'](),controller[_0xdffd('0xc')]);router[_0xdffd('0xd')]('/',auth[_0xdffd('0x8')](),controller[_0xdffd('0xe')]);router['post']('/:id/messages',auth[_0xdffd('0x8')](),controller['addMessage']);router[_0xdffd('0xd')](_0xdffd('0xf'),auth[_0xdffd('0x8')](),interaction['tracked'](_0xdffd('0x10'),_0xdffd('0x11')),controller[_0xdffd('0x12')]);router[_0xdffd('0x13')](_0xdffd('0xa'),auth[_0xdffd('0x8')](),interaction[_0xdffd('0x14')]('sms',_0xdffd('0x15')),controller['update']);router[_0xdffd('0x16')](_0xdffd('0xa'),auth[_0xdffd('0x8')](),interaction['tracked'](_0xdffd('0x10'),'smsinteraction:destroy'),controller[_0xdffd('0x17')]);router[_0xdffd('0x16')](_0xdffd('0xf'),auth[_0xdffd('0x8')](),controller[_0xdffd('0x18')]);module[_0xdffd('0x19')]=router;
\ No newline at end of file
+var _0xf567=['removeTags','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./smsInteraction.controller','get','index','/describe','describe','/:id','isAuthenticated','show','/:id/messages','getMessages','/:id/download','download','post','create','addMessage','/:id/tags','tracked','sms','smsinteraction:addtags','put','delete','smsinteraction:destroy','destroy'];(function(_0x13d4b0,_0x4d56a1){var _0x43b6d8=function(_0x5c3e83){while(--_0x5c3e83){_0x13d4b0['push'](_0x13d4b0['shift']());}};_0x43b6d8(++_0x4d56a1);}(_0xf567,0x118));var _0x7f56=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xf567[_0x21a9d9];return _0x46adce;};'use strict';var multer=require(_0x7f56('0x0'));var util=require(_0x7f56('0x1'));var path=require(_0x7f56('0x2'));var timeout=require('connect-timeout');var express=require(_0x7f56('0x3'));var router=express[_0x7f56('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x7f56('0x5'));var config=require(_0x7f56('0x6'));var controller=require(_0x7f56('0x7'));router[_0x7f56('0x8')]('/',auth['isAuthenticated'](),controller[_0x7f56('0x9')]);router[_0x7f56('0x8')](_0x7f56('0xa'),auth['isAuthenticated'](),controller[_0x7f56('0xb')]);router[_0x7f56('0x8')](_0x7f56('0xc'),auth[_0x7f56('0xd')](),controller[_0x7f56('0xe')]);router[_0x7f56('0x8')](_0x7f56('0xf'),auth[_0x7f56('0xd')](),controller[_0x7f56('0x10')]);router[_0x7f56('0x8')](_0x7f56('0x11'),auth[_0x7f56('0xd')](),controller[_0x7f56('0x12')]);router[_0x7f56('0x13')]('/',auth[_0x7f56('0xd')](),controller[_0x7f56('0x14')]);router[_0x7f56('0x13')](_0x7f56('0xf'),auth[_0x7f56('0xd')](),controller[_0x7f56('0x15')]);router[_0x7f56('0x13')](_0x7f56('0x16'),auth['isAuthenticated'](),interaction[_0x7f56('0x17')](_0x7f56('0x18'),_0x7f56('0x19')),controller['addTags']);router[_0x7f56('0x1a')](_0x7f56('0xc'),auth['isAuthenticated'](),interaction[_0x7f56('0x17')](_0x7f56('0x18'),'smsinteraction:update'),controller['update']);router[_0x7f56('0x1b')]('/:id',auth[_0x7f56('0xd')](),interaction[_0x7f56('0x17')]('sms',_0x7f56('0x1c')),controller[_0x7f56('0x1d')]);router[_0x7f56('0x1b')](_0x7f56('0x16'),auth[_0x7f56('0xd')](),controller[_0x7f56('0x1e')]);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 41e4d77..4208378 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 _0xb10b=['DATE','STRING','ENUM','out','sequelize','exports','BOOLEAN'];(function(_0x4110a6,_0x20f10c){var _0xb0f7d2=function(_0x504c75){while(--_0x504c75){_0x4110a6['push'](_0x4110a6['shift']());}};_0xb0f7d2(++_0x20f10c);}(_0xb10b,0x12a));var _0xbb10=function(_0xe5742c,_0x11503e){_0xe5742c=_0xe5742c-0x0;var _0x3db329=_0xb10b[_0xe5742c];return _0x3db329;};'use strict';var Sequelize=require(_0xbb10('0x0'));var moment=require('moment');module[_0xbb10('0x1')]={'closed':{'type':Sequelize[_0xbb10('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xbb10('0x3')]},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xbb10('0x4')]},'phone':{'type':Sequelize[_0xbb10('0x4')]},'read1stAt':{'type':Sequelize[_0xbb10('0x3')]},'firstMsgDirection':{'type':Sequelize[_0xbb10('0x5')]('in',_0xbb10('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xbb10('0x3')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0xbb10('0x6')),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
+var _0xd8b0=['moment','STRING','DATE','ENUM','out','sequelize'];(function(_0x401c88,_0x5c9ef9){var _0x3126a0=function(_0x56f75c){while(--_0x56f75c){_0x401c88['push'](_0x401c88['shift']());}};_0x3126a0(++_0x5c9ef9);}(_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'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x0d8b('0x2')]},'note':{'type':Sequelize[_0x0d8b('0x2')]},'phone':{'type':Sequelize[_0x0d8b('0x2')]},'read1stAt':{'type':Sequelize[_0x0d8b('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x0d8b('0x4')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0x0d8b('0x4')]('in',_0x0d8b('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 33a3492..32be994 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 _0x4991=['Owner','get','mkdirSync','10px','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
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','30px','Sms','YYYY-MM-DD','N.A.','closed','YYYY-MM-DD\x20HH:mm:ss','direction','out','renderFile','downloadInteraction.html','toFile','transcript-','.pdf','err','unlinkSync','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','defaults','redis','localhost','socket.io-emitter','sendStatus','status','end','json','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','name','Users','map','TagIds','split','Tags','push','catch','index','SmsInteraction','rawAttributes','fieldName','type','key','model','keys','filters','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','select','field','tools_tags','u.id','ui.SmsInteractionId','from','left_join','users','u.id\x20=\x20ui.UserId','sms_interactions','cm_contacts','o.id\x20=\x20i.UserId','a.id\x20=\x20i.SmsAccountId','sms_messages','me.SmsInteractionId\x20=\x20i.id','sms_interaction_has_tags','it.SmsInteractionId\x20=\x20i.id','search','sqlOperator','conditions','find','unreadMessages','value','`\x20=\x200','`\x20>\x200','Contact','operator','$substring','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','ContactId','buildExpression','start','forEach','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','text','some','compact','isEmpty','SmsAccountId','i.SmsAccountId\x20IN\x20?','concat','createdAt','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','having','`unreadMessages`\x20>\x200','isArray','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','filter','replace','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','group','Sequelize','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','DESC','t.id\x20IN\x20?','journey','i.SmsAccountId\x20IS\x20NOT\x20NULL','getSmsAccounts','i.SmsAccountId\x20IS\x20NULL','sequelize','toString','count','merge','a.key','Account.mandatoryDisposition','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','c.fax','o.fullname','o.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.SmsInteractionId\x20IN\x20?','groupBy','SmsInteractionId','all','params','includeAll','include','options','create','body','describe','addMessage','ids','getMessages','findOne','SmsMessage','format','findAll','rows','addTags','setTags','omit','Tag','color','emit','smsInteractionTags:save','removeTags','download','unix','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','fullname','firstName','lastName','Messages','secret','Account'];(function(_0x5bf35e,_0x24dd1b){var _0x533fa1=function(_0x30b4b5){while(--_0x30b4b5){_0x5bf35e['push'](_0x5bf35e['shift']());}};_0x533fa1(++_0x24dd1b);}(_0x4991,0xf7));var _0x1499=function(_0xb3e52b,_0x48cc1a){_0xb3e52b=_0xb3e52b-0x0;var _0x6e4daa=_0x4991[_0xb3e52b];return _0x6e4daa;};'use strict';var pdf=require(_0x1499('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x1499('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x1499('0x2'));var rp=require(_0x1499('0x3'));var moment=require(_0x1499('0x4'));var BPromise=require(_0x1499('0x5'));var Mustache=require(_0x1499('0x6'));var util=require(_0x1499('0x7'));var path=require(_0x1499('0x8'));var sox=require(_0x1499('0x9'));var csv=require('to-csv');var ejs=require(_0x1499('0xa'));var fs=require('fs');var _=require(_0x1499('0xb'));var squel=require(_0x1499('0xc'));var crypto=require(_0x1499('0xd'));var jsforce=require(_0x1499('0xe'));var deskjs=require(_0x1499('0xf'));var toCsv=require(_0x1499('0x10'));var querystring=require(_0x1499('0x11'));var Papa=require('papaparse');var Redis=require(_0x1499('0x12'));var authService=require(_0x1499('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x1499('0x14'));var hardwareService=require(_0x1499('0x15'));var logger=require('../../config/logger')(_0x1499('0x16'));var utils=require(_0x1499('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0x1499('0x18')](config[_0x1499('0x19')],{'host':_0x1499('0x1a'),'port':0x18eb});var socket=require(_0x1499('0x1b'))(new Redis(config[_0x1499('0x19')]));require('./smsInteraction.socket')['register'](socket);function respondWithStatusCode(_0x308177,_0x4e5195){_0x4e5195=_0x4e5195||0xcc;return function(_0x37d99e){if(_0x37d99e){return _0x308177[_0x1499('0x1c')](_0x4e5195);}return _0x308177[_0x1499('0x1d')](_0x4e5195)[_0x1499('0x1e')]();};}function respondWithResult(_0x48f654,_0x1ed43b){_0x1ed43b=_0x1ed43b||0xc8;return function(_0x373f57){if(_0x373f57){return _0x48f654['status'](_0x1ed43b)[_0x1499('0x1f')](_0x373f57);}};}function respondWithFilteredResult(_0x2d405f,_0x46b364){return function(_0xc92272){if(_0xc92272){var _0x1e45a9=_0xc92272['count'],_0x27e533=_0x46b364[_0x1499('0x20')],_0x5b9859=_0x46b364[_0x1499('0x20')]+_0x46b364['limit'],_0x541477;if(_0x5b9859>=_0x1e45a9){_0x5b9859=_0x1e45a9;_0x541477=0xc8;}else{_0x541477=0xce;}_0x2d405f[_0x1499('0x1d')](_0x541477);return _0x2d405f[_0x1499('0x21')](_0x1499('0x22'),_0x27e533+'-'+_0x5b9859+'/'+_0x1e45a9)[_0x1499('0x1f')](_0xc92272);}return null;};}function patchUpdates(_0x21e887){return function(_0x2911ab){try{jsonpatch[_0x1499('0x23')](_0x2911ab,_0x21e887,!![]);}catch(_0x253439){return BPromise[_0x1499('0x24')](_0x253439);}return _0x2911ab[_0x1499('0x25')]();};}function saveUpdates(_0x2bb71f,_0x836081){return function(_0x223f4c){if(_0x223f4c){return _0x223f4c[_0x1499('0x26')](_0x2bb71f)[_0x1499('0x27')](function(_0x1e2c51){return _0x1e2c51;});}return null;};}function removeEntity(_0x2c7f57,_0x5615b4){return function(_0x258e9c){if(_0x258e9c){return _0x258e9c[_0x1499('0x28')]()[_0x1499('0x27')](function(){_0x2c7f57[_0x1499('0x1d')](0xcc)[_0x1499('0x1e')]();});}};}function handleEntityNotFound(_0x16d036,_0x54f3c2){return function(_0x501c0d){if(!_0x501c0d){_0x16d036[_0x1499('0x1c')](0x194);}return _0x501c0d;};}function handleError(_0x3c9aca,_0x3b9259){_0x3b9259=_0x3b9259||0x1f4;return function(_0x50f0cc){logger[_0x1499('0x29')](_0x50f0cc['stack']);if(_0x50f0cc[_0x1499('0x2a')]){delete _0x50f0cc['name'];}_0x3c9aca['status'](_0x3b9259)['send'](_0x50f0cc);};}function getInteractionUsers(_0x21d204,_0x103efa){return new BPromise(function(_0x40932a,_0x1b460b){try{if(_0x103efa[_0x21d204['id']]){_0x21d204[_0x1499('0x2b')]=_[_0x1499('0x2c')](_0x103efa[_0x21d204['id']],function(_0x3dd534){return{'id':_0x3dd534['id'],'fullname':_0x3dd534['fullname']};});}}catch(_0x180171){_0x1b460b(_0x180171);}_0x40932a(_0x21d204);});}function getInteractionTags(_0x1a2c99,_0x39995b){return new BPromise(function(_0x5b59ea,_0x2dae84){try{if(_0x1a2c99[_0x1499('0x2d')]){_0x1a2c99['Tags']=[];_0x1a2c99[_0x1499('0x2d')][_0x1499('0x2e')](',')['forEach'](function(_0x464c5a){_0x1a2c99[_0x1499('0x2f')][_0x1499('0x30')](_0x39995b[_0x464c5a]);});}delete _0x1a2c99[_0x1499('0x2d')];}catch(_0x225f91){_0x2dae84(_0x225f91);}_0x5b59ea(_0x1a2c99);});}function updateSmsInteraction(_0x339052,_0x7b4d75,_0x18b662){return new BPromise(function(_0x11767f,_0x441d43){return getInteractionUsers(_0x339052,_0x18b662)[_0x1499('0x27')](function(_0x3614af){return getInteractionTags(_0x3614af,_0x7b4d75);})[_0x1499('0x27')](function(_0x3f4c1a){_0x11767f(_0x3f4c1a);})[_0x1499('0x31')](function(_0x197afc){_0x441d43(_0x197afc);});});}exports[_0x1499('0x32')]=function(_0x32cd10,_0xeb06bc){var _0x29e89e={},_0x49518c={},_0x3348bc={'count':0x0,'rows':[]};var _0x121e2f=_[_0x1499('0x2c')](db[_0x1499('0x33')][_0x1499('0x34')],function(_0x136002){return{'name':_0x136002[_0x1499('0x35')],'type':_0x136002[_0x1499('0x36')][_0x1499('0x37')]};});_0x49518c[_0x1499('0x38')]=_[_0x1499('0x2c')](_0x121e2f,'name');_0x49518c['query']=_[_0x1499('0x39')](_0x32cd10['query']);_0x49518c[_0x1499('0x3a')]=_['intersection'](_0x49518c[_0x1499('0x38')],_0x49518c[_0x1499('0x3b')]);_0x29e89e[_0x1499('0x3c')]=_[_0x1499('0x3d')](_0x49518c['model'],qs[_0x1499('0x3e')](_0x32cd10['query'][_0x1499('0x3e')]));_0x29e89e[_0x1499('0x3c')]=_0x29e89e[_0x1499('0x3c')][_0x1499('0x3f')]?_0x29e89e['attributes']:_0x49518c[_0x1499('0x38')];if(!_0x32cd10[_0x1499('0x3b')][_0x1499('0x40')](_0x1499('0x41'))){_0x29e89e['limit']=qs[_0x1499('0x42')](_0x32cd10['query'][_0x1499('0x42')]);_0x29e89e[_0x1499('0x20')]=qs[_0x1499('0x20')](_0x32cd10[_0x1499('0x3b')][_0x1499('0x20')]);}_0x29e89e[_0x1499('0x43')]=qs[_0x1499('0x44')](_0x32cd10[_0x1499('0x3b')][_0x1499('0x44')]);_0x29e89e[_0x1499('0x45')]=qs['filters'](_[_0x1499('0x46')](_0x32cd10['query'],_0x49518c[_0x1499('0x3a')]));var _0x1af1a1=[];var _0x5646cf=squel[_0x1499('0x47')]()[_0x1499('0x48')]('id')[_0x1499('0x48')](_0x1499('0x2a'))[_0x1499('0x48')]('color')['from'](_0x1499('0x49'));var _0x2e5dc6=squel['select']()[_0x1499('0x48')](_0x1499('0x4a'))['field']('u.fullname')[_0x1499('0x48')](_0x1499('0x4b'))[_0x1499('0x4c')]('user_has_sms_interactions','ui')[_0x1499('0x4d')](_0x1499('0x4e'),'u',_0x1499('0x4f'));var _0x360394=squel['select']()[_0x1499('0x4c')](_0x1499('0x50'),'i')[_0x1499('0x4d')](_0x1499('0x51'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x1499('0x4d')](_0x1499('0x4e'),'o',_0x1499('0x52'))['left_join']('sms_accounts','a',_0x1499('0x53'))['left_join'](_0x1499('0x54'),'me',_0x1499('0x55'))[_0x1499('0x4d')](_0x1499('0x56'),'it',_0x1499('0x57'))[_0x1499('0x4d')](_0x1499('0x49'),'t','t.id\x20=\x20it.TagId');var _0x420d16=squel['expr']();var _0x2ff0db=[];var _0x39be0d=squel['expr']();var _0x23fb7f;if(_0x32cd10[_0x1499('0x3b')][_0x1499('0x58')]){_0x23fb7f=as['parseSearch'](_0x32cd10[_0x1499('0x3b')][_0x1499('0x58')]);var _0x10b9a1=_0x23fb7f[_0x1499('0x59')];for(var _0x305599=0x0;_0x305599<_0x23fb7f[_0x1499('0x5a')][_0x1499('0x3f')];_0x305599++){var _0x3b7a6b=_0x23fb7f[_0x1499('0x5a')][_0x305599];var _0x3c85a6='i';var _0x4fae8b=_[_0x1499('0x5b')](_0x121e2f,[_0x1499('0x2a'),_0x3b7a6b[_0x1499('0x48')]]);if(!_0x4fae8b){switch(_0x3b7a6b['field']){case _0x1499('0x5c'):if(_0x3b7a6b[_0x1499('0x5d')]==0x1){_0x360394['having']('`'+_0x3b7a6b[_0x1499('0x48')]+_0x1499('0x5e'));}else{_0x360394['having']('`'+_0x3b7a6b[_0x1499('0x48')]+_0x1499('0x5f'));}break;case _0x1499('0x60'):if(_0x3b7a6b[_0x1499('0x61')]===_0x1499('0x62')){if(_0x3b7a6b[_0x1499('0x5d')][_0x1499('0x2e')]('\x20')['length']>0x1){_0x420d16[_0x10b9a1](_0x1499('0x63'),qs[_0x1499('0x64')](_0x3b7a6b[_0x1499('0x5d')]),null);}else{var _0x175b8d='%'+_0x3b7a6b['value']+'%';_0x420d16[_0x10b9a1]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x175b8d,_0x175b8d,_0x175b8d);}}else{_0x4fae8b=_[_0x1499('0x5b')](_0x121e2f,[_0x1499('0x2a'),'ContactId']);_0x3b7a6b[_0x1499('0x48')]=_0x1499('0x65');_0x217399=as[_0x1499('0x66')](_0x3c85a6,_0x4fae8b['type'],_0x3b7a6b);_0x420d16[_0x10b9a1](_0x217399['text'],_0x217399['value'][_0x1499('0x67')],_0x217399[_0x1499('0x5d')][_0x1499('0x1e')]);}break;case'Tag':var _0x19bc50=_0x3b7a6b['value'][_0x1499('0x2e')](',')[_0x1499('0x2c')](function(_0x2fc6f9){return Number(_0x2fc6f9);});_0x19bc50[_0x1499('0x68')](function(_0x573552){_0x39be0d['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x573552+',%');});_0x2ff0db=_['union'](_0x2ff0db,_0x19bc50);break;case _0x1499('0x69'):if(_0x3b7a6b[_0x1499('0x61')]===_0x1499('0x62')){_0x420d16[_0x10b9a1](_0x1499('0x6a'),'%'+_0x3b7a6b['value']+'%',null);}else{_0x4fae8b=_[_0x1499('0x5b')](_0x121e2f,[_0x1499('0x2a'),'UserId']);_0x3b7a6b[_0x1499('0x48')]='UserId';_0x217399=as[_0x1499('0x66')](_0x3c85a6,_0x4fae8b[_0x1499('0x36')],_0x3b7a6b);_0x420d16[_0x10b9a1](_0x217399[_0x1499('0x6b')],_0x217399['value'][_0x1499('0x67')],_0x217399[_0x1499('0x5d')][_0x1499('0x1e')]);}break;case'body':_0x217399=as[_0x1499('0x66')]('me',null,_0x3b7a6b);_0x420d16[_0x10b9a1](_0x217399[_0x1499('0x6b')],_0x217399[_0x1499('0x5d')]['start'],_0x217399[_0x1499('0x5d')][_0x1499('0x1e')]);break;}}else{var _0x217399=as[_0x1499('0x66')](_0x3c85a6,_0x4fae8b[_0x1499('0x36')],_0x3b7a6b);_0x420d16[_0x10b9a1](_0x217399[_0x1499('0x6b')],_0x217399['value'][_0x1499('0x67')],_0x217399[_0x1499('0x5d')]['end']);}}}else{var _0x3839da=_(_0x32cd10[_0x1499('0x3b')])[_0x1499('0x39')]()[_0x1499('0x2c')](function(_0x46b626){return _[_0x1499('0x6c')](_0x121e2f,['name',_0x46b626])?_0x46b626:undefined;})[_0x1499('0x6d')]()[_0x1499('0x5d')]();if(!_[_0x1499('0x6e')](_0x3839da)){_0x3839da['forEach'](function(_0x1ff29d){if(_0x1ff29d===_0x1499('0x6f')){_0x360394['where'](_0x1499('0x70'),[][_0x1499('0x71')](_0x32cd10[_0x1499('0x3b')][_0x1ff29d]));}else if(_0x1ff29d===_0x1499('0x72')){var _0x2daf06=JSON['parse'](_0x32cd10['query'][_0x1ff29d])[_0x1499('0x73')];var _0x4a6f0d=JSON['parse'](_0x32cd10[_0x1499('0x3b')][_0x1ff29d])[_0x1499('0x74')];_0x360394['where'](_0x1499('0x75'),_0x2daf06,_0x4a6f0d);}else{if(_0x32cd10[_0x1499('0x3b')][_0x1ff29d]===_0x1499('0x76')){_0x360394['where']('i.'+_0x1ff29d+'\x20IS\x20NULL');}else{_0x360394[_0x1499('0x45')]('i.'+_0x1ff29d+_0x1499('0x77'),_0x32cd10[_0x1499('0x3b')][_0x1ff29d]);}}});}if(_0x32cd10[_0x1499('0x3b')][_0x1499('0x78')]){if(_0x32cd10['query'][_0x1499('0x78')]==0x1){_0x360394[_0x1499('0x79')]('`unreadMessages`\x20=\x200');}else{_0x360394[_0x1499('0x79')](_0x1499('0x7a'));}}if(_0x32cd10[_0x1499('0x3b')]['tag']){_0x2ff0db=_[_0x1499('0x7b')](_0x32cd10[_0x1499('0x3b')][_0x1499('0x7c')])?_0x32cd10[_0x1499('0x3b')]['tag']:new Array(_0x32cd10[_0x1499('0x3b')][_0x1499('0x7c')]);_0x2ff0db[_0x1499('0x68')](function(_0x507654){_0x39be0d['or'](_0x1499('0x7d'),'%,'+_0x507654+',%');});}if(_0x32cd10[_0x1499('0x3b')][_0x1499('0x7e')]){var _0x1f9d15=_0x32cd10[_0x1499('0x3b')][_0x1499('0x7e')]['replace']('\x5c','\x5c\x5c')[_0x1499('0x7f')]('\x27\x27','\x27\x27\x27\x27');if(qs['isNumeric'](_0x1f9d15)){_0x420d16['or'](_0x1499('0x80'),_0x1f9d15+'%')['or'](_0x1499('0x81'),_0x1f9d15+'%');}else{_0x420d16['or'](_0x1499('0x82'),qs['getFullTextValue'](_0x1f9d15))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x1f9d15+'%');}}}_0x360394[_0x1499('0x45')](_0x420d16);_0x360394[_0x1499('0x83')]('i.id');var _0x1f1764={'type':db[_0x1499('0x84')][_0x1499('0x85')][_0x1499('0x86')],'raw':!![]};var _0x2a44b3=_0x360394[_0x1499('0x87')]();_0x2a44b3[_0x1499('0x48')]('i.id');_0x2a44b3[_0x1499('0x48')](_0x1499('0x88'),'unreadMessages');if(_0x29e89e[_0x1499('0x43')]){_0x29e89e['order'][_0x1499('0x68')](function(_0x375576){_0x360394[_0x1499('0x43')]('i.'+_0x375576[0x0],_0x375576[0x1]===_0x1499('0x89')?![]:!![]);});}if(!_['isEmpty'](_0x2ff0db)){_0x360394[_0x1499('0x79')](_0x39be0d);_0x2a44b3['where'](_0x1499('0x8a'),_0x2ff0db);}BPromise['resolve']()[_0x1499('0x27')](function(){if(!_0x23fb7f){if(_0x32cd10[_0x1499('0x3b')][_0x1499('0x6f')]||_0x32cd10['query'][_0x1499('0x8b')])return;_0x2a44b3[_0x1499('0x45')]('i.SmsAccountId\x20IS\x20NOT\x20NULL');_0x360394['where'](_0x1499('0x8c'));return;}return _0x32cd10['user'][_0x1499('0x8d')]({'attributes':['id'],'raw':!![]})['then'](function(_0x917508){if(_['isEmpty'](_0x917508)){_0x2a44b3[_0x1499('0x45')](_0x1499('0x8e'));_0x360394[_0x1499('0x45')](_0x1499('0x8e'));}else{_0x2a44b3[_0x1499('0x45')](_0x1499('0x70'),_[_0x1499('0x2c')](_0x917508,'id'));_0x360394[_0x1499('0x45')]('i.SmsAccountId\x20IN\x20?',_[_0x1499('0x2c')](_0x917508,'id'));}});})[_0x1499('0x27')](function(){db[_0x1499('0x8f')]['query'](_0x2a44b3[_0x1499('0x90')](),_0x1f1764)[_0x1499('0x27')](function(_0x50162c){_0x3348bc[_0x1499('0x91')]=_0x50162c[_0x1499('0x3f')];if(_0x3348bc[_0x1499('0x91')]===0x0)return[];return db[_0x1499('0x8f')][_0x1499('0x3b')](_0x5646cf['toString'](),_0x1f1764)[_0x1499('0x27')](function(_0x53700c){_0x1af1a1=_['keyBy'](_0x53700c,'id');_0x1f1764=_[_0x1499('0x92')](_0x1f1764,{'model':db[_0x1499('0x33')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x32cd10[_0x1499('0x3b')][_0x1499('0x3e')]){_0x29e89e[_0x1499('0x3c')][_0x1499('0x68')](function(_0x101abb){_0x360394['field']('i.'+_0x101abb);});}else{_0x360394['field'](_0x1499('0x88'),_0x1499('0x5c'));_0x360394['field'](_0x1499('0x93'),'Account.key');_0x360394[_0x1499('0x48')]('a.mandatoryDisposition',_0x1499('0x94'));_0x360394['field'](_0x1499('0x95'));_0x360394['field'](_0x1499('0x96'),_0x1499('0x97'));_0x360394['field'](_0x1499('0x98'),_0x1499('0x99'));_0x360394['field'](_0x1499('0x9a'),_0x1499('0x9b'));_0x360394[_0x1499('0x48')](_0x1499('0x9c'),_0x1499('0x9d'));_0x360394[_0x1499('0x48')](_0x1499('0x9e'),'Contact.mobile');_0x360394[_0x1499('0x48')](_0x1499('0x9f'),'Contact.fax');_0x360394[_0x1499('0x48')](_0x1499('0xa0'),'Owner.fullname');_0x360394[_0x1499('0x48')](_0x1499('0xa1'),'Owner.internal');_0x360394[_0x1499('0x48')](_0x1499('0xa2'),_0x1499('0x2d'));}_0x360394[_0x1499('0x42')](_0x29e89e[_0x1499('0x42')]);_0x360394[_0x1499('0x20')](_0x29e89e[_0x1499('0x20')]);return db[_0x1499('0x8f')]['query'](_0x360394[_0x1499('0x90')](),_0x1f1764);})[_0x1499('0x27')](function(_0x189c46){_0x2e5dc6[_0x1499('0x45')](_0x1499('0xa3'),_[_0x1499('0x2c')](_0x189c46,'id'));return db['sequelize']['query'](_0x2e5dc6['toString'](),_0x1f1764)[_0x1499('0x27')](function(_0x274bc8){var _0x2965ae=_[_0x1499('0xa4')](_0x274bc8,_0x1499('0xa5'));var _0x421213=[];_0x189c46[_0x1499('0x68')](function(_0x101d82){_0x421213['push'](updateSmsInteraction(_0x101d82,_0x1af1a1,_0x2965ae));});return BPromise[_0x1499('0xa6')](_0x421213);});});})[_0x1499('0x27')](function(_0x59a12f){_0x3348bc['rows']=_0x59a12f;return _0x3348bc;})[_0x1499('0x27')](respondWithFilteredResult(_0xeb06bc,_0x29e89e));})['catch'](handleError(_0xeb06bc,null));};exports['show']=function(_0x5666f5,_0x63c7b3){var _0x118d7a={'raw':![],'where':{'id':_0x5666f5[_0x1499('0xa7')]['id']}},_0x23fd46={};_0x23fd46[_0x1499('0x38')]=_['keys'](db['SmsInteraction'][_0x1499('0x34')]);_0x23fd46[_0x1499('0x3b')]=_[_0x1499('0x39')](_0x5666f5['query']);_0x23fd46[_0x1499('0x3a')]=_['intersection'](_0x23fd46['model'],_0x23fd46[_0x1499('0x3b')]);_0x118d7a['attributes']=_[_0x1499('0x3d')](_0x23fd46['model'],qs[_0x1499('0x3e')](_0x5666f5['query'][_0x1499('0x3e')]));_0x118d7a[_0x1499('0x3c')]=_0x118d7a['attributes'][_0x1499('0x3f')]?_0x118d7a['attributes']:_0x23fd46[_0x1499('0x38')];if(_0x5666f5[_0x1499('0x3b')][_0x1499('0xa8')]){_0x118d7a[_0x1499('0xa9')]=[{'all':!![]}];}_0x118d7a=_[_0x1499('0x92')]({},_0x118d7a,_0x5666f5[_0x1499('0xaa')]);return db[_0x1499('0x33')][_0x1499('0x5b')](_0x118d7a)[_0x1499('0x27')](handleEntityNotFound(_0x63c7b3,null))[_0x1499('0x27')](respondWithResult(_0x63c7b3,null))[_0x1499('0x31')](handleError(_0x63c7b3,null));};exports[_0x1499('0xab')]=function(_0x2949af,_0x545879){return db[_0x1499('0x33')][_0x1499('0xab')](_0x2949af[_0x1499('0xac')],{})[_0x1499('0x27')](respondWithResult(_0x545879,0xc9))['catch'](handleError(_0x545879,null));};exports[_0x1499('0x26')]=function(_0x24112c,_0x4bd566){if(_0x24112c['body']['id']){delete _0x24112c[_0x1499('0xac')]['id'];}return db[_0x1499('0x33')][_0x1499('0x5b')]({'where':{'id':_0x24112c[_0x1499('0xa7')]['id']}})[_0x1499('0x27')](handleEntityNotFound(_0x4bd566,null))[_0x1499('0x27')](saveUpdates(_0x24112c[_0x1499('0xac')],null))[_0x1499('0x27')](respondWithResult(_0x4bd566,null))[_0x1499('0x31')](handleError(_0x4bd566,null));};exports[_0x1499('0x28')]=function(_0x52eb3d,_0x4dea23){return db['SmsInteraction'][_0x1499('0x5b')]({'where':{'id':_0x52eb3d[_0x1499('0xa7')]['id']}})[_0x1499('0x27')](handleEntityNotFound(_0x4dea23,null))[_0x1499('0x27')](removeEntity(_0x4dea23,null))[_0x1499('0x31')](handleError(_0x4dea23,null));};exports[_0x1499('0xad')]=function(_0x4ab0e8,_0x2852b5){return db[_0x1499('0x33')][_0x1499('0xad')]()['then'](respondWithResult(_0x2852b5,null))['catch'](handleError(_0x2852b5,null));};exports[_0x1499('0xae')]=function(_0x411e11,_0x556e97,_0x47f7e8){return db['SmsMessage'][_0x1499('0x5b')]({'where':{'id':_0x411e11[_0x1499('0xa7')]['id']}})['then'](handleEntityNotFound(_0x556e97,null))[_0x1499('0x27')](function(_0x7dd273){if(_0x7dd273){return _0x7dd273[_0x1499('0xae')](_0x411e11[_0x1499('0xac')][_0x1499('0xaf')],_['omit'](_0x411e11['body'],['ids','id'])||{});}})['then'](respondWithResult(_0x556e97,null))[_0x1499('0x31')](handleError(_0x556e97,null));};exports[_0x1499('0xb0')]=function(_0x14e4e8,_0x5a675b,_0x50b927){var _0x479936={'raw':![],'where':{}};var _0x2add75={};var _0x359b60={'count':0x0,'rows':[]};return db[_0x1499('0x33')][_0x1499('0xb1')]({'where':{'id':_0x14e4e8[_0x1499('0xa7')]['id']}})[_0x1499('0x27')](handleEntityNotFound(_0x5a675b,null))[_0x1499('0x27')](function(_0x420576){if(_0x420576){_0x2add75[_0x1499('0x38')]=_['keys'](db[_0x1499('0xb2')]['rawAttributes']);_0x2add75[_0x1499('0x3b')]=_[_0x1499('0x39')](_0x14e4e8[_0x1499('0x3b')]);_0x2add75[_0x1499('0x3a')]=_[_0x1499('0x3d')](_0x2add75[_0x1499('0x38')],_0x2add75[_0x1499('0x3b')]);_0x479936['attributes']=_['intersection'](_0x2add75[_0x1499('0x38')],qs[_0x1499('0x3e')](_0x14e4e8['query'][_0x1499('0x3e')]));_0x479936[_0x1499('0x3c')]=_0x479936[_0x1499('0x3c')]['length']?_0x479936['attributes']:_0x2add75[_0x1499('0x38')];if(!_0x14e4e8['query'][_0x1499('0x40')](_0x1499('0x41'))){_0x479936[_0x1499('0x42')]=qs['limit'](_0x14e4e8['query']['limit']);_0x479936[_0x1499('0x20')]=qs[_0x1499('0x20')](_0x14e4e8['query'][_0x1499('0x20')]);}_0x479936['order']=qs['sort'](_0x14e4e8[_0x1499('0x3b')]['sort']);_0x479936['where']=qs['filters'](_[_0x1499('0x46')](_0x14e4e8['query'],_0x2add75[_0x1499('0x3a')]));_0x479936[_0x1499('0x45')][_0x1499('0xa5')]=_0x420576['id'];if(_0x14e4e8[_0x1499('0x3b')][_0x1499('0x7e')]){_0x479936['where']=_[_0x1499('0x92')](_0x479936[_0x1499('0x45')],{'$or':_[_0x1499('0x2c')](_0x479936['attributes'],function(_0x3d91e1){var _0x772b0c={};_0x772b0c[_0x3d91e1]={'$like':'%'+_0x14e4e8[_0x1499('0x3b')][_0x1499('0x7e')]+'%'};return _0x772b0c;})});}if(_0x14e4e8[_0x1499('0x3b')][_0x1499('0x73')]){var _0x42b61c=_0x14e4e8[_0x1499('0x3b')]['$gte'][_0x1499('0x2e')](',');var _0x12cdd2={};_0x12cdd2[_0x42b61c[0x0]]={'$gte':moment(_0x42b61c[0x1])[_0x1499('0xb3')]('YYYY-MM-DD\x20HH:mm:ss')};_0x479936[_0x1499('0x45')]=_[_0x1499('0x92')](_0x479936[_0x1499('0x45')],_0x12cdd2);}_0x479936=_[_0x1499('0x92')]({},_0x479936,_0x14e4e8[_0x1499('0xaa')]);return db[_0x1499('0xb2')]['count']({'where':_0x479936[_0x1499('0x45')]})[_0x1499('0x27')](function(_0x596c17){_0x359b60[_0x1499('0x91')]=_0x596c17;if(_0x14e4e8[_0x1499('0x3b')][_0x1499('0xa8')]){_0x479936['include']=[{'all':!![]}];}return db['SmsMessage'][_0x1499('0xb4')](_0x479936);})[_0x1499('0x27')](function(_0xc6923f){_0x359b60[_0x1499('0xb5')]=_0xc6923f;return _0x359b60;});}})[_0x1499('0x27')](respondWithFilteredResult(_0x5a675b,_0x479936))[_0x1499('0x31')](handleError(_0x5a675b,null));};exports[_0x1499('0xb6')]=function(_0x1553bf,_0x4fefef,_0x5065f0){return db['SmsInteraction'][_0x1499('0x5b')]({'where':{'id':_0x1553bf[_0x1499('0xa7')]['id']}})['then'](handleEntityNotFound(_0x4fefef,null))[_0x1499('0x27')](function(_0x5d8495){if(_0x5d8495){return _0x5d8495[_0x1499('0xb7')](_0x1553bf[_0x1499('0xac')]['ids'],_[_0x1499('0xb8')](_0x1553bf[_0x1499('0xac')],[_0x1499('0xaf'),'id'])||{})['spread'](function(){return db[_0x1499('0xb9')][_0x1499('0xb4')]({'attributes':['id',_0x1499('0x2a'),_0x1499('0xba')],'where':{'id':_0x1553bf[_0x1499('0xac')][_0x1499('0xaf')]}});})[_0x1499('0x27')](function(_0x2c32f6){socket[_0x1499('0xbb')](_0x1499('0xbc'),{'id':Number(_0x1553bf[_0x1499('0xa7')]['id']),'tags':_0x2c32f6||[]});return{'id':Number(_0x1553bf[_0x1499('0xa7')]['id']),'tags':_0x2c32f6||[]};});}})[_0x1499('0x27')](respondWithResult(_0x4fefef,null))[_0x1499('0x31')](handleError(_0x4fefef,null));};exports[_0x1499('0xbd')]=function(_0x4114cb,_0x4b7f90,_0x351d27){return db[_0x1499('0x33')][_0x1499('0x5b')]({'where':{'id':_0x4114cb[_0x1499('0xa7')]['id']}})[_0x1499('0x27')](handleEntityNotFound(_0x4b7f90,null))[_0x1499('0x27')](function(_0xe9d739){if(_0xe9d739){return _0xe9d739[_0x1499('0xbd')](_0x4114cb[_0x1499('0x3b')][_0x1499('0xaf')]);}})[_0x1499('0x27')](respondWithStatusCode(_0x4b7f90,null))[_0x1499('0x31')](handleError(_0x4b7f90,null));};exports[_0x1499('0xbe')]=function(_0x5f4d80,_0x3d9a07){var _0x339d18=moment()[_0x1499('0xbf')]()['toString']();var _0x3ad0bf=path[_0x1499('0xc0')](config[_0x1499('0xc1')],_0x1499('0xc2'),_0x1499('0xc3'),_0x1499('0xc4'));var _0x753435=path[_0x1499('0xc0')](config['root'],_0x1499('0xc2'),'files',_0x1499('0xc5'));var _0x1519df=path[_0x1499('0xc0')](_0x3ad0bf,_0x339d18);var _0x154d73=util['format'](_0x1499('0xc6'),_0x5f4d80[_0x1499('0xa7')]['id'],_0x339d18);var _0x4cb9c9=path[_0x1499('0xc0')](_0x3ad0bf,_0x154d73);var _0x542490=[];_0x542490[_0x1499('0x30')]({'model':db[_0x1499('0x69')],'as':_0x1499('0x69'),'attributes':['id',_0x1499('0xc7')],'raw':!![]});_0x542490[_0x1499('0x30')]({'model':db['CmContact'],'as':_0x1499('0x60'),'attributes':['id',_0x1499('0xc8'),_0x1499('0xc9')],'raw':!![]});var _0x821029=[{'model':db[_0x1499('0xb2')],'as':_0x1499('0xca'),'attributes':['id',_0x1499('0xac'),_0x1499('0x72'),'direction',_0x1499('0xcb'),_0x1499('0x78')],'include':_0x542490}];_0x821029['push']({'model':db['SmsAccount'],'as':_0x1499('0xcc'),'attributes':['id',_0x1499('0x2a')]});_0x821029[_0x1499('0x30')]({'model':db[_0x1499('0x69')],'as':_0x1499('0xcd'),'attributes':['id',_0x1499('0xc7')]});return db[_0x1499('0x33')][_0x1499('0x5b')]({'where':{'id':_0x5f4d80[_0x1499('0xa7')]['id']},'include':_0x821029})[_0x1499('0x27')](handleEntityNotFound(_0x3d9a07,null))[_0x1499('0x27')](function(_0x3aa408){if(_0x3aa408){var _0x313ce7=_0x3aa408[_0x1499('0xce')]({'plain':!![]});fs[_0x1499('0xcf')](_0x1519df);var _0x5c4e09={'format':'A4','border':_0x1499('0xd0'),'header':{'height':_0x1499('0xd1'),'contents':{'first':_0x1499('0xd2')}},'footer':{'height':_0x1499('0xd3'),'contents':{'default':util['format'](' \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\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
\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%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
\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
\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{{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
\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
\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%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
\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
',util[_0x1499('0xb3')]('%s\x20#%d',_0x1499('0xd4'),_0x313ce7['id']),moment()[_0x1499('0xb3')](_0x1499('0xd5'))[_0x1499('0x90')]())}}};var _0x2eb152={'channel':'Sms','account':_0x313ce7[_0x1499('0xcc')]['name'],'agent':_0x313ce7[_0x1499('0xcd')]?_0x313ce7[_0x1499('0xcd')]['fullname']:_0x1499('0xd6'),'createdAt':moment(_0x313ce7[_0x1499('0x72')])[_0x1499('0xb3')]('YYYY-MM-DD\x20HH:mm:ss')[_0x1499('0x90')](),'closedAt':_0x313ce7[_0x1499('0xd7')]?moment(_0x313ce7['closedAt'])[_0x1499('0xb3')](_0x1499('0xd8'))[_0x1499('0x90')]():'','disposition':_0x313ce7['disposition'],'messages':_(_0x313ce7[_0x1499('0xca')])['filter']({'secret':![]})['map'](function(_0x499808){return{'date':moment(_0x499808[_0x1499('0x72')])[_0x1499('0xb3')](_0x1499('0xd8'))[_0x1499('0x90')](),'sender':_0x499808[_0x1499('0xd9')]==='out'?_0x499808[_0x1499('0x69')]?_0x499808[_0x1499('0x69')][_0x1499('0xc7')]:'System':_0x499808[_0x1499('0x60')]['firstName']+(_0x499808[_0x1499('0x60')][_0x1499('0xc9')]?'\x20'+_0x499808['Contact'][_0x1499('0xc9')]:''),'body':_0x499808['body'],'direction':_0x499808[_0x1499('0xd9')]===_0x1499('0xda')?'A':'C','secret':_0x499808[_0x1499('0xcb')],'read':_0x499808['read']};})['value']()};return ejs[_0x1499('0xdb')](path['join'](config[_0x1499('0xc1')],_0x1499('0xc2'),'views',_0x1499('0xdc')),{'interaction':_0x2eb152})[_0x1499('0x27')](function(_0x405e0f){return new BPromise(function(_0x1130f2,_0x4c4433){pdf[_0x1499('0xab')](_0x405e0f,_0x5c4e09)[_0x1499('0xdd')](path[_0x1499('0xc0')](_0x1519df,_0x1499('0xde')+_0x313ce7['id']+'-'+_0x339d18+_0x1499('0xdf')),function(_0x2f2ffc,_0x52e129){if(_0x2f2ffc)return _0x4c4433(_0x2f2ffc);_0x1130f2(_0x52e129);});});})[_0x1499('0x27')](function(){return new BPromise(function(_0x4f23f3,_0x2a85ff){zipdir(_0x1519df,{'saveTo':_0x4cb9c9},function(_0x1575f8,_0x5fd24b){if(_0x1575f8)return _0x2a85ff(_0x1575f8);return _0x4f23f3(_0x5fd24b);});})['then'](function(){return new BPromise(function(_0x10a9c3,_0x335ce4){rimraf(_0x1519df,function(_0x3991f3){if(_0x3991f3)_0x335ce4(_0x3991f3);return _0x10a9c3();});});})[_0x1499('0x27')](function(){return _0x3d9a07[_0x1499('0xbe')](_0x4cb9c9,_0x154d73,function(_0x5bec93){if(_0x5bec93){console['log'](_0x1499('0xe0'),_0x5bec93);}else{fs[_0x1499('0xe1')](_0x4cb9c9);}});});});}else{return _0x3d9a07['sendStatus'](0xc8);}})['catch'](handleError(_0x3d9a07,null));};
\ No newline at end of file
+var _0xb145=['keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','select','field','color','tools_tags','u.fullname','from','left_join','users','u.id\x20=\x20ui.UserId','sms_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','sms_messages','me.SmsInteractionId\x20=\x20i.id','sms_interaction_has_tags','it.SmsInteractionId\x20=\x20i.id','expr','search','parseSearch','sqlOperator','conditions','find','unreadMessages','value','having','`\x20=\x200','Contact','operator','$substring','split','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','type','text','start','Tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','User','body','compact','i.SmsAccountId\x20IN\x20?','concat','parse','where','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','read','`unreadMessages`\x20=\x200','tag','isArray','filter','replace','isNumeric','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','Sequelize','QueryTypes','SELECT','i.id','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','resolve','SmsAccountId','journey','i.SmsAccountId\x20IS\x20NOT\x20NULL','user','getSmsAccounts','i.SmsAccountId\x20IS\x20NULL','toString','sequelize','keyBy','merge','a.key','a.mandatoryDisposition','i.*','c.firstName','Contact.firstName','Contact.lastName','Contact.email','c.phone','c.fax','Contact.fax','Owner.fullname','Owner.internal','SmsInteractionId','push','all','rows','show','params','includeAll','include','options','create','catch','describe','addMessage','ids','getMessages','findOne','hasOwnProperty','$gte','YYYY-MM-DD\x20HH:mm:ss','SmsMessage','addTags','spread','findAll','emit','removeTags','download','unix','join','server','files','root','attachments','format','CmContact','Messages','direction','Account','Owner','mkdirSync','10px','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
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','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\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
\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%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
\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
\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{{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
\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
\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%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
\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
','Sms','YYYY-MM-DD','N.A.','createdAt','closed','closedAt','out','firstName','lastName','secret','renderFile','views','downloadInteraction.html','toFile','transcript-','.pdf','log','err','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','count','offset','limit','apply','save','update','then','error','stack','name','send','Users','fullname','TagIds','Tags','forEach','index','SmsInteraction','rawAttributes','fieldName','key','model','map'];(function(_0x5db691,_0xcd30a9){var _0xfcf524=function(_0x487ad9){while(--_0x487ad9){_0x5db691['push'](_0x5db691['shift']());}};_0xfcf524(++_0xcd30a9);}(_0xb145,0xa3));var _0x5b14=function(_0x5b0279,_0x5d4fc0){_0x5b0279=_0x5b0279-0x0;var _0x4acac7=_0xb145[_0x5b0279];return _0x4acac7;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x5b14('0x0'));var rimraf=require(_0x5b14('0x1'));var zipdir=require(_0x5b14('0x2'));var jsonpatch=require(_0x5b14('0x3'));var rp=require(_0x5b14('0x4'));var moment=require(_0x5b14('0x5'));var BPromise=require(_0x5b14('0x6'));var Mustache=require(_0x5b14('0x7'));var util=require('util');var path=require(_0x5b14('0x8'));var sox=require(_0x5b14('0x9'));var csv=require(_0x5b14('0xa'));var ejs=require(_0x5b14('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x5b14('0xc'));var crypto=require(_0x5b14('0xd'));var jsforce=require(_0x5b14('0xe'));var deskjs=require(_0x5b14('0xf'));var toCsv=require(_0x5b14('0xa'));var querystring=require('querystring');var Papa=require(_0x5b14('0x10'));var Redis=require(_0x5b14('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x5b14('0x12'));var as=require(_0x5b14('0x13'));var hardwareService=require(_0x5b14('0x14'));var logger=require(_0x5b14('0x15'))(_0x5b14('0x16'));var utils=require('../../config/utils');var config=require(_0x5b14('0x17'));var db=require('../../mysqldb')['db'];config[_0x5b14('0x18')]=_[_0x5b14('0x19')](config[_0x5b14('0x18')],{'host':_0x5b14('0x1a'),'port':0x18eb});var socket=require(_0x5b14('0x1b'))(new Redis(config[_0x5b14('0x18')]));require('./smsInteraction.socket')[_0x5b14('0x1c')](socket);function respondWithStatusCode(_0x16f2a1,_0x35fb8b){_0x35fb8b=_0x35fb8b||0xcc;return function(_0x1dfa26){if(_0x1dfa26){return _0x16f2a1[_0x5b14('0x1d')](_0x35fb8b);}return _0x16f2a1[_0x5b14('0x1e')](_0x35fb8b)[_0x5b14('0x1f')]();};}function respondWithResult(_0xe5af75,_0x183b0a){_0x183b0a=_0x183b0a||0xc8;return function(_0x287bb7){if(_0x287bb7){return _0xe5af75[_0x5b14('0x1e')](_0x183b0a)[_0x5b14('0x20')](_0x287bb7);}};}function respondWithFilteredResult(_0x5cce9b,_0x24cfd0){return function(_0x50866a){if(_0x50866a){var _0x48d395=_0x50866a[_0x5b14('0x21')],_0x58bf3c=_0x24cfd0[_0x5b14('0x22')],_0x3f397d=_0x24cfd0[_0x5b14('0x22')]+_0x24cfd0[_0x5b14('0x23')],_0x3035b5;if(_0x3f397d>=_0x48d395){_0x3f397d=_0x48d395;_0x3035b5=0xc8;}else{_0x3035b5=0xce;}_0x5cce9b[_0x5b14('0x1e')](_0x3035b5);return _0x5cce9b['set']('Content-Range',_0x58bf3c+'-'+_0x3f397d+'/'+_0x48d395)['json'](_0x50866a);}return null;};}function patchUpdates(_0x4f4717){return function(_0x2afa17){try{jsonpatch[_0x5b14('0x24')](_0x2afa17,_0x4f4717,!![]);}catch(_0x1e22a5){return BPromise['reject'](_0x1e22a5);}return _0x2afa17[_0x5b14('0x25')]();};}function saveUpdates(_0x1577f7,_0x4857c7){return function(_0x2d7b38){if(_0x2d7b38){return _0x2d7b38[_0x5b14('0x26')](_0x1577f7)['then'](function(_0x33a293){return _0x33a293;});}return null;};}function removeEntity(_0x54073f,_0x59282c){return function(_0x5e0780){if(_0x5e0780){return _0x5e0780['destroy']()[_0x5b14('0x27')](function(){_0x54073f[_0x5b14('0x1e')](0xcc)[_0x5b14('0x1f')]();});}};}function handleEntityNotFound(_0x5da505,_0x46f86a){return function(_0x3bf8e5){if(!_0x3bf8e5){_0x5da505[_0x5b14('0x1d')](0x194);}return _0x3bf8e5;};}function handleError(_0x143648,_0xe6851b){_0xe6851b=_0xe6851b||0x1f4;return function(_0x1bbbd7){logger[_0x5b14('0x28')](_0x1bbbd7[_0x5b14('0x29')]);if(_0x1bbbd7[_0x5b14('0x2a')]){delete _0x1bbbd7[_0x5b14('0x2a')];}_0x143648[_0x5b14('0x1e')](_0xe6851b)[_0x5b14('0x2b')](_0x1bbbd7);};}function getInteractionUsers(_0x1c3c52,_0x266bbe){return new BPromise(function(_0x4cfd66,_0x370fcd){try{if(_0x266bbe[_0x1c3c52['id']]){_0x1c3c52[_0x5b14('0x2c')]=_['map'](_0x266bbe[_0x1c3c52['id']],function(_0x4ecf7c){return{'id':_0x4ecf7c['id'],'fullname':_0x4ecf7c[_0x5b14('0x2d')]};});}}catch(_0x3fb23b){_0x370fcd(_0x3fb23b);}_0x4cfd66(_0x1c3c52);});}function getInteractionTags(_0x5dca4f,_0x4c1f0e){return new BPromise(function(_0x21b43b,_0x4d3905){try{if(_0x5dca4f[_0x5b14('0x2e')]){_0x5dca4f[_0x5b14('0x2f')]=[];_0x5dca4f['TagIds']['split'](',')[_0x5b14('0x30')](function(_0x3bf143){_0x5dca4f[_0x5b14('0x2f')]['push'](_0x4c1f0e[_0x3bf143]);});}delete _0x5dca4f[_0x5b14('0x2e')];}catch(_0x5a5393){_0x4d3905(_0x5a5393);}_0x21b43b(_0x5dca4f);});}function updateSmsInteraction(_0x364658,_0x291c92,_0x3f3c5f){return new BPromise(function(_0x2e2a83,_0x5b85a8){return getInteractionUsers(_0x364658,_0x3f3c5f)[_0x5b14('0x27')](function(_0x13c8fd){return getInteractionTags(_0x13c8fd,_0x291c92);})[_0x5b14('0x27')](function(_0x37f62c){_0x2e2a83(_0x37f62c);})['catch'](function(_0x32be08){_0x5b85a8(_0x32be08);});});}exports[_0x5b14('0x31')]=function(_0x17bd9f,_0x5604d5){var _0x2fe74d={},_0x546550={},_0xa630a9={'count':0x0,'rows':[]};var _0x43e53=_['map'](db[_0x5b14('0x32')][_0x5b14('0x33')],function(_0x5643c1){return{'name':_0x5643c1[_0x5b14('0x34')],'type':_0x5643c1['type'][_0x5b14('0x35')]};});_0x546550[_0x5b14('0x36')]=_[_0x5b14('0x37')](_0x43e53,_0x5b14('0x2a'));_0x546550['query']=_[_0x5b14('0x38')](_0x17bd9f[_0x5b14('0x39')]);_0x546550[_0x5b14('0x3a')]=_[_0x5b14('0x3b')](_0x546550[_0x5b14('0x36')],_0x546550[_0x5b14('0x39')]);_0x2fe74d[_0x5b14('0x3c')]=_[_0x5b14('0x3b')](_0x546550[_0x5b14('0x36')],qs[_0x5b14('0x3d')](_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x3d')]));_0x2fe74d[_0x5b14('0x3c')]=_0x2fe74d[_0x5b14('0x3c')][_0x5b14('0x3e')]?_0x2fe74d[_0x5b14('0x3c')]:_0x546550['model'];if(!_0x17bd9f[_0x5b14('0x39')]['hasOwnProperty'](_0x5b14('0x3f'))){_0x2fe74d[_0x5b14('0x23')]=qs['limit'](_0x17bd9f['query']['limit']);_0x2fe74d[_0x5b14('0x22')]=qs[_0x5b14('0x22')](_0x17bd9f['query'][_0x5b14('0x22')]);}_0x2fe74d[_0x5b14('0x40')]=qs[_0x5b14('0x41')](_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x41')]);_0x2fe74d['where']=qs[_0x5b14('0x3a')](_[_0x5b14('0x42')](_0x17bd9f['query'],_0x546550[_0x5b14('0x3a')]));var _0x985e69=[];var _0x5cc257=squel[_0x5b14('0x43')]()['field']('id')[_0x5b14('0x44')](_0x5b14('0x2a'))[_0x5b14('0x44')](_0x5b14('0x45'))['from'](_0x5b14('0x46'));var _0x56f868=squel[_0x5b14('0x43')]()[_0x5b14('0x44')]('u.id')['field'](_0x5b14('0x47'))[_0x5b14('0x44')]('ui.SmsInteractionId')[_0x5b14('0x48')]('user_has_sms_interactions','ui')[_0x5b14('0x49')](_0x5b14('0x4a'),'u',_0x5b14('0x4b'));var _0x3bf048=squel[_0x5b14('0x43')]()['from'](_0x5b14('0x4c'),'i')[_0x5b14('0x49')](_0x5b14('0x4d'),'c',_0x5b14('0x4e'))[_0x5b14('0x49')]('users','o','o.id\x20=\x20i.UserId')[_0x5b14('0x49')]('sms_accounts','a','a.id\x20=\x20i.SmsAccountId')['left_join'](_0x5b14('0x4f'),'me',_0x5b14('0x50'))[_0x5b14('0x49')](_0x5b14('0x51'),'it',_0x5b14('0x52'))[_0x5b14('0x49')](_0x5b14('0x46'),'t','t.id\x20=\x20it.TagId');var _0x548e1c=squel['expr']();var _0x5d3ce6=[];var _0x517372=squel[_0x5b14('0x53')]();var _0x42e7d8;if(_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x54')]){_0x42e7d8=as[_0x5b14('0x55')](_0x17bd9f['query']['search']);var _0xa74d24=_0x42e7d8[_0x5b14('0x56')];for(var _0x58b18e=0x0;_0x58b18e<_0x42e7d8[_0x5b14('0x57')][_0x5b14('0x3e')];_0x58b18e++){var _0x508984=_0x42e7d8['conditions'][_0x58b18e];var _0x921a85='i';var _0x1d6fdc=_[_0x5b14('0x58')](_0x43e53,['name',_0x508984[_0x5b14('0x44')]]);if(!_0x1d6fdc){switch(_0x508984[_0x5b14('0x44')]){case _0x5b14('0x59'):if(_0x508984[_0x5b14('0x5a')]==0x1){_0x3bf048[_0x5b14('0x5b')]('`'+_0x508984[_0x5b14('0x44')]+_0x5b14('0x5c'));}else{_0x3bf048['having']('`'+_0x508984[_0x5b14('0x44')]+'`\x20>\x200');}break;case _0x5b14('0x5d'):if(_0x508984[_0x5b14('0x5e')]===_0x5b14('0x5f')){if(_0x508984[_0x5b14('0x5a')][_0x5b14('0x60')]('\x20')[_0x5b14('0x3e')]>0x1){_0x548e1c[_0xa74d24](_0x5b14('0x61'),qs[_0x5b14('0x62')](_0x508984[_0x5b14('0x5a')]),null);}else{var _0x27803d='%'+_0x508984[_0x5b14('0x5a')]+'%';_0x548e1c[_0xa74d24](_0x5b14('0x63'),_0x27803d,_0x27803d,_0x27803d);}}else{_0x1d6fdc=_['find'](_0x43e53,['name','ContactId']);_0x508984[_0x5b14('0x44')]=_0x5b14('0x64');_0x4a506a=as[_0x5b14('0x65')](_0x921a85,_0x1d6fdc[_0x5b14('0x66')],_0x508984);_0x548e1c[_0xa74d24](_0x4a506a[_0x5b14('0x67')],_0x4a506a[_0x5b14('0x5a')][_0x5b14('0x68')],_0x4a506a['value'][_0x5b14('0x1f')]);}break;case _0x5b14('0x69'):var _0x5e42df=_0x508984['value'][_0x5b14('0x60')](',')[_0x5b14('0x37')](function(_0x414f79){return Number(_0x414f79);});_0x5e42df[_0x5b14('0x30')](function(_0x32629d){_0x517372['or'](_0x5b14('0x6a'),'%,'+_0x32629d+',%');});_0x5d3ce6=_['union'](_0x5d3ce6,_0x5e42df);break;case _0x5b14('0x6b'):if(_0x508984['operator']===_0x5b14('0x5f')){_0x548e1c[_0xa74d24]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x508984[_0x5b14('0x5a')]+'%',null);}else{_0x1d6fdc=_[_0x5b14('0x58')](_0x43e53,[_0x5b14('0x2a'),'UserId']);_0x508984[_0x5b14('0x44')]='UserId';_0x4a506a=as[_0x5b14('0x65')](_0x921a85,_0x1d6fdc[_0x5b14('0x66')],_0x508984);_0x548e1c[_0xa74d24](_0x4a506a[_0x5b14('0x67')],_0x4a506a['value'][_0x5b14('0x68')],_0x4a506a[_0x5b14('0x5a')][_0x5b14('0x1f')]);}break;case _0x5b14('0x6c'):_0x4a506a=as['buildExpression']('me',null,_0x508984);_0x548e1c[_0xa74d24](_0x4a506a[_0x5b14('0x67')],_0x4a506a['value'][_0x5b14('0x68')],_0x4a506a[_0x5b14('0x5a')]['end']);break;}}else{var _0x4a506a=as[_0x5b14('0x65')](_0x921a85,_0x1d6fdc[_0x5b14('0x66')],_0x508984);_0x548e1c[_0xa74d24](_0x4a506a[_0x5b14('0x67')],_0x4a506a['value'][_0x5b14('0x68')],_0x4a506a[_0x5b14('0x5a')]['end']);}}}else{var _0x4b9720=_(_0x17bd9f[_0x5b14('0x39')])[_0x5b14('0x38')]()[_0x5b14('0x37')](function(_0x3cffe4){return _['some'](_0x43e53,[_0x5b14('0x2a'),_0x3cffe4])?_0x3cffe4:undefined;})[_0x5b14('0x6d')]()['value']();if(!_['isEmpty'](_0x4b9720)){_0x4b9720[_0x5b14('0x30')](function(_0x1b25e1){if(_0x1b25e1==='SmsAccountId'){_0x3bf048['where'](_0x5b14('0x6e'),[][_0x5b14('0x6f')](_0x17bd9f[_0x5b14('0x39')][_0x1b25e1]));}else if(_0x1b25e1==='createdAt'){var _0x1c7d03=JSON[_0x5b14('0x70')](_0x17bd9f[_0x5b14('0x39')][_0x1b25e1])['$gte'];var _0x453e4b=JSON[_0x5b14('0x70')](_0x17bd9f[_0x5b14('0x39')][_0x1b25e1])['$lte'];_0x3bf048[_0x5b14('0x71')](_0x5b14('0x72'),_0x1c7d03,_0x453e4b);}else{if(_0x17bd9f[_0x5b14('0x39')][_0x1b25e1]===_0x5b14('0x73')){_0x3bf048[_0x5b14('0x71')]('i.'+_0x1b25e1+_0x5b14('0x74'));}else{_0x3bf048[_0x5b14('0x71')]('i.'+_0x1b25e1+'\x20=\x20?',_0x17bd9f['query'][_0x1b25e1]);}}});}if(_0x17bd9f['query']['read']){if(_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x75')]==0x1){_0x3bf048[_0x5b14('0x5b')](_0x5b14('0x76'));}else{_0x3bf048[_0x5b14('0x5b')]('`unreadMessages`\x20>\x200');}}if(_0x17bd9f['query'][_0x5b14('0x77')]){_0x5d3ce6=_[_0x5b14('0x78')](_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x77')])?_0x17bd9f[_0x5b14('0x39')]['tag']:new Array(_0x17bd9f['query'][_0x5b14('0x77')]);_0x5d3ce6[_0x5b14('0x30')](function(_0x160a4f){_0x517372['or'](_0x5b14('0x6a'),'%,'+_0x160a4f+',%');});}if(_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x79')]){var _0x221759=_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x79')]['replace']('\x5c','\x5c\x5c')[_0x5b14('0x7a')]('\x27\x27','\x27\x27\x27\x27');if(qs[_0x5b14('0x7b')](_0x221759)){_0x548e1c['or'](_0x5b14('0x7c'),_0x221759+'%')['or'](_0x5b14('0x7d'),_0x221759+'%');}else{_0x548e1c['or'](_0x5b14('0x7e'),qs[_0x5b14('0x62')](_0x221759))['or'](_0x5b14('0x7f'),_0x221759+'%');}}}_0x3bf048[_0x5b14('0x71')](_0x548e1c);_0x3bf048['group']('i.id');var _0x65b380={'type':db[_0x5b14('0x80')][_0x5b14('0x81')][_0x5b14('0x82')],'raw':!![]};var _0x154b07=_0x3bf048['clone']();_0x154b07[_0x5b14('0x44')](_0x5b14('0x83'));_0x154b07[_0x5b14('0x44')](_0x5b14('0x84'),_0x5b14('0x59'));if(_0x2fe74d[_0x5b14('0x40')]){_0x2fe74d[_0x5b14('0x40')][_0x5b14('0x30')](function(_0x44c3a2){_0x3bf048[_0x5b14('0x40')]('i.'+_0x44c3a2[0x0],_0x44c3a2[0x1]==='DESC'?![]:!![]);});}if(!_['isEmpty'](_0x5d3ce6)){_0x3bf048[_0x5b14('0x5b')](_0x517372);_0x154b07[_0x5b14('0x71')]('t.id\x20IN\x20?',_0x5d3ce6);}BPromise[_0x5b14('0x85')]()[_0x5b14('0x27')](function(){if(!_0x42e7d8){if(_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x86')]||_0x17bd9f['query'][_0x5b14('0x87')])return;_0x154b07[_0x5b14('0x71')](_0x5b14('0x88'));_0x3bf048[_0x5b14('0x71')](_0x5b14('0x88'));return;}return _0x17bd9f[_0x5b14('0x89')][_0x5b14('0x8a')]({'attributes':['id'],'raw':!![]})['then'](function(_0x4b0e12){if(_['isEmpty'](_0x4b0e12)){_0x154b07[_0x5b14('0x71')](_0x5b14('0x8b'));_0x3bf048[_0x5b14('0x71')](_0x5b14('0x8b'));}else{_0x154b07[_0x5b14('0x71')](_0x5b14('0x6e'),_[_0x5b14('0x37')](_0x4b0e12,'id'));_0x3bf048[_0x5b14('0x71')](_0x5b14('0x6e'),_[_0x5b14('0x37')](_0x4b0e12,'id'));}});})[_0x5b14('0x27')](function(){db['sequelize'][_0x5b14('0x39')](_0x154b07[_0x5b14('0x8c')](),_0x65b380)[_0x5b14('0x27')](function(_0x3cb761){_0xa630a9['count']=_0x3cb761[_0x5b14('0x3e')];if(_0xa630a9[_0x5b14('0x21')]===0x0)return[];return db[_0x5b14('0x8d')][_0x5b14('0x39')](_0x5cc257[_0x5b14('0x8c')](),_0x65b380)[_0x5b14('0x27')](function(_0x269a35){_0x985e69=_[_0x5b14('0x8e')](_0x269a35,'id');_0x65b380=_[_0x5b14('0x8f')](_0x65b380,{'model':db[_0x5b14('0x32')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x17bd9f[_0x5b14('0x39')][_0x5b14('0x3d')]){_0x2fe74d[_0x5b14('0x3c')][_0x5b14('0x30')](function(_0xd583b2){_0x3bf048['field']('i.'+_0xd583b2);});}else{_0x3bf048[_0x5b14('0x44')](_0x5b14('0x84'),_0x5b14('0x59'));_0x3bf048[_0x5b14('0x44')](_0x5b14('0x90'),'Account.key');_0x3bf048['field'](_0x5b14('0x91'),'Account.mandatoryDisposition');_0x3bf048[_0x5b14('0x44')](_0x5b14('0x92'));_0x3bf048[_0x5b14('0x44')](_0x5b14('0x93'),_0x5b14('0x94'));_0x3bf048[_0x5b14('0x44')]('c.lastName',_0x5b14('0x95'));_0x3bf048['field']('c.email',_0x5b14('0x96'));_0x3bf048[_0x5b14('0x44')](_0x5b14('0x97'),'Contact.phone');_0x3bf048['field']('c.mobile','Contact.mobile');_0x3bf048[_0x5b14('0x44')](_0x5b14('0x98'),_0x5b14('0x99'));_0x3bf048['field']('o.fullname',_0x5b14('0x9a'));_0x3bf048[_0x5b14('0x44')]('o.internal',_0x5b14('0x9b'));_0x3bf048[_0x5b14('0x44')]('GROUP_CONCAT(DISTINCT\x20t.id)','TagIds');}_0x3bf048['limit'](_0x2fe74d['limit']);_0x3bf048[_0x5b14('0x22')](_0x2fe74d['offset']);return db[_0x5b14('0x8d')][_0x5b14('0x39')](_0x3bf048['toString'](),_0x65b380);})[_0x5b14('0x27')](function(_0x5ce32a){_0x56f868[_0x5b14('0x71')]('ui.SmsInteractionId\x20IN\x20?',_[_0x5b14('0x37')](_0x5ce32a,'id'));return db[_0x5b14('0x8d')]['query'](_0x56f868[_0x5b14('0x8c')](),_0x65b380)[_0x5b14('0x27')](function(_0x21161b){var _0x2a3a92=_['groupBy'](_0x21161b,_0x5b14('0x9c'));var _0x2b6397=[];_0x5ce32a['forEach'](function(_0x3d4ea4){_0x2b6397[_0x5b14('0x9d')](updateSmsInteraction(_0x3d4ea4,_0x985e69,_0x2a3a92));});return BPromise[_0x5b14('0x9e')](_0x2b6397);});});})['then'](function(_0x22eef3){_0xa630a9[_0x5b14('0x9f')]=_0x22eef3;return _0xa630a9;})[_0x5b14('0x27')](respondWithFilteredResult(_0x5604d5,_0x2fe74d));})['catch'](handleError(_0x5604d5,null));};exports[_0x5b14('0xa0')]=function(_0x5c6014,_0xe35a2f){var _0x55c470={'raw':![],'where':{'id':_0x5c6014[_0x5b14('0xa1')]['id']}},_0x2a8597={};_0x2a8597['model']=_[_0x5b14('0x38')](db['SmsInteraction'][_0x5b14('0x33')]);_0x2a8597[_0x5b14('0x39')]=_[_0x5b14('0x38')](_0x5c6014[_0x5b14('0x39')]);_0x2a8597[_0x5b14('0x3a')]=_['intersection'](_0x2a8597['model'],_0x2a8597[_0x5b14('0x39')]);_0x55c470['attributes']=_[_0x5b14('0x3b')](_0x2a8597[_0x5b14('0x36')],qs[_0x5b14('0x3d')](_0x5c6014[_0x5b14('0x39')]['fields']));_0x55c470[_0x5b14('0x3c')]=_0x55c470[_0x5b14('0x3c')][_0x5b14('0x3e')]?_0x55c470[_0x5b14('0x3c')]:_0x2a8597[_0x5b14('0x36')];if(_0x5c6014[_0x5b14('0x39')][_0x5b14('0xa2')]){_0x55c470[_0x5b14('0xa3')]=[{'all':!![]}];}_0x55c470=_[_0x5b14('0x8f')]({},_0x55c470,_0x5c6014[_0x5b14('0xa4')]);return db['SmsInteraction']['find'](_0x55c470)['then'](handleEntityNotFound(_0xe35a2f,null))['then'](respondWithResult(_0xe35a2f,null))['catch'](handleError(_0xe35a2f,null));};exports[_0x5b14('0xa5')]=function(_0x215260,_0x41465a){return db[_0x5b14('0x32')]['create'](_0x215260[_0x5b14('0x6c')],{})[_0x5b14('0x27')](respondWithResult(_0x41465a,0xc9))[_0x5b14('0xa6')](handleError(_0x41465a,null));};exports['update']=function(_0x534104,_0x564a0b){if(_0x534104[_0x5b14('0x6c')]['id']){delete _0x534104[_0x5b14('0x6c')]['id'];}return db['SmsInteraction']['find']({'where':{'id':_0x534104[_0x5b14('0xa1')]['id']}})[_0x5b14('0x27')](handleEntityNotFound(_0x564a0b,null))[_0x5b14('0x27')](saveUpdates(_0x534104[_0x5b14('0x6c')],null))[_0x5b14('0x27')](respondWithResult(_0x564a0b,null))[_0x5b14('0xa6')](handleError(_0x564a0b,null));};exports['destroy']=function(_0x2eb640,_0x419171){return db[_0x5b14('0x32')][_0x5b14('0x58')]({'where':{'id':_0x2eb640[_0x5b14('0xa1')]['id']}})[_0x5b14('0x27')](handleEntityNotFound(_0x419171,null))['then'](removeEntity(_0x419171,null))['catch'](handleError(_0x419171,null));};exports[_0x5b14('0xa7')]=function(_0x5bdbf9,_0x3ea50d){return db[_0x5b14('0x32')]['describe']()[_0x5b14('0x27')](respondWithResult(_0x3ea50d,null))[_0x5b14('0xa6')](handleError(_0x3ea50d,null));};exports['addMessage']=function(_0x52c781,_0x3d00c7,_0x4161ce){return db['SmsMessage'][_0x5b14('0x58')]({'where':{'id':_0x52c781[_0x5b14('0xa1')]['id']}})[_0x5b14('0x27')](handleEntityNotFound(_0x3d00c7,null))[_0x5b14('0x27')](function(_0x316c8e){if(_0x316c8e){return _0x316c8e[_0x5b14('0xa8')](_0x52c781['body']['ids'],_['omit'](_0x52c781[_0x5b14('0x6c')],[_0x5b14('0xa9'),'id'])||{});}})[_0x5b14('0x27')](respondWithResult(_0x3d00c7,null))['catch'](handleError(_0x3d00c7,null));};exports[_0x5b14('0xaa')]=function(_0x120d42,_0x92d6c6,_0x5eca44){var _0x3bccb2={'raw':![],'where':{}};var _0x58ad62={};var _0x43f96f={'count':0x0,'rows':[]};return db['SmsInteraction'][_0x5b14('0xab')]({'where':{'id':_0x120d42['params']['id']}})[_0x5b14('0x27')](handleEntityNotFound(_0x92d6c6,null))['then'](function(_0x936890){if(_0x936890){_0x58ad62[_0x5b14('0x36')]=_['keys'](db['SmsMessage'][_0x5b14('0x33')]);_0x58ad62[_0x5b14('0x39')]=_[_0x5b14('0x38')](_0x120d42[_0x5b14('0x39')]);_0x58ad62['filters']=_[_0x5b14('0x3b')](_0x58ad62[_0x5b14('0x36')],_0x58ad62[_0x5b14('0x39')]);_0x3bccb2[_0x5b14('0x3c')]=_['intersection'](_0x58ad62[_0x5b14('0x36')],qs[_0x5b14('0x3d')](_0x120d42[_0x5b14('0x39')]['fields']));_0x3bccb2['attributes']=_0x3bccb2['attributes']['length']?_0x3bccb2[_0x5b14('0x3c')]:_0x58ad62[_0x5b14('0x36')];if(!_0x120d42['query'][_0x5b14('0xac')](_0x5b14('0x3f'))){_0x3bccb2[_0x5b14('0x23')]=qs[_0x5b14('0x23')](_0x120d42[_0x5b14('0x39')][_0x5b14('0x23')]);_0x3bccb2[_0x5b14('0x22')]=qs[_0x5b14('0x22')](_0x120d42[_0x5b14('0x39')][_0x5b14('0x22')]);}_0x3bccb2['order']=qs['sort'](_0x120d42[_0x5b14('0x39')]['sort']);_0x3bccb2['where']=qs[_0x5b14('0x3a')](_['pick'](_0x120d42[_0x5b14('0x39')],_0x58ad62[_0x5b14('0x3a')]));_0x3bccb2[_0x5b14('0x71')][_0x5b14('0x9c')]=_0x936890['id'];if(_0x120d42[_0x5b14('0x39')][_0x5b14('0x79')]){_0x3bccb2[_0x5b14('0x71')]=_['merge'](_0x3bccb2[_0x5b14('0x71')],{'$or':_[_0x5b14('0x37')](_0x3bccb2['attributes'],function(_0x8b2a1a){var _0x19a5cc={};_0x19a5cc[_0x8b2a1a]={'$like':'%'+_0x120d42[_0x5b14('0x39')]['filter']+'%'};return _0x19a5cc;})});}if(_0x120d42['query'][_0x5b14('0xad')]){var _0x12df71=_0x120d42['query'][_0x5b14('0xad')][_0x5b14('0x60')](',');var _0x29d756={};_0x29d756[_0x12df71[0x0]]={'$gte':moment(_0x12df71[0x1])['format'](_0x5b14('0xae'))};_0x3bccb2[_0x5b14('0x71')]=_['merge'](_0x3bccb2[_0x5b14('0x71')],_0x29d756);}_0x3bccb2=_[_0x5b14('0x8f')]({},_0x3bccb2,_0x120d42['options']);return db['SmsMessage'][_0x5b14('0x21')]({'where':_0x3bccb2[_0x5b14('0x71')]})[_0x5b14('0x27')](function(_0x453fab){_0x43f96f['count']=_0x453fab;if(_0x120d42[_0x5b14('0x39')][_0x5b14('0xa2')]){_0x3bccb2[_0x5b14('0xa3')]=[{'all':!![]}];}return db[_0x5b14('0xaf')]['findAll'](_0x3bccb2);})[_0x5b14('0x27')](function(_0x1a5f39){_0x43f96f[_0x5b14('0x9f')]=_0x1a5f39;return _0x43f96f;});}})[_0x5b14('0x27')](respondWithFilteredResult(_0x92d6c6,_0x3bccb2))[_0x5b14('0xa6')](handleError(_0x92d6c6,null));};exports[_0x5b14('0xb0')]=function(_0x35924b,_0x353333,_0x4c38f9){return db[_0x5b14('0x32')]['find']({'where':{'id':_0x35924b['params']['id']}})[_0x5b14('0x27')](handleEntityNotFound(_0x353333,null))[_0x5b14('0x27')](function(_0xf2480e){if(_0xf2480e){return _0xf2480e['setTags'](_0x35924b[_0x5b14('0x6c')]['ids'],_['omit'](_0x35924b[_0x5b14('0x6c')],[_0x5b14('0xa9'),'id'])||{})[_0x5b14('0xb1')](function(){return db['Tag'][_0x5b14('0xb2')]({'attributes':['id',_0x5b14('0x2a'),_0x5b14('0x45')],'where':{'id':_0x35924b[_0x5b14('0x6c')][_0x5b14('0xa9')]}});})['then'](function(_0x71080){socket[_0x5b14('0xb3')]('smsInteractionTags:save',{'id':Number(_0x35924b['params']['id']),'tags':_0x71080||[]});return{'id':Number(_0x35924b[_0x5b14('0xa1')]['id']),'tags':_0x71080||[]};});}})[_0x5b14('0x27')](respondWithResult(_0x353333,null))['catch'](handleError(_0x353333,null));};exports[_0x5b14('0xb4')]=function(_0x57b61d,_0x3adb3d,_0x58a304){return db[_0x5b14('0x32')][_0x5b14('0x58')]({'where':{'id':_0x57b61d[_0x5b14('0xa1')]['id']}})[_0x5b14('0x27')](handleEntityNotFound(_0x3adb3d,null))[_0x5b14('0x27')](function(_0x4e1e3f){if(_0x4e1e3f){return _0x4e1e3f[_0x5b14('0xb4')](_0x57b61d[_0x5b14('0x39')][_0x5b14('0xa9')]);}})['then'](respondWithStatusCode(_0x3adb3d,null))[_0x5b14('0xa6')](handleError(_0x3adb3d,null));};exports[_0x5b14('0xb5')]=function(_0x1084ab,_0x3a8d0b){var _0x57de21=moment()[_0x5b14('0xb6')]()[_0x5b14('0x8c')]();var _0x1e9217=path[_0x5b14('0xb7')](config['root'],_0x5b14('0xb8'),_0x5b14('0xb9'),'tmp');var _0x26ee93=path[_0x5b14('0xb7')](config[_0x5b14('0xba')],_0x5b14('0xb8'),_0x5b14('0xb9'),_0x5b14('0xbb'));var _0x477ed7=path['join'](_0x1e9217,_0x57de21);var _0x2d0db0=util[_0x5b14('0xbc')]('transcript-%d-%s.zip',_0x1084ab['params']['id'],_0x57de21);var _0x6e7a20=path['join'](_0x1e9217,_0x2d0db0);var _0x40e103=[];_0x40e103['push']({'model':db['User'],'as':_0x5b14('0x6b'),'attributes':['id',_0x5b14('0x2d')],'raw':!![]});_0x40e103[_0x5b14('0x9d')]({'model':db[_0x5b14('0xbd')],'as':_0x5b14('0x5d'),'attributes':['id','firstName','lastName'],'raw':!![]});var _0x53fc74=[{'model':db[_0x5b14('0xaf')],'as':_0x5b14('0xbe'),'attributes':['id',_0x5b14('0x6c'),'createdAt',_0x5b14('0xbf'),'secret',_0x5b14('0x75')],'include':_0x40e103}];_0x53fc74[_0x5b14('0x9d')]({'model':db['SmsAccount'],'as':_0x5b14('0xc0'),'attributes':['id','name']});_0x53fc74[_0x5b14('0x9d')]({'model':db[_0x5b14('0x6b')],'as':_0x5b14('0xc1'),'attributes':['id',_0x5b14('0x2d')]});return db[_0x5b14('0x32')]['find']({'where':{'id':_0x1084ab[_0x5b14('0xa1')]['id']},'include':_0x53fc74})['then'](handleEntityNotFound(_0x3a8d0b,null))[_0x5b14('0x27')](function(_0x239ac0){if(_0x239ac0){var _0x222d84=_0x239ac0['get']({'plain':!![]});fs[_0x5b14('0xc2')](_0x477ed7);var _0x3b9a2a={'format':'A4','border':_0x5b14('0xc3'),'header':{'height':_0x5b14('0xc4'),'contents':{'first':_0x5b14('0xc5')}},'footer':{'height':_0x5b14('0xc6'),'contents':{'default':util[_0x5b14('0xbc')](_0x5b14('0xc7'),util[_0x5b14('0xbc')]('%s\x20#%d',_0x5b14('0xc8'),_0x222d84['id']),moment()['format'](_0x5b14('0xc9'))[_0x5b14('0x8c')]())}}};var _0x4c5839={'channel':'Sms','account':_0x222d84['Account'][_0x5b14('0x2a')],'agent':_0x222d84[_0x5b14('0xc1')]?_0x222d84[_0x5b14('0xc1')]['fullname']:_0x5b14('0xca'),'createdAt':moment(_0x222d84[_0x5b14('0xcb')])[_0x5b14('0xbc')](_0x5b14('0xae'))[_0x5b14('0x8c')](),'closedAt':_0x222d84[_0x5b14('0xcc')]?moment(_0x222d84[_0x5b14('0xcd')])[_0x5b14('0xbc')](_0x5b14('0xae'))[_0x5b14('0x8c')]():'','disposition':_0x222d84['disposition'],'messages':_(_0x222d84['Messages'])[_0x5b14('0x79')]({'secret':![]})[_0x5b14('0x37')](function(_0x3020f8){return{'date':moment(_0x3020f8[_0x5b14('0xcb')])[_0x5b14('0xbc')](_0x5b14('0xae'))[_0x5b14('0x8c')](),'sender':_0x3020f8['direction']===_0x5b14('0xce')?_0x3020f8[_0x5b14('0x6b')]?_0x3020f8[_0x5b14('0x6b')][_0x5b14('0x2d')]:'System':_0x3020f8[_0x5b14('0x5d')][_0x5b14('0xcf')]+(_0x3020f8['Contact'][_0x5b14('0xd0')]?'\x20'+_0x3020f8[_0x5b14('0x5d')][_0x5b14('0xd0')]:''),'body':_0x3020f8[_0x5b14('0x6c')],'direction':_0x3020f8[_0x5b14('0xbf')]===_0x5b14('0xce')?'A':'C','secret':_0x3020f8[_0x5b14('0xd1')],'read':_0x3020f8[_0x5b14('0x75')]};})['value']()};return ejs[_0x5b14('0xd2')](path[_0x5b14('0xb7')](config[_0x5b14('0xba')],'server',_0x5b14('0xd3'),_0x5b14('0xd4')),{'interaction':_0x4c5839})[_0x5b14('0x27')](function(_0x5265ce){return new BPromise(function(_0x3785aa,_0x2aac41){pdf[_0x5b14('0xa5')](_0x5265ce,_0x3b9a2a)[_0x5b14('0xd5')](path[_0x5b14('0xb7')](_0x477ed7,_0x5b14('0xd6')+_0x222d84['id']+'-'+_0x57de21+_0x5b14('0xd7')),function(_0x49ffa6,_0xcb7a12){if(_0x49ffa6)return _0x2aac41(_0x49ffa6);_0x3785aa(_0xcb7a12);});});})[_0x5b14('0x27')](function(){return new BPromise(function(_0x491908,_0x1983ba){zipdir(_0x477ed7,{'saveTo':_0x6e7a20},function(_0x4111a9,_0x2bf4e4){if(_0x4111a9)return _0x1983ba(_0x4111a9);return _0x491908(_0x2bf4e4);});})[_0x5b14('0x27')](function(){return new BPromise(function(_0x2050ec,_0x274f37){rimraf(_0x477ed7,function(_0x2a1a2f){if(_0x2a1a2f)_0x274f37(_0x2a1a2f);return _0x2050ec();});});})[_0x5b14('0x27')](function(){return _0x3a8d0b[_0x5b14('0xb5')](_0x6e7a20,_0x2d0db0,function(_0x113017){if(_0x113017){console[_0x5b14('0xd8')](_0x5b14('0xd9'),_0x113017);}else{fs[_0x5b14('0xda')](_0x6e7a20);}});});});}else{return _0x3a8d0b[_0x5b14('0x1d')](0xc8);}})['catch'](handleError(_0x3a8d0b,null));};
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.events.js b/server/api/smsInteraction/smsInteraction.events.js
index 1d09041..e71adca 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 _0xe14b=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','SmsMessage','setMaxListeners','update','getUsers','then','setDataValue','findAll'];(function(_0x3f0bfd,_0x345267){var _0x29ab25=function(_0x496cc0){while(--_0x496cc0){_0x3f0bfd['push'](_0x3f0bfd['shift']());}};_0x29ab25(++_0x345267);}(_0xe14b,0x93));var _0xbe14=function(_0x1bfc18,_0x2a658e){_0x1bfc18=_0x1bfc18-0x0;var _0x2755cb=_0xe14b[_0x1bfc18];return _0x2755cb;};'use strict';var EventEmitter=require(_0xbe14('0x0'));var SmsInteraction=require(_0xbe14('0x1'))['db']['SmsInteraction'];var SmsMessage=require('../../mysqldb')['db'][_0xbe14('0x2')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0xbe14('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xbe14('0x4'),'afterDestroy':'remove'};function emitEvent(_0x496c04){return function(_0x1833e3,_0x2d1a4a,_0x1fe204){_0x1833e3[_0xbe14('0x5')]({'attributes':['id'],'raw':!![]})[_0xbe14('0x6')](function(_0x39387e){_0x1833e3[_0xbe14('0x7')]('Users',_0x39387e['map'](function(_0x496063){return{'id':_0x496063['id']};}));return SmsMessage[_0xbe14('0x8')]({'where':{'SmsInteractionId':_0x1833e3['id'],'direction':'in','read':![]},'raw':!![]});})[_0xbe14('0x6')](function(_0xd68cd7){_0x1833e3[_0xbe14('0x7')]('unreadMessages',_0xd68cd7['length']);SmsInteractionEvents[_0xbe14('0x9')](_0x496c04+':'+_0x1833e3['id'],_0x1833e3);SmsInteractionEvents[_0xbe14('0x9')](_0x496c04,_0x1833e3);_0x1fe204(null);})['catch'](_0x1fe204(null));};}for(var e in events){if(events[_0xbe14('0xa')](e)){var event=events[e];SmsInteraction[_0xbe14('0xb')](e,emitEvent(event));}}module[_0xbe14('0xc')]=SmsInteractionEvents;
\ No newline at end of file
+var _0x6921=['exports','../../mysqldb','setMaxListeners','save','remove','getUsers','then','setDataValue','Users','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty'];(function(_0x5278d3,_0x3a73e1){var _0x369ad1=function(_0x2caf9c){while(--_0x2caf9c){_0x5278d3['push'](_0x5278d3['shift']());}};_0x369ad1(++_0x3a73e1);}(_0x6921,0x1d1));var _0x1692=function(_0x39f74c,_0x3f3471){_0x39f74c=_0x39f74c-0x0;var _0x2df462=_0x6921[_0x39f74c];return _0x2df462;};'use strict';var EventEmitter=require('events');var SmsInteraction=require(_0x1692('0x0'))['db']['SmsInteraction'];var SmsMessage=require(_0x1692('0x0'))['db']['SmsMessage'];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0x1692('0x1')](0x0);var events={'afterCreate':_0x1692('0x2'),'afterUpdate':'update','afterDestroy':_0x1692('0x3')};function emitEvent(_0x577497){return function(_0x4581c4,_0x39cc05,_0x15f20e){_0x4581c4[_0x1692('0x4')]({'attributes':['id'],'raw':!![]})[_0x1692('0x5')](function(_0x36d159){_0x4581c4[_0x1692('0x6')](_0x1692('0x7'),_0x36d159[_0x1692('0x8')](function(_0x38159b){return{'id':_0x38159b['id']};}));return SmsMessage[_0x1692('0x9')]({'where':{'SmsInteractionId':_0x4581c4['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x3dd25c){_0x4581c4['setDataValue'](_0x1692('0xa'),_0x3dd25c[_0x1692('0xb')]);SmsInteractionEvents[_0x1692('0xc')](_0x577497+':'+_0x4581c4['id'],_0x4581c4);SmsInteractionEvents[_0x1692('0xc')](_0x577497,_0x4581c4);_0x15f20e(null);})[_0x1692('0xd')](_0x15f20e(null));};}for(var e in events){if(events[_0x1692('0xe')](e)){var event=events[e];SmsInteraction['hook'](e,emitEvent(event));}}module[_0x1692('0xf')]=SmsInteractionEvents;
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.model.js b/server/api/smsInteraction/smsInteraction.model.js
index 26b40b2..62c38ac 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 _0x8c94=['sms_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','api','moment','bluebird','path','../../config/environment','exports','define','SmsInteraction'];(function(_0x104264,_0x1b2224){var _0x220a3a=function(_0x98683c){while(--_0x98683c){_0x104264['push'](_0x104264['shift']());}};_0x220a3a(++_0x1b2224);}(_0x8c94,0x186));var _0x48c9=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0x8c94[_0xa1e3e3];return _0xc980e9;};'use strict';var _=require(_0x48c9('0x0'));var util=require(_0x48c9('0x1'));var logger=require('../../config/logger')(_0x48c9('0x2'));var moment=require(_0x48c9('0x3'));var BPromise=require(_0x48c9('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x48c9('0x5'));var rimraf=require('rimraf');var config=require(_0x48c9('0x6'));var attributes=require('./smsInteraction.attributes');module[_0x48c9('0x7')]=function(_0x5e1399,_0x1e96c3){return _0x5e1399[_0x48c9('0x8')](_0x48c9('0x9'),attributes,{'tableName':_0x48c9('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x38ff9e,_0x5e36ed,_0x25b1f2){if(_0x38ff9e[_0x48c9('0xb')](_0x48c9('0xc'))){_0x38ff9e[_0x48c9('0xd')]=moment()[_0x48c9('0xe')](_0x48c9('0xf'));}_0x25b1f2(null,_0x38ff9e);}}});};
\ No newline at end of file
+var _0x788c=['changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction'];(function(_0x20b014,_0x41f545){var _0x312e25=function(_0x4e3498){while(--_0x4e3498){_0x20b014['push'](_0x20b014['shift']());}};_0x312e25(++_0x41f545);}(_0x788c,0x1c6));var _0xc788=function(_0x407a99,_0x2b07a2){_0x407a99=_0x407a99-0x0;var _0x16326e=_0x788c[_0x407a99];return _0x16326e;};'use strict';var _=require('lodash');var util=require(_0xc788('0x0'));var logger=require(_0xc788('0x1'))(_0xc788('0x2'));var moment=require(_0xc788('0x3'));var BPromise=require('bluebird');var rp=require(_0xc788('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc788('0x5'));var config=require(_0xc788('0x6'));var attributes=require(_0xc788('0x7'));module[_0xc788('0x8')]=function(_0x91313,_0x31ba05){return _0x91313[_0xc788('0x9')](_0xc788('0xa'),attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x58f72d,_0x3b821b,_0x26b93f){if(_0x58f72d[_0xc788('0xb')]('closed')){_0x58f72d[_0xc788('0xc')]=moment()[_0xc788('0xd')](_0xc788('0xe'));}_0x26b93f(null,_0x58f72d);}}});};
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.rpc.js b/server/api/smsInteraction/smsInteraction.rpc.js
index 1a98bef..7567e2b 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 _0x530f=['debug','SmsInteraction','find','addTags','ids','spread','AddTags','lodash','moment','randomstring','../../mysqldb','../../config/utils','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./smsInteraction.socket','register','request','then','info','request\x20sent','SmsInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsInteraction,\x20%s,\x20%s','message','catch','UpdateSmsInteraction','update','body','options','raw','where','attributes'];(function(_0x5b45cb,_0x37f046){var _0x5301b8=function(_0x2db417){while(--_0x2db417){_0x5b45cb['push'](_0x5b45cb['shift']());}};_0x5301b8(++_0x37f046);}(_0x530f,0x15d));var _0xf530=function(_0x3ee4d1,_0x35cbfd){_0x3ee4d1=_0x3ee4d1-0x0;var _0x24b28a=_0x530f[_0x3ee4d1];return _0x24b28a;};'use strict';var _=require(_0xf530('0x0'));var util=require('util');var moment=require(_0xf530('0x1'));var BPromise=require('bluebird');var rs=require(_0xf530('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf530('0x3'))['db'];var utils=require(_0xf530('0x4'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xf530('0x5'));var client=jayson[_0xf530('0x6')]['http']({'port':0x232a});config[_0xf530('0x7')]=_[_0xf530('0x8')](config[_0xf530('0x7')],{'host':_0xf530('0x9'),'port':0x18eb});var socket=require(_0xf530('0xa'))(new Redis(config['redis']));require(_0xf530('0xb'))[_0xf530('0xc')](socket);function respondWithRpcPromise(_0x31bb14,_0x3c4470,_0x265c5d){return new BPromise(function(_0x2704ac,_0x52c8ce){return client[_0xf530('0xd')](_0x31bb14,_0x265c5d)[_0xf530('0xe')](function(_0x41b0c0){logger[_0xf530('0xf')]('SmsInteraction,\x20%s,\x20%s',_0x3c4470,_0xf530('0x10'));logger['debug'](_0xf530('0x11'),_0x3c4470,_0xf530('0x10'),JSON[_0xf530('0x12')](_0x41b0c0));if(_0x41b0c0[_0xf530('0x13')]){if(_0x41b0c0[_0xf530('0x13')][_0xf530('0x14')]===0x1f4){logger[_0xf530('0x13')](_0xf530('0x15'),_0x3c4470,_0x41b0c0['error']['message']);return _0x52c8ce(_0x41b0c0[_0xf530('0x13')][_0xf530('0x16')]);}logger[_0xf530('0x13')](_0xf530('0x15'),_0x3c4470,_0x41b0c0['error'][_0xf530('0x16')]);return _0x2704ac(_0x41b0c0['error'][_0xf530('0x16')]);}else{logger[_0xf530('0xf')]('SmsInteraction,\x20%s,\x20%s',_0x3c4470,_0xf530('0x10'));_0x2704ac(_0x41b0c0['result'][_0xf530('0x16')]);}})[_0xf530('0x17')](function(_0x246417){logger[_0xf530('0x13')](_0xf530('0x15'),_0x3c4470,_0x246417);_0x52c8ce(_0x246417);});});}exports[_0xf530('0x18')]=function(_0x6610d7){var _0x304365=this;return new Promise(function(_0x571d0c,_0x1f707c){return db['SmsInteraction'][_0xf530('0x19')](_0x6610d7[_0xf530('0x1a')],{'raw':_0x6610d7[_0xf530('0x1b')]?_0x6610d7[_0xf530('0x1b')][_0xf530('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x6610d7[_0xf530('0x1b')]?_0x6610d7[_0xf530('0x1b')][_0xf530('0x1d')]||null:null,'attributes':_0x6610d7['options']?_0x6610d7[_0xf530('0x1b')][_0xf530('0x1e')]||null:null,'limit':_0x6610d7[_0xf530('0x1b')]?_0x6610d7[_0xf530('0x1b')]['limit']||null:null})[_0xf530('0xe')](function(_0x91955d){logger[_0xf530('0xf')](_0xf530('0x18'),_0x6610d7);logger[_0xf530('0x1f')](_0xf530('0x18'),_0x6610d7,JSON['stringify'](_0x91955d));_0x571d0c(_0x91955d);})[_0xf530('0x17')](function(_0x29b84e){logger[_0xf530('0x13')]('UpdateSmsInteraction',_0x29b84e[_0xf530('0x16')],_0x6610d7);_0x1f707c(_0x304365['error'](0x1f4,_0x29b84e[_0xf530('0x16')]));});});};exports['AddTagsToSmsInteraction']=function(_0xedc488){return new Promise(function(_0x501769,_0x514907){return db[_0xf530('0x20')][_0xf530('0x21')]({'where':_0xedc488[_0xf530('0x1b')]?_0xedc488[_0xf530('0x1b')][_0xf530('0x1d')]||null:null})[_0xf530('0xe')](function(_0x472866){if(_0x472866){return _0x472866[_0xf530('0x22')](_0xedc488[_0xf530('0x1a')]['ids'],_['omit'](_0xedc488[_0xf530('0x1a')],[_0xf530('0x23'),'id'])||{});}})[_0xf530('0x24')](function(_0x18133c){logger['info'](_0xf530('0x25'),_0xedc488);logger['debug'](_0xf530('0x25'),_0xedc488,JSON[_0xf530('0x12')](_0x18133c));_0x501769(_0x18133c);})[_0xf530('0x17')](function(_0x59fb3d){logger['error']('AddTags',_0x59fb3d['message'],_0xedc488);_0x514907(_this[_0xf530('0x13')](0x1f4,_0x59fb3d[_0xf530('0x16')]));});});};
\ No newline at end of file
+var _0xbe38=['error','code','message','result','catch','UpdateSmsInteraction','update','body','options','raw','where','attributes','limit','AddTagsToSmsInteraction','find','addTags','omit','ids','spread','AddTags','lodash','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','client','redis','defaults','register','request','then','info','SmsInteraction,\x20%s,\x20%s','request\x20sent','debug','SmsInteraction,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x5b0375,_0x22a164){var _0x1c0209=function(_0x1d0406){while(--_0x1d0406){_0x5b0375['push'](_0x5b0375['shift']());}};_0x1c0209(++_0x22a164);}(_0xbe38,0xb4));var _0x8be3=function(_0x34b57c,_0x97c5c9){_0x34b57c=_0x34b57c-0x0;var _0x2ac76b=_0xbe38[_0x34b57c];return _0x2ac76b;};'use strict';var _=require(_0x8be3('0x0'));var util=require('util');var moment=require(_0x8be3('0x1'));var BPromise=require(_0x8be3('0x2'));var rs=require(_0x8be3('0x3'));var fs=require('fs');var Redis=require(_0x8be3('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8be3('0x5'))(_0x8be3('0x6'));var config=require(_0x8be3('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x8be3('0x8')]['http']({'port':0x232a});config[_0x8be3('0x9')]=_[_0x8be3('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./smsInteraction.socket')[_0x8be3('0xb')](socket);function respondWithRpcPromise(_0x2697f1,_0x21aaa2,_0x5e587d){return new BPromise(function(_0x1ad9d1,_0x587c9e){return client[_0x8be3('0xc')](_0x2697f1,_0x5e587d)[_0x8be3('0xd')](function(_0x318c3e){logger[_0x8be3('0xe')](_0x8be3('0xf'),_0x21aaa2,_0x8be3('0x10'));logger[_0x8be3('0x11')](_0x8be3('0x12'),_0x21aaa2,'request\x20sent',JSON[_0x8be3('0x13')](_0x318c3e));if(_0x318c3e[_0x8be3('0x14')]){if(_0x318c3e['error'][_0x8be3('0x15')]===0x1f4){logger[_0x8be3('0x14')](_0x8be3('0xf'),_0x21aaa2,_0x318c3e[_0x8be3('0x14')][_0x8be3('0x16')]);return _0x587c9e(_0x318c3e[_0x8be3('0x14')][_0x8be3('0x16')]);}logger[_0x8be3('0x14')](_0x8be3('0xf'),_0x21aaa2,_0x318c3e[_0x8be3('0x14')][_0x8be3('0x16')]);return _0x1ad9d1(_0x318c3e[_0x8be3('0x14')][_0x8be3('0x16')]);}else{logger[_0x8be3('0xe')](_0x8be3('0xf'),_0x21aaa2,_0x8be3('0x10'));_0x1ad9d1(_0x318c3e[_0x8be3('0x17')][_0x8be3('0x16')]);}})[_0x8be3('0x18')](function(_0x4779f5){logger[_0x8be3('0x14')](_0x8be3('0xf'),_0x21aaa2,_0x4779f5);_0x587c9e(_0x4779f5);});});}exports[_0x8be3('0x19')]=function(_0x3222b1){var _0x5acae2=this;return new Promise(function(_0x3bfcbd,_0x3ef052){return db['SmsInteraction'][_0x8be3('0x1a')](_0x3222b1[_0x8be3('0x1b')],{'raw':_0x3222b1[_0x8be3('0x1c')]?_0x3222b1[_0x8be3('0x1c')][_0x8be3('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3222b1[_0x8be3('0x1c')]?_0x3222b1[_0x8be3('0x1c')][_0x8be3('0x1e')]||null:null,'attributes':_0x3222b1[_0x8be3('0x1c')]?_0x3222b1[_0x8be3('0x1c')][_0x8be3('0x1f')]||null:null,'limit':_0x3222b1[_0x8be3('0x1c')]?_0x3222b1[_0x8be3('0x1c')][_0x8be3('0x20')]||null:null})[_0x8be3('0xd')](function(_0x4c24f3){logger[_0x8be3('0xe')]('UpdateSmsInteraction',_0x3222b1);logger[_0x8be3('0x11')](_0x8be3('0x19'),_0x3222b1,JSON[_0x8be3('0x13')](_0x4c24f3));_0x3bfcbd(_0x4c24f3);})[_0x8be3('0x18')](function(_0x4a2e84){logger[_0x8be3('0x14')](_0x8be3('0x19'),_0x4a2e84['message'],_0x3222b1);_0x3ef052(_0x5acae2['error'](0x1f4,_0x4a2e84['message']));});});};exports[_0x8be3('0x21')]=function(_0x9f8ef1){return new Promise(function(_0x2227d4,_0x1db7b7){return db['SmsInteraction'][_0x8be3('0x22')]({'where':_0x9f8ef1[_0x8be3('0x1c')]?_0x9f8ef1[_0x8be3('0x1c')][_0x8be3('0x1e')]||null:null})[_0x8be3('0xd')](function(_0x114955){if(_0x114955){return _0x114955[_0x8be3('0x23')](_0x9f8ef1['body']['ids'],_[_0x8be3('0x24')](_0x9f8ef1[_0x8be3('0x1b')],[_0x8be3('0x25'),'id'])||{});}})[_0x8be3('0x26')](function(_0x53c678){logger[_0x8be3('0xe')](_0x8be3('0x27'),_0x9f8ef1);logger['debug'](_0x8be3('0x27'),_0x9f8ef1,JSON[_0x8be3('0x13')](_0x53c678));_0x2227d4(_0x53c678);})['catch'](function(_0x368ad5){logger[_0x8be3('0x14')](_0x8be3('0x27'),_0x368ad5['message'],_0x9f8ef1);_0x1db7b7(_this[_0x8be3('0x14')](0x1f4,_0x368ad5[_0x8be3('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/smsInteraction/smsInteraction.socket.js b/server/api/smsInteraction/smsInteraction.socket.js
index 7f669df..efb83c9 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 _0x0b0e=['smsInteraction:','./smsInteraction.events','remove','emit','removeListener','register'];(function(_0x243f90,_0x2d04f2){var _0x384d64=function(_0x5d05f9){while(--_0x5d05f9){_0x243f90['push'](_0x243f90['shift']());}};_0x384d64(++_0x2d04f2);}(_0x0b0e,0x187));var _0xe0b0=function(_0x189305,_0x46c43f){_0x189305=_0x189305-0x0;var _0xea3406=_0x0b0e[_0x189305];return _0xea3406;};'use strict';var SmsInteractionEvents=require(_0xe0b0('0x0'));var events=['save',_0xe0b0('0x1'),'update'];function createListener(_0x7e5a8a,_0xdf715e){return function(_0x3b5e2b){_0xdf715e[_0xe0b0('0x2')](_0x7e5a8a,_0x3b5e2b);};}function removeListener(_0x28040c,_0x38a058){return function(){SmsInteractionEvents[_0xe0b0('0x3')](_0x28040c,_0x38a058);};}exports[_0xe0b0('0x4')]=function(_0x30e20d){for(var _0x28e40f=0x0,_0x219b1c=events['length'];_0x28e40f<_0x219b1c;_0x28e40f++){var _0x50be7f=events[_0x28e40f];var _0x11effc=createListener(_0xe0b0('0x5')+_0x50be7f,_0x30e20d);SmsInteractionEvents['on'](_0x50be7f,_0x11effc);}};
\ No newline at end of file
+var _0xbaf0=['removeListener','register','length','smsInteraction:','save','remove','update'];(function(_0x5071b1,_0x1b8b7c){var _0x66cfde=function(_0x20c153){while(--_0x20c153){_0x5071b1['push'](_0x5071b1['shift']());}};_0x66cfde(++_0x1b8b7c);}(_0xbaf0,0x12a));var _0x0baf=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xbaf0[_0xa464c9];return _0x3d73c4;};'use strict';var SmsInteractionEvents=require('./smsInteraction.events');var events=[_0x0baf('0x0'),_0x0baf('0x1'),_0x0baf('0x2')];function createListener(_0x263f79,_0x1688bc){return function(_0x4d2e72){_0x1688bc['emit'](_0x263f79,_0x4d2e72);};}function removeListener(_0x232cc7,_0x1c383e){return function(){SmsInteractionEvents[_0x0baf('0x3')](_0x232cc7,_0x1c383e);};}exports[_0x0baf('0x4')]=function(_0xe4c3c4){for(var _0x335e24=0x0,_0x1a10b1=events[_0x0baf('0x5')];_0x335e24<_0x1a10b1;_0x335e24++){var _0x1d0a0d=events[_0x335e24];var _0x5f5030=createListener(_0x0baf('0x6')+_0x1d0a0d,_0xe4c3c4);SmsInteractionEvents['on'](_0x1d0a0d,_0x5f5030);}};
\ No newline at end of file
diff --git a/server/api/smsMessage/index.js b/server/api/smsMessage/index.js
index 0a1260a..15102d9 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 _0x3cd3=['path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsMessage.controller','get','isAuthenticated','index','/describe','show','post','tracked','sms','smsmessage:create','/:id/status','status','put','/:id','update','/:id/accept','accept','reject','delete','destroy','exports','multer','util'];(function(_0x22e644,_0x5411c3){var _0x2568b4=function(_0x1facd5){while(--_0x1facd5){_0x22e644['push'](_0x22e644['shift']());}};_0x2568b4(++_0x5411c3);}(_0x3cd3,0x120));var _0x33cd=function(_0x59d0d0,_0x48e386){_0x59d0d0=_0x59d0d0-0x0;var _0x2d2800=_0x3cd3[_0x59d0d0];return _0x2d2800;};'use strict';var multer=require(_0x33cd('0x0'));var util=require(_0x33cd('0x1'));var path=require(_0x33cd('0x2'));var timeout=require(_0x33cd('0x3'));var express=require(_0x33cd('0x4'));var router=express['Router']();var auth=require(_0x33cd('0x5'));var interaction=require(_0x33cd('0x6'));var config=require(_0x33cd('0x7'));var controller=require(_0x33cd('0x8'));router[_0x33cd('0x9')]('/',auth[_0x33cd('0xa')](),controller[_0x33cd('0xb')]);router[_0x33cd('0x9')](_0x33cd('0xc'),auth[_0x33cd('0xa')](),controller['describe']);router[_0x33cd('0x9')]('/:id',auth[_0x33cd('0xa')](),controller[_0x33cd('0xd')]);router[_0x33cd('0xe')]('/',auth[_0x33cd('0xa')](),interaction[_0x33cd('0xf')](_0x33cd('0x10'),_0x33cd('0x11')),controller['create']);router[_0x33cd('0xe')](_0x33cd('0x12'),controller[_0x33cd('0x13')]);router[_0x33cd('0x14')](_0x33cd('0x15'),auth[_0x33cd('0xa')](),controller[_0x33cd('0x16')]);router[_0x33cd('0x14')](_0x33cd('0x17'),auth[_0x33cd('0xa')](),controller[_0x33cd('0x18')]);router[_0x33cd('0x14')]('/:id/reject',auth[_0x33cd('0xa')](),controller[_0x33cd('0x19')]);router[_0x33cd('0x1a')](_0x33cd('0x15'),auth[_0x33cd('0xa')](),controller[_0x33cd('0x1b')]);module[_0x33cd('0x1c')]=router;
\ No newline at end of file
+var _0x459a=['post','tracked','sms','smsmessage:create','create','put','/:id/accept','accept','/:id/reject','reject','delete','destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsMessage.controller','isAuthenticated','index','get','/describe','/:id','show'];(function(_0x82129b,_0x484ae9){var _0x2ae5dc=function(_0x299e34){while(--_0x299e34){_0x82129b['push'](_0x82129b['shift']());}};_0x2ae5dc(++_0x484ae9);}(_0x459a,0x1cd));var _0xa459=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x459a[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require('multer');var util=require(_0xa459('0x0'));var path=require(_0xa459('0x1'));var timeout=require(_0xa459('0x2'));var express=require(_0xa459('0x3'));var router=express[_0xa459('0x4')]();var auth=require(_0xa459('0x5'));var interaction=require(_0xa459('0x6'));var config=require(_0xa459('0x7'));var controller=require(_0xa459('0x8'));router['get']('/',auth[_0xa459('0x9')](),controller[_0xa459('0xa')]);router[_0xa459('0xb')](_0xa459('0xc'),auth['isAuthenticated'](),controller['describe']);router['get'](_0xa459('0xd'),auth[_0xa459('0x9')](),controller[_0xa459('0xe')]);router[_0xa459('0xf')]('/',auth['isAuthenticated'](),interaction[_0xa459('0x10')](_0xa459('0x11'),_0xa459('0x12')),controller[_0xa459('0x13')]);router['post']('/:id/status',controller['status']);router[_0xa459('0x14')](_0xa459('0xd'),auth[_0xa459('0x9')](),controller['update']);router[_0xa459('0x14')](_0xa459('0x15'),auth[_0xa459('0x9')](),controller[_0xa459('0x16')]);router['put'](_0xa459('0x17'),auth[_0xa459('0x9')](),controller[_0xa459('0x18')]);router[_0xa459('0x19')](_0xa459('0xd'),auth[_0xa459('0x9')](),controller[_0xa459('0x1a')]);module[_0xa459('0x1b')]=router;
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.attributes.js b/server/api/smsMessage/smsMessage.attributes.js
index a461967..6159950 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 _0x62ed=['out','STRING','exports','TEXT','BOOLEAN','ENUM'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0x62ed,0x18e));var _0xd62e=function(_0x69d24,_0x494531){_0x69d24=_0x69d24-0x0;var _0x5d4fe2=_0x62ed[_0x69d24];return _0x5d4fe2;};'use strict';var Sequelize=require('sequelize');module[_0xd62e('0x0')]={'body':{'type':Sequelize[_0xd62e('0x1')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xd62e('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0xd62e('0x3')]('in',_0xd62e('0x4')),'defaultValue':_0xd62e('0x4'),'allowNull':![]},'messageId':{'type':Sequelize[_0xd62e('0x5')](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize[_0xd62e('0x2')],'defaultValue':![]}};
\ No newline at end of file
+var _0xa4de=['BOOLEAN','ENUM','out','STRING','DATE','sequelize','TEXT','medium'];(function(_0x1dcaec,_0x2a4344){var _0x4e9e53=function(_0x3f4388){while(--_0x3f4388){_0x1dcaec['push'](_0x1dcaec['shift']());}};_0x4e9e53(++_0x2a4344);}(_0xa4de,0x17d));var _0xea4d=function(_0x5f3e2b,_0x269bc0){_0x5f3e2b=_0x5f3e2b-0x0;var _0x13b396=_0xa4de[_0x5f3e2b];return _0x13b396;};'use strict';var Sequelize=require(_0xea4d('0x0'));module['exports']={'body':{'type':Sequelize[_0xea4d('0x1')](_0xea4d('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0xea4d('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0xea4d('0x4')]('in',_0xea4d('0x5')),'defaultValue':_0xea4d('0x5'),'allowNull':![]},'messageId':{'type':Sequelize[_0xea4d('0x6')](0xbe)},'phone':{'type':Sequelize[_0xea4d('0x6')]},'readAt':{'type':Sequelize[_0xea4d('0x7')]},'secret':{'type':Sequelize[_0xea4d('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.controller.js b/server/api/smsMessage/smsMessage.controller.js
index e37bf48..d147453 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 _0x94a1=['path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','redis','defaults','localhost','./smsMessage.socket','register','client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','catch','sendStatus','end','status','count','offset','set','Content-Range','json','apply','reject','destroy','stack','name','send','index','map','SmsMessage','rawAttributes','type','key','model','query','filters','intersection','attributes','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','keys','fields','length','find','create','update','body','params','describe','../../config/logger','sms-interactions','accept','sms','read','format','UserId','user','CmContact','Contact','get','SmsInteraction','SmsInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','SIP/%s','channel','event','EventManager','acceptmessage','agent','role','RejectMessage','rejectMessage','interface','rejectmessage','SmsAccount','SmsAccountId','debug','SmsMessage,\x20%s,\x20%s,\x20%s','twilio','MessageSid','messageId','inspect','plivo','MessageUUID','indexOf','sent','delivered','Status','SmsAccount,\x20%s,\x20%s,\x20%s','infobip','groupName','DELIVERED','html-pdf','zip-dir','request-promise','mustache','util'];(function(_0x361fb7,_0x2d5f2e){var _0xf17343=function(_0x43410c){while(--_0x43410c){_0x361fb7['push'](_0x361fb7['shift']());}};_0xf17343(++_0x2d5f2e);}(_0x94a1,0x10d));var _0x194a=function(_0x1632c2,_0x11a7ab){_0x1632c2=_0x1632c2-0x0;var _0x3781f6=_0x94a1[_0x1632c2];return _0x3781f6;};'use strict';var pdf=require(_0x194a('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x194a('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x194a('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x194a('0x3'));var util=require(_0x194a('0x4'));var path=require(_0x194a('0x5'));var sox=require(_0x194a('0x6'));var csv=require(_0x194a('0x7'));var ejs=require(_0x194a('0x8'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x194a('0x9'));var jsforce=require(_0x194a('0xa'));var deskjs=require(_0x194a('0xb'));var toCsv=require(_0x194a('0x7'));var querystring=require(_0x194a('0xc'));var Papa=require(_0x194a('0xd'));var Redis=require(_0x194a('0xe'));var authService=require(_0x194a('0xf'));var qs=require(_0x194a('0x10'));var as=require(_0x194a('0x11'));var hardwareService=require(_0x194a('0x12'));var logger=require('../../config/logger')(_0x194a('0x13'));var utils=require('../../config/utils');var config=require(_0x194a('0x14'));var db=require('../../mysqldb')['db'];config[_0x194a('0x15')]=_[_0x194a('0x16')](config['redis'],{'host':_0x194a('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x194a('0x15')]));require(_0x194a('0x18'))[_0x194a('0x19')](socket);var jayson=require('jayson/promise');var client=jayson[_0x194a('0x1a')]['http']({'port':0x232c});var client9002=jayson[_0x194a('0x1a')][_0x194a('0x1b')]({'port':0x232a});function checkPasswordPattern(_0x38d306,_0x57576f,_0x11774f){if(_0x11774f){var _0x434dc7=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x434dc7[_0x194a('0x1c')](_0x57576f)){return _0x38d306;}else{throw new db['Sequelize'][(_0x194a('0x1d'))](_0x194a('0x1e'));}}else{return _0x38d306;}}function respondWithRpcPromise(_0x2f06a8,_0x1ba83f,_0x107349,_0x197772){return new BPromise(function(_0x4a1774,_0x10e931){var _0xc7f921=_0x197772||client;return _0xc7f921['request'](_0x2f06a8,_0x107349)[_0x194a('0x1f')](function(_0x29bd98){logger[_0x194a('0x20')](_0x194a('0x21'),_0x1ba83f,_0x194a('0x22'));logger['debug']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x1ba83f,_0x194a('0x22'),JSON[_0x194a('0x23')](_0x29bd98));if(_0x29bd98['error']){if(_0x29bd98['error'][_0x194a('0x24')]===0x1f4){logger[_0x194a('0x25')](_0x194a('0x21'),_0x1ba83f,_0x29bd98[_0x194a('0x25')][_0x194a('0x26')]);return _0x10e931(_0x29bd98[_0x194a('0x25')]['message']);}logger[_0x194a('0x25')]('SmsMessage,\x20%s,\x20%s',_0x1ba83f,_0x29bd98[_0x194a('0x25')][_0x194a('0x26')]);return _0x4a1774(_0x29bd98[_0x194a('0x25')][_0x194a('0x26')]);}else{logger[_0x194a('0x20')](_0x194a('0x21'),_0x1ba83f,_0x194a('0x22'));_0x4a1774(_0x29bd98[_0x194a('0x27')][_0x194a('0x26')]);}})[_0x194a('0x28')](function(_0x476e53){logger[_0x194a('0x25')](_0x194a('0x21'),_0x1ba83f,_0x476e53);_0x10e931(_0x476e53);});});}function respondWithStatusCode(_0x3d378a,_0x1d2436){_0x1d2436=_0x1d2436||0xcc;return function(_0x14983e){if(_0x14983e){return _0x3d378a[_0x194a('0x29')](_0x1d2436);}return _0x3d378a['status'](_0x1d2436)[_0x194a('0x2a')]();};}function respondWithResult(_0x5fdb0c,_0x117b72){_0x117b72=_0x117b72||0xc8;return function(_0x4701b2){if(_0x4701b2){return _0x5fdb0c[_0x194a('0x2b')](_0x117b72)['json'](_0x4701b2);}};}function respondWithFilteredResult(_0x18d02f,_0x229957){return function(_0x23d3e3){if(_0x23d3e3){var _0x258bb7=_0x23d3e3[_0x194a('0x2c')],_0x25f283=_0x229957[_0x194a('0x2d')],_0x2374cd=_0x229957[_0x194a('0x2d')]+_0x229957['limit'],_0x506892;if(_0x2374cd>=_0x258bb7){_0x2374cd=_0x258bb7;_0x506892=0xc8;}else{_0x506892=0xce;}_0x18d02f['status'](_0x506892);return _0x18d02f[_0x194a('0x2e')](_0x194a('0x2f'),_0x25f283+'-'+_0x2374cd+'/'+_0x258bb7)[_0x194a('0x30')](_0x23d3e3);}return null;};}function patchUpdates(_0x540ff4){return function(_0x3a5ff8){try{jsonpatch[_0x194a('0x31')](_0x3a5ff8,_0x540ff4,!![]);}catch(_0x2c7e96){return BPromise[_0x194a('0x32')](_0x2c7e96);}return _0x3a5ff8['save']();};}function saveUpdates(_0x3316fb,_0x28d264){return function(_0x16ee72){if(_0x16ee72){return _0x16ee72['update'](_0x3316fb)[_0x194a('0x1f')](function(_0x4441b6){return _0x4441b6;});}return null;};}function removeEntity(_0x5df51d,_0x207449){return function(_0x12b7f6){if(_0x12b7f6){return _0x12b7f6[_0x194a('0x33')]()[_0x194a('0x1f')](function(){_0x5df51d[_0x194a('0x2b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2faf29,_0x5bcf98){return function(_0x4d3bb5){if(!_0x4d3bb5){_0x2faf29[_0x194a('0x29')](0x194);}return _0x4d3bb5;};}function handleError(_0x3ca1ba,_0x8b7f02){_0x8b7f02=_0x8b7f02||0x1f4;return function(_0x563ee7){logger[_0x194a('0x25')](_0x563ee7[_0x194a('0x34')]);if(_0x563ee7[_0x194a('0x35')]){delete _0x563ee7[_0x194a('0x35')];}_0x3ca1ba[_0x194a('0x2b')](_0x8b7f02)[_0x194a('0x36')](_0x563ee7);};}exports[_0x194a('0x37')]=function(_0x3ffbc8,_0x2f3d40){var _0x37137d={},_0x11d3dd={},_0x11d68e={'count':0x0,'rows':[]};var _0x43b677=_[_0x194a('0x38')](db[_0x194a('0x39')][_0x194a('0x3a')],function(_0x393ec2){return{'name':_0x393ec2['fieldName'],'type':_0x393ec2[_0x194a('0x3b')][_0x194a('0x3c')]};});_0x11d3dd[_0x194a('0x3d')]=_[_0x194a('0x38')](_0x43b677,'name');_0x11d3dd[_0x194a('0x3e')]=_['keys'](_0x3ffbc8[_0x194a('0x3e')]);_0x11d3dd[_0x194a('0x3f')]=_[_0x194a('0x40')](_0x11d3dd[_0x194a('0x3d')],_0x11d3dd[_0x194a('0x3e')]);_0x37137d[_0x194a('0x41')]=_[_0x194a('0x40')](_0x11d3dd[_0x194a('0x3d')],qs['fields'](_0x3ffbc8[_0x194a('0x3e')]['fields']));_0x37137d[_0x194a('0x41')]=_0x37137d['attributes']['length']?_0x37137d[_0x194a('0x41')]:_0x11d3dd[_0x194a('0x3d')];if(!_0x3ffbc8[_0x194a('0x3e')][_0x194a('0x42')](_0x194a('0x43'))){_0x37137d[_0x194a('0x44')]=qs[_0x194a('0x44')](_0x3ffbc8['query'][_0x194a('0x44')]);_0x37137d[_0x194a('0x2d')]=qs[_0x194a('0x2d')](_0x3ffbc8[_0x194a('0x3e')][_0x194a('0x2d')]);}_0x37137d[_0x194a('0x45')]=qs[_0x194a('0x46')](_0x3ffbc8[_0x194a('0x3e')]['sort']);_0x37137d[_0x194a('0x47')]=qs[_0x194a('0x3f')](_[_0x194a('0x48')](_0x3ffbc8[_0x194a('0x3e')],_0x11d3dd['filters']));if(_0x3ffbc8[_0x194a('0x3e')][_0x194a('0x49')]){_0x37137d['where']=_[_0x194a('0x4a')](_0x37137d[_0x194a('0x47')],{'$or':_[_0x194a('0x38')](_0x43b677,function(_0xe3540e){if(_0xe3540e[_0x194a('0x3b')]!=='VIRTUAL'){var _0x2e10e4={};_0x2e10e4[_0xe3540e[_0x194a('0x35')]]={'$like':'%'+_0x3ffbc8['query'][_0x194a('0x49')]+'%'};return _0x2e10e4;}})});}_0x37137d=_[_0x194a('0x4a')]({},_0x37137d,_0x3ffbc8[_0x194a('0x4b')]);var _0x4c3b2f={'where':_0x37137d[_0x194a('0x47')]};return db[_0x194a('0x39')][_0x194a('0x2c')](_0x4c3b2f)[_0x194a('0x1f')](function(_0x55b8c1){_0x11d68e['count']=_0x55b8c1;if(_0x3ffbc8[_0x194a('0x3e')][_0x194a('0x4c')]){_0x37137d[_0x194a('0x4d')]=[{'all':!![]}];}return db[_0x194a('0x39')][_0x194a('0x4e')](_0x37137d);})[_0x194a('0x1f')](function(_0x2c1d17){_0x11d68e[_0x194a('0x4f')]=_0x2c1d17;return _0x11d68e;})['then'](respondWithFilteredResult(_0x2f3d40,_0x37137d))[_0x194a('0x28')](handleError(_0x2f3d40,null));};exports['show']=function(_0x389238,_0x26d2e7){var _0x1c2e9f={'raw':!![],'where':{'id':_0x389238['params']['id']}},_0x472793={};_0x472793[_0x194a('0x3d')]=_['keys'](db[_0x194a('0x39')]['rawAttributes']);_0x472793[_0x194a('0x3e')]=_[_0x194a('0x50')](_0x389238['query']);_0x472793['filters']=_[_0x194a('0x40')](_0x472793[_0x194a('0x3d')],_0x472793[_0x194a('0x3e')]);_0x1c2e9f[_0x194a('0x41')]=_[_0x194a('0x40')](_0x472793[_0x194a('0x3d')],qs['fields'](_0x389238[_0x194a('0x3e')][_0x194a('0x51')]));_0x1c2e9f[_0x194a('0x41')]=_0x1c2e9f[_0x194a('0x41')][_0x194a('0x52')]?_0x1c2e9f[_0x194a('0x41')]:_0x472793['model'];if(_0x389238[_0x194a('0x3e')][_0x194a('0x4c')]){_0x1c2e9f[_0x194a('0x4d')]=[{'all':!![]}];}_0x1c2e9f=_['merge']({},_0x1c2e9f,_0x389238[_0x194a('0x4b')]);return db[_0x194a('0x39')][_0x194a('0x53')](_0x1c2e9f)['then'](handleEntityNotFound(_0x26d2e7,null))[_0x194a('0x1f')](respondWithResult(_0x26d2e7,null))['catch'](handleError(_0x26d2e7,null));};exports[_0x194a('0x54')]=function(_0x369cd4,_0x10bf65){return db[_0x194a('0x39')][_0x194a('0x54')](_0x369cd4['body'],{})['then'](respondWithResult(_0x10bf65,0xc9))[_0x194a('0x28')](handleError(_0x10bf65,null));};exports[_0x194a('0x55')]=function(_0x504c08,_0x246dac){if(_0x504c08[_0x194a('0x56')]['id']){delete _0x504c08['body']['id'];}return db[_0x194a('0x39')][_0x194a('0x53')]({'where':{'id':_0x504c08['params']['id']}})[_0x194a('0x1f')](handleEntityNotFound(_0x246dac,null))[_0x194a('0x1f')](saveUpdates(_0x504c08[_0x194a('0x56')],null))[_0x194a('0x1f')](respondWithResult(_0x246dac,null))[_0x194a('0x28')](handleError(_0x246dac,null));};exports[_0x194a('0x33')]=function(_0x465aed,_0x333c4c){return db[_0x194a('0x39')][_0x194a('0x53')]({'where':{'id':_0x465aed[_0x194a('0x57')]['id']}})[_0x194a('0x1f')](handleEntityNotFound(_0x333c4c,null))[_0x194a('0x1f')](removeEntity(_0x333c4c,null))[_0x194a('0x28')](handleError(_0x333c4c,null));};exports[_0x194a('0x58')]=function(_0x2f8189,_0x222717){return db[_0x194a('0x39')][_0x194a('0x58')]()[_0x194a('0x1f')](respondWithResult(_0x222717,null))[_0x194a('0x28')](handleError(_0x222717,null));};var interaction_log=require(_0x194a('0x59'))(_0x194a('0x5a'));exports[_0x194a('0x5b')]=function(_0x16e3af,_0x320371,_0x29c88e){var _0x2f3b8c={'channel':_0x194a('0x5c')};if(_0x16e3af['body']['id']){delete _0x16e3af['body']['id'];}_0x16e3af[_0x194a('0x56')][_0x194a('0x5d')]=!![];_0x16e3af['body']['readAt']=moment()[_0x194a('0x5e')]('YYYY-MM-DD\x20HH:mm:ss');_0x16e3af[_0x194a('0x56')][_0x194a('0x5f')]=_0x16e3af['body'][_0x194a('0x5f')]||_0x16e3af[_0x194a('0x60')]['id'];return db['SmsMessage']['find']({'where':{'id':_0x16e3af['params']['id'],'UserId':null},'include':[{'model':db[_0x194a('0x61')],'as':_0x194a('0x62')}]})[_0x194a('0x1f')](handleEntityNotFound(_0x320371,null))[_0x194a('0x1f')](saveUpdates(_0x16e3af[_0x194a('0x56')],null))[_0x194a('0x1f')](function(_0xa02fdc){if(_0xa02fdc){_0x2f3b8c[_0x194a('0x26')]=_0xa02fdc[_0x194a('0x63')]({'plain':!![]});return db[_0x194a('0x64')]['find']({'where':{'id':_0xa02fdc[_0x194a('0x65')]}});}return null;})[_0x194a('0x1f')](handleEntityNotFound(_0x320371,null))[_0x194a('0x1f')](function(_0x5e546d){if(_0x5e546d){return _0x5e546d[_0x194a('0x55')]({'UserId':_0x16e3af[_0x194a('0x56')][_0x194a('0x5f')],'read1stAt':_[_0x194a('0x66')](_0x5e546d[_0x194a('0x67')])?moment()[_0x194a('0x5e')](_0x194a('0x68')):undefined});}return null;})['then'](function(_0x26b1c1){if(_0x26b1c1){_0x2f3b8c[_0x194a('0x69')]=_0x26b1c1['get']({'plain':!![]});interaction_log[_0x194a('0x20')](_0x194a('0x6a'),_0x16e3af[_0x194a('0x60')]['id'],_0x16e3af['user'][_0x194a('0x35')],_0x16e3af[_0x194a('0x60')]['role'],_0x2f3b8c[_0x194a('0x69')]['id'],_0x16e3af[_0x194a('0x56')]?JSON[_0x194a('0x23')](_0x16e3af[_0x194a('0x56')]):_0x194a('0x6b'));return respondWithRpcPromise('AcceptMessage','acceptMessage',_0x2f3b8c);}return null;})['then'](function(_0x48a4a7){if(_0x48a4a7){if(_0x16e3af[_0x194a('0x56')]['manual']){_0x2f3b8c[_0x194a('0x26')]['interface']=util[_0x194a('0x5e')](_0x194a('0x6c'),_0x16e3af[_0x194a('0x60')]['name']);_0x2f3b8c['message'][_0x194a('0x6d')]=_0x2f3b8c[_0x194a('0x6d')];_0x2f3b8c[_0x194a('0x26')][_0x194a('0x6e')]=_0x194a('0x5b');return respondWithRpcPromise('EventManager',_0x194a('0x6f'),{'event':_0x194a('0x70'),'message':_0x2f3b8c[_0x194a('0x26')]},client9002)[_0x194a('0x1f')](function(){return _0x2f3b8c;});}return _0x2f3b8c;}return null;})[_0x194a('0x1f')](respondWithResult(_0x320371,null))[_0x194a('0x28')](handleError(_0x320371,null));};var interaction_log=require(_0x194a('0x59'))(_0x194a('0x5a'));exports[_0x194a('0x32')]=function(_0x26828,_0x3bc8f6,_0x21635d){var _0x61f1a7={'agent':{},'channel':_0x194a('0x5c')};if(_0x26828[_0x194a('0x56')]['id']){delete _0x26828['body']['id'];}_0x26828[_0x194a('0x56')][_0x194a('0x5f')]=_0x26828['body'][_0x194a('0x5f')]||_0x26828[_0x194a('0x60')]['id'];_0x61f1a7[_0x194a('0x71')]['id']=_0x26828[_0x194a('0x56')][_0x194a('0x5f')];return db[_0x194a('0x39')][_0x194a('0x53')]({'where':{'id':_0x26828[_0x194a('0x57')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x3bc8f6,null))[_0x194a('0x1f')](function(_0x196fbd){if(_0x196fbd){_0x61f1a7[_0x194a('0x26')]=_0x196fbd[_0x194a('0x63')]({'plain':!![]});return db[_0x194a('0x64')][_0x194a('0x53')]({'where':{'id':_0x196fbd[_0x194a('0x65')]}});}return null;})['then'](handleEntityNotFound(_0x3bc8f6,null))[_0x194a('0x1f')](function(_0x513079){if(_0x513079){_0x61f1a7[_0x194a('0x69')]=_0x513079['get']({'plain':!![]});interaction_log[_0x194a('0x20')]('[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x26828[_0x194a('0x60')]['id'],_0x26828[_0x194a('0x60')][_0x194a('0x35')],_0x26828[_0x194a('0x60')][_0x194a('0x72')],_0x61f1a7[_0x194a('0x69')]['id'],_0x26828[_0x194a('0x56')]?JSON['stringify'](_0x26828[_0x194a('0x56')]):_0x194a('0x6b'));return respondWithRpcPromise(_0x194a('0x73'),_0x194a('0x74'),_0x61f1a7);}return null;})[_0x194a('0x1f')](function(_0xfabe1d){if(_0xfabe1d){_0xfabe1d['message'][_0x194a('0x75')]=util['format'](_0x194a('0x6c'),_0x26828[_0x194a('0x60')][_0x194a('0x35')]);_0xfabe1d[_0x194a('0x26')][_0x194a('0x6d')]=_0x61f1a7[_0x194a('0x6d')];_0xfabe1d[_0x194a('0x26')]['event']=_0x194a('0x32');respondWithRpcPromise(_0x194a('0x6f'),_0x194a('0x6f'),{'event':_0x194a('0x76'),'message':_0xfabe1d[_0x194a('0x26')]},client9002);return _0x61f1a7;}return null;})[_0x194a('0x1f')](respondWithResult(_0x3bc8f6,null))['catch'](handleError(_0x3bc8f6,null));};exports[_0x194a('0x2b')]=function(_0x1bb991,_0x3c6587,_0x3acb1b){if(_0x1bb991[_0x194a('0x56')]['id']){delete _0x1bb991[_0x194a('0x56')]['id'];}var _0x5dac42;return db[_0x194a('0x39')][_0x194a('0x53')]({'where':{'id':_0x1bb991[_0x194a('0x57')]['id']}})[_0x194a('0x1f')](handleEntityNotFound(_0x3c6587,null))[_0x194a('0x1f')](function(_0x14d976){if(_0x14d976){_0x5dac42=_0x14d976;return db[_0x194a('0x77')][_0x194a('0x53')]({'where':{'id':_0x14d976[_0x194a('0x78')]}});}})[_0x194a('0x1f')](handleEntityNotFound(_0x3c6587,null))['then'](function(_0xd48406){if(_0xd48406){logger[_0x194a('0x79')](_0x194a('0x7a'),_0x194a('0x2b'),'received\x20delivery\x20report\x20from',_0xd48406[_0x194a('0x3b')],util['inspect'](_0x1bb991[_0x194a('0x56')],{'showHidden':![],'depth':null}));switch(_0xd48406['type']){case _0x194a('0x7b'):if(_0x1bb991[_0x194a('0x56')][_0x194a('0x7c')]&&_0x1bb991['body']['MessageSid']===_0x5dac42[_0x194a('0x7d')]){return _0x5dac42[_0x194a('0x55')]({'read':!![]});}else{logger[_0x194a('0x25')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x194a('0x2b'),'twilio',util[_0x194a('0x7e')](_0x1bb991['body'],{'showHidden':![],'depth':null}));}break;case _0x194a('0x7f'):if(_0x1bb991['body'][_0x194a('0x80')]&&_0x1bb991[_0x194a('0x56')]['MessageUUID']===_0x5dac42['messageId']&&_[_0x194a('0x81')]([_0x194a('0x82'),_0x194a('0x83')],_0x1bb991['body'][_0x194a('0x84')])>=0x0){return _0x5dac42[_0x194a('0x55')]({'read':!![]});}else{logger[_0x194a('0x25')](_0x194a('0x85'),_0x194a('0x2b'),'plivio',util[_0x194a('0x7e')](_0x1bb991[_0x194a('0x56')],{'showHidden':![],'depth':null}));}break;case _0x194a('0x86'):var _0x5ec448=_0x1bb991[_0x194a('0x56')]['results'][0x0];if(_0x5ec448[_0x194a('0x2b')][_0x194a('0x87')]===_0x194a('0x88')){return _0x5dac42[_0x194a('0x55')]({'read':!![]});}else{logger[_0x194a('0x25')](_0x194a('0x85'),_0x194a('0x2b'),_0x194a('0x86'),util[_0x194a('0x7e')](_0x1bb991[_0x194a('0x56')],{'showHidden':![],'depth':null}));}break;}return _0x5dac42;}})[_0x194a('0x1f')](respondWithResult(_0x3c6587,null))[_0x194a('0x28')](handleError(_0x3c6587,null));};
\ No newline at end of file
+var _0x522c=['ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','redis','defaults','socket.io-emitter','jayson/promise','client','test','Sequelize','ValidationError','request','info','SmsMessage,\x20%s,\x20%s','request\x20sent','SmsMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','count','limit','set','Content-Range','apply','reject','save','destroy','then','stack','name','send','index','SmsMessage','rawAttributes','fieldName','key','map','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','offset','order','sort','where','pick','filter','merge','options','include','findAll','show','filters','includeAll','create','body','update','find','params','describe','sms-interactions','read','readAt','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','Contact','get','SmsInteraction','SmsInteractionId','isNil','read1stAt','format','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','interaction','null','AcceptMessage','acceptMessage','interface','SIP/%s','channel','event','accept','EventManager','sms','agent','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectmessage','SmsAccountId','received\x20delivery\x20report\x20from','type','inspect','twilio','MessageSid','messageId','SmsAccount,\x20%s,\x20%s,\x20%s','plivo','MessageUUID','indexOf','sent','Status','plivio','infobip','results','groupName','DELIVERED','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse'];(function(_0xebe00a,_0x3a64c8){var _0x4461a1=function(_0x1ee923){while(--_0x1ee923){_0xebe00a['push'](_0xebe00a['shift']());}};_0x4461a1(++_0x3a64c8);}(_0x522c,0x7b));var _0xc522=function(_0x25e485,_0x52ce1e){_0x25e485=_0x25e485-0x0;var _0x1be5c4=_0x522c[_0x25e485];return _0x1be5c4;};'use strict';var pdf=require(_0xc522('0x0'));var emlformat=require(_0xc522('0x1'));var rimraf=require(_0xc522('0x2'));var zipdir=require(_0xc522('0x3'));var jsonpatch=require(_0xc522('0x4'));var rp=require(_0xc522('0x5'));var moment=require(_0xc522('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xc522('0x7'));var util=require(_0xc522('0x8'));var path=require(_0xc522('0x9'));var sox=require(_0xc522('0xa'));var csv=require(_0xc522('0xb'));var ejs=require(_0xc522('0xc'));var fs=require('fs');var _=require(_0xc522('0xd'));var squel=require(_0xc522('0xe'));var crypto=require(_0xc522('0xf'));var jsforce=require(_0xc522('0x10'));var deskjs=require(_0xc522('0x11'));var toCsv=require('to-csv');var querystring=require(_0xc522('0x12'));var Papa=require(_0xc522('0x13'));var Redis=require(_0xc522('0x14'));var authService=require(_0xc522('0x15'));var qs=require(_0xc522('0x16'));var as=require(_0xc522('0x17'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc522('0x18'))(_0xc522('0x19'));var utils=require(_0xc522('0x1a'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0xc522('0x1b')]=_[_0xc522('0x1c')](config[_0xc522('0x1b')],{'host':'localhost','port':0x18eb});var socket=require(_0xc522('0x1d'))(new Redis(config[_0xc522('0x1b')]));require('./smsMessage.socket')['register'](socket);var jayson=require(_0xc522('0x1e'));var client=jayson[_0xc522('0x1f')]['http']({'port':0x232c});var client9002=jayson[_0xc522('0x1f')]['http']({'port':0x232a});function checkPasswordPattern(_0x37d2ce,_0x476ac3,_0x5b46f1){if(_0x5b46f1){var _0x30e027=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x30e027[_0xc522('0x20')](_0x476ac3)){return _0x37d2ce;}else{throw new db[(_0xc522('0x21'))][(_0xc522('0x22'))]('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 _0x37d2ce;}}function respondWithRpcPromise(_0xd14d79,_0x4cf4a9,_0x593b47,_0x1b4364){return new BPromise(function(_0x129cb1,_0x32e7ac){var _0x47c102=_0x1b4364||client;return _0x47c102[_0xc522('0x23')](_0xd14d79,_0x593b47)['then'](function(_0x5db758){logger[_0xc522('0x24')](_0xc522('0x25'),_0x4cf4a9,_0xc522('0x26'));logger['debug'](_0xc522('0x27'),_0x4cf4a9,_0xc522('0x26'),JSON[_0xc522('0x28')](_0x5db758));if(_0x5db758[_0xc522('0x29')]){if(_0x5db758[_0xc522('0x29')][_0xc522('0x2a')]===0x1f4){logger[_0xc522('0x29')](_0xc522('0x25'),_0x4cf4a9,_0x5db758[_0xc522('0x29')][_0xc522('0x2b')]);return _0x32e7ac(_0x5db758[_0xc522('0x29')][_0xc522('0x2b')]);}logger[_0xc522('0x29')](_0xc522('0x25'),_0x4cf4a9,_0x5db758[_0xc522('0x29')]['message']);return _0x129cb1(_0x5db758[_0xc522('0x29')][_0xc522('0x2b')]);}else{logger[_0xc522('0x24')](_0xc522('0x25'),_0x4cf4a9,_0xc522('0x26'));_0x129cb1(_0x5db758[_0xc522('0x2c')][_0xc522('0x2b')]);}})[_0xc522('0x2d')](function(_0x497e67){logger[_0xc522('0x29')](_0xc522('0x25'),_0x4cf4a9,_0x497e67);_0x32e7ac(_0x497e67);});});}function respondWithStatusCode(_0x3ec584,_0x59d4a4){_0x59d4a4=_0x59d4a4||0xcc;return function(_0x290655){if(_0x290655){return _0x3ec584[_0xc522('0x2e')](_0x59d4a4);}return _0x3ec584[_0xc522('0x2f')](_0x59d4a4)[_0xc522('0x30')]();};}function respondWithResult(_0x20ea6a,_0x43340a){_0x43340a=_0x43340a||0xc8;return function(_0x2ce3f5){if(_0x2ce3f5){return _0x20ea6a[_0xc522('0x2f')](_0x43340a)[_0xc522('0x31')](_0x2ce3f5);}};}function respondWithFilteredResult(_0x5012b2,_0x34a125){return function(_0x17fbd0){if(_0x17fbd0){var _0x505ae9=_0x17fbd0[_0xc522('0x32')],_0x28e942=_0x34a125['offset'],_0xa6cb89=_0x34a125['offset']+_0x34a125[_0xc522('0x33')],_0x2a8eaf;if(_0xa6cb89>=_0x505ae9){_0xa6cb89=_0x505ae9;_0x2a8eaf=0xc8;}else{_0x2a8eaf=0xce;}_0x5012b2[_0xc522('0x2f')](_0x2a8eaf);return _0x5012b2[_0xc522('0x34')](_0xc522('0x35'),_0x28e942+'-'+_0xa6cb89+'/'+_0x505ae9)[_0xc522('0x31')](_0x17fbd0);}return null;};}function patchUpdates(_0x1c999a){return function(_0x49e84d){try{jsonpatch[_0xc522('0x36')](_0x49e84d,_0x1c999a,!![]);}catch(_0x394371){return BPromise[_0xc522('0x37')](_0x394371);}return _0x49e84d[_0xc522('0x38')]();};}function saveUpdates(_0x4c8e11,_0x169859){return function(_0x8f53e0){if(_0x8f53e0){return _0x8f53e0['update'](_0x4c8e11)['then'](function(_0xa20f7b){return _0xa20f7b;});}return null;};}function removeEntity(_0x5b53f5,_0x4ebb80){return function(_0x32ab0d){if(_0x32ab0d){return _0x32ab0d[_0xc522('0x39')]()[_0xc522('0x3a')](function(){_0x5b53f5['status'](0xcc)[_0xc522('0x30')]();});}};}function handleEntityNotFound(_0x13204a,_0x5e649a){return function(_0x495b45){if(!_0x495b45){_0x13204a[_0xc522('0x2e')](0x194);}return _0x495b45;};}function handleError(_0x501da2,_0x345422){_0x345422=_0x345422||0x1f4;return function(_0x580eed){logger[_0xc522('0x29')](_0x580eed[_0xc522('0x3b')]);if(_0x580eed[_0xc522('0x3c')]){delete _0x580eed[_0xc522('0x3c')];}_0x501da2[_0xc522('0x2f')](_0x345422)[_0xc522('0x3d')](_0x580eed);};}exports[_0xc522('0x3e')]=function(_0x229ca7,_0x109bf0){var _0x245748={},_0x263ee0={},_0x172ddc={'count':0x0,'rows':[]};var _0x5f30f2=_['map'](db[_0xc522('0x3f')][_0xc522('0x40')],function(_0xbd46fc){return{'name':_0xbd46fc[_0xc522('0x41')],'type':_0xbd46fc['type'][_0xc522('0x42')]};});_0x263ee0['model']=_[_0xc522('0x43')](_0x5f30f2,_0xc522('0x3c'));_0x263ee0[_0xc522('0x44')]=_[_0xc522('0x45')](_0x229ca7['query']);_0x263ee0['filters']=_[_0xc522('0x46')](_0x263ee0[_0xc522('0x47')],_0x263ee0['query']);_0x245748[_0xc522('0x48')]=_[_0xc522('0x46')](_0x263ee0[_0xc522('0x47')],qs['fields'](_0x229ca7[_0xc522('0x44')][_0xc522('0x49')]));_0x245748[_0xc522('0x48')]=_0x245748[_0xc522('0x48')][_0xc522('0x4a')]?_0x245748['attributes']:_0x263ee0[_0xc522('0x47')];if(!_0x229ca7['query'][_0xc522('0x4b')]('nolimit')){_0x245748[_0xc522('0x33')]=qs[_0xc522('0x33')](_0x229ca7[_0xc522('0x44')][_0xc522('0x33')]);_0x245748[_0xc522('0x4c')]=qs[_0xc522('0x4c')](_0x229ca7[_0xc522('0x44')][_0xc522('0x4c')]);}_0x245748[_0xc522('0x4d')]=qs[_0xc522('0x4e')](_0x229ca7[_0xc522('0x44')][_0xc522('0x4e')]);_0x245748[_0xc522('0x4f')]=qs['filters'](_[_0xc522('0x50')](_0x229ca7['query'],_0x263ee0['filters']));if(_0x229ca7['query'][_0xc522('0x51')]){_0x245748[_0xc522('0x4f')]=_['merge'](_0x245748[_0xc522('0x4f')],{'$or':_[_0xc522('0x43')](_0x5f30f2,function(_0x108c72){if(_0x108c72['type']!=='VIRTUAL'){var _0x580719={};_0x580719[_0x108c72['name']]={'$like':'%'+_0x229ca7['query'][_0xc522('0x51')]+'%'};return _0x580719;}})});}_0x245748=_[_0xc522('0x52')]({},_0x245748,_0x229ca7[_0xc522('0x53')]);var _0x5d7077={'where':_0x245748[_0xc522('0x4f')]};return db['SmsMessage'][_0xc522('0x32')](_0x5d7077)['then'](function(_0x22b0b3){_0x172ddc['count']=_0x22b0b3;if(_0x229ca7[_0xc522('0x44')]['includeAll']){_0x245748[_0xc522('0x54')]=[{'all':!![]}];}return db[_0xc522('0x3f')][_0xc522('0x55')](_0x245748);})[_0xc522('0x3a')](function(_0x48d7bc){_0x172ddc['rows']=_0x48d7bc;return _0x172ddc;})['then'](respondWithFilteredResult(_0x109bf0,_0x245748))[_0xc522('0x2d')](handleError(_0x109bf0,null));};exports[_0xc522('0x56')]=function(_0x122c2a,_0x4616f0){var _0x4608ae={'raw':!![],'where':{'id':_0x122c2a['params']['id']}},_0x2a811c={};_0x2a811c[_0xc522('0x47')]=_[_0xc522('0x45')](db['SmsMessage'][_0xc522('0x40')]);_0x2a811c[_0xc522('0x44')]=_[_0xc522('0x45')](_0x122c2a[_0xc522('0x44')]);_0x2a811c[_0xc522('0x57')]=_[_0xc522('0x46')](_0x2a811c[_0xc522('0x47')],_0x2a811c[_0xc522('0x44')]);_0x4608ae[_0xc522('0x48')]=_['intersection'](_0x2a811c[_0xc522('0x47')],qs[_0xc522('0x49')](_0x122c2a[_0xc522('0x44')]['fields']));_0x4608ae[_0xc522('0x48')]=_0x4608ae[_0xc522('0x48')][_0xc522('0x4a')]?_0x4608ae['attributes']:_0x2a811c[_0xc522('0x47')];if(_0x122c2a[_0xc522('0x44')][_0xc522('0x58')]){_0x4608ae[_0xc522('0x54')]=[{'all':!![]}];}_0x4608ae=_[_0xc522('0x52')]({},_0x4608ae,_0x122c2a[_0xc522('0x53')]);return db[_0xc522('0x3f')]['find'](_0x4608ae)[_0xc522('0x3a')](handleEntityNotFound(_0x4616f0,null))['then'](respondWithResult(_0x4616f0,null))[_0xc522('0x2d')](handleError(_0x4616f0,null));};exports[_0xc522('0x59')]=function(_0x504688,_0x31f6cc){return db['SmsMessage']['create'](_0x504688[_0xc522('0x5a')],{})[_0xc522('0x3a')](respondWithResult(_0x31f6cc,0xc9))[_0xc522('0x2d')](handleError(_0x31f6cc,null));};exports[_0xc522('0x5b')]=function(_0x23b92b,_0x3f9847){if(_0x23b92b[_0xc522('0x5a')]['id']){delete _0x23b92b['body']['id'];}return db['SmsMessage'][_0xc522('0x5c')]({'where':{'id':_0x23b92b[_0xc522('0x5d')]['id']}})[_0xc522('0x3a')](handleEntityNotFound(_0x3f9847,null))[_0xc522('0x3a')](saveUpdates(_0x23b92b[_0xc522('0x5a')],null))[_0xc522('0x3a')](respondWithResult(_0x3f9847,null))[_0xc522('0x2d')](handleError(_0x3f9847,null));};exports[_0xc522('0x39')]=function(_0x299cf1,_0x2fbba5){return db[_0xc522('0x3f')][_0xc522('0x5c')]({'where':{'id':_0x299cf1[_0xc522('0x5d')]['id']}})[_0xc522('0x3a')](handleEntityNotFound(_0x2fbba5,null))[_0xc522('0x3a')](removeEntity(_0x2fbba5,null))[_0xc522('0x2d')](handleError(_0x2fbba5,null));};exports[_0xc522('0x5e')]=function(_0x283b5c,_0x3a7c57){return db['SmsMessage']['describe']()[_0xc522('0x3a')](respondWithResult(_0x3a7c57,null))['catch'](handleError(_0x3a7c57,null));};var interaction_log=require(_0xc522('0x18'))(_0xc522('0x5f'));exports['accept']=function(_0x40e661,_0x5a19f4,_0x3adb20){var _0x493264={'channel':'sms'};if(_0x40e661[_0xc522('0x5a')]['id']){delete _0x40e661[_0xc522('0x5a')]['id'];}_0x40e661[_0xc522('0x5a')][_0xc522('0x60')]=!![];_0x40e661['body'][_0xc522('0x61')]=moment()['format'](_0xc522('0x62'));_0x40e661[_0xc522('0x5a')][_0xc522('0x63')]=_0x40e661[_0xc522('0x5a')][_0xc522('0x63')]||_0x40e661[_0xc522('0x64')]['id'];return db[_0xc522('0x3f')]['find']({'where':{'id':_0x40e661[_0xc522('0x5d')]['id'],'UserId':null},'include':[{'model':db[_0xc522('0x65')],'as':_0xc522('0x66')}]})[_0xc522('0x3a')](handleEntityNotFound(_0x5a19f4,null))[_0xc522('0x3a')](saveUpdates(_0x40e661[_0xc522('0x5a')],null))['then'](function(_0xba0764){if(_0xba0764){_0x493264['message']=_0xba0764[_0xc522('0x67')]({'plain':!![]});return db[_0xc522('0x68')][_0xc522('0x5c')]({'where':{'id':_0xba0764[_0xc522('0x69')]}});}return null;})['then'](handleEntityNotFound(_0x5a19f4,null))[_0xc522('0x3a')](function(_0x2ea07c){if(_0x2ea07c){return _0x2ea07c[_0xc522('0x5b')]({'UserId':_0x40e661[_0xc522('0x5a')][_0xc522('0x63')],'read1stAt':_[_0xc522('0x6a')](_0x2ea07c[_0xc522('0x6b')])?moment()[_0xc522('0x6c')](_0xc522('0x62')):undefined});}return null;})['then'](function(_0x50db7b){if(_0x50db7b){_0x493264['interaction']=_0x50db7b[_0xc522('0x67')]({'plain':!![]});interaction_log[_0xc522('0x24')](_0xc522('0x6d'),_0x40e661['user']['id'],_0x40e661[_0xc522('0x64')][_0xc522('0x3c')],_0x40e661[_0xc522('0x64')]['role'],_0x493264[_0xc522('0x6e')]['id'],_0x40e661[_0xc522('0x5a')]?JSON['stringify'](_0x40e661['body']):_0xc522('0x6f'));return respondWithRpcPromise(_0xc522('0x70'),_0xc522('0x71'),_0x493264);}return null;})['then'](function(_0xfafb3d){if(_0xfafb3d){if(_0x40e661[_0xc522('0x5a')]['manual']){_0x493264[_0xc522('0x2b')][_0xc522('0x72')]=util[_0xc522('0x6c')](_0xc522('0x73'),_0x40e661[_0xc522('0x64')]['name']);_0x493264[_0xc522('0x2b')][_0xc522('0x74')]=_0x493264[_0xc522('0x74')];_0x493264[_0xc522('0x2b')][_0xc522('0x75')]=_0xc522('0x76');return respondWithRpcPromise('EventManager',_0xc522('0x77'),{'event':'acceptmessage','message':_0x493264[_0xc522('0x2b')]},client9002)[_0xc522('0x3a')](function(){return _0x493264;});}return _0x493264;}return null;})[_0xc522('0x3a')](respondWithResult(_0x5a19f4,null))[_0xc522('0x2d')](handleError(_0x5a19f4,null));};var interaction_log=require('../../config/logger')('sms-interactions');exports[_0xc522('0x37')]=function(_0x1b2097,_0xf18848,_0x3d5805){var _0x35d1a9={'agent':{},'channel':_0xc522('0x78')};if(_0x1b2097[_0xc522('0x5a')]['id']){delete _0x1b2097['body']['id'];}_0x1b2097[_0xc522('0x5a')][_0xc522('0x63')]=_0x1b2097['body'][_0xc522('0x63')]||_0x1b2097[_0xc522('0x64')]['id'];_0x35d1a9[_0xc522('0x79')]['id']=_0x1b2097[_0xc522('0x5a')]['UserId'];return db[_0xc522('0x3f')][_0xc522('0x5c')]({'where':{'id':_0x1b2097[_0xc522('0x5d')]['id'],'UserId':null}})[_0xc522('0x3a')](handleEntityNotFound(_0xf18848,null))[_0xc522('0x3a')](function(_0x3f2248){if(_0x3f2248){_0x35d1a9[_0xc522('0x2b')]=_0x3f2248[_0xc522('0x67')]({'plain':!![]});return db[_0xc522('0x68')][_0xc522('0x5c')]({'where':{'id':_0x3f2248[_0xc522('0x69')]}});}return null;})['then'](handleEntityNotFound(_0xf18848,null))[_0xc522('0x3a')](function(_0x4c803d){if(_0x4c803d){_0x35d1a9[_0xc522('0x6e')]=_0x4c803d['get']({'plain':!![]});interaction_log[_0xc522('0x24')](_0xc522('0x7a'),_0x1b2097[_0xc522('0x64')]['id'],_0x1b2097[_0xc522('0x64')][_0xc522('0x3c')],_0x1b2097['user']['role'],_0x35d1a9[_0xc522('0x6e')]['id'],_0x1b2097[_0xc522('0x5a')]?JSON[_0xc522('0x28')](_0x1b2097[_0xc522('0x5a')]):_0xc522('0x6f'));return respondWithRpcPromise(_0xc522('0x7b'),'rejectMessage',_0x35d1a9);}return null;})[_0xc522('0x3a')](function(_0x3a8d58){if(_0x3a8d58){_0x3a8d58[_0xc522('0x2b')][_0xc522('0x72')]=util[_0xc522('0x6c')](_0xc522('0x73'),_0x1b2097[_0xc522('0x64')][_0xc522('0x3c')]);_0x3a8d58[_0xc522('0x2b')][_0xc522('0x74')]=_0x35d1a9['channel'];_0x3a8d58[_0xc522('0x2b')][_0xc522('0x75')]=_0xc522('0x37');respondWithRpcPromise(_0xc522('0x77'),'EventManager',{'event':_0xc522('0x7c'),'message':_0x3a8d58['message']},client9002);return _0x35d1a9;}return null;})[_0xc522('0x3a')](respondWithResult(_0xf18848,null))[_0xc522('0x2d')](handleError(_0xf18848,null));};exports[_0xc522('0x2f')]=function(_0x590c17,_0x742e62,_0x2ca4f0){if(_0x590c17[_0xc522('0x5a')]['id']){delete _0x590c17[_0xc522('0x5a')]['id'];}var _0x26c177;return db['SmsMessage'][_0xc522('0x5c')]({'where':{'id':_0x590c17[_0xc522('0x5d')]['id']}})[_0xc522('0x3a')](handleEntityNotFound(_0x742e62,null))['then'](function(_0x3dcb04){if(_0x3dcb04){_0x26c177=_0x3dcb04;return db['SmsAccount']['find']({'where':{'id':_0x3dcb04[_0xc522('0x7d')]}});}})[_0xc522('0x3a')](handleEntityNotFound(_0x742e62,null))[_0xc522('0x3a')](function(_0x1a8340){if(_0x1a8340){logger['debug'](_0xc522('0x27'),_0xc522('0x2f'),_0xc522('0x7e'),_0x1a8340[_0xc522('0x7f')],util[_0xc522('0x80')](_0x590c17[_0xc522('0x5a')],{'showHidden':![],'depth':null}));switch(_0x1a8340[_0xc522('0x7f')]){case _0xc522('0x81'):if(_0x590c17[_0xc522('0x5a')][_0xc522('0x82')]&&_0x590c17[_0xc522('0x5a')][_0xc522('0x82')]===_0x26c177[_0xc522('0x83')]){return _0x26c177[_0xc522('0x5b')]({'read':!![]});}else{logger[_0xc522('0x29')](_0xc522('0x84'),_0xc522('0x2f'),_0xc522('0x81'),util[_0xc522('0x80')](_0x590c17['body'],{'showHidden':![],'depth':null}));}break;case _0xc522('0x85'):if(_0x590c17['body'][_0xc522('0x86')]&&_0x590c17['body']['MessageUUID']===_0x26c177[_0xc522('0x83')]&&_[_0xc522('0x87')]([_0xc522('0x88'),'delivered'],_0x590c17[_0xc522('0x5a')][_0xc522('0x89')])>=0x0){return _0x26c177[_0xc522('0x5b')]({'read':!![]});}else{logger[_0xc522('0x29')](_0xc522('0x84'),_0xc522('0x2f'),_0xc522('0x8a'),util[_0xc522('0x80')](_0x590c17[_0xc522('0x5a')],{'showHidden':![],'depth':null}));}break;case _0xc522('0x8b'):var _0x34d34d=_0x590c17[_0xc522('0x5a')][_0xc522('0x8c')][0x0];if(_0x34d34d['status'][_0xc522('0x8d')]===_0xc522('0x8e')){return _0x26c177[_0xc522('0x5b')]({'read':!![]});}else{logger['error'](_0xc522('0x84'),'status',_0xc522('0x8b'),util['inspect'](_0x590c17[_0xc522('0x5a')],{'showHidden':![],'depth':null}));}break;}return _0x26c177;}})[_0xc522('0x3a')](respondWithResult(_0x742e62,null))[_0xc522('0x2d')](handleError(_0x742e62,null));};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.events.js b/server/api/smsMessage/smsMessage.events.js
index 9a7cfb2..d09efdc 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 _0x5757=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','SmsMessage'];(function(_0x4151d2,_0x67d4a1){var _0x5804d2=function(_0x9b5efb){while(--_0x9b5efb){_0x4151d2['push'](_0x4151d2['shift']());}};_0x5804d2(++_0x67d4a1);}(_0x5757,0x120));var _0x7575=function(_0x3dfb6c,_0x3b9781){_0x3dfb6c=_0x3dfb6c-0x0;var _0x494cbd=_0x5757[_0x3dfb6c];return _0x494cbd;};'use strict';var EventEmitter=require(_0x7575('0x0'));var SmsMessage=require('../../mysqldb')['db'][_0x7575('0x1')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x7575('0x2')](0x0);var events={'afterCreate':_0x7575('0x3'),'afterUpdate':_0x7575('0x4'),'afterDestroy':_0x7575('0x5')};function emitEvent(_0x595c14){return function(_0x15d521,_0x53500c,_0x4a3441){SmsMessageEvents['emit'](_0x595c14+':'+_0x15d521['id'],_0x15d521);SmsMessageEvents[_0x7575('0x6')](_0x595c14,_0x15d521);_0x4a3441(null);};}for(var e in events){if(events[_0x7575('0x7')](e)){var event=events[e];SmsMessage[_0x7575('0x8')](e,emitEvent(event));}}module[_0x7575('0x9')]=SmsMessageEvents;
\ No newline at end of file
+var _0x2a9b=['remove','emit','hasOwnProperty','hook','exports','events','SmsMessage','save','update'];(function(_0xa778b9,_0x1f42cd){var _0x26cc6f=function(_0x4ab5d2){while(--_0x4ab5d2){_0xa778b9['push'](_0xa778b9['shift']());}};_0x26cc6f(++_0x1f42cd);}(_0x2a9b,0x8c));var _0xb2a9=function(_0xbdbe62,_0xca0b27){_0xbdbe62=_0xbdbe62-0x0;var _0x4ae09a=_0x2a9b[_0xbdbe62];return _0x4ae09a;};'use strict';var EventEmitter=require(_0xb2a9('0x0'));var SmsMessage=require('../../mysqldb')['db'][_0xb2a9('0x1')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb2a9('0x2'),'afterUpdate':_0xb2a9('0x3'),'afterDestroy':_0xb2a9('0x4')};function emitEvent(_0x4ac73c){return function(_0x3c1246,_0x568709,_0x488bef){SmsMessageEvents['emit'](_0x4ac73c+':'+_0x3c1246['id'],_0x3c1246);SmsMessageEvents[_0xb2a9('0x5')](_0x4ac73c,_0x3c1246);_0x488bef(null);};}for(var e in events){if(events[_0xb2a9('0x6')](e)){var event=events[e];SmsMessage[_0xb2a9('0x7')](e,emitEvent(event));}}module[_0xb2a9('0x8')]=SmsMessageEvents;
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.model.js b/server/api/smsMessage/smsMessage.model.js
index 9878939..d5d26e5 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 _0x215c=['clickatell','https://platform.clickatell.com/messages','apiMessageId','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','code','message','https://api.intelepeer.com/_rest/v4/app/sms/mdr','status','intelepeer','finally','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./smsMessage.attributes','exports','define','SmsMessage','messageId','fti_sms_messages','FULLTEXT','models','get','out','isNil','UserId','SmsInteraction','findOne','then','update','createdAt','direction','toLowerCase','catch','secret','find','SmsAccountId','type','twilio','authToken','messages','body','phone','remote','/api/sms/messages/','/status?token=','sid','error','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','sender','login?username=','&password=','split','sms','session_key','total_sent','internal_order_id','deliveryReport','Missing\x20parameters:\x20username,\x20password','senderString','requestid','connectel','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion','format','%s:%s','POST','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','base64','http_code','data','queued_count','head','message_id','read','clickSend','plivo','authId','token','https://api.plivo.com/v1/Account/%s/Message/','toString','message_uuid','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','crypto','apiKey','text','timestamp','sort','md5','digest','signature=','GET','keys','id_sms','csc','Missing\x20parameters:\x20apiKey'];(function(_0x3d483c,_0xd0b1dc){var _0x35a4a1=function(_0x97f28f){while(--_0x97f28f){_0x3d483c['push'](_0x3d483c['shift']());}};_0x35a4a1(++_0xd0b1dc);}(_0x215c,0x1d9));var _0xc215=function(_0x1e2079,_0x289067){_0x1e2079=_0x1e2079-0x0;var _0x5ab0e7=_0x215c[_0x1e2079];return _0x5ab0e7;};'use strict';var _=require(_0xc215('0x0'));var util=require('util');var logger=require(_0xc215('0x1'))('api');var moment=require(_0xc215('0x2'));var BPromise=require(_0xc215('0x3'));var rp=require(_0xc215('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc215('0x5'));var config=require(_0xc215('0x6'));var attributes=require(_0xc215('0x7'));module[_0xc215('0x8')]=function(_0x2e2dd7,_0x19a790){return _0x2e2dd7[_0xc215('0x9')](_0xc215('0xa'),attributes,{'tableName':'sms_messages','paranoid':![],'indexes':[{'name':_0xc215('0xb'),'fields':[_0xc215('0xb')]},{'name':_0xc215('0xc'),'fields':['body'],'type':_0xc215('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x41b8e6,_0x50605b,_0x52f135){var _0x23a684=_0x2e2dd7[_0xc215('0xe')];var _0x37d692=_0x41b8e6[_0xc215('0xf')]({'plain':!![]});if(_0x37d692['direction']['toLowerCase']()==='in'||_0x37d692['direction']['toLowerCase']()===_0xc215('0x10')&&!_0x37d692['secret']&&!_[_0xc215('0x11')](_0x37d692[_0xc215('0x12')])){_0x23a684[_0xc215('0x13')][_0xc215('0x14')]({'where':{'id':_0x37d692['SmsInteractionId']}})[_0xc215('0x15')](function(_0x228f0a){if(_0x228f0a){_0x228f0a[_0xc215('0x16')]({'lastMsgAt':_0x37d692[_0xc215('0x17')],'lastMsgDirection':_0x37d692[_0xc215('0x18')][_0xc215('0x19')]()});}})[_0xc215('0x1a')](function(_0x1b9b9e){console['error'](_0x1b9b9e);});}if(_0x37d692['direction']===_0xc215('0x10')&&!_0x37d692[_0xc215('0x1b')]){var _0x457728;_0x23a684['SmsAccount'][_0xc215('0x1c')]({'where':{'id':_0x37d692[_0xc215('0x1d')]},'raw':!![]})['then'](function(_0x3a62ce){_0x457728=_0x3a62ce;if(_0x457728&&_0x457728['type']){switch(_0x457728[_0xc215('0x1e')]){case _0xc215('0x1f'):var _0x4c216c=require('twilio');if(_0x457728['accountSid']&&_0x457728[_0xc215('0x20')]&&_0x457728['phone']){var _0x4795ae=new _0x4c216c(_0x457728['accountSid'],_0x457728[_0xc215('0x20')]);_0x4795ae[_0xc215('0x21')]['create']({'body':_0x37d692[_0xc215('0x22')],'to':_0x37d692['phone'],'from':_0x457728[_0xc215('0x23')],'statusCallback':_0x457728[_0xc215('0x24')]+_0xc215('0x25')+_0x37d692['id']+_0xc215('0x26')+_0x457728['token']})['then'](function(_0x8a714){if(_0x8a714[_0xc215('0x27')]){return _0x41b8e6[_0xc215('0x16')]({'messageId':_0x8a714[_0xc215('0x27')]});}})[_0xc215('0x1a')](function(_0x2b78a4){logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x1f'),util[_0xc215('0x2b')](_0x2b78a4,{'showHidden':![],'depth':null}));});}else{logger[_0xc215('0x28')](_0xc215('0x29'),'afterCreate',_0xc215('0x1f'),_0xc215('0x2c'));}break;case'skebby':var _0x25ba2c=_0xc215('0x2d');if(_0x457728[_0xc215('0x2e')]&&_0x457728[_0xc215('0x2f')]){var _0x3079b9={'recipient':[_0x37d692[_0xc215('0x23')]],'message':_0x37d692['body'],'message_type':_0x457728[_0xc215('0x30')]};if(_0x457728[_0xc215('0x30')]&&_0x457728[_0xc215('0x30')]!=='SI'){_0x3079b9[_0xc215('0x31')]=_0x457728[_0xc215('0x23')];}var _0x6ea999={'url':_0x25ba2c+_0xc215('0x32')+_0x457728['username']+_0xc215('0x33')+_0x457728['password'],'method':'GET'};rp(_0x6ea999)['then'](function(_0x9a7600){var _0x2da840=_0x9a7600[_0xc215('0x34')](';');var _0x999a3c={'user_key':_0x2da840[0x0],'session_key':_0x2da840[0x1]};_0x6ea999={'url':_0x25ba2c+_0xc215('0x35'),'method':'POST','headers':{'user_key':_0x999a3c['user_key'],'Session_key':_0x999a3c[_0xc215('0x36')]},'json':!![],'body':_0x3079b9};return rp(_0x6ea999);})[_0xc215('0x15')](function(_0x27c443){if(_0x27c443[_0xc215('0x37')]>=0x1){var _0x18299b={'messageId':_0x27c443[_0xc215('0x38')]};if(_0x457728[_0xc215('0x30')]!=='GP'||!_0x457728[_0xc215('0x39')]){_0x18299b['read']=!![];}return _0x41b8e6[_0xc215('0x16')](_0x18299b);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc215('0x2a'),'skebby',util[_0xc215('0x2b')](_0x27c443,{'showHidden':![],'depth':null}));}})[_0xc215('0x1a')](function(_0x428ad9){return logger[_0xc215('0x28')](_0xc215('0x29'),'afterCreate','skebby',util[_0xc215('0x2b')](_0x428ad9,{'showHidden':![],'depth':null}));});}else{logger[_0xc215('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','skebby',_0xc215('0x3a'));}break;case'connectel':if(_0x457728[_0xc215('0x20')]){var _0x3f71a7={'recipient':_0x37d692['phone'],'message':_0x37d692['body'],'sender':_0x457728[_0xc215('0x3b')]||_0x457728[_0xc215('0x23')],'authorization':_0x457728[_0xc215('0x20')]};var _0x50605b={'method':'POST','uri':'https://smsapi.connectel.se/api/send/','body':_0x3f71a7,'json':!![]};rp(_0x50605b)['then'](function(_0x26e5e0){var _0x2bef03={'messageId':_0x26e5e0[_0xc215('0x3c')]};if(!_0x457728['deliveryReport']){_0x2bef03['read']=!![];}return _0x41b8e6[_0xc215('0x16')](_0x2bef03);})[_0xc215('0x1a')](function(_0x49f517){logger[_0xc215('0x28')](_0xc215('0x29'),'afterCreate',_0xc215('0x3d'),util[_0xc215('0x2b')](_0x49f517,{'showHidden':![],'depth':null}));});}else{logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x3d'),_0xc215('0x3e'));}break;case _0xc215('0x3f'):if(_0x457728[_0xc215('0x2e')]&&_0x457728[_0xc215('0x2f')]){var _0x3f71a7={'messages':[{'source':_0xc215('0x40'),'to':_0x37d692[_0xc215('0x23')],'body':_0x37d692[_0xc215('0x22')],'from':_0x457728[_0xc215('0x3b')]||_0x457728[_0xc215('0x23')]}]};var _0x47c856=util[_0xc215('0x41')](_0xc215('0x42'),_0x457728[_0xc215('0x2e')],_0x457728[_0xc215('0x2f')]);var _0x50605b={'method':_0xc215('0x43'),'uri':_0xc215('0x44'),'body':_0x3f71a7,'headers':{'Authorization':util[_0xc215('0x41')](_0xc215('0x45'),new Buffer(_0x47c856)['toString'](_0xc215('0x46')))},'json':!![]};rp(_0x50605b)[_0xc215('0x15')](function(_0x161163){if(_0x161163['http_code']>=0xc8&&_0x161163[_0xc215('0x47')]<=0xce){if(_0x161163[_0xc215('0x48')]&&_0x161163[_0xc215('0x48')][_0xc215('0x49')]>0x0){var _0x39c57e=_[_0xc215('0x4a')](_0x161163[_0xc215('0x48')][_0xc215('0x21')]);var _0x44374a={'messageId':_0x39c57e[_0xc215('0x4b')]};if(!_0x457728[_0xc215('0x39')]){_0x44374a[_0xc215('0x4c')]=!![];}return _0x41b8e6[_0xc215('0x16')](_0x44374a);}else{logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x4d'),util[_0xc215('0x2b')](_0x161163,{'showHidden':![],'depth':null}));}}else{logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x4d'),util[_0xc215('0x2b')](_0x161163,{'showHidden':![],'depth':null}));}})['catch'](function(_0x146c5d){logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),'clickSend',util['inspect'](_0x146c5d,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xc215('0x29'),_0xc215('0x2a'),'clickSend',_0xc215('0x3a'));}break;case _0xc215('0x4e'):if(_0x457728[_0xc215('0x4f')]&&_0x457728[_0xc215('0x20')]){var _0x3f71a7={'dst':_0x37d692['phone'],'text':_0x37d692[_0xc215('0x22')],'src':_0x457728[_0xc215('0x3b')]||_0x457728[_0xc215('0x23')],'url':_0x457728[_0xc215('0x24')]+_0xc215('0x25')+_0x37d692['id']+'/status?token='+_0x457728[_0xc215('0x50')]};var _0x47c856=util[_0xc215('0x41')]('%s:%s',_0x457728[_0xc215('0x4f')],_0x457728['authToken']);var _0x50605b={'method':_0xc215('0x43'),'uri':util['format'](_0xc215('0x51'),_0x457728['authId']),'body':_0x3f71a7,'headers':{'Authorization':util[_0xc215('0x41')](_0xc215('0x45'),new Buffer(_0x47c856)[_0xc215('0x52')](_0xc215('0x46')))},'json':!![]};rp(_0x50605b)[_0xc215('0x15')](function(_0x32e14c){var _0x392e25={'messageId':_0x32e14c[_0xc215('0x53')][0x0]};return _0x41b8e6[_0xc215('0x16')](_0x392e25);})[_0xc215('0x1a')](function(_0x355e9a){logger[_0xc215('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xc215('0x4e'),util['inspect'](_0x355e9a,{'showHidden':![],'depth':null}));});}else{logger[_0xc215('0x28')](_0xc215('0x29'),'afterCreate',_0xc215('0x4e'),'Missing\x20parameters:\x20authId,\x20authToken');}break;case _0xc215('0x54'):if(_0x457728[_0xc215('0x2e')]&&_0x457728[_0xc215('0x2f')]){if(_0x457728[_0xc215('0x55')]){var _0x1f3330={'method':_0xc215('0x43'),'uri':_0x457728[_0xc215('0x55')]+_0xc215('0x56'),'body':{'username':_0x457728['username'],'password':_0x457728['password']},'json':!![]};return rp(_0x1f3330)[_0xc215('0x15')](function(_0x576484){var _0xddee0d={'method':_0xc215('0x43'),'uri':_0x457728['baseUrl']+_0xc215('0x57'),'body':{'messages':[{'from':_0x457728[_0xc215('0x23')],'destinations':[{'to':_0x37d692[_0xc215('0x23')]}],'text':_0x37d692[_0xc215('0x22')],'notifyUrl':_0x457728[_0xc215('0x24')]+_0xc215('0x25')+_0x37d692['id']+_0xc215('0x26')+_0x457728['token'],'notifyContentType':_0xc215('0x58'),'callbackData':_0x457728[_0xc215('0x23')]+';'+_0x37d692[_0xc215('0x22')]}]},'headers':{'Authorization':'IBSSO\x20'+_0x576484['token']},'json':!![]};return rp(_0xddee0d)['then'](function(_0x404731){if(_0x404731[_0xc215('0x21')]){var _0x576f7e={'messageId':_0x404731['messages'][0x0]['messageId']};if(!_0x457728['deliveryReport']){_0x576f7e[_0xc215('0x4c')]=!![];}return _0x41b8e6[_0xc215('0x16')](_0x576f7e);}else{return logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x54'),util[_0xc215('0x2b')](_0x404731,{'showHidden':![],'depth':null}));}});})['catch'](function(_0x493be4){return logger[_0xc215('0x28')](_0xc215('0x29'),'afterCreate',_0xc215('0x54'),util[_0xc215('0x2b')](_0x493be4,{'showHidden':![],'depth':null}));});}else{logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),'infobip','Missing\x20parameters:\x20base_url');}}else{logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x54'),_0xc215('0x3a'));}break;case'csc':var _0x243adb=require(_0xc215('0x59'));if(_0x457728[_0xc215('0x5a')]){var _0x4f0e44={};_0x4f0e44['login']=_0x457728[_0xc215('0x2e')];_0x4f0e44[_0xc215('0x23')]=_0x37d692[_0xc215('0x23')];_0x4f0e44['sender']=_0x457728['phone'];_0x4f0e44[_0xc215('0x5b')]=_0x37d692[_0xc215('0x22')];_0x4f0e44[_0xc215('0x5c')]=+new Date();var _0xfebbfe='';var _0x478ff7='';var _0x53f554=Object['keys'](_0x4f0e44);_0x53f554[_0xc215('0x5d')]();for(var _0x182252=0x0;_0x182252<_0x53f554['length'];_0x182252++){if(_0xfebbfe!=''){_0xfebbfe+='&';}_0xfebbfe+=_0x53f554[_0x182252]+'='+encodeURIComponent(_0x4f0e44[_0x53f554[_0x182252]]);_0x478ff7+=_0x4f0e44[_0x53f554[_0x182252]];}_0x478ff7+=_0x457728['apiKey'];_0x478ff7=_0x243adb['createHash'](_0xc215('0x5e'))[_0xc215('0x16')](_0x478ff7)[_0xc215('0x5f')]('hex');if(_0xfebbfe!==''){_0xfebbfe+='&';}_0xfebbfe+=_0xc215('0x60')+_0x478ff7;var _0x6ea999={'method':_0xc215('0x61'),'uri':_0x457728[_0xc215('0x55')]+'/external/get/send.php?'+_0xfebbfe,'json':!![]};return rp(_0x6ea999)['then'](function(_0x35ca3b){var _0x392199=Object[_0xc215('0x62')](_0x35ca3b);if(_0x35ca3b[_0x392199[0x0]]['error']&&parseInt(_0x35ca3b[_0x392199[0x0]][_0xc215('0x28')])===0x0){var _0x20fb89={'messageId':_0x35ca3b[_0x392199[0x0]][_0xc215('0x63')]};if(!_0x457728['deliveryReport']){_0x20fb89[_0xc215('0x4c')]=!![];}return _0x41b8e6[_0xc215('0x16')](_0x20fb89);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc215('0x2a'),_0xc215('0x64'),util[_0xc215('0x2b')](_0x35ca3b['error'],{'showHidden':![],'depth':null}));}})['catch'](function(_0x4358ac){return logger['error'](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x64'),util[_0xc215('0x2b')](_0x4358ac,{'showHidden':![],'depth':null}));});}else{logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x64'),_0xc215('0x65'));}break;case _0xc215('0x66'):if(_0x457728[_0xc215('0x5a')]){var _0x294311={'method':'POST','uri':_0xc215('0x67'),'headers':{'Authorization':_0x457728[_0xc215('0x5a')]},'body':{'content':_0x37d692[_0xc215('0x22')],'to':[_0x37d692[_0xc215('0x23')]],'from':_0x457728['phone'],'binary':![],'clientMessageId':'uuid','charset':'UTF-8'},'json':!![]};rp(_0x294311)[_0xc215('0x15')](function(_0x2f4e23){if(!_0x2f4e23[_0xc215('0x28')]){var _0x2e3660={'messageId':_0x2f4e23[_0xc215('0x21')][0x0][_0xc215('0x68')]};if(!_0x457728[_0xc215('0x39')]){_0x2e3660[_0xc215('0x4c')]=!![];}return _0x41b8e6['update'](_0x2e3660);}else{return logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x66'),util[_0xc215('0x2b')](_0x2f4e23[_0xc215('0x28')],{'showHidden':![],'depth':null}));}})[_0xc215('0x1a')](function(_0x3cc85d){return logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),'clickatell',util[_0xc215('0x2b')](_0x3cc85d,{'showHidden':![],'depth':null}));});}else{logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x66'),_0xc215('0x65'));}break;case'intelepeer':if(_0x457728[_0xc215('0x5a')]){var _0x51feff={};var _0x6ea999={'method':_0xc215('0x43'),'uri':_0xc215('0x69'),'headers':{'Authorization':_0xc215('0x6a')+_0x457728['apiKey'],'Content-Type':'application/json'},'body':{'from':_0x457728[_0xc215('0x23')],'to':_0x37d692[_0xc215('0x23')],'text':_0x37d692[_0xc215('0x22')]},'json':!![]};return rp(_0x6ea999)[_0xc215('0x15')](function(_0x37954c){if(_0x37954c[_0xc215('0x6b')]==0xca){_0x51feff[_0xc215('0x6c')]=_0x37954c;var _0x25ac8f={'method':'POST','uri':_0xc215('0x6d'),'headers':{'Authorization':_0xc215('0x6a')+_0x457728[_0xc215('0x5a')],'Content-Type':_0xc215('0x58')},'body':{'refid':_0x51feff[_0xc215('0x6c')]['refid']},'json':!![]};return rp(_0x25ac8f)[_0xc215('0x15')](function(_0x29fbca){_0x51feff[_0xc215('0x6e')]=_0x29fbca;var _0x5e1108={'messageId':_0x51feff[_0xc215('0x6c')]['refid'],'read':!![]};return _0x41b8e6[_0xc215('0x16')](_0x5e1108);});}else{return logger[_0xc215('0x28')](_0xc215('0x29'),_0xc215('0x2a'),'intelepeer',util['inspect'](_0x37954c,{'showHidden':![],'depth':null}));}})['catch'](function(_0x21bf21){return logger[_0xc215('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc215('0x2a'),'intelepeer',util[_0xc215('0x2b')](_0x21bf21,{'showHidden':![],'depth':null}));});}else{return logger['error'](_0xc215('0x29'),_0xc215('0x2a'),_0xc215('0x6f'),'Token\x20not\x20received');}break;}}})[_0xc215('0x70')](function(){_0x52f135();});}else{_0x52f135();}}},'charset':_0xc215('0x71'),'collate':_0xc215('0x72')});};
\ No newline at end of file
+var _0x2e43=['id_sms','csc','Missing\x20parameters:\x20apiKey','clickatell','https://platform.clickatell.com/messages','uuid','UTF-8','apiMessageId','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','https://api.intelepeer.com/_rest/v4/app/sms/mdr','message','refid','status','intelepeer','Token\x20not\x20received','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','request-promise','rimraf','../../config/environment','./smsMessage.attributes','exports','define','sms_messages','messageId','body','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','SmsInteraction','SmsInteractionId','then','update','createdAt','catch','find','type','twilio','accountSid','authToken','phone','remote','/api/sms/messages/','/status?token=','sid','error','afterCreate','skebby','password','smsMethod','sender','login?username=','username','&password=','GET','split','sms','POST','user_key','total_sent','internal_order_id','deliveryReport','read','SmsMessage,\x20%s,\x20%s,\x20%s','inspect','connectel','senderString','Missing\x20parameters:\x20authToken','clicksend','format','%s:%s','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','base64','http_code','data','queued_count','head','message_id','clickSend','Missing\x20parameters:\x20username,\x20password','authId','token','plivo','baseUrl','/sms/2/text/advanced','application/json','messages','infobip','Missing\x20parameters:\x20base_url','crypto','apiKey','login','timestamp','sort','length','digest','hex','signature=','/external/get/send.php?'];(function(_0x2f8f6c,_0x3c19b3){var _0x26e2d7=function(_0xd331fa){while(--_0xd331fa){_0x2f8f6c['push'](_0x2f8f6c['shift']());}};_0x26e2d7(++_0x3c19b3);}(_0x2e43,0x15e));var _0x32e4=function(_0x4609ca,_0x53ccf9){_0x4609ca=_0x4609ca-0x0;var _0x541e6a=_0x2e43[_0x4609ca];return _0x541e6a;};'use strict';var _=require(_0x32e4('0x0'));var util=require(_0x32e4('0x1'));var logger=require(_0x32e4('0x2'))('api');var moment=require(_0x32e4('0x3'));var BPromise=require('bluebird');var rp=require(_0x32e4('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x32e4('0x5'));var config=require(_0x32e4('0x6'));var attributes=require(_0x32e4('0x7'));module[_0x32e4('0x8')]=function(_0x21365c,_0x1e0bac){return _0x21365c[_0x32e4('0x9')]('SmsMessage',attributes,{'tableName':_0x32e4('0xa'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0x32e4('0xb')]},{'name':'fti_sms_messages','fields':[_0x32e4('0xc')],'type':_0x32e4('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2fc85a,_0x2b1c28,_0x4a16e7){var _0x50c261=_0x21365c[_0x32e4('0xe')];var _0x2a2586=_0x2fc85a[_0x32e4('0xf')]({'plain':!![]});if(_0x2a2586['direction']['toLowerCase']()==='in'||_0x2a2586[_0x32e4('0x10')][_0x32e4('0x11')]()===_0x32e4('0x12')&&!_0x2a2586[_0x32e4('0x13')]&&!_[_0x32e4('0x14')](_0x2a2586[_0x32e4('0x15')])){_0x50c261[_0x32e4('0x16')]['findOne']({'where':{'id':_0x2a2586[_0x32e4('0x17')]}})[_0x32e4('0x18')](function(_0x22dfe0){if(_0x22dfe0){_0x22dfe0[_0x32e4('0x19')]({'lastMsgAt':_0x2a2586[_0x32e4('0x1a')],'lastMsgDirection':_0x2a2586[_0x32e4('0x10')]['toLowerCase']()});}})[_0x32e4('0x1b')](function(_0x3158e2){console['error'](_0x3158e2);});}if(_0x2a2586['direction']==='out'&&!_0x2a2586[_0x32e4('0x13')]){var _0x43158f;_0x50c261['SmsAccount'][_0x32e4('0x1c')]({'where':{'id':_0x2a2586['SmsAccountId']},'raw':!![]})[_0x32e4('0x18')](function(_0x508404){_0x43158f=_0x508404;if(_0x43158f&&_0x43158f[_0x32e4('0x1d')]){switch(_0x43158f[_0x32e4('0x1d')]){case _0x32e4('0x1e'):var _0x2a2b27=require(_0x32e4('0x1e'));if(_0x43158f[_0x32e4('0x1f')]&&_0x43158f[_0x32e4('0x20')]&&_0x43158f[_0x32e4('0x21')]){var _0x19ad1b=new _0x2a2b27(_0x43158f['accountSid'],_0x43158f[_0x32e4('0x20')]);_0x19ad1b['messages']['create']({'body':_0x2a2586[_0x32e4('0xc')],'to':_0x2a2586[_0x32e4('0x21')],'from':_0x43158f[_0x32e4('0x21')],'statusCallback':_0x43158f[_0x32e4('0x22')]+_0x32e4('0x23')+_0x2a2586['id']+_0x32e4('0x24')+_0x43158f['token']})[_0x32e4('0x18')](function(_0x564021){if(_0x564021[_0x32e4('0x25')]){return _0x2fc85a['update']({'messageId':_0x564021[_0x32e4('0x25')]});}})[_0x32e4('0x1b')](function(_0x3c9ee6){logger[_0x32e4('0x26')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x32e4('0x27'),_0x32e4('0x1e'),util['inspect'](_0x3c9ee6,{'showHidden':![],'depth':null}));});}else{logger[_0x32e4('0x26')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x32e4('0x27'),_0x32e4('0x1e'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case _0x32e4('0x28'):var _0x3e7e8b='https://api.skebby.it/API/v1.0/REST/';if(_0x43158f['username']&&_0x43158f[_0x32e4('0x29')]){var _0xfda6da={'recipient':[_0x2a2586[_0x32e4('0x21')]],'message':_0x2a2586['body'],'message_type':_0x43158f[_0x32e4('0x2a')]};if(_0x43158f['smsMethod']&&_0x43158f[_0x32e4('0x2a')]!=='SI'){_0xfda6da[_0x32e4('0x2b')]=_0x43158f[_0x32e4('0x21')];}var _0x1460c5={'url':_0x3e7e8b+_0x32e4('0x2c')+_0x43158f[_0x32e4('0x2d')]+_0x32e4('0x2e')+_0x43158f['password'],'method':_0x32e4('0x2f')};rp(_0x1460c5)[_0x32e4('0x18')](function(_0x302fde){var _0x3b72a9=_0x302fde[_0x32e4('0x30')](';');var _0x459629={'user_key':_0x3b72a9[0x0],'session_key':_0x3b72a9[0x1]};_0x1460c5={'url':_0x3e7e8b+_0x32e4('0x31'),'method':_0x32e4('0x32'),'headers':{'user_key':_0x459629[_0x32e4('0x33')],'Session_key':_0x459629['session_key']},'json':!![],'body':_0xfda6da};return rp(_0x1460c5);})['then'](function(_0x3a2ce0){if(_0x3a2ce0[_0x32e4('0x34')]>=0x1){var _0x35bc5a={'messageId':_0x3a2ce0[_0x32e4('0x35')]};if(_0x43158f[_0x32e4('0x2a')]!=='GP'||!_0x43158f[_0x32e4('0x36')]){_0x35bc5a[_0x32e4('0x37')]=!![];}return _0x2fc85a[_0x32e4('0x19')](_0x35bc5a);}else{return logger['error'](_0x32e4('0x38'),'afterCreate',_0x32e4('0x28'),util[_0x32e4('0x39')](_0x3a2ce0,{'showHidden':![],'depth':null}));}})[_0x32e4('0x1b')](function(_0x5af36e){return logger[_0x32e4('0x26')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','skebby',util[_0x32e4('0x39')](_0x5af36e,{'showHidden':![],'depth':null}));});}else{logger[_0x32e4('0x26')](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x28'),'Missing\x20parameters:\x20username,\x20password');}break;case _0x32e4('0x3a'):if(_0x43158f['authToken']){var _0x205169={'recipient':_0x2a2586[_0x32e4('0x21')],'message':_0x2a2586[_0x32e4('0xc')],'sender':_0x43158f[_0x32e4('0x3b')]||_0x43158f[_0x32e4('0x21')],'authorization':_0x43158f[_0x32e4('0x20')]};var _0x2b1c28={'method':_0x32e4('0x32'),'uri':'https://smsapi.connectel.se/api/send/','body':_0x205169,'json':!![]};rp(_0x2b1c28)['then'](function(_0x504b36){var _0x9a3610={'messageId':_0x504b36['requestid']};if(!_0x43158f['deliveryReport']){_0x9a3610[_0x32e4('0x37')]=!![];}return _0x2fc85a[_0x32e4('0x19')](_0x9a3610);})['catch'](function(_0xf0ecc7){logger[_0x32e4('0x26')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x32e4('0x27'),'connectel',util['inspect'](_0xf0ecc7,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x3a'),_0x32e4('0x3c'));}break;case _0x32e4('0x3d'):if(_0x43158f[_0x32e4('0x2d')]&&_0x43158f[_0x32e4('0x29')]){var _0x205169={'messages':[{'source':'xCALLY\x20Motion','to':_0x2a2586['phone'],'body':_0x2a2586[_0x32e4('0xc')],'from':_0x43158f[_0x32e4('0x3b')]||_0x43158f[_0x32e4('0x21')]}]};var _0x4a8d15=util[_0x32e4('0x3e')](_0x32e4('0x3f'),_0x43158f[_0x32e4('0x2d')],_0x43158f['password']);var _0x2b1c28={'method':_0x32e4('0x32'),'uri':_0x32e4('0x40'),'body':_0x205169,'headers':{'Authorization':util[_0x32e4('0x3e')](_0x32e4('0x41'),new Buffer(_0x4a8d15)[_0x32e4('0x42')](_0x32e4('0x43')))},'json':!![]};rp(_0x2b1c28)['then'](function(_0x37b961){if(_0x37b961[_0x32e4('0x44')]>=0xc8&&_0x37b961[_0x32e4('0x44')]<=0xce){if(_0x37b961[_0x32e4('0x45')]&&_0x37b961[_0x32e4('0x45')][_0x32e4('0x46')]>0x0){var _0x2f227e=_[_0x32e4('0x47')](_0x37b961[_0x32e4('0x45')]['messages']);var _0x84ef88={'messageId':_0x2f227e[_0x32e4('0x48')]};if(!_0x43158f['deliveryReport']){_0x84ef88[_0x32e4('0x37')]=!![];}return _0x2fc85a[_0x32e4('0x19')](_0x84ef88);}else{logger['error'](_0x32e4('0x38'),_0x32e4('0x27'),'clickSend',util['inspect'](_0x37b961,{'showHidden':![],'depth':null}));}}else{logger[_0x32e4('0x26')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x32e4('0x27'),_0x32e4('0x49'),util['inspect'](_0x37b961,{'showHidden':![],'depth':null}));}})['catch'](function(_0x54d8de){logger['error'](_0x32e4('0x38'),_0x32e4('0x27'),'clickSend',util[_0x32e4('0x39')](_0x54d8de,{'showHidden':![],'depth':null}));});}else{logger[_0x32e4('0x26')](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x49'),_0x32e4('0x4a'));}break;case'plivo':if(_0x43158f[_0x32e4('0x4b')]&&_0x43158f[_0x32e4('0x20')]){var _0x205169={'dst':_0x2a2586[_0x32e4('0x21')],'text':_0x2a2586[_0x32e4('0xc')],'src':_0x43158f['senderString']||_0x43158f[_0x32e4('0x21')],'url':_0x43158f[_0x32e4('0x22')]+'/api/sms/messages/'+_0x2a2586['id']+_0x32e4('0x24')+_0x43158f[_0x32e4('0x4c')]};var _0x4a8d15=util[_0x32e4('0x3e')](_0x32e4('0x3f'),_0x43158f[_0x32e4('0x4b')],_0x43158f[_0x32e4('0x20')]);var _0x2b1c28={'method':_0x32e4('0x32'),'uri':util[_0x32e4('0x3e')]('https://api.plivo.com/v1/Account/%s/Message/',_0x43158f[_0x32e4('0x4b')]),'body':_0x205169,'headers':{'Authorization':util[_0x32e4('0x3e')]('Basic\x20%s',new Buffer(_0x4a8d15)[_0x32e4('0x42')]('base64'))},'json':!![]};rp(_0x2b1c28)['then'](function(_0x33c42f){var _0x374a76={'messageId':_0x33c42f['message_uuid'][0x0]};return _0x2fc85a[_0x32e4('0x19')](_0x374a76);})[_0x32e4('0x1b')](function(_0x1e9878){logger[_0x32e4('0x26')](_0x32e4('0x38'),_0x32e4('0x27'),'plivo',util['inspect'](_0x1e9878,{'showHidden':![],'depth':null}));});}else{logger[_0x32e4('0x26')](_0x32e4('0x38'),'afterCreate',_0x32e4('0x4d'),'Missing\x20parameters:\x20authId,\x20authToken');}break;case'infobip':if(_0x43158f[_0x32e4('0x2d')]&&_0x43158f[_0x32e4('0x29')]){if(_0x43158f[_0x32e4('0x4e')]){var _0x462eb3={'method':_0x32e4('0x32'),'uri':_0x43158f[_0x32e4('0x4e')]+'/auth/1/session','body':{'username':_0x43158f[_0x32e4('0x2d')],'password':_0x43158f[_0x32e4('0x29')]},'json':!![]};return rp(_0x462eb3)[_0x32e4('0x18')](function(_0x2cefbc){var _0xd7ddc1={'method':_0x32e4('0x32'),'uri':_0x43158f[_0x32e4('0x4e')]+_0x32e4('0x4f'),'body':{'messages':[{'from':_0x43158f['phone'],'destinations':[{'to':_0x2a2586[_0x32e4('0x21')]}],'text':_0x2a2586[_0x32e4('0xc')],'notifyUrl':_0x43158f[_0x32e4('0x22')]+_0x32e4('0x23')+_0x2a2586['id']+_0x32e4('0x24')+_0x43158f[_0x32e4('0x4c')],'notifyContentType':_0x32e4('0x50'),'callbackData':_0x43158f['phone']+';'+_0x2a2586[_0x32e4('0xc')]}]},'headers':{'Authorization':'IBSSO\x20'+_0x2cefbc[_0x32e4('0x4c')]},'json':!![]};return rp(_0xd7ddc1)['then'](function(_0x30c620){if(_0x30c620[_0x32e4('0x51')]){var _0x41e50e={'messageId':_0x30c620[_0x32e4('0x51')][0x0][_0x32e4('0xb')]};if(!_0x43158f[_0x32e4('0x36')]){_0x41e50e[_0x32e4('0x37')]=!![];}return _0x2fc85a[_0x32e4('0x19')](_0x41e50e);}else{return logger[_0x32e4('0x26')](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x52'),util[_0x32e4('0x39')](_0x30c620,{'showHidden':![],'depth':null}));}});})[_0x32e4('0x1b')](function(_0x4dc37f){return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x32e4('0x52'),util[_0x32e4('0x39')](_0x4dc37f,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x52'),_0x32e4('0x53'));}}else{logger[_0x32e4('0x26')](_0x32e4('0x38'),'afterCreate',_0x32e4('0x52'),_0x32e4('0x4a'));}break;case'csc':var _0x37ebb5=require(_0x32e4('0x54'));if(_0x43158f[_0x32e4('0x55')]){var _0x19e88a={};_0x19e88a[_0x32e4('0x56')]=_0x43158f['username'];_0x19e88a['phone']=_0x2a2586[_0x32e4('0x21')];_0x19e88a['sender']=_0x43158f[_0x32e4('0x21')];_0x19e88a['text']=_0x2a2586[_0x32e4('0xc')];_0x19e88a[_0x32e4('0x57')]=+new Date();var _0x31480a='';var _0x2905f8='';var _0x59d8c3=Object['keys'](_0x19e88a);_0x59d8c3[_0x32e4('0x58')]();for(var _0x4debac=0x0;_0x4debac<_0x59d8c3[_0x32e4('0x59')];_0x4debac++){if(_0x31480a!=''){_0x31480a+='&';}_0x31480a+=_0x59d8c3[_0x4debac]+'='+encodeURIComponent(_0x19e88a[_0x59d8c3[_0x4debac]]);_0x2905f8+=_0x19e88a[_0x59d8c3[_0x4debac]];}_0x2905f8+=_0x43158f['apiKey'];_0x2905f8=_0x37ebb5['createHash']('md5')[_0x32e4('0x19')](_0x2905f8)[_0x32e4('0x5a')](_0x32e4('0x5b'));if(_0x31480a!==''){_0x31480a+='&';}_0x31480a+=_0x32e4('0x5c')+_0x2905f8;var _0x1460c5={'method':_0x32e4('0x2f'),'uri':_0x43158f[_0x32e4('0x4e')]+_0x32e4('0x5d')+_0x31480a,'json':!![]};return rp(_0x1460c5)[_0x32e4('0x18')](function(_0x12895b){var _0x282633=Object['keys'](_0x12895b);if(_0x12895b[_0x282633[0x0]][_0x32e4('0x26')]&&parseInt(_0x12895b[_0x282633[0x0]][_0x32e4('0x26')])===0x0){var _0x271a05={'messageId':_0x12895b[_0x282633[0x0]][_0x32e4('0x5e')]};if(!_0x43158f['deliveryReport']){_0x271a05[_0x32e4('0x37')]=!![];}return _0x2fc85a[_0x32e4('0x19')](_0x271a05);}else{return logger[_0x32e4('0x26')](_0x32e4('0x38'),_0x32e4('0x27'),'csc',util[_0x32e4('0x39')](_0x12895b['error'],{'showHidden':![],'depth':null}));}})[_0x32e4('0x1b')](function(_0x16d522){return logger[_0x32e4('0x26')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x32e4('0x27'),_0x32e4('0x5f'),util[_0x32e4('0x39')](_0x16d522,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x32e4('0x27'),'csc',_0x32e4('0x60'));}break;case _0x32e4('0x61'):if(_0x43158f[_0x32e4('0x55')]){var _0x51833a={'method':_0x32e4('0x32'),'uri':_0x32e4('0x62'),'headers':{'Authorization':_0x43158f[_0x32e4('0x55')]},'body':{'content':_0x2a2586[_0x32e4('0xc')],'to':[_0x2a2586[_0x32e4('0x21')]],'from':_0x43158f[_0x32e4('0x21')],'binary':![],'clientMessageId':_0x32e4('0x63'),'charset':_0x32e4('0x64')},'json':!![]};rp(_0x51833a)[_0x32e4('0x18')](function(_0x4a700b){if(!_0x4a700b[_0x32e4('0x26')]){var _0x557fb1={'messageId':_0x4a700b[_0x32e4('0x51')][0x0][_0x32e4('0x65')]};if(!_0x43158f[_0x32e4('0x36')]){_0x557fb1[_0x32e4('0x37')]=!![];}return _0x2fc85a['update'](_0x557fb1);}else{return logger[_0x32e4('0x26')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','clickatell',util[_0x32e4('0x39')](_0x4a700b[_0x32e4('0x26')],{'showHidden':![],'depth':null}));}})[_0x32e4('0x1b')](function(_0x20fa69){return logger[_0x32e4('0x26')](_0x32e4('0x38'),'afterCreate',_0x32e4('0x61'),util['inspect'](_0x20fa69,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x61'),_0x32e4('0x60'));}break;case'intelepeer':if(_0x43158f[_0x32e4('0x55')]){var _0x42472c={};var _0x1460c5={'method':'POST','uri':_0x32e4('0x66'),'headers':{'Authorization':_0x32e4('0x67')+_0x43158f['apiKey'],'Content-Type':_0x32e4('0x50')},'body':{'from':_0x43158f['phone'],'to':_0x2a2586['phone'],'text':_0x2a2586['body']},'json':!![]};return rp(_0x1460c5)[_0x32e4('0x18')](function(_0x215912){if(_0x215912['code']==0xca){_0x42472c['message']=_0x215912;var _0x4998ca={'method':_0x32e4('0x32'),'uri':_0x32e4('0x68'),'headers':{'Authorization':_0x32e4('0x67')+_0x43158f[_0x32e4('0x55')],'Content-Type':'application/json'},'body':{'refid':_0x42472c[_0x32e4('0x69')][_0x32e4('0x6a')]},'json':!![]};return rp(_0x4998ca)[_0x32e4('0x18')](function(_0x4d8481){_0x42472c[_0x32e4('0x6b')]=_0x4d8481;var _0x5de875={'messageId':_0x42472c[_0x32e4('0x69')][_0x32e4('0x6a')],'read':!![]};return _0x2fc85a[_0x32e4('0x19')](_0x5de875);});}else{return logger['error'](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x6c'),util[_0x32e4('0x39')](_0x215912,{'showHidden':![],'depth':null}));}})[_0x32e4('0x1b')](function(_0x5aa9c9){return logger[_0x32e4('0x26')](_0x32e4('0x38'),_0x32e4('0x27'),_0x32e4('0x6c'),util[_0x32e4('0x39')](_0x5aa9c9,{'showHidden':![],'depth':null}));});}else{return logger[_0x32e4('0x26')](_0x32e4('0x38'),_0x32e4('0x27'),'intelepeer',_0x32e4('0x6d'));}break;}}})['finally'](function(){_0x4a16e7();});}else{_0x4a16e7();}}},'charset':'utf8mb4','collate':_0x32e4('0x6e')});};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.rpc.js b/server/api/smsMessage/smsMessage.rpc.js
index e4a3af0..f839f47 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 _0x5eb8=['client','http','defaults','redis','localhost','register','request','info','request\x20sent','debug','SmsMessage,\x20%s,\x20%s,\x20%s','error','SmsMessage,\x20%s,\x20%s','message','result','catch','options','raw','then','stringify','CreateSmsMessage','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x58c04b,_0x1cf333){var _0x19db72=function(_0x22a86c){while(--_0x22a86c){_0x58c04b['push'](_0x58c04b['shift']());}};_0x19db72(++_0x1cf333);}(_0x5eb8,0xb0));var _0x85eb=function(_0x39caaa,_0x1f37bc){_0x39caaa=_0x39caaa-0x0;var _0x9b9c7d=_0x5eb8[_0x39caaa];return _0x9b9c7d;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x85eb('0x0'));var BPromise=require(_0x85eb('0x1'));var rs=require(_0x85eb('0x2'));var fs=require('fs');var Redis=require(_0x85eb('0x3'));var db=require(_0x85eb('0x4'))['db'];var utils=require(_0x85eb('0x5'));var logger=require(_0x85eb('0x6'))(_0x85eb('0x7'));var config=require(_0x85eb('0x8'));var jayson=require(_0x85eb('0x9'));var client=jayson[_0x85eb('0xa')][_0x85eb('0xb')]({'port':0x232a});config['redis']=_[_0x85eb('0xc')](config[_0x85eb('0xd')],{'host':_0x85eb('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x85eb('0xd')]));require('./smsMessage.socket')[_0x85eb('0xf')](socket);function respondWithRpcPromise(_0x40d6b6,_0x673228,_0x29030b){return new BPromise(function(_0x1dacf2,_0x73e6d0){return client[_0x85eb('0x10')](_0x40d6b6,_0x29030b)['then'](function(_0x163f32){logger[_0x85eb('0x11')]('SmsMessage,\x20%s,\x20%s',_0x673228,_0x85eb('0x12'));logger[_0x85eb('0x13')](_0x85eb('0x14'),_0x673228,_0x85eb('0x12'),JSON['stringify'](_0x163f32));if(_0x163f32['error']){if(_0x163f32[_0x85eb('0x15')]['code']===0x1f4){logger[_0x85eb('0x15')](_0x85eb('0x16'),_0x673228,_0x163f32[_0x85eb('0x15')][_0x85eb('0x17')]);return _0x73e6d0(_0x163f32[_0x85eb('0x15')]['message']);}logger[_0x85eb('0x15')]('SmsMessage,\x20%s,\x20%s',_0x673228,_0x163f32[_0x85eb('0x15')][_0x85eb('0x17')]);return _0x1dacf2(_0x163f32[_0x85eb('0x15')][_0x85eb('0x17')]);}else{logger['info']('SmsMessage,\x20%s,\x20%s',_0x673228,'request\x20sent');_0x1dacf2(_0x163f32[_0x85eb('0x18')][_0x85eb('0x17')]);}})[_0x85eb('0x19')](function(_0x2e986c){logger[_0x85eb('0x15')](_0x85eb('0x16'),_0x673228,_0x2e986c);_0x73e6d0(_0x2e986c);});});}exports['CreateSmsMessage']=function(_0x24cf28){var _0x7244fc=this;return new Promise(function(_0xd9f06d,_0x4e8041){return db['SmsMessage']['create'](_0x24cf28['body'],{'raw':_0x24cf28[_0x85eb('0x1a')]?_0x24cf28[_0x85eb('0x1a')][_0x85eb('0x1b')]===undefined?!![]:![]:!![]})[_0x85eb('0x1c')](function(_0x465c74){logger[_0x85eb('0x11')]('CreateSmsMessage',_0x24cf28);logger['debug']('CreateSmsMessage',_0x24cf28,JSON[_0x85eb('0x1d')](_0x465c74));_0xd9f06d(_0x465c74);})[_0x85eb('0x19')](function(_0x3f7a4d){logger[_0x85eb('0x15')](_0x85eb('0x1e'),_0x3f7a4d[_0x85eb('0x17')],_0x24cf28);_0x4e8041(_0x7244fc['error'](0x1f4,_0x3f7a4d[_0x85eb('0x17')]));});});};
\ No newline at end of file
+var _0x66fa=['lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','redis','defaults','socket.io-emitter','./smsMessage.socket','request','SmsMessage,\x20%s,\x20%s','debug','SmsMessage,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','info','catch','CreateSmsMessage','SmsMessage','create','body','options','raw','stringify'];(function(_0x329664,_0x130748){var _0x4e346e=function(_0x172b0d){while(--_0x172b0d){_0x329664['push'](_0x329664['shift']());}};_0x4e346e(++_0x130748);}(_0x66fa,0x117));var _0xa66f=function(_0x2c70c3,_0x4eb52f){_0x2c70c3=_0x2c70c3-0x0;var _0x287ca6=_0x66fa[_0x2c70c3];return _0x287ca6;};'use strict';var _=require(_0xa66f('0x0'));var util=require(_0xa66f('0x1'));var moment=require('moment');var BPromise=require(_0xa66f('0x2'));var rs=require(_0xa66f('0x3'));var fs=require('fs');var Redis=require(_0xa66f('0x4'));var db=require(_0xa66f('0x5'))['db'];var utils=require(_0xa66f('0x6'));var logger=require(_0xa66f('0x7'))(_0xa66f('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xa66f('0x9')][_0xa66f('0xa')]({'port':0x232a});config[_0xa66f('0xb')]=_[_0xa66f('0xc')](config[_0xa66f('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xa66f('0xd'))(new Redis(config['redis']));require(_0xa66f('0xe'))['register'](socket);function respondWithRpcPromise(_0x101e10,_0x53ca76,_0x52d802){return new BPromise(function(_0x55e6dc,_0x1e1997){return client[_0xa66f('0xf')](_0x101e10,_0x52d802)['then'](function(_0x14d31e){logger['info'](_0xa66f('0x10'),_0x53ca76,'request\x20sent');logger[_0xa66f('0x11')](_0xa66f('0x12'),_0x53ca76,_0xa66f('0x13'),JSON['stringify'](_0x14d31e));if(_0x14d31e['error']){if(_0x14d31e[_0xa66f('0x14')]['code']===0x1f4){logger['error']('SmsMessage,\x20%s,\x20%s',_0x53ca76,_0x14d31e[_0xa66f('0x14')][_0xa66f('0x15')]);return _0x1e1997(_0x14d31e[_0xa66f('0x14')][_0xa66f('0x15')]);}logger[_0xa66f('0x14')]('SmsMessage,\x20%s,\x20%s',_0x53ca76,_0x14d31e['error'][_0xa66f('0x15')]);return _0x55e6dc(_0x14d31e[_0xa66f('0x14')][_0xa66f('0x15')]);}else{logger[_0xa66f('0x16')]('SmsMessage,\x20%s,\x20%s',_0x53ca76,_0xa66f('0x13'));_0x55e6dc(_0x14d31e['result']['message']);}})[_0xa66f('0x17')](function(_0x413e80){logger[_0xa66f('0x14')](_0xa66f('0x10'),_0x53ca76,_0x413e80);_0x1e1997(_0x413e80);});});}exports[_0xa66f('0x18')]=function(_0x408bc7){var _0x251f60=this;return new Promise(function(_0x150291,_0x2033a4){return db[_0xa66f('0x19')][_0xa66f('0x1a')](_0x408bc7[_0xa66f('0x1b')],{'raw':_0x408bc7[_0xa66f('0x1c')]?_0x408bc7[_0xa66f('0x1c')][_0xa66f('0x1d')]===undefined?!![]:![]:!![]})['then'](function(_0x27f570){logger[_0xa66f('0x16')](_0xa66f('0x18'),_0x408bc7);logger[_0xa66f('0x11')]('CreateSmsMessage',_0x408bc7,JSON[_0xa66f('0x1e')](_0x27f570));_0x150291(_0x27f570);})[_0xa66f('0x17')](function(_0x209f4d){logger[_0xa66f('0x14')]('CreateSmsMessage',_0x209f4d['message'],_0x408bc7);_0x2033a4(_0x251f60[_0xa66f('0x14')](0x1f4,_0x209f4d['message']));});});};
\ No newline at end of file
diff --git a/server/api/smsMessage/smsMessage.socket.js b/server/api/smsMessage/smsMessage.socket.js
index 1b7dc8c..8c2ad31 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 _0xaacd=['register','length','smsMessage:','removeListener'];(function(_0x45bf86,_0x75586e){var _0x1f02b7=function(_0x1ea8a3){while(--_0x1ea8a3){_0x45bf86['push'](_0x45bf86['shift']());}};_0x1f02b7(++_0x75586e);}(_0xaacd,0x183));var _0xdaac=function(_0x5db5cc,_0xde802d){_0x5db5cc=_0x5db5cc-0x0;var _0x3f7156=_0xaacd[_0x5db5cc];return _0x3f7156;};'use strict';var SmsMessageEvents=require('./smsMessage.events');var events=['save','remove','update'];function createListener(_0x51947a,_0x34a9e8){return function(_0x5f1aaa){_0x34a9e8['emit'](_0x51947a,_0x5f1aaa);};}function removeListener(_0x576a0f,_0x42217b){return function(){SmsMessageEvents[_0xdaac('0x0')](_0x576a0f,_0x42217b);};}exports[_0xdaac('0x1')]=function(_0x548dc3){for(var _0xe0887e=0x0,_0x3dbedb=events[_0xdaac('0x2')];_0xe0887e<_0x3dbedb;_0xe0887e++){var _0x26d8f0=events[_0xe0887e];var _0x4f9463=createListener(_0xdaac('0x3')+_0x26d8f0,_0x548dc3);SmsMessageEvents['on'](_0x26d8f0,_0x4f9463);}};
\ No newline at end of file
+var _0xf288=['length','smsMessage:','remove','update','emit','removeListener'];(function(_0x3800ef,_0x24925f){var _0x3bca22=function(_0x10a19f){while(--_0x10a19f){_0x3800ef['push'](_0x3800ef['shift']());}};_0x3bca22(++_0x24925f);}(_0xf288,0x1b2));var _0x8f28=function(_0x91384,_0x545eef){_0x91384=_0x91384-0x0;var _0x44daa0=_0xf288[_0x91384];return _0x44daa0;};'use strict';var SmsMessageEvents=require('./smsMessage.events');var events=['save',_0x8f28('0x0'),_0x8f28('0x1')];function createListener(_0x471f4c,_0x2db92d){return function(_0x4af326){_0x2db92d[_0x8f28('0x2')](_0x471f4c,_0x4af326);};}function removeListener(_0x288244,_0x592773){return function(){SmsMessageEvents[_0x8f28('0x3')](_0x288244,_0x592773);};}exports['register']=function(_0x565ba6){for(var _0x46d4b8=0x0,_0x3a68cf=events[_0x8f28('0x4')];_0x46d4b8<_0x3a68cf;_0x46d4b8++){var _0x1e79e5=events[_0x46d4b8];var _0x5c8716=createListener(_0x8f28('0x5')+_0x1e79e5,_0x565ba6);SmsMessageEvents['on'](_0x1e79e5,_0x5c8716);}};
\ No newline at end of file
diff --git a/server/api/smsQueue/index.js b/server/api/smsQueue/index.js
index b660953..a8bbcaf 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 _0x1241=['update','delete','destroy','removeTeams','removeAgents','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./smsQueue.controller','get','index','/describe','isAuthenticated','/:id/members','getMembers','/:id/teams','getTeams','getAgents','create','post','addTeams','/:id/users','put','/:id'];(function(_0x1de4b8,_0x529b41){var _0x557699=function(_0xb10c18){while(--_0xb10c18){_0x1de4b8['push'](_0x1de4b8['shift']());}};_0x557699(++_0x529b41);}(_0x1241,0xb4));var _0x1124=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1241[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x1124('0x0'));var util=require('util');var path=require(_0x1124('0x1'));var timeout=require(_0x1124('0x2'));var express=require(_0x1124('0x3'));var router=express[_0x1124('0x4')]();var auth=require(_0x1124('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x1124('0x6'));var controller=require(_0x1124('0x7'));router[_0x1124('0x8')]('/',auth['isAuthenticated'](),controller[_0x1124('0x9')]);router[_0x1124('0x8')](_0x1124('0xa'),auth[_0x1124('0xb')](),controller['describe']);router['get']('/:id',auth[_0x1124('0xb')](),controller['show']);router[_0x1124('0x8')](_0x1124('0xc'),auth[_0x1124('0xb')](),controller[_0x1124('0xd')]);router[_0x1124('0x8')](_0x1124('0xe'),auth['isAuthenticated'](),controller[_0x1124('0xf')]);router['get']('/:id/users',auth['isAuthenticated'](),controller[_0x1124('0x10')]);router['post']('/',auth['isAuthenticated'](),controller[_0x1124('0x11')]);router[_0x1124('0x12')](_0x1124('0xe'),auth['isAuthenticated'](),controller[_0x1124('0x13')]);router[_0x1124('0x12')](_0x1124('0x14'),auth[_0x1124('0xb')](),controller['addAgents']);router[_0x1124('0x15')](_0x1124('0x16'),auth[_0x1124('0xb')](),controller[_0x1124('0x17')]);router[_0x1124('0x18')](_0x1124('0x16'),auth[_0x1124('0xb')](),controller[_0x1124('0x19')]);router[_0x1124('0x18')]('/:id/teams',auth['isAuthenticated'](),controller[_0x1124('0x1a')]);router['delete']('/:id/users',auth[_0x1124('0xb')](),controller[_0x1124('0x1b')]);module[_0x1124('0x1c')]=router;
\ No newline at end of file
+var _0xdbf5=['../../components/interaction/service','../../config/environment','./smsQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members','getTeams','post','create','/:id/teams','/:id/users','addAgents','put','update','delete','removeTeams','util','express','Router','../../components/auth/service'];(function(_0x4cc768,_0x28df20){var _0x3b71f2=function(_0x36ad7f){while(--_0x36ad7f){_0x4cc768['push'](_0x4cc768['shift']());}};_0x3b71f2(++_0x28df20);}(_0xdbf5,0x18c));var _0x5dbf=function(_0x31c1d7,_0x1dbbba){_0x31c1d7=_0x31c1d7-0x0;var _0x23c4f7=_0xdbf5[_0x31c1d7];return _0x23c4f7;};'use strict';var multer=require('multer');var util=require(_0x5dbf('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x5dbf('0x1'));var router=express[_0x5dbf('0x2')]();var auth=require(_0x5dbf('0x3'));var interaction=require(_0x5dbf('0x4'));var config=require(_0x5dbf('0x5'));var controller=require(_0x5dbf('0x6'));router[_0x5dbf('0x7')]('/',auth[_0x5dbf('0x8')](),controller[_0x5dbf('0x9')]);router[_0x5dbf('0x7')](_0x5dbf('0xa'),auth[_0x5dbf('0x8')](),controller[_0x5dbf('0xb')]);router['get'](_0x5dbf('0xc'),auth['isAuthenticated'](),controller[_0x5dbf('0xd')]);router[_0x5dbf('0x7')](_0x5dbf('0xe'),auth[_0x5dbf('0x8')](),controller['getMembers']);router[_0x5dbf('0x7')]('/:id/teams',auth['isAuthenticated'](),controller[_0x5dbf('0xf')]);router['get']('/:id/users',auth[_0x5dbf('0x8')](),controller['getAgents']);router[_0x5dbf('0x10')]('/',auth[_0x5dbf('0x8')](),controller[_0x5dbf('0x11')]);router[_0x5dbf('0x10')](_0x5dbf('0x12'),auth['isAuthenticated'](),controller['addTeams']);router[_0x5dbf('0x10')](_0x5dbf('0x13'),auth['isAuthenticated'](),controller[_0x5dbf('0x14')]);router[_0x5dbf('0x15')](_0x5dbf('0xc'),auth[_0x5dbf('0x8')](),controller[_0x5dbf('0x16')]);router[_0x5dbf('0x17')](_0x5dbf('0xc'),auth['isAuthenticated'](),controller['destroy']);router[_0x5dbf('0x17')](_0x5dbf('0x12'),auth[_0x5dbf('0x8')](),controller[_0x5dbf('0x18')]);router[_0x5dbf('0x17')]('/:id/users',auth[_0x5dbf('0x8')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.attributes.js b/server/api/smsQueue/smsQueue.attributes.js
index ee051db..43ebf76 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 _0x3ea5=['ENUM','rrmemory','beepall','roundrobin','sequelize','exports','STRING','INTEGER'];(function(_0x5b2c15,_0xe10d43){var _0x256ac9=function(_0x46ff46){while(--_0x46ff46){_0x5b2c15['push'](_0x5b2c15['shift']());}};_0x256ac9(++_0xe10d43);}(_0x3ea5,0xf4));var _0x53ea=function(_0x710418,_0x170f45){_0x710418=_0x710418-0x0;var _0x3ea526=_0x3ea5[_0x710418];return _0x3ea526;};'use strict';var Sequelize=require(_0x53ea('0x0'));module[_0x53ea('0x1')]={'name':{'type':Sequelize[_0x53ea('0x2')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x53ea('0x2')]},'timeout':{'type':Sequelize[_0x53ea('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x53ea('0x4')](_0x53ea('0x5'),_0x53ea('0x6'),_0x53ea('0x7'))}};
\ No newline at end of file
+var _0xdb18=['roundrobin','sequelize','STRING','ENUM','rrmemory'];(function(_0x5c073e,_0x1373fe){var _0x1279dd=function(_0x37d507){while(--_0x37d507){_0x5c073e['push'](_0x5c073e['shift']());}};_0x1279dd(++_0x1373fe);}(_0xdb18,0x15f));var _0x8db1=function(_0x1b7e07,_0x48cc07){_0x1b7e07=_0x1b7e07-0x0;var _0x559eb3=_0xdb18[_0x1b7e07];return _0x559eb3;};'use strict';var Sequelize=require(_0x8db1('0x0'));module['exports']={'name':{'type':Sequelize[_0x8db1('0x1')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x8db1('0x2')](_0x8db1('0x3'),'beepall',_0x8db1('0x4'))}};
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.controller.js b/server/api/smsQueue/smsQueue.controller.js
index 7196c57..336cd05 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 _0x0b0e=['../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','./smsQueue.socket','register','status','offset','Content-Range','apply','reject','update','then','get','SmsQueues','destroy','end','error','stack','name','send','index','map','SmsQueue','rawAttributes','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','options','count','includeAll','findAll','rows','show','include','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','describe','getMembers','findOne','UserSmsQueue','findAndCountAll','UserId','format','%s/%s','SIP','createdAt','updatedAt','getTeams','Team','addTeams','ids','User','Agents','online','voicePause','interface','transaction','each','findOrCreate','emit','userSmsQueue:save','removeTeams','tq.TeamId','from','team_has_sms_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','SmsQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','sequelize','QueryTypes','SELECT','every','TeamId','includes','all','union','compact','removeAgents','forEach','omit','spread','userSmsQueue:remove','getAgents','html-pdf','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','ioredis'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x0b0e,0x187));var _0xe0b0=function(_0xd5709b,_0x101823){_0xd5709b=_0xd5709b-0x0;var _0x3dc484=_0x0b0e[_0xd5709b];return _0x3dc484;};'use strict';var pdf=require(_0xe0b0('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xe0b0('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe0b0('0x2'));var rp=require(_0xe0b0('0x3'));var moment=require(_0xe0b0('0x4'));var BPromise=require(_0xe0b0('0x5'));var Mustache=require(_0xe0b0('0x6'));var util=require(_0xe0b0('0x7'));var path=require(_0xe0b0('0x8'));var sox=require(_0xe0b0('0x9'));var csv=require(_0xe0b0('0xa'));var ejs=require(_0xe0b0('0xb'));var fs=require('fs');var _=require(_0xe0b0('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xe0b0('0xd'));var deskjs=require(_0xe0b0('0xe'));var toCsv=require(_0xe0b0('0xa'));var querystring=require(_0xe0b0('0xf'));var Papa=require('papaparse');var Redis=require(_0xe0b0('0x10'));var authService=require(_0xe0b0('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xe0b0('0x12'));var hardwareService=require(_0xe0b0('0x13'));var logger=require('../../config/logger')(_0xe0b0('0x14'));var utils=require(_0xe0b0('0x15'));var config=require(_0xe0b0('0x16'));var db=require('../../mysqldb')['db'];config[_0xe0b0('0x17')]=_[_0xe0b0('0x18')](config[_0xe0b0('0x17')],{'host':_0xe0b0('0x19'),'port':0x18eb});var socket=require(_0xe0b0('0x1a'))(new Redis(config['redis']));require(_0xe0b0('0x1b'))[_0xe0b0('0x1c')](socket);function respondWithStatusCode(_0x743318,_0x24babd){_0x24babd=_0x24babd||0xcc;return function(_0x177c24){if(_0x177c24){return _0x743318['sendStatus'](_0x24babd);}return _0x743318[_0xe0b0('0x1d')](_0x24babd)['end']();};}function respondWithResult(_0x35cb40,_0xadee6e){_0xadee6e=_0xadee6e||0xc8;return function(_0x519ae8){if(_0x519ae8){return _0x35cb40[_0xe0b0('0x1d')](_0xadee6e)['json'](_0x519ae8);}};}function respondWithFilteredResult(_0x2d6fb6,_0x100204){return function(_0x56bcc7){if(_0x56bcc7){var _0x54a3eb=_0x56bcc7['count'],_0x46bb44=_0x100204[_0xe0b0('0x1e')],_0x50a441=_0x100204['offset']+_0x100204['limit'],_0x4df8da;if(_0x50a441>=_0x54a3eb){_0x50a441=_0x54a3eb;_0x4df8da=0xc8;}else{_0x4df8da=0xce;}_0x2d6fb6[_0xe0b0('0x1d')](_0x4df8da);return _0x2d6fb6['set'](_0xe0b0('0x1f'),_0x46bb44+'-'+_0x50a441+'/'+_0x54a3eb)['json'](_0x56bcc7);}return null;};}function patchUpdates(_0x2c84cc){return function(_0x1cd7c4){try{jsonpatch[_0xe0b0('0x20')](_0x1cd7c4,_0x2c84cc,!![]);}catch(_0x310a6d){return BPromise[_0xe0b0('0x21')](_0x310a6d);}return _0x1cd7c4['save']();};}function saveUpdates(_0x4cae54,_0x2fa820){return function(_0x5512bb){if(_0x5512bb){return _0x5512bb[_0xe0b0('0x22')](_0x4cae54)[_0xe0b0('0x23')](function(_0x513e63){return _0x513e63;});}return null;};}function removeEntity(_0x170ad8,_0x503883){return function(_0x2208d0){if(_0x2208d0){return _0x2208d0['destroy']()[_0xe0b0('0x23')](function(){var _0x576352=_0x2208d0[_0xe0b0('0x24')]({'plain':!![]});var _0x4de537=_0xe0b0('0x25');return db['UserProfileResource'][_0xe0b0('0x26')]({'where':{'type':_0x4de537,'resourceId':_0x576352['id']}})['then'](function(){return _0x2208d0;});})[_0xe0b0('0x23')](function(){_0x170ad8[_0xe0b0('0x1d')](0xcc)[_0xe0b0('0x27')]();});}};}function handleEntityNotFound(_0x1d91ad,_0x3ec2){return function(_0x10745d){if(!_0x10745d){_0x1d91ad['sendStatus'](0x194);}return _0x10745d;};}function handleError(_0x1444b9,_0x1b8aa8){_0x1b8aa8=_0x1b8aa8||0x1f4;return function(_0x5b7a64){logger[_0xe0b0('0x28')](_0x5b7a64[_0xe0b0('0x29')]);if(_0x5b7a64[_0xe0b0('0x2a')]){delete _0x5b7a64[_0xe0b0('0x2a')];}_0x1444b9[_0xe0b0('0x1d')](_0x1b8aa8)[_0xe0b0('0x2b')](_0x5b7a64);};}exports[_0xe0b0('0x2c')]=function(_0x4fb3b7,_0x1854b8){var _0x3c0109={},_0x48a9b5={},_0x4fe400={'count':0x0,'rows':[]};var _0x158b7f=_[_0xe0b0('0x2d')](db[_0xe0b0('0x2e')][_0xe0b0('0x2f')],function(_0x2ab1b1){return{'name':_0x2ab1b1['fieldName'],'type':_0x2ab1b1[_0xe0b0('0x30')][_0xe0b0('0x31')]};});_0x48a9b5[_0xe0b0('0x32')]=_[_0xe0b0('0x2d')](_0x158b7f,_0xe0b0('0x2a'));_0x48a9b5['query']=_[_0xe0b0('0x33')](_0x4fb3b7[_0xe0b0('0x34')]);_0x48a9b5[_0xe0b0('0x35')]=_[_0xe0b0('0x36')](_0x48a9b5[_0xe0b0('0x32')],_0x48a9b5[_0xe0b0('0x34')]);_0x3c0109[_0xe0b0('0x37')]=_[_0xe0b0('0x36')](_0x48a9b5[_0xe0b0('0x32')],qs[_0xe0b0('0x38')](_0x4fb3b7[_0xe0b0('0x34')][_0xe0b0('0x38')]));_0x3c0109[_0xe0b0('0x37')]=_0x3c0109[_0xe0b0('0x37')][_0xe0b0('0x39')]?_0x3c0109['attributes']:_0x48a9b5[_0xe0b0('0x32')];if(!_0x4fb3b7[_0xe0b0('0x34')][_0xe0b0('0x3a')](_0xe0b0('0x3b'))){_0x3c0109[_0xe0b0('0x3c')]=qs[_0xe0b0('0x3c')](_0x4fb3b7[_0xe0b0('0x34')]['limit']);_0x3c0109['offset']=qs['offset'](_0x4fb3b7['query'][_0xe0b0('0x1e')]);}_0x3c0109[_0xe0b0('0x3d')]=qs[_0xe0b0('0x3e')](_0x4fb3b7['query'][_0xe0b0('0x3e')]);_0x3c0109[_0xe0b0('0x3f')]=qs[_0xe0b0('0x35')](_[_0xe0b0('0x40')](_0x4fb3b7['query'],_0x48a9b5[_0xe0b0('0x35')]));if(_0x4fb3b7[_0xe0b0('0x34')][_0xe0b0('0x41')]){_0x3c0109[_0xe0b0('0x3f')]=_[_0xe0b0('0x42')](_0x3c0109[_0xe0b0('0x3f')],{'$or':_[_0xe0b0('0x2d')](_0x158b7f,function(_0x115a69){if(_0x115a69[_0xe0b0('0x30')]!=='VIRTUAL'){var _0x3e349b={};_0x3e349b[_0x115a69['name']]={'$like':'%'+_0x4fb3b7[_0xe0b0('0x34')][_0xe0b0('0x41')]+'%'};return _0x3e349b;}})});}_0x3c0109=_[_0xe0b0('0x42')]({},_0x3c0109,_0x4fb3b7[_0xe0b0('0x43')]);var _0x4d0f98={'where':_0x3c0109[_0xe0b0('0x3f')]};return db[_0xe0b0('0x2e')][_0xe0b0('0x44')](_0x4d0f98)[_0xe0b0('0x23')](function(_0x19c80e){_0x4fe400[_0xe0b0('0x44')]=_0x19c80e;if(_0x4fb3b7[_0xe0b0('0x34')][_0xe0b0('0x45')]){_0x3c0109['include']=[{'all':!![]}];}return db[_0xe0b0('0x2e')][_0xe0b0('0x46')](_0x3c0109);})['then'](function(_0x515bd2){_0x4fe400[_0xe0b0('0x47')]=_0x515bd2;return _0x4fe400;})[_0xe0b0('0x23')](respondWithFilteredResult(_0x1854b8,_0x3c0109))['catch'](handleError(_0x1854b8,null));};exports[_0xe0b0('0x48')]=function(_0x285d61,_0x6bca5c){var _0x1c869d={'raw':!![],'where':{'id':_0x285d61['params']['id']}},_0x1a8cc7={};_0x1a8cc7['model']=_['keys'](db[_0xe0b0('0x2e')][_0xe0b0('0x2f')]);_0x1a8cc7['query']=_[_0xe0b0('0x33')](_0x285d61[_0xe0b0('0x34')]);_0x1a8cc7[_0xe0b0('0x35')]=_[_0xe0b0('0x36')](_0x1a8cc7[_0xe0b0('0x32')],_0x1a8cc7['query']);_0x1c869d['attributes']=_[_0xe0b0('0x36')](_0x1a8cc7[_0xe0b0('0x32')],qs[_0xe0b0('0x38')](_0x285d61[_0xe0b0('0x34')][_0xe0b0('0x38')]));_0x1c869d['attributes']=_0x1c869d[_0xe0b0('0x37')][_0xe0b0('0x39')]?_0x1c869d['attributes']:_0x1a8cc7['model'];if(_0x285d61['query'][_0xe0b0('0x45')]){_0x1c869d[_0xe0b0('0x49')]=[{'all':!![]}];}_0x1c869d=_[_0xe0b0('0x42')]({},_0x1c869d,_0x285d61[_0xe0b0('0x43')]);return db['SmsQueue'][_0xe0b0('0x4a')](_0x1c869d)[_0xe0b0('0x23')](handleEntityNotFound(_0x6bca5c,null))['then'](respondWithResult(_0x6bca5c,null))['catch'](handleError(_0x6bca5c,null));};exports[_0xe0b0('0x4b')]=function(_0x1bc6e0,_0x497f4f){return db[_0xe0b0('0x2e')][_0xe0b0('0x4b')](_0x1bc6e0['body'],{})['then'](function(_0x123ad2){var _0x511679=_0x1bc6e0[_0xe0b0('0x4c')][_0xe0b0('0x24')]({'plain':!![]});if(!_0x511679)throw new Error(_0xe0b0('0x4d'));if(_0x511679[_0xe0b0('0x4e')]===_0xe0b0('0x4c')){var _0xf9e694=_0x123ad2['get']({'plain':!![]});var _0x5d018d=_0xe0b0('0x25');return db['UserProfileSection']['find']({'where':{'name':_0x5d018d,'userProfileId':_0x511679[_0xe0b0('0x4f')]},'raw':!![]})[_0xe0b0('0x23')](function(_0x54cf7b){if(_0x54cf7b&&_0x54cf7b['autoAssociation']===0x0){return db[_0xe0b0('0x50')][_0xe0b0('0x4b')]({'name':_0xf9e694[_0xe0b0('0x2a')],'resourceId':_0xf9e694['id'],'type':_0x54cf7b[_0xe0b0('0x2a')],'sectionId':_0x54cf7b['id']},{})[_0xe0b0('0x23')](function(){return _0x123ad2;});}else{return _0x123ad2;}})[_0xe0b0('0x51')](function(_0x84fabb){logger['error'](_0xe0b0('0x52'),_0x84fabb);throw _0x84fabb;});}return _0x123ad2;})['then'](respondWithResult(_0x497f4f,0xc9))[_0xe0b0('0x51')](handleError(_0x497f4f,null));};exports['update']=function(_0x5b2055,_0x33822e){if(_0x5b2055[_0xe0b0('0x53')]['id']){delete _0x5b2055[_0xe0b0('0x53')]['id'];}return db[_0xe0b0('0x2e')][_0xe0b0('0x4a')]({'where':{'id':_0x5b2055[_0xe0b0('0x54')]['id']}})[_0xe0b0('0x23')](handleEntityNotFound(_0x33822e,null))[_0xe0b0('0x23')](saveUpdates(_0x5b2055[_0xe0b0('0x53')],null))['then'](respondWithResult(_0x33822e,null))[_0xe0b0('0x51')](handleError(_0x33822e,null));};exports['destroy']=function(_0x2b5553,_0x3ae36e){return db[_0xe0b0('0x2e')][_0xe0b0('0x4a')]({'where':{'id':_0x2b5553[_0xe0b0('0x54')]['id']}})[_0xe0b0('0x23')](handleEntityNotFound(_0x3ae36e,null))['then'](removeEntity(_0x3ae36e,null))[_0xe0b0('0x51')](handleError(_0x3ae36e,null));};exports[_0xe0b0('0x55')]=function(_0x437a15,_0x271445){return db[_0xe0b0('0x2e')][_0xe0b0('0x55')]()[_0xe0b0('0x23')](respondWithResult(_0x271445,null))[_0xe0b0('0x51')](handleError(_0x271445,null));};exports[_0xe0b0('0x56')]=function(_0xf331df,_0x1eb5d6,_0x18ab99){var _0xc719d2={'raw':!![],'where':{}},_0x10eb99={},_0xcdf97;return db[_0xe0b0('0x2e')][_0xe0b0('0x57')]({'where':{'id':_0xf331df[_0xe0b0('0x54')]['id']}})['then'](handleEntityNotFound(_0x1eb5d6,null))[_0xe0b0('0x23')](function(_0xe7fbac){if(_0xe7fbac){_0xcdf97=_0xe7fbac[_0xe0b0('0x24')]({'plain':!![]});_0x10eb99[_0xe0b0('0x32')]=_[_0xe0b0('0x33')](db[_0xe0b0('0x58')][_0xe0b0('0x2f')]);_0x10eb99['query']=_['keys'](_0xf331df[_0xe0b0('0x34')]);_0x10eb99[_0xe0b0('0x35')]=_[_0xe0b0('0x36')](_0x10eb99['model'],_0x10eb99[_0xe0b0('0x34')]);_0xc719d2[_0xe0b0('0x37')]=_[_0xe0b0('0x36')](_0x10eb99[_0xe0b0('0x32')],qs[_0xe0b0('0x38')](_0xf331df['query'][_0xe0b0('0x38')]));_0xc719d2[_0xe0b0('0x37')]=_0xc719d2[_0xe0b0('0x37')]['length']?_0xc719d2[_0xe0b0('0x37')]:_0x10eb99[_0xe0b0('0x32')];if(!_0xf331df['query'][_0xe0b0('0x3a')]('nolimit')){_0xc719d2['limit']=qs[_0xe0b0('0x3c')](_0xf331df['query']['limit']);_0xc719d2[_0xe0b0('0x1e')]=qs[_0xe0b0('0x1e')](_0xf331df[_0xe0b0('0x34')][_0xe0b0('0x1e')]);}_0xc719d2['order']=qs[_0xe0b0('0x3e')](_0xf331df[_0xe0b0('0x34')][_0xe0b0('0x3e')]);_0xc719d2[_0xe0b0('0x3f')]=qs[_0xe0b0('0x35')](_[_0xe0b0('0x40')](_0xf331df[_0xe0b0('0x34')],_0x10eb99[_0xe0b0('0x35')]));_0xc719d2['where']['SmsQueueId']=_0xe7fbac['id'];if(_0xf331df[_0xe0b0('0x34')][_0xe0b0('0x41')]){_0xc719d2[_0xe0b0('0x3f')]=_['merge'](_0xc719d2['where'],{'$or':_[_0xe0b0('0x2d')](_0xc719d2[_0xe0b0('0x37')],function(_0x5d7cf4){var _0x5eca3d={};_0x5eca3d[_0x5d7cf4]={'$like':'%'+_0xf331df[_0xe0b0('0x34')][_0xe0b0('0x41')]+'%'};return _0x5eca3d;})});}_0xc719d2=_[_0xe0b0('0x42')]({},_0xc719d2,_0xf331df[_0xe0b0('0x43')]);return db[_0xe0b0('0x58')][_0xe0b0('0x46')](_0xc719d2);}})[_0xe0b0('0x23')](function(_0x1b997d){if(_0x1b997d){return db['User'][_0xe0b0('0x59')]({'where':{'id':_[_0xe0b0('0x2d')](_0x1b997d,_0xe0b0('0x5a')),'role':'agent'},'attributes':['id','name','smsPause','updatedAt','createdAt']});}})['then'](function(_0x252527){if(_0x252527){return{'count':_0x252527['count'],'rows':_['map'](_0x252527[_0xe0b0('0x47')],function(_0x2dc06d){return{'membername':_0x2dc06d[_0xe0b0('0x2a')],'UserId':_0x2dc06d['id'],'queue_name':_0xcdf97[_0xe0b0('0x2a')],'SmsQueueId':_0xcdf97['id'],'interface':util[_0xe0b0('0x5b')](_0xe0b0('0x5c'),_0xe0b0('0x5d'),_0x2dc06d[_0xe0b0('0x2a')]),'penalty':0x0,'paused':_0x2dc06d['smsPause'],'createdAt':_0x2dc06d[_0xe0b0('0x5e')],'updatedAt':_0x2dc06d[_0xe0b0('0x5f')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xe0b0('0x23')](respondWithFilteredResult(_0x1eb5d6,_0xc719d2))[_0xe0b0('0x51')](handleError(_0x1eb5d6,null));};exports[_0xe0b0('0x60')]=function(_0x1f70fb,_0x16a2ae,_0x5e3e28){var _0xaf2607={};var _0x5981a3={};var _0x2c9147;var _0x28b927;return db[_0xe0b0('0x2e')][_0xe0b0('0x57')]({'where':{'id':_0x1f70fb['params']['id']}})[_0xe0b0('0x23')](handleEntityNotFound(_0x16a2ae,null))[_0xe0b0('0x23')](function(_0x49deef){if(_0x49deef){_0x2c9147=_0x49deef;_0x5981a3['model']=_[_0xe0b0('0x33')](db[_0xe0b0('0x61')][_0xe0b0('0x2f')]);_0x5981a3[_0xe0b0('0x34')]=_[_0xe0b0('0x33')](_0x1f70fb[_0xe0b0('0x34')]);_0x5981a3[_0xe0b0('0x35')]=_[_0xe0b0('0x36')](_0x5981a3[_0xe0b0('0x32')],_0x5981a3[_0xe0b0('0x34')]);_0xaf2607['attributes']=_['intersection'](_0x5981a3[_0xe0b0('0x32')],qs['fields'](_0x1f70fb['query']['fields']));_0xaf2607['attributes']=_0xaf2607[_0xe0b0('0x37')]['length']?_0xaf2607[_0xe0b0('0x37')]:_0x5981a3[_0xe0b0('0x32')];_0xaf2607[_0xe0b0('0x3d')]=qs[_0xe0b0('0x3e')](_0x1f70fb['query'][_0xe0b0('0x3e')]);_0xaf2607[_0xe0b0('0x3f')]=qs['filters'](_[_0xe0b0('0x40')](_0x1f70fb[_0xe0b0('0x34')],_0x5981a3[_0xe0b0('0x35')]));if(_0x1f70fb[_0xe0b0('0x34')][_0xe0b0('0x41')]){_0xaf2607['where']=_['merge'](_0xaf2607['where'],{'$or':_['map'](_0xaf2607['attributes'],function(_0xfbe16d){var _0x567e1a={};_0x567e1a[_0xfbe16d]={'$like':'%'+_0x1f70fb[_0xe0b0('0x34')]['filter']+'%'};return _0x567e1a;})});}_0xaf2607=_[_0xe0b0('0x42')]({},_0xaf2607,_0x1f70fb[_0xe0b0('0x43')]);return _0x2c9147[_0xe0b0('0x60')](_0xaf2607);}})[_0xe0b0('0x23')](function(_0x199929){if(_0x199929){_0x28b927=_0x199929[_0xe0b0('0x39')];if(!_0x1f70fb['query']['hasOwnProperty']('nolimit')){_0xaf2607['limit']=qs[_0xe0b0('0x3c')](_0x1f70fb[_0xe0b0('0x34')][_0xe0b0('0x3c')]);_0xaf2607[_0xe0b0('0x1e')]=qs[_0xe0b0('0x1e')](_0x1f70fb['query'][_0xe0b0('0x1e')]);}return _0x2c9147[_0xe0b0('0x60')](_0xaf2607);}})[_0xe0b0('0x23')](function(_0xc6090e){if(_0xc6090e){return _0xc6090e?{'count':_0x28b927,'rows':_0xc6090e}:null;}})[_0xe0b0('0x23')](respondWithResult(_0x16a2ae,null))[_0xe0b0('0x51')](handleError(_0x16a2ae,null));};exports[_0xe0b0('0x62')]=function(_0x7beacf,_0x14f721,_0x5565ef){var _0x589c47=_0x7beacf[_0xe0b0('0x53')][_0xe0b0('0x63')];return db['Team'][_0xe0b0('0x46')]({'where':{'id':_0x589c47},'attributes':['id'],'include':[{'model':db[_0xe0b0('0x64')],'as':_0xe0b0('0x65'),'attributes':['id',_0xe0b0('0x2a'),_0xe0b0('0x66'),_0xe0b0('0x67'),_0xe0b0('0x68')],'raw':!![]}]})[_0xe0b0('0x23')](function(_0x50b883){if(_0x50b883){var _0x5f4911=_['flatMap'](_0x50b883,function(_0xc19743){var _0x90d471=_0xc19743['get']({'plain':!![]});return _0x90d471[_0xe0b0('0x65')];});return db[_0xe0b0('0x2e')][_0xe0b0('0x4a')]({'where':{'id':_0x7beacf[_0xe0b0('0x54')]['id']}})['then'](function(_0x56c4b9){return db['sequelize'][_0xe0b0('0x69')](function(_0x266835){return _0x56c4b9['addTeams'](_0x589c47,{'transaction':_0x266835})[_0xe0b0('0x23')](function(){return BPromise[_0xe0b0('0x6a')](_0x5f4911,function(_0x5547ee){return db['UserSmsQueue'][_0xe0b0('0x6b')]({'where':{'UserId':_0x5547ee['id'],'SmsQueueId':_0x7beacf['params']['id']},'transaction':_0x266835});});})[_0xe0b0('0x23')](function(){_0x5f4911['forEach'](function(_0x22e240){socket[_0xe0b0('0x6c')](_0xe0b0('0x6d'),{'UserId':_0x22e240['id'],'SmsQueueId':_0x56c4b9['id']});});});});});}})[_0xe0b0('0x23')](respondWithStatusCode(_0x14f721,null))[_0xe0b0('0x51')](handleError(_0x14f721,null));};exports[_0xe0b0('0x6e')]=function(_0x434dfa,_0x2ebbb5,_0xf76449){return db['Team'][_0xe0b0('0x46')]({'where':{'id':_0x434dfa[_0xe0b0('0x34')][_0xe0b0('0x63')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0xe0b0('0x65'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x2ebbb5,null))[_0xe0b0('0x23')](function(_0x350c40){var _0x570402=_[_0xe0b0('0x2d')](_0x350c40,'id');var _0x4e4b45=[];var _0x528932=[];var _0x4e0b18=squel['select']();_0x4e0b18['field'](_0xe0b0('0x6f'))[_0xe0b0('0x70')](_0xe0b0('0x71'),'tq')[_0xe0b0('0x72')](_0xe0b0('0x73'),'ut',_0xe0b0('0x74'))['where'](_0xe0b0('0x75'),_0x434dfa[_0xe0b0('0x54')]['id']);for(var _0x421b3b=0x0;_0x421b3b<_0x350c40['length'];_0x421b3b+=0x1){let _0x2a4f5d=_0x350c40[_0x421b3b];for(var _0x447641=0x0;_0x447641<_0x2a4f5d['Agents']['length'];_0x447641+=0x1){let _0x33f89a=_0x2a4f5d['Agents'][_0x447641];var _0x46ab89=_0x4e0b18[_0xe0b0('0x76')]();_0x46ab89[_0xe0b0('0x3f')](_0xe0b0('0x77'),_0x33f89a['id']);_0x528932[_0xe0b0('0x78')](db[_0xe0b0('0x79')][_0xe0b0('0x34')](_0x46ab89['toString'](),{'type':db[_0xe0b0('0x79')][_0xe0b0('0x7a')][_0xe0b0('0x7b')]})[_0xe0b0('0x23')](function(_0x2b087b){if(_0x2b087b['length']===0x1){return _0x33f89a['id'];}else{var _0x5b91a2=_[_0xe0b0('0x7c')](_[_0xe0b0('0x2d')](_0x2b087b,_0xe0b0('0x7d')),function(_0x268d0c){return _[_0xe0b0('0x7e')](_0x570402,_0x268d0c);});if(_0x5b91a2){return _0x33f89a['id'];}}}));}}return BPromise[_0xe0b0('0x7f')](_0x528932)[_0xe0b0('0x23')](function(_0x387389){_0x4e4b45=_(_0x4e4b45)[_0xe0b0('0x80')](_0x387389)[_0xe0b0('0x81')]()['value']();return db[_0xe0b0('0x2e')][_0xe0b0('0x4a')]({'where':{'id':_0x434dfa[_0xe0b0('0x54')]['id']}})[_0xe0b0('0x23')](function(_0x55e456){return db[_0xe0b0('0x79')][_0xe0b0('0x69')](function(_0x1641dd){return _0x55e456[_0xe0b0('0x6e')](_0x434dfa[_0xe0b0('0x34')]['ids'],{'transaction':_0x1641dd})[_0xe0b0('0x23')](function(){if(!_['isEmpty'](_0x4e4b45)){return _0x55e456[_0xe0b0('0x82')](_0x4e4b45,{'transaction':_0x1641dd});}})[_0xe0b0('0x23')](function(){_0x4e4b45[_0xe0b0('0x83')](function(_0x23c448){socket[_0xe0b0('0x6c')]('userSmsQueue:remove',{'UserId':_0x23c448,'SmsQueueId':_0x55e456['id']});});});});});});})['then'](respondWithStatusCode(_0x2ebbb5,null))[_0xe0b0('0x51')](handleError(_0x2ebbb5,null));};exports['addAgents']=function(_0x436ab9,_0x4c82d6,_0x1b10be){return db[_0xe0b0('0x2e')][_0xe0b0('0x4a')]({'where':{'id':_0x436ab9[_0xe0b0('0x54')]['id']}})[_0xe0b0('0x23')](handleEntityNotFound(_0x4c82d6,null))[_0xe0b0('0x23')](function(_0x43ff30){if(_0x43ff30){return _0x43ff30['addAgents'](_0x436ab9['body'][_0xe0b0('0x63')],_[_0xe0b0('0x84')](_0x436ab9[_0xe0b0('0x53')],[_0xe0b0('0x63'),'id'])||{})[_0xe0b0('0x85')](function(_0x2b4d49){for(var _0x3b7a7a=0x0;_0x3b7a7a<_0x436ab9[_0xe0b0('0x53')][_0xe0b0('0x63')][_0xe0b0('0x39')];_0x3b7a7a+=0x1){socket['emit']('userSmsQueue:save',{'UserId':_0x436ab9[_0xe0b0('0x53')][_0xe0b0('0x63')][_0x3b7a7a],'SmsQueueId':_0x436ab9[_0xe0b0('0x54')]['id']});}return _0x2b4d49;});}})[_0xe0b0('0x23')](respondWithResult(_0x4c82d6,null))[_0xe0b0('0x51')](handleError(_0x4c82d6,null));};exports[_0xe0b0('0x82')]=function(_0x33b67a,_0x51995b,_0x4c4748){return db[_0xe0b0('0x2e')][_0xe0b0('0x4a')]({'where':{'id':_0x33b67a[_0xe0b0('0x54')]['id']}})[_0xe0b0('0x23')](handleEntityNotFound(_0x51995b,null))[_0xe0b0('0x23')](function(_0x19cc74){if(_0x19cc74){return _0x19cc74[_0xe0b0('0x82')](_0x33b67a[_0xe0b0('0x34')][_0xe0b0('0x63')])[_0xe0b0('0x23')](function(){if(_['isArray'](_0x33b67a[_0xe0b0('0x34')][_0xe0b0('0x63')])){for(var _0x47b456=0x0;_0x47b456<_0x33b67a[_0xe0b0('0x34')][_0xe0b0('0x63')][_0xe0b0('0x39')];_0x47b456+=0x1){socket[_0xe0b0('0x6c')](_0xe0b0('0x86'),{'UserId':Number(_0x33b67a['query'][_0xe0b0('0x63')][_0x47b456]),'SmsQueueId':Number(_0x33b67a[_0xe0b0('0x54')]['id'])});}}else{socket[_0xe0b0('0x6c')](_0xe0b0('0x86'),{'UserId':Number(_0x33b67a[_0xe0b0('0x34')]['ids']),'SmsQueueId':Number(_0x33b67a[_0xe0b0('0x54')]['id'])});}});}})['then'](respondWithStatusCode(_0x51995b,null))[_0xe0b0('0x51')](handleError(_0x51995b,null));};exports[_0xe0b0('0x87')]=function(_0x17cc14,_0x539a12,_0x5d5e32){var _0x45ae1a={};var _0x2349df={};var _0x619226;var _0x47d9d1;return db['SmsQueue']['findOne']({'where':{'id':_0x17cc14['params']['id']}})['then'](handleEntityNotFound(_0x539a12,null))['then'](function(_0x3474ab){if(_0x3474ab){_0x619226=_0x3474ab;_0x2349df[_0xe0b0('0x32')]=_['keys'](db[_0xe0b0('0x64')][_0xe0b0('0x2f')]);_0x2349df[_0xe0b0('0x34')]=_[_0xe0b0('0x33')](_0x17cc14[_0xe0b0('0x34')]);_0x2349df['filters']=_['intersection'](_0x2349df[_0xe0b0('0x32')],_0x2349df[_0xe0b0('0x34')]);_0x45ae1a[_0xe0b0('0x37')]=_['intersection'](_0x2349df[_0xe0b0('0x32')],qs[_0xe0b0('0x38')](_0x17cc14[_0xe0b0('0x34')][_0xe0b0('0x38')]));_0x45ae1a[_0xe0b0('0x37')]=_0x45ae1a[_0xe0b0('0x37')]['length']?_0x45ae1a['attributes']:_0x2349df['model'];_0x45ae1a[_0xe0b0('0x3d')]=qs[_0xe0b0('0x3e')](_0x17cc14[_0xe0b0('0x34')][_0xe0b0('0x3e')]);_0x45ae1a[_0xe0b0('0x3f')]=qs[_0xe0b0('0x35')](_[_0xe0b0('0x40')](_0x17cc14[_0xe0b0('0x34')],_0x2349df['filters']));if(_0x17cc14['query'][_0xe0b0('0x41')]){_0x45ae1a[_0xe0b0('0x3f')]=_[_0xe0b0('0x42')](_0x45ae1a['where'],{'$or':_[_0xe0b0('0x2d')](_0x45ae1a[_0xe0b0('0x37')],function(_0x9f1fb){var _0x4949fe={};_0x4949fe[_0x9f1fb]={'$like':'%'+_0x17cc14[_0xe0b0('0x34')]['filter']+'%'};return _0x4949fe;})});}_0x45ae1a=_[_0xe0b0('0x42')]({},_0x45ae1a,_0x17cc14[_0xe0b0('0x43')]);return _0x619226[_0xe0b0('0x87')](_0x45ae1a);}})[_0xe0b0('0x23')](function(_0x3b133a){if(_0x3b133a){_0x47d9d1=_0x3b133a[_0xe0b0('0x39')];if(!_0x17cc14[_0xe0b0('0x34')]['hasOwnProperty'](_0xe0b0('0x3b'))){_0x45ae1a[_0xe0b0('0x3c')]=qs['limit'](_0x17cc14[_0xe0b0('0x34')][_0xe0b0('0x3c')]);_0x45ae1a[_0xe0b0('0x1e')]=qs['offset'](_0x17cc14[_0xe0b0('0x34')][_0xe0b0('0x1e')]);}return _0x619226[_0xe0b0('0x87')](_0x45ae1a);}})['then'](function(_0xed8461){if(_0xed8461){return _0xed8461?{'count':_0x47d9d1,'rows':_0xed8461}:null;}})[_0xe0b0('0x23')](respondWithResult(_0x539a12,null))[_0xe0b0('0x51')](handleError(_0x539a12,null));};
\ No newline at end of file
+var _0x1967=['localhost','socket.io-emitter','./smsQueue.socket','register','sendStatus','end','status','json','count','offset','reject','save','update','then','destroy','get','SmsQueues','error','name','index','map','SmsQueue','rawAttributes','fieldName','type','key','model','query','intersection','attributes','fields','length','nolimit','limit','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','catch','filters','create','body','user','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','params','describe','getMembers','findOne','keys','UserSmsQueue','hasOwnProperty','SmsQueueId','User','agent','smsPause','updatedAt','rows','format','SIP','createdAt','getTeams','Team','addTeams','Agents','interface','sequelize','transaction','each','findOrCreate','forEach','emit','userSmsQueue:save','removeTeams','ids','select','team_has_sms_queues','join','user_has_teams','clone','toString','QueryTypes','every','TeamId','includes','all','union','compact','isEmpty','removeAgents','userSmsQueue:remove','addAgents','spread','getAgents','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','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults'];(function(_0x7f41cd,_0x2eabb6){var _0xad4818=function(_0x25224e){while(--_0x25224e){_0x7f41cd['push'](_0x7f41cd['shift']());}};_0xad4818(++_0x2eabb6);}(_0x1967,0x173));var _0x7196=function(_0x1187f1,_0xbe2b7f){_0x1187f1=_0x1187f1-0x0;var _0x4161d5=_0x1967[_0x1187f1];return _0x4161d5;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x7196('0x0'));var rimraf=require(_0x7196('0x1'));var zipdir=require(_0x7196('0x2'));var jsonpatch=require(_0x7196('0x3'));var rp=require(_0x7196('0x4'));var moment=require(_0x7196('0x5'));var BPromise=require(_0x7196('0x6'));var Mustache=require(_0x7196('0x7'));var util=require(_0x7196('0x8'));var path=require(_0x7196('0x9'));var sox=require('sox');var csv=require(_0x7196('0xa'));var ejs=require(_0x7196('0xb'));var fs=require('fs');var _=require(_0x7196('0xc'));var squel=require(_0x7196('0xd'));var crypto=require(_0x7196('0xe'));var jsforce=require(_0x7196('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x7196('0xa'));var querystring=require(_0x7196('0x10'));var Papa=require(_0x7196('0x11'));var Redis=require(_0x7196('0x12'));var authService=require(_0x7196('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7196('0x14'));var logger=require(_0x7196('0x15'))(_0x7196('0x16'));var utils=require(_0x7196('0x17'));var config=require(_0x7196('0x18'));var db=require(_0x7196('0x19'))['db'];config[_0x7196('0x1a')]=_[_0x7196('0x1b')](config[_0x7196('0x1a')],{'host':_0x7196('0x1c'),'port':0x18eb});var socket=require(_0x7196('0x1d'))(new Redis(config['redis']));require(_0x7196('0x1e'))[_0x7196('0x1f')](socket);function respondWithStatusCode(_0x3545aa,_0xf098c1){_0xf098c1=_0xf098c1||0xcc;return function(_0x511aa1){if(_0x511aa1){return _0x3545aa[_0x7196('0x20')](_0xf098c1);}return _0x3545aa['status'](_0xf098c1)[_0x7196('0x21')]();};}function respondWithResult(_0x2590a6,_0xf7e97){_0xf7e97=_0xf7e97||0xc8;return function(_0x3ed1ad){if(_0x3ed1ad){return _0x2590a6[_0x7196('0x22')](_0xf7e97)[_0x7196('0x23')](_0x3ed1ad);}};}function respondWithFilteredResult(_0x22bd62,_0x1ed296){return function(_0x3e4e69){if(_0x3e4e69){var _0x32fe2b=_0x3e4e69[_0x7196('0x24')],_0x385f2d=_0x1ed296[_0x7196('0x25')],_0x5b716a=_0x1ed296[_0x7196('0x25')]+_0x1ed296['limit'],_0x4c4f91;if(_0x5b716a>=_0x32fe2b){_0x5b716a=_0x32fe2b;_0x4c4f91=0xc8;}else{_0x4c4f91=0xce;}_0x22bd62[_0x7196('0x22')](_0x4c4f91);return _0x22bd62['set']('Content-Range',_0x385f2d+'-'+_0x5b716a+'/'+_0x32fe2b)[_0x7196('0x23')](_0x3e4e69);}return null;};}function patchUpdates(_0x627223){return function(_0x8dee9d){try{jsonpatch['apply'](_0x8dee9d,_0x627223,!![]);}catch(_0x57c390){return BPromise[_0x7196('0x26')](_0x57c390);}return _0x8dee9d[_0x7196('0x27')]();};}function saveUpdates(_0x598a26,_0x18649b){return function(_0x27ff84){if(_0x27ff84){return _0x27ff84[_0x7196('0x28')](_0x598a26)[_0x7196('0x29')](function(_0x38b3d6){return _0x38b3d6;});}return null;};}function removeEntity(_0x549f34,_0x3f8178){return function(_0x520d01){if(_0x520d01){return _0x520d01[_0x7196('0x2a')]()[_0x7196('0x29')](function(){var _0x2e15c7=_0x520d01[_0x7196('0x2b')]({'plain':!![]});var _0x70aa65=_0x7196('0x2c');return db['UserProfileResource']['destroy']({'where':{'type':_0x70aa65,'resourceId':_0x2e15c7['id']}})[_0x7196('0x29')](function(){return _0x520d01;});})[_0x7196('0x29')](function(){_0x549f34[_0x7196('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5aa538,_0x41cfd2){return function(_0x162cfc){if(!_0x162cfc){_0x5aa538[_0x7196('0x20')](0x194);}return _0x162cfc;};}function handleError(_0x4c6006,_0x35eef9){_0x35eef9=_0x35eef9||0x1f4;return function(_0x4ecea1){logger[_0x7196('0x2d')](_0x4ecea1['stack']);if(_0x4ecea1[_0x7196('0x2e')]){delete _0x4ecea1[_0x7196('0x2e')];}_0x4c6006[_0x7196('0x22')](_0x35eef9)['send'](_0x4ecea1);};}exports[_0x7196('0x2f')]=function(_0x45d567,_0x2f9583){var _0xf999e9={},_0x50c386={},_0x39710d={'count':0x0,'rows':[]};var _0x429160=_[_0x7196('0x30')](db[_0x7196('0x31')][_0x7196('0x32')],function(_0x2786f3){return{'name':_0x2786f3[_0x7196('0x33')],'type':_0x2786f3[_0x7196('0x34')][_0x7196('0x35')]};});_0x50c386[_0x7196('0x36')]=_[_0x7196('0x30')](_0x429160,'name');_0x50c386[_0x7196('0x37')]=_['keys'](_0x45d567[_0x7196('0x37')]);_0x50c386['filters']=_[_0x7196('0x38')](_0x50c386[_0x7196('0x36')],_0x50c386['query']);_0xf999e9[_0x7196('0x39')]=_[_0x7196('0x38')](_0x50c386[_0x7196('0x36')],qs[_0x7196('0x3a')](_0x45d567[_0x7196('0x37')]['fields']));_0xf999e9[_0x7196('0x39')]=_0xf999e9[_0x7196('0x39')][_0x7196('0x3b')]?_0xf999e9[_0x7196('0x39')]:_0x50c386[_0x7196('0x36')];if(!_0x45d567[_0x7196('0x37')]['hasOwnProperty'](_0x7196('0x3c'))){_0xf999e9[_0x7196('0x3d')]=qs[_0x7196('0x3d')](_0x45d567['query'][_0x7196('0x3d')]);_0xf999e9[_0x7196('0x25')]=qs[_0x7196('0x25')](_0x45d567[_0x7196('0x37')][_0x7196('0x25')]);}_0xf999e9[_0x7196('0x3e')]=qs[_0x7196('0x3f')](_0x45d567[_0x7196('0x37')][_0x7196('0x3f')]);_0xf999e9[_0x7196('0x40')]=qs['filters'](_[_0x7196('0x41')](_0x45d567[_0x7196('0x37')],_0x50c386['filters']));if(_0x45d567[_0x7196('0x37')]['filter']){_0xf999e9['where']=_[_0x7196('0x42')](_0xf999e9[_0x7196('0x40')],{'$or':_['map'](_0x429160,function(_0x587f6f){if(_0x587f6f[_0x7196('0x34')]!==_0x7196('0x43')){var _0xed32cd={};_0xed32cd[_0x587f6f['name']]={'$like':'%'+_0x45d567[_0x7196('0x37')][_0x7196('0x44')]+'%'};return _0xed32cd;}})});}_0xf999e9=_[_0x7196('0x42')]({},_0xf999e9,_0x45d567[_0x7196('0x45')]);var _0x16da09={'where':_0xf999e9[_0x7196('0x40')]};return db[_0x7196('0x31')][_0x7196('0x24')](_0x16da09)['then'](function(_0x89c8ea){_0x39710d[_0x7196('0x24')]=_0x89c8ea;if(_0x45d567['query'][_0x7196('0x46')]){_0xf999e9[_0x7196('0x47')]=[{'all':!![]}];}return db['SmsQueue'][_0x7196('0x48')](_0xf999e9);})[_0x7196('0x29')](function(_0x3b78c8){_0x39710d['rows']=_0x3b78c8;return _0x39710d;})[_0x7196('0x29')](respondWithFilteredResult(_0x2f9583,_0xf999e9))[_0x7196('0x49')](handleError(_0x2f9583,null));};exports['show']=function(_0xcd287c,_0x1a7052){var _0x4f0c6c={'raw':!![],'where':{'id':_0xcd287c['params']['id']}},_0x335e6f={};_0x335e6f['model']=_['keys'](db['SmsQueue']['rawAttributes']);_0x335e6f[_0x7196('0x37')]=_['keys'](_0xcd287c[_0x7196('0x37')]);_0x335e6f[_0x7196('0x4a')]=_[_0x7196('0x38')](_0x335e6f[_0x7196('0x36')],_0x335e6f['query']);_0x4f0c6c[_0x7196('0x39')]=_['intersection'](_0x335e6f[_0x7196('0x36')],qs[_0x7196('0x3a')](_0xcd287c[_0x7196('0x37')]['fields']));_0x4f0c6c[_0x7196('0x39')]=_0x4f0c6c[_0x7196('0x39')][_0x7196('0x3b')]?_0x4f0c6c['attributes']:_0x335e6f['model'];if(_0xcd287c[_0x7196('0x37')]['includeAll']){_0x4f0c6c[_0x7196('0x47')]=[{'all':!![]}];}_0x4f0c6c=_['merge']({},_0x4f0c6c,_0xcd287c['options']);return db[_0x7196('0x31')]['find'](_0x4f0c6c)['then'](handleEntityNotFound(_0x1a7052,null))['then'](respondWithResult(_0x1a7052,null))[_0x7196('0x49')](handleError(_0x1a7052,null));};exports['create']=function(_0x48e3b5,_0x28591e){return db[_0x7196('0x31')][_0x7196('0x4b')](_0x48e3b5[_0x7196('0x4c')],{})['then'](function(_0x50cc66){var _0x564688=_0x48e3b5[_0x7196('0x4d')][_0x7196('0x2b')]({'plain':!![]});if(!_0x564688)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x564688[_0x7196('0x4e')]===_0x7196('0x4d')){var _0x3fe092=_0x50cc66['get']({'plain':!![]});var _0x317ab6='SmsQueues';return db[_0x7196('0x4f')][_0x7196('0x50')]({'where':{'name':_0x317ab6,'userProfileId':_0x564688[_0x7196('0x51')]},'raw':!![]})[_0x7196('0x29')](function(_0x41a9aa){if(_0x41a9aa&&_0x41a9aa[_0x7196('0x52')]===0x0){return db[_0x7196('0x53')][_0x7196('0x4b')]({'name':_0x3fe092['name'],'resourceId':_0x3fe092['id'],'type':_0x41a9aa['name'],'sectionId':_0x41a9aa['id']},{})[_0x7196('0x29')](function(){return _0x50cc66;});}else{return _0x50cc66;}})[_0x7196('0x49')](function(_0x40f820){logger[_0x7196('0x2d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x40f820);throw _0x40f820;});}return _0x50cc66;})[_0x7196('0x29')](respondWithResult(_0x28591e,0xc9))[_0x7196('0x49')](handleError(_0x28591e,null));};exports[_0x7196('0x28')]=function(_0x11dc10,_0x9fcfd4){if(_0x11dc10[_0x7196('0x4c')]['id']){delete _0x11dc10[_0x7196('0x4c')]['id'];}return db[_0x7196('0x31')][_0x7196('0x50')]({'where':{'id':_0x11dc10[_0x7196('0x54')]['id']}})[_0x7196('0x29')](handleEntityNotFound(_0x9fcfd4,null))['then'](saveUpdates(_0x11dc10[_0x7196('0x4c')],null))[_0x7196('0x29')](respondWithResult(_0x9fcfd4,null))[_0x7196('0x49')](handleError(_0x9fcfd4,null));};exports['destroy']=function(_0x1f098c,_0x5ca1ca){return db[_0x7196('0x31')][_0x7196('0x50')]({'where':{'id':_0x1f098c[_0x7196('0x54')]['id']}})[_0x7196('0x29')](handleEntityNotFound(_0x5ca1ca,null))[_0x7196('0x29')](removeEntity(_0x5ca1ca,null))['catch'](handleError(_0x5ca1ca,null));};exports[_0x7196('0x55')]=function(_0x5b77fc,_0x4be36d){return db['SmsQueue'][_0x7196('0x55')]()[_0x7196('0x29')](respondWithResult(_0x4be36d,null))[_0x7196('0x49')](handleError(_0x4be36d,null));};exports[_0x7196('0x56')]=function(_0x105a3f,_0x41fa94,_0x2d8b3d){var _0x560ddb={'raw':!![],'where':{}},_0x293467={},_0x14dc43;return db[_0x7196('0x31')][_0x7196('0x57')]({'where':{'id':_0x105a3f[_0x7196('0x54')]['id']}})['then'](handleEntityNotFound(_0x41fa94,null))['then'](function(_0xa7ecfb){if(_0xa7ecfb){_0x14dc43=_0xa7ecfb[_0x7196('0x2b')]({'plain':!![]});_0x293467[_0x7196('0x36')]=_[_0x7196('0x58')](db[_0x7196('0x59')][_0x7196('0x32')]);_0x293467[_0x7196('0x37')]=_[_0x7196('0x58')](_0x105a3f[_0x7196('0x37')]);_0x293467[_0x7196('0x4a')]=_[_0x7196('0x38')](_0x293467['model'],_0x293467[_0x7196('0x37')]);_0x560ddb[_0x7196('0x39')]=_[_0x7196('0x38')](_0x293467[_0x7196('0x36')],qs['fields'](_0x105a3f[_0x7196('0x37')][_0x7196('0x3a')]));_0x560ddb[_0x7196('0x39')]=_0x560ddb[_0x7196('0x39')][_0x7196('0x3b')]?_0x560ddb[_0x7196('0x39')]:_0x293467[_0x7196('0x36')];if(!_0x105a3f['query'][_0x7196('0x5a')](_0x7196('0x3c'))){_0x560ddb[_0x7196('0x3d')]=qs[_0x7196('0x3d')](_0x105a3f['query'][_0x7196('0x3d')]);_0x560ddb[_0x7196('0x25')]=qs[_0x7196('0x25')](_0x105a3f[_0x7196('0x37')][_0x7196('0x25')]);}_0x560ddb[_0x7196('0x3e')]=qs[_0x7196('0x3f')](_0x105a3f['query']['sort']);_0x560ddb['where']=qs[_0x7196('0x4a')](_['pick'](_0x105a3f[_0x7196('0x37')],_0x293467[_0x7196('0x4a')]));_0x560ddb[_0x7196('0x40')][_0x7196('0x5b')]=_0xa7ecfb['id'];if(_0x105a3f[_0x7196('0x37')][_0x7196('0x44')]){_0x560ddb[_0x7196('0x40')]=_[_0x7196('0x42')](_0x560ddb[_0x7196('0x40')],{'$or':_['map'](_0x560ddb['attributes'],function(_0x4542c1){var _0x3f939a={};_0x3f939a[_0x4542c1]={'$like':'%'+_0x105a3f[_0x7196('0x37')][_0x7196('0x44')]+'%'};return _0x3f939a;})});}_0x560ddb=_[_0x7196('0x42')]({},_0x560ddb,_0x105a3f[_0x7196('0x45')]);return db[_0x7196('0x59')][_0x7196('0x48')](_0x560ddb);}})['then'](function(_0x4cb99d){if(_0x4cb99d){return db[_0x7196('0x5c')]['findAndCountAll']({'where':{'id':_[_0x7196('0x30')](_0x4cb99d,'UserId'),'role':_0x7196('0x5d')},'attributes':['id',_0x7196('0x2e'),_0x7196('0x5e'),_0x7196('0x5f'),'createdAt']});}})['then'](function(_0x33d301){if(_0x33d301){return{'count':_0x33d301['count'],'rows':_[_0x7196('0x30')](_0x33d301[_0x7196('0x60')],function(_0x4526e8){return{'membername':_0x4526e8[_0x7196('0x2e')],'UserId':_0x4526e8['id'],'queue_name':_0x14dc43[_0x7196('0x2e')],'SmsQueueId':_0x14dc43['id'],'interface':util[_0x7196('0x61')]('%s/%s',_0x7196('0x62'),_0x4526e8[_0x7196('0x2e')]),'penalty':0x0,'paused':_0x4526e8[_0x7196('0x5e')],'createdAt':_0x4526e8[_0x7196('0x63')],'updatedAt':_0x4526e8[_0x7196('0x5f')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x7196('0x29')](respondWithFilteredResult(_0x41fa94,_0x560ddb))[_0x7196('0x49')](handleError(_0x41fa94,null));};exports[_0x7196('0x64')]=function(_0x13cbe2,_0xa20de8,_0x3d3768){var _0x2181f5={};var _0x53a6fa={};var _0x431415;var _0x13f802;return db['SmsQueue']['findOne']({'where':{'id':_0x13cbe2[_0x7196('0x54')]['id']}})[_0x7196('0x29')](handleEntityNotFound(_0xa20de8,null))[_0x7196('0x29')](function(_0x5b2c33){if(_0x5b2c33){_0x431415=_0x5b2c33;_0x53a6fa[_0x7196('0x36')]=_['keys'](db[_0x7196('0x65')][_0x7196('0x32')]);_0x53a6fa['query']=_[_0x7196('0x58')](_0x13cbe2['query']);_0x53a6fa['filters']=_[_0x7196('0x38')](_0x53a6fa[_0x7196('0x36')],_0x53a6fa[_0x7196('0x37')]);_0x2181f5['attributes']=_[_0x7196('0x38')](_0x53a6fa['model'],qs[_0x7196('0x3a')](_0x13cbe2[_0x7196('0x37')][_0x7196('0x3a')]));_0x2181f5[_0x7196('0x39')]=_0x2181f5[_0x7196('0x39')]['length']?_0x2181f5[_0x7196('0x39')]:_0x53a6fa[_0x7196('0x36')];_0x2181f5[_0x7196('0x3e')]=qs[_0x7196('0x3f')](_0x13cbe2[_0x7196('0x37')][_0x7196('0x3f')]);_0x2181f5[_0x7196('0x40')]=qs[_0x7196('0x4a')](_['pick'](_0x13cbe2[_0x7196('0x37')],_0x53a6fa[_0x7196('0x4a')]));if(_0x13cbe2[_0x7196('0x37')][_0x7196('0x44')]){_0x2181f5['where']=_[_0x7196('0x42')](_0x2181f5[_0x7196('0x40')],{'$or':_['map'](_0x2181f5[_0x7196('0x39')],function(_0x53d470){var _0xd6d8cf={};_0xd6d8cf[_0x53d470]={'$like':'%'+_0x13cbe2['query'][_0x7196('0x44')]+'%'};return _0xd6d8cf;})});}_0x2181f5=_[_0x7196('0x42')]({},_0x2181f5,_0x13cbe2['options']);return _0x431415[_0x7196('0x64')](_0x2181f5);}})[_0x7196('0x29')](function(_0x2c2c53){if(_0x2c2c53){_0x13f802=_0x2c2c53['length'];if(!_0x13cbe2['query'][_0x7196('0x5a')]('nolimit')){_0x2181f5['limit']=qs[_0x7196('0x3d')](_0x13cbe2[_0x7196('0x37')][_0x7196('0x3d')]);_0x2181f5['offset']=qs[_0x7196('0x25')](_0x13cbe2[_0x7196('0x37')][_0x7196('0x25')]);}return _0x431415[_0x7196('0x64')](_0x2181f5);}})[_0x7196('0x29')](function(_0x26048c){if(_0x26048c){return _0x26048c?{'count':_0x13f802,'rows':_0x26048c}:null;}})[_0x7196('0x29')](respondWithResult(_0xa20de8,null))[_0x7196('0x49')](handleError(_0xa20de8,null));};exports[_0x7196('0x66')]=function(_0x446f28,_0x173fe5,_0x5eb2b5){var _0x5acff1=_0x446f28[_0x7196('0x4c')]['ids'];return db['Team'][_0x7196('0x48')]({'where':{'id':_0x5acff1},'attributes':['id'],'include':[{'model':db[_0x7196('0x5c')],'as':_0x7196('0x67'),'attributes':['id',_0x7196('0x2e'),'online','voicePause',_0x7196('0x68')],'raw':!![]}]})[_0x7196('0x29')](function(_0x1eea71){if(_0x1eea71){var _0x247b15=_['flatMap'](_0x1eea71,function(_0x4d8b8e){var _0x4afbee=_0x4d8b8e['get']({'plain':!![]});return _0x4afbee[_0x7196('0x67')];});return db[_0x7196('0x31')][_0x7196('0x50')]({'where':{'id':_0x446f28['params']['id']}})[_0x7196('0x29')](function(_0x40d4c3){return db[_0x7196('0x69')][_0x7196('0x6a')](function(_0x10712f){return _0x40d4c3[_0x7196('0x66')](_0x5acff1,{'transaction':_0x10712f})[_0x7196('0x29')](function(){return BPromise[_0x7196('0x6b')](_0x247b15,function(_0x5de550){return db[_0x7196('0x59')][_0x7196('0x6c')]({'where':{'UserId':_0x5de550['id'],'SmsQueueId':_0x446f28[_0x7196('0x54')]['id']},'transaction':_0x10712f});});})[_0x7196('0x29')](function(){_0x247b15[_0x7196('0x6d')](function(_0x4faf7b){socket[_0x7196('0x6e')](_0x7196('0x6f'),{'UserId':_0x4faf7b['id'],'SmsQueueId':_0x40d4c3['id']});});});});});}})[_0x7196('0x29')](respondWithStatusCode(_0x173fe5,null))['catch'](handleError(_0x173fe5,null));};exports[_0x7196('0x70')]=function(_0x4b98de,_0x53ae84,_0x1dcf93){return db[_0x7196('0x65')]['findAll']({'where':{'id':_0x4b98de[_0x7196('0x37')][_0x7196('0x71')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x7196('0x67'),'attributes':['id'],'raw':!![]}]})[_0x7196('0x29')](handleEntityNotFound(_0x53ae84,null))[_0x7196('0x29')](function(_0x28d665){var _0x441ca1=_[_0x7196('0x30')](_0x28d665,'id');var _0x5d5d1f=[];var _0x3639be=[];var _0x460e51=squel[_0x7196('0x72')]();_0x460e51['field']('tq.TeamId')['from'](_0x7196('0x73'),'tq')[_0x7196('0x74')](_0x7196('0x75'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x7196('0x40')]('SmsQueueId\x20=\x20?',_0x4b98de[_0x7196('0x54')]['id']);for(var _0x4e22df=0x0;_0x4e22df<_0x28d665[_0x7196('0x3b')];_0x4e22df+=0x1){let _0x18bafa=_0x28d665[_0x4e22df];for(var _0x33d5bf=0x0;_0x33d5bf<_0x18bafa[_0x7196('0x67')][_0x7196('0x3b')];_0x33d5bf+=0x1){let _0x10b628=_0x18bafa[_0x7196('0x67')][_0x33d5bf];var _0x48608b=_0x460e51[_0x7196('0x76')]();_0x48608b['where']('ut.UserId\x20=\x20?',_0x10b628['id']);_0x3639be['push'](db['sequelize']['query'](_0x48608b[_0x7196('0x77')](),{'type':db[_0x7196('0x69')][_0x7196('0x78')]['SELECT']})[_0x7196('0x29')](function(_0x49bf7e){if(_0x49bf7e['length']===0x1){return _0x10b628['id'];}else{var _0x4f7717=_[_0x7196('0x79')](_['map'](_0x49bf7e,_0x7196('0x7a')),function(_0x2fe382){return _[_0x7196('0x7b')](_0x441ca1,_0x2fe382);});if(_0x4f7717){return _0x10b628['id'];}}}));}}return BPromise[_0x7196('0x7c')](_0x3639be)[_0x7196('0x29')](function(_0x36893a){_0x5d5d1f=_(_0x5d5d1f)[_0x7196('0x7d')](_0x36893a)[_0x7196('0x7e')]()['value']();return db[_0x7196('0x31')][_0x7196('0x50')]({'where':{'id':_0x4b98de[_0x7196('0x54')]['id']}})['then'](function(_0x3a241a){return db[_0x7196('0x69')][_0x7196('0x6a')](function(_0x4fa1b5){return _0x3a241a[_0x7196('0x70')](_0x4b98de[_0x7196('0x37')][_0x7196('0x71')],{'transaction':_0x4fa1b5})['then'](function(){if(!_[_0x7196('0x7f')](_0x5d5d1f)){return _0x3a241a[_0x7196('0x80')](_0x5d5d1f,{'transaction':_0x4fa1b5});}})['then'](function(){_0x5d5d1f[_0x7196('0x6d')](function(_0x5db5f1){socket[_0x7196('0x6e')](_0x7196('0x81'),{'UserId':_0x5db5f1,'SmsQueueId':_0x3a241a['id']});});});});});});})['then'](respondWithStatusCode(_0x53ae84,null))[_0x7196('0x49')](handleError(_0x53ae84,null));};exports['addAgents']=function(_0x5d24ff,_0x2cae94,_0x4738c2){return db['SmsQueue'][_0x7196('0x50')]({'where':{'id':_0x5d24ff[_0x7196('0x54')]['id']}})[_0x7196('0x29')](handleEntityNotFound(_0x2cae94,null))[_0x7196('0x29')](function(_0x5b91e5){if(_0x5b91e5){return _0x5b91e5[_0x7196('0x82')](_0x5d24ff[_0x7196('0x4c')][_0x7196('0x71')],_['omit'](_0x5d24ff['body'],[_0x7196('0x71'),'id'])||{})[_0x7196('0x83')](function(_0x87184a){for(var _0x2af201=0x0;_0x2af201<_0x5d24ff['body'][_0x7196('0x71')]['length'];_0x2af201+=0x1){socket[_0x7196('0x6e')]('userSmsQueue:save',{'UserId':_0x5d24ff[_0x7196('0x4c')][_0x7196('0x71')][_0x2af201],'SmsQueueId':_0x5d24ff[_0x7196('0x54')]['id']});}return _0x87184a;});}})[_0x7196('0x29')](respondWithResult(_0x2cae94,null))[_0x7196('0x49')](handleError(_0x2cae94,null));};exports[_0x7196('0x80')]=function(_0x342fb1,_0x4c9c35,_0x1ae8bc){return db[_0x7196('0x31')][_0x7196('0x50')]({'where':{'id':_0x342fb1[_0x7196('0x54')]['id']}})[_0x7196('0x29')](handleEntityNotFound(_0x4c9c35,null))[_0x7196('0x29')](function(_0x186731){if(_0x186731){return _0x186731[_0x7196('0x80')](_0x342fb1['query'][_0x7196('0x71')])[_0x7196('0x29')](function(){if(_['isArray'](_0x342fb1[_0x7196('0x37')][_0x7196('0x71')])){for(var _0x4fa57e=0x0;_0x4fa57e<_0x342fb1[_0x7196('0x37')][_0x7196('0x71')][_0x7196('0x3b')];_0x4fa57e+=0x1){socket[_0x7196('0x6e')]('userSmsQueue:remove',{'UserId':Number(_0x342fb1['query'][_0x7196('0x71')][_0x4fa57e]),'SmsQueueId':Number(_0x342fb1['params']['id'])});}}else{socket[_0x7196('0x6e')](_0x7196('0x81'),{'UserId':Number(_0x342fb1[_0x7196('0x37')][_0x7196('0x71')]),'SmsQueueId':Number(_0x342fb1[_0x7196('0x54')]['id'])});}});}})['then'](respondWithStatusCode(_0x4c9c35,null))[_0x7196('0x49')](handleError(_0x4c9c35,null));};exports[_0x7196('0x84')]=function(_0x163857,_0x1948b8,_0x1bd2dc){var _0x2b954c={};var _0x446a99={};var _0x149144;var _0x11fb5b;return db['SmsQueue']['findOne']({'where':{'id':_0x163857['params']['id']}})[_0x7196('0x29')](handleEntityNotFound(_0x1948b8,null))[_0x7196('0x29')](function(_0x92179b){if(_0x92179b){_0x149144=_0x92179b;_0x446a99[_0x7196('0x36')]=_[_0x7196('0x58')](db[_0x7196('0x5c')][_0x7196('0x32')]);_0x446a99[_0x7196('0x37')]=_['keys'](_0x163857['query']);_0x446a99['filters']=_['intersection'](_0x446a99[_0x7196('0x36')],_0x446a99[_0x7196('0x37')]);_0x2b954c[_0x7196('0x39')]=_[_0x7196('0x38')](_0x446a99[_0x7196('0x36')],qs[_0x7196('0x3a')](_0x163857['query'][_0x7196('0x3a')]));_0x2b954c['attributes']=_0x2b954c['attributes'][_0x7196('0x3b')]?_0x2b954c['attributes']:_0x446a99['model'];_0x2b954c[_0x7196('0x3e')]=qs['sort'](_0x163857[_0x7196('0x37')][_0x7196('0x3f')]);_0x2b954c[_0x7196('0x40')]=qs[_0x7196('0x4a')](_[_0x7196('0x41')](_0x163857[_0x7196('0x37')],_0x446a99['filters']));if(_0x163857[_0x7196('0x37')][_0x7196('0x44')]){_0x2b954c[_0x7196('0x40')]=_['merge'](_0x2b954c[_0x7196('0x40')],{'$or':_[_0x7196('0x30')](_0x2b954c[_0x7196('0x39')],function(_0x48262c){var _0x571fa5={};_0x571fa5[_0x48262c]={'$like':'%'+_0x163857[_0x7196('0x37')][_0x7196('0x44')]+'%'};return _0x571fa5;})});}_0x2b954c=_[_0x7196('0x42')]({},_0x2b954c,_0x163857[_0x7196('0x45')]);return _0x149144[_0x7196('0x84')](_0x2b954c);}})[_0x7196('0x29')](function(_0x1a8a5a){if(_0x1a8a5a){_0x11fb5b=_0x1a8a5a[_0x7196('0x3b')];if(!_0x163857[_0x7196('0x37')][_0x7196('0x5a')]('nolimit')){_0x2b954c[_0x7196('0x3d')]=qs[_0x7196('0x3d')](_0x163857['query'][_0x7196('0x3d')]);_0x2b954c[_0x7196('0x25')]=qs['offset'](_0x163857[_0x7196('0x37')][_0x7196('0x25')]);}return _0x149144[_0x7196('0x84')](_0x2b954c);}})[_0x7196('0x29')](function(_0x1e7a64){if(_0x1e7a64){return _0x1e7a64?{'count':_0x11fb5b,'rows':_0x1e7a64}:null;}})[_0x7196('0x29')](respondWithResult(_0x1948b8,null))['catch'](handleError(_0x1948b8,null));};
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.events.js b/server/api/smsQueue/smsQueue.events.js
index d320c04..049a199 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 _0x26a0=['events','SmsQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x26a0,0x15e));var _0x026a=function(_0x14612f,_0x1c3389){_0x14612f=_0x14612f-0x0;var _0x3c41ad=_0x26a0[_0x14612f];return _0x3c41ad;};'use strict';var EventEmitter=require(_0x026a('0x0'));var SmsQueue=require('../../mysqldb')['db'][_0x026a('0x1')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x026a('0x2')](0x0);var events={'afterCreate':_0x026a('0x3'),'afterUpdate':_0x026a('0x4'),'afterDestroy':_0x026a('0x5')};function emitEvent(_0x2d5fcc){return function(_0x3cc6c1,_0x145c1c,_0x51c8b9){SmsQueueEvents[_0x026a('0x6')](_0x2d5fcc+':'+_0x3cc6c1['id'],_0x3cc6c1);SmsQueueEvents[_0x026a('0x6')](_0x2d5fcc,_0x3cc6c1);_0x51c8b9(null);};}for(var e in events){if(events[_0x026a('0x7')](e)){var event=events[e];SmsQueue[_0x026a('0x8')](e,emitEvent(event));}}module[_0x026a('0x9')]=SmsQueueEvents;
\ No newline at end of file
+var _0xff59=['SmsQueue','save','update','remove','emit','exports','events','../../mysqldb'];(function(_0x36a6db,_0x42e8c2){var _0x3b4640=function(_0x5efc01){while(--_0x5efc01){_0x36a6db['push'](_0x36a6db['shift']());}};_0x3b4640(++_0x42e8c2);}(_0xff59,0x196));var _0x9ff5=function(_0x4b6280,_0x4ce01a){_0x4b6280=_0x4b6280-0x0;var _0x292e5d=_0xff59[_0x4b6280];return _0x292e5d;};'use strict';var EventEmitter=require(_0x9ff5('0x0'));var SmsQueue=require(_0x9ff5('0x1'))['db'][_0x9ff5('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9ff5('0x3'),'afterUpdate':_0x9ff5('0x4'),'afterDestroy':_0x9ff5('0x5')};function emitEvent(_0xbac270){return function(_0x4988b7,_0x46386d,_0xd57940){SmsQueueEvents[_0x9ff5('0x6')](_0xbac270+':'+_0x4988b7['id'],_0x4988b7);SmsQueueEvents[_0x9ff5('0x6')](_0xbac270,_0x4988b7);_0xd57940(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsQueue['hook'](e,emitEvent(event));}}module[_0x9ff5('0x7')]=SmsQueueEvents;
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.model.js b/server/api/smsQueue/smsQueue.model.js
index 5406d89..035d22c 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 _0x7401=['bluebird','path','rimraf','../../config/environment','./smsQueue.attributes','sms_queues','lodash','../../config/logger','moment'];(function(_0x64b378,_0x46d9a5){var _0x219a77=function(_0x2d42a4){while(--_0x2d42a4){_0x64b378['push'](_0x64b378['shift']());}};_0x219a77(++_0x46d9a5);}(_0x7401,0xf0));var _0x1740=function(_0x428b20,_0x3f9506){_0x428b20=_0x428b20-0x0;var _0x1926db=_0x7401[_0x428b20];return _0x1926db;};'use strict';var _=require(_0x1740('0x0'));var util=require('util');var logger=require(_0x1740('0x1'))('api');var moment=require(_0x1740('0x2'));var BPromise=require(_0x1740('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1740('0x4'));var rimraf=require(_0x1740('0x5'));var config=require(_0x1740('0x6'));var attributes=require(_0x1740('0x7'));module['exports']=function(_0x39d8f4,_0x3d37d5){return _0x39d8f4['define']('SmsQueue',attributes,{'tableName':_0x1740('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x22cb=['request-promise','./smsQueue.attributes','sms_queues','lodash','util','api','bluebird'];(function(_0x332dff,_0x292200){var _0x4bff78=function(_0x32a7c3){while(--_0x32a7c3){_0x332dff['push'](_0x332dff['shift']());}};_0x4bff78(++_0x292200);}(_0x22cb,0x1ed));var _0xb22c=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x22cb[_0x4b055c];return _0x4b62bb;};'use strict';var _=require(_0xb22c('0x0'));var util=require(_0xb22c('0x1'));var logger=require('../../config/logger')(_0xb22c('0x2'));var moment=require('moment');var BPromise=require(_0xb22c('0x3'));var rp=require(_0xb22c('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xb22c('0x5'));module['exports']=function(_0x1981d4,_0x6bf5b3){return _0x1981d4['define']('SmsQueue',attributes,{'tableName':_0xb22c('0x6'),'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 69f8468..91abd66 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 _0x6a22=['socket.io-emitter','./smsQueue.socket','register','request','SmsQueue,\x20%s,\x20%s','SmsQueue,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','result','catch','SmsQueue','options','raw','where','map','include','attributes','model','then','GetSmsQueue','stringify','ShowSmsQueue','debug','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','defaults','redis','localhost'];(function(_0x3b53b0,_0x23dc58){var _0x4eddc6=function(_0x46254f){while(--_0x46254f){_0x3b53b0['push'](_0x3b53b0['shift']());}};_0x4eddc6(++_0x23dc58);}(_0x6a22,0x15a));var _0x26a2=function(_0x430ea6,_0x58db3b){_0x430ea6=_0x430ea6-0x0;var _0x8c837=_0x6a22[_0x430ea6];return _0x8c837;};'use strict';var _=require(_0x26a2('0x0'));var util=require(_0x26a2('0x1'));var moment=require(_0x26a2('0x2'));var BPromise=require(_0x26a2('0x3'));var rs=require(_0x26a2('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x26a2('0x5'));var logger=require(_0x26a2('0x6'))(_0x26a2('0x7'));var config=require(_0x26a2('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x26a2('0x9')][_0x26a2('0xa')]({'port':0x232a});config['redis']=_[_0x26a2('0xb')](config[_0x26a2('0xc')],{'host':_0x26a2('0xd'),'port':0x18eb});var socket=require(_0x26a2('0xe'))(new Redis(config['redis']));require(_0x26a2('0xf'))[_0x26a2('0x10')](socket);function respondWithRpcPromise(_0x134ab6,_0x56a76f,_0xbe253d){return new BPromise(function(_0x2f44ef,_0x5a07a7){return client[_0x26a2('0x11')](_0x134ab6,_0xbe253d)['then'](function(_0x148ed8){logger['info'](_0x26a2('0x12'),_0x56a76f,'request\x20sent');logger['debug'](_0x26a2('0x13'),_0x56a76f,_0x26a2('0x14'),JSON['stringify'](_0x148ed8));if(_0x148ed8[_0x26a2('0x15')]){if(_0x148ed8['error'][_0x26a2('0x16')]===0x1f4){logger[_0x26a2('0x15')]('SmsQueue,\x20%s,\x20%s',_0x56a76f,_0x148ed8[_0x26a2('0x15')]['message']);return _0x5a07a7(_0x148ed8[_0x26a2('0x15')][_0x26a2('0x17')]);}logger[_0x26a2('0x15')](_0x26a2('0x12'),_0x56a76f,_0x148ed8[_0x26a2('0x15')][_0x26a2('0x17')]);return _0x2f44ef(_0x148ed8['error'][_0x26a2('0x17')]);}else{logger[_0x26a2('0x18')](_0x26a2('0x12'),_0x56a76f,_0x26a2('0x14'));_0x2f44ef(_0x148ed8[_0x26a2('0x19')]['message']);}})[_0x26a2('0x1a')](function(_0x421d37){logger[_0x26a2('0x15')]('SmsQueue,\x20%s,\x20%s',_0x56a76f,_0x421d37);_0x5a07a7(_0x421d37);});});}exports['GetSmsQueue']=function(_0x30a893){var _0x154a9e=this;return new Promise(function(_0x4691ef,_0x330d83){return db[_0x26a2('0x1b')]['findAll']({'raw':_0x30a893[_0x26a2('0x1c')]?_0x30a893[_0x26a2('0x1c')][_0x26a2('0x1d')]===undefined?!![]:![]:!![],'where':_0x30a893[_0x26a2('0x1c')]?_0x30a893['options'][_0x26a2('0x1e')]||null:null,'attributes':_0x30a893[_0x26a2('0x1c')]?_0x30a893[_0x26a2('0x1c')]['attributes']||null:null,'limit':_0x30a893[_0x26a2('0x1c')]?_0x30a893['options']['limit']||null:null,'include':_0x30a893[_0x26a2('0x1c')]?_0x30a893[_0x26a2('0x1c')]['include']?_[_0x26a2('0x1f')](_0x30a893['options'][_0x26a2('0x20')],function(_0xf8e5bc){return{'model':db[_0xf8e5bc['model']],'as':_0xf8e5bc['as'],'attributes':_0xf8e5bc[_0x26a2('0x21')],'include':_0xf8e5bc['include']?_[_0x26a2('0x1f')](_0xf8e5bc[_0x26a2('0x20')],function(_0x1870ca){return{'model':db[_0x1870ca[_0x26a2('0x22')]],'as':_0x1870ca['as'],'attributes':_0x1870ca[_0x26a2('0x21')],'include':_0x1870ca[_0x26a2('0x20')]?_[_0x26a2('0x1f')](_0x1870ca[_0x26a2('0x20')],function(_0x12ebf7){return{'model':db[_0x12ebf7[_0x26a2('0x22')]],'as':_0x12ebf7['as'],'attributes':_0x12ebf7[_0x26a2('0x21')]};}):[]};}):[]};}):[]:[]})[_0x26a2('0x23')](function(_0x535c1d){logger['info'](_0x26a2('0x24'),_0x30a893);logger['debug'](_0x26a2('0x24'),_0x30a893,JSON[_0x26a2('0x25')](_0x535c1d));_0x4691ef(_0x535c1d);})['catch'](function(_0x5c6947){logger['error'](_0x26a2('0x24'),_0x5c6947['message'],_0x30a893);_0x330d83(_0x154a9e['error'](0x1f4,_0x5c6947[_0x26a2('0x17')]));});});};exports[_0x26a2('0x26')]=function(_0x549c42){var _0x2df72b=this;return new Promise(function(_0x2fc6cf,_0x24e934){return db['SmsQueue']['find']({'raw':_0x549c42[_0x26a2('0x1c')]?_0x549c42[_0x26a2('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x549c42[_0x26a2('0x1c')]?_0x549c42[_0x26a2('0x1c')][_0x26a2('0x1e')]||null:null,'attributes':_0x549c42['options']?_0x549c42[_0x26a2('0x1c')]['attributes']||null:null,'include':_0x549c42[_0x26a2('0x1c')]?_0x549c42['options'][_0x26a2('0x20')]?_[_0x26a2('0x1f')](_0x549c42[_0x26a2('0x1c')][_0x26a2('0x20')],function(_0x5a576a){return{'model':db[_0x5a576a[_0x26a2('0x22')]],'as':_0x5a576a['as'],'attributes':_0x5a576a[_0x26a2('0x21')],'include':_0x5a576a[_0x26a2('0x20')]?_[_0x26a2('0x1f')](_0x5a576a['include'],function(_0x33e134){return{'model':db[_0x33e134[_0x26a2('0x22')]],'as':_0x33e134['as'],'attributes':_0x33e134['attributes'],'include':_0x33e134[_0x26a2('0x20')]?_[_0x26a2('0x1f')](_0x33e134[_0x26a2('0x20')],function(_0x8eb99e){return{'model':db[_0x8eb99e[_0x26a2('0x22')]],'as':_0x8eb99e['as'],'attributes':_0x8eb99e[_0x26a2('0x21')]};}):[]};}):[]};}):[]:[]})[_0x26a2('0x23')](function(_0x30f648){logger['info']('ShowSmsQueue',_0x549c42);logger[_0x26a2('0x27')](_0x26a2('0x26'),_0x549c42,JSON[_0x26a2('0x25')](_0x30f648));_0x2fc6cf(_0x30f648);})[_0x26a2('0x1a')](function(_0x2d2d43){logger[_0x26a2('0x15')](_0x26a2('0x26'),_0x2d2d43['message'],_0x549c42);_0x24e934(_0x2df72b[_0x26a2('0x15')](0x1f4,_0x2d2d43[_0x26a2('0x17')]));});});};
\ No newline at end of file
+var _0xae0f=['where','attributes','include','map','model','ShowSmsQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','defaults','redis','localhost','socket.io-emitter','register','then','info','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','SmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetSmsQueue','SmsQueue','options','raw'];(function(_0x4dc370,_0x495989){var _0x3b551d=function(_0xe2b00f){while(--_0xe2b00f){_0x4dc370['push'](_0x4dc370['shift']());}};_0x3b551d(++_0x495989);}(_0xae0f,0x73));var _0xfae0=function(_0x335fcb,_0x4c05ef){_0x335fcb=_0x335fcb-0x0;var _0x3c74e8=_0xae0f[_0x335fcb];return _0x3c74e8;};'use strict';var _=require(_0xfae0('0x0'));var util=require(_0xfae0('0x1'));var moment=require(_0xfae0('0x2'));var BPromise=require(_0xfae0('0x3'));var rs=require(_0xfae0('0x4'));var fs=require('fs');var Redis=require(_0xfae0('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xfae0('0x6'));var config=require(_0xfae0('0x7'));var jayson=require(_0xfae0('0x8'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0xfae0('0x9')](config[_0xfae0('0xa')],{'host':_0xfae0('0xb'),'port':0x18eb});var socket=require(_0xfae0('0xc'))(new Redis(config[_0xfae0('0xa')]));require('./smsQueue.socket')[_0xfae0('0xd')](socket);function respondWithRpcPromise(_0x13e3b1,_0xebddac,_0x1d7662){return new BPromise(function(_0x3a6c95,_0x4145e8){return client['request'](_0x13e3b1,_0x1d7662)[_0xfae0('0xe')](function(_0x4c6b4a){logger[_0xfae0('0xf')](_0xfae0('0x10'),_0xebddac,_0xfae0('0x11'));logger[_0xfae0('0x12')](_0xfae0('0x13'),_0xebddac,_0xfae0('0x11'),JSON[_0xfae0('0x14')](_0x4c6b4a));if(_0x4c6b4a[_0xfae0('0x15')]){if(_0x4c6b4a['error'][_0xfae0('0x16')]===0x1f4){logger[_0xfae0('0x15')](_0xfae0('0x10'),_0xebddac,_0x4c6b4a['error'][_0xfae0('0x17')]);return _0x4145e8(_0x4c6b4a[_0xfae0('0x15')]['message']);}logger['error'](_0xfae0('0x10'),_0xebddac,_0x4c6b4a[_0xfae0('0x15')][_0xfae0('0x17')]);return _0x3a6c95(_0x4c6b4a[_0xfae0('0x15')][_0xfae0('0x17')]);}else{logger[_0xfae0('0xf')]('SmsQueue,\x20%s,\x20%s',_0xebddac,_0xfae0('0x11'));_0x3a6c95(_0x4c6b4a['result']['message']);}})[_0xfae0('0x18')](function(_0x2b6d06){logger[_0xfae0('0x15')](_0xfae0('0x10'),_0xebddac,_0x2b6d06);_0x4145e8(_0x2b6d06);});});}exports[_0xfae0('0x19')]=function(_0x340521){var _0x4422c7=this;return new Promise(function(_0x58b1cb,_0x4d9f23){return db[_0xfae0('0x1a')]['findAll']({'raw':_0x340521[_0xfae0('0x1b')]?_0x340521[_0xfae0('0x1b')][_0xfae0('0x1c')]===undefined?!![]:![]:!![],'where':_0x340521[_0xfae0('0x1b')]?_0x340521['options'][_0xfae0('0x1d')]||null:null,'attributes':_0x340521['options']?_0x340521[_0xfae0('0x1b')][_0xfae0('0x1e')]||null:null,'limit':_0x340521['options']?_0x340521[_0xfae0('0x1b')]['limit']||null:null,'include':_0x340521['options']?_0x340521[_0xfae0('0x1b')][_0xfae0('0x1f')]?_[_0xfae0('0x20')](_0x340521[_0xfae0('0x1b')][_0xfae0('0x1f')],function(_0x2d2120){return{'model':db[_0x2d2120[_0xfae0('0x21')]],'as':_0x2d2120['as'],'attributes':_0x2d2120['attributes'],'include':_0x2d2120[_0xfae0('0x1f')]?_['map'](_0x2d2120['include'],function(_0x160d04){return{'model':db[_0x160d04[_0xfae0('0x21')]],'as':_0x160d04['as'],'attributes':_0x160d04[_0xfae0('0x1e')],'include':_0x160d04['include']?_[_0xfae0('0x20')](_0x160d04[_0xfae0('0x1f')],function(_0x4948cc){return{'model':db[_0x4948cc['model']],'as':_0x4948cc['as'],'attributes':_0x4948cc[_0xfae0('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xfae0('0xe')](function(_0x9030c2){logger[_0xfae0('0xf')](_0xfae0('0x19'),_0x340521);logger[_0xfae0('0x12')]('GetSmsQueue',_0x340521,JSON[_0xfae0('0x14')](_0x9030c2));_0x58b1cb(_0x9030c2);})[_0xfae0('0x18')](function(_0x28de92){logger[_0xfae0('0x15')]('GetSmsQueue',_0x28de92[_0xfae0('0x17')],_0x340521);_0x4d9f23(_0x4422c7['error'](0x1f4,_0x28de92[_0xfae0('0x17')]));});});};exports[_0xfae0('0x22')]=function(_0x1cdcec){var _0x1128fb=this;return new Promise(function(_0x4ebbd1,_0x485905){return db[_0xfae0('0x1a')][_0xfae0('0x23')]({'raw':_0x1cdcec[_0xfae0('0x1b')]?_0x1cdcec['options'][_0xfae0('0x1c')]===undefined?!![]:![]:!![],'where':_0x1cdcec[_0xfae0('0x1b')]?_0x1cdcec[_0xfae0('0x1b')][_0xfae0('0x1d')]||null:null,'attributes':_0x1cdcec['options']?_0x1cdcec['options'][_0xfae0('0x1e')]||null:null,'include':_0x1cdcec['options']?_0x1cdcec['options']['include']?_[_0xfae0('0x20')](_0x1cdcec[_0xfae0('0x1b')][_0xfae0('0x1f')],function(_0x14950c){return{'model':db[_0x14950c['model']],'as':_0x14950c['as'],'attributes':_0x14950c[_0xfae0('0x1e')],'include':_0x14950c[_0xfae0('0x1f')]?_[_0xfae0('0x20')](_0x14950c[_0xfae0('0x1f')],function(_0xbcadad){return{'model':db[_0xbcadad[_0xfae0('0x21')]],'as':_0xbcadad['as'],'attributes':_0xbcadad[_0xfae0('0x1e')],'include':_0xbcadad[_0xfae0('0x1f')]?_[_0xfae0('0x20')](_0xbcadad[_0xfae0('0x1f')],function(_0x204351){return{'model':db[_0x204351[_0xfae0('0x21')]],'as':_0x204351['as'],'attributes':_0x204351['attributes']};}):[]};}):[]};}):[]:[]})[_0xfae0('0xe')](function(_0x57a957){logger[_0xfae0('0xf')](_0xfae0('0x22'),_0x1cdcec);logger[_0xfae0('0x12')]('ShowSmsQueue',_0x1cdcec,JSON['stringify'](_0x57a957));_0x4ebbd1(_0x57a957);})[_0xfae0('0x18')](function(_0x48a32f){logger[_0xfae0('0x15')](_0xfae0('0x22'),_0x48a32f['message'],_0x1cdcec);_0x485905(_0x1128fb[_0xfae0('0x15')](0x1f4,_0x48a32f['message']));});});};
\ No newline at end of file
diff --git a/server/api/smsQueue/smsQueue.socket.js b/server/api/smsQueue/smsQueue.socket.js
index 72515c1..9e77ae4 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 _0x6a8e=['emit','removeListener','register','length','smsQueue:','./smsQueue.events','save','remove','update'];(function(_0x3cae21,_0x97726f){var _0x4b13b8=function(_0x517407){while(--_0x517407){_0x3cae21['push'](_0x3cae21['shift']());}};_0x4b13b8(++_0x97726f);}(_0x6a8e,0x9e));var _0xe6a8=function(_0x45a7d2,_0x50a34){_0x45a7d2=_0x45a7d2-0x0;var _0x3311d7=_0x6a8e[_0x45a7d2];return _0x3311d7;};'use strict';var SmsQueueEvents=require(_0xe6a8('0x0'));var events=[_0xe6a8('0x1'),_0xe6a8('0x2'),_0xe6a8('0x3')];function createListener(_0xcfe1df,_0xb95490){return function(_0x19244f){_0xb95490[_0xe6a8('0x4')](_0xcfe1df,_0x19244f);};}function removeListener(_0x3d5232,_0x24cf38){return function(){SmsQueueEvents[_0xe6a8('0x5')](_0x3d5232,_0x24cf38);};}exports[_0xe6a8('0x6')]=function(_0x10336b){for(var _0x5ca617=0x0,_0x4b152b=events[_0xe6a8('0x7')];_0x5ca617<_0x4b152b;_0x5ca617++){var _0x571453=events[_0x5ca617];var _0x914272=createListener(_0xe6a8('0x8')+_0x571453,_0x10336b);SmsQueueEvents['on'](_0x571453,_0x914272);}};
\ No newline at end of file
+var _0x14f8=['smsQueue:','./smsQueue.events','save','remove','update','emit','removeListener','length'];(function(_0x264cdd,_0x2b698f){var _0x5e7b9e=function(_0xb3a781){while(--_0xb3a781){_0x264cdd['push'](_0x264cdd['shift']());}};_0x5e7b9e(++_0x2b698f);}(_0x14f8,0x189));var _0x814f=function(_0x2042b6,_0x511b0e){_0x2042b6=_0x2042b6-0x0;var _0x5519b7=_0x14f8[_0x2042b6];return _0x5519b7;};'use strict';var SmsQueueEvents=require(_0x814f('0x0'));var events=[_0x814f('0x1'),_0x814f('0x2'),_0x814f('0x3')];function createListener(_0x12f9fe,_0x1d0b42){return function(_0x3cdf73){_0x1d0b42[_0x814f('0x4')](_0x12f9fe,_0x3cdf73);};}function removeListener(_0x2dc95b,_0x60503b){return function(){SmsQueueEvents[_0x814f('0x5')](_0x2dc95b,_0x60503b);};}exports['register']=function(_0x2c99e9){for(var _0x50a399=0x0,_0x1c572d=events[_0x814f('0x6')];_0x50a399<_0x1c572d;_0x50a399++){var _0x2c0bd5=events[_0x50a399];var _0x21fbb5=createListener(_0x814f('0x7')+_0x2c0bd5,_0x2c99e9);SmsQueueEvents['on'](_0x2c0bd5,_0x21fbb5);}};
\ No newline at end of file
diff --git a/server/api/smsQueueReport/index.js b/server/api/smsQueueReport/index.js
index 644ac11..6061c51 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 _0x115e=['/describe','describe','/:id','show','post','create','put','exports','path','express','Router','../../components/auth/service','../../components/interaction/service','./smsQueueReport.controller','get','isAuthenticated','index'];(function(_0x550d12,_0x5384bd){var _0x12103d=function(_0x2a9834){while(--_0x2a9834){_0x550d12['push'](_0x550d12['shift']());}};_0x12103d(++_0x5384bd);}(_0x115e,0x1a0));var _0xe115=function(_0x26b53f,_0x528724){_0x26b53f=_0x26b53f-0x0;var _0x4dda26=_0x115e[_0x26b53f];return _0x4dda26;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xe115('0x0'));var timeout=require('connect-timeout');var express=require(_0xe115('0x1'));var router=express[_0xe115('0x2')]();var auth=require(_0xe115('0x3'));var interaction=require(_0xe115('0x4'));var config=require('../../config/environment');var controller=require(_0xe115('0x5'));router[_0xe115('0x6')]('/',auth[_0xe115('0x7')](),controller[_0xe115('0x8')]);router[_0xe115('0x6')](_0xe115('0x9'),auth[_0xe115('0x7')](),controller[_0xe115('0xa')]);router[_0xe115('0x6')](_0xe115('0xb'),auth['isAuthenticated'](),controller[_0xe115('0xc')]);router[_0xe115('0xd')]('/',auth[_0xe115('0x7')](),controller[_0xe115('0xe')]);router[_0xe115('0xf')]('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0xe115('0xb'),auth[_0xe115('0x7')](),controller['destroy']);module[_0xe115('0x10')]=router;
\ No newline at end of file
+var _0xcbf2=['exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../config/environment','./smsQueueReport.controller','get','/describe','isAuthenticated','describe','post','create','put','/:id','update','delete','destroy'];(function(_0x3482a8,_0x1472e7){var _0x5c0db6=function(_0x1f05c5){while(--_0x1f05c5){_0x3482a8['push'](_0x3482a8['shift']());}};_0x5c0db6(++_0x1472e7);}(_0xcbf2,0x119));var _0x2cbf=function(_0x52ff45,_0xf649d2){_0x52ff45=_0x52ff45-0x0;var _0x24b5a1=_0xcbf2[_0x52ff45];return _0x24b5a1;};'use strict';var multer=require(_0x2cbf('0x0'));var util=require(_0x2cbf('0x1'));var path=require(_0x2cbf('0x2'));var timeout=require(_0x2cbf('0x3'));var express=require(_0x2cbf('0x4'));var router=express['Router']();var auth=require(_0x2cbf('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x2cbf('0x6'));var controller=require(_0x2cbf('0x7'));router[_0x2cbf('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x2cbf('0x9'),auth[_0x2cbf('0xa')](),controller[_0x2cbf('0xb')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router[_0x2cbf('0xc')]('/',auth[_0x2cbf('0xa')](),controller[_0x2cbf('0xd')]);router[_0x2cbf('0xe')](_0x2cbf('0xf'),auth[_0x2cbf('0xa')](),controller[_0x2cbf('0x10')]);router[_0x2cbf('0x11')](_0x2cbf('0xf'),auth['isAuthenticated'](),controller[_0x2cbf('0x12')]);module[_0x2cbf('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/smsQueueReport/smsQueueReport.attributes.js b/server/api/smsQueueReport/smsQueueReport.attributes.js
index ebe6e02..19a1818 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 _0x12f6=['DATE','moment','sequelize','exports','STRING'];(function(_0x52f1b1,_0x57dc0b){var _0x4eb2bd=function(_0x5f59f4){while(--_0x5f59f4){_0x52f1b1['push'](_0x52f1b1['shift']());}};_0x4eb2bd(++_0x57dc0b);}(_0x12f6,0x191));var _0x612f=function(_0xbefcf8,_0x35ecee){_0xbefcf8=_0xbefcf8-0x0;var _0x2aece2=_0x12f6[_0xbefcf8];return _0x2aece2;};'use strict';var moment=require(_0x612f('0x0'));var Sequelize=require(_0x612f('0x1'));module[_0x612f('0x2')]={'uniqueid':{'type':Sequelize[_0x612f('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x612f('0x3')]},'joinAt':{'type':Sequelize[_0x612f('0x4')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x612f('0x4')]},'exitAt':{'type':Sequelize[_0x612f('0x4')]},'reason':{'type':Sequelize[_0x612f('0x3')]}};
\ No newline at end of file
+var _0x866c=['exports','STRING','DATE','moment'];(function(_0x52afb2,_0x108961){var _0x28f94c=function(_0x418276){while(--_0x418276){_0x52afb2['push'](_0x52afb2['shift']());}};_0x28f94c(++_0x108961);}(_0x866c,0x167));var _0xc866=function(_0x1fba5a,_0x6c359a){_0x1fba5a=_0x1fba5a-0x0;var _0x4889fd=_0x866c[_0x1fba5a];return _0x4889fd;};'use strict';var moment=require(_0xc866('0x0'));var Sequelize=require('sequelize');module[_0xc866('0x1')]={'uniqueid':{'type':Sequelize[_0xc866('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0xc866('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0xc866('0x3')]},'reason':{'type':Sequelize[_0xc866('0x2')]}};
\ No newline at end of file
diff --git a/server/api/smsQueueReport/smsQueueReport.controller.js b/server/api/smsQueueReport/smsQueueReport.controller.js
index 749c0b1..32c6d78 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 _0x2fb9=['findAll','rows','catch','params','keys','length','includeAll','find','create','body','describe','eml-format','zip-dir','request-promise','mustache','util','path','sox','to-csv','lodash','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','save','then','destroy','stack','name','send','index','map','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','nolimit','sort','where','filter','merge','type','VIRTUAL','options','SmsQueueReport'];(function(_0x211c0,_0x315fe4){var _0x3432b7=function(_0x1d01dc){while(--_0x1d01dc){_0x211c0['push'](_0x211c0['shift']());}};_0x3432b7(++_0x315fe4);}(_0x2fb9,0x169));var _0x92fb=function(_0x422cd1,_0x4c5ae1){_0x422cd1=_0x422cd1-0x0;var _0x457936=_0x2fb9[_0x422cd1];return _0x457936;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x92fb('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x92fb('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x92fb('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x92fb('0x3'));var util=require(_0x92fb('0x4'));var path=require(_0x92fb('0x5'));var sox=require(_0x92fb('0x6'));var csv=require(_0x92fb('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x92fb('0x8'));var squel=require('squel');var crypto=require(_0x92fb('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x92fb('0xa'));var toCsv=require(_0x92fb('0x7'));var querystring=require('querystring');var Papa=require(_0x92fb('0xb'));var Redis=require(_0x92fb('0xc'));var authService=require(_0x92fb('0xd'));var qs=require(_0x92fb('0xe'));var as=require(_0x92fb('0xf'));var hardwareService=require(_0x92fb('0x10'));var logger=require(_0x92fb('0x11'))(_0x92fb('0x12'));var utils=require(_0x92fb('0x13'));var config=require(_0x92fb('0x14'));var db=require(_0x92fb('0x15'))['db'];function respondWithStatusCode(_0x1f6d46,_0xe81b63){_0xe81b63=_0xe81b63||0xcc;return function(_0x4f205a){if(_0x4f205a){return _0x1f6d46[_0x92fb('0x16')](_0xe81b63);}return _0x1f6d46[_0x92fb('0x17')](_0xe81b63)[_0x92fb('0x18')]();};}function respondWithResult(_0x18e42b,_0x4258bb){_0x4258bb=_0x4258bb||0xc8;return function(_0x217f9b){if(_0x217f9b){return _0x18e42b[_0x92fb('0x17')](_0x4258bb)['json'](_0x217f9b);}};}function respondWithFilteredResult(_0x5e2450,_0xfade6f){return function(_0x13bf63){if(_0x13bf63){var _0x12d77a=_0x13bf63[_0x92fb('0x19')],_0x5db708=_0xfade6f[_0x92fb('0x1a')],_0x457d02=_0xfade6f[_0x92fb('0x1a')]+_0xfade6f[_0x92fb('0x1b')],_0x1d3ca2;if(_0x457d02>=_0x12d77a){_0x457d02=_0x12d77a;_0x1d3ca2=0xc8;}else{_0x1d3ca2=0xce;}_0x5e2450['status'](_0x1d3ca2);return _0x5e2450[_0x92fb('0x1c')](_0x92fb('0x1d'),_0x5db708+'-'+_0x457d02+'/'+_0x12d77a)[_0x92fb('0x1e')](_0x13bf63);}return null;};}function patchUpdates(_0x19b173){return function(_0x5eb3a8){try{jsonpatch[_0x92fb('0x1f')](_0x5eb3a8,_0x19b173,!![]);}catch(_0x1b4bc0){return BPromise[_0x92fb('0x20')](_0x1b4bc0);}return _0x5eb3a8[_0x92fb('0x21')]();};}function saveUpdates(_0x13fa02,_0x537caf){return function(_0x134815){if(_0x134815){return _0x134815['update'](_0x13fa02)[_0x92fb('0x22')](function(_0x394f3a){return _0x394f3a;});}return null;};}function removeEntity(_0x8f711c,_0x1636af){return function(_0x3d6f00){if(_0x3d6f00){return _0x3d6f00[_0x92fb('0x23')]()[_0x92fb('0x22')](function(){_0x8f711c[_0x92fb('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0xfc574e,_0x5d6954){return function(_0xd6c444){if(!_0xd6c444){_0xfc574e[_0x92fb('0x16')](0x194);}return _0xd6c444;};}function handleError(_0x5240d8,_0x1553cb){_0x1553cb=_0x1553cb||0x1f4;return function(_0x271be0){logger['error'](_0x271be0[_0x92fb('0x24')]);if(_0x271be0[_0x92fb('0x25')]){delete _0x271be0[_0x92fb('0x25')];}_0x5240d8['status'](_0x1553cb)[_0x92fb('0x26')](_0x271be0);};}exports[_0x92fb('0x27')]=function(_0x271461,_0x54a1fb){var _0xf35dfd={},_0x420065={},_0x49c146={'count':0x0,'rows':[]};var _0x430fd5=_[_0x92fb('0x28')](db['SmsQueueReport'][_0x92fb('0x29')],function(_0x27c2ef){return{'name':_0x27c2ef[_0x92fb('0x2a')],'type':_0x27c2ef['type'][_0x92fb('0x2b')]};});_0x420065[_0x92fb('0x2c')]=_['map'](_0x430fd5,_0x92fb('0x25'));_0x420065[_0x92fb('0x2d')]=_['keys'](_0x271461[_0x92fb('0x2d')]);_0x420065[_0x92fb('0x2e')]=_[_0x92fb('0x2f')](_0x420065['model'],_0x420065['query']);_0xf35dfd[_0x92fb('0x30')]=_[_0x92fb('0x2f')](_0x420065['model'],qs['fields'](_0x271461[_0x92fb('0x2d')][_0x92fb('0x31')]));_0xf35dfd['attributes']=_0xf35dfd[_0x92fb('0x30')]['length']?_0xf35dfd[_0x92fb('0x30')]:_0x420065[_0x92fb('0x2c')];if(!_0x271461[_0x92fb('0x2d')]['hasOwnProperty'](_0x92fb('0x32'))){_0xf35dfd[_0x92fb('0x1b')]=qs[_0x92fb('0x1b')](_0x271461[_0x92fb('0x2d')][_0x92fb('0x1b')]);_0xf35dfd[_0x92fb('0x1a')]=qs[_0x92fb('0x1a')](_0x271461[_0x92fb('0x2d')]['offset']);}_0xf35dfd['order']=qs[_0x92fb('0x33')](_0x271461[_0x92fb('0x2d')][_0x92fb('0x33')]);_0xf35dfd[_0x92fb('0x34')]=qs[_0x92fb('0x2e')](_['pick'](_0x271461['query'],_0x420065[_0x92fb('0x2e')]));if(_0x271461[_0x92fb('0x2d')][_0x92fb('0x35')]){_0xf35dfd[_0x92fb('0x34')]=_[_0x92fb('0x36')](_0xf35dfd['where'],{'$or':_[_0x92fb('0x28')](_0x430fd5,function(_0x12dc3a){if(_0x12dc3a[_0x92fb('0x37')]!==_0x92fb('0x38')){var _0xc12aa={};_0xc12aa[_0x12dc3a[_0x92fb('0x25')]]={'$like':'%'+_0x271461['query'][_0x92fb('0x35')]+'%'};return _0xc12aa;}})});}_0xf35dfd=_[_0x92fb('0x36')]({},_0xf35dfd,_0x271461[_0x92fb('0x39')]);var _0x5395a5={'where':_0xf35dfd[_0x92fb('0x34')]};return db[_0x92fb('0x3a')]['count'](_0x5395a5)[_0x92fb('0x22')](function(_0x2b383c){_0x49c146['count']=_0x2b383c;if(_0x271461[_0x92fb('0x2d')]['includeAll']){_0xf35dfd['include']=[{'all':!![]}];}return db[_0x92fb('0x3a')][_0x92fb('0x3b')](_0xf35dfd);})[_0x92fb('0x22')](function(_0x4ad58e){_0x49c146[_0x92fb('0x3c')]=_0x4ad58e;return _0x49c146;})['then'](respondWithFilteredResult(_0x54a1fb,_0xf35dfd))[_0x92fb('0x3d')](handleError(_0x54a1fb,null));};exports['show']=function(_0x3e922a,_0x5563af){var _0x20f24c={'raw':!![],'where':{'id':_0x3e922a[_0x92fb('0x3e')]['id']}},_0x1f1c27={};_0x1f1c27[_0x92fb('0x2c')]=_[_0x92fb('0x3f')](db[_0x92fb('0x3a')][_0x92fb('0x29')]);_0x1f1c27['query']=_['keys'](_0x3e922a[_0x92fb('0x2d')]);_0x1f1c27[_0x92fb('0x2e')]=_['intersection'](_0x1f1c27[_0x92fb('0x2c')],_0x1f1c27[_0x92fb('0x2d')]);_0x20f24c['attributes']=_[_0x92fb('0x2f')](_0x1f1c27[_0x92fb('0x2c')],qs[_0x92fb('0x31')](_0x3e922a[_0x92fb('0x2d')]['fields']));_0x20f24c[_0x92fb('0x30')]=_0x20f24c[_0x92fb('0x30')][_0x92fb('0x40')]?_0x20f24c['attributes']:_0x1f1c27[_0x92fb('0x2c')];if(_0x3e922a['query'][_0x92fb('0x41')]){_0x20f24c['include']=[{'all':!![]}];}_0x20f24c=_[_0x92fb('0x36')]({},_0x20f24c,_0x3e922a['options']);return db[_0x92fb('0x3a')][_0x92fb('0x42')](_0x20f24c)['then'](handleEntityNotFound(_0x5563af,null))[_0x92fb('0x22')](respondWithResult(_0x5563af,null))['catch'](handleError(_0x5563af,null));};exports[_0x92fb('0x43')]=function(_0x372184,_0x1cfb1d){return db[_0x92fb('0x3a')][_0x92fb('0x43')](_0x372184[_0x92fb('0x44')],{})[_0x92fb('0x22')](respondWithResult(_0x1cfb1d,0xc9))[_0x92fb('0x3d')](handleError(_0x1cfb1d,null));};exports['update']=function(_0x4a8ff9,_0x33b40e){if(_0x4a8ff9[_0x92fb('0x44')]['id']){delete _0x4a8ff9[_0x92fb('0x44')]['id'];}return db[_0x92fb('0x3a')][_0x92fb('0x42')]({'where':{'id':_0x4a8ff9[_0x92fb('0x3e')]['id']}})[_0x92fb('0x22')](handleEntityNotFound(_0x33b40e,null))[_0x92fb('0x22')](saveUpdates(_0x4a8ff9[_0x92fb('0x44')],null))[_0x92fb('0x22')](respondWithResult(_0x33b40e,null))[_0x92fb('0x3d')](handleError(_0x33b40e,null));};exports[_0x92fb('0x23')]=function(_0x28dd62,_0x1e73b3){return db['SmsQueueReport'][_0x92fb('0x42')]({'where':{'id':_0x28dd62[_0x92fb('0x3e')]['id']}})[_0x92fb('0x22')](handleEntityNotFound(_0x1e73b3,null))[_0x92fb('0x22')](removeEntity(_0x1e73b3,null))['catch'](handleError(_0x1e73b3,null));};exports['describe']=function(_0x5ae3b4,_0x3e7984){return db['SmsQueueReport'][_0x92fb('0x45')]()[_0x92fb('0x22')](respondWithResult(_0x3e7984,null))[_0x92fb('0x3d')](handleError(_0x3e7984,null));};
\ No newline at end of file
+var _0x03de=['api','../../config/utils','../../config/environment','sendStatus','status','end','count','offset','Content-Range','apply','reject','update','then','stack','name','index','map','SmsQueueReport','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','VIRTUAL','filter','merge','includeAll','include','rows','catch','params','options','find','create','body','destroy','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware'];(function(_0x20f4af,_0x4163e6){var _0x20b7ed=function(_0x6defaa){while(--_0x6defaa){_0x20f4af['push'](_0x20f4af['shift']());}};_0x20b7ed(++_0x4163e6);}(_0x03de,0x7a));var _0xe03d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x03de[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0xe03d('0x0'));var emlformat=require(_0xe03d('0x1'));var rimraf=require(_0xe03d('0x2'));var zipdir=require(_0xe03d('0x3'));var jsonpatch=require(_0xe03d('0x4'));var rp=require(_0xe03d('0x5'));var moment=require(_0xe03d('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xe03d('0x7'));var util=require(_0xe03d('0x8'));var path=require(_0xe03d('0x9'));var sox=require(_0xe03d('0xa'));var csv=require('to-csv');var ejs=require(_0xe03d('0xb'));var fs=require('fs');var _=require(_0xe03d('0xc'));var squel=require(_0xe03d('0xd'));var crypto=require(_0xe03d('0xe'));var jsforce=require(_0xe03d('0xf'));var deskjs=require(_0xe03d('0x10'));var toCsv=require(_0xe03d('0x11'));var querystring=require('querystring');var Papa=require(_0xe03d('0x12'));var Redis=require('ioredis');var authService=require(_0xe03d('0x13'));var qs=require(_0xe03d('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe03d('0x15'));var logger=require('../../config/logger')(_0xe03d('0x16'));var utils=require(_0xe03d('0x17'));var config=require(_0xe03d('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xe27aa0,_0x13e818){_0x13e818=_0x13e818||0xcc;return function(_0x5dd2eb){if(_0x5dd2eb){return _0xe27aa0[_0xe03d('0x19')](_0x13e818);}return _0xe27aa0[_0xe03d('0x1a')](_0x13e818)[_0xe03d('0x1b')]();};}function respondWithResult(_0x1f0b54,_0x5a4f12){_0x5a4f12=_0x5a4f12||0xc8;return function(_0x5d5fa1){if(_0x5d5fa1){return _0x1f0b54[_0xe03d('0x1a')](_0x5a4f12)['json'](_0x5d5fa1);}};}function respondWithFilteredResult(_0x6afece,_0x2dfce3){return function(_0x16affe){if(_0x16affe){var _0x18d52b=_0x16affe[_0xe03d('0x1c')],_0x1b671a=_0x2dfce3[_0xe03d('0x1d')],_0x405a14=_0x2dfce3[_0xe03d('0x1d')]+_0x2dfce3['limit'],_0x677f9e;if(_0x405a14>=_0x18d52b){_0x405a14=_0x18d52b;_0x677f9e=0xc8;}else{_0x677f9e=0xce;}_0x6afece[_0xe03d('0x1a')](_0x677f9e);return _0x6afece['set'](_0xe03d('0x1e'),_0x1b671a+'-'+_0x405a14+'/'+_0x18d52b)['json'](_0x16affe);}return null;};}function patchUpdates(_0x122a4e){return function(_0x40f7c3){try{jsonpatch[_0xe03d('0x1f')](_0x40f7c3,_0x122a4e,!![]);}catch(_0x311d94){return BPromise[_0xe03d('0x20')](_0x311d94);}return _0x40f7c3['save']();};}function saveUpdates(_0x8f4cc6,_0x4e7156){return function(_0x4085ac){if(_0x4085ac){return _0x4085ac[_0xe03d('0x21')](_0x8f4cc6)['then'](function(_0x480282){return _0x480282;});}return null;};}function removeEntity(_0x28db58,_0x51cc72){return function(_0x2d3b1c){if(_0x2d3b1c){return _0x2d3b1c['destroy']()[_0xe03d('0x22')](function(){_0x28db58[_0xe03d('0x1a')](0xcc)[_0xe03d('0x1b')]();});}};}function handleEntityNotFound(_0x4640ae,_0x2a0490){return function(_0x5ef0f8){if(!_0x5ef0f8){_0x4640ae['sendStatus'](0x194);}return _0x5ef0f8;};}function handleError(_0xf1e777,_0x325f0e){_0x325f0e=_0x325f0e||0x1f4;return function(_0x75b16e){logger['error'](_0x75b16e[_0xe03d('0x23')]);if(_0x75b16e[_0xe03d('0x24')]){delete _0x75b16e[_0xe03d('0x24')];}_0xf1e777[_0xe03d('0x1a')](_0x325f0e)['send'](_0x75b16e);};}exports[_0xe03d('0x25')]=function(_0x1805ee,_0x424c5a){var _0x1acc16={},_0x2b3545={},_0x2e9d82={'count':0x0,'rows':[]};var _0x2a5606=_[_0xe03d('0x26')](db[_0xe03d('0x27')][_0xe03d('0x28')],function(_0x4fcea0){return{'name':_0x4fcea0[_0xe03d('0x29')],'type':_0x4fcea0[_0xe03d('0x2a')]['key']};});_0x2b3545[_0xe03d('0x2b')]=_[_0xe03d('0x26')](_0x2a5606,_0xe03d('0x24'));_0x2b3545[_0xe03d('0x2c')]=_[_0xe03d('0x2d')](_0x1805ee['query']);_0x2b3545[_0xe03d('0x2e')]=_[_0xe03d('0x2f')](_0x2b3545[_0xe03d('0x2b')],_0x2b3545[_0xe03d('0x2c')]);_0x1acc16[_0xe03d('0x30')]=_[_0xe03d('0x2f')](_0x2b3545[_0xe03d('0x2b')],qs['fields'](_0x1805ee[_0xe03d('0x2c')][_0xe03d('0x31')]));_0x1acc16['attributes']=_0x1acc16[_0xe03d('0x30')][_0xe03d('0x32')]?_0x1acc16[_0xe03d('0x30')]:_0x2b3545[_0xe03d('0x2b')];if(!_0x1805ee[_0xe03d('0x2c')][_0xe03d('0x33')](_0xe03d('0x34'))){_0x1acc16[_0xe03d('0x35')]=qs[_0xe03d('0x35')](_0x1805ee['query'][_0xe03d('0x35')]);_0x1acc16['offset']=qs[_0xe03d('0x1d')](_0x1805ee['query'][_0xe03d('0x1d')]);}_0x1acc16[_0xe03d('0x36')]=qs[_0xe03d('0x37')](_0x1805ee[_0xe03d('0x2c')][_0xe03d('0x37')]);_0x1acc16[_0xe03d('0x38')]=qs[_0xe03d('0x2e')](_[_0xe03d('0x39')](_0x1805ee[_0xe03d('0x2c')],_0x2b3545['filters']));if(_0x1805ee['query']['filter']){_0x1acc16[_0xe03d('0x38')]=_['merge'](_0x1acc16[_0xe03d('0x38')],{'$or':_['map'](_0x2a5606,function(_0x2c1df6){if(_0x2c1df6[_0xe03d('0x2a')]!==_0xe03d('0x3a')){var _0x37c305={};_0x37c305[_0x2c1df6[_0xe03d('0x24')]]={'$like':'%'+_0x1805ee['query'][_0xe03d('0x3b')]+'%'};return _0x37c305;}})});}_0x1acc16=_[_0xe03d('0x3c')]({},_0x1acc16,_0x1805ee['options']);var _0x3f4366={'where':_0x1acc16[_0xe03d('0x38')]};return db[_0xe03d('0x27')]['count'](_0x3f4366)[_0xe03d('0x22')](function(_0x22088e){_0x2e9d82['count']=_0x22088e;if(_0x1805ee[_0xe03d('0x2c')][_0xe03d('0x3d')]){_0x1acc16[_0xe03d('0x3e')]=[{'all':!![]}];}return db['SmsQueueReport']['findAll'](_0x1acc16);})[_0xe03d('0x22')](function(_0x444d83){_0x2e9d82[_0xe03d('0x3f')]=_0x444d83;return _0x2e9d82;})[_0xe03d('0x22')](respondWithFilteredResult(_0x424c5a,_0x1acc16))[_0xe03d('0x40')](handleError(_0x424c5a,null));};exports['show']=function(_0x2bd6ee,_0x6a6bc1){var _0x282405={'raw':!![],'where':{'id':_0x2bd6ee[_0xe03d('0x41')]['id']}},_0x5917bd={};_0x5917bd['model']=_[_0xe03d('0x2d')](db[_0xe03d('0x27')][_0xe03d('0x28')]);_0x5917bd[_0xe03d('0x2c')]=_['keys'](_0x2bd6ee['query']);_0x5917bd['filters']=_[_0xe03d('0x2f')](_0x5917bd[_0xe03d('0x2b')],_0x5917bd[_0xe03d('0x2c')]);_0x282405[_0xe03d('0x30')]=_['intersection'](_0x5917bd['model'],qs[_0xe03d('0x31')](_0x2bd6ee[_0xe03d('0x2c')][_0xe03d('0x31')]));_0x282405[_0xe03d('0x30')]=_0x282405['attributes'][_0xe03d('0x32')]?_0x282405[_0xe03d('0x30')]:_0x5917bd[_0xe03d('0x2b')];if(_0x2bd6ee[_0xe03d('0x2c')][_0xe03d('0x3d')]){_0x282405['include']=[{'all':!![]}];}_0x282405=_[_0xe03d('0x3c')]({},_0x282405,_0x2bd6ee[_0xe03d('0x42')]);return db[_0xe03d('0x27')][_0xe03d('0x43')](_0x282405)['then'](handleEntityNotFound(_0x6a6bc1,null))['then'](respondWithResult(_0x6a6bc1,null))[_0xe03d('0x40')](handleError(_0x6a6bc1,null));};exports[_0xe03d('0x44')]=function(_0x2ed80b,_0xeb9b48){return db[_0xe03d('0x27')]['create'](_0x2ed80b[_0xe03d('0x45')],{})[_0xe03d('0x22')](respondWithResult(_0xeb9b48,0xc9))['catch'](handleError(_0xeb9b48,null));};exports[_0xe03d('0x21')]=function(_0x58d946,_0x4c46df){if(_0x58d946[_0xe03d('0x45')]['id']){delete _0x58d946[_0xe03d('0x45')]['id'];}return db[_0xe03d('0x27')]['find']({'where':{'id':_0x58d946[_0xe03d('0x41')]['id']}})[_0xe03d('0x22')](handleEntityNotFound(_0x4c46df,null))[_0xe03d('0x22')](saveUpdates(_0x58d946[_0xe03d('0x45')],null))['then'](respondWithResult(_0x4c46df,null))[_0xe03d('0x40')](handleError(_0x4c46df,null));};exports[_0xe03d('0x46')]=function(_0x516171,_0x58592a){return db[_0xe03d('0x27')]['find']({'where':{'id':_0x516171['params']['id']}})[_0xe03d('0x22')](handleEntityNotFound(_0x58592a,null))[_0xe03d('0x22')](removeEntity(_0x58592a,null))[_0xe03d('0x40')](handleError(_0x58592a,null));};exports[_0xe03d('0x47')]=function(_0x541bba,_0x1b5ec1){return db['SmsQueueReport'][_0xe03d('0x47')]()[_0xe03d('0x22')](respondWithResult(_0x1b5ec1,null))[_0xe03d('0x40')](handleError(_0x1b5ec1,null));};
\ No newline at end of file
diff --git a/server/api/smsQueueReport/smsQueueReport.model.js b/server/api/smsQueueReport/smsQueueReport.model.js
index 7e39529..b185677 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 _0x7623=['../../config/logger','bluebird','request-promise','rimraf','../../config/environment','exports','report_sms_queue','uniqueid','lodash','util'];(function(_0x34c083,_0x202058){var _0x1dd43d=function(_0xd764d1){while(--_0xd764d1){_0x34c083['push'](_0x34c083['shift']());}};_0x1dd43d(++_0x202058);}(_0x7623,0x80));var _0x3762=function(_0x381fac,_0x2c7e36){_0x381fac=_0x381fac-0x0;var _0xdb89c4=_0x7623[_0x381fac];return _0xdb89c4;};'use strict';var _=require(_0x3762('0x0'));var util=require(_0x3762('0x1'));var logger=require(_0x3762('0x2'))('api');var moment=require('moment');var BPromise=require(_0x3762('0x3'));var rp=require(_0x3762('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3762('0x5'));var config=require(_0x3762('0x6'));var attributes=require('./smsQueueReport.attributes');module[_0x3762('0x7')]=function(_0xa3a86a,_0x446aac){return _0xa3a86a['define']('SmsQueueReport',attributes,{'tableName':_0x3762('0x8'),'paranoid':![],'indexes':[{'name':_0x3762('0x9'),'fields':[_0x3762('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xc17c=['../../config/environment','./smsQueueReport.attributes','exports','SmsQueueReport','report_sms_queue','uniqueid','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x4947bf,_0x334f29){var _0x1f5f13=function(_0x28dea4){while(--_0x28dea4){_0x4947bf['push'](_0x4947bf['shift']());}};_0x1f5f13(++_0x334f29);}(_0xc17c,0x17f));var _0xcc17=function(_0x1ee361,_0x2d0b1b){_0x1ee361=_0x1ee361-0x0;var _0x591542=_0xc17c[_0x1ee361];return _0x591542;};'use strict';var _=require('lodash');var util=require(_0xcc17('0x0'));var logger=require(_0xcc17('0x1'))(_0xcc17('0x2'));var moment=require(_0xcc17('0x3'));var BPromise=require(_0xcc17('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xcc17('0x5'));var rimraf=require(_0xcc17('0x6'));var config=require(_0xcc17('0x7'));var attributes=require(_0xcc17('0x8'));module[_0xcc17('0x9')]=function(_0x256248,_0x291626){return _0x256248['define'](_0xcc17('0xa'),attributes,{'tableName':_0xcc17('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xcc17('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 72101e4..93df46d 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 _0xcecc=['SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','CreateSmsQueueReport','SmsQueueReport','options','debug','catch','UpdateSmsQueueReport','body','raw','where','attributes','limit','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','SmsQueueReport,\x20%s,\x20%s','request\x20sent'];(function(_0x3ffc86,_0x4037c4){var _0x593a05=function(_0x6d2c82){while(--_0x6d2c82){_0x3ffc86['push'](_0x3ffc86['shift']());}};_0x593a05(++_0x4037c4);}(_0xcecc,0x8c));var _0xccec=function(_0x12ac60,_0x15d279){_0x12ac60=_0x12ac60-0x0;var _0x24a96e=_0xcecc[_0x12ac60];return _0x24a96e;};'use strict';var _=require(_0xccec('0x0'));var util=require(_0xccec('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xccec('0x2'));var db=require(_0xccec('0x3'))['db'];var utils=require(_0xccec('0x4'));var logger=require(_0xccec('0x5'))(_0xccec('0x6'));var config=require(_0xccec('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xccec('0x8')][_0xccec('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x52f8ff,_0x8f014c,_0x492419){return new BPromise(function(_0x62680c,_0x57040c){return client[_0xccec('0xa')](_0x52f8ff,_0x492419)[_0xccec('0xb')](function(_0x261d07){logger[_0xccec('0xc')](_0xccec('0xd'),_0x8f014c,_0xccec('0xe'));logger['debug'](_0xccec('0xf'),_0x8f014c,'request\x20sent',JSON[_0xccec('0x10')](_0x261d07));if(_0x261d07[_0xccec('0x11')]){if(_0x261d07[_0xccec('0x11')][_0xccec('0x12')]===0x1f4){logger['error']('SmsQueueReport,\x20%s,\x20%s',_0x8f014c,_0x261d07[_0xccec('0x11')][_0xccec('0x13')]);return _0x57040c(_0x261d07[_0xccec('0x11')]['message']);}logger['error'](_0xccec('0xd'),_0x8f014c,_0x261d07['error'][_0xccec('0x13')]);return _0x62680c(_0x261d07[_0xccec('0x11')]['message']);}else{logger[_0xccec('0xc')](_0xccec('0xd'),_0x8f014c,'request\x20sent');_0x62680c(_0x261d07['result'][_0xccec('0x13')]);}})['catch'](function(_0xa7e448){logger[_0xccec('0x11')](_0xccec('0xd'),_0x8f014c,_0xa7e448);_0x57040c(_0xa7e448);});});}exports[_0xccec('0x14')]=function(_0x2f2662){var _0x75c7a2=this;return new Promise(function(_0x59c5dd,_0x3b1799){return db[_0xccec('0x15')]['create'](_0x2f2662['body'],{'raw':_0x2f2662[_0xccec('0x16')]?_0x2f2662['options']['raw']===undefined?!![]:![]:!![]})[_0xccec('0xb')](function(_0x2d4382){logger[_0xccec('0xc')](_0xccec('0x14'),_0x2f2662);logger[_0xccec('0x17')](_0xccec('0x14'),_0x2f2662,JSON[_0xccec('0x10')](_0x2d4382));_0x59c5dd(_0x2d4382);})[_0xccec('0x18')](function(_0x5e1635){logger[_0xccec('0x11')](_0xccec('0x14'),_0x5e1635[_0xccec('0x13')],_0x2f2662);_0x3b1799(_0x75c7a2['error'](0x1f4,_0x5e1635['message']));});});};exports[_0xccec('0x19')]=function(_0x567e04){var _0x50f7a7=this;return new Promise(function(_0x24402b,_0x535910){return db['SmsQueueReport']['update'](_0x567e04[_0xccec('0x1a')],{'raw':_0x567e04[_0xccec('0x16')]?_0x567e04[_0xccec('0x16')][_0xccec('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x567e04[_0xccec('0x16')]?_0x567e04[_0xccec('0x16')][_0xccec('0x1c')]||null:null,'attributes':_0x567e04['options']?_0x567e04[_0xccec('0x16')][_0xccec('0x1d')]||null:null,'limit':_0x567e04[_0xccec('0x16')]?_0x567e04['options'][_0xccec('0x1e')]||null:null})['then'](function(_0x1f9025){logger[_0xccec('0xc')](_0xccec('0x19'),_0x567e04);logger[_0xccec('0x17')](_0xccec('0x19'),_0x567e04,JSON[_0xccec('0x10')](_0x1f9025));_0x24402b(_0x1f9025);})[_0xccec('0x18')](function(_0x9ee766){logger['error'](_0xccec('0x19'),_0x9ee766[_0xccec('0x13')],_0x567e04);_0x535910(_0x50f7a7[_0xccec('0x11')](0x1f4,_0x9ee766[_0xccec('0x13')]));});});};
\ No newline at end of file
+var _0x6943=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','SmsQueueReport,\x20%s,\x20%s','request\x20sent','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','CreateSmsQueueReport','SmsQueueReport','create','body','options','raw','catch','update','where','attributes','limit','debug','UpdateSmsQueueReport','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x1aa89b,_0x2d5c5b){var _0x5f00c5=function(_0x525577){while(--_0x525577){_0x1aa89b['push'](_0x1aa89b['shift']());}};_0x5f00c5(++_0x2d5c5b);}(_0x6943,0xf6));var _0x3694=function(_0x19ef2b,_0x354f66){_0x19ef2b=_0x19ef2b-0x0;var _0x4df537=_0x6943[_0x19ef2b];return _0x4df537;};'use strict';var _=require(_0x3694('0x0'));var util=require(_0x3694('0x1'));var moment=require(_0x3694('0x2'));var BPromise=require(_0x3694('0x3'));var rs=require(_0x3694('0x4'));var fs=require('fs');var Redis=require(_0x3694('0x5'));var db=require(_0x3694('0x6'))['db'];var utils=require(_0x3694('0x7'));var logger=require(_0x3694('0x8'))(_0x3694('0x9'));var config=require(_0x3694('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x3694('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x51d870,_0xb5ee2f,_0x256204){return new BPromise(function(_0x3ec18a,_0x479c5a){return client[_0x3694('0xc')](_0x51d870,_0x256204)[_0x3694('0xd')](function(_0x597d2c){logger['info'](_0x3694('0xe'),_0xb5ee2f,_0x3694('0xf'));logger['debug'](_0x3694('0x10'),_0xb5ee2f,'request\x20sent',JSON[_0x3694('0x11')](_0x597d2c));if(_0x597d2c['error']){if(_0x597d2c[_0x3694('0x12')][_0x3694('0x13')]===0x1f4){logger[_0x3694('0x12')]('SmsQueueReport,\x20%s,\x20%s',_0xb5ee2f,_0x597d2c[_0x3694('0x12')][_0x3694('0x14')]);return _0x479c5a(_0x597d2c['error'][_0x3694('0x14')]);}logger[_0x3694('0x12')](_0x3694('0xe'),_0xb5ee2f,_0x597d2c[_0x3694('0x12')][_0x3694('0x14')]);return _0x3ec18a(_0x597d2c[_0x3694('0x12')][_0x3694('0x14')]);}else{logger[_0x3694('0x15')](_0x3694('0xe'),_0xb5ee2f,_0x3694('0xf'));_0x3ec18a(_0x597d2c[_0x3694('0x16')][_0x3694('0x14')]);}})['catch'](function(_0x5523fd){logger[_0x3694('0x12')](_0x3694('0xe'),_0xb5ee2f,_0x5523fd);_0x479c5a(_0x5523fd);});});}exports[_0x3694('0x17')]=function(_0x50a0eb){var _0x1bb03d=this;return new Promise(function(_0x40ede4,_0xaf7c99){return db[_0x3694('0x18')][_0x3694('0x19')](_0x50a0eb[_0x3694('0x1a')],{'raw':_0x50a0eb[_0x3694('0x1b')]?_0x50a0eb[_0x3694('0x1b')][_0x3694('0x1c')]===undefined?!![]:![]:!![]})[_0x3694('0xd')](function(_0x27d64f){logger[_0x3694('0x15')]('CreateSmsQueueReport',_0x50a0eb);logger['debug'](_0x3694('0x17'),_0x50a0eb,JSON[_0x3694('0x11')](_0x27d64f));_0x40ede4(_0x27d64f);})[_0x3694('0x1d')](function(_0x53dc2c){logger[_0x3694('0x12')](_0x3694('0x17'),_0x53dc2c[_0x3694('0x14')],_0x50a0eb);_0xaf7c99(_0x1bb03d[_0x3694('0x12')](0x1f4,_0x53dc2c[_0x3694('0x14')]));});});};exports['UpdateSmsQueueReport']=function(_0x5729fd){var _0x5bb4a9=this;return new Promise(function(_0x10f205,_0x5547a6){return db[_0x3694('0x18')][_0x3694('0x1e')](_0x5729fd[_0x3694('0x1a')],{'raw':_0x5729fd[_0x3694('0x1b')]?_0x5729fd[_0x3694('0x1b')][_0x3694('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5729fd[_0x3694('0x1b')]?_0x5729fd[_0x3694('0x1b')][_0x3694('0x1f')]||null:null,'attributes':_0x5729fd[_0x3694('0x1b')]?_0x5729fd[_0x3694('0x1b')][_0x3694('0x20')]||null:null,'limit':_0x5729fd[_0x3694('0x1b')]?_0x5729fd[_0x3694('0x1b')][_0x3694('0x21')]||null:null})[_0x3694('0xd')](function(_0x59364a){logger[_0x3694('0x15')]('UpdateSmsQueueReport',_0x5729fd);logger[_0x3694('0x22')](_0x3694('0x23'),_0x5729fd,JSON[_0x3694('0x11')](_0x59364a));_0x10f205(_0x59364a);})[_0x3694('0x1d')](function(_0x11edb0){logger[_0x3694('0x12')](_0x3694('0x23'),_0x11edb0[_0x3694('0x14')],_0x5729fd);_0x5547a6(_0x5bb4a9[_0x3694('0x12')](0x1f4,_0x11edb0[_0x3694('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/index.js b/server/api/smsTransferReport/index.js
index b2160d8..2878d4d 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 _0x4024=['exports','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','./smsTransferReport.controller','index','get','/describe','describe','isAuthenticated','put','delete','/:id','destroy'];(function(_0x29dd3e,_0x42a8d2){var _0x2edeb7=function(_0x40d090){while(--_0x40d090){_0x29dd3e['push'](_0x29dd3e['shift']());}};_0x2edeb7(++_0x42a8d2);}(_0x4024,0x89));var _0x4402=function(_0x1165e2,_0x34b046){_0x1165e2=_0x1165e2-0x0;var _0x84760b=_0x4024[_0x1165e2];return _0x84760b;};'use strict';var multer=require(_0x4402('0x0'));var util=require(_0x4402('0x1'));var path=require('path');var timeout=require(_0x4402('0x2'));var express=require(_0x4402('0x3'));var router=express['Router']();var auth=require(_0x4402('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x4402('0x5'));var controller=require(_0x4402('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x4402('0x7')]);router[_0x4402('0x8')](_0x4402('0x9'),auth['isAuthenticated'](),controller[_0x4402('0xa')]);router['get']('/:id',auth[_0x4402('0xb')](),controller['show']);router['post']('/',auth[_0x4402('0xb')](),controller['create']);router[_0x4402('0xc')]('/:id',auth[_0x4402('0xb')](),controller['update']);router[_0x4402('0xd')](_0x4402('0xe'),auth['isAuthenticated'](),controller[_0x4402('0xf')]);module[_0x4402('0x10')]=router;
\ No newline at end of file
+var _0xb03e=['describe','/:id','post','create','update','delete','destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsTransferReport.controller','get','isAuthenticated','index','/describe'];(function(_0x9296f6,_0x220382){var _0x43d0d2=function(_0x8ffbbc){while(--_0x8ffbbc){_0x9296f6['push'](_0x9296f6['shift']());}};_0x43d0d2(++_0x220382);}(_0xb03e,0x1eb));var _0xeb03=function(_0x3ecb83,_0x232272){_0x3ecb83=_0x3ecb83-0x0;var _0x49817e=_0xb03e[_0x3ecb83];return _0x49817e;};'use strict';var multer=require('multer');var util=require(_0xeb03('0x0'));var path=require(_0xeb03('0x1'));var timeout=require(_0xeb03('0x2'));var express=require(_0xeb03('0x3'));var router=express[_0xeb03('0x4')]();var auth=require(_0xeb03('0x5'));var interaction=require(_0xeb03('0x6'));var config=require(_0xeb03('0x7'));var controller=require(_0xeb03('0x8'));router[_0xeb03('0x9')]('/',auth[_0xeb03('0xa')](),controller[_0xeb03('0xb')]);router['get'](_0xeb03('0xc'),auth[_0xeb03('0xa')](),controller[_0xeb03('0xd')]);router[_0xeb03('0x9')](_0xeb03('0xe'),auth[_0xeb03('0xa')](),controller['show']);router[_0xeb03('0xf')]('/',auth[_0xeb03('0xa')](),controller[_0xeb03('0x10')]);router['put'](_0xeb03('0xe'),auth['isAuthenticated'](),controller[_0xeb03('0x11')]);router[_0xeb03('0x12')](_0xeb03('0xe'),auth[_0xeb03('0xa')](),controller[_0xeb03('0x13')]);module[_0xeb03('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.attributes.js b/server/api/smsTransferReport/smsTransferReport.attributes.js
index 0503a7d..724c543 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 _0xd276=['ENUM','account','queue','NOW','exports','STRING'];(function(_0x39d296,_0x4515d2){var _0x6f5f53=function(_0x1cacbe){while(--_0x1cacbe){_0x39d296['push'](_0x39d296['shift']());}};_0x6f5f53(++_0x4515d2);}(_0xd276,0x64));var _0x6d27=function(_0x36dfbd,_0x5bfe2d){_0x36dfbd=_0x36dfbd-0x0;var _0x4ecad9=_0xd276[_0x36dfbd];return _0x4ecad9;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x6d27('0x0')]={'uniqueid':{'type':Sequelize[_0x6d27('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x6d27('0x2')](_0x6d27('0x3'),'agent',_0x6d27('0x4')),'allowNull':![],'defaultValue':_0x6d27('0x4')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x6d27('0x5')]}};
\ No newline at end of file
+var _0xa0ff=['DATE','NOW','exports','STRING','ENUM','queue'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa0ff,0x1dc));var _0xfa0f=function(_0x7148a3,_0x1c6652){_0x7148a3=_0x7148a3-0x0;var _0x52f31d=_0xa0ff[_0x7148a3];return _0x52f31d;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0xfa0f('0x0')]={'uniqueid':{'type':Sequelize[_0xfa0f('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0xfa0f('0x2')]('account','agent',_0xfa0f('0x3')),'allowNull':![],'defaultValue':_0xfa0f('0x3')},'transferredAt':{'type':Sequelize[_0xfa0f('0x4')],'allowNull':![],'defaultValue':Sequelize[_0xfa0f('0x5')]}};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.controller.js b/server/api/smsTransferReport/smsTransferReport.controller.js
index 3a2d976..4fc2dd4 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 _0x07d4=['../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','error','stack','name','send','index','map','SmsTransferReport','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','options','count','includeAll','include','findAll','rows','show','params','merge','find','catch','create','body','describe','html-pdf','eml-format','rimraf','request-promise','bluebird','mustache','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x2eac1e,_0x5832ed){var _0x5bc0a7=function(_0x3f3ee0){while(--_0x3f3ee0){_0x2eac1e['push'](_0x2eac1e['shift']());}};_0x5bc0a7(++_0x5832ed);}(_0x07d4,0x85));var _0x407d=function(_0x271571,_0x4737a8){_0x271571=_0x271571-0x0;var _0x30fde9=_0x07d4[_0x271571];return _0x30fde9;};'use strict';var pdf=require(_0x407d('0x0'));var emlformat=require(_0x407d('0x1'));var rimraf=require(_0x407d('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x407d('0x3'));var moment=require('moment');var BPromise=require(_0x407d('0x4'));var Mustache=require(_0x407d('0x5'));var util=require('util');var path=require(_0x407d('0x6'));var sox=require(_0x407d('0x7'));var csv=require(_0x407d('0x8'));var ejs=require(_0x407d('0x9'));var fs=require('fs');var _=require(_0x407d('0xa'));var squel=require('squel');var crypto=require(_0x407d('0xb'));var jsforce=require(_0x407d('0xc'));var deskjs=require(_0x407d('0xd'));var toCsv=require(_0x407d('0x8'));var querystring=require(_0x407d('0xe'));var Papa=require(_0x407d('0xf'));var Redis=require(_0x407d('0x10'));var authService=require(_0x407d('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x407d('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x407d('0x13'))(_0x407d('0x14'));var utils=require(_0x407d('0x15'));var config=require(_0x407d('0x16'));var db=require(_0x407d('0x17'))['db'];function respondWithStatusCode(_0x4072f5,_0x50b394){_0x50b394=_0x50b394||0xcc;return function(_0x5a1706){if(_0x5a1706){return _0x4072f5[_0x407d('0x18')](_0x50b394);}return _0x4072f5[_0x407d('0x19')](_0x50b394)[_0x407d('0x1a')]();};}function respondWithResult(_0x189f54,_0x123c3a){_0x123c3a=_0x123c3a||0xc8;return function(_0x412336){if(_0x412336){return _0x189f54['status'](_0x123c3a)[_0x407d('0x1b')](_0x412336);}};}function respondWithFilteredResult(_0x29991b,_0x18de53){return function(_0x22831e){if(_0x22831e){var _0x22db8c=_0x22831e['count'],_0x1ae5cd=_0x18de53[_0x407d('0x1c')],_0x11b826=_0x18de53['offset']+_0x18de53[_0x407d('0x1d')],_0x5cb64e;if(_0x11b826>=_0x22db8c){_0x11b826=_0x22db8c;_0x5cb64e=0xc8;}else{_0x5cb64e=0xce;}_0x29991b[_0x407d('0x19')](_0x5cb64e);return _0x29991b[_0x407d('0x1e')](_0x407d('0x1f'),_0x1ae5cd+'-'+_0x11b826+'/'+_0x22db8c)[_0x407d('0x1b')](_0x22831e);}return null;};}function patchUpdates(_0x5323cf){return function(_0x44c394){try{jsonpatch[_0x407d('0x20')](_0x44c394,_0x5323cf,!![]);}catch(_0x5a77b4){return BPromise[_0x407d('0x21')](_0x5a77b4);}return _0x44c394[_0x407d('0x22')]();};}function saveUpdates(_0x5f3931,_0xd90329){return function(_0xbd85c1){if(_0xbd85c1){return _0xbd85c1[_0x407d('0x23')](_0x5f3931)['then'](function(_0x4d89e1){return _0x4d89e1;});}return null;};}function removeEntity(_0x353ef1,_0x174593){return function(_0xa09aad){if(_0xa09aad){return _0xa09aad[_0x407d('0x24')]()[_0x407d('0x25')](function(){_0x353ef1[_0x407d('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0xd28e04,_0x4e3a1c){return function(_0x2eda7d){if(!_0x2eda7d){_0xd28e04[_0x407d('0x18')](0x194);}return _0x2eda7d;};}function handleError(_0x410e94,_0x70fa69){_0x70fa69=_0x70fa69||0x1f4;return function(_0x276cac){logger[_0x407d('0x26')](_0x276cac[_0x407d('0x27')]);if(_0x276cac[_0x407d('0x28')]){delete _0x276cac[_0x407d('0x28')];}_0x410e94[_0x407d('0x19')](_0x70fa69)[_0x407d('0x29')](_0x276cac);};}exports[_0x407d('0x2a')]=function(_0x48ad56,_0x4f3aa5){var _0xdb6124={},_0x354b87={},_0x30ee50={'count':0x0,'rows':[]};var _0x366588=_[_0x407d('0x2b')](db[_0x407d('0x2c')][_0x407d('0x2d')],function(_0x5eb25e){return{'name':_0x5eb25e[_0x407d('0x2e')],'type':_0x5eb25e['type'][_0x407d('0x2f')]};});_0x354b87[_0x407d('0x30')]=_['map'](_0x366588,_0x407d('0x28'));_0x354b87[_0x407d('0x31')]=_[_0x407d('0x32')](_0x48ad56[_0x407d('0x31')]);_0x354b87[_0x407d('0x33')]=_[_0x407d('0x34')](_0x354b87['model'],_0x354b87[_0x407d('0x31')]);_0xdb6124[_0x407d('0x35')]=_[_0x407d('0x34')](_0x354b87['model'],qs[_0x407d('0x36')](_0x48ad56[_0x407d('0x31')][_0x407d('0x36')]));_0xdb6124[_0x407d('0x35')]=_0xdb6124['attributes'][_0x407d('0x37')]?_0xdb6124[_0x407d('0x35')]:_0x354b87[_0x407d('0x30')];if(!_0x48ad56['query'][_0x407d('0x38')](_0x407d('0x39'))){_0xdb6124['limit']=qs['limit'](_0x48ad56[_0x407d('0x31')][_0x407d('0x1d')]);_0xdb6124['offset']=qs[_0x407d('0x1c')](_0x48ad56[_0x407d('0x31')][_0x407d('0x1c')]);}_0xdb6124[_0x407d('0x3a')]=qs[_0x407d('0x3b')](_0x48ad56[_0x407d('0x31')]['sort']);_0xdb6124[_0x407d('0x3c')]=qs['filters'](_[_0x407d('0x3d')](_0x48ad56[_0x407d('0x31')],_0x354b87['filters']));if(_0x48ad56[_0x407d('0x31')][_0x407d('0x3e')]){_0xdb6124[_0x407d('0x3c')]=_['merge'](_0xdb6124['where'],{'$or':_[_0x407d('0x2b')](_0x366588,function(_0x3ffb30){if(_0x3ffb30[_0x407d('0x3f')]!=='VIRTUAL'){var _0x45cb3b={};_0x45cb3b[_0x3ffb30[_0x407d('0x28')]]={'$like':'%'+_0x48ad56[_0x407d('0x31')]['filter']+'%'};return _0x45cb3b;}})});}_0xdb6124=_['merge']({},_0xdb6124,_0x48ad56[_0x407d('0x40')]);var _0x9147a4={'where':_0xdb6124[_0x407d('0x3c')]};return db[_0x407d('0x2c')]['count'](_0x9147a4)[_0x407d('0x25')](function(_0x223817){_0x30ee50[_0x407d('0x41')]=_0x223817;if(_0x48ad56[_0x407d('0x31')][_0x407d('0x42')]){_0xdb6124[_0x407d('0x43')]=[{'all':!![]}];}return db[_0x407d('0x2c')][_0x407d('0x44')](_0xdb6124);})[_0x407d('0x25')](function(_0x4fa4b0){_0x30ee50[_0x407d('0x45')]=_0x4fa4b0;return _0x30ee50;})[_0x407d('0x25')](respondWithFilteredResult(_0x4f3aa5,_0xdb6124))['catch'](handleError(_0x4f3aa5,null));};exports[_0x407d('0x46')]=function(_0x4aa135,_0x4b912c){var _0x393d3f={'raw':!![],'where':{'id':_0x4aa135[_0x407d('0x47')]['id']}},_0x1482e8={};_0x1482e8[_0x407d('0x30')]=_[_0x407d('0x32')](db[_0x407d('0x2c')][_0x407d('0x2d')]);_0x1482e8[_0x407d('0x31')]=_[_0x407d('0x32')](_0x4aa135[_0x407d('0x31')]);_0x1482e8[_0x407d('0x33')]=_[_0x407d('0x34')](_0x1482e8[_0x407d('0x30')],_0x1482e8['query']);_0x393d3f[_0x407d('0x35')]=_[_0x407d('0x34')](_0x1482e8[_0x407d('0x30')],qs[_0x407d('0x36')](_0x4aa135['query']['fields']));_0x393d3f['attributes']=_0x393d3f[_0x407d('0x35')][_0x407d('0x37')]?_0x393d3f[_0x407d('0x35')]:_0x1482e8[_0x407d('0x30')];if(_0x4aa135[_0x407d('0x31')]['includeAll']){_0x393d3f[_0x407d('0x43')]=[{'all':!![]}];}_0x393d3f=_[_0x407d('0x48')]({},_0x393d3f,_0x4aa135['options']);return db['SmsTransferReport'][_0x407d('0x49')](_0x393d3f)[_0x407d('0x25')](handleEntityNotFound(_0x4b912c,null))[_0x407d('0x25')](respondWithResult(_0x4b912c,null))[_0x407d('0x4a')](handleError(_0x4b912c,null));};exports[_0x407d('0x4b')]=function(_0x1daa7a,_0xe1d18c){return db[_0x407d('0x2c')]['create'](_0x1daa7a[_0x407d('0x4c')],{})[_0x407d('0x25')](respondWithResult(_0xe1d18c,0xc9))[_0x407d('0x4a')](handleError(_0xe1d18c,null));};exports['update']=function(_0x460cab,_0x132fc6){if(_0x460cab[_0x407d('0x4c')]['id']){delete _0x460cab['body']['id'];}return db[_0x407d('0x2c')][_0x407d('0x49')]({'where':{'id':_0x460cab[_0x407d('0x47')]['id']}})[_0x407d('0x25')](handleEntityNotFound(_0x132fc6,null))[_0x407d('0x25')](saveUpdates(_0x460cab[_0x407d('0x4c')],null))[_0x407d('0x25')](respondWithResult(_0x132fc6,null))[_0x407d('0x4a')](handleError(_0x132fc6,null));};exports[_0x407d('0x24')]=function(_0x386461,_0x5ca491){return db[_0x407d('0x2c')]['find']({'where':{'id':_0x386461[_0x407d('0x47')]['id']}})[_0x407d('0x25')](handleEntityNotFound(_0x5ca491,null))[_0x407d('0x25')](removeEntity(_0x5ca491,null))[_0x407d('0x4a')](handleError(_0x5ca491,null));};exports[_0x407d('0x4d')]=function(_0x32c3f2,_0x5275ee){return db['SmsTransferReport'][_0x407d('0x4d')]()[_0x407d('0x25')](respondWithResult(_0x5275ee,null))['catch'](handleError(_0x5275ee,null));};
\ No newline at end of file
+var _0x22c3=['create','body','params','destroy','find','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','map','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields','length','nolimit','limit','order','sort','where','filter','merge','VIRTUAL','options','SmsTransferReport','count','includeAll','findAll','catch'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x22c3,0x132));var _0x322c=function(_0x444c52,_0x1fa6ee){_0x444c52=_0x444c52-0x0;var _0x4de998=_0x22c3[_0x444c52];return _0x4de998;};'use strict';var pdf=require(_0x322c('0x0'));var emlformat=require(_0x322c('0x1'));var rimraf=require(_0x322c('0x2'));var zipdir=require(_0x322c('0x3'));var jsonpatch=require(_0x322c('0x4'));var rp=require(_0x322c('0x5'));var moment=require(_0x322c('0x6'));var BPromise=require(_0x322c('0x7'));var Mustache=require('mustache');var util=require(_0x322c('0x8'));var path=require('path');var sox=require(_0x322c('0x9'));var csv=require(_0x322c('0xa'));var ejs=require(_0x322c('0xb'));var fs=require('fs');var _=require(_0x322c('0xc'));var squel=require(_0x322c('0xd'));var crypto=require(_0x322c('0xe'));var jsforce=require(_0x322c('0xf'));var deskjs=require(_0x322c('0x10'));var toCsv=require(_0x322c('0xa'));var querystring=require(_0x322c('0x11'));var Papa=require(_0x322c('0x12'));var Redis=require(_0x322c('0x13'));var authService=require(_0x322c('0x14'));var qs=require(_0x322c('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x322c('0x16'));var logger=require(_0x322c('0x17'))(_0x322c('0x18'));var utils=require(_0x322c('0x19'));var config=require(_0x322c('0x1a'));var db=require(_0x322c('0x1b'))['db'];function respondWithStatusCode(_0x1912a1,_0x114318){_0x114318=_0x114318||0xcc;return function(_0x12206b){if(_0x12206b){return _0x1912a1[_0x322c('0x1c')](_0x114318);}return _0x1912a1[_0x322c('0x1d')](_0x114318)[_0x322c('0x1e')]();};}function respondWithResult(_0x3db564,_0x2bcaa1){_0x2bcaa1=_0x2bcaa1||0xc8;return function(_0x3d9209){if(_0x3d9209){return _0x3db564['status'](_0x2bcaa1)[_0x322c('0x1f')](_0x3d9209);}};}function respondWithFilteredResult(_0x518689,_0x2bee1f){return function(_0x5d21c6){if(_0x5d21c6){var _0x3311a8=_0x5d21c6['count'],_0x311499=_0x2bee1f[_0x322c('0x20')],_0x4c42be=_0x2bee1f[_0x322c('0x20')]+_0x2bee1f['limit'],_0x3a1ed1;if(_0x4c42be>=_0x3311a8){_0x4c42be=_0x3311a8;_0x3a1ed1=0xc8;}else{_0x3a1ed1=0xce;}_0x518689['status'](_0x3a1ed1);return _0x518689[_0x322c('0x21')](_0x322c('0x22'),_0x311499+'-'+_0x4c42be+'/'+_0x3311a8)['json'](_0x5d21c6);}return null;};}function patchUpdates(_0x51917d){return function(_0xc3e081){try{jsonpatch[_0x322c('0x23')](_0xc3e081,_0x51917d,!![]);}catch(_0x2fdc6c){return BPromise[_0x322c('0x24')](_0x2fdc6c);}return _0xc3e081[_0x322c('0x25')]();};}function saveUpdates(_0x50ec90,_0x4a7023){return function(_0x39a47e){if(_0x39a47e){return _0x39a47e[_0x322c('0x26')](_0x50ec90)['then'](function(_0x2605bc){return _0x2605bc;});}return null;};}function removeEntity(_0x29ce83,_0x23a9e3){return function(_0x55b1fa){if(_0x55b1fa){return _0x55b1fa['destroy']()[_0x322c('0x27')](function(){_0x29ce83[_0x322c('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2fae94,_0x46c51a){return function(_0xabe1d){if(!_0xabe1d){_0x2fae94[_0x322c('0x1c')](0x194);}return _0xabe1d;};}function handleError(_0x14f674,_0x159afa){_0x159afa=_0x159afa||0x1f4;return function(_0x1aa4c0){logger[_0x322c('0x28')](_0x1aa4c0[_0x322c('0x29')]);if(_0x1aa4c0[_0x322c('0x2a')]){delete _0x1aa4c0['name'];}_0x14f674['status'](_0x159afa)[_0x322c('0x2b')](_0x1aa4c0);};}exports['index']=function(_0x2eee24,_0x2e2f82){var _0x5b19a7={},_0x3300d4={},_0x3d3b03={'count':0x0,'rows':[]};var _0x20237a=_[_0x322c('0x2c')](db['SmsTransferReport'][_0x322c('0x2d')],function(_0x37f1c8){return{'name':_0x37f1c8['fieldName'],'type':_0x37f1c8[_0x322c('0x2e')]['key']};});_0x3300d4[_0x322c('0x2f')]=_[_0x322c('0x2c')](_0x20237a,_0x322c('0x2a'));_0x3300d4[_0x322c('0x30')]=_[_0x322c('0x31')](_0x2eee24[_0x322c('0x30')]);_0x3300d4[_0x322c('0x32')]=_[_0x322c('0x33')](_0x3300d4[_0x322c('0x2f')],_0x3300d4[_0x322c('0x30')]);_0x5b19a7[_0x322c('0x34')]=_['intersection'](_0x3300d4[_0x322c('0x2f')],qs[_0x322c('0x35')](_0x2eee24['query'][_0x322c('0x35')]));_0x5b19a7[_0x322c('0x34')]=_0x5b19a7['attributes'][_0x322c('0x36')]?_0x5b19a7['attributes']:_0x3300d4[_0x322c('0x2f')];if(!_0x2eee24[_0x322c('0x30')]['hasOwnProperty'](_0x322c('0x37'))){_0x5b19a7[_0x322c('0x38')]=qs[_0x322c('0x38')](_0x2eee24[_0x322c('0x30')][_0x322c('0x38')]);_0x5b19a7['offset']=qs[_0x322c('0x20')](_0x2eee24['query']['offset']);}_0x5b19a7[_0x322c('0x39')]=qs['sort'](_0x2eee24[_0x322c('0x30')][_0x322c('0x3a')]);_0x5b19a7[_0x322c('0x3b')]=qs['filters'](_['pick'](_0x2eee24[_0x322c('0x30')],_0x3300d4[_0x322c('0x32')]));if(_0x2eee24[_0x322c('0x30')][_0x322c('0x3c')]){_0x5b19a7[_0x322c('0x3b')]=_[_0x322c('0x3d')](_0x5b19a7[_0x322c('0x3b')],{'$or':_[_0x322c('0x2c')](_0x20237a,function(_0x46d1d3){if(_0x46d1d3['type']!==_0x322c('0x3e')){var _0x3a9cec={};_0x3a9cec[_0x46d1d3['name']]={'$like':'%'+_0x2eee24[_0x322c('0x30')][_0x322c('0x3c')]+'%'};return _0x3a9cec;}})});}_0x5b19a7=_[_0x322c('0x3d')]({},_0x5b19a7,_0x2eee24[_0x322c('0x3f')]);var _0x49cd02={'where':_0x5b19a7[_0x322c('0x3b')]};return db[_0x322c('0x40')][_0x322c('0x41')](_0x49cd02)['then'](function(_0x5c5169){_0x3d3b03[_0x322c('0x41')]=_0x5c5169;if(_0x2eee24[_0x322c('0x30')][_0x322c('0x42')]){_0x5b19a7['include']=[{'all':!![]}];}return db[_0x322c('0x40')][_0x322c('0x43')](_0x5b19a7);})[_0x322c('0x27')](function(_0x44e290){_0x3d3b03['rows']=_0x44e290;return _0x3d3b03;})['then'](respondWithFilteredResult(_0x2e2f82,_0x5b19a7))[_0x322c('0x44')](handleError(_0x2e2f82,null));};exports['show']=function(_0x4518aa,_0xe92162){var _0x315f80={'raw':!![],'where':{'id':_0x4518aa['params']['id']}},_0x515618={};_0x515618[_0x322c('0x2f')]=_['keys'](db[_0x322c('0x40')][_0x322c('0x2d')]);_0x515618[_0x322c('0x30')]=_[_0x322c('0x31')](_0x4518aa[_0x322c('0x30')]);_0x515618[_0x322c('0x32')]=_[_0x322c('0x33')](_0x515618[_0x322c('0x2f')],_0x515618[_0x322c('0x30')]);_0x315f80[_0x322c('0x34')]=_[_0x322c('0x33')](_0x515618['model'],qs[_0x322c('0x35')](_0x4518aa[_0x322c('0x30')][_0x322c('0x35')]));_0x315f80[_0x322c('0x34')]=_0x315f80[_0x322c('0x34')][_0x322c('0x36')]?_0x315f80['attributes']:_0x515618['model'];if(_0x4518aa[_0x322c('0x30')]['includeAll']){_0x315f80['include']=[{'all':!![]}];}_0x315f80=_[_0x322c('0x3d')]({},_0x315f80,_0x4518aa[_0x322c('0x3f')]);return db[_0x322c('0x40')]['find'](_0x315f80)[_0x322c('0x27')](handleEntityNotFound(_0xe92162,null))[_0x322c('0x27')](respondWithResult(_0xe92162,null))[_0x322c('0x44')](handleError(_0xe92162,null));};exports[_0x322c('0x45')]=function(_0x3d68ae,_0x10fe71){return db['SmsTransferReport'][_0x322c('0x45')](_0x3d68ae[_0x322c('0x46')],{})['then'](respondWithResult(_0x10fe71,0xc9))[_0x322c('0x44')](handleError(_0x10fe71,null));};exports[_0x322c('0x26')]=function(_0x4253e6,_0x36d797){if(_0x4253e6[_0x322c('0x46')]['id']){delete _0x4253e6['body']['id'];}return db[_0x322c('0x40')]['find']({'where':{'id':_0x4253e6[_0x322c('0x47')]['id']}})[_0x322c('0x27')](handleEntityNotFound(_0x36d797,null))[_0x322c('0x27')](saveUpdates(_0x4253e6[_0x322c('0x46')],null))[_0x322c('0x27')](respondWithResult(_0x36d797,null))[_0x322c('0x44')](handleError(_0x36d797,null));};exports[_0x322c('0x48')]=function(_0x53a0d7,_0x5e14eb){return db[_0x322c('0x40')][_0x322c('0x49')]({'where':{'id':_0x53a0d7[_0x322c('0x47')]['id']}})['then'](handleEntityNotFound(_0x5e14eb,null))[_0x322c('0x27')](removeEntity(_0x5e14eb,null))[_0x322c('0x44')](handleError(_0x5e14eb,null));};exports[_0x322c('0x4a')]=function(_0x487bfa,_0x2cef64){return db[_0x322c('0x40')][_0x322c('0x4a')]()[_0x322c('0x27')](respondWithResult(_0x2cef64,null))['catch'](handleError(_0x2cef64,null));};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.model.js b/server/api/smsTransferReport/smsTransferReport.model.js
index 7f78e3e..83bf7ff 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 _0x2542=['api','bluebird','path','rimraf','../../config/environment','./smsTransferReport.attributes','exports','define','SmsTransferReport','report_sms_transfer','uniqueid','lodash','util','../../config/logger'];(function(_0x139f28,_0x2ed8a0){var _0x48ca7b=function(_0x11d89b){while(--_0x11d89b){_0x139f28['push'](_0x139f28['shift']());}};_0x48ca7b(++_0x2ed8a0);}(_0x2542,0x169));var _0x2254=function(_0x319c86,_0xcb398){_0x319c86=_0x319c86-0x0;var _0x11bd0d=_0x2542[_0x319c86];return _0x11bd0d;};'use strict';var _=require(_0x2254('0x0'));var util=require(_0x2254('0x1'));var logger=require(_0x2254('0x2'))(_0x2254('0x3'));var moment=require('moment');var BPromise=require(_0x2254('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2254('0x5'));var rimraf=require(_0x2254('0x6'));var config=require(_0x2254('0x7'));var attributes=require(_0x2254('0x8'));module[_0x2254('0x9')]=function(_0x508183,_0x19ad3c){return _0x508183[_0x2254('0xa')](_0x2254('0xb'),attributes,{'tableName':_0x2254('0xc'),'paranoid':![],'indexes':[{'name':_0x2254('0xd'),'fields':[_0x2254('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x9fd4=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','report_sms_transfer','uniqueid'];(function(_0x3e0191,_0x1d4b20){var _0xf2ae83=function(_0x277210){while(--_0x277210){_0x3e0191['push'](_0x3e0191['shift']());}};_0xf2ae83(++_0x1d4b20);}(_0x9fd4,0x16c));var _0x49fd=function(_0x46306c,_0x1cb39c){_0x46306c=_0x46306c-0x0;var _0x423037=_0x9fd4[_0x46306c];return _0x423037;};'use strict';var _=require(_0x49fd('0x0'));var util=require(_0x49fd('0x1'));var logger=require(_0x49fd('0x2'))(_0x49fd('0x3'));var moment=require(_0x49fd('0x4'));var BPromise=require(_0x49fd('0x5'));var rp=require(_0x49fd('0x6'));var fs=require('fs');var path=require(_0x49fd('0x7'));var rimraf=require(_0x49fd('0x8'));var config=require('../../config/environment');var attributes=require('./smsTransferReport.attributes');module[_0x49fd('0x9')]=function(_0x42fdc7,_0x1bc16e){return _0x42fdc7[_0x49fd('0xa')]('SmsTransferReport',attributes,{'tableName':_0x49fd('0xb'),'paranoid':![],'indexes':[{'name':_0x49fd('0xc'),'fields':[_0x49fd('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/smsTransferReport/smsTransferReport.rpc.js b/server/api/smsTransferReport/smsTransferReport.rpc.js
index ff798c8..c43ccbf 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 _0x384c=['message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','error'];(function(_0x71395d,_0x12bfd9){var _0x346eeb=function(_0x1e35f7){while(--_0x1e35f7){_0x71395d['push'](_0x71395d['shift']());}};_0x346eeb(++_0x12bfd9);}(_0x384c,0x179));var _0xc384=function(_0x2eb5a8,_0x3e899b){_0x2eb5a8=_0x2eb5a8-0x0;var _0x39422d=_0x384c[_0x2eb5a8];return _0x39422d;};'use strict';var _=require(_0xc384('0x0'));var util=require(_0xc384('0x1'));var moment=require(_0xc384('0x2'));var BPromise=require(_0xc384('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc384('0x4'))['db'];var utils=require(_0xc384('0x5'));var logger=require(_0xc384('0x6'))(_0xc384('0x7'));var config=require(_0xc384('0x8'));var jayson=require(_0xc384('0x9'));var client=jayson['client'][_0xc384('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2c0ee5,_0x1c563f,_0x154e5e){return new BPromise(function(_0x3e0bbf,_0x232a81){return client[_0xc384('0xb')](_0x2c0ee5,_0x154e5e)[_0xc384('0xc')](function(_0x1050b8){logger[_0xc384('0xd')](_0xc384('0xe'),_0x1c563f,_0xc384('0xf'));logger[_0xc384('0x10')](_0xc384('0x11'),_0x1c563f,'request\x20sent',JSON['stringify'](_0x1050b8));if(_0x1050b8['error']){if(_0x1050b8[_0xc384('0x12')]['code']===0x1f4){logger['error'](_0xc384('0xe'),_0x1c563f,_0x1050b8['error'][_0xc384('0x13')]);return _0x232a81(_0x1050b8['error']['message']);}logger[_0xc384('0x12')](_0xc384('0xe'),_0x1c563f,_0x1050b8['error'][_0xc384('0x13')]);return _0x3e0bbf(_0x1050b8[_0xc384('0x12')][_0xc384('0x13')]);}else{logger[_0xc384('0xd')]('SmsTransferReport,\x20%s,\x20%s',_0x1c563f,'request\x20sent');_0x3e0bbf(_0x1050b8[_0xc384('0x14')][_0xc384('0x13')]);}})[_0xc384('0x15')](function(_0x532738){logger[_0xc384('0x12')](_0xc384('0xe'),_0x1c563f,_0x532738);_0x232a81(_0x532738);});});}
\ No newline at end of file
+var _0xa647=['code','SmsTransferReport,\x20%s,\x20%s','message','info','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','SmsTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x185d97,_0x27ae50){var _0x1b050a=function(_0x14c3a0){while(--_0x14c3a0){_0x185d97['push'](_0x185d97['shift']());}};_0x1b050a(++_0x27ae50);}(_0xa647,0x1e5));var _0x7a64=function(_0x47c347,_0xd36c85){_0x47c347=_0x47c347-0x0;var _0x4ac58f=_0xa647[_0x47c347];return _0x4ac58f;};'use strict';var _=require(_0x7a64('0x0'));var util=require(_0x7a64('0x1'));var moment=require(_0x7a64('0x2'));var BPromise=require('bluebird');var rs=require(_0x7a64('0x3'));var fs=require('fs');var Redis=require(_0x7a64('0x4'));var db=require(_0x7a64('0x5'))['db'];var utils=require(_0x7a64('0x6'));var logger=require(_0x7a64('0x7'))(_0x7a64('0x8'));var config=require(_0x7a64('0x9'));var jayson=require(_0x7a64('0xa'));var client=jayson[_0x7a64('0xb')][_0x7a64('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5f13aa,_0x16cf89,_0x397dea){return new BPromise(function(_0x410f48,_0x537769){return client[_0x7a64('0xd')](_0x5f13aa,_0x397dea)[_0x7a64('0xe')](function(_0x34fe43){logger['info']('SmsTransferReport,\x20%s,\x20%s',_0x16cf89,'request\x20sent');logger['debug'](_0x7a64('0xf'),_0x16cf89,_0x7a64('0x10'),JSON[_0x7a64('0x11')](_0x34fe43));if(_0x34fe43[_0x7a64('0x12')]){if(_0x34fe43[_0x7a64('0x12')][_0x7a64('0x13')]===0x1f4){logger[_0x7a64('0x12')](_0x7a64('0x14'),_0x16cf89,_0x34fe43[_0x7a64('0x12')][_0x7a64('0x15')]);return _0x537769(_0x34fe43[_0x7a64('0x12')][_0x7a64('0x15')]);}logger['error'](_0x7a64('0x14'),_0x16cf89,_0x34fe43[_0x7a64('0x12')][_0x7a64('0x15')]);return _0x410f48(_0x34fe43[_0x7a64('0x12')][_0x7a64('0x15')]);}else{logger[_0x7a64('0x16')](_0x7a64('0x14'),_0x16cf89,'request\x20sent');_0x410f48(_0x34fe43['result'][_0x7a64('0x15')]);}})[_0x7a64('0x17')](function(_0x3bb881){logger[_0x7a64('0x12')](_0x7a64('0x14'),_0x16cf89,_0x3bb881);_0x537769(_0x3bb881);});});}
\ No newline at end of file
diff --git a/server/api/sound/index.js b/server/api/sound/index.js
index 694f216..ac72a1d 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 _0x78f2=['/:id/download','download','diskStorage','join','originalname','replace','format','basename','now','post','single','file','create','put','update','delete','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','/:id','show'];(function(_0x2718ee,_0x408952){var _0x18bb3b=function(_0x1b0e66){while(--_0x1b0e66){_0x2718ee['push'](_0x2718ee['shift']());}};_0x18bb3b(++_0x408952);}(_0x78f2,0x6e));var _0x278f=function(_0x4ebe70,_0xd366aa){_0x4ebe70=_0x4ebe70-0x0;var _0x5c4b8c=_0x78f2[_0x4ebe70];return _0x5c4b8c;};'use strict';var multer=require(_0x278f('0x0'));var util=require(_0x278f('0x1'));var path=require(_0x278f('0x2'));var timeout=require(_0x278f('0x3'));var express=require(_0x278f('0x4'));var router=express['Router']();var auth=require(_0x278f('0x5'));var interaction=require(_0x278f('0x6'));var config=require(_0x278f('0x7'));var controller=require(_0x278f('0x8'));router[_0x278f('0x9')]('/',auth[_0x278f('0xa')](),controller[_0x278f('0xb')]);router[_0x278f('0x9')](_0x278f('0xc'),auth[_0x278f('0xa')](),controller[_0x278f('0xd')]);router['get'](_0x278f('0xe'),auth['isAuthenticated'](),controller[_0x278f('0xf')]);var upload=multer({'storage':multer[_0x278f('0x10')]({'destination':function(_0x2971ee,_0x26059f,_0x4da347){_0x4da347(null,path[_0x278f('0x11')](config['root'],'server/files/sounds/original/'));},'filename':function(_0x3f5199,_0x4e0365,_0x47b4bd){_0x4e0365[_0x278f('0x12')]=_0x4e0365[_0x278f('0x12')][_0x278f('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x47b4bd(null,util[_0x278f('0x14')]('%s-%s%s',path[_0x278f('0x15')](_0x4e0365[_0x278f('0x12')],path['extname'](_0x4e0365[_0x278f('0x12')])),Date[_0x278f('0x16')](),path['extname'](_0x4e0365[_0x278f('0x12')])));}})});router[_0x278f('0x17')]('/',upload[_0x278f('0x18')](_0x278f('0x19')),controller[_0x278f('0x1a')]);router[_0x278f('0x1b')](_0x278f('0xc'),auth['isAuthenticated'](),controller[_0x278f('0x1c')]);router[_0x278f('0x1d')](_0x278f('0xc'),auth['isAuthenticated'](),controller[_0x278f('0x1d')]);module[_0x278f('0x1e')]=router;
\ No newline at end of file
+var _0x8d9f=['post','file','/:id','update','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','index','get','isAuthenticated','show','diskStorage','join','root','server/files/sounds/original/','originalname','%s-%s%s','basename','extname'];(function(_0x782e99,_0x3fdc27){var _0x187176=function(_0x82ee8d){while(--_0x82ee8d){_0x782e99['push'](_0x782e99['shift']());}};_0x187176(++_0x3fdc27);}(_0x8d9f,0xa1));var _0xf8d9=function(_0x5a109a,_0x1e71aa){_0x5a109a=_0x5a109a-0x0;var _0x3a5cfc=_0x8d9f[_0x5a109a];return _0x3a5cfc;};'use strict';var multer=require(_0xf8d9('0x0'));var util=require(_0xf8d9('0x1'));var path=require('path');var timeout=require(_0xf8d9('0x2'));var express=require(_0xf8d9('0x3'));var router=express[_0xf8d9('0x4')]();var auth=require(_0xf8d9('0x5'));var interaction=require(_0xf8d9('0x6'));var config=require(_0xf8d9('0x7'));var controller=require(_0xf8d9('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0xf8d9('0x9')]);router[_0xf8d9('0xa')]('/:id',auth[_0xf8d9('0xb')](),controller[_0xf8d9('0xc')]);router['get']('/:id/download',auth['isAuthenticated'](),controller['download']);var upload=multer({'storage':multer[_0xf8d9('0xd')]({'destination':function(_0x48268a,_0x4169ed,_0x274d2c){_0x274d2c(null,path[_0xf8d9('0xe')](config[_0xf8d9('0xf')],_0xf8d9('0x10')));},'filename':function(_0x50850d,_0xef0df2,_0x10615f){_0xef0df2[_0xf8d9('0x11')]=_0xef0df2['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x10615f(null,util['format'](_0xf8d9('0x12'),path[_0xf8d9('0x13')](_0xef0df2['originalname'],path['extname'](_0xef0df2[_0xf8d9('0x11')])),Date['now'](),path[_0xf8d9('0x14')](_0xef0df2['originalname'])));}})});router[_0xf8d9('0x15')]('/',upload['single'](_0xf8d9('0x16')),controller['create']);router['put'](_0xf8d9('0x17'),auth[_0xf8d9('0xb')](),controller[_0xf8d9('0x18')]);router['delete'](_0xf8d9('0x17'),auth[_0xf8d9('0xb')](),controller['delete']);module[_0xf8d9('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/sound/sound.attributes.js b/server/api/sound/sound.attributes.js
index bfffae8..f79a5d7 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 _0xdab9=['FLOAT','BIGINT','INTEGER','sequelize','exports','STRING'];(function(_0x49ad79,_0x48ee93){var _0xa4e38a=function(_0x4925c7){while(--_0x4925c7){_0x49ad79['push'](_0x49ad79['shift']());}};_0xa4e38a(++_0x48ee93);}(_0xdab9,0x123));var _0x9dab=function(_0x5944f0,_0x399f99){_0x5944f0=_0x5944f0-0x0;var _0x4e4762=_0xdab9[_0x5944f0];return _0x4e4762;};'use strict';var Sequelize=require(_0x9dab('0x0'));module[_0x9dab('0x1')]={'name':{'type':Sequelize[_0x9dab('0x2')],'unique':'name','allowNull':![]},'save_name':{'type':Sequelize['STRING']},'display_name':{'type':Sequelize[_0x9dab('0x2')],'defaultValue':''},'description':{'type':Sequelize[_0x9dab('0x2')]},'original_format':{'type':Sequelize['STRING']},'original_duration':{'type':Sequelize[_0x9dab('0x3')]},'original_sampleCount':{'type':Sequelize['BIGINT']},'original_channelCount':{'type':Sequelize['INTEGER']},'original_bitRate':{'type':Sequelize[_0x9dab('0x4')]},'original_sampleRate':{'type':Sequelize[_0x9dab('0x5')]},'converted_format':{'type':Sequelize[_0x9dab('0x2')]},'converted_duration':{'type':Sequelize[_0x9dab('0x3')]},'converted_sampleCount':{'type':Sequelize['BIGINT']},'converted_channelCount':{'type':Sequelize[_0x9dab('0x5')]},'converted_bitRate':{'type':Sequelize[_0x9dab('0x4')]},'converted_sampleRate':{'type':Sequelize[_0x9dab('0x5')]}};
\ No newline at end of file
+var _0x2529=['BIGINT','INTEGER','sequelize','exports','STRING','name','FLOAT'];(function(_0x9cbfe0,_0x56aada){var _0x1f1534=function(_0x422947){while(--_0x422947){_0x9cbfe0['push'](_0x9cbfe0['shift']());}};_0x1f1534(++_0x56aada);}(_0x2529,0x1d7));var _0x9252=function(_0x212939,_0x153e98){_0x212939=_0x212939-0x0;var _0x47b69d=_0x2529[_0x212939];return _0x47b69d;};'use strict';var Sequelize=require(_0x9252('0x0'));module[_0x9252('0x1')]={'name':{'type':Sequelize[_0x9252('0x2')],'unique':_0x9252('0x3'),'allowNull':![]},'save_name':{'type':Sequelize[_0x9252('0x2')]},'display_name':{'type':Sequelize[_0x9252('0x2')],'defaultValue':''},'description':{'type':Sequelize[_0x9252('0x2')]},'original_format':{'type':Sequelize[_0x9252('0x2')]},'original_duration':{'type':Sequelize[_0x9252('0x4')]},'original_sampleCount':{'type':Sequelize[_0x9252('0x5')]},'original_channelCount':{'type':Sequelize[_0x9252('0x6')]},'original_bitRate':{'type':Sequelize[_0x9252('0x5')]},'original_sampleRate':{'type':Sequelize[_0x9252('0x6')]},'converted_format':{'type':Sequelize[_0x9252('0x2')]},'converted_duration':{'type':Sequelize[_0x9252('0x4')]},'converted_sampleCount':{'type':Sequelize[_0x9252('0x5')]},'converted_channelCount':{'type':Sequelize[_0x9252('0x6')]},'converted_bitRate':{'type':Sequelize['BIGINT']},'converted_sampleRate':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js
index dc1a87e..0d48a5a 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 _0x8d66=['../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','status','offset','limit','Content-Range','json','apply','reject','save','update','then','destroy','get','Sounds','UserProfileResource','end','sendStatus','error','name','send','index','map','Sound','fieldName','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','show','params','rawAttributes','download','save_name','converted_format','existsSync','join','root','server/files/sounds/converted','ValidationError','Sound\x20not\x20found','format','%s.%s','basename','file','extname','originalname','filename','wav','info','Sound\x20upload\x20filepath:\x20%s','Sound\x20upload\x20destination:\x20%s','0777','transcode','unlinkSync','src','original_duration','duration','sampleCount','original_channelCount','channelCount','original_bitRate','bitRate','original_sampleRate','sampleRate','dest','converted_duration','converted_channelCount','converted_bitRate','converted_sampleRate','chmodSync','create','body','userProfileId','role','user','UserProfileSection','find','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','description','delete','server/files/sounds/original','original_format','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','papaparse'];(function(_0x3fe6df,_0x5a04d4){var _0x372a0e=function(_0x144b98){while(--_0x144b98){_0x3fe6df['push'](_0x3fe6df['shift']());}};_0x372a0e(++_0x5a04d4);}(_0x8d66,0x16a));var _0x68d6=function(_0x20bbde,_0x217d80){_0x20bbde=_0x20bbde-0x0;var _0x363fef=_0x8d66[_0x20bbde];return _0x363fef;};'use strict';var pdf=require(_0x68d6('0x0'));var emlformat=require(_0x68d6('0x1'));var rimraf=require(_0x68d6('0x2'));var zipdir=require(_0x68d6('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x68d6('0x4'));var moment=require(_0x68d6('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x68d6('0x6'));var util=require('util');var path=require(_0x68d6('0x7'));var sox=require(_0x68d6('0x8'));var csv=require(_0x68d6('0x9'));var ejs=require(_0x68d6('0xa'));var fs=require('fs');var _=require(_0x68d6('0xb'));var squel=require(_0x68d6('0xc'));var crypto=require('crypto');var jsforce=require(_0x68d6('0xd'));var deskjs=require(_0x68d6('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x68d6('0xf'));var Redis=require('ioredis');var authService=require(_0x68d6('0x10'));var qs=require(_0x68d6('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x68d6('0x12'));var logger=require(_0x68d6('0x13'))(_0x68d6('0x14'));var utils=require('../../config/utils');var config=require(_0x68d6('0x15'));var db=require(_0x68d6('0x16'))['db'];function respondWithStatusCode(_0x47df43,_0x184f4f){_0x184f4f=_0x184f4f||0xcc;return function(_0x1ea7b8){if(_0x1ea7b8){return _0x47df43['sendStatus'](_0x184f4f);}return _0x47df43[_0x68d6('0x17')](_0x184f4f)['end']();};}function respondWithResult(_0x51c754,_0x460b6e){_0x460b6e=_0x460b6e||0xc8;return function(_0x4bf5db){if(_0x4bf5db){return _0x51c754[_0x68d6('0x17')](_0x460b6e)['json'](_0x4bf5db);}};}function respondWithFilteredResult(_0x491177,_0x2c6e4d){return function(_0x330fc4){if(_0x330fc4){var _0x22a4e1=_0x330fc4['count'],_0x36a1fe=_0x2c6e4d[_0x68d6('0x18')],_0x1f3701=_0x2c6e4d[_0x68d6('0x18')]+_0x2c6e4d[_0x68d6('0x19')],_0x87a578;if(_0x1f3701>=_0x22a4e1){_0x1f3701=_0x22a4e1;_0x87a578=0xc8;}else{_0x87a578=0xce;}_0x491177[_0x68d6('0x17')](_0x87a578);return _0x491177['set'](_0x68d6('0x1a'),_0x36a1fe+'-'+_0x1f3701+'/'+_0x22a4e1)[_0x68d6('0x1b')](_0x330fc4);}return null;};}function patchUpdates(_0x13b029){return function(_0x35a1b7){try{jsonpatch[_0x68d6('0x1c')](_0x35a1b7,_0x13b029,!![]);}catch(_0x18dbfc){return BPromise[_0x68d6('0x1d')](_0x18dbfc);}return _0x35a1b7[_0x68d6('0x1e')]();};}function saveUpdates(_0x494822,_0x594f10){return function(_0xaab6ee){if(_0xaab6ee){return _0xaab6ee[_0x68d6('0x1f')](_0x494822)[_0x68d6('0x20')](function(_0x2c550b){return _0x2c550b;});}return null;};}function removeEntity(_0x23293d,_0x361a7c){return function(_0x2d1b21){if(_0x2d1b21){return _0x2d1b21[_0x68d6('0x21')]()[_0x68d6('0x20')](function(){var _0x36e6e5=_0x2d1b21[_0x68d6('0x22')]({'plain':!![]});var _0x291604=_0x68d6('0x23');return db[_0x68d6('0x24')][_0x68d6('0x21')]({'where':{'type':_0x291604,'resourceId':_0x36e6e5['id']}})[_0x68d6('0x20')](function(){return _0x2d1b21;});})[_0x68d6('0x20')](function(){_0x23293d[_0x68d6('0x17')](0xcc)[_0x68d6('0x25')]();});}};}function handleEntityNotFound(_0x20c766,_0x3eed67){return function(_0x513b85){if(!_0x513b85){_0x20c766[_0x68d6('0x26')](0x194);}return _0x513b85;};}function handleError(_0x1bde58,_0x12fc3c){_0x12fc3c=_0x12fc3c||0x1f4;return function(_0x402a3f){logger[_0x68d6('0x27')](_0x402a3f['stack']);if(_0x402a3f[_0x68d6('0x28')]){delete _0x402a3f[_0x68d6('0x28')];}_0x1bde58[_0x68d6('0x17')](_0x12fc3c)[_0x68d6('0x29')](_0x402a3f);};}exports[_0x68d6('0x2a')]=function(_0xb73959,_0x4c9081){var _0x39a860={},_0x161468={},_0x336a92={'count':0x0,'rows':[]};var _0x22557d=_[_0x68d6('0x2b')](db[_0x68d6('0x2c')]['rawAttributes'],function(_0x44395e){return{'name':_0x44395e[_0x68d6('0x2d')],'type':_0x44395e['type'][_0x68d6('0x2e')]};});_0x161468[_0x68d6('0x2f')]=_[_0x68d6('0x2b')](_0x22557d,_0x68d6('0x28'));_0x161468[_0x68d6('0x30')]=_[_0x68d6('0x31')](_0xb73959[_0x68d6('0x30')]);_0x161468['filters']=_[_0x68d6('0x32')](_0x161468[_0x68d6('0x2f')],_0x161468[_0x68d6('0x30')]);_0x39a860['attributes']=_[_0x68d6('0x32')](_0x161468[_0x68d6('0x2f')],qs['fields'](_0xb73959[_0x68d6('0x30')][_0x68d6('0x33')]));_0x39a860['attributes']=_0x39a860[_0x68d6('0x34')][_0x68d6('0x35')]?_0x39a860[_0x68d6('0x34')]:_0x161468[_0x68d6('0x2f')];if(!_0xb73959['query'][_0x68d6('0x36')](_0x68d6('0x37'))){_0x39a860[_0x68d6('0x19')]=qs[_0x68d6('0x19')](_0xb73959[_0x68d6('0x30')][_0x68d6('0x19')]);_0x39a860[_0x68d6('0x18')]=qs[_0x68d6('0x18')](_0xb73959['query'][_0x68d6('0x18')]);}_0x39a860[_0x68d6('0x38')]=qs[_0x68d6('0x39')](_0xb73959[_0x68d6('0x30')][_0x68d6('0x39')]);_0x39a860[_0x68d6('0x3a')]=qs[_0x68d6('0x3b')](_[_0x68d6('0x3c')](_0xb73959[_0x68d6('0x30')],_0x161468[_0x68d6('0x3b')]));if(_0xb73959[_0x68d6('0x30')][_0x68d6('0x3d')]){_0x39a860['where']=_[_0x68d6('0x3e')](_0x39a860[_0x68d6('0x3a')],{'$or':_[_0x68d6('0x2b')](_0x22557d,function(_0x335d2e){if(_0x335d2e['type']!==_0x68d6('0x3f')){var _0x31e617={};_0x31e617[_0x335d2e[_0x68d6('0x28')]]={'$like':'%'+_0xb73959['query'][_0x68d6('0x3d')]+'%'};return _0x31e617;}})});}_0x39a860=_['merge']({},_0x39a860,_0xb73959[_0x68d6('0x40')]);var _0x1db63b={'where':_0x39a860[_0x68d6('0x3a')]};return db[_0x68d6('0x2c')][_0x68d6('0x41')](_0x1db63b)[_0x68d6('0x20')](function(_0x177ac1){_0x336a92['count']=_0x177ac1;if(_0xb73959[_0x68d6('0x30')][_0x68d6('0x42')]){_0x39a860[_0x68d6('0x43')]=[{'all':!![]}];}return db[_0x68d6('0x2c')][_0x68d6('0x44')](_0x39a860);})[_0x68d6('0x20')](function(_0x3d4a31){_0x336a92[_0x68d6('0x45')]=_0x3d4a31;return _0x336a92;})[_0x68d6('0x20')](respondWithFilteredResult(_0x4c9081,_0x39a860))[_0x68d6('0x46')](handleError(_0x4c9081,null));};exports[_0x68d6('0x47')]=function(_0x47afb5,_0xfd19de){var _0x28c5e4={'raw':!![],'where':{'id':_0x47afb5[_0x68d6('0x48')]['id']}},_0x4ae513={};_0x4ae513['model']=_[_0x68d6('0x31')](db[_0x68d6('0x2c')][_0x68d6('0x49')]);_0x4ae513[_0x68d6('0x30')]=_[_0x68d6('0x31')](_0x47afb5[_0x68d6('0x30')]);_0x4ae513['filters']=_['intersection'](_0x4ae513['model'],_0x4ae513['query']);_0x28c5e4[_0x68d6('0x34')]=_[_0x68d6('0x32')](_0x4ae513[_0x68d6('0x2f')],qs[_0x68d6('0x33')](_0x47afb5['query'][_0x68d6('0x33')]));_0x28c5e4[_0x68d6('0x34')]=_0x28c5e4[_0x68d6('0x34')][_0x68d6('0x35')]?_0x28c5e4['attributes']:_0x4ae513[_0x68d6('0x2f')];if(_0x47afb5['query'][_0x68d6('0x42')]){_0x28c5e4['include']=[{'all':!![]}];}_0x28c5e4=_[_0x68d6('0x3e')]({},_0x28c5e4,_0x47afb5['options']);return db[_0x68d6('0x2c')]['find'](_0x28c5e4)[_0x68d6('0x20')](handleEntityNotFound(_0xfd19de,null))[_0x68d6('0x20')](respondWithResult(_0xfd19de,null))[_0x68d6('0x46')](handleError(_0xfd19de,null));};exports[_0x68d6('0x4a')]=function(_0x505da4,_0x1a7e09,_0x5a4440){return db[_0x68d6('0x2c')]['find']({'where':{'id':_0x505da4[_0x68d6('0x48')]['id']},'attributes':[_0x68d6('0x28'),_0x68d6('0x4b'),_0x68d6('0x4c')],'raw':!![]})[_0x68d6('0x20')](handleEntityNotFound(_0x1a7e09,null))['then'](function(_0x1b6f6e){if(_0x1b6f6e){if(!fs[_0x68d6('0x4d')](path[_0x68d6('0x4e')](config[_0x68d6('0x4f')],_0x68d6('0x50'),_0x1b6f6e[_0x68d6('0x4b')]+'.'+_0x1b6f6e[_0x68d6('0x4c')]))){throw new db['Sequelize'][(_0x68d6('0x51'))](_0x68d6('0x52'));}return _0x1a7e09[_0x68d6('0x4a')](path['join'](config['root'],_0x68d6('0x50'),util[_0x68d6('0x53')](_0x68d6('0x54'),_0x1b6f6e['save_name'],_0x1b6f6e[_0x68d6('0x4c')])),util[_0x68d6('0x53')](_0x68d6('0x54'),_0x1b6f6e['name'],_0x1b6f6e[_0x68d6('0x4c')]));}return null;})['catch'](handleError(_0x1a7e09,null));};exports['create']=function(_0x32b602,_0x2a6fbc,_0x511b14){var _0x17ee70={'name':path[_0x68d6('0x55')](_0x32b602[_0x68d6('0x56')]['originalname'],path[_0x68d6('0x57')](_0x32b602['file'][_0x68d6('0x58')])),'save_name':path[_0x68d6('0x55')](_0x32b602[_0x68d6('0x56')][_0x68d6('0x59')],path[_0x68d6('0x57')](_0x32b602['file']['filename'])),'original_format':path[_0x68d6('0x57')](_0x32b602[_0x68d6('0x56')]['originalname'])['substring'](0x1),'converted_format':_0x68d6('0x5a')};var _0x3ba06a=path['join'](config[_0x68d6('0x4f')],'server/files/sounds/original',_0x32b602['file'][_0x68d6('0x59')]);var _0x389bb8=path[_0x68d6('0x4e')](config[_0x68d6('0x4f')],'server/files/sounds/converted',util['format'](_0x68d6('0x54'),path[_0x68d6('0x55')](_0x32b602[_0x68d6('0x56')][_0x68d6('0x59')],path[_0x68d6('0x57')](_0x32b602['file'][_0x68d6('0x59')])),_0x17ee70[_0x68d6('0x4c')]));logger[_0x68d6('0x5b')](_0x68d6('0x5c'),_0x3ba06a);logger[_0x68d6('0x5b')](_0x68d6('0x5d'),_0x389bb8);try{fs['chmodSync'](_0x3ba06a,parseInt(_0x68d6('0x5e'),0x8));var _0x59131e=sox[_0x68d6('0x5f')](_0x3ba06a,_0x389bb8,{'sampleRate':0x1f40,'format':_0x68d6('0x5a'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x59131e['on'](_0x68d6('0x27'),function(_0x1bc4c2){fs[_0x68d6('0x60')](_0x3ba06a);_0x2a6fbc[_0x68d6('0x17')](0x1f4)[_0x68d6('0x29')](_0x1bc4c2);});_0x59131e['on'](_0x68d6('0x61'),function(_0x39ffb5){_0x17ee70[_0x68d6('0x62')]=isNaN(_0x39ffb5[_0x68d6('0x63')])?null:_0x39ffb5[_0x68d6('0x63')]*0x3e8;_0x17ee70['original_sampleCount']=isNaN(_0x39ffb5[_0x68d6('0x64')])?null:_0x39ffb5['sampleCount'];_0x17ee70[_0x68d6('0x65')]=isNaN(_0x39ffb5[_0x68d6('0x66')])?null:_0x39ffb5[_0x68d6('0x66')];_0x17ee70[_0x68d6('0x67')]=isNaN(_0x39ffb5[_0x68d6('0x68')])?null:_0x39ffb5['bitRate'];_0x17ee70[_0x68d6('0x69')]=isNaN(_0x39ffb5[_0x68d6('0x6a')])?null:_0x39ffb5[_0x68d6('0x6a')];});_0x59131e['on'](_0x68d6('0x6b'),function(_0x42759b){_0x17ee70[_0x68d6('0x6c')]=isNaN(_0x42759b[_0x68d6('0x63')])?null:_0x42759b[_0x68d6('0x63')]*0x3e8;_0x17ee70['converted_sampleCount']=isNaN(_0x42759b['sampleCount'])?null:_0x42759b[_0x68d6('0x64')];_0x17ee70[_0x68d6('0x6d')]=isNaN(_0x42759b['channelCount'])?null:_0x42759b[_0x68d6('0x66')];_0x17ee70[_0x68d6('0x6e')]=isNaN(_0x42759b[_0x68d6('0x68')])?null:_0x42759b[_0x68d6('0x68')];_0x17ee70[_0x68d6('0x6f')]=isNaN(_0x42759b[_0x68d6('0x6a')])?null:_0x42759b[_0x68d6('0x6a')];});_0x59131e['on'](_0x68d6('0x25'),function(){fs[_0x68d6('0x70')](_0x389bb8,parseInt(_0x68d6('0x5e'),0x8));return db[_0x68d6('0x2c')][_0x68d6('0x71')](_0x17ee70)[_0x68d6('0x20')](function(_0x4be3ba){var _0x3e901c={'role':_0x32b602[_0x68d6('0x72')]['role'],'userProfileId':_0x32b602[_0x68d6('0x72')][_0x68d6('0x73')]};if(!_0x3e901c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3e901c[_0x68d6('0x74')]===_0x68d6('0x75')){var _0x457071=_0x4be3ba[_0x68d6('0x22')]({'plain':!![]});return db[_0x68d6('0x76')][_0x68d6('0x77')]({'where':{'name':_0x68d6('0x23'),'userProfileId':_0x3e901c['userProfileId']},'raw':!![]})[_0x68d6('0x20')](function(_0x5655d1){if(_0x5655d1&&_0x5655d1['autoAssociation']===0x0){return db['UserProfileResource'][_0x68d6('0x71')]({'name':_0x457071['name'],'resourceId':_0x457071['id'],'type':_0x5655d1[_0x68d6('0x28')],'sectionId':_0x5655d1['id']},{})[_0x68d6('0x20')](function(){return _0x4be3ba;});}else{return _0x4be3ba;}})[_0x68d6('0x46')](function(_0x23bab7){logger[_0x68d6('0x27')](_0x68d6('0x78'),_0x23bab7);throw _0x23bab7;});}return _0x4be3ba;})[_0x68d6('0x20')](respondWithResult(_0x2a6fbc,null))['catch'](handleError(_0x2a6fbc,null));});_0x59131e[_0x68d6('0x79')]();}catch(_0x504748){_0x2a6fbc[_0x68d6('0x17')](0x1f4)[_0x68d6('0x29')](_0x504748);}};exports[_0x68d6('0x1f')]=function(_0x198ae4,_0x254565,_0x58b7fc){return db[_0x68d6('0x2c')][_0x68d6('0x77')]({'where':{'id':_0x198ae4[_0x68d6('0x48')]['id']}})['then'](handleEntityNotFound(_0x254565,null))[_0x68d6('0x20')](saveUpdates(_[_0x68d6('0x3c')](_0x198ae4[_0x68d6('0x72')],[_0x68d6('0x28'),_0x68d6('0x7a')]),null))[_0x68d6('0x20')](respondWithResult(_0x254565,null))[_0x68d6('0x46')](handleError(_0x254565,null));};exports[_0x68d6('0x7b')]=function(_0x2af9f2,_0x13ce13,_0x46f156){return db['Sound'][_0x68d6('0x77')]({'where':{'id':_0x2af9f2[_0x68d6('0x48')]['id']}})[_0x68d6('0x20')](function(_0x2e9c6f){if(_0x2e9c6f){return _0x2e9c6f['destroy']();}})[_0x68d6('0x20')](function(_0x44875f){var _0x18eb5b=path['join'](config[_0x68d6('0x4f')],_0x68d6('0x7c'),util[_0x68d6('0x53')](_0x68d6('0x54'),_0x44875f[_0x68d6('0x4b')],_0x44875f[_0x68d6('0x7d')]));var _0x4b20ff=path[_0x68d6('0x4e')](config[_0x68d6('0x4f')],_0x68d6('0x50'),util[_0x68d6('0x53')]('%s.%s',_0x44875f[_0x68d6('0x4b')],_0x44875f[_0x68d6('0x4c')]));fs[_0x68d6('0x60')](_0x18eb5b);fs[_0x68d6('0x60')](_0x4b20ff);return _0x44875f;})['then'](function(_0x14d951){if(_0x14d951){return _0x13ce13[_0x68d6('0x17')](0xcc)[_0x68d6('0x25')]();}})[_0x68d6('0x20')](handleEntityNotFound(_0x13ce13,null))[_0x68d6('0x46')](handleError(_0x13ce13,null));};
\ No newline at end of file
+var _0x4cc4=['end','status','json','offset','limit','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','error','stack','name','send','index','Sound','fieldName','type','key','model','map','keys','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','count','includeAll','findAll','rows','catch','include','find','params','save_name','converted_format','existsSync','join','root','Sequelize','ValidationError','download','server/files/sounds/converted','format','%s.%s','basename','file','originalname','extname','filename','substring','wav','server/files/sounds/original','Sound\x20upload\x20filepath:\x20%s','info','Sound\x20upload\x20destination:\x20%s','0777','transcode','unlinkSync','duration','original_sampleCount','sampleCount','original_bitRate','bitRate','original_sampleRate','sampleRate','dest','converted_sampleCount','converted_channelCount','channelCount','converted_bitRate','role','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','Sounds','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','description','original_format','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','lodash','squel','crypto','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus'];(function(_0x36740d,_0x35873b){var _0x3aaa43=function(_0x5703b2){while(--_0x5703b2){_0x36740d['push'](_0x36740d['shift']());}};_0x3aaa43(++_0x35873b);}(_0x4cc4,0x15c));var _0x44cc=function(_0x57cb56,_0x507a17){_0x57cb56=_0x57cb56-0x0;var _0x58764e=_0x4cc4[_0x57cb56];return _0x58764e;};'use strict';var pdf=require(_0x44cc('0x0'));var emlformat=require(_0x44cc('0x1'));var rimraf=require(_0x44cc('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x44cc('0x3'));var rp=require(_0x44cc('0x4'));var moment=require(_0x44cc('0x5'));var BPromise=require(_0x44cc('0x6'));var Mustache=require('mustache');var util=require(_0x44cc('0x7'));var path=require(_0x44cc('0x8'));var sox=require(_0x44cc('0x9'));var csv=require('to-csv');var ejs=require(_0x44cc('0xa'));var fs=require('fs');var _=require(_0x44cc('0xb'));var squel=require(_0x44cc('0xc'));var crypto=require(_0x44cc('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x44cc('0xe'));var querystring=require(_0x44cc('0xf'));var Papa=require(_0x44cc('0x10'));var Redis=require(_0x44cc('0x11'));var authService=require(_0x44cc('0x12'));var qs=require(_0x44cc('0x13'));var as=require(_0x44cc('0x14'));var hardwareService=require(_0x44cc('0x15'));var logger=require(_0x44cc('0x16'))('api');var utils=require(_0x44cc('0x17'));var config=require(_0x44cc('0x18'));var db=require(_0x44cc('0x19'))['db'];function respondWithStatusCode(_0x34b66b,_0x4f1fb9){_0x4f1fb9=_0x4f1fb9||0xcc;return function(_0x2862c1){if(_0x2862c1){return _0x34b66b[_0x44cc('0x1a')](_0x4f1fb9);}return _0x34b66b['status'](_0x4f1fb9)[_0x44cc('0x1b')]();};}function respondWithResult(_0x1e4837,_0x4b5ba1){_0x4b5ba1=_0x4b5ba1||0xc8;return function(_0x1afaca){if(_0x1afaca){return _0x1e4837[_0x44cc('0x1c')](_0x4b5ba1)[_0x44cc('0x1d')](_0x1afaca);}};}function respondWithFilteredResult(_0x3b974e,_0x40fd5b){return function(_0x412d01){if(_0x412d01){var _0x187527=_0x412d01['count'],_0xd5ccc8=_0x40fd5b['offset'],_0x4b4e8e=_0x40fd5b[_0x44cc('0x1e')]+_0x40fd5b[_0x44cc('0x1f')],_0x2df4ce;if(_0x4b4e8e>=_0x187527){_0x4b4e8e=_0x187527;_0x2df4ce=0xc8;}else{_0x2df4ce=0xce;}_0x3b974e[_0x44cc('0x1c')](_0x2df4ce);return _0x3b974e['set'](_0x44cc('0x20'),_0xd5ccc8+'-'+_0x4b4e8e+'/'+_0x187527)['json'](_0x412d01);}return null;};}function patchUpdates(_0x4f88b5){return function(_0x39c65d){try{jsonpatch[_0x44cc('0x21')](_0x39c65d,_0x4f88b5,!![]);}catch(_0x352dec){return BPromise[_0x44cc('0x22')](_0x352dec);}return _0x39c65d[_0x44cc('0x23')]();};}function saveUpdates(_0x2da828,_0x5063d5){return function(_0x26e3f8){if(_0x26e3f8){return _0x26e3f8[_0x44cc('0x24')](_0x2da828)[_0x44cc('0x25')](function(_0x17203c){return _0x17203c;});}return null;};}function removeEntity(_0x236e98,_0x4fa255){return function(_0x27947f){if(_0x27947f){return _0x27947f[_0x44cc('0x26')]()[_0x44cc('0x25')](function(){var _0x3c3186=_0x27947f[_0x44cc('0x27')]({'plain':!![]});var _0x1b3c54='Sounds';return db[_0x44cc('0x28')][_0x44cc('0x26')]({'where':{'type':_0x1b3c54,'resourceId':_0x3c3186['id']}})[_0x44cc('0x25')](function(){return _0x27947f;});})[_0x44cc('0x25')](function(){_0x236e98['status'](0xcc)[_0x44cc('0x1b')]();});}};}function handleEntityNotFound(_0x5bd140,_0x1ccb9f){return function(_0x2d5467){if(!_0x2d5467){_0x5bd140[_0x44cc('0x1a')](0x194);}return _0x2d5467;};}function handleError(_0x103e1f,_0x540d84){_0x540d84=_0x540d84||0x1f4;return function(_0x4ab135){logger[_0x44cc('0x29')](_0x4ab135[_0x44cc('0x2a')]);if(_0x4ab135[_0x44cc('0x2b')]){delete _0x4ab135['name'];}_0x103e1f[_0x44cc('0x1c')](_0x540d84)[_0x44cc('0x2c')](_0x4ab135);};}exports[_0x44cc('0x2d')]=function(_0xa2841e,_0x4ccb3e){var _0x2d2466={},_0x4c5a78={},_0xe94e84={'count':0x0,'rows':[]};var _0x5e6945=_['map'](db[_0x44cc('0x2e')]['rawAttributes'],function(_0x2986cc){return{'name':_0x2986cc[_0x44cc('0x2f')],'type':_0x2986cc[_0x44cc('0x30')][_0x44cc('0x31')]};});_0x4c5a78[_0x44cc('0x32')]=_[_0x44cc('0x33')](_0x5e6945,'name');_0x4c5a78['query']=_[_0x44cc('0x34')](_0xa2841e[_0x44cc('0x35')]);_0x4c5a78['filters']=_['intersection'](_0x4c5a78[_0x44cc('0x32')],_0x4c5a78[_0x44cc('0x35')]);_0x2d2466[_0x44cc('0x36')]=_[_0x44cc('0x37')](_0x4c5a78[_0x44cc('0x32')],qs[_0x44cc('0x38')](_0xa2841e['query'][_0x44cc('0x38')]));_0x2d2466[_0x44cc('0x36')]=_0x2d2466['attributes'][_0x44cc('0x39')]?_0x2d2466[_0x44cc('0x36')]:_0x4c5a78[_0x44cc('0x32')];if(!_0xa2841e['query'][_0x44cc('0x3a')](_0x44cc('0x3b'))){_0x2d2466[_0x44cc('0x1f')]=qs[_0x44cc('0x1f')](_0xa2841e[_0x44cc('0x35')]['limit']);_0x2d2466[_0x44cc('0x1e')]=qs['offset'](_0xa2841e[_0x44cc('0x35')][_0x44cc('0x1e')]);}_0x2d2466[_0x44cc('0x3c')]=qs['sort'](_0xa2841e[_0x44cc('0x35')][_0x44cc('0x3d')]);_0x2d2466[_0x44cc('0x3e')]=qs[_0x44cc('0x3f')](_[_0x44cc('0x40')](_0xa2841e[_0x44cc('0x35')],_0x4c5a78['filters']));if(_0xa2841e[_0x44cc('0x35')][_0x44cc('0x41')]){_0x2d2466[_0x44cc('0x3e')]=_[_0x44cc('0x42')](_0x2d2466['where'],{'$or':_[_0x44cc('0x33')](_0x5e6945,function(_0x12c284){if(_0x12c284[_0x44cc('0x30')]!==_0x44cc('0x43')){var _0x24b398={};_0x24b398[_0x12c284[_0x44cc('0x2b')]]={'$like':'%'+_0xa2841e[_0x44cc('0x35')][_0x44cc('0x41')]+'%'};return _0x24b398;}})});}_0x2d2466=_['merge']({},_0x2d2466,_0xa2841e[_0x44cc('0x44')]);var _0x48c467={'where':_0x2d2466['where']};return db[_0x44cc('0x2e')][_0x44cc('0x45')](_0x48c467)[_0x44cc('0x25')](function(_0x110232){_0xe94e84[_0x44cc('0x45')]=_0x110232;if(_0xa2841e[_0x44cc('0x35')][_0x44cc('0x46')]){_0x2d2466['include']=[{'all':!![]}];}return db['Sound'][_0x44cc('0x47')](_0x2d2466);})[_0x44cc('0x25')](function(_0x48469e){_0xe94e84[_0x44cc('0x48')]=_0x48469e;return _0xe94e84;})[_0x44cc('0x25')](respondWithFilteredResult(_0x4ccb3e,_0x2d2466))[_0x44cc('0x49')](handleError(_0x4ccb3e,null));};exports['show']=function(_0x41bc90,_0x2cd79b){var _0x3fac4a={'raw':!![],'where':{'id':_0x41bc90['params']['id']}},_0xb652ce={};_0xb652ce['model']=_[_0x44cc('0x34')](db['Sound']['rawAttributes']);_0xb652ce[_0x44cc('0x35')]=_[_0x44cc('0x34')](_0x41bc90['query']);_0xb652ce['filters']=_[_0x44cc('0x37')](_0xb652ce['model'],_0xb652ce['query']);_0x3fac4a['attributes']=_['intersection'](_0xb652ce[_0x44cc('0x32')],qs['fields'](_0x41bc90[_0x44cc('0x35')][_0x44cc('0x38')]));_0x3fac4a[_0x44cc('0x36')]=_0x3fac4a[_0x44cc('0x36')][_0x44cc('0x39')]?_0x3fac4a[_0x44cc('0x36')]:_0xb652ce[_0x44cc('0x32')];if(_0x41bc90['query'][_0x44cc('0x46')]){_0x3fac4a[_0x44cc('0x4a')]=[{'all':!![]}];}_0x3fac4a=_[_0x44cc('0x42')]({},_0x3fac4a,_0x41bc90[_0x44cc('0x44')]);return db[_0x44cc('0x2e')]['find'](_0x3fac4a)['then'](handleEntityNotFound(_0x2cd79b,null))[_0x44cc('0x25')](respondWithResult(_0x2cd79b,null))['catch'](handleError(_0x2cd79b,null));};exports['download']=function(_0x51ee14,_0x35d207,_0x5cc1d0){return db[_0x44cc('0x2e')][_0x44cc('0x4b')]({'where':{'id':_0x51ee14[_0x44cc('0x4c')]['id']},'attributes':[_0x44cc('0x2b'),_0x44cc('0x4d'),_0x44cc('0x4e')],'raw':!![]})['then'](handleEntityNotFound(_0x35d207,null))['then'](function(_0x4bec6d){if(_0x4bec6d){if(!fs[_0x44cc('0x4f')](path[_0x44cc('0x50')](config[_0x44cc('0x51')],'server/files/sounds/converted',_0x4bec6d[_0x44cc('0x4d')]+'.'+_0x4bec6d['converted_format']))){throw new db[(_0x44cc('0x52'))][(_0x44cc('0x53'))]('Sound\x20not\x20found');}return _0x35d207[_0x44cc('0x54')](path[_0x44cc('0x50')](config['root'],_0x44cc('0x55'),util[_0x44cc('0x56')](_0x44cc('0x57'),_0x4bec6d[_0x44cc('0x4d')],_0x4bec6d[_0x44cc('0x4e')])),util[_0x44cc('0x56')](_0x44cc('0x57'),_0x4bec6d['name'],_0x4bec6d['converted_format']));}return null;})[_0x44cc('0x49')](handleError(_0x35d207,null));};exports['create']=function(_0x2465f7,_0x18749b,_0x4f218e){var _0x2a89b7={'name':path[_0x44cc('0x58')](_0x2465f7[_0x44cc('0x59')][_0x44cc('0x5a')],path[_0x44cc('0x5b')](_0x2465f7[_0x44cc('0x59')][_0x44cc('0x5a')])),'save_name':path[_0x44cc('0x58')](_0x2465f7['file'][_0x44cc('0x5c')],path[_0x44cc('0x5b')](_0x2465f7['file']['filename'])),'original_format':path[_0x44cc('0x5b')](_0x2465f7[_0x44cc('0x59')]['originalname'])[_0x44cc('0x5d')](0x1),'converted_format':_0x44cc('0x5e')};var _0x39a6ab=path[_0x44cc('0x50')](config['root'],_0x44cc('0x5f'),_0x2465f7[_0x44cc('0x59')][_0x44cc('0x5c')]);var _0x5d8605=path[_0x44cc('0x50')](config[_0x44cc('0x51')],'server/files/sounds/converted',util['format'](_0x44cc('0x57'),path['basename'](_0x2465f7[_0x44cc('0x59')]['filename'],path[_0x44cc('0x5b')](_0x2465f7['file'][_0x44cc('0x5c')])),_0x2a89b7[_0x44cc('0x4e')]));logger['info'](_0x44cc('0x60'),_0x39a6ab);logger[_0x44cc('0x61')](_0x44cc('0x62'),_0x5d8605);try{fs['chmodSync'](_0x39a6ab,parseInt(_0x44cc('0x63'),0x8));var _0x4ff221=sox[_0x44cc('0x64')](_0x39a6ab,_0x5d8605,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x4ff221['on'](_0x44cc('0x29'),function(_0x36937e){fs[_0x44cc('0x65')](_0x39a6ab);_0x18749b[_0x44cc('0x1c')](0x1f4)['send'](_0x36937e);});_0x4ff221['on']('src',function(_0x5c815f){_0x2a89b7['original_duration']=isNaN(_0x5c815f[_0x44cc('0x66')])?null:_0x5c815f[_0x44cc('0x66')]*0x3e8;_0x2a89b7[_0x44cc('0x67')]=isNaN(_0x5c815f[_0x44cc('0x68')])?null:_0x5c815f[_0x44cc('0x68')];_0x2a89b7['original_channelCount']=isNaN(_0x5c815f['channelCount'])?null:_0x5c815f['channelCount'];_0x2a89b7[_0x44cc('0x69')]=isNaN(_0x5c815f[_0x44cc('0x6a')])?null:_0x5c815f['bitRate'];_0x2a89b7[_0x44cc('0x6b')]=isNaN(_0x5c815f[_0x44cc('0x6c')])?null:_0x5c815f[_0x44cc('0x6c')];});_0x4ff221['on'](_0x44cc('0x6d'),function(_0x160239){_0x2a89b7['converted_duration']=isNaN(_0x160239[_0x44cc('0x66')])?null:_0x160239[_0x44cc('0x66')]*0x3e8;_0x2a89b7[_0x44cc('0x6e')]=isNaN(_0x160239[_0x44cc('0x68')])?null:_0x160239[_0x44cc('0x68')];_0x2a89b7[_0x44cc('0x6f')]=isNaN(_0x160239[_0x44cc('0x70')])?null:_0x160239[_0x44cc('0x70')];_0x2a89b7[_0x44cc('0x71')]=isNaN(_0x160239[_0x44cc('0x6a')])?null:_0x160239[_0x44cc('0x6a')];_0x2a89b7['converted_sampleRate']=isNaN(_0x160239[_0x44cc('0x6c')])?null:_0x160239[_0x44cc('0x6c')];});_0x4ff221['on'](_0x44cc('0x1b'),function(){fs['chmodSync'](_0x5d8605,parseInt('0777',0x8));return db[_0x44cc('0x2e')]['create'](_0x2a89b7)[_0x44cc('0x25')](function(_0x4dfcd9){var _0x133dad={'role':_0x2465f7['body'][_0x44cc('0x72')],'userProfileId':_0x2465f7[_0x44cc('0x73')][_0x44cc('0x74')]};if(!_0x133dad)throw new Error(_0x44cc('0x75'));if(_0x133dad[_0x44cc('0x72')]===_0x44cc('0x76')){var _0x579289=_0x4dfcd9[_0x44cc('0x27')]({'plain':!![]});return db['UserProfileSection'][_0x44cc('0x4b')]({'where':{'name':_0x44cc('0x77'),'userProfileId':_0x133dad[_0x44cc('0x74')]},'raw':!![]})[_0x44cc('0x25')](function(_0x2a686a){if(_0x2a686a&&_0x2a686a[_0x44cc('0x78')]===0x0){return db[_0x44cc('0x28')][_0x44cc('0x79')]({'name':_0x579289['name'],'resourceId':_0x579289['id'],'type':_0x2a686a['name'],'sectionId':_0x2a686a['id']},{})[_0x44cc('0x25')](function(){return _0x4dfcd9;});}else{return _0x4dfcd9;}})[_0x44cc('0x49')](function(_0x21ef54){logger[_0x44cc('0x29')](_0x44cc('0x7a'),_0x21ef54);throw _0x21ef54;});}return _0x4dfcd9;})[_0x44cc('0x25')](respondWithResult(_0x18749b,null))[_0x44cc('0x49')](handleError(_0x18749b,null));});_0x4ff221['start']();}catch(_0x404f3a){_0x18749b[_0x44cc('0x1c')](0x1f4)[_0x44cc('0x2c')](_0x404f3a);}};exports['update']=function(_0x34c950,_0x32751b,_0x33d1da){return db[_0x44cc('0x2e')][_0x44cc('0x4b')]({'where':{'id':_0x34c950[_0x44cc('0x4c')]['id']}})['then'](handleEntityNotFound(_0x32751b,null))[_0x44cc('0x25')](saveUpdates(_[_0x44cc('0x40')](_0x34c950[_0x44cc('0x73')],['name',_0x44cc('0x7b')]),null))[_0x44cc('0x25')](respondWithResult(_0x32751b,null))[_0x44cc('0x49')](handleError(_0x32751b,null));};exports['delete']=function(_0x2ee5f3,_0x2a5d4e,_0x21e062){return db[_0x44cc('0x2e')][_0x44cc('0x4b')]({'where':{'id':_0x2ee5f3[_0x44cc('0x4c')]['id']}})['then'](function(_0xc9ddc5){if(_0xc9ddc5){return _0xc9ddc5[_0x44cc('0x26')]();}})[_0x44cc('0x25')](function(_0x570d58){var _0x20fd6a=path[_0x44cc('0x50')](config[_0x44cc('0x51')],_0x44cc('0x5f'),util[_0x44cc('0x56')](_0x44cc('0x57'),_0x570d58[_0x44cc('0x4d')],_0x570d58[_0x44cc('0x7c')]));var _0x30b1cc=path[_0x44cc('0x50')](config[_0x44cc('0x51')],'server/files/sounds/converted',util['format'](_0x44cc('0x57'),_0x570d58[_0x44cc('0x4d')],_0x570d58[_0x44cc('0x4e')]));fs[_0x44cc('0x65')](_0x20fd6a);fs['unlinkSync'](_0x30b1cc);return _0x570d58;})[_0x44cc('0x25')](function(_0x3354a0){if(_0x3354a0){return _0x2a5d4e[_0x44cc('0x1c')](0xcc)[_0x44cc('0x1b')]();}})[_0x44cc('0x25')](handleEntityNotFound(_0x2a5d4e,null))['catch'](handleError(_0x2a5d4e,null));};
\ No newline at end of file
diff --git a/server/api/sound/sound.model.js b/server/api/sound/sound.model.js
index 70dda11..c4c6a71 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 _0xccc4=['moment','bluebird','request-promise','path','./sound.attributes','Sound','tools_sounds','../../config/logger','api'];(function(_0x4c8efd,_0x380a8a){var _0x192453=function(_0x3ab981){while(--_0x3ab981){_0x4c8efd['push'](_0x4c8efd['shift']());}};_0x192453(++_0x380a8a);}(_0xccc4,0x1ae));var _0x4ccc=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xccc4[_0x6c993a];return _0x27f547;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x4ccc('0x0'))(_0x4ccc('0x1'));var moment=require(_0x4ccc('0x2'));var BPromise=require(_0x4ccc('0x3'));var rp=require(_0x4ccc('0x4'));var fs=require('fs');var path=require(_0x4ccc('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x4ccc('0x6'));module['exports']=function(_0x55b8a6,_0x34d49c){return _0x55b8a6['define'](_0x4ccc('0x7'),attributes,{'tableName':_0x4ccc('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6c34=['exports','define','tools_sounds','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0xb5d6f6,_0x3eb466){var _0x3771fc=function(_0x471325){while(--_0x471325){_0xb5d6f6['push'](_0xb5d6f6['shift']());}};_0x3771fc(++_0x3eb466);}(_0x6c34,0x1dc));var _0x46c3=function(_0x22ac85,_0x4f397a){_0x22ac85=_0x22ac85-0x0;var _0x3b4566=_0x6c34[_0x22ac85];return _0x3b4566;};'use strict';var _=require('lodash');var util=require(_0x46c3('0x0'));var logger=require(_0x46c3('0x1'))('api');var moment=require(_0x46c3('0x2'));var BPromise=require(_0x46c3('0x3'));var rp=require(_0x46c3('0x4'));var fs=require('fs');var path=require(_0x46c3('0x5'));var rimraf=require(_0x46c3('0x6'));var config=require(_0x46c3('0x7'));var attributes=require('./sound.attributes');module[_0x46c3('0x8')]=function(_0x4fc3a9,_0x2f41b0){return _0x4fc3a9[_0x46c3('0x9')]('Sound',attributes,{'tableName':_0x46c3('0xa'),'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 0c9fc91..109b41f 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 _0x4431=['bluebird','randomstring','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','error','Sound,\x20%s,\x20%s','message','catch','ShowSound','Sound','options','raw','where','attributes','include','map','model','then','moment'];(function(_0x5ca353,_0x21eb37){var _0x4f2fe5=function(_0x14cd1b){while(--_0x14cd1b){_0x5ca353['push'](_0x5ca353['shift']());}};_0x4f2fe5(++_0x21eb37);}(_0x4431,0x8b));var _0x1443=function(_0x537cec,_0x3a2b28){_0x537cec=_0x537cec-0x0;var _0x35b884=_0x4431[_0x537cec];return _0x35b884;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1443('0x0'));var BPromise=require(_0x1443('0x1'));var rs=require(_0x1443('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x1443('0x3'))(_0x1443('0x4'));var config=require(_0x1443('0x5'));var jayson=require(_0x1443('0x6'));var client=jayson[_0x1443('0x7')][_0x1443('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2ee982,_0x54554c,_0x231a37){return new BPromise(function(_0x3632b1,_0x372799){return client[_0x1443('0x9')](_0x2ee982,_0x231a37)['then'](function(_0x46083c){logger[_0x1443('0xa')]('Sound,\x20%s,\x20%s',_0x54554c,_0x1443('0xb'));logger[_0x1443('0xc')]('Sound,\x20%s,\x20%s,\x20%s',_0x54554c,_0x1443('0xb'),JSON[_0x1443('0xd')](_0x46083c));if(_0x46083c[_0x1443('0xe')]){if(_0x46083c[_0x1443('0xe')]['code']===0x1f4){logger['error'](_0x1443('0xf'),_0x54554c,_0x46083c[_0x1443('0xe')]['message']);return _0x372799(_0x46083c['error'][_0x1443('0x10')]);}logger[_0x1443('0xe')]('Sound,\x20%s,\x20%s',_0x54554c,_0x46083c[_0x1443('0xe')][_0x1443('0x10')]);return _0x3632b1(_0x46083c[_0x1443('0xe')]['message']);}else{logger[_0x1443('0xa')]('Sound,\x20%s,\x20%s',_0x54554c,_0x1443('0xb'));_0x3632b1(_0x46083c['result'][_0x1443('0x10')]);}})[_0x1443('0x11')](function(_0x350252){logger['error'](_0x1443('0xf'),_0x54554c,_0x350252);_0x372799(_0x350252);});});}exports[_0x1443('0x12')]=function(_0x4df358){var _0x3311fc=this;return new Promise(function(_0x40bb89,_0x12e6f4){return db[_0x1443('0x13')]['find']({'raw':_0x4df358[_0x1443('0x14')]?_0x4df358[_0x1443('0x14')][_0x1443('0x15')]===undefined?!![]:![]:!![],'where':_0x4df358['options']?_0x4df358[_0x1443('0x14')][_0x1443('0x16')]||null:null,'attributes':_0x4df358[_0x1443('0x14')]?_0x4df358['options'][_0x1443('0x17')]||null:null,'include':_0x4df358[_0x1443('0x14')]?_0x4df358[_0x1443('0x14')][_0x1443('0x18')]?_[_0x1443('0x19')](_0x4df358[_0x1443('0x14')]['include'],function(_0x2727f9){return{'model':db[_0x2727f9['model']],'as':_0x2727f9['as'],'attributes':_0x2727f9[_0x1443('0x17')],'include':_0x2727f9[_0x1443('0x18')]?_[_0x1443('0x19')](_0x2727f9[_0x1443('0x18')],function(_0x4f6176){return{'model':db[_0x4f6176[_0x1443('0x1a')]],'as':_0x4f6176['as'],'attributes':_0x4f6176['attributes'],'include':_0x4f6176[_0x1443('0x18')]?_[_0x1443('0x19')](_0x4f6176[_0x1443('0x18')],function(_0x490d93){return{'model':db[_0x490d93['model']],'as':_0x490d93['as'],'attributes':_0x490d93[_0x1443('0x17')]};}):[]};}):[]};}):[]:[]})[_0x1443('0x1b')](function(_0x48185c){logger[_0x1443('0xa')](_0x1443('0x12'),_0x4df358);logger[_0x1443('0xc')](_0x1443('0x12'),_0x4df358,JSON[_0x1443('0xd')](_0x48185c));_0x40bb89(_0x48185c);})['catch'](function(_0x37bfa6){logger[_0x1443('0xe')]('ShowSound',_0x37bfa6[_0x1443('0x10')],_0x4df358);_0x12e6f4(_0x3311fc['error'](0x1f4,_0x37bfa6[_0x1443('0x10')]));});});};
\ No newline at end of file
+var _0x9e0d=['moment','bluebird','randomstring','ioredis','../../config/logger','rpc','http','then','info','Sound,\x20%s,\x20%s','debug','Sound,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','ShowSound','Sound','find','options','raw','where','attributes','include','map','model','lodash','util'];(function(_0x53bcc3,_0x364374){var _0x47c959=function(_0x40ef7d){while(--_0x40ef7d){_0x53bcc3['push'](_0x53bcc3['shift']());}};_0x47c959(++_0x364374);}(_0x9e0d,0x10c));var _0xd9e0=function(_0x415f0a,_0x5dc7e2){_0x415f0a=_0x415f0a-0x0;var _0x40aab4=_0x9e0d[_0x415f0a];return _0x40aab4;};'use strict';var _=require(_0xd9e0('0x0'));var util=require(_0xd9e0('0x1'));var moment=require(_0xd9e0('0x2'));var BPromise=require(_0xd9e0('0x3'));var rs=require(_0xd9e0('0x4'));var fs=require('fs');var Redis=require(_0xd9e0('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xd9e0('0x6'))(_0xd9e0('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xd9e0('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5b09db,_0x23d73b,_0x4d3f3e){return new BPromise(function(_0x1d3a88,_0x267b30){return client['request'](_0x5b09db,_0x4d3f3e)[_0xd9e0('0x9')](function(_0x34d268){logger[_0xd9e0('0xa')](_0xd9e0('0xb'),_0x23d73b,'request\x20sent');logger[_0xd9e0('0xc')](_0xd9e0('0xd'),_0x23d73b,_0xd9e0('0xe'),JSON[_0xd9e0('0xf')](_0x34d268));if(_0x34d268[_0xd9e0('0x10')]){if(_0x34d268['error'][_0xd9e0('0x11')]===0x1f4){logger[_0xd9e0('0x10')](_0xd9e0('0xb'),_0x23d73b,_0x34d268[_0xd9e0('0x10')]['message']);return _0x267b30(_0x34d268['error']['message']);}logger[_0xd9e0('0x10')]('Sound,\x20%s,\x20%s',_0x23d73b,_0x34d268[_0xd9e0('0x10')][_0xd9e0('0x12')]);return _0x1d3a88(_0x34d268[_0xd9e0('0x10')][_0xd9e0('0x12')]);}else{logger['info']('Sound,\x20%s,\x20%s',_0x23d73b,_0xd9e0('0xe'));_0x1d3a88(_0x34d268['result'][_0xd9e0('0x12')]);}})[_0xd9e0('0x13')](function(_0x64e370){logger[_0xd9e0('0x10')](_0xd9e0('0xb'),_0x23d73b,_0x64e370);_0x267b30(_0x64e370);});});}exports[_0xd9e0('0x14')]=function(_0x57737f){var _0x3de548=this;return new Promise(function(_0x37c312,_0x2d2ad4){return db[_0xd9e0('0x15')][_0xd9e0('0x16')]({'raw':_0x57737f['options']?_0x57737f[_0xd9e0('0x17')][_0xd9e0('0x18')]===undefined?!![]:![]:!![],'where':_0x57737f['options']?_0x57737f['options'][_0xd9e0('0x19')]||null:null,'attributes':_0x57737f[_0xd9e0('0x17')]?_0x57737f[_0xd9e0('0x17')][_0xd9e0('0x1a')]||null:null,'include':_0x57737f[_0xd9e0('0x17')]?_0x57737f[_0xd9e0('0x17')][_0xd9e0('0x1b')]?_[_0xd9e0('0x1c')](_0x57737f[_0xd9e0('0x17')][_0xd9e0('0x1b')],function(_0xe3a3e1){return{'model':db[_0xe3a3e1[_0xd9e0('0x1d')]],'as':_0xe3a3e1['as'],'attributes':_0xe3a3e1[_0xd9e0('0x1a')],'include':_0xe3a3e1[_0xd9e0('0x1b')]?_['map'](_0xe3a3e1['include'],function(_0x491386){return{'model':db[_0x491386[_0xd9e0('0x1d')]],'as':_0x491386['as'],'attributes':_0x491386['attributes'],'include':_0x491386[_0xd9e0('0x1b')]?_[_0xd9e0('0x1c')](_0x491386[_0xd9e0('0x1b')],function(_0x7851dc){return{'model':db[_0x7851dc[_0xd9e0('0x1d')]],'as':_0x7851dc['as'],'attributes':_0x7851dc[_0xd9e0('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xd9e0('0x9')](function(_0x20a03f){logger['info']('ShowSound',_0x57737f);logger['debug'](_0xd9e0('0x14'),_0x57737f,JSON[_0xd9e0('0xf')](_0x20a03f));_0x37c312(_0x20a03f);})[_0xd9e0('0x13')](function(_0x3b3d14){logger[_0xd9e0('0x10')](_0xd9e0('0x14'),_0x3b3d14[_0xd9e0('0x12')],_0x57737f);_0x2d2ad4(_0x3de548[_0xd9e0('0x10')](0x1f4,_0x3b3d14[_0xd9e0('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/squareMessage/index.js b/server/api/squareMessage/index.js
index c29e5dd..8277965 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 _0x74d1=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareMessage.controller','get','isAuthenticated','index','/:id','show','create','put','update','destroy','exports','multer','connect-timeout'];(function(_0x372c9a,_0x662b67){var _0x40e063=function(_0x5c2646){while(--_0x5c2646){_0x372c9a['push'](_0x372c9a['shift']());}};_0x40e063(++_0x662b67);}(_0x74d1,0xc4));var _0x174d=function(_0x135892,_0x18a549){_0x135892=_0x135892-0x0;var _0x608661=_0x74d1[_0x135892];return _0x608661;};'use strict';var multer=require(_0x174d('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x174d('0x1'));var express=require(_0x174d('0x2'));var router=express[_0x174d('0x3')]();var auth=require(_0x174d('0x4'));var interaction=require(_0x174d('0x5'));var config=require(_0x174d('0x6'));var controller=require(_0x174d('0x7'));router[_0x174d('0x8')]('/',auth[_0x174d('0x9')](),controller[_0x174d('0xa')]);router[_0x174d('0x8')](_0x174d('0xb'),auth['isAuthenticated'](),controller[_0x174d('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0x174d('0xd')]);router[_0x174d('0xe')](_0x174d('0xb'),auth[_0x174d('0x9')](),controller[_0x174d('0xf')]);router['delete']('/:id',auth[_0x174d('0x9')](),controller[_0x174d('0x10')]);module[_0x174d('0x11')]=router;
\ No newline at end of file
+var _0xa26d=['Router','../../components/interaction/service','../../config/environment','isAuthenticated','index','show','post','create','put','/:id','update','delete','exports','path','connect-timeout','express'];(function(_0x1d61a5,_0x414995){var _0x3e23d8=function(_0x52c10d){while(--_0x52c10d){_0x1d61a5['push'](_0x1d61a5['shift']());}};_0x3e23d8(++_0x414995);}(_0xa26d,0x8d));var _0xda26=function(_0x228211,_0x16bc63){_0x228211=_0x228211-0x0;var _0x5c9e22=_0xa26d[_0x228211];return _0x5c9e22;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xda26('0x0'));var timeout=require(_0xda26('0x1'));var express=require(_0xda26('0x2'));var router=express[_0xda26('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xda26('0x4'));var config=require(_0xda26('0x5'));var controller=require('./squareMessage.controller');router['get']('/',auth[_0xda26('0x6')](),controller[_0xda26('0x7')]);router['get']('/:id',auth[_0xda26('0x6')](),controller[_0xda26('0x8')]);router[_0xda26('0x9')]('/',auth[_0xda26('0x6')](),controller[_0xda26('0xa')]);router[_0xda26('0xb')](_0xda26('0xc'),auth[_0xda26('0x6')](),controller[_0xda26('0xd')]);router[_0xda26('0xe')]('/:id',auth[_0xda26('0x6')](),controller['destroy']);module[_0xda26('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/squareMessage/squareMessage.attributes.js b/server/api/squareMessage/squareMessage.attributes.js
index 2862dfd..ba783d9 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 _0xecab=['exports','medium','out','sequelize'];(function(_0x2b9c0c,_0x4678a3){var _0xd8577b=function(_0x2dd9eb){while(--_0x2dd9eb){_0x2b9c0c['push'](_0x2b9c0c['shift']());}};_0xd8577b(++_0x4678a3);}(_0xecab,0x1a7));var _0xbeca=function(_0x22e022,_0x5034b5){_0x22e022=_0x22e022-0x0;var _0x594360=_0xecab[_0x22e022];return _0x594360;};'use strict';var Sequelize=require(_0xbeca('0x0'));module[_0xbeca('0x1')]={'uniqueid':{'type':Sequelize['STRING']},'body':{'type':Sequelize['TEXT'](_0xbeca('0x2')),'allowNull':![]},'direction':{'type':Sequelize['ENUM']('in',_0xbeca('0x3')),'defaultValue':'out','allowNull':![]}};
\ No newline at end of file
+var _0x2445=['out','sequelize','exports','STRING','medium'];(function(_0x2a558d,_0x2df0ff){var _0xa7bc9c=function(_0x12a30e){while(--_0x12a30e){_0x2a558d['push'](_0x2a558d['shift']());}};_0xa7bc9c(++_0x2df0ff);}(_0x2445,0x164));var _0x5244=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x2445[_0x57b54c];return _0x59cc19;};'use strict';var Sequelize=require(_0x5244('0x0'));module[_0x5244('0x1')]={'uniqueid':{'type':Sequelize[_0x5244('0x2')]},'body':{'type':Sequelize['TEXT'](_0x5244('0x3')),'allowNull':![]},'direction':{'type':Sequelize['ENUM']('in',_0x5244('0x4')),'defaultValue':_0x5244('0x4'),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/squareMessage/squareMessage.controller.js b/server/api/squareMessage/squareMessage.controller.js
index d03ffac..77099be 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 _0xadce=['hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','count','includeAll','include','findAll','rows','params','find','catch','create','body','html-pdf','rimraf','fast-json-patch','request-promise','mustache','util','path','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','status','end','offset','limit','set','json','save','update','then','destroy','error','stack','name','SquareMessage','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','length'];(function(_0x39096d,_0x51f8a0){var _0x13da4f=function(_0x11e6b2){while(--_0x11e6b2){_0x39096d['push'](_0x39096d['shift']());}};_0x13da4f(++_0x51f8a0);}(_0xadce,0x1dc));var _0xeadc=function(_0x79b649,_0x2115b3){_0x79b649=_0x79b649-0x0;var _0x1af9b1=_0xadce[_0x79b649];return _0x1af9b1;};'use strict';var pdf=require(_0xeadc('0x0'));var emlformat=require('eml-format');var rimraf=require(_0xeadc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xeadc('0x2'));var rp=require(_0xeadc('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xeadc('0x4'));var util=require(_0xeadc('0x5'));var path=require(_0xeadc('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xeadc('0x7'));var crypto=require(_0xeadc('0x8'));var jsforce=require('jsforce');var deskjs=require(_0xeadc('0x9'));var toCsv=require(_0xeadc('0xa'));var querystring=require(_0xeadc('0xb'));var Papa=require('papaparse');var Redis=require(_0xeadc('0xc'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xeadc('0xd'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xeadc('0xe'))(_0xeadc('0xf'));var utils=require(_0xeadc('0x10'));var config=require('../../config/environment');var db=require(_0xeadc('0x11'))['db'];function respondWithStatusCode(_0x527870,_0x53139b){_0x53139b=_0x53139b||0xcc;return function(_0x2af7a5){if(_0x2af7a5){return _0x527870['sendStatus'](_0x53139b);}return _0x527870[_0xeadc('0x12')](_0x53139b)[_0xeadc('0x13')]();};}function respondWithResult(_0x56b63b,_0x39e1d7){_0x39e1d7=_0x39e1d7||0xc8;return function(_0x460d7d){if(_0x460d7d){return _0x56b63b[_0xeadc('0x12')](_0x39e1d7)['json'](_0x460d7d);}};}function respondWithFilteredResult(_0x2728f1,_0x39abd5){return function(_0x1bc748){if(_0x1bc748){var _0x22f7ef=_0x1bc748['count'],_0xb65a94=_0x39abd5[_0xeadc('0x14')],_0x5367fe=_0x39abd5[_0xeadc('0x14')]+_0x39abd5[_0xeadc('0x15')],_0x1eda7a;if(_0x5367fe>=_0x22f7ef){_0x5367fe=_0x22f7ef;_0x1eda7a=0xc8;}else{_0x1eda7a=0xce;}_0x2728f1[_0xeadc('0x12')](_0x1eda7a);return _0x2728f1[_0xeadc('0x16')]('Content-Range',_0xb65a94+'-'+_0x5367fe+'/'+_0x22f7ef)[_0xeadc('0x17')](_0x1bc748);}return null;};}function patchUpdates(_0x3b3d77){return function(_0x13eeab){try{jsonpatch['apply'](_0x13eeab,_0x3b3d77,!![]);}catch(_0x278993){return BPromise['reject'](_0x278993);}return _0x13eeab[_0xeadc('0x18')]();};}function saveUpdates(_0x509137,_0x866d02){return function(_0xf3fca8){if(_0xf3fca8){return _0xf3fca8[_0xeadc('0x19')](_0x509137)[_0xeadc('0x1a')](function(_0x340bcc){return _0x340bcc;});}return null;};}function removeEntity(_0x14950e,_0x8a360e){return function(_0xf0783b){if(_0xf0783b){return _0xf0783b[_0xeadc('0x1b')]()[_0xeadc('0x1a')](function(){_0x14950e[_0xeadc('0x12')](0xcc)[_0xeadc('0x13')]();});}};}function handleEntityNotFound(_0x230acf,_0x33b089){return function(_0xfcb20e){if(!_0xfcb20e){_0x230acf['sendStatus'](0x194);}return _0xfcb20e;};}function handleError(_0x784a49,_0x284149){_0x284149=_0x284149||0x1f4;return function(_0x3135e3){logger[_0xeadc('0x1c')](_0x3135e3[_0xeadc('0x1d')]);if(_0x3135e3[_0xeadc('0x1e')]){delete _0x3135e3[_0xeadc('0x1e')];}_0x784a49[_0xeadc('0x12')](_0x284149)['send'](_0x3135e3);};}exports['index']=function(_0x10316d,_0xa1a3d1){var _0x459095={},_0x72d709={},_0x49ecfd={'count':0x0,'rows':[]};var _0x4f0c76=_['map'](db[_0xeadc('0x1f')][_0xeadc('0x20')],function(_0x2f897d){return{'name':_0x2f897d[_0xeadc('0x21')],'type':_0x2f897d['type'][_0xeadc('0x22')]};});_0x72d709[_0xeadc('0x23')]=_[_0xeadc('0x24')](_0x4f0c76,_0xeadc('0x1e'));_0x72d709[_0xeadc('0x25')]=_[_0xeadc('0x26')](_0x10316d[_0xeadc('0x25')]);_0x72d709[_0xeadc('0x27')]=_[_0xeadc('0x28')](_0x72d709[_0xeadc('0x23')],_0x72d709[_0xeadc('0x25')]);_0x459095[_0xeadc('0x29')]=_[_0xeadc('0x28')](_0x72d709[_0xeadc('0x23')],qs['fields'](_0x10316d[_0xeadc('0x25')][_0xeadc('0x2a')]));_0x459095[_0xeadc('0x29')]=_0x459095[_0xeadc('0x29')][_0xeadc('0x2b')]?_0x459095['attributes']:_0x72d709[_0xeadc('0x23')];if(!_0x10316d[_0xeadc('0x25')][_0xeadc('0x2c')](_0xeadc('0x2d'))){_0x459095['limit']=qs[_0xeadc('0x15')](_0x10316d[_0xeadc('0x25')]['limit']);_0x459095[_0xeadc('0x14')]=qs['offset'](_0x10316d['query'][_0xeadc('0x14')]);}_0x459095[_0xeadc('0x2e')]=qs[_0xeadc('0x2f')](_0x10316d[_0xeadc('0x25')][_0xeadc('0x2f')]);_0x459095[_0xeadc('0x30')]=qs['filters'](_[_0xeadc('0x31')](_0x10316d['query'],_0x72d709[_0xeadc('0x27')]));if(_0x10316d[_0xeadc('0x25')][_0xeadc('0x32')]){_0x459095[_0xeadc('0x30')]=_[_0xeadc('0x33')](_0x459095[_0xeadc('0x30')],{'$or':_['map'](_0x4f0c76,function(_0x26d61d){if(_0x26d61d[_0xeadc('0x34')]!==_0xeadc('0x35')){var _0x51bdff={};_0x51bdff[_0x26d61d[_0xeadc('0x1e')]]={'$like':'%'+_0x10316d[_0xeadc('0x25')]['filter']+'%'};return _0x51bdff;}})});}_0x459095=_[_0xeadc('0x33')]({},_0x459095,_0x10316d[_0xeadc('0x36')]);var _0x4741f8={'where':_0x459095['where']};return db[_0xeadc('0x1f')][_0xeadc('0x37')](_0x4741f8)[_0xeadc('0x1a')](function(_0x79a823){_0x49ecfd[_0xeadc('0x37')]=_0x79a823;if(_0x10316d[_0xeadc('0x25')][_0xeadc('0x38')]){_0x459095[_0xeadc('0x39')]=[{'all':!![]}];}return db['SquareMessage'][_0xeadc('0x3a')](_0x459095);})['then'](function(_0x1b1fce){_0x49ecfd[_0xeadc('0x3b')]=_0x1b1fce;return _0x49ecfd;})['then'](respondWithFilteredResult(_0xa1a3d1,_0x459095))['catch'](handleError(_0xa1a3d1,null));};exports['show']=function(_0x522496,_0x2275d5){var _0x33d8cb={'raw':!![],'where':{'id':_0x522496[_0xeadc('0x3c')]['id']}},_0x28b154={};_0x28b154[_0xeadc('0x23')]=_[_0xeadc('0x26')](db[_0xeadc('0x1f')]['rawAttributes']);_0x28b154[_0xeadc('0x25')]=_[_0xeadc('0x26')](_0x522496[_0xeadc('0x25')]);_0x28b154[_0xeadc('0x27')]=_[_0xeadc('0x28')](_0x28b154[_0xeadc('0x23')],_0x28b154['query']);_0x33d8cb[_0xeadc('0x29')]=_[_0xeadc('0x28')](_0x28b154[_0xeadc('0x23')],qs[_0xeadc('0x2a')](_0x522496['query'][_0xeadc('0x2a')]));_0x33d8cb[_0xeadc('0x29')]=_0x33d8cb[_0xeadc('0x29')][_0xeadc('0x2b')]?_0x33d8cb[_0xeadc('0x29')]:_0x28b154[_0xeadc('0x23')];if(_0x522496[_0xeadc('0x25')][_0xeadc('0x38')]){_0x33d8cb[_0xeadc('0x39')]=[{'all':!![]}];}_0x33d8cb=_[_0xeadc('0x33')]({},_0x33d8cb,_0x522496[_0xeadc('0x36')]);return db[_0xeadc('0x1f')][_0xeadc('0x3d')](_0x33d8cb)[_0xeadc('0x1a')](handleEntityNotFound(_0x2275d5,null))[_0xeadc('0x1a')](respondWithResult(_0x2275d5,null))[_0xeadc('0x3e')](handleError(_0x2275d5,null));};exports[_0xeadc('0x3f')]=function(_0x10a173,_0x587d39){return db[_0xeadc('0x1f')][_0xeadc('0x3f')](_0x10a173['body'],{})[_0xeadc('0x1a')](respondWithResult(_0x587d39,0xc9))[_0xeadc('0x3e')](handleError(_0x587d39,null));};exports[_0xeadc('0x19')]=function(_0x25d045,_0x3afc4d){if(_0x25d045[_0xeadc('0x40')]['id']){delete _0x25d045[_0xeadc('0x40')]['id'];}return db[_0xeadc('0x1f')]['find']({'where':{'id':_0x25d045[_0xeadc('0x3c')]['id']}})['then'](handleEntityNotFound(_0x3afc4d,null))[_0xeadc('0x1a')](saveUpdates(_0x25d045[_0xeadc('0x40')],null))[_0xeadc('0x1a')](respondWithResult(_0x3afc4d,null))['catch'](handleError(_0x3afc4d,null));};exports['destroy']=function(_0x11d73e,_0x4f8305){return db[_0xeadc('0x1f')][_0xeadc('0x3d')]({'where':{'id':_0x11d73e['params']['id']}})[_0xeadc('0x1a')](handleEntityNotFound(_0x4f8305,null))['then'](removeEntity(_0x4f8305,null))[_0xeadc('0x3e')](handleError(_0x4f8305,null));};
\ No newline at end of file
+var _0x0b79=['merge','filter','options','include','findAll','catch','show','keys','includeAll','create','update','body','find','params','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','end','status','json','count','offset','limit','set','apply','reject','destroy','then','error','name','send','index','map','SquareMessage','rawAttributes','fieldName','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filters'];(function(_0x1d40e3,_0x2e2698){var _0x3d5192=function(_0x4e56d8){while(--_0x4e56d8){_0x1d40e3['push'](_0x1d40e3['shift']());}};_0x3d5192(++_0x2e2698);}(_0x0b79,0x9a));var _0x90b7=function(_0x5cf957,_0x16a052){_0x5cf957=_0x5cf957-0x0;var _0x3ab8f4=_0x0b79[_0x5cf957];return _0x3ab8f4;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x90b7('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x90b7('0x1'));var jsonpatch=require(_0x90b7('0x2'));var rp=require(_0x90b7('0x3'));var moment=require(_0x90b7('0x4'));var BPromise=require(_0x90b7('0x5'));var Mustache=require(_0x90b7('0x6'));var util=require(_0x90b7('0x7'));var path=require(_0x90b7('0x8'));var sox=require('sox');var csv=require(_0x90b7('0x9'));var ejs=require(_0x90b7('0xa'));var fs=require('fs');var _=require(_0x90b7('0xb'));var squel=require(_0x90b7('0xc'));var crypto=require(_0x90b7('0xd'));var jsforce=require(_0x90b7('0xe'));var deskjs=require(_0x90b7('0xf'));var toCsv=require(_0x90b7('0x9'));var querystring=require(_0x90b7('0x10'));var Papa=require('papaparse');var Redis=require(_0x90b7('0x11'));var authService=require(_0x90b7('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x90b7('0x13'));var logger=require(_0x90b7('0x14'))(_0x90b7('0x15'));var utils=require('../../config/utils');var config=require(_0x90b7('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x9afd73,_0x5ef92d){_0x5ef92d=_0x5ef92d||0xcc;return function(_0x800382){if(_0x800382){return _0x9afd73[_0x90b7('0x17')](_0x5ef92d);}return _0x9afd73['status'](_0x5ef92d)[_0x90b7('0x18')]();};}function respondWithResult(_0x483884,_0x31afbb){_0x31afbb=_0x31afbb||0xc8;return function(_0x1a6768){if(_0x1a6768){return _0x483884[_0x90b7('0x19')](_0x31afbb)[_0x90b7('0x1a')](_0x1a6768);}};}function respondWithFilteredResult(_0x5b10a8,_0x2c59df){return function(_0x531cce){if(_0x531cce){var _0x467684=_0x531cce[_0x90b7('0x1b')],_0x5c3637=_0x2c59df[_0x90b7('0x1c')],_0xb77101=_0x2c59df['offset']+_0x2c59df[_0x90b7('0x1d')],_0x3d7dbb;if(_0xb77101>=_0x467684){_0xb77101=_0x467684;_0x3d7dbb=0xc8;}else{_0x3d7dbb=0xce;}_0x5b10a8[_0x90b7('0x19')](_0x3d7dbb);return _0x5b10a8[_0x90b7('0x1e')]('Content-Range',_0x5c3637+'-'+_0xb77101+'/'+_0x467684)[_0x90b7('0x1a')](_0x531cce);}return null;};}function patchUpdates(_0x550d73){return function(_0x48622b){try{jsonpatch[_0x90b7('0x1f')](_0x48622b,_0x550d73,!![]);}catch(_0x2c962c){return BPromise[_0x90b7('0x20')](_0x2c962c);}return _0x48622b['save']();};}function saveUpdates(_0x2f33d1,_0x7e2faa){return function(_0xcbd67a){if(_0xcbd67a){return _0xcbd67a['update'](_0x2f33d1)['then'](function(_0x1bafc1){return _0x1bafc1;});}return null;};}function removeEntity(_0x5f547a,_0x56017c){return function(_0x200eab){if(_0x200eab){return _0x200eab[_0x90b7('0x21')]()[_0x90b7('0x22')](function(){_0x5f547a[_0x90b7('0x19')](0xcc)[_0x90b7('0x18')]();});}};}function handleEntityNotFound(_0xed018a,_0x1ba6e5){return function(_0x50b5d9){if(!_0x50b5d9){_0xed018a[_0x90b7('0x17')](0x194);}return _0x50b5d9;};}function handleError(_0x4250b3,_0x1a34b8){_0x1a34b8=_0x1a34b8||0x1f4;return function(_0x332d5a){logger[_0x90b7('0x23')](_0x332d5a['stack']);if(_0x332d5a['name']){delete _0x332d5a[_0x90b7('0x24')];}_0x4250b3[_0x90b7('0x19')](_0x1a34b8)[_0x90b7('0x25')](_0x332d5a);};}exports[_0x90b7('0x26')]=function(_0x2b8d99,_0x4ba21e){var _0x4adc69={},_0x47f43d={},_0x5b7a5b={'count':0x0,'rows':[]};var _0x19f0ab=_[_0x90b7('0x27')](db[_0x90b7('0x28')][_0x90b7('0x29')],function(_0x4597bd){return{'name':_0x4597bd[_0x90b7('0x2a')],'type':_0x4597bd['type']['key']};});_0x47f43d[_0x90b7('0x2b')]=_[_0x90b7('0x27')](_0x19f0ab,_0x90b7('0x24'));_0x47f43d[_0x90b7('0x2c')]=_['keys'](_0x2b8d99[_0x90b7('0x2c')]);_0x47f43d['filters']=_[_0x90b7('0x2d')](_0x47f43d['model'],_0x47f43d['query']);_0x4adc69[_0x90b7('0x2e')]=_[_0x90b7('0x2d')](_0x47f43d['model'],qs[_0x90b7('0x2f')](_0x2b8d99[_0x90b7('0x2c')][_0x90b7('0x2f')]));_0x4adc69[_0x90b7('0x2e')]=_0x4adc69['attributes'][_0x90b7('0x30')]?_0x4adc69[_0x90b7('0x2e')]:_0x47f43d[_0x90b7('0x2b')];if(!_0x2b8d99[_0x90b7('0x2c')][_0x90b7('0x31')](_0x90b7('0x32'))){_0x4adc69[_0x90b7('0x1d')]=qs[_0x90b7('0x1d')](_0x2b8d99[_0x90b7('0x2c')]['limit']);_0x4adc69[_0x90b7('0x1c')]=qs[_0x90b7('0x1c')](_0x2b8d99[_0x90b7('0x2c')][_0x90b7('0x1c')]);}_0x4adc69[_0x90b7('0x33')]=qs[_0x90b7('0x34')](_0x2b8d99[_0x90b7('0x2c')][_0x90b7('0x34')]);_0x4adc69[_0x90b7('0x35')]=qs['filters'](_[_0x90b7('0x36')](_0x2b8d99['query'],_0x47f43d[_0x90b7('0x37')]));if(_0x2b8d99['query']['filter']){_0x4adc69[_0x90b7('0x35')]=_[_0x90b7('0x38')](_0x4adc69[_0x90b7('0x35')],{'$or':_['map'](_0x19f0ab,function(_0x132e80){if(_0x132e80['type']!=='VIRTUAL'){var _0x2f6564={};_0x2f6564[_0x132e80[_0x90b7('0x24')]]={'$like':'%'+_0x2b8d99[_0x90b7('0x2c')][_0x90b7('0x39')]+'%'};return _0x2f6564;}})});}_0x4adc69=_[_0x90b7('0x38')]({},_0x4adc69,_0x2b8d99[_0x90b7('0x3a')]);var _0xddb8e3={'where':_0x4adc69['where']};return db[_0x90b7('0x28')][_0x90b7('0x1b')](_0xddb8e3)[_0x90b7('0x22')](function(_0x26beb7){_0x5b7a5b['count']=_0x26beb7;if(_0x2b8d99[_0x90b7('0x2c')]['includeAll']){_0x4adc69[_0x90b7('0x3b')]=[{'all':!![]}];}return db[_0x90b7('0x28')][_0x90b7('0x3c')](_0x4adc69);})[_0x90b7('0x22')](function(_0x293231){_0x5b7a5b['rows']=_0x293231;return _0x5b7a5b;})[_0x90b7('0x22')](respondWithFilteredResult(_0x4ba21e,_0x4adc69))[_0x90b7('0x3d')](handleError(_0x4ba21e,null));};exports[_0x90b7('0x3e')]=function(_0x28839c,_0xf36381){var _0x33c6f7={'raw':!![],'where':{'id':_0x28839c['params']['id']}},_0x4ce6bf={};_0x4ce6bf[_0x90b7('0x2b')]=_[_0x90b7('0x3f')](db['SquareMessage'][_0x90b7('0x29')]);_0x4ce6bf[_0x90b7('0x2c')]=_[_0x90b7('0x3f')](_0x28839c[_0x90b7('0x2c')]);_0x4ce6bf[_0x90b7('0x37')]=_[_0x90b7('0x2d')](_0x4ce6bf[_0x90b7('0x2b')],_0x4ce6bf[_0x90b7('0x2c')]);_0x33c6f7['attributes']=_['intersection'](_0x4ce6bf['model'],qs['fields'](_0x28839c[_0x90b7('0x2c')]['fields']));_0x33c6f7[_0x90b7('0x2e')]=_0x33c6f7[_0x90b7('0x2e')][_0x90b7('0x30')]?_0x33c6f7['attributes']:_0x4ce6bf[_0x90b7('0x2b')];if(_0x28839c[_0x90b7('0x2c')][_0x90b7('0x40')]){_0x33c6f7[_0x90b7('0x3b')]=[{'all':!![]}];}_0x33c6f7=_['merge']({},_0x33c6f7,_0x28839c['options']);return db[_0x90b7('0x28')]['find'](_0x33c6f7)[_0x90b7('0x22')](handleEntityNotFound(_0xf36381,null))[_0x90b7('0x22')](respondWithResult(_0xf36381,null))[_0x90b7('0x3d')](handleError(_0xf36381,null));};exports['create']=function(_0x3fc9a8,_0x2b2eec){return db[_0x90b7('0x28')][_0x90b7('0x41')](_0x3fc9a8['body'],{})[_0x90b7('0x22')](respondWithResult(_0x2b2eec,0xc9))['catch'](handleError(_0x2b2eec,null));};exports[_0x90b7('0x42')]=function(_0xc9d1a0,_0x523830){if(_0xc9d1a0[_0x90b7('0x43')]['id']){delete _0xc9d1a0[_0x90b7('0x43')]['id'];}return db[_0x90b7('0x28')][_0x90b7('0x44')]({'where':{'id':_0xc9d1a0[_0x90b7('0x45')]['id']}})['then'](handleEntityNotFound(_0x523830,null))[_0x90b7('0x22')](saveUpdates(_0xc9d1a0[_0x90b7('0x43')],null))[_0x90b7('0x22')](respondWithResult(_0x523830,null))[_0x90b7('0x3d')](handleError(_0x523830,null));};exports['destroy']=function(_0x2fa39e,_0x1fd592){return db[_0x90b7('0x28')][_0x90b7('0x44')]({'where':{'id':_0x2fa39e[_0x90b7('0x45')]['id']}})[_0x90b7('0x22')](handleEntityNotFound(_0x1fd592,null))[_0x90b7('0x22')](removeEntity(_0x1fd592,null))[_0x90b7('0x3d')](handleError(_0x1fd592,null));};
\ No newline at end of file
diff --git a/server/api/squareMessage/squareMessage.model.js b/server/api/squareMessage/squareMessage.model.js
index e87016d..1c98906 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 _0x36ef=['request-promise','path','rimraf','../../config/environment','./squareMessage.attributes','exports','define','SquareMessage','square_messages','util','../../config/logger','api','moment','bluebird'];(function(_0xb54b31,_0x4ac97c){var _0x49d88b=function(_0x3da58a){while(--_0x3da58a){_0xb54b31['push'](_0xb54b31['shift']());}};_0x49d88b(++_0x4ac97c);}(_0x36ef,0x105));var _0xf36e=function(_0x3aea61,_0xac03ef){_0x3aea61=_0x3aea61-0x0;var _0x5792de=_0x36ef[_0x3aea61];return _0x5792de;};'use strict';var _=require('lodash');var util=require(_0xf36e('0x0'));var logger=require(_0xf36e('0x1'))(_0xf36e('0x2'));var moment=require(_0xf36e('0x3'));var BPromise=require(_0xf36e('0x4'));var rp=require(_0xf36e('0x5'));var fs=require('fs');var path=require(_0xf36e('0x6'));var rimraf=require(_0xf36e('0x7'));var config=require(_0xf36e('0x8'));var attributes=require(_0xf36e('0x9'));module[_0xf36e('0xa')]=function(_0x4e10c2,_0x35a270){return _0x4e10c2[_0xf36e('0xb')](_0xf36e('0xc'),attributes,{'tableName':_0xf36e('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc6e3=['api','moment','request-promise','rimraf','../../config/environment','./squareMessage.attributes','exports','define','square_messages','lodash','util','../../config/logger'];(function(_0x4ab99,_0x219ed2){var _0x29e39c=function(_0x2dd986){while(--_0x2dd986){_0x4ab99['push'](_0x4ab99['shift']());}};_0x29e39c(++_0x219ed2);}(_0xc6e3,0x195));var _0x3c6e=function(_0x533733,_0x4a1b62){_0x533733=_0x533733-0x0;var _0x126b48=_0xc6e3[_0x533733];return _0x126b48;};'use strict';var _=require(_0x3c6e('0x0'));var util=require(_0x3c6e('0x1'));var logger=require(_0x3c6e('0x2'))(_0x3c6e('0x3'));var moment=require(_0x3c6e('0x4'));var BPromise=require('bluebird');var rp=require(_0x3c6e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3c6e('0x6'));var config=require(_0x3c6e('0x7'));var attributes=require(_0x3c6e('0x8'));module[_0x3c6e('0x9')]=function(_0xa931de,_0x63df86){return _0xa931de[_0x3c6e('0xa')]('SquareMessage',attributes,{'tableName':_0x3c6e('0xb'),'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 ce2b3cc..b327a73 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 _0x68fd=['SquareMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','SquareMessage,\x20%s,\x20%s','CreateSquareMessage','body','options','raw','debug','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent'];(function(_0x19c5f2,_0x44ed13){var _0xb94caf=function(_0x1b3522){while(--_0x1b3522){_0x19c5f2['push'](_0x19c5f2['shift']());}};_0xb94caf(++_0x44ed13);}(_0x68fd,0x1e9));var _0xd68f=function(_0x2006cd,_0x4f4068){_0x2006cd=_0x2006cd-0x0;var _0x3c690e=_0x68fd[_0x2006cd];return _0x3c690e;};'use strict';var _=require(_0xd68f('0x0'));var util=require('util');var moment=require(_0xd68f('0x1'));var BPromise=require(_0xd68f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd68f('0x3'));var db=require(_0xd68f('0x4'))['db'];var utils=require(_0xd68f('0x5'));var logger=require(_0xd68f('0x6'))(_0xd68f('0x7'));var config=require(_0xd68f('0x8'));var jayson=require(_0xd68f('0x9'));var client=jayson[_0xd68f('0xa')][_0xd68f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4e59f5,_0xb3cb35,_0x182353){return new BPromise(function(_0x26f6ca,_0x22c199){return client[_0xd68f('0xc')](_0x4e59f5,_0x182353)[_0xd68f('0xd')](function(_0x18438e){logger['info']('SquareMessage,\x20%s,\x20%s',_0xb3cb35,_0xd68f('0xe'));logger['debug'](_0xd68f('0xf'),_0xb3cb35,_0xd68f('0xe'),JSON[_0xd68f('0x10')](_0x18438e));if(_0x18438e[_0xd68f('0x11')]){if(_0x18438e[_0xd68f('0x11')][_0xd68f('0x12')]===0x1f4){logger[_0xd68f('0x11')]('SquareMessage,\x20%s,\x20%s',_0xb3cb35,_0x18438e['error']['message']);return _0x22c199(_0x18438e['error'][_0xd68f('0x13')]);}logger[_0xd68f('0x11')]('SquareMessage,\x20%s,\x20%s',_0xb3cb35,_0x18438e[_0xd68f('0x11')][_0xd68f('0x13')]);return _0x26f6ca(_0x18438e[_0xd68f('0x11')][_0xd68f('0x13')]);}else{logger[_0xd68f('0x14')](_0xd68f('0x15'),_0xb3cb35,_0xd68f('0xe'));_0x26f6ca(_0x18438e['result'][_0xd68f('0x13')]);}})['catch'](function(_0x5db5b1){logger[_0xd68f('0x11')](_0xd68f('0x15'),_0xb3cb35,_0x5db5b1);_0x22c199(_0x5db5b1);});});}exports[_0xd68f('0x16')]=function(_0x3fdfbf){var _0x44e849=this;return new Promise(function(_0xb01ed,_0xa09f23){return db['SquareMessage']['create'](_0x3fdfbf[_0xd68f('0x17')],{'raw':_0x3fdfbf[_0xd68f('0x18')]?_0x3fdfbf[_0xd68f('0x18')][_0xd68f('0x19')]===undefined?!![]:![]:!![]})[_0xd68f('0xd')](function(_0x4c192f){logger[_0xd68f('0x14')](_0xd68f('0x16'),_0x3fdfbf);logger[_0xd68f('0x1a')]('CreateSquareMessage',_0x3fdfbf,JSON[_0xd68f('0x10')](_0x4c192f));_0xb01ed(_0x4c192f);})[_0xd68f('0x1b')](function(_0xeba444){logger['error']('CreateSquareMessage',_0xeba444[_0xd68f('0x13')],_0x3fdfbf);_0xa09f23(_0x44e849['error'](0x1f4,_0xeba444['message']));});});};
\ No newline at end of file
+var _0xd2f5=['SquareMessage','create','body','options','stringify','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SquareMessage,\x20%s,\x20%s','debug','SquareMessage,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','CreateSquareMessage'];(function(_0x2c0be1,_0x1e88f2){var _0x3d4bd2=function(_0x2b5497){while(--_0x2b5497){_0x2c0be1['push'](_0x2c0be1['shift']());}};_0x3d4bd2(++_0x1e88f2);}(_0xd2f5,0x144));var _0x5d2f=function(_0x18438f,_0x2f0472){_0x18438f=_0x18438f-0x0;var _0x167eb3=_0xd2f5[_0x18438f];return _0x167eb3;};'use strict';var _=require(_0x5d2f('0x0'));var util=require('util');var moment=require(_0x5d2f('0x1'));var BPromise=require('bluebird');var rs=require(_0x5d2f('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5d2f('0x3'))['db'];var utils=require(_0x5d2f('0x4'));var logger=require(_0x5d2f('0x5'))(_0x5d2f('0x6'));var config=require(_0x5d2f('0x7'));var jayson=require(_0x5d2f('0x8'));var client=jayson[_0x5d2f('0x9')][_0x5d2f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4b2540,_0x443779,_0x908c6){return new BPromise(function(_0x1c8c59,_0x1670ea){return client[_0x5d2f('0xb')](_0x4b2540,_0x908c6)[_0x5d2f('0xc')](function(_0x58e637){logger[_0x5d2f('0xd')](_0x5d2f('0xe'),_0x443779,'request\x20sent');logger[_0x5d2f('0xf')](_0x5d2f('0x10'),_0x443779,_0x5d2f('0x11'),JSON['stringify'](_0x58e637));if(_0x58e637[_0x5d2f('0x12')]){if(_0x58e637[_0x5d2f('0x12')][_0x5d2f('0x13')]===0x1f4){logger['error']('SquareMessage,\x20%s,\x20%s',_0x443779,_0x58e637[_0x5d2f('0x12')]['message']);return _0x1670ea(_0x58e637[_0x5d2f('0x12')][_0x5d2f('0x14')]);}logger['error'](_0x5d2f('0xe'),_0x443779,_0x58e637['error'][_0x5d2f('0x14')]);return _0x1c8c59(_0x58e637[_0x5d2f('0x12')][_0x5d2f('0x14')]);}else{logger['info'](_0x5d2f('0xe'),_0x443779,_0x5d2f('0x11'));_0x1c8c59(_0x58e637[_0x5d2f('0x15')][_0x5d2f('0x14')]);}})[_0x5d2f('0x16')](function(_0x5796f6){logger[_0x5d2f('0x12')](_0x5d2f('0xe'),_0x443779,_0x5796f6);_0x1670ea(_0x5796f6);});});}exports[_0x5d2f('0x17')]=function(_0x454782){var _0x5a79f1=this;return new Promise(function(_0x27e16d,_0x38a958){return db[_0x5d2f('0x18')][_0x5d2f('0x19')](_0x454782[_0x5d2f('0x1a')],{'raw':_0x454782[_0x5d2f('0x1b')]?_0x454782[_0x5d2f('0x1b')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x4d3959){logger[_0x5d2f('0xd')](_0x5d2f('0x17'),_0x454782);logger[_0x5d2f('0xf')](_0x5d2f('0x17'),_0x454782,JSON[_0x5d2f('0x1c')](_0x4d3959));_0x27e16d(_0x4d3959);})['catch'](function(_0x5cc8d6){logger[_0x5d2f('0x12')]('CreateSquareMessage',_0x5cc8d6[_0x5d2f('0x14')],_0x454782);_0x38a958(_0x5a79f1[_0x5d2f('0x12')](0x1f4,_0x5cc8d6[_0x5d2f('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/squareOdbc/index.js b/server/api/squareOdbc/index.js
index 7ea8fc8..1bee783 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 _0xba31=['create','update','delete','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/test','15s','post'];(function(_0x3bbba7,_0x4481af){var _0x228f12=function(_0xbe5fad){while(--_0xbe5fad){_0x3bbba7['push'](_0x3bbba7['shift']());}};_0x228f12(++_0x4481af);}(_0xba31,0x7b));var _0x1ba3=function(_0x4d08b8,_0x34c445){_0x4d08b8=_0x4d08b8-0x0;var _0x70214a=_0xba31[_0x4d08b8];return _0x70214a;};'use strict';var multer=require(_0x1ba3('0x0'));var util=require(_0x1ba3('0x1'));var path=require(_0x1ba3('0x2'));var timeout=require(_0x1ba3('0x3'));var express=require(_0x1ba3('0x4'));var router=express[_0x1ba3('0x5')]();var auth=require(_0x1ba3('0x6'));var interaction=require(_0x1ba3('0x7'));var config=require(_0x1ba3('0x8'));var controller=require('./squareOdbc.controller');router[_0x1ba3('0x9')]('/',auth[_0x1ba3('0xa')](),controller[_0x1ba3('0xb')]);router[_0x1ba3('0x9')](_0x1ba3('0xc'),auth[_0x1ba3('0xa')](),controller[_0x1ba3('0xd')]);router['get'](_0x1ba3('0xe'),auth[_0x1ba3('0xa')](),timeout(_0x1ba3('0xf')),controller['test']);router[_0x1ba3('0x10')]('/',auth[_0x1ba3('0xa')](),controller[_0x1ba3('0x11')]);router['put']('/:id',auth[_0x1ba3('0xa')](),controller[_0x1ba3('0x12')]);router[_0x1ba3('0x13')](_0x1ba3('0xc'),auth[_0x1ba3('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xc8de=['path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareOdbc.controller','get','isAuthenticated','test','post','create','put','/:id','update','delete','destroy','exports','util'];(function(_0x5a6d7c,_0x5c1817){var _0x5260ce=function(_0x31ba4e){while(--_0x31ba4e){_0x5a6d7c['push'](_0x5a6d7c['shift']());}};_0x5260ce(++_0x5c1817);}(_0xc8de,0x167));var _0xec8d=function(_0x2f9482,_0xa0a254){_0x2f9482=_0x2f9482-0x0;var _0x584e47=_0xc8de[_0x2f9482];return _0x584e47;};'use strict';var multer=require('multer');var util=require(_0xec8d('0x0'));var path=require(_0xec8d('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xec8d('0x2')]();var auth=require(_0xec8d('0x3'));var interaction=require(_0xec8d('0x4'));var config=require(_0xec8d('0x5'));var controller=require(_0xec8d('0x6'));router[_0xec8d('0x7')]('/',auth[_0xec8d('0x8')](),controller['index']);router[_0xec8d('0x7')]('/:id',auth[_0xec8d('0x8')](),controller['show']);router[_0xec8d('0x7')]('/:id/test',auth[_0xec8d('0x8')](),timeout('15s'),controller[_0xec8d('0x9')]);router[_0xec8d('0xa')]('/',auth[_0xec8d('0x8')](),controller[_0xec8d('0xb')]);router[_0xec8d('0xc')](_0xec8d('0xd'),auth[_0xec8d('0x8')](),controller[_0xec8d('0xe')]);router[_0xec8d('0xf')](_0xec8d('0xd'),auth['isAuthenticated'](),controller[_0xec8d('0x10')]);module[_0xec8d('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/squareOdbc/squareOdbc.attributes.js b/server/api/squareOdbc/squareOdbc.attributes.js
index a66a4e6..95856dd 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 _0xe9d4=['sequelize','exports','STRING','name'];(function(_0x1b0bb1,_0x5a0540){var _0x11c001=function(_0x2df49f){while(--_0x2df49f){_0x1b0bb1['push'](_0x1b0bb1['shift']());}};_0x11c001(++_0x5a0540);}(_0xe9d4,0x74));var _0x4e9d=function(_0x3d93c6,_0x5b9eaa){_0x3d93c6=_0x3d93c6-0x0;var _0x4c31a6=_0xe9d4[_0x3d93c6];return _0x4c31a6;};'use strict';var Sequelize=require(_0x4e9d('0x0'));module[_0x4e9d('0x1')]={'name':{'type':Sequelize[_0x4e9d('0x2')],'unique':_0x4e9d('0x3'),'allowNull':![]},'dsn':{'type':Sequelize[_0x4e9d('0x2')]},'description':{'type':Sequelize[_0x4e9d('0x2')]}};
\ No newline at end of file
+var _0x0d21=['exports','STRING','name','sequelize'];(function(_0x5bd426,_0x4878e5){var _0x23a7eb=function(_0x594b42){while(--_0x594b42){_0x5bd426['push'](_0x5bd426['shift']());}};_0x23a7eb(++_0x4878e5);}(_0x0d21,0xc3));var _0x10d2=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0x0d21[_0x433a86];return _0x23000c;};'use strict';var Sequelize=require(_0x10d2('0x0'));module[_0x10d2('0x1')]={'name':{'type':Sequelize[_0x10d2('0x2')],'unique':_0x10d2('0x3'),'allowNull':![]},'dsn':{'type':Sequelize[_0x10d2('0x2')]},'description':{'type':Sequelize[_0x10d2('0x2')]}};
\ No newline at end of file
diff --git a/server/api/squareOdbc/squareOdbc.controller.js b/server/api/squareOdbc/squareOdbc.controller.js
index 74c8d91..4ec062a 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 _0x11fa=['to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','reject','then','destroy','get','ODBC','UserProfileResource','error','name','send','map','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','filter','VIRTUAL','merge','options','SquareOdbc','include','findAll','catch','show','params','create','role','find','userProfileId','autoAssociation','update','body','dsn','odbc','rimraf','bluebird','util','sox'];(function(_0x9df060,_0x253d33){var _0x338dfe=function(_0x17d9a5){while(--_0x17d9a5){_0x9df060['push'](_0x9df060['shift']());}};_0x338dfe(++_0x253d33);}(_0x11fa,0x164));var _0xa11f=function(_0x5cb1af,_0x4bdc8c){_0x5cb1af=_0x5cb1af-0x0;var _0x8d7940=_0x11fa[_0x5cb1af];return _0x8d7940;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xa11f('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xa11f('0x1'));var Mustache=require('mustache');var util=require(_0xa11f('0x2'));var path=require('path');var sox=require(_0xa11f('0x3'));var csv=require(_0xa11f('0x4'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xa11f('0x5'));var squel=require(_0xa11f('0x6'));var crypto=require(_0xa11f('0x7'));var jsforce=require(_0xa11f('0x8'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xa11f('0x9'));var Papa=require(_0xa11f('0xa'));var Redis=require('ioredis');var authService=require(_0xa11f('0xb'));var qs=require(_0xa11f('0xc'));var as=require(_0xa11f('0xd'));var hardwareService=require(_0xa11f('0xe'));var logger=require('../../config/logger')(_0xa11f('0xf'));var utils=require('../../config/utils');var config=require(_0xa11f('0x10'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4d0db2,_0x1a3c84){_0x1a3c84=_0x1a3c84||0xcc;return function(_0xbe4b5c){if(_0xbe4b5c){return _0x4d0db2[_0xa11f('0x11')](_0x1a3c84);}return _0x4d0db2[_0xa11f('0x12')](_0x1a3c84)[_0xa11f('0x13')]();};}function respondWithResult(_0x483baa,_0x1ab614){_0x1ab614=_0x1ab614||0xc8;return function(_0x51d94c){if(_0x51d94c){return _0x483baa[_0xa11f('0x12')](_0x1ab614)['json'](_0x51d94c);}};}function respondWithFilteredResult(_0x5512d4,_0x44427e){return function(_0x1f7680){if(_0x1f7680){var _0x20c4e3=_0x1f7680[_0xa11f('0x14')],_0x1792d6=_0x44427e[_0xa11f('0x15')],_0x5e314f=_0x44427e[_0xa11f('0x15')]+_0x44427e[_0xa11f('0x16')],_0x29c431;if(_0x5e314f>=_0x20c4e3){_0x5e314f=_0x20c4e3;_0x29c431=0xc8;}else{_0x29c431=0xce;}_0x5512d4['status'](_0x29c431);return _0x5512d4[_0xa11f('0x17')](_0xa11f('0x18'),_0x1792d6+'-'+_0x5e314f+'/'+_0x20c4e3)[_0xa11f('0x19')](_0x1f7680);}return null;};}function patchUpdates(_0x3412b5){return function(_0x385b0b){try{jsonpatch[_0xa11f('0x1a')](_0x385b0b,_0x3412b5,!![]);}catch(_0x5606bb){return BPromise[_0xa11f('0x1b')](_0x5606bb);}return _0x385b0b['save']();};}function saveUpdates(_0x213e6b,_0x3be81d){return function(_0xfe45c6){if(_0xfe45c6){return _0xfe45c6['update'](_0x213e6b)[_0xa11f('0x1c')](function(_0x4b9873){return _0x4b9873;});}return null;};}function removeEntity(_0x491cb7,_0x50f566){return function(_0x5f5dcd){if(_0x5f5dcd){return _0x5f5dcd[_0xa11f('0x1d')]()[_0xa11f('0x1c')](function(){var _0x1392b8=_0x5f5dcd[_0xa11f('0x1e')]({'plain':!![]});var _0x9db8c5=_0xa11f('0x1f');return db[_0xa11f('0x20')][_0xa11f('0x1d')]({'where':{'type':_0x9db8c5,'resourceId':_0x1392b8['id']}})['then'](function(){return _0x5f5dcd;});})[_0xa11f('0x1c')](function(){_0x491cb7[_0xa11f('0x12')](0xcc)[_0xa11f('0x13')]();});}};}function handleEntityNotFound(_0x37c9e0,_0x25b4b0){return function(_0x2e3c39){if(!_0x2e3c39){_0x37c9e0['sendStatus'](0x194);}return _0x2e3c39;};}function handleError(_0x24bb7a,_0xe2b735){_0xe2b735=_0xe2b735||0x1f4;return function(_0x5ec817){logger[_0xa11f('0x21')](_0x5ec817['stack']);if(_0x5ec817[_0xa11f('0x22')]){delete _0x5ec817[_0xa11f('0x22')];}_0x24bb7a[_0xa11f('0x12')](_0xe2b735)[_0xa11f('0x23')](_0x5ec817);};}exports['index']=function(_0x4837c5,_0x18be99){var _0x156bfe={},_0x473a56={},_0x238702={'count':0x0,'rows':[]};var _0x243a6f=_[_0xa11f('0x24')](db['SquareOdbc'][_0xa11f('0x25')],function(_0x55f57b){return{'name':_0x55f57b[_0xa11f('0x26')],'type':_0x55f57b[_0xa11f('0x27')][_0xa11f('0x28')]};});_0x473a56[_0xa11f('0x29')]=_[_0xa11f('0x24')](_0x243a6f,'name');_0x473a56['query']=_[_0xa11f('0x2a')](_0x4837c5[_0xa11f('0x2b')]);_0x473a56['filters']=_[_0xa11f('0x2c')](_0x473a56[_0xa11f('0x29')],_0x473a56['query']);_0x156bfe[_0xa11f('0x2d')]=_[_0xa11f('0x2c')](_0x473a56[_0xa11f('0x29')],qs[_0xa11f('0x2e')](_0x4837c5[_0xa11f('0x2b')][_0xa11f('0x2e')]));_0x156bfe[_0xa11f('0x2d')]=_0x156bfe['attributes'][_0xa11f('0x2f')]?_0x156bfe[_0xa11f('0x2d')]:_0x473a56[_0xa11f('0x29')];if(!_0x4837c5[_0xa11f('0x2b')][_0xa11f('0x30')](_0xa11f('0x31'))){_0x156bfe[_0xa11f('0x16')]=qs[_0xa11f('0x16')](_0x4837c5[_0xa11f('0x2b')][_0xa11f('0x16')]);_0x156bfe[_0xa11f('0x15')]=qs[_0xa11f('0x15')](_0x4837c5['query'][_0xa11f('0x15')]);}_0x156bfe['order']=qs[_0xa11f('0x32')](_0x4837c5[_0xa11f('0x2b')][_0xa11f('0x32')]);_0x156bfe[_0xa11f('0x33')]=qs['filters'](_['pick'](_0x4837c5[_0xa11f('0x2b')],_0x473a56[_0xa11f('0x34')]));if(_0x4837c5[_0xa11f('0x2b')][_0xa11f('0x35')]){_0x156bfe[_0xa11f('0x33')]=_['merge'](_0x156bfe['where'],{'$or':_['map'](_0x243a6f,function(_0x507d31){if(_0x507d31[_0xa11f('0x27')]!==_0xa11f('0x36')){var _0x4859c4={};_0x4859c4[_0x507d31['name']]={'$like':'%'+_0x4837c5[_0xa11f('0x2b')][_0xa11f('0x35')]+'%'};return _0x4859c4;}})});}_0x156bfe=_[_0xa11f('0x37')]({},_0x156bfe,_0x4837c5[_0xa11f('0x38')]);var _0x35dad6={'where':_0x156bfe[_0xa11f('0x33')]};return db[_0xa11f('0x39')]['count'](_0x35dad6)[_0xa11f('0x1c')](function(_0x3fb479){_0x238702[_0xa11f('0x14')]=_0x3fb479;if(_0x4837c5[_0xa11f('0x2b')]['includeAll']){_0x156bfe[_0xa11f('0x3a')]=[{'all':!![]}];}return db[_0xa11f('0x39')][_0xa11f('0x3b')](_0x156bfe);})[_0xa11f('0x1c')](function(_0xe8b273){_0x238702['rows']=_0xe8b273;return _0x238702;})['then'](respondWithFilteredResult(_0x18be99,_0x156bfe))[_0xa11f('0x3c')](handleError(_0x18be99,null));};exports[_0xa11f('0x3d')]=function(_0x408adc,_0x4f3af8){var _0x289adc={'raw':!![],'where':{'id':_0x408adc[_0xa11f('0x3e')]['id']}},_0x354630={};_0x354630[_0xa11f('0x29')]=_['keys'](db[_0xa11f('0x39')][_0xa11f('0x25')]);_0x354630[_0xa11f('0x2b')]=_[_0xa11f('0x2a')](_0x408adc[_0xa11f('0x2b')]);_0x354630[_0xa11f('0x34')]=_[_0xa11f('0x2c')](_0x354630['model'],_0x354630[_0xa11f('0x2b')]);_0x289adc[_0xa11f('0x2d')]=_[_0xa11f('0x2c')](_0x354630[_0xa11f('0x29')],qs[_0xa11f('0x2e')](_0x408adc[_0xa11f('0x2b')][_0xa11f('0x2e')]));_0x289adc[_0xa11f('0x2d')]=_0x289adc[_0xa11f('0x2d')][_0xa11f('0x2f')]?_0x289adc[_0xa11f('0x2d')]:_0x354630[_0xa11f('0x29')];if(_0x408adc['query']['includeAll']){_0x289adc[_0xa11f('0x3a')]=[{'all':!![]}];}_0x289adc=_[_0xa11f('0x37')]({},_0x289adc,_0x408adc['options']);return db[_0xa11f('0x39')]['find'](_0x289adc)[_0xa11f('0x1c')](handleEntityNotFound(_0x4f3af8,null))['then'](respondWithResult(_0x4f3af8,null))[_0xa11f('0x3c')](handleError(_0x4f3af8,null));};exports[_0xa11f('0x3f')]=function(_0x33aba6,_0x2770a7){return db[_0xa11f('0x39')][_0xa11f('0x3f')](_0x33aba6['body'],{})['then'](function(_0x6369bd){var _0x559229=_0x33aba6['user'][_0xa11f('0x1e')]({'plain':!![]});if(!_0x559229)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x559229[_0xa11f('0x40')]==='user'){var _0x5c4787=_0x6369bd[_0xa11f('0x1e')]({'plain':!![]});var _0x16e5fc=_0xa11f('0x1f');return db['UserProfileSection'][_0xa11f('0x41')]({'where':{'name':_0x16e5fc,'userProfileId':_0x559229[_0xa11f('0x42')]},'raw':!![]})['then'](function(_0x34afb6){if(_0x34afb6&&_0x34afb6[_0xa11f('0x43')]===0x0){return db[_0xa11f('0x20')][_0xa11f('0x3f')]({'name':_0x5c4787[_0xa11f('0x22')],'resourceId':_0x5c4787['id'],'type':_0x34afb6[_0xa11f('0x22')],'sectionId':_0x34afb6['id']},{})[_0xa11f('0x1c')](function(){return _0x6369bd;});}else{return _0x6369bd;}})[_0xa11f('0x3c')](function(_0x4ce234){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4ce234);throw _0x4ce234;});}return _0x6369bd;})[_0xa11f('0x1c')](respondWithResult(_0x2770a7,0xc9))[_0xa11f('0x3c')](handleError(_0x2770a7,null));};exports[_0xa11f('0x44')]=function(_0x459754,_0x34fc85){if(_0x459754['body']['id']){delete _0x459754[_0xa11f('0x45')]['id'];}return db[_0xa11f('0x39')][_0xa11f('0x41')]({'where':{'id':_0x459754[_0xa11f('0x3e')]['id']}})[_0xa11f('0x1c')](handleEntityNotFound(_0x34fc85,null))[_0xa11f('0x1c')](saveUpdates(_0x459754[_0xa11f('0x45')],null))[_0xa11f('0x1c')](respondWithResult(_0x34fc85,null))[_0xa11f('0x3c')](handleError(_0x34fc85,null));};exports[_0xa11f('0x1d')]=function(_0x4b01f4,_0x11a845){return db[_0xa11f('0x39')][_0xa11f('0x41')]({'where':{'id':_0x4b01f4['params']['id']}})[_0xa11f('0x1c')](handleEntityNotFound(_0x11a845,null))[_0xa11f('0x1c')](removeEntity(_0x11a845,null))[_0xa11f('0x3c')](handleError(_0x11a845,null));};exports['test']=function(_0x41d5bc,_0x16aadc,_0x4b0e16){var _0x41e0b0;return db[_0xa11f('0x39')]['find']({'where':{'id':_0x41d5bc[_0xa11f('0x3e')]['id']},'attributes':['id',_0xa11f('0x46')]})[_0xa11f('0x1c')](handleEntityNotFound(_0x16aadc,null))[_0xa11f('0x1c')](function(_0x180ecf){if(_0x180ecf){var _0x174be1=require(_0xa11f('0x47'))();_0x174be1['openSync'](_0x180ecf[_0xa11f('0x46')]);_0x174be1['closeSync']();return _0x180ecf;}})[_0xa11f('0x1c')](respondWithResult(_0x16aadc,null))['catch'](handleError(_0x16aadc,null));};
\ No newline at end of file
+var _0x8e6f=['SquareOdbc','rawAttributes','fieldName','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','show','params','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','test','dsn','odbc','closeSync','html-pdf','eml-format','rimraf','bluebird','mustache','util','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','apply','reject','then','destroy','get','ODBC','UserProfileResource','error','name','send','index'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x8e6f,0xcd));var _0xf8e6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8e6f[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0xf8e6('0x0'));var emlformat=require(_0xf8e6('0x1'));var rimraf=require(_0xf8e6('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xf8e6('0x3'));var Mustache=require(_0xf8e6('0x4'));var util=require(_0xf8e6('0x5'));var path=require('path');var sox=require(_0xf8e6('0x6'));var csv=require(_0xf8e6('0x7'));var ejs=require(_0xf8e6('0x8'));var fs=require('fs');var _=require(_0xf8e6('0x9'));var squel=require('squel');var crypto=require(_0xf8e6('0xa'));var jsforce=require(_0xf8e6('0xb'));var deskjs=require(_0xf8e6('0xc'));var toCsv=require(_0xf8e6('0x7'));var querystring=require(_0xf8e6('0xd'));var Papa=require(_0xf8e6('0xe'));var Redis=require(_0xf8e6('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xf8e6('0x10'));var as=require(_0xf8e6('0x11'));var hardwareService=require(_0xf8e6('0x12'));var logger=require(_0xf8e6('0x13'))('api');var utils=require(_0xf8e6('0x14'));var config=require(_0xf8e6('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x56593d,_0x22115b){_0x22115b=_0x22115b||0xcc;return function(_0x2f1262){if(_0x2f1262){return _0x56593d[_0xf8e6('0x16')](_0x22115b);}return _0x56593d[_0xf8e6('0x17')](_0x22115b)[_0xf8e6('0x18')]();};}function respondWithResult(_0x4fe6da,_0x2f2d19){_0x2f2d19=_0x2f2d19||0xc8;return function(_0x3e47de){if(_0x3e47de){return _0x4fe6da[_0xf8e6('0x17')](_0x2f2d19)[_0xf8e6('0x19')](_0x3e47de);}};}function respondWithFilteredResult(_0x4667c5,_0x5d33ae){return function(_0xc9cbb3){if(_0xc9cbb3){var _0x450b4e=_0xc9cbb3[_0xf8e6('0x1a')],_0x214266=_0x5d33ae['offset'],_0x14afb9=_0x5d33ae[_0xf8e6('0x1b')]+_0x5d33ae[_0xf8e6('0x1c')],_0x4648c2;if(_0x14afb9>=_0x450b4e){_0x14afb9=_0x450b4e;_0x4648c2=0xc8;}else{_0x4648c2=0xce;}_0x4667c5[_0xf8e6('0x17')](_0x4648c2);return _0x4667c5[_0xf8e6('0x1d')]('Content-Range',_0x214266+'-'+_0x14afb9+'/'+_0x450b4e)['json'](_0xc9cbb3);}return null;};}function patchUpdates(_0x1709b4){return function(_0x32d1c5){try{jsonpatch[_0xf8e6('0x1e')](_0x32d1c5,_0x1709b4,!![]);}catch(_0x131b6d){return BPromise[_0xf8e6('0x1f')](_0x131b6d);}return _0x32d1c5['save']();};}function saveUpdates(_0x5be989,_0x5907fd){return function(_0x406b6a){if(_0x406b6a){return _0x406b6a['update'](_0x5be989)[_0xf8e6('0x20')](function(_0x15a6fa){return _0x15a6fa;});}return null;};}function removeEntity(_0x3c675b,_0x4ee424){return function(_0x22664f){if(_0x22664f){return _0x22664f[_0xf8e6('0x21')]()['then'](function(){var _0x573ee7=_0x22664f[_0xf8e6('0x22')]({'plain':!![]});var _0x3408c3=_0xf8e6('0x23');return db[_0xf8e6('0x24')][_0xf8e6('0x21')]({'where':{'type':_0x3408c3,'resourceId':_0x573ee7['id']}})[_0xf8e6('0x20')](function(){return _0x22664f;});})[_0xf8e6('0x20')](function(){_0x3c675b[_0xf8e6('0x17')](0xcc)[_0xf8e6('0x18')]();});}};}function handleEntityNotFound(_0x4462bc,_0x15c726){return function(_0x56e666){if(!_0x56e666){_0x4462bc[_0xf8e6('0x16')](0x194);}return _0x56e666;};}function handleError(_0x777ca3,_0x22483c){_0x22483c=_0x22483c||0x1f4;return function(_0x3d76a3){logger[_0xf8e6('0x25')](_0x3d76a3['stack']);if(_0x3d76a3[_0xf8e6('0x26')]){delete _0x3d76a3[_0xf8e6('0x26')];}_0x777ca3[_0xf8e6('0x17')](_0x22483c)[_0xf8e6('0x27')](_0x3d76a3);};}exports[_0xf8e6('0x28')]=function(_0x3cf64d,_0x184df4){var _0x4ae2e0={},_0x2552ec={},_0xc57b7e={'count':0x0,'rows':[]};var _0x742777=_['map'](db[_0xf8e6('0x29')][_0xf8e6('0x2a')],function(_0x1d1524){return{'name':_0x1d1524[_0xf8e6('0x2b')],'type':_0x1d1524['type']['key']};});_0x2552ec[_0xf8e6('0x2c')]=_[_0xf8e6('0x2d')](_0x742777,'name');_0x2552ec[_0xf8e6('0x2e')]=_[_0xf8e6('0x2f')](_0x3cf64d[_0xf8e6('0x2e')]);_0x2552ec[_0xf8e6('0x30')]=_[_0xf8e6('0x31')](_0x2552ec[_0xf8e6('0x2c')],_0x2552ec['query']);_0x4ae2e0[_0xf8e6('0x32')]=_[_0xf8e6('0x31')](_0x2552ec[_0xf8e6('0x2c')],qs[_0xf8e6('0x33')](_0x3cf64d[_0xf8e6('0x2e')][_0xf8e6('0x33')]));_0x4ae2e0[_0xf8e6('0x32')]=_0x4ae2e0[_0xf8e6('0x32')][_0xf8e6('0x34')]?_0x4ae2e0['attributes']:_0x2552ec[_0xf8e6('0x2c')];if(!_0x3cf64d[_0xf8e6('0x2e')][_0xf8e6('0x35')](_0xf8e6('0x36'))){_0x4ae2e0['limit']=qs[_0xf8e6('0x1c')](_0x3cf64d[_0xf8e6('0x2e')][_0xf8e6('0x1c')]);_0x4ae2e0[_0xf8e6('0x1b')]=qs[_0xf8e6('0x1b')](_0x3cf64d['query'][_0xf8e6('0x1b')]);}_0x4ae2e0['order']=qs[_0xf8e6('0x37')](_0x3cf64d['query']['sort']);_0x4ae2e0[_0xf8e6('0x38')]=qs['filters'](_[_0xf8e6('0x39')](_0x3cf64d[_0xf8e6('0x2e')],_0x2552ec[_0xf8e6('0x30')]));if(_0x3cf64d[_0xf8e6('0x2e')][_0xf8e6('0x3a')]){_0x4ae2e0[_0xf8e6('0x38')]=_['merge'](_0x4ae2e0[_0xf8e6('0x38')],{'$or':_[_0xf8e6('0x2d')](_0x742777,function(_0x53566c){if(_0x53566c['type']!==_0xf8e6('0x3b')){var _0x29b906={};_0x29b906[_0x53566c[_0xf8e6('0x26')]]={'$like':'%'+_0x3cf64d[_0xf8e6('0x2e')][_0xf8e6('0x3a')]+'%'};return _0x29b906;}})});}_0x4ae2e0=_[_0xf8e6('0x3c')]({},_0x4ae2e0,_0x3cf64d[_0xf8e6('0x3d')]);var _0x48f058={'where':_0x4ae2e0[_0xf8e6('0x38')]};return db[_0xf8e6('0x29')][_0xf8e6('0x1a')](_0x48f058)[_0xf8e6('0x20')](function(_0x16c7c3){_0xc57b7e[_0xf8e6('0x1a')]=_0x16c7c3;if(_0x3cf64d['query'][_0xf8e6('0x3e')]){_0x4ae2e0[_0xf8e6('0x3f')]=[{'all':!![]}];}return db['SquareOdbc'][_0xf8e6('0x40')](_0x4ae2e0);})[_0xf8e6('0x20')](function(_0xf08a39){_0xc57b7e[_0xf8e6('0x41')]=_0xf08a39;return _0xc57b7e;})[_0xf8e6('0x20')](respondWithFilteredResult(_0x184df4,_0x4ae2e0))['catch'](handleError(_0x184df4,null));};exports[_0xf8e6('0x42')]=function(_0x1139fd,_0x5c824b){var _0x40c6ce={'raw':!![],'where':{'id':_0x1139fd[_0xf8e6('0x43')]['id']}},_0x26e40e={};_0x26e40e[_0xf8e6('0x2c')]=_[_0xf8e6('0x2f')](db[_0xf8e6('0x29')][_0xf8e6('0x2a')]);_0x26e40e[_0xf8e6('0x2e')]=_['keys'](_0x1139fd[_0xf8e6('0x2e')]);_0x26e40e[_0xf8e6('0x30')]=_['intersection'](_0x26e40e[_0xf8e6('0x2c')],_0x26e40e[_0xf8e6('0x2e')]);_0x40c6ce[_0xf8e6('0x32')]=_['intersection'](_0x26e40e['model'],qs[_0xf8e6('0x33')](_0x1139fd[_0xf8e6('0x2e')][_0xf8e6('0x33')]));_0x40c6ce[_0xf8e6('0x32')]=_0x40c6ce[_0xf8e6('0x32')]['length']?_0x40c6ce[_0xf8e6('0x32')]:_0x26e40e[_0xf8e6('0x2c')];if(_0x1139fd['query'][_0xf8e6('0x3e')]){_0x40c6ce[_0xf8e6('0x3f')]=[{'all':!![]}];}_0x40c6ce=_[_0xf8e6('0x3c')]({},_0x40c6ce,_0x1139fd['options']);return db[_0xf8e6('0x29')][_0xf8e6('0x44')](_0x40c6ce)[_0xf8e6('0x20')](handleEntityNotFound(_0x5c824b,null))[_0xf8e6('0x20')](respondWithResult(_0x5c824b,null))[_0xf8e6('0x45')](handleError(_0x5c824b,null));};exports[_0xf8e6('0x46')]=function(_0xd2884e,_0x44b484){return db[_0xf8e6('0x29')][_0xf8e6('0x46')](_0xd2884e[_0xf8e6('0x47')],{})[_0xf8e6('0x20')](function(_0x457293){var _0x30d2f0=_0xd2884e[_0xf8e6('0x48')]['get']({'plain':!![]});if(!_0x30d2f0)throw new Error(_0xf8e6('0x49'));if(_0x30d2f0['role']===_0xf8e6('0x48')){var _0x416cc9=_0x457293['get']({'plain':!![]});var _0x235cb8=_0xf8e6('0x23');return db[_0xf8e6('0x4a')][_0xf8e6('0x44')]({'where':{'name':_0x235cb8,'userProfileId':_0x30d2f0[_0xf8e6('0x4b')]},'raw':!![]})[_0xf8e6('0x20')](function(_0x428db1){if(_0x428db1&&_0x428db1['autoAssociation']===0x0){return db[_0xf8e6('0x24')][_0xf8e6('0x46')]({'name':_0x416cc9[_0xf8e6('0x26')],'resourceId':_0x416cc9['id'],'type':_0x428db1['name'],'sectionId':_0x428db1['id']},{})[_0xf8e6('0x20')](function(){return _0x457293;});}else{return _0x457293;}})[_0xf8e6('0x45')](function(_0x33ceac){logger['error'](_0xf8e6('0x4c'),_0x33ceac);throw _0x33ceac;});}return _0x457293;})[_0xf8e6('0x20')](respondWithResult(_0x44b484,0xc9))[_0xf8e6('0x45')](handleError(_0x44b484,null));};exports[_0xf8e6('0x4d')]=function(_0x5dff04,_0x34f143){if(_0x5dff04[_0xf8e6('0x47')]['id']){delete _0x5dff04[_0xf8e6('0x47')]['id'];}return db['SquareOdbc']['find']({'where':{'id':_0x5dff04['params']['id']}})[_0xf8e6('0x20')](handleEntityNotFound(_0x34f143,null))[_0xf8e6('0x20')](saveUpdates(_0x5dff04[_0xf8e6('0x47')],null))[_0xf8e6('0x20')](respondWithResult(_0x34f143,null))['catch'](handleError(_0x34f143,null));};exports['destroy']=function(_0x253ba1,_0x2c51a0){return db['SquareOdbc']['find']({'where':{'id':_0x253ba1[_0xf8e6('0x43')]['id']}})[_0xf8e6('0x20')](handleEntityNotFound(_0x2c51a0,null))[_0xf8e6('0x20')](removeEntity(_0x2c51a0,null))[_0xf8e6('0x45')](handleError(_0x2c51a0,null));};exports[_0xf8e6('0x4e')]=function(_0x34fedf,_0x48469b,_0x54a3f6){var _0x4e6d9b;return db[_0xf8e6('0x29')][_0xf8e6('0x44')]({'where':{'id':_0x34fedf[_0xf8e6('0x43')]['id']},'attributes':['id',_0xf8e6('0x4f')]})['then'](handleEntityNotFound(_0x48469b,null))[_0xf8e6('0x20')](function(_0x57378a){if(_0x57378a){var _0x2bc1cb=require(_0xf8e6('0x50'))();_0x2bc1cb['openSync'](_0x57378a[_0xf8e6('0x4f')]);_0x2bc1cb[_0xf8e6('0x51')]();return _0x57378a;}})[_0xf8e6('0x20')](respondWithResult(_0x48469b,null))[_0xf8e6('0x45')](handleError(_0x48469b,null));};
\ No newline at end of file
diff --git a/server/api/squareOdbc/squareOdbc.model.js b/server/api/squareOdbc/squareOdbc.model.js
index cdf6e7f..7f837c9 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 _0xf6bc=['exports','SquareOdbc','square_odbc','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./squareOdbc.attributes'];(function(_0xd17fc4,_0x3dcb32){var _0x5584=function(_0x18c582){while(--_0x18c582){_0xd17fc4['push'](_0xd17fc4['shift']());}};_0x5584(++_0x3dcb32);}(_0xf6bc,0xfd));var _0xcf6b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf6bc[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xcf6b('0x0'))('api');var moment=require(_0xcf6b('0x1'));var BPromise=require(_0xcf6b('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xcf6b('0x3'));var rimraf=require(_0xcf6b('0x4'));var config=require(_0xcf6b('0x5'));var attributes=require(_0xcf6b('0x6'));module[_0xcf6b('0x7')]=function(_0x4d3edf,_0x18b368){return _0x4d3edf['define'](_0xcf6b('0x8'),attributes,{'tableName':_0xcf6b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6af5=['define','SquareOdbc','square_odbc','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./squareOdbc.attributes','exports'];(function(_0x38f5c6,_0x57cf85){var _0xa54f1d=function(_0x46e9f3){while(--_0x46e9f3){_0x38f5c6['push'](_0x38f5c6['shift']());}};_0xa54f1d(++_0x57cf85);}(_0x6af5,0x7b));var _0x56af=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x6af5[_0x4a9fb1];return _0x348672;};'use strict';var _=require('lodash');var util=require(_0x56af('0x0'));var logger=require(_0x56af('0x1'))('api');var moment=require('moment');var BPromise=require(_0x56af('0x2'));var rp=require(_0x56af('0x3'));var fs=require('fs');var path=require(_0x56af('0x4'));var rimraf=require(_0x56af('0x5'));var config=require(_0x56af('0x6'));var attributes=require(_0x56af('0x7'));module[_0x56af('0x8')]=function(_0x432f9d,_0x19528b){return _0x432f9d[_0x56af('0x9')](_0x56af('0xa'),attributes,{'tableName':_0x56af('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 9fb729d..175c2d8 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 _0x5fc3=['info','request\x20sent','debug','stringify','error','code','message','SquareOdbc,\x20%s,\x20%s','result','catch','ShowSquareOdbc','find','options','where','attributes','include','map','model','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','request','then'];(function(_0x2beeb9,_0x415c85){var _0x3f7f25=function(_0x1890d1){while(--_0x1890d1){_0x2beeb9['push'](_0x2beeb9['shift']());}};_0x3f7f25(++_0x415c85);}(_0x5fc3,0xa8));var _0x35fc=function(_0x3a7634,_0x2db384){_0x3a7634=_0x3a7634-0x0;var _0x23bbe9=_0x5fc3[_0x3a7634];return _0x23bbe9;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('SquareOdbc,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('SquareOdbc,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('SquareOdbc,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});}exports[_0x35fc('0x16')]=function(_0x553677){var _0x41e165=this;return new Promise(function(_0x363e47,_0x2e513b){return db['SquareOdbc'][_0x35fc('0x17')]({'raw':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')][_0x35fc('0x19')]||null:null,'attributes':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')][_0x35fc('0x1a')]||null:null,'include':_0x553677[_0x35fc('0x18')]?_0x553677[_0x35fc('0x18')][_0x35fc('0x1b')]?_[_0x35fc('0x1c')](_0x553677['options'][_0x35fc('0x1b')],function(_0xd5399f){return{'model':db[_0xd5399f[_0x35fc('0x1d')]],'as':_0xd5399f['as'],'attributes':_0xd5399f[_0x35fc('0x1a')],'include':_0xd5399f[_0x35fc('0x1b')]?_['map'](_0xd5399f[_0x35fc('0x1b')],function(_0x4c587a){return{'model':db[_0x4c587a['model']],'as':_0x4c587a['as'],'attributes':_0x4c587a[_0x35fc('0x1a')],'include':_0x4c587a[_0x35fc('0x1b')]?_[_0x35fc('0x1c')](_0x4c587a['include'],function(_0x4086e9){return{'model':db[_0x4086e9['model']],'as':_0x4086e9['as'],'attributes':_0x4086e9[_0x35fc('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x35fc('0xb')](function(_0x5cb986){logger['info'](_0x35fc('0x16'),_0x553677);logger['debug'](_0x35fc('0x16'),_0x553677,JSON[_0x35fc('0xf')](_0x5cb986));_0x363e47(_0x5cb986);})['catch'](function(_0x26b7cb){logger[_0x35fc('0x10')](_0x35fc('0x16'),_0x26b7cb[_0x35fc('0x12')],_0x553677);_0x2e513b(_0x41e165[_0x35fc('0x10')](0x1f4,_0x26b7cb[_0x35fc('0x12')]));});});};
\ No newline at end of file
+var _0x9957=['stringify','error','code','message','result','catch','ShowSquareOdbc','find','raw','options','where','attributes','include','map','model','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','SquareOdbc,\x20%s,\x20%s','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s'];(function(_0x1d8a3f,_0xba8ea1){var _0x481362=function(_0x4b39d1){while(--_0x4b39d1){_0x1d8a3f['push'](_0x1d8a3f['shift']());}};_0x481362(++_0xba8ea1);}(_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']('SquareOdbc,\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);});});}exports[_0x7995('0x18')]=function(_0x291317){var _0x1e1415=this;return new Promise(function(_0x37a7d4,_0x4faa60){return db['SquareOdbc'][_0x7995('0x19')]({'raw':_0x291317['options']?_0x291317['options'][_0x7995('0x1a')]===undefined?!![]:![]:!![],'where':_0x291317[_0x7995('0x1b')]?_0x291317['options'][_0x7995('0x1c')]||null:null,'attributes':_0x291317['options']?_0x291317['options'][_0x7995('0x1d')]||null:null,'include':_0x291317[_0x7995('0x1b')]?_0x291317[_0x7995('0x1b')][_0x7995('0x1e')]?_[_0x7995('0x1f')](_0x291317[_0x7995('0x1b')]['include'],function(_0x32a09a){return{'model':db[_0x32a09a[_0x7995('0x20')]],'as':_0x32a09a['as'],'attributes':_0x32a09a[_0x7995('0x1d')],'include':_0x32a09a[_0x7995('0x1e')]?_[_0x7995('0x1f')](_0x32a09a[_0x7995('0x1e')],function(_0x475351){return{'model':db[_0x475351[_0x7995('0x20')]],'as':_0x475351['as'],'attributes':_0x475351['attributes'],'include':_0x475351[_0x7995('0x1e')]?_[_0x7995('0x1f')](_0x475351[_0x7995('0x1e')],function(_0x268ce7){return{'model':db[_0x268ce7[_0x7995('0x20')]],'as':_0x268ce7['as'],'attributes':_0x268ce7[_0x7995('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x47625f){logger['info'](_0x7995('0x18'),_0x291317);logger[_0x7995('0x10')](_0x7995('0x18'),_0x291317,JSON[_0x7995('0x12')](_0x47625f));_0x37a7d4(_0x47625f);})[_0x7995('0x17')](function(_0x4b6f99){logger[_0x7995('0x13')]('ShowSquareOdbc',_0x4b6f99[_0x7995('0x15')],_0x291317);_0x4faa60(_0x1e1415[_0x7995('0x13')](0x1f4,_0x4b6f99[_0x7995('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/squareProject/index.js b/server/api/squareProject/index.js
index e88d016..55f25f0 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 _0x087b=['removeUsers','exports','multer','util','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareProject.controller','get','isAuthenticated','index','/:id','show','/:id/users','getUsers','post','addUsers','put','delete'];(function(_0x3ceffd,_0x50825d){var _0x487fe8=function(_0x232d0b){while(--_0x232d0b){_0x3ceffd['push'](_0x3ceffd['shift']());}};_0x487fe8(++_0x50825d);}(_0x087b,0x11a));var _0xb087=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x087b[_0x57b54c];return _0x59cc19;};'use strict';var multer=require(_0xb087('0x0'));var util=require(_0xb087('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xb087('0x2'));var router=express['Router']();var auth=require(_0xb087('0x3'));var interaction=require(_0xb087('0x4'));var config=require(_0xb087('0x5'));var controller=require(_0xb087('0x6'));router[_0xb087('0x7')]('/',auth[_0xb087('0x8')](),controller[_0xb087('0x9')]);router[_0xb087('0x7')](_0xb087('0xa'),auth[_0xb087('0x8')](),controller[_0xb087('0xb')]);router[_0xb087('0x7')](_0xb087('0xc'),auth[_0xb087('0x8')](),controller[_0xb087('0xd')]);router[_0xb087('0xe')]('/',auth[_0xb087('0x8')](),controller['create']);router[_0xb087('0xe')](_0xb087('0xc'),auth[_0xb087('0x8')](),controller[_0xb087('0xf')]);router[_0xb087('0x10')](_0xb087('0xa'),auth[_0xb087('0x8')](),controller['update']);router[_0xb087('0x11')](_0xb087('0xa'),auth[_0xb087('0x8')](),controller['destroy']);router[_0xb087('0x11')](_0xb087('0xc'),auth[_0xb087('0x8')](),controller[_0xb087('0x12')]);module[_0xb087('0x13')]=router;
\ No newline at end of file
+var _0x8f59=['create','delete','destroy','removeUsers','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./squareProject.controller','get','index','/:id','/:id/users','isAuthenticated','post'];(function(_0x350876,_0xe2cd28){var _0x1134bd=function(_0x6fb71f){while(--_0x6fb71f){_0x350876['push'](_0x350876['shift']());}};_0x1134bd(++_0xe2cd28);}(_0x8f59,0x11d));var _0x98f5=function(_0x3daa8c,_0x388a87){_0x3daa8c=_0x3daa8c-0x0;var _0x2b1bd7=_0x8f59[_0x3daa8c];return _0x2b1bd7;};'use strict';var multer=require(_0x98f5('0x0'));var util=require(_0x98f5('0x1'));var path=require(_0x98f5('0x2'));var timeout=require(_0x98f5('0x3'));var express=require(_0x98f5('0x4'));var router=express[_0x98f5('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x98f5('0x6'));var config=require(_0x98f5('0x7'));var controller=require(_0x98f5('0x8'));router[_0x98f5('0x9')]('/',auth['isAuthenticated'](),controller[_0x98f5('0xa')]);router[_0x98f5('0x9')](_0x98f5('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x98f5('0x9')](_0x98f5('0xc'),auth[_0x98f5('0xd')](),controller['getUsers']);router[_0x98f5('0xe')]('/',auth[_0x98f5('0xd')](),controller[_0x98f5('0xf')]);router[_0x98f5('0xe')]('/:id/users',auth[_0x98f5('0xd')](),controller['addUsers']);router['put'](_0x98f5('0xb'),auth[_0x98f5('0xd')](),controller['update']);router[_0x98f5('0x10')](_0x98f5('0xb'),auth[_0x98f5('0xd')](),controller[_0x98f5('0x11')]);router[_0x98f5('0x10')](_0x98f5('0xc'),auth['isAuthenticated'](),controller[_0x98f5('0x12')]);module[_0x98f5('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.attributes.js b/server/api/squareProject/squareProject.attributes.js
index 3923507..bdf74fc 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 _0x6924=['toString','utf8','production','sequelize','name','STRING','TEXT','BLOB','long','getDataValue','preproduction'];(function(_0x54514b,_0x2c662f){var _0x14683e=function(_0x28efdf){while(--_0x28efdf){_0x54514b['push'](_0x54514b['shift']());}};_0x14683e(++_0x2c662f);}(_0x6924,0xa8));var _0x4692=function(_0x3af7c9,_0x41eab7){_0x3af7c9=_0x3af7c9-0x0;var _0x4d37af=_0x6924[_0x3af7c9];return _0x4d37af;};'use strict';var Sequelize=require(_0x4692('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x4692('0x1'),'allowNull':![]},'description':{'type':Sequelize[_0x4692('0x2')]},'notes':{'type':Sequelize[_0x4692('0x3')]},'preproduction':{'type':Sequelize[_0x4692('0x4')](_0x4692('0x5')),'get':function(){if(this[_0x4692('0x6')](_0x4692('0x7'))){return this[_0x4692('0x6')](_0x4692('0x7'))[_0x4692('0x8')](_0x4692('0x9'));}}},'production':{'type':Sequelize[_0x4692('0x4')]('long'),'get':function(){if(this[_0x4692('0x6')](_0x4692('0xa'))){return this[_0x4692('0x6')](_0x4692('0xa'))[_0x4692('0x8')](_0x4692('0x9'));}}}};
\ No newline at end of file
+var _0xf6ed=['sequelize','exports','STRING','TEXT','long','getDataValue','preproduction','toString','utf8','production'];(function(_0x199fe8,_0x2f737e){var _0x44e5dc=function(_0x12f124){while(--_0x12f124){_0x199fe8['push'](_0x199fe8['shift']());}};_0x44e5dc(++_0x2f737e);}(_0xf6ed,0x10e));var _0xdf6e=function(_0x56d189,_0x52f209){_0x56d189=_0x56d189-0x0;var _0x1e677d=_0xf6ed[_0x56d189];return _0x1e677d;};'use strict';var Sequelize=require(_0xdf6e('0x0'));module[_0xdf6e('0x1')]={'name':{'type':Sequelize[_0xdf6e('0x2')],'unique':'name','allowNull':![]},'description':{'type':Sequelize[_0xdf6e('0x2')]},'notes':{'type':Sequelize[_0xdf6e('0x3')]},'preproduction':{'type':Sequelize['BLOB'](_0xdf6e('0x4')),'get':function(){if(this[_0xdf6e('0x5')]('preproduction')){return this[_0xdf6e('0x5')](_0xdf6e('0x6'))[_0xdf6e('0x7')](_0xdf6e('0x8'));}}},'production':{'type':Sequelize['BLOB'](_0xdf6e('0x4')),'get':function(){if(this[_0xdf6e('0x5')](_0xdf6e('0x9'))){return this[_0xdf6e('0x5')](_0xdf6e('0x9'))[_0xdf6e('0x7')](_0xdf6e('0x8'));}}}};
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.controller.js b/server/api/squareProject/squareProject.controller.js
index 2a8e204..855abd7 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 _0xa74f=['offset','limit','Content-Range','reject','save','then','destroy','SquareProjects','sendStatus','error','name','map','SquareProject','fieldName','type','key','model','keys','filters','intersection','query','fields','attributes','length','order','sort','where','pick','filter','merge','VIRTUAL','findAll','rows','catch','show','params','rawAttributes','includeAll','include','options','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addUsers','ids','isArray','emit','userSquareProject:remove','getUsers','findOne','User','hasOwnProperty','nolimit','rimraf','request-promise','moment','bluebird','mustache','path','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./squareProject.socket','register','status','end','json','count'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa74f,0x9a));var _0xfa74=function(_0x284a61,_0x231686){_0x284a61=_0x284a61-0x0;var _0x220e3c=_0xa74f[_0x284a61];return _0x220e3c;};'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 as=require(_0xfa74('0x10'));var hardwareService=require(_0xfa74('0x11'));var logger=require('../../config/logger')(_0xfa74('0x12'));var utils=require(_0xfa74('0x13'));var config=require(_0xfa74('0x14'));var db=require(_0xfa74('0x15'))['db'];config['redis']=_[_0xfa74('0x16')](config[_0xfa74('0x17')],{'host':_0xfa74('0x18'),'port':0x18eb});var socket=require(_0xfa74('0x19'))(new Redis(config['redis']));require(_0xfa74('0x1a'))[_0xfa74('0x1b')](socket);function respondWithStatusCode(_0x3eb49b,_0x3947ca){_0x3947ca=_0x3947ca||0xcc;return function(_0xe3c97e){if(_0xe3c97e){return _0x3eb49b['sendStatus'](_0x3947ca);}return _0x3eb49b[_0xfa74('0x1c')](_0x3947ca)[_0xfa74('0x1d')]();};}function respondWithResult(_0x947da6,_0x1f1de0){_0x1f1de0=_0x1f1de0||0xc8;return function(_0x3867f8){if(_0x3867f8){return _0x947da6[_0xfa74('0x1c')](_0x1f1de0)[_0xfa74('0x1e')](_0x3867f8);}};}function respondWithFilteredResult(_0x48c119,_0x58a67a){return function(_0xe0e33d){if(_0xe0e33d){var _0x51dda1=_0xe0e33d[_0xfa74('0x1f')],_0x4928b6=_0x58a67a['offset'],_0x31d3c1=_0x58a67a[_0xfa74('0x20')]+_0x58a67a[_0xfa74('0x21')],_0x25a36b;if(_0x31d3c1>=_0x51dda1){_0x31d3c1=_0x51dda1;_0x25a36b=0xc8;}else{_0x25a36b=0xce;}_0x48c119[_0xfa74('0x1c')](_0x25a36b);return _0x48c119['set'](_0xfa74('0x22'),_0x4928b6+'-'+_0x31d3c1+'/'+_0x51dda1)[_0xfa74('0x1e')](_0xe0e33d);}return null;};}function patchUpdates(_0x2e6c33){return function(_0x4a5ee4){try{jsonpatch['apply'](_0x4a5ee4,_0x2e6c33,!![]);}catch(_0x100851){return BPromise[_0xfa74('0x23')](_0x100851);}return _0x4a5ee4[_0xfa74('0x24')]();};}function saveUpdates(_0xeaaa19,_0x1a453d){return function(_0x554e0e){if(_0x554e0e){return _0x554e0e['update'](_0xeaaa19)[_0xfa74('0x25')](function(_0x5aa8a7){return _0x5aa8a7;});}return null;};}function removeEntity(_0x48cbd3,_0x529810){return function(_0x42c439){if(_0x42c439){return _0x42c439[_0xfa74('0x26')]()[_0xfa74('0x25')](function(){var _0x54f664=_0x42c439['get']({'plain':!![]});var _0x9eb68c=_0xfa74('0x27');return db['UserProfileResource'][_0xfa74('0x26')]({'where':{'type':_0x9eb68c,'resourceId':_0x54f664['id']}})['then'](function(){return _0x42c439;});})[_0xfa74('0x25')](function(){_0x48cbd3[_0xfa74('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x298388,_0x1130de){return function(_0x122415){if(!_0x122415){_0x298388[_0xfa74('0x28')](0x194);}return _0x122415;};}function handleError(_0x4f7337,_0xd9c55d){_0xd9c55d=_0xd9c55d||0x1f4;return function(_0x2f7cd7){logger[_0xfa74('0x29')](_0x2f7cd7['stack']);if(_0x2f7cd7['name']){delete _0x2f7cd7[_0xfa74('0x2a')];}_0x4f7337[_0xfa74('0x1c')](_0xd9c55d)['send'](_0x2f7cd7);};}exports['index']=function(_0x343466,_0x564060){var _0x2238d4={},_0x4d6d0a={},_0x363173={'count':0x0,'rows':[]};var _0x554f05=_[_0xfa74('0x2b')](db[_0xfa74('0x2c')]['rawAttributes'],function(_0x25e1fb){return{'name':_0x25e1fb[_0xfa74('0x2d')],'type':_0x25e1fb[_0xfa74('0x2e')][_0xfa74('0x2f')]};});_0x4d6d0a[_0xfa74('0x30')]=_[_0xfa74('0x2b')](_0x554f05,_0xfa74('0x2a'));_0x4d6d0a['query']=_[_0xfa74('0x31')](_0x343466['query']);_0x4d6d0a[_0xfa74('0x32')]=_[_0xfa74('0x33')](_0x4d6d0a[_0xfa74('0x30')],_0x4d6d0a[_0xfa74('0x34')]);_0x2238d4['attributes']=_['intersection'](_0x4d6d0a[_0xfa74('0x30')],qs[_0xfa74('0x35')](_0x343466[_0xfa74('0x34')][_0xfa74('0x35')]));_0x2238d4['attributes']=_0x2238d4[_0xfa74('0x36')][_0xfa74('0x37')]?_0x2238d4['attributes']:_0x4d6d0a['model'];if(!_0x343466['query']['hasOwnProperty']('nolimit')){_0x2238d4[_0xfa74('0x21')]=qs[_0xfa74('0x21')](_0x343466[_0xfa74('0x34')][_0xfa74('0x21')]);_0x2238d4[_0xfa74('0x20')]=qs[_0xfa74('0x20')](_0x343466[_0xfa74('0x34')][_0xfa74('0x20')]);}_0x2238d4[_0xfa74('0x38')]=qs['sort'](_0x343466[_0xfa74('0x34')][_0xfa74('0x39')]);_0x2238d4[_0xfa74('0x3a')]=qs[_0xfa74('0x32')](_[_0xfa74('0x3b')](_0x343466[_0xfa74('0x34')],_0x4d6d0a['filters']));if(_0x343466[_0xfa74('0x34')][_0xfa74('0x3c')]){_0x2238d4[_0xfa74('0x3a')]=_[_0xfa74('0x3d')](_0x2238d4['where'],{'$or':_[_0xfa74('0x2b')](_0x554f05,function(_0x13d9a5){if(_0x13d9a5[_0xfa74('0x2e')]!==_0xfa74('0x3e')){var _0x565b5d={};_0x565b5d[_0x13d9a5[_0xfa74('0x2a')]]={'$like':'%'+_0x343466[_0xfa74('0x34')][_0xfa74('0x3c')]+'%'};return _0x565b5d;}})});}_0x2238d4=_['merge']({},_0x2238d4,_0x343466['options']);var _0xc84243={'where':_0x2238d4[_0xfa74('0x3a')]};return db[_0xfa74('0x2c')][_0xfa74('0x1f')](_0xc84243)['then'](function(_0x1ab026){_0x363173[_0xfa74('0x1f')]=_0x1ab026;if(_0x343466['query']['includeAll']){_0x2238d4['include']=[{'all':!![]}];}return db['SquareProject'][_0xfa74('0x3f')](_0x2238d4);})[_0xfa74('0x25')](function(_0x3f92b2){_0x363173[_0xfa74('0x40')]=_0x3f92b2;return _0x363173;})[_0xfa74('0x25')](respondWithFilteredResult(_0x564060,_0x2238d4))[_0xfa74('0x41')](handleError(_0x564060,null));};exports[_0xfa74('0x42')]=function(_0x5aac45,_0x274062){var _0x3938c1={'raw':![],'where':{'id':_0x5aac45[_0xfa74('0x43')]['id']}},_0xee50b7={};_0xee50b7[_0xfa74('0x30')]=_['keys'](db[_0xfa74('0x2c')][_0xfa74('0x44')]);_0xee50b7[_0xfa74('0x34')]=_[_0xfa74('0x31')](_0x5aac45[_0xfa74('0x34')]);_0xee50b7[_0xfa74('0x32')]=_[_0xfa74('0x33')](_0xee50b7[_0xfa74('0x30')],_0xee50b7[_0xfa74('0x34')]);_0x3938c1[_0xfa74('0x36')]=_['intersection'](_0xee50b7[_0xfa74('0x30')],qs['fields'](_0x5aac45[_0xfa74('0x34')][_0xfa74('0x35')]));_0x3938c1[_0xfa74('0x36')]=_0x3938c1[_0xfa74('0x36')]['length']?_0x3938c1[_0xfa74('0x36')]:_0xee50b7[_0xfa74('0x30')];if(_0x5aac45['query'][_0xfa74('0x45')]){_0x3938c1[_0xfa74('0x46')]=[{'all':!![]}];}_0x3938c1=_['merge']({},_0x3938c1,_0x5aac45[_0xfa74('0x47')]);return db[_0xfa74('0x2c')][_0xfa74('0x48')](_0x3938c1)[_0xfa74('0x25')](handleEntityNotFound(_0x274062,null))[_0xfa74('0x25')](respondWithResult(_0x274062,null))['catch'](handleError(_0x274062,null));};exports['create']=function(_0x36f6ca,_0x91df44){return db['SquareProject'][_0xfa74('0x49')](_0x36f6ca[_0xfa74('0x4a')],{})[_0xfa74('0x25')](function(_0x4ca49e){var _0x4af9ea=_0x36f6ca[_0xfa74('0x4b')][_0xfa74('0x4c')]({'plain':!![]});if(!_0x4af9ea)throw new Error(_0xfa74('0x4d'));if(_0x4af9ea[_0xfa74('0x4e')]===_0xfa74('0x4b')){var _0x3cb23d=_0x4ca49e[_0xfa74('0x4c')]({'plain':!![]});var _0x30992b='SquareProjects';return db[_0xfa74('0x4f')][_0xfa74('0x48')]({'where':{'name':_0x30992b,'userProfileId':_0x4af9ea[_0xfa74('0x50')]},'raw':!![]})[_0xfa74('0x25')](function(_0x569801){if(_0x569801&&_0x569801['autoAssociation']===0x0){return db[_0xfa74('0x51')]['create']({'name':_0x3cb23d[_0xfa74('0x2a')],'resourceId':_0x3cb23d['id'],'type':_0x569801[_0xfa74('0x2a')],'sectionId':_0x569801['id']},{})[_0xfa74('0x25')](function(){return _0x4ca49e;});}else{return _0x4ca49e;}})[_0xfa74('0x41')](function(_0x262f75){logger[_0xfa74('0x29')](_0xfa74('0x52'),_0x262f75);throw _0x262f75;});}return _0x4ca49e;})['then'](respondWithResult(_0x91df44,0xc9))[_0xfa74('0x41')](handleError(_0x91df44,null));};exports['update']=function(_0x21d7c5,_0x5e8fd4){if(_0x21d7c5['body']['id']){delete _0x21d7c5[_0xfa74('0x4a')]['id'];}return db[_0xfa74('0x2c')]['find']({'where':{'id':_0x21d7c5['params']['id']}})[_0xfa74('0x25')](handleEntityNotFound(_0x5e8fd4,null))[_0xfa74('0x25')](saveUpdates(_0x21d7c5[_0xfa74('0x4a')],null))[_0xfa74('0x25')](respondWithResult(_0x5e8fd4,null))[_0xfa74('0x41')](handleError(_0x5e8fd4,null));};exports[_0xfa74('0x26')]=function(_0x1198f3,_0x3620f8){return db[_0xfa74('0x2c')][_0xfa74('0x48')]({'where':{'id':_0x1198f3['params']['id']}})[_0xfa74('0x25')](handleEntityNotFound(_0x3620f8,null))[_0xfa74('0x25')](removeEntity(_0x3620f8,null))['catch'](handleError(_0x3620f8,null));};exports['addUsers']=function(_0x3d88dc,_0x2e7262,_0x99f568){return db[_0xfa74('0x2c')][_0xfa74('0x48')]({'where':{'id':_0x3d88dc['params']['id']}})[_0xfa74('0x25')](handleEntityNotFound(_0x2e7262,null))['then'](function(_0x26b398){if(_0x26b398){return _0x26b398[_0xfa74('0x53')](_0x3d88dc[_0xfa74('0x4a')]['ids'],_['omit'](_0x3d88dc[_0xfa74('0x4a')],[_0xfa74('0x54'),'id'])||{});}})[_0xfa74('0x25')](respondWithResult(_0x2e7262,null))[_0xfa74('0x41')](handleError(_0x2e7262,null));};exports['removeUsers']=function(_0xe87727,_0x2f5c31,_0x5a2494){return db[_0xfa74('0x2c')][_0xfa74('0x48')]({'where':{'id':_0xe87727[_0xfa74('0x43')]['id']}})[_0xfa74('0x25')](handleEntityNotFound(_0x2f5c31,null))['then'](function(_0x2e6eb7){if(_0x2e6eb7){return _0x2e6eb7['removeUsers'](_0xe87727[_0xfa74('0x34')][_0xfa74('0x54')])[_0xfa74('0x25')](function(){if(_[_0xfa74('0x55')](_0xe87727[_0xfa74('0x34')][_0xfa74('0x54')])){for(var _0x1f355a=0x0;_0x1f355a<_0xe87727[_0xfa74('0x34')][_0xfa74('0x54')][_0xfa74('0x37')];_0x1f355a+=0x1){socket[_0xfa74('0x56')](_0xfa74('0x57'),{'UserId':Number(_0xe87727[_0xfa74('0x34')][_0xfa74('0x54')][_0x1f355a]),'SquareProjectId':Number(_0xe87727[_0xfa74('0x43')]['id'])});}}else{socket['emit'](_0xfa74('0x57'),{'UserId':Number(_0xe87727[_0xfa74('0x34')]['ids']),'SquareProjectId':Number(_0xe87727['params']['id'])});}});}})[_0xfa74('0x25')](respondWithStatusCode(_0x2f5c31,null))['catch'](handleError(_0x2f5c31,null));};exports[_0xfa74('0x58')]=function(_0x2e8174,_0x29270f,_0x529921){var _0x2ef414={};var _0x5b86af={};var _0x53f742;var _0x1856ea;return db[_0xfa74('0x2c')][_0xfa74('0x59')]({'where':{'id':_0x2e8174[_0xfa74('0x43')]['id']}})[_0xfa74('0x25')](handleEntityNotFound(_0x29270f,null))[_0xfa74('0x25')](function(_0x70120d){if(_0x70120d){_0x53f742=_0x70120d;_0x5b86af[_0xfa74('0x30')]=_[_0xfa74('0x31')](db[_0xfa74('0x5a')][_0xfa74('0x44')]);_0x5b86af['query']=_[_0xfa74('0x31')](_0x2e8174['query']);_0x5b86af[_0xfa74('0x32')]=_[_0xfa74('0x33')](_0x5b86af[_0xfa74('0x30')],_0x5b86af['query']);_0x2ef414[_0xfa74('0x36')]=_[_0xfa74('0x33')](_0x5b86af[_0xfa74('0x30')],qs['fields'](_0x2e8174[_0xfa74('0x34')][_0xfa74('0x35')]));_0x2ef414[_0xfa74('0x36')]=_0x2ef414[_0xfa74('0x36')][_0xfa74('0x37')]?_0x2ef414['attributes']:_0x5b86af[_0xfa74('0x30')];_0x2ef414[_0xfa74('0x38')]=qs[_0xfa74('0x39')](_0x2e8174[_0xfa74('0x34')][_0xfa74('0x39')]);_0x2ef414[_0xfa74('0x3a')]=qs[_0xfa74('0x32')](_[_0xfa74('0x3b')](_0x2e8174[_0xfa74('0x34')],_0x5b86af[_0xfa74('0x32')]));if(_0x2e8174[_0xfa74('0x34')][_0xfa74('0x3c')]){_0x2ef414['where']=_[_0xfa74('0x3d')](_0x2ef414[_0xfa74('0x3a')],{'$or':_[_0xfa74('0x2b')](_0x2ef414[_0xfa74('0x36')],function(_0x356b38){var _0xfe8dce={};_0xfe8dce[_0x356b38]={'$like':'%'+_0x2e8174[_0xfa74('0x34')][_0xfa74('0x3c')]+'%'};return _0xfe8dce;})});}_0x2ef414=_['merge']({},_0x2ef414,_0x2e8174[_0xfa74('0x47')]);return _0x53f742[_0xfa74('0x58')](_0x2ef414);}})[_0xfa74('0x25')](function(_0x2cd96){if(_0x2cd96){_0x1856ea=_0x2cd96['length'];if(!_0x2e8174[_0xfa74('0x34')][_0xfa74('0x5b')](_0xfa74('0x5c'))){_0x2ef414[_0xfa74('0x21')]=qs['limit'](_0x2e8174[_0xfa74('0x34')]['limit']);_0x2ef414['offset']=qs[_0xfa74('0x20')](_0x2e8174['query'][_0xfa74('0x20')]);}return _0x53f742[_0xfa74('0x58')](_0x2ef414);}})['then'](function(_0x5121ff){if(_0x5121ff){return _0x5121ff?{'count':_0x1856ea,'rows':_0x5121ff}:null;}})[_0xfa74('0x25')](respondWithResult(_0x29270f,null))[_0xfa74('0x41')](handleError(_0x29270f,null));};
\ No newline at end of file
+var _0xe205=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./squareProject.socket','sendStatus','status','end','json','count','offset','limit','set','reject','update','then','get','SquareProjects','UserProfileResource','destroy','error','name','send','index','map','SquareProject','rawAttributes','fieldName','type','key','model','keys','query','filters','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addUsers','ids','omit','removeUsers','userSquareProject:remove','emit','getUsers','User','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','crypto','querystring','ioredis','../../components/auth/service'];(function(_0x2287e8,_0x4e089a){var _0x4d7825=function(_0x237cba){while(--_0x237cba){_0x2287e8['push'](_0x2287e8['shift']());}};_0x4d7825(++_0x4e089a);}(_0xe205,0xa7));var _0x5e20=function(_0x44067c,_0x5a2285){_0x44067c=_0x44067c-0x0;var _0x423094=_0xe205[_0x44067c];return _0x423094;};'use strict';var pdf=require(_0x5e20('0x0'));var emlformat=require(_0x5e20('0x1'));var rimraf=require(_0x5e20('0x2'));var zipdir=require(_0x5e20('0x3'));var jsonpatch=require(_0x5e20('0x4'));var rp=require(_0x5e20('0x5'));var moment=require(_0x5e20('0x6'));var BPromise=require(_0x5e20('0x7'));var Mustache=require(_0x5e20('0x8'));var util=require('util');var path=require(_0x5e20('0x9'));var sox=require(_0x5e20('0xa'));var csv=require(_0x5e20('0xb'));var ejs=require(_0x5e20('0xc'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x5e20('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x5e20('0xb'));var querystring=require(_0x5e20('0xe'));var Papa=require('papaparse');var Redis=require(_0x5e20('0xf'));var authService=require(_0x5e20('0x10'));var qs=require(_0x5e20('0x11'));var as=require(_0x5e20('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5e20('0x13'))(_0x5e20('0x14'));var utils=require(_0x5e20('0x15'));var config=require(_0x5e20('0x16'));var db=require(_0x5e20('0x17'))['db'];config[_0x5e20('0x18')]=_['defaults'](config[_0x5e20('0x18')],{'host':_0x5e20('0x19'),'port':0x18eb});var socket=require(_0x5e20('0x1a'))(new Redis(config['redis']));require(_0x5e20('0x1b'))['register'](socket);function respondWithStatusCode(_0x1f47f3,_0x5ba833){_0x5ba833=_0x5ba833||0xcc;return function(_0x15587b){if(_0x15587b){return _0x1f47f3[_0x5e20('0x1c')](_0x5ba833);}return _0x1f47f3[_0x5e20('0x1d')](_0x5ba833)[_0x5e20('0x1e')]();};}function respondWithResult(_0x294df8,_0x542b3c){_0x542b3c=_0x542b3c||0xc8;return function(_0xeaeb77){if(_0xeaeb77){return _0x294df8[_0x5e20('0x1d')](_0x542b3c)[_0x5e20('0x1f')](_0xeaeb77);}};}function respondWithFilteredResult(_0x22c8d6,_0x2f194b){return function(_0x3b353f){if(_0x3b353f){var _0x1cc706=_0x3b353f[_0x5e20('0x20')],_0xf3488f=_0x2f194b['offset'],_0x4d3e4a=_0x2f194b[_0x5e20('0x21')]+_0x2f194b[_0x5e20('0x22')],_0x434686;if(_0x4d3e4a>=_0x1cc706){_0x4d3e4a=_0x1cc706;_0x434686=0xc8;}else{_0x434686=0xce;}_0x22c8d6[_0x5e20('0x1d')](_0x434686);return _0x22c8d6[_0x5e20('0x23')]('Content-Range',_0xf3488f+'-'+_0x4d3e4a+'/'+_0x1cc706)[_0x5e20('0x1f')](_0x3b353f);}return null;};}function patchUpdates(_0x50f222){return function(_0x4a3587){try{jsonpatch['apply'](_0x4a3587,_0x50f222,!![]);}catch(_0x5d0d1a){return BPromise[_0x5e20('0x24')](_0x5d0d1a);}return _0x4a3587['save']();};}function saveUpdates(_0x3d89e4,_0x29b111){return function(_0x30d849){if(_0x30d849){return _0x30d849[_0x5e20('0x25')](_0x3d89e4)[_0x5e20('0x26')](function(_0x2d4614){return _0x2d4614;});}return null;};}function removeEntity(_0x4c5732,_0x15705f){return function(_0x5a755f){if(_0x5a755f){return _0x5a755f['destroy']()[_0x5e20('0x26')](function(){var _0x58d678=_0x5a755f[_0x5e20('0x27')]({'plain':!![]});var _0x1b01af=_0x5e20('0x28');return db[_0x5e20('0x29')][_0x5e20('0x2a')]({'where':{'type':_0x1b01af,'resourceId':_0x58d678['id']}})['then'](function(){return _0x5a755f;});})[_0x5e20('0x26')](function(){_0x4c5732[_0x5e20('0x1d')](0xcc)[_0x5e20('0x1e')]();});}};}function handleEntityNotFound(_0x3032ef,_0x4c799d){return function(_0x3a0f06){if(!_0x3a0f06){_0x3032ef[_0x5e20('0x1c')](0x194);}return _0x3a0f06;};}function handleError(_0x37f09a,_0x222e7a){_0x222e7a=_0x222e7a||0x1f4;return function(_0xbed73a){logger[_0x5e20('0x2b')](_0xbed73a['stack']);if(_0xbed73a[_0x5e20('0x2c')]){delete _0xbed73a[_0x5e20('0x2c')];}_0x37f09a['status'](_0x222e7a)[_0x5e20('0x2d')](_0xbed73a);};}exports[_0x5e20('0x2e')]=function(_0x335f1e,_0x4196a3){var _0x1548c8={},_0x395a27={},_0x4ff715={'count':0x0,'rows':[]};var _0x207a6b=_[_0x5e20('0x2f')](db[_0x5e20('0x30')][_0x5e20('0x31')],function(_0x272da4){return{'name':_0x272da4[_0x5e20('0x32')],'type':_0x272da4[_0x5e20('0x33')][_0x5e20('0x34')]};});_0x395a27[_0x5e20('0x35')]=_[_0x5e20('0x2f')](_0x207a6b,_0x5e20('0x2c'));_0x395a27['query']=_[_0x5e20('0x36')](_0x335f1e[_0x5e20('0x37')]);_0x395a27[_0x5e20('0x38')]=_['intersection'](_0x395a27[_0x5e20('0x35')],_0x395a27[_0x5e20('0x37')]);_0x1548c8[_0x5e20('0x39')]=_[_0x5e20('0x3a')](_0x395a27[_0x5e20('0x35')],qs[_0x5e20('0x3b')](_0x335f1e[_0x5e20('0x37')][_0x5e20('0x3b')]));_0x1548c8[_0x5e20('0x39')]=_0x1548c8[_0x5e20('0x39')][_0x5e20('0x3c')]?_0x1548c8[_0x5e20('0x39')]:_0x395a27[_0x5e20('0x35')];if(!_0x335f1e[_0x5e20('0x37')]['hasOwnProperty'](_0x5e20('0x3d'))){_0x1548c8['limit']=qs['limit'](_0x335f1e[_0x5e20('0x37')][_0x5e20('0x22')]);_0x1548c8['offset']=qs[_0x5e20('0x21')](_0x335f1e[_0x5e20('0x37')]['offset']);}_0x1548c8[_0x5e20('0x3e')]=qs[_0x5e20('0x3f')](_0x335f1e[_0x5e20('0x37')][_0x5e20('0x3f')]);_0x1548c8[_0x5e20('0x40')]=qs[_0x5e20('0x38')](_[_0x5e20('0x41')](_0x335f1e[_0x5e20('0x37')],_0x395a27[_0x5e20('0x38')]));if(_0x335f1e[_0x5e20('0x37')][_0x5e20('0x42')]){_0x1548c8[_0x5e20('0x40')]=_[_0x5e20('0x43')](_0x1548c8[_0x5e20('0x40')],{'$or':_[_0x5e20('0x2f')](_0x207a6b,function(_0x3d618c){if(_0x3d618c[_0x5e20('0x33')]!==_0x5e20('0x44')){var _0x5abe62={};_0x5abe62[_0x3d618c[_0x5e20('0x2c')]]={'$like':'%'+_0x335f1e[_0x5e20('0x37')][_0x5e20('0x42')]+'%'};return _0x5abe62;}})});}_0x1548c8=_[_0x5e20('0x43')]({},_0x1548c8,_0x335f1e[_0x5e20('0x45')]);var _0x4ef462={'where':_0x1548c8[_0x5e20('0x40')]};return db[_0x5e20('0x30')][_0x5e20('0x20')](_0x4ef462)[_0x5e20('0x26')](function(_0x4d973a){_0x4ff715[_0x5e20('0x20')]=_0x4d973a;if(_0x335f1e['query'][_0x5e20('0x46')]){_0x1548c8[_0x5e20('0x47')]=[{'all':!![]}];}return db[_0x5e20('0x30')]['findAll'](_0x1548c8);})[_0x5e20('0x26')](function(_0x33bd92){_0x4ff715[_0x5e20('0x48')]=_0x33bd92;return _0x4ff715;})[_0x5e20('0x26')](respondWithFilteredResult(_0x4196a3,_0x1548c8))[_0x5e20('0x49')](handleError(_0x4196a3,null));};exports[_0x5e20('0x4a')]=function(_0x113133,_0x3edea7){var _0x5c9504={'raw':![],'where':{'id':_0x113133[_0x5e20('0x4b')]['id']}},_0x2f11ca={};_0x2f11ca[_0x5e20('0x35')]=_['keys'](db[_0x5e20('0x30')]['rawAttributes']);_0x2f11ca[_0x5e20('0x37')]=_[_0x5e20('0x36')](_0x113133[_0x5e20('0x37')]);_0x2f11ca[_0x5e20('0x38')]=_[_0x5e20('0x3a')](_0x2f11ca['model'],_0x2f11ca[_0x5e20('0x37')]);_0x5c9504['attributes']=_['intersection'](_0x2f11ca[_0x5e20('0x35')],qs[_0x5e20('0x3b')](_0x113133[_0x5e20('0x37')][_0x5e20('0x3b')]));_0x5c9504[_0x5e20('0x39')]=_0x5c9504[_0x5e20('0x39')][_0x5e20('0x3c')]?_0x5c9504['attributes']:_0x2f11ca['model'];if(_0x113133[_0x5e20('0x37')][_0x5e20('0x46')]){_0x5c9504['include']=[{'all':!![]}];}_0x5c9504=_[_0x5e20('0x43')]({},_0x5c9504,_0x113133[_0x5e20('0x45')]);return db[_0x5e20('0x30')][_0x5e20('0x4c')](_0x5c9504)[_0x5e20('0x26')](handleEntityNotFound(_0x3edea7,null))['then'](respondWithResult(_0x3edea7,null))[_0x5e20('0x49')](handleError(_0x3edea7,null));};exports[_0x5e20('0x4d')]=function(_0x25491e,_0x2a705f){return db[_0x5e20('0x30')][_0x5e20('0x4d')](_0x25491e[_0x5e20('0x4e')],{})[_0x5e20('0x26')](function(_0x4fb004){var _0x5bbc8e=_0x25491e['user'][_0x5e20('0x27')]({'plain':!![]});if(!_0x5bbc8e)throw new Error(_0x5e20('0x4f'));if(_0x5bbc8e['role']===_0x5e20('0x50')){var _0x4bfea7=_0x4fb004[_0x5e20('0x27')]({'plain':!![]});var _0x4afb72=_0x5e20('0x28');return db['UserProfileSection'][_0x5e20('0x4c')]({'where':{'name':_0x4afb72,'userProfileId':_0x5bbc8e[_0x5e20('0x51')]},'raw':!![]})[_0x5e20('0x26')](function(_0x190e07){if(_0x190e07&&_0x190e07[_0x5e20('0x52')]===0x0){return db[_0x5e20('0x29')][_0x5e20('0x4d')]({'name':_0x4bfea7[_0x5e20('0x2c')],'resourceId':_0x4bfea7['id'],'type':_0x190e07[_0x5e20('0x2c')],'sectionId':_0x190e07['id']},{})[_0x5e20('0x26')](function(){return _0x4fb004;});}else{return _0x4fb004;}})[_0x5e20('0x49')](function(_0x448d52){logger[_0x5e20('0x2b')](_0x5e20('0x53'),_0x448d52);throw _0x448d52;});}return _0x4fb004;})[_0x5e20('0x26')](respondWithResult(_0x2a705f,0xc9))[_0x5e20('0x49')](handleError(_0x2a705f,null));};exports[_0x5e20('0x25')]=function(_0x1ace56,_0x589fe9){if(_0x1ace56['body']['id']){delete _0x1ace56[_0x5e20('0x4e')]['id'];}return db['SquareProject'][_0x5e20('0x4c')]({'where':{'id':_0x1ace56[_0x5e20('0x4b')]['id']}})[_0x5e20('0x26')](handleEntityNotFound(_0x589fe9,null))['then'](saveUpdates(_0x1ace56[_0x5e20('0x4e')],null))[_0x5e20('0x26')](respondWithResult(_0x589fe9,null))[_0x5e20('0x49')](handleError(_0x589fe9,null));};exports['destroy']=function(_0x5d2aa2,_0x5599c4){return db[_0x5e20('0x30')][_0x5e20('0x4c')]({'where':{'id':_0x5d2aa2[_0x5e20('0x4b')]['id']}})[_0x5e20('0x26')](handleEntityNotFound(_0x5599c4,null))[_0x5e20('0x26')](removeEntity(_0x5599c4,null))[_0x5e20('0x49')](handleError(_0x5599c4,null));};exports['addUsers']=function(_0x393724,_0x50e4c7,_0x2913e7){return db['SquareProject'][_0x5e20('0x4c')]({'where':{'id':_0x393724[_0x5e20('0x4b')]['id']}})[_0x5e20('0x26')](handleEntityNotFound(_0x50e4c7,null))['then'](function(_0x1f6a32){if(_0x1f6a32){return _0x1f6a32[_0x5e20('0x54')](_0x393724[_0x5e20('0x4e')][_0x5e20('0x55')],_[_0x5e20('0x56')](_0x393724[_0x5e20('0x4e')],[_0x5e20('0x55'),'id'])||{});}})['then'](respondWithResult(_0x50e4c7,null))[_0x5e20('0x49')](handleError(_0x50e4c7,null));};exports[_0x5e20('0x57')]=function(_0x1a03e4,_0x2f9089,_0x4a98a8){return db[_0x5e20('0x30')][_0x5e20('0x4c')]({'where':{'id':_0x1a03e4[_0x5e20('0x4b')]['id']}})[_0x5e20('0x26')](handleEntityNotFound(_0x2f9089,null))['then'](function(_0x3e6be0){if(_0x3e6be0){return _0x3e6be0[_0x5e20('0x57')](_0x1a03e4[_0x5e20('0x37')]['ids'])['then'](function(){if(_['isArray'](_0x1a03e4[_0x5e20('0x37')][_0x5e20('0x55')])){for(var _0x5e4ddc=0x0;_0x5e4ddc<_0x1a03e4[_0x5e20('0x37')][_0x5e20('0x55')][_0x5e20('0x3c')];_0x5e4ddc+=0x1){socket['emit'](_0x5e20('0x58'),{'UserId':Number(_0x1a03e4[_0x5e20('0x37')]['ids'][_0x5e4ddc]),'SquareProjectId':Number(_0x1a03e4[_0x5e20('0x4b')]['id'])});}}else{socket[_0x5e20('0x59')]('userSquareProject:remove',{'UserId':Number(_0x1a03e4[_0x5e20('0x37')][_0x5e20('0x55')]),'SquareProjectId':Number(_0x1a03e4[_0x5e20('0x4b')]['id'])});}});}})[_0x5e20('0x26')](respondWithStatusCode(_0x2f9089,null))['catch'](handleError(_0x2f9089,null));};exports[_0x5e20('0x5a')]=function(_0x59bff7,_0x4c82d0,_0x1dc6dc){var _0x4025e1={};var _0x359bc0={};var _0x2d4e0b;var _0x54cd1;return db[_0x5e20('0x30')]['findOne']({'where':{'id':_0x59bff7['params']['id']}})[_0x5e20('0x26')](handleEntityNotFound(_0x4c82d0,null))[_0x5e20('0x26')](function(_0x17f248){if(_0x17f248){_0x2d4e0b=_0x17f248;_0x359bc0['model']=_[_0x5e20('0x36')](db[_0x5e20('0x5b')]['rawAttributes']);_0x359bc0[_0x5e20('0x37')]=_['keys'](_0x59bff7['query']);_0x359bc0[_0x5e20('0x38')]=_['intersection'](_0x359bc0[_0x5e20('0x35')],_0x359bc0[_0x5e20('0x37')]);_0x4025e1[_0x5e20('0x39')]=_['intersection'](_0x359bc0[_0x5e20('0x35')],qs[_0x5e20('0x3b')](_0x59bff7[_0x5e20('0x37')][_0x5e20('0x3b')]));_0x4025e1[_0x5e20('0x39')]=_0x4025e1['attributes'][_0x5e20('0x3c')]?_0x4025e1[_0x5e20('0x39')]:_0x359bc0['model'];_0x4025e1[_0x5e20('0x3e')]=qs[_0x5e20('0x3f')](_0x59bff7[_0x5e20('0x37')]['sort']);_0x4025e1[_0x5e20('0x40')]=qs[_0x5e20('0x38')](_[_0x5e20('0x41')](_0x59bff7[_0x5e20('0x37')],_0x359bc0[_0x5e20('0x38')]));if(_0x59bff7['query'][_0x5e20('0x42')]){_0x4025e1[_0x5e20('0x40')]=_[_0x5e20('0x43')](_0x4025e1[_0x5e20('0x40')],{'$or':_[_0x5e20('0x2f')](_0x4025e1['attributes'],function(_0x3037bb){var _0x1dbcfd={};_0x1dbcfd[_0x3037bb]={'$like':'%'+_0x59bff7[_0x5e20('0x37')][_0x5e20('0x42')]+'%'};return _0x1dbcfd;})});}_0x4025e1=_[_0x5e20('0x43')]({},_0x4025e1,_0x59bff7[_0x5e20('0x45')]);return _0x2d4e0b[_0x5e20('0x5a')](_0x4025e1);}})[_0x5e20('0x26')](function(_0x55306e){if(_0x55306e){_0x54cd1=_0x55306e[_0x5e20('0x3c')];if(!_0x59bff7['query']['hasOwnProperty'](_0x5e20('0x3d'))){_0x4025e1[_0x5e20('0x22')]=qs['limit'](_0x59bff7[_0x5e20('0x37')][_0x5e20('0x22')]);_0x4025e1['offset']=qs[_0x5e20('0x21')](_0x59bff7['query'][_0x5e20('0x21')]);}return _0x2d4e0b['getUsers'](_0x4025e1);}})[_0x5e20('0x26')](function(_0xf1b2e){if(_0xf1b2e){return _0xf1b2e?{'count':_0x54cd1,'rows':_0xf1b2e}:null;}})[_0x5e20('0x26')](respondWithResult(_0x4c82d0,null))[_0x5e20('0x49')](handleError(_0x4c82d0,null));};
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.events.js b/server/api/squareProject/squareProject.events.js
index ef8563a..60f154e 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 _0xe14b=['../../mysqldb','setMaxListeners','save','update','emit','hook','exports','events'];(function(_0x1a89ca,_0x27394b){var _0x29cbb2=function(_0x31e1f4){while(--_0x31e1f4){_0x1a89ca['push'](_0x1a89ca['shift']());}};_0x29cbb2(++_0x27394b);}(_0xe14b,0xbf));var _0xbe14=function(_0x11efa2,_0x52b871){_0x11efa2=_0x11efa2-0x0;var _0x5d406b=_0xe14b[_0x11efa2];return _0x5d406b;};'use strict';var EventEmitter=require(_0xbe14('0x0'));var SquareProject=require(_0xbe14('0x1'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xbe14('0x2')](0x0);var events={'afterCreate':_0xbe14('0x3'),'afterUpdate':_0xbe14('0x4'),'afterDestroy':'remove'};function emitEvent(_0x110f6c){return function(_0x2ce65b,_0x506a7c,_0x48b8de){SquareProjectEvents[_0xbe14('0x5')](_0x110f6c+':'+_0x2ce65b['id'],_0x2ce65b);SquareProjectEvents[_0xbe14('0x5')](_0x110f6c,_0x2ce65b);_0x48b8de(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0xbe14('0x6')](e,emitEvent(event));}}module[_0xbe14('0x7')]=SquareProjectEvents;
\ No newline at end of file
+var _0x7531=['exports','events','../../mysqldb','SquareProject','remove','emit','hasOwnProperty','hook'];(function(_0x19d279,_0x2a4647){var _0x5ec893=function(_0x44296b){while(--_0x44296b){_0x19d279['push'](_0x19d279['shift']());}};_0x5ec893(++_0x2a4647);}(_0x7531,0x69));var _0x1753=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x7531[_0x2dafbe];return _0x58a45a;};'use strict';var EventEmitter=require(_0x1753('0x0'));var SquareProject=require(_0x1753('0x1'))['db'][_0x1753('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x1753('0x3')};function emitEvent(_0x1ecba8){return function(_0x5595df,_0x22192f,_0x24b503){SquareProjectEvents['emit'](_0x1ecba8+':'+_0x5595df['id'],_0x5595df);SquareProjectEvents[_0x1753('0x4')](_0x1ecba8,_0x5595df);_0x24b503(null);};}for(var e in events){if(events[_0x1753('0x5')](e)){var event=events[e];SquareProject[_0x1753('0x6')](e,emitEvent(event));}}module[_0x1753('0x7')]=SquareProjectEvents;
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.model.js b/server/api/squareProject/squareProject.model.js
index 84e08f8..0d99ab4 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 _0x0b6c=['../../config/logger','moment','request-promise','rimraf','../../config/environment','./squareProject.attributes','SquareProject','square_projects','lodash'];(function(_0x223eb4,_0x5f3368){var _0x306246=function(_0x2c47fe){while(--_0x2c47fe){_0x223eb4['push'](_0x223eb4['shift']());}};_0x306246(++_0x5f3368);}(_0x0b6c,0x14c));var _0xc0b6=function(_0x138c3c,_0x126657){_0x138c3c=_0x138c3c-0x0;var _0x3498a4=_0x0b6c[_0x138c3c];return _0x3498a4;};'use strict';var _=require(_0xc0b6('0x0'));var util=require('util');var logger=require(_0xc0b6('0x1'))('api');var moment=require(_0xc0b6('0x2'));var BPromise=require('bluebird');var rp=require(_0xc0b6('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc0b6('0x4'));var config=require(_0xc0b6('0x5'));var attributes=require(_0xc0b6('0x6'));module['exports']=function(_0x5c02d6,_0x25f55e){return _0x5c02d6['define'](_0xc0b6('0x7'),attributes,{'tableName':_0xc0b6('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xce42=['exports','define','SquareProject','square_projects','lodash','moment','request-promise','rimraf','../../config/environment','./squareProject.attributes'];(function(_0x3d3559,_0x108700){var _0x29bbab=function(_0x25f212){while(--_0x25f212){_0x3d3559['push'](_0x3d3559['shift']());}};_0x29bbab(++_0x108700);}(_0xce42,0xa4));var _0x2ce4=function(_0x3d90b4,_0x1e2fc6){_0x3d90b4=_0x3d90b4-0x0;var _0x4c65d3=_0xce42[_0x3d90b4];return _0x4c65d3;};'use strict';var _=require(_0x2ce4('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x2ce4('0x1'));var BPromise=require('bluebird');var rp=require(_0x2ce4('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2ce4('0x3'));var config=require(_0x2ce4('0x4'));var attributes=require(_0x2ce4('0x5'));module[_0x2ce4('0x6')]=function(_0x563416,_0x3eb7d3){return _0x563416[_0x2ce4('0x7')](_0x2ce4('0x8'),attributes,{'tableName':_0x2ce4('0x9'),'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 13eb9ca..afb56a0 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 _0xc523=['ioredis','../../config/utils','../../config/environment','client','http','redis','localhost','register','request','then','info','SquareProject,\x20%s,\x20%s','request\x20sent','debug','SquareProject,\x20%s,\x20%s,\x20%s','stringify','error','message','result','SquareProject','find','raw','options','where','attributes','include','map','model','ShowSquareProject','catch','util','moment','bluebird','randomstring'];(function(_0x2548f5,_0x87e99b){var _0x6cccf1=function(_0x383535){while(--_0x383535){_0x2548f5['push'](_0x2548f5['shift']());}};_0x6cccf1(++_0x87e99b);}(_0xc523,0x10c));var _0x3c52=function(_0x55ef8b,_0x5deb5e){_0x55ef8b=_0x55ef8b-0x0;var _0x359c84=_0xc523[_0x55ef8b];return _0x359c84;};'use strict';var _=require('lodash');var util=require(_0x3c52('0x0'));var moment=require(_0x3c52('0x1'));var BPromise=require(_0x3c52('0x2'));var rs=require(_0x3c52('0x3'));var fs=require('fs');var Redis=require(_0x3c52('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x3c52('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x3c52('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x3c52('0x7')][_0x3c52('0x8')]({'port':0x232a});config[_0x3c52('0x9')]=_['defaults'](config[_0x3c52('0x9')],{'host':_0x3c52('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./squareProject.socket')[_0x3c52('0xb')](socket);function respondWithRpcPromise(_0x1470d2,_0x23ff82,_0x23d2a2){return new BPromise(function(_0x2414e9,_0x52a4bb){return client[_0x3c52('0xc')](_0x1470d2,_0x23d2a2)[_0x3c52('0xd')](function(_0x4d1351){logger[_0x3c52('0xe')](_0x3c52('0xf'),_0x23ff82,_0x3c52('0x10'));logger[_0x3c52('0x11')](_0x3c52('0x12'),_0x23ff82,_0x3c52('0x10'),JSON[_0x3c52('0x13')](_0x4d1351));if(_0x4d1351[_0x3c52('0x14')]){if(_0x4d1351[_0x3c52('0x14')]['code']===0x1f4){logger[_0x3c52('0x14')]('SquareProject,\x20%s,\x20%s',_0x23ff82,_0x4d1351[_0x3c52('0x14')][_0x3c52('0x15')]);return _0x52a4bb(_0x4d1351['error'][_0x3c52('0x15')]);}logger[_0x3c52('0x14')](_0x3c52('0xf'),_0x23ff82,_0x4d1351['error'][_0x3c52('0x15')]);return _0x2414e9(_0x4d1351['error']['message']);}else{logger['info'](_0x3c52('0xf'),_0x23ff82,'request\x20sent');_0x2414e9(_0x4d1351[_0x3c52('0x16')][_0x3c52('0x15')]);}})['catch'](function(_0x41fc45){logger[_0x3c52('0x14')]('SquareProject,\x20%s,\x20%s',_0x23ff82,_0x41fc45);_0x52a4bb(_0x41fc45);});});}exports['ShowSquareProject']=function(_0x16ac81){var _0x5b6ed6=this;return new Promise(function(_0x464b9e,_0x505b3){return db[_0x3c52('0x17')][_0x3c52('0x18')]({'raw':_0x16ac81['options']?_0x16ac81['options'][_0x3c52('0x19')]===undefined?!![]:![]:!![],'where':_0x16ac81[_0x3c52('0x1a')]?_0x16ac81[_0x3c52('0x1a')][_0x3c52('0x1b')]||null:null,'attributes':_0x16ac81['options']?_0x16ac81[_0x3c52('0x1a')][_0x3c52('0x1c')]||null:null,'include':_0x16ac81[_0x3c52('0x1a')]?_0x16ac81[_0x3c52('0x1a')][_0x3c52('0x1d')]?_[_0x3c52('0x1e')](_0x16ac81[_0x3c52('0x1a')][_0x3c52('0x1d')],function(_0x3461eb){return{'model':db[_0x3461eb['model']],'as':_0x3461eb['as'],'attributes':_0x3461eb[_0x3c52('0x1c')],'include':_0x3461eb[_0x3c52('0x1d')]?_[_0x3c52('0x1e')](_0x3461eb[_0x3c52('0x1d')],function(_0x5f58d4){return{'model':db[_0x5f58d4[_0x3c52('0x1f')]],'as':_0x5f58d4['as'],'attributes':_0x5f58d4[_0x3c52('0x1c')],'include':_0x5f58d4[_0x3c52('0x1d')]?_[_0x3c52('0x1e')](_0x5f58d4[_0x3c52('0x1d')],function(_0x37b421){return{'model':db[_0x37b421['model']],'as':_0x37b421['as'],'attributes':_0x37b421[_0x3c52('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x3c52('0xd')](function(_0x12215d){logger['info'](_0x3c52('0x20'),_0x16ac81);logger[_0x3c52('0x11')](_0x3c52('0x20'),_0x16ac81,JSON['stringify'](_0x12215d));_0x464b9e(_0x12215d);})[_0x3c52('0x21')](function(_0x19b596){logger[_0x3c52('0x14')](_0x3c52('0x20'),_0x19b596[_0x3c52('0x15')],_0x16ac81);_0x505b3(_0x5b6ed6['error'](0x1f4,_0x19b596[_0x3c52('0x15')]));});});};
\ No newline at end of file
+var _0xbf96=['moment','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./squareProject.socket','request','SquareProject,\x20%s,\x20%s','request\x20sent','SquareProject,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','ShowSquareProject','options','raw','attributes','model','include','map','then','debug','stringify','lodash','util'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xbf96,0x64));var _0x6bf9=function(_0x78f07a,_0x543a54){_0x78f07a=_0x78f07a-0x0;var _0x348bab=_0xbf96[_0x78f07a];return _0x348bab;};'use strict';var _=require(_0x6bf9('0x0'));var util=require(_0x6bf9('0x1'));var moment=require(_0x6bf9('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6bf9('0x3'))['db'];var utils=require(_0x6bf9('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x6bf9('0x5'));var jayson=require(_0x6bf9('0x6'));var client=jayson[_0x6bf9('0x7')][_0x6bf9('0x8')]({'port':0x232a});config['redis']=_[_0x6bf9('0x9')](config[_0x6bf9('0xa')],{'host':_0x6bf9('0xb'),'port':0x18eb});var socket=require(_0x6bf9('0xc'))(new Redis(config[_0x6bf9('0xa')]));require(_0x6bf9('0xd'))['register'](socket);function respondWithRpcPromise(_0x2178e6,_0x46637d,_0x10c317){return new BPromise(function(_0x596a39,_0x47b715){return client[_0x6bf9('0xe')](_0x2178e6,_0x10c317)['then'](function(_0x4e62db){logger['info'](_0x6bf9('0xf'),_0x46637d,_0x6bf9('0x10'));logger['debug'](_0x6bf9('0x11'),_0x46637d,_0x6bf9('0x10'),JSON['stringify'](_0x4e62db));if(_0x4e62db[_0x6bf9('0x12')]){if(_0x4e62db[_0x6bf9('0x12')][_0x6bf9('0x13')]===0x1f4){logger[_0x6bf9('0x12')]('SquareProject,\x20%s,\x20%s',_0x46637d,_0x4e62db['error'][_0x6bf9('0x14')]);return _0x47b715(_0x4e62db[_0x6bf9('0x12')][_0x6bf9('0x14')]);}logger['error'](_0x6bf9('0xf'),_0x46637d,_0x4e62db[_0x6bf9('0x12')][_0x6bf9('0x14')]);return _0x596a39(_0x4e62db[_0x6bf9('0x12')][_0x6bf9('0x14')]);}else{logger[_0x6bf9('0x15')]('SquareProject,\x20%s,\x20%s',_0x46637d,_0x6bf9('0x10'));_0x596a39(_0x4e62db[_0x6bf9('0x16')][_0x6bf9('0x14')]);}})[_0x6bf9('0x17')](function(_0x754841){logger[_0x6bf9('0x12')](_0x6bf9('0xf'),_0x46637d,_0x754841);_0x47b715(_0x754841);});});}exports[_0x6bf9('0x18')]=function(_0x1e0f3a){var _0x1a9906=this;return new Promise(function(_0x271053,_0x3c17e1){return db['SquareProject']['find']({'raw':_0x1e0f3a[_0x6bf9('0x19')]?_0x1e0f3a[_0x6bf9('0x19')][_0x6bf9('0x1a')]===undefined?!![]:![]:!![],'where':_0x1e0f3a[_0x6bf9('0x19')]?_0x1e0f3a[_0x6bf9('0x19')]['where']||null:null,'attributes':_0x1e0f3a['options']?_0x1e0f3a[_0x6bf9('0x19')][_0x6bf9('0x1b')]||null:null,'include':_0x1e0f3a['options']?_0x1e0f3a['options']['include']?_['map'](_0x1e0f3a[_0x6bf9('0x19')]['include'],function(_0x54d8a7){return{'model':db[_0x54d8a7[_0x6bf9('0x1c')]],'as':_0x54d8a7['as'],'attributes':_0x54d8a7[_0x6bf9('0x1b')],'include':_0x54d8a7[_0x6bf9('0x1d')]?_[_0x6bf9('0x1e')](_0x54d8a7[_0x6bf9('0x1d')],function(_0x394047){return{'model':db[_0x394047[_0x6bf9('0x1c')]],'as':_0x394047['as'],'attributes':_0x394047[_0x6bf9('0x1b')],'include':_0x394047['include']?_[_0x6bf9('0x1e')](_0x394047[_0x6bf9('0x1d')],function(_0x21c763){return{'model':db[_0x21c763[_0x6bf9('0x1c')]],'as':_0x21c763['as'],'attributes':_0x21c763[_0x6bf9('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x6bf9('0x1f')](function(_0x215d63){logger['info']('ShowSquareProject',_0x1e0f3a);logger[_0x6bf9('0x20')](_0x6bf9('0x18'),_0x1e0f3a,JSON[_0x6bf9('0x21')](_0x215d63));_0x271053(_0x215d63);})[_0x6bf9('0x17')](function(_0x48c3fd){logger[_0x6bf9('0x12')](_0x6bf9('0x18'),_0x48c3fd[_0x6bf9('0x14')],_0x1e0f3a);_0x3c17e1(_0x1a9906[_0x6bf9('0x12')](0x1f4,_0x48c3fd[_0x6bf9('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/squareProject/squareProject.socket.js b/server/api/squareProject/squareProject.socket.js
index c8a140a..da23bd8 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 _0xc2c7=['register','squareProject:','save','remove','update','emit'];(function(_0x12c9b7,_0x3ddfed){var _0x32af06=function(_0x21e34c){while(--_0x21e34c){_0x12c9b7['push'](_0x12c9b7['shift']());}};_0x32af06(++_0x3ddfed);}(_0xc2c7,0x134));var _0x7c2c=function(_0x21bfd2,_0x1151f2){_0x21bfd2=_0x21bfd2-0x0;var _0x2cfd21=_0xc2c7[_0x21bfd2];return _0x2cfd21;};'use strict';var SquareProjectEvents=require('./squareProject.events');var events=[_0x7c2c('0x0'),_0x7c2c('0x1'),_0x7c2c('0x2')];function createListener(_0x330870,_0x380d13){return function(_0x237e4d){_0x380d13[_0x7c2c('0x3')](_0x330870,_0x237e4d);};}function removeListener(_0x116f8a,_0x4bbc14){return function(){SquareProjectEvents['removeListener'](_0x116f8a,_0x4bbc14);};}exports[_0x7c2c('0x4')]=function(_0x42ecc9){for(var _0x23c038=0x0,_0x54f027=events['length'];_0x23c038<_0x54f027;_0x23c038++){var _0x5a1027=events[_0x23c038];var _0x2274cd=createListener(_0x7c2c('0x5')+_0x5a1027,_0x42ecc9);SquareProjectEvents['on'](_0x5a1027,_0x2274cd);}};
\ No newline at end of file
+var _0x2675=['register','length','squareProject:','./squareProject.events','emit','removeListener'];(function(_0x2b91c5,_0x3b6db5){var _0xbd5531=function(_0x54783d){while(--_0x54783d){_0x2b91c5['push'](_0x2b91c5['shift']());}};_0xbd5531(++_0x3b6db5);}(_0x2675,0x75));var _0x5267=function(_0x2b58fc,_0x298d6d){_0x2b58fc=_0x2b58fc-0x0;var _0x1b71dc=_0x2675[_0x2b58fc];return _0x1b71dc;};'use strict';var SquareProjectEvents=require(_0x5267('0x0'));var events=['save','remove','update'];function createListener(_0x1da342,_0x2ae442){return function(_0x57c95a){_0x2ae442[_0x5267('0x1')](_0x1da342,_0x57c95a);};}function removeListener(_0x36bdf0,_0x4e2548){return function(){SquareProjectEvents[_0x5267('0x2')](_0x36bdf0,_0x4e2548);};}exports[_0x5267('0x3')]=function(_0x4bd042){for(var _0x10f92c=0x0,_0x20f065=events[_0x5267('0x4')];_0x10f92c<_0x20f065;_0x10f92c++){var _0x527c16=events[_0x10f92c];var _0x9e0a27=createListener(_0x5267('0x5')+_0x527c16,_0x4bd042);SquareProjectEvents['on'](_0x527c16,_0x9e0a27);}};
\ No newline at end of file
diff --git a/server/api/squareRecording/index.js b/server/api/squareRecording/index.js
index 219d428..8c70f89 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 _0x935b=['/:id','show','/:id/download','download','post','create','update','delete','/:id/delete','exports','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','get','isAuthenticated','index'];(function(_0xf28b98,_0x36d514){var _0x21691a=function(_0x210ac4){while(--_0x210ac4){_0xf28b98['push'](_0xf28b98['shift']());}};_0x21691a(++_0x36d514);}(_0x935b,0xe6));var _0xb935=function(_0xc039aa,_0x3f0b98){_0xc039aa=_0xc039aa-0x0;var _0x18b155=_0x935b[_0xc039aa];return _0x18b155;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xb935('0x0'));var timeout=require(_0xb935('0x1'));var express=require(_0xb935('0x2'));var router=express['Router']();var auth=require(_0xb935('0x3'));var interaction=require(_0xb935('0x4'));var config=require(_0xb935('0x5'));var controller=require(_0xb935('0x6'));router[_0xb935('0x7')]('/',auth[_0xb935('0x8')](),controller[_0xb935('0x9')]);router['get'](_0xb935('0xa'),auth['isAuthenticated'](),controller[_0xb935('0xb')]);router[_0xb935('0x7')](_0xb935('0xc'),auth['isAuthenticated'](),controller[_0xb935('0xd')]);router[_0xb935('0xe')]('/',auth[_0xb935('0x8')](),controller[_0xb935('0xf')]);router['put'](_0xb935('0xa'),auth[_0xb935('0x8')](),controller[_0xb935('0x10')]);router[_0xb935('0x11')](_0xb935('0x12'),auth[_0xb935('0x8')](),controller['destroy']);module[_0xb935('0x13')]=router;
\ No newline at end of file
+var _0x096e=['isAuthenticated','index','/:id','show','/:id/download','download','post','create','update','/:id/delete','exports','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','get'];(function(_0x13cab0,_0x14d825){var _0x38804f=function(_0x1bffaf){while(--_0x1bffaf){_0x13cab0['push'](_0x13cab0['shift']());}};_0x38804f(++_0x14d825);}(_0x096e,0x187));var _0xe096=function(_0x952673,_0x334348){_0x952673=_0x952673-0x0;var _0x4650bb=_0x096e[_0x952673];return _0x4650bb;};'use strict';var multer=require('multer');var util=require(_0xe096('0x0'));var path=require(_0xe096('0x1'));var timeout=require(_0xe096('0x2'));var express=require('express');var router=express[_0xe096('0x3')]();var auth=require(_0xe096('0x4'));var interaction=require(_0xe096('0x5'));var config=require(_0xe096('0x6'));var controller=require(_0xe096('0x7'));router[_0xe096('0x8')]('/',auth[_0xe096('0x9')](),controller[_0xe096('0xa')]);router[_0xe096('0x8')](_0xe096('0xb'),auth[_0xe096('0x9')](),controller[_0xe096('0xc')]);router[_0xe096('0x8')](_0xe096('0xd'),auth[_0xe096('0x9')](),controller[_0xe096('0xe')]);router[_0xe096('0xf')]('/',auth['isAuthenticated'](),controller[_0xe096('0x10')]);router['put'](_0xe096('0xb'),auth[_0xe096('0x9')](),controller[_0xe096('0x11')]);router['delete'](_0xe096('0x12'),auth[_0xe096('0x9')](),controller['destroy']);module[_0xe096('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/squareRecording/squareRecording.attributes.js b/server/api/squareRecording/squareRecording.attributes.js
index 35ed8ec..c39129c 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 _0x6b5f=['savePath','substring','lastIndexOf','sequelize','STRING','VIRTUAL','getDataValue'];(function(_0x33869d,_0x5003d1){var _0x838d45=function(_0x5b877c){while(--_0x5b877c){_0x33869d['push'](_0x33869d['shift']());}};_0x838d45(++_0x5003d1);}(_0x6b5f,0x13e));var _0xf6b5=function(_0x4f510d,_0x568e09){_0x4f510d=_0x4f510d-0x0;var _0x16b81d=_0x6b5f[_0x4f510d];return _0x16b81d;};'use strict';var Sequelize=require(_0xf6b5('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0xf6b5('0x1')]},'callerid':{'type':Sequelize[_0xf6b5('0x1')]},'calleridname':{'type':Sequelize[_0xf6b5('0x1')]},'context':{'type':Sequelize[_0xf6b5('0x1')]},'extension':{'type':Sequelize[_0xf6b5('0x1')]},'priority':{'type':Sequelize[_0xf6b5('0x1')]},'accountcode':{'type':Sequelize[_0xf6b5('0x1')]},'dnid':{'type':Sequelize[_0xf6b5('0x1')]},'projectName':{'type':Sequelize[_0xf6b5('0x1')]},'saveName':{'type':Sequelize[_0xf6b5('0x1')]},'filename':{'type':Sequelize[_0xf6b5('0x1')]},'savePath':{'type':Sequelize[_0xf6b5('0x1')]},'format':{'type':Sequelize[_0xf6b5('0x2')],'get':function(){var _0x39c929='';var _0x4ebb4a=this[_0xf6b5('0x3')](_0xf6b5('0x4'));if(_0x4ebb4a){_0x39c929=_0x4ebb4a[_0xf6b5('0x5')](_0x4ebb4a[_0xf6b5('0x6')]('.'));}return _0x39c929;}}};
\ No newline at end of file
+var _0xd117=['substring','sequelize','exports','STRING','VIRTUAL','getDataValue','savePath'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xd117,0x182));var _0x7d11=function(_0x295a3d,_0x56d487){_0x295a3d=_0x295a3d-0x0;var _0x23a732=_0xd117[_0x295a3d];return _0x23a732;};'use strict';var Sequelize=require(_0x7d11('0x0'));module[_0x7d11('0x1')]={'uniqueid':{'type':Sequelize[_0x7d11('0x2')]},'callerid':{'type':Sequelize[_0x7d11('0x2')]},'calleridname':{'type':Sequelize[_0x7d11('0x2')]},'context':{'type':Sequelize[_0x7d11('0x2')]},'extension':{'type':Sequelize[_0x7d11('0x2')]},'priority':{'type':Sequelize[_0x7d11('0x2')]},'accountcode':{'type':Sequelize[_0x7d11('0x2')]},'dnid':{'type':Sequelize[_0x7d11('0x2')]},'projectName':{'type':Sequelize[_0x7d11('0x2')]},'saveName':{'type':Sequelize[_0x7d11('0x2')]},'filename':{'type':Sequelize[_0x7d11('0x2')]},'savePath':{'type':Sequelize[_0x7d11('0x2')]},'format':{'type':Sequelize[_0x7d11('0x3')],'get':function(){var _0x3c8d66='';var _0x47b5e6=this[_0x7d11('0x4')](_0x7d11('0x5'));if(_0x47b5e6){_0x3c8d66=_0x47b5e6[_0x7d11('0x6')](_0x47b5e6['lastIndexOf']('.'));}return _0x3c8d66;}}};
\ No newline at end of file
diff --git a/server/api/squareRecording/squareRecording.controller.js b/server/api/squareRecording/squareRecording.controller.js
index 4d18a2c..e53f483 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 _0xdaeb=['unlink','message','Not\x20found','Entity\x20not\x20found','cancellazione\x20fisica\x20documento\x20%s','isNil','info','File:\x20\x22','unlinkSync','.cypher','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','html-pdf','eml-format','rimraf','request-promise','moment','bluebird','mustache','path','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','apply','save','update','destroy','then','error','stack','name','index','key','model','map','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','type','VIRTUAL','filter','options','SquareRecording','includeAll','findAll','catch','show','params','rawAttributes','include','find','create','body','download','uniqueid','savePath','%s.cypher','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError','SquareRecording\x20not\x20found','filename'];(function(_0x336899,_0x11cf5c){var _0x30e589=function(_0x1ff749){while(--_0x1ff749){_0x336899['push'](_0x336899['shift']());}};_0x30e589(++_0x11cf5c);}(_0xdaeb,0x67));var _0xbdae=function(_0x2c94fb,_0x2b17f8){_0x2c94fb=_0x2c94fb-0x0;var _0x3d576f=_0xdaeb[_0x2c94fb];return _0x3d576f;};'use strict';var pdf=require(_0xbdae('0x0'));var emlformat=require(_0xbdae('0x1'));var rimraf=require(_0xbdae('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xbdae('0x3'));var moment=require(_0xbdae('0x4'));var BPromise=require(_0xbdae('0x5'));var Mustache=require(_0xbdae('0x6'));var util=require('util');var path=require(_0xbdae('0x7'));var sox=require('sox');var csv=require(_0xbdae('0x8'));var ejs=require(_0xbdae('0x9'));var fs=require('fs');var _=require(_0xbdae('0xa'));var squel=require(_0xbdae('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xbdae('0xc'));var toCsv=require(_0xbdae('0x8'));var querystring=require(_0xbdae('0xd'));var Papa=require('papaparse');var Redis=require(_0xbdae('0xe'));var authService=require(_0xbdae('0xf'));var qs=require(_0xbdae('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbdae('0x11'));var logger=require(_0xbdae('0x12'))(_0xbdae('0x13'));var utils=require(_0xbdae('0x14'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x534404,_0x11a5f7){_0x11a5f7=_0x11a5f7||0xcc;return function(_0x1037e2){if(_0x1037e2){return _0x534404[_0xbdae('0x15')](_0x11a5f7);}return _0x534404[_0xbdae('0x16')](_0x11a5f7)[_0xbdae('0x17')]();};}function respondWithResult(_0x2ba141,_0x3c32e6){_0x3c32e6=_0x3c32e6||0xc8;return function(_0x4748c3){if(_0x4748c3){return _0x2ba141['status'](_0x3c32e6)[_0xbdae('0x18')](_0x4748c3);}};}function respondWithFilteredResult(_0x27f552,_0x27fff5){return function(_0x34471d){if(_0x34471d){var _0x53fb2c=_0x34471d[_0xbdae('0x19')],_0x421ffe=_0x27fff5[_0xbdae('0x1a')],_0x4453a5=_0x27fff5[_0xbdae('0x1a')]+_0x27fff5[_0xbdae('0x1b')],_0x27af2e;if(_0x4453a5>=_0x53fb2c){_0x4453a5=_0x53fb2c;_0x27af2e=0xc8;}else{_0x27af2e=0xce;}_0x27f552[_0xbdae('0x16')](_0x27af2e);return _0x27f552[_0xbdae('0x1c')]('Content-Range',_0x421ffe+'-'+_0x4453a5+'/'+_0x53fb2c)['json'](_0x34471d);}return null;};}function patchUpdates(_0x37cba){return function(_0x1f1796){try{jsonpatch[_0xbdae('0x1d')](_0x1f1796,_0x37cba,!![]);}catch(_0x12ffcc){return BPromise['reject'](_0x12ffcc);}return _0x1f1796[_0xbdae('0x1e')]();};}function saveUpdates(_0x46cfd0,_0x19f36f){return function(_0x4c153a){if(_0x4c153a){return _0x4c153a[_0xbdae('0x1f')](_0x46cfd0)['then'](function(_0x544cc0){return _0x544cc0;});}return null;};}function removeEntity(_0x1f1d75,_0x17b301){return function(_0x4b46ca){if(_0x4b46ca){return _0x4b46ca[_0xbdae('0x20')]()[_0xbdae('0x21')](function(){_0x1f1d75[_0xbdae('0x16')](0xcc)[_0xbdae('0x17')]();});}};}function handleEntityNotFound(_0x115f39,_0xb8ec21){return function(_0x31a70d){if(!_0x31a70d){_0x115f39[_0xbdae('0x15')](0x194);}return _0x31a70d;};}function handleError(_0x4994de,_0x3044d5){_0x3044d5=_0x3044d5||0x1f4;return function(_0xc53627){logger[_0xbdae('0x22')](_0xc53627[_0xbdae('0x23')]);if(_0xc53627['name']){delete _0xc53627[_0xbdae('0x24')];}_0x4994de[_0xbdae('0x16')](_0x3044d5)['send'](_0xc53627);};}exports[_0xbdae('0x25')]=function(_0x35d0a0,_0x1864e3){var _0x3436a2={},_0x1b697e={},_0x520f5a={'count':0x0,'rows':[]};var _0x4c4241=_['map'](db['SquareRecording']['rawAttributes'],function(_0x1ef9dd){return{'name':_0x1ef9dd['fieldName'],'type':_0x1ef9dd['type'][_0xbdae('0x26')]};});_0x1b697e[_0xbdae('0x27')]=_[_0xbdae('0x28')](_0x4c4241,_0xbdae('0x24'));_0x1b697e['query']=_[_0xbdae('0x29')](_0x35d0a0[_0xbdae('0x2a')]);_0x1b697e[_0xbdae('0x2b')]=_[_0xbdae('0x2c')](_0x1b697e[_0xbdae('0x27')],_0x1b697e[_0xbdae('0x2a')]);_0x3436a2[_0xbdae('0x2d')]=_[_0xbdae('0x2c')](_0x1b697e['model'],qs[_0xbdae('0x2e')](_0x35d0a0[_0xbdae('0x2a')][_0xbdae('0x2e')]));_0x3436a2[_0xbdae('0x2d')]=_0x3436a2['attributes'][_0xbdae('0x2f')]?_0x3436a2[_0xbdae('0x2d')]:_0x1b697e['model'];if(!_0x35d0a0['query'][_0xbdae('0x30')]('nolimit')){_0x3436a2[_0xbdae('0x1b')]=qs[_0xbdae('0x1b')](_0x35d0a0[_0xbdae('0x2a')]['limit']);_0x3436a2[_0xbdae('0x1a')]=qs[_0xbdae('0x1a')](_0x35d0a0['query']['offset']);}_0x3436a2[_0xbdae('0x31')]=qs[_0xbdae('0x32')](_0x35d0a0[_0xbdae('0x2a')][_0xbdae('0x32')]);_0x3436a2[_0xbdae('0x33')]=qs['filters'](_[_0xbdae('0x34')](_0x35d0a0['query'],_0x1b697e[_0xbdae('0x2b')]));if(_0x35d0a0[_0xbdae('0x2a')]['filter']){_0x3436a2['where']=_[_0xbdae('0x35')](_0x3436a2['where'],{'$or':_[_0xbdae('0x28')](_0x4c4241,function(_0x277b8b){if(_0x277b8b[_0xbdae('0x36')]!==_0xbdae('0x37')){var _0x1b6762={};_0x1b6762[_0x277b8b[_0xbdae('0x24')]]={'$like':'%'+_0x35d0a0[_0xbdae('0x2a')][_0xbdae('0x38')]+'%'};return _0x1b6762;}})});}_0x3436a2=_['merge']({},_0x3436a2,_0x35d0a0[_0xbdae('0x39')]);var _0x48c642={'where':_0x3436a2[_0xbdae('0x33')]};return db[_0xbdae('0x3a')][_0xbdae('0x19')](_0x48c642)[_0xbdae('0x21')](function(_0x32cc99){_0x520f5a[_0xbdae('0x19')]=_0x32cc99;if(_0x35d0a0[_0xbdae('0x2a')][_0xbdae('0x3b')]){_0x3436a2['include']=[{'all':!![]}];}return db['SquareRecording'][_0xbdae('0x3c')](_0x3436a2);})[_0xbdae('0x21')](function(_0x344ab7){_0x520f5a['rows']=_0x344ab7;return _0x520f5a;})['then'](respondWithFilteredResult(_0x1864e3,_0x3436a2))[_0xbdae('0x3d')](handleError(_0x1864e3,null));};exports[_0xbdae('0x3e')]=function(_0x51e12a,_0x59e371){var _0x2d0a1e={'raw':!![],'where':{'id':_0x51e12a[_0xbdae('0x3f')]['id']}},_0x39a348={};_0x39a348[_0xbdae('0x27')]=_['keys'](db[_0xbdae('0x3a')][_0xbdae('0x40')]);_0x39a348[_0xbdae('0x2a')]=_[_0xbdae('0x29')](_0x51e12a[_0xbdae('0x2a')]);_0x39a348[_0xbdae('0x2b')]=_[_0xbdae('0x2c')](_0x39a348[_0xbdae('0x27')],_0x39a348[_0xbdae('0x2a')]);_0x2d0a1e[_0xbdae('0x2d')]=_[_0xbdae('0x2c')](_0x39a348[_0xbdae('0x27')],qs[_0xbdae('0x2e')](_0x51e12a[_0xbdae('0x2a')]['fields']));_0x2d0a1e['attributes']=_0x2d0a1e[_0xbdae('0x2d')][_0xbdae('0x2f')]?_0x2d0a1e[_0xbdae('0x2d')]:_0x39a348[_0xbdae('0x27')];if(_0x51e12a['query'][_0xbdae('0x3b')]){_0x2d0a1e[_0xbdae('0x41')]=[{'all':!![]}];}_0x2d0a1e=_[_0xbdae('0x35')]({},_0x2d0a1e,_0x51e12a['options']);return db[_0xbdae('0x3a')][_0xbdae('0x42')](_0x2d0a1e)[_0xbdae('0x21')](handleEntityNotFound(_0x59e371,null))['then'](respondWithResult(_0x59e371,null))[_0xbdae('0x3d')](handleError(_0x59e371,null));};exports[_0xbdae('0x43')]=function(_0x55b21c,_0x12e83f){return db['SquareRecording'][_0xbdae('0x43')](_0x55b21c[_0xbdae('0x44')],{})[_0xbdae('0x21')](respondWithResult(_0x12e83f,0xc9))[_0xbdae('0x3d')](handleError(_0x12e83f,null));};exports['update']=function(_0x242054,_0x3dc8f3){if(_0x242054[_0xbdae('0x44')]['id']){delete _0x242054['body']['id'];}return db[_0xbdae('0x3a')]['find']({'where':{'id':_0x242054[_0xbdae('0x3f')]['id']}})['then'](handleEntityNotFound(_0x3dc8f3,null))[_0xbdae('0x21')](saveUpdates(_0x242054[_0xbdae('0x44')],null))['then'](respondWithResult(_0x3dc8f3,null))[_0xbdae('0x3d')](handleError(_0x3dc8f3,null));};exports[_0xbdae('0x45')]=function(_0x4e8586,_0x1477bb,_0x34033e){var _0x49f222=require('../../components/encryptor');var _0x128fc5=![];var _0x383bc9={};if(_0x4e8586[_0xbdae('0x2a')][_0xbdae('0x36')]&&_0x4e8586[_0xbdae('0x2a')][_0xbdae('0x36')]===_0xbdae('0x46')){_0x383bc9[_0xbdae('0x46')]=_0x4e8586['params']['id'];}else{_0x383bc9['id']=_0x4e8586[_0xbdae('0x3f')]['id'];}return db[_0xbdae('0x3a')][_0xbdae('0x42')]({'where':_0x383bc9,'attributes':['id',_0xbdae('0x47'),'filename'],'raw':!![]})[_0xbdae('0x21')](handleEntityNotFound(_0x1477bb,null))[_0xbdae('0x21')](function(_0x1af0ed){if(_0x1af0ed){var _0xf1b925=_0x1af0ed[_0xbdae('0x47')];var _0x5031a1=util['format'](_0xbdae('0x48'),_0xf1b925);if(fs[_0xbdae('0x49')](_0x5031a1)){_0x128fc5=!![];return _0x49f222[_0xbdae('0x4a')](_0x5031a1,_0xf1b925,config[_0xbdae('0x4b')][_0xbdae('0x4c')])['then'](function(){return _0x1af0ed;});}return _0x1af0ed;}})[_0xbdae('0x21')](function(_0x534dbe){if(_0x534dbe){var _0x1a4ed1=_0x534dbe[_0xbdae('0x47')];if(!fs[_0xbdae('0x49')](_0x1a4ed1)){throw new db[(_0xbdae('0x4d'))][(_0xbdae('0x4e'))](_0xbdae('0x4f'));}if(_0x534dbe[_0xbdae('0x50')]){return _0x1477bb[_0xbdae('0x45')](_0x1a4ed1,_0x534dbe[_0xbdae('0x50')]+path['extname'](_0x1a4ed1),function(){if(_0x128fc5){fs[_0xbdae('0x51')](_0x1a4ed1);}});}else{return _0x1477bb[_0xbdae('0x45')](_0x1a4ed1,function(_0x33e9df){if(_0x128fc5){fs[_0xbdae('0x51')](_0x1a4ed1);}});}}})[_0xbdae('0x3d')](function(_0x21f5a6){if(_0x21f5a6[_0xbdae('0x52')]===_0xbdae('0x4f')){_0x1477bb[_0xbdae('0x16')](0x194)['send'](_0xbdae('0x53'));}else{return handleError(_0x1477bb,null);}});};exports[_0xbdae('0x20')]=function(_0x1e3e9,_0x575b85){return db[_0xbdae('0x3a')][_0xbdae('0x42')]({'where':{'id':_0x1e3e9[_0xbdae('0x3f')]['id']}})[_0xbdae('0x21')](function(_0x240ec9){if(!_0x240ec9)throw new ReferenceError(_0xbdae('0x54'));return _0x240ec9;})[_0xbdae('0x21')](function(_0x2b1668){var _0x4cfce4=_0x2b1668[_0xbdae('0x47')];logger['info'](_0xbdae('0x55'),_0x4cfce4);if(!_[_0xbdae('0x56')](_0x2b1668[_0xbdae('0x47')])&&fs[_0xbdae('0x49')](_0x4cfce4)){logger[_0xbdae('0x57')](_0xbdae('0x58')+_0x4cfce4+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xbdae('0x59')](_0x4cfce4);}_0x4cfce4=_0x4cfce4+_0xbdae('0x5a');if(!_['isNil'](_0x2b1668['savePath'])&&fs['existsSync'](_0x4cfce4)){logger['info'](_0xbdae('0x58')+_0x4cfce4+_0xbdae('0x5b'));fs[_0xbdae('0x59')](_0x4cfce4);}return _0x2b1668;})[_0xbdae('0x21')](function(_0x18a298){if(!_0x18a298)throw new InternalError();return _0x18a298[_0xbdae('0x20')]();})[_0xbdae('0x21')](function(){_0x575b85[_0xbdae('0x16')](0xcc)[_0xbdae('0x17')]();})[_0xbdae('0x3d')](handleError(_0x575b85,null));};
\ No newline at end of file
+var _0x8101=['fields','length','nolimit','order','sort','where','pick','merge','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','download','../../components/encryptor','uniqueid','savePath','filename','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError','SquareRecording\x20not\x20found','extname','unlink','message','send','Not\x20found','Entity\x20not\x20found','info','isNil','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','error','name','index','SquareRecording','fieldName','type','key','model','map','query','keys','filters','intersection','attributes'];(function(_0x12803e,_0x1ea690){var _0x30c5ab=function(_0x1e8ee9){while(--_0x1e8ee9){_0x12803e['push'](_0x12803e['shift']());}};_0x30c5ab(++_0x1ea690);}(_0x8101,0x8b));var _0x1810=function(_0x131585,_0x1abd33){_0x131585=_0x131585-0x0;var _0x1fcca2=_0x8101[_0x131585];return _0x1fcca2;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x1810('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1810('0x1'));var jsonpatch=require(_0x1810('0x2'));var rp=require(_0x1810('0x3'));var moment=require(_0x1810('0x4'));var BPromise=require(_0x1810('0x5'));var Mustache=require(_0x1810('0x6'));var util=require(_0x1810('0x7'));var path=require(_0x1810('0x8'));var sox=require(_0x1810('0x9'));var csv=require('to-csv');var ejs=require(_0x1810('0xa'));var fs=require('fs');var _=require(_0x1810('0xb'));var squel=require(_0x1810('0xc'));var crypto=require(_0x1810('0xd'));var jsforce=require(_0x1810('0xe'));var deskjs=require(_0x1810('0xf'));var toCsv=require('to-csv');var querystring=require(_0x1810('0x10'));var Papa=require('papaparse');var Redis=require(_0x1810('0x11'));var authService=require(_0x1810('0x12'));var qs=require(_0x1810('0x13'));var as=require(_0x1810('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1810('0x15'))(_0x1810('0x16'));var utils=require(_0x1810('0x17'));var config=require(_0x1810('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2a4b23,_0x20d9ea){_0x20d9ea=_0x20d9ea||0xcc;return function(_0x2d42a7){if(_0x2d42a7){return _0x2a4b23[_0x1810('0x19')](_0x20d9ea);}return _0x2a4b23[_0x1810('0x1a')](_0x20d9ea)[_0x1810('0x1b')]();};}function respondWithResult(_0x2d5d7b,_0xff04e7){_0xff04e7=_0xff04e7||0xc8;return function(_0x49e72c){if(_0x49e72c){return _0x2d5d7b[_0x1810('0x1a')](_0xff04e7)[_0x1810('0x1c')](_0x49e72c);}};}function respondWithFilteredResult(_0x289254,_0x5ab568){return function(_0x433e1b){if(_0x433e1b){var _0x50739f=_0x433e1b[_0x1810('0x1d')],_0x1061d5=_0x5ab568['offset'],_0x32b317=_0x5ab568[_0x1810('0x1e')]+_0x5ab568[_0x1810('0x1f')],_0x28ff35;if(_0x32b317>=_0x50739f){_0x32b317=_0x50739f;_0x28ff35=0xc8;}else{_0x28ff35=0xce;}_0x289254[_0x1810('0x1a')](_0x28ff35);return _0x289254[_0x1810('0x20')](_0x1810('0x21'),_0x1061d5+'-'+_0x32b317+'/'+_0x50739f)[_0x1810('0x1c')](_0x433e1b);}return null;};}function patchUpdates(_0x93b901){return function(_0x1e95ec){try{jsonpatch[_0x1810('0x22')](_0x1e95ec,_0x93b901,!![]);}catch(_0x4c8146){return BPromise['reject'](_0x4c8146);}return _0x1e95ec[_0x1810('0x23')]();};}function saveUpdates(_0x145761,_0x30ecbc){return function(_0x4bea98){if(_0x4bea98){return _0x4bea98[_0x1810('0x24')](_0x145761)[_0x1810('0x25')](function(_0x6b7a70){return _0x6b7a70;});}return null;};}function removeEntity(_0x25c307,_0x17ec5b){return function(_0x274c48){if(_0x274c48){return _0x274c48[_0x1810('0x26')]()['then'](function(){_0x25c307[_0x1810('0x1a')](0xcc)[_0x1810('0x1b')]();});}};}function handleEntityNotFound(_0x427c6f,_0x412fbc){return function(_0x3ae6a5){if(!_0x3ae6a5){_0x427c6f[_0x1810('0x19')](0x194);}return _0x3ae6a5;};}function handleError(_0x541cd4,_0x4e1805){_0x4e1805=_0x4e1805||0x1f4;return function(_0x484a17){logger[_0x1810('0x27')](_0x484a17['stack']);if(_0x484a17[_0x1810('0x28')]){delete _0x484a17[_0x1810('0x28')];}_0x541cd4['status'](_0x4e1805)['send'](_0x484a17);};}exports[_0x1810('0x29')]=function(_0x377366,_0x5509ba){var _0x56b5d7={},_0x4324cf={},_0x145d95={'count':0x0,'rows':[]};var _0x4be8d2=_['map'](db[_0x1810('0x2a')]['rawAttributes'],function(_0x15b831){return{'name':_0x15b831[_0x1810('0x2b')],'type':_0x15b831[_0x1810('0x2c')][_0x1810('0x2d')]};});_0x4324cf[_0x1810('0x2e')]=_[_0x1810('0x2f')](_0x4be8d2,_0x1810('0x28'));_0x4324cf[_0x1810('0x30')]=_[_0x1810('0x31')](_0x377366['query']);_0x4324cf[_0x1810('0x32')]=_[_0x1810('0x33')](_0x4324cf[_0x1810('0x2e')],_0x4324cf[_0x1810('0x30')]);_0x56b5d7[_0x1810('0x34')]=_['intersection'](_0x4324cf[_0x1810('0x2e')],qs[_0x1810('0x35')](_0x377366[_0x1810('0x30')]['fields']));_0x56b5d7[_0x1810('0x34')]=_0x56b5d7[_0x1810('0x34')][_0x1810('0x36')]?_0x56b5d7[_0x1810('0x34')]:_0x4324cf[_0x1810('0x2e')];if(!_0x377366[_0x1810('0x30')]['hasOwnProperty'](_0x1810('0x37'))){_0x56b5d7['limit']=qs[_0x1810('0x1f')](_0x377366[_0x1810('0x30')][_0x1810('0x1f')]);_0x56b5d7[_0x1810('0x1e')]=qs['offset'](_0x377366['query'][_0x1810('0x1e')]);}_0x56b5d7[_0x1810('0x38')]=qs['sort'](_0x377366[_0x1810('0x30')][_0x1810('0x39')]);_0x56b5d7[_0x1810('0x3a')]=qs[_0x1810('0x32')](_[_0x1810('0x3b')](_0x377366[_0x1810('0x30')],_0x4324cf[_0x1810('0x32')]));if(_0x377366['query']['filter']){_0x56b5d7[_0x1810('0x3a')]=_[_0x1810('0x3c')](_0x56b5d7['where'],{'$or':_[_0x1810('0x2f')](_0x4be8d2,function(_0x3d9f8c){if(_0x3d9f8c[_0x1810('0x2c')]!=='VIRTUAL'){var _0x260274={};_0x260274[_0x3d9f8c[_0x1810('0x28')]]={'$like':'%'+_0x377366[_0x1810('0x30')]['filter']+'%'};return _0x260274;}})});}_0x56b5d7=_[_0x1810('0x3c')]({},_0x56b5d7,_0x377366['options']);var _0x5859fd={'where':_0x56b5d7[_0x1810('0x3a')]};return db['SquareRecording'][_0x1810('0x1d')](_0x5859fd)[_0x1810('0x25')](function(_0x3787a0){_0x145d95['count']=_0x3787a0;if(_0x377366['query'][_0x1810('0x3d')]){_0x56b5d7[_0x1810('0x3e')]=[{'all':!![]}];}return db[_0x1810('0x2a')][_0x1810('0x3f')](_0x56b5d7);})['then'](function(_0x4d122f){_0x145d95[_0x1810('0x40')]=_0x4d122f;return _0x145d95;})[_0x1810('0x25')](respondWithFilteredResult(_0x5509ba,_0x56b5d7))[_0x1810('0x41')](handleError(_0x5509ba,null));};exports[_0x1810('0x42')]=function(_0x3c3eae,_0xc8c8ce){var _0x3d3d9a={'raw':!![],'where':{'id':_0x3c3eae[_0x1810('0x43')]['id']}},_0x19f7d6={};_0x19f7d6[_0x1810('0x2e')]=_[_0x1810('0x31')](db[_0x1810('0x2a')][_0x1810('0x44')]);_0x19f7d6[_0x1810('0x30')]=_[_0x1810('0x31')](_0x3c3eae[_0x1810('0x30')]);_0x19f7d6['filters']=_[_0x1810('0x33')](_0x19f7d6[_0x1810('0x2e')],_0x19f7d6[_0x1810('0x30')]);_0x3d3d9a['attributes']=_[_0x1810('0x33')](_0x19f7d6[_0x1810('0x2e')],qs['fields'](_0x3c3eae[_0x1810('0x30')][_0x1810('0x35')]));_0x3d3d9a['attributes']=_0x3d3d9a['attributes']['length']?_0x3d3d9a[_0x1810('0x34')]:_0x19f7d6[_0x1810('0x2e')];if(_0x3c3eae[_0x1810('0x30')][_0x1810('0x3d')]){_0x3d3d9a[_0x1810('0x3e')]=[{'all':!![]}];}_0x3d3d9a=_['merge']({},_0x3d3d9a,_0x3c3eae[_0x1810('0x45')]);return db[_0x1810('0x2a')][_0x1810('0x46')](_0x3d3d9a)['then'](handleEntityNotFound(_0xc8c8ce,null))[_0x1810('0x25')](respondWithResult(_0xc8c8ce,null))[_0x1810('0x41')](handleError(_0xc8c8ce,null));};exports[_0x1810('0x47')]=function(_0x2fd9a5,_0x20b2fc){return db[_0x1810('0x2a')][_0x1810('0x47')](_0x2fd9a5[_0x1810('0x48')],{})[_0x1810('0x25')](respondWithResult(_0x20b2fc,0xc9))[_0x1810('0x41')](handleError(_0x20b2fc,null));};exports[_0x1810('0x24')]=function(_0x481eee,_0x232e62){if(_0x481eee[_0x1810('0x48')]['id']){delete _0x481eee['body']['id'];}return db[_0x1810('0x2a')][_0x1810('0x46')]({'where':{'id':_0x481eee[_0x1810('0x43')]['id']}})[_0x1810('0x25')](handleEntityNotFound(_0x232e62,null))['then'](saveUpdates(_0x481eee['body'],null))[_0x1810('0x25')](respondWithResult(_0x232e62,null))['catch'](handleError(_0x232e62,null));};exports[_0x1810('0x49')]=function(_0x43af82,_0xd76044,_0x247e95){var _0x1dbe92=require(_0x1810('0x4a'));var _0x47b43c=![];var _0x10f180={};if(_0x43af82[_0x1810('0x30')]['type']&&_0x43af82[_0x1810('0x30')][_0x1810('0x2c')]===_0x1810('0x4b')){_0x10f180[_0x1810('0x4b')]=_0x43af82['params']['id'];}else{_0x10f180['id']=_0x43af82[_0x1810('0x43')]['id'];}return db[_0x1810('0x2a')][_0x1810('0x46')]({'where':_0x10f180,'attributes':['id',_0x1810('0x4c'),_0x1810('0x4d')],'raw':!![]})[_0x1810('0x25')](handleEntityNotFound(_0xd76044,null))['then'](function(_0x3e53ca){if(_0x3e53ca){var _0x31f70b=_0x3e53ca[_0x1810('0x4c')];var _0x4dfd8b=util['format']('%s.cypher',_0x31f70b);if(fs[_0x1810('0x4e')](_0x4dfd8b)){_0x47b43c=!![];return _0x1dbe92[_0x1810('0x4f')](_0x4dfd8b,_0x31f70b,config[_0x1810('0x50')][_0x1810('0x51')])['then'](function(){return _0x3e53ca;});}return _0x3e53ca;}})['then'](function(_0x3cd78){if(_0x3cd78){var _0x53e412=_0x3cd78[_0x1810('0x4c')];if(!fs['existsSync'](_0x53e412)){throw new db[(_0x1810('0x52'))][(_0x1810('0x53'))](_0x1810('0x54'));}if(_0x3cd78['filename']){return _0xd76044['download'](_0x53e412,_0x3cd78[_0x1810('0x4d')]+path[_0x1810('0x55')](_0x53e412),function(){if(_0x47b43c){fs[_0x1810('0x56')](_0x53e412);}});}else{return _0xd76044[_0x1810('0x49')](_0x53e412,function(_0x10041a){if(_0x47b43c){fs['unlink'](_0x53e412);}});}}})['catch'](function(_0x2de242){if(_0x2de242[_0x1810('0x57')]===_0x1810('0x54')){_0xd76044[_0x1810('0x1a')](0x194)[_0x1810('0x58')](_0x1810('0x59'));}else{return handleError(_0xd76044,null);}});};exports[_0x1810('0x26')]=function(_0x6dfada,_0x3f8a45){return db[_0x1810('0x2a')]['find']({'where':{'id':_0x6dfada['params']['id']}})[_0x1810('0x25')](function(_0x2d0c10){if(!_0x2d0c10)throw new ReferenceError(_0x1810('0x5a'));return _0x2d0c10;})['then'](function(_0x1f9f06){var _0x2d9329=_0x1f9f06[_0x1810('0x4c')];logger[_0x1810('0x5b')]('cancellazione\x20fisica\x20documento\x20%s',_0x2d9329);if(!_[_0x1810('0x5c')](_0x1f9f06[_0x1810('0x4c')])&&fs[_0x1810('0x4e')](_0x2d9329)){logger[_0x1810('0x5b')]('File:\x20\x22'+_0x2d9329+_0x1810('0x5d'));fs[_0x1810('0x5e')](_0x2d9329);}_0x2d9329=_0x2d9329+_0x1810('0x5f');if(!_[_0x1810('0x5c')](_0x1f9f06[_0x1810('0x4c')])&&fs[_0x1810('0x4e')](_0x2d9329)){logger[_0x1810('0x5b')]('File:\x20\x22'+_0x2d9329+_0x1810('0x5d'));fs['unlinkSync'](_0x2d9329);}return _0x1f9f06;})[_0x1810('0x25')](function(_0x475b4f){if(!_0x475b4f)throw new InternalError();return _0x475b4f[_0x1810('0x26')]();})[_0x1810('0x25')](function(){_0x3f8a45[_0x1810('0x1a')](0xcc)[_0x1810('0x1b')]();})[_0x1810('0x41')](handleError(_0x3f8a45,null));};
\ No newline at end of file
diff --git a/server/api/squareRecording/squareRecording.model.js b/server/api/squareRecording/squareRecording.model.js
index 891211e..ebb4082 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 _0x69d4=['util','api','moment','bluebird','path','../../config/environment','./squareRecording.attributes','exports','define','square_recordings','lodash'];(function(_0x98bf99,_0xbcb390){var _0x425aa2=function(_0x141566){while(--_0x141566){_0x98bf99['push'](_0x98bf99['shift']());}};_0x425aa2(++_0xbcb390);}(_0x69d4,0x83));var _0x469d=function(_0x15d18f,_0x126b0e){_0x15d18f=_0x15d18f-0x0;var _0xd12bf7=_0x69d4[_0x15d18f];return _0xd12bf7;};'use strict';var _=require(_0x469d('0x0'));var util=require(_0x469d('0x1'));var logger=require('../../config/logger')(_0x469d('0x2'));var moment=require(_0x469d('0x3'));var BPromise=require(_0x469d('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x469d('0x5'));var rimraf=require('rimraf');var config=require(_0x469d('0x6'));var attributes=require(_0x469d('0x7'));module[_0x469d('0x8')]=function(_0x336101,_0x3d0ec8){return _0x336101[_0x469d('0x9')]('SquareRecording',attributes,{'tableName':_0x469d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbbdd=['square_recordings','util','api','moment','rimraf','exports','define'];(function(_0x35cf0b,_0x5d4b8e){var _0x19528a=function(_0x5ecffa){while(--_0x5ecffa){_0x35cf0b['push'](_0x35cf0b['shift']());}};_0x19528a(++_0x5d4b8e);}(_0xbbdd,0x1ba));var _0xdbbd=function(_0x556bb1,_0x34830d){_0x556bb1=_0x556bb1-0x0;var _0x45455f=_0xbbdd[_0x556bb1];return _0x45455f;};'use strict';var _=require('lodash');var util=require(_0xdbbd('0x0'));var logger=require('../../config/logger')(_0xdbbd('0x1'));var moment=require(_0xdbbd('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xdbbd('0x3'));var config=require('../../config/environment');var attributes=require('./squareRecording.attributes');module[_0xdbbd('0x4')]=function(_0x103977,_0x3e81aa){return _0x103977[_0xdbbd('0x5')]('SquareRecording',attributes,{'tableName':_0xdbbd('0x6'),'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 f62fd2d..59ce1b2 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 _0x9498=['SquareRecording,\x20%s,\x20%s','request\x20sent','debug','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSquareRecording','SquareRecording','create','options','raw','then','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info'];(function(_0x1ebbff,_0x2aed50){var _0x547198=function(_0xc68520){while(--_0xc68520){_0x1ebbff['push'](_0x1ebbff['shift']());}};_0x547198(++_0x2aed50);}(_0x9498,0x178));var _0x8949=function(_0x368ffa,_0x475383){_0x368ffa=_0x368ffa-0x0;var _0x26af4d=_0x9498[_0x368ffa];return _0x26af4d;};'use strict';var _=require(_0x8949('0x0'));var util=require(_0x8949('0x1'));var moment=require(_0x8949('0x2'));var BPromise=require(_0x8949('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8949('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8949('0x5'));var logger=require(_0x8949('0x6'))(_0x8949('0x7'));var config=require(_0x8949('0x8'));var jayson=require(_0x8949('0x9'));var client=jayson[_0x8949('0xa')][_0x8949('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2458cb,_0x5da239,_0x3299ba){return new BPromise(function(_0x4aa14b,_0x523c44){return client[_0x8949('0xc')](_0x2458cb,_0x3299ba)['then'](function(_0x6edfda){logger[_0x8949('0xd')](_0x8949('0xe'),_0x5da239,_0x8949('0xf'));logger[_0x8949('0x10')](_0x8949('0x11'),_0x5da239,_0x8949('0xf'),JSON[_0x8949('0x12')](_0x6edfda));if(_0x6edfda[_0x8949('0x13')]){if(_0x6edfda[_0x8949('0x13')][_0x8949('0x14')]===0x1f4){logger['error'](_0x8949('0xe'),_0x5da239,_0x6edfda[_0x8949('0x13')][_0x8949('0x15')]);return _0x523c44(_0x6edfda['error']['message']);}logger[_0x8949('0x13')](_0x8949('0xe'),_0x5da239,_0x6edfda[_0x8949('0x13')][_0x8949('0x15')]);return _0x4aa14b(_0x6edfda[_0x8949('0x13')][_0x8949('0x15')]);}else{logger[_0x8949('0xd')]('SquareRecording,\x20%s,\x20%s',_0x5da239,'request\x20sent');_0x4aa14b(_0x6edfda[_0x8949('0x16')][_0x8949('0x15')]);}})[_0x8949('0x17')](function(_0x7c297e){logger['error'](_0x8949('0xe'),_0x5da239,_0x7c297e);_0x523c44(_0x7c297e);});});}exports[_0x8949('0x18')]=function(_0x1f6a2e){var _0x2625ec=this;return new Promise(function(_0x437007,_0x4c7e34){return db[_0x8949('0x19')][_0x8949('0x1a')](_0x1f6a2e['body'],{'raw':_0x1f6a2e['options']?_0x1f6a2e[_0x8949('0x1b')][_0x8949('0x1c')]===undefined?!![]:![]:!![]})[_0x8949('0x1d')](function(_0x4c1af2){logger[_0x8949('0xd')]('CreateSquareRecording',_0x1f6a2e);logger[_0x8949('0x10')]('CreateSquareRecording',_0x1f6a2e,JSON[_0x8949('0x12')](_0x4c1af2));_0x437007(_0x4c1af2);})['catch'](function(_0x2b17ca){logger['error'](_0x8949('0x18'),_0x2b17ca[_0x8949('0x15')],_0x1f6a2e);_0x4c7e34(_0x2625ec['error'](0x1f4,_0x2b17ca[_0x8949('0x15')]));});});};
\ No newline at end of file
+var _0xf112=['SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','body','options','raw','CreateSquareRecording','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','request','then','SquareRecording,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x335ff7,_0x3853e4){var _0x38637c=function(_0x1628f9){while(--_0x1628f9){_0x335ff7['push'](_0x335ff7['shift']());}};_0x38637c(++_0x3853e4);}(_0xf112,0x18b));var _0x2f11=function(_0x4aa4e6,_0x278c45){_0x4aa4e6=_0x4aa4e6-0x0;var _0x322588=_0xf112[_0x4aa4e6];return _0x322588;};'use strict';var _=require(_0x2f11('0x0'));var util=require(_0x2f11('0x1'));var moment=require(_0x2f11('0x2'));var BPromise=require('bluebird');var rs=require(_0x2f11('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2f11('0x4'))['db'];var utils=require(_0x2f11('0x5'));var logger=require(_0x2f11('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x2f11('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1497ee,_0x5a7c7d,_0x2fd2c9){return new BPromise(function(_0x39a93e,_0x53053f){return client[_0x2f11('0x8')](_0x1497ee,_0x2fd2c9)[_0x2f11('0x9')](function(_0x45ef92){logger['info'](_0x2f11('0xa'),_0x5a7c7d,_0x2f11('0xb'));logger[_0x2f11('0xc')](_0x2f11('0xd'),_0x5a7c7d,_0x2f11('0xb'),JSON[_0x2f11('0xe')](_0x45ef92));if(_0x45ef92[_0x2f11('0xf')]){if(_0x45ef92[_0x2f11('0xf')]['code']===0x1f4){logger[_0x2f11('0xf')]('SquareRecording,\x20%s,\x20%s',_0x5a7c7d,_0x45ef92[_0x2f11('0xf')]['message']);return _0x53053f(_0x45ef92[_0x2f11('0xf')][_0x2f11('0x10')]);}logger[_0x2f11('0xf')](_0x2f11('0xa'),_0x5a7c7d,_0x45ef92[_0x2f11('0xf')][_0x2f11('0x10')]);return _0x39a93e(_0x45ef92[_0x2f11('0xf')][_0x2f11('0x10')]);}else{logger[_0x2f11('0x11')](_0x2f11('0xa'),_0x5a7c7d,_0x2f11('0xb'));_0x39a93e(_0x45ef92[_0x2f11('0x12')][_0x2f11('0x10')]);}})[_0x2f11('0x13')](function(_0xce7ed){logger['error']('SquareRecording,\x20%s,\x20%s',_0x5a7c7d,_0xce7ed);_0x53053f(_0xce7ed);});});}exports['CreateSquareRecording']=function(_0x2624d9){var _0x5afaf9=this;return new Promise(function(_0x29e0f8,_0x21475b){return db['SquareRecording']['create'](_0x2624d9[_0x2f11('0x14')],{'raw':_0x2624d9[_0x2f11('0x15')]?_0x2624d9['options'][_0x2f11('0x16')]===undefined?!![]:![]:!![]})['then'](function(_0xc3edac){logger[_0x2f11('0x11')](_0x2f11('0x17'),_0x2624d9);logger['debug'](_0x2f11('0x17'),_0x2624d9,JSON['stringify'](_0xc3edac));_0x29e0f8(_0xc3edac);})[_0x2f11('0x13')](function(_0x327583){logger[_0x2f11('0xf')](_0x2f11('0x17'),_0x327583['message'],_0x2624d9);_0x21475b(_0x5afaf9[_0x2f11('0xf')](0x1f4,_0x327583['message']));});});};
\ No newline at end of file
diff --git a/server/api/squareReport/index.js b/server/api/squareReport/index.js
index f35fe69..b33727e 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 _0x7003=['isAuthenticated','index','/describe','describe','show','post','create','put','update','delete','/:id','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','./squareReport.controller','get'];(function(_0x357392,_0x5a6028){var _0x1d7510=function(_0x5085dd){while(--_0x5085dd){_0x357392['push'](_0x357392['shift']());}};_0x1d7510(++_0x5a6028);}(_0x7003,0xd3));var _0x3700=function(_0x131585,_0x1abd33){_0x131585=_0x131585-0x0;var _0x1fcca2=_0x7003[_0x131585];return _0x1fcca2;};'use strict';var multer=require(_0x3700('0x0'));var util=require(_0x3700('0x1'));var path=require(_0x3700('0x2'));var timeout=require(_0x3700('0x3'));var express=require(_0x3700('0x4'));var router=express[_0x3700('0x5')]();var auth=require(_0x3700('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x3700('0x7'));router[_0x3700('0x8')]('/',auth[_0x3700('0x9')](),controller[_0x3700('0xa')]);router[_0x3700('0x8')](_0x3700('0xb'),auth['isAuthenticated'](),controller[_0x3700('0xc')]);router[_0x3700('0x8')]('/:id',auth[_0x3700('0x9')](),controller[_0x3700('0xd')]);router[_0x3700('0xe')]('/',auth[_0x3700('0x9')](),controller[_0x3700('0xf')]);router[_0x3700('0x10')]('/:id',auth[_0x3700('0x9')](),controller[_0x3700('0x11')]);router[_0x3700('0x12')](_0x3700('0x13'),auth['isAuthenticated'](),controller[_0x3700('0x14')]);module[_0x3700('0x15')]=router;
\ No newline at end of file
+var _0xdbca=['isAuthenticated','index','/describe','/:id','show','create','delete','destroy','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReport.controller','get'];(function(_0xb415cd,_0x2ab863){var _0xf81f02=function(_0x10b35d){while(--_0x10b35d){_0xb415cd['push'](_0xb415cd['shift']());}};_0xf81f02(++_0x2ab863);}(_0xdbca,0xe0));var _0xadbc=function(_0x14bf63,_0xdbd373){_0x14bf63=_0x14bf63-0x0;var _0x410d22=_0xdbca[_0x14bf63];return _0x410d22;};'use strict';var multer=require(_0xadbc('0x0'));var util=require(_0xadbc('0x1'));var path=require('path');var timeout=require(_0xadbc('0x2'));var express=require(_0xadbc('0x3'));var router=express[_0xadbc('0x4')]();var auth=require(_0xadbc('0x5'));var interaction=require(_0xadbc('0x6'));var config=require(_0xadbc('0x7'));var controller=require(_0xadbc('0x8'));router[_0xadbc('0x9')]('/',auth[_0xadbc('0xa')](),controller[_0xadbc('0xb')]);router[_0xadbc('0x9')](_0xadbc('0xc'),auth[_0xadbc('0xa')](),controller['describe']);router[_0xadbc('0x9')](_0xadbc('0xd'),auth['isAuthenticated'](),controller[_0xadbc('0xe')]);router['post']('/',auth[_0xadbc('0xa')](),controller[_0xadbc('0xf')]);router['put'](_0xadbc('0xd'),auth[_0xadbc('0xa')](),controller['update']);router[_0xadbc('0x10')](_0xadbc('0xd'),auth[_0xadbc('0xa')](),controller[_0xadbc('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.attributes.js b/server/api/squareReport/squareReport.attributes.js
index c4f6b8f..1062cbb 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 _0x95e8=['exports','STRING','BOOLEAN'];(function(_0x8426a0,_0x183ad8){var _0x4f71e3=function(_0x3df1bb){while(--_0x3df1bb){_0x8426a0['push'](_0x8426a0['shift']());}};_0x4f71e3(++_0x183ad8);}(_0x95e8,0x162));var _0x895e=function(_0x2f41bf,_0x15ecbc){_0x2f41bf=_0x2f41bf-0x0;var _0xc96646=_0x95e8[_0x2f41bf];return _0xc96646;};'use strict';var Sequelize=require('sequelize');module[_0x895e('0x0')]={'network':{'type':Sequelize['STRING']},'network_script':{'type':Sequelize[_0x895e('0x1')]},'request':{'type':Sequelize[_0x895e('0x1')]},'channel':{'type':Sequelize[_0x895e('0x1')]},'language':{'type':Sequelize[_0x895e('0x1')]},'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x895e('0x1')]},'version':{'type':Sequelize[_0x895e('0x1')]},'callerid':{'type':Sequelize[_0x895e('0x1')]},'calleridname':{'type':Sequelize[_0x895e('0x1')]},'callingpres':{'type':Sequelize[_0x895e('0x1')]},'callingani2':{'type':Sequelize[_0x895e('0x1')]},'callington':{'type':Sequelize[_0x895e('0x1')]},'callingtns':{'type':Sequelize[_0x895e('0x1')]},'dnid':{'type':Sequelize[_0x895e('0x1')]},'rdnis':{'type':Sequelize[_0x895e('0x1')]},'context':{'type':Sequelize[_0x895e('0x1')]},'extension':{'type':Sequelize[_0x895e('0x1')]},'priority':{'type':Sequelize[_0x895e('0x1')]},'enhanced':{'type':Sequelize[_0x895e('0x1')]},'accountcode':{'type':Sequelize[_0x895e('0x1')]},'threadid':{'type':Sequelize[_0x895e('0x1')]},'project_name':{'type':Sequelize[_0x895e('0x1')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize['DATE']},'bot':{'type':Sequelize[_0x895e('0x2')],'defaultValue':![]}};
\ No newline at end of file
+var _0x0425=['STRING','DATE','BOOLEAN','sequelize','exports'];(function(_0x4d5711,_0x36e2f3){var _0x57352e=function(_0x229d40){while(--_0x229d40){_0x4d5711['push'](_0x4d5711['shift']());}};_0x57352e(++_0x36e2f3);}(_0x0425,0xee));var _0x5042=function(_0x29148b,_0xff9fa8){_0x29148b=_0x29148b-0x0;var _0x2df13c=_0x0425[_0x29148b];return _0x2df13c;};'use strict';var Sequelize=require(_0x5042('0x0'));module[_0x5042('0x1')]={'network':{'type':Sequelize[_0x5042('0x2')]},'network_script':{'type':Sequelize['STRING']},'request':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x5042('0x2')]},'language':{'type':Sequelize[_0x5042('0x2')]},'type':{'type':Sequelize[_0x5042('0x2')]},'uniqueid':{'type':Sequelize[_0x5042('0x2')]},'version':{'type':Sequelize[_0x5042('0x2')]},'callerid':{'type':Sequelize[_0x5042('0x2')]},'calleridname':{'type':Sequelize[_0x5042('0x2')]},'callingpres':{'type':Sequelize['STRING']},'callingani2':{'type':Sequelize[_0x5042('0x2')]},'callington':{'type':Sequelize[_0x5042('0x2')]},'callingtns':{'type':Sequelize[_0x5042('0x2')]},'dnid':{'type':Sequelize[_0x5042('0x2')]},'rdnis':{'type':Sequelize[_0x5042('0x2')]},'context':{'type':Sequelize[_0x5042('0x2')]},'extension':{'type':Sequelize[_0x5042('0x2')]},'priority':{'type':Sequelize[_0x5042('0x2')]},'enhanced':{'type':Sequelize[_0x5042('0x2')]},'accountcode':{'type':Sequelize['STRING']},'threadid':{'type':Sequelize[_0x5042('0x2')]},'project_name':{'type':Sequelize[_0x5042('0x2')]},'joinAt':{'type':Sequelize[_0x5042('0x3')]},'leaveAt':{'type':Sequelize['DATE']},'bot':{'type':Sequelize[_0x5042('0x4')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.controller.js b/server/api/squareReport/squareReport.controller.js
index 97aa7fb..a1c886b 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 _0x9957=['eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','set','Content-Range','reject','save','then','destroy','error','stack','name','send','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','fields','attributes','pick','filter','where','merge','VIRTUAL','options','SquareReport','count','includeAll','include','findAll','rows','show','find','catch','create','body','update','params','describe','html-pdf'];(function(_0x6e27ff,_0x342684){var _0x426fe0=function(_0x5b309f){while(--_0x5b309f){_0x6e27ff['push'](_0x6e27ff['shift']());}};_0x426fe0(++_0x342684);}(_0x9957,0x93));var _0x7995=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9957[_0x2dafbe];return _0x58a45a;};'use strict';var pdf=require(_0x7995('0x0'));var emlformat=require(_0x7995('0x1'));var rimraf=require(_0x7995('0x2'));var zipdir=require(_0x7995('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7995('0x4'));var moment=require(_0x7995('0x5'));var BPromise=require(_0x7995('0x6'));var Mustache=require(_0x7995('0x7'));var util=require('util');var path=require(_0x7995('0x8'));var sox=require(_0x7995('0x9'));var csv=require(_0x7995('0xa'));var ejs=require(_0x7995('0xb'));var fs=require('fs');var _=require(_0x7995('0xc'));var squel=require(_0x7995('0xd'));var crypto=require('crypto');var jsforce=require(_0x7995('0xe'));var deskjs=require(_0x7995('0xf'));var toCsv=require('to-csv');var querystring=require(_0x7995('0x10'));var Papa=require(_0x7995('0x11'));var Redis=require(_0x7995('0x12'));var authService=require(_0x7995('0x13'));var qs=require(_0x7995('0x14'));var as=require(_0x7995('0x15'));var hardwareService=require(_0x7995('0x16'));var logger=require('../../config/logger')(_0x7995('0x17'));var utils=require(_0x7995('0x18'));var config=require('../../config/environment');var db=require(_0x7995('0x19'))['db'];function respondWithStatusCode(_0x2cb37a,_0x19a27e){_0x19a27e=_0x19a27e||0xcc;return function(_0x385f00){if(_0x385f00){return _0x2cb37a[_0x7995('0x1a')](_0x19a27e);}return _0x2cb37a[_0x7995('0x1b')](_0x19a27e)[_0x7995('0x1c')]();};}function respondWithResult(_0x4cc004,_0x58f5ad){_0x58f5ad=_0x58f5ad||0xc8;return function(_0x2b4e94){if(_0x2b4e94){return _0x4cc004[_0x7995('0x1b')](_0x58f5ad)[_0x7995('0x1d')](_0x2b4e94);}};}function respondWithFilteredResult(_0x321ae8,_0x3f1d3e){return function(_0x1a5310){if(_0x1a5310){var _0x2202ce=_0x1a5310['count'],_0x41cbf0=_0x3f1d3e[_0x7995('0x1e')],_0x5377e5=_0x3f1d3e[_0x7995('0x1e')]+_0x3f1d3e[_0x7995('0x1f')],_0x2eeacc;if(_0x5377e5>=_0x2202ce){_0x5377e5=_0x2202ce;_0x2eeacc=0xc8;}else{_0x2eeacc=0xce;}_0x321ae8[_0x7995('0x1b')](_0x2eeacc);return _0x321ae8[_0x7995('0x20')](_0x7995('0x21'),_0x41cbf0+'-'+_0x5377e5+'/'+_0x2202ce)['json'](_0x1a5310);}return null;};}function patchUpdates(_0x54c9ae){return function(_0x2536c8){try{jsonpatch['apply'](_0x2536c8,_0x54c9ae,!![]);}catch(_0x555f74){return BPromise[_0x7995('0x22')](_0x555f74);}return _0x2536c8[_0x7995('0x23')]();};}function saveUpdates(_0x4cbe10,_0x3a9b54){return function(_0x51f276){if(_0x51f276){return _0x51f276['update'](_0x4cbe10)[_0x7995('0x24')](function(_0x327b1f){return _0x327b1f;});}return null;};}function removeEntity(_0x350fd9,_0x1a8568){return function(_0x460924){if(_0x460924){return _0x460924[_0x7995('0x25')]()['then'](function(){_0x350fd9[_0x7995('0x1b')](0xcc)[_0x7995('0x1c')]();});}};}function handleEntityNotFound(_0x204507,_0x285437){return function(_0x563799){if(!_0x563799){_0x204507[_0x7995('0x1a')](0x194);}return _0x563799;};}function handleError(_0x475351,_0x472195){_0x472195=_0x472195||0x1f4;return function(_0x59405a){logger[_0x7995('0x26')](_0x59405a[_0x7995('0x27')]);if(_0x59405a[_0x7995('0x28')]){delete _0x59405a[_0x7995('0x28')];}_0x475351[_0x7995('0x1b')](_0x472195)[_0x7995('0x29')](_0x59405a);};}exports['index']=function(_0x47625f,_0x5911c3){var _0x229742={},_0x49bc7e={},_0xf16cc2={'count':0x0,'rows':[]};var _0x132a42=_[_0x7995('0x2a')](db['SquareReport'][_0x7995('0x2b')],function(_0x514445){return{'name':_0x514445[_0x7995('0x2c')],'type':_0x514445[_0x7995('0x2d')][_0x7995('0x2e')]};});_0x49bc7e['model']=_['map'](_0x132a42,'name');_0x49bc7e[_0x7995('0x2f')]=_[_0x7995('0x30')](_0x47625f[_0x7995('0x2f')]);_0x49bc7e[_0x7995('0x31')]=_[_0x7995('0x32')](_0x49bc7e[_0x7995('0x33')],_0x49bc7e['query']);_0x229742['attributes']=_[_0x7995('0x32')](_0x49bc7e['model'],qs[_0x7995('0x34')](_0x47625f[_0x7995('0x2f')][_0x7995('0x34')]));_0x229742[_0x7995('0x35')]=_0x229742[_0x7995('0x35')]['length']?_0x229742[_0x7995('0x35')]:_0x49bc7e[_0x7995('0x33')];if(!_0x47625f['query']['hasOwnProperty']('nolimit')){_0x229742[_0x7995('0x1f')]=qs[_0x7995('0x1f')](_0x47625f['query'][_0x7995('0x1f')]);_0x229742['offset']=qs[_0x7995('0x1e')](_0x47625f[_0x7995('0x2f')][_0x7995('0x1e')]);}_0x229742['order']=qs['sort'](_0x47625f[_0x7995('0x2f')]['sort']);_0x229742['where']=qs[_0x7995('0x31')](_[_0x7995('0x36')](_0x47625f['query'],_0x49bc7e[_0x7995('0x31')]));if(_0x47625f[_0x7995('0x2f')][_0x7995('0x37')]){_0x229742[_0x7995('0x38')]=_[_0x7995('0x39')](_0x229742['where'],{'$or':_[_0x7995('0x2a')](_0x132a42,function(_0x242713){if(_0x242713[_0x7995('0x2d')]!==_0x7995('0x3a')){var _0x4b1541={};_0x4b1541[_0x242713[_0x7995('0x28')]]={'$like':'%'+_0x47625f[_0x7995('0x2f')][_0x7995('0x37')]+'%'};return _0x4b1541;}})});}_0x229742=_[_0x7995('0x39')]({},_0x229742,_0x47625f[_0x7995('0x3b')]);var _0x1035dc={'where':_0x229742['where']};return db[_0x7995('0x3c')][_0x7995('0x3d')](_0x1035dc)[_0x7995('0x24')](function(_0x2ea47f){_0xf16cc2[_0x7995('0x3d')]=_0x2ea47f;if(_0x47625f[_0x7995('0x2f')][_0x7995('0x3e')]){_0x229742[_0x7995('0x3f')]=[{'all':!![]}];}return db[_0x7995('0x3c')][_0x7995('0x40')](_0x229742);})[_0x7995('0x24')](function(_0x270d52){_0xf16cc2[_0x7995('0x41')]=_0x270d52;return _0xf16cc2;})['then'](respondWithFilteredResult(_0x5911c3,_0x229742))['catch'](handleError(_0x5911c3,null));};exports[_0x7995('0x42')]=function(_0x7325e8,_0x58523e){var _0x4b0855={'raw':!![],'where':{'id':_0x7325e8['params']['id']}},_0x3f8522={};_0x3f8522['model']=_[_0x7995('0x30')](db[_0x7995('0x3c')][_0x7995('0x2b')]);_0x3f8522['query']=_[_0x7995('0x30')](_0x7325e8['query']);_0x3f8522[_0x7995('0x31')]=_['intersection'](_0x3f8522['model'],_0x3f8522[_0x7995('0x2f')]);_0x4b0855[_0x7995('0x35')]=_[_0x7995('0x32')](_0x3f8522[_0x7995('0x33')],qs['fields'](_0x7325e8[_0x7995('0x2f')][_0x7995('0x34')]));_0x4b0855[_0x7995('0x35')]=_0x4b0855[_0x7995('0x35')]['length']?_0x4b0855['attributes']:_0x3f8522[_0x7995('0x33')];if(_0x7325e8['query'][_0x7995('0x3e')]){_0x4b0855['include']=[{'all':!![]}];}_0x4b0855=_[_0x7995('0x39')]({},_0x4b0855,_0x7325e8['options']);return db[_0x7995('0x3c')][_0x7995('0x43')](_0x4b0855)['then'](handleEntityNotFound(_0x58523e,null))[_0x7995('0x24')](respondWithResult(_0x58523e,null))[_0x7995('0x44')](handleError(_0x58523e,null));};exports[_0x7995('0x45')]=function(_0xb70a51,_0x4c6837){return db[_0x7995('0x3c')][_0x7995('0x45')](_0xb70a51[_0x7995('0x46')],{})['then'](respondWithResult(_0x4c6837,0xc9))[_0x7995('0x44')](handleError(_0x4c6837,null));};exports[_0x7995('0x47')]=function(_0x511567,_0x3d8ae3){if(_0x511567[_0x7995('0x46')]['id']){delete _0x511567['body']['id'];}return db[_0x7995('0x3c')][_0x7995('0x43')]({'where':{'id':_0x511567['params']['id']}})[_0x7995('0x24')](handleEntityNotFound(_0x3d8ae3,null))['then'](saveUpdates(_0x511567[_0x7995('0x46')],null))[_0x7995('0x24')](respondWithResult(_0x3d8ae3,null))[_0x7995('0x44')](handleError(_0x3d8ae3,null));};exports[_0x7995('0x25')]=function(_0xddf537,_0x14b537){return db[_0x7995('0x3c')]['find']({'where':{'id':_0xddf537[_0x7995('0x48')]['id']}})[_0x7995('0x24')](handleEntityNotFound(_0x14b537,null))[_0x7995('0x24')](removeEntity(_0x14b537,null))['catch'](handleError(_0x14b537,null));};exports[_0x7995('0x49')]=function(_0x1fe77e,_0x12d4b8){return db['SquareReport']['describe']()['then'](respondWithResult(_0x12d4b8,null))[_0x7995('0x44')](handleError(_0x12d4b8,null));};
\ No newline at end of file
+var _0x1261=['model','fields','attributes','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','type','merge','options','includeAll','findAll','rows','show','params','keys','length','include','catch','create','body','update','find','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','Content-Range','apply','reject','save','then','error','stack','name','index','SquareReport','rawAttributes','fieldName','key','map','query','intersection'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x1261,0x144));var _0x1126=function(_0xc83285,_0x3860f3){_0xc83285=_0xc83285-0x0;var _0x59ef36=_0x1261[_0xc83285];return _0x59ef36;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x1126('0x0'));var rimraf=require(_0x1126('0x1'));var zipdir=require(_0x1126('0x2'));var jsonpatch=require(_0x1126('0x3'));var rp=require(_0x1126('0x4'));var moment=require(_0x1126('0x5'));var BPromise=require(_0x1126('0x6'));var Mustache=require(_0x1126('0x7'));var util=require(_0x1126('0x8'));var path=require(_0x1126('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x1126('0xa'));var fs=require('fs');var _=require(_0x1126('0xb'));var squel=require('squel');var crypto=require(_0x1126('0xc'));var jsforce=require(_0x1126('0xd'));var deskjs=require(_0x1126('0xe'));var toCsv=require(_0x1126('0xf'));var querystring=require(_0x1126('0x10'));var Papa=require('papaparse');var Redis=require(_0x1126('0x11'));var authService=require(_0x1126('0x12'));var qs=require(_0x1126('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1126('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x1126('0x15'));var config=require('../../config/environment');var db=require(_0x1126('0x16'))['db'];function respondWithStatusCode(_0x1b364a,_0xd26a32){_0xd26a32=_0xd26a32||0xcc;return function(_0x273896){if(_0x273896){return _0x1b364a[_0x1126('0x17')](_0xd26a32);}return _0x1b364a[_0x1126('0x18')](_0xd26a32)[_0x1126('0x19')]();};}function respondWithResult(_0x2048ad,_0x43850b){_0x43850b=_0x43850b||0xc8;return function(_0x53a8f0){if(_0x53a8f0){return _0x2048ad['status'](_0x43850b)[_0x1126('0x1a')](_0x53a8f0);}};}function respondWithFilteredResult(_0x154e20,_0x279455){return function(_0x4be0c6){if(_0x4be0c6){var _0x45149c=_0x4be0c6[_0x1126('0x1b')],_0x4794a7=_0x279455['offset'],_0x35fe9f=_0x279455[_0x1126('0x1c')]+_0x279455[_0x1126('0x1d')],_0x42f379;if(_0x35fe9f>=_0x45149c){_0x35fe9f=_0x45149c;_0x42f379=0xc8;}else{_0x42f379=0xce;}_0x154e20['status'](_0x42f379);return _0x154e20['set'](_0x1126('0x1e'),_0x4794a7+'-'+_0x35fe9f+'/'+_0x45149c)[_0x1126('0x1a')](_0x4be0c6);}return null;};}function patchUpdates(_0x58d11a){return function(_0x548359){try{jsonpatch[_0x1126('0x1f')](_0x548359,_0x58d11a,!![]);}catch(_0x58b109){return BPromise[_0x1126('0x20')](_0x58b109);}return _0x548359[_0x1126('0x21')]();};}function saveUpdates(_0x2f70ac,_0x54400a){return function(_0x2a08ba){if(_0x2a08ba){return _0x2a08ba['update'](_0x2f70ac)['then'](function(_0x30f6b3){return _0x30f6b3;});}return null;};}function removeEntity(_0x3a9bed,_0x25b24b){return function(_0x36d254){if(_0x36d254){return _0x36d254['destroy']()[_0x1126('0x22')](function(){_0x3a9bed[_0x1126('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2175fa,_0x59cd8e){return function(_0x529dd9){if(!_0x529dd9){_0x2175fa['sendStatus'](0x194);}return _0x529dd9;};}function handleError(_0x2199d9,_0x15bcc3){_0x15bcc3=_0x15bcc3||0x1f4;return function(_0x329914){logger[_0x1126('0x23')](_0x329914[_0x1126('0x24')]);if(_0x329914[_0x1126('0x25')]){delete _0x329914[_0x1126('0x25')];}_0x2199d9[_0x1126('0x18')](_0x15bcc3)['send'](_0x329914);};}exports[_0x1126('0x26')]=function(_0x375e59,_0xa293f4){var _0x5ddf63={},_0x541bc9={},_0xeb7d89={'count':0x0,'rows':[]};var _0x39bf0e=_['map'](db[_0x1126('0x27')][_0x1126('0x28')],function(_0x4a334a){return{'name':_0x4a334a[_0x1126('0x29')],'type':_0x4a334a['type'][_0x1126('0x2a')]};});_0x541bc9['model']=_[_0x1126('0x2b')](_0x39bf0e,'name');_0x541bc9[_0x1126('0x2c')]=_['keys'](_0x375e59['query']);_0x541bc9['filters']=_[_0x1126('0x2d')](_0x541bc9[_0x1126('0x2e')],_0x541bc9[_0x1126('0x2c')]);_0x5ddf63['attributes']=_[_0x1126('0x2d')](_0x541bc9[_0x1126('0x2e')],qs['fields'](_0x375e59[_0x1126('0x2c')][_0x1126('0x2f')]));_0x5ddf63[_0x1126('0x30')]=_0x5ddf63[_0x1126('0x30')]['length']?_0x5ddf63['attributes']:_0x541bc9[_0x1126('0x2e')];if(!_0x375e59[_0x1126('0x2c')][_0x1126('0x31')](_0x1126('0x32'))){_0x5ddf63['limit']=qs[_0x1126('0x1d')](_0x375e59[_0x1126('0x2c')][_0x1126('0x1d')]);_0x5ddf63[_0x1126('0x1c')]=qs[_0x1126('0x1c')](_0x375e59['query'][_0x1126('0x1c')]);}_0x5ddf63[_0x1126('0x33')]=qs[_0x1126('0x34')](_0x375e59[_0x1126('0x2c')]['sort']);_0x5ddf63['where']=qs[_0x1126('0x35')](_[_0x1126('0x36')](_0x375e59['query'],_0x541bc9[_0x1126('0x35')]));if(_0x375e59[_0x1126('0x2c')][_0x1126('0x37')]){_0x5ddf63['where']=_['merge'](_0x5ddf63[_0x1126('0x38')],{'$or':_[_0x1126('0x2b')](_0x39bf0e,function(_0x3aa08f){if(_0x3aa08f[_0x1126('0x39')]!=='VIRTUAL'){var _0x428d3d={};_0x428d3d[_0x3aa08f['name']]={'$like':'%'+_0x375e59[_0x1126('0x2c')][_0x1126('0x37')]+'%'};return _0x428d3d;}})});}_0x5ddf63=_[_0x1126('0x3a')]({},_0x5ddf63,_0x375e59[_0x1126('0x3b')]);var _0x57e5d2={'where':_0x5ddf63['where']};return db[_0x1126('0x27')][_0x1126('0x1b')](_0x57e5d2)[_0x1126('0x22')](function(_0x397e3b){_0xeb7d89[_0x1126('0x1b')]=_0x397e3b;if(_0x375e59[_0x1126('0x2c')][_0x1126('0x3c')]){_0x5ddf63['include']=[{'all':!![]}];}return db[_0x1126('0x27')][_0x1126('0x3d')](_0x5ddf63);})[_0x1126('0x22')](function(_0xf3a0bd){_0xeb7d89[_0x1126('0x3e')]=_0xf3a0bd;return _0xeb7d89;})['then'](respondWithFilteredResult(_0xa293f4,_0x5ddf63))['catch'](handleError(_0xa293f4,null));};exports[_0x1126('0x3f')]=function(_0x219bcc,_0xcee9de){var _0x21c38e={'raw':!![],'where':{'id':_0x219bcc[_0x1126('0x40')]['id']}},_0x18b496={};_0x18b496['model']=_['keys'](db['SquareReport'][_0x1126('0x28')]);_0x18b496['query']=_[_0x1126('0x41')](_0x219bcc[_0x1126('0x2c')]);_0x18b496[_0x1126('0x35')]=_[_0x1126('0x2d')](_0x18b496['model'],_0x18b496['query']);_0x21c38e[_0x1126('0x30')]=_[_0x1126('0x2d')](_0x18b496[_0x1126('0x2e')],qs['fields'](_0x219bcc[_0x1126('0x2c')]['fields']));_0x21c38e[_0x1126('0x30')]=_0x21c38e['attributes'][_0x1126('0x42')]?_0x21c38e[_0x1126('0x30')]:_0x18b496[_0x1126('0x2e')];if(_0x219bcc['query'][_0x1126('0x3c')]){_0x21c38e[_0x1126('0x43')]=[{'all':!![]}];}_0x21c38e=_[_0x1126('0x3a')]({},_0x21c38e,_0x219bcc['options']);return db['SquareReport']['find'](_0x21c38e)[_0x1126('0x22')](handleEntityNotFound(_0xcee9de,null))['then'](respondWithResult(_0xcee9de,null))[_0x1126('0x44')](handleError(_0xcee9de,null));};exports['create']=function(_0x2f45b9,_0x323499){return db[_0x1126('0x27')][_0x1126('0x45')](_0x2f45b9[_0x1126('0x46')],{})['then'](respondWithResult(_0x323499,0xc9))[_0x1126('0x44')](handleError(_0x323499,null));};exports[_0x1126('0x47')]=function(_0x5111d3,_0x1a15f8){if(_0x5111d3[_0x1126('0x46')]['id']){delete _0x5111d3['body']['id'];}return db[_0x1126('0x27')][_0x1126('0x48')]({'where':{'id':_0x5111d3['params']['id']}})[_0x1126('0x22')](handleEntityNotFound(_0x1a15f8,null))[_0x1126('0x22')](saveUpdates(_0x5111d3[_0x1126('0x46')],null))['then'](respondWithResult(_0x1a15f8,null))[_0x1126('0x44')](handleError(_0x1a15f8,null));};exports[_0x1126('0x49')]=function(_0x411c89,_0x5878bb){return db[_0x1126('0x27')][_0x1126('0x48')]({'where':{'id':_0x411c89[_0x1126('0x40')]['id']}})[_0x1126('0x22')](handleEntityNotFound(_0x5878bb,null))['then'](removeEntity(_0x5878bb,null))[_0x1126('0x44')](handleError(_0x5878bb,null));};exports['describe']=function(_0x40168e,_0x2ad118){return db['SquareReport']['describe']()[_0x1126('0x22')](respondWithResult(_0x2ad118,null))[_0x1126('0x44')](handleError(_0x2ad118,null));};
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.model.js b/server/api/squareReport/squareReport.model.js
index f9a4904..4810912 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 _0xcb63=['project_name','leaveAt','lodash','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./squareReport.attributes','exports','define','report_square','uniqueid'];(function(_0x4a5516,_0x4cf973){var _0x161148=function(_0xe05e8a){while(--_0xe05e8a){_0x4a5516['push'](_0x4a5516['shift']());}};_0x161148(++_0x4cf973);}(_0xcb63,0xfe));var _0x3cb6=function(_0x6f0747,_0x1187fb){_0x6f0747=_0x6f0747-0x0;var _0x290e29=_0xcb63[_0x6f0747];return _0x290e29;};'use strict';var _=require(_0x3cb6('0x0'));var util=require('util');var logger=require(_0x3cb6('0x1'))(_0x3cb6('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x3cb6('0x3'));var fs=require('fs');var path=require(_0x3cb6('0x4'));var rimraf=require(_0x3cb6('0x5'));var config=require(_0x3cb6('0x6'));var attributes=require(_0x3cb6('0x7'));module[_0x3cb6('0x8')]=function(_0x1f6b28,_0x1a3993){return _0x1f6b28[_0x3cb6('0x9')]('SquareReport',attributes,{'tableName':_0x3cb6('0xa'),'paranoid':![],'indexes':[{'name':'uid_pname','fields':[_0x3cb6('0xb'),_0x3cb6('0xc')]},{'name':_0x3cb6('0xd'),'fields':['leaveAt']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd7ca=['SquareReport','report_square','uid_pname','uniqueid','project_name','leaveAt','lodash','util','moment','bluebird','request-promise','rimraf','../../config/environment','./squareReport.attributes','exports'];(function(_0x4e4ee0,_0x66ce4f){var _0x2a413d=function(_0x713bbc){while(--_0x713bbc){_0x4e4ee0['push'](_0x4e4ee0['shift']());}};_0x2a413d(++_0x66ce4f);}(_0xd7ca,0x114));var _0xad7c=function(_0x1e82c3,_0x22c51e){_0x1e82c3=_0x1e82c3-0x0;var _0xaafd9f=_0xd7ca[_0x1e82c3];return _0xaafd9f;};'use strict';var _=require(_0xad7c('0x0'));var util=require(_0xad7c('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xad7c('0x2'));var BPromise=require(_0xad7c('0x3'));var rp=require(_0xad7c('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xad7c('0x5'));var config=require(_0xad7c('0x6'));var attributes=require(_0xad7c('0x7'));module[_0xad7c('0x8')]=function(_0x4d00d6,_0x4a5db7){return _0x4d00d6['define'](_0xad7c('0x9'),attributes,{'tableName':_0xad7c('0xa'),'paranoid':![],'indexes':[{'name':_0xad7c('0xb'),'fields':[_0xad7c('0xc'),_0xad7c('0xd')]},{'name':_0xad7c('0xe'),'fields':['leaveAt']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/squareReport/squareReport.rpc.js b/server/api/squareReport/squareReport.rpc.js
index e5ce573..c4e83f7 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 _0x513f=['bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','SquareReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','result','catch','CreateSquareReport','SquareReport','create','body','raw','stringify','UpdateSquareReport','update','options','where','limit','lodash','util','moment'];(function(_0xbef9f0,_0x19f66a){var _0x26624f=function(_0x4fa307){while(--_0x4fa307){_0xbef9f0['push'](_0xbef9f0['shift']());}};_0x26624f(++_0x19f66a);}(_0x513f,0x85));var _0xf513=function(_0x1d4276,_0x14f651){_0x1d4276=_0x1d4276-0x0;var _0x198b73=_0x513f[_0x1d4276];return _0x198b73;};'use strict';var _=require(_0xf513('0x0'));var util=require(_0xf513('0x1'));var moment=require(_0xf513('0x2'));var BPromise=require(_0xf513('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf513('0x4'));var db=require(_0xf513('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xf513('0x6'))(_0xf513('0x7'));var config=require(_0xf513('0x8'));var jayson=require(_0xf513('0x9'));var client=jayson[_0xf513('0xa')][_0xf513('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4958e9,_0x118788,_0x368f2a){return new BPromise(function(_0x59533d,_0x1dc11d){return client[_0xf513('0xc')](_0x4958e9,_0x368f2a)[_0xf513('0xd')](function(_0x994565){logger['info'](_0xf513('0xe'),_0x118788,_0xf513('0xf'));logger[_0xf513('0x10')]('SquareReport,\x20%s,\x20%s,\x20%s',_0x118788,_0xf513('0xf'),JSON['stringify'](_0x994565));if(_0x994565[_0xf513('0x11')]){if(_0x994565[_0xf513('0x11')][_0xf513('0x12')]===0x1f4){logger[_0xf513('0x11')](_0xf513('0xe'),_0x118788,_0x994565['error'][_0xf513('0x13')]);return _0x1dc11d(_0x994565['error'][_0xf513('0x13')]);}logger[_0xf513('0x11')](_0xf513('0xe'),_0x118788,_0x994565['error'][_0xf513('0x13')]);return _0x59533d(_0x994565[_0xf513('0x11')][_0xf513('0x13')]);}else{logger[_0xf513('0x14')](_0xf513('0xe'),_0x118788,'request\x20sent');_0x59533d(_0x994565[_0xf513('0x15')]['message']);}})[_0xf513('0x16')](function(_0x7903c3){logger[_0xf513('0x11')](_0xf513('0xe'),_0x118788,_0x7903c3);_0x1dc11d(_0x7903c3);});});}exports[_0xf513('0x17')]=function(_0x30849a){var _0xaf5445=this;return new Promise(function(_0xca0754,_0x4765f3){return db[_0xf513('0x18')][_0xf513('0x19')](_0x30849a[_0xf513('0x1a')],{'raw':_0x30849a['options']?_0x30849a['options'][_0xf513('0x1b')]===undefined?!![]:![]:!![]})[_0xf513('0xd')](function(_0x331aa9){logger[_0xf513('0x14')]('CreateSquareReport',_0x30849a);logger[_0xf513('0x10')](_0xf513('0x17'),_0x30849a,JSON[_0xf513('0x1c')](_0x331aa9));_0xca0754(_0x331aa9);})['catch'](function(_0x5773cf){logger[_0xf513('0x11')](_0xf513('0x17'),_0x5773cf[_0xf513('0x13')],_0x30849a);_0x4765f3(_0xaf5445[_0xf513('0x11')](0x1f4,_0x5773cf['message']));});});};exports[_0xf513('0x1d')]=function(_0x131830){var _0x2c919f=this;return new Promise(function(_0x513604,_0x3a80f8){return db['SquareReport'][_0xf513('0x1e')](_0x131830[_0xf513('0x1a')],{'raw':_0x131830[_0xf513('0x1f')]?_0x131830[_0xf513('0x1f')][_0xf513('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x131830[_0xf513('0x1f')]?_0x131830[_0xf513('0x1f')][_0xf513('0x20')]||null:null,'attributes':_0x131830[_0xf513('0x1f')]?_0x131830[_0xf513('0x1f')]['attributes']||null:null,'limit':_0x131830[_0xf513('0x1f')]?_0x131830[_0xf513('0x1f')][_0xf513('0x21')]||null:null})[_0xf513('0xd')](function(_0x589c00){logger['info'](_0xf513('0x1d'),_0x131830);logger[_0xf513('0x10')](_0xf513('0x1d'),_0x131830,JSON[_0xf513('0x1c')](_0x589c00));_0x513604(_0x589c00);})[_0xf513('0x16')](function(_0x571432){logger['error'](_0xf513('0x1d'),_0x571432[_0xf513('0x13')],_0x131830);_0x3a80f8(_0x2c919f[_0xf513('0x11')](0x1f4,_0x571432[_0xf513('0x13')]));});});};
\ No newline at end of file
+var _0x7644=['../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','info','SquareReport,\x20%s,\x20%s','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSquareReport','SquareReport','body','options','then','UpdateSquareReport','update','raw','attributes','limit','lodash','util','moment','bluebird','randomstring'];(function(_0x2f87cd,_0xcaf299){var _0x5d7eda=function(_0x37ffb0){while(--_0x37ffb0){_0x2f87cd['push'](_0x2f87cd['shift']());}};_0x5d7eda(++_0xcaf299);}(_0x7644,0xe2));var _0x4764=function(_0x539742,_0xaf1b0f){_0x539742=_0x539742-0x0;var _0x4b21fd=_0x7644[_0x539742];return _0x4b21fd;};'use strict';var _=require(_0x4764('0x0'));var util=require(_0x4764('0x1'));var moment=require(_0x4764('0x2'));var BPromise=require(_0x4764('0x3'));var rs=require(_0x4764('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4764('0x5'))['db'];var utils=require(_0x4764('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x4764('0x7'));var jayson=require(_0x4764('0x8'));var client=jayson[_0x4764('0x9')][_0x4764('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x506eab,_0xf21076,_0x5bf99f){return new BPromise(function(_0x3d1cfb,_0x4e41e0){return client[_0x4764('0xb')](_0x506eab,_0x5bf99f)['then'](function(_0x2a7a7a){logger[_0x4764('0xc')](_0x4764('0xd'),_0xf21076,_0x4764('0xe'));logger[_0x4764('0xf')](_0x4764('0x10'),_0xf21076,_0x4764('0xe'),JSON[_0x4764('0x11')](_0x2a7a7a));if(_0x2a7a7a['error']){if(_0x2a7a7a[_0x4764('0x12')][_0x4764('0x13')]===0x1f4){logger[_0x4764('0x12')](_0x4764('0xd'),_0xf21076,_0x2a7a7a[_0x4764('0x12')][_0x4764('0x14')]);return _0x4e41e0(_0x2a7a7a[_0x4764('0x12')][_0x4764('0x14')]);}logger['error'](_0x4764('0xd'),_0xf21076,_0x2a7a7a[_0x4764('0x12')][_0x4764('0x14')]);return _0x3d1cfb(_0x2a7a7a[_0x4764('0x12')][_0x4764('0x14')]);}else{logger[_0x4764('0xc')]('SquareReport,\x20%s,\x20%s',_0xf21076,_0x4764('0xe'));_0x3d1cfb(_0x2a7a7a[_0x4764('0x15')]['message']);}})[_0x4764('0x16')](function(_0x3e7c8a){logger['error'](_0x4764('0xd'),_0xf21076,_0x3e7c8a);_0x4e41e0(_0x3e7c8a);});});}exports[_0x4764('0x17')]=function(_0x543055){var _0x1b28b2=this;return new Promise(function(_0x28d67a,_0x48d9af){return db[_0x4764('0x18')]['create'](_0x543055[_0x4764('0x19')],{'raw':_0x543055[_0x4764('0x1a')]?_0x543055[_0x4764('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0x4764('0x1b')](function(_0x4e159d){logger[_0x4764('0xc')](_0x4764('0x17'),_0x543055);logger[_0x4764('0xf')](_0x4764('0x17'),_0x543055,JSON[_0x4764('0x11')](_0x4e159d));_0x28d67a(_0x4e159d);})['catch'](function(_0x591909){logger[_0x4764('0x12')](_0x4764('0x17'),_0x591909['message'],_0x543055);_0x48d9af(_0x1b28b2[_0x4764('0x12')](0x1f4,_0x591909['message']));});});};exports[_0x4764('0x1c')]=function(_0x45cee3){var _0x2a43f4=this;return new Promise(function(_0x574cb8,_0xbcb2d6){return db[_0x4764('0x18')][_0x4764('0x1d')](_0x45cee3[_0x4764('0x19')],{'raw':_0x45cee3['options']?_0x45cee3[_0x4764('0x1a')][_0x4764('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x45cee3[_0x4764('0x1a')]?_0x45cee3['options']['where']||null:null,'attributes':_0x45cee3['options']?_0x45cee3['options'][_0x4764('0x1f')]||null:null,'limit':_0x45cee3[_0x4764('0x1a')]?_0x45cee3[_0x4764('0x1a')][_0x4764('0x20')]||null:null})['then'](function(_0x360a29){logger[_0x4764('0xc')](_0x4764('0x1c'),_0x45cee3);logger[_0x4764('0xf')]('UpdateSquareReport',_0x45cee3,JSON['stringify'](_0x360a29));_0x574cb8(_0x360a29);})[_0x4764('0x16')](function(_0x5c3b93){logger['error'](_0x4764('0x1c'),_0x5c3b93['message'],_0x45cee3);_0xbcb2d6(_0x2a43f4['error'](0x1f4,_0x5c3b93[_0x4764('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/squareReportDetail/index.js b/server/api/squareReportDetail/index.js
index 57c2323..f0527bb 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 _0x7a54=['describe','/:id','create','delete','destroy','exports','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','get','isAuthenticated'];(function(_0x4e7b25,_0x172e50){var _0x41fff2=function(_0x2de316){while(--_0x2de316){_0x4e7b25['push'](_0x4e7b25['shift']());}};_0x41fff2(++_0x172e50);}(_0x7a54,0x106));var _0x47a5=function(_0x4cc69d,_0xccdc21){_0x4cc69d=_0x4cc69d-0x0;var _0x2fad82=_0x7a54[_0x4cc69d];return _0x2fad82;};'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['show']);router['post']('/',auth[_0x47a5('0x9')](),controller[_0x47a5('0xc')]);router['put'](_0x47a5('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x47a5('0xd')](_0x47a5('0xb'),auth[_0x47a5('0x9')](),controller[_0x47a5('0xe')]);module[_0x47a5('0xf')]=router;
\ No newline at end of file
+var _0x814b=['path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','get','isAuthenticated','index','/describe','/:id','show','post','create','put','update','destroy','exports','multer','util'];(function(_0x5d4607,_0x6b5e7b){var _0x5e4a86=function(_0x46891a){while(--_0x46891a){_0x5d4607['push'](_0x5d4607['shift']());}};_0x5e4a86(++_0x6b5e7b);}(_0x814b,0x1a2));var _0xb814=function(_0x2ab76b,_0x176579){_0x2ab76b=_0x2ab76b-0x0;var _0x201126=_0x814b[_0x2ab76b];return _0x201126;};'use strict';var multer=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var path=require(_0xb814('0x2'));var timeout=require(_0xb814('0x3'));var express=require(_0xb814('0x4'));var router=express[_0xb814('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xb814('0x6'));var config=require(_0xb814('0x7'));var controller=require(_0xb814('0x8'));router[_0xb814('0x9')]('/',auth[_0xb814('0xa')](),controller[_0xb814('0xb')]);router['get'](_0xb814('0xc'),auth[_0xb814('0xa')](),controller['describe']);router[_0xb814('0x9')](_0xb814('0xd'),auth[_0xb814('0xa')](),controller[_0xb814('0xe')]);router[_0xb814('0xf')]('/',auth[_0xb814('0xa')](),controller[_0xb814('0x10')]);router[_0xb814('0x11')](_0xb814('0xd'),auth[_0xb814('0xa')](),controller[_0xb814('0x12')]);router['delete'](_0xb814('0xd'),auth['isAuthenticated'](),controller[_0xb814('0x13')]);module[_0xb814('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/squareReportDetail/squareReportDetail.attributes.js b/server/api/squareReportDetail/squareReportDetail.attributes.js
index ce79aee..4e92fdb 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 _0x441d=['TEXT','sequelize','exports','STRING'];(function(_0x4283e9,_0x55c057){var _0x4e4c67=function(_0x3c700c){while(--_0x3c700c){_0x4283e9['push'](_0x4283e9['shift']());}};_0x4e4c67(++_0x55c057);}(_0x441d,0x115));var _0xd441=function(_0x4dea37,_0x67ef99){_0x4dea37=_0x4dea37-0x0;var _0x46bb47=_0x441d[_0x4dea37];return _0x46bb47;};'use strict';var Sequelize=require(_0xd441('0x0'));module[_0xd441('0x1')]={'uniqueid':{'type':Sequelize[_0xd441('0x2')]},'node':{'type':Sequelize[_0xd441('0x2')]},'application':{'type':Sequelize[_0xd441('0x2')]},'data':{'type':Sequelize[_0xd441('0x3')]},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0xd441('0x2')]}};
\ No newline at end of file
+var _0x170e=['STRING','TEXT','sequelize','exports'];(function(_0x3cbe3e,_0x157554){var _0x132e27=function(_0x5465d5){while(--_0x5465d5){_0x3cbe3e['push'](_0x3cbe3e['shift']());}};_0x132e27(++_0x157554);}(_0x170e,0x11e));var _0xe170=function(_0x43747e,_0x13b832){_0x43747e=_0x43747e-0x0;var _0x7fb853=_0x170e[_0x43747e];return _0x7fb853;};'use strict';var Sequelize=require(_0xe170('0x0'));module[_0xe170('0x1')]={'uniqueid':{'type':Sequelize[_0xe170('0x2')]},'node':{'type':Sequelize[_0xe170('0x2')]},'application':{'type':Sequelize['STRING']},'data':{'type':Sequelize[_0xe170('0x3')]},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0xe170('0x2')]}};
\ No newline at end of file
diff --git a/server/api/squareReportDetail/squareReportDetail.controller.js b/server/api/squareReportDetail/squareReportDetail.controller.js
index e452873..c159979 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 _0x834a=['where','type','VIRTUAL','includeAll','include','findAll','rows','show','options','catch','create','body','find','params','destroy','describe','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','status','json','count','offset','limit','set','apply','update','then','end','sendStatus','error','stack','name','send','index','map','SquareDetailsReport','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','order','sort','pick','merge'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x834a,0x169));var _0xa834=function(_0x30fe00,_0x5df9e0){_0x30fe00=_0x30fe00-0x0;var _0x4e0e75=_0x834a[_0x30fe00];return _0x4e0e75;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0xa834('0x0'));var zipdir=require(_0xa834('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa834('0x2'));var moment=require(_0xa834('0x3'));var BPromise=require(_0xa834('0x4'));var Mustache=require(_0xa834('0x5'));var util=require('util');var path=require(_0xa834('0x6'));var sox=require(_0xa834('0x7'));var csv=require(_0xa834('0x8'));var ejs=require(_0xa834('0x9'));var fs=require('fs');var _=require(_0xa834('0xa'));var squel=require(_0xa834('0xb'));var crypto=require(_0xa834('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xa834('0xd'));var authService=require('../../components/auth/service');var qs=require(_0xa834('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa834('0xf'));var logger=require('../../config/logger')(_0xa834('0x10'));var utils=require(_0xa834('0x11'));var config=require(_0xa834('0x12'));var db=require(_0xa834('0x13'))['db'];function respondWithStatusCode(_0x49ac70,_0x599cf7){_0x599cf7=_0x599cf7||0xcc;return function(_0x345770){if(_0x345770){return _0x49ac70['sendStatus'](_0x599cf7);}return _0x49ac70[_0xa834('0x14')](_0x599cf7)['end']();};}function respondWithResult(_0x448638,_0x2d9e58){_0x2d9e58=_0x2d9e58||0xc8;return function(_0x4b297a){if(_0x4b297a){return _0x448638[_0xa834('0x14')](_0x2d9e58)[_0xa834('0x15')](_0x4b297a);}};}function respondWithFilteredResult(_0x8ef50e,_0x5a9dd2){return function(_0x3f4727){if(_0x3f4727){var _0x4921f9=_0x3f4727[_0xa834('0x16')],_0x5a8f3b=_0x5a9dd2[_0xa834('0x17')],_0x5b5fbb=_0x5a9dd2[_0xa834('0x17')]+_0x5a9dd2[_0xa834('0x18')],_0x1b61c1;if(_0x5b5fbb>=_0x4921f9){_0x5b5fbb=_0x4921f9;_0x1b61c1=0xc8;}else{_0x1b61c1=0xce;}_0x8ef50e[_0xa834('0x14')](_0x1b61c1);return _0x8ef50e[_0xa834('0x19')]('Content-Range',_0x5a8f3b+'-'+_0x5b5fbb+'/'+_0x4921f9)[_0xa834('0x15')](_0x3f4727);}return null;};}function patchUpdates(_0x35bceb){return function(_0x17d037){try{jsonpatch[_0xa834('0x1a')](_0x17d037,_0x35bceb,!![]);}catch(_0x37ee2e){return BPromise['reject'](_0x37ee2e);}return _0x17d037['save']();};}function saveUpdates(_0x282a30,_0x180bd6){return function(_0x1de0c8){if(_0x1de0c8){return _0x1de0c8[_0xa834('0x1b')](_0x282a30)[_0xa834('0x1c')](function(_0x1e3bef){return _0x1e3bef;});}return null;};}function removeEntity(_0x351219,_0x121e4f){return function(_0x3eabb2){if(_0x3eabb2){return _0x3eabb2['destroy']()[_0xa834('0x1c')](function(){_0x351219[_0xa834('0x14')](0xcc)[_0xa834('0x1d')]();});}};}function handleEntityNotFound(_0x53e86c,_0x373d20){return function(_0xdf96b2){if(!_0xdf96b2){_0x53e86c[_0xa834('0x1e')](0x194);}return _0xdf96b2;};}function handleError(_0x5d4f86,_0x3b0ecb){_0x3b0ecb=_0x3b0ecb||0x1f4;return function(_0x2e3edb){logger[_0xa834('0x1f')](_0x2e3edb[_0xa834('0x20')]);if(_0x2e3edb[_0xa834('0x21')]){delete _0x2e3edb[_0xa834('0x21')];}_0x5d4f86[_0xa834('0x14')](_0x3b0ecb)[_0xa834('0x22')](_0x2e3edb);};}exports[_0xa834('0x23')]=function(_0x3da828,_0x1837e2){var _0x72e663={},_0xd099f1={},_0x5b930b={'count':0x0,'rows':[]};var _0x144331=_[_0xa834('0x24')](db[_0xa834('0x25')][_0xa834('0x26')],function(_0x4ee7c0){return{'name':_0x4ee7c0[_0xa834('0x27')],'type':_0x4ee7c0['type'][_0xa834('0x28')]};});_0xd099f1[_0xa834('0x29')]=_[_0xa834('0x24')](_0x144331,'name');_0xd099f1['query']=_[_0xa834('0x2a')](_0x3da828[_0xa834('0x2b')]);_0xd099f1[_0xa834('0x2c')]=_[_0xa834('0x2d')](_0xd099f1['model'],_0xd099f1[_0xa834('0x2b')]);_0x72e663[_0xa834('0x2e')]=_[_0xa834('0x2d')](_0xd099f1['model'],qs[_0xa834('0x2f')](_0x3da828[_0xa834('0x2b')][_0xa834('0x2f')]));_0x72e663[_0xa834('0x2e')]=_0x72e663[_0xa834('0x2e')][_0xa834('0x30')]?_0x72e663[_0xa834('0x2e')]:_0xd099f1['model'];if(!_0x3da828['query']['hasOwnProperty']('nolimit')){_0x72e663['limit']=qs[_0xa834('0x18')](_0x3da828['query'][_0xa834('0x18')]);_0x72e663[_0xa834('0x17')]=qs[_0xa834('0x17')](_0x3da828['query'][_0xa834('0x17')]);}_0x72e663[_0xa834('0x31')]=qs[_0xa834('0x32')](_0x3da828['query'][_0xa834('0x32')]);_0x72e663['where']=qs[_0xa834('0x2c')](_[_0xa834('0x33')](_0x3da828['query'],_0xd099f1[_0xa834('0x2c')]));if(_0x3da828[_0xa834('0x2b')]['filter']){_0x72e663['where']=_[_0xa834('0x34')](_0x72e663[_0xa834('0x35')],{'$or':_[_0xa834('0x24')](_0x144331,function(_0x2d0dd5){if(_0x2d0dd5[_0xa834('0x36')]!==_0xa834('0x37')){var _0x144178={};_0x144178[_0x2d0dd5[_0xa834('0x21')]]={'$like':'%'+_0x3da828[_0xa834('0x2b')]['filter']+'%'};return _0x144178;}})});}_0x72e663=_[_0xa834('0x34')]({},_0x72e663,_0x3da828['options']);var _0x481063={'where':_0x72e663[_0xa834('0x35')]};return db[_0xa834('0x25')][_0xa834('0x16')](_0x481063)[_0xa834('0x1c')](function(_0x572212){_0x5b930b[_0xa834('0x16')]=_0x572212;if(_0x3da828[_0xa834('0x2b')][_0xa834('0x38')]){_0x72e663[_0xa834('0x39')]=[{'all':!![]}];}return db[_0xa834('0x25')][_0xa834('0x3a')](_0x72e663);})[_0xa834('0x1c')](function(_0x5a6c48){_0x5b930b[_0xa834('0x3b')]=_0x5a6c48;return _0x5b930b;})[_0xa834('0x1c')](respondWithFilteredResult(_0x1837e2,_0x72e663))['catch'](handleError(_0x1837e2,null));};exports[_0xa834('0x3c')]=function(_0x492b0e,_0x2ec79d){var _0x36814d={'raw':!![],'where':{'id':_0x492b0e['params']['id']}},_0x312d8e={};_0x312d8e[_0xa834('0x29')]=_['keys'](db[_0xa834('0x25')][_0xa834('0x26')]);_0x312d8e[_0xa834('0x2b')]=_[_0xa834('0x2a')](_0x492b0e[_0xa834('0x2b')]);_0x312d8e['filters']=_[_0xa834('0x2d')](_0x312d8e[_0xa834('0x29')],_0x312d8e[_0xa834('0x2b')]);_0x36814d[_0xa834('0x2e')]=_[_0xa834('0x2d')](_0x312d8e[_0xa834('0x29')],qs[_0xa834('0x2f')](_0x492b0e[_0xa834('0x2b')]['fields']));_0x36814d[_0xa834('0x2e')]=_0x36814d[_0xa834('0x2e')]['length']?_0x36814d['attributes']:_0x312d8e[_0xa834('0x29')];if(_0x492b0e['query'][_0xa834('0x38')]){_0x36814d[_0xa834('0x39')]=[{'all':!![]}];}_0x36814d=_[_0xa834('0x34')]({},_0x36814d,_0x492b0e[_0xa834('0x3d')]);return db['SquareDetailsReport']['find'](_0x36814d)[_0xa834('0x1c')](handleEntityNotFound(_0x2ec79d,null))['then'](respondWithResult(_0x2ec79d,null))[_0xa834('0x3e')](handleError(_0x2ec79d,null));};exports[_0xa834('0x3f')]=function(_0x22450e,_0x595e95){return db['SquareDetailsReport'][_0xa834('0x3f')](_0x22450e[_0xa834('0x40')],{})[_0xa834('0x1c')](respondWithResult(_0x595e95,0xc9))[_0xa834('0x3e')](handleError(_0x595e95,null));};exports[_0xa834('0x1b')]=function(_0xee7c67,_0x16a60){if(_0xee7c67[_0xa834('0x40')]['id']){delete _0xee7c67[_0xa834('0x40')]['id'];}return db[_0xa834('0x25')][_0xa834('0x41')]({'where':{'id':_0xee7c67[_0xa834('0x42')]['id']}})[_0xa834('0x1c')](handleEntityNotFound(_0x16a60,null))[_0xa834('0x1c')](saveUpdates(_0xee7c67[_0xa834('0x40')],null))[_0xa834('0x1c')](respondWithResult(_0x16a60,null))[_0xa834('0x3e')](handleError(_0x16a60,null));};exports[_0xa834('0x43')]=function(_0x3af354,_0x22af67){return db[_0xa834('0x25')][_0xa834('0x41')]({'where':{'id':_0x3af354[_0xa834('0x42')]['id']}})[_0xa834('0x1c')](handleEntityNotFound(_0x22af67,null))['then'](removeEntity(_0x22af67,null))[_0xa834('0x3e')](handleError(_0x22af67,null));};exports[_0xa834('0x44')]=function(_0x495f87,_0x138a22){return db[_0xa834('0x25')]['describe']()[_0xa834('0x1c')](respondWithResult(_0x138a22,null))[_0xa834('0x3e')](handleError(_0x138a22,null));};
\ No newline at end of file
+var _0xbcbf=['query','intersection','fields','attributes','length','hasOwnProperty','sort','where','filters','pick','filter','merge','VIRTUAL','options','SquareDetailsReport','include','catch','show','keys','includeAll','find','create','body','params','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','apply','reject','update','then','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model'];(function(_0x4c440b,_0x3ea627){var _0x2d48cf=function(_0x56bac7){while(--_0x56bac7){_0x4c440b['push'](_0x4c440b['shift']());}};_0x2d48cf(++_0x3ea627);}(_0xbcbf,0x13d));var _0xfbcb=function(_0x3c2ecb,_0x4ac652){_0x3c2ecb=_0x3c2ecb-0x0;var _0x261364=_0xbcbf[_0x3c2ecb];return _0x261364;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xfbcb('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xfbcb('0x1'));var jsonpatch=require(_0xfbcb('0x2'));var rp=require(_0xfbcb('0x3'));var moment=require(_0xfbcb('0x4'));var BPromise=require(_0xfbcb('0x5'));var Mustache=require(_0xfbcb('0x6'));var util=require(_0xfbcb('0x7'));var path=require(_0xfbcb('0x8'));var sox=require(_0xfbcb('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xfbcb('0xa'));var squel=require('squel');var crypto=require(_0xfbcb('0xb'));var jsforce=require(_0xfbcb('0xc'));var deskjs=require(_0xfbcb('0xd'));var toCsv=require(_0xfbcb('0xe'));var querystring=require(_0xfbcb('0xf'));var Papa=require(_0xfbcb('0x10'));var Redis=require(_0xfbcb('0x11'));var authService=require(_0xfbcb('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xfbcb('0x13'));var hardwareService=require(_0xfbcb('0x14'));var logger=require(_0xfbcb('0x15'))(_0xfbcb('0x16'));var utils=require(_0xfbcb('0x17'));var config=require('../../config/environment');var db=require(_0xfbcb('0x18'))['db'];function respondWithStatusCode(_0x1b6013,_0xbdd560){_0xbdd560=_0xbdd560||0xcc;return function(_0x5224d0){if(_0x5224d0){return _0x1b6013[_0xfbcb('0x19')](_0xbdd560);}return _0x1b6013[_0xfbcb('0x1a')](_0xbdd560)[_0xfbcb('0x1b')]();};}function respondWithResult(_0x26d0bd,_0x1d08db){_0x1d08db=_0x1d08db||0xc8;return function(_0x2da605){if(_0x2da605){return _0x26d0bd[_0xfbcb('0x1a')](_0x1d08db)[_0xfbcb('0x1c')](_0x2da605);}};}function respondWithFilteredResult(_0x33a847,_0x579c91){return function(_0x3655b9){if(_0x3655b9){var _0xb17d45=_0x3655b9[_0xfbcb('0x1d')],_0x2d2888=_0x579c91['offset'],_0x276311=_0x579c91[_0xfbcb('0x1e')]+_0x579c91[_0xfbcb('0x1f')],_0x14d980;if(_0x276311>=_0xb17d45){_0x276311=_0xb17d45;_0x14d980=0xc8;}else{_0x14d980=0xce;}_0x33a847[_0xfbcb('0x1a')](_0x14d980);return _0x33a847[_0xfbcb('0x20')]('Content-Range',_0x2d2888+'-'+_0x276311+'/'+_0xb17d45)[_0xfbcb('0x1c')](_0x3655b9);}return null;};}function patchUpdates(_0x12bb24){return function(_0x57f518){try{jsonpatch[_0xfbcb('0x21')](_0x57f518,_0x12bb24,!![]);}catch(_0x375756){return BPromise[_0xfbcb('0x22')](_0x375756);}return _0x57f518['save']();};}function saveUpdates(_0x379cd8,_0x203f33){return function(_0x21098d){if(_0x21098d){return _0x21098d[_0xfbcb('0x23')](_0x379cd8)[_0xfbcb('0x24')](function(_0x3f650e){return _0x3f650e;});}return null;};}function removeEntity(_0x5b37e7,_0x589492){return function(_0x56e1b2){if(_0x56e1b2){return _0x56e1b2['destroy']()[_0xfbcb('0x24')](function(){_0x5b37e7['status'](0xcc)[_0xfbcb('0x1b')]();});}};}function handleEntityNotFound(_0x4f35c,_0x5736e6){return function(_0x5e6c2c){if(!_0x5e6c2c){_0x4f35c[_0xfbcb('0x19')](0x194);}return _0x5e6c2c;};}function handleError(_0x36f945,_0x15eb91){_0x15eb91=_0x15eb91||0x1f4;return function(_0x27cdb2){logger[_0xfbcb('0x25')](_0x27cdb2[_0xfbcb('0x26')]);if(_0x27cdb2['name']){delete _0x27cdb2[_0xfbcb('0x27')];}_0x36f945['status'](_0x15eb91)[_0xfbcb('0x28')](_0x27cdb2);};}exports[_0xfbcb('0x29')]=function(_0x7154d6,_0x514a2b){var _0x3a13fd={},_0x115afa={},_0x26f637={'count':0x0,'rows':[]};var _0x317eb5=_[_0xfbcb('0x2a')](db['SquareDetailsReport'][_0xfbcb('0x2b')],function(_0x1ea1f6){return{'name':_0x1ea1f6[_0xfbcb('0x2c')],'type':_0x1ea1f6[_0xfbcb('0x2d')][_0xfbcb('0x2e')]};});_0x115afa[_0xfbcb('0x2f')]=_[_0xfbcb('0x2a')](_0x317eb5,_0xfbcb('0x27'));_0x115afa[_0xfbcb('0x30')]=_['keys'](_0x7154d6['query']);_0x115afa['filters']=_[_0xfbcb('0x31')](_0x115afa['model'],_0x115afa[_0xfbcb('0x30')]);_0x3a13fd['attributes']=_[_0xfbcb('0x31')](_0x115afa[_0xfbcb('0x2f')],qs[_0xfbcb('0x32')](_0x7154d6[_0xfbcb('0x30')]['fields']));_0x3a13fd[_0xfbcb('0x33')]=_0x3a13fd[_0xfbcb('0x33')][_0xfbcb('0x34')]?_0x3a13fd[_0xfbcb('0x33')]:_0x115afa[_0xfbcb('0x2f')];if(!_0x7154d6[_0xfbcb('0x30')][_0xfbcb('0x35')]('nolimit')){_0x3a13fd['limit']=qs[_0xfbcb('0x1f')](_0x7154d6[_0xfbcb('0x30')][_0xfbcb('0x1f')]);_0x3a13fd['offset']=qs[_0xfbcb('0x1e')](_0x7154d6[_0xfbcb('0x30')]['offset']);}_0x3a13fd['order']=qs[_0xfbcb('0x36')](_0x7154d6[_0xfbcb('0x30')][_0xfbcb('0x36')]);_0x3a13fd[_0xfbcb('0x37')]=qs[_0xfbcb('0x38')](_[_0xfbcb('0x39')](_0x7154d6[_0xfbcb('0x30')],_0x115afa['filters']));if(_0x7154d6[_0xfbcb('0x30')][_0xfbcb('0x3a')]){_0x3a13fd[_0xfbcb('0x37')]=_[_0xfbcb('0x3b')](_0x3a13fd[_0xfbcb('0x37')],{'$or':_[_0xfbcb('0x2a')](_0x317eb5,function(_0x4cf5fe){if(_0x4cf5fe[_0xfbcb('0x2d')]!==_0xfbcb('0x3c')){var _0x7ac19c={};_0x7ac19c[_0x4cf5fe[_0xfbcb('0x27')]]={'$like':'%'+_0x7154d6['query'][_0xfbcb('0x3a')]+'%'};return _0x7ac19c;}})});}_0x3a13fd=_[_0xfbcb('0x3b')]({},_0x3a13fd,_0x7154d6[_0xfbcb('0x3d')]);var _0x2792af={'where':_0x3a13fd['where']};return db[_0xfbcb('0x3e')]['count'](_0x2792af)[_0xfbcb('0x24')](function(_0x415573){_0x26f637[_0xfbcb('0x1d')]=_0x415573;if(_0x7154d6[_0xfbcb('0x30')]['includeAll']){_0x3a13fd[_0xfbcb('0x3f')]=[{'all':!![]}];}return db[_0xfbcb('0x3e')]['findAll'](_0x3a13fd);})[_0xfbcb('0x24')](function(_0xa8dee5){_0x26f637['rows']=_0xa8dee5;return _0x26f637;})['then'](respondWithFilteredResult(_0x514a2b,_0x3a13fd))[_0xfbcb('0x40')](handleError(_0x514a2b,null));};exports[_0xfbcb('0x41')]=function(_0x23732b,_0x23ad48){var _0x5fe3dc={'raw':!![],'where':{'id':_0x23732b['params']['id']}},_0x29e690={};_0x29e690['model']=_[_0xfbcb('0x42')](db['SquareDetailsReport']['rawAttributes']);_0x29e690[_0xfbcb('0x30')]=_[_0xfbcb('0x42')](_0x23732b[_0xfbcb('0x30')]);_0x29e690['filters']=_['intersection'](_0x29e690['model'],_0x29e690['query']);_0x5fe3dc[_0xfbcb('0x33')]=_[_0xfbcb('0x31')](_0x29e690[_0xfbcb('0x2f')],qs['fields'](_0x23732b[_0xfbcb('0x30')][_0xfbcb('0x32')]));_0x5fe3dc[_0xfbcb('0x33')]=_0x5fe3dc['attributes'][_0xfbcb('0x34')]?_0x5fe3dc[_0xfbcb('0x33')]:_0x29e690['model'];if(_0x23732b[_0xfbcb('0x30')][_0xfbcb('0x43')]){_0x5fe3dc[_0xfbcb('0x3f')]=[{'all':!![]}];}_0x5fe3dc=_['merge']({},_0x5fe3dc,_0x23732b[_0xfbcb('0x3d')]);return db[_0xfbcb('0x3e')][_0xfbcb('0x44')](_0x5fe3dc)[_0xfbcb('0x24')](handleEntityNotFound(_0x23ad48,null))[_0xfbcb('0x24')](respondWithResult(_0x23ad48,null))[_0xfbcb('0x40')](handleError(_0x23ad48,null));};exports[_0xfbcb('0x45')]=function(_0x135c98,_0x140fb8){return db[_0xfbcb('0x3e')][_0xfbcb('0x45')](_0x135c98[_0xfbcb('0x46')],{})[_0xfbcb('0x24')](respondWithResult(_0x140fb8,0xc9))[_0xfbcb('0x40')](handleError(_0x140fb8,null));};exports[_0xfbcb('0x23')]=function(_0x59761c,_0x3a2700){if(_0x59761c['body']['id']){delete _0x59761c[_0xfbcb('0x46')]['id'];}return db[_0xfbcb('0x3e')]['find']({'where':{'id':_0x59761c[_0xfbcb('0x47')]['id']}})[_0xfbcb('0x24')](handleEntityNotFound(_0x3a2700,null))['then'](saveUpdates(_0x59761c[_0xfbcb('0x46')],null))[_0xfbcb('0x24')](respondWithResult(_0x3a2700,null))[_0xfbcb('0x40')](handleError(_0x3a2700,null));};exports['destroy']=function(_0xb39302,_0x4f70b4){return db[_0xfbcb('0x3e')][_0xfbcb('0x44')]({'where':{'id':_0xb39302[_0xfbcb('0x47')]['id']}})['then'](handleEntityNotFound(_0x4f70b4,null))[_0xfbcb('0x24')](removeEntity(_0x4f70b4,null))['catch'](handleError(_0x4f70b4,null));};exports[_0xfbcb('0x48')]=function(_0x4e5b8e,_0x3c345c){return db[_0xfbcb('0x3e')][_0xfbcb('0x48')]()['then'](respondWithResult(_0x3c345c,null))[_0xfbcb('0x40')](handleError(_0x3c345c,null));};
\ No newline at end of file
diff --git a/server/api/squareReportDetail/squareReportDetail.model.js b/server/api/squareReportDetail/squareReportDetail.model.js
index 992f451..11967a6 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 _0x7e1d=['moment','bluebird','request-promise','path','rimraf','./squareReportDetail.attributes','exports','define','SquareDetailsReport','report_square_details','lodash','api'];(function(_0x45ae1b,_0x19f290){var _0x57888c=function(_0x3fb3fb){while(--_0x3fb3fb){_0x45ae1b['push'](_0x45ae1b['shift']());}};_0x57888c(++_0x19f290);}(_0x7e1d,0x15a));var _0xd7e1=function(_0x24ee6e,_0x51dbaf){_0x24ee6e=_0x24ee6e-0x0;var _0x112827=_0x7e1d[_0x24ee6e];return _0x112827;};'use strict';var _=require(_0xd7e1('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xd7e1('0x1'));var moment=require(_0xd7e1('0x2'));var BPromise=require(_0xd7e1('0x3'));var rp=require(_0xd7e1('0x4'));var fs=require('fs');var path=require(_0xd7e1('0x5'));var rimraf=require(_0xd7e1('0x6'));var config=require('../../config/environment');var attributes=require(_0xd7e1('0x7'));module[_0xd7e1('0x8')]=function(_0x153cef,_0x5aff69){return _0x153cef[_0xd7e1('0x9')](_0xd7e1('0xa'),attributes,{'tableName':_0xd7e1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x39c8=['../../config/environment','./squareReportDetail.attributes','exports','define','SquareDetailsReport','lodash','../../config/logger','api','moment','request-promise','path','rimraf'];(function(_0x53c148,_0x5b5327){var _0x59377d=function(_0xda2130){while(--_0xda2130){_0x53c148['push'](_0x53c148['shift']());}};_0x59377d(++_0x5b5327);}(_0x39c8,0xe9));var _0x839c=function(_0x108d5f,_0x33f82d){_0x108d5f=_0x108d5f-0x0;var _0x456ea3=_0x39c8[_0x108d5f];return _0x456ea3;};'use strict';var _=require(_0x839c('0x0'));var util=require('util');var logger=require(_0x839c('0x1'))(_0x839c('0x2'));var moment=require(_0x839c('0x3'));var BPromise=require('bluebird');var rp=require(_0x839c('0x4'));var fs=require('fs');var path=require(_0x839c('0x5'));var rimraf=require(_0x839c('0x6'));var config=require(_0x839c('0x7'));var attributes=require(_0x839c('0x8'));module[_0x839c('0x9')]=function(_0x17c0c0,_0xdc71e2){return _0x17c0c0[_0x839c('0xa')](_0x839c('0xb'),attributes,{'tableName':'report_square_details','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 7477b51..aa6a32a 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 _0x7fda=['message','info','result','CreateSquareDetailsReport','SquareDetailsReport','create','body','options','catch','lodash','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','http','then','SquareDetailsReport,\x20%s,\x20%s','request\x20sent','debug','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x4f4ad9,_0x37b817){var _0x546971=function(_0x4841cb){while(--_0x4841cb){_0x4f4ad9['push'](_0x4f4ad9['shift']());}};_0x546971(++_0x37b817);}(_0x7fda,0x1e4));var _0xa7fd=function(_0x5bf4bf,_0x3f81e9){_0x5bf4bf=_0x5bf4bf-0x0;var _0x579ebe=_0x7fda[_0x5bf4bf];return _0x579ebe;};'use strict';var _=require(_0xa7fd('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xa7fd('0x1'));var fs=require('fs');var Redis=require(_0xa7fd('0x2'));var db=require(_0xa7fd('0x3'))['db'];var utils=require(_0xa7fd('0x4'));var logger=require('../../config/logger')(_0xa7fd('0x5'));var config=require(_0xa7fd('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa7fd('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x56dd46,_0x1b6c92,_0x5a33fa){return new BPromise(function(_0x18bbd5,_0x201e64){return client['request'](_0x56dd46,_0x5a33fa)[_0xa7fd('0x8')](function(_0x46a5a4){logger['info'](_0xa7fd('0x9'),_0x1b6c92,_0xa7fd('0xa'));logger[_0xa7fd('0xb')](_0xa7fd('0xc'),_0x1b6c92,_0xa7fd('0xa'),JSON[_0xa7fd('0xd')](_0x46a5a4));if(_0x46a5a4['error']){if(_0x46a5a4[_0xa7fd('0xe')][_0xa7fd('0xf')]===0x1f4){logger[_0xa7fd('0xe')](_0xa7fd('0x9'),_0x1b6c92,_0x46a5a4[_0xa7fd('0xe')][_0xa7fd('0x10')]);return _0x201e64(_0x46a5a4[_0xa7fd('0xe')][_0xa7fd('0x10')]);}logger[_0xa7fd('0xe')]('SquareDetailsReport,\x20%s,\x20%s',_0x1b6c92,_0x46a5a4[_0xa7fd('0xe')][_0xa7fd('0x10')]);return _0x18bbd5(_0x46a5a4[_0xa7fd('0xe')][_0xa7fd('0x10')]);}else{logger[_0xa7fd('0x11')](_0xa7fd('0x9'),_0x1b6c92,_0xa7fd('0xa'));_0x18bbd5(_0x46a5a4[_0xa7fd('0x12')][_0xa7fd('0x10')]);}})['catch'](function(_0x590bc6){logger[_0xa7fd('0xe')](_0xa7fd('0x9'),_0x1b6c92,_0x590bc6);_0x201e64(_0x590bc6);});});}exports[_0xa7fd('0x13')]=function(_0xf07d93){var _0x17d3d5=this;return new Promise(function(_0x2c6043,_0x74f512){return db[_0xa7fd('0x14')][_0xa7fd('0x15')](_0xf07d93[_0xa7fd('0x16')],{'raw':_0xf07d93[_0xa7fd('0x17')]?_0xf07d93['options']['raw']===undefined?!![]:![]:!![]})[_0xa7fd('0x8')](function(_0x724ab4){logger[_0xa7fd('0x11')](_0xa7fd('0x13'),_0xf07d93);logger[_0xa7fd('0xb')](_0xa7fd('0x13'),_0xf07d93,JSON[_0xa7fd('0xd')](_0x724ab4));_0x2c6043(_0x724ab4);})[_0xa7fd('0x18')](function(_0x2e289e){logger[_0xa7fd('0xe')](_0xa7fd('0x13'),_0x2e289e[_0xa7fd('0x10')],_0xf07d93);_0x74f512(_0x17d3d5[_0xa7fd('0xe')](0x1f4,_0x2e289e[_0xa7fd('0x10')]));});});};
\ No newline at end of file
+var _0xc925=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','SquareDetailsReport,\x20%s,\x20%s','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','SquareDetailsReport','create','body','options','raw','then','CreateSquareDetailsReport','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0xcf935c,_0x26b1ab){var _0x37aeea=function(_0x40eaa5){while(--_0x40eaa5){_0xcf935c['push'](_0xcf935c['shift']());}};_0x37aeea(++_0x26b1ab);}(_0xc925,0x8f));var _0x5c92=function(_0x1732d2,_0x21a1cd){_0x1732d2=_0x1732d2-0x0;var _0x127a9e=_0xc925[_0x1732d2];return _0x127a9e;};'use strict';var _=require(_0x5c92('0x0'));var util=require(_0x5c92('0x1'));var moment=require(_0x5c92('0x2'));var BPromise=require('bluebird');var rs=require(_0x5c92('0x3'));var fs=require('fs');var Redis=require(_0x5c92('0x4'));var db=require(_0x5c92('0x5'))['db'];var utils=require(_0x5c92('0x6'));var logger=require(_0x5c92('0x7'))(_0x5c92('0x8'));var config=require(_0x5c92('0x9'));var jayson=require(_0x5c92('0xa'));var client=jayson[_0x5c92('0xb')][_0x5c92('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x530310,_0x4bb72b,_0x55f9de){return new BPromise(function(_0x1ba2f4,_0x40f45b){return client['request'](_0x530310,_0x55f9de)['then'](function(_0x72a672){logger[_0x5c92('0xd')](_0x5c92('0xe'),_0x4bb72b,'request\x20sent');logger['debug'](_0x5c92('0xf'),_0x4bb72b,'request\x20sent',JSON[_0x5c92('0x10')](_0x72a672));if(_0x72a672[_0x5c92('0x11')]){if(_0x72a672['error'][_0x5c92('0x12')]===0x1f4){logger['error']('SquareDetailsReport,\x20%s,\x20%s',_0x4bb72b,_0x72a672[_0x5c92('0x11')]['message']);return _0x40f45b(_0x72a672[_0x5c92('0x11')]['message']);}logger['error']('SquareDetailsReport,\x20%s,\x20%s',_0x4bb72b,_0x72a672['error'][_0x5c92('0x13')]);return _0x1ba2f4(_0x72a672[_0x5c92('0x11')]['message']);}else{logger[_0x5c92('0xd')](_0x5c92('0xe'),_0x4bb72b,_0x5c92('0x14'));_0x1ba2f4(_0x72a672[_0x5c92('0x15')]['message']);}})['catch'](function(_0x8cf976){logger[_0x5c92('0x11')](_0x5c92('0xe'),_0x4bb72b,_0x8cf976);_0x40f45b(_0x8cf976);});});}exports['CreateSquareDetailsReport']=function(_0x4b2fcf){var _0x54dc6d=this;return new Promise(function(_0x504c5f,_0x509239){return db[_0x5c92('0x16')][_0x5c92('0x17')](_0x4b2fcf[_0x5c92('0x18')],{'raw':_0x4b2fcf[_0x5c92('0x19')]?_0x4b2fcf['options'][_0x5c92('0x1a')]===undefined?!![]:![]:!![]})[_0x5c92('0x1b')](function(_0x2bf04e){logger[_0x5c92('0xd')]('CreateSquareDetailsReport',_0x4b2fcf);logger['debug'](_0x5c92('0x1c'),_0x4b2fcf,JSON[_0x5c92('0x10')](_0x2bf04e));_0x504c5f(_0x2bf04e);})[_0x5c92('0x1d')](function(_0x5105d0){logger[_0x5c92('0x11')](_0x5c92('0x1c'),_0x5105d0[_0x5c92('0x13')],_0x4b2fcf);_0x509239(_0x54dc6d[_0x5c92('0x11')](0x1f4,_0x5105d0[_0x5c92('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/system/index.js b/server/api/system/index.js
index ac5829a..7a5be35 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 _0x2f29=['isAuthenticated','get','killProcess','express','Router','../../components/auth/service','./system.controller'];(function(_0xc0f090,_0x4cb27d){var _0x3aa184=function(_0x5df41e){while(--_0x5df41e){_0xc0f090['push'](_0xc0f090['shift']());}};_0x3aa184(++_0x4cb27d);}(_0x2f29,0x6c));var _0x92f2=function(_0x5a776b,_0x46f785){_0x5a776b=_0x5a776b-0x0;var _0xbbef59=_0x2f29[_0x5a776b];return _0xbbef59;};'use strict';var express=require(_0x92f2('0x0'));var router=express[_0x92f2('0x1')]();var auth=require(_0x92f2('0x2'));var controller=require(_0x92f2('0x3'));router['get']('/',auth[_0x92f2('0x4')](),controller['index']);router[_0x92f2('0x5')]('/process/:pid/kill',auth['isAuthenticated'](),controller[_0x92f2('0x6')]);module['exports']=router;
\ No newline at end of file
+var _0xec81=['/process/:pid/kill','killProcess','exports','express','Router','../../components/auth/service','./system.controller','isAuthenticated','index'];(function(_0x3314d1,_0xe55a96){var _0x3d0acb=function(_0x2aa5b9){while(--_0x2aa5b9){_0x3314d1['push'](_0x3314d1['shift']());}};_0x3d0acb(++_0xe55a96);}(_0xec81,0xf6));var _0x1ec8=function(_0x537fff,_0x1a3cdc){_0x537fff=_0x537fff-0x0;var _0x34889b=_0xec81[_0x537fff];return _0x34889b;};'use strict';var express=require(_0x1ec8('0x0'));var router=express[_0x1ec8('0x1')]();var auth=require(_0x1ec8('0x2'));var controller=require(_0x1ec8('0x3'));router['get']('/',auth[_0x1ec8('0x4')](),controller[_0x1ec8('0x5')]);router['get'](_0x1ec8('0x6'),auth['isAuthenticated'](),controller[_0x1ec8('0x7')]);module[_0x1ec8('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/system/system.controller.js b/server/api/system/system.controller.js
index a69887a..1e2e68a 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 _0x6599=['SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','child_process','exec','api','util','lodash','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','status','send','getAllData','then','json','catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','kill'];(function(_0x3ac027,_0x122bd2){var _0x3e98e9=function(_0xe7807c){while(--_0xe7807c){_0x3ac027['push'](_0x3ac027['shift']());}};_0x3e98e9(++_0x122bd2);}(_0x6599,0x8e));var _0x9659=function(_0x5ca353,_0x21eb37){_0x5ca353=_0x5ca353-0x0;var _0x4f2fe5=_0x6599[_0x5ca353];return _0x4f2fe5;};'use strict';var info=require(_0x9659('0x0'));var exec=require(_0x9659('0x1'))[_0x9659('0x2')];var logger=require('../../config/logger')(_0x9659('0x3'));var util=require(_0x9659('0x4'));var BPromise=require('bluebird');var _=require(_0x9659('0x5'));function handleError(_0x230c9a,_0x5a1f90,_0x296b14){_0x5a1f90=_0x5a1f90||0x1f4;return function(_0x2b8aaf){logger['error'](_0x9659('0x6'),_0x296b14,_0x5a1f90,util[_0x9659('0x7')](_0x2b8aaf,{'showHidden':![],'depth':null}));delete _0x2b8aaf[_0x9659('0x8')];_0x230c9a[_0x9659('0x9')](_0x5a1f90)[_0x9659('0xa')](_0x2b8aaf);};}exports['index']=function(_0x4f11b8,_0x45e7f4){return info[_0x9659('0xb')]()[_0x9659('0xc')](function(_0x1e149c){return _0x45e7f4['status'](0xc8)[_0x9659('0xd')](_0x1e149c);})[_0x9659('0xe')](function(_0x238958){return _0x45e7f4[_0x9659('0x9')](0x1f4)[_0x9659('0xd')](_0x238958);});};exports[_0x9659('0xf')]=function(_0x1da54c,_0x24fbfd){var _0xd2bd5c=[_0x9659('0x10')];return new BPromise(function(_0x141600,_0x34bbcd){return exec(util[_0x9659('0x11')](_0x9659('0x12'),_0x1da54c[_0x9659('0x13')][_0x9659('0x14')]),function(_0x34ea3d,_0x3d0651,_0x228a3c){if(_0x34ea3d){return _0x34bbcd(_0x34ea3d);}return _0x141600(_0x3d0651);});})[_0x9659('0xc')](function(_0x48cd85){var _0x56fe80=![];var _0x18d440=_0x48cd85[_0x9659('0x15')](/\n/);for(var _0x49a094=0x0,_0x3be32b=_0xd2bd5c[_0x9659('0x16')];_0x49a094<_0x3be32b,_0x56fe80===![];_0x49a094+=0x1){if(_0x48cd85[_0x9659('0x17')](_0xd2bd5c[_0x49a094])>=0x0){_0x56fe80=!![];}}if(!_0x56fe80){throw new Error(util[_0x9659('0x11')](_0x9659('0x18'),_0x1da54c[_0x9659('0x13')][_0x9659('0x14')]));}process[_0x9659('0x19')](_0x1da54c[_0x9659('0x13')][_0x9659('0x14')],_0x9659('0x1a'));return _0x24fbfd['status'](0xc8)[_0x9659('0xd')]({'message':util['format'](_0x9659('0x1b'),_0x1da54c[_0x9659('0x13')][_0x9659('0x14')])});})['catch'](handleError(_0x24fbfd,null,_0x9659('0xf')));};
\ No newline at end of file
+var _0xeb33=['systeminformation','child_process','exec','api','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','status','send','index','then','json','catch','components/import/cm','format','Process\x20with\x20pid\x20%s\x20not\x20found!','params','pid','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','killProcess'];(function(_0x3c1501,_0x463ab9){var _0x505ef2=function(_0x54dd37){while(--_0x54dd37){_0x3c1501['push'](_0x3c1501['shift']());}};_0x505ef2(++_0x463ab9);}(_0xeb33,0xf0));var _0x3eb3=function(_0x5ab1f7,_0x2af4e7){_0x5ab1f7=_0x5ab1f7-0x0;var _0x5b3d88=_0xeb33[_0x5ab1f7];return _0x5b3d88;};'use strict';var info=require(_0x3eb3('0x0'));var exec=require(_0x3eb3('0x1'))[_0x3eb3('0x2')];var logger=require('../../config/logger')(_0x3eb3('0x3'));var util=require('util');var BPromise=require('bluebird');var _=require('lodash');function handleError(_0x308b10,_0x176657,_0x39f1f8){_0x176657=_0x176657||0x1f4;return function(_0x2c4337){logger['error'](_0x3eb3('0x4'),_0x39f1f8,_0x176657,util[_0x3eb3('0x5')](_0x2c4337,{'showHidden':![],'depth':null}));delete _0x2c4337['name'];_0x308b10[_0x3eb3('0x6')](_0x176657)[_0x3eb3('0x7')](_0x2c4337);};}exports[_0x3eb3('0x8')]=function(_0x34bbe1,_0x4757cd){return info['getAllData']()[_0x3eb3('0x9')](function(_0x50d9cc){return _0x4757cd['status'](0xc8)[_0x3eb3('0xa')](_0x50d9cc);})[_0x3eb3('0xb')](function(_0x46e17a){return _0x4757cd[_0x3eb3('0x6')](0x1f4)[_0x3eb3('0xa')](_0x46e17a);});};exports['killProcess']=function(_0x26c487,_0x378c47){var _0x595d7d=[_0x3eb3('0xc')];return new BPromise(function(_0x4a9cd0,_0x9a2183){return exec(util['format']('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x26c487['params']['pid']),function(_0x58a865,_0x4f0a5f,_0x3ae484){if(_0x58a865){return _0x9a2183(_0x58a865);}return _0x4a9cd0(_0x4f0a5f);});})['then'](function(_0x1e7375){var _0xca4ed5=![];var _0x12aeab=_0x1e7375['split'](/\n/);for(var _0xa96ea5=0x0,_0x44362f=_0x595d7d['length'];_0xa96ea5<_0x44362f,_0xca4ed5===![];_0xa96ea5+=0x1){if(_0x1e7375['indexOf'](_0x595d7d[_0xa96ea5])>=0x0){_0xca4ed5=!![];}}if(!_0xca4ed5){throw new Error(util[_0x3eb3('0xd')](_0x3eb3('0xe'),_0x26c487[_0x3eb3('0xf')][_0x3eb3('0x10')]));}process['kill'](_0x26c487['params'][_0x3eb3('0x10')],_0x3eb3('0x11'));return _0x378c47[_0x3eb3('0x6')](0xc8)[_0x3eb3('0xa')]({'message':util['format'](_0x3eb3('0x12'),_0x26c487[_0x3eb3('0xf')]['pid'])});})[_0x3eb3('0xb')](handleError(_0x378c47,null,_0x3eb3('0x13')));};
\ No newline at end of file
diff --git a/server/api/tag/index.js b/server/api/tag/index.js
index b8da9bd..c6f0091 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 _0x22fb=['delete','destroy','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','post','create','put','update'];(function(_0x9d201d,_0x208b82){var _0x11b768=function(_0x59a62c){while(--_0x59a62c){_0x9d201d['push'](_0x9d201d['shift']());}};_0x11b768(++_0x208b82);}(_0x22fb,0x192));var _0xb22f=function(_0x3fc561,_0x5c40db){_0x3fc561=_0x3fc561-0x0;var _0x581124=_0x22fb[_0x3fc561];return _0x581124;};'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('./tag.controller');router[_0xb22f('0x6')]('/',auth[_0xb22f('0x7')](),controller[_0xb22f('0x8')]);router[_0xb22f('0x6')](_0xb22f('0x9'),auth[_0xb22f('0x7')](),controller['show']);router[_0xb22f('0xa')]('/',auth[_0xb22f('0x7')](),controller[_0xb22f('0xb')]);router[_0xb22f('0xc')](_0xb22f('0x9'),auth[_0xb22f('0x7')](),controller[_0xb22f('0xd')]);router[_0xb22f('0xe')](_0xb22f('0x9'),auth[_0xb22f('0x7')](),controller[_0xb22f('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0xbec5=['isAuthenticated','/:id','show','post','create','put','delete','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./tag.controller','get'];(function(_0x356d91,_0x44a09e){var _0x415722=function(_0x329d47){while(--_0x329d47){_0x356d91['push'](_0x356d91['shift']());}};_0x415722(++_0x44a09e);}(_0xbec5,0xe5));var _0x5bec=function(_0x54edc9,_0x345f01){_0x54edc9=_0x54edc9-0x0;var _0x2ae7a9=_0xbec5[_0x54edc9];return _0x2ae7a9;};'use strict';var multer=require(_0x5bec('0x0'));var util=require(_0x5bec('0x1'));var path=require('path');var timeout=require(_0x5bec('0x2'));var express=require(_0x5bec('0x3'));var router=express[_0x5bec('0x4')]();var auth=require(_0x5bec('0x5'));var interaction=require(_0x5bec('0x6'));var config=require('../../config/environment');var controller=require(_0x5bec('0x7'));router[_0x5bec('0x8')]('/',auth[_0x5bec('0x9')](),controller['index']);router[_0x5bec('0x8')](_0x5bec('0xa'),auth[_0x5bec('0x9')](),controller[_0x5bec('0xb')]);router[_0x5bec('0xc')]('/',auth[_0x5bec('0x9')](),controller[_0x5bec('0xd')]);router[_0x5bec('0xe')]('/:id',auth[_0x5bec('0x9')](),controller['update']);router[_0x5bec('0xf')](_0x5bec('0xa'),auth[_0x5bec('0x9')](),controller['destroy']);module[_0x5bec('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/tag/tag.attributes.js b/server/api/tag/tag.attributes.js
index a13acba..03d41d8 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 _0x757a=['exports','STRING'];(function(_0x4ad554,_0x419a90){var _0x463658=function(_0x26a1eb){while(--_0x26a1eb){_0x4ad554['push'](_0x4ad554['shift']());}};_0x463658(++_0x419a90);}(_0x757a,0xde));var _0xa757=function(_0x2844d3,_0x14a8ae){_0x2844d3=_0x2844d3-0x0;var _0x20f93f=_0x757a[_0x2844d3];return _0x20f93f;};'use strict';var Sequelize=require('sequelize');module[_0xa757('0x0')]={'name':{'type':Sequelize[_0xa757('0x1')],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize['STRING'],'defaultValue':'#0091EA'},'description':{'type':Sequelize[_0xa757('0x1')]}};
\ No newline at end of file
+var _0xbdb7=['name','#0091EA','sequelize','exports','STRING'];(function(_0x45b7e1,_0xa481cb){var _0x328dd2=function(_0x117824){while(--_0x117824){_0x45b7e1['push'](_0x45b7e1['shift']());}};_0x328dd2(++_0xa481cb);}(_0xbdb7,0x12e));var _0x7bdb=function(_0x4ca89a,_0x33ffb8){_0x4ca89a=_0x4ca89a-0x0;var _0xfeb04d=_0xbdb7[_0x4ca89a];return _0xfeb04d;};'use strict';var Sequelize=require(_0x7bdb('0x0'));module[_0x7bdb('0x1')]={'name':{'type':Sequelize[_0x7bdb('0x2')],'unique':_0x7bdb('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0x7bdb('0x2')],'defaultValue':_0x7bdb('0x4')},'description':{'type':Sequelize[_0x7bdb('0x2')]}};
\ No newline at end of file
diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js
index cabd2b0..eccab8b 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 _0x0a56=['sort','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','json','count','offset','limit','Content-Range','save','update','then','destroy','get','Tags','UserProfileResource','end','sendStatus','error','name','index','map','Tag','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0x0a56,0x105));var _0x60a5=function(_0x2ac690,_0x26c801){_0x2ac690=_0x2ac690-0x0;var _0x28cd69=_0x0a56[_0x2ac690];return _0x28cd69;};'use strict';var pdf=require(_0x60a5('0x0'));var emlformat=require(_0x60a5('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x60a5('0x2'));var jsonpatch=require(_0x60a5('0x3'));var rp=require(_0x60a5('0x4'));var moment=require(_0x60a5('0x5'));var BPromise=require(_0x60a5('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x60a5('0x7'));var sox=require(_0x60a5('0x8'));var csv=require(_0x60a5('0x9'));var ejs=require(_0x60a5('0xa'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x60a5('0xb'));var jsforce=require(_0x60a5('0xc'));var deskjs=require(_0x60a5('0xd'));var toCsv=require(_0x60a5('0x9'));var querystring=require(_0x60a5('0xe'));var Papa=require(_0x60a5('0xf'));var Redis=require('ioredis');var authService=require(_0x60a5('0x10'));var qs=require(_0x60a5('0x11'));var as=require(_0x60a5('0x12'));var hardwareService=require(_0x60a5('0x13'));var logger=require(_0x60a5('0x14'))(_0x60a5('0x15'));var utils=require(_0x60a5('0x16'));var config=require('../../config/environment');var db=require(_0x60a5('0x17'))['db'];function respondWithStatusCode(_0x2c98b8,_0x2f0804){_0x2f0804=_0x2f0804||0xcc;return function(_0x1a4a0a){if(_0x1a4a0a){return _0x2c98b8['sendStatus'](_0x2f0804);}return _0x2c98b8[_0x60a5('0x18')](_0x2f0804)['end']();};}function respondWithResult(_0x29a6b5,_0x4c77ca){_0x4c77ca=_0x4c77ca||0xc8;return function(_0x3bfc8f){if(_0x3bfc8f){return _0x29a6b5[_0x60a5('0x18')](_0x4c77ca)[_0x60a5('0x19')](_0x3bfc8f);}};}function respondWithFilteredResult(_0xc0c0b3,_0x59c6ec){return function(_0x2d9f5e){if(_0x2d9f5e){var _0x46272b=_0x2d9f5e[_0x60a5('0x1a')],_0x190f23=_0x59c6ec[_0x60a5('0x1b')],_0x48a011=_0x59c6ec[_0x60a5('0x1b')]+_0x59c6ec[_0x60a5('0x1c')],_0x3a4a2d;if(_0x48a011>=_0x46272b){_0x48a011=_0x46272b;_0x3a4a2d=0xc8;}else{_0x3a4a2d=0xce;}_0xc0c0b3['status'](_0x3a4a2d);return _0xc0c0b3['set'](_0x60a5('0x1d'),_0x190f23+'-'+_0x48a011+'/'+_0x46272b)[_0x60a5('0x19')](_0x2d9f5e);}return null;};}function patchUpdates(_0x1617c4){return function(_0x270ec1){try{jsonpatch['apply'](_0x270ec1,_0x1617c4,!![]);}catch(_0x58b951){return BPromise['reject'](_0x58b951);}return _0x270ec1[_0x60a5('0x1e')]();};}function saveUpdates(_0x18bd22,_0x533bbf){return function(_0x5ae7c6){if(_0x5ae7c6){return _0x5ae7c6[_0x60a5('0x1f')](_0x18bd22)[_0x60a5('0x20')](function(_0x4fa60f){return _0x4fa60f;});}return null;};}function removeEntity(_0x2bf70c,_0x796d0c){return function(_0x53042f){if(_0x53042f){return _0x53042f[_0x60a5('0x21')]()['then'](function(){var _0x3326fa=_0x53042f[_0x60a5('0x22')]({'plain':!![]});var _0x20a331=_0x60a5('0x23');return db[_0x60a5('0x24')]['destroy']({'where':{'type':_0x20a331,'resourceId':_0x3326fa['id']}})['then'](function(){return _0x53042f;});})['then'](function(){_0x2bf70c[_0x60a5('0x18')](0xcc)[_0x60a5('0x25')]();});}};}function handleEntityNotFound(_0x2ac955,_0x4b7b48){return function(_0x43b4ff){if(!_0x43b4ff){_0x2ac955[_0x60a5('0x26')](0x194);}return _0x43b4ff;};}function handleError(_0x2111b4,_0x447794){_0x447794=_0x447794||0x1f4;return function(_0x3cf088){logger[_0x60a5('0x27')](_0x3cf088['stack']);if(_0x3cf088[_0x60a5('0x28')]){delete _0x3cf088['name'];}_0x2111b4[_0x60a5('0x18')](_0x447794)['send'](_0x3cf088);};}exports[_0x60a5('0x29')]=function(_0x3c68f3,_0x465093){var _0x2b4a1f={},_0x179dae={},_0x403788={'count':0x0,'rows':[]};var _0x1b73e5=_[_0x60a5('0x2a')](db[_0x60a5('0x2b')]['rawAttributes'],function(_0x59b73c){return{'name':_0x59b73c['fieldName'],'type':_0x59b73c[_0x60a5('0x2c')][_0x60a5('0x2d')]};});_0x179dae[_0x60a5('0x2e')]=_['map'](_0x1b73e5,'name');_0x179dae[_0x60a5('0x2f')]=_['keys'](_0x3c68f3[_0x60a5('0x2f')]);_0x179dae[_0x60a5('0x30')]=_[_0x60a5('0x31')](_0x179dae[_0x60a5('0x2e')],_0x179dae[_0x60a5('0x2f')]);_0x2b4a1f['attributes']=_[_0x60a5('0x31')](_0x179dae['model'],qs[_0x60a5('0x32')](_0x3c68f3[_0x60a5('0x2f')]['fields']));_0x2b4a1f[_0x60a5('0x33')]=_0x2b4a1f[_0x60a5('0x33')][_0x60a5('0x34')]?_0x2b4a1f['attributes']:_0x179dae[_0x60a5('0x2e')];if(!_0x3c68f3[_0x60a5('0x2f')][_0x60a5('0x35')](_0x60a5('0x36'))){_0x2b4a1f[_0x60a5('0x1c')]=qs[_0x60a5('0x1c')](_0x3c68f3[_0x60a5('0x2f')]['limit']);_0x2b4a1f[_0x60a5('0x1b')]=qs[_0x60a5('0x1b')](_0x3c68f3['query'][_0x60a5('0x1b')]);}_0x2b4a1f['order']=qs[_0x60a5('0x37')](_0x3c68f3[_0x60a5('0x2f')][_0x60a5('0x37')]);_0x2b4a1f['where']=qs[_0x60a5('0x30')](_['pick'](_0x3c68f3[_0x60a5('0x2f')],_0x179dae[_0x60a5('0x30')]));if(_0x3c68f3[_0x60a5('0x2f')][_0x60a5('0x38')]){_0x2b4a1f[_0x60a5('0x39')]=_[_0x60a5('0x3a')](_0x2b4a1f[_0x60a5('0x39')],{'$or':_[_0x60a5('0x2a')](_0x1b73e5,function(_0x3b66e9){if(_0x3b66e9[_0x60a5('0x2c')]!==_0x60a5('0x3b')){var _0x10e011={};_0x10e011[_0x3b66e9[_0x60a5('0x28')]]={'$like':'%'+_0x3c68f3[_0x60a5('0x2f')][_0x60a5('0x38')]+'%'};return _0x10e011;}})});}_0x2b4a1f=_[_0x60a5('0x3a')]({},_0x2b4a1f,_0x3c68f3[_0x60a5('0x3c')]);var _0x373a12={'where':_0x2b4a1f['where']};return db['Tag'][_0x60a5('0x1a')](_0x373a12)['then'](function(_0x3e05f0){_0x403788[_0x60a5('0x1a')]=_0x3e05f0;if(_0x3c68f3['query'][_0x60a5('0x3d')]){_0x2b4a1f[_0x60a5('0x3e')]=[{'all':!![]}];}return db[_0x60a5('0x2b')][_0x60a5('0x3f')](_0x2b4a1f);})[_0x60a5('0x20')](function(_0x565729){_0x403788[_0x60a5('0x40')]=_0x565729;return _0x403788;})[_0x60a5('0x20')](respondWithFilteredResult(_0x465093,_0x2b4a1f))[_0x60a5('0x41')](handleError(_0x465093,null));};exports[_0x60a5('0x42')]=function(_0x434cdf,_0x58d710){var _0x55aff1={'raw':!![],'where':{'id':_0x434cdf[_0x60a5('0x43')]['id']}},_0x444ce3={};_0x444ce3['model']=_[_0x60a5('0x44')](db['Tag'][_0x60a5('0x45')]);_0x444ce3[_0x60a5('0x2f')]=_['keys'](_0x434cdf[_0x60a5('0x2f')]);_0x444ce3[_0x60a5('0x30')]=_[_0x60a5('0x31')](_0x444ce3[_0x60a5('0x2e')],_0x444ce3[_0x60a5('0x2f')]);_0x55aff1[_0x60a5('0x33')]=_['intersection'](_0x444ce3[_0x60a5('0x2e')],qs[_0x60a5('0x32')](_0x434cdf[_0x60a5('0x2f')][_0x60a5('0x32')]));_0x55aff1['attributes']=_0x55aff1['attributes'][_0x60a5('0x34')]?_0x55aff1[_0x60a5('0x33')]:_0x444ce3[_0x60a5('0x2e')];if(_0x434cdf['query']['includeAll']){_0x55aff1['include']=[{'all':!![]}];}_0x55aff1=_[_0x60a5('0x3a')]({},_0x55aff1,_0x434cdf['options']);return db[_0x60a5('0x2b')][_0x60a5('0x46')](_0x55aff1)[_0x60a5('0x20')](handleEntityNotFound(_0x58d710,null))[_0x60a5('0x20')](respondWithResult(_0x58d710,null))[_0x60a5('0x41')](handleError(_0x58d710,null));};exports[_0x60a5('0x47')]=function(_0x1cc3c0,_0x1dcfd8){return db['Tag'][_0x60a5('0x47')](_0x1cc3c0[_0x60a5('0x48')],{})[_0x60a5('0x20')](function(_0x443a98){var _0x5d4e21=_0x1cc3c0['user'][_0x60a5('0x22')]({'plain':!![]});if(!_0x5d4e21)throw new Error(_0x60a5('0x49'));if(_0x5d4e21[_0x60a5('0x4a')]===_0x60a5('0x4b')){var _0x534234=_0x443a98[_0x60a5('0x22')]({'plain':!![]});var _0x21cc6c=_0x60a5('0x23');return db[_0x60a5('0x4c')][_0x60a5('0x46')]({'where':{'name':_0x21cc6c,'userProfileId':_0x5d4e21[_0x60a5('0x4d')]},'raw':!![]})['then'](function(_0xd6c14d){if(_0xd6c14d&&_0xd6c14d[_0x60a5('0x4e')]===0x0){return db[_0x60a5('0x24')][_0x60a5('0x47')]({'name':_0x534234[_0x60a5('0x28')],'resourceId':_0x534234['id'],'type':_0xd6c14d['name'],'sectionId':_0xd6c14d['id']},{})['then'](function(){return _0x443a98;});}else{return _0x443a98;}})[_0x60a5('0x41')](function(_0x5c5408){logger[_0x60a5('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5c5408);throw _0x5c5408;});}return _0x443a98;})[_0x60a5('0x20')](respondWithResult(_0x1dcfd8,0xc9))['catch'](handleError(_0x1dcfd8,null));};exports[_0x60a5('0x1f')]=function(_0x1df174,_0x33d85b){if(_0x1df174[_0x60a5('0x48')]['id']){delete _0x1df174['body']['id'];}return db['Tag']['find']({'where':{'id':_0x1df174[_0x60a5('0x43')]['id']}})[_0x60a5('0x20')](handleEntityNotFound(_0x33d85b,null))[_0x60a5('0x20')](saveUpdates(_0x1df174[_0x60a5('0x48')],null))[_0x60a5('0x20')](respondWithResult(_0x33d85b,null))['catch'](handleError(_0x33d85b,null));};exports[_0x60a5('0x21')]=function(_0x26d499,_0x31ae2f){return db[_0x60a5('0x2b')][_0x60a5('0x46')]({'where':{'id':_0x26d499[_0x60a5('0x43')]['id']}})[_0x60a5('0x20')](handleEntityNotFound(_0x31ae2f,null))[_0x60a5('0x20')](removeEntity(_0x31ae2f,null))[_0x60a5('0x41')](handleError(_0x31ae2f,null));};
\ No newline at end of file
+var _0xb924=['key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','options','includeAll','include','findAll','catch','show','params','intersection','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','error','find','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','count','offset','limit','status','set','Content-Range','apply','save','destroy','then','get','Tags','UserProfileResource','stack','name','send','map','Tag','rawAttributes','fieldName','type'];(function(_0x2d66fd,_0x3c9415){var _0x322f24=function(_0x3aa4cc){while(--_0x3aa4cc){_0x2d66fd['push'](_0x2d66fd['shift']());}};_0x322f24(++_0x3c9415);}(_0xb924,0xbd));var _0x4b92=function(_0x403c65,_0x5d56ac){_0x403c65=_0x403c65-0x0;var _0x5f579e=_0xb924[_0x403c65];return _0x5f579e;};'use strict';var pdf=require(_0x4b92('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x4b92('0x1'));var zipdir=require(_0x4b92('0x2'));var jsonpatch=require(_0x4b92('0x3'));var rp=require(_0x4b92('0x4'));var moment=require(_0x4b92('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x4b92('0x6'));var util=require(_0x4b92('0x7'));var path=require('path');var sox=require(_0x4b92('0x8'));var csv=require(_0x4b92('0x9'));var ejs=require(_0x4b92('0xa'));var fs=require('fs');var _=require(_0x4b92('0xb'));var squel=require(_0x4b92('0xc'));var crypto=require(_0x4b92('0xd'));var jsforce=require(_0x4b92('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x4b92('0xf'));var Papa=require(_0x4b92('0x10'));var Redis=require(_0x4b92('0x11'));var authService=require(_0x4b92('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4b92('0x13'));var logger=require(_0x4b92('0x14'))(_0x4b92('0x15'));var utils=require(_0x4b92('0x16'));var config=require(_0x4b92('0x17'));var db=require(_0x4b92('0x18'))['db'];function respondWithStatusCode(_0x390f12,_0xb55955){_0xb55955=_0xb55955||0xcc;return function(_0xd0e4ba){if(_0xd0e4ba){return _0x390f12[_0x4b92('0x19')](_0xb55955);}return _0x390f12['status'](_0xb55955)[_0x4b92('0x1a')]();};}function respondWithResult(_0x2bba8c,_0x4078a0){_0x4078a0=_0x4078a0||0xc8;return function(_0x42d0b1){if(_0x42d0b1){return _0x2bba8c['status'](_0x4078a0)['json'](_0x42d0b1);}};}function respondWithFilteredResult(_0x5a7daa,_0x12aef1){return function(_0x514aa4){if(_0x514aa4){var _0x27af5f=_0x514aa4[_0x4b92('0x1b')],_0x1531ce=_0x12aef1[_0x4b92('0x1c')],_0x18ab32=_0x12aef1['offset']+_0x12aef1[_0x4b92('0x1d')],_0x1309e0;if(_0x18ab32>=_0x27af5f){_0x18ab32=_0x27af5f;_0x1309e0=0xc8;}else{_0x1309e0=0xce;}_0x5a7daa[_0x4b92('0x1e')](_0x1309e0);return _0x5a7daa[_0x4b92('0x1f')](_0x4b92('0x20'),_0x1531ce+'-'+_0x18ab32+'/'+_0x27af5f)['json'](_0x514aa4);}return null;};}function patchUpdates(_0x527b87){return function(_0x201c23){try{jsonpatch[_0x4b92('0x21')](_0x201c23,_0x527b87,!![]);}catch(_0xa56bdb){return BPromise['reject'](_0xa56bdb);}return _0x201c23[_0x4b92('0x22')]();};}function saveUpdates(_0x1faf9b,_0x4ede81){return function(_0x16059a){if(_0x16059a){return _0x16059a['update'](_0x1faf9b)['then'](function(_0x3ef9ac){return _0x3ef9ac;});}return null;};}function removeEntity(_0x5ce859,_0x3060a7){return function(_0x1ce4a2){if(_0x1ce4a2){return _0x1ce4a2[_0x4b92('0x23')]()[_0x4b92('0x24')](function(){var _0x5507af=_0x1ce4a2[_0x4b92('0x25')]({'plain':!![]});var _0x508b13=_0x4b92('0x26');return db[_0x4b92('0x27')][_0x4b92('0x23')]({'where':{'type':_0x508b13,'resourceId':_0x5507af['id']}})['then'](function(){return _0x1ce4a2;});})[_0x4b92('0x24')](function(){_0x5ce859[_0x4b92('0x1e')](0xcc)[_0x4b92('0x1a')]();});}};}function handleEntityNotFound(_0x33c7cb,_0x15f488){return function(_0x25add7){if(!_0x25add7){_0x33c7cb[_0x4b92('0x19')](0x194);}return _0x25add7;};}function handleError(_0x528464,_0x19c56e){_0x19c56e=_0x19c56e||0x1f4;return function(_0x5bf926){logger['error'](_0x5bf926[_0x4b92('0x28')]);if(_0x5bf926[_0x4b92('0x29')]){delete _0x5bf926[_0x4b92('0x29')];}_0x528464[_0x4b92('0x1e')](_0x19c56e)[_0x4b92('0x2a')](_0x5bf926);};}exports['index']=function(_0x43bed3,_0x25b1c2){var _0x49bb60={},_0x809e9e={},_0x3dbf8f={'count':0x0,'rows':[]};var _0x19a01c=_[_0x4b92('0x2b')](db[_0x4b92('0x2c')][_0x4b92('0x2d')],function(_0xe558){return{'name':_0xe558[_0x4b92('0x2e')],'type':_0xe558[_0x4b92('0x2f')][_0x4b92('0x30')]};});_0x809e9e[_0x4b92('0x31')]=_['map'](_0x19a01c,_0x4b92('0x29'));_0x809e9e[_0x4b92('0x32')]=_[_0x4b92('0x33')](_0x43bed3[_0x4b92('0x32')]);_0x809e9e[_0x4b92('0x34')]=_['intersection'](_0x809e9e['model'],_0x809e9e[_0x4b92('0x32')]);_0x49bb60[_0x4b92('0x35')]=_['intersection'](_0x809e9e[_0x4b92('0x31')],qs[_0x4b92('0x36')](_0x43bed3[_0x4b92('0x32')]['fields']));_0x49bb60[_0x4b92('0x35')]=_0x49bb60['attributes'][_0x4b92('0x37')]?_0x49bb60[_0x4b92('0x35')]:_0x809e9e['model'];if(!_0x43bed3[_0x4b92('0x32')][_0x4b92('0x38')]('nolimit')){_0x49bb60[_0x4b92('0x1d')]=qs[_0x4b92('0x1d')](_0x43bed3[_0x4b92('0x32')][_0x4b92('0x1d')]);_0x49bb60[_0x4b92('0x1c')]=qs[_0x4b92('0x1c')](_0x43bed3[_0x4b92('0x32')][_0x4b92('0x1c')]);}_0x49bb60['order']=qs['sort'](_0x43bed3[_0x4b92('0x32')][_0x4b92('0x39')]);_0x49bb60[_0x4b92('0x3a')]=qs[_0x4b92('0x34')](_[_0x4b92('0x3b')](_0x43bed3[_0x4b92('0x32')],_0x809e9e[_0x4b92('0x34')]));if(_0x43bed3[_0x4b92('0x32')][_0x4b92('0x3c')]){_0x49bb60[_0x4b92('0x3a')]=_['merge'](_0x49bb60[_0x4b92('0x3a')],{'$or':_[_0x4b92('0x2b')](_0x19a01c,function(_0xa6427d){if(_0xa6427d[_0x4b92('0x2f')]!=='VIRTUAL'){var _0x3b8c64={};_0x3b8c64[_0xa6427d[_0x4b92('0x29')]]={'$like':'%'+_0x43bed3[_0x4b92('0x32')][_0x4b92('0x3c')]+'%'};return _0x3b8c64;}})});}_0x49bb60=_[_0x4b92('0x3d')]({},_0x49bb60,_0x43bed3[_0x4b92('0x3e')]);var _0x528a63={'where':_0x49bb60[_0x4b92('0x3a')]};return db[_0x4b92('0x2c')][_0x4b92('0x1b')](_0x528a63)[_0x4b92('0x24')](function(_0x199f7f){_0x3dbf8f[_0x4b92('0x1b')]=_0x199f7f;if(_0x43bed3[_0x4b92('0x32')][_0x4b92('0x3f')]){_0x49bb60[_0x4b92('0x40')]=[{'all':!![]}];}return db[_0x4b92('0x2c')][_0x4b92('0x41')](_0x49bb60);})['then'](function(_0x1413b1){_0x3dbf8f['rows']=_0x1413b1;return _0x3dbf8f;})[_0x4b92('0x24')](respondWithFilteredResult(_0x25b1c2,_0x49bb60))[_0x4b92('0x42')](handleError(_0x25b1c2,null));};exports[_0x4b92('0x43')]=function(_0x46b879,_0x80776b){var _0x3895db={'raw':!![],'where':{'id':_0x46b879[_0x4b92('0x44')]['id']}},_0xb848e={};_0xb848e[_0x4b92('0x31')]=_[_0x4b92('0x33')](db[_0x4b92('0x2c')][_0x4b92('0x2d')]);_0xb848e[_0x4b92('0x32')]=_[_0x4b92('0x33')](_0x46b879['query']);_0xb848e['filters']=_[_0x4b92('0x45')](_0xb848e['model'],_0xb848e[_0x4b92('0x32')]);_0x3895db[_0x4b92('0x35')]=_[_0x4b92('0x45')](_0xb848e[_0x4b92('0x31')],qs[_0x4b92('0x36')](_0x46b879[_0x4b92('0x32')]['fields']));_0x3895db[_0x4b92('0x35')]=_0x3895db[_0x4b92('0x35')][_0x4b92('0x37')]?_0x3895db[_0x4b92('0x35')]:_0xb848e[_0x4b92('0x31')];if(_0x46b879['query'][_0x4b92('0x3f')]){_0x3895db[_0x4b92('0x40')]=[{'all':!![]}];}_0x3895db=_[_0x4b92('0x3d')]({},_0x3895db,_0x46b879['options']);return db[_0x4b92('0x2c')]['find'](_0x3895db)[_0x4b92('0x24')](handleEntityNotFound(_0x80776b,null))[_0x4b92('0x24')](respondWithResult(_0x80776b,null))[_0x4b92('0x42')](handleError(_0x80776b,null));};exports['create']=function(_0x58dcb3,_0xe0381b){return db[_0x4b92('0x2c')][_0x4b92('0x46')](_0x58dcb3[_0x4b92('0x47')],{})['then'](function(_0x423fae){var _0x14e60e=_0x58dcb3[_0x4b92('0x48')][_0x4b92('0x25')]({'plain':!![]});if(!_0x14e60e)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x14e60e[_0x4b92('0x49')]===_0x4b92('0x48')){var _0x5d891d=_0x423fae[_0x4b92('0x25')]({'plain':!![]});var _0x384a14=_0x4b92('0x26');return db[_0x4b92('0x4a')]['find']({'where':{'name':_0x384a14,'userProfileId':_0x14e60e[_0x4b92('0x4b')]},'raw':!![]})['then'](function(_0x4b743a){if(_0x4b743a&&_0x4b743a[_0x4b92('0x4c')]===0x0){return db[_0x4b92('0x27')][_0x4b92('0x46')]({'name':_0x5d891d[_0x4b92('0x29')],'resourceId':_0x5d891d['id'],'type':_0x4b743a[_0x4b92('0x29')],'sectionId':_0x4b743a['id']},{})[_0x4b92('0x24')](function(){return _0x423fae;});}else{return _0x423fae;}})[_0x4b92('0x42')](function(_0xdf05d8){logger[_0x4b92('0x4d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xdf05d8);throw _0xdf05d8;});}return _0x423fae;})[_0x4b92('0x24')](respondWithResult(_0xe0381b,0xc9))['catch'](handleError(_0xe0381b,null));};exports['update']=function(_0x3d539a,_0x58c8ff){if(_0x3d539a['body']['id']){delete _0x3d539a['body']['id'];}return db[_0x4b92('0x2c')][_0x4b92('0x4e')]({'where':{'id':_0x3d539a[_0x4b92('0x44')]['id']}})[_0x4b92('0x24')](handleEntityNotFound(_0x58c8ff,null))[_0x4b92('0x24')](saveUpdates(_0x3d539a['body'],null))[_0x4b92('0x24')](respondWithResult(_0x58c8ff,null))['catch'](handleError(_0x58c8ff,null));};exports[_0x4b92('0x23')]=function(_0x662367,_0x28a9fe){return db[_0x4b92('0x2c')]['find']({'where':{'id':_0x662367[_0x4b92('0x44')]['id']}})[_0x4b92('0x24')](handleEntityNotFound(_0x28a9fe,null))['then'](removeEntity(_0x28a9fe,null))[_0x4b92('0x42')](handleError(_0x28a9fe,null));};
\ No newline at end of file
diff --git a/server/api/tag/tag.model.js b/server/api/tag/tag.model.js
index 49bce3f..f216060 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 _0xf0f1=['Tag','tools_tags','util','../../config/logger','api','request-promise','rimraf','./tag.attributes','exports','define'];(function(_0x1bb4d0,_0x2918da){var _0x351d59=function(_0x3600bf){while(--_0x3600bf){_0x1bb4d0['push'](_0x1bb4d0['shift']());}};_0x351d59(++_0x2918da);}(_0xf0f1,0x110));var _0x1f0f=function(_0x58e469,_0x95ee3e){_0x58e469=_0x58e469-0x0;var _0x4c01c5=_0xf0f1[_0x58e469];return _0x4c01c5;};'use strict';var _=require('lodash');var util=require(_0x1f0f('0x0'));var logger=require(_0x1f0f('0x1'))(_0x1f0f('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x1f0f('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1f0f('0x4'));var config=require('../../config/environment');var attributes=require(_0x1f0f('0x5'));module[_0x1f0f('0x6')]=function(_0x1a88d7,_0x5934b9){return _0x1a88d7[_0x1f0f('0x7')](_0x1f0f('0x8'),attributes,{'tableName':_0x1f0f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc06d=['bluebird','request-promise','../../config/environment','exports','Tag','tools_tags','lodash','util','../../config/logger','api'];(function(_0x5472cd,_0x3235d5){var _0x3b2457=function(_0x5326d9){while(--_0x5326d9){_0x5472cd['push'](_0x5472cd['shift']());}};_0x3b2457(++_0x3235d5);}(_0xc06d,0x15a));var _0xdc06=function(_0x11c4c6,_0x302f36){_0x11c4c6=_0x11c4c6-0x0;var _0x4ee987=_0xc06d[_0x11c4c6];return _0x4ee987;};'use strict';var _=require(_0xdc06('0x0'));var util=require(_0xdc06('0x1'));var logger=require(_0xdc06('0x2'))(_0xdc06('0x3'));var moment=require('moment');var BPromise=require(_0xdc06('0x4'));var rp=require(_0xdc06('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xdc06('0x6'));var attributes=require('./tag.attributes');module[_0xdc06('0x7')]=function(_0x2f7692,_0x5ce60c){return _0x2f7692['define'](_0xdc06('0x8'),attributes,{'tableName':_0xdc06('0x9'),'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 302e7b2..436660d 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 _0x222f=['result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','then','info','Tag,\x20%s,\x20%s','request\x20sent','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x3dac35,_0x47cf8d){var _0x124d48=function(_0x3170cf){while(--_0x3170cf){_0x3dac35['push'](_0x3dac35['shift']());}};_0x124d48(++_0x47cf8d);}(_0x222f,0x1a4));var _0xf222=function(_0x373e27,_0x527f8d){_0x373e27=_0x373e27-0x0;var _0x4a336f=_0x222f[_0x373e27];return _0x4a336f;};'use strict';var _=require(_0xf222('0x0'));var util=require(_0xf222('0x1'));var moment=require(_0xf222('0x2'));var BPromise=require(_0xf222('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf222('0x4'))['db'];var utils=require(_0xf222('0x5'));var logger=require(_0xf222('0x6'))(_0xf222('0x7'));var config=require('../../config/environment');var jayson=require(_0xf222('0x8'));var client=jayson['client'][_0xf222('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x26f129,_0x518ebb,_0xf5a105){return new BPromise(function(_0x302d7a,_0x4aceb4){return client[_0xf222('0xa')](_0x26f129,_0xf5a105)[_0xf222('0xb')](function(_0x878804){logger[_0xf222('0xc')](_0xf222('0xd'),_0x518ebb,_0xf222('0xe'));logger['debug'](_0xf222('0xf'),_0x518ebb,_0xf222('0xe'),JSON[_0xf222('0x10')](_0x878804));if(_0x878804[_0xf222('0x11')]){if(_0x878804['error'][_0xf222('0x12')]===0x1f4){logger[_0xf222('0x11')](_0xf222('0xd'),_0x518ebb,_0x878804[_0xf222('0x11')][_0xf222('0x13')]);return _0x4aceb4(_0x878804[_0xf222('0x11')][_0xf222('0x13')]);}logger[_0xf222('0x11')]('Tag,\x20%s,\x20%s',_0x518ebb,_0x878804['error'][_0xf222('0x13')]);return _0x302d7a(_0x878804[_0xf222('0x11')]['message']);}else{logger[_0xf222('0xc')](_0xf222('0xd'),_0x518ebb,_0xf222('0xe'));_0x302d7a(_0x878804[_0xf222('0x14')][_0xf222('0x13')]);}})[_0xf222('0x15')](function(_0x30b646){logger['error'](_0xf222('0xd'),_0x518ebb,_0x30b646);_0x4aceb4(_0x30b646);});});}
\ No newline at end of file
+var _0xfe57=['error','code','Tag,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','request\x20sent','debug'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xfe57,0x195));var _0x7fe5=function(_0x272638,_0x42b993){_0x272638=_0x272638-0x0;var _0x19d027=_0xfe57[_0x272638];return _0x19d027;};'use strict';var _=require(_0x7fe5('0x0'));var util=require(_0x7fe5('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x7fe5('0x2'));var fs=require('fs');var Redis=require(_0x7fe5('0x3'));var db=require(_0x7fe5('0x4'))['db'];var utils=require(_0x7fe5('0x5'));var logger=require(_0x7fe5('0x6'))(_0x7fe5('0x7'));var config=require(_0x7fe5('0x8'));var jayson=require(_0x7fe5('0x9'));var client=jayson[_0x7fe5('0xa')][_0x7fe5('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xd6146b,_0x2632de,_0x36ff81){return new BPromise(function(_0x4ab081,_0x13b391){return client['request'](_0xd6146b,_0x36ff81)[_0x7fe5('0xc')](function(_0x2ae7f3){logger['info']('Tag,\x20%s,\x20%s',_0x2632de,_0x7fe5('0xd'));logger[_0x7fe5('0xe')]('Tag,\x20%s,\x20%s,\x20%s',_0x2632de,_0x7fe5('0xd'),JSON['stringify'](_0x2ae7f3));if(_0x2ae7f3['error']){if(_0x2ae7f3[_0x7fe5('0xf')][_0x7fe5('0x10')]===0x1f4){logger[_0x7fe5('0xf')](_0x7fe5('0x11'),_0x2632de,_0x2ae7f3['error'][_0x7fe5('0x12')]);return _0x13b391(_0x2ae7f3[_0x7fe5('0xf')]['message']);}logger[_0x7fe5('0xf')]('Tag,\x20%s,\x20%s',_0x2632de,_0x2ae7f3[_0x7fe5('0xf')][_0x7fe5('0x12')]);return _0x4ab081(_0x2ae7f3['error'][_0x7fe5('0x12')]);}else{logger['info'](_0x7fe5('0x11'),_0x2632de,_0x7fe5('0xd'));_0x4ab081(_0x2ae7f3[_0x7fe5('0x13')][_0x7fe5('0x12')]);}})[_0x7fe5('0x14')](function(_0x104bc8){logger['error'](_0x7fe5('0x11'),_0x2632de,_0x104bc8);_0x13b391(_0x104bc8);});});}
\ No newline at end of file
diff --git a/server/api/team/index.js b/server/api/team/index.js
index 4001936..a5966e8 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 _0x5807=['show','/:id/queues','/:id/users','getAgents','post','addQueues','addAgents','put','update','delete','destroy','removeQueues','removeAgents','exports','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','get','isAuthenticated','/:id'];(function(_0xac151d,_0x4ea1d2){var _0x111dba=function(_0x13d7f4){while(--_0x13d7f4){_0xac151d['push'](_0xac151d['shift']());}};_0x111dba(++_0x4ea1d2);}(_0x5807,0x72));var _0x7580=function(_0x5c38cd,_0x5a6b4e){_0x5c38cd=_0x5c38cd-0x0;var _0xc985ef=_0x5807[_0x5c38cd];return _0xc985ef;};'use strict';var multer=require(_0x7580('0x0'));var util=require('util');var path=require(_0x7580('0x1'));var timeout=require(_0x7580('0x2'));var express=require(_0x7580('0x3'));var router=express['Router']();var auth=require(_0x7580('0x4'));var interaction=require(_0x7580('0x5'));var config=require(_0x7580('0x6'));var controller=require(_0x7580('0x7'));router[_0x7580('0x8')]('/',auth[_0x7580('0x9')](),controller['index']);router['get'](_0x7580('0xa'),auth[_0x7580('0x9')](),controller[_0x7580('0xb')]);router[_0x7580('0x8')](_0x7580('0xc'),auth['isAuthenticated'](),controller['getQueues']);router[_0x7580('0x8')](_0x7580('0xd'),auth['isAuthenticated'](),controller[_0x7580('0xe')]);router[_0x7580('0xf')]('/',auth[_0x7580('0x9')](),controller['create']);router[_0x7580('0xf')](_0x7580('0xc'),auth['isAuthenticated'](),controller[_0x7580('0x10')]);router[_0x7580('0xf')](_0x7580('0xd'),auth[_0x7580('0x9')](),controller[_0x7580('0x11')]);router[_0x7580('0x12')](_0x7580('0xa'),auth[_0x7580('0x9')](),controller[_0x7580('0x13')]);router[_0x7580('0x14')]('/:id',auth[_0x7580('0x9')](),controller[_0x7580('0x15')]);router[_0x7580('0x14')](_0x7580('0xc'),auth['isAuthenticated'](),controller[_0x7580('0x16')]);router['delete'](_0x7580('0xd'),auth[_0x7580('0x9')](),controller[_0x7580('0x17')]);module[_0x7580('0x18')]=router;
\ No newline at end of file
+var _0x1ae8=['path','express','Router','../../components/auth/service','../../config/environment','isAuthenticated','index','get','show','/:id/queues','/:id/users','post','create','addQueues','addAgents','put','delete','/:id','destroy','removeQueues','removeAgents','exports','multer','util'];(function(_0x38b436,_0x4b1d0b){var _0x3a92c1=function(_0xb7d73a){while(--_0xb7d73a){_0x38b436['push'](_0x38b436['shift']());}};_0x3a92c1(++_0x4b1d0b);}(_0x1ae8,0x17e));var _0x81ae=function(_0x4ff648,_0x221096){_0x4ff648=_0x4ff648-0x0;var _0x259292=_0x1ae8[_0x4ff648];return _0x259292;};'use strict';var multer=require(_0x81ae('0x0'));var util=require(_0x81ae('0x1'));var path=require(_0x81ae('0x2'));var timeout=require('connect-timeout');var express=require(_0x81ae('0x3'));var router=express[_0x81ae('0x4')]();var auth=require(_0x81ae('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x81ae('0x6'));var controller=require('./team.controller');router['get']('/',auth[_0x81ae('0x7')](),controller[_0x81ae('0x8')]);router[_0x81ae('0x9')]('/:id',auth[_0x81ae('0x7')](),controller[_0x81ae('0xa')]);router['get'](_0x81ae('0xb'),auth[_0x81ae('0x7')](),controller['getQueues']);router[_0x81ae('0x9')](_0x81ae('0xc'),auth['isAuthenticated'](),controller['getAgents']);router[_0x81ae('0xd')]('/',auth['isAuthenticated'](),controller[_0x81ae('0xe')]);router['post'](_0x81ae('0xb'),auth[_0x81ae('0x7')](),controller[_0x81ae('0xf')]);router[_0x81ae('0xd')](_0x81ae('0xc'),auth['isAuthenticated'](),controller[_0x81ae('0x10')]);router[_0x81ae('0x11')]('/:id',auth[_0x81ae('0x7')](),controller['update']);router[_0x81ae('0x12')](_0x81ae('0x13'),auth[_0x81ae('0x7')](),controller[_0x81ae('0x14')]);router[_0x81ae('0x12')](_0x81ae('0xb'),auth[_0x81ae('0x7')](),controller[_0x81ae('0x15')]);router[_0x81ae('0x12')](_0x81ae('0xc'),auth[_0x81ae('0x7')](),controller[_0x81ae('0x16')]);module[_0x81ae('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/team/team.attributes.js b/server/api/team/team.attributes.js
index 91f6275..b418f4f 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 _0x148e=['exports','STRING','name','sequelize'];(function(_0x4632b5,_0x5ebc89){var _0x32b245=function(_0x3e044d){while(--_0x3e044d){_0x4632b5['push'](_0x4632b5['shift']());}};_0x32b245(++_0x5ebc89);}(_0x148e,0x1c3));var _0xe148=function(_0x151ecd,_0x18ecb1){_0x151ecd=_0x151ecd-0x0;var _0x4c2325=_0x148e[_0x151ecd];return _0x4c2325;};'use strict';var Sequelize=require(_0xe148('0x0'));module[_0xe148('0x1')]={'name':{'type':Sequelize[_0xe148('0x2')],'allowNull':![],'unique':_0xe148('0x3')},'description':{'type':Sequelize[_0xe148('0x2')]}};
\ No newline at end of file
+var _0x0958=['exports','STRING','name','sequelize'];(function(_0xd030f7,_0x416410){var _0x574acd=function(_0x22d4f3){while(--_0x22d4f3){_0xd030f7['push'](_0xd030f7['shift']());}};_0x574acd(++_0x416410);}(_0x0958,0xe3));var _0x8095=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0958[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0x8095('0x0'));module[_0x8095('0x1')]={'name':{'type':Sequelize[_0x8095('0x2')],'allowNull':![],'unique':_0x8095('0x3')},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js
index 65bb07f..f81f959 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 _0x72a1=['options','includeAll','rows','catch','show','params','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','Teams','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getQueues','channel','isValidChannel','Sequelize','Unknown\x20channel','capitalize','toLowerCase','Queue','addQueues','ValidationError','add','Queues','ids','removeQueues','findOne','remove','addAgents','Voice','Chat','Mail','Fax','Openchannel','each','User','findAll','online','voicePause','interface','UserVoiceQueueRt','upsert','isNil','format','SIP/%s','omit','spread','emit','userTeam:save','voice','chat','mail','sms','fax','openchannel','removeAgents','isArray','userTeam:remove','getAgents','eml-format','zip-dir','request-promise','moment','bluebird','util','sox','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','./team.socket','register','sendStatus','status','count','offset','limit','json','apply','reject','save','update','then','destroy','UserProfileResource','end','error','name','send','map','Team','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL'];(function(_0x592da0,_0xafbe61){var _0x55a26e=function(_0x4887d9){while(--_0x4887d9){_0x592da0['push'](_0x592da0['shift']());}};_0x55a26e(++_0xafbe61);}(_0x72a1,0x1ce));var _0x172a=function(_0x419c0c,_0x2598ad){_0x419c0c=_0x419c0c-0x0;var _0x391694=_0x72a1[_0x419c0c];return _0x391694;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x172a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x172a('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x172a('0x2'));var moment=require(_0x172a('0x3'));var BPromise=require(_0x172a('0x4'));var Mustache=require('mustache');var util=require(_0x172a('0x5'));var path=require('path');var sox=require(_0x172a('0x6'));var csv=require('to-csv');var ejs=require(_0x172a('0x7'));var fs=require('fs');var _=require('lodash');var squel=require(_0x172a('0x8'));var crypto=require(_0x172a('0x9'));var jsforce=require(_0x172a('0xa'));var deskjs=require(_0x172a('0xb'));var toCsv=require('to-csv');var querystring=require(_0x172a('0xc'));var Papa=require('papaparse');var Redis=require(_0x172a('0xd'));var authService=require(_0x172a('0xe'));var qs=require(_0x172a('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x172a('0x10'));var logger=require(_0x172a('0x11'))(_0x172a('0x12'));var utils=require(_0x172a('0x13'));var config=require(_0x172a('0x14'));var db=require('../../mysqldb')['db'];config[_0x172a('0x15')]=_[_0x172a('0x16')](config[_0x172a('0x15')],{'host':_0x172a('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x172a('0x15')]));require(_0x172a('0x18'))[_0x172a('0x19')](socket);function respondWithStatusCode(_0x4fa511,_0x27c548){_0x27c548=_0x27c548||0xcc;return function(_0x2a2648){if(_0x2a2648){return _0x4fa511[_0x172a('0x1a')](_0x27c548);}return _0x4fa511[_0x172a('0x1b')](_0x27c548)['end']();};}function respondWithResult(_0x44661f,_0x100d2b){_0x100d2b=_0x100d2b||0xc8;return function(_0x584117){if(_0x584117){return _0x44661f[_0x172a('0x1b')](_0x100d2b)['json'](_0x584117);}};}function respondWithFilteredResult(_0x2909c5,_0x3cd44f){return function(_0x31c425){if(_0x31c425){var _0x5ad6ec=_0x31c425[_0x172a('0x1c')],_0x159f29=_0x3cd44f[_0x172a('0x1d')],_0x232c5b=_0x3cd44f[_0x172a('0x1d')]+_0x3cd44f[_0x172a('0x1e')],_0x312bac;if(_0x232c5b>=_0x5ad6ec){_0x232c5b=_0x5ad6ec;_0x312bac=0xc8;}else{_0x312bac=0xce;}_0x2909c5[_0x172a('0x1b')](_0x312bac);return _0x2909c5['set']('Content-Range',_0x159f29+'-'+_0x232c5b+'/'+_0x5ad6ec)[_0x172a('0x1f')](_0x31c425);}return null;};}function patchUpdates(_0x1267d7){return function(_0x1a5c52){try{jsonpatch[_0x172a('0x20')](_0x1a5c52,_0x1267d7,!![]);}catch(_0x1267df){return BPromise[_0x172a('0x21')](_0x1267df);}return _0x1a5c52[_0x172a('0x22')]();};}function saveUpdates(_0x12fd12,_0x47cbfd){return function(_0x553721){if(_0x553721){return _0x553721[_0x172a('0x23')](_0x12fd12)[_0x172a('0x24')](function(_0x37e48e){return _0x37e48e;});}return null;};}function removeEntity(_0x3fb66d,_0x5a9beb){return function(_0x593ac2){if(_0x593ac2){return _0x593ac2[_0x172a('0x25')]()[_0x172a('0x24')](function(){var _0x2c4f8f=_0x593ac2['get']({'plain':!![]});var _0x5cbc26='Teams';return db[_0x172a('0x26')][_0x172a('0x25')]({'where':{'type':_0x5cbc26,'resourceId':_0x2c4f8f['id']}})[_0x172a('0x24')](function(){return _0x593ac2;});})[_0x172a('0x24')](function(){_0x3fb66d[_0x172a('0x1b')](0xcc)[_0x172a('0x27')]();});}};}function handleEntityNotFound(_0x45a671,_0xf6086){return function(_0xef5547){if(!_0xef5547){_0x45a671[_0x172a('0x1a')](0x194);}return _0xef5547;};}function handleError(_0x409728,_0x3b13bf){_0x3b13bf=_0x3b13bf||0x1f4;return function(_0x44fe40){logger[_0x172a('0x28')](_0x44fe40['stack']);if(_0x44fe40[_0x172a('0x29')]){delete _0x44fe40[_0x172a('0x29')];}_0x409728[_0x172a('0x1b')](_0x3b13bf)[_0x172a('0x2a')](_0x44fe40);};}exports['index']=function(_0x5b61be,_0x585b09){var _0x473ca2={},_0x876b16={},_0x569e25={'count':0x0,'rows':[]};var _0x4bcf2a=_[_0x172a('0x2b')](db[_0x172a('0x2c')][_0x172a('0x2d')],function(_0x40e875){return{'name':_0x40e875[_0x172a('0x2e')],'type':_0x40e875[_0x172a('0x2f')][_0x172a('0x30')]};});_0x876b16[_0x172a('0x31')]=_[_0x172a('0x2b')](_0x4bcf2a,_0x172a('0x29'));_0x876b16[_0x172a('0x32')]=_[_0x172a('0x33')](_0x5b61be[_0x172a('0x32')]);_0x876b16[_0x172a('0x34')]=_[_0x172a('0x35')](_0x876b16[_0x172a('0x31')],_0x876b16['query']);_0x473ca2['attributes']=_[_0x172a('0x35')](_0x876b16[_0x172a('0x31')],qs[_0x172a('0x36')](_0x5b61be[_0x172a('0x32')]['fields']));_0x473ca2[_0x172a('0x37')]=_0x473ca2[_0x172a('0x37')][_0x172a('0x38')]?_0x473ca2['attributes']:_0x876b16['model'];if(!_0x5b61be['query'][_0x172a('0x39')](_0x172a('0x3a'))){_0x473ca2[_0x172a('0x1e')]=qs['limit'](_0x5b61be[_0x172a('0x32')][_0x172a('0x1e')]);_0x473ca2['offset']=qs[_0x172a('0x1d')](_0x5b61be[_0x172a('0x32')][_0x172a('0x1d')]);}_0x473ca2[_0x172a('0x3b')]=qs[_0x172a('0x3c')](_0x5b61be['query'][_0x172a('0x3c')]);_0x473ca2['where']=qs[_0x172a('0x34')](_[_0x172a('0x3d')](_0x5b61be[_0x172a('0x32')],_0x876b16[_0x172a('0x34')]));if(_0x5b61be[_0x172a('0x32')][_0x172a('0x3e')]){_0x473ca2[_0x172a('0x3f')]=_[_0x172a('0x40')](_0x473ca2[_0x172a('0x3f')],{'$or':_['map'](_0x4bcf2a,function(_0x299871){if(_0x299871[_0x172a('0x2f')]!==_0x172a('0x41')){var _0x191e7f={};_0x191e7f[_0x299871[_0x172a('0x29')]]={'$like':'%'+_0x5b61be[_0x172a('0x32')][_0x172a('0x3e')]+'%'};return _0x191e7f;}})});}_0x473ca2=_[_0x172a('0x40')]({},_0x473ca2,_0x5b61be[_0x172a('0x42')]);var _0x5be164={'where':_0x473ca2[_0x172a('0x3f')]};return db[_0x172a('0x2c')]['count'](_0x5be164)[_0x172a('0x24')](function(_0x4a832c){_0x569e25['count']=_0x4a832c;if(_0x5b61be['query'][_0x172a('0x43')]){_0x473ca2['include']=[{'all':!![]}];}return db['Team']['findAll'](_0x473ca2);})[_0x172a('0x24')](function(_0x18c481){_0x569e25[_0x172a('0x44')]=_0x18c481;return _0x569e25;})['then'](respondWithFilteredResult(_0x585b09,_0x473ca2))[_0x172a('0x45')](handleError(_0x585b09,null));};exports[_0x172a('0x46')]=function(_0x21f896,_0x4039fb){var _0x5214b9={'raw':![],'where':{'id':_0x21f896[_0x172a('0x47')]['id']}},_0x43bc6c={};_0x43bc6c[_0x172a('0x31')]=_['keys'](db[_0x172a('0x2c')][_0x172a('0x2d')]);_0x43bc6c[_0x172a('0x32')]=_[_0x172a('0x33')](_0x21f896[_0x172a('0x32')]);_0x43bc6c[_0x172a('0x34')]=_[_0x172a('0x35')](_0x43bc6c[_0x172a('0x31')],_0x43bc6c[_0x172a('0x32')]);_0x5214b9[_0x172a('0x37')]=_[_0x172a('0x35')](_0x43bc6c[_0x172a('0x31')],qs[_0x172a('0x36')](_0x21f896['query'][_0x172a('0x36')]));_0x5214b9[_0x172a('0x37')]=_0x5214b9[_0x172a('0x37')]['length']?_0x5214b9[_0x172a('0x37')]:_0x43bc6c['model'];if(_0x21f896[_0x172a('0x32')][_0x172a('0x43')]){_0x5214b9[_0x172a('0x48')]=[{'all':!![]}];}_0x5214b9=_[_0x172a('0x40')]({},_0x5214b9,_0x21f896[_0x172a('0x42')]);return db[_0x172a('0x2c')][_0x172a('0x49')](_0x5214b9)['then'](handleEntityNotFound(_0x4039fb,null))[_0x172a('0x24')](respondWithResult(_0x4039fb,null))[_0x172a('0x45')](handleError(_0x4039fb,null));};exports[_0x172a('0x4a')]=function(_0x52fa39,_0x14b20c){return db[_0x172a('0x2c')]['create'](_0x52fa39[_0x172a('0x4b')],{})[_0x172a('0x24')](function(_0x342d65){var _0x38be9b=_0x52fa39[_0x172a('0x4c')]['get']({'plain':!![]});if(!_0x38be9b)throw new Error(_0x172a('0x4d'));if(_0x38be9b[_0x172a('0x4e')]===_0x172a('0x4c')){var _0x173eaf=_0x342d65[_0x172a('0x4f')]({'plain':!![]});var _0x4af3e0=_0x172a('0x50');return db[_0x172a('0x51')][_0x172a('0x49')]({'where':{'name':_0x4af3e0,'userProfileId':_0x38be9b[_0x172a('0x52')]},'raw':!![]})[_0x172a('0x24')](function(_0x1b1524){if(_0x1b1524&&_0x1b1524[_0x172a('0x53')]===0x0){return db[_0x172a('0x26')][_0x172a('0x4a')]({'name':_0x173eaf[_0x172a('0x29')],'resourceId':_0x173eaf['id'],'type':_0x1b1524[_0x172a('0x29')],'sectionId':_0x1b1524['id']},{})['then'](function(){return _0x342d65;});}else{return _0x342d65;}})['catch'](function(_0xdb7eee){logger[_0x172a('0x28')](_0x172a('0x54'),_0xdb7eee);throw _0xdb7eee;});}return _0x342d65;})[_0x172a('0x24')](respondWithResult(_0x14b20c,0xc9))[_0x172a('0x45')](handleError(_0x14b20c,null));};exports[_0x172a('0x23')]=function(_0x244d60,_0x4bf02a){if(_0x244d60[_0x172a('0x4b')]['id']){delete _0x244d60[_0x172a('0x4b')]['id'];}return db[_0x172a('0x2c')][_0x172a('0x49')]({'where':{'id':_0x244d60[_0x172a('0x47')]['id']}})[_0x172a('0x24')](handleEntityNotFound(_0x4bf02a,null))[_0x172a('0x24')](saveUpdates(_0x244d60[_0x172a('0x4b')],null))[_0x172a('0x24')](respondWithResult(_0x4bf02a,null))['catch'](handleError(_0x4bf02a,null));};exports['destroy']=function(_0x57c2e1,_0x447ec4){return db['Team'][_0x172a('0x49')]({'where':{'id':_0x57c2e1[_0x172a('0x47')]['id']}})[_0x172a('0x24')](handleEntityNotFound(_0x447ec4,null))[_0x172a('0x24')](removeEntity(_0x447ec4,null))[_0x172a('0x45')](handleError(_0x447ec4,null));};exports[_0x172a('0x55')]=function(_0x2e4326,_0x3e2128,_0x5bead3){return db['Team']['findOne']({'where':{'id':_0x2e4326['params']['id']}})[_0x172a('0x24')](handleEntityNotFound(_0x3e2128,null))[_0x172a('0x24')](function(_0x1f0184){if(!_0x2e4326[_0x172a('0x32')][_0x172a('0x56')]||!utils[_0x172a('0x57')](_0x2e4326[_0x172a('0x32')][_0x172a('0x56')])){throw new db[(_0x172a('0x58'))]['ValidationError'](_0x172a('0x59'));}var _0xecc44a={};var _0x34ae8d={};_0x34ae8d[_0x172a('0x31')]=_[_0x172a('0x33')](db[_[_0x172a('0x5a')](_0x2e4326['query'][_0x172a('0x56')][_0x172a('0x5b')]())+_0x172a('0x5c')][_0x172a('0x2d')]);_0x34ae8d[_0x172a('0x32')]=_[_0x172a('0x33')](_0x2e4326[_0x172a('0x32')]);_0x34ae8d[_0x172a('0x34')]=_[_0x172a('0x35')](_0x34ae8d['model'],_0x34ae8d[_0x172a('0x32')]);_0xecc44a['attributes']=_[_0x172a('0x35')](_0x34ae8d[_0x172a('0x31')],qs['fields'](_0x2e4326[_0x172a('0x32')][_0x172a('0x36')]));_0xecc44a[_0x172a('0x37')]=_0xecc44a[_0x172a('0x37')][_0x172a('0x38')]?_0xecc44a[_0x172a('0x37')]:_0x34ae8d['model'];_0xecc44a[_0x172a('0x1e')]=qs[_0x172a('0x1e')](_0x2e4326['query'][_0x172a('0x1e')]);_0xecc44a['offset']=qs['offset'](_0x2e4326[_0x172a('0x32')][_0x172a('0x1d')]);_0xecc44a[_0x172a('0x3b')]=qs[_0x172a('0x3c')](_0x2e4326[_0x172a('0x32')][_0x172a('0x3c')]);_0xecc44a['where']=qs[_0x172a('0x34')](_[_0x172a('0x3d')](_0x2e4326[_0x172a('0x32')],_0x34ae8d[_0x172a('0x34')]));_0xecc44a=_['merge']({},_0xecc44a,_0x2e4326[_0x172a('0x42')]);return _0x1f0184[_0x172a('0x4f')+_[_0x172a('0x5a')](_0x2e4326[_0x172a('0x32')]['channel'][_0x172a('0x5b')]())+'Queues'](_0xecc44a);})[_0x172a('0x24')](respondWithResult(_0x3e2128,null))['catch'](handleError(_0x3e2128,null));};exports[_0x172a('0x5d')]=function(_0x11d5f3,_0x547d64,_0x2f11ba){return db['Team']['findOne']({'where':{'id':_0x11d5f3[_0x172a('0x47')]['id']}})['then'](function(_0x513a45){if(_0x513a45){if(!_0x11d5f3[_0x172a('0x4b')][_0x172a('0x56')]||!utils['isValidChannel'](_0x11d5f3[_0x172a('0x4b')][_0x172a('0x56')])){throw new db[(_0x172a('0x58'))][(_0x172a('0x5e'))](_0x172a('0x59'));}return _0x513a45[_0x172a('0x5f')+_['capitalize'](_0x11d5f3[_0x172a('0x4b')][_0x172a('0x56')][_0x172a('0x5b')]())+_0x172a('0x60')](_0x11d5f3['body'][_0x172a('0x61')]);}return null;})[_0x172a('0x24')](handleEntityNotFound(_0x547d64,null))['then'](respondWithStatusCode(_0x547d64,null))[_0x172a('0x45')](handleError(_0x547d64,null));};exports[_0x172a('0x62')]=function(_0x28c489,_0x2d002e,_0x69ede3){return db['Team'][_0x172a('0x63')]({'where':{'id':_0x28c489[_0x172a('0x47')]['id']}})[_0x172a('0x24')](function(_0xb98064){if(_0xb98064){if(!_0x28c489['query']['channel']||!utils[_0x172a('0x57')](_0x28c489[_0x172a('0x32')][_0x172a('0x56')])){throw new db[(_0x172a('0x58'))][(_0x172a('0x5e'))]('Unknown\x20channel');}return _0xb98064[_0x172a('0x64')+_['capitalize'](_0x28c489[_0x172a('0x32')][_0x172a('0x56')][_0x172a('0x5b')]())+_0x172a('0x60')](_0x28c489[_0x172a('0x32')]['ids']);}return null;})[_0x172a('0x24')](handleEntityNotFound(_0x2d002e,null))['then'](respondWithStatusCode(_0x2d002e,null))[_0x172a('0x45')](handleError(_0x2d002e,null));};exports[_0x172a('0x65')]=function(_0xdd5c3a,_0x43c7a8,_0x2cdabc){return db[_0x172a('0x2c')][_0x172a('0x49')]({'where':{'id':_0xdd5c3a[_0x172a('0x47')]['id']}})[_0x172a('0x24')](handleEntityNotFound(_0x43c7a8,null))['then'](function(_0x314f38){if(_0x314f38){var _0x1008c7=[_0x172a('0x66'),_0x172a('0x67'),_0x172a('0x68'),'Sms',_0x172a('0x69'),_0x172a('0x6a')];return BPromise[_0x172a('0x6b')](_0x1008c7,function(_0x41d8ba){return _0x314f38['get'+_0x41d8ba+'Queues']({'attributes':['id',_0x172a('0x29')]})[_0x172a('0x24')](function(_0x2bfe01){return BPromise[_0x172a('0x6b')](_0x2bfe01,function(_0x5297de){return _0x5297de[_0x172a('0x65')](_0xdd5c3a[_0x172a('0x4b')][_0x172a('0x61')])[_0x172a('0x24')](function(){if(_0x41d8ba===_0x172a('0x66')){return db[_0x172a('0x6c')][_0x172a('0x6d')]({'where':{'id':_0xdd5c3a[_0x172a('0x4b')][_0x172a('0x61')]},'attributes':['id',_0x172a('0x29'),_0x172a('0x6e'),_0x172a('0x6f'),_0x172a('0x70')],'raw':!![]})['then'](function(_0xfb0e2b){return BPromise[_0x172a('0x6b')](_['filter'](_0xfb0e2b,{'online':0x1}),function(_0x43d99d){return db[_0x172a('0x71')][_0x172a('0x72')]({'membername':_0x43d99d[_0x172a('0x29')],'UserId':_0x43d99d['id'],'queue_name':_0x5297de[_0x172a('0x29')],'VoiceQueueId':_0x5297de['id'],'interface':_[_0x172a('0x73')](_0x43d99d[_0x172a('0x70')])?util[_0x172a('0x74')](_0x172a('0x75'),_0x43d99d[_0x172a('0x29')]):_0x43d99d[_0x172a('0x70')],'paused':_0x43d99d[_0x172a('0x6f')]||![],'penalty':0x0});});});}});});})[_0x172a('0x24')](function(){return _0x314f38;});})[_0x172a('0x24')](function(){return _0x314f38;});}})[_0x172a('0x24')](function(_0xe10112){if(_0xe10112){return _0xe10112[_0x172a('0x65')](_0xdd5c3a[_0x172a('0x4b')][_0x172a('0x61')],_[_0x172a('0x76')](_0xdd5c3a['body'],[_0x172a('0x61'),'id'])||{})[_0x172a('0x77')](function(_0x63ce77){for(var _0x493a8e=0x0;_0x493a8e<_0xdd5c3a[_0x172a('0x4b')][_0x172a('0x61')][_0x172a('0x38')];_0x493a8e+=0x1){socket[_0x172a('0x78')](_0x172a('0x79'),{'UserId':_0xdd5c3a[_0x172a('0x4b')]['ids'][_0x493a8e],'TeamId':_0xdd5c3a[_0x172a('0x47')]['id']});}return _0x63ce77;});}})[_0x172a('0x24')](respondWithResult(_0x43c7a8,null))[_0x172a('0x45')](handleError(_0x43c7a8,null));};exports['removeAgents']=function(_0xe69c5c,_0x3ef0be,_0x1368e7){return db[_0x172a('0x2c')][_0x172a('0x49')]({'where':{'id':_0xe69c5c[_0x172a('0x47')]['id']}})[_0x172a('0x24')](handleEntityNotFound(_0x3ef0be,null))[_0x172a('0x24')](function(_0x5ef789){if(_0x5ef789){return BPromise[_0x172a('0x6b')]([_0x172a('0x7a'),_0x172a('0x7b'),_0x172a('0x7c'),_0x172a('0x7d'),_0x172a('0x7e'),_0x172a('0x7f')],function(_0x48fc31){return _0x5ef789[_0x172a('0x4f')+_['capitalize'](_0x48fc31)+_0x172a('0x60')]({'attributes':['id','name']})[_0x172a('0x24')](function(_0x449548){return BPromise[_0x172a('0x6b')](_0x449548,function(_0x13af22){return _0x13af22[_0x172a('0x80')](_0xe69c5c[_0x172a('0x32')][_0x172a('0x61')])[_0x172a('0x24')](function(){if(_0x48fc31===_0x172a('0x7a')){return db[_0x172a('0x71')][_0x172a('0x25')]({'where':{'VoiceQueueId':_0x13af22['id'],'UserId':_0xe69c5c[_0x172a('0x32')]['ids']}});}});});})[_0x172a('0x24')](function(){return _0x5ef789;});})[_0x172a('0x24')](function(){return _0x5ef789;});}})['then'](function(_0x21ec38){if(_0x21ec38){return _0x21ec38['removeAgents'](_0xe69c5c['query']['ids'])[_0x172a('0x24')](function(){if(_[_0x172a('0x81')](_0xe69c5c[_0x172a('0x32')][_0x172a('0x61')])){for(var _0x33bacf=0x0;_0x33bacf<_0xe69c5c[_0x172a('0x32')][_0x172a('0x61')][_0x172a('0x38')];_0x33bacf+=0x1){socket[_0x172a('0x78')]('userTeam:remove',{'UserId':Number(_0xe69c5c[_0x172a('0x32')]['ids'][_0x33bacf]),'TeamId':Number(_0xe69c5c[_0x172a('0x47')]['id'])});}}else{socket[_0x172a('0x78')](_0x172a('0x82'),{'UserId':Number(_0xe69c5c[_0x172a('0x32')][_0x172a('0x61')]),'TeamId':Number(_0xe69c5c[_0x172a('0x47')]['id'])});}});}})[_0x172a('0x24')](respondWithStatusCode(_0x3ef0be,null))[_0x172a('0x45')](handleError(_0x3ef0be,null));};exports[_0x172a('0x83')]=function(_0x41bb68,_0x58cf2b,_0x29ae5d){var _0xe6210b={};var _0x5ae748={};var _0x33c2f6;var _0x498569;return db[_0x172a('0x2c')]['findOne']({'where':{'id':_0x41bb68[_0x172a('0x47')]['id']}})[_0x172a('0x24')](handleEntityNotFound(_0x58cf2b,null))[_0x172a('0x24')](function(_0x42bf3d){if(_0x42bf3d){_0x33c2f6=_0x42bf3d;_0x5ae748[_0x172a('0x31')]=_[_0x172a('0x33')](db[_0x172a('0x6c')]['rawAttributes']);_0x5ae748['query']=_[_0x172a('0x33')](_0x41bb68['query']);_0x5ae748['filters']=_[_0x172a('0x35')](_0x5ae748['model'],_0x5ae748[_0x172a('0x32')]);_0xe6210b[_0x172a('0x37')]=_[_0x172a('0x35')](_0x5ae748[_0x172a('0x31')],qs[_0x172a('0x36')](_0x41bb68[_0x172a('0x32')][_0x172a('0x36')]));_0xe6210b[_0x172a('0x37')]=_0xe6210b[_0x172a('0x37')][_0x172a('0x38')]?_0xe6210b[_0x172a('0x37')]:_0x5ae748[_0x172a('0x31')];_0xe6210b[_0x172a('0x3b')]=qs[_0x172a('0x3c')](_0x41bb68['query'][_0x172a('0x3c')]);_0xe6210b[_0x172a('0x3f')]=qs[_0x172a('0x34')](_[_0x172a('0x3d')](_0x41bb68[_0x172a('0x32')],_0x5ae748[_0x172a('0x34')]));if(_0x41bb68[_0x172a('0x32')][_0x172a('0x3e')]){_0xe6210b[_0x172a('0x3f')]=_[_0x172a('0x40')](_0xe6210b[_0x172a('0x3f')],{'$or':_[_0x172a('0x2b')](_0xe6210b[_0x172a('0x37')],function(_0x2c3825){var _0x4616dd={};_0x4616dd[_0x2c3825]={'$like':'%'+_0x41bb68['query'][_0x172a('0x3e')]+'%'};return _0x4616dd;})});}_0xe6210b=_['merge']({},_0xe6210b,_0x41bb68[_0x172a('0x42')]);return _0x33c2f6['getAgents'](_0xe6210b);}})[_0x172a('0x24')](function(_0x4d1883){if(_0x4d1883){_0x498569=_0x4d1883[_0x172a('0x38')];if(!_0x41bb68[_0x172a('0x32')][_0x172a('0x39')](_0x172a('0x3a'))){_0xe6210b[_0x172a('0x1e')]=qs[_0x172a('0x1e')](_0x41bb68[_0x172a('0x32')]['limit']);_0xe6210b[_0x172a('0x1d')]=qs[_0x172a('0x1d')](_0x41bb68['query'][_0x172a('0x1d')]);}return _0x33c2f6[_0x172a('0x83')](_0xe6210b);}})[_0x172a('0x24')](function(_0x52e861){if(_0x52e861){return _0x52e861?{'count':_0x498569,'rows':_0x52e861}:null;}})[_0x172a('0x24')](respondWithResult(_0x58cf2b,null))[_0x172a('0x45')](handleError(_0x58cf2b,null));};
\ No newline at end of file
+var _0x7af9=['interface','UserVoiceQueueRt','upsert','format','SIP/%s','spread','removeAgents','voice','chat','mail','sms','fax','openchannel','isArray','userTeam:remove','emit','getAgents','order','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','ejs','lodash','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','register','sendStatus','status','end','offset','set','Content-Range','apply','reject','save','update','then','destroy','get','Teams','UserProfileResource','error','stack','name','send','index','map','Team','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','options','count','includeAll','include','findAll','rows','catch','show','params','find','create','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','getQueues','findOne','channel','isValidChannel','Sequelize','ValidationError','capitalize','toLowerCase','Queue','Queues','addQueues','Unknown\x20channel','add','ids','removeQueues','remove','addAgents','Chat','Mail','Openchannel','each','Voice','User','online','voicePause'];(function(_0x3be8e8,_0x246a8f){var _0x5f7c64=function(_0x14b674){while(--_0x14b674){_0x3be8e8['push'](_0x3be8e8['shift']());}};_0x5f7c64(++_0x246a8f);}(_0x7af9,0x95));var _0x97af=function(_0x4ea6c1,_0x4f1761){_0x4ea6c1=_0x4ea6c1-0x0;var _0x4e3082=_0x7af9[_0x4ea6c1];return _0x4e3082;};'use strict';var pdf=require(_0x97af('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x97af('0x1'));var zipdir=require(_0x97af('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x97af('0x3'));var moment=require(_0x97af('0x4'));var BPromise=require(_0x97af('0x5'));var Mustache=require(_0x97af('0x6'));var util=require(_0x97af('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x97af('0x8'));var fs=require('fs');var _=require(_0x97af('0x9'));var squel=require(_0x97af('0xa'));var crypto=require(_0x97af('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x97af('0xc'));var toCsv=require(_0x97af('0xd'));var querystring=require(_0x97af('0xe'));var Papa=require('papaparse');var Redis=require(_0x97af('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x97af('0x10'));var as=require(_0x97af('0x11'));var hardwareService=require(_0x97af('0x12'));var logger=require(_0x97af('0x13'))(_0x97af('0x14'));var utils=require(_0x97af('0x15'));var config=require(_0x97af('0x16'));var db=require(_0x97af('0x17'))['db'];config[_0x97af('0x18')]=_[_0x97af('0x19')](config[_0x97af('0x18')],{'host':'localhost','port':0x18eb});var socket=require(_0x97af('0x1a'))(new Redis(config['redis']));require('./team.socket')[_0x97af('0x1b')](socket);function respondWithStatusCode(_0x1264c8,_0x458751){_0x458751=_0x458751||0xcc;return function(_0xbf7de1){if(_0xbf7de1){return _0x1264c8[_0x97af('0x1c')](_0x458751);}return _0x1264c8[_0x97af('0x1d')](_0x458751)[_0x97af('0x1e')]();};}function respondWithResult(_0x4bd6dd,_0x281f8a){_0x281f8a=_0x281f8a||0xc8;return function(_0x4e679e){if(_0x4e679e){return _0x4bd6dd[_0x97af('0x1d')](_0x281f8a)['json'](_0x4e679e);}};}function respondWithFilteredResult(_0x41cabb,_0x47c57b){return function(_0x1aa3f9){if(_0x1aa3f9){var _0x2ae4ce=_0x1aa3f9['count'],_0x3815da=_0x47c57b[_0x97af('0x1f')],_0x1481d4=_0x47c57b[_0x97af('0x1f')]+_0x47c57b['limit'],_0xc5c15f;if(_0x1481d4>=_0x2ae4ce){_0x1481d4=_0x2ae4ce;_0xc5c15f=0xc8;}else{_0xc5c15f=0xce;}_0x41cabb['status'](_0xc5c15f);return _0x41cabb[_0x97af('0x20')](_0x97af('0x21'),_0x3815da+'-'+_0x1481d4+'/'+_0x2ae4ce)['json'](_0x1aa3f9);}return null;};}function patchUpdates(_0x275675){return function(_0x5a4c34){try{jsonpatch[_0x97af('0x22')](_0x5a4c34,_0x275675,!![]);}catch(_0x5af909){return BPromise[_0x97af('0x23')](_0x5af909);}return _0x5a4c34[_0x97af('0x24')]();};}function saveUpdates(_0x36c378,_0x53323a){return function(_0x1a0cde){if(_0x1a0cde){return _0x1a0cde[_0x97af('0x25')](_0x36c378)[_0x97af('0x26')](function(_0x4c916c){return _0x4c916c;});}return null;};}function removeEntity(_0x1a08b0,_0x2a7740){return function(_0x275e8c){if(_0x275e8c){return _0x275e8c[_0x97af('0x27')]()['then'](function(){var _0x6d6296=_0x275e8c[_0x97af('0x28')]({'plain':!![]});var _0x545b3d=_0x97af('0x29');return db[_0x97af('0x2a')][_0x97af('0x27')]({'where':{'type':_0x545b3d,'resourceId':_0x6d6296['id']}})['then'](function(){return _0x275e8c;});})[_0x97af('0x26')](function(){_0x1a08b0[_0x97af('0x1d')](0xcc)[_0x97af('0x1e')]();});}};}function handleEntityNotFound(_0x444926,_0x465708){return function(_0x4ced71){if(!_0x4ced71){_0x444926[_0x97af('0x1c')](0x194);}return _0x4ced71;};}function handleError(_0x46f503,_0x51b9e7){_0x51b9e7=_0x51b9e7||0x1f4;return function(_0x258193){logger[_0x97af('0x2b')](_0x258193[_0x97af('0x2c')]);if(_0x258193[_0x97af('0x2d')]){delete _0x258193[_0x97af('0x2d')];}_0x46f503[_0x97af('0x1d')](_0x51b9e7)[_0x97af('0x2e')](_0x258193);};}exports[_0x97af('0x2f')]=function(_0x63fe87,_0x431f41){var _0x4e4127={},_0x32b3c0={},_0x564e58={'count':0x0,'rows':[]};var _0x7c4f87=_[_0x97af('0x30')](db[_0x97af('0x31')][_0x97af('0x32')],function(_0x13a509){return{'name':_0x13a509[_0x97af('0x33')],'type':_0x13a509[_0x97af('0x34')][_0x97af('0x35')]};});_0x32b3c0[_0x97af('0x36')]=_[_0x97af('0x30')](_0x7c4f87,'name');_0x32b3c0[_0x97af('0x37')]=_[_0x97af('0x38')](_0x63fe87['query']);_0x32b3c0[_0x97af('0x39')]=_['intersection'](_0x32b3c0[_0x97af('0x36')],_0x32b3c0['query']);_0x4e4127['attributes']=_[_0x97af('0x3a')](_0x32b3c0[_0x97af('0x36')],qs[_0x97af('0x3b')](_0x63fe87['query'][_0x97af('0x3b')]));_0x4e4127[_0x97af('0x3c')]=_0x4e4127[_0x97af('0x3c')][_0x97af('0x3d')]?_0x4e4127[_0x97af('0x3c')]:_0x32b3c0['model'];if(!_0x63fe87[_0x97af('0x37')][_0x97af('0x3e')](_0x97af('0x3f'))){_0x4e4127[_0x97af('0x40')]=qs['limit'](_0x63fe87['query']['limit']);_0x4e4127[_0x97af('0x1f')]=qs[_0x97af('0x1f')](_0x63fe87[_0x97af('0x37')][_0x97af('0x1f')]);}_0x4e4127['order']=qs['sort'](_0x63fe87['query'][_0x97af('0x41')]);_0x4e4127[_0x97af('0x42')]=qs[_0x97af('0x39')](_[_0x97af('0x43')](_0x63fe87[_0x97af('0x37')],_0x32b3c0[_0x97af('0x39')]));if(_0x63fe87['query'][_0x97af('0x44')]){_0x4e4127['where']=_['merge'](_0x4e4127[_0x97af('0x42')],{'$or':_[_0x97af('0x30')](_0x7c4f87,function(_0x31796d){if(_0x31796d[_0x97af('0x34')]!=='VIRTUAL'){var _0x21eff0={};_0x21eff0[_0x31796d[_0x97af('0x2d')]]={'$like':'%'+_0x63fe87[_0x97af('0x37')][_0x97af('0x44')]+'%'};return _0x21eff0;}})});}_0x4e4127=_[_0x97af('0x45')]({},_0x4e4127,_0x63fe87[_0x97af('0x46')]);var _0x261dbe={'where':_0x4e4127[_0x97af('0x42')]};return db['Team'][_0x97af('0x47')](_0x261dbe)[_0x97af('0x26')](function(_0x567f7a){_0x564e58['count']=_0x567f7a;if(_0x63fe87[_0x97af('0x37')][_0x97af('0x48')]){_0x4e4127[_0x97af('0x49')]=[{'all':!![]}];}return db[_0x97af('0x31')][_0x97af('0x4a')](_0x4e4127);})[_0x97af('0x26')](function(_0x22e224){_0x564e58[_0x97af('0x4b')]=_0x22e224;return _0x564e58;})[_0x97af('0x26')](respondWithFilteredResult(_0x431f41,_0x4e4127))[_0x97af('0x4c')](handleError(_0x431f41,null));};exports[_0x97af('0x4d')]=function(_0x26d05c,_0x126c5b){var _0x6ff6b={'raw':![],'where':{'id':_0x26d05c[_0x97af('0x4e')]['id']}},_0x16c8b4={};_0x16c8b4[_0x97af('0x36')]=_[_0x97af('0x38')](db[_0x97af('0x31')][_0x97af('0x32')]);_0x16c8b4['query']=_[_0x97af('0x38')](_0x26d05c[_0x97af('0x37')]);_0x16c8b4[_0x97af('0x39')]=_[_0x97af('0x3a')](_0x16c8b4[_0x97af('0x36')],_0x16c8b4[_0x97af('0x37')]);_0x6ff6b[_0x97af('0x3c')]=_[_0x97af('0x3a')](_0x16c8b4[_0x97af('0x36')],qs[_0x97af('0x3b')](_0x26d05c[_0x97af('0x37')][_0x97af('0x3b')]));_0x6ff6b[_0x97af('0x3c')]=_0x6ff6b[_0x97af('0x3c')][_0x97af('0x3d')]?_0x6ff6b[_0x97af('0x3c')]:_0x16c8b4[_0x97af('0x36')];if(_0x26d05c[_0x97af('0x37')][_0x97af('0x48')]){_0x6ff6b['include']=[{'all':!![]}];}_0x6ff6b=_[_0x97af('0x45')]({},_0x6ff6b,_0x26d05c[_0x97af('0x46')]);return db['Team'][_0x97af('0x4f')](_0x6ff6b)[_0x97af('0x26')](handleEntityNotFound(_0x126c5b,null))['then'](respondWithResult(_0x126c5b,null))[_0x97af('0x4c')](handleError(_0x126c5b,null));};exports[_0x97af('0x50')]=function(_0x5bbbe3,_0x7f53e){return db[_0x97af('0x31')]['create'](_0x5bbbe3['body'],{})[_0x97af('0x26')](function(_0x4a8257){var _0x33c052=_0x5bbbe3['user']['get']({'plain':!![]});if(!_0x33c052)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x33c052[_0x97af('0x51')]===_0x97af('0x52')){var _0x5077c8=_0x4a8257['get']({'plain':!![]});var _0x1f65c8='Teams';return db[_0x97af('0x53')]['find']({'where':{'name':_0x1f65c8,'userProfileId':_0x33c052[_0x97af('0x54')]},'raw':!![]})[_0x97af('0x26')](function(_0x465f66){if(_0x465f66&&_0x465f66[_0x97af('0x55')]===0x0){return db[_0x97af('0x2a')][_0x97af('0x50')]({'name':_0x5077c8['name'],'resourceId':_0x5077c8['id'],'type':_0x465f66[_0x97af('0x2d')],'sectionId':_0x465f66['id']},{})[_0x97af('0x26')](function(){return _0x4a8257;});}else{return _0x4a8257;}})[_0x97af('0x4c')](function(_0x575d32){logger['error'](_0x97af('0x56'),_0x575d32);throw _0x575d32;});}return _0x4a8257;})['then'](respondWithResult(_0x7f53e,0xc9))[_0x97af('0x4c')](handleError(_0x7f53e,null));};exports[_0x97af('0x25')]=function(_0x1f7531,_0x5457cc){if(_0x1f7531[_0x97af('0x57')]['id']){delete _0x1f7531[_0x97af('0x57')]['id'];}return db[_0x97af('0x31')][_0x97af('0x4f')]({'where':{'id':_0x1f7531['params']['id']}})['then'](handleEntityNotFound(_0x5457cc,null))['then'](saveUpdates(_0x1f7531[_0x97af('0x57')],null))[_0x97af('0x26')](respondWithResult(_0x5457cc,null))['catch'](handleError(_0x5457cc,null));};exports[_0x97af('0x27')]=function(_0x469b62,_0x2bb21f){return db[_0x97af('0x31')][_0x97af('0x4f')]({'where':{'id':_0x469b62['params']['id']}})['then'](handleEntityNotFound(_0x2bb21f,null))[_0x97af('0x26')](removeEntity(_0x2bb21f,null))[_0x97af('0x4c')](handleError(_0x2bb21f,null));};exports[_0x97af('0x58')]=function(_0x27a8d7,_0xe35f28,_0x1aad11){return db[_0x97af('0x31')][_0x97af('0x59')]({'where':{'id':_0x27a8d7[_0x97af('0x4e')]['id']}})[_0x97af('0x26')](handleEntityNotFound(_0xe35f28,null))[_0x97af('0x26')](function(_0x1b13c8){if(!_0x27a8d7[_0x97af('0x37')][_0x97af('0x5a')]||!utils[_0x97af('0x5b')](_0x27a8d7[_0x97af('0x37')][_0x97af('0x5a')])){throw new db[(_0x97af('0x5c'))][(_0x97af('0x5d'))]('Unknown\x20channel');}var _0x3d06f2={};var _0x50e5c8={};_0x50e5c8[_0x97af('0x36')]=_[_0x97af('0x38')](db[_[_0x97af('0x5e')](_0x27a8d7['query']['channel'][_0x97af('0x5f')]())+_0x97af('0x60')][_0x97af('0x32')]);_0x50e5c8['query']=_[_0x97af('0x38')](_0x27a8d7[_0x97af('0x37')]);_0x50e5c8['filters']=_[_0x97af('0x3a')](_0x50e5c8['model'],_0x50e5c8[_0x97af('0x37')]);_0x3d06f2[_0x97af('0x3c')]=_[_0x97af('0x3a')](_0x50e5c8[_0x97af('0x36')],qs[_0x97af('0x3b')](_0x27a8d7['query'][_0x97af('0x3b')]));_0x3d06f2[_0x97af('0x3c')]=_0x3d06f2[_0x97af('0x3c')]['length']?_0x3d06f2['attributes']:_0x50e5c8[_0x97af('0x36')];_0x3d06f2['limit']=qs['limit'](_0x27a8d7['query']['limit']);_0x3d06f2[_0x97af('0x1f')]=qs['offset'](_0x27a8d7['query'][_0x97af('0x1f')]);_0x3d06f2['order']=qs[_0x97af('0x41')](_0x27a8d7[_0x97af('0x37')][_0x97af('0x41')]);_0x3d06f2[_0x97af('0x42')]=qs[_0x97af('0x39')](_[_0x97af('0x43')](_0x27a8d7[_0x97af('0x37')],_0x50e5c8[_0x97af('0x39')]));_0x3d06f2=_[_0x97af('0x45')]({},_0x3d06f2,_0x27a8d7[_0x97af('0x46')]);return _0x1b13c8[_0x97af('0x28')+_[_0x97af('0x5e')](_0x27a8d7[_0x97af('0x37')][_0x97af('0x5a')][_0x97af('0x5f')]())+_0x97af('0x61')](_0x3d06f2);})[_0x97af('0x26')](respondWithResult(_0xe35f28,null))[_0x97af('0x4c')](handleError(_0xe35f28,null));};exports[_0x97af('0x62')]=function(_0x3c4264,_0x2dccfc,_0x3b6462){return db['Team'][_0x97af('0x59')]({'where':{'id':_0x3c4264[_0x97af('0x4e')]['id']}})[_0x97af('0x26')](function(_0x5db619){if(_0x5db619){if(!_0x3c4264[_0x97af('0x57')][_0x97af('0x5a')]||!utils['isValidChannel'](_0x3c4264[_0x97af('0x57')][_0x97af('0x5a')])){throw new db[(_0x97af('0x5c'))][(_0x97af('0x5d'))](_0x97af('0x63'));}return _0x5db619[_0x97af('0x64')+_['capitalize'](_0x3c4264[_0x97af('0x57')][_0x97af('0x5a')][_0x97af('0x5f')]())+_0x97af('0x61')](_0x3c4264[_0x97af('0x57')][_0x97af('0x65')]);}return null;})[_0x97af('0x26')](handleEntityNotFound(_0x2dccfc,null))['then'](respondWithStatusCode(_0x2dccfc,null))[_0x97af('0x4c')](handleError(_0x2dccfc,null));};exports[_0x97af('0x66')]=function(_0x3fbef6,_0x483c2b,_0x23def9){return db[_0x97af('0x31')][_0x97af('0x59')]({'where':{'id':_0x3fbef6['params']['id']}})[_0x97af('0x26')](function(_0x5eeaa1){if(_0x5eeaa1){if(!_0x3fbef6[_0x97af('0x37')]['channel']||!utils[_0x97af('0x5b')](_0x3fbef6[_0x97af('0x37')][_0x97af('0x5a')])){throw new db[(_0x97af('0x5c'))][(_0x97af('0x5d'))](_0x97af('0x63'));}return _0x5eeaa1[_0x97af('0x67')+_[_0x97af('0x5e')](_0x3fbef6[_0x97af('0x37')][_0x97af('0x5a')][_0x97af('0x5f')]())+'Queues'](_0x3fbef6[_0x97af('0x37')][_0x97af('0x65')]);}return null;})['then'](handleEntityNotFound(_0x483c2b,null))[_0x97af('0x26')](respondWithStatusCode(_0x483c2b,null))[_0x97af('0x4c')](handleError(_0x483c2b,null));};exports[_0x97af('0x68')]=function(_0x91189b,_0xdc1c8d,_0x31ff14){return db[_0x97af('0x31')][_0x97af('0x4f')]({'where':{'id':_0x91189b[_0x97af('0x4e')]['id']}})[_0x97af('0x26')](handleEntityNotFound(_0xdc1c8d,null))['then'](function(_0x2f1719){if(_0x2f1719){var _0x54569a=['Voice',_0x97af('0x69'),_0x97af('0x6a'),'Sms','Fax',_0x97af('0x6b')];return BPromise[_0x97af('0x6c')](_0x54569a,function(_0x20e800){return _0x2f1719['get'+_0x20e800+_0x97af('0x61')]({'attributes':['id',_0x97af('0x2d')]})[_0x97af('0x26')](function(_0x5c38cf){return BPromise[_0x97af('0x6c')](_0x5c38cf,function(_0x9f5e75){return _0x9f5e75['addAgents'](_0x91189b['body'][_0x97af('0x65')])[_0x97af('0x26')](function(){if(_0x20e800===_0x97af('0x6d')){return db[_0x97af('0x6e')]['findAll']({'where':{'id':_0x91189b[_0x97af('0x57')][_0x97af('0x65')]},'attributes':['id','name',_0x97af('0x6f'),_0x97af('0x70'),_0x97af('0x71')],'raw':!![]})[_0x97af('0x26')](function(_0x2eab04){return BPromise[_0x97af('0x6c')](_[_0x97af('0x44')](_0x2eab04,{'online':0x1}),function(_0x31b54b){return db[_0x97af('0x72')][_0x97af('0x73')]({'membername':_0x31b54b[_0x97af('0x2d')],'UserId':_0x31b54b['id'],'queue_name':_0x9f5e75[_0x97af('0x2d')],'VoiceQueueId':_0x9f5e75['id'],'interface':_['isNil'](_0x31b54b[_0x97af('0x71')])?util[_0x97af('0x74')](_0x97af('0x75'),_0x31b54b[_0x97af('0x2d')]):_0x31b54b['interface'],'paused':_0x31b54b['voicePause']||![],'penalty':0x0});});});}});});})[_0x97af('0x26')](function(){return _0x2f1719;});})[_0x97af('0x26')](function(){return _0x2f1719;});}})[_0x97af('0x26')](function(_0x396e40){if(_0x396e40){return _0x396e40[_0x97af('0x68')](_0x91189b[_0x97af('0x57')][_0x97af('0x65')],_['omit'](_0x91189b[_0x97af('0x57')],[_0x97af('0x65'),'id'])||{})[_0x97af('0x76')](function(_0x3193be){for(var _0x89b4d9=0x0;_0x89b4d9<_0x91189b[_0x97af('0x57')][_0x97af('0x65')]['length'];_0x89b4d9+=0x1){socket['emit']('userTeam:save',{'UserId':_0x91189b[_0x97af('0x57')]['ids'][_0x89b4d9],'TeamId':_0x91189b[_0x97af('0x4e')]['id']});}return _0x3193be;});}})[_0x97af('0x26')](respondWithResult(_0xdc1c8d,null))[_0x97af('0x4c')](handleError(_0xdc1c8d,null));};exports[_0x97af('0x77')]=function(_0xed118b,_0x50b6a6,_0x57912c){return db[_0x97af('0x31')][_0x97af('0x4f')]({'where':{'id':_0xed118b['params']['id']}})['then'](handleEntityNotFound(_0x50b6a6,null))[_0x97af('0x26')](function(_0x1fd2a7){if(_0x1fd2a7){return BPromise['each']([_0x97af('0x78'),_0x97af('0x79'),_0x97af('0x7a'),_0x97af('0x7b'),_0x97af('0x7c'),_0x97af('0x7d')],function(_0x512442){return _0x1fd2a7[_0x97af('0x28')+_[_0x97af('0x5e')](_0x512442)+_0x97af('0x61')]({'attributes':['id',_0x97af('0x2d')]})[_0x97af('0x26')](function(_0x21bf65){return BPromise[_0x97af('0x6c')](_0x21bf65,function(_0x2cbb97){return _0x2cbb97[_0x97af('0x77')](_0xed118b[_0x97af('0x37')][_0x97af('0x65')])[_0x97af('0x26')](function(){if(_0x512442===_0x97af('0x78')){return db[_0x97af('0x72')][_0x97af('0x27')]({'where':{'VoiceQueueId':_0x2cbb97['id'],'UserId':_0xed118b[_0x97af('0x37')][_0x97af('0x65')]}});}});});})['then'](function(){return _0x1fd2a7;});})[_0x97af('0x26')](function(){return _0x1fd2a7;});}})[_0x97af('0x26')](function(_0x5c4d25){if(_0x5c4d25){return _0x5c4d25[_0x97af('0x77')](_0xed118b[_0x97af('0x37')][_0x97af('0x65')])[_0x97af('0x26')](function(){if(_[_0x97af('0x7e')](_0xed118b[_0x97af('0x37')][_0x97af('0x65')])){for(var _0x5109a8=0x0;_0x5109a8<_0xed118b[_0x97af('0x37')]['ids'][_0x97af('0x3d')];_0x5109a8+=0x1){socket['emit'](_0x97af('0x7f'),{'UserId':Number(_0xed118b[_0x97af('0x37')][_0x97af('0x65')][_0x5109a8]),'TeamId':Number(_0xed118b['params']['id'])});}}else{socket[_0x97af('0x80')]('userTeam:remove',{'UserId':Number(_0xed118b['query']['ids']),'TeamId':Number(_0xed118b['params']['id'])});}});}})[_0x97af('0x26')](respondWithStatusCode(_0x50b6a6,null))[_0x97af('0x4c')](handleError(_0x50b6a6,null));};exports[_0x97af('0x81')]=function(_0x6a4b59,_0x3598fc,_0x450b3c){var _0x2bf9a7={};var _0x2ea829={};var _0x2e540f;var _0x2d7b32;return db[_0x97af('0x31')]['findOne']({'where':{'id':_0x6a4b59[_0x97af('0x4e')]['id']}})[_0x97af('0x26')](handleEntityNotFound(_0x3598fc,null))[_0x97af('0x26')](function(_0x4b90ff){if(_0x4b90ff){_0x2e540f=_0x4b90ff;_0x2ea829[_0x97af('0x36')]=_['keys'](db[_0x97af('0x6e')][_0x97af('0x32')]);_0x2ea829[_0x97af('0x37')]=_[_0x97af('0x38')](_0x6a4b59['query']);_0x2ea829[_0x97af('0x39')]=_[_0x97af('0x3a')](_0x2ea829['model'],_0x2ea829[_0x97af('0x37')]);_0x2bf9a7[_0x97af('0x3c')]=_[_0x97af('0x3a')](_0x2ea829[_0x97af('0x36')],qs['fields'](_0x6a4b59[_0x97af('0x37')][_0x97af('0x3b')]));_0x2bf9a7['attributes']=_0x2bf9a7[_0x97af('0x3c')][_0x97af('0x3d')]?_0x2bf9a7[_0x97af('0x3c')]:_0x2ea829[_0x97af('0x36')];_0x2bf9a7[_0x97af('0x82')]=qs[_0x97af('0x41')](_0x6a4b59['query'][_0x97af('0x41')]);_0x2bf9a7[_0x97af('0x42')]=qs[_0x97af('0x39')](_[_0x97af('0x43')](_0x6a4b59[_0x97af('0x37')],_0x2ea829[_0x97af('0x39')]));if(_0x6a4b59['query'][_0x97af('0x44')]){_0x2bf9a7[_0x97af('0x42')]=_[_0x97af('0x45')](_0x2bf9a7['where'],{'$or':_['map'](_0x2bf9a7[_0x97af('0x3c')],function(_0x477989){var _0x5c154c={};_0x5c154c[_0x477989]={'$like':'%'+_0x6a4b59[_0x97af('0x37')][_0x97af('0x44')]+'%'};return _0x5c154c;})});}_0x2bf9a7=_[_0x97af('0x45')]({},_0x2bf9a7,_0x6a4b59[_0x97af('0x46')]);return _0x2e540f[_0x97af('0x81')](_0x2bf9a7);}})[_0x97af('0x26')](function(_0x5c140b){if(_0x5c140b){_0x2d7b32=_0x5c140b[_0x97af('0x3d')];if(!_0x6a4b59['query'][_0x97af('0x3e')](_0x97af('0x3f'))){_0x2bf9a7[_0x97af('0x40')]=qs['limit'](_0x6a4b59['query'][_0x97af('0x40')]);_0x2bf9a7[_0x97af('0x1f')]=qs[_0x97af('0x1f')](_0x6a4b59[_0x97af('0x37')][_0x97af('0x1f')]);}return _0x2e540f[_0x97af('0x81')](_0x2bf9a7);}})[_0x97af('0x26')](function(_0x3a33eb){if(_0x3a33eb){return _0x3a33eb?{'count':_0x2d7b32,'rows':_0x3a33eb}:null;}})['then'](respondWithResult(_0x3598fc,null))['catch'](handleError(_0x3598fc,null));};
\ No newline at end of file
diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js
index 2abc7d3..1cac7ec 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 _0x1ec0=['hasOwnProperty','exports','Team','setMaxListeners','save','update','remove','emit'];(function(_0x1da527,_0x2dc953){var _0x40fc7c=function(_0x9949f5){while(--_0x9949f5){_0x1da527['push'](_0x1da527['shift']());}};_0x40fc7c(++_0x2dc953);}(_0x1ec0,0x192));var _0x01ec=function(_0x50cf08,_0x5eb8c5){_0x50cf08=_0x50cf08-0x0;var _0x23a9df=_0x1ec0[_0x50cf08];return _0x23a9df;};'use strict';var EventEmitter=require('events');var Team=require('../../mysqldb')['db'][_0x01ec('0x0')];var TeamEvents=new EventEmitter();TeamEvents[_0x01ec('0x1')](0x0);var events={'afterCreate':_0x01ec('0x2'),'afterUpdate':_0x01ec('0x3'),'afterDestroy':_0x01ec('0x4')};function emitEvent(_0x30cd18){return function(_0x2cd76b,_0x33cbde,_0x7ab0d4){TeamEvents[_0x01ec('0x5')](_0x30cd18+':'+_0x2cd76b['id'],_0x2cd76b);TeamEvents[_0x01ec('0x5')](_0x30cd18,_0x2cd76b);_0x7ab0d4(null);};}for(var e in events){if(events[_0x01ec('0x6')](e)){var event=events[e];Team['hook'](e,emitEvent(event));}}module[_0x01ec('0x7')]=TeamEvents;
\ No newline at end of file
+var _0xd920=['update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','Team','save'];(function(_0x5d33fb,_0x5bf99e){var _0x11733a=function(_0x10b543){while(--_0x10b543){_0x5d33fb['push'](_0x5d33fb['shift']());}};_0x11733a(++_0x5bf99e);}(_0xd920,0x176));var _0x0d92=function(_0xd1d19a,_0x1933f0){_0xd1d19a=_0xd1d19a-0x0;var _0x52a79d=_0xd920[_0xd1d19a];return _0x52a79d;};'use strict';var EventEmitter=require(_0x0d92('0x0'));var Team=require(_0x0d92('0x1'))['db'][_0x0d92('0x2')];var TeamEvents=new EventEmitter();TeamEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0d92('0x3'),'afterUpdate':_0x0d92('0x4'),'afterDestroy':_0x0d92('0x5')};function emitEvent(_0x5c51a3){return function(_0x50521e,_0x4d81b1,_0x55896b){TeamEvents[_0x0d92('0x6')](_0x5c51a3+':'+_0x50521e['id'],_0x50521e);TeamEvents[_0x0d92('0x6')](_0x5c51a3,_0x50521e);_0x55896b(null);};}for(var e in events){if(events[_0x0d92('0x7')](e)){var event=events[e];Team['hook'](e,emitEvent(event));}}module[_0x0d92('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 cf14736..7e6651c 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 _0x5b1c=['request-promise','path','rimraf','../../config/environment','./team.attributes','define','Team','teams','lodash','util','api','moment','bluebird'];(function(_0x24d383,_0x32812e){var _0x54f126=function(_0x26c3f3){while(--_0x26c3f3){_0x24d383['push'](_0x24d383['shift']());}};_0x54f126(++_0x32812e);}(_0x5b1c,0x119));var _0xc5b1=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x5b1c[_0x19950b];return _0x3c6b41;};'use strict';var _=require(_0xc5b1('0x0'));var util=require(_0xc5b1('0x1'));var logger=require('../../config/logger')(_0xc5b1('0x2'));var moment=require(_0xc5b1('0x3'));var BPromise=require(_0xc5b1('0x4'));var rp=require(_0xc5b1('0x5'));var fs=require('fs');var path=require(_0xc5b1('0x6'));var rimraf=require(_0xc5b1('0x7'));var config=require(_0xc5b1('0x8'));var attributes=require(_0xc5b1('0x9'));module['exports']=function(_0x3deb32,_0x432169){return _0x3deb32[_0xc5b1('0xa')](_0xc5b1('0xb'),attributes,{'tableName':_0xc5b1('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x77ff=['util','../../config/logger','api','bluebird','request-promise','path','rimraf','./team.attributes','exports','define','Team','teams','lodash'];(function(_0x59f33b,_0x364766){var _0x17822e=function(_0x4580ae){while(--_0x4580ae){_0x59f33b['push'](_0x59f33b['shift']());}};_0x17822e(++_0x364766);}(_0x77ff,0x67));var _0xf77f=function(_0x122e03,_0x4d1dca){_0x122e03=_0x122e03-0x0;var _0x22d881=_0x77ff[_0x122e03];return _0x22d881;};'use strict';var _=require(_0xf77f('0x0'));var util=require(_0xf77f('0x1'));var logger=require(_0xf77f('0x2'))(_0xf77f('0x3'));var moment=require('moment');var BPromise=require(_0xf77f('0x4'));var rp=require(_0xf77f('0x5'));var fs=require('fs');var path=require(_0xf77f('0x6'));var rimraf=require(_0xf77f('0x7'));var config=require('../../config/environment');var attributes=require(_0xf77f('0x8'));module[_0xf77f('0x9')]=function(_0xa178bc,_0x4ac732){return _0xa178bc[_0xf77f('0xa')](_0xf77f('0xb'),attributes,{'tableName':_0xf77f('0xc'),'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 3c65c2c..3ce4129 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 _0x2496=['info','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./team.socket','register','request','then','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x4abfa1,_0x4df1cb){var _0xd8a17d=function(_0x202a47){while(--_0x202a47){_0x4abfa1['push'](_0x4abfa1['shift']());}};_0xd8a17d(++_0x4df1cb);}(_0x2496,0x1c3));var _0x6249=function(_0x3ab187,_0x55cbc3){_0x3ab187=_0x3ab187-0x0;var _0x274e41=_0x2496[_0x3ab187];return _0x274e41;};'use strict';var _=require(_0x6249('0x0'));var util=require(_0x6249('0x1'));var moment=require(_0x6249('0x2'));var BPromise=require(_0x6249('0x3'));var rs=require(_0x6249('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6249('0x5'))['db'];var utils=require(_0x6249('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x6249('0x7'));var jayson=require(_0x6249('0x8'));var client=jayson[_0x6249('0x9')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x6249('0xa')],{'host':_0x6249('0xb'),'port':0x18eb});var socket=require(_0x6249('0xc'))(new Redis(config[_0x6249('0xa')]));require(_0x6249('0xd'))[_0x6249('0xe')](socket);function respondWithRpcPromise(_0x537f5b,_0x5999fd,_0x2c34de){return new BPromise(function(_0x403d3c,_0x551f21){return client[_0x6249('0xf')](_0x537f5b,_0x2c34de)[_0x6249('0x10')](function(_0x3f934b){logger['info'](_0x6249('0x11'),_0x5999fd,_0x6249('0x12'));logger[_0x6249('0x13')](_0x6249('0x14'),_0x5999fd,_0x6249('0x12'),JSON[_0x6249('0x15')](_0x3f934b));if(_0x3f934b[_0x6249('0x16')]){if(_0x3f934b['error'][_0x6249('0x17')]===0x1f4){logger[_0x6249('0x16')](_0x6249('0x11'),_0x5999fd,_0x3f934b[_0x6249('0x16')][_0x6249('0x18')]);return _0x551f21(_0x3f934b['error'][_0x6249('0x18')]);}logger[_0x6249('0x16')](_0x6249('0x11'),_0x5999fd,_0x3f934b[_0x6249('0x16')][_0x6249('0x18')]);return _0x403d3c(_0x3f934b['error'][_0x6249('0x18')]);}else{logger[_0x6249('0x19')](_0x6249('0x11'),_0x5999fd,_0x6249('0x12'));_0x403d3c(_0x3f934b[_0x6249('0x1a')][_0x6249('0x18')]);}})[_0x6249('0x1b')](function(_0x3908f9){logger[_0x6249('0x16')](_0x6249('0x11'),_0x5999fd,_0x3908f9);_0x551f21(_0x3908f9);});});}
\ No newline at end of file
+var _0x6f1f=['../../mysqldb','../../config/utils','../../config/environment','redis','localhost','socket.io-emitter','./team.socket','register','info','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','randomstring','ioredis'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x6f1f,0x199));var _0xf6f1=function(_0x5a2756,_0x15725e){_0x5a2756=_0x5a2756-0x0;var _0x32b200=_0x6f1f[_0x5a2756];return _0x32b200;};'use strict';var _=require('lodash');var util=require(_0xf6f1('0x0'));var moment=require(_0xf6f1('0x1'));var BPromise=require(_0xf6f1('0x2'));var rs=require(_0xf6f1('0x3'));var fs=require('fs');var Redis=require(_0xf6f1('0x4'));var db=require(_0xf6f1('0x5'))['db'];var utils=require(_0xf6f1('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0xf6f1('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config[_0xf6f1('0x8')]=_['defaults'](config[_0xf6f1('0x8')],{'host':_0xf6f1('0x9'),'port':0x18eb});var socket=require(_0xf6f1('0xa'))(new Redis(config['redis']));require(_0xf6f1('0xb'))[_0xf6f1('0xc')](socket);function respondWithRpcPromise(_0x5cb9a3,_0x32f7ab,_0x26d418){return new BPromise(function(_0x45b43a,_0x404114){return client['request'](_0x5cb9a3,_0x26d418)['then'](function(_0x2284e3){logger[_0xf6f1('0xd')](_0xf6f1('0xe'),_0x32f7ab,_0xf6f1('0xf'));logger[_0xf6f1('0x10')](_0xf6f1('0x11'),_0x32f7ab,_0xf6f1('0xf'),JSON[_0xf6f1('0x12')](_0x2284e3));if(_0x2284e3[_0xf6f1('0x13')]){if(_0x2284e3['error']['code']===0x1f4){logger['error'](_0xf6f1('0xe'),_0x32f7ab,_0x2284e3[_0xf6f1('0x13')][_0xf6f1('0x14')]);return _0x404114(_0x2284e3['error'][_0xf6f1('0x14')]);}logger[_0xf6f1('0x13')](_0xf6f1('0xe'),_0x32f7ab,_0x2284e3[_0xf6f1('0x13')][_0xf6f1('0x14')]);return _0x45b43a(_0x2284e3[_0xf6f1('0x13')][_0xf6f1('0x14')]);}else{logger[_0xf6f1('0xd')](_0xf6f1('0xe'),_0x32f7ab,'request\x20sent');_0x45b43a(_0x2284e3[_0xf6f1('0x15')]['message']);}})[_0xf6f1('0x16')](function(_0x57ee13){logger[_0xf6f1('0x13')]('Team,\x20%s,\x20%s',_0x32f7ab,_0x57ee13);_0x404114(_0x57ee13);});});}
\ No newline at end of file
diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js
index f82470a..a7a355e 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 _0xdc86=['emit','register','length','team:','save','update'];(function(_0x13e555,_0x2f024a){var _0x55645c=function(_0x2e8530){while(--_0x2e8530){_0x13e555['push'](_0x13e555['shift']());}};_0x55645c(++_0x2f024a);}(_0xdc86,0x118));var _0x6dc8=function(_0x4a747d,_0x3b747f){_0x4a747d=_0x4a747d-0x0;var _0x3a5b5c=_0xdc86[_0x4a747d];return _0x3a5b5c;};'use strict';var TeamEvents=require('./team.events');var events=[_0x6dc8('0x0'),'remove',_0x6dc8('0x1')];function createListener(_0x52ed6c,_0x30da65){return function(_0x384f46){_0x30da65[_0x6dc8('0x2')](_0x52ed6c,_0x384f46);};}function removeListener(_0xfa6165,_0x44634f){return function(){TeamEvents['removeListener'](_0xfa6165,_0x44634f);};}exports[_0x6dc8('0x3')]=function(_0x3109bf){for(var _0xbc9bc4=0x0,_0x9b1bcc=events[_0x6dc8('0x4')];_0xbc9bc4<_0x9b1bcc;_0xbc9bc4++){var _0x1f41c7=events[_0xbc9bc4];var _0x41bdf5=createListener(_0x6dc8('0x5')+_0x1f41c7,_0x3109bf);TeamEvents['on'](_0x1f41c7,_0x41bdf5);}};
\ No newline at end of file
+var _0x5f6f=['save','remove','update','emit','removeListener','register','team:','./team.events'];(function(_0x134c2e,_0x3573c4){var _0x2825db=function(_0x2a574d){while(--_0x2a574d){_0x134c2e['push'](_0x134c2e['shift']());}};_0x2825db(++_0x3573c4);}(_0x5f6f,0x1ef));var _0xf5f6=function(_0xd51d4b,_0x48bc70){_0xd51d4b=_0xd51d4b-0x0;var _0x2afbba=_0x5f6f[_0xd51d4b];return _0x2afbba;};'use strict';var TeamEvents=require(_0xf5f6('0x0'));var events=[_0xf5f6('0x1'),_0xf5f6('0x2'),_0xf5f6('0x3')];function createListener(_0x6ef7d5,_0x524d6f){return function(_0x503723){_0x524d6f[_0xf5f6('0x4')](_0x6ef7d5,_0x503723);};}function removeListener(_0x2f2e00,_0x58028b){return function(){TeamEvents[_0xf5f6('0x5')](_0x2f2e00,_0x58028b);};}exports[_0xf5f6('0x6')]=function(_0x390b1a){for(var _0xfda1c7=0x0,_0x508c02=events['length'];_0xfda1c7<_0x508c02;_0xfda1c7++){var _0xa635ff=events[_0xfda1c7];var _0x2fa090=createListener(_0xf5f6('0x7')+_0xa635ff,_0x390b1a);TeamEvents['on'](_0xa635ff,_0x2fa090);}};
\ No newline at end of file
diff --git a/server/api/template/index.js b/server/api/template/index.js
index 47a4ecc..5e160a7 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 _0x257b=['connect-timeout','express','Router','../../components/auth/service','./template.controller','get','isAuthenticated','/:id','show','create','put','update','destroy','exports','multer','util','path'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x257b,0x10d));var _0xb257=function(_0x3813ad,_0x2eff01){_0x3813ad=_0x3813ad-0x0;var _0x16ed55=_0x257b[_0x3813ad];return _0x16ed55;};'use strict';var multer=require(_0xb257('0x0'));var util=require(_0xb257('0x1'));var path=require(_0xb257('0x2'));var timeout=require(_0xb257('0x3'));var express=require(_0xb257('0x4'));var router=express[_0xb257('0x5')]();var auth=require(_0xb257('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xb257('0x7'));router[_0xb257('0x8')]('/',auth[_0xb257('0x9')](),controller['index']);router[_0xb257('0x8')](_0xb257('0xa'),auth[_0xb257('0x9')](),controller[_0xb257('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xb257('0xc')]);router[_0xb257('0xd')]('/:id',auth[_0xb257('0x9')](),controller[_0xb257('0xe')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xb257('0xf')]);module[_0xb257('0x10')]=router;
\ No newline at end of file
+var _0xbf5f=['post','create','put','update','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','./template.controller','get','isAuthenticated','index','/:id'];(function(_0x3d726b,_0xd40077){var _0x27a5d0=function(_0x4b5a98){while(--_0x4b5a98){_0x3d726b['push'](_0x3d726b['shift']());}};_0x27a5d0(++_0xd40077);}(_0xbf5f,0x7c));var _0xfbf5=function(_0x34ae9b,_0x5d21b7){_0x34ae9b=_0x34ae9b-0x0;var _0x1bcff9=_0xbf5f[_0x34ae9b];return _0x1bcff9;};'use strict';var multer=require(_0xfbf5('0x0'));var util=require(_0xfbf5('0x1'));var path=require(_0xfbf5('0x2'));var timeout=require('connect-timeout');var express=require(_0xfbf5('0x3'));var router=express[_0xfbf5('0x4')]();var auth=require(_0xfbf5('0x5'));var interaction=require(_0xfbf5('0x6'));var config=require('../../config/environment');var controller=require(_0xfbf5('0x7'));router[_0xfbf5('0x8')]('/',auth[_0xfbf5('0x9')](),controller[_0xfbf5('0xa')]);router[_0xfbf5('0x8')](_0xfbf5('0xb'),auth[_0xfbf5('0x9')](),controller['show']);router[_0xfbf5('0xc')]('/',auth[_0xfbf5('0x9')](),controller[_0xfbf5('0xd')]);router[_0xfbf5('0xe')](_0xfbf5('0xb'),auth[_0xfbf5('0x9')](),controller[_0xfbf5('0xf')]);router['delete'](_0xfbf5('0xb'),auth['isAuthenticated'](),controller['destroy']);module[_0xfbf5('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/template/template.attributes.js b/server/api/template/template.attributes.js
index 2836a84..226fa71 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 _0x65fc=['sequelize','exports','STRING'];(function(_0x194cb5,_0x479e8a){var _0x55db4b=function(_0x2c8192){while(--_0x2c8192){_0x194cb5['push'](_0x194cb5['shift']());}};_0x55db4b(++_0x479e8a);}(_0x65fc,0x15c));var _0xc65f=function(_0x16c630,_0x52090b){_0x16c630=_0x16c630-0x0;var _0x575e75=_0x65fc[_0x16c630];return _0x575e75;};'use strict';var Sequelize=require(_0xc65f('0x0'));module[_0xc65f('0x1')]={'name':{'type':Sequelize[_0xc65f('0x2')]},'description':{'type':Sequelize[_0xc65f('0x2')]},'html':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0x127a=['sequelize','STRING','TEXT'];(function(_0x45b9f4,_0x31ebdc){var _0x55d30e=function(_0x338c85){while(--_0x338c85){_0x45b9f4['push'](_0x45b9f4['shift']());}};_0x55d30e(++_0x31ebdc);}(_0x127a,0x12f));var _0xa127=function(_0x36eaaa,_0x326732){_0x36eaaa=_0x36eaaa-0x0;var _0x461349=_0x127a[_0x36eaaa];return _0x461349;};'use strict';var Sequelize=require(_0xa127('0x0'));module['exports']={'name':{'type':Sequelize[_0xa127('0x1')]},'description':{'type':Sequelize[_0xa127('0x1')]},'html':{'type':Sequelize[_0xa127('0x2')]}};
\ No newline at end of file
diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js
index 028aba9..07a7116 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 _0x40f1=['to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','update','then','destroy','get','Templates','error','stack','name','map','Template','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','jsforce','desk.js'];(function(_0x1fee87,_0x24821f){var _0x468dc5=function(_0x2360f4){while(--_0x2360f4){_0x1fee87['push'](_0x1fee87['shift']());}};_0x468dc5(++_0x24821f);}(_0x40f1,0x91));var _0x140f=function(_0x4f7a97,_0x56664c){_0x4f7a97=_0x4f7a97-0x0;var _0x31a17c=_0x40f1[_0x4f7a97];return _0x31a17c;};'use strict';var pdf=require(_0x140f('0x0'));var emlformat=require(_0x140f('0x1'));var rimraf=require(_0x140f('0x2'));var zipdir=require('zip-dir');var jsonpatch=require(_0x140f('0x3'));var rp=require(_0x140f('0x4'));var moment=require(_0x140f('0x5'));var BPromise=require(_0x140f('0x6'));var Mustache=require(_0x140f('0x7'));var util=require(_0x140f('0x8'));var path=require(_0x140f('0x9'));var sox=require(_0x140f('0xa'));var csv=require('to-csv');var ejs=require(_0x140f('0xb'));var fs=require('fs');var _=require(_0x140f('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x140f('0xd'));var deskjs=require(_0x140f('0xe'));var toCsv=require(_0x140f('0xf'));var querystring=require(_0x140f('0x10'));var Papa=require(_0x140f('0x11'));var Redis=require(_0x140f('0x12'));var authService=require(_0x140f('0x13'));var qs=require(_0x140f('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x140f('0x15'));var logger=require('../../config/logger')(_0x140f('0x16'));var utils=require('../../config/utils');var config=require(_0x140f('0x17'));var db=require(_0x140f('0x18'))['db'];function respondWithStatusCode(_0x2b55ed,_0x3cf59d){_0x3cf59d=_0x3cf59d||0xcc;return function(_0x324a70){if(_0x324a70){return _0x2b55ed[_0x140f('0x19')](_0x3cf59d);}return _0x2b55ed[_0x140f('0x1a')](_0x3cf59d)[_0x140f('0x1b')]();};}function respondWithResult(_0x239385,_0x1b5159){_0x1b5159=_0x1b5159||0xc8;return function(_0x4ea666){if(_0x4ea666){return _0x239385['status'](_0x1b5159)[_0x140f('0x1c')](_0x4ea666);}};}function respondWithFilteredResult(_0x25a988,_0x48a59f){return function(_0x413992){if(_0x413992){var _0x58de39=_0x413992[_0x140f('0x1d')],_0x8eb9d7=_0x48a59f[_0x140f('0x1e')],_0x40aa28=_0x48a59f['offset']+_0x48a59f[_0x140f('0x1f')],_0x223186;if(_0x40aa28>=_0x58de39){_0x40aa28=_0x58de39;_0x223186=0xc8;}else{_0x223186=0xce;}_0x25a988['status'](_0x223186);return _0x25a988[_0x140f('0x20')](_0x140f('0x21'),_0x8eb9d7+'-'+_0x40aa28+'/'+_0x58de39)[_0x140f('0x1c')](_0x413992);}return null;};}function patchUpdates(_0x239b0b){return function(_0x342fa0){try{jsonpatch['apply'](_0x342fa0,_0x239b0b,!![]);}catch(_0x4ba30c){return BPromise[_0x140f('0x22')](_0x4ba30c);}return _0x342fa0['save']();};}function saveUpdates(_0x23651c,_0x3feccc){return function(_0x4dab19){if(_0x4dab19){return _0x4dab19[_0x140f('0x23')](_0x23651c)[_0x140f('0x24')](function(_0x27b8fb){return _0x27b8fb;});}return null;};}function removeEntity(_0x47a430,_0x497166){return function(_0x5da9f1){if(_0x5da9f1){return _0x5da9f1[_0x140f('0x25')]()[_0x140f('0x24')](function(){var _0x56b8c5=_0x5da9f1[_0x140f('0x26')]({'plain':!![]});var _0x2e462c=_0x140f('0x27');return db['UserProfileResource'][_0x140f('0x25')]({'where':{'type':_0x2e462c,'resourceId':_0x56b8c5['id']}})[_0x140f('0x24')](function(){return _0x5da9f1;});})[_0x140f('0x24')](function(){_0x47a430[_0x140f('0x1a')](0xcc)[_0x140f('0x1b')]();});}};}function handleEntityNotFound(_0x4ed069,_0xa54377){return function(_0x5232ae){if(!_0x5232ae){_0x4ed069['sendStatus'](0x194);}return _0x5232ae;};}function handleError(_0x4073fa,_0x555fca){_0x555fca=_0x555fca||0x1f4;return function(_0x30157b){logger[_0x140f('0x28')](_0x30157b[_0x140f('0x29')]);if(_0x30157b[_0x140f('0x2a')]){delete _0x30157b[_0x140f('0x2a')];}_0x4073fa[_0x140f('0x1a')](_0x555fca)['send'](_0x30157b);};}exports['index']=function(_0x178f17,_0x1829b5){var _0x3cf5cd={},_0x19fd20={},_0x12a7cb={'count':0x0,'rows':[]};var _0x10928=_[_0x140f('0x2b')](db[_0x140f('0x2c')]['rawAttributes'],function(_0x360d5a){return{'name':_0x360d5a[_0x140f('0x2d')],'type':_0x360d5a[_0x140f('0x2e')][_0x140f('0x2f')]};});_0x19fd20[_0x140f('0x30')]=_[_0x140f('0x2b')](_0x10928,_0x140f('0x2a'));_0x19fd20['query']=_[_0x140f('0x31')](_0x178f17[_0x140f('0x32')]);_0x19fd20[_0x140f('0x33')]=_[_0x140f('0x34')](_0x19fd20['model'],_0x19fd20[_0x140f('0x32')]);_0x3cf5cd['attributes']=_[_0x140f('0x34')](_0x19fd20[_0x140f('0x30')],qs[_0x140f('0x35')](_0x178f17[_0x140f('0x32')]['fields']));_0x3cf5cd[_0x140f('0x36')]=_0x3cf5cd[_0x140f('0x36')]['length']?_0x3cf5cd[_0x140f('0x36')]:_0x19fd20[_0x140f('0x30')];if(!_0x178f17[_0x140f('0x32')]['hasOwnProperty'](_0x140f('0x37'))){_0x3cf5cd[_0x140f('0x1f')]=qs[_0x140f('0x1f')](_0x178f17[_0x140f('0x32')]['limit']);_0x3cf5cd[_0x140f('0x1e')]=qs[_0x140f('0x1e')](_0x178f17[_0x140f('0x32')][_0x140f('0x1e')]);}_0x3cf5cd[_0x140f('0x38')]=qs[_0x140f('0x39')](_0x178f17[_0x140f('0x32')][_0x140f('0x39')]);_0x3cf5cd[_0x140f('0x3a')]=qs[_0x140f('0x33')](_[_0x140f('0x3b')](_0x178f17['query'],_0x19fd20[_0x140f('0x33')]));if(_0x178f17[_0x140f('0x32')][_0x140f('0x3c')]){_0x3cf5cd[_0x140f('0x3a')]=_[_0x140f('0x3d')](_0x3cf5cd['where'],{'$or':_[_0x140f('0x2b')](_0x10928,function(_0x5dec20){if(_0x5dec20[_0x140f('0x2e')]!==_0x140f('0x3e')){var _0x168b7b={};_0x168b7b[_0x5dec20[_0x140f('0x2a')]]={'$like':'%'+_0x178f17[_0x140f('0x32')]['filter']+'%'};return _0x168b7b;}})});}_0x3cf5cd=_[_0x140f('0x3d')]({},_0x3cf5cd,_0x178f17[_0x140f('0x3f')]);var _0x2e73bd={'where':_0x3cf5cd[_0x140f('0x3a')]};return db[_0x140f('0x2c')][_0x140f('0x1d')](_0x2e73bd)[_0x140f('0x24')](function(_0x1cb012){_0x12a7cb[_0x140f('0x1d')]=_0x1cb012;if(_0x178f17[_0x140f('0x32')][_0x140f('0x40')]){_0x3cf5cd['include']=[{'all':!![]}];}return db['Template'][_0x140f('0x41')](_0x3cf5cd);})[_0x140f('0x24')](function(_0x267882){_0x12a7cb[_0x140f('0x42')]=_0x267882;return _0x12a7cb;})[_0x140f('0x24')](respondWithFilteredResult(_0x1829b5,_0x3cf5cd))[_0x140f('0x43')](handleError(_0x1829b5,null));};exports['show']=function(_0x2ca773,_0x519691){var _0x7a59d1={'raw':!![],'where':{'id':_0x2ca773['params']['id']}},_0x3fbe29={};_0x3fbe29[_0x140f('0x30')]=_['keys'](db['Template']['rawAttributes']);_0x3fbe29[_0x140f('0x32')]=_[_0x140f('0x31')](_0x2ca773[_0x140f('0x32')]);_0x3fbe29[_0x140f('0x33')]=_[_0x140f('0x34')](_0x3fbe29['model'],_0x3fbe29[_0x140f('0x32')]);_0x7a59d1[_0x140f('0x36')]=_[_0x140f('0x34')](_0x3fbe29[_0x140f('0x30')],qs[_0x140f('0x35')](_0x2ca773[_0x140f('0x32')][_0x140f('0x35')]));_0x7a59d1['attributes']=_0x7a59d1[_0x140f('0x36')]['length']?_0x7a59d1[_0x140f('0x36')]:_0x3fbe29['model'];if(_0x2ca773['query'][_0x140f('0x40')]){_0x7a59d1[_0x140f('0x44')]=[{'all':!![]}];}_0x7a59d1=_[_0x140f('0x3d')]({},_0x7a59d1,_0x2ca773['options']);return db[_0x140f('0x2c')][_0x140f('0x45')](_0x7a59d1)[_0x140f('0x24')](handleEntityNotFound(_0x519691,null))[_0x140f('0x24')](respondWithResult(_0x519691,null))['catch'](handleError(_0x519691,null));};exports[_0x140f('0x46')]=function(_0x53f884,_0x505da6){return db[_0x140f('0x2c')][_0x140f('0x46')](_0x53f884[_0x140f('0x47')],{})['then'](function(_0x3f6cd5){var _0x3fda32=_0x53f884[_0x140f('0x48')][_0x140f('0x26')]({'plain':!![]});if(!_0x3fda32)throw new Error(_0x140f('0x49'));if(_0x3fda32[_0x140f('0x4a')]===_0x140f('0x48')){var _0x31f105=_0x3f6cd5['get']({'plain':!![]});var _0x111287=_0x140f('0x27');return db[_0x140f('0x4b')][_0x140f('0x45')]({'where':{'name':_0x111287,'userProfileId':_0x3fda32['userProfileId']},'raw':!![]})[_0x140f('0x24')](function(_0x10a9ab){if(_0x10a9ab&&_0x10a9ab[_0x140f('0x4c')]===0x0){return db[_0x140f('0x4d')][_0x140f('0x46')]({'name':_0x31f105['name'],'resourceId':_0x31f105['id'],'type':_0x10a9ab['name'],'sectionId':_0x10a9ab['id']},{})[_0x140f('0x24')](function(){return _0x3f6cd5;});}else{return _0x3f6cd5;}})[_0x140f('0x43')](function(_0x2db8e0){logger[_0x140f('0x28')](_0x140f('0x4e'),_0x2db8e0);throw _0x2db8e0;});}return _0x3f6cd5;})[_0x140f('0x24')](respondWithResult(_0x505da6,0xc9))[_0x140f('0x43')](handleError(_0x505da6,null));};exports[_0x140f('0x23')]=function(_0x1bc0cc,_0x4e8359){if(_0x1bc0cc[_0x140f('0x47')]['id']){delete _0x1bc0cc[_0x140f('0x47')]['id'];}return db[_0x140f('0x2c')][_0x140f('0x45')]({'where':{'id':_0x1bc0cc[_0x140f('0x4f')]['id']}})[_0x140f('0x24')](handleEntityNotFound(_0x4e8359,null))[_0x140f('0x24')](saveUpdates(_0x1bc0cc[_0x140f('0x47')],null))[_0x140f('0x24')](respondWithResult(_0x4e8359,null))['catch'](handleError(_0x4e8359,null));};exports['destroy']=function(_0x558717,_0x15dbba){return db['Template'][_0x140f('0x45')]({'where':{'id':_0x558717['params']['id']}})[_0x140f('0x24')](handleEntityNotFound(_0x15dbba,null))[_0x140f('0x24')](removeEntity(_0x15dbba,null))[_0x140f('0x43')](handleError(_0x15dbba,null));};
\ No newline at end of file
+var _0xdb67=['save','update','then','destroy','get','UserProfileResource','error','stack','name','send','index','map','Template','fieldName','type','query','keys','filters','intersection','model','attributes','nolimit','limit','sort','filter','where','merge','options','includeAll','findAll','catch','show','params','fields','length','include','find','create','role','user','Templates','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','count','offset','set','Content-Range','apply'];(function(_0x24e951,_0x544ac7){var _0x554280=function(_0x1c38af){while(--_0x1c38af){_0x24e951['push'](_0x24e951['shift']());}};_0x554280(++_0x544ac7);}(_0xdb67,0x1be));var _0x7db6=function(_0x2aceb1,_0x58297c){_0x2aceb1=_0x2aceb1-0x0;var _0x27ac91=_0xdb67[_0x2aceb1];return _0x27ac91;};'use strict';var pdf=require(_0x7db6('0x0'));var emlformat=require(_0x7db6('0x1'));var rimraf=require(_0x7db6('0x2'));var zipdir=require(_0x7db6('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7db6('0x4'));var moment=require(_0x7db6('0x5'));var BPromise=require(_0x7db6('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x7db6('0x7'));var sox=require('sox');var csv=require(_0x7db6('0x8'));var ejs=require(_0x7db6('0x9'));var fs=require('fs');var _=require(_0x7db6('0xa'));var squel=require(_0x7db6('0xb'));var crypto=require(_0x7db6('0xc'));var jsforce=require(_0x7db6('0xd'));var deskjs=require(_0x7db6('0xe'));var toCsv=require('to-csv');var querystring=require(_0x7db6('0xf'));var Papa=require(_0x7db6('0x10'));var Redis=require(_0x7db6('0x11'));var authService=require(_0x7db6('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x7db6('0x13'));var hardwareService=require(_0x7db6('0x14'));var logger=require(_0x7db6('0x15'))(_0x7db6('0x16'));var utils=require(_0x7db6('0x17'));var config=require(_0x7db6('0x18'));var db=require(_0x7db6('0x19'))['db'];function respondWithStatusCode(_0x38aa35,_0x514b05){_0x514b05=_0x514b05||0xcc;return function(_0x41fe78){if(_0x41fe78){return _0x38aa35[_0x7db6('0x1a')](_0x514b05);}return _0x38aa35['status'](_0x514b05)['end']();};}function respondWithResult(_0x28f169,_0x4886b3){_0x4886b3=_0x4886b3||0xc8;return function(_0x2cf8e3){if(_0x2cf8e3){return _0x28f169[_0x7db6('0x1b')](_0x4886b3)[_0x7db6('0x1c')](_0x2cf8e3);}};}function respondWithFilteredResult(_0x586dc4,_0x60860){return function(_0x8a90f8){if(_0x8a90f8){var _0x2f3fa2=_0x8a90f8[_0x7db6('0x1d')],_0x2b8c03=_0x60860[_0x7db6('0x1e')],_0x1497bc=_0x60860[_0x7db6('0x1e')]+_0x60860['limit'],_0x347df7;if(_0x1497bc>=_0x2f3fa2){_0x1497bc=_0x2f3fa2;_0x347df7=0xc8;}else{_0x347df7=0xce;}_0x586dc4[_0x7db6('0x1b')](_0x347df7);return _0x586dc4[_0x7db6('0x1f')](_0x7db6('0x20'),_0x2b8c03+'-'+_0x1497bc+'/'+_0x2f3fa2)[_0x7db6('0x1c')](_0x8a90f8);}return null;};}function patchUpdates(_0x235514){return function(_0x48ef2e){try{jsonpatch[_0x7db6('0x21')](_0x48ef2e,_0x235514,!![]);}catch(_0x4cd738){return BPromise['reject'](_0x4cd738);}return _0x48ef2e[_0x7db6('0x22')]();};}function saveUpdates(_0x1cd597,_0x46ac28){return function(_0x2ca2ba){if(_0x2ca2ba){return _0x2ca2ba[_0x7db6('0x23')](_0x1cd597)[_0x7db6('0x24')](function(_0x14d707){return _0x14d707;});}return null;};}function removeEntity(_0xaf6193,_0x17d4e3){return function(_0x2e5124){if(_0x2e5124){return _0x2e5124[_0x7db6('0x25')]()[_0x7db6('0x24')](function(){var _0x2434a1=_0x2e5124[_0x7db6('0x26')]({'plain':!![]});var _0x14cc54='Templates';return db[_0x7db6('0x27')]['destroy']({'where':{'type':_0x14cc54,'resourceId':_0x2434a1['id']}})[_0x7db6('0x24')](function(){return _0x2e5124;});})[_0x7db6('0x24')](function(){_0xaf6193[_0x7db6('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2da26d,_0x38d28e){return function(_0x1e77ae){if(!_0x1e77ae){_0x2da26d[_0x7db6('0x1a')](0x194);}return _0x1e77ae;};}function handleError(_0x530869,_0xd757e3){_0xd757e3=_0xd757e3||0x1f4;return function(_0x48a399){logger[_0x7db6('0x28')](_0x48a399[_0x7db6('0x29')]);if(_0x48a399['name']){delete _0x48a399[_0x7db6('0x2a')];}_0x530869[_0x7db6('0x1b')](_0xd757e3)[_0x7db6('0x2b')](_0x48a399);};}exports[_0x7db6('0x2c')]=function(_0x2ac71a,_0x56faa0){var _0x2dbbb7={},_0x42fea2={},_0x2399ca={'count':0x0,'rows':[]};var _0x146cca=_[_0x7db6('0x2d')](db[_0x7db6('0x2e')]['rawAttributes'],function(_0x349952){return{'name':_0x349952[_0x7db6('0x2f')],'type':_0x349952[_0x7db6('0x30')]['key']};});_0x42fea2['model']=_[_0x7db6('0x2d')](_0x146cca,_0x7db6('0x2a'));_0x42fea2[_0x7db6('0x31')]=_[_0x7db6('0x32')](_0x2ac71a[_0x7db6('0x31')]);_0x42fea2[_0x7db6('0x33')]=_[_0x7db6('0x34')](_0x42fea2[_0x7db6('0x35')],_0x42fea2[_0x7db6('0x31')]);_0x2dbbb7[_0x7db6('0x36')]=_[_0x7db6('0x34')](_0x42fea2[_0x7db6('0x35')],qs['fields'](_0x2ac71a['query']['fields']));_0x2dbbb7['attributes']=_0x2dbbb7[_0x7db6('0x36')]['length']?_0x2dbbb7[_0x7db6('0x36')]:_0x42fea2[_0x7db6('0x35')];if(!_0x2ac71a[_0x7db6('0x31')]['hasOwnProperty'](_0x7db6('0x37'))){_0x2dbbb7[_0x7db6('0x38')]=qs[_0x7db6('0x38')](_0x2ac71a[_0x7db6('0x31')]['limit']);_0x2dbbb7[_0x7db6('0x1e')]=qs[_0x7db6('0x1e')](_0x2ac71a[_0x7db6('0x31')][_0x7db6('0x1e')]);}_0x2dbbb7['order']=qs[_0x7db6('0x39')](_0x2ac71a[_0x7db6('0x31')][_0x7db6('0x39')]);_0x2dbbb7['where']=qs[_0x7db6('0x33')](_['pick'](_0x2ac71a[_0x7db6('0x31')],_0x42fea2['filters']));if(_0x2ac71a[_0x7db6('0x31')][_0x7db6('0x3a')]){_0x2dbbb7[_0x7db6('0x3b')]=_[_0x7db6('0x3c')](_0x2dbbb7[_0x7db6('0x3b')],{'$or':_[_0x7db6('0x2d')](_0x146cca,function(_0x120dc0){if(_0x120dc0[_0x7db6('0x30')]!=='VIRTUAL'){var _0x529352={};_0x529352[_0x120dc0[_0x7db6('0x2a')]]={'$like':'%'+_0x2ac71a[_0x7db6('0x31')][_0x7db6('0x3a')]+'%'};return _0x529352;}})});}_0x2dbbb7=_[_0x7db6('0x3c')]({},_0x2dbbb7,_0x2ac71a[_0x7db6('0x3d')]);var _0x5ac999={'where':_0x2dbbb7[_0x7db6('0x3b')]};return db[_0x7db6('0x2e')]['count'](_0x5ac999)[_0x7db6('0x24')](function(_0x43480b){_0x2399ca['count']=_0x43480b;if(_0x2ac71a['query'][_0x7db6('0x3e')]){_0x2dbbb7['include']=[{'all':!![]}];}return db[_0x7db6('0x2e')][_0x7db6('0x3f')](_0x2dbbb7);})[_0x7db6('0x24')](function(_0x5d41cd){_0x2399ca['rows']=_0x5d41cd;return _0x2399ca;})[_0x7db6('0x24')](respondWithFilteredResult(_0x56faa0,_0x2dbbb7))[_0x7db6('0x40')](handleError(_0x56faa0,null));};exports[_0x7db6('0x41')]=function(_0x3f411e,_0x375567){var _0x4fb522={'raw':!![],'where':{'id':_0x3f411e[_0x7db6('0x42')]['id']}},_0x159141={};_0x159141[_0x7db6('0x35')]=_[_0x7db6('0x32')](db['Template']['rawAttributes']);_0x159141['query']=_[_0x7db6('0x32')](_0x3f411e['query']);_0x159141['filters']=_[_0x7db6('0x34')](_0x159141['model'],_0x159141[_0x7db6('0x31')]);_0x4fb522[_0x7db6('0x36')]=_[_0x7db6('0x34')](_0x159141[_0x7db6('0x35')],qs[_0x7db6('0x43')](_0x3f411e[_0x7db6('0x31')]['fields']));_0x4fb522[_0x7db6('0x36')]=_0x4fb522[_0x7db6('0x36')][_0x7db6('0x44')]?_0x4fb522['attributes']:_0x159141['model'];if(_0x3f411e[_0x7db6('0x31')]['includeAll']){_0x4fb522[_0x7db6('0x45')]=[{'all':!![]}];}_0x4fb522=_['merge']({},_0x4fb522,_0x3f411e['options']);return db[_0x7db6('0x2e')][_0x7db6('0x46')](_0x4fb522)[_0x7db6('0x24')](handleEntityNotFound(_0x375567,null))[_0x7db6('0x24')](respondWithResult(_0x375567,null))[_0x7db6('0x40')](handleError(_0x375567,null));};exports[_0x7db6('0x47')]=function(_0x4704e1,_0x3a6897){return db[_0x7db6('0x2e')][_0x7db6('0x47')](_0x4704e1['body'],{})['then'](function(_0xa630a3){var _0x4fcff0=_0x4704e1['user'][_0x7db6('0x26')]({'plain':!![]});if(!_0x4fcff0)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4fcff0[_0x7db6('0x48')]===_0x7db6('0x49')){var _0x121f5f=_0xa630a3[_0x7db6('0x26')]({'plain':!![]});var _0x4c5156=_0x7db6('0x4a');return db[_0x7db6('0x4b')]['find']({'where':{'name':_0x4c5156,'userProfileId':_0x4fcff0[_0x7db6('0x4c')]},'raw':!![]})[_0x7db6('0x24')](function(_0x464ee6){if(_0x464ee6&&_0x464ee6[_0x7db6('0x4d')]===0x0){return db[_0x7db6('0x27')][_0x7db6('0x47')]({'name':_0x121f5f['name'],'resourceId':_0x121f5f['id'],'type':_0x464ee6[_0x7db6('0x2a')],'sectionId':_0x464ee6['id']},{})[_0x7db6('0x24')](function(){return _0xa630a3;});}else{return _0xa630a3;}})[_0x7db6('0x40')](function(_0x94995b){logger[_0x7db6('0x28')](_0x7db6('0x4e'),_0x94995b);throw _0x94995b;});}return _0xa630a3;})[_0x7db6('0x24')](respondWithResult(_0x3a6897,0xc9))[_0x7db6('0x40')](handleError(_0x3a6897,null));};exports[_0x7db6('0x23')]=function(_0x2087dd,_0x551ae9){if(_0x2087dd[_0x7db6('0x4f')]['id']){delete _0x2087dd['body']['id'];}return db[_0x7db6('0x2e')][_0x7db6('0x46')]({'where':{'id':_0x2087dd['params']['id']}})[_0x7db6('0x24')](handleEntityNotFound(_0x551ae9,null))[_0x7db6('0x24')](saveUpdates(_0x2087dd[_0x7db6('0x4f')],null))[_0x7db6('0x24')](respondWithResult(_0x551ae9,null))[_0x7db6('0x40')](handleError(_0x551ae9,null));};exports[_0x7db6('0x25')]=function(_0x41f441,_0x359139){return db[_0x7db6('0x2e')][_0x7db6('0x46')]({'where':{'id':_0x41f441[_0x7db6('0x42')]['id']}})[_0x7db6('0x24')](handleEntityNotFound(_0x359139,null))[_0x7db6('0x24')](removeEntity(_0x359139,null))[_0x7db6('0x40')](handleError(_0x359139,null));};
\ No newline at end of file
diff --git a/server/api/template/template.model.js b/server/api/template/template.model.js
index e663e89..be1c7a6 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 _0x76fc=['tools_templates','lodash','util','bluebird','request-promise','path','./template.attributes','exports','Template'];(function(_0x1c0f41,_0x26d95d){var _0x369a9f=function(_0x251234){while(--_0x251234){_0x1c0f41['push'](_0x1c0f41['shift']());}};_0x369a9f(++_0x26d95d);}(_0x76fc,0x88));var _0xc76f=function(_0x1f482e,_0x56a24c){_0x1f482e=_0x1f482e-0x0;var _0xe75fdb=_0x76fc[_0x1f482e];return _0xe75fdb;};'use strict';var _=require(_0xc76f('0x0'));var util=require(_0xc76f('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xc76f('0x2'));var rp=require(_0xc76f('0x3'));var fs=require('fs');var path=require(_0xc76f('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xc76f('0x5'));module[_0xc76f('0x6')]=function(_0x175113,_0x2027df){return _0x175113['define'](_0xc76f('0x7'),attributes,{'tableName':_0xc76f('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4641=['util','api','moment','request-promise','path','rimraf','../../config/environment','exports','Template','tools_templates','lodash'];(function(_0x209e12,_0x2ce907){var _0x3f5b89=function(_0x39cc7f){while(--_0x39cc7f){_0x209e12['push'](_0x209e12['shift']());}};_0x3f5b89(++_0x2ce907);}(_0x4641,0x16a));var _0x1464=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0x4641[_0x3e5086];return _0xfeb102;};'use strict';var _=require(_0x1464('0x0'));var util=require(_0x1464('0x1'));var logger=require('../../config/logger')(_0x1464('0x2'));var moment=require(_0x1464('0x3'));var BPromise=require('bluebird');var rp=require(_0x1464('0x4'));var fs=require('fs');var path=require(_0x1464('0x5'));var rimraf=require(_0x1464('0x6'));var config=require(_0x1464('0x7'));var attributes=require('./template.attributes');module[_0x1464('0x8')]=function(_0x2608bf,_0x4a711e){return _0x2608bf['define'](_0x1464('0x9'),attributes,{'tableName':_0x1464('0xa'),'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 b8f066b..c7de1a6 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 _0xba01=['model','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','Template,\x20%s,\x20%s','request\x20sent','debug','Template,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetTemplate','Template','findAll','options','where','attributes','include','map'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xba01,0xac));var _0x1ba0=function(_0x3fdc92,_0x5c7bad){_0x3fdc92=_0x3fdc92-0x0;var _0x45cbab=_0xba01[_0x3fdc92];return _0x45cbab;};'use strict';var _=require(_0x1ba0('0x0'));var util=require(_0x1ba0('0x1'));var moment=require(_0x1ba0('0x2'));var BPromise=require('bluebird');var rs=require(_0x1ba0('0x3'));var fs=require('fs');var Redis=require(_0x1ba0('0x4'));var db=require(_0x1ba0('0x5'))['db'];var utils=require(_0x1ba0('0x6'));var logger=require(_0x1ba0('0x7'))(_0x1ba0('0x8'));var config=require('../../config/environment');var jayson=require(_0x1ba0('0x9'));var client=jayson[_0x1ba0('0xa')][_0x1ba0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2cf132,_0x49300b,_0x55420d){return new BPromise(function(_0x169d08,_0x456630){return client[_0x1ba0('0xc')](_0x2cf132,_0x55420d)[_0x1ba0('0xd')](function(_0x5de427){logger[_0x1ba0('0xe')](_0x1ba0('0xf'),_0x49300b,_0x1ba0('0x10'));logger[_0x1ba0('0x11')](_0x1ba0('0x12'),_0x49300b,_0x1ba0('0x10'),JSON[_0x1ba0('0x13')](_0x5de427));if(_0x5de427[_0x1ba0('0x14')]){if(_0x5de427[_0x1ba0('0x14')][_0x1ba0('0x15')]===0x1f4){logger[_0x1ba0('0x14')](_0x1ba0('0xf'),_0x49300b,_0x5de427[_0x1ba0('0x14')][_0x1ba0('0x16')]);return _0x456630(_0x5de427[_0x1ba0('0x14')]['message']);}logger['error'](_0x1ba0('0xf'),_0x49300b,_0x5de427[_0x1ba0('0x14')][_0x1ba0('0x16')]);return _0x169d08(_0x5de427['error']['message']);}else{logger[_0x1ba0('0xe')](_0x1ba0('0xf'),_0x49300b,_0x1ba0('0x10'));_0x169d08(_0x5de427[_0x1ba0('0x17')][_0x1ba0('0x16')]);}})['catch'](function(_0x528cba){logger[_0x1ba0('0x14')](_0x1ba0('0xf'),_0x49300b,_0x528cba);_0x456630(_0x528cba);});});}exports[_0x1ba0('0x18')]=function(_0x1e349b){var _0x46cc70=this;return new Promise(function(_0x28ddc1,_0x5a108c){return db[_0x1ba0('0x19')][_0x1ba0('0x1a')]({'raw':_0x1e349b['options']?_0x1e349b[_0x1ba0('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x1e349b['options']?_0x1e349b[_0x1ba0('0x1b')][_0x1ba0('0x1c')]||null:null,'attributes':_0x1e349b[_0x1ba0('0x1b')]?_0x1e349b[_0x1ba0('0x1b')][_0x1ba0('0x1d')]||null:null,'limit':_0x1e349b[_0x1ba0('0x1b')]?_0x1e349b[_0x1ba0('0x1b')]['limit']||null:null,'include':_0x1e349b[_0x1ba0('0x1b')]?_0x1e349b['options'][_0x1ba0('0x1e')]?_[_0x1ba0('0x1f')](_0x1e349b['options'][_0x1ba0('0x1e')],function(_0x318f01){return{'model':db[_0x318f01[_0x1ba0('0x20')]],'as':_0x318f01['as'],'attributes':_0x318f01[_0x1ba0('0x1d')],'include':_0x318f01['include']?_[_0x1ba0('0x1f')](_0x318f01[_0x1ba0('0x1e')],function(_0x780927){return{'model':db[_0x780927[_0x1ba0('0x20')]],'as':_0x780927['as'],'attributes':_0x780927[_0x1ba0('0x1d')],'include':_0x780927['include']?_['map'](_0x780927[_0x1ba0('0x1e')],function(_0x41e677){return{'model':db[_0x41e677['model']],'as':_0x41e677['as'],'attributes':_0x41e677['attributes']};}):[]};}):[]};}):[]:[]})[_0x1ba0('0xd')](function(_0x4e43c6){logger['info']('GetTemplate',_0x1e349b);logger[_0x1ba0('0x11')](_0x1ba0('0x18'),_0x1e349b,JSON[_0x1ba0('0x13')](_0x4e43c6));_0x28ddc1(_0x4e43c6);})[_0x1ba0('0x21')](function(_0x7831cb){logger[_0x1ba0('0x14')](_0x1ba0('0x18'),_0x7831cb[_0x1ba0('0x16')],_0x1e349b);_0x5a108c(_0x46cc70[_0x1ba0('0x14')](0x1f4,_0x7831cb[_0x1ba0('0x16')]));});});};
\ No newline at end of file
+var _0xfb26=['ioredis','../../config/logger','rpc','client','request','then','Template,\x20%s,\x20%s','Template,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','GetTemplate','Template','findAll','options','raw','where','attributes','limit','include','map','model','debug','stringify','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x561098,_0xdd1933){var _0x42701a=function(_0x2ab50f){while(--_0x2ab50f){_0x561098['push'](_0x561098['shift']());}};_0x42701a(++_0xdd1933);}(_0xfb26,0xf3));var _0x6fb2=function(_0x10ac8f,_0x3f579f){_0x10ac8f=_0x10ac8f-0x0;var _0x563d72=_0xfb26[_0x10ac8f];return _0x563d72;};'use strict';var _=require(_0x6fb2('0x0'));var util=require(_0x6fb2('0x1'));var moment=require(_0x6fb2('0x2'));var BPromise=require(_0x6fb2('0x3'));var rs=require(_0x6fb2('0x4'));var fs=require('fs');var Redis=require(_0x6fb2('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x6fb2('0x6'))(_0x6fb2('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6fb2('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0xab6ab5,_0xa58519,_0x5ab8dd){return new BPromise(function(_0x254be0,_0x1bb06e){return client[_0x6fb2('0x9')](_0xab6ab5,_0x5ab8dd)[_0x6fb2('0xa')](function(_0x81d2d1){logger['info'](_0x6fb2('0xb'),_0xa58519,'request\x20sent');logger['debug'](_0x6fb2('0xc'),_0xa58519,_0x6fb2('0xd'),JSON['stringify'](_0x81d2d1));if(_0x81d2d1[_0x6fb2('0xe')]){if(_0x81d2d1[_0x6fb2('0xe')]['code']===0x1f4){logger['error']('Template,\x20%s,\x20%s',_0xa58519,_0x81d2d1['error']['message']);return _0x1bb06e(_0x81d2d1[_0x6fb2('0xe')][_0x6fb2('0xf')]);}logger[_0x6fb2('0xe')](_0x6fb2('0xb'),_0xa58519,_0x81d2d1[_0x6fb2('0xe')][_0x6fb2('0xf')]);return _0x254be0(_0x81d2d1['error'][_0x6fb2('0xf')]);}else{logger['info'](_0x6fb2('0xb'),_0xa58519,_0x6fb2('0xd'));_0x254be0(_0x81d2d1[_0x6fb2('0x10')][_0x6fb2('0xf')]);}})['catch'](function(_0x51ab1a){logger[_0x6fb2('0xe')]('Template,\x20%s,\x20%s',_0xa58519,_0x51ab1a);_0x1bb06e(_0x51ab1a);});});}exports[_0x6fb2('0x11')]=function(_0x45d98d){var _0x1ad636=this;return new Promise(function(_0x351013,_0x556828){return db[_0x6fb2('0x12')][_0x6fb2('0x13')]({'raw':_0x45d98d['options']?_0x45d98d[_0x6fb2('0x14')][_0x6fb2('0x15')]===undefined?!![]:![]:!![],'where':_0x45d98d[_0x6fb2('0x14')]?_0x45d98d[_0x6fb2('0x14')][_0x6fb2('0x16')]||null:null,'attributes':_0x45d98d[_0x6fb2('0x14')]?_0x45d98d[_0x6fb2('0x14')][_0x6fb2('0x17')]||null:null,'limit':_0x45d98d[_0x6fb2('0x14')]?_0x45d98d['options'][_0x6fb2('0x18')]||null:null,'include':_0x45d98d[_0x6fb2('0x14')]?_0x45d98d[_0x6fb2('0x14')][_0x6fb2('0x19')]?_[_0x6fb2('0x1a')](_0x45d98d[_0x6fb2('0x14')][_0x6fb2('0x19')],function(_0x1d2d16){return{'model':db[_0x1d2d16['model']],'as':_0x1d2d16['as'],'attributes':_0x1d2d16[_0x6fb2('0x17')],'include':_0x1d2d16['include']?_[_0x6fb2('0x1a')](_0x1d2d16[_0x6fb2('0x19')],function(_0x3690d2){return{'model':db[_0x3690d2['model']],'as':_0x3690d2['as'],'attributes':_0x3690d2[_0x6fb2('0x17')],'include':_0x3690d2[_0x6fb2('0x19')]?_[_0x6fb2('0x1a')](_0x3690d2['include'],function(_0x2f406f){return{'model':db[_0x2f406f[_0x6fb2('0x1b')]],'as':_0x2f406f['as'],'attributes':_0x2f406f[_0x6fb2('0x17')]};}):[]};}):[]};}):[]:[]})[_0x6fb2('0xa')](function(_0x1b15c8){logger['info'](_0x6fb2('0x11'),_0x45d98d);logger[_0x6fb2('0x1c')]('GetTemplate',_0x45d98d,JSON[_0x6fb2('0x1d')](_0x1b15c8));_0x351013(_0x1b15c8);})[_0x6fb2('0x1e')](function(_0x3ff6a7){logger[_0x6fb2('0xe')](_0x6fb2('0x11'),_0x3ff6a7[_0x6fb2('0xf')],_0x45d98d);_0x556828(_0x1ad636[_0x6fb2('0xe')](0x1f4,_0x3ff6a7[_0x6fb2('0xf')]));});});};
\ No newline at end of file
diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js
index 169ba88..3043fe0 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 _0x6194=['getAllConditions','/:id/any_conditions','/:id/actions','getActions','post','create','addAllCondition','addAnyCondition','put','update','delete','exports','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./trigger.controller','get','index','/:id','isAuthenticated','show','/:id/all_conditions'];(function(_0x4e22ca,_0x5439e4){var _0xe419dc=function(_0x337fbc){while(--_0x337fbc){_0x4e22ca['push'](_0x4e22ca['shift']());}};_0xe419dc(++_0x5439e4);}(_0x6194,0x74));var _0x4619=function(_0x5e4020,_0x4ec7e4){_0x5e4020=_0x5e4020-0x0;var _0x5ddbc9=_0x6194[_0x5e4020];return _0x5ddbc9;};'use strict';var multer=require('multer');var util=require(_0x4619('0x0'));var path=require(_0x4619('0x1'));var timeout=require(_0x4619('0x2'));var express=require(_0x4619('0x3'));var router=express[_0x4619('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x4619('0x5'));var config=require(_0x4619('0x6'));var controller=require(_0x4619('0x7'));router[_0x4619('0x8')]('/',auth['isAuthenticated'](),controller[_0x4619('0x9')]);router[_0x4619('0x8')](_0x4619('0xa'),auth[_0x4619('0xb')](),controller[_0x4619('0xc')]);router[_0x4619('0x8')](_0x4619('0xd'),auth[_0x4619('0xb')](),controller[_0x4619('0xe')]);router['get'](_0x4619('0xf'),auth[_0x4619('0xb')](),controller['getAnyConditions']);router['get'](_0x4619('0x10'),auth[_0x4619('0xb')](),controller[_0x4619('0x11')]);router[_0x4619('0x12')]('/',auth[_0x4619('0xb')](),controller[_0x4619('0x13')]);router[_0x4619('0x12')](_0x4619('0xd'),auth[_0x4619('0xb')](),controller[_0x4619('0x14')]);router[_0x4619('0x12')](_0x4619('0xf'),auth[_0x4619('0xb')](),controller[_0x4619('0x15')]);router['post'](_0x4619('0x10'),auth[_0x4619('0xb')](),controller['addAction']);router[_0x4619('0x16')](_0x4619('0xa'),auth[_0x4619('0xb')](),controller[_0x4619('0x17')]);router[_0x4619('0x18')](_0x4619('0xa'),auth['isAuthenticated'](),controller['destroy']);module[_0x4619('0x19')]=router;
\ No newline at end of file
+var _0x50ec=['../../config/environment','./trigger.controller','isAuthenticated','index','get','/:id','show','getAllConditions','/:id/any_conditions','getAnyConditions','/:id/actions','getActions','create','post','/:id/all_conditions','addAction','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x45a2b4,_0x4e11ec){var _0x3f7601=function(_0x6be54){while(--_0x6be54){_0x45a2b4['push'](_0x45a2b4['shift']());}};_0x3f7601(++_0x4e11ec);}(_0x50ec,0x12c));var _0xc50e=function(_0x54f811,_0x55224e){_0x54f811=_0x54f811-0x0;var _0x341355=_0x50ec[_0x54f811];return _0x341355;};'use strict';var multer=require(_0xc50e('0x0'));var util=require(_0xc50e('0x1'));var path=require(_0xc50e('0x2'));var timeout=require(_0xc50e('0x3'));var express=require(_0xc50e('0x4'));var router=express[_0xc50e('0x5')]();var auth=require(_0xc50e('0x6'));var interaction=require(_0xc50e('0x7'));var config=require(_0xc50e('0x8'));var controller=require(_0xc50e('0x9'));router['get']('/',auth[_0xc50e('0xa')](),controller[_0xc50e('0xb')]);router[_0xc50e('0xc')](_0xc50e('0xd'),auth[_0xc50e('0xa')](),controller[_0xc50e('0xe')]);router[_0xc50e('0xc')]('/:id/all_conditions',auth[_0xc50e('0xa')](),controller[_0xc50e('0xf')]);router[_0xc50e('0xc')](_0xc50e('0x10'),auth[_0xc50e('0xa')](),controller[_0xc50e('0x11')]);router[_0xc50e('0xc')](_0xc50e('0x12'),auth[_0xc50e('0xa')](),controller[_0xc50e('0x13')]);router['post']('/',auth[_0xc50e('0xa')](),controller[_0xc50e('0x14')]);router[_0xc50e('0x15')](_0xc50e('0x16'),auth['isAuthenticated'](),controller['addAllCondition']);router[_0xc50e('0x15')](_0xc50e('0x10'),auth[_0xc50e('0xa')](),controller['addAnyCondition']);router[_0xc50e('0x15')](_0xc50e('0x12'),auth[_0xc50e('0xa')](),controller[_0xc50e('0x17')]);router[_0xc50e('0x18')](_0xc50e('0xd'),auth[_0xc50e('0xa')](),controller['update']);router[_0xc50e('0x19')]('/:id',auth[_0xc50e('0xa')](),controller[_0xc50e('0x1a')]);module[_0xc50e('0x1b')]=router;
\ No newline at end of file
diff --git a/server/api/trigger/trigger.attributes.js b/server/api/trigger/trigger.attributes.js
index 48c5340..2c94f79 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 _0xa698=['exports','STRING','BOOLEAN','sequelize'];(function(_0x239377,_0xffcf54){var _0x5cd193=function(_0x533605){while(--_0x533605){_0x239377['push'](_0x239377['shift']());}};_0x5cd193(++_0xffcf54);}(_0xa698,0xd7));var _0x8a69=function(_0x52473f,_0x2d5290){_0x52473f=_0x52473f-0x0;var _0x235490=_0xa698[_0x52473f];return _0x235490;};'use strict';var Sequelize=require(_0x8a69('0x0'));module[_0x8a69('0x1')]={'name':{'type':Sequelize[_0x8a69('0x2')]},'channel':{'type':Sequelize[_0x8a69('0x2')]},'description':{'type':Sequelize[_0x8a69('0x2')]},'status':{'type':Sequelize[_0x8a69('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0x8b96=['STRING','BOOLEAN','exports'];(function(_0x577286,_0xf856a3){var _0x3e5b9c=function(_0x326d2d){while(--_0x326d2d){_0x577286['push'](_0x577286['shift']());}};_0x3e5b9c(++_0xf856a3);}(_0x8b96,0x128));var _0x68b9=function(_0x306152,_0x5de087){_0x306152=_0x306152-0x0;var _0x58da64=_0x8b96[_0x306152];return _0x58da64;};'use strict';var Sequelize=require('sequelize');module[_0x68b9('0x0')]={'name':{'type':Sequelize[_0x68b9('0x1')]},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x68b9('0x1')]},'status':{'type':Sequelize[_0x68b9('0x2')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js
index ad22bda..e50fb04 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 _0x2b0a=['filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','get','UserProfileSection','autoAssociation','params','addAllCondition','TriggerAllId','Condition','addAnyCondition','TriggerAnyId','getAllConditions','findOne','keys','getAnyConditions','Action','getActions','html-pdf','eml-format','zip-dir','mustache','util','path','sox','to-csv','ejs','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','update','then','destroy','Triggers','UserProfileResource','error','stack','name','send','index','map','Trigger','type','key','model','query'];(function(_0x2e914,_0x1c7566){var _0x936e45=function(_0x1b22e4){while(--_0x1b22e4){_0x2e914['push'](_0x2e914['shift']());}};_0x936e45(++_0x1c7566);}(_0x2b0a,0x84));var _0xa2b0=function(_0x13d2e6,_0x32eac6){_0x13d2e6=_0x13d2e6-0x0;var _0x12f087=_0x2b0a[_0x13d2e6];return _0x12f087;};'use strict';var pdf=require(_0xa2b0('0x0'));var emlformat=require(_0xa2b0('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xa2b0('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xa2b0('0x3'));var util=require(_0xa2b0('0x4'));var path=require(_0xa2b0('0x5'));var sox=require(_0xa2b0('0x6'));var csv=require(_0xa2b0('0x7'));var ejs=require(_0xa2b0('0x8'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xa2b0('0x9'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xa2b0('0x7'));var querystring=require(_0xa2b0('0xa'));var Papa=require(_0xa2b0('0xb'));var Redis=require(_0xa2b0('0xc'));var authService=require(_0xa2b0('0xd'));var qs=require(_0xa2b0('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa2b0('0xf'));var logger=require(_0xa2b0('0x10'))(_0xa2b0('0x11'));var utils=require('../../config/utils');var config=require(_0xa2b0('0x12'));var db=require(_0xa2b0('0x13'))['db'];function respondWithStatusCode(_0x54456f,_0x42c56f){_0x42c56f=_0x42c56f||0xcc;return function(_0x49ba7b){if(_0x49ba7b){return _0x54456f[_0xa2b0('0x14')](_0x42c56f);}return _0x54456f[_0xa2b0('0x15')](_0x42c56f)[_0xa2b0('0x16')]();};}function respondWithResult(_0x45e956,_0x783375){_0x783375=_0x783375||0xc8;return function(_0x23f677){if(_0x23f677){return _0x45e956[_0xa2b0('0x15')](_0x783375)[_0xa2b0('0x17')](_0x23f677);}};}function respondWithFilteredResult(_0x38ad65,_0x467af1){return function(_0x7d94e7){if(_0x7d94e7){var _0x256fba=_0x7d94e7[_0xa2b0('0x18')],_0x573bf7=_0x467af1['offset'],_0x5ca2dd=_0x467af1[_0xa2b0('0x19')]+_0x467af1['limit'],_0x4e1a66;if(_0x5ca2dd>=_0x256fba){_0x5ca2dd=_0x256fba;_0x4e1a66=0xc8;}else{_0x4e1a66=0xce;}_0x38ad65[_0xa2b0('0x15')](_0x4e1a66);return _0x38ad65[_0xa2b0('0x1a')](_0xa2b0('0x1b'),_0x573bf7+'-'+_0x5ca2dd+'/'+_0x256fba)[_0xa2b0('0x17')](_0x7d94e7);}return null;};}function patchUpdates(_0x110317){return function(_0x255679){try{jsonpatch[_0xa2b0('0x1c')](_0x255679,_0x110317,!![]);}catch(_0x4b9f30){return BPromise[_0xa2b0('0x1d')](_0x4b9f30);}return _0x255679['save']();};}function saveUpdates(_0x2eb66b,_0x2c348f){return function(_0x45d1be){if(_0x45d1be){return _0x45d1be[_0xa2b0('0x1e')](_0x2eb66b)[_0xa2b0('0x1f')](function(_0x365671){return _0x365671;});}return null;};}function removeEntity(_0x581946,_0x158172){return function(_0x278cce){if(_0x278cce){return _0x278cce[_0xa2b0('0x20')]()[_0xa2b0('0x1f')](function(){var _0x4052df=_0x278cce['get']({'plain':!![]});var _0x205c8c=_0xa2b0('0x21');return db[_0xa2b0('0x22')][_0xa2b0('0x20')]({'where':{'type':_0x205c8c,'resourceId':_0x4052df['id']}})[_0xa2b0('0x1f')](function(){return _0x278cce;});})[_0xa2b0('0x1f')](function(){_0x581946[_0xa2b0('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x574e7e,_0x59f691){return function(_0x3b5a1a){if(!_0x3b5a1a){_0x574e7e[_0xa2b0('0x14')](0x194);}return _0x3b5a1a;};}function handleError(_0x546c82,_0xda713a){_0xda713a=_0xda713a||0x1f4;return function(_0x370570){logger[_0xa2b0('0x23')](_0x370570[_0xa2b0('0x24')]);if(_0x370570['name']){delete _0x370570[_0xa2b0('0x25')];}_0x546c82[_0xa2b0('0x15')](_0xda713a)[_0xa2b0('0x26')](_0x370570);};}exports[_0xa2b0('0x27')]=function(_0x1ee72b,_0x31835e){var _0x1e8ac4={},_0x11e0fe={},_0x4b0f6b={'count':0x0,'rows':[]};var _0x5c5d01=_[_0xa2b0('0x28')](db[_0xa2b0('0x29')]['rawAttributes'],function(_0xaa0989){return{'name':_0xaa0989['fieldName'],'type':_0xaa0989[_0xa2b0('0x2a')][_0xa2b0('0x2b')]};});_0x11e0fe[_0xa2b0('0x2c')]=_[_0xa2b0('0x28')](_0x5c5d01,_0xa2b0('0x25'));_0x11e0fe[_0xa2b0('0x2d')]=_['keys'](_0x1ee72b[_0xa2b0('0x2d')]);_0x11e0fe[_0xa2b0('0x2e')]=_[_0xa2b0('0x2f')](_0x11e0fe['model'],_0x11e0fe[_0xa2b0('0x2d')]);_0x1e8ac4[_0xa2b0('0x30')]=_[_0xa2b0('0x2f')](_0x11e0fe[_0xa2b0('0x2c')],qs[_0xa2b0('0x31')](_0x1ee72b[_0xa2b0('0x2d')][_0xa2b0('0x31')]));_0x1e8ac4['attributes']=_0x1e8ac4[_0xa2b0('0x30')][_0xa2b0('0x32')]?_0x1e8ac4[_0xa2b0('0x30')]:_0x11e0fe[_0xa2b0('0x2c')];if(!_0x1ee72b[_0xa2b0('0x2d')][_0xa2b0('0x33')](_0xa2b0('0x34'))){_0x1e8ac4[_0xa2b0('0x35')]=qs[_0xa2b0('0x35')](_0x1ee72b[_0xa2b0('0x2d')][_0xa2b0('0x35')]);_0x1e8ac4[_0xa2b0('0x19')]=qs['offset'](_0x1ee72b[_0xa2b0('0x2d')][_0xa2b0('0x19')]);}_0x1e8ac4[_0xa2b0('0x36')]=qs['sort'](_0x1ee72b[_0xa2b0('0x2d')][_0xa2b0('0x37')]);_0x1e8ac4['where']=qs[_0xa2b0('0x2e')](_[_0xa2b0('0x38')](_0x1ee72b[_0xa2b0('0x2d')],_0x11e0fe[_0xa2b0('0x2e')]));if(_0x1ee72b['query'][_0xa2b0('0x39')]){_0x1e8ac4['where']=_['merge'](_0x1e8ac4[_0xa2b0('0x3a')],{'$or':_[_0xa2b0('0x28')](_0x5c5d01,function(_0x1e1adb){if(_0x1e1adb[_0xa2b0('0x2a')]!==_0xa2b0('0x3b')){var _0x1398f3={};_0x1398f3[_0x1e1adb[_0xa2b0('0x25')]]={'$like':'%'+_0x1ee72b[_0xa2b0('0x2d')][_0xa2b0('0x39')]+'%'};return _0x1398f3;}})});}_0x1e8ac4=_[_0xa2b0('0x3c')]({},_0x1e8ac4,_0x1ee72b[_0xa2b0('0x3d')]);var _0xe17331={'where':_0x1e8ac4[_0xa2b0('0x3a')]};return db[_0xa2b0('0x29')][_0xa2b0('0x18')](_0xe17331)[_0xa2b0('0x1f')](function(_0x1e2c41){_0x4b0f6b[_0xa2b0('0x18')]=_0x1e2c41;if(_0x1ee72b[_0xa2b0('0x2d')][_0xa2b0('0x3e')]){_0x1e8ac4[_0xa2b0('0x3f')]=[{'all':!![]}];}return db[_0xa2b0('0x29')][_0xa2b0('0x40')](_0x1e8ac4);})[_0xa2b0('0x1f')](function(_0x3a8dfe){_0x4b0f6b[_0xa2b0('0x41')]=_0x3a8dfe;return _0x4b0f6b;})[_0xa2b0('0x1f')](respondWithFilteredResult(_0x31835e,_0x1e8ac4))[_0xa2b0('0x42')](handleError(_0x31835e,null));};exports[_0xa2b0('0x43')]=function(_0x4cb041,_0x417ade){var _0x14a79e={'raw':![],'where':{'id':_0x4cb041['params']['id']}},_0x5b8bae={};_0x5b8bae[_0xa2b0('0x2c')]=_['keys'](db[_0xa2b0('0x29')][_0xa2b0('0x44')]);_0x5b8bae[_0xa2b0('0x2d')]=_['keys'](_0x4cb041[_0xa2b0('0x2d')]);_0x5b8bae['filters']=_[_0xa2b0('0x2f')](_0x5b8bae[_0xa2b0('0x2c')],_0x5b8bae['query']);_0x14a79e[_0xa2b0('0x30')]=_[_0xa2b0('0x2f')](_0x5b8bae[_0xa2b0('0x2c')],qs[_0xa2b0('0x31')](_0x4cb041[_0xa2b0('0x2d')][_0xa2b0('0x31')]));_0x14a79e[_0xa2b0('0x30')]=_0x14a79e['attributes'][_0xa2b0('0x32')]?_0x14a79e['attributes']:_0x5b8bae[_0xa2b0('0x2c')];if(_0x4cb041[_0xa2b0('0x2d')]['includeAll']){_0x14a79e[_0xa2b0('0x3f')]=[{'all':!![]}];}_0x14a79e=_[_0xa2b0('0x3c')]({},_0x14a79e,_0x4cb041['options']);return db[_0xa2b0('0x29')][_0xa2b0('0x45')](_0x14a79e)['then'](handleEntityNotFound(_0x417ade,null))[_0xa2b0('0x1f')](respondWithResult(_0x417ade,null))[_0xa2b0('0x42')](handleError(_0x417ade,null));};exports[_0xa2b0('0x46')]=function(_0x9ed59d,_0x568f26){return db[_0xa2b0('0x29')][_0xa2b0('0x46')](_0x9ed59d[_0xa2b0('0x47')],{})[_0xa2b0('0x1f')](function(_0x5828c2){var _0x1d6a7c=_0x9ed59d[_0xa2b0('0x48')]['get']({'plain':!![]});if(!_0x1d6a7c)throw new Error(_0xa2b0('0x49'));if(_0x1d6a7c['role']==='user'){var _0x5c08f1=_0x5828c2[_0xa2b0('0x4a')]({'plain':!![]});var _0x109685=_0xa2b0('0x21');return db[_0xa2b0('0x4b')]['find']({'where':{'name':_0x109685,'userProfileId':_0x1d6a7c['userProfileId']},'raw':!![]})[_0xa2b0('0x1f')](function(_0x105645){if(_0x105645&&_0x105645[_0xa2b0('0x4c')]===0x0){return db[_0xa2b0('0x22')][_0xa2b0('0x46')]({'name':_0x5c08f1[_0xa2b0('0x25')],'resourceId':_0x5c08f1['id'],'type':_0x105645[_0xa2b0('0x25')],'sectionId':_0x105645['id']},{})[_0xa2b0('0x1f')](function(){return _0x5828c2;});}else{return _0x5828c2;}})[_0xa2b0('0x42')](function(_0x1e4570){logger[_0xa2b0('0x23')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1e4570);throw _0x1e4570;});}return _0x5828c2;})[_0xa2b0('0x1f')](respondWithResult(_0x568f26,0xc9))['catch'](handleError(_0x568f26,null));};exports['update']=function(_0xc6a403,_0x132fdb){if(_0xc6a403[_0xa2b0('0x47')]['id']){delete _0xc6a403[_0xa2b0('0x47')]['id'];}return db[_0xa2b0('0x29')][_0xa2b0('0x45')]({'where':{'id':_0xc6a403[_0xa2b0('0x4d')]['id']}})['then'](handleEntityNotFound(_0x132fdb,null))[_0xa2b0('0x1f')](saveUpdates(_0xc6a403[_0xa2b0('0x47')],null))[_0xa2b0('0x1f')](respondWithResult(_0x132fdb,null))[_0xa2b0('0x42')](handleError(_0x132fdb,null));};exports['destroy']=function(_0x5717cf,_0x43ebbc){return db[_0xa2b0('0x29')][_0xa2b0('0x45')]({'where':{'id':_0x5717cf[_0xa2b0('0x4d')]['id']}})[_0xa2b0('0x1f')](handleEntityNotFound(_0x43ebbc,null))[_0xa2b0('0x1f')](removeEntity(_0x43ebbc,null))[_0xa2b0('0x42')](handleError(_0x43ebbc,null));};exports[_0xa2b0('0x4e')]=function(_0x34a126,_0x3e4cce,_0x3c9f90){if(_0x34a126['body']['id']){delete _0x34a126['body']['id'];}return db[_0xa2b0('0x29')][_0xa2b0('0x45')]({'where':{'id':_0x34a126[_0xa2b0('0x4d')]['id']}})[_0xa2b0('0x1f')](handleEntityNotFound(_0x3e4cce,null))[_0xa2b0('0x1f')](function(_0x2fd91f){if(_0x2fd91f){_0x34a126[_0xa2b0('0x47')][_0xa2b0('0x4f')]=_0x2fd91f['id'];return db[_0xa2b0('0x50')]['create'](_0x34a126[_0xa2b0('0x47')]);}})[_0xa2b0('0x1f')](respondWithResult(_0x3e4cce,null))['catch'](handleError(_0x3e4cce,null));};exports[_0xa2b0('0x51')]=function(_0x2386db,_0x36586f,_0x4aada0){if(_0x2386db[_0xa2b0('0x47')]['id']){delete _0x2386db[_0xa2b0('0x47')]['id'];}return db['Trigger'][_0xa2b0('0x45')]({'where':{'id':_0x2386db[_0xa2b0('0x4d')]['id']}})[_0xa2b0('0x1f')](handleEntityNotFound(_0x36586f,null))[_0xa2b0('0x1f')](function(_0x588631){if(_0x588631){_0x2386db[_0xa2b0('0x47')][_0xa2b0('0x52')]=_0x588631['id'];return db[_0xa2b0('0x50')][_0xa2b0('0x46')](_0x2386db[_0xa2b0('0x47')]);}})[_0xa2b0('0x1f')](respondWithResult(_0x36586f,null))[_0xa2b0('0x42')](handleError(_0x36586f,null));};exports[_0xa2b0('0x53')]=function(_0x128180,_0x583504,_0x3fe926){var _0x53bc3f={};var _0x477ed8={};var _0x1671aa;var _0x561a14;return db[_0xa2b0('0x29')][_0xa2b0('0x54')]({'where':{'id':_0x128180[_0xa2b0('0x4d')]['id']}})[_0xa2b0('0x1f')](handleEntityNotFound(_0x583504,null))[_0xa2b0('0x1f')](function(_0x486531){if(_0x486531){_0x1671aa=_0x486531;_0x477ed8[_0xa2b0('0x2c')]=_[_0xa2b0('0x55')](db[_0xa2b0('0x50')][_0xa2b0('0x44')]);_0x477ed8[_0xa2b0('0x2d')]=_['keys'](_0x128180[_0xa2b0('0x2d')]);_0x477ed8[_0xa2b0('0x2e')]=_[_0xa2b0('0x2f')](_0x477ed8[_0xa2b0('0x2c')],_0x477ed8[_0xa2b0('0x2d')]);_0x53bc3f[_0xa2b0('0x30')]=_[_0xa2b0('0x2f')](_0x477ed8[_0xa2b0('0x2c')],qs[_0xa2b0('0x31')](_0x128180['query'][_0xa2b0('0x31')]));_0x53bc3f[_0xa2b0('0x30')]=_0x53bc3f['attributes']['length']?_0x53bc3f[_0xa2b0('0x30')]:_0x477ed8['model'];_0x53bc3f[_0xa2b0('0x36')]=qs[_0xa2b0('0x37')](_0x128180[_0xa2b0('0x2d')][_0xa2b0('0x37')]);_0x53bc3f[_0xa2b0('0x3a')]=qs[_0xa2b0('0x2e')](_[_0xa2b0('0x38')](_0x128180[_0xa2b0('0x2d')],_0x477ed8[_0xa2b0('0x2e')]));if(_0x128180[_0xa2b0('0x2d')][_0xa2b0('0x39')]){_0x53bc3f['where']=_[_0xa2b0('0x3c')](_0x53bc3f[_0xa2b0('0x3a')],{'$or':_['map'](_0x53bc3f[_0xa2b0('0x30')],function(_0x412ecf){var _0x3550d5={};_0x3550d5[_0x412ecf]={'$like':'%'+_0x128180[_0xa2b0('0x2d')][_0xa2b0('0x39')]+'%'};return _0x3550d5;})});}_0x53bc3f=_['merge']({},_0x53bc3f,_0x128180[_0xa2b0('0x3d')]);return _0x1671aa[_0xa2b0('0x53')](_0x53bc3f);}})[_0xa2b0('0x1f')](function(_0x4c712c){if(_0x4c712c){_0x561a14=_0x4c712c['length'];if(!_0x128180['query'][_0xa2b0('0x33')](_0xa2b0('0x34'))){_0x53bc3f['limit']=qs['limit'](_0x128180[_0xa2b0('0x2d')][_0xa2b0('0x35')]);_0x53bc3f['offset']=qs[_0xa2b0('0x19')](_0x128180[_0xa2b0('0x2d')][_0xa2b0('0x19')]);}return _0x1671aa[_0xa2b0('0x53')](_0x53bc3f);}})['then'](function(_0x426bdf){if(_0x426bdf){return _0x426bdf?{'count':_0x561a14,'rows':_0x426bdf}:null;}})['then'](respondWithResult(_0x583504,null))[_0xa2b0('0x42')](handleError(_0x583504,null));};exports[_0xa2b0('0x56')]=function(_0x3e96b3,_0x292551,_0x4dfc8b){var _0x23fa1b={};var _0x5a4b80={};var _0x5845ad;var _0x5f0670;return db[_0xa2b0('0x29')][_0xa2b0('0x54')]({'where':{'id':_0x3e96b3[_0xa2b0('0x4d')]['id']}})[_0xa2b0('0x1f')](handleEntityNotFound(_0x292551,null))[_0xa2b0('0x1f')](function(_0x1e29dc){if(_0x1e29dc){_0x5845ad=_0x1e29dc;_0x5a4b80[_0xa2b0('0x2c')]=_['keys'](db[_0xa2b0('0x50')][_0xa2b0('0x44')]);_0x5a4b80[_0xa2b0('0x2d')]=_['keys'](_0x3e96b3[_0xa2b0('0x2d')]);_0x5a4b80[_0xa2b0('0x2e')]=_[_0xa2b0('0x2f')](_0x5a4b80[_0xa2b0('0x2c')],_0x5a4b80[_0xa2b0('0x2d')]);_0x23fa1b['attributes']=_['intersection'](_0x5a4b80[_0xa2b0('0x2c')],qs[_0xa2b0('0x31')](_0x3e96b3[_0xa2b0('0x2d')][_0xa2b0('0x31')]));_0x23fa1b[_0xa2b0('0x30')]=_0x23fa1b[_0xa2b0('0x30')][_0xa2b0('0x32')]?_0x23fa1b[_0xa2b0('0x30')]:_0x5a4b80[_0xa2b0('0x2c')];_0x23fa1b[_0xa2b0('0x36')]=qs[_0xa2b0('0x37')](_0x3e96b3[_0xa2b0('0x2d')][_0xa2b0('0x37')]);_0x23fa1b[_0xa2b0('0x3a')]=qs['filters'](_[_0xa2b0('0x38')](_0x3e96b3[_0xa2b0('0x2d')],_0x5a4b80[_0xa2b0('0x2e')]));if(_0x3e96b3[_0xa2b0('0x2d')][_0xa2b0('0x39')]){_0x23fa1b[_0xa2b0('0x3a')]=_['merge'](_0x23fa1b[_0xa2b0('0x3a')],{'$or':_[_0xa2b0('0x28')](_0x23fa1b[_0xa2b0('0x30')],function(_0x542081){var _0x593452={};_0x593452[_0x542081]={'$like':'%'+_0x3e96b3[_0xa2b0('0x2d')]['filter']+'%'};return _0x593452;})});}_0x23fa1b=_[_0xa2b0('0x3c')]({},_0x23fa1b,_0x3e96b3[_0xa2b0('0x3d')]);return _0x5845ad['getAnyConditions'](_0x23fa1b);}})[_0xa2b0('0x1f')](function(_0x1bf2e8){if(_0x1bf2e8){_0x5f0670=_0x1bf2e8[_0xa2b0('0x32')];if(!_0x3e96b3[_0xa2b0('0x2d')][_0xa2b0('0x33')]('nolimit')){_0x23fa1b[_0xa2b0('0x35')]=qs[_0xa2b0('0x35')](_0x3e96b3[_0xa2b0('0x2d')][_0xa2b0('0x35')]);_0x23fa1b[_0xa2b0('0x19')]=qs[_0xa2b0('0x19')](_0x3e96b3['query'][_0xa2b0('0x19')]);}return _0x5845ad['getAnyConditions'](_0x23fa1b);}})[_0xa2b0('0x1f')](function(_0x27ffeb){if(_0x27ffeb){return _0x27ffeb?{'count':_0x5f0670,'rows':_0x27ffeb}:null;}})[_0xa2b0('0x1f')](respondWithResult(_0x292551,null))[_0xa2b0('0x42')](handleError(_0x292551,null));};exports['addAction']=function(_0x3cfafc,_0x148a59,_0x4fbe03){if(_0x3cfafc[_0xa2b0('0x47')]['id']){delete _0x3cfafc['body']['id'];}return db['Trigger'][_0xa2b0('0x45')]({'where':{'id':_0x3cfafc[_0xa2b0('0x4d')]['id']}})['then'](handleEntityNotFound(_0x148a59,null))[_0xa2b0('0x1f')](function(_0x551a65){if(_0x551a65){_0x3cfafc[_0xa2b0('0x47')]['TriggerId']=_0x551a65['id'];return db[_0xa2b0('0x57')][_0xa2b0('0x46')](_0x3cfafc[_0xa2b0('0x47')]);}})[_0xa2b0('0x1f')](respondWithResult(_0x148a59,null))[_0xa2b0('0x42')](handleError(_0x148a59,null));};exports[_0xa2b0('0x58')]=function(_0x3572e5,_0x4e49fe,_0xc1f330){var _0x4a4fa3={};var _0xbdb8d7={};var _0x198f8c;var _0x472655;return db[_0xa2b0('0x29')][_0xa2b0('0x54')]({'where':{'id':_0x3572e5[_0xa2b0('0x4d')]['id']}})[_0xa2b0('0x1f')](handleEntityNotFound(_0x4e49fe,null))[_0xa2b0('0x1f')](function(_0x53aebc){if(_0x53aebc){_0x198f8c=_0x53aebc;_0xbdb8d7[_0xa2b0('0x2c')]=_[_0xa2b0('0x55')](db[_0xa2b0('0x57')][_0xa2b0('0x44')]);_0xbdb8d7['query']=_[_0xa2b0('0x55')](_0x3572e5[_0xa2b0('0x2d')]);_0xbdb8d7['filters']=_[_0xa2b0('0x2f')](_0xbdb8d7[_0xa2b0('0x2c')],_0xbdb8d7['query']);_0x4a4fa3[_0xa2b0('0x30')]=_[_0xa2b0('0x2f')](_0xbdb8d7[_0xa2b0('0x2c')],qs[_0xa2b0('0x31')](_0x3572e5['query'][_0xa2b0('0x31')]));_0x4a4fa3['attributes']=_0x4a4fa3[_0xa2b0('0x30')][_0xa2b0('0x32')]?_0x4a4fa3[_0xa2b0('0x30')]:_0xbdb8d7['model'];_0x4a4fa3[_0xa2b0('0x36')]=qs[_0xa2b0('0x37')](_0x3572e5['query'][_0xa2b0('0x37')]);_0x4a4fa3[_0xa2b0('0x3a')]=qs['filters'](_['pick'](_0x3572e5['query'],_0xbdb8d7['filters']));if(_0x3572e5['query'][_0xa2b0('0x39')]){_0x4a4fa3['where']=_[_0xa2b0('0x3c')](_0x4a4fa3[_0xa2b0('0x3a')],{'$or':_[_0xa2b0('0x28')](_0x4a4fa3[_0xa2b0('0x30')],function(_0x522611){var _0x1ba582={};_0x1ba582[_0x522611]={'$like':'%'+_0x3572e5[_0xa2b0('0x2d')][_0xa2b0('0x39')]+'%'};return _0x1ba582;})});}_0x4a4fa3=_[_0xa2b0('0x3c')]({},_0x4a4fa3,_0x3572e5[_0xa2b0('0x3d')]);return _0x198f8c['getActions'](_0x4a4fa3);}})['then'](function(_0x439280){if(_0x439280){_0x472655=_0x439280[_0xa2b0('0x32')];if(!_0x3572e5['query'][_0xa2b0('0x33')](_0xa2b0('0x34'))){_0x4a4fa3[_0xa2b0('0x35')]=qs[_0xa2b0('0x35')](_0x3572e5[_0xa2b0('0x2d')]['limit']);_0x4a4fa3[_0xa2b0('0x19')]=qs[_0xa2b0('0x19')](_0x3572e5['query']['offset']);}return _0x198f8c[_0xa2b0('0x58')](_0x4a4fa3);}})[_0xa2b0('0x1f')](function(_0xa5ad8b){if(_0xa5ad8b){return _0xa5ad8b?{'count':_0x472655,'rows':_0xa5ad8b}:null;}})[_0xa2b0('0x1f')](respondWithResult(_0x4e49fe,null))[_0xa2b0('0x42')](handleError(_0x4e49fe,null));};
\ No newline at end of file
+var _0x368b=['options','includeAll','include','findAll','rows','catch','params','find','create','user','UserProfileSection','error','body','addAllCondition','TriggerAllId','Condition','addAnyCondition','getAllConditions','findOne','filter','limit','getAnyConditions','addAction','TriggerId','Action','getActions','html-pdf','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','get','Triggers','UserProfileResource','stack','name','send','map','Trigger','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','VIRTUAL'];(function(_0x5cbf0e,_0x4cd140){var _0x1c76f8=function(_0xcc9be4){while(--_0xcc9be4){_0x5cbf0e['push'](_0x5cbf0e['shift']());}};_0x1c76f8(++_0x4cd140);}(_0x368b,0x76));var _0xb368=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x368b[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0xb368('0x0'));var emlformat=require(_0xb368('0x1'));var rimraf=require(_0xb368('0x2'));var zipdir=require(_0xb368('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xb368('0x4'));var moment=require('moment');var BPromise=require(_0xb368('0x5'));var Mustache=require(_0xb368('0x6'));var util=require(_0xb368('0x7'));var path=require(_0xb368('0x8'));var sox=require(_0xb368('0x9'));var csv=require(_0xb368('0xa'));var ejs=require(_0xb368('0xb'));var fs=require('fs');var _=require(_0xb368('0xc'));var squel=require(_0xb368('0xd'));var crypto=require('crypto');var jsforce=require(_0xb368('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xb368('0xa'));var querystring=require(_0xb368('0xf'));var Papa=require(_0xb368('0x10'));var Redis=require(_0xb368('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xb368('0x12'));var as=require(_0xb368('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb368('0x14'))(_0xb368('0x15'));var utils=require(_0xb368('0x16'));var config=require(_0xb368('0x17'));var db=require(_0xb368('0x18'))['db'];function respondWithStatusCode(_0x26e49a,_0x3146b4){_0x3146b4=_0x3146b4||0xcc;return function(_0x2a9eb2){if(_0x2a9eb2){return _0x26e49a[_0xb368('0x19')](_0x3146b4);}return _0x26e49a['status'](_0x3146b4)[_0xb368('0x1a')]();};}function respondWithResult(_0x59093d,_0xe04090){_0xe04090=_0xe04090||0xc8;return function(_0x3c4a5e){if(_0x3c4a5e){return _0x59093d[_0xb368('0x1b')](_0xe04090)['json'](_0x3c4a5e);}};}function respondWithFilteredResult(_0x325400,_0x2f74ad){return function(_0x4d451c){if(_0x4d451c){var _0x566e7a=_0x4d451c[_0xb368('0x1c')],_0x4311cf=_0x2f74ad[_0xb368('0x1d')],_0x1aeb80=_0x2f74ad[_0xb368('0x1d')]+_0x2f74ad['limit'],_0x21c7f1;if(_0x1aeb80>=_0x566e7a){_0x1aeb80=_0x566e7a;_0x21c7f1=0xc8;}else{_0x21c7f1=0xce;}_0x325400[_0xb368('0x1b')](_0x21c7f1);return _0x325400[_0xb368('0x1e')](_0xb368('0x1f'),_0x4311cf+'-'+_0x1aeb80+'/'+_0x566e7a)[_0xb368('0x20')](_0x4d451c);}return null;};}function patchUpdates(_0x122bb4){return function(_0x4302d1){try{jsonpatch[_0xb368('0x21')](_0x4302d1,_0x122bb4,!![]);}catch(_0x4554f5){return BPromise[_0xb368('0x22')](_0x4554f5);}return _0x4302d1[_0xb368('0x23')]();};}function saveUpdates(_0x284e68,_0x14ddc2){return function(_0x107a67){if(_0x107a67){return _0x107a67[_0xb368('0x24')](_0x284e68)[_0xb368('0x25')](function(_0x135ca5){return _0x135ca5;});}return null;};}function removeEntity(_0x1d1bdc,_0x27f774){return function(_0x5786b9){if(_0x5786b9){return _0x5786b9[_0xb368('0x26')]()[_0xb368('0x25')](function(){var _0x3a45ca=_0x5786b9[_0xb368('0x27')]({'plain':!![]});var _0x2ee5fe=_0xb368('0x28');return db[_0xb368('0x29')][_0xb368('0x26')]({'where':{'type':_0x2ee5fe,'resourceId':_0x3a45ca['id']}})['then'](function(){return _0x5786b9;});})[_0xb368('0x25')](function(){_0x1d1bdc['status'](0xcc)[_0xb368('0x1a')]();});}};}function handleEntityNotFound(_0x129f06,_0x4df205){return function(_0x422484){if(!_0x422484){_0x129f06[_0xb368('0x19')](0x194);}return _0x422484;};}function handleError(_0x28a839,_0x2612f7){_0x2612f7=_0x2612f7||0x1f4;return function(_0x4ccd69){logger['error'](_0x4ccd69[_0xb368('0x2a')]);if(_0x4ccd69[_0xb368('0x2b')]){delete _0x4ccd69[_0xb368('0x2b')];}_0x28a839['status'](_0x2612f7)[_0xb368('0x2c')](_0x4ccd69);};}exports['index']=function(_0x5a7692,_0x507969){var _0x5ece04={},_0x1fd79e={},_0x14f875={'count':0x0,'rows':[]};var _0x24409e=_[_0xb368('0x2d')](db[_0xb368('0x2e')][_0xb368('0x2f')],function(_0x463f21){return{'name':_0x463f21['fieldName'],'type':_0x463f21['type'][_0xb368('0x30')]};});_0x1fd79e[_0xb368('0x31')]=_[_0xb368('0x2d')](_0x24409e,_0xb368('0x2b'));_0x1fd79e[_0xb368('0x32')]=_[_0xb368('0x33')](_0x5a7692[_0xb368('0x32')]);_0x1fd79e[_0xb368('0x34')]=_[_0xb368('0x35')](_0x1fd79e[_0xb368('0x31')],_0x1fd79e[_0xb368('0x32')]);_0x5ece04[_0xb368('0x36')]=_[_0xb368('0x35')](_0x1fd79e[_0xb368('0x31')],qs[_0xb368('0x37')](_0x5a7692[_0xb368('0x32')]['fields']));_0x5ece04[_0xb368('0x36')]=_0x5ece04[_0xb368('0x36')][_0xb368('0x38')]?_0x5ece04[_0xb368('0x36')]:_0x1fd79e[_0xb368('0x31')];if(!_0x5a7692[_0xb368('0x32')][_0xb368('0x39')](_0xb368('0x3a'))){_0x5ece04['limit']=qs['limit'](_0x5a7692['query']['limit']);_0x5ece04['offset']=qs['offset'](_0x5a7692[_0xb368('0x32')][_0xb368('0x1d')]);}_0x5ece04[_0xb368('0x3b')]=qs[_0xb368('0x3c')](_0x5a7692[_0xb368('0x32')][_0xb368('0x3c')]);_0x5ece04[_0xb368('0x3d')]=qs[_0xb368('0x34')](_[_0xb368('0x3e')](_0x5a7692['query'],_0x1fd79e[_0xb368('0x34')]));if(_0x5a7692[_0xb368('0x32')]['filter']){_0x5ece04[_0xb368('0x3d')]=_[_0xb368('0x3f')](_0x5ece04[_0xb368('0x3d')],{'$or':_[_0xb368('0x2d')](_0x24409e,function(_0x2eb3e5){if(_0x2eb3e5[_0xb368('0x40')]!==_0xb368('0x41')){var _0xde603e={};_0xde603e[_0x2eb3e5[_0xb368('0x2b')]]={'$like':'%'+_0x5a7692[_0xb368('0x32')]['filter']+'%'};return _0xde603e;}})});}_0x5ece04=_[_0xb368('0x3f')]({},_0x5ece04,_0x5a7692[_0xb368('0x42')]);var _0x5f41b9={'where':_0x5ece04['where']};return db['Trigger'][_0xb368('0x1c')](_0x5f41b9)[_0xb368('0x25')](function(_0x4ef814){_0x14f875[_0xb368('0x1c')]=_0x4ef814;if(_0x5a7692[_0xb368('0x32')][_0xb368('0x43')]){_0x5ece04[_0xb368('0x44')]=[{'all':!![]}];}return db['Trigger'][_0xb368('0x45')](_0x5ece04);})[_0xb368('0x25')](function(_0x146b86){_0x14f875[_0xb368('0x46')]=_0x146b86;return _0x14f875;})[_0xb368('0x25')](respondWithFilteredResult(_0x507969,_0x5ece04))[_0xb368('0x47')](handleError(_0x507969,null));};exports['show']=function(_0x472d04,_0x2af557){var _0x29b2a5={'raw':![],'where':{'id':_0x472d04[_0xb368('0x48')]['id']}},_0x148764={};_0x148764['model']=_[_0xb368('0x33')](db[_0xb368('0x2e')][_0xb368('0x2f')]);_0x148764['query']=_['keys'](_0x472d04[_0xb368('0x32')]);_0x148764[_0xb368('0x34')]=_['intersection'](_0x148764['model'],_0x148764[_0xb368('0x32')]);_0x29b2a5[_0xb368('0x36')]=_[_0xb368('0x35')](_0x148764[_0xb368('0x31')],qs[_0xb368('0x37')](_0x472d04['query'][_0xb368('0x37')]));_0x29b2a5['attributes']=_0x29b2a5[_0xb368('0x36')][_0xb368('0x38')]?_0x29b2a5[_0xb368('0x36')]:_0x148764[_0xb368('0x31')];if(_0x472d04[_0xb368('0x32')][_0xb368('0x43')]){_0x29b2a5[_0xb368('0x44')]=[{'all':!![]}];}_0x29b2a5=_[_0xb368('0x3f')]({},_0x29b2a5,_0x472d04['options']);return db[_0xb368('0x2e')][_0xb368('0x49')](_0x29b2a5)[_0xb368('0x25')](handleEntityNotFound(_0x2af557,null))[_0xb368('0x25')](respondWithResult(_0x2af557,null))[_0xb368('0x47')](handleError(_0x2af557,null));};exports['create']=function(_0x2c6fb5,_0x3ce427){return db[_0xb368('0x2e')][_0xb368('0x4a')](_0x2c6fb5['body'],{})[_0xb368('0x25')](function(_0x181b0b){var _0x128420=_0x2c6fb5[_0xb368('0x4b')][_0xb368('0x27')]({'plain':!![]});if(!_0x128420)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x128420['role']===_0xb368('0x4b')){var _0x1b0e4a=_0x181b0b[_0xb368('0x27')]({'plain':!![]});var _0x384b70=_0xb368('0x28');return db[_0xb368('0x4c')][_0xb368('0x49')]({'where':{'name':_0x384b70,'userProfileId':_0x128420['userProfileId']},'raw':!![]})['then'](function(_0x359022){if(_0x359022&&_0x359022['autoAssociation']===0x0){return db[_0xb368('0x29')]['create']({'name':_0x1b0e4a['name'],'resourceId':_0x1b0e4a['id'],'type':_0x359022[_0xb368('0x2b')],'sectionId':_0x359022['id']},{})[_0xb368('0x25')](function(){return _0x181b0b;});}else{return _0x181b0b;}})['catch'](function(_0x44ec8e){logger[_0xb368('0x4d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x44ec8e);throw _0x44ec8e;});}return _0x181b0b;})['then'](respondWithResult(_0x3ce427,0xc9))['catch'](handleError(_0x3ce427,null));};exports[_0xb368('0x24')]=function(_0x742f77,_0x59c4f5){if(_0x742f77[_0xb368('0x4e')]['id']){delete _0x742f77['body']['id'];}return db['Trigger'][_0xb368('0x49')]({'where':{'id':_0x742f77['params']['id']}})[_0xb368('0x25')](handleEntityNotFound(_0x59c4f5,null))['then'](saveUpdates(_0x742f77[_0xb368('0x4e')],null))[_0xb368('0x25')](respondWithResult(_0x59c4f5,null))[_0xb368('0x47')](handleError(_0x59c4f5,null));};exports[_0xb368('0x26')]=function(_0x248162,_0xb0fb18){return db[_0xb368('0x2e')]['find']({'where':{'id':_0x248162['params']['id']}})[_0xb368('0x25')](handleEntityNotFound(_0xb0fb18,null))[_0xb368('0x25')](removeEntity(_0xb0fb18,null))['catch'](handleError(_0xb0fb18,null));};exports[_0xb368('0x4f')]=function(_0x373652,_0x226cb7,_0x39883d){if(_0x373652['body']['id']){delete _0x373652[_0xb368('0x4e')]['id'];}return db['Trigger'][_0xb368('0x49')]({'where':{'id':_0x373652[_0xb368('0x48')]['id']}})[_0xb368('0x25')](handleEntityNotFound(_0x226cb7,null))[_0xb368('0x25')](function(_0x98b356){if(_0x98b356){_0x373652[_0xb368('0x4e')][_0xb368('0x50')]=_0x98b356['id'];return db[_0xb368('0x51')][_0xb368('0x4a')](_0x373652['body']);}})[_0xb368('0x25')](respondWithResult(_0x226cb7,null))[_0xb368('0x47')](handleError(_0x226cb7,null));};exports[_0xb368('0x52')]=function(_0x380a33,_0x412024,_0x4f4cff){if(_0x380a33['body']['id']){delete _0x380a33[_0xb368('0x4e')]['id'];}return db[_0xb368('0x2e')][_0xb368('0x49')]({'where':{'id':_0x380a33['params']['id']}})['then'](handleEntityNotFound(_0x412024,null))[_0xb368('0x25')](function(_0x2a202f){if(_0x2a202f){_0x380a33[_0xb368('0x4e')]['TriggerAnyId']=_0x2a202f['id'];return db[_0xb368('0x51')][_0xb368('0x4a')](_0x380a33['body']);}})[_0xb368('0x25')](respondWithResult(_0x412024,null))[_0xb368('0x47')](handleError(_0x412024,null));};exports[_0xb368('0x53')]=function(_0xfcdef1,_0x456941,_0xfeb9d8){var _0x9bb74e={};var _0xc03c5c={};var _0x5e8c3d;var _0x3e4aff;return db[_0xb368('0x2e')][_0xb368('0x54')]({'where':{'id':_0xfcdef1[_0xb368('0x48')]['id']}})[_0xb368('0x25')](handleEntityNotFound(_0x456941,null))[_0xb368('0x25')](function(_0x494bdd){if(_0x494bdd){_0x5e8c3d=_0x494bdd;_0xc03c5c[_0xb368('0x31')]=_[_0xb368('0x33')](db[_0xb368('0x51')]['rawAttributes']);_0xc03c5c[_0xb368('0x32')]=_[_0xb368('0x33')](_0xfcdef1[_0xb368('0x32')]);_0xc03c5c[_0xb368('0x34')]=_[_0xb368('0x35')](_0xc03c5c[_0xb368('0x31')],_0xc03c5c[_0xb368('0x32')]);_0x9bb74e['attributes']=_[_0xb368('0x35')](_0xc03c5c[_0xb368('0x31')],qs[_0xb368('0x37')](_0xfcdef1[_0xb368('0x32')][_0xb368('0x37')]));_0x9bb74e[_0xb368('0x36')]=_0x9bb74e['attributes']['length']?_0x9bb74e['attributes']:_0xc03c5c[_0xb368('0x31')];_0x9bb74e[_0xb368('0x3b')]=qs[_0xb368('0x3c')](_0xfcdef1[_0xb368('0x32')]['sort']);_0x9bb74e[_0xb368('0x3d')]=qs[_0xb368('0x34')](_['pick'](_0xfcdef1[_0xb368('0x32')],_0xc03c5c['filters']));if(_0xfcdef1[_0xb368('0x32')][_0xb368('0x55')]){_0x9bb74e[_0xb368('0x3d')]=_[_0xb368('0x3f')](_0x9bb74e[_0xb368('0x3d')],{'$or':_[_0xb368('0x2d')](_0x9bb74e[_0xb368('0x36')],function(_0x31eb28){var _0x55d3cb={};_0x55d3cb[_0x31eb28]={'$like':'%'+_0xfcdef1[_0xb368('0x32')][_0xb368('0x55')]+'%'};return _0x55d3cb;})});}_0x9bb74e=_[_0xb368('0x3f')]({},_0x9bb74e,_0xfcdef1['options']);return _0x5e8c3d['getAllConditions'](_0x9bb74e);}})[_0xb368('0x25')](function(_0x38770c){if(_0x38770c){_0x3e4aff=_0x38770c[_0xb368('0x38')];if(!_0xfcdef1[_0xb368('0x32')][_0xb368('0x39')](_0xb368('0x3a'))){_0x9bb74e['limit']=qs[_0xb368('0x56')](_0xfcdef1[_0xb368('0x32')][_0xb368('0x56')]);_0x9bb74e['offset']=qs[_0xb368('0x1d')](_0xfcdef1[_0xb368('0x32')][_0xb368('0x1d')]);}return _0x5e8c3d['getAllConditions'](_0x9bb74e);}})[_0xb368('0x25')](function(_0x34e78f){if(_0x34e78f){return _0x34e78f?{'count':_0x3e4aff,'rows':_0x34e78f}:null;}})[_0xb368('0x25')](respondWithResult(_0x456941,null))['catch'](handleError(_0x456941,null));};exports['getAnyConditions']=function(_0x55b4bc,_0x300025,_0x57b07a){var _0x6db9e7={};var _0x12a9b8={};var _0x1752fb;var _0x71bada;return db[_0xb368('0x2e')]['findOne']({'where':{'id':_0x55b4bc[_0xb368('0x48')]['id']}})[_0xb368('0x25')](handleEntityNotFound(_0x300025,null))[_0xb368('0x25')](function(_0x9e2cb4){if(_0x9e2cb4){_0x1752fb=_0x9e2cb4;_0x12a9b8[_0xb368('0x31')]=_[_0xb368('0x33')](db[_0xb368('0x51')]['rawAttributes']);_0x12a9b8[_0xb368('0x32')]=_[_0xb368('0x33')](_0x55b4bc[_0xb368('0x32')]);_0x12a9b8[_0xb368('0x34')]=_['intersection'](_0x12a9b8['model'],_0x12a9b8['query']);_0x6db9e7['attributes']=_[_0xb368('0x35')](_0x12a9b8[_0xb368('0x31')],qs[_0xb368('0x37')](_0x55b4bc[_0xb368('0x32')][_0xb368('0x37')]));_0x6db9e7[_0xb368('0x36')]=_0x6db9e7[_0xb368('0x36')][_0xb368('0x38')]?_0x6db9e7['attributes']:_0x12a9b8[_0xb368('0x31')];_0x6db9e7[_0xb368('0x3b')]=qs[_0xb368('0x3c')](_0x55b4bc['query'][_0xb368('0x3c')]);_0x6db9e7[_0xb368('0x3d')]=qs[_0xb368('0x34')](_['pick'](_0x55b4bc['query'],_0x12a9b8[_0xb368('0x34')]));if(_0x55b4bc[_0xb368('0x32')][_0xb368('0x55')]){_0x6db9e7['where']=_[_0xb368('0x3f')](_0x6db9e7[_0xb368('0x3d')],{'$or':_[_0xb368('0x2d')](_0x6db9e7[_0xb368('0x36')],function(_0x289899){var _0x5f0e2a={};_0x5f0e2a[_0x289899]={'$like':'%'+_0x55b4bc[_0xb368('0x32')][_0xb368('0x55')]+'%'};return _0x5f0e2a;})});}_0x6db9e7=_[_0xb368('0x3f')]({},_0x6db9e7,_0x55b4bc[_0xb368('0x42')]);return _0x1752fb[_0xb368('0x57')](_0x6db9e7);}})['then'](function(_0x2f2cc7){if(_0x2f2cc7){_0x71bada=_0x2f2cc7[_0xb368('0x38')];if(!_0x55b4bc[_0xb368('0x32')][_0xb368('0x39')](_0xb368('0x3a'))){_0x6db9e7['limit']=qs[_0xb368('0x56')](_0x55b4bc[_0xb368('0x32')][_0xb368('0x56')]);_0x6db9e7['offset']=qs[_0xb368('0x1d')](_0x55b4bc['query']['offset']);}return _0x1752fb[_0xb368('0x57')](_0x6db9e7);}})[_0xb368('0x25')](function(_0x1dd6e8){if(_0x1dd6e8){return _0x1dd6e8?{'count':_0x71bada,'rows':_0x1dd6e8}:null;}})[_0xb368('0x25')](respondWithResult(_0x300025,null))[_0xb368('0x47')](handleError(_0x300025,null));};exports[_0xb368('0x58')]=function(_0x139c48,_0x5a325e,_0x4c2b95){if(_0x139c48[_0xb368('0x4e')]['id']){delete _0x139c48[_0xb368('0x4e')]['id'];}return db['Trigger'][_0xb368('0x49')]({'where':{'id':_0x139c48[_0xb368('0x48')]['id']}})[_0xb368('0x25')](handleEntityNotFound(_0x5a325e,null))[_0xb368('0x25')](function(_0x6a8469){if(_0x6a8469){_0x139c48['body'][_0xb368('0x59')]=_0x6a8469['id'];return db[_0xb368('0x5a')]['create'](_0x139c48[_0xb368('0x4e')]);}})['then'](respondWithResult(_0x5a325e,null))[_0xb368('0x47')](handleError(_0x5a325e,null));};exports[_0xb368('0x5b')]=function(_0x56a7c3,_0x4cc446,_0x261fe4){var _0x109942={};var _0x40c6b8={};var _0x57bc5c;var _0x1e5f8f;return db['Trigger'][_0xb368('0x54')]({'where':{'id':_0x56a7c3['params']['id']}})[_0xb368('0x25')](handleEntityNotFound(_0x4cc446,null))[_0xb368('0x25')](function(_0x4bcc84){if(_0x4bcc84){_0x57bc5c=_0x4bcc84;_0x40c6b8['model']=_[_0xb368('0x33')](db[_0xb368('0x5a')]['rawAttributes']);_0x40c6b8['query']=_[_0xb368('0x33')](_0x56a7c3[_0xb368('0x32')]);_0x40c6b8[_0xb368('0x34')]=_[_0xb368('0x35')](_0x40c6b8[_0xb368('0x31')],_0x40c6b8[_0xb368('0x32')]);_0x109942[_0xb368('0x36')]=_[_0xb368('0x35')](_0x40c6b8[_0xb368('0x31')],qs['fields'](_0x56a7c3[_0xb368('0x32')][_0xb368('0x37')]));_0x109942[_0xb368('0x36')]=_0x109942['attributes'][_0xb368('0x38')]?_0x109942[_0xb368('0x36')]:_0x40c6b8['model'];_0x109942[_0xb368('0x3b')]=qs['sort'](_0x56a7c3['query'][_0xb368('0x3c')]);_0x109942[_0xb368('0x3d')]=qs[_0xb368('0x34')](_[_0xb368('0x3e')](_0x56a7c3[_0xb368('0x32')],_0x40c6b8[_0xb368('0x34')]));if(_0x56a7c3['query']['filter']){_0x109942[_0xb368('0x3d')]=_[_0xb368('0x3f')](_0x109942[_0xb368('0x3d')],{'$or':_['map'](_0x109942[_0xb368('0x36')],function(_0x586305){var _0x351126={};_0x351126[_0x586305]={'$like':'%'+_0x56a7c3[_0xb368('0x32')][_0xb368('0x55')]+'%'};return _0x351126;})});}_0x109942=_['merge']({},_0x109942,_0x56a7c3['options']);return _0x57bc5c[_0xb368('0x5b')](_0x109942);}})[_0xb368('0x25')](function(_0x11436e){if(_0x11436e){_0x1e5f8f=_0x11436e[_0xb368('0x38')];if(!_0x56a7c3[_0xb368('0x32')][_0xb368('0x39')](_0xb368('0x3a'))){_0x109942[_0xb368('0x56')]=qs[_0xb368('0x56')](_0x56a7c3['query'][_0xb368('0x56')]);_0x109942['offset']=qs['offset'](_0x56a7c3[_0xb368('0x32')][_0xb368('0x1d')]);}return _0x57bc5c[_0xb368('0x5b')](_0x109942);}})['then'](function(_0x12d3d){if(_0x12d3d){return _0x12d3d?{'count':_0x1e5f8f,'rows':_0x12d3d}:null;}})[_0xb368('0x25')](respondWithResult(_0x4cc446,null))[_0xb368('0x47')](handleError(_0x4cc446,null));};
\ No newline at end of file
diff --git a/server/api/trigger/trigger.model.js b/server/api/trigger/trigger.model.js
index dcd2d3c..91f09a1 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 _0xd08c=['moment','bluebird','rimraf','../../config/environment','./trigger.attributes','exports','Trigger','lodash','util','../../config/logger','api'];(function(_0x55b30a,_0x458cc0){var _0x2a7dad=function(_0x30a683){while(--_0x30a683){_0x55b30a['push'](_0x55b30a['shift']());}};_0x2a7dad(++_0x458cc0);}(_0xd08c,0x75));var _0xcd08=function(_0x4652a1,_0x481981){_0x4652a1=_0x4652a1-0x0;var _0x3ecafa=_0xd08c[_0x4652a1];return _0x3ecafa;};'use strict';var _=require(_0xcd08('0x0'));var util=require(_0xcd08('0x1'));var logger=require(_0xcd08('0x2'))(_0xcd08('0x3'));var moment=require(_0xcd08('0x4'));var BPromise=require(_0xcd08('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xcd08('0x6'));var config=require(_0xcd08('0x7'));var attributes=require(_0xcd08('0x8'));module[_0xcd08('0x9')]=function(_0x3cd116,_0xb13ba1){return _0x3cd116['define'](_0xcd08('0xa'),attributes,{'tableName':'tools_triggers','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4bd1=['define','tools_triggers','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./trigger.attributes','exports'];(function(_0xe825ff,_0x1bb4c2){var _0x34b40a=function(_0x4ae4f1){while(--_0x4ae4f1){_0xe825ff['push'](_0xe825ff['shift']());}};_0x34b40a(++_0x1bb4c2);}(_0x4bd1,0xfe));var _0x14bd=function(_0xf89c3,_0x351bf1){_0xf89c3=_0xf89c3-0x0;var _0x274fc8=_0x4bd1[_0xf89c3];return _0x274fc8;};'use strict';var _=require(_0x14bd('0x0'));var util=require(_0x14bd('0x1'));var logger=require(_0x14bd('0x2'))(_0x14bd('0x3'));var moment=require(_0x14bd('0x4'));var BPromise=require(_0x14bd('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x14bd('0x6'));var config=require(_0x14bd('0x7'));var attributes=require(_0x14bd('0x8'));module[_0x14bd('0x9')]=function(_0x5ec891,_0x2a0060){return _0x5ec891[_0x14bd('0xa')]('Trigger',attributes,{'tableName':_0x14bd('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 56df1ef..5ead0bd 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 _0x69d3=['debug','stringify','error','code','message','result','catch','Trigger','options','raw','attributes','limit','include','model','map','then','GetTrigger','ShowTrigger','find','where','lodash','util','moment','randomstring','ioredis','../../config/logger','jayson/promise','client','http','request','info','Trigger,\x20%s,\x20%s','request\x20sent'];(function(_0x1e8ddc,_0x29c0f3){var _0x17d3ed=function(_0x2ce4e9){while(--_0x2ce4e9){_0x1e8ddc['push'](_0x1e8ddc['shift']());}};_0x17d3ed(++_0x29c0f3);}(_0x69d3,0xda));var _0x369d=function(_0xe4f68e,_0x4c4599){_0xe4f68e=_0xe4f68e-0x0;var _0x5d7f70=_0x69d3[_0xe4f68e];return _0x5d7f70;};'use strict';var _=require(_0x369d('0x0'));var util=require(_0x369d('0x1'));var moment=require(_0x369d('0x2'));var BPromise=require('bluebird');var rs=require(_0x369d('0x3'));var fs=require('fs');var Redis=require(_0x369d('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x369d('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x369d('0x6'));var client=jayson[_0x369d('0x7')][_0x369d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x424d8c,_0x1bd94c,_0x186302){return new BPromise(function(_0x3adb26,_0x2ac0ec){return client[_0x369d('0x9')](_0x424d8c,_0x186302)['then'](function(_0x5d2ded){logger[_0x369d('0xa')](_0x369d('0xb'),_0x1bd94c,_0x369d('0xc'));logger[_0x369d('0xd')]('Trigger,\x20%s,\x20%s,\x20%s',_0x1bd94c,'request\x20sent',JSON[_0x369d('0xe')](_0x5d2ded));if(_0x5d2ded[_0x369d('0xf')]){if(_0x5d2ded[_0x369d('0xf')][_0x369d('0x10')]===0x1f4){logger[_0x369d('0xf')](_0x369d('0xb'),_0x1bd94c,_0x5d2ded['error'][_0x369d('0x11')]);return _0x2ac0ec(_0x5d2ded[_0x369d('0xf')][_0x369d('0x11')]);}logger[_0x369d('0xf')](_0x369d('0xb'),_0x1bd94c,_0x5d2ded['error']['message']);return _0x3adb26(_0x5d2ded['error'][_0x369d('0x11')]);}else{logger[_0x369d('0xa')](_0x369d('0xb'),_0x1bd94c,'request\x20sent');_0x3adb26(_0x5d2ded[_0x369d('0x12')][_0x369d('0x11')]);}})[_0x369d('0x13')](function(_0x4e234e){logger[_0x369d('0xf')](_0x369d('0xb'),_0x1bd94c,_0x4e234e);_0x2ac0ec(_0x4e234e);});});}exports['GetTrigger']=function(_0x572513){var _0x597b67=this;return new Promise(function(_0x2946be,_0x4494b3){return db[_0x369d('0x14')]['findAll']({'raw':_0x572513[_0x369d('0x15')]?_0x572513[_0x369d('0x15')][_0x369d('0x16')]===undefined?!![]:![]:!![],'where':_0x572513[_0x369d('0x15')]?_0x572513[_0x369d('0x15')]['where']||null:null,'attributes':_0x572513[_0x369d('0x15')]?_0x572513[_0x369d('0x15')][_0x369d('0x17')]||null:null,'limit':_0x572513[_0x369d('0x15')]?_0x572513[_0x369d('0x15')][_0x369d('0x18')]||null:null,'include':_0x572513[_0x369d('0x15')]?_0x572513[_0x369d('0x15')]['include']?_['map'](_0x572513[_0x369d('0x15')][_0x369d('0x19')],function(_0xf7bc3a){return{'model':db[_0xf7bc3a[_0x369d('0x1a')]],'as':_0xf7bc3a['as'],'attributes':_0xf7bc3a[_0x369d('0x17')],'include':_0xf7bc3a[_0x369d('0x19')]?_[_0x369d('0x1b')](_0xf7bc3a['include'],function(_0x4dfe83){return{'model':db[_0x4dfe83[_0x369d('0x1a')]],'as':_0x4dfe83['as'],'attributes':_0x4dfe83[_0x369d('0x17')],'include':_0x4dfe83[_0x369d('0x19')]?_[_0x369d('0x1b')](_0x4dfe83[_0x369d('0x19')],function(_0x41e0cf){return{'model':db[_0x41e0cf[_0x369d('0x1a')]],'as':_0x41e0cf['as'],'attributes':_0x41e0cf['attributes']};}):[]};}):[]};}):[]:[]})[_0x369d('0x1c')](function(_0xe95742){logger[_0x369d('0xa')](_0x369d('0x1d'),_0x572513);logger[_0x369d('0xd')](_0x369d('0x1d'),_0x572513,JSON[_0x369d('0xe')](_0xe95742));_0x2946be(_0xe95742);})['catch'](function(_0x157291){logger['error']('GetTrigger',_0x157291[_0x369d('0x11')],_0x572513);_0x4494b3(_0x597b67[_0x369d('0xf')](0x1f4,_0x157291['message']));});});};exports[_0x369d('0x1e')]=function(_0x5a14ce){var _0x37274f=this;return new Promise(function(_0x39d656,_0xe45219){return db[_0x369d('0x14')][_0x369d('0x1f')]({'raw':_0x5a14ce[_0x369d('0x15')]?_0x5a14ce[_0x369d('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x5a14ce[_0x369d('0x15')]?_0x5a14ce[_0x369d('0x15')][_0x369d('0x20')]||null:null,'attributes':_0x5a14ce[_0x369d('0x15')]?_0x5a14ce[_0x369d('0x15')][_0x369d('0x17')]||null:null,'include':_0x5a14ce[_0x369d('0x15')]?_0x5a14ce[_0x369d('0x15')]['include']?_[_0x369d('0x1b')](_0x5a14ce[_0x369d('0x15')][_0x369d('0x19')],function(_0x1b4453){return{'model':db[_0x1b4453[_0x369d('0x1a')]],'as':_0x1b4453['as'],'attributes':_0x1b4453['attributes'],'include':_0x1b4453[_0x369d('0x19')]?_[_0x369d('0x1b')](_0x1b4453[_0x369d('0x19')],function(_0x3a0277){return{'model':db[_0x3a0277[_0x369d('0x1a')]],'as':_0x3a0277['as'],'attributes':_0x3a0277[_0x369d('0x17')],'include':_0x3a0277['include']?_[_0x369d('0x1b')](_0x3a0277[_0x369d('0x19')],function(_0x40afb2){return{'model':db[_0x40afb2[_0x369d('0x1a')]],'as':_0x40afb2['as'],'attributes':_0x40afb2[_0x369d('0x17')]};}):[]};}):[]};}):[]:[]})[_0x369d('0x1c')](function(_0xfa13da){logger[_0x369d('0xa')](_0x369d('0x1e'),_0x5a14ce);logger[_0x369d('0xd')](_0x369d('0x1e'),_0x5a14ce,JSON[_0x369d('0xe')](_0xfa13da));_0x39d656(_0xfa13da);})[_0x369d('0x13')](function(_0x43d734){logger[_0x369d('0xf')](_0x369d('0x1e'),_0x43d734[_0x369d('0x11')],_0x5a14ce);_0xe45219(_0x37274f[_0x369d('0xf')](0x1f4,_0x43d734[_0x369d('0x11')]));});});};
\ No newline at end of file
+var _0x84a0=['bluebird','ioredis','../../mysqldb','rpc','../../config/environment','client','http','request','then','info','debug','Trigger,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','Trigger,\x20%s,\x20%s','message','result','catch','Trigger','findAll','options','raw','where','attributes','limit','include','model','map','GetTrigger','ShowTrigger','find','lodash','util','moment'];(function(_0x428e33,_0x384bda){var _0x19cca4=function(_0x4ebd49){while(--_0x4ebd49){_0x428e33['push'](_0x428e33['shift']());}};_0x19cca4(++_0x384bda);}(_0x84a0,0x66));var _0x084a=function(_0x153cfc,_0x2acad7){_0x153cfc=_0x153cfc-0x0;var _0x4b34b7=_0x84a0[_0x153cfc];return _0x4b34b7;};'use strict';var _=require(_0x084a('0x0'));var util=require(_0x084a('0x1'));var moment=require(_0x084a('0x2'));var BPromise=require(_0x084a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x084a('0x4'));var db=require(_0x084a('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x084a('0x6'));var config=require(_0x084a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x084a('0x8')][_0x084a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2e6810,_0x373d2,_0x2b30bc){return new BPromise(function(_0x58d419,_0x1051a9){return client[_0x084a('0xa')](_0x2e6810,_0x2b30bc)[_0x084a('0xb')](function(_0x2888e3){logger[_0x084a('0xc')]('Trigger,\x20%s,\x20%s',_0x373d2,'request\x20sent');logger[_0x084a('0xd')](_0x084a('0xe'),_0x373d2,_0x084a('0xf'),JSON[_0x084a('0x10')](_0x2888e3));if(_0x2888e3[_0x084a('0x11')]){if(_0x2888e3['error']['code']===0x1f4){logger[_0x084a('0x11')](_0x084a('0x12'),_0x373d2,_0x2888e3[_0x084a('0x11')][_0x084a('0x13')]);return _0x1051a9(_0x2888e3[_0x084a('0x11')][_0x084a('0x13')]);}logger[_0x084a('0x11')](_0x084a('0x12'),_0x373d2,_0x2888e3['error'][_0x084a('0x13')]);return _0x58d419(_0x2888e3['error'][_0x084a('0x13')]);}else{logger[_0x084a('0xc')](_0x084a('0x12'),_0x373d2,_0x084a('0xf'));_0x58d419(_0x2888e3[_0x084a('0x14')]['message']);}})[_0x084a('0x15')](function(_0x4abd81){logger[_0x084a('0x11')](_0x084a('0x12'),_0x373d2,_0x4abd81);_0x1051a9(_0x4abd81);});});}exports['GetTrigger']=function(_0xf2c333){var _0x32c729=this;return new Promise(function(_0x4134b9,_0x14bb19){return db[_0x084a('0x16')][_0x084a('0x17')]({'raw':_0xf2c333[_0x084a('0x18')]?_0xf2c333[_0x084a('0x18')][_0x084a('0x19')]===undefined?!![]:![]:!![],'where':_0xf2c333[_0x084a('0x18')]?_0xf2c333[_0x084a('0x18')][_0x084a('0x1a')]||null:null,'attributes':_0xf2c333[_0x084a('0x18')]?_0xf2c333[_0x084a('0x18')][_0x084a('0x1b')]||null:null,'limit':_0xf2c333['options']?_0xf2c333[_0x084a('0x18')][_0x084a('0x1c')]||null:null,'include':_0xf2c333[_0x084a('0x18')]?_0xf2c333[_0x084a('0x18')][_0x084a('0x1d')]?_['map'](_0xf2c333[_0x084a('0x18')][_0x084a('0x1d')],function(_0x6346a5){return{'model':db[_0x6346a5[_0x084a('0x1e')]],'as':_0x6346a5['as'],'attributes':_0x6346a5[_0x084a('0x1b')],'include':_0x6346a5[_0x084a('0x1d')]?_['map'](_0x6346a5[_0x084a('0x1d')],function(_0x2af138){return{'model':db[_0x2af138[_0x084a('0x1e')]],'as':_0x2af138['as'],'attributes':_0x2af138['attributes'],'include':_0x2af138[_0x084a('0x1d')]?_[_0x084a('0x1f')](_0x2af138[_0x084a('0x1d')],function(_0x4c5658){return{'model':db[_0x4c5658['model']],'as':_0x4c5658['as'],'attributes':_0x4c5658['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x33b88f){logger['info']('GetTrigger',_0xf2c333);logger['debug'](_0x084a('0x20'),_0xf2c333,JSON[_0x084a('0x10')](_0x33b88f));_0x4134b9(_0x33b88f);})[_0x084a('0x15')](function(_0x2c4149){logger[_0x084a('0x11')](_0x084a('0x20'),_0x2c4149[_0x084a('0x13')],_0xf2c333);_0x14bb19(_0x32c729[_0x084a('0x11')](0x1f4,_0x2c4149['message']));});});};exports[_0x084a('0x21')]=function(_0x3b2b38){var _0x501a16=this;return new Promise(function(_0xe1980b,_0x24bcf5){return db[_0x084a('0x16')][_0x084a('0x22')]({'raw':_0x3b2b38[_0x084a('0x18')]?_0x3b2b38[_0x084a('0x18')][_0x084a('0x19')]===undefined?!![]:![]:!![],'where':_0x3b2b38[_0x084a('0x18')]?_0x3b2b38[_0x084a('0x18')][_0x084a('0x1a')]||null:null,'attributes':_0x3b2b38[_0x084a('0x18')]?_0x3b2b38[_0x084a('0x18')][_0x084a('0x1b')]||null:null,'include':_0x3b2b38['options']?_0x3b2b38['options'][_0x084a('0x1d')]?_[_0x084a('0x1f')](_0x3b2b38[_0x084a('0x18')][_0x084a('0x1d')],function(_0x83f94f){return{'model':db[_0x83f94f['model']],'as':_0x83f94f['as'],'attributes':_0x83f94f[_0x084a('0x1b')],'include':_0x83f94f[_0x084a('0x1d')]?_[_0x084a('0x1f')](_0x83f94f['include'],function(_0x109593){return{'model':db[_0x109593[_0x084a('0x1e')]],'as':_0x109593['as'],'attributes':_0x109593[_0x084a('0x1b')],'include':_0x109593['include']?_['map'](_0x109593['include'],function(_0xf97d1b){return{'model':db[_0xf97d1b[_0x084a('0x1e')]],'as':_0xf97d1b['as'],'attributes':_0xf97d1b[_0x084a('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3c09c3){logger[_0x084a('0xc')](_0x084a('0x21'),_0x3b2b38);logger[_0x084a('0xd')](_0x084a('0x21'),_0x3b2b38,JSON[_0x084a('0x10')](_0x3c09c3));_0xe1980b(_0x3c09c3);})[_0x084a('0x15')](function(_0x19354f){logger[_0x084a('0x11')](_0x084a('0x21'),_0x19354f[_0x084a('0x13')],_0x3b2b38);_0x24bcf5(_0x501a16[_0x084a('0x11')](0x1f4,_0x19354f[_0x084a('0x13')]));});});};
\ No newline at end of file
diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js
index ff68606..d48a817 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 _0x9957=['/:id/clone','clone','create','put','delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','post'];(function(_0x2340e4,_0x36c3aa){var _0x4070b5=function(_0xa6c0ab){while(--_0xa6c0ab){_0x2340e4['push'](_0x2340e4['shift']());}};_0x4070b5(++_0x36c3aa);}(_0x9957,0x93));var _0x7995=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x9957[_0x618414];return _0x21c19a;};'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('./trunk.controller');router[_0x7995('0x8')]('/',auth[_0x7995('0x9')](),controller[_0x7995('0xa')]);router[_0x7995('0x8')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller['show']);router[_0x7995('0xc')](_0x7995('0xd'),auth['isAuthenticated'](),controller[_0x7995('0xe')]);router[_0x7995('0xc')]('/',auth[_0x7995('0x9')](),controller[_0x7995('0xf')]);router[_0x7995('0x10')](_0x7995('0xb'),auth[_0x7995('0x9')](),controller['update']);router[_0x7995('0x11')](_0x7995('0xb'),auth['isAuthenticated'](),controller[_0x7995('0x12')]);module[_0x7995('0x13')]=router;
\ No newline at end of file
+var _0xbd50=['show','clone','post','create','put','update','destroy','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','/:id','isAuthenticated'];(function(_0x5e7514,_0x30c2e1){var _0x12f472=function(_0x33ddb6){while(--_0x33ddb6){_0x5e7514['push'](_0x5e7514['shift']());}};_0x12f472(++_0x30c2e1);}(_0xbd50,0x196));var _0x0bd5=function(_0xd806b6,_0x3a605c){_0xd806b6=_0xd806b6-0x0;var _0x48224d=_0xbd50[_0xd806b6];return _0x48224d;};'use strict';var multer=require(_0x0bd5('0x0'));var util=require(_0x0bd5('0x1'));var path=require(_0x0bd5('0x2'));var timeout=require('connect-timeout');var express=require(_0x0bd5('0x3'));var router=express[_0x0bd5('0x4')]();var auth=require(_0x0bd5('0x5'));var interaction=require(_0x0bd5('0x6'));var config=require(_0x0bd5('0x7'));var controller=require('./trunk.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x0bd5('0x8')]);router[_0x0bd5('0x9')](_0x0bd5('0xa'),auth[_0x0bd5('0xb')](),controller[_0x0bd5('0xc')]);router['post']('/:id/clone',auth[_0x0bd5('0xb')](),controller[_0x0bd5('0xd')]);router[_0x0bd5('0xe')]('/',auth['isAuthenticated'](),controller[_0x0bd5('0xf')]);router[_0x0bd5('0x10')]('/:id',auth[_0x0bd5('0xb')](),controller[_0x0bd5('0x11')]);router['delete'](_0x0bd5('0xa'),auth[_0x0bd5('0xb')](),controller[_0x0bd5('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/trunk/trunk.attributes.js b/server/api/trunk/trunk.attributes.js
index 73787e1..b095f56 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 _0x23a5=['udp','setDataValue','transport','join','getDataValue','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','shortinfo','auto','rfc2833','yes','nonat','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\x22alaw\x22]','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','INTEGER','\x22\x22\x20<>','always','accept','refuse','uac','uas','fingerprint','passive','update','update,nonat','sequelize','exports','name','ENUM','friend','user','peer','STRING','ALLOWED_NOT_SCREENED','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB'];(function(_0x4c741d,_0x54fdc5){var _0x57bc15=function(_0x464597){while(--_0x464597){_0x4c741d['push'](_0x4c741d['shift']());}};_0x57bc15(++_0x54fdc5);}(_0x23a5,0x1a2));var _0x523a=function(_0x3baeae,_0x704d0a){_0x3baeae=_0x3baeae-0x0;var _0x506f95=_0x23a5[_0x3baeae];return _0x506f95;};'use strict';var Sequelize=require(_0x523a('0x0'));module[_0x523a('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x523a('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x4'),_0x523a('0x5'),_0x523a('0x6')),'allowNull':![],'defaultValue':_0x523a('0x4')},'context':{'type':Sequelize[_0x523a('0x7')],'allowNull':![],'defaultValue':'from-voip-provider'},'callingpres':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x8'),'ALLOWED_PASSED_SCREEN',_0x523a('0x9'),_0x523a('0xa'),'PROHIB_NOT_SCREENED',_0x523a('0xb'),_0x523a('0xc'),_0x523a('0xd'))},'deny':{'type':Sequelize[_0x523a('0x7')]},'permit':{'type':Sequelize[_0x523a('0x7')]},'secret':{'type':Sequelize[_0x523a('0x7')]},'md5secret':{'type':Sequelize[_0x523a('0x7')]},'remotesecret':{'type':Sequelize[_0x523a('0x7')]},'transport':{'type':Sequelize[_0x523a('0x7')],'defaultValue':_0x523a('0xe'),'set':function(_0x1164d9){this[_0x523a('0xf')](_0x523a('0x10'),_0x1164d9?_0x1164d9[_0x523a('0x11')](','):null);},'get':function(){return this[_0x523a('0x12')](_0x523a('0x10'))?this[_0x523a('0x12')](_0x523a('0x10'))[_0x523a('0x13')](','):null;},'comment':_0x523a('0x14')},'dtmfmode':{'type':Sequelize[_0x523a('0x3')]('rfc2833','info',_0x523a('0x15'),'inband',_0x523a('0x16')),'defaultValue':_0x523a('0x17')},'directmedia':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no',_0x523a('0x19'),'update',_0x523a('0x1a')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x523a('0x3')]('yes','no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x523a('0x7')]},'directmediadeny':{'type':Sequelize[_0x523a('0x7')]},'nat':{'type':Sequelize[_0x523a('0x7')],'defaultValue':_0x523a('0x1b'),'set':function(_0x40e78e){this['setDataValue'](_0x523a('0x1c'),_0x40e78e?_0x40e78e['join'](','):null);},'get':function(){return this['getDataValue']('nat')?this['getDataValue'](_0x523a('0x1c'))[_0x523a('0x13')](','):null;},'comment':_0x523a('0x1d')},'callgroup':{'type':Sequelize['STRING']},'namedcallgroup':{'type':Sequelize[_0x523a('0x7')]},'pickupgroup':{'type':Sequelize['STRING']},'namedpickupgroup':{'type':Sequelize[_0x523a('0x7')]},'language':{'type':Sequelize[_0x523a('0x7')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x523a('0x7')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x523a('0x7')],'defaultValue':_0x523a('0x1e')},'allow':{'type':Sequelize[_0x523a('0x7')],'allowNull':![],'defaultValue':_0x523a('0x1f'),'set':function(_0x3b56bc){this[_0x523a('0xf')](_0x523a('0x20'),_0x3b56bc?_0x3b56bc['join'](';'):_0x523a('0x1f'));},'get':function(){return this['getDataValue'](_0x523a('0x20'))?this[_0x523a('0x12')](_0x523a('0x20'))[_0x523a('0x13')](';'):null;},'comment':_0x523a('0x21')},'autoframing':{'type':Sequelize['ENUM'](_0x523a('0x18'),'no')},'insecure':{'type':Sequelize[_0x523a('0x7')],'defaultValue':'port,invite','set':function(_0x2d88b5){this[_0x523a('0xf')](_0x523a('0x22'),_0x2d88b5?_0x2d88b5[_0x523a('0x11')](','):null);},'get':function(){return this[_0x523a('0x12')](_0x523a('0x22'))?this[_0x523a('0x12')](_0x523a('0x22'))[_0x523a('0x13')](','):null;},'comment':_0x523a('0x23')},'trustrpid':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize['ENUM'](_0x523a('0x18'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no',_0x523a('0x24'))},'promiscredir':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'useclientcode':{'type':Sequelize['ENUM'](_0x523a('0x18'),'no')},'accountcode':{'type':Sequelize[_0x523a('0x25')](0xb)},'setvar':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0x523a('0x7')],'defaultValue':_0x523a('0x26')},'amaflags':{'type':Sequelize[_0x523a('0x7')]},'callcounter':{'type':Sequelize[_0x523a('0x3')]('yes','no'),'defaultValue':_0x523a('0x18')},'busylevel':{'type':Sequelize[_0x523a('0x25')](0xb)},'allowoverlap':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'allowsubscribe':{'type':Sequelize[_0x523a('0x3')]('yes','no')},'allowtransfer':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'ignoresdpversion':{'type':Sequelize[_0x523a('0x3')]('yes','no')},'subscribecontext':{'type':Sequelize[_0x523a('0x7')]},'template':{'type':Sequelize['STRING']},'videosupport':{'type':Sequelize[_0x523a('0x3')]('yes','no',_0x523a('0x27')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x523a('0x25')](0xb)},'rfc2833compensate':{'type':Sequelize[_0x523a('0x3')]('yes','no')},'mailbox':{'type':Sequelize[_0x523a('0x7')]},'session_timers':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x28'),_0x523a('0x29'),'originate')},'session_expires':{'type':Sequelize[_0x523a('0x25')](0xb)},'session_minse':{'type':Sequelize[_0x523a('0x25')](0xb)},'session_refresher':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x2a'),_0x523a('0x2b')),'defaultValue':'uas'},'t38pt_usertpsource':{'type':Sequelize['STRING']},'regexten':{'type':Sequelize['STRING']},'fromdomain':{'type':Sequelize[_0x523a('0x7')]},'fromuser':{'type':Sequelize[_0x523a('0x7')]},'port':{'type':Sequelize['INTEGER'](0x5)},'qualify':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no'),'defaultValue':_0x523a('0x18')},'keepalive':{'type':Sequelize[_0x523a('0x25')](0xb)},'defaultip':{'type':Sequelize[_0x523a('0x7')]},'defaultuser':{'type':Sequelize[_0x523a('0x7')]},'rtptimeout':{'type':Sequelize[_0x523a('0x25')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x523a('0x25')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x523a('0x25')](0xb)},'sendrpid':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no','pai'),'defaultValue':'no'},'outboundproxy':{'type':Sequelize['STRING']},'callbackextension':{'type':Sequelize['STRING']},'timert1':{'type':Sequelize[_0x523a('0x25')](0xb)},'timerb':{'type':Sequelize[_0x523a('0x25')](0xb)},'qualifyfreq':{'type':Sequelize[_0x523a('0x25')](0xb)},'contactpermit':{'type':Sequelize['STRING']},'contactdeny':{'type':Sequelize[_0x523a('0x7')]},'contactacl':{'type':Sequelize[_0x523a('0x7')]},'unsolicited_mailbox':{'type':Sequelize[_0x523a('0x7')]},'use_q850_reason':{'type':Sequelize['STRING']},'maxforwards':{'type':Sequelize[_0x523a('0x25')](0xb)},'encryption':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'force_avp':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'icesupport':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'dtlsenable':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'dtlsverify':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no',_0x523a('0x2c'),'certificate')},'dtlsrekey':{'type':Sequelize[_0x523a('0x25')](0xb)},'dtlscertfile':{'type':Sequelize[_0x523a('0x7')]},'dtlsprivatekey':{'type':Sequelize[_0x523a('0x7')]},'dtlscipher':{'type':Sequelize['STRING']},'dtlscafile':{'type':Sequelize[_0x523a('0x7')]},'dtlscapath':{'type':Sequelize[_0x523a('0x7')]},'dtlssetup':{'type':Sequelize[_0x523a('0x3')]('active',_0x523a('0x2d'),'actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x523a('0x7')]},'usereqphone':{'type':Sequelize[_0x523a('0x3')]('yes','no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x523a('0x7')]},'recordofffeature':{'type':Sequelize[_0x523a('0x7')]},'call_limit':{'type':Sequelize[_0x523a('0x25')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize['ENUM']('yes','no')},'subscribemwi':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no')},'vmexten':{'type':Sequelize[_0x523a('0x7')]},'mohinterpret':{'type':Sequelize[_0x523a('0x7')]},'mohsuggest':{'type':Sequelize[_0x523a('0x7')]},'parkinglot':{'type':Sequelize[_0x523a('0x7')]},'description':{'type':Sequelize[_0x523a('0x7')]},'host':{'type':Sequelize['STRING'],'defaultValue':'dynamic'},'canreinvite':{'type':Sequelize[_0x523a('0x3')](_0x523a('0x18'),'no',_0x523a('0x19'),_0x523a('0x2e'),_0x523a('0x2f')),'defaultValue':'no'},'registry':{'type':Sequelize['STRING']},'otherFields':{'type':Sequelize[_0x523a('0x7')]},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize['STRING'],'defaultValue':'no'}};
\ No newline at end of file
+var _0x3b84=['actpass','dynamic','update,nonat','BOOLEAN','sequelize','exports','STRING','name','ENUM','user','peer','from-voip-provider','ALLOWED_NOT_SCREENED','ALLOWED_FAILED_SCREEN','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','setDataValue','transport','join','getDataValue','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','info','shortinfo','inband','auto','yes','nonat','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\x22alaw\x22]','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','INTEGER','always','accept','refuse','originate','uac','uas','pai','fingerprint','certificate','active'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3b84,0xa6));var _0x43b8=function(_0xa64d7a,_0x215036){_0xa64d7a=_0xa64d7a-0x0;var _0x27ef5a=_0x3b84[_0xa64d7a];return _0x27ef5a;};'use strict';var Sequelize=require(_0x43b8('0x0'));module[_0x43b8('0x1')]={'name':{'type':Sequelize[_0x43b8('0x2')],'allowNull':![],'unique':_0x43b8('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x43b8('0x4')]('friend',_0x43b8('0x5'),_0x43b8('0x6')),'allowNull':![],'defaultValue':'friend'},'context':{'type':Sequelize[_0x43b8('0x2')],'allowNull':![],'defaultValue':_0x43b8('0x7')},'callingpres':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x8'),'ALLOWED_PASSED_SCREEN',_0x43b8('0x9'),'ALLOWED',_0x43b8('0xa'),_0x43b8('0xb'),_0x43b8('0xc'),_0x43b8('0xd'))},'deny':{'type':Sequelize[_0x43b8('0x2')]},'permit':{'type':Sequelize[_0x43b8('0x2')]},'secret':{'type':Sequelize['STRING']},'md5secret':{'type':Sequelize['STRING']},'remotesecret':{'type':Sequelize['STRING']},'transport':{'type':Sequelize['STRING'],'defaultValue':_0x43b8('0xe'),'set':function(_0x3320e2){this[_0x43b8('0xf')](_0x43b8('0x10'),_0x3320e2?_0x3320e2[_0x43b8('0x11')](','):null);},'get':function(){return this[_0x43b8('0x12')](_0x43b8('0x10'))?this[_0x43b8('0x12')]('transport')[_0x43b8('0x13')](','):null;},'comment':_0x43b8('0x14')},'dtmfmode':{'type':Sequelize[_0x43b8('0x4')]('rfc2833',_0x43b8('0x15'),_0x43b8('0x16'),_0x43b8('0x17'),_0x43b8('0x18')),'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no',_0x43b8('0x1a'),'update',_0x43b8('0x1b')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x43b8('0x2')]},'directmediadeny':{'type':Sequelize[_0x43b8('0x2')]},'nat':{'type':Sequelize[_0x43b8('0x2')],'defaultValue':_0x43b8('0x1c'),'set':function(_0x5a2f34){this[_0x43b8('0xf')](_0x43b8('0x1d'),_0x5a2f34?_0x5a2f34[_0x43b8('0x11')](','):null);},'get':function(){return this[_0x43b8('0x12')](_0x43b8('0x1d'))?this[_0x43b8('0x12')](_0x43b8('0x1d'))[_0x43b8('0x13')](','):null;},'comment':_0x43b8('0x1e')},'callgroup':{'type':Sequelize[_0x43b8('0x2')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0x43b8('0x2')]},'namedpickupgroup':{'type':Sequelize[_0x43b8('0x2')]},'language':{'type':Sequelize[_0x43b8('0x2')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x43b8('0x2')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x43b8('0x2')],'defaultValue':_0x43b8('0x1f')},'allow':{'type':Sequelize[_0x43b8('0x2')],'allowNull':![],'defaultValue':_0x43b8('0x20'),'set':function(_0x8167fb){this[_0x43b8('0xf')]('allow',_0x8167fb?_0x8167fb[_0x43b8('0x11')](';'):_0x43b8('0x20'));},'get':function(){return this[_0x43b8('0x12')](_0x43b8('0x21'))?this['getDataValue'](_0x43b8('0x21'))[_0x43b8('0x13')](';'):null;},'comment':_0x43b8('0x22')},'autoframing':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'insecure':{'type':Sequelize['STRING'],'defaultValue':_0x43b8('0x23'),'set':function(_0x5beb36){this[_0x43b8('0xf')]('insecure',_0x5beb36?_0x5beb36['join'](','):null);},'get':function(){return this[_0x43b8('0x12')]('insecure')?this[_0x43b8('0x12')](_0x43b8('0x24'))[_0x43b8('0x13')](','):null;},'comment':_0x43b8('0x25')},'trustrpid':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x43b8('0x4')]('yes','no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no',_0x43b8('0x26'))},'promiscredir':{'type':Sequelize['ENUM']('yes','no')},'useclientcode':{'type':Sequelize[_0x43b8('0x4')]('yes','no')},'accountcode':{'type':Sequelize[_0x43b8('0x27')](0xb)},'setvar':{'type':Sequelize[_0x43b8('0x2')]},'callerid':{'type':Sequelize[_0x43b8('0x2')],'defaultValue':'\x22\x22\x20<>'},'amaflags':{'type':Sequelize[_0x43b8('0x2')]},'callcounter':{'type':Sequelize['ENUM'](_0x43b8('0x19'),'no'),'defaultValue':_0x43b8('0x19')},'busylevel':{'type':Sequelize[_0x43b8('0x27')](0xb)},'allowoverlap':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'allowsubscribe':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'allowtransfer':{'type':Sequelize[_0x43b8('0x4')]('yes','no')},'ignoresdpversion':{'type':Sequelize['ENUM'](_0x43b8('0x19'),'no')},'subscribecontext':{'type':Sequelize[_0x43b8('0x2')]},'template':{'type':Sequelize[_0x43b8('0x2')]},'videosupport':{'type':Sequelize[_0x43b8('0x4')]('yes','no',_0x43b8('0x28')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize['INTEGER'](0xb)},'rfc2833compensate':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'mailbox':{'type':Sequelize[_0x43b8('0x2')]},'session_timers':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x29'),_0x43b8('0x2a'),_0x43b8('0x2b'))},'session_expires':{'type':Sequelize[_0x43b8('0x27')](0xb)},'session_minse':{'type':Sequelize[_0x43b8('0x27')](0xb)},'session_refresher':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x2c'),_0x43b8('0x2d')),'defaultValue':_0x43b8('0x2d')},'t38pt_usertpsource':{'type':Sequelize[_0x43b8('0x2')]},'regexten':{'type':Sequelize[_0x43b8('0x2')]},'fromdomain':{'type':Sequelize[_0x43b8('0x2')]},'fromuser':{'type':Sequelize[_0x43b8('0x2')]},'port':{'type':Sequelize[_0x43b8('0x27')](0x5)},'qualify':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no'),'defaultValue':_0x43b8('0x19')},'keepalive':{'type':Sequelize[_0x43b8('0x27')](0xb)},'defaultip':{'type':Sequelize['STRING']},'defaultuser':{'type':Sequelize[_0x43b8('0x2')]},'rtptimeout':{'type':Sequelize[_0x43b8('0x27')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x43b8('0x27')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x43b8('0x27')](0xb)},'sendrpid':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no',_0x43b8('0x2e')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x43b8('0x2')]},'callbackextension':{'type':Sequelize[_0x43b8('0x2')]},'timert1':{'type':Sequelize[_0x43b8('0x27')](0xb)},'timerb':{'type':Sequelize[_0x43b8('0x27')](0xb)},'qualifyfreq':{'type':Sequelize[_0x43b8('0x27')](0xb)},'contactpermit':{'type':Sequelize[_0x43b8('0x2')]},'contactdeny':{'type':Sequelize[_0x43b8('0x2')]},'contactacl':{'type':Sequelize[_0x43b8('0x2')]},'unsolicited_mailbox':{'type':Sequelize['STRING']},'use_q850_reason':{'type':Sequelize[_0x43b8('0x2')]},'maxforwards':{'type':Sequelize[_0x43b8('0x27')](0xb)},'encryption':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'force_avp':{'type':Sequelize[_0x43b8('0x4')]('yes','no')},'icesupport':{'type':Sequelize[_0x43b8('0x4')]('yes','no')},'dtlsenable':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'dtlsverify':{'type':Sequelize['ENUM'](_0x43b8('0x19'),'no',_0x43b8('0x2f'),_0x43b8('0x30'))},'dtlsrekey':{'type':Sequelize[_0x43b8('0x27')](0xb)},'dtlscertfile':{'type':Sequelize[_0x43b8('0x2')]},'dtlsprivatekey':{'type':Sequelize[_0x43b8('0x2')]},'dtlscipher':{'type':Sequelize[_0x43b8('0x2')]},'dtlscafile':{'type':Sequelize['STRING']},'dtlscapath':{'type':Sequelize[_0x43b8('0x2')]},'dtlssetup':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x31'),'passive',_0x43b8('0x32')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x43b8('0x2')]},'usereqphone':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize['STRING']},'recordofffeature':{'type':Sequelize[_0x43b8('0x2')]},'call_limit':{'type':Sequelize[_0x43b8('0x27')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'subscribemwi':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no')},'vmexten':{'type':Sequelize[_0x43b8('0x2')]},'mohinterpret':{'type':Sequelize[_0x43b8('0x2')]},'mohsuggest':{'type':Sequelize[_0x43b8('0x2')]},'parkinglot':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x43b8('0x2')]},'host':{'type':Sequelize[_0x43b8('0x2')],'defaultValue':_0x43b8('0x33')},'canreinvite':{'type':Sequelize[_0x43b8('0x4')](_0x43b8('0x19'),'no',_0x43b8('0x1a'),'update',_0x43b8('0x34')),'defaultValue':'no'},'registry':{'type':Sequelize[_0x43b8('0x2')]},'otherFields':{'type':Sequelize[_0x43b8('0x2')]},'active':{'type':Sequelize[_0x43b8('0x35')],'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 7728b5f..b2f6490 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 _0xf4af=['chan_sip.so','role','userProfileId','params','server/files/templates/registry.ejs','server/files/templates/trunk.ejs','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','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','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','Trunk,\x20%s,\x20%s','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','count','limit','set','Content-Range','reject','save','update','destroy','get','UserProfileResource','name','send','index','Trunk','rawAttributes','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','offset','order','sort','where','pick','filter','map','VIRTUAL','merge','options','includeAll','include','findAll','show','find','omit','updatedAt','body','createdAt','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','Trunks','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','join','utf8','root','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','registry','/etc/asterisk/sip_xcally_registers.conf','Reload'];(function(_0x1aae33,_0x110a80){var _0x2e91e9=function(_0x218767){while(--_0x218767){_0x1aae33['push'](_0x1aae33['shift']());}};_0x2e91e9(++_0x110a80);}(_0xf4af,0x7a));var _0xff4a=function(_0x5df049,_0x260c2a){_0x5df049=_0x5df049-0x0;var _0x4886e2=_0xf4af[_0x5df049];return _0x4886e2;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xff4a('0x0'));var rimraf=require(_0xff4a('0x1'));var zipdir=require(_0xff4a('0x2'));var jsonpatch=require(_0xff4a('0x3'));var rp=require('request-promise');var moment=require(_0xff4a('0x4'));var BPromise=require(_0xff4a('0x5'));var Mustache=require(_0xff4a('0x6'));var util=require(_0xff4a('0x7'));var path=require('path');var sox=require(_0xff4a('0x8'));var csv=require(_0xff4a('0x9'));var ejs=require(_0xff4a('0xa'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xff4a('0xb'));var jsforce=require(_0xff4a('0xc'));var deskjs=require(_0xff4a('0xd'));var toCsv=require(_0xff4a('0x9'));var querystring=require(_0xff4a('0xe'));var Papa=require(_0xff4a('0xf'));var Redis=require(_0xff4a('0x10'));var authService=require(_0xff4a('0x11'));var qs=require(_0xff4a('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xff4a('0x13'));var logger=require(_0xff4a('0x14'))(_0xff4a('0x15'));var utils=require(_0xff4a('0x16'));var config=require(_0xff4a('0x17'));var db=require(_0xff4a('0x18'))['db'];var jayson=require('jayson/promise');var client=jayson[_0xff4a('0x19')][_0xff4a('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x5a9c0b,_0x1e60c6,_0xcd61d9){if(_0xcd61d9){var _0x9efffe=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x9efffe[_0xff4a('0x1b')](_0x1e60c6)){return _0x5a9c0b;}else{throw new db[(_0xff4a('0x1c'))][(_0xff4a('0x1d'))](_0xff4a('0x1e'));}}else{return _0x5a9c0b;}}function respondWithRpcPromise(_0x5dc34e,_0xfa6fc,_0x5c0977,_0xc65735){return new BPromise(function(_0xef4df2,_0x483207){var _0x365518=_0xc65735||client;return _0x365518[_0xff4a('0x1f')](_0x5dc34e,_0x5c0977)[_0xff4a('0x20')](function(_0xf6a636){logger[_0xff4a('0x21')](_0xff4a('0x22'),_0xfa6fc,_0xff4a('0x23'));logger[_0xff4a('0x24')](_0xff4a('0x25'),_0xfa6fc,_0xff4a('0x23'),JSON[_0xff4a('0x26')](_0xf6a636));if(_0xf6a636[_0xff4a('0x27')]){if(_0xf6a636[_0xff4a('0x27')][_0xff4a('0x28')]===0x1f4){logger['error'](_0xff4a('0x22'),_0xfa6fc,_0xf6a636[_0xff4a('0x27')]['message']);return _0x483207(_0xf6a636[_0xff4a('0x27')]['message']);}logger[_0xff4a('0x27')]('Trunk,\x20%s,\x20%s',_0xfa6fc,_0xf6a636[_0xff4a('0x27')][_0xff4a('0x29')]);return _0xef4df2(_0xf6a636[_0xff4a('0x27')]['message']);}else{logger[_0xff4a('0x21')](_0xff4a('0x22'),_0xfa6fc,_0xff4a('0x23'));_0xef4df2(_0xf6a636[_0xff4a('0x2a')][_0xff4a('0x29')]);}})[_0xff4a('0x2b')](function(_0x135a15){logger[_0xff4a('0x27')](_0xff4a('0x22'),_0xfa6fc,_0x135a15);_0x483207(_0x135a15);});});}function respondWithStatusCode(_0x359855,_0x3e2027){_0x3e2027=_0x3e2027||0xcc;return function(_0x1a1f2e){if(_0x1a1f2e){return _0x359855[_0xff4a('0x2c')](_0x3e2027);}return _0x359855[_0xff4a('0x2d')](_0x3e2027)[_0xff4a('0x2e')]();};}function respondWithResult(_0x4bae34,_0x530ecb){_0x530ecb=_0x530ecb||0xc8;return function(_0x585d35){if(_0x585d35){return _0x4bae34['status'](_0x530ecb)[_0xff4a('0x2f')](_0x585d35);}};}function respondWithFilteredResult(_0x5d4d56,_0x3e12e4){return function(_0x44ab82){if(_0x44ab82){var _0x5425b7=_0x44ab82[_0xff4a('0x30')],_0x4889b6=_0x3e12e4['offset'],_0x3c9571=_0x3e12e4['offset']+_0x3e12e4[_0xff4a('0x31')],_0x187a3e;if(_0x3c9571>=_0x5425b7){_0x3c9571=_0x5425b7;_0x187a3e=0xc8;}else{_0x187a3e=0xce;}_0x5d4d56[_0xff4a('0x2d')](_0x187a3e);return _0x5d4d56[_0xff4a('0x32')](_0xff4a('0x33'),_0x4889b6+'-'+_0x3c9571+'/'+_0x5425b7)[_0xff4a('0x2f')](_0x44ab82);}return null;};}function patchUpdates(_0x5365ce){return function(_0x30a379){try{jsonpatch['apply'](_0x30a379,_0x5365ce,!![]);}catch(_0xf4c17f){return BPromise[_0xff4a('0x34')](_0xf4c17f);}return _0x30a379[_0xff4a('0x35')]();};}function saveUpdates(_0x29b5c1,_0x2f4b56){return function(_0x38c9dc){if(_0x38c9dc){return _0x38c9dc[_0xff4a('0x36')](_0x29b5c1)[_0xff4a('0x20')](function(_0x3aaaf3){return _0x3aaaf3;});}return null;};}function removeEntity(_0x519cb7,_0x33998a){return function(_0x34f18d){if(_0x34f18d){return _0x34f18d[_0xff4a('0x37')]()['then'](function(){var _0x51ecd0=_0x34f18d[_0xff4a('0x38')]({'plain':!![]});var _0x1bf466='Trunks';return db[_0xff4a('0x39')]['destroy']({'where':{'type':_0x1bf466,'resourceId':_0x51ecd0['id']}})[_0xff4a('0x20')](function(){return _0x34f18d;});})[_0xff4a('0x20')](function(){_0x519cb7[_0xff4a('0x2d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5a1e30,_0x1f8258){return function(_0x52903c){if(!_0x52903c){_0x5a1e30[_0xff4a('0x2c')](0x194);}return _0x52903c;};}function handleError(_0x42c7e7,_0x4ddfd1){_0x4ddfd1=_0x4ddfd1||0x1f4;return function(_0x161a0c){logger[_0xff4a('0x27')](_0x161a0c['stack']);if(_0x161a0c[_0xff4a('0x3a')]){delete _0x161a0c['name'];}_0x42c7e7['status'](_0x4ddfd1)[_0xff4a('0x3b')](_0x161a0c);};}exports[_0xff4a('0x3c')]=function(_0x802716,_0xec30b2){var _0x4847ff={},_0x286330={},_0x5b1041={'count':0x0,'rows':[]};var _0x36c217=_['map'](db[_0xff4a('0x3d')][_0xff4a('0x3e')],function(_0x4f4839){return{'name':_0x4f4839['fieldName'],'type':_0x4f4839[_0xff4a('0x3f')][_0xff4a('0x40')]};});_0x286330['model']=_['map'](_0x36c217,_0xff4a('0x3a'));_0x286330[_0xff4a('0x41')]=_[_0xff4a('0x42')](_0x802716['query']);_0x286330[_0xff4a('0x43')]=_[_0xff4a('0x44')](_0x286330['model'],_0x286330[_0xff4a('0x41')]);_0x4847ff[_0xff4a('0x45')]=_[_0xff4a('0x44')](_0x286330[_0xff4a('0x46')],qs['fields'](_0x802716['query'][_0xff4a('0x47')]));_0x4847ff[_0xff4a('0x45')]=_0x4847ff['attributes'][_0xff4a('0x48')]?_0x4847ff[_0xff4a('0x45')]:_0x286330['model'];if(!_0x802716[_0xff4a('0x41')][_0xff4a('0x49')]('nolimit')){_0x4847ff[_0xff4a('0x31')]=qs[_0xff4a('0x31')](_0x802716['query']['limit']);_0x4847ff['offset']=qs[_0xff4a('0x4a')](_0x802716['query'][_0xff4a('0x4a')]);}_0x4847ff[_0xff4a('0x4b')]=qs[_0xff4a('0x4c')](_0x802716[_0xff4a('0x41')]['sort']);_0x4847ff[_0xff4a('0x4d')]=qs['filters'](_[_0xff4a('0x4e')](_0x802716[_0xff4a('0x41')],_0x286330[_0xff4a('0x43')]));if(_0x802716[_0xff4a('0x41')][_0xff4a('0x4f')]){_0x4847ff[_0xff4a('0x4d')]=_['merge'](_0x4847ff[_0xff4a('0x4d')],{'$or':_[_0xff4a('0x50')](_0x36c217,function(_0x32f02f){if(_0x32f02f[_0xff4a('0x3f')]!==_0xff4a('0x51')){var _0x54b2fd={};_0x54b2fd[_0x32f02f['name']]={'$like':'%'+_0x802716['query'][_0xff4a('0x4f')]+'%'};return _0x54b2fd;}})});}_0x4847ff=_[_0xff4a('0x52')]({},_0x4847ff,_0x802716[_0xff4a('0x53')]);var _0x29c516={'where':_0x4847ff[_0xff4a('0x4d')]};return db[_0xff4a('0x3d')][_0xff4a('0x30')](_0x29c516)[_0xff4a('0x20')](function(_0x276e70){_0x5b1041['count']=_0x276e70;if(_0x802716[_0xff4a('0x41')][_0xff4a('0x54')]){_0x4847ff[_0xff4a('0x55')]=[{'all':!![]}];}return db[_0xff4a('0x3d')][_0xff4a('0x56')](_0x4847ff);})[_0xff4a('0x20')](function(_0x1abff1){_0x5b1041['rows']=_0x1abff1;return _0x5b1041;})[_0xff4a('0x20')](respondWithFilteredResult(_0xec30b2,_0x4847ff))[_0xff4a('0x2b')](handleError(_0xec30b2,null));};exports[_0xff4a('0x57')]=function(_0x179033,_0x33c672){var _0x29d9e7={'raw':![],'where':{'id':_0x179033['params']['id']}},_0x3726f7={};_0x3726f7[_0xff4a('0x46')]=_[_0xff4a('0x42')](db['Trunk']['rawAttributes']);_0x3726f7[_0xff4a('0x41')]=_[_0xff4a('0x42')](_0x179033['query']);_0x3726f7[_0xff4a('0x43')]=_[_0xff4a('0x44')](_0x3726f7[_0xff4a('0x46')],_0x3726f7['query']);_0x29d9e7['attributes']=_['intersection'](_0x3726f7['model'],qs[_0xff4a('0x47')](_0x179033[_0xff4a('0x41')][_0xff4a('0x47')]));_0x29d9e7[_0xff4a('0x45')]=_0x29d9e7[_0xff4a('0x45')][_0xff4a('0x48')]?_0x29d9e7[_0xff4a('0x45')]:_0x3726f7[_0xff4a('0x46')];if(_0x179033[_0xff4a('0x41')][_0xff4a('0x54')]){_0x29d9e7[_0xff4a('0x55')]=[{'all':!![]}];}_0x29d9e7=_['merge']({},_0x29d9e7,_0x179033[_0xff4a('0x53')]);return db[_0xff4a('0x3d')][_0xff4a('0x58')](_0x29d9e7)['then'](handleEntityNotFound(_0x33c672,null))['then'](respondWithResult(_0x33c672,null))['catch'](handleError(_0x33c672,null));};exports['clone']=function(_0x21115d,_0x559b43){var _0x50e551={'where':{'id':_0x21115d['params']['id']}},_0x40d4b6={};_0x40d4b6[_0xff4a('0x46')]=_[_0xff4a('0x42')](db[_0xff4a('0x3d')]['rawAttributes']);_0x50e551['attributes']=_[_0xff4a('0x44')](_0x40d4b6[_0xff4a('0x46')],qs[_0xff4a('0x47')](_0x21115d[_0xff4a('0x41')]['fields']));_0x50e551[_0xff4a('0x45')]=_0x50e551[_0xff4a('0x45')][_0xff4a('0x48')]?_0x50e551[_0xff4a('0x45')]:_0x40d4b6[_0xff4a('0x46')];if(_0x21115d['query'][_0xff4a('0x54')]){_0x50e551[_0xff4a('0x55')]=[{'all':!![]}];}_0x50e551=_['merge']({},_0x50e551,_0x21115d[_0xff4a('0x53')]);return db[_0xff4a('0x3d')]['find'](_0x50e551)[_0xff4a('0x20')](handleEntityNotFound(_0x559b43,null))[_0xff4a('0x20')](function(_0x1f8fa3){if(_0x1f8fa3){var _0x4a0ebe=_0x1f8fa3[_0xff4a('0x38')]({'plain':!![]});_0x4a0ebe=qs[_0xff4a('0x59')](_0x4a0ebe,['id','createdAt',_0xff4a('0x5a')]);_0x21115d[_0xff4a('0x5b')]=_[_0xff4a('0x59')](_0x21115d[_0xff4a('0x5b')],['id',_0xff4a('0x5c'),_0xff4a('0x5a')]);return db[_0xff4a('0x3d')][_0xff4a('0x5d')](_['merge'](_0x4a0ebe,_0x21115d[_0xff4a('0x5b')]),{'include':_0x21115d[_0xff4a('0x41')]['includeAll']?[{'all':!![]}]:undefined})['then'](function(_0x35281d){var _0xa7df6=_0x21115d[_0xff4a('0x5e')][_0xff4a('0x38')]({'plain':!![]});if(!_0xa7df6)throw new Error(_0xff4a('0x5f'));if(_0xa7df6['role']===_0xff4a('0x5e')){var _0x389f69=_0x35281d[_0xff4a('0x38')]({'plain':!![]});var _0x40c575=_0xff4a('0x60');return db[_0xff4a('0x61')][_0xff4a('0x58')]({'where':{'name':_0x40c575,'userProfileId':_0xa7df6['userProfileId']},'raw':!![]})[_0xff4a('0x20')](function(_0x409d43){if(_0x409d43&&_0x409d43[_0xff4a('0x62')]===0x0){return db['UserProfileResource']['create']({'name':_0x389f69[_0xff4a('0x3a')],'resourceId':_0x389f69['id'],'type':_0x409d43[_0xff4a('0x3a')],'sectionId':_0x409d43['id']},{})[_0xff4a('0x20')](function(){return _0x35281d;});}else{return _0x35281d;}})[_0xff4a('0x2b')](function(_0x143a8c){logger['error'](_0xff4a('0x63'),_0x143a8c);throw _0x143a8c;});}return _0x35281d;});}})[_0xff4a('0x20')](respondWithResult(_0x559b43,0xc9))[_0xff4a('0x2b')](handleError(_0x559b43,null));};exports[_0xff4a('0x5d')]=function(_0x542288,_0xfe7aba,_0x326aa1){var _0xc82ff;return db[_0xff4a('0x3d')]['create'](_0x542288[_0xff4a('0x5b')],{'raw':!![]})[_0xff4a('0x20')](function(_0x2c0da3){_0xc82ff=_0x2c0da3;return db[_0xff4a('0x3d')][_0xff4a('0x56')]({'raw':!![]});})[_0xff4a('0x20')](function(_0x2c6d4b){var _0x5a83ce=fs[_0xff4a('0x64')](path[_0xff4a('0x65')](config['root'],'server/files/templates/trunk.ejs'),_0xff4a('0x66'));var _0x3ad9af=fs[_0xff4a('0x64')](path[_0xff4a('0x65')](config[_0xff4a('0x67')],'server/files/templates/registry.ejs'),'utf8');var _0x5b2e58=ejs[_0xff4a('0x68')](_0x5a83ce,{'trunks':_0x2c6d4b||[]});fs[_0xff4a('0x69')](_0xff4a('0x6a'),_0x5b2e58);if(_0xc82ff[_0xff4a('0x6b')]){var _0x49f3a4=ejs[_0xff4a('0x68')](_0x3ad9af,{'trunks':_0x2c6d4b||[]});fs[_0xff4a('0x69')](_0xff4a('0x6c'),_0x49f3a4);}})[_0xff4a('0x20')](function(){return respondWithRpcPromise(_0xff4a('0x6d'),'create',{'module':_0xff4a('0x6e')});})[_0xff4a('0x20')](function(){var _0x2012a4=_0x542288[_0xff4a('0x5e')][_0xff4a('0x38')]({'plain':!![]});if(!_0x2012a4)throw new Error(_0xff4a('0x5f'));if(_0x2012a4[_0xff4a('0x6f')]===_0xff4a('0x5e')){var _0x5e1f07=_0xc82ff[_0xff4a('0x38')]({'plain':!![]});return db[_0xff4a('0x61')][_0xff4a('0x58')]({'where':{'name':_0xff4a('0x60'),'userProfileId':_0x2012a4[_0xff4a('0x70')]},'raw':!![]})[_0xff4a('0x20')](function(_0x192bb5){if(_0x192bb5&&_0x192bb5[_0xff4a('0x62')]===0x0){return db[_0xff4a('0x39')]['create']({'name':_0x5e1f07[_0xff4a('0x3a')],'resourceId':_0x5e1f07['id'],'type':_0x192bb5[_0xff4a('0x3a')],'sectionId':_0x192bb5['id']},{})[_0xff4a('0x20')](function(){return _0xc82ff;});}else{return _0xc82ff;}})[_0xff4a('0x2b')](function(_0x2e6aa5){logger[_0xff4a('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2e6aa5);throw _0x2e6aa5;});}return _0xc82ff;})['then'](respondWithResult(_0xfe7aba,0xc9))['catch'](handleError(_0xfe7aba,null));};exports[_0xff4a('0x36')]=function(_0x425760,_0x1bfa11,_0x633b23){var _0x516a57;return db[_0xff4a('0x3d')][_0xff4a('0x58')]({'where':{'id':_0x425760[_0xff4a('0x71')]['id']}})[_0xff4a('0x20')](handleEntityNotFound(_0x1bfa11,null))['then'](saveUpdates(_0x425760[_0xff4a('0x5b')],null))['then'](function(_0x56aa53){if(_0x56aa53){_0x516a57=_0x56aa53;return db[_0xff4a('0x3d')][_0xff4a('0x56')]({'raw':!![]});}})['then'](function(_0x333595){if(_0x333595){var _0x477150=fs['readFileSync'](path[_0xff4a('0x65')](config[_0xff4a('0x67')],'server/files/templates/trunk.ejs'),_0xff4a('0x66'));var _0x375950=fs['readFileSync'](path[_0xff4a('0x65')](config[_0xff4a('0x67')],_0xff4a('0x72')),'utf8');var _0x113c23=ejs['render'](_0x477150,{'trunks':_0x333595||[]});fs['writeFileSync'](_0xff4a('0x6a'),_0x113c23);var _0x95d7ff=ejs[_0xff4a('0x68')](_0x375950,{'trunks':_0x333595||[]});fs['writeFileSync'](_0xff4a('0x6c'),_0x95d7ff);return respondWithRpcPromise(_0xff4a('0x6d'),'update',{'module':'chan_sip.so'});}return null;})['then'](function(_0x3cb94f){if(_0x3cb94f){return _0x516a57;}})[_0xff4a('0x20')](respondWithResult(_0x1bfa11,null))[_0xff4a('0x2b')](handleError(_0x1bfa11,null));};exports['destroy']=function(_0x1c3231,_0x413590,_0x4448f3){var _0x224722;return db['Trunk']['find']({'where':{'id':_0x1c3231[_0xff4a('0x71')]['id']}})[_0xff4a('0x20')](handleEntityNotFound(_0x413590,null))[_0xff4a('0x20')](removeEntity(_0x413590,null))[_0xff4a('0x20')](function(){return db[_0xff4a('0x3d')]['findAll']({'raw':!![]});})['then'](function(_0x1bf884){var _0x40c779=fs['readFileSync'](path[_0xff4a('0x65')](config[_0xff4a('0x67')],_0xff4a('0x73')),_0xff4a('0x66'));var _0x35d285=fs['readFileSync'](path[_0xff4a('0x65')](config[_0xff4a('0x67')],_0xff4a('0x72')),'utf8');var _0x5ca4ac=ejs[_0xff4a('0x68')](_0x40c779,{'trunks':_0x1bf884});var _0x2c6861=ejs[_0xff4a('0x68')](_0x35d285,{'trunks':_0x1bf884});fs['writeFileSync'](_0xff4a('0x6a'),_0x5ca4ac);fs[_0xff4a('0x69')](_0xff4a('0x6c'),_0x2c6861);return respondWithRpcPromise(_0xff4a('0x6d'),_0xff4a('0x37'),{'module':_0xff4a('0x6e')});})[_0xff4a('0x2b')](handleError(_0x413590,null));};
\ No newline at end of file
+var _0x4592=['crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','jayson/promise','client','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','Trunk,\x20%s,\x20%s','debug','Trunk,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','status','end','json','offset','limit','set','apply','reject','save','destroy','get','Trunks','UserProfileResource','sendStatus','name','send','index','map','Trunk','rawAttributes','fieldName','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','count','includeAll','findAll','show','include','clone','find','omit','createdAt','updatedAt','body','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','server/files/templates/trunk.ejs','utf8','root','server/files/templates/registry.ejs','render','/etc/asterisk/sip_xcally_trunks.conf','registry','writeFileSync','/etc/asterisk/sip_xcally_registers.conf','update','readFileSync','join','Reload','params','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel'];(function(_0x5b6990,_0x26309e){var _0x14db4a=function(_0x4ccc82){while(--_0x4ccc82){_0x5b6990['push'](_0x5b6990['shift']());}};_0x14db4a(++_0x26309e);}(_0x4592,0x69));var _0x2459=function(_0x57e9b2,_0x2813cf){_0x57e9b2=_0x57e9b2-0x0;var _0x5503d7=_0x4592[_0x57e9b2];return _0x5503d7;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x2459('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x2459('0x1'));var jsonpatch=require(_0x2459('0x2'));var rp=require('request-promise');var moment=require(_0x2459('0x3'));var BPromise=require(_0x2459('0x4'));var Mustache=require(_0x2459('0x5'));var util=require(_0x2459('0x6'));var path=require('path');var sox=require(_0x2459('0x7'));var csv=require(_0x2459('0x8'));var ejs=require(_0x2459('0x9'));var fs=require('fs');var _=require(_0x2459('0xa'));var squel=require(_0x2459('0xb'));var crypto=require(_0x2459('0xc'));var jsforce=require(_0x2459('0xd'));var deskjs=require(_0x2459('0xe'));var toCsv=require(_0x2459('0x8'));var querystring=require(_0x2459('0xf'));var Papa=require(_0x2459('0x10'));var Redis=require(_0x2459('0x11'));var authService=require(_0x2459('0x12'));var qs=require(_0x2459('0x13'));var as=require(_0x2459('0x14'));var hardwareService=require(_0x2459('0x15'));var logger=require(_0x2459('0x16'))(_0x2459('0x17'));var utils=require('../../config/utils');var config=require(_0x2459('0x18'));var db=require(_0x2459('0x19'))['db'];var jayson=require(_0x2459('0x1a'));var client=jayson[_0x2459('0x1b')]['http']({'port':0x232a});function checkPasswordPattern(_0x2121b3,_0x2b090f,_0x591eea){if(_0x591eea){var _0x5db421=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x5db421[_0x2459('0x1c')](_0x2b090f)){return _0x2121b3;}else{throw new db[(_0x2459('0x1d'))][(_0x2459('0x1e'))](_0x2459('0x1f'));}}else{return _0x2121b3;}}function respondWithRpcPromise(_0x22ac36,_0x198740,_0x27c721,_0x299196){return new BPromise(function(_0x26f163,_0x399203){var _0x207fad=_0x299196||client;return _0x207fad[_0x2459('0x20')](_0x22ac36,_0x27c721)[_0x2459('0x21')](function(_0x5ed6e6){logger[_0x2459('0x22')](_0x2459('0x23'),_0x198740,'request\x20sent');logger[_0x2459('0x24')](_0x2459('0x25'),_0x198740,_0x2459('0x26'),JSON[_0x2459('0x27')](_0x5ed6e6));if(_0x5ed6e6['error']){if(_0x5ed6e6[_0x2459('0x28')][_0x2459('0x29')]===0x1f4){logger['error'](_0x2459('0x23'),_0x198740,_0x5ed6e6[_0x2459('0x28')][_0x2459('0x2a')]);return _0x399203(_0x5ed6e6[_0x2459('0x28')][_0x2459('0x2a')]);}logger['error'](_0x2459('0x23'),_0x198740,_0x5ed6e6['error'][_0x2459('0x2a')]);return _0x26f163(_0x5ed6e6[_0x2459('0x28')][_0x2459('0x2a')]);}else{logger['info'](_0x2459('0x23'),_0x198740,_0x2459('0x26'));_0x26f163(_0x5ed6e6['result'][_0x2459('0x2a')]);}})[_0x2459('0x2b')](function(_0x125846){logger[_0x2459('0x28')](_0x2459('0x23'),_0x198740,_0x125846);_0x399203(_0x125846);});});}function respondWithStatusCode(_0x323884,_0x1ab3af){_0x1ab3af=_0x1ab3af||0xcc;return function(_0x4fe70c){if(_0x4fe70c){return _0x323884['sendStatus'](_0x1ab3af);}return _0x323884[_0x2459('0x2c')](_0x1ab3af)[_0x2459('0x2d')]();};}function respondWithResult(_0x1e5c97,_0x3e01cd){_0x3e01cd=_0x3e01cd||0xc8;return function(_0x536e87){if(_0x536e87){return _0x1e5c97['status'](_0x3e01cd)[_0x2459('0x2e')](_0x536e87);}};}function respondWithFilteredResult(_0x86370d,_0x239c01){return function(_0x13f16b){if(_0x13f16b){var _0x290451=_0x13f16b['count'],_0x157a53=_0x239c01['offset'],_0x14e4fc=_0x239c01[_0x2459('0x2f')]+_0x239c01[_0x2459('0x30')],_0x47e17d;if(_0x14e4fc>=_0x290451){_0x14e4fc=_0x290451;_0x47e17d=0xc8;}else{_0x47e17d=0xce;}_0x86370d[_0x2459('0x2c')](_0x47e17d);return _0x86370d[_0x2459('0x31')]('Content-Range',_0x157a53+'-'+_0x14e4fc+'/'+_0x290451)[_0x2459('0x2e')](_0x13f16b);}return null;};}function patchUpdates(_0x26ecde){return function(_0x1d70c0){try{jsonpatch[_0x2459('0x32')](_0x1d70c0,_0x26ecde,!![]);}catch(_0x49b70f){return BPromise[_0x2459('0x33')](_0x49b70f);}return _0x1d70c0[_0x2459('0x34')]();};}function saveUpdates(_0x5303d4,_0x5a622e){return function(_0x58c34f){if(_0x58c34f){return _0x58c34f['update'](_0x5303d4)[_0x2459('0x21')](function(_0x402525){return _0x402525;});}return null;};}function removeEntity(_0x1d8eaa,_0x37b6bc){return function(_0xf602e0){if(_0xf602e0){return _0xf602e0[_0x2459('0x35')]()[_0x2459('0x21')](function(){var _0x42ba18=_0xf602e0[_0x2459('0x36')]({'plain':!![]});var _0x21e3c0=_0x2459('0x37');return db[_0x2459('0x38')][_0x2459('0x35')]({'where':{'type':_0x21e3c0,'resourceId':_0x42ba18['id']}})[_0x2459('0x21')](function(){return _0xf602e0;});})[_0x2459('0x21')](function(){_0x1d8eaa[_0x2459('0x2c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2976f7,_0x5444e6){return function(_0x184d68){if(!_0x184d68){_0x2976f7[_0x2459('0x39')](0x194);}return _0x184d68;};}function handleError(_0x31c005,_0x542d57){_0x542d57=_0x542d57||0x1f4;return function(_0x2c02b1){logger[_0x2459('0x28')](_0x2c02b1['stack']);if(_0x2c02b1[_0x2459('0x3a')]){delete _0x2c02b1[_0x2459('0x3a')];}_0x31c005[_0x2459('0x2c')](_0x542d57)[_0x2459('0x3b')](_0x2c02b1);};}exports[_0x2459('0x3c')]=function(_0x2e1d65,_0x4da189){var _0x179cd0={},_0x1fc295={},_0x3b384c={'count':0x0,'rows':[]};var _0x32fc31=_[_0x2459('0x3d')](db[_0x2459('0x3e')][_0x2459('0x3f')],function(_0x17d55f){return{'name':_0x17d55f[_0x2459('0x40')],'type':_0x17d55f['type'][_0x2459('0x41')]};});_0x1fc295[_0x2459('0x42')]=_[_0x2459('0x3d')](_0x32fc31,_0x2459('0x3a'));_0x1fc295[_0x2459('0x43')]=_[_0x2459('0x44')](_0x2e1d65[_0x2459('0x43')]);_0x1fc295['filters']=_[_0x2459('0x45')](_0x1fc295[_0x2459('0x42')],_0x1fc295[_0x2459('0x43')]);_0x179cd0[_0x2459('0x46')]=_[_0x2459('0x45')](_0x1fc295['model'],qs[_0x2459('0x47')](_0x2e1d65[_0x2459('0x43')][_0x2459('0x47')]));_0x179cd0[_0x2459('0x46')]=_0x179cd0[_0x2459('0x46')][_0x2459('0x48')]?_0x179cd0[_0x2459('0x46')]:_0x1fc295[_0x2459('0x42')];if(!_0x2e1d65[_0x2459('0x43')][_0x2459('0x49')]('nolimit')){_0x179cd0[_0x2459('0x30')]=qs[_0x2459('0x30')](_0x2e1d65[_0x2459('0x43')][_0x2459('0x30')]);_0x179cd0['offset']=qs[_0x2459('0x2f')](_0x2e1d65[_0x2459('0x43')][_0x2459('0x2f')]);}_0x179cd0[_0x2459('0x4a')]=qs['sort'](_0x2e1d65[_0x2459('0x43')][_0x2459('0x4b')]);_0x179cd0[_0x2459('0x4c')]=qs[_0x2459('0x4d')](_[_0x2459('0x4e')](_0x2e1d65[_0x2459('0x43')],_0x1fc295[_0x2459('0x4d')]));if(_0x2e1d65[_0x2459('0x43')][_0x2459('0x4f')]){_0x179cd0[_0x2459('0x4c')]=_[_0x2459('0x50')](_0x179cd0[_0x2459('0x4c')],{'$or':_['map'](_0x32fc31,function(_0x195736){if(_0x195736[_0x2459('0x51')]!==_0x2459('0x52')){var _0x35de30={};_0x35de30[_0x195736['name']]={'$like':'%'+_0x2e1d65['query'][_0x2459('0x4f')]+'%'};return _0x35de30;}})});}_0x179cd0=_[_0x2459('0x50')]({},_0x179cd0,_0x2e1d65[_0x2459('0x53')]);var _0x3a60f6={'where':_0x179cd0[_0x2459('0x4c')]};return db['Trunk'][_0x2459('0x54')](_0x3a60f6)[_0x2459('0x21')](function(_0x44fbc5){_0x3b384c[_0x2459('0x54')]=_0x44fbc5;if(_0x2e1d65[_0x2459('0x43')][_0x2459('0x55')]){_0x179cd0['include']=[{'all':!![]}];}return db['Trunk'][_0x2459('0x56')](_0x179cd0);})[_0x2459('0x21')](function(_0x1a4922){_0x3b384c['rows']=_0x1a4922;return _0x3b384c;})['then'](respondWithFilteredResult(_0x4da189,_0x179cd0))[_0x2459('0x2b')](handleError(_0x4da189,null));};exports[_0x2459('0x57')]=function(_0x48db63,_0x485149){var _0x39623e={'raw':![],'where':{'id':_0x48db63['params']['id']}},_0x4499c7={};_0x4499c7[_0x2459('0x42')]=_['keys'](db[_0x2459('0x3e')][_0x2459('0x3f')]);_0x4499c7[_0x2459('0x43')]=_[_0x2459('0x44')](_0x48db63[_0x2459('0x43')]);_0x4499c7[_0x2459('0x4d')]=_[_0x2459('0x45')](_0x4499c7[_0x2459('0x42')],_0x4499c7[_0x2459('0x43')]);_0x39623e['attributes']=_[_0x2459('0x45')](_0x4499c7[_0x2459('0x42')],qs[_0x2459('0x47')](_0x48db63['query'][_0x2459('0x47')]));_0x39623e[_0x2459('0x46')]=_0x39623e[_0x2459('0x46')][_0x2459('0x48')]?_0x39623e[_0x2459('0x46')]:_0x4499c7['model'];if(_0x48db63[_0x2459('0x43')]['includeAll']){_0x39623e[_0x2459('0x58')]=[{'all':!![]}];}_0x39623e=_[_0x2459('0x50')]({},_0x39623e,_0x48db63['options']);return db[_0x2459('0x3e')]['find'](_0x39623e)[_0x2459('0x21')](handleEntityNotFound(_0x485149,null))['then'](respondWithResult(_0x485149,null))['catch'](handleError(_0x485149,null));};exports[_0x2459('0x59')]=function(_0x789167,_0x51c1a6){var _0x5da1ba={'where':{'id':_0x789167['params']['id']}},_0x4c171f={};_0x4c171f['model']=_['keys'](db[_0x2459('0x3e')]['rawAttributes']);_0x5da1ba[_0x2459('0x46')]=_[_0x2459('0x45')](_0x4c171f['model'],qs[_0x2459('0x47')](_0x789167[_0x2459('0x43')][_0x2459('0x47')]));_0x5da1ba['attributes']=_0x5da1ba[_0x2459('0x46')][_0x2459('0x48')]?_0x5da1ba['attributes']:_0x4c171f[_0x2459('0x42')];if(_0x789167[_0x2459('0x43')][_0x2459('0x55')]){_0x5da1ba[_0x2459('0x58')]=[{'all':!![]}];}_0x5da1ba=_[_0x2459('0x50')]({},_0x5da1ba,_0x789167[_0x2459('0x53')]);return db['Trunk'][_0x2459('0x5a')](_0x5da1ba)[_0x2459('0x21')](handleEntityNotFound(_0x51c1a6,null))[_0x2459('0x21')](function(_0x680e3){if(_0x680e3){var _0x52f541=_0x680e3[_0x2459('0x36')]({'plain':!![]});_0x52f541=qs[_0x2459('0x5b')](_0x52f541,['id',_0x2459('0x5c'),_0x2459('0x5d')]);_0x789167[_0x2459('0x5e')]=_[_0x2459('0x5b')](_0x789167[_0x2459('0x5e')],['id','createdAt',_0x2459('0x5d')]);return db[_0x2459('0x3e')][_0x2459('0x5f')](_[_0x2459('0x50')](_0x52f541,_0x789167['body']),{'include':_0x789167[_0x2459('0x43')][_0x2459('0x55')]?[{'all':!![]}]:undefined})[_0x2459('0x21')](function(_0x2ffe80){var _0x6debde=_0x789167[_0x2459('0x60')][_0x2459('0x36')]({'plain':!![]});if(!_0x6debde)throw new Error(_0x2459('0x61'));if(_0x6debde[_0x2459('0x62')]===_0x2459('0x60')){var _0x306ce3=_0x2ffe80[_0x2459('0x36')]({'plain':!![]});var _0x4db3a1='Trunks';return db[_0x2459('0x63')][_0x2459('0x5a')]({'where':{'name':_0x4db3a1,'userProfileId':_0x6debde[_0x2459('0x64')]},'raw':!![]})['then'](function(_0x21f535){if(_0x21f535&&_0x21f535[_0x2459('0x65')]===0x0){return db[_0x2459('0x38')][_0x2459('0x5f')]({'name':_0x306ce3[_0x2459('0x3a')],'resourceId':_0x306ce3['id'],'type':_0x21f535[_0x2459('0x3a')],'sectionId':_0x21f535['id']},{})[_0x2459('0x21')](function(){return _0x2ffe80;});}else{return _0x2ffe80;}})['catch'](function(_0x5ac731){logger['error'](_0x2459('0x66'),_0x5ac731);throw _0x5ac731;});}return _0x2ffe80;});}})[_0x2459('0x21')](respondWithResult(_0x51c1a6,0xc9))[_0x2459('0x2b')](handleError(_0x51c1a6,null));};exports['create']=function(_0x20bc67,_0x5646df,_0x4caede){var _0x18a20a;return db[_0x2459('0x3e')]['create'](_0x20bc67[_0x2459('0x5e')],{'raw':!![]})[_0x2459('0x21')](function(_0x35084b){_0x18a20a=_0x35084b;return db[_0x2459('0x3e')]['findAll']({'raw':!![]});})['then'](function(_0x5ae35d){var _0x5c0a92=fs['readFileSync'](path['join'](config['root'],_0x2459('0x67')),_0x2459('0x68'));var _0x4ea064=fs['readFileSync'](path['join'](config[_0x2459('0x69')],_0x2459('0x6a')),_0x2459('0x68'));var _0x27f9f0=ejs[_0x2459('0x6b')](_0x5c0a92,{'trunks':_0x5ae35d||[]});fs['writeFileSync'](_0x2459('0x6c'),_0x27f9f0);if(_0x18a20a[_0x2459('0x6d')]){var _0x4fe85b=ejs[_0x2459('0x6b')](_0x4ea064,{'trunks':_0x5ae35d||[]});fs[_0x2459('0x6e')](_0x2459('0x6f'),_0x4fe85b);}})['then'](function(){return respondWithRpcPromise('Reload',_0x2459('0x5f'),{'module':'chan_sip.so'});})[_0x2459('0x21')](function(){var _0x1978ba=_0x20bc67['user'][_0x2459('0x36')]({'plain':!![]});if(!_0x1978ba)throw new Error(_0x2459('0x61'));if(_0x1978ba['role']===_0x2459('0x60')){var _0x10c563=_0x18a20a[_0x2459('0x36')]({'plain':!![]});return db['UserProfileSection'][_0x2459('0x5a')]({'where':{'name':_0x2459('0x37'),'userProfileId':_0x1978ba[_0x2459('0x64')]},'raw':!![]})[_0x2459('0x21')](function(_0x556e0e){if(_0x556e0e&&_0x556e0e[_0x2459('0x65')]===0x0){return db[_0x2459('0x38')][_0x2459('0x5f')]({'name':_0x10c563[_0x2459('0x3a')],'resourceId':_0x10c563['id'],'type':_0x556e0e[_0x2459('0x3a')],'sectionId':_0x556e0e['id']},{})[_0x2459('0x21')](function(){return _0x18a20a;});}else{return _0x18a20a;}})[_0x2459('0x2b')](function(_0x43a997){logger[_0x2459('0x28')](_0x2459('0x66'),_0x43a997);throw _0x43a997;});}return _0x18a20a;})['then'](respondWithResult(_0x5646df,0xc9))[_0x2459('0x2b')](handleError(_0x5646df,null));};exports[_0x2459('0x70')]=function(_0x21c218,_0x5a0a4d,_0x3f0243){var _0x40e213;return db[_0x2459('0x3e')]['find']({'where':{'id':_0x21c218['params']['id']}})[_0x2459('0x21')](handleEntityNotFound(_0x5a0a4d,null))[_0x2459('0x21')](saveUpdates(_0x21c218['body'],null))[_0x2459('0x21')](function(_0x5d469c){if(_0x5d469c){_0x40e213=_0x5d469c;return db[_0x2459('0x3e')][_0x2459('0x56')]({'raw':!![]});}})['then'](function(_0x483700){if(_0x483700){var _0x464691=fs[_0x2459('0x71')](path[_0x2459('0x72')](config['root'],_0x2459('0x67')),_0x2459('0x68'));var _0x5c1d05=fs[_0x2459('0x71')](path[_0x2459('0x72')](config[_0x2459('0x69')],_0x2459('0x6a')),'utf8');var _0x1c92db=ejs[_0x2459('0x6b')](_0x464691,{'trunks':_0x483700||[]});fs[_0x2459('0x6e')](_0x2459('0x6c'),_0x1c92db);var _0x4bc5e4=ejs['render'](_0x5c1d05,{'trunks':_0x483700||[]});fs['writeFileSync']('/etc/asterisk/sip_xcally_registers.conf',_0x4bc5e4);return respondWithRpcPromise(_0x2459('0x73'),_0x2459('0x70'),{'module':'chan_sip.so'});}return null;})[_0x2459('0x21')](function(_0x26aadb){if(_0x26aadb){return _0x40e213;}})['then'](respondWithResult(_0x5a0a4d,null))['catch'](handleError(_0x5a0a4d,null));};exports[_0x2459('0x35')]=function(_0x3213bc,_0x12b140,_0x23cbb7){var _0x106e30;return db[_0x2459('0x3e')][_0x2459('0x5a')]({'where':{'id':_0x3213bc[_0x2459('0x74')]['id']}})[_0x2459('0x21')](handleEntityNotFound(_0x12b140,null))[_0x2459('0x21')](removeEntity(_0x12b140,null))['then'](function(){return db['Trunk'][_0x2459('0x56')]({'raw':!![]});})[_0x2459('0x21')](function(_0x2f1ec6){var _0x4a2a73=fs['readFileSync'](path[_0x2459('0x72')](config[_0x2459('0x69')],_0x2459('0x67')),_0x2459('0x68'));var _0x2f3111=fs[_0x2459('0x71')](path[_0x2459('0x72')](config[_0x2459('0x69')],_0x2459('0x6a')),_0x2459('0x68'));var _0x35517c=ejs['render'](_0x4a2a73,{'trunks':_0x2f1ec6});var _0x4deab8=ejs[_0x2459('0x6b')](_0x2f3111,{'trunks':_0x2f1ec6});fs[_0x2459('0x6e')]('/etc/asterisk/sip_xcally_trunks.conf',_0x35517c);fs['writeFileSync']('/etc/asterisk/sip_xcally_registers.conf',_0x4deab8);return respondWithRpcPromise(_0x2459('0x73'),_0x2459('0x35'),{'module':'chan_sip.so'});})[_0x2459('0x2b')](handleError(_0x12b140,null));};
\ No newline at end of file
diff --git a/server/api/trunk/trunk.model.js b/server/api/trunk/trunk.model.js
index 022dfd8..852966f 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 _0xbdf6=['exports','Trunk','tools_trunks','lodash','util','api','bluebird','request-promise','path','rimraf','./trunk.attributes'];(function(_0x466a1b,_0x25514c){var _0x5f32b5=function(_0x21942f){while(--_0x21942f){_0x466a1b['push'](_0x466a1b['shift']());}};_0x5f32b5(++_0x25514c);}(_0xbdf6,0x137));var _0x6bdf=function(_0x231944,_0x552484){_0x231944=_0x231944-0x0;var _0x550df1=_0xbdf6[_0x231944];return _0x550df1;};'use strict';var _=require(_0x6bdf('0x0'));var util=require(_0x6bdf('0x1'));var logger=require('../../config/logger')(_0x6bdf('0x2'));var moment=require('moment');var BPromise=require(_0x6bdf('0x3'));var rp=require(_0x6bdf('0x4'));var fs=require('fs');var path=require(_0x6bdf('0x5'));var rimraf=require(_0x6bdf('0x6'));var config=require('../../config/environment');var attributes=require(_0x6bdf('0x7'));module[_0x6bdf('0x8')]=function(_0x4984ed,_0x359f8f){return _0x4984ed['define'](_0x6bdf('0x9'),attributes,{'tableName':_0x6bdf('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7b4b=['rimraf','../../config/environment','./trunk.attributes','exports','define','Trunk','tools_trunks','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x2e7079,_0x3ef2a5){var _0x226df1=function(_0x542fac){while(--_0x542fac){_0x2e7079['push'](_0x2e7079['shift']());}};_0x226df1(++_0x3ef2a5);}(_0x7b4b,0x7f));var _0xb7b4=function(_0x33bc64,_0x4d1e92){_0x33bc64=_0x33bc64-0x0;var _0x3fdd34=_0x7b4b[_0x33bc64];return _0x3fdd34;};'use strict';var _=require(_0xb7b4('0x0'));var util=require(_0xb7b4('0x1'));var logger=require(_0xb7b4('0x2'))(_0xb7b4('0x3'));var moment=require(_0xb7b4('0x4'));var BPromise=require(_0xb7b4('0x5'));var rp=require(_0xb7b4('0x6'));var fs=require('fs');var path=require(_0xb7b4('0x7'));var rimraf=require(_0xb7b4('0x8'));var config=require(_0xb7b4('0x9'));var attributes=require(_0xb7b4('0xa'));module[_0xb7b4('0xb')]=function(_0x45e105,_0x55fe66){return _0x45e105[_0xb7b4('0xc')](_0xb7b4('0xd'),attributes,{'tableName':_0xb7b4('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 bf63e8f..e1cb39e 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 _0x0b0e=['model','GetTrunk','Trunk','find','where','include','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Trunk,\x20%s,\x20%s','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','findAll','raw','options','attributes','map'];(function(_0x15d773,_0x5c92b2){var _0x5081ac=function(_0x3ac892){while(--_0x3ac892){_0x15d773['push'](_0x15d773['shift']());}};_0x5081ac(++_0x5c92b2);}(_0x0b0e,0x187));var _0xe0b0=function(_0x4f9b18,_0x2cb5ca){_0x4f9b18=_0x4f9b18-0x0;var _0x29f20c=_0x0b0e[_0x4f9b18];return _0x29f20c;};'use strict';var _=require(_0xe0b0('0x0'));var util=require('util');var moment=require(_0xe0b0('0x1'));var BPromise=require('bluebird');var rs=require(_0xe0b0('0x2'));var fs=require('fs');var Redis=require(_0xe0b0('0x3'));var db=require(_0xe0b0('0x4'))['db'];var utils=require(_0xe0b0('0x5'));var logger=require(_0xe0b0('0x6'))(_0xe0b0('0x7'));var config=require(_0xe0b0('0x8'));var jayson=require(_0xe0b0('0x9'));var client=jayson[_0xe0b0('0xa')][_0xe0b0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x219b1c,_0x5cf9cc,_0x50be7f){return new BPromise(function(_0x11effc,_0x435060){return client[_0xe0b0('0xc')](_0x219b1c,_0x50be7f)[_0xe0b0('0xd')](function(_0x4c24f9){logger[_0xe0b0('0xe')](_0xe0b0('0xf'),_0x5cf9cc,'request\x20sent');logger[_0xe0b0('0x10')](_0xe0b0('0x11'),_0x5cf9cc,'request\x20sent',JSON[_0xe0b0('0x12')](_0x4c24f9));if(_0x4c24f9[_0xe0b0('0x13')]){if(_0x4c24f9[_0xe0b0('0x13')]['code']===0x1f4){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x435060(_0x4c24f9[_0xe0b0('0x13')]['message']);}logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x11effc(_0x4c24f9[_0xe0b0('0x13')]['message']);}else{logger[_0xe0b0('0xe')]('Trunk,\x20%s,\x20%s',_0x5cf9cc,_0xe0b0('0x15'));_0x11effc(_0x4c24f9[_0xe0b0('0x16')]['message']);}})[_0xe0b0('0x17')](function(_0x4a4cc0){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4a4cc0);_0x435060(_0x4a4cc0);});});}exports['GetTrunk']=function(_0x54a3eb){var _0x46bb44=this;return new Promise(function(_0x50a441,_0x4df8da){return db['Trunk'][_0xe0b0('0x18')]({'raw':_0x54a3eb['options']?_0x54a3eb['options'][_0xe0b0('0x19')]===undefined?!![]:![]:!![],'where':_0x54a3eb['options']?_0x54a3eb[_0xe0b0('0x1a')]['where']||null:null,'attributes':_0x54a3eb[_0xe0b0('0x1a')]?_0x54a3eb[_0xe0b0('0x1a')][_0xe0b0('0x1b')]||null:null,'limit':_0x54a3eb[_0xe0b0('0x1a')]?_0x54a3eb[_0xe0b0('0x1a')]['limit']||null:null,'include':_0x54a3eb['options']?_0x54a3eb[_0xe0b0('0x1a')]['include']?_[_0xe0b0('0x1c')](_0x54a3eb[_0xe0b0('0x1a')]['include'],function(_0x170ad8){return{'model':db[_0x170ad8['model']],'as':_0x170ad8['as'],'attributes':_0x170ad8[_0xe0b0('0x1b')],'include':_0x170ad8['include']?_[_0xe0b0('0x1c')](_0x170ad8['include'],function(_0x3e5c88){return{'model':db[_0x3e5c88['model']],'as':_0x3e5c88['as'],'attributes':_0x3e5c88[_0xe0b0('0x1b')],'include':_0x3e5c88['include']?_[_0xe0b0('0x1c')](_0x3e5c88['include'],function(_0x362aba){return{'model':db[_0x362aba[_0xe0b0('0x1d')]],'as':_0x362aba['as'],'attributes':_0x362aba[_0xe0b0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xe0b0('0xd')](function(_0x3ec2){logger[_0xe0b0('0xe')]('GetTrunk',_0x54a3eb);logger[_0xe0b0('0x10')](_0xe0b0('0x1e'),_0x54a3eb,JSON['stringify'](_0x3ec2));_0x50a441(_0x3ec2);})[_0xe0b0('0x17')](function(_0x419b1f){logger[_0xe0b0('0x13')](_0xe0b0('0x1e'),_0x419b1f[_0xe0b0('0x14')],_0x54a3eb);_0x4df8da(_0x46bb44[_0xe0b0('0x13')](0x1f4,_0x419b1f[_0xe0b0('0x14')]));});});};exports['ShowTrunk']=function(_0x1854b8){var _0x3c0109=this;return new Promise(function(_0x48a9b5,_0x4fe400){return db[_0xe0b0('0x1f')][_0xe0b0('0x20')]({'raw':_0x1854b8[_0xe0b0('0x1a')]?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x19')]===undefined?!![]:![]:!![],'where':_0x1854b8['options']?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x21')]||null:null,'attributes':_0x1854b8[_0xe0b0('0x1a')]?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x1b')]||null:null,'include':_0x1854b8['options']?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x22')]?_[_0xe0b0('0x1c')](_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x22')],function(_0x12eeb8){return{'model':db[_0x12eeb8[_0xe0b0('0x1d')]],'as':_0x12eeb8['as'],'attributes':_0x12eeb8[_0xe0b0('0x1b')],'include':_0x12eeb8[_0xe0b0('0x22')]?_[_0xe0b0('0x1c')](_0x12eeb8[_0xe0b0('0x22')],function(_0x1a0c90){return{'model':db[_0x1a0c90[_0xe0b0('0x1d')]],'as':_0x1a0c90['as'],'attributes':_0x1a0c90[_0xe0b0('0x1b')],'include':_0x1a0c90[_0xe0b0('0x22')]?_['map'](_0x1a0c90[_0xe0b0('0x22')],function(_0x135be5){return{'model':db[_0x135be5[_0xe0b0('0x1d')]],'as':_0x135be5['as'],'attributes':_0x135be5[_0xe0b0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xe0b0('0xd')](function(_0x2c6e60){logger[_0xe0b0('0xe')]('ShowTrunk',_0x1854b8);logger['debug']('ShowTrunk',_0x1854b8,JSON['stringify'](_0x2c6e60));_0x48a9b5(_0x2c6e60);})[_0xe0b0('0x17')](function(_0xc3d967){logger[_0xe0b0('0x13')]('ShowTrunk',_0xc3d967[_0xe0b0('0x14')],_0x1854b8);_0x4fe400(_0x3c0109[_0xe0b0('0x13')](0x1f4,_0xc3d967[_0xe0b0('0x14')]));});});};
\ No newline at end of file
+var _0x0b0e=['model','GetTrunk','Trunk','find','where','include','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Trunk,\x20%s,\x20%s','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','findAll','raw','options','attributes','map'];(function(_0x33bced,_0x557204){var _0x1d40be=function(_0x852972){while(--_0x852972){_0x33bced['push'](_0x33bced['shift']());}};_0x1d40be(++_0x557204);}(_0x0b0e,0x187));var _0xe0b0=function(_0x110d59,_0x50c4fb){_0x110d59=_0x110d59-0x0;var _0x2fce64=_0x0b0e[_0x110d59];return _0x2fce64;};'use strict';var _=require(_0xe0b0('0x0'));var util=require('util');var moment=require(_0xe0b0('0x1'));var BPromise=require('bluebird');var rs=require(_0xe0b0('0x2'));var fs=require('fs');var Redis=require(_0xe0b0('0x3'));var db=require(_0xe0b0('0x4'))['db'];var utils=require(_0xe0b0('0x5'));var logger=require(_0xe0b0('0x6'))(_0xe0b0('0x7'));var config=require(_0xe0b0('0x8'));var jayson=require(_0xe0b0('0x9'));var client=jayson[_0xe0b0('0xa')][_0xe0b0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x219b1c,_0x5cf9cc,_0x50be7f){return new BPromise(function(_0x11effc,_0x435060){return client[_0xe0b0('0xc')](_0x219b1c,_0x50be7f)[_0xe0b0('0xd')](function(_0x4c24f9){logger[_0xe0b0('0xe')](_0xe0b0('0xf'),_0x5cf9cc,'request\x20sent');logger[_0xe0b0('0x10')](_0xe0b0('0x11'),_0x5cf9cc,'request\x20sent',JSON[_0xe0b0('0x12')](_0x4c24f9));if(_0x4c24f9[_0xe0b0('0x13')]){if(_0x4c24f9[_0xe0b0('0x13')]['code']===0x1f4){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x435060(_0x4c24f9[_0xe0b0('0x13')]['message']);}logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x11effc(_0x4c24f9[_0xe0b0('0x13')]['message']);}else{logger[_0xe0b0('0xe')]('Trunk,\x20%s,\x20%s',_0x5cf9cc,_0xe0b0('0x15'));_0x11effc(_0x4c24f9[_0xe0b0('0x16')]['message']);}})[_0xe0b0('0x17')](function(_0x4a4cc0){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4a4cc0);_0x435060(_0x4a4cc0);});});}exports['GetTrunk']=function(_0x54a3eb){var _0x46bb44=this;return new Promise(function(_0x50a441,_0x4df8da){return db['Trunk'][_0xe0b0('0x18')]({'raw':_0x54a3eb['options']?_0x54a3eb['options'][_0xe0b0('0x19')]===undefined?!![]:![]:!![],'where':_0x54a3eb['options']?_0x54a3eb[_0xe0b0('0x1a')]['where']||null:null,'attributes':_0x54a3eb[_0xe0b0('0x1a')]?_0x54a3eb[_0xe0b0('0x1a')][_0xe0b0('0x1b')]||null:null,'limit':_0x54a3eb[_0xe0b0('0x1a')]?_0x54a3eb[_0xe0b0('0x1a')]['limit']||null:null,'include':_0x54a3eb['options']?_0x54a3eb[_0xe0b0('0x1a')]['include']?_[_0xe0b0('0x1c')](_0x54a3eb[_0xe0b0('0x1a')]['include'],function(_0x170ad8){return{'model':db[_0x170ad8['model']],'as':_0x170ad8['as'],'attributes':_0x170ad8[_0xe0b0('0x1b')],'include':_0x170ad8['include']?_[_0xe0b0('0x1c')](_0x170ad8['include'],function(_0x3e5c88){return{'model':db[_0x3e5c88['model']],'as':_0x3e5c88['as'],'attributes':_0x3e5c88[_0xe0b0('0x1b')],'include':_0x3e5c88['include']?_[_0xe0b0('0x1c')](_0x3e5c88['include'],function(_0x362aba){return{'model':db[_0x362aba[_0xe0b0('0x1d')]],'as':_0x362aba['as'],'attributes':_0x362aba[_0xe0b0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xe0b0('0xd')](function(_0x3ec2){logger[_0xe0b0('0xe')]('GetTrunk',_0x54a3eb);logger[_0xe0b0('0x10')](_0xe0b0('0x1e'),_0x54a3eb,JSON['stringify'](_0x3ec2));_0x50a441(_0x3ec2);})[_0xe0b0('0x17')](function(_0x419b1f){logger[_0xe0b0('0x13')](_0xe0b0('0x1e'),_0x419b1f[_0xe0b0('0x14')],_0x54a3eb);_0x4df8da(_0x46bb44[_0xe0b0('0x13')](0x1f4,_0x419b1f[_0xe0b0('0x14')]));});});};exports['ShowTrunk']=function(_0x1854b8){var _0x3c0109=this;return new Promise(function(_0x48a9b5,_0x4fe400){return db[_0xe0b0('0x1f')][_0xe0b0('0x20')]({'raw':_0x1854b8[_0xe0b0('0x1a')]?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x19')]===undefined?!![]:![]:!![],'where':_0x1854b8['options']?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x21')]||null:null,'attributes':_0x1854b8[_0xe0b0('0x1a')]?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x1b')]||null:null,'include':_0x1854b8['options']?_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x22')]?_[_0xe0b0('0x1c')](_0x1854b8[_0xe0b0('0x1a')][_0xe0b0('0x22')],function(_0x12eeb8){return{'model':db[_0x12eeb8[_0xe0b0('0x1d')]],'as':_0x12eeb8['as'],'attributes':_0x12eeb8[_0xe0b0('0x1b')],'include':_0x12eeb8[_0xe0b0('0x22')]?_[_0xe0b0('0x1c')](_0x12eeb8[_0xe0b0('0x22')],function(_0x1a0c90){return{'model':db[_0x1a0c90[_0xe0b0('0x1d')]],'as':_0x1a0c90['as'],'attributes':_0x1a0c90[_0xe0b0('0x1b')],'include':_0x1a0c90[_0xe0b0('0x22')]?_['map'](_0x1a0c90[_0xe0b0('0x22')],function(_0x135be5){return{'model':db[_0x135be5[_0xe0b0('0x1d')]],'as':_0x135be5['as'],'attributes':_0x135be5[_0xe0b0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xe0b0('0xd')](function(_0x2c6e60){logger[_0xe0b0('0xe')]('ShowTrunk',_0x1854b8);logger['debug']('ShowTrunk',_0x1854b8,JSON['stringify'](_0x2c6e60));_0x48a9b5(_0x2c6e60);})[_0xe0b0('0x17')](function(_0xc3d967){logger[_0xe0b0('0x13')]('ShowTrunk',_0xc3d967[_0xe0b0('0x14')],_0x1854b8);_0x4fe400(_0x3c0109[_0xe0b0('0x13')](0x1f4,_0xc3d967[_0xe0b0('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/user/index.js b/server/api/user/index.js
index f252eef..0e3f348 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 _0x7a54=['getChatInteractions','/:id/openchannel/interactions','getOpenchannelInteractions','/:id/mail/interactions','getMailInteractions','/:id/sms/interactions','/:id/fax/interactions','/:id/teams','getTeams','/:id/lists','/: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','getSquareProjects','/:id/scheduled_calls','/:id/api_key','/create_many','post','addContacts','create','addQueues','join','server/files/images/','format','%s-%s','now','originalname','/:id/avatar','single','addAvatar','login','logout','/:id/pause','addTeams','/:id/chat_interactions','addChatInteractions','/:id/mail_interactions','addMailInteractions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','addFaxAccounts','addMailAccounts','addSmsAccounts','addChatWebsites','addSquareProjects','createApiKey','/:id/password','changePassword','delete','removeQueues','removeTeams','destroy','removeChatInteractions','removeMailInteractions','removeFaxInteractions','/:id/openchannel_interactions','removeOpenchannelInteractions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./user.controller','get','isAuthenticated','describe','/whoami','/:id','/:id/contacts','getContacts','/:id/queues','/:id/queues_rt','getVoiceQueuesRt','/:id/groups','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings'];(function(_0x787833,_0x2c0c3b){var _0x6f8b5f=function(_0x436ab3){while(--_0x436ab3){_0x787833['push'](_0x787833['shift']());}};_0x6f8b5f(++_0x2c0c3b);}(_0x7a54,0x106));var _0x47a5=function(_0xac089c,_0x1a8ef9){_0xac089c=_0xac089c-0x0;var _0x4fbb09=_0x7a54[_0xac089c];return _0x4fbb09;};'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['whoami']);router['get'](_0x47a5('0xc'),auth[_0x47a5('0x9')](),controller['show']);router[_0x47a5('0x8')]('/:id/avatar',controller['getAvatar']);router[_0x47a5('0x8')](_0x47a5('0xd'),auth[_0x47a5('0x9')](),controller[_0x47a5('0xe')]);router[_0x47a5('0x8')](_0x47a5('0xf'),auth[_0x47a5('0x9')](),controller['getQueues']);router[_0x47a5('0x8')](_0x47a5('0x10'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x11')]);router[_0x47a5('0x8')](_0x47a5('0x12'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x13')]);router['get'](_0x47a5('0x14'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x15')]);router[_0x47a5('0x8')](_0x47a5('0x16'),auth['isAuthenticated'](),controller['getScreenRecordings']);router[_0x47a5('0x8')]('/:id/chat/interactions',auth['isAuthenticated'](),controller[_0x47a5('0x17')]);router[_0x47a5('0x8')](_0x47a5('0x18'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x19')]);router[_0x47a5('0x8')](_0x47a5('0x1a'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x1b')]);router['get'](_0x47a5('0x1c'),auth[_0x47a5('0x9')](),controller['getSmsInteractions']);router[_0x47a5('0x8')](_0x47a5('0x1d'),auth[_0x47a5('0x9')](),controller['getFaxInteractions']);router[_0x47a5('0x8')](_0x47a5('0x1e'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x1f')]);router['get'](_0x47a5('0x20'),auth[_0x47a5('0x9')](),controller['getLists']);router[_0x47a5('0x8')](_0x47a5('0x21'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x22')]);router[_0x47a5('0x8')]('/:id/prefixes',auth['isAuthenticated'](),controller[_0x47a5('0x23')]);router['get'](_0x47a5('0x24'),auth['isAuthenticated'](),controller[_0x47a5('0x25')]);router[_0x47a5('0x8')](_0x47a5('0x26'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x27')]);router[_0x47a5('0x8')](_0x47a5('0x28'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x29')]);router[_0x47a5('0x8')](_0x47a5('0x2a'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x2b')]);router['get'](_0x47a5('0x2c'),auth['isAuthenticated'](),controller[_0x47a5('0x2d')]);router[_0x47a5('0x8')](_0x47a5('0x2e'),auth['isAuthenticated'](),controller[_0x47a5('0x2f')]);router[_0x47a5('0x8')](_0x47a5('0x30'),auth[_0x47a5('0x9')](),controller['getScheduledCalls']);router['get'](_0x47a5('0x31'),auth[_0x47a5('0x9')](),controller['getApiKey']);router['post'](_0x47a5('0x32'),auth[_0x47a5('0x9')](),controller['bulkCreate']);router[_0x47a5('0x33')]('/:id/contacts',auth[_0x47a5('0x9')](),controller[_0x47a5('0x34')]);router['post']('/',auth['isAuthenticated'](),controller[_0x47a5('0x35')]);router['post'](_0x47a5('0xf'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x36')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x18f7e9,_0x50c086,_0x53c754){_0x53c754(null,path[_0x47a5('0x37')](config['root'],_0x47a5('0x38')));},'filename':function(_0x5ef577,_0x21ad34,_0x3534cb){_0x3534cb(null,util[_0x47a5('0x39')](_0x47a5('0x3a'),Date[_0x47a5('0x3b')](),_0x21ad34[_0x47a5('0x3c')]));}})});router[_0x47a5('0x33')](_0x47a5('0x3d'),upload[_0x47a5('0x3e')]('file'),controller[_0x47a5('0x3f')]);router[_0x47a5('0x33')]('/:id/login',auth[_0x47a5('0x9')](),controller[_0x47a5('0x40')]);router[_0x47a5('0x33')]('/:id/logout',auth[_0x47a5('0x9')](),controller[_0x47a5('0x41')]);router['post'](_0x47a5('0x42'),auth[_0x47a5('0x9')](),controller['pause']);router['post']('/:id/unpause',auth[_0x47a5('0x9')](),controller['unpause']);router[_0x47a5('0x33')](_0x47a5('0x1e'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x43')]);router[_0x47a5('0x33')](_0x47a5('0x44'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x45')]);router[_0x47a5('0x33')](_0x47a5('0x46'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x47')]);router[_0x47a5('0x33')]('/:id/fax_interactions',auth[_0x47a5('0x9')](),controller[_0x47a5('0x48')]);router[_0x47a5('0x33')](_0x47a5('0x49'),auth['isAuthenticated'](),controller[_0x47a5('0x4a')]);router['post']('/:id/openchannel_interactions',auth['isAuthenticated'](),controller['addOpenchannelInteractions']);router[_0x47a5('0x33')]('/:id/fax_accounts',auth[_0x47a5('0x9')](),controller[_0x47a5('0x4b')]);router[_0x47a5('0x33')]('/:id/mail_accounts',auth[_0x47a5('0x9')](),controller[_0x47a5('0x4c')]);router['post']('/:id/openchannel_accounts',auth[_0x47a5('0x9')](),controller['addOpenchannelAccounts']);router[_0x47a5('0x33')](_0x47a5('0x2a'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x4d')]);router[_0x47a5('0x33')](_0x47a5('0x2c'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x4e')]);router[_0x47a5('0x33')](_0x47a5('0x2e'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x4f')]);router[_0x47a5('0x33')](_0x47a5('0x31'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x50')]);router['put'](_0x47a5('0xc'),auth[_0x47a5('0x9')](),controller['update']);router['put'](_0x47a5('0x51'),auth['isAuthenticated'](),controller[_0x47a5('0x52')]);router[_0x47a5('0x53')]('/:id/queues',auth['isAuthenticated'](),controller[_0x47a5('0x54')]);router['delete'](_0x47a5('0x1e'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x55')]);router[_0x47a5('0x53')](_0x47a5('0xc'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x56')]);router['delete']('/:id/chat_interactions',auth[_0x47a5('0x9')](),controller[_0x47a5('0x57')]);router[_0x47a5('0x53')](_0x47a5('0x46'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x58')]);router[_0x47a5('0x53')]('/:id/fax_interactions',auth[_0x47a5('0x9')](),controller[_0x47a5('0x59')]);router[_0x47a5('0x53')]('/:id/sms_interactions',auth[_0x47a5('0x9')](),controller['removeSmsInteractions']);router[_0x47a5('0x53')](_0x47a5('0x5a'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x5b')]);router['delete'](_0x47a5('0x24'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x5c')]);router[_0x47a5('0x53')](_0x47a5('0x26'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x5d')]);router['delete'](_0x47a5('0x28'),auth[_0x47a5('0x9')](),controller[_0x47a5('0x5e')]);router[_0x47a5('0x53')](_0x47a5('0x2a'),auth[_0x47a5('0x9')](),controller['removeSmsAccounts']);router[_0x47a5('0x53')](_0x47a5('0x2c'),auth[_0x47a5('0x9')](),controller['removeChatWebsites']);router[_0x47a5('0x53')](_0x47a5('0x2e'),auth[_0x47a5('0x9')](),controller['removeSquareProjects']);router['delete'](_0x47a5('0x31'),auth[_0x47a5('0x9')](),controller['removeApiKey']);module['exports']=router;
\ No newline at end of file
+var _0xadb5=['/:id/openchannel/interactions','getOpenchannelInteractions','getMailInteractions','/:id/sms/interactions','getFaxInteractions','/:id/teams','getTeams','/:id/lists','getLists','/:id/agents','getAgents','/:id/prefixes','/:id/fax_accounts','/:id/mail_accounts','getMailAccounts','/:id/openchannel_accounts','/:id/sms_accounts','getSmsAccounts','/:id/chat_websites','getChatWebsites','/:id/square_projects','getSquareProjects','/:id/scheduled_calls','getScheduledCalls','post','/create_many','bulkCreate','addContacts','addQueues','diskStorage','join','root','server/files/images/','format','now','single','addAvatar','/:id/logout','/:id/pause','pause','addTeams','/:id/chat_interactions','addChatInteractions','addMailInteractions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','addOpenchannelInteractions','addFaxAccounts','addMailAccounts','addOpenchannelAccounts','addChatWebsites','addSquareProjects','/:id/api_key','createApiKey','put','update','removeQueues','delete','removeChatInteractions','/:id/mail_interactions','removeMailInteractions','removeFaxInteractions','/:id/openchannel_interactions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','removeSmsAccounts','removeApiKey','exports','util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./user.controller','isAuthenticated','index','get','/describe','describe','/whoami','whoami','/:id','show','getAvatar','/:id/contacts','getContacts','/:id/queues','getQueues','/:id/queues_rt','getVoiceQueuesRt','/:id/groups','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings','getScreenRecordings','/:id/chat/interactions','getChatInteractions'];(function(_0x6c0000,_0x58c148){var _0x529c86=function(_0x693ea5){while(--_0x693ea5){_0x6c0000['push'](_0x6c0000['shift']());}};_0x529c86(++_0x58c148);}(_0xadb5,0xad));var _0x5adb=function(_0x2310ba,_0x4e795f){_0x2310ba=_0x2310ba-0x0;var _0x18379c=_0xadb5[_0x2310ba];return _0x18379c;};'use strict';var multer=require('multer');var util=require(_0x5adb('0x0'));var path=require('path');var timeout=require(_0x5adb('0x1'));var express=require(_0x5adb('0x2'));var router=express[_0x5adb('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x5adb('0x4'));var config=require(_0x5adb('0x5'));var controller=require(_0x5adb('0x6'));router['get']('/',auth[_0x5adb('0x7')](),controller[_0x5adb('0x8')]);router[_0x5adb('0x9')](_0x5adb('0xa'),auth[_0x5adb('0x7')](),controller[_0x5adb('0xb')]);router[_0x5adb('0x9')](_0x5adb('0xc'),auth[_0x5adb('0x7')](),controller[_0x5adb('0xd')]);router[_0x5adb('0x9')](_0x5adb('0xe'),auth[_0x5adb('0x7')](),controller[_0x5adb('0xf')]);router['get']('/:id/avatar',controller[_0x5adb('0x10')]);router[_0x5adb('0x9')](_0x5adb('0x11'),auth['isAuthenticated'](),controller[_0x5adb('0x12')]);router['get'](_0x5adb('0x13'),auth['isAuthenticated'](),controller[_0x5adb('0x14')]);router[_0x5adb('0x9')](_0x5adb('0x15'),auth['isAuthenticated'](),controller[_0x5adb('0x16')]);router[_0x5adb('0x9')](_0x5adb('0x17'),auth['isAuthenticated'](),controller[_0x5adb('0x18')]);router['get'](_0x5adb('0x19'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x1a')]);router[_0x5adb('0x9')](_0x5adb('0x1b'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x1c')]);router[_0x5adb('0x9')](_0x5adb('0x1d'),auth['isAuthenticated'](),controller[_0x5adb('0x1e')]);router['get'](_0x5adb('0x1f'),auth['isAuthenticated'](),controller[_0x5adb('0x20')]);router['get']('/:id/mail/interactions',auth[_0x5adb('0x7')](),controller[_0x5adb('0x21')]);router[_0x5adb('0x9')](_0x5adb('0x22'),auth[_0x5adb('0x7')](),controller['getSmsInteractions']);router[_0x5adb('0x9')]('/:id/fax/interactions',auth['isAuthenticated'](),controller[_0x5adb('0x23')]);router[_0x5adb('0x9')](_0x5adb('0x24'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x25')]);router[_0x5adb('0x9')](_0x5adb('0x26'),auth['isAuthenticated'](),controller[_0x5adb('0x27')]);router[_0x5adb('0x9')](_0x5adb('0x28'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x29')]);router['get'](_0x5adb('0x2a'),auth[_0x5adb('0x7')](),controller['getVoicePrefixes']);router[_0x5adb('0x9')](_0x5adb('0x2b'),auth[_0x5adb('0x7')](),controller['getFaxAccounts']);router[_0x5adb('0x9')](_0x5adb('0x2c'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x2d')]);router[_0x5adb('0x9')](_0x5adb('0x2e'),auth['isAuthenticated'](),controller['getOpenchannelAccounts']);router['get'](_0x5adb('0x2f'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x30')]);router[_0x5adb('0x9')](_0x5adb('0x31'),auth['isAuthenticated'](),controller[_0x5adb('0x32')]);router[_0x5adb('0x9')](_0x5adb('0x33'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x34')]);router[_0x5adb('0x9')](_0x5adb('0x35'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x36')]);router[_0x5adb('0x9')]('/:id/api_key',auth[_0x5adb('0x7')](),controller['getApiKey']);router[_0x5adb('0x37')](_0x5adb('0x38'),auth['isAuthenticated'](),controller[_0x5adb('0x39')]);router[_0x5adb('0x37')](_0x5adb('0x11'),auth['isAuthenticated'](),controller[_0x5adb('0x3a')]);router[_0x5adb('0x37')]('/',auth['isAuthenticated'](),controller['create']);router[_0x5adb('0x37')]('/:id/queues',auth[_0x5adb('0x7')](),controller[_0x5adb('0x3b')]);var upload=multer({'storage':multer[_0x5adb('0x3c')]({'destination':function(_0x2da912,_0x9bdece,_0x5ece39){_0x5ece39(null,path[_0x5adb('0x3d')](config[_0x5adb('0x3e')],_0x5adb('0x3f')));},'filename':function(_0x54851b,_0x4c8870,_0x32eb69){_0x32eb69(null,util[_0x5adb('0x40')]('%s-%s',Date[_0x5adb('0x41')](),_0x4c8870['originalname']));}})});router[_0x5adb('0x37')]('/:id/avatar',upload[_0x5adb('0x42')]('file'),controller[_0x5adb('0x43')]);router[_0x5adb('0x37')]('/:id/login',auth[_0x5adb('0x7')](),controller['login']);router[_0x5adb('0x37')](_0x5adb('0x44'),auth[_0x5adb('0x7')](),controller['logout']);router[_0x5adb('0x37')](_0x5adb('0x45'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x46')]);router[_0x5adb('0x37')]('/:id/unpause',auth['isAuthenticated'](),controller['unpause']);router['post'](_0x5adb('0x24'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x47')]);router[_0x5adb('0x37')](_0x5adb('0x48'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x49')]);router[_0x5adb('0x37')]('/:id/mail_interactions',auth['isAuthenticated'](),controller[_0x5adb('0x4a')]);router['post'](_0x5adb('0x4b'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x4c')]);router[_0x5adb('0x37')](_0x5adb('0x4d'),auth['isAuthenticated'](),controller[_0x5adb('0x4e')]);router[_0x5adb('0x37')]('/:id/openchannel_interactions',auth[_0x5adb('0x7')](),controller[_0x5adb('0x4f')]);router['post'](_0x5adb('0x2b'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x50')]);router[_0x5adb('0x37')](_0x5adb('0x2c'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x51')]);router['post']('/:id/openchannel_accounts',auth[_0x5adb('0x7')](),controller[_0x5adb('0x52')]);router[_0x5adb('0x37')](_0x5adb('0x2f'),auth['isAuthenticated'](),controller['addSmsAccounts']);router[_0x5adb('0x37')](_0x5adb('0x31'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x53')]);router[_0x5adb('0x37')]('/:id/square_projects',auth[_0x5adb('0x7')](),controller[_0x5adb('0x54')]);router['post'](_0x5adb('0x55'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x56')]);router[_0x5adb('0x57')](_0x5adb('0xe'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x58')]);router[_0x5adb('0x57')]('/:id/password',auth[_0x5adb('0x7')](),controller['changePassword']);router['delete']('/:id/queues',auth[_0x5adb('0x7')](),controller[_0x5adb('0x59')]);router[_0x5adb('0x5a')]('/:id/teams',auth[_0x5adb('0x7')](),controller['removeTeams']);router[_0x5adb('0x5a')](_0x5adb('0xe'),auth[_0x5adb('0x7')](),controller['destroy']);router[_0x5adb('0x5a')]('/:id/chat_interactions',auth[_0x5adb('0x7')](),controller[_0x5adb('0x5b')]);router['delete'](_0x5adb('0x5c'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x5d')]);router[_0x5adb('0x5a')](_0x5adb('0x4b'),auth['isAuthenticated'](),controller[_0x5adb('0x5e')]);router[_0x5adb('0x5a')](_0x5adb('0x4d'),auth[_0x5adb('0x7')](),controller['removeSmsInteractions']);router[_0x5adb('0x5a')](_0x5adb('0x5f'),auth[_0x5adb('0x7')](),controller['removeOpenchannelInteractions']);router[_0x5adb('0x5a')](_0x5adb('0x2b'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x60')]);router['delete'](_0x5adb('0x2c'),auth[_0x5adb('0x7')](),controller[_0x5adb('0x61')]);router[_0x5adb('0x5a')](_0x5adb('0x2e'),auth['isAuthenticated'](),controller[_0x5adb('0x62')]);router['delete'](_0x5adb('0x2f'),auth['isAuthenticated'](),controller[_0x5adb('0x63')]);router[_0x5adb('0x5a')](_0x5adb('0x31'),auth[_0x5adb('0x7')](),controller['removeChatWebsites']);router[_0x5adb('0x5a')](_0x5adb('0x33'),auth[_0x5adb('0x7')](),controller['removeSquareProjects']);router['delete']('/:id/api_key',auth[_0x5adb('0x7')](),controller[_0x5adb('0x64')]);module[_0x5adb('0x65')]=router;
\ No newline at end of file
diff --git a/server/api/user/user.attributes.js b/server/api/user/user.attributes.js
index c22e7a1..227d542 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 _0xa9e0=['\x22\x22\x20<>','always','accept','refuse','originate','uac','uas','fingerprint','certificate','passive','update,nonat','showWebBar','get','wss','force_avp','dtlsenable','dtlsverify','dtlssetup','dtlsprivatekey','rtcp_mux','encryption','icesupport','actpass','dtlscertfile','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','permissions','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blockedAt','sequelize','moment','util','STRING','setDataValue','name','defaultuser','callerid','getDataValue','internal','email','admin','user','agent','telephone','INTEGER','format','fullname','BOOLEAN','DATE','DEFAULT\x20PAUSE','ENUM','peer','friend','from-sip','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','udp','join','transport','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','shortinfo','inband','auto','yes','update','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','allow','ulaw;alaw;gsm','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never'];(function(_0x503a72,_0x3d3911){var _0x5d3c10=function(_0x4b3317){while(--_0x4b3317){_0x503a72['push'](_0x503a72['shift']());}};_0x5d3c10(++_0x3d3911);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0xa9e0[_0x1ac595];return _0x455fff;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var _=require('lodash');module['exports']={'name':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x333808){this[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x333808);this[_0x0a9e('0x4')](_0x0a9e('0x6'),_0x333808);},'comment':'The\x20name\x20of\x20the\x20user'},'fullname':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'set':function(_0x441e3a){this[_0x0a9e('0x4')]('fullname',_0x441e3a);this['setDataValue'](_0x0a9e('0x7'),util['format']('\x22%s\x22\x20<%s>',_0x441e3a,this[_0x0a9e('0x8')](_0x0a9e('0x9'))));}},'alias':{'type':Sequelize[_0x0a9e('0x3')]},'email':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'unique':_0x0a9e('0xa'),'validate':{'isEmail':!![]},'set':function(_0xbd1168){if(_0xbd1168){this['setDataValue']('email',_0xbd1168['toLowerCase']());}}},'role':{'type':Sequelize['ENUM'](_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe')),'allowNull':![]},'password':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':'local'},'internal':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':![],'unique':_0x0a9e('0x9'),'set':function(_0x2b4227){this[_0x0a9e('0x4')](_0x0a9e('0x9'),_0x2b4227);this[_0x0a9e('0x4')]('accountcode',_0x2b4227);this[_0x0a9e('0x4')]('callerid',util[_0x0a9e('0x10')]('\x22%s\x22\x20<%s>',this[_0x0a9e('0x8')](_0x0a9e('0x11')),_0x2b4227));}},'salt':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x0a9e('0x3')]},'mobile':{'type':Sequelize['STRING']},'address':{'type':Sequelize[_0x0a9e('0x3')]},'zipcode':{'type':Sequelize[_0x0a9e('0x3')]},'userpic':{'type':Sequelize[_0x0a9e('0x3')]},'city':{'type':Sequelize[_0x0a9e('0x3')]},'country':{'type':Sequelize[_0x0a9e('0x3')]},'online':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0x0a9e('0x13')]},'voicePause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'openchannelPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':_0x0a9e('0x14')},'lastPauseAt':{'type':Sequelize['DATE']},'chatCapacity':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize['INTEGER'](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x0a9e('0xf')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'chanspy':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'description':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'host':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':'dynamic'},'ipaddr':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'port':{'type':Sequelize[_0x0a9e('0xf')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'regserver':{'type':Sequelize['STRING'],'allowNull':!![]},'useragent':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'lastms':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x0a9e('0x15')]('friend',_0x0a9e('0xc'),_0x0a9e('0x16')),'allowNull':!![],'defaultValue':_0x0a9e('0x17')},'context':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'defaultValue':_0x0a9e('0x18')},'callingpres':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x19'),_0x0a9e('0x1a'),'ALLOWED_FAILED_SCREEN',_0x0a9e('0x1b'),_0x0a9e('0x1c'),_0x0a9e('0x1d'),_0x0a9e('0x1e'),'PROHIB'),'allowNull':!![]},'deny':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'permit':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'secret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'md5secret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'transport':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'defaultValue':_0x0a9e('0x1f'),'set':function(_0x2e8759){this[_0x0a9e('0x4')]('transport',_0x2e8759?_0x2e8759[_0x0a9e('0x20')](','):null);},'get':function(){return this['getDataValue'](_0x0a9e('0x21'))?this[_0x0a9e('0x8')](_0x0a9e('0x21'))[_0x0a9e('0x22')](','):null;},'comment':_0x0a9e('0x23')},'dtmfmode':{'type':Sequelize['ENUM'](_0x0a9e('0x24'),_0x0a9e('0x25'),_0x0a9e('0x26'),_0x0a9e('0x27'),_0x0a9e('0x28')),'allowNull':!![],'defaultValue':_0x0a9e('0x24')},'directmedia':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no','nonat',_0x0a9e('0x2a'),'outgoing'),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'nat':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x0a9e('0x2b'),'set':function(_0xd1836d){this[_0x0a9e('0x4')](_0x0a9e('0x2c'),_0xd1836d?_0xd1836d['join'](','):null);},'get':function(){return this['getDataValue'](_0x0a9e('0x2c'))?this['getDataValue'](_0x0a9e('0x2c'))[_0x0a9e('0x22')](','):null;},'comment':_0x0a9e('0x2d')},'callgroup':{'type':Sequelize[_0x0a9e('0x3')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0x0a9e('0x3')]},'namedpickupgroup':{'type':Sequelize[_0x0a9e('0x3')]},'language':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':'en'},'tonezone':{'type':Sequelize['STRING']},'disallow':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'defaultValue':_0x0a9e('0x2e')},'allow':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'defaultValue':'ulaw;alaw;gsm','set':function(_0x546ef8){this[_0x0a9e('0x4')](_0x0a9e('0x2f'),_0x546ef8?_0x546ef8['join'](';'):_0x0a9e('0x30'));},'get':function(){return this[_0x0a9e('0x8')](_0x0a9e('0x2f'))?this[_0x0a9e('0x8')]('allow')['split'](';'):null;},'comment':_0x0a9e('0x31')},'autoframing':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'set':function(_0x1dec2e){this[_0x0a9e('0x4')]('insecure',_0x1dec2e?_0x1dec2e[_0x0a9e('0x20')](','):null);},'get':function(){return this[_0x0a9e('0x8')](_0x0a9e('0x32'))?this[_0x0a9e('0x8')](_0x0a9e('0x32'))[_0x0a9e('0x22')](','):null;},'comment':_0x0a9e('0x33')},'trustrpid':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no',_0x0a9e('0x34')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'useclientcode':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'callerid':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'defaultValue':_0x0a9e('0x35')},'amaflags':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':_0x0a9e('0x29')},'busylevel':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'template':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x0a9e('0x15')]('yes','no',_0x0a9e('0x36')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'session_timers':{'type':Sequelize['ENUM'](_0x0a9e('0x37'),_0x0a9e('0x38'),_0x0a9e('0x39')),'allowNull':!![]},'session_expires':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x3a'),'uas'),'allowNull':!![],'defaultValue':_0x0a9e('0x3b')},'t38pt_usertpsource':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'regexten':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'fromuser':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'qualify':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':_0x0a9e('0x29')},'keepalive':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'timert1':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'contactacl':{'type':Sequelize['STRING'],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'use_q850_reason':{'type':Sequelize['STRING'],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'icesupport':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no',_0x0a9e('0x3c'),_0x0a9e('0x3d')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'dtlscipher':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscafile':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x0a9e('0x15')]('active',_0x0a9e('0x3e'),'actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'usereqphone':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize['STRING'],'allowNull':!![]},'recordofffeature':{'type':Sequelize['STRING'],'allowNull':!![]},'call_limit':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no','nonat',_0x0a9e('0x2a'),_0x0a9e('0x3f')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0x0a9e('0x3')]},'resetPasswordExpires':{'type':Sequelize[_0x0a9e('0x13')]},'showWebBar':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0,'set':function(_0x5d86e9){this[_0x0a9e('0x4')](_0x0a9e('0x40'),_0x5d86e9);var _0x5239ef=this[_0x0a9e('0x41')]({'plain':!![]});switch(_0x5d86e9){case 0x0:case 0x1:var _0x5cc8fb=_0x5239ef[_0x0a9e('0x21')]?_['isArray'](_0x5239ef['transport'])?_0x5239ef['transport'][_0x0a9e('0x20')]():_0x5239ef['transport']:_0x0a9e('0x1f');if(_0x5cc8fb===_0x0a9e('0x42')){_0x5cc8fb=_0x0a9e('0x1f');}this[_0x0a9e('0x4')](_0x0a9e('0x21'),_0x5cc8fb);this[_0x0a9e('0x4')]('encryption','no');this[_0x0a9e('0x4')]('avpf',null);this[_0x0a9e('0x4')](_0x0a9e('0x43'),null);this[_0x0a9e('0x4')]('icesupport',null);this[_0x0a9e('0x4')](_0x0a9e('0x44'),null);this[_0x0a9e('0x4')](_0x0a9e('0x45'),null);this['setDataValue'](_0x0a9e('0x46'),null);this[_0x0a9e('0x4')]('dtlscertfile',null);this[_0x0a9e('0x4')](_0x0a9e('0x47'),null);this[_0x0a9e('0x4')](_0x0a9e('0x48'),'no');break;case 0x2:this[_0x0a9e('0x4')]('transport',_0x0a9e('0x42'));this[_0x0a9e('0x4')](_0x0a9e('0x49'),'yes');this[_0x0a9e('0x4')]('avpf','yes');this[_0x0a9e('0x4')](_0x0a9e('0x43'),_0x0a9e('0x29'));this[_0x0a9e('0x4')](_0x0a9e('0x4a'),_0x0a9e('0x29'));this[_0x0a9e('0x4')](_0x0a9e('0x44'),_0x0a9e('0x29'));this[_0x0a9e('0x4')](_0x0a9e('0x45'),'no');this[_0x0a9e('0x4')](_0x0a9e('0x46'),_0x0a9e('0x4b'));this[_0x0a9e('0x4')](_0x0a9e('0x4c'),_0x5239ef[_0x0a9e('0x4c')]||_0x0a9e('0x4d'));this['setDataValue'](_0x0a9e('0x47'),_0x5239ef[_0x0a9e('0x47')]||_0x0a9e('0x4e'));this['setDataValue'](_0x0a9e('0x48'),_0x0a9e('0x29'));break;default:}}},'permissions':{'type':Sequelize['TEXT'],'set':function(_0x83f0b2){this[_0x0a9e('0x4')](_0x0a9e('0x4f'),_0x83f0b2?_0x83f0b2[_0x0a9e('0x20')](','):[]);},'get':function(){return this[_0x0a9e('0x8')]('permissions')?_['map'](this['getDataValue'](_0x0a9e('0x4f'))[_0x0a9e('0x22')](','),function(_0x1104ad){return parseInt(_0x1104ad,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0x0a9e('0x3')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0x0a9e('0x3')]},'phoneBarBusyNumber':{'type':Sequelize[_0x0a9e('0x3')]},'phoneBarUnconditional':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':''},'crudPermissions':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x0a9e('0x3')]},'passwordResetAt':{'type':Sequelize[_0x0a9e('0x13')],'defaultValue':null},'phoneBarEnableJaws':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x8')](_0x0a9e('0x50'))?this[_0x0a9e('0x8')](_0x0a9e('0x50')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'interface':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize['STRING'],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![],'set':function(_0x30a4c7){if(typeof _0x30a4c7===_0x0a9e('0x51')){var _0x332367=_0x30a4c7==='1'?!![]:_0x30a4c7==='0'?![]:_0x30a4c7===_0x0a9e('0x52')?!![]:_0x30a4c7===_0x0a9e('0x53')?![]:![];this[_0x0a9e('0x4')](_0x0a9e('0x54'),_0x332367);}else{this[_0x0a9e('0x4')](_0x0a9e('0x54'),_0x30a4c7);}}},'blocked':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![],'set':function(_0x25744a){this[_0x0a9e('0x4')]('blocked',_0x25744a);if(_0x25744a===!![]){this[_0x0a9e('0x4')](_0x0a9e('0x55'),moment());this[_0x0a9e('0x4')]('loginAttempts',0x0);}else{this[_0x0a9e('0x4')](_0x0a9e('0x55'),null);}}},'blockedAt':{'type':Sequelize[_0x0a9e('0x13')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'disabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0xa9e0=['\x22\x22\x20<>','always','accept','refuse','originate','uac','uas','fingerprint','certificate','passive','update,nonat','showWebBar','get','wss','force_avp','dtlsenable','dtlsverify','dtlssetup','dtlsprivatekey','rtcp_mux','encryption','icesupport','actpass','dtlscertfile','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','permissions','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blockedAt','sequelize','moment','util','STRING','setDataValue','name','defaultuser','callerid','getDataValue','internal','email','admin','user','agent','telephone','INTEGER','format','fullname','BOOLEAN','DATE','DEFAULT\x20PAUSE','ENUM','peer','friend','from-sip','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','udp','join','transport','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','shortinfo','inband','auto','yes','update','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','allow','ulaw;alaw;gsm','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never'];(function(_0x3eb7ca,_0x233821){var _0xe5e379=function(_0x5a2fbc){while(--_0x5a2fbc){_0x3eb7ca['push'](_0x3eb7ca['shift']());}};_0xe5e379(++_0x233821);}(_0xa9e0,0x123));var _0x0a9e=function(_0xea8947,_0x1b573d){_0xea8947=_0xea8947-0x0;var _0x2455e9=_0xa9e0[_0xea8947];return _0x2455e9;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var _=require('lodash');module['exports']={'name':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x333808){this[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x333808);this[_0x0a9e('0x4')](_0x0a9e('0x6'),_0x333808);},'comment':'The\x20name\x20of\x20the\x20user'},'fullname':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'set':function(_0x441e3a){this[_0x0a9e('0x4')]('fullname',_0x441e3a);this['setDataValue'](_0x0a9e('0x7'),util['format']('\x22%s\x22\x20<%s>',_0x441e3a,this[_0x0a9e('0x8')](_0x0a9e('0x9'))));}},'alias':{'type':Sequelize[_0x0a9e('0x3')]},'email':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'unique':_0x0a9e('0xa'),'validate':{'isEmail':!![]},'set':function(_0xbd1168){if(_0xbd1168){this['setDataValue']('email',_0xbd1168['toLowerCase']());}}},'role':{'type':Sequelize['ENUM'](_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe')),'allowNull':![]},'password':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':'local'},'internal':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':![],'unique':_0x0a9e('0x9'),'set':function(_0x2b4227){this[_0x0a9e('0x4')](_0x0a9e('0x9'),_0x2b4227);this[_0x0a9e('0x4')]('accountcode',_0x2b4227);this[_0x0a9e('0x4')]('callerid',util[_0x0a9e('0x10')]('\x22%s\x22\x20<%s>',this[_0x0a9e('0x8')](_0x0a9e('0x11')),_0x2b4227));}},'salt':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x0a9e('0x3')]},'mobile':{'type':Sequelize['STRING']},'address':{'type':Sequelize[_0x0a9e('0x3')]},'zipcode':{'type':Sequelize[_0x0a9e('0x3')]},'userpic':{'type':Sequelize[_0x0a9e('0x3')]},'city':{'type':Sequelize[_0x0a9e('0x3')]},'country':{'type':Sequelize[_0x0a9e('0x3')]},'online':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0x0a9e('0x13')]},'voicePause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'openchannelPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':_0x0a9e('0x14')},'lastPauseAt':{'type':Sequelize['DATE']},'chatCapacity':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize['INTEGER'](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x0a9e('0xf')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'chanspy':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'description':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'host':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':'dynamic'},'ipaddr':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'port':{'type':Sequelize[_0x0a9e('0xf')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'regserver':{'type':Sequelize['STRING'],'allowNull':!![]},'useragent':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'lastms':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x0a9e('0x15')]('friend',_0x0a9e('0xc'),_0x0a9e('0x16')),'allowNull':!![],'defaultValue':_0x0a9e('0x17')},'context':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'defaultValue':_0x0a9e('0x18')},'callingpres':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x19'),_0x0a9e('0x1a'),'ALLOWED_FAILED_SCREEN',_0x0a9e('0x1b'),_0x0a9e('0x1c'),_0x0a9e('0x1d'),_0x0a9e('0x1e'),'PROHIB'),'allowNull':!![]},'deny':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'permit':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'secret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'md5secret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'transport':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'defaultValue':_0x0a9e('0x1f'),'set':function(_0x2e8759){this[_0x0a9e('0x4')]('transport',_0x2e8759?_0x2e8759[_0x0a9e('0x20')](','):null);},'get':function(){return this['getDataValue'](_0x0a9e('0x21'))?this[_0x0a9e('0x8')](_0x0a9e('0x21'))[_0x0a9e('0x22')](','):null;},'comment':_0x0a9e('0x23')},'dtmfmode':{'type':Sequelize['ENUM'](_0x0a9e('0x24'),_0x0a9e('0x25'),_0x0a9e('0x26'),_0x0a9e('0x27'),_0x0a9e('0x28')),'allowNull':!![],'defaultValue':_0x0a9e('0x24')},'directmedia':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no','nonat',_0x0a9e('0x2a'),'outgoing'),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'nat':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x0a9e('0x2b'),'set':function(_0xd1836d){this[_0x0a9e('0x4')](_0x0a9e('0x2c'),_0xd1836d?_0xd1836d['join'](','):null);},'get':function(){return this['getDataValue'](_0x0a9e('0x2c'))?this['getDataValue'](_0x0a9e('0x2c'))[_0x0a9e('0x22')](','):null;},'comment':_0x0a9e('0x2d')},'callgroup':{'type':Sequelize[_0x0a9e('0x3')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0x0a9e('0x3')]},'namedpickupgroup':{'type':Sequelize[_0x0a9e('0x3')]},'language':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':'en'},'tonezone':{'type':Sequelize['STRING']},'disallow':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'defaultValue':_0x0a9e('0x2e')},'allow':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':![],'defaultValue':'ulaw;alaw;gsm','set':function(_0x546ef8){this[_0x0a9e('0x4')](_0x0a9e('0x2f'),_0x546ef8?_0x546ef8['join'](';'):_0x0a9e('0x30'));},'get':function(){return this[_0x0a9e('0x8')](_0x0a9e('0x2f'))?this[_0x0a9e('0x8')]('allow')['split'](';'):null;},'comment':_0x0a9e('0x31')},'autoframing':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'set':function(_0x1dec2e){this[_0x0a9e('0x4')]('insecure',_0x1dec2e?_0x1dec2e[_0x0a9e('0x20')](','):null);},'get':function(){return this[_0x0a9e('0x8')](_0x0a9e('0x32'))?this[_0x0a9e('0x8')](_0x0a9e('0x32'))[_0x0a9e('0x22')](','):null;},'comment':_0x0a9e('0x33')},'trustrpid':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no',_0x0a9e('0x34')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'useclientcode':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'callerid':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![],'defaultValue':_0x0a9e('0x35')},'amaflags':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':_0x0a9e('0x29')},'busylevel':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'template':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x0a9e('0x15')]('yes','no',_0x0a9e('0x36')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'session_timers':{'type':Sequelize['ENUM'](_0x0a9e('0x37'),_0x0a9e('0x38'),_0x0a9e('0x39')),'allowNull':!![]},'session_expires':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x3a'),'uas'),'allowNull':!![],'defaultValue':_0x0a9e('0x3b')},'t38pt_usertpsource':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'regexten':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'fromuser':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'qualify':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':_0x0a9e('0x29')},'keepalive':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'timert1':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'contactacl':{'type':Sequelize['STRING'],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'use_q850_reason':{'type':Sequelize['STRING'],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x0a9e('0xf')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'icesupport':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no',_0x0a9e('0x3c'),_0x0a9e('0x3d')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'dtlscipher':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscafile':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x0a9e('0x15')]('active',_0x0a9e('0x3e'),'actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'usereqphone':{'type':Sequelize['ENUM'](_0x0a9e('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize['STRING'],'allowNull':!![]},'recordofffeature':{'type':Sequelize['STRING'],'allowNull':!![]},'call_limit':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x0a9e('0x15')]('yes','no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no','nonat',_0x0a9e('0x2a'),_0x0a9e('0x3f')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0x0a9e('0x3')]},'resetPasswordExpires':{'type':Sequelize[_0x0a9e('0x13')]},'showWebBar':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0,'set':function(_0x5d86e9){this[_0x0a9e('0x4')](_0x0a9e('0x40'),_0x5d86e9);var _0x5239ef=this[_0x0a9e('0x41')]({'plain':!![]});switch(_0x5d86e9){case 0x0:case 0x1:var _0x5cc8fb=_0x5239ef[_0x0a9e('0x21')]?_['isArray'](_0x5239ef['transport'])?_0x5239ef['transport'][_0x0a9e('0x20')]():_0x5239ef['transport']:_0x0a9e('0x1f');if(_0x5cc8fb===_0x0a9e('0x42')){_0x5cc8fb=_0x0a9e('0x1f');}this[_0x0a9e('0x4')](_0x0a9e('0x21'),_0x5cc8fb);this[_0x0a9e('0x4')]('encryption','no');this[_0x0a9e('0x4')]('avpf',null);this[_0x0a9e('0x4')](_0x0a9e('0x43'),null);this[_0x0a9e('0x4')]('icesupport',null);this[_0x0a9e('0x4')](_0x0a9e('0x44'),null);this[_0x0a9e('0x4')](_0x0a9e('0x45'),null);this['setDataValue'](_0x0a9e('0x46'),null);this[_0x0a9e('0x4')]('dtlscertfile',null);this[_0x0a9e('0x4')](_0x0a9e('0x47'),null);this[_0x0a9e('0x4')](_0x0a9e('0x48'),'no');break;case 0x2:this[_0x0a9e('0x4')]('transport',_0x0a9e('0x42'));this[_0x0a9e('0x4')](_0x0a9e('0x49'),'yes');this[_0x0a9e('0x4')]('avpf','yes');this[_0x0a9e('0x4')](_0x0a9e('0x43'),_0x0a9e('0x29'));this[_0x0a9e('0x4')](_0x0a9e('0x4a'),_0x0a9e('0x29'));this[_0x0a9e('0x4')](_0x0a9e('0x44'),_0x0a9e('0x29'));this[_0x0a9e('0x4')](_0x0a9e('0x45'),'no');this[_0x0a9e('0x4')](_0x0a9e('0x46'),_0x0a9e('0x4b'));this[_0x0a9e('0x4')](_0x0a9e('0x4c'),_0x5239ef[_0x0a9e('0x4c')]||_0x0a9e('0x4d'));this['setDataValue'](_0x0a9e('0x47'),_0x5239ef[_0x0a9e('0x47')]||_0x0a9e('0x4e'));this['setDataValue'](_0x0a9e('0x48'),_0x0a9e('0x29'));break;default:}}},'permissions':{'type':Sequelize['TEXT'],'set':function(_0x83f0b2){this[_0x0a9e('0x4')](_0x0a9e('0x4f'),_0x83f0b2?_0x83f0b2[_0x0a9e('0x20')](','):[]);},'get':function(){return this[_0x0a9e('0x8')]('permissions')?_['map'](this['getDataValue'](_0x0a9e('0x4f'))[_0x0a9e('0x22')](','),function(_0x1104ad){return parseInt(_0x1104ad,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0x0a9e('0x3')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0x0a9e('0x3')]},'phoneBarBusyNumber':{'type':Sequelize[_0x0a9e('0x3')]},'phoneBarUnconditional':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':''},'crudPermissions':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x0a9e('0x15')](_0x0a9e('0x29'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x0a9e('0x3')]},'passwordResetAt':{'type':Sequelize[_0x0a9e('0x13')],'defaultValue':null},'phoneBarEnableJaws':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x8')](_0x0a9e('0x50'))?this[_0x0a9e('0x8')](_0x0a9e('0x50')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'interface':{'type':Sequelize[_0x0a9e('0x3')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize['STRING'],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x0a9e('0x3')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![],'set':function(_0x30a4c7){if(typeof _0x30a4c7===_0x0a9e('0x51')){var _0x332367=_0x30a4c7==='1'?!![]:_0x30a4c7==='0'?![]:_0x30a4c7===_0x0a9e('0x52')?!![]:_0x30a4c7===_0x0a9e('0x53')?![]:![];this[_0x0a9e('0x4')](_0x0a9e('0x54'),_0x332367);}else{this[_0x0a9e('0x4')](_0x0a9e('0x54'),_0x30a4c7);}}},'blocked':{'type':Sequelize[_0x0a9e('0x12')],'defaultValue':![],'set':function(_0x25744a){this[_0x0a9e('0x4')]('blocked',_0x25744a);if(_0x25744a===!![]){this[_0x0a9e('0x4')](_0x0a9e('0x55'),moment());this[_0x0a9e('0x4')]('loginAttempts',0x0);}else{this[_0x0a9e('0x4')](_0x0a9e('0x55'),null);}}},'blockedAt':{'type':Sequelize[_0x0a9e('0x13')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x0a9e('0xf')],'defaultValue':0x0},'disabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js
index 305ee94..c9344e5 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 _0x2678=['getMailQueues','getFaxQueues','transaction','removeAgent','Queue:remove','getLists','getAgents','values','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','removeFaxInteractions','user_has_fax_interactions:remove','addSmsInteractions','user_has_sms_interactions:save','removeSmsInteractions','user_has_sms_interactions:remove','addOpenchannelInteractions','user_has_openchannel_interactions:save','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','getVoicePrefixes','VoicePrefix','getFaxAccounts','FaxAccount','addFaxAccounts','removeFaxAccounts','getMailAccounts','MailAccount','addMailAccounts','removeMailAccounts','getOpenchannelAccounts','OpenchannelAccount','addOpenchannelAccounts','removeOpenchannelAccounts','SmsAccount','getSmsAccounts','addSmsAccounts','removeSmsAccounts','getChatWebsites','addChatWebsites','removeChatWebsites','getSquareProjects','SquareProject','addSquareProjects','removeSquareProjects','getScheduledCalls','$or','$gt','$gte','$ne','$eq','$between','$notBetween','$in','$notIn','$like','$notLike','$notILike','$overlap','$contains','$any','Contact','CmHopper','getApiKey','retrieveApiKey','No\x20API\x20access\x20key\x20found!','createApiKey','generateApiKey','iat','token','apiKeyNonce','API\x20key\x20not\x20available','whoami','eml-format','rimraf','zip-dir','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./user.socket','register','client','Sequelize','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','stringify','error','code','message','catch','sendStatus','status','end','json','set','Content-Range','reject','save','update','destroy','Users','user','Agents','Telephones','telephone','filter','ignore','map','value','includes','role','name','UserProfileResource','stack','send','index','User','rawAttributes','fieldName','type','key','model','differenceBy','password','salt','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','offset','where','pick','merge','VIRTUAL','sequelize','lower','col','count','includeAll','include','rows','params','keys','length','options','bulkCreate','body','find','describe','addContacts','ids','omit','admin','../../config/license/util','getLicense','telephones','users','isNil','License\x20limit\x20reached','count\x20%s:\x20%s','create','internal','Setting','findById','securePassword','min_internal','max','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)','SELECT','from','voicemail','mailbox','VoiceMail','fullname','email','agent','permissions','102','103','110','105','106','107','109','100','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','changePassword','findOne','oldPassword','newPassword','ValidationError','Invalid\x20body\x20format.\x20Use\x20oldPassord\x20and\x20newPassword','authenticate','Wrong\x20credentials','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','Invalid\x20body\x20format.\x20Use\x20newPassword','Unauthorized','addQueues','channel','online','loginInPause','voicePause','interface','add','capitalize','toLowerCase','Queues','penalty','spread','QueueId','emit','Queue:save','voice','VoiceQueue','push','format','SIP/%s','each','UserVoiceQueueRt','removeQueues','isValidChannel','Unknown\x20channel','remove','addAvatar','userpic','file','filename','getAvatar','join','download','existsSync','root','server/files/images/','CmContact','order','sort','CmList','List','Tags','color','tag','getContacts','getQueues','findAll','Queue','getVoiceQueuesRt','getGroups','ChatGroup','getRecordings','VoiceRecording','UserId','getScreenRecordings','ScreenRecording','getChatInteractions','ChatInteraction','OpenchannelInteraction','getOpenchannelInteractions','getMailInteractions','MailInteraction','getSmsInteractions','SmsInteraction','getFaxInteractions','FaxInteraction','login','phone','mobile','LOCAL/%s@from-sip/n','intrf','user:%s','headers','x-forwarded-for','connection','remoteAddress','User\x20not\x20found\x20or\x20not\x20allowed\x20to\x20perform\x20login\x20method','getVoiceQueues','UserVoiceQueue.penalty','MemberReport','forEach','all','YYYY-MM-DD\x20HH:mm:ss','LOGIN','PAUSE','concat','LOGININPAUSE','logout','pause','QueuePause','getChannels','DEFAULT\x20PAUSE','unpause','chatPause','faxPause','openchannelPause','smsPause','pauseType','lastPauseAt','manual','mail','fax','Pause','Team','getTeams','addTeams','setDataValue','Voice','getChatQueues','Chat','Mail','getSmsQueues','Sms','Fax','getOpenchannelQueues','flatten','addAgent','getDataValue','upsert','removeTeams'];(function(_0x55713b,_0x1a8cd8){var _0x5aa367=function(_0x46d35f){while(--_0x46d35f){_0x55713b['push'](_0x55713b['shift']());}};_0x5aa367(++_0x1a8cd8);}(_0x2678,0x1bb));var _0x8267=function(_0x405e05,_0xe5d4bf){_0x405e05=_0x405e05-0x0;var _0x51c2f4=_0x2678[_0x405e05];return _0x51c2f4;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x8267('0x0'));var rimraf=require(_0x8267('0x1'));var zipdir=require(_0x8267('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x8267('0x3'));var Mustache=require(_0x8267('0x4'));var util=require(_0x8267('0x5'));var path=require('path');var sox=require(_0x8267('0x6'));var csv=require(_0x8267('0x7'));var ejs=require(_0x8267('0x8'));var fs=require('fs');var _=require(_0x8267('0x9'));var squel=require(_0x8267('0xa'));var crypto=require(_0x8267('0xb'));var jsforce=require(_0x8267('0xc'));var deskjs=require(_0x8267('0xd'));var toCsv=require('to-csv');var querystring=require(_0x8267('0xe'));var Papa=require(_0x8267('0xf'));var Redis=require('ioredis');var authService=require(_0x8267('0x10'));var qs=require(_0x8267('0x11'));var as=require(_0x8267('0x12'));var hardwareService=require(_0x8267('0x13'));var logger=require(_0x8267('0x14'))('api');var utils=require(_0x8267('0x15'));var config=require(_0x8267('0x16'));var db=require(_0x8267('0x17'))['db'];config[_0x8267('0x18')]=_[_0x8267('0x19')](config[_0x8267('0x18')],{'host':_0x8267('0x1a'),'port':0x18eb});var socket=require(_0x8267('0x1b'))(new Redis(config[_0x8267('0x18')]));require(_0x8267('0x1c'))[_0x8267('0x1d')](socket);var jayson=require('jayson/promise');var client=jayson[_0x8267('0x1e')]['http']({'port':0x232a});function checkPasswordPattern(_0x39cc14,_0x118984,_0x1e6fee){if(_0x1e6fee){var _0x3cdf01=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x3cdf01['test'](_0x118984)){return _0x39cc14;}else{throw new db[(_0x8267('0x1f'))]['ValidationError'](_0x8267('0x20'));}}else{return _0x39cc14;}}function respondWithRpcPromise(_0x455d26,_0x55b9f9,_0x59685b,_0x2577a5){return new BPromise(function(_0x39f8c8,_0x1bce2d){var _0x312166=_0x2577a5||client;return _0x312166['request'](_0x455d26,_0x59685b)[_0x8267('0x21')](function(_0x5e3542){logger[_0x8267('0x22')](_0x8267('0x23'),_0x55b9f9,_0x8267('0x24'));logger['debug'](_0x8267('0x25'),_0x55b9f9,_0x8267('0x24'),JSON[_0x8267('0x26')](_0x5e3542));if(_0x5e3542[_0x8267('0x27')]){if(_0x5e3542[_0x8267('0x27')][_0x8267('0x28')]===0x1f4){logger[_0x8267('0x27')]('User,\x20%s,\x20%s',_0x55b9f9,_0x5e3542['error'][_0x8267('0x29')]);return _0x1bce2d(_0x5e3542[_0x8267('0x27')][_0x8267('0x29')]);}logger[_0x8267('0x27')](_0x8267('0x23'),_0x55b9f9,_0x5e3542[_0x8267('0x27')]['message']);return _0x39f8c8(_0x5e3542[_0x8267('0x27')][_0x8267('0x29')]);}else{logger[_0x8267('0x22')](_0x8267('0x23'),_0x55b9f9,_0x8267('0x24'));_0x39f8c8(_0x5e3542['result'][_0x8267('0x29')]);}})[_0x8267('0x2a')](function(_0x458d06){logger[_0x8267('0x27')](_0x8267('0x23'),_0x55b9f9,_0x458d06);_0x1bce2d(_0x458d06);});});}function respondWithStatusCode(_0xd6526e,_0x11fef5){_0x11fef5=_0x11fef5||0xcc;return function(_0x59cee3){if(_0x59cee3){return _0xd6526e[_0x8267('0x2b')](_0x11fef5);}return _0xd6526e[_0x8267('0x2c')](_0x11fef5)[_0x8267('0x2d')]();};}function respondWithResult(_0x3f2fbe,_0x398ebd){_0x398ebd=_0x398ebd||0xc8;return function(_0x21fbe4){if(_0x21fbe4){return _0x3f2fbe[_0x8267('0x2c')](_0x398ebd)[_0x8267('0x2e')](_0x21fbe4);}};}function respondWithFilteredResult(_0x37e2f1,_0xdb4adc){return function(_0x18cd66){if(_0x18cd66){var _0x5f5b0f=_0x18cd66['count'],_0x32323b=_0xdb4adc['offset'],_0x4f7377=_0xdb4adc['offset']+_0xdb4adc['limit'],_0x1e976d;if(_0x4f7377>=_0x5f5b0f){_0x4f7377=_0x5f5b0f;_0x1e976d=0xc8;}else{_0x1e976d=0xce;}_0x37e2f1['status'](_0x1e976d);return _0x37e2f1[_0x8267('0x2f')](_0x8267('0x30'),_0x32323b+'-'+_0x4f7377+'/'+_0x5f5b0f)['json'](_0x18cd66);}return null;};}function patchUpdates(_0x1ebb57){return function(_0x257787){try{jsonpatch['apply'](_0x257787,_0x1ebb57,!![]);}catch(_0xbac7eb){return BPromise[_0x8267('0x31')](_0xbac7eb);}return _0x257787[_0x8267('0x32')]();};}function saveUpdates(_0x5cc8ba,_0x4efc8e){return function(_0x116440){if(_0x116440){return _0x116440[_0x8267('0x33')](_0x5cc8ba)[_0x8267('0x21')](function(_0x54dabe){return _0x54dabe;});}return null;};}function removeEntity(_0x1bf027,_0x253ff6){return function(_0x3a6935){if(_0x3a6935){return _0x3a6935[_0x8267('0x34')]()[_0x8267('0x21')](function(){var _0x26955b=_0x3a6935['get']({'plain':!![]});var _0x3bc705=[{'name':_0x8267('0x35'),'value':_0x8267('0x36'),'ignore':!![]},{'name':_0x8267('0x37'),'value':'agent','ignore':![]},{'name':_0x8267('0x38'),'value':_0x8267('0x39'),'ignore':![]}];var _0x3f8db6=_(_0x3bc705)[_0x8267('0x3a')](_0x8267('0x3b'))[_0x8267('0x3c')](_0x8267('0x3d'))['value']();if(_[_0x8267('0x3e')](_0x3f8db6,_0x26955b[_0x8267('0x3f')])){return;}var _0xa87476=_['find'](_0x3bc705,[_0x8267('0x3d'),_0x26955b[_0x8267('0x3f')]])[_0x8267('0x40')];return db[_0x8267('0x41')][_0x8267('0x34')]({'where':{'type':_0xa87476,'resourceId':_0x26955b['id']}})[_0x8267('0x21')](function(){return _0x3a6935;});})['then'](function(){_0x1bf027[_0x8267('0x2c')](0xcc)[_0x8267('0x2d')]();});}};}function handleEntityNotFound(_0x478136,_0x36f71e){return function(_0x377ee5){if(!_0x377ee5){_0x478136['sendStatus'](0x194);}return _0x377ee5;};}function handleError(_0x11a485,_0x3ce168){_0x3ce168=_0x3ce168||0x1f4;return function(_0x19c384){logger[_0x8267('0x27')](_0x19c384[_0x8267('0x42')]);if(_0x19c384[_0x8267('0x40')]){delete _0x19c384[_0x8267('0x40')];}_0x11a485[_0x8267('0x2c')](_0x3ce168)[_0x8267('0x43')](_0x19c384);};}exports[_0x8267('0x44')]=function(_0x52d6ed,_0x45fb82){var _0x6944d9={},_0x153587={},_0x55d600={'count':0x0,'rows':[]};var _0x3cd2dc=_[_0x8267('0x3c')](db[_0x8267('0x45')][_0x8267('0x46')],function(_0x40aa77){return{'name':_0x40aa77[_0x8267('0x47')],'type':_0x40aa77[_0x8267('0x48')][_0x8267('0x49')]};});_0x153587[_0x8267('0x4a')]=_[_0x8267('0x4b')](_['map'](_0x3cd2dc,_0x8267('0x40')),[_0x8267('0x4c'),_0x8267('0x4d')]);_0x153587[_0x8267('0x4e')]=_['keys'](_0x52d6ed[_0x8267('0x4e')]);_0x153587[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x153587[_0x8267('0x4a')],_0x153587[_0x8267('0x4e')]);_0x6944d9[_0x8267('0x51')]=_[_0x8267('0x50')](_0x153587[_0x8267('0x4a')],qs[_0x8267('0x52')](_0x52d6ed[_0x8267('0x4e')][_0x8267('0x52')]));_0x6944d9[_0x8267('0x51')]=_0x6944d9['attributes']['length']?_0x6944d9[_0x8267('0x51')]:_0x153587['model'];if(!_0x52d6ed['query'][_0x8267('0x53')](_0x8267('0x54'))){_0x6944d9[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x52d6ed[_0x8267('0x4e')][_0x8267('0x55')]);_0x6944d9[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x52d6ed[_0x8267('0x4e')][_0x8267('0x56')]);}_0x6944d9['order']=qs['sort'](_0x52d6ed[_0x8267('0x4e')]['sort']);_0x6944d9[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x52d6ed[_0x8267('0x4e')],_0x153587['filters']));if(_0x52d6ed[_0x8267('0x4e')][_0x8267('0x3a')]){_0x6944d9[_0x8267('0x57')]=_[_0x8267('0x59')](_0x6944d9[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0x3cd2dc,function(_0x3be4ed){if(_0x3be4ed[_0x8267('0x48')]!==_0x8267('0x5a')){return db[_0x8267('0x5b')][_0x8267('0x57')](db[_0x8267('0x5b')]['fn'](_0x8267('0x5c'),db[_0x8267('0x5b')][_0x8267('0x5d')](_0x3be4ed['name'])),{'$like':db[_0x8267('0x5b')]['fn'](_0x8267('0x5c'),'%'+_0x52d6ed[_0x8267('0x4e')][_0x8267('0x3a')]+'%')});}})});}_0x6944d9=_[_0x8267('0x59')]({},_0x6944d9,_0x52d6ed['options']);var _0x30e2a9={'where':_0x6944d9['where']};return db[_0x8267('0x45')][_0x8267('0x5e')](_0x30e2a9)[_0x8267('0x21')](function(_0x5d9157){_0x55d600[_0x8267('0x5e')]=_0x5d9157;if(_0x52d6ed[_0x8267('0x4e')][_0x8267('0x5f')]){_0x6944d9[_0x8267('0x60')]=[{'all':!![]}];}return db[_0x8267('0x45')]['findAll'](_0x6944d9);})['then'](function(_0x30be29){_0x55d600[_0x8267('0x61')]=_0x30be29;return _0x55d600;})['then'](respondWithFilteredResult(_0x45fb82,_0x6944d9))[_0x8267('0x2a')](handleError(_0x45fb82,null));};exports['show']=function(_0x379987,_0x32f913){var _0x30bd74={'raw':![],'where':{'id':_0x379987[_0x8267('0x62')]['id']}},_0x200272={};_0x200272[_0x8267('0x4a')]=_[_0x8267('0x4b')](_[_0x8267('0x63')](db[_0x8267('0x45')][_0x8267('0x46')]),[_0x8267('0x4c'),_0x8267('0x4d')]);_0x200272[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x379987[_0x8267('0x4e')]);_0x200272[_0x8267('0x4f')]=_['intersection'](_0x200272[_0x8267('0x4a')],_0x200272[_0x8267('0x4e')]);_0x30bd74[_0x8267('0x51')]=_['intersection'](_0x200272[_0x8267('0x4a')],qs[_0x8267('0x52')](_0x379987['query'][_0x8267('0x52')]));_0x30bd74['attributes']=_0x30bd74[_0x8267('0x51')][_0x8267('0x64')]?_0x30bd74['attributes']:_0x200272[_0x8267('0x4a')];if(_0x379987[_0x8267('0x4e')][_0x8267('0x5f')]){_0x30bd74[_0x8267('0x60')]=[{'all':!![]}];}_0x30bd74=_[_0x8267('0x59')]({},_0x30bd74,_0x379987[_0x8267('0x65')]);return db[_0x8267('0x45')]['find'](_0x30bd74)[_0x8267('0x21')](handleEntityNotFound(_0x32f913,null))[_0x8267('0x21')](respondWithResult(_0x32f913,null))[_0x8267('0x2a')](handleError(_0x32f913,null));};exports[_0x8267('0x66')]=function(_0x44bdae,_0x3ed226){return db[_0x8267('0x45')][_0x8267('0x66')](_0x44bdae[_0x8267('0x67')],{'raw':![],'individualHooks':!![]})[_0x8267('0x21')](respondWithResult(_0x3ed226,0xc9))['catch'](handleError(_0x3ed226,null));};exports[_0x8267('0x33')]=function(_0x1f2d94,_0x348382){if(_0x1f2d94[_0x8267('0x67')]['id']){delete _0x1f2d94[_0x8267('0x67')]['id'];}delete _0x1f2d94[_0x8267('0x67')][_0x8267('0x3f')];return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x1f2d94[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x348382,null))['then'](saveUpdates(_0x1f2d94[_0x8267('0x67')],null))[_0x8267('0x21')](respondWithResult(_0x348382,null))['catch'](handleError(_0x348382,null));};exports[_0x8267('0x69')]=function(_0xf1a268,_0x343a4f){return db['User'][_0x8267('0x69')]()[_0x8267('0x21')](respondWithResult(_0x343a4f,null))[_0x8267('0x2a')](handleError(_0x343a4f,null));};exports[_0x8267('0x6a')]=function(_0x9a810a,_0x290a6a,_0x5dcf67){return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x9a810a[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x290a6a,null))[_0x8267('0x21')](function(_0x5b9231){if(_0x5b9231){return _0x5b9231[_0x8267('0x6a')](_0x9a810a['body'][_0x8267('0x6b')],_[_0x8267('0x6c')](_0x9a810a[_0x8267('0x67')],[_0x8267('0x6b'),'id'])||{});}})[_0x8267('0x21')](respondWithResult(_0x290a6a,null))[_0x8267('0x2a')](handleError(_0x290a6a,null));};var getLicense=function(_0x533fb6){return new BPromise(function(_0x31a3ff,_0x3bb56f){var _0x4ef54a=0x0;_0x533fb6['body'][_0x8267('0x3f')]==='agent'&&_0x31a3ff('agent\x20role');return db[_0x8267('0x45')][_0x8267('0x5e')]({'where':{'$or':[{'role':_0x533fb6[_0x8267('0x67')][_0x8267('0x3f')]===_0x8267('0x39')?'telephone':[_0x8267('0x6d'),_0x8267('0x36')]}]}})[_0x8267('0x21')](function(_0x5e8bb4){_0x4ef54a=_0x5e8bb4;return require(_0x8267('0x6e'))[_0x8267('0x6f')]();})['then'](function(_0x41e625){var _0x98a299=_0x533fb6[_0x8267('0x67')][_0x8267('0x3f')]==='telephone'?_0x8267('0x70'):_0x8267('0x71');if(!_[_0x8267('0x72')](_0x41e625[_0x98a299])&&_0x4ef54a>=_0x41e625[_0x98a299]){return _0x3bb56f({'message':_0x8267('0x73')});}return _0x31a3ff(util['format'](_0x8267('0x74'),_0x98a299,_0x4ef54a));})[_0x8267('0x2a')](function(_0x35214f){return _0x3bb56f(_0x35214f);});});};exports[_0x8267('0x75')]=function(_0x37bb7a,_0x2b2de3){return getLicense(_0x37bb7a)[_0x8267('0x21')](function(_0x5187cf){if(!_0x37bb7a[_0x8267('0x67')][_0x8267('0x76')]){var _0x3a376a;return db[_0x8267('0x77')][_0x8267('0x78')](0x1)['then'](function(_0x3e8342){return checkPasswordPattern(_0x3e8342,_0x37bb7a[_0x8267('0x67')][_0x8267('0x4c')],_0x3e8342[_0x8267('0x79')]);})[_0x8267('0x21')](function(_0x3bf6df){_0x3a376a=_0x3bf6df[_0x8267('0x7a')];return db['User'][_0x8267('0x7b')](_0x8267('0x76'));})[_0x8267('0x21')](function(_0x4e820f){if(_['isNil'](_0x4e820f)){if(_0x3a376a){_0x37bb7a[_0x8267('0x67')]['internal']=_0x3a376a;}else{_0x37bb7a[_0x8267('0x67')][_0x8267('0x76')]=0x1;}}else{if(_[_0x8267('0x72')](_0x3a376a)||_0x3a376a==_0x4e820f){_0x37bb7a[_0x8267('0x67')][_0x8267('0x76')]=_0x4e820f+0x1;}else if(_0x3a376a>_0x4e820f){_0x37bb7a[_0x8267('0x67')]['internal']=_0x3a376a;}else{return db[_0x8267('0x5b')][_0x8267('0x4e')](_0x8267('0x7c'),{'type':db[_0x8267('0x5b')]['QueryTypes'][_0x8267('0x7d')]})[_0x8267('0x21')](function(_0x157ee4){if(_0x157ee4&&_0x157ee4[_0x8267('0x64')]){for(var _0x3e3145=0x0,_0x51d294=_0x157ee4[_0x8267('0x64')];_0x3e3145<_0x51d294&&_[_0x8267('0x72')](_0x37bb7a[_0x8267('0x67')][_0x8267('0x76')]);_0x3e3145++){if(_0x3a376a<=_0x157ee4[_0x3e3145][_0x8267('0x7e')]){_0x37bb7a[_0x8267('0x67')]['internal']=_0x157ee4[_0x3e3145][_0x8267('0x7e')];}else if(_0x3a376a>_0x157ee4[_0x3e3145][_0x8267('0x7e')]&&_0x3a376a<=_0x157ee4[_0x3e3145]['to']){_0x37bb7a[_0x8267('0x67')][_0x8267('0x76')]=_0x3a376a;}}}if(_[_0x8267('0x72')](_0x37bb7a[_0x8267('0x67')]['internal'])){_0x37bb7a[_0x8267('0x67')]['internal']=_0x4e820f+0x1;}});}}});}})[_0x8267('0x21')](function(){if(_0x37bb7a[_0x8267('0x67')][_0x8267('0x7f')]){_0x37bb7a['body'][_0x8267('0x80')]=_0x37bb7a[_0x8267('0x67')][_0x8267('0x76')];_0x37bb7a['body'][_0x8267('0x81')]={'mailbox':_0x37bb7a[_0x8267('0x67')][_0x8267('0x76')],'password':_0x37bb7a[_0x8267('0x67')]['password'],'fullname':_0x37bb7a[_0x8267('0x67')][_0x8267('0x82')],'email':_0x37bb7a['body'][_0x8267('0x83')]};}if(_0x37bb7a[_0x8267('0x67')]&&_0x37bb7a[_0x8267('0x67')][_0x8267('0x3f')]===_0x8267('0x84')){_0x37bb7a[_0x8267('0x67')][_0x8267('0x85')]=['101',_0x8267('0x86'),_0x8267('0x87'),_0x8267('0x88'),'104',_0x8267('0x89'),_0x8267('0x8a'),_0x8267('0x8b'),'108',_0x8267('0x8c'),_0x8267('0x8d'),'111'];}return db[_0x8267('0x45')][_0x8267('0x75')](_0x37bb7a[_0x8267('0x67')],{'include':[{'model':db[_0x8267('0x81')],'as':_0x8267('0x81')}]});})[_0x8267('0x21')](function(_0x1801f5){if(_0x37bb7a[_0x8267('0x67')]['role']==='user')return _0x1801f5;var _0x3f444f=_0x37bb7a[_0x8267('0x36')][_0x8267('0x8e')]({'plain':!![]});if(!_0x3f444f)throw new Error(_0x8267('0x8f'));if(_0x3f444f['role']===_0x8267('0x36')){var _0x1cf033=_0x1801f5[_0x8267('0x8e')]({'plain':!![]});var _0x3a08d0=[{'name':_0x8267('0x37'),'value':_0x8267('0x84')},{'name':_0x8267('0x38'),'value':_0x8267('0x39')}];var _0x4de0f2=_[_0x8267('0x68')](_0x3a08d0,[_0x8267('0x3d'),_0x1cf033[_0x8267('0x3f')]])['name'];return db[_0x8267('0x90')][_0x8267('0x68')]({'where':{'name':_0x4de0f2,'userProfileId':_0x3f444f[_0x8267('0x91')]},'raw':!![]})[_0x8267('0x21')](function(_0x34323d){if(_0x34323d&&_0x34323d[_0x8267('0x92')]===0x0){return db[_0x8267('0x41')][_0x8267('0x75')]({'name':_0x1cf033[_0x8267('0x40')],'resourceId':_0x1cf033['id'],'type':_0x34323d[_0x8267('0x40')],'sectionId':_0x34323d['id']},{})[_0x8267('0x21')](function(){return _0x1801f5;});}else{return _0x1801f5;}})[_0x8267('0x2a')](function(_0x44c5cf){logger[_0x8267('0x27')](_0x8267('0x93'),_0x44c5cf);throw _0x44c5cf;});}return _0x1801f5;})[_0x8267('0x21')](respondWithResult(_0x2b2de3,0xc9))[_0x8267('0x2a')](handleError(_0x2b2de3,null));};exports[_0x8267('0x94')]=function(_0x49011e,_0x3f2baa,_0x12249f){var _0x5b82e9=![];if(_0x49011e[_0x8267('0x67')]['id']){delete _0x49011e[_0x8267('0x67')]['id'];}return db['Setting'][_0x8267('0x95')]({'attributes':['id',_0x8267('0x79')]})[_0x8267('0x21')](function(_0x4c3e5a){_0x5b82e9=_0x4c3e5a[_0x8267('0x79')];return db['User'][_0x8267('0x68')]({'where':{'id':_0x49011e[_0x8267('0x62')]['id']}});})['then'](function(_0x14df7a){if(_0x14df7a){if(_0x14df7a['id']==_0x49011e[_0x8267('0x36')]['id']){if(!_0x49011e['body'][_0x8267('0x96')]||!_0x49011e[_0x8267('0x67')][_0x8267('0x97')]){throw new db[(_0x8267('0x1f'))][(_0x8267('0x98'))](_0x8267('0x99'));}if(!_0x14df7a[_0x8267('0x9a')](_0x49011e[_0x8267('0x67')][_0x8267('0x96')])){throw new db[(_0x8267('0x1f'))]['ValidationError'](_0x8267('0x9b'));}if(_0x49011e[_0x8267('0x67')][_0x8267('0x96')]==_0x49011e['body'][_0x8267('0x97')]){throw new db[(_0x8267('0x1f'))]['ValidationError'](_0x8267('0x9c'));}return _0x14df7a;}else if(_0x49011e[_0x8267('0x36')][_0x8267('0x3f')]==_0x8267('0x6d')){if(!_0x49011e[_0x8267('0x67')][_0x8267('0x97')]){throw new db[(_0x8267('0x1f'))]['ValidationError'](_0x8267('0x9d'));}return _0x14df7a;}else if(_0x49011e[_0x8267('0x36')][_0x8267('0x3f')]=='user'){if(!_0x49011e[_0x8267('0x67')]['newPassword']){throw new db[(_0x8267('0x1f'))][(_0x8267('0x98'))](_0x8267('0x9d'));}if(_0x14df7a[_0x8267('0x3f')]!=_0x8267('0x84')){throw new db['Sequelize'][(_0x8267('0x98'))](_0x8267('0x9e'));}return _0x14df7a;}else{throw new db[(_0x8267('0x1f'))][(_0x8267('0x98'))](_0x8267('0x9e'));}}return null;})[_0x8267('0x21')](handleEntityNotFound(_0x3f2baa,null))[_0x8267('0x21')](function(_0x210901){return checkPasswordPattern(_0x210901,_0x49011e[_0x8267('0x67')][_0x8267('0x97')],_0x5b82e9);})[_0x8267('0x21')](saveUpdates({'password':_0x49011e['body'][_0x8267('0x97')],'passwordResetAt':_0x49011e[_0x8267('0x36')]['id']==_0x49011e[_0x8267('0x62')]['id']?moment():null},null))[_0x8267('0x21')](respondWithResult(_0x3f2baa,null))[_0x8267('0x2a')](handleError(_0x3f2baa,null));};exports[_0x8267('0x9f')]=function(_0x475dda,_0x873601,_0x422382){var _0x3274f4=_0x475dda[_0x8267('0x67')][_0x8267('0xa0')];return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x475dda[_0x8267('0x62')]['id']},'attributes':['id',_0x8267('0x40'),_0x8267('0x3f'),_0x8267('0xa1'),_0x8267('0xa2'),_0x8267('0xa3'),_0x8267('0xa4')]})[_0x8267('0x21')](handleEntityNotFound(_0x873601,null))[_0x8267('0x21')](function(_0x572424){if(_0x572424){if(!utils['isValidChannel'](_0x3274f4)){throw new db[(_0x8267('0x1f'))]['ValidationError']('Unknown\x20channel');}return _0x572424[_0x8267('0xa5')+_[_0x8267('0xa6')](_0x3274f4[_0x8267('0xa7')]())+_0x8267('0xa8')](_0x475dda[_0x8267('0x67')][_0x8267('0x6b')],{'penalty':_0x475dda[_0x8267('0x67')][_0x8267('0xa9')]||0x0})[_0x8267('0xaa')](function(_0x375f98){for(var _0x25b966=0x0;_0x25b966<_0x475dda[_0x8267('0x67')][_0x8267('0x6b')][_0x8267('0x64')];_0x25b966+=0x1){var _0xaa320b={'UserId':_0x475dda[_0x8267('0x62')]['id']};_0xaa320b[_[_0x8267('0xa6')](_0x3274f4['toLowerCase']())+_0x8267('0xab')]=_0x475dda[_0x8267('0x67')][_0x8267('0x6b')][_0x25b966];socket[_0x8267('0xac')]('user'+_[_0x8267('0xa6')](_0x3274f4[_0x8267('0xa7')]())+_0x8267('0xad'),_0xaa320b);}return _0x375f98;})[_0x8267('0x21')](function(){if(_0x3274f4===_0x8267('0xae')){return db[_0x8267('0xaf')]['findAll']({'where':{'id':_0x475dda[_0x8267('0x67')][_0x8267('0x6b')]||[]},'raw':!![],'attributes':['id',_0x8267('0x40')]});}})['then'](function(_0x41f5d7){var _0x1a68ad=_0x572424[_0x8267('0x8e')]({'plain':!![]});var _0x108931=[];if(_0x3274f4===_0x8267('0xae')&&_0x1a68ad[_0x8267('0x3f')]===_0x8267('0x84')&&_0x1a68ad[_0x8267('0xa1')]){for(var _0x26aecb=0x0;_0x26aecb<_0x41f5d7['length'];_0x26aecb+=0x1){_0x108931[_0x8267('0xb0')]({'membername':_0x1a68ad[_0x8267('0x40')],'UserId':_0x1a68ad['id'],'queue_name':_0x41f5d7[_0x26aecb][_0x8267('0x40')],'VoiceQueueId':_0x41f5d7[_0x26aecb]['id'],'interface':_['isNil'](_0x1a68ad[_0x8267('0xa4')])?util[_0x8267('0xb1')](_0x8267('0xb2'),_0x1a68ad['name']):_0x1a68ad[_0x8267('0xa4')],'paused':_0x1a68ad[_0x8267('0xa3')]||![],'penalty':_0x475dda[_0x8267('0x67')][_0x8267('0xa9')]||0x0});}return BPromise[_0x8267('0xb3')](_0x108931,function(_0x2d49e2){return db[_0x8267('0xb4')]['upsert'](_0x2d49e2);});}return _0x572424;});}})[_0x8267('0x21')](respondWithStatusCode(_0x873601,null))[_0x8267('0x2a')](handleError(_0x873601,null));};exports[_0x8267('0xb5')]=function(_0x32fea4,_0x1b99db,_0x5061c3){var _0x4e29ca;return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x32fea4[_0x8267('0x62')]['id']},'attributes':['id',_0x8267('0x40'),_0x8267('0x3f')]})[_0x8267('0x21')](handleEntityNotFound(_0x1b99db,null))[_0x8267('0x21')](function(_0x3cb790){if(_0x3cb790){_0x4e29ca=_0x3cb790;if(!_0x32fea4[_0x8267('0x4e')]['channel']||!utils[_0x8267('0xb6')](_0x32fea4[_0x8267('0x4e')][_0x8267('0xa0')])){throw new db[(_0x8267('0x1f'))]['ValidationError'](_0x8267('0xb7'));}return _0x3cb790[_0x8267('0xb8')+_['capitalize'](_0x32fea4[_0x8267('0x4e')]['channel'][_0x8267('0xa7')]())+_0x8267('0xa8')](_0x32fea4[_0x8267('0x4e')][_0x8267('0x6b')]);}})[_0x8267('0x21')](function(_0x384487){for(var _0x47bf37=0x0;_0x47bf37<_0x32fea4[_0x8267('0x4e')]['ids'][_0x8267('0x64')];_0x47bf37+=0x1){var _0x222da4={'UserId':_0x32fea4[_0x8267('0x62')]['id']};_0x222da4[_[_0x8267('0xa6')](_0x32fea4['query'][_0x8267('0xa0')][_0x8267('0xa7')]())+'QueueId']=_0x32fea4['query']['ids'][_0x47bf37];socket[_0x8267('0xac')]('user'+_[_0x8267('0xa6')](_0x32fea4['query'][_0x8267('0xa0')][_0x8267('0xa7')]())+'Queue:remove',_0x222da4);}return _0x384487;})[_0x8267('0x21')](function(){if(_0x32fea4['query'][_0x8267('0xa0')]===_0x8267('0xae')){return db[_0x8267('0xb4')][_0x8267('0x34')]({'where':{'UserId':_0x32fea4[_0x8267('0x62')]['id'],'VoiceQueueId':_0x32fea4[_0x8267('0x4e')]['ids']},'individualHooks':!![]})[_0x8267('0x21')](function(){return _0x4e29ca;});}return _0x4e29ca;})[_0x8267('0x21')](respondWithStatusCode(_0x1b99db,null))[_0x8267('0x2a')](handleError(_0x1b99db,null));};exports[_0x8267('0xb9')]=function(_0x2d1f5f,_0x558304,_0x4ab5cf){_0x2d1f5f[_0x8267('0x67')][_0x8267('0xba')]=_0x2d1f5f[_0x8267('0xbb')][_0x8267('0xbc')];return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x2d1f5f['params']['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x558304,null))[_0x8267('0x21')](saveUpdates(_0x2d1f5f[_0x8267('0x67')],null))[_0x8267('0x21')](respondWithResult(_0x558304,null))['catch'](handleError(_0x558304,null));};exports[_0x8267('0xbd')]=function(_0x33744c,_0x174e0f,_0x381e59){var _0x5b04d7=path[_0x8267('0xbe')](config['root'],'server/files/images/logos/default_profile.png');return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x33744c['params']['id']},'attributes':['id','userpic'],'raw':!![]})[_0x8267('0x21')](handleEntityNotFound(_0x174e0f,null))[_0x8267('0x21')](function(_0x5f1f40){if(_0x5f1f40){if(_['isNil'](_0x5f1f40[_0x8267('0xba')])){return _0x174e0f[_0x8267('0xbf')](_0x5b04d7);}else{if(!fs[_0x8267('0xc0')](path[_0x8267('0xbe')](config[_0x8267('0xc1')],_0x8267('0xc2'),_0x5f1f40[_0x8267('0xba')]))){return _0x174e0f[_0x8267('0xbf')](_0x5b04d7);}return _0x174e0f[_0x8267('0xbf')](path[_0x8267('0xbe')](config[_0x8267('0xc1')],'server/files/images/',_0x5f1f40[_0x8267('0xba')]));}}})['catch'](handleError(_0x174e0f,null));};exports['getContacts']=function(_0x431dad,_0x17f518,_0xc1d60){var _0x1704a4={};var _0x209bcc={};var _0x3bfae9;var _0x31a1e1;return db['User'][_0x8267('0x95')]({'where':{'id':_0x431dad[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x17f518,null))[_0x8267('0x21')](function(_0x48abbe){if(_0x48abbe){_0x3bfae9=_0x48abbe;_0x209bcc['model']=_[_0x8267('0x63')](db[_0x8267('0xc3')][_0x8267('0x46')]);_0x209bcc['query']=_[_0x8267('0x63')](_0x431dad[_0x8267('0x4e')]);_0x209bcc['filters']=_[_0x8267('0x50')](_0x209bcc[_0x8267('0x4a')],_0x209bcc[_0x8267('0x4e')]);_0x1704a4[_0x8267('0x51')]=_['intersection'](_0x209bcc['model'],qs['fields'](_0x431dad[_0x8267('0x4e')][_0x8267('0x52')]));_0x1704a4[_0x8267('0x51')]=_0x1704a4[_0x8267('0x51')][_0x8267('0x64')]?_0x1704a4[_0x8267('0x51')]:_0x209bcc['model'];_0x1704a4[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x431dad['query'][_0x8267('0xc5')]);_0x1704a4[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x431dad['query'],_0x209bcc[_0x8267('0x4f')]));if(_0x431dad[_0x8267('0x4e')][_0x8267('0x3a')]){_0x1704a4[_0x8267('0x57')]=_['merge'](_0x1704a4['where'],{'$or':_[_0x8267('0x3c')](_0x1704a4['attributes'],function(_0x274eec){var _0xee5fb={};_0xee5fb[_0x274eec]={'$like':'%'+_0x431dad['query'][_0x8267('0x3a')]+'%'};return _0xee5fb;})});}_0x1704a4=_[_0x8267('0x59')]({},_0x1704a4,_0x431dad['options']);return _0x3bfae9['getContacts'](_0x1704a4);}})[_0x8267('0x21')](function(_0x28feac){if(_0x28feac){_0x31a1e1=_0x28feac['length'];if(_0x431dad[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x5f'))){_0x1704a4[_0x8267('0x60')]=[{'model':db[_0x8267('0xc6')],'as':_0x8267('0xc7'),'required':![]},{'model':db['Tag'],'as':_0x8267('0xc8'),'attributes':['id',_0x8267('0x40'),_0x8267('0xc9')],'where':_0x431dad[_0x8267('0x4e')][_0x8267('0xca')]?{'id':_0x431dad[_0x8267('0x4e')][_0x8267('0xca')]}:undefined,'required':_0x431dad[_0x8267('0x4e')]['tag']?!![]:![]}];}if(!_0x431dad[_0x8267('0x4e')]['hasOwnProperty']('nolimit')){_0x1704a4[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x431dad['query'][_0x8267('0x55')]);_0x1704a4[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x431dad[_0x8267('0x4e')][_0x8267('0x56')]);}return _0x3bfae9[_0x8267('0xcb')](_0x1704a4);}})[_0x8267('0x21')](function(_0x388d6c){if(_0x388d6c){return _0x388d6c?{'count':_0x31a1e1,'rows':_0x388d6c}:null;}})['then'](respondWithResult(_0x17f518,null))['catch'](handleError(_0x17f518,null));};exports[_0x8267('0xcc')]=function(_0x46dcce,_0x4803ba,_0x35e1cd){var _0x50bdf8;var _0x1905fe;var _0x23c873={};var _0x58dc28;return db[_0x8267('0x45')][_0x8267('0x95')]({'where':{'id':_0x46dcce['params']['id']},'attributes':['id',_0x8267('0x40'),_0x8267('0x3f')]})[_0x8267('0x21')](handleEntityNotFound(_0x4803ba,null))[_0x8267('0x21')](function(_0x427185){if(!utils[_0x8267('0xb6')](_0x46dcce[_0x8267('0x4e')][_0x8267('0xa0')])){throw new db[(_0x8267('0x1f'))][(_0x8267('0x98'))](_0x8267('0xb7'));}_0x50bdf8=_0x427185;var _0x585d24={};_0x585d24[_0x8267('0x4a')]=_[_0x8267('0x63')](db[_['capitalize'](_0x46dcce[_0x8267('0x4e')][_0x8267('0xa0')])+'Queue']['rawAttributes']);_0x585d24[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x46dcce[_0x8267('0x4e')]);_0x585d24[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x585d24[_0x8267('0x4a')],_0x585d24[_0x8267('0x4e')]);_0x23c873['attributes']=_[_0x8267('0x50')](_0x585d24['model'],qs['fields'](_0x46dcce[_0x8267('0x4e')][_0x8267('0x52')]));_0x23c873[_0x8267('0x51')]=_0x23c873[_0x8267('0x51')][_0x8267('0x64')]?_0x23c873['attributes']:_0x585d24['model'];_0x23c873[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x46dcce['query']['sort']);_0x23c873[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x46dcce[_0x8267('0x4e')],_0x585d24['filters']));if(_0x46dcce['query'][_0x8267('0x3a')]){_0x23c873['where']=_[_0x8267('0x59')](_0x23c873['where'],{'$or':_[_0x8267('0x3c')](_0x23c873['attributes'],function(_0xf40d9){var _0x2ad3cd={};_0x2ad3cd[_0xf40d9]={'$like':'%'+_0x46dcce[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x2ad3cd;})});}_0x23c873=_[_0x8267('0x59')]({},_0x23c873,_0x46dcce[_0x8267('0x65')]);switch(_0x50bdf8[_0x8267('0x3f')]){case _0x8267('0x6d'):return db[_[_0x8267('0xa6')](_0x46dcce[_0x8267('0x4e')]['channel'])+'Queue'][_0x8267('0xcd')](_0x23c873);case'user':case _0x8267('0x84'):return _0x50bdf8[_0x8267('0x8e')+_[_0x8267('0xa6')](_0x46dcce[_0x8267('0x4e')][_0x8267('0xa0')])+'Queues'](_0x23c873);default:throw new db['Sequelize'][(_0x8267('0x98'))]('Unknown\x20role');}})[_0x8267('0x21')](function(_0x12946f){_0x58dc28=_0x12946f[_0x8267('0x64')];if(!_0x46dcce['query']['hasOwnProperty']('nolimit')){_0x23c873['limit']=qs[_0x8267('0x55')](_0x46dcce[_0x8267('0x4e')][_0x8267('0x55')]);_0x23c873[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x46dcce[_0x8267('0x4e')][_0x8267('0x56')]);}switch(_0x50bdf8[_0x8267('0x3f')]){case _0x8267('0x6d'):return db[_['capitalize'](_0x46dcce[_0x8267('0x4e')][_0x8267('0xa0')])+_0x8267('0xce')]['findAll'](_0x23c873);case _0x8267('0x36'):case _0x8267('0x84'):return _0x50bdf8['get'+_[_0x8267('0xa6')](_0x46dcce[_0x8267('0x4e')][_0x8267('0xa0')])+_0x8267('0xa8')](_0x23c873);}})['then'](function(_0x1f4720){return{'count':_0x58dc28,'rows':_0x1f4720};})[_0x8267('0x21')](respondWithResult(_0x4803ba,null))[_0x8267('0x2a')](handleError(_0x4803ba,null));};exports[_0x8267('0xcf')]=function(_0x316af6,_0x38c4b0,_0x21e419){var _0x5e44c8={};var _0x3d13d0={};var _0x4c6a3e;var _0x34a0d4;return db['User'][_0x8267('0x95')]({'where':{'id':_0x316af6[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x38c4b0,null))[_0x8267('0x21')](function(_0x58db1a){if(_0x58db1a){_0x4c6a3e=_0x58db1a;_0x3d13d0['model']=_[_0x8267('0x63')](db[_0x8267('0xb4')][_0x8267('0x46')]);_0x3d13d0[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x316af6['query']);_0x3d13d0[_0x8267('0x4f')]=_['intersection'](_0x3d13d0[_0x8267('0x4a')],_0x3d13d0[_0x8267('0x4e')]);_0x5e44c8[_0x8267('0x51')]=_[_0x8267('0x50')](_0x3d13d0['model'],qs[_0x8267('0x52')](_0x316af6[_0x8267('0x4e')][_0x8267('0x52')]));_0x5e44c8[_0x8267('0x51')]=_0x5e44c8[_0x8267('0x51')][_0x8267('0x64')]?_0x5e44c8[_0x8267('0x51')]:_0x3d13d0[_0x8267('0x4a')];_0x5e44c8['order']=qs[_0x8267('0xc5')](_0x316af6[_0x8267('0x4e')][_0x8267('0xc5')]);_0x5e44c8[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x316af6[_0x8267('0x4e')],_0x3d13d0[_0x8267('0x4f')]));if(_0x316af6[_0x8267('0x4e')]['filter']){_0x5e44c8[_0x8267('0x57')]=_[_0x8267('0x59')](_0x5e44c8['where'],{'$or':_['map'](_0x5e44c8[_0x8267('0x51')],function(_0x322bff){var _0x15eda2={};_0x15eda2[_0x322bff]={'$like':'%'+_0x316af6[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x15eda2;})});}_0x5e44c8=_['merge']({},_0x5e44c8,_0x316af6[_0x8267('0x65')]);return _0x4c6a3e[_0x8267('0xcf')](_0x5e44c8);}})[_0x8267('0x21')](function(_0x1ce50f){if(_0x1ce50f){_0x34a0d4=_0x1ce50f[_0x8267('0x64')];if(!_0x316af6[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x54'))){_0x5e44c8[_0x8267('0x55')]=qs['limit'](_0x316af6[_0x8267('0x4e')][_0x8267('0x55')]);_0x5e44c8[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x316af6[_0x8267('0x4e')][_0x8267('0x56')]);}return _0x4c6a3e[_0x8267('0xcf')](_0x5e44c8);}})[_0x8267('0x21')](function(_0x2e2232){if(_0x2e2232){return _0x2e2232?{'count':_0x34a0d4,'rows':_0x2e2232}:null;}})['then'](respondWithResult(_0x38c4b0,null))[_0x8267('0x2a')](handleError(_0x38c4b0,null));};exports[_0x8267('0xd0')]=function(_0x1872ca,_0x117750,_0x2f14ab){var _0x389298={};var _0x326578={};var _0x3edaa8;var _0xa59b75;return db[_0x8267('0x45')][_0x8267('0x95')]({'where':{'id':_0x1872ca[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x117750,null))[_0x8267('0x21')](function(_0x1f02b1){if(_0x1f02b1){_0x3edaa8=_0x1f02b1;_0x326578[_0x8267('0x4a')]=_['keys'](db[_0x8267('0xd1')][_0x8267('0x46')]);_0x326578[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x1872ca[_0x8267('0x4e')]);_0x326578[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x326578[_0x8267('0x4a')],_0x326578['query']);_0x389298[_0x8267('0x51')]=_[_0x8267('0x50')](_0x326578[_0x8267('0x4a')],qs['fields'](_0x1872ca['query'][_0x8267('0x52')]));_0x389298[_0x8267('0x51')]=_0x389298['attributes']['length']?_0x389298[_0x8267('0x51')]:_0x326578['model'];_0x389298['order']=qs[_0x8267('0xc5')](_0x1872ca[_0x8267('0x4e')]['sort']);_0x389298[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x1872ca[_0x8267('0x4e')],_0x326578[_0x8267('0x4f')]));if(_0x1872ca[_0x8267('0x4e')][_0x8267('0x3a')]){_0x389298[_0x8267('0x57')]=_[_0x8267('0x59')](_0x389298['where'],{'$or':_['map'](_0x389298[_0x8267('0x51')],function(_0x318da9){var _0x4982c3={};_0x4982c3[_0x318da9]={'$like':'%'+_0x1872ca[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x4982c3;})});}_0x389298=_[_0x8267('0x59')]({},_0x389298,_0x1872ca[_0x8267('0x65')]);return _0x3edaa8[_0x8267('0xd0')](_0x389298);}})[_0x8267('0x21')](function(_0x55e5c3){if(_0x55e5c3){_0xa59b75=_0x55e5c3['length'];if(!_0x1872ca[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x54'))){_0x389298['limit']=qs[_0x8267('0x55')](_0x1872ca['query'][_0x8267('0x55')]);_0x389298['offset']=qs[_0x8267('0x56')](_0x1872ca[_0x8267('0x4e')][_0x8267('0x56')]);}return _0x3edaa8[_0x8267('0xd0')](_0x389298);}})[_0x8267('0x21')](function(_0x53a79d){if(_0x53a79d){return _0x53a79d?{'count':_0xa59b75,'rows':_0x53a79d}:null;}})['then'](respondWithResult(_0x117750,null))[_0x8267('0x2a')](handleError(_0x117750,null));};exports[_0x8267('0xd2')]=function(_0x3eaea1,_0x83b184,_0x3a65f7){var _0x3c642a={'raw':!![],'where':{}};var _0x43d3bb={};var _0x1cd326={'count':0x0,'rows':[]};return db[_0x8267('0x45')]['findOne']({'where':{'id':_0x3eaea1['params']['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x83b184,null))[_0x8267('0x21')](function(_0xf0a330){if(_0xf0a330){_0x43d3bb[_0x8267('0x4a')]=_['keys'](db[_0x8267('0xd3')][_0x8267('0x46')]);_0x43d3bb[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x3eaea1[_0x8267('0x4e')]);_0x43d3bb[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x43d3bb[_0x8267('0x4a')],_0x43d3bb[_0x8267('0x4e')]);_0x3c642a[_0x8267('0x51')]=_[_0x8267('0x50')](_0x43d3bb[_0x8267('0x4a')],qs[_0x8267('0x52')](_0x3eaea1[_0x8267('0x4e')][_0x8267('0x52')]));_0x3c642a[_0x8267('0x51')]=_0x3c642a[_0x8267('0x51')][_0x8267('0x64')]?_0x3c642a[_0x8267('0x51')]:_0x43d3bb['model'];if(!_0x3eaea1['query'][_0x8267('0x53')](_0x8267('0x54'))){_0x3c642a[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x3eaea1[_0x8267('0x4e')][_0x8267('0x55')]);_0x3c642a[_0x8267('0x56')]=qs['offset'](_0x3eaea1[_0x8267('0x4e')][_0x8267('0x56')]);}_0x3c642a['order']=qs[_0x8267('0xc5')](_0x3eaea1['query'][_0x8267('0xc5')]);_0x3c642a[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x3eaea1[_0x8267('0x4e')],_0x43d3bb[_0x8267('0x4f')]));_0x3c642a[_0x8267('0x57')][_0x8267('0xd4')]=_0xf0a330['id'];if(_0x3eaea1[_0x8267('0x4e')][_0x8267('0x3a')]){_0x3c642a[_0x8267('0x57')]=_[_0x8267('0x59')](_0x3c642a[_0x8267('0x57')],{'$or':_['map'](_0x3c642a[_0x8267('0x51')],function(_0x3dc34a){var _0x1df2ec={};_0x1df2ec[_0x3dc34a]={'$like':'%'+_0x3eaea1[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x1df2ec;})});}_0x3c642a=_['merge']({},_0x3c642a,_0x3eaea1[_0x8267('0x65')]);return db['VoiceRecording']['count']({'where':_0x3c642a[_0x8267('0x57')]})['then'](function(_0x21fbf9){_0x1cd326[_0x8267('0x5e')]=_0x21fbf9;if(_0x3eaea1[_0x8267('0x4e')][_0x8267('0x5f')]){_0x3c642a[_0x8267('0x60')]=[{'all':!![]}];}return db['VoiceRecording'][_0x8267('0xcd')](_0x3c642a);})[_0x8267('0x21')](function(_0x1093a0){_0x1cd326['rows']=_0x1093a0;return _0x1cd326;});}})[_0x8267('0x21')](respondWithFilteredResult(_0x83b184,_0x3c642a))[_0x8267('0x2a')](handleError(_0x83b184,null));};exports[_0x8267('0xd5')]=function(_0x39d9fc,_0x8a90cc,_0x55d545){var _0x245f50={'raw':!![],'where':{}};var _0x2185b9={};var _0x156fad={'count':0x0,'rows':[]};return db[_0x8267('0x45')][_0x8267('0x95')]({'where':{'id':_0x39d9fc[_0x8267('0x62')]['id']}})['then'](handleEntityNotFound(_0x8a90cc,null))['then'](function(_0x198bf5){if(_0x198bf5){_0x2185b9['model']=_['keys'](db[_0x8267('0xd6')][_0x8267('0x46')]);_0x2185b9[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x39d9fc[_0x8267('0x4e')]);_0x2185b9[_0x8267('0x4f')]=_['intersection'](_0x2185b9[_0x8267('0x4a')],_0x2185b9[_0x8267('0x4e')]);_0x245f50['attributes']=_[_0x8267('0x50')](_0x2185b9[_0x8267('0x4a')],qs[_0x8267('0x52')](_0x39d9fc[_0x8267('0x4e')][_0x8267('0x52')]));_0x245f50[_0x8267('0x51')]=_0x245f50[_0x8267('0x51')][_0x8267('0x64')]?_0x245f50[_0x8267('0x51')]:_0x2185b9[_0x8267('0x4a')];if(!_0x39d9fc[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x54'))){_0x245f50['limit']=qs[_0x8267('0x55')](_0x39d9fc['query']['limit']);_0x245f50['offset']=qs[_0x8267('0x56')](_0x39d9fc['query']['offset']);}_0x245f50[_0x8267('0xc4')]=qs['sort'](_0x39d9fc['query']['sort']);_0x245f50[_0x8267('0x57')]=qs[_0x8267('0x4f')](_['pick'](_0x39d9fc[_0x8267('0x4e')],_0x2185b9['filters']));_0x245f50[_0x8267('0x57')][_0x8267('0xd4')]=_0x198bf5['id'];if(_0x39d9fc[_0x8267('0x4e')]['filter']){_0x245f50[_0x8267('0x57')]=_[_0x8267('0x59')](_0x245f50[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0x245f50[_0x8267('0x51')],function(_0x44c35a){var _0x5d61f8={};_0x5d61f8[_0x44c35a]={'$like':'%'+_0x39d9fc[_0x8267('0x4e')]['filter']+'%'};return _0x5d61f8;})});}_0x245f50=_[_0x8267('0x59')]({},_0x245f50,_0x39d9fc[_0x8267('0x65')]);return db['ScreenRecording'][_0x8267('0x5e')]({'where':_0x245f50[_0x8267('0x57')]})[_0x8267('0x21')](function(_0x1999fb){_0x156fad[_0x8267('0x5e')]=_0x1999fb;if(_0x39d9fc[_0x8267('0x4e')]['includeAll']){_0x245f50['include']=[{'all':!![]}];}return db['ScreenRecording'][_0x8267('0xcd')](_0x245f50);})[_0x8267('0x21')](function(_0x3281ea){_0x156fad[_0x8267('0x61')]=_0x3281ea;return _0x156fad;});}})[_0x8267('0x21')](respondWithFilteredResult(_0x8a90cc,_0x245f50))[_0x8267('0x2a')](handleError(_0x8a90cc,null));};exports[_0x8267('0xd7')]=function(_0x183bbb,_0x452c2a,_0x388d5c){var _0x1dd72d={};var _0x44eb58={};var _0x5bd698;var _0x5ca11d;return db[_0x8267('0x45')][_0x8267('0x95')]({'where':{'id':_0x183bbb[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x452c2a,null))[_0x8267('0x21')](function(_0x55c9dc){if(_0x55c9dc){_0x5bd698=_0x55c9dc;_0x44eb58[_0x8267('0x4a')]=_['keys'](db[_0x8267('0xd8')][_0x8267('0x46')]);_0x44eb58[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x183bbb[_0x8267('0x4e')]);_0x44eb58[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x44eb58[_0x8267('0x4a')],_0x44eb58['query']);_0x1dd72d[_0x8267('0x51')]=_[_0x8267('0x50')](_0x44eb58['model'],qs[_0x8267('0x52')](_0x183bbb['query'][_0x8267('0x52')]));_0x1dd72d['attributes']=_0x1dd72d['attributes'][_0x8267('0x64')]?_0x1dd72d[_0x8267('0x51')]:_0x44eb58['model'];_0x1dd72d[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x183bbb['query'][_0x8267('0xc5')]);_0x1dd72d[_0x8267('0x57')]=qs[_0x8267('0x4f')](_['pick'](_0x183bbb[_0x8267('0x4e')],_0x44eb58[_0x8267('0x4f')]));if(_0x183bbb[_0x8267('0x4e')][_0x8267('0x3a')]){_0x1dd72d[_0x8267('0x57')]=_['merge'](_0x1dd72d[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0x1dd72d[_0x8267('0x51')],function(_0x408538){var _0x4d4f34={};_0x4d4f34[_0x408538]={'$like':'%'+_0x183bbb[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x4d4f34;})});}_0x1dd72d=_['merge']({},_0x1dd72d,_0x183bbb[_0x8267('0x65')]);return _0x5bd698[_0x8267('0xd7')](_0x1dd72d);}})[_0x8267('0x21')](function(_0x1480b9){if(_0x1480b9){_0x5ca11d=_0x1480b9[_0x8267('0x64')];if(!_0x183bbb[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x54'))){_0x1dd72d[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x183bbb['query']['limit']);_0x1dd72d[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x183bbb[_0x8267('0x4e')][_0x8267('0x56')]);}return _0x5bd698[_0x8267('0xd7')](_0x1dd72d);}})['then'](function(_0x42e093){if(_0x42e093){return _0x42e093?{'count':_0x5ca11d,'rows':_0x42e093}:null;}})['then'](respondWithResult(_0x452c2a,null))[_0x8267('0x2a')](handleError(_0x452c2a,null));};exports['getOpenchannelInteractions']=function(_0x212a74,_0x6317a,_0x18b0fa){var _0x3189b7={};var _0x1d6f66={};var _0x42a386;var _0x49b0d5;return db['User'][_0x8267('0x95')]({'where':{'id':_0x212a74[_0x8267('0x62')]['id']}})['then'](handleEntityNotFound(_0x6317a,null))['then'](function(_0x32f875){if(_0x32f875){_0x42a386=_0x32f875;_0x1d6f66[_0x8267('0x4a')]=_['keys'](db[_0x8267('0xd9')][_0x8267('0x46')]);_0x1d6f66[_0x8267('0x4e')]=_['keys'](_0x212a74[_0x8267('0x4e')]);_0x1d6f66[_0x8267('0x4f')]=_['intersection'](_0x1d6f66[_0x8267('0x4a')],_0x1d6f66[_0x8267('0x4e')]);_0x3189b7[_0x8267('0x51')]=_[_0x8267('0x50')](_0x1d6f66[_0x8267('0x4a')],qs['fields'](_0x212a74[_0x8267('0x4e')][_0x8267('0x52')]));_0x3189b7['attributes']=_0x3189b7[_0x8267('0x51')]['length']?_0x3189b7[_0x8267('0x51')]:_0x1d6f66['model'];_0x3189b7[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x212a74['query']['sort']);_0x3189b7[_0x8267('0x57')]=qs['filters'](_['pick'](_0x212a74[_0x8267('0x4e')],_0x1d6f66[_0x8267('0x4f')]));if(_0x212a74[_0x8267('0x4e')][_0x8267('0x3a')]){_0x3189b7[_0x8267('0x57')]=_['merge'](_0x3189b7['where'],{'$or':_[_0x8267('0x3c')](_0x3189b7['attributes'],function(_0x23d247){var _0x55d59f={};_0x55d59f[_0x23d247]={'$like':'%'+_0x212a74[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x55d59f;})});}_0x3189b7=_[_0x8267('0x59')]({},_0x3189b7,_0x212a74['options']);return _0x42a386[_0x8267('0xda')](_0x3189b7);}})[_0x8267('0x21')](function(_0x5705bf){if(_0x5705bf){_0x49b0d5=_0x5705bf[_0x8267('0x64')];if(!_0x212a74['query'][_0x8267('0x53')](_0x8267('0x54'))){_0x3189b7[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x212a74[_0x8267('0x4e')]['limit']);_0x3189b7[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x212a74[_0x8267('0x4e')][_0x8267('0x56')]);}return _0x42a386[_0x8267('0xda')](_0x3189b7);}})[_0x8267('0x21')](function(_0x3cd9f4){if(_0x3cd9f4){return _0x3cd9f4?{'count':_0x49b0d5,'rows':_0x3cd9f4}:null;}})[_0x8267('0x21')](respondWithResult(_0x6317a,null))[_0x8267('0x2a')](handleError(_0x6317a,null));};exports[_0x8267('0xdb')]=function(_0x18ef0e,_0x495538,_0xd10ac0){var _0x454f16={'raw':!![],'where':{}};var _0x20f661={};var _0x240f30={'count':0x0,'rows':[]};return db[_0x8267('0x45')][_0x8267('0x95')]({'where':{'id':_0x18ef0e['params']['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x495538,null))[_0x8267('0x21')](function(_0x49ce13){if(_0x49ce13){_0x20f661['model']=_[_0x8267('0x63')](db[_0x8267('0xdc')][_0x8267('0x46')]);_0x20f661['query']=_['keys'](_0x18ef0e['query']);_0x20f661[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x20f661[_0x8267('0x4a')],_0x20f661[_0x8267('0x4e')]);_0x454f16[_0x8267('0x51')]=_[_0x8267('0x50')](_0x20f661[_0x8267('0x4a')],qs[_0x8267('0x52')](_0x18ef0e['query'][_0x8267('0x52')]));_0x454f16['attributes']=_0x454f16[_0x8267('0x51')]['length']?_0x454f16[_0x8267('0x51')]:_0x20f661[_0x8267('0x4a')];if(!_0x18ef0e[_0x8267('0x4e')]['hasOwnProperty'](_0x8267('0x54'))){_0x454f16[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x18ef0e[_0x8267('0x4e')][_0x8267('0x55')]);_0x454f16[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x18ef0e['query'][_0x8267('0x56')]);}_0x454f16[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x18ef0e[_0x8267('0x4e')]['sort']);_0x454f16[_0x8267('0x57')]=qs['filters'](_['pick'](_0x18ef0e[_0x8267('0x4e')],_0x20f661[_0x8267('0x4f')]));_0x454f16[_0x8267('0x57')]['UserId']=_0x49ce13['id'];if(_0x18ef0e['query'][_0x8267('0x3a')]){_0x454f16[_0x8267('0x57')]=_['merge'](_0x454f16[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0x454f16[_0x8267('0x51')],function(_0x20b87b){var _0x23197b={};_0x23197b[_0x20b87b]={'$like':'%'+_0x18ef0e[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x23197b;})});}_0x454f16=_['merge']({},_0x454f16,_0x18ef0e['options']);return db[_0x8267('0xdc')]['count']({'where':_0x454f16[_0x8267('0x57')]})[_0x8267('0x21')](function(_0x1da0f0){_0x240f30['count']=_0x1da0f0;if(_0x18ef0e['query'][_0x8267('0x5f')]){_0x454f16[_0x8267('0x60')]=[{'all':!![]}];}return db[_0x8267('0xdc')][_0x8267('0xcd')](_0x454f16);})['then'](function(_0x51f4ef){_0x240f30[_0x8267('0x61')]=_0x51f4ef;return _0x240f30;});}})[_0x8267('0x21')](respondWithFilteredResult(_0x495538,_0x454f16))['catch'](handleError(_0x495538,null));};exports[_0x8267('0xdd')]=function(_0xe85177,_0x4f41b1,_0x2eb2e0){var _0x2b6372={};var _0xf76e7d={};var _0x180400;var _0x185574;return db[_0x8267('0x45')]['findOne']({'where':{'id':_0xe85177[_0x8267('0x62')]['id']}})['then'](handleEntityNotFound(_0x4f41b1,null))[_0x8267('0x21')](function(_0x5d1c71){if(_0x5d1c71){_0x180400=_0x5d1c71;_0xf76e7d[_0x8267('0x4a')]=_[_0x8267('0x63')](db[_0x8267('0xde')][_0x8267('0x46')]);_0xf76e7d['query']=_[_0x8267('0x63')](_0xe85177[_0x8267('0x4e')]);_0xf76e7d[_0x8267('0x4f')]=_[_0x8267('0x50')](_0xf76e7d['model'],_0xf76e7d[_0x8267('0x4e')]);_0x2b6372['attributes']=_[_0x8267('0x50')](_0xf76e7d[_0x8267('0x4a')],qs['fields'](_0xe85177[_0x8267('0x4e')]['fields']));_0x2b6372['attributes']=_0x2b6372[_0x8267('0x51')]['length']?_0x2b6372['attributes']:_0xf76e7d[_0x8267('0x4a')];_0x2b6372[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0xe85177['query'][_0x8267('0xc5')]);_0x2b6372[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0xe85177[_0x8267('0x4e')],_0xf76e7d[_0x8267('0x4f')]));if(_0xe85177[_0x8267('0x4e')][_0x8267('0x3a')]){_0x2b6372[_0x8267('0x57')]=_[_0x8267('0x59')](_0x2b6372['where'],{'$or':_[_0x8267('0x3c')](_0x2b6372[_0x8267('0x51')],function(_0x379324){var _0x3875ef={};_0x3875ef[_0x379324]={'$like':'%'+_0xe85177[_0x8267('0x4e')]['filter']+'%'};return _0x3875ef;})});}_0x2b6372=_['merge']({},_0x2b6372,_0xe85177['options']);return _0x180400[_0x8267('0xdd')](_0x2b6372);}})[_0x8267('0x21')](function(_0x2be522){if(_0x2be522){_0x185574=_0x2be522[_0x8267('0x64')];if(!_0xe85177['query'][_0x8267('0x53')](_0x8267('0x54'))){_0x2b6372[_0x8267('0x55')]=qs['limit'](_0xe85177[_0x8267('0x4e')][_0x8267('0x55')]);_0x2b6372[_0x8267('0x56')]=qs['offset'](_0xe85177[_0x8267('0x4e')][_0x8267('0x56')]);}return _0x180400['getSmsInteractions'](_0x2b6372);}})[_0x8267('0x21')](function(_0x439338){if(_0x439338){return _0x439338?{'count':_0x185574,'rows':_0x439338}:null;}})['then'](respondWithResult(_0x4f41b1,null))[_0x8267('0x2a')](handleError(_0x4f41b1,null));};exports[_0x8267('0xdf')]=function(_0x3a9136,_0x4fc11a,_0x43009d){var _0x255d9d={};var _0x56712f={};var _0x398e85;var _0x21e4f2;return db['User']['findOne']({'where':{'id':_0x3a9136[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x4fc11a,null))['then'](function(_0xbb96a0){if(_0xbb96a0){_0x398e85=_0xbb96a0;_0x56712f[_0x8267('0x4a')]=_[_0x8267('0x63')](db[_0x8267('0xe0')]['rawAttributes']);_0x56712f['query']=_[_0x8267('0x63')](_0x3a9136[_0x8267('0x4e')]);_0x56712f[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x56712f[_0x8267('0x4a')],_0x56712f[_0x8267('0x4e')]);_0x255d9d[_0x8267('0x51')]=_[_0x8267('0x50')](_0x56712f[_0x8267('0x4a')],qs[_0x8267('0x52')](_0x3a9136[_0x8267('0x4e')][_0x8267('0x52')]));_0x255d9d['attributes']=_0x255d9d['attributes']['length']?_0x255d9d[_0x8267('0x51')]:_0x56712f[_0x8267('0x4a')];_0x255d9d[_0x8267('0xc4')]=qs['sort'](_0x3a9136[_0x8267('0x4e')][_0x8267('0xc5')]);_0x255d9d['where']=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x3a9136[_0x8267('0x4e')],_0x56712f[_0x8267('0x4f')]));if(_0x3a9136[_0x8267('0x4e')][_0x8267('0x3a')]){_0x255d9d[_0x8267('0x57')]=_[_0x8267('0x59')](_0x255d9d[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0x255d9d[_0x8267('0x51')],function(_0x340283){var _0x5829b5={};_0x5829b5[_0x340283]={'$like':'%'+_0x3a9136[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x5829b5;})});}_0x255d9d=_[_0x8267('0x59')]({},_0x255d9d,_0x3a9136[_0x8267('0x65')]);return _0x398e85[_0x8267('0xdf')](_0x255d9d);}})['then'](function(_0x40cca2){if(_0x40cca2){_0x21e4f2=_0x40cca2[_0x8267('0x64')];if(!_0x3a9136[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x54'))){_0x255d9d['limit']=qs['limit'](_0x3a9136['query'][_0x8267('0x55')]);_0x255d9d[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x3a9136[_0x8267('0x4e')][_0x8267('0x56')]);}return _0x398e85[_0x8267('0xdf')](_0x255d9d);}})[_0x8267('0x21')](function(_0x41d576){if(_0x41d576){return _0x41d576?{'count':_0x21e4f2,'rows':_0x41d576}:null;}})[_0x8267('0x21')](respondWithResult(_0x4fc11a,null))[_0x8267('0x2a')](handleError(_0x4fc11a,null));};exports[_0x8267('0xe1')]=function(_0x734b1b,_0x5adc1f,_0x4ab69f){var _0x2cee53;var _0x1d3153;var _0x511a71;var _0x50f635=!_[_0x8267('0x72')](_0x734b1b[_0x8267('0x62')]['id'])?_0x734b1b[_0x8267('0x62')]['id']:!_[_0x8267('0x72')](_0x734b1b[_0x8267('0x36')]['id'])?_0x734b1b[_0x8267('0x36')]['id']:null;return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x50f635,'role':{'$or':['admin',_0x8267('0x36'),_0x8267('0x84')]}},'attributes':['id',_0x8267('0x40'),_0x8267('0xe2'),_0x8267('0xe3'),_0x8267('0x3f'),_0x8267('0x76'),_0x8267('0xa2')]})[_0x8267('0x21')](function(_0x34ada1){if(_0x34ada1){if(_0x34ada1['role']===_0x8267('0x84')){_0x2cee53=_0x34ada1;if(_0x734b1b[_0x8267('0x67')][_0x8267('0xa4')]){_0x511a71=util[_0x8267('0xb1')](_0x8267('0xe4'),_0x2cee53[_0x734b1b['body'][_0x8267('0xa4')]]);}else if(_0x734b1b[_0x8267('0x67')][_0x8267('0xe5')]){_0x511a71=util['format'](_0x8267('0xb2'),_0x734b1b[_0x8267('0x67')]['intrf']);}else{_0x511a71=util[_0x8267('0xb1')](_0x8267('0xb2'),_0x2cee53[_0x8267('0x40')]);}socket['to'](util[_0x8267('0xb1')](_0x8267('0xe6'),_0x2cee53[_0x8267('0x40')]))['emit']('user:forcelogout',{'ip':_0x734b1b[_0x8267('0xe7')][_0x8267('0xe8')]||_0x734b1b[_0x8267('0xe9')]['remoteAddress']||_0x734b1b['socket'][_0x8267('0xea')]||_0x734b1b['connection']['socket'][_0x8267('0xea')]});return db[_0x8267('0xb4')][_0x8267('0x34')]({'where':{'membername':_0x2cee53[_0x8267('0x40')]},'individualHooks':!![]});}}else{throw new db[(_0x8267('0x1f'))]['ValidationError'](_0x8267('0xeb'));}})[_0x8267('0x21')](function(){if(_0x2cee53){return _0x2cee53[_0x8267('0xec')]({'raw':!![]});}})[_0x8267('0x21')](function(_0x103ff3){if(_0x2cee53){var _0x72e4d3=[];if(_0x103ff3){_0x1d3153=_0x103ff3;if(_0x1d3153[_0x8267('0x64')]){for(var _0x2560a5=0x0;_0x2560a5<_0x1d3153[_0x8267('0x64')];_0x2560a5++){_0x72e4d3[_0x8267('0xb0')]({'membername':_0x2cee53['name'],'UserId':_0x2cee53['id'],'queue_name':_0x1d3153[_0x2560a5][_0x8267('0x40')],'VoiceQueueId':_0x1d3153[_0x2560a5]['id'],'interface':_0x511a71,'paused':_0x2cee53[_0x8267('0xa2')]||![],'penalty':_0x1d3153[_0x2560a5][_0x8267('0xed')]||0x0});}return BPromise[_0x8267('0xb3')](_0x72e4d3,function(_0x429ac3){return db[_0x8267('0xb4')]['upsert'](_0x429ac3);});}}}})[_0x8267('0x21')](function(){if(_0x2cee53){return db[_0x8267('0xee')][_0x8267('0xcd')]({'where':{'membername':_0x2cee53[_0x8267('0x40')],'exitAt':null}});}})[_0x8267('0x21')](function(_0x4923b4){if(_0x2cee53){var _0x4a9e96=[];_0x4923b4[_0x8267('0xef')](function(_0x51b93b){_0x4a9e96[_0x8267('0xb0')](_0x51b93b[_0x8267('0x33')]({'exitAt':moment()[_0x8267('0xb1')]('YYYY-MM-DD\x20HH:mm:ss')}));});return BPromise[_0x8267('0xf0')](_0x4a9e96);}})[_0x8267('0x21')](function(){if(_0x2cee53){var _0xa7b235=[];var _0xd39c4e=[];var _0x173f7=utils['getChannels']();var _0x4c49ae={'membername':_0x2cee53[_0x8267('0x40')],'interface':_0x511a71,'enterAt':moment()[_0x8267('0xb1')](_0x8267('0xf1')),'role':_0x2cee53[_0x8267('0x3f')],'internal':_0x2cee53[_0x8267('0x76')]};_0x173f7[_0x8267('0xef')](function(_0x1ebcef){_0xa7b235[_0x8267('0xb0')](_[_0x8267('0x59')]({'channel':_0x1ebcef,'type':_0x8267('0xf2'),'data1':_0x734b1b[_0x8267('0x67')]['device'],'data2':_0x511a71},_0x4c49ae));if(_0x2cee53[_0x8267('0xa2')]){_0xd39c4e[_0x8267('0xb0')](_[_0x8267('0x59')]({'channel':_0x1ebcef,'type':_0x8267('0xf3'),'data1':'LOGININPAUSE'},_0x4c49ae));}});return db[_0x8267('0xee')]['bulkCreate'](_0xa7b235[_0x8267('0xf4')](_0xd39c4e),{'individualHooks':!![]});}})['then'](function(){if(_0x2cee53){return _0x2cee53[_0x8267('0x33')]({'online':!![],'lastLoginAt':moment()[_0x8267('0xb1')](_0x8267('0xf1')),'voicePause':_0x2cee53['loginInPause']||![],'mailPause':_0x2cee53['loginInPause']||![],'chatPause':_0x2cee53['loginInPause']||![],'faxPause':_0x2cee53['loginInPause']||![],'smsPause':_0x2cee53[_0x8267('0xa2')]||![],'openchannelPause':_0x2cee53[_0x8267('0xa2')]||![],'pauseType':_0x2cee53[_0x8267('0xa2')]?_0x8267('0xf5'):null,'interface':_0x511a71,'lastPauseAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')});}})[_0x8267('0x21')](function(_0x2e5cf1){if(_0x734b1b['isMiddleware']){return _0x4ab69f();}else{return BPromise['resolve'](_0x2e5cf1)[_0x8267('0x21')](respondWithResult(_0x5adc1f,null));}})['catch'](handleError(_0x5adc1f,null));};exports[_0x8267('0xf6')]=function(_0x4f9899,_0x545a8f,_0x39aeef){var _0x10aca8;return db[_0x8267('0x45')][_0x8267('0x68')]({'where':{'id':_0x4f9899['params']['id'],'role':_0x8267('0x84')},'attributes':['id',_0x8267('0x40'),'role']})[_0x8267('0x21')](handleEntityNotFound(_0x545a8f,null))[_0x8267('0x21')](function(_0x51aebf){if(_0x51aebf){_0x10aca8=_0x51aebf;return db[_0x8267('0xb4')][_0x8267('0x34')]({'where':{'membername':_0x10aca8['name']},'individualHooks':!![]});}})['then'](function(){return db['MemberReport'][_0x8267('0xcd')]({'where':{'membername':_0x10aca8[_0x8267('0x40')],'exitAt':null}});})[_0x8267('0x21')](function(_0x2d2f1f){var _0x1ec6e3=[];_0x2d2f1f[_0x8267('0xef')](function(_0x55e9ba){_0x1ec6e3[_0x8267('0xb0')](_0x55e9ba[_0x8267('0x33')]({'exitAt':moment()[_0x8267('0xb1')](_0x8267('0xf1'))}));});return BPromise[_0x8267('0xf0')](_0x1ec6e3);})[_0x8267('0x21')](function(){return _0x10aca8[_0x8267('0x33')]({'online':![],'lastLoginAt':null,'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'interface':null});})[_0x8267('0x21')](respondWithResult(_0x545a8f,null))[_0x8267('0x2a')](handleError(_0x545a8f,null));};exports[_0x8267('0xf7')]=function(_0x2219dc,_0x2e80e6,_0x50a770){var _0x2520c4;return db[_0x8267('0xb4')][_0x8267('0x33')]({'paused':0x1},{'where':{'UserId':_0x2219dc[_0x8267('0x62')]['id']},'individualHooks':!![]})[_0x8267('0x21')](function(){return db[_0x8267('0x45')]['find']({'where':{'id':_0x2219dc[_0x8267('0x62')]['id'],'role':'agent'},'attributes':['id',_0x8267('0x40'),'role',_0x8267('0x76'),'interface']});})[_0x8267('0x21')](handleEntityNotFound(_0x2e80e6,null))[_0x8267('0x21')](function(_0x1c4f94){if(_0x1c4f94){_0x2520c4=_0x1c4f94;return respondWithRpcPromise(_0x8267('0xf8'),'pause',{'id':_0x2520c4['id'],'name':_0x2520c4[_0x8267('0x40')],'pause':!![]});}})[_0x8267('0x21')](function(){if(_0x2520c4){return db['MemberReport'][_0x8267('0xcd')]({'where':{'membername':_0x2520c4[_0x8267('0x40')],'type':_0x8267('0xf3'),'exitAt':null}});}})[_0x8267('0x21')](function(_0x146974){if(_0x146974[_0x8267('0x64')]){var _0x262f54=moment()['format'](_0x8267('0xf1'));for(var _0x392e99=0x0,_0x1575a4=_0x146974[_0x8267('0x64')];_0x392e99<_0x1575a4;_0x392e99++){_0x146974[_0x392e99]['updateAttributes']({'exitAt':_0x262f54});}}})['then'](function(){var _0x3e9d28=[];var _0x2ca32b=utils[_0x8267('0xf9')]();_0x2ca32b['forEach'](function(_0x28eff9){_0x3e9d28['push']({'channel':_0x28eff9,'membername':_0x2520c4[_0x8267('0x40')],'interface':_[_0x8267('0x72')](_0x2520c4['interface'])?util[_0x8267('0xb1')](_0x8267('0xb2'),_0x2520c4[_0x8267('0x40')]):_0x2520c4['interface'],'type':_0x8267('0xf3'),'enterAt':moment()['format'](_0x8267('0xf1')),'data1':_0x2219dc[_0x8267('0x67')]['type']||_0x8267('0xfa'),'role':_0x2520c4['role'],'internal':_0x2520c4[_0x8267('0x76')]});});return db[_0x8267('0xee')][_0x8267('0x66')](_0x3e9d28,{'individualHooks':!![]});})[_0x8267('0x21')](function(){return _0x2520c4[_0x8267('0x33')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'pauseType':_0x2219dc[_0x8267('0x67')][_0x8267('0x48')]||'DEFAULT\x20PAUSE','lastPauseAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')});})[_0x8267('0x21')](respondWithResult(_0x2e80e6,null))[_0x8267('0x2a')](handleError(_0x2e80e6,null));};exports[_0x8267('0xfb')]=function(_0x134cca,_0x51165b,_0x5089b8){var _0x752ca6;return db[_0x8267('0x45')]['find']({'where':{'id':_0x134cca['params']['id']},'attributes':['id',_0x8267('0x40'),_0x8267('0x3f'),'voicePause','mailPause',_0x8267('0xfc'),_0x8267('0xfd'),_0x8267('0xfe'),_0x8267('0xff'),_0x8267('0x100'),_0x8267('0x101')]})[_0x8267('0x21')](handleEntityNotFound(_0x51165b,null))['then'](function(_0x4e2ee8){if(_0x4e2ee8){_0x752ca6=_0x4e2ee8;if(_0x134cca['body'][_0x8267('0xa0')]&&!utils[_0x8267('0xb6')](_0x134cca['body'][_0x8267('0xa0')])){throw new db[(_0x8267('0x1f'))]['ValidationError']('Unknown\x20channel');}switch(_0x134cca[_0x8267('0x67')][_0x8267('0xa0')]){case _0x8267('0xae'):return respondWithRpcPromise(_0x8267('0xf8'),_0x8267('0xfb'),{'id':_0x752ca6['id'],'name':_0x752ca6[_0x8267('0x40')],'pause':![]})[_0x8267('0x21')](function(){return db['UserVoiceQueueRt'][_0x8267('0x33')]({'paused':0x0},{'where':{'UserId':_0x752ca6['id']},'individualHooks':!![]});})['then'](function(){return db[_0x8267('0xee')][_0x8267('0x68')]({'where':{'channel':_0x134cca[_0x8267('0x67')][_0x8267('0xa0')],'membername':_0x752ca6[_0x8267('0x40')],'type':_0x8267('0xf3'),'exitAt':null}});})[_0x8267('0x21')](function(_0x49ad23){if(_0x49ad23){return _0x49ad23[_0x8267('0x33')]({'exitAt':moment()[_0x8267('0xb1')](_0x8267('0xf1')),'data2':_0x8267('0x102')},{'individualHooks':!![]});}return null;})[_0x8267('0x21')](function(){return _0x752ca6['update']({'voicePause':![]});});case _0x8267('0x103'):case'chat':case _0x8267('0x104'):case'sms':case'openchannel':return db[_0x8267('0xee')][_0x8267('0x68')]({'where':{'channel':_0x134cca['body']['channel'],'membername':_0x752ca6[_0x8267('0x40')],'type':_0x8267('0xf3'),'exitAt':null}})['then'](function(_0x2c9fd4){if(_0x2c9fd4){return _0x2c9fd4[_0x8267('0x33')]({'exitAt':moment()[_0x8267('0xb1')]('YYYY-MM-DD\x20HH:mm:ss'),'data2':_0x8267('0x102')},{'individualHooks':!![]});}return null;})[_0x8267('0x21')](function(){var _0x860119={};_[_0x8267('0x2f')](_0x860119,util[_0x8267('0xb1')]('%s%s',_0x134cca[_0x8267('0x67')][_0x8267('0xa0')],_0x8267('0x105')),![]);return _0x752ca6['update'](_0x860119);});default:return respondWithRpcPromise('QueuePause',_0x8267('0xfb'),{'id':_0x752ca6['id'],'name':_0x752ca6[_0x8267('0x40')],'pause':![]})[_0x8267('0x21')](function(){return db['UserVoiceQueueRt'][_0x8267('0x33')]({'paused':0x0},{'where':{'UserId':_0x752ca6['id']}});})[_0x8267('0x21')](function(){return db[_0x8267('0xee')][_0x8267('0xcd')]({'where':{'membername':_0x752ca6[_0x8267('0x40')],'type':_0x8267('0xf3'),'exitAt':null}});})[_0x8267('0x21')](function(_0x54b62c){var _0x42d0f7=[];_0x54b62c[_0x8267('0xef')](function(_0x51ea8c){_0x42d0f7[_0x8267('0xb0')](_0x51ea8c[_0x8267('0x33')]({'exitAt':moment()[_0x8267('0xb1')](_0x8267('0xf1')),'data2':_0x8267('0x102')}));});return BPromise[_0x8267('0xf0')](_0x42d0f7);})[_0x8267('0x21')](function(){return _0x752ca6[_0x8267('0x33')]({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});});}}})['then'](respondWithResult(_0x51165b,null))['catch'](handleError(_0x51165b,null));};exports['getTeams']=function(_0x191a14,_0x2c65c4,_0x239d56){var _0x2d766a={};var _0x54f6bf={};var _0x29d9ea;var _0x4ad4ca;return db[_0x8267('0x45')][_0x8267('0x95')]({'where':{'id':_0x191a14['params']['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x2c65c4,null))[_0x8267('0x21')](function(_0x2f5756){if(_0x2f5756){_0x29d9ea=_0x2f5756;_0x54f6bf[_0x8267('0x4a')]=_[_0x8267('0x63')](db[_0x8267('0x106')]['rawAttributes']);_0x54f6bf[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x191a14[_0x8267('0x4e')]);_0x54f6bf[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x54f6bf['model'],_0x54f6bf['query']);_0x2d766a[_0x8267('0x51')]=_['intersection'](_0x54f6bf[_0x8267('0x4a')],qs[_0x8267('0x52')](_0x191a14[_0x8267('0x4e')][_0x8267('0x52')]));_0x2d766a['attributes']=_0x2d766a[_0x8267('0x51')][_0x8267('0x64')]?_0x2d766a[_0x8267('0x51')]:_0x54f6bf[_0x8267('0x4a')];_0x2d766a[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x191a14['query'][_0x8267('0xc5')]);_0x2d766a[_0x8267('0x57')]=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x191a14[_0x8267('0x4e')],_0x54f6bf['filters']));if(_0x191a14['query'][_0x8267('0x3a')]){_0x2d766a[_0x8267('0x57')]=_['merge'](_0x2d766a[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0x2d766a[_0x8267('0x51')],function(_0x464806){var _0x182f91={};_0x182f91[_0x464806]={'$like':'%'+_0x191a14[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x182f91;})});}_0x2d766a=_[_0x8267('0x59')]({},_0x2d766a,_0x191a14[_0x8267('0x65')]);return _0x29d9ea[_0x8267('0x107')](_0x2d766a);}})[_0x8267('0x21')](function(_0x3b2f6f){if(_0x3b2f6f){_0x4ad4ca=_0x3b2f6f[_0x8267('0x64')];if(!_0x191a14[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x54'))){_0x2d766a[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x191a14['query'][_0x8267('0x55')]);_0x2d766a[_0x8267('0x56')]=qs[_0x8267('0x56')](_0x191a14['query']['offset']);}return _0x29d9ea['getTeams'](_0x2d766a);}})[_0x8267('0x21')](function(_0x195021){if(_0x195021){return _0x195021?{'count':_0x4ad4ca,'rows':_0x195021}:null;}})['then'](respondWithResult(_0x2c65c4,null))[_0x8267('0x2a')](handleError(_0x2c65c4,null));};exports['addTeams']=function(_0x52a093,_0x477ecf){return db['User']['find']({'where':{'id':_0x52a093[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x477ecf,null))[_0x8267('0x21')](function(_0x59a855){if(_0x59a855){var _0x318fa3=_0x59a855[_0x8267('0x8e')]({'plain':!![]});return _0x59a855[_0x8267('0x108')](_0x52a093[_0x8267('0x67')][_0x8267('0x6b')],_[_0x8267('0x6c')](_0x52a093['body'],[_0x8267('0x6b'),'id'])||{})[_0x8267('0x21')](function(){for(var _0x282017=0x0;_0x282017<_0x52a093[_0x8267('0x67')][_0x8267('0x6b')][_0x8267('0x64')];_0x282017++){var _0x11dc64=[];db[_0x8267('0x106')][_0x8267('0x95')]({'where':{'id':_0x52a093[_0x8267('0x67')][_0x8267('0x6b')][_0x282017]}})[_0x8267('0x21')](function(_0x2228d9){_0x11dc64[_0x8267('0xb0')](_0x2228d9[_0x8267('0xec')]()[_0x8267('0x21')](function(_0x13a217){for(var _0x37babe=0x0;_0x37babe<_0x13a217['length'];_0x37babe++){_0x13a217[_0x37babe][_0x8267('0x109')](_0x8267('0xa0'),_0x8267('0x10a'));}return _0x13a217;}));_0x11dc64[_0x8267('0xb0')](_0x2228d9[_0x8267('0x10b')]()[_0x8267('0x21')](function(_0x3d51e8){for(var _0xbefa4d=0x0;_0xbefa4d<_0x3d51e8[_0x8267('0x64')];_0xbefa4d++){_0x3d51e8[_0xbefa4d]['setDataValue'](_0x8267('0xa0'),_0x8267('0x10c'));}return _0x3d51e8;}));_0x11dc64[_0x8267('0xb0')](_0x2228d9['getMailQueues']()[_0x8267('0x21')](function(_0x1063ba){for(var _0x470ae4=0x0;_0x470ae4<_0x1063ba['length'];_0x470ae4++){_0x1063ba[_0x470ae4][_0x8267('0x109')](_0x8267('0xa0'),_0x8267('0x10d'));}return _0x1063ba;}));_0x11dc64['push'](_0x2228d9[_0x8267('0x10e')]()[_0x8267('0x21')](function(_0x32ef80){for(var _0x45890e=0x0;_0x45890e<_0x32ef80[_0x8267('0x64')];_0x45890e++){_0x32ef80[_0x45890e][_0x8267('0x109')](_0x8267('0xa0'),_0x8267('0x10f'));}return _0x32ef80;}));_0x11dc64[_0x8267('0xb0')](_0x2228d9['getFaxQueues']()[_0x8267('0x21')](function(_0x2f26da){for(var _0x148ad7=0x0;_0x148ad7<_0x2f26da[_0x8267('0x64')];_0x148ad7++){_0x2f26da[_0x148ad7][_0x8267('0x109')]('channel',_0x8267('0x110'));}return _0x2f26da;}));_0x11dc64['push'](_0x2228d9[_0x8267('0x111')]()[_0x8267('0x21')](function(_0x1084fa){for(var _0xb77d93=0x0;_0xb77d93<_0x1084fa[_0x8267('0x64')];_0xb77d93++){_0x1084fa[_0xb77d93][_0x8267('0x109')]('channel','Openchannel');}return _0x1084fa;}));return BPromise[_0x8267('0xf0')](_0x11dc64);})[_0x8267('0x21')](function(_0x4b2af0){var _0x213496=_[_0x8267('0x112')](_0x4b2af0);_0x11dc64=[];return db[_0x8267('0x5b')]['transaction'](function(_0x5cd848){for(var _0x134d4d=0x0;_0x134d4d<_0x213496['length'];_0x134d4d++){_0x11dc64[_0x8267('0xb0')](_0x213496[_0x134d4d][_0x8267('0x113')](_0x318fa3['id']),{'transaction':_0x5cd848});}return BPromise[_0x8267('0xf0')](_0x11dc64)['then'](function(){if(_0x318fa3[_0x8267('0xa1')]){return BPromise[_0x8267('0xb3')](_['filter'](_0x213496,function(_0x122809){return _0x122809[_0x8267('0x114')](_0x8267('0xa0'))===_0x8267('0x10a');}),function(_0x2e98d4){return db[_0x8267('0xb4')][_0x8267('0x115')]({'membername':_0x318fa3['name'],'UserId':_0x318fa3['id'],'queue_name':_0x2e98d4[_0x8267('0x40')],'VoiceQueueId':_0x2e98d4['id'],'interface':_[_0x8267('0x72')](_0x318fa3[_0x8267('0xa4')])?util[_0x8267('0xb1')](_0x8267('0xb2'),_0x318fa3['name']):_0x318fa3[_0x8267('0xa4')],'paused':_0x318fa3[_0x8267('0xa3')]||![],'penalty':_0x318fa3[_0x8267('0xa9')]},{'transaction':_0x5cd848});});}else{return;}})[_0x8267('0x21')](function(){for(var _0x28707d=0x0;_0x28707d<_0x213496[_0x8267('0x64')];_0x28707d++){var _0x48cdb2=_0x213496[_0x28707d]['getDataValue'](_0x8267('0xa0'));var _0x41074d=_0x48cdb2+_0x8267('0xab');socket[_0x8267('0xac')](_0x8267('0x36')+_0x48cdb2+'Queue:save',{'UserId':_0x318fa3['id'],['queueField']:_0x213496[_0x28707d]['id']});}});});});}});}})['then'](respondWithStatusCode(_0x477ecf,null))[_0x8267('0x2a')](handleError(_0x477ecf,null));};exports[_0x8267('0x116')]=function(_0x252bdc,_0x105194){return db['User'][_0x8267('0x95')]({'where':{'id':_0x252bdc[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x105194,null))[_0x8267('0x21')](function(_0x36e60f){if(_0x36e60f){var _0x11bca5=_0x36e60f[_0x8267('0x8e')]({'plain':!![]});var _0x5c40b3=_0x252bdc[_0x8267('0x4e')][_0x8267('0x6b')];return _0x36e60f[_0x8267('0x116')](_0x5c40b3)['then'](function(){for(var _0x287719=0x0;_0x287719<_0x5c40b3['length'];_0x287719++){var _0x148b5a=[];db[_0x8267('0x106')]['findOne']({'where':{'id':_0x5c40b3[_0x287719]}})[_0x8267('0x21')](function(_0x41b8af){_0x148b5a['push'](_0x41b8af['getVoiceQueues']()[_0x8267('0x21')](function(_0x323b61){for(var _0x4eb476=0x0;_0x4eb476<_0x323b61[_0x8267('0x64')];_0x4eb476++){_0x323b61[_0x4eb476]['setDataValue'](_0x8267('0xa0'),_0x8267('0x10a'));}return _0x323b61;}));_0x148b5a['push'](_0x41b8af[_0x8267('0x10b')]()[_0x8267('0x21')](function(_0x441be3){for(var _0x3e6d59=0x0;_0x3e6d59<_0x441be3['length'];_0x3e6d59++){_0x441be3[_0x3e6d59]['setDataValue']('channel',_0x8267('0x10c'));}return _0x441be3;}));_0x148b5a['push'](_0x41b8af[_0x8267('0x117')]()[_0x8267('0x21')](function(_0x4ae4e6){for(var _0x13e7e1=0x0;_0x13e7e1<_0x4ae4e6[_0x8267('0x64')];_0x13e7e1++){_0x4ae4e6[_0x13e7e1]['setDataValue'](_0x8267('0xa0'),_0x8267('0x10d'));}return _0x4ae4e6;}));_0x148b5a[_0x8267('0xb0')](_0x41b8af[_0x8267('0x10e')]()[_0x8267('0x21')](function(_0x5b7b6f){for(var _0x48afb9=0x0;_0x48afb9<_0x5b7b6f[_0x8267('0x64')];_0x48afb9++){_0x5b7b6f[_0x48afb9]['setDataValue'](_0x8267('0xa0'),_0x8267('0x10f'));}return _0x5b7b6f;}));_0x148b5a[_0x8267('0xb0')](_0x41b8af[_0x8267('0x118')]()['then'](function(_0xb5c082){for(var _0x434015=0x0;_0x434015<_0xb5c082[_0x8267('0x64')];_0x434015++){_0xb5c082[_0x434015][_0x8267('0x109')]('channel',_0x8267('0x110'));}return _0xb5c082;}));_0x148b5a['push'](_0x41b8af[_0x8267('0x111')]()[_0x8267('0x21')](function(_0x110f43){for(var _0x7daec1=0x0;_0x7daec1<_0x110f43['length'];_0x7daec1++){_0x110f43[_0x7daec1]['setDataValue']('channel','Openchannel');}return _0x110f43;}));return BPromise[_0x8267('0xf0')](_0x148b5a);})[_0x8267('0x21')](function(_0x251639){var _0x3a8d7a=_[_0x8267('0x112')](_0x251639);_0x148b5a=[];return db[_0x8267('0x5b')][_0x8267('0x119')](function(_0x51dd63){for(var _0x474eae=0x0;_0x474eae<_0x3a8d7a['length'];_0x474eae++){_0x148b5a[_0x8267('0xb0')](_0x3a8d7a[_0x474eae][_0x8267('0x11a')](_0x11bca5['id']),{'transaction':_0x51dd63});}return BPromise[_0x8267('0xf0')](_0x148b5a)[_0x8267('0x21')](function(){if(_0x11bca5[_0x8267('0xa1')]){return BPromise[_0x8267('0xb3')](_[_0x8267('0x3a')](_0x3a8d7a,function(_0xadac33){return _0xadac33[_0x8267('0x114')](_0x8267('0xa0'))===_0x8267('0x10a');}),function(_0x90897a){return db['UserVoiceQueueRt']['destroy']({'where':{'VoiceQueueId':_0x90897a['id'],'UserId':_0x11bca5['id']},'transaction':_0x51dd63});});}else{return;}})[_0x8267('0x21')](function(){for(var _0x38ce43=0x0;_0x38ce43<_0x3a8d7a[_0x8267('0x64')];_0x38ce43++){var _0x1ecf86=_0x3a8d7a[_0x38ce43][_0x8267('0x114')](_0x8267('0xa0'));var _0x1a50e0=_0x1ecf86+_0x8267('0xab');socket[_0x8267('0xac')]('user'+_0x1ecf86+_0x8267('0x11b'),{'UserId':_0x11bca5['id'],['queueField']:_0x3a8d7a[_0x38ce43]['id']});}});});});}});}})['then'](respondWithStatusCode(_0x105194,null))[_0x8267('0x2a')](handleError(_0x105194,null));};exports[_0x8267('0x11c')]=function(_0x327b4c,_0x45ab4a,_0x325b8e){var _0xa85d7e={};var _0x65059f={};var _0xe86588;var _0x50f547;return db[_0x8267('0x45')][_0x8267('0x95')]({'where':{'id':_0x327b4c[_0x8267('0x62')]['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x45ab4a,null))[_0x8267('0x21')](function(_0x281c82){if(_0x281c82){_0xe86588=_0x281c82;_0x65059f[_0x8267('0x4a')]=_[_0x8267('0x63')](db[_0x8267('0xc6')]['rawAttributes']);_0x65059f[_0x8267('0x4e')]=_['keys'](_0x327b4c[_0x8267('0x4e')]);_0x65059f[_0x8267('0x4f')]=_[_0x8267('0x50')](_0x65059f[_0x8267('0x4a')],_0x65059f[_0x8267('0x4e')]);_0xa85d7e[_0x8267('0x51')]=_[_0x8267('0x50')](_0x65059f[_0x8267('0x4a')],qs['fields'](_0x327b4c['query'][_0x8267('0x52')]));_0xa85d7e[_0x8267('0x51')]=_0xa85d7e[_0x8267('0x51')][_0x8267('0x64')]?_0xa85d7e[_0x8267('0x51')]:_0x65059f[_0x8267('0x4a')];_0xa85d7e[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x327b4c['query'][_0x8267('0xc5')]);_0xa85d7e['where']=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x327b4c[_0x8267('0x4e')],_0x65059f['filters']));if(_0x327b4c[_0x8267('0x4e')]['filter']){_0xa85d7e[_0x8267('0x57')]=_[_0x8267('0x59')](_0xa85d7e[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0xa85d7e[_0x8267('0x51')],function(_0x42da60){var _0x1ef512={};_0x1ef512[_0x42da60]={'$like':'%'+_0x327b4c[_0x8267('0x4e')][_0x8267('0x3a')]+'%'};return _0x1ef512;})});}_0xa85d7e=_[_0x8267('0x59')]({},_0xa85d7e,_0x327b4c[_0x8267('0x65')]);return _0xe86588[_0x8267('0x11c')](_0xa85d7e);}})['then'](function(_0x295c9e){if(_0x295c9e){_0x50f547=_0x295c9e[_0x8267('0x64')];if(!_0x327b4c[_0x8267('0x4e')][_0x8267('0x53')](_0x8267('0x54'))){_0xa85d7e[_0x8267('0x55')]=qs[_0x8267('0x55')](_0x327b4c[_0x8267('0x4e')]['limit']);_0xa85d7e[_0x8267('0x56')]=qs['offset'](_0x327b4c[_0x8267('0x4e')][_0x8267('0x56')]);}return _0xe86588['getLists'](_0xa85d7e);}})[_0x8267('0x21')](function(_0x5345f0){if(_0x5345f0){return _0x5345f0?{'count':_0x50f547,'rows':_0x5345f0}:null;}})['then'](respondWithResult(_0x45ab4a,null))[_0x8267('0x2a')](handleError(_0x45ab4a,null));};exports[_0x8267('0x11d')]=function(_0x38c014,_0x28bd9b,_0x203603){var _0x20cd27={};var _0x300b57={};var _0x1fbff8;var _0x386e1a;return db['User']['findOne']({'where':{'id':_0x38c014['params']['id']}})[_0x8267('0x21')](handleEntityNotFound(_0x28bd9b,null))[_0x8267('0x21')](function(_0x1e6cdc){if(_0x1e6cdc){_0x1fbff8=_0x1e6cdc;_0x300b57[_0x8267('0x4a')]=_[_0x8267('0x63')](db[_0x8267('0x45')][_0x8267('0x46')]);_0x300b57[_0x8267('0x4e')]=_[_0x8267('0x63')](_0x38c014[_0x8267('0x4e')]);_0x300b57['filters']=_[_0x8267('0x50')](_0x300b57[_0x8267('0x4a')],_0x300b57[_0x8267('0x4e')]);_0x20cd27[_0x8267('0x51')]=_[_0x8267('0x50')](_0x300b57[_0x8267('0x4a')],qs['fields'](_0x38c014[_0x8267('0x4e')][_0x8267('0x52')]));_0x20cd27[_0x8267('0x51')]=_0x20cd27['attributes'][_0x8267('0x64')]?_0x20cd27['attributes']:_0x300b57[_0x8267('0x4a')];_0x20cd27[_0x8267('0xc4')]=qs[_0x8267('0xc5')](_0x38c014['query']['sort']);_0x20cd27['where']=qs[_0x8267('0x4f')](_[_0x8267('0x58')](_0x38c014[_0x8267('0x4e')],_0x300b57[_0x8267('0x4f')]));if(_0x38c014[_0x8267('0x4e')][_0x8267('0x3a')]){_0x20cd27['where']=_['merge'](_0x20cd27[_0x8267('0x57')],{'$or':_[_0x8267('0x3c')](_0x20cd27['attributes'],function(_0x308165){var _0x32d916={};_0x32d916[_0x308165]={'$like':'%'+_0x38c014['query'][_0x8267('0x3a')]+'%'};return _0x32d916;})});}_0x20cd27['model']=db['User'];_0x20cd27['as']=_0x8267('0x37');_0x20cd27=_[_0x8267('0x59')]({},_0x20cd27,_0x38c014[_0x8267('0x65')]);return _0x1fbff8[_0x8267('0xec')]({'include':[_0x20cd27]});}})['then'](function(_0x21222c){if(_0x21222c){var _0x4b09fa={},_0x21795f=[],_0xaa1ac1=0x0;for(var _0x24a7c1=0x0;_0x24a7c1<_0x21222c[_0x8267('0x64')];_0x24a7c1+=0x1){for(var _0x5386c7=0x0,_0x21058b;_0x5386c7<_0x21222c[_0x24a7c1][_0x8267('0x37')][_0x8267('0x64')];_0x5386c7+=0x1){_0x21058b=_0x21222c[_0x24a7c1][_0x8267('0x37')][_0x5386c7][_0x8267('0x8e')]({'plain':!![]});_0x4b09fa[_0x21058b['id']]=_0x21058b;}}_0x4b09fa=_[_0x8267('0x11e')](_0x4b09fa);for(var _0x2b6e60=qs[_0x8267('0x56')](_0x38c014['query'][_0x8267('0x56')]);_0x2b6e60<_0x4b09fa['length']&&_0x21795f['length']=_0x55df19){_0x3a52d7=_0x55df19;_0x1f64b3=0xc8;}else{_0x1f64b3=0xce;}_0x5ad4cc[_0x5d2f('0x2a')](_0x1f64b3);return _0x5ad4cc[_0x5d2f('0x30')]('Content-Range',_0x4586e4+'-'+_0x3a52d7+'/'+_0x55df19)[_0x5d2f('0x2c')](_0x55a2e9);}return null;};}function patchUpdates(_0x4da14a){return function(_0x2bc214){try{jsonpatch[_0x5d2f('0x31')](_0x2bc214,_0x4da14a,!![]);}catch(_0x3f4f22){return BPromise[_0x5d2f('0x32')](_0x3f4f22);}return _0x2bc214['save']();};}function saveUpdates(_0x2746b8,_0x556886){return function(_0x13db12){if(_0x13db12){return _0x13db12[_0x5d2f('0x33')](_0x2746b8)[_0x5d2f('0x1e')](function(_0x5839a0){return _0x5839a0;});}return null;};}function removeEntity(_0xf639a9,_0x380009){return function(_0x7c72ed){if(_0x7c72ed){return _0x7c72ed['destroy']()['then'](function(){var _0x239910=_0x7c72ed[_0x5d2f('0x34')]({'plain':!![]});var _0x261d06=[{'name':_0x5d2f('0x35'),'value':_0x5d2f('0x36'),'ignore':!![]},{'name':_0x5d2f('0x37'),'value':_0x5d2f('0x38'),'ignore':![]},{'name':'Telephones','value':'telephone','ignore':![]}];var _0x26818e=_(_0x261d06)[_0x5d2f('0x39')](_0x5d2f('0x3a'))[_0x5d2f('0x3b')]('value')['value']();if(_['includes'](_0x26818e,_0x239910[_0x5d2f('0x3c')])){return;}var _0x588b4c=_['find'](_0x261d06,[_0x5d2f('0x3d'),_0x239910[_0x5d2f('0x3c')]])[_0x5d2f('0x3e')];return db[_0x5d2f('0x3f')][_0x5d2f('0x40')]({'where':{'type':_0x588b4c,'resourceId':_0x239910['id']}})[_0x5d2f('0x1e')](function(){return _0x7c72ed;});})[_0x5d2f('0x1e')](function(){_0xf639a9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x481bd5,_0x15e67a){return function(_0x1eb43b){if(!_0x1eb43b){_0x481bd5[_0x5d2f('0x29')](0x194);}return _0x1eb43b;};}function handleError(_0xacee1c,_0x3a71fb){_0x3a71fb=_0x3a71fb||0x1f4;return function(_0x2389ff){logger[_0x5d2f('0x24')](_0x2389ff[_0x5d2f('0x41')]);if(_0x2389ff[_0x5d2f('0x3e')]){delete _0x2389ff[_0x5d2f('0x3e')];}_0xacee1c[_0x5d2f('0x2a')](_0x3a71fb)['send'](_0x2389ff);};}exports[_0x5d2f('0x42')]=function(_0xa7552b,_0x55f0aa){var _0x13c893={},_0x1cf020={},_0x159ba1={'count':0x0,'rows':[]};var _0x888d63=_['map'](db[_0x5d2f('0x43')][_0x5d2f('0x44')],function(_0x22762f){return{'name':_0x22762f['fieldName'],'type':_0x22762f['type']['key']};});_0x1cf020[_0x5d2f('0x45')]=_[_0x5d2f('0x46')](_[_0x5d2f('0x3b')](_0x888d63,_0x5d2f('0x3e')),[_0x5d2f('0x47'),_0x5d2f('0x48')]);_0x1cf020[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0xa7552b[_0x5d2f('0x49')]);_0x1cf020[_0x5d2f('0x4b')]=_['intersection'](_0x1cf020[_0x5d2f('0x45')],_0x1cf020['query']);_0x13c893[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x1cf020['model'],qs['fields'](_0xa7552b[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x13c893[_0x5d2f('0x4c')]=_0x13c893[_0x5d2f('0x4c')]['length']?_0x13c893['attributes']:_0x1cf020[_0x5d2f('0x45')];if(!_0xa7552b[_0x5d2f('0x49')][_0x5d2f('0x4f')](_0x5d2f('0x50'))){_0x13c893[_0x5d2f('0x2f')]=qs[_0x5d2f('0x2f')](_0xa7552b['query'][_0x5d2f('0x2f')]);_0x13c893['offset']=qs[_0x5d2f('0x2e')](_0xa7552b[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}_0x13c893[_0x5d2f('0x51')]=qs['sort'](_0xa7552b[_0x5d2f('0x49')][_0x5d2f('0x52')]);_0x13c893[_0x5d2f('0x53')]=qs['filters'](_[_0x5d2f('0x54')](_0xa7552b[_0x5d2f('0x49')],_0x1cf020['filters']));if(_0xa7552b['query'][_0x5d2f('0x39')]){_0x13c893['where']=_[_0x5d2f('0x55')](_0x13c893['where'],{'$or':_['map'](_0x888d63,function(_0x27b470){if(_0x27b470[_0x5d2f('0x56')]!==_0x5d2f('0x57')){return db[_0x5d2f('0x58')]['where'](db[_0x5d2f('0x58')]['fn']('lower',db[_0x5d2f('0x58')]['col'](_0x27b470[_0x5d2f('0x3e')])),{'$like':db[_0x5d2f('0x58')]['fn'](_0x5d2f('0x59'),'%'+_0xa7552b[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%')});}})});}_0x13c893=_[_0x5d2f('0x55')]({},_0x13c893,_0xa7552b[_0x5d2f('0x5a')]);var _0x3860f9={'where':_0x13c893[_0x5d2f('0x53')]};return db[_0x5d2f('0x43')][_0x5d2f('0x2d')](_0x3860f9)[_0x5d2f('0x1e')](function(_0x40ce0b){_0x159ba1[_0x5d2f('0x2d')]=_0x40ce0b;if(_0xa7552b[_0x5d2f('0x49')]['includeAll']){_0x13c893['include']=[{'all':!![]}];}return db['User']['findAll'](_0x13c893);})[_0x5d2f('0x1e')](function(_0x30cb86){_0x159ba1[_0x5d2f('0x5b')]=_0x30cb86;return _0x159ba1;})['then'](respondWithFilteredResult(_0x55f0aa,_0x13c893))[_0x5d2f('0x28')](handleError(_0x55f0aa,null));};exports[_0x5d2f('0x5c')]=function(_0x57aa19,_0x41044a){var _0x10f83b={'raw':![],'where':{'id':_0x57aa19[_0x5d2f('0x5d')]['id']}},_0x43166c={};_0x43166c[_0x5d2f('0x45')]=_[_0x5d2f('0x46')](_['keys'](db[_0x5d2f('0x43')]['rawAttributes']),['password',_0x5d2f('0x48')]);_0x43166c['query']=_[_0x5d2f('0x4a')](_0x57aa19[_0x5d2f('0x49')]);_0x43166c[_0x5d2f('0x4b')]=_['intersection'](_0x43166c['model'],_0x43166c[_0x5d2f('0x49')]);_0x10f83b[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x43166c[_0x5d2f('0x45')],qs[_0x5d2f('0x4e')](_0x57aa19[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x10f83b[_0x5d2f('0x4c')]=_0x10f83b[_0x5d2f('0x4c')]['length']?_0x10f83b[_0x5d2f('0x4c')]:_0x43166c['model'];if(_0x57aa19['query'][_0x5d2f('0x5e')]){_0x10f83b[_0x5d2f('0x5f')]=[{'all':!![]}];}_0x10f83b=_[_0x5d2f('0x55')]({},_0x10f83b,_0x57aa19[_0x5d2f('0x5a')]);return db['User']['find'](_0x10f83b)[_0x5d2f('0x1e')](handleEntityNotFound(_0x41044a,null))[_0x5d2f('0x1e')](respondWithResult(_0x41044a,null))[_0x5d2f('0x28')](handleError(_0x41044a,null));};exports[_0x5d2f('0x60')]=function(_0x530ff3,_0x4beced){return db['User']['bulkCreate'](_0x530ff3['body'],{'raw':![],'individualHooks':!![]})[_0x5d2f('0x1e')](respondWithResult(_0x4beced,0xc9))[_0x5d2f('0x28')](handleError(_0x4beced,null));};exports[_0x5d2f('0x33')]=function(_0xd87527,_0x1d1778){if(_0xd87527[_0x5d2f('0x61')]['id']){delete _0xd87527[_0x5d2f('0x61')]['id'];}delete _0xd87527['body'][_0x5d2f('0x3c')];return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0xd87527[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x1d1778,null))[_0x5d2f('0x1e')](saveUpdates(_0xd87527['body'],null))['then'](respondWithResult(_0x1d1778,null))['catch'](handleError(_0x1d1778,null));};exports[_0x5d2f('0x63')]=function(_0x13987f,_0x4b318e){return db['User']['describe']()[_0x5d2f('0x1e')](respondWithResult(_0x4b318e,null))[_0x5d2f('0x28')](handleError(_0x4b318e,null));};exports[_0x5d2f('0x64')]=function(_0x5c4dbd,_0x60058d,_0x534b68){return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0x5c4dbd[_0x5d2f('0x5d')]['id']}})['then'](handleEntityNotFound(_0x60058d,null))[_0x5d2f('0x1e')](function(_0x23e429){if(_0x23e429){return _0x23e429['addContacts'](_0x5c4dbd[_0x5d2f('0x61')][_0x5d2f('0x65')],_[_0x5d2f('0x66')](_0x5c4dbd[_0x5d2f('0x61')],[_0x5d2f('0x65'),'id'])||{});}})[_0x5d2f('0x1e')](respondWithResult(_0x60058d,null))['catch'](handleError(_0x60058d,null));};var getLicense=function(_0xec88bc){return new BPromise(function(_0x356118,_0x5eab3e){var _0x385c37=0x0;_0xec88bc['body'][_0x5d2f('0x3c')]===_0x5d2f('0x38')&&_0x356118(_0x5d2f('0x67'));return db[_0x5d2f('0x43')][_0x5d2f('0x2d')]({'where':{'$or':[{'role':_0xec88bc[_0x5d2f('0x61')]['role']===_0x5d2f('0x68')?_0x5d2f('0x68'):[_0x5d2f('0x69'),'user']}]}})['then'](function(_0x24acf){_0x385c37=_0x24acf;return require(_0x5d2f('0x6a'))[_0x5d2f('0x6b')]();})[_0x5d2f('0x1e')](function(_0x89714d){var _0x291584=_0xec88bc[_0x5d2f('0x61')][_0x5d2f('0x3c')]===_0x5d2f('0x68')?_0x5d2f('0x6c'):_0x5d2f('0x6d');if(!_[_0x5d2f('0x6e')](_0x89714d[_0x291584])&&_0x385c37>=_0x89714d[_0x291584]){return _0x5eab3e({'message':_0x5d2f('0x6f')});}return _0x356118(util['format'](_0x5d2f('0x70'),_0x291584,_0x385c37));})[_0x5d2f('0x28')](function(_0x8a3c36){return _0x5eab3e(_0x8a3c36);});});};exports[_0x5d2f('0x71')]=function(_0x3d3de1,_0x42c08c){return getLicense(_0x3d3de1)[_0x5d2f('0x1e')](function(_0x24de85){if(!_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')]){var _0x5185d2;return db[_0x5d2f('0x73')][_0x5d2f('0x74')](0x1)[_0x5d2f('0x1e')](function(_0x4e599c){return checkPasswordPattern(_0x4e599c,_0x3d3de1['body'][_0x5d2f('0x47')],_0x4e599c[_0x5d2f('0x75')]);})[_0x5d2f('0x1e')](function(_0x4054e2){_0x5185d2=_0x4054e2['min_internal'];return db[_0x5d2f('0x43')]['max'](_0x5d2f('0x72'));})['then'](function(_0x715681){if(_['isNil'](_0x715681)){if(_0x5185d2){_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')]=_0x5185d2;}else{_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')]=0x1;}}else{if(_[_0x5d2f('0x6e')](_0x5185d2)||_0x5185d2==_0x715681){_0x3d3de1['body'][_0x5d2f('0x72')]=_0x715681+0x1;}else if(_0x5185d2>_0x715681){_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')]=_0x5185d2;}else{return db[_0x5d2f('0x58')]['query'](_0x5d2f('0x76'),{'type':db['sequelize'][_0x5d2f('0x77')]['SELECT']})['then'](function(_0x2259b5){if(_0x2259b5&&_0x2259b5['length']){for(var _0x2ff775=0x0,_0xc940d1=_0x2259b5[_0x5d2f('0x78')];_0x2ff775<_0xc940d1&&_[_0x5d2f('0x6e')](_0x3d3de1['body'][_0x5d2f('0x72')]);_0x2ff775++){if(_0x5185d2<=_0x2259b5[_0x2ff775][_0x5d2f('0x79')]){_0x3d3de1[_0x5d2f('0x61')]['internal']=_0x2259b5[_0x2ff775]['from'];}else if(_0x5185d2>_0x2259b5[_0x2ff775]['from']&&_0x5185d2<=_0x2259b5[_0x2ff775]['to']){_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')]=_0x5185d2;}}}if(_['isNil'](_0x3d3de1[_0x5d2f('0x61')]['internal'])){_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')]=_0x715681+0x1;}});}}});}})['then'](function(){if(_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x7a')]){_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x7b')]=_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')];_0x3d3de1['body'][_0x5d2f('0x7c')]={'mailbox':_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x72')],'password':_0x3d3de1[_0x5d2f('0x61')]['password'],'fullname':_0x3d3de1['body'][_0x5d2f('0x7d')],'email':_0x3d3de1[_0x5d2f('0x61')][_0x5d2f('0x7e')]};}if(_0x3d3de1[_0x5d2f('0x61')]&&_0x3d3de1[_0x5d2f('0x61')]['role']==='agent'){_0x3d3de1['body']['permissions']=[_0x5d2f('0x7f'),'102',_0x5d2f('0x80'),'110',_0x5d2f('0x81'),_0x5d2f('0x82'),'106','107','108','109',_0x5d2f('0x83'),_0x5d2f('0x84')];}return db['User']['create'](_0x3d3de1[_0x5d2f('0x61')],{'include':[{'model':db[_0x5d2f('0x7c')],'as':_0x5d2f('0x7c')}]});})['then'](function(_0x5c4088){if(_0x3d3de1['body'][_0x5d2f('0x3c')]===_0x5d2f('0x36'))return _0x5c4088;var _0x106bf2=_0x3d3de1[_0x5d2f('0x36')][_0x5d2f('0x34')]({'plain':!![]});if(!_0x106bf2)throw new Error(_0x5d2f('0x85'));if(_0x106bf2['role']==='user'){var _0x148e59=_0x5c4088[_0x5d2f('0x34')]({'plain':!![]});var _0x17c5f6=[{'name':'Agents','value':_0x5d2f('0x38')},{'name':_0x5d2f('0x86'),'value':_0x5d2f('0x68')}];var _0x4a9f33=_[_0x5d2f('0x62')](_0x17c5f6,[_0x5d2f('0x3d'),_0x148e59['role']])[_0x5d2f('0x3e')];return db[_0x5d2f('0x87')]['find']({'where':{'name':_0x4a9f33,'userProfileId':_0x106bf2[_0x5d2f('0x88')]},'raw':!![]})[_0x5d2f('0x1e')](function(_0xbf3424){if(_0xbf3424&&_0xbf3424[_0x5d2f('0x89')]===0x0){return db[_0x5d2f('0x3f')][_0x5d2f('0x71')]({'name':_0x148e59[_0x5d2f('0x3e')],'resourceId':_0x148e59['id'],'type':_0xbf3424[_0x5d2f('0x3e')],'sectionId':_0xbf3424['id']},{})[_0x5d2f('0x1e')](function(){return _0x5c4088;});}else{return _0x5c4088;}})[_0x5d2f('0x28')](function(_0x2a337d){logger[_0x5d2f('0x24')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2a337d);throw _0x2a337d;});}return _0x5c4088;})[_0x5d2f('0x1e')](respondWithResult(_0x42c08c,0xc9))['catch'](handleError(_0x42c08c,null));};exports['changePassword']=function(_0x8a130c,_0x5844cc,_0x3eb691){var _0x48fa3f=![];if(_0x8a130c[_0x5d2f('0x61')]['id']){delete _0x8a130c['body']['id'];}return db[_0x5d2f('0x73')]['findOne']({'attributes':['id',_0x5d2f('0x75')]})[_0x5d2f('0x1e')](function(_0x5de3b7){_0x48fa3f=_0x5de3b7[_0x5d2f('0x75')];return db[_0x5d2f('0x43')]['find']({'where':{'id':_0x8a130c['params']['id']}});})[_0x5d2f('0x1e')](function(_0xb89918){if(_0xb89918){if(_0xb89918['id']==_0x8a130c['user']['id']){if(!_0x8a130c[_0x5d2f('0x61')]['oldPassword']||!_0x8a130c[_0x5d2f('0x61')][_0x5d2f('0x8a')]){throw new db['Sequelize'][(_0x5d2f('0x1b'))](_0x5d2f('0x8b'));}if(!_0xb89918['authenticate'](_0x8a130c[_0x5d2f('0x61')]['oldPassword'])){throw new db[(_0x5d2f('0x8c'))]['ValidationError'](_0x5d2f('0x8d'));}if(_0x8a130c[_0x5d2f('0x61')][_0x5d2f('0x8e')]==_0x8a130c[_0x5d2f('0x61')][_0x5d2f('0x8a')]){throw new db[(_0x5d2f('0x8c'))][(_0x5d2f('0x1b'))](_0x5d2f('0x8f'));}return _0xb89918;}else if(_0x8a130c[_0x5d2f('0x36')][_0x5d2f('0x3c')]=='admin'){if(!_0x8a130c['body'][_0x5d2f('0x8a')]){throw new db[(_0x5d2f('0x8c'))][(_0x5d2f('0x1b'))](_0x5d2f('0x90'));}return _0xb89918;}else if(_0x8a130c[_0x5d2f('0x36')]['role']==_0x5d2f('0x36')){if(!_0x8a130c['body']['newPassword']){throw new db['Sequelize'][(_0x5d2f('0x1b'))](_0x5d2f('0x90'));}if(_0xb89918[_0x5d2f('0x3c')]!='agent'){throw new db[(_0x5d2f('0x8c'))]['ValidationError'](_0x5d2f('0x91'));}return _0xb89918;}else{throw new db['Sequelize']['ValidationError'](_0x5d2f('0x91'));}}return null;})[_0x5d2f('0x1e')](handleEntityNotFound(_0x5844cc,null))['then'](function(_0x5b06b8){return checkPasswordPattern(_0x5b06b8,_0x8a130c[_0x5d2f('0x61')][_0x5d2f('0x8a')],_0x48fa3f);})[_0x5d2f('0x1e')](saveUpdates({'password':_0x8a130c[_0x5d2f('0x61')][_0x5d2f('0x8a')],'passwordResetAt':_0x8a130c[_0x5d2f('0x36')]['id']==_0x8a130c[_0x5d2f('0x5d')]['id']?moment():null},null))[_0x5d2f('0x1e')](respondWithResult(_0x5844cc,null))['catch'](handleError(_0x5844cc,null));};exports[_0x5d2f('0x92')]=function(_0x55d23e,_0x29e1d1,_0x25fadf){var _0x3c03c2=_0x55d23e[_0x5d2f('0x61')][_0x5d2f('0x93')];return db['User'][_0x5d2f('0x62')]({'where':{'id':_0x55d23e[_0x5d2f('0x5d')]['id']},'attributes':['id',_0x5d2f('0x3e'),_0x5d2f('0x3c'),'online',_0x5d2f('0x94'),_0x5d2f('0x95'),_0x5d2f('0x96')]})[_0x5d2f('0x1e')](handleEntityNotFound(_0x29e1d1,null))['then'](function(_0x3ced78){if(_0x3ced78){if(!utils[_0x5d2f('0x97')](_0x3c03c2)){throw new db[(_0x5d2f('0x8c'))][(_0x5d2f('0x1b'))](_0x5d2f('0x98'));}return _0x3ced78[_0x5d2f('0x99')+_[_0x5d2f('0x9a')](_0x3c03c2['toLowerCase']())+'Queues'](_0x55d23e[_0x5d2f('0x61')][_0x5d2f('0x65')],{'penalty':_0x55d23e[_0x5d2f('0x61')][_0x5d2f('0x9b')]||0x0})['spread'](function(_0x2ad4e7){for(var _0x48a0c6=0x0;_0x48a0c6<_0x55d23e['body'][_0x5d2f('0x65')][_0x5d2f('0x78')];_0x48a0c6+=0x1){var _0xbdb73f={'UserId':_0x55d23e[_0x5d2f('0x5d')]['id']};_0xbdb73f[_['capitalize'](_0x3c03c2[_0x5d2f('0x9c')]())+_0x5d2f('0x9d')]=_0x55d23e['body'][_0x5d2f('0x65')][_0x48a0c6];socket['emit'](_0x5d2f('0x36')+_[_0x5d2f('0x9a')](_0x3c03c2[_0x5d2f('0x9c')]())+_0x5d2f('0x9e'),_0xbdb73f);}return _0x2ad4e7;})[_0x5d2f('0x1e')](function(){if(_0x3c03c2==='voice'){return db[_0x5d2f('0x9f')][_0x5d2f('0xa0')]({'where':{'id':_0x55d23e[_0x5d2f('0x61')][_0x5d2f('0x65')]||[]},'raw':!![],'attributes':['id','name']});}})[_0x5d2f('0x1e')](function(_0x139f05){var _0x4afef2=_0x3ced78[_0x5d2f('0x34')]({'plain':!![]});var _0x374e2a=[];if(_0x3c03c2===_0x5d2f('0xa1')&&_0x4afef2[_0x5d2f('0x3c')]===_0x5d2f('0x38')&&_0x4afef2[_0x5d2f('0xa2')]){for(var _0x268646=0x0;_0x268646<_0x139f05[_0x5d2f('0x78')];_0x268646+=0x1){_0x374e2a[_0x5d2f('0xa3')]({'membername':_0x4afef2[_0x5d2f('0x3e')],'UserId':_0x4afef2['id'],'queue_name':_0x139f05[_0x268646][_0x5d2f('0x3e')],'VoiceQueueId':_0x139f05[_0x268646]['id'],'interface':_[_0x5d2f('0x6e')](_0x4afef2[_0x5d2f('0x96')])?util['format'](_0x5d2f('0xa4'),_0x4afef2[_0x5d2f('0x3e')]):_0x4afef2[_0x5d2f('0x96')],'paused':_0x4afef2[_0x5d2f('0x95')]||![],'penalty':_0x55d23e[_0x5d2f('0x61')][_0x5d2f('0x9b')]||0x0});}return BPromise[_0x5d2f('0xa5')](_0x374e2a,function(_0x5029a7){return db[_0x5d2f('0xa6')]['upsert'](_0x5029a7);});}return _0x3ced78;});}})[_0x5d2f('0x1e')](respondWithStatusCode(_0x29e1d1,null))[_0x5d2f('0x28')](handleError(_0x29e1d1,null));};exports[_0x5d2f('0xa7')]=function(_0x29cb82,_0x265ac5,_0x16969a){var _0x4087f6;return db[_0x5d2f('0x43')]['find']({'where':{'id':_0x29cb82[_0x5d2f('0x5d')]['id']},'attributes':['id',_0x5d2f('0x3e'),'role']})['then'](handleEntityNotFound(_0x265ac5,null))[_0x5d2f('0x1e')](function(_0x6af131){if(_0x6af131){_0x4087f6=_0x6af131;if(!_0x29cb82[_0x5d2f('0x49')][_0x5d2f('0x93')]||!utils['isValidChannel'](_0x29cb82[_0x5d2f('0x49')][_0x5d2f('0x93')])){throw new db['Sequelize'][(_0x5d2f('0x1b'))](_0x5d2f('0x98'));}return _0x6af131['remove'+_['capitalize'](_0x29cb82[_0x5d2f('0x49')]['channel'][_0x5d2f('0x9c')]())+_0x5d2f('0xa8')](_0x29cb82[_0x5d2f('0x49')][_0x5d2f('0x65')]);}})[_0x5d2f('0x1e')](function(_0x5a8452){for(var _0x4c181a=0x0;_0x4c181a<_0x29cb82[_0x5d2f('0x49')][_0x5d2f('0x65')][_0x5d2f('0x78')];_0x4c181a+=0x1){var _0x2f9b47={'UserId':_0x29cb82[_0x5d2f('0x5d')]['id']};_0x2f9b47[_[_0x5d2f('0x9a')](_0x29cb82[_0x5d2f('0x49')][_0x5d2f('0x93')]['toLowerCase']())+_0x5d2f('0x9d')]=_0x29cb82[_0x5d2f('0x49')]['ids'][_0x4c181a];socket[_0x5d2f('0xa9')](_0x5d2f('0x36')+_[_0x5d2f('0x9a')](_0x29cb82['query'][_0x5d2f('0x93')][_0x5d2f('0x9c')]())+_0x5d2f('0xaa'),_0x2f9b47);}return _0x5a8452;})[_0x5d2f('0x1e')](function(){if(_0x29cb82[_0x5d2f('0x49')][_0x5d2f('0x93')]==='voice'){return db['UserVoiceQueueRt'][_0x5d2f('0x40')]({'where':{'UserId':_0x29cb82[_0x5d2f('0x5d')]['id'],'VoiceQueueId':_0x29cb82[_0x5d2f('0x49')]['ids']},'individualHooks':!![]})['then'](function(){return _0x4087f6;});}return _0x4087f6;})['then'](respondWithStatusCode(_0x265ac5,null))[_0x5d2f('0x28')](handleError(_0x265ac5,null));};exports[_0x5d2f('0xab')]=function(_0x553586,_0x57f777,_0x39e8ca){_0x553586[_0x5d2f('0x61')]['userpic']=_0x553586[_0x5d2f('0xac')][_0x5d2f('0xad')];return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0x553586[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x57f777,null))['then'](saveUpdates(_0x553586[_0x5d2f('0x61')],null))[_0x5d2f('0x1e')](respondWithResult(_0x57f777,null))['catch'](handleError(_0x57f777,null));};exports[_0x5d2f('0xae')]=function(_0x483862,_0x2486e5,_0x230fbd){var _0x6b0695=path[_0x5d2f('0xaf')](config['root'],'server/files/images/logos/default_profile.png');return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0x483862[_0x5d2f('0x5d')]['id']},'attributes':['id',_0x5d2f('0xb0')],'raw':!![]})[_0x5d2f('0x1e')](handleEntityNotFound(_0x2486e5,null))[_0x5d2f('0x1e')](function(_0x1e900c){if(_0x1e900c){if(_[_0x5d2f('0x6e')](_0x1e900c[_0x5d2f('0xb0')])){return _0x2486e5[_0x5d2f('0xb1')](_0x6b0695);}else{if(!fs[_0x5d2f('0xb2')](path['join'](config[_0x5d2f('0xb3')],_0x5d2f('0xb4'),_0x1e900c[_0x5d2f('0xb0')]))){return _0x2486e5['download'](_0x6b0695);}return _0x2486e5['download'](path[_0x5d2f('0xaf')](config['root'],_0x5d2f('0xb4'),_0x1e900c[_0x5d2f('0xb0')]));}}})[_0x5d2f('0x28')](handleError(_0x2486e5,null));};exports[_0x5d2f('0xb5')]=function(_0x5eb2e6,_0x5cd6b5,_0xef8839){var _0x28992e={};var _0x14c4d1={};var _0x5cacd8;var _0x24871e;return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x5eb2e6['params']['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x5cd6b5,null))['then'](function(_0x15efbb){if(_0x15efbb){_0x5cacd8=_0x15efbb;_0x14c4d1[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_0x5d2f('0xb7')][_0x5d2f('0x44')]);_0x14c4d1['query']=_['keys'](_0x5eb2e6[_0x5d2f('0x49')]);_0x14c4d1[_0x5d2f('0x4b')]=_[_0x5d2f('0x4d')](_0x14c4d1[_0x5d2f('0x45')],_0x14c4d1[_0x5d2f('0x49')]);_0x28992e['attributes']=_[_0x5d2f('0x4d')](_0x14c4d1['model'],qs[_0x5d2f('0x4e')](_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x28992e[_0x5d2f('0x4c')]=_0x28992e[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x28992e[_0x5d2f('0x4c')]:_0x14c4d1['model'];_0x28992e[_0x5d2f('0x51')]=qs[_0x5d2f('0x52')](_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0x52')]);_0x28992e[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_[_0x5d2f('0x54')](_0x5eb2e6[_0x5d2f('0x49')],_0x14c4d1['filters']));if(_0x5eb2e6['query'][_0x5d2f('0x39')]){_0x28992e[_0x5d2f('0x53')]=_[_0x5d2f('0x55')](_0x28992e[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x28992e[_0x5d2f('0x4c')],function(_0x453af6){var _0x5edfcb={};_0x5edfcb[_0x453af6]={'$like':'%'+_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x5edfcb;})});}_0x28992e=_[_0x5d2f('0x55')]({},_0x28992e,_0x5eb2e6[_0x5d2f('0x5a')]);return _0x5cacd8[_0x5d2f('0xb5')](_0x28992e);}})[_0x5d2f('0x1e')](function(_0x10db02){if(_0x10db02){_0x24871e=_0x10db02['length'];if(_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0x4f')](_0x5d2f('0x5e'))){_0x28992e['include']=[{'model':db[_0x5d2f('0xb8')],'as':'List','required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id',_0x5d2f('0x3e'),'color'],'where':_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0xb9')]?{'id':_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0xb9')]}:undefined,'required':_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0xb9')]?!![]:![]}];}if(!_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0x4f')]('nolimit')){_0x28992e['limit']=qs[_0x5d2f('0x2f')](_0x5eb2e6[_0x5d2f('0x49')][_0x5d2f('0x2f')]);_0x28992e['offset']=qs[_0x5d2f('0x2e')](_0x5eb2e6['query'][_0x5d2f('0x2e')]);}return _0x5cacd8[_0x5d2f('0xb5')](_0x28992e);}})[_0x5d2f('0x1e')](function(_0x4c1a4c){if(_0x4c1a4c){return _0x4c1a4c?{'count':_0x24871e,'rows':_0x4c1a4c}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0x5cd6b5,null))[_0x5d2f('0x28')](handleError(_0x5cd6b5,null));};exports[_0x5d2f('0xba')]=function(_0x48addc,_0x7cdd8b,_0x18e5da){var _0x2ff1a1;var _0x1b47d0;var _0x30f3fb={};var _0x5127be;return db[_0x5d2f('0x43')]['findOne']({'where':{'id':_0x48addc[_0x5d2f('0x5d')]['id']},'attributes':['id',_0x5d2f('0x3e'),_0x5d2f('0x3c')]})['then'](handleEntityNotFound(_0x7cdd8b,null))[_0x5d2f('0x1e')](function(_0x5556a4){if(!utils[_0x5d2f('0x97')](_0x48addc[_0x5d2f('0x49')][_0x5d2f('0x93')])){throw new db[(_0x5d2f('0x8c'))][(_0x5d2f('0x1b'))]('Unknown\x20channel');}_0x2ff1a1=_0x5556a4;var _0x522b61={};_0x522b61[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_[_0x5d2f('0x9a')](_0x48addc['query'][_0x5d2f('0x93')])+_0x5d2f('0xbb')][_0x5d2f('0x44')]);_0x522b61[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x48addc['query']);_0x522b61[_0x5d2f('0x4b')]=_[_0x5d2f('0x4d')](_0x522b61[_0x5d2f('0x45')],_0x522b61[_0x5d2f('0x49')]);_0x30f3fb[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x522b61[_0x5d2f('0x45')],qs['fields'](_0x48addc[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x30f3fb[_0x5d2f('0x4c')]=_0x30f3fb[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x30f3fb[_0x5d2f('0x4c')]:_0x522b61[_0x5d2f('0x45')];_0x30f3fb[_0x5d2f('0x51')]=qs[_0x5d2f('0x52')](_0x48addc[_0x5d2f('0x49')][_0x5d2f('0x52')]);_0x30f3fb['where']=qs[_0x5d2f('0x4b')](_['pick'](_0x48addc[_0x5d2f('0x49')],_0x522b61['filters']));if(_0x48addc[_0x5d2f('0x49')]['filter']){_0x30f3fb['where']=_[_0x5d2f('0x55')](_0x30f3fb[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x30f3fb[_0x5d2f('0x4c')],function(_0x8d79d3){var _0x2186a8={};_0x2186a8[_0x8d79d3]={'$like':'%'+_0x48addc['query'][_0x5d2f('0x39')]+'%'};return _0x2186a8;})});}_0x30f3fb=_[_0x5d2f('0x55')]({},_0x30f3fb,_0x48addc[_0x5d2f('0x5a')]);switch(_0x2ff1a1[_0x5d2f('0x3c')]){case _0x5d2f('0x69'):return db[_[_0x5d2f('0x9a')](_0x48addc['query'][_0x5d2f('0x93')])+_0x5d2f('0xbb')][_0x5d2f('0xa0')](_0x30f3fb);case _0x5d2f('0x36'):case _0x5d2f('0x38'):return _0x2ff1a1[_0x5d2f('0x34')+_[_0x5d2f('0x9a')](_0x48addc['query'][_0x5d2f('0x93')])+_0x5d2f('0xa8')](_0x30f3fb);default:throw new db['Sequelize']['ValidationError'](_0x5d2f('0xbc'));}})[_0x5d2f('0x1e')](function(_0x434d64){_0x5127be=_0x434d64[_0x5d2f('0x78')];if(!_0x48addc['query'][_0x5d2f('0x4f')](_0x5d2f('0x50'))){_0x30f3fb[_0x5d2f('0x2f')]=qs[_0x5d2f('0x2f')](_0x48addc[_0x5d2f('0x49')][_0x5d2f('0x2f')]);_0x30f3fb[_0x5d2f('0x2e')]=qs['offset'](_0x48addc['query']['offset']);}switch(_0x2ff1a1[_0x5d2f('0x3c')]){case _0x5d2f('0x69'):return db[_[_0x5d2f('0x9a')](_0x48addc[_0x5d2f('0x49')][_0x5d2f('0x93')])+_0x5d2f('0xbb')]['findAll'](_0x30f3fb);case'user':case _0x5d2f('0x38'):return _0x2ff1a1[_0x5d2f('0x34')+_['capitalize'](_0x48addc[_0x5d2f('0x49')][_0x5d2f('0x93')])+'Queues'](_0x30f3fb);}})[_0x5d2f('0x1e')](function(_0xd9a062){return{'count':_0x5127be,'rows':_0xd9a062};})['then'](respondWithResult(_0x7cdd8b,null))['catch'](handleError(_0x7cdd8b,null));};exports[_0x5d2f('0xbd')]=function(_0x18edc1,_0x391d5a,_0x228873){var _0x586fc7={};var _0x1ff7d7={};var _0x18165f;var _0x2de508;return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x18edc1[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x391d5a,null))[_0x5d2f('0x1e')](function(_0x1bf343){if(_0x1bf343){_0x18165f=_0x1bf343;_0x1ff7d7[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db['UserVoiceQueueRt'][_0x5d2f('0x44')]);_0x1ff7d7['query']=_[_0x5d2f('0x4a')](_0x18edc1[_0x5d2f('0x49')]);_0x1ff7d7['filters']=_[_0x5d2f('0x4d')](_0x1ff7d7[_0x5d2f('0x45')],_0x1ff7d7[_0x5d2f('0x49')]);_0x586fc7[_0x5d2f('0x4c')]=_['intersection'](_0x1ff7d7[_0x5d2f('0x45')],qs['fields'](_0x18edc1[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x586fc7[_0x5d2f('0x4c')]=_0x586fc7[_0x5d2f('0x4c')]['length']?_0x586fc7[_0x5d2f('0x4c')]:_0x1ff7d7[_0x5d2f('0x45')];_0x586fc7[_0x5d2f('0x51')]=qs[_0x5d2f('0x52')](_0x18edc1['query'][_0x5d2f('0x52')]);_0x586fc7[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_['pick'](_0x18edc1[_0x5d2f('0x49')],_0x1ff7d7[_0x5d2f('0x4b')]));if(_0x18edc1[_0x5d2f('0x49')]['filter']){_0x586fc7[_0x5d2f('0x53')]=_['merge'](_0x586fc7[_0x5d2f('0x53')],{'$or':_['map'](_0x586fc7[_0x5d2f('0x4c')],function(_0x46b71a){var _0x6ba85d={};_0x6ba85d[_0x46b71a]={'$like':'%'+_0x18edc1[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x6ba85d;})});}_0x586fc7=_[_0x5d2f('0x55')]({},_0x586fc7,_0x18edc1[_0x5d2f('0x5a')]);return _0x18165f[_0x5d2f('0xbd')](_0x586fc7);}})['then'](function(_0x1e2a42){if(_0x1e2a42){_0x2de508=_0x1e2a42[_0x5d2f('0x78')];if(!_0x18edc1['query'][_0x5d2f('0x4f')](_0x5d2f('0x50'))){_0x586fc7['limit']=qs[_0x5d2f('0x2f')](_0x18edc1[_0x5d2f('0x49')][_0x5d2f('0x2f')]);_0x586fc7[_0x5d2f('0x2e')]=qs[_0x5d2f('0x2e')](_0x18edc1[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}return _0x18165f[_0x5d2f('0xbd')](_0x586fc7);}})[_0x5d2f('0x1e')](function(_0x4d465c){if(_0x4d465c){return _0x4d465c?{'count':_0x2de508,'rows':_0x4d465c}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0x391d5a,null))[_0x5d2f('0x28')](handleError(_0x391d5a,null));};exports['getGroups']=function(_0x3c601d,_0xc5ffe0,_0x3b796b){var _0x398900={};var _0xbd1369={};var _0x561b08;var _0x58f149;return db['User'][_0x5d2f('0xb6')]({'where':{'id':_0x3c601d['params']['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0xc5ffe0,null))['then'](function(_0x337592){if(_0x337592){_0x561b08=_0x337592;_0xbd1369[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db['ChatGroup']['rawAttributes']);_0xbd1369[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x3c601d[_0x5d2f('0x49')]);_0xbd1369[_0x5d2f('0x4b')]=_[_0x5d2f('0x4d')](_0xbd1369[_0x5d2f('0x45')],_0xbd1369['query']);_0x398900[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0xbd1369[_0x5d2f('0x45')],qs[_0x5d2f('0x4e')](_0x3c601d[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x398900['attributes']=_0x398900[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x398900[_0x5d2f('0x4c')]:_0xbd1369[_0x5d2f('0x45')];_0x398900[_0x5d2f('0x51')]=qs['sort'](_0x3c601d['query'][_0x5d2f('0x52')]);_0x398900[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_[_0x5d2f('0x54')](_0x3c601d['query'],_0xbd1369['filters']));if(_0x3c601d[_0x5d2f('0x49')][_0x5d2f('0x39')]){_0x398900['where']=_[_0x5d2f('0x55')](_0x398900[_0x5d2f('0x53')],{'$or':_['map'](_0x398900[_0x5d2f('0x4c')],function(_0x389ec0){var _0x4744ec={};_0x4744ec[_0x389ec0]={'$like':'%'+_0x3c601d['query']['filter']+'%'};return _0x4744ec;})});}_0x398900=_['merge']({},_0x398900,_0x3c601d[_0x5d2f('0x5a')]);return _0x561b08['getGroups'](_0x398900);}})[_0x5d2f('0x1e')](function(_0x28892a){if(_0x28892a){_0x58f149=_0x28892a[_0x5d2f('0x78')];if(!_0x3c601d[_0x5d2f('0x49')][_0x5d2f('0x4f')](_0x5d2f('0x50'))){_0x398900[_0x5d2f('0x2f')]=qs['limit'](_0x3c601d[_0x5d2f('0x49')][_0x5d2f('0x2f')]);_0x398900[_0x5d2f('0x2e')]=qs[_0x5d2f('0x2e')](_0x3c601d[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}return _0x561b08[_0x5d2f('0xbe')](_0x398900);}})[_0x5d2f('0x1e')](function(_0x171ee2){if(_0x171ee2){return _0x171ee2?{'count':_0x58f149,'rows':_0x171ee2}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0xc5ffe0,null))[_0x5d2f('0x28')](handleError(_0xc5ffe0,null));};exports['getRecordings']=function(_0x1f48f8,_0x40283c,_0x58d0f5){var _0x800b0={'raw':!![],'where':{}};var _0x3fea85={};var _0x5b477a={'count':0x0,'rows':[]};return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x1f48f8['params']['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x40283c,null))[_0x5d2f('0x1e')](function(_0x31d4ea){if(_0x31d4ea){_0x3fea85[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_0x5d2f('0xbf')][_0x5d2f('0x44')]);_0x3fea85[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x1f48f8[_0x5d2f('0x49')]);_0x3fea85['filters']=_['intersection'](_0x3fea85[_0x5d2f('0x45')],_0x3fea85[_0x5d2f('0x49')]);_0x800b0[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x3fea85['model'],qs[_0x5d2f('0x4e')](_0x1f48f8[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x800b0['attributes']=_0x800b0[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x800b0['attributes']:_0x3fea85[_0x5d2f('0x45')];if(!_0x1f48f8[_0x5d2f('0x49')]['hasOwnProperty'](_0x5d2f('0x50'))){_0x800b0[_0x5d2f('0x2f')]=qs[_0x5d2f('0x2f')](_0x1f48f8['query'][_0x5d2f('0x2f')]);_0x800b0['offset']=qs[_0x5d2f('0x2e')](_0x1f48f8[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}_0x800b0[_0x5d2f('0x51')]=qs[_0x5d2f('0x52')](_0x1f48f8[_0x5d2f('0x49')][_0x5d2f('0x52')]);_0x800b0[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_[_0x5d2f('0x54')](_0x1f48f8[_0x5d2f('0x49')],_0x3fea85[_0x5d2f('0x4b')]));_0x800b0[_0x5d2f('0x53')][_0x5d2f('0xc0')]=_0x31d4ea['id'];if(_0x1f48f8[_0x5d2f('0x49')]['filter']){_0x800b0[_0x5d2f('0x53')]=_[_0x5d2f('0x55')](_0x800b0[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x800b0[_0x5d2f('0x4c')],function(_0x37ff87){var _0x118415={};_0x118415[_0x37ff87]={'$like':'%'+_0x1f48f8[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x118415;})});}_0x800b0=_['merge']({},_0x800b0,_0x1f48f8[_0x5d2f('0x5a')]);return db[_0x5d2f('0xbf')][_0x5d2f('0x2d')]({'where':_0x800b0['where']})[_0x5d2f('0x1e')](function(_0x5de9fb){_0x5b477a['count']=_0x5de9fb;if(_0x1f48f8[_0x5d2f('0x49')]['includeAll']){_0x800b0[_0x5d2f('0x5f')]=[{'all':!![]}];}return db['VoiceRecording'][_0x5d2f('0xa0')](_0x800b0);})['then'](function(_0x34793a){_0x5b477a[_0x5d2f('0x5b')]=_0x34793a;return _0x5b477a;});}})[_0x5d2f('0x1e')](respondWithFilteredResult(_0x40283c,_0x800b0))['catch'](handleError(_0x40283c,null));};exports[_0x5d2f('0xc1')]=function(_0x2c3e22,_0x5f489b,_0x180a66){var _0x3c7921={'raw':!![],'where':{}};var _0x4f0296={};var _0x45c567={'count':0x0,'rows':[]};return db['User'][_0x5d2f('0xb6')]({'where':{'id':_0x2c3e22[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x5f489b,null))[_0x5d2f('0x1e')](function(_0x278d67){if(_0x278d67){_0x4f0296[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_0x5d2f('0xc2')][_0x5d2f('0x44')]);_0x4f0296['query']=_[_0x5d2f('0x4a')](_0x2c3e22[_0x5d2f('0x49')]);_0x4f0296[_0x5d2f('0x4b')]=_[_0x5d2f('0x4d')](_0x4f0296[_0x5d2f('0x45')],_0x4f0296[_0x5d2f('0x49')]);_0x3c7921[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x4f0296[_0x5d2f('0x45')],qs['fields'](_0x2c3e22['query'][_0x5d2f('0x4e')]));_0x3c7921[_0x5d2f('0x4c')]=_0x3c7921[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x3c7921[_0x5d2f('0x4c')]:_0x4f0296[_0x5d2f('0x45')];if(!_0x2c3e22[_0x5d2f('0x49')]['hasOwnProperty'](_0x5d2f('0x50'))){_0x3c7921['limit']=qs[_0x5d2f('0x2f')](_0x2c3e22[_0x5d2f('0x49')][_0x5d2f('0x2f')]);_0x3c7921[_0x5d2f('0x2e')]=qs[_0x5d2f('0x2e')](_0x2c3e22[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}_0x3c7921[_0x5d2f('0x51')]=qs['sort'](_0x2c3e22[_0x5d2f('0x49')]['sort']);_0x3c7921[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_['pick'](_0x2c3e22[_0x5d2f('0x49')],_0x4f0296[_0x5d2f('0x4b')]));_0x3c7921['where'][_0x5d2f('0xc0')]=_0x278d67['id'];if(_0x2c3e22[_0x5d2f('0x49')][_0x5d2f('0x39')]){_0x3c7921['where']=_[_0x5d2f('0x55')](_0x3c7921[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x3c7921[_0x5d2f('0x4c')],function(_0x23f858){var _0x2d7506={};_0x2d7506[_0x23f858]={'$like':'%'+_0x2c3e22[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x2d7506;})});}_0x3c7921=_[_0x5d2f('0x55')]({},_0x3c7921,_0x2c3e22['options']);return db[_0x5d2f('0xc2')][_0x5d2f('0x2d')]({'where':_0x3c7921[_0x5d2f('0x53')]})[_0x5d2f('0x1e')](function(_0x3f4d03){_0x45c567[_0x5d2f('0x2d')]=_0x3f4d03;if(_0x2c3e22['query'][_0x5d2f('0x5e')]){_0x3c7921[_0x5d2f('0x5f')]=[{'all':!![]}];}return db['ScreenRecording']['findAll'](_0x3c7921);})[_0x5d2f('0x1e')](function(_0x453cd9){_0x45c567[_0x5d2f('0x5b')]=_0x453cd9;return _0x45c567;});}})[_0x5d2f('0x1e')](respondWithFilteredResult(_0x5f489b,_0x3c7921))[_0x5d2f('0x28')](handleError(_0x5f489b,null));};exports[_0x5d2f('0xc3')]=function(_0x40ed92,_0x1f819e,_0x493913){var _0x58f3b5={};var _0x56cfbe={};var _0x18655d;var _0x66b0e5;return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x40ed92['params']['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x1f819e,null))[_0x5d2f('0x1e')](function(_0x1091d8){if(_0x1091d8){_0x18655d=_0x1091d8;_0x56cfbe[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_0x5d2f('0xc4')][_0x5d2f('0x44')]);_0x56cfbe[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x40ed92[_0x5d2f('0x49')]);_0x56cfbe[_0x5d2f('0x4b')]=_[_0x5d2f('0x4d')](_0x56cfbe[_0x5d2f('0x45')],_0x56cfbe[_0x5d2f('0x49')]);_0x58f3b5[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x56cfbe[_0x5d2f('0x45')],qs['fields'](_0x40ed92[_0x5d2f('0x49')]['fields']));_0x58f3b5[_0x5d2f('0x4c')]=_0x58f3b5[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x58f3b5[_0x5d2f('0x4c')]:_0x56cfbe[_0x5d2f('0x45')];_0x58f3b5['order']=qs[_0x5d2f('0x52')](_0x40ed92[_0x5d2f('0x49')]['sort']);_0x58f3b5[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_[_0x5d2f('0x54')](_0x40ed92[_0x5d2f('0x49')],_0x56cfbe[_0x5d2f('0x4b')]));if(_0x40ed92[_0x5d2f('0x49')][_0x5d2f('0x39')]){_0x58f3b5[_0x5d2f('0x53')]=_[_0x5d2f('0x55')](_0x58f3b5[_0x5d2f('0x53')],{'$or':_['map'](_0x58f3b5[_0x5d2f('0x4c')],function(_0x22db75){var _0x1dd4f0={};_0x1dd4f0[_0x22db75]={'$like':'%'+_0x40ed92[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x1dd4f0;})});}_0x58f3b5=_[_0x5d2f('0x55')]({},_0x58f3b5,_0x40ed92[_0x5d2f('0x5a')]);return _0x18655d[_0x5d2f('0xc3')](_0x58f3b5);}})[_0x5d2f('0x1e')](function(_0x39a2a9){if(_0x39a2a9){_0x66b0e5=_0x39a2a9[_0x5d2f('0x78')];if(!_0x40ed92[_0x5d2f('0x49')][_0x5d2f('0x4f')]('nolimit')){_0x58f3b5[_0x5d2f('0x2f')]=qs[_0x5d2f('0x2f')](_0x40ed92['query'][_0x5d2f('0x2f')]);_0x58f3b5[_0x5d2f('0x2e')]=qs[_0x5d2f('0x2e')](_0x40ed92[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}return _0x18655d[_0x5d2f('0xc3')](_0x58f3b5);}})[_0x5d2f('0x1e')](function(_0x3866a2){if(_0x3866a2){return _0x3866a2?{'count':_0x66b0e5,'rows':_0x3866a2}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0x1f819e,null))[_0x5d2f('0x28')](handleError(_0x1f819e,null));};exports[_0x5d2f('0xc5')]=function(_0x16e914,_0x1ac31d,_0x1437df){var _0x1350ed={};var _0x5ae2d6={};var _0x56dd21;var _0x1bbcd2;return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x16e914[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x1ac31d,null))[_0x5d2f('0x1e')](function(_0x338f5f){if(_0x338f5f){_0x56dd21=_0x338f5f;_0x5ae2d6[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db['OpenchannelInteraction']['rawAttributes']);_0x5ae2d6['query']=_[_0x5d2f('0x4a')](_0x16e914['query']);_0x5ae2d6[_0x5d2f('0x4b')]=_['intersection'](_0x5ae2d6['model'],_0x5ae2d6[_0x5d2f('0x49')]);_0x1350ed[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x5ae2d6[_0x5d2f('0x45')],qs['fields'](_0x16e914[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x1350ed[_0x5d2f('0x4c')]=_0x1350ed[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x1350ed['attributes']:_0x5ae2d6[_0x5d2f('0x45')];_0x1350ed[_0x5d2f('0x51')]=qs['sort'](_0x16e914['query']['sort']);_0x1350ed[_0x5d2f('0x53')]=qs['filters'](_['pick'](_0x16e914[_0x5d2f('0x49')],_0x5ae2d6['filters']));if(_0x16e914[_0x5d2f('0x49')][_0x5d2f('0x39')]){_0x1350ed[_0x5d2f('0x53')]=_[_0x5d2f('0x55')](_0x1350ed[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x1350ed[_0x5d2f('0x4c')],function(_0x312e69){var _0x24108a={};_0x24108a[_0x312e69]={'$like':'%'+_0x16e914['query'][_0x5d2f('0x39')]+'%'};return _0x24108a;})});}_0x1350ed=_[_0x5d2f('0x55')]({},_0x1350ed,_0x16e914[_0x5d2f('0x5a')]);return _0x56dd21[_0x5d2f('0xc5')](_0x1350ed);}})[_0x5d2f('0x1e')](function(_0x25f930){if(_0x25f930){_0x1bbcd2=_0x25f930['length'];if(!_0x16e914[_0x5d2f('0x49')][_0x5d2f('0x4f')](_0x5d2f('0x50'))){_0x1350ed['limit']=qs['limit'](_0x16e914['query'][_0x5d2f('0x2f')]);_0x1350ed[_0x5d2f('0x2e')]=qs['offset'](_0x16e914[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}return _0x56dd21[_0x5d2f('0xc5')](_0x1350ed);}})['then'](function(_0x19c187){if(_0x19c187){return _0x19c187?{'count':_0x1bbcd2,'rows':_0x19c187}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0x1ac31d,null))[_0x5d2f('0x28')](handleError(_0x1ac31d,null));};exports[_0x5d2f('0xc6')]=function(_0x284564,_0x5f41de,_0x81fec3){var _0x3e299a={'raw':!![],'where':{}};var _0x41d935={};var _0x538399={'count':0x0,'rows':[]};return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x284564[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x5f41de,null))[_0x5d2f('0x1e')](function(_0x53745c){if(_0x53745c){_0x41d935[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_0x5d2f('0xc7')][_0x5d2f('0x44')]);_0x41d935[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x284564[_0x5d2f('0x49')]);_0x41d935['filters']=_[_0x5d2f('0x4d')](_0x41d935['model'],_0x41d935[_0x5d2f('0x49')]);_0x3e299a[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x41d935[_0x5d2f('0x45')],qs['fields'](_0x284564[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x3e299a[_0x5d2f('0x4c')]=_0x3e299a[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x3e299a[_0x5d2f('0x4c')]:_0x41d935[_0x5d2f('0x45')];if(!_0x284564[_0x5d2f('0x49')][_0x5d2f('0x4f')](_0x5d2f('0x50'))){_0x3e299a[_0x5d2f('0x2f')]=qs[_0x5d2f('0x2f')](_0x284564['query'][_0x5d2f('0x2f')]);_0x3e299a[_0x5d2f('0x2e')]=qs[_0x5d2f('0x2e')](_0x284564[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}_0x3e299a[_0x5d2f('0x51')]=qs[_0x5d2f('0x52')](_0x284564[_0x5d2f('0x49')]['sort']);_0x3e299a[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_['pick'](_0x284564[_0x5d2f('0x49')],_0x41d935['filters']));_0x3e299a[_0x5d2f('0x53')]['UserId']=_0x53745c['id'];if(_0x284564[_0x5d2f('0x49')]['filter']){_0x3e299a['where']=_[_0x5d2f('0x55')](_0x3e299a[_0x5d2f('0x53')],{'$or':_['map'](_0x3e299a[_0x5d2f('0x4c')],function(_0x426c2b){var _0x5deb6f={};_0x5deb6f[_0x426c2b]={'$like':'%'+_0x284564[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x5deb6f;})});}_0x3e299a=_[_0x5d2f('0x55')]({},_0x3e299a,_0x284564['options']);return db[_0x5d2f('0xc7')][_0x5d2f('0x2d')]({'where':_0x3e299a[_0x5d2f('0x53')]})['then'](function(_0x4ace50){_0x538399[_0x5d2f('0x2d')]=_0x4ace50;if(_0x284564['query'][_0x5d2f('0x5e')]){_0x3e299a[_0x5d2f('0x5f')]=[{'all':!![]}];}return db[_0x5d2f('0xc7')]['findAll'](_0x3e299a);})[_0x5d2f('0x1e')](function(_0xc92da5){_0x538399[_0x5d2f('0x5b')]=_0xc92da5;return _0x538399;});}})['then'](respondWithFilteredResult(_0x5f41de,_0x3e299a))['catch'](handleError(_0x5f41de,null));};exports[_0x5d2f('0xc8')]=function(_0x86bb9c,_0x178cce,_0x3fd92f){var _0x1db196={};var _0x1d55cc={};var _0x181040;var _0x3117f9;return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x86bb9c[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x178cce,null))[_0x5d2f('0x1e')](function(_0x215bef){if(_0x215bef){_0x181040=_0x215bef;_0x1d55cc[_0x5d2f('0x45')]=_['keys'](db[_0x5d2f('0xc9')][_0x5d2f('0x44')]);_0x1d55cc[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x86bb9c['query']);_0x1d55cc[_0x5d2f('0x4b')]=_['intersection'](_0x1d55cc[_0x5d2f('0x45')],_0x1d55cc[_0x5d2f('0x49')]);_0x1db196[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x1d55cc[_0x5d2f('0x45')],qs[_0x5d2f('0x4e')](_0x86bb9c[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x1db196[_0x5d2f('0x4c')]=_0x1db196[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x1db196[_0x5d2f('0x4c')]:_0x1d55cc[_0x5d2f('0x45')];_0x1db196[_0x5d2f('0x51')]=qs['sort'](_0x86bb9c[_0x5d2f('0x49')]['sort']);_0x1db196[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_[_0x5d2f('0x54')](_0x86bb9c[_0x5d2f('0x49')],_0x1d55cc[_0x5d2f('0x4b')]));if(_0x86bb9c['query']['filter']){_0x1db196[_0x5d2f('0x53')]=_[_0x5d2f('0x55')](_0x1db196[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x1db196[_0x5d2f('0x4c')],function(_0x185324){var _0x316c0c={};_0x316c0c[_0x185324]={'$like':'%'+_0x86bb9c[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x316c0c;})});}_0x1db196=_['merge']({},_0x1db196,_0x86bb9c['options']);return _0x181040[_0x5d2f('0xc8')](_0x1db196);}})[_0x5d2f('0x1e')](function(_0x5529a1){if(_0x5529a1){_0x3117f9=_0x5529a1['length'];if(!_0x86bb9c[_0x5d2f('0x49')][_0x5d2f('0x4f')]('nolimit')){_0x1db196[_0x5d2f('0x2f')]=qs[_0x5d2f('0x2f')](_0x86bb9c['query'][_0x5d2f('0x2f')]);_0x1db196[_0x5d2f('0x2e')]=qs['offset'](_0x86bb9c['query'][_0x5d2f('0x2e')]);}return _0x181040[_0x5d2f('0xc8')](_0x1db196);}})['then'](function(_0x17001c){if(_0x17001c){return _0x17001c?{'count':_0x3117f9,'rows':_0x17001c}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0x178cce,null))['catch'](handleError(_0x178cce,null));};exports[_0x5d2f('0xca')]=function(_0x24f9a6,_0x4c3a69,_0x300a57){var _0x2a6f7b={};var _0x362708={};var _0x430f06;var _0x2da8b1;return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x24f9a6[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x4c3a69,null))['then'](function(_0x81b2c4){if(_0x81b2c4){_0x430f06=_0x81b2c4;_0x362708[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db['FaxInteraction'][_0x5d2f('0x44')]);_0x362708[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x24f9a6[_0x5d2f('0x49')]);_0x362708[_0x5d2f('0x4b')]=_['intersection'](_0x362708[_0x5d2f('0x45')],_0x362708[_0x5d2f('0x49')]);_0x2a6f7b[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x362708['model'],qs[_0x5d2f('0x4e')](_0x24f9a6['query'][_0x5d2f('0x4e')]));_0x2a6f7b[_0x5d2f('0x4c')]=_0x2a6f7b[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x2a6f7b[_0x5d2f('0x4c')]:_0x362708['model'];_0x2a6f7b[_0x5d2f('0x51')]=qs[_0x5d2f('0x52')](_0x24f9a6['query'][_0x5d2f('0x52')]);_0x2a6f7b['where']=qs['filters'](_[_0x5d2f('0x54')](_0x24f9a6[_0x5d2f('0x49')],_0x362708[_0x5d2f('0x4b')]));if(_0x24f9a6['query'][_0x5d2f('0x39')]){_0x2a6f7b[_0x5d2f('0x53')]=_[_0x5d2f('0x55')](_0x2a6f7b[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x2a6f7b[_0x5d2f('0x4c')],function(_0x5d3994){var _0x46978e={};_0x46978e[_0x5d3994]={'$like':'%'+_0x24f9a6[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x46978e;})});}_0x2a6f7b=_[_0x5d2f('0x55')]({},_0x2a6f7b,_0x24f9a6[_0x5d2f('0x5a')]);return _0x430f06['getFaxInteractions'](_0x2a6f7b);}})[_0x5d2f('0x1e')](function(_0x20ee06){if(_0x20ee06){_0x2da8b1=_0x20ee06['length'];if(!_0x24f9a6[_0x5d2f('0x49')][_0x5d2f('0x4f')]('nolimit')){_0x2a6f7b[_0x5d2f('0x2f')]=qs['limit'](_0x24f9a6[_0x5d2f('0x49')][_0x5d2f('0x2f')]);_0x2a6f7b[_0x5d2f('0x2e')]=qs[_0x5d2f('0x2e')](_0x24f9a6[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}return _0x430f06['getFaxInteractions'](_0x2a6f7b);}})[_0x5d2f('0x1e')](function(_0x3cd5f4){if(_0x3cd5f4){return _0x3cd5f4?{'count':_0x2da8b1,'rows':_0x3cd5f4}:null;}})['then'](respondWithResult(_0x4c3a69,null))[_0x5d2f('0x28')](handleError(_0x4c3a69,null));};exports[_0x5d2f('0xcb')]=function(_0x5587cb,_0xcda2a1,_0x324116){var _0x3a0a22;var _0x34dc73;var _0x495d87;var _0x53d20d=!_['isNil'](_0x5587cb[_0x5d2f('0x5d')]['id'])?_0x5587cb[_0x5d2f('0x5d')]['id']:!_[_0x5d2f('0x6e')](_0x5587cb[_0x5d2f('0x36')]['id'])?_0x5587cb[_0x5d2f('0x36')]['id']:null;return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0x53d20d,'role':{'$or':['admin','user',_0x5d2f('0x38')]}},'attributes':['id','name','phone',_0x5d2f('0xcc'),_0x5d2f('0x3c'),_0x5d2f('0x72'),_0x5d2f('0x94')]})[_0x5d2f('0x1e')](function(_0x431605){if(_0x431605){if(_0x431605[_0x5d2f('0x3c')]===_0x5d2f('0x38')){_0x3a0a22=_0x431605;if(_0x5587cb[_0x5d2f('0x61')][_0x5d2f('0x96')]){_0x495d87=util[_0x5d2f('0xcd')]('LOCAL/%s@from-sip/n',_0x3a0a22[_0x5587cb['body'][_0x5d2f('0x96')]]);}else if(_0x5587cb[_0x5d2f('0x61')][_0x5d2f('0xce')]){_0x495d87=util[_0x5d2f('0xcd')](_0x5d2f('0xa4'),_0x5587cb[_0x5d2f('0x61')][_0x5d2f('0xce')]);}else{_0x495d87=util[_0x5d2f('0xcd')](_0x5d2f('0xa4'),_0x3a0a22[_0x5d2f('0x3e')]);}socket['to'](util[_0x5d2f('0xcd')](_0x5d2f('0xcf'),_0x3a0a22['name']))[_0x5d2f('0xa9')](_0x5d2f('0xd0'),{'ip':_0x5587cb['headers'][_0x5d2f('0xd1')]||_0x5587cb[_0x5d2f('0xd2')][_0x5d2f('0xd3')]||_0x5587cb[_0x5d2f('0xd4')][_0x5d2f('0xd3')]||_0x5587cb[_0x5d2f('0xd2')]['socket'][_0x5d2f('0xd3')]});return db[_0x5d2f('0xa6')]['destroy']({'where':{'membername':_0x3a0a22['name']},'individualHooks':!![]});}}else{throw new db[(_0x5d2f('0x8c'))][(_0x5d2f('0x1b'))](_0x5d2f('0xd5'));}})['then'](function(){if(_0x3a0a22){return _0x3a0a22[_0x5d2f('0xd6')]({'raw':!![]});}})[_0x5d2f('0x1e')](function(_0x606e46){if(_0x3a0a22){var _0x3871cd=[];if(_0x606e46){_0x34dc73=_0x606e46;if(_0x34dc73[_0x5d2f('0x78')]){for(var _0x1f4ed3=0x0;_0x1f4ed3<_0x34dc73[_0x5d2f('0x78')];_0x1f4ed3++){_0x3871cd[_0x5d2f('0xa3')]({'membername':_0x3a0a22['name'],'UserId':_0x3a0a22['id'],'queue_name':_0x34dc73[_0x1f4ed3][_0x5d2f('0x3e')],'VoiceQueueId':_0x34dc73[_0x1f4ed3]['id'],'interface':_0x495d87,'paused':_0x3a0a22[_0x5d2f('0x94')]||![],'penalty':_0x34dc73[_0x1f4ed3][_0x5d2f('0xd7')]||0x0});}return BPromise[_0x5d2f('0xa5')](_0x3871cd,function(_0x1c5a54){return db[_0x5d2f('0xa6')][_0x5d2f('0xd8')](_0x1c5a54);});}}}})[_0x5d2f('0x1e')](function(){if(_0x3a0a22){return db[_0x5d2f('0xd9')][_0x5d2f('0xa0')]({'where':{'membername':_0x3a0a22['name'],'exitAt':null}});}})[_0x5d2f('0x1e')](function(_0x2fdfe2){if(_0x3a0a22){var _0x70a9ae=[];_0x2fdfe2[_0x5d2f('0xda')](function(_0x1d0899){_0x70a9ae[_0x5d2f('0xa3')](_0x1d0899[_0x5d2f('0x33')]({'exitAt':moment()[_0x5d2f('0xcd')](_0x5d2f('0xdb'))}));});return BPromise[_0x5d2f('0xdc')](_0x70a9ae);}})[_0x5d2f('0x1e')](function(){if(_0x3a0a22){var _0x4b2751=[];var _0x2cd20b=[];var _0x537884=utils[_0x5d2f('0xdd')]();var _0x3b7be8={'membername':_0x3a0a22['name'],'interface':_0x495d87,'enterAt':moment()['format'](_0x5d2f('0xdb')),'role':_0x3a0a22['role'],'internal':_0x3a0a22['internal']};_0x537884[_0x5d2f('0xda')](function(_0x39a07c){_0x4b2751[_0x5d2f('0xa3')](_['merge']({'channel':_0x39a07c,'type':_0x5d2f('0xde'),'data1':_0x5587cb['body'][_0x5d2f('0xdf')],'data2':_0x495d87},_0x3b7be8));if(_0x3a0a22[_0x5d2f('0x94')]){_0x2cd20b[_0x5d2f('0xa3')](_[_0x5d2f('0x55')]({'channel':_0x39a07c,'type':_0x5d2f('0xe0'),'data1':_0x5d2f('0xe1')},_0x3b7be8));}});return db['MemberReport'][_0x5d2f('0x60')](_0x4b2751[_0x5d2f('0xe2')](_0x2cd20b),{'individualHooks':!![]});}})[_0x5d2f('0x1e')](function(){if(_0x3a0a22){return _0x3a0a22[_0x5d2f('0x33')]({'online':!![],'lastLoginAt':moment()['format'](_0x5d2f('0xdb')),'voicePause':_0x3a0a22[_0x5d2f('0x94')]||![],'mailPause':_0x3a0a22['loginInPause']||![],'chatPause':_0x3a0a22[_0x5d2f('0x94')]||![],'faxPause':_0x3a0a22['loginInPause']||![],'smsPause':_0x3a0a22[_0x5d2f('0x94')]||![],'openchannelPause':_0x3a0a22['loginInPause']||![],'pauseType':_0x3a0a22[_0x5d2f('0x94')]?_0x5d2f('0xe1'):null,'interface':_0x495d87,'lastPauseAt':moment()[_0x5d2f('0xcd')](_0x5d2f('0xdb'))});}})[_0x5d2f('0x1e')](function(_0x15da0d){if(_0x5587cb[_0x5d2f('0xe3')]){return _0x324116();}else{return BPromise[_0x5d2f('0xe4')](_0x15da0d)[_0x5d2f('0x1e')](respondWithResult(_0xcda2a1,null));}})[_0x5d2f('0x28')](handleError(_0xcda2a1,null));};exports[_0x5d2f('0xe5')]=function(_0x59d03e,_0x231bba,_0x30b328){var _0x29153b;return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0x59d03e[_0x5d2f('0x5d')]['id'],'role':'agent'},'attributes':['id',_0x5d2f('0x3e'),_0x5d2f('0x3c')]})['then'](handleEntityNotFound(_0x231bba,null))[_0x5d2f('0x1e')](function(_0xd18379){if(_0xd18379){_0x29153b=_0xd18379;return db[_0x5d2f('0xa6')]['destroy']({'where':{'membername':_0x29153b[_0x5d2f('0x3e')]},'individualHooks':!![]});}})[_0x5d2f('0x1e')](function(){return db[_0x5d2f('0xd9')][_0x5d2f('0xa0')]({'where':{'membername':_0x29153b[_0x5d2f('0x3e')],'exitAt':null}});})['then'](function(_0x4af406){var _0x524d52=[];_0x4af406[_0x5d2f('0xda')](function(_0x2a343e){_0x524d52[_0x5d2f('0xa3')](_0x2a343e['update']({'exitAt':moment()[_0x5d2f('0xcd')](_0x5d2f('0xdb'))}));});return BPromise[_0x5d2f('0xdc')](_0x524d52);})['then'](function(){return _0x29153b['update']({'online':![],'lastLoginAt':null,'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'interface':null});})[_0x5d2f('0x1e')](respondWithResult(_0x231bba,null))[_0x5d2f('0x28')](handleError(_0x231bba,null));};exports[_0x5d2f('0xe6')]=function(_0x216a1d,_0x4e8313,_0x234e87){var _0x22d4b1;return db[_0x5d2f('0xa6')][_0x5d2f('0x33')]({'paused':0x1},{'where':{'UserId':_0x216a1d[_0x5d2f('0x5d')]['id']},'individualHooks':!![]})['then'](function(){return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0x216a1d[_0x5d2f('0x5d')]['id'],'role':_0x5d2f('0x38')},'attributes':['id',_0x5d2f('0x3e'),_0x5d2f('0x3c'),_0x5d2f('0x72'),_0x5d2f('0x96')]});})[_0x5d2f('0x1e')](handleEntityNotFound(_0x4e8313,null))['then'](function(_0x3bae57){if(_0x3bae57){_0x22d4b1=_0x3bae57;return respondWithRpcPromise('QueuePause',_0x5d2f('0xe6'),{'id':_0x22d4b1['id'],'name':_0x22d4b1['name'],'pause':!![]});}})[_0x5d2f('0x1e')](function(){if(_0x22d4b1){return db[_0x5d2f('0xd9')][_0x5d2f('0xa0')]({'where':{'membername':_0x22d4b1[_0x5d2f('0x3e')],'type':_0x5d2f('0xe0'),'exitAt':null}});}})[_0x5d2f('0x1e')](function(_0x22fdcb){if(_0x22fdcb[_0x5d2f('0x78')]){var _0x482763=moment()[_0x5d2f('0xcd')]('YYYY-MM-DD\x20HH:mm:ss');for(var _0x36df45=0x0,_0x1d90f7=_0x22fdcb[_0x5d2f('0x78')];_0x36df45<_0x1d90f7;_0x36df45++){_0x22fdcb[_0x36df45]['updateAttributes']({'exitAt':_0x482763});}}})['then'](function(){var _0x5e8f45=[];var _0x9a3be0=utils['getChannels']();_0x9a3be0['forEach'](function(_0x55669a){_0x5e8f45[_0x5d2f('0xa3')]({'channel':_0x55669a,'membername':_0x22d4b1[_0x5d2f('0x3e')],'interface':_[_0x5d2f('0x6e')](_0x22d4b1['interface'])?util[_0x5d2f('0xcd')]('SIP/%s',_0x22d4b1[_0x5d2f('0x3e')]):_0x22d4b1['interface'],'type':'PAUSE','enterAt':moment()[_0x5d2f('0xcd')](_0x5d2f('0xdb')),'data1':_0x216a1d['body'][_0x5d2f('0x56')]||_0x5d2f('0xe7'),'role':_0x22d4b1[_0x5d2f('0x3c')],'internal':_0x22d4b1[_0x5d2f('0x72')]});});return db['MemberReport'][_0x5d2f('0x60')](_0x5e8f45,{'individualHooks':!![]});})[_0x5d2f('0x1e')](function(){return _0x22d4b1[_0x5d2f('0x33')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'pauseType':_0x216a1d[_0x5d2f('0x61')]['type']||_0x5d2f('0xe7'),'lastPauseAt':moment()['format'](_0x5d2f('0xdb'))});})[_0x5d2f('0x1e')](respondWithResult(_0x4e8313,null))['catch'](handleError(_0x4e8313,null));};exports[_0x5d2f('0xe8')]=function(_0x453789,_0x197278,_0x8fffb3){var _0x83463d;return db['User'][_0x5d2f('0x62')]({'where':{'id':_0x453789[_0x5d2f('0x5d')]['id']},'attributes':['id','name',_0x5d2f('0x3c'),'voicePause',_0x5d2f('0xe9'),_0x5d2f('0xea'),_0x5d2f('0xeb'),_0x5d2f('0xec'),'smsPause',_0x5d2f('0xed'),_0x5d2f('0xee')]})[_0x5d2f('0x1e')](handleEntityNotFound(_0x197278,null))[_0x5d2f('0x1e')](function(_0x4d1cf3){if(_0x4d1cf3){_0x83463d=_0x4d1cf3;if(_0x453789['body']['channel']&&!utils[_0x5d2f('0x97')](_0x453789['body'][_0x5d2f('0x93')])){throw new db[(_0x5d2f('0x8c'))][(_0x5d2f('0x1b'))](_0x5d2f('0x98'));}switch(_0x453789[_0x5d2f('0x61')]['channel']){case _0x5d2f('0xa1'):return respondWithRpcPromise(_0x5d2f('0xef'),_0x5d2f('0xe8'),{'id':_0x83463d['id'],'name':_0x83463d[_0x5d2f('0x3e')],'pause':![]})[_0x5d2f('0x1e')](function(){return db[_0x5d2f('0xa6')]['update']({'paused':0x0},{'where':{'UserId':_0x83463d['id']},'individualHooks':!![]});})['then'](function(){return db['MemberReport']['find']({'where':{'channel':_0x453789[_0x5d2f('0x61')]['channel'],'membername':_0x83463d[_0x5d2f('0x3e')],'type':_0x5d2f('0xe0'),'exitAt':null}});})[_0x5d2f('0x1e')](function(_0x1d3594){if(_0x1d3594){return _0x1d3594[_0x5d2f('0x33')]({'exitAt':moment()[_0x5d2f('0xcd')](_0x5d2f('0xdb')),'data2':'manual'},{'individualHooks':!![]});}return null;})[_0x5d2f('0x1e')](function(){return _0x83463d[_0x5d2f('0x33')]({'voicePause':![]});});case'mail':case'chat':case _0x5d2f('0xf0'):case _0x5d2f('0xf1'):case _0x5d2f('0xf2'):return db['MemberReport'][_0x5d2f('0x62')]({'where':{'channel':_0x453789[_0x5d2f('0x61')][_0x5d2f('0x93')],'membername':_0x83463d[_0x5d2f('0x3e')],'type':_0x5d2f('0xe0'),'exitAt':null}})[_0x5d2f('0x1e')](function(_0x5f0856){if(_0x5f0856){return _0x5f0856[_0x5d2f('0x33')]({'exitAt':moment()[_0x5d2f('0xcd')]('YYYY-MM-DD\x20HH:mm:ss'),'data2':_0x5d2f('0xf3')},{'individualHooks':!![]});}return null;})['then'](function(){var _0x5cbb24={};_[_0x5d2f('0x30')](_0x5cbb24,util[_0x5d2f('0xcd')]('%s%s',_0x453789['body'][_0x5d2f('0x93')],_0x5d2f('0xf4')),![]);return _0x83463d[_0x5d2f('0x33')](_0x5cbb24);});default:return respondWithRpcPromise(_0x5d2f('0xef'),'unpause',{'id':_0x83463d['id'],'name':_0x83463d[_0x5d2f('0x3e')],'pause':![]})[_0x5d2f('0x1e')](function(){return db[_0x5d2f('0xa6')][_0x5d2f('0x33')]({'paused':0x0},{'where':{'UserId':_0x83463d['id']}});})[_0x5d2f('0x1e')](function(){return db[_0x5d2f('0xd9')]['findAll']({'where':{'membername':_0x83463d[_0x5d2f('0x3e')],'type':_0x5d2f('0xe0'),'exitAt':null}});})['then'](function(_0x484242){var _0x3bf45f=[];_0x484242[_0x5d2f('0xda')](function(_0x592fc1){_0x3bf45f['push'](_0x592fc1[_0x5d2f('0x33')]({'exitAt':moment()[_0x5d2f('0xcd')](_0x5d2f('0xdb')),'data2':_0x5d2f('0xf3')}));});return BPromise[_0x5d2f('0xdc')](_0x3bf45f);})[_0x5d2f('0x1e')](function(){return _0x83463d['update']({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});});}}})[_0x5d2f('0x1e')](respondWithResult(_0x197278,null))[_0x5d2f('0x28')](handleError(_0x197278,null));};exports[_0x5d2f('0xf5')]=function(_0x18adf8,_0x3bf07e,_0x23b00e){var _0x545bbe={};var _0x56740d={};var _0x1d760d;var _0x485b06;return db['User']['findOne']({'where':{'id':_0x18adf8[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x3bf07e,null))[_0x5d2f('0x1e')](function(_0x328f01){if(_0x328f01){_0x1d760d=_0x328f01;_0x56740d[_0x5d2f('0x45')]=_['keys'](db['Team'][_0x5d2f('0x44')]);_0x56740d[_0x5d2f('0x49')]=_[_0x5d2f('0x4a')](_0x18adf8['query']);_0x56740d['filters']=_[_0x5d2f('0x4d')](_0x56740d[_0x5d2f('0x45')],_0x56740d[_0x5d2f('0x49')]);_0x545bbe['attributes']=_[_0x5d2f('0x4d')](_0x56740d[_0x5d2f('0x45')],qs[_0x5d2f('0x4e')](_0x18adf8[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x545bbe[_0x5d2f('0x4c')]=_0x545bbe[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x545bbe[_0x5d2f('0x4c')]:_0x56740d[_0x5d2f('0x45')];_0x545bbe[_0x5d2f('0x51')]=qs['sort'](_0x18adf8[_0x5d2f('0x49')][_0x5d2f('0x52')]);_0x545bbe[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_['pick'](_0x18adf8['query'],_0x56740d['filters']));if(_0x18adf8[_0x5d2f('0x49')][_0x5d2f('0x39')]){_0x545bbe[_0x5d2f('0x53')]=_['merge'](_0x545bbe[_0x5d2f('0x53')],{'$or':_['map'](_0x545bbe['attributes'],function(_0x89f9ea){var _0x8527f3={};_0x8527f3[_0x89f9ea]={'$like':'%'+_0x18adf8[_0x5d2f('0x49')][_0x5d2f('0x39')]+'%'};return _0x8527f3;})});}_0x545bbe=_['merge']({},_0x545bbe,_0x18adf8[_0x5d2f('0x5a')]);return _0x1d760d[_0x5d2f('0xf5')](_0x545bbe);}})[_0x5d2f('0x1e')](function(_0x17adcd){if(_0x17adcd){_0x485b06=_0x17adcd[_0x5d2f('0x78')];if(!_0x18adf8['query'][_0x5d2f('0x4f')](_0x5d2f('0x50'))){_0x545bbe[_0x5d2f('0x2f')]=qs[_0x5d2f('0x2f')](_0x18adf8[_0x5d2f('0x49')]['limit']);_0x545bbe[_0x5d2f('0x2e')]=qs[_0x5d2f('0x2e')](_0x18adf8[_0x5d2f('0x49')]['offset']);}return _0x1d760d[_0x5d2f('0xf5')](_0x545bbe);}})[_0x5d2f('0x1e')](function(_0x2473a4){if(_0x2473a4){return _0x2473a4?{'count':_0x485b06,'rows':_0x2473a4}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0x3bf07e,null))['catch'](handleError(_0x3bf07e,null));};exports['addTeams']=function(_0x244df9,_0x51023d){return db[_0x5d2f('0x43')][_0x5d2f('0x62')]({'where':{'id':_0x244df9[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x51023d,null))[_0x5d2f('0x1e')](function(_0x4d583b){if(_0x4d583b){var _0x5125af=_0x4d583b['get']({'plain':!![]});return _0x4d583b[_0x5d2f('0xf6')](_0x244df9[_0x5d2f('0x61')][_0x5d2f('0x65')],_[_0x5d2f('0x66')](_0x244df9[_0x5d2f('0x61')],[_0x5d2f('0x65'),'id'])||{})[_0x5d2f('0x1e')](function(){for(var _0x180003=0x0;_0x180003<_0x244df9[_0x5d2f('0x61')][_0x5d2f('0x65')][_0x5d2f('0x78')];_0x180003++){var _0x4dfc05=[];db[_0x5d2f('0xf7')]['findOne']({'where':{'id':_0x244df9['body']['ids'][_0x180003]}})['then'](function(_0x1e8d8e){_0x4dfc05[_0x5d2f('0xa3')](_0x1e8d8e[_0x5d2f('0xd6')]()[_0x5d2f('0x1e')](function(_0x1fecc1){for(var _0x49ada0=0x0;_0x49ada0<_0x1fecc1[_0x5d2f('0x78')];_0x49ada0++){_0x1fecc1[_0x49ada0][_0x5d2f('0xf8')](_0x5d2f('0x93'),_0x5d2f('0xf9'));}return _0x1fecc1;}));_0x4dfc05['push'](_0x1e8d8e['getChatQueues']()['then'](function(_0x3196c4){for(var _0x546a3a=0x0;_0x546a3a<_0x3196c4[_0x5d2f('0x78')];_0x546a3a++){_0x3196c4[_0x546a3a]['setDataValue'](_0x5d2f('0x93'),_0x5d2f('0xfa'));}return _0x3196c4;}));_0x4dfc05[_0x5d2f('0xa3')](_0x1e8d8e['getMailQueues']()[_0x5d2f('0x1e')](function(_0x40a3a3){for(var _0x34abe4=0x0;_0x34abe4<_0x40a3a3[_0x5d2f('0x78')];_0x34abe4++){_0x40a3a3[_0x34abe4][_0x5d2f('0xf8')](_0x5d2f('0x93'),'Mail');}return _0x40a3a3;}));_0x4dfc05[_0x5d2f('0xa3')](_0x1e8d8e['getSmsQueues']()[_0x5d2f('0x1e')](function(_0xaf60fe){for(var _0x23aca7=0x0;_0x23aca7<_0xaf60fe['length'];_0x23aca7++){_0xaf60fe[_0x23aca7][_0x5d2f('0xf8')]('channel',_0x5d2f('0xfb'));}return _0xaf60fe;}));_0x4dfc05[_0x5d2f('0xa3')](_0x1e8d8e['getFaxQueues']()['then'](function(_0x1c1792){for(var _0x1a63e8=0x0;_0x1a63e8<_0x1c1792['length'];_0x1a63e8++){_0x1c1792[_0x1a63e8][_0x5d2f('0xf8')]('channel',_0x5d2f('0xfc'));}return _0x1c1792;}));_0x4dfc05['push'](_0x1e8d8e[_0x5d2f('0xfd')]()[_0x5d2f('0x1e')](function(_0x30405f){for(var _0x3d45fa=0x0;_0x3d45fa<_0x30405f['length'];_0x3d45fa++){_0x30405f[_0x3d45fa]['setDataValue'](_0x5d2f('0x93'),_0x5d2f('0xfe'));}return _0x30405f;}));return BPromise[_0x5d2f('0xdc')](_0x4dfc05);})[_0x5d2f('0x1e')](function(_0x4dc369){var _0x18eb35=_['flatten'](_0x4dc369);_0x4dfc05=[];return db[_0x5d2f('0x58')][_0x5d2f('0xff')](function(_0x430a0a){for(var _0xfb95b1=0x0;_0xfb95b1<_0x18eb35['length'];_0xfb95b1++){_0x4dfc05[_0x5d2f('0xa3')](_0x18eb35[_0xfb95b1][_0x5d2f('0x100')](_0x5125af['id']),{'transaction':_0x430a0a});}return BPromise[_0x5d2f('0xdc')](_0x4dfc05)[_0x5d2f('0x1e')](function(){if(_0x5125af[_0x5d2f('0xa2')]){return BPromise[_0x5d2f('0xa5')](_[_0x5d2f('0x39')](_0x18eb35,function(_0x56cef2){return _0x56cef2[_0x5d2f('0x101')]('channel')===_0x5d2f('0xf9');}),function(_0x2cbefb){return db[_0x5d2f('0xa6')]['upsert']({'membername':_0x5125af[_0x5d2f('0x3e')],'UserId':_0x5125af['id'],'queue_name':_0x2cbefb[_0x5d2f('0x3e')],'VoiceQueueId':_0x2cbefb['id'],'interface':_['isNil'](_0x5125af[_0x5d2f('0x96')])?util[_0x5d2f('0xcd')]('SIP/%s',_0x5125af[_0x5d2f('0x3e')]):_0x5125af['interface'],'paused':_0x5125af['voicePause']||![],'penalty':_0x5125af[_0x5d2f('0x9b')]},{'transaction':_0x430a0a});});}else{return;}})[_0x5d2f('0x1e')](function(){for(var _0x3db9d5=0x0;_0x3db9d5<_0x18eb35['length'];_0x3db9d5++){var _0x5c2602=_0x18eb35[_0x3db9d5]['getDataValue'](_0x5d2f('0x93'));var _0x755630=_0x5c2602+_0x5d2f('0x9d');socket[_0x5d2f('0xa9')](_0x5d2f('0x36')+_0x5c2602+_0x5d2f('0x9e'),{'UserId':_0x5125af['id'],['queueField']:_0x18eb35[_0x3db9d5]['id']});}});});});}});}})[_0x5d2f('0x1e')](respondWithStatusCode(_0x51023d,null))[_0x5d2f('0x28')](handleError(_0x51023d,null));};exports['removeTeams']=function(_0x31d1f7,_0x40bffc){return db['User']['findOne']({'where':{'id':_0x31d1f7['params']['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x40bffc,null))[_0x5d2f('0x1e')](function(_0x4054ba){if(_0x4054ba){var _0x4ee22c=_0x4054ba['get']({'plain':!![]});var _0x31c575=_0x31d1f7[_0x5d2f('0x49')][_0x5d2f('0x65')];return _0x4054ba[_0x5d2f('0x102')](_0x31c575)[_0x5d2f('0x1e')](function(){for(var _0xd59477=0x0;_0xd59477<_0x31c575[_0x5d2f('0x78')];_0xd59477++){var _0x169d18=[];db[_0x5d2f('0xf7')]['findOne']({'where':{'id':_0x31c575[_0xd59477]}})[_0x5d2f('0x1e')](function(_0x4757c4){_0x169d18[_0x5d2f('0xa3')](_0x4757c4['getVoiceQueues']()[_0x5d2f('0x1e')](function(_0x23c56b){for(var _0x2fbf6f=0x0;_0x2fbf6f<_0x23c56b[_0x5d2f('0x78')];_0x2fbf6f++){_0x23c56b[_0x2fbf6f][_0x5d2f('0xf8')](_0x5d2f('0x93'),'Voice');}return _0x23c56b;}));_0x169d18[_0x5d2f('0xa3')](_0x4757c4['getChatQueues']()[_0x5d2f('0x1e')](function(_0x3eda9a){for(var _0x57fa94=0x0;_0x57fa94<_0x3eda9a[_0x5d2f('0x78')];_0x57fa94++){_0x3eda9a[_0x57fa94]['setDataValue'](_0x5d2f('0x93'),_0x5d2f('0xfa'));}return _0x3eda9a;}));_0x169d18['push'](_0x4757c4['getMailQueues']()[_0x5d2f('0x1e')](function(_0x72f0b4){for(var _0x7ea6b2=0x0;_0x7ea6b2<_0x72f0b4[_0x5d2f('0x78')];_0x7ea6b2++){_0x72f0b4[_0x7ea6b2]['setDataValue']('channel','Mail');}return _0x72f0b4;}));_0x169d18[_0x5d2f('0xa3')](_0x4757c4['getSmsQueues']()[_0x5d2f('0x1e')](function(_0x569430){for(var _0x253b61=0x0;_0x253b61<_0x569430['length'];_0x253b61++){_0x569430[_0x253b61]['setDataValue']('channel',_0x5d2f('0xfb'));}return _0x569430;}));_0x169d18[_0x5d2f('0xa3')](_0x4757c4[_0x5d2f('0x103')]()[_0x5d2f('0x1e')](function(_0x2c0457){for(var _0x46e4d3=0x0;_0x46e4d3<_0x2c0457[_0x5d2f('0x78')];_0x46e4d3++){_0x2c0457[_0x46e4d3][_0x5d2f('0xf8')](_0x5d2f('0x93'),'Fax');}return _0x2c0457;}));_0x169d18[_0x5d2f('0xa3')](_0x4757c4[_0x5d2f('0xfd')]()[_0x5d2f('0x1e')](function(_0x18a3c9){for(var _0x4ee86a=0x0;_0x4ee86a<_0x18a3c9[_0x5d2f('0x78')];_0x4ee86a++){_0x18a3c9[_0x4ee86a][_0x5d2f('0xf8')](_0x5d2f('0x93'),_0x5d2f('0xfe'));}return _0x18a3c9;}));return BPromise['all'](_0x169d18);})[_0x5d2f('0x1e')](function(_0x24454d){var _0x474e6a=_[_0x5d2f('0x104')](_0x24454d);_0x169d18=[];return db['sequelize']['transaction'](function(_0x59ada9){for(var _0x401238=0x0;_0x401238<_0x474e6a[_0x5d2f('0x78')];_0x401238++){_0x169d18[_0x5d2f('0xa3')](_0x474e6a[_0x401238][_0x5d2f('0x105')](_0x4ee22c['id']),{'transaction':_0x59ada9});}return BPromise[_0x5d2f('0xdc')](_0x169d18)[_0x5d2f('0x1e')](function(){if(_0x4ee22c['online']){return BPromise[_0x5d2f('0xa5')](_[_0x5d2f('0x39')](_0x474e6a,function(_0x39c196){return _0x39c196[_0x5d2f('0x101')](_0x5d2f('0x93'))==='Voice';}),function(_0x1f8ddd){return db[_0x5d2f('0xa6')][_0x5d2f('0x40')]({'where':{'VoiceQueueId':_0x1f8ddd['id'],'UserId':_0x4ee22c['id']},'transaction':_0x59ada9});});}else{return;}})[_0x5d2f('0x1e')](function(){for(var _0x370b62=0x0;_0x370b62<_0x474e6a[_0x5d2f('0x78')];_0x370b62++){var _0x5ce63d=_0x474e6a[_0x370b62][_0x5d2f('0x101')](_0x5d2f('0x93'));var _0x5b5efa=_0x5ce63d+_0x5d2f('0x9d');socket[_0x5d2f('0xa9')](_0x5d2f('0x36')+_0x5ce63d+_0x5d2f('0xaa'),{'UserId':_0x4ee22c['id'],['queueField']:_0x474e6a[_0x370b62]['id']});}});});});}});}})[_0x5d2f('0x1e')](respondWithStatusCode(_0x40bffc,null))[_0x5d2f('0x28')](handleError(_0x40bffc,null));};exports[_0x5d2f('0x106')]=function(_0x576066,_0x30f6f7,_0x548ca3){var _0x873996={};var _0x139642={};var _0x4f369b;var _0x34f19f;return db[_0x5d2f('0x43')][_0x5d2f('0xb6')]({'where':{'id':_0x576066[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x30f6f7,null))[_0x5d2f('0x1e')](function(_0x5aa43d){if(_0x5aa43d){_0x4f369b=_0x5aa43d;_0x139642[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_0x5d2f('0xb8')][_0x5d2f('0x44')]);_0x139642['query']=_[_0x5d2f('0x4a')](_0x576066[_0x5d2f('0x49')]);_0x139642[_0x5d2f('0x4b')]=_['intersection'](_0x139642[_0x5d2f('0x45')],_0x139642[_0x5d2f('0x49')]);_0x873996[_0x5d2f('0x4c')]=_[_0x5d2f('0x4d')](_0x139642[_0x5d2f('0x45')],qs[_0x5d2f('0x4e')](_0x576066[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x873996[_0x5d2f('0x4c')]=_0x873996[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x873996[_0x5d2f('0x4c')]:_0x139642[_0x5d2f('0x45')];_0x873996[_0x5d2f('0x51')]=qs['sort'](_0x576066[_0x5d2f('0x49')][_0x5d2f('0x52')]);_0x873996['where']=qs[_0x5d2f('0x4b')](_[_0x5d2f('0x54')](_0x576066[_0x5d2f('0x49')],_0x139642[_0x5d2f('0x4b')]));if(_0x576066[_0x5d2f('0x49')][_0x5d2f('0x39')]){_0x873996[_0x5d2f('0x53')]=_['merge'](_0x873996[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x873996[_0x5d2f('0x4c')],function(_0x5ea163){var _0x5f420b={};_0x5f420b[_0x5ea163]={'$like':'%'+_0x576066[_0x5d2f('0x49')]['filter']+'%'};return _0x5f420b;})});}_0x873996=_['merge']({},_0x873996,_0x576066['options']);return _0x4f369b[_0x5d2f('0x106')](_0x873996);}})['then'](function(_0x4e5e19){if(_0x4e5e19){_0x34f19f=_0x4e5e19['length'];if(!_0x576066['query']['hasOwnProperty'](_0x5d2f('0x50'))){_0x873996[_0x5d2f('0x2f')]=qs['limit'](_0x576066[_0x5d2f('0x49')][_0x5d2f('0x2f')]);_0x873996['offset']=qs[_0x5d2f('0x2e')](_0x576066[_0x5d2f('0x49')][_0x5d2f('0x2e')]);}return _0x4f369b[_0x5d2f('0x106')](_0x873996);}})['then'](function(_0x457317){if(_0x457317){return _0x457317?{'count':_0x34f19f,'rows':_0x457317}:null;}})[_0x5d2f('0x1e')](respondWithResult(_0x30f6f7,null))[_0x5d2f('0x28')](handleError(_0x30f6f7,null));};exports[_0x5d2f('0x107')]=function(_0x100bcd,_0x1f45ef,_0x2f24dc){var _0x41b9f3={};var _0xe1ad54={};var _0x1f88b3;var _0x3e9ff9;return db[_0x5d2f('0x43')]['findOne']({'where':{'id':_0x100bcd[_0x5d2f('0x5d')]['id']}})[_0x5d2f('0x1e')](handleEntityNotFound(_0x1f45ef,null))['then'](function(_0xf15dcd){if(_0xf15dcd){_0x1f88b3=_0xf15dcd;_0xe1ad54[_0x5d2f('0x45')]=_[_0x5d2f('0x4a')](db[_0x5d2f('0x43')]['rawAttributes']);_0xe1ad54['query']=_['keys'](_0x100bcd[_0x5d2f('0x49')]);_0xe1ad54[_0x5d2f('0x4b')]=_[_0x5d2f('0x4d')](_0xe1ad54[_0x5d2f('0x45')],_0xe1ad54[_0x5d2f('0x49')]);_0x41b9f3['attributes']=_[_0x5d2f('0x4d')](_0xe1ad54[_0x5d2f('0x45')],qs[_0x5d2f('0x4e')](_0x100bcd[_0x5d2f('0x49')][_0x5d2f('0x4e')]));_0x41b9f3[_0x5d2f('0x4c')]=_0x41b9f3[_0x5d2f('0x4c')][_0x5d2f('0x78')]?_0x41b9f3[_0x5d2f('0x4c')]:_0xe1ad54[_0x5d2f('0x45')];_0x41b9f3[_0x5d2f('0x51')]=qs[_0x5d2f('0x52')](_0x100bcd[_0x5d2f('0x49')][_0x5d2f('0x52')]);_0x41b9f3[_0x5d2f('0x53')]=qs[_0x5d2f('0x4b')](_[_0x5d2f('0x54')](_0x100bcd['query'],_0xe1ad54['filters']));if(_0x100bcd[_0x5d2f('0x49')][_0x5d2f('0x39')]){_0x41b9f3[_0x5d2f('0x53')]=_[_0x5d2f('0x55')](_0x41b9f3[_0x5d2f('0x53')],{'$or':_[_0x5d2f('0x3b')](_0x41b9f3[_0x5d2f('0x4c')],function(_0x319b87){var _0x418ac5={};_0x418ac5[_0x319b87]={'$like':'%'+_0x100bcd[_0x5d2f('0x49')]['filter']+'%'};return _0x418ac5;})});}_0x41b9f3['model']=db[_0x5d2f('0x43')];_0x41b9f3['as']=_0x5d2f('0x37');_0x41b9f3=_[_0x5d2f('0x55')]({},_0x41b9f3,_0x100bcd[_0x5d2f('0x5a')]);return _0x1f88b3['getVoiceQueues']({'include':[_0x41b9f3]});}})[_0x5d2f('0x1e')](function(_0x4f2d6c){if(_0x4f2d6c){var _0x512605={},_0x3b90f1=[],_0x45549b=0x0;for(var _0x549856=0x0;_0x549856<_0x4f2d6c[_0x5d2f('0x78')];_0x549856+=0x1){for(var _0x16ccd8=0x0,_0xaefed4;_0x16ccd8<_0x4f2d6c[_0x549856][_0x5d2f('0x37')][_0x5d2f('0x78')];_0x16ccd8+=0x1){_0xaefed4=_0x4f2d6c[_0x549856][_0x5d2f('0x37')][_0x16ccd8][_0x5d2f('0x34')]({'plain':!![]});_0x512605[_0xaefed4['id']]=_0xaefed4;}}_0x512605=_[_0x5d2f('0x108')](_0x512605);for(var _0x118deb=qs[_0x5d2f('0x2e')](_0x100bcd[_0x5d2f('0x49')][_0x5d2f('0x2e')]);_0x118deb<_0x512605[_0x5d2f('0x78')]&&_0x3b90f1[_0x5d2f('0x78')]=_0xc65ce3[_0xea44('0x51')]){throw new Error('Maximum\x20login\x20has\x20been\x20reached');}})[_0xea44('0x10')](function(){if(_0x2d7d99){return db[_0xea44('0x3f')][_0xea44('0x49')]({'where':{'membername':_0x2d7d99[_0xea44('0x27')]},'individualHooks':!![]});}})['then'](function(){if(_0x2d7d99){return _0x2d7d99[_0xea44('0x52')]({'raw':!![]});}})['then'](function(_0x38b7bc){if(_0x2d7d99){if(_0x38b7bc){var _0x3b423a=[];_0x2cbcf7=_0x38b7bc;if(_0x2cbcf7[_0xea44('0x2e')]){for(var _0x3cb22e=0x0;_0x3cb22e<_0x2cbcf7[_0xea44('0x2e')];_0x3cb22e++){_0x3b423a['push'](db[_0xea44('0x3f')][_0xea44('0x53')]({'membername':_0x2d7d99[_0xea44('0x27')],'UserId':_0x2d7d99['id'],'queue_name':_0x2cbcf7[_0x3cb22e][_0xea44('0x27')],'VoiceQueueId':_0x2cbcf7[_0x3cb22e]['id'],'interface':_0x40d0e9,'paused':_0x2d7d99[_0xea44('0x4d')]||![],'penalty':_0x2cbcf7[_0x3cb22e][_0xea44('0x54')]||0x0}));}return BPromise[_0xea44('0x55')](_0x3b423a);}}}})[_0xea44('0x10')](function(){if(_0x2d7d99){return db['MemberReport'][_0xea44('0x1a')]({'where':{'membername':_0x2d7d99[_0xea44('0x27')],'exitAt':null}});}})[_0xea44('0x10')](function(_0x223cef){if(_0x2d7d99){if(_0x223cef&&_0x223cef[_0xea44('0x2e')]){var _0x4f92fd=[];_0x223cef[_0xea44('0x30')](function(_0x91a24d){_0x4f92fd['push'](_0x91a24d['update']({'exitAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')}));});return BPromise[_0xea44('0x55')](_0x4f92fd);}}})['then'](function(_0x23d2fc){if(_0x2d7d99){var _0x1f7307=[];var _0x5ded4f=[];var _0x3db41e=utils[_0xea44('0x56')]();var _0x103212={'membername':_0x2d7d99[_0xea44('0x27')],'interface':_0x40d0e9,'enterAt':moment()['format'](_0xea44('0x34')),'role':_0x2d7d99['role'],'internal':_0x2d7d99[_0xea44('0x29')]};_0x3db41e[_0xea44('0x30')](function(_0x4138e4){_0x1f7307[_0xea44('0x31')](_[_0xea44('0x57')]({'channel':_0x4138e4,'type':'LOGIN','data1':'callysquare','data2':_0x40d0e9},_0x103212));if(_0x2d7d99[_0xea44('0x4d')]){_0x5ded4f[_0xea44('0x31')](_[_0xea44('0x57')]({'channel':_0x4138e4,'type':'PAUSE','data1':_0xea44('0x58')},_0x103212));}});return db[_0xea44('0x2b')][_0xea44('0x37')](_0x1f7307[_0xea44('0x59')](_0x5ded4f),{'individualHooks':!![]});}})[_0xea44('0x10')](function(){if(_0x2d7d99){return _0x2d7d99[_0xea44('0x40')]({'online':!![],'lastLoginAt':moment()[_0xea44('0x2d')](_0xea44('0x34')),'voicePause':_0x2d7d99[_0xea44('0x4d')]||![],'mailPause':_0x2d7d99[_0xea44('0x4d')]||![],'chatPause':_0x2d7d99[_0xea44('0x4d')]||![],'faxPause':_0x2d7d99[_0xea44('0x4d')]||![],'smsPause':_0x2d7d99['loginInPause']||![],'openchannelPause':_0x2d7d99[_0xea44('0x4d')]||![],'pauseType':_0x2d7d99[_0xea44('0x4d')]?_0xea44('0x58'):null,'lastPauseAt':moment()[_0xea44('0x2d')]('YYYY-MM-DD\x20HH:mm:ss'),'interface':_0x40d0e9});}})[_0xea44('0x10')](function(_0x13938f){_0x3c3ef6(_0x13938f);})[_0xea44('0x22')](function(_0x393c57){_0xcdb483(_0x3f5899['error'](0x1f4,_0x393c57['message']));});});};
\ No newline at end of file
+var _0x4c68=['Pause','all','LogoutUser','destroy','findOne','mobile','phone','loginInPause','count','../../config/license/util','getLicense','agents','Maximum\x20login\x20has\x20been\x20reached','getVoiceQueues','merge','LOGININPAUSE','concat','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./user.socket','register','request','request\x20sent','debug','User,\x20%s,\x20%s,\x20%s','stringify','error','User,\x20%s,\x20%s','message','result','catch','GetUser','User','findAll','options','raw','attributes','include','map','model','then','info','ShowUser','find','where','PauseUser','name','role','internal','interface','UserVoiceQueueRt','update','PAUSE','length','format','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','forEach','push','isNil','SIP/%s','type','DEFAULT\x20PAUSE','body','MemberReport','bulkCreate','UnpauseUser','channel','voice','mail','chat','fax','openchannel','system','set','%s%s'];(function(_0x1fac89,_0xd1c4b0){var _0x25dacd=function(_0x1ecf4f){while(--_0x1ecf4f){_0x1fac89['push'](_0x1fac89['shift']());}};_0x25dacd(++_0xd1c4b0);}(_0x4c68,0x11f));var _0x84c6=function(_0xf66a25,_0x527689){_0xf66a25=_0xf66a25-0x0;var _0x231422=_0x4c68[_0xf66a25];return _0x231422;};'use strict';var _=require(_0x84c6('0x0'));var util=require(_0x84c6('0x1'));var moment=require('moment');var BPromise=require(_0x84c6('0x2'));var rs=require(_0x84c6('0x3'));var fs=require('fs');var Redis=require(_0x84c6('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x84c6('0x5'));var logger=require(_0x84c6('0x6'))(_0x84c6('0x7'));var config=require(_0x84c6('0x8'));var jayson=require(_0x84c6('0x9'));var client=jayson[_0x84c6('0xa')][_0x84c6('0xb')]({'port':0x232a});config[_0x84c6('0xc')]=_[_0x84c6('0xd')](config[_0x84c6('0xc')],{'host':_0x84c6('0xe'),'port':0x18eb});var socket=require(_0x84c6('0xf'))(new Redis(config[_0x84c6('0xc')]));require(_0x84c6('0x10'))[_0x84c6('0x11')](socket);function respondWithRpcPromise(_0x563615,_0x5d2fad,_0x1a412c){return new BPromise(function(_0x3f156d,_0x523dd1){return client[_0x84c6('0x12')](_0x563615,_0x1a412c)['then'](function(_0x2d51c9){logger['info']('User,\x20%s,\x20%s',_0x5d2fad,_0x84c6('0x13'));logger[_0x84c6('0x14')](_0x84c6('0x15'),_0x5d2fad,_0x84c6('0x13'),JSON[_0x84c6('0x16')](_0x2d51c9));if(_0x2d51c9['error']){if(_0x2d51c9[_0x84c6('0x17')]['code']===0x1f4){logger['error'](_0x84c6('0x18'),_0x5d2fad,_0x2d51c9[_0x84c6('0x17')][_0x84c6('0x19')]);return _0x523dd1(_0x2d51c9['error'][_0x84c6('0x19')]);}logger[_0x84c6('0x17')]('User,\x20%s,\x20%s',_0x5d2fad,_0x2d51c9[_0x84c6('0x17')][_0x84c6('0x19')]);return _0x3f156d(_0x2d51c9['error'][_0x84c6('0x19')]);}else{logger['info'](_0x84c6('0x18'),_0x5d2fad,'request\x20sent');_0x3f156d(_0x2d51c9[_0x84c6('0x1a')][_0x84c6('0x19')]);}})[_0x84c6('0x1b')](function(_0x4430de){logger[_0x84c6('0x17')](_0x84c6('0x18'),_0x5d2fad,_0x4430de);_0x523dd1(_0x4430de);});});}exports[_0x84c6('0x1c')]=function(_0x16a9da){var _0x43fc35=this;return new Promise(function(_0xb7bf67,_0x593e8f){return db[_0x84c6('0x1d')][_0x84c6('0x1e')]({'raw':_0x16a9da[_0x84c6('0x1f')]?_0x16a9da[_0x84c6('0x1f')][_0x84c6('0x20')]===undefined?!![]:![]:!![],'where':_0x16a9da[_0x84c6('0x1f')]?_0x16a9da[_0x84c6('0x1f')]['where']||null:null,'attributes':_0x16a9da[_0x84c6('0x1f')]?_0x16a9da['options'][_0x84c6('0x21')]||null:null,'limit':_0x16a9da['options']?_0x16a9da[_0x84c6('0x1f')]['limit']||null:null,'include':_0x16a9da[_0x84c6('0x1f')]?_0x16a9da[_0x84c6('0x1f')][_0x84c6('0x22')]?_[_0x84c6('0x23')](_0x16a9da['options']['include'],function(_0x163a8e){return{'model':db[_0x163a8e[_0x84c6('0x24')]],'as':_0x163a8e['as'],'attributes':_0x163a8e['attributes'],'include':_0x163a8e['include']?_['map'](_0x163a8e['include'],function(_0x1163ac){return{'model':db[_0x1163ac[_0x84c6('0x24')]],'as':_0x1163ac['as'],'attributes':_0x1163ac[_0x84c6('0x21')],'include':_0x1163ac[_0x84c6('0x22')]?_[_0x84c6('0x23')](_0x1163ac[_0x84c6('0x22')],function(_0x3c9d66){return{'model':db[_0x3c9d66['model']],'as':_0x3c9d66['as'],'attributes':_0x3c9d66[_0x84c6('0x21')]};}):[]};}):[]};}):[]:[]})[_0x84c6('0x25')](function(_0x229fbf){logger[_0x84c6('0x26')](_0x84c6('0x1c'),_0x16a9da);logger[_0x84c6('0x14')](_0x84c6('0x1c'),_0x16a9da,JSON[_0x84c6('0x16')](_0x229fbf));_0xb7bf67(_0x229fbf);})['catch'](function(_0x49f4b0){logger[_0x84c6('0x17')](_0x84c6('0x1c'),_0x49f4b0[_0x84c6('0x19')],_0x16a9da);_0x593e8f(_0x43fc35['error'](0x1f4,_0x49f4b0['message']));});});};exports[_0x84c6('0x27')]=function(_0x3b95ec){var _0x5c989c=this;return new Promise(function(_0x2f68c0,_0x422860){return db[_0x84c6('0x1d')][_0x84c6('0x28')]({'raw':_0x3b95ec[_0x84c6('0x1f')]?_0x3b95ec[_0x84c6('0x1f')]['raw']===undefined?!![]:![]:!![],'where':_0x3b95ec['options']?_0x3b95ec[_0x84c6('0x1f')][_0x84c6('0x29')]||null:null,'attributes':_0x3b95ec[_0x84c6('0x1f')]?_0x3b95ec[_0x84c6('0x1f')]['attributes']||null:null,'include':_0x3b95ec[_0x84c6('0x1f')]?_0x3b95ec[_0x84c6('0x1f')][_0x84c6('0x22')]?_[_0x84c6('0x23')](_0x3b95ec[_0x84c6('0x1f')][_0x84c6('0x22')],function(_0x430d76){return{'model':db[_0x430d76[_0x84c6('0x24')]],'as':_0x430d76['as'],'attributes':_0x430d76[_0x84c6('0x21')],'include':_0x430d76[_0x84c6('0x22')]?_[_0x84c6('0x23')](_0x430d76[_0x84c6('0x22')],function(_0xb1be83){return{'model':db[_0xb1be83[_0x84c6('0x24')]],'as':_0xb1be83['as'],'attributes':_0xb1be83[_0x84c6('0x21')],'include':_0xb1be83[_0x84c6('0x22')]?_[_0x84c6('0x23')](_0xb1be83[_0x84c6('0x22')],function(_0x58bad1){return{'model':db[_0x58bad1['model']],'as':_0x58bad1['as'],'attributes':_0x58bad1[_0x84c6('0x21')]};}):[]};}):[]};}):[]:[]})[_0x84c6('0x25')](function(_0x9f4f0d){logger[_0x84c6('0x26')](_0x84c6('0x27'),_0x3b95ec);logger['debug'](_0x84c6('0x27'),_0x3b95ec,JSON[_0x84c6('0x16')](_0x9f4f0d));_0x2f68c0(_0x9f4f0d);})[_0x84c6('0x1b')](function(_0xaad9b5){logger[_0x84c6('0x17')]('ShowUser',_0xaad9b5[_0x84c6('0x19')],_0x3b95ec);_0x422860(_0x5c989c[_0x84c6('0x17')](0x1f4,_0xaad9b5[_0x84c6('0x19')]));});});};exports[_0x84c6('0x2a')]=function(_0x5822be){var _0x4b3ba1=this;return new Promise(function(_0x6ba44,_0x45c84d){var _0x17d71c;return db[_0x84c6('0x1d')][_0x84c6('0x28')]({'where':_0x5822be[_0x84c6('0x1f')][_0x84c6('0x29')]||{},'attributes':['id',_0x84c6('0x2b'),_0x84c6('0x2c'),_0x84c6('0x2d'),_0x84c6('0x2e')]})[_0x84c6('0x25')](function(_0x476259){if(_0x476259){_0x17d71c=_0x476259;return db[_0x84c6('0x2f')][_0x84c6('0x30')]({'paused':0x1},{'where':{'UserId':_0x17d71c['id']},'individualHooks':!![]});}})['then'](function(){if(_0x17d71c){return db['MemberReport']['findAll']({'where':{'membername':_0x17d71c[_0x84c6('0x2b')],'type':_0x84c6('0x31'),'exitAt':null}});}})[_0x84c6('0x25')](function(_0x1f91a5){if(_0x17d71c){if(_0x1f91a5&&_0x1f91a5[_0x84c6('0x32')]){var _0x2a54e1=moment()[_0x84c6('0x33')](_0x84c6('0x34'));for(var _0x1989f6=0x0,_0x376b3b=_0x1f91a5[_0x84c6('0x32')];_0x1989f6<_0x376b3b;_0x1989f6++){_0x1f91a5[_0x1989f6][_0x84c6('0x35')]({'exitAt':_0x2a54e1});}}}})[_0x84c6('0x25')](function(){if(_0x17d71c){var _0x31cbd9=[];var _0x3d46e0=utils['getChannels']();_0x3d46e0[_0x84c6('0x36')](function(_0x2835e7){_0x31cbd9[_0x84c6('0x37')]({'channel':_0x2835e7,'membername':_0x17d71c['name'],'interface':_[_0x84c6('0x38')](_0x17d71c[_0x84c6('0x2e')])?util[_0x84c6('0x33')](_0x84c6('0x39'),_0x17d71c[_0x84c6('0x2b')]):_0x17d71c['interface'],'type':_0x84c6('0x31'),'enterAt':moment()[_0x84c6('0x33')](_0x84c6('0x34')),'data1':_0x5822be['body'][_0x84c6('0x3a')]||_0x84c6('0x3b'),'role':_0x17d71c[_0x84c6('0x2c')],'internal':_0x17d71c[_0x84c6('0x2d')],'uniqueid':_0x5822be[_0x84c6('0x3c')]['uniqueid']||null});});return db[_0x84c6('0x3d')][_0x84c6('0x3e')](_0x31cbd9,{'individualHooks':!![]});}})[_0x84c6('0x25')](function(){if(_0x17d71c){return _0x17d71c[_0x84c6('0x30')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'pauseType':_0x5822be['body'][_0x84c6('0x3a')]||_0x84c6('0x3b'),'lastPauseAt':moment()[_0x84c6('0x33')](_0x84c6('0x34'))});}})[_0x84c6('0x25')](function(_0x5cac05){_0x6ba44(_0x5cac05);})[_0x84c6('0x1b')](function(_0x5ce81d){_0x45c84d(_0x4b3ba1[_0x84c6('0x17')](0x1f4,_0x5ce81d[_0x84c6('0x19')]));});});};exports[_0x84c6('0x3f')]=function(_0x2b1d8c){var _0x30c081=this;return new Promise(function(_0x15c694,_0x8d9b7a){var _0x2d3392;return db['User']['findOne']({'where':_0x2b1d8c[_0x84c6('0x1f')][_0x84c6('0x29')]||{},'attributes':['id','name']})[_0x84c6('0x25')](function(_0x51c08b){if(_0x51c08b){_0x2d3392=_0x51c08b;if(_0x2b1d8c[_0x84c6('0x3c')][_0x84c6('0x40')]&&!utils['isValidChannel'](_0x2b1d8c['body'][_0x84c6('0x40')])){throw new Error('Unknown\x20channel');}switch(_0x2b1d8c[_0x84c6('0x3c')][_0x84c6('0x40')]){case _0x84c6('0x41'):return db[_0x84c6('0x2f')][_0x84c6('0x30')]({'paused':0x0},{'where':{'UserId':_0x2d3392['id']}})[_0x84c6('0x25')](function(){return db[_0x84c6('0x3d')][_0x84c6('0x28')]({'where':{'channel':_0x2b1d8c[_0x84c6('0x3c')][_0x84c6('0x40')],'membername':_0x2d3392[_0x84c6('0x2b')],'type':_0x84c6('0x31'),'exitAt':null}});})[_0x84c6('0x25')](function(_0x27a0ff){if(_0x27a0ff){return _0x27a0ff[_0x84c6('0x30')]({'exitAt':moment()[_0x84c6('0x33')](_0x84c6('0x34')),'data2':'system'},{'individualHooks':!![]});}return null;})['then'](function(){return _0x2d3392['update']({'voicePause':![]});});case _0x84c6('0x42'):case _0x84c6('0x43'):case _0x84c6('0x44'):case'sms':case _0x84c6('0x45'):return db[_0x84c6('0x3d')][_0x84c6('0x28')]({'where':{'channel':_0x2b1d8c[_0x84c6('0x3c')][_0x84c6('0x40')],'membername':_0x2d3392[_0x84c6('0x2b')],'type':_0x84c6('0x31'),'exitAt':null}})[_0x84c6('0x25')](function(_0x93526b){return _0x93526b['update']({'exitAt':moment()[_0x84c6('0x33')](_0x84c6('0x34')),'data2':_0x84c6('0x46')},{'individualHooks':!![]});})[_0x84c6('0x25')](function(){var _0x13e421={};_[_0x84c6('0x47')](_0x13e421,util[_0x84c6('0x33')](_0x84c6('0x48'),_0x2b1d8c[_0x84c6('0x3c')][_0x84c6('0x40')],_0x84c6('0x49')),![]);return _0x2d3392[_0x84c6('0x30')](_0x13e421);});default:return db[_0x84c6('0x2f')][_0x84c6('0x30')]({'paused':0x0},{'where':{'UserId':_0x2d3392['id']}})[_0x84c6('0x25')](function(){return db[_0x84c6('0x3d')][_0x84c6('0x1e')]({'where':{'membername':_0x2d3392[_0x84c6('0x2b')],'type':_0x84c6('0x31'),'exitAt':null}});})[_0x84c6('0x25')](function(_0xd1cfd7){var _0x1c9ee7=[];_0xd1cfd7[_0x84c6('0x36')](function(_0x44da96){_0x1c9ee7['push'](_0x44da96[_0x84c6('0x30')]({'exitAt':moment()[_0x84c6('0x33')](_0x84c6('0x34')),'data2':_0x84c6('0x46')}));});return BPromise[_0x84c6('0x4a')](_0x1c9ee7);})[_0x84c6('0x25')](function(){return _0x2d3392[_0x84c6('0x30')]({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});});}}})[_0x84c6('0x25')](function(_0x1b5d91){_0x15c694(_0x1b5d91);})[_0x84c6('0x1b')](function(_0x312d9c){_0x8d9b7a(_0x30c081['error'](0x1f4,_0x312d9c[_0x84c6('0x19')]));});});};exports[_0x84c6('0x4b')]=function(_0x511b64){var _0x5c5ca5=this;return new Promise(function(_0x52ffb6,_0x50da6a){var _0x3d9352;return db['User']['findOne']({'where':_0x511b64[_0x84c6('0x1f')][_0x84c6('0x29')]||{},'attributes':['id',_0x84c6('0x2b')]})['then'](function(_0x3d23bc){if(_0x3d23bc){_0x3d9352=_0x3d23bc;return db[_0x84c6('0x2f')][_0x84c6('0x4c')]({'where':{'membername':_0x3d9352[_0x84c6('0x2b')]},'individualHooks':!![]});}})['then'](function(){if(_0x3d9352){return db[_0x84c6('0x3d')]['findAll']({'where':{'membername':_0x3d9352[_0x84c6('0x2b')],'exitAt':null}});}})[_0x84c6('0x25')](function(_0x24ca3c){if(_0x3d9352){if(_0x24ca3c&&_0x24ca3c['length']){var _0x3d08ab=[];_0x24ca3c['forEach'](function(_0x2171d3){_0x3d08ab[_0x84c6('0x37')](_0x2171d3['update']({'exitAt':moment()[_0x84c6('0x33')](_0x84c6('0x34'))}));});return BPromise['all'](_0x3d08ab);}}})[_0x84c6('0x25')](function(){if(_0x3d9352){return _0x3d9352['update']({'online':![],'lastLoginAt':null,'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})[_0x84c6('0x25')](function(_0x2d1e84){_0x52ffb6(_0x2d1e84);})[_0x84c6('0x1b')](function(_0x22b872){_0x50da6a(_0x5c5ca5['error'](0x1f4,_0x22b872['message']));});});};exports['LoginUser']=function(_0x205da3){var _0x170b16=this;return new Promise(function(_0x58e284,_0x194d84){var _0x280c8a;var _0x5e4a37;var _0x4b694c;var _0x1c650f;return db[_0x84c6('0x1d')][_0x84c6('0x4d')]({'where':_0x205da3[_0x84c6('0x1f')][_0x84c6('0x29')]||{},'attributes':['id',_0x84c6('0x2b'),_0x84c6('0x2c'),_0x84c6('0x4e'),_0x84c6('0x4f'),_0x84c6('0x2d'),_0x84c6('0x50'),_0x84c6('0x2e')]})[_0x84c6('0x25')](function(_0x2d370c){if(_0x2d370c){_0x280c8a=_0x2d370c;_0x1c650f=_0x205da3['body']['interface']?_0x205da3[_0x84c6('0x3c')]['interface']:util[_0x84c6('0x33')](_0x84c6('0x39'),_0x280c8a[_0x84c6('0x2b')]);return db['User'][_0x84c6('0x51')]({'where':{'role':'agent','online':!![],'id':{'$ne':_0x280c8a['id']}}});}})['then'](function(_0x70b39f){if(_0x70b39f){_0x4b694c=_0x70b39f;return require(_0x84c6('0x52'))[_0x84c6('0x53')]();}})['then'](function(_0x1cef52){if(_0x1cef52&&_0x1cef52[_0x84c6('0x54')]&&_0x4b694c>=_0x1cef52[_0x84c6('0x54')]){throw new Error(_0x84c6('0x55'));}})[_0x84c6('0x25')](function(){if(_0x280c8a){return db[_0x84c6('0x2f')][_0x84c6('0x4c')]({'where':{'membername':_0x280c8a[_0x84c6('0x2b')]},'individualHooks':!![]});}})[_0x84c6('0x25')](function(){if(_0x280c8a){return _0x280c8a[_0x84c6('0x56')]({'raw':!![]});}})[_0x84c6('0x25')](function(_0x3fcfad){if(_0x280c8a){if(_0x3fcfad){var _0x524352=[];_0x5e4a37=_0x3fcfad;if(_0x5e4a37[_0x84c6('0x32')]){for(var _0x31c620=0x0;_0x31c620<_0x5e4a37['length'];_0x31c620++){_0x524352[_0x84c6('0x37')](db[_0x84c6('0x2f')]['upsert']({'membername':_0x280c8a[_0x84c6('0x2b')],'UserId':_0x280c8a['id'],'queue_name':_0x5e4a37[_0x31c620][_0x84c6('0x2b')],'VoiceQueueId':_0x5e4a37[_0x31c620]['id'],'interface':_0x1c650f,'paused':_0x280c8a[_0x84c6('0x50')]||![],'penalty':_0x5e4a37[_0x31c620]['UserVoiceQueue.penalty']||0x0}));}return BPromise['all'](_0x524352);}}}})['then'](function(){if(_0x280c8a){return db['MemberReport'][_0x84c6('0x1e')]({'where':{'membername':_0x280c8a[_0x84c6('0x2b')],'exitAt':null}});}})[_0x84c6('0x25')](function(_0x4c8ac1){if(_0x280c8a){if(_0x4c8ac1&&_0x4c8ac1[_0x84c6('0x32')]){var _0x2e0d54=[];_0x4c8ac1[_0x84c6('0x36')](function(_0x6332f8){_0x2e0d54[_0x84c6('0x37')](_0x6332f8[_0x84c6('0x30')]({'exitAt':moment()[_0x84c6('0x33')](_0x84c6('0x34'))}));});return BPromise[_0x84c6('0x4a')](_0x2e0d54);}}})['then'](function(_0xa07239){if(_0x280c8a){var _0x5a4cf0=[];var _0x2d7db8=[];var _0x512f95=utils['getChannels']();var _0x5df61d={'membername':_0x280c8a[_0x84c6('0x2b')],'interface':_0x1c650f,'enterAt':moment()[_0x84c6('0x33')](_0x84c6('0x34')),'role':_0x280c8a[_0x84c6('0x2c')],'internal':_0x280c8a[_0x84c6('0x2d')]};_0x512f95[_0x84c6('0x36')](function(_0x44f672){_0x5a4cf0[_0x84c6('0x37')](_[_0x84c6('0x57')]({'channel':_0x44f672,'type':'LOGIN','data1':'callysquare','data2':_0x1c650f},_0x5df61d));if(_0x280c8a['loginInPause']){_0x2d7db8['push'](_[_0x84c6('0x57')]({'channel':_0x44f672,'type':_0x84c6('0x31'),'data1':_0x84c6('0x58')},_0x5df61d));}});return db[_0x84c6('0x3d')][_0x84c6('0x3e')](_0x5a4cf0[_0x84c6('0x59')](_0x2d7db8),{'individualHooks':!![]});}})['then'](function(){if(_0x280c8a){return _0x280c8a['update']({'online':!![],'lastLoginAt':moment()[_0x84c6('0x33')](_0x84c6('0x34')),'voicePause':_0x280c8a[_0x84c6('0x50')]||![],'mailPause':_0x280c8a[_0x84c6('0x50')]||![],'chatPause':_0x280c8a[_0x84c6('0x50')]||![],'faxPause':_0x280c8a[_0x84c6('0x50')]||![],'smsPause':_0x280c8a[_0x84c6('0x50')]||![],'openchannelPause':_0x280c8a['loginInPause']||![],'pauseType':_0x280c8a['loginInPause']?_0x84c6('0x58'):null,'lastPauseAt':moment()[_0x84c6('0x33')](_0x84c6('0x34')),'interface':_0x1c650f});}})['then'](function(_0xb352f2){_0x58e284(_0xb352f2);})['catch'](function(_0x1149e0){_0x194d84(_0x170b16[_0x84c6('0x17')](0x1f4,_0x1149e0[_0x84c6('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js
index 643bd26..8e9771c 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 _0xf45c=['remove','update','register','length','user:','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf45c,0xbf));var _0xcf45=function(_0x205907,_0x3a6a95){_0x205907=_0x205907-0x0;var _0x2b6c5e=_0xf45c[_0x205907];return _0x2b6c5e;};'use strict';var UserEvents=require('./user.events');var events=[_0xcf45('0x0'),_0xcf45('0x1'),_0xcf45('0x2')];function createListener(_0x1910ed,_0x4d9a54){return function(_0x79723b){_0x4d9a54['emit'](_0x1910ed,_0x79723b);};}function removeListener(_0x41c072,_0x29b9f5){return function(){UserEvents['removeListener'](_0x41c072,_0x29b9f5);};}exports[_0xcf45('0x3')]=function(_0x16d468){for(var _0x4dff8b=0x0,_0x315aaa=events[_0xcf45('0x4')];_0x4dff8b<_0x315aaa;_0x4dff8b++){var _0x49da34=events[_0x4dff8b];var _0x28c7ca=createListener(_0xcf45('0x5')+_0x49da34,_0x16d468);UserEvents['on'](_0x49da34,_0x28c7ca);}};
\ No newline at end of file
+var _0xc806=['remove','update','emit','removeListener','register','length','user:','./user.events','save'];(function(_0x425003,_0x1eee3b){var _0x3f2f77=function(_0x56ddd2){while(--_0x56ddd2){_0x425003['push'](_0x425003['shift']());}};_0x3f2f77(++_0x1eee3b);}(_0xc806,0xcd));var _0x6c80=function(_0x3cbf49,_0x53f013){_0x3cbf49=_0x3cbf49-0x0;var _0x57e3fd=_0xc806[_0x3cbf49];return _0x57e3fd;};'use strict';var UserEvents=require(_0x6c80('0x0'));var events=[_0x6c80('0x1'),_0x6c80('0x2'),_0x6c80('0x3')];function createListener(_0x4a251c,_0x1e37e8){return function(_0x51e820){_0x1e37e8[_0x6c80('0x4')](_0x4a251c,_0x51e820);};}function removeListener(_0x2398ed,_0x4a884f){return function(){UserEvents[_0x6c80('0x5')](_0x2398ed,_0x4a884f);};}exports[_0x6c80('0x6')]=function(_0x4be155){for(var _0x1a1e47=0x0,_0x1bb9f5=events[_0x6c80('0x7')];_0x1a1e47<_0x1bb9f5;_0x1a1e47++){var _0x3e9bbf=events[_0x1a1e47];var _0x46c757=createListener(_0x6c80('0x8')+_0x3e9bbf,_0x4be155);UserEvents['on'](_0x3e9bbf,_0x46c757);}};
\ No newline at end of file
diff --git a/server/api/userChatQueue/index.js b/server/api/userChatQueue/index.js
index b69cd60..3bb044b 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 _0x6940=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x6940,0xbe));var _0x0694=function(_0x4349ef,_0x7f68e5){_0x4349ef=_0x4349ef-0x0;var _0x2e1477=_0x6940[_0x4349ef];return _0x2e1477;};'use strict';var multer=require(_0x0694('0x0'));var util=require(_0x0694('0x1'));var path=require(_0x0694('0x2'));var timeout=require(_0x0694('0x3'));var express=require(_0x0694('0x4'));var router=express[_0x0694('0x5')]();var auth=require(_0x0694('0x6'));var interaction=require(_0x0694('0x7'));var config=require('../../config/environment');module[_0x0694('0x8')]=router;
\ No newline at end of file
+var _0x8959=['multer','path','express','../../components/auth/service'];(function(_0x47a528,_0x59567c){var _0x627777=function(_0x59fcc5){while(--_0x59fcc5){_0x47a528['push'](_0x47a528['shift']());}};_0x627777(++_0x59567c);}(_0x8959,0x8c));var _0x9895=function(_0x12a2a6,_0x374ff1){_0x12a2a6=_0x12a2a6-0x0;var _0x1754ae=_0x8959[_0x12a2a6];return _0x1754ae;};'use strict';var multer=require(_0x9895('0x0'));var util=require('util');var path=require(_0x9895('0x1'));var timeout=require('connect-timeout');var express=require(_0x9895('0x2'));var router=express['Router']();var auth=require(_0x9895('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module['exports']=router;
\ No newline at end of file
diff --git a/server/api/userChatQueue/userChatQueue.attributes.js b/server/api/userChatQueue/userChatQueue.attributes.js
index 2c444fc..648bda1 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 _0xa9e0=['sequelize','exports','INTEGER'];(function(_0x47a2f8,_0x2ff801){var _0x56fd7f=function(_0x2050fd){while(--_0x2050fd){_0x47a2f8['push'](_0x47a2f8['shift']());}};_0x56fd7f(++_0x2ff801);}(_0xa9e0,0x123));var _0x0a9e=function(_0x102e37,_0x14a181){_0x102e37=_0x102e37-0x0;var _0x35a07c=_0xa9e0[_0x102e37];return _0x35a07c;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'penalty':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xe706=['INTEGER','sequelize','exports'];(function(_0x918a7a,_0x86b1fd){var _0x2a7fdc=function(_0x34c20c){while(--_0x34c20c){_0x918a7a['push'](_0x918a7a['shift']());}};_0x2a7fdc(++_0x86b1fd);}(_0xe706,0xa3));var _0x6e70=function(_0x47ee00,_0x256539){_0x47ee00=_0x47ee00-0x0;var _0x3d35f9=_0xe706[_0x47ee00];return _0x3d35f9;};'use strict';var Sequelize=require(_0x6e70('0x0'));module[_0x6e70('0x1')]={'penalty':{'type':Sequelize[_0x6e70('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 8bcf3f9..189677e 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 _0x5e17=['moment','request-promise','../../config/environment','exports','define','UserChatQueue','lodash','util','../../config/logger','api'];(function(_0x37ace5,_0x5546de){var _0x235299=function(_0x149321){while(--_0x149321){_0x37ace5['push'](_0x37ace5['shift']());}};_0x235299(++_0x5546de);}(_0x5e17,0x1a0));var _0x75e1=function(_0x3fd7a6,_0xf0644c){_0x3fd7a6=_0x3fd7a6-0x0;var _0x4d689d=_0x5e17[_0x3fd7a6];return _0x4d689d;};'use strict';var _=require(_0x75e1('0x0'));var util=require(_0x75e1('0x1'));var logger=require(_0x75e1('0x2'))(_0x75e1('0x3'));var moment=require(_0x75e1('0x4'));var BPromise=require('bluebird');var rp=require(_0x75e1('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x75e1('0x6'));var attributes=require('./userChatQueue.attributes');module[_0x75e1('0x7')]=function(_0x25864f,_0x415af3){return _0x25864f[_0x75e1('0x8')](_0x75e1('0x9'),attributes,{'tableName':'user_has_chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4fd6=['define','UserChatQueue','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userChatQueue.attributes','exports'];(function(_0x2601b4,_0x315e78){var _0x3e3661=function(_0x13b45b){while(--_0x13b45b){_0x2601b4['push'](_0x2601b4['shift']());}};_0x3e3661(++_0x315e78);}(_0x4fd6,0x84));var _0x64fd=function(_0x1e399a,_0x351c59){_0x1e399a=_0x1e399a-0x0;var _0x539897=_0x4fd6[_0x1e399a];return _0x539897;};'use strict';var _=require(_0x64fd('0x0'));var util=require(_0x64fd('0x1'));var logger=require(_0x64fd('0x2'))('api');var moment=require(_0x64fd('0x3'));var BPromise=require(_0x64fd('0x4'));var rp=require(_0x64fd('0x5'));var fs=require('fs');var path=require(_0x64fd('0x6'));var rimraf=require(_0x64fd('0x7'));var config=require(_0x64fd('0x8'));var attributes=require(_0x64fd('0x9'));module[_0x64fd('0xa')]=function(_0x251af3,_0x308637){return _0x251af3[_0x64fd('0xb')](_0x64fd('0xc'),attributes,{'tableName':'user_has_chat_queues','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 83b9a14..a28d90e 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 _0xd5b9=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','UserChatQueue,\x20%s,\x20%s','debug','stringify','error','message','request\x20sent','result','catch'];(function(_0x1ad585,_0x2b92b3){var _0x3c0732=function(_0x424334){while(--_0x424334){_0x1ad585['push'](_0x1ad585['shift']());}};_0x3c0732(++_0x2b92b3);}(_0xd5b9,0xa8));var _0x9d5b=function(_0x3717f2,_0x52e8d3){_0x3717f2=_0x3717f2-0x0;var _0x4efb04=_0xd5b9[_0x3717f2];return _0x4efb04;};'use strict';var _=require(_0x9d5b('0x0'));var util=require(_0x9d5b('0x1'));var moment=require(_0x9d5b('0x2'));var BPromise=require(_0x9d5b('0x3'));var rs=require(_0x9d5b('0x4'));var fs=require('fs');var Redis=require(_0x9d5b('0x5'));var db=require(_0x9d5b('0x6'))['db'];var utils=require(_0x9d5b('0x7'));var logger=require(_0x9d5b('0x8'))(_0x9d5b('0x9'));var config=require(_0x9d5b('0xa'));var jayson=require(_0x9d5b('0xb'));var client=jayson[_0x9d5b('0xc')][_0x9d5b('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x3eaef4,_0x57455b,_0x1910a4){return new BPromise(function(_0x668a3d,_0x3c2184){return client[_0x9d5b('0xe')](_0x3eaef4,_0x1910a4)['then'](function(_0x538ec0){logger[_0x9d5b('0xf')](_0x9d5b('0x10'),_0x57455b,'request\x20sent');logger[_0x9d5b('0x11')]('UserChatQueue,\x20%s,\x20%s,\x20%s',_0x57455b,'request\x20sent',JSON[_0x9d5b('0x12')](_0x538ec0));if(_0x538ec0[_0x9d5b('0x13')]){if(_0x538ec0['error']['code']===0x1f4){logger[_0x9d5b('0x13')](_0x9d5b('0x10'),_0x57455b,_0x538ec0[_0x9d5b('0x13')][_0x9d5b('0x14')]);return _0x3c2184(_0x538ec0['error']['message']);}logger[_0x9d5b('0x13')](_0x9d5b('0x10'),_0x57455b,_0x538ec0[_0x9d5b('0x13')][_0x9d5b('0x14')]);return _0x668a3d(_0x538ec0[_0x9d5b('0x13')]['message']);}else{logger['info'](_0x9d5b('0x10'),_0x57455b,_0x9d5b('0x15'));_0x668a3d(_0x538ec0[_0x9d5b('0x16')]['message']);}})[_0x9d5b('0x17')](function(_0x9ff40){logger[_0x9d5b('0x13')](_0x9d5b('0x10'),_0x57455b,_0x9ff40);_0x3c2184(_0x9ff40);});});}
\ No newline at end of file
+var _0x82d6=['message','result','catch','moment','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','request','then','info','UserChatQueue,\x20%s,\x20%s','debug','UserChatQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x2683a4,_0x25049e){var _0x2eebcb=function(_0x4262d6){while(--_0x4262d6){_0x2683a4['push'](_0x2683a4['shift']());}};_0x2eebcb(++_0x25049e);}(_0x82d6,0x157));var _0x682d=function(_0x56a824,_0x2af2af){_0x56a824=_0x56a824-0x0;var _0x366399=_0x82d6[_0x56a824];return _0x366399;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x682d('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x682d('0x1'));var db=require(_0x682d('0x2'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x682d('0x3'));var config=require(_0x682d('0x4'));var jayson=require(_0x682d('0x5'));var client=jayson[_0x682d('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x11e466,_0xb6759,_0x1402c0){return new BPromise(function(_0x4fe570,_0x227caa){return client[_0x682d('0x7')](_0x11e466,_0x1402c0)[_0x682d('0x8')](function(_0x2c6b05){logger[_0x682d('0x9')](_0x682d('0xa'),_0xb6759,'request\x20sent');logger[_0x682d('0xb')](_0x682d('0xc'),_0xb6759,_0x682d('0xd'),JSON[_0x682d('0xe')](_0x2c6b05));if(_0x2c6b05[_0x682d('0xf')]){if(_0x2c6b05[_0x682d('0xf')][_0x682d('0x10')]===0x1f4){logger['error'](_0x682d('0xa'),_0xb6759,_0x2c6b05[_0x682d('0xf')][_0x682d('0x11')]);return _0x227caa(_0x2c6b05[_0x682d('0xf')][_0x682d('0x11')]);}logger[_0x682d('0xf')]('UserChatQueue,\x20%s,\x20%s',_0xb6759,_0x2c6b05['error']['message']);return _0x4fe570(_0x2c6b05[_0x682d('0xf')][_0x682d('0x11')]);}else{logger[_0x682d('0x9')](_0x682d('0xa'),_0xb6759,_0x682d('0xd'));_0x4fe570(_0x2c6b05[_0x682d('0x12')]['message']);}})[_0x682d('0x13')](function(_0x388df1){logger['error'](_0x682d('0xa'),_0xb6759,_0x388df1);_0x227caa(_0x388df1);});});}
\ No newline at end of file
diff --git a/server/api/userFaxQueue/index.js b/server/api/userFaxQueue/index.js
index d48a2e2..7460cdc 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 _0xd273=['exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x4e1205,_0xb52446){var _0x180e0b=function(_0x3f175e){while(--_0x3f175e){_0x4e1205['push'](_0x4e1205['shift']());}};_0x180e0b(++_0xb52446);}(_0xd273,0xe2));var _0x3d27=function(_0x5060f1,_0x5705cd){_0x5060f1=_0x5060f1-0x0;var _0x483a73=_0xd273[_0x5060f1];return _0x483a73;};'use strict';var multer=require(_0x3d27('0x0'));var util=require(_0x3d27('0x1'));var path=require(_0x3d27('0x2'));var timeout=require(_0x3d27('0x3'));var express=require(_0x3d27('0x4'));var router=express['Router']();var auth=require(_0x3d27('0x5'));var interaction=require(_0x3d27('0x6'));var config=require(_0x3d27('0x7'));module[_0x3d27('0x8')]=router;
\ No newline at end of file
+var _0x7953=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','exports','multer','path','connect-timeout'];(function(_0x7bd1f3,_0x478a3f){var _0x1a0d34=function(_0x403bd9){while(--_0x403bd9){_0x7bd1f3['push'](_0x7bd1f3['shift']());}};_0x1a0d34(++_0x478a3f);}(_0x7953,0x1a5));var _0x3795=function(_0xcf7d1e,_0x1b00ad){_0xcf7d1e=_0xcf7d1e-0x0;var _0x42b2cb=_0x7953[_0xcf7d1e];return _0x42b2cb;};'use strict';var multer=require(_0x3795('0x0'));var util=require('util');var path=require(_0x3795('0x1'));var timeout=require(_0x3795('0x2'));var express=require('express');var router=express[_0x3795('0x3')]();var auth=require(_0x3795('0x4'));var interaction=require(_0x3795('0x5'));var config=require(_0x3795('0x6'));module[_0x3795('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 fbd5e47..bc7ae2a 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 _0xd7d1=['exports','INTEGER','STRING','sequelize'];(function(_0x2998ef,_0x42bb6c){var _0x194a75=function(_0x52424e){while(--_0x52424e){_0x2998ef['push'](_0x2998ef['shift']());}};_0x194a75(++_0x42bb6c);}(_0xd7d1,0x1b3));var _0x1d7d=function(_0x2c32b4,_0x4d7b78){_0x2c32b4=_0x2c32b4-0x0;var _0x42c9dc=_0xd7d1[_0x2c32b4];return _0x42c9dc;};'use strict';var Sequelize=require(_0x1d7d('0x0'));module[_0x1d7d('0x1')]={'penalty':{'type':Sequelize[_0x1d7d('0x2')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x1d7d('0x2')],'defaultValue':0x0},'queue':{'type':Sequelize[_0x1d7d('0x3')]}};
\ No newline at end of file
+var _0x0598=['exports','INTEGER','sequelize'];(function(_0x454018,_0x46e33a){var _0x24697d=function(_0x3ec647){while(--_0x3ec647){_0x454018['push'](_0x454018['shift']());}};_0x24697d(++_0x46e33a);}(_0x0598,0x92));var _0x8059=function(_0x5232ba,_0x5adb17){_0x5232ba=_0x5232ba-0x0;var _0x296532=_0x0598[_0x5232ba];return _0x296532;};'use strict';var Sequelize=require(_0x8059('0x0'));module[_0x8059('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x8059('0x2')],'defaultValue':0x0},'queue':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/userFaxQueue/userFaxQueue.model.js b/server/api/userFaxQueue/userFaxQueue.model.js
index 242bb53..ff05fd6 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 _0xa004=['./userFaxQueue.attributes','exports','define','user_has_fax_queues','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x140812,_0x4da0cd){var _0x73ceac=function(_0x52a391){while(--_0x52a391){_0x140812['push'](_0x140812['shift']());}};_0x73ceac(++_0x4da0cd);}(_0xa004,0x143));var _0x4a00=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa004[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x4a00('0x0'))('api');var moment=require(_0x4a00('0x1'));var BPromise=require(_0x4a00('0x2'));var rp=require(_0x4a00('0x3'));var fs=require('fs');var path=require(_0x4a00('0x4'));var rimraf=require(_0x4a00('0x5'));var config=require(_0x4a00('0x6'));var attributes=require(_0x4a00('0x7'));module[_0x4a00('0x8')]=function(_0x1261ae,_0x573dda){return _0x1261ae[_0x4a00('0x9')]('UserFaxQueue',attributes,{'tableName':_0x4a00('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbe1e=['api','moment','bluebird','request-promise','path','UserFaxQueue','user_has_fax_queues','lodash','util'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xbe1e,0xb2));var _0xebe1=function(_0x2bded4,_0x5aa045){_0x2bded4=_0x2bded4-0x0;var _0x302c84=_0xbe1e[_0x2bded4];return _0x302c84;};'use strict';var _=require(_0xebe1('0x0'));var util=require(_0xebe1('0x1'));var logger=require('../../config/logger')(_0xebe1('0x2'));var moment=require(_0xebe1('0x3'));var BPromise=require(_0xebe1('0x4'));var rp=require(_0xebe1('0x5'));var fs=require('fs');var path=require(_0xebe1('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./userFaxQueue.attributes');module['exports']=function(_0x54b42d,_0x33cd8a){return _0x54b42d['define'](_0xebe1('0x7'),attributes,{'tableName':_0xebe1('0x8'),'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 2a4fabe..0f2e81c 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 _0x8cb6=['../../mysqldb','../../config/utils','jayson/promise','client','http','request','then','info','UserFaxQueue,\x20%s,\x20%s','request\x20sent','UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x43dcd9,_0x46c400){var _0x385d33=function(_0x3c9949){while(--_0x3c9949){_0x43dcd9['push'](_0x43dcd9['shift']());}};_0x385d33(++_0x46c400);}(_0x8cb6,0x1b3));var _0x68cb=function(_0x34361b,_0x9642d4){_0x34361b=_0x34361b-0x0;var _0x1de9c5=_0x8cb6[_0x34361b];return _0x1de9c5;};'use strict';var _=require(_0x68cb('0x0'));var util=require(_0x68cb('0x1'));var moment=require(_0x68cb('0x2'));var BPromise=require('bluebird');var rs=require(_0x68cb('0x3'));var fs=require('fs');var Redis=require(_0x68cb('0x4'));var db=require(_0x68cb('0x5'))['db'];var utils=require(_0x68cb('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x68cb('0x7'));var client=jayson[_0x68cb('0x8')][_0x68cb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xbc321c,_0x30a196,_0x212ca1){return new BPromise(function(_0x5aac76,_0x5c7e0d){return client[_0x68cb('0xa')](_0xbc321c,_0x212ca1)[_0x68cb('0xb')](function(_0x529247){logger[_0x68cb('0xc')](_0x68cb('0xd'),_0x30a196,_0x68cb('0xe'));logger['debug'](_0x68cb('0xf'),_0x30a196,_0x68cb('0xe'),JSON[_0x68cb('0x10')](_0x529247));if(_0x529247[_0x68cb('0x11')]){if(_0x529247['error']['code']===0x1f4){logger[_0x68cb('0x11')](_0x68cb('0xd'),_0x30a196,_0x529247[_0x68cb('0x11')]['message']);return _0x5c7e0d(_0x529247['error']['message']);}logger[_0x68cb('0x11')](_0x68cb('0xd'),_0x30a196,_0x529247[_0x68cb('0x11')][_0x68cb('0x12')]);return _0x5aac76(_0x529247[_0x68cb('0x11')][_0x68cb('0x12')]);}else{logger[_0x68cb('0xc')]('UserFaxQueue,\x20%s,\x20%s',_0x30a196,'request\x20sent');_0x5aac76(_0x529247['result'][_0x68cb('0x12')]);}})[_0x68cb('0x13')](function(_0x3fb4e4){logger[_0x68cb('0x11')](_0x68cb('0xd'),_0x30a196,_0x3fb4e4);_0x5c7e0d(_0x3fb4e4);});});}
\ No newline at end of file
+var _0xb758=['UserFaxQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','rpc','../../config/environment','client','http','request','then','info','UserFaxQueue,\x20%s,\x20%s','debug'];(function(_0x4172f0,_0x1a9bc8){var _0x4a56e4=function(_0x228c67){while(--_0x228c67){_0x4172f0['push'](_0x4172f0['shift']());}};_0x4a56e4(++_0x1a9bc8);}(_0xb758,0x14a));var _0x8b75=function(_0x403cff,_0x1cf463){_0x403cff=_0x403cff-0x0;var _0x5a7c56=_0xb758[_0x403cff];return _0x5a7c56;};'use strict';var _=require(_0x8b75('0x0'));var util=require(_0x8b75('0x1'));var moment=require(_0x8b75('0x2'));var BPromise=require(_0x8b75('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8b75('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8b75('0x5'));var logger=require('../../config/logger')(_0x8b75('0x6'));var config=require(_0x8b75('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x8b75('0x8')][_0x8b75('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2c9e1a,_0xaa3b53,_0x2a613b){return new BPromise(function(_0x46badf,_0xe55857){return client[_0x8b75('0xa')](_0x2c9e1a,_0x2a613b)[_0x8b75('0xb')](function(_0x137eb5){logger[_0x8b75('0xc')](_0x8b75('0xd'),_0xaa3b53,'request\x20sent');logger[_0x8b75('0xe')](_0x8b75('0xf'),_0xaa3b53,_0x8b75('0x10'),JSON[_0x8b75('0x11')](_0x137eb5));if(_0x137eb5[_0x8b75('0x12')]){if(_0x137eb5[_0x8b75('0x12')][_0x8b75('0x13')]===0x1f4){logger['error'](_0x8b75('0xd'),_0xaa3b53,_0x137eb5[_0x8b75('0x12')]['message']);return _0xe55857(_0x137eb5[_0x8b75('0x12')]['message']);}logger[_0x8b75('0x12')](_0x8b75('0xd'),_0xaa3b53,_0x137eb5[_0x8b75('0x12')][_0x8b75('0x14')]);return _0x46badf(_0x137eb5[_0x8b75('0x12')][_0x8b75('0x14')]);}else{logger[_0x8b75('0xc')]('UserFaxQueue,\x20%s,\x20%s',_0xaa3b53,_0x8b75('0x10'));_0x46badf(_0x137eb5[_0x8b75('0x15')][_0x8b75('0x14')]);}})[_0x8b75('0x16')](function(_0x1aed0a){logger[_0x8b75('0x12')](_0x8b75('0xd'),_0xaa3b53,_0x1aed0a);_0xe55857(_0x1aed0a);});});}
\ No newline at end of file
diff --git a/server/api/userMailQueue/index.js b/server/api/userMailQueue/index.js
index 6957ef2..0357227 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 _0x830a=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','connect-timeout'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x830a,0x1df));var _0xa830=function(_0x3617f9,_0x3ca449){_0x3617f9=_0x3617f9-0x0;var _0x1a3af3=_0x830a[_0x3617f9];return _0x1a3af3;};'use strict';var multer=require(_0xa830('0x0'));var util=require(_0xa830('0x1'));var path=require(_0xa830('0x2'));var timeout=require(_0xa830('0x3'));var express=require('express');var router=express['Router']();var auth=require(_0xa830('0x4'));var interaction=require(_0xa830('0x5'));var config=require('../../config/environment');module[_0xa830('0x6')]=router;
\ No newline at end of file
+var _0x65fd=['util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','exports','multer'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x65fd,0x116));var _0xd65f=function(_0x2b9bd6,_0x1d4770){_0x2b9bd6=_0x2b9bd6-0x0;var _0x51d506=_0x65fd[_0x2b9bd6];return _0x51d506;};'use strict';var multer=require(_0xd65f('0x0'));var util=require(_0xd65f('0x1'));var path=require(_0xd65f('0x2'));var timeout=require(_0xd65f('0x3'));var express=require(_0xd65f('0x4'));var router=express[_0xd65f('0x5')]();var auth=require(_0xd65f('0x6'));var interaction=require(_0xd65f('0x7'));var config=require('../../config/environment');module[_0xd65f('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/userMailQueue/userMailQueue.attributes.js b/server/api/userMailQueue/userMailQueue.attributes.js
index a6dabc4..f9915cd 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 _0xd8b0=['exports','sequelize'];(function(_0x313820,_0xb7fc83){var _0x31fbd4=function(_0x1eb1ba){while(--_0x1eb1ba){_0x313820['push'](_0x313820['shift']());}};_0x31fbd4(++_0xb7fc83);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xb10b=['sequelize','INTEGER'];(function(_0x20bddf,_0x2f8c4e){var _0x178f0a=function(_0x234fe7){while(--_0x234fe7){_0x20bddf['push'](_0x20bddf['shift']());}};_0x178f0a(++_0x2f8c4e);}(_0xb10b,0x12a));var _0xbb10=function(_0x56fbb6,_0x570f05){_0x56fbb6=_0x56fbb6-0x0;var _0x4e9a77=_0xb10b[_0x56fbb6];return _0x4e9a77;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'penalty':{'type':Sequelize[_0xbb10('0x1')],'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 dabf920..f5af499 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 _0xb7e7=['UserMailQueue','lodash','../../config/logger','moment','request-promise','rimraf','../../config/environment','./userMailQueue.attributes','define'];(function(_0x21003c,_0x29d061){var _0x372234=function(_0x1789bc){while(--_0x1789bc){_0x21003c['push'](_0x21003c['shift']());}};_0x372234(++_0x29d061);}(_0xb7e7,0x121));var _0x7b7e=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xb7e7[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0x7b7e('0x0'));var util=require('util');var logger=require(_0x7b7e('0x1'))('api');var moment=require(_0x7b7e('0x2'));var BPromise=require('bluebird');var rp=require(_0x7b7e('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7b7e('0x4'));var config=require(_0x7b7e('0x5'));var attributes=require(_0x7b7e('0x6'));module['exports']=function(_0x53ed64,_0x333fa4){return _0x53ed64[_0x7b7e('0x7')](_0x7b7e('0x8'),attributes,{'tableName':'user_has_mail_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x757a=['define','user_has_mail_queues','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./userMailQueue.attributes','exports'];(function(_0x4d8ed9,_0x2ae284){var _0x1e2140=function(_0x9cca89){while(--_0x9cca89){_0x4d8ed9['push'](_0x4d8ed9['shift']());}};_0x1e2140(++_0x2ae284);}(_0x757a,0xde));var _0xa757=function(_0x5060fa,_0x3fe9bb){_0x5060fa=_0x5060fa-0x0;var _0x5c8a00=_0x757a[_0x5060fa];return _0x5c8a00;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));module[_0xa757('0x7')]=function(_0x5edca8,_0xae0e7c){return _0x5edca8[_0xa757('0x8')]('UserMailQueue',attributes,{'tableName':_0xa757('0x9'),'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 423ec75..ab93af9 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 _0x3cd8=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util'];(function(_0x468404,_0x185337){var _0xde6354=function(_0x5a60a2){while(--_0x5a60a2){_0x468404['push'](_0x468404['shift']());}};_0xde6354(++_0x185337);}(_0x3cd8,0x150));var _0x83cd=function(_0x3e961c,_0x5747e7){_0x3e961c=_0x3e961c-0x0;var _0x474f9c=_0x3cd8[_0x3e961c];return _0x474f9c;};'use strict';var _=require(_0x83cd('0x0'));var util=require(_0x83cd('0x1'));var moment=require(_0x83cd('0x2'));var BPromise=require(_0x83cd('0x3'));var rs=require(_0x83cd('0x4'));var fs=require('fs');var Redis=require(_0x83cd('0x5'));var db=require(_0x83cd('0x6'))['db'];var utils=require(_0x83cd('0x7'));var logger=require('../../config/logger')(_0x83cd('0x8'));var config=require(_0x83cd('0x9'));var jayson=require(_0x83cd('0xa'));var client=jayson[_0x83cd('0xb')][_0x83cd('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xb6ca3a,_0x69187a,_0x309a7a){return new BPromise(function(_0x1bd528,_0x3e7b0c){return client[_0x83cd('0xd')](_0xb6ca3a,_0x309a7a)[_0x83cd('0xe')](function(_0x43b349){logger[_0x83cd('0xf')](_0x83cd('0x10'),_0x69187a,_0x83cd('0x11'));logger[_0x83cd('0x12')](_0x83cd('0x13'),_0x69187a,_0x83cd('0x11'),JSON[_0x83cd('0x14')](_0x43b349));if(_0x43b349['error']){if(_0x43b349[_0x83cd('0x15')][_0x83cd('0x16')]===0x1f4){logger[_0x83cd('0x15')](_0x83cd('0x10'),_0x69187a,_0x43b349[_0x83cd('0x15')][_0x83cd('0x17')]);return _0x3e7b0c(_0x43b349[_0x83cd('0x15')][_0x83cd('0x17')]);}logger['error'](_0x83cd('0x10'),_0x69187a,_0x43b349[_0x83cd('0x15')][_0x83cd('0x17')]);return _0x1bd528(_0x43b349[_0x83cd('0x15')][_0x83cd('0x17')]);}else{logger[_0x83cd('0xf')]('UserMailQueue,\x20%s,\x20%s',_0x69187a,'request\x20sent');_0x1bd528(_0x43b349[_0x83cd('0x18')][_0x83cd('0x17')]);}})[_0x83cd('0x19')](function(_0x28d4c8){logger[_0x83cd('0x15')](_0x83cd('0x10'),_0x69187a,_0x28d4c8);_0x3e7b0c(_0x28d4c8);});});}
\ No newline at end of file
+var _0x8f05=['info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','error','code','message','result','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','request'];(function(_0x31dbed,_0x303979){var _0x5ed9bd=function(_0x401ca2){while(--_0x401ca2){_0x31dbed['push'](_0x31dbed['shift']());}};_0x5ed9bd(++_0x303979);}(_0x8f05,0x1cb));var _0x58f0=function(_0x318a20,_0x365c1d){_0x318a20=_0x318a20-0x0;var _0x38b849=_0x8f05[_0x318a20];return _0x38b849;};'use strict';var _=require(_0x58f0('0x0'));var util=require(_0x58f0('0x1'));var moment=require(_0x58f0('0x2'));var BPromise=require('bluebird');var rs=require(_0x58f0('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x58f0('0x4'))['db'];var utils=require(_0x58f0('0x5'));var logger=require('../../config/logger')(_0x58f0('0x6'));var config=require(_0x58f0('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x430b86,_0x114ec6,_0x264693){return new BPromise(function(_0x4a95e2,_0x148bf1){return client[_0x58f0('0x8')](_0x430b86,_0x264693)['then'](function(_0x5bea04){logger[_0x58f0('0x9')](_0x58f0('0xa'),_0x114ec6,_0x58f0('0xb'));logger[_0x58f0('0xc')](_0x58f0('0xd'),_0x114ec6,_0x58f0('0xb'),JSON['stringify'](_0x5bea04));if(_0x5bea04[_0x58f0('0xe')]){if(_0x5bea04[_0x58f0('0xe')][_0x58f0('0xf')]===0x1f4){logger[_0x58f0('0xe')](_0x58f0('0xa'),_0x114ec6,_0x5bea04['error'][_0x58f0('0x10')]);return _0x148bf1(_0x5bea04['error'][_0x58f0('0x10')]);}logger[_0x58f0('0xe')](_0x58f0('0xa'),_0x114ec6,_0x5bea04[_0x58f0('0xe')][_0x58f0('0x10')]);return _0x4a95e2(_0x5bea04[_0x58f0('0xe')]['message']);}else{logger[_0x58f0('0x9')](_0x58f0('0xa'),_0x114ec6,_0x58f0('0xb'));_0x4a95e2(_0x5bea04[_0x58f0('0x11')][_0x58f0('0x10')]);}})['catch'](function(_0x3b40a8){logger['error'](_0x58f0('0xa'),_0x114ec6,_0x3b40a8);_0x148bf1(_0x3b40a8);});});}
\ No newline at end of file
diff --git a/server/api/userOpenchannelQueue/index.js b/server/api/userOpenchannelQueue/index.js
index 41affda..4a8c3fe 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 _0x4bc9=['../../components/interaction/service','../../config/environment','exports','util','path','connect-timeout','express','Router'];(function(_0x204097,_0x2bd426){var _0x3fb8c4=function(_0x5eacd2){while(--_0x5eacd2){_0x204097['push'](_0x204097['shift']());}};_0x3fb8c4(++_0x2bd426);}(_0x4bc9,0x83));var _0x94bc=function(_0x140faf,_0x31811c){_0x140faf=_0x140faf-0x0;var _0x13d960=_0x4bc9[_0x140faf];return _0x13d960;};'use strict';var multer=require('multer');var util=require(_0x94bc('0x0'));var path=require(_0x94bc('0x1'));var timeout=require(_0x94bc('0x2'));var express=require(_0x94bc('0x3'));var router=express[_0x94bc('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x94bc('0x5'));var config=require(_0x94bc('0x6'));module[_0x94bc('0x7')]=router;
\ No newline at end of file
+var _0x3782=['util','path','../../components/auth/service','../../config/environment'];(function(_0x1d5400,_0x567e3c){var _0x21d9fe=function(_0x23fb75){while(--_0x23fb75){_0x1d5400['push'](_0x1d5400['shift']());}};_0x21d9fe(++_0x567e3c);}(_0x3782,0x1f0));var _0x2378=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3782[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require('multer');var util=require(_0x2378('0x0'));var path=require(_0x2378('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require(_0x2378('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0x2378('0x3'));module['exports']=router;
\ No newline at end of file
diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js
index 9261113..1b65eaa 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 _0xe706=['INTEGER','sequelize','exports'];(function(_0xa2a82d,_0x5f293b){var _0x157cf4=function(_0x26ffcc){while(--_0x26ffcc){_0xa2a82d['push'](_0xa2a82d['shift']());}};_0x157cf4(++_0x5f293b);}(_0xe706,0xa3));var _0x6e70=function(_0x495c53,_0x5dd58b){_0x495c53=_0x495c53-0x0;var _0x20abe0=_0xe706[_0x495c53];return _0x20abe0;};'use strict';var Sequelize=require(_0x6e70('0x0'));module[_0x6e70('0x1')]={'penalty':{'type':Sequelize[_0x6e70('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xd8b0=['exports','sequelize'];(function(_0x51a67e,_0x16525f){var _0x461dee=function(_0x3cc3c4){while(--_0x3cc3c4){_0x51a67e['push'](_0x51a67e['shift']());}};_0x461dee(++_0x16525f);}(_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')]={'penalty':{'type':Sequelize['INTEGER'],'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 7db35f2..f5dc40e 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 _0x8f0d=['util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./userOpenchannelQueue.attributes','exports','UserOpenchannelQueue','user_has_openchannel_queues','lodash'];(function(_0x53c208,_0x2e925c){var _0x4426b1=function(_0x545355){while(--_0x545355){_0x53c208['push'](_0x53c208['shift']());}};_0x4426b1(++_0x2e925c);}(_0x8f0d,0x1c6));var _0xd8f0=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0x8f0d[_0x2b10c6];return _0x3789d2;};'use strict';var _=require(_0xd8f0('0x0'));var util=require(_0xd8f0('0x1'));var logger=require(_0xd8f0('0x2'))(_0xd8f0('0x3'));var moment=require(_0xd8f0('0x4'));var BPromise=require('bluebird');var rp=require(_0xd8f0('0x5'));var fs=require('fs');var path=require(_0xd8f0('0x6'));var rimraf=require(_0xd8f0('0x7'));var config=require(_0xd8f0('0x8'));var attributes=require(_0xd8f0('0x9'));module[_0xd8f0('0xa')]=function(_0x5b0ef5,_0x12e3e2){return _0x5b0ef5['define'](_0xd8f0('0xb'),attributes,{'tableName':_0xd8f0('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0681=['path','rimraf','../../config/environment','exports','UserOpenchannelQueue','user_has_openchannel_queues','util','../../config/logger','moment','bluebird'];(function(_0x1afab8,_0x1b06a8){var _0x20e0d3=function(_0x46db9b){while(--_0x46db9b){_0x1afab8['push'](_0x1afab8['shift']());}};_0x20e0d3(++_0x1b06a8);}(_0x0681,0x1e6));var _0x1068=function(_0x410adb,_0x268880){_0x410adb=_0x410adb-0x0;var _0x358887=_0x0681[_0x410adb];return _0x358887;};'use strict';var _=require('lodash');var util=require(_0x1068('0x0'));var logger=require(_0x1068('0x1'))('api');var moment=require(_0x1068('0x2'));var BPromise=require(_0x1068('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1068('0x4'));var rimraf=require(_0x1068('0x5'));var config=require(_0x1068('0x6'));var attributes=require('./userOpenchannelQueue.attributes');module[_0x1068('0x7')]=function(_0x96961a,_0x31d173){return _0x96961a['define'](_0x1068('0x8'),attributes,{'tableName':_0x1068('0x9'),'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 912a158..c1fe65f 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 _0xbbcc=['request\x20sent','debug','stringify','error','code','UserOpenchannelQueue,\x20%s,\x20%s','message','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','then','info'];(function(_0x219d9d,_0x27a6e8){var _0x3d68aa=function(_0x4f7128){while(--_0x4f7128){_0x219d9d['push'](_0x219d9d['shift']());}};_0x3d68aa(++_0x27a6e8);}(_0xbbcc,0x11f));var _0xcbbc=function(_0x3718b7,_0x2da677){_0x3718b7=_0x3718b7-0x0;var _0xf8c91e=_0xbbcc[_0x3718b7];return _0xf8c91e;};'use strict';var _=require(_0xcbbc('0x0'));var util=require(_0xcbbc('0x1'));var moment=require('moment');var BPromise=require(_0xcbbc('0x2'));var rs=require(_0xcbbc('0x3'));var fs=require('fs');var Redis=require(_0xcbbc('0x4'));var db=require(_0xcbbc('0x5'))['db'];var utils=require(_0xcbbc('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0xcbbc('0x7'));var jayson=require(_0xcbbc('0x8'));var client=jayson[_0xcbbc('0x9')][_0xcbbc('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x396f0d,_0x1a3ecf,_0x3299ba){return new BPromise(function(_0x20a48c,_0xb5098f){return client['request'](_0x396f0d,_0x3299ba)[_0xcbbc('0xb')](function(_0x36920f){logger[_0xcbbc('0xc')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x1a3ecf,_0xcbbc('0xd'));logger[_0xcbbc('0xe')]('UserOpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x1a3ecf,_0xcbbc('0xd'),JSON[_0xcbbc('0xf')](_0x36920f));if(_0x36920f[_0xcbbc('0x10')]){if(_0x36920f[_0xcbbc('0x10')][_0xcbbc('0x11')]===0x1f4){logger['error'](_0xcbbc('0x12'),_0x1a3ecf,_0x36920f['error'][_0xcbbc('0x13')]);return _0xb5098f(_0x36920f[_0xcbbc('0x10')][_0xcbbc('0x13')]);}logger[_0xcbbc('0x10')](_0xcbbc('0x12'),_0x1a3ecf,_0x36920f['error']['message']);return _0x20a48c(_0x36920f['error'][_0xcbbc('0x13')]);}else{logger[_0xcbbc('0xc')](_0xcbbc('0x12'),_0x1a3ecf,_0xcbbc('0xd'));_0x20a48c(_0x36920f['result'][_0xcbbc('0x13')]);}})['catch'](function(_0xf615f8){logger[_0xcbbc('0x10')](_0xcbbc('0x12'),_0x1a3ecf,_0xf615f8);_0xb5098f(_0xf615f8);});});}
\ No newline at end of file
+var _0xf41b=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','error','UserOpenchannelQueue,\x20%s,\x20%s','message','result','catch','lodash','util','moment','ioredis'];(function(_0x3a0ba6,_0x1b7b02){var _0x13b2cf=function(_0x5bd286){while(--_0x5bd286){_0x3a0ba6['push'](_0x3a0ba6['shift']());}};_0x13b2cf(++_0x1b7b02);}(_0xf41b,0x130));var _0xbf41=function(_0x5ebf44,_0x4e543e){_0x5ebf44=_0x5ebf44-0x0;var _0x2fef12=_0xf41b[_0x5ebf44];return _0x2fef12;};'use strict';var _=require(_0xbf41('0x0'));var util=require(_0xbf41('0x1'));var moment=require(_0xbf41('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbf41('0x3'));var db=require(_0xbf41('0x4'))['db'];var utils=require(_0xbf41('0x5'));var logger=require(_0xbf41('0x6'))(_0xbf41('0x7'));var config=require(_0xbf41('0x8'));var jayson=require(_0xbf41('0x9'));var client=jayson[_0xbf41('0xa')][_0xbf41('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x429de7,_0x5dae95,_0x1bc0f6){return new BPromise(function(_0x1d45d6,_0x5e430d){return client[_0xbf41('0xc')](_0x429de7,_0x1bc0f6)[_0xbf41('0xd')](function(_0x2ab0da){logger[_0xbf41('0xe')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x5dae95,_0xbf41('0xf'));logger['debug'](_0xbf41('0x10'),_0x5dae95,'request\x20sent',JSON['stringify'](_0x2ab0da));if(_0x2ab0da[_0xbf41('0x11')]){if(_0x2ab0da['error']['code']===0x1f4){logger['error'](_0xbf41('0x12'),_0x5dae95,_0x2ab0da[_0xbf41('0x11')]['message']);return _0x5e430d(_0x2ab0da[_0xbf41('0x11')][_0xbf41('0x13')]);}logger['error'](_0xbf41('0x12'),_0x5dae95,_0x2ab0da[_0xbf41('0x11')][_0xbf41('0x13')]);return _0x1d45d6(_0x2ab0da[_0xbf41('0x11')][_0xbf41('0x13')]);}else{logger[_0xbf41('0xe')](_0xbf41('0x12'),_0x5dae95,_0xbf41('0xf'));_0x1d45d6(_0x2ab0da[_0xbf41('0x14')]['message']);}})[_0xbf41('0x15')](function(_0x22157e){logger[_0xbf41('0x11')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x5dae95,_0x22157e);_0x5e430d(_0x22157e);});});}
\ No newline at end of file
diff --git a/server/api/userProfile/index.js b/server/api/userProfile/index.js
index 1dd2939..3a411a5 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 _0xe2f2=['update','delete','destroy','removeSections','removeResources','exports','util','path','Router','../../components/interaction/service','../../config/environment','./userProfile.controller','get','isAuthenticated','/describe','describe','show','/:id/sections','getSections','getResources','post','create','addSections','/:id/resources','/:id'];(function(_0x38ffde,_0x11f23a){var _0x5e3137=function(_0x16898f){while(--_0x16898f){_0x38ffde['push'](_0x38ffde['shift']());}};_0x5e3137(++_0x11f23a);}(_0xe2f2,0x9c));var _0x2e2f=function(_0x59053,_0x271c38){_0x59053=_0x59053-0x0;var _0x390021=_0xe2f2[_0x59053];return _0x390021;};'use strict';var multer=require('multer');var util=require(_0x2e2f('0x0'));var path=require(_0x2e2f('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x2e2f('0x2')]();var auth=require('../../components/auth/service');var interaction=require(_0x2e2f('0x3'));var config=require(_0x2e2f('0x4'));var controller=require(_0x2e2f('0x5'));router[_0x2e2f('0x6')]('/',auth[_0x2e2f('0x7')](),controller['index']);router[_0x2e2f('0x6')](_0x2e2f('0x8'),auth['isAuthenticated'](),controller[_0x2e2f('0x9')]);router['get']('/:id',auth[_0x2e2f('0x7')](),controller[_0x2e2f('0xa')]);router[_0x2e2f('0x6')](_0x2e2f('0xb'),auth['isAuthenticated'](),controller[_0x2e2f('0xc')]);router[_0x2e2f('0x6')]('/:id/resources',auth['isAuthenticated'](),controller[_0x2e2f('0xd')]);router[_0x2e2f('0xe')]('/',auth[_0x2e2f('0x7')](),controller[_0x2e2f('0xf')]);router[_0x2e2f('0xe')]('/:id/clone',auth[_0x2e2f('0x7')](),controller['clone']);router[_0x2e2f('0xe')](_0x2e2f('0xb'),auth[_0x2e2f('0x7')](),controller[_0x2e2f('0x10')]);router['post'](_0x2e2f('0x11'),auth[_0x2e2f('0x7')](),controller['addResources']);router['put'](_0x2e2f('0x12'),auth[_0x2e2f('0x7')](),controller[_0x2e2f('0x13')]);router[_0x2e2f('0x14')](_0x2e2f('0x12'),auth['isAuthenticated'](),controller[_0x2e2f('0x15')]);router[_0x2e2f('0x14')]('/:id/sections',auth[_0x2e2f('0x7')](),controller[_0x2e2f('0x16')]);router[_0x2e2f('0x14')]('/:id/resources',auth[_0x2e2f('0x7')](),controller[_0x2e2f('0x17')]);module[_0x2e2f('0x18')]=router;
\ No newline at end of file
+var _0x2f90=['/:id','show','/:id/sections','getSections','getResources','post','create','clone','addSections','/:id/resources','addResources','put','delete','destroy','removeSections','removeResources','exports','multer','util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./userProfile.controller','get','isAuthenticated'];(function(_0x37a3ad,_0x17b136){var _0x3615a6=function(_0x2e3837){while(--_0x2e3837){_0x37a3ad['push'](_0x37a3ad['shift']());}};_0x3615a6(++_0x17b136);}(_0x2f90,0xce));var _0x02f9=function(_0x18dd23,_0x1ca58d){_0x18dd23=_0x18dd23-0x0;var _0x22eb36=_0x2f90[_0x18dd23];return _0x22eb36;};'use strict';var multer=require(_0x02f9('0x0'));var util=require(_0x02f9('0x1'));var path=require('path');var timeout=require(_0x02f9('0x2'));var express=require(_0x02f9('0x3'));var router=express[_0x02f9('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x02f9('0x5'));var config=require(_0x02f9('0x6'));var controller=require(_0x02f9('0x7'));router[_0x02f9('0x8')]('/',auth[_0x02f9('0x9')](),controller['index']);router[_0x02f9('0x8')]('/describe',auth[_0x02f9('0x9')](),controller['describe']);router[_0x02f9('0x8')](_0x02f9('0xa'),auth[_0x02f9('0x9')](),controller[_0x02f9('0xb')]);router['get'](_0x02f9('0xc'),auth['isAuthenticated'](),controller[_0x02f9('0xd')]);router[_0x02f9('0x8')]('/:id/resources',auth['isAuthenticated'](),controller[_0x02f9('0xe')]);router[_0x02f9('0xf')]('/',auth[_0x02f9('0x9')](),controller[_0x02f9('0x10')]);router[_0x02f9('0xf')]('/:id/clone',auth['isAuthenticated'](),controller[_0x02f9('0x11')]);router[_0x02f9('0xf')]('/:id/sections',auth['isAuthenticated'](),controller[_0x02f9('0x12')]);router['post'](_0x02f9('0x13'),auth['isAuthenticated'](),controller[_0x02f9('0x14')]);router[_0x02f9('0x15')](_0x02f9('0xa'),auth[_0x02f9('0x9')](),controller['update']);router[_0x02f9('0x16')]('/:id',auth[_0x02f9('0x9')](),controller[_0x02f9('0x17')]);router['delete'](_0x02f9('0xc'),auth['isAuthenticated'](),controller[_0x02f9('0x18')]);router['delete'](_0x02f9('0x13'),auth[_0x02f9('0x9')](),controller[_0x02f9('0x19')]);module[_0x02f9('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.attributes.js b/server/api/userProfile/userProfile.attributes.js
index 6b62723..fefe680 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 _0xb9fc=['setDataValue','crudPermissions','join','getDataValue','split','STRING','name'];(function(_0x51639a,_0x35f006){var _0x3abae4=function(_0x89b35e){while(--_0x89b35e){_0x51639a['push'](_0x51639a['shift']());}};_0x3abae4(++_0x35f006);}(_0xb9fc,0x6e));var _0xcb9f=function(_0x5019fe,_0x47729c){_0x5019fe=_0x5019fe-0x0;var _0x279ac8=_0xb9fc[_0x5019fe];return _0x279ac8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xcb9f('0x0')],'allowNull':![],'unique':_0xcb9f('0x1')},'crudPermissions':{'type':Sequelize[_0xcb9f('0x0')],'set':function(_0x38cd94){this[_0xcb9f('0x2')](_0xcb9f('0x3'),_0x38cd94?_0x38cd94[_0xcb9f('0x4')](''):[]);},'get':function(){return this[_0xcb9f('0x5')]('crudPermissions')?this[_0xcb9f('0x5')]('crudPermissions')[_0xcb9f('0x6')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0xcb9f('0x0')],'allowNull':!![]}};
\ No newline at end of file
+var _0x2b39=['setDataValue','crudPermissions','getDataValue','split','sequelize','exports','STRING','name'];(function(_0x290f93,_0x215410){var _0x37de3c=function(_0x1ab5e5){while(--_0x1ab5e5){_0x290f93['push'](_0x290f93['shift']());}};_0x37de3c(++_0x215410);}(_0x2b39,0x11c));var _0x92b3=function(_0x234869,_0x25ce29){_0x234869=_0x234869-0x0;var _0xdc5c37=_0x2b39[_0x234869];return _0xdc5c37;};'use strict';var Sequelize=require(_0x92b3('0x0'));module[_0x92b3('0x1')]={'name':{'type':Sequelize[_0x92b3('0x2')],'allowNull':![],'unique':_0x92b3('0x3')},'crudPermissions':{'type':Sequelize[_0x92b3('0x2')],'set':function(_0x4bbacd){this[_0x92b3('0x4')](_0x92b3('0x5'),_0x4bbacd?_0x4bbacd['join'](''):[]);},'get':function(){return this[_0x92b3('0x6')](_0x92b3('0x5'))?this[_0x92b3('0x6')](_0x92b3('0x5'))[_0x92b3('0x7')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0x92b3('0x2')],'allowNull':!![]}};
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.controller.js b/server/api/userProfile/userProfile.controller.js
index 47ed654..e6ec6ef 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 _0xf3c4=['./userProfile.socket','register','sendStatus','status','end','count','offset','limit','Content-Range','json','apply','save','then','destroy','error','name','send','map','UserProfile','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','include','find','create','body','clone','get','omit','createdAt','updatedAt','crudPermissions','sequelize','UserProfileSection','autoAssociation','UserProfileResource','sectionId','userProfileId','Resources','update','params','describe','addSections','transaction','each','push','removeSections','ids','getSections','includes','subsections','enabled','findOne','Dashboard','forEach','resourceId','addResources','bulkCreate','removeResources','getResources','undefined','Sequelize','Unknown\x20section','mergeResources','childModel','ValidationError','parentSections','all','isEmpty','union','ignore','nolimit','field','AnalyticExtractedReport','foreignKey','associatedResources','default','reportId','DefaultReports','custom','CustomReports','CmContact','Tag','Tags','color','tag','ThroughTags','value','squareprojects','SquareProject','odbc','SquareOdbc','squarerecordings','SquareRecording','SquareProjects','JscriptyProject','contacts','Lists','ListId','lists','CmList','companies','globalcustomfields','CmCustomField','chatqueues','ChatQueue','chatwebsites','ChatWebsite','FaxQueue','faxaccounts','inboundroutes','internalroutes','outboundroutes','contexts','VoiceContext','voicemails','Agents','membername','User','agent','Telephones','role','telephone','VoiceQueues','QueueCampaigns','queue','outbound','musiconholds','VoiceMusicOnHold','chanspies','VoiceChanSpy','voiceprefixes','ivrcampaigns','Campaign','mailaccounts','openchannelqueues','OpenchannelQueue','openchannelaccounts','OpenchannelAccount','smsqueues','SmsQueue','smsaccounts','teams','Team','voicequeues','queuecampaigns','VoiceQueue','users','agents','telephones','Users','admin','user','zendeskaccounts','ZendeskAccount','salesforceaccounts','FreshdeskAccount','SugarcrmAccount','deskaccounts','DeskAccount','zohoaccounts','ZohoAccount','vtigeraccounts','cannedanswers','CannedAnswer','customdashboards','intervals','pauses','scheduler','Schedule','sounds','tags','templates','triggers','trunks','Trunk','Variable','plugins','Plugin','extractedreports','Reports','metrics','AnalyticMetric','html-pdf','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','lodash','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter'];(function(_0x4206f5,_0x21f338){var _0xa29cf3=function(_0x2d35d7){while(--_0x2d35d7){_0x4206f5['push'](_0x4206f5['shift']());}};_0xa29cf3(++_0x21f338);}(_0xf3c4,0x1b3));var _0x4f3c=function(_0x108cd1,_0x57fc20){_0x108cd1=_0x108cd1-0x0;var _0x4bd1ee=_0xf3c4[_0x108cd1];return _0x4bd1ee;};'use strict';var pdf=require(_0x4f3c('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x4f3c('0x1'));var rp=require(_0x4f3c('0x2'));var moment=require('moment');var BPromise=require(_0x4f3c('0x3'));var Mustache=require(_0x4f3c('0x4'));var util=require('util');var path=require(_0x4f3c('0x5'));var sox=require(_0x4f3c('0x6'));var csv=require(_0x4f3c('0x7'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x4f3c('0x8'));var squel=require('squel');var crypto=require(_0x4f3c('0x9'));var jsforce=require(_0x4f3c('0xa'));var deskjs=require(_0x4f3c('0xb'));var toCsv=require(_0x4f3c('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x4f3c('0xc'));var authService=require(_0x4f3c('0xd'));var qs=require(_0x4f3c('0xe'));var as=require(_0x4f3c('0xf'));var hardwareService=require(_0x4f3c('0x10'));var logger=require(_0x4f3c('0x11'))(_0x4f3c('0x12'));var utils=require(_0x4f3c('0x13'));var config=require(_0x4f3c('0x14'));var db=require(_0x4f3c('0x15'))['db'];config[_0x4f3c('0x16')]=_[_0x4f3c('0x17')](config[_0x4f3c('0x16')],{'host':'localhost','port':0x18eb});var socket=require(_0x4f3c('0x18'))(new Redis(config[_0x4f3c('0x16')]));require(_0x4f3c('0x19'))[_0x4f3c('0x1a')](socket);function respondWithStatusCode(_0x1aa0a9,_0x1d5d79){_0x1d5d79=_0x1d5d79||0xcc;return function(_0x416f24){if(_0x416f24){return _0x1aa0a9[_0x4f3c('0x1b')](_0x1d5d79);}return _0x1aa0a9[_0x4f3c('0x1c')](_0x1d5d79)[_0x4f3c('0x1d')]();};}function respondWithResult(_0x9dc9e6,_0x316cc5){_0x316cc5=_0x316cc5||0xc8;return function(_0x3cf4ad){if(_0x3cf4ad){return _0x9dc9e6[_0x4f3c('0x1c')](_0x316cc5)['json'](_0x3cf4ad);}};}function respondWithFilteredResult(_0x572ef4,_0x25c02e){return function(_0x3ed6e0){if(_0x3ed6e0){var _0x2fe5bb=_0x3ed6e0[_0x4f3c('0x1e')],_0x3ef78b=_0x25c02e['offset'],_0xf0bc59=_0x25c02e[_0x4f3c('0x1f')]+_0x25c02e[_0x4f3c('0x20')],_0x579587;if(_0xf0bc59>=_0x2fe5bb){_0xf0bc59=_0x2fe5bb;_0x579587=0xc8;}else{_0x579587=0xce;}_0x572ef4[_0x4f3c('0x1c')](_0x579587);return _0x572ef4['set'](_0x4f3c('0x21'),_0x3ef78b+'-'+_0xf0bc59+'/'+_0x2fe5bb)[_0x4f3c('0x22')](_0x3ed6e0);}return null;};}function patchUpdates(_0x596bac){return function(_0x3e8832){try{jsonpatch[_0x4f3c('0x23')](_0x3e8832,_0x596bac,!![]);}catch(_0x38c02e){return BPromise['reject'](_0x38c02e);}return _0x3e8832[_0x4f3c('0x24')]();};}function saveUpdates(_0x2894f2,_0x14ae9b){return function(_0x8a83b3){if(_0x8a83b3){return _0x8a83b3['update'](_0x2894f2)[_0x4f3c('0x25')](function(_0x13c556){return _0x13c556;});}return null;};}function removeEntity(_0x494e4f,_0x57e62f){return function(_0x1d2a26){if(_0x1d2a26){return _0x1d2a26[_0x4f3c('0x26')]()['then'](function(){_0x494e4f[_0x4f3c('0x1c')](0xcc)[_0x4f3c('0x1d')]();});}};}function handleEntityNotFound(_0x42ed3c,_0x59aadc){return function(_0x209c58){if(!_0x209c58){_0x42ed3c['sendStatus'](0x194);}return _0x209c58;};}function handleError(_0x3366ac,_0x4a16f2){_0x4a16f2=_0x4a16f2||0x1f4;return function(_0x1c33bf){logger[_0x4f3c('0x27')](_0x1c33bf['stack']);if(_0x1c33bf[_0x4f3c('0x28')]){delete _0x1c33bf[_0x4f3c('0x28')];}_0x3366ac[_0x4f3c('0x1c')](_0x4a16f2)[_0x4f3c('0x29')](_0x1c33bf);};}exports['index']=function(_0x53216c,_0x491ca1){var _0x3aa969={},_0x468a3e={},_0x58b3d9={'count':0x0,'rows':[]};var _0x313c56=_[_0x4f3c('0x2a')](db[_0x4f3c('0x2b')][_0x4f3c('0x2c')],function(_0x1d666f){return{'name':_0x1d666f[_0x4f3c('0x2d')],'type':_0x1d666f[_0x4f3c('0x2e')][_0x4f3c('0x2f')]};});_0x468a3e[_0x4f3c('0x30')]=_['map'](_0x313c56,_0x4f3c('0x28'));_0x468a3e[_0x4f3c('0x31')]=_[_0x4f3c('0x32')](_0x53216c['query']);_0x468a3e[_0x4f3c('0x33')]=_[_0x4f3c('0x34')](_0x468a3e[_0x4f3c('0x30')],_0x468a3e[_0x4f3c('0x31')]);_0x3aa969['attributes']=_[_0x4f3c('0x34')](_0x468a3e[_0x4f3c('0x30')],qs[_0x4f3c('0x35')](_0x53216c['query']['fields']));_0x3aa969[_0x4f3c('0x36')]=_0x3aa969[_0x4f3c('0x36')][_0x4f3c('0x37')]?_0x3aa969[_0x4f3c('0x36')]:_0x468a3e[_0x4f3c('0x30')];if(!_0x53216c[_0x4f3c('0x31')][_0x4f3c('0x38')]('nolimit')){_0x3aa969['limit']=qs['limit'](_0x53216c['query'][_0x4f3c('0x20')]);_0x3aa969[_0x4f3c('0x1f')]=qs[_0x4f3c('0x1f')](_0x53216c[_0x4f3c('0x31')][_0x4f3c('0x1f')]);}_0x3aa969[_0x4f3c('0x39')]=qs['sort'](_0x53216c[_0x4f3c('0x31')][_0x4f3c('0x3a')]);_0x3aa969[_0x4f3c('0x3b')]=qs[_0x4f3c('0x33')](_[_0x4f3c('0x3c')](_0x53216c[_0x4f3c('0x31')],_0x468a3e[_0x4f3c('0x33')]));if(_0x53216c[_0x4f3c('0x31')][_0x4f3c('0x3d')]){_0x3aa969[_0x4f3c('0x3b')]=_[_0x4f3c('0x3e')](_0x3aa969[_0x4f3c('0x3b')],{'$or':_['map'](_0x313c56,function(_0x4aa7ba){if(_0x4aa7ba['type']!==_0x4f3c('0x3f')){var _0x44e08e={};_0x44e08e[_0x4aa7ba[_0x4f3c('0x28')]]={'$like':'%'+_0x53216c[_0x4f3c('0x31')]['filter']+'%'};return _0x44e08e;}})});}_0x3aa969=_['merge']({},_0x3aa969,_0x53216c[_0x4f3c('0x40')]);var _0x5de9d5={'where':_0x3aa969[_0x4f3c('0x3b')]};return db[_0x4f3c('0x2b')]['count'](_0x5de9d5)[_0x4f3c('0x25')](function(_0x14d560){_0x58b3d9['count']=_0x14d560;if(_0x53216c['query'][_0x4f3c('0x41')]){_0x3aa969['include']=[{'all':!![]}];}return db[_0x4f3c('0x2b')][_0x4f3c('0x42')](_0x3aa969);})[_0x4f3c('0x25')](function(_0x494289){_0x58b3d9[_0x4f3c('0x43')]=_0x494289;return _0x58b3d9;})[_0x4f3c('0x25')](respondWithFilteredResult(_0x491ca1,_0x3aa969))[_0x4f3c('0x44')](handleError(_0x491ca1,null));};exports['show']=function(_0x3ea725,_0x1b71a7){var _0x483ea4={'raw':![],'where':{'id':_0x3ea725['params']['id']}},_0x16ee79={};_0x16ee79[_0x4f3c('0x30')]=_[_0x4f3c('0x32')](db[_0x4f3c('0x2b')]['rawAttributes']);_0x16ee79[_0x4f3c('0x31')]=_['keys'](_0x3ea725['query']);_0x16ee79[_0x4f3c('0x33')]=_['intersection'](_0x16ee79['model'],_0x16ee79[_0x4f3c('0x31')]);_0x483ea4[_0x4f3c('0x36')]=_[_0x4f3c('0x34')](_0x16ee79['model'],qs[_0x4f3c('0x35')](_0x3ea725[_0x4f3c('0x31')]['fields']));_0x483ea4['attributes']=_0x483ea4['attributes'][_0x4f3c('0x37')]?_0x483ea4['attributes']:_0x16ee79[_0x4f3c('0x30')];if(_0x3ea725[_0x4f3c('0x31')][_0x4f3c('0x41')]){_0x483ea4[_0x4f3c('0x45')]=[{'all':!![]}];}_0x483ea4=_[_0x4f3c('0x3e')]({},_0x483ea4,_0x3ea725[_0x4f3c('0x40')]);return db[_0x4f3c('0x2b')][_0x4f3c('0x46')](_0x483ea4)[_0x4f3c('0x25')](handleEntityNotFound(_0x1b71a7,null))['then'](respondWithResult(_0x1b71a7,null))['catch'](handleError(_0x1b71a7,null));};exports[_0x4f3c('0x47')]=function(_0x271e44,_0x3d30ef){return db[_0x4f3c('0x2b')][_0x4f3c('0x47')](_0x271e44[_0x4f3c('0x48')],{})[_0x4f3c('0x25')](respondWithResult(_0x3d30ef,0xc9))[_0x4f3c('0x44')](handleError(_0x3d30ef,null));};exports[_0x4f3c('0x49')]=function(_0x1641f2,_0x349344){var _0x4a2af2={'where':{'id':_0x1641f2['params']['id']}},_0x169c27={};_0x169c27['model']=_[_0x4f3c('0x32')](db[_0x4f3c('0x2b')][_0x4f3c('0x2c')]);_0x4a2af2[_0x4f3c('0x36')]=_['intersection'](_0x169c27['model'],qs['fields'](_0x1641f2[_0x4f3c('0x31')][_0x4f3c('0x35')]));_0x4a2af2[_0x4f3c('0x36')]=_0x4a2af2[_0x4f3c('0x36')][_0x4f3c('0x37')]?_0x4a2af2[_0x4f3c('0x36')]:_0x169c27[_0x4f3c('0x30')];if(_0x1641f2['query'][_0x4f3c('0x41')]){_0x4a2af2[_0x4f3c('0x45')]=[{'all':!![]}];}_0x4a2af2=_[_0x4f3c('0x3e')]({},_0x4a2af2,_0x1641f2[_0x4f3c('0x40')]);return db[_0x4f3c('0x2b')][_0x4f3c('0x46')](_0x4a2af2)[_0x4f3c('0x25')](handleEntityNotFound(_0x349344,null))[_0x4f3c('0x25')](function(_0x44994b){if(_0x44994b){var _0x1b2e69=_0x44994b[_0x4f3c('0x4a')]({'plain':!![]});_0x1b2e69=qs[_0x4f3c('0x4b')](_0x1b2e69,['id',_0x4f3c('0x4c'),_0x4f3c('0x4d'),_0x4f3c('0x4e')]);_0x1641f2[_0x4f3c('0x48')]=_[_0x4f3c('0x4b')](_0x1641f2[_0x4f3c('0x48')],['id',_0x4f3c('0x4c'),_0x4f3c('0x4d')]);return db[_0x4f3c('0x4f')]['transaction'](function(_0x19aac8){return db[_0x4f3c('0x2b')][_0x4f3c('0x47')](_[_0x4f3c('0x3e')](_0x1b2e69,_0x1641f2[_0x4f3c('0x48')]),{'include':_0x1641f2[_0x4f3c('0x31')][_0x4f3c('0x41')]?[{'all':!![]}]:undefined,'transaction':_0x19aac8})[_0x4f3c('0x25')](function(_0x169d13){var _0x42c89b=_0x169d13['get']({'plain':!![]});return db[_0x4f3c('0x50')][_0x4f3c('0x42')]({'where':{'userProfileId':_0x1641f2['params']['id']},'raw':!![]})[_0x4f3c('0x25')](function(_0x124ab6){if(_0x124ab6){return BPromise['each'](_0x124ab6,function(_0x78fc15){return new BPromise(function(_0x2b7e66,_0x378a8d){if(_0x78fc15[_0x4f3c('0x51')]===null||_0x78fc15[_0x4f3c('0x51')]===0x1)_0x2b7e66(null);return db[_0x4f3c('0x52')][_0x4f3c('0x42')]({'where':{'sectionId':_0x78fc15['id']},'raw':!![]})[_0x4f3c('0x25')](function(_0x441dbf){var _0x124ab7=_[_0x4f3c('0x2a')](_0x441dbf,function(_0x2d88f3){return qs[_0x4f3c('0x4b')](_0x2d88f3,['id','createdAt',_0x4f3c('0x4d'),_0x4f3c('0x53')]);});_0x2b7e66(_0x124ab7);})[_0x4f3c('0x44')](function(_0x18bee2){_0x378a8d(_0x18bee2);});})[_0x4f3c('0x25')](function(_0x566df3){var _0x3bbea0=qs[_0x4f3c('0x4b')](_0x78fc15,['id',_0x4f3c('0x4c'),_0x4f3c('0x4d')]);_0x3bbea0[_0x4f3c('0x54')]=_0x42c89b['id'];if(_0x566df3)_0x3bbea0[_0x4f3c('0x55')]=_0x566df3;return _0x3bbea0;})[_0x4f3c('0x25')](function(_0x37c20c){return db[_0x4f3c('0x50')]['create'](_0x37c20c,{'include':[{'model':db[_0x4f3c('0x52')],'as':_0x4f3c('0x55')}],'raw':!![],'transaction':_0x19aac8});});})[_0x4f3c('0x25')](function(){return _0x42c89b;});}});});});}})['then'](respondWithResult(_0x349344,0xc9))['catch'](handleError(_0x349344,null));};exports[_0x4f3c('0x56')]=function(_0x21361a,_0x559294){if(_0x21361a['body']['id']){delete _0x21361a[_0x4f3c('0x48')]['id'];}return db[_0x4f3c('0x2b')][_0x4f3c('0x46')]({'where':{'id':_0x21361a['params']['id']}})[_0x4f3c('0x25')](handleEntityNotFound(_0x559294,null))[_0x4f3c('0x25')](saveUpdates(_0x21361a[_0x4f3c('0x48')],null))[_0x4f3c('0x25')](respondWithResult(_0x559294,null))[_0x4f3c('0x44')](handleError(_0x559294,null));};exports[_0x4f3c('0x26')]=function(_0xe551ac,_0x2884d7){return db['UserProfile'][_0x4f3c('0x46')]({'where':{'id':_0xe551ac[_0x4f3c('0x57')]['id']}})[_0x4f3c('0x25')](handleEntityNotFound(_0x2884d7,null))[_0x4f3c('0x25')](removeEntity(_0x2884d7,null))[_0x4f3c('0x44')](handleError(_0x2884d7,null));};exports[_0x4f3c('0x58')]=function(_0x4f4e63,_0x443f9e){return db[_0x4f3c('0x2b')][_0x4f3c('0x58')]()['then'](respondWithResult(_0x443f9e,null))[_0x4f3c('0x44')](handleError(_0x443f9e,null));};exports[_0x4f3c('0x59')]=function(_0x27e184,_0x2875b2){var _0x3072cf=_0x27e184['body'];return db[_0x4f3c('0x2b')]['find']({'where':{'id':_0x27e184[_0x4f3c('0x57')]['id']}})[_0x4f3c('0x25')](handleEntityNotFound(_0x2875b2,null))[_0x4f3c('0x25')](function(_0x7135a0){if(_0x7135a0){return db[_0x4f3c('0x4f')][_0x4f3c('0x5a')](function(_0x4b4998){return db[_0x4f3c('0x50')][_0x4f3c('0x26')]({'where':{'userProfileId':_0x27e184[_0x4f3c('0x57')]['id'],'sectionId':_['map'](_0x3072cf,function(_0x4f483a){return _0x4f483a[_0x4f3c('0x53')];})},'transaction':_0x4b4998})['then'](function(){var _0x3fd2ff=_[_0x4f3c('0x2a')](_0x3072cf,function(_0x266021){_0x266021[_0x4f3c('0x54')]=_0x27e184[_0x4f3c('0x57')]['id'];return _0x266021;});var _0xa6692=[];return BPromise[_0x4f3c('0x5b')](_0x3fd2ff,function(_0x599557){return db[_0x4f3c('0x50')]['create'](_0x599557,{'include':[{'model':db['UserProfileResource'],'as':_0x4f3c('0x55')}],'raw':!![],'transaction':_0x4b4998})[_0x4f3c('0x25')](function(_0x4f56a1){_0xa6692[_0x4f3c('0x5c')](_0x4f56a1[_0x4f3c('0x4a')]({'plain':!![]}));});})[_0x4f3c('0x25')](function(){return _0xa6692;});});});}})[_0x4f3c('0x25')](function(_0x3e0640){return _0x3e0640;})[_0x4f3c('0x25')](respondWithResult(_0x2875b2,null))[_0x4f3c('0x44')](handleError(_0x2875b2,null));};exports[_0x4f3c('0x5d')]=function(_0x470781,_0x80e614){var _0x2319c9;return db[_0x4f3c('0x2b')][_0x4f3c('0x46')]({'where':{'id':_0x470781['params']['id']},'attributes':['id',_0x4f3c('0x28')]})[_0x4f3c('0x25')](handleEntityNotFound(_0x80e614,null))[_0x4f3c('0x25')](function(_0x150842){if(_0x150842){_0x2319c9=_0x150842;return db['UserProfileSection'][_0x4f3c('0x26')]({'where':{'userProfileId':_0x470781['params']['id'],'sectionId':_0x470781[_0x4f3c('0x31')][_0x4f3c('0x5e')]}});}})['then'](function(){return _0x2319c9;})['then'](respondWithStatusCode(_0x80e614,null))[_0x4f3c('0x44')](handleError(_0x80e614,null));};exports[_0x4f3c('0x5f')]=function(_0x1e2ec5,_0x46356b){var _0x39482f=[];var _0x4d8efb=[];return db[_0x4f3c('0x50')][_0x4f3c('0x42')]({'where':{'userProfileId':_0x1e2ec5[_0x4f3c('0x57')]['id']},'raw':!![]})[_0x4f3c('0x25')](function(_0x13fbba){_0x39482f=_[_0x4f3c('0x3d')](_0x13fbba,function(_0x226858){return _0x226858['enabled']===0x1||_[_0x4f3c('0x60')]([0x3eb,0x709],_0x226858[_0x4f3c('0x53')]);});if(!_['isEmpty'](_0x39482f)){return _[_0x4f3c('0x2a')](_0x39482f,function(_0x5d2779){return _0x5d2779['sectionId'];});}else{return;}})[_0x4f3c('0x25')](function(_0x5137a3){if(_0x5137a3)_0x4d8efb=_0x5137a3;if(_[_0x4f3c('0x60')](_0x4d8efb,0x64)){var _0x34e5d3=_[_0x4f3c('0x46')](_0x39482f,{'sectionId':0x64});return hasDefaultDashboard(_0x34e5d3)[_0x4f3c('0x25')](function(_0x42be86){return _[_0x4f3c('0x2a')](_0x39482f,function(_0x3f8c80){if(_0x3f8c80[_0x4f3c('0x53')]===0x64){_0x3f8c80['subsections']=_0x42be86;}return _0x3f8c80;});});}else{return;}})['then'](function(_0x179261){if(_0x179261)_0x39482f=_0x179261;if(_['includes'](_0x4d8efb,0x3eb)){var _0x56c039=_[_0x4f3c('0x46')](_0x39482f,{'sectionId':0x3eb});return getCustomDashboards(_0x56c039)['then'](function(_0x5456a0){return _[_0x4f3c('0x2a')](_0x39482f,function(_0xffa6b9){if(_0x56c039['enabled']){if(_0xffa6b9[_0x4f3c('0x53')]===0x3eb){_0xffa6b9['subsections']=_0x5456a0;}}else{if(_0xffa6b9['sectionId']===0x64){_0xffa6b9[_0x4f3c('0x61')]=_0x5456a0;}}return _0xffa6b9;});});}else{return;}})[_0x4f3c('0x25')](function(_0x546187){if(_0x546187)_0x39482f=_0x546187;if(_[_0x4f3c('0x60')](_0x4d8efb,0x709)){var _0x1d2f9a=_['find'](_0x39482f,{'sectionId':0x709});return getPlugins(_0x1d2f9a)[_0x4f3c('0x25')](function(_0x122778){if(_0x1d2f9a[_0x4f3c('0x62')]){return _[_0x4f3c('0x2a')](_0x39482f,function(_0x5e36b5){if(_0x5e36b5[_0x4f3c('0x53')]===0x709){_0x5e36b5[_0x4f3c('0x61')]=_0x122778;}return _0x5e36b5;});}else{var _0x70474b={'sectionId':0x76c,'enabled':0x1,'subsections':_0x122778};var _0x44442e=_[_0x4f3c('0x2a')](_0x39482f);_0x44442e[_0x4f3c('0x5c')](_0x70474b);return _0x44442e;}});}else{return;}})[_0x4f3c('0x25')](function(_0x39801f){if(_0x39801f)_0x39482f=_0x39801f;return _['filter'](_0x39482f,['enabled',0x1]);})[_0x4f3c('0x25')](respondWithResult(_0x46356b,null))['catch'](handleError(_0x46356b,null));};function hasDefaultDashboard(_0x45b002){var _0x478d89=[0x65];return new BPromise(function(_0x4a88c1,_0x15f1fc){try{if(_0x45b002[_0x4f3c('0x51')]){_0x4a88c1(_0x478d89);}else{return db['UserProfileResource'][_0x4f3c('0x63')]({'where':{'sectionId':_0x45b002['id']},'raw':!![]})[_0x4f3c('0x25')](function(_0x409f66){_0x409f66?_0x4a88c1(_0x478d89):_0x4a88c1();});}}catch(_0x599b34){_0x15f1fc(_0x599b34);}});}function getCustomDashboards(_0x12dfe5){var _0xae9ffa=[];return new BPromise(function(_0x15fe68,_0x308b30){try{if(_0x12dfe5[_0x4f3c('0x51')]){return db[_0x4f3c('0x64')]['findAll']({'raw':!![]})[_0x4f3c('0x25')](function(_0xac9ed0){_0xac9ed0['forEach'](function(_0x41a2ca){_0xae9ffa[_0x4f3c('0x5c')](_0x41a2ca['id']+0x1869f);});_0x15fe68(_0xae9ffa);});}else{return db[_0x4f3c('0x52')][_0x4f3c('0x42')]({'where':{'sectionId':_0x12dfe5['id']},'raw':!![]})[_0x4f3c('0x25')](function(_0x104c62){_0x104c62[_0x4f3c('0x65')](function(_0x17ed6e){_0xae9ffa[_0x4f3c('0x5c')](_0x17ed6e[_0x4f3c('0x66')]+0x1869f);});_0x15fe68(_0xae9ffa);});}}catch(_0x2b6eb1){_0x308b30(_0x2b6eb1);}});}function getPlugins(_0x14622d){var _0xa93dae=[];return new BPromise(function(_0x4e9419,_0x3079d0){try{if(_0x14622d[_0x4f3c('0x51')]){return db['Plugin'][_0x4f3c('0x42')]({'raw':!![]})['then'](function(_0xc15209){_0xc15209[_0x4f3c('0x65')](function(_0x11e069){_0xa93dae[_0x4f3c('0x5c')](_0x11e069['id']+0x15b38);});_0x4e9419(_0xa93dae);});}else{return db['UserProfileResource']['findAll']({'where':{'sectionId':_0x14622d['id']},'raw':!![]})[_0x4f3c('0x25')](function(_0x50c8a8){_0x50c8a8['forEach'](function(_0x131559){_0xa93dae['push'](_0x131559[_0x4f3c('0x66')]+0x15b38);});_0x4e9419(_0xa93dae);});}}catch(_0x41daf1){_0x3079d0(_0x41daf1);}});}exports[_0x4f3c('0x67')]=function(_0x57580e,_0x243e7b){return db[_0x4f3c('0x2b')][_0x4f3c('0x46')]({'where':{'id':_0x57580e[_0x4f3c('0x57')]['id']}})[_0x4f3c('0x25')](handleEntityNotFound(_0x243e7b,null))[_0x4f3c('0x25')](function(_0x3e9577){if(_0x3e9577){return db[_0x4f3c('0x4f')][_0x4f3c('0x5a')](function(_0x1a6424){return db[_0x4f3c('0x50')][_0x4f3c('0x42')]({'where':{'userProfileId':_0x57580e[_0x4f3c('0x57')]['id']},'attributes':['id'],'raw':!![]})[_0x4f3c('0x25')](function(_0x2d8aea){if(_0x2d8aea){return db[_0x4f3c('0x50')][_0x4f3c('0x26')]({'where':{'userProfileId':_0x57580e[_0x4f3c('0x57')]['id'],'id':_[_0x4f3c('0x2a')](_0x2d8aea,function(_0x1d46b2){return _0x1d46b2['id'];})},'transaction':_0x1a6424});}})['then'](function(_0x21494d){var _0x23cbda=_['map'](_0x57580e[_0x4f3c('0x48')],function(_0x1c52b1){_0x1c52b1['userProfileId']=_0x57580e[_0x4f3c('0x57')]['id'];return _0x1c52b1;});return db[_0x4f3c('0x50')][_0x4f3c('0x68')](_0x23cbda,{'raw':!![],'transaction':_0x1a6424});})[_0x4f3c('0x25')](function(_0x4e6604){var _0x38c49f=_['filter'](_[_0x4f3c('0x2a')](_0x4e6604,function(_0x554faa){return _0x554faa[_0x4f3c('0x4a')]({'plain':!![]});}),{'includeAll':![]});if(_0x38c49f){return db[_0x4f3c('0x50')][_0x4f3c('0x42')]({'where':{'userProfileId':_0x57580e[_0x4f3c('0x57')]['id'],'sectionId':_[_0x4f3c('0x2a')](_0x38c49f,function(_0x1c8f6a){return _0x1c8f6a['sectionId'];})},'attributes':['id','sectionId'],'raw':!![]})[_0x4f3c('0x25')](function(_0x463200){var _0x55d6b1=_[_0x4f3c('0x2a')](_0x57580e[_0x4f3c('0x48')],function(_0x31d805){_0x31d805['userProfileId']=_0x57580e['params']['id'];return _0x31d805;});return db[_0x4f3c('0x52')][_0x4f3c('0x68')](_0x55d6b1,{'raw':!![],'transaction':_0x1a6424});});}})[_0x4f3c('0x44')](handleError(_0x243e7b,null));});}})[_0x4f3c('0x25')](function(_0x131f26){var _0x24710f=_[_0x4f3c('0x2a')](_0x131f26,function(_0x2c9738){return _0x2c9738[_0x4f3c('0x4a')]({'plain':!![]});});})[_0x4f3c('0x25')](respondWithResult(_0x243e7b,null))[_0x4f3c('0x44')](handleError(_0x243e7b,null));};exports[_0x4f3c('0x69')]=function(_0x86f0ee,_0x175f73,_0x855714){return db[_0x4f3c('0x2b')][_0x4f3c('0x46')]({'where':{'id':_0x86f0ee[_0x4f3c('0x57')]['id']}})[_0x4f3c('0x25')](handleEntityNotFound(_0x175f73,null))[_0x4f3c('0x25')](function(_0x17cb0f){if(_0x17cb0f){return _0x17cb0f[_0x4f3c('0x69')](_0x86f0ee[_0x4f3c('0x31')][_0x4f3c('0x5e')]);}})[_0x4f3c('0x25')](respondWithStatusCode(_0x175f73,null))[_0x4f3c('0x44')](handleError(_0x175f73,null));};exports[_0x4f3c('0x6a')]=function(_0x2a356c,_0x2ebdd6){var _0xde71be={'raw':![],'where':{}};var _0x33306b={};var _0x7a42d2={'count':0x0,'rows':[]};var _0x3ea234=_0x2a356c[_0x4f3c('0x31')]['section'];if(typeof _0x3ea234===_0x4f3c('0x6b')){throw new db[(_0x4f3c('0x6c'))]['ValidationError'](_0x4f3c('0x6d'));}var _0xb204a3=_0x2a356c[_0x4f3c('0x31')][_0x4f3c('0x6e')]||![];var _0x4324e7=getQueryModels(_0x3ea234,_0xb204a3);if(typeof _0x4324e7[_0x4f3c('0x6f')]===_0x4f3c('0x6b')){throw new db[(_0x4f3c('0x6c'))][(_0x4f3c('0x70'))]('Invalid\x20section\x20\x27'+_0x3ea234+'\x27');}var _0x4d01ee=[];if(!_['isEmpty'](_0x4324e7[_0x4f3c('0x71')])){_0x4d01ee=_0x4324e7[_0x4f3c('0x71')];}else{_0x4d01ee=[{'name':_0x3ea234}];}return db['UserProfile'][_0x4f3c('0x63')]({'where':{'id':_0x2a356c[_0x4f3c('0x57')]['id']}})['then'](handleEntityNotFound(_0x2ebdd6,null))['then'](function(_0x5737a2){if(_0x5737a2){var _0x5c00ae=[];for(var _0x1a0a50=0x0;_0x1a0a50<_0x4d01ee['length'];_0x1a0a50++){_0x5c00ae[_0x4f3c('0x5c')](db[_0x4f3c('0x50')][_0x4f3c('0x63')]({'where':{'userProfileId':_0x5737a2['id'],'name':_0x4d01ee[_0x1a0a50][_0x4f3c('0x28')]},'raw':!![]}));}return BPromise[_0x4f3c('0x72')](_0x5c00ae);}})[_0x4f3c('0x25')](function(_0x9c81aa){var _0x409e31=_['filter'](_0x9c81aa,function(_0x2e29e1){return _0x2e29e1?_0x2e29e1:undefined;});var _0x1de5cc=_[_0x4f3c('0x3d')](_0x4d01ee,['ignore',!![]]);var _0x385c4c=_[_0x4f3c('0x73')](_0x409e31)&&_[_0x4f3c('0x73')](_0x1de5cc)?null:_[_0x4f3c('0x74')](_0x1de5cc,_0x409e31);if(_0x385c4c){var _0xb615cc=[];for(var _0x51ec22=0x0;_0x51ec22<_0x385c4c[_0x4f3c('0x37')];_0x51ec22++){var _0x13f0e5=_[_0x4f3c('0x46')](_0x4d01ee,function(_0x1b88b6){return _0x385c4c[_0x51ec22]?_0x1b88b6[_0x4f3c('0x28')]===_0x385c4c[_0x51ec22][_0x4f3c('0x28')]:null;});if(_0x13f0e5){if(_0x385c4c[_0x51ec22][_0x4f3c('0x75')]){_0xb615cc['push'](getAllResources(_0x4324e7['childModel'],_0x385c4c[_0x51ec22]));}else{if(!_0x385c4c[_0x51ec22][_0x4f3c('0x51')]){_0xb615cc[_0x4f3c('0x5c')](getAllowedResources(_0x13f0e5,_0x385c4c[_0x51ec22],_0x4324e7[_0x4f3c('0x6f')]));}else{if(_0x13f0e5['model']){_0xb615cc['push'](getAllFilteredResources(_0x13f0e5,_0x385c4c[_0x51ec22]));}}}}}return BPromise[_0x4f3c('0x72')](_0xb615cc);}else{return null;}})[_0x4f3c('0x25')](function(_0x4fc2ad){var _0x4bb9e3=_0x4fc2ad;var _0x16b261=null;if(_0x4bb9e3){_0x16b261=_0x4bb9e3[_0x4f3c('0x37')]===0x1?_0x4bb9e3[0x0]:null;}if(_0x16b261||_0x4bb9e3){var _0x51839f=db[_0x4324e7[_0x4f3c('0x6f')]][_0x4f3c('0x2c')];_0x33306b[_0x4f3c('0x30')]=_['keys'](_0x51839f);_0x33306b[_0x4f3c('0x31')]=_[_0x4f3c('0x32')](_0x2a356c[_0x4f3c('0x31')]);_0x33306b[_0x4f3c('0x33')]=_[_0x4f3c('0x34')](_0x33306b[_0x4f3c('0x30')],_0x33306b[_0x4f3c('0x31')]);_0xde71be[_0x4f3c('0x36')]=_[_0x4f3c('0x34')](_0x33306b[_0x4f3c('0x30')],qs[_0x4f3c('0x35')](_0x2a356c[_0x4f3c('0x31')][_0x4f3c('0x35')]));_0xde71be[_0x4f3c('0x36')]=_0xde71be[_0x4f3c('0x36')]['length']?_0xde71be['attributes']:_0x33306b[_0x4f3c('0x30')];if(!_0x2a356c['query'][_0x4f3c('0x38')](_0x4f3c('0x76'))){_0xde71be['limit']=qs[_0x4f3c('0x20')](_0x2a356c[_0x4f3c('0x31')]['limit']);_0xde71be['offset']=qs[_0x4f3c('0x1f')](_0x2a356c['query'][_0x4f3c('0x1f')]);}_0xde71be[_0x4f3c('0x39')]=qs[_0x4f3c('0x3a')](_0x2a356c[_0x4f3c('0x31')][_0x4f3c('0x3a')]);_0xde71be[_0x4f3c('0x3b')]=qs['filters'](_['pick'](_0x2a356c[_0x4f3c('0x31')],_0x33306b['filters']));if(_0x2a356c[_0x4f3c('0x31')][_0x4f3c('0x3d')]){_0xde71be[_0x4f3c('0x3b')]=_[_0x4f3c('0x3e')](_0xde71be[_0x4f3c('0x3b')],{'$or':_['map'](_0x51839f,function(_0x4ac37d){if(_0x4ac37d[_0x4f3c('0x2e')][_0x4f3c('0x2f')]!=='VIRTUAL'){var _0x1f3a2f={};_0x1f3a2f[_0x4ac37d[_0x4f3c('0x77')]]={'$like':'%'+_0x2a356c[_0x4f3c('0x31')]['filter']+'%'};return _0x1f3a2f;}})});}var _0x79a7cc=[];if(_0x16b261){var _0x28a827=_[_0x4f3c('0x46')](_0x4d01ee,[_0x4f3c('0x28'),_0x16b261['name']]);if(_0x28a827['field']){var _0x2ee25f={};if(_0x4324e7[_0x4f3c('0x6f')]===_0x4f3c('0x78')){_0x2ee25f[_0x28a827[_0x4f3c('0x79')]]=_[_0x4f3c('0x2a')](_0x16b261[_0x4f3c('0x7a')],'id');}else{_0x2ee25f[_0x28a827[_0x4f3c('0x79')]]=_0x16b261[_0x4f3c('0x7a')];}_0x79a7cc[_0x4f3c('0x5c')](_0x2ee25f);}else{_0xde71be[_0x4f3c('0x3b')]['id']=_0x16b261[_0x4f3c('0x7a')];}}else{for(var _0x902838=0x0;_0x902838<_0x4bb9e3[_0x4f3c('0x37')];_0x902838++){var _0x28a827=_[_0x4f3c('0x46')](_0x4d01ee,[_0x4f3c('0x28'),_0x4bb9e3[_0x902838]['name']]);if(_0x28a827[_0x4f3c('0x77')]){var _0x2ee25f={};_0x2ee25f[_0x28a827['foreignKey']]=_0x4bb9e3[_0x902838][_0x4f3c('0x7a')];_0x79a7cc[_0x4f3c('0x5c')](_0x2ee25f);}else{if(!_0xde71be[_0x4f3c('0x3b')]['id'])_0xde71be[_0x4f3c('0x3b')]['id']=[];_0x4bb9e3[_0x902838]['associatedResources'][_0x4f3c('0x65')](function(_0x78ce5d){_0xde71be[_0x4f3c('0x3b')]['id']['push'](_0x78ce5d);});}}}if(!_[_0x4f3c('0x73')](_0x79a7cc)){_0xde71be['where']=_[_0x4f3c('0x3e')](_0xde71be[_0x4f3c('0x3b')],{'$and':{'$or':_0x79a7cc}});}_0xde71be=_[_0x4f3c('0x3e')]({},_0xde71be,_0x2a356c[_0x4f3c('0x40')]);if(_0x16b261&&!_0x16b261[_0x4f3c('0x51')]&&_0x4324e7[_0x4f3c('0x6f')]==='AnalyticExtractedReport'){if(_0x2a356c['query'][_0x4f3c('0x41')]){_0xde71be[_0x4f3c('0x45')]=[{'all':!![]}];}return db[_0x4324e7['childModel']][_0x4f3c('0x42')](_0xde71be)[_0x4f3c('0x25')](function(_0x3c6044){var _0x323cb9=[];_0x3c6044[_0x4f3c('0x65')](function(_0x2ea99e){var _0x93823a;switch(_0x2ea99e['reportType']){case _0x4f3c('0x7b'):_0x93823a=_['find'](_0x16b261['associatedResources'],function(_0x18037e){return _0x18037e['id']===_0x2ea99e[_0x4f3c('0x7c')]&&_0x18037e[_0x4f3c('0x2e')]===_0x4f3c('0x7d');});break;case _0x4f3c('0x7e'):_0x93823a=_[_0x4f3c('0x46')](_0x16b261['associatedResources'],function(_0x582844){return _0x582844['id']===_0x2ea99e[_0x4f3c('0x7c')]&&_0x582844[_0x4f3c('0x2e')]===_0x4f3c('0x7f');});break;}if(_0x93823a)_0x323cb9['push'](_0x2ea99e);});_0x7a42d2[_0x4f3c('0x1e')]=_0x323cb9[_0x4f3c('0x37')];_0x7a42d2['rows']=_0x323cb9;return _0x7a42d2;});}else{return db[_0x4324e7['childModel']][_0x4f3c('0x1e')]({'where':_0xde71be[_0x4f3c('0x3b')]})[_0x4f3c('0x25')](function(_0x3dee33){_0x7a42d2[_0x4f3c('0x1e')]=_0x3dee33;if(_0x2a356c[_0x4f3c('0x31')]['includeAll']){if(_0x4324e7['childModel']===_0x4f3c('0x80')){_0xde71be['include']=[{'model':db[_0x4f3c('0x81')],'as':_0x4f3c('0x82'),'attributes':['id',_0x4f3c('0x28'),_0x4f3c('0x83')],'required':_0x2a356c[_0x4f3c('0x31')][_0x4f3c('0x84')]?!![]:![]},{'model':db[_0x4f3c('0x81')],'as':_0x4f3c('0x85'),'attributes':['id','name',_0x4f3c('0x83')],'through':_0x2a356c['query'][_0x4f3c('0x84')]?{'attributes':[],'where':{'TagId':_0x2a356c['query']['tag']||undefined}}:{},'required':_0x2a356c[_0x4f3c('0x31')]['tag']?!![]:![]}];}else{_0xde71be[_0x4f3c('0x45')]=[{'all':!![]}];}}return db[_0x4324e7[_0x4f3c('0x6f')]][_0x4f3c('0x42')](_0xde71be);})['then'](function(_0x10b203){_0x7a42d2[_0x4f3c('0x43')]=_0x10b203;return _0x7a42d2;});}}else{return _0x7a42d2;}})[_0x4f3c('0x25')](respondWithFilteredResult(_0x2ebdd6,_0xde71be))[_0x4f3c('0x44')](handleError(_0x2ebdd6,null));};function getAllResources(_0x57b198,_0x545148){return new BPromise(function(_0xf74837,_0x1ad98a){if(_0x545148){var _0x2b2a36=_0x545148['filter']?{[_0x545148['filter'][_0x4f3c('0x77')]]:_0x545148[_0x4f3c('0x3d')][_0x4f3c('0x86')]}:undefined;return db[_0x57b198][_0x4f3c('0x42')]({'where':_0x2b2a36,'raw':!![]})[_0x4f3c('0x25')](function(_0x3b2ff1){_0x545148[_0x4f3c('0x7a')]=_[_0x4f3c('0x2a')](_0x3b2ff1,'id');_0xf74837(_0x545148);})[_0x4f3c('0x44')](function(_0xe2b4){_0x1ad98a(_0xe2b4);});}else{_0xf74837(null);}});}function getAllFilteredResources(_0x3a32df,_0x58a0f9){return new BPromise(function(_0x482096,_0x4761f6){var _0x45e278=_0x3a32df[_0x4f3c('0x3d')]?{[_0x3a32df['filter'][_0x4f3c('0x77')]]:_0x3a32df[_0x4f3c('0x3d')]['value']}:undefined;return db[_0x3a32df[_0x4f3c('0x30')]][_0x4f3c('0x42')]({'where':_0x45e278,'raw':!![]})[_0x4f3c('0x25')](function(_0x5e0a5e){_0x58a0f9[_0x4f3c('0x7a')]=_[_0x4f3c('0x2a')](_0x5e0a5e,function(_0x3f5762){return _0x3f5762[_0x4f3c('0x28')];});_0x482096(_0x58a0f9);})['catch'](function(_0x3ee42e){_0x4761f6(_0x3ee42e);});});}function getAllowedResources(_0x14da4a,_0x5bf0ed,_0x240afa){return new BPromise(function(_0x2efbb7,_0x4e6dc3){if(_0x5bf0ed){return db[_0x4f3c('0x52')]['findAll']({'where':{'sectionId':_0x5bf0ed['id']},'raw':!![]})[_0x4f3c('0x25')](function(_0x917dc5){if(_0x14da4a[_0x4f3c('0x77')]&&_0x14da4a[_0x4f3c('0x77')]!=='id'){_0x5bf0ed[_0x4f3c('0x7a')]=_[_0x4f3c('0x2a')](_0x917dc5,function(_0x52bedf){return _0x52bedf[_0x14da4a[_0x4f3c('0x77')]];});}else{if(_0x240afa===_0x4f3c('0x78')){_0x5bf0ed[_0x4f3c('0x7a')]=_[_0x4f3c('0x2a')](_0x917dc5,function(_0x3704bd){return{'id':_0x3704bd[_0x4f3c('0x66')],'type':_0x3704bd[_0x4f3c('0x2e')]};});}else{_0x5bf0ed[_0x4f3c('0x7a')]=_[_0x4f3c('0x2a')](_0x917dc5,function(_0x4ba30a){return _0x4ba30a[_0x4f3c('0x66')];});}}_0x2efbb7(_0x5bf0ed);})[_0x4f3c('0x44')](function(_0x1ebbbe){_0x4e6dc3(_0x1ebbbe);});}else{_0x2efbb7(null);}});}function getQueryModels(_0x3a57ca,_0x5849e2){var _0x32afc9=_0x3a57ca['toLowerCase']();var _0x50a5a2={'childModel':undefined,'parentSections':[]};switch(_0x32afc9){case _0x4f3c('0x87'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x88');break;case _0x4f3c('0x89'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x8a');break;case _0x4f3c('0x8b'):_0x50a5a2['childModel']=_0x4f3c('0x8c');_0x50a5a2[_0x4f3c('0x71')]=[{'name':_0x4f3c('0x8d'),'field':'name','foreignKey':'projectName'}];break;case'projects':_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x8e');break;case _0x4f3c('0x8f'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x80');_0x50a5a2[_0x4f3c('0x71')]=[{'name':_0x4f3c('0x90'),'field':'id','foreignKey':_0x4f3c('0x91')}];break;case _0x4f3c('0x92'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x93');break;case _0x4f3c('0x94'):_0x50a5a2[_0x4f3c('0x6f')]='CmCompany';break;case _0x4f3c('0x95'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x96');break;case _0x4f3c('0x97'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x98');break;case _0x4f3c('0x99'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x9a');break;case'faxqueues':_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x9b');break;case _0x4f3c('0x9c'):_0x50a5a2[_0x4f3c('0x6f')]='FaxAccount';break;case _0x4f3c('0x9d'):case _0x4f3c('0x9e'):case _0x4f3c('0x9f'):_0x50a5a2[_0x4f3c('0x6f')]='VoiceExtension';break;case _0x4f3c('0xa0'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xa1');break;case _0x4f3c('0xa2'):_0x50a5a2[_0x4f3c('0x6f')]='VoiceMail';break;case'voicerecordings':_0x50a5a2['childModel']='VoiceRecording';_0x50a5a2[_0x4f3c('0x71')]=[{'name':_0x4f3c('0xa3'),'field':_0x4f3c('0x28'),'foreignKey':_0x4f3c('0xa4'),'model':_0x4f3c('0xa5'),'filter':{'field':'role','value':[_0x4f3c('0xa6')]}},{'name':_0x4f3c('0xa7'),'field':_0x4f3c('0x28'),'foreignKey':_0x4f3c('0xa4'),'model':_0x4f3c('0xa5'),'filter':{'field':_0x4f3c('0xa8'),'value':[_0x4f3c('0xa9')]}},{'name':_0x4f3c('0xaa'),'field':_0x4f3c('0x28'),'foreignKey':'queue','model':'VoiceQueue','filter':{'field':_0x4f3c('0x2e'),'value':['inbound']}},{'name':_0x4f3c('0xab'),'field':_0x4f3c('0x28'),'foreignKey':_0x4f3c('0xac'),'model':'VoiceQueue','filter':{'field':_0x4f3c('0x2e'),'value':[_0x4f3c('0xad')]}}];break;case _0x4f3c('0xae'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xaf');break;case _0x4f3c('0xb0'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xb1');break;case _0x4f3c('0xb2'):_0x50a5a2['childModel']='VoicePrefix';break;case _0x4f3c('0xb3'):_0x50a5a2['childModel']=_0x4f3c('0xb4');break;case'mailqueues':_0x50a5a2[_0x4f3c('0x6f')]='MailQueue';break;case _0x4f3c('0xb5'):_0x50a5a2[_0x4f3c('0x6f')]='MailAccount';break;case'mailsubstatuses':_0x50a5a2[_0x4f3c('0x6f')]='MailSubstatus';break;case _0x4f3c('0xb6'):_0x50a5a2['childModel']=_0x4f3c('0xb7');break;case _0x4f3c('0xb8'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xb9');break;case _0x4f3c('0xba'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xbb');break;case _0x4f3c('0xbc'):_0x50a5a2[_0x4f3c('0x6f')]='SmsAccount';break;case _0x4f3c('0xbd'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xbe');break;case _0x4f3c('0xbf'):case _0x4f3c('0xc0'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xc1');if(_0x5849e2){_0x50a5a2['parentSections']=[{'name':_0x4f3c('0xaa')},{'name':_0x4f3c('0xab')}];}break;case _0x4f3c('0xc2'):case _0x4f3c('0xc3'):case _0x4f3c('0xc4'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xa5');if(_0x5849e2){_0x50a5a2[_0x4f3c('0x71')]=[{'name':_0x4f3c('0xc5'),'filter':{'field':_0x4f3c('0xa8'),'value':[_0x4f3c('0xc6'),_0x4f3c('0xc7')]},'ignore':!![]},{'name':_0x4f3c('0xa3')},{'name':_0x4f3c('0xa7')}];}break;case _0x4f3c('0xc8'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xc9');break;case _0x4f3c('0xca'):_0x50a5a2[_0x4f3c('0x6f')]='SalesforceAccount';break;case'freshdeskaccounts':_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xcb');break;case'sugarcrmaccounts':_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xcc');break;case _0x4f3c('0xcd'):_0x50a5a2['childModel']=_0x4f3c('0xce');break;case _0x4f3c('0xcf'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xd0');break;case _0x4f3c('0xd1'):_0x50a5a2['childModel']=_0x4f3c('0xa5');break;case _0x4f3c('0xd2'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xd3');break;case'dispositions':_0x50a5a2[_0x4f3c('0x6f')]='Disposition';break;case _0x4f3c('0xd4'):_0x50a5a2[_0x4f3c('0x6f')]='Dashboard';break;case _0x4f3c('0xd5'):_0x50a5a2[_0x4f3c('0x6f')]='Interval';break;case _0x4f3c('0xd6'):_0x50a5a2['childModel']='Pause';break;case _0x4f3c('0xd7'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xd8');break;case _0x4f3c('0xd9'):_0x50a5a2[_0x4f3c('0x6f')]='Sound';break;case _0x4f3c('0xda'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x81');break;case _0x4f3c('0xdb'):_0x50a5a2[_0x4f3c('0x6f')]='Template';break;case _0x4f3c('0xdc'):_0x50a5a2['childModel']='Trigger';break;case _0x4f3c('0xdd'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xde');break;case'variables':_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xdf');break;case _0x4f3c('0xe0'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xe1');break;case _0x4f3c('0xe2'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0x78');_0x50a5a2['parentSections']=[{'name':_0x4f3c('0xe3'),'field':'id','foreignKey':_0x4f3c('0x7c')}];break;case _0x4f3c('0xe4'):_0x50a5a2[_0x4f3c('0x6f')]=_0x4f3c('0xe5');break;default:return _0x50a5a2;}return _0x50a5a2;}
\ No newline at end of file
+var _0xab9f=['then','includeAll','findAll','rows','catch','show','params','include','options','find','create','body','clone','get','omit','updatedAt','transaction','UserProfileSection','each','autoAssociation','UserProfileResource','createdAt','userProfileId','Resources','describe','addSections','sequelize','removeSections','ids','getSections','includes','isEmpty','sectionId','subsections','enabled','findOne','Dashboard','forEach','push','Plugin','resourceId','addResources','bulkCreate','removeResources','getResources','section','undefined','ValidationError','Unknown\x20section','Invalid\x20section\x20\x27','parentSections','all','ignore','union','childModel','field','AnalyticExtractedReport','foreignKey','associatedResources','reportType','default','reportId','custom','CustomReports','CmContact','Tag','color','tag','ThroughTags','value','toLowerCase','squareprojects','SquareProject','odbc','SquareOdbc','squarerecordings','SquareRecording','SquareProjects','projects','contacts','ListId','lists','CmList','companies','CmCompany','globalcustomfields','chatqueues','ChatQueue','ChatWebsite','faxqueues','FaxQueue','faxaccounts','FaxAccount','inboundroutes','internalroutes','VoiceExtension','contexts','VoiceContext','voicerecordings','VoiceRecording','Agents','membername','User','Telephones','role','telephone','VoiceQueues','queue','VoiceQueue','inbound','musiconholds','VoiceMusicOnHold','VoiceChanSpy','voiceprefixes','VoicePrefix','ivrcampaigns','Campaign','mailqueues','MailAccount','mailsubstatuses','OpenchannelQueue','openchannelaccounts','OpenchannelAccount','SmsAccount','teams','Team','voicequeues','queuecampaigns','agents','telephones','Users','admin','user','zendeskaccounts','salesforceaccounts','SalesforceAccount','freshdeskaccounts','FreshdeskAccount','sugarcrmaccounts','SugarcrmAccount','deskaccounts','DeskAccount','zohoaccounts','ZohoAccount','cannedanswers','CannedAnswer','dispositions','Disposition','customdashboards','intervals','Interval','Pause','Schedule','sounds','Sound','tags','templates','Template','triggers','Trigger','trunks','variables','plugins','extractedreports','Reports','metrics','AnalyticMetric','html-pdf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','defaults','redis','localhost','socket.io-emitter','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','update','destroy','error','name','send','index','map','UserProfile','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','filters','pick','filter','merge','VIRTUAL'];(function(_0x5a85e9,_0x2f405e){var _0x4e925a=function(_0x5e9e9){while(--_0x5e9e9){_0x5a85e9['push'](_0x5a85e9['shift']());}};_0x4e925a(++_0x2f405e);}(_0xab9f,0x193));var _0xfab9=function(_0x39e8f5,_0xb151a6){_0x39e8f5=_0x39e8f5-0x0;var _0x346526=_0xab9f[_0x39e8f5];return _0x346526;};'use strict';var pdf=require(_0xfab9('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xfab9('0x1'));var jsonpatch=require(_0xfab9('0x2'));var rp=require(_0xfab9('0x3'));var moment=require(_0xfab9('0x4'));var BPromise=require(_0xfab9('0x5'));var Mustache=require(_0xfab9('0x6'));var util=require(_0xfab9('0x7'));var path=require(_0xfab9('0x8'));var sox=require(_0xfab9('0x9'));var csv=require('to-csv');var ejs=require(_0xfab9('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xfab9('0xb'));var crypto=require('crypto');var jsforce=require(_0xfab9('0xc'));var deskjs=require(_0xfab9('0xd'));var toCsv=require(_0xfab9('0xe'));var querystring=require(_0xfab9('0xf'));var Papa=require(_0xfab9('0x10'));var Redis=require(_0xfab9('0x11'));var authService=require(_0xfab9('0x12'));var qs=require(_0xfab9('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfab9('0x14'));var logger=require(_0xfab9('0x15'))(_0xfab9('0x16'));var utils=require(_0xfab9('0x17'));var config=require(_0xfab9('0x18'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xfab9('0x19')](config[_0xfab9('0x1a')],{'host':_0xfab9('0x1b'),'port':0x18eb});var socket=require(_0xfab9('0x1c'))(new Redis(config[_0xfab9('0x1a')]));require('./userProfile.socket')['register'](socket);function respondWithStatusCode(_0xf4be12,_0x2a41dd){_0x2a41dd=_0x2a41dd||0xcc;return function(_0xaf9818){if(_0xaf9818){return _0xf4be12[_0xfab9('0x1d')](_0x2a41dd);}return _0xf4be12[_0xfab9('0x1e')](_0x2a41dd)[_0xfab9('0x1f')]();};}function respondWithResult(_0x2d41fa,_0x5e99d0){_0x5e99d0=_0x5e99d0||0xc8;return function(_0x2671ed){if(_0x2671ed){return _0x2d41fa[_0xfab9('0x1e')](_0x5e99d0)[_0xfab9('0x20')](_0x2671ed);}};}function respondWithFilteredResult(_0x384acb,_0x374fd9){return function(_0x430044){if(_0x430044){var _0x403789=_0x430044[_0xfab9('0x21')],_0x4f6118=_0x374fd9[_0xfab9('0x22')],_0x3a5c26=_0x374fd9[_0xfab9('0x22')]+_0x374fd9['limit'],_0x875ee6;if(_0x3a5c26>=_0x403789){_0x3a5c26=_0x403789;_0x875ee6=0xc8;}else{_0x875ee6=0xce;}_0x384acb[_0xfab9('0x1e')](_0x875ee6);return _0x384acb[_0xfab9('0x23')](_0xfab9('0x24'),_0x4f6118+'-'+_0x3a5c26+'/'+_0x403789)[_0xfab9('0x20')](_0x430044);}return null;};}function patchUpdates(_0x546820){return function(_0x5d7e75){try{jsonpatch[_0xfab9('0x25')](_0x5d7e75,_0x546820,!![]);}catch(_0x18de2e){return BPromise[_0xfab9('0x26')](_0x18de2e);}return _0x5d7e75['save']();};}function saveUpdates(_0x1298d6,_0x484e0b){return function(_0x17a0ce){if(_0x17a0ce){return _0x17a0ce[_0xfab9('0x27')](_0x1298d6)['then'](function(_0x3e7d20){return _0x3e7d20;});}return null;};}function removeEntity(_0x3070a6,_0x365ac0){return function(_0x28c7c2){if(_0x28c7c2){return _0x28c7c2[_0xfab9('0x28')]()['then'](function(){_0x3070a6[_0xfab9('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x18c571,_0x2b94e5){return function(_0x52a5b0){if(!_0x52a5b0){_0x18c571['sendStatus'](0x194);}return _0x52a5b0;};}function handleError(_0x287863,_0x15097f){_0x15097f=_0x15097f||0x1f4;return function(_0x3a84cc){logger[_0xfab9('0x29')](_0x3a84cc['stack']);if(_0x3a84cc[_0xfab9('0x2a')]){delete _0x3a84cc[_0xfab9('0x2a')];}_0x287863['status'](_0x15097f)[_0xfab9('0x2b')](_0x3a84cc);};}exports[_0xfab9('0x2c')]=function(_0x4f5042,_0x1cd66b){var _0x50d248={},_0x4479f1={},_0x2f663d={'count':0x0,'rows':[]};var _0x11f11d=_[_0xfab9('0x2d')](db[_0xfab9('0x2e')][_0xfab9('0x2f')],function(_0x68065b){return{'name':_0x68065b[_0xfab9('0x30')],'type':_0x68065b[_0xfab9('0x31')][_0xfab9('0x32')]};});_0x4479f1[_0xfab9('0x33')]=_[_0xfab9('0x2d')](_0x11f11d,_0xfab9('0x2a'));_0x4479f1[_0xfab9('0x34')]=_[_0xfab9('0x35')](_0x4f5042[_0xfab9('0x34')]);_0x4479f1['filters']=_[_0xfab9('0x36')](_0x4479f1[_0xfab9('0x33')],_0x4479f1[_0xfab9('0x34')]);_0x50d248[_0xfab9('0x37')]=_['intersection'](_0x4479f1[_0xfab9('0x33')],qs[_0xfab9('0x38')](_0x4f5042[_0xfab9('0x34')][_0xfab9('0x38')]));_0x50d248[_0xfab9('0x37')]=_0x50d248[_0xfab9('0x37')][_0xfab9('0x39')]?_0x50d248['attributes']:_0x4479f1[_0xfab9('0x33')];if(!_0x4f5042[_0xfab9('0x34')][_0xfab9('0x3a')](_0xfab9('0x3b'))){_0x50d248['limit']=qs[_0xfab9('0x3c')](_0x4f5042['query'][_0xfab9('0x3c')]);_0x50d248[_0xfab9('0x22')]=qs[_0xfab9('0x22')](_0x4f5042['query']['offset']);}_0x50d248[_0xfab9('0x3d')]=qs[_0xfab9('0x3e')](_0x4f5042['query']['sort']);_0x50d248[_0xfab9('0x3f')]=qs[_0xfab9('0x40')](_[_0xfab9('0x41')](_0x4f5042[_0xfab9('0x34')],_0x4479f1[_0xfab9('0x40')]));if(_0x4f5042[_0xfab9('0x34')][_0xfab9('0x42')]){_0x50d248[_0xfab9('0x3f')]=_[_0xfab9('0x43')](_0x50d248[_0xfab9('0x3f')],{'$or':_[_0xfab9('0x2d')](_0x11f11d,function(_0x6d81c){if(_0x6d81c[_0xfab9('0x31')]!==_0xfab9('0x44')){var _0x296ff1={};_0x296ff1[_0x6d81c[_0xfab9('0x2a')]]={'$like':'%'+_0x4f5042[_0xfab9('0x34')][_0xfab9('0x42')]+'%'};return _0x296ff1;}})});}_0x50d248=_['merge']({},_0x50d248,_0x4f5042['options']);var _0x1c1cb8={'where':_0x50d248['where']};return db[_0xfab9('0x2e')]['count'](_0x1c1cb8)[_0xfab9('0x45')](function(_0x39deea){_0x2f663d[_0xfab9('0x21')]=_0x39deea;if(_0x4f5042['query'][_0xfab9('0x46')]){_0x50d248['include']=[{'all':!![]}];}return db[_0xfab9('0x2e')][_0xfab9('0x47')](_0x50d248);})[_0xfab9('0x45')](function(_0x4c17a0){_0x2f663d[_0xfab9('0x48')]=_0x4c17a0;return _0x2f663d;})['then'](respondWithFilteredResult(_0x1cd66b,_0x50d248))[_0xfab9('0x49')](handleError(_0x1cd66b,null));};exports[_0xfab9('0x4a')]=function(_0x4f3e4c,_0x10c96b){var _0x41322f={'raw':![],'where':{'id':_0x4f3e4c[_0xfab9('0x4b')]['id']}},_0x50ee47={};_0x50ee47[_0xfab9('0x33')]=_[_0xfab9('0x35')](db['UserProfile'][_0xfab9('0x2f')]);_0x50ee47['query']=_['keys'](_0x4f3e4c[_0xfab9('0x34')]);_0x50ee47[_0xfab9('0x40')]=_[_0xfab9('0x36')](_0x50ee47[_0xfab9('0x33')],_0x50ee47[_0xfab9('0x34')]);_0x41322f[_0xfab9('0x37')]=_[_0xfab9('0x36')](_0x50ee47['model'],qs[_0xfab9('0x38')](_0x4f3e4c[_0xfab9('0x34')]['fields']));_0x41322f[_0xfab9('0x37')]=_0x41322f['attributes'][_0xfab9('0x39')]?_0x41322f[_0xfab9('0x37')]:_0x50ee47[_0xfab9('0x33')];if(_0x4f3e4c[_0xfab9('0x34')][_0xfab9('0x46')]){_0x41322f[_0xfab9('0x4c')]=[{'all':!![]}];}_0x41322f=_[_0xfab9('0x43')]({},_0x41322f,_0x4f3e4c[_0xfab9('0x4d')]);return db[_0xfab9('0x2e')][_0xfab9('0x4e')](_0x41322f)[_0xfab9('0x45')](handleEntityNotFound(_0x10c96b,null))[_0xfab9('0x45')](respondWithResult(_0x10c96b,null))[_0xfab9('0x49')](handleError(_0x10c96b,null));};exports['create']=function(_0x346927,_0x10ef78){return db[_0xfab9('0x2e')][_0xfab9('0x4f')](_0x346927[_0xfab9('0x50')],{})[_0xfab9('0x45')](respondWithResult(_0x10ef78,0xc9))[_0xfab9('0x49')](handleError(_0x10ef78,null));};exports[_0xfab9('0x51')]=function(_0x36089b,_0x44066e){var _0x4fa5a9={'where':{'id':_0x36089b[_0xfab9('0x4b')]['id']}},_0x5d04aa={};_0x5d04aa['model']=_[_0xfab9('0x35')](db[_0xfab9('0x2e')]['rawAttributes']);_0x4fa5a9['attributes']=_[_0xfab9('0x36')](_0x5d04aa[_0xfab9('0x33')],qs['fields'](_0x36089b[_0xfab9('0x34')]['fields']));_0x4fa5a9[_0xfab9('0x37')]=_0x4fa5a9[_0xfab9('0x37')][_0xfab9('0x39')]?_0x4fa5a9['attributes']:_0x5d04aa[_0xfab9('0x33')];if(_0x36089b[_0xfab9('0x34')][_0xfab9('0x46')]){_0x4fa5a9[_0xfab9('0x4c')]=[{'all':!![]}];}_0x4fa5a9=_[_0xfab9('0x43')]({},_0x4fa5a9,_0x36089b[_0xfab9('0x4d')]);return db['UserProfile'][_0xfab9('0x4e')](_0x4fa5a9)[_0xfab9('0x45')](handleEntityNotFound(_0x44066e,null))[_0xfab9('0x45')](function(_0x248afd){if(_0x248afd){var _0x4dcc3f=_0x248afd[_0xfab9('0x52')]({'plain':!![]});_0x4dcc3f=qs['omit'](_0x4dcc3f,['id','createdAt','updatedAt','crudPermissions']);_0x36089b[_0xfab9('0x50')]=_[_0xfab9('0x53')](_0x36089b[_0xfab9('0x50')],['id','createdAt',_0xfab9('0x54')]);return db['sequelize'][_0xfab9('0x55')](function(_0x4bf0cf){return db[_0xfab9('0x2e')]['create'](_[_0xfab9('0x43')](_0x4dcc3f,_0x36089b[_0xfab9('0x50')]),{'include':_0x36089b[_0xfab9('0x34')][_0xfab9('0x46')]?[{'all':!![]}]:undefined,'transaction':_0x4bf0cf})[_0xfab9('0x45')](function(_0x87ef25){var _0x3efe43=_0x87ef25[_0xfab9('0x52')]({'plain':!![]});return db[_0xfab9('0x56')][_0xfab9('0x47')]({'where':{'userProfileId':_0x36089b[_0xfab9('0x4b')]['id']},'raw':!![]})['then'](function(_0x45e9c7){if(_0x45e9c7){return BPromise[_0xfab9('0x57')](_0x45e9c7,function(_0x2d42e1){return new BPromise(function(_0x133370,_0x33e4c1){if(_0x2d42e1[_0xfab9('0x58')]===null||_0x2d42e1['autoAssociation']===0x1)_0x133370(null);return db[_0xfab9('0x59')][_0xfab9('0x47')]({'where':{'sectionId':_0x2d42e1['id']},'raw':!![]})[_0xfab9('0x45')](function(_0x545ef2){var _0x42b21c=_['map'](_0x545ef2,function(_0x302572){return qs[_0xfab9('0x53')](_0x302572,['id',_0xfab9('0x5a'),'updatedAt','sectionId']);});_0x133370(_0x42b21c);})[_0xfab9('0x49')](function(_0x2739b3){_0x33e4c1(_0x2739b3);});})[_0xfab9('0x45')](function(_0x5d5f8c){var _0x425216=qs[_0xfab9('0x53')](_0x2d42e1,['id',_0xfab9('0x5a'),_0xfab9('0x54')]);_0x425216[_0xfab9('0x5b')]=_0x3efe43['id'];if(_0x5d5f8c)_0x425216[_0xfab9('0x5c')]=_0x5d5f8c;return _0x425216;})['then'](function(_0x556886){return db[_0xfab9('0x56')][_0xfab9('0x4f')](_0x556886,{'include':[{'model':db[_0xfab9('0x59')],'as':_0xfab9('0x5c')}],'raw':!![],'transaction':_0x4bf0cf});});})[_0xfab9('0x45')](function(){return _0x3efe43;});}});});});}})[_0xfab9('0x45')](respondWithResult(_0x44066e,0xc9))[_0xfab9('0x49')](handleError(_0x44066e,null));};exports[_0xfab9('0x27')]=function(_0x40c47d,_0x4d5c96){if(_0x40c47d[_0xfab9('0x50')]['id']){delete _0x40c47d['body']['id'];}return db[_0xfab9('0x2e')][_0xfab9('0x4e')]({'where':{'id':_0x40c47d[_0xfab9('0x4b')]['id']}})[_0xfab9('0x45')](handleEntityNotFound(_0x4d5c96,null))[_0xfab9('0x45')](saveUpdates(_0x40c47d[_0xfab9('0x50')],null))[_0xfab9('0x45')](respondWithResult(_0x4d5c96,null))[_0xfab9('0x49')](handleError(_0x4d5c96,null));};exports['destroy']=function(_0x4542e2,_0x24dee9){return db[_0xfab9('0x2e')]['find']({'where':{'id':_0x4542e2[_0xfab9('0x4b')]['id']}})[_0xfab9('0x45')](handleEntityNotFound(_0x24dee9,null))[_0xfab9('0x45')](removeEntity(_0x24dee9,null))['catch'](handleError(_0x24dee9,null));};exports[_0xfab9('0x5d')]=function(_0x2ccab6,_0xcbf35e){return db[_0xfab9('0x2e')]['describe']()['then'](respondWithResult(_0xcbf35e,null))[_0xfab9('0x49')](handleError(_0xcbf35e,null));};exports[_0xfab9('0x5e')]=function(_0x167349,_0x14c92e){var _0x2df89a=_0x167349[_0xfab9('0x50')];return db[_0xfab9('0x2e')]['find']({'where':{'id':_0x167349['params']['id']}})['then'](handleEntityNotFound(_0x14c92e,null))[_0xfab9('0x45')](function(_0x4a582e){if(_0x4a582e){return db[_0xfab9('0x5f')]['transaction'](function(_0x13d5ac){return db[_0xfab9('0x56')][_0xfab9('0x28')]({'where':{'userProfileId':_0x167349['params']['id'],'sectionId':_['map'](_0x2df89a,function(_0x40596e){return _0x40596e['sectionId'];})},'transaction':_0x13d5ac})[_0xfab9('0x45')](function(){var _0x1858b5=_[_0xfab9('0x2d')](_0x2df89a,function(_0x18a985){_0x18a985[_0xfab9('0x5b')]=_0x167349[_0xfab9('0x4b')]['id'];return _0x18a985;});var _0x59bd13=[];return BPromise[_0xfab9('0x57')](_0x1858b5,function(_0x17b50e){return db[_0xfab9('0x56')][_0xfab9('0x4f')](_0x17b50e,{'include':[{'model':db[_0xfab9('0x59')],'as':_0xfab9('0x5c')}],'raw':!![],'transaction':_0x13d5ac})[_0xfab9('0x45')](function(_0x21a91c){_0x59bd13['push'](_0x21a91c['get']({'plain':!![]}));});})['then'](function(){return _0x59bd13;});});});}})['then'](function(_0x4325bb){return _0x4325bb;})[_0xfab9('0x45')](respondWithResult(_0x14c92e,null))['catch'](handleError(_0x14c92e,null));};exports[_0xfab9('0x60')]=function(_0x19b26c,_0x2a4c43){var _0x5bdfd2;return db['UserProfile']['find']({'where':{'id':_0x19b26c[_0xfab9('0x4b')]['id']},'attributes':['id',_0xfab9('0x2a')]})['then'](handleEntityNotFound(_0x2a4c43,null))[_0xfab9('0x45')](function(_0x457e47){if(_0x457e47){_0x5bdfd2=_0x457e47;return db[_0xfab9('0x56')][_0xfab9('0x28')]({'where':{'userProfileId':_0x19b26c['params']['id'],'sectionId':_0x19b26c[_0xfab9('0x34')][_0xfab9('0x61')]}});}})['then'](function(){return _0x5bdfd2;})[_0xfab9('0x45')](respondWithStatusCode(_0x2a4c43,null))[_0xfab9('0x49')](handleError(_0x2a4c43,null));};exports[_0xfab9('0x62')]=function(_0x183c02,_0x5ccbdf){var _0x4dcfe6=[];var _0x4e643e=[];return db[_0xfab9('0x56')][_0xfab9('0x47')]({'where':{'userProfileId':_0x183c02[_0xfab9('0x4b')]['id']},'raw':!![]})[_0xfab9('0x45')](function(_0x4a3ea7){_0x4dcfe6=_['filter'](_0x4a3ea7,function(_0x51c957){return _0x51c957['enabled']===0x1||_[_0xfab9('0x63')]([0x3eb,0x709],_0x51c957['sectionId']);});if(!_[_0xfab9('0x64')](_0x4dcfe6)){return _[_0xfab9('0x2d')](_0x4dcfe6,function(_0xa1b357){return _0xa1b357[_0xfab9('0x65')];});}else{return;}})[_0xfab9('0x45')](function(_0xb66233){if(_0xb66233)_0x4e643e=_0xb66233;if(_['includes'](_0x4e643e,0x64)){var _0x395dd8=_[_0xfab9('0x4e')](_0x4dcfe6,{'sectionId':0x64});return hasDefaultDashboard(_0x395dd8)[_0xfab9('0x45')](function(_0x20a7a7){return _[_0xfab9('0x2d')](_0x4dcfe6,function(_0x5a2e1c){if(_0x5a2e1c['sectionId']===0x64){_0x5a2e1c['subsections']=_0x20a7a7;}return _0x5a2e1c;});});}else{return;}})[_0xfab9('0x45')](function(_0x4c587a){if(_0x4c587a)_0x4dcfe6=_0x4c587a;if(_[_0xfab9('0x63')](_0x4e643e,0x3eb)){var _0x3dfc95=_[_0xfab9('0x4e')](_0x4dcfe6,{'sectionId':0x3eb});return getCustomDashboards(_0x3dfc95)[_0xfab9('0x45')](function(_0x101dc4){return _[_0xfab9('0x2d')](_0x4dcfe6,function(_0x5cf6d3){if(_0x3dfc95['enabled']){if(_0x5cf6d3[_0xfab9('0x65')]===0x3eb){_0x5cf6d3[_0xfab9('0x66')]=_0x101dc4;}}else{if(_0x5cf6d3[_0xfab9('0x65')]===0x64){_0x5cf6d3[_0xfab9('0x66')]=_0x101dc4;}}return _0x5cf6d3;});});}else{return;}})[_0xfab9('0x45')](function(_0x18b604){if(_0x18b604)_0x4dcfe6=_0x18b604;if(_['includes'](_0x4e643e,0x709)){var _0x3c9e9d=_[_0xfab9('0x4e')](_0x4dcfe6,{'sectionId':0x709});return getPlugins(_0x3c9e9d)[_0xfab9('0x45')](function(_0x10b2fd){if(_0x3c9e9d[_0xfab9('0x67')]){return _['map'](_0x4dcfe6,function(_0x63cf71){if(_0x63cf71[_0xfab9('0x65')]===0x709){_0x63cf71['subsections']=_0x10b2fd;}return _0x63cf71;});}else{var _0x4161d4={'sectionId':0x76c,'enabled':0x1,'subsections':_0x10b2fd};var _0x46bf5f=_['map'](_0x4dcfe6);_0x46bf5f['push'](_0x4161d4);return _0x46bf5f;}});}else{return;}})[_0xfab9('0x45')](function(_0x1f0cc4){if(_0x1f0cc4)_0x4dcfe6=_0x1f0cc4;return _[_0xfab9('0x42')](_0x4dcfe6,[_0xfab9('0x67'),0x1]);})[_0xfab9('0x45')](respondWithResult(_0x5ccbdf,null))[_0xfab9('0x49')](handleError(_0x5ccbdf,null));};function hasDefaultDashboard(_0x4555c4){var _0x17dee0=[0x65];return new BPromise(function(_0x482df5,_0x5436ab){try{if(_0x4555c4[_0xfab9('0x58')]){_0x482df5(_0x17dee0);}else{return db[_0xfab9('0x59')][_0xfab9('0x68')]({'where':{'sectionId':_0x4555c4['id']},'raw':!![]})[_0xfab9('0x45')](function(_0x4f9ef0){_0x4f9ef0?_0x482df5(_0x17dee0):_0x482df5();});}}catch(_0x5a593c){_0x5436ab(_0x5a593c);}});}function getCustomDashboards(_0x4b9faf){var _0x2cdfbd=[];return new BPromise(function(_0x3f4eda,_0x174c9b){try{if(_0x4b9faf[_0xfab9('0x58')]){return db[_0xfab9('0x69')][_0xfab9('0x47')]({'raw':!![]})[_0xfab9('0x45')](function(_0x2e5601){_0x2e5601[_0xfab9('0x6a')](function(_0x3ce3da){_0x2cdfbd[_0xfab9('0x6b')](_0x3ce3da['id']+0x1869f);});_0x3f4eda(_0x2cdfbd);});}else{return db[_0xfab9('0x59')]['findAll']({'where':{'sectionId':_0x4b9faf['id']},'raw':!![]})[_0xfab9('0x45')](function(_0x2f94a1){_0x2f94a1[_0xfab9('0x6a')](function(_0x2c4a94){_0x2cdfbd[_0xfab9('0x6b')](_0x2c4a94['resourceId']+0x1869f);});_0x3f4eda(_0x2cdfbd);});}}catch(_0x237a57){_0x174c9b(_0x237a57);}});}function getPlugins(_0x3fcb9a){var _0x3f6079=[];return new BPromise(function(_0x415033,_0xbeb940){try{if(_0x3fcb9a[_0xfab9('0x58')]){return db[_0xfab9('0x6c')][_0xfab9('0x47')]({'raw':!![]})[_0xfab9('0x45')](function(_0x31e817){_0x31e817[_0xfab9('0x6a')](function(_0x1a71f0){_0x3f6079[_0xfab9('0x6b')](_0x1a71f0['id']+0x15b38);});_0x415033(_0x3f6079);});}else{return db[_0xfab9('0x59')]['findAll']({'where':{'sectionId':_0x3fcb9a['id']},'raw':!![]})[_0xfab9('0x45')](function(_0x1f3aff){_0x1f3aff[_0xfab9('0x6a')](function(_0x2ba124){_0x3f6079[_0xfab9('0x6b')](_0x2ba124[_0xfab9('0x6d')]+0x15b38);});_0x415033(_0x3f6079);});}}catch(_0x1f55f3){_0xbeb940(_0x1f55f3);}});}exports[_0xfab9('0x6e')]=function(_0x5be4f6,_0x50983f){return db[_0xfab9('0x2e')][_0xfab9('0x4e')]({'where':{'id':_0x5be4f6[_0xfab9('0x4b')]['id']}})['then'](handleEntityNotFound(_0x50983f,null))[_0xfab9('0x45')](function(_0x1adba2){if(_0x1adba2){return db['sequelize'][_0xfab9('0x55')](function(_0x3f6242){return db['UserProfileSection'][_0xfab9('0x47')]({'where':{'userProfileId':_0x5be4f6[_0xfab9('0x4b')]['id']},'attributes':['id'],'raw':!![]})['then'](function(_0xf09f4d){if(_0xf09f4d){return db['UserProfileSection']['destroy']({'where':{'userProfileId':_0x5be4f6['params']['id'],'id':_[_0xfab9('0x2d')](_0xf09f4d,function(_0x5d4c3b){return _0x5d4c3b['id'];})},'transaction':_0x3f6242});}})[_0xfab9('0x45')](function(_0xa118b6){var _0x2264d6=_[_0xfab9('0x2d')](_0x5be4f6[_0xfab9('0x50')],function(_0x2762bd){_0x2762bd[_0xfab9('0x5b')]=_0x5be4f6['params']['id'];return _0x2762bd;});return db['UserProfileSection'][_0xfab9('0x6f')](_0x2264d6,{'raw':!![],'transaction':_0x3f6242});})[_0xfab9('0x45')](function(_0x8cba5c){var _0x33a43a=_[_0xfab9('0x42')](_[_0xfab9('0x2d')](_0x8cba5c,function(_0x16bff5){return _0x16bff5[_0xfab9('0x52')]({'plain':!![]});}),{'includeAll':![]});if(_0x33a43a){return db[_0xfab9('0x56')][_0xfab9('0x47')]({'where':{'userProfileId':_0x5be4f6[_0xfab9('0x4b')]['id'],'sectionId':_[_0xfab9('0x2d')](_0x33a43a,function(_0x5b46db){return _0x5b46db[_0xfab9('0x65')];})},'attributes':['id',_0xfab9('0x65')],'raw':!![]})['then'](function(_0xd3da79){var _0x26e3fa=_['map'](_0x5be4f6[_0xfab9('0x50')],function(_0x5dff59){_0x5dff59[_0xfab9('0x5b')]=_0x5be4f6['params']['id'];return _0x5dff59;});return db[_0xfab9('0x59')][_0xfab9('0x6f')](_0x26e3fa,{'raw':!![],'transaction':_0x3f6242});});}})[_0xfab9('0x49')](handleError(_0x50983f,null));});}})[_0xfab9('0x45')](function(_0x4f5f2c){var _0x594310=_['map'](_0x4f5f2c,function(_0x5d666a){return _0x5d666a[_0xfab9('0x52')]({'plain':!![]});});})[_0xfab9('0x45')](respondWithResult(_0x50983f,null))['catch'](handleError(_0x50983f,null));};exports[_0xfab9('0x70')]=function(_0xd26882,_0x3ef900,_0x5e9c04){return db[_0xfab9('0x2e')][_0xfab9('0x4e')]({'where':{'id':_0xd26882[_0xfab9('0x4b')]['id']}})[_0xfab9('0x45')](handleEntityNotFound(_0x3ef900,null))[_0xfab9('0x45')](function(_0x4339ab){if(_0x4339ab){return _0x4339ab['removeResources'](_0xd26882[_0xfab9('0x34')]['ids']);}})[_0xfab9('0x45')](respondWithStatusCode(_0x3ef900,null))[_0xfab9('0x49')](handleError(_0x3ef900,null));};exports[_0xfab9('0x71')]=function(_0x319ab8,_0x4e9551){var _0x17dbe4={'raw':![],'where':{}};var _0xe8f7d8={};var _0x47f481={'count':0x0,'rows':[]};var _0x45f85c=_0x319ab8[_0xfab9('0x34')][_0xfab9('0x72')];if(typeof _0x45f85c===_0xfab9('0x73')){throw new db['Sequelize'][(_0xfab9('0x74'))](_0xfab9('0x75'));}var _0x13d68f=_0x319ab8[_0xfab9('0x34')]['mergeResources']||![];var _0x42b0d7=getQueryModels(_0x45f85c,_0x13d68f);if(typeof _0x42b0d7['childModel']===_0xfab9('0x73')){throw new db['Sequelize'][(_0xfab9('0x74'))](_0xfab9('0x76')+_0x45f85c+'\x27');}var _0x53e0a4=[];if(!_[_0xfab9('0x64')](_0x42b0d7[_0xfab9('0x77')])){_0x53e0a4=_0x42b0d7['parentSections'];}else{_0x53e0a4=[{'name':_0x45f85c}];}return db[_0xfab9('0x2e')][_0xfab9('0x68')]({'where':{'id':_0x319ab8[_0xfab9('0x4b')]['id']}})[_0xfab9('0x45')](handleEntityNotFound(_0x4e9551,null))['then'](function(_0x4410ac){if(_0x4410ac){var _0x418ada=[];for(var _0x31f747=0x0;_0x31f747<_0x53e0a4['length'];_0x31f747++){_0x418ada['push'](db[_0xfab9('0x56')][_0xfab9('0x68')]({'where':{'userProfileId':_0x4410ac['id'],'name':_0x53e0a4[_0x31f747]['name']},'raw':!![]}));}return BPromise[_0xfab9('0x78')](_0x418ada);}})[_0xfab9('0x45')](function(_0x224338){var _0x317dfc=_[_0xfab9('0x42')](_0x224338,function(_0x2856a6){return _0x2856a6?_0x2856a6:undefined;});var _0x2d4a1f=_[_0xfab9('0x42')](_0x53e0a4,[_0xfab9('0x79'),!![]]);var _0x4c7b37=_['isEmpty'](_0x317dfc)&&_[_0xfab9('0x64')](_0x2d4a1f)?null:_[_0xfab9('0x7a')](_0x2d4a1f,_0x317dfc);if(_0x4c7b37){var _0x27d38d=[];for(var _0x5ca859=0x0;_0x5ca859<_0x4c7b37['length'];_0x5ca859++){var _0x1cc80b=_[_0xfab9('0x4e')](_0x53e0a4,function(_0x19cf35){return _0x4c7b37[_0x5ca859]?_0x19cf35[_0xfab9('0x2a')]===_0x4c7b37[_0x5ca859][_0xfab9('0x2a')]:null;});if(_0x1cc80b){if(_0x4c7b37[_0x5ca859]['ignore']){_0x27d38d[_0xfab9('0x6b')](getAllResources(_0x42b0d7[_0xfab9('0x7b')],_0x4c7b37[_0x5ca859]));}else{if(!_0x4c7b37[_0x5ca859][_0xfab9('0x58')]){_0x27d38d[_0xfab9('0x6b')](getAllowedResources(_0x1cc80b,_0x4c7b37[_0x5ca859],_0x42b0d7[_0xfab9('0x7b')]));}else{if(_0x1cc80b[_0xfab9('0x33')]){_0x27d38d[_0xfab9('0x6b')](getAllFilteredResources(_0x1cc80b,_0x4c7b37[_0x5ca859]));}}}}}return BPromise['all'](_0x27d38d);}else{return null;}})['then'](function(_0x2486d5){var _0x5a1901=_0x2486d5;var _0x4ec02f=null;if(_0x5a1901){_0x4ec02f=_0x5a1901['length']===0x1?_0x5a1901[0x0]:null;}if(_0x4ec02f||_0x5a1901){var _0x50c8cc=db[_0x42b0d7['childModel']]['rawAttributes'];_0xe8f7d8[_0xfab9('0x33')]=_[_0xfab9('0x35')](_0x50c8cc);_0xe8f7d8[_0xfab9('0x34')]=_['keys'](_0x319ab8[_0xfab9('0x34')]);_0xe8f7d8['filters']=_[_0xfab9('0x36')](_0xe8f7d8[_0xfab9('0x33')],_0xe8f7d8[_0xfab9('0x34')]);_0x17dbe4[_0xfab9('0x37')]=_[_0xfab9('0x36')](_0xe8f7d8[_0xfab9('0x33')],qs['fields'](_0x319ab8[_0xfab9('0x34')][_0xfab9('0x38')]));_0x17dbe4[_0xfab9('0x37')]=_0x17dbe4[_0xfab9('0x37')]['length']?_0x17dbe4[_0xfab9('0x37')]:_0xe8f7d8[_0xfab9('0x33')];if(!_0x319ab8['query'][_0xfab9('0x3a')]('nolimit')){_0x17dbe4[_0xfab9('0x3c')]=qs[_0xfab9('0x3c')](_0x319ab8['query']['limit']);_0x17dbe4[_0xfab9('0x22')]=qs['offset'](_0x319ab8['query'][_0xfab9('0x22')]);}_0x17dbe4[_0xfab9('0x3d')]=qs[_0xfab9('0x3e')](_0x319ab8[_0xfab9('0x34')]['sort']);_0x17dbe4[_0xfab9('0x3f')]=qs[_0xfab9('0x40')](_[_0xfab9('0x41')](_0x319ab8[_0xfab9('0x34')],_0xe8f7d8[_0xfab9('0x40')]));if(_0x319ab8['query'][_0xfab9('0x42')]){_0x17dbe4[_0xfab9('0x3f')]=_[_0xfab9('0x43')](_0x17dbe4[_0xfab9('0x3f')],{'$or':_[_0xfab9('0x2d')](_0x50c8cc,function(_0x4e3e68){if(_0x4e3e68[_0xfab9('0x31')]['key']!==_0xfab9('0x44')){var _0x845288={};_0x845288[_0x4e3e68[_0xfab9('0x7c')]]={'$like':'%'+_0x319ab8[_0xfab9('0x34')][_0xfab9('0x42')]+'%'};return _0x845288;}})});}var _0x3cfc42=[];if(_0x4ec02f){var _0x1bddfa=_[_0xfab9('0x4e')](_0x53e0a4,[_0xfab9('0x2a'),_0x4ec02f['name']]);if(_0x1bddfa[_0xfab9('0x7c')]){var _0x397c6d={};if(_0x42b0d7[_0xfab9('0x7b')]===_0xfab9('0x7d')){_0x397c6d[_0x1bddfa[_0xfab9('0x7e')]]=_[_0xfab9('0x2d')](_0x4ec02f[_0xfab9('0x7f')],'id');}else{_0x397c6d[_0x1bddfa[_0xfab9('0x7e')]]=_0x4ec02f[_0xfab9('0x7f')];}_0x3cfc42[_0xfab9('0x6b')](_0x397c6d);}else{_0x17dbe4[_0xfab9('0x3f')]['id']=_0x4ec02f[_0xfab9('0x7f')];}}else{for(var _0x25d149=0x0;_0x25d149<_0x5a1901[_0xfab9('0x39')];_0x25d149++){var _0x1bddfa=_[_0xfab9('0x4e')](_0x53e0a4,['name',_0x5a1901[_0x25d149][_0xfab9('0x2a')]]);if(_0x1bddfa[_0xfab9('0x7c')]){var _0x397c6d={};_0x397c6d[_0x1bddfa[_0xfab9('0x7e')]]=_0x5a1901[_0x25d149]['associatedResources'];_0x3cfc42[_0xfab9('0x6b')](_0x397c6d);}else{if(!_0x17dbe4[_0xfab9('0x3f')]['id'])_0x17dbe4[_0xfab9('0x3f')]['id']=[];_0x5a1901[_0x25d149][_0xfab9('0x7f')][_0xfab9('0x6a')](function(_0x18dda7){_0x17dbe4['where']['id']['push'](_0x18dda7);});}}}if(!_['isEmpty'](_0x3cfc42)){_0x17dbe4[_0xfab9('0x3f')]=_[_0xfab9('0x43')](_0x17dbe4[_0xfab9('0x3f')],{'$and':{'$or':_0x3cfc42}});}_0x17dbe4=_[_0xfab9('0x43')]({},_0x17dbe4,_0x319ab8[_0xfab9('0x4d')]);if(_0x4ec02f&&!_0x4ec02f[_0xfab9('0x58')]&&_0x42b0d7['childModel']===_0xfab9('0x7d')){if(_0x319ab8[_0xfab9('0x34')][_0xfab9('0x46')]){_0x17dbe4[_0xfab9('0x4c')]=[{'all':!![]}];}return db[_0x42b0d7[_0xfab9('0x7b')]][_0xfab9('0x47')](_0x17dbe4)[_0xfab9('0x45')](function(_0x2ede21){var _0xfc2c24=[];_0x2ede21[_0xfab9('0x6a')](function(_0x4f132c){var _0x2c9844;switch(_0x4f132c[_0xfab9('0x80')]){case _0xfab9('0x81'):_0x2c9844=_['find'](_0x4ec02f[_0xfab9('0x7f')],function(_0x1edf88){return _0x1edf88['id']===_0x4f132c[_0xfab9('0x82')]&&_0x1edf88[_0xfab9('0x31')]==='DefaultReports';});break;case _0xfab9('0x83'):_0x2c9844=_['find'](_0x4ec02f[_0xfab9('0x7f')],function(_0x17a550){return _0x17a550['id']===_0x4f132c['reportId']&&_0x17a550[_0xfab9('0x31')]===_0xfab9('0x84');});break;}if(_0x2c9844)_0xfc2c24['push'](_0x4f132c);});_0x47f481[_0xfab9('0x21')]=_0xfc2c24[_0xfab9('0x39')];_0x47f481[_0xfab9('0x48')]=_0xfc2c24;return _0x47f481;});}else{return db[_0x42b0d7[_0xfab9('0x7b')]][_0xfab9('0x21')]({'where':_0x17dbe4[_0xfab9('0x3f')]})[_0xfab9('0x45')](function(_0x5c4dd6){_0x47f481['count']=_0x5c4dd6;if(_0x319ab8['query']['includeAll']){if(_0x42b0d7[_0xfab9('0x7b')]===_0xfab9('0x85')){_0x17dbe4[_0xfab9('0x4c')]=[{'model':db[_0xfab9('0x86')],'as':'Tags','attributes':['id',_0xfab9('0x2a'),_0xfab9('0x87')],'required':_0x319ab8['query'][_0xfab9('0x88')]?!![]:![]},{'model':db[_0xfab9('0x86')],'as':_0xfab9('0x89'),'attributes':['id',_0xfab9('0x2a'),_0xfab9('0x87')],'through':_0x319ab8[_0xfab9('0x34')][_0xfab9('0x88')]?{'attributes':[],'where':{'TagId':_0x319ab8['query'][_0xfab9('0x88')]||undefined}}:{},'required':_0x319ab8[_0xfab9('0x34')][_0xfab9('0x88')]?!![]:![]}];}else{_0x17dbe4[_0xfab9('0x4c')]=[{'all':!![]}];}}return db[_0x42b0d7['childModel']][_0xfab9('0x47')](_0x17dbe4);})[_0xfab9('0x45')](function(_0xc1d457){_0x47f481[_0xfab9('0x48')]=_0xc1d457;return _0x47f481;});}}else{return _0x47f481;}})['then'](respondWithFilteredResult(_0x4e9551,_0x17dbe4))[_0xfab9('0x49')](handleError(_0x4e9551,null));};function getAllResources(_0x1f520a,_0x45aeef){return new BPromise(function(_0x3cbc1f,_0x254472){if(_0x45aeef){var _0x326a2d=_0x45aeef[_0xfab9('0x42')]?{[_0x45aeef[_0xfab9('0x42')]['field']]:_0x45aeef[_0xfab9('0x42')][_0xfab9('0x8a')]}:undefined;return db[_0x1f520a][_0xfab9('0x47')]({'where':_0x326a2d,'raw':!![]})[_0xfab9('0x45')](function(_0x186184){_0x45aeef[_0xfab9('0x7f')]=_['map'](_0x186184,'id');_0x3cbc1f(_0x45aeef);})['catch'](function(_0x67536e){_0x254472(_0x67536e);});}else{_0x3cbc1f(null);}});}function getAllFilteredResources(_0x4b31cd,_0x365c3b){return new BPromise(function(_0x4ae360,_0xeee832){var _0x15316d=_0x4b31cd[_0xfab9('0x42')]?{[_0x4b31cd[_0xfab9('0x42')][_0xfab9('0x7c')]]:_0x4b31cd['filter'][_0xfab9('0x8a')]}:undefined;return db[_0x4b31cd[_0xfab9('0x33')]][_0xfab9('0x47')]({'where':_0x15316d,'raw':!![]})[_0xfab9('0x45')](function(_0x12e0e5){_0x365c3b[_0xfab9('0x7f')]=_[_0xfab9('0x2d')](_0x12e0e5,function(_0x2710dd){return _0x2710dd[_0xfab9('0x2a')];});_0x4ae360(_0x365c3b);})[_0xfab9('0x49')](function(_0x1aaa9e){_0xeee832(_0x1aaa9e);});});}function getAllowedResources(_0x3b17cc,_0x5852a2,_0x47b4a6){return new BPromise(function(_0x2de49f,_0x40d318){if(_0x5852a2){return db['UserProfileResource'][_0xfab9('0x47')]({'where':{'sectionId':_0x5852a2['id']},'raw':!![]})['then'](function(_0x36400e){if(_0x3b17cc[_0xfab9('0x7c')]&&_0x3b17cc[_0xfab9('0x7c')]!=='id'){_0x5852a2['associatedResources']=_[_0xfab9('0x2d')](_0x36400e,function(_0x575083){return _0x575083[_0x3b17cc[_0xfab9('0x7c')]];});}else{if(_0x47b4a6===_0xfab9('0x7d')){_0x5852a2[_0xfab9('0x7f')]=_['map'](_0x36400e,function(_0x4b1137){return{'id':_0x4b1137[_0xfab9('0x6d')],'type':_0x4b1137[_0xfab9('0x31')]};});}else{_0x5852a2['associatedResources']=_[_0xfab9('0x2d')](_0x36400e,function(_0x435b59){return _0x435b59[_0xfab9('0x6d')];});}}_0x2de49f(_0x5852a2);})[_0xfab9('0x49')](function(_0x4e2513){_0x40d318(_0x4e2513);});}else{_0x2de49f(null);}});}function getQueryModels(_0x468b97,_0xa4aeb3){var _0x2267ca=_0x468b97[_0xfab9('0x8b')]();var _0x4af0f6={'childModel':undefined,'parentSections':[]};switch(_0x2267ca){case _0xfab9('0x8c'):_0x4af0f6['childModel']=_0xfab9('0x8d');break;case _0xfab9('0x8e'):_0x4af0f6['childModel']=_0xfab9('0x8f');break;case _0xfab9('0x90'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0x91');_0x4af0f6[_0xfab9('0x77')]=[{'name':_0xfab9('0x92'),'field':'name','foreignKey':'projectName'}];break;case _0xfab9('0x93'):_0x4af0f6[_0xfab9('0x7b')]='JscriptyProject';break;case _0xfab9('0x94'):_0x4af0f6[_0xfab9('0x7b')]='CmContact';_0x4af0f6[_0xfab9('0x77')]=[{'name':'Lists','field':'id','foreignKey':_0xfab9('0x95')}];break;case _0xfab9('0x96'):_0x4af0f6['childModel']=_0xfab9('0x97');break;case _0xfab9('0x98'):_0x4af0f6['childModel']=_0xfab9('0x99');break;case _0xfab9('0x9a'):_0x4af0f6['childModel']='CmCustomField';break;case _0xfab9('0x9b'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0x9c');break;case'chatwebsites':_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0x9d');break;case _0xfab9('0x9e'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0x9f');break;case _0xfab9('0xa0'):_0x4af0f6['childModel']=_0xfab9('0xa1');break;case _0xfab9('0xa2'):case _0xfab9('0xa3'):case'outboundroutes':_0x4af0f6['childModel']=_0xfab9('0xa4');break;case _0xfab9('0xa5'):_0x4af0f6['childModel']=_0xfab9('0xa6');break;case'voicemails':_0x4af0f6[_0xfab9('0x7b')]='VoiceMail';break;case _0xfab9('0xa7'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xa8');_0x4af0f6['parentSections']=[{'name':_0xfab9('0xa9'),'field':_0xfab9('0x2a'),'foreignKey':_0xfab9('0xaa'),'model':_0xfab9('0xab'),'filter':{'field':'role','value':['agent']}},{'name':_0xfab9('0xac'),'field':_0xfab9('0x2a'),'foreignKey':'membername','model':_0xfab9('0xab'),'filter':{'field':_0xfab9('0xad'),'value':[_0xfab9('0xae')]}},{'name':_0xfab9('0xaf'),'field':_0xfab9('0x2a'),'foreignKey':_0xfab9('0xb0'),'model':_0xfab9('0xb1'),'filter':{'field':'type','value':[_0xfab9('0xb2')]}},{'name':'QueueCampaigns','field':_0xfab9('0x2a'),'foreignKey':_0xfab9('0xb0'),'model':'VoiceQueue','filter':{'field':_0xfab9('0x31'),'value':['outbound']}}];break;case _0xfab9('0xb3'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xb4');break;case'chanspies':_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xb5');break;case _0xfab9('0xb6'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xb7');break;case _0xfab9('0xb8'):_0x4af0f6['childModel']=_0xfab9('0xb9');break;case _0xfab9('0xba'):_0x4af0f6[_0xfab9('0x7b')]='MailQueue';break;case'mailaccounts':_0x4af0f6['childModel']=_0xfab9('0xbb');break;case _0xfab9('0xbc'):_0x4af0f6[_0xfab9('0x7b')]='MailSubstatus';break;case'openchannelqueues':_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xbd');break;case _0xfab9('0xbe'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xbf');break;case'smsqueues':_0x4af0f6[_0xfab9('0x7b')]='SmsQueue';break;case'smsaccounts':_0x4af0f6['childModel']=_0xfab9('0xc0');break;case _0xfab9('0xc1'):_0x4af0f6['childModel']=_0xfab9('0xc2');break;case _0xfab9('0xc3'):case _0xfab9('0xc4'):_0x4af0f6['childModel']=_0xfab9('0xb1');if(_0xa4aeb3){_0x4af0f6['parentSections']=[{'name':'VoiceQueues'},{'name':'QueueCampaigns'}];}break;case'users':case _0xfab9('0xc5'):case _0xfab9('0xc6'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xab');if(_0xa4aeb3){_0x4af0f6['parentSections']=[{'name':_0xfab9('0xc7'),'filter':{'field':_0xfab9('0xad'),'value':[_0xfab9('0xc8'),_0xfab9('0xc9')]},'ignore':!![]},{'name':_0xfab9('0xa9')},{'name':'Telephones'}];}break;case _0xfab9('0xca'):_0x4af0f6[_0xfab9('0x7b')]='ZendeskAccount';break;case _0xfab9('0xcb'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xcc');break;case _0xfab9('0xcd'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xce');break;case _0xfab9('0xcf'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xd0');break;case _0xfab9('0xd1'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xd2');break;case _0xfab9('0xd3'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xd4');break;case'vtigeraccounts':_0x4af0f6['childModel']=_0xfab9('0xab');break;case _0xfab9('0xd5'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xd6');break;case _0xfab9('0xd7'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xd8');break;case _0xfab9('0xd9'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0x69');break;case _0xfab9('0xda'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xdb');break;case'pauses':_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xdc');break;case'scheduler':_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xdd');break;case _0xfab9('0xde'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xdf');break;case _0xfab9('0xe0'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0x86');break;case _0xfab9('0xe1'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xe2');break;case _0xfab9('0xe3'):_0x4af0f6['childModel']=_0xfab9('0xe4');break;case _0xfab9('0xe5'):_0x4af0f6[_0xfab9('0x7b')]='Trunk';break;case _0xfab9('0xe6'):_0x4af0f6[_0xfab9('0x7b')]='Variable';break;case _0xfab9('0xe7'):_0x4af0f6['childModel']='Plugin';break;case _0xfab9('0xe8'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0x7d');_0x4af0f6[_0xfab9('0x77')]=[{'name':_0xfab9('0xe9'),'field':'id','foreignKey':_0xfab9('0x82')}];break;case _0xfab9('0xea'):_0x4af0f6[_0xfab9('0x7b')]=_0xfab9('0xeb');break;default:return _0x4af0f6;}return _0x4af0f6;}
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.events.js b/server/api/userProfile/userProfile.events.js
index 212717a..067939a 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 _0x79dd=['update','emit','hook','exports','UserProfile','setMaxListeners'];(function(_0x5284b4,_0x2b4ed8){var _0x28807e=function(_0x5d106d){while(--_0x5d106d){_0x5284b4['push'](_0x5284b4['shift']());}};_0x28807e(++_0x2b4ed8);}(_0x79dd,0x1b4));var _0xd79d=function(_0x494368,_0x56d9a3){_0x494368=_0x494368-0x0;var _0x1491a3=_0x79dd[_0x494368];return _0x1491a3;};'use strict';var EventEmitter=require('events');var UserProfile=require('../../mysqldb')['db'][_0xd79d('0x0')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0xd79d('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xd79d('0x2'),'afterDestroy':'remove'};function emitEvent(_0x2652bf){return function(_0x298604,_0xc8c43e,_0x13730f){UserProfileEvents[_0xd79d('0x3')](_0x2652bf+':'+_0x298604['id'],_0x298604);UserProfileEvents['emit'](_0x2652bf,_0x298604);_0x13730f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserProfile[_0xd79d('0x4')](e,emitEvent(event));}}module[_0xd79d('0x5')]=UserProfileEvents;
\ No newline at end of file
+var _0xe493=['hasOwnProperty','hook','exports','events','../../mysqldb','UserProfile','setMaxListeners','save','update','remove','emit'];(function(_0x296d34,_0x425387){var _0x1494a7=function(_0x1e7b0d){while(--_0x1e7b0d){_0x296d34['push'](_0x296d34['shift']());}};_0x1494a7(++_0x425387);}(_0xe493,0x71));var _0x3e49=function(_0x59359e,_0x342a9f){_0x59359e=_0x59359e-0x0;var _0x51052c=_0xe493[_0x59359e];return _0x51052c;};'use strict';var EventEmitter=require(_0x3e49('0x0'));var UserProfile=require(_0x3e49('0x1'))['db'][_0x3e49('0x2')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0x3e49('0x3')](0x0);var events={'afterCreate':_0x3e49('0x4'),'afterUpdate':_0x3e49('0x5'),'afterDestroy':_0x3e49('0x6')};function emitEvent(_0x3f2c66){return function(_0x5a4cc9,_0x3e5df7,_0x5b4255){UserProfileEvents[_0x3e49('0x7')](_0x3f2c66+':'+_0x5a4cc9['id'],_0x5a4cc9);UserProfileEvents[_0x3e49('0x7')](_0x3f2c66,_0x5a4cc9);_0x5b4255(null);};}for(var e in events){if(events[_0x3e49('0x8')](e)){var event=events[e];UserProfile[_0x3e49('0x9')](e,emitEvent(event));}}module[_0x3e49('0xa')]=UserProfileEvents;
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.model.js b/server/api/userProfile/userProfile.model.js
index de27098..0a6997e 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 _0xc7e1=['moment','request-promise','rimraf','../../config/environment','./userProfile.attributes','exports','define','UserProfile','user_profiles','../../config/logger'];(function(_0x169098,_0x55fa34){var _0x43d9b2=function(_0x54ffc7){while(--_0x54ffc7){_0x169098['push'](_0x169098['shift']());}};_0x43d9b2(++_0x55fa34);}(_0xc7e1,0x1cb));var _0x1c7e=function(_0x395696,_0xc7ebf){_0x395696=_0x395696-0x0;var _0x15b00e=_0xc7e1[_0x395696];return _0x15b00e;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x1c7e('0x0'))('api');var moment=require(_0x1c7e('0x1'));var BPromise=require('bluebird');var rp=require(_0x1c7e('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1c7e('0x3'));var config=require(_0x1c7e('0x4'));var attributes=require(_0x1c7e('0x5'));module[_0x1c7e('0x6')]=function(_0x138918,_0x47f3cf){return _0x138918[_0x1c7e('0x7')](_0x1c7e('0x8'),attributes,{'tableName':_0x1c7e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x712d=['../../config/logger','api','bluebird','rimraf','../../config/environment','./userProfile.attributes','exports','define','user_profiles','lodash','util'];(function(_0x5d3011,_0x4bb985){var _0x2df2f4=function(_0x4d73db){while(--_0x4d73db){_0x5d3011['push'](_0x5d3011['shift']());}};_0x2df2f4(++_0x4bb985);}(_0x712d,0xa3));var _0xd712=function(_0x2e7e02,_0x56b9b5){_0x2e7e02=_0x2e7e02-0x0;var _0x148e4c=_0x712d[_0x2e7e02];return _0x148e4c;};'use strict';var _=require(_0xd712('0x0'));var util=require(_0xd712('0x1'));var logger=require(_0xd712('0x2'))(_0xd712('0x3'));var moment=require('moment');var BPromise=require(_0xd712('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xd712('0x5'));var config=require(_0xd712('0x6'));var attributes=require(_0xd712('0x7'));module[_0xd712('0x8')]=function(_0x45ef69,_0x1870ca){return _0x45ef69[_0xd712('0x9')]('UserProfile',attributes,{'tableName':_0xd712('0xa'),'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 2fbe482..4b52878 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 _0xee14=['message','result','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','redis','defaults','localhost','socket.io-emitter','register','request','info','UserProfile,\x20%s,\x20%s','request\x20sent','debug','UserProfile,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x46bac8,_0x33ca8c){var _0x3b196c=function(_0x31f2b6){while(--_0x31f2b6){_0x46bac8['push'](_0x46bac8['shift']());}};_0x3b196c(++_0x33ca8c);}(_0xee14,0x13a));var _0x4ee1=function(_0x4aaf0c,_0x247fed){_0x4aaf0c=_0x4aaf0c-0x0;var _0x19e1da=_0xee14[_0x4aaf0c];return _0x19e1da;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4ee1('0x0'));var BPromise=require(_0x4ee1('0x1'));var rs=require(_0x4ee1('0x2'));var fs=require('fs');var Redis=require(_0x4ee1('0x3'));var db=require(_0x4ee1('0x4'))['db'];var utils=require(_0x4ee1('0x5'));var logger=require(_0x4ee1('0x6'))(_0x4ee1('0x7'));var config=require(_0x4ee1('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x4ee1('0x9')]['http']({'port':0x232a});config[_0x4ee1('0xa')]=_[_0x4ee1('0xb')](config[_0x4ee1('0xa')],{'host':_0x4ee1('0xc'),'port':0x18eb});var socket=require(_0x4ee1('0xd'))(new Redis(config[_0x4ee1('0xa')]));require('./userProfile.socket')[_0x4ee1('0xe')](socket);function respondWithRpcPromise(_0x38be25,_0x4e88e8,_0x3fa61b){return new BPromise(function(_0x252021,_0x1844c1){return client[_0x4ee1('0xf')](_0x38be25,_0x3fa61b)['then'](function(_0x1b3737){logger[_0x4ee1('0x10')](_0x4ee1('0x11'),_0x4e88e8,_0x4ee1('0x12'));logger[_0x4ee1('0x13')](_0x4ee1('0x14'),_0x4e88e8,'request\x20sent',JSON[_0x4ee1('0x15')](_0x1b3737));if(_0x1b3737[_0x4ee1('0x16')]){if(_0x1b3737[_0x4ee1('0x16')][_0x4ee1('0x17')]===0x1f4){logger[_0x4ee1('0x16')](_0x4ee1('0x11'),_0x4e88e8,_0x1b3737[_0x4ee1('0x16')][_0x4ee1('0x18')]);return _0x1844c1(_0x1b3737[_0x4ee1('0x16')]['message']);}logger[_0x4ee1('0x16')](_0x4ee1('0x11'),_0x4e88e8,_0x1b3737[_0x4ee1('0x16')][_0x4ee1('0x18')]);return _0x252021(_0x1b3737[_0x4ee1('0x16')][_0x4ee1('0x18')]);}else{logger[_0x4ee1('0x10')](_0x4ee1('0x11'),_0x4e88e8,_0x4ee1('0x12'));_0x252021(_0x1b3737[_0x4ee1('0x19')][_0x4ee1('0x18')]);}})['catch'](function(_0x236215){logger[_0x4ee1('0x16')](_0x4ee1('0x11'),_0x4e88e8,_0x236215);_0x1844c1(_0x236215);});});}
\ No newline at end of file
+var _0xa630=['debug','UserProfile,\x20%s,\x20%s,\x20%s','error','code','UserProfile,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','register','request','then','info','request\x20sent'];(function(_0x30d158,_0x45a430){var _0x43fa6d=function(_0xc7d36a){while(--_0xc7d36a){_0x30d158['push'](_0x30d158['shift']());}};_0x43fa6d(++_0x45a430);}(_0xa630,0xbe));var _0x0a63=function(_0x45d51f,_0x1b60e5){_0x45d51f=_0x45d51f-0x0;var _0x9afa32=_0xa630[_0x45d51f];return _0x9afa32;};'use strict';var _=require(_0x0a63('0x0'));var util=require(_0x0a63('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x0a63('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0a63('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x0a63('0x4'))(_0x0a63('0x5'));var config=require(_0x0a63('0x6'));var jayson=require(_0x0a63('0x7'));var client=jayson[_0x0a63('0x8')]['http']({'port':0x232a});config[_0x0a63('0x9')]=_[_0x0a63('0xa')](config[_0x0a63('0x9')],{'host':_0x0a63('0xb'),'port':0x18eb});var socket=require(_0x0a63('0xc'))(new Redis(config[_0x0a63('0x9')]));require('./userProfile.socket')[_0x0a63('0xd')](socket);function respondWithRpcPromise(_0xb714c7,_0x2dcbda,_0x218142){return new BPromise(function(_0x327bb0,_0x1cccac){return client[_0x0a63('0xe')](_0xb714c7,_0x218142)[_0x0a63('0xf')](function(_0x258511){logger[_0x0a63('0x10')]('UserProfile,\x20%s,\x20%s',_0x2dcbda,_0x0a63('0x11'));logger[_0x0a63('0x12')](_0x0a63('0x13'),_0x2dcbda,_0x0a63('0x11'),JSON['stringify'](_0x258511));if(_0x258511[_0x0a63('0x14')]){if(_0x258511['error'][_0x0a63('0x15')]===0x1f4){logger[_0x0a63('0x14')](_0x0a63('0x16'),_0x2dcbda,_0x258511[_0x0a63('0x14')][_0x0a63('0x17')]);return _0x1cccac(_0x258511[_0x0a63('0x14')][_0x0a63('0x17')]);}logger[_0x0a63('0x14')]('UserProfile,\x20%s,\x20%s',_0x2dcbda,_0x258511[_0x0a63('0x14')]['message']);return _0x327bb0(_0x258511[_0x0a63('0x14')][_0x0a63('0x17')]);}else{logger[_0x0a63('0x10')](_0x0a63('0x16'),_0x2dcbda,_0x0a63('0x11'));_0x327bb0(_0x258511[_0x0a63('0x18')][_0x0a63('0x17')]);}})[_0x0a63('0x19')](function(_0x2fd06c){logger[_0x0a63('0x14')](_0x0a63('0x16'),_0x2dcbda,_0x2fd06c);_0x1cccac(_0x2fd06c);});});}
\ No newline at end of file
diff --git a/server/api/userProfile/userProfile.socket.js b/server/api/userProfile/userProfile.socket.js
index 1e2fdb6..f6ffb43 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 _0x7f41=['./userProfile.events','save','remove','removeListener','register','userProfile:'];(function(_0x52d736,_0x28afcf){var _0x558661=function(_0x5d0c63){while(--_0x5d0c63){_0x52d736['push'](_0x52d736['shift']());}};_0x558661(++_0x28afcf);}(_0x7f41,0x186));var _0x17f4=function(_0x2b4374,_0x11cc96){_0x2b4374=_0x2b4374-0x0;var _0xf1e925=_0x7f41[_0x2b4374];return _0xf1e925;};'use strict';var UserProfileEvents=require(_0x17f4('0x0'));var events=[_0x17f4('0x1'),_0x17f4('0x2'),'update'];function createListener(_0x51e175,_0x31e593){return function(_0x19e4b6){_0x31e593['emit'](_0x51e175,_0x19e4b6);};}function removeListener(_0x20e57c,_0x42e356){return function(){UserProfileEvents[_0x17f4('0x3')](_0x20e57c,_0x42e356);};}exports[_0x17f4('0x4')]=function(_0x389764){for(var _0x243630=0x0,_0x8273e5=events['length'];_0x243630<_0x8273e5;_0x243630++){var _0x17dbd6=events[_0x243630];var _0x401e7a=createListener(_0x17f4('0x5')+_0x17dbd6,_0x389764);UserProfileEvents['on'](_0x17dbd6,_0x401e7a);}};
\ No newline at end of file
+var _0xf321=['length','userProfile:','./userProfile.events','remove','removeListener','register'];(function(_0x41c31e,_0x4b0236){var _0xee094=function(_0x2cce17){while(--_0x2cce17){_0x41c31e['push'](_0x41c31e['shift']());}};_0xee094(++_0x4b0236);}(_0xf321,0x86));var _0x1f32=function(_0x52bcca,_0x3da0fd){_0x52bcca=_0x52bcca-0x0;var _0x5cdc08=_0xf321[_0x52bcca];return _0x5cdc08;};'use strict';var UserProfileEvents=require(_0x1f32('0x0'));var events=['save',_0x1f32('0x1'),'update'];function createListener(_0x57cfe5,_0x15ee4c){return function(_0x40bd1a){_0x15ee4c['emit'](_0x57cfe5,_0x40bd1a);};}function removeListener(_0x44fa12,_0x139cf4){return function(){UserProfileEvents[_0x1f32('0x2')](_0x44fa12,_0x139cf4);};}exports[_0x1f32('0x3')]=function(_0x1d58ec){for(var _0x26acaf=0x0,_0x3a66cd=events[_0x1f32('0x4')];_0x26acaf<_0x3a66cd;_0x26acaf++){var _0x284af2=events[_0x26acaf];var _0x325d96=createListener(_0x1f32('0x5')+_0x284af2,_0x1d58ec);UserProfileEvents['on'](_0x284af2,_0x325d96);}};
\ No newline at end of file
diff --git a/server/api/userProfileResource/index.js b/server/api/userProfileResource/index.js
index b4b2f63..a5c38a1 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 _0x43dd=['multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./userProfileResource.controller','get','isAuthenticated','index','/describe','show','post','create','put','/:id','update','delete','exports'];(function(_0x3d5f3a,_0x27c239){var _0x368a63=function(_0x28bc40){while(--_0x28bc40){_0x3d5f3a['push'](_0x3d5f3a['shift']());}};_0x368a63(++_0x27c239);}(_0x43dd,0x78));var _0xd43d=function(_0x1fdcd9,_0xb7370d){_0x1fdcd9=_0x1fdcd9-0x0;var _0x1f1858=_0x43dd[_0x1fdcd9];return _0x1f1858;};'use strict';var multer=require(_0xd43d('0x0'));var util=require('util');var path=require(_0xd43d('0x1'));var timeout=require(_0xd43d('0x2'));var express=require(_0xd43d('0x3'));var router=express[_0xd43d('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xd43d('0x5'));var config=require(_0xd43d('0x6'));var controller=require(_0xd43d('0x7'));router[_0xd43d('0x8')]('/',auth[_0xd43d('0x9')](),controller[_0xd43d('0xa')]);router[_0xd43d('0x8')](_0xd43d('0xb'),auth[_0xd43d('0x9')](),controller['describe']);router[_0xd43d('0x8')]('/:id',auth['isAuthenticated'](),controller[_0xd43d('0xc')]);router[_0xd43d('0xd')]('/',auth[_0xd43d('0x9')](),controller[_0xd43d('0xe')]);router[_0xd43d('0xf')](_0xd43d('0x10'),auth[_0xd43d('0x9')](),controller[_0xd43d('0x11')]);router[_0xd43d('0x12')](_0xd43d('0x10'),auth[_0xd43d('0x9')](),controller['destroy']);module[_0xd43d('0x13')]=router;
\ No newline at end of file
+var _0x7b3d=['destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','./userProfileResource.controller','get','index','/describe','isAuthenticated','show','post','create','/:id','update','delete'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x7b3d,0x1ca));var _0xd7b3=function(_0x34b6af,_0x1a9700){_0x34b6af=_0x34b6af-0x0;var _0x6aedf8=_0x7b3d[_0x34b6af];return _0x6aedf8;};'use strict';var multer=require(_0xd7b3('0x0'));var util=require(_0xd7b3('0x1'));var path=require(_0xd7b3('0x2'));var timeout=require(_0xd7b3('0x3'));var express=require('express');var router=express[_0xd7b3('0x4')]();var auth=require(_0xd7b3('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xd7b3('0x6'));router[_0xd7b3('0x7')]('/',auth['isAuthenticated'](),controller[_0xd7b3('0x8')]);router[_0xd7b3('0x7')](_0xd7b3('0x9'),auth['isAuthenticated'](),controller['describe']);router[_0xd7b3('0x7')]('/:id',auth[_0xd7b3('0xa')](),controller[_0xd7b3('0xb')]);router[_0xd7b3('0xc')]('/',auth[_0xd7b3('0xa')](),controller[_0xd7b3('0xd')]);router['put'](_0xd7b3('0xe'),auth[_0xd7b3('0xa')](),controller[_0xd7b3('0xf')]);router[_0xd7b3('0x10')](_0xd7b3('0xe'),auth[_0xd7b3('0xa')](),controller[_0xd7b3('0x11')]);module[_0xd7b3('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 06ab81d..6462670 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 _0xdbc5=['sequelize','exports','STRING','INTEGER'];(function(_0x3aa949,_0x3b8ade){var _0x4a1294=function(_0x231b9c){while(--_0x231b9c){_0x3aa949['push'](_0x3aa949['shift']());}};_0x4a1294(++_0x3b8ade);}(_0xdbc5,0x154));var _0x5dbc=function(_0x1e1a40,_0x120381){_0x1e1a40=_0x1e1a40-0x0;var _0x233c8e=_0xdbc5[_0x1e1a40];return _0x233c8e;};'use strict';var Sequelize=require(_0x5dbc('0x0'));module[_0x5dbc('0x1')]={'name':{'type':Sequelize[_0x5dbc('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0x5dbc('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x5dbc('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0x65dc=['exports','sequelize'];(function(_0x11ce03,_0x3fd0a0){var _0xb12a03=function(_0x22d869){while(--_0x22d869){_0x11ce03['push'](_0x11ce03['shift']());}};_0xb12a03(++_0x3fd0a0);}(_0x65dc,0x141));var _0xc65d=function(_0x49f509,_0x5c7395){_0x49f509=_0x49f509-0x0;var _0x1250d2=_0x65dc[_0x49f509];return _0x1250d2;};'use strict';var Sequelize=require(_0xc65d('0x0'));module[_0xc65d('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'resourceId':{'type':Sequelize['INTEGER'],'allowNull':![]},'type':{'type':Sequelize['STRING'],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/userProfileResource/userProfileResource.controller.js b/server/api/userProfileResource/userProfileResource.controller.js
index 7b022fd..eadbd3a 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 _0x3dae=['params','keys','intersection','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','mustache','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','end','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','fields','attributes','length','hasOwnProperty','sort','where','pick','filter','VIRTUAL','merge','options','UserProfileResource','include','findAll','catch'];(function(_0x3c3d5f,_0x21e0ad){var _0x13cd14=function(_0x5a6256){while(--_0x5a6256){_0x3c3d5f['push'](_0x3c3d5f['shift']());}};_0x13cd14(++_0x21e0ad);}(_0x3dae,0x1ab));var _0xe3da=function(_0x20f03a,_0x443da3){_0x20f03a=_0x20f03a-0x0;var _0x1eae2b=_0x3dae[_0x20f03a];return _0x1eae2b;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xe3da('0x0'));var rimraf=require(_0xe3da('0x1'));var zipdir=require(_0xe3da('0x2'));var jsonpatch=require(_0xe3da('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xe3da('0x4'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xe3da('0x5'));var ejs=require(_0xe3da('0x6'));var fs=require('fs');var _=require(_0xe3da('0x7'));var squel=require(_0xe3da('0x8'));var crypto=require(_0xe3da('0x9'));var jsforce=require('jsforce');var deskjs=require(_0xe3da('0xa'));var toCsv=require(_0xe3da('0x5'));var querystring=require(_0xe3da('0xb'));var Papa=require('papaparse');var Redis=require(_0xe3da('0xc'));var authService=require(_0xe3da('0xd'));var qs=require(_0xe3da('0xe'));var as=require(_0xe3da('0xf'));var hardwareService=require(_0xe3da('0x10'));var logger=require(_0xe3da('0x11'))(_0xe3da('0x12'));var utils=require(_0xe3da('0x13'));var config=require(_0xe3da('0x14'));var db=require(_0xe3da('0x15'))['db'];function respondWithStatusCode(_0x97716e,_0x149363){_0x149363=_0x149363||0xcc;return function(_0x4943ff){if(_0x4943ff){return _0x97716e[_0xe3da('0x16')](_0x149363);}return _0x97716e[_0xe3da('0x17')](_0x149363)['end']();};}function respondWithResult(_0x123e3e,_0x245a95){_0x245a95=_0x245a95||0xc8;return function(_0x34d711){if(_0x34d711){return _0x123e3e[_0xe3da('0x17')](_0x245a95)['json'](_0x34d711);}};}function respondWithFilteredResult(_0x1cd68b,_0x352eb8){return function(_0x18181c){if(_0x18181c){var _0x138e66=_0x18181c[_0xe3da('0x18')],_0x198861=_0x352eb8[_0xe3da('0x19')],_0x202b4c=_0x352eb8[_0xe3da('0x19')]+_0x352eb8[_0xe3da('0x1a')],_0x1c2ef4;if(_0x202b4c>=_0x138e66){_0x202b4c=_0x138e66;_0x1c2ef4=0xc8;}else{_0x1c2ef4=0xce;}_0x1cd68b[_0xe3da('0x17')](_0x1c2ef4);return _0x1cd68b[_0xe3da('0x1b')](_0xe3da('0x1c'),_0x198861+'-'+_0x202b4c+'/'+_0x138e66)[_0xe3da('0x1d')](_0x18181c);}return null;};}function patchUpdates(_0x4d60b9){return function(_0x2b9a52){try{jsonpatch[_0xe3da('0x1e')](_0x2b9a52,_0x4d60b9,!![]);}catch(_0x4345e2){return BPromise[_0xe3da('0x1f')](_0x4345e2);}return _0x2b9a52[_0xe3da('0x20')]();};}function saveUpdates(_0x498dde,_0x4b0d38){return function(_0x3cb3af){if(_0x3cb3af){return _0x3cb3af[_0xe3da('0x21')](_0x498dde)[_0xe3da('0x22')](function(_0x21042e){return _0x21042e;});}return null;};}function removeEntity(_0x3ee96a,_0x96e320){return function(_0x2fb1f2){if(_0x2fb1f2){return _0x2fb1f2['destroy']()[_0xe3da('0x22')](function(){_0x3ee96a[_0xe3da('0x17')](0xcc)[_0xe3da('0x23')]();});}};}function handleEntityNotFound(_0x3fec2f,_0x542fb6){return function(_0x199c63){if(!_0x199c63){_0x3fec2f[_0xe3da('0x16')](0x194);}return _0x199c63;};}function handleError(_0x13dee4,_0x4ad61a){_0x4ad61a=_0x4ad61a||0x1f4;return function(_0x610232){logger['error'](_0x610232[_0xe3da('0x24')]);if(_0x610232[_0xe3da('0x25')]){delete _0x610232[_0xe3da('0x25')];}_0x13dee4[_0xe3da('0x17')](_0x4ad61a)[_0xe3da('0x26')](_0x610232);};}exports[_0xe3da('0x27')]=function(_0x58327f,_0x51e7e5){var _0x43ece0={},_0x298211={},_0x1084ad={'count':0x0,'rows':[]};var _0x50b34a=_[_0xe3da('0x28')](db['UserProfileResource'][_0xe3da('0x29')],function(_0x145e70){return{'name':_0x145e70[_0xe3da('0x2a')],'type':_0x145e70[_0xe3da('0x2b')][_0xe3da('0x2c')]};});_0x298211[_0xe3da('0x2d')]=_[_0xe3da('0x28')](_0x50b34a,_0xe3da('0x25'));_0x298211[_0xe3da('0x2e')]=_['keys'](_0x58327f[_0xe3da('0x2e')]);_0x298211[_0xe3da('0x2f')]=_['intersection'](_0x298211[_0xe3da('0x2d')],_0x298211[_0xe3da('0x2e')]);_0x43ece0['attributes']=_['intersection'](_0x298211['model'],qs[_0xe3da('0x30')](_0x58327f['query']['fields']));_0x43ece0[_0xe3da('0x31')]=_0x43ece0[_0xe3da('0x31')][_0xe3da('0x32')]?_0x43ece0['attributes']:_0x298211['model'];if(!_0x58327f[_0xe3da('0x2e')][_0xe3da('0x33')]('nolimit')){_0x43ece0['limit']=qs[_0xe3da('0x1a')](_0x58327f[_0xe3da('0x2e')]['limit']);_0x43ece0[_0xe3da('0x19')]=qs[_0xe3da('0x19')](_0x58327f[_0xe3da('0x2e')][_0xe3da('0x19')]);}_0x43ece0['order']=qs['sort'](_0x58327f[_0xe3da('0x2e')][_0xe3da('0x34')]);_0x43ece0[_0xe3da('0x35')]=qs[_0xe3da('0x2f')](_[_0xe3da('0x36')](_0x58327f[_0xe3da('0x2e')],_0x298211[_0xe3da('0x2f')]));if(_0x58327f[_0xe3da('0x2e')][_0xe3da('0x37')]){_0x43ece0[_0xe3da('0x35')]=_['merge'](_0x43ece0[_0xe3da('0x35')],{'$or':_['map'](_0x50b34a,function(_0x2134d1){if(_0x2134d1[_0xe3da('0x2b')]!==_0xe3da('0x38')){var _0x4c9033={};_0x4c9033[_0x2134d1[_0xe3da('0x25')]]={'$like':'%'+_0x58327f['query'][_0xe3da('0x37')]+'%'};return _0x4c9033;}})});}_0x43ece0=_[_0xe3da('0x39')]({},_0x43ece0,_0x58327f[_0xe3da('0x3a')]);var _0x19a049={'where':_0x43ece0['where']};return db[_0xe3da('0x3b')][_0xe3da('0x18')](_0x19a049)['then'](function(_0x560010){_0x1084ad[_0xe3da('0x18')]=_0x560010;if(_0x58327f['query']['includeAll']){_0x43ece0[_0xe3da('0x3c')]=[{'all':!![]}];}return db['UserProfileResource'][_0xe3da('0x3d')](_0x43ece0);})[_0xe3da('0x22')](function(_0x22c993){_0x1084ad['rows']=_0x22c993;return _0x1084ad;})[_0xe3da('0x22')](respondWithFilteredResult(_0x51e7e5,_0x43ece0))[_0xe3da('0x3e')](handleError(_0x51e7e5,null));};exports['show']=function(_0xc7d46a,_0x1bf8cd){var _0x5bbd7a={'raw':![],'where':{'id':_0xc7d46a[_0xe3da('0x3f')]['id']}},_0x299ea7={};_0x299ea7[_0xe3da('0x2d')]=_[_0xe3da('0x40')](db[_0xe3da('0x3b')]['rawAttributes']);_0x299ea7['query']=_[_0xe3da('0x40')](_0xc7d46a[_0xe3da('0x2e')]);_0x299ea7[_0xe3da('0x2f')]=_[_0xe3da('0x41')](_0x299ea7[_0xe3da('0x2d')],_0x299ea7[_0xe3da('0x2e')]);_0x5bbd7a[_0xe3da('0x31')]=_[_0xe3da('0x41')](_0x299ea7[_0xe3da('0x2d')],qs[_0xe3da('0x30')](_0xc7d46a[_0xe3da('0x2e')][_0xe3da('0x30')]));_0x5bbd7a[_0xe3da('0x31')]=_0x5bbd7a[_0xe3da('0x31')]['length']?_0x5bbd7a[_0xe3da('0x31')]:_0x299ea7[_0xe3da('0x2d')];if(_0xc7d46a['query']['includeAll']){_0x5bbd7a[_0xe3da('0x3c')]=[{'all':!![]}];}_0x5bbd7a=_[_0xe3da('0x39')]({},_0x5bbd7a,_0xc7d46a[_0xe3da('0x3a')]);return db[_0xe3da('0x3b')][_0xe3da('0x42')](_0x5bbd7a)[_0xe3da('0x22')](handleEntityNotFound(_0x1bf8cd,null))[_0xe3da('0x22')](respondWithResult(_0x1bf8cd,null))[_0xe3da('0x3e')](handleError(_0x1bf8cd,null));};exports[_0xe3da('0x43')]=function(_0x522db6,_0x4de375){return db[_0xe3da('0x3b')][_0xe3da('0x43')](_0x522db6[_0xe3da('0x44')],{})[_0xe3da('0x22')](respondWithResult(_0x4de375,0xc9))[_0xe3da('0x3e')](handleError(_0x4de375,null));};exports[_0xe3da('0x21')]=function(_0x35f6ee,_0x52db88){if(_0x35f6ee['body']['id']){delete _0x35f6ee['body']['id'];}return db[_0xe3da('0x3b')][_0xe3da('0x42')]({'where':{'id':_0x35f6ee[_0xe3da('0x3f')]['id']}})[_0xe3da('0x22')](handleEntityNotFound(_0x52db88,null))[_0xe3da('0x22')](saveUpdates(_0x35f6ee[_0xe3da('0x44')],null))[_0xe3da('0x22')](respondWithResult(_0x52db88,null))['catch'](handleError(_0x52db88,null));};exports['destroy']=function(_0x2f4dbf,_0x290e48){return db[_0xe3da('0x3b')][_0xe3da('0x42')]({'where':{'id':_0x2f4dbf[_0xe3da('0x3f')]['id']}})[_0xe3da('0x22')](handleEntityNotFound(_0x290e48,null))[_0xe3da('0x22')](removeEntity(_0x290e48,null))[_0xe3da('0x3e')](handleError(_0x290e48,null));};exports[_0xe3da('0x45')]=function(_0x2b749b,_0x4724c3){return db[_0xe3da('0x3b')][_0xe3da('0x45')]()['then'](respondWithResult(_0x4724c3,null))[_0xe3da('0x3e')](handleError(_0x4724c3,null));};
\ No newline at end of file
+var _0x6c9b=['destroy','stack','send','index','map','UserProfileResource','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','name','options','includeAll','findAll','rows','show','params','keys','rawAttributes','include','find','create','body','catch','describe','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','ejs','squel','crypto','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','offset','limit','Content-Range','apply','reject','save','update','then'];(function(_0xfec4f2,_0x27b2aa){var _0x4ee052=function(_0x195ba5){while(--_0x195ba5){_0xfec4f2['push'](_0xfec4f2['shift']());}};_0x4ee052(++_0x27b2aa);}(_0x6c9b,0x108));var _0xb6c9=function(_0x57e9b0,_0x1dfbdf){_0x57e9b0=_0x57e9b0-0x0;var _0xbd00=_0x6c9b[_0x57e9b0];return _0xbd00;};'use strict';var pdf=require(_0xb6c9('0x0'));var emlformat=require(_0xb6c9('0x1'));var rimraf=require(_0xb6c9('0x2'));var zipdir=require(_0xb6c9('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0xb6c9('0x4'));var moment=require(_0xb6c9('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xb6c9('0x6'));var util=require(_0xb6c9('0x7'));var path=require(_0xb6c9('0x8'));var sox=require(_0xb6c9('0x9'));var csv=require('to-csv');var ejs=require(_0xb6c9('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0xb6c9('0xb'));var crypto=require(_0xb6c9('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xb6c9('0xd'));var querystring=require('querystring');var Papa=require(_0xb6c9('0xe'));var Redis=require(_0xb6c9('0xf'));var authService=require(_0xb6c9('0x10'));var qs=require(_0xb6c9('0x11'));var as=require(_0xb6c9('0x12'));var hardwareService=require(_0xb6c9('0x13'));var logger=require('../../config/logger')(_0xb6c9('0x14'));var utils=require(_0xb6c9('0x15'));var config=require('../../config/environment');var db=require(_0xb6c9('0x16'))['db'];function respondWithStatusCode(_0x116c95,_0x490ad5){_0x490ad5=_0x490ad5||0xcc;return function(_0x481308){if(_0x481308){return _0x116c95[_0xb6c9('0x17')](_0x490ad5);}return _0x116c95[_0xb6c9('0x18')](_0x490ad5)[_0xb6c9('0x19')]();};}function respondWithResult(_0xf49df6,_0x17c8af){_0x17c8af=_0x17c8af||0xc8;return function(_0x1916f8){if(_0x1916f8){return _0xf49df6[_0xb6c9('0x18')](_0x17c8af)[_0xb6c9('0x1a')](_0x1916f8);}};}function respondWithFilteredResult(_0x30d0bc,_0x4806df){return function(_0x4c5a53){if(_0x4c5a53){var _0x2b84e8=_0x4c5a53[_0xb6c9('0x1b')],_0x511c5b=_0x4806df['offset'],_0x54c2df=_0x4806df[_0xb6c9('0x1c')]+_0x4806df[_0xb6c9('0x1d')],_0x3dd6f5;if(_0x54c2df>=_0x2b84e8){_0x54c2df=_0x2b84e8;_0x3dd6f5=0xc8;}else{_0x3dd6f5=0xce;}_0x30d0bc[_0xb6c9('0x18')](_0x3dd6f5);return _0x30d0bc['set'](_0xb6c9('0x1e'),_0x511c5b+'-'+_0x54c2df+'/'+_0x2b84e8)['json'](_0x4c5a53);}return null;};}function patchUpdates(_0x35ceaa){return function(_0x463118){try{jsonpatch[_0xb6c9('0x1f')](_0x463118,_0x35ceaa,!![]);}catch(_0x14657a){return BPromise[_0xb6c9('0x20')](_0x14657a);}return _0x463118[_0xb6c9('0x21')]();};}function saveUpdates(_0x1bcd05,_0x27ff7f){return function(_0x481f47){if(_0x481f47){return _0x481f47[_0xb6c9('0x22')](_0x1bcd05)[_0xb6c9('0x23')](function(_0x1e872d){return _0x1e872d;});}return null;};}function removeEntity(_0x536c51,_0x26554d){return function(_0x5422e1){if(_0x5422e1){return _0x5422e1[_0xb6c9('0x24')]()[_0xb6c9('0x23')](function(){_0x536c51[_0xb6c9('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2a12a8,_0x4954f7){return function(_0x2c31f7){if(!_0x2c31f7){_0x2a12a8[_0xb6c9('0x17')](0x194);}return _0x2c31f7;};}function handleError(_0x40d6d3,_0xf4c477){_0xf4c477=_0xf4c477||0x1f4;return function(_0x1aae02){logger['error'](_0x1aae02[_0xb6c9('0x25')]);if(_0x1aae02['name']){delete _0x1aae02['name'];}_0x40d6d3['status'](_0xf4c477)[_0xb6c9('0x26')](_0x1aae02);};}exports[_0xb6c9('0x27')]=function(_0x380c98,_0x4b8fd2){var _0x3efb1d={},_0x29f2b7={},_0x1ac47b={'count':0x0,'rows':[]};var _0x7783d3=_[_0xb6c9('0x28')](db[_0xb6c9('0x29')]['rawAttributes'],function(_0x1e54c2){return{'name':_0x1e54c2[_0xb6c9('0x2a')],'type':_0x1e54c2[_0xb6c9('0x2b')][_0xb6c9('0x2c')]};});_0x29f2b7[_0xb6c9('0x2d')]=_['map'](_0x7783d3,'name');_0x29f2b7[_0xb6c9('0x2e')]=_['keys'](_0x380c98[_0xb6c9('0x2e')]);_0x29f2b7[_0xb6c9('0x2f')]=_[_0xb6c9('0x30')](_0x29f2b7[_0xb6c9('0x2d')],_0x29f2b7[_0xb6c9('0x2e')]);_0x3efb1d[_0xb6c9('0x31')]=_[_0xb6c9('0x30')](_0x29f2b7[_0xb6c9('0x2d')],qs['fields'](_0x380c98['query'][_0xb6c9('0x32')]));_0x3efb1d[_0xb6c9('0x31')]=_0x3efb1d[_0xb6c9('0x31')][_0xb6c9('0x33')]?_0x3efb1d['attributes']:_0x29f2b7[_0xb6c9('0x2d')];if(!_0x380c98[_0xb6c9('0x2e')][_0xb6c9('0x34')](_0xb6c9('0x35'))){_0x3efb1d[_0xb6c9('0x1d')]=qs[_0xb6c9('0x1d')](_0x380c98[_0xb6c9('0x2e')][_0xb6c9('0x1d')]);_0x3efb1d['offset']=qs[_0xb6c9('0x1c')](_0x380c98[_0xb6c9('0x2e')][_0xb6c9('0x1c')]);}_0x3efb1d[_0xb6c9('0x36')]=qs[_0xb6c9('0x37')](_0x380c98[_0xb6c9('0x2e')][_0xb6c9('0x37')]);_0x3efb1d[_0xb6c9('0x38')]=qs[_0xb6c9('0x2f')](_[_0xb6c9('0x39')](_0x380c98['query'],_0x29f2b7['filters']));if(_0x380c98[_0xb6c9('0x2e')][_0xb6c9('0x3a')]){_0x3efb1d[_0xb6c9('0x38')]=_[_0xb6c9('0x3b')](_0x3efb1d[_0xb6c9('0x38')],{'$or':_['map'](_0x7783d3,function(_0x27120d){if(_0x27120d[_0xb6c9('0x2b')]!=='VIRTUAL'){var _0x408850={};_0x408850[_0x27120d[_0xb6c9('0x3c')]]={'$like':'%'+_0x380c98[_0xb6c9('0x2e')][_0xb6c9('0x3a')]+'%'};return _0x408850;}})});}_0x3efb1d=_[_0xb6c9('0x3b')]({},_0x3efb1d,_0x380c98[_0xb6c9('0x3d')]);var _0x3a0dee={'where':_0x3efb1d[_0xb6c9('0x38')]};return db['UserProfileResource']['count'](_0x3a0dee)[_0xb6c9('0x23')](function(_0x342d8c){_0x1ac47b[_0xb6c9('0x1b')]=_0x342d8c;if(_0x380c98[_0xb6c9('0x2e')][_0xb6c9('0x3e')]){_0x3efb1d['include']=[{'all':!![]}];}return db[_0xb6c9('0x29')][_0xb6c9('0x3f')](_0x3efb1d);})[_0xb6c9('0x23')](function(_0x237d32){_0x1ac47b[_0xb6c9('0x40')]=_0x237d32;return _0x1ac47b;})[_0xb6c9('0x23')](respondWithFilteredResult(_0x4b8fd2,_0x3efb1d))['catch'](handleError(_0x4b8fd2,null));};exports[_0xb6c9('0x41')]=function(_0x3e8eb7,_0x6c7de3){var _0x2dcaa7={'raw':![],'where':{'id':_0x3e8eb7[_0xb6c9('0x42')]['id']}},_0x35cf72={};_0x35cf72['model']=_[_0xb6c9('0x43')](db[_0xb6c9('0x29')][_0xb6c9('0x44')]);_0x35cf72[_0xb6c9('0x2e')]=_['keys'](_0x3e8eb7[_0xb6c9('0x2e')]);_0x35cf72[_0xb6c9('0x2f')]=_['intersection'](_0x35cf72['model'],_0x35cf72['query']);_0x2dcaa7[_0xb6c9('0x31')]=_[_0xb6c9('0x30')](_0x35cf72[_0xb6c9('0x2d')],qs[_0xb6c9('0x32')](_0x3e8eb7[_0xb6c9('0x2e')][_0xb6c9('0x32')]));_0x2dcaa7['attributes']=_0x2dcaa7[_0xb6c9('0x31')][_0xb6c9('0x33')]?_0x2dcaa7[_0xb6c9('0x31')]:_0x35cf72['model'];if(_0x3e8eb7['query'][_0xb6c9('0x3e')]){_0x2dcaa7[_0xb6c9('0x45')]=[{'all':!![]}];}_0x2dcaa7=_[_0xb6c9('0x3b')]({},_0x2dcaa7,_0x3e8eb7[_0xb6c9('0x3d')]);return db[_0xb6c9('0x29')][_0xb6c9('0x46')](_0x2dcaa7)[_0xb6c9('0x23')](handleEntityNotFound(_0x6c7de3,null))['then'](respondWithResult(_0x6c7de3,null))['catch'](handleError(_0x6c7de3,null));};exports[_0xb6c9('0x47')]=function(_0x2d666b,_0x28f951){return db[_0xb6c9('0x29')]['create'](_0x2d666b[_0xb6c9('0x48')],{})[_0xb6c9('0x23')](respondWithResult(_0x28f951,0xc9))['catch'](handleError(_0x28f951,null));};exports[_0xb6c9('0x22')]=function(_0x56f931,_0x5b5737){if(_0x56f931[_0xb6c9('0x48')]['id']){delete _0x56f931[_0xb6c9('0x48')]['id'];}return db[_0xb6c9('0x29')][_0xb6c9('0x46')]({'where':{'id':_0x56f931[_0xb6c9('0x42')]['id']}})[_0xb6c9('0x23')](handleEntityNotFound(_0x5b5737,null))[_0xb6c9('0x23')](saveUpdates(_0x56f931['body'],null))[_0xb6c9('0x23')](respondWithResult(_0x5b5737,null))[_0xb6c9('0x49')](handleError(_0x5b5737,null));};exports['destroy']=function(_0x88109,_0x45864a){return db[_0xb6c9('0x29')][_0xb6c9('0x46')]({'where':{'id':_0x88109['params']['id']}})['then'](handleEntityNotFound(_0x45864a,null))[_0xb6c9('0x23')](removeEntity(_0x45864a,null))[_0xb6c9('0x49')](handleError(_0x45864a,null));};exports['describe']=function(_0x42d8c3,_0x4e1594){return db[_0xb6c9('0x29')][_0xb6c9('0x4a')]()[_0xb6c9('0x23')](respondWithResult(_0x4e1594,null))['catch'](handleError(_0x4e1594,null));};
\ No newline at end of file
diff --git a/server/api/userProfileResource/userProfileResource.model.js b/server/api/userProfileResource/userProfileResource.model.js
index c942e2a..c6e3e63 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 _0xb98a=['path','rimraf','../../config/environment','./userProfileResource.attributes','UserProfileResource','user_profile_has_resources','compositeIndex','resourceId','sectionId','../../config/logger','api','moment','bluebird'];(function(_0x1e2184,_0x12335a){var _0x3281e5=function(_0x575991){while(--_0x575991){_0x1e2184['push'](_0x1e2184['shift']());}};_0x3281e5(++_0x12335a);}(_0xb98a,0x14e));var _0xab98=function(_0x4dda69,_0x2a0fe4){_0x4dda69=_0x4dda69-0x0;var _0x9014a9=_0xb98a[_0x4dda69];return _0x9014a9;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xab98('0x0'))(_0xab98('0x1'));var moment=require(_0xab98('0x2'));var BPromise=require(_0xab98('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xab98('0x4'));var rimraf=require(_0xab98('0x5'));var config=require(_0xab98('0x6'));var attributes=require(_0xab98('0x7'));module['exports']=function(_0x4a2e91,_0x40b3cc){return _0x4a2e91['define'](_0xab98('0x8'),attributes,{'tableName':_0xab98('0x9'),'paranoid':![],'indexes':[{'name':_0xab98('0xa'),'fields':[_0xab98('0xb'),_0xab98('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x1193=['sectionId','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./userProfileResource.attributes','UserProfileResource','user_profile_has_resources','compositeIndex','resourceId'];(function(_0x4017b0,_0x4347db){var _0x5ed4f7=function(_0x706c26){while(--_0x706c26){_0x4017b0['push'](_0x4017b0['shift']());}};_0x5ed4f7(++_0x4347db);}(_0x1193,0x79));var _0x3119=function(_0x522e74,_0x3e5d2b){_0x522e74=_0x522e74-0x0;var _0x6e402c=_0x1193[_0x522e74];return _0x6e402c;};'use strict';var _=require(_0x3119('0x0'));var util=require(_0x3119('0x1'));var logger=require(_0x3119('0x2'))(_0x3119('0x3'));var moment=require(_0x3119('0x4'));var BPromise=require(_0x3119('0x5'));var rp=require(_0x3119('0x6'));var fs=require('fs');var path=require(_0x3119('0x7'));var rimraf=require('rimraf');var config=require(_0x3119('0x8'));var attributes=require(_0x3119('0x9'));module['exports']=function(_0xcb5e37,_0x35e8b0){return _0xcb5e37['define'](_0x3119('0xa'),attributes,{'tableName':_0x3119('0xb'),'paranoid':![],'indexes':[{'name':_0x3119('0xc'),'fields':[_0x3119('0xd'),_0x3119('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userProfileResource/userProfileResource.rpc.js b/server/api/userProfileResource/userProfileResource.rpc.js
index c56246c..ddbdaab 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 _0x81df=['../../config/environment','client','http','request','info','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x5a49cf,_0x1ae155){var _0xc74b13=function(_0x16d754){while(--_0x16d754){_0x5a49cf['push'](_0x5a49cf['shift']());}};_0xc74b13(++_0x1ae155);}(_0x81df,0xc6));var _0xf81d=function(_0x1de689,_0x4bf750){_0x1de689=_0x1de689-0x0;var _0x12d70a=_0x81df[_0x1de689];return _0x12d70a;};'use strict';var _=require(_0xf81d('0x0'));var util=require(_0xf81d('0x1'));var moment=require(_0xf81d('0x2'));var BPromise=require(_0xf81d('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf81d('0x4'));var db=require(_0xf81d('0x5'))['db'];var utils=require(_0xf81d('0x6'));var logger=require(_0xf81d('0x7'))(_0xf81d('0x8'));var config=require(_0xf81d('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xf81d('0xa')][_0xf81d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x32ab65,_0x19a54d,_0xf15ebe){return new BPromise(function(_0xe9231c,_0x777d1e){return client[_0xf81d('0xc')](_0x32ab65,_0xf15ebe)['then'](function(_0x45904f){logger[_0xf81d('0xd')](_0xf81d('0xe'),_0x19a54d,_0xf81d('0xf'));logger[_0xf81d('0x10')]('UserProfileResource,\x20%s,\x20%s,\x20%s',_0x19a54d,_0xf81d('0xf'),JSON[_0xf81d('0x11')](_0x45904f));if(_0x45904f[_0xf81d('0x12')]){if(_0x45904f[_0xf81d('0x12')][_0xf81d('0x13')]===0x1f4){logger[_0xf81d('0x12')](_0xf81d('0xe'),_0x19a54d,_0x45904f[_0xf81d('0x12')][_0xf81d('0x14')]);return _0x777d1e(_0x45904f[_0xf81d('0x12')]['message']);}logger[_0xf81d('0x12')](_0xf81d('0xe'),_0x19a54d,_0x45904f[_0xf81d('0x12')][_0xf81d('0x14')]);return _0xe9231c(_0x45904f['error'][_0xf81d('0x14')]);}else{logger['info'](_0xf81d('0xe'),_0x19a54d,'request\x20sent');_0xe9231c(_0x45904f[_0xf81d('0x15')][_0xf81d('0x14')]);}})[_0xf81d('0x16')](function(_0x2c4c41){logger[_0xf81d('0x12')](_0xf81d('0xe'),_0x19a54d,_0x2c4c41);_0x777d1e(_0x2c4c41);});});}
\ No newline at end of file
+var _0x2b1f=['UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','UserProfileResource,\x20%s,\x20%s','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent'];(function(_0x4f7bb4,_0xa5bd0c){var _0x15c45c=function(_0x2e87a0){while(--_0x2e87a0){_0x4f7bb4['push'](_0x4f7bb4['shift']());}};_0x15c45c(++_0xa5bd0c);}(_0x2b1f,0x149));var _0xf2b1=function(_0x3cb300,_0x4d7a99){_0x3cb300=_0x3cb300-0x0;var _0x3e0cd9=_0x2b1f[_0x3cb300];return _0x3e0cd9;};'use strict';var _=require(_0xf2b1('0x0'));var util=require(_0xf2b1('0x1'));var moment=require(_0xf2b1('0x2'));var BPromise=require(_0xf2b1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf2b1('0x4'));var db=require(_0xf2b1('0x5'))['db'];var utils=require(_0xf2b1('0x6'));var logger=require(_0xf2b1('0x7'))('rpc');var config=require(_0xf2b1('0x8'));var jayson=require(_0xf2b1('0x9'));var client=jayson[_0xf2b1('0xa')][_0xf2b1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3e3603,_0x5e1d13,_0x4867a8){return new BPromise(function(_0x2d18d5,_0x52ee16){return client[_0xf2b1('0xc')](_0x3e3603,_0x4867a8)[_0xf2b1('0xd')](function(_0x133fdc){logger[_0xf2b1('0xe')]('UserProfileResource,\x20%s,\x20%s',_0x5e1d13,_0xf2b1('0xf'));logger['debug'](_0xf2b1('0x10'),_0x5e1d13,'request\x20sent',JSON[_0xf2b1('0x11')](_0x133fdc));if(_0x133fdc['error']){if(_0x133fdc[_0xf2b1('0x12')][_0xf2b1('0x13')]===0x1f4){logger[_0xf2b1('0x12')]('UserProfileResource,\x20%s,\x20%s',_0x5e1d13,_0x133fdc['error'][_0xf2b1('0x14')]);return _0x52ee16(_0x133fdc['error'][_0xf2b1('0x14')]);}logger[_0xf2b1('0x12')]('UserProfileResource,\x20%s,\x20%s',_0x5e1d13,_0x133fdc['error'][_0xf2b1('0x14')]);return _0x2d18d5(_0x133fdc['error'][_0xf2b1('0x14')]);}else{logger[_0xf2b1('0xe')]('UserProfileResource,\x20%s,\x20%s',_0x5e1d13,_0xf2b1('0xf'));_0x2d18d5(_0x133fdc[_0xf2b1('0x15')][_0xf2b1('0x14')]);}})['catch'](function(_0x52adf7){logger[_0xf2b1('0x12')](_0xf2b1('0x16'),_0x5e1d13,_0x52adf7);_0x52ee16(_0x52adf7);});});}
\ No newline at end of file
diff --git a/server/api/userProfileSection/index.js b/server/api/userProfileSection/index.js
index 6ffdc04..6bc452f 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 _0xac65=['util','path','express','Router','../../components/auth/service','../../config/environment','./userProfileSection.controller','get','index','/describe','isAuthenticated','describe','/:id','show','post','create','put','update','delete','destroy','exports','multer'];(function(_0x969ba4,_0x3d80f9){var _0xebf7bd=function(_0x3d891d){while(--_0x3d891d){_0x969ba4['push'](_0x969ba4['shift']());}};_0xebf7bd(++_0x3d80f9);}(_0xac65,0x11d));var _0x5ac6=function(_0x1b4391,_0x3a8b16){_0x1b4391=_0x1b4391-0x0;var _0x1db303=_0xac65[_0x1b4391];return _0x1db303;};'use strict';var multer=require(_0x5ac6('0x0'));var util=require(_0x5ac6('0x1'));var path=require(_0x5ac6('0x2'));var timeout=require('connect-timeout');var express=require(_0x5ac6('0x3'));var router=express[_0x5ac6('0x4')]();var auth=require(_0x5ac6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x5ac6('0x6'));var controller=require(_0x5ac6('0x7'));router[_0x5ac6('0x8')]('/',auth['isAuthenticated'](),controller[_0x5ac6('0x9')]);router[_0x5ac6('0x8')](_0x5ac6('0xa'),auth[_0x5ac6('0xb')](),controller[_0x5ac6('0xc')]);router[_0x5ac6('0x8')](_0x5ac6('0xd'),auth[_0x5ac6('0xb')](),controller[_0x5ac6('0xe')]);router[_0x5ac6('0xf')]('/',auth[_0x5ac6('0xb')](),controller[_0x5ac6('0x10')]);router[_0x5ac6('0x11')](_0x5ac6('0xd'),auth[_0x5ac6('0xb')](),controller[_0x5ac6('0x12')]);router[_0x5ac6('0x13')](_0x5ac6('0xd'),auth[_0x5ac6('0xb')](),controller[_0x5ac6('0x14')]);module[_0x5ac6('0x15')]=router;
\ No newline at end of file
+var _0xd2c4=['create','put','update','delete','destroy','exports','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/describe','/:id','show','post'];(function(_0x5a7d5f,_0x5695cb){var _0x5dcded=function(_0x13f053){while(--_0x13f053){_0x5a7d5f['push'](_0x5a7d5f['shift']());}};_0x5dcded(++_0x5695cb);}(_0xd2c4,0x110));var _0x4d2c=function(_0x56188d,_0x514566){_0x56188d=_0x56188d-0x0;var _0x6004b1=_0xd2c4[_0x56188d];return _0x6004b1;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x4d2c('0x0'));var timeout=require(_0x4d2c('0x1'));var express=require(_0x4d2c('0x2'));var router=express[_0x4d2c('0x3')]();var auth=require(_0x4d2c('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x4d2c('0x5'));var controller=require('./userProfileSection.controller');router[_0x4d2c('0x6')]('/',auth[_0x4d2c('0x7')](),controller[_0x4d2c('0x8')]);router[_0x4d2c('0x6')](_0x4d2c('0x9'),auth[_0x4d2c('0x7')](),controller['describe']);router[_0x4d2c('0x6')](_0x4d2c('0xa'),auth[_0x4d2c('0x7')](),controller[_0x4d2c('0xb')]);router[_0x4d2c('0xc')]('/',auth['isAuthenticated'](),controller[_0x4d2c('0xd')]);router[_0x4d2c('0xe')](_0x4d2c('0xa'),auth[_0x4d2c('0x7')](),controller[_0x4d2c('0xf')]);router[_0x4d2c('0x10')](_0x4d2c('0xa'),auth[_0x4d2c('0x7')](),controller[_0x4d2c('0x11')]);module[_0x4d2c('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/userProfileSection/userProfileSection.attributes.js b/server/api/userProfileSection/userProfileSection.attributes.js
index db2b142..75e9efd 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 _0x6921=['join','getDataValue','split','exports','STRING','BOOLEAN','crudPermissions'];(function(_0x2b7f77,_0x20ca11){var _0x433e8b=function(_0x559425){while(--_0x559425){_0x2b7f77['push'](_0x2b7f77['shift']());}};_0x433e8b(++_0x20ca11);}(_0x6921,0x1d1));var _0x1692=function(_0x35e3de,_0x2a7fc6){_0x35e3de=_0x35e3de-0x0;var _0x2eb981=_0x6921[_0x35e3de];return _0x2eb981;};'use strict';var Sequelize=require('sequelize');module[_0x1692('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'category':{'type':Sequelize[_0x1692('0x1')],'allowNull':![]},'sectionId':{'type':Sequelize['INTEGER'],'allowNull':![]},'enabled':{'type':Sequelize[_0x1692('0x2')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x1692('0x2')],'defaultValue':null},'crudPermissions':{'type':Sequelize['STRING'],'set':function(_0x3995b3){this['setDataValue'](_0x1692('0x3'),_0x3995b3?_0x3995b3[_0x1692('0x4')](''):[]);},'get':function(){return this[_0x1692('0x5')](_0x1692('0x3'))?this[_0x1692('0x5')](_0x1692('0x3'))[_0x1692('0x6')](''):[];}}};
\ No newline at end of file
+var _0x8b4f=['exports','STRING','INTEGER','BOOLEAN','setDataValue','crudPermissions','join','getDataValue','sequelize'];(function(_0x2b4216,_0x257828){var _0x2075f9=function(_0x2b3b5c){while(--_0x2b3b5c){_0x2b4216['push'](_0x2b4216['shift']());}};_0x2075f9(++_0x257828);}(_0x8b4f,0x19d));var _0xf8b4=function(_0x2d9e27,_0x5965b2){_0x2d9e27=_0x2d9e27-0x0;var _0xd35381=_0x8b4f[_0x2d9e27];return _0xd35381;};'use strict';var Sequelize=require(_0xf8b4('0x0'));module[_0xf8b4('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'category':{'type':Sequelize[_0xf8b4('0x2')],'allowNull':![]},'sectionId':{'type':Sequelize[_0xf8b4('0x3')],'allowNull':![]},'enabled':{'type':Sequelize[_0xf8b4('0x4')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0xf8b4('0x4')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0xf8b4('0x2')],'set':function(_0x24b736){this[_0xf8b4('0x5')](_0xf8b4('0x6'),_0x24b736?_0x24b736[_0xf8b4('0x7')](''):[]);},'get':function(){return this['getDataValue'](_0xf8b4('0x6'))?this[_0xf8b4('0x8')](_0xf8b4('0x6'))['split'](''):[];}}};
\ No newline at end of file
diff --git a/server/api/userProfileSection/userProfileSection.controller.js b/server/api/userProfileSection/userProfileSection.controller.js
index c59f8f2..25f7391 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 _0xe9ce=['UserProfileSection','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','count','includeAll','findAll','rows','show','params','include','find','create','body','catch','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','json','apply','reject','save','update','then','destroy','error','stack','name','send','index','map'];(function(_0x34ace0,_0x3abc6b){var _0x24c6de=function(_0x1c4d72){while(--_0x1c4d72){_0x34ace0['push'](_0x34ace0['shift']());}};_0x24c6de(++_0x3abc6b);}(_0xe9ce,0x15b));var _0xee9c=function(_0x466984,_0x2d2452){_0x466984=_0x466984-0x0;var _0x4c0e4c=_0xe9ce[_0x466984];return _0x4c0e4c;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xee9c('0x0'));var rimraf=require(_0xee9c('0x1'));var zipdir=require(_0xee9c('0x2'));var jsonpatch=require(_0xee9c('0x3'));var rp=require(_0xee9c('0x4'));var moment=require('moment');var BPromise=require(_0xee9c('0x5'));var Mustache=require('mustache');var util=require(_0xee9c('0x6'));var path=require(_0xee9c('0x7'));var sox=require('sox');var csv=require(_0xee9c('0x8'));var ejs=require(_0xee9c('0x9'));var fs=require('fs');var _=require(_0xee9c('0xa'));var squel=require(_0xee9c('0xb'));var crypto=require(_0xee9c('0xc'));var jsforce=require(_0xee9c('0xd'));var deskjs=require(_0xee9c('0xe'));var toCsv=require(_0xee9c('0x8'));var querystring=require('querystring');var Papa=require(_0xee9c('0xf'));var Redis=require('ioredis');var authService=require(_0xee9c('0x10'));var qs=require(_0xee9c('0x11'));var as=require(_0xee9c('0x12'));var hardwareService=require(_0xee9c('0x13'));var logger=require(_0xee9c('0x14'))(_0xee9c('0x15'));var utils=require(_0xee9c('0x16'));var config=require(_0xee9c('0x17'));var db=require(_0xee9c('0x18'))['db'];function respondWithStatusCode(_0x4740ef,_0x3f1ad7){_0x3f1ad7=_0x3f1ad7||0xcc;return function(_0x26057b){if(_0x26057b){return _0x4740ef[_0xee9c('0x19')](_0x3f1ad7);}return _0x4740ef[_0xee9c('0x1a')](_0x3f1ad7)[_0xee9c('0x1b')]();};}function respondWithResult(_0x220790,_0x4d5aed){_0x4d5aed=_0x4d5aed||0xc8;return function(_0x403acf){if(_0x403acf){return _0x220790['status'](_0x4d5aed)['json'](_0x403acf);}};}function respondWithFilteredResult(_0xcc31a4,_0x59f0f0){return function(_0x5da639){if(_0x5da639){var _0x53a666=_0x5da639['count'],_0x3c200f=_0x59f0f0[_0xee9c('0x1c')],_0x149f49=_0x59f0f0['offset']+_0x59f0f0[_0xee9c('0x1d')],_0x6b8b8f;if(_0x149f49>=_0x53a666){_0x149f49=_0x53a666;_0x6b8b8f=0xc8;}else{_0x6b8b8f=0xce;}_0xcc31a4['status'](_0x6b8b8f);return _0xcc31a4['set']('Content-Range',_0x3c200f+'-'+_0x149f49+'/'+_0x53a666)[_0xee9c('0x1e')](_0x5da639);}return null;};}function patchUpdates(_0x4dd78c){return function(_0x1857a3){try{jsonpatch[_0xee9c('0x1f')](_0x1857a3,_0x4dd78c,!![]);}catch(_0x553f7b){return BPromise[_0xee9c('0x20')](_0x553f7b);}return _0x1857a3[_0xee9c('0x21')]();};}function saveUpdates(_0x3874f6,_0x5c4f0c){return function(_0x39c03f){if(_0x39c03f){return _0x39c03f[_0xee9c('0x22')](_0x3874f6)[_0xee9c('0x23')](function(_0x5c499a){return _0x5c499a;});}return null;};}function removeEntity(_0x345f6e,_0x3e67fb){return function(_0x37a6fc){if(_0x37a6fc){return _0x37a6fc[_0xee9c('0x24')]()[_0xee9c('0x23')](function(){_0x345f6e['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x441769,_0x2d3953){return function(_0x50ab73){if(!_0x50ab73){_0x441769[_0xee9c('0x19')](0x194);}return _0x50ab73;};}function handleError(_0xcdc62b,_0x5c5064){_0x5c5064=_0x5c5064||0x1f4;return function(_0x3947b5){logger[_0xee9c('0x25')](_0x3947b5[_0xee9c('0x26')]);if(_0x3947b5[_0xee9c('0x27')]){delete _0x3947b5[_0xee9c('0x27')];}_0xcdc62b[_0xee9c('0x1a')](_0x5c5064)[_0xee9c('0x28')](_0x3947b5);};}exports[_0xee9c('0x29')]=function(_0x5dde99,_0x343bed){var _0x4004a3={},_0x417eef={},_0x15bad8={'count':0x0,'rows':[]};var _0x58fa5c=_[_0xee9c('0x2a')](db[_0xee9c('0x2b')][_0xee9c('0x2c')],function(_0x5bb49a){return{'name':_0x5bb49a[_0xee9c('0x2d')],'type':_0x5bb49a[_0xee9c('0x2e')][_0xee9c('0x2f')]};});_0x417eef[_0xee9c('0x30')]=_[_0xee9c('0x2a')](_0x58fa5c,_0xee9c('0x27'));_0x417eef[_0xee9c('0x31')]=_[_0xee9c('0x32')](_0x5dde99[_0xee9c('0x31')]);_0x417eef[_0xee9c('0x33')]=_[_0xee9c('0x34')](_0x417eef[_0xee9c('0x30')],_0x417eef[_0xee9c('0x31')]);_0x4004a3[_0xee9c('0x35')]=_[_0xee9c('0x34')](_0x417eef[_0xee9c('0x30')],qs['fields'](_0x5dde99['query'][_0xee9c('0x36')]));_0x4004a3['attributes']=_0x4004a3['attributes'][_0xee9c('0x37')]?_0x4004a3[_0xee9c('0x35')]:_0x417eef['model'];if(!_0x5dde99[_0xee9c('0x31')][_0xee9c('0x38')](_0xee9c('0x39'))){_0x4004a3[_0xee9c('0x1d')]=qs[_0xee9c('0x1d')](_0x5dde99[_0xee9c('0x31')][_0xee9c('0x1d')]);_0x4004a3[_0xee9c('0x1c')]=qs[_0xee9c('0x1c')](_0x5dde99[_0xee9c('0x31')]['offset']);}_0x4004a3[_0xee9c('0x3a')]=qs['sort'](_0x5dde99[_0xee9c('0x31')][_0xee9c('0x3b')]);_0x4004a3['where']=qs[_0xee9c('0x33')](_[_0xee9c('0x3c')](_0x5dde99['query'],_0x417eef[_0xee9c('0x33')]));if(_0x5dde99['query'][_0xee9c('0x3d')]){_0x4004a3[_0xee9c('0x3e')]=_[_0xee9c('0x3f')](_0x4004a3[_0xee9c('0x3e')],{'$or':_[_0xee9c('0x2a')](_0x58fa5c,function(_0x49beaa){if(_0x49beaa[_0xee9c('0x2e')]!==_0xee9c('0x40')){var _0x59f68f={};_0x59f68f[_0x49beaa[_0xee9c('0x27')]]={'$like':'%'+_0x5dde99[_0xee9c('0x31')]['filter']+'%'};return _0x59f68f;}})});}_0x4004a3=_[_0xee9c('0x3f')]({},_0x4004a3,_0x5dde99[_0xee9c('0x41')]);var _0x5e2d10={'where':_0x4004a3[_0xee9c('0x3e')]};return db[_0xee9c('0x2b')][_0xee9c('0x42')](_0x5e2d10)['then'](function(_0x45d147){_0x15bad8[_0xee9c('0x42')]=_0x45d147;if(_0x5dde99[_0xee9c('0x31')][_0xee9c('0x43')]){_0x4004a3['include']=[{'all':!![]}];}return db[_0xee9c('0x2b')][_0xee9c('0x44')](_0x4004a3);})[_0xee9c('0x23')](function(_0x482528){_0x15bad8[_0xee9c('0x45')]=_0x482528;return _0x15bad8;})[_0xee9c('0x23')](respondWithFilteredResult(_0x343bed,_0x4004a3))['catch'](handleError(_0x343bed,null));};exports[_0xee9c('0x46')]=function(_0x480fa1,_0x460b17){var _0x2d4bff={'raw':![],'where':{'id':_0x480fa1[_0xee9c('0x47')]['id']}},_0x3f83eb={};_0x3f83eb[_0xee9c('0x30')]=_[_0xee9c('0x32')](db[_0xee9c('0x2b')][_0xee9c('0x2c')]);_0x3f83eb[_0xee9c('0x31')]=_[_0xee9c('0x32')](_0x480fa1['query']);_0x3f83eb[_0xee9c('0x33')]=_[_0xee9c('0x34')](_0x3f83eb[_0xee9c('0x30')],_0x3f83eb[_0xee9c('0x31')]);_0x2d4bff[_0xee9c('0x35')]=_[_0xee9c('0x34')](_0x3f83eb[_0xee9c('0x30')],qs[_0xee9c('0x36')](_0x480fa1[_0xee9c('0x31')][_0xee9c('0x36')]));_0x2d4bff['attributes']=_0x2d4bff['attributes'][_0xee9c('0x37')]?_0x2d4bff[_0xee9c('0x35')]:_0x3f83eb[_0xee9c('0x30')];if(_0x480fa1[_0xee9c('0x31')]['includeAll']){_0x2d4bff[_0xee9c('0x48')]=[{'all':!![]}];}_0x2d4bff=_[_0xee9c('0x3f')]({},_0x2d4bff,_0x480fa1['options']);return db['UserProfileSection'][_0xee9c('0x49')](_0x2d4bff)[_0xee9c('0x23')](handleEntityNotFound(_0x460b17,null))[_0xee9c('0x23')](respondWithResult(_0x460b17,null))['catch'](handleError(_0x460b17,null));};exports[_0xee9c('0x4a')]=function(_0x336d25,_0x1ef8d5){return db[_0xee9c('0x2b')][_0xee9c('0x4a')](_0x336d25[_0xee9c('0x4b')],{})[_0xee9c('0x23')](respondWithResult(_0x1ef8d5,0xc9))[_0xee9c('0x4c')](handleError(_0x1ef8d5,null));};exports[_0xee9c('0x22')]=function(_0x49e893,_0x36ae46){if(_0x49e893[_0xee9c('0x4b')]['id']){delete _0x49e893['body']['id'];}return db['UserProfileSection'][_0xee9c('0x49')]({'where':{'id':_0x49e893[_0xee9c('0x47')]['id']}})['then'](handleEntityNotFound(_0x36ae46,null))[_0xee9c('0x23')](saveUpdates(_0x49e893[_0xee9c('0x4b')],null))[_0xee9c('0x23')](respondWithResult(_0x36ae46,null))['catch'](handleError(_0x36ae46,null));};exports[_0xee9c('0x24')]=function(_0x2e0bba,_0x17d635){return db[_0xee9c('0x2b')][_0xee9c('0x49')]({'where':{'id':_0x2e0bba[_0xee9c('0x47')]['id']}})[_0xee9c('0x23')](handleEntityNotFound(_0x17d635,null))['then'](removeEntity(_0x17d635,null))[_0xee9c('0x4c')](handleError(_0x17d635,null));};exports[_0xee9c('0x4d')]=function(_0x35cef7,_0x5ccf66){return db[_0xee9c('0x2b')][_0xee9c('0x4d')]()[_0xee9c('0x23')](respondWithResult(_0x5ccf66,null))[_0xee9c('0x4c')](handleError(_0x5ccf66,null));};
\ No newline at end of file
+var _0x3a40=['query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','merge','type','VIRTUAL','filter','options','includeAll','include','findAll','then','rows','catch','show','params','find','create','body','describe','html-pdf','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','status','end','json','count','offset','limit','set','apply','reject','save','update','destroy','sendStatus','error','stack','name','send','map','UserProfileSection','rawAttributes','fieldName','key','model'];(function(_0xb704e2,_0x4b74e1){var _0xe4e380=function(_0xba4179){while(--_0xba4179){_0xb704e2['push'](_0xb704e2['shift']());}};_0xe4e380(++_0x4b74e1);}(_0x3a40,0x1dd));var _0x03a4=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x3a40[_0x126558];return _0x1f6d14;};'use strict';var pdf=require(_0x03a4('0x0'));var emlformat=require(_0x03a4('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x03a4('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x03a4('0x3'));var moment=require(_0x03a4('0x4'));var BPromise=require(_0x03a4('0x5'));var Mustache=require(_0x03a4('0x6'));var util=require(_0x03a4('0x7'));var path=require(_0x03a4('0x8'));var sox=require(_0x03a4('0x9'));var csv=require(_0x03a4('0xa'));var ejs=require(_0x03a4('0xb'));var fs=require('fs');var _=require(_0x03a4('0xc'));var squel=require(_0x03a4('0xd'));var crypto=require(_0x03a4('0xe'));var jsforce=require(_0x03a4('0xf'));var deskjs=require(_0x03a4('0x10'));var toCsv=require(_0x03a4('0xa'));var querystring=require(_0x03a4('0x11'));var Papa=require(_0x03a4('0x12'));var Redis=require('ioredis');var authService=require(_0x03a4('0x13'));var qs=require(_0x03a4('0x14'));var as=require(_0x03a4('0x15'));var hardwareService=require(_0x03a4('0x16'));var logger=require('../../config/logger')(_0x03a4('0x17'));var utils=require('../../config/utils');var config=require(_0x03a4('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x280f38,_0x395e76){_0x395e76=_0x395e76||0xcc;return function(_0x56ce39){if(_0x56ce39){return _0x280f38['sendStatus'](_0x395e76);}return _0x280f38[_0x03a4('0x19')](_0x395e76)[_0x03a4('0x1a')]();};}function respondWithResult(_0x19b782,_0x42c9e2){_0x42c9e2=_0x42c9e2||0xc8;return function(_0x55fc8b){if(_0x55fc8b){return _0x19b782['status'](_0x42c9e2)[_0x03a4('0x1b')](_0x55fc8b);}};}function respondWithFilteredResult(_0x1dbf45,_0x43d060){return function(_0x50b0c1){if(_0x50b0c1){var _0x461af1=_0x50b0c1[_0x03a4('0x1c')],_0x1c4bbc=_0x43d060[_0x03a4('0x1d')],_0x1a1d5f=_0x43d060['offset']+_0x43d060[_0x03a4('0x1e')],_0x3ab05b;if(_0x1a1d5f>=_0x461af1){_0x1a1d5f=_0x461af1;_0x3ab05b=0xc8;}else{_0x3ab05b=0xce;}_0x1dbf45[_0x03a4('0x19')](_0x3ab05b);return _0x1dbf45[_0x03a4('0x1f')]('Content-Range',_0x1c4bbc+'-'+_0x1a1d5f+'/'+_0x461af1)['json'](_0x50b0c1);}return null;};}function patchUpdates(_0x5bf62a){return function(_0x558b5d){try{jsonpatch[_0x03a4('0x20')](_0x558b5d,_0x5bf62a,!![]);}catch(_0x5ac741){return BPromise[_0x03a4('0x21')](_0x5ac741);}return _0x558b5d[_0x03a4('0x22')]();};}function saveUpdates(_0x5d92b2,_0x12dc82){return function(_0x30a715){if(_0x30a715){return _0x30a715[_0x03a4('0x23')](_0x5d92b2)['then'](function(_0x5b5465){return _0x5b5465;});}return null;};}function removeEntity(_0x79759,_0x1b63f2){return function(_0x2ea520){if(_0x2ea520){return _0x2ea520[_0x03a4('0x24')]()['then'](function(){_0x79759[_0x03a4('0x19')](0xcc)[_0x03a4('0x1a')]();});}};}function handleEntityNotFound(_0x3d36c9,_0xc04fb8){return function(_0x51c05b){if(!_0x51c05b){_0x3d36c9[_0x03a4('0x25')](0x194);}return _0x51c05b;};}function handleError(_0x1454cf,_0x45c3b1){_0x45c3b1=_0x45c3b1||0x1f4;return function(_0x3e8362){logger[_0x03a4('0x26')](_0x3e8362[_0x03a4('0x27')]);if(_0x3e8362[_0x03a4('0x28')]){delete _0x3e8362[_0x03a4('0x28')];}_0x1454cf[_0x03a4('0x19')](_0x45c3b1)[_0x03a4('0x29')](_0x3e8362);};}exports['index']=function(_0x2dd9e7,_0x145aa6){var _0x53d109={},_0x5e22a1={},_0x1318cf={'count':0x0,'rows':[]};var _0x448598=_[_0x03a4('0x2a')](db[_0x03a4('0x2b')][_0x03a4('0x2c')],function(_0x5c897b){return{'name':_0x5c897b[_0x03a4('0x2d')],'type':_0x5c897b['type'][_0x03a4('0x2e')]};});_0x5e22a1[_0x03a4('0x2f')]=_[_0x03a4('0x2a')](_0x448598,'name');_0x5e22a1[_0x03a4('0x30')]=_['keys'](_0x2dd9e7[_0x03a4('0x30')]);_0x5e22a1[_0x03a4('0x31')]=_[_0x03a4('0x32')](_0x5e22a1['model'],_0x5e22a1['query']);_0x53d109['attributes']=_[_0x03a4('0x32')](_0x5e22a1['model'],qs[_0x03a4('0x33')](_0x2dd9e7[_0x03a4('0x30')]['fields']));_0x53d109[_0x03a4('0x34')]=_0x53d109[_0x03a4('0x34')][_0x03a4('0x35')]?_0x53d109[_0x03a4('0x34')]:_0x5e22a1[_0x03a4('0x2f')];if(!_0x2dd9e7[_0x03a4('0x30')][_0x03a4('0x36')](_0x03a4('0x37'))){_0x53d109[_0x03a4('0x1e')]=qs[_0x03a4('0x1e')](_0x2dd9e7[_0x03a4('0x30')][_0x03a4('0x1e')]);_0x53d109[_0x03a4('0x1d')]=qs[_0x03a4('0x1d')](_0x2dd9e7['query'][_0x03a4('0x1d')]);}_0x53d109['order']=qs[_0x03a4('0x38')](_0x2dd9e7['query'][_0x03a4('0x38')]);_0x53d109['where']=qs[_0x03a4('0x31')](_['pick'](_0x2dd9e7[_0x03a4('0x30')],_0x5e22a1[_0x03a4('0x31')]));if(_0x2dd9e7[_0x03a4('0x30')]['filter']){_0x53d109[_0x03a4('0x39')]=_[_0x03a4('0x3a')](_0x53d109[_0x03a4('0x39')],{'$or':_['map'](_0x448598,function(_0x50bfa2){if(_0x50bfa2[_0x03a4('0x3b')]!==_0x03a4('0x3c')){var _0x5798c2={};_0x5798c2[_0x50bfa2[_0x03a4('0x28')]]={'$like':'%'+_0x2dd9e7[_0x03a4('0x30')][_0x03a4('0x3d')]+'%'};return _0x5798c2;}})});}_0x53d109=_[_0x03a4('0x3a')]({},_0x53d109,_0x2dd9e7[_0x03a4('0x3e')]);var _0x4098f1={'where':_0x53d109[_0x03a4('0x39')]};return db[_0x03a4('0x2b')][_0x03a4('0x1c')](_0x4098f1)['then'](function(_0xdc5b4c){_0x1318cf[_0x03a4('0x1c')]=_0xdc5b4c;if(_0x2dd9e7[_0x03a4('0x30')][_0x03a4('0x3f')]){_0x53d109[_0x03a4('0x40')]=[{'all':!![]}];}return db[_0x03a4('0x2b')][_0x03a4('0x41')](_0x53d109);})[_0x03a4('0x42')](function(_0x800ea0){_0x1318cf[_0x03a4('0x43')]=_0x800ea0;return _0x1318cf;})[_0x03a4('0x42')](respondWithFilteredResult(_0x145aa6,_0x53d109))[_0x03a4('0x44')](handleError(_0x145aa6,null));};exports[_0x03a4('0x45')]=function(_0x23d3ae,_0x5034b9){var _0x15b1c3={'raw':![],'where':{'id':_0x23d3ae[_0x03a4('0x46')]['id']}},_0x501871={};_0x501871[_0x03a4('0x2f')]=_['keys'](db[_0x03a4('0x2b')][_0x03a4('0x2c')]);_0x501871[_0x03a4('0x30')]=_['keys'](_0x23d3ae['query']);_0x501871[_0x03a4('0x31')]=_[_0x03a4('0x32')](_0x501871['model'],_0x501871[_0x03a4('0x30')]);_0x15b1c3[_0x03a4('0x34')]=_[_0x03a4('0x32')](_0x501871[_0x03a4('0x2f')],qs[_0x03a4('0x33')](_0x23d3ae[_0x03a4('0x30')][_0x03a4('0x33')]));_0x15b1c3['attributes']=_0x15b1c3[_0x03a4('0x34')]['length']?_0x15b1c3[_0x03a4('0x34')]:_0x501871['model'];if(_0x23d3ae[_0x03a4('0x30')]['includeAll']){_0x15b1c3['include']=[{'all':!![]}];}_0x15b1c3=_[_0x03a4('0x3a')]({},_0x15b1c3,_0x23d3ae['options']);return db['UserProfileSection'][_0x03a4('0x47')](_0x15b1c3)[_0x03a4('0x42')](handleEntityNotFound(_0x5034b9,null))[_0x03a4('0x42')](respondWithResult(_0x5034b9,null))[_0x03a4('0x44')](handleError(_0x5034b9,null));};exports[_0x03a4('0x48')]=function(_0x35db5e,_0x303b4f){return db[_0x03a4('0x2b')]['create'](_0x35db5e[_0x03a4('0x49')],{})[_0x03a4('0x42')](respondWithResult(_0x303b4f,0xc9))['catch'](handleError(_0x303b4f,null));};exports[_0x03a4('0x23')]=function(_0x36b66d,_0x150930){if(_0x36b66d[_0x03a4('0x49')]['id']){delete _0x36b66d[_0x03a4('0x49')]['id'];}return db[_0x03a4('0x2b')][_0x03a4('0x47')]({'where':{'id':_0x36b66d['params']['id']}})[_0x03a4('0x42')](handleEntityNotFound(_0x150930,null))[_0x03a4('0x42')](saveUpdates(_0x36b66d['body'],null))[_0x03a4('0x42')](respondWithResult(_0x150930,null))['catch'](handleError(_0x150930,null));};exports['destroy']=function(_0x37283d,_0x2d120e){return db['UserProfileSection'][_0x03a4('0x47')]({'where':{'id':_0x37283d[_0x03a4('0x46')]['id']}})[_0x03a4('0x42')](handleEntityNotFound(_0x2d120e,null))[_0x03a4('0x42')](removeEntity(_0x2d120e,null))[_0x03a4('0x44')](handleError(_0x2d120e,null));};exports[_0x03a4('0x4a')]=function(_0x38cb8d,_0x5f43bd){return db['UserProfileSection'][_0x03a4('0x4a')]()[_0x03a4('0x42')](respondWithResult(_0x5f43bd,null))[_0x03a4('0x44')](handleError(_0x5f43bd,null));};
\ No newline at end of file
diff --git a/server/api/userProfileSection/userProfileSection.model.js b/server/api/userProfileSection/userProfileSection.model.js
index 48fbdce..05a903d 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 _0x6d4a=['path','rimraf','../../config/environment','./userProfileSection.attributes','exports','define','UserProfileSection','compositeIndex','sectionId','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x2b3016,_0x59ef83){var _0x5eedad=function(_0x5ed032){while(--_0x5ed032){_0x2b3016['push'](_0x2b3016['shift']());}};_0x5eedad(++_0x59ef83);}(_0x6d4a,0x117));var _0xa6d4=function(_0x1692b1,_0x18636c){_0x1692b1=_0x1692b1-0x0;var _0x282fea=_0x6d4a[_0x1692b1];return _0x282fea;};'use strict';var _=require(_0xa6d4('0x0'));var util=require('util');var logger=require(_0xa6d4('0x1'))(_0xa6d4('0x2'));var moment=require(_0xa6d4('0x3'));var BPromise=require(_0xa6d4('0x4'));var rp=require(_0xa6d4('0x5'));var fs=require('fs');var path=require(_0xa6d4('0x6'));var rimraf=require(_0xa6d4('0x7'));var config=require(_0xa6d4('0x8'));var attributes=require(_0xa6d4('0x9'));module[_0xa6d4('0xa')]=function(_0x25a720,_0xe6dda6){return _0x25a720[_0xa6d4('0xb')](_0xa6d4('0xc'),attributes,{'tableName':'user_profile_has_sections','paranoid':![],'indexes':[{'name':_0xa6d4('0xd'),'fields':[_0xa6d4('0xe'),'userProfileId']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x4c6b=['UserProfileSection','compositeIndex','userProfileId','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./userProfileSection.attributes','exports','define'];(function(_0x3f993e,_0x2d5757){var _0x39c135=function(_0x39e00b){while(--_0x39e00b){_0x3f993e['push'](_0x3f993e['shift']());}};_0x39c135(++_0x2d5757);}(_0x4c6b,0xe4));var _0xb4c6=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x4c6b[_0x19950b];return _0x3c6b41;};'use strict';var _=require(_0xb4c6('0x0'));var util=require(_0xb4c6('0x1'));var logger=require(_0xb4c6('0x2'))(_0xb4c6('0x3'));var moment=require(_0xb4c6('0x4'));var BPromise=require(_0xb4c6('0x5'));var rp=require(_0xb4c6('0x6'));var fs=require('fs');var path=require(_0xb4c6('0x7'));var rimraf=require(_0xb4c6('0x8'));var config=require('../../config/environment');var attributes=require(_0xb4c6('0x9'));module[_0xb4c6('0xa')]=function(_0x10eb3a,_0x64f89d){return _0x10eb3a[_0xb4c6('0xb')](_0xb4c6('0xc'),attributes,{'tableName':'user_profile_has_sections','paranoid':![],'indexes':[{'name':_0xb4c6('0xd'),'fields':['sectionId',_0xb4c6('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 5e2efd8..c427812 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 _0x808b=['jayson/promise','request','info','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','error','code','UserProfileSection,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment'];(function(_0x519209,_0x4e722a){var _0x52865d=function(_0x1cdd41){while(--_0x1cdd41){_0x519209['push'](_0x519209['shift']());}};_0x52865d(++_0x4e722a);}(_0x808b,0x124));var _0xb808=function(_0x21e847,_0x507259){_0x21e847=_0x21e847-0x0;var _0x3354dc=_0x808b[_0x21e847];return _0x3354dc;};'use strict';var _=require(_0xb808('0x0'));var util=require(_0xb808('0x1'));var moment=require(_0xb808('0x2'));var BPromise=require(_0xb808('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb808('0x4'));var db=require(_0xb808('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb808('0x6'));var config=require(_0xb808('0x7'));var jayson=require(_0xb808('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x33fe48,_0x13be00,_0x270fd8){return new BPromise(function(_0x3773e2,_0x5e8047){return client[_0xb808('0x9')](_0x33fe48,_0x270fd8)['then'](function(_0x3e86e0){logger[_0xb808('0xa')]('UserProfileSection,\x20%s,\x20%s',_0x13be00,_0xb808('0xb'));logger[_0xb808('0xc')](_0xb808('0xd'),_0x13be00,_0xb808('0xb'),JSON['stringify'](_0x3e86e0));if(_0x3e86e0[_0xb808('0xe')]){if(_0x3e86e0['error'][_0xb808('0xf')]===0x1f4){logger[_0xb808('0xe')](_0xb808('0x10'),_0x13be00,_0x3e86e0[_0xb808('0xe')]['message']);return _0x5e8047(_0x3e86e0['error'][_0xb808('0x11')]);}logger['error']('UserProfileSection,\x20%s,\x20%s',_0x13be00,_0x3e86e0[_0xb808('0xe')][_0xb808('0x11')]);return _0x3773e2(_0x3e86e0[_0xb808('0xe')][_0xb808('0x11')]);}else{logger[_0xb808('0xa')](_0xb808('0x10'),_0x13be00,_0xb808('0xb'));_0x3773e2(_0x3e86e0[_0xb808('0x12')][_0xb808('0x11')]);}})[_0xb808('0x13')](function(_0x2ab6c0){logger[_0xb808('0xe')](_0xb808('0x10'),_0x13be00,_0x2ab6c0);_0x5e8047(_0x2ab6c0);});});}
\ No newline at end of file
+var _0x1a9d=['info','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x28bcb6,_0x42077a){var _0x3ca4c8=function(_0x452baf){while(--_0x452baf){_0x28bcb6['push'](_0x28bcb6['shift']());}};_0x3ca4c8(++_0x42077a);}(_0x1a9d,0x116));var _0xd1a9=function(_0x24548a,_0x367203){_0x24548a=_0x24548a-0x0;var _0x4be4b8=_0x1a9d[_0x24548a];return _0x4be4b8;};'use strict';var _=require(_0xd1a9('0x0'));var util=require('util');var moment=require(_0xd1a9('0x1'));var BPromise=require(_0xd1a9('0x2'));var rs=require(_0xd1a9('0x3'));var fs=require('fs');var Redis=require(_0xd1a9('0x4'));var db=require(_0xd1a9('0x5'))['db'];var utils=require(_0xd1a9('0x6'));var logger=require(_0xd1a9('0x7'))(_0xd1a9('0x8'));var config=require(_0xd1a9('0x9'));var jayson=require(_0xd1a9('0xa'));var client=jayson[_0xd1a9('0xb')][_0xd1a9('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xe6e042,_0x5674bc,_0xee5ea1){return new BPromise(function(_0x2a8ed7,_0x4c14f1){return client['request'](_0xe6e042,_0xee5ea1)[_0xd1a9('0xd')](function(_0x50b0eb){logger['info'](_0xd1a9('0xe'),_0x5674bc,_0xd1a9('0xf'));logger[_0xd1a9('0x10')](_0xd1a9('0x11'),_0x5674bc,_0xd1a9('0xf'),JSON['stringify'](_0x50b0eb));if(_0x50b0eb[_0xd1a9('0x12')]){if(_0x50b0eb[_0xd1a9('0x12')][_0xd1a9('0x13')]===0x1f4){logger[_0xd1a9('0x12')](_0xd1a9('0xe'),_0x5674bc,_0x50b0eb[_0xd1a9('0x12')][_0xd1a9('0x14')]);return _0x4c14f1(_0x50b0eb['error'][_0xd1a9('0x14')]);}logger['error'](_0xd1a9('0xe'),_0x5674bc,_0x50b0eb[_0xd1a9('0x12')]['message']);return _0x2a8ed7(_0x50b0eb[_0xd1a9('0x12')][_0xd1a9('0x14')]);}else{logger[_0xd1a9('0x15')](_0xd1a9('0xe'),_0x5674bc,_0xd1a9('0xf'));_0x2a8ed7(_0x50b0eb['result'][_0xd1a9('0x14')]);}})[_0xd1a9('0x16')](function(_0x3bf730){logger[_0xd1a9('0x12')](_0xd1a9('0xe'),_0x5674bc,_0x3bf730);_0x4c14f1(_0x3bf730);});});}
\ No newline at end of file
diff --git a/server/api/userSmsQueue/index.js b/server/api/userSmsQueue/index.js
index c4779dd..581c4f5 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 _0x0abc=['multer','path','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x412d31,_0x168c1d){var _0x543cfd=function(_0x2bdd5c){while(--_0x2bdd5c){_0x412d31['push'](_0x412d31['shift']());}};_0x543cfd(++_0x168c1d);}(_0x0abc,0x72));var _0xc0ab=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0abc[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xc0ab('0x0'));var util=require('util');var path=require(_0xc0ab('0x1'));var timeout=require(_0xc0ab('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xc0ab('0x3'));var interaction=require(_0xc0ab('0x4'));var config=require(_0xc0ab('0x5'));module['exports']=router;
\ No newline at end of file
+var _0x84bb=['../../config/environment','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service'];(function(_0x1dd1fa,_0x13bf59){var _0x4d785e=function(_0x4434cc){while(--_0x4434cc){_0x1dd1fa['push'](_0x1dd1fa['shift']());}};_0x4d785e(++_0x13bf59);}(_0x84bb,0x9b));var _0xb84b=function(_0x38dbd6,_0x15a82d){_0x38dbd6=_0x38dbd6-0x0;var _0x2e9afd=_0x84bb[_0x38dbd6];return _0x2e9afd;};'use strict';var multer=require(_0xb84b('0x0'));var util=require(_0xb84b('0x1'));var path=require(_0xb84b('0x2'));var timeout=require(_0xb84b('0x3'));var express=require(_0xb84b('0x4'));var router=express[_0xb84b('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xb84b('0x6'));var config=require(_0xb84b('0x7'));module[_0xb84b('0x8')]=router;
\ No newline at end of file
diff --git a/server/api/userSmsQueue/userSmsQueue.attributes.js b/server/api/userSmsQueue/userSmsQueue.attributes.js
index e264da9..40ef6cd 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 _0xb10b=['sequelize','INTEGER'];(function(_0x20fe8b,_0x3b5181){var _0x3f52a1=function(_0x583b08){while(--_0x583b08){_0x20fe8b['push'](_0x20fe8b['shift']());}};_0x3f52a1(++_0x3b5181);}(_0xb10b,0x12a));var _0xbb10=function(_0x4cd00b,_0x483633){_0x4cd00b=_0x4cd00b-0x0;var _0x488623=_0xb10b[_0x4cd00b];return _0x488623;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'penalty':{'type':Sequelize[_0xbb10('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xa9e0=['sequelize','exports','INTEGER'];(function(_0x263d32,_0x1d6c1c){var _0x324dca=function(_0x57493a){while(--_0x57493a){_0x263d32['push'](_0x263d32['shift']());}};_0x324dca(++_0x1d6c1c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0xa9e0[_0x5783f4];return _0x28e380;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'penalty':{'type':Sequelize[_0x0a9e('0x2')],'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 a9140b4..0900be7 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 _0xf370=['user_has_sms_queues','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./userSmsQueue.attributes','define','UserSmsQueue'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0xf370,0x1a5));var _0x0f37=function(_0x514451,_0x350f4e){_0x514451=_0x514451-0x0;var _0x588103=_0xf370[_0x514451];return _0x588103;};'use strict';var _=require('lodash');var util=require(_0x0f37('0x0'));var logger=require(_0x0f37('0x1'))(_0x0f37('0x2'));var moment=require(_0x0f37('0x3'));var BPromise=require(_0x0f37('0x4'));var rp=require(_0x0f37('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0f37('0x6'));var config=require(_0x0f37('0x7'));var attributes=require(_0x0f37('0x8'));module['exports']=function(_0x5ac527,_0x938997){return _0x5ac527[_0x0f37('0x9')](_0x0f37('0xa'),attributes,{'tableName':_0x0f37('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdf2d=['../../config/environment','./userSmsQueue.attributes','UserSmsQueue','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x40d643,_0x3c07ed){var _0x1caa2b=function(_0x33b422){while(--_0x33b422){_0x40d643['push'](_0x40d643['shift']());}};_0x1caa2b(++_0x3c07ed);}(_0xdf2d,0x12f));var _0xddf2=function(_0x52424e,_0xe7a075){_0x52424e=_0x52424e-0x0;var _0x3a34e2=_0xdf2d[_0x52424e];return _0x3a34e2;};'use strict';var _=require(_0xddf2('0x0'));var util=require(_0xddf2('0x1'));var logger=require(_0xddf2('0x2'))(_0xddf2('0x3'));var moment=require(_0xddf2('0x4'));var BPromise=require(_0xddf2('0x5'));var rp=require(_0xddf2('0x6'));var fs=require('fs');var path=require(_0xddf2('0x7'));var rimraf=require(_0xddf2('0x8'));var config=require(_0xddf2('0x9'));var attributes=require(_0xddf2('0xa'));module['exports']=function(_0x7ca09f,_0x283fa7){return _0x7ca09f['define'](_0xddf2('0xb'),attributes,{'tableName':'user_has_sms_queues','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 3a74b50..1ee96bb 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 _0x81ba=['UserSmsQueue,\x20%s,\x20%s','request\x20sent','debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info'];(function(_0x484bb6,_0x4b3093){var _0xd02c95=function(_0x12ee0d){while(--_0x12ee0d){_0x484bb6['push'](_0x484bb6['shift']());}};_0xd02c95(++_0x4b3093);}(_0x81ba,0x1d8));var _0xa81b=function(_0x62f87f,_0x193c6c){_0x62f87f=_0x62f87f-0x0;var _0x393c56=_0x81ba[_0x62f87f];return _0x393c56;};'use strict';var _=require(_0xa81b('0x0'));var util=require('util');var moment=require(_0xa81b('0x1'));var BPromise=require('bluebird');var rs=require(_0xa81b('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa81b('0x3'))['db'];var utils=require(_0xa81b('0x4'));var logger=require(_0xa81b('0x5'))(_0xa81b('0x6'));var config=require('../../config/environment');var jayson=require(_0xa81b('0x7'));var client=jayson[_0xa81b('0x8')][_0xa81b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x187d39,_0x1a642d,_0x3e6f42){return new BPromise(function(_0x596bd2,_0x48b800){return client['request'](_0x187d39,_0x3e6f42)['then'](function(_0x5916c6){logger[_0xa81b('0xa')](_0xa81b('0xb'),_0x1a642d,_0xa81b('0xc'));logger[_0xa81b('0xd')](_0xa81b('0xe'),_0x1a642d,_0xa81b('0xc'),JSON[_0xa81b('0xf')](_0x5916c6));if(_0x5916c6[_0xa81b('0x10')]){if(_0x5916c6['error'][_0xa81b('0x11')]===0x1f4){logger[_0xa81b('0x10')](_0xa81b('0xb'),_0x1a642d,_0x5916c6[_0xa81b('0x10')]['message']);return _0x48b800(_0x5916c6[_0xa81b('0x10')][_0xa81b('0x12')]);}logger['error'](_0xa81b('0xb'),_0x1a642d,_0x5916c6[_0xa81b('0x10')][_0xa81b('0x12')]);return _0x596bd2(_0x5916c6[_0xa81b('0x10')][_0xa81b('0x12')]);}else{logger[_0xa81b('0xa')]('UserSmsQueue,\x20%s,\x20%s',_0x1a642d,_0xa81b('0xc'));_0x596bd2(_0x5916c6[_0xa81b('0x13')]['message']);}})[_0xa81b('0x14')](function(_0x361195){logger['error'](_0xa81b('0xb'),_0x1a642d,_0x361195);_0x48b800(_0x361195);});});}
\ No newline at end of file
+var _0x9530=['message','info','result','catch','lodash','bluebird','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','request\x20sent','UserSmsQueue,\x20%s,\x20%s,\x20%s','stringify','code','UserSmsQueue,\x20%s,\x20%s','error'];(function(_0x37a79c,_0x2b19f0){var _0x561d89=function(_0x19bee3){while(--_0x19bee3){_0x37a79c['push'](_0x37a79c['shift']());}};_0x561d89(++_0x2b19f0);}(_0x9530,0x13f));var _0x0953=function(_0x5f28ac,_0x114397){_0x5f28ac=_0x5f28ac-0x0;var _0x3ddbb9=_0x9530[_0x5f28ac];return _0x3ddbb9;};'use strict';var _=require(_0x0953('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x0953('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0953('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x0953('0x3'));var logger=require(_0x0953('0x4'))(_0x0953('0x5'));var config=require('../../config/environment');var jayson=require(_0x0953('0x6'));var client=jayson[_0x0953('0x7')][_0x0953('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x26ff60,_0x42072f,_0x1c0717){return new BPromise(function(_0x56a23f,_0x535cb9){return client[_0x0953('0x9')](_0x26ff60,_0x1c0717)[_0x0953('0xa')](function(_0x3f84eb){logger['info']('UserSmsQueue,\x20%s,\x20%s',_0x42072f,_0x0953('0xb'));logger['debug'](_0x0953('0xc'),_0x42072f,_0x0953('0xb'),JSON[_0x0953('0xd')](_0x3f84eb));if(_0x3f84eb['error']){if(_0x3f84eb['error'][_0x0953('0xe')]===0x1f4){logger['error'](_0x0953('0xf'),_0x42072f,_0x3f84eb[_0x0953('0x10')][_0x0953('0x11')]);return _0x535cb9(_0x3f84eb[_0x0953('0x10')][_0x0953('0x11')]);}logger[_0x0953('0x10')]('UserSmsQueue,\x20%s,\x20%s',_0x42072f,_0x3f84eb[_0x0953('0x10')][_0x0953('0x11')]);return _0x56a23f(_0x3f84eb[_0x0953('0x10')][_0x0953('0x11')]);}else{logger[_0x0953('0x12')](_0x0953('0xf'),_0x42072f,_0x0953('0xb'));_0x56a23f(_0x3f84eb[_0x0953('0x13')][_0x0953('0x11')]);}})[_0x0953('0x14')](function(_0x407aae){logger['error']('UserSmsQueue,\x20%s,\x20%s',_0x42072f,_0x407aae);_0x535cb9(_0x407aae);});});}
\ No newline at end of file
diff --git a/server/api/userVoiceQueue/index.js b/server/api/userVoiceQueue/index.js
index bff4b02..07f700f 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 _0x4957=['path','Router','../../components/auth/service','../../config/environment','multer','util'];(function(_0x14d382,_0x54b6bd){var _0x31c6a7=function(_0xc9bb74){while(--_0xc9bb74){_0x14d382['push'](_0x14d382['shift']());}};_0x31c6a7(++_0x54b6bd);}(_0x4957,0x178));var _0x7495=function(_0x2341c6,_0x3af092){_0x2341c6=_0x2341c6-0x0;var _0x54c34d=_0x4957[_0x2341c6];return _0x54c34d;};'use strict';var multer=require(_0x7495('0x0'));var util=require(_0x7495('0x1'));var path=require(_0x7495('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x7495('0x3')]();var auth=require(_0x7495('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x7495('0x5'));module['exports']=router;
\ No newline at end of file
+var _0xc65f=['express','path'];(function(_0x375ce7,_0x24243e){var _0x11df30=function(_0x2713f0){while(--_0x2713f0){_0x375ce7['push'](_0x375ce7['shift']());}};_0x11df30(++_0x24243e);}(_0xc65f,0x14d));var _0xfc65=function(_0x518cfe,_0x2a9bb8){_0x518cfe=_0x518cfe-0x0;var _0x42af3a=_0xc65f[_0x518cfe];return _0x42af3a;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xfc65('0x0'));var timeout=require('connect-timeout');var express=require(_0xfc65('0x1'));var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module['exports']=router;
\ No newline at end of file
diff --git a/server/api/userVoiceQueue/userVoiceQueue.attributes.js b/server/api/userVoiceQueue/userVoiceQueue.attributes.js
index 545496c..b7401bd 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 _0xe706=['INTEGER','sequelize','exports'];(function(_0x488b3,_0x3252c3){var _0x402874=function(_0x248cac){while(--_0x248cac){_0x488b3['push'](_0x488b3['shift']());}};_0x402874(++_0x3252c3);}(_0xe706,0xa3));var _0x6e70=function(_0x5d8076,_0x2b476a){_0x5d8076=_0x5d8076-0x0;var _0x26811a=_0xe706[_0x5d8076];return _0x26811a;};'use strict';var Sequelize=require(_0x6e70('0x0'));module[_0x6e70('0x1')]={'penalty':{'type':Sequelize[_0x6e70('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xb10b=['sequelize','INTEGER'];(function(_0x319a96,_0x2a5c2c){var _0x4dd386=function(_0x4876fc){while(--_0x4876fc){_0x319a96['push'](_0x319a96['shift']());}};_0x4dd386(++_0x2a5c2c);}(_0xb10b,0x12a));var _0xbb10=function(_0x5a60ce,_0x48f080){_0x5a60ce=_0x5a60ce-0x0;var _0x393e5e=_0xb10b[_0x5a60ce];return _0x393e5e;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'penalty':{'type':Sequelize[_0xbb10('0x1')],'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 b9059f7..abeaa4d 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 _0x6334=['rimraf','../../config/environment','./userVoiceQueue.attributes','exports','UserVoiceQueue','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x2dd569,_0x4205c4){var _0x9fd232=function(_0x3b6b5c){while(--_0x3b6b5c){_0x2dd569['push'](_0x2dd569['shift']());}};_0x9fd232(++_0x4205c4);}(_0x6334,0x119));var _0x4633=function(_0x49c699,_0x314403){_0x49c699=_0x49c699-0x0;var _0x2853ea=_0x6334[_0x49c699];return _0x2853ea;};'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':'user_has_voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc874=['../../config/logger','api','request-promise','path','rimraf','./userVoiceQueue.attributes','exports','define','UserVoiceQueue','user_has_voice_queues','lodash'];(function(_0x41bb98,_0x29a606){var _0x3fb34e=function(_0x4d6b12){while(--_0x4d6b12){_0x41bb98['push'](_0x41bb98['shift']());}};_0x3fb34e(++_0x29a606);}(_0xc874,0x154));var _0x4c87=function(_0x5c2e5e,_0x2bc00e){_0x5c2e5e=_0x5c2e5e-0x0;var _0x46a5da=_0xc874[_0x5c2e5e];return _0x46a5da;};'use strict';var _=require(_0x4c87('0x0'));var util=require('util');var logger=require(_0x4c87('0x1'))(_0x4c87('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x4c87('0x3'));var fs=require('fs');var path=require(_0x4c87('0x4'));var rimraf=require(_0x4c87('0x5'));var config=require('../../config/environment');var attributes=require(_0x4c87('0x6'));module[_0x4c87('0x7')]=function(_0x5d63ae,_0x46e0f5){return _0x5d63ae[_0x4c87('0x8')](_0x4c87('0x9'),attributes,{'tableName':_0x4c87('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 0cc844f..5a855ba 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 _0x2d4c=['moment','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','request','then','info','UserVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util'];(function(_0x2c9b79,_0x7cf58b){var _0x265032=function(_0x188a92){while(--_0x188a92){_0x2c9b79['push'](_0x2c9b79['shift']());}};_0x265032(++_0x7cf58b);}(_0x2d4c,0xfa));var _0xc2d4=function(_0x336acc,_0x441068){_0x336acc=_0x336acc-0x0;var _0x4f6263=_0x2d4c[_0x336acc];return _0x4f6263;};'use strict';var _=require(_0xc2d4('0x0'));var util=require(_0xc2d4('0x1'));var moment=require(_0xc2d4('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc2d4('0x3'));var db=require(_0xc2d4('0x4'))['db'];var utils=require(_0xc2d4('0x5'));var logger=require('../../config/logger')(_0xc2d4('0x6'));var config=require(_0xc2d4('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xc2d4('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5533c,_0x3b6743,_0x3a3d11){return new BPromise(function(_0x4a8801,_0x14e7a7){return client[_0xc2d4('0x9')](_0x5533c,_0x3a3d11)[_0xc2d4('0xa')](function(_0x218dcf){logger[_0xc2d4('0xb')](_0xc2d4('0xc'),_0x3b6743,_0xc2d4('0xd'));logger[_0xc2d4('0xe')](_0xc2d4('0xf'),_0x3b6743,_0xc2d4('0xd'),JSON[_0xc2d4('0x10')](_0x218dcf));if(_0x218dcf[_0xc2d4('0x11')]){if(_0x218dcf['error'][_0xc2d4('0x12')]===0x1f4){logger[_0xc2d4('0x11')](_0xc2d4('0xc'),_0x3b6743,_0x218dcf[_0xc2d4('0x11')][_0xc2d4('0x13')]);return _0x14e7a7(_0x218dcf['error'][_0xc2d4('0x13')]);}logger[_0xc2d4('0x11')](_0xc2d4('0xc'),_0x3b6743,_0x218dcf['error'][_0xc2d4('0x13')]);return _0x4a8801(_0x218dcf[_0xc2d4('0x11')]['message']);}else{logger['info'](_0xc2d4('0xc'),_0x3b6743,_0xc2d4('0xd'));_0x4a8801(_0x218dcf['result']['message']);}})[_0xc2d4('0x14')](function(_0x5583c2){logger[_0xc2d4('0x11')](_0xc2d4('0xc'),_0x3b6743,_0x5583c2);_0x14e7a7(_0x5583c2);});});}
\ No newline at end of file
+var _0x53a8=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','UserVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','bluebird','randomstring','ioredis'];(function(_0x21c504,_0x3e00c6){var _0x51b5c3=function(_0x5b3f42){while(--_0x5b3f42){_0x21c504['push'](_0x21c504['shift']());}};_0x51b5c3(++_0x3e00c6);}(_0x53a8,0x11c));var _0x853a=function(_0x40df4e,_0x40fe83){_0x40df4e=_0x40df4e-0x0;var _0x550e25=_0x53a8[_0x40df4e];return _0x550e25;};'use strict';var _=require(_0x853a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x853a('0x1'));var rs=require(_0x853a('0x2'));var fs=require('fs');var Redis=require(_0x853a('0x3'));var db=require(_0x853a('0x4'))['db'];var utils=require(_0x853a('0x5'));var logger=require(_0x853a('0x6'))(_0x853a('0x7'));var config=require(_0x853a('0x8'));var jayson=require(_0x853a('0x9'));var client=jayson[_0x853a('0xa')][_0x853a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4f6100,_0x54a9cb,_0x57cbb3){return new BPromise(function(_0x543b38,_0x2ca88b){return client[_0x853a('0xc')](_0x4f6100,_0x57cbb3)[_0x853a('0xd')](function(_0x54e650){logger['info'](_0x853a('0xe'),_0x54a9cb,_0x853a('0xf'));logger[_0x853a('0x10')](_0x853a('0x11'),_0x54a9cb,_0x853a('0xf'),JSON[_0x853a('0x12')](_0x54e650));if(_0x54e650[_0x853a('0x13')]){if(_0x54e650[_0x853a('0x13')]['code']===0x1f4){logger[_0x853a('0x13')](_0x853a('0xe'),_0x54a9cb,_0x54e650['error']['message']);return _0x2ca88b(_0x54e650['error']['message']);}logger['error'](_0x853a('0xe'),_0x54a9cb,_0x54e650[_0x853a('0x13')][_0x853a('0x14')]);return _0x543b38(_0x54e650[_0x853a('0x13')][_0x853a('0x14')]);}else{logger[_0x853a('0x15')]('UserVoiceQueue,\x20%s,\x20%s',_0x54a9cb,_0x853a('0xf'));_0x543b38(_0x54e650[_0x853a('0x16')][_0x853a('0x14')]);}})[_0x853a('0x17')](function(_0x48a265){logger[_0x853a('0x13')]('UserVoiceQueue,\x20%s,\x20%s',_0x54a9cb,_0x48a265);_0x2ca88b(_0x48a265);});});}
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/index.js b/server/api/userVoiceQueueRt/index.js
index ce3fe0c..4a5df75 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 _0xab49=['express','Router','../../components/auth/service','../../config/environment','exports','multer','util','connect-timeout'];(function(_0x13563b,_0x29fbaa){var _0x4669ce=function(_0x8ccc72){while(--_0x8ccc72){_0x13563b['push'](_0x13563b['shift']());}};_0x4669ce(++_0x29fbaa);}(_0xab49,0xdd));var _0x9ab4=function(_0x3d2d6f,_0x368872){_0x3d2d6f=_0x3d2d6f-0x0;var _0x5c0022=_0xab49[_0x3d2d6f];return _0x5c0022;};'use strict';var multer=require(_0x9ab4('0x0'));var util=require(_0x9ab4('0x1'));var path=require('path');var timeout=require(_0x9ab4('0x2'));var express=require(_0x9ab4('0x3'));var router=express[_0x9ab4('0x4')]();var auth=require(_0x9ab4('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x9ab4('0x6'));module[_0x9ab4('0x7')]=router;
\ No newline at end of file
+var _0x088f=['exports','multer','util','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x3e8e88,_0x2b1002){var _0x17141c=function(_0x5d04c8){while(--_0x5d04c8){_0x3e8e88['push'](_0x3e8e88['shift']());}};_0x17141c(++_0x2b1002);}(_0x088f,0x149));var _0xf088=function(_0x2ac6cd,_0x2c4761){_0x2ac6cd=_0x2ac6cd-0x0;var _0x2b7f6c=_0x088f[_0x2ac6cd];return _0x2b7f6c;};'use strict';var multer=require(_0xf088('0x0'));var util=require(_0xf088('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xf088('0x2'));var router=express[_0xf088('0x3')]();var auth=require(_0xf088('0x4'));var interaction=require(_0xf088('0x5'));var config=require(_0xf088('0x6'));module[_0xf088('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js
index 82f0f6e..bc162b2 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 _0x320c=['queue_interface','sequelize','exports','INTEGER','Required\x20by\x20Asterisk','STRING'];(function(_0xbd1fac,_0x38149e){var _0x47b668=function(_0x47e1e4){while(--_0x47e1e4){_0xbd1fac['push'](_0xbd1fac['shift']());}};_0x47b668(++_0x38149e);}(_0x320c,0x1ab));var _0xc320=function(_0x3d0b49,_0x5d5e7b){_0x3d0b49=_0x3d0b49-0x0;var _0x3926d0=_0x320c[_0x3d0b49];return _0x3926d0;};'use strict';var Sequelize=require(_0xc320('0x0'));module[_0xc320('0x1')]={'uniqueid':{'type':Sequelize[_0xc320('0x2')],'primaryKey':!![],'autoIncrement':!![],'comment':_0xc320('0x3')},'membername':{'type':Sequelize[_0xc320('0x4')],'allowNull':![],'comment':_0xc320('0x3')},'UserId':{'type':Sequelize[_0xc320('0x2')],'allowNull':![]},'queue_name':{'type':Sequelize[_0xc320('0x4')],'allowNull':![],'unique':_0xc320('0x5'),'comment':_0xc320('0x3')},'VoiceQueueId':{'type':Sequelize[_0xc320('0x2')],'allowNull':![]},'interface':{'type':Sequelize[_0xc320('0x4')],'allowNull':![],'unique':_0xc320('0x5'),'comment':'Required\x20by\x20Asterisk'},'penalty':{'type':Sequelize[_0xc320('0x2')](0xb),'defaultValue':0x0,'comment':'Required\x20by\x20Asterisk'},'paused':{'type':Sequelize[_0xc320('0x2')](0xb),'defaultValue':0x0,'comment':_0xc320('0x3')}};
\ No newline at end of file
+var _0xe0f4=['INTEGER','Required\x20by\x20Asterisk','STRING','queue_interface','exports'];(function(_0x159f91,_0xe8a30f){var _0x26bd65=function(_0x5680d1){while(--_0x5680d1){_0x159f91['push'](_0x159f91['shift']());}};_0x26bd65(++_0xe8a30f);}(_0xe0f4,0xb8));var _0x4e0f=function(_0x1891b4,_0xf0690e){_0x1891b4=_0x1891b4-0x0;var _0x2db6a3=_0xe0f4[_0x1891b4];return _0x2db6a3;};'use strict';var Sequelize=require('sequelize');module[_0x4e0f('0x0')]={'uniqueid':{'type':Sequelize[_0x4e0f('0x1')],'primaryKey':!![],'autoIncrement':!![],'comment':_0x4e0f('0x2')},'membername':{'type':Sequelize[_0x4e0f('0x3')],'allowNull':![],'comment':_0x4e0f('0x2')},'UserId':{'type':Sequelize[_0x4e0f('0x1')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x4e0f('0x3')],'allowNull':![],'unique':_0x4e0f('0x4'),'comment':_0x4e0f('0x2')},'VoiceQueueId':{'type':Sequelize[_0x4e0f('0x1')],'allowNull':![]},'interface':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x4e0f('0x4'),'comment':_0x4e0f('0x2')},'penalty':{'type':Sequelize[_0x4e0f('0x1')](0xb),'defaultValue':0x0,'comment':_0x4e0f('0x2')},'paused':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'comment':'Required\x20by\x20Asterisk'}};
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js
index 1ef3ab8..ec6322f 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 _0xa53c=['../../mysqldb','UserVoiceQueueRt','setMaxListeners','update','remove','emit','exports'];(function(_0x57db3a,_0x32dc3f){var _0x18dc71=function(_0x426649){while(--_0x426649){_0x57db3a['push'](_0x57db3a['shift']());}};_0x18dc71(++_0x32dc3f);}(_0xa53c,0x9a));var _0xca53=function(_0x4eb47a,_0x451105){_0x4eb47a=_0x4eb47a-0x0;var _0x5f4337=_0xa53c[_0x4eb47a];return _0x5f4337;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xca53('0x0'))['db'][_0xca53('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xca53('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xca53('0x3'),'afterDestroy':_0xca53('0x4')};function emitEvent(_0x145c33){return function(_0x54471e,_0x14da99,_0x1e1b46){UserVoiceQueueRtEvents[_0xca53('0x5')](_0x145c33+':'+_0x54471e['id'],_0x54471e);UserVoiceQueueRtEvents[_0xca53('0x5')](_0x145c33,_0x54471e);_0x1e1b46(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xca53('0x6')]=UserVoiceQueueRtEvents;
\ No newline at end of file
+var _0x3a38=['UserVoiceQueueRt','setMaxListeners','save','remove','emit','hook','events','../../mysqldb'];(function(_0x557028,_0x10e241){var _0x4f7c67=function(_0x1250ae){while(--_0x1250ae){_0x557028['push'](_0x557028['shift']());}};_0x4f7c67(++_0x10e241);}(_0x3a38,0xfe));var _0x83a3=function(_0x24250e,_0x250e09){_0x24250e=_0x24250e-0x0;var _0x4fcc2d=_0x3a38[_0x24250e];return _0x4fcc2d;};'use strict';var EventEmitter=require(_0x83a3('0x0'));var UserVoiceQueueRt=require(_0x83a3('0x1'))['db'][_0x83a3('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x83a3('0x3')](0x0);var events={'afterCreate':_0x83a3('0x4'),'afterUpdate':'update','afterDestroy':_0x83a3('0x5')};function emitEvent(_0x2c6fc8){return function(_0x524d49,_0x259b61,_0x33948d){UserVoiceQueueRtEvents[_0x83a3('0x6')](_0x2c6fc8+':'+_0x524d49['id'],_0x524d49);UserVoiceQueueRtEvents[_0x83a3('0x6')](_0x2c6fc8,_0x524d49);_0x33948d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x83a3('0x7')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents;
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js
index 52bcfe7..c878eb8 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 _0x1dfd=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','user_has_voice_queues_rt','lodash','../../config/logger','api'];(function(_0x459588,_0x1fff76){var _0x64ff55=function(_0x5a8817){while(--_0x5a8817){_0x459588['push'](_0x459588['shift']());}};_0x64ff55(++_0x1fff76);}(_0x1dfd,0xe1));var _0xd1df=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x1dfd[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require(_0xd1df('0x0'));var util=require('util');var logger=require(_0xd1df('0x1'))(_0xd1df('0x2'));var moment=require(_0xd1df('0x3'));var BPromise=require(_0xd1df('0x4'));var rp=require(_0xd1df('0x5'));var fs=require('fs');var path=require(_0xd1df('0x6'));var rimraf=require(_0xd1df('0x7'));var config=require(_0xd1df('0x8'));var attributes=require('./userVoiceQueueRt.attributes');module[_0xd1df('0x9')]=function(_0x458a1c,_0x45f106){return _0x458a1c[_0xd1df('0xa')]('UserVoiceQueueRt',attributes,{'tableName':_0xd1df('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x05a4=['request-promise','./userVoiceQueueRt.attributes','exports','define','UserVoiceQueueRt','user_has_voice_queues_rt','lodash','util','../../config/logger','api','moment'];(function(_0x2b7e9c,_0x236531){var _0x39ac82=function(_0x351563){while(--_0x351563){_0x2b7e9c['push'](_0x2b7e9c['shift']());}};_0x39ac82(++_0x236531);}(_0x05a4,0x1df));var _0x405a=function(_0x3cf3be,_0xea77b5){_0x3cf3be=_0x3cf3be-0x0;var _0x15323b=_0x05a4[_0x3cf3be];return _0x15323b;};'use strict';var _=require(_0x405a('0x0'));var util=require(_0x405a('0x1'));var logger=require(_0x405a('0x2'))(_0x405a('0x3'));var moment=require(_0x405a('0x4'));var BPromise=require('bluebird');var rp=require(_0x405a('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x405a('0x6'));module[_0x405a('0x7')]=function(_0x13af05,_0xa2ec77){return _0x13af05[_0x405a('0x8')](_0x405a('0x9'),attributes,{'tableName':_0x405a('0xa'),'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 e8a8616..c864bf0 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 _0x0889=['request\x20sent','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','COUNT','sequelize','literal','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','redis','defaults','localhost','socket.io-emitter','./userVoiceQueueRt.socket','then','UserVoiceQueueRt,\x20%s,\x20%s'];(function(_0x2faddb,_0xc18b78){var _0x273c05=function(_0x1a3785){while(--_0x1a3785){_0x2faddb['push'](_0x2faddb['shift']());}};_0x273c05(++_0xc18b78);}(_0x0889,0xe9));var _0x9088=function(_0x2d1bc0,_0x3f26c1){_0x2d1bc0=_0x2d1bc0-0x0;var _0x42472c=_0x0889[_0x2d1bc0];return _0x42472c;};'use strict';var _=require(_0x9088('0x0'));var util=require(_0x9088('0x1'));var moment=require('moment');var BPromise=require(_0x9088('0x2'));var rs=require(_0x9088('0x3'));var fs=require('fs');var Redis=require(_0x9088('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x9088('0x5'));var logger=require('../../config/logger')(_0x9088('0x6'));var config=require(_0x9088('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config[_0x9088('0x8')]=_[_0x9088('0x9')](config[_0x9088('0x8')],{'host':_0x9088('0xa'),'port':0x18eb});var socket=require(_0x9088('0xb'))(new Redis(config[_0x9088('0x8')]));require(_0x9088('0xc'))['register'](socket);function respondWithRpcPromise(_0x2b9511,_0x5788a1,_0x5cfe60){return new BPromise(function(_0x25a099,_0x4891eb){return client['request'](_0x2b9511,_0x5cfe60)[_0x9088('0xd')](function(_0x3e9390){logger['info'](_0x9088('0xe'),_0x5788a1,_0x9088('0xf'));logger[_0x9088('0x10')](_0x9088('0x11'),_0x5788a1,_0x9088('0xf'),JSON[_0x9088('0x12')](_0x3e9390));if(_0x3e9390[_0x9088('0x13')]){if(_0x3e9390[_0x9088('0x13')]['code']===0x1f4){logger[_0x9088('0x13')](_0x9088('0xe'),_0x5788a1,_0x3e9390[_0x9088('0x13')]['message']);return _0x4891eb(_0x3e9390['error'][_0x9088('0x14')]);}logger[_0x9088('0x13')](_0x9088('0xe'),_0x5788a1,_0x3e9390['error'][_0x9088('0x14')]);return _0x25a099(_0x3e9390[_0x9088('0x13')][_0x9088('0x14')]);}else{logger[_0x9088('0x15')](_0x9088('0xe'),_0x5788a1,_0x9088('0xf'));_0x25a099(_0x3e9390['result'][_0x9088('0x14')]);}})[_0x9088('0x16')](function(_0x469f8a){logger['error'](_0x9088('0xe'),_0x5788a1,_0x469f8a);_0x4891eb(_0x469f8a);});});}exports[_0x9088('0x17')]=function(_0x3c11b7){var _0x26792d=this;return new Promise(function(_0x4491dd,_0x28d5db){return db[_0x9088('0x18')][_0x9088('0x19')]({'raw':_0x3c11b7[_0x9088('0x1a')]?_0x3c11b7['options'][_0x9088('0x1b')]===undefined?!![]:![]:!![],'where':_0x3c11b7[_0x9088('0x1a')]?_0x3c11b7[_0x9088('0x1a')]['where']||null:null,'attributes':[[db['sequelize']['fn'](_0x9088('0x1c'),db[_0x9088('0x1d')]['fn']('IF',db[_0x9088('0x1d')][_0x9088('0x1e')]('`paused`\x20=\x201,\x201,\x20null'))),'outboundQueuePauses']]})[_0x9088('0xd')](function(_0x4e67b9){logger[_0x9088('0x15')](_0x9088('0x17'),_0x3c11b7);logger[_0x9088('0x10')]('GetVoiceQueueRtPauses',_0x3c11b7,JSON[_0x9088('0x12')](_0x4e67b9));_0x4491dd(_0x4e67b9);})['catch'](function(_0x3d9b71){logger[_0x9088('0x13')]('GetVoiceQueueRtPauses',_0x3d9b71['message'],_0x3c11b7);_0x28d5db(_0x26792d['error'](0x1f4,_0x3d9b71[_0x9088('0x14')]));});});};
\ No newline at end of file
+var _0xfc43=['message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','options','raw','sequelize','literal','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./userVoiceQueueRt.socket','register','request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x2009cd,_0x549a5d){var _0x509e8a=function(_0x3b4e02){while(--_0x3b4e02){_0x2009cd['push'](_0x2009cd['shift']());}};_0x509e8a(++_0x549a5d);}(_0xfc43,0xf5));var _0x3fc4=function(_0x224d30,_0x5172dd){_0x224d30=_0x224d30-0x0;var _0x32a813=_0xfc43[_0x224d30];return _0x32a813;};'use strict';var _=require(_0x3fc4('0x0'));var util=require(_0x3fc4('0x1'));var moment=require(_0x3fc4('0x2'));var BPromise=require(_0x3fc4('0x3'));var rs=require(_0x3fc4('0x4'));var fs=require('fs');var Redis=require(_0x3fc4('0x5'));var db=require(_0x3fc4('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x3fc4('0x7'))('rpc');var config=require(_0x3fc4('0x8'));var jayson=require(_0x3fc4('0x9'));var client=jayson[_0x3fc4('0xa')][_0x3fc4('0xb')]({'port':0x232a});config[_0x3fc4('0xc')]=_[_0x3fc4('0xd')](config[_0x3fc4('0xc')],{'host':_0x3fc4('0xe'),'port':0x18eb});var socket=require(_0x3fc4('0xf'))(new Redis(config[_0x3fc4('0xc')]));require(_0x3fc4('0x10'))[_0x3fc4('0x11')](socket);function respondWithRpcPromise(_0x418700,_0x24b17f,_0x5323dc){return new BPromise(function(_0x345535,_0x5c75f5){return client[_0x3fc4('0x12')](_0x418700,_0x5323dc)[_0x3fc4('0x13')](function(_0x6f0e7b){logger[_0x3fc4('0x14')](_0x3fc4('0x15'),_0x24b17f,_0x3fc4('0x16'));logger[_0x3fc4('0x17')](_0x3fc4('0x18'),_0x24b17f,'request\x20sent',JSON[_0x3fc4('0x19')](_0x6f0e7b));if(_0x6f0e7b[_0x3fc4('0x1a')]){if(_0x6f0e7b[_0x3fc4('0x1a')][_0x3fc4('0x1b')]===0x1f4){logger[_0x3fc4('0x1a')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x24b17f,_0x6f0e7b[_0x3fc4('0x1a')][_0x3fc4('0x1c')]);return _0x5c75f5(_0x6f0e7b[_0x3fc4('0x1a')][_0x3fc4('0x1c')]);}logger['error'](_0x3fc4('0x15'),_0x24b17f,_0x6f0e7b[_0x3fc4('0x1a')]['message']);return _0x345535(_0x6f0e7b['error'][_0x3fc4('0x1c')]);}else{logger[_0x3fc4('0x14')](_0x3fc4('0x15'),_0x24b17f,_0x3fc4('0x16'));_0x345535(_0x6f0e7b[_0x3fc4('0x1d')]['message']);}})[_0x3fc4('0x1e')](function(_0x4c32f6){logger[_0x3fc4('0x1a')](_0x3fc4('0x15'),_0x24b17f,_0x4c32f6);_0x5c75f5(_0x4c32f6);});});}exports[_0x3fc4('0x1f')]=function(_0x56569a){var _0x422a53=this;return new Promise(function(_0x2b0df4,_0x28d49e){return db[_0x3fc4('0x20')]['findAll']({'raw':_0x56569a[_0x3fc4('0x21')]?_0x56569a['options'][_0x3fc4('0x22')]===undefined?!![]:![]:!![],'where':_0x56569a[_0x3fc4('0x21')]?_0x56569a['options']['where']||null:null,'attributes':[[db[_0x3fc4('0x23')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x3fc4('0x23')][_0x3fc4('0x24')](_0x3fc4('0x25')))),_0x3fc4('0x26')]]})[_0x3fc4('0x13')](function(_0x2f85a6){logger[_0x3fc4('0x14')](_0x3fc4('0x1f'),_0x56569a);logger[_0x3fc4('0x17')](_0x3fc4('0x1f'),_0x56569a,JSON['stringify'](_0x2f85a6));_0x2b0df4(_0x2f85a6);})[_0x3fc4('0x1e')](function(_0x1699bd){logger[_0x3fc4('0x1a')](_0x3fc4('0x1f'),_0x1699bd[_0x3fc4('0x1c')],_0x56569a);_0x28d49e(_0x422a53['error'](0x1f4,_0x1699bd['message']));});});};
\ No newline at end of file
diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js
index f8f897a..a0d53ee 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 _0x16d3=['length','userVoiceQueueRt:','./userVoiceQueueRt.events','save','remove','update','emit','removeListener','register'];(function(_0xbe2c53,_0x57c17d){var _0x13efd6=function(_0xe4bacd){while(--_0xe4bacd){_0xbe2c53['push'](_0xbe2c53['shift']());}};_0x13efd6(++_0x57c17d);}(_0x16d3,0x1a9));var _0x316d=function(_0x289874,_0x1b6752){_0x289874=_0x289874-0x0;var _0x2f8bbb=_0x16d3[_0x289874];return _0x2f8bbb;};'use strict';var UserVoiceQueueRtEvents=require(_0x316d('0x0'));var events=[_0x316d('0x1'),_0x316d('0x2'),_0x316d('0x3')];function createListener(_0x5d9d63,_0x502bc6){return function(_0x421a9f){_0x502bc6[_0x316d('0x4')](_0x5d9d63,_0x421a9f);};}function removeListener(_0x3f1c88,_0x5cdc1d){return function(){UserVoiceQueueRtEvents[_0x316d('0x5')](_0x3f1c88,_0x5cdc1d);};}exports[_0x316d('0x6')]=function(_0x32d6f4){for(var _0x5f5af5=0x0,_0x583f4b=events[_0x316d('0x7')];_0x5f5af5<_0x583f4b;_0x5f5af5++){var _0x45cd78=events[_0x5f5af5];var _0x1ac428=createListener(_0x316d('0x8')+_0x45cd78,_0x32d6f4);UserVoiceQueueRtEvents['on'](_0x45cd78,_0x1ac428);}};
\ No newline at end of file
+var _0x347c=['emit','removeListener','register','save','remove','update'];(function(_0x5773fd,_0x3b21fa){var _0x2c6ea3=function(_0x439fae){while(--_0x439fae){_0x5773fd['push'](_0x5773fd['shift']());}};_0x2c6ea3(++_0x3b21fa);}(_0x347c,0x19b));var _0xc347=function(_0x2064e5,_0x4f6fa2){_0x2064e5=_0x2064e5-0x0;var _0x21a233=_0x347c[_0x2064e5];return _0x21a233;};'use strict';var UserVoiceQueueRtEvents=require('./userVoiceQueueRt.events');var events=[_0xc347('0x0'),_0xc347('0x1'),_0xc347('0x2')];function createListener(_0x7c6b6f,_0x1fb99a){return function(_0xa75138){_0x1fb99a[_0xc347('0x3')](_0x7c6b6f,_0xa75138);};}function removeListener(_0x58fd58,_0x1a6ece){return function(){UserVoiceQueueRtEvents[_0xc347('0x4')](_0x58fd58,_0x1a6ece);};}exports[_0xc347('0x5')]=function(_0x30789e){for(var _0x28d94c=0x0,_0x1a30ea=events['length'];_0x28d94c<_0x1a30ea;_0x28d94c++){var _0x54376c=events[_0x28d94c];var _0x581ce2=createListener('userVoiceQueueRt:'+_0x54376c,_0x30789e);UserVoiceQueueRtEvents['on'](_0x54376c,_0x581ce2);}};
\ No newline at end of file
diff --git a/server/api/userWhatsappQueue/index.js b/server/api/userWhatsappQueue/index.js
index 06701fa..58ff175 100644
--- a/server/api/userWhatsappQueue/index.js
+++ b/server/api/userWhatsappQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1da3=['multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','exports'];(function(_0x18ce59,_0x124e24){var _0x1e0e29=function(_0x22b821){while(--_0x22b821){_0x18ce59['push'](_0x18ce59['shift']());}};_0x1e0e29(++_0x124e24);}(_0x1da3,0xa8));var _0x31da=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x1da3[_0x4565bf];return _0x5610ba;};'use strict';var multer=require(_0x31da('0x0'));var util=require('util');var path=require(_0x31da('0x1'));var timeout=require(_0x31da('0x2'));var express=require(_0x31da('0x3'));var router=express[_0x31da('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x31da('0x5'));var config=require(_0x31da('0x6'));module[_0x31da('0x7')]=router;
\ No newline at end of file
+var _0xdeb8=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','exports','multer','util','connect-timeout'];(function(_0x3255ec,_0xcbfc90){var _0x2bc931=function(_0x3882e8){while(--_0x3882e8){_0x3255ec['push'](_0x3255ec['shift']());}};_0x2bc931(++_0xcbfc90);}(_0xdeb8,0x11d));var _0x8deb=function(_0x355199,_0x24cab5){_0x355199=_0x355199-0x0;var _0x4ed63d=_0xdeb8[_0x355199];return _0x4ed63d;};'use strict';var multer=require(_0x8deb('0x0'));var util=require(_0x8deb('0x1'));var path=require('path');var timeout=require(_0x8deb('0x2'));var express=require('express');var router=express[_0x8deb('0x3')]();var auth=require(_0x8deb('0x4'));var interaction=require(_0x8deb('0x5'));var config=require(_0x8deb('0x6'));module[_0x8deb('0x7')]=router;
\ No newline at end of file
diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js b/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js
index b7982a8..1708a05 100644
--- a/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js
+++ b/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b0=['exports','sequelize'];(function(_0x3b2526,_0x278079){var _0x5e40bf=function(_0x548616){while(--_0x548616){_0x3b2526['push'](_0x3b2526['shift']());}};_0x5e40bf(++_0x278079);}(_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')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xe706=['INTEGER','sequelize','exports'];(function(_0x265517,_0x32f1e5){var _0x20b34c=function(_0x24f1ef){while(--_0x24f1ef){_0x265517['push'](_0x265517['shift']());}};_0x20b34c(++_0x32f1e5);}(_0xe706,0xa3));var _0x6e70=function(_0x390556,_0x5b64bd){_0x390556=_0x390556-0x0;var _0x11868e=_0xe706[_0x390556];return _0x11868e;};'use strict';var Sequelize=require(_0x6e70('0x0'));module[_0x6e70('0x1')]={'penalty':{'type':Sequelize[_0x6e70('0x2')],'defaultValue':0x0}};
\ No newline at end of file
diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.model.js b/server/api/userWhatsappQueue/userWhatsappQueue.model.js
index 5133c66..e3ad2d1 100644
--- a/server/api/userWhatsappQueue/userWhatsappQueue.model.js
+++ b/server/api/userWhatsappQueue/userWhatsappQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5204=['request-promise','path','../../config/environment','exports','define','UserWhatsappQueue','user_has_whatsapp_queues','lodash','util','api','moment','bluebird'];(function(_0x4fca8e,_0x4c2162){var _0x23f51d=function(_0x4e42ae){while(--_0x4e42ae){_0x4fca8e['push'](_0x4fca8e['shift']());}};_0x23f51d(++_0x4c2162);}(_0x5204,0xdf));var _0x4520=function(_0x217ff6,_0x36f75d){_0x217ff6=_0x217ff6-0x0;var _0x417c93=_0x5204[_0x217ff6];return _0x417c93;};'use strict';var _=require(_0x4520('0x0'));var util=require(_0x4520('0x1'));var logger=require('../../config/logger')(_0x4520('0x2'));var moment=require(_0x4520('0x3'));var BPromise=require(_0x4520('0x4'));var rp=require(_0x4520('0x5'));var fs=require('fs');var path=require(_0x4520('0x6'));var rimraf=require('rimraf');var config=require(_0x4520('0x7'));var attributes=require('./userWhatsappQueue.attributes');module[_0x4520('0x8')]=function(_0x209381,_0xe0a256){return _0x209381[_0x4520('0x9')](_0x4520('0xa'),attributes,{'tableName':_0x4520('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8f59=['util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./userWhatsappQueue.attributes','define','lodash'];(function(_0x50c9dc,_0x407b20){var _0x5ba44c=function(_0xb1c816){while(--_0xb1c816){_0x50c9dc['push'](_0x50c9dc['shift']());}};_0x5ba44c(++_0x407b20);}(_0x8f59,0x11d));var _0x98f5=function(_0x7074d5,_0x427953){_0x7074d5=_0x7074d5-0x0;var _0xced075=_0x8f59[_0x7074d5];return _0xced075;};'use strict';var _=require(_0x98f5('0x0'));var util=require(_0x98f5('0x1'));var logger=require(_0x98f5('0x2'))(_0x98f5('0x3'));var moment=require(_0x98f5('0x4'));var BPromise=require(_0x98f5('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x98f5('0x6'));var rimraf=require(_0x98f5('0x7'));var config=require(_0x98f5('0x8'));var attributes=require(_0x98f5('0x9'));module['exports']=function(_0xdcce7a,_0x358618){return _0xdcce7a[_0x98f5('0xa')]('UserWhatsappQueue',attributes,{'tableName':'user_has_whatsapp_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js b/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js
index f55d2ac..7387b86 100644
--- a/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js
+++ b/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['http','info','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','UserWhatsappQueue,\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(_0x12faa4,_0x5ee419){var _0x4f336b=function(_0x42144a){while(--_0x42144a){_0x12faa4['push'](_0x12faa4['shift']());}};_0x4f336b(++_0x5ee419);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1b349a,_0x22222c){_0x1b349a=_0x1b349a-0x0;var _0x5d1f7c=_0xa9e0[_0x1b349a];return _0x5d1f7c;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','UserWhatsappQueue,\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(_0x4df1c9,_0x5bb8b4){var _0x5d5313=function(_0xee18cd){while(--_0xee18cd){_0x4df1c9['push'](_0x4df1c9['shift']());}};_0x5d5313(++_0x5bb8b4);}(_0xa9e0,0x123));var _0x0a9e=function(_0x491a7f,_0x28bb80){_0x491a7f=_0x491a7f-0x0;var _0x3d8f44=_0xa9e0[_0x491a7f];return _0x3d8f44;};'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/variable/index.js b/server/api/variable/index.js
index 7b23c5e..912ace0 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 _0x3636=['../../components/auth/service','../../components/interaction/service','./variable.controller','get','index','/:id','isAuthenticated','show','create','delete','multer','util','path','connect-timeout','express','Router'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x3636,0x1da));var _0x6363=function(_0x117648,_0x49d223){_0x117648=_0x117648-0x0;var _0x42b466=_0x3636[_0x117648];return _0x42b466;};'use strict';var multer=require(_0x6363('0x0'));var util=require(_0x6363('0x1'));var path=require(_0x6363('0x2'));var timeout=require(_0x6363('0x3'));var express=require(_0x6363('0x4'));var router=express[_0x6363('0x5')]();var auth=require(_0x6363('0x6'));var interaction=require(_0x6363('0x7'));var config=require('../../config/environment');var controller=require(_0x6363('0x8'));router[_0x6363('0x9')]('/',auth['isAuthenticated'](),controller[_0x6363('0xa')]);router[_0x6363('0x9')](_0x6363('0xb'),auth[_0x6363('0xc')](),controller[_0x6363('0xd')]);router['post']('/',auth['isAuthenticated'](),controller[_0x6363('0xe')]);router['put']('/:id',auth[_0x6363('0xc')](),controller['update']);router[_0x6363('0xf')](_0x6363('0xb'),auth[_0x6363('0xc')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xd1f2=['/:id','post','create','put','update','delete','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./variable.controller','get','isAuthenticated'];(function(_0x4f47e4,_0x403898){var _0x331cf7=function(_0x54f592){while(--_0x54f592){_0x4f47e4['push'](_0x4f47e4['shift']());}};_0x331cf7(++_0x403898);}(_0xd1f2,0x1c9));var _0x2d1f=function(_0x233e4c,_0x5a9221){_0x233e4c=_0x233e4c-0x0;var _0x3cc1e7=_0xd1f2[_0x233e4c];return _0x3cc1e7;};'use strict';var multer=require(_0x2d1f('0x0'));var util=require(_0x2d1f('0x1'));var path=require(_0x2d1f('0x2'));var timeout=require(_0x2d1f('0x3'));var express=require('express');var router=express[_0x2d1f('0x4')]();var auth=require(_0x2d1f('0x5'));var interaction=require(_0x2d1f('0x6'));var config=require(_0x2d1f('0x7'));var controller=require(_0x2d1f('0x8'));router[_0x2d1f('0x9')]('/',auth[_0x2d1f('0xa')](),controller['index']);router[_0x2d1f('0x9')](_0x2d1f('0xb'),auth[_0x2d1f('0xa')](),controller['show']);router[_0x2d1f('0xc')]('/',auth[_0x2d1f('0xa')](),controller[_0x2d1f('0xd')]);router[_0x2d1f('0xe')](_0x2d1f('0xb'),auth[_0x2d1f('0xa')](),controller[_0x2d1f('0xf')]);router[_0x2d1f('0x10')](_0x2d1f('0xb'),auth['isAuthenticated'](),controller['destroy']);module[_0x2d1f('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/variable/variable.attributes.js b/server/api/variable/variable.attributes.js
index 5a93eca..32d6a0b 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 _0xe85a=['exports','STRING','sequelize'];(function(_0x52dfa9,_0x306d3f){var _0xdfaa57=function(_0x9991c6){while(--_0x9991c6){_0x52dfa9['push'](_0x52dfa9['shift']());}};_0xdfaa57(++_0x306d3f);}(_0xe85a,0x1ac));var _0xae85=function(_0x12921b,_0x5be801){_0x12921b=_0x12921b-0x0;var _0x35b18c=_0xe85a[_0x12921b];return _0x35b18c;};'use strict';var Sequelize=require(_0xae85('0x0'));module[_0xae85('0x1')]={'name':{'type':Sequelize[_0xae85('0x2')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xae85('0x2')]}};
\ No newline at end of file
+var _0x3257=['STRING','name','sequelize','exports'];(function(_0x375fd7,_0x1ae4a4){var _0x323f83=function(_0x221dfa){while(--_0x221dfa){_0x375fd7['push'](_0x375fd7['shift']());}};_0x323f83(++_0x1ae4a4);}(_0x3257,0x176));var _0x7325=function(_0x10e55e,_0x1ee877){_0x10e55e=_0x10e55e-0x0;var _0xdfc047=_0x3257[_0x10e55e];return _0xdfc047;};'use strict';var Sequelize=require(_0x7325('0x0'));module[_0x7325('0x1')]={'name':{'type':Sequelize[_0x7325('0x2')],'unique':_0x7325('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js
index c0d27ae..7895891 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 _0x5a9a=['UserProfileResource','sendStatus','error','name','send','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','VIRTUAL','merge','options','count','includeAll','include','Variable','findAll','rows','catch','show','rawAttributes','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','params','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','status','end','json','offset','set','apply','reject','save','destroy','then','get','Variables'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0x5a9a,0x85));var _0xa5a9=function(_0x363022,_0x2d4561){_0x363022=_0x363022-0x0;var _0x421a89=_0x5a9a[_0x363022];return _0x421a89;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xa5a9('0x0'));var rimraf=require(_0xa5a9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa5a9('0x2'));var rp=require(_0xa5a9('0x3'));var moment=require(_0xa5a9('0x4'));var BPromise=require(_0xa5a9('0x5'));var Mustache=require('mustache');var util=require(_0xa5a9('0x6'));var path=require(_0xa5a9('0x7'));var sox=require(_0xa5a9('0x8'));var csv=require('to-csv');var ejs=require(_0xa5a9('0x9'));var fs=require('fs');var _=require(_0xa5a9('0xa'));var squel=require('squel');var crypto=require(_0xa5a9('0xb'));var jsforce=require(_0xa5a9('0xc'));var deskjs=require(_0xa5a9('0xd'));var toCsv=require(_0xa5a9('0xe'));var querystring=require(_0xa5a9('0xf'));var Papa=require(_0xa5a9('0x10'));var Redis=require(_0xa5a9('0x11'));var authService=require(_0xa5a9('0x12'));var qs=require(_0xa5a9('0x13'));var as=require(_0xa5a9('0x14'));var hardwareService=require(_0xa5a9('0x15'));var logger=require('../../config/logger')(_0xa5a9('0x16'));var utils=require(_0xa5a9('0x17'));var config=require(_0xa5a9('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x51d813,_0x4939da){_0x4939da=_0x4939da||0xcc;return function(_0x37bc2b){if(_0x37bc2b){return _0x51d813['sendStatus'](_0x4939da);}return _0x51d813[_0xa5a9('0x19')](_0x4939da)[_0xa5a9('0x1a')]();};}function respondWithResult(_0x4bc160,_0x2b2167){_0x2b2167=_0x2b2167||0xc8;return function(_0x46b367){if(_0x46b367){return _0x4bc160[_0xa5a9('0x19')](_0x2b2167)[_0xa5a9('0x1b')](_0x46b367);}};}function respondWithFilteredResult(_0x1f32aa,_0x4098f9){return function(_0x3cf61f){if(_0x3cf61f){var _0x32e1b0=_0x3cf61f['count'],_0x4896d3=_0x4098f9[_0xa5a9('0x1c')],_0x444afd=_0x4098f9['offset']+_0x4098f9['limit'],_0x132cf2;if(_0x444afd>=_0x32e1b0){_0x444afd=_0x32e1b0;_0x132cf2=0xc8;}else{_0x132cf2=0xce;}_0x1f32aa[_0xa5a9('0x19')](_0x132cf2);return _0x1f32aa[_0xa5a9('0x1d')]('Content-Range',_0x4896d3+'-'+_0x444afd+'/'+_0x32e1b0)[_0xa5a9('0x1b')](_0x3cf61f);}return null;};}function patchUpdates(_0xb5289c){return function(_0x4c123c){try{jsonpatch[_0xa5a9('0x1e')](_0x4c123c,_0xb5289c,!![]);}catch(_0x437ec7){return BPromise[_0xa5a9('0x1f')](_0x437ec7);}return _0x4c123c[_0xa5a9('0x20')]();};}function saveUpdates(_0x6faf83,_0x42aaa8){return function(_0xdcfa71){if(_0xdcfa71){return _0xdcfa71['update'](_0x6faf83)['then'](function(_0x285915){return _0x285915;});}return null;};}function removeEntity(_0x3422ce,_0x3c6ef8){return function(_0x3c3cac){if(_0x3c3cac){return _0x3c3cac[_0xa5a9('0x21')]()[_0xa5a9('0x22')](function(){var _0x4ed06e=_0x3c3cac[_0xa5a9('0x23')]({'plain':!![]});var _0x59aaf6=_0xa5a9('0x24');return db[_0xa5a9('0x25')]['destroy']({'where':{'type':_0x59aaf6,'resourceId':_0x4ed06e['id']}})[_0xa5a9('0x22')](function(){return _0x3c3cac;});})[_0xa5a9('0x22')](function(){_0x3422ce[_0xa5a9('0x19')](0xcc)[_0xa5a9('0x1a')]();});}};}function handleEntityNotFound(_0x4a794d,_0x19eb25){return function(_0x9387d2){if(!_0x9387d2){_0x4a794d[_0xa5a9('0x26')](0x194);}return _0x9387d2;};}function handleError(_0xf0ebaf,_0xa64c74){_0xa64c74=_0xa64c74||0x1f4;return function(_0x1d4933){logger[_0xa5a9('0x27')](_0x1d4933['stack']);if(_0x1d4933[_0xa5a9('0x28')]){delete _0x1d4933[_0xa5a9('0x28')];}_0xf0ebaf[_0xa5a9('0x19')](_0xa64c74)[_0xa5a9('0x29')](_0x1d4933);};}exports['index']=function(_0x15afcb,_0xed5721){var _0x11f7b0={},_0x653d5b={},_0x268f3b={'count':0x0,'rows':[]};var _0x55b476=_[_0xa5a9('0x2a')](db['Variable']['rawAttributes'],function(_0x3c8435){return{'name':_0x3c8435[_0xa5a9('0x2b')],'type':_0x3c8435[_0xa5a9('0x2c')][_0xa5a9('0x2d')]};});_0x653d5b[_0xa5a9('0x2e')]=_['map'](_0x55b476,_0xa5a9('0x28'));_0x653d5b[_0xa5a9('0x2f')]=_[_0xa5a9('0x30')](_0x15afcb['query']);_0x653d5b[_0xa5a9('0x31')]=_[_0xa5a9('0x32')](_0x653d5b['model'],_0x653d5b[_0xa5a9('0x2f')]);_0x11f7b0[_0xa5a9('0x33')]=_[_0xa5a9('0x32')](_0x653d5b[_0xa5a9('0x2e')],qs[_0xa5a9('0x34')](_0x15afcb[_0xa5a9('0x2f')][_0xa5a9('0x34')]));_0x11f7b0[_0xa5a9('0x33')]=_0x11f7b0[_0xa5a9('0x33')][_0xa5a9('0x35')]?_0x11f7b0[_0xa5a9('0x33')]:_0x653d5b[_0xa5a9('0x2e')];if(!_0x15afcb[_0xa5a9('0x2f')][_0xa5a9('0x36')](_0xa5a9('0x37'))){_0x11f7b0[_0xa5a9('0x38')]=qs[_0xa5a9('0x38')](_0x15afcb[_0xa5a9('0x2f')][_0xa5a9('0x38')]);_0x11f7b0[_0xa5a9('0x1c')]=qs[_0xa5a9('0x1c')](_0x15afcb[_0xa5a9('0x2f')][_0xa5a9('0x1c')]);}_0x11f7b0[_0xa5a9('0x39')]=qs[_0xa5a9('0x3a')](_0x15afcb[_0xa5a9('0x2f')][_0xa5a9('0x3a')]);_0x11f7b0[_0xa5a9('0x3b')]=qs[_0xa5a9('0x31')](_[_0xa5a9('0x3c')](_0x15afcb[_0xa5a9('0x2f')],_0x653d5b[_0xa5a9('0x31')]));if(_0x15afcb[_0xa5a9('0x2f')]['filter']){_0x11f7b0['where']=_['merge'](_0x11f7b0[_0xa5a9('0x3b')],{'$or':_['map'](_0x55b476,function(_0x2c098f){if(_0x2c098f[_0xa5a9('0x2c')]!==_0xa5a9('0x3d')){var _0x24e791={};_0x24e791[_0x2c098f[_0xa5a9('0x28')]]={'$like':'%'+_0x15afcb[_0xa5a9('0x2f')]['filter']+'%'};return _0x24e791;}})});}_0x11f7b0=_[_0xa5a9('0x3e')]({},_0x11f7b0,_0x15afcb[_0xa5a9('0x3f')]);var _0x1f681d={'where':_0x11f7b0['where']};return db['Variable'][_0xa5a9('0x40')](_0x1f681d)['then'](function(_0x1fe7ec){_0x268f3b[_0xa5a9('0x40')]=_0x1fe7ec;if(_0x15afcb[_0xa5a9('0x2f')][_0xa5a9('0x41')]){_0x11f7b0[_0xa5a9('0x42')]=[{'all':!![]}];}return db[_0xa5a9('0x43')][_0xa5a9('0x44')](_0x11f7b0);})[_0xa5a9('0x22')](function(_0x277bee){_0x268f3b[_0xa5a9('0x45')]=_0x277bee;return _0x268f3b;})['then'](respondWithFilteredResult(_0xed5721,_0x11f7b0))[_0xa5a9('0x46')](handleError(_0xed5721,null));};exports[_0xa5a9('0x47')]=function(_0xee57f6,_0xdf330){var _0x2da0fe={'raw':!![],'where':{'id':_0xee57f6['params']['id']}},_0x919cfe={};_0x919cfe[_0xa5a9('0x2e')]=_[_0xa5a9('0x30')](db['Variable'][_0xa5a9('0x48')]);_0x919cfe[_0xa5a9('0x2f')]=_['keys'](_0xee57f6[_0xa5a9('0x2f')]);_0x919cfe['filters']=_[_0xa5a9('0x32')](_0x919cfe[_0xa5a9('0x2e')],_0x919cfe[_0xa5a9('0x2f')]);_0x2da0fe['attributes']=_[_0xa5a9('0x32')](_0x919cfe[_0xa5a9('0x2e')],qs['fields'](_0xee57f6[_0xa5a9('0x2f')][_0xa5a9('0x34')]));_0x2da0fe[_0xa5a9('0x33')]=_0x2da0fe[_0xa5a9('0x33')]['length']?_0x2da0fe[_0xa5a9('0x33')]:_0x919cfe['model'];if(_0xee57f6[_0xa5a9('0x2f')][_0xa5a9('0x41')]){_0x2da0fe[_0xa5a9('0x42')]=[{'all':!![]}];}_0x2da0fe=_[_0xa5a9('0x3e')]({},_0x2da0fe,_0xee57f6[_0xa5a9('0x3f')]);return db['Variable'][_0xa5a9('0x49')](_0x2da0fe)[_0xa5a9('0x22')](handleEntityNotFound(_0xdf330,null))[_0xa5a9('0x22')](respondWithResult(_0xdf330,null))[_0xa5a9('0x46')](handleError(_0xdf330,null));};exports['create']=function(_0x39b494,_0xaeabf5){return db[_0xa5a9('0x43')][_0xa5a9('0x4a')](_0x39b494['body'],{})['then'](function(_0x115920){var _0x1cc29f=_0x39b494[_0xa5a9('0x4b')][_0xa5a9('0x23')]({'plain':!![]});if(!_0x1cc29f)throw new Error(_0xa5a9('0x4c'));if(_0x1cc29f[_0xa5a9('0x4d')]===_0xa5a9('0x4b')){var _0x4c8c1b=_0x115920['get']({'plain':!![]});var _0x215b3d=_0xa5a9('0x24');return db[_0xa5a9('0x4e')][_0xa5a9('0x49')]({'where':{'name':_0x215b3d,'userProfileId':_0x1cc29f[_0xa5a9('0x4f')]},'raw':!![]})[_0xa5a9('0x22')](function(_0x55f462){if(_0x55f462&&_0x55f462[_0xa5a9('0x50')]===0x0){return db[_0xa5a9('0x25')][_0xa5a9('0x4a')]({'name':_0x4c8c1b[_0xa5a9('0x28')],'resourceId':_0x4c8c1b['id'],'type':_0x55f462[_0xa5a9('0x28')],'sectionId':_0x55f462['id']},{})[_0xa5a9('0x22')](function(){return _0x115920;});}else{return _0x115920;}})[_0xa5a9('0x46')](function(_0x4ed9c1){logger[_0xa5a9('0x27')](_0xa5a9('0x51'),_0x4ed9c1);throw _0x4ed9c1;});}return _0x115920;})[_0xa5a9('0x22')](respondWithResult(_0xaeabf5,0xc9))[_0xa5a9('0x46')](handleError(_0xaeabf5,null));};exports[_0xa5a9('0x52')]=function(_0x32c848,_0x32b8d6){if(_0x32c848[_0xa5a9('0x53')]['id']){delete _0x32c848['body']['id'];}return db[_0xa5a9('0x43')][_0xa5a9('0x49')]({'where':{'id':_0x32c848['params']['id']}})[_0xa5a9('0x22')](handleEntityNotFound(_0x32b8d6,null))[_0xa5a9('0x22')](saveUpdates(_0x32c848[_0xa5a9('0x53')],null))[_0xa5a9('0x22')](respondWithResult(_0x32b8d6,null))['catch'](handleError(_0x32b8d6,null));};exports['destroy']=function(_0x1f4c94,_0x3cb910){return db[_0xa5a9('0x43')][_0xa5a9('0x49')]({'where':{'id':_0x1f4c94[_0xa5a9('0x54')]['id']}})[_0xa5a9('0x22')](handleEntityNotFound(_0x3cb910,null))[_0xa5a9('0x22')](removeEntity(_0x3cb910,null))['catch'](handleError(_0x3cb910,null));};
\ No newline at end of file
+var _0xb82a=['path','to-csv','ejs','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','sendStatus','status','end','json','count','offset','limit','set','apply','save','update','then','destroy','get','Variables','UserProfileResource','error','stack','name','send','index','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','VIRTUAL','filter','merge','options','Variable','include','findAll','catch','params','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','find','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util'];(function(_0x33db34,_0x37102d){var _0x181b3c=function(_0x4ef22f){while(--_0x4ef22f){_0x33db34['push'](_0x33db34['shift']());}};_0x181b3c(++_0x37102d);}(_0xb82a,0x93));var _0xab82=function(_0xaeeb25,_0x1947ed){_0xaeeb25=_0xaeeb25-0x0;var _0x2f501b=_0xb82a[_0xaeeb25];return _0x2f501b;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xab82('0x0'));var rimraf=require(_0xab82('0x1'));var zipdir=require(_0xab82('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xab82('0x3'));var moment=require(_0xab82('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xab82('0x5'));var util=require(_0xab82('0x6'));var path=require(_0xab82('0x7'));var sox=require('sox');var csv=require(_0xab82('0x8'));var ejs=require(_0xab82('0x9'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xab82('0xa'));var deskjs=require(_0xab82('0xb'));var toCsv=require('to-csv');var querystring=require(_0xab82('0xc'));var Papa=require(_0xab82('0xd'));var Redis=require(_0xab82('0xe'));var authService=require(_0xab82('0xf'));var qs=require(_0xab82('0x10'));var as=require(_0xab82('0x11'));var hardwareService=require(_0xab82('0x12'));var logger=require(_0xab82('0x13'))('api');var utils=require(_0xab82('0x14'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x26806b,_0x389b9f){_0x389b9f=_0x389b9f||0xcc;return function(_0x425b3b){if(_0x425b3b){return _0x26806b[_0xab82('0x15')](_0x389b9f);}return _0x26806b[_0xab82('0x16')](_0x389b9f)[_0xab82('0x17')]();};}function respondWithResult(_0x454997,_0x595126){_0x595126=_0x595126||0xc8;return function(_0x421f6e){if(_0x421f6e){return _0x454997[_0xab82('0x16')](_0x595126)[_0xab82('0x18')](_0x421f6e);}};}function respondWithFilteredResult(_0x52ca69,_0x29933c){return function(_0x1886d2){if(_0x1886d2){var _0x92f3c2=_0x1886d2[_0xab82('0x19')],_0x2d738d=_0x29933c['offset'],_0x383adf=_0x29933c[_0xab82('0x1a')]+_0x29933c[_0xab82('0x1b')],_0x10df70;if(_0x383adf>=_0x92f3c2){_0x383adf=_0x92f3c2;_0x10df70=0xc8;}else{_0x10df70=0xce;}_0x52ca69[_0xab82('0x16')](_0x10df70);return _0x52ca69[_0xab82('0x1c')]('Content-Range',_0x2d738d+'-'+_0x383adf+'/'+_0x92f3c2)[_0xab82('0x18')](_0x1886d2);}return null;};}function patchUpdates(_0x1523cf){return function(_0x5e54b2){try{jsonpatch[_0xab82('0x1d')](_0x5e54b2,_0x1523cf,!![]);}catch(_0x2ac8d5){return BPromise['reject'](_0x2ac8d5);}return _0x5e54b2[_0xab82('0x1e')]();};}function saveUpdates(_0x24efb7,_0x4f8668){return function(_0x1bacad){if(_0x1bacad){return _0x1bacad[_0xab82('0x1f')](_0x24efb7)[_0xab82('0x20')](function(_0x2714fb){return _0x2714fb;});}return null;};}function removeEntity(_0x2a5679,_0x3099fe){return function(_0x11ef00){if(_0x11ef00){return _0x11ef00[_0xab82('0x21')]()[_0xab82('0x20')](function(){var _0x1ca9b8=_0x11ef00[_0xab82('0x22')]({'plain':!![]});var _0x1d1b87=_0xab82('0x23');return db[_0xab82('0x24')][_0xab82('0x21')]({'where':{'type':_0x1d1b87,'resourceId':_0x1ca9b8['id']}})[_0xab82('0x20')](function(){return _0x11ef00;});})[_0xab82('0x20')](function(){_0x2a5679[_0xab82('0x16')](0xcc)[_0xab82('0x17')]();});}};}function handleEntityNotFound(_0x3c1f76,_0x59b10b){return function(_0x424d32){if(!_0x424d32){_0x3c1f76[_0xab82('0x15')](0x194);}return _0x424d32;};}function handleError(_0x4b8c85,_0x5d2a34){_0x5d2a34=_0x5d2a34||0x1f4;return function(_0x1b9b21){logger[_0xab82('0x25')](_0x1b9b21[_0xab82('0x26')]);if(_0x1b9b21[_0xab82('0x27')]){delete _0x1b9b21['name'];}_0x4b8c85['status'](_0x5d2a34)[_0xab82('0x28')](_0x1b9b21);};}exports[_0xab82('0x29')]=function(_0xe67ab5,_0x54c8c8){var _0x2a4048={},_0x3854a2={},_0xbd912e={'count':0x0,'rows':[]};var _0x573ae0=_['map'](db['Variable'][_0xab82('0x2a')],function(_0xdb00a6){return{'name':_0xdb00a6[_0xab82('0x2b')],'type':_0xdb00a6[_0xab82('0x2c')][_0xab82('0x2d')]};});_0x3854a2[_0xab82('0x2e')]=_[_0xab82('0x2f')](_0x573ae0,_0xab82('0x27'));_0x3854a2[_0xab82('0x30')]=_[_0xab82('0x31')](_0xe67ab5[_0xab82('0x30')]);_0x3854a2[_0xab82('0x32')]=_[_0xab82('0x33')](_0x3854a2[_0xab82('0x2e')],_0x3854a2['query']);_0x2a4048['attributes']=_[_0xab82('0x33')](_0x3854a2[_0xab82('0x2e')],qs[_0xab82('0x34')](_0xe67ab5[_0xab82('0x30')][_0xab82('0x34')]));_0x2a4048[_0xab82('0x35')]=_0x2a4048['attributes'][_0xab82('0x36')]?_0x2a4048['attributes']:_0x3854a2['model'];if(!_0xe67ab5[_0xab82('0x30')][_0xab82('0x37')](_0xab82('0x38'))){_0x2a4048['limit']=qs[_0xab82('0x1b')](_0xe67ab5[_0xab82('0x30')][_0xab82('0x1b')]);_0x2a4048[_0xab82('0x1a')]=qs['offset'](_0xe67ab5['query'][_0xab82('0x1a')]);}_0x2a4048['order']=qs[_0xab82('0x39')](_0xe67ab5[_0xab82('0x30')][_0xab82('0x39')]);_0x2a4048[_0xab82('0x3a')]=qs[_0xab82('0x32')](_[_0xab82('0x3b')](_0xe67ab5[_0xab82('0x30')],_0x3854a2[_0xab82('0x32')]));if(_0xe67ab5[_0xab82('0x30')]['filter']){_0x2a4048['where']=_['merge'](_0x2a4048[_0xab82('0x3a')],{'$or':_[_0xab82('0x2f')](_0x573ae0,function(_0x43acf9){if(_0x43acf9[_0xab82('0x2c')]!==_0xab82('0x3c')){var _0x1535f7={};_0x1535f7[_0x43acf9[_0xab82('0x27')]]={'$like':'%'+_0xe67ab5[_0xab82('0x30')][_0xab82('0x3d')]+'%'};return _0x1535f7;}})});}_0x2a4048=_[_0xab82('0x3e')]({},_0x2a4048,_0xe67ab5[_0xab82('0x3f')]);var _0x12ce6b={'where':_0x2a4048[_0xab82('0x3a')]};return db[_0xab82('0x40')][_0xab82('0x19')](_0x12ce6b)[_0xab82('0x20')](function(_0x5c54ac){_0xbd912e['count']=_0x5c54ac;if(_0xe67ab5[_0xab82('0x30')]['includeAll']){_0x2a4048[_0xab82('0x41')]=[{'all':!![]}];}return db[_0xab82('0x40')][_0xab82('0x42')](_0x2a4048);})[_0xab82('0x20')](function(_0x252092){_0xbd912e['rows']=_0x252092;return _0xbd912e;})[_0xab82('0x20')](respondWithFilteredResult(_0x54c8c8,_0x2a4048))[_0xab82('0x43')](handleError(_0x54c8c8,null));};exports['show']=function(_0x2c60ad,_0x47fe55){var _0x470280={'raw':!![],'where':{'id':_0x2c60ad[_0xab82('0x44')]['id']}},_0x2d27ee={};_0x2d27ee[_0xab82('0x2e')]=_[_0xab82('0x31')](db[_0xab82('0x40')][_0xab82('0x2a')]);_0x2d27ee[_0xab82('0x30')]=_[_0xab82('0x31')](_0x2c60ad[_0xab82('0x30')]);_0x2d27ee[_0xab82('0x32')]=_[_0xab82('0x33')](_0x2d27ee[_0xab82('0x2e')],_0x2d27ee[_0xab82('0x30')]);_0x470280[_0xab82('0x35')]=_[_0xab82('0x33')](_0x2d27ee['model'],qs[_0xab82('0x34')](_0x2c60ad[_0xab82('0x30')][_0xab82('0x34')]));_0x470280[_0xab82('0x35')]=_0x470280[_0xab82('0x35')][_0xab82('0x36')]?_0x470280[_0xab82('0x35')]:_0x2d27ee[_0xab82('0x2e')];if(_0x2c60ad[_0xab82('0x30')]['includeAll']){_0x470280[_0xab82('0x41')]=[{'all':!![]}];}_0x470280=_[_0xab82('0x3e')]({},_0x470280,_0x2c60ad['options']);return db[_0xab82('0x40')]['find'](_0x470280)['then'](handleEntityNotFound(_0x47fe55,null))[_0xab82('0x20')](respondWithResult(_0x47fe55,null))['catch'](handleError(_0x47fe55,null));};exports['create']=function(_0x10048e,_0x304678){return db['Variable'][_0xab82('0x45')](_0x10048e['body'],{})[_0xab82('0x20')](function(_0x31ed0c){var _0x7a1cdb=_0x10048e[_0xab82('0x46')][_0xab82('0x22')]({'plain':!![]});if(!_0x7a1cdb)throw new Error(_0xab82('0x47'));if(_0x7a1cdb[_0xab82('0x48')]==='user'){var _0x44ab4d=_0x31ed0c[_0xab82('0x22')]({'plain':!![]});var _0x710073=_0xab82('0x23');return db['UserProfileSection']['find']({'where':{'name':_0x710073,'userProfileId':_0x7a1cdb[_0xab82('0x49')]},'raw':!![]})['then'](function(_0x1ee165){if(_0x1ee165&&_0x1ee165['autoAssociation']===0x0){return db[_0xab82('0x24')][_0xab82('0x45')]({'name':_0x44ab4d['name'],'resourceId':_0x44ab4d['id'],'type':_0x1ee165[_0xab82('0x27')],'sectionId':_0x1ee165['id']},{})['then'](function(){return _0x31ed0c;});}else{return _0x31ed0c;}})['catch'](function(_0x24ea72){logger[_0xab82('0x25')](_0xab82('0x4a'),_0x24ea72);throw _0x24ea72;});}return _0x31ed0c;})['then'](respondWithResult(_0x304678,0xc9))[_0xab82('0x43')](handleError(_0x304678,null));};exports[_0xab82('0x1f')]=function(_0x178139,_0x4486e6){if(_0x178139[_0xab82('0x4b')]['id']){delete _0x178139[_0xab82('0x4b')]['id'];}return db[_0xab82('0x40')]['find']({'where':{'id':_0x178139['params']['id']}})[_0xab82('0x20')](handleEntityNotFound(_0x4486e6,null))[_0xab82('0x20')](saveUpdates(_0x178139[_0xab82('0x4b')],null))[_0xab82('0x20')](respondWithResult(_0x4486e6,null))[_0xab82('0x43')](handleError(_0x4486e6,null));};exports[_0xab82('0x21')]=function(_0x31d2b9,_0x1eebe5){return db[_0xab82('0x40')][_0xab82('0x4c')]({'where':{'id':_0x31d2b9['params']['id']}})['then'](handleEntityNotFound(_0x1eebe5,null))[_0xab82('0x20')](removeEntity(_0x1eebe5,null))[_0xab82('0x43')](handleError(_0x1eebe5,null));};
\ No newline at end of file
diff --git a/server/api/variable/variable.model.js b/server/api/variable/variable.model.js
index 8a6396e..00bb777 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 _0xc181=['request-promise','path','../../config/environment','./variable.attributes','exports','define','Variable','tools_variables','lodash','util','api','moment','bluebird'];(function(_0x27568b,_0x2640cb){var _0x1ea24b=function(_0x292c27){while(--_0x292c27){_0x27568b['push'](_0x27568b['shift']());}};_0x1ea24b(++_0x2640cb);}(_0xc181,0x126));var _0x1c18=function(_0x286bfb,_0x46ac3c){_0x286bfb=_0x286bfb-0x0;var _0x52b683=_0xc181[_0x286bfb];return _0x52b683;};'use strict';var _=require(_0x1c18('0x0'));var util=require(_0x1c18('0x1'));var logger=require('../../config/logger')(_0x1c18('0x2'));var moment=require(_0x1c18('0x3'));var BPromise=require(_0x1c18('0x4'));var rp=require(_0x1c18('0x5'));var fs=require('fs');var path=require(_0x1c18('0x6'));var rimraf=require('rimraf');var config=require(_0x1c18('0x7'));var attributes=require(_0x1c18('0x8'));module[_0x1c18('0x9')]=function(_0x1af123,_0x2f3f3a){return _0x1af123[_0x1c18('0xa')](_0x1c18('0xb'),attributes,{'tableName':_0x1c18('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x53b7=['exports','define','Variable','tools_variables','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment'];(function(_0xd299c3,_0x4ba0f1){var _0x376574=function(_0xc585f){while(--_0xc585f){_0xd299c3['push'](_0xd299c3['shift']());}};_0x376574(++_0x4ba0f1);}(_0x53b7,0x170));var _0x753b=function(_0x75cbdd,_0x10193b){_0x75cbdd=_0x75cbdd-0x0;var _0x18aeb4=_0x53b7[_0x75cbdd];return _0x18aeb4;};'use strict';var _=require(_0x753b('0x0'));var util=require(_0x753b('0x1'));var logger=require(_0x753b('0x2'))(_0x753b('0x3'));var moment=require(_0x753b('0x4'));var BPromise=require(_0x753b('0x5'));var rp=require(_0x753b('0x6'));var fs=require('fs');var path=require(_0x753b('0x7'));var rimraf=require('rimraf');var config=require(_0x753b('0x8'));var attributes=require('./variable.attributes');module[_0x753b('0x9')]=function(_0x38b1b6,_0xc0c0a5){return _0x38b1b6[_0x753b('0xa')](_0x753b('0xb'),attributes,{'tableName':_0x753b('0xc'),'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 1acad07..810effb 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 _0xa87d=['../../config/utils','../../config/environment','jayson/promise','http','request','then','Variable,\x20%s,\x20%s','debug','Variable,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','Variable','options','raw','include','map','model','attributes','ShowVariable','moment','bluebird','ioredis'];(function(_0x1d9aa0,_0x272488){var _0x226868=function(_0x17127c){while(--_0x17127c){_0x1d9aa0['push'](_0x1d9aa0['shift']());}};_0x226868(++_0x272488);}(_0xa87d,0xdd));var _0xda87=function(_0x5aa335,_0x99780b){_0x5aa335=_0x5aa335-0x0;var _0x70dfb5=_0xa87d[_0x5aa335];return _0x70dfb5;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xda87('0x0'));var BPromise=require(_0xda87('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xda87('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xda87('0x3'));var logger=require('../../config/logger')('rpc');var config=require(_0xda87('0x4'));var jayson=require(_0xda87('0x5'));var client=jayson['client'][_0xda87('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x4f51fc,_0x187d92,_0x5ec009){return new BPromise(function(_0x1c1129,_0x39fb8c){return client[_0xda87('0x7')](_0x4f51fc,_0x5ec009)[_0xda87('0x8')](function(_0x5832c5){logger['info'](_0xda87('0x9'),_0x187d92,'request\x20sent');logger[_0xda87('0xa')](_0xda87('0xb'),_0x187d92,_0xda87('0xc'),JSON[_0xda87('0xd')](_0x5832c5));if(_0x5832c5[_0xda87('0xe')]){if(_0x5832c5[_0xda87('0xe')][_0xda87('0xf')]===0x1f4){logger[_0xda87('0xe')](_0xda87('0x9'),_0x187d92,_0x5832c5[_0xda87('0xe')][_0xda87('0x10')]);return _0x39fb8c(_0x5832c5[_0xda87('0xe')][_0xda87('0x10')]);}logger['error'](_0xda87('0x9'),_0x187d92,_0x5832c5[_0xda87('0xe')][_0xda87('0x10')]);return _0x1c1129(_0x5832c5[_0xda87('0xe')][_0xda87('0x10')]);}else{logger[_0xda87('0x11')]('Variable,\x20%s,\x20%s',_0x187d92,_0xda87('0xc'));_0x1c1129(_0x5832c5[_0xda87('0x12')][_0xda87('0x10')]);}})[_0xda87('0x13')](function(_0x22000b){logger[_0xda87('0xe')](_0xda87('0x9'),_0x187d92,_0x22000b);_0x39fb8c(_0x22000b);});});}exports['ShowVariable']=function(_0x2c24a3){var _0x589ec6=this;return new Promise(function(_0x78eca3,_0x397f98){return db[_0xda87('0x14')]['find']({'raw':_0x2c24a3[_0xda87('0x15')]?_0x2c24a3[_0xda87('0x15')][_0xda87('0x16')]===undefined?!![]:![]:!![],'where':_0x2c24a3[_0xda87('0x15')]?_0x2c24a3[_0xda87('0x15')]['where']||null:null,'attributes':_0x2c24a3[_0xda87('0x15')]?_0x2c24a3[_0xda87('0x15')]['attributes']||null:null,'include':_0x2c24a3['options']?_0x2c24a3[_0xda87('0x15')][_0xda87('0x17')]?_[_0xda87('0x18')](_0x2c24a3[_0xda87('0x15')][_0xda87('0x17')],function(_0x19585c){return{'model':db[_0x19585c[_0xda87('0x19')]],'as':_0x19585c['as'],'attributes':_0x19585c[_0xda87('0x1a')],'include':_0x19585c['include']?_[_0xda87('0x18')](_0x19585c[_0xda87('0x17')],function(_0x741089){return{'model':db[_0x741089[_0xda87('0x19')]],'as':_0x741089['as'],'attributes':_0x741089[_0xda87('0x1a')],'include':_0x741089[_0xda87('0x17')]?_[_0xda87('0x18')](_0x741089['include'],function(_0x3ff679){return{'model':db[_0x3ff679[_0xda87('0x19')]],'as':_0x3ff679['as'],'attributes':_0x3ff679[_0xda87('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xda87('0x8')](function(_0x595fef){logger[_0xda87('0x11')](_0xda87('0x1b'),_0x2c24a3);logger[_0xda87('0xa')](_0xda87('0x1b'),_0x2c24a3,JSON['stringify'](_0x595fef));_0x78eca3(_0x595fef);})[_0xda87('0x13')](function(_0x468684){logger[_0xda87('0xe')](_0xda87('0x1b'),_0x468684[_0xda87('0x10')],_0x2c24a3);_0x397f98(_0x589ec6[_0xda87('0xe')](0x1f4,_0x468684['message']));});});};
\ No newline at end of file
+var _0x0333=['debug','ShowVariable','stringify','catch','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','jayson/promise','client','then','info','Variable,\x20%s,\x20%s','request\x20sent','error','message','Variable','find','options','raw','where','attributes','include','map','model'];(function(_0x5ae146,_0x361a50){var _0x46809c=function(_0x498942){while(--_0x498942){_0x5ae146['push'](_0x5ae146['shift']());}};_0x46809c(++_0x361a50);}(_0x0333,0x199));var _0x3033=function(_0x277fa3,_0x3b2dde){_0x277fa3=_0x277fa3-0x0;var _0x2e4520=_0x0333[_0x277fa3];return _0x2e4520;};'use strict';var _=require('lodash');var util=require(_0x3033('0x0'));var moment=require(_0x3033('0x1'));var BPromise=require(_0x3033('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3033('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x3033('0x4'));var logger=require(_0x3033('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3033('0x6'));var client=jayson[_0x3033('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x547caa,_0x27a5f4,_0x2c5fc9){return new BPromise(function(_0x56709e,_0x363a27){return client['request'](_0x547caa,_0x2c5fc9)[_0x3033('0x8')](function(_0x397cce){logger[_0x3033('0x9')](_0x3033('0xa'),_0x27a5f4,_0x3033('0xb'));logger['debug']('Variable,\x20%s,\x20%s,\x20%s',_0x27a5f4,_0x3033('0xb'),JSON['stringify'](_0x397cce));if(_0x397cce[_0x3033('0xc')]){if(_0x397cce[_0x3033('0xc')]['code']===0x1f4){logger[_0x3033('0xc')](_0x3033('0xa'),_0x27a5f4,_0x397cce[_0x3033('0xc')][_0x3033('0xd')]);return _0x363a27(_0x397cce['error']['message']);}logger[_0x3033('0xc')](_0x3033('0xa'),_0x27a5f4,_0x397cce[_0x3033('0xc')][_0x3033('0xd')]);return _0x56709e(_0x397cce['error']['message']);}else{logger['info']('Variable,\x20%s,\x20%s',_0x27a5f4,'request\x20sent');_0x56709e(_0x397cce['result'][_0x3033('0xd')]);}})['catch'](function(_0x3e7315){logger[_0x3033('0xc')](_0x3033('0xa'),_0x27a5f4,_0x3e7315);_0x363a27(_0x3e7315);});});}exports['ShowVariable']=function(_0x6aa299){var _0x15549e=this;return new Promise(function(_0x273d72,_0x2841c8){return db[_0x3033('0xe')][_0x3033('0xf')]({'raw':_0x6aa299[_0x3033('0x10')]?_0x6aa299[_0x3033('0x10')][_0x3033('0x11')]===undefined?!![]:![]:!![],'where':_0x6aa299[_0x3033('0x10')]?_0x6aa299['options'][_0x3033('0x12')]||null:null,'attributes':_0x6aa299[_0x3033('0x10')]?_0x6aa299[_0x3033('0x10')][_0x3033('0x13')]||null:null,'include':_0x6aa299[_0x3033('0x10')]?_0x6aa299[_0x3033('0x10')][_0x3033('0x14')]?_[_0x3033('0x15')](_0x6aa299['options'][_0x3033('0x14')],function(_0x2689cb){return{'model':db[_0x2689cb[_0x3033('0x16')]],'as':_0x2689cb['as'],'attributes':_0x2689cb[_0x3033('0x13')],'include':_0x2689cb[_0x3033('0x14')]?_[_0x3033('0x15')](_0x2689cb[_0x3033('0x14')],function(_0x12cae3){return{'model':db[_0x12cae3[_0x3033('0x16')]],'as':_0x12cae3['as'],'attributes':_0x12cae3[_0x3033('0x13')],'include':_0x12cae3['include']?_[_0x3033('0x15')](_0x12cae3[_0x3033('0x14')],function(_0x2ec390){return{'model':db[_0x2ec390[_0x3033('0x16')]],'as':_0x2ec390['as'],'attributes':_0x2ec390[_0x3033('0x13')]};}):[]};}):[]};}):[]:[]})[_0x3033('0x8')](function(_0x488da1){logger[_0x3033('0x9')]('ShowVariable',_0x6aa299);logger[_0x3033('0x17')](_0x3033('0x18'),_0x6aa299,JSON[_0x3033('0x19')](_0x488da1));_0x273d72(_0x488da1);})[_0x3033('0x1a')](function(_0xacda14){logger[_0x3033('0xc')](_0x3033('0x18'),_0xacda14[_0x3033('0xd')],_0x6aa299);_0x2841c8(_0x15549e[_0x3033('0xc')](0x1f4,_0xacda14[_0x3033('0xd')]));});});};
\ No newline at end of file
diff --git a/server/api/version/index.js b/server/api/version/index.js
index 9a9741d..94cecc6 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 _0x7dac=['/pull','restart','/migrations','exports','express','../../components/auth/service','get','/fetch','isAuthenticated','fetch','/reset','canUpdate','reset'];(function(_0x47ae41,_0x1e7ca9){var _0x31c710=function(_0x52d2df){while(--_0x52d2df){_0x47ae41['push'](_0x47ae41['shift']());}};_0x31c710(++_0x1e7ca9);}(_0x7dac,0x12f));var _0xc7da=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x7dac[_0x59ee6f];return _0x4c0979;};'use strict';var express=require(_0xc7da('0x0'));var router=express['Router']();var auth=require(_0xc7da('0x1'));var controller=require('./version.controller');router[_0xc7da('0x2')]('/',controller['index']);router[_0xc7da('0x2')](_0xc7da('0x3'),auth[_0xc7da('0x4')](),auth['canUpdate'](),controller[_0xc7da('0x5')]);router[_0xc7da('0x2')](_0xc7da('0x6'),auth[_0xc7da('0x4')](),auth[_0xc7da('0x7')](),controller[_0xc7da('0x8')]);router[_0xc7da('0x2')](_0xc7da('0x9'),auth[_0xc7da('0x4')](),auth[_0xc7da('0x7')](),controller['pull']);router[_0xc7da('0x2')]('/restart',auth[_0xc7da('0x4')](),controller[_0xc7da('0xa')]);router['get'](_0xc7da('0xb'),controller['migrations']);module[_0xc7da('0xc')]=router;
\ No newline at end of file
+var _0x8aac=['/fetch','isAuthenticated','fetch','/reset','reset','/pull','canUpdate','pull','/restart','restart','migrations','exports','express','../../components/auth/service','./version.controller','get','index'];(function(_0x30ed4a,_0x26e8f8){var _0x42dc86=function(_0x54f9e2){while(--_0x54f9e2){_0x30ed4a['push'](_0x30ed4a['shift']());}};_0x42dc86(++_0x26e8f8);}(_0x8aac,0x11c));var _0xc8aa=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8aac[_0x3dd15e];return _0x231fd0;};'use strict';var express=require(_0xc8aa('0x0'));var router=express['Router']();var auth=require(_0xc8aa('0x1'));var controller=require(_0xc8aa('0x2'));router[_0xc8aa('0x3')]('/',controller[_0xc8aa('0x4')]);router[_0xc8aa('0x3')](_0xc8aa('0x5'),auth[_0xc8aa('0x6')](),auth['canUpdate'](),controller[_0xc8aa('0x7')]);router[_0xc8aa('0x3')](_0xc8aa('0x8'),auth['isAuthenticated'](),auth['canUpdate'](),controller[_0xc8aa('0x9')]);router[_0xc8aa('0x3')](_0xc8aa('0xa'),auth[_0xc8aa('0x6')](),auth[_0xc8aa('0xb')](),controller[_0xc8aa('0xc')]);router['get'](_0xc8aa('0xd'),auth[_0xc8aa('0x6')](),controller[_0xc8aa('0xe')]);router[_0xc8aa('0x3')]('/migrations',controller[_0xc8aa('0xf')]);module[_0xc8aa('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/version/version.controller.js b/server/api/version/version.controller.js
index 9006147..d51b81c 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 _0x1fa9=['../../config/logger','update','root','index','exports','query','latest','fetch','2.0.0','status','origin','master','error','json','info','git\x20fetch','git\x20fetch\x20origin\x20master','reset','FETCH_HEAD','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','npm\x20install\x20--production','restart','motion2','then','Your\x20system\x20has\x20been\x20restart\x20successfully','catch','migrations','readdirSync','join','server','length','replace','push','sort','Migration','sequelize','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','Database\x20already\x20up-to-date','umzug','lodash','version','compare-versions','child_process','../../mysqldb','../../config/environment','../../config/pm2'];(function(_0x4c988f,_0x39737f){var _0x9c81b5=function(_0x1d094e){while(--_0x1d094e){_0x4c988f['push'](_0x4c988f['shift']());}};_0x9c81b5(++_0x39737f);}(_0x1fa9,0x136));var _0x91fa=function(_0x1ac0e9,_0xfde438){_0x1ac0e9=_0x1ac0e9-0x0;var _0x179163=_0x1fa9[_0x1ac0e9];return _0x179163;};'use strict';var Umzug=require(_0x91fa('0x0'));var path=require('path');var fs=require('fs');var _=require(_0x91fa('0x1'));var pkginfo=require('pkginfo')(module,_0x91fa('0x2'));var compareVersions=require(_0x91fa('0x3'));var exec=require(_0x91fa('0x4'))['exec'];var db=require(_0x91fa('0x5'))['db'];var config=require(_0x91fa('0x6'));var pm2=require(_0x91fa('0x7'));var logger=require(_0x91fa('0x8'))(_0x91fa('0x9'));var git=require('simple-git')(config[_0x91fa('0xa')]);exports[_0x91fa('0xb')]=function(_0x483dde,_0x5e30a6){var _0xb4a51f={'current':module[_0x91fa('0xc')][_0x91fa('0x2')],'phonebar':0x2};if(_0x483dde[_0x91fa('0xd')]&&_0x483dde[_0x91fa('0xd')][_0x91fa('0xe')]){return git[_0x91fa('0xf')]()['tags'](function(_0x544f1c,_0xfda31c){_0xb4a51f[_0x91fa('0xe')]=(_0x544f1c?module[_0x91fa('0xc')][_0x91fa('0x2')]:_0xfda31c[_0x91fa('0xe')])||_0x91fa('0x10');return _0x5e30a6[_0x91fa('0x11')](0xc8)['json'](_0xb4a51f);});}else{return _0x5e30a6['status'](0xc8)['json'](_0xb4a51f);}};exports[_0x91fa('0xf')]=function(_0x4ebf24,_0x5f215d){return git[_0x91fa('0xf')]([_0x91fa('0x12'),_0x91fa('0x13')],function(_0x5449a7){if(_0x5449a7){logger[_0x91fa('0x14')](_0x5449a7);return _0x5f215d[_0x91fa('0x11')](0x1f4)[_0x91fa('0x15')](_0x5449a7);}logger[_0x91fa('0x16')](_0x91fa('0x17'));return _0x5f215d[_0x91fa('0x11')](0xc8)['json']({'output':_0x91fa('0x18')});});};exports[_0x91fa('0x19')]=function(_0x2efa2a,_0x3916cc){return git[_0x91fa('0x19')](['--hard',_0x91fa('0x1a')],function(_0x433cf5){if(_0x433cf5){logger[_0x91fa('0x14')](_0x433cf5);return _0x3916cc[_0x91fa('0x11')](0x1f4)[_0x91fa('0x15')](_0x433cf5);}logger[_0x91fa('0x16')](_0x91fa('0x1b'));return _0x3916cc[_0x91fa('0x11')](0xc8)[_0x91fa('0x15')]({'output':_0x91fa('0x1c')});});};exports[_0x91fa('0x1d')]=function(_0x4a8f08,_0x46433d){exec(_0x91fa('0x1e'),function(_0x4ac68d,_0x1a6480,_0x50596c){logger[_0x91fa('0x16')](_0x1a6480);logger['info'](_0x50596c);if(_0x4ac68d){logger['error'](_0x4ac68d);return _0x46433d['status'](0x1f4)[_0x91fa('0x15')](_0x4ac68d);}return _0x46433d[_0x91fa('0x11')](0xc8)[_0x91fa('0x15')]({'output':_0x1a6480});});};exports[_0x91fa('0x1f')]=function(_0x1fd482,_0x5df647){return pm2[_0x91fa('0x1f')](_0x91fa('0x20'))[_0x91fa('0x21')](function(_0x1d2019){logger['info']('pm2\x20restart\x20motion\x20%s',_0x1d2019);return _0x5df647[_0x91fa('0x11')](0xc8)[_0x91fa('0x15')]({'output':_0x91fa('0x22')});})[_0x91fa('0x23')](function(_0x1224ef){logger['error'](_0x1224ef);return _0x5df647[_0x91fa('0x11')](0x1f4)[_0x91fa('0x15')](_0x1224ef);});};exports[_0x91fa('0x24')]=function(_0x5601c4,_0x518cae){var _0x342670=fs[_0x91fa('0x25')](path[_0x91fa('0x26')](config[_0x91fa('0xa')],_0x91fa('0x27'),_0x91fa('0x24')));var _0x27ed0e=[];for(var _0x33198a=0x0;_0x33198a<_0x342670[_0x91fa('0x28')];_0x33198a++){var _0x1ebc7c=_0x342670[_0x33198a][_0x91fa('0x29')]('.js','');if(compareVersions(module['exports'][_0x91fa('0x2')],_0x1ebc7c)===-0x1){_0x27ed0e[_0x91fa('0x2a')](_0x1ebc7c);}}if(_0x27ed0e[_0x91fa('0x28')]){var _0x432fd1=_0x27ed0e[_0x91fa('0x2b')](compareVersions);var _0x35a704=new Umzug({'storage':'sequelize','storageOptions':{'model':db[_0x91fa('0x2c')],'modelName':_0x91fa('0x2c'),'columnName':_0x91fa('0x2')},'migrations':{'params':[db[_0x91fa('0x2d')][_0x91fa('0x2e')](),db[_0x91fa('0x2d')][_0x91fa('0x2f')],function(){throw new Error(_0x91fa('0x30'));}],'path':path['join'](config['root'],_0x91fa('0x27'),_0x91fa('0x24')),'pattern':/\.js$/}});_0x35a704['up']({'migrations':_['map'](_0x432fd1,function(_0x5057c9){return _0x5057c9+'.js';})})['then'](function(){return _0x518cae[_0x91fa('0x11')](0xc8)[_0x91fa('0x15')]({'output':_0x91fa('0x31')+module['exports'][_0x91fa('0x2')]+_0x91fa('0x32')+_[_0x91fa('0x33')](_0x432fd1),'migrations':_[_0x91fa('0x26')](_0x432fd1)});})[_0x91fa('0x23')](function(_0x421aaf){if(_0x421aaf instanceof db[_0x91fa('0x2d')]['UniqueConstraintError']){return _0x518cae[_0x91fa('0x11')](0xc8)[_0x91fa('0x15')]({'output':'Database\x20already\x20up-to-date'});}else{return _0x518cae['status'](0x1f4)[_0x91fa('0x15')](_0x421aaf);}});}else{return _0x518cae[_0x91fa('0x11')](0xc8)['json']({'output':_0x91fa('0x34')});}};
\ No newline at end of file
+var _0x5324=['sequelize','Migration','getQueryInterface','constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','join','map','\x20to\x20','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','pkginfo','compare-versions','exec','../../mysqldb','../../config/environment','../../config/pm2','../../config/logger','update','simple-git','root','exports','version','query','latest','fetch','tags','2.0.0','status','json','origin','info','git\x20fetch','git\x20fetch\x20origin\x20master','reset','--hard','FETCH_HEAD','error','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','restart','motion2','then','Your\x20system\x20has\x20been\x20restart\x20successfully','catch','migrations','readdirSync','server','replace','.js','push','length'];(function(_0x363319,_0x4fa1a1){var _0x182a62=function(_0x78f65b){while(--_0x78f65b){_0x363319['push'](_0x363319['shift']());}};_0x182a62(++_0x4fa1a1);}(_0x5324,0x154));var _0x4532=function(_0x2c0071,_0x409f62){_0x2c0071=_0x2c0071-0x0;var _0x634830=_0x5324[_0x2c0071];return _0x634830;};'use strict';var Umzug=require(_0x4532('0x0'));var path=require(_0x4532('0x1'));var fs=require('fs');var _=require(_0x4532('0x2'));var pkginfo=require(_0x4532('0x3'))(module,'version');var compareVersions=require(_0x4532('0x4'));var exec=require('child_process')[_0x4532('0x5')];var db=require(_0x4532('0x6'))['db'];var config=require(_0x4532('0x7'));var pm2=require(_0x4532('0x8'));var logger=require(_0x4532('0x9'))(_0x4532('0xa'));var git=require(_0x4532('0xb'))(config[_0x4532('0xc')]);exports['index']=function(_0x3b9865,_0x455819){var _0x138aac={'current':module[_0x4532('0xd')][_0x4532('0xe')],'phonebar':0x2};if(_0x3b9865[_0x4532('0xf')]&&_0x3b9865[_0x4532('0xf')][_0x4532('0x10')]){return git[_0x4532('0x11')]()[_0x4532('0x12')](function(_0x314e97,_0xfabd65){_0x138aac['latest']=(_0x314e97?module['exports'][_0x4532('0xe')]:_0xfabd65['latest'])||_0x4532('0x13');return _0x455819[_0x4532('0x14')](0xc8)[_0x4532('0x15')](_0x138aac);});}else{return _0x455819[_0x4532('0x14')](0xc8)['json'](_0x138aac);}};exports[_0x4532('0x11')]=function(_0x167859,_0x39acf3){return git[_0x4532('0x11')]([_0x4532('0x16'),'master'],function(_0x59075c){if(_0x59075c){logger['error'](_0x59075c);return _0x39acf3[_0x4532('0x14')](0x1f4)[_0x4532('0x15')](_0x59075c);}logger[_0x4532('0x17')](_0x4532('0x18'));return _0x39acf3[_0x4532('0x14')](0xc8)[_0x4532('0x15')]({'output':_0x4532('0x19')});});};exports[_0x4532('0x1a')]=function(_0xd479a9,_0x4db2a1){return git[_0x4532('0x1a')]([_0x4532('0x1b'),_0x4532('0x1c')],function(_0x530ce0){if(_0x530ce0){logger[_0x4532('0x1d')](_0x530ce0);return _0x4db2a1[_0x4532('0x14')](0x1f4)['json'](_0x530ce0);}logger[_0x4532('0x17')](_0x4532('0x1e'));return _0x4db2a1[_0x4532('0x14')](0xc8)[_0x4532('0x15')]({'output':_0x4532('0x1f')});});};exports[_0x4532('0x20')]=function(_0x6a669f,_0x53127c){exec('npm\x20install\x20--production',function(_0x94b670,_0x46dc73,_0x481c26){logger[_0x4532('0x17')](_0x46dc73);logger[_0x4532('0x17')](_0x481c26);if(_0x94b670){logger[_0x4532('0x1d')](_0x94b670);return _0x53127c[_0x4532('0x14')](0x1f4)['json'](_0x94b670);}return _0x53127c[_0x4532('0x14')](0xc8)['json']({'output':_0x46dc73});});};exports[_0x4532('0x21')]=function(_0x9353c0,_0x16e2c4){return pm2[_0x4532('0x21')](_0x4532('0x22'))[_0x4532('0x23')](function(_0x105338){logger[_0x4532('0x17')]('pm2\x20restart\x20motion\x20%s',_0x105338);return _0x16e2c4['status'](0xc8)[_0x4532('0x15')]({'output':_0x4532('0x24')});})[_0x4532('0x25')](function(_0x19f85c){logger[_0x4532('0x1d')](_0x19f85c);return _0x16e2c4[_0x4532('0x14')](0x1f4)['json'](_0x19f85c);});};exports[_0x4532('0x26')]=function(_0x239e85,_0x11d163){var _0x16836c=fs[_0x4532('0x27')](path['join'](config[_0x4532('0xc')],_0x4532('0x28'),_0x4532('0x26')));var _0x523f96=[];for(var _0x58602d=0x0;_0x58602d<_0x16836c['length'];_0x58602d++){var _0x3e4c89=_0x16836c[_0x58602d][_0x4532('0x29')](_0x4532('0x2a'),'');if(compareVersions(module[_0x4532('0xd')][_0x4532('0xe')],_0x3e4c89)===-0x1){_0x523f96[_0x4532('0x2b')](_0x3e4c89);}}if(_0x523f96[_0x4532('0x2c')]){var _0x4a119b=_0x523f96['sort'](compareVersions);var _0xb7b6d2=new Umzug({'storage':_0x4532('0x2d'),'storageOptions':{'model':db['Migration'],'modelName':_0x4532('0x2e'),'columnName':_0x4532('0xe')},'migrations':{'params':[db[_0x4532('0x2d')][_0x4532('0x2f')](),db[_0x4532('0x2d')][_0x4532('0x30')],function(){throw new Error(_0x4532('0x31'));}],'path':path[_0x4532('0x32')](config['root'],'server',_0x4532('0x26')),'pattern':/\.js$/}});_0xb7b6d2['up']({'migrations':_[_0x4532('0x33')](_0x4a119b,function(_0x53e03e){return _0x53e03e+_0x4532('0x2a');})})[_0x4532('0x23')](function(){return _0x11d163[_0x4532('0x14')](0xc8)[_0x4532('0x15')]({'output':'Database\x20migrated\x20successfully\x20from\x20version\x20'+module[_0x4532('0xd')]['version']+_0x4532('0x34')+_['last'](_0x4a119b),'migrations':_[_0x4532('0x32')](_0x4a119b)});})[_0x4532('0x25')](function(_0x32597a){if(_0x32597a instanceof db[_0x4532('0x2d')][_0x4532('0x35')]){return _0x11d163[_0x4532('0x14')](0xc8)[_0x4532('0x15')]({'output':_0x4532('0x36')});}else{return _0x11d163[_0x4532('0x14')](0x1f4)[_0x4532('0x15')](_0x32597a);}});}else{return _0x11d163[_0x4532('0x14')](0xc8)['json']({'output':_0x4532('0x36')});}};
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/index.js b/server/api/voiceAgentReport/index.js
index 5acd1b9..a8961a3 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 _0x07a6=['/:id','post','create','update','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./voiceAgentReport.controller','get','isAuthenticated','index','/describe','describe'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x07a6,0x1ec));var _0x607a=function(_0x1f5baf,_0x782936){_0x1f5baf=_0x1f5baf-0x0;var _0x32301c=_0x07a6[_0x1f5baf];return _0x32301c;};'use strict';var multer=require(_0x607a('0x0'));var util=require('util');var path=require(_0x607a('0x1'));var timeout=require(_0x607a('0x2'));var express=require(_0x607a('0x3'));var router=express['Router']();var auth=require(_0x607a('0x4'));var interaction=require(_0x607a('0x5'));var config=require('../../config/environment');var controller=require(_0x607a('0x6'));router[_0x607a('0x7')]('/',auth[_0x607a('0x8')](),controller[_0x607a('0x9')]);router['get'](_0x607a('0xa'),auth[_0x607a('0x8')](),controller[_0x607a('0xb')]);router[_0x607a('0x7')](_0x607a('0xc'),auth['isAuthenticated'](),controller['show']);router[_0x607a('0xd')]('/',auth[_0x607a('0x8')](),controller[_0x607a('0xe')]);router['put'](_0x607a('0xc'),auth[_0x607a('0x8')](),controller[_0x607a('0xf')]);router['delete'](_0x607a('0xc'),auth['isAuthenticated'](),controller[_0x607a('0x10')]);module[_0x607a('0x11')]=router;
\ No newline at end of file
+var _0x3380=['/:id','show','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','isAuthenticated','/describe','describe'];(function(_0x344a3f,_0x579a22){var _0x264712=function(_0x34c9f0){while(--_0x34c9f0){_0x344a3f['push'](_0x344a3f['shift']());}};_0x264712(++_0x579a22);}(_0x3380,0x1ac));var _0x0338=function(_0x1758b7,_0xfa5a99){_0x1758b7=_0x1758b7-0x0;var _0x5554a1=_0x3380[_0x1758b7];return _0x5554a1;};'use strict';var multer=require(_0x0338('0x0'));var util=require(_0x0338('0x1'));var path=require(_0x0338('0x2'));var timeout=require(_0x0338('0x3'));var express=require(_0x0338('0x4'));var router=express[_0x0338('0x5')]();var auth=require(_0x0338('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x0338('0x7'));var controller=require('./voiceAgentReport.controller');router[_0x0338('0x8')]('/',auth[_0x0338('0x9')](),controller['index']);router[_0x0338('0x8')](_0x0338('0xa'),auth['isAuthenticated'](),controller[_0x0338('0xb')]);router[_0x0338('0x8')](_0x0338('0xc'),auth[_0x0338('0x9')](),controller[_0x0338('0xd')]);router[_0x0338('0xe')]('/',auth[_0x0338('0x9')](),controller['create']);router[_0x0338('0xf')](_0x0338('0xc'),auth[_0x0338('0x9')](),controller[_0x0338('0x10')]);router[_0x0338('0x11')](_0x0338('0xc'),auth[_0x0338('0x9')](),controller[_0x0338('0x12')]);module[_0x0338('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 64bc6bd..8989cc4 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 _0x1cb9=['DATE','INTEGER','BOOLEAN','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','STRING'];(function(_0x3d6a35,_0x3cdbde){var _0x5082fd=function(_0x8023fe){while(--_0x8023fe){_0x3d6a35['push'](_0x3d6a35['shift']());}};_0x5082fd(++_0x3cdbde);}(_0x1cb9,0x14e));var _0x91cb=function(_0x2d69ac,_0x5c4cc6){_0x2d69ac=_0x2d69ac-0x0;var _0x4898c7=_0x1cb9[_0x2d69ac];return _0x4898c7;};'use strict';var Sequelize=require(_0x91cb('0x0'));module['exports']={'type':{'type':Sequelize[_0x91cb('0x1')]},'uniqueid':{'type':Sequelize[_0x91cb('0x1')]},'calleridnum':{'type':Sequelize[_0x91cb('0x1')]},'calleridname':{'type':Sequelize[_0x91cb('0x1')]},'queue':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0x91cb('0x1')]},'membername':{'type':Sequelize[_0x91cb('0x1')]},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize[_0x91cb('0x2')]},'agentcompleteAt':{'type':Sequelize[_0x91cb('0x2')]},'agentringnoanswerAt':{'type':Sequelize[_0x91cb('0x2')]},'agentdumpAt':{'type':Sequelize[_0x91cb('0x2')]},'holdtime':{'type':Sequelize[_0x91cb('0x3')]},'agentcomplete':{'type':Sequelize[_0x91cb('0x4')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentdump':{'type':Sequelize[_0x91cb('0x4')],'defaultValue':![]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize[_0x91cb('0x4')],'defaultValue':![]},'acwtime':{'type':Sequelize['INTEGER']},'reason':{'type':Sequelize[_0x91cb('0x1')]},'lastevent':{'type':Sequelize[_0x91cb('0x1')]},'channel':{'type':Sequelize[_0x91cb('0x1')]},'channelstate':{'type':Sequelize[_0x91cb('0x3')]},'channelstatedesc':{'type':Sequelize[_0x91cb('0x1')]},'connectedlinenum':{'type':Sequelize[_0x91cb('0x1')]},'connectedlinename':{'type':Sequelize[_0x91cb('0x1')]},'language':{'type':Sequelize[_0x91cb('0x1')]},'accountcode':{'type':Sequelize[_0x91cb('0x1')]},'context':{'type':Sequelize[_0x91cb('0x1')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x91cb('0x1')]},'destchannel':{'type':Sequelize[_0x91cb('0x1')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0x91cb('0x1')]},'destcalleridnum':{'type':Sequelize[_0x91cb('0x1')]},'destcalleridname':{'type':Sequelize[_0x91cb('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0x91cb('0x1')]},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0x91cb('0x1')]},'destcontext':{'type':Sequelize[_0x91cb('0x1')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize['STRING']},'destuniqueid':{'type':Sequelize[_0x91cb('0x1')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0x91cb('0x1')]},'answeredelsewheremembername':{'type':Sequelize[_0x91cb('0x1')]},'transfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x91cb('0x1')],'comment':_0x91cb('0x5')},'transferexten':{'type':Sequelize['STRING']},'transferuniqueid':{'type':Sequelize[_0x91cb('0x1')]},'agententerreason':{'type':Sequelize[_0x91cb('0x3')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x3f8a=['sequelize','exports','STRING','DATE','INTEGER','BOOLEAN','FORWARD,\x20BLIND,\x20ATTENDED'];(function(_0x53afe9,_0x2c9f40){var _0x396396=function(_0x1f574d){while(--_0x1f574d){_0x53afe9['push'](_0x53afe9['shift']());}};_0x396396(++_0x2c9f40);}(_0x3f8a,0x1d5));var _0xa3f8=function(_0x412525,_0x42d035){_0x412525=_0x412525-0x0;var _0x26461a=_0x3f8a[_0x412525];return _0x26461a;};'use strict';var Sequelize=require(_0xa3f8('0x0'));module[_0xa3f8('0x1')]={'type':{'type':Sequelize[_0xa3f8('0x2')]},'uniqueid':{'type':Sequelize[_0xa3f8('0x2')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xa3f8('0x2')]},'queue':{'type':Sequelize[_0xa3f8('0x2')]},'interface':{'type':Sequelize[_0xa3f8('0x2')]},'membername':{'type':Sequelize[_0xa3f8('0x2')]},'agentcalledAt':{'type':Sequelize[_0xa3f8('0x3')]},'agentconnectAt':{'type':Sequelize[_0xa3f8('0x3')]},'agentcompleteAt':{'type':Sequelize[_0xa3f8('0x3')]},'agentringnoanswerAt':{'type':Sequelize[_0xa3f8('0x3')]},'agentdumpAt':{'type':Sequelize[_0xa3f8('0x3')]},'holdtime':{'type':Sequelize[_0xa3f8('0x4')]},'agentcomplete':{'type':Sequelize[_0xa3f8('0x5')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0xa3f8('0x5')],'defaultValue':![]},'agentdump':{'type':Sequelize[_0xa3f8('0x5')],'defaultValue':![]},'talktime':{'type':Sequelize[_0xa3f8('0x4')]},'agentacw':{'type':Sequelize[_0xa3f8('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xa3f8('0x4')]},'reason':{'type':Sequelize[_0xa3f8('0x2')]},'lastevent':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xa3f8('0x2')]},'channelstate':{'type':Sequelize[_0xa3f8('0x4')]},'channelstatedesc':{'type':Sequelize[_0xa3f8('0x2')]},'connectedlinenum':{'type':Sequelize[_0xa3f8('0x2')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0xa3f8('0x2')]},'accountcode':{'type':Sequelize[_0xa3f8('0x2')]},'context':{'type':Sequelize[_0xa3f8('0x2')]},'exten':{'type':Sequelize[_0xa3f8('0x2')]},'priority':{'type':Sequelize[_0xa3f8('0x2')]},'destchannel':{'type':Sequelize[_0xa3f8('0x2')]},'destchannelstate':{'type':Sequelize[_0xa3f8('0x4')]},'destchannelstatedesc':{'type':Sequelize[_0xa3f8('0x2')]},'destcalleridnum':{'type':Sequelize[_0xa3f8('0x2')]},'destcalleridname':{'type':Sequelize[_0xa3f8('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0xa3f8('0x2')]},'destconnectedlinename':{'type':Sequelize[_0xa3f8('0x2')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0xa3f8('0x2')]},'destcontext':{'type':Sequelize[_0xa3f8('0x2')]},'destexten':{'type':Sequelize[_0xa3f8('0x2')]},'destpriority':{'type':Sequelize[_0xa3f8('0x2')]},'destuniqueid':{'type':Sequelize['STRING']},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0xa3f8('0x2')]},'answeredelsewheremembername':{'type':Sequelize[_0xa3f8('0x2')]},'transfer':{'type':Sequelize[_0xa3f8('0x5')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xa3f8('0x2')],'comment':_0xa3f8('0x6')},'transferexten':{'type':Sequelize[_0xa3f8('0x2')]},'transferuniqueid':{'type':Sequelize[_0xa3f8('0x2')]},'agententerreason':{'type':Sequelize[_0xa3f8('0x4')],'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 c226953..0005d4d 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 _0x8282=['update','then','destroy','sendStatus','error','stack','name','send','index','VoiceAgentReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','body','find','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','reject','save'];(function(_0x561ca2,_0x419c01){var _0x263960=function(_0x5d4dc3){while(--_0x5d4dc3){_0x561ca2['push'](_0x561ca2['shift']());}};_0x263960(++_0x419c01);}(_0x8282,0xbe));var _0x2828=function(_0x433201,_0x200912){_0x433201=_0x433201-0x0;var _0x13fa14=_0x8282[_0x433201];return _0x13fa14;};'use strict';var pdf=require(_0x2828('0x0'));var emlformat=require(_0x2828('0x1'));var rimraf=require(_0x2828('0x2'));var zipdir=require(_0x2828('0x3'));var jsonpatch=require(_0x2828('0x4'));var rp=require(_0x2828('0x5'));var moment=require(_0x2828('0x6'));var BPromise=require(_0x2828('0x7'));var Mustache=require(_0x2828('0x8'));var util=require(_0x2828('0x9'));var path=require(_0x2828('0xa'));var sox=require(_0x2828('0xb'));var csv=require(_0x2828('0xc'));var ejs=require(_0x2828('0xd'));var fs=require('fs');var _=require(_0x2828('0xe'));var squel=require(_0x2828('0xf'));var crypto=require(_0x2828('0x10'));var jsforce=require('jsforce');var deskjs=require(_0x2828('0x11'));var toCsv=require(_0x2828('0xc'));var querystring=require('querystring');var Papa=require(_0x2828('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x2828('0x13'));var hardwareService=require(_0x2828('0x14'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x2828('0x15'));var db=require(_0x2828('0x16'))['db'];function respondWithStatusCode(_0x24c50a,_0x47543a){_0x47543a=_0x47543a||0xcc;return function(_0x37c444){if(_0x37c444){return _0x24c50a['sendStatus'](_0x47543a);}return _0x24c50a[_0x2828('0x17')](_0x47543a)[_0x2828('0x18')]();};}function respondWithResult(_0x5118b5,_0x3ad27f){_0x3ad27f=_0x3ad27f||0xc8;return function(_0x218f7c){if(_0x218f7c){return _0x5118b5[_0x2828('0x17')](_0x3ad27f)[_0x2828('0x19')](_0x218f7c);}};}function respondWithFilteredResult(_0x5b3d09,_0x495e91){return function(_0x5c2ee1){if(_0x5c2ee1){var _0x4faf4a=_0x5c2ee1[_0x2828('0x1a')],_0xf3b9ae=_0x495e91['offset'],_0x2d37e6=_0x495e91[_0x2828('0x1b')]+_0x495e91[_0x2828('0x1c')],_0x1621b8;if(_0x2d37e6>=_0x4faf4a){_0x2d37e6=_0x4faf4a;_0x1621b8=0xc8;}else{_0x1621b8=0xce;}_0x5b3d09[_0x2828('0x17')](_0x1621b8);return _0x5b3d09[_0x2828('0x1d')]('Content-Range',_0xf3b9ae+'-'+_0x2d37e6+'/'+_0x4faf4a)[_0x2828('0x19')](_0x5c2ee1);}return null;};}function patchUpdates(_0x348d5c){return function(_0x2f4cbb){try{jsonpatch['apply'](_0x2f4cbb,_0x348d5c,!![]);}catch(_0x1b3791){return BPromise[_0x2828('0x1e')](_0x1b3791);}return _0x2f4cbb[_0x2828('0x1f')]();};}function saveUpdates(_0x2c837d,_0x1e64cb){return function(_0x4a97af){if(_0x4a97af){return _0x4a97af[_0x2828('0x20')](_0x2c837d)[_0x2828('0x21')](function(_0x38862c){return _0x38862c;});}return null;};}function removeEntity(_0x3e7b75,_0x16486e){return function(_0x4a4953){if(_0x4a4953){return _0x4a4953[_0x2828('0x22')]()[_0x2828('0x21')](function(){_0x3e7b75[_0x2828('0x17')](0xcc)[_0x2828('0x18')]();});}};}function handleEntityNotFound(_0x4b7f7e,_0x1d3810){return function(_0x427b84){if(!_0x427b84){_0x4b7f7e[_0x2828('0x23')](0x194);}return _0x427b84;};}function handleError(_0x5ae5d3,_0x589eb2){_0x589eb2=_0x589eb2||0x1f4;return function(_0x27bb68){logger[_0x2828('0x24')](_0x27bb68[_0x2828('0x25')]);if(_0x27bb68[_0x2828('0x26')]){delete _0x27bb68['name'];}_0x5ae5d3[_0x2828('0x17')](_0x589eb2)[_0x2828('0x27')](_0x27bb68);};}exports[_0x2828('0x28')]=function(_0x398e79,_0x468930){var _0x48772c={},_0x905702={},_0x2f74a3={'count':0x0,'rows':[]};var _0x47ed8b=_['map'](db[_0x2828('0x29')][_0x2828('0x2a')],function(_0x7574e7){return{'name':_0x7574e7[_0x2828('0x2b')],'type':_0x7574e7['type'][_0x2828('0x2c')]};});_0x905702[_0x2828('0x2d')]=_[_0x2828('0x2e')](_0x47ed8b,_0x2828('0x26'));_0x905702[_0x2828('0x2f')]=_[_0x2828('0x30')](_0x398e79[_0x2828('0x2f')]);_0x905702[_0x2828('0x31')]=_[_0x2828('0x32')](_0x905702[_0x2828('0x2d')],_0x905702[_0x2828('0x2f')]);_0x48772c[_0x2828('0x33')]=_['intersection'](_0x905702[_0x2828('0x2d')],qs['fields'](_0x398e79[_0x2828('0x2f')][_0x2828('0x34')]));_0x48772c['attributes']=_0x48772c[_0x2828('0x33')][_0x2828('0x35')]?_0x48772c['attributes']:_0x905702[_0x2828('0x2d')];if(!_0x398e79[_0x2828('0x2f')][_0x2828('0x36')](_0x2828('0x37'))){_0x48772c[_0x2828('0x1c')]=qs[_0x2828('0x1c')](_0x398e79['query'][_0x2828('0x1c')]);_0x48772c[_0x2828('0x1b')]=qs['offset'](_0x398e79[_0x2828('0x2f')][_0x2828('0x1b')]);}_0x48772c[_0x2828('0x38')]=qs[_0x2828('0x39')](_0x398e79[_0x2828('0x2f')]['sort']);_0x48772c[_0x2828('0x3a')]=qs['filters'](_['pick'](_0x398e79[_0x2828('0x2f')],_0x905702[_0x2828('0x31')]));if(_0x398e79[_0x2828('0x2f')][_0x2828('0x3b')]){_0x48772c[_0x2828('0x3a')]=_[_0x2828('0x3c')](_0x48772c['where'],{'$or':_[_0x2828('0x2e')](_0x47ed8b,function(_0x12ef78){if(_0x12ef78[_0x2828('0x3d')]!==_0x2828('0x3e')){var _0x2b508c={};_0x2b508c[_0x12ef78['name']]={'$like':'%'+_0x398e79['query']['filter']+'%'};return _0x2b508c;}})});}_0x48772c=_[_0x2828('0x3c')]({},_0x48772c,_0x398e79[_0x2828('0x3f')]);var _0x1bab91={'where':_0x48772c[_0x2828('0x3a')]};return db[_0x2828('0x29')][_0x2828('0x1a')](_0x1bab91)[_0x2828('0x21')](function(_0x569b59){_0x2f74a3[_0x2828('0x1a')]=_0x569b59;if(_0x398e79[_0x2828('0x2f')][_0x2828('0x40')]){_0x48772c[_0x2828('0x41')]=[{'all':!![]}];}return db[_0x2828('0x29')][_0x2828('0x42')](_0x48772c);})[_0x2828('0x21')](function(_0x255309){_0x2f74a3[_0x2828('0x43')]=_0x255309;return _0x2f74a3;})[_0x2828('0x21')](respondWithFilteredResult(_0x468930,_0x48772c))[_0x2828('0x44')](handleError(_0x468930,null));};exports[_0x2828('0x45')]=function(_0xf2bf8c,_0x171313){var _0x4f5b63={'raw':![],'where':{'id':_0xf2bf8c[_0x2828('0x46')]['id']}},_0x2048df={};_0x2048df[_0x2828('0x2d')]=_[_0x2828('0x30')](db[_0x2828('0x29')][_0x2828('0x2a')]);_0x2048df[_0x2828('0x2f')]=_['keys'](_0xf2bf8c[_0x2828('0x2f')]);_0x2048df['filters']=_[_0x2828('0x32')](_0x2048df['model'],_0x2048df[_0x2828('0x2f')]);_0x4f5b63[_0x2828('0x33')]=_[_0x2828('0x32')](_0x2048df['model'],qs['fields'](_0xf2bf8c[_0x2828('0x2f')][_0x2828('0x34')]));_0x4f5b63['attributes']=_0x4f5b63[_0x2828('0x33')][_0x2828('0x35')]?_0x4f5b63[_0x2828('0x33')]:_0x2048df[_0x2828('0x2d')];if(_0xf2bf8c['query']['includeAll']){_0x4f5b63['include']=[{'all':!![]}];}_0x4f5b63=_[_0x2828('0x3c')]({},_0x4f5b63,_0xf2bf8c[_0x2828('0x3f')]);return db[_0x2828('0x29')]['find'](_0x4f5b63)[_0x2828('0x21')](handleEntityNotFound(_0x171313,null))[_0x2828('0x21')](respondWithResult(_0x171313,null))[_0x2828('0x44')](handleError(_0x171313,null));};exports['create']=function(_0x3f4939,_0x5181c6){return db[_0x2828('0x29')]['create'](_0x3f4939['body'],{})['then'](respondWithResult(_0x5181c6,0xc9))['catch'](handleError(_0x5181c6,null));};exports['update']=function(_0x4d0f17,_0x5566cd){if(_0x4d0f17[_0x2828('0x47')]['id']){delete _0x4d0f17[_0x2828('0x47')]['id'];}return db[_0x2828('0x29')]['find']({'where':{'id':_0x4d0f17['params']['id']}})[_0x2828('0x21')](handleEntityNotFound(_0x5566cd,null))[_0x2828('0x21')](saveUpdates(_0x4d0f17[_0x2828('0x47')],null))[_0x2828('0x21')](respondWithResult(_0x5566cd,null))[_0x2828('0x44')](handleError(_0x5566cd,null));};exports[_0x2828('0x22')]=function(_0xb11a0e,_0x56a780){return db[_0x2828('0x29')][_0x2828('0x48')]({'where':{'id':_0xb11a0e[_0x2828('0x46')]['id']}})[_0x2828('0x21')](handleEntityNotFound(_0x56a780,null))[_0x2828('0x21')](removeEntity(_0x56a780,null))[_0x2828('0x44')](handleError(_0x56a780,null));};exports[_0x2828('0x49')]=function(_0x356b89,_0x405c80){return db[_0x2828('0x29')][_0x2828('0x49')]()['then'](respondWithResult(_0x405c80,null))[_0x2828('0x44')](handleError(_0x405c80,null));};
\ No newline at end of file
+var _0x55f8=['../../config/environment','../../mysqldb','sendStatus','status','json','limit','set','apply','reject','save','destroy','then','end','error','name','send','index','map','type','key','query','intersection','model','attributes','fields','hasOwnProperty','nolimit','offset','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','include','VoiceAgentReport','findAll','catch','params','keys','rawAttributes','length','includeAll','find','body','describe','html-pdf','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x5cbdd8,_0x4f6a8a){var _0x44dd84=function(_0x2db557){while(--_0x2db557){_0x5cbdd8['push'](_0x5cbdd8['shift']());}};_0x44dd84(++_0x4f6a8a);}(_0x55f8,0x1ed));var _0x855f=function(_0x29c327,_0x48227c){_0x29c327=_0x29c327-0x0;var _0x436b3e=_0x55f8[_0x29c327];return _0x436b3e;};'use strict';var pdf=require(_0x855f('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x855f('0x1'));var zipdir=require(_0x855f('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x855f('0x3'));var moment=require(_0x855f('0x4'));var BPromise=require(_0x855f('0x5'));var Mustache=require(_0x855f('0x6'));var util=require(_0x855f('0x7'));var path=require(_0x855f('0x8'));var sox=require(_0x855f('0x9'));var csv=require(_0x855f('0xa'));var ejs=require(_0x855f('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0x855f('0xc'));var jsforce=require(_0x855f('0xd'));var deskjs=require(_0x855f('0xe'));var toCsv=require(_0x855f('0xa'));var querystring=require(_0x855f('0xf'));var Papa=require(_0x855f('0x10'));var Redis=require(_0x855f('0x11'));var authService=require(_0x855f('0x12'));var qs=require(_0x855f('0x13'));var as=require(_0x855f('0x14'));var hardwareService=require(_0x855f('0x15'));var logger=require(_0x855f('0x16'))(_0x855f('0x17'));var utils=require(_0x855f('0x18'));var config=require(_0x855f('0x19'));var db=require(_0x855f('0x1a'))['db'];function respondWithStatusCode(_0x4c4586,_0x3dc7d3){_0x3dc7d3=_0x3dc7d3||0xcc;return function(_0x2d52e6){if(_0x2d52e6){return _0x4c4586[_0x855f('0x1b')](_0x3dc7d3);}return _0x4c4586[_0x855f('0x1c')](_0x3dc7d3)['end']();};}function respondWithResult(_0x2757dd,_0x2edaaf){_0x2edaaf=_0x2edaaf||0xc8;return function(_0x2b669c){if(_0x2b669c){return _0x2757dd[_0x855f('0x1c')](_0x2edaaf)[_0x855f('0x1d')](_0x2b669c);}};}function respondWithFilteredResult(_0x6d6ce9,_0x1a6877){return function(_0x20cfa9){if(_0x20cfa9){var _0x185102=_0x20cfa9['count'],_0x4869d6=_0x1a6877['offset'],_0x1940cc=_0x1a6877['offset']+_0x1a6877[_0x855f('0x1e')],_0xecbec8;if(_0x1940cc>=_0x185102){_0x1940cc=_0x185102;_0xecbec8=0xc8;}else{_0xecbec8=0xce;}_0x6d6ce9[_0x855f('0x1c')](_0xecbec8);return _0x6d6ce9[_0x855f('0x1f')]('Content-Range',_0x4869d6+'-'+_0x1940cc+'/'+_0x185102)[_0x855f('0x1d')](_0x20cfa9);}return null;};}function patchUpdates(_0x1d70b4){return function(_0x30d18c){try{jsonpatch[_0x855f('0x20')](_0x30d18c,_0x1d70b4,!![]);}catch(_0x5b3193){return BPromise[_0x855f('0x21')](_0x5b3193);}return _0x30d18c[_0x855f('0x22')]();};}function saveUpdates(_0x184e70,_0x4a606c){return function(_0x55af05){if(_0x55af05){return _0x55af05['update'](_0x184e70)['then'](function(_0x53ead4){return _0x53ead4;});}return null;};}function removeEntity(_0x5df491,_0x2aa9e5){return function(_0x4f6d30){if(_0x4f6d30){return _0x4f6d30[_0x855f('0x23')]()[_0x855f('0x24')](function(){_0x5df491[_0x855f('0x1c')](0xcc)[_0x855f('0x25')]();});}};}function handleEntityNotFound(_0x3a7acb,_0x201ea5){return function(_0x3c3231){if(!_0x3c3231){_0x3a7acb[_0x855f('0x1b')](0x194);}return _0x3c3231;};}function handleError(_0x16b55d,_0x3f67b8){_0x3f67b8=_0x3f67b8||0x1f4;return function(_0x4a0a39){logger[_0x855f('0x26')](_0x4a0a39['stack']);if(_0x4a0a39[_0x855f('0x27')]){delete _0x4a0a39[_0x855f('0x27')];}_0x16b55d[_0x855f('0x1c')](_0x3f67b8)[_0x855f('0x28')](_0x4a0a39);};}exports[_0x855f('0x29')]=function(_0xd7eda5,_0x54d800){var _0x596cb2={},_0x5aa213={},_0x568ba1={'count':0x0,'rows':[]};var _0x1919de=_[_0x855f('0x2a')](db['VoiceAgentReport']['rawAttributes'],function(_0xac1e4b){return{'name':_0xac1e4b['fieldName'],'type':_0xac1e4b[_0x855f('0x2b')][_0x855f('0x2c')]};});_0x5aa213['model']=_[_0x855f('0x2a')](_0x1919de,'name');_0x5aa213[_0x855f('0x2d')]=_['keys'](_0xd7eda5[_0x855f('0x2d')]);_0x5aa213['filters']=_[_0x855f('0x2e')](_0x5aa213[_0x855f('0x2f')],_0x5aa213[_0x855f('0x2d')]);_0x596cb2[_0x855f('0x30')]=_[_0x855f('0x2e')](_0x5aa213['model'],qs[_0x855f('0x31')](_0xd7eda5[_0x855f('0x2d')][_0x855f('0x31')]));_0x596cb2['attributes']=_0x596cb2[_0x855f('0x30')]['length']?_0x596cb2[_0x855f('0x30')]:_0x5aa213[_0x855f('0x2f')];if(!_0xd7eda5[_0x855f('0x2d')][_0x855f('0x32')](_0x855f('0x33'))){_0x596cb2[_0x855f('0x1e')]=qs[_0x855f('0x1e')](_0xd7eda5['query']['limit']);_0x596cb2[_0x855f('0x34')]=qs[_0x855f('0x34')](_0xd7eda5[_0x855f('0x2d')][_0x855f('0x34')]);}_0x596cb2[_0x855f('0x35')]=qs['sort'](_0xd7eda5[_0x855f('0x2d')][_0x855f('0x36')]);_0x596cb2[_0x855f('0x37')]=qs[_0x855f('0x38')](_[_0x855f('0x39')](_0xd7eda5['query'],_0x5aa213[_0x855f('0x38')]));if(_0xd7eda5[_0x855f('0x2d')]['filter']){_0x596cb2['where']=_[_0x855f('0x3a')](_0x596cb2[_0x855f('0x37')],{'$or':_[_0x855f('0x2a')](_0x1919de,function(_0x3b92b9){if(_0x3b92b9[_0x855f('0x2b')]!==_0x855f('0x3b')){var _0x521a69={};_0x521a69[_0x3b92b9[_0x855f('0x27')]]={'$like':'%'+_0xd7eda5['query'][_0x855f('0x3c')]+'%'};return _0x521a69;}})});}_0x596cb2=_['merge']({},_0x596cb2,_0xd7eda5[_0x855f('0x3d')]);var _0x48b3af={'where':_0x596cb2[_0x855f('0x37')]};return db['VoiceAgentReport']['count'](_0x48b3af)[_0x855f('0x24')](function(_0x2e5310){_0x568ba1['count']=_0x2e5310;if(_0xd7eda5[_0x855f('0x2d')]['includeAll']){_0x596cb2[_0x855f('0x3e')]=[{'all':!![]}];}return db[_0x855f('0x3f')][_0x855f('0x40')](_0x596cb2);})[_0x855f('0x24')](function(_0x189b6f){_0x568ba1['rows']=_0x189b6f;return _0x568ba1;})['then'](respondWithFilteredResult(_0x54d800,_0x596cb2))[_0x855f('0x41')](handleError(_0x54d800,null));};exports['show']=function(_0xddc404,_0x4d3ab0){var _0x2bef38={'raw':![],'where':{'id':_0xddc404[_0x855f('0x42')]['id']}},_0x1928cf={};_0x1928cf[_0x855f('0x2f')]=_[_0x855f('0x43')](db[_0x855f('0x3f')][_0x855f('0x44')]);_0x1928cf[_0x855f('0x2d')]=_[_0x855f('0x43')](_0xddc404[_0x855f('0x2d')]);_0x1928cf['filters']=_['intersection'](_0x1928cf[_0x855f('0x2f')],_0x1928cf[_0x855f('0x2d')]);_0x2bef38[_0x855f('0x30')]=_[_0x855f('0x2e')](_0x1928cf['model'],qs[_0x855f('0x31')](_0xddc404[_0x855f('0x2d')]['fields']));_0x2bef38[_0x855f('0x30')]=_0x2bef38['attributes'][_0x855f('0x45')]?_0x2bef38[_0x855f('0x30')]:_0x1928cf[_0x855f('0x2f')];if(_0xddc404['query'][_0x855f('0x46')]){_0x2bef38['include']=[{'all':!![]}];}_0x2bef38=_[_0x855f('0x3a')]({},_0x2bef38,_0xddc404[_0x855f('0x3d')]);return db[_0x855f('0x3f')][_0x855f('0x47')](_0x2bef38)[_0x855f('0x24')](handleEntityNotFound(_0x4d3ab0,null))[_0x855f('0x24')](respondWithResult(_0x4d3ab0,null))[_0x855f('0x41')](handleError(_0x4d3ab0,null));};exports['create']=function(_0xb8828c,_0x2586a2){return db[_0x855f('0x3f')]['create'](_0xb8828c[_0x855f('0x48')],{})[_0x855f('0x24')](respondWithResult(_0x2586a2,0xc9))[_0x855f('0x41')](handleError(_0x2586a2,null));};exports['update']=function(_0x4006b2,_0xe34844){if(_0x4006b2['body']['id']){delete _0x4006b2[_0x855f('0x48')]['id'];}return db[_0x855f('0x3f')][_0x855f('0x47')]({'where':{'id':_0x4006b2[_0x855f('0x42')]['id']}})['then'](handleEntityNotFound(_0xe34844,null))[_0x855f('0x24')](saveUpdates(_0x4006b2[_0x855f('0x48')],null))[_0x855f('0x24')](respondWithResult(_0xe34844,null))[_0x855f('0x41')](handleError(_0xe34844,null));};exports[_0x855f('0x23')]=function(_0x39ee83,_0x9a3f24){return db[_0x855f('0x3f')][_0x855f('0x47')]({'where':{'id':_0x39ee83[_0x855f('0x42')]['id']}})[_0x855f('0x24')](handleEntityNotFound(_0x9a3f24,null))['then'](removeEntity(_0x9a3f24,null))[_0x855f('0x41')](handleError(_0x9a3f24,null));};exports[_0x855f('0x49')]=function(_0x34b4ac,_0x7fc3d3){return db[_0x855f('0x3f')]['describe']()[_0x855f('0x24')](respondWithResult(_0x7fc3d3,null))[_0x855f('0x41')](handleError(_0x7fc3d3,null));};
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/voiceAgentReport.model.js b/server/api/voiceAgentReport/voiceAgentReport.model.js
index 2b1d8f6..be37b9f 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 _0x9b8e=['exports','define','VoiceAgentReport','report_agent','lodash','../../config/logger','api','request-promise','rimraf','../../config/environment'];(function(_0x2a1eb9,_0x2c6329){var _0x4b5310=function(_0x393652){while(--_0x393652){_0x2a1eb9['push'](_0x2a1eb9['shift']());}};_0x4b5310(++_0x2c6329);}(_0x9b8e,0x158));var _0xe9b8=function(_0x5d8370,_0x39c922){_0x5d8370=_0x5d8370-0x0;var _0x110786=_0x9b8e[_0x5d8370];return _0x110786;};'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('./voiceAgentReport.attributes');module[_0xe9b8('0x6')]=function(_0x3d24e3,_0x3f6b50){return _0x3d24e3[_0xe9b8('0x7')](_0xe9b8('0x8'),attributes,{'tableName':_0xe9b8('0x9'),'paranoid':![],'indexes':[{'fields':['uniqueid','destuniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x79f1=['bluebird','request-promise','path','./voiceAgentReport.attributes','exports','define','VoiceAgentReport','report_agent','uniqueid','destuniqueid','lodash','util','../../config/logger','api'];(function(_0x398ee9,_0x24938e){var _0x52178c=function(_0x45e741){while(--_0x45e741){_0x398ee9['push'](_0x398ee9['shift']());}};_0x52178c(++_0x24938e);}(_0x79f1,0xea));var _0x179f=function(_0x12a2a6,_0x374ff1){_0x12a2a6=_0x12a2a6-0x0;var _0x1754ae=_0x79f1[_0x12a2a6];return _0x1754ae;};'use strict';var _=require(_0x179f('0x0'));var util=require(_0x179f('0x1'));var logger=require(_0x179f('0x2'))(_0x179f('0x3'));var moment=require('moment');var BPromise=require(_0x179f('0x4'));var rp=require(_0x179f('0x5'));var fs=require('fs');var path=require(_0x179f('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x179f('0x7'));module[_0x179f('0x8')]=function(_0x265d64,_0x13d49d){return _0x265d64[_0x179f('0x9')](_0x179f('0xa'),attributes,{'tableName':_0x179f('0xb'),'paranoid':![],'indexes':[{'fields':[_0x179f('0xc'),_0x179f('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceAgentReport/voiceAgentReport.rpc.js b/server/api/voiceAgentReport/voiceAgentReport.rpc.js
index 2ebda1c..7b53be4 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 _0x5da0=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','VoiceAgentReport','create','options','then','CreateVoiceAgentReport','stringify','update','body','raw','where','limit','UpdateVoiceAgentReport','util','moment'];(function(_0x99868f,_0xbdb8e7){var _0x27a71b=function(_0x41feca){while(--_0x41feca){_0x99868f['push'](_0x99868f['shift']());}};_0x27a71b(++_0xbdb8e7);}(_0x5da0,0x166));var _0x05da=function(_0x234c72,_0xe870ca){_0x234c72=_0x234c72-0x0;var _0x12605f=_0x5da0[_0x234c72];return _0x12605f;};'use strict';var _=require('lodash');var util=require(_0x05da('0x0'));var moment=require(_0x05da('0x1'));var BPromise=require('bluebird');var rs=require(_0x05da('0x2'));var fs=require('fs');var Redis=require(_0x05da('0x3'));var db=require(_0x05da('0x4'))['db'];var utils=require(_0x05da('0x5'));var logger=require(_0x05da('0x6'))(_0x05da('0x7'));var config=require('../../config/environment');var jayson=require(_0x05da('0x8'));var client=jayson['client'][_0x05da('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2b0b7e,_0x10c67f,_0x1268e4){return new BPromise(function(_0x4978a3,_0x3eedcd){return client['request'](_0x2b0b7e,_0x1268e4)['then'](function(_0x24121f){logger[_0x05da('0xa')](_0x05da('0xb'),_0x10c67f,_0x05da('0xc'));logger[_0x05da('0xd')]('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x10c67f,_0x05da('0xc'),JSON['stringify'](_0x24121f));if(_0x24121f[_0x05da('0xe')]){if(_0x24121f[_0x05da('0xe')][_0x05da('0xf')]===0x1f4){logger[_0x05da('0xe')]('VoiceAgentReport,\x20%s,\x20%s',_0x10c67f,_0x24121f[_0x05da('0xe')][_0x05da('0x10')]);return _0x3eedcd(_0x24121f[_0x05da('0xe')]['message']);}logger[_0x05da('0xe')](_0x05da('0xb'),_0x10c67f,_0x24121f[_0x05da('0xe')][_0x05da('0x10')]);return _0x4978a3(_0x24121f[_0x05da('0xe')][_0x05da('0x10')]);}else{logger[_0x05da('0xa')](_0x05da('0xb'),_0x10c67f,_0x05da('0xc'));_0x4978a3(_0x24121f['result']['message']);}})[_0x05da('0x11')](function(_0x38eb3e){logger['error'](_0x05da('0xb'),_0x10c67f,_0x38eb3e);_0x3eedcd(_0x38eb3e);});});}exports['CreateVoiceAgentReport']=function(_0x293d01){var _0x1ddacb=this;return new Promise(function(_0x5adb9b,_0xb0baf){return db[_0x05da('0x12')][_0x05da('0x13')](_0x293d01['body'],{'raw':_0x293d01[_0x05da('0x14')]?_0x293d01[_0x05da('0x14')]['raw']===undefined?!![]:![]:!![]})[_0x05da('0x15')](function(_0x4d561a){logger['info'](_0x05da('0x16'),_0x293d01);logger[_0x05da('0xd')](_0x05da('0x16'),_0x293d01,JSON[_0x05da('0x17')](_0x4d561a));_0x5adb9b(_0x4d561a);})[_0x05da('0x11')](function(_0x9d7ec1){logger['error'](_0x05da('0x16'),_0x9d7ec1[_0x05da('0x10')],_0x293d01);_0xb0baf(_0x1ddacb[_0x05da('0xe')](0x1f4,_0x9d7ec1[_0x05da('0x10')]));});});};exports['UpdateVoiceAgentReport']=function(_0x1953d1){var _0xfdc661=this;return new Promise(function(_0x9a2fb5,_0x1d04e6){return db['VoiceAgentReport'][_0x05da('0x18')](_0x1953d1[_0x05da('0x19')],{'raw':_0x1953d1[_0x05da('0x14')]?_0x1953d1[_0x05da('0x14')][_0x05da('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1953d1['options']?_0x1953d1[_0x05da('0x14')][_0x05da('0x1b')]||null:null,'attributes':_0x1953d1[_0x05da('0x14')]?_0x1953d1[_0x05da('0x14')]['attributes']||null:null,'limit':_0x1953d1[_0x05da('0x14')]?_0x1953d1[_0x05da('0x14')][_0x05da('0x1c')]||null:null})[_0x05da('0x15')](function(_0x103772){logger[_0x05da('0xa')](_0x05da('0x1d'),_0x1953d1);logger[_0x05da('0xd')](_0x05da('0x1d'),_0x1953d1,JSON['stringify'](_0x103772));_0x9a2fb5(_0x103772);})['catch'](function(_0x3ee337){logger['error']('UpdateVoiceAgentReport',_0x3ee337[_0x05da('0x10')],_0x1953d1);_0x1d04e6(_0xfdc661[_0x05da('0xe')](0x1f4,_0x3ee337[_0x05da('0x10')]));});});};
\ No newline at end of file
+var _0xe0ab=['UpdateVoiceAgentReport','update','where','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','VoiceAgentReport,\x20%s,\x20%s','message','request\x20sent','catch','CreateVoiceAgentReport','VoiceAgentReport','create','options','raw'];(function(_0x2ee7cc,_0x4f0ef1){var _0x3488b7=function(_0x20fb82){while(--_0x20fb82){_0x2ee7cc['push'](_0x2ee7cc['shift']());}};_0x3488b7(++_0x4f0ef1);}(_0xe0ab,0x1d3));var _0xbe0a=function(_0x3ab9ee,_0x4a74b8){_0x3ab9ee=_0x3ab9ee-0x0;var _0x82ee88=_0xe0ab[_0x3ab9ee];return _0x82ee88;};'use strict';var _=require(_0xbe0a('0x0'));var util=require(_0xbe0a('0x1'));var moment=require(_0xbe0a('0x2'));var BPromise=require(_0xbe0a('0x3'));var rs=require(_0xbe0a('0x4'));var fs=require('fs');var Redis=require(_0xbe0a('0x5'));var db=require(_0xbe0a('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xbe0a('0x7'))(_0xbe0a('0x8'));var config=require(_0xbe0a('0x9'));var jayson=require(_0xbe0a('0xa'));var client=jayson[_0xbe0a('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x20f9c7,_0x4b9857,_0x356fad){return new BPromise(function(_0x3a5a6b,_0x2023c5){return client[_0xbe0a('0xc')](_0x20f9c7,_0x356fad)[_0xbe0a('0xd')](function(_0x16f99e){logger[_0xbe0a('0xe')]('VoiceAgentReport,\x20%s,\x20%s',_0x4b9857,'request\x20sent');logger[_0xbe0a('0xf')](_0xbe0a('0x10'),_0x4b9857,'request\x20sent',JSON[_0xbe0a('0x11')](_0x16f99e));if(_0x16f99e['error']){if(_0x16f99e['error']['code']===0x1f4){logger[_0xbe0a('0x12')](_0xbe0a('0x13'),_0x4b9857,_0x16f99e[_0xbe0a('0x12')][_0xbe0a('0x14')]);return _0x2023c5(_0x16f99e[_0xbe0a('0x12')][_0xbe0a('0x14')]);}logger[_0xbe0a('0x12')](_0xbe0a('0x13'),_0x4b9857,_0x16f99e[_0xbe0a('0x12')][_0xbe0a('0x14')]);return _0x3a5a6b(_0x16f99e[_0xbe0a('0x12')][_0xbe0a('0x14')]);}else{logger[_0xbe0a('0xe')](_0xbe0a('0x13'),_0x4b9857,_0xbe0a('0x15'));_0x3a5a6b(_0x16f99e['result'][_0xbe0a('0x14')]);}})[_0xbe0a('0x16')](function(_0x120c74){logger[_0xbe0a('0x12')]('VoiceAgentReport,\x20%s,\x20%s',_0x4b9857,_0x120c74);_0x2023c5(_0x120c74);});});}exports[_0xbe0a('0x17')]=function(_0x20e6d7){var _0x4eea3c=this;return new Promise(function(_0xd61061,_0x5a36bd){return db[_0xbe0a('0x18')][_0xbe0a('0x19')](_0x20e6d7['body'],{'raw':_0x20e6d7[_0xbe0a('0x1a')]?_0x20e6d7[_0xbe0a('0x1a')][_0xbe0a('0x1b')]===undefined?!![]:![]:!![]})[_0xbe0a('0xd')](function(_0x2ef0c0){logger[_0xbe0a('0xe')](_0xbe0a('0x17'),_0x20e6d7);logger[_0xbe0a('0xf')]('CreateVoiceAgentReport',_0x20e6d7,JSON[_0xbe0a('0x11')](_0x2ef0c0));_0xd61061(_0x2ef0c0);})[_0xbe0a('0x16')](function(_0x2b69a0){logger[_0xbe0a('0x12')](_0xbe0a('0x17'),_0x2b69a0['message'],_0x20e6d7);_0x5a36bd(_0x4eea3c[_0xbe0a('0x12')](0x1f4,_0x2b69a0[_0xbe0a('0x14')]));});});};exports[_0xbe0a('0x1c')]=function(_0x37c6ee){var _0x27909d=this;return new Promise(function(_0x58b23d,_0x2f1116){return db[_0xbe0a('0x18')][_0xbe0a('0x1d')](_0x37c6ee['body'],{'raw':_0x37c6ee['options']?_0x37c6ee[_0xbe0a('0x1a')][_0xbe0a('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x37c6ee[_0xbe0a('0x1a')]?_0x37c6ee['options'][_0xbe0a('0x1e')]||null:null,'attributes':_0x37c6ee[_0xbe0a('0x1a')]?_0x37c6ee[_0xbe0a('0x1a')][_0xbe0a('0x1f')]||null:null,'limit':_0x37c6ee[_0xbe0a('0x1a')]?_0x37c6ee[_0xbe0a('0x1a')][_0xbe0a('0x20')]||null:null})['then'](function(_0x3b2fca){logger['info'](_0xbe0a('0x1c'),_0x37c6ee);logger[_0xbe0a('0xf')](_0xbe0a('0x1c'),_0x37c6ee,JSON[_0xbe0a('0x11')](_0x3b2fca));_0x58b23d(_0x3b2fca);})[_0xbe0a('0x16')](function(_0x1ecd12){logger['error']('UpdateVoiceAgentReport',_0x1ecd12[_0xbe0a('0x14')],_0x37c6ee);_0x2f1116(_0x27909d[_0xbe0a('0x12')](0x1f4,_0x1ecd12[_0xbe0a('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/index.js b/server/api/voiceCallReport/index.js
index 40bc489..33b4837 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 _0x9183=['../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceCallReport.controller','get','isAuthenticated','index','/describe','describe','show','post','put','/:id','update','destroy','exports','multer','path','connect-timeout','express','Router'];(function(_0x298b05,_0x243be8){var _0x5679f6=function(_0x219f9a){while(--_0x219f9a){_0x298b05['push'](_0x298b05['shift']());}};_0x5679f6(++_0x243be8);}(_0x9183,0xcd));var _0x3918=function(_0x1f26b5,_0x1321f9){_0x1f26b5=_0x1f26b5-0x0;var _0x1c838e=_0x9183[_0x1f26b5];return _0x1c838e;};'use strict';var multer=require(_0x3918('0x0'));var util=require('util');var path=require(_0x3918('0x1'));var timeout=require(_0x3918('0x2'));var express=require(_0x3918('0x3'));var router=express[_0x3918('0x4')]();var auth=require(_0x3918('0x5'));var interaction=require(_0x3918('0x6'));var config=require(_0x3918('0x7'));var controller=require(_0x3918('0x8'));router[_0x3918('0x9')]('/',auth[_0x3918('0xa')](),controller[_0x3918('0xb')]);router[_0x3918('0x9')](_0x3918('0xc'),auth[_0x3918('0xa')](),controller[_0x3918('0xd')]);router[_0x3918('0x9')]('/:id',auth[_0x3918('0xa')](),controller[_0x3918('0xe')]);router[_0x3918('0xf')]('/',auth[_0x3918('0xa')](),controller['create']);router[_0x3918('0x10')](_0x3918('0x11'),auth[_0x3918('0xa')](),controller[_0x3918('0x12')]);router['delete'](_0x3918('0x11'),auth[_0x3918('0xa')](),controller[_0x3918('0x13')]);module[_0x3918('0x14')]=router;
\ No newline at end of file
+var _0x0a6a=['update','delete','destroy','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceCallReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create'];(function(_0x22635f,_0x5bdaed){var _0x3769a9=function(_0x270d48){while(--_0x270d48){_0x22635f['push'](_0x22635f['shift']());}};_0x3769a9(++_0x5bdaed);}(_0x0a6a,0x96));var _0xa0a6=function(_0x58fbb0,_0xe497b5){_0x58fbb0=_0x58fbb0-0x0;var _0x1783d2=_0x0a6a[_0x58fbb0];return _0x1783d2;};'use strict';var multer=require(_0xa0a6('0x0'));var util=require(_0xa0a6('0x1'));var path=require(_0xa0a6('0x2'));var timeout=require(_0xa0a6('0x3'));var express=require('express');var router=express[_0xa0a6('0x4')]();var auth=require(_0xa0a6('0x5'));var interaction=require(_0xa0a6('0x6'));var config=require(_0xa0a6('0x7'));var controller=require(_0xa0a6('0x8'));router[_0xa0a6('0x9')]('/',auth[_0xa0a6('0xa')](),controller[_0xa0a6('0xb')]);router['get'](_0xa0a6('0xc'),auth['isAuthenticated'](),controller[_0xa0a6('0xd')]);router[_0xa0a6('0x9')](_0xa0a6('0xe'),auth['isAuthenticated'](),controller[_0xa0a6('0xf')]);router[_0xa0a6('0x10')]('/',auth[_0xa0a6('0xa')](),controller[_0xa0a6('0x11')]);router['put'](_0xa0a6('0xe'),auth[_0xa0a6('0xa')](),controller[_0xa0a6('0x12')]);router[_0xa0a6('0x13')](_0xa0a6('0xe'),auth['isAuthenticated'](),controller[_0xa0a6('0x14')]);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 85117a2..7a8780a 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 _0x9957=['ENUM','internal','outbound','inbound-fax','outbound-fax','DATE','INTEGER','sequelize','exports','STRING'];(function(_0x3e81fa,_0x410756){var _0x59a5ce=function(_0xd59e0b){while(--_0xd59e0b){_0x3e81fa['push'](_0x3e81fa['shift']());}};_0x59a5ce(++_0x410756);}(_0x9957,0x93));var _0x7995=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9957[_0x2dafbe];return _0x58a45a;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'uniqueid':{'type':Sequelize[_0x7995('0x2')]},'type':{'type':Sequelize[_0x7995('0x3')]('inbound',_0x7995('0x4'),_0x7995('0x5'),_0x7995('0x6'),_0x7995('0x7'),'dialer')},'tag':{'type':Sequelize[_0x7995('0x2')]},'accountcode':{'type':Sequelize[_0x7995('0x2')]},'source':{'type':Sequelize[_0x7995('0x2')]},'destination':{'type':Sequelize[_0x7995('0x2')]},'destinationcontext':{'type':Sequelize[_0x7995('0x2')]},'callerid':{'type':Sequelize[_0x7995('0x2')]},'channel':{'type':Sequelize['STRING']},'destinationchannel':{'type':Sequelize[_0x7995('0x2')]},'lastapplication':{'type':Sequelize[_0x7995('0x2')]},'lastdata':{'type':Sequelize['TEXT']},'starttime':{'type':Sequelize[_0x7995('0x8')]},'systemanswertime':{'type':Sequelize[_0x7995('0x8')]},'answertime':{'type':Sequelize[_0x7995('0x8')]},'endtime':{'type':Sequelize[_0x7995('0x8')]},'duration':{'type':Sequelize[_0x7995('0x9')]},'billableseconds':{'type':Sequelize[_0x7995('0x9')]},'mohtime':{'type':Sequelize[_0x7995('0x9')],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize[_0x7995('0x2')]},'userfield':{'type':Sequelize[_0x7995('0x2')]},'userDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x7995('0x2')]},'prefix':{'type':Sequelize[_0x7995('0x2')]},'routeid':{'type':Sequelize[_0x7995('0x9')]},'sipcallid':{'type':Sequelize[_0x7995('0x2')]}};
\ No newline at end of file
+var _0x9957=['ENUM','internal','outbound','inbound-fax','outbound-fax','DATE','INTEGER','sequelize','exports','STRING'];(function(_0x3e2c62,_0x1ed9f9){var _0x443c70=function(_0x982bf4){while(--_0x982bf4){_0x3e2c62['push'](_0x3e2c62['shift']());}};_0x443c70(++_0x1ed9f9);}(_0x9957,0x93));var _0x7995=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x9957[_0x1facfa];return _0x9ec701;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'uniqueid':{'type':Sequelize[_0x7995('0x2')]},'type':{'type':Sequelize[_0x7995('0x3')]('inbound',_0x7995('0x4'),_0x7995('0x5'),_0x7995('0x6'),_0x7995('0x7'),'dialer')},'tag':{'type':Sequelize[_0x7995('0x2')]},'accountcode':{'type':Sequelize[_0x7995('0x2')]},'source':{'type':Sequelize[_0x7995('0x2')]},'destination':{'type':Sequelize[_0x7995('0x2')]},'destinationcontext':{'type':Sequelize[_0x7995('0x2')]},'callerid':{'type':Sequelize[_0x7995('0x2')]},'channel':{'type':Sequelize['STRING']},'destinationchannel':{'type':Sequelize[_0x7995('0x2')]},'lastapplication':{'type':Sequelize[_0x7995('0x2')]},'lastdata':{'type':Sequelize['TEXT']},'starttime':{'type':Sequelize[_0x7995('0x8')]},'systemanswertime':{'type':Sequelize[_0x7995('0x8')]},'answertime':{'type':Sequelize[_0x7995('0x8')]},'endtime':{'type':Sequelize[_0x7995('0x8')]},'duration':{'type':Sequelize[_0x7995('0x9')]},'billableseconds':{'type':Sequelize[_0x7995('0x9')]},'mohtime':{'type':Sequelize[_0x7995('0x9')],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize[_0x7995('0x2')]},'userfield':{'type':Sequelize[_0x7995('0x2')]},'userDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x7995('0x2')]},'prefix':{'type':Sequelize[_0x7995('0x2')]},'routeid':{'type':Sequelize[_0x7995('0x9')]},'sipcallid':{'type':Sequelize[_0x7995('0x2')]}};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/voiceCallReport.controller.js b/server/api/voiceCallReport/voiceCallReport.controller.js
index b741dfa..7626d4a 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 _0xa4c7=['fieldName','type','key','model','map','keys','query','filters','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','options','VoiceCallReport','includeAll','fullname','alias','User','findAll','catch','show','params','include','create','body','destroy','find','describe','uniqueid','user','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','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../mysqldb','sendStatus','status','json','count','offset','limit','set','reject','save','update','then','error','stack','name','send','index','rawAttributes'];(function(_0xcd49bd,_0x2a12a3){var _0xb6ee44=function(_0x1f77bb){while(--_0x1f77bb){_0xcd49bd['push'](_0xcd49bd['shift']());}};_0xb6ee44(++_0x2a12a3);}(_0xa4c7,0x73));var _0x7a4c=function(_0x53cbad,_0x3f4111){_0x53cbad=_0x53cbad-0x0;var _0x2a7801=_0xa4c7[_0x53cbad];return _0x2a7801;};'use strict';var pdf=require(_0x7a4c('0x0'));var emlformat=require(_0x7a4c('0x1'));var rimraf=require(_0x7a4c('0x2'));var zipdir=require(_0x7a4c('0x3'));var jsonpatch=require(_0x7a4c('0x4'));var rp=require(_0x7a4c('0x5'));var moment=require(_0x7a4c('0x6'));var BPromise=require(_0x7a4c('0x7'));var Mustache=require('mustache');var util=require(_0x7a4c('0x8'));var path=require(_0x7a4c('0x9'));var sox=require(_0x7a4c('0xa'));var csv=require(_0x7a4c('0xb'));var ejs=require(_0x7a4c('0xc'));var fs=require('fs');var _=require(_0x7a4c('0xd'));var squel=require(_0x7a4c('0xe'));var crypto=require(_0x7a4c('0xf'));var jsforce=require(_0x7a4c('0x10'));var deskjs=require(_0x7a4c('0x11'));var toCsv=require('to-csv');var querystring=require(_0x7a4c('0x12'));var Papa=require('papaparse');var Redis=require(_0x7a4c('0x13'));var authService=require(_0x7a4c('0x14'));var qs=require(_0x7a4c('0x15'));var as=require(_0x7a4c('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x7a4c('0x17'));var utils=require(_0x7a4c('0x18'));var config=require('../../config/environment');var db=require(_0x7a4c('0x19'))['db'];function respondWithStatusCode(_0x2a4ee8,_0x5a0632){_0x5a0632=_0x5a0632||0xcc;return function(_0x336a34){if(_0x336a34){return _0x2a4ee8[_0x7a4c('0x1a')](_0x5a0632);}return _0x2a4ee8[_0x7a4c('0x1b')](_0x5a0632)['end']();};}function respondWithResult(_0x431344,_0xf69919){_0xf69919=_0xf69919||0xc8;return function(_0x1fa69c){if(_0x1fa69c){return _0x431344[_0x7a4c('0x1b')](_0xf69919)[_0x7a4c('0x1c')](_0x1fa69c);}};}function respondWithFilteredResult(_0x1572ff,_0x6fa9e5){return function(_0x2a8a8a){if(_0x2a8a8a){var _0x107d14=_0x2a8a8a[_0x7a4c('0x1d')],_0x4b3603=_0x6fa9e5[_0x7a4c('0x1e')],_0x12341e=_0x6fa9e5['offset']+_0x6fa9e5[_0x7a4c('0x1f')],_0x51c011;if(_0x12341e>=_0x107d14){_0x12341e=_0x107d14;_0x51c011=0xc8;}else{_0x51c011=0xce;}_0x1572ff['status'](_0x51c011);return _0x1572ff[_0x7a4c('0x20')]('Content-Range',_0x4b3603+'-'+_0x12341e+'/'+_0x107d14)[_0x7a4c('0x1c')](_0x2a8a8a);}return null;};}function patchUpdates(_0x325ada){return function(_0x16d68d){try{jsonpatch['apply'](_0x16d68d,_0x325ada,!![]);}catch(_0x7812b){return BPromise[_0x7a4c('0x21')](_0x7812b);}return _0x16d68d[_0x7a4c('0x22')]();};}function saveUpdates(_0x5d6fa0,_0x38aeff){return function(_0x3e16a6){if(_0x3e16a6){return _0x3e16a6[_0x7a4c('0x23')](_0x5d6fa0)[_0x7a4c('0x24')](function(_0x4d1a02){return _0x4d1a02;});}return null;};}function removeEntity(_0x37b4f3,_0x5e5ad4){return function(_0x597f29){if(_0x597f29){return _0x597f29['destroy']()[_0x7a4c('0x24')](function(){_0x37b4f3[_0x7a4c('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2bd6f9,_0x291cb5){return function(_0x3cb1fb){if(!_0x3cb1fb){_0x2bd6f9[_0x7a4c('0x1a')](0x194);}return _0x3cb1fb;};}function handleError(_0x4210aa,_0xf2f446){_0xf2f446=_0xf2f446||0x1f4;return function(_0x54f660){logger[_0x7a4c('0x25')](_0x54f660[_0x7a4c('0x26')]);if(_0x54f660[_0x7a4c('0x27')]){delete _0x54f660[_0x7a4c('0x27')];}_0x4210aa[_0x7a4c('0x1b')](_0xf2f446)[_0x7a4c('0x28')](_0x54f660);};}exports[_0x7a4c('0x29')]=function(_0x294b30,_0x346317){var _0x150f83={},_0x37ca3d={},_0x4e66bb={'count':0x0,'rows':[]};var _0x576178=_['map'](db['VoiceCallReport'][_0x7a4c('0x2a')],function(_0x4a6ee2){return{'name':_0x4a6ee2[_0x7a4c('0x2b')],'type':_0x4a6ee2[_0x7a4c('0x2c')][_0x7a4c('0x2d')]};});_0x37ca3d[_0x7a4c('0x2e')]=_[_0x7a4c('0x2f')](_0x576178,_0x7a4c('0x27'));_0x37ca3d['query']=_[_0x7a4c('0x30')](_0x294b30[_0x7a4c('0x31')]);_0x37ca3d[_0x7a4c('0x32')]=_['intersection'](_0x37ca3d[_0x7a4c('0x2e')],_0x37ca3d['query']);_0x150f83[_0x7a4c('0x33')]=_['intersection'](_0x37ca3d[_0x7a4c('0x2e')],qs[_0x7a4c('0x34')](_0x294b30[_0x7a4c('0x31')]['fields']));_0x150f83[_0x7a4c('0x33')]=_0x150f83[_0x7a4c('0x33')]['length']?_0x150f83[_0x7a4c('0x33')]:_0x37ca3d['model'];if(!_0x294b30['query'][_0x7a4c('0x35')](_0x7a4c('0x36'))){_0x150f83[_0x7a4c('0x1f')]=qs['limit'](_0x294b30[_0x7a4c('0x31')][_0x7a4c('0x1f')]);_0x150f83[_0x7a4c('0x1e')]=qs[_0x7a4c('0x1e')](_0x294b30[_0x7a4c('0x31')][_0x7a4c('0x1e')]);}_0x150f83[_0x7a4c('0x37')]=qs[_0x7a4c('0x38')](_0x294b30[_0x7a4c('0x31')][_0x7a4c('0x38')]);_0x150f83['where']=qs[_0x7a4c('0x32')](_[_0x7a4c('0x39')](_0x294b30[_0x7a4c('0x31')],_0x37ca3d['filters']));if(_0x294b30[_0x7a4c('0x31')][_0x7a4c('0x3a')]){_0x150f83[_0x7a4c('0x3b')]=_[_0x7a4c('0x3c')](_0x150f83[_0x7a4c('0x3b')],{'$or':_[_0x7a4c('0x2f')](_0x576178,function(_0x1c6e9d){if(_0x1c6e9d['type']!=='VIRTUAL'){var _0x315422={};_0x315422[_0x1c6e9d[_0x7a4c('0x27')]]={'$like':'%'+_0x294b30[_0x7a4c('0x31')][_0x7a4c('0x3a')]+'%'};return _0x315422;}})});}_0x150f83=_[_0x7a4c('0x3c')]({},_0x150f83,_0x294b30[_0x7a4c('0x3d')]);var _0x5da3b7={'where':_0x150f83['where']};return db[_0x7a4c('0x3e')]['count'](_0x5da3b7)[_0x7a4c('0x24')](function(_0x397a2b){_0x4e66bb[_0x7a4c('0x1d')]=_0x397a2b;if(_0x294b30[_0x7a4c('0x31')][_0x7a4c('0x3f')]){_0x150f83['include']=[{'attributes':['id',_0x7a4c('0x27'),_0x7a4c('0x40'),_0x7a4c('0x41')],'model':db['User'],'as':_0x7a4c('0x42')}];}return db[_0x7a4c('0x3e')][_0x7a4c('0x43')](_0x150f83);})[_0x7a4c('0x24')](function(_0x5205b2){_0x4e66bb['rows']=_0x5205b2;return _0x4e66bb;})[_0x7a4c('0x24')](respondWithFilteredResult(_0x346317,_0x150f83))[_0x7a4c('0x44')](handleError(_0x346317,null));};exports[_0x7a4c('0x45')]=function(_0x4413c1,_0x565caf){var _0x35a792={'raw':!![],'where':{'id':_0x4413c1[_0x7a4c('0x46')]['id']}},_0x21c0b6={};_0x21c0b6[_0x7a4c('0x2e')]=_['keys'](db[_0x7a4c('0x3e')][_0x7a4c('0x2a')]);_0x21c0b6['query']=_[_0x7a4c('0x30')](_0x4413c1['query']);_0x21c0b6[_0x7a4c('0x32')]=_['intersection'](_0x21c0b6[_0x7a4c('0x2e')],_0x21c0b6['query']);_0x35a792[_0x7a4c('0x33')]=_['intersection'](_0x21c0b6[_0x7a4c('0x2e')],qs[_0x7a4c('0x34')](_0x4413c1[_0x7a4c('0x31')][_0x7a4c('0x34')]));_0x35a792[_0x7a4c('0x33')]=_0x35a792[_0x7a4c('0x33')]['length']?_0x35a792[_0x7a4c('0x33')]:_0x21c0b6[_0x7a4c('0x2e')];if(_0x4413c1[_0x7a4c('0x31')][_0x7a4c('0x3f')]){_0x35a792[_0x7a4c('0x47')]=[{'all':!![]}];}_0x35a792=_[_0x7a4c('0x3c')]({},_0x35a792,_0x4413c1['options']);return db[_0x7a4c('0x3e')]['find'](_0x35a792)[_0x7a4c('0x24')](handleEntityNotFound(_0x565caf,null))[_0x7a4c('0x24')](respondWithResult(_0x565caf,null))['catch'](handleError(_0x565caf,null));};exports['create']=function(_0x3bc833,_0x22f225){return db[_0x7a4c('0x3e')][_0x7a4c('0x48')](_0x3bc833[_0x7a4c('0x49')],{})[_0x7a4c('0x24')](respondWithResult(_0x22f225,0xc9))[_0x7a4c('0x44')](handleError(_0x22f225,null));};exports[_0x7a4c('0x4a')]=function(_0xb4c25,_0x459cb1){return db[_0x7a4c('0x3e')][_0x7a4c('0x4b')]({'where':{'id':_0xb4c25['params']['id']}})[_0x7a4c('0x24')](handleEntityNotFound(_0x459cb1,null))['then'](removeEntity(_0x459cb1,null))[_0x7a4c('0x44')](handleError(_0x459cb1,null));};exports[_0x7a4c('0x4c')]=function(_0x3e0cc4,_0x37ee64){return db[_0x7a4c('0x3e')][_0x7a4c('0x4c')]()[_0x7a4c('0x24')](respondWithResult(_0x37ee64,null))[_0x7a4c('0x44')](handleError(_0x37ee64,null));};exports[_0x7a4c('0x23')]=function(_0x281f0e,_0x1382d8){if(_0x281f0e[_0x7a4c('0x49')][_0x7a4c('0x4d')]){delete _0x281f0e[_0x7a4c('0x49')][_0x7a4c('0x4d')];}return db[_0x7a4c('0x3e')][_0x7a4c('0x4b')]({'where':{'uniqueid':_0x281f0e[_0x7a4c('0x46')]['id'],'UserId':{'$or':[null,_0x281f0e[_0x7a4c('0x4e')]['id']]}}})[_0x7a4c('0x24')](handleEntityNotFound(_0x1382d8,null))[_0x7a4c('0x24')](saveUpdates(_0x281f0e[_0x7a4c('0x49')],null))['then'](respondWithResult(_0x1382d8,null))['catch'](handleError(_0x1382d8,null));};
\ No newline at end of file
+var _0x3c67=['jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','status','end','json','offset','limit','set','Content-Range','reject','save','then','error','stack','index','map','VoiceCallReport','rawAttributes','fieldName','type','key','name','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','sort','where','pick','filters','filter','merge','VIRTUAL','options','count','includeAll','include','fullname','User','findAll','rows','catch','find','create','body','destroy','params','describe','uniqueid','user','rimraf','moment','mustache','util','path','to-csv','lodash','squel','crypto'];(function(_0x57f921,_0x4fc8bb){var _0x2660ef=function(_0x45ba84){while(--_0x45ba84){_0x57f921['push'](_0x57f921['shift']());}};_0x2660ef(++_0x4fc8bb);}(_0x3c67,0x87));var _0x73c6=function(_0x5a776b,_0x46f785){_0x5a776b=_0x5a776b-0x0;var _0xbbef59=_0x3c67[_0x5a776b];return _0xbbef59;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x73c6('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x73c6('0x1'));var BPromise=require('bluebird');var Mustache=require(_0x73c6('0x2'));var util=require(_0x73c6('0x3'));var path=require(_0x73c6('0x4'));var sox=require('sox');var csv=require(_0x73c6('0x5'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x73c6('0x6'));var squel=require(_0x73c6('0x7'));var crypto=require(_0x73c6('0x8'));var jsforce=require(_0x73c6('0x9'));var deskjs=require(_0x73c6('0xa'));var toCsv=require(_0x73c6('0x5'));var querystring=require('querystring');var Papa=require(_0x73c6('0xb'));var Redis=require(_0x73c6('0xc'));var authService=require(_0x73c6('0xd'));var qs=require(_0x73c6('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x73c6('0xf'));var logger=require(_0x73c6('0x10'))(_0x73c6('0x11'));var utils=require('../../config/utils');var config=require(_0x73c6('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4006d3,_0x614126){_0x614126=_0x614126||0xcc;return function(_0x3b6cff){if(_0x3b6cff){return _0x4006d3[_0x73c6('0x13')](_0x614126);}return _0x4006d3[_0x73c6('0x14')](_0x614126)[_0x73c6('0x15')]();};}function respondWithResult(_0x4e5b73,_0x48f775){_0x48f775=_0x48f775||0xc8;return function(_0x136bcd){if(_0x136bcd){return _0x4e5b73[_0x73c6('0x14')](_0x48f775)[_0x73c6('0x16')](_0x136bcd);}};}function respondWithFilteredResult(_0x58d9e7,_0x475a11){return function(_0x3501a5){if(_0x3501a5){var _0x533ccf=_0x3501a5['count'],_0x40a5b1=_0x475a11[_0x73c6('0x17')],_0x33b6b1=_0x475a11[_0x73c6('0x17')]+_0x475a11[_0x73c6('0x18')],_0x7cbeb1;if(_0x33b6b1>=_0x533ccf){_0x33b6b1=_0x533ccf;_0x7cbeb1=0xc8;}else{_0x7cbeb1=0xce;}_0x58d9e7['status'](_0x7cbeb1);return _0x58d9e7[_0x73c6('0x19')](_0x73c6('0x1a'),_0x40a5b1+'-'+_0x33b6b1+'/'+_0x533ccf)['json'](_0x3501a5);}return null;};}function patchUpdates(_0x50cc87){return function(_0x19401b){try{jsonpatch['apply'](_0x19401b,_0x50cc87,!![]);}catch(_0x15d154){return BPromise[_0x73c6('0x1b')](_0x15d154);}return _0x19401b[_0x73c6('0x1c')]();};}function saveUpdates(_0x263099,_0x5d8862){return function(_0xbf0cec){if(_0xbf0cec){return _0xbf0cec['update'](_0x263099)[_0x73c6('0x1d')](function(_0x40f7ad){return _0x40f7ad;});}return null;};}function removeEntity(_0x7f3938,_0x4207e7){return function(_0x49b68c){if(_0x49b68c){return _0x49b68c['destroy']()[_0x73c6('0x1d')](function(){_0x7f3938['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x260a3a,_0x456e17){return function(_0xd671c2){if(!_0xd671c2){_0x260a3a['sendStatus'](0x194);}return _0xd671c2;};}function handleError(_0x46b77e,_0x2256c2){_0x2256c2=_0x2256c2||0x1f4;return function(_0x47b3eb){logger[_0x73c6('0x1e')](_0x47b3eb[_0x73c6('0x1f')]);if(_0x47b3eb['name']){delete _0x47b3eb['name'];}_0x46b77e[_0x73c6('0x14')](_0x2256c2)['send'](_0x47b3eb);};}exports[_0x73c6('0x20')]=function(_0x326aa8,_0x272a3c){var _0x40d9a6={},_0x12de4b={},_0x299879={'count':0x0,'rows':[]};var _0x1e3de2=_[_0x73c6('0x21')](db[_0x73c6('0x22')][_0x73c6('0x23')],function(_0x24ce87){return{'name':_0x24ce87[_0x73c6('0x24')],'type':_0x24ce87[_0x73c6('0x25')][_0x73c6('0x26')]};});_0x12de4b['model']=_['map'](_0x1e3de2,_0x73c6('0x27'));_0x12de4b[_0x73c6('0x28')]=_[_0x73c6('0x29')](_0x326aa8[_0x73c6('0x28')]);_0x12de4b['filters']=_[_0x73c6('0x2a')](_0x12de4b[_0x73c6('0x2b')],_0x12de4b[_0x73c6('0x28')]);_0x40d9a6[_0x73c6('0x2c')]=_[_0x73c6('0x2a')](_0x12de4b[_0x73c6('0x2b')],qs[_0x73c6('0x2d')](_0x326aa8[_0x73c6('0x28')][_0x73c6('0x2d')]));_0x40d9a6[_0x73c6('0x2c')]=_0x40d9a6['attributes'][_0x73c6('0x2e')]?_0x40d9a6['attributes']:_0x12de4b[_0x73c6('0x2b')];if(!_0x326aa8['query'][_0x73c6('0x2f')]('nolimit')){_0x40d9a6[_0x73c6('0x18')]=qs[_0x73c6('0x18')](_0x326aa8[_0x73c6('0x28')][_0x73c6('0x18')]);_0x40d9a6[_0x73c6('0x17')]=qs[_0x73c6('0x17')](_0x326aa8[_0x73c6('0x28')][_0x73c6('0x17')]);}_0x40d9a6['order']=qs[_0x73c6('0x30')](_0x326aa8[_0x73c6('0x28')]['sort']);_0x40d9a6[_0x73c6('0x31')]=qs['filters'](_[_0x73c6('0x32')](_0x326aa8[_0x73c6('0x28')],_0x12de4b[_0x73c6('0x33')]));if(_0x326aa8[_0x73c6('0x28')][_0x73c6('0x34')]){_0x40d9a6[_0x73c6('0x31')]=_[_0x73c6('0x35')](_0x40d9a6[_0x73c6('0x31')],{'$or':_[_0x73c6('0x21')](_0x1e3de2,function(_0x21015a){if(_0x21015a['type']!==_0x73c6('0x36')){var _0x53de15={};_0x53de15[_0x21015a['name']]={'$like':'%'+_0x326aa8[_0x73c6('0x28')][_0x73c6('0x34')]+'%'};return _0x53de15;}})});}_0x40d9a6=_['merge']({},_0x40d9a6,_0x326aa8[_0x73c6('0x37')]);var _0x20d2f5={'where':_0x40d9a6[_0x73c6('0x31')]};return db['VoiceCallReport'][_0x73c6('0x38')](_0x20d2f5)[_0x73c6('0x1d')](function(_0x2e8df3){_0x299879[_0x73c6('0x38')]=_0x2e8df3;if(_0x326aa8[_0x73c6('0x28')][_0x73c6('0x39')]){_0x40d9a6[_0x73c6('0x3a')]=[{'attributes':['id','name',_0x73c6('0x3b'),'alias'],'model':db[_0x73c6('0x3c')],'as':'User'}];}return db[_0x73c6('0x22')][_0x73c6('0x3d')](_0x40d9a6);})[_0x73c6('0x1d')](function(_0x5c3e0a){_0x299879[_0x73c6('0x3e')]=_0x5c3e0a;return _0x299879;})[_0x73c6('0x1d')](respondWithFilteredResult(_0x272a3c,_0x40d9a6))[_0x73c6('0x3f')](handleError(_0x272a3c,null));};exports['show']=function(_0x1135ec,_0x2715c7){var _0x4314cc={'raw':!![],'where':{'id':_0x1135ec['params']['id']}},_0x122fb9={};_0x122fb9[_0x73c6('0x2b')]=_[_0x73c6('0x29')](db[_0x73c6('0x22')]['rawAttributes']);_0x122fb9[_0x73c6('0x28')]=_['keys'](_0x1135ec['query']);_0x122fb9['filters']=_[_0x73c6('0x2a')](_0x122fb9['model'],_0x122fb9[_0x73c6('0x28')]);_0x4314cc[_0x73c6('0x2c')]=_[_0x73c6('0x2a')](_0x122fb9[_0x73c6('0x2b')],qs['fields'](_0x1135ec[_0x73c6('0x28')][_0x73c6('0x2d')]));_0x4314cc[_0x73c6('0x2c')]=_0x4314cc[_0x73c6('0x2c')][_0x73c6('0x2e')]?_0x4314cc[_0x73c6('0x2c')]:_0x122fb9['model'];if(_0x1135ec[_0x73c6('0x28')][_0x73c6('0x39')]){_0x4314cc['include']=[{'all':!![]}];}_0x4314cc=_[_0x73c6('0x35')]({},_0x4314cc,_0x1135ec['options']);return db[_0x73c6('0x22')][_0x73c6('0x40')](_0x4314cc)[_0x73c6('0x1d')](handleEntityNotFound(_0x2715c7,null))[_0x73c6('0x1d')](respondWithResult(_0x2715c7,null))[_0x73c6('0x3f')](handleError(_0x2715c7,null));};exports[_0x73c6('0x41')]=function(_0x4c71ea,_0x361f83){return db[_0x73c6('0x22')][_0x73c6('0x41')](_0x4c71ea[_0x73c6('0x42')],{})[_0x73c6('0x1d')](respondWithResult(_0x361f83,0xc9))[_0x73c6('0x3f')](handleError(_0x361f83,null));};exports[_0x73c6('0x43')]=function(_0x1dc6db,_0xcff311){return db[_0x73c6('0x22')][_0x73c6('0x40')]({'where':{'id':_0x1dc6db[_0x73c6('0x44')]['id']}})['then'](handleEntityNotFound(_0xcff311,null))[_0x73c6('0x1d')](removeEntity(_0xcff311,null))[_0x73c6('0x3f')](handleError(_0xcff311,null));};exports['describe']=function(_0x24640f,_0x62b32a){return db[_0x73c6('0x22')][_0x73c6('0x45')]()['then'](respondWithResult(_0x62b32a,null))[_0x73c6('0x3f')](handleError(_0x62b32a,null));};exports['update']=function(_0x1a2eb0,_0x42a7ec){if(_0x1a2eb0['body'][_0x73c6('0x46')]){delete _0x1a2eb0[_0x73c6('0x42')][_0x73c6('0x46')];}return db[_0x73c6('0x22')]['find']({'where':{'uniqueid':_0x1a2eb0[_0x73c6('0x44')]['id'],'UserId':{'$or':[null,_0x1a2eb0[_0x73c6('0x47')]['id']]}}})[_0x73c6('0x1d')](handleEntityNotFound(_0x42a7ec,null))['then'](saveUpdates(_0x1a2eb0[_0x73c6('0x42')],null))['then'](respondWithResult(_0x42a7ec,null))['catch'](handleError(_0x42a7ec,null));};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/voiceCallReport.model.js b/server/api/voiceCallReport/voiceCallReport.model.js
index cf90c9a..6115e89 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 _0xce54=['util','api','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','VoiceCallReport','report_call','lodash'];(function(_0x382c32,_0x25b179){var _0x32a8a1=function(_0x255ab0){while(--_0x255ab0){_0x382c32['push'](_0x382c32['shift']());}};_0x32a8a1(++_0x25b179);}(_0xce54,0xd7));var _0x4ce5=function(_0x3f8831,_0x320d8c){_0x3f8831=_0x3f8831-0x0;var _0x6c5cfe=_0xce54[_0x3f8831];return _0x6c5cfe;};'use strict';var _=require(_0x4ce5('0x0'));var util=require(_0x4ce5('0x1'));var logger=require('../../config/logger')(_0x4ce5('0x2'));var moment=require('moment');var BPromise=require(_0x4ce5('0x3'));var rp=require(_0x4ce5('0x4'));var fs=require('fs');var path=require(_0x4ce5('0x5'));var rimraf=require(_0x4ce5('0x6'));var config=require(_0x4ce5('0x7'));var attributes=require('./voiceCallReport.attributes');module[_0x4ce5('0x8')]=function(_0x3d939f,_0x1d88e0){return _0x3d939f[_0x4ce5('0x9')](_0x4ce5('0xa'),attributes,{'tableName':_0x4ce5('0xb'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x40cd=['util','../../config/logger','api','bluebird','rimraf','../../config/environment','./voiceCallReport.attributes','define','report_call','uniqueid','lodash'];(function(_0x4fedd4,_0x1dbf05){var _0x5dce0d=function(_0x28f99e){while(--_0x28f99e){_0x4fedd4['push'](_0x4fedd4['shift']());}};_0x5dce0d(++_0x1dbf05);}(_0x40cd,0x112));var _0xd40c=function(_0x4f1dc2,_0x385037){_0x4f1dc2=_0x4f1dc2-0x0;var _0xc5c495=_0x40cd[_0x4f1dc2];return _0xc5c495;};'use strict';var _=require(_0xd40c('0x0'));var util=require(_0xd40c('0x1'));var logger=require(_0xd40c('0x2'))(_0xd40c('0x3'));var moment=require('moment');var BPromise=require(_0xd40c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xd40c('0x5'));var config=require(_0xd40c('0x6'));var attributes=require(_0xd40c('0x7'));module['exports']=function(_0x36d3d8,_0x2f62c7){return _0x36d3d8[_0xd40c('0x8')]('VoiceCallReport',attributes,{'tableName':_0xd40c('0x9'),'paranoid':![],'indexes':[{'fields':[_0xd40c('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceCallReport/voiceCallReport.rpc.js b/server/api/voiceCallReport/voiceCallReport.rpc.js
index baf5b34..5696a0c 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 _0x7527=['error','message','result','catch','VoiceCallReport','findAll','options','raw','where','attributes','limit','include','map','model','GetVoiceCallReport','stringify','CreateVoiceCallReport','create','body','UpdateVoiceCallReport','update','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s'];(function(_0x20fb02,_0x96c029){var _0x24a33e=function(_0x4b5c8a){while(--_0x4b5c8a){_0x20fb02['push'](_0x20fb02['shift']());}};_0x24a33e(++_0x96c029);}(_0x7527,0x173));var _0x7752=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7527[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x7752('0x0'));var util=require('util');var moment=require(_0x7752('0x1'));var BPromise=require('bluebird');var rs=require(_0x7752('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7752('0x3'))['db'];var utils=require(_0x7752('0x4'));var logger=require(_0x7752('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x7752('0x6'));var client=jayson['client'][_0x7752('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4befc1,_0x19e4cf,_0xa5fdb){return new BPromise(function(_0x1d0a98,_0x465699){return client['request'](_0x4befc1,_0xa5fdb)[_0x7752('0x8')](function(_0x40dc51){logger[_0x7752('0x9')](_0x7752('0xa'),_0x19e4cf,_0x7752('0xb'));logger[_0x7752('0xc')](_0x7752('0xd'),_0x19e4cf,'request\x20sent',JSON['stringify'](_0x40dc51));if(_0x40dc51['error']){if(_0x40dc51['error']['code']===0x1f4){logger[_0x7752('0xe')](_0x7752('0xa'),_0x19e4cf,_0x40dc51[_0x7752('0xe')][_0x7752('0xf')]);return _0x465699(_0x40dc51[_0x7752('0xe')]['message']);}logger[_0x7752('0xe')](_0x7752('0xa'),_0x19e4cf,_0x40dc51['error'][_0x7752('0xf')]);return _0x1d0a98(_0x40dc51[_0x7752('0xe')][_0x7752('0xf')]);}else{logger[_0x7752('0x9')]('VoiceCallReport,\x20%s,\x20%s',_0x19e4cf,_0x7752('0xb'));_0x1d0a98(_0x40dc51[_0x7752('0x10')][_0x7752('0xf')]);}})[_0x7752('0x11')](function(_0x15f4b7){logger['error'](_0x7752('0xa'),_0x19e4cf,_0x15f4b7);_0x465699(_0x15f4b7);});});}exports['GetVoiceCallReport']=function(_0x393e3d){var _0x227725=this;return new Promise(function(_0x62df5b,_0x302634){return db[_0x7752('0x12')][_0x7752('0x13')]({'raw':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x15')]===undefined?!![]:![]:!![],'where':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x16')]||null:null,'attributes':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x17')]||null:null,'limit':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x18')]||null:null,'include':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x19')]?_[_0x7752('0x1a')](_0x393e3d[_0x7752('0x14')]['include'],function(_0x85c9f4){return{'model':db[_0x85c9f4['model']],'as':_0x85c9f4['as'],'attributes':_0x85c9f4[_0x7752('0x17')],'include':_0x85c9f4[_0x7752('0x19')]?_[_0x7752('0x1a')](_0x85c9f4[_0x7752('0x19')],function(_0x2c8c50){return{'model':db[_0x2c8c50[_0x7752('0x1b')]],'as':_0x2c8c50['as'],'attributes':_0x2c8c50[_0x7752('0x17')],'include':_0x2c8c50[_0x7752('0x19')]?_[_0x7752('0x1a')](_0x2c8c50[_0x7752('0x19')],function(_0xebdf00){return{'model':db[_0xebdf00[_0x7752('0x1b')]],'as':_0xebdf00['as'],'attributes':_0xebdf00[_0x7752('0x17')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x20ee09){logger[_0x7752('0x9')](_0x7752('0x1c'),_0x393e3d);logger[_0x7752('0xc')](_0x7752('0x1c'),_0x393e3d,JSON[_0x7752('0x1d')](_0x20ee09));_0x62df5b(_0x20ee09);})[_0x7752('0x11')](function(_0x579659){logger[_0x7752('0xe')](_0x7752('0x1c'),_0x579659[_0x7752('0xf')],_0x393e3d);_0x302634(_0x227725[_0x7752('0xe')](0x1f4,_0x579659[_0x7752('0xf')]));});});};exports[_0x7752('0x1e')]=function(_0x1d8867){var _0x428ff4=this;return new Promise(function(_0xf32cf6,_0x271abe){return db[_0x7752('0x12')][_0x7752('0x1f')](_0x1d8867[_0x7752('0x20')],{'raw':_0x1d8867[_0x7752('0x14')]?_0x1d8867[_0x7752('0x14')][_0x7752('0x15')]===undefined?!![]:![]:!![]})[_0x7752('0x8')](function(_0x447b23){logger[_0x7752('0x9')](_0x7752('0x1e'),_0x1d8867);logger[_0x7752('0xc')](_0x7752('0x1e'),_0x1d8867,JSON[_0x7752('0x1d')](_0x447b23));_0xf32cf6(_0x447b23);})[_0x7752('0x11')](function(_0x2c327a){logger['error'](_0x7752('0x1e'),_0x2c327a['message'],_0x1d8867);_0x271abe(_0x428ff4[_0x7752('0xe')](0x1f4,_0x2c327a[_0x7752('0xf')]));});});};exports[_0x7752('0x21')]=function(_0x46977b){var _0x396e=this;return new Promise(function(_0x542103,_0x5e64e3){return db['VoiceCallReport'][_0x7752('0x22')](_0x46977b[_0x7752('0x20')],{'raw':_0x46977b['options']?_0x46977b['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x46977b[_0x7752('0x14')]?_0x46977b[_0x7752('0x14')][_0x7752('0x16')]||null:null,'attributes':_0x46977b[_0x7752('0x14')]?_0x46977b[_0x7752('0x14')][_0x7752('0x17')]||null:null,'limit':_0x46977b['options']?_0x46977b[_0x7752('0x14')]['limit']||null:null})[_0x7752('0x8')](function(_0xce0bc0){logger[_0x7752('0x9')](_0x7752('0x21'),_0x46977b);logger['debug']('UpdateVoiceCallReport',_0x46977b,JSON[_0x7752('0x1d')](_0xce0bc0));_0x542103(_0xce0bc0);})[_0x7752('0x11')](function(_0x25364d){logger[_0x7752('0xe')](_0x7752('0x21'),_0x25364d[_0x7752('0xf')],_0x46977b);_0x5e64e3(_0x396e[_0x7752('0xe')](0x1f4,_0x25364d['message']));});});};
\ No newline at end of file
+var _0x660c=['where','attributes','limit','map','include','model','info','stringify','catch','CreateVoiceCallReport','VoiceCallReport','body','UpdateVoiceCallReport','raw','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','client','http','request','then','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','error','code','message','result','GetVoiceCallReport','findAll','options'];(function(_0xa599e2,_0x3046be){var _0x122f49=function(_0x4f3d6d){while(--_0x4f3d6d){_0xa599e2['push'](_0xa599e2['shift']());}};_0x122f49(++_0x3046be);}(_0x660c,0xc2));var _0xc660=function(_0x5d0ddc,_0x392c95){_0x5d0ddc=_0x5d0ddc-0x0;var _0x4726c0=_0x660c[_0x5d0ddc];return _0x4726c0;};'use strict';var _=require(_0xc660('0x0'));var util=require(_0xc660('0x1'));var moment=require(_0xc660('0x2'));var BPromise=require('bluebird');var rs=require(_0xc660('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc660('0x4'))['db'];var utils=require(_0xc660('0x5'));var logger=require(_0xc660('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc660('0x7')][_0xc660('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x7fc3a4,_0x1ef97b,_0x421db3){return new BPromise(function(_0x58d9f8,_0x585dcc){return client[_0xc660('0x9')](_0x7fc3a4,_0x421db3)[_0xc660('0xa')](function(_0x273697){logger['info'](_0xc660('0xb'),_0x1ef97b,_0xc660('0xc'));logger[_0xc660('0xd')](_0xc660('0xe'),_0x1ef97b,'request\x20sent',JSON['stringify'](_0x273697));if(_0x273697[_0xc660('0xf')]){if(_0x273697['error'][_0xc660('0x10')]===0x1f4){logger[_0xc660('0xf')]('VoiceCallReport,\x20%s,\x20%s',_0x1ef97b,_0x273697[_0xc660('0xf')]['message']);return _0x585dcc(_0x273697[_0xc660('0xf')]['message']);}logger[_0xc660('0xf')](_0xc660('0xb'),_0x1ef97b,_0x273697[_0xc660('0xf')][_0xc660('0x11')]);return _0x58d9f8(_0x273697[_0xc660('0xf')]['message']);}else{logger['info'](_0xc660('0xb'),_0x1ef97b,'request\x20sent');_0x58d9f8(_0x273697[_0xc660('0x12')][_0xc660('0x11')]);}})['catch'](function(_0x5a7a87){logger['error'](_0xc660('0xb'),_0x1ef97b,_0x5a7a87);_0x585dcc(_0x5a7a87);});});}exports[_0xc660('0x13')]=function(_0x227d18){var _0x472bf4=this;return new Promise(function(_0x49dd14,_0x5d37e8){return db['VoiceCallReport'][_0xc660('0x14')]({'raw':_0x227d18[_0xc660('0x15')]?_0x227d18[_0xc660('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x227d18['options']?_0x227d18[_0xc660('0x15')][_0xc660('0x16')]||null:null,'attributes':_0x227d18[_0xc660('0x15')]?_0x227d18[_0xc660('0x15')][_0xc660('0x17')]||null:null,'limit':_0x227d18[_0xc660('0x15')]?_0x227d18[_0xc660('0x15')][_0xc660('0x18')]||null:null,'include':_0x227d18['options']?_0x227d18[_0xc660('0x15')]['include']?_[_0xc660('0x19')](_0x227d18[_0xc660('0x15')][_0xc660('0x1a')],function(_0x131f81){return{'model':db[_0x131f81[_0xc660('0x1b')]],'as':_0x131f81['as'],'attributes':_0x131f81[_0xc660('0x17')],'include':_0x131f81['include']?_[_0xc660('0x19')](_0x131f81[_0xc660('0x1a')],function(_0x439811){return{'model':db[_0x439811[_0xc660('0x1b')]],'as':_0x439811['as'],'attributes':_0x439811[_0xc660('0x17')],'include':_0x439811[_0xc660('0x1a')]?_['map'](_0x439811['include'],function(_0x4e594e){return{'model':db[_0x4e594e[_0xc660('0x1b')]],'as':_0x4e594e['as'],'attributes':_0x4e594e[_0xc660('0x17')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xc6adf5){logger[_0xc660('0x1c')](_0xc660('0x13'),_0x227d18);logger[_0xc660('0xd')]('GetVoiceCallReport',_0x227d18,JSON[_0xc660('0x1d')](_0xc6adf5));_0x49dd14(_0xc6adf5);})[_0xc660('0x1e')](function(_0x552d41){logger['error'](_0xc660('0x13'),_0x552d41['message'],_0x227d18);_0x5d37e8(_0x472bf4['error'](0x1f4,_0x552d41[_0xc660('0x11')]));});});};exports[_0xc660('0x1f')]=function(_0x445ee4){var _0x2e9338=this;return new Promise(function(_0x3e7908,_0x550f7a){return db[_0xc660('0x20')]['create'](_0x445ee4[_0xc660('0x21')],{'raw':_0x445ee4[_0xc660('0x15')]?_0x445ee4[_0xc660('0x15')]['raw']===undefined?!![]:![]:!![]})[_0xc660('0xa')](function(_0x30eeb0){logger[_0xc660('0x1c')]('CreateVoiceCallReport',_0x445ee4);logger[_0xc660('0xd')](_0xc660('0x1f'),_0x445ee4,JSON[_0xc660('0x1d')](_0x30eeb0));_0x3e7908(_0x30eeb0);})['catch'](function(_0xabd81){logger[_0xc660('0xf')](_0xc660('0x1f'),_0xabd81[_0xc660('0x11')],_0x445ee4);_0x550f7a(_0x2e9338[_0xc660('0xf')](0x1f4,_0xabd81[_0xc660('0x11')]));});});};exports[_0xc660('0x22')]=function(_0x1f8d1a){var _0x32fce0=this;return new Promise(function(_0x18cbc6,_0x4d2197){return db[_0xc660('0x20')]['update'](_0x1f8d1a[_0xc660('0x21')],{'raw':_0x1f8d1a[_0xc660('0x15')]?_0x1f8d1a[_0xc660('0x15')][_0xc660('0x23')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1f8d1a[_0xc660('0x15')]?_0x1f8d1a[_0xc660('0x15')]['where']||null:null,'attributes':_0x1f8d1a['options']?_0x1f8d1a[_0xc660('0x15')][_0xc660('0x17')]||null:null,'limit':_0x1f8d1a[_0xc660('0x15')]?_0x1f8d1a[_0xc660('0x15')][_0xc660('0x18')]||null:null})['then'](function(_0x56a18f){logger[_0xc660('0x1c')](_0xc660('0x22'),_0x1f8d1a);logger[_0xc660('0xd')](_0xc660('0x22'),_0x1f8d1a,JSON[_0xc660('0x1d')](_0x56a18f));_0x18cbc6(_0x56a18f);})[_0xc660('0x1e')](function(_0x9dcb4){logger[_0xc660('0xf')](_0xc660('0x22'),_0x9dcb4[_0xc660('0x11')],_0x1f8d1a);_0x4d2197(_0x32fce0['error'](0x1f4,_0x9dcb4[_0xc660('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/index.js b/server/api/voiceChanSpy/index.js
index effb8d2..6881f03 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 _0xaa96=['destroy','exports','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./voiceChanSpy.controller','get','isAuthenticated','index','/:id','create','update','delete'];(function(_0x14a992,_0xadb280){var _0x209c4d=function(_0x34a10c){while(--_0x34a10c){_0x14a992['push'](_0x14a992['shift']());}};_0x209c4d(++_0xadb280);}(_0xaa96,0x145));var _0x6aa9=function(_0x4f4277,_0x3e8666){_0x4f4277=_0x4f4277-0x0;var _0xebc449=_0xaa96[_0x4f4277];return _0xebc449;};'use strict';var multer=require('multer');var util=require(_0x6aa9('0x0'));var path=require(_0x6aa9('0x1'));var timeout=require(_0x6aa9('0x2'));var express=require(_0x6aa9('0x3'));var router=express[_0x6aa9('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x6aa9('0x5'));var config=require(_0x6aa9('0x6'));var controller=require(_0x6aa9('0x7'));router[_0x6aa9('0x8')]('/',auth[_0x6aa9('0x9')](),controller[_0x6aa9('0xa')]);router[_0x6aa9('0x8')](_0x6aa9('0xb'),auth[_0x6aa9('0x9')](),controller['show']);router['post']('/',auth[_0x6aa9('0x9')](),controller[_0x6aa9('0xc')]);router['put'](_0x6aa9('0xb'),auth[_0x6aa9('0x9')](),controller[_0x6aa9('0xd')]);router[_0x6aa9('0xe')](_0x6aa9('0xb'),auth[_0x6aa9('0x9')](),controller[_0x6aa9('0xf')]);module[_0x6aa9('0x10')]=router;
\ No newline at end of file
+var _0x9388=['Router','../../components/auth/service','../../config/environment','./voiceChanSpy.controller','get','isAuthenticated','/:id','show','post','create','put','update','destroy','multer','util','path','connect-timeout','express'];(function(_0x229094,_0x5ddee6){var _0x556ff3=function(_0x28841f){while(--_0x28841f){_0x229094['push'](_0x229094['shift']());}};_0x556ff3(++_0x5ddee6);}(_0x9388,0x13f));var _0x8938=function(_0x57ffa,_0x5aba91){_0x57ffa=_0x57ffa-0x0;var _0x3eac88=_0x9388[_0x57ffa];return _0x3eac88;};'use strict';var multer=require(_0x8938('0x0'));var util=require(_0x8938('0x1'));var path=require(_0x8938('0x2'));var timeout=require(_0x8938('0x3'));var express=require(_0x8938('0x4'));var router=express[_0x8938('0x5')]();var auth=require(_0x8938('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x8938('0x7'));var controller=require(_0x8938('0x8'));router[_0x8938('0x9')]('/',auth[_0x8938('0xa')](),controller['index']);router[_0x8938('0x9')](_0x8938('0xb'),auth[_0x8938('0xa')](),controller[_0x8938('0xc')]);router[_0x8938('0xd')]('/',auth['isAuthenticated'](),controller[_0x8938('0xe')]);router[_0x8938('0xf')](_0x8938('0xb'),auth[_0x8938('0xa')](),controller[_0x8938('0x10')]);router['delete'](_0x8938('0xb'),auth[_0x8938('0xa')](),controller[_0x8938('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.attributes.js b/server/api/voiceChanSpy/voiceChanSpy.attributes.js
index 2825003..a192262 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 _0x851c=['STRING','name','options','getDataValue','BOOLEAN'];(function(_0x2555d0,_0x4150a6){var _0x3bb486=function(_0x1eb89f){while(--_0x1eb89f){_0x2555d0['push'](_0x2555d0['shift']());}};_0x3bb486(++_0x4150a6);}(_0x851c,0x177));var _0xc851=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x851c[_0x5b644e];return _0x49c6bf;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xc851('0x0')]},'prefix':{'type':Sequelize[_0xc851('0x0')],'unique':_0xc851('0x1'),'allowNull':![]},'options':{'type':Sequelize[_0xc851('0x0')],'set':function(_0x2ee1b4){this['setDataValue'](_0xc851('0x2'),_0x2ee1b4?_0x2ee1b4['join'](''):[]);},'get':function(){return this[_0xc851('0x3')](_0xc851('0x2'))?this[_0xc851('0x3')](_0xc851('0x2'))['split'](''):[];}},'auth':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'password':{'type':Sequelize['STRING']},'record':{'type':Sequelize[_0xc851('0x4')],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0xc851('0x0')]},'description':{'type':Sequelize[_0xc851('0x0')]}};
\ No newline at end of file
+var _0xa378=['name','options','join','getDataValue','split','BOOLEAN','exports','STRING'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xa378,0x8e));var _0x8a37=function(_0x1e70bd,_0x16bcbd){_0x1e70bd=_0x1e70bd-0x0;var _0x182e59=_0xa378[_0x1e70bd];return _0x182e59;};'use strict';var Sequelize=require('sequelize');module[_0x8a37('0x0')]={'name':{'type':Sequelize[_0x8a37('0x1')]},'prefix':{'type':Sequelize[_0x8a37('0x1')],'unique':_0x8a37('0x2'),'allowNull':![]},'options':{'type':Sequelize[_0x8a37('0x1')],'set':function(_0x1ac881){this['setDataValue'](_0x8a37('0x3'),_0x1ac881?_0x1ac881[_0x8a37('0x4')](''):[]);},'get':function(){return this[_0x8a37('0x5')]('options')?this[_0x8a37('0x5')](_0x8a37('0x3'))[_0x8a37('0x6')](''):[];}},'auth':{'type':Sequelize[_0x8a37('0x7')],'defaultValue':![]},'password':{'type':Sequelize['STRING']},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x8a37('0x1')]},'description':{'type':Sequelize[_0x8a37('0x1')]}};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.controller.js b/server/api/voiceChanSpy/voiceChanSpy.controller.js
index 1a6fe3a..7811ead 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 _0x3036=['keys','intersection','length','options','find','catch','create','user','role','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','html-pdf','eml-format','zip-dir','moment','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','json','count','offset','set','apply','save','update','then','destroy','get','ChanSpies','error','name','index','VoiceChanSpy','rawAttributes','fieldName','type','key','model','query','filters','attributes','fields','nolimit','limit','order','sort','where','filter','merge','VIRTUAL','includeAll','include','rows','show','params'];(function(_0x4c6d6f,_0x291557){var _0x2d4478=function(_0x106946){while(--_0x106946){_0x4c6d6f['push'](_0x4c6d6f['shift']());}};_0x2d4478(++_0x291557);}(_0x3036,0x13e));var _0x6303=function(_0x343e37,_0x1139df){_0x343e37=_0x343e37-0x0;var _0x4c76a7=_0x3036[_0x343e37];return _0x4c76a7;};'use strict';var pdf=require(_0x6303('0x0'));var emlformat=require(_0x6303('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x6303('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6303('0x3'));var BPromise=require(_0x6303('0x4'));var Mustache=require(_0x6303('0x5'));var util=require(_0x6303('0x6'));var path=require(_0x6303('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6303('0x8'));var fs=require('fs');var _=require(_0x6303('0x9'));var squel=require(_0x6303('0xa'));var crypto=require(_0x6303('0xb'));var jsforce=require(_0x6303('0xc'));var deskjs=require(_0x6303('0xd'));var toCsv=require('to-csv');var querystring=require(_0x6303('0xe'));var Papa=require(_0x6303('0xf'));var Redis=require('ioredis');var authService=require(_0x6303('0x10'));var qs=require(_0x6303('0x11'));var as=require(_0x6303('0x12'));var hardwareService=require(_0x6303('0x13'));var logger=require(_0x6303('0x14'))(_0x6303('0x15'));var utils=require(_0x6303('0x16'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x427732,_0x25318a){_0x25318a=_0x25318a||0xcc;return function(_0x70b540){if(_0x70b540){return _0x427732[_0x6303('0x17')](_0x25318a);}return _0x427732[_0x6303('0x18')](_0x25318a)['end']();};}function respondWithResult(_0x453a0e,_0x313064){_0x313064=_0x313064||0xc8;return function(_0x3e7566){if(_0x3e7566){return _0x453a0e[_0x6303('0x18')](_0x313064)[_0x6303('0x19')](_0x3e7566);}};}function respondWithFilteredResult(_0x243b94,_0x250a43){return function(_0x81be4b){if(_0x81be4b){var _0x5b69b5=_0x81be4b[_0x6303('0x1a')],_0x2da700=_0x250a43[_0x6303('0x1b')],_0x24542a=_0x250a43[_0x6303('0x1b')]+_0x250a43['limit'],_0xb12607;if(_0x24542a>=_0x5b69b5){_0x24542a=_0x5b69b5;_0xb12607=0xc8;}else{_0xb12607=0xce;}_0x243b94[_0x6303('0x18')](_0xb12607);return _0x243b94[_0x6303('0x1c')]('Content-Range',_0x2da700+'-'+_0x24542a+'/'+_0x5b69b5)[_0x6303('0x19')](_0x81be4b);}return null;};}function patchUpdates(_0x530926){return function(_0x5851df){try{jsonpatch[_0x6303('0x1d')](_0x5851df,_0x530926,!![]);}catch(_0xe59002){return BPromise['reject'](_0xe59002);}return _0x5851df[_0x6303('0x1e')]();};}function saveUpdates(_0x33fa66,_0x4d9e17){return function(_0x1c2b4){if(_0x1c2b4){return _0x1c2b4[_0x6303('0x1f')](_0x33fa66)[_0x6303('0x20')](function(_0x5e4c0e){return _0x5e4c0e;});}return null;};}function removeEntity(_0xf4e54c,_0x2181f2){return function(_0x17ed09){if(_0x17ed09){return _0x17ed09[_0x6303('0x21')]()[_0x6303('0x20')](function(){var _0xe9f832=_0x17ed09[_0x6303('0x22')]({'plain':!![]});var _0x54a671=_0x6303('0x23');return db['UserProfileResource']['destroy']({'where':{'type':_0x54a671,'resourceId':_0xe9f832['id']}})[_0x6303('0x20')](function(){return _0x17ed09;});})[_0x6303('0x20')](function(){_0xf4e54c[_0x6303('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2e125b,_0x385363){return function(_0xd8eff6){if(!_0xd8eff6){_0x2e125b[_0x6303('0x17')](0x194);}return _0xd8eff6;};}function handleError(_0x4624e6,_0x2bb4ec){_0x2bb4ec=_0x2bb4ec||0x1f4;return function(_0x13f4c5){logger[_0x6303('0x24')](_0x13f4c5['stack']);if(_0x13f4c5['name']){delete _0x13f4c5[_0x6303('0x25')];}_0x4624e6[_0x6303('0x18')](_0x2bb4ec)['send'](_0x13f4c5);};}exports[_0x6303('0x26')]=function(_0x9589ee,_0x579081){var _0x3da2c2={},_0x33bd61={},_0x14c586={'count':0x0,'rows':[]};var _0x506bc9=_['map'](db[_0x6303('0x27')][_0x6303('0x28')],function(_0x51f126){return{'name':_0x51f126[_0x6303('0x29')],'type':_0x51f126[_0x6303('0x2a')][_0x6303('0x2b')]};});_0x33bd61[_0x6303('0x2c')]=_['map'](_0x506bc9,_0x6303('0x25'));_0x33bd61[_0x6303('0x2d')]=_['keys'](_0x9589ee[_0x6303('0x2d')]);_0x33bd61[_0x6303('0x2e')]=_['intersection'](_0x33bd61[_0x6303('0x2c')],_0x33bd61[_0x6303('0x2d')]);_0x3da2c2[_0x6303('0x2f')]=_['intersection'](_0x33bd61['model'],qs[_0x6303('0x30')](_0x9589ee[_0x6303('0x2d')][_0x6303('0x30')]));_0x3da2c2[_0x6303('0x2f')]=_0x3da2c2[_0x6303('0x2f')]['length']?_0x3da2c2['attributes']:_0x33bd61[_0x6303('0x2c')];if(!_0x9589ee[_0x6303('0x2d')]['hasOwnProperty'](_0x6303('0x31'))){_0x3da2c2[_0x6303('0x32')]=qs[_0x6303('0x32')](_0x9589ee['query'][_0x6303('0x32')]);_0x3da2c2['offset']=qs[_0x6303('0x1b')](_0x9589ee[_0x6303('0x2d')][_0x6303('0x1b')]);}_0x3da2c2[_0x6303('0x33')]=qs['sort'](_0x9589ee[_0x6303('0x2d')][_0x6303('0x34')]);_0x3da2c2[_0x6303('0x35')]=qs[_0x6303('0x2e')](_['pick'](_0x9589ee[_0x6303('0x2d')],_0x33bd61['filters']));if(_0x9589ee['query'][_0x6303('0x36')]){_0x3da2c2[_0x6303('0x35')]=_[_0x6303('0x37')](_0x3da2c2['where'],{'$or':_['map'](_0x506bc9,function(_0x6f6903){if(_0x6f6903[_0x6303('0x2a')]!==_0x6303('0x38')){var _0xe91bd9={};_0xe91bd9[_0x6f6903[_0x6303('0x25')]]={'$like':'%'+_0x9589ee['query']['filter']+'%'};return _0xe91bd9;}})});}_0x3da2c2=_[_0x6303('0x37')]({},_0x3da2c2,_0x9589ee['options']);var _0x39dab0={'where':_0x3da2c2['where']};return db[_0x6303('0x27')][_0x6303('0x1a')](_0x39dab0)[_0x6303('0x20')](function(_0x23c6ec){_0x14c586[_0x6303('0x1a')]=_0x23c6ec;if(_0x9589ee[_0x6303('0x2d')][_0x6303('0x39')]){_0x3da2c2[_0x6303('0x3a')]=[{'all':!![]}];}return db[_0x6303('0x27')]['findAll'](_0x3da2c2);})[_0x6303('0x20')](function(_0x34609b){_0x14c586[_0x6303('0x3b')]=_0x34609b;return _0x14c586;})[_0x6303('0x20')](respondWithFilteredResult(_0x579081,_0x3da2c2))['catch'](handleError(_0x579081,null));};exports[_0x6303('0x3c')]=function(_0x399d5b,_0x1f45ad){var _0x224ec4={'raw':![],'where':{'id':_0x399d5b[_0x6303('0x3d')]['id']}},_0x1279ca={};_0x1279ca[_0x6303('0x2c')]=_[_0x6303('0x3e')](db[_0x6303('0x27')][_0x6303('0x28')]);_0x1279ca[_0x6303('0x2d')]=_['keys'](_0x399d5b[_0x6303('0x2d')]);_0x1279ca['filters']=_[_0x6303('0x3f')](_0x1279ca[_0x6303('0x2c')],_0x1279ca['query']);_0x224ec4[_0x6303('0x2f')]=_[_0x6303('0x3f')](_0x1279ca[_0x6303('0x2c')],qs[_0x6303('0x30')](_0x399d5b[_0x6303('0x2d')]['fields']));_0x224ec4[_0x6303('0x2f')]=_0x224ec4[_0x6303('0x2f')][_0x6303('0x40')]?_0x224ec4[_0x6303('0x2f')]:_0x1279ca[_0x6303('0x2c')];if(_0x399d5b[_0x6303('0x2d')]['includeAll']){_0x224ec4[_0x6303('0x3a')]=[{'all':!![]}];}_0x224ec4=_[_0x6303('0x37')]({},_0x224ec4,_0x399d5b[_0x6303('0x41')]);return db[_0x6303('0x27')][_0x6303('0x42')](_0x224ec4)[_0x6303('0x20')](handleEntityNotFound(_0x1f45ad,null))[_0x6303('0x20')](respondWithResult(_0x1f45ad,null))[_0x6303('0x43')](handleError(_0x1f45ad,null));};exports[_0x6303('0x44')]=function(_0x316d38,_0x42f2b8){return db['VoiceChanSpy']['create'](_0x316d38['body'],{})[_0x6303('0x20')](function(_0x4bfba0){var _0x58ee87=_0x316d38[_0x6303('0x45')][_0x6303('0x22')]({'plain':!![]});if(!_0x58ee87)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x58ee87[_0x6303('0x46')]==='user'){var _0xe5ff42=_0x4bfba0[_0x6303('0x22')]({'plain':!![]});var _0x3b6e61=_0x6303('0x23');return db['UserProfileSection']['find']({'where':{'name':_0x3b6e61,'userProfileId':_0x58ee87[_0x6303('0x47')]},'raw':!![]})[_0x6303('0x20')](function(_0x506f6a){if(_0x506f6a&&_0x506f6a[_0x6303('0x48')]===0x0){return db[_0x6303('0x49')][_0x6303('0x44')]({'name':_0xe5ff42[_0x6303('0x25')],'resourceId':_0xe5ff42['id'],'type':_0x506f6a[_0x6303('0x25')],'sectionId':_0x506f6a['id']},{})['then'](function(){return _0x4bfba0;});}else{return _0x4bfba0;}})[_0x6303('0x43')](function(_0x5445d7){logger['error'](_0x6303('0x4a'),_0x5445d7);throw _0x5445d7;});}return _0x4bfba0;})[_0x6303('0x20')](respondWithResult(_0x42f2b8,0xc9))[_0x6303('0x43')](handleError(_0x42f2b8,null));};exports[_0x6303('0x1f')]=function(_0x52f7cb,_0x6adb72){if(_0x52f7cb['body']['id']){delete _0x52f7cb['body']['id'];}return db[_0x6303('0x27')][_0x6303('0x42')]({'where':{'id':_0x52f7cb[_0x6303('0x3d')]['id']}})[_0x6303('0x20')](handleEntityNotFound(_0x6adb72,null))[_0x6303('0x20')](saveUpdates(_0x52f7cb[_0x6303('0x4b')],null))['then'](respondWithResult(_0x6adb72,null))[_0x6303('0x43')](handleError(_0x6adb72,null));};exports[_0x6303('0x21')]=function(_0x403405,_0x52525f){return db[_0x6303('0x27')]['find']({'where':{'id':_0x403405['params']['id']}})[_0x6303('0x20')](handleEntityNotFound(_0x52525f,null))[_0x6303('0x20')](removeEntity(_0x52525f,null))[_0x6303('0x43')](handleError(_0x52525f,null));};
\ No newline at end of file
+var _0x7d79=['catch','show','params','intersection','create','body','user','role','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','path','to-csv','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','limit','set','Content-Range','apply','reject','update','then','destroy','get','ChanSpies','error','stack','name','index','VoiceChanSpy','rawAttributes','fieldName','type','key','model','map','keys','query','filters','fields','attributes','length','hasOwnProperty','nolimit','offset','order','sort','where','filter','merge','VIRTUAL','options','count','include','findAll','rows'];(function(_0xe11966,_0x455d9d){var _0x2fa7e1=function(_0x5194b8){while(--_0x5194b8){_0xe11966['push'](_0xe11966['shift']());}};_0x2fa7e1(++_0x455d9d);}(_0x7d79,0xa6));var _0x97d7=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x7d79[_0x20a584];return _0x4b41a8;};'use strict';var pdf=require(_0x97d7('0x0'));var emlformat=require(_0x97d7('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x97d7('0x2'));var jsonpatch=require(_0x97d7('0x3'));var rp=require(_0x97d7('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x97d7('0x5'));var sox=require('sox');var csv=require(_0x97d7('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x97d7('0x7'));var squel=require('squel');var crypto=require(_0x97d7('0x8'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x97d7('0x6'));var querystring=require(_0x97d7('0x9'));var Papa=require(_0x97d7('0xa'));var Redis=require(_0x97d7('0xb'));var authService=require(_0x97d7('0xc'));var qs=require(_0x97d7('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x97d7('0xe'));var logger=require(_0x97d7('0xf'))(_0x97d7('0x10'));var utils=require(_0x97d7('0x11'));var config=require(_0x97d7('0x12'));var db=require(_0x97d7('0x13'))['db'];function respondWithStatusCode(_0xcb158d,_0x11d986){_0x11d986=_0x11d986||0xcc;return function(_0x198aa7){if(_0x198aa7){return _0xcb158d[_0x97d7('0x14')](_0x11d986);}return _0xcb158d[_0x97d7('0x15')](_0x11d986)[_0x97d7('0x16')]();};}function respondWithResult(_0x1c3c95,_0x5dcf50){_0x5dcf50=_0x5dcf50||0xc8;return function(_0xa4014){if(_0xa4014){return _0x1c3c95[_0x97d7('0x15')](_0x5dcf50)[_0x97d7('0x17')](_0xa4014);}};}function respondWithFilteredResult(_0x1b673a,_0x45276f){return function(_0xa62ed9){if(_0xa62ed9){var _0x56ece3=_0xa62ed9['count'],_0x4cff14=_0x45276f['offset'],_0x1dbcd6=_0x45276f['offset']+_0x45276f[_0x97d7('0x18')],_0x5e23ba;if(_0x1dbcd6>=_0x56ece3){_0x1dbcd6=_0x56ece3;_0x5e23ba=0xc8;}else{_0x5e23ba=0xce;}_0x1b673a[_0x97d7('0x15')](_0x5e23ba);return _0x1b673a[_0x97d7('0x19')](_0x97d7('0x1a'),_0x4cff14+'-'+_0x1dbcd6+'/'+_0x56ece3)[_0x97d7('0x17')](_0xa62ed9);}return null;};}function patchUpdates(_0x51819f){return function(_0xd4a4b3){try{jsonpatch[_0x97d7('0x1b')](_0xd4a4b3,_0x51819f,!![]);}catch(_0x4b3d4c){return BPromise[_0x97d7('0x1c')](_0x4b3d4c);}return _0xd4a4b3['save']();};}function saveUpdates(_0x14d085,_0x9f6df7){return function(_0x253b1b){if(_0x253b1b){return _0x253b1b[_0x97d7('0x1d')](_0x14d085)[_0x97d7('0x1e')](function(_0x1a0134){return _0x1a0134;});}return null;};}function removeEntity(_0x492250,_0x558988){return function(_0x4a346b){if(_0x4a346b){return _0x4a346b[_0x97d7('0x1f')]()[_0x97d7('0x1e')](function(){var _0x3d5c5d=_0x4a346b[_0x97d7('0x20')]({'plain':!![]});var _0x16278f=_0x97d7('0x21');return db['UserProfileResource'][_0x97d7('0x1f')]({'where':{'type':_0x16278f,'resourceId':_0x3d5c5d['id']}})[_0x97d7('0x1e')](function(){return _0x4a346b;});})['then'](function(){_0x492250['status'](0xcc)[_0x97d7('0x16')]();});}};}function handleEntityNotFound(_0x250f0c,_0xc65389){return function(_0x39461d){if(!_0x39461d){_0x250f0c['sendStatus'](0x194);}return _0x39461d;};}function handleError(_0x183413,_0x5658c3){_0x5658c3=_0x5658c3||0x1f4;return function(_0x50292e){logger[_0x97d7('0x22')](_0x50292e[_0x97d7('0x23')]);if(_0x50292e['name']){delete _0x50292e[_0x97d7('0x24')];}_0x183413['status'](_0x5658c3)['send'](_0x50292e);};}exports[_0x97d7('0x25')]=function(_0x449899,_0x248a6b){var _0x156877={},_0x14fc4a={},_0x365883={'count':0x0,'rows':[]};var _0x371d91=_['map'](db[_0x97d7('0x26')][_0x97d7('0x27')],function(_0x5ae4d6){return{'name':_0x5ae4d6[_0x97d7('0x28')],'type':_0x5ae4d6[_0x97d7('0x29')][_0x97d7('0x2a')]};});_0x14fc4a[_0x97d7('0x2b')]=_[_0x97d7('0x2c')](_0x371d91,'name');_0x14fc4a['query']=_[_0x97d7('0x2d')](_0x449899[_0x97d7('0x2e')]);_0x14fc4a[_0x97d7('0x2f')]=_['intersection'](_0x14fc4a[_0x97d7('0x2b')],_0x14fc4a[_0x97d7('0x2e')]);_0x156877['attributes']=_['intersection'](_0x14fc4a[_0x97d7('0x2b')],qs[_0x97d7('0x30')](_0x449899['query'][_0x97d7('0x30')]));_0x156877[_0x97d7('0x31')]=_0x156877[_0x97d7('0x31')][_0x97d7('0x32')]?_0x156877[_0x97d7('0x31')]:_0x14fc4a['model'];if(!_0x449899['query'][_0x97d7('0x33')](_0x97d7('0x34'))){_0x156877[_0x97d7('0x18')]=qs[_0x97d7('0x18')](_0x449899['query'][_0x97d7('0x18')]);_0x156877['offset']=qs['offset'](_0x449899[_0x97d7('0x2e')][_0x97d7('0x35')]);}_0x156877[_0x97d7('0x36')]=qs[_0x97d7('0x37')](_0x449899[_0x97d7('0x2e')][_0x97d7('0x37')]);_0x156877[_0x97d7('0x38')]=qs[_0x97d7('0x2f')](_['pick'](_0x449899[_0x97d7('0x2e')],_0x14fc4a[_0x97d7('0x2f')]));if(_0x449899[_0x97d7('0x2e')][_0x97d7('0x39')]){_0x156877[_0x97d7('0x38')]=_[_0x97d7('0x3a')](_0x156877['where'],{'$or':_[_0x97d7('0x2c')](_0x371d91,function(_0x42163f){if(_0x42163f[_0x97d7('0x29')]!==_0x97d7('0x3b')){var _0x15e1b2={};_0x15e1b2[_0x42163f[_0x97d7('0x24')]]={'$like':'%'+_0x449899['query'][_0x97d7('0x39')]+'%'};return _0x15e1b2;}})});}_0x156877=_[_0x97d7('0x3a')]({},_0x156877,_0x449899[_0x97d7('0x3c')]);var _0x166b76={'where':_0x156877[_0x97d7('0x38')]};return db[_0x97d7('0x26')][_0x97d7('0x3d')](_0x166b76)[_0x97d7('0x1e')](function(_0x955f07){_0x365883[_0x97d7('0x3d')]=_0x955f07;if(_0x449899[_0x97d7('0x2e')]['includeAll']){_0x156877[_0x97d7('0x3e')]=[{'all':!![]}];}return db['VoiceChanSpy'][_0x97d7('0x3f')](_0x156877);})['then'](function(_0x26d45b){_0x365883[_0x97d7('0x40')]=_0x26d45b;return _0x365883;})['then'](respondWithFilteredResult(_0x248a6b,_0x156877))[_0x97d7('0x41')](handleError(_0x248a6b,null));};exports[_0x97d7('0x42')]=function(_0x2c112c,_0x37b2e5){var _0x3cc5f6={'raw':![],'where':{'id':_0x2c112c[_0x97d7('0x43')]['id']}},_0xfcd44f={};_0xfcd44f[_0x97d7('0x2b')]=_[_0x97d7('0x2d')](db[_0x97d7('0x26')][_0x97d7('0x27')]);_0xfcd44f['query']=_[_0x97d7('0x2d')](_0x2c112c[_0x97d7('0x2e')]);_0xfcd44f[_0x97d7('0x2f')]=_[_0x97d7('0x44')](_0xfcd44f[_0x97d7('0x2b')],_0xfcd44f[_0x97d7('0x2e')]);_0x3cc5f6[_0x97d7('0x31')]=_['intersection'](_0xfcd44f[_0x97d7('0x2b')],qs[_0x97d7('0x30')](_0x2c112c[_0x97d7('0x2e')]['fields']));_0x3cc5f6['attributes']=_0x3cc5f6[_0x97d7('0x31')][_0x97d7('0x32')]?_0x3cc5f6['attributes']:_0xfcd44f[_0x97d7('0x2b')];if(_0x2c112c['query']['includeAll']){_0x3cc5f6[_0x97d7('0x3e')]=[{'all':!![]}];}_0x3cc5f6=_[_0x97d7('0x3a')]({},_0x3cc5f6,_0x2c112c[_0x97d7('0x3c')]);return db[_0x97d7('0x26')]['find'](_0x3cc5f6)['then'](handleEntityNotFound(_0x37b2e5,null))[_0x97d7('0x1e')](respondWithResult(_0x37b2e5,null))['catch'](handleError(_0x37b2e5,null));};exports[_0x97d7('0x45')]=function(_0x4cd2c2,_0x2d94eb){return db[_0x97d7('0x26')][_0x97d7('0x45')](_0x4cd2c2[_0x97d7('0x46')],{})[_0x97d7('0x1e')](function(_0x207d26){var _0x38d2b5=_0x4cd2c2[_0x97d7('0x47')][_0x97d7('0x20')]({'plain':!![]});if(!_0x38d2b5)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x38d2b5[_0x97d7('0x48')]===_0x97d7('0x47')){var _0x3c588b=_0x207d26[_0x97d7('0x20')]({'plain':!![]});var _0xf40ef8='ChanSpies';return db['UserProfileSection']['find']({'where':{'name':_0xf40ef8,'userProfileId':_0x38d2b5[_0x97d7('0x49')]},'raw':!![]})[_0x97d7('0x1e')](function(_0x41202a){if(_0x41202a&&_0x41202a['autoAssociation']===0x0){return db[_0x97d7('0x4a')]['create']({'name':_0x3c588b[_0x97d7('0x24')],'resourceId':_0x3c588b['id'],'type':_0x41202a[_0x97d7('0x24')],'sectionId':_0x41202a['id']},{})[_0x97d7('0x1e')](function(){return _0x207d26;});}else{return _0x207d26;}})['catch'](function(_0xcffe0a){logger['error'](_0x97d7('0x4b'),_0xcffe0a);throw _0xcffe0a;});}return _0x207d26;})[_0x97d7('0x1e')](respondWithResult(_0x2d94eb,0xc9))['catch'](handleError(_0x2d94eb,null));};exports[_0x97d7('0x1d')]=function(_0x609199,_0x2fe10d){if(_0x609199[_0x97d7('0x46')]['id']){delete _0x609199[_0x97d7('0x46')]['id'];}return db[_0x97d7('0x26')][_0x97d7('0x4c')]({'where':{'id':_0x609199[_0x97d7('0x43')]['id']}})[_0x97d7('0x1e')](handleEntityNotFound(_0x2fe10d,null))[_0x97d7('0x1e')](saveUpdates(_0x609199[_0x97d7('0x46')],null))[_0x97d7('0x1e')](respondWithResult(_0x2fe10d,null))['catch'](handleError(_0x2fe10d,null));};exports[_0x97d7('0x1f')]=function(_0x32b12,_0x407892){return db[_0x97d7('0x26')]['find']({'where':{'id':_0x32b12['params']['id']}})[_0x97d7('0x1e')](handleEntityNotFound(_0x407892,null))['then'](removeEntity(_0x407892,null))[_0x97d7('0x41')](handleError(_0x407892,null));};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.model.js b/server/api/voiceChanSpy/voiceChanSpy.model.js
index f010112..158340e 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 _0xf2c5=['then','catch','models','define','voice_chanspy','VoiceExtension','bulkCreate','destroy','lodash','bluebird','./voiceChanSpy.attributes','format','%s%s','system','merge','Set','chanspy','record','MixMonitor','auth','Authenticate','password','push','ChanSpy','SIP/%s,%s','name','options','length','concat','internal','findAll','agent'];(function(_0x58c04c,_0x13fce4){var _0x5d10a7=function(_0x20adec){while(--_0x20adec){_0x58c04c['push'](_0x58c04c['shift']());}};_0x5d10a7(++_0x13fce4);}(_0xf2c5,0x1a8));var _0x5f2c=function(_0x17a13d,_0x475f60){_0x17a13d=_0x17a13d-0x0;var _0x31ac35=_0xf2c5[_0x17a13d];return _0x31ac35;};'use strict';var _=require(_0x5f2c('0x0'));var util=require('util');var BPromise=require(_0x5f2c('0x1'));var attributes=require(_0x5f2c('0x2'));var getUserApplications=function(_0x19f8a0,_0x3103d9,_0x42aa15){var _0x5ed2fe=0x1;var _0x28a10f=[];var _0xcd41f4={'context':_0x3103d9['context']||'from-sip','exten':util[_0x5f2c('0x3')](_0x5f2c('0x4'),_0x19f8a0['prefix'],_0x42aa15),'type':_0x5f2c('0x5'),'isApp':![],'ChanSpyId':_0x19f8a0['id'],'UserId':_0x3103d9['id']};_0x28a10f['push'](_[_0x5f2c('0x6')]({'app':_0x5f2c('0x7'),'appdata':util['format']('CDR(type)=%s',_0x5f2c('0x8')),'priority':_0x5ed2fe++},_0xcd41f4));if(_0x19f8a0[_0x5f2c('0x9')]){_0x28a10f['push'](_['merge']({'app':_0x5f2c('0xa'),'appdata':util[_0x5f2c('0x3')]('${UNIQUEID}.%s,ab',_0x19f8a0['recordingFormat']),'priority':_0x5ed2fe++},_0xcd41f4));}if(_0x19f8a0[_0x5f2c('0xb')]){_0x28a10f['push'](_[_0x5f2c('0x6')]({'app':_0x5f2c('0xc'),'appdata':_0x19f8a0[_0x5f2c('0xd')],'priority':_0x5ed2fe++},_0xcd41f4));}_0x28a10f[_0x5f2c('0xe')](_[_0x5f2c('0x6')]({'app':_0x5f2c('0xf'),'appdata':util[_0x5f2c('0x3')](_0x5f2c('0x10'),_0x3103d9[_0x5f2c('0x11')],_0x19f8a0['options']?_0x19f8a0[_0x5f2c('0x12')]['join'](''):''),'priority':_0x5ed2fe++},_0xcd41f4));if(_0x19f8a0[_0x5f2c('0x9')]){_0x28a10f[_0x5f2c('0xe')](_['merge']({'app':'StopMixMonitor','priority':_0x5ed2fe++},_0xcd41f4));}return _0x28a10f;};var getChanSpyApplications=function(_0x39ac59,_0x1255f7){var _0x43dbb7=[];for(var _0x42ead1=0x0,_0x5756da=0x1;_0x42ead1<_0x1255f7[_0x5f2c('0x13')];_0x42ead1++,_0x5756da=0x1){_0x43dbb7=_0x43dbb7[_0x5f2c('0x14')](getUserApplications(_0x39ac59,_0x1255f7[_0x42ead1],_0x1255f7[_0x42ead1][_0x5f2c('0x15')]));if(_0x1255f7[_0x42ead1]['internal']!=_0x1255f7[_0x42ead1][_0x5f2c('0x11')]){_0x43dbb7=_0x43dbb7[_0x5f2c('0x14')](getUserApplications(_0x39ac59,_0x1255f7[_0x42ead1],_0x1255f7[_0x42ead1][_0x5f2c('0x11')]));}}return _0x43dbb7;};var getChanSpyPromise=function(_0x349b7a,_0x1c2c0a){return new BPromise(function(_0x3a08f5,_0x34c4ea){return _0x349b7a['User'][_0x5f2c('0x16')]({'attributes':['id',_0x5f2c('0x11'),_0x5f2c('0x15')],'where':{'role':_0x5f2c('0x17'),'chanspy':!![]},'raw':!![]})[_0x5f2c('0x18')](function(_0x5b527a){if(_0x5b527a){return _0x3a08f5(getChanSpyApplications(_0x1c2c0a,_0x5b527a));}return _0x3a08f5([]);})[_0x5f2c('0x19')](function(_0x13a240){_0x34c4ea(_0x13a240);});});};module['exports']=function(_0x195aca,_0x1c2707){var _0x300886=_0x195aca[_0x5f2c('0x1a')];return _0x195aca[_0x5f2c('0x1b')]('VoiceChanSpy',attributes,{'tableName':_0x5f2c('0x1c'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x297572,_0x335b2f,_0x18c598){return getChanSpyPromise(_0x300886,_0x297572)[_0x5f2c('0x18')](function(_0x295627){if(_0x295627&&_0x295627[_0x5f2c('0x13')]){return _0x300886[_0x5f2c('0x1d')][_0x5f2c('0x1e')](_0x295627);}})['then'](function(){_0x18c598();})['catch'](function(_0x20cda9){_0x18c598(_0x20cda9);});},'afterUpdate':function(_0xb07938,_0x2265ec,_0x415b38){return _0x300886['VoiceExtension']['destroy']({'where':{'ChanSpyId':_0xb07938['id']}})[_0x5f2c('0x18')](function(){return getChanSpyPromise(_0x300886,_0xb07938);})[_0x5f2c('0x18')](function(_0x28df24){if(_0x28df24&&_0x28df24[_0x5f2c('0x13')]){return _0x300886[_0x5f2c('0x1d')][_0x5f2c('0x1e')](_0x28df24);}})['then'](function(){_0x415b38();})[_0x5f2c('0x19')](function(_0x983691){_0x415b38(_0x983691);});},'afterDestroy':function(_0x532f2e,_0xb4071c,_0x11d295){return _0x300886['VoiceExtension'][_0x5f2c('0x1f')]({'where':{'ChanSpyId':_0x532f2e['id']}})[_0x5f2c('0x18')](function(){_0x11d295();})[_0x5f2c('0x19')](function(_0x218188){_0x11d295(_0x218188);});}}});};
\ No newline at end of file
+var _0x28bf=['lodash','./voiceChanSpy.attributes','context','from-sip','format','%s%s','system','push','merge','Set','CDR(type)=%s','chanspy','record','MixMonitor','auth','Authenticate','password','ChanSpy','SIP/%s,%s','name','options','join','StopMixMonitor','internal','concat','findAll','then','exports','models','VoiceChanSpy','voice_chanspy','bulkCreate','catch','VoiceExtension','destroy','length'];(function(_0x5c7865,_0x58af82){var _0x197f0e=function(_0x1594d7){while(--_0x1594d7){_0x5c7865['push'](_0x5c7865['shift']());}};_0x197f0e(++_0x58af82);}(_0x28bf,0xfc));var _0xf28b=function(_0x572288,_0x582c20){_0x572288=_0x572288-0x0;var _0x5bd358=_0x28bf[_0x572288];return _0x5bd358;};'use strict';var _=require(_0xf28b('0x0'));var util=require('util');var BPromise=require('bluebird');var attributes=require(_0xf28b('0x1'));var getUserApplications=function(_0x30d965,_0x4845ce,_0x3ed733){var _0x2e479c=0x1;var _0xb3bb4d=[];var _0x2b3a91={'context':_0x4845ce[_0xf28b('0x2')]||_0xf28b('0x3'),'exten':util[_0xf28b('0x4')](_0xf28b('0x5'),_0x30d965['prefix'],_0x3ed733),'type':_0xf28b('0x6'),'isApp':![],'ChanSpyId':_0x30d965['id'],'UserId':_0x4845ce['id']};_0xb3bb4d[_0xf28b('0x7')](_[_0xf28b('0x8')]({'app':_0xf28b('0x9'),'appdata':util[_0xf28b('0x4')](_0xf28b('0xa'),_0xf28b('0xb')),'priority':_0x2e479c++},_0x2b3a91));if(_0x30d965[_0xf28b('0xc')]){_0xb3bb4d[_0xf28b('0x7')](_['merge']({'app':_0xf28b('0xd'),'appdata':util[_0xf28b('0x4')]('${UNIQUEID}.%s,ab',_0x30d965['recordingFormat']),'priority':_0x2e479c++},_0x2b3a91));}if(_0x30d965[_0xf28b('0xe')]){_0xb3bb4d[_0xf28b('0x7')](_[_0xf28b('0x8')]({'app':_0xf28b('0xf'),'appdata':_0x30d965[_0xf28b('0x10')],'priority':_0x2e479c++},_0x2b3a91));}_0xb3bb4d['push'](_[_0xf28b('0x8')]({'app':_0xf28b('0x11'),'appdata':util[_0xf28b('0x4')](_0xf28b('0x12'),_0x4845ce[_0xf28b('0x13')],_0x30d965[_0xf28b('0x14')]?_0x30d965[_0xf28b('0x14')][_0xf28b('0x15')](''):''),'priority':_0x2e479c++},_0x2b3a91));if(_0x30d965[_0xf28b('0xc')]){_0xb3bb4d[_0xf28b('0x7')](_['merge']({'app':_0xf28b('0x16'),'priority':_0x2e479c++},_0x2b3a91));}return _0xb3bb4d;};var getChanSpyApplications=function(_0x592b57,_0x270018){var _0x1c8908=[];for(var _0x43141b=0x0,_0x101f3e=0x1;_0x43141b<_0x270018['length'];_0x43141b++,_0x101f3e=0x1){_0x1c8908=_0x1c8908['concat'](getUserApplications(_0x592b57,_0x270018[_0x43141b],_0x270018[_0x43141b]['internal']));if(_0x270018[_0x43141b][_0xf28b('0x17')]!=_0x270018[_0x43141b][_0xf28b('0x13')]){_0x1c8908=_0x1c8908[_0xf28b('0x18')](getUserApplications(_0x592b57,_0x270018[_0x43141b],_0x270018[_0x43141b][_0xf28b('0x13')]));}}return _0x1c8908;};var getChanSpyPromise=function(_0x33d2d0,_0x502d0e){return new BPromise(function(_0x276787,_0x54ab7b){return _0x33d2d0['User'][_0xf28b('0x19')]({'attributes':['id',_0xf28b('0x13'),_0xf28b('0x17')],'where':{'role':'agent','chanspy':!![]},'raw':!![]})[_0xf28b('0x1a')](function(_0x5663fa){if(_0x5663fa){return _0x276787(getChanSpyApplications(_0x502d0e,_0x5663fa));}return _0x276787([]);})['catch'](function(_0x21c38b){_0x54ab7b(_0x21c38b);});});};module[_0xf28b('0x1b')]=function(_0xc326d3,_0x5a9453){var _0x354362=_0xc326d3[_0xf28b('0x1c')];return _0xc326d3['define'](_0xf28b('0x1d'),attributes,{'tableName':_0xf28b('0x1e'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x34b5ad,_0x3dd50f,_0x4a3027){return getChanSpyPromise(_0x354362,_0x34b5ad)[_0xf28b('0x1a')](function(_0x54facd){if(_0x54facd&&_0x54facd['length']){return _0x354362['VoiceExtension'][_0xf28b('0x1f')](_0x54facd);}})[_0xf28b('0x1a')](function(){_0x4a3027();})[_0xf28b('0x20')](function(_0x7919f8){_0x4a3027(_0x7919f8);});},'afterUpdate':function(_0x3f4924,_0x2bdef2,_0x343671){return _0x354362[_0xf28b('0x21')][_0xf28b('0x22')]({'where':{'ChanSpyId':_0x3f4924['id']}})[_0xf28b('0x1a')](function(){return getChanSpyPromise(_0x354362,_0x3f4924);})[_0xf28b('0x1a')](function(_0x238a53){if(_0x238a53&&_0x238a53[_0xf28b('0x23')]){return _0x354362[_0xf28b('0x21')][_0xf28b('0x1f')](_0x238a53);}})[_0xf28b('0x1a')](function(){_0x343671();})[_0xf28b('0x20')](function(_0x535662){_0x343671(_0x535662);});},'afterDestroy':function(_0x442d1a,_0x3263e9,_0x415994){return _0x354362['VoiceExtension'][_0xf28b('0x22')]({'where':{'ChanSpyId':_0x442d1a['id']}})[_0xf28b('0x1a')](function(){_0x415994();})[_0xf28b('0x20')](function(_0x41fdbe){_0x415994(_0x41fdbe);});}}});};
\ No newline at end of file
diff --git a/server/api/voiceChanSpy/voiceChanSpy.rpc.js b/server/api/voiceChanSpy/voiceChanSpy.rpc.js
index 00cb4da..1d90403 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 _0x3388=['request\x20sent','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceChanSpy,\x20%s,\x20%s','message','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info'];(function(_0x44ae1e,_0x366674){var _0x3ef63d=function(_0x2535d4){while(--_0x2535d4){_0x44ae1e['push'](_0x44ae1e['shift']());}};_0x3ef63d(++_0x366674);}(_0x3388,0x134));var _0x8338=function(_0x392483,_0x1c1273){_0x392483=_0x392483-0x0;var _0x41b4b4=_0x3388[_0x392483];return _0x41b4b4;};'use strict';var _=require('lodash');var util=require(_0x8338('0x0'));var moment=require(_0x8338('0x1'));var BPromise=require(_0x8338('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8338('0x3'));var db=require(_0x8338('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x8338('0x5'))(_0x8338('0x6'));var config=require(_0x8338('0x7'));var jayson=require(_0x8338('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2054ac,_0x45f115,_0x453700){return new BPromise(function(_0x587e9e,_0x107e20){return client[_0x8338('0x9')](_0x2054ac,_0x453700)[_0x8338('0xa')](function(_0x4a543e){logger[_0x8338('0xb')]('VoiceChanSpy,\x20%s,\x20%s',_0x45f115,_0x8338('0xc'));logger['debug'](_0x8338('0xd'),_0x45f115,_0x8338('0xc'),JSON[_0x8338('0xe')](_0x4a543e));if(_0x4a543e[_0x8338('0xf')]){if(_0x4a543e[_0x8338('0xf')][_0x8338('0x10')]===0x1f4){logger['error'](_0x8338('0x11'),_0x45f115,_0x4a543e[_0x8338('0xf')][_0x8338('0x12')]);return _0x107e20(_0x4a543e[_0x8338('0xf')]['message']);}logger[_0x8338('0xf')](_0x8338('0x11'),_0x45f115,_0x4a543e['error']['message']);return _0x587e9e(_0x4a543e['error'][_0x8338('0x12')]);}else{logger[_0x8338('0xb')]('VoiceChanSpy,\x20%s,\x20%s',_0x45f115,_0x8338('0xc'));_0x587e9e(_0x4a543e['result'][_0x8338('0x12')]);}})[_0x8338('0x13')](function(_0x10c0dc){logger[_0x8338('0xf')]('VoiceChanSpy,\x20%s,\x20%s',_0x45f115,_0x10c0dc);_0x107e20(_0x10c0dc);});});}
\ No newline at end of file
+var _0x6809=['result','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','VoiceChanSpy,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info'];(function(_0x775ff4,_0x14d00f){var _0x2e6abe=function(_0x5ad039){while(--_0x5ad039){_0x775ff4['push'](_0x775ff4['shift']());}};_0x2e6abe(++_0x14d00f);}(_0x6809,0xe8));var _0x9680=function(_0x2906e6,_0x5ccd59){_0x2906e6=_0x2906e6-0x0;var _0x12517a=_0x6809[_0x2906e6];return _0x12517a;};'use strict';var _=require(_0x9680('0x0'));var util=require('util');var moment=require(_0x9680('0x1'));var BPromise=require(_0x9680('0x2'));var rs=require(_0x9680('0x3'));var fs=require('fs');var Redis=require(_0x9680('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x9680('0x5'));var logger=require(_0x9680('0x6'))(_0x9680('0x7'));var config=require(_0x9680('0x8'));var jayson=require(_0x9680('0x9'));var client=jayson[_0x9680('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x160449,_0xf270ec,_0x55ba2c){return new BPromise(function(_0x123137,_0x244a43){return client[_0x9680('0xb')](_0x160449,_0x55ba2c)[_0x9680('0xc')](function(_0x127e77){logger['info'](_0x9680('0xd'),_0xf270ec,_0x9680('0xe'));logger[_0x9680('0xf')]('VoiceChanSpy,\x20%s,\x20%s,\x20%s',_0xf270ec,_0x9680('0xe'),JSON['stringify'](_0x127e77));if(_0x127e77['error']){if(_0x127e77[_0x9680('0x10')][_0x9680('0x11')]===0x1f4){logger[_0x9680('0x10')]('VoiceChanSpy,\x20%s,\x20%s',_0xf270ec,_0x127e77['error'][_0x9680('0x12')]);return _0x244a43(_0x127e77[_0x9680('0x10')]['message']);}logger['error']('VoiceChanSpy,\x20%s,\x20%s',_0xf270ec,_0x127e77[_0x9680('0x10')]['message']);return _0x123137(_0x127e77[_0x9680('0x10')][_0x9680('0x12')]);}else{logger[_0x9680('0x13')](_0x9680('0xd'),_0xf270ec,_0x9680('0xe'));_0x123137(_0x127e77[_0x9680('0x14')]['message']);}})['catch'](function(_0xb86821){logger['error'](_0x9680('0xd'),_0xf270ec,_0xb86821);_0x244a43(_0xb86821);});});}
\ No newline at end of file
diff --git a/server/api/voiceContext/index.js b/server/api/voiceContext/index.js
index ea429ab..039a90d 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 _0x7f8f=['create','put','update','delete','destroy','exports','multer','path','express','Router','../../components/interaction/service','./voiceContext.controller','get','isAuthenticated','/:id','show','post'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x7f8f,0x15a));var _0xf7f8=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x7f8f[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0xf7f8('0x0'));var util=require('util');var path=require(_0xf7f8('0x1'));var timeout=require('connect-timeout');var express=require(_0xf7f8('0x2'));var router=express[_0xf7f8('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xf7f8('0x4'));var config=require('../../config/environment');var controller=require(_0xf7f8('0x5'));router[_0xf7f8('0x6')]('/',auth[_0xf7f8('0x7')](),controller['index']);router['get'](_0xf7f8('0x8'),auth[_0xf7f8('0x7')](),controller[_0xf7f8('0x9')]);router[_0xf7f8('0xa')]('/',auth[_0xf7f8('0x7')](),controller[_0xf7f8('0xb')]);router[_0xf7f8('0xc')](_0xf7f8('0x8'),auth[_0xf7f8('0x7')](),controller[_0xf7f8('0xd')]);router[_0xf7f8('0xe')](_0xf7f8('0x8'),auth[_0xf7f8('0x7')](),controller[_0xf7f8('0xf')]);module[_0xf7f8('0x10')]=router;
\ No newline at end of file
+var _0x79f8=['post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceContext.controller','get','isAuthenticated','index'];(function(_0x2b3131,_0x43eb1c){var _0x2018f7=function(_0x2dbac1){while(--_0x2dbac1){_0x2b3131['push'](_0x2b3131['shift']());}};_0x2018f7(++_0x43eb1c);}(_0x79f8,0x85));var _0x879f=function(_0x2497f7,_0x5c3643){_0x2497f7=_0x2497f7-0x0;var _0x264b98=_0x79f8[_0x2497f7];return _0x264b98;};'use strict';var multer=require(_0x879f('0x0'));var util=require('util');var path=require(_0x879f('0x1'));var timeout=require(_0x879f('0x2'));var express=require(_0x879f('0x3'));var router=express['Router']();var auth=require(_0x879f('0x4'));var interaction=require(_0x879f('0x5'));var config=require(_0x879f('0x6'));var controller=require(_0x879f('0x7'));router[_0x879f('0x8')]('/',auth[_0x879f('0x9')](),controller[_0x879f('0xa')]);router[_0x879f('0x8')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x879f('0xb')]('/',auth[_0x879f('0x9')](),controller[_0x879f('0xc')]);router[_0x879f('0xd')]('/:id',auth[_0x879f('0x9')](),controller[_0x879f('0xe')]);router[_0x879f('0xf')]('/:id',auth[_0x879f('0x9')](),controller[_0x879f('0x10')]);module[_0x879f('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 b50750e..5188fda 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 _0x3e74=['name','sequelize','STRING'];(function(_0x16b87c,_0x51c696){var _0x454233=function(_0x14d31e){while(--_0x14d31e){_0x16b87c['push'](_0x16b87c['shift']());}};_0x454233(++_0x51c696);}(_0x3e74,0x175));var _0x43e7=function(_0x5f49fa,_0x290329){_0x5f49fa=_0x5f49fa-0x0;var _0x499f6c=_0x3e74[_0x5f49fa];return _0x499f6c;};'use strict';var Sequelize=require(_0x43e7('0x0'));module['exports']={'name':{'type':Sequelize[_0x43e7('0x1')],'unique':_0x43e7('0x2')},'description':{'type':Sequelize[_0x43e7('0x1')],'allowNull':!![]},'defaultEntry':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xe14b=['exports','STRING','BOOLEAN','sequelize'];(function(_0x35ca69,_0x3bd299){var _0x5018ec=function(_0x457ced){while(--_0x457ced){_0x35ca69['push'](_0x35ca69['shift']());}};_0x5018ec(++_0x3bd299);}(_0xe14b,0x93));var _0xbe14=function(_0xf31a7,_0x23ddbc){_0xf31a7=_0xf31a7-0x0;var _0x457483=_0xe14b[_0xf31a7];return _0x457483;};'use strict';var Sequelize=require(_0xbe14('0x0'));module[_0xbe14('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name'},'description':{'type':Sequelize[_0xbe14('0x2')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0xbe14('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 c8d557b..972353f 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 _0xfb6e=['client','http','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','error','message','result','status','json','count','offset','limit','set','apply','save','update','get','Contexts','UserProfileResource','destroy','end','sendStatus','stack','name','send','index','VoiceContext','rawAttributes','fieldName','type','model','map','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','filter','merge','options','where','includeAll','findAll','rows','catch','show','create','readFileSync','join','root','server/files/templates/context.ejs','utf8','render','writeFileSync','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','role','find','params','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb'];(function(_0x2bf141,_0x31eac7){var _0x48277b=function(_0x9fe560){while(--_0x9fe560){_0x2bf141['push'](_0x2bf141['shift']());}};_0x48277b(++_0x31eac7);}(_0xfb6e,0x177));var _0xefb6=function(_0x4180c3,_0x55d99b){_0x4180c3=_0x4180c3-0x0;var _0x5987a1=_0xfb6e[_0x4180c3];return _0x5987a1;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0xefb6('0x0'));var rimraf=require(_0xefb6('0x1'));var zipdir=require(_0xefb6('0x2'));var jsonpatch=require(_0xefb6('0x3'));var rp=require(_0xefb6('0x4'));var moment=require(_0xefb6('0x5'));var BPromise=require(_0xefb6('0x6'));var Mustache=require(_0xefb6('0x7'));var util=require('util');var path=require(_0xefb6('0x8'));var sox=require(_0xefb6('0x9'));var csv=require(_0xefb6('0xa'));var ejs=require(_0xefb6('0xb'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require(_0xefb6('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xefb6('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xefb6('0xe'));var Redis=require(_0xefb6('0xf'));var authService=require(_0xefb6('0x10'));var qs=require(_0xefb6('0x11'));var as=require(_0xefb6('0x12'));var hardwareService=require(_0xefb6('0x13'));var logger=require(_0xefb6('0x14'))(_0xefb6('0x15'));var utils=require(_0xefb6('0x16'));var config=require(_0xefb6('0x17'));var db=require(_0xefb6('0x18'))['db'];var jayson=require('jayson/promise');var client=jayson[_0xefb6('0x19')][_0xefb6('0x1a')]({'port':0x232a});function checkPasswordPattern(_0x5c5346,_0x18520c,_0x5d095d){if(_0x5d095d){var _0x551e6b=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x551e6b[_0xefb6('0x1b')](_0x18520c)){return _0x5c5346;}else{throw new db['Sequelize'][(_0xefb6('0x1c'))](_0xefb6('0x1d'));}}else{return _0x5c5346;}}function respondWithRpcPromise(_0x33e482,_0x5c2b67,_0x25b108,_0x51e6bf){return new BPromise(function(_0x232375,_0x1057be){var _0x19123c=_0x51e6bf||client;return _0x19123c['request'](_0x33e482,_0x25b108)[_0xefb6('0x1e')](function(_0x59b8cf){logger[_0xefb6('0x1f')](_0xefb6('0x20'),_0x5c2b67,_0xefb6('0x21'));logger[_0xefb6('0x22')](_0xefb6('0x23'),_0x5c2b67,_0xefb6('0x21'),JSON['stringify'](_0x59b8cf));if(_0x59b8cf[_0xefb6('0x24')]){if(_0x59b8cf[_0xefb6('0x24')]['code']===0x1f4){logger[_0xefb6('0x24')]('VoiceContext,\x20%s,\x20%s',_0x5c2b67,_0x59b8cf['error'][_0xefb6('0x25')]);return _0x1057be(_0x59b8cf[_0xefb6('0x24')][_0xefb6('0x25')]);}logger[_0xefb6('0x24')]('VoiceContext,\x20%s,\x20%s',_0x5c2b67,_0x59b8cf[_0xefb6('0x24')][_0xefb6('0x25')]);return _0x232375(_0x59b8cf['error'][_0xefb6('0x25')]);}else{logger['info'](_0xefb6('0x20'),_0x5c2b67,_0xefb6('0x21'));_0x232375(_0x59b8cf[_0xefb6('0x26')][_0xefb6('0x25')]);}})['catch'](function(_0x9c68f){logger[_0xefb6('0x24')](_0xefb6('0x20'),_0x5c2b67,_0x9c68f);_0x1057be(_0x9c68f);});});}function respondWithStatusCode(_0xe339df,_0x57d435){_0x57d435=_0x57d435||0xcc;return function(_0x2b1757){if(_0x2b1757){return _0xe339df['sendStatus'](_0x57d435);}return _0xe339df[_0xefb6('0x27')](_0x57d435)['end']();};}function respondWithResult(_0x9c2753,_0x343c09){_0x343c09=_0x343c09||0xc8;return function(_0x321476){if(_0x321476){return _0x9c2753['status'](_0x343c09)[_0xefb6('0x28')](_0x321476);}};}function respondWithFilteredResult(_0x20e863,_0x501cb7){return function(_0x44f136){if(_0x44f136){var _0x46d474=_0x44f136[_0xefb6('0x29')],_0x3184ac=_0x501cb7[_0xefb6('0x2a')],_0x4ae63c=_0x501cb7[_0xefb6('0x2a')]+_0x501cb7[_0xefb6('0x2b')],_0x194707;if(_0x4ae63c>=_0x46d474){_0x4ae63c=_0x46d474;_0x194707=0xc8;}else{_0x194707=0xce;}_0x20e863['status'](_0x194707);return _0x20e863[_0xefb6('0x2c')]('Content-Range',_0x3184ac+'-'+_0x4ae63c+'/'+_0x46d474)[_0xefb6('0x28')](_0x44f136);}return null;};}function patchUpdates(_0x4f3d86){return function(_0x5d2d45){try{jsonpatch[_0xefb6('0x2d')](_0x5d2d45,_0x4f3d86,!![]);}catch(_0x2e488a){return BPromise['reject'](_0x2e488a);}return _0x5d2d45[_0xefb6('0x2e')]();};}function saveUpdates(_0x1da211,_0x466d80){return function(_0x320247){if(_0x320247){return _0x320247[_0xefb6('0x2f')](_0x1da211)['then'](function(_0x324f24){return _0x324f24;});}return null;};}function removeEntity(_0x5a3c56,_0x4a90e1){return function(_0x1af4f9){if(_0x1af4f9){return _0x1af4f9['destroy']()['then'](function(){var _0x2cf4a8=_0x1af4f9[_0xefb6('0x30')]({'plain':!![]});var _0x185568=_0xefb6('0x31');return db[_0xefb6('0x32')][_0xefb6('0x33')]({'where':{'type':_0x185568,'resourceId':_0x2cf4a8['id']}})[_0xefb6('0x1e')](function(){return _0x1af4f9;});})['then'](function(){_0x5a3c56[_0xefb6('0x27')](0xcc)[_0xefb6('0x34')]();});}};}function handleEntityNotFound(_0x207a8b,_0x495026){return function(_0x2eeae8){if(!_0x2eeae8){_0x207a8b[_0xefb6('0x35')](0x194);}return _0x2eeae8;};}function handleError(_0x1ee211,_0x387fce){_0x387fce=_0x387fce||0x1f4;return function(_0x54ad3d){logger[_0xefb6('0x24')](_0x54ad3d[_0xefb6('0x36')]);if(_0x54ad3d[_0xefb6('0x37')]){delete _0x54ad3d[_0xefb6('0x37')];}_0x1ee211[_0xefb6('0x27')](_0x387fce)[_0xefb6('0x38')](_0x54ad3d);};}exports[_0xefb6('0x39')]=function(_0x2142fe,_0x3ffd45){var _0x37e309={},_0x4cbb84={},_0x2d3c5a={'count':0x0,'rows':[]};var _0x51160b=_['map'](db[_0xefb6('0x3a')][_0xefb6('0x3b')],function(_0x452824){return{'name':_0x452824[_0xefb6('0x3c')],'type':_0x452824[_0xefb6('0x3d')]['key']};});_0x4cbb84[_0xefb6('0x3e')]=_[_0xefb6('0x3f')](_0x51160b,'name');_0x4cbb84['query']=_[_0xefb6('0x40')](_0x2142fe[_0xefb6('0x41')]);_0x4cbb84[_0xefb6('0x42')]=_['intersection'](_0x4cbb84[_0xefb6('0x3e')],_0x4cbb84[_0xefb6('0x41')]);_0x37e309[_0xefb6('0x43')]=_[_0xefb6('0x44')](_0x4cbb84[_0xefb6('0x3e')],qs['fields'](_0x2142fe[_0xefb6('0x41')][_0xefb6('0x45')]));_0x37e309[_0xefb6('0x43')]=_0x37e309[_0xefb6('0x43')][_0xefb6('0x46')]?_0x37e309[_0xefb6('0x43')]:_0x4cbb84['model'];if(!_0x2142fe['query'][_0xefb6('0x47')](_0xefb6('0x48'))){_0x37e309[_0xefb6('0x2b')]=qs[_0xefb6('0x2b')](_0x2142fe['query'][_0xefb6('0x2b')]);_0x37e309['offset']=qs[_0xefb6('0x2a')](_0x2142fe['query'][_0xefb6('0x2a')]);}_0x37e309[_0xefb6('0x49')]=qs['sort'](_0x2142fe[_0xefb6('0x41')][_0xefb6('0x4a')]);_0x37e309['where']=qs['filters'](_['pick'](_0x2142fe[_0xefb6('0x41')],_0x4cbb84[_0xefb6('0x42')]));if(_0x2142fe['query'][_0xefb6('0x4b')]){_0x37e309['where']=_[_0xefb6('0x4c')](_0x37e309['where'],{'$or':_[_0xefb6('0x3f')](_0x51160b,function(_0x29025b){if(_0x29025b[_0xefb6('0x3d')]!=='VIRTUAL'){var _0x3f6d0f={};_0x3f6d0f[_0x29025b[_0xefb6('0x37')]]={'$like':'%'+_0x2142fe[_0xefb6('0x41')]['filter']+'%'};return _0x3f6d0f;}})});}_0x37e309=_[_0xefb6('0x4c')]({},_0x37e309,_0x2142fe[_0xefb6('0x4d')]);var _0x2d702f={'where':_0x37e309[_0xefb6('0x4e')]};return db['VoiceContext']['count'](_0x2d702f)['then'](function(_0x4df6c5){_0x2d3c5a[_0xefb6('0x29')]=_0x4df6c5;if(_0x2142fe[_0xefb6('0x41')][_0xefb6('0x4f')]){_0x37e309['include']=[{'all':!![]}];}return db['VoiceContext'][_0xefb6('0x50')](_0x37e309);})['then'](function(_0x483c79){_0x2d3c5a[_0xefb6('0x51')]=_0x483c79;return _0x2d3c5a;})[_0xefb6('0x1e')](respondWithFilteredResult(_0x3ffd45,_0x37e309))[_0xefb6('0x52')](handleError(_0x3ffd45,null));};exports[_0xefb6('0x53')]=function(_0x2b7e12,_0x1fcc26){var _0x325bc0={'raw':![],'where':{'id':_0x2b7e12['params']['id']}},_0x74220c={};_0x74220c[_0xefb6('0x3e')]=_[_0xefb6('0x40')](db[_0xefb6('0x3a')]['rawAttributes']);_0x74220c[_0xefb6('0x41')]=_[_0xefb6('0x40')](_0x2b7e12[_0xefb6('0x41')]);_0x74220c[_0xefb6('0x42')]=_[_0xefb6('0x44')](_0x74220c[_0xefb6('0x3e')],_0x74220c[_0xefb6('0x41')]);_0x325bc0['attributes']=_[_0xefb6('0x44')](_0x74220c['model'],qs[_0xefb6('0x45')](_0x2b7e12[_0xefb6('0x41')][_0xefb6('0x45')]));_0x325bc0[_0xefb6('0x43')]=_0x325bc0[_0xefb6('0x43')][_0xefb6('0x46')]?_0x325bc0[_0xefb6('0x43')]:_0x74220c[_0xefb6('0x3e')];if(_0x2b7e12[_0xefb6('0x41')][_0xefb6('0x4f')]){_0x325bc0['include']=[{'all':!![]}];}_0x325bc0=_[_0xefb6('0x4c')]({},_0x325bc0,_0x2b7e12[_0xefb6('0x4d')]);return db[_0xefb6('0x3a')]['find'](_0x325bc0)[_0xefb6('0x1e')](handleEntityNotFound(_0x1fcc26,null))['then'](respondWithResult(_0x1fcc26,null))[_0xefb6('0x52')](handleError(_0x1fcc26,null));};exports['create']=function(_0x420803,_0xdcf3f0,_0x25fa7a){var _0x5d2c27;return db['VoiceContext'][_0xefb6('0x54')](_0x420803['body'],{'raw':!![]})[_0xefb6('0x1e')](function(_0x2ad2be){_0x5d2c27=_0x2ad2be;return db[_0xefb6('0x3a')][_0xefb6('0x50')]({'raw':!![]});})[_0xefb6('0x1e')](function(_0x5017b5){var _0x3d33aa=fs[_0xefb6('0x55')](path[_0xefb6('0x56')](config[_0xefb6('0x57')],_0xefb6('0x58')),_0xefb6('0x59'));var _0x5cdd41=ejs[_0xefb6('0x5a')](_0x3d33aa,{'contexts':_0x5017b5||[]});fs[_0xefb6('0x5b')](_0xefb6('0x5c'),_0x5cdd41);})[_0xefb6('0x1e')](function(){return respondWithRpcPromise(_0xefb6('0x5d'),_0xefb6('0x54'),{'module':_0xefb6('0x5e')});})['then'](function(){var _0x11d7cb=_0x420803[_0xefb6('0x5f')][_0xefb6('0x30')]({'plain':!![]});if(!_0x11d7cb)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x11d7cb[_0xefb6('0x60')]===_0xefb6('0x5f')){var _0x509086=_0x5d2c27[_0xefb6('0x30')]({'plain':!![]});return db['UserProfileSection'][_0xefb6('0x61')]({'where':{'name':'Contexts','userProfileId':_0x11d7cb['userProfileId']},'raw':!![]})['then'](function(_0x58e2fc){if(_0x58e2fc&&_0x58e2fc['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x509086[_0xefb6('0x37')],'resourceId':_0x509086['id'],'type':_0x58e2fc[_0xefb6('0x37')],'sectionId':_0x58e2fc['id']},{})[_0xefb6('0x1e')](function(){return _0x5d2c27;});}else{return _0x5d2c27;}})[_0xefb6('0x52')](function(_0x4b4fdb){logger[_0xefb6('0x24')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4b4fdb);throw _0x4b4fdb;});}return _0x5d2c27;})[_0xefb6('0x1e')](respondWithResult(_0xdcf3f0,0xc9))['catch'](handleError(_0xdcf3f0,null));};exports[_0xefb6('0x2f')]=function(_0x160536,_0xf79a86,_0x2521be){var _0x37c089;return db[_0xefb6('0x3a')][_0xefb6('0x61')]({'where':{'id':_0x160536[_0xefb6('0x62')]['id']}})[_0xefb6('0x1e')](handleEntityNotFound(_0xf79a86,null))[_0xefb6('0x1e')](saveUpdates(_0x160536[_0xefb6('0x63')],null))[_0xefb6('0x1e')](function(_0x480f4c){if(_0x480f4c){_0x37c089=_0x480f4c;return db[_0xefb6('0x3a')][_0xefb6('0x50')]({'raw':!![]});}})[_0xefb6('0x1e')](function(_0xd2779b){var _0x13299f=fs[_0xefb6('0x55')](path[_0xefb6('0x56')](config[_0xefb6('0x57')],_0xefb6('0x58')),_0xefb6('0x59'));var _0x36d576=ejs['render'](_0x13299f,{'contexts':_0xd2779b||[]});fs[_0xefb6('0x5b')](_0xefb6('0x5c'),_0x36d576);})['then'](function(){return respondWithRpcPromise(_0xefb6('0x5d'),'update',{'module':_0xefb6('0x5e')});})[_0xefb6('0x1e')](function(){return _0x37c089;})[_0xefb6('0x1e')](respondWithResult(_0xf79a86,null))[_0xefb6('0x52')](handleError(_0xf79a86,null));};exports[_0xefb6('0x33')]=function(_0x5bd9b1,_0x2091dd,_0x427f93){var _0x5e8073;return db[_0xefb6('0x3a')][_0xefb6('0x61')]({'where':{'id':_0x5bd9b1[_0xefb6('0x62')]['id']}})[_0xefb6('0x1e')](handleEntityNotFound(_0x2091dd,null))['then'](removeEntity(_0x2091dd,null))[_0xefb6('0x1e')](function(){return db[_0xefb6('0x3a')]['findAll']({'raw':!![]});})[_0xefb6('0x1e')](function(_0x4c4d23){var _0x359384=fs[_0xefb6('0x55')](path[_0xefb6('0x56')](config[_0xefb6('0x57')],_0xefb6('0x58')),_0xefb6('0x59'));var _0x124d2d=ejs[_0xefb6('0x5a')](_0x359384,{'contexts':_0x4c4d23});fs[_0xefb6('0x5b')](_0xefb6('0x5c'),_0x124d2d);return respondWithRpcPromise(_0xefb6('0x5d'),_0xefb6('0x33'),{'module':_0xefb6('0x5e')});})[_0xefb6('0x52')](handleError(_0x2091dd,null));};
\ No newline at end of file
+var _0x2ec9=['api','../../config/utils','../../config/environment','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','VoiceContext,\x20%s,\x20%s','debug','VoiceContext,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','save','then','destroy','get','Contexts','UserProfileResource','name','send','map','VoiceContext','type','key','query','keys','intersection','model','fields','attributes','hasOwnProperty','order','filters','filter','where','merge','options','findAll','rows','catch','show','params','rawAttributes','length','find','create','readFileSync','join','root','writeFileSync','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','role','UserProfileSection','userProfileId','update','body','server/files/templates/context.ejs','utf8','render','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2ec9,0xb5));var _0x92ec=function(_0x5bab26,_0x437a03){_0x5bab26=_0x5bab26-0x0;var _0x34e3f2=_0x2ec9[_0x5bab26];return _0x34e3f2;};'use strict';var pdf=require(_0x92ec('0x0'));var emlformat=require(_0x92ec('0x1'));var rimraf=require(_0x92ec('0x2'));var zipdir=require(_0x92ec('0x3'));var jsonpatch=require(_0x92ec('0x4'));var rp=require(_0x92ec('0x5'));var moment=require(_0x92ec('0x6'));var BPromise=require(_0x92ec('0x7'));var Mustache=require(_0x92ec('0x8'));var util=require(_0x92ec('0x9'));var path=require(_0x92ec('0xa'));var sox=require(_0x92ec('0xb'));var csv=require(_0x92ec('0xc'));var ejs=require(_0x92ec('0xd'));var fs=require('fs');var _=require('lodash');var squel=require(_0x92ec('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x92ec('0xf'));var toCsv=require(_0x92ec('0xc'));var querystring=require('querystring');var Papa=require(_0x92ec('0x10'));var Redis=require(_0x92ec('0x11'));var authService=require(_0x92ec('0x12'));var qs=require(_0x92ec('0x13'));var as=require(_0x92ec('0x14'));var hardwareService=require(_0x92ec('0x15'));var logger=require(_0x92ec('0x16'))(_0x92ec('0x17'));var utils=require(_0x92ec('0x18'));var config=require(_0x92ec('0x19'));var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var client=jayson[_0x92ec('0x1a')][_0x92ec('0x1b')]({'port':0x232a});function checkPasswordPattern(_0xd94e2b,_0x95b7f3,_0x12ba01){if(_0x12ba01){var _0x47e9de=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x47e9de[_0x92ec('0x1c')](_0x95b7f3)){return _0xd94e2b;}else{throw new db[(_0x92ec('0x1d'))][(_0x92ec('0x1e'))](_0x92ec('0x1f'));}}else{return _0xd94e2b;}}function respondWithRpcPromise(_0x4d58c3,_0x3b7ac9,_0x467f3e,_0x54705b){return new BPromise(function(_0x57c326,_0x332c36){var _0x287b1f=_0x54705b||client;return _0x287b1f[_0x92ec('0x20')](_0x4d58c3,_0x467f3e)['then'](function(_0x1be0bf){logger['info'](_0x92ec('0x21'),_0x3b7ac9,'request\x20sent');logger[_0x92ec('0x22')](_0x92ec('0x23'),_0x3b7ac9,_0x92ec('0x24'),JSON[_0x92ec('0x25')](_0x1be0bf));if(_0x1be0bf[_0x92ec('0x26')]){if(_0x1be0bf[_0x92ec('0x26')][_0x92ec('0x27')]===0x1f4){logger[_0x92ec('0x26')](_0x92ec('0x21'),_0x3b7ac9,_0x1be0bf['error'][_0x92ec('0x28')]);return _0x332c36(_0x1be0bf[_0x92ec('0x26')][_0x92ec('0x28')]);}logger[_0x92ec('0x26')](_0x92ec('0x21'),_0x3b7ac9,_0x1be0bf[_0x92ec('0x26')]['message']);return _0x57c326(_0x1be0bf[_0x92ec('0x26')][_0x92ec('0x28')]);}else{logger[_0x92ec('0x29')](_0x92ec('0x21'),_0x3b7ac9,_0x92ec('0x24'));_0x57c326(_0x1be0bf['result'][_0x92ec('0x28')]);}})['catch'](function(_0x5285b5){logger[_0x92ec('0x26')](_0x92ec('0x21'),_0x3b7ac9,_0x5285b5);_0x332c36(_0x5285b5);});});}function respondWithStatusCode(_0x1755f0,_0x2d561e){_0x2d561e=_0x2d561e||0xcc;return function(_0x89a151){if(_0x89a151){return _0x1755f0[_0x92ec('0x2a')](_0x2d561e);}return _0x1755f0[_0x92ec('0x2b')](_0x2d561e)[_0x92ec('0x2c')]();};}function respondWithResult(_0x152636,_0x30b1e6){_0x30b1e6=_0x30b1e6||0xc8;return function(_0x1f2bc8){if(_0x1f2bc8){return _0x152636[_0x92ec('0x2b')](_0x30b1e6)[_0x92ec('0x2d')](_0x1f2bc8);}};}function respondWithFilteredResult(_0x3aa05a,_0x81ce43){return function(_0x58a82f){if(_0x58a82f){var _0x3fcf31=_0x58a82f[_0x92ec('0x2e')],_0x52c9d0=_0x81ce43['offset'],_0x43e052=_0x81ce43[_0x92ec('0x2f')]+_0x81ce43[_0x92ec('0x30')],_0x29212b;if(_0x43e052>=_0x3fcf31){_0x43e052=_0x3fcf31;_0x29212b=0xc8;}else{_0x29212b=0xce;}_0x3aa05a['status'](_0x29212b);return _0x3aa05a[_0x92ec('0x31')](_0x92ec('0x32'),_0x52c9d0+'-'+_0x43e052+'/'+_0x3fcf31)[_0x92ec('0x2d')](_0x58a82f);}return null;};}function patchUpdates(_0x48b1d6){return function(_0x381f45){try{jsonpatch[_0x92ec('0x33')](_0x381f45,_0x48b1d6,!![]);}catch(_0x31cfcd){return BPromise['reject'](_0x31cfcd);}return _0x381f45[_0x92ec('0x34')]();};}function saveUpdates(_0xa41c2f,_0x56a4a8){return function(_0xabbc14){if(_0xabbc14){return _0xabbc14['update'](_0xa41c2f)[_0x92ec('0x35')](function(_0x287ed8){return _0x287ed8;});}return null;};}function removeEntity(_0x5b065a,_0x4078f1){return function(_0x1d97cb){if(_0x1d97cb){return _0x1d97cb[_0x92ec('0x36')]()[_0x92ec('0x35')](function(){var _0x4cb1c7=_0x1d97cb[_0x92ec('0x37')]({'plain':!![]});var _0x70cadb=_0x92ec('0x38');return db[_0x92ec('0x39')][_0x92ec('0x36')]({'where':{'type':_0x70cadb,'resourceId':_0x4cb1c7['id']}})[_0x92ec('0x35')](function(){return _0x1d97cb;});})[_0x92ec('0x35')](function(){_0x5b065a[_0x92ec('0x2b')](0xcc)[_0x92ec('0x2c')]();});}};}function handleEntityNotFound(_0x5eb0eb,_0x2f500b){return function(_0x435af2){if(!_0x435af2){_0x5eb0eb[_0x92ec('0x2a')](0x194);}return _0x435af2;};}function handleError(_0x450dbc,_0x2dba57){_0x2dba57=_0x2dba57||0x1f4;return function(_0xd53e4){logger[_0x92ec('0x26')](_0xd53e4['stack']);if(_0xd53e4[_0x92ec('0x3a')]){delete _0xd53e4[_0x92ec('0x3a')];}_0x450dbc[_0x92ec('0x2b')](_0x2dba57)[_0x92ec('0x3b')](_0xd53e4);};}exports['index']=function(_0x2073e0,_0x501524){var _0x298452={},_0x10e429={},_0x20331c={'count':0x0,'rows':[]};var _0x35e327=_[_0x92ec('0x3c')](db[_0x92ec('0x3d')]['rawAttributes'],function(_0x292146){return{'name':_0x292146['fieldName'],'type':_0x292146[_0x92ec('0x3e')][_0x92ec('0x3f')]};});_0x10e429['model']=_[_0x92ec('0x3c')](_0x35e327,'name');_0x10e429[_0x92ec('0x40')]=_[_0x92ec('0x41')](_0x2073e0[_0x92ec('0x40')]);_0x10e429['filters']=_[_0x92ec('0x42')](_0x10e429[_0x92ec('0x43')],_0x10e429[_0x92ec('0x40')]);_0x298452['attributes']=_[_0x92ec('0x42')](_0x10e429[_0x92ec('0x43')],qs['fields'](_0x2073e0['query'][_0x92ec('0x44')]));_0x298452[_0x92ec('0x45')]=_0x298452[_0x92ec('0x45')]['length']?_0x298452['attributes']:_0x10e429[_0x92ec('0x43')];if(!_0x2073e0[_0x92ec('0x40')][_0x92ec('0x46')]('nolimit')){_0x298452[_0x92ec('0x30')]=qs[_0x92ec('0x30')](_0x2073e0[_0x92ec('0x40')][_0x92ec('0x30')]);_0x298452[_0x92ec('0x2f')]=qs['offset'](_0x2073e0['query']['offset']);}_0x298452[_0x92ec('0x47')]=qs['sort'](_0x2073e0[_0x92ec('0x40')]['sort']);_0x298452['where']=qs[_0x92ec('0x48')](_['pick'](_0x2073e0[_0x92ec('0x40')],_0x10e429[_0x92ec('0x48')]));if(_0x2073e0['query'][_0x92ec('0x49')]){_0x298452[_0x92ec('0x4a')]=_[_0x92ec('0x4b')](_0x298452['where'],{'$or':_[_0x92ec('0x3c')](_0x35e327,function(_0x3c9cbe){if(_0x3c9cbe[_0x92ec('0x3e')]!=='VIRTUAL'){var _0x1548b2={};_0x1548b2[_0x3c9cbe[_0x92ec('0x3a')]]={'$like':'%'+_0x2073e0[_0x92ec('0x40')][_0x92ec('0x49')]+'%'};return _0x1548b2;}})});}_0x298452=_['merge']({},_0x298452,_0x2073e0[_0x92ec('0x4c')]);var _0x552fbd={'where':_0x298452[_0x92ec('0x4a')]};return db[_0x92ec('0x3d')]['count'](_0x552fbd)['then'](function(_0x43e1e6){_0x20331c['count']=_0x43e1e6;if(_0x2073e0['query']['includeAll']){_0x298452['include']=[{'all':!![]}];}return db['VoiceContext'][_0x92ec('0x4d')](_0x298452);})['then'](function(_0xa72fb3){_0x20331c[_0x92ec('0x4e')]=_0xa72fb3;return _0x20331c;})[_0x92ec('0x35')](respondWithFilteredResult(_0x501524,_0x298452))[_0x92ec('0x4f')](handleError(_0x501524,null));};exports[_0x92ec('0x50')]=function(_0x1105bf,_0x56a99d){var _0x24f8e9={'raw':![],'where':{'id':_0x1105bf[_0x92ec('0x51')]['id']}},_0x29648f={};_0x29648f[_0x92ec('0x43')]=_[_0x92ec('0x41')](db['VoiceContext'][_0x92ec('0x52')]);_0x29648f[_0x92ec('0x40')]=_['keys'](_0x1105bf['query']);_0x29648f[_0x92ec('0x48')]=_[_0x92ec('0x42')](_0x29648f['model'],_0x29648f[_0x92ec('0x40')]);_0x24f8e9['attributes']=_['intersection'](_0x29648f[_0x92ec('0x43')],qs[_0x92ec('0x44')](_0x1105bf[_0x92ec('0x40')][_0x92ec('0x44')]));_0x24f8e9['attributes']=_0x24f8e9['attributes'][_0x92ec('0x53')]?_0x24f8e9['attributes']:_0x29648f[_0x92ec('0x43')];if(_0x1105bf[_0x92ec('0x40')]['includeAll']){_0x24f8e9['include']=[{'all':!![]}];}_0x24f8e9=_['merge']({},_0x24f8e9,_0x1105bf['options']);return db[_0x92ec('0x3d')][_0x92ec('0x54')](_0x24f8e9)[_0x92ec('0x35')](handleEntityNotFound(_0x56a99d,null))[_0x92ec('0x35')](respondWithResult(_0x56a99d,null))[_0x92ec('0x4f')](handleError(_0x56a99d,null));};exports[_0x92ec('0x55')]=function(_0x36407b,_0x597302,_0x510808){var _0x51f67d;return db[_0x92ec('0x3d')][_0x92ec('0x55')](_0x36407b['body'],{'raw':!![]})[_0x92ec('0x35')](function(_0x21365f){_0x51f67d=_0x21365f;return db[_0x92ec('0x3d')]['findAll']({'raw':!![]});})[_0x92ec('0x35')](function(_0x21fb37){var _0x447504=fs[_0x92ec('0x56')](path[_0x92ec('0x57')](config[_0x92ec('0x58')],'server/files/templates/context.ejs'),'utf8');var _0x2608ec=ejs['render'](_0x447504,{'contexts':_0x21fb37||[]});fs[_0x92ec('0x59')](_0x92ec('0x5a'),_0x2608ec);})[_0x92ec('0x35')](function(){return respondWithRpcPromise(_0x92ec('0x5b'),_0x92ec('0x55'),{'module':_0x92ec('0x5c')});})[_0x92ec('0x35')](function(){var _0x45239b=_0x36407b[_0x92ec('0x5d')][_0x92ec('0x37')]({'plain':!![]});if(!_0x45239b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x45239b[_0x92ec('0x5e')]===_0x92ec('0x5d')){var _0x34d2a4=_0x51f67d[_0x92ec('0x37')]({'plain':!![]});return db[_0x92ec('0x5f')]['find']({'where':{'name':_0x92ec('0x38'),'userProfileId':_0x45239b[_0x92ec('0x60')]},'raw':!![]})[_0x92ec('0x35')](function(_0x11c0a1){if(_0x11c0a1&&_0x11c0a1['autoAssociation']===0x0){return db['UserProfileResource'][_0x92ec('0x55')]({'name':_0x34d2a4['name'],'resourceId':_0x34d2a4['id'],'type':_0x11c0a1[_0x92ec('0x3a')],'sectionId':_0x11c0a1['id']},{})[_0x92ec('0x35')](function(){return _0x51f67d;});}else{return _0x51f67d;}})['catch'](function(_0x1edc0a){logger[_0x92ec('0x26')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1edc0a);throw _0x1edc0a;});}return _0x51f67d;})['then'](respondWithResult(_0x597302,0xc9))[_0x92ec('0x4f')](handleError(_0x597302,null));};exports[_0x92ec('0x61')]=function(_0x2d8450,_0x131b44,_0xb0bf43){var _0x396489;return db[_0x92ec('0x3d')][_0x92ec('0x54')]({'where':{'id':_0x2d8450[_0x92ec('0x51')]['id']}})[_0x92ec('0x35')](handleEntityNotFound(_0x131b44,null))['then'](saveUpdates(_0x2d8450[_0x92ec('0x62')],null))[_0x92ec('0x35')](function(_0x15a51d){if(_0x15a51d){_0x396489=_0x15a51d;return db['VoiceContext'][_0x92ec('0x4d')]({'raw':!![]});}})[_0x92ec('0x35')](function(_0x306301){var _0x4f031b=fs[_0x92ec('0x56')](path['join'](config[_0x92ec('0x58')],_0x92ec('0x63')),'utf8');var _0x530a45=ejs['render'](_0x4f031b,{'contexts':_0x306301||[]});fs['writeFileSync'](_0x92ec('0x5a'),_0x530a45);})[_0x92ec('0x35')](function(){return respondWithRpcPromise(_0x92ec('0x5b'),_0x92ec('0x61'),{'module':_0x92ec('0x5c')});})[_0x92ec('0x35')](function(){return _0x396489;})[_0x92ec('0x35')](respondWithResult(_0x131b44,null))['catch'](handleError(_0x131b44,null));};exports['destroy']=function(_0x117434,_0x449eb3,_0x437ab3){var _0x3fc5e1;return db[_0x92ec('0x3d')][_0x92ec('0x54')]({'where':{'id':_0x117434['params']['id']}})['then'](handleEntityNotFound(_0x449eb3,null))['then'](removeEntity(_0x449eb3,null))[_0x92ec('0x35')](function(){return db[_0x92ec('0x3d')][_0x92ec('0x4d')]({'raw':!![]});})['then'](function(_0x5d51f3){var _0x17247d=fs[_0x92ec('0x56')](path[_0x92ec('0x57')](config[_0x92ec('0x58')],_0x92ec('0x63')),_0x92ec('0x64'));var _0xdae9ba=ejs[_0x92ec('0x65')](_0x17247d,{'contexts':_0x5d51f3});fs[_0x92ec('0x59')](_0x92ec('0x5a'),_0xdae9ba);return respondWithRpcPromise('Reload','destroy',{'module':_0x92ec('0x5c')});})[_0x92ec('0x4f')](handleError(_0x449eb3,null));};
\ No newline at end of file
diff --git a/server/api/voiceContext/voiceContext.model.js b/server/api/voiceContext/voiceContext.model.js
index 74fa5ab..c1261db 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 _0x5398=['voice_contexts','util','api','bluebird','request-promise','path','rimraf','../../config/environment','exports','VoiceContext'];(function(_0x55e388,_0x3b2b6c){var _0x419d83=function(_0x48d6de){while(--_0x48d6de){_0x55e388['push'](_0x55e388['shift']());}};_0x419d83(++_0x3b2b6c);}(_0x5398,0x123));var _0x8539=function(_0x1928e2,_0x16f275){_0x1928e2=_0x1928e2-0x0;var _0x550fc7=_0x5398[_0x1928e2];return _0x550fc7;};'use strict';var _=require('lodash');var util=require(_0x8539('0x0'));var logger=require('../../config/logger')(_0x8539('0x1'));var moment=require('moment');var BPromise=require(_0x8539('0x2'));var rp=require(_0x8539('0x3'));var fs=require('fs');var path=require(_0x8539('0x4'));var rimraf=require(_0x8539('0x5'));var config=require(_0x8539('0x6'));var attributes=require('./voiceContext.attributes');module[_0x8539('0x7')]=function(_0x525fa3,_0x230ac2){return _0x525fa3['define'](_0x8539('0x8'),attributes,{'tableName':_0x8539('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6eba=['moment','rimraf','exports','define','VoiceContext','voice_contexts','lodash','util','api'];(function(_0x23ab37,_0xa87ac7){var _0x1ecc49=function(_0x601a89){while(--_0x601a89){_0x23ab37['push'](_0x23ab37['shift']());}};_0x1ecc49(++_0xa87ac7);}(_0x6eba,0x180));var _0xa6eb=function(_0x455871,_0x17fa9e){_0x455871=_0x455871-0x0;var _0x3cce32=_0x6eba[_0x455871];return _0x3cce32;};'use strict';var _=require(_0xa6eb('0x0'));var util=require(_0xa6eb('0x1'));var logger=require('../../config/logger')(_0xa6eb('0x2'));var moment=require(_0xa6eb('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xa6eb('0x4'));var config=require('../../config/environment');var attributes=require('./voiceContext.attributes');module[_0xa6eb('0x5')]=function(_0x30c36c,_0x3c8101){return _0x30c36c[_0xa6eb('0x6')](_0xa6eb('0x7'),attributes,{'tableName':_0xa6eb('0x8'),'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 83e1748..690332f 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 _0x7da8=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util'];(function(_0x2be053,_0x2967fc){var _0x137fe8=function(_0x21c066){while(--_0x21c066){_0x2be053['push'](_0x2be053['shift']());}};_0x137fe8(++_0x2967fc);}(_0x7da8,0xa6));var _0x87da=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x7da8[_0x2f5ac5];return _0x37c9a8;};'use strict';var _=require(_0x87da('0x0'));var util=require(_0x87da('0x1'));var moment=require(_0x87da('0x2'));var BPromise=require(_0x87da('0x3'));var rs=require(_0x87da('0x4'));var fs=require('fs');var Redis=require(_0x87da('0x5'));var db=require(_0x87da('0x6'))['db'];var utils=require(_0x87da('0x7'));var logger=require('../../config/logger')(_0x87da('0x8'));var config=require(_0x87da('0x9'));var jayson=require(_0x87da('0xa'));var client=jayson[_0x87da('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3ec65c,_0x41d494,_0x47ab57){return new BPromise(function(_0x13df28,_0x114ad3){return client['request'](_0x3ec65c,_0x47ab57)[_0x87da('0xc')](function(_0x4cb8ba){logger[_0x87da('0xd')](_0x87da('0xe'),_0x41d494,_0x87da('0xf'));logger[_0x87da('0x10')](_0x87da('0x11'),_0x41d494,'request\x20sent',JSON[_0x87da('0x12')](_0x4cb8ba));if(_0x4cb8ba['error']){if(_0x4cb8ba[_0x87da('0x13')][_0x87da('0x14')]===0x1f4){logger[_0x87da('0x13')](_0x87da('0xe'),_0x41d494,_0x4cb8ba[_0x87da('0x13')][_0x87da('0x15')]);return _0x114ad3(_0x4cb8ba[_0x87da('0x13')][_0x87da('0x15')]);}logger['error']('VoiceContext,\x20%s,\x20%s',_0x41d494,_0x4cb8ba[_0x87da('0x13')][_0x87da('0x15')]);return _0x13df28(_0x4cb8ba[_0x87da('0x13')]['message']);}else{logger[_0x87da('0xd')](_0x87da('0xe'),_0x41d494,_0x87da('0xf'));_0x13df28(_0x4cb8ba[_0x87da('0x16')][_0x87da('0x15')]);}})[_0x87da('0x17')](function(_0x24a8b6){logger[_0x87da('0x13')](_0x87da('0xe'),_0x41d494,_0x24a8b6);_0x114ad3(_0x24a8b6);});});}
\ No newline at end of file
+var _0x37ca=['then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request'];(function(_0x3e3e1f,_0x576859){var _0x2d357c=function(_0x2b4479){while(--_0x2b4479){_0x3e3e1f['push'](_0x3e3e1f['shift']());}};_0x2d357c(++_0x576859);}(_0x37ca,0x112));var _0xa37c=function(_0x30a3bb,_0x4c6979){_0x30a3bb=_0x30a3bb-0x0;var _0x4ffb15=_0x37ca[_0x30a3bb];return _0x4ffb15;};'use strict';var _=require(_0xa37c('0x0'));var util=require(_0xa37c('0x1'));var moment=require(_0xa37c('0x2'));var BPromise=require('bluebird');var rs=require(_0xa37c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa37c('0x4'))['db'];var utils=require(_0xa37c('0x5'));var logger=require(_0xa37c('0x6'))(_0xa37c('0x7'));var config=require(_0xa37c('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xa37c('0x9')][_0xa37c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2c628f,_0xb756e9,_0xd08583){return new BPromise(function(_0x352793,_0x2dde95){return client[_0xa37c('0xb')](_0x2c628f,_0xd08583)[_0xa37c('0xc')](function(_0x933e21){logger[_0xa37c('0xd')](_0xa37c('0xe'),_0xb756e9,_0xa37c('0xf'));logger[_0xa37c('0x10')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0xb756e9,_0xa37c('0xf'),JSON[_0xa37c('0x11')](_0x933e21));if(_0x933e21['error']){if(_0x933e21[_0xa37c('0x12')]['code']===0x1f4){logger[_0xa37c('0x12')](_0xa37c('0xe'),_0xb756e9,_0x933e21['error'][_0xa37c('0x13')]);return _0x2dde95(_0x933e21['error'][_0xa37c('0x13')]);}logger['error'](_0xa37c('0xe'),_0xb756e9,_0x933e21[_0xa37c('0x12')][_0xa37c('0x13')]);return _0x352793(_0x933e21[_0xa37c('0x12')][_0xa37c('0x13')]);}else{logger[_0xa37c('0xd')]('VoiceContext,\x20%s,\x20%s',_0xb756e9,_0xa37c('0xf'));_0x352793(_0x933e21[_0xa37c('0x14')][_0xa37c('0x13')]);}})[_0xa37c('0x15')](function(_0x4e0c1a){logger[_0xa37c('0x12')]('VoiceContext,\x20%s,\x20%s',_0xb756e9,_0x4e0c1a);_0x2dde95(_0x4e0c1a);});});}
\ No newline at end of file
diff --git a/server/api/voiceDialReport/index.js b/server/api/voiceDialReport/index.js
index 348e870..b36a7dd 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 _0x32d9=['../../components/interaction/service','../../config/environment','isAuthenticated','index','/describe','describe','get','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','connect-timeout','express','Router'];(function(_0x38fe15,_0x33f8b2){var _0x168c9c=function(_0x31f064){while(--_0x31f064){_0x38fe15['push'](_0x38fe15['shift']());}};_0x168c9c(++_0x33f8b2);}(_0x32d9,0xe2));var _0x932d=function(_0x3248bd,_0x1958d6){_0x3248bd=_0x3248bd-0x0;var _0x4cd15d=_0x32d9[_0x3248bd];return _0x4cd15d;};'use strict';var multer=require(_0x932d('0x0'));var util=require(_0x932d('0x1'));var path=require('path');var timeout=require(_0x932d('0x2'));var express=require(_0x932d('0x3'));var router=express[_0x932d('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x932d('0x5'));var config=require(_0x932d('0x6'));var controller=require('./voiceDialReport.controller');router['get']('/',auth[_0x932d('0x7')](),controller[_0x932d('0x8')]);router['get'](_0x932d('0x9'),auth[_0x932d('0x7')](),controller[_0x932d('0xa')]);router[_0x932d('0xb')](_0x932d('0xc'),auth[_0x932d('0x7')](),controller[_0x932d('0xd')]);router[_0x932d('0xe')]('/',auth['isAuthenticated'](),controller[_0x932d('0xf')]);router[_0x932d('0x10')](_0x932d('0xc'),auth['isAuthenticated'](),controller[_0x932d('0x11')]);router[_0x932d('0x12')]('/:id',auth['isAuthenticated'](),controller[_0x932d('0x13')]);module[_0x932d('0x14')]=router;
\ No newline at end of file
+var _0xeca2=['post','create','delete','destroy','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./voiceDialReport.controller','get','isAuthenticated','index','/describe','describe','/:id'];(function(_0x46ab1a,_0x1b5cb2){var _0x4a0afd=function(_0xc7746f){while(--_0xc7746f){_0x46ab1a['push'](_0x46ab1a['shift']());}};_0x4a0afd(++_0x1b5cb2);}(_0xeca2,0x83));var _0x2eca=function(_0xab36f5,_0x8eb92a){_0xab36f5=_0xab36f5-0x0;var _0x20c769=_0xeca2[_0xab36f5];return _0x20c769;};'use strict';var multer=require('multer');var util=require(_0x2eca('0x0'));var path=require('path');var timeout=require(_0x2eca('0x1'));var express=require(_0x2eca('0x2'));var router=express[_0x2eca('0x3')]();var auth=require(_0x2eca('0x4'));var interaction=require(_0x2eca('0x5'));var config=require('../../config/environment');var controller=require(_0x2eca('0x6'));router[_0x2eca('0x7')]('/',auth[_0x2eca('0x8')](),controller[_0x2eca('0x9')]);router[_0x2eca('0x7')](_0x2eca('0xa'),auth[_0x2eca('0x8')](),controller[_0x2eca('0xb')]);router['get'](_0x2eca('0xc'),auth[_0x2eca('0x8')](),controller['show']);router[_0x2eca('0xd')]('/',auth['isAuthenticated'](),controller[_0x2eca('0xe')]);router['put'](_0x2eca('0xc'),auth[_0x2eca('0x8')](),controller['update']);router[_0x2eca('0xf')](_0x2eca('0xc'),auth[_0x2eca('0x8')](),controller[_0x2eca('0x10')]);module[_0x2eca('0x11')]=router;
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.attributes.js b/server/api/voiceDialReport/voiceDialReport.attributes.js
index b70fd31..3eb5f15 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 _0x64b5=['sequelize','exports','STRING','INTEGER','DATE','called,connect,complete'];(function(_0x4d8ed9,_0x2ae284){var _0x1e2140=function(_0x9cca89){while(--_0x9cca89){_0x4d8ed9['push'](_0x4d8ed9['shift']());}};_0x1e2140(++_0x2ae284);}(_0x64b5,0xd2));var _0x564b=function(_0x465042,_0x1b1994){_0x465042=_0x465042-0x0;var _0x7eac4=_0x64b5[_0x465042];return _0x7eac4;};'use strict';var Sequelize=require(_0x564b('0x0'));module[_0x564b('0x1')]={'privilege':{'type':Sequelize[_0x564b('0x2')]},'channel':{'type':Sequelize[_0x564b('0x2')]},'channelstate':{'type':Sequelize[_0x564b('0x3')]},'channelstatedesc':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x564b('0x2')]},'calleridname':{'type':Sequelize[_0x564b('0x2')]},'connectedlinenum':{'type':Sequelize[_0x564b('0x2')]},'connectedlinename':{'type':Sequelize[_0x564b('0x2')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x564b('0x2')]},'context':{'type':Sequelize[_0x564b('0x2')]},'exten':{'type':Sequelize[_0x564b('0x2')]},'priority':{'type':Sequelize[_0x564b('0x3')]},'uniqueid':{'type':Sequelize[_0x564b('0x2')]},'linkedid':{'type':Sequelize[_0x564b('0x2')]},'destchannel':{'type':Sequelize[_0x564b('0x2')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0x564b('0x2')]},'destcalleridnum':{'type':Sequelize[_0x564b('0x2')]},'destcalleridname':{'type':Sequelize[_0x564b('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0x564b('0x2')]},'destconnectedlinename':{'type':Sequelize[_0x564b('0x2')]},'destlanguage':{'type':Sequelize[_0x564b('0x2')]},'destaccountcode':{'type':Sequelize[_0x564b('0x2')]},'destcontext':{'type':Sequelize[_0x564b('0x2')]},'destexten':{'type':Sequelize[_0x564b('0x2')]},'destpriority':{'type':Sequelize['INTEGER']},'destuniqueid':{'type':Sequelize[_0x564b('0x2')]},'destlinkedid':{'type':Sequelize['STRING']},'dialstring':{'type':Sequelize[_0x564b('0x2')]},'dialstatus':{'type':Sequelize[_0x564b('0x2')]},'starttime':{'type':Sequelize['DATE']},'answertime':{'type':Sequelize[_0x564b('0x4')]},'endtime':{'type':Sequelize[_0x564b('0x4')]},'lastevent':{'type':Sequelize[_0x564b('0x2')],'comment':_0x564b('0x5')},'routeId':{'type':Sequelize[_0x564b('0x3')]},'duration':{'type':Sequelize[_0x564b('0x3')]},'holdtime':{'type':Sequelize[_0x564b('0x3')]},'billableseconds':{'type':Sequelize[_0x564b('0x3')]}};
\ No newline at end of file
+var _0x5f30=['INTEGER','DATE','called,connect,complete','sequelize','STRING'];(function(_0x46686a,_0x3790f8){var _0x5d267a=function(_0x36dbeb){while(--_0x36dbeb){_0x46686a['push'](_0x46686a['shift']());}};_0x5d267a(++_0x3790f8);}(_0x5f30,0x12a));var _0x05f3=function(_0x561c8c,_0x22bc00){_0x561c8c=_0x561c8c-0x0;var _0x277e5d=_0x5f30[_0x561c8c];return _0x277e5d;};'use strict';var Sequelize=require(_0x05f3('0x0'));module['exports']={'privilege':{'type':Sequelize[_0x05f3('0x1')]},'channel':{'type':Sequelize[_0x05f3('0x1')]},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x05f3('0x1')]},'calleridname':{'type':Sequelize[_0x05f3('0x1')]},'connectedlinenum':{'type':Sequelize[_0x05f3('0x1')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x05f3('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize[_0x05f3('0x1')]},'destchannelstate':{'type':Sequelize[_0x05f3('0x2')]},'destchannelstatedesc':{'type':Sequelize[_0x05f3('0x1')]},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize[_0x05f3('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0x05f3('0x1')]},'destconnectedlinename':{'type':Sequelize[_0x05f3('0x1')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0x05f3('0x1')]},'destcontext':{'type':Sequelize[_0x05f3('0x1')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0x05f3('0x2')]},'destuniqueid':{'type':Sequelize[_0x05f3('0x1')]},'destlinkedid':{'type':Sequelize[_0x05f3('0x1')]},'dialstring':{'type':Sequelize[_0x05f3('0x1')]},'dialstatus':{'type':Sequelize[_0x05f3('0x1')]},'starttime':{'type':Sequelize[_0x05f3('0x3')]},'answertime':{'type':Sequelize[_0x05f3('0x3')]},'endtime':{'type':Sequelize[_0x05f3('0x3')]},'lastevent':{'type':Sequelize[_0x05f3('0x1')],'comment':_0x05f3('0x4')},'routeId':{'type':Sequelize[_0x05f3('0x2')]},'duration':{'type':Sequelize[_0x05f3('0x2')]},'holdtime':{'type':Sequelize[_0x05f3('0x2')]},'billableseconds':{'type':Sequelize[_0x05f3('0x2')]}};
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.controller.js b/server/api/voiceDialReport/voiceDialReport.controller.js
index 34518b3..2f94d48 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 _0xc257=['includeAll','VoiceDialReport','findAll','rows','catch','show','params','keys','rawAttributes','include','options','find','create','body','describe','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','end','status','json','count','offset','limit','set','apply','reject','update','then','destroy','stack','name','send','map','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL'];(function(_0x302570,_0x34472c){var _0x5af2ea=function(_0x28df97){while(--_0x28df97){_0x302570['push'](_0x302570['shift']());}};_0x5af2ea(++_0x34472c);}(_0xc257,0xa7));var _0x7c25=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xc257[_0x5b644e];return _0x49c6bf;};'use strict';var pdf=require(_0x7c25('0x0'));var emlformat=require(_0x7c25('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x7c25('0x2'));var jsonpatch=require(_0x7c25('0x3'));var rp=require(_0x7c25('0x4'));var moment=require(_0x7c25('0x5'));var BPromise=require(_0x7c25('0x6'));var Mustache=require(_0x7c25('0x7'));var util=require(_0x7c25('0x8'));var path=require('path');var sox=require(_0x7c25('0x9'));var csv=require(_0x7c25('0xa'));var ejs=require(_0x7c25('0xb'));var fs=require('fs');var _=require(_0x7c25('0xc'));var squel=require(_0x7c25('0xd'));var crypto=require(_0x7c25('0xe'));var jsforce=require(_0x7c25('0xf'));var deskjs=require(_0x7c25('0x10'));var toCsv=require(_0x7c25('0xa'));var querystring=require(_0x7c25('0x11'));var Papa=require('papaparse');var Redis=require(_0x7c25('0x12'));var authService=require(_0x7c25('0x13'));var qs=require(_0x7c25('0x14'));var as=require(_0x7c25('0x15'));var hardwareService=require(_0x7c25('0x16'));var logger=require('../../config/logger')(_0x7c25('0x17'));var utils=require(_0x7c25('0x18'));var config=require(_0x7c25('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x209496,_0x24e661){_0x24e661=_0x24e661||0xcc;return function(_0x5c4670){if(_0x5c4670){return _0x209496[_0x7c25('0x1a')](_0x24e661);}return _0x209496['status'](_0x24e661)[_0x7c25('0x1b')]();};}function respondWithResult(_0x28dab9,_0x1113af){_0x1113af=_0x1113af||0xc8;return function(_0x2398a6){if(_0x2398a6){return _0x28dab9[_0x7c25('0x1c')](_0x1113af)[_0x7c25('0x1d')](_0x2398a6);}};}function respondWithFilteredResult(_0x359b0b,_0x6ef3bc){return function(_0x2b39a7){if(_0x2b39a7){var _0x218a4b=_0x2b39a7[_0x7c25('0x1e')],_0x1fbced=_0x6ef3bc[_0x7c25('0x1f')],_0x27e199=_0x6ef3bc[_0x7c25('0x1f')]+_0x6ef3bc[_0x7c25('0x20')],_0x2e7cec;if(_0x27e199>=_0x218a4b){_0x27e199=_0x218a4b;_0x2e7cec=0xc8;}else{_0x2e7cec=0xce;}_0x359b0b[_0x7c25('0x1c')](_0x2e7cec);return _0x359b0b[_0x7c25('0x21')]('Content-Range',_0x1fbced+'-'+_0x27e199+'/'+_0x218a4b)[_0x7c25('0x1d')](_0x2b39a7);}return null;};}function patchUpdates(_0x5e4664){return function(_0xf47c3f){try{jsonpatch[_0x7c25('0x22')](_0xf47c3f,_0x5e4664,!![]);}catch(_0x12cffa){return BPromise[_0x7c25('0x23')](_0x12cffa);}return _0xf47c3f['save']();};}function saveUpdates(_0x24819e,_0xa6f362){return function(_0x51ad0e){if(_0x51ad0e){return _0x51ad0e[_0x7c25('0x24')](_0x24819e)[_0x7c25('0x25')](function(_0x521625){return _0x521625;});}return null;};}function removeEntity(_0x348433,_0x53679e){return function(_0x3eec2a){if(_0x3eec2a){return _0x3eec2a[_0x7c25('0x26')]()['then'](function(){_0x348433[_0x7c25('0x1c')](0xcc)[_0x7c25('0x1b')]();});}};}function handleEntityNotFound(_0x5efb23,_0xb2557a){return function(_0x43ad47){if(!_0x43ad47){_0x5efb23[_0x7c25('0x1a')](0x194);}return _0x43ad47;};}function handleError(_0x35317f,_0x56776e){_0x56776e=_0x56776e||0x1f4;return function(_0x1f43b3){logger['error'](_0x1f43b3[_0x7c25('0x27')]);if(_0x1f43b3[_0x7c25('0x28')]){delete _0x1f43b3[_0x7c25('0x28')];}_0x35317f['status'](_0x56776e)[_0x7c25('0x29')](_0x1f43b3);};}exports['index']=function(_0x2a41a1,_0x3ab746){var _0x5bcf92={},_0x554dfe={},_0x3c173b={'count':0x0,'rows':[]};var _0x2a5863=_[_0x7c25('0x2a')](db['VoiceDialReport']['rawAttributes'],function(_0x23bfcc){return{'name':_0x23bfcc[_0x7c25('0x2b')],'type':_0x23bfcc[_0x7c25('0x2c')][_0x7c25('0x2d')]};});_0x554dfe[_0x7c25('0x2e')]=_[_0x7c25('0x2a')](_0x2a5863,'name');_0x554dfe[_0x7c25('0x2f')]=_['keys'](_0x2a41a1[_0x7c25('0x2f')]);_0x554dfe[_0x7c25('0x30')]=_[_0x7c25('0x31')](_0x554dfe[_0x7c25('0x2e')],_0x554dfe[_0x7c25('0x2f')]);_0x5bcf92[_0x7c25('0x32')]=_[_0x7c25('0x31')](_0x554dfe['model'],qs[_0x7c25('0x33')](_0x2a41a1[_0x7c25('0x2f')]['fields']));_0x5bcf92[_0x7c25('0x32')]=_0x5bcf92['attributes'][_0x7c25('0x34')]?_0x5bcf92[_0x7c25('0x32')]:_0x554dfe[_0x7c25('0x2e')];if(!_0x2a41a1[_0x7c25('0x2f')][_0x7c25('0x35')](_0x7c25('0x36'))){_0x5bcf92[_0x7c25('0x20')]=qs['limit'](_0x2a41a1['query']['limit']);_0x5bcf92[_0x7c25('0x1f')]=qs[_0x7c25('0x1f')](_0x2a41a1[_0x7c25('0x2f')][_0x7c25('0x1f')]);}_0x5bcf92[_0x7c25('0x37')]=qs['sort'](_0x2a41a1[_0x7c25('0x2f')][_0x7c25('0x38')]);_0x5bcf92[_0x7c25('0x39')]=qs['filters'](_['pick'](_0x2a41a1[_0x7c25('0x2f')],_0x554dfe[_0x7c25('0x30')]));if(_0x2a41a1[_0x7c25('0x2f')][_0x7c25('0x3a')]){_0x5bcf92[_0x7c25('0x39')]=_[_0x7c25('0x3b')](_0x5bcf92['where'],{'$or':_[_0x7c25('0x2a')](_0x2a5863,function(_0x23419d){if(_0x23419d[_0x7c25('0x2c')]!==_0x7c25('0x3c')){var _0x13bf3a={};_0x13bf3a[_0x23419d[_0x7c25('0x28')]]={'$like':'%'+_0x2a41a1[_0x7c25('0x2f')][_0x7c25('0x3a')]+'%'};return _0x13bf3a;}})});}_0x5bcf92=_[_0x7c25('0x3b')]({},_0x5bcf92,_0x2a41a1['options']);var _0x20bd10={'where':_0x5bcf92['where']};return db['VoiceDialReport'][_0x7c25('0x1e')](_0x20bd10)[_0x7c25('0x25')](function(_0x1b122e){_0x3c173b[_0x7c25('0x1e')]=_0x1b122e;if(_0x2a41a1[_0x7c25('0x2f')][_0x7c25('0x3d')]){_0x5bcf92['include']=[{'all':!![]}];}return db[_0x7c25('0x3e')][_0x7c25('0x3f')](_0x5bcf92);})[_0x7c25('0x25')](function(_0x4414e0){_0x3c173b[_0x7c25('0x40')]=_0x4414e0;return _0x3c173b;})[_0x7c25('0x25')](respondWithFilteredResult(_0x3ab746,_0x5bcf92))[_0x7c25('0x41')](handleError(_0x3ab746,null));};exports[_0x7c25('0x42')]=function(_0x12324e,_0x317058){var _0x2bf86f={'raw':!![],'where':{'id':_0x12324e[_0x7c25('0x43')]['id']}},_0x902769={};_0x902769[_0x7c25('0x2e')]=_[_0x7c25('0x44')](db[_0x7c25('0x3e')][_0x7c25('0x45')]);_0x902769[_0x7c25('0x2f')]=_[_0x7c25('0x44')](_0x12324e['query']);_0x902769[_0x7c25('0x30')]=_[_0x7c25('0x31')](_0x902769[_0x7c25('0x2e')],_0x902769[_0x7c25('0x2f')]);_0x2bf86f[_0x7c25('0x32')]=_['intersection'](_0x902769['model'],qs['fields'](_0x12324e[_0x7c25('0x2f')][_0x7c25('0x33')]));_0x2bf86f[_0x7c25('0x32')]=_0x2bf86f[_0x7c25('0x32')][_0x7c25('0x34')]?_0x2bf86f[_0x7c25('0x32')]:_0x902769[_0x7c25('0x2e')];if(_0x12324e[_0x7c25('0x2f')][_0x7c25('0x3d')]){_0x2bf86f[_0x7c25('0x46')]=[{'all':!![]}];}_0x2bf86f=_[_0x7c25('0x3b')]({},_0x2bf86f,_0x12324e[_0x7c25('0x47')]);return db[_0x7c25('0x3e')][_0x7c25('0x48')](_0x2bf86f)['then'](handleEntityNotFound(_0x317058,null))[_0x7c25('0x25')](respondWithResult(_0x317058,null))[_0x7c25('0x41')](handleError(_0x317058,null));};exports[_0x7c25('0x49')]=function(_0x14743a,_0x396b26){return db['VoiceDialReport'][_0x7c25('0x49')](_0x14743a['body'],{})[_0x7c25('0x25')](respondWithResult(_0x396b26,0xc9))[_0x7c25('0x41')](handleError(_0x396b26,null));};exports['update']=function(_0x303c13,_0x390e3f){if(_0x303c13[_0x7c25('0x4a')]['id']){delete _0x303c13['body']['id'];}return db[_0x7c25('0x3e')][_0x7c25('0x48')]({'where':{'id':_0x303c13[_0x7c25('0x43')]['id']}})[_0x7c25('0x25')](handleEntityNotFound(_0x390e3f,null))[_0x7c25('0x25')](saveUpdates(_0x303c13[_0x7c25('0x4a')],null))[_0x7c25('0x25')](respondWithResult(_0x390e3f,null))[_0x7c25('0x41')](handleError(_0x390e3f,null));};exports[_0x7c25('0x26')]=function(_0x30dea7,_0x183fd8){return db[_0x7c25('0x3e')][_0x7c25('0x48')]({'where':{'id':_0x30dea7['params']['id']}})[_0x7c25('0x25')](handleEntityNotFound(_0x183fd8,null))['then'](removeEntity(_0x183fd8,null))[_0x7c25('0x41')](handleError(_0x183fd8,null));};exports['describe']=function(_0x4e9106,_0x2fd412){return db[_0x7c25('0x3e')][_0x7c25('0x4b')]()[_0x7c25('0x25')](respondWithResult(_0x2fd412,null))[_0x7c25('0x41')](handleError(_0x2fd412,null));};
\ No newline at end of file
+var _0x667f=['zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','squel','crypto','desk.js','ioredis','../../components/auth/service','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','Content-Range','reject','save','destroy','error','stack','name','send','index','map','VoiceDialReport','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','then','includeAll','include','findAll','rows','catch','show','params','create','body','update','find','describe','html-pdf','eml-format','rimraf'];(function(_0x1f76ff,_0xd47cbe){var _0x8f87a0=function(_0x54838f){while(--_0x54838f){_0x1f76ff['push'](_0x1f76ff['shift']());}};_0x8f87a0(++_0xd47cbe);}(_0x667f,0x8d));var _0xf667=function(_0x4476f2,_0x3f5c4b){_0x4476f2=_0x4476f2-0x0;var _0x2b7018=_0x667f[_0x4476f2];return _0x2b7018;};'use strict';var pdf=require(_0xf667('0x0'));var emlformat=require(_0xf667('0x1'));var rimraf=require(_0xf667('0x2'));var zipdir=require(_0xf667('0x3'));var jsonpatch=require(_0xf667('0x4'));var rp=require('request-promise');var moment=require(_0xf667('0x5'));var BPromise=require(_0xf667('0x6'));var Mustache=require(_0xf667('0x7'));var util=require(_0xf667('0x8'));var path=require('path');var sox=require(_0xf667('0x9'));var csv=require(_0xf667('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0xf667('0xb'));var crypto=require(_0xf667('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xf667('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xf667('0xe'));var authService=require(_0xf667('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xf667('0x10'));var utils=require(_0xf667('0x11'));var config=require(_0xf667('0x12'));var db=require(_0xf667('0x13'))['db'];function respondWithStatusCode(_0x212fea,_0x5415c3){_0x5415c3=_0x5415c3||0xcc;return function(_0x21e78b){if(_0x21e78b){return _0x212fea[_0xf667('0x14')](_0x5415c3);}return _0x212fea['status'](_0x5415c3)[_0xf667('0x15')]();};}function respondWithResult(_0x2fe06f,_0x2440f3){_0x2440f3=_0x2440f3||0xc8;return function(_0x3d2f31){if(_0x3d2f31){return _0x2fe06f[_0xf667('0x16')](_0x2440f3)[_0xf667('0x17')](_0x3d2f31);}};}function respondWithFilteredResult(_0x4fe106,_0x1e741a){return function(_0x7f7511){if(_0x7f7511){var _0x422cfc=_0x7f7511[_0xf667('0x18')],_0x46595c=_0x1e741a[_0xf667('0x19')],_0x11391a=_0x1e741a[_0xf667('0x19')]+_0x1e741a[_0xf667('0x1a')],_0x328140;if(_0x11391a>=_0x422cfc){_0x11391a=_0x422cfc;_0x328140=0xc8;}else{_0x328140=0xce;}_0x4fe106[_0xf667('0x16')](_0x328140);return _0x4fe106['set'](_0xf667('0x1b'),_0x46595c+'-'+_0x11391a+'/'+_0x422cfc)['json'](_0x7f7511);}return null;};}function patchUpdates(_0x3f107b){return function(_0x3b8175){try{jsonpatch['apply'](_0x3b8175,_0x3f107b,!![]);}catch(_0x44d17b){return BPromise[_0xf667('0x1c')](_0x44d17b);}return _0x3b8175[_0xf667('0x1d')]();};}function saveUpdates(_0x309c64,_0x1dab6d){return function(_0x5b3c0b){if(_0x5b3c0b){return _0x5b3c0b['update'](_0x309c64)['then'](function(_0x2d4078){return _0x2d4078;});}return null;};}function removeEntity(_0x3f12e3,_0x4ca424){return function(_0x4fd7fc){if(_0x4fd7fc){return _0x4fd7fc[_0xf667('0x1e')]()['then'](function(){_0x3f12e3['status'](0xcc)[_0xf667('0x15')]();});}};}function handleEntityNotFound(_0x226c1e,_0x41b352){return function(_0x4455f0){if(!_0x4455f0){_0x226c1e[_0xf667('0x14')](0x194);}return _0x4455f0;};}function handleError(_0x155a27,_0x230d7a){_0x230d7a=_0x230d7a||0x1f4;return function(_0x26fc5d){logger[_0xf667('0x1f')](_0x26fc5d[_0xf667('0x20')]);if(_0x26fc5d[_0xf667('0x21')]){delete _0x26fc5d[_0xf667('0x21')];}_0x155a27['status'](_0x230d7a)[_0xf667('0x22')](_0x26fc5d);};}exports[_0xf667('0x23')]=function(_0x40b475,_0x575dbc){var _0x2a865d={},_0x13b8cd={},_0x18a416={'count':0x0,'rows':[]};var _0x146526=_[_0xf667('0x24')](db[_0xf667('0x25')][_0xf667('0x26')],function(_0x49223b){return{'name':_0x49223b[_0xf667('0x27')],'type':_0x49223b[_0xf667('0x28')]['key']};});_0x13b8cd['model']=_[_0xf667('0x24')](_0x146526,'name');_0x13b8cd[_0xf667('0x29')]=_[_0xf667('0x2a')](_0x40b475['query']);_0x13b8cd[_0xf667('0x2b')]=_[_0xf667('0x2c')](_0x13b8cd[_0xf667('0x2d')],_0x13b8cd[_0xf667('0x29')]);_0x2a865d[_0xf667('0x2e')]=_[_0xf667('0x2c')](_0x13b8cd['model'],qs['fields'](_0x40b475['query'][_0xf667('0x2f')]));_0x2a865d[_0xf667('0x2e')]=_0x2a865d[_0xf667('0x2e')][_0xf667('0x30')]?_0x2a865d[_0xf667('0x2e')]:_0x13b8cd[_0xf667('0x2d')];if(!_0x40b475[_0xf667('0x29')][_0xf667('0x31')](_0xf667('0x32'))){_0x2a865d['limit']=qs['limit'](_0x40b475[_0xf667('0x29')]['limit']);_0x2a865d[_0xf667('0x19')]=qs[_0xf667('0x19')](_0x40b475[_0xf667('0x29')][_0xf667('0x19')]);}_0x2a865d[_0xf667('0x33')]=qs['sort'](_0x40b475[_0xf667('0x29')][_0xf667('0x34')]);_0x2a865d[_0xf667('0x35')]=qs[_0xf667('0x2b')](_[_0xf667('0x36')](_0x40b475[_0xf667('0x29')],_0x13b8cd[_0xf667('0x2b')]));if(_0x40b475[_0xf667('0x29')][_0xf667('0x37')]){_0x2a865d[_0xf667('0x35')]=_[_0xf667('0x38')](_0x2a865d[_0xf667('0x35')],{'$or':_[_0xf667('0x24')](_0x146526,function(_0x44a11f){if(_0x44a11f[_0xf667('0x28')]!==_0xf667('0x39')){var _0x41dfbb={};_0x41dfbb[_0x44a11f['name']]={'$like':'%'+_0x40b475[_0xf667('0x29')][_0xf667('0x37')]+'%'};return _0x41dfbb;}})});}_0x2a865d=_[_0xf667('0x38')]({},_0x2a865d,_0x40b475[_0xf667('0x3a')]);var _0x1e9896={'where':_0x2a865d[_0xf667('0x35')]};return db[_0xf667('0x25')]['count'](_0x1e9896)[_0xf667('0x3b')](function(_0x2b71f7){_0x18a416['count']=_0x2b71f7;if(_0x40b475[_0xf667('0x29')][_0xf667('0x3c')]){_0x2a865d[_0xf667('0x3d')]=[{'all':!![]}];}return db[_0xf667('0x25')][_0xf667('0x3e')](_0x2a865d);})[_0xf667('0x3b')](function(_0x6cbe02){_0x18a416[_0xf667('0x3f')]=_0x6cbe02;return _0x18a416;})[_0xf667('0x3b')](respondWithFilteredResult(_0x575dbc,_0x2a865d))[_0xf667('0x40')](handleError(_0x575dbc,null));};exports[_0xf667('0x41')]=function(_0x3f1ca9,_0xeec665){var _0x3c6433={'raw':!![],'where':{'id':_0x3f1ca9[_0xf667('0x42')]['id']}},_0x113c1e={};_0x113c1e[_0xf667('0x2d')]=_['keys'](db[_0xf667('0x25')]['rawAttributes']);_0x113c1e[_0xf667('0x29')]=_[_0xf667('0x2a')](_0x3f1ca9[_0xf667('0x29')]);_0x113c1e[_0xf667('0x2b')]=_[_0xf667('0x2c')](_0x113c1e[_0xf667('0x2d')],_0x113c1e[_0xf667('0x29')]);_0x3c6433[_0xf667('0x2e')]=_['intersection'](_0x113c1e[_0xf667('0x2d')],qs[_0xf667('0x2f')](_0x3f1ca9['query'][_0xf667('0x2f')]));_0x3c6433['attributes']=_0x3c6433['attributes'][_0xf667('0x30')]?_0x3c6433[_0xf667('0x2e')]:_0x113c1e[_0xf667('0x2d')];if(_0x3f1ca9[_0xf667('0x29')][_0xf667('0x3c')]){_0x3c6433['include']=[{'all':!![]}];}_0x3c6433=_[_0xf667('0x38')]({},_0x3c6433,_0x3f1ca9[_0xf667('0x3a')]);return db[_0xf667('0x25')]['find'](_0x3c6433)[_0xf667('0x3b')](handleEntityNotFound(_0xeec665,null))[_0xf667('0x3b')](respondWithResult(_0xeec665,null))[_0xf667('0x40')](handleError(_0xeec665,null));};exports['create']=function(_0x47bb39,_0x1a5ec2){return db['VoiceDialReport'][_0xf667('0x43')](_0x47bb39[_0xf667('0x44')],{})[_0xf667('0x3b')](respondWithResult(_0x1a5ec2,0xc9))[_0xf667('0x40')](handleError(_0x1a5ec2,null));};exports[_0xf667('0x45')]=function(_0x1c3707,_0x4174f9){if(_0x1c3707[_0xf667('0x44')]['id']){delete _0x1c3707[_0xf667('0x44')]['id'];}return db['VoiceDialReport'][_0xf667('0x46')]({'where':{'id':_0x1c3707[_0xf667('0x42')]['id']}})[_0xf667('0x3b')](handleEntityNotFound(_0x4174f9,null))[_0xf667('0x3b')](saveUpdates(_0x1c3707['body'],null))[_0xf667('0x3b')](respondWithResult(_0x4174f9,null))[_0xf667('0x40')](handleError(_0x4174f9,null));};exports[_0xf667('0x1e')]=function(_0x958dc3,_0x2e428a){return db[_0xf667('0x25')][_0xf667('0x46')]({'where':{'id':_0x958dc3[_0xf667('0x42')]['id']}})[_0xf667('0x3b')](handleEntityNotFound(_0x2e428a,null))[_0xf667('0x3b')](removeEntity(_0x2e428a,null))[_0xf667('0x40')](handleError(_0x2e428a,null));};exports[_0xf667('0x47')]=function(_0x19f580,_0x39d50a){return db[_0xf667('0x25')]['describe']()[_0xf667('0x3b')](respondWithResult(_0x39d50a,null))[_0xf667('0x40')](handleError(_0x39d50a,null));};
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.model.js b/server/api/voiceDialReport/voiceDialReport.model.js
index 8669549..2d0c481 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 _0xcfa9=['./voiceDialReport.attributes','exports','define','VoiceDialReport','report_dial','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x2ef1a5,_0x596eb1){var _0x1e1e9d=function(_0x5365e5){while(--_0x5365e5){_0x2ef1a5['push'](_0x2ef1a5['shift']());}};_0x1e1e9d(++_0x596eb1);}(_0xcfa9,0xf6));var _0x9cfa=function(_0x131129,_0x374ca1){_0x131129=_0x131129-0x0;var _0x47364c=_0xcfa9[_0x131129];return _0x47364c;};'use strict';var _=require(_0x9cfa('0x0'));var util=require(_0x9cfa('0x1'));var logger=require(_0x9cfa('0x2'))(_0x9cfa('0x3'));var moment=require(_0x9cfa('0x4'));var BPromise=require(_0x9cfa('0x5'));var rp=require(_0x9cfa('0x6'));var fs=require('fs');var path=require(_0x9cfa('0x7'));var rimraf=require(_0x9cfa('0x8'));var config=require(_0x9cfa('0x9'));var attributes=require(_0x9cfa('0xa'));module[_0x9cfa('0xb')]=function(_0x248ab8,_0x404b73){return _0x248ab8[_0x9cfa('0xc')](_0x9cfa('0xd'),attributes,{'tableName':_0x9cfa('0xe'),'paranoid':![],'indexes':[{'fields':[_0x9cfa('0xf')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x052e=['./voiceDialReport.attributes','exports','define','VoiceDialReport','report_dial','uniqueid','util','../../config/logger','bluebird','request-promise','path','rimraf'];(function(_0x114e52,_0x36b5fc){var _0x3d036a=function(_0x58db8d){while(--_0x58db8d){_0x114e52['push'](_0x114e52['shift']());}};_0x3d036a(++_0x36b5fc);}(_0x052e,0xa2));var _0xe052=function(_0x47ae44,_0x1ecf33){_0x47ae44=_0x47ae44-0x0;var _0x37c675=_0x052e[_0x47ae44];return _0x37c675;};'use strict';var _=require('lodash');var util=require(_0xe052('0x0'));var logger=require(_0xe052('0x1'))('api');var moment=require('moment');var BPromise=require(_0xe052('0x2'));var rp=require(_0xe052('0x3'));var fs=require('fs');var path=require(_0xe052('0x4'));var rimraf=require(_0xe052('0x5'));var config=require('../../config/environment');var attributes=require(_0xe052('0x6'));module[_0xe052('0x7')]=function(_0x339248,_0x5d5fb4){return _0x339248[_0xe052('0x8')](_0xe052('0x9'),attributes,{'tableName':_0xe052('0xa'),'paranoid':![],'indexes':[{'fields':[_0xe052('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceDialReport/voiceDialReport.rpc.js b/server/api/voiceDialReport/voiceDialReport.rpc.js
index ac697b2..8cdc375 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 _0xb43b=['error','message','result','catch','CreateVoiceDialReport','create','body','options','info','VoiceDialReport','update','raw','where','attributes','limit','UpdateVoiceDialReport','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x3beaaf,_0xc0a0a0){var _0x31595c=function(_0x5a87b7){while(--_0x5a87b7){_0x3beaaf['push'](_0x3beaaf['shift']());}};_0x31595c(++_0xc0a0a0);}(_0xb43b,0xbf));var _0xbb43=function(_0x467e9b,_0x41d455){_0x467e9b=_0x467e9b-0x0;var _0x5f2c7d=_0xb43b[_0x467e9b];return _0x5f2c7d;};'use strict';var _=require(_0xbb43('0x0'));var util=require('util');var moment=require(_0xbb43('0x1'));var BPromise=require(_0xbb43('0x2'));var rs=require(_0xbb43('0x3'));var fs=require('fs');var Redis=require(_0xbb43('0x4'));var db=require(_0xbb43('0x5'))['db'];var utils=require(_0xbb43('0x6'));var logger=require(_0xbb43('0x7'))(_0xbb43('0x8'));var config=require(_0xbb43('0x9'));var jayson=require(_0xbb43('0xa'));var client=jayson[_0xbb43('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x16fc1c,_0x4a070c,_0x54806a){return new BPromise(function(_0x33f9a8,_0x120d67){return client[_0xbb43('0xc')](_0x16fc1c,_0x54806a)[_0xbb43('0xd')](function(_0x117f4d){logger['info'](_0xbb43('0xe'),_0x4a070c,_0xbb43('0xf'));logger[_0xbb43('0x10')](_0xbb43('0x11'),_0x4a070c,'request\x20sent',JSON[_0xbb43('0x12')](_0x117f4d));if(_0x117f4d[_0xbb43('0x13')]){if(_0x117f4d['error']['code']===0x1f4){logger['error'](_0xbb43('0xe'),_0x4a070c,_0x117f4d['error'][_0xbb43('0x14')]);return _0x120d67(_0x117f4d['error'][_0xbb43('0x14')]);}logger[_0xbb43('0x13')](_0xbb43('0xe'),_0x4a070c,_0x117f4d[_0xbb43('0x13')][_0xbb43('0x14')]);return _0x33f9a8(_0x117f4d['error'][_0xbb43('0x14')]);}else{logger['info'](_0xbb43('0xe'),_0x4a070c,_0xbb43('0xf'));_0x33f9a8(_0x117f4d[_0xbb43('0x15')][_0xbb43('0x14')]);}})[_0xbb43('0x16')](function(_0x126f61){logger[_0xbb43('0x13')](_0xbb43('0xe'),_0x4a070c,_0x126f61);_0x120d67(_0x126f61);});});}exports[_0xbb43('0x17')]=function(_0x4c223b){var _0xe15a1b=this;return new Promise(function(_0x4cb0b2,_0x78df91){return db['VoiceDialReport'][_0xbb43('0x18')](_0x4c223b[_0xbb43('0x19')],{'raw':_0x4c223b[_0xbb43('0x1a')]?_0x4c223b[_0xbb43('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0xbb43('0xd')](function(_0x6cdc26){logger[_0xbb43('0x1b')](_0xbb43('0x17'),_0x4c223b);logger[_0xbb43('0x10')](_0xbb43('0x17'),_0x4c223b,JSON[_0xbb43('0x12')](_0x6cdc26));_0x4cb0b2(_0x6cdc26);})[_0xbb43('0x16')](function(_0x3409d0){logger[_0xbb43('0x13')](_0xbb43('0x17'),_0x3409d0[_0xbb43('0x14')],_0x4c223b);_0x78df91(_0xe15a1b[_0xbb43('0x13')](0x1f4,_0x3409d0[_0xbb43('0x14')]));});});};exports['UpdateVoiceDialReport']=function(_0x28b3e4){var _0x326864=this;return new Promise(function(_0x54a9aa,_0x464b4a){return db[_0xbb43('0x1c')][_0xbb43('0x1d')](_0x28b3e4['body'],{'raw':_0x28b3e4['options']?_0x28b3e4[_0xbb43('0x1a')][_0xbb43('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x28b3e4['options']?_0x28b3e4['options'][_0xbb43('0x1f')]||null:null,'attributes':_0x28b3e4[_0xbb43('0x1a')]?_0x28b3e4[_0xbb43('0x1a')][_0xbb43('0x20')]||null:null,'limit':_0x28b3e4[_0xbb43('0x1a')]?_0x28b3e4[_0xbb43('0x1a')][_0xbb43('0x21')]||null:null})[_0xbb43('0xd')](function(_0x5d613c){logger[_0xbb43('0x1b')](_0xbb43('0x22'),_0x28b3e4);logger[_0xbb43('0x10')](_0xbb43('0x22'),_0x28b3e4,JSON[_0xbb43('0x12')](_0x5d613c));_0x54a9aa(_0x5d613c);})[_0xbb43('0x16')](function(_0x2860d8){logger['error'](_0xbb43('0x22'),_0x2860d8[_0xbb43('0x14')],_0x28b3e4);_0x464b4a(_0x326864[_0xbb43('0x13')](0x1f4,_0x2860d8['message']));});});};
\ No newline at end of file
+var _0x0434=['lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','CreateVoiceDialReport','VoiceDialReport','create','body','options','UpdateVoiceDialReport','update','raw','where','limit'];(function(_0x1fe3e1,_0x463df1){var _0x9aac4b=function(_0x481c44){while(--_0x481c44){_0x1fe3e1['push'](_0x1fe3e1['shift']());}};_0x9aac4b(++_0x463df1);}(_0x0434,0x1ad));var _0x4043=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x0434[_0x57b54c];return _0x59cc19;};'use strict';var _=require(_0x4043('0x0'));var util=require(_0x4043('0x1'));var moment=require(_0x4043('0x2'));var BPromise=require(_0x4043('0x3'));var rs=require(_0x4043('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x4043('0x5'));var logger=require(_0x4043('0x6'))(_0x4043('0x7'));var config=require(_0x4043('0x8'));var jayson=require(_0x4043('0x9'));var client=jayson[_0x4043('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x41d0a9,_0x1ed6c4,_0x5080e5){return new BPromise(function(_0x56355c,_0x14694d){return client[_0x4043('0xb')](_0x41d0a9,_0x5080e5)[_0x4043('0xc')](function(_0x31cb1f){logger[_0x4043('0xd')](_0x4043('0xe'),_0x1ed6c4,_0x4043('0xf'));logger[_0x4043('0x10')]('VoiceDialReport,\x20%s,\x20%s,\x20%s',_0x1ed6c4,_0x4043('0xf'),JSON[_0x4043('0x11')](_0x31cb1f));if(_0x31cb1f[_0x4043('0x12')]){if(_0x31cb1f[_0x4043('0x12')][_0x4043('0x13')]===0x1f4){logger['error'](_0x4043('0xe'),_0x1ed6c4,_0x31cb1f[_0x4043('0x12')][_0x4043('0x14')]);return _0x14694d(_0x31cb1f[_0x4043('0x12')][_0x4043('0x14')]);}logger['error'](_0x4043('0xe'),_0x1ed6c4,_0x31cb1f[_0x4043('0x12')][_0x4043('0x14')]);return _0x56355c(_0x31cb1f[_0x4043('0x12')][_0x4043('0x14')]);}else{logger[_0x4043('0xd')](_0x4043('0xe'),_0x1ed6c4,_0x4043('0xf'));_0x56355c(_0x31cb1f[_0x4043('0x15')][_0x4043('0x14')]);}})[_0x4043('0x16')](function(_0x38aefa){logger['error'](_0x4043('0xe'),_0x1ed6c4,_0x38aefa);_0x14694d(_0x38aefa);});});}exports[_0x4043('0x17')]=function(_0x7c7b2e){var _0x5ccdcd=this;return new Promise(function(_0x3767ed,_0x451058){return db[_0x4043('0x18')][_0x4043('0x19')](_0x7c7b2e[_0x4043('0x1a')],{'raw':_0x7c7b2e['options']?_0x7c7b2e[_0x4043('0x1b')]['raw']===undefined?!![]:![]:!![]})[_0x4043('0xc')](function(_0x2bc032){logger[_0x4043('0xd')](_0x4043('0x17'),_0x7c7b2e);logger[_0x4043('0x10')](_0x4043('0x17'),_0x7c7b2e,JSON['stringify'](_0x2bc032));_0x3767ed(_0x2bc032);})[_0x4043('0x16')](function(_0x3339dd){logger['error']('CreateVoiceDialReport',_0x3339dd[_0x4043('0x14')],_0x7c7b2e);_0x451058(_0x5ccdcd['error'](0x1f4,_0x3339dd['message']));});});};exports[_0x4043('0x1c')]=function(_0x42a207){var _0x5068c3=this;return new Promise(function(_0x121096,_0x1d7f85){return db[_0x4043('0x18')][_0x4043('0x1d')](_0x42a207[_0x4043('0x1a')],{'raw':_0x42a207[_0x4043('0x1b')]?_0x42a207[_0x4043('0x1b')][_0x4043('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x42a207['options']?_0x42a207['options'][_0x4043('0x1f')]||null:null,'attributes':_0x42a207[_0x4043('0x1b')]?_0x42a207[_0x4043('0x1b')]['attributes']||null:null,'limit':_0x42a207['options']?_0x42a207[_0x4043('0x1b')][_0x4043('0x20')]||null:null})['then'](function(_0x3cbbf1){logger[_0x4043('0xd')]('UpdateVoiceDialReport',_0x42a207);logger[_0x4043('0x10')]('UpdateVoiceDialReport',_0x42a207,JSON[_0x4043('0x11')](_0x3cbbf1));_0x121096(_0x3cbbf1);})[_0x4043('0x16')](function(_0x21509){logger[_0x4043('0x12')](_0x4043('0x1c'),_0x21509[_0x4043('0x14')],_0x42a207);_0x1d7f85(_0x5068c3['error'](0x1f4,_0x21509[_0x4043('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceExtension/index.js b/server/api/voiceExtension/index.js
index 1234006..2c3eb9e 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 _0x6992=['update','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','/:id/applications','put'];(function(_0x16e278,_0x1ead88){var _0x47b16e=function(_0x3ced98){while(--_0x3ced98){_0x16e278['push'](_0x16e278['shift']());}};_0x47b16e(++_0x1ead88);}(_0x6992,0x168));var _0x2699=function(_0x1bc814,_0x14e3cc){_0x1bc814=_0x1bc814-0x0;var _0x11bdd5=_0x6992[_0x1bc814];return _0x11bdd5;};'use strict';var multer=require(_0x2699('0x0'));var util=require(_0x2699('0x1'));var path=require(_0x2699('0x2'));var timeout=require(_0x2699('0x3'));var express=require(_0x2699('0x4'));var router=express[_0x2699('0x5')]();var auth=require(_0x2699('0x6'));var interaction=require(_0x2699('0x7'));var config=require(_0x2699('0x8'));var controller=require('./voiceExtension.controller');router[_0x2699('0x9')]('/',auth[_0x2699('0xa')](),controller[_0x2699('0xb')]);router['get'](_0x2699('0xc'),auth[_0x2699('0xa')](),controller[_0x2699('0xd')]);router[_0x2699('0xe')]('/',auth[_0x2699('0xa')](),controller[_0x2699('0xf')]);router[_0x2699('0xe')](_0x2699('0x10'),auth[_0x2699('0xa')](),controller['addApplications']);router[_0x2699('0x11')](_0x2699('0xc'),auth[_0x2699('0xa')](),controller[_0x2699('0x12')]);router[_0x2699('0x13')](_0x2699('0xc'),auth[_0x2699('0xa')](),controller['destroy']);module[_0x2699('0x14')]=router;
\ No newline at end of file
+var _0x9cf9=['../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceExtension.controller','get','isAuthenticated','index','/:id','show','create','/:id/applications','addApplications','delete','destroy','multer','path','connect-timeout','express','Router'];(function(_0x541987,_0x1c646c){var _0x29e7ae=function(_0x595a6e){while(--_0x595a6e){_0x541987['push'](_0x541987['shift']());}};_0x29e7ae(++_0x1c646c);}(_0x9cf9,0x6d));var _0x99cf=function(_0xec3825,_0x134394){_0xec3825=_0xec3825-0x0;var _0x296d10=_0x9cf9[_0xec3825];return _0x296d10;};'use strict';var multer=require(_0x99cf('0x0'));var util=require('util');var path=require(_0x99cf('0x1'));var timeout=require(_0x99cf('0x2'));var express=require(_0x99cf('0x3'));var router=express[_0x99cf('0x4')]();var auth=require(_0x99cf('0x5'));var interaction=require(_0x99cf('0x6'));var config=require(_0x99cf('0x7'));var controller=require(_0x99cf('0x8'));router[_0x99cf('0x9')]('/',auth[_0x99cf('0xa')](),controller[_0x99cf('0xb')]);router[_0x99cf('0x9')](_0x99cf('0xc'),auth[_0x99cf('0xa')](),controller[_0x99cf('0xd')]);router['post']('/',auth[_0x99cf('0xa')](),controller[_0x99cf('0xe')]);router['post'](_0x99cf('0xf'),auth[_0x99cf('0xa')](),controller[_0x99cf('0x10')]);router['put'](_0x99cf('0xc'),auth[_0x99cf('0xa')](),controller['update']);router[_0x99cf('0x11')]('/:id',auth[_0x99cf('0xa')](),controller[_0x99cf('0x12')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.attributes.js b/server/api/voiceExtension/voiceExtension.attributes.js
index 8ab6a77..80d3d9e 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 _0xa9e0=['*,*,*,*','INTEGER','BOOLEAN','VIRTUAL','getDataValue','exten','sequelize','exports','STRING','compositeIndex','NoOp','inbound','outbound','internal','system'];(function(_0x813cc2,_0x2ef8c2){var _0x5a0552=function(_0x2de57d){while(--_0x2de57d){_0x813cc2['push'](_0x813cc2['shift']());}};_0x5a0552(++_0x2ef8c2);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xa9e0[_0x6131cd];return _0x47e916;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'context':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'unique':'compositeIndex','validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x0a9e('0x3')},'priority':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'1','unique':_0x0a9e('0x3')},'tag':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'defaultValue':_0x0a9e('0x4')},'appdata':{'type':Sequelize[_0x0a9e('0x2')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize['ENUM'](_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),'inbound-fax','outbound-fax',_0x0a9e('0x8'),'any'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'defaultValue':_0x0a9e('0x9')},'IntervalId':{'type':Sequelize[_0x0a9e('0xa')]},'isApp':{'type':Sequelize[_0x0a9e('0xb')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'callerID':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':!![]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'cutdigits':{'type':Sequelize['INTEGER']},'recordingFormat':{'type':Sequelize['STRING'],'defaultValue':'wav'},'answer':{'type':Sequelize[_0x0a9e('0xb')],'defaultValue':!![]},'name':{'type':Sequelize[_0x0a9e('0xc')],'get':function(_0xd5b662){return this[_0x0a9e('0xd')](_0x0a9e('0xe'));}}};
\ No newline at end of file
+var _0xa9e0=['*,*,*,*','INTEGER','BOOLEAN','VIRTUAL','getDataValue','exten','sequelize','exports','STRING','compositeIndex','NoOp','inbound','outbound','internal','system'];(function(_0xb2be36,_0xd38128){var _0x4c5a8a=function(_0x10e72d){while(--_0x10e72d){_0xb2be36['push'](_0xb2be36['shift']());}};_0x4c5a8a(++_0xd38128);}(_0xa9e0,0x123));var _0x0a9e=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0xa9e0[_0x433a86];return _0x23000c;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'context':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'unique':'compositeIndex','validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x0a9e('0x3')},'priority':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'1','unique':_0x0a9e('0x3')},'tag':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'defaultValue':_0x0a9e('0x4')},'appdata':{'type':Sequelize[_0x0a9e('0x2')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize['ENUM'](_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),'inbound-fax','outbound-fax',_0x0a9e('0x8'),'any'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'defaultValue':_0x0a9e('0x9')},'IntervalId':{'type':Sequelize[_0x0a9e('0xa')]},'isApp':{'type':Sequelize[_0x0a9e('0xb')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'callerID':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':!![]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'cutdigits':{'type':Sequelize['INTEGER']},'recordingFormat':{'type':Sequelize['STRING'],'defaultValue':'wav'},'answer':{'type':Sequelize[_0x0a9e('0xb')],'defaultValue':!![]},'name':{'type':Sequelize[_0x0a9e('0xc')],'get':function(_0xd5b662){return this[_0x0a9e('0xd')](_0x0a9e('0xe'));}}};
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.controller.js b/server/api/voiceExtension/voiceExtension.controller.js
index 29f73a0..49c0737 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 _0x6a83=['request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','redis','defaults','socket.io-emitter','register','sendStatus','status','json','count','limit','set','Content-Range','save','destroy','then','InboundRoutes','inbound','OutboundRoutes','outbound','InternalRoutes','filter','ignore','map','value','type','find','name','UserProfileResource','end','error','stack','send','index','VoiceExtension','fieldName','key','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','offset','order','sort','where','pick','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','create','startsWith','body','exten','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','internal','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','context','description','recordingFormat','cutdigits','mandatoryDisposition','addApplications','findOne','sequelize','transaction','VoiceExtensionId','bulkCreate','findAndCountAll','cast(priority\x20as\x20unsigned)','html-pdf','eml-format','zip-dir','fast-json-patch'];(function(_0x5dc86d,_0x3e011a){var _0x2dfceb=function(_0x84312d){while(--_0x84312d){_0x5dc86d['push'](_0x5dc86d['shift']());}};_0x2dfceb(++_0x3e011a);}(_0x6a83,0x1a4));var _0x36a8=function(_0x100b66,_0x3c390c){_0x100b66=_0x100b66-0x0;var _0x19a9ef=_0x6a83[_0x100b66];return _0x19a9ef;};'use strict';var pdf=require(_0x36a8('0x0'));var emlformat=require(_0x36a8('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x36a8('0x2'));var jsonpatch=require(_0x36a8('0x3'));var rp=require(_0x36a8('0x4'));var moment=require('moment');var BPromise=require(_0x36a8('0x5'));var Mustache=require(_0x36a8('0x6'));var util=require(_0x36a8('0x7'));var path=require(_0x36a8('0x8'));var sox=require(_0x36a8('0x9'));var csv=require(_0x36a8('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x36a8('0xb'));var squel=require(_0x36a8('0xc'));var crypto=require(_0x36a8('0xd'));var jsforce=require(_0x36a8('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x36a8('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x36a8('0x10'));var as=require(_0x36a8('0x11'));var hardwareService=require(_0x36a8('0x12'));var logger=require('../../config/logger')(_0x36a8('0x13'));var utils=require(_0x36a8('0x14'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x36a8('0x15')]=_[_0x36a8('0x16')](config[_0x36a8('0x15')],{'host':'localhost','port':0x18eb});var socket=require(_0x36a8('0x17'))(new Redis(config[_0x36a8('0x15')]));require('./voiceExtension.socket')[_0x36a8('0x18')](socket);function respondWithStatusCode(_0x5a003d,_0x51a95e){_0x51a95e=_0x51a95e||0xcc;return function(_0x360429){if(_0x360429){return _0x5a003d[_0x36a8('0x19')](_0x51a95e);}return _0x5a003d[_0x36a8('0x1a')](_0x51a95e)['end']();};}function respondWithResult(_0x2b61d6,_0x225baa){_0x225baa=_0x225baa||0xc8;return function(_0x278b63){if(_0x278b63){return _0x2b61d6[_0x36a8('0x1a')](_0x225baa)[_0x36a8('0x1b')](_0x278b63);}};}function respondWithFilteredResult(_0x2ba42a,_0x9e688b){return function(_0x1e14bd){if(_0x1e14bd){var _0x43a8f3=_0x1e14bd[_0x36a8('0x1c')],_0x21a28b=_0x9e688b['offset'],_0xd14669=_0x9e688b['offset']+_0x9e688b[_0x36a8('0x1d')],_0x5ae6a6;if(_0xd14669>=_0x43a8f3){_0xd14669=_0x43a8f3;_0x5ae6a6=0xc8;}else{_0x5ae6a6=0xce;}_0x2ba42a[_0x36a8('0x1a')](_0x5ae6a6);return _0x2ba42a[_0x36a8('0x1e')](_0x36a8('0x1f'),_0x21a28b+'-'+_0xd14669+'/'+_0x43a8f3)['json'](_0x1e14bd);}return null;};}function patchUpdates(_0x127d31){return function(_0x27428f){try{jsonpatch['apply'](_0x27428f,_0x127d31,!![]);}catch(_0x13be09){return BPromise['reject'](_0x13be09);}return _0x27428f[_0x36a8('0x20')]();};}function saveUpdates(_0x1ae46b,_0x5c874f){return function(_0x49cf18){if(_0x49cf18){return _0x49cf18['update'](_0x1ae46b)['then'](function(_0x94af7a){return _0x94af7a;});}return null;};}function removeEntity(_0x27de79,_0x54cd1d){return function(_0x4df5e1){if(_0x4df5e1){return _0x4df5e1[_0x36a8('0x21')]()[_0x36a8('0x22')](function(){var _0x114bb9=_0x4df5e1['get']({'plain':!![]});var _0x12f62c=[{'name':_0x36a8('0x23'),'value':_0x36a8('0x24'),'ignore':![]},{'name':_0x36a8('0x25'),'value':_0x36a8('0x26'),'ignore':![]},{'name':_0x36a8('0x27'),'value':'internal','ignore':![]}];var _0x39360b=_(_0x12f62c)[_0x36a8('0x28')](_0x36a8('0x29'))[_0x36a8('0x2a')]('value')[_0x36a8('0x2b')]();if(_['includes'](_0x39360b,_0x114bb9[_0x36a8('0x2c')])){return;}var _0x44d1b3=_[_0x36a8('0x2d')](_0x12f62c,[_0x36a8('0x2b'),_0x114bb9[_0x36a8('0x2c')]])[_0x36a8('0x2e')];return db[_0x36a8('0x2f')][_0x36a8('0x21')]({'where':{'type':_0x44d1b3,'resourceId':_0x114bb9['id']}})['then'](function(){return _0x4df5e1;});})[_0x36a8('0x22')](function(){_0x27de79[_0x36a8('0x1a')](0xcc)[_0x36a8('0x30')]();});}};}function handleEntityNotFound(_0x351028,_0x2a8dfa){return function(_0x3daa9a){if(!_0x3daa9a){_0x351028[_0x36a8('0x19')](0x194);}return _0x3daa9a;};}function handleError(_0x721970,_0x10e7a7){_0x10e7a7=_0x10e7a7||0x1f4;return function(_0x17958c){logger[_0x36a8('0x31')](_0x17958c[_0x36a8('0x32')]);if(_0x17958c[_0x36a8('0x2e')]){delete _0x17958c['name'];}_0x721970[_0x36a8('0x1a')](_0x10e7a7)[_0x36a8('0x33')](_0x17958c);};}exports[_0x36a8('0x34')]=function(_0x24d06c,_0x383aa5){var _0x5d92b1={},_0x176f6e={},_0x2741cc={'count':0x0,'rows':[]};var _0x42c6c0=_['map'](db[_0x36a8('0x35')]['rawAttributes'],function(_0x590bd3){return{'name':_0x590bd3[_0x36a8('0x36')],'type':_0x590bd3[_0x36a8('0x2c')][_0x36a8('0x37')]};});_0x176f6e['model']=_[_0x36a8('0x2a')](_0x42c6c0,_0x36a8('0x2e'));_0x176f6e[_0x36a8('0x38')]=_[_0x36a8('0x39')](_0x24d06c[_0x36a8('0x38')]);_0x176f6e[_0x36a8('0x3a')]=_[_0x36a8('0x3b')](_0x176f6e[_0x36a8('0x3c')],_0x176f6e['query']);_0x5d92b1['attributes']=_[_0x36a8('0x3b')](_0x176f6e[_0x36a8('0x3c')],qs[_0x36a8('0x3d')](_0x24d06c[_0x36a8('0x38')][_0x36a8('0x3d')]));_0x5d92b1[_0x36a8('0x3e')]=_0x5d92b1[_0x36a8('0x3e')][_0x36a8('0x3f')]?_0x5d92b1[_0x36a8('0x3e')]:_0x176f6e[_0x36a8('0x3c')];if(!_0x24d06c[_0x36a8('0x38')][_0x36a8('0x40')](_0x36a8('0x41'))){_0x5d92b1[_0x36a8('0x1d')]=qs[_0x36a8('0x1d')](_0x24d06c[_0x36a8('0x38')][_0x36a8('0x1d')]);_0x5d92b1[_0x36a8('0x42')]=qs[_0x36a8('0x42')](_0x24d06c[_0x36a8('0x38')][_0x36a8('0x42')]);}_0x5d92b1[_0x36a8('0x43')]=qs[_0x36a8('0x44')](_0x24d06c[_0x36a8('0x38')][_0x36a8('0x44')]);_0x5d92b1[_0x36a8('0x45')]=qs[_0x36a8('0x3a')](_[_0x36a8('0x46')](_0x24d06c[_0x36a8('0x38')],_0x176f6e[_0x36a8('0x3a')]));if(_0x24d06c[_0x36a8('0x38')][_0x36a8('0x28')]){_0x5d92b1[_0x36a8('0x45')]=_[_0x36a8('0x47')](_0x5d92b1[_0x36a8('0x45')],{'$or':_[_0x36a8('0x2a')](_0x42c6c0,function(_0x1ed9a1){if(_0x1ed9a1[_0x36a8('0x2c')]!==_0x36a8('0x48')){var _0x4ded8c={};_0x4ded8c[_0x1ed9a1['name']]={'$like':'%'+_0x24d06c[_0x36a8('0x38')][_0x36a8('0x28')]+'%'};return _0x4ded8c;}})});}_0x5d92b1=_[_0x36a8('0x47')]({},_0x5d92b1,_0x24d06c[_0x36a8('0x49')]);var _0x4533c3={'where':_0x5d92b1[_0x36a8('0x45')]};return db['VoiceExtension'][_0x36a8('0x1c')](_0x4533c3)[_0x36a8('0x22')](function(_0x2675fd){_0x2741cc[_0x36a8('0x1c')]=_0x2675fd;if(_0x24d06c[_0x36a8('0x38')][_0x36a8('0x4a')]){_0x5d92b1['include']=[{'all':!![]}];}return db[_0x36a8('0x35')][_0x36a8('0x4b')](_0x5d92b1);})['then'](function(_0x631a5){_0x2741cc[_0x36a8('0x4c')]=_0x631a5;return _0x2741cc;})['then'](respondWithFilteredResult(_0x383aa5,_0x5d92b1))[_0x36a8('0x4d')](handleError(_0x383aa5,null));};exports[_0x36a8('0x4e')]=function(_0x1dac96,_0x2000ef){var _0xf31384={'raw':![],'where':{'id':_0x1dac96[_0x36a8('0x4f')]['id']}},_0x241a58={};_0x241a58['model']=_[_0x36a8('0x39')](db[_0x36a8('0x35')]['rawAttributes']);_0x241a58[_0x36a8('0x38')]=_[_0x36a8('0x39')](_0x1dac96['query']);_0x241a58[_0x36a8('0x3a')]=_[_0x36a8('0x3b')](_0x241a58['model'],_0x241a58['query']);_0xf31384[_0x36a8('0x3e')]=_['intersection'](_0x241a58[_0x36a8('0x3c')],qs[_0x36a8('0x3d')](_0x1dac96[_0x36a8('0x38')]['fields']));_0xf31384[_0x36a8('0x3e')]=_0xf31384[_0x36a8('0x3e')][_0x36a8('0x3f')]?_0xf31384[_0x36a8('0x3e')]:_0x241a58[_0x36a8('0x3c')];if(_0x1dac96[_0x36a8('0x38')][_0x36a8('0x4a')]){_0xf31384['include']=[{'all':!![]}];}_0xf31384=_[_0x36a8('0x47')]({},_0xf31384,_0x1dac96[_0x36a8('0x49')]);return db['VoiceExtension']['find'](_0xf31384)[_0x36a8('0x22')](handleEntityNotFound(_0x2000ef,null))['then'](respondWithResult(_0x2000ef,null))['catch'](handleError(_0x2000ef,null));};exports[_0x36a8('0x21')]=function(_0x5be131,_0x19295e){return db['VoiceExtension'][_0x36a8('0x2d')]({'where':{'id':_0x5be131[_0x36a8('0x4f')]['id']}})[_0x36a8('0x22')](handleEntityNotFound(_0x19295e,null))[_0x36a8('0x22')](removeEntity(_0x19295e,null))[_0x36a8('0x4d')](handleError(_0x19295e,null));};exports[_0x36a8('0x50')]=function(_0x2092b7,_0x4a8d86){if(_0x2092b7['body'][_0x36a8('0x2c')]===_0x36a8('0x26')&&!_[_0x36a8('0x51')](_0x2092b7['body']['exten'],'_')){_0x2092b7[_0x36a8('0x52')][_0x36a8('0x53')]='_'['concat'](_0x2092b7[_0x36a8('0x52')][_0x36a8('0x53')]);}return db[_0x36a8('0x35')]['create'](_0x2092b7[_0x36a8('0x52')],{'raw':![]})[_0x36a8('0x22')](function(_0x51323e){var _0x1bbbea=_0x2092b7['user']['get']({'plain':!![]});if(!_0x1bbbea)throw new Error(_0x36a8('0x54'));if(_0x1bbbea[_0x36a8('0x55')]==='user'){var _0x540973=_0x51323e[_0x36a8('0x56')]({'plain':!![]});var _0x2a0510=[{'name':_0x36a8('0x23'),'value':_0x36a8('0x24')},{'name':'OutboundRoutes','value':_0x36a8('0x26')},{'name':_0x36a8('0x27'),'value':_0x36a8('0x57')}];var _0x42cd4d=_[_0x36a8('0x2d')](_0x2a0510,['value',_0x540973[_0x36a8('0x2c')]])[_0x36a8('0x2e')];return db[_0x36a8('0x58')][_0x36a8('0x2d')]({'where':{'name':_0x42cd4d,'userProfileId':_0x1bbbea[_0x36a8('0x59')]},'raw':!![]})[_0x36a8('0x22')](function(_0x149879){if(_0x149879&&_0x149879[_0x36a8('0x5a')]===0x0){return db[_0x36a8('0x2f')]['create']({'name':_0x540973[_0x36a8('0x2e')],'resourceId':_0x540973['id'],'type':_0x149879[_0x36a8('0x2e')],'sectionId':_0x149879['id']},{})[_0x36a8('0x22')](function(){return _0x51323e;});}else{return _0x51323e;}})['catch'](function(_0x41b586){logger[_0x36a8('0x31')](_0x36a8('0x5b'),_0x41b586);throw _0x41b586;});}return _0x51323e;})['then'](respondWithResult(_0x4a8d86,0xc9))['catch'](handleError(_0x4a8d86,null));};exports[_0x36a8('0x5c')]=function(_0x3b9ffc,_0x641c52){if(_0x3b9ffc[_0x36a8('0x52')]['id']){delete _0x3b9ffc[_0x36a8('0x52')]['id'];}return db['VoiceExtension'][_0x36a8('0x2d')]({'where':{'id':_0x3b9ffc[_0x36a8('0x4f')]['id']}})[_0x36a8('0x22')](handleEntityNotFound(_0x641c52,null))['then'](function(_0x4d7786){if(_0x4d7786){return db['VoiceExtension']['update'](_[_0x36a8('0x46')](_0x3b9ffc[_0x36a8('0x52')],['exten',_0x36a8('0x5d'),_0x36a8('0x5e'),_0x36a8('0x5f'),_0x36a8('0x60'),_0x36a8('0x61')]),{'where':{'context':_0x4d7786[_0x36a8('0x5d')],'exten':_0x4d7786[_0x36a8('0x53')]},'individualHooks':!![]})[_0x36a8('0x22')](function(_0x3a7fa8){return _0x3a7fa8;});}return null;})[_0x36a8('0x22')](respondWithStatusCode(_0x641c52,null))[_0x36a8('0x4d')](handleError(_0x641c52,null));};exports[_0x36a8('0x62')]=function(_0x404402,_0x51a63b,_0x573e77){return db[_0x36a8('0x35')][_0x36a8('0x63')]({'where':{'id':_0x404402[_0x36a8('0x4f')]['id']}})[_0x36a8('0x22')](handleEntityNotFound(_0x51a63b,null))[_0x36a8('0x22')](function(_0xb5e10e){if(_0xb5e10e){return db[_0x36a8('0x64')][_0x36a8('0x65')](function(_0x3692cb){return db['VoiceExtension']['destroy']({'where':{'VoiceExtensionId':_0x404402[_0x36a8('0x4f')]['id']},'transaction':_0x3692cb})[_0x36a8('0x22')](function(_0x1248a5){var _0x55b3f3=_[_0x36a8('0x2a')](_0x404402[_0x36a8('0x52')],function(_0x11156e){_0x11156e[_0x36a8('0x66')]=_0x404402[_0x36a8('0x4f')]['id'];return _0x11156e;});return db[_0x36a8('0x35')][_0x36a8('0x67')](_0x55b3f3,{'transaction':_0x3692cb});});})[_0x36a8('0x22')](function(){return db['VoiceExtension'][_0x36a8('0x68')]({'where':{'isApp':!![],'VoiceExtensionId':_0x404402[_0x36a8('0x4f')]['id']},'order':_0x36a8('0x69')});});}})['then'](respondWithResult(_0x51a63b,null))[_0x36a8('0x4d')](handleError(_0x51a63b,null));};
\ No newline at end of file
+var _0xe1de=['update','context','recordingFormat','cutdigits','mandatoryDisposition','findOne','sequelize','transaction','VoiceExtensionId','bulkCreate','findAndCountAll','cast(priority\x20as\x20unsigned)','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','register','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','save','then','get','InboundRoutes','outbound','internal','filter','ignore','map','value','includes','find','name','UserProfileResource','destroy','error','index','VoiceExtension','rawAttributes','fieldName','type','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filters','VIRTUAL','merge','options','includeAll','findAll','rows','show','params','catch','create','body','startsWith','exten','concat','user','role','inbound','InternalRoutes','UserProfileSection','autoAssociation'];(function(_0x233365,_0x4b23c0){var _0x4f3975=function(_0x3478fb){while(--_0x3478fb){_0x233365['push'](_0x233365['shift']());}};_0x4f3975(++_0x4b23c0);}(_0xe1de,0x14a));var _0xee1d=function(_0x52f1e6,_0xf70489){_0x52f1e6=_0x52f1e6-0x0;var _0x21f104=_0xe1de[_0x52f1e6];return _0x21f104;};'use strict';var pdf=require(_0xee1d('0x0'));var emlformat=require(_0xee1d('0x1'));var rimraf=require(_0xee1d('0x2'));var zipdir=require(_0xee1d('0x3'));var jsonpatch=require(_0xee1d('0x4'));var rp=require(_0xee1d('0x5'));var moment=require(_0xee1d('0x6'));var BPromise=require(_0xee1d('0x7'));var Mustache=require(_0xee1d('0x8'));var util=require('util');var path=require('path');var sox=require(_0xee1d('0x9'));var csv=require(_0xee1d('0xa'));var ejs=require(_0xee1d('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0xee1d('0xc'));var crypto=require(_0xee1d('0xd'));var jsforce=require(_0xee1d('0xe'));var deskjs=require(_0xee1d('0xf'));var toCsv=require(_0xee1d('0xa'));var querystring=require(_0xee1d('0x10'));var Papa=require('papaparse');var Redis=require(_0xee1d('0x11'));var authService=require(_0xee1d('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xee1d('0x13'));var hardwareService=require(_0xee1d('0x14'));var logger=require(_0xee1d('0x15'))(_0xee1d('0x16'));var utils=require(_0xee1d('0x17'));var config=require(_0xee1d('0x18'));var db=require(_0xee1d('0x19'))['db'];config[_0xee1d('0x1a')]=_['defaults'](config[_0xee1d('0x1a')],{'host':_0xee1d('0x1b'),'port':0x18eb});var socket=require(_0xee1d('0x1c'))(new Redis(config[_0xee1d('0x1a')]));require('./voiceExtension.socket')[_0xee1d('0x1d')](socket);function respondWithStatusCode(_0x2cb96c,_0x1a387c){_0x1a387c=_0x1a387c||0xcc;return function(_0xa6f149){if(_0xa6f149){return _0x2cb96c[_0xee1d('0x1e')](_0x1a387c);}return _0x2cb96c[_0xee1d('0x1f')](_0x1a387c)[_0xee1d('0x20')]();};}function respondWithResult(_0x386856,_0x58ac78){_0x58ac78=_0x58ac78||0xc8;return function(_0xafc935){if(_0xafc935){return _0x386856[_0xee1d('0x1f')](_0x58ac78)[_0xee1d('0x21')](_0xafc935);}};}function respondWithFilteredResult(_0x4b9c69,_0x4a32c7){return function(_0x4fb41e){if(_0x4fb41e){var _0x4f9a59=_0x4fb41e[_0xee1d('0x22')],_0x5b11d3=_0x4a32c7[_0xee1d('0x23')],_0x416793=_0x4a32c7[_0xee1d('0x23')]+_0x4a32c7[_0xee1d('0x24')],_0x366a96;if(_0x416793>=_0x4f9a59){_0x416793=_0x4f9a59;_0x366a96=0xc8;}else{_0x366a96=0xce;}_0x4b9c69[_0xee1d('0x1f')](_0x366a96);return _0x4b9c69[_0xee1d('0x25')](_0xee1d('0x26'),_0x5b11d3+'-'+_0x416793+'/'+_0x4f9a59)[_0xee1d('0x21')](_0x4fb41e);}return null;};}function patchUpdates(_0x215a9b){return function(_0x211ea7){try{jsonpatch['apply'](_0x211ea7,_0x215a9b,!![]);}catch(_0x18a955){return BPromise[_0xee1d('0x27')](_0x18a955);}return _0x211ea7[_0xee1d('0x28')]();};}function saveUpdates(_0x5a0474,_0x287927){return function(_0x15d568){if(_0x15d568){return _0x15d568['update'](_0x5a0474)[_0xee1d('0x29')](function(_0xa899f7){return _0xa899f7;});}return null;};}function removeEntity(_0x5e9a84,_0x26c15b){return function(_0x3c8f68){if(_0x3c8f68){return _0x3c8f68['destroy']()[_0xee1d('0x29')](function(){var _0xf831ce=_0x3c8f68[_0xee1d('0x2a')]({'plain':!![]});var _0x138544=[{'name':_0xee1d('0x2b'),'value':'inbound','ignore':![]},{'name':'OutboundRoutes','value':_0xee1d('0x2c'),'ignore':![]},{'name':'InternalRoutes','value':_0xee1d('0x2d'),'ignore':![]}];var _0x523996=_(_0x138544)[_0xee1d('0x2e')](_0xee1d('0x2f'))[_0xee1d('0x30')](_0xee1d('0x31'))[_0xee1d('0x31')]();if(_[_0xee1d('0x32')](_0x523996,_0xf831ce['type'])){return;}var _0x21d28b=_[_0xee1d('0x33')](_0x138544,[_0xee1d('0x31'),_0xf831ce['type']])[_0xee1d('0x34')];return db[_0xee1d('0x35')][_0xee1d('0x36')]({'where':{'type':_0x21d28b,'resourceId':_0xf831ce['id']}})['then'](function(){return _0x3c8f68;});})[_0xee1d('0x29')](function(){_0x5e9a84[_0xee1d('0x1f')](0xcc)[_0xee1d('0x20')]();});}};}function handleEntityNotFound(_0x125a31,_0x21eda4){return function(_0x5b7522){if(!_0x5b7522){_0x125a31['sendStatus'](0x194);}return _0x5b7522;};}function handleError(_0x418240,_0x5efe45){_0x5efe45=_0x5efe45||0x1f4;return function(_0x5a0372){logger[_0xee1d('0x37')](_0x5a0372['stack']);if(_0x5a0372[_0xee1d('0x34')]){delete _0x5a0372[_0xee1d('0x34')];}_0x418240[_0xee1d('0x1f')](_0x5efe45)['send'](_0x5a0372);};}exports[_0xee1d('0x38')]=function(_0x15b2ed,_0x2e6fa6){var _0x345d1e={},_0x5d0099={},_0x1d167d={'count':0x0,'rows':[]};var _0x1d848c=_[_0xee1d('0x30')](db[_0xee1d('0x39')][_0xee1d('0x3a')],function(_0x24586d){return{'name':_0x24586d[_0xee1d('0x3b')],'type':_0x24586d[_0xee1d('0x3c')]['key']};});_0x5d0099[_0xee1d('0x3d')]=_[_0xee1d('0x30')](_0x1d848c,_0xee1d('0x34'));_0x5d0099[_0xee1d('0x3e')]=_[_0xee1d('0x3f')](_0x15b2ed[_0xee1d('0x3e')]);_0x5d0099['filters']=_[_0xee1d('0x40')](_0x5d0099[_0xee1d('0x3d')],_0x5d0099[_0xee1d('0x3e')]);_0x345d1e['attributes']=_[_0xee1d('0x40')](_0x5d0099['model'],qs[_0xee1d('0x41')](_0x15b2ed[_0xee1d('0x3e')][_0xee1d('0x41')]));_0x345d1e[_0xee1d('0x42')]=_0x345d1e[_0xee1d('0x42')][_0xee1d('0x43')]?_0x345d1e[_0xee1d('0x42')]:_0x5d0099[_0xee1d('0x3d')];if(!_0x15b2ed['query'][_0xee1d('0x44')](_0xee1d('0x45'))){_0x345d1e['limit']=qs['limit'](_0x15b2ed[_0xee1d('0x3e')][_0xee1d('0x24')]);_0x345d1e[_0xee1d('0x23')]=qs[_0xee1d('0x23')](_0x15b2ed[_0xee1d('0x3e')]['offset']);}_0x345d1e['order']=qs[_0xee1d('0x46')](_0x15b2ed[_0xee1d('0x3e')][_0xee1d('0x46')]);_0x345d1e[_0xee1d('0x47')]=qs['filters'](_[_0xee1d('0x48')](_0x15b2ed['query'],_0x5d0099[_0xee1d('0x49')]));if(_0x15b2ed[_0xee1d('0x3e')]['filter']){_0x345d1e[_0xee1d('0x47')]=_['merge'](_0x345d1e[_0xee1d('0x47')],{'$or':_[_0xee1d('0x30')](_0x1d848c,function(_0x2b13ed){if(_0x2b13ed['type']!==_0xee1d('0x4a')){var _0x37e770={};_0x37e770[_0x2b13ed[_0xee1d('0x34')]]={'$like':'%'+_0x15b2ed[_0xee1d('0x3e')]['filter']+'%'};return _0x37e770;}})});}_0x345d1e=_[_0xee1d('0x4b')]({},_0x345d1e,_0x15b2ed[_0xee1d('0x4c')]);var _0x4a4832={'where':_0x345d1e[_0xee1d('0x47')]};return db[_0xee1d('0x39')]['count'](_0x4a4832)[_0xee1d('0x29')](function(_0x15f342){_0x1d167d['count']=_0x15f342;if(_0x15b2ed[_0xee1d('0x3e')][_0xee1d('0x4d')]){_0x345d1e['include']=[{'all':!![]}];}return db[_0xee1d('0x39')][_0xee1d('0x4e')](_0x345d1e);})[_0xee1d('0x29')](function(_0x2cbaf1){_0x1d167d[_0xee1d('0x4f')]=_0x2cbaf1;return _0x1d167d;})['then'](respondWithFilteredResult(_0x2e6fa6,_0x345d1e))['catch'](handleError(_0x2e6fa6,null));};exports[_0xee1d('0x50')]=function(_0x4a5910,_0x488df4){var _0x4b8de6={'raw':![],'where':{'id':_0x4a5910[_0xee1d('0x51')]['id']}},_0x4a4179={};_0x4a4179[_0xee1d('0x3d')]=_[_0xee1d('0x3f')](db[_0xee1d('0x39')][_0xee1d('0x3a')]);_0x4a4179[_0xee1d('0x3e')]=_[_0xee1d('0x3f')](_0x4a5910[_0xee1d('0x3e')]);_0x4a4179['filters']=_[_0xee1d('0x40')](_0x4a4179['model'],_0x4a4179['query']);_0x4b8de6['attributes']=_[_0xee1d('0x40')](_0x4a4179['model'],qs[_0xee1d('0x41')](_0x4a5910[_0xee1d('0x3e')]['fields']));_0x4b8de6[_0xee1d('0x42')]=_0x4b8de6[_0xee1d('0x42')][_0xee1d('0x43')]?_0x4b8de6[_0xee1d('0x42')]:_0x4a4179[_0xee1d('0x3d')];if(_0x4a5910[_0xee1d('0x3e')][_0xee1d('0x4d')]){_0x4b8de6['include']=[{'all':!![]}];}_0x4b8de6=_[_0xee1d('0x4b')]({},_0x4b8de6,_0x4a5910['options']);return db[_0xee1d('0x39')][_0xee1d('0x33')](_0x4b8de6)[_0xee1d('0x29')](handleEntityNotFound(_0x488df4,null))[_0xee1d('0x29')](respondWithResult(_0x488df4,null))[_0xee1d('0x52')](handleError(_0x488df4,null));};exports[_0xee1d('0x36')]=function(_0x1ba17a,_0x483cf6){return db[_0xee1d('0x39')][_0xee1d('0x33')]({'where':{'id':_0x1ba17a[_0xee1d('0x51')]['id']}})[_0xee1d('0x29')](handleEntityNotFound(_0x483cf6,null))[_0xee1d('0x29')](removeEntity(_0x483cf6,null))['catch'](handleError(_0x483cf6,null));};exports[_0xee1d('0x53')]=function(_0x19a85d,_0x4866ea){if(_0x19a85d[_0xee1d('0x54')][_0xee1d('0x3c')]===_0xee1d('0x2c')&&!_[_0xee1d('0x55')](_0x19a85d[_0xee1d('0x54')][_0xee1d('0x56')],'_')){_0x19a85d['body']['exten']='_'[_0xee1d('0x57')](_0x19a85d[_0xee1d('0x54')]['exten']);}return db[_0xee1d('0x39')][_0xee1d('0x53')](_0x19a85d[_0xee1d('0x54')],{'raw':![]})[_0xee1d('0x29')](function(_0x3f5086){var _0x2728b0=_0x19a85d[_0xee1d('0x58')][_0xee1d('0x2a')]({'plain':!![]});if(!_0x2728b0)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2728b0[_0xee1d('0x59')]===_0xee1d('0x58')){var _0x33963a=_0x3f5086['get']({'plain':!![]});var _0x4cc4d2=[{'name':_0xee1d('0x2b'),'value':_0xee1d('0x5a')},{'name':'OutboundRoutes','value':_0xee1d('0x2c')},{'name':_0xee1d('0x5b'),'value':_0xee1d('0x2d')}];var _0x4582fa=_['find'](_0x4cc4d2,[_0xee1d('0x31'),_0x33963a['type']])[_0xee1d('0x34')];return db[_0xee1d('0x5c')]['find']({'where':{'name':_0x4582fa,'userProfileId':_0x2728b0['userProfileId']},'raw':!![]})[_0xee1d('0x29')](function(_0x219d3f){if(_0x219d3f&&_0x219d3f[_0xee1d('0x5d')]===0x0){return db[_0xee1d('0x35')][_0xee1d('0x53')]({'name':_0x33963a[_0xee1d('0x34')],'resourceId':_0x33963a['id'],'type':_0x219d3f[_0xee1d('0x34')],'sectionId':_0x219d3f['id']},{})['then'](function(){return _0x3f5086;});}else{return _0x3f5086;}})['catch'](function(_0x25cbc7){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x25cbc7);throw _0x25cbc7;});}return _0x3f5086;})[_0xee1d('0x29')](respondWithResult(_0x4866ea,0xc9))[_0xee1d('0x52')](handleError(_0x4866ea,null));};exports[_0xee1d('0x5e')]=function(_0x5f2ce2,_0x2c5a9a){if(_0x5f2ce2['body']['id']){delete _0x5f2ce2['body']['id'];}return db[_0xee1d('0x39')]['find']({'where':{'id':_0x5f2ce2['params']['id']}})[_0xee1d('0x29')](handleEntityNotFound(_0x2c5a9a,null))['then'](function(_0x3366a0){if(_0x3366a0){return db[_0xee1d('0x39')][_0xee1d('0x5e')](_[_0xee1d('0x48')](_0x5f2ce2[_0xee1d('0x54')],['exten',_0xee1d('0x5f'),'description',_0xee1d('0x60'),_0xee1d('0x61'),_0xee1d('0x62')]),{'where':{'context':_0x3366a0[_0xee1d('0x5f')],'exten':_0x3366a0[_0xee1d('0x56')]},'individualHooks':!![]})[_0xee1d('0x29')](function(_0x20d32e){return _0x20d32e;});}return null;})[_0xee1d('0x29')](respondWithStatusCode(_0x2c5a9a,null))[_0xee1d('0x52')](handleError(_0x2c5a9a,null));};exports['addApplications']=function(_0x2b099d,_0x3cc3fc,_0x2b10b4){return db[_0xee1d('0x39')][_0xee1d('0x63')]({'where':{'id':_0x2b099d['params']['id']}})[_0xee1d('0x29')](handleEntityNotFound(_0x3cc3fc,null))[_0xee1d('0x29')](function(_0x28c3c6){if(_0x28c3c6){return db[_0xee1d('0x64')][_0xee1d('0x65')](function(_0x5b4b64){return db[_0xee1d('0x39')][_0xee1d('0x36')]({'where':{'VoiceExtensionId':_0x2b099d[_0xee1d('0x51')]['id']},'transaction':_0x5b4b64})[_0xee1d('0x29')](function(_0x27974c){var _0x162468=_[_0xee1d('0x30')](_0x2b099d[_0xee1d('0x54')],function(_0x5e3e86){_0x5e3e86[_0xee1d('0x66')]=_0x2b099d[_0xee1d('0x51')]['id'];return _0x5e3e86;});return db['VoiceExtension'][_0xee1d('0x67')](_0x162468,{'transaction':_0x5b4b64});});})[_0xee1d('0x29')](function(){return db['VoiceExtension'][_0xee1d('0x68')]({'where':{'isApp':!![],'VoiceExtensionId':_0x2b099d[_0xee1d('0x51')]['id']},'order':_0xee1d('0x69')});});}})[_0xee1d('0x29')](respondWithResult(_0x3cc3fc,null))[_0xee1d('0x52')](handleError(_0x3cc3fc,null));};
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.events.js b/server/api/voiceExtension/voiceExtension.events.js
index 7520714..f1e04b7 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 _0xbcd2=['emit','exports','events','../../mysqldb','save','update','remove'];(function(_0x566414,_0x374fcc){var _0x488866=function(_0x46b6aa){while(--_0x46b6aa){_0x566414['push'](_0x566414['shift']());}};_0x488866(++_0x374fcc);}(_0xbcd2,0xf0));var _0x2bcd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbcd2[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x2bcd('0x0'));var VoiceExtension=require(_0x2bcd('0x1'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2bcd('0x2'),'afterUpdate':_0x2bcd('0x3'),'afterDestroy':_0x2bcd('0x4')};function emitEvent(_0x44ed38){return function(_0x4ff165,_0x2299b8,_0x3c4859){VoiceExtensionEvents[_0x2bcd('0x5')](_0x44ed38+':'+_0x4ff165['id'],_0x4ff165);VoiceExtensionEvents[_0x2bcd('0x5')](_0x44ed38,_0x4ff165);_0x3c4859(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0x2bcd('0x6')]=VoiceExtensionEvents;
\ No newline at end of file
+var _0x97e4=['VoiceExtension','setMaxListeners','save','remove','emit','hasOwnProperty','hook','events'];(function(_0x208e4d,_0xdd5997){var _0x2d48f2=function(_0x376243){while(--_0x376243){_0x208e4d['push'](_0x208e4d['shift']());}};_0x2d48f2(++_0xdd5997);}(_0x97e4,0x13f));var _0x497e=function(_0x1a5a53,_0x598a8c){_0x1a5a53=_0x1a5a53-0x0;var _0xf75355=_0x97e4[_0x1a5a53];return _0xf75355;};'use strict';var EventEmitter=require(_0x497e('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x497e('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x497e('0x2')](0x0);var events={'afterCreate':_0x497e('0x3'),'afterUpdate':'update','afterDestroy':_0x497e('0x4')};function emitEvent(_0x4d07c8){return function(_0x3d6b07,_0x3d7319,_0x4c2b1c){VoiceExtensionEvents['emit'](_0x4d07c8+':'+_0x3d6b07['id'],_0x3d6b07);VoiceExtensionEvents[_0x497e('0x5')](_0x4d07c8,_0x3d6b07);_0x4c2b1c(null);};}for(var e in events){if(events[_0x497e('0x6')](e)){var event=events[e];VoiceExtension[_0x497e('0x7')](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 8198884..0c8766e 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 _0x5f09=['define','VoiceExtension','voice_extensions','lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0xcc8532,_0x3062e3){var _0x595d86=function(_0x1a5a3d){while(--_0x1a5a3d){_0xcc8532['push'](_0xcc8532['shift']());}};_0x595d86(++_0x3062e3);}(_0x5f09,0xab));var _0x95f0=function(_0x4e8d99,_0x4bf1fc){_0x4e8d99=_0x4e8d99-0x0;var _0x358a38=_0x5f09[_0x4e8d99];return _0x358a38;};'use strict';var _=require(_0x95f0('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x95f0('0x1'));var moment=require(_0x95f0('0x2'));var BPromise=require(_0x95f0('0x3'));var rp=require(_0x95f0('0x4'));var fs=require('fs');var path=require(_0x95f0('0x5'));var rimraf=require(_0x95f0('0x6'));var config=require(_0x95f0('0x7'));var attributes=require('./voiceExtension.attributes');module[_0x95f0('0x8')]=function(_0x2d4b8d,_0x55cfd7){return _0x2d4b8d[_0x95f0('0x9')](_0x95f0('0xa'),attributes,{'tableName':_0x95f0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x103b=['bluebird','request-promise','path','rimraf','./voiceExtension.attributes','exports','define','VoiceExtension','voice_extensions','lodash','util','../../config/logger'];(function(_0x1d14a4,_0x3d0375){var _0x5cae92=function(_0x332f16){while(--_0x332f16){_0x1d14a4['push'](_0x1d14a4['shift']());}};_0x5cae92(++_0x3d0375);}(_0x103b,0x1b9));var _0xb103=function(_0x34f91d,_0x1045c2){_0x34f91d=_0x34f91d-0x0;var _0x57e1fd=_0x103b[_0x34f91d];return _0x57e1fd;};'use strict';var _=require(_0xb103('0x0'));var util=require(_0xb103('0x1'));var logger=require(_0xb103('0x2'))('api');var moment=require('moment');var BPromise=require(_0xb103('0x3'));var rp=require(_0xb103('0x4'));var fs=require('fs');var path=require(_0xb103('0x5'));var rimraf=require(_0xb103('0x6'));var config=require('../../config/environment');var attributes=require(_0xb103('0x7'));module[_0xb103('0x8')]=function(_0x30bc90,_0x51902f){return _0x30bc90[_0xb103('0x9')](_0xb103('0xa'),attributes,{'tableName':_0xb103('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 a4a29f3..2607bd3 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 _0xfdd8=['options','where','limit','include','model','map','attributes','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','localhost','register','request','then','info','request\x20sent','debug','VoiceExtension,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceExtension,\x20%s,\x20%s','message','result','catch','GetVoiceExtension','findAll'];(function(_0x3f46de,_0x3caefb){var _0x52e1d9=function(_0x59c454){while(--_0x59c454){_0x3f46de['push'](_0x3f46de['shift']());}};_0x52e1d9(++_0x3caefb);}(_0xfdd8,0x1c1));var _0x8fdd=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xfdd8[_0x42cae2];return _0x5f256f;};'use strict';var _=require('lodash');var util=require(_0x8fdd('0x0'));var moment=require('moment');var BPromise=require(_0x8fdd('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8fdd('0x2'));var db=require(_0x8fdd('0x3'))['db'];var utils=require(_0x8fdd('0x4'));var logger=require(_0x8fdd('0x5'))('rpc');var config=require(_0x8fdd('0x6'));var jayson=require(_0x8fdd('0x7'));var client=jayson[_0x8fdd('0x8')]['http']({'port':0x232a});config[_0x8fdd('0x9')]=_['defaults'](config[_0x8fdd('0x9')],{'host':_0x8fdd('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8fdd('0x9')]));require('./voiceExtension.socket')[_0x8fdd('0xb')](socket);function respondWithRpcPromise(_0xf37e0c,_0x5e2dd2,_0x1617fc){return new BPromise(function(_0x4f2552,_0x7d8a28){return client[_0x8fdd('0xc')](_0xf37e0c,_0x1617fc)[_0x8fdd('0xd')](function(_0x4956ad){logger[_0x8fdd('0xe')]('VoiceExtension,\x20%s,\x20%s',_0x5e2dd2,_0x8fdd('0xf'));logger[_0x8fdd('0x10')](_0x8fdd('0x11'),_0x5e2dd2,'request\x20sent',JSON[_0x8fdd('0x12')](_0x4956ad));if(_0x4956ad[_0x8fdd('0x13')]){if(_0x4956ad[_0x8fdd('0x13')][_0x8fdd('0x14')]===0x1f4){logger[_0x8fdd('0x13')](_0x8fdd('0x15'),_0x5e2dd2,_0x4956ad[_0x8fdd('0x13')]['message']);return _0x7d8a28(_0x4956ad[_0x8fdd('0x13')][_0x8fdd('0x16')]);}logger[_0x8fdd('0x13')](_0x8fdd('0x15'),_0x5e2dd2,_0x4956ad[_0x8fdd('0x13')][_0x8fdd('0x16')]);return _0x4f2552(_0x4956ad[_0x8fdd('0x13')][_0x8fdd('0x16')]);}else{logger[_0x8fdd('0xe')](_0x8fdd('0x15'),_0x5e2dd2,_0x8fdd('0xf'));_0x4f2552(_0x4956ad[_0x8fdd('0x17')]['message']);}})[_0x8fdd('0x18')](function(_0x449209){logger['error'](_0x8fdd('0x15'),_0x5e2dd2,_0x449209);_0x7d8a28(_0x449209);});});}exports[_0x8fdd('0x19')]=function(_0x11ba74){var _0x304289=this;return new Promise(function(_0x498ba1,_0x4b9637){return db['VoiceExtension'][_0x8fdd('0x1a')]({'raw':_0x11ba74[_0x8fdd('0x1b')]?_0x11ba74[_0x8fdd('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x11ba74['options']?_0x11ba74['options'][_0x8fdd('0x1c')]||null:null,'attributes':_0x11ba74['options']?_0x11ba74[_0x8fdd('0x1b')]['attributes']||null:null,'limit':_0x11ba74[_0x8fdd('0x1b')]?_0x11ba74['options'][_0x8fdd('0x1d')]||null:null,'include':_0x11ba74['options']?_0x11ba74[_0x8fdd('0x1b')][_0x8fdd('0x1e')]?_['map'](_0x11ba74[_0x8fdd('0x1b')]['include'],function(_0x553f77){return{'model':db[_0x553f77[_0x8fdd('0x1f')]],'as':_0x553f77['as'],'attributes':_0x553f77['attributes'],'include':_0x553f77[_0x8fdd('0x1e')]?_[_0x8fdd('0x20')](_0x553f77['include'],function(_0x4a916b){return{'model':db[_0x4a916b[_0x8fdd('0x1f')]],'as':_0x4a916b['as'],'attributes':_0x4a916b[_0x8fdd('0x21')],'include':_0x4a916b[_0x8fdd('0x1e')]?_[_0x8fdd('0x20')](_0x4a916b['include'],function(_0x4e81b2){return{'model':db[_0x4e81b2[_0x8fdd('0x1f')]],'as':_0x4e81b2['as'],'attributes':_0x4e81b2['attributes']};}):[]};}):[]};}):[]:[]})[_0x8fdd('0xd')](function(_0x500151){logger['info'](_0x8fdd('0x19'),_0x11ba74);logger[_0x8fdd('0x10')]('GetVoiceExtension',_0x11ba74,JSON['stringify'](_0x500151));_0x498ba1(_0x500151);})['catch'](function(_0x31562d){logger[_0x8fdd('0x13')]('GetVoiceExtension',_0x31562d[_0x8fdd('0x16')],_0x11ba74);_0x4b9637(_0x304289['error'](0x1f4,_0x31562d['message']));});});};
\ No newline at end of file
+var _0x9682=['catch','VoiceExtension','findAll','options','raw','attributes','limit','include','map','model','GetVoiceExtension','stringify','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','defaults','redis','socket.io-emitter','./voiceExtension.socket','register','request','then','info','request\x20sent','debug','error','code','VoiceExtension,\x20%s,\x20%s','message','result'];(function(_0x1b6563,_0x3bf0f1){var _0xdea7b8=function(_0x49e6c6){while(--_0x49e6c6){_0x1b6563['push'](_0x1b6563['shift']());}};_0xdea7b8(++_0x3bf0f1);}(_0x9682,0x116));var _0x2968=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9682[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x2968('0x0'));var moment=require(_0x2968('0x1'));var BPromise=require(_0x2968('0x2'));var rs=require(_0x2968('0x3'));var fs=require('fs');var Redis=require(_0x2968('0x4'));var db=require(_0x2968('0x5'))['db'];var utils=require(_0x2968('0x6'));var logger=require(_0x2968('0x7'))(_0x2968('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x2968('0x9')][_0x2968('0xa')]({'port':0x232a});config['redis']=_[_0x2968('0xb')](config[_0x2968('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x2968('0xd'))(new Redis(config[_0x2968('0xc')]));require(_0x2968('0xe'))[_0x2968('0xf')](socket);function respondWithRpcPromise(_0x544dda,_0x5cc808,_0x277f35){return new BPromise(function(_0x1b334c,_0x3246a8){return client[_0x2968('0x10')](_0x544dda,_0x277f35)[_0x2968('0x11')](function(_0x1a7509){logger[_0x2968('0x12')]('VoiceExtension,\x20%s,\x20%s',_0x5cc808,_0x2968('0x13'));logger[_0x2968('0x14')]('VoiceExtension,\x20%s,\x20%s,\x20%s',_0x5cc808,_0x2968('0x13'),JSON['stringify'](_0x1a7509));if(_0x1a7509[_0x2968('0x15')]){if(_0x1a7509[_0x2968('0x15')][_0x2968('0x16')]===0x1f4){logger[_0x2968('0x15')](_0x2968('0x17'),_0x5cc808,_0x1a7509['error'][_0x2968('0x18')]);return _0x3246a8(_0x1a7509['error']['message']);}logger['error'](_0x2968('0x17'),_0x5cc808,_0x1a7509[_0x2968('0x15')][_0x2968('0x18')]);return _0x1b334c(_0x1a7509[_0x2968('0x15')]['message']);}else{logger[_0x2968('0x12')](_0x2968('0x17'),_0x5cc808,_0x2968('0x13'));_0x1b334c(_0x1a7509[_0x2968('0x19')][_0x2968('0x18')]);}})[_0x2968('0x1a')](function(_0xf8874f){logger[_0x2968('0x15')](_0x2968('0x17'),_0x5cc808,_0xf8874f);_0x3246a8(_0xf8874f);});});}exports['GetVoiceExtension']=function(_0x3ef98a){var _0x10b9fa=this;return new Promise(function(_0x5a222f,_0x16eb2b){return db[_0x2968('0x1b')][_0x2968('0x1c')]({'raw':_0x3ef98a[_0x2968('0x1d')]?_0x3ef98a['options'][_0x2968('0x1e')]===undefined?!![]:![]:!![],'where':_0x3ef98a[_0x2968('0x1d')]?_0x3ef98a[_0x2968('0x1d')]['where']||null:null,'attributes':_0x3ef98a[_0x2968('0x1d')]?_0x3ef98a[_0x2968('0x1d')][_0x2968('0x1f')]||null:null,'limit':_0x3ef98a[_0x2968('0x1d')]?_0x3ef98a[_0x2968('0x1d')][_0x2968('0x20')]||null:null,'include':_0x3ef98a[_0x2968('0x1d')]?_0x3ef98a['options'][_0x2968('0x21')]?_[_0x2968('0x22')](_0x3ef98a[_0x2968('0x1d')][_0x2968('0x21')],function(_0x55fd16){return{'model':db[_0x55fd16[_0x2968('0x23')]],'as':_0x55fd16['as'],'attributes':_0x55fd16['attributes'],'include':_0x55fd16[_0x2968('0x21')]?_[_0x2968('0x22')](_0x55fd16['include'],function(_0x4d0756){return{'model':db[_0x4d0756[_0x2968('0x23')]],'as':_0x4d0756['as'],'attributes':_0x4d0756['attributes'],'include':_0x4d0756[_0x2968('0x21')]?_[_0x2968('0x22')](_0x4d0756[_0x2968('0x21')],function(_0x5c43b2){return{'model':db[_0x5c43b2[_0x2968('0x23')]],'as':_0x5c43b2['as'],'attributes':_0x5c43b2[_0x2968('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x2968('0x11')](function(_0xe68710){logger['info'](_0x2968('0x24'),_0x3ef98a);logger[_0x2968('0x14')]('GetVoiceExtension',_0x3ef98a,JSON[_0x2968('0x25')](_0xe68710));_0x5a222f(_0xe68710);})[_0x2968('0x1a')](function(_0x2dd2a7){logger[_0x2968('0x15')](_0x2968('0x24'),_0x2dd2a7['message'],_0x3ef98a);_0x16eb2b(_0x10b9fa['error'](0x1f4,_0x2dd2a7[_0x2968('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceExtension/voiceExtension.socket.js b/server/api/voiceExtension/voiceExtension.socket.js
index e51a26d..e85bce8 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 _0x38c1=['removeListener','register','length','./voiceExtension.events','save','remove','update'];(function(_0x57a2d6,_0x479664){var _0x131ed8=function(_0x5b9a0a){while(--_0x5b9a0a){_0x57a2d6['push'](_0x57a2d6['shift']());}};_0x131ed8(++_0x479664);}(_0x38c1,0x8f));var _0x138c=function(_0x2cd8a4,_0x51fb40){_0x2cd8a4=_0x2cd8a4-0x0;var _0x375630=_0x38c1[_0x2cd8a4];return _0x375630;};'use strict';var VoiceExtensionEvents=require(_0x138c('0x0'));var events=[_0x138c('0x1'),_0x138c('0x2'),_0x138c('0x3')];function createListener(_0x4fbdcd,_0x1f7c04){return function(_0x14a974){_0x1f7c04['emit'](_0x4fbdcd,_0x14a974);};}function removeListener(_0x2cded6,_0x47a4de){return function(){VoiceExtensionEvents[_0x138c('0x4')](_0x2cded6,_0x47a4de);};}exports[_0x138c('0x5')]=function(_0xfbbef){for(var _0xdd42dd=0x0,_0x110bbe=events[_0x138c('0x6')];_0xdd42dd<_0x110bbe;_0xdd42dd++){var _0x1a52f4=events[_0xdd42dd];var _0x4bd743=createListener('voiceExtension:'+_0x1a52f4,_0xfbbef);VoiceExtensionEvents['on'](_0x1a52f4,_0x4bd743);}};
\ No newline at end of file
+var _0x6661=['update','emit','removeListener','register','length','voiceExtension:','./voiceExtension.events','save'];(function(_0x4aa4f6,_0x17d692){var _0x2d0114=function(_0x4731c2){while(--_0x4731c2){_0x4aa4f6['push'](_0x4aa4f6['shift']());}};_0x2d0114(++_0x17d692);}(_0x6661,0x186));var _0x1666=function(_0x47aa64,_0xfb8a07){_0x47aa64=_0x47aa64-0x0;var _0x549c7a=_0x6661[_0x47aa64];return _0x549c7a;};'use strict';var VoiceExtensionEvents=require(_0x1666('0x0'));var events=[_0x1666('0x1'),'remove',_0x1666('0x2')];function createListener(_0x567958,_0x11a99e){return function(_0x5e30c1){_0x11a99e[_0x1666('0x3')](_0x567958,_0x5e30c1);};}function removeListener(_0x58b4f7,_0x3ebbcc){return function(){VoiceExtensionEvents[_0x1666('0x4')](_0x58b4f7,_0x3ebbcc);};}exports[_0x1666('0x5')]=function(_0x4dfea1){for(var _0x1c5000=0x0,_0x51a4a5=events[_0x1666('0x6')];_0x1c5000<_0x51a4a5;_0x1c5000++){var _0x14f200=events[_0x1c5000];var _0x43fc81=createListener(_0x1666('0x7')+_0x14f200,_0x4dfea1);VoiceExtensionEvents['on'](_0x14f200,_0x43fc81);}};
\ No newline at end of file
diff --git a/server/api/voiceMail/index.js b/server/api/voiceMail/index.js
index d9dce2e..bf9b29e 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 _0x8769=['/:id/messages','getMessages','put','update','delete','destroy','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./voiceMail.controller','isAuthenticated','index','/:id','show'];(function(_0x122e35,_0x24a3dc){var _0x3584a9=function(_0x4dd8d8){while(--_0x4dd8d8){_0x122e35['push'](_0x122e35['shift']());}};_0x3584a9(++_0x24a3dc);}(_0x8769,0x126));var _0x9876=function(_0x29d94e,_0xf386d6){_0x29d94e=_0x29d94e-0x0;var _0x106237=_0x8769[_0x29d94e];return _0x106237;};'use strict';var multer=require(_0x9876('0x0'));var util=require(_0x9876('0x1'));var path=require(_0x9876('0x2'));var timeout=require('connect-timeout');var express=require(_0x9876('0x3'));var router=express[_0x9876('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x9876('0x5'));var config=require(_0x9876('0x6'));var controller=require(_0x9876('0x7'));router['get']('/',auth[_0x9876('0x8')](),controller[_0x9876('0x9')]);router['get'](_0x9876('0xa'),auth['isAuthenticated'](),controller[_0x9876('0xb')]);router['get'](_0x9876('0xc'),auth[_0x9876('0x8')](),controller[_0x9876('0xd')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x9876('0xe')]('/:id',auth[_0x9876('0x8')](),controller[_0x9876('0xf')]);router[_0x9876('0x10')]('/:id',auth['isAuthenticated'](),controller[_0x9876('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0x68a2=['multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceMail.controller','get','isAuthenticated','index','show','/:id/messages','post','/:id','update','delete','destroy','exports'];(function(_0x4440b2,_0x10863e){var _0x528d77=function(_0x23b583){while(--_0x23b583){_0x4440b2['push'](_0x4440b2['shift']());}};_0x528d77(++_0x10863e);}(_0x68a2,0x78));var _0x268a=function(_0x2d6ef2,_0x2f8091){_0x2d6ef2=_0x2d6ef2-0x0;var _0x33af33=_0x68a2[_0x2d6ef2];return _0x33af33;};'use strict';var multer=require(_0x268a('0x0'));var util=require(_0x268a('0x1'));var path=require(_0x268a('0x2'));var timeout=require(_0x268a('0x3'));var express=require('express');var router=express[_0x268a('0x4')]();var auth=require(_0x268a('0x5'));var interaction=require(_0x268a('0x6'));var config=require(_0x268a('0x7'));var controller=require(_0x268a('0x8'));router[_0x268a('0x9')]('/',auth[_0x268a('0xa')](),controller[_0x268a('0xb')]);router[_0x268a('0x9')]('/:id',auth[_0x268a('0xa')](),controller[_0x268a('0xc')]);router[_0x268a('0x9')](_0x268a('0xd'),auth['isAuthenticated'](),controller['getMessages']);router[_0x268a('0xe')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x268a('0xf'),auth['isAuthenticated'](),controller[_0x268a('0x10')]);router[_0x268a('0x11')](_0x268a('0xf'),auth[_0x268a('0xa')](),controller[_0x268a('0x12')]);module[_0x268a('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.attributes.js b/server/api/voiceMail/voiceMail.attributes.js
index 8c9cb61..30bd8a2 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 _0x4213=['trim','central','yes','ENUM','TINYINT(4)','INTEGER','VIRTUAL','getDataValue','fullname','\x20-\x20','mailbox','sequelize','exports','STRING','from-voicemail','contest_mailbox','setDataValue','email'];(function(_0x1a0c7f,_0x2137de){var _0x557663=function(_0x4c1fe3){while(--_0x4c1fe3){_0x1a0c7f['push'](_0x1a0c7f['shift']());}};_0x557663(++_0x2137de);}(_0x4213,0x77));var _0x3421=function(_0x3535fb,_0x57467d){_0x3535fb=_0x3535fb-0x0;var _0x346348=_0x4213[_0x3535fb];return _0x346348;};'use strict';var Sequelize=require(_0x3421('0x0'));module[_0x3421('0x1')]={'customer_id':{'type':Sequelize[_0x3421('0x2')]},'context':{'type':Sequelize[_0x3421('0x2')],'defaultValue':_0x3421('0x3'),'unique':_0x3421('0x4')},'mailbox':{'type':Sequelize[_0x3421('0x2')],'defaultValue':'','allowNull':![],'unique':'contest_mailbox'},'password':{'type':Sequelize[_0x3421('0x2')]},'fullname':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x3421('0x2')],'validate':{'isEmail':!![]},'set':function(_0xfe969c){this[_0x3421('0x5')](_0x3421('0x6'),typeof _0xfe969c==='string'&&_0xfe969c[_0x3421('0x7')]()?_0xfe969c[_0x3421('0x7')]():null);}},'pager':{'type':Sequelize[_0x3421('0x2')]},'tz':{'type':Sequelize[_0x3421('0x2')],'defaultValue':_0x3421('0x8')},'attach':{'type':Sequelize['ENUM'](_0x3421('0x9'),'no'),'defaultValue':'yes','allowNull':![]},'saycid':{'type':Sequelize['ENUM'](_0x3421('0x9'),'no'),'defaultValue':'yes','allowNull':![]},'dialout':{'type':Sequelize[_0x3421('0x2')]},'callback':{'type':Sequelize[_0x3421('0x2')]},'review':{'type':Sequelize[_0x3421('0xa')](_0x3421('0x9'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0x3421('0xa')](_0x3421('0x9'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0x3421('0xa')]('yes','no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0x3421('0xa')](_0x3421('0x9'),'no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0x3421('0xb'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0x3421('0xa')](_0x3421('0x9'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0x3421('0xa')](_0x3421('0x9'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize['ENUM'](_0x3421('0x9'),'no'),'defaultValue':'yes','allowNull':![]},'forcename':{'type':Sequelize[_0x3421('0xa')](_0x3421('0x9'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize['ENUM'](_0x3421('0x9'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize['ENUM'](_0x3421('0x9'),'no'),'defaultValue':_0x3421('0x9'),'allowNull':![]},'stamp':{'type':'TIMESTAMP'},'emailsubject':{'type':Sequelize[_0x3421('0x2')]},'emailbody':{'type':Sequelize[_0x3421('0x2')]},'maxsecs':{'type':Sequelize[_0x3421('0xc')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0x3421('0xc')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0x3421('0xd')],'get':function(){return this[_0x3421('0xe')](_0x3421('0xf'))+_0x3421('0x10')+this[_0x3421('0xe')](_0x3421('0x11'));}}};
\ No newline at end of file
+var _0x8f4c=['fullname','\x20-\x20','mailbox','sequelize','exports','STRING','from-voicemail','contest_mailbox','trim','central','ENUM','yes','TINYINT(4)','INTEGER','VIRTUAL','getDataValue'];(function(_0x45a4a3,_0x259b4c){var _0xaeec48=function(_0x2057d3){while(--_0x2057d3){_0x45a4a3['push'](_0x45a4a3['shift']());}};_0xaeec48(++_0x259b4c);}(_0x8f4c,0x113));var _0xc8f4=function(_0x15f38c,_0x5cba33){_0x15f38c=_0x15f38c-0x0;var _0x3b94dd=_0x8f4c[_0x15f38c];return _0x3b94dd;};'use strict';var Sequelize=require(_0xc8f4('0x0'));module[_0xc8f4('0x1')]={'customer_id':{'type':Sequelize[_0xc8f4('0x2')]},'context':{'type':Sequelize[_0xc8f4('0x2')],'defaultValue':_0xc8f4('0x3'),'unique':_0xc8f4('0x4')},'mailbox':{'type':Sequelize['STRING'],'defaultValue':'','allowNull':![],'unique':_0xc8f4('0x4')},'password':{'type':Sequelize[_0xc8f4('0x2')]},'fullname':{'type':Sequelize[_0xc8f4('0x2')]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]},'set':function(_0x32cd80){this['setDataValue']('email',typeof _0x32cd80==='string'&&_0x32cd80[_0xc8f4('0x5')]()?_0x32cd80['trim']():null);}},'pager':{'type':Sequelize[_0xc8f4('0x2')]},'tz':{'type':Sequelize[_0xc8f4('0x2')],'defaultValue':_0xc8f4('0x6')},'attach':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':'yes','allowNull':![]},'saycid':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':_0xc8f4('0x8'),'allowNull':![]},'dialout':{'type':Sequelize[_0xc8f4('0x2')]},'callback':{'type':Sequelize['STRING']},'review':{'type':Sequelize[_0xc8f4('0x7')]('yes','no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0xc8f4('0x7')]('yes','no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0xc8f4('0x9'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize[_0xc8f4('0x7')]('yes','no'),'defaultValue':_0xc8f4('0x8'),'allowNull':![]},'forcename':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0xc8f4('0x7')](_0xc8f4('0x8'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize['ENUM'](_0xc8f4('0x8'),'no'),'defaultValue':'yes','allowNull':![]},'stamp':{'type':'TIMESTAMP'},'emailsubject':{'type':Sequelize[_0xc8f4('0x2')]},'emailbody':{'type':Sequelize[_0xc8f4('0x2')]},'maxsecs':{'type':Sequelize[_0xc8f4('0xa')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0xc8f4('0xa')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0xc8f4('0xb')],'get':function(){return this[_0xc8f4('0xc')](_0xc8f4('0xd'))+_0xc8f4('0xe')+this[_0xc8f4('0xc')](_0xc8f4('0xf'));}}};
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.controller.js b/server/api/voiceMail/voiceMail.controller.js
index 78efae3..aea7ea1 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 _0xaba0=['create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','Voicemails','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','getMessages','findOne','nolimit','mailbox','findAndCountAll','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','status','offset','limit','set','Content-Range','json','apply','reject','save','update','destroy','then','get','UserProfileResource','end','sendStatus','error','stack','name','send','index','map','VoiceMail','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','count','includeAll','rows','catch','show','merge','options','find'];(function(_0x3422bf,_0x21b1da){var _0x4de668=function(_0x271cce){while(--_0x271cce){_0x3422bf['push'](_0x3422bf['shift']());}};_0x4de668(++_0x21b1da);}(_0xaba0,0x64));var _0x0aba=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xaba0[_0x1facfa];return _0x9ec701;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x0aba('0x0'));var rimraf=require(_0x0aba('0x1'));var zipdir=require(_0x0aba('0x2'));var jsonpatch=require(_0x0aba('0x3'));var rp=require('request-promise');var moment=require(_0x0aba('0x4'));var BPromise=require(_0x0aba('0x5'));var Mustache=require(_0x0aba('0x6'));var util=require(_0x0aba('0x7'));var path=require(_0x0aba('0x8'));var sox=require(_0x0aba('0x9'));var csv=require('to-csv');var ejs=require(_0x0aba('0xa'));var fs=require('fs');var _=require('lodash');var squel=require(_0x0aba('0xb'));var crypto=require('crypto');var jsforce=require(_0x0aba('0xc'));var deskjs=require(_0x0aba('0xd'));var toCsv=require('to-csv');var querystring=require(_0x0aba('0xe'));var Papa=require(_0x0aba('0xf'));var Redis=require(_0x0aba('0x10'));var authService=require(_0x0aba('0x11'));var qs=require(_0x0aba('0x12'));var as=require(_0x0aba('0x13'));var hardwareService=require(_0x0aba('0x14'));var logger=require(_0x0aba('0x15'))(_0x0aba('0x16'));var utils=require(_0x0aba('0x17'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4f5335,_0x5d9b44){_0x5d9b44=_0x5d9b44||0xcc;return function(_0x489bf1){if(_0x489bf1){return _0x4f5335['sendStatus'](_0x5d9b44);}return _0x4f5335['status'](_0x5d9b44)['end']();};}function respondWithResult(_0x24052d,_0x236cba){_0x236cba=_0x236cba||0xc8;return function(_0x30c9db){if(_0x30c9db){return _0x24052d[_0x0aba('0x18')](_0x236cba)['json'](_0x30c9db);}};}function respondWithFilteredResult(_0x262c93,_0x9bc332){return function(_0x592b2a){if(_0x592b2a){var _0x53d8ce=_0x592b2a['count'],_0xdaff3d=_0x9bc332[_0x0aba('0x19')],_0x17bb7d=_0x9bc332[_0x0aba('0x19')]+_0x9bc332[_0x0aba('0x1a')],_0x16afed;if(_0x17bb7d>=_0x53d8ce){_0x17bb7d=_0x53d8ce;_0x16afed=0xc8;}else{_0x16afed=0xce;}_0x262c93[_0x0aba('0x18')](_0x16afed);return _0x262c93[_0x0aba('0x1b')](_0x0aba('0x1c'),_0xdaff3d+'-'+_0x17bb7d+'/'+_0x53d8ce)[_0x0aba('0x1d')](_0x592b2a);}return null;};}function patchUpdates(_0x3bb61c){return function(_0x22a2c2){try{jsonpatch[_0x0aba('0x1e')](_0x22a2c2,_0x3bb61c,!![]);}catch(_0x22541b){return BPromise[_0x0aba('0x1f')](_0x22541b);}return _0x22a2c2[_0x0aba('0x20')]();};}function saveUpdates(_0x36f1a8,_0x4d21a4){return function(_0x32d591){if(_0x32d591){return _0x32d591[_0x0aba('0x21')](_0x36f1a8)['then'](function(_0x3e41e5){return _0x3e41e5;});}return null;};}function removeEntity(_0x34372b,_0x532955){return function(_0x1d7b1b){if(_0x1d7b1b){return _0x1d7b1b[_0x0aba('0x22')]()[_0x0aba('0x23')](function(){var _0x1a103c=_0x1d7b1b[_0x0aba('0x24')]({'plain':!![]});var _0x10953a='Voicemails';return db[_0x0aba('0x25')][_0x0aba('0x22')]({'where':{'type':_0x10953a,'resourceId':_0x1a103c['id']}})[_0x0aba('0x23')](function(){return _0x1d7b1b;});})[_0x0aba('0x23')](function(){_0x34372b[_0x0aba('0x18')](0xcc)[_0x0aba('0x26')]();});}};}function handleEntityNotFound(_0x32a603,_0x4c6d06){return function(_0x5b298f){if(!_0x5b298f){_0x32a603[_0x0aba('0x27')](0x194);}return _0x5b298f;};}function handleError(_0x209f68,_0x557696){_0x557696=_0x557696||0x1f4;return function(_0x228e4a){logger[_0x0aba('0x28')](_0x228e4a[_0x0aba('0x29')]);if(_0x228e4a[_0x0aba('0x2a')]){delete _0x228e4a[_0x0aba('0x2a')];}_0x209f68[_0x0aba('0x18')](_0x557696)[_0x0aba('0x2b')](_0x228e4a);};}exports[_0x0aba('0x2c')]=function(_0xeaf2df,_0x185655){var _0x246cb4={},_0x3bb2c0={},_0x2384e7={'count':0x0,'rows':[]};var _0x3475c6=_[_0x0aba('0x2d')](db[_0x0aba('0x2e')][_0x0aba('0x2f')],function(_0x3e1010){return{'name':_0x3e1010[_0x0aba('0x30')],'type':_0x3e1010[_0x0aba('0x31')][_0x0aba('0x32')]};});_0x3bb2c0[_0x0aba('0x33')]=_['map'](_0x3475c6,'name');_0x3bb2c0['query']=_[_0x0aba('0x34')](_0xeaf2df['query']);_0x3bb2c0[_0x0aba('0x35')]=_[_0x0aba('0x36')](_0x3bb2c0['model'],_0x3bb2c0[_0x0aba('0x37')]);_0x246cb4[_0x0aba('0x38')]=_['intersection'](_0x3bb2c0[_0x0aba('0x33')],qs[_0x0aba('0x39')](_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x39')]));_0x246cb4[_0x0aba('0x38')]=_0x246cb4[_0x0aba('0x38')][_0x0aba('0x3a')]?_0x246cb4['attributes']:_0x3bb2c0[_0x0aba('0x33')];if(!_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x3b')]('nolimit')){_0x246cb4[_0x0aba('0x1a')]=qs[_0x0aba('0x1a')](_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x1a')]);_0x246cb4['offset']=qs['offset'](_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x19')]);}_0x246cb4[_0x0aba('0x3c')]=qs[_0x0aba('0x3d')](_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x3d')]);_0x246cb4[_0x0aba('0x3e')]=qs[_0x0aba('0x35')](_[_0x0aba('0x3f')](_0xeaf2df[_0x0aba('0x37')],_0x3bb2c0[_0x0aba('0x35')]));if(_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x40')]){_0x246cb4[_0x0aba('0x3e')]=_['merge'](_0x246cb4[_0x0aba('0x3e')],{'$or':_[_0x0aba('0x2d')](_0x3475c6,function(_0x55e894){if(_0x55e894[_0x0aba('0x31')]!==_0x0aba('0x41')){var _0x1ea4c0={};_0x1ea4c0[_0x55e894['name']]={'$like':'%'+_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x40')]+'%'};return _0x1ea4c0;}})});}_0x246cb4=_['merge']({},_0x246cb4,_0xeaf2df['options']);var _0x227312={'where':_0x246cb4[_0x0aba('0x3e')]};return db['VoiceMail']['count'](_0x227312)[_0x0aba('0x23')](function(_0x25bae9){_0x2384e7[_0x0aba('0x42')]=_0x25bae9;if(_0xeaf2df[_0x0aba('0x37')][_0x0aba('0x43')]){_0x246cb4['include']=[{'all':!![]}];}return db[_0x0aba('0x2e')]['findAll'](_0x246cb4);})[_0x0aba('0x23')](function(_0x4ce8ec){_0x2384e7[_0x0aba('0x44')]=_0x4ce8ec;return _0x2384e7;})['then'](respondWithFilteredResult(_0x185655,_0x246cb4))[_0x0aba('0x45')](handleError(_0x185655,null));};exports[_0x0aba('0x46')]=function(_0x5059b2,_0x49ebd9){var _0x1260fb={'raw':!![],'where':{'id':_0x5059b2['params']['id']}},_0xac151c={};_0xac151c[_0x0aba('0x33')]=_[_0x0aba('0x34')](db[_0x0aba('0x2e')][_0x0aba('0x2f')]);_0xac151c[_0x0aba('0x37')]=_[_0x0aba('0x34')](_0x5059b2[_0x0aba('0x37')]);_0xac151c[_0x0aba('0x35')]=_[_0x0aba('0x36')](_0xac151c['model'],_0xac151c[_0x0aba('0x37')]);_0x1260fb['attributes']=_[_0x0aba('0x36')](_0xac151c[_0x0aba('0x33')],qs[_0x0aba('0x39')](_0x5059b2[_0x0aba('0x37')][_0x0aba('0x39')]));_0x1260fb[_0x0aba('0x38')]=_0x1260fb[_0x0aba('0x38')][_0x0aba('0x3a')]?_0x1260fb[_0x0aba('0x38')]:_0xac151c[_0x0aba('0x33')];if(_0x5059b2[_0x0aba('0x37')]['includeAll']){_0x1260fb['include']=[{'all':!![]}];}_0x1260fb=_[_0x0aba('0x47')]({},_0x1260fb,_0x5059b2[_0x0aba('0x48')]);return db[_0x0aba('0x2e')][_0x0aba('0x49')](_0x1260fb)[_0x0aba('0x23')](handleEntityNotFound(_0x49ebd9,null))[_0x0aba('0x23')](respondWithResult(_0x49ebd9,null))[_0x0aba('0x45')](handleError(_0x49ebd9,null));};exports['create']=function(_0x5bb156,_0x2b53e5){return db[_0x0aba('0x2e')][_0x0aba('0x4a')](_0x5bb156[_0x0aba('0x4b')],{})[_0x0aba('0x23')](function(_0x21f144){var _0x3b0c88=_0x5bb156[_0x0aba('0x4c')][_0x0aba('0x24')]({'plain':!![]});if(!_0x3b0c88)throw new Error(_0x0aba('0x4d'));if(_0x3b0c88['role']==='user'){var _0x3b7e07=_0x21f144[_0x0aba('0x24')]({'plain':!![]});var _0x8ca117=_0x0aba('0x4e');return db[_0x0aba('0x4f')]['find']({'where':{'name':_0x8ca117,'userProfileId':_0x3b0c88['userProfileId']},'raw':!![]})['then'](function(_0x1c8344){if(_0x1c8344&&_0x1c8344['autoAssociation']===0x0){return db[_0x0aba('0x25')]['create']({'name':_0x3b7e07[_0x0aba('0x2a')],'resourceId':_0x3b7e07['id'],'type':_0x1c8344[_0x0aba('0x2a')],'sectionId':_0x1c8344['id']},{})[_0x0aba('0x23')](function(){return _0x21f144;});}else{return _0x21f144;}})[_0x0aba('0x45')](function(_0x55de85){logger[_0x0aba('0x28')](_0x0aba('0x50'),_0x55de85);throw _0x55de85;});}return _0x21f144;})[_0x0aba('0x23')](respondWithResult(_0x2b53e5,0xc9))['catch'](handleError(_0x2b53e5,null));};exports['update']=function(_0x209e8f,_0x3a6d87){if(_0x209e8f[_0x0aba('0x4b')]['id']){delete _0x209e8f[_0x0aba('0x4b')]['id'];}return db[_0x0aba('0x2e')][_0x0aba('0x49')]({'where':{'id':_0x209e8f[_0x0aba('0x51')]['id']}})[_0x0aba('0x23')](handleEntityNotFound(_0x3a6d87,null))[_0x0aba('0x23')](saveUpdates(_0x209e8f['body'],null))[_0x0aba('0x23')](respondWithResult(_0x3a6d87,null))['catch'](handleError(_0x3a6d87,null));};exports[_0x0aba('0x22')]=function(_0x4fefa7,_0x24932b){return db[_0x0aba('0x2e')]['find']({'where':{'id':_0x4fefa7[_0x0aba('0x51')]['id']}})['then'](handleEntityNotFound(_0x24932b,null))['then'](removeEntity(_0x24932b,null))['catch'](handleError(_0x24932b,null));};exports[_0x0aba('0x52')]=function(_0x29e88c,_0x38fe53,_0x3ec597){return db[_0x0aba('0x2e')][_0x0aba('0x53')]({'where':{'id':_0x29e88c[_0x0aba('0x51')]['id']}})['then'](handleEntityNotFound(_0x38fe53,null))[_0x0aba('0x23')](function(_0x3e76a0){var _0x4bdbdb;var _0x24b9aa={},_0xe86a65={};_0xe86a65['model']=_['keys'](db['VoiceMailMessage'][_0x0aba('0x2f')]);_0xe86a65[_0x0aba('0x37')]=_[_0x0aba('0x34')](_0x29e88c[_0x0aba('0x37')]);_0xe86a65[_0x0aba('0x35')]=_[_0x0aba('0x36')](_0xe86a65[_0x0aba('0x33')],_0xe86a65[_0x0aba('0x37')]);_0x24b9aa[_0x0aba('0x38')]=_[_0x0aba('0x36')](_0xe86a65[_0x0aba('0x33')],qs[_0x0aba('0x39')](_0x29e88c[_0x0aba('0x37')]['fields']));_0x24b9aa[_0x0aba('0x38')]=_0x24b9aa[_0x0aba('0x38')][_0x0aba('0x3a')]?_0x24b9aa[_0x0aba('0x38')]:_0xe86a65[_0x0aba('0x33')];if(!_0x29e88c[_0x0aba('0x37')]['hasOwnProperty'](_0x0aba('0x54'))){_0x24b9aa[_0x0aba('0x1a')]=qs[_0x0aba('0x1a')](_0x29e88c[_0x0aba('0x37')][_0x0aba('0x1a')]);_0x24b9aa[_0x0aba('0x19')]=qs[_0x0aba('0x19')](_0x29e88c['query']['offset']);}_0x24b9aa[_0x0aba('0x3c')]=qs[_0x0aba('0x3d')](_0x29e88c[_0x0aba('0x37')][_0x0aba('0x3d')]);_0x24b9aa[_0x0aba('0x3e')]=qs[_0x0aba('0x35')](_[_0x0aba('0x3f')](_0x29e88c[_0x0aba('0x37')],_0xe86a65[_0x0aba('0x35')]));if(_0x29e88c[_0x0aba('0x37')][_0x0aba('0x40')]){_0x24b9aa[_0x0aba('0x3e')]=_[_0x0aba('0x47')](_0x24b9aa['where'],{'$or':_[_0x0aba('0x2d')](_0x24b9aa[_0x0aba('0x38')],function(_0xa30a72){var _0x4c6685={};_0x4c6685[_0xa30a72]={'$like':'%'+_0x29e88c[_0x0aba('0x37')][_0x0aba('0x40')]+'%'};return _0x4c6685;})});}_0x24b9aa[_0x0aba('0x3e')]=_['merge'](_0x24b9aa[_0x0aba('0x3e')],{'mailboxuser':_0x3e76a0[_0x0aba('0x55')]});_0x24b9aa=_['merge']({},_0x24b9aa,_0x29e88c['options']);return db['VoiceMailMessage'][_0x0aba('0x56')](_0x24b9aa)[_0x0aba('0x23')](respondWithFilteredResult(_0x38fe53,_0x24b9aa));})[_0x0aba('0x45')](handleError(_0x38fe53,null));};
\ No newline at end of file
+var _0xf911=['index','map','VoiceMail','rawAttributes','fieldName','type','model','keys','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filters','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','getMessages','findOne','VoiceMailMessage','findAndCountAll','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','json','count','offset','status','set','Content-Range','apply','reject','save','update','destroy','get','Voicemails','UserProfileResource','then','error','stack','name'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xf911,0xe2));var _0x1f91=function(_0x58fa9f,_0x5a4566){_0x58fa9f=_0x58fa9f-0x0;var _0x239fc5=_0xf911[_0x58fa9f];return _0x239fc5;};'use strict';var pdf=require(_0x1f91('0x0'));var emlformat=require(_0x1f91('0x1'));var rimraf=require(_0x1f91('0x2'));var zipdir=require(_0x1f91('0x3'));var jsonpatch=require(_0x1f91('0x4'));var rp=require(_0x1f91('0x5'));var moment=require(_0x1f91('0x6'));var BPromise=require(_0x1f91('0x7'));var Mustache=require('mustache');var util=require(_0x1f91('0x8'));var path=require(_0x1f91('0x9'));var sox=require(_0x1f91('0xa'));var csv=require(_0x1f91('0xb'));var ejs=require(_0x1f91('0xc'));var fs=require('fs');var _=require(_0x1f91('0xd'));var squel=require(_0x1f91('0xe'));var crypto=require('crypto');var jsforce=require(_0x1f91('0xf'));var deskjs=require(_0x1f91('0x10'));var toCsv=require(_0x1f91('0xb'));var querystring=require(_0x1f91('0x11'));var Papa=require(_0x1f91('0x12'));var Redis=require(_0x1f91('0x13'));var authService=require(_0x1f91('0x14'));var qs=require(_0x1f91('0x15'));var as=require(_0x1f91('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1f91('0x17'))(_0x1f91('0x18'));var utils=require(_0x1f91('0x19'));var config=require(_0x1f91('0x1a'));var db=require(_0x1f91('0x1b'))['db'];function respondWithStatusCode(_0x4e688e,_0xb538a7){_0xb538a7=_0xb538a7||0xcc;return function(_0xf38020){if(_0xf38020){return _0x4e688e[_0x1f91('0x1c')](_0xb538a7);}return _0x4e688e['status'](_0xb538a7)['end']();};}function respondWithResult(_0x16dc0a,_0x58100c){_0x58100c=_0x58100c||0xc8;return function(_0x4a93f1){if(_0x4a93f1){return _0x16dc0a['status'](_0x58100c)[_0x1f91('0x1d')](_0x4a93f1);}};}function respondWithFilteredResult(_0x3ef5d5,_0x48b387){return function(_0x39b34e){if(_0x39b34e){var _0x4e575e=_0x39b34e[_0x1f91('0x1e')],_0x26bbe0=_0x48b387[_0x1f91('0x1f')],_0x248882=_0x48b387['offset']+_0x48b387['limit'],_0x1e495a;if(_0x248882>=_0x4e575e){_0x248882=_0x4e575e;_0x1e495a=0xc8;}else{_0x1e495a=0xce;}_0x3ef5d5[_0x1f91('0x20')](_0x1e495a);return _0x3ef5d5[_0x1f91('0x21')](_0x1f91('0x22'),_0x26bbe0+'-'+_0x248882+'/'+_0x4e575e)[_0x1f91('0x1d')](_0x39b34e);}return null;};}function patchUpdates(_0x25cc1a){return function(_0x1f69ac){try{jsonpatch[_0x1f91('0x23')](_0x1f69ac,_0x25cc1a,!![]);}catch(_0x181319){return BPromise[_0x1f91('0x24')](_0x181319);}return _0x1f69ac[_0x1f91('0x25')]();};}function saveUpdates(_0x50d2cd,_0x512c00){return function(_0x43353f){if(_0x43353f){return _0x43353f[_0x1f91('0x26')](_0x50d2cd)['then'](function(_0x24c1c6){return _0x24c1c6;});}return null;};}function removeEntity(_0x29b8ec,_0x10ec47){return function(_0x49f246){if(_0x49f246){return _0x49f246[_0x1f91('0x27')]()['then'](function(){var _0x3ba743=_0x49f246[_0x1f91('0x28')]({'plain':!![]});var _0x12edd5=_0x1f91('0x29');return db[_0x1f91('0x2a')][_0x1f91('0x27')]({'where':{'type':_0x12edd5,'resourceId':_0x3ba743['id']}})[_0x1f91('0x2b')](function(){return _0x49f246;});})[_0x1f91('0x2b')](function(){_0x29b8ec[_0x1f91('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x49e4e9,_0x3dcddc){return function(_0x26730b){if(!_0x26730b){_0x49e4e9[_0x1f91('0x1c')](0x194);}return _0x26730b;};}function handleError(_0x3b80c1,_0x229c8c){_0x229c8c=_0x229c8c||0x1f4;return function(_0x5749c2){logger[_0x1f91('0x2c')](_0x5749c2[_0x1f91('0x2d')]);if(_0x5749c2[_0x1f91('0x2e')]){delete _0x5749c2['name'];}_0x3b80c1[_0x1f91('0x20')](_0x229c8c)['send'](_0x5749c2);};}exports[_0x1f91('0x2f')]=function(_0x4e4552,_0x483b3f){var _0x838277={},_0xcb72af={},_0x28eb04={'count':0x0,'rows':[]};var _0x14c3d3=_[_0x1f91('0x30')](db[_0x1f91('0x31')][_0x1f91('0x32')],function(_0x173abe){return{'name':_0x173abe[_0x1f91('0x33')],'type':_0x173abe[_0x1f91('0x34')]['key']};});_0xcb72af[_0x1f91('0x35')]=_[_0x1f91('0x30')](_0x14c3d3,_0x1f91('0x2e'));_0xcb72af['query']=_[_0x1f91('0x36')](_0x4e4552[_0x1f91('0x37')]);_0xcb72af['filters']=_['intersection'](_0xcb72af[_0x1f91('0x35')],_0xcb72af[_0x1f91('0x37')]);_0x838277[_0x1f91('0x38')]=_[_0x1f91('0x39')](_0xcb72af[_0x1f91('0x35')],qs[_0x1f91('0x3a')](_0x4e4552[_0x1f91('0x37')]['fields']));_0x838277[_0x1f91('0x38')]=_0x838277[_0x1f91('0x38')][_0x1f91('0x3b')]?_0x838277[_0x1f91('0x38')]:_0xcb72af[_0x1f91('0x35')];if(!_0x4e4552[_0x1f91('0x37')][_0x1f91('0x3c')](_0x1f91('0x3d'))){_0x838277[_0x1f91('0x3e')]=qs[_0x1f91('0x3e')](_0x4e4552['query'][_0x1f91('0x3e')]);_0x838277['offset']=qs[_0x1f91('0x1f')](_0x4e4552['query'][_0x1f91('0x1f')]);}_0x838277[_0x1f91('0x3f')]=qs[_0x1f91('0x40')](_0x4e4552[_0x1f91('0x37')][_0x1f91('0x40')]);_0x838277[_0x1f91('0x41')]=qs['filters'](_[_0x1f91('0x42')](_0x4e4552[_0x1f91('0x37')],_0xcb72af[_0x1f91('0x43')]));if(_0x4e4552[_0x1f91('0x37')][_0x1f91('0x44')]){_0x838277[_0x1f91('0x41')]=_['merge'](_0x838277['where'],{'$or':_[_0x1f91('0x30')](_0x14c3d3,function(_0x33e701){if(_0x33e701[_0x1f91('0x34')]!==_0x1f91('0x45')){var _0x11e171={};_0x11e171[_0x33e701[_0x1f91('0x2e')]]={'$like':'%'+_0x4e4552[_0x1f91('0x37')][_0x1f91('0x44')]+'%'};return _0x11e171;}})});}_0x838277=_[_0x1f91('0x46')]({},_0x838277,_0x4e4552[_0x1f91('0x47')]);var _0x4b9b7e={'where':_0x838277[_0x1f91('0x41')]};return db['VoiceMail'][_0x1f91('0x1e')](_0x4b9b7e)[_0x1f91('0x2b')](function(_0x1852e2){_0x28eb04[_0x1f91('0x1e')]=_0x1852e2;if(_0x4e4552[_0x1f91('0x37')][_0x1f91('0x48')]){_0x838277[_0x1f91('0x49')]=[{'all':!![]}];}return db[_0x1f91('0x31')][_0x1f91('0x4a')](_0x838277);})[_0x1f91('0x2b')](function(_0x2c04db){_0x28eb04[_0x1f91('0x4b')]=_0x2c04db;return _0x28eb04;})[_0x1f91('0x2b')](respondWithFilteredResult(_0x483b3f,_0x838277))[_0x1f91('0x4c')](handleError(_0x483b3f,null));};exports[_0x1f91('0x4d')]=function(_0x480bf9,_0x4c8c16){var _0x15400c={'raw':!![],'where':{'id':_0x480bf9['params']['id']}},_0x316937={};_0x316937[_0x1f91('0x35')]=_[_0x1f91('0x36')](db[_0x1f91('0x31')]['rawAttributes']);_0x316937[_0x1f91('0x37')]=_[_0x1f91('0x36')](_0x480bf9['query']);_0x316937['filters']=_[_0x1f91('0x39')](_0x316937[_0x1f91('0x35')],_0x316937['query']);_0x15400c[_0x1f91('0x38')]=_[_0x1f91('0x39')](_0x316937[_0x1f91('0x35')],qs[_0x1f91('0x3a')](_0x480bf9[_0x1f91('0x37')][_0x1f91('0x3a')]));_0x15400c[_0x1f91('0x38')]=_0x15400c[_0x1f91('0x38')][_0x1f91('0x3b')]?_0x15400c['attributes']:_0x316937['model'];if(_0x480bf9[_0x1f91('0x37')]['includeAll']){_0x15400c[_0x1f91('0x49')]=[{'all':!![]}];}_0x15400c=_['merge']({},_0x15400c,_0x480bf9['options']);return db[_0x1f91('0x31')][_0x1f91('0x4e')](_0x15400c)[_0x1f91('0x2b')](handleEntityNotFound(_0x4c8c16,null))[_0x1f91('0x2b')](respondWithResult(_0x4c8c16,null))['catch'](handleError(_0x4c8c16,null));};exports[_0x1f91('0x4f')]=function(_0x291525,_0x4e32bf){return db['VoiceMail']['create'](_0x291525[_0x1f91('0x50')],{})[_0x1f91('0x2b')](function(_0x4566f4){var _0x105cd2=_0x291525[_0x1f91('0x51')][_0x1f91('0x28')]({'plain':!![]});if(!_0x105cd2)throw new Error(_0x1f91('0x52'));if(_0x105cd2[_0x1f91('0x53')]==='user'){var _0x7bee0c=_0x4566f4[_0x1f91('0x28')]({'plain':!![]});var _0x3bd24f=_0x1f91('0x29');return db['UserProfileSection'][_0x1f91('0x4e')]({'where':{'name':_0x3bd24f,'userProfileId':_0x105cd2[_0x1f91('0x54')]},'raw':!![]})[_0x1f91('0x2b')](function(_0x2bac17){if(_0x2bac17&&_0x2bac17['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x7bee0c['name'],'resourceId':_0x7bee0c['id'],'type':_0x2bac17['name'],'sectionId':_0x2bac17['id']},{})[_0x1f91('0x2b')](function(){return _0x4566f4;});}else{return _0x4566f4;}})[_0x1f91('0x4c')](function(_0x17cf0e){logger[_0x1f91('0x2c')](_0x1f91('0x55'),_0x17cf0e);throw _0x17cf0e;});}return _0x4566f4;})['then'](respondWithResult(_0x4e32bf,0xc9))[_0x1f91('0x4c')](handleError(_0x4e32bf,null));};exports[_0x1f91('0x26')]=function(_0xb78521,_0x5f3391){if(_0xb78521['body']['id']){delete _0xb78521['body']['id'];}return db['VoiceMail']['find']({'where':{'id':_0xb78521['params']['id']}})['then'](handleEntityNotFound(_0x5f3391,null))[_0x1f91('0x2b')](saveUpdates(_0xb78521[_0x1f91('0x50')],null))[_0x1f91('0x2b')](respondWithResult(_0x5f3391,null))['catch'](handleError(_0x5f3391,null));};exports[_0x1f91('0x27')]=function(_0x55cdde,_0x8ef81){return db[_0x1f91('0x31')][_0x1f91('0x4e')]({'where':{'id':_0x55cdde[_0x1f91('0x56')]['id']}})[_0x1f91('0x2b')](handleEntityNotFound(_0x8ef81,null))[_0x1f91('0x2b')](removeEntity(_0x8ef81,null))[_0x1f91('0x4c')](handleError(_0x8ef81,null));};exports[_0x1f91('0x57')]=function(_0x2c7654,_0x2d8ef3,_0x5b06dc){return db[_0x1f91('0x31')][_0x1f91('0x58')]({'where':{'id':_0x2c7654[_0x1f91('0x56')]['id']}})[_0x1f91('0x2b')](handleEntityNotFound(_0x2d8ef3,null))[_0x1f91('0x2b')](function(_0x383eec){var _0x2d4260;var _0x325eeb={},_0x55f8d7={};_0x55f8d7[_0x1f91('0x35')]=_[_0x1f91('0x36')](db[_0x1f91('0x59')][_0x1f91('0x32')]);_0x55f8d7[_0x1f91('0x37')]=_[_0x1f91('0x36')](_0x2c7654[_0x1f91('0x37')]);_0x55f8d7['filters']=_['intersection'](_0x55f8d7[_0x1f91('0x35')],_0x55f8d7[_0x1f91('0x37')]);_0x325eeb['attributes']=_[_0x1f91('0x39')](_0x55f8d7[_0x1f91('0x35')],qs[_0x1f91('0x3a')](_0x2c7654[_0x1f91('0x37')][_0x1f91('0x3a')]));_0x325eeb[_0x1f91('0x38')]=_0x325eeb[_0x1f91('0x38')][_0x1f91('0x3b')]?_0x325eeb[_0x1f91('0x38')]:_0x55f8d7[_0x1f91('0x35')];if(!_0x2c7654[_0x1f91('0x37')][_0x1f91('0x3c')](_0x1f91('0x3d'))){_0x325eeb[_0x1f91('0x3e')]=qs[_0x1f91('0x3e')](_0x2c7654['query'][_0x1f91('0x3e')]);_0x325eeb[_0x1f91('0x1f')]=qs[_0x1f91('0x1f')](_0x2c7654[_0x1f91('0x37')]['offset']);}_0x325eeb['order']=qs[_0x1f91('0x40')](_0x2c7654[_0x1f91('0x37')][_0x1f91('0x40')]);_0x325eeb[_0x1f91('0x41')]=qs[_0x1f91('0x43')](_['pick'](_0x2c7654[_0x1f91('0x37')],_0x55f8d7[_0x1f91('0x43')]));if(_0x2c7654[_0x1f91('0x37')]['filter']){_0x325eeb[_0x1f91('0x41')]=_[_0x1f91('0x46')](_0x325eeb[_0x1f91('0x41')],{'$or':_[_0x1f91('0x30')](_0x325eeb[_0x1f91('0x38')],function(_0x163c5f){var _0x460b14={};_0x460b14[_0x163c5f]={'$like':'%'+_0x2c7654[_0x1f91('0x37')][_0x1f91('0x44')]+'%'};return _0x460b14;})});}_0x325eeb[_0x1f91('0x41')]=_[_0x1f91('0x46')](_0x325eeb['where'],{'mailboxuser':_0x383eec['mailbox']});_0x325eeb=_['merge']({},_0x325eeb,_0x2c7654[_0x1f91('0x47')]);return db[_0x1f91('0x59')][_0x1f91('0x5a')](_0x325eeb)[_0x1f91('0x2b')](respondWithFilteredResult(_0x2d8ef3,_0x325eeb));})[_0x1f91('0x4c')](handleError(_0x2d8ef3,null));};
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.model.js b/server/api/voiceMail/voiceMail.model.js
index 27a3a3e..dc6f2b1 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 _0xcae2=['rimraf','../../config/environment','./voiceMail.attributes','exports','define','VoiceMail','voice_voicemail','mailbox_context','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x425d1a,_0x4ff9c5){var _0x413661=function(_0x4ce6f6){while(--_0x4ce6f6){_0x425d1a['push'](_0x425d1a['shift']());}};_0x413661(++_0x4ff9c5);}(_0xcae2,0x143));var _0x2cae=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xcae2[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x2cae('0x0'));var util=require(_0x2cae('0x1'));var logger=require(_0x2cae('0x2'))(_0x2cae('0x3'));var moment=require(_0x2cae('0x4'));var BPromise=require(_0x2cae('0x5'));var rp=require(_0x2cae('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2cae('0x7'));var config=require(_0x2cae('0x8'));var attributes=require(_0x2cae('0x9'));module[_0x2cae('0xa')]=function(_0x57cbf8,_0x3a3e3b){return _0x57cbf8[_0x2cae('0xb')](_0x2cae('0xc'),attributes,{'tableName':_0x2cae('0xd'),'paranoid':![],'indexes':[{'name':_0x2cae('0xe'),'fields':['mailbox','context']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x1179=['lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceMail.attributes','exports','define','voice_voicemail','mailbox_context'];(function(_0xd57d0a,_0x1fafcf){var _0x144321=function(_0x370e88){while(--_0x370e88){_0xd57d0a['push'](_0xd57d0a['shift']());}};_0x144321(++_0x1fafcf);}(_0x1179,0x7e));var _0x9117=function(_0x2f4819,_0x3b4b03){_0x2f4819=_0x2f4819-0x0;var _0x2363e0=_0x1179[_0x2f4819];return _0x2363e0;};'use strict';var _=require(_0x9117('0x0'));var util=require(_0x9117('0x1'));var logger=require(_0x9117('0x2'))('api');var moment=require(_0x9117('0x3'));var BPromise=require(_0x9117('0x4'));var rp=require(_0x9117('0x5'));var fs=require('fs');var path=require(_0x9117('0x6'));var rimraf=require(_0x9117('0x7'));var config=require(_0x9117('0x8'));var attributes=require(_0x9117('0x9'));module[_0x9117('0xa')]=function(_0xa7c429,_0x4d5751){return _0xa7c429[_0x9117('0xb')]('VoiceMail',attributes,{'tableName':_0x9117('0xc'),'paranoid':![],'indexes':[{'name':_0x9117('0xd'),'fields':['mailbox','context']}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceMail/voiceMail.rpc.js b/server/api/voiceMail/voiceMail.rpc.js
index 8a91620..6836f26 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 _0x777a=['VoiceMail,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','info'];(function(_0x3c3249,_0x3b2253){var _0x2bb1d6=function(_0x531dd6){while(--_0x531dd6){_0x3c3249['push'](_0x3c3249['shift']());}};_0x2bb1d6(++_0x3b2253);}(_0x777a,0x1d5));var _0xa777=function(_0x276ada,_0x17940d){_0x276ada=_0x276ada-0x0;var _0x45675d=_0x777a[_0x276ada];return _0x45675d;};'use strict';var _=require(_0xa777('0x0'));var util=require(_0xa777('0x1'));var moment=require(_0xa777('0x2'));var BPromise=require('bluebird');var rs=require(_0xa777('0x3'));var fs=require('fs');var Redis=require(_0xa777('0x4'));var db=require(_0xa777('0x5'))['db'];var utils=require(_0xa777('0x6'));var logger=require(_0xa777('0x7'))(_0xa777('0x8'));var config=require(_0xa777('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xa777('0xa')][_0xa777('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xb8d59a,_0x2140c5,_0xfea5a0){return new BPromise(function(_0x10eede,_0x3049bf){return client['request'](_0xb8d59a,_0xfea5a0)[_0xa777('0xc')](function(_0x402841){logger[_0xa777('0xd')](_0xa777('0xe'),_0x2140c5,_0xa777('0xf'));logger[_0xa777('0x10')]('VoiceMail,\x20%s,\x20%s,\x20%s',_0x2140c5,'request\x20sent',JSON[_0xa777('0x11')](_0x402841));if(_0x402841[_0xa777('0x12')]){if(_0x402841[_0xa777('0x12')][_0xa777('0x13')]===0x1f4){logger[_0xa777('0x12')](_0xa777('0xe'),_0x2140c5,_0x402841[_0xa777('0x12')][_0xa777('0x14')]);return _0x3049bf(_0x402841['error'][_0xa777('0x14')]);}logger[_0xa777('0x12')](_0xa777('0xe'),_0x2140c5,_0x402841[_0xa777('0x12')]['message']);return _0x10eede(_0x402841['error'][_0xa777('0x14')]);}else{logger[_0xa777('0xd')](_0xa777('0xe'),_0x2140c5,'request\x20sent');_0x10eede(_0x402841[_0xa777('0x15')][_0xa777('0x14')]);}})[_0xa777('0x16')](function(_0x22aac5){logger['error'](_0xa777('0xe'),_0x2140c5,_0x22aac5);_0x3049bf(_0x22aac5);});});}
\ No newline at end of file
+var _0xe4b2=['info','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','client','http','then','VoiceMail,\x20%s,\x20%s','request\x20sent','VoiceMail,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x1387ef,_0x419a50){var _0x497e99=function(_0x7b6b5d){while(--_0x7b6b5d){_0x1387ef['push'](_0x1387ef['shift']());}};_0x497e99(++_0x419a50);}(_0xe4b2,0x16b));var _0x2e4b=function(_0x40645b,_0x13225a){_0x40645b=_0x40645b-0x0;var _0x56c8cc=_0xe4b2[_0x40645b];return _0x56c8cc;};'use strict';var _=require(_0x2e4b('0x0'));var util=require(_0x2e4b('0x1'));var moment=require('moment');var BPromise=require(_0x2e4b('0x2'));var rs=require(_0x2e4b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2e4b('0x4'))['db'];var utils=require(_0x2e4b('0x5'));var logger=require(_0x2e4b('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x2e4b('0x7')][_0x2e4b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x20f73c,_0x377cc7,_0xa98dd){return new BPromise(function(_0x48f662,_0x79f3ef){return client['request'](_0x20f73c,_0xa98dd)[_0x2e4b('0x9')](function(_0x20a971){logger['info'](_0x2e4b('0xa'),_0x377cc7,_0x2e4b('0xb'));logger['debug'](_0x2e4b('0xc'),_0x377cc7,_0x2e4b('0xb'),JSON[_0x2e4b('0xd')](_0x20a971));if(_0x20a971[_0x2e4b('0xe')]){if(_0x20a971[_0x2e4b('0xe')][_0x2e4b('0xf')]===0x1f4){logger[_0x2e4b('0xe')](_0x2e4b('0xa'),_0x377cc7,_0x20a971[_0x2e4b('0xe')]['message']);return _0x79f3ef(_0x20a971[_0x2e4b('0xe')][_0x2e4b('0x10')]);}logger[_0x2e4b('0xe')](_0x2e4b('0xa'),_0x377cc7,_0x20a971[_0x2e4b('0xe')][_0x2e4b('0x10')]);return _0x48f662(_0x20a971[_0x2e4b('0xe')]['message']);}else{logger[_0x2e4b('0x11')](_0x2e4b('0xa'),_0x377cc7,'request\x20sent');_0x48f662(_0x20a971['result'][_0x2e4b('0x10')]);}})[_0x2e4b('0x12')](function(_0x56bbbe){logger[_0x2e4b('0xe')](_0x2e4b('0xa'),_0x377cc7,_0x56bbbe);_0x79f3ef(_0x56bbbe);});});}
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/index.js b/server/api/voiceMailMessage/index.js
index ec3b655..bcdef51 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 _0xdc97=['index','/:id','/:id/download','download','post','create','put','update','delete','multer','util','path','express','../../components/auth/service','../../components/interaction/service','./voiceMailMessage.controller','get','isAuthenticated'];(function(_0x339702,_0x465d98){var _0x55cc03=function(_0x570dad){while(--_0x570dad){_0x339702['push'](_0x339702['shift']());}};_0x55cc03(++_0x465d98);}(_0xdc97,0x13b));var _0x7dc9=function(_0x54c0ea,_0x292691){_0x54c0ea=_0x54c0ea-0x0;var _0x3e277f=_0xdc97[_0x54c0ea];return _0x3e277f;};'use strict';var multer=require(_0x7dc9('0x0'));var util=require(_0x7dc9('0x1'));var path=require(_0x7dc9('0x2'));var timeout=require('connect-timeout');var express=require(_0x7dc9('0x3'));var router=express['Router']();var auth=require(_0x7dc9('0x4'));var interaction=require(_0x7dc9('0x5'));var config=require('../../config/environment');var controller=require(_0x7dc9('0x6'));router[_0x7dc9('0x7')]('/',auth[_0x7dc9('0x8')](),controller[_0x7dc9('0x9')]);router['get'](_0x7dc9('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x7dc9('0x7')](_0x7dc9('0xb'),auth[_0x7dc9('0x8')](),controller[_0x7dc9('0xc')]);router[_0x7dc9('0xd')]('/',auth['isAuthenticated'](),controller[_0x7dc9('0xe')]);router[_0x7dc9('0xf')](_0x7dc9('0xa'),auth[_0x7dc9('0x8')](),controller[_0x7dc9('0x10')]);router[_0x7dc9('0x11')](_0x7dc9('0xa'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x1cb9=['../../config/environment','get','isAuthenticated','index','/:id','post','create','put','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/interaction/service'];(function(_0x26a0d4,_0x4e402e){var _0x2302e6=function(_0x4828fb){while(--_0x4828fb){_0x26a0d4['push'](_0x26a0d4['shift']());}};_0x2302e6(++_0x4e402e);}(_0x1cb9,0x14e));var _0x91cb=function(_0x5da492,_0x1f03ed){_0x5da492=_0x5da492-0x0;var _0xba701a=_0x1cb9[_0x5da492];return _0xba701a;};'use strict';var multer=require(_0x91cb('0x0'));var util=require('util');var path=require(_0x91cb('0x1'));var timeout=require(_0x91cb('0x2'));var express=require(_0x91cb('0x3'));var router=express[_0x91cb('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x91cb('0x5'));var config=require(_0x91cb('0x6'));var controller=require('./voiceMailMessage.controller');router[_0x91cb('0x7')]('/',auth[_0x91cb('0x8')](),controller[_0x91cb('0x9')]);router[_0x91cb('0x7')](_0x91cb('0xa'),auth[_0x91cb('0x8')](),controller['show']);router[_0x91cb('0x7')]('/:id/download',auth[_0x91cb('0x8')](),controller['download']);router[_0x91cb('0xb')]('/',auth[_0x91cb('0x8')](),controller[_0x91cb('0xc')]);router[_0x91cb('0xd')](_0x91cb('0xa'),auth[_0x91cb('0x8')](),controller[_0x91cb('0xe')]);router[_0x91cb('0xf')](_0x91cb('0xa'),auth[_0x91cb('0x8')](),controller['destroy']);module[_0x91cb('0x10')]=router;
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.attributes.js b/server/api/voiceMailMessage/voiceMailMessage.attributes.js
index 1155223..1de2049 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 _0x31f4=['STRING','long','TIMESTAMP','sequelize','exports','VIRTUAL','getDataValue','INTEGER'];(function(_0x220777,_0x1980fc){var _0x5b211b=function(_0x2fe4d2){while(--_0x2fe4d2){_0x220777['push'](_0x220777['shift']());}};_0x5b211b(++_0x1980fc);}(_0x31f4,0x133));var _0x431f=function(_0xb3b452,_0x582e8e){_0xb3b452=_0xb3b452-0x0;var _0x238983=_0x31f4[_0xb3b452];return _0x238983;};'use strict';var Sequelize=require(_0x431f('0x0'));module[_0x431f('0x1')]={'name':{'type':Sequelize[_0x431f('0x2')],'get':function(_0x58f323){return this[_0x431f('0x3')]('id');}},'msgnum':{'type':Sequelize[_0x431f('0x4')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'context':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'macrocontext':{'type':Sequelize['STRING'],'defaultValue':''},'callerid':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'origtime':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'duration':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'recording':{'type':Sequelize['BLOB'](_0x431f('0x6')),'defaultValue':null},'flag':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'msg_id':{'type':Sequelize[_0x431f('0x5')],'defaultValue':''},'stamp':{'type':_0x431f('0x7'),'allowNull':![]}};
\ No newline at end of file
+var _0xa6e0=['getDataValue','INTEGER','STRING','long','TIMESTAMP','exports','VIRTUAL'];(function(_0x17266e,_0x5d273d){var _0x8eeaf4=function(_0xda6721){while(--_0xda6721){_0x17266e['push'](_0x17266e['shift']());}};_0x8eeaf4(++_0x5d273d);}(_0xa6e0,0x16a));var _0x0a6e=function(_0x125264,_0xfc8a9){_0x125264=_0x125264-0x0;var _0x16a028=_0xa6e0[_0x125264];return _0x16a028;};'use strict';var Sequelize=require('sequelize');module[_0x0a6e('0x0')]={'name':{'type':Sequelize[_0x0a6e('0x1')],'get':function(_0x3425b0){return this[_0x0a6e('0x2')]('id');}},'msgnum':{'type':Sequelize[_0x0a6e('0x3')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'context':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'callerid':{'type':Sequelize['STRING'],'defaultValue':''},'origtime':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'duration':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'recording':{'type':Sequelize['BLOB'](_0x0a6e('0x5')),'defaultValue':null},'flag':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'msg_id':{'type':Sequelize[_0x0a6e('0x4')],'defaultValue':''},'stamp':{'type':_0x0a6e('0x6'),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.controller.js b/server/api/voiceMailMessage/voiceMailMessage.controller.js
index 5a2222d..d0cdfe3 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 _0x17ba=['moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','count','set','apply','reject','save','update','destroy','then','error','stack','name','map','VoiceMailMessage','rawAttributes','fieldName','type','key','model','differenceBy','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','offset','order','sort','where','pick','filter','merge','options','includeAll','findAll','rows','show','include','find','catch','create','body','params','recording','msg_id','Sequelize','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0x17ba,0xab));var _0xa17b=function(_0x54db2c,_0x1e4376){_0x54db2c=_0x54db2c-0x0;var _0x1b9ae5=_0x17ba[_0x54db2c];return _0x1b9ae5;};'use strict';var pdf=require(_0xa17b('0x0'));var emlformat=require(_0xa17b('0x1'));var rimraf=require('rimraf');var zipdir=require(_0xa17b('0x2'));var jsonpatch=require(_0xa17b('0x3'));var rp=require(_0xa17b('0x4'));var moment=require(_0xa17b('0x5'));var BPromise=require(_0xa17b('0x6'));var Mustache=require(_0xa17b('0x7'));var util=require(_0xa17b('0x8'));var path=require(_0xa17b('0x9'));var sox=require(_0xa17b('0xa'));var csv=require(_0xa17b('0xb'));var ejs=require(_0xa17b('0xc'));var fs=require('fs');var _=require(_0xa17b('0xd'));var squel=require(_0xa17b('0xe'));var crypto=require(_0xa17b('0xf'));var jsforce=require(_0xa17b('0x10'));var deskjs=require(_0xa17b('0x11'));var toCsv=require(_0xa17b('0xb'));var querystring=require(_0xa17b('0x12'));var Papa=require(_0xa17b('0x13'));var Redis=require('ioredis');var authService=require(_0xa17b('0x14'));var qs=require(_0xa17b('0x15'));var as=require(_0xa17b('0x16'));var hardwareService=require(_0xa17b('0x17'));var logger=require(_0xa17b('0x18'))(_0xa17b('0x19'));var utils=require(_0xa17b('0x1a'));var config=require('../../config/environment');var db=require(_0xa17b('0x1b'))['db'];function respondWithStatusCode(_0x3e92e4,_0x3c3a8a){_0x3c3a8a=_0x3c3a8a||0xcc;return function(_0x52b7aa){if(_0x52b7aa){return _0x3e92e4[_0xa17b('0x1c')](_0x3c3a8a);}return _0x3e92e4[_0xa17b('0x1d')](_0x3c3a8a)[_0xa17b('0x1e')]();};}function respondWithResult(_0xeeacaa,_0x4a222e){_0x4a222e=_0x4a222e||0xc8;return function(_0x117ad9){if(_0x117ad9){return _0xeeacaa['status'](_0x4a222e)[_0xa17b('0x1f')](_0x117ad9);}};}function respondWithFilteredResult(_0x219385,_0x5de138){return function(_0x112764){if(_0x112764){var _0x3c63e3=_0x112764[_0xa17b('0x20')],_0x1c0578=_0x5de138['offset'],_0x1f8141=_0x5de138['offset']+_0x5de138['limit'],_0x4870fb;if(_0x1f8141>=_0x3c63e3){_0x1f8141=_0x3c63e3;_0x4870fb=0xc8;}else{_0x4870fb=0xce;}_0x219385[_0xa17b('0x1d')](_0x4870fb);return _0x219385[_0xa17b('0x21')]('Content-Range',_0x1c0578+'-'+_0x1f8141+'/'+_0x3c63e3)[_0xa17b('0x1f')](_0x112764);}return null;};}function patchUpdates(_0x166d44){return function(_0x18621f){try{jsonpatch[_0xa17b('0x22')](_0x18621f,_0x166d44,!![]);}catch(_0x2a340d){return BPromise[_0xa17b('0x23')](_0x2a340d);}return _0x18621f[_0xa17b('0x24')]();};}function saveUpdates(_0x584a0a,_0x610c2b){return function(_0x3f409a){if(_0x3f409a){return _0x3f409a[_0xa17b('0x25')](_0x584a0a)['then'](function(_0x44f7bc){return _0x44f7bc;});}return null;};}function removeEntity(_0x1a6471,_0x24d305){return function(_0xbbbb62){if(_0xbbbb62){return _0xbbbb62[_0xa17b('0x26')]()[_0xa17b('0x27')](function(){_0x1a6471['status'](0xcc)[_0xa17b('0x1e')]();});}};}function handleEntityNotFound(_0x4d4a65,_0xa34739){return function(_0x13630d){if(!_0x13630d){_0x4d4a65['sendStatus'](0x194);}return _0x13630d;};}function handleError(_0x491764,_0x2a298c){_0x2a298c=_0x2a298c||0x1f4;return function(_0x29bf68){logger[_0xa17b('0x28')](_0x29bf68[_0xa17b('0x29')]);if(_0x29bf68[_0xa17b('0x2a')]){delete _0x29bf68[_0xa17b('0x2a')];}_0x491764['status'](_0x2a298c)['send'](_0x29bf68);};}exports['index']=function(_0x4aad82,_0x2b1708){var _0x5ef356={},_0x295e67={},_0x4ff3f8={'count':0x0,'rows':[]};var _0x14671b=_[_0xa17b('0x2b')](db[_0xa17b('0x2c')][_0xa17b('0x2d')],function(_0x346cc2){return{'name':_0x346cc2[_0xa17b('0x2e')],'type':_0x346cc2[_0xa17b('0x2f')][_0xa17b('0x30')]};});_0x295e67[_0xa17b('0x31')]=_[_0xa17b('0x32')](_[_0xa17b('0x2b')](_0x14671b,'name'),['name']);_0x295e67['query']=_[_0xa17b('0x33')](_0x4aad82[_0xa17b('0x34')]);_0x295e67[_0xa17b('0x35')]=_[_0xa17b('0x36')](_0x295e67[_0xa17b('0x31')],_0x295e67[_0xa17b('0x34')]);_0x5ef356[_0xa17b('0x37')]=_[_0xa17b('0x36')](_0x295e67['model'],qs[_0xa17b('0x38')](_0x4aad82['query'][_0xa17b('0x38')]));_0x5ef356[_0xa17b('0x37')]=_0x5ef356[_0xa17b('0x37')][_0xa17b('0x39')]?_0x5ef356[_0xa17b('0x37')]:_0x295e67[_0xa17b('0x31')];if(!_0x4aad82['query'][_0xa17b('0x3a')](_0xa17b('0x3b'))){_0x5ef356[_0xa17b('0x3c')]=qs[_0xa17b('0x3c')](_0x4aad82[_0xa17b('0x34')]['limit']);_0x5ef356[_0xa17b('0x3d')]=qs['offset'](_0x4aad82[_0xa17b('0x34')]['offset']);}_0x5ef356[_0xa17b('0x3e')]=qs[_0xa17b('0x3f')](_0x4aad82['query'][_0xa17b('0x3f')]);_0x5ef356[_0xa17b('0x40')]=qs['filters'](_[_0xa17b('0x41')](_0x4aad82[_0xa17b('0x34')],_0x295e67[_0xa17b('0x35')]));if(_0x4aad82[_0xa17b('0x34')][_0xa17b('0x42')]){_0x5ef356['where']=_[_0xa17b('0x43')](_0x5ef356['where'],{'$or':_[_0xa17b('0x2b')](_0x14671b,function(_0x47b994){if(_0x47b994[_0xa17b('0x2f')]!=='VIRTUAL'){var _0x1e457e={};_0x1e457e[_0x47b994['name']]={'$like':'%'+_0x4aad82[_0xa17b('0x34')]['filter']+'%'};return _0x1e457e;}})});}_0x5ef356=_[_0xa17b('0x43')]({},_0x5ef356,_0x4aad82[_0xa17b('0x44')]);var _0x5bfb5={'where':_0x5ef356[_0xa17b('0x40')]};return db[_0xa17b('0x2c')][_0xa17b('0x20')](_0x5bfb5)[_0xa17b('0x27')](function(_0xe57f94){_0x4ff3f8['count']=_0xe57f94;if(_0x4aad82[_0xa17b('0x34')][_0xa17b('0x45')]){_0x5ef356['include']=[{'all':!![]}];}return db[_0xa17b('0x2c')][_0xa17b('0x46')](_0x5ef356);})[_0xa17b('0x27')](function(_0x318b3e){_0x4ff3f8[_0xa17b('0x47')]=_0x318b3e;return _0x4ff3f8;})[_0xa17b('0x27')](respondWithFilteredResult(_0x2b1708,_0x5ef356))['catch'](handleError(_0x2b1708,null));};exports[_0xa17b('0x48')]=function(_0x1521fe,_0x16bac7){var _0x5ec459={'raw':!![],'where':{'id':_0x1521fe['params']['id']}},_0x54b65c={};_0x54b65c[_0xa17b('0x31')]=_[_0xa17b('0x33')](db[_0xa17b('0x2c')][_0xa17b('0x2d')]);_0x54b65c[_0xa17b('0x34')]=_[_0xa17b('0x33')](_0x1521fe[_0xa17b('0x34')]);_0x54b65c[_0xa17b('0x35')]=_[_0xa17b('0x36')](_0x54b65c[_0xa17b('0x31')],_0x54b65c[_0xa17b('0x34')]);_0x5ec459[_0xa17b('0x37')]=_['intersection'](_0x54b65c[_0xa17b('0x31')],qs[_0xa17b('0x38')](_0x1521fe[_0xa17b('0x34')][_0xa17b('0x38')]));_0x5ec459[_0xa17b('0x37')]=_0x5ec459[_0xa17b('0x37')]['length']?_0x5ec459[_0xa17b('0x37')]:_0x54b65c[_0xa17b('0x31')];if(_0x1521fe[_0xa17b('0x34')][_0xa17b('0x45')]){_0x5ec459[_0xa17b('0x49')]=[{'all':!![]}];}_0x5ec459=_['merge']({},_0x5ec459,_0x1521fe[_0xa17b('0x44')]);return db[_0xa17b('0x2c')][_0xa17b('0x4a')](_0x5ec459)[_0xa17b('0x27')](handleEntityNotFound(_0x16bac7,null))['then'](respondWithResult(_0x16bac7,null))[_0xa17b('0x4b')](handleError(_0x16bac7,null));};exports[_0xa17b('0x4c')]=function(_0x421470,_0x2906fd){return db[_0xa17b('0x2c')][_0xa17b('0x4c')](_0x421470[_0xa17b('0x4d')],{})['then'](respondWithResult(_0x2906fd,0xc9))[_0xa17b('0x4b')](handleError(_0x2906fd,null));};exports[_0xa17b('0x25')]=function(_0x4ffe5a,_0xb4b4d){if(_0x4ffe5a[_0xa17b('0x4d')]['id']){delete _0x4ffe5a[_0xa17b('0x4d')]['id'];}return db['VoiceMailMessage'][_0xa17b('0x4a')]({'where':{'id':_0x4ffe5a[_0xa17b('0x4e')]['id']}})['then'](handleEntityNotFound(_0xb4b4d,null))[_0xa17b('0x27')](saveUpdates(_0x4ffe5a[_0xa17b('0x4d')],null))['then'](respondWithResult(_0xb4b4d,null))[_0xa17b('0x4b')](handleError(_0xb4b4d,null));};exports[_0xa17b('0x26')]=function(_0x5cdea9,_0x3eddb7){return db[_0xa17b('0x2c')][_0xa17b('0x4a')]({'where':{'id':_0x5cdea9[_0xa17b('0x4e')]['id']}})[_0xa17b('0x27')](handleEntityNotFound(_0x3eddb7,null))[_0xa17b('0x27')](removeEntity(_0x3eddb7,null))[_0xa17b('0x4b')](handleError(_0x3eddb7,null));};exports['download']=function(_0x420fdc,_0x3ff07a,_0x620a4a){return db[_0xa17b('0x2c')][_0xa17b('0x4a')]({'where':{'id':_0x420fdc[_0xa17b('0x4e')]['id']},'attributes':['id',_0xa17b('0x4f'),_0xa17b('0x50')]})[_0xa17b('0x27')](handleEntityNotFound(_0x3ff07a,null))[_0xa17b('0x27')](function(_0x1e4b67){if(_0x1e4b67){if(!_0x1e4b67[_0xa17b('0x4f')]){throw new db[(_0xa17b('0x51'))]['ValidationError'](_0xa17b('0x52'));}var _0x25fa9b={'Content-Type':_0xa17b('0x53'),'Content-Disposition':_0xa17b('0x54')};if(_0x1e4b67[_0xa17b('0x50')]){_0x25fa9b[_0xa17b('0x55')]=_0xa17b('0x56')+_0x1e4b67[_0xa17b('0x50')]+_0xa17b('0x57');}_0x3ff07a['set'](_0x25fa9b);return _0x3ff07a['send'](new Buffer(_0x1e4b67[_0xa17b('0x4f')]));}})[_0xa17b('0x4b')](handleError(_0x3ff07a,null));};
\ No newline at end of file
+var _0x5ad3=['desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','end','status','json','offset','limit','set','Content-Range','reject','save','then','destroy','sendStatus','error','stack','name','send','index','map','VoiceMailMessage','rawAttributes','fieldName','model','query','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','type','options','count','includeAll','findAll','rows','catch','show','params','keys','intersection','fields','include','find','create','update','body','download','recording','msg_id','Sequelize','VoiceMailMessage\x20not\x20found','audio/wav','attachment','attachment;\x20filename=\x22','.wav\x22','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce'];(function(_0x334fe9,_0x397830){var _0x235d04=function(_0x4dffe4){while(--_0x4dffe4){_0x334fe9['push'](_0x334fe9['shift']());}};_0x235d04(++_0x397830);}(_0x5ad3,0x1e2));var _0x35ad=function(_0x46759d,_0x13e994){_0x46759d=_0x46759d-0x0;var _0x3e7fe0=_0x5ad3[_0x46759d];return _0x3e7fe0;};'use strict';var pdf=require(_0x35ad('0x0'));var emlformat=require(_0x35ad('0x1'));var rimraf=require(_0x35ad('0x2'));var zipdir=require(_0x35ad('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x35ad('0x4'));var moment=require(_0x35ad('0x5'));var BPromise=require(_0x35ad('0x6'));var Mustache=require(_0x35ad('0x7'));var util=require(_0x35ad('0x8'));var path=require(_0x35ad('0x9'));var sox=require(_0x35ad('0xa'));var csv=require(_0x35ad('0xb'));var ejs=require(_0x35ad('0xc'));var fs=require('fs');var _=require(_0x35ad('0xd'));var squel=require('squel');var crypto=require(_0x35ad('0xe'));var jsforce=require(_0x35ad('0xf'));var deskjs=require(_0x35ad('0x10'));var toCsv=require('to-csv');var querystring=require(_0x35ad('0x11'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x35ad('0x12'));var qs=require(_0x35ad('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x35ad('0x14'));var logger=require(_0x35ad('0x15'))('api');var utils=require('../../config/utils');var config=require(_0x35ad('0x16'));var db=require(_0x35ad('0x17'))['db'];function respondWithStatusCode(_0x4cf6bd,_0x3c4dd5){_0x3c4dd5=_0x3c4dd5||0xcc;return function(_0x33e2ec){if(_0x33e2ec){return _0x4cf6bd['sendStatus'](_0x3c4dd5);}return _0x4cf6bd['status'](_0x3c4dd5)[_0x35ad('0x18')]();};}function respondWithResult(_0x2e81c8,_0x3cda5e){_0x3cda5e=_0x3cda5e||0xc8;return function(_0x4b7ad9){if(_0x4b7ad9){return _0x2e81c8[_0x35ad('0x19')](_0x3cda5e)[_0x35ad('0x1a')](_0x4b7ad9);}};}function respondWithFilteredResult(_0x591917,_0x1494be){return function(_0x4d5185){if(_0x4d5185){var _0x4e3cd8=_0x4d5185['count'],_0x3a981a=_0x1494be[_0x35ad('0x1b')],_0x3ff2f0=_0x1494be[_0x35ad('0x1b')]+_0x1494be[_0x35ad('0x1c')],_0x27efeb;if(_0x3ff2f0>=_0x4e3cd8){_0x3ff2f0=_0x4e3cd8;_0x27efeb=0xc8;}else{_0x27efeb=0xce;}_0x591917[_0x35ad('0x19')](_0x27efeb);return _0x591917[_0x35ad('0x1d')](_0x35ad('0x1e'),_0x3a981a+'-'+_0x3ff2f0+'/'+_0x4e3cd8)['json'](_0x4d5185);}return null;};}function patchUpdates(_0xd32a43){return function(_0x2876ad){try{jsonpatch['apply'](_0x2876ad,_0xd32a43,!![]);}catch(_0x53b8e3){return BPromise[_0x35ad('0x1f')](_0x53b8e3);}return _0x2876ad[_0x35ad('0x20')]();};}function saveUpdates(_0x578b1b,_0x21f611){return function(_0x32735e){if(_0x32735e){return _0x32735e['update'](_0x578b1b)[_0x35ad('0x21')](function(_0x40e5e8){return _0x40e5e8;});}return null;};}function removeEntity(_0x504cbc,_0x30542c){return function(_0x1be6d2){if(_0x1be6d2){return _0x1be6d2[_0x35ad('0x22')]()[_0x35ad('0x21')](function(){_0x504cbc[_0x35ad('0x19')](0xcc)[_0x35ad('0x18')]();});}};}function handleEntityNotFound(_0xebc6c5,_0x4c5740){return function(_0x1cb9da){if(!_0x1cb9da){_0xebc6c5[_0x35ad('0x23')](0x194);}return _0x1cb9da;};}function handleError(_0x47e818,_0x43059e){_0x43059e=_0x43059e||0x1f4;return function(_0x6288a2){logger[_0x35ad('0x24')](_0x6288a2[_0x35ad('0x25')]);if(_0x6288a2[_0x35ad('0x26')]){delete _0x6288a2['name'];}_0x47e818[_0x35ad('0x19')](_0x43059e)[_0x35ad('0x27')](_0x6288a2);};}exports[_0x35ad('0x28')]=function(_0x1ca61d,_0x2ddb59){var _0x20a682={},_0x2e601a={},_0xaf7237={'count':0x0,'rows':[]};var _0x5418c2=_[_0x35ad('0x29')](db[_0x35ad('0x2a')][_0x35ad('0x2b')],function(_0x34b8b9){return{'name':_0x34b8b9[_0x35ad('0x2c')],'type':_0x34b8b9['type']['key']};});_0x2e601a[_0x35ad('0x2d')]=_['differenceBy'](_[_0x35ad('0x29')](_0x5418c2,'name'),['name']);_0x2e601a['query']=_['keys'](_0x1ca61d[_0x35ad('0x2e')]);_0x2e601a['filters']=_['intersection'](_0x2e601a[_0x35ad('0x2d')],_0x2e601a['query']);_0x20a682[_0x35ad('0x2f')]=_['intersection'](_0x2e601a[_0x35ad('0x2d')],qs['fields'](_0x1ca61d[_0x35ad('0x2e')]['fields']));_0x20a682[_0x35ad('0x2f')]=_0x20a682[_0x35ad('0x2f')][_0x35ad('0x30')]?_0x20a682['attributes']:_0x2e601a[_0x35ad('0x2d')];if(!_0x1ca61d[_0x35ad('0x2e')][_0x35ad('0x31')](_0x35ad('0x32'))){_0x20a682[_0x35ad('0x1c')]=qs['limit'](_0x1ca61d['query'][_0x35ad('0x1c')]);_0x20a682[_0x35ad('0x1b')]=qs[_0x35ad('0x1b')](_0x1ca61d[_0x35ad('0x2e')]['offset']);}_0x20a682[_0x35ad('0x33')]=qs[_0x35ad('0x34')](_0x1ca61d[_0x35ad('0x2e')][_0x35ad('0x34')]);_0x20a682[_0x35ad('0x35')]=qs[_0x35ad('0x36')](_['pick'](_0x1ca61d['query'],_0x2e601a[_0x35ad('0x36')]));if(_0x1ca61d[_0x35ad('0x2e')][_0x35ad('0x37')]){_0x20a682[_0x35ad('0x35')]=_[_0x35ad('0x38')](_0x20a682[_0x35ad('0x35')],{'$or':_[_0x35ad('0x29')](_0x5418c2,function(_0x2288f3){if(_0x2288f3[_0x35ad('0x39')]!=='VIRTUAL'){var _0x459d2f={};_0x459d2f[_0x2288f3['name']]={'$like':'%'+_0x1ca61d[_0x35ad('0x2e')][_0x35ad('0x37')]+'%'};return _0x459d2f;}})});}_0x20a682=_[_0x35ad('0x38')]({},_0x20a682,_0x1ca61d[_0x35ad('0x3a')]);var _0x1ad7e6={'where':_0x20a682[_0x35ad('0x35')]};return db[_0x35ad('0x2a')][_0x35ad('0x3b')](_0x1ad7e6)[_0x35ad('0x21')](function(_0x5dd327){_0xaf7237[_0x35ad('0x3b')]=_0x5dd327;if(_0x1ca61d[_0x35ad('0x2e')][_0x35ad('0x3c')]){_0x20a682['include']=[{'all':!![]}];}return db[_0x35ad('0x2a')][_0x35ad('0x3d')](_0x20a682);})[_0x35ad('0x21')](function(_0x5e137e){_0xaf7237[_0x35ad('0x3e')]=_0x5e137e;return _0xaf7237;})[_0x35ad('0x21')](respondWithFilteredResult(_0x2ddb59,_0x20a682))[_0x35ad('0x3f')](handleError(_0x2ddb59,null));};exports[_0x35ad('0x40')]=function(_0x11de09,_0x429470){var _0x21d730={'raw':!![],'where':{'id':_0x11de09[_0x35ad('0x41')]['id']}},_0x557bf4={};_0x557bf4['model']=_[_0x35ad('0x42')](db[_0x35ad('0x2a')][_0x35ad('0x2b')]);_0x557bf4[_0x35ad('0x2e')]=_[_0x35ad('0x42')](_0x11de09[_0x35ad('0x2e')]);_0x557bf4[_0x35ad('0x36')]=_[_0x35ad('0x43')](_0x557bf4[_0x35ad('0x2d')],_0x557bf4['query']);_0x21d730[_0x35ad('0x2f')]=_[_0x35ad('0x43')](_0x557bf4[_0x35ad('0x2d')],qs[_0x35ad('0x44')](_0x11de09[_0x35ad('0x2e')]['fields']));_0x21d730[_0x35ad('0x2f')]=_0x21d730[_0x35ad('0x2f')]['length']?_0x21d730['attributes']:_0x557bf4[_0x35ad('0x2d')];if(_0x11de09[_0x35ad('0x2e')][_0x35ad('0x3c')]){_0x21d730[_0x35ad('0x45')]=[{'all':!![]}];}_0x21d730=_['merge']({},_0x21d730,_0x11de09[_0x35ad('0x3a')]);return db[_0x35ad('0x2a')][_0x35ad('0x46')](_0x21d730)[_0x35ad('0x21')](handleEntityNotFound(_0x429470,null))[_0x35ad('0x21')](respondWithResult(_0x429470,null))[_0x35ad('0x3f')](handleError(_0x429470,null));};exports[_0x35ad('0x47')]=function(_0x599414,_0x3972fe){return db[_0x35ad('0x2a')][_0x35ad('0x47')](_0x599414['body'],{})['then'](respondWithResult(_0x3972fe,0xc9))['catch'](handleError(_0x3972fe,null));};exports[_0x35ad('0x48')]=function(_0x43899a,_0x34d531){if(_0x43899a[_0x35ad('0x49')]['id']){delete _0x43899a['body']['id'];}return db[_0x35ad('0x2a')][_0x35ad('0x46')]({'where':{'id':_0x43899a[_0x35ad('0x41')]['id']}})[_0x35ad('0x21')](handleEntityNotFound(_0x34d531,null))[_0x35ad('0x21')](saveUpdates(_0x43899a[_0x35ad('0x49')],null))['then'](respondWithResult(_0x34d531,null))['catch'](handleError(_0x34d531,null));};exports[_0x35ad('0x22')]=function(_0x3e5d31,_0x5acc34){return db['VoiceMailMessage'][_0x35ad('0x46')]({'where':{'id':_0x3e5d31[_0x35ad('0x41')]['id']}})[_0x35ad('0x21')](handleEntityNotFound(_0x5acc34,null))['then'](removeEntity(_0x5acc34,null))['catch'](handleError(_0x5acc34,null));};exports[_0x35ad('0x4a')]=function(_0x19bc07,_0x18e4f9,_0x5a8155){return db[_0x35ad('0x2a')][_0x35ad('0x46')]({'where':{'id':_0x19bc07[_0x35ad('0x41')]['id']},'attributes':['id',_0x35ad('0x4b'),_0x35ad('0x4c')]})[_0x35ad('0x21')](handleEntityNotFound(_0x18e4f9,null))['then'](function(_0x119b99){if(_0x119b99){if(!_0x119b99[_0x35ad('0x4b')]){throw new db[(_0x35ad('0x4d'))]['ValidationError'](_0x35ad('0x4e'));}var _0x2e0f1f={'Content-Type':_0x35ad('0x4f'),'Content-Disposition':_0x35ad('0x50')};if(_0x119b99['msg_id']){_0x2e0f1f['Content-Disposition']=_0x35ad('0x51')+_0x119b99[_0x35ad('0x4c')]+_0x35ad('0x52');}_0x18e4f9[_0x35ad('0x1d')](_0x2e0f1f);return _0x18e4f9[_0x35ad('0x27')](new Buffer(_0x119b99['recording']));}})[_0x35ad('0x3f')](handleError(_0x18e4f9,null));};
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.model.js b/server/api/voiceMailMessage/voiceMailMessage.model.js
index 2903de4..0a3c0ab 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 _0xf41f=['path','rimraf','./voiceMailMessage.attributes','exports','VoiceMailMessage','dir','lodash','util','../../config/logger','api','bluebird','request-promise'];(function(_0x5d1044,_0x18f656){var _0x3cd90e=function(_0x3c40be){while(--_0x3c40be){_0x5d1044['push'](_0x5d1044['shift']());}};_0x3cd90e(++_0x18f656);}(_0xf41f,0x1da));var _0xff41=function(_0x6ce35a,_0x55d183){_0x6ce35a=_0x6ce35a-0x0;var _0x5b6d8e=_0xf41f[_0x6ce35a];return _0x5b6d8e;};'use strict';var _=require(_0xff41('0x0'));var util=require(_0xff41('0x1'));var logger=require(_0xff41('0x2'))(_0xff41('0x3'));var moment=require('moment');var BPromise=require(_0xff41('0x4'));var rp=require(_0xff41('0x5'));var fs=require('fs');var path=require(_0xff41('0x6'));var rimraf=require(_0xff41('0x7'));var config=require('../../config/environment');var attributes=require(_0xff41('0x8'));module[_0xff41('0x9')]=function(_0x4b8f04,_0x23ee29){return _0x4b8f04['define'](_0xff41('0xa'),attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0xff41('0xb'),'fields':['dir']}],'timestamps':![]});};
\ No newline at end of file
+var _0xd620=['dir','lodash','api','moment','bluebird','path','rimraf','../../config/environment','./voiceMailMessage.attributes','define','VoiceMailMessage'];(function(_0x53e3fa,_0x50c5f2){var _0xe8584a=function(_0x1771a5){while(--_0x1771a5){_0x53e3fa['push'](_0x53e3fa['shift']());}};_0xe8584a(++_0x50c5f2);}(_0xd620,0x1c4));var _0x0d62=function(_0xfa5058,_0x33cf1e){_0xfa5058=_0xfa5058-0x0;var _0x4e28b1=_0xd620[_0xfa5058];return _0x4e28b1;};'use strict';var _=require(_0x0d62('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x0d62('0x1'));var moment=require(_0x0d62('0x2'));var BPromise=require(_0x0d62('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0d62('0x4'));var rimraf=require(_0x0d62('0x5'));var config=require(_0x0d62('0x6'));var attributes=require(_0x0d62('0x7'));module['exports']=function(_0x573c58,_0x5876a3){return _0x573c58[_0x0d62('0x8')](_0x0d62('0x9'),attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0x0d62('0xa'),'fields':['dir']}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/voiceMailMessage/voiceMailMessage.rpc.js b/server/api/voiceMailMessage/voiceMailMessage.rpc.js
index b10942c..59e66ec 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 _0x7a54=['info','VoiceMailMessage,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x7a54,0x106));var _0x47a5=function(_0x996658,_0x2466e2){_0x996658=_0x996658-0x0;var _0x35013f=_0x7a54[_0x996658];return _0x35013f;};'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')]('VoiceMailMessage,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}
\ No newline at end of file
+var _0x57ca=['client','http','request','info','request\x20sent','VoiceMailMessage,\x20%s,\x20%s,\x20%s','error','code','VoiceMailMessage,\x20%s,\x20%s','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x5c7111,_0x52d230){var _0x9e50f3=function(_0x3ccbe5){while(--_0x3ccbe5){_0x5c7111['push'](_0x5c7111['shift']());}};_0x9e50f3(++_0x52d230);}(_0x57ca,0x108));var _0xa57c=function(_0x15f968,_0xc17341){_0x15f968=_0x15f968-0x0;var _0x290861=_0x57ca[_0x15f968];return _0x290861;};'use strict';var _=require('lodash');var util=require(_0xa57c('0x0'));var moment=require(_0xa57c('0x1'));var BPromise=require('bluebird');var rs=require(_0xa57c('0x2'));var fs=require('fs');var Redis=require(_0xa57c('0x3'));var db=require(_0xa57c('0x4'))['db'];var utils=require(_0xa57c('0x5'));var logger=require(_0xa57c('0x6'))('rpc');var config=require(_0xa57c('0x7'));var jayson=require(_0xa57c('0x8'));var client=jayson[_0xa57c('0x9')][_0xa57c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xbdfffb,_0x314574,_0x19e28e){return new BPromise(function(_0x271ccc,_0x5e3962){return client[_0xa57c('0xb')](_0xbdfffb,_0x19e28e)['then'](function(_0x46ba92){logger[_0xa57c('0xc')]('VoiceMailMessage,\x20%s,\x20%s',_0x314574,_0xa57c('0xd'));logger['debug'](_0xa57c('0xe'),_0x314574,_0xa57c('0xd'),JSON['stringify'](_0x46ba92));if(_0x46ba92[_0xa57c('0xf')]){if(_0x46ba92['error'][_0xa57c('0x10')]===0x1f4){logger[_0xa57c('0xf')](_0xa57c('0x11'),_0x314574,_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);return _0x5e3962(_0x46ba92['error'][_0xa57c('0x12')]);}logger['error'](_0xa57c('0x11'),_0x314574,_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);return _0x271ccc(_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);}else{logger[_0xa57c('0xc')](_0xa57c('0x11'),_0x314574,'request\x20sent');_0x271ccc(_0x46ba92[_0xa57c('0x13')][_0xa57c('0x12')]);}})[_0xa57c('0x14')](function(_0x5a6024){logger[_0xa57c('0xf')]('VoiceMailMessage,\x20%s,\x20%s',_0x314574,_0x5a6024);_0x5e3962(_0x5a6024);});});}
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/index.js b/server/api/voiceMusicOnHold/index.js
index 87508d5..d69ab1c 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 _0x7b88=['getSounds','post','create','put','update','delete','destroy','/:id/sounds/:id2','removeSound','exports','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceMusicOnHold.controller','get','index','/:id','isAuthenticated','show','/:id/sounds'];(function(_0x22705,_0x281a74){var _0x33faab=function(_0x168fbc){while(--_0x168fbc){_0x22705['push'](_0x22705['shift']());}};_0x33faab(++_0x281a74);}(_0x7b88,0x1ea));var _0x87b8=function(_0x565ed7,_0x398228){_0x565ed7=_0x565ed7-0x0;var _0x183ad7=_0x7b88[_0x565ed7];return _0x183ad7;};'use strict';var multer=require('multer');var util=require(_0x87b8('0x0'));var path=require(_0x87b8('0x1'));var timeout=require('connect-timeout');var express=require(_0x87b8('0x2'));var router=express[_0x87b8('0x3')]();var auth=require(_0x87b8('0x4'));var interaction=require(_0x87b8('0x5'));var config=require(_0x87b8('0x6'));var controller=require(_0x87b8('0x7'));router[_0x87b8('0x8')]('/',auth['isAuthenticated'](),controller[_0x87b8('0x9')]);router[_0x87b8('0x8')](_0x87b8('0xa'),auth[_0x87b8('0xb')](),controller[_0x87b8('0xc')]);router[_0x87b8('0x8')](_0x87b8('0xd'),auth[_0x87b8('0xb')](),controller[_0x87b8('0xe')]);router[_0x87b8('0xf')]('/',auth[_0x87b8('0xb')](),controller[_0x87b8('0x10')]);router[_0x87b8('0xf')](_0x87b8('0xd'),auth[_0x87b8('0xb')](),controller['addSound']);router[_0x87b8('0x11')](_0x87b8('0xa'),auth['isAuthenticated'](),controller[_0x87b8('0x12')]);router[_0x87b8('0x13')](_0x87b8('0xa'),auth[_0x87b8('0xb')](),controller[_0x87b8('0x14')]);router[_0x87b8('0x13')](_0x87b8('0x15'),auth[_0x87b8('0xb')](),controller[_0x87b8('0x16')]);module[_0x87b8('0x17')]=router;
\ No newline at end of file
+var _0x4cb6=['../../config/environment','./voiceMusicOnHold.controller','get','isAuthenticated','index','/:id','show','/:id/sounds','getSounds','post','addSound','put','update','delete','destroy','removeSound','exports','multer','path','connect-timeout','Router','../../components/auth/service'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4cb6,0x1df));var _0x64cb=function(_0xb489d4,_0x4a6d21){_0xb489d4=_0xb489d4-0x0;var _0x4b9034=_0x4cb6[_0xb489d4];return _0x4b9034;};'use strict';var multer=require(_0x64cb('0x0'));var util=require('util');var path=require(_0x64cb('0x1'));var timeout=require(_0x64cb('0x2'));var express=require('express');var router=express[_0x64cb('0x3')]();var auth=require(_0x64cb('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x64cb('0x5'));var controller=require(_0x64cb('0x6'));router[_0x64cb('0x7')]('/',auth[_0x64cb('0x8')](),controller[_0x64cb('0x9')]);router[_0x64cb('0x7')](_0x64cb('0xa'),auth[_0x64cb('0x8')](),controller[_0x64cb('0xb')]);router[_0x64cb('0x7')](_0x64cb('0xc'),auth['isAuthenticated'](),controller[_0x64cb('0xd')]);router['post']('/',auth[_0x64cb('0x8')](),controller['create']);router[_0x64cb('0xe')](_0x64cb('0xc'),auth[_0x64cb('0x8')](),controller[_0x64cb('0xf')]);router[_0x64cb('0x10')](_0x64cb('0xa'),auth[_0x64cb('0x8')](),controller[_0x64cb('0x11')]);router[_0x64cb('0x12')](_0x64cb('0xa'),auth[_0x64cb('0x8')](),controller[_0x64cb('0x13')]);router[_0x64cb('0x12')]('/:id/sounds/:id2',auth[_0x64cb('0x8')](),controller[_0x64cb('0x14')]);module[_0x64cb('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js
index 221be22..ed7351c 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 _0xe517=['mp3nb','mp3','alpha','TIMESTAMP','BOOLEAN','STRING','name','ENUM','files'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xe517,0xf8));var _0x7e51=function(_0x40dfa6,_0x34621e){_0x40dfa6=_0x40dfa6-0x0;var _0x2cf100=_0xe517[_0x40dfa6];return _0x2cf100;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x7e51('0x0')],'allowNull':![],'unique':_0x7e51('0x1')},'mode':{'type':Sequelize[_0x7e51('0x2')]('custom',_0x7e51('0x3'),_0x7e51('0x4'),'quietmp3nb','quietmp3',_0x7e51('0x5')),'allowNull':!![],'defaultValue':_0x7e51('0x3')},'directory':{'type':Sequelize[_0x7e51('0x0')],'allowNull':!![]},'application':{'type':Sequelize[_0x7e51('0x0')],'allowNull':!![]},'digit':{'type':Sequelize[_0x7e51('0x0')],'allowNull':!![]},'sort':{'type':Sequelize[_0x7e51('0x0')],'allowNull':!![],'defaultValue':_0x7e51('0x6')},'format':{'type':Sequelize['STRING'],'allowNull':!![]},'stamp':{'type':_0x7e51('0x7')},'defaultEntry':{'type':Sequelize[_0x7e51('0x8')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x9d11=['quietmp3','mp3','STRING','alpha','TIMESTAMP','sequelize','exports','name','ENUM','files','mp3nb','quietmp3nb'];(function(_0x32b7d6,_0x588581){var _0x50bf0f=function(_0x56d204){while(--_0x56d204){_0x32b7d6['push'](_0x32b7d6['shift']());}};_0x50bf0f(++_0x588581);}(_0x9d11,0xd1));var _0x19d1=function(_0x5cab28,_0x307622){_0x5cab28=_0x5cab28-0x0;var _0xa3554d=_0x9d11[_0x5cab28];return _0xa3554d;};'use strict';var Sequelize=require(_0x19d1('0x0'));module[_0x19d1('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x19d1('0x2')},'mode':{'type':Sequelize[_0x19d1('0x3')]('custom',_0x19d1('0x4'),_0x19d1('0x5'),_0x19d1('0x6'),_0x19d1('0x7'),_0x19d1('0x8')),'allowNull':!![],'defaultValue':'files'},'directory':{'type':Sequelize[_0x19d1('0x9')],'allowNull':!![]},'application':{'type':Sequelize[_0x19d1('0x9')],'allowNull':!![]},'digit':{'type':Sequelize[_0x19d1('0x9')],'allowNull':!![]},'sort':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x19d1('0xa')},'format':{'type':Sequelize[_0x19d1('0x9')],'allowNull':!![]},'stamp':{'type':_0x19d1('0xb')},'defaultEntry':{'type':Sequelize['BOOLEAN'],'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 406b46c..9501e24 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 _0x5d5f=['Sequelize','ValidationError','message','addSound','Sound','findOne','save_name','converted_format','server/files/sounds/converted','format','%s.%s','extname','root','symlinkSync','removeSound','id2','getSounds','nolimit','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','offset','set','Content-Range','save','then','destroy','get','MusicOnHolds','error','stack','name','send','index','VoiceMusicOnHold','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','pick','VIRTUAL','filter','merge','options','count','includeAll','include','findAll','rows','show','params','rawAttributes','find','catch','body','sequelize','mode','files','join','server/files/moh','mkdirSync','directory','0777','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','transaction','readdirSync','forEach','unlinkSync','rmdirSync'];(function(_0x5dd77b,_0x1b6df4){var _0x1a0bfb=function(_0xa3164f){while(--_0xa3164f){_0x5dd77b['push'](_0x5dd77b['shift']());}};_0x1a0bfb(++_0x1b6df4);}(_0x5d5f,0x159));var _0xf5d5=function(_0x3bc15e,_0xf4f38b){_0x3bc15e=_0x3bc15e-0x0;var _0x187431=_0x5d5f[_0x3bc15e];return _0x187431;};'use strict';var pdf=require(_0xf5d5('0x0'));var emlformat=require(_0xf5d5('0x1'));var rimraf=require(_0xf5d5('0x2'));var zipdir=require(_0xf5d5('0x3'));var jsonpatch=require(_0xf5d5('0x4'));var rp=require(_0xf5d5('0x5'));var moment=require(_0xf5d5('0x6'));var BPromise=require(_0xf5d5('0x7'));var Mustache=require('mustache');var util=require(_0xf5d5('0x8'));var path=require('path');var sox=require(_0xf5d5('0x9'));var csv=require(_0xf5d5('0xa'));var ejs=require(_0xf5d5('0xb'));var fs=require('fs');var _=require(_0xf5d5('0xc'));var squel=require(_0xf5d5('0xd'));var crypto=require(_0xf5d5('0xe'));var jsforce=require(_0xf5d5('0xf'));var deskjs=require(_0xf5d5('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xf5d5('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xf5d5('0x12'));var as=require(_0xf5d5('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf5d5('0x14'))('api');var utils=require(_0xf5d5('0x15'));var config=require('../../config/environment');var db=require(_0xf5d5('0x16'))['db'];function respondWithStatusCode(_0x54b895,_0x596a64){_0x596a64=_0x596a64||0xcc;return function(_0x19470a){if(_0x19470a){return _0x54b895[_0xf5d5('0x17')](_0x596a64);}return _0x54b895[_0xf5d5('0x18')](_0x596a64)[_0xf5d5('0x19')]();};}function respondWithResult(_0x235941,_0x5e959b){_0x5e959b=_0x5e959b||0xc8;return function(_0x14b1f3){if(_0x14b1f3){return _0x235941[_0xf5d5('0x18')](_0x5e959b)['json'](_0x14b1f3);}};}function respondWithFilteredResult(_0x4b465d,_0x327ede){return function(_0x381a8b){if(_0x381a8b){var _0xbbb698=_0x381a8b['count'],_0x1af913=_0x327ede[_0xf5d5('0x1a')],_0xa4a588=_0x327ede['offset']+_0x327ede['limit'],_0x4742fb;if(_0xa4a588>=_0xbbb698){_0xa4a588=_0xbbb698;_0x4742fb=0xc8;}else{_0x4742fb=0xce;}_0x4b465d[_0xf5d5('0x18')](_0x4742fb);return _0x4b465d[_0xf5d5('0x1b')](_0xf5d5('0x1c'),_0x1af913+'-'+_0xa4a588+'/'+_0xbbb698)['json'](_0x381a8b);}return null;};}function patchUpdates(_0x482890){return function(_0x2f0ea7){try{jsonpatch['apply'](_0x2f0ea7,_0x482890,!![]);}catch(_0x419899){return BPromise['reject'](_0x419899);}return _0x2f0ea7[_0xf5d5('0x1d')]();};}function saveUpdates(_0x3fd21a,_0x588e88){return function(_0x265018){if(_0x265018){return _0x265018['update'](_0x3fd21a)[_0xf5d5('0x1e')](function(_0x4c505e){return _0x4c505e;});}return null;};}function removeEntity(_0x4f6931,_0x13587a){return function(_0x641d77){if(_0x641d77){return _0x641d77[_0xf5d5('0x1f')]()[_0xf5d5('0x1e')](function(){var _0x5ec542=_0x641d77[_0xf5d5('0x20')]({'plain':!![]});var _0x266304=_0xf5d5('0x21');return db['UserProfileResource']['destroy']({'where':{'type':_0x266304,'resourceId':_0x5ec542['id']}})[_0xf5d5('0x1e')](function(){return _0x641d77;});})[_0xf5d5('0x1e')](function(){_0x4f6931[_0xf5d5('0x18')](0xcc)[_0xf5d5('0x19')]();});}};}function handleEntityNotFound(_0x20ba2c,_0x128430){return function(_0x3e3c64){if(!_0x3e3c64){_0x20ba2c[_0xf5d5('0x17')](0x194);}return _0x3e3c64;};}function handleError(_0x580903,_0x28b4cd){_0x28b4cd=_0x28b4cd||0x1f4;return function(_0x58950b){logger[_0xf5d5('0x22')](_0x58950b[_0xf5d5('0x23')]);if(_0x58950b[_0xf5d5('0x24')]){delete _0x58950b[_0xf5d5('0x24')];}_0x580903[_0xf5d5('0x18')](_0x28b4cd)[_0xf5d5('0x25')](_0x58950b);};}exports[_0xf5d5('0x26')]=function(_0x1f4c2a,_0x4afd2b){var _0x6c193c={},_0x4f87e0={},_0x51fc34={'count':0x0,'rows':[]};var _0x4c54ac=_['map'](db[_0xf5d5('0x27')]['rawAttributes'],function(_0x596963){return{'name':_0x596963[_0xf5d5('0x28')],'type':_0x596963[_0xf5d5('0x29')]['key']};});_0x4f87e0[_0xf5d5('0x2a')]=_[_0xf5d5('0x2b')](_0x4c54ac,'name');_0x4f87e0[_0xf5d5('0x2c')]=_[_0xf5d5('0x2d')](_0x1f4c2a[_0xf5d5('0x2c')]);_0x4f87e0[_0xf5d5('0x2e')]=_[_0xf5d5('0x2f')](_0x4f87e0[_0xf5d5('0x2a')],_0x4f87e0[_0xf5d5('0x2c')]);_0x6c193c[_0xf5d5('0x30')]=_['intersection'](_0x4f87e0[_0xf5d5('0x2a')],qs[_0xf5d5('0x31')](_0x1f4c2a[_0xf5d5('0x2c')][_0xf5d5('0x31')]));_0x6c193c['attributes']=_0x6c193c[_0xf5d5('0x30')][_0xf5d5('0x32')]?_0x6c193c[_0xf5d5('0x30')]:_0x4f87e0[_0xf5d5('0x2a')];if(!_0x1f4c2a[_0xf5d5('0x2c')][_0xf5d5('0x33')]('nolimit')){_0x6c193c[_0xf5d5('0x34')]=qs[_0xf5d5('0x34')](_0x1f4c2a[_0xf5d5('0x2c')][_0xf5d5('0x34')]);_0x6c193c[_0xf5d5('0x1a')]=qs['offset'](_0x1f4c2a[_0xf5d5('0x2c')][_0xf5d5('0x1a')]);}_0x6c193c[_0xf5d5('0x35')]=qs[_0xf5d5('0x36')](_0x1f4c2a['query']['sort']);_0x6c193c[_0xf5d5('0x37')]=qs['filters'](_[_0xf5d5('0x38')](_0x1f4c2a[_0xf5d5('0x2c')],_0x4f87e0[_0xf5d5('0x2e')]));if(_0x1f4c2a['query']['filter']){_0x6c193c[_0xf5d5('0x37')]=_['merge'](_0x6c193c[_0xf5d5('0x37')],{'$or':_[_0xf5d5('0x2b')](_0x4c54ac,function(_0x343d39){if(_0x343d39[_0xf5d5('0x29')]!==_0xf5d5('0x39')){var _0x5be580={};_0x5be580[_0x343d39['name']]={'$like':'%'+_0x1f4c2a[_0xf5d5('0x2c')][_0xf5d5('0x3a')]+'%'};return _0x5be580;}})});}_0x6c193c=_[_0xf5d5('0x3b')]({},_0x6c193c,_0x1f4c2a[_0xf5d5('0x3c')]);var _0x1264b9={'where':_0x6c193c['where']};return db[_0xf5d5('0x27')][_0xf5d5('0x3d')](_0x1264b9)[_0xf5d5('0x1e')](function(_0x1b09b6){_0x51fc34[_0xf5d5('0x3d')]=_0x1b09b6;if(_0x1f4c2a[_0xf5d5('0x2c')][_0xf5d5('0x3e')]){_0x6c193c[_0xf5d5('0x3f')]=[{'all':!![]}];}return db[_0xf5d5('0x27')][_0xf5d5('0x40')](_0x6c193c);})[_0xf5d5('0x1e')](function(_0x3cce55){_0x51fc34[_0xf5d5('0x41')]=_0x3cce55;return _0x51fc34;})[_0xf5d5('0x1e')](respondWithFilteredResult(_0x4afd2b,_0x6c193c))['catch'](handleError(_0x4afd2b,null));};exports[_0xf5d5('0x42')]=function(_0x4b8bbf,_0x325748){var _0x16ed96={'raw':![],'where':{'id':_0x4b8bbf[_0xf5d5('0x43')]['id']}},_0x3a428d={};_0x3a428d[_0xf5d5('0x2a')]=_[_0xf5d5('0x2d')](db['VoiceMusicOnHold'][_0xf5d5('0x44')]);_0x3a428d[_0xf5d5('0x2c')]=_['keys'](_0x4b8bbf['query']);_0x3a428d[_0xf5d5('0x2e')]=_['intersection'](_0x3a428d[_0xf5d5('0x2a')],_0x3a428d[_0xf5d5('0x2c')]);_0x16ed96[_0xf5d5('0x30')]=_[_0xf5d5('0x2f')](_0x3a428d[_0xf5d5('0x2a')],qs[_0xf5d5('0x31')](_0x4b8bbf[_0xf5d5('0x2c')][_0xf5d5('0x31')]));_0x16ed96[_0xf5d5('0x30')]=_0x16ed96[_0xf5d5('0x30')][_0xf5d5('0x32')]?_0x16ed96[_0xf5d5('0x30')]:_0x3a428d[_0xf5d5('0x2a')];if(_0x4b8bbf['query'][_0xf5d5('0x3e')]){_0x16ed96['include']=[{'all':!![]}];}_0x16ed96=_[_0xf5d5('0x3b')]({},_0x16ed96,_0x4b8bbf[_0xf5d5('0x3c')]);return db[_0xf5d5('0x27')][_0xf5d5('0x45')](_0x16ed96)[_0xf5d5('0x1e')](handleEntityNotFound(_0x325748,null))[_0xf5d5('0x1e')](respondWithResult(_0x325748,null))[_0xf5d5('0x46')](handleError(_0x325748,null));};exports['update']=function(_0x57c3f2,_0x2fa94e){if(_0x57c3f2['body']['id']){delete _0x57c3f2['body']['id'];}return db[_0xf5d5('0x27')]['find']({'where':{'id':_0x57c3f2[_0xf5d5('0x43')]['id']}})['then'](handleEntityNotFound(_0x2fa94e,null))[_0xf5d5('0x1e')](saveUpdates(_0x57c3f2[_0xf5d5('0x47')],null))[_0xf5d5('0x1e')](respondWithResult(_0x2fa94e,null))[_0xf5d5('0x46')](handleError(_0x2fa94e,null));};exports['create']=function(_0x30714e,_0x3bfc8f,_0xbe4bca){return db[_0xf5d5('0x48')]['transaction'](function(_0x5c6504){if(_0x30714e[_0xf5d5('0x47')][_0xf5d5('0x49')]===_0xf5d5('0x4a')){_0x30714e['body']['directory']=path[_0xf5d5('0x4b')](config['root'],_0xf5d5('0x4c'),_0x30714e[_0xf5d5('0x47')][_0xf5d5('0x24')]);}return db['VoiceMusicOnHold']['create'](_0x30714e['body'],{'transaction':_0x5c6504})[_0xf5d5('0x1e')](function(_0x37e8cc){if(_0x30714e[_0xf5d5('0x47')][_0xf5d5('0x49')]===_0xf5d5('0x4a')){fs[_0xf5d5('0x4d')](_0x37e8cc[_0xf5d5('0x4e')],parseInt(_0xf5d5('0x4f'),0x8));}var _0x1da411=_0x30714e[_0xf5d5('0x50')]['get']({'plain':!![]});if(!_0x1da411)throw new Error(_0xf5d5('0x51'));if(_0x1da411[_0xf5d5('0x52')]==='user'){var _0x36ba51=_0x37e8cc[_0xf5d5('0x20')]({'plain':!![]});return db[_0xf5d5('0x53')][_0xf5d5('0x45')]({'where':{'name':'MusicOnHolds','userProfileId':_0x1da411['userProfileId']},'raw':!![]})[_0xf5d5('0x1e')](function(_0x4a4efd){if(_0x4a4efd&&_0x4a4efd['autoAssociation']===0x0){return db[_0xf5d5('0x54')]['create']({'name':_0x36ba51[_0xf5d5('0x24')],'resourceId':_0x36ba51['id'],'type':_0x4a4efd[_0xf5d5('0x24')],'sectionId':_0x4a4efd['id']},{})['then'](function(){return _0x37e8cc;});}else{return _0x37e8cc;}})['catch'](function(_0x5802c5){logger['error'](_0xf5d5('0x55'),_0x5802c5);});}return _0x37e8cc;});})[_0xf5d5('0x1e')](respondWithResult(_0x3bfc8f,0xc9))['catch'](handleError(_0x3bfc8f,null));};exports[_0xf5d5('0x1f')]=function(_0x3f0ea1,_0x54172c,_0x4e0475){var _0x559f0e;return db[_0xf5d5('0x27')][_0xf5d5('0x45')]({'where':{'id':_0x3f0ea1['params']['id']}})[_0xf5d5('0x1e')](function(_0x592635){if(_0x592635){return db[_0xf5d5('0x48')][_0xf5d5('0x56')](function(_0x10610e){return _0x592635[_0xf5d5('0x1f')]({'transaction':_0x10610e,'raw':!![]})[_0xf5d5('0x1e')](function(_0x537bf8){if(_0x537bf8[_0xf5d5('0x4e')]){fs[_0xf5d5('0x57')](_0x537bf8[_0xf5d5('0x4e')])[_0xf5d5('0x58')](function(_0x54dd57){fs[_0xf5d5('0x59')](path[_0xf5d5('0x4b')](_0x537bf8[_0xf5d5('0x4e')],_0x54dd57));});fs[_0xf5d5('0x5a')](_0x537bf8[_0xf5d5('0x4e')]);}return _0x537bf8;});})[_0xf5d5('0x46')](function(_0x5b821b){throw new db[(_0xf5d5('0x5b'))][(_0xf5d5('0x5c'))](_0x5b821b[_0xf5d5('0x5d')]);});}})[_0xf5d5('0x1e')](handleEntityNotFound(_0x54172c,null))['then'](removeEntity(_0x54172c,null))[_0xf5d5('0x46')](handleError(_0x54172c,null));};exports[_0xf5d5('0x5e')]=function(_0x46206c,_0x57f212,_0x76a01){return db[_0xf5d5('0x48')][_0xf5d5('0x56')](function(_0x1dd173){var _0x409b5e;return db[_0xf5d5('0x27')][_0xf5d5('0x45')]({'where':{'id':_0x46206c['params']['id']}})['then'](function(_0x2ab7da){if(_0x2ab7da){_0x409b5e=_0x2ab7da;return _0x2ab7da[_0xf5d5('0x5e')](_0x46206c[_0xf5d5('0x47')]['id'],{'transaction':_0x1dd173});}})[_0xf5d5('0x1e')](function(_0xc5cc6d){if(_0xc5cc6d){return db[_0xf5d5('0x5f')][_0xf5d5('0x60')]({'where':{'id':_0x46206c[_0xf5d5('0x47')]['id']},'attributes':['id',_0xf5d5('0x24'),_0xf5d5('0x61'),_0xf5d5('0x62'),'createdAt'],'raw':!![]});}})[_0xf5d5('0x1e')](function(_0x4f7dcb){if(_0x4f7dcb){var _0x42022a=path[_0xf5d5('0x4b')](config['root'],_0xf5d5('0x63'),util[_0xf5d5('0x64')](_0xf5d5('0x65'),path['basename'](_0x4f7dcb[_0xf5d5('0x61')],path[_0xf5d5('0x66')](_0x4f7dcb[_0xf5d5('0x61')])),_0x4f7dcb['converted_format']));var _0xaf02a6=path[_0xf5d5('0x4b')](config[_0xf5d5('0x67')],_0xf5d5('0x4c'),_0x409b5e[_0xf5d5('0x24')],util[_0xf5d5('0x64')]('%s.%s',_0x4f7dcb['name'],_0x4f7dcb[_0xf5d5('0x62')]));fs[_0xf5d5('0x68')](_0x42022a,_0xaf02a6);return _0x4f7dcb;}})[_0xf5d5('0x46')](function(_0x3381f4){throw new db[(_0xf5d5('0x5b'))]['ValidationError'](_0x3381f4[_0xf5d5('0x5d')]);});})[_0xf5d5('0x1e')](handleEntityNotFound(_0x57f212,null))['then'](respondWithResult(_0x57f212,0xc9))[_0xf5d5('0x46')](handleError(_0x57f212,null));};exports[_0xf5d5('0x69')]=function(_0x52be08,_0x364e8f,_0x4186be){return db[_0xf5d5('0x48')]['transaction'](function(_0x4ef8c9){var _0x2dc335;return db[_0xf5d5('0x27')][_0xf5d5('0x60')]({'where':{'id':_0x52be08[_0xf5d5('0x43')]['id']}})[_0xf5d5('0x1e')](handleEntityNotFound(_0x364e8f,null))[_0xf5d5('0x1e')](function(_0x44190c){if(_0x44190c){_0x2dc335=_0x44190c;return _0x44190c['removeSound'](_0x52be08['params'][_0xf5d5('0x6a')]);}})[_0xf5d5('0x1e')](function(_0x3b3885){if(_0x3b3885){return db[_0xf5d5('0x5f')][_0xf5d5('0x60')]({'where':{'id':_0x52be08['params']['id2']},'attributes':['id',_0xf5d5('0x24'),_0xf5d5('0x61'),_0xf5d5('0x62'),'createdAt'],'raw':!![]});}})[_0xf5d5('0x1e')](function(_0x5f1d0c){if(_0x5f1d0c){fs[_0xf5d5('0x59')](path[_0xf5d5('0x4b')](_0x2dc335['directory'],util[_0xf5d5('0x64')](_0xf5d5('0x65'),_0x5f1d0c[_0xf5d5('0x24')],_0x5f1d0c['converted_format'])));return _0x5f1d0c;}})[_0xf5d5('0x46')](function(_0x387507){throw new db[(_0xf5d5('0x5b'))]['ValidationError'](_0x387507[_0xf5d5('0x5d')]);});})[_0xf5d5('0x1e')](handleEntityNotFound(_0x364e8f,null))[_0xf5d5('0x1e')](respondWithStatusCode(_0x364e8f,0xcc))['catch'](handleError(_0x364e8f,null));};exports[_0xf5d5('0x6b')]=function(_0x5d9abb,_0x2aad40,_0x5b6b5c){var _0x2d266b={};var _0x3fc3d7={};var _0x3d9e84;var _0x2c9896;return db[_0xf5d5('0x27')][_0xf5d5('0x60')]({'where':{'id':_0x5d9abb[_0xf5d5('0x43')]['id']}})[_0xf5d5('0x1e')](handleEntityNotFound(_0x2aad40,null))[_0xf5d5('0x1e')](function(_0x50bd6b){if(_0x50bd6b){_0x3d9e84=_0x50bd6b;_0x3fc3d7['model']=_['keys'](db['Sound'][_0xf5d5('0x44')]);_0x3fc3d7[_0xf5d5('0x2c')]=_[_0xf5d5('0x2d')](_0x5d9abb[_0xf5d5('0x2c')]);_0x3fc3d7['filters']=_[_0xf5d5('0x2f')](_0x3fc3d7[_0xf5d5('0x2a')],_0x3fc3d7['query']);_0x2d266b[_0xf5d5('0x30')]=_[_0xf5d5('0x2f')](_0x3fc3d7[_0xf5d5('0x2a')],qs[_0xf5d5('0x31')](_0x5d9abb[_0xf5d5('0x2c')][_0xf5d5('0x31')]));_0x2d266b[_0xf5d5('0x30')]=_0x2d266b[_0xf5d5('0x30')][_0xf5d5('0x32')]?_0x2d266b['attributes']:_0x3fc3d7['model'];_0x2d266b[_0xf5d5('0x35')]=qs[_0xf5d5('0x36')](_0x5d9abb[_0xf5d5('0x2c')][_0xf5d5('0x36')]);_0x2d266b[_0xf5d5('0x37')]=qs[_0xf5d5('0x2e')](_[_0xf5d5('0x38')](_0x5d9abb[_0xf5d5('0x2c')],_0x3fc3d7[_0xf5d5('0x2e')]));if(_0x5d9abb[_0xf5d5('0x2c')][_0xf5d5('0x3a')]){_0x2d266b['where']=_['merge'](_0x2d266b['where'],{'$or':_['map'](_0x2d266b[_0xf5d5('0x30')],function(_0x58db73){var _0x147cab={};_0x147cab[_0x58db73]={'$like':'%'+_0x5d9abb[_0xf5d5('0x2c')][_0xf5d5('0x3a')]+'%'};return _0x147cab;})});}_0x2d266b=_[_0xf5d5('0x3b')]({},_0x2d266b,_0x5d9abb[_0xf5d5('0x3c')]);return _0x3d9e84[_0xf5d5('0x6b')](_0x2d266b);}})[_0xf5d5('0x1e')](function(_0x1793b7){if(_0x1793b7){_0x2c9896=_0x1793b7['length'];if(!_0x5d9abb[_0xf5d5('0x2c')][_0xf5d5('0x33')](_0xf5d5('0x6c'))){_0x2d266b[_0xf5d5('0x34')]=qs[_0xf5d5('0x34')](_0x5d9abb[_0xf5d5('0x2c')]['limit']);_0x2d266b['offset']=qs[_0xf5d5('0x1a')](_0x5d9abb[_0xf5d5('0x2c')]['offset']);}return _0x3d9e84['getSounds'](_0x2d266b);}})[_0xf5d5('0x1e')](function(_0x4361de){if(_0x4361de){return _0x4361de?{'count':_0x2c9896,'rows':_0x4361de}:null;}})[_0xf5d5('0x1e')](respondWithResult(_0x2aad40,null))[_0xf5d5('0x46')](handleError(_0x2aad40,null));};
\ No newline at end of file
+var _0x5450=['server/files/sounds/converted','format','%s.%s','basename','converted_format','removeSound','id2','Sound','getSounds','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','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','count','offset','limit','set','apply','reject','save','update','then','get','MusicOnHolds','destroy','stack','name','send','map','VoiceMusicOnHold','rawAttributes','type','key','model','keys','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','include','findAll','rows','show','params','intersection','includeAll','find','catch','body','sequelize','transaction','mode','files','directory','join','server/files/moh','create','mkdirSync','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readdirSync','rmdirSync','Sequelize','ValidationError','message','addSound','findOne','save_name','createdAt','root'];(function(_0x2abab4,_0x3671f9){var _0x21ab3d=function(_0x3d761d){while(--_0x3d761d){_0x2abab4['push'](_0x2abab4['shift']());}};_0x21ab3d(++_0x3671f9);}(_0x5450,0x7a));var _0x0545=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0x5450[_0xb0f7c3];return _0x28ea68;};'use strict';var pdf=require(_0x0545('0x0'));var emlformat=require(_0x0545('0x1'));var rimraf=require(_0x0545('0x2'));var zipdir=require(_0x0545('0x3'));var jsonpatch=require(_0x0545('0x4'));var rp=require(_0x0545('0x5'));var moment=require(_0x0545('0x6'));var BPromise=require(_0x0545('0x7'));var Mustache=require(_0x0545('0x8'));var util=require(_0x0545('0x9'));var path=require(_0x0545('0xa'));var sox=require(_0x0545('0xb'));var csv=require(_0x0545('0xc'));var ejs=require(_0x0545('0xd'));var fs=require('fs');var _=require(_0x0545('0xe'));var squel=require(_0x0545('0xf'));var crypto=require(_0x0545('0x10'));var jsforce=require(_0x0545('0x11'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x0545('0x12'));var Papa=require(_0x0545('0x13'));var Redis=require(_0x0545('0x14'));var authService=require(_0x0545('0x15'));var qs=require(_0x0545('0x16'));var as=require(_0x0545('0x17'));var hardwareService=require(_0x0545('0x18'));var logger=require(_0x0545('0x19'))(_0x0545('0x1a'));var utils=require(_0x0545('0x1b'));var config=require(_0x0545('0x1c'));var db=require(_0x0545('0x1d'))['db'];function respondWithStatusCode(_0x69a880,_0x4a1a64){_0x4a1a64=_0x4a1a64||0xcc;return function(_0x41fcdf){if(_0x41fcdf){return _0x69a880[_0x0545('0x1e')](_0x4a1a64);}return _0x69a880['status'](_0x4a1a64)['end']();};}function respondWithResult(_0x2c5588,_0x3de407){_0x3de407=_0x3de407||0xc8;return function(_0xecefca){if(_0xecefca){return _0x2c5588[_0x0545('0x1f')](_0x3de407)['json'](_0xecefca);}};}function respondWithFilteredResult(_0x5556d8,_0x15f431){return function(_0x335f72){if(_0x335f72){var _0xe99e3a=_0x335f72[_0x0545('0x20')],_0x1ca6b9=_0x15f431[_0x0545('0x21')],_0x4ae133=_0x15f431[_0x0545('0x21')]+_0x15f431[_0x0545('0x22')],_0x33ba6d;if(_0x4ae133>=_0xe99e3a){_0x4ae133=_0xe99e3a;_0x33ba6d=0xc8;}else{_0x33ba6d=0xce;}_0x5556d8[_0x0545('0x1f')](_0x33ba6d);return _0x5556d8[_0x0545('0x23')]('Content-Range',_0x1ca6b9+'-'+_0x4ae133+'/'+_0xe99e3a)['json'](_0x335f72);}return null;};}function patchUpdates(_0x3edb70){return function(_0x32f28b){try{jsonpatch[_0x0545('0x24')](_0x32f28b,_0x3edb70,!![]);}catch(_0x45c7f1){return BPromise[_0x0545('0x25')](_0x45c7f1);}return _0x32f28b[_0x0545('0x26')]();};}function saveUpdates(_0x2a3524,_0x17e706){return function(_0x378d27){if(_0x378d27){return _0x378d27[_0x0545('0x27')](_0x2a3524)[_0x0545('0x28')](function(_0x439366){return _0x439366;});}return null;};}function removeEntity(_0x26e29f,_0x210d88){return function(_0x413e30){if(_0x413e30){return _0x413e30['destroy']()['then'](function(){var _0x4c1ec7=_0x413e30[_0x0545('0x29')]({'plain':!![]});var _0x217f64=_0x0545('0x2a');return db['UserProfileResource'][_0x0545('0x2b')]({'where':{'type':_0x217f64,'resourceId':_0x4c1ec7['id']}})[_0x0545('0x28')](function(){return _0x413e30;});})[_0x0545('0x28')](function(){_0x26e29f[_0x0545('0x1f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x39f77e,_0x59aaaf){return function(_0x454b0b){if(!_0x454b0b){_0x39f77e[_0x0545('0x1e')](0x194);}return _0x454b0b;};}function handleError(_0x4d3d11,_0x36ad04){_0x36ad04=_0x36ad04||0x1f4;return function(_0x34d107){logger['error'](_0x34d107[_0x0545('0x2c')]);if(_0x34d107['name']){delete _0x34d107[_0x0545('0x2d')];}_0x4d3d11[_0x0545('0x1f')](_0x36ad04)[_0x0545('0x2e')](_0x34d107);};}exports['index']=function(_0x30baa6,_0x2a060d){var _0x8925f={},_0x43b561={},_0x425962={'count':0x0,'rows':[]};var _0x34e58f=_[_0x0545('0x2f')](db[_0x0545('0x30')][_0x0545('0x31')],function(_0x4aa48a){return{'name':_0x4aa48a['fieldName'],'type':_0x4aa48a[_0x0545('0x32')][_0x0545('0x33')]};});_0x43b561[_0x0545('0x34')]=_[_0x0545('0x2f')](_0x34e58f,_0x0545('0x2d'));_0x43b561['query']=_[_0x0545('0x35')](_0x30baa6[_0x0545('0x36')]);_0x43b561[_0x0545('0x37')]=_['intersection'](_0x43b561[_0x0545('0x34')],_0x43b561['query']);_0x8925f[_0x0545('0x38')]=_['intersection'](_0x43b561[_0x0545('0x34')],qs[_0x0545('0x39')](_0x30baa6[_0x0545('0x36')]['fields']));_0x8925f[_0x0545('0x38')]=_0x8925f['attributes'][_0x0545('0x3a')]?_0x8925f['attributes']:_0x43b561['model'];if(!_0x30baa6['query'][_0x0545('0x3b')](_0x0545('0x3c'))){_0x8925f[_0x0545('0x22')]=qs['limit'](_0x30baa6[_0x0545('0x36')]['limit']);_0x8925f[_0x0545('0x21')]=qs[_0x0545('0x21')](_0x30baa6['query'][_0x0545('0x21')]);}_0x8925f[_0x0545('0x3d')]=qs[_0x0545('0x3e')](_0x30baa6[_0x0545('0x36')][_0x0545('0x3e')]);_0x8925f['where']=qs['filters'](_[_0x0545('0x3f')](_0x30baa6[_0x0545('0x36')],_0x43b561[_0x0545('0x37')]));if(_0x30baa6[_0x0545('0x36')][_0x0545('0x40')]){_0x8925f[_0x0545('0x41')]=_[_0x0545('0x42')](_0x8925f[_0x0545('0x41')],{'$or':_[_0x0545('0x2f')](_0x34e58f,function(_0x9d3d03){if(_0x9d3d03[_0x0545('0x32')]!==_0x0545('0x43')){var _0x1ef847={};_0x1ef847[_0x9d3d03[_0x0545('0x2d')]]={'$like':'%'+_0x30baa6['query']['filter']+'%'};return _0x1ef847;}})});}_0x8925f=_[_0x0545('0x42')]({},_0x8925f,_0x30baa6[_0x0545('0x44')]);var _0x5e90ef={'where':_0x8925f[_0x0545('0x41')]};return db['VoiceMusicOnHold'][_0x0545('0x20')](_0x5e90ef)[_0x0545('0x28')](function(_0x3c564f){_0x425962[_0x0545('0x20')]=_0x3c564f;if(_0x30baa6['query']['includeAll']){_0x8925f[_0x0545('0x45')]=[{'all':!![]}];}return db[_0x0545('0x30')][_0x0545('0x46')](_0x8925f);})[_0x0545('0x28')](function(_0xcbe346){_0x425962[_0x0545('0x47')]=_0xcbe346;return _0x425962;})['then'](respondWithFilteredResult(_0x2a060d,_0x8925f))['catch'](handleError(_0x2a060d,null));};exports[_0x0545('0x48')]=function(_0x4abaa0,_0x2cbf4d){var _0x42d839={'raw':![],'where':{'id':_0x4abaa0[_0x0545('0x49')]['id']}},_0x1da6f1={};_0x1da6f1['model']=_[_0x0545('0x35')](db[_0x0545('0x30')]['rawAttributes']);_0x1da6f1[_0x0545('0x36')]=_[_0x0545('0x35')](_0x4abaa0['query']);_0x1da6f1[_0x0545('0x37')]=_[_0x0545('0x4a')](_0x1da6f1[_0x0545('0x34')],_0x1da6f1[_0x0545('0x36')]);_0x42d839['attributes']=_[_0x0545('0x4a')](_0x1da6f1[_0x0545('0x34')],qs[_0x0545('0x39')](_0x4abaa0[_0x0545('0x36')][_0x0545('0x39')]));_0x42d839['attributes']=_0x42d839[_0x0545('0x38')][_0x0545('0x3a')]?_0x42d839[_0x0545('0x38')]:_0x1da6f1[_0x0545('0x34')];if(_0x4abaa0[_0x0545('0x36')][_0x0545('0x4b')]){_0x42d839[_0x0545('0x45')]=[{'all':!![]}];}_0x42d839=_[_0x0545('0x42')]({},_0x42d839,_0x4abaa0['options']);return db[_0x0545('0x30')][_0x0545('0x4c')](_0x42d839)[_0x0545('0x28')](handleEntityNotFound(_0x2cbf4d,null))['then'](respondWithResult(_0x2cbf4d,null))[_0x0545('0x4d')](handleError(_0x2cbf4d,null));};exports[_0x0545('0x27')]=function(_0x4ae152,_0x2ccb4c){if(_0x4ae152[_0x0545('0x4e')]['id']){delete _0x4ae152[_0x0545('0x4e')]['id'];}return db[_0x0545('0x30')][_0x0545('0x4c')]({'where':{'id':_0x4ae152[_0x0545('0x49')]['id']}})[_0x0545('0x28')](handleEntityNotFound(_0x2ccb4c,null))[_0x0545('0x28')](saveUpdates(_0x4ae152[_0x0545('0x4e')],null))[_0x0545('0x28')](respondWithResult(_0x2ccb4c,null))[_0x0545('0x4d')](handleError(_0x2ccb4c,null));};exports['create']=function(_0x274e8b,_0x118965,_0x2b3b98){return db[_0x0545('0x4f')][_0x0545('0x50')](function(_0x1e6208){if(_0x274e8b[_0x0545('0x4e')][_0x0545('0x51')]===_0x0545('0x52')){_0x274e8b[_0x0545('0x4e')][_0x0545('0x53')]=path[_0x0545('0x54')](config['root'],_0x0545('0x55'),_0x274e8b[_0x0545('0x4e')]['name']);}return db[_0x0545('0x30')][_0x0545('0x56')](_0x274e8b[_0x0545('0x4e')],{'transaction':_0x1e6208})[_0x0545('0x28')](function(_0x2b013c){if(_0x274e8b['body'][_0x0545('0x51')]===_0x0545('0x52')){fs[_0x0545('0x57')](_0x2b013c[_0x0545('0x53')],parseInt('0777',0x8));}var _0x45a2f2=_0x274e8b[_0x0545('0x58')][_0x0545('0x29')]({'plain':!![]});if(!_0x45a2f2)throw new Error(_0x0545('0x59'));if(_0x45a2f2['role']==='user'){var _0x368b65=_0x2b013c['get']({'plain':!![]});return db[_0x0545('0x5a')]['find']({'where':{'name':_0x0545('0x2a'),'userProfileId':_0x45a2f2[_0x0545('0x5b')]},'raw':!![]})[_0x0545('0x28')](function(_0x298ccc){if(_0x298ccc&&_0x298ccc[_0x0545('0x5c')]===0x0){return db['UserProfileResource'][_0x0545('0x56')]({'name':_0x368b65[_0x0545('0x2d')],'resourceId':_0x368b65['id'],'type':_0x298ccc[_0x0545('0x2d')],'sectionId':_0x298ccc['id']},{})[_0x0545('0x28')](function(){return _0x2b013c;});}else{return _0x2b013c;}})[_0x0545('0x4d')](function(_0x4f7f49){logger['error'](_0x0545('0x5d'),_0x4f7f49);});}return _0x2b013c;});})[_0x0545('0x28')](respondWithResult(_0x118965,0xc9))[_0x0545('0x4d')](handleError(_0x118965,null));};exports[_0x0545('0x2b')]=function(_0x244084,_0x11e499,_0x2400fe){var _0x536d95;return db[_0x0545('0x30')][_0x0545('0x4c')]({'where':{'id':_0x244084[_0x0545('0x49')]['id']}})[_0x0545('0x28')](function(_0x5a6a34){if(_0x5a6a34){return db[_0x0545('0x4f')][_0x0545('0x50')](function(_0x150c1c){return _0x5a6a34['destroy']({'transaction':_0x150c1c,'raw':!![]})[_0x0545('0x28')](function(_0x1b6c7){if(_0x1b6c7[_0x0545('0x53')]){fs[_0x0545('0x5e')](_0x1b6c7[_0x0545('0x53')])['forEach'](function(_0xf33d4e){fs['unlinkSync'](path[_0x0545('0x54')](_0x1b6c7[_0x0545('0x53')],_0xf33d4e));});fs[_0x0545('0x5f')](_0x1b6c7[_0x0545('0x53')]);}return _0x1b6c7;});})[_0x0545('0x4d')](function(_0x57a23d){throw new db[(_0x0545('0x60'))][(_0x0545('0x61'))](_0x57a23d[_0x0545('0x62')]);});}})[_0x0545('0x28')](handleEntityNotFound(_0x11e499,null))[_0x0545('0x28')](removeEntity(_0x11e499,null))[_0x0545('0x4d')](handleError(_0x11e499,null));};exports[_0x0545('0x63')]=function(_0x10cc87,_0x28fc27,_0x1fa188){return db['sequelize'][_0x0545('0x50')](function(_0x1ef7dd){var _0x19048f;return db[_0x0545('0x30')][_0x0545('0x4c')]({'where':{'id':_0x10cc87['params']['id']}})[_0x0545('0x28')](function(_0x5aa115){if(_0x5aa115){_0x19048f=_0x5aa115;return _0x5aa115[_0x0545('0x63')](_0x10cc87[_0x0545('0x4e')]['id'],{'transaction':_0x1ef7dd});}})[_0x0545('0x28')](function(_0x426307){if(_0x426307){return db['Sound'][_0x0545('0x64')]({'where':{'id':_0x10cc87[_0x0545('0x4e')]['id']},'attributes':['id',_0x0545('0x2d'),_0x0545('0x65'),'converted_format',_0x0545('0x66')],'raw':!![]});}})['then'](function(_0xa6bcf5){if(_0xa6bcf5){var _0x5be82d=path[_0x0545('0x54')](config[_0x0545('0x67')],_0x0545('0x68'),util[_0x0545('0x69')](_0x0545('0x6a'),path[_0x0545('0x6b')](_0xa6bcf5[_0x0545('0x65')],path['extname'](_0xa6bcf5[_0x0545('0x65')])),_0xa6bcf5[_0x0545('0x6c')]));var _0x382445=path[_0x0545('0x54')](config[_0x0545('0x67')],'server/files/moh',_0x19048f['name'],util['format']('%s.%s',_0xa6bcf5['name'],_0xa6bcf5[_0x0545('0x6c')]));fs['symlinkSync'](_0x5be82d,_0x382445);return _0xa6bcf5;}})[_0x0545('0x4d')](function(_0x37cc8f){throw new db[(_0x0545('0x60'))][(_0x0545('0x61'))](_0x37cc8f[_0x0545('0x62')]);});})[_0x0545('0x28')](handleEntityNotFound(_0x28fc27,null))['then'](respondWithResult(_0x28fc27,0xc9))[_0x0545('0x4d')](handleError(_0x28fc27,null));};exports[_0x0545('0x6d')]=function(_0x5560c0,_0x70cf1c,_0x2758c5){return db['sequelize'][_0x0545('0x50')](function(_0x359880){var _0x102466;return db[_0x0545('0x30')]['findOne']({'where':{'id':_0x5560c0[_0x0545('0x49')]['id']}})[_0x0545('0x28')](handleEntityNotFound(_0x70cf1c,null))[_0x0545('0x28')](function(_0x20a5ca){if(_0x20a5ca){_0x102466=_0x20a5ca;return _0x20a5ca[_0x0545('0x6d')](_0x5560c0[_0x0545('0x49')][_0x0545('0x6e')]);}})[_0x0545('0x28')](function(_0x4442f9){if(_0x4442f9){return db[_0x0545('0x6f')][_0x0545('0x64')]({'where':{'id':_0x5560c0[_0x0545('0x49')]['id2']},'attributes':['id',_0x0545('0x2d'),_0x0545('0x65'),_0x0545('0x6c'),_0x0545('0x66')],'raw':!![]});}})['then'](function(_0xd88505){if(_0xd88505){fs['unlinkSync'](path['join'](_0x102466[_0x0545('0x53')],util['format'](_0x0545('0x6a'),_0xd88505[_0x0545('0x2d')],_0xd88505['converted_format'])));return _0xd88505;}})[_0x0545('0x4d')](function(_0x4e6591){throw new db[(_0x0545('0x60'))][(_0x0545('0x61'))](_0x4e6591[_0x0545('0x62')]);});})['then'](handleEntityNotFound(_0x70cf1c,null))['then'](respondWithStatusCode(_0x70cf1c,0xcc))['catch'](handleError(_0x70cf1c,null));};exports[_0x0545('0x70')]=function(_0x4539cd,_0x70b4f1,_0x305cc5){var _0x12c289={};var _0x16412c={};var _0x45311d;var _0x280223;return db[_0x0545('0x30')][_0x0545('0x64')]({'where':{'id':_0x4539cd[_0x0545('0x49')]['id']}})['then'](handleEntityNotFound(_0x70b4f1,null))[_0x0545('0x28')](function(_0x5b773e){if(_0x5b773e){_0x45311d=_0x5b773e;_0x16412c[_0x0545('0x34')]=_['keys'](db['Sound'][_0x0545('0x31')]);_0x16412c[_0x0545('0x36')]=_['keys'](_0x4539cd[_0x0545('0x36')]);_0x16412c['filters']=_[_0x0545('0x4a')](_0x16412c[_0x0545('0x34')],_0x16412c[_0x0545('0x36')]);_0x12c289[_0x0545('0x38')]=_[_0x0545('0x4a')](_0x16412c['model'],qs[_0x0545('0x39')](_0x4539cd['query'][_0x0545('0x39')]));_0x12c289[_0x0545('0x38')]=_0x12c289[_0x0545('0x38')][_0x0545('0x3a')]?_0x12c289['attributes']:_0x16412c['model'];_0x12c289[_0x0545('0x3d')]=qs[_0x0545('0x3e')](_0x4539cd['query'][_0x0545('0x3e')]);_0x12c289[_0x0545('0x41')]=qs[_0x0545('0x37')](_[_0x0545('0x3f')](_0x4539cd[_0x0545('0x36')],_0x16412c[_0x0545('0x37')]));if(_0x4539cd[_0x0545('0x36')][_0x0545('0x40')]){_0x12c289[_0x0545('0x41')]=_[_0x0545('0x42')](_0x12c289[_0x0545('0x41')],{'$or':_[_0x0545('0x2f')](_0x12c289[_0x0545('0x38')],function(_0x5d94b0){var _0xfa2bfb={};_0xfa2bfb[_0x5d94b0]={'$like':'%'+_0x4539cd[_0x0545('0x36')][_0x0545('0x40')]+'%'};return _0xfa2bfb;})});}_0x12c289=_[_0x0545('0x42')]({},_0x12c289,_0x4539cd[_0x0545('0x44')]);return _0x45311d[_0x0545('0x70')](_0x12c289);}})[_0x0545('0x28')](function(_0x201710){if(_0x201710){_0x280223=_0x201710[_0x0545('0x3a')];if(!_0x4539cd[_0x0545('0x36')]['hasOwnProperty'](_0x0545('0x3c'))){_0x12c289[_0x0545('0x22')]=qs[_0x0545('0x22')](_0x4539cd[_0x0545('0x36')][_0x0545('0x22')]);_0x12c289[_0x0545('0x21')]=qs[_0x0545('0x21')](_0x4539cd['query']['offset']);}return _0x45311d[_0x0545('0x70')](_0x12c289);}})[_0x0545('0x28')](function(_0x4d6dc9){if(_0x4d6dc9){return _0x4d6dc9?{'count':_0x280223,'rows':_0x4d6dc9}:null;}})[_0x0545('0x28')](respondWithResult(_0x70b4f1,null))[_0x0545('0x4d')](handleError(_0x70b4f1,null));};
\ No newline at end of file
diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js
index d6df087..22fd1a4 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 _0x1e43=['util','../../config/logger','bluebird','request-promise','rimraf','../../config/environment','./voiceMusicOnHold.attributes','exports','VoiceMusicOnHold','voice_musiconhold','lodash'];(function(_0xd8face,_0x4ef518){var _0x38d98d=function(_0x24fd54){while(--_0x24fd54){_0xd8face['push'](_0xd8face['shift']());}};_0x38d98d(++_0x4ef518);}(_0x1e43,0x1e3));var _0x31e4=function(_0x3ff0f0,_0x5523bf){_0x3ff0f0=_0x3ff0f0-0x0;var _0x5dc82a=_0x1e43[_0x3ff0f0];return _0x5dc82a;};'use strict';var _=require(_0x31e4('0x0'));var util=require(_0x31e4('0x1'));var logger=require(_0x31e4('0x2'))('api');var moment=require('moment');var BPromise=require(_0x31e4('0x3'));var rp=require(_0x31e4('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x31e4('0x5'));var config=require(_0x31e4('0x6'));var attributes=require(_0x31e4('0x7'));module[_0x31e4('0x8')]=function(_0x2dfafa,_0x4f7d6b){return _0x2dfafa['define'](_0x31e4('0x9'),attributes,{'tableName':_0x31e4('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa5c1=['api','moment','request-promise','path','rimraf','../../config/environment','./voiceMusicOnHold.attributes','exports','voice_musiconhold','lodash','util'];(function(_0x3b4a5f,_0x5a63e0){var _0x586cfb=function(_0x367fdb){while(--_0x367fdb){_0x3b4a5f['push'](_0x3b4a5f['shift']());}};_0x586cfb(++_0x5a63e0);}(_0xa5c1,0x174));var _0x1a5c=function(_0x7e1db7,_0x1da70f){_0x7e1db7=_0x7e1db7-0x0;var _0xc82fa0=_0xa5c1[_0x7e1db7];return _0xc82fa0;};'use strict';var _=require(_0x1a5c('0x0'));var util=require(_0x1a5c('0x1'));var logger=require('../../config/logger')(_0x1a5c('0x2'));var moment=require(_0x1a5c('0x3'));var BPromise=require('bluebird');var rp=require(_0x1a5c('0x4'));var fs=require('fs');var path=require(_0x1a5c('0x5'));var rimraf=require(_0x1a5c('0x6'));var config=require(_0x1a5c('0x7'));var attributes=require(_0x1a5c('0x8'));module[_0x1a5c('0x9')]=function(_0x550388,_0x41f95c){return _0x550388['define']('VoiceMusicOnHold',attributes,{'tableName':_0x1a5c('0xa'),'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 48233f9..a1d2df1 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 _0xfc2c=['message','result','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x3d8679,_0x2af567){var _0x50870f=function(_0x34fee1){while(--_0x34fee1){_0x3d8679['push'](_0x3d8679['shift']());}};_0x50870f(++_0x2af567);}(_0xfc2c,0x11f));var _0xcfc2=function(_0x3db291,_0x279603){_0x3db291=_0x3db291-0x0;var _0x40ef9c=_0xfc2c[_0x3db291];return _0x40ef9c;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xcfc2('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xcfc2('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0xcfc2('0x2'));var logger=require(_0xcfc2('0x3'))('rpc');var config=require(_0xcfc2('0x4'));var jayson=require(_0xcfc2('0x5'));var client=jayson['client'][_0xcfc2('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x12194d,_0x2628a2,_0x444dd4){return new BPromise(function(_0x25465b,_0x27cdbc){return client[_0xcfc2('0x7')](_0x12194d,_0x444dd4)[_0xcfc2('0x8')](function(_0x1f765d){logger[_0xcfc2('0x9')](_0xcfc2('0xa'),_0x2628a2,_0xcfc2('0xb'));logger[_0xcfc2('0xc')](_0xcfc2('0xd'),_0x2628a2,'request\x20sent',JSON[_0xcfc2('0xe')](_0x1f765d));if(_0x1f765d[_0xcfc2('0xf')]){if(_0x1f765d[_0xcfc2('0xf')][_0xcfc2('0x10')]===0x1f4){logger[_0xcfc2('0xf')](_0xcfc2('0xa'),_0x2628a2,_0x1f765d[_0xcfc2('0xf')][_0xcfc2('0x11')]);return _0x27cdbc(_0x1f765d[_0xcfc2('0xf')]['message']);}logger[_0xcfc2('0xf')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2628a2,_0x1f765d['error'][_0xcfc2('0x11')]);return _0x25465b(_0x1f765d[_0xcfc2('0xf')][_0xcfc2('0x11')]);}else{logger[_0xcfc2('0x9')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2628a2,_0xcfc2('0xb'));_0x25465b(_0x1f765d[_0xcfc2('0x12')][_0xcfc2('0x11')]);}})['catch'](function(_0x1c6149){logger[_0xcfc2('0xf')](_0xcfc2('0xa'),_0x2628a2,_0x1c6149);_0x27cdbc(_0x1c6149);});});}
\ No newline at end of file
+var _0xe9b7=['catch','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','error','message','result'];(function(_0x1ecb37,_0x334181){var _0x1062a1=function(_0xefe217){while(--_0xefe217){_0x1ecb37['push'](_0x1ecb37['shift']());}};_0x1062a1(++_0x334181);}(_0xe9b7,0x157));var _0x7e9b=function(_0x136533,_0x41cef9){_0x136533=_0x136533-0x0;var _0x2cc80c=_0xe9b7[_0x136533];return _0x2cc80c;};'use strict';var _=require('lodash');var util=require(_0x7e9b('0x0'));var moment=require(_0x7e9b('0x1'));var BPromise=require(_0x7e9b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7e9b('0x3'))['db'];var utils=require(_0x7e9b('0x4'));var logger=require(_0x7e9b('0x5'))(_0x7e9b('0x6'));var config=require(_0x7e9b('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x291b60,_0x17cbc9,_0x44647e){return new BPromise(function(_0x223c70,_0x580c9d){return client[_0x7e9b('0x8')](_0x291b60,_0x44647e)[_0x7e9b('0x9')](function(_0x1fb162){logger[_0x7e9b('0xa')](_0x7e9b('0xb'),_0x17cbc9,_0x7e9b('0xc'));logger[_0x7e9b('0xd')](_0x7e9b('0xe'),_0x17cbc9,'request\x20sent',JSON['stringify'](_0x1fb162));if(_0x1fb162[_0x7e9b('0xf')]){if(_0x1fb162[_0x7e9b('0xf')]['code']===0x1f4){logger[_0x7e9b('0xf')](_0x7e9b('0xb'),_0x17cbc9,_0x1fb162['error']['message']);return _0x580c9d(_0x1fb162[_0x7e9b('0xf')][_0x7e9b('0x10')]);}logger[_0x7e9b('0xf')](_0x7e9b('0xb'),_0x17cbc9,_0x1fb162[_0x7e9b('0xf')][_0x7e9b('0x10')]);return _0x223c70(_0x1fb162[_0x7e9b('0xf')][_0x7e9b('0x10')]);}else{logger['info']('VoiceMusicOnHold,\x20%s,\x20%s',_0x17cbc9,_0x7e9b('0xc'));_0x223c70(_0x1fb162[_0x7e9b('0x11')]['message']);}})[_0x7e9b('0x12')](function(_0x36ca2e){logger[_0x7e9b('0xf')](_0x7e9b('0xb'),_0x17cbc9,_0x36ca2e);_0x580c9d(_0x36ca2e);});});}
\ No newline at end of file
diff --git a/server/api/voicePrefix/index.js b/server/api/voicePrefix/index.js
index c8b9c75..7465c9d 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 _0xb4f7=['getAgents','create','post','addAgents','put','/:id','update','delete','destroy','removeAgents','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/describe','describe','show','/:id/users'];(function(_0x250962,_0x36e196){var _0x255945=function(_0x205b93){while(--_0x205b93){_0x250962['push'](_0x250962['shift']());}};_0x255945(++_0x36e196);}(_0xb4f7,0x1ab));var _0x7b4f=function(_0x128576,_0x12e43b){_0x128576=_0x128576-0x0;var _0x194603=_0xb4f7[_0x128576];return _0x194603;};'use strict';var multer=require(_0x7b4f('0x0'));var util=require(_0x7b4f('0x1'));var path=require(_0x7b4f('0x2'));var timeout=require(_0x7b4f('0x3'));var express=require(_0x7b4f('0x4'));var router=express[_0x7b4f('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x7b4f('0x6'));var config=require(_0x7b4f('0x7'));var controller=require('./voicePrefix.controller');router['get']('/',auth[_0x7b4f('0x8')](),controller[_0x7b4f('0x9')]);router[_0x7b4f('0xa')](_0x7b4f('0xb'),auth[_0x7b4f('0x8')](),controller[_0x7b4f('0xc')]);router['get']('/:id',auth[_0x7b4f('0x8')](),controller[_0x7b4f('0xd')]);router[_0x7b4f('0xa')](_0x7b4f('0xe'),auth[_0x7b4f('0x8')](),controller[_0x7b4f('0xf')]);router['post']('/',auth[_0x7b4f('0x8')](),controller[_0x7b4f('0x10')]);router[_0x7b4f('0x11')](_0x7b4f('0xe'),auth[_0x7b4f('0x8')](),controller[_0x7b4f('0x12')]);router[_0x7b4f('0x13')](_0x7b4f('0x14'),auth['isAuthenticated'](),controller[_0x7b4f('0x15')]);router[_0x7b4f('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7b4f('0x17')]);router[_0x7b4f('0x16')](_0x7b4f('0xe'),auth[_0x7b4f('0x8')](),controller[_0x7b4f('0x18')]);module[_0x7b4f('0x19')]=router;
\ No newline at end of file
+var _0x1b13=['update','delete','exports','util','path','connect-timeout','Router','../../components/interaction/service','get','isAuthenticated','/describe','describe','/:id','show','/:id/users','getAgents','post','create','addAgents','put'];(function(_0x33b685,_0x43e6f4){var _0x1d11ee=function(_0x1b26d2){while(--_0x1b26d2){_0x33b685['push'](_0x33b685['shift']());}};_0x1d11ee(++_0x43e6f4);}(_0x1b13,0x1a7));var _0x31b1=function(_0x164c2b,_0x180db3){_0x164c2b=_0x164c2b-0x0;var _0x3b11f4=_0x1b13[_0x164c2b];return _0x3b11f4;};'use strict';var multer=require('multer');var util=require(_0x31b1('0x0'));var path=require(_0x31b1('0x1'));var timeout=require(_0x31b1('0x2'));var express=require('express');var router=express[_0x31b1('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0x31b1('0x4'));var config=require('../../config/environment');var controller=require('./voicePrefix.controller');router[_0x31b1('0x5')]('/',auth[_0x31b1('0x6')](),controller['index']);router['get'](_0x31b1('0x7'),auth[_0x31b1('0x6')](),controller[_0x31b1('0x8')]);router[_0x31b1('0x5')](_0x31b1('0x9'),auth['isAuthenticated'](),controller[_0x31b1('0xa')]);router[_0x31b1('0x5')](_0x31b1('0xb'),auth[_0x31b1('0x6')](),controller[_0x31b1('0xc')]);router[_0x31b1('0xd')]('/',auth[_0x31b1('0x6')](),controller[_0x31b1('0xe')]);router[_0x31b1('0xd')]('/:id/users',auth[_0x31b1('0x6')](),controller[_0x31b1('0xf')]);router[_0x31b1('0x10')](_0x31b1('0x9'),auth[_0x31b1('0x6')](),controller[_0x31b1('0x11')]);router[_0x31b1('0x12')](_0x31b1('0x9'),auth[_0x31b1('0x6')](),controller['destroy']);router[_0x31b1('0x12')](_0x31b1('0xb'),auth[_0x31b1('0x6')](),controller['removeAgents']);module[_0x31b1('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.attributes.js b/server/api/voicePrefix/voicePrefix.attributes.js
index 9f49f75..150c809 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 _0xbdb5=['STRING','name','VIRTUAL','system-','INTEGER','sequelize','exports'];(function(_0x422a51,_0x1782d8){var _0x250b2a=function(_0x586d4a){while(--_0x586d4a){_0x422a51['push'](_0x422a51['shift']());}};_0x250b2a(++_0x1782d8);}(_0xbdb5,0x132));var _0x5bdb=function(_0x31846b,_0x558363){_0x31846b=_0x31846b-0x0;var _0x2e17f5=_0xbdb5[_0x31846b];return _0x2e17f5;};'use strict';var Sequelize=require(_0x5bdb('0x0'));module[_0x5bdb('0x1')]={'name':{'type':Sequelize[_0x5bdb('0x2')],'allowNull':![],'unique':_0x5bdb('0x3')},'prefix':{'type':Sequelize[_0x5bdb('0x4')],'get':function(_0x2c378d){return _0x5bdb('0x5')+this['getDataValue']('name')+'-';}},'description':{'type':Sequelize[_0x5bdb('0x2')]},'callerIdAll':{'type':Sequelize[_0x5bdb('0x2')]},'VoiceExtensionId':{'type':Sequelize[_0x5bdb('0x6')]}};
\ No newline at end of file
+var _0x2cc0=['sequelize','exports','STRING','name','VIRTUAL'];(function(_0x3bb83a,_0x575118){var _0x53f8a2=function(_0x2edfd2){while(--_0x2edfd2){_0x3bb83a['push'](_0x3bb83a['shift']());}};_0x53f8a2(++_0x575118);}(_0x2cc0,0xc3));var _0x02cc=function(_0x4170a3,_0x55e28e){_0x4170a3=_0x4170a3-0x0;var _0x575a80=_0x2cc0[_0x4170a3];return _0x575a80;};'use strict';var Sequelize=require(_0x02cc('0x0'));module[_0x02cc('0x1')]={'name':{'type':Sequelize[_0x02cc('0x2')],'allowNull':![],'unique':_0x02cc('0x3')},'prefix':{'type':Sequelize[_0x02cc('0x4')],'get':function(_0x228f32){return'system-'+this['getDataValue']('name')+'-';}},'description':{'type':Sequelize[_0x02cc('0x2')]},'callerIdAll':{'type':Sequelize[_0x02cc('0x2')]},'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 3b50588..29044f3 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 _0x4aa1=['VoicePrefixId','VoiceExtension','VoiceExtensionId','bulkCreate','Extensions\x20creation\x20failed','push','Set','CDR(prefix)=','callerIdAll','NoOp','No\x20callerid\x20available','${EXTEN:','charAt','system-','addAgents','omit','ids','emit','userVoicePrefix:save','removeAgents','isArray','userVoicePrefix:remove','findOne','User','getAgents','html-pdf','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','localhost','socket.io-emitter','redis','./voicePrefix.socket','sendStatus','status','end','json','count','offset','Content-Range','apply','reject','save','update','destroy','then','VoicePrefixes','UserProfileResource','error','stack','name','index','map','VoicePrefix','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','limit','order','sort','where','pick','filter','merge','options','includeAll','findAll','rows','catch','show','params','length','include','find','describe','create','sequelize','transaction','body','get','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','from-sip','system','description','Voice\x20Prefix\x20Extension','appdata','prefix'];(function(_0x34843e,_0x4c4224){var _0x598f7f=function(_0x12a44c){while(--_0x12a44c){_0x34843e['push'](_0x34843e['shift']());}};_0x598f7f(++_0x4c4224);}(_0x4aa1,0x17b));var _0x14aa=function(_0x15ae6c,_0x261025){_0x15ae6c=_0x15ae6c-0x0;var _0x57c357=_0x4aa1[_0x15ae6c];return _0x57c357;};'use strict';var pdf=require(_0x14aa('0x0'));var emlformat=require(_0x14aa('0x1'));var rimraf=require(_0x14aa('0x2'));var zipdir=require(_0x14aa('0x3'));var jsonpatch=require('fast-json-patch');var rp=require(_0x14aa('0x4'));var moment=require(_0x14aa('0x5'));var BPromise=require(_0x14aa('0x6'));var Mustache=require('mustache');var util=require(_0x14aa('0x7'));var path=require(_0x14aa('0x8'));var sox=require('sox');var csv=require(_0x14aa('0x9'));var ejs=require(_0x14aa('0xa'));var fs=require('fs');var _=require(_0x14aa('0xb'));var squel=require(_0x14aa('0xc'));var crypto=require(_0x14aa('0xd'));var jsforce=require(_0x14aa('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x14aa('0xf'));var Papa=require(_0x14aa('0x10'));var Redis=require('ioredis');var authService=require(_0x14aa('0x11'));var qs=require(_0x14aa('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x14aa('0x13'));var logger=require(_0x14aa('0x14'))('api');var utils=require(_0x14aa('0x15'));var config=require('../../config/environment');var db=require(_0x14aa('0x16'))['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x14aa('0x17'),'port':0x18eb});var socket=require(_0x14aa('0x18'))(new Redis(config[_0x14aa('0x19')]));require(_0x14aa('0x1a'))['register'](socket);function respondWithStatusCode(_0x2a342d,_0x2d7402){_0x2d7402=_0x2d7402||0xcc;return function(_0x31380c){if(_0x31380c){return _0x2a342d[_0x14aa('0x1b')](_0x2d7402);}return _0x2a342d[_0x14aa('0x1c')](_0x2d7402)[_0x14aa('0x1d')]();};}function respondWithResult(_0x749cb3,_0x2ff629){_0x2ff629=_0x2ff629||0xc8;return function(_0x29a72f){if(_0x29a72f){return _0x749cb3['status'](_0x2ff629)[_0x14aa('0x1e')](_0x29a72f);}};}function respondWithFilteredResult(_0x3e0099,_0x1f5fab){return function(_0x5a2414){if(_0x5a2414){var _0x5dd180=_0x5a2414[_0x14aa('0x1f')],_0x1c5d51=_0x1f5fab[_0x14aa('0x20')],_0x28a863=_0x1f5fab[_0x14aa('0x20')]+_0x1f5fab['limit'],_0x48c5d4;if(_0x28a863>=_0x5dd180){_0x28a863=_0x5dd180;_0x48c5d4=0xc8;}else{_0x48c5d4=0xce;}_0x3e0099[_0x14aa('0x1c')](_0x48c5d4);return _0x3e0099['set'](_0x14aa('0x21'),_0x1c5d51+'-'+_0x28a863+'/'+_0x5dd180)[_0x14aa('0x1e')](_0x5a2414);}return null;};}function patchUpdates(_0x564342){return function(_0x555725){try{jsonpatch[_0x14aa('0x22')](_0x555725,_0x564342,!![]);}catch(_0x1ec531){return BPromise[_0x14aa('0x23')](_0x1ec531);}return _0x555725[_0x14aa('0x24')]();};}function saveUpdates(_0x19ec63,_0x5863fc){return function(_0x3d2449){if(_0x3d2449){return _0x3d2449[_0x14aa('0x25')](_0x19ec63)['then'](function(_0x394d80){return _0x394d80;});}return null;};}function removeEntity(_0x2c52b3,_0x316106){return function(_0x43dd47){if(_0x43dd47){return _0x43dd47[_0x14aa('0x26')]()[_0x14aa('0x27')](function(){var _0xb39ff7=_0x43dd47['get']({'plain':!![]});var _0x1d0889=_0x14aa('0x28');return db[_0x14aa('0x29')]['destroy']({'where':{'type':_0x1d0889,'resourceId':_0xb39ff7['id']}})[_0x14aa('0x27')](function(){return _0x43dd47;});})[_0x14aa('0x27')](function(){_0x2c52b3[_0x14aa('0x1c')](0xcc)[_0x14aa('0x1d')]();});}};}function handleEntityNotFound(_0x37c6e0,_0x208e7c){return function(_0x14375f){if(!_0x14375f){_0x37c6e0[_0x14aa('0x1b')](0x194);}return _0x14375f;};}function handleError(_0x3a40ed,_0x1aeca9){_0x1aeca9=_0x1aeca9||0x1f4;return function(_0x2a6b3b){logger[_0x14aa('0x2a')](_0x2a6b3b[_0x14aa('0x2b')]);if(_0x2a6b3b[_0x14aa('0x2c')]){delete _0x2a6b3b[_0x14aa('0x2c')];}_0x3a40ed[_0x14aa('0x1c')](_0x1aeca9)['send'](_0x2a6b3b);};}exports[_0x14aa('0x2d')]=function(_0x3c85c5,_0x49708e){var _0x26979b={},_0x2168d7={},_0xe0c534={'count':0x0,'rows':[]};var _0x191f2c=_[_0x14aa('0x2e')](db[_0x14aa('0x2f')][_0x14aa('0x30')],function(_0x1e86e7){return{'name':_0x1e86e7['fieldName'],'type':_0x1e86e7['type'][_0x14aa('0x31')]};});_0x2168d7[_0x14aa('0x32')]=_[_0x14aa('0x2e')](_0x191f2c,'name');_0x2168d7[_0x14aa('0x33')]=_[_0x14aa('0x34')](_0x3c85c5['query']);_0x2168d7[_0x14aa('0x35')]=_[_0x14aa('0x36')](_0x2168d7['model'],_0x2168d7['query']);_0x26979b[_0x14aa('0x37')]=_[_0x14aa('0x36')](_0x2168d7[_0x14aa('0x32')],qs['fields'](_0x3c85c5['query'][_0x14aa('0x38')]));_0x26979b[_0x14aa('0x37')]=_0x26979b[_0x14aa('0x37')]['length']?_0x26979b[_0x14aa('0x37')]:_0x2168d7['model'];if(!_0x3c85c5['query'][_0x14aa('0x39')]('nolimit')){_0x26979b[_0x14aa('0x3a')]=qs[_0x14aa('0x3a')](_0x3c85c5['query'][_0x14aa('0x3a')]);_0x26979b[_0x14aa('0x20')]=qs[_0x14aa('0x20')](_0x3c85c5[_0x14aa('0x33')][_0x14aa('0x20')]);}_0x26979b[_0x14aa('0x3b')]=qs[_0x14aa('0x3c')](_0x3c85c5[_0x14aa('0x33')]['sort']);_0x26979b[_0x14aa('0x3d')]=qs[_0x14aa('0x35')](_[_0x14aa('0x3e')](_0x3c85c5['query'],_0x2168d7['filters']));if(_0x3c85c5[_0x14aa('0x33')]['filter']){_0x26979b['where']=_['merge'](_0x26979b['where'],{'$or':_['map'](_0x191f2c,function(_0x50d3a2){if(_0x50d3a2['type']!=='VIRTUAL'){var _0x48e61d={};_0x48e61d[_0x50d3a2[_0x14aa('0x2c')]]={'$like':'%'+_0x3c85c5[_0x14aa('0x33')][_0x14aa('0x3f')]+'%'};return _0x48e61d;}})});}_0x26979b=_[_0x14aa('0x40')]({},_0x26979b,_0x3c85c5[_0x14aa('0x41')]);var _0x3a01a0={'where':_0x26979b[_0x14aa('0x3d')]};return db[_0x14aa('0x2f')][_0x14aa('0x1f')](_0x3a01a0)[_0x14aa('0x27')](function(_0x207d25){_0xe0c534['count']=_0x207d25;if(_0x3c85c5[_0x14aa('0x33')][_0x14aa('0x42')]){_0x26979b['include']=[{'all':!![]}];}return db[_0x14aa('0x2f')][_0x14aa('0x43')](_0x26979b);})['then'](function(_0x4168b2){_0xe0c534[_0x14aa('0x44')]=_0x4168b2;return _0xe0c534;})[_0x14aa('0x27')](respondWithFilteredResult(_0x49708e,_0x26979b))[_0x14aa('0x45')](handleError(_0x49708e,null));};exports[_0x14aa('0x46')]=function(_0x55dc88,_0x10279a){var _0x5594f9={'raw':![],'where':{'id':_0x55dc88[_0x14aa('0x47')]['id']}},_0x4e496a={};_0x4e496a['model']=_[_0x14aa('0x34')](db[_0x14aa('0x2f')][_0x14aa('0x30')]);_0x4e496a['query']=_['keys'](_0x55dc88[_0x14aa('0x33')]);_0x4e496a[_0x14aa('0x35')]=_['intersection'](_0x4e496a['model'],_0x4e496a['query']);_0x5594f9[_0x14aa('0x37')]=_[_0x14aa('0x36')](_0x4e496a[_0x14aa('0x32')],qs[_0x14aa('0x38')](_0x55dc88[_0x14aa('0x33')][_0x14aa('0x38')]));_0x5594f9[_0x14aa('0x37')]=_0x5594f9['attributes'][_0x14aa('0x48')]?_0x5594f9[_0x14aa('0x37')]:_0x4e496a['model'];if(_0x55dc88[_0x14aa('0x33')][_0x14aa('0x42')]){_0x5594f9[_0x14aa('0x49')]=[{'all':!![]}];}_0x5594f9=_[_0x14aa('0x40')]({},_0x5594f9,_0x55dc88['options']);return db['VoicePrefix'][_0x14aa('0x4a')](_0x5594f9)[_0x14aa('0x27')](handleEntityNotFound(_0x10279a,null))[_0x14aa('0x27')](respondWithResult(_0x10279a,null))[_0x14aa('0x45')](handleError(_0x10279a,null));};exports['destroy']=function(_0x1fd788,_0x582340){return db['VoicePrefix']['find']({'where':{'id':_0x1fd788[_0x14aa('0x47')]['id']}})[_0x14aa('0x27')](handleEntityNotFound(_0x582340,null))['then'](removeEntity(_0x582340,null))[_0x14aa('0x45')](handleError(_0x582340,null));};exports['describe']=function(_0xf6ad90,_0xc40277){return db[_0x14aa('0x2f')][_0x14aa('0x4b')]()['then'](respondWithResult(_0xc40277,null))['catch'](handleError(_0xc40277,null));};exports[_0x14aa('0x4c')]=function(_0x5216a7,_0x7b05cf){var _0x13672b;return db[_0x14aa('0x4d')][_0x14aa('0x4e')](function(_0x3e26f5){return db[_0x14aa('0x2f')][_0x14aa('0x4c')](_0x5216a7[_0x14aa('0x4f')],{'transaction':_0x3e26f5})[_0x14aa('0x27')](function(_0x35d5a3){_0x13672b=_0x35d5a3[_0x14aa('0x50')]({'plain':!![]});return db['VoiceExtension']['find']({'where':{'id':_0x13672b['VoiceExtensionId']},'raw':!![]})[_0x14aa('0x27')](function(_0x506aff){return createVoicePrefixExtensions(_0x13672b,_0x506aff,_0x3e26f5);});});})[_0x14aa('0x27')](function(){var _0x51bf76=_0x5216a7[_0x14aa('0x51')][_0x14aa('0x50')]({'plain':!![]});if(!_0x51bf76)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x51bf76['role']===_0x14aa('0x51')){var _0x5820ab=_0x13672b;return db[_0x14aa('0x52')][_0x14aa('0x4a')]({'where':{'name':_0x14aa('0x28'),'userProfileId':_0x51bf76[_0x14aa('0x53')]},'raw':!![]})['then'](function(_0x211fd7){if(_0x211fd7&&_0x211fd7[_0x14aa('0x54')]===0x0){return db[_0x14aa('0x29')]['create']({'name':_0x5820ab[_0x14aa('0x2c')],'resourceId':_0x5820ab['id'],'type':_0x211fd7[_0x14aa('0x2c')],'sectionId':_0x211fd7['id']},{})[_0x14aa('0x27')](function(){return _0x13672b;});}else{return _0x13672b;}})[_0x14aa('0x45')](function(_0x4fc425){logger['error'](_0x14aa('0x55'),_0x4fc425);throw _0x4fc425;});}return _0x13672b;})[_0x14aa('0x27')](respondWithResult(_0x7b05cf,null))['catch'](handleError(_0x7b05cf,null));};function Extension(_0x15f546,_0xa43596,_0x46f504,_0xa11c17){this[_0x14aa('0x56')]=_0x14aa('0x57');this['exten']=_0x15f546;this['app']=_0x46f504;this['type']=_0x14aa('0x58');this[_0x14aa('0x59')]=_0x14aa('0x5a');this['priority']=_0xa43596;this[_0x14aa('0x5b')]=_0xa11c17;}function createVoicePrefixExtensions(_0x779644,_0x25b79d,_0x36a11e){return new BPromise(function(_0x2e8951,_0x43535c){var _0x5f53f3=new Extension(formatPrefixName(_0x779644[_0x14aa('0x5c')]),0x1,'NoOp','Voice\x20Prefix');_0x5f53f3[_0x14aa('0x5d')]=_0x779644['id'];return db[_0x14aa('0x5e')]['create'](_0x5f53f3,{'transaction':_0x36a11e})['then'](function(_0x2a797e){var _0x7efa5c=_0x2a797e[_0x14aa('0x50')]({'plain':!![]});var _0x27f9b8=_[_0x14aa('0x2e')](addVoicePrefixExtensions(_0x779644,_0x25b79d),function(_0x55c61){_0x55c61[_0x14aa('0x5f')]=_0x7efa5c['id'];_0x55c61[_0x14aa('0x5d')]=_0x779644['id'];return _0x55c61;});return db[_0x14aa('0x5e')][_0x14aa('0x60')](_0x27f9b8,{'transaction':_0x36a11e})[_0x14aa('0x27')](function(_0x5df965){if(!_0x5df965){return _0x43535c(_0x14aa('0x61'));}else{return _0x2e8951(_0x5df965);}})[_0x14aa('0x45')](function(_0x215bc1){return _0x43535c(_0x215bc1);});});;});};function addVoicePrefixExtensions(_0x8117e1,_0xca875e){var _0x2ebf17=[];var _0x5c990a=formatPrefixName(_0x8117e1[_0x14aa('0x5c')]);_0x2ebf17[_0x14aa('0x62')](new Extension(_0x5c990a,0x2,_0x14aa('0x63'),_0x14aa('0x64')+_0x8117e1['name']));if(_0x8117e1['callerIdAll']){_0x2ebf17['push'](new Extension(_0x5c990a,0x3,'Set','PREFIX-CALLERIDALL='+_0x8117e1[_0x14aa('0x65')]));}else{_0x2ebf17['push'](new Extension(_0x5c990a,0x3,_0x14aa('0x66'),_0x14aa('0x67')));}_0x2ebf17[_0x14aa('0x62')](new Extension(_0x5c990a,0x4,'goto',_0xca875e['context']+','+_0x14aa('0x68')+(0x8+_0x8117e1[_0x14aa('0x2c')][_0x14aa('0x48')])+'}'+','+0x1));return _0x2ebf17;}function formatPrefixName(_0x4ffe69){var _0x161ec2='_';for(var _0x3c7255=0x0;_0x3c7255<_0x4ffe69[_0x14aa('0x48')];_0x3c7255++){if(_0x4ffe69[_0x14aa('0x69')](_0x3c7255)=='-'){_0x161ec2+=_0x4ffe69[_0x14aa('0x69')](_0x3c7255);}else{_0x161ec2+='['+_0x4ffe69['charAt'](_0x3c7255)+']';}}_0x161ec2+='.';return _0x161ec2;}exports[_0x14aa('0x25')]=function(_0x2bad53,_0x24297c,_0x5c7ade){var _0x4eb46=_0x2bad53[_0x14aa('0x4f')];_0x4eb46[_0x14aa('0x5c')]=_0x14aa('0x6a')+_0x4eb46['name']+'-';return db[_0x14aa('0x4d')][_0x14aa('0x4e')](function(_0x1ee83b){return db[_0x14aa('0x2f')]['update'](_0x4eb46,{'where':{'id':_0x4eb46['id']},'transaction':_0x1ee83b})[_0x14aa('0x27')](function(){return db[_0x14aa('0x5e')][_0x14aa('0x26')]({'where':{'VoicePrefixId':_0x4eb46['id']},'transaction':_0x1ee83b})['then'](function(){return db[_0x14aa('0x5e')][_0x14aa('0x4a')]({'where':{'id':_0x4eb46[_0x14aa('0x5f')]},'raw':!![]})['then'](function(_0x52a04f){return createVoicePrefixExtensions(_0x4eb46,_0x52a04f,_0x1ee83b);});});});})[_0x14aa('0x27')](function(){return db[_0x14aa('0x2f')]['findById'](_0x4eb46['id']);})['then'](respondWithResult(_0x24297c,null))[_0x14aa('0x45')](handleError(_0x24297c,null));};exports[_0x14aa('0x6b')]=function(_0x310e19,_0x102b2b,_0x2b30e3){return db[_0x14aa('0x2f')]['find']({'where':{'id':_0x310e19[_0x14aa('0x47')]['id']}})['then'](handleEntityNotFound(_0x102b2b,null))[_0x14aa('0x27')](function(_0x219117){if(_0x219117){return _0x219117['addAgents'](_0x310e19[_0x14aa('0x4f')]['ids'],_[_0x14aa('0x6c')](_0x310e19[_0x14aa('0x4f')],[_0x14aa('0x6d'),'id'])||{})['spread'](function(_0x47a982){for(var _0x360734=0x0;_0x360734<_0x310e19[_0x14aa('0x4f')][_0x14aa('0x6d')][_0x14aa('0x48')];_0x360734+=0x1){socket[_0x14aa('0x6e')](_0x14aa('0x6f'),{'UserId':_0x310e19[_0x14aa('0x4f')]['ids'][_0x360734],'VoicePrefixId':_0x310e19['params']['id']});}return _0x47a982;});}})[_0x14aa('0x27')](respondWithResult(_0x102b2b,null))['catch'](handleError(_0x102b2b,null));};exports[_0x14aa('0x70')]=function(_0x549e12,_0x266db8,_0x3b952e){return db[_0x14aa('0x2f')][_0x14aa('0x4a')]({'where':{'id':_0x549e12[_0x14aa('0x47')]['id']}})[_0x14aa('0x27')](handleEntityNotFound(_0x266db8,null))[_0x14aa('0x27')](function(_0x5b626b){if(_0x5b626b){return _0x5b626b['removeAgents'](_0x549e12['query'][_0x14aa('0x6d')])[_0x14aa('0x27')](function(){if(_[_0x14aa('0x71')](_0x549e12[_0x14aa('0x33')]['ids'])){for(var _0x16d848=0x0;_0x16d848<_0x549e12[_0x14aa('0x33')][_0x14aa('0x6d')][_0x14aa('0x48')];_0x16d848+=0x1){socket[_0x14aa('0x6e')](_0x14aa('0x72'),{'UserId':Number(_0x549e12['query'][_0x14aa('0x6d')][_0x16d848]),'VoicePrefixId':Number(_0x549e12['params']['id'])});}}else{socket[_0x14aa('0x6e')](_0x14aa('0x72'),{'UserId':Number(_0x549e12[_0x14aa('0x33')][_0x14aa('0x6d')]),'VoicePrefixId':Number(_0x549e12['params']['id'])});}});}})[_0x14aa('0x27')](respondWithStatusCode(_0x266db8,null))[_0x14aa('0x45')](handleError(_0x266db8,null));};exports['getAgents']=function(_0x4c3845,_0x246a07,_0x2c7cfa){var _0x3bce41={};var _0xfa7d4c={};var _0x453f32;var _0x54b898;return db[_0x14aa('0x2f')][_0x14aa('0x73')]({'where':{'id':_0x4c3845[_0x14aa('0x47')]['id']}})[_0x14aa('0x27')](handleEntityNotFound(_0x246a07,null))['then'](function(_0x3f8b59){if(_0x3f8b59){_0x453f32=_0x3f8b59;_0xfa7d4c[_0x14aa('0x32')]=_['keys'](db[_0x14aa('0x74')]['rawAttributes']);_0xfa7d4c[_0x14aa('0x33')]=_[_0x14aa('0x34')](_0x4c3845[_0x14aa('0x33')]);_0xfa7d4c['filters']=_[_0x14aa('0x36')](_0xfa7d4c[_0x14aa('0x32')],_0xfa7d4c[_0x14aa('0x33')]);_0x3bce41[_0x14aa('0x37')]=_[_0x14aa('0x36')](_0xfa7d4c[_0x14aa('0x32')],qs[_0x14aa('0x38')](_0x4c3845['query'][_0x14aa('0x38')]));_0x3bce41[_0x14aa('0x37')]=_0x3bce41[_0x14aa('0x37')]['length']?_0x3bce41['attributes']:_0xfa7d4c['model'];_0x3bce41['order']=qs[_0x14aa('0x3c')](_0x4c3845[_0x14aa('0x33')][_0x14aa('0x3c')]);_0x3bce41[_0x14aa('0x3d')]=qs['filters'](_['pick'](_0x4c3845[_0x14aa('0x33')],_0xfa7d4c[_0x14aa('0x35')]));if(_0x4c3845[_0x14aa('0x33')][_0x14aa('0x3f')]){_0x3bce41[_0x14aa('0x3d')]=_[_0x14aa('0x40')](_0x3bce41[_0x14aa('0x3d')],{'$or':_[_0x14aa('0x2e')](_0x3bce41[_0x14aa('0x37')],function(_0x158ddd){var _0x46cbf6={};_0x46cbf6[_0x158ddd]={'$like':'%'+_0x4c3845[_0x14aa('0x33')][_0x14aa('0x3f')]+'%'};return _0x46cbf6;})});}_0x3bce41=_[_0x14aa('0x40')]({},_0x3bce41,_0x4c3845[_0x14aa('0x41')]);return _0x453f32[_0x14aa('0x75')](_0x3bce41);}})['then'](function(_0x41a524){if(_0x41a524){_0x54b898=_0x41a524['length'];if(!_0x4c3845[_0x14aa('0x33')][_0x14aa('0x39')]('nolimit')){_0x3bce41[_0x14aa('0x3a')]=qs[_0x14aa('0x3a')](_0x4c3845['query'][_0x14aa('0x3a')]);_0x3bce41[_0x14aa('0x20')]=qs['offset'](_0x4c3845[_0x14aa('0x33')]['offset']);}return _0x453f32[_0x14aa('0x75')](_0x3bce41);}})[_0x14aa('0x27')](function(_0xdb63a8){if(_0xdb63a8){return _0xdb63a8?{'count':_0x54b898,'rows':_0xdb63a8}:null;}})[_0x14aa('0x27')](respondWithResult(_0x246a07,null))[_0x14aa('0x45')](handleError(_0x246a07,null));};
\ No newline at end of file
+var _0x5b83=['Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','from-sip','exten','system','description','priority','appdata','prefix','Voice\x20Prefix','VoicePrefixId','bulkCreate','Extensions\x20creation\x20failed','Set','CDR(prefix)=','callerIdAll','push','PREFIX-CALLERIDALL=','NoOp','No\x20callerid\x20available','goto','${EXTEN:','length','charAt','system-','addAgents','omit','ids','spread','emit','userVoicePrefix:save','removeAgents','isArray','userVoicePrefix:remove','getAgents','findOne','User','order','filter','nolimit','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','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','../../mysqldb','defaults','redis','localhost','socket.io-emitter','register','sendStatus','status','end','count','offset','limit','set','json','apply','reject','save','update','then','get','VoicePrefixes','destroy','error','stack','name','send','index','map','VoicePrefix','type','key','model','query','intersection','fields','attributes','hasOwnProperty','sort','where','filters','pick','merge','options','includeAll','include','findAll','catch','show','params','keys','rawAttributes','find','describe','create','sequelize','transaction','body','VoiceExtension','VoiceExtensionId','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','UserProfileResource'];(function(_0x548627,_0x4ec392){var _0x844a84=function(_0x2ffdd2){while(--_0x2ffdd2){_0x548627['push'](_0x548627['shift']());}};_0x844a84(++_0x4ec392);}(_0x5b83,0x12c));var _0x35b8=function(_0x4135b3,_0x238796){_0x4135b3=_0x4135b3-0x0;var _0x412b9b=_0x5b83[_0x4135b3];return _0x412b9b;};'use strict';var pdf=require(_0x35b8('0x0'));var emlformat=require(_0x35b8('0x1'));var rimraf=require(_0x35b8('0x2'));var zipdir=require(_0x35b8('0x3'));var jsonpatch=require(_0x35b8('0x4'));var rp=require(_0x35b8('0x5'));var moment=require(_0x35b8('0x6'));var BPromise=require(_0x35b8('0x7'));var Mustache=require(_0x35b8('0x8'));var util=require(_0x35b8('0x9'));var path=require(_0x35b8('0xa'));var sox=require('sox');var csv=require(_0x35b8('0xb'));var ejs=require(_0x35b8('0xc'));var fs=require('fs');var _=require(_0x35b8('0xd'));var squel=require('squel');var crypto=require(_0x35b8('0xe'));var jsforce=require(_0x35b8('0xf'));var deskjs=require(_0x35b8('0x10'));var toCsv=require(_0x35b8('0xb'));var querystring=require(_0x35b8('0x11'));var Papa=require(_0x35b8('0x12'));var Redis=require(_0x35b8('0x13'));var authService=require(_0x35b8('0x14'));var qs=require(_0x35b8('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x35b8('0x16'));var logger=require(_0x35b8('0x17'))(_0x35b8('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require(_0x35b8('0x19'))['db'];config['redis']=_[_0x35b8('0x1a')](config[_0x35b8('0x1b')],{'host':_0x35b8('0x1c'),'port':0x18eb});var socket=require(_0x35b8('0x1d'))(new Redis(config[_0x35b8('0x1b')]));require('./voicePrefix.socket')[_0x35b8('0x1e')](socket);function respondWithStatusCode(_0x59f367,_0x144c76){_0x144c76=_0x144c76||0xcc;return function(_0x1e2190){if(_0x1e2190){return _0x59f367[_0x35b8('0x1f')](_0x144c76);}return _0x59f367[_0x35b8('0x20')](_0x144c76)[_0x35b8('0x21')]();};}function respondWithResult(_0x482b24,_0x34653c){_0x34653c=_0x34653c||0xc8;return function(_0x4b13e3){if(_0x4b13e3){return _0x482b24[_0x35b8('0x20')](_0x34653c)['json'](_0x4b13e3);}};}function respondWithFilteredResult(_0x353bea,_0x43dbcb){return function(_0x1afecb){if(_0x1afecb){var _0x37dd99=_0x1afecb[_0x35b8('0x22')],_0x463fa9=_0x43dbcb[_0x35b8('0x23')],_0x5b7f10=_0x43dbcb[_0x35b8('0x23')]+_0x43dbcb[_0x35b8('0x24')],_0x338c1e;if(_0x5b7f10>=_0x37dd99){_0x5b7f10=_0x37dd99;_0x338c1e=0xc8;}else{_0x338c1e=0xce;}_0x353bea[_0x35b8('0x20')](_0x338c1e);return _0x353bea[_0x35b8('0x25')]('Content-Range',_0x463fa9+'-'+_0x5b7f10+'/'+_0x37dd99)[_0x35b8('0x26')](_0x1afecb);}return null;};}function patchUpdates(_0x2757a3){return function(_0xc873cb){try{jsonpatch[_0x35b8('0x27')](_0xc873cb,_0x2757a3,!![]);}catch(_0x2393e8){return BPromise[_0x35b8('0x28')](_0x2393e8);}return _0xc873cb[_0x35b8('0x29')]();};}function saveUpdates(_0x239007,_0x4784a1){return function(_0x449acb){if(_0x449acb){return _0x449acb[_0x35b8('0x2a')](_0x239007)[_0x35b8('0x2b')](function(_0x266df0){return _0x266df0;});}return null;};}function removeEntity(_0x2fba7c,_0x1bddbf){return function(_0x9a29a8){if(_0x9a29a8){return _0x9a29a8['destroy']()[_0x35b8('0x2b')](function(){var _0x57063b=_0x9a29a8[_0x35b8('0x2c')]({'plain':!![]});var _0x4c20c0=_0x35b8('0x2d');return db['UserProfileResource'][_0x35b8('0x2e')]({'where':{'type':_0x4c20c0,'resourceId':_0x57063b['id']}})[_0x35b8('0x2b')](function(){return _0x9a29a8;});})['then'](function(){_0x2fba7c[_0x35b8('0x20')](0xcc)[_0x35b8('0x21')]();});}};}function handleEntityNotFound(_0x154a32,_0x7e022f){return function(_0x3322b3){if(!_0x3322b3){_0x154a32[_0x35b8('0x1f')](0x194);}return _0x3322b3;};}function handleError(_0xf8db0,_0x37e0bd){_0x37e0bd=_0x37e0bd||0x1f4;return function(_0x21011b){logger[_0x35b8('0x2f')](_0x21011b[_0x35b8('0x30')]);if(_0x21011b[_0x35b8('0x31')]){delete _0x21011b[_0x35b8('0x31')];}_0xf8db0[_0x35b8('0x20')](_0x37e0bd)[_0x35b8('0x32')](_0x21011b);};}exports[_0x35b8('0x33')]=function(_0x44fd0a,_0x59db98){var _0x1a3767={},_0xc5c811={},_0x415226={'count':0x0,'rows':[]};var _0x1da053=_[_0x35b8('0x34')](db[_0x35b8('0x35')]['rawAttributes'],function(_0x4cc5f4){return{'name':_0x4cc5f4['fieldName'],'type':_0x4cc5f4[_0x35b8('0x36')][_0x35b8('0x37')]};});_0xc5c811[_0x35b8('0x38')]=_[_0x35b8('0x34')](_0x1da053,_0x35b8('0x31'));_0xc5c811[_0x35b8('0x39')]=_['keys'](_0x44fd0a[_0x35b8('0x39')]);_0xc5c811['filters']=_[_0x35b8('0x3a')](_0xc5c811[_0x35b8('0x38')],_0xc5c811[_0x35b8('0x39')]);_0x1a3767['attributes']=_['intersection'](_0xc5c811['model'],qs[_0x35b8('0x3b')](_0x44fd0a[_0x35b8('0x39')][_0x35b8('0x3b')]));_0x1a3767[_0x35b8('0x3c')]=_0x1a3767[_0x35b8('0x3c')]['length']?_0x1a3767[_0x35b8('0x3c')]:_0xc5c811[_0x35b8('0x38')];if(!_0x44fd0a['query'][_0x35b8('0x3d')]('nolimit')){_0x1a3767[_0x35b8('0x24')]=qs['limit'](_0x44fd0a[_0x35b8('0x39')][_0x35b8('0x24')]);_0x1a3767[_0x35b8('0x23')]=qs[_0x35b8('0x23')](_0x44fd0a[_0x35b8('0x39')][_0x35b8('0x23')]);}_0x1a3767['order']=qs[_0x35b8('0x3e')](_0x44fd0a[_0x35b8('0x39')][_0x35b8('0x3e')]);_0x1a3767[_0x35b8('0x3f')]=qs[_0x35b8('0x40')](_[_0x35b8('0x41')](_0x44fd0a[_0x35b8('0x39')],_0xc5c811['filters']));if(_0x44fd0a[_0x35b8('0x39')]['filter']){_0x1a3767[_0x35b8('0x3f')]=_[_0x35b8('0x42')](_0x1a3767['where'],{'$or':_[_0x35b8('0x34')](_0x1da053,function(_0x1fd931){if(_0x1fd931[_0x35b8('0x36')]!=='VIRTUAL'){var _0x4ab006={};_0x4ab006[_0x1fd931[_0x35b8('0x31')]]={'$like':'%'+_0x44fd0a['query']['filter']+'%'};return _0x4ab006;}})});}_0x1a3767=_[_0x35b8('0x42')]({},_0x1a3767,_0x44fd0a[_0x35b8('0x43')]);var _0x4baa77={'where':_0x1a3767[_0x35b8('0x3f')]};return db[_0x35b8('0x35')][_0x35b8('0x22')](_0x4baa77)[_0x35b8('0x2b')](function(_0x5cffe2){_0x415226[_0x35b8('0x22')]=_0x5cffe2;if(_0x44fd0a[_0x35b8('0x39')][_0x35b8('0x44')]){_0x1a3767[_0x35b8('0x45')]=[{'all':!![]}];}return db['VoicePrefix'][_0x35b8('0x46')](_0x1a3767);})['then'](function(_0xa1f01e){_0x415226['rows']=_0xa1f01e;return _0x415226;})[_0x35b8('0x2b')](respondWithFilteredResult(_0x59db98,_0x1a3767))[_0x35b8('0x47')](handleError(_0x59db98,null));};exports[_0x35b8('0x48')]=function(_0x4a5e31,_0x3a206a){var _0x22673d={'raw':![],'where':{'id':_0x4a5e31[_0x35b8('0x49')]['id']}},_0x3d9a15={};_0x3d9a15['model']=_[_0x35b8('0x4a')](db[_0x35b8('0x35')][_0x35b8('0x4b')]);_0x3d9a15[_0x35b8('0x39')]=_[_0x35b8('0x4a')](_0x4a5e31[_0x35b8('0x39')]);_0x3d9a15[_0x35b8('0x40')]=_[_0x35b8('0x3a')](_0x3d9a15[_0x35b8('0x38')],_0x3d9a15[_0x35b8('0x39')]);_0x22673d[_0x35b8('0x3c')]=_[_0x35b8('0x3a')](_0x3d9a15[_0x35b8('0x38')],qs['fields'](_0x4a5e31[_0x35b8('0x39')][_0x35b8('0x3b')]));_0x22673d[_0x35b8('0x3c')]=_0x22673d[_0x35b8('0x3c')]['length']?_0x22673d[_0x35b8('0x3c')]:_0x3d9a15[_0x35b8('0x38')];if(_0x4a5e31[_0x35b8('0x39')][_0x35b8('0x44')]){_0x22673d[_0x35b8('0x45')]=[{'all':!![]}];}_0x22673d=_[_0x35b8('0x42')]({},_0x22673d,_0x4a5e31[_0x35b8('0x43')]);return db[_0x35b8('0x35')][_0x35b8('0x4c')](_0x22673d)[_0x35b8('0x2b')](handleEntityNotFound(_0x3a206a,null))[_0x35b8('0x2b')](respondWithResult(_0x3a206a,null))['catch'](handleError(_0x3a206a,null));};exports[_0x35b8('0x2e')]=function(_0x5da898,_0x1208db){return db['VoicePrefix'][_0x35b8('0x4c')]({'where':{'id':_0x5da898[_0x35b8('0x49')]['id']}})[_0x35b8('0x2b')](handleEntityNotFound(_0x1208db,null))['then'](removeEntity(_0x1208db,null))['catch'](handleError(_0x1208db,null));};exports[_0x35b8('0x4d')]=function(_0x15a84b,_0x264c53){return db[_0x35b8('0x35')]['describe']()[_0x35b8('0x2b')](respondWithResult(_0x264c53,null))[_0x35b8('0x47')](handleError(_0x264c53,null));};exports[_0x35b8('0x4e')]=function(_0x52c217,_0x1a044){var _0x183994;return db[_0x35b8('0x4f')][_0x35b8('0x50')](function(_0x4ffb6d){return db[_0x35b8('0x35')][_0x35b8('0x4e')](_0x52c217[_0x35b8('0x51')],{'transaction':_0x4ffb6d})['then'](function(_0x59debd){_0x183994=_0x59debd[_0x35b8('0x2c')]({'plain':!![]});return db[_0x35b8('0x52')]['find']({'where':{'id':_0x183994[_0x35b8('0x53')]},'raw':!![]})[_0x35b8('0x2b')](function(_0x3a5af0){return createVoicePrefixExtensions(_0x183994,_0x3a5af0,_0x4ffb6d);});});})[_0x35b8('0x2b')](function(){var _0xc13ab=_0x52c217[_0x35b8('0x54')]['get']({'plain':!![]});if(!_0xc13ab)throw new Error(_0x35b8('0x55'));if(_0xc13ab[_0x35b8('0x56')]===_0x35b8('0x54')){var _0x1c6d60=_0x183994;return db['UserProfileSection']['find']({'where':{'name':_0x35b8('0x2d'),'userProfileId':_0xc13ab[_0x35b8('0x57')]},'raw':!![]})[_0x35b8('0x2b')](function(_0x28ace6){if(_0x28ace6&&_0x28ace6[_0x35b8('0x58')]===0x0){return db[_0x35b8('0x59')][_0x35b8('0x4e')]({'name':_0x1c6d60['name'],'resourceId':_0x1c6d60['id'],'type':_0x28ace6['name'],'sectionId':_0x28ace6['id']},{})['then'](function(){return _0x183994;});}else{return _0x183994;}})[_0x35b8('0x47')](function(_0x49cc23){logger[_0x35b8('0x2f')](_0x35b8('0x5a'),_0x49cc23);throw _0x49cc23;});}return _0x183994;})[_0x35b8('0x2b')](respondWithResult(_0x1a044,null))['catch'](handleError(_0x1a044,null));};function Extension(_0x3b7eec,_0x1361a3,_0x21b87f,_0x3c96e8){this[_0x35b8('0x5b')]=_0x35b8('0x5c');this[_0x35b8('0x5d')]=_0x3b7eec;this['app']=_0x21b87f;this[_0x35b8('0x36')]=_0x35b8('0x5e');this[_0x35b8('0x5f')]='Voice\x20Prefix\x20Extension';this[_0x35b8('0x60')]=_0x1361a3;this[_0x35b8('0x61')]=_0x3c96e8;}function createVoicePrefixExtensions(_0x21989d,_0x559c46,_0x517ffe){return new BPromise(function(_0x4289fc,_0x46510f){var _0x2b89ac=new Extension(formatPrefixName(_0x21989d[_0x35b8('0x62')]),0x1,'NoOp',_0x35b8('0x63'));_0x2b89ac[_0x35b8('0x64')]=_0x21989d['id'];return db[_0x35b8('0x52')][_0x35b8('0x4e')](_0x2b89ac,{'transaction':_0x517ffe})[_0x35b8('0x2b')](function(_0xc07338){var _0x8d9c=_0xc07338[_0x35b8('0x2c')]({'plain':!![]});var _0x28ae15=_[_0x35b8('0x34')](addVoicePrefixExtensions(_0x21989d,_0x559c46),function(_0x5e9986){_0x5e9986[_0x35b8('0x53')]=_0x8d9c['id'];_0x5e9986[_0x35b8('0x64')]=_0x21989d['id'];return _0x5e9986;});return db[_0x35b8('0x52')][_0x35b8('0x65')](_0x28ae15,{'transaction':_0x517ffe})['then'](function(_0x1bbecb){if(!_0x1bbecb){return _0x46510f(_0x35b8('0x66'));}else{return _0x4289fc(_0x1bbecb);}})[_0x35b8('0x47')](function(_0x124e0e){return _0x46510f(_0x124e0e);});});;});};function addVoicePrefixExtensions(_0x5275c6,_0x385811){var _0x3322e8=[];var _0x399510=formatPrefixName(_0x5275c6['prefix']);_0x3322e8['push'](new Extension(_0x399510,0x2,_0x35b8('0x67'),_0x35b8('0x68')+_0x5275c6['name']));if(_0x5275c6[_0x35b8('0x69')]){_0x3322e8[_0x35b8('0x6a')](new Extension(_0x399510,0x3,_0x35b8('0x67'),_0x35b8('0x6b')+_0x5275c6[_0x35b8('0x69')]));}else{_0x3322e8[_0x35b8('0x6a')](new Extension(_0x399510,0x3,_0x35b8('0x6c'),_0x35b8('0x6d')));}_0x3322e8['push'](new Extension(_0x399510,0x4,_0x35b8('0x6e'),_0x385811['context']+','+_0x35b8('0x6f')+(0x8+_0x5275c6[_0x35b8('0x31')][_0x35b8('0x70')])+'}'+','+0x1));return _0x3322e8;}function formatPrefixName(_0x1eb47c){var _0x7cbfa3='_';for(var _0x59b1a1=0x0;_0x59b1a1<_0x1eb47c[_0x35b8('0x70')];_0x59b1a1++){if(_0x1eb47c['charAt'](_0x59b1a1)=='-'){_0x7cbfa3+=_0x1eb47c[_0x35b8('0x71')](_0x59b1a1);}else{_0x7cbfa3+='['+_0x1eb47c['charAt'](_0x59b1a1)+']';}}_0x7cbfa3+='.';return _0x7cbfa3;}exports[_0x35b8('0x2a')]=function(_0x82b45f,_0x4289ea,_0x169eb6){var _0x21ab96=_0x82b45f['body'];_0x21ab96[_0x35b8('0x62')]=_0x35b8('0x72')+_0x21ab96[_0x35b8('0x31')]+'-';return db[_0x35b8('0x4f')]['transaction'](function(_0x59f886){return db[_0x35b8('0x35')][_0x35b8('0x2a')](_0x21ab96,{'where':{'id':_0x21ab96['id']},'transaction':_0x59f886})[_0x35b8('0x2b')](function(){return db[_0x35b8('0x52')]['destroy']({'where':{'VoicePrefixId':_0x21ab96['id']},'transaction':_0x59f886})[_0x35b8('0x2b')](function(){return db[_0x35b8('0x52')][_0x35b8('0x4c')]({'where':{'id':_0x21ab96['VoiceExtensionId']},'raw':!![]})[_0x35b8('0x2b')](function(_0x24c7a8){return createVoicePrefixExtensions(_0x21ab96,_0x24c7a8,_0x59f886);});});});})[_0x35b8('0x2b')](function(){return db['VoicePrefix']['findById'](_0x21ab96['id']);})[_0x35b8('0x2b')](respondWithResult(_0x4289ea,null))[_0x35b8('0x47')](handleError(_0x4289ea,null));};exports['addAgents']=function(_0xab66c7,_0x6b56be,_0x3cd116){return db['VoicePrefix'][_0x35b8('0x4c')]({'where':{'id':_0xab66c7[_0x35b8('0x49')]['id']}})[_0x35b8('0x2b')](handleEntityNotFound(_0x6b56be,null))[_0x35b8('0x2b')](function(_0x2a6ff0){if(_0x2a6ff0){return _0x2a6ff0[_0x35b8('0x73')](_0xab66c7['body']['ids'],_[_0x35b8('0x74')](_0xab66c7[_0x35b8('0x51')],[_0x35b8('0x75'),'id'])||{})[_0x35b8('0x76')](function(_0x35cfcf){for(var _0x3facdf=0x0;_0x3facdf<_0xab66c7[_0x35b8('0x51')][_0x35b8('0x75')][_0x35b8('0x70')];_0x3facdf+=0x1){socket[_0x35b8('0x77')](_0x35b8('0x78'),{'UserId':_0xab66c7[_0x35b8('0x51')]['ids'][_0x3facdf],'VoicePrefixId':_0xab66c7['params']['id']});}return _0x35cfcf;});}})[_0x35b8('0x2b')](respondWithResult(_0x6b56be,null))['catch'](handleError(_0x6b56be,null));};exports[_0x35b8('0x79')]=function(_0x47c2ad,_0x1d0b33,_0x22e3cb){return db[_0x35b8('0x35')][_0x35b8('0x4c')]({'where':{'id':_0x47c2ad[_0x35b8('0x49')]['id']}})[_0x35b8('0x2b')](handleEntityNotFound(_0x1d0b33,null))['then'](function(_0x505418){if(_0x505418){return _0x505418[_0x35b8('0x79')](_0x47c2ad[_0x35b8('0x39')]['ids'])[_0x35b8('0x2b')](function(){if(_[_0x35b8('0x7a')](_0x47c2ad[_0x35b8('0x39')][_0x35b8('0x75')])){for(var _0xa1281d=0x0;_0xa1281d<_0x47c2ad[_0x35b8('0x39')][_0x35b8('0x75')][_0x35b8('0x70')];_0xa1281d+=0x1){socket[_0x35b8('0x77')](_0x35b8('0x7b'),{'UserId':Number(_0x47c2ad[_0x35b8('0x39')]['ids'][_0xa1281d]),'VoicePrefixId':Number(_0x47c2ad[_0x35b8('0x49')]['id'])});}}else{socket[_0x35b8('0x77')]('userVoicePrefix:remove',{'UserId':Number(_0x47c2ad[_0x35b8('0x39')]['ids']),'VoicePrefixId':Number(_0x47c2ad[_0x35b8('0x49')]['id'])});}});}})[_0x35b8('0x2b')](respondWithStatusCode(_0x1d0b33,null))[_0x35b8('0x47')](handleError(_0x1d0b33,null));};exports[_0x35b8('0x7c')]=function(_0x5d4463,_0x5909b3,_0x270722){var _0x9ae31c={};var _0x5b8e0b={};var _0x204b6b;var _0x2b76e1;return db[_0x35b8('0x35')][_0x35b8('0x7d')]({'where':{'id':_0x5d4463[_0x35b8('0x49')]['id']}})[_0x35b8('0x2b')](handleEntityNotFound(_0x5909b3,null))['then'](function(_0x178786){if(_0x178786){_0x204b6b=_0x178786;_0x5b8e0b['model']=_['keys'](db[_0x35b8('0x7e')][_0x35b8('0x4b')]);_0x5b8e0b[_0x35b8('0x39')]=_['keys'](_0x5d4463[_0x35b8('0x39')]);_0x5b8e0b[_0x35b8('0x40')]=_['intersection'](_0x5b8e0b['model'],_0x5b8e0b['query']);_0x9ae31c[_0x35b8('0x3c')]=_['intersection'](_0x5b8e0b[_0x35b8('0x38')],qs[_0x35b8('0x3b')](_0x5d4463[_0x35b8('0x39')][_0x35b8('0x3b')]));_0x9ae31c[_0x35b8('0x3c')]=_0x9ae31c[_0x35b8('0x3c')][_0x35b8('0x70')]?_0x9ae31c[_0x35b8('0x3c')]:_0x5b8e0b[_0x35b8('0x38')];_0x9ae31c[_0x35b8('0x7f')]=qs['sort'](_0x5d4463[_0x35b8('0x39')][_0x35b8('0x3e')]);_0x9ae31c['where']=qs['filters'](_[_0x35b8('0x41')](_0x5d4463[_0x35b8('0x39')],_0x5b8e0b[_0x35b8('0x40')]));if(_0x5d4463['query'][_0x35b8('0x80')]){_0x9ae31c['where']=_[_0x35b8('0x42')](_0x9ae31c[_0x35b8('0x3f')],{'$or':_[_0x35b8('0x34')](_0x9ae31c['attributes'],function(_0x16638e){var _0xcf65f8={};_0xcf65f8[_0x16638e]={'$like':'%'+_0x5d4463['query']['filter']+'%'};return _0xcf65f8;})});}_0x9ae31c=_[_0x35b8('0x42')]({},_0x9ae31c,_0x5d4463[_0x35b8('0x43')]);return _0x204b6b[_0x35b8('0x7c')](_0x9ae31c);}})[_0x35b8('0x2b')](function(_0x401a43){if(_0x401a43){_0x2b76e1=_0x401a43['length'];if(!_0x5d4463[_0x35b8('0x39')]['hasOwnProperty'](_0x35b8('0x81'))){_0x9ae31c['limit']=qs['limit'](_0x5d4463['query'][_0x35b8('0x24')]);_0x9ae31c[_0x35b8('0x23')]=qs[_0x35b8('0x23')](_0x5d4463[_0x35b8('0x39')][_0x35b8('0x23')]);}return _0x204b6b[_0x35b8('0x7c')](_0x9ae31c);}})[_0x35b8('0x2b')](function(_0x1f2f64){if(_0x1f2f64){return _0x1f2f64?{'count':_0x2b76e1,'rows':_0x1f2f64}:null;}})[_0x35b8('0x2b')](respondWithResult(_0x5909b3,null))[_0x35b8('0x47')](handleError(_0x5909b3,null));};
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.events.js b/server/api/voicePrefix/voicePrefix.events.js
index 35af130..666d49a 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(_0x31e5cb,_0x2f5adf){var _0x4170df=function(_0x31c53e){while(--_0x31c53e){_0x31e5cb['push'](_0x31e5cb['shift']());}};_0x4170df(++_0x2f5adf);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5e3b04,_0xbb6795){_0x5e3b04=_0x5e3b04-0x0;var _0x1fc44d=_0xa9e0[_0x5e3b04];return _0x1fc44d;};'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 _0xedd9=['../../mysqldb','VoicePrefix','setMaxListeners','save','update','remove','emit','hasOwnProperty','exports'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0xedd9,0xfc));var _0x9edd=function(_0x51945b,_0x24898a){_0x51945b=_0x51945b-0x0;var _0x4e7e2e=_0xedd9[_0x51945b];return _0x4e7e2e;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x9edd('0x0'))['db'][_0x9edd('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x9edd('0x2')](0x0);var events={'afterCreate':_0x9edd('0x3'),'afterUpdate':_0x9edd('0x4'),'afterDestroy':_0x9edd('0x5')};function emitEvent(_0x3e6d3a){return function(_0x36b53f,_0x5943b3,_0x33679f){VoicePrefixEvents[_0x9edd('0x6')](_0x3e6d3a+':'+_0x36b53f['id'],_0x36b53f);VoicePrefixEvents[_0x9edd('0x6')](_0x3e6d3a,_0x36b53f);_0x33679f(null);};}for(var e in events){if(events[_0x9edd('0x7')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0x9edd('0x8')]=VoicePrefixEvents;
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.model.js b/server/api/voicePrefix/voicePrefix.model.js
index 3ea4bd5..aba90ca 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 _0xe8c8=['rimraf','../../config/environment','./voicePrefix.attributes','define','VoicePrefix','voice_prefixes','lodash','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x2e25ef,_0xfcbec2){var _0x334958=function(_0x418d36){while(--_0x418d36){_0x2e25ef['push'](_0x2e25ef['shift']());}};_0x334958(++_0xfcbec2);}(_0xe8c8,0x1c0));var _0x8e8c=function(_0x35ae4a,_0x13cd92){_0x35ae4a=_0x35ae4a-0x0;var _0x5e3967=_0xe8c8[_0x35ae4a];return _0x5e3967;};'use strict';var _=require(_0x8e8c('0x0'));var util=require('util');var logger=require(_0x8e8c('0x1'))(_0x8e8c('0x2'));var moment=require(_0x8e8c('0x3'));var BPromise=require(_0x8e8c('0x4'));var rp=require(_0x8e8c('0x5'));var fs=require('fs');var path=require(_0x8e8c('0x6'));var rimraf=require(_0x8e8c('0x7'));var config=require(_0x8e8c('0x8'));var attributes=require(_0x8e8c('0x9'));module['exports']=function(_0x23e2a6,_0x51791e){return _0x23e2a6[_0x8e8c('0xa')](_0x8e8c('0xb'),attributes,{'tableName':_0x8e8c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb90f=['bluebird','request-promise','path','rimraf','../../config/environment','./voicePrefix.attributes','exports','define','voice_prefixes','lodash','util','../../config/logger','api'];(function(_0x1e9424,_0x191cba){var _0x1bd96c=function(_0x5e952d){while(--_0x5e952d){_0x1e9424['push'](_0x1e9424['shift']());}};_0x1bd96c(++_0x191cba);}(_0xb90f,0x71));var _0xfb90=function(_0x504ed5,_0x4b68c2){_0x504ed5=_0x504ed5-0x0;var _0xb29964=_0xb90f[_0x504ed5];return _0xb29964;};'use strict';var _=require(_0xfb90('0x0'));var util=require(_0xfb90('0x1'));var logger=require(_0xfb90('0x2'))(_0xfb90('0x3'));var moment=require('moment');var BPromise=require(_0xfb90('0x4'));var rp=require(_0xfb90('0x5'));var fs=require('fs');var path=require(_0xfb90('0x6'));var rimraf=require(_0xfb90('0x7'));var config=require(_0xfb90('0x8'));var attributes=require(_0xfb90('0x9'));module[_0xfb90('0xa')]=function(_0x3535cf,_0xd04888){return _0x3535cf[_0xfb90('0xb')]('VoicePrefix',attributes,{'tableName':_0xfb90('0xc'),'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 59a88a2..f1d4bb2 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 _0x723f=['randomstring','ioredis','rpc','../../config/environment','client','redis','defaults','localhost','./voicePrefix.socket','register','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','moment','bluebird'];(function(_0x5cef48,_0x4f4b95){var _0x2486c6=function(_0x4acbe3){while(--_0x4acbe3){_0x5cef48['push'](_0x5cef48['shift']());}};_0x2486c6(++_0x4f4b95);}(_0x723f,0x1bf));var _0xf723=function(_0x2091f5,_0x19352e){_0x2091f5=_0x2091f5-0x0;var _0x5af87e=_0x723f[_0x2091f5];return _0x5af87e;};'use strict';var _=require(_0xf723('0x0'));var util=require('util');var moment=require(_0xf723('0x1'));var BPromise=require(_0xf723('0x2'));var rs=require(_0xf723('0x3'));var fs=require('fs');var Redis=require(_0xf723('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xf723('0x5'));var config=require(_0xf723('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xf723('0x7')]['http']({'port':0x232a});config[_0xf723('0x8')]=_[_0xf723('0x9')](config['redis'],{'host':_0xf723('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf723('0x8')]));require(_0xf723('0xb'))[_0xf723('0xc')](socket);function respondWithRpcPromise(_0x9f09a9,_0x2ba253,_0x29dd68){return new BPromise(function(_0x3e27f1,_0x189636){return client[_0xf723('0xd')](_0x9f09a9,_0x29dd68)[_0xf723('0xe')](function(_0x147365){logger[_0xf723('0xf')](_0xf723('0x10'),_0x2ba253,_0xf723('0x11'));logger[_0xf723('0x12')](_0xf723('0x13'),_0x2ba253,'request\x20sent',JSON[_0xf723('0x14')](_0x147365));if(_0x147365[_0xf723('0x15')]){if(_0x147365[_0xf723('0x15')][_0xf723('0x16')]===0x1f4){logger['error'](_0xf723('0x10'),_0x2ba253,_0x147365[_0xf723('0x15')][_0xf723('0x17')]);return _0x189636(_0x147365[_0xf723('0x15')][_0xf723('0x17')]);}logger[_0xf723('0x15')](_0xf723('0x10'),_0x2ba253,_0x147365['error']['message']);return _0x3e27f1(_0x147365[_0xf723('0x15')]['message']);}else{logger[_0xf723('0xf')](_0xf723('0x10'),_0x2ba253,_0xf723('0x11'));_0x3e27f1(_0x147365[_0xf723('0x18')][_0xf723('0x17')]);}})['catch'](function(_0x422674){logger[_0xf723('0x15')](_0xf723('0x10'),_0x2ba253,_0x422674);_0x189636(_0x422674);});});}
\ No newline at end of file
+var _0xa699=['../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./voicePrefix.socket','then','VoicePrefix,\x20%s,\x20%s','request\x20sent','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x3a1972,_0x194511){var _0xc7e0b5=function(_0x465312){while(--_0x465312){_0x3a1972['push'](_0x3a1972['shift']());}};_0xc7e0b5(++_0x194511);}(_0xa699,0x132));var _0x9a69=function(_0x45e98e,_0x169b60){_0x45e98e=_0x45e98e-0x0;var _0x374dba=_0xa699[_0x45e98e];return _0x374dba;};'use strict';var _=require('lodash');var util=require(_0x9a69('0x0'));var moment=require(_0x9a69('0x1'));var BPromise=require(_0x9a69('0x2'));var rs=require(_0x9a69('0x3'));var fs=require('fs');var Redis=require(_0x9a69('0x4'));var db=require(_0x9a69('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x9a69('0x6'))(_0x9a69('0x7'));var config=require(_0x9a69('0x8'));var jayson=require(_0x9a69('0x9'));var client=jayson[_0x9a69('0xa')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x9a69('0xb')],{'host':_0x9a69('0xc'),'port':0x18eb});var socket=require(_0x9a69('0xd'))(new Redis(config[_0x9a69('0xb')]));require(_0x9a69('0xe'))['register'](socket);function respondWithRpcPromise(_0x20d3be,_0x31a2f2,_0x3bf42b){return new BPromise(function(_0x22eb7b,_0x2e739f){return client['request'](_0x20d3be,_0x3bf42b)[_0x9a69('0xf')](function(_0x34493f){logger['info'](_0x9a69('0x10'),_0x31a2f2,_0x9a69('0x11'));logger['debug'](_0x9a69('0x12'),_0x31a2f2,_0x9a69('0x11'),JSON[_0x9a69('0x13')](_0x34493f));if(_0x34493f[_0x9a69('0x14')]){if(_0x34493f[_0x9a69('0x14')]['code']===0x1f4){logger[_0x9a69('0x14')](_0x9a69('0x10'),_0x31a2f2,_0x34493f[_0x9a69('0x14')][_0x9a69('0x15')]);return _0x2e739f(_0x34493f[_0x9a69('0x14')][_0x9a69('0x15')]);}logger[_0x9a69('0x14')]('VoicePrefix,\x20%s,\x20%s',_0x31a2f2,_0x34493f[_0x9a69('0x14')][_0x9a69('0x15')]);return _0x22eb7b(_0x34493f[_0x9a69('0x14')][_0x9a69('0x15')]);}else{logger['info']('VoicePrefix,\x20%s,\x20%s',_0x31a2f2,_0x9a69('0x11'));_0x22eb7b(_0x34493f[_0x9a69('0x16')][_0x9a69('0x15')]);}})[_0x9a69('0x17')](function(_0x1a8ff2){logger['error'](_0x9a69('0x10'),_0x31a2f2,_0x1a8ff2);_0x2e739f(_0x1a8ff2);});});}
\ No newline at end of file
diff --git a/server/api/voicePrefix/voicePrefix.socket.js b/server/api/voicePrefix/voicePrefix.socket.js
index ffcb028..7e7b217 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 _0x1f2b=['remove','emit','removeListener','register','length','voicePrefix:','./voicePrefix.events'];(function(_0x1d1351,_0x3c6c2f){var _0x3859c2=function(_0x1bb0f5){while(--_0x1bb0f5){_0x1d1351['push'](_0x1d1351['shift']());}};_0x3859c2(++_0x3c6c2f);}(_0x1f2b,0xe6));var _0xb1f2=function(_0x1747a1,_0x3dbdb7){_0x1747a1=_0x1747a1-0x0;var _0x405bd2=_0x1f2b[_0x1747a1];return _0x405bd2;};'use strict';var VoicePrefixEvents=require(_0xb1f2('0x0'));var events=['save',_0xb1f2('0x1'),'update'];function createListener(_0x1ec34d,_0x3c6cea){return function(_0x153e1a){_0x3c6cea[_0xb1f2('0x2')](_0x1ec34d,_0x153e1a);};}function removeListener(_0x28c7e1,_0x137c47){return function(){VoicePrefixEvents[_0xb1f2('0x3')](_0x28c7e1,_0x137c47);};}exports[_0xb1f2('0x4')]=function(_0x26bb30){for(var _0x1dff97=0x0,_0x48e1a2=events[_0xb1f2('0x5')];_0x1dff97<_0x48e1a2;_0x1dff97++){var _0x271115=events[_0x1dff97];var _0x466565=createListener(_0xb1f2('0x6')+_0x271115,_0x26bb30);VoicePrefixEvents['on'](_0x271115,_0x466565);}};
\ No newline at end of file
+var _0x45e7=['voicePrefix:','save','remove','update','emit','removeListener','register','length'];(function(_0xf833e5,_0x5efcf6){var _0x1be74f=function(_0x1be51a){while(--_0x1be51a){_0xf833e5['push'](_0xf833e5['shift']());}};_0x1be74f(++_0x5efcf6);}(_0x45e7,0x169));var _0x745e=function(_0x69188b,_0x550923){_0x69188b=_0x69188b-0x0;var _0x3320f4=_0x45e7[_0x69188b];return _0x3320f4;};'use strict';var VoicePrefixEvents=require('./voicePrefix.events');var events=[_0x745e('0x0'),_0x745e('0x1'),_0x745e('0x2')];function createListener(_0xdd8af1,_0x53ed7d){return function(_0x1a04b8){_0x53ed7d[_0x745e('0x3')](_0xdd8af1,_0x1a04b8);};}function removeListener(_0x3db135,_0x3438bb){return function(){VoicePrefixEvents[_0x745e('0x4')](_0x3db135,_0x3438bb);};}exports[_0x745e('0x5')]=function(_0x4e03cc){for(var _0x128619=0x0,_0x5ad7f2=events[_0x745e('0x6')];_0x128619<_0x5ad7f2;_0x128619++){var _0x21a272=events[_0x128619];var _0x284899=createListener(_0x745e('0x7')+_0x21a272,_0x4e03cc);VoicePrefixEvents['on'](_0x21a272,_0x284899);}};
\ No newline at end of file
diff --git a/server/api/voiceQueue/index.js b/server/api/voiceQueue/index.js
index ff0543a..f0bb408 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 _0x2684=['../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','isAuthenticated','/:id','show','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','getHopperBlacks','/:id/teams','getTeams','/:id/users','getAgents','/:id/members','getMembers','/:id/blacklists','getBlackLists','create','post','/:id/clone','clone','addAgents','/:id/lists','addLists','addBlackLists','put','delete','removeAgents','removeLists','removeBlackLists','util','path'];(function(_0x743476,_0x4a6a2a){var _0x4f1a07=function(_0x55a04b){while(--_0x55a04b){_0x743476['push'](_0x743476['shift']());}};_0x4f1a07(++_0x4a6a2a);}(_0x2684,0xa8));var _0x4268=function(_0x396d44,_0x5f52e8){_0x396d44=_0x396d44-0x0;var _0x41b68c=_0x2684[_0x396d44];return _0x41b68c;};'use strict';var multer=require('multer');var util=require(_0x4268('0x0'));var path=require(_0x4268('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var interaction=require(_0x4268('0x2'));var config=require(_0x4268('0x3'));var controller=require(_0x4268('0x4'));router[_0x4268('0x5')]('/',auth[_0x4268('0x6')](),controller['index']);router[_0x4268('0x5')](_0x4268('0x7'),auth[_0x4268('0x6')](),controller[_0x4268('0x8')]);router[_0x4268('0x5')]('/:id/hoppers',auth[_0x4268('0x6')](),controller['getHoppers']);router['get'](_0x4268('0x9'),auth[_0x4268('0x6')](),controller['getHopperHistories']);router[_0x4268('0x5')](_0x4268('0xa'),auth[_0x4268('0x6')](),controller[_0x4268('0xb')]);router[_0x4268('0x5')]('/:id/hopper_black',auth[_0x4268('0x6')](),controller[_0x4268('0xc')]);router[_0x4268('0x5')](_0x4268('0xd'),auth[_0x4268('0x6')](),controller[_0x4268('0xe')]);router[_0x4268('0x5')](_0x4268('0xf'),auth[_0x4268('0x6')](),controller[_0x4268('0x10')]);router[_0x4268('0x5')](_0x4268('0x11'),auth[_0x4268('0x6')](),controller[_0x4268('0x12')]);router[_0x4268('0x5')]('/:id/lists',auth['isAuthenticated'](),controller['getLists']);router['get'](_0x4268('0x13'),auth['isAuthenticated'](),controller[_0x4268('0x14')]);router['post']('/',auth[_0x4268('0x6')](),controller[_0x4268('0x15')]);router[_0x4268('0x16')](_0x4268('0x17'),auth['isAuthenticated'](),controller[_0x4268('0x18')]);router[_0x4268('0x16')]('/:id/teams',auth[_0x4268('0x6')](),controller['addTeams']);router['post'](_0x4268('0xf'),auth[_0x4268('0x6')](),controller[_0x4268('0x19')]);router['post'](_0x4268('0x1a'),auth[_0x4268('0x6')](),controller[_0x4268('0x1b')]);router[_0x4268('0x16')](_0x4268('0x13'),auth[_0x4268('0x6')](),controller[_0x4268('0x1c')]);router[_0x4268('0x1d')](_0x4268('0x7'),auth[_0x4268('0x6')](),controller['update']);router[_0x4268('0x1e')](_0x4268('0x7'),auth[_0x4268('0x6')](),controller['destroy']);router['delete']('/:id/teams',auth['isAuthenticated'](),controller['removeTeams']);router['delete']('/:id/users',auth[_0x4268('0x6')](),controller[_0x4268('0x1f')]);router[_0x4268('0x1e')](_0x4268('0x1a'),auth[_0x4268('0x6')](),controller[_0x4268('0x20')]);router[_0x4268('0x1e')](_0x4268('0x13'),auth[_0x4268('0x6')](),controller[_0x4268('0x21')]);module['exports']=router;
\ No newline at end of file
+var _0xb46a=['multer','util','path','express','Router','isAuthenticated','index','get','show','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_black','getHopperBlacks','getTeams','/:id/users','getAgents','/:id/members','getMembers','/:id/lists','getLists','/:id/blacklists','getBlackLists','post','create','/:id/teams','addTeams','addAgents','addLists','put','update','delete','/:id','destroy','removeTeams','removeAgents','removeBlackLists','exports'];(function(_0x54b283,_0x5eb8a6){var _0x2462b3=function(_0x13fca7){while(--_0x13fca7){_0x54b283['push'](_0x54b283['shift']());}};_0x2462b3(++_0x5eb8a6);}(_0xb46a,0x130));var _0xab46=function(_0x742081,_0x73ca6e){_0x742081=_0x742081-0x0;var _0x53e59a=_0xb46a[_0x742081];return _0x53e59a;};'use strict';var multer=require(_0xab46('0x0'));var util=require(_0xab46('0x1'));var path=require(_0xab46('0x2'));var timeout=require('connect-timeout');var express=require(_0xab46('0x3'));var router=express[_0xab46('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./voiceQueue.controller');router['get']('/',auth[_0xab46('0x5')](),controller[_0xab46('0x6')]);router[_0xab46('0x7')]('/:id',auth['isAuthenticated'](),controller[_0xab46('0x8')]);router[_0xab46('0x7')](_0xab46('0x9'),auth[_0xab46('0x5')](),controller[_0xab46('0xa')]);router[_0xab46('0x7')](_0xab46('0xb'),auth['isAuthenticated'](),controller['getHopperHistories']);router['get']('/:id/hopper_finals',auth[_0xab46('0x5')](),controller['getHopperFinals']);router['get'](_0xab46('0xc'),auth[_0xab46('0x5')](),controller[_0xab46('0xd')]);router[_0xab46('0x7')]('/:id/teams',auth[_0xab46('0x5')](),controller[_0xab46('0xe')]);router[_0xab46('0x7')](_0xab46('0xf'),auth[_0xab46('0x5')](),controller[_0xab46('0x10')]);router[_0xab46('0x7')](_0xab46('0x11'),auth[_0xab46('0x5')](),controller[_0xab46('0x12')]);router['get'](_0xab46('0x13'),auth['isAuthenticated'](),controller[_0xab46('0x14')]);router[_0xab46('0x7')](_0xab46('0x15'),auth[_0xab46('0x5')](),controller[_0xab46('0x16')]);router[_0xab46('0x17')]('/',auth[_0xab46('0x5')](),controller[_0xab46('0x18')]);router[_0xab46('0x17')]('/:id/clone',auth[_0xab46('0x5')](),controller['clone']);router[_0xab46('0x17')](_0xab46('0x19'),auth[_0xab46('0x5')](),controller[_0xab46('0x1a')]);router['post'](_0xab46('0xf'),auth[_0xab46('0x5')](),controller[_0xab46('0x1b')]);router['post'](_0xab46('0x13'),auth[_0xab46('0x5')](),controller[_0xab46('0x1c')]);router[_0xab46('0x17')](_0xab46('0x15'),auth['isAuthenticated'](),controller['addBlackLists']);router[_0xab46('0x1d')]('/:id',auth['isAuthenticated'](),controller[_0xab46('0x1e')]);router[_0xab46('0x1f')](_0xab46('0x20'),auth['isAuthenticated'](),controller[_0xab46('0x21')]);router[_0xab46('0x1f')](_0xab46('0x19'),auth[_0xab46('0x5')](),controller[_0xab46('0x22')]);router[_0xab46('0x1f')](_0xab46('0xf'),auth['isAuthenticated'](),controller[_0xab46('0x23')]);router['delete'](_0xab46('0x13'),auth[_0xab46('0x5')](),controller['removeLists']);router[_0xab46('0x1f')]('/:id/blacklists',auth[_0xab46('0x5')](),controller[_0xab46('0x24')]);module[_0xab46('0x25')]=router;
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.attributes.js b/server/api/voiceQueue/voiceQueue.attributes.js
index 0c40103..851470e 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 _0xa9e0=['getDataValue','booked','roundrobin','progressive','predictive','power','INTEGER','yes','all','once','TEXT','periodic_announce','join','split','joinempty','leavewhenempty','acw','wrapuptime','BOOLEAN','Active/Disactive\x20Campaign','preview','Dial\x20Method.','UNSIGNED','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','Only\x20for\x20predictive\x20method.','FLOAT','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','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','onlyIfOpen','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','#RecallMe\x20Timeout\x20(min:1)','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','sequelize','exports','STRING','inbound','default','ENUM','leastrecent','fewestcalls','random','wrandom','setDataValue','strategy','rrmemory'];(function(_0x25b92e,_0x59e7d2){var _0x493b10=function(_0xca2749){while(--_0xca2749){_0x25b92e['push'](_0x25b92e['shift']());}};_0x493b10(++_0x59e7d2);}(_0xa9e0,0x123));var _0x0a9e=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xa9e0[_0x43d11d];return _0x38cd08;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x0a9e('0x3'),'outbound'),'allowNull':![],'defaultValue':_0x0a9e('0x3')},'musiconhold':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x4')},'announce':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':''},'strategy':{'type':Sequelize[_0x0a9e('0x5')]('rr','ringall',_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'rrmemory','linear',_0x0a9e('0x9'),'rrordered'),'allowNull':![],'defaultValue':'ringall','set':function(_0x39753a){this[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x39753a?_0x39753a:_0x0a9e('0xc'));},'get':function(){var _0xfeb75b=this[_0x0a9e('0xd')]('type');var _0x50dfb2=this['getDataValue']('dialMethod');var _0x273d4d=this[_0x0a9e('0xd')](_0x0a9e('0xb'));if(_0xfeb75b===_0x0a9e('0x3')){return _0x273d4d;}if(_0x50dfb2===_0x0a9e('0xe')&&_0x273d4d===_0x0a9e('0xc')||_0x50dfb2==='booked'&&_0x273d4d===_0x0a9e('0xf')){return _0x273d4d;}if(_0x50dfb2===_0x0a9e('0x10')||_0x50dfb2===_0x0a9e('0x11')||_0x50dfb2===_0x0a9e('0x12')){return _0x273d4d;}return null;}},'servicelevel':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize['INTEGER'](0xb)},'timeout':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x0a9e('0x2')]},'weight':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x0a9e('0x5')]('yes','no'),'defaultValue':_0x0a9e('0x14')},'autopause':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no',_0x0a9e('0x15')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x0a9e('0x13')](0xb)},'autopausebusy':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x0a9e('0x5')]('yes','no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':!![]},'membergosub':{'type':Sequelize['STRING'],'allowNull':!![]},'announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no'),'defaultValue':_0x0a9e('0x14')},'announce_holdtime':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no',_0x0a9e('0x16')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x0a9e('0x5')]('yes','no')},'announce_position_limit':{'type':Sequelize['INTEGER'](0xb)},'announce_round_seconds':{'type':Sequelize[_0x0a9e('0x5')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x0a9e('0x2')]},'queue_youarenext':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_thereare':{'type':Sequelize['STRING'],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_holdtime':{'type':Sequelize['STRING'],'defaultValue':null},'queue_minute':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize['STRING'],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x0a9e('0x2')]},'queue_quantity1':{'type':Sequelize[_0x0a9e('0x2')]},'queue_quantity2':{'type':Sequelize[_0x0a9e('0x2')]},'queue_periodic_announce':{'type':Sequelize[_0x0a9e('0x2')]},'queue_less_than':{'type':Sequelize[_0x0a9e('0x2')]},'periodic_announce':{'type':Sequelize[_0x0a9e('0x17')],'set':function(_0x5a101a){this[_0x0a9e('0xa')](_0x0a9e('0x18'),_0x5a101a?_0x5a101a[_0x0a9e('0x19')](','):[]);},'get':function(){return this[_0x0a9e('0xd')]('periodic_announce')?this[_0x0a9e('0xd')](_0x0a9e('0x18'))[_0x0a9e('0x1a')](','):[];}},'joinempty':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x14'),'set':function(_0x563b45){this[_0x0a9e('0xa')](_0x0a9e('0x1b'),_0x563b45?_0x563b45[_0x0a9e('0x19')](','):undefined);},'get':function(){return this['getDataValue'](_0x0a9e('0x1b'))?this['getDataValue'](_0x0a9e('0x1b'))[_0x0a9e('0x1a')](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':'no','set':function(_0x33bdb7){this[_0x0a9e('0xa')]('leavewhenempty',_0x33bdb7?_0x33bdb7[_0x0a9e('0x19')](','):undefined);},'get':function(){return this[_0x0a9e('0xd')](_0x0a9e('0x1c'))?this[_0x0a9e('0xd')](_0x0a9e('0x1c'))[_0x0a9e('0x1a')](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize[_0x0a9e('0x2')]},'acw':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'set':function(_0x191e91){this[_0x0a9e('0xa')](_0x0a9e('0x1d'),_0x191e91);if(_0x191e91){if(this[_0x0a9e('0xd')]('wrapuptime')<0x2){this['setDataValue'](_0x0a9e('0x1e'),0x2);}}}},'acwTimeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':0x0,'comment':_0x0a9e('0x20')},'dialMethod':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x21'),'progressive',_0x0a9e('0x12'),_0x0a9e('0x11'),_0x0a9e('0xe')),'defaultValue':'progressive','comment':_0x0a9e('0x22')},'dialLimitChannel':{'type':Sequelize[_0x0a9e('0x13')](0x4)[_0x0a9e('0x23')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20channels,\x200\x20means\x20unlimited.'},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0x0a9e('0x23')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x0a9e('0x24')},'dialPowerLevel':{'type':Sequelize['FLOAT'](0x2)[_0x0a9e('0x23')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x0a9e('0x25')},'dialPredictiveOptimization':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x26'),'dropRate'),'defaultValue':'dropRate','comment':_0x0a9e('0x27')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x0a9e('0x28')](0x2)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x0a9e('0x29')},'dialPredictiveInterval':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':'Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)'},'dialOriginateCallerIdName':{'type':Sequelize[_0x0a9e('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x0a9e('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x2a')},'dialQueueOptions':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x2b'),'comment':_0x0a9e('0x2c')},'dialQueueTimeout':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x2d')},'dialQueueProject':{'type':Sequelize[_0x0a9e('0x2')],'comment':_0x0a9e('0x2e')},'dialCongestionMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x2f')},'dialBusyMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x30')},'dialBusyRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x31')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'comment':_0x0a9e('0x32')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x33')},'dialGlobalMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x0a9e('0x34')},'dialTimezone':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x35')},'dialPrefix':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0x0a9e('0x36'),'never',_0x0a9e('0x37')),'defaultValue':_0x0a9e('0x36')},'dialAMDActive':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x0a9e('0x38')},'dialAMDGreeting':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x0a9e('0x39')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x0a9e('0x13')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x0a9e('0x3a')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0a9e('0x3b')},'dialAMDMinWordLength':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x0a9e('0x3c')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x0a9e('0x3d')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0a9e('0x3e')},'dialRecallMeTimeout':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x0a9e('0x3f')},'dialRecallInQueue':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':0x0,'comment':'Active/Disactive\x20Recall\x20In\x20Queue'},'dialOrderByScheduledAt':{'type':Sequelize['ENUM']('DESC',_0x0a9e('0x40')),'defaultValue':_0x0a9e('0x41')},'dialQueueProject2':{'type':Sequelize[_0x0a9e('0x2')],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)'},'dialAgiAfterHangupClient':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x0a9e('0x42')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x43')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x44')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x45')},'dialDropRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x46')},'dialAbandonedMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x47')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x48')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'mandatoryDispositionPauseId':{'type':Sequelize[_0x0a9e('0x13')],'allowNull':!![],'comment':_0x0a9e('0x49')},'mandatoryDisposition':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':![],'comment':_0x0a9e('0x4a'),'set':function(_0xb83dfd){if(!_0xb83dfd)this[_0x0a9e('0xa')]('mandatoryDispositionPauseId',null);this[_0x0a9e('0xa')](_0x0a9e('0x4b'),_0xb83dfd);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}}};
\ No newline at end of file
+var _0xa9e0=['getDataValue','booked','roundrobin','progressive','predictive','power','INTEGER','yes','all','once','TEXT','periodic_announce','join','split','joinempty','leavewhenempty','acw','wrapuptime','BOOLEAN','Active/Disactive\x20Campaign','preview','Dial\x20Method.','UNSIGNED','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','Only\x20for\x20predictive\x20method.','FLOAT','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','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','onlyIfOpen','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','#RecallMe\x20Timeout\x20(min:1)','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','sequelize','exports','STRING','inbound','default','ENUM','leastrecent','fewestcalls','random','wrandom','setDataValue','strategy','rrmemory'];(function(_0x4504a7,_0x563a15){var _0x1b3b76=function(_0xb0f30d){while(--_0xb0f30d){_0x4504a7['push'](_0x4504a7['shift']());}};_0x1b3b76(++_0x563a15);}(_0xa9e0,0x123));var _0x0a9e=function(_0x521929,_0x479be5){_0x521929=_0x521929-0x0;var _0x632436=_0xa9e0[_0x521929];return _0x632436;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x0a9e('0x3'),'outbound'),'allowNull':![],'defaultValue':_0x0a9e('0x3')},'musiconhold':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x4')},'announce':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':''},'strategy':{'type':Sequelize[_0x0a9e('0x5')]('rr','ringall',_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'rrmemory','linear',_0x0a9e('0x9'),'rrordered'),'allowNull':![],'defaultValue':'ringall','set':function(_0x39753a){this[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x39753a?_0x39753a:_0x0a9e('0xc'));},'get':function(){var _0xfeb75b=this[_0x0a9e('0xd')]('type');var _0x50dfb2=this['getDataValue']('dialMethod');var _0x273d4d=this[_0x0a9e('0xd')](_0x0a9e('0xb'));if(_0xfeb75b===_0x0a9e('0x3')){return _0x273d4d;}if(_0x50dfb2===_0x0a9e('0xe')&&_0x273d4d===_0x0a9e('0xc')||_0x50dfb2==='booked'&&_0x273d4d===_0x0a9e('0xf')){return _0x273d4d;}if(_0x50dfb2===_0x0a9e('0x10')||_0x50dfb2===_0x0a9e('0x11')||_0x50dfb2===_0x0a9e('0x12')){return _0x273d4d;}return null;}},'servicelevel':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize['INTEGER'](0xb)},'timeout':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x0a9e('0x2')]},'weight':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x0a9e('0x5')]('yes','no'),'defaultValue':_0x0a9e('0x14')},'autopause':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no',_0x0a9e('0x15')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x0a9e('0x13')](0xb)},'autopausebusy':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x0a9e('0x5')]('yes','no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':!![]},'membergosub':{'type':Sequelize['STRING'],'allowNull':!![]},'announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x0a9e('0x13')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no'),'defaultValue':_0x0a9e('0x14')},'announce_holdtime':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no',_0x0a9e('0x16')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x0a9e('0x5')]('yes','no')},'announce_position_limit':{'type':Sequelize['INTEGER'](0xb)},'announce_round_seconds':{'type':Sequelize[_0x0a9e('0x5')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x0a9e('0x2')]},'queue_youarenext':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_thereare':{'type':Sequelize['STRING'],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_holdtime':{'type':Sequelize['STRING'],'defaultValue':null},'queue_minute':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize['STRING'],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x0a9e('0x2')]},'queue_quantity1':{'type':Sequelize[_0x0a9e('0x2')]},'queue_quantity2':{'type':Sequelize[_0x0a9e('0x2')]},'queue_periodic_announce':{'type':Sequelize[_0x0a9e('0x2')]},'queue_less_than':{'type':Sequelize[_0x0a9e('0x2')]},'periodic_announce':{'type':Sequelize[_0x0a9e('0x17')],'set':function(_0x5a101a){this[_0x0a9e('0xa')](_0x0a9e('0x18'),_0x5a101a?_0x5a101a[_0x0a9e('0x19')](','):[]);},'get':function(){return this[_0x0a9e('0xd')]('periodic_announce')?this[_0x0a9e('0xd')](_0x0a9e('0x18'))[_0x0a9e('0x1a')](','):[];}},'joinempty':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x14'),'set':function(_0x563b45){this[_0x0a9e('0xa')](_0x0a9e('0x1b'),_0x563b45?_0x563b45[_0x0a9e('0x19')](','):undefined);},'get':function(){return this['getDataValue'](_0x0a9e('0x1b'))?this['getDataValue'](_0x0a9e('0x1b'))[_0x0a9e('0x1a')](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':'no','set':function(_0x33bdb7){this[_0x0a9e('0xa')]('leavewhenempty',_0x33bdb7?_0x33bdb7[_0x0a9e('0x19')](','):undefined);},'get':function(){return this[_0x0a9e('0xd')](_0x0a9e('0x1c'))?this[_0x0a9e('0xd')](_0x0a9e('0x1c'))[_0x0a9e('0x1a')](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize['ENUM'](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x14'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize[_0x0a9e('0x2')]},'acw':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'set':function(_0x191e91){this[_0x0a9e('0xa')](_0x0a9e('0x1d'),_0x191e91);if(_0x191e91){if(this[_0x0a9e('0xd')]('wrapuptime')<0x2){this['setDataValue'](_0x0a9e('0x1e'),0x2);}}}},'acwTimeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':0x0,'comment':_0x0a9e('0x20')},'dialMethod':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x21'),'progressive',_0x0a9e('0x12'),_0x0a9e('0x11'),_0x0a9e('0xe')),'defaultValue':'progressive','comment':_0x0a9e('0x22')},'dialLimitChannel':{'type':Sequelize[_0x0a9e('0x13')](0x4)[_0x0a9e('0x23')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20channels,\x200\x20means\x20unlimited.'},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0x0a9e('0x23')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x0a9e('0x24')},'dialPowerLevel':{'type':Sequelize['FLOAT'](0x2)[_0x0a9e('0x23')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x0a9e('0x25')},'dialPredictiveOptimization':{'type':Sequelize[_0x0a9e('0x5')](_0x0a9e('0x26'),'dropRate'),'defaultValue':'dropRate','comment':_0x0a9e('0x27')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x0a9e('0x28')](0x2)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x0a9e('0x29')},'dialPredictiveInterval':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':'Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)'},'dialOriginateCallerIdName':{'type':Sequelize[_0x0a9e('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x0a9e('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x2a')},'dialQueueOptions':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x2b'),'comment':_0x0a9e('0x2c')},'dialQueueTimeout':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x2d')},'dialQueueProject':{'type':Sequelize[_0x0a9e('0x2')],'comment':_0x0a9e('0x2e')},'dialCongestionMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x2f')},'dialBusyMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x30')},'dialBusyRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x31')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'comment':_0x0a9e('0x32')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x33')},'dialGlobalMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x0a9e('0x34')},'dialTimezone':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':_0x0a9e('0x35')},'dialPrefix':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0x0a9e('0x36'),'never',_0x0a9e('0x37')),'defaultValue':_0x0a9e('0x36')},'dialAMDActive':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x0a9e('0x38')},'dialAMDGreeting':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x0a9e('0x39')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x0a9e('0x13')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x0a9e('0x3a')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0a9e('0x3b')},'dialAMDMinWordLength':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x0a9e('0x3c')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x0a9e('0x3d')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x0a9e('0x13')](0x9)[_0x0a9e('0x23')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x0a9e('0x3e')},'dialRecallMeTimeout':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x0a9e('0x3f')},'dialRecallInQueue':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':0x0,'comment':'Active/Disactive\x20Recall\x20In\x20Queue'},'dialOrderByScheduledAt':{'type':Sequelize['ENUM']('DESC',_0x0a9e('0x40')),'defaultValue':_0x0a9e('0x41')},'dialQueueProject2':{'type':Sequelize[_0x0a9e('0x2')],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)'},'dialAgiAfterHangupClient':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x0a9e('0x42')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x43')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x44')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x45')},'dialDropRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x46')},'dialAbandonedMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x0a9e('0x47')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x0a9e('0x13')](0x3)[_0x0a9e('0x23')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x0a9e('0x48')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x0a9e('0x13')](0x5)[_0x0a9e('0x23')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'mandatoryDispositionPauseId':{'type':Sequelize[_0x0a9e('0x13')],'allowNull':!![],'comment':_0x0a9e('0x49')},'mandatoryDisposition':{'type':Sequelize[_0x0a9e('0x1f')],'defaultValue':![],'comment':_0x0a9e('0x4a'),'set':function(_0xb83dfd){if(!_0xb83dfd)this[_0x0a9e('0xa')]('mandatoryDispositionPauseId',null);this[_0x0a9e('0xa')](_0x0a9e('0x4b'),_0xb83dfd);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize['INTEGER'](0x3)[_0x0a9e('0x23')],'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 f72c1a1..f4539be 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 _0x3a79=['phone','NOW()','CmListId','cm_contacts','deletedAt\x20IS\x20NULL','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','cm_hopper','onlyIfOpen','ListId\x20=\x20?','removeLists','getBlackLists','addBlackLists','spread','cm_hopper_black','removeBlackLists','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','redis','socket.io-emitter','./voiceQueue.socket','register','status','end','json','count','offset','limit','Content-Range','apply','reject','save','then','destroy','get','inbound','outbound','filter','ignore','value','type','find','UserProfileResource','stack','name','map','VoiceQueue','fieldName','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','include','findAll','catch','show','params','keys','options','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','QueueCampaigns','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','rawAttributes','omit','createdAt','updatedAt','body','VoiceQueues','update','getHoppers','findOne','VoiceQueueId','CmHopper','getHopperHistories','CmHopperHistory','includeAll','getHopperFinals','CmHopperFinal','rows','CmHopperBlack','Team','getTeams','addTeams','teams','User','Agents','online','interface','flatMap','forEach','penalty','transaction','each','UserVoiceQueue','findOrCreate','UserVoiceQueueRt','upsert','isNil','SIP/%s','userVoiceQueue:save','removeTeams','ids','select','field','tq.TeamId','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','sequelize','QueryTypes','SELECT','every','TeamId','includes','all','union','isEmpty','removeAgents','userVoiceQueue:remove','addAgents','emit','voicePause','isArray','getAgents','getMembers','getLists','CmList','addLists','dialCheckDuplicateType','always','insert','into','fromQuery','scheduledAt','ContactId','ListId'];(function(_0x1517dc,_0x1a0592){var _0x194e49=function(_0x22accc){while(--_0x22accc){_0x1517dc['push'](_0x1517dc['shift']());}};_0x194e49(++_0x1a0592);}(_0x3a79,0xca));var _0x93a7=function(_0x2e4115,_0x5a59f4){_0x2e4115=_0x2e4115-0x0;var _0x3fe44a=_0x3a79[_0x2e4115];return _0x3fe44a;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x93a7('0x0'));var rimraf=require(_0x93a7('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x93a7('0x2'));var rp=require(_0x93a7('0x3'));var moment=require(_0x93a7('0x4'));var BPromise=require(_0x93a7('0x5'));var Mustache=require(_0x93a7('0x6'));var util=require(_0x93a7('0x7'));var path=require(_0x93a7('0x8'));var sox=require('sox');var csv=require(_0x93a7('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x93a7('0xa'));var squel=require(_0x93a7('0xb'));var crypto=require(_0x93a7('0xc'));var jsforce=require(_0x93a7('0xd'));var deskjs=require(_0x93a7('0xe'));var toCsv=require(_0x93a7('0x9'));var querystring=require('querystring');var Papa=require(_0x93a7('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x93a7('0x10'));var as=require(_0x93a7('0x11'));var hardwareService=require(_0x93a7('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0x93a7('0x13'));var config=require(_0x93a7('0x14'));var db=require(_0x93a7('0x15'))['db'];config['redis']=_['defaults'](config[_0x93a7('0x16')],{'host':'localhost','port':0x18eb});var socket=require(_0x93a7('0x17'))(new Redis(config[_0x93a7('0x16')]));require(_0x93a7('0x18'))[_0x93a7('0x19')](socket);function respondWithStatusCode(_0x23380e,_0x423458){_0x423458=_0x423458||0xcc;return function(_0x32653b){if(_0x32653b){return _0x23380e['sendStatus'](_0x423458);}return _0x23380e[_0x93a7('0x1a')](_0x423458)[_0x93a7('0x1b')]();};}function respondWithResult(_0x4aa44e,_0x517a72){_0x517a72=_0x517a72||0xc8;return function(_0x29fae6){if(_0x29fae6){return _0x4aa44e['status'](_0x517a72)[_0x93a7('0x1c')](_0x29fae6);}};}function respondWithFilteredResult(_0x46769f,_0x8c8f3b){return function(_0xc475a3){if(_0xc475a3){var _0x3d1db3=_0xc475a3[_0x93a7('0x1d')],_0x4eb2da=_0x8c8f3b[_0x93a7('0x1e')],_0xfe6814=_0x8c8f3b[_0x93a7('0x1e')]+_0x8c8f3b[_0x93a7('0x1f')],_0x5ba575;if(_0xfe6814>=_0x3d1db3){_0xfe6814=_0x3d1db3;_0x5ba575=0xc8;}else{_0x5ba575=0xce;}_0x46769f[_0x93a7('0x1a')](_0x5ba575);return _0x46769f['set'](_0x93a7('0x20'),_0x4eb2da+'-'+_0xfe6814+'/'+_0x3d1db3)[_0x93a7('0x1c')](_0xc475a3);}return null;};}function patchUpdates(_0xdebaba){return function(_0x1afd1c){try{jsonpatch[_0x93a7('0x21')](_0x1afd1c,_0xdebaba,!![]);}catch(_0x348e2f){return BPromise[_0x93a7('0x22')](_0x348e2f);}return _0x1afd1c[_0x93a7('0x23')]();};}function saveUpdates(_0x50ea8d,_0x29cd68){return function(_0x33eb1c){if(_0x33eb1c){return _0x33eb1c['update'](_0x50ea8d)[_0x93a7('0x24')](function(_0x198b82){return _0x198b82;});}return null;};}function removeEntity(_0x24fa68,_0x461632){return function(_0x4cc05a){if(_0x4cc05a){return _0x4cc05a[_0x93a7('0x25')]()[_0x93a7('0x24')](function(){var _0x4f95d4=_0x4cc05a[_0x93a7('0x26')]({'plain':!![]});var _0x1b64ec=[{'name':'VoiceQueues','value':_0x93a7('0x27'),'ignore':![]},{'name':'QueueCampaigns','value':_0x93a7('0x28'),'ignore':![]}];var _0x14f413=_(_0x1b64ec)[_0x93a7('0x29')](_0x93a7('0x2a'))['map'](_0x93a7('0x2b'))['value']();if(_['includes'](_0x14f413,_0x4f95d4[_0x93a7('0x2c')])){return;}var _0x44c6da=_[_0x93a7('0x2d')](_0x1b64ec,[_0x93a7('0x2b'),_0x4f95d4[_0x93a7('0x2c')]])['name'];return db[_0x93a7('0x2e')][_0x93a7('0x25')]({'where':{'type':_0x44c6da,'resourceId':_0x4f95d4['id']}})[_0x93a7('0x24')](function(){return _0x4cc05a;});})['then'](function(){_0x24fa68['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1ecdd7,_0x19cae4){return function(_0xd5bbf3){if(!_0xd5bbf3){_0x1ecdd7['sendStatus'](0x194);}return _0xd5bbf3;};}function handleError(_0x2842f8,_0x5ca785){_0x5ca785=_0x5ca785||0x1f4;return function(_0x4d1a28){logger['error'](_0x4d1a28[_0x93a7('0x2f')]);if(_0x4d1a28['name']){delete _0x4d1a28[_0x93a7('0x30')];}_0x2842f8[_0x93a7('0x1a')](_0x5ca785)['send'](_0x4d1a28);};}exports['index']=function(_0x53af3a,_0x165303){var _0x422a1d={},_0x1ea17b={},_0xa24248={'count':0x0,'rows':[]};var _0x480166=_[_0x93a7('0x31')](db[_0x93a7('0x32')]['rawAttributes'],function(_0x4d1992){return{'name':_0x4d1992[_0x93a7('0x33')],'type':_0x4d1992[_0x93a7('0x2c')][_0x93a7('0x34')]};});_0x1ea17b[_0x93a7('0x35')]=_[_0x93a7('0x31')](_0x480166,_0x93a7('0x30'));_0x1ea17b[_0x93a7('0x36')]=_['keys'](_0x53af3a[_0x93a7('0x36')]);_0x1ea17b[_0x93a7('0x37')]=_[_0x93a7('0x38')](_0x1ea17b[_0x93a7('0x35')],_0x1ea17b[_0x93a7('0x36')]);_0x422a1d[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x1ea17b['model'],qs['fields'](_0x53af3a[_0x93a7('0x36')][_0x93a7('0x3a')]));_0x422a1d[_0x93a7('0x39')]=_0x422a1d[_0x93a7('0x39')][_0x93a7('0x3b')]?_0x422a1d['attributes']:_0x1ea17b[_0x93a7('0x35')];if(!_0x53af3a[_0x93a7('0x36')][_0x93a7('0x3c')](_0x93a7('0x3d'))){_0x422a1d[_0x93a7('0x1f')]=qs[_0x93a7('0x1f')](_0x53af3a[_0x93a7('0x36')][_0x93a7('0x1f')]);_0x422a1d[_0x93a7('0x1e')]=qs[_0x93a7('0x1e')](_0x53af3a['query'][_0x93a7('0x1e')]);}_0x422a1d[_0x93a7('0x3e')]=qs['sort'](_0x53af3a[_0x93a7('0x36')][_0x93a7('0x3f')]);_0x422a1d[_0x93a7('0x40')]=qs['filters'](_[_0x93a7('0x41')](_0x53af3a[_0x93a7('0x36')],_0x1ea17b[_0x93a7('0x37')]));if(_0x53af3a[_0x93a7('0x36')][_0x93a7('0x29')]){_0x422a1d[_0x93a7('0x40')]=_['merge'](_0x422a1d[_0x93a7('0x40')],{'$or':_['map'](_0x480166,function(_0x356cda){if(_0x356cda[_0x93a7('0x2c')]!=='VIRTUAL'){var _0x9c1bbd={};_0x9c1bbd[_0x356cda[_0x93a7('0x30')]]={'$like':'%'+_0x53af3a['query']['filter']+'%'};return _0x9c1bbd;}})});}_0x422a1d=_[_0x93a7('0x42')]({},_0x422a1d,_0x53af3a['options']);var _0x543f5d={'where':_0x422a1d[_0x93a7('0x40')]};return db[_0x93a7('0x32')]['count'](_0x543f5d)['then'](function(_0x1845ed){_0xa24248['count']=_0x1845ed;if(_0x53af3a[_0x93a7('0x36')]['includeAll']){_0x422a1d[_0x93a7('0x43')]=[{'all':!![]}];}return db[_0x93a7('0x32')][_0x93a7('0x44')](_0x422a1d);})[_0x93a7('0x24')](function(_0x59a601){_0xa24248['rows']=_0x59a601;return _0xa24248;})['then'](respondWithFilteredResult(_0x165303,_0x422a1d))[_0x93a7('0x45')](handleError(_0x165303,null));};exports[_0x93a7('0x46')]=function(_0x2c98d9,_0x5ef2e5){var _0x7750f0={'raw':![],'where':{'id':_0x2c98d9[_0x93a7('0x47')]['id']}},_0x2b6c4e={};_0x2b6c4e['model']=_[_0x93a7('0x48')](db[_0x93a7('0x32')]['rawAttributes']);_0x2b6c4e[_0x93a7('0x36')]=_[_0x93a7('0x48')](_0x2c98d9['query']);_0x2b6c4e[_0x93a7('0x37')]=_[_0x93a7('0x38')](_0x2b6c4e[_0x93a7('0x35')],_0x2b6c4e[_0x93a7('0x36')]);_0x7750f0['attributes']=_[_0x93a7('0x38')](_0x2b6c4e[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x2c98d9['query'][_0x93a7('0x3a')]));_0x7750f0[_0x93a7('0x39')]=_0x7750f0[_0x93a7('0x39')][_0x93a7('0x3b')]?_0x7750f0[_0x93a7('0x39')]:_0x2b6c4e[_0x93a7('0x35')];if(_0x2c98d9['query']['includeAll']){_0x7750f0[_0x93a7('0x43')]=[{'all':!![]}];}_0x7750f0=_[_0x93a7('0x42')]({},_0x7750f0,_0x2c98d9[_0x93a7('0x49')]);return db[_0x93a7('0x32')]['find'](_0x7750f0)[_0x93a7('0x24')](handleEntityNotFound(_0x5ef2e5,null))[_0x93a7('0x24')](respondWithResult(_0x5ef2e5,null))[_0x93a7('0x45')](handleError(_0x5ef2e5,null));};exports[_0x93a7('0x4a')]=function(_0x4e2b9e,_0xef519f){return db[_0x93a7('0x32')][_0x93a7('0x4a')](_0x4e2b9e['body'],{})[_0x93a7('0x24')](function(_0x41ba7b){var _0x4fb3c9=_0x4e2b9e[_0x93a7('0x4b')][_0x93a7('0x26')]({'plain':!![]});if(!_0x4fb3c9)throw new Error(_0x93a7('0x4c'));if(_0x4fb3c9[_0x93a7('0x4d')]===_0x93a7('0x4b')){var _0x101446=_0x41ba7b[_0x93a7('0x26')]({'plain':!![]});var _0x338c57=[{'name':'VoiceQueues','value':'inbound'},{'name':_0x93a7('0x4e'),'value':_0x93a7('0x28')}];var _0x573325=_[_0x93a7('0x2d')](_0x338c57,['value',_0x101446[_0x93a7('0x2c')]])[_0x93a7('0x30')];return db[_0x93a7('0x4f')][_0x93a7('0x2d')]({'where':{'name':_0x573325,'userProfileId':_0x4fb3c9[_0x93a7('0x50')]},'raw':!![]})[_0x93a7('0x24')](function(_0x2b8000){if(_0x2b8000&&_0x2b8000[_0x93a7('0x51')]===0x0){return db[_0x93a7('0x2e')]['create']({'name':_0x101446[_0x93a7('0x30')],'resourceId':_0x101446['id'],'type':_0x2b8000[_0x93a7('0x30')],'sectionId':_0x2b8000['id']},{})[_0x93a7('0x24')](function(){return _0x41ba7b;});}else{return _0x41ba7b;}})[_0x93a7('0x45')](function(_0xca2c45){logger[_0x93a7('0x52')](_0x93a7('0x53'),_0xca2c45);throw _0xca2c45;});}return _0x41ba7b;})[_0x93a7('0x24')](respondWithResult(_0xef519f,0xc9))[_0x93a7('0x45')](handleError(_0xef519f,null));};exports[_0x93a7('0x54')]=function(_0x5d13fb,_0x4a5c82){var _0x33223f={'where':{'id':_0x5d13fb['params']['id']}},_0x5da311={};_0x5da311[_0x93a7('0x35')]=_[_0x93a7('0x48')](db[_0x93a7('0x32')][_0x93a7('0x55')]);_0x33223f[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x5da311[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x5d13fb[_0x93a7('0x36')][_0x93a7('0x3a')]));_0x33223f[_0x93a7('0x39')]=_0x33223f[_0x93a7('0x39')]['length']?_0x33223f['attributes']:_0x5da311[_0x93a7('0x35')];if(_0x5d13fb['query']['includeAll']){_0x33223f['include']=[{'all':!![]}];}_0x33223f=_['merge']({},_0x33223f,_0x5d13fb['options']);return db[_0x93a7('0x32')][_0x93a7('0x2d')](_0x33223f)['then'](handleEntityNotFound(_0x4a5c82,null))[_0x93a7('0x24')](function(_0x9ed72f){if(_0x9ed72f){var _0x2d4ac7=_0x9ed72f[_0x93a7('0x26')]({'plain':!![]});_0x2d4ac7=qs[_0x93a7('0x56')](_0x2d4ac7,['id',_0x93a7('0x57'),_0x93a7('0x58')]);_0x5d13fb[_0x93a7('0x59')]=_[_0x93a7('0x56')](_0x5d13fb[_0x93a7('0x59')],['id',_0x93a7('0x57'),_0x93a7('0x58')]);return db[_0x93a7('0x32')][_0x93a7('0x4a')](_[_0x93a7('0x42')](_0x2d4ac7,_0x5d13fb[_0x93a7('0x59')]),{'include':_0x5d13fb[_0x93a7('0x36')]['includeAll']?[{'all':!![]}]:undefined})[_0x93a7('0x24')](function(_0x334c93){var _0x19779b=_0x5d13fb['user'][_0x93a7('0x26')]({'plain':!![]});if(!_0x19779b)throw new Error(_0x93a7('0x4c'));if(_0x19779b[_0x93a7('0x4d')]==='user'){var _0x5f3b36=_0x334c93[_0x93a7('0x26')]({'plain':!![]});var _0x403bdc=[{'name':_0x93a7('0x5a'),'value':_0x93a7('0x27')},{'name':_0x93a7('0x4e'),'value':_0x93a7('0x28')}];var _0x5aec61=_['find'](_0x403bdc,[_0x93a7('0x2b'),_0x5f3b36[_0x93a7('0x2c')]])[_0x93a7('0x30')];return db[_0x93a7('0x4f')]['find']({'where':{'name':_0x5aec61,'userProfileId':_0x19779b[_0x93a7('0x50')]},'raw':!![]})[_0x93a7('0x24')](function(_0x1f44e7){if(_0x1f44e7&&_0x1f44e7['autoAssociation']===0x0){return db['UserProfileResource'][_0x93a7('0x4a')]({'name':_0x5f3b36[_0x93a7('0x30')],'resourceId':_0x5f3b36['id'],'type':_0x1f44e7[_0x93a7('0x30')],'sectionId':_0x1f44e7['id']},{})[_0x93a7('0x24')](function(){return _0x334c93;});}else{return _0x334c93;}})['catch'](function(_0x87cae4){logger[_0x93a7('0x52')](_0x93a7('0x53'),_0x87cae4);throw _0x87cae4;});}return _0x334c93;});}})['then'](respondWithResult(_0x4a5c82,0xc9))['catch'](handleError(_0x4a5c82,null));};exports[_0x93a7('0x5b')]=function(_0x5d3599,_0x110c79){if(_0x5d3599[_0x93a7('0x59')]['id']){delete _0x5d3599['body']['id'];}return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x5d3599['params']['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x110c79,null))['then'](saveUpdates(_0x5d3599[_0x93a7('0x59')],null))[_0x93a7('0x24')](respondWithResult(_0x110c79,null))[_0x93a7('0x45')](handleError(_0x110c79,null));};exports[_0x93a7('0x25')]=function(_0x28c4fd,_0x573f8b){return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x28c4fd[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x573f8b,null))[_0x93a7('0x24')](removeEntity(_0x573f8b,null))['catch'](handleError(_0x573f8b,null));};exports[_0x93a7('0x5c')]=function(_0x11e0cb,_0x108dd6,_0xe20c7){var _0x39bd68={'raw':![],'where':{}};var _0x43e3e2={};var _0x4f0202={'count':0x0,'rows':[]};return db[_0x93a7('0x32')][_0x93a7('0x5d')]({'where':{'id':_0x11e0cb[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x108dd6,null))[_0x93a7('0x24')](function(_0x36b802){if(_0x36b802){_0x43e3e2[_0x93a7('0x35')]=_[_0x93a7('0x48')](db['CmHopper'][_0x93a7('0x55')]);_0x43e3e2[_0x93a7('0x36')]=_[_0x93a7('0x48')](_0x11e0cb['query']);_0x43e3e2[_0x93a7('0x37')]=_[_0x93a7('0x38')](_0x43e3e2[_0x93a7('0x35')],_0x43e3e2[_0x93a7('0x36')]);_0x39bd68[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x43e3e2[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x11e0cb[_0x93a7('0x36')][_0x93a7('0x3a')]));_0x39bd68[_0x93a7('0x39')]=_0x39bd68['attributes']['length']?_0x39bd68['attributes']:_0x43e3e2['model'];if(!_0x11e0cb[_0x93a7('0x36')][_0x93a7('0x3c')]('nolimit')){_0x39bd68[_0x93a7('0x1f')]=qs['limit'](_0x11e0cb[_0x93a7('0x36')][_0x93a7('0x1f')]);_0x39bd68['offset']=qs[_0x93a7('0x1e')](_0x11e0cb[_0x93a7('0x36')][_0x93a7('0x1e')]);}_0x39bd68[_0x93a7('0x3e')]=qs[_0x93a7('0x3f')](_0x11e0cb[_0x93a7('0x36')][_0x93a7('0x3f')]);_0x39bd68['where']=qs[_0x93a7('0x37')](_[_0x93a7('0x41')](_0x11e0cb[_0x93a7('0x36')],_0x43e3e2[_0x93a7('0x37')]));_0x39bd68[_0x93a7('0x40')][_0x93a7('0x5e')]=_0x36b802['id'];if(_0x11e0cb[_0x93a7('0x36')][_0x93a7('0x29')]){_0x39bd68[_0x93a7('0x40')]=_['merge'](_0x39bd68[_0x93a7('0x40')],{'$or':_['map'](_0x39bd68[_0x93a7('0x39')],function(_0xbd51be){var _0x1bfac2={};_0x1bfac2[_0xbd51be]={'$like':'%'+_0x11e0cb[_0x93a7('0x36')][_0x93a7('0x29')]+'%'};return _0x1bfac2;})});}_0x39bd68=_['merge']({},_0x39bd68,_0x11e0cb[_0x93a7('0x49')]);return db['CmHopper'][_0x93a7('0x1d')]({'where':_0x39bd68[_0x93a7('0x40')]})[_0x93a7('0x24')](function(_0x442b43){_0x4f0202[_0x93a7('0x1d')]=_0x442b43;if(_0x11e0cb[_0x93a7('0x36')]['includeAll']){_0x39bd68['include']=[{'all':!![]}];}return db[_0x93a7('0x5f')][_0x93a7('0x44')](_0x39bd68);})[_0x93a7('0x24')](function(_0x13de02){_0x4f0202['rows']=_0x13de02;return _0x4f0202;});}})[_0x93a7('0x24')](respondWithFilteredResult(_0x108dd6,_0x39bd68))[_0x93a7('0x45')](handleError(_0x108dd6,null));};exports[_0x93a7('0x60')]=function(_0x429c0d,_0x4042ad,_0x17c98c){var _0x2792f0={'raw':!![],'where':{}};var _0x3d9dfa={};var _0x2d329a={'count':0x0,'rows':[]};return db['VoiceQueue'][_0x93a7('0x5d')]({'where':{'id':_0x429c0d[_0x93a7('0x47')]['id']}})['then'](handleEntityNotFound(_0x4042ad,null))[_0x93a7('0x24')](function(_0x2b49ab){if(_0x2b49ab){_0x3d9dfa[_0x93a7('0x35')]=_[_0x93a7('0x48')](db[_0x93a7('0x61')][_0x93a7('0x55')]);_0x3d9dfa[_0x93a7('0x36')]=_[_0x93a7('0x48')](_0x429c0d['query']);_0x3d9dfa[_0x93a7('0x37')]=_[_0x93a7('0x38')](_0x3d9dfa[_0x93a7('0x35')],_0x3d9dfa[_0x93a7('0x36')]);_0x2792f0[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x3d9dfa[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x429c0d['query']['fields']));_0x2792f0['attributes']=_0x2792f0[_0x93a7('0x39')]['length']?_0x2792f0[_0x93a7('0x39')]:_0x3d9dfa['model'];if(!_0x429c0d['query'][_0x93a7('0x3c')]('nolimit')){_0x2792f0['limit']=qs[_0x93a7('0x1f')](_0x429c0d['query']['limit']);_0x2792f0[_0x93a7('0x1e')]=qs['offset'](_0x429c0d[_0x93a7('0x36')][_0x93a7('0x1e')]);}_0x2792f0[_0x93a7('0x3e')]=qs['sort'](_0x429c0d[_0x93a7('0x36')][_0x93a7('0x3f')]);_0x2792f0['where']=qs['filters'](_[_0x93a7('0x41')](_0x429c0d[_0x93a7('0x36')],_0x3d9dfa[_0x93a7('0x37')]));_0x2792f0[_0x93a7('0x40')][_0x93a7('0x5e')]=_0x2b49ab['id'];if(_0x429c0d['query'][_0x93a7('0x29')]){_0x2792f0[_0x93a7('0x40')]=_[_0x93a7('0x42')](_0x2792f0['where'],{'$or':_[_0x93a7('0x31')](_0x2792f0[_0x93a7('0x39')],function(_0x19203b){var _0x41c58f={};_0x41c58f[_0x19203b]={'$like':'%'+_0x429c0d['query']['filter']+'%'};return _0x41c58f;})});}_0x2792f0=_[_0x93a7('0x42')]({},_0x2792f0,_0x429c0d[_0x93a7('0x49')]);return db[_0x93a7('0x61')]['count']({'where':_0x2792f0[_0x93a7('0x40')]})[_0x93a7('0x24')](function(_0x77aff5){_0x2d329a[_0x93a7('0x1d')]=_0x77aff5;if(_0x429c0d[_0x93a7('0x36')][_0x93a7('0x62')]){_0x2792f0[_0x93a7('0x43')]=[{'all':!![]}];}return db['CmHopperHistory'][_0x93a7('0x44')](_0x2792f0);})[_0x93a7('0x24')](function(_0x5cab47){_0x2d329a['rows']=_0x5cab47;return _0x2d329a;});}})[_0x93a7('0x24')](respondWithFilteredResult(_0x4042ad,_0x2792f0))[_0x93a7('0x45')](handleError(_0x4042ad,null));};exports[_0x93a7('0x63')]=function(_0x11ca68,_0x3c60d9,_0x35a743){var _0x283e5e={'raw':!![],'where':{}};var _0x867aaf={};var _0x4d0512={'count':0x0,'rows':[]};return db[_0x93a7('0x32')][_0x93a7('0x5d')]({'where':{'id':_0x11ca68[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x3c60d9,null))[_0x93a7('0x24')](function(_0x26d1ed){if(_0x26d1ed){_0x867aaf['model']=_[_0x93a7('0x48')](db[_0x93a7('0x64')][_0x93a7('0x55')]);_0x867aaf[_0x93a7('0x36')]=_['keys'](_0x11ca68[_0x93a7('0x36')]);_0x867aaf['filters']=_[_0x93a7('0x38')](_0x867aaf[_0x93a7('0x35')],_0x867aaf[_0x93a7('0x36')]);_0x283e5e[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x867aaf[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x11ca68['query'][_0x93a7('0x3a')]));_0x283e5e[_0x93a7('0x39')]=_0x283e5e[_0x93a7('0x39')]['length']?_0x283e5e[_0x93a7('0x39')]:_0x867aaf[_0x93a7('0x35')];if(!_0x11ca68[_0x93a7('0x36')]['hasOwnProperty'](_0x93a7('0x3d'))){_0x283e5e[_0x93a7('0x1f')]=qs['limit'](_0x11ca68[_0x93a7('0x36')][_0x93a7('0x1f')]);_0x283e5e[_0x93a7('0x1e')]=qs[_0x93a7('0x1e')](_0x11ca68[_0x93a7('0x36')][_0x93a7('0x1e')]);}_0x283e5e[_0x93a7('0x3e')]=qs['sort'](_0x11ca68['query'][_0x93a7('0x3f')]);_0x283e5e['where']=qs[_0x93a7('0x37')](_['pick'](_0x11ca68[_0x93a7('0x36')],_0x867aaf[_0x93a7('0x37')]));_0x283e5e[_0x93a7('0x40')][_0x93a7('0x5e')]=_0x26d1ed['id'];if(_0x11ca68['query'][_0x93a7('0x29')]){_0x283e5e[_0x93a7('0x40')]=_[_0x93a7('0x42')](_0x283e5e['where'],{'$or':_['map'](_0x283e5e[_0x93a7('0x39')],function(_0x254191){var _0x257f24={};_0x257f24[_0x254191]={'$like':'%'+_0x11ca68[_0x93a7('0x36')][_0x93a7('0x29')]+'%'};return _0x257f24;})});}_0x283e5e=_[_0x93a7('0x42')]({},_0x283e5e,_0x11ca68[_0x93a7('0x49')]);return db[_0x93a7('0x64')]['count']({'where':_0x283e5e[_0x93a7('0x40')]})['then'](function(_0x3c8f49){_0x4d0512[_0x93a7('0x1d')]=_0x3c8f49;if(_0x11ca68[_0x93a7('0x36')]['includeAll']){_0x283e5e['include']=[{'all':!![]}];}return db['CmHopperFinal']['findAll'](_0x283e5e);})['then'](function(_0x36e180){_0x4d0512[_0x93a7('0x65')]=_0x36e180;return _0x4d0512;});}})[_0x93a7('0x24')](respondWithFilteredResult(_0x3c60d9,_0x283e5e))[_0x93a7('0x45')](handleError(_0x3c60d9,null));};exports['getHopperBlacks']=function(_0x246150,_0x1b383a,_0x3c923c){var _0xe88ad0={'raw':!![],'where':{}};var _0xe2d94f={};var _0x3ff9af={'count':0x0,'rows':[]};return db[_0x93a7('0x32')][_0x93a7('0x5d')]({'where':{'id':_0x246150[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x1b383a,null))['then'](function(_0x50157c){if(_0x50157c){_0xe2d94f['model']=_[_0x93a7('0x48')](db[_0x93a7('0x66')]['rawAttributes']);_0xe2d94f[_0x93a7('0x36')]=_[_0x93a7('0x48')](_0x246150[_0x93a7('0x36')]);_0xe2d94f[_0x93a7('0x37')]=_['intersection'](_0xe2d94f[_0x93a7('0x35')],_0xe2d94f[_0x93a7('0x36')]);_0xe88ad0[_0x93a7('0x39')]=_['intersection'](_0xe2d94f[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x246150[_0x93a7('0x36')][_0x93a7('0x3a')]));_0xe88ad0[_0x93a7('0x39')]=_0xe88ad0['attributes'][_0x93a7('0x3b')]?_0xe88ad0['attributes']:_0xe2d94f[_0x93a7('0x35')];if(!_0x246150['query'][_0x93a7('0x3c')]('nolimit')){_0xe88ad0[_0x93a7('0x1f')]=qs[_0x93a7('0x1f')](_0x246150['query'][_0x93a7('0x1f')]);_0xe88ad0[_0x93a7('0x1e')]=qs['offset'](_0x246150[_0x93a7('0x36')]['offset']);}_0xe88ad0[_0x93a7('0x3e')]=qs[_0x93a7('0x3f')](_0x246150[_0x93a7('0x36')][_0x93a7('0x3f')]);_0xe88ad0['where']=qs[_0x93a7('0x37')](_['pick'](_0x246150[_0x93a7('0x36')],_0xe2d94f[_0x93a7('0x37')]));_0xe88ad0[_0x93a7('0x40')][_0x93a7('0x5e')]=_0x50157c['id'];if(_0x246150[_0x93a7('0x36')][_0x93a7('0x29')]){_0xe88ad0['where']=_['merge'](_0xe88ad0['where'],{'$or':_[_0x93a7('0x31')](_0xe88ad0['attributes'],function(_0x3d7752){var _0x4515fa={};_0x4515fa[_0x3d7752]={'$like':'%'+_0x246150[_0x93a7('0x36')][_0x93a7('0x29')]+'%'};return _0x4515fa;})});}_0xe88ad0=_[_0x93a7('0x42')]({},_0xe88ad0,_0x246150[_0x93a7('0x49')]);return db[_0x93a7('0x66')][_0x93a7('0x1d')]({'where':_0xe88ad0[_0x93a7('0x40')]})[_0x93a7('0x24')](function(_0x30f7bf){_0x3ff9af[_0x93a7('0x1d')]=_0x30f7bf;if(_0x246150[_0x93a7('0x36')][_0x93a7('0x62')]){_0xe88ad0[_0x93a7('0x43')]=[{'all':!![]}];}return db['CmHopperBlack'][_0x93a7('0x44')](_0xe88ad0);})[_0x93a7('0x24')](function(_0x3463f0){_0x3ff9af[_0x93a7('0x65')]=_0x3463f0;return _0x3ff9af;});}})[_0x93a7('0x24')](respondWithFilteredResult(_0x1b383a,_0xe88ad0))[_0x93a7('0x45')](handleError(_0x1b383a,null));};exports['getTeams']=function(_0x400a93,_0x5e448a,_0x582aa0){var _0x16455e={};var _0x1495c4={};var _0x251d1f;var _0x5e5b0d;return db['VoiceQueue'][_0x93a7('0x5d')]({'where':{'id':_0x400a93[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x5e448a,null))[_0x93a7('0x24')](function(_0x2e74df){if(_0x2e74df){_0x251d1f=_0x2e74df;_0x1495c4[_0x93a7('0x35')]=_[_0x93a7('0x48')](db[_0x93a7('0x67')][_0x93a7('0x55')]);_0x1495c4[_0x93a7('0x36')]=_[_0x93a7('0x48')](_0x400a93[_0x93a7('0x36')]);_0x1495c4[_0x93a7('0x37')]=_[_0x93a7('0x38')](_0x1495c4[_0x93a7('0x35')],_0x1495c4[_0x93a7('0x36')]);_0x16455e['attributes']=_[_0x93a7('0x38')](_0x1495c4[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x400a93['query'][_0x93a7('0x3a')]));_0x16455e['attributes']=_0x16455e[_0x93a7('0x39')][_0x93a7('0x3b')]?_0x16455e[_0x93a7('0x39')]:_0x1495c4['model'];_0x16455e['order']=qs[_0x93a7('0x3f')](_0x400a93['query']['sort']);_0x16455e['where']=qs['filters'](_[_0x93a7('0x41')](_0x400a93[_0x93a7('0x36')],_0x1495c4[_0x93a7('0x37')]));if(_0x400a93['query'][_0x93a7('0x29')]){_0x16455e['where']=_[_0x93a7('0x42')](_0x16455e[_0x93a7('0x40')],{'$or':_['map'](_0x16455e['attributes'],function(_0x4d74e2){var _0x46881c={};_0x46881c[_0x4d74e2]={'$like':'%'+_0x400a93[_0x93a7('0x36')][_0x93a7('0x29')]+'%'};return _0x46881c;})});}_0x16455e=_[_0x93a7('0x42')]({},_0x16455e,_0x400a93[_0x93a7('0x49')]);return _0x251d1f[_0x93a7('0x68')](_0x16455e);}})['then'](function(_0x1015b9){if(_0x1015b9){_0x5e5b0d=_0x1015b9[_0x93a7('0x3b')];if(!_0x400a93['query'][_0x93a7('0x3c')](_0x93a7('0x3d'))){_0x16455e[_0x93a7('0x1f')]=qs[_0x93a7('0x1f')](_0x400a93[_0x93a7('0x36')][_0x93a7('0x1f')]);_0x16455e[_0x93a7('0x1e')]=qs[_0x93a7('0x1e')](_0x400a93[_0x93a7('0x36')][_0x93a7('0x1e')]);}return _0x251d1f[_0x93a7('0x68')](_0x16455e);}})['then'](function(_0xf6581){if(_0xf6581){return _0xf6581?{'count':_0x5e5b0d,'rows':_0xf6581}:null;}})[_0x93a7('0x24')](respondWithResult(_0x5e448a,null))[_0x93a7('0x45')](handleError(_0x5e448a,null));};exports[_0x93a7('0x69')]=function(_0x45f64b,_0x20da62,_0x39d55f){var _0x1f2f1e=_0x45f64b['body'][_0x93a7('0x6a')];var _0x2cb608=_[_0x93a7('0x31')](_0x1f2f1e,'id');return db[_0x93a7('0x67')]['findAll']({'where':{'id':_0x2cb608},'attributes':['id'],'include':[{'model':db[_0x93a7('0x6b')],'as':_0x93a7('0x6c'),'attributes':['id',_0x93a7('0x30'),_0x93a7('0x6d'),'voicePause',_0x93a7('0x6e')],'raw':!![]}]})[_0x93a7('0x24')](function(_0x9affd0){if(_0x9affd0){var _0x21acab=_[_0x93a7('0x6f')](_0x9affd0,function(_0x3d0f02){var _0x180d51=_0x3d0f02[_0x93a7('0x26')]({'plain':!![]});_0x180d51['Agents'][_0x93a7('0x70')](function(_0x33beb2){_0x33beb2['penalty']=_[_0x93a7('0x2d')](_0x1f2f1e,{'id':_0x180d51['id']})[_0x93a7('0x71')];});return _0x180d51[_0x93a7('0x6c')];});return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x45f64b[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](function(_0x327c4a){return db['sequelize'][_0x93a7('0x72')](function(_0x4de9d1){return _0x327c4a['addTeams'](_0x2cb608,{'transaction':_0x4de9d1})[_0x93a7('0x24')](function(){return BPromise[_0x93a7('0x73')](_0x21acab,function(_0x152dbb){return db[_0x93a7('0x74')][_0x93a7('0x75')]({'where':{'UserId':_0x152dbb['id'],'VoiceQueueId':_0x45f64b[_0x93a7('0x47')]['id']},'defaults':{'penalty':_0x152dbb[_0x93a7('0x71')]},'transaction':_0x4de9d1});});})[_0x93a7('0x24')](function(){return BPromise[_0x93a7('0x73')](_[_0x93a7('0x29')](_0x21acab,{'online':!![]}),function(_0x1eab73){return db[_0x93a7('0x76')][_0x93a7('0x77')]({'membername':_0x1eab73[_0x93a7('0x30')],'UserId':_0x1eab73['id'],'queue_name':_0x327c4a[_0x93a7('0x30')],'VoiceQueueId':_0x327c4a['id'],'interface':_[_0x93a7('0x78')](_0x1eab73[_0x93a7('0x6e')])?util['format'](_0x93a7('0x79'),_0x1eab73['name']):_0x1eab73[_0x93a7('0x6e')],'paused':_0x1eab73['voicePause']||![],'penalty':_0x1eab73[_0x93a7('0x71')]},{'transaction':_0x4de9d1});});})[_0x93a7('0x24')](function(){_0x21acab[_0x93a7('0x70')](function(_0x1f042b){socket['emit'](_0x93a7('0x7a'),{'UserId':_0x1f042b['id'],'VoiceQueueId':_0x327c4a['id']});});});});});}})[_0x93a7('0x24')](respondWithStatusCode(_0x20da62,null))[_0x93a7('0x45')](handleError(_0x20da62,null));};exports[_0x93a7('0x7b')]=function(_0x55f1f3,_0x3ec515,_0x373e99){return db[_0x93a7('0x67')][_0x93a7('0x44')]({'where':{'id':_0x55f1f3[_0x93a7('0x36')][_0x93a7('0x7c')]},'attributes':['id'],'include':[{'model':db[_0x93a7('0x6b')],'as':_0x93a7('0x6c'),'attributes':['id'],'raw':!![]}]})[_0x93a7('0x24')](handleEntityNotFound(_0x3ec515,null))[_0x93a7('0x24')](function(_0x426582){var _0x289dc1=_[_0x93a7('0x31')](_0x426582,'id');var _0x4d7be2=[];var _0x1dd2d6=[];var _0xac38f1=squel[_0x93a7('0x7d')]();_0xac38f1[_0x93a7('0x7e')](_0x93a7('0x7f'))[_0x93a7('0x80')]('team_has_voice_queues','tq')[_0x93a7('0x81')](_0x93a7('0x82'),'ut',_0x93a7('0x83'))['where'](_0x93a7('0x84'),_0x55f1f3[_0x93a7('0x47')]['id']);for(var _0x25fde8=0x0;_0x25fde8<_0x426582[_0x93a7('0x3b')];_0x25fde8+=0x1){let _0x3f855b=_0x426582[_0x25fde8];for(var _0x31a70e=0x0;_0x31a70e<_0x3f855b[_0x93a7('0x6c')][_0x93a7('0x3b')];_0x31a70e+=0x1){let _0xe407f9=_0x3f855b[_0x93a7('0x6c')][_0x31a70e];var _0x27bbc6=_0xac38f1[_0x93a7('0x54')]();_0x27bbc6[_0x93a7('0x40')](_0x93a7('0x85'),_0xe407f9['id']);_0x1dd2d6[_0x93a7('0x86')](db['sequelize'][_0x93a7('0x36')](_0x27bbc6[_0x93a7('0x87')](),{'type':db[_0x93a7('0x88')][_0x93a7('0x89')][_0x93a7('0x8a')]})['then'](function(_0x2c59e7){if(_0x2c59e7[_0x93a7('0x3b')]===0x1){return _0xe407f9['id'];}else{var _0x2682e6=_[_0x93a7('0x8b')](_[_0x93a7('0x31')](_0x2c59e7,_0x93a7('0x8c')),function(_0x3eadf8){return _[_0x93a7('0x8d')](_0x289dc1,_0x3eadf8);});if(_0x2682e6){return _0xe407f9['id'];}}}));}}return BPromise[_0x93a7('0x8e')](_0x1dd2d6)[_0x93a7('0x24')](function(_0x10b077){_0x4d7be2=_(_0x4d7be2)[_0x93a7('0x8f')](_0x10b077)['compact']()[_0x93a7('0x2b')]();return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x55f1f3[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](function(_0x2b6063){return db['sequelize'][_0x93a7('0x72')](function(_0x4e851c){return _0x2b6063['removeTeams'](_0x55f1f3[_0x93a7('0x36')]['ids'],{'transaction':_0x4e851c})[_0x93a7('0x24')](function(){if(!_[_0x93a7('0x90')](_0x4d7be2)){return _0x2b6063[_0x93a7('0x91')](_0x4d7be2,{'transaction':_0x4e851c})[_0x93a7('0x24')](function(){return db[_0x93a7('0x76')][_0x93a7('0x25')]({'where':{'VoiceQueueId':_0x55f1f3[_0x93a7('0x47')]['id'],'UserId':_0x4d7be2},'transaction':_0x4e851c});});}})[_0x93a7('0x24')](function(){_0x4d7be2[_0x93a7('0x70')](function(_0x20eaed){socket['emit'](_0x93a7('0x92'),{'UserId':_0x20eaed,'VoiceQueueId':_0x2b6063['id']});});});});});});})[_0x93a7('0x24')](respondWithStatusCode(_0x3ec515,null))[_0x93a7('0x45')](handleError(_0x3ec515,null));};exports[_0x93a7('0x93')]=function(_0x3cd41f,_0x171f27,_0x582e7f){var _0x18bbd2,_0x35ad92;return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x3cd41f[_0x93a7('0x47')]['id']}})['then'](handleEntityNotFound(_0x171f27,null))[_0x93a7('0x24')](function(_0x4d5d7b){if(_0x4d5d7b){_0x35ad92=_0x4d5d7b;return _0x4d5d7b[_0x93a7('0x93')](_0x3cd41f[_0x93a7('0x59')][_0x93a7('0x7c')],_['omit'](_0x3cd41f[_0x93a7('0x59')],[_0x93a7('0x7c'),'id'])||{})['spread'](function(_0x13ba34){for(var _0x2a47e6=0x0;_0x2a47e6<_0x3cd41f[_0x93a7('0x59')][_0x93a7('0x7c')]['length'];_0x2a47e6+=0x1){socket[_0x93a7('0x94')](_0x93a7('0x7a'),{'UserId':_0x3cd41f[_0x93a7('0x59')]['ids'][_0x2a47e6],'VoiceQueueId':_0x3cd41f[_0x93a7('0x47')]['id']});}return _0x13ba34;});}})[_0x93a7('0x24')](function(_0x1674cc){_0x18bbd2=_0x1674cc||[];if(_0x35ad92){return db[_0x93a7('0x6b')]['findAll']({'where':{'id':_0x3cd41f[_0x93a7('0x59')]['ids']},'attributes':['id','name','online',_0x93a7('0x95'),'interface'],'raw':!![]});}})['then'](function(_0x380779){if(!_['isEmpty'](_0x380779)){var _0x4ff912=[];for(var _0x18bc8f=0x0;_0x18bc8f<_0x380779[_0x93a7('0x3b')];_0x18bc8f++){if(_0x380779[_0x18bc8f][_0x93a7('0x6d')]){_0x4ff912[_0x93a7('0x86')](db[_0x93a7('0x76')][_0x93a7('0x77')]({'membername':_0x380779[_0x18bc8f][_0x93a7('0x30')],'UserId':_0x380779[_0x18bc8f]['id'],'queue_name':_0x35ad92[_0x93a7('0x30')],'VoiceQueueId':_0x35ad92['id'],'interface':_[_0x93a7('0x78')](_0x380779[_0x18bc8f][_0x93a7('0x6e')])?util['format'](_0x93a7('0x79'),_0x380779[_0x18bc8f][_0x93a7('0x30')]):_0x380779[_0x18bc8f]['interface'],'paused':_0x380779[_0x18bc8f][_0x93a7('0x95')]||![],'penalty':_0x3cd41f[_0x93a7('0x59')][_0x93a7('0x71')]||0x0}));}}return BPromise['all'](_0x4ff912);}})[_0x93a7('0x24')](function(){return _0x18bbd2;})['then'](respondWithResult(_0x171f27,null))['catch'](handleError(_0x171f27,null));};exports[_0x93a7('0x91')]=function(_0x569747,_0x554372,_0x5ed615){return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x569747[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x554372,null))[_0x93a7('0x24')](function(_0x10133b){if(_0x10133b){return _0x10133b['removeAgents'](_0x569747[_0x93a7('0x36')][_0x93a7('0x7c')])[_0x93a7('0x24')](function(){if(_[_0x93a7('0x96')](_0x569747['query'][_0x93a7('0x7c')])){for(var _0x47925d=0x0;_0x47925d<_0x569747[_0x93a7('0x36')][_0x93a7('0x7c')][_0x93a7('0x3b')];_0x47925d+=0x1){socket[_0x93a7('0x94')](_0x93a7('0x92'),{'UserId':Number(_0x569747[_0x93a7('0x36')]['ids'][_0x47925d]),'VoiceQueueId':Number(_0x569747['params']['id'])});}}else{socket[_0x93a7('0x94')]('userVoiceQueue:remove',{'UserId':Number(_0x569747[_0x93a7('0x36')][_0x93a7('0x7c')]),'VoiceQueueId':Number(_0x569747[_0x93a7('0x47')]['id'])});}});}})[_0x93a7('0x24')](function(_0x102467){return db['UserVoiceQueueRt']['destroy']({'where':{'VoiceQueueId':_0x569747[_0x93a7('0x47')]['id'],'UserId':_0x569747[_0x93a7('0x36')][_0x93a7('0x7c')]}})[_0x93a7('0x24')](function(){return _0x102467;});})[_0x93a7('0x24')](respondWithStatusCode(_0x554372,null))[_0x93a7('0x45')](handleError(_0x554372,null));};exports[_0x93a7('0x97')]=function(_0x43dfcd,_0x53b3c7,_0x128042){var _0x2728b4={};var _0x372960={};var _0x121f53;var _0xff5131;return db['VoiceQueue'][_0x93a7('0x5d')]({'where':{'id':_0x43dfcd[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x53b3c7,null))['then'](function(_0x423397){if(_0x423397){_0x121f53=_0x423397;_0x372960[_0x93a7('0x35')]=_['keys'](db[_0x93a7('0x6b')][_0x93a7('0x55')]);_0x372960[_0x93a7('0x36')]=_[_0x93a7('0x48')](_0x43dfcd[_0x93a7('0x36')]);_0x372960['filters']=_[_0x93a7('0x38')](_0x372960['model'],_0x372960['query']);_0x2728b4['attributes']=_['intersection'](_0x372960[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x43dfcd[_0x93a7('0x36')][_0x93a7('0x3a')]));_0x2728b4['attributes']=_0x2728b4[_0x93a7('0x39')][_0x93a7('0x3b')]?_0x2728b4[_0x93a7('0x39')]:_0x372960[_0x93a7('0x35')];_0x2728b4[_0x93a7('0x3e')]=qs[_0x93a7('0x3f')](_0x43dfcd[_0x93a7('0x36')][_0x93a7('0x3f')]);_0x2728b4[_0x93a7('0x40')]=qs[_0x93a7('0x37')](_['pick'](_0x43dfcd[_0x93a7('0x36')],_0x372960[_0x93a7('0x37')]));if(_0x43dfcd[_0x93a7('0x36')][_0x93a7('0x29')]){_0x2728b4[_0x93a7('0x40')]=_[_0x93a7('0x42')](_0x2728b4['where'],{'$or':_[_0x93a7('0x31')](_0x2728b4[_0x93a7('0x39')],function(_0x238ad0){var _0x235238={};_0x235238[_0x238ad0]={'$like':'%'+_0x43dfcd[_0x93a7('0x36')][_0x93a7('0x29')]+'%'};return _0x235238;})});}_0x2728b4=_['merge']({},_0x2728b4,_0x43dfcd[_0x93a7('0x49')]);return _0x121f53[_0x93a7('0x97')](_0x2728b4);}})['then'](function(_0x2fb3c3){if(_0x2fb3c3){_0xff5131=_0x2fb3c3[_0x93a7('0x3b')];if(!_0x43dfcd[_0x93a7('0x36')][_0x93a7('0x3c')](_0x93a7('0x3d'))){_0x2728b4['limit']=qs['limit'](_0x43dfcd['query']['limit']);_0x2728b4[_0x93a7('0x1e')]=qs[_0x93a7('0x1e')](_0x43dfcd['query'][_0x93a7('0x1e')]);}return _0x121f53[_0x93a7('0x97')](_0x2728b4);}})[_0x93a7('0x24')](function(_0x2d2af6){if(_0x2d2af6){return _0x2d2af6?{'count':_0xff5131,'rows':_0x2d2af6}:null;}})[_0x93a7('0x24')](respondWithResult(_0x53b3c7,null))[_0x93a7('0x45')](handleError(_0x53b3c7,null));};exports['getMembers']=function(_0x4f4a07,_0x332d3c,_0x3e5a77){var _0x1fb431={};var _0x7e65ef={};var _0x5481c5;var _0xf86cf8;return db[_0x93a7('0x32')]['findOne']({'where':{'id':_0x4f4a07['params']['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x332d3c,null))[_0x93a7('0x24')](function(_0x158ea6){if(_0x158ea6){_0x5481c5=_0x158ea6;_0x7e65ef[_0x93a7('0x35')]=_[_0x93a7('0x48')](db[_0x93a7('0x76')][_0x93a7('0x55')]);_0x7e65ef['query']=_[_0x93a7('0x48')](_0x4f4a07['query']);_0x7e65ef[_0x93a7('0x37')]=_[_0x93a7('0x38')](_0x7e65ef[_0x93a7('0x35')],_0x7e65ef[_0x93a7('0x36')]);_0x1fb431[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x7e65ef['model'],qs[_0x93a7('0x3a')](_0x4f4a07[_0x93a7('0x36')][_0x93a7('0x3a')]));_0x1fb431[_0x93a7('0x39')]=_0x1fb431[_0x93a7('0x39')][_0x93a7('0x3b')]?_0x1fb431['attributes']:_0x7e65ef[_0x93a7('0x35')];_0x1fb431['order']=qs['sort'](_0x4f4a07['query'][_0x93a7('0x3f')]);_0x1fb431[_0x93a7('0x40')]=qs[_0x93a7('0x37')](_['pick'](_0x4f4a07['query'],_0x7e65ef['filters']));if(_0x4f4a07[_0x93a7('0x36')][_0x93a7('0x29')]){_0x1fb431[_0x93a7('0x40')]=_[_0x93a7('0x42')](_0x1fb431[_0x93a7('0x40')],{'$or':_[_0x93a7('0x31')](_0x1fb431[_0x93a7('0x39')],function(_0x1b04a3){var _0x5e9a82={};_0x5e9a82[_0x1b04a3]={'$like':'%'+_0x4f4a07['query'][_0x93a7('0x29')]+'%'};return _0x5e9a82;})});}_0x1fb431=_[_0x93a7('0x42')]({},_0x1fb431,_0x4f4a07[_0x93a7('0x49')]);return _0x5481c5[_0x93a7('0x98')](_0x1fb431);}})[_0x93a7('0x24')](function(_0x457cea){if(_0x457cea){_0xf86cf8=_0x457cea[_0x93a7('0x3b')];if(!_0x4f4a07[_0x93a7('0x36')]['hasOwnProperty'](_0x93a7('0x3d'))){_0x1fb431[_0x93a7('0x1f')]=qs[_0x93a7('0x1f')](_0x4f4a07[_0x93a7('0x36')][_0x93a7('0x1f')]);_0x1fb431[_0x93a7('0x1e')]=qs[_0x93a7('0x1e')](_0x4f4a07[_0x93a7('0x36')][_0x93a7('0x1e')]);}return _0x5481c5[_0x93a7('0x98')](_0x1fb431);}})['then'](function(_0x3b5a71){return _0x3b5a71?{'count':_0xf86cf8,'rows':_0x3b5a71}:null;})[_0x93a7('0x24')](respondWithResult(_0x332d3c,null))['catch'](handleError(_0x332d3c,null));};exports[_0x93a7('0x99')]=function(_0x2d638c,_0xcaf5ed,_0x5a4eb8){var _0x55bf6a={};var _0x2205b7={};var _0x2018b7;var _0x2a0664;return db[_0x93a7('0x32')][_0x93a7('0x5d')]({'where':{'id':_0x2d638c[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0xcaf5ed,null))[_0x93a7('0x24')](function(_0x51525b){if(_0x51525b){_0x2018b7=_0x51525b;_0x2205b7[_0x93a7('0x35')]=_[_0x93a7('0x48')](db[_0x93a7('0x9a')][_0x93a7('0x55')]);_0x2205b7[_0x93a7('0x36')]=_[_0x93a7('0x48')](_0x2d638c[_0x93a7('0x36')]);_0x2205b7[_0x93a7('0x37')]=_[_0x93a7('0x38')](_0x2205b7[_0x93a7('0x35')],_0x2205b7['query']);_0x55bf6a[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x2205b7['model'],qs[_0x93a7('0x3a')](_0x2d638c['query']['fields']));_0x55bf6a[_0x93a7('0x39')]=_0x55bf6a[_0x93a7('0x39')]['length']?_0x55bf6a['attributes']:_0x2205b7[_0x93a7('0x35')];_0x55bf6a[_0x93a7('0x3e')]=qs[_0x93a7('0x3f')](_0x2d638c[_0x93a7('0x36')][_0x93a7('0x3f')]);_0x55bf6a['where']=qs[_0x93a7('0x37')](_['pick'](_0x2d638c[_0x93a7('0x36')],_0x2205b7[_0x93a7('0x37')]));if(_0x2d638c[_0x93a7('0x36')][_0x93a7('0x29')]){_0x55bf6a[_0x93a7('0x40')]=_[_0x93a7('0x42')](_0x55bf6a[_0x93a7('0x40')],{'$or':_[_0x93a7('0x31')](_0x55bf6a[_0x93a7('0x39')],function(_0x52d0b9){var _0x1ea061={};_0x1ea061[_0x52d0b9]={'$like':'%'+_0x2d638c[_0x93a7('0x36')][_0x93a7('0x29')]+'%'};return _0x1ea061;})});}_0x55bf6a=_[_0x93a7('0x42')]({},_0x55bf6a,_0x2d638c[_0x93a7('0x49')]);return _0x2018b7[_0x93a7('0x99')](_0x55bf6a);}})[_0x93a7('0x24')](function(_0x2421cf){if(_0x2421cf){_0x2a0664=_0x2421cf['length'];if(!_0x2d638c['query'][_0x93a7('0x3c')](_0x93a7('0x3d'))){_0x55bf6a[_0x93a7('0x1f')]=qs[_0x93a7('0x1f')](_0x2d638c[_0x93a7('0x36')][_0x93a7('0x1f')]);_0x55bf6a[_0x93a7('0x1e')]=qs['offset'](_0x2d638c[_0x93a7('0x36')]['offset']);}return _0x2018b7['getLists'](_0x55bf6a);}})[_0x93a7('0x24')](function(_0xe566cb){if(_0xe566cb){return _0xe566cb?{'count':_0x2a0664,'rows':_0xe566cb}:null;}})[_0x93a7('0x24')](respondWithResult(_0xcaf5ed,null))[_0x93a7('0x45')](handleError(_0xcaf5ed,null));};exports[_0x93a7('0x9b')]=function(_0x57257f,_0x249696,_0xac4d82){var _0x32455b,_0x2e0d42;return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x57257f[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x249696,null))[_0x93a7('0x24')](function(_0x3c26be){if(_0x3c26be){_0x2e0d42=_0x3c26be;return _0x3c26be[_0x93a7('0x9b')](_0x57257f[_0x93a7('0x59')]['ids'],_[_0x93a7('0x56')](_0x57257f['body'],[_0x93a7('0x7c'),'id'])||{});}return null;})['spread'](function(_0x3ae7ed){var _0x2d2ea5;_0x32455b=_0x3ae7ed||[];var _0x1b537c=[];if(_0x3ae7ed){for(var _0x29b5e8=0x0;_0x29b5e8<_0x3ae7ed[_0x93a7('0x3b')];_0x29b5e8+=0x1){var _0x42858a=_0x3ae7ed[_0x29b5e8][_0x93a7('0x26')]({'plain':!![]});_0x2e0d42[_0x93a7('0x9c')]=_0x57257f[_0x93a7('0x59')][_0x93a7('0x9c')]?_0x57257f[_0x93a7('0x59')][_0x93a7('0x9c')]:_0x2e0d42[_0x93a7('0x9c')];switch(_0x2e0d42[_0x93a7('0x9c')]){case _0x93a7('0x9d'):_0x2d2ea5=squel[_0x93a7('0x9e')]()[_0x93a7('0x9f')]('cm_hopper')[_0x93a7('0xa0')](['phone',_0x93a7('0xa1'),_0x93a7('0xa2'),_0x93a7('0xa3'),'VoiceQueueId',_0x93a7('0x57'),_0x93a7('0x58')],squel[_0x93a7('0x7d')]()['field'](_0x93a7('0xa4'),_0x93a7('0xa4'))['field'](_0x93a7('0xa5'),_0x93a7('0xa1'))[_0x93a7('0x7e')]('id',_0x93a7('0xa2'))['field'](_0x42858a[_0x93a7('0xa6')][_0x93a7('0x87')](),_0x93a7('0xa3'))[_0x93a7('0x7e')](_0x57257f['params']['id']['toString'](),'VoiceQueueId')[_0x93a7('0x7e')](_0x93a7('0xa5'),_0x93a7('0x57'))[_0x93a7('0x7e')](_0x93a7('0xa5'),_0x93a7('0x58'))['from'](_0x93a7('0xa7'))[_0x93a7('0x40')](_0x93a7('0xa8'))[_0x93a7('0x40')]('ListId\x20=\x20?',_0x42858a[_0x93a7('0xa6')]['toString']())['where'](_0x93a7('0xa9'))[_0x93a7('0x40')](_0x93a7('0xaa'),squel[_0x93a7('0x7d')]()[_0x93a7('0x7e')](_0x93a7('0xab'))['from'](_0x93a7('0xac'))[_0x93a7('0x40')](_0x93a7('0x84'),_0x57257f[_0x93a7('0x47')]['id'][_0x93a7('0x87')]()))[_0x93a7('0x40')](_0x93a7('0xaa'),squel[_0x93a7('0x7d')]()[_0x93a7('0x7e')](_0x93a7('0xad'))[_0x93a7('0x80')](_0x93a7('0xae'))[_0x93a7('0x40')](_0x93a7('0x84'),_0x57257f['params']['id'][_0x93a7('0x87')]())))[_0x93a7('0x87')]();break;case _0x93a7('0xaf'):_0x2d2ea5=squel['insert']()[_0x93a7('0x9f')](_0x93a7('0xae'))[_0x93a7('0xa0')]([_0x93a7('0xa4'),_0x93a7('0xa1'),_0x93a7('0xa2'),_0x93a7('0xa3'),_0x93a7('0x5e'),_0x93a7('0x57'),_0x93a7('0x58')],squel[_0x93a7('0x7d')]()[_0x93a7('0x7e')](_0x93a7('0xa4'),'phone')[_0x93a7('0x7e')](_0x93a7('0xa5'),_0x93a7('0xa1'))[_0x93a7('0x7e')]('id',_0x93a7('0xa2'))[_0x93a7('0x7e')](_0x42858a[_0x93a7('0xa6')][_0x93a7('0x87')](),_0x93a7('0xa3'))[_0x93a7('0x7e')](_0x57257f[_0x93a7('0x47')]['id']['toString'](),_0x93a7('0x5e'))[_0x93a7('0x7e')]('NOW()',_0x93a7('0x57'))[_0x93a7('0x7e')]('NOW()',_0x93a7('0x58'))['from']('cm_contacts')['where']('deletedAt\x20IS\x20NULL')['where'](_0x93a7('0xb0'),_0x42858a[_0x93a7('0xa6')][_0x93a7('0x87')]())[_0x93a7('0x40')](_0x93a7('0xa9'))[_0x93a7('0x40')](_0x93a7('0xaa'),squel['select']()['field']('COALESCE(phone,\x27\x27)')['from'](_0x93a7('0xae'))[_0x93a7('0x40')](_0x93a7('0x84'),_0x57257f['params']['id']['toString']())))[_0x93a7('0x87')]();break;default:_0x2d2ea5=squel[_0x93a7('0x9e')]()['into'](_0x93a7('0xae'))[_0x93a7('0xa0')](['phone',_0x93a7('0xa1'),_0x93a7('0xa2'),_0x93a7('0xa3'),_0x93a7('0x5e'),_0x93a7('0x57'),'updatedAt'],squel[_0x93a7('0x7d')]()[_0x93a7('0x7e')]('phone',_0x93a7('0xa4'))['field'](_0x93a7('0xa5'),_0x93a7('0xa1'))[_0x93a7('0x7e')]('id',_0x93a7('0xa2'))[_0x93a7('0x7e')](_0x42858a['CmListId'][_0x93a7('0x87')](),_0x93a7('0xa3'))['field'](_0x57257f[_0x93a7('0x47')]['id']['toString'](),_0x93a7('0x5e'))['field'](_0x93a7('0xa5'),'createdAt')[_0x93a7('0x7e')](_0x93a7('0xa5'),_0x93a7('0x58'))[_0x93a7('0x80')](_0x93a7('0xa7'))[_0x93a7('0x40')]('deletedAt\x20IS\x20NULL')[_0x93a7('0x40')](_0x93a7('0xb0'),_0x42858a[_0x93a7('0xa6')][_0x93a7('0x87')]())[_0x93a7('0x40')](_0x93a7('0xa9')))[_0x93a7('0x87')]();}_0x1b537c[_0x93a7('0x86')](db[_0x93a7('0x88')][_0x93a7('0x36')](_0x2d2ea5));}return BPromise[_0x93a7('0x8e')](_0x1b537c);}})[_0x93a7('0x24')](function(){return _0x32455b;})[_0x93a7('0x24')](respondWithResult(_0x249696,null))['catch'](handleError(_0x249696,null));};exports[_0x93a7('0xb1')]=function(_0xd9f120,_0x1d1d2f,_0x209280){return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0xd9f120[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x1d1d2f,null))['then'](function(_0xd7e6a4){if(_0xd7e6a4){return _0xd7e6a4['removeLists'](_0xd9f120[_0x93a7('0x36')]['ids']);}})['then'](function(_0x57c20c){if(_0x57c20c){return db['CmHopper'][_0x93a7('0x25')]({'where':{'ListId':_0xd9f120[_0x93a7('0x36')][_0x93a7('0x7c')],'VoiceQueueId':_0xd9f120[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](function(){return _0x57c20c;});}})[_0x93a7('0x24')](respondWithStatusCode(_0x1d1d2f,null))[_0x93a7('0x45')](handleError(_0x1d1d2f,null));};exports[_0x93a7('0xb2')]=function(_0x234a28,_0x70e7ae,_0x12e2da){var _0x1321a5={};var _0x5a5d10={};var _0x42afab;var _0x543dfb;return db[_0x93a7('0x32')]['findOne']({'where':{'id':_0x234a28['params']['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x70e7ae,null))['then'](function(_0x367e8b){if(_0x367e8b){_0x42afab=_0x367e8b;_0x5a5d10[_0x93a7('0x35')]=_[_0x93a7('0x48')](db[_0x93a7('0x9a')][_0x93a7('0x55')]);_0x5a5d10[_0x93a7('0x36')]=_['keys'](_0x234a28[_0x93a7('0x36')]);_0x5a5d10['filters']=_[_0x93a7('0x38')](_0x5a5d10[_0x93a7('0x35')],_0x5a5d10[_0x93a7('0x36')]);_0x1321a5[_0x93a7('0x39')]=_[_0x93a7('0x38')](_0x5a5d10[_0x93a7('0x35')],qs[_0x93a7('0x3a')](_0x234a28[_0x93a7('0x36')][_0x93a7('0x3a')]));_0x1321a5[_0x93a7('0x39')]=_0x1321a5['attributes'][_0x93a7('0x3b')]?_0x1321a5['attributes']:_0x5a5d10[_0x93a7('0x35')];_0x1321a5['order']=qs['sort'](_0x234a28[_0x93a7('0x36')][_0x93a7('0x3f')]);_0x1321a5[_0x93a7('0x40')]=qs[_0x93a7('0x37')](_['pick'](_0x234a28['query'],_0x5a5d10[_0x93a7('0x37')]));if(_0x234a28[_0x93a7('0x36')][_0x93a7('0x29')]){_0x1321a5[_0x93a7('0x40')]=_[_0x93a7('0x42')](_0x1321a5[_0x93a7('0x40')],{'$or':_[_0x93a7('0x31')](_0x1321a5[_0x93a7('0x39')],function(_0x13f0eb){var _0x4f2c9b={};_0x4f2c9b[_0x13f0eb]={'$like':'%'+_0x234a28[_0x93a7('0x36')][_0x93a7('0x29')]+'%'};return _0x4f2c9b;})});}_0x1321a5=_['merge']({},_0x1321a5,_0x234a28[_0x93a7('0x49')]);return _0x42afab[_0x93a7('0xb2')](_0x1321a5);}})[_0x93a7('0x24')](function(_0x52bb34){if(_0x52bb34){_0x543dfb=_0x52bb34[_0x93a7('0x3b')];if(!_0x234a28['query'][_0x93a7('0x3c')]('nolimit')){_0x1321a5['limit']=qs[_0x93a7('0x1f')](_0x234a28[_0x93a7('0x36')][_0x93a7('0x1f')]);_0x1321a5['offset']=qs[_0x93a7('0x1e')](_0x234a28[_0x93a7('0x36')][_0x93a7('0x1e')]);}return _0x42afab[_0x93a7('0xb2')](_0x1321a5);}})['then'](function(_0x2514a3){if(_0x2514a3){return _0x2514a3?{'count':_0x543dfb,'rows':_0x2514a3}:null;}})['then'](respondWithResult(_0x70e7ae,null))[_0x93a7('0x45')](handleError(_0x70e7ae,null));};exports[_0x93a7('0xb3')]=function(_0x5f11ad,_0x583b25,_0x11ba23){var _0xa13ee0,_0x1bfa72;return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x5f11ad[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x583b25,null))['then'](function(_0x1ac91a){if(_0x1ac91a){_0x1bfa72=_0x1ac91a;return _0x1ac91a[_0x93a7('0xb3')](_0x5f11ad[_0x93a7('0x59')][_0x93a7('0x7c')],_[_0x93a7('0x56')](_0x5f11ad['body'],[_0x93a7('0x7c'),'id'])||{});}return null;})[_0x93a7('0xb4')](function(_0x4ae865){var _0x1a1653;_0xa13ee0=_0x4ae865||[];var _0x1f6b09=[];if(_0x4ae865){for(var _0x32af62=0x0;_0x32af62<_0x4ae865['length'];_0x32af62+=0x1){var _0x1d6ce4=_0x4ae865[_0x32af62][_0x93a7('0x26')]({'plain':!![]});_0x1a1653=squel[_0x93a7('0x9e')]()['into'](_0x93a7('0xb5'))[_0x93a7('0xa0')]([_0x93a7('0xa4'),_0x93a7('0xa2'),'ListId',_0x93a7('0x5e'),_0x93a7('0x57'),_0x93a7('0x58')],squel['select']()[_0x93a7('0x7e')](_0x93a7('0xa4'),_0x93a7('0xa4'))['field']('id',_0x93a7('0xa2'))['field'](_0x1d6ce4[_0x93a7('0xa6')]['toString'](),_0x93a7('0xa3'))[_0x93a7('0x7e')](_0x5f11ad[_0x93a7('0x47')]['id'][_0x93a7('0x87')](),'VoiceQueueId')[_0x93a7('0x7e')](_0x93a7('0xa5'),_0x93a7('0x57'))[_0x93a7('0x7e')](_0x93a7('0xa5'),_0x93a7('0x58'))[_0x93a7('0x80')]('cm_contacts')[_0x93a7('0x40')](_0x93a7('0xa8'))[_0x93a7('0x40')](_0x93a7('0xb0'),_0x1d6ce4[_0x93a7('0xa6')][_0x93a7('0x87')]())[_0x93a7('0x40')](_0x93a7('0xa9')))[_0x93a7('0x87')]();_0x1f6b09['push'](db[_0x93a7('0x88')]['query'](_0x1a1653));}return BPromise[_0x93a7('0x8e')](_0x1f6b09);}})[_0x93a7('0x24')](function(){return _0xa13ee0;})[_0x93a7('0x24')](respondWithResult(_0x583b25,null))['catch'](handleError(_0x583b25,null));};exports[_0x93a7('0xb6')]=function(_0x4ee5be,_0x45cf67,_0x1f0099){return db[_0x93a7('0x32')][_0x93a7('0x2d')]({'where':{'id':_0x4ee5be[_0x93a7('0x47')]['id']}})[_0x93a7('0x24')](handleEntityNotFound(_0x45cf67,null))[_0x93a7('0x24')](function(_0x121667){if(_0x121667){return _0x121667[_0x93a7('0xb6')](_0x4ee5be['query']['ids']);}})[_0x93a7('0x24')](function(_0x120dea){if(_0x120dea){return db['CmHopperBlack']['destroy']({'where':{'ListId':_0x4ee5be['query']['ids'],'VoiceQueueId':_0x4ee5be[_0x93a7('0x47')]['id']}})['then'](function(){return _0x120dea;});}})['then'](respondWithStatusCode(_0x45cf67,null))[_0x93a7('0x45')](handleError(_0x45cf67,null));};
\ No newline at end of file
+var _0xd4f4=['outbound','filter','map','value','includes','type','UserProfileResource','destroy','end','error','name','index','VoiceQueue','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filters','pick','merge','where','options','count','includeAll','include','findAll','rows','catch','show','params','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','inbound','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','updatedAt','role','VoiceQueues','update','getHoppers','findOne','CmHopper','VoiceQueueId','CmHopperHistory','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','Team','getTeams','addTeams','teams','voicePause','interface','flatMap','Agents','forEach','penalty','each','UserVoiceQueueRt','isNil','format','SIP/%s','emit','userVoiceQueue:save','removeTeams','User','select','field','from','team_has_voice_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','sequelize','SELECT','TeamId','union','compact','transaction','ids','isEmpty','removeAgents','userVoiceQueue:remove','addAgents','spread','online','upsert','all','isArray','getAgents','getMembers','getLists','dialCheckDuplicateType','always','insert','into','fromQuery','phone','scheduledAt','ContactId','ListId','NOW()','CmListId','toString','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper','onlyIfOpen','COALESCE(phone,\x27\x27)','createdAt','removeLists','CmList','getBlackLists','addBlackLists','removeBlackLists','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','localhost','socket.io-emitter','./voiceQueue.socket','register','sendStatus','status','json','offset','limit','apply','reject','save','then','get','QueueCampaigns'];(function(_0x2c6456,_0x2d218e){var _0x3691d2=function(_0x4050e5){while(--_0x4050e5){_0x2c6456['push'](_0x2c6456['shift']());}};_0x3691d2(++_0x2d218e);}(_0xd4f4,0x8b));var _0x4d4f=function(_0x38e545,_0x36c8ec){_0x38e545=_0x38e545-0x0;var _0x5727f8=_0xd4f4[_0x38e545];return _0x5727f8;};'use strict';var pdf=require(_0x4d4f('0x0'));var emlformat=require(_0x4d4f('0x1'));var rimraf=require(_0x4d4f('0x2'));var zipdir=require(_0x4d4f('0x3'));var jsonpatch=require(_0x4d4f('0x4'));var rp=require(_0x4d4f('0x5'));var moment=require(_0x4d4f('0x6'));var BPromise=require(_0x4d4f('0x7'));var Mustache=require(_0x4d4f('0x8'));var util=require(_0x4d4f('0x9'));var path=require(_0x4d4f('0xa'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x4d4f('0xb'));var squel=require(_0x4d4f('0xc'));var crypto=require(_0x4d4f('0xd'));var jsforce=require(_0x4d4f('0xe'));var deskjs=require(_0x4d4f('0xf'));var toCsv=require(_0x4d4f('0x10'));var querystring=require(_0x4d4f('0x11'));var Papa=require(_0x4d4f('0x12'));var Redis=require(_0x4d4f('0x13'));var authService=require(_0x4d4f('0x14'));var qs=require(_0x4d4f('0x15'));var as=require(_0x4d4f('0x16'));var hardwareService=require(_0x4d4f('0x17'));var logger=require(_0x4d4f('0x18'))(_0x4d4f('0x19'));var utils=require(_0x4d4f('0x1a'));var config=require(_0x4d4f('0x1b'));var db=require(_0x4d4f('0x1c'))['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x4d4f('0x1d'),'port':0x18eb});var socket=require(_0x4d4f('0x1e'))(new Redis(config['redis']));require(_0x4d4f('0x1f'))[_0x4d4f('0x20')](socket);function respondWithStatusCode(_0x1878b6,_0x59252c){_0x59252c=_0x59252c||0xcc;return function(_0x145804){if(_0x145804){return _0x1878b6[_0x4d4f('0x21')](_0x59252c);}return _0x1878b6[_0x4d4f('0x22')](_0x59252c)['end']();};}function respondWithResult(_0x59bfb5,_0x5e4ff5){_0x5e4ff5=_0x5e4ff5||0xc8;return function(_0x18a528){if(_0x18a528){return _0x59bfb5[_0x4d4f('0x22')](_0x5e4ff5)[_0x4d4f('0x23')](_0x18a528);}};}function respondWithFilteredResult(_0x5aec1b,_0x30b6b1){return function(_0x17a437){if(_0x17a437){var _0x51dcf1=_0x17a437['count'],_0x5dbbeb=_0x30b6b1[_0x4d4f('0x24')],_0x519501=_0x30b6b1[_0x4d4f('0x24')]+_0x30b6b1[_0x4d4f('0x25')],_0x5a58af;if(_0x519501>=_0x51dcf1){_0x519501=_0x51dcf1;_0x5a58af=0xc8;}else{_0x5a58af=0xce;}_0x5aec1b[_0x4d4f('0x22')](_0x5a58af);return _0x5aec1b['set']('Content-Range',_0x5dbbeb+'-'+_0x519501+'/'+_0x51dcf1)[_0x4d4f('0x23')](_0x17a437);}return null;};}function patchUpdates(_0x4dd360){return function(_0x34a232){try{jsonpatch[_0x4d4f('0x26')](_0x34a232,_0x4dd360,!![]);}catch(_0x3d1e38){return BPromise[_0x4d4f('0x27')](_0x3d1e38);}return _0x34a232[_0x4d4f('0x28')]();};}function saveUpdates(_0x5beab4,_0x570520){return function(_0x4043f2){if(_0x4043f2){return _0x4043f2['update'](_0x5beab4)[_0x4d4f('0x29')](function(_0x3d5d93){return _0x3d5d93;});}return null;};}function removeEntity(_0x2d2fb3,_0x3f4a55){return function(_0xf3f7a4){if(_0xf3f7a4){return _0xf3f7a4['destroy']()[_0x4d4f('0x29')](function(){var _0x312728=_0xf3f7a4[_0x4d4f('0x2a')]({'plain':!![]});var _0x28443b=[{'name':'VoiceQueues','value':'inbound','ignore':![]},{'name':_0x4d4f('0x2b'),'value':_0x4d4f('0x2c'),'ignore':![]}];var _0xa2492c=_(_0x28443b)[_0x4d4f('0x2d')]('ignore')[_0x4d4f('0x2e')](_0x4d4f('0x2f'))[_0x4d4f('0x2f')]();if(_[_0x4d4f('0x30')](_0xa2492c,_0x312728['type'])){return;}var _0x338ba2=_['find'](_0x28443b,[_0x4d4f('0x2f'),_0x312728[_0x4d4f('0x31')]])['name'];return db[_0x4d4f('0x32')][_0x4d4f('0x33')]({'where':{'type':_0x338ba2,'resourceId':_0x312728['id']}})[_0x4d4f('0x29')](function(){return _0xf3f7a4;});})[_0x4d4f('0x29')](function(){_0x2d2fb3[_0x4d4f('0x22')](0xcc)[_0x4d4f('0x34')]();});}};}function handleEntityNotFound(_0x4c69cb,_0x36eede){return function(_0x4578b6){if(!_0x4578b6){_0x4c69cb[_0x4d4f('0x21')](0x194);}return _0x4578b6;};}function handleError(_0x43c37b,_0x104104){_0x104104=_0x104104||0x1f4;return function(_0x4e47e5){logger[_0x4d4f('0x35')](_0x4e47e5['stack']);if(_0x4e47e5[_0x4d4f('0x36')]){delete _0x4e47e5['name'];}_0x43c37b['status'](_0x104104)['send'](_0x4e47e5);};}exports[_0x4d4f('0x37')]=function(_0x57fc2b,_0x16ccd2){var _0x151132={},_0x3202a5={},_0x4f79f9={'count':0x0,'rows':[]};var _0x8d18dc=_[_0x4d4f('0x2e')](db[_0x4d4f('0x38')]['rawAttributes'],function(_0x6a30c4){return{'name':_0x6a30c4['fieldName'],'type':_0x6a30c4[_0x4d4f('0x31')][_0x4d4f('0x39')]};});_0x3202a5[_0x4d4f('0x3a')]=_[_0x4d4f('0x2e')](_0x8d18dc,_0x4d4f('0x36'));_0x3202a5[_0x4d4f('0x3b')]=_[_0x4d4f('0x3c')](_0x57fc2b[_0x4d4f('0x3b')]);_0x3202a5['filters']=_['intersection'](_0x3202a5[_0x4d4f('0x3a')],_0x3202a5['query']);_0x151132['attributes']=_[_0x4d4f('0x3d')](_0x3202a5[_0x4d4f('0x3a')],qs[_0x4d4f('0x3e')](_0x57fc2b[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x151132['attributes']=_0x151132[_0x4d4f('0x3f')][_0x4d4f('0x40')]?_0x151132['attributes']:_0x3202a5[_0x4d4f('0x3a')];if(!_0x57fc2b[_0x4d4f('0x3b')][_0x4d4f('0x41')](_0x4d4f('0x42'))){_0x151132[_0x4d4f('0x25')]=qs[_0x4d4f('0x25')](_0x57fc2b[_0x4d4f('0x3b')][_0x4d4f('0x25')]);_0x151132[_0x4d4f('0x24')]=qs['offset'](_0x57fc2b['query'][_0x4d4f('0x24')]);}_0x151132[_0x4d4f('0x43')]=qs[_0x4d4f('0x44')](_0x57fc2b[_0x4d4f('0x3b')]['sort']);_0x151132['where']=qs[_0x4d4f('0x45')](_[_0x4d4f('0x46')](_0x57fc2b['query'],_0x3202a5['filters']));if(_0x57fc2b[_0x4d4f('0x3b')][_0x4d4f('0x2d')]){_0x151132['where']=_[_0x4d4f('0x47')](_0x151132[_0x4d4f('0x48')],{'$or':_[_0x4d4f('0x2e')](_0x8d18dc,function(_0x32c6ff){if(_0x32c6ff[_0x4d4f('0x31')]!=='VIRTUAL'){var _0x2b274e={};_0x2b274e[_0x32c6ff['name']]={'$like':'%'+_0x57fc2b[_0x4d4f('0x3b')][_0x4d4f('0x2d')]+'%'};return _0x2b274e;}})});}_0x151132=_['merge']({},_0x151132,_0x57fc2b[_0x4d4f('0x49')]);var _0x132c07={'where':_0x151132[_0x4d4f('0x48')]};return db['VoiceQueue'][_0x4d4f('0x4a')](_0x132c07)['then'](function(_0x5e083){_0x4f79f9['count']=_0x5e083;if(_0x57fc2b[_0x4d4f('0x3b')][_0x4d4f('0x4b')]){_0x151132[_0x4d4f('0x4c')]=[{'all':!![]}];}return db[_0x4d4f('0x38')][_0x4d4f('0x4d')](_0x151132);})['then'](function(_0x5f0d35){_0x4f79f9[_0x4d4f('0x4e')]=_0x5f0d35;return _0x4f79f9;})[_0x4d4f('0x29')](respondWithFilteredResult(_0x16ccd2,_0x151132))[_0x4d4f('0x4f')](handleError(_0x16ccd2,null));};exports[_0x4d4f('0x50')]=function(_0x5c0442,_0x54d0d5){var _0x59b4a2={'raw':![],'where':{'id':_0x5c0442[_0x4d4f('0x51')]['id']}},_0xc9da58={};_0xc9da58[_0x4d4f('0x3a')]=_[_0x4d4f('0x3c')](db[_0x4d4f('0x38')][_0x4d4f('0x52')]);_0xc9da58[_0x4d4f('0x3b')]=_[_0x4d4f('0x3c')](_0x5c0442[_0x4d4f('0x3b')]);_0xc9da58[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0xc9da58[_0x4d4f('0x3a')],_0xc9da58['query']);_0x59b4a2[_0x4d4f('0x3f')]=_[_0x4d4f('0x3d')](_0xc9da58['model'],qs[_0x4d4f('0x3e')](_0x5c0442['query'][_0x4d4f('0x3e')]));_0x59b4a2[_0x4d4f('0x3f')]=_0x59b4a2['attributes'][_0x4d4f('0x40')]?_0x59b4a2[_0x4d4f('0x3f')]:_0xc9da58[_0x4d4f('0x3a')];if(_0x5c0442[_0x4d4f('0x3b')][_0x4d4f('0x4b')]){_0x59b4a2[_0x4d4f('0x4c')]=[{'all':!![]}];}_0x59b4a2=_[_0x4d4f('0x47')]({},_0x59b4a2,_0x5c0442[_0x4d4f('0x49')]);return db[_0x4d4f('0x38')][_0x4d4f('0x53')](_0x59b4a2)[_0x4d4f('0x29')](handleEntityNotFound(_0x54d0d5,null))[_0x4d4f('0x29')](respondWithResult(_0x54d0d5,null))['catch'](handleError(_0x54d0d5,null));};exports[_0x4d4f('0x54')]=function(_0x539088,_0x59d245){return db['VoiceQueue'][_0x4d4f('0x54')](_0x539088[_0x4d4f('0x55')],{})['then'](function(_0x5f3252){var _0x2a3bc4=_0x539088[_0x4d4f('0x56')]['get']({'plain':!![]});if(!_0x2a3bc4)throw new Error(_0x4d4f('0x57'));if(_0x2a3bc4['role']===_0x4d4f('0x56')){var _0x3626e6=_0x5f3252[_0x4d4f('0x2a')]({'plain':!![]});var _0x2c29e0=[{'name':'VoiceQueues','value':_0x4d4f('0x58')},{'name':_0x4d4f('0x2b'),'value':_0x4d4f('0x2c')}];var _0xf430b0=_[_0x4d4f('0x53')](_0x2c29e0,['value',_0x3626e6[_0x4d4f('0x31')]])['name'];return db[_0x4d4f('0x59')]['find']({'where':{'name':_0xf430b0,'userProfileId':_0x2a3bc4[_0x4d4f('0x5a')]},'raw':!![]})[_0x4d4f('0x29')](function(_0x57f4b3){if(_0x57f4b3&&_0x57f4b3[_0x4d4f('0x5b')]===0x0){return db[_0x4d4f('0x32')]['create']({'name':_0x3626e6[_0x4d4f('0x36')],'resourceId':_0x3626e6['id'],'type':_0x57f4b3['name'],'sectionId':_0x57f4b3['id']},{})[_0x4d4f('0x29')](function(){return _0x5f3252;});}else{return _0x5f3252;}})['catch'](function(_0x48ad06){logger[_0x4d4f('0x35')](_0x4d4f('0x5c'),_0x48ad06);throw _0x48ad06;});}return _0x5f3252;})[_0x4d4f('0x29')](respondWithResult(_0x59d245,0xc9))[_0x4d4f('0x4f')](handleError(_0x59d245,null));};exports[_0x4d4f('0x5d')]=function(_0x57c928,_0x4aff5e){var _0xeaccdd={'where':{'id':_0x57c928[_0x4d4f('0x51')]['id']}},_0x52641a={};_0x52641a[_0x4d4f('0x3a')]=_[_0x4d4f('0x3c')](db[_0x4d4f('0x38')][_0x4d4f('0x52')]);_0xeaccdd[_0x4d4f('0x3f')]=_['intersection'](_0x52641a[_0x4d4f('0x3a')],qs[_0x4d4f('0x3e')](_0x57c928[_0x4d4f('0x3b')]['fields']));_0xeaccdd[_0x4d4f('0x3f')]=_0xeaccdd[_0x4d4f('0x3f')][_0x4d4f('0x40')]?_0xeaccdd['attributes']:_0x52641a[_0x4d4f('0x3a')];if(_0x57c928['query'][_0x4d4f('0x4b')]){_0xeaccdd[_0x4d4f('0x4c')]=[{'all':!![]}];}_0xeaccdd=_[_0x4d4f('0x47')]({},_0xeaccdd,_0x57c928[_0x4d4f('0x49')]);return db[_0x4d4f('0x38')][_0x4d4f('0x53')](_0xeaccdd)[_0x4d4f('0x29')](handleEntityNotFound(_0x4aff5e,null))[_0x4d4f('0x29')](function(_0xa64ebd){if(_0xa64ebd){var _0x537ab7=_0xa64ebd[_0x4d4f('0x2a')]({'plain':!![]});_0x537ab7=qs[_0x4d4f('0x5e')](_0x537ab7,['id','createdAt',_0x4d4f('0x5f')]);_0x57c928[_0x4d4f('0x55')]=_[_0x4d4f('0x5e')](_0x57c928[_0x4d4f('0x55')],['id','createdAt',_0x4d4f('0x5f')]);return db[_0x4d4f('0x38')]['create'](_['merge'](_0x537ab7,_0x57c928[_0x4d4f('0x55')]),{'include':_0x57c928[_0x4d4f('0x3b')]['includeAll']?[{'all':!![]}]:undefined})['then'](function(_0x4d34fc){var _0x4752bd=_0x57c928[_0x4d4f('0x56')]['get']({'plain':!![]});if(!_0x4752bd)throw new Error(_0x4d4f('0x57'));if(_0x4752bd[_0x4d4f('0x60')]===_0x4d4f('0x56')){var _0x46f2fb=_0x4d34fc[_0x4d4f('0x2a')]({'plain':!![]});var _0x3a0394=[{'name':_0x4d4f('0x61'),'value':_0x4d4f('0x58')},{'name':'QueueCampaigns','value':_0x4d4f('0x2c')}];var _0x4e4196=_[_0x4d4f('0x53')](_0x3a0394,[_0x4d4f('0x2f'),_0x46f2fb[_0x4d4f('0x31')]])['name'];return db[_0x4d4f('0x59')][_0x4d4f('0x53')]({'where':{'name':_0x4e4196,'userProfileId':_0x4752bd[_0x4d4f('0x5a')]},'raw':!![]})[_0x4d4f('0x29')](function(_0x4a18bc){if(_0x4a18bc&&_0x4a18bc[_0x4d4f('0x5b')]===0x0){return db['UserProfileResource'][_0x4d4f('0x54')]({'name':_0x46f2fb['name'],'resourceId':_0x46f2fb['id'],'type':_0x4a18bc['name'],'sectionId':_0x4a18bc['id']},{})[_0x4d4f('0x29')](function(){return _0x4d34fc;});}else{return _0x4d34fc;}})[_0x4d4f('0x4f')](function(_0x5dd9ff){logger[_0x4d4f('0x35')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5dd9ff);throw _0x5dd9ff;});}return _0x4d34fc;});}})[_0x4d4f('0x29')](respondWithResult(_0x4aff5e,0xc9))[_0x4d4f('0x4f')](handleError(_0x4aff5e,null));};exports[_0x4d4f('0x62')]=function(_0x3ce5d8,_0x575ad6){if(_0x3ce5d8[_0x4d4f('0x55')]['id']){delete _0x3ce5d8[_0x4d4f('0x55')]['id'];}return db[_0x4d4f('0x38')]['find']({'where':{'id':_0x3ce5d8[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x575ad6,null))[_0x4d4f('0x29')](saveUpdates(_0x3ce5d8[_0x4d4f('0x55')],null))[_0x4d4f('0x29')](respondWithResult(_0x575ad6,null))[_0x4d4f('0x4f')](handleError(_0x575ad6,null));};exports['destroy']=function(_0x4acf9f,_0x2ce3ce){return db[_0x4d4f('0x38')]['find']({'where':{'id':_0x4acf9f[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x2ce3ce,null))[_0x4d4f('0x29')](removeEntity(_0x2ce3ce,null))[_0x4d4f('0x4f')](handleError(_0x2ce3ce,null));};exports[_0x4d4f('0x63')]=function(_0x45000f,_0x431b5e,_0x1c764b){var _0x302cde={'raw':![],'where':{}};var _0x44f0c2={};var _0x4453c7={'count':0x0,'rows':[]};return db[_0x4d4f('0x38')][_0x4d4f('0x64')]({'where':{'id':_0x45000f[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x431b5e,null))['then'](function(_0x6d2191){if(_0x6d2191){_0x44f0c2[_0x4d4f('0x3a')]=_[_0x4d4f('0x3c')](db[_0x4d4f('0x65')]['rawAttributes']);_0x44f0c2['query']=_[_0x4d4f('0x3c')](_0x45000f[_0x4d4f('0x3b')]);_0x44f0c2[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0x44f0c2[_0x4d4f('0x3a')],_0x44f0c2[_0x4d4f('0x3b')]);_0x302cde[_0x4d4f('0x3f')]=_[_0x4d4f('0x3d')](_0x44f0c2[_0x4d4f('0x3a')],qs[_0x4d4f('0x3e')](_0x45000f['query'][_0x4d4f('0x3e')]));_0x302cde[_0x4d4f('0x3f')]=_0x302cde[_0x4d4f('0x3f')][_0x4d4f('0x40')]?_0x302cde['attributes']:_0x44f0c2['model'];if(!_0x45000f['query'][_0x4d4f('0x41')]('nolimit')){_0x302cde[_0x4d4f('0x25')]=qs[_0x4d4f('0x25')](_0x45000f[_0x4d4f('0x3b')][_0x4d4f('0x25')]);_0x302cde[_0x4d4f('0x24')]=qs[_0x4d4f('0x24')](_0x45000f[_0x4d4f('0x3b')][_0x4d4f('0x24')]);}_0x302cde['order']=qs['sort'](_0x45000f[_0x4d4f('0x3b')]['sort']);_0x302cde[_0x4d4f('0x48')]=qs[_0x4d4f('0x45')](_[_0x4d4f('0x46')](_0x45000f['query'],_0x44f0c2['filters']));_0x302cde['where'][_0x4d4f('0x66')]=_0x6d2191['id'];if(_0x45000f['query'][_0x4d4f('0x2d')]){_0x302cde['where']=_[_0x4d4f('0x47')](_0x302cde[_0x4d4f('0x48')],{'$or':_[_0x4d4f('0x2e')](_0x302cde[_0x4d4f('0x3f')],function(_0x348438){var _0x1670fd={};_0x1670fd[_0x348438]={'$like':'%'+_0x45000f['query'][_0x4d4f('0x2d')]+'%'};return _0x1670fd;})});}_0x302cde=_[_0x4d4f('0x47')]({},_0x302cde,_0x45000f[_0x4d4f('0x49')]);return db[_0x4d4f('0x65')][_0x4d4f('0x4a')]({'where':_0x302cde['where']})[_0x4d4f('0x29')](function(_0x493f00){_0x4453c7[_0x4d4f('0x4a')]=_0x493f00;if(_0x45000f[_0x4d4f('0x3b')][_0x4d4f('0x4b')]){_0x302cde[_0x4d4f('0x4c')]=[{'all':!![]}];}return db[_0x4d4f('0x65')][_0x4d4f('0x4d')](_0x302cde);})[_0x4d4f('0x29')](function(_0x5a0e5d){_0x4453c7[_0x4d4f('0x4e')]=_0x5a0e5d;return _0x4453c7;});}})[_0x4d4f('0x29')](respondWithFilteredResult(_0x431b5e,_0x302cde))[_0x4d4f('0x4f')](handleError(_0x431b5e,null));};exports['getHopperHistories']=function(_0x16ad7a,_0x48d400,_0x460ae1){var _0x529cb8={'raw':!![],'where':{}};var _0x9a2d62={};var _0x20e632={'count':0x0,'rows':[]};return db[_0x4d4f('0x38')]['findOne']({'where':{'id':_0x16ad7a[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x48d400,null))[_0x4d4f('0x29')](function(_0x521d24){if(_0x521d24){_0x9a2d62['model']=_[_0x4d4f('0x3c')](db[_0x4d4f('0x67')]['rawAttributes']);_0x9a2d62[_0x4d4f('0x3b')]=_[_0x4d4f('0x3c')](_0x16ad7a[_0x4d4f('0x3b')]);_0x9a2d62[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0x9a2d62[_0x4d4f('0x3a')],_0x9a2d62['query']);_0x529cb8[_0x4d4f('0x3f')]=_[_0x4d4f('0x3d')](_0x9a2d62['model'],qs[_0x4d4f('0x3e')](_0x16ad7a[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x529cb8[_0x4d4f('0x3f')]=_0x529cb8[_0x4d4f('0x3f')][_0x4d4f('0x40')]?_0x529cb8[_0x4d4f('0x3f')]:_0x9a2d62[_0x4d4f('0x3a')];if(!_0x16ad7a['query'][_0x4d4f('0x41')](_0x4d4f('0x42'))){_0x529cb8['limit']=qs[_0x4d4f('0x25')](_0x16ad7a['query'][_0x4d4f('0x25')]);_0x529cb8['offset']=qs[_0x4d4f('0x24')](_0x16ad7a[_0x4d4f('0x3b')][_0x4d4f('0x24')]);}_0x529cb8[_0x4d4f('0x43')]=qs[_0x4d4f('0x44')](_0x16ad7a[_0x4d4f('0x3b')][_0x4d4f('0x44')]);_0x529cb8[_0x4d4f('0x48')]=qs[_0x4d4f('0x45')](_[_0x4d4f('0x46')](_0x16ad7a[_0x4d4f('0x3b')],_0x9a2d62[_0x4d4f('0x45')]));_0x529cb8['where']['VoiceQueueId']=_0x521d24['id'];if(_0x16ad7a[_0x4d4f('0x3b')]['filter']){_0x529cb8[_0x4d4f('0x48')]=_[_0x4d4f('0x47')](_0x529cb8['where'],{'$or':_['map'](_0x529cb8[_0x4d4f('0x3f')],function(_0x300cc5){var _0x3c898a={};_0x3c898a[_0x300cc5]={'$like':'%'+_0x16ad7a['query']['filter']+'%'};return _0x3c898a;})});}_0x529cb8=_[_0x4d4f('0x47')]({},_0x529cb8,_0x16ad7a[_0x4d4f('0x49')]);return db[_0x4d4f('0x67')][_0x4d4f('0x4a')]({'where':_0x529cb8['where']})[_0x4d4f('0x29')](function(_0x35fb03){_0x20e632[_0x4d4f('0x4a')]=_0x35fb03;if(_0x16ad7a['query']['includeAll']){_0x529cb8[_0x4d4f('0x4c')]=[{'all':!![]}];}return db[_0x4d4f('0x67')][_0x4d4f('0x4d')](_0x529cb8);})[_0x4d4f('0x29')](function(_0x20e29a){_0x20e632['rows']=_0x20e29a;return _0x20e632;});}})[_0x4d4f('0x29')](respondWithFilteredResult(_0x48d400,_0x529cb8))[_0x4d4f('0x4f')](handleError(_0x48d400,null));};exports[_0x4d4f('0x68')]=function(_0x4ad1a3,_0x39cdc4,_0x5ec3eb){var _0x236c08={'raw':!![],'where':{}};var _0x2e4015={};var _0x1ffc34={'count':0x0,'rows':[]};return db[_0x4d4f('0x38')][_0x4d4f('0x64')]({'where':{'id':_0x4ad1a3['params']['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x39cdc4,null))[_0x4d4f('0x29')](function(_0x3f0fc4){if(_0x3f0fc4){_0x2e4015[_0x4d4f('0x3a')]=_['keys'](db[_0x4d4f('0x69')]['rawAttributes']);_0x2e4015['query']=_[_0x4d4f('0x3c')](_0x4ad1a3[_0x4d4f('0x3b')]);_0x2e4015['filters']=_[_0x4d4f('0x3d')](_0x2e4015['model'],_0x2e4015[_0x4d4f('0x3b')]);_0x236c08[_0x4d4f('0x3f')]=_[_0x4d4f('0x3d')](_0x2e4015[_0x4d4f('0x3a')],qs[_0x4d4f('0x3e')](_0x4ad1a3[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x236c08[_0x4d4f('0x3f')]=_0x236c08['attributes'][_0x4d4f('0x40')]?_0x236c08[_0x4d4f('0x3f')]:_0x2e4015['model'];if(!_0x4ad1a3[_0x4d4f('0x3b')]['hasOwnProperty'](_0x4d4f('0x42'))){_0x236c08[_0x4d4f('0x25')]=qs[_0x4d4f('0x25')](_0x4ad1a3['query']['limit']);_0x236c08['offset']=qs[_0x4d4f('0x24')](_0x4ad1a3['query'][_0x4d4f('0x24')]);}_0x236c08[_0x4d4f('0x43')]=qs[_0x4d4f('0x44')](_0x4ad1a3['query']['sort']);_0x236c08[_0x4d4f('0x48')]=qs[_0x4d4f('0x45')](_[_0x4d4f('0x46')](_0x4ad1a3[_0x4d4f('0x3b')],_0x2e4015[_0x4d4f('0x45')]));_0x236c08[_0x4d4f('0x48')]['VoiceQueueId']=_0x3f0fc4['id'];if(_0x4ad1a3[_0x4d4f('0x3b')][_0x4d4f('0x2d')]){_0x236c08[_0x4d4f('0x48')]=_[_0x4d4f('0x47')](_0x236c08[_0x4d4f('0x48')],{'$or':_[_0x4d4f('0x2e')](_0x236c08[_0x4d4f('0x3f')],function(_0x85b007){var _0x1a1e6f={};_0x1a1e6f[_0x85b007]={'$like':'%'+_0x4ad1a3[_0x4d4f('0x3b')][_0x4d4f('0x2d')]+'%'};return _0x1a1e6f;})});}_0x236c08=_[_0x4d4f('0x47')]({},_0x236c08,_0x4ad1a3[_0x4d4f('0x49')]);return db[_0x4d4f('0x69')]['count']({'where':_0x236c08[_0x4d4f('0x48')]})[_0x4d4f('0x29')](function(_0x42ec0b){_0x1ffc34[_0x4d4f('0x4a')]=_0x42ec0b;if(_0x4ad1a3[_0x4d4f('0x3b')][_0x4d4f('0x4b')]){_0x236c08[_0x4d4f('0x4c')]=[{'all':!![]}];}return db[_0x4d4f('0x69')][_0x4d4f('0x4d')](_0x236c08);})['then'](function(_0xcadde2){_0x1ffc34[_0x4d4f('0x4e')]=_0xcadde2;return _0x1ffc34;});}})[_0x4d4f('0x29')](respondWithFilteredResult(_0x39cdc4,_0x236c08))[_0x4d4f('0x4f')](handleError(_0x39cdc4,null));};exports[_0x4d4f('0x6a')]=function(_0xd22d78,_0x28c128,_0x28fd35){var _0x18206d={'raw':!![],'where':{}};var _0x2536e0={};var _0x5c3e11={'count':0x0,'rows':[]};return db['VoiceQueue'][_0x4d4f('0x64')]({'where':{'id':_0xd22d78[_0x4d4f('0x51')]['id']}})['then'](handleEntityNotFound(_0x28c128,null))[_0x4d4f('0x29')](function(_0x3c0804){if(_0x3c0804){_0x2536e0[_0x4d4f('0x3a')]=_[_0x4d4f('0x3c')](db[_0x4d4f('0x6b')][_0x4d4f('0x52')]);_0x2536e0[_0x4d4f('0x3b')]=_[_0x4d4f('0x3c')](_0xd22d78[_0x4d4f('0x3b')]);_0x2536e0[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0x2536e0[_0x4d4f('0x3a')],_0x2536e0[_0x4d4f('0x3b')]);_0x18206d[_0x4d4f('0x3f')]=_['intersection'](_0x2536e0[_0x4d4f('0x3a')],qs['fields'](_0xd22d78[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x18206d[_0x4d4f('0x3f')]=_0x18206d[_0x4d4f('0x3f')]['length']?_0x18206d[_0x4d4f('0x3f')]:_0x2536e0[_0x4d4f('0x3a')];if(!_0xd22d78[_0x4d4f('0x3b')][_0x4d4f('0x41')](_0x4d4f('0x42'))){_0x18206d[_0x4d4f('0x25')]=qs[_0x4d4f('0x25')](_0xd22d78['query'][_0x4d4f('0x25')]);_0x18206d[_0x4d4f('0x24')]=qs[_0x4d4f('0x24')](_0xd22d78[_0x4d4f('0x3b')][_0x4d4f('0x24')]);}_0x18206d[_0x4d4f('0x43')]=qs['sort'](_0xd22d78['query'][_0x4d4f('0x44')]);_0x18206d['where']=qs[_0x4d4f('0x45')](_[_0x4d4f('0x46')](_0xd22d78['query'],_0x2536e0[_0x4d4f('0x45')]));_0x18206d[_0x4d4f('0x48')][_0x4d4f('0x66')]=_0x3c0804['id'];if(_0xd22d78[_0x4d4f('0x3b')][_0x4d4f('0x2d')]){_0x18206d[_0x4d4f('0x48')]=_[_0x4d4f('0x47')](_0x18206d['where'],{'$or':_[_0x4d4f('0x2e')](_0x18206d['attributes'],function(_0x2758bf){var _0x2d1337={};_0x2d1337[_0x2758bf]={'$like':'%'+_0xd22d78['query']['filter']+'%'};return _0x2d1337;})});}_0x18206d=_[_0x4d4f('0x47')]({},_0x18206d,_0xd22d78[_0x4d4f('0x49')]);return db[_0x4d4f('0x6b')]['count']({'where':_0x18206d[_0x4d4f('0x48')]})[_0x4d4f('0x29')](function(_0x7c1b06){_0x5c3e11[_0x4d4f('0x4a')]=_0x7c1b06;if(_0xd22d78[_0x4d4f('0x3b')][_0x4d4f('0x4b')]){_0x18206d[_0x4d4f('0x4c')]=[{'all':!![]}];}return db[_0x4d4f('0x6b')][_0x4d4f('0x4d')](_0x18206d);})['then'](function(_0x305272){_0x5c3e11[_0x4d4f('0x4e')]=_0x305272;return _0x5c3e11;});}})[_0x4d4f('0x29')](respondWithFilteredResult(_0x28c128,_0x18206d))[_0x4d4f('0x4f')](handleError(_0x28c128,null));};exports['getTeams']=function(_0x14d9d0,_0x5da3cc,_0x4e6485){var _0x432847={};var _0x2c6f09={};var _0x31984b;var _0x3de9b3;return db[_0x4d4f('0x38')][_0x4d4f('0x64')]({'where':{'id':_0x14d9d0[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x5da3cc,null))[_0x4d4f('0x29')](function(_0x5b5bcc){if(_0x5b5bcc){_0x31984b=_0x5b5bcc;_0x2c6f09[_0x4d4f('0x3a')]=_['keys'](db[_0x4d4f('0x6c')][_0x4d4f('0x52')]);_0x2c6f09[_0x4d4f('0x3b')]=_[_0x4d4f('0x3c')](_0x14d9d0[_0x4d4f('0x3b')]);_0x2c6f09[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0x2c6f09[_0x4d4f('0x3a')],_0x2c6f09[_0x4d4f('0x3b')]);_0x432847[_0x4d4f('0x3f')]=_[_0x4d4f('0x3d')](_0x2c6f09['model'],qs[_0x4d4f('0x3e')](_0x14d9d0[_0x4d4f('0x3b')]['fields']));_0x432847[_0x4d4f('0x3f')]=_0x432847[_0x4d4f('0x3f')][_0x4d4f('0x40')]?_0x432847[_0x4d4f('0x3f')]:_0x2c6f09[_0x4d4f('0x3a')];_0x432847[_0x4d4f('0x43')]=qs['sort'](_0x14d9d0[_0x4d4f('0x3b')][_0x4d4f('0x44')]);_0x432847[_0x4d4f('0x48')]=qs['filters'](_[_0x4d4f('0x46')](_0x14d9d0[_0x4d4f('0x3b')],_0x2c6f09['filters']));if(_0x14d9d0['query'][_0x4d4f('0x2d')]){_0x432847['where']=_[_0x4d4f('0x47')](_0x432847[_0x4d4f('0x48')],{'$or':_[_0x4d4f('0x2e')](_0x432847[_0x4d4f('0x3f')],function(_0x361da6){var _0x1c5605={};_0x1c5605[_0x361da6]={'$like':'%'+_0x14d9d0[_0x4d4f('0x3b')]['filter']+'%'};return _0x1c5605;})});}_0x432847=_[_0x4d4f('0x47')]({},_0x432847,_0x14d9d0['options']);return _0x31984b[_0x4d4f('0x6d')](_0x432847);}})[_0x4d4f('0x29')](function(_0x53c98c){if(_0x53c98c){_0x3de9b3=_0x53c98c['length'];if(!_0x14d9d0[_0x4d4f('0x3b')]['hasOwnProperty']('nolimit')){_0x432847['limit']=qs[_0x4d4f('0x25')](_0x14d9d0[_0x4d4f('0x3b')]['limit']);_0x432847['offset']=qs[_0x4d4f('0x24')](_0x14d9d0[_0x4d4f('0x3b')][_0x4d4f('0x24')]);}return _0x31984b[_0x4d4f('0x6d')](_0x432847);}})[_0x4d4f('0x29')](function(_0x259120){if(_0x259120){return _0x259120?{'count':_0x3de9b3,'rows':_0x259120}:null;}})[_0x4d4f('0x29')](respondWithResult(_0x5da3cc,null))[_0x4d4f('0x4f')](handleError(_0x5da3cc,null));};exports[_0x4d4f('0x6e')]=function(_0x151939,_0x3957ce,_0x106854){var _0x5cd60a=_0x151939[_0x4d4f('0x55')][_0x4d4f('0x6f')];var _0x3831d7=_[_0x4d4f('0x2e')](_0x5cd60a,'id');return db[_0x4d4f('0x6c')]['findAll']({'where':{'id':_0x3831d7},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0x4d4f('0x36'),'online',_0x4d4f('0x70'),_0x4d4f('0x71')],'raw':!![]}]})[_0x4d4f('0x29')](function(_0x2f9bda){if(_0x2f9bda){var _0x39f03c=_[_0x4d4f('0x72')](_0x2f9bda,function(_0x53f116){var _0x399a82=_0x53f116[_0x4d4f('0x2a')]({'plain':!![]});_0x399a82[_0x4d4f('0x73')][_0x4d4f('0x74')](function(_0x321949){_0x321949[_0x4d4f('0x75')]=_['find'](_0x5cd60a,{'id':_0x399a82['id']})['penalty'];});return _0x399a82[_0x4d4f('0x73')];});return db['VoiceQueue'][_0x4d4f('0x53')]({'where':{'id':_0x151939[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](function(_0x6a31bd){return db['sequelize']['transaction'](function(_0x59a27e){return _0x6a31bd[_0x4d4f('0x6e')](_0x3831d7,{'transaction':_0x59a27e})['then'](function(){return BPromise[_0x4d4f('0x76')](_0x39f03c,function(_0x42e132){return db['UserVoiceQueue']['findOrCreate']({'where':{'UserId':_0x42e132['id'],'VoiceQueueId':_0x151939[_0x4d4f('0x51')]['id']},'defaults':{'penalty':_0x42e132[_0x4d4f('0x75')]},'transaction':_0x59a27e});});})[_0x4d4f('0x29')](function(){return BPromise[_0x4d4f('0x76')](_['filter'](_0x39f03c,{'online':!![]}),function(_0x43f540){return db[_0x4d4f('0x77')]['upsert']({'membername':_0x43f540[_0x4d4f('0x36')],'UserId':_0x43f540['id'],'queue_name':_0x6a31bd[_0x4d4f('0x36')],'VoiceQueueId':_0x6a31bd['id'],'interface':_[_0x4d4f('0x78')](_0x43f540[_0x4d4f('0x71')])?util[_0x4d4f('0x79')](_0x4d4f('0x7a'),_0x43f540[_0x4d4f('0x36')]):_0x43f540[_0x4d4f('0x71')],'paused':_0x43f540['voicePause']||![],'penalty':_0x43f540['penalty']},{'transaction':_0x59a27e});});})[_0x4d4f('0x29')](function(){_0x39f03c[_0x4d4f('0x74')](function(_0x22aac0){socket[_0x4d4f('0x7b')](_0x4d4f('0x7c'),{'UserId':_0x22aac0['id'],'VoiceQueueId':_0x6a31bd['id']});});});});});}})[_0x4d4f('0x29')](respondWithStatusCode(_0x3957ce,null))[_0x4d4f('0x4f')](handleError(_0x3957ce,null));};exports[_0x4d4f('0x7d')]=function(_0x340b4a,_0x1690da,_0x7e2521){return db[_0x4d4f('0x6c')]['findAll']({'where':{'id':_0x340b4a[_0x4d4f('0x3b')]['ids']},'attributes':['id'],'include':[{'model':db[_0x4d4f('0x7e')],'as':_0x4d4f('0x73'),'attributes':['id'],'raw':!![]}]})[_0x4d4f('0x29')](handleEntityNotFound(_0x1690da,null))[_0x4d4f('0x29')](function(_0x4c8d20){var _0x3b5394=_[_0x4d4f('0x2e')](_0x4c8d20,'id');var _0x490129=[];var _0x4784e9=[];var _0x4bcf19=squel[_0x4d4f('0x7f')]();_0x4bcf19[_0x4d4f('0x80')]('tq.TeamId')[_0x4d4f('0x81')](_0x4d4f('0x82'),'tq')[_0x4d4f('0x83')](_0x4d4f('0x84'),'ut',_0x4d4f('0x85'))['where'](_0x4d4f('0x86'),_0x340b4a['params']['id']);for(var _0x3ece9f=0x0;_0x3ece9f<_0x4c8d20[_0x4d4f('0x40')];_0x3ece9f+=0x1){let _0xfdf741=_0x4c8d20[_0x3ece9f];for(var _0xb79d8b=0x0;_0xb79d8b<_0xfdf741[_0x4d4f('0x73')][_0x4d4f('0x40')];_0xb79d8b+=0x1){let _0x5b3117=_0xfdf741[_0x4d4f('0x73')][_0xb79d8b];var _0x597719=_0x4bcf19['clone']();_0x597719['where'](_0x4d4f('0x87'),_0x5b3117['id']);_0x4784e9[_0x4d4f('0x88')](db[_0x4d4f('0x89')][_0x4d4f('0x3b')](_0x597719['toString'](),{'type':db['sequelize']['QueryTypes'][_0x4d4f('0x8a')]})['then'](function(_0x417fc3){if(_0x417fc3[_0x4d4f('0x40')]===0x1){return _0x5b3117['id'];}else{var _0x2bb8ac=_['every'](_['map'](_0x417fc3,_0x4d4f('0x8b')),function(_0x32451e){return _[_0x4d4f('0x30')](_0x3b5394,_0x32451e);});if(_0x2bb8ac){return _0x5b3117['id'];}}}));}}return BPromise['all'](_0x4784e9)[_0x4d4f('0x29')](function(_0x26b95d){_0x490129=_(_0x490129)[_0x4d4f('0x8c')](_0x26b95d)[_0x4d4f('0x8d')]()[_0x4d4f('0x2f')]();return db[_0x4d4f('0x38')]['find']({'where':{'id':_0x340b4a[_0x4d4f('0x51')]['id']}})['then'](function(_0x5f040b){return db['sequelize'][_0x4d4f('0x8e')](function(_0x31a3ff){return _0x5f040b['removeTeams'](_0x340b4a[_0x4d4f('0x3b')][_0x4d4f('0x8f')],{'transaction':_0x31a3ff})[_0x4d4f('0x29')](function(){if(!_[_0x4d4f('0x90')](_0x490129)){return _0x5f040b[_0x4d4f('0x91')](_0x490129,{'transaction':_0x31a3ff})[_0x4d4f('0x29')](function(){return db[_0x4d4f('0x77')]['destroy']({'where':{'VoiceQueueId':_0x340b4a[_0x4d4f('0x51')]['id'],'UserId':_0x490129},'transaction':_0x31a3ff});});}})[_0x4d4f('0x29')](function(){_0x490129['forEach'](function(_0x65b557){socket[_0x4d4f('0x7b')](_0x4d4f('0x92'),{'UserId':_0x65b557,'VoiceQueueId':_0x5f040b['id']});});});});});});})[_0x4d4f('0x29')](respondWithStatusCode(_0x1690da,null))[_0x4d4f('0x4f')](handleError(_0x1690da,null));};exports[_0x4d4f('0x93')]=function(_0x10c8f1,_0x30c5f3,_0x5d90f5){var _0x8aeb1b,_0x285ea7;return db[_0x4d4f('0x38')][_0x4d4f('0x53')]({'where':{'id':_0x10c8f1['params']['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x30c5f3,null))[_0x4d4f('0x29')](function(_0x1c3638){if(_0x1c3638){_0x285ea7=_0x1c3638;return _0x1c3638[_0x4d4f('0x93')](_0x10c8f1[_0x4d4f('0x55')][_0x4d4f('0x8f')],_[_0x4d4f('0x5e')](_0x10c8f1[_0x4d4f('0x55')],[_0x4d4f('0x8f'),'id'])||{})[_0x4d4f('0x94')](function(_0x36b731){for(var _0x58a6e4=0x0;_0x58a6e4<_0x10c8f1[_0x4d4f('0x55')][_0x4d4f('0x8f')][_0x4d4f('0x40')];_0x58a6e4+=0x1){socket[_0x4d4f('0x7b')](_0x4d4f('0x7c'),{'UserId':_0x10c8f1[_0x4d4f('0x55')][_0x4d4f('0x8f')][_0x58a6e4],'VoiceQueueId':_0x10c8f1[_0x4d4f('0x51')]['id']});}return _0x36b731;});}})[_0x4d4f('0x29')](function(_0x218c68){_0x8aeb1b=_0x218c68||[];if(_0x285ea7){return db[_0x4d4f('0x7e')]['findAll']({'where':{'id':_0x10c8f1[_0x4d4f('0x55')][_0x4d4f('0x8f')]},'attributes':['id',_0x4d4f('0x36'),_0x4d4f('0x95'),_0x4d4f('0x70'),_0x4d4f('0x71')],'raw':!![]});}})[_0x4d4f('0x29')](function(_0x1cca46){if(!_[_0x4d4f('0x90')](_0x1cca46)){var _0xfa58f3=[];for(var _0x589f37=0x0;_0x589f37<_0x1cca46[_0x4d4f('0x40')];_0x589f37++){if(_0x1cca46[_0x589f37][_0x4d4f('0x95')]){_0xfa58f3[_0x4d4f('0x88')](db[_0x4d4f('0x77')][_0x4d4f('0x96')]({'membername':_0x1cca46[_0x589f37][_0x4d4f('0x36')],'UserId':_0x1cca46[_0x589f37]['id'],'queue_name':_0x285ea7['name'],'VoiceQueueId':_0x285ea7['id'],'interface':_[_0x4d4f('0x78')](_0x1cca46[_0x589f37][_0x4d4f('0x71')])?util[_0x4d4f('0x79')](_0x4d4f('0x7a'),_0x1cca46[_0x589f37][_0x4d4f('0x36')]):_0x1cca46[_0x589f37]['interface'],'paused':_0x1cca46[_0x589f37][_0x4d4f('0x70')]||![],'penalty':_0x10c8f1[_0x4d4f('0x55')][_0x4d4f('0x75')]||0x0}));}}return BPromise[_0x4d4f('0x97')](_0xfa58f3);}})[_0x4d4f('0x29')](function(){return _0x8aeb1b;})[_0x4d4f('0x29')](respondWithResult(_0x30c5f3,null))[_0x4d4f('0x4f')](handleError(_0x30c5f3,null));};exports['removeAgents']=function(_0x2c9dd3,_0x161276,_0x1e7cca){return db[_0x4d4f('0x38')][_0x4d4f('0x53')]({'where':{'id':_0x2c9dd3[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x161276,null))['then'](function(_0x16d328){if(_0x16d328){return _0x16d328['removeAgents'](_0x2c9dd3[_0x4d4f('0x3b')]['ids'])[_0x4d4f('0x29')](function(){if(_[_0x4d4f('0x98')](_0x2c9dd3[_0x4d4f('0x3b')][_0x4d4f('0x8f')])){for(var _0x167680=0x0;_0x167680<_0x2c9dd3['query']['ids'][_0x4d4f('0x40')];_0x167680+=0x1){socket[_0x4d4f('0x7b')](_0x4d4f('0x92'),{'UserId':Number(_0x2c9dd3[_0x4d4f('0x3b')][_0x4d4f('0x8f')][_0x167680]),'VoiceQueueId':Number(_0x2c9dd3[_0x4d4f('0x51')]['id'])});}}else{socket[_0x4d4f('0x7b')](_0x4d4f('0x92'),{'UserId':Number(_0x2c9dd3[_0x4d4f('0x3b')][_0x4d4f('0x8f')]),'VoiceQueueId':Number(_0x2c9dd3[_0x4d4f('0x51')]['id'])});}});}})[_0x4d4f('0x29')](function(_0x1bc15e){return db[_0x4d4f('0x77')]['destroy']({'where':{'VoiceQueueId':_0x2c9dd3[_0x4d4f('0x51')]['id'],'UserId':_0x2c9dd3[_0x4d4f('0x3b')][_0x4d4f('0x8f')]}})[_0x4d4f('0x29')](function(){return _0x1bc15e;});})[_0x4d4f('0x29')](respondWithStatusCode(_0x161276,null))['catch'](handleError(_0x161276,null));};exports[_0x4d4f('0x99')]=function(_0x4c24f5,_0x55dfc1,_0x10a8e2){var _0x16f456={};var _0x342b34={};var _0x55690b;var _0x5a4cad;return db[_0x4d4f('0x38')][_0x4d4f('0x64')]({'where':{'id':_0x4c24f5[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x55dfc1,null))[_0x4d4f('0x29')](function(_0x18080b){if(_0x18080b){_0x55690b=_0x18080b;_0x342b34[_0x4d4f('0x3a')]=_[_0x4d4f('0x3c')](db[_0x4d4f('0x7e')][_0x4d4f('0x52')]);_0x342b34[_0x4d4f('0x3b')]=_['keys'](_0x4c24f5[_0x4d4f('0x3b')]);_0x342b34[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0x342b34[_0x4d4f('0x3a')],_0x342b34[_0x4d4f('0x3b')]);_0x16f456[_0x4d4f('0x3f')]=_[_0x4d4f('0x3d')](_0x342b34[_0x4d4f('0x3a')],qs[_0x4d4f('0x3e')](_0x4c24f5[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x16f456[_0x4d4f('0x3f')]=_0x16f456[_0x4d4f('0x3f')]['length']?_0x16f456['attributes']:_0x342b34[_0x4d4f('0x3a')];_0x16f456[_0x4d4f('0x43')]=qs[_0x4d4f('0x44')](_0x4c24f5['query'][_0x4d4f('0x44')]);_0x16f456[_0x4d4f('0x48')]=qs[_0x4d4f('0x45')](_[_0x4d4f('0x46')](_0x4c24f5[_0x4d4f('0x3b')],_0x342b34[_0x4d4f('0x45')]));if(_0x4c24f5['query'][_0x4d4f('0x2d')]){_0x16f456[_0x4d4f('0x48')]=_[_0x4d4f('0x47')](_0x16f456['where'],{'$or':_['map'](_0x16f456[_0x4d4f('0x3f')],function(_0xc55b35){var _0x5d1609={};_0x5d1609[_0xc55b35]={'$like':'%'+_0x4c24f5['query'][_0x4d4f('0x2d')]+'%'};return _0x5d1609;})});}_0x16f456=_[_0x4d4f('0x47')]({},_0x16f456,_0x4c24f5[_0x4d4f('0x49')]);return _0x55690b[_0x4d4f('0x99')](_0x16f456);}})[_0x4d4f('0x29')](function(_0x59d897){if(_0x59d897){_0x5a4cad=_0x59d897[_0x4d4f('0x40')];if(!_0x4c24f5['query'][_0x4d4f('0x41')]('nolimit')){_0x16f456['limit']=qs[_0x4d4f('0x25')](_0x4c24f5['query'][_0x4d4f('0x25')]);_0x16f456[_0x4d4f('0x24')]=qs[_0x4d4f('0x24')](_0x4c24f5[_0x4d4f('0x3b')][_0x4d4f('0x24')]);}return _0x55690b[_0x4d4f('0x99')](_0x16f456);}})[_0x4d4f('0x29')](function(_0xb57dcb){if(_0xb57dcb){return _0xb57dcb?{'count':_0x5a4cad,'rows':_0xb57dcb}:null;}})['then'](respondWithResult(_0x55dfc1,null))[_0x4d4f('0x4f')](handleError(_0x55dfc1,null));};exports['getMembers']=function(_0x1dad8e,_0x2f0996,_0x315eac){var _0x276f4f={};var _0x24298a={};var _0xfcb8b3;var _0x5004b1;return db['VoiceQueue'][_0x4d4f('0x64')]({'where':{'id':_0x1dad8e[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x2f0996,null))[_0x4d4f('0x29')](function(_0x5890eb){if(_0x5890eb){_0xfcb8b3=_0x5890eb;_0x24298a[_0x4d4f('0x3a')]=_[_0x4d4f('0x3c')](db[_0x4d4f('0x77')]['rawAttributes']);_0x24298a['query']=_[_0x4d4f('0x3c')](_0x1dad8e[_0x4d4f('0x3b')]);_0x24298a[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0x24298a['model'],_0x24298a['query']);_0x276f4f[_0x4d4f('0x3f')]=_['intersection'](_0x24298a[_0x4d4f('0x3a')],qs[_0x4d4f('0x3e')](_0x1dad8e[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x276f4f[_0x4d4f('0x3f')]=_0x276f4f[_0x4d4f('0x3f')]['length']?_0x276f4f[_0x4d4f('0x3f')]:_0x24298a[_0x4d4f('0x3a')];_0x276f4f['order']=qs[_0x4d4f('0x44')](_0x1dad8e[_0x4d4f('0x3b')]['sort']);_0x276f4f[_0x4d4f('0x48')]=qs['filters'](_[_0x4d4f('0x46')](_0x1dad8e[_0x4d4f('0x3b')],_0x24298a['filters']));if(_0x1dad8e[_0x4d4f('0x3b')]['filter']){_0x276f4f[_0x4d4f('0x48')]=_[_0x4d4f('0x47')](_0x276f4f['where'],{'$or':_[_0x4d4f('0x2e')](_0x276f4f[_0x4d4f('0x3f')],function(_0x5b9176){var _0x5ea5f9={};_0x5ea5f9[_0x5b9176]={'$like':'%'+_0x1dad8e[_0x4d4f('0x3b')][_0x4d4f('0x2d')]+'%'};return _0x5ea5f9;})});}_0x276f4f=_[_0x4d4f('0x47')]({},_0x276f4f,_0x1dad8e['options']);return _0xfcb8b3[_0x4d4f('0x9a')](_0x276f4f);}})[_0x4d4f('0x29')](function(_0x42d912){if(_0x42d912){_0x5004b1=_0x42d912[_0x4d4f('0x40')];if(!_0x1dad8e['query'][_0x4d4f('0x41')](_0x4d4f('0x42'))){_0x276f4f[_0x4d4f('0x25')]=qs[_0x4d4f('0x25')](_0x1dad8e[_0x4d4f('0x3b')][_0x4d4f('0x25')]);_0x276f4f[_0x4d4f('0x24')]=qs[_0x4d4f('0x24')](_0x1dad8e['query'][_0x4d4f('0x24')]);}return _0xfcb8b3['getMembers'](_0x276f4f);}})['then'](function(_0x5afd09){return _0x5afd09?{'count':_0x5004b1,'rows':_0x5afd09}:null;})[_0x4d4f('0x29')](respondWithResult(_0x2f0996,null))[_0x4d4f('0x4f')](handleError(_0x2f0996,null));};exports[_0x4d4f('0x9b')]=function(_0x5a30f3,_0x54177d,_0x411e90){var _0x36f3e5={};var _0x1028ec={};var _0x56db21;var _0x519d9a;return db['VoiceQueue'][_0x4d4f('0x64')]({'where':{'id':_0x5a30f3['params']['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x54177d,null))[_0x4d4f('0x29')](function(_0x344b1e){if(_0x344b1e){_0x56db21=_0x344b1e;_0x1028ec[_0x4d4f('0x3a')]=_[_0x4d4f('0x3c')](db['CmList'][_0x4d4f('0x52')]);_0x1028ec['query']=_[_0x4d4f('0x3c')](_0x5a30f3[_0x4d4f('0x3b')]);_0x1028ec[_0x4d4f('0x45')]=_[_0x4d4f('0x3d')](_0x1028ec[_0x4d4f('0x3a')],_0x1028ec[_0x4d4f('0x3b')]);_0x36f3e5['attributes']=_[_0x4d4f('0x3d')](_0x1028ec[_0x4d4f('0x3a')],qs[_0x4d4f('0x3e')](_0x5a30f3[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x36f3e5[_0x4d4f('0x3f')]=_0x36f3e5[_0x4d4f('0x3f')][_0x4d4f('0x40')]?_0x36f3e5['attributes']:_0x1028ec[_0x4d4f('0x3a')];_0x36f3e5[_0x4d4f('0x43')]=qs[_0x4d4f('0x44')](_0x5a30f3['query']['sort']);_0x36f3e5[_0x4d4f('0x48')]=qs[_0x4d4f('0x45')](_['pick'](_0x5a30f3[_0x4d4f('0x3b')],_0x1028ec[_0x4d4f('0x45')]));if(_0x5a30f3['query'][_0x4d4f('0x2d')]){_0x36f3e5[_0x4d4f('0x48')]=_[_0x4d4f('0x47')](_0x36f3e5[_0x4d4f('0x48')],{'$or':_[_0x4d4f('0x2e')](_0x36f3e5[_0x4d4f('0x3f')],function(_0x30369c){var _0x1e5b88={};_0x1e5b88[_0x30369c]={'$like':'%'+_0x5a30f3[_0x4d4f('0x3b')][_0x4d4f('0x2d')]+'%'};return _0x1e5b88;})});}_0x36f3e5=_[_0x4d4f('0x47')]({},_0x36f3e5,_0x5a30f3[_0x4d4f('0x49')]);return _0x56db21['getLists'](_0x36f3e5);}})['then'](function(_0x1e89b7){if(_0x1e89b7){_0x519d9a=_0x1e89b7[_0x4d4f('0x40')];if(!_0x5a30f3[_0x4d4f('0x3b')]['hasOwnProperty']('nolimit')){_0x36f3e5[_0x4d4f('0x25')]=qs[_0x4d4f('0x25')](_0x5a30f3['query'][_0x4d4f('0x25')]);_0x36f3e5['offset']=qs[_0x4d4f('0x24')](_0x5a30f3['query']['offset']);}return _0x56db21[_0x4d4f('0x9b')](_0x36f3e5);}})[_0x4d4f('0x29')](function(_0x4afaae){if(_0x4afaae){return _0x4afaae?{'count':_0x519d9a,'rows':_0x4afaae}:null;}})[_0x4d4f('0x29')](respondWithResult(_0x54177d,null))['catch'](handleError(_0x54177d,null));};exports['addLists']=function(_0x37bfeb,_0x5025ec,_0xb00206){var _0x28b085,_0x20b4d0;return db[_0x4d4f('0x38')][_0x4d4f('0x53')]({'where':{'id':_0x37bfeb[_0x4d4f('0x51')]['id']}})['then'](handleEntityNotFound(_0x5025ec,null))['then'](function(_0x45c419){if(_0x45c419){_0x20b4d0=_0x45c419;return _0x45c419['addLists'](_0x37bfeb['body'][_0x4d4f('0x8f')],_[_0x4d4f('0x5e')](_0x37bfeb[_0x4d4f('0x55')],[_0x4d4f('0x8f'),'id'])||{});}return null;})['spread'](function(_0x4974f2){var _0x257f34;_0x28b085=_0x4974f2||[];var _0x1b08ce=[];if(_0x4974f2){for(var _0x3d27e6=0x0;_0x3d27e6<_0x4974f2['length'];_0x3d27e6+=0x1){var _0x1e606a=_0x4974f2[_0x3d27e6]['get']({'plain':!![]});_0x20b4d0['dialCheckDuplicateType']=_0x37bfeb[_0x4d4f('0x55')][_0x4d4f('0x9c')]?_0x37bfeb[_0x4d4f('0x55')][_0x4d4f('0x9c')]:_0x20b4d0['dialCheckDuplicateType'];switch(_0x20b4d0[_0x4d4f('0x9c')]){case _0x4d4f('0x9d'):_0x257f34=squel[_0x4d4f('0x9e')]()[_0x4d4f('0x9f')]('cm_hopper')[_0x4d4f('0xa0')]([_0x4d4f('0xa1'),_0x4d4f('0xa2'),_0x4d4f('0xa3'),_0x4d4f('0xa4'),'VoiceQueueId','createdAt',_0x4d4f('0x5f')],squel[_0x4d4f('0x7f')]()[_0x4d4f('0x80')](_0x4d4f('0xa1'),'phone')[_0x4d4f('0x80')](_0x4d4f('0xa5'),'scheduledAt')[_0x4d4f('0x80')]('id','ContactId')[_0x4d4f('0x80')](_0x1e606a[_0x4d4f('0xa6')][_0x4d4f('0xa7')](),_0x4d4f('0xa4'))['field'](_0x37bfeb['params']['id']['toString'](),_0x4d4f('0x66'))['field'](_0x4d4f('0xa5'),'createdAt')[_0x4d4f('0x80')](_0x4d4f('0xa5'),_0x4d4f('0x5f'))[_0x4d4f('0x81')](_0x4d4f('0xa8'))['where'](_0x4d4f('0xa9'))[_0x4d4f('0x48')](_0x4d4f('0xaa'),_0x1e606a['CmListId'][_0x4d4f('0xa7')]())[_0x4d4f('0x48')](_0x4d4f('0xab'))[_0x4d4f('0x48')](_0x4d4f('0xac'),squel[_0x4d4f('0x7f')]()[_0x4d4f('0x80')](_0x4d4f('0xad'))[_0x4d4f('0x81')]('cm_hopper_final')[_0x4d4f('0x48')](_0x4d4f('0x86'),_0x37bfeb[_0x4d4f('0x51')]['id']['toString']()))['where'](_0x4d4f('0xac'),squel[_0x4d4f('0x7f')]()['field']('COALESCE(phone,\x27\x27)')['from'](_0x4d4f('0xae'))[_0x4d4f('0x48')](_0x4d4f('0x86'),_0x37bfeb[_0x4d4f('0x51')]['id'][_0x4d4f('0xa7')]())))[_0x4d4f('0xa7')]();break;case _0x4d4f('0xaf'):_0x257f34=squel[_0x4d4f('0x9e')]()['into'](_0x4d4f('0xae'))[_0x4d4f('0xa0')]([_0x4d4f('0xa1'),_0x4d4f('0xa2'),_0x4d4f('0xa3'),_0x4d4f('0xa4'),_0x4d4f('0x66'),'createdAt',_0x4d4f('0x5f')],squel['select']()[_0x4d4f('0x80')]('phone',_0x4d4f('0xa1'))[_0x4d4f('0x80')](_0x4d4f('0xa5'),'scheduledAt')[_0x4d4f('0x80')]('id',_0x4d4f('0xa3'))['field'](_0x1e606a[_0x4d4f('0xa6')][_0x4d4f('0xa7')](),_0x4d4f('0xa4'))[_0x4d4f('0x80')](_0x37bfeb['params']['id']['toString'](),'VoiceQueueId')['field'](_0x4d4f('0xa5'),'createdAt')[_0x4d4f('0x80')](_0x4d4f('0xa5'),_0x4d4f('0x5f'))[_0x4d4f('0x81')](_0x4d4f('0xa8'))[_0x4d4f('0x48')]('deletedAt\x20IS\x20NULL')[_0x4d4f('0x48')](_0x4d4f('0xaa'),_0x1e606a[_0x4d4f('0xa6')][_0x4d4f('0xa7')]())['where'](_0x4d4f('0xab'))[_0x4d4f('0x48')](_0x4d4f('0xac'),squel[_0x4d4f('0x7f')]()[_0x4d4f('0x80')](_0x4d4f('0xb0'))['from'](_0x4d4f('0xae'))[_0x4d4f('0x48')](_0x4d4f('0x86'),_0x37bfeb[_0x4d4f('0x51')]['id'][_0x4d4f('0xa7')]())))[_0x4d4f('0xa7')]();break;default:_0x257f34=squel[_0x4d4f('0x9e')]()[_0x4d4f('0x9f')](_0x4d4f('0xae'))[_0x4d4f('0xa0')]([_0x4d4f('0xa1'),_0x4d4f('0xa2'),_0x4d4f('0xa3'),_0x4d4f('0xa4'),'VoiceQueueId',_0x4d4f('0xb1'),_0x4d4f('0x5f')],squel[_0x4d4f('0x7f')]()[_0x4d4f('0x80')](_0x4d4f('0xa1'),_0x4d4f('0xa1'))[_0x4d4f('0x80')](_0x4d4f('0xa5'),_0x4d4f('0xa2'))['field']('id',_0x4d4f('0xa3'))['field'](_0x1e606a[_0x4d4f('0xa6')]['toString'](),_0x4d4f('0xa4'))['field'](_0x37bfeb[_0x4d4f('0x51')]['id'][_0x4d4f('0xa7')](),_0x4d4f('0x66'))[_0x4d4f('0x80')](_0x4d4f('0xa5'),_0x4d4f('0xb1'))['field'](_0x4d4f('0xa5'),'updatedAt')[_0x4d4f('0x81')]('cm_contacts')['where'](_0x4d4f('0xa9'))[_0x4d4f('0x48')]('ListId\x20=\x20?',_0x1e606a[_0x4d4f('0xa6')][_0x4d4f('0xa7')]())[_0x4d4f('0x48')](_0x4d4f('0xab')))[_0x4d4f('0xa7')]();}_0x1b08ce['push'](db['sequelize'][_0x4d4f('0x3b')](_0x257f34));}return BPromise[_0x4d4f('0x97')](_0x1b08ce);}})[_0x4d4f('0x29')](function(){return _0x28b085;})['then'](respondWithResult(_0x5025ec,null))[_0x4d4f('0x4f')](handleError(_0x5025ec,null));};exports[_0x4d4f('0xb2')]=function(_0x22a595,_0x2e099c,_0x9f77d7){return db[_0x4d4f('0x38')][_0x4d4f('0x53')]({'where':{'id':_0x22a595[_0x4d4f('0x51')]['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x2e099c,null))['then'](function(_0x3c34c0){if(_0x3c34c0){return _0x3c34c0[_0x4d4f('0xb2')](_0x22a595['query']['ids']);}})[_0x4d4f('0x29')](function(_0x1a2044){if(_0x1a2044){return db[_0x4d4f('0x65')][_0x4d4f('0x33')]({'where':{'ListId':_0x22a595[_0x4d4f('0x3b')][_0x4d4f('0x8f')],'VoiceQueueId':_0x22a595['params']['id']}})[_0x4d4f('0x29')](function(){return _0x1a2044;});}})[_0x4d4f('0x29')](respondWithStatusCode(_0x2e099c,null))[_0x4d4f('0x4f')](handleError(_0x2e099c,null));};exports['getBlackLists']=function(_0x330053,_0x1a846e,_0x4ee3ea){var _0x25573a={};var _0x5255c2={};var _0x55a374;var _0x5c9980;return db['VoiceQueue'][_0x4d4f('0x64')]({'where':{'id':_0x330053['params']['id']}})['then'](handleEntityNotFound(_0x1a846e,null))[_0x4d4f('0x29')](function(_0x43b57d){if(_0x43b57d){_0x55a374=_0x43b57d;_0x5255c2['model']=_['keys'](db[_0x4d4f('0xb3')][_0x4d4f('0x52')]);_0x5255c2[_0x4d4f('0x3b')]=_[_0x4d4f('0x3c')](_0x330053[_0x4d4f('0x3b')]);_0x5255c2[_0x4d4f('0x45')]=_['intersection'](_0x5255c2[_0x4d4f('0x3a')],_0x5255c2[_0x4d4f('0x3b')]);_0x25573a[_0x4d4f('0x3f')]=_['intersection'](_0x5255c2['model'],qs['fields'](_0x330053[_0x4d4f('0x3b')][_0x4d4f('0x3e')]));_0x25573a['attributes']=_0x25573a['attributes']['length']?_0x25573a[_0x4d4f('0x3f')]:_0x5255c2['model'];_0x25573a['order']=qs[_0x4d4f('0x44')](_0x330053[_0x4d4f('0x3b')]['sort']);_0x25573a['where']=qs[_0x4d4f('0x45')](_['pick'](_0x330053['query'],_0x5255c2[_0x4d4f('0x45')]));if(_0x330053['query'][_0x4d4f('0x2d')]){_0x25573a['where']=_[_0x4d4f('0x47')](_0x25573a['where'],{'$or':_[_0x4d4f('0x2e')](_0x25573a[_0x4d4f('0x3f')],function(_0x20303d){var _0x9b39d0={};_0x9b39d0[_0x20303d]={'$like':'%'+_0x330053['query']['filter']+'%'};return _0x9b39d0;})});}_0x25573a=_[_0x4d4f('0x47')]({},_0x25573a,_0x330053[_0x4d4f('0x49')]);return _0x55a374[_0x4d4f('0xb4')](_0x25573a);}})[_0x4d4f('0x29')](function(_0x286a3f){if(_0x286a3f){_0x5c9980=_0x286a3f[_0x4d4f('0x40')];if(!_0x330053[_0x4d4f('0x3b')]['hasOwnProperty'](_0x4d4f('0x42'))){_0x25573a[_0x4d4f('0x25')]=qs[_0x4d4f('0x25')](_0x330053[_0x4d4f('0x3b')][_0x4d4f('0x25')]);_0x25573a[_0x4d4f('0x24')]=qs[_0x4d4f('0x24')](_0x330053[_0x4d4f('0x3b')][_0x4d4f('0x24')]);}return _0x55a374[_0x4d4f('0xb4')](_0x25573a);}})[_0x4d4f('0x29')](function(_0x123dc6){if(_0x123dc6){return _0x123dc6?{'count':_0x5c9980,'rows':_0x123dc6}:null;}})[_0x4d4f('0x29')](respondWithResult(_0x1a846e,null))[_0x4d4f('0x4f')](handleError(_0x1a846e,null));};exports[_0x4d4f('0xb5')]=function(_0x4d50c0,_0x5069d1,_0x41d174){var _0x2d7626,_0x1b5e0d;return db[_0x4d4f('0x38')][_0x4d4f('0x53')]({'where':{'id':_0x4d50c0[_0x4d4f('0x51')]['id']}})['then'](handleEntityNotFound(_0x5069d1,null))[_0x4d4f('0x29')](function(_0x50460f){if(_0x50460f){_0x1b5e0d=_0x50460f;return _0x50460f[_0x4d4f('0xb5')](_0x4d50c0[_0x4d4f('0x55')][_0x4d4f('0x8f')],_['omit'](_0x4d50c0[_0x4d4f('0x55')],[_0x4d4f('0x8f'),'id'])||{});}return null;})['spread'](function(_0x333b3e){var _0x31dfff;_0x2d7626=_0x333b3e||[];var _0x7231c0=[];if(_0x333b3e){for(var _0x1f7fd4=0x0;_0x1f7fd4<_0x333b3e[_0x4d4f('0x40')];_0x1f7fd4+=0x1){var _0x47e90a=_0x333b3e[_0x1f7fd4][_0x4d4f('0x2a')]({'plain':!![]});_0x31dfff=squel[_0x4d4f('0x9e')]()[_0x4d4f('0x9f')]('cm_hopper_black')[_0x4d4f('0xa0')]([_0x4d4f('0xa1'),_0x4d4f('0xa3'),_0x4d4f('0xa4'),_0x4d4f('0x66'),_0x4d4f('0xb1'),_0x4d4f('0x5f')],squel[_0x4d4f('0x7f')]()['field'](_0x4d4f('0xa1'),_0x4d4f('0xa1'))[_0x4d4f('0x80')]('id','ContactId')[_0x4d4f('0x80')](_0x47e90a[_0x4d4f('0xa6')][_0x4d4f('0xa7')](),_0x4d4f('0xa4'))[_0x4d4f('0x80')](_0x4d50c0[_0x4d4f('0x51')]['id'][_0x4d4f('0xa7')](),_0x4d4f('0x66'))[_0x4d4f('0x80')]('NOW()',_0x4d4f('0xb1'))[_0x4d4f('0x80')](_0x4d4f('0xa5'),'updatedAt')[_0x4d4f('0x81')](_0x4d4f('0xa8'))[_0x4d4f('0x48')](_0x4d4f('0xa9'))[_0x4d4f('0x48')](_0x4d4f('0xaa'),_0x47e90a[_0x4d4f('0xa6')][_0x4d4f('0xa7')]())[_0x4d4f('0x48')](_0x4d4f('0xab')))['toString']();_0x7231c0[_0x4d4f('0x88')](db[_0x4d4f('0x89')][_0x4d4f('0x3b')](_0x31dfff));}return BPromise['all'](_0x7231c0);}})[_0x4d4f('0x29')](function(){return _0x2d7626;})[_0x4d4f('0x29')](respondWithResult(_0x5069d1,null))['catch'](handleError(_0x5069d1,null));};exports['removeBlackLists']=function(_0xd1b2cb,_0x499ff8,_0x3099a0){return db[_0x4d4f('0x38')][_0x4d4f('0x53')]({'where':{'id':_0xd1b2cb['params']['id']}})[_0x4d4f('0x29')](handleEntityNotFound(_0x499ff8,null))[_0x4d4f('0x29')](function(_0xa54bd1){if(_0xa54bd1){return _0xa54bd1[_0x4d4f('0xb6')](_0xd1b2cb[_0x4d4f('0x3b')][_0x4d4f('0x8f')]);}})[_0x4d4f('0x29')](function(_0x49ac86){if(_0x49ac86){return db['CmHopperBlack'][_0x4d4f('0x33')]({'where':{'ListId':_0xd1b2cb[_0x4d4f('0x3b')][_0x4d4f('0x8f')],'VoiceQueueId':_0xd1b2cb['params']['id']}})[_0x4d4f('0x29')](function(){return _0x49ac86;});}})[_0x4d4f('0x29')](respondWithStatusCode(_0x499ff8,null))[_0x4d4f('0x4f')](handleError(_0x499ff8,null));};
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.events.js b/server/api/voiceQueue/voiceQueue.events.js
index 9325c9b..c9a47ef 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 _0x16cc=['hook','exports','events','VoiceQueue','setMaxListeners','emit','hasOwnProperty'];(function(_0x465f16,_0x597f21){var _0x1264cd=function(_0x1bcab0){while(--_0x1bcab0){_0x465f16['push'](_0x465f16['shift']());}};_0x1264cd(++_0x597f21);}(_0x16cc,0x11a));var _0xc16c=function(_0x40da9a,_0x544791){_0x40da9a=_0x40da9a-0x0;var _0x1ba98c=_0x16cc[_0x40da9a];return _0x1ba98c;};'use strict';var EventEmitter=require(_0xc16c('0x0'));var VoiceQueue=require('../../mysqldb')['db'][_0xc16c('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xc16c('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x1ffdbb){return function(_0x298b4f,_0x1f336f,_0x1fa534){VoiceQueueEvents[_0xc16c('0x3')](_0x1ffdbb+':'+_0x298b4f['id'],_0x298b4f);VoiceQueueEvents[_0xc16c('0x3')](_0x1ffdbb,_0x298b4f);_0x1fa534(null);};}for(var e in events){if(events[_0xc16c('0x4')](e)){var event=events[e];VoiceQueue[_0xc16c('0x5')](e,emitEvent(event));}}module[_0xc16c('0x6')]=VoiceQueueEvents;
\ No newline at end of file
+var _0xa877=['update','emit','hasOwnProperty','exports','events','../../mysqldb','VoiceQueue','save'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa877,0xd4));var _0x7a87=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xa877[_0x2641f9];return _0x585741;};'use strict';var EventEmitter=require(_0x7a87('0x0'));var VoiceQueue=require(_0x7a87('0x1'))['db'][_0x7a87('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7a87('0x3'),'afterUpdate':_0x7a87('0x4'),'afterDestroy':'remove'};function emitEvent(_0x502943){return function(_0x2a6c45,_0x157670,_0x2b4b93){VoiceQueueEvents[_0x7a87('0x5')](_0x502943+':'+_0x2a6c45['id'],_0x2a6c45);VoiceQueueEvents['emit'](_0x502943,_0x2a6c45);_0x2b4b93(null);};}for(var e in events){if(events[_0x7a87('0x6')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x7a87('0x7')]=VoiceQueueEvents;
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.model.js b/server/api/voiceQueue/voiceQueue.model.js
index 738c9cf..f58c8ea 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 _0x2a0a=['VoiceQueue','voice_queues','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueue.attributes','exports','define'];(function(_0x297576,_0x162b21){var _0xe72179=function(_0x32857a){while(--_0x32857a){_0x297576['push'](_0x297576['shift']());}};_0xe72179(++_0x162b21);}(_0x2a0a,0x6a));var _0xa2a0=function(_0xfe8834,_0x2002a2){_0xfe8834=_0xfe8834-0x0;var _0x285987=_0x2a0a[_0xfe8834];return _0x285987;};'use strict';var _=require('lodash');var util=require(_0xa2a0('0x0'));var logger=require(_0xa2a0('0x1'))(_0xa2a0('0x2'));var moment=require('moment');var BPromise=require(_0xa2a0('0x3'));var rp=require(_0xa2a0('0x4'));var fs=require('fs');var path=require(_0xa2a0('0x5'));var rimraf=require(_0xa2a0('0x6'));var config=require(_0xa2a0('0x7'));var attributes=require(_0xa2a0('0x8'));module[_0xa2a0('0x9')]=function(_0x1076e1,_0xfb92c8){return _0x1076e1[_0xa2a0('0xa')](_0xa2a0('0xb'),attributes,{'tableName':_0xa2a0('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa036=['../../config/logger','moment','rimraf','../../config/environment','./voiceQueue.attributes','exports','define','VoiceQueue','lodash','util'];(function(_0x47fb51,_0x295b92){var _0x20f734=function(_0xd1b5f){while(--_0xd1b5f){_0x47fb51['push'](_0x47fb51['shift']());}};_0x20f734(++_0x295b92);}(_0xa036,0x1c0));var _0x6a03=function(_0x148634,_0xb2a21c){_0x148634=_0x148634-0x0;var _0x4bf6ae=_0xa036[_0x148634];return _0x4bf6ae;};'use strict';var _=require(_0x6a03('0x0'));var util=require(_0x6a03('0x1'));var logger=require(_0x6a03('0x2'))('api');var moment=require(_0x6a03('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x6a03('0x4'));var config=require(_0x6a03('0x5'));var attributes=require(_0x6a03('0x6'));module[_0x6a03('0x7')]=function(_0xb2e790,_0x32412d){return _0xb2e790[_0x6a03('0x8')](_0x6a03('0x9'),attributes,{'tableName':'voice_queues','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 54ca34d..f1fc5c5 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 _0xd634=['moment','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','request','info','request\x20sent','debug','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','VoiceQueue,\x20%s,\x20%s','message','GetVoiceQueue','findAll','options','where','attributes','limit','include','map','model','then','catch','ShowVoiceQueue','VoiceQueue','find','raw','util'];(function(_0x12fc8d,_0x19ee33){var _0x3f9d04=function(_0x52e51c){while(--_0x52e51c){_0x12fc8d['push'](_0x12fc8d['shift']());}};_0x3f9d04(++_0x19ee33);}(_0xd634,0xf4));var _0x4d63=function(_0x144b30,_0x77072d){_0x144b30=_0x144b30-0x0;var _0x1bb7bc=_0xd634[_0x144b30];return _0x1bb7bc;};'use strict';var _=require('lodash');var util=require(_0x4d63('0x0'));var moment=require(_0x4d63('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4d63('0x2'));var db=require(_0x4d63('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x4d63('0x4'));var config=require(_0x4d63('0x5'));var jayson=require(_0x4d63('0x6'));var client=jayson[_0x4d63('0x7')][_0x4d63('0x8')]({'port':0x232a});config[_0x4d63('0x9')]=_[_0x4d63('0xa')](config[_0x4d63('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./voiceQueue.socket')['register'](socket);function respondWithRpcPromise(_0x305d5b,_0x46a91a,_0x20aac2){return new BPromise(function(_0x58e78d,_0x21024c){return client[_0x4d63('0xb')](_0x305d5b,_0x20aac2)['then'](function(_0x5f5707){logger[_0x4d63('0xc')]('VoiceQueue,\x20%s,\x20%s',_0x46a91a,_0x4d63('0xd'));logger[_0x4d63('0xe')](_0x4d63('0xf'),_0x46a91a,_0x4d63('0xd'),JSON[_0x4d63('0x10')](_0x5f5707));if(_0x5f5707[_0x4d63('0x11')]){if(_0x5f5707['error']['code']===0x1f4){logger['error'](_0x4d63('0x12'),_0x46a91a,_0x5f5707[_0x4d63('0x11')][_0x4d63('0x13')]);return _0x21024c(_0x5f5707[_0x4d63('0x11')]['message']);}logger[_0x4d63('0x11')](_0x4d63('0x12'),_0x46a91a,_0x5f5707[_0x4d63('0x11')][_0x4d63('0x13')]);return _0x58e78d(_0x5f5707[_0x4d63('0x11')][_0x4d63('0x13')]);}else{logger[_0x4d63('0xc')](_0x4d63('0x12'),_0x46a91a,'request\x20sent');_0x58e78d(_0x5f5707['result'][_0x4d63('0x13')]);}})['catch'](function(_0x19d26f){logger[_0x4d63('0x11')](_0x4d63('0x12'),_0x46a91a,_0x19d26f);_0x21024c(_0x19d26f);});});}exports[_0x4d63('0x14')]=function(_0x1cf455){var _0x4d68bb=this;return new Promise(function(_0x2feb4d,_0x12ef62){return db['VoiceQueue'][_0x4d63('0x15')]({'raw':_0x1cf455[_0x4d63('0x16')]?_0x1cf455[_0x4d63('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x1cf455[_0x4d63('0x16')]?_0x1cf455[_0x4d63('0x16')][_0x4d63('0x17')]||null:null,'attributes':_0x1cf455[_0x4d63('0x16')]?_0x1cf455['options'][_0x4d63('0x18')]||null:null,'limit':_0x1cf455['options']?_0x1cf455['options'][_0x4d63('0x19')]||null:null,'include':_0x1cf455[_0x4d63('0x16')]?_0x1cf455[_0x4d63('0x16')][_0x4d63('0x1a')]?_[_0x4d63('0x1b')](_0x1cf455[_0x4d63('0x16')][_0x4d63('0x1a')],function(_0x2195a9){return{'model':db[_0x2195a9[_0x4d63('0x1c')]],'as':_0x2195a9['as'],'attributes':_0x2195a9[_0x4d63('0x18')],'include':_0x2195a9['include']?_[_0x4d63('0x1b')](_0x2195a9[_0x4d63('0x1a')],function(_0x475c08){return{'model':db[_0x475c08[_0x4d63('0x1c')]],'as':_0x475c08['as'],'attributes':_0x475c08[_0x4d63('0x18')],'include':_0x475c08[_0x4d63('0x1a')]?_[_0x4d63('0x1b')](_0x475c08[_0x4d63('0x1a')],function(_0xee43e){return{'model':db[_0xee43e[_0x4d63('0x1c')]],'as':_0xee43e['as'],'attributes':_0xee43e[_0x4d63('0x18')]};}):[]};}):[]};}):[]:[]})[_0x4d63('0x1d')](function(_0x1b48bd){logger[_0x4d63('0xc')](_0x4d63('0x14'),_0x1cf455);logger[_0x4d63('0xe')]('GetVoiceQueue',_0x1cf455,JSON[_0x4d63('0x10')](_0x1b48bd));_0x2feb4d(_0x1b48bd);})[_0x4d63('0x1e')](function(_0x27294e){logger[_0x4d63('0x11')](_0x4d63('0x14'),_0x27294e[_0x4d63('0x13')],_0x1cf455);_0x12ef62(_0x4d68bb['error'](0x1f4,_0x27294e[_0x4d63('0x13')]));});});};exports[_0x4d63('0x1f')]=function(_0x3def9c){var _0x21d6cd=this;return new Promise(function(_0x670658,_0x4bd75e){return db[_0x4d63('0x20')][_0x4d63('0x21')]({'raw':_0x3def9c['options']?_0x3def9c[_0x4d63('0x16')][_0x4d63('0x22')]===undefined?!![]:![]:!![],'where':_0x3def9c[_0x4d63('0x16')]?_0x3def9c['options'][_0x4d63('0x17')]||null:null,'attributes':_0x3def9c[_0x4d63('0x16')]?_0x3def9c['options'][_0x4d63('0x18')]||null:null,'include':_0x3def9c['options']?_0x3def9c['options'][_0x4d63('0x1a')]?_[_0x4d63('0x1b')](_0x3def9c[_0x4d63('0x16')][_0x4d63('0x1a')],function(_0xa33aa8){return{'model':db[_0xa33aa8[_0x4d63('0x1c')]],'as':_0xa33aa8['as'],'attributes':_0xa33aa8['attributes'],'include':_0xa33aa8[_0x4d63('0x1a')]?_[_0x4d63('0x1b')](_0xa33aa8[_0x4d63('0x1a')],function(_0x3ddcc0){return{'model':db[_0x3ddcc0['model']],'as':_0x3ddcc0['as'],'attributes':_0x3ddcc0[_0x4d63('0x18')],'include':_0x3ddcc0[_0x4d63('0x1a')]?_[_0x4d63('0x1b')](_0x3ddcc0[_0x4d63('0x1a')],function(_0x154906){return{'model':db[_0x154906['model']],'as':_0x154906['as'],'attributes':_0x154906['attributes']};}):[]};}):[]};}):[]:[]})[_0x4d63('0x1d')](function(_0x4fcb1f){logger['info']('ShowVoiceQueue',_0x3def9c);logger[_0x4d63('0xe')]('ShowVoiceQueue',_0x3def9c,JSON[_0x4d63('0x10')](_0x4fcb1f));_0x670658(_0x4fcb1f);})[_0x4d63('0x1e')](function(_0xce59e3){logger['error'](_0x4d63('0x1f'),_0xce59e3[_0x4d63('0x13')],_0x3def9c);_0x4bd75e(_0x21d6cd['error'](0x1f4,_0xce59e3[_0x4d63('0x13')]));});});};
\ No newline at end of file
+var _0x25b4=['debug','VoiceQueue,\x20%s,\x20%s,\x20%s','error','code','message','VoiceQueue,\x20%s,\x20%s','result','catch','VoiceQueue','findAll','options','where','attributes','include','map','model','stringify','GetVoiceQueue','ShowVoiceQueue','find','raw','then','lodash','util','bluebird','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','./voiceQueue.socket','register','request','info','request\x20sent'];(function(_0x1aa9c3,_0x53483d){var _0x29403a=function(_0x24d40c){while(--_0x24d40c){_0x1aa9c3['push'](_0x1aa9c3['shift']());}};_0x29403a(++_0x53483d);}(_0x25b4,0xd4));var _0x425b=function(_0x35b7d4,_0x5a5c43){_0x35b7d4=_0x35b7d4-0x0;var _0x4e8cee=_0x25b4[_0x35b7d4];return _0x4e8cee;};'use strict';var _=require(_0x425b('0x0'));var util=require(_0x425b('0x1'));var moment=require('moment');var BPromise=require(_0x425b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x425b('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x425b('0x4'))(_0x425b('0x5'));var config=require(_0x425b('0x6'));var jayson=require(_0x425b('0x7'));var client=jayson[_0x425b('0x8')]['http']({'port':0x232a});config[_0x425b('0x9')]=_[_0x425b('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x425b('0x9')]));require(_0x425b('0xb'))[_0x425b('0xc')](socket);function respondWithRpcPromise(_0x5e00d5,_0x3c4ed6,_0x396bb1){return new BPromise(function(_0x55e08c,_0x1d79dd){return client[_0x425b('0xd')](_0x5e00d5,_0x396bb1)['then'](function(_0x188c03){logger[_0x425b('0xe')]('VoiceQueue,\x20%s,\x20%s',_0x3c4ed6,_0x425b('0xf'));logger[_0x425b('0x10')](_0x425b('0x11'),_0x3c4ed6,_0x425b('0xf'),JSON['stringify'](_0x188c03));if(_0x188c03[_0x425b('0x12')]){if(_0x188c03['error'][_0x425b('0x13')]===0x1f4){logger[_0x425b('0x12')]('VoiceQueue,\x20%s,\x20%s',_0x3c4ed6,_0x188c03[_0x425b('0x12')][_0x425b('0x14')]);return _0x1d79dd(_0x188c03['error'][_0x425b('0x14')]);}logger[_0x425b('0x12')](_0x425b('0x15'),_0x3c4ed6,_0x188c03[_0x425b('0x12')][_0x425b('0x14')]);return _0x55e08c(_0x188c03[_0x425b('0x12')]['message']);}else{logger[_0x425b('0xe')](_0x425b('0x15'),_0x3c4ed6,'request\x20sent');_0x55e08c(_0x188c03[_0x425b('0x16')][_0x425b('0x14')]);}})[_0x425b('0x17')](function(_0x3f0953){logger[_0x425b('0x12')]('VoiceQueue,\x20%s,\x20%s',_0x3c4ed6,_0x3f0953);_0x1d79dd(_0x3f0953);});});}exports['GetVoiceQueue']=function(_0x124626){var _0xcb1dcb=this;return new Promise(function(_0x833cad,_0x16065d){return db[_0x425b('0x18')][_0x425b('0x19')]({'raw':_0x124626[_0x425b('0x1a')]?_0x124626[_0x425b('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x124626['options']?_0x124626[_0x425b('0x1a')][_0x425b('0x1b')]||null:null,'attributes':_0x124626[_0x425b('0x1a')]?_0x124626['options'][_0x425b('0x1c')]||null:null,'limit':_0x124626[_0x425b('0x1a')]?_0x124626[_0x425b('0x1a')]['limit']||null:null,'include':_0x124626[_0x425b('0x1a')]?_0x124626[_0x425b('0x1a')][_0x425b('0x1d')]?_[_0x425b('0x1e')](_0x124626[_0x425b('0x1a')][_0x425b('0x1d')],function(_0x4276e8){return{'model':db[_0x4276e8['model']],'as':_0x4276e8['as'],'attributes':_0x4276e8['attributes'],'include':_0x4276e8['include']?_[_0x425b('0x1e')](_0x4276e8[_0x425b('0x1d')],function(_0x37ec10){return{'model':db[_0x37ec10[_0x425b('0x1f')]],'as':_0x37ec10['as'],'attributes':_0x37ec10['attributes'],'include':_0x37ec10[_0x425b('0x1d')]?_[_0x425b('0x1e')](_0x37ec10['include'],function(_0x100762){return{'model':db[_0x100762[_0x425b('0x1f')]],'as':_0x100762['as'],'attributes':_0x100762[_0x425b('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x60fdcb){logger['info']('GetVoiceQueue',_0x124626);logger[_0x425b('0x10')]('GetVoiceQueue',_0x124626,JSON[_0x425b('0x20')](_0x60fdcb));_0x833cad(_0x60fdcb);})[_0x425b('0x17')](function(_0xdd5849){logger['error'](_0x425b('0x21'),_0xdd5849[_0x425b('0x14')],_0x124626);_0x16065d(_0xcb1dcb[_0x425b('0x12')](0x1f4,_0xdd5849[_0x425b('0x14')]));});});};exports[_0x425b('0x22')]=function(_0x561773){var _0x369b67=this;return new Promise(function(_0x4f081e,_0x19dcf0){return db[_0x425b('0x18')][_0x425b('0x23')]({'raw':_0x561773[_0x425b('0x1a')]?_0x561773[_0x425b('0x1a')][_0x425b('0x24')]===undefined?!![]:![]:!![],'where':_0x561773['options']?_0x561773[_0x425b('0x1a')][_0x425b('0x1b')]||null:null,'attributes':_0x561773['options']?_0x561773['options'][_0x425b('0x1c')]||null:null,'include':_0x561773['options']?_0x561773[_0x425b('0x1a')][_0x425b('0x1d')]?_[_0x425b('0x1e')](_0x561773[_0x425b('0x1a')][_0x425b('0x1d')],function(_0x4cf85a){return{'model':db[_0x4cf85a[_0x425b('0x1f')]],'as':_0x4cf85a['as'],'attributes':_0x4cf85a[_0x425b('0x1c')],'include':_0x4cf85a[_0x425b('0x1d')]?_[_0x425b('0x1e')](_0x4cf85a[_0x425b('0x1d')],function(_0x29dee5){return{'model':db[_0x29dee5[_0x425b('0x1f')]],'as':_0x29dee5['as'],'attributes':_0x29dee5['attributes'],'include':_0x29dee5[_0x425b('0x1d')]?_['map'](_0x29dee5['include'],function(_0x5847c1){return{'model':db[_0x5847c1['model']],'as':_0x5847c1['as'],'attributes':_0x5847c1[_0x425b('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x425b('0x25')](function(_0x559f25){logger['info'](_0x425b('0x22'),_0x561773);logger['debug']('ShowVoiceQueue',_0x561773,JSON[_0x425b('0x20')](_0x559f25));_0x4f081e(_0x559f25);})['catch'](function(_0x26ec19){logger[_0x425b('0x12')](_0x425b('0x22'),_0x26ec19[_0x425b('0x14')],_0x561773);_0x19dcf0(_0x369b67[_0x425b('0x12')](0x1f4,_0x26ec19[_0x425b('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceQueue/voiceQueue.socket.js b/server/api/voiceQueue/voiceQueue.socket.js
index 2da961c..d3db535 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 _0xe782=['voiceQueue:','save','remove','update','emit','removeListener'];(function(_0x5b5cde,_0x1f7c5f){var _0x364ad2=function(_0x4a1172){while(--_0x4a1172){_0x5b5cde['push'](_0x5b5cde['shift']());}};_0x364ad2(++_0x1f7c5f);}(_0xe782,0x133));var _0x2e78=function(_0x5d66bd,_0x4c6dc6){_0x5d66bd=_0x5d66bd-0x0;var _0x41a11b=_0xe782[_0x5d66bd];return _0x41a11b;};'use strict';var VoiceQueueEvents=require('./voiceQueue.events');var events=[_0x2e78('0x0'),_0x2e78('0x1'),_0x2e78('0x2')];function createListener(_0x4955ba,_0x3411e4){return function(_0x2d3003){_0x3411e4[_0x2e78('0x3')](_0x4955ba,_0x2d3003);};}function removeListener(_0x32df05,_0x259c06){return function(){VoiceQueueEvents[_0x2e78('0x4')](_0x32df05,_0x259c06);};}exports['register']=function(_0x1b8efb){for(var _0x264122=0x0,_0xa89190=events['length'];_0x264122<_0xa89190;_0x264122++){var _0x493a90=events[_0x264122];var _0x5e260f=createListener(_0x2e78('0x5')+_0x493a90,_0x1b8efb);VoiceQueueEvents['on'](_0x493a90,_0x5e260f);}};
\ No newline at end of file
+var _0x8547=['remove','update','removeListener','register','length','voiceQueue:','./voiceQueue.events','save'];(function(_0x5e8e31,_0x483f07){var _0x461580=function(_0x444b31){while(--_0x444b31){_0x5e8e31['push'](_0x5e8e31['shift']());}};_0x461580(++_0x483f07);}(_0x8547,0x1ae));var _0x7854=function(_0x215311,_0x53df31){_0x215311=_0x215311-0x0;var _0x3b0147=_0x8547[_0x215311];return _0x3b0147;};'use strict';var VoiceQueueEvents=require(_0x7854('0x0'));var events=[_0x7854('0x1'),_0x7854('0x2'),_0x7854('0x3')];function createListener(_0x24bed3,_0x44c25f){return function(_0x37c96d){_0x44c25f['emit'](_0x24bed3,_0x37c96d);};}function removeListener(_0x2b165b,_0x2965a2){return function(){VoiceQueueEvents[_0x7854('0x4')](_0x2b165b,_0x2965a2);};}exports[_0x7854('0x5')]=function(_0x55da51){for(var _0x3a9948=0x0,_0xe88928=events[_0x7854('0x6')];_0x3a9948<_0xe88928;_0x3a9948++){var _0xde5ac=events[_0x3a9948];var _0x19eea5=createListener(_0x7854('0x7')+_0xde5ac,_0x55da51);VoiceQueueEvents['on'](_0xde5ac,_0x19eea5);}};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/index.js b/server/api/voiceQueueReport/index.js
index 8f7df0d..c7ee5f9 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 _0x41fe=['isAuthenticated','index','/describe','describe','/index','post','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueueReport.controller','get'];(function(_0x30ae5e,_0x391fc4){var _0x1f2e93=function(_0x60307d){while(--_0x60307d){_0x30ae5e['push'](_0x30ae5e['shift']());}};_0x1f2e93(++_0x391fc4);}(_0x41fe,0xd1));var _0xe41f=function(_0x1d24eb,_0x12295b){_0x1d24eb=_0x1d24eb-0x0;var _0x1dc576=_0x41fe[_0x1d24eb];return _0x1dc576;};'use strict';var multer=require(_0xe41f('0x0'));var util=require(_0xe41f('0x1'));var path=require(_0xe41f('0x2'));var timeout=require(_0xe41f('0x3'));var express=require(_0xe41f('0x4'));var router=express[_0xe41f('0x5')]();var auth=require(_0xe41f('0x6'));var interaction=require(_0xe41f('0x7'));var config=require(_0xe41f('0x8'));var controller=require(_0xe41f('0x9'));router[_0xe41f('0xa')]('/',auth[_0xe41f('0xb')](),controller[_0xe41f('0xc')]);router[_0xe41f('0xa')](_0xe41f('0xd'),auth[_0xe41f('0xb')](),controller[_0xe41f('0xe')]);router['get'](_0xe41f('0xf'),auth[_0xe41f('0xb')](),controller['getVoiceQueuesReport']);router[_0xe41f('0xa')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0xe41f('0x10')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0xe41f('0x11'),auth[_0xe41f('0xb')](),controller[_0xe41f('0x12')]);router[_0xe41f('0x13')](_0xe41f('0x11'),auth[_0xe41f('0xb')](),controller[_0xe41f('0x14')]);module[_0xe41f('0x15')]=router;
\ No newline at end of file
+var _0x32f4=['path','connect-timeout','Router','../../components/auth/service','../../config/environment','./voiceQueueReport.controller','get','isAuthenticated','index','describe','/index','getVoiceQueuesReport','/:id','show','put','update','exports','multer','util'];(function(_0x92c289,_0x53cec8){var _0x518f5b=function(_0xdf101c){while(--_0xdf101c){_0x92c289['push'](_0x92c289['shift']());}};_0x518f5b(++_0x53cec8);}(_0x32f4,0x154));var _0x432f=function(_0x5a70df,_0x15ea76){_0x5a70df=_0x5a70df-0x0;var _0x18d29f=_0x32f4[_0x5a70df];return _0x18d29f;};'use strict';var multer=require(_0x432f('0x0'));var util=require(_0x432f('0x1'));var path=require(_0x432f('0x2'));var timeout=require(_0x432f('0x3'));var express=require('express');var router=express[_0x432f('0x4')]();var auth=require(_0x432f('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x432f('0x6'));var controller=require(_0x432f('0x7'));router[_0x432f('0x8')]('/',auth[_0x432f('0x9')](),controller[_0x432f('0xa')]);router['get']('/describe',auth[_0x432f('0x9')](),controller[_0x432f('0xb')]);router['get'](_0x432f('0xc'),auth['isAuthenticated'](),controller[_0x432f('0xd')]);router[_0x432f('0x8')](_0x432f('0xe'),auth[_0x432f('0x9')](),controller[_0x432f('0xf')]);router['post']('/',auth[_0x432f('0x9')](),controller['create']);router[_0x432f('0x10')]('/:id',auth[_0x432f('0x9')](),controller[_0x432f('0x11')]);router['delete'](_0x432f('0xe'),auth[_0x432f('0x9')](),controller['destroy']);module[_0x432f('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.attributes.js b/server/api/voiceQueueReport/voiceQueueReport.attributes.js
index 16ed9ad..50e40be 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 _0x844d=['DATE','getDataValue','queuecallerjoinAt','format','YYYY-MM-DD\x20HH:mm:ss','diff','seconds','setDataValue','queuecallerleaveAt','holdtime','INTEGER','BOOLEAN','moment','STRING'];(function(_0x3f1523,_0x4911bb){var _0x3bf69f=function(_0x62fa3f){while(--_0x62fa3f){_0x3f1523['push'](_0x3f1523['shift']());}};_0x3bf69f(++_0x4911bb);}(_0x844d,0xec));var _0xd844=function(_0x239193,_0x1585ef){_0x239193=_0x239193-0x0;var _0x4f51c3=_0x844d[_0x239193];return _0x4f51c3;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xd844('0x0'));module['exports']={'type':{'type':Sequelize[_0xd844('0x1')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xd844('0x1')]},'queue':{'type':Sequelize[_0xd844('0x1')]},'queuecallerjoinAt':{'type':Sequelize[_0xd844('0x2')]},'queuecallerleaveAt':{'type':Sequelize[_0xd844('0x2')],'set':function(_0x3e632a){var _0x2da32f=moment(_0x3e632a);var _0x296298=moment(this[_0xd844('0x3')](_0xd844('0x4')))[_0xd844('0x5')](_0xd844('0x6'));var _0x1186b0=_0x2da32f[_0xd844('0x7')](_0x296298,_0xd844('0x8'));this[_0xd844('0x9')](_0xd844('0xa'),_0x3e632a);this[_0xd844('0x9')](_0xd844('0xb'),_0x1186b0||null);}},'position':{'type':Sequelize[_0xd844('0xc')]},'count':{'type':Sequelize[_0xd844('0xc')]},'queuecallerabandon':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0xd844('0x2')]},'queuecallercomplete':{'type':Sequelize[_0xd844('0xd')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0xd844('0x2')]},'queuecallerexit':{'type':Sequelize[_0xd844('0xd')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0xd844('0x2')]},'queuecallerexitreason':{'type':Sequelize[_0xd844('0x1')],'comment':'COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT'},'originalposition':{'type':Sequelize[_0xd844('0xc')]},'channel':{'type':Sequelize[_0xd844('0x1')]},'connectedlinenum':{'type':Sequelize[_0xd844('0x1')]},'connectedlinename':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xd844('0x1')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0xd844('0x1')]},'priority':{'type':Sequelize[_0xd844('0x1')]},'holdtime':{'type':Sequelize[_0xd844('0xc')]},'mohtime':{'type':Sequelize[_0xd844('0xc')],'defaultValue':0x0},'assigned':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0xd844('0x1')]},'transfer':{'type':Sequelize[_0xd844('0xd')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xd844('0x1')],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize['STRING']},'transferuniqueid':{'type':Sequelize[_0xd844('0x1')]},'disposition':{'type':Sequelize[_0xd844('0x1')]},'queuecallerenterreason':{'type':Sequelize[_0xd844('0xc')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x9541=['seconds','setDataValue','queuecallerleaveAt','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','moment','exports','STRING','DATE','getDataValue','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','diff'];(function(_0x55f543,_0x116fe8){var _0x15643b=function(_0x4d364a){while(--_0x4d364a){_0x55f543['push'](_0x55f543['shift']());}};_0x15643b(++_0x116fe8);}(_0x9541,0x97));var _0x1954=function(_0x1de7e9,_0x3023fe){_0x1de7e9=_0x1de7e9-0x0;var _0x9e192e=_0x9541[_0x1de7e9];return _0x9e192e;};'use strict';var Sequelize=require(_0x1954('0x0'));var moment=require(_0x1954('0x1'));module[_0x1954('0x2')]={'type':{'type':Sequelize[_0x1954('0x3')]},'uniqueid':{'type':Sequelize[_0x1954('0x3')]},'calleridnum':{'type':Sequelize[_0x1954('0x3')]},'calleridname':{'type':Sequelize[_0x1954('0x3')]},'queue':{'type':Sequelize[_0x1954('0x3')]},'queuecallerjoinAt':{'type':Sequelize['DATE']},'queuecallerleaveAt':{'type':Sequelize[_0x1954('0x4')],'set':function(_0x372b20){var _0x450a8e=moment(_0x372b20);var _0x56c991=moment(this[_0x1954('0x5')](_0x1954('0x6')))['format'](_0x1954('0x7'));var _0x5ebacb=_0x450a8e[_0x1954('0x8')](_0x56c991,_0x1954('0x9'));this[_0x1954('0xa')](_0x1954('0xb'),_0x372b20);this['setDataValue']('holdtime',_0x5ebacb||null);}},'position':{'type':Sequelize[_0x1954('0xc')]},'count':{'type':Sequelize[_0x1954('0xc')]},'queuecallerabandon':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0x1954('0x4')]},'queuecallercomplete':{'type':Sequelize[_0x1954('0xd')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x1954('0x4')]},'queuecallerexit':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0x1954('0x4')]},'queuecallerexitreason':{'type':Sequelize['STRING'],'comment':_0x1954('0xe')},'originalposition':{'type':Sequelize['INTEGER']},'channel':{'type':Sequelize[_0x1954('0x3')]},'connectedlinenum':{'type':Sequelize[_0x1954('0x3')]},'connectedlinename':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0x1954('0x3')]},'exten':{'type':Sequelize[_0x1954('0x3')]},'priority':{'type':Sequelize[_0x1954('0x3')]},'holdtime':{'type':Sequelize[_0x1954('0xc')]},'mohtime':{'type':Sequelize[_0x1954('0xc')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x1954('0xd')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0x1954('0x3')]},'transfer':{'type':Sequelize[_0x1954('0xd')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x1954('0x3')],'comment':_0x1954('0xf')},'transferexten':{'type':Sequelize['STRING']},'transferuniqueid':{'type':Sequelize['STRING']},'disposition':{'type':Sequelize['STRING']},'queuecallerenterreason':{'type':Sequelize[_0x1954('0xc')],'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 054a903..4032cd2 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 _0x1a85=['../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','end','status','json','count','offset','limit','set','Content-Range','save','then','destroy','error','stack','name','send','index','map','VoiceQueueReport','rawAttributes','fieldName','key','query','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','merge','type','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','params','keys','length','find','create','body','update','describe','getVoiceQueuesReport','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','ejs','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api'];(function(_0x38b04c,_0x2079b8){var _0xcbc585=function(_0x29dd99){while(--_0x29dd99){_0x38b04c['push'](_0x38b04c['shift']());}};_0xcbc585(++_0x2079b8);}(_0x1a85,0x178));var _0x51a8=function(_0x4c060b,_0x4c5e75){_0x4c060b=_0x4c060b-0x0;var _0x5b9790=_0x1a85[_0x4c060b];return _0x5b9790;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x51a8('0x0'));var zipdir=require(_0x51a8('0x1'));var jsonpatch=require(_0x51a8('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x51a8('0x3'));var Mustache=require(_0x51a8('0x4'));var util=require(_0x51a8('0x5'));var path=require('path');var sox=require(_0x51a8('0x6'));var csv=require('to-csv');var ejs=require(_0x51a8('0x7'));var fs=require('fs');var _=require('lodash');var squel=require(_0x51a8('0x8'));var crypto=require(_0x51a8('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x51a8('0xa'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x51a8('0xb'));var Redis=require(_0x51a8('0xc'));var authService=require(_0x51a8('0xd'));var qs=require(_0x51a8('0xe'));var as=require(_0x51a8('0xf'));var hardwareService=require(_0x51a8('0x10'));var logger=require(_0x51a8('0x11'))(_0x51a8('0x12'));var utils=require(_0x51a8('0x13'));var config=require(_0x51a8('0x14'));var db=require(_0x51a8('0x15'))['db'];config[_0x51a8('0x16')]=_[_0x51a8('0x17')](config[_0x51a8('0x16')],{'host':_0x51a8('0x18'),'port':0x18eb});var socket=require(_0x51a8('0x19'))(new Redis(config[_0x51a8('0x16')]));require('./voiceQueueReport.socket')[_0x51a8('0x1a')](socket);function respondWithStatusCode(_0x7a4c36,_0xaec066){_0xaec066=_0xaec066||0xcc;return function(_0x50d992){if(_0x50d992){return _0x7a4c36[_0x51a8('0x1b')](_0xaec066);}return _0x7a4c36['status'](_0xaec066)[_0x51a8('0x1c')]();};}function respondWithResult(_0x2b8d37,_0x39cd45){_0x39cd45=_0x39cd45||0xc8;return function(_0x2b0521){if(_0x2b0521){return _0x2b8d37[_0x51a8('0x1d')](_0x39cd45)[_0x51a8('0x1e')](_0x2b0521);}};}function respondWithFilteredResult(_0x1f49ee,_0x516abc){return function(_0x1c2f25){if(_0x1c2f25){var _0x45a433=_0x1c2f25[_0x51a8('0x1f')],_0xd52230=_0x516abc['offset'],_0x23539e=_0x516abc[_0x51a8('0x20')]+_0x516abc[_0x51a8('0x21')],_0x3bc1a2;if(_0x23539e>=_0x45a433){_0x23539e=_0x45a433;_0x3bc1a2=0xc8;}else{_0x3bc1a2=0xce;}_0x1f49ee[_0x51a8('0x1d')](_0x3bc1a2);return _0x1f49ee[_0x51a8('0x22')](_0x51a8('0x23'),_0xd52230+'-'+_0x23539e+'/'+_0x45a433)[_0x51a8('0x1e')](_0x1c2f25);}return null;};}function patchUpdates(_0x28aea0){return function(_0x3bf5b6){try{jsonpatch['apply'](_0x3bf5b6,_0x28aea0,!![]);}catch(_0xf80fa9){return BPromise['reject'](_0xf80fa9);}return _0x3bf5b6[_0x51a8('0x24')]();};}function saveUpdates(_0x12c029,_0x8bda40){return function(_0x3759d6){if(_0x3759d6){return _0x3759d6['update'](_0x12c029)[_0x51a8('0x25')](function(_0x4b9cdd){return _0x4b9cdd;});}return null;};}function removeEntity(_0x47f063,_0x23d26a){return function(_0x52e503){if(_0x52e503){return _0x52e503[_0x51a8('0x26')]()[_0x51a8('0x25')](function(){_0x47f063[_0x51a8('0x1d')](0xcc)[_0x51a8('0x1c')]();});}};}function handleEntityNotFound(_0x157554,_0x2f2f05){return function(_0x291ed6){if(!_0x291ed6){_0x157554[_0x51a8('0x1b')](0x194);}return _0x291ed6;};}function handleError(_0x5b3f49,_0x273ce2){_0x273ce2=_0x273ce2||0x1f4;return function(_0x1b7577){logger[_0x51a8('0x27')](_0x1b7577[_0x51a8('0x28')]);if(_0x1b7577[_0x51a8('0x29')]){delete _0x1b7577[_0x51a8('0x29')];}_0x5b3f49[_0x51a8('0x1d')](_0x273ce2)[_0x51a8('0x2a')](_0x1b7577);};}exports[_0x51a8('0x2b')]=function(_0x4b5cda,_0x20c6b5){var _0x347a02={},_0x4a1548={},_0x2f9d53={'count':0x0,'rows':[]};var _0x58cba0=_[_0x51a8('0x2c')](db[_0x51a8('0x2d')][_0x51a8('0x2e')],function(_0x41df56){return{'name':_0x41df56[_0x51a8('0x2f')],'type':_0x41df56['type'][_0x51a8('0x30')]};});_0x4a1548['model']=_[_0x51a8('0x2c')](_0x58cba0,_0x51a8('0x29'));_0x4a1548[_0x51a8('0x31')]=_['keys'](_0x4b5cda[_0x51a8('0x31')]);_0x4a1548['filters']=_[_0x51a8('0x32')](_0x4a1548[_0x51a8('0x33')],_0x4a1548[_0x51a8('0x31')]);_0x347a02[_0x51a8('0x34')]=_[_0x51a8('0x32')](_0x4a1548['model'],qs[_0x51a8('0x35')](_0x4b5cda['query'][_0x51a8('0x35')]));_0x347a02[_0x51a8('0x34')]=_0x347a02[_0x51a8('0x34')]['length']?_0x347a02[_0x51a8('0x34')]:_0x4a1548[_0x51a8('0x33')];if(!_0x4b5cda[_0x51a8('0x31')][_0x51a8('0x36')](_0x51a8('0x37'))){_0x347a02['limit']=qs['limit'](_0x4b5cda['query'][_0x51a8('0x21')]);_0x347a02[_0x51a8('0x20')]=qs['offset'](_0x4b5cda[_0x51a8('0x31')]['offset']);}_0x347a02[_0x51a8('0x38')]=qs[_0x51a8('0x39')](_0x4b5cda[_0x51a8('0x31')][_0x51a8('0x39')]);_0x347a02[_0x51a8('0x3a')]=qs[_0x51a8('0x3b')](_['pick'](_0x4b5cda['query'],_0x4a1548[_0x51a8('0x3b')]));if(_0x4b5cda['query']['filter']){_0x347a02['where']=_[_0x51a8('0x3c')](_0x347a02[_0x51a8('0x3a')],{'$or':_[_0x51a8('0x2c')](_0x58cba0,function(_0x5956b8){if(_0x5956b8[_0x51a8('0x3d')]!==_0x51a8('0x3e')){var _0x2e6432={};_0x2e6432[_0x5956b8[_0x51a8('0x29')]]={'$like':'%'+_0x4b5cda['query'][_0x51a8('0x3f')]+'%'};return _0x2e6432;}})});}_0x347a02=_[_0x51a8('0x3c')]({},_0x347a02,_0x4b5cda[_0x51a8('0x40')]);var _0x4dcbfb={'where':_0x347a02[_0x51a8('0x3a')]};return db['VoiceQueueReport'][_0x51a8('0x1f')](_0x4dcbfb)[_0x51a8('0x25')](function(_0x2a98bd){_0x2f9d53[_0x51a8('0x1f')]=_0x2a98bd;if(_0x4b5cda['query'][_0x51a8('0x41')]){_0x347a02[_0x51a8('0x42')]=[{'all':!![]}];}return db[_0x51a8('0x2d')][_0x51a8('0x43')](_0x347a02);})[_0x51a8('0x25')](function(_0x35c1c9){_0x2f9d53[_0x51a8('0x44')]=_0x35c1c9;return _0x2f9d53;})[_0x51a8('0x25')](respondWithFilteredResult(_0x20c6b5,_0x347a02))[_0x51a8('0x45')](handleError(_0x20c6b5,null));};exports['show']=function(_0x22e6e6,_0x2afb74){var _0x4c7c67={'raw':![],'where':{'id':_0x22e6e6[_0x51a8('0x46')]['id']}},_0x53409d={};_0x53409d[_0x51a8('0x33')]=_[_0x51a8('0x47')](db[_0x51a8('0x2d')][_0x51a8('0x2e')]);_0x53409d[_0x51a8('0x31')]=_[_0x51a8('0x47')](_0x22e6e6[_0x51a8('0x31')]);_0x53409d[_0x51a8('0x3b')]=_[_0x51a8('0x32')](_0x53409d['model'],_0x53409d[_0x51a8('0x31')]);_0x4c7c67[_0x51a8('0x34')]=_[_0x51a8('0x32')](_0x53409d[_0x51a8('0x33')],qs[_0x51a8('0x35')](_0x22e6e6[_0x51a8('0x31')]['fields']));_0x4c7c67[_0x51a8('0x34')]=_0x4c7c67['attributes'][_0x51a8('0x48')]?_0x4c7c67[_0x51a8('0x34')]:_0x53409d[_0x51a8('0x33')];if(_0x22e6e6[_0x51a8('0x31')][_0x51a8('0x41')]){_0x4c7c67['include']=[{'all':!![]}];}_0x4c7c67=_['merge']({},_0x4c7c67,_0x22e6e6[_0x51a8('0x40')]);return db[_0x51a8('0x2d')][_0x51a8('0x49')](_0x4c7c67)[_0x51a8('0x25')](handleEntityNotFound(_0x2afb74,null))[_0x51a8('0x25')](respondWithResult(_0x2afb74,null))['catch'](handleError(_0x2afb74,null));};exports['create']=function(_0xcbd998,_0x108131){return db[_0x51a8('0x2d')][_0x51a8('0x4a')](_0xcbd998[_0x51a8('0x4b')],{})[_0x51a8('0x25')](respondWithResult(_0x108131,0xc9))[_0x51a8('0x45')](handleError(_0x108131,null));};exports[_0x51a8('0x4c')]=function(_0x301578,_0x4d29ab){if(_0x301578['body']['id']){delete _0x301578['body']['id'];}return db[_0x51a8('0x2d')][_0x51a8('0x49')]({'where':{'id':_0x301578[_0x51a8('0x46')]['id']}})['then'](handleEntityNotFound(_0x4d29ab,null))[_0x51a8('0x25')](saveUpdates(_0x301578[_0x51a8('0x4b')],null))['then'](respondWithResult(_0x4d29ab,null))[_0x51a8('0x45')](handleError(_0x4d29ab,null));};exports['destroy']=function(_0x50a2f8,_0xbf828b){return db[_0x51a8('0x2d')][_0x51a8('0x49')]({'where':{'id':_0x50a2f8['params']['id']}})['then'](handleEntityNotFound(_0xbf828b,null))[_0x51a8('0x25')](removeEntity(_0xbf828b,null))['catch'](handleError(_0xbf828b,null));};exports[_0x51a8('0x4d')]=function(_0xc89617,_0x3623d4){return db[_0x51a8('0x2d')][_0x51a8('0x4d')]()[_0x51a8('0x25')](respondWithResult(_0x3623d4,null))[_0x51a8('0x45')](handleError(_0x3623d4,null));};exports[_0x51a8('0x4e')]=function(_0x29d31e,_0x530ad0){var _0x2eda9c={},_0xe4518d={},_0x823d14={'count':0x0,'rows':[]};_0xe4518d[_0x51a8('0x33')]=_['keys'](db[_0x51a8('0x2d')]['rawAttributes']);_0xe4518d[_0x51a8('0x31')]=_[_0x51a8('0x47')](_0x29d31e['query']);_0xe4518d['filters']=_[_0x51a8('0x32')](_0xe4518d[_0x51a8('0x33')],_0xe4518d[_0x51a8('0x31')]);_0x2eda9c[_0x51a8('0x34')]=_[_0x51a8('0x32')](_0xe4518d['model'],qs[_0x51a8('0x35')](_0x29d31e[_0x51a8('0x31')][_0x51a8('0x35')]));_0x2eda9c[_0x51a8('0x34')]=_0x2eda9c[_0x51a8('0x34')]['length']?_0x2eda9c[_0x51a8('0x34')]:_0xe4518d[_0x51a8('0x33')];if(!_0x29d31e[_0x51a8('0x31')][_0x51a8('0x36')](_0x51a8('0x37'))){_0x2eda9c[_0x51a8('0x21')]=qs['limit'](_0x29d31e['query']['limit']);_0x2eda9c['offset']=qs[_0x51a8('0x20')](_0x29d31e[_0x51a8('0x31')]['offset']);}_0x2eda9c[_0x51a8('0x38')]=qs['sort'](_0x29d31e[_0x51a8('0x31')]['sort']);_0x2eda9c[_0x51a8('0x3a')]=qs[_0x51a8('0x3b')](_['pick'](_0x29d31e['query'],_0xe4518d['filters']));if(_0x29d31e[_0x51a8('0x31')][_0x51a8('0x3f')]){_0x2eda9c[_0x51a8('0x3a')]=_[_0x51a8('0x3c')](_0x2eda9c[_0x51a8('0x3a')],{'$or':_[_0x51a8('0x2c')](_0x2eda9c[_0x51a8('0x34')],function(_0x259153){var _0x494e11={};_0x494e11[_0x259153]={'$like':'%'+_0x29d31e[_0x51a8('0x31')][_0x51a8('0x3f')]+'%'};return _0x494e11;})});}_0x2eda9c=_['merge']({},_0x2eda9c,_0x29d31e[_0x51a8('0x40')]);var _0x315231={'where':_0x2eda9c[_0x51a8('0x3a')]};return db[_0x51a8('0x2d')][_0x51a8('0x1f')](_0x315231)[_0x51a8('0x25')](function(_0x4f6d5f){_0x823d14['count']=_0x4f6d5f;if(_0x29d31e[_0x51a8('0x31')]['includeAll']){_0x2eda9c['include']=[{'all':!![]}];}return db['VoiceQueueReport']['findAll'](_0x2eda9c);})['then'](function(_0x426aec){_0x823d14['rows']=_0x426aec;return _0x823d14;})[_0x51a8('0x25')](respondWithFilteredResult(_0x530ad0,_0x2eda9c,_0x51a8('0x4e')))[_0x51a8('0x45')](handleError(_0x530ad0,null,_0x51a8('0x4e')));};
\ No newline at end of file
+var _0x4975=['sendStatus','end','status','json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','error','name','index','rawAttributes','fieldName','map','query','keys','intersection','model','attributes','fields','length','nolimit','order','sort','filters','pick','filter','merge','where','type','VIRTUAL','options','VoiceQueueReport','includeAll','include','findAll','rows','catch','show','params','find','create','body','describe','getVoiceQueuesReport','hasOwnProperty','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','register'];(function(_0x3e2040,_0x660381){var _0x38e3ec=function(_0x2e61bd){while(--_0x2e61bd){_0x3e2040['push'](_0x3e2040['shift']());}};_0x38e3ec(++_0x660381);}(_0x4975,0x86));var _0x5497=function(_0x727516,_0x21c399){_0x727516=_0x727516-0x0;var _0x596a72=_0x4975[_0x727516];return _0x596a72;};'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 as=require(_0x5497('0x14'));var hardwareService=require(_0x5497('0x15'));var logger=require(_0x5497('0x16'))(_0x5497('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x5497('0x18')]=_[_0x5497('0x19')](config[_0x5497('0x18')],{'host':_0x5497('0x1a'),'port':0x18eb});var socket=require(_0x5497('0x1b'))(new Redis(config[_0x5497('0x18')]));require(_0x5497('0x1c'))[_0x5497('0x1d')](socket);function respondWithStatusCode(_0x363a5b,_0x1a4c74){_0x1a4c74=_0x1a4c74||0xcc;return function(_0x55f590){if(_0x55f590){return _0x363a5b[_0x5497('0x1e')](_0x1a4c74);}return _0x363a5b['status'](_0x1a4c74)[_0x5497('0x1f')]();};}function respondWithResult(_0x2bfd8a,_0x19e5f3){_0x19e5f3=_0x19e5f3||0xc8;return function(_0x3ce50b){if(_0x3ce50b){return _0x2bfd8a[_0x5497('0x20')](_0x19e5f3)[_0x5497('0x21')](_0x3ce50b);}};}function respondWithFilteredResult(_0x2f2997,_0x575f6b){return function(_0x56a788){if(_0x56a788){var _0x3f4d20=_0x56a788[_0x5497('0x22')],_0x1bf442=_0x575f6b[_0x5497('0x23')],_0x3a47fd=_0x575f6b[_0x5497('0x23')]+_0x575f6b[_0x5497('0x24')],_0x5d9e24;if(_0x3a47fd>=_0x3f4d20){_0x3a47fd=_0x3f4d20;_0x5d9e24=0xc8;}else{_0x5d9e24=0xce;}_0x2f2997[_0x5497('0x20')](_0x5d9e24);return _0x2f2997[_0x5497('0x25')](_0x5497('0x26'),_0x1bf442+'-'+_0x3a47fd+'/'+_0x3f4d20)[_0x5497('0x21')](_0x56a788);}return null;};}function patchUpdates(_0x2e3960){return function(_0x3f54ef){try{jsonpatch[_0x5497('0x27')](_0x3f54ef,_0x2e3960,!![]);}catch(_0x52c049){return BPromise[_0x5497('0x28')](_0x52c049);}return _0x3f54ef['save']();};}function saveUpdates(_0x19200a,_0xd0868d){return function(_0x44265c){if(_0x44265c){return _0x44265c[_0x5497('0x29')](_0x19200a)[_0x5497('0x2a')](function(_0x3b2fbc){return _0x3b2fbc;});}return null;};}function removeEntity(_0x5018fa,_0x54043a){return function(_0x1eefce){if(_0x1eefce){return _0x1eefce[_0x5497('0x2b')]()[_0x5497('0x2a')](function(){_0x5018fa[_0x5497('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x13b7a4,_0x57268c){return function(_0x1f3198){if(!_0x1f3198){_0x13b7a4[_0x5497('0x1e')](0x194);}return _0x1f3198;};}function handleError(_0x429d36,_0x34a1a5){_0x34a1a5=_0x34a1a5||0x1f4;return function(_0x163a30){logger[_0x5497('0x2c')](_0x163a30['stack']);if(_0x163a30[_0x5497('0x2d')]){delete _0x163a30['name'];}_0x429d36['status'](_0x34a1a5)['send'](_0x163a30);};}exports[_0x5497('0x2e')]=function(_0x48d146,_0x5e9356){var _0xc3465={},_0xb14593={},_0x1cf908={'count':0x0,'rows':[]};var _0x4c442a=_['map'](db['VoiceQueueReport'][_0x5497('0x2f')],function(_0x471e0b){return{'name':_0x471e0b[_0x5497('0x30')],'type':_0x471e0b['type']['key']};});_0xb14593['model']=_[_0x5497('0x31')](_0x4c442a,'name');_0xb14593[_0x5497('0x32')]=_[_0x5497('0x33')](_0x48d146[_0x5497('0x32')]);_0xb14593['filters']=_[_0x5497('0x34')](_0xb14593[_0x5497('0x35')],_0xb14593['query']);_0xc3465[_0x5497('0x36')]=_[_0x5497('0x34')](_0xb14593[_0x5497('0x35')],qs['fields'](_0x48d146[_0x5497('0x32')][_0x5497('0x37')]));_0xc3465[_0x5497('0x36')]=_0xc3465[_0x5497('0x36')][_0x5497('0x38')]?_0xc3465['attributes']:_0xb14593[_0x5497('0x35')];if(!_0x48d146[_0x5497('0x32')]['hasOwnProperty'](_0x5497('0x39'))){_0xc3465[_0x5497('0x24')]=qs[_0x5497('0x24')](_0x48d146[_0x5497('0x32')][_0x5497('0x24')]);_0xc3465[_0x5497('0x23')]=qs['offset'](_0x48d146[_0x5497('0x32')]['offset']);}_0xc3465[_0x5497('0x3a')]=qs[_0x5497('0x3b')](_0x48d146[_0x5497('0x32')]['sort']);_0xc3465['where']=qs[_0x5497('0x3c')](_[_0x5497('0x3d')](_0x48d146[_0x5497('0x32')],_0xb14593[_0x5497('0x3c')]));if(_0x48d146[_0x5497('0x32')][_0x5497('0x3e')]){_0xc3465['where']=_[_0x5497('0x3f')](_0xc3465[_0x5497('0x40')],{'$or':_[_0x5497('0x31')](_0x4c442a,function(_0x2bd07a){if(_0x2bd07a[_0x5497('0x41')]!==_0x5497('0x42')){var _0x1e3b6a={};_0x1e3b6a[_0x2bd07a[_0x5497('0x2d')]]={'$like':'%'+_0x48d146[_0x5497('0x32')]['filter']+'%'};return _0x1e3b6a;}})});}_0xc3465=_[_0x5497('0x3f')]({},_0xc3465,_0x48d146[_0x5497('0x43')]);var _0x1e9616={'where':_0xc3465[_0x5497('0x40')]};return db[_0x5497('0x44')][_0x5497('0x22')](_0x1e9616)[_0x5497('0x2a')](function(_0x59ed13){_0x1cf908[_0x5497('0x22')]=_0x59ed13;if(_0x48d146[_0x5497('0x32')][_0x5497('0x45')]){_0xc3465[_0x5497('0x46')]=[{'all':!![]}];}return db[_0x5497('0x44')][_0x5497('0x47')](_0xc3465);})[_0x5497('0x2a')](function(_0x547437){_0x1cf908[_0x5497('0x48')]=_0x547437;return _0x1cf908;})[_0x5497('0x2a')](respondWithFilteredResult(_0x5e9356,_0xc3465))[_0x5497('0x49')](handleError(_0x5e9356,null));};exports[_0x5497('0x4a')]=function(_0x20e947,_0xd90608){var _0xc1a999={'raw':![],'where':{'id':_0x20e947[_0x5497('0x4b')]['id']}},_0x3eda22={};_0x3eda22[_0x5497('0x35')]=_['keys'](db[_0x5497('0x44')]['rawAttributes']);_0x3eda22[_0x5497('0x32')]=_[_0x5497('0x33')](_0x20e947[_0x5497('0x32')]);_0x3eda22[_0x5497('0x3c')]=_[_0x5497('0x34')](_0x3eda22['model'],_0x3eda22[_0x5497('0x32')]);_0xc1a999[_0x5497('0x36')]=_['intersection'](_0x3eda22[_0x5497('0x35')],qs['fields'](_0x20e947[_0x5497('0x32')]['fields']));_0xc1a999[_0x5497('0x36')]=_0xc1a999[_0x5497('0x36')][_0x5497('0x38')]?_0xc1a999[_0x5497('0x36')]:_0x3eda22[_0x5497('0x35')];if(_0x20e947['query']['includeAll']){_0xc1a999['include']=[{'all':!![]}];}_0xc1a999=_['merge']({},_0xc1a999,_0x20e947[_0x5497('0x43')]);return db[_0x5497('0x44')][_0x5497('0x4c')](_0xc1a999)[_0x5497('0x2a')](handleEntityNotFound(_0xd90608,null))[_0x5497('0x2a')](respondWithResult(_0xd90608,null))[_0x5497('0x49')](handleError(_0xd90608,null));};exports[_0x5497('0x4d')]=function(_0x466287,_0x2626bf){return db['VoiceQueueReport'][_0x5497('0x4d')](_0x466287[_0x5497('0x4e')],{})[_0x5497('0x2a')](respondWithResult(_0x2626bf,0xc9))['catch'](handleError(_0x2626bf,null));};exports[_0x5497('0x29')]=function(_0x530475,_0x12ffbc){if(_0x530475[_0x5497('0x4e')]['id']){delete _0x530475[_0x5497('0x4e')]['id'];}return db['VoiceQueueReport'][_0x5497('0x4c')]({'where':{'id':_0x530475[_0x5497('0x4b')]['id']}})['then'](handleEntityNotFound(_0x12ffbc,null))[_0x5497('0x2a')](saveUpdates(_0x530475['body'],null))[_0x5497('0x2a')](respondWithResult(_0x12ffbc,null))['catch'](handleError(_0x12ffbc,null));};exports[_0x5497('0x2b')]=function(_0x400860,_0x26fd9f){return db[_0x5497('0x44')][_0x5497('0x4c')]({'where':{'id':_0x400860[_0x5497('0x4b')]['id']}})[_0x5497('0x2a')](handleEntityNotFound(_0x26fd9f,null))[_0x5497('0x2a')](removeEntity(_0x26fd9f,null))['catch'](handleError(_0x26fd9f,null));};exports[_0x5497('0x4f')]=function(_0x5b2c22,_0x4c516b){return db[_0x5497('0x44')][_0x5497('0x4f')]()['then'](respondWithResult(_0x4c516b,null))[_0x5497('0x49')](handleError(_0x4c516b,null));};exports[_0x5497('0x50')]=function(_0x436a83,_0x3094c7){var _0x4ccf0e={},_0x1b9f3d={},_0x538d18={'count':0x0,'rows':[]};_0x1b9f3d['model']=_[_0x5497('0x33')](db[_0x5497('0x44')][_0x5497('0x2f')]);_0x1b9f3d['query']=_['keys'](_0x436a83[_0x5497('0x32')]);_0x1b9f3d['filters']=_[_0x5497('0x34')](_0x1b9f3d['model'],_0x1b9f3d[_0x5497('0x32')]);_0x4ccf0e['attributes']=_[_0x5497('0x34')](_0x1b9f3d[_0x5497('0x35')],qs['fields'](_0x436a83[_0x5497('0x32')]['fields']));_0x4ccf0e['attributes']=_0x4ccf0e[_0x5497('0x36')][_0x5497('0x38')]?_0x4ccf0e['attributes']:_0x1b9f3d[_0x5497('0x35')];if(!_0x436a83[_0x5497('0x32')][_0x5497('0x51')](_0x5497('0x39'))){_0x4ccf0e[_0x5497('0x24')]=qs[_0x5497('0x24')](_0x436a83['query'][_0x5497('0x24')]);_0x4ccf0e['offset']=qs['offset'](_0x436a83['query'][_0x5497('0x23')]);}_0x4ccf0e[_0x5497('0x3a')]=qs[_0x5497('0x3b')](_0x436a83['query'][_0x5497('0x3b')]);_0x4ccf0e['where']=qs['filters'](_[_0x5497('0x3d')](_0x436a83[_0x5497('0x32')],_0x1b9f3d[_0x5497('0x3c')]));if(_0x436a83[_0x5497('0x32')][_0x5497('0x3e')]){_0x4ccf0e[_0x5497('0x40')]=_['merge'](_0x4ccf0e[_0x5497('0x40')],{'$or':_[_0x5497('0x31')](_0x4ccf0e[_0x5497('0x36')],function(_0xc783ce){var _0x4b86a8={};_0x4b86a8[_0xc783ce]={'$like':'%'+_0x436a83[_0x5497('0x32')][_0x5497('0x3e')]+'%'};return _0x4b86a8;})});}_0x4ccf0e=_[_0x5497('0x3f')]({},_0x4ccf0e,_0x436a83[_0x5497('0x43')]);var _0x5823f6={'where':_0x4ccf0e[_0x5497('0x40')]};return db[_0x5497('0x44')][_0x5497('0x22')](_0x5823f6)['then'](function(_0x1ab48f){_0x538d18['count']=_0x1ab48f;if(_0x436a83['query']['includeAll']){_0x4ccf0e[_0x5497('0x46')]=[{'all':!![]}];}return db[_0x5497('0x44')][_0x5497('0x47')](_0x4ccf0e);})['then'](function(_0x23b8f0){_0x538d18[_0x5497('0x48')]=_0x23b8f0;return _0x538d18;})[_0x5497('0x2a')](respondWithFilteredResult(_0x3094c7,_0x4ccf0e,_0x5497('0x50')))['catch'](handleError(_0x3094c7,null,_0x5497('0x50')));};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.events.js b/server/api/voiceQueueReport/voiceQueueReport.events.js
index ca5c76d..843d097 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 _0xfb9a=['update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','VoiceQueueReport','setMaxListeners'];(function(_0x31a576,_0x424419){var _0x30b1d3=function(_0x4710e8){while(--_0x4710e8){_0x31a576['push'](_0x31a576['shift']());}};_0x30b1d3(++_0x424419);}(_0xfb9a,0x1f4));var _0xafb9=function(_0x1104b5,_0x2cab74){_0x1104b5=_0x1104b5-0x0;var _0x1ed491=_0xfb9a[_0x1104b5];return _0x1ed491;};'use strict';var EventEmitter=require(_0xafb9('0x0'));var VoiceQueueReport=require(_0xafb9('0x1'))['db'][_0xafb9('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xafb9('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xafb9('0x4'),'afterDestroy':_0xafb9('0x5')};function emitEvent(_0xd6a89d){return function(_0x2a358e,_0x1c4692,_0x4bc3d3){VoiceQueueReportEvents[_0xafb9('0x6')](_0xd6a89d+':'+_0x2a358e['id'],_0x2a358e);VoiceQueueReportEvents[_0xafb9('0x6')](_0xd6a89d,_0x2a358e);_0x4bc3d3(null);};}for(var e in events){if(events[_0xafb9('0x7')](e)){var event=events[e];VoiceQueueReport[_0xafb9('0x8')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;
\ No newline at end of file
+var _0x08a9=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save'];(function(_0x1f448a,_0x477d9d){var _0x24c6ac=function(_0x114123){while(--_0x114123){_0x1f448a['push'](_0x1f448a['shift']());}};_0x24c6ac(++_0x477d9d);}(_0x08a9,0xf6));var _0x908a=function(_0xeeea5,_0x92458a){_0xeeea5=_0xeeea5-0x0;var _0x5b7b6a=_0x08a9[_0xeeea5];return _0x5b7b6a;};'use strict';var EventEmitter=require(_0x908a('0x0'));var VoiceQueueReport=require(_0x908a('0x1'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x908a('0x2')](0x0);var events={'afterCreate':_0x908a('0x3'),'afterUpdate':_0x908a('0x4'),'afterDestroy':_0x908a('0x5')};function emitEvent(_0x96cdff){return function(_0x5a56cb,_0x500ab6,_0x132b5a){VoiceQueueReportEvents['emit'](_0x96cdff+':'+_0x5a56cb['id'],_0x5a56cb);VoiceQueueReportEvents[_0x908a('0x6')](_0x96cdff,_0x5a56cb);_0x132b5a(null);};}for(var e in events){if(events[_0x908a('0x7')](e)){var event=events[e];VoiceQueueReport[_0x908a('0x8')](e,emitEvent(event));}}module[_0x908a('0x9')]=VoiceQueueReportEvents;
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.model.js b/server/api/voiceQueueReport/voiceQueueReport.model.js
index 89fb7ae..b6abbe8 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 _0x5f2f=['VoiceQueueReport','uniqueid','calleridnum','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','./voiceQueueReport.attributes','exports','define'];(function(_0x27bd2c,_0x24bd98){var _0x3784ea=function(_0x4ca802){while(--_0x4ca802){_0x27bd2c['push'](_0x27bd2c['shift']());}};_0x3784ea(++_0x24bd98);}(_0x5f2f,0x73));var _0xf5f2=function(_0x23832b,_0x6a777){_0x23832b=_0x23832b-0x0;var _0x583750=_0x5f2f[_0x23832b];return _0x583750;};'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':'report_queue','paranoid':![],'indexes':[{'fields':[_0xf5f2('0xc')]},{'fields':[_0xf5f2('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x0b0e=['calleridnum','lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueueReport.attributes','exports','define','uniqueid'];(function(_0x1215ec,_0x3786c9){var _0x16f2bc=function(_0x39902c){while(--_0x39902c){_0x1215ec['push'](_0x1215ec['shift']());}};_0x16f2bc(++_0x3786c9);}(_0x0b0e,0x187));var _0xe0b0=function(_0x5cb1af,_0x4bdc8c){_0x5cb1af=_0x5cb1af-0x0;var _0x8d7940=_0x0b0e[_0x5cb1af];return _0x8d7940;};'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')]('VoiceQueueReport',attributes,{'tableName':'report_queue','paranoid':![],'indexes':[{'fields':[_0xe0b0('0xb')]},{'fields':[_0xe0b0('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.rpc.js b/server/api/voiceQueueReport/voiceQueueReport.rpc.js
index f6a6770..3188d8b 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 _0x59c5=['then','info','VoiceQueueReport,\x20%s,\x20%s','request\x20sent','debug','error','message','catch','VoiceQueueReport','findAll','options','raw','where','attributes','include','map','model','GetVoiceQueueReport','stringify','CreateVoiceQueueReport','body','update','limit','UpdateVoiceQueueReport','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request'];(function(_0xbc30ba,_0x2c3043){var _0x2a871c=function(_0x556965){while(--_0x556965){_0xbc30ba['push'](_0xbc30ba['shift']());}};_0x2a871c(++_0x2c3043);}(_0x59c5,0x180));var _0x559c=function(_0x2c4a37,_0x46a696){_0x2c4a37=_0x2c4a37-0x0;var _0x418f51=_0x59c5[_0x2c4a37];return _0x418f51;};'use strict';var _=require(_0x559c('0x0'));var util=require(_0x559c('0x1'));var moment=require(_0x559c('0x2'));var BPromise=require('bluebird');var rs=require(_0x559c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x559c('0x4'))['db'];var utils=require(_0x559c('0x5'));var logger=require(_0x559c('0x6'))('rpc');var config=require(_0x559c('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x559c('0x8')][_0x559c('0x9')]({'port':0x232a});config[_0x559c('0xa')]=_[_0x559c('0xb')](config[_0x559c('0xa')],{'host':_0x559c('0xc'),'port':0x18eb});var socket=require(_0x559c('0xd'))(new Redis(config[_0x559c('0xa')]));require('./voiceQueueReport.socket')[_0x559c('0xe')](socket);function respondWithRpcPromise(_0x260ad9,_0x5b8ad9,_0xdace63){return new BPromise(function(_0x1f43e1,_0x2f3dca){return client[_0x559c('0xf')](_0x260ad9,_0xdace63)[_0x559c('0x10')](function(_0x23e615){logger[_0x559c('0x11')](_0x559c('0x12'),_0x5b8ad9,_0x559c('0x13'));logger[_0x559c('0x14')]('VoiceQueueReport,\x20%s,\x20%s,\x20%s',_0x5b8ad9,_0x559c('0x13'),JSON['stringify'](_0x23e615));if(_0x23e615['error']){if(_0x23e615['error']['code']===0x1f4){logger[_0x559c('0x15')](_0x559c('0x12'),_0x5b8ad9,_0x23e615[_0x559c('0x15')]['message']);return _0x2f3dca(_0x23e615['error'][_0x559c('0x16')]);}logger[_0x559c('0x15')]('VoiceQueueReport,\x20%s,\x20%s',_0x5b8ad9,_0x23e615[_0x559c('0x15')]['message']);return _0x1f43e1(_0x23e615[_0x559c('0x15')][_0x559c('0x16')]);}else{logger[_0x559c('0x11')](_0x559c('0x12'),_0x5b8ad9,_0x559c('0x13'));_0x1f43e1(_0x23e615['result']['message']);}})[_0x559c('0x17')](function(_0x1ecdf1){logger[_0x559c('0x15')](_0x559c('0x12'),_0x5b8ad9,_0x1ecdf1);_0x2f3dca(_0x1ecdf1);});});}exports['GetVoiceQueueReport']=function(_0xd6a5f){var _0x544b02=this;return new Promise(function(_0x5bd0b2,_0x4a5161){return db[_0x559c('0x18')][_0x559c('0x19')]({'raw':_0xd6a5f[_0x559c('0x1a')]?_0xd6a5f[_0x559c('0x1a')][_0x559c('0x1b')]===undefined?!![]:![]:!![],'where':_0xd6a5f[_0x559c('0x1a')]?_0xd6a5f['options'][_0x559c('0x1c')]||null:null,'attributes':_0xd6a5f[_0x559c('0x1a')]?_0xd6a5f[_0x559c('0x1a')][_0x559c('0x1d')]||null:null,'limit':_0xd6a5f[_0x559c('0x1a')]?_0xd6a5f['options']['limit']||null:null,'include':_0xd6a5f['options']?_0xd6a5f[_0x559c('0x1a')][_0x559c('0x1e')]?_[_0x559c('0x1f')](_0xd6a5f[_0x559c('0x1a')][_0x559c('0x1e')],function(_0x39547c){return{'model':db[_0x39547c[_0x559c('0x20')]],'as':_0x39547c['as'],'attributes':_0x39547c['attributes'],'include':_0x39547c[_0x559c('0x1e')]?_[_0x559c('0x1f')](_0x39547c[_0x559c('0x1e')],function(_0x470155){return{'model':db[_0x470155[_0x559c('0x20')]],'as':_0x470155['as'],'attributes':_0x470155['attributes'],'include':_0x470155[_0x559c('0x1e')]?_[_0x559c('0x1f')](_0x470155[_0x559c('0x1e')],function(_0x539c42){return{'model':db[_0x539c42[_0x559c('0x20')]],'as':_0x539c42['as'],'attributes':_0x539c42[_0x559c('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x559c('0x10')](function(_0x455f76){logger[_0x559c('0x11')](_0x559c('0x21'),_0xd6a5f);logger['debug'](_0x559c('0x21'),_0xd6a5f,JSON[_0x559c('0x22')](_0x455f76));_0x5bd0b2(_0x455f76);})[_0x559c('0x17')](function(_0x421528){logger[_0x559c('0x15')]('GetVoiceQueueReport',_0x421528[_0x559c('0x16')],_0xd6a5f);_0x4a5161(_0x544b02['error'](0x1f4,_0x421528[_0x559c('0x16')]));});});};exports[_0x559c('0x23')]=function(_0x57369f){var _0x15f3f0=this;return new Promise(function(_0x55bf4f,_0x3463fd){return db['VoiceQueueReport']['create'](_0x57369f[_0x559c('0x24')],{'raw':_0x57369f['options']?_0x57369f[_0x559c('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0x559c('0x10')](function(_0x2cd1cf){logger[_0x559c('0x11')]('CreateVoiceQueueReport',_0x57369f);logger[_0x559c('0x14')](_0x559c('0x23'),_0x57369f,JSON['stringify'](_0x2cd1cf));_0x55bf4f(_0x2cd1cf);})[_0x559c('0x17')](function(_0x4f1902){logger[_0x559c('0x15')]('CreateVoiceQueueReport',_0x4f1902[_0x559c('0x16')],_0x57369f);_0x3463fd(_0x15f3f0[_0x559c('0x15')](0x1f4,_0x4f1902[_0x559c('0x16')]));});});};exports['UpdateVoiceQueueReport']=function(_0x4891c7){var _0x3ccf33=this;return new Promise(function(_0x18d076,_0x46349f){return db[_0x559c('0x18')][_0x559c('0x25')](_0x4891c7[_0x559c('0x24')],{'raw':_0x4891c7['options']?_0x4891c7[_0x559c('0x1a')][_0x559c('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4891c7[_0x559c('0x1a')]?_0x4891c7['options'][_0x559c('0x1c')]||null:null,'attributes':_0x4891c7['options']?_0x4891c7['options'][_0x559c('0x1d')]||null:null,'limit':_0x4891c7[_0x559c('0x1a')]?_0x4891c7['options'][_0x559c('0x26')]||null:null})['then'](function(_0x3dc261){logger[_0x559c('0x11')]('UpdateVoiceQueueReport',_0x4891c7);logger[_0x559c('0x14')](_0x559c('0x27'),_0x4891c7,JSON[_0x559c('0x22')](_0x3dc261));_0x18d076(_0x3dc261);})[_0x559c('0x17')](function(_0x25d4b8){logger['error'](_0x559c('0x27'),_0x25d4b8[_0x559c('0x16')],_0x4891c7);_0x46349f(_0x3ccf33[_0x559c('0x15')](0x1f4,_0x25d4b8[_0x559c('0x16')]));});});};
\ No newline at end of file
+var _0x4c00=['util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','./voiceQueueReport.socket','then','info','request\x20sent','debug','VoiceQueueReport,\x20%s,\x20%s,\x20%s','error','code','VoiceQueueReport,\x20%s,\x20%s','message','result','catch','GetVoiceQueueReport','VoiceQueueReport','findAll','options','raw','where','attributes','map','include','model','stringify','create','CreateVoiceQueueReport','UpdateVoiceQueueReport','update','body'];(function(_0x9138c0,_0x4002e1){var _0x2a8abb=function(_0x71c717){while(--_0x71c717){_0x9138c0['push'](_0x9138c0['shift']());}};_0x2a8abb(++_0x4002e1);}(_0x4c00,0x1a4));var _0x04c0=function(_0x1089fb,_0x2a412d){_0x1089fb=_0x1089fb-0x0;var _0x5deb2a=_0x4c00[_0x1089fb];return _0x5deb2a;};'use strict';var _=require('lodash');var util=require(_0x04c0('0x0'));var moment=require('moment');var BPromise=require(_0x04c0('0x1'));var rs=require(_0x04c0('0x2'));var fs=require('fs');var Redis=require(_0x04c0('0x3'));var db=require(_0x04c0('0x4'))['db'];var utils=require(_0x04c0('0x5'));var logger=require(_0x04c0('0x6'))(_0x04c0('0x7'));var config=require(_0x04c0('0x8'));var jayson=require(_0x04c0('0x9'));var client=jayson['client'][_0x04c0('0xa')]({'port':0x232a});config[_0x04c0('0xb')]=_[_0x04c0('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x04c0('0xd'))(new Redis(config[_0x04c0('0xb')]));require(_0x04c0('0xe'))['register'](socket);function respondWithRpcPromise(_0x4a59f6,_0x286afc,_0x11a877){return new BPromise(function(_0x2bdc6e,_0x400f5a){return client['request'](_0x4a59f6,_0x11a877)[_0x04c0('0xf')](function(_0x25222f){logger[_0x04c0('0x10')]('VoiceQueueReport,\x20%s,\x20%s',_0x286afc,_0x04c0('0x11'));logger[_0x04c0('0x12')](_0x04c0('0x13'),_0x286afc,'request\x20sent',JSON['stringify'](_0x25222f));if(_0x25222f[_0x04c0('0x14')]){if(_0x25222f[_0x04c0('0x14')][_0x04c0('0x15')]===0x1f4){logger[_0x04c0('0x14')](_0x04c0('0x16'),_0x286afc,_0x25222f[_0x04c0('0x14')][_0x04c0('0x17')]);return _0x400f5a(_0x25222f['error'][_0x04c0('0x17')]);}logger[_0x04c0('0x14')](_0x04c0('0x16'),_0x286afc,_0x25222f[_0x04c0('0x14')][_0x04c0('0x17')]);return _0x2bdc6e(_0x25222f['error']['message']);}else{logger[_0x04c0('0x10')](_0x04c0('0x16'),_0x286afc,_0x04c0('0x11'));_0x2bdc6e(_0x25222f[_0x04c0('0x18')][_0x04c0('0x17')]);}})[_0x04c0('0x19')](function(_0x36e550){logger['error']('VoiceQueueReport,\x20%s,\x20%s',_0x286afc,_0x36e550);_0x400f5a(_0x36e550);});});}exports[_0x04c0('0x1a')]=function(_0xf7cfcb){var _0x1a1ab6=this;return new Promise(function(_0xf9ca38,_0x192f40){return db[_0x04c0('0x1b')][_0x04c0('0x1c')]({'raw':_0xf7cfcb['options']?_0xf7cfcb[_0x04c0('0x1d')][_0x04c0('0x1e')]===undefined?!![]:![]:!![],'where':_0xf7cfcb[_0x04c0('0x1d')]?_0xf7cfcb[_0x04c0('0x1d')][_0x04c0('0x1f')]||null:null,'attributes':_0xf7cfcb[_0x04c0('0x1d')]?_0xf7cfcb[_0x04c0('0x1d')][_0x04c0('0x20')]||null:null,'limit':_0xf7cfcb[_0x04c0('0x1d')]?_0xf7cfcb[_0x04c0('0x1d')]['limit']||null:null,'include':_0xf7cfcb[_0x04c0('0x1d')]?_0xf7cfcb[_0x04c0('0x1d')]['include']?_[_0x04c0('0x21')](_0xf7cfcb[_0x04c0('0x1d')][_0x04c0('0x22')],function(_0x14b04b){return{'model':db[_0x14b04b[_0x04c0('0x23')]],'as':_0x14b04b['as'],'attributes':_0x14b04b['attributes'],'include':_0x14b04b[_0x04c0('0x22')]?_['map'](_0x14b04b[_0x04c0('0x22')],function(_0x553ab5){return{'model':db[_0x553ab5[_0x04c0('0x23')]],'as':_0x553ab5['as'],'attributes':_0x553ab5[_0x04c0('0x20')],'include':_0x553ab5['include']?_[_0x04c0('0x21')](_0x553ab5['include'],function(_0x12abc9){return{'model':db[_0x12abc9[_0x04c0('0x23')]],'as':_0x12abc9['as'],'attributes':_0x12abc9[_0x04c0('0x20')]};}):[]};}):[]};}):[]:[]})[_0x04c0('0xf')](function(_0x62e121){logger[_0x04c0('0x10')](_0x04c0('0x1a'),_0xf7cfcb);logger['debug'](_0x04c0('0x1a'),_0xf7cfcb,JSON[_0x04c0('0x24')](_0x62e121));_0xf9ca38(_0x62e121);})[_0x04c0('0x19')](function(_0x277e50){logger[_0x04c0('0x14')](_0x04c0('0x1a'),_0x277e50[_0x04c0('0x17')],_0xf7cfcb);_0x192f40(_0x1a1ab6[_0x04c0('0x14')](0x1f4,_0x277e50[_0x04c0('0x17')]));});});};exports['CreateVoiceQueueReport']=function(_0x3062a4){var _0x55852b=this;return new Promise(function(_0x1487db,_0xcd2337){return db[_0x04c0('0x1b')][_0x04c0('0x25')](_0x3062a4['body'],{'raw':_0x3062a4[_0x04c0('0x1d')]?_0x3062a4[_0x04c0('0x1d')][_0x04c0('0x1e')]===undefined?!![]:![]:!![]})['then'](function(_0x36b433){logger['info'](_0x04c0('0x26'),_0x3062a4);logger[_0x04c0('0x12')](_0x04c0('0x26'),_0x3062a4,JSON['stringify'](_0x36b433));_0x1487db(_0x36b433);})['catch'](function(_0x4cadda){logger['error'](_0x04c0('0x26'),_0x4cadda['message'],_0x3062a4);_0xcd2337(_0x55852b[_0x04c0('0x14')](0x1f4,_0x4cadda[_0x04c0('0x17')]));});});};exports[_0x04c0('0x27')]=function(_0x55a7bd){var _0x3cefaa=this;return new Promise(function(_0x4087b6,_0x287a30){return db[_0x04c0('0x1b')][_0x04c0('0x28')](_0x55a7bd[_0x04c0('0x29')],{'raw':_0x55a7bd[_0x04c0('0x1d')]?_0x55a7bd['options'][_0x04c0('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x55a7bd['options']?_0x55a7bd[_0x04c0('0x1d')][_0x04c0('0x1f')]||null:null,'attributes':_0x55a7bd[_0x04c0('0x1d')]?_0x55a7bd['options'][_0x04c0('0x20')]||null:null,'limit':_0x55a7bd['options']?_0x55a7bd['options']['limit']||null:null})['then'](function(_0x626105){logger[_0x04c0('0x10')]('UpdateVoiceQueueReport',_0x55a7bd);logger[_0x04c0('0x12')](_0x04c0('0x27'),_0x55a7bd,JSON['stringify'](_0x626105));_0x4087b6(_0x626105);})[_0x04c0('0x19')](function(_0x251493){logger[_0x04c0('0x14')](_0x04c0('0x27'),_0x251493[_0x04c0('0x17')],_0x55a7bd);_0x287a30(_0x3cefaa['error'](0x1f4,_0x251493[_0x04c0('0x17')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceQueueReport/voiceQueueReport.socket.js b/server/api/voiceQueueReport/voiceQueueReport.socket.js
index f943b89..82d9e21 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 _0x313e=['register','length','voiceQueueReport:','save','update','emit','removeListener'];(function(_0x58a450,_0x55503f){var _0x575bf0=function(_0x27a195){while(--_0x27a195){_0x58a450['push'](_0x58a450['shift']());}};_0x575bf0(++_0x55503f);}(_0x313e,0xf1));var _0xe313=function(_0x543a4e,_0x544f2e){_0x543a4e=_0x543a4e-0x0;var _0x27a3a9=_0x313e[_0x543a4e];return _0x27a3a9;};'use strict';var VoiceQueueReportEvents=require('./voiceQueueReport.events');var events=[_0xe313('0x0'),'remove',_0xe313('0x1')];function createListener(_0x2332f0,_0x115ba5){return function(_0x4fa2d5){_0x115ba5[_0xe313('0x2')](_0x2332f0,_0x4fa2d5);};}function removeListener(_0x5bb278,_0x495963){return function(){VoiceQueueReportEvents[_0xe313('0x3')](_0x5bb278,_0x495963);};}exports[_0xe313('0x4')]=function(_0x574286){for(var _0x4a22d6=0x0,_0x526349=events[_0xe313('0x5')];_0x4a22d6<_0x526349;_0x4a22d6++){var _0x4c5135=events[_0x4a22d6];var _0x27723a=createListener(_0xe313('0x6')+_0x4c5135,_0x574286);VoiceQueueReportEvents['on'](_0x4c5135,_0x27723a);}};
\ No newline at end of file
+var _0x924d=['register','length','voiceQueueReport:','./voiceQueueReport.events','save','remove','update','emit','removeListener'];(function(_0x7e3fc2,_0x51db17){var _0x3eed82=function(_0xdc9839){while(--_0xdc9839){_0x7e3fc2['push'](_0x7e3fc2['shift']());}};_0x3eed82(++_0x51db17);}(_0x924d,0x11a));var _0xd924=function(_0x2d0854,_0x4c5b12){_0x2d0854=_0x2d0854-0x0;var _0x287c91=_0x924d[_0x2d0854];return _0x287c91;};'use strict';var VoiceQueueReportEvents=require(_0xd924('0x0'));var events=[_0xd924('0x1'),_0xd924('0x2'),_0xd924('0x3')];function createListener(_0x128a6e,_0x687e8a){return function(_0x3cfe1b){_0x687e8a[_0xd924('0x4')](_0x128a6e,_0x3cfe1b);};}function removeListener(_0x30c08d,_0x1d07ef){return function(){VoiceQueueReportEvents[_0xd924('0x5')](_0x30c08d,_0x1d07ef);};}exports[_0xd924('0x6')]=function(_0x329e04){for(var _0x3d71bd=0x0,_0x3cd1af=events[_0xd924('0x7')];_0x3d71bd<_0x3cd1af;_0x3d71bd++){var _0x3eb3f5=events[_0x3d71bd];var _0x15a6cc=createListener(_0xd924('0x8')+_0x3eb3f5,_0x329e04);VoiceQueueReportEvents['on'](_0x3eb3f5,_0x15a6cc);}};
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/index.js b/server/api/voiceQueuesLog/index.js
index 3e652a2..fa26c75 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 _0xf73c=['post','create','put','update','delete','multer','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueuesLog.controller','isAuthenticated','index','get','/:id','show'];(function(_0x160cc0,_0x22f3a0){var _0x1f8dad=function(_0x3ccf62){while(--_0x3ccf62){_0x160cc0['push'](_0x160cc0['shift']());}};_0x1f8dad(++_0x22f3a0);}(_0xf73c,0x1eb));var _0xcf73=function(_0x502485,_0x360a0f){_0x502485=_0x502485-0x0;var _0x299172=_0xf73c[_0x502485];return _0x299172;};'use strict';var multer=require(_0xcf73('0x0'));var util=require('util');var path=require(_0xcf73('0x1'));var timeout=require(_0xcf73('0x2'));var express=require(_0xcf73('0x3'));var router=express['Router']();var auth=require(_0xcf73('0x4'));var interaction=require(_0xcf73('0x5'));var config=require(_0xcf73('0x6'));var controller=require(_0xcf73('0x7'));router['get']('/',auth[_0xcf73('0x8')](),controller[_0xcf73('0x9')]);router[_0xcf73('0xa')](_0xcf73('0xb'),auth[_0xcf73('0x8')](),controller[_0xcf73('0xc')]);router[_0xcf73('0xd')]('/',auth['isAuthenticated'](),controller[_0xcf73('0xe')]);router[_0xcf73('0xf')]('/:id',auth[_0xcf73('0x8')](),controller[_0xcf73('0x10')]);router[_0xcf73('0x11')](_0xcf73('0xb'),auth[_0xcf73('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xf185=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./voiceQueuesLog.controller','get','isAuthenticated','index','/:id','post','create','put','update','multer','path'];(function(_0x266b7e,_0x508736){var _0x541984=function(_0x3cdc2f){while(--_0x3cdc2f){_0x266b7e['push'](_0x266b7e['shift']());}};_0x541984(++_0x508736);}(_0xf185,0x1be));var _0x5f18=function(_0x4094f7,_0x35ce70){_0x4094f7=_0x4094f7-0x0;var _0x4a3475=_0xf185[_0x4094f7];return _0x4a3475;};'use strict';var multer=require(_0x5f18('0x0'));var util=require('util');var path=require(_0x5f18('0x1'));var timeout=require(_0x5f18('0x2'));var express=require(_0x5f18('0x3'));var router=express[_0x5f18('0x4')]();var auth=require(_0x5f18('0x5'));var interaction=require(_0x5f18('0x6'));var config=require('../../config/environment');var controller=require(_0x5f18('0x7'));router[_0x5f18('0x8')]('/',auth[_0x5f18('0x9')](),controller[_0x5f18('0xa')]);router['get'](_0x5f18('0xb'),auth[_0x5f18('0x9')](),controller['show']);router[_0x5f18('0xc')]('/',auth['isAuthenticated'](),controller[_0x5f18('0xd')]);router[_0x5f18('0xe')]('/:id',auth[_0x5f18('0x9')](),controller[_0x5f18('0xf')]);router['delete'](_0x5f18('0xb'),auth[_0x5f18('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js
index 5a402ab..da78cf2 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 _0xe107=['DATE','format','YYYY-MM-DD\x20HH:mm:ss','sequelize','moment','STRING'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xe107,0x135));var _0x7e10=function(_0x4321dc,_0x299cb9){_0x4321dc=_0x4321dc-0x0;var _0x47b458=_0xe107[_0x4321dc];return _0x47b458;};'use strict';var Sequelize=require(_0x7e10('0x0'));var moment=require(_0x7e10('0x1'));module['exports']={'time':{'type':Sequelize['STRING']},'callid':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x7e10('0x2')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize[_0x7e10('0x2')],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0x7e10('0x2')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0x7e10('0x2')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0x7e10('0x2')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0x7e10('0x2')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0x7e10('0x3')],'allowNull':![],'defaultValue':moment()[_0x7e10('0x4')](_0x7e10('0x5'))}};
\ No newline at end of file
+var _0x1500=['exports','STRING','DATE','YYYY-MM-DD\x20HH:mm:ss','sequelize','moment'];(function(_0x533401,_0x2cf8fb){var _0x8c090b=function(_0x39ecf2){while(--_0x39ecf2){_0x533401['push'](_0x533401['shift']());}};_0x8c090b(++_0x2cf8fb);}(_0x1500,0x64));var _0x0150=function(_0x4f1d89,_0x3c6c5a){_0x4f1d89=_0x4f1d89-0x0;var _0xfe2e22=_0x1500[_0x4f1d89];return _0xfe2e22;};'use strict';var Sequelize=require(_0x0150('0x0'));var moment=require(_0x0150('0x1'));module[_0x0150('0x2')]={'time':{'type':Sequelize[_0x0150('0x3')]},'callid':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0x0150('0x3')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0x0150('0x4')],'allowNull':![],'defaultValue':moment()['format'](_0x0150('0x5'))}};
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js
index cef6563..a1cbad8 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 _0x8357=['options','count','then','includeAll','include','findAll','rows','show','length','find','create','body','params','catch','html-pdf','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','end','status','offset','set','Content-Range','json','save','update','destroy','error','name','index','VoiceQueuesLog','rawAttributes','fieldName','type','key','model','map','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge'];(function(_0x166daa,_0x1c4a22){var _0x272467=function(_0x445959){while(--_0x445959){_0x166daa['push'](_0x166daa['shift']());}};_0x272467(++_0x1c4a22);}(_0x8357,0x12e));var _0x7835=function(_0x15a0a5,_0x4226d2){_0x15a0a5=_0x15a0a5-0x0;var _0x1b106e=_0x8357[_0x15a0a5];return _0x1b106e;};'use strict';var pdf=require(_0x7835('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x7835('0x1'));var zipdir=require(_0x7835('0x2'));var jsonpatch=require(_0x7835('0x3'));var rp=require(_0x7835('0x4'));var moment=require(_0x7835('0x5'));var BPromise=require(_0x7835('0x6'));var Mustache=require(_0x7835('0x7'));var util=require(_0x7835('0x8'));var path=require(_0x7835('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x7835('0xa'));var deskjs=require(_0x7835('0xb'));var toCsv=require(_0x7835('0xc'));var querystring=require(_0x7835('0xd'));var Papa=require(_0x7835('0xe'));var Redis=require(_0x7835('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x7835('0x10'));var as=require(_0x7835('0x11'));var hardwareService=require(_0x7835('0x12'));var logger=require(_0x7835('0x13'))(_0x7835('0x14'));var utils=require('../../config/utils');var config=require(_0x7835('0x15'));var db=require(_0x7835('0x16'))['db'];function respondWithStatusCode(_0x2fb46a,_0x27e06c){_0x27e06c=_0x27e06c||0xcc;return function(_0x17a31a){if(_0x17a31a){return _0x2fb46a[_0x7835('0x17')](_0x27e06c);}return _0x2fb46a['status'](_0x27e06c)[_0x7835('0x18')]();};}function respondWithResult(_0x463f06,_0xc26f32){_0xc26f32=_0xc26f32||0xc8;return function(_0x3f2440){if(_0x3f2440){return _0x463f06[_0x7835('0x19')](_0xc26f32)['json'](_0x3f2440);}};}function respondWithFilteredResult(_0x11d129,_0x3b0fa1){return function(_0x236106){if(_0x236106){var _0x40e063=_0x236106['count'],_0x2acc2a=_0x3b0fa1[_0x7835('0x1a')],_0x4a50bb=_0x3b0fa1[_0x7835('0x1a')]+_0x3b0fa1['limit'],_0x20d453;if(_0x4a50bb>=_0x40e063){_0x4a50bb=_0x40e063;_0x20d453=0xc8;}else{_0x20d453=0xce;}_0x11d129['status'](_0x20d453);return _0x11d129[_0x7835('0x1b')](_0x7835('0x1c'),_0x2acc2a+'-'+_0x4a50bb+'/'+_0x40e063)[_0x7835('0x1d')](_0x236106);}return null;};}function patchUpdates(_0x7cb64f){return function(_0x1b2d9e){try{jsonpatch['apply'](_0x1b2d9e,_0x7cb64f,!![]);}catch(_0x38e986){return BPromise['reject'](_0x38e986);}return _0x1b2d9e[_0x7835('0x1e')]();};}function saveUpdates(_0x5bd4f8,_0x531e1a){return function(_0xa0aa9c){if(_0xa0aa9c){return _0xa0aa9c[_0x7835('0x1f')](_0x5bd4f8)['then'](function(_0x3eb631){return _0x3eb631;});}return null;};}function removeEntity(_0x2988c2,_0xd0ad5c){return function(_0x53b616){if(_0x53b616){return _0x53b616[_0x7835('0x20')]()['then'](function(){_0x2988c2['status'](0xcc)[_0x7835('0x18')]();});}};}function handleEntityNotFound(_0x1aad08,_0x3fd3b0){return function(_0x589e97){if(!_0x589e97){_0x1aad08['sendStatus'](0x194);}return _0x589e97;};}function handleError(_0x351ba8,_0x47bcb8){_0x47bcb8=_0x47bcb8||0x1f4;return function(_0x6cc803){logger[_0x7835('0x21')](_0x6cc803['stack']);if(_0x6cc803[_0x7835('0x22')]){delete _0x6cc803[_0x7835('0x22')];}_0x351ba8['status'](_0x47bcb8)['send'](_0x6cc803);};}exports[_0x7835('0x23')]=function(_0x2adc33,_0x9a9bdc){var _0x12444a={},_0x34e3e3={},_0x129082={'count':0x0,'rows':[]};var _0x553097=_['map'](db[_0x7835('0x24')][_0x7835('0x25')],function(_0x158500){return{'name':_0x158500[_0x7835('0x26')],'type':_0x158500[_0x7835('0x27')][_0x7835('0x28')]};});_0x34e3e3[_0x7835('0x29')]=_[_0x7835('0x2a')](_0x553097,_0x7835('0x22'));_0x34e3e3['query']=_[_0x7835('0x2b')](_0x2adc33[_0x7835('0x2c')]);_0x34e3e3[_0x7835('0x2d')]=_[_0x7835('0x2e')](_0x34e3e3[_0x7835('0x29')],_0x34e3e3[_0x7835('0x2c')]);_0x12444a[_0x7835('0x2f')]=_[_0x7835('0x2e')](_0x34e3e3[_0x7835('0x29')],qs[_0x7835('0x30')](_0x2adc33[_0x7835('0x2c')][_0x7835('0x30')]));_0x12444a['attributes']=_0x12444a[_0x7835('0x2f')]['length']?_0x12444a[_0x7835('0x2f')]:_0x34e3e3['model'];if(!_0x2adc33['query'][_0x7835('0x31')](_0x7835('0x32'))){_0x12444a['limit']=qs[_0x7835('0x33')](_0x2adc33[_0x7835('0x2c')][_0x7835('0x33')]);_0x12444a['offset']=qs['offset'](_0x2adc33[_0x7835('0x2c')][_0x7835('0x1a')]);}_0x12444a[_0x7835('0x34')]=qs[_0x7835('0x35')](_0x2adc33[_0x7835('0x2c')][_0x7835('0x35')]);_0x12444a[_0x7835('0x36')]=qs[_0x7835('0x2d')](_[_0x7835('0x37')](_0x2adc33[_0x7835('0x2c')],_0x34e3e3[_0x7835('0x2d')]));if(_0x2adc33[_0x7835('0x2c')][_0x7835('0x38')]){_0x12444a['where']=_[_0x7835('0x39')](_0x12444a['where'],{'$or':_['map'](_0x553097,function(_0x5a5691){if(_0x5a5691[_0x7835('0x27')]!=='VIRTUAL'){var _0x1f22e3={};_0x1f22e3[_0x5a5691[_0x7835('0x22')]]={'$like':'%'+_0x2adc33[_0x7835('0x2c')][_0x7835('0x38')]+'%'};return _0x1f22e3;}})});}_0x12444a=_[_0x7835('0x39')]({},_0x12444a,_0x2adc33[_0x7835('0x3a')]);var _0x2b6108={'where':_0x12444a[_0x7835('0x36')]};return db[_0x7835('0x24')][_0x7835('0x3b')](_0x2b6108)[_0x7835('0x3c')](function(_0x444ee8){_0x129082[_0x7835('0x3b')]=_0x444ee8;if(_0x2adc33[_0x7835('0x2c')][_0x7835('0x3d')]){_0x12444a[_0x7835('0x3e')]=[{'all':!![]}];}return db[_0x7835('0x24')][_0x7835('0x3f')](_0x12444a);})[_0x7835('0x3c')](function(_0x3a03ca){_0x129082[_0x7835('0x40')]=_0x3a03ca;return _0x129082;})[_0x7835('0x3c')](respondWithFilteredResult(_0x9a9bdc,_0x12444a))['catch'](handleError(_0x9a9bdc,null));};exports[_0x7835('0x41')]=function(_0xdee5bc,_0x1bfd4b){var _0x11ac55={'raw':!![],'where':{'id':_0xdee5bc['params']['id']}},_0x4fadde={};_0x4fadde[_0x7835('0x29')]=_['keys'](db[_0x7835('0x24')][_0x7835('0x25')]);_0x4fadde[_0x7835('0x2c')]=_['keys'](_0xdee5bc['query']);_0x4fadde[_0x7835('0x2d')]=_[_0x7835('0x2e')](_0x4fadde[_0x7835('0x29')],_0x4fadde[_0x7835('0x2c')]);_0x11ac55[_0x7835('0x2f')]=_['intersection'](_0x4fadde['model'],qs['fields'](_0xdee5bc['query'][_0x7835('0x30')]));_0x11ac55[_0x7835('0x2f')]=_0x11ac55[_0x7835('0x2f')][_0x7835('0x42')]?_0x11ac55[_0x7835('0x2f')]:_0x4fadde[_0x7835('0x29')];if(_0xdee5bc[_0x7835('0x2c')][_0x7835('0x3d')]){_0x11ac55[_0x7835('0x3e')]=[{'all':!![]}];}_0x11ac55=_[_0x7835('0x39')]({},_0x11ac55,_0xdee5bc['options']);return db[_0x7835('0x24')][_0x7835('0x43')](_0x11ac55)[_0x7835('0x3c')](handleEntityNotFound(_0x1bfd4b,null))['then'](respondWithResult(_0x1bfd4b,null))['catch'](handleError(_0x1bfd4b,null));};exports[_0x7835('0x44')]=function(_0x11ff69,_0x5909e1){return db[_0x7835('0x24')][_0x7835('0x44')](_0x11ff69[_0x7835('0x45')],{})[_0x7835('0x3c')](respondWithResult(_0x5909e1,0xc9))['catch'](handleError(_0x5909e1,null));};exports[_0x7835('0x1f')]=function(_0x42f6c4,_0x31ece0){if(_0x42f6c4['body']['id']){delete _0x42f6c4[_0x7835('0x45')]['id'];}return db[_0x7835('0x24')]['find']({'where':{'id':_0x42f6c4[_0x7835('0x46')]['id']}})[_0x7835('0x3c')](handleEntityNotFound(_0x31ece0,null))[_0x7835('0x3c')](saveUpdates(_0x42f6c4[_0x7835('0x45')],null))[_0x7835('0x3c')](respondWithResult(_0x31ece0,null))[_0x7835('0x47')](handleError(_0x31ece0,null));};exports[_0x7835('0x20')]=function(_0x3fc467,_0x599786){return db[_0x7835('0x24')][_0x7835('0x43')]({'where':{'id':_0x3fc467[_0x7835('0x46')]['id']}})[_0x7835('0x3c')](handleEntityNotFound(_0x599786,null))['then'](removeEntity(_0x599786,null))['catch'](handleError(_0x599786,null));};
\ No newline at end of file
+var _0xc49b=['fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../mysqldb','status','end','json','offset','limit','set','apply','save','update','then','sendStatus','error','stack','name','send','index','map','VoiceQueuesLog','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','count','includeAll','findAll','rows','catch','show','fields','include','find','create','body','params','html-pdf','eml-format','rimraf','zip-dir'];(function(_0x224bcd,_0x1026dd){var _0xb33789=function(_0x3352a9){while(--_0x3352a9){_0x224bcd['push'](_0x224bcd['shift']());}};_0xb33789(++_0x1026dd);}(_0xc49b,0xdd));var _0xbc49=function(_0x13b37c,_0x4f616b){_0x13b37c=_0x13b37c-0x0;var _0x2d13fa=_0xc49b[_0x13b37c];return _0x2d13fa;};'use strict';var pdf=require(_0xbc49('0x0'));var emlformat=require(_0xbc49('0x1'));var rimraf=require(_0xbc49('0x2'));var zipdir=require(_0xbc49('0x3'));var jsonpatch=require(_0xbc49('0x4'));var rp=require(_0xbc49('0x5'));var moment=require(_0xbc49('0x6'));var BPromise=require('bluebird');var Mustache=require(_0xbc49('0x7'));var util=require(_0xbc49('0x8'));var path=require(_0xbc49('0x9'));var sox=require(_0xbc49('0xa'));var csv=require(_0xbc49('0xb'));var ejs=require(_0xbc49('0xc'));var fs=require('fs');var _=require(_0xbc49('0xd'));var squel=require(_0xbc49('0xe'));var crypto=require(_0xbc49('0xf'));var jsforce=require(_0xbc49('0x10'));var deskjs=require(_0xbc49('0x11'));var toCsv=require(_0xbc49('0xb'));var querystring=require(_0xbc49('0x12'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xbc49('0x13'));var qs=require(_0xbc49('0x14'));var as=require(_0xbc49('0x15'));var hardwareService=require(_0xbc49('0x16'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xbc49('0x17'));var db=require(_0xbc49('0x18'))['db'];function respondWithStatusCode(_0x5933cf,_0x105272){_0x105272=_0x105272||0xcc;return function(_0x96dee7){if(_0x96dee7){return _0x5933cf['sendStatus'](_0x105272);}return _0x5933cf[_0xbc49('0x19')](_0x105272)[_0xbc49('0x1a')]();};}function respondWithResult(_0x44c56c,_0x1e4661){_0x1e4661=_0x1e4661||0xc8;return function(_0x28bc6b){if(_0x28bc6b){return _0x44c56c[_0xbc49('0x19')](_0x1e4661)[_0xbc49('0x1b')](_0x28bc6b);}};}function respondWithFilteredResult(_0x4d4f47,_0x4b2df1){return function(_0x532b3a){if(_0x532b3a){var _0x124d5c=_0x532b3a['count'],_0x150905=_0x4b2df1[_0xbc49('0x1c')],_0x3a5348=_0x4b2df1['offset']+_0x4b2df1[_0xbc49('0x1d')],_0x352e21;if(_0x3a5348>=_0x124d5c){_0x3a5348=_0x124d5c;_0x352e21=0xc8;}else{_0x352e21=0xce;}_0x4d4f47[_0xbc49('0x19')](_0x352e21);return _0x4d4f47[_0xbc49('0x1e')]('Content-Range',_0x150905+'-'+_0x3a5348+'/'+_0x124d5c)['json'](_0x532b3a);}return null;};}function patchUpdates(_0x2893e3){return function(_0xd5ab10){try{jsonpatch[_0xbc49('0x1f')](_0xd5ab10,_0x2893e3,!![]);}catch(_0x3540b9){return BPromise['reject'](_0x3540b9);}return _0xd5ab10[_0xbc49('0x20')]();};}function saveUpdates(_0x2b0fdc,_0x5e69e5){return function(_0x538476){if(_0x538476){return _0x538476[_0xbc49('0x21')](_0x2b0fdc)[_0xbc49('0x22')](function(_0x461d93){return _0x461d93;});}return null;};}function removeEntity(_0x2d52d6,_0x1c4659){return function(_0x42e801){if(_0x42e801){return _0x42e801['destroy']()[_0xbc49('0x22')](function(){_0x2d52d6[_0xbc49('0x19')](0xcc)[_0xbc49('0x1a')]();});}};}function handleEntityNotFound(_0xc28c92,_0x459e58){return function(_0x4a5fdd){if(!_0x4a5fdd){_0xc28c92[_0xbc49('0x23')](0x194);}return _0x4a5fdd;};}function handleError(_0x41aa0b,_0x25e5ac){_0x25e5ac=_0x25e5ac||0x1f4;return function(_0x1ba525){logger[_0xbc49('0x24')](_0x1ba525[_0xbc49('0x25')]);if(_0x1ba525[_0xbc49('0x26')]){delete _0x1ba525[_0xbc49('0x26')];}_0x41aa0b['status'](_0x25e5ac)[_0xbc49('0x27')](_0x1ba525);};}exports[_0xbc49('0x28')]=function(_0x483142,_0x39e588){var _0x556d5c={},_0x47d06f={},_0x2f242f={'count':0x0,'rows':[]};var _0x304cbb=_[_0xbc49('0x29')](db[_0xbc49('0x2a')][_0xbc49('0x2b')],function(_0x3fa334){return{'name':_0x3fa334[_0xbc49('0x2c')],'type':_0x3fa334[_0xbc49('0x2d')][_0xbc49('0x2e')]};});_0x47d06f[_0xbc49('0x2f')]=_['map'](_0x304cbb,'name');_0x47d06f[_0xbc49('0x30')]=_[_0xbc49('0x31')](_0x483142['query']);_0x47d06f[_0xbc49('0x32')]=_[_0xbc49('0x33')](_0x47d06f[_0xbc49('0x2f')],_0x47d06f[_0xbc49('0x30')]);_0x556d5c[_0xbc49('0x34')]=_[_0xbc49('0x33')](_0x47d06f[_0xbc49('0x2f')],qs['fields'](_0x483142['query']['fields']));_0x556d5c[_0xbc49('0x34')]=_0x556d5c[_0xbc49('0x34')][_0xbc49('0x35')]?_0x556d5c['attributes']:_0x47d06f[_0xbc49('0x2f')];if(!_0x483142[_0xbc49('0x30')][_0xbc49('0x36')](_0xbc49('0x37'))){_0x556d5c[_0xbc49('0x1d')]=qs[_0xbc49('0x1d')](_0x483142[_0xbc49('0x30')][_0xbc49('0x1d')]);_0x556d5c[_0xbc49('0x1c')]=qs[_0xbc49('0x1c')](_0x483142[_0xbc49('0x30')][_0xbc49('0x1c')]);}_0x556d5c[_0xbc49('0x38')]=qs['sort'](_0x483142[_0xbc49('0x30')][_0xbc49('0x39')]);_0x556d5c[_0xbc49('0x3a')]=qs[_0xbc49('0x32')](_[_0xbc49('0x3b')](_0x483142[_0xbc49('0x30')],_0x47d06f[_0xbc49('0x32')]));if(_0x483142[_0xbc49('0x30')][_0xbc49('0x3c')]){_0x556d5c[_0xbc49('0x3a')]=_[_0xbc49('0x3d')](_0x556d5c[_0xbc49('0x3a')],{'$or':_[_0xbc49('0x29')](_0x304cbb,function(_0x224ef3){if(_0x224ef3[_0xbc49('0x2d')]!=='VIRTUAL'){var _0x4d7fdf={};_0x4d7fdf[_0x224ef3[_0xbc49('0x26')]]={'$like':'%'+_0x483142[_0xbc49('0x30')][_0xbc49('0x3c')]+'%'};return _0x4d7fdf;}})});}_0x556d5c=_['merge']({},_0x556d5c,_0x483142[_0xbc49('0x3e')]);var _0x298b5e={'where':_0x556d5c[_0xbc49('0x3a')]};return db[_0xbc49('0x2a')][_0xbc49('0x3f')](_0x298b5e)[_0xbc49('0x22')](function(_0x3e5247){_0x2f242f[_0xbc49('0x3f')]=_0x3e5247;if(_0x483142[_0xbc49('0x30')][_0xbc49('0x40')]){_0x556d5c['include']=[{'all':!![]}];}return db[_0xbc49('0x2a')][_0xbc49('0x41')](_0x556d5c);})[_0xbc49('0x22')](function(_0x266f06){_0x2f242f[_0xbc49('0x42')]=_0x266f06;return _0x2f242f;})[_0xbc49('0x22')](respondWithFilteredResult(_0x39e588,_0x556d5c))[_0xbc49('0x43')](handleError(_0x39e588,null));};exports[_0xbc49('0x44')]=function(_0x24fe43,_0x590936){var _0x2f66f1={'raw':!![],'where':{'id':_0x24fe43['params']['id']}},_0x21375e={};_0x21375e[_0xbc49('0x2f')]=_['keys'](db[_0xbc49('0x2a')][_0xbc49('0x2b')]);_0x21375e[_0xbc49('0x30')]=_[_0xbc49('0x31')](_0x24fe43['query']);_0x21375e['filters']=_['intersection'](_0x21375e['model'],_0x21375e[_0xbc49('0x30')]);_0x2f66f1['attributes']=_[_0xbc49('0x33')](_0x21375e[_0xbc49('0x2f')],qs[_0xbc49('0x45')](_0x24fe43['query'][_0xbc49('0x45')]));_0x2f66f1[_0xbc49('0x34')]=_0x2f66f1[_0xbc49('0x34')]['length']?_0x2f66f1[_0xbc49('0x34')]:_0x21375e[_0xbc49('0x2f')];if(_0x24fe43['query'][_0xbc49('0x40')]){_0x2f66f1[_0xbc49('0x46')]=[{'all':!![]}];}_0x2f66f1=_[_0xbc49('0x3d')]({},_0x2f66f1,_0x24fe43[_0xbc49('0x3e')]);return db[_0xbc49('0x2a')][_0xbc49('0x47')](_0x2f66f1)[_0xbc49('0x22')](handleEntityNotFound(_0x590936,null))[_0xbc49('0x22')](respondWithResult(_0x590936,null))[_0xbc49('0x43')](handleError(_0x590936,null));};exports[_0xbc49('0x48')]=function(_0x3bf674,_0x4fd2ea){return db[_0xbc49('0x2a')][_0xbc49('0x48')](_0x3bf674[_0xbc49('0x49')],{})[_0xbc49('0x22')](respondWithResult(_0x4fd2ea,0xc9))[_0xbc49('0x43')](handleError(_0x4fd2ea,null));};exports[_0xbc49('0x21')]=function(_0x71772,_0x51ca94){if(_0x71772[_0xbc49('0x49')]['id']){delete _0x71772['body']['id'];}return db[_0xbc49('0x2a')]['find']({'where':{'id':_0x71772[_0xbc49('0x4a')]['id']}})['then'](handleEntityNotFound(_0x51ca94,null))[_0xbc49('0x22')](saveUpdates(_0x71772[_0xbc49('0x49')],null))[_0xbc49('0x22')](respondWithResult(_0x51ca94,null))[_0xbc49('0x43')](handleError(_0x51ca94,null));};exports['destroy']=function(_0x442898,_0x1d90dc){return db[_0xbc49('0x2a')]['find']({'where':{'id':_0x442898[_0xbc49('0x4a')]['id']}})[_0xbc49('0x22')](handleEntityNotFound(_0x1d90dc,null))[_0xbc49('0x22')](removeEntity(_0x1d90dc,null))['catch'](handleError(_0x1d90dc,null));};
\ No newline at end of file
diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.model.js b/server/api/voiceQueuesLog/voiceQueuesLog.model.js
index 43d1cdb..9a4c3ae 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 _0xc026=['api','moment','bluebird','request-promise','path','../../config/environment','./voiceQueuesLog.attributes','define','voice_queues_log','event_dtm','event','dtm','lodash','../../config/logger'];(function(_0x359f31,_0x392727){var _0x5834df=function(_0x18fc1e){while(--_0x18fc1e){_0x359f31['push'](_0x359f31['shift']());}};_0x5834df(++_0x392727);}(_0xc026,0x1cc));var _0x6c02=function(_0x1814d9,_0x538add){_0x1814d9=_0x1814d9-0x0;var _0x8bfc84=_0xc026[_0x1814d9];return _0x8bfc84;};'use strict';var _=require(_0x6c02('0x0'));var util=require('util');var logger=require(_0x6c02('0x1'))(_0x6c02('0x2'));var moment=require(_0x6c02('0x3'));var BPromise=require(_0x6c02('0x4'));var rp=require(_0x6c02('0x5'));var fs=require('fs');var path=require(_0x6c02('0x6'));var rimraf=require('rimraf');var config=require(_0x6c02('0x7'));var attributes=require(_0x6c02('0x8'));module['exports']=function(_0x5630a4,_0x683a24){return _0x5630a4[_0x6c02('0x9')]('VoiceQueuesLog',attributes,{'tableName':_0x6c02('0xa'),'paranoid':![],'indexes':[{'name':_0x6c02('0xb'),'fields':[_0x6c02('0xc'),_0x6c02('0xd')]}],'timestamps':![]});};
\ No newline at end of file
+var _0xad74=['path','rimraf','../../config/environment','./voiceQueuesLog.attributes','exports','voice_queues_log','event_dtm','util','api','bluebird','request-promise'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xad74,0xc2));var _0x4ad7=function(_0xa3b00b,_0x2b24d1){_0xa3b00b=_0xa3b00b-0x0;var _0x5b4963=_0xad74[_0xa3b00b];return _0x5b4963;};'use strict';var _=require('lodash');var util=require(_0x4ad7('0x0'));var logger=require('../../config/logger')(_0x4ad7('0x1'));var moment=require('moment');var BPromise=require(_0x4ad7('0x2'));var rp=require(_0x4ad7('0x3'));var fs=require('fs');var path=require(_0x4ad7('0x4'));var rimraf=require(_0x4ad7('0x5'));var config=require(_0x4ad7('0x6'));var attributes=require(_0x4ad7('0x7'));module[_0x4ad7('0x8')]=function(_0x35de73,_0x57abc7){return _0x35de73['define']('VoiceQueuesLog',attributes,{'tableName':_0x4ad7('0x9'),'paranoid':![],'indexes':[{'name':_0x4ad7('0xa'),'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 654ffa0..4319485 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 _0x9434=['message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','debug','stringify','error'];(function(_0x5547e1,_0xa24125){var _0x1ca584=function(_0x1b0d45){while(--_0x1b0d45){_0x5547e1['push'](_0x5547e1['shift']());}};_0x1ca584(++_0xa24125);}(_0x9434,0x168));var _0x4943=function(_0xf50609,_0x27200b){_0xf50609=_0xf50609-0x0;var _0x46e496=_0x9434[_0xf50609];return _0x46e496;};'use strict';var _=require(_0x4943('0x0'));var util=require(_0x4943('0x1'));var moment=require(_0x4943('0x2'));var BPromise=require(_0x4943('0x3'));var rs=require(_0x4943('0x4'));var fs=require('fs');var Redis=require(_0x4943('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x4943('0x6'));var logger=require(_0x4943('0x7'))('rpc');var config=require(_0x4943('0x8'));var jayson=require(_0x4943('0x9'));var client=jayson['client'][_0x4943('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x56a55a,_0x4da494,_0x3ae08d){return new BPromise(function(_0x2f4119,_0x1876eb){return client[_0x4943('0xb')](_0x56a55a,_0x3ae08d)[_0x4943('0xc')](function(_0x553991){logger['info'](_0x4943('0xd'),_0x4da494,_0x4943('0xe'));logger[_0x4943('0xf')]('VoiceQueuesLog,\x20%s,\x20%s,\x20%s',_0x4da494,_0x4943('0xe'),JSON[_0x4943('0x10')](_0x553991));if(_0x553991['error']){if(_0x553991[_0x4943('0x11')]['code']===0x1f4){logger['error'](_0x4943('0xd'),_0x4da494,_0x553991[_0x4943('0x11')][_0x4943('0x12')]);return _0x1876eb(_0x553991[_0x4943('0x11')][_0x4943('0x12')]);}logger[_0x4943('0x11')](_0x4943('0xd'),_0x4da494,_0x553991['error'][_0x4943('0x12')]);return _0x2f4119(_0x553991[_0x4943('0x11')][_0x4943('0x12')]);}else{logger[_0x4943('0x13')](_0x4943('0xd'),_0x4da494,_0x4943('0xe'));_0x2f4119(_0x553991['result'][_0x4943('0x12')]);}})[_0x4943('0x14')](function(_0xb08628){logger['error']('VoiceQueuesLog,\x20%s,\x20%s',_0x4da494,_0xb08628);_0x1876eb(_0xb08628);});});}
\ No newline at end of file
+var _0x9ffd=['VoiceQueuesLog,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','VoiceQueuesLog,\x20%s,\x20%s','info','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','debug'];(function(_0x3c39f7,_0x3834a7){var _0x528afe=function(_0x20db7e){while(--_0x20db7e){_0x3c39f7['push'](_0x3c39f7['shift']());}};_0x528afe(++_0x3834a7);}(_0x9ffd,0xaa));var _0xd9ff=function(_0x1aa0e2,_0x45fa9f){_0x1aa0e2=_0x1aa0e2-0x0;var _0x11f410=_0x9ffd[_0x1aa0e2];return _0x11f410;};'use strict';var _=require(_0xd9ff('0x0'));var util=require(_0xd9ff('0x1'));var moment=require(_0xd9ff('0x2'));var BPromise=require('bluebird');var rs=require(_0xd9ff('0x3'));var fs=require('fs');var Redis=require(_0xd9ff('0x4'));var db=require(_0xd9ff('0x5'))['db'];var utils=require(_0xd9ff('0x6'));var logger=require('../../config/logger')(_0xd9ff('0x7'));var config=require(_0xd9ff('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd9ff('0x9')][_0xd9ff('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x13ea8c,_0x270eb2,_0x45c60a){return new BPromise(function(_0x66282d,_0x13954e){return client[_0xd9ff('0xb')](_0x13ea8c,_0x45c60a)[_0xd9ff('0xc')](function(_0x58e728){logger['info']('VoiceQueuesLog,\x20%s,\x20%s',_0x270eb2,'request\x20sent');logger[_0xd9ff('0xd')](_0xd9ff('0xe'),_0x270eb2,_0xd9ff('0xf'),JSON[_0xd9ff('0x10')](_0x58e728));if(_0x58e728[_0xd9ff('0x11')]){if(_0x58e728[_0xd9ff('0x11')][_0xd9ff('0x12')]===0x1f4){logger[_0xd9ff('0x11')]('VoiceQueuesLog,\x20%s,\x20%s',_0x270eb2,_0x58e728['error'][_0xd9ff('0x13')]);return _0x13954e(_0x58e728[_0xd9ff('0x11')][_0xd9ff('0x13')]);}logger[_0xd9ff('0x11')](_0xd9ff('0x14'),_0x270eb2,_0x58e728['error'][_0xd9ff('0x13')]);return _0x66282d(_0x58e728[_0xd9ff('0x11')]['message']);}else{logger[_0xd9ff('0x15')]('VoiceQueuesLog,\x20%s,\x20%s',_0x270eb2,'request\x20sent');_0x66282d(_0x58e728['result']['message']);}})[_0xd9ff('0x16')](function(_0x4f9d6d){logger[_0xd9ff('0x11')](_0xd9ff('0x14'),_0x270eb2,_0x4f9d6d);_0x13954e(_0x4f9d6d);});});}
\ No newline at end of file
diff --git a/server/api/voiceRecording/index.js b/server/api/voiceRecording/index.js
index 13cc12f..7fe096a 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 _0x420d=['delete','destroy','exports','multer','util','path','connect-timeout','Router','../../components/interaction/service','get','index','/describe','isAuthenticated','describe','show','download','/:id/downloads','downloads','post','create','put','/:id'];(function(_0x4c0be6,_0x4b2992){var _0xb29fff=function(_0x37c465){while(--_0x37c465){_0x4c0be6['push'](_0x4c0be6['shift']());}};_0xb29fff(++_0x4b2992);}(_0x420d,0xc9));var _0xd420=function(_0x157e68,_0x34ea6c){_0x157e68=_0x157e68-0x0;var _0x5651d9=_0x420d[_0x157e68];return _0x5651d9;};'use strict';var multer=require(_0xd420('0x0'));var util=require(_0xd420('0x1'));var path=require(_0xd420('0x2'));var timeout=require(_0xd420('0x3'));var express=require('express');var router=express[_0xd420('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xd420('0x5'));var config=require('../../config/environment');var controller=require('./voiceRecording.controller');router[_0xd420('0x6')]('/',auth['isAuthenticated'](),controller[_0xd420('0x7')]);router[_0xd420('0x6')](_0xd420('0x8'),auth[_0xd420('0x9')](),controller[_0xd420('0xa')]);router[_0xd420('0x6')]('/:id',auth[_0xd420('0x9')](),controller[_0xd420('0xb')]);router[_0xd420('0x6')]('/:id/download',auth[_0xd420('0x9')](),controller[_0xd420('0xc')]);router[_0xd420('0x6')](_0xd420('0xd'),controller[_0xd420('0xe')]);router[_0xd420('0xf')]('/',auth[_0xd420('0x9')](),controller[_0xd420('0x10')]);router[_0xd420('0x11')](_0xd420('0x12'),auth[_0xd420('0x9')](),controller['update']);router[_0xd420('0x13')](_0xd420('0x12'),auth['isAuthenticated'](),controller[_0xd420('0x14')]);module[_0xd420('0x15')]=router;
\ No newline at end of file
+var _0x73ce=['describe','/:id','show','/:id/download','/:id/downloads','downloads','post','create','put','update','delete','util','path','connect-timeout','express','Router','../../components/interaction/service','./voiceRecording.controller','get','isAuthenticated','index','/describe'];(function(_0x357ebc,_0x26f1d9){var _0x503547=function(_0x2d7d45){while(--_0x2d7d45){_0x357ebc['push'](_0x357ebc['shift']());}};_0x503547(++_0x26f1d9);}(_0x73ce,0x1d9));var _0xe73c=function(_0xcc93b7,_0x16a25d){_0xcc93b7=_0xcc93b7-0x0;var _0xb75303=_0x73ce[_0xcc93b7];return _0xb75303;};'use strict';var multer=require('multer');var util=require(_0xe73c('0x0'));var path=require(_0xe73c('0x1'));var timeout=require(_0xe73c('0x2'));var express=require(_0xe73c('0x3'));var router=express[_0xe73c('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xe73c('0x5'));var config=require('../../config/environment');var controller=require(_0xe73c('0x6'));router[_0xe73c('0x7')]('/',auth[_0xe73c('0x8')](),controller[_0xe73c('0x9')]);router[_0xe73c('0x7')](_0xe73c('0xa'),auth[_0xe73c('0x8')](),controller[_0xe73c('0xb')]);router['get'](_0xe73c('0xc'),auth[_0xe73c('0x8')](),controller[_0xe73c('0xd')]);router['get'](_0xe73c('0xe'),auth[_0xe73c('0x8')](),controller['download']);router[_0xe73c('0x7')](_0xe73c('0xf'),controller[_0xe73c('0x10')]);router[_0xe73c('0x11')]('/',auth[_0xe73c('0x8')](),controller[_0xe73c('0x12')]);router[_0xe73c('0x13')]('/:id',auth[_0xe73c('0x8')](),controller[_0xe73c('0x14')]);router[_0xe73c('0x15')]('/:id',auth[_0xe73c('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.attributes.js b/server/api/voiceRecording/voiceRecording.attributes.js
index 825fe90..d5e06ce 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 _0xb90b=['format','MM-DD-YYYY\x20HH:mm','DATE','moment','exports','VIRTUAL','getDataValue','value','extname','STRING','split','INTEGER','createdAt'];(function(_0x2ea5c1,_0x4a98da){var _0x4a1664=function(_0x472f41){while(--_0x472f41){_0x2ea5c1['push'](_0x2ea5c1['shift']());}};_0x4a1664(++_0x4a98da);}(_0xb90b,0xac));var _0xbb90=function(_0x489c13,_0x5a9499){_0x489c13=_0x489c13-0x0;var _0x42de9c=_0xb90b[_0x489c13];return _0x42de9c;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xbb90('0x0'));var path=require('path');module[_0xbb90('0x1')]={'format':{'type':Sequelize[_0xbb90('0x2')],'get':function(){return this[_0xbb90('0x3')](_0xbb90('0x4'))?path[_0xbb90('0x5')](this[_0xbb90('0x3')]('value')):undefined;}},'uniqueid':{'type':Sequelize[_0xbb90('0x6')]},'channel':{'type':Sequelize[_0xbb90('0x6')],'set':function(_0xabeaed){if(_0xabeaed){this['setDataValue']('channel',_0xabeaed);this['setDataValue']('membername',_0xabeaed[_0xbb90('0x7')](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0xbb90('0x6')]},'calleridnum':{'type':Sequelize[_0xbb90('0x6')]},'calleridname':{'type':Sequelize[_0xbb90('0x6')]},'connectedlinenum':{'type':Sequelize[_0xbb90('0x6')]},'connectedlinename':{'type':Sequelize[_0xbb90('0x6')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0xbb90('0x6')]},'exten':{'type':Sequelize[_0xbb90('0x6')]},'value':{'type':Sequelize[_0xbb90('0x6')]},'type':{'type':Sequelize[_0xbb90('0x6')]},'rating':{'type':Sequelize[_0xbb90('0x8')],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize[_0xbb90('0x6')]},'userDisposition':{'type':Sequelize[_0xbb90('0x6')]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xbb90('0x3')](_0xbb90('0x9')))[_0xbb90('0xa')](_0xbb90('0xb'))['toString']();}},'updatedAt':{'type':Sequelize[_0xbb90('0xc')],'get':function(){return moment(this[_0xbb90('0x3')]('updatedAt'))['format'](_0xbb90('0xb'))['toString']();}}};
\ No newline at end of file
+var _0x245c=['STRING','setDataValue','membername','split','INTEGER','DATE','format','MM-DD-YYYY\x20HH:mm','toString','updatedAt','moment','exports','VIRTUAL','getDataValue','value','extname'];(function(_0x5ce34a,_0x57887e){var _0x309350=function(_0x52a947){while(--_0x52a947){_0x5ce34a['push'](_0x5ce34a['shift']());}};_0x309350(++_0x57887e);}(_0x245c,0x10a));var _0xc245=function(_0xacd0ab,_0xfc52a2){_0xacd0ab=_0xacd0ab-0x0;var _0x121a0a=_0x245c[_0xacd0ab];return _0x121a0a;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xc245('0x0'));var path=require('path');module[_0xc245('0x1')]={'format':{'type':Sequelize[_0xc245('0x2')],'get':function(){return this[_0xc245('0x3')](_0xc245('0x4'))?path[_0xc245('0x5')](this[_0xc245('0x3')](_0xc245('0x4'))):undefined;}},'uniqueid':{'type':Sequelize[_0xc245('0x6')]},'channel':{'type':Sequelize[_0xc245('0x6')],'set':function(_0x5bcd47){if(_0x5bcd47){this['setDataValue']('channel',_0x5bcd47);this[_0xc245('0x7')](_0xc245('0x8'),_0x5bcd47[_0xc245('0x9')](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xc245('0x6')]},'calleridname':{'type':Sequelize[_0xc245('0x6')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0xc245('0x6')]},'accountcode':{'type':Sequelize[_0xc245('0x6')]},'context':{'type':Sequelize[_0xc245('0x6')]},'exten':{'type':Sequelize[_0xc245('0x6')]},'value':{'type':Sequelize[_0xc245('0x6')]},'type':{'type':Sequelize[_0xc245('0x6')]},'rating':{'type':Sequelize[_0xc245('0xa')],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize[_0xc245('0x6')]},'userDisposition':{'type':Sequelize[_0xc245('0x6')]},'createdAt':{'type':Sequelize[_0xc245('0xb')],'get':function(){return moment(this['getDataValue']('createdAt'))[_0xc245('0xc')](_0xc245('0xd'))[_0xc245('0xe')]();}},'updatedAt':{'type':Sequelize[_0xc245('0xb')],'get':function(){return moment(this['getDataValue'](_0xc245('0xf')))[_0xc245('0xc')](_0xc245('0xd'))[_0xc245('0xe')]();}}};
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.controller.js b/server/api/voiceRecording/voiceRecording.controller.js
index a95da43..613d685 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 _0xc942=['html-pdf','rimraf','zip-dir','request-promise','moment','util','path','to-csv','ejs','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','end','status','json','count','offset','limit','apply','update','then','error','name','send','index','map','VoiceRecording','rawAttributes','key','format','query','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','keys','find','catch','create','body','params','describe','download','../../components/encryptor','uniqueid','value','%s.cypher','decryptFile','recording','Sequelize','ValidationError','VoiceRecording\x20not\x20found','filename','extname','unlink','message','Not\x20found','downloads','sequelize','MD5','col','token','$and','push','secrets','destroy','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','isNil','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','existsSync'];(function(_0xfa8853,_0x402a4a){var _0x1493fb=function(_0x4cf0a3){while(--_0x4cf0a3){_0xfa8853['push'](_0xfa8853['shift']());}};_0x1493fb(++_0x402a4a);}(_0xc942,0xce));var _0x2c94=function(_0xf9c762,_0x2d64d6){_0xf9c762=_0xf9c762-0x0;var _0x826181=_0xc942[_0xf9c762];return _0x826181;};'use strict';var pdf=require(_0x2c94('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x2c94('0x1'));var zipdir=require(_0x2c94('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2c94('0x3'));var moment=require(_0x2c94('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x2c94('0x5'));var path=require(_0x2c94('0x6'));var sox=require('sox');var csv=require(_0x2c94('0x7'));var ejs=require(_0x2c94('0x8'));var fs=require('fs');var _=require(_0x2c94('0x9'));var squel=require(_0x2c94('0xa'));var crypto=require('crypto');var jsforce=require(_0x2c94('0xb'));var deskjs=require(_0x2c94('0xc'));var toCsv=require(_0x2c94('0x7'));var querystring=require('querystring');var Papa=require(_0x2c94('0xd'));var Redis=require(_0x2c94('0xe'));var authService=require(_0x2c94('0xf'));var qs=require(_0x2c94('0x10'));var as=require(_0x2c94('0x11'));var hardwareService=require(_0x2c94('0x12'));var logger=require(_0x2c94('0x13'))(_0x2c94('0x14'));var utils=require('../../config/utils');var config=require(_0x2c94('0x15'));var db=require(_0x2c94('0x16'))['db'];function respondWithStatusCode(_0x7e14f1,_0x575023){_0x575023=_0x575023||0xcc;return function(_0x41ec8f){if(_0x41ec8f){return _0x7e14f1[_0x2c94('0x17')](_0x575023);}return _0x7e14f1['status'](_0x575023)[_0x2c94('0x18')]();};}function respondWithResult(_0x14214a,_0x36e01a){_0x36e01a=_0x36e01a||0xc8;return function(_0x1e62e5){if(_0x1e62e5){return _0x14214a[_0x2c94('0x19')](_0x36e01a)[_0x2c94('0x1a')](_0x1e62e5);}};}function respondWithFilteredResult(_0xa05284,_0x5afc52){return function(_0x54be09){if(_0x54be09){var _0x4f7f26=_0x54be09[_0x2c94('0x1b')],_0x18c63b=_0x5afc52[_0x2c94('0x1c')],_0x1b4bad=_0x5afc52['offset']+_0x5afc52[_0x2c94('0x1d')],_0x1acaea;if(_0x1b4bad>=_0x4f7f26){_0x1b4bad=_0x4f7f26;_0x1acaea=0xc8;}else{_0x1acaea=0xce;}_0xa05284[_0x2c94('0x19')](_0x1acaea);return _0xa05284['set']('Content-Range',_0x18c63b+'-'+_0x1b4bad+'/'+_0x4f7f26)[_0x2c94('0x1a')](_0x54be09);}return null;};}function patchUpdates(_0x486bc6){return function(_0x50c0aa){try{jsonpatch[_0x2c94('0x1e')](_0x50c0aa,_0x486bc6,!![]);}catch(_0x19d3ce){return BPromise['reject'](_0x19d3ce);}return _0x50c0aa['save']();};}function saveUpdates(_0x26d3a3,_0xce202a){return function(_0x3758e2){if(_0x3758e2){return _0x3758e2[_0x2c94('0x1f')](_0x26d3a3)['then'](function(_0x5cc9b8){return _0x5cc9b8;});}return null;};}function removeEntity(_0x54e4e8,_0x88e3b5){return function(_0x478350){if(_0x478350){return _0x478350['destroy']()[_0x2c94('0x20')](function(){_0x54e4e8['status'](0xcc)[_0x2c94('0x18')]();});}};}function handleEntityNotFound(_0x2b687e,_0x4807ba){return function(_0x54f24b){if(!_0x54f24b){_0x2b687e[_0x2c94('0x17')](0x194);}return _0x54f24b;};}function handleError(_0x25b1ca,_0x2cfc60){_0x2cfc60=_0x2cfc60||0x1f4;return function(_0x446f8b){logger[_0x2c94('0x21')](_0x446f8b['stack']);if(_0x446f8b[_0x2c94('0x22')]){delete _0x446f8b[_0x2c94('0x22')];}_0x25b1ca[_0x2c94('0x19')](_0x2cfc60)[_0x2c94('0x23')](_0x446f8b);};}exports[_0x2c94('0x24')]=function(_0x45cea5,_0x30cd06){var _0x4198c4={},_0x41292e={},_0x4a2a12={'count':0x0,'rows':[]};var _0xe3fa81=_[_0x2c94('0x25')](db[_0x2c94('0x26')][_0x2c94('0x27')],function(_0x25c03c){return{'name':_0x25c03c['fieldName'],'type':_0x25c03c['type'][_0x2c94('0x28')]};});_0x41292e['model']=_['differenceBy'](_[_0x2c94('0x25')](_0xe3fa81,'name'),[_0x2c94('0x29')]);_0x41292e[_0x2c94('0x2a')]=_['keys'](_0x45cea5[_0x2c94('0x2a')]);_0x41292e['filters']=_[_0x2c94('0x2b')](_0x41292e[_0x2c94('0x2c')],_0x41292e['query']);_0x4198c4[_0x2c94('0x2d')]=_['intersection'](_0x41292e[_0x2c94('0x2c')],qs[_0x2c94('0x2e')](_0x45cea5['query']['fields']));_0x4198c4[_0x2c94('0x2d')]=_0x4198c4[_0x2c94('0x2d')][_0x2c94('0x2f')]?_0x4198c4[_0x2c94('0x2d')]:_0x41292e['model'];if(!_0x45cea5[_0x2c94('0x2a')][_0x2c94('0x30')]('nolimit')){_0x4198c4[_0x2c94('0x1d')]=qs[_0x2c94('0x1d')](_0x45cea5[_0x2c94('0x2a')][_0x2c94('0x1d')]);_0x4198c4[_0x2c94('0x1c')]=qs[_0x2c94('0x1c')](_0x45cea5[_0x2c94('0x2a')][_0x2c94('0x1c')]);}_0x4198c4[_0x2c94('0x31')]=qs[_0x2c94('0x32')](_0x45cea5[_0x2c94('0x2a')]['sort']);_0x4198c4[_0x2c94('0x33')]=qs[_0x2c94('0x34')](_[_0x2c94('0x35')](_0x45cea5[_0x2c94('0x2a')],_0x41292e['filters']));if(_0x45cea5[_0x2c94('0x2a')][_0x2c94('0x36')]){_0x4198c4[_0x2c94('0x33')]=_[_0x2c94('0x37')](_0x4198c4[_0x2c94('0x33')],{'$or':_['map'](_0xe3fa81,function(_0x457240){if(_0x457240[_0x2c94('0x38')]!==_0x2c94('0x39')){var _0x3bfb05={};_0x3bfb05[_0x457240['name']]={'$like':'%'+_0x45cea5['query'][_0x2c94('0x36')]+'%'};return _0x3bfb05;}})});}_0x4198c4=_[_0x2c94('0x37')]({},_0x4198c4,_0x45cea5[_0x2c94('0x3a')]);var _0x2277bc={'where':_0x4198c4[_0x2c94('0x33')]};return db[_0x2c94('0x26')]['count'](_0x2277bc)[_0x2c94('0x20')](function(_0x3b99c6){_0x4a2a12[_0x2c94('0x1b')]=_0x3b99c6;if(_0x45cea5['query'][_0x2c94('0x3b')]){_0x4198c4[_0x2c94('0x3c')]=[{'all':!![]}];}return db[_0x2c94('0x26')][_0x2c94('0x3d')](_0x4198c4);})[_0x2c94('0x20')](function(_0x5194f3){_0x4a2a12[_0x2c94('0x3e')]=_0x5194f3;return _0x4a2a12;})['then'](respondWithFilteredResult(_0x30cd06,_0x4198c4))['catch'](handleError(_0x30cd06,null));};exports['show']=function(_0x7bc190,_0x4cf08a){var _0x1dac90={'raw':![],'where':{'id':_0x7bc190['params']['id']}},_0x2e2c06={};_0x2e2c06['model']=_['keys'](db[_0x2c94('0x26')][_0x2c94('0x27')]);_0x2e2c06[_0x2c94('0x2a')]=_[_0x2c94('0x3f')](_0x7bc190[_0x2c94('0x2a')]);_0x2e2c06['filters']=_[_0x2c94('0x2b')](_0x2e2c06[_0x2c94('0x2c')],_0x2e2c06[_0x2c94('0x2a')]);_0x1dac90['attributes']=_['intersection'](_0x2e2c06[_0x2c94('0x2c')],qs['fields'](_0x7bc190[_0x2c94('0x2a')]['fields']));_0x1dac90[_0x2c94('0x2d')]=_0x1dac90['attributes'][_0x2c94('0x2f')]?_0x1dac90[_0x2c94('0x2d')]:_0x2e2c06[_0x2c94('0x2c')];if(_0x7bc190['query'][_0x2c94('0x3b')]){_0x1dac90[_0x2c94('0x3c')]=[{'all':!![]}];}_0x1dac90=_['merge']({},_0x1dac90,_0x7bc190[_0x2c94('0x3a')]);return db[_0x2c94('0x26')][_0x2c94('0x40')](_0x1dac90)[_0x2c94('0x20')](handleEntityNotFound(_0x4cf08a,null))['then'](respondWithResult(_0x4cf08a,null))[_0x2c94('0x41')](handleError(_0x4cf08a,null));};exports['create']=function(_0xc351b7,_0x49f126){return db[_0x2c94('0x26')][_0x2c94('0x42')](_0xc351b7[_0x2c94('0x43')],{})[_0x2c94('0x20')](respondWithResult(_0x49f126,0xc9))[_0x2c94('0x41')](handleError(_0x49f126,null));};exports[_0x2c94('0x1f')]=function(_0x2d442a,_0x3650a3){if(_0x2d442a['body']['id']){delete _0x2d442a[_0x2c94('0x43')]['id'];}return db[_0x2c94('0x26')][_0x2c94('0x40')]({'where':{'id':_0x2d442a[_0x2c94('0x44')]['id']}})['then'](handleEntityNotFound(_0x3650a3,null))['then'](saveUpdates(_0x2d442a[_0x2c94('0x43')],null))[_0x2c94('0x20')](respondWithResult(_0x3650a3,null))['catch'](handleError(_0x3650a3,null));};exports['describe']=function(_0x43c3fe,_0xb31b40){return db[_0x2c94('0x26')][_0x2c94('0x45')]()[_0x2c94('0x20')](respondWithResult(_0xb31b40,null))[_0x2c94('0x41')](handleError(_0xb31b40,null));};exports[_0x2c94('0x46')]=function(_0x4c9ca8,_0x4fb164,_0x157720){var _0x3436a6=require(_0x2c94('0x47'));var _0x1afeab=![];var _0x5e8569={};if(_0x4c9ca8[_0x2c94('0x2a')][_0x2c94('0x38')]&&_0x4c9ca8['query']['type']===_0x2c94('0x48')){_0x5e8569[_0x2c94('0x48')]=_0x4c9ca8[_0x2c94('0x44')]['id'];}else{_0x5e8569['id']=_0x4c9ca8['params']['id'];}return db[_0x2c94('0x26')]['find']({'where':_0x5e8569,'attributes':['id',_0x2c94('0x49')],'raw':!![]})['then'](handleEntityNotFound(_0x4fb164,null))[_0x2c94('0x20')](function(_0x2f10cc){if(_0x2f10cc){var _0x49dd41=_0x2f10cc['value'];var _0x37e542=util['format'](_0x2c94('0x4a'),_0x49dd41);if(fs['existsSync'](_0x37e542)){_0x1afeab=!![];return _0x3436a6[_0x2c94('0x4b')](_0x37e542,_0x49dd41,config['secrets'][_0x2c94('0x4c')])[_0x2c94('0x20')](function(){return _0x2f10cc;});}return _0x2f10cc;}})[_0x2c94('0x20')](function(_0x2ed6dc){if(_0x2ed6dc){var _0x925074=_0x2ed6dc[_0x2c94('0x49')];if(!fs['existsSync'](_0x925074)){throw new db[(_0x2c94('0x4d'))][(_0x2c94('0x4e'))](_0x2c94('0x4f'));}if(_0x2ed6dc[_0x2c94('0x50')]){return _0x4fb164[_0x2c94('0x46')](_0x925074,_0x2ed6dc[_0x2c94('0x50')]+path[_0x2c94('0x51')](_0x925074),function(){if(_0x1afeab){fs[_0x2c94('0x52')](_0x925074);}});}else{return _0x4fb164[_0x2c94('0x46')](_0x925074,function(_0x404941){if(_0x1afeab){fs[_0x2c94('0x52')](_0x925074);}});}}})[_0x2c94('0x41')](function(_0x18a809){if(_0x18a809[_0x2c94('0x53')]===_0x2c94('0x4f')){_0x4fb164[_0x2c94('0x19')](0x194)[_0x2c94('0x23')](_0x2c94('0x54'));}else{return handleError(_0x4fb164,null);}});};exports[_0x2c94('0x55')]=function(_0x24ecb9,_0x2d2fb6,_0x378d86){var _0x56a7ba=require(_0x2c94('0x47'));var _0x4220c3=![];var _0x2dcc2b={'$and':[db[_0x2c94('0x56')][_0x2c94('0x33')](db[_0x2c94('0x56')]['fn'](_0x2c94('0x57'),db[_0x2c94('0x56')][_0x2c94('0x58')](_0x2c94('0x48'))),_0x24ecb9[_0x2c94('0x2a')][_0x2c94('0x59')])]};if(_0x24ecb9[_0x2c94('0x2a')]['type']&&_0x24ecb9[_0x2c94('0x2a')][_0x2c94('0x38')]===_0x2c94('0x48')){_0x2dcc2b[_0x2c94('0x5a')][_0x2c94('0x5b')]({'uniqueid':_0x24ecb9[_0x2c94('0x44')]['id']});}else{_0x2dcc2b[_0x2c94('0x5a')]['push']({'id':_0x24ecb9['params']['id']});}return db[_0x2c94('0x26')]['find']({'where':_0x2dcc2b,'attributes':['id','value'],'raw':!![]})[_0x2c94('0x20')](handleEntityNotFound(_0x2d2fb6,null))[_0x2c94('0x20')](function(_0x55c488){if(_0x55c488){var _0x572195=util[_0x2c94('0x29')](_0x2c94('0x4a'),_0x55c488[_0x2c94('0x49')]);if(fs['existsSync'](_0x572195)){_0x4220c3=!![];return _0x56a7ba[_0x2c94('0x4b')](_0x572195,_0x55c488['value'],config[_0x2c94('0x5c')][_0x2c94('0x4c')])['then'](function(){return _0x55c488;});}return _0x55c488;}})['then'](function(_0x43809f){if(_0x43809f){if(!fs['existsSync'](_0x43809f[_0x2c94('0x49')])){throw new db[(_0x2c94('0x4d'))][(_0x2c94('0x4e'))]('VoiceRecording\x20not\x20found');}if(_0x43809f[_0x2c94('0x50')]){return _0x2d2fb6['download'](_0x43809f[_0x2c94('0x49')],_0x43809f[_0x2c94('0x50')]+path[_0x2c94('0x51')](_0x43809f[_0x2c94('0x49')]),function(){if(_0x4220c3){fs[_0x2c94('0x52')](_0x43809f[_0x2c94('0x49')]);}});}else{return _0x2d2fb6[_0x2c94('0x46')](_0x43809f['value'],function(_0x1fc5d7){if(_0x4220c3){fs[_0x2c94('0x52')](_0x43809f['value']);}});}}})['catch'](handleError(_0x2d2fb6,null));};exports[_0x2c94('0x5d')]=function(_0x4dfb9c,_0x40a8e8){return db[_0x2c94('0x26')]['find']({'where':{'id':_0x4dfb9c[_0x2c94('0x44')]['id']}})[_0x2c94('0x20')](function(_0x2b3aec){if(!_0x2b3aec)throw new ReferenceError(_0x2c94('0x5e'));return _0x2b3aec;})['then'](function(_0x1d8df1){var _0x14e3c9=_0x1d8df1[_0x2c94('0x49')];logger[_0x2c94('0x5f')](_0x2c94('0x60'),_0x14e3c9);if(!_[_0x2c94('0x61')](_0x1d8df1['value'])&&fs['existsSync'](_0x14e3c9)){logger[_0x2c94('0x5f')](_0x2c94('0x62')+_0x14e3c9+_0x2c94('0x63'));fs[_0x2c94('0x64')](_0x14e3c9);}_0x14e3c9=_0x14e3c9+_0x2c94('0x65');if(!_[_0x2c94('0x61')](_0x1d8df1[_0x2c94('0x49')])&&fs[_0x2c94('0x66')](_0x14e3c9)){logger[_0x2c94('0x5f')]('File:\x20\x22'+_0x14e3c9+_0x2c94('0x63'));fs[_0x2c94('0x64')](_0x14e3c9);}return _0x1d8df1;})[_0x2c94('0x20')](function(_0x16f0f6){if(!_0x16f0f6)throw new InternalError();return _0x16f0f6[_0x2c94('0x5d')]();})[_0x2c94('0x20')](function(){_0x40a8e8[_0x2c94('0x19')](0xcc)[_0x2c94('0x18')]();})[_0x2c94('0x41')](handleError(_0x40a8e8,null));};
\ No newline at end of file
+var _0xfff4=['VoiceRecording\x20not\x20found','filename','extname','unlink','message','downloads','sequelize','col','token','$and','push','Entity\x20not\x20found','cancellazione\x20fisica\x20documento\x20%s','isNil','info','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','end','offset','set','Content-Range','json','apply','reject','update','destroy','then','error','stack','name','send','index','map','VoiceRecording','rawAttributes','type','key','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','rows','show','params','keys','find','catch','create','body','describe','download','../../components/encryptor','uniqueid','value','format','%s.cypher','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError'];(function(_0x4eaf7e,_0x2afb74){var _0x31cb6a=function(_0x1c4708){while(--_0x1c4708){_0x4eaf7e['push'](_0x4eaf7e['shift']());}};_0x31cb6a(++_0x2afb74);}(_0xfff4,0x14a));var _0x4fff=function(_0x54ac7a,_0x313ae3){_0x54ac7a=_0x54ac7a-0x0;var _0x5a438e=_0xfff4[_0x54ac7a];return _0x5a438e;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x4fff('0x0'));var BPromise=require(_0x4fff('0x1'));var Mustache=require(_0x4fff('0x2'));var util=require(_0x4fff('0x3'));var path=require(_0x4fff('0x4'));var sox=require(_0x4fff('0x5'));var csv=require(_0x4fff('0x6'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x4fff('0x7'));var squel=require(_0x4fff('0x8'));var crypto=require(_0x4fff('0x9'));var jsforce=require(_0x4fff('0xa'));var deskjs=require(_0x4fff('0xb'));var toCsv=require('to-csv');var querystring=require(_0x4fff('0xc'));var Papa=require(_0x4fff('0xd'));var Redis=require(_0x4fff('0xe'));var authService=require(_0x4fff('0xf'));var qs=require(_0x4fff('0x10'));var as=require(_0x4fff('0x11'));var hardwareService=require(_0x4fff('0x12'));var logger=require('../../config/logger')(_0x4fff('0x13'));var utils=require('../../config/utils');var config=require(_0x4fff('0x14'));var db=require(_0x4fff('0x15'))['db'];function respondWithStatusCode(_0x5661e1,_0x595e09){_0x595e09=_0x595e09||0xcc;return function(_0xdc463f){if(_0xdc463f){return _0x5661e1[_0x4fff('0x16')](_0x595e09);}return _0x5661e1[_0x4fff('0x17')](_0x595e09)[_0x4fff('0x18')]();};}function respondWithResult(_0x5ed4e7,_0x3812ad){_0x3812ad=_0x3812ad||0xc8;return function(_0x33bb06){if(_0x33bb06){return _0x5ed4e7[_0x4fff('0x17')](_0x3812ad)['json'](_0x33bb06);}};}function respondWithFilteredResult(_0x2852bb,_0xa790f4){return function(_0x248cd5){if(_0x248cd5){var _0x91b6cd=_0x248cd5['count'],_0x30d405=_0xa790f4[_0x4fff('0x19')],_0x3f1856=_0xa790f4[_0x4fff('0x19')]+_0xa790f4['limit'],_0x7f395b;if(_0x3f1856>=_0x91b6cd){_0x3f1856=_0x91b6cd;_0x7f395b=0xc8;}else{_0x7f395b=0xce;}_0x2852bb[_0x4fff('0x17')](_0x7f395b);return _0x2852bb[_0x4fff('0x1a')](_0x4fff('0x1b'),_0x30d405+'-'+_0x3f1856+'/'+_0x91b6cd)[_0x4fff('0x1c')](_0x248cd5);}return null;};}function patchUpdates(_0x2a9a3f){return function(_0x2bf35f){try{jsonpatch[_0x4fff('0x1d')](_0x2bf35f,_0x2a9a3f,!![]);}catch(_0x2687f7){return BPromise[_0x4fff('0x1e')](_0x2687f7);}return _0x2bf35f['save']();};}function saveUpdates(_0x461e6f,_0x3a83af){return function(_0x2ff72c){if(_0x2ff72c){return _0x2ff72c[_0x4fff('0x1f')](_0x461e6f)['then'](function(_0x5556ba){return _0x5556ba;});}return null;};}function removeEntity(_0xa0936,_0x9ea4c){return function(_0x2206cf){if(_0x2206cf){return _0x2206cf[_0x4fff('0x20')]()[_0x4fff('0x21')](function(){_0xa0936[_0x4fff('0x17')](0xcc)[_0x4fff('0x18')]();});}};}function handleEntityNotFound(_0x5701a4,_0x4ab72a){return function(_0x8a051e){if(!_0x8a051e){_0x5701a4[_0x4fff('0x16')](0x194);}return _0x8a051e;};}function handleError(_0x548df0,_0x56eb2e){_0x56eb2e=_0x56eb2e||0x1f4;return function(_0x50c3c7){logger[_0x4fff('0x22')](_0x50c3c7[_0x4fff('0x23')]);if(_0x50c3c7['name']){delete _0x50c3c7[_0x4fff('0x24')];}_0x548df0[_0x4fff('0x17')](_0x56eb2e)[_0x4fff('0x25')](_0x50c3c7);};}exports[_0x4fff('0x26')]=function(_0x193512,_0x383d64){var _0x2feda3={},_0x4558c3={},_0x2d3865={'count':0x0,'rows':[]};var _0x40deef=_[_0x4fff('0x27')](db[_0x4fff('0x28')][_0x4fff('0x29')],function(_0x2df60b){return{'name':_0x2df60b['fieldName'],'type':_0x2df60b[_0x4fff('0x2a')][_0x4fff('0x2b')]};});_0x4558c3['model']=_['differenceBy'](_[_0x4fff('0x27')](_0x40deef,_0x4fff('0x24')),['format']);_0x4558c3[_0x4fff('0x2c')]=_['keys'](_0x193512[_0x4fff('0x2c')]);_0x4558c3[_0x4fff('0x2d')]=_[_0x4fff('0x2e')](_0x4558c3[_0x4fff('0x2f')],_0x4558c3[_0x4fff('0x2c')]);_0x2feda3['attributes']=_['intersection'](_0x4558c3[_0x4fff('0x2f')],qs[_0x4fff('0x30')](_0x193512['query'][_0x4fff('0x30')]));_0x2feda3[_0x4fff('0x31')]=_0x2feda3['attributes'][_0x4fff('0x32')]?_0x2feda3[_0x4fff('0x31')]:_0x4558c3[_0x4fff('0x2f')];if(!_0x193512['query'][_0x4fff('0x33')](_0x4fff('0x34'))){_0x2feda3[_0x4fff('0x35')]=qs[_0x4fff('0x35')](_0x193512['query']['limit']);_0x2feda3[_0x4fff('0x19')]=qs[_0x4fff('0x19')](_0x193512['query'][_0x4fff('0x19')]);}_0x2feda3[_0x4fff('0x36')]=qs[_0x4fff('0x37')](_0x193512[_0x4fff('0x2c')]['sort']);_0x2feda3[_0x4fff('0x38')]=qs['filters'](_[_0x4fff('0x39')](_0x193512[_0x4fff('0x2c')],_0x4558c3['filters']));if(_0x193512[_0x4fff('0x2c')][_0x4fff('0x3a')]){_0x2feda3['where']=_[_0x4fff('0x3b')](_0x2feda3[_0x4fff('0x38')],{'$or':_['map'](_0x40deef,function(_0x4799f9){if(_0x4799f9[_0x4fff('0x2a')]!==_0x4fff('0x3c')){var _0x310b49={};_0x310b49[_0x4799f9[_0x4fff('0x24')]]={'$like':'%'+_0x193512[_0x4fff('0x2c')]['filter']+'%'};return _0x310b49;}})});}_0x2feda3=_['merge']({},_0x2feda3,_0x193512[_0x4fff('0x3d')]);var _0xc86a63={'where':_0x2feda3[_0x4fff('0x38')]};return db[_0x4fff('0x28')][_0x4fff('0x3e')](_0xc86a63)[_0x4fff('0x21')](function(_0x448e75){_0x2d3865[_0x4fff('0x3e')]=_0x448e75;if(_0x193512['query'][_0x4fff('0x3f')]){_0x2feda3[_0x4fff('0x40')]=[{'all':!![]}];}return db[_0x4fff('0x28')]['findAll'](_0x2feda3);})[_0x4fff('0x21')](function(_0x43f30f){_0x2d3865[_0x4fff('0x41')]=_0x43f30f;return _0x2d3865;})[_0x4fff('0x21')](respondWithFilteredResult(_0x383d64,_0x2feda3))['catch'](handleError(_0x383d64,null));};exports[_0x4fff('0x42')]=function(_0x2503f2,_0x1cadfe){var _0x4d9418={'raw':![],'where':{'id':_0x2503f2[_0x4fff('0x43')]['id']}},_0x7a78={};_0x7a78[_0x4fff('0x2f')]=_[_0x4fff('0x44')](db[_0x4fff('0x28')]['rawAttributes']);_0x7a78['query']=_[_0x4fff('0x44')](_0x2503f2[_0x4fff('0x2c')]);_0x7a78[_0x4fff('0x2d')]=_['intersection'](_0x7a78[_0x4fff('0x2f')],_0x7a78['query']);_0x4d9418['attributes']=_[_0x4fff('0x2e')](_0x7a78[_0x4fff('0x2f')],qs[_0x4fff('0x30')](_0x2503f2[_0x4fff('0x2c')][_0x4fff('0x30')]));_0x4d9418[_0x4fff('0x31')]=_0x4d9418[_0x4fff('0x31')][_0x4fff('0x32')]?_0x4d9418[_0x4fff('0x31')]:_0x7a78[_0x4fff('0x2f')];if(_0x2503f2[_0x4fff('0x2c')][_0x4fff('0x3f')]){_0x4d9418['include']=[{'all':!![]}];}_0x4d9418=_['merge']({},_0x4d9418,_0x2503f2[_0x4fff('0x3d')]);return db[_0x4fff('0x28')][_0x4fff('0x45')](_0x4d9418)[_0x4fff('0x21')](handleEntityNotFound(_0x1cadfe,null))[_0x4fff('0x21')](respondWithResult(_0x1cadfe,null))[_0x4fff('0x46')](handleError(_0x1cadfe,null));};exports[_0x4fff('0x47')]=function(_0x2a191d,_0x49cb24){return db[_0x4fff('0x28')][_0x4fff('0x47')](_0x2a191d[_0x4fff('0x48')],{})[_0x4fff('0x21')](respondWithResult(_0x49cb24,0xc9))[_0x4fff('0x46')](handleError(_0x49cb24,null));};exports[_0x4fff('0x1f')]=function(_0x35168a,_0x377752){if(_0x35168a[_0x4fff('0x48')]['id']){delete _0x35168a[_0x4fff('0x48')]['id'];}return db[_0x4fff('0x28')]['find']({'where':{'id':_0x35168a[_0x4fff('0x43')]['id']}})[_0x4fff('0x21')](handleEntityNotFound(_0x377752,null))[_0x4fff('0x21')](saveUpdates(_0x35168a[_0x4fff('0x48')],null))['then'](respondWithResult(_0x377752,null))[_0x4fff('0x46')](handleError(_0x377752,null));};exports[_0x4fff('0x49')]=function(_0x40c119,_0x2ed5b2){return db['VoiceRecording']['describe']()[_0x4fff('0x21')](respondWithResult(_0x2ed5b2,null))[_0x4fff('0x46')](handleError(_0x2ed5b2,null));};exports[_0x4fff('0x4a')]=function(_0x536ff9,_0x7b753c,_0x371c8e){var _0x2ee021=require(_0x4fff('0x4b'));var _0x565cca=![];var _0x416c81={};if(_0x536ff9[_0x4fff('0x2c')][_0x4fff('0x2a')]&&_0x536ff9['query'][_0x4fff('0x2a')]==='uniqueid'){_0x416c81[_0x4fff('0x4c')]=_0x536ff9[_0x4fff('0x43')]['id'];}else{_0x416c81['id']=_0x536ff9[_0x4fff('0x43')]['id'];}return db['VoiceRecording'][_0x4fff('0x45')]({'where':_0x416c81,'attributes':['id',_0x4fff('0x4d')],'raw':!![]})['then'](handleEntityNotFound(_0x7b753c,null))[_0x4fff('0x21')](function(_0x413cc1){if(_0x413cc1){var _0x3e38ef=_0x413cc1[_0x4fff('0x4d')];var _0x4cc688=util[_0x4fff('0x4e')](_0x4fff('0x4f'),_0x3e38ef);if(fs[_0x4fff('0x50')](_0x4cc688)){_0x565cca=!![];return _0x2ee021[_0x4fff('0x51')](_0x4cc688,_0x3e38ef,config[_0x4fff('0x52')][_0x4fff('0x53')])['then'](function(){return _0x413cc1;});}return _0x413cc1;}})[_0x4fff('0x21')](function(_0x3a948a){if(_0x3a948a){var _0x1c5256=_0x3a948a[_0x4fff('0x4d')];if(!fs['existsSync'](_0x1c5256)){throw new db[(_0x4fff('0x54'))][(_0x4fff('0x55'))](_0x4fff('0x56'));}if(_0x3a948a[_0x4fff('0x57')]){return _0x7b753c[_0x4fff('0x4a')](_0x1c5256,_0x3a948a[_0x4fff('0x57')]+path[_0x4fff('0x58')](_0x1c5256),function(){if(_0x565cca){fs[_0x4fff('0x59')](_0x1c5256);}});}else{return _0x7b753c[_0x4fff('0x4a')](_0x1c5256,function(_0x355528){if(_0x565cca){fs[_0x4fff('0x59')](_0x1c5256);}});}}})['catch'](function(_0x59d910){if(_0x59d910[_0x4fff('0x5a')]===_0x4fff('0x56')){_0x7b753c['status'](0x194)[_0x4fff('0x25')]('Not\x20found');}else{return handleError(_0x7b753c,null);}});};exports[_0x4fff('0x5b')]=function(_0x5086e7,_0x4abae1,_0x529b5a){var _0x467be2=require(_0x4fff('0x4b'));var _0x4c27b3=![];var _0x25bf70={'$and':[db['sequelize'][_0x4fff('0x38')](db[_0x4fff('0x5c')]['fn']('MD5',db[_0x4fff('0x5c')][_0x4fff('0x5d')](_0x4fff('0x4c'))),_0x5086e7['query'][_0x4fff('0x5e')])]};if(_0x5086e7[_0x4fff('0x2c')][_0x4fff('0x2a')]&&_0x5086e7[_0x4fff('0x2c')][_0x4fff('0x2a')]===_0x4fff('0x4c')){_0x25bf70[_0x4fff('0x5f')][_0x4fff('0x60')]({'uniqueid':_0x5086e7[_0x4fff('0x43')]['id']});}else{_0x25bf70[_0x4fff('0x5f')]['push']({'id':_0x5086e7[_0x4fff('0x43')]['id']});}return db[_0x4fff('0x28')][_0x4fff('0x45')]({'where':_0x25bf70,'attributes':['id',_0x4fff('0x4d')],'raw':!![]})[_0x4fff('0x21')](handleEntityNotFound(_0x4abae1,null))[_0x4fff('0x21')](function(_0x384e6d){if(_0x384e6d){var _0x13b37=util[_0x4fff('0x4e')]('%s.cypher',_0x384e6d[_0x4fff('0x4d')]);if(fs[_0x4fff('0x50')](_0x13b37)){_0x4c27b3=!![];return _0x467be2[_0x4fff('0x51')](_0x13b37,_0x384e6d['value'],config[_0x4fff('0x52')][_0x4fff('0x53')])[_0x4fff('0x21')](function(){return _0x384e6d;});}return _0x384e6d;}})['then'](function(_0x3061d7){if(_0x3061d7){if(!fs[_0x4fff('0x50')](_0x3061d7['value'])){throw new db[(_0x4fff('0x54'))][(_0x4fff('0x55'))](_0x4fff('0x56'));}if(_0x3061d7[_0x4fff('0x57')]){return _0x4abae1['download'](_0x3061d7['value'],_0x3061d7['filename']+path[_0x4fff('0x58')](_0x3061d7['value']),function(){if(_0x4c27b3){fs[_0x4fff('0x59')](_0x3061d7[_0x4fff('0x4d')]);}});}else{return _0x4abae1[_0x4fff('0x4a')](_0x3061d7[_0x4fff('0x4d')],function(_0xb4e3de){if(_0x4c27b3){fs[_0x4fff('0x59')](_0x3061d7['value']);}});}}})[_0x4fff('0x46')](handleError(_0x4abae1,null));};exports[_0x4fff('0x20')]=function(_0x3df35f,_0x1713e1){return db[_0x4fff('0x28')][_0x4fff('0x45')]({'where':{'id':_0x3df35f[_0x4fff('0x43')]['id']}})[_0x4fff('0x21')](function(_0x5725ac){if(!_0x5725ac)throw new ReferenceError(_0x4fff('0x61'));return _0x5725ac;})['then'](function(_0x39b1ad){var _0x2e5a4a=_0x39b1ad[_0x4fff('0x4d')];logger['info'](_0x4fff('0x62'),_0x2e5a4a);if(!_[_0x4fff('0x63')](_0x39b1ad['value'])&&fs[_0x4fff('0x50')](_0x2e5a4a)){logger[_0x4fff('0x64')](_0x4fff('0x65')+_0x2e5a4a+_0x4fff('0x66'));fs['unlinkSync'](_0x2e5a4a);}_0x2e5a4a=_0x2e5a4a+'.cypher';if(!_[_0x4fff('0x63')](_0x39b1ad['value'])&&fs[_0x4fff('0x50')](_0x2e5a4a)){logger[_0x4fff('0x64')](_0x4fff('0x65')+_0x2e5a4a+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0x4fff('0x67')](_0x2e5a4a);}return _0x39b1ad;})[_0x4fff('0x21')](function(_0x1296c6){if(!_0x1296c6)throw new InternalError();return _0x1296c6[_0x4fff('0x20')]();})['then'](function(){_0x1713e1[_0x4fff('0x17')](0xcc)[_0x4fff('0x18')]();})[_0x4fff('0x46')](handleError(_0x1713e1,null));};
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.model.js b/server/api/voiceRecording/voiceRecording.model.js
index 1f2eb3d..eb9e7cb 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 _0xd6c2=['lodash','../../config/logger','api','moment','bluebird','path','../../config/environment','exports','VoiceRecording','voice_recordings','uniqueid'];(function(_0x2867d8,_0xef3ee0){var _0x3b8176=function(_0x2b9eb8){while(--_0x2b9eb8){_0x2867d8['push'](_0x2867d8['shift']());}};_0x3b8176(++_0xef3ee0);}(_0xd6c2,0x134));var _0x2d6c=function(_0xa0168a,_0x891d52){_0xa0168a=_0xa0168a-0x0;var _0x477dfb=_0xd6c2[_0xa0168a];return _0x477dfb;};'use strict';var _=require(_0x2d6c('0x0'));var util=require('util');var logger=require(_0x2d6c('0x1'))(_0x2d6c('0x2'));var moment=require(_0x2d6c('0x3'));var BPromise=require(_0x2d6c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2d6c('0x5'));var rimraf=require('rimraf');var config=require(_0x2d6c('0x6'));var attributes=require('./voiceRecording.attributes');module[_0x2d6c('0x7')]=function(_0x1b8628,_0x499988){return _0x1b8628['define'](_0x2d6c('0x8'),attributes,{'tableName':_0x2d6c('0x9'),'paranoid':![],'indexes':[{'name':_0x2d6c('0xa'),'fields':[_0x2d6c('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa994=['./voiceRecording.attributes','exports','VoiceRecording','voice_recordings','uniqueid','lodash','../../config/logger','api','request-promise','path','rimraf','../../config/environment'];(function(_0x39a53b,_0x3bbd10){var _0x296bd7=function(_0x3e4089){while(--_0x3e4089){_0x39a53b['push'](_0x39a53b['shift']());}};_0x296bd7(++_0x3bbd10);}(_0xa994,0x7d));var _0x4a99=function(_0x439e52,_0x172f0a){_0x439e52=_0x439e52-0x0;var _0x4f1715=_0xa994[_0x439e52];return _0x4f1715;};'use strict';var _=require(_0x4a99('0x0'));var util=require('util');var logger=require(_0x4a99('0x1'))(_0x4a99('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x4a99('0x3'));var fs=require('fs');var path=require(_0x4a99('0x4'));var rimraf=require(_0x4a99('0x5'));var config=require(_0x4a99('0x6'));var attributes=require(_0x4a99('0x7'));module[_0x4a99('0x8')]=function(_0x2eb483,_0x57cb26){return _0x2eb483['define'](_0x4a99('0x9'),attributes,{'tableName':_0x4a99('0xa'),'paranoid':![],'indexes':[{'name':_0x4a99('0xb'),'fields':[_0x4a99('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/voiceRecording/voiceRecording.rpc.js b/server/api/voiceRecording/voiceRecording.rpc.js
index af03179..c070b93 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 _0xa9e0=['findOne','callRecordingEncryption','create','existsSync','value','%s.cypher','encryptFile','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','VoiceRecording,\x20%s,\x20%s','request\x20sent','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','VoiceRecording','update','body','options','raw','then','UpdateVoiceRecording','stringify','CreateVoiceRecording'];(function(_0x20713e,_0x44f710){var _0x7d998b=function(_0x5d98ab){while(--_0x5d98ab){_0x20713e['push'](_0x20713e['shift']());}};_0x7d998b(++_0x44f710);}(_0xa9e0,0x123));var _0x0a9e=function(_0x30ae5e,_0x391fc4){_0x30ae5e=_0x30ae5e-0x0;var _0x1f2e93=_0xa9e0[_0x30ae5e];return _0x1f2e93;};'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);});});}exports['UpdateVoiceRecording']=function(_0x459eb1){var _0x478723=this;return new Promise(function(_0x106033,_0x205fd6){return db[_0x0a9e('0x14')][_0x0a9e('0x15')](_0x459eb1[_0x0a9e('0x16')],{'raw':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1[_0x0a9e('0x17')][_0x0a9e('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1[_0x0a9e('0x17')]['where']||null:null,'attributes':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1[_0x0a9e('0x17')]['attributes']||null:null,'limit':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1['options']['limit']||null:null})[_0x0a9e('0x19')](function(_0x432e56){logger[_0x0a9e('0xa')](_0x0a9e('0x1a'),_0x459eb1);logger['debug'](_0x0a9e('0x1a'),_0x459eb1,JSON[_0x0a9e('0x1b')](_0x432e56));_0x106033(_0x432e56);})[_0x0a9e('0x13')](function(_0x4d00e6){logger[_0x0a9e('0x10')](_0x0a9e('0x1a'),_0x4d00e6[_0x0a9e('0x11')],_0x459eb1);_0x205fd6(_0x478723['error'](0x1f4,_0x4d00e6['message']));});});};exports[_0x0a9e('0x1c')]=function(_0x3a8e58){var _0x40c424=this;return new Promise(function(_0x33161b,_0x526cf3){var _0x384319=require('../../components/encryptor');var _0x45a1e7;return db['Setting'][_0x0a9e('0x1d')]({'attributes':['id',_0x0a9e('0x1e')],'where':{'id':0x1},'raw':!![]})[_0x0a9e('0x19')](function(_0x14433c){_0x45a1e7=_0x14433c;return db[_0x0a9e('0x14')][_0x0a9e('0x1f')](_0x3a8e58[_0x0a9e('0x16')]);})[_0x0a9e('0x19')](function(_0x5a101a){if(_0x45a1e7[_0x0a9e('0x1e')]&&fs[_0x0a9e('0x20')](_0x5a101a[_0x0a9e('0x21')])){var _0x2ec755=util['format'](_0x0a9e('0x22'),_0x5a101a[_0x0a9e('0x21')]);return _0x384319[_0x0a9e('0x23')](_0x5a101a[_0x0a9e('0x21')],_0x2ec755,config[_0x0a9e('0x24')][_0x0a9e('0x25')])[_0x0a9e('0x19')](function(){fs[_0x0a9e('0x26')](_0x5a101a[_0x0a9e('0x21')]);logger['info'](_0x0a9e('0x27'));return _0x5a101a;});}return _0x5a101a;})['then'](function(_0x2407f9){logger[_0x0a9e('0xa')](_0x0a9e('0x1c'),_0x3a8e58);logger[_0x0a9e('0xd')](_0x0a9e('0x1c'),_0x3a8e58,JSON['stringify'](_0x2407f9));_0x33161b(_0x2407f9);})[_0x0a9e('0x13')](function(_0x46f0a5){logger[_0x0a9e('0x10')](_0x0a9e('0x1c'),_0x46f0a5[_0x0a9e('0x11')],_0x3a8e58);_0x526cf3(_0x40c424[_0x0a9e('0x10')](0x1f4,_0x46f0a5[_0x0a9e('0x11')]));});});};
\ No newline at end of file
+var _0xa9e0=['findOne','callRecordingEncryption','create','existsSync','value','%s.cypher','encryptFile','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','VoiceRecording,\x20%s,\x20%s','request\x20sent','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','VoiceRecording','update','body','options','raw','then','UpdateVoiceRecording','stringify','CreateVoiceRecording'];(function(_0x27f146,_0x5515bf){var _0xd45e2a=function(_0x51dce2){while(--_0x51dce2){_0x27f146['push'](_0x27f146['shift']());}};_0xd45e2a(++_0x5515bf);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xa9e0[_0x6c993a];return _0x27f547;};'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);});});}exports['UpdateVoiceRecording']=function(_0x459eb1){var _0x478723=this;return new Promise(function(_0x106033,_0x205fd6){return db[_0x0a9e('0x14')][_0x0a9e('0x15')](_0x459eb1[_0x0a9e('0x16')],{'raw':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1[_0x0a9e('0x17')][_0x0a9e('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1[_0x0a9e('0x17')]['where']||null:null,'attributes':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1[_0x0a9e('0x17')]['attributes']||null:null,'limit':_0x459eb1[_0x0a9e('0x17')]?_0x459eb1['options']['limit']||null:null})[_0x0a9e('0x19')](function(_0x432e56){logger[_0x0a9e('0xa')](_0x0a9e('0x1a'),_0x459eb1);logger['debug'](_0x0a9e('0x1a'),_0x459eb1,JSON[_0x0a9e('0x1b')](_0x432e56));_0x106033(_0x432e56);})[_0x0a9e('0x13')](function(_0x4d00e6){logger[_0x0a9e('0x10')](_0x0a9e('0x1a'),_0x4d00e6[_0x0a9e('0x11')],_0x459eb1);_0x205fd6(_0x478723['error'](0x1f4,_0x4d00e6['message']));});});};exports[_0x0a9e('0x1c')]=function(_0x3a8e58){var _0x40c424=this;return new Promise(function(_0x33161b,_0x526cf3){var _0x384319=require('../../components/encryptor');var _0x45a1e7;return db['Setting'][_0x0a9e('0x1d')]({'attributes':['id',_0x0a9e('0x1e')],'where':{'id':0x1},'raw':!![]})[_0x0a9e('0x19')](function(_0x14433c){_0x45a1e7=_0x14433c;return db[_0x0a9e('0x14')][_0x0a9e('0x1f')](_0x3a8e58[_0x0a9e('0x16')]);})[_0x0a9e('0x19')](function(_0x5a101a){if(_0x45a1e7[_0x0a9e('0x1e')]&&fs[_0x0a9e('0x20')](_0x5a101a[_0x0a9e('0x21')])){var _0x2ec755=util['format'](_0x0a9e('0x22'),_0x5a101a[_0x0a9e('0x21')]);return _0x384319[_0x0a9e('0x23')](_0x5a101a[_0x0a9e('0x21')],_0x2ec755,config[_0x0a9e('0x24')][_0x0a9e('0x25')])[_0x0a9e('0x19')](function(){fs[_0x0a9e('0x26')](_0x5a101a[_0x0a9e('0x21')]);logger['info'](_0x0a9e('0x27'));return _0x5a101a;});}return _0x5a101a;})['then'](function(_0x2407f9){logger[_0x0a9e('0xa')](_0x0a9e('0x1c'),_0x3a8e58);logger[_0x0a9e('0xd')](_0x0a9e('0x1c'),_0x3a8e58,JSON['stringify'](_0x2407f9));_0x33161b(_0x2407f9);})[_0x0a9e('0x13')](function(_0x46f0a5){logger[_0x0a9e('0x10')](_0x0a9e('0x1c'),_0x46f0a5[_0x0a9e('0x11')],_0x3a8e58);_0x526cf3(_0x40c424[_0x0a9e('0x10')](0x1f4,_0x46f0a5[_0x0a9e('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/index.js b/server/api/voiceTransferReport/index.js
index e9cd7a1..488f890 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 _0x5fab=['../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceTransferReport.controller','get','isAuthenticated','index','show','post','create','put','/:id','delete','destroy','exports','multer','util','connect-timeout','express','Router'];(function(_0x34879e,_0x28667d){var _0x591af3=function(_0x17fd77){while(--_0x17fd77){_0x34879e['push'](_0x34879e['shift']());}};_0x591af3(++_0x28667d);}(_0x5fab,0x177));var _0xb5fa=function(_0x14349b,_0x1eb24d){_0x14349b=_0x14349b-0x0;var _0x34f8cb=_0x5fab[_0x14349b];return _0x34f8cb;};'use strict';var multer=require(_0xb5fa('0x0'));var util=require(_0xb5fa('0x1'));var path=require('path');var timeout=require(_0xb5fa('0x2'));var express=require(_0xb5fa('0x3'));var router=express[_0xb5fa('0x4')]();var auth=require(_0xb5fa('0x5'));var interaction=require(_0xb5fa('0x6'));var config=require(_0xb5fa('0x7'));var controller=require(_0xb5fa('0x8'));router[_0xb5fa('0x9')]('/',auth[_0xb5fa('0xa')](),controller[_0xb5fa('0xb')]);router['get']('/:id',auth[_0xb5fa('0xa')](),controller[_0xb5fa('0xc')]);router[_0xb5fa('0xd')]('/',auth['isAuthenticated'](),controller[_0xb5fa('0xe')]);router[_0xb5fa('0xf')](_0xb5fa('0x10'),auth['isAuthenticated'](),controller['update']);router[_0xb5fa('0x11')](_0xb5fa('0x10'),auth[_0xb5fa('0xa')](),controller[_0xb5fa('0x12')]);module[_0xb5fa('0x13')]=router;
\ No newline at end of file
+var _0x4c60=['connect-timeout','Router','get','isAuthenticated','index','/:id','show','create','put','destroy','exports','multer','util','path'];(function(_0x48bcee,_0x2730fc){var _0x180407=function(_0x27c0a0){while(--_0x27c0a0){_0x48bcee['push'](_0x48bcee['shift']());}};_0x180407(++_0x2730fc);}(_0x4c60,0xc1));var _0x04c6=function(_0x5aeae6,_0x28ca94){_0x5aeae6=_0x5aeae6-0x0;var _0x170119=_0x4c60[_0x5aeae6];return _0x170119;};'use strict';var multer=require(_0x04c6('0x0'));var util=require(_0x04c6('0x1'));var path=require(_0x04c6('0x2'));var timeout=require(_0x04c6('0x3'));var express=require('express');var router=express[_0x04c6('0x4')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./voiceTransferReport.controller');router[_0x04c6('0x5')]('/',auth[_0x04c6('0x6')](),controller[_0x04c6('0x7')]);router[_0x04c6('0x5')](_0x04c6('0x8'),auth[_0x04c6('0x6')](),controller[_0x04c6('0x9')]);router['post']('/',auth[_0x04c6('0x6')](),controller[_0x04c6('0xa')]);router[_0x04c6('0xb')](_0x04c6('0x8'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x04c6('0x8'),auth['isAuthenticated'](),controller[_0x04c6('0xc')]);module[_0x04c6('0xd')]=router;
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/voiceTransferReport.attributes.js b/server/api/voiceTransferReport/voiceTransferReport.attributes.js
index 72006aa..4f40a33 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 _0x49e9=['sequelize','moment','exports','ENUM','blind','STRING','Yes'];(function(_0x5b48b6,_0x289415){var _0x400bb5=function(_0x4d2d45){while(--_0x4d2d45){_0x5b48b6['push'](_0x5b48b6['shift']());}};_0x400bb5(++_0x289415);}(_0x49e9,0x10a));var _0x949e=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x49e9[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x949e('0x0'));var moment=require(_0x949e('0x1'));module[_0x949e('0x2')]={'type':{'type':Sequelize[_0x949e('0x3')](_0x949e('0x4'),'attended')},'result':{'type':Sequelize[_0x949e('0x5')]},'transfererchannel':{'type':Sequelize['STRING']},'transferercalleridnum':{'type':Sequelize[_0x949e('0x5')]},'transferercalleridname':{'type':Sequelize[_0x949e('0x5')]},'transfererconnectedlinenum':{'type':Sequelize[_0x949e('0x5')]},'transfererconnectedlinename':{'type':Sequelize[_0x949e('0x5')]},'transfereraccountcode':{'type':Sequelize['STRING']},'transferercontext':{'type':Sequelize[_0x949e('0x5')]},'transfererexten':{'type':Sequelize[_0x949e('0x5')]},'transfererlinkedid':{'type':Sequelize[_0x949e('0x5')]},'transfereechannel':{'type':Sequelize[_0x949e('0x5')]},'transfereecalleridnum':{'type':Sequelize[_0x949e('0x5')]},'transfereecalleridname':{'type':Sequelize[_0x949e('0x5')]},'transfereeconnectedlinenum':{'type':Sequelize[_0x949e('0x5')]},'transfereeconnectedlinename':{'type':Sequelize[_0x949e('0x5')]},'transfereeaccountcode':{'type':Sequelize[_0x949e('0x5')]},'transfereecontext':{'type':Sequelize['STRING']},'transfereeexten':{'type':Sequelize[_0x949e('0x5')]},'transfereelinkedid':{'type':Sequelize[_0x949e('0x5')]},'isexternal':{'type':Sequelize[_0x949e('0x3')](_0x949e('0x6'),'No')},'context':{'type':Sequelize[_0x949e('0x5')]},'extension':{'type':Sequelize[_0x949e('0x5')]}};
\ No newline at end of file
+var _0x251f=['STRING','Yes','moment','exports','attended'];(function(_0x17aba8,_0x349cf6){var _0x3d8095=function(_0x4cd87b){while(--_0x4cd87b){_0x17aba8['push'](_0x17aba8['shift']());}};_0x3d8095(++_0x349cf6);}(_0x251f,0x1ce));var _0xf251=function(_0xd158dc,_0x128608){_0xd158dc=_0xd158dc-0x0;var _0x12d25f=_0x251f[_0xd158dc];return _0x12d25f;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xf251('0x0'));module[_0xf251('0x1')]={'type':{'type':Sequelize['ENUM']('blind',_0xf251('0x2'))},'result':{'type':Sequelize[_0xf251('0x3')]},'transfererchannel':{'type':Sequelize[_0xf251('0x3')]},'transferercalleridnum':{'type':Sequelize[_0xf251('0x3')]},'transferercalleridname':{'type':Sequelize['STRING']},'transfererconnectedlinenum':{'type':Sequelize[_0xf251('0x3')]},'transfererconnectedlinename':{'type':Sequelize[_0xf251('0x3')]},'transfereraccountcode':{'type':Sequelize['STRING']},'transferercontext':{'type':Sequelize['STRING']},'transfererexten':{'type':Sequelize[_0xf251('0x3')]},'transfererlinkedid':{'type':Sequelize[_0xf251('0x3')]},'transfereechannel':{'type':Sequelize[_0xf251('0x3')]},'transfereecalleridnum':{'type':Sequelize[_0xf251('0x3')]},'transfereecalleridname':{'type':Sequelize['STRING']},'transfereeconnectedlinenum':{'type':Sequelize[_0xf251('0x3')]},'transfereeconnectedlinename':{'type':Sequelize[_0xf251('0x3')]},'transfereeaccountcode':{'type':Sequelize['STRING']},'transfereecontext':{'type':Sequelize[_0xf251('0x3')]},'transfereeexten':{'type':Sequelize[_0xf251('0x3')]},'transfereelinkedid':{'type':Sequelize[_0xf251('0x3')]},'isexternal':{'type':Sequelize['ENUM'](_0xf251('0x4'),'No')},'context':{'type':Sequelize[_0xf251('0x3')]},'extension':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/voiceTransferReport.controller.js b/server/api/voiceTransferReport/voiceTransferReport.controller.js
index bc0c636..1758866 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 _0xf4eb=['ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../mysqldb','status','end','count','offset','limit','apply','save','update','then','destroy','sendStatus','error','stack','name','VoiceTransferReport','rawAttributes','type','model','map','keys','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','includeAll','include','rows','catch','show','options','find','create','body','params','html-pdf','request-promise','mustache','util','path','sox','to-csv','ejs','lodash','crypto','querystring','papaparse'];(function(_0x367108,_0x3e9330){var _0x1a6cda=function(_0x52d794){while(--_0x52d794){_0x367108['push'](_0x367108['shift']());}};_0x1a6cda(++_0x3e9330);}(_0xf4eb,0xec));var _0xbf4e=function(_0x1b9249,_0x8dc6e2){_0x1b9249=_0x1b9249-0x0;var _0x46f4b2=_0xf4eb[_0x1b9249];return _0x46f4b2;};'use strict';var pdf=require(_0xbf4e('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xbf4e('0x1'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xbf4e('0x2'));var util=require(_0xbf4e('0x3'));var path=require(_0xbf4e('0x4'));var sox=require(_0xbf4e('0x5'));var csv=require(_0xbf4e('0x6'));var ejs=require(_0xbf4e('0x7'));var fs=require('fs');var _=require(_0xbf4e('0x8'));var squel=require('squel');var crypto=require(_0xbf4e('0x9'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xbf4e('0x6'));var querystring=require(_0xbf4e('0xa'));var Papa=require(_0xbf4e('0xb'));var Redis=require(_0xbf4e('0xc'));var authService=require(_0xbf4e('0xd'));var qs=require(_0xbf4e('0xe'));var as=require(_0xbf4e('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xbf4e('0x10'));var utils=require('../../config/utils');var config=require(_0xbf4e('0x11'));var db=require(_0xbf4e('0x12'))['db'];function respondWithStatusCode(_0x54a96e,_0x17fd01){_0x17fd01=_0x17fd01||0xcc;return function(_0x5a3035){if(_0x5a3035){return _0x54a96e['sendStatus'](_0x17fd01);}return _0x54a96e[_0xbf4e('0x13')](_0x17fd01)[_0xbf4e('0x14')]();};}function respondWithResult(_0x1e029b,_0x302841){_0x302841=_0x302841||0xc8;return function(_0x3b74bd){if(_0x3b74bd){return _0x1e029b[_0xbf4e('0x13')](_0x302841)['json'](_0x3b74bd);}};}function respondWithFilteredResult(_0x59fb15,_0x180432){return function(_0x1735ae){if(_0x1735ae){var _0x28fc6b=_0x1735ae[_0xbf4e('0x15')],_0x542909=_0x180432[_0xbf4e('0x16')],_0x14110b=_0x180432['offset']+_0x180432[_0xbf4e('0x17')],_0x2c292c;if(_0x14110b>=_0x28fc6b){_0x14110b=_0x28fc6b;_0x2c292c=0xc8;}else{_0x2c292c=0xce;}_0x59fb15['status'](_0x2c292c);return _0x59fb15['set']('Content-Range',_0x542909+'-'+_0x14110b+'/'+_0x28fc6b)['json'](_0x1735ae);}return null;};}function patchUpdates(_0x35992b){return function(_0x1ca73c){try{jsonpatch[_0xbf4e('0x18')](_0x1ca73c,_0x35992b,!![]);}catch(_0x4d9c2a){return BPromise['reject'](_0x4d9c2a);}return _0x1ca73c[_0xbf4e('0x19')]();};}function saveUpdates(_0x9a46ee,_0x3be138){return function(_0x3a875b){if(_0x3a875b){return _0x3a875b[_0xbf4e('0x1a')](_0x9a46ee)[_0xbf4e('0x1b')](function(_0x415963){return _0x415963;});}return null;};}function removeEntity(_0x3d642a,_0xd09e12){return function(_0x376832){if(_0x376832){return _0x376832[_0xbf4e('0x1c')]()['then'](function(){_0x3d642a[_0xbf4e('0x13')](0xcc)[_0xbf4e('0x14')]();});}};}function handleEntityNotFound(_0x51648c,_0x31e3f5){return function(_0x30994d){if(!_0x30994d){_0x51648c[_0xbf4e('0x1d')](0x194);}return _0x30994d;};}function handleError(_0x1bda8b,_0x3a5d72){_0x3a5d72=_0x3a5d72||0x1f4;return function(_0x4a0243){logger[_0xbf4e('0x1e')](_0x4a0243[_0xbf4e('0x1f')]);if(_0x4a0243[_0xbf4e('0x20')]){delete _0x4a0243['name'];}_0x1bda8b[_0xbf4e('0x13')](_0x3a5d72)['send'](_0x4a0243);};}exports['index']=function(_0x2bfccf,_0x5a0a9b){var _0x38c923={},_0x315df3={},_0x4021a9={'count':0x0,'rows':[]};var _0x41f918=_['map'](db[_0xbf4e('0x21')][_0xbf4e('0x22')],function(_0x43879d){return{'name':_0x43879d['fieldName'],'type':_0x43879d[_0xbf4e('0x23')]['key']};});_0x315df3[_0xbf4e('0x24')]=_[_0xbf4e('0x25')](_0x41f918,_0xbf4e('0x20'));_0x315df3['query']=_[_0xbf4e('0x26')](_0x2bfccf[_0xbf4e('0x27')]);_0x315df3[_0xbf4e('0x28')]=_[_0xbf4e('0x29')](_0x315df3[_0xbf4e('0x24')],_0x315df3[_0xbf4e('0x27')]);_0x38c923['attributes']=_[_0xbf4e('0x29')](_0x315df3[_0xbf4e('0x24')],qs['fields'](_0x2bfccf[_0xbf4e('0x27')][_0xbf4e('0x2a')]));_0x38c923['attributes']=_0x38c923[_0xbf4e('0x2b')]['length']?_0x38c923[_0xbf4e('0x2b')]:_0x315df3['model'];if(!_0x2bfccf[_0xbf4e('0x27')][_0xbf4e('0x2c')](_0xbf4e('0x2d'))){_0x38c923['limit']=qs[_0xbf4e('0x17')](_0x2bfccf[_0xbf4e('0x27')][_0xbf4e('0x17')]);_0x38c923[_0xbf4e('0x16')]=qs[_0xbf4e('0x16')](_0x2bfccf[_0xbf4e('0x27')]['offset']);}_0x38c923[_0xbf4e('0x2e')]=qs[_0xbf4e('0x2f')](_0x2bfccf[_0xbf4e('0x27')][_0xbf4e('0x2f')]);_0x38c923[_0xbf4e('0x30')]=qs['filters'](_['pick'](_0x2bfccf['query'],_0x315df3['filters']));if(_0x2bfccf[_0xbf4e('0x27')][_0xbf4e('0x31')]){_0x38c923[_0xbf4e('0x30')]=_[_0xbf4e('0x32')](_0x38c923[_0xbf4e('0x30')],{'$or':_[_0xbf4e('0x25')](_0x41f918,function(_0x355b42){if(_0x355b42[_0xbf4e('0x23')]!==_0xbf4e('0x33')){var _0x54527d={};_0x54527d[_0x355b42['name']]={'$like':'%'+_0x2bfccf[_0xbf4e('0x27')][_0xbf4e('0x31')]+'%'};return _0x54527d;}})});}_0x38c923=_[_0xbf4e('0x32')]({},_0x38c923,_0x2bfccf['options']);var _0x3f46f1={'where':_0x38c923['where']};return db[_0xbf4e('0x21')][_0xbf4e('0x15')](_0x3f46f1)[_0xbf4e('0x1b')](function(_0xb30f90){_0x4021a9['count']=_0xb30f90;if(_0x2bfccf[_0xbf4e('0x27')][_0xbf4e('0x34')]){_0x38c923[_0xbf4e('0x35')]=[{'all':!![]}];}return db[_0xbf4e('0x21')]['findAll'](_0x38c923);})[_0xbf4e('0x1b')](function(_0x44e96b){_0x4021a9[_0xbf4e('0x36')]=_0x44e96b;return _0x4021a9;})[_0xbf4e('0x1b')](respondWithFilteredResult(_0x5a0a9b,_0x38c923))[_0xbf4e('0x37')](handleError(_0x5a0a9b,null));};exports[_0xbf4e('0x38')]=function(_0xdb3c1,_0x541576){var _0x176166={'raw':!![],'where':{'id':_0xdb3c1['params']['id']}},_0x7b3a94={};_0x7b3a94['model']=_[_0xbf4e('0x26')](db[_0xbf4e('0x21')]['rawAttributes']);_0x7b3a94['query']=_[_0xbf4e('0x26')](_0xdb3c1[_0xbf4e('0x27')]);_0x7b3a94[_0xbf4e('0x28')]=_[_0xbf4e('0x29')](_0x7b3a94[_0xbf4e('0x24')],_0x7b3a94[_0xbf4e('0x27')]);_0x176166['attributes']=_[_0xbf4e('0x29')](_0x7b3a94[_0xbf4e('0x24')],qs['fields'](_0xdb3c1['query']['fields']));_0x176166['attributes']=_0x176166[_0xbf4e('0x2b')]['length']?_0x176166[_0xbf4e('0x2b')]:_0x7b3a94[_0xbf4e('0x24')];if(_0xdb3c1['query']['includeAll']){_0x176166[_0xbf4e('0x35')]=[{'all':!![]}];}_0x176166=_[_0xbf4e('0x32')]({},_0x176166,_0xdb3c1[_0xbf4e('0x39')]);return db[_0xbf4e('0x21')][_0xbf4e('0x3a')](_0x176166)['then'](handleEntityNotFound(_0x541576,null))[_0xbf4e('0x1b')](respondWithResult(_0x541576,null))[_0xbf4e('0x37')](handleError(_0x541576,null));};exports[_0xbf4e('0x3b')]=function(_0x39843e,_0x1be469){return db[_0xbf4e('0x21')][_0xbf4e('0x3b')](_0x39843e[_0xbf4e('0x3c')],{})['then'](respondWithResult(_0x1be469,0xc9))[_0xbf4e('0x37')](handleError(_0x1be469,null));};exports[_0xbf4e('0x1a')]=function(_0x1833c1,_0x32bed6){if(_0x1833c1[_0xbf4e('0x3c')]['id']){delete _0x1833c1[_0xbf4e('0x3c')]['id'];}return db[_0xbf4e('0x21')][_0xbf4e('0x3a')]({'where':{'id':_0x1833c1[_0xbf4e('0x3d')]['id']}})[_0xbf4e('0x1b')](handleEntityNotFound(_0x32bed6,null))[_0xbf4e('0x1b')](saveUpdates(_0x1833c1[_0xbf4e('0x3c')],null))[_0xbf4e('0x1b')](respondWithResult(_0x32bed6,null))[_0xbf4e('0x37')](handleError(_0x32bed6,null));};exports[_0xbf4e('0x1c')]=function(_0x2892ce,_0x10bc23){return db['VoiceTransferReport'][_0xbf4e('0x3a')]({'where':{'id':_0x2892ce[_0xbf4e('0x3d')]['id']}})[_0xbf4e('0x1b')](handleEntityNotFound(_0x10bc23,null))['then'](removeEntity(_0x10bc23,null))[_0xbf4e('0x37')](handleError(_0x10bc23,null));};
\ No newline at end of file
+var _0xe706=['includeAll','options','find','catch','create','body','destroy','html-pdf','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','count','limit','set','Content-Range','apply','reject','save','update','then','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','offset','sort','where','pick','filter','merge','VIRTUAL','VoiceTransferReport','include','findAll','rows','params'];(function(_0x81f0b5,_0xae7b5b){var _0x3edf25=function(_0x23dfea){while(--_0x23dfea){_0x81f0b5['push'](_0x81f0b5['shift']());}};_0x3edf25(++_0xae7b5b);}(_0xe706,0xa3));var _0x6e70=function(_0x151317,_0x3e6c29){_0x151317=_0x151317-0x0;var _0x50b025=_0xe706[_0x151317];return _0x50b025;};'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 as=require(_0x6e70('0x17'));var hardwareService=require(_0x6e70('0x18'));var logger=require(_0x6e70('0x19'))('api');var utils=require('../../config/utils');var config=require(_0x6e70('0x1a'));var db=require(_0x6e70('0x1b'))['db'];function respondWithStatusCode(_0x18cf27,_0x27dd9b){_0x27dd9b=_0x27dd9b||0xcc;return function(_0x3b38f3){if(_0x3b38f3){return _0x18cf27[_0x6e70('0x1c')](_0x27dd9b);}return _0x18cf27[_0x6e70('0x1d')](_0x27dd9b)[_0x6e70('0x1e')]();};}function respondWithResult(_0x5dfbaa,_0x52737e){_0x52737e=_0x52737e||0xc8;return function(_0x48bc72){if(_0x48bc72){return _0x5dfbaa[_0x6e70('0x1d')](_0x52737e)['json'](_0x48bc72);}};}function respondWithFilteredResult(_0x53aed0,_0x304716){return function(_0x22c50c){if(_0x22c50c){var _0x5d9263=_0x22c50c[_0x6e70('0x1f')],_0x24f3ac=_0x304716['offset'],_0x5c3fe7=_0x304716['offset']+_0x304716[_0x6e70('0x20')],_0x2efc0f;if(_0x5c3fe7>=_0x5d9263){_0x5c3fe7=_0x5d9263;_0x2efc0f=0xc8;}else{_0x2efc0f=0xce;}_0x53aed0['status'](_0x2efc0f);return _0x53aed0[_0x6e70('0x21')](_0x6e70('0x22'),_0x24f3ac+'-'+_0x5c3fe7+'/'+_0x5d9263)['json'](_0x22c50c);}return null;};}function patchUpdates(_0x497d61){return function(_0xc238ba){try{jsonpatch[_0x6e70('0x23')](_0xc238ba,_0x497d61,!![]);}catch(_0x2368eb){return BPromise[_0x6e70('0x24')](_0x2368eb);}return _0xc238ba[_0x6e70('0x25')]();};}function saveUpdates(_0xcdf9f2,_0x1b2453){return function(_0x44a49f){if(_0x44a49f){return _0x44a49f[_0x6e70('0x26')](_0xcdf9f2)[_0x6e70('0x27')](function(_0x4a0cfe){return _0x4a0cfe;});}return null;};}function removeEntity(_0x228350,_0x344b65){return function(_0x27b294){if(_0x27b294){return _0x27b294['destroy']()[_0x6e70('0x27')](function(){_0x228350[_0x6e70('0x1d')](0xcc)[_0x6e70('0x1e')]();});}};}function handleEntityNotFound(_0x50da2c,_0x10fc91){return function(_0x538b9c){if(!_0x538b9c){_0x50da2c['sendStatus'](0x194);}return _0x538b9c;};}function handleError(_0x4e97c7,_0x41e352){_0x41e352=_0x41e352||0x1f4;return function(_0x19c5ae){logger['error'](_0x19c5ae[_0x6e70('0x28')]);if(_0x19c5ae[_0x6e70('0x29')]){delete _0x19c5ae['name'];}_0x4e97c7[_0x6e70('0x1d')](_0x41e352)[_0x6e70('0x2a')](_0x19c5ae);};}exports[_0x6e70('0x2b')]=function(_0x4a67ac,_0x54a5fe){var _0x2c4d37={},_0x3af17f={},_0x83c836={'count':0x0,'rows':[]};var _0x114344=_[_0x6e70('0x2c')](db['VoiceTransferReport'][_0x6e70('0x2d')],function(_0x406f29){return{'name':_0x406f29[_0x6e70('0x2e')],'type':_0x406f29[_0x6e70('0x2f')][_0x6e70('0x30')]};});_0x3af17f[_0x6e70('0x31')]=_[_0x6e70('0x2c')](_0x114344,_0x6e70('0x29'));_0x3af17f[_0x6e70('0x32')]=_[_0x6e70('0x33')](_0x4a67ac['query']);_0x3af17f[_0x6e70('0x34')]=_['intersection'](_0x3af17f[_0x6e70('0x31')],_0x3af17f['query']);_0x2c4d37[_0x6e70('0x35')]=_[_0x6e70('0x36')](_0x3af17f[_0x6e70('0x31')],qs['fields'](_0x4a67ac[_0x6e70('0x32')][_0x6e70('0x37')]));_0x2c4d37['attributes']=_0x2c4d37[_0x6e70('0x35')][_0x6e70('0x38')]?_0x2c4d37['attributes']:_0x3af17f[_0x6e70('0x31')];if(!_0x4a67ac[_0x6e70('0x32')][_0x6e70('0x39')](_0x6e70('0x3a'))){_0x2c4d37[_0x6e70('0x20')]=qs[_0x6e70('0x20')](_0x4a67ac[_0x6e70('0x32')][_0x6e70('0x20')]);_0x2c4d37[_0x6e70('0x3b')]=qs[_0x6e70('0x3b')](_0x4a67ac['query'][_0x6e70('0x3b')]);}_0x2c4d37['order']=qs[_0x6e70('0x3c')](_0x4a67ac[_0x6e70('0x32')][_0x6e70('0x3c')]);_0x2c4d37[_0x6e70('0x3d')]=qs[_0x6e70('0x34')](_[_0x6e70('0x3e')](_0x4a67ac[_0x6e70('0x32')],_0x3af17f[_0x6e70('0x34')]));if(_0x4a67ac[_0x6e70('0x32')][_0x6e70('0x3f')]){_0x2c4d37[_0x6e70('0x3d')]=_[_0x6e70('0x40')](_0x2c4d37[_0x6e70('0x3d')],{'$or':_['map'](_0x114344,function(_0x5446a2){if(_0x5446a2['type']!==_0x6e70('0x41')){var _0x3841a0={};_0x3841a0[_0x5446a2[_0x6e70('0x29')]]={'$like':'%'+_0x4a67ac[_0x6e70('0x32')][_0x6e70('0x3f')]+'%'};return _0x3841a0;}})});}_0x2c4d37=_[_0x6e70('0x40')]({},_0x2c4d37,_0x4a67ac['options']);var _0x3b508c={'where':_0x2c4d37[_0x6e70('0x3d')]};return db[_0x6e70('0x42')][_0x6e70('0x1f')](_0x3b508c)[_0x6e70('0x27')](function(_0x37bf46){_0x83c836[_0x6e70('0x1f')]=_0x37bf46;if(_0x4a67ac[_0x6e70('0x32')]['includeAll']){_0x2c4d37[_0x6e70('0x43')]=[{'all':!![]}];}return db[_0x6e70('0x42')][_0x6e70('0x44')](_0x2c4d37);})[_0x6e70('0x27')](function(_0x201da9){_0x83c836[_0x6e70('0x45')]=_0x201da9;return _0x83c836;})[_0x6e70('0x27')](respondWithFilteredResult(_0x54a5fe,_0x2c4d37))['catch'](handleError(_0x54a5fe,null));};exports['show']=function(_0x5ae898,_0x154e0c){var _0x2b63cc={'raw':!![],'where':{'id':_0x5ae898[_0x6e70('0x46')]['id']}},_0x83847b={};_0x83847b[_0x6e70('0x31')]=_['keys'](db[_0x6e70('0x42')][_0x6e70('0x2d')]);_0x83847b[_0x6e70('0x32')]=_['keys'](_0x5ae898['query']);_0x83847b['filters']=_[_0x6e70('0x36')](_0x83847b['model'],_0x83847b[_0x6e70('0x32')]);_0x2b63cc[_0x6e70('0x35')]=_[_0x6e70('0x36')](_0x83847b[_0x6e70('0x31')],qs['fields'](_0x5ae898[_0x6e70('0x32')]['fields']));_0x2b63cc[_0x6e70('0x35')]=_0x2b63cc[_0x6e70('0x35')][_0x6e70('0x38')]?_0x2b63cc[_0x6e70('0x35')]:_0x83847b['model'];if(_0x5ae898[_0x6e70('0x32')][_0x6e70('0x47')]){_0x2b63cc[_0x6e70('0x43')]=[{'all':!![]}];}_0x2b63cc=_[_0x6e70('0x40')]({},_0x2b63cc,_0x5ae898[_0x6e70('0x48')]);return db[_0x6e70('0x42')][_0x6e70('0x49')](_0x2b63cc)['then'](handleEntityNotFound(_0x154e0c,null))[_0x6e70('0x27')](respondWithResult(_0x154e0c,null))[_0x6e70('0x4a')](handleError(_0x154e0c,null));};exports[_0x6e70('0x4b')]=function(_0x2f99cb,_0x3f86cf){return db[_0x6e70('0x42')][_0x6e70('0x4b')](_0x2f99cb['body'],{})[_0x6e70('0x27')](respondWithResult(_0x3f86cf,0xc9))['catch'](handleError(_0x3f86cf,null));};exports[_0x6e70('0x26')]=function(_0x3836e4,_0x4b351e){if(_0x3836e4['body']['id']){delete _0x3836e4[_0x6e70('0x4c')]['id'];}return db[_0x6e70('0x42')][_0x6e70('0x49')]({'where':{'id':_0x3836e4['params']['id']}})['then'](handleEntityNotFound(_0x4b351e,null))[_0x6e70('0x27')](saveUpdates(_0x3836e4[_0x6e70('0x4c')],null))[_0x6e70('0x27')](respondWithResult(_0x4b351e,null))[_0x6e70('0x4a')](handleError(_0x4b351e,null));};exports[_0x6e70('0x4d')]=function(_0x340674,_0x4ad5a9){return db[_0x6e70('0x42')][_0x6e70('0x49')]({'where':{'id':_0x340674[_0x6e70('0x46')]['id']}})[_0x6e70('0x27')](handleEntityNotFound(_0x4ad5a9,null))[_0x6e70('0x27')](removeEntity(_0x4ad5a9,null))['catch'](handleError(_0x4ad5a9,null));};
\ No newline at end of file
diff --git a/server/api/voiceTransferReport/voiceTransferReport.model.js b/server/api/voiceTransferReport/voiceTransferReport.model.js
index 3aa10c7..21800c8 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 _0xeef7=['../../config/environment','./voiceTransferReport.attributes','define','VoiceTransferReport','report_call_transfer','lodash','util','api','moment','rimraf'];(function(_0x5a5b4a,_0x2b62ae){var _0x503597=function(_0x3fd01e){while(--_0x3fd01e){_0x5a5b4a['push'](_0x5a5b4a['shift']());}};_0x503597(++_0x2b62ae);}(_0xeef7,0x7d));var _0x7eef=function(_0x2b0aab,_0x3e4b03){_0x2b0aab=_0x2b0aab-0x0;var _0x1e07c0=_0xeef7[_0x2b0aab];return _0x1e07c0;};'use strict';var _=require(_0x7eef('0x0'));var util=require(_0x7eef('0x1'));var logger=require('../../config/logger')(_0x7eef('0x2'));var moment=require(_0x7eef('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x7eef('0x4'));var config=require(_0x7eef('0x5'));var attributes=require(_0x7eef('0x6'));module['exports']=function(_0x50a702,_0x57b90c){return _0x50a702[_0x7eef('0x7')](_0x7eef('0x8'),attributes,{'tableName':_0x7eef('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcc81=['exports','define','VoiceTransferReport','report_call_transfer','lodash','api','moment','bluebird','request-promise','path','rimraf','./voiceTransferReport.attributes'];(function(_0x41f15f,_0x1a39ef){var _0x269a71=function(_0x52c50e){while(--_0x52c50e){_0x41f15f['push'](_0x41f15f['shift']());}};_0x269a71(++_0x1a39ef);}(_0xcc81,0x19c));var _0x1cc8=function(_0x1892f9,_0x2cb4ab){_0x1892f9=_0x1892f9-0x0;var _0x5a765f=_0xcc81[_0x1892f9];return _0x5a765f;};'use strict';var _=require(_0x1cc8('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x1cc8('0x1'));var moment=require(_0x1cc8('0x2'));var BPromise=require(_0x1cc8('0x3'));var rp=require(_0x1cc8('0x4'));var fs=require('fs');var path=require(_0x1cc8('0x5'));var rimraf=require(_0x1cc8('0x6'));var config=require('../../config/environment');var attributes=require(_0x1cc8('0x7'));module[_0x1cc8('0x8')]=function(_0x577f88,_0x434432){return _0x577f88[_0x1cc8('0x9')](_0x1cc8('0xa'),attributes,{'tableName':_0x1cc8('0xb'),'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 9a0c64d..67b3de8 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 _0x6fe9=['../../config/logger','rpc','../../config/environment','client','http','request','then','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','CreateVoiceTransferReport','VoiceTransferReport','create','body','options','raw','catch','moment','randomstring','../../config/utils'];(function(_0x3ae900,_0x46e413){var _0x98b448=function(_0xc6a52b){while(--_0xc6a52b){_0x3ae900['push'](_0x3ae900['shift']());}};_0x98b448(++_0x46e413);}(_0x6fe9,0xe7));var _0x96fe=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0x6fe9[_0xb0f7c3];return _0x28ea68;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x96fe('0x0'));var BPromise=require('bluebird');var rs=require(_0x96fe('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x96fe('0x2'));var logger=require(_0x96fe('0x3'))(_0x96fe('0x4'));var config=require(_0x96fe('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x96fe('0x6')][_0x96fe('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1e8abd,_0x14d38e,_0x3dd775){return new BPromise(function(_0x238fa1,_0x119af9){return client[_0x96fe('0x8')](_0x1e8abd,_0x3dd775)[_0x96fe('0x9')](function(_0x4d730e){logger[_0x96fe('0xa')](_0x96fe('0xb'),_0x14d38e,_0x96fe('0xc'));logger[_0x96fe('0xd')]('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x14d38e,_0x96fe('0xc'),JSON[_0x96fe('0xe')](_0x4d730e));if(_0x4d730e['error']){if(_0x4d730e[_0x96fe('0xf')][_0x96fe('0x10')]===0x1f4){logger[_0x96fe('0xf')](_0x96fe('0xb'),_0x14d38e,_0x4d730e[_0x96fe('0xf')]['message']);return _0x119af9(_0x4d730e[_0x96fe('0xf')][_0x96fe('0x11')]);}logger[_0x96fe('0xf')](_0x96fe('0xb'),_0x14d38e,_0x4d730e['error'][_0x96fe('0x11')]);return _0x238fa1(_0x4d730e[_0x96fe('0xf')][_0x96fe('0x11')]);}else{logger[_0x96fe('0xa')](_0x96fe('0xb'),_0x14d38e,_0x96fe('0xc'));_0x238fa1(_0x4d730e[_0x96fe('0x12')][_0x96fe('0x11')]);}})['catch'](function(_0xc477e9){logger['error'](_0x96fe('0xb'),_0x14d38e,_0xc477e9);_0x119af9(_0xc477e9);});});}exports[_0x96fe('0x13')]=function(_0x3a7abe){var _0x1a323a=this;return new Promise(function(_0x556f43,_0x2c0a2c){return db[_0x96fe('0x14')][_0x96fe('0x15')](_0x3a7abe[_0x96fe('0x16')],{'raw':_0x3a7abe['options']?_0x3a7abe[_0x96fe('0x17')][_0x96fe('0x18')]===undefined?!![]:![]:!![]})[_0x96fe('0x9')](function(_0x4aeb42){logger[_0x96fe('0xa')](_0x96fe('0x13'),_0x3a7abe);logger['debug'](_0x96fe('0x13'),_0x3a7abe,JSON[_0x96fe('0xe')](_0x4aeb42));_0x556f43(_0x4aeb42);})[_0x96fe('0x19')](function(_0x524f75){logger['error'](_0x96fe('0x13'),_0x524f75[_0x96fe('0x11')],_0x3a7abe);_0x2c0a2c(_0x1a323a[_0x96fe('0xf')](0x1f4,_0x524f75[_0x96fe('0x11')]));});});};
\ No newline at end of file
+var _0x5de0=['lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','VoiceTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','CreateVoiceTransferReport','VoiceTransferReport','body','options','catch'];(function(_0x41cfd4,_0x1ed2cc){var _0x190f48=function(_0x4b5b1a){while(--_0x4b5b1a){_0x41cfd4['push'](_0x41cfd4['shift']());}};_0x190f48(++_0x1ed2cc);}(_0x5de0,0x14a));var _0x05de=function(_0x211b93,_0x3754f0){_0x211b93=_0x211b93-0x0;var _0x2e9d7a=_0x5de0[_0x211b93];return _0x2e9d7a;};'use strict';var _=require(_0x05de('0x0'));var util=require(_0x05de('0x1'));var moment=require(_0x05de('0x2'));var BPromise=require(_0x05de('0x3'));var rs=require(_0x05de('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x05de('0x5'))['db'];var utils=require(_0x05de('0x6'));var logger=require(_0x05de('0x7'))(_0x05de('0x8'));var config=require(_0x05de('0x9'));var jayson=require(_0x05de('0xa'));var client=jayson[_0x05de('0xb')][_0x05de('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x27a573,_0x4b37fe,_0xdebfc5){return new BPromise(function(_0x17198a,_0x1a52df){return client[_0x05de('0xd')](_0x27a573,_0xdebfc5)[_0x05de('0xe')](function(_0x48c061){logger['info'](_0x05de('0xf'),_0x4b37fe,_0x05de('0x10'));logger[_0x05de('0x11')](_0x05de('0x12'),_0x4b37fe,_0x05de('0x10'),JSON[_0x05de('0x13')](_0x48c061));if(_0x48c061[_0x05de('0x14')]){if(_0x48c061[_0x05de('0x14')][_0x05de('0x15')]===0x1f4){logger['error']('VoiceTransferReport,\x20%s,\x20%s',_0x4b37fe,_0x48c061[_0x05de('0x14')][_0x05de('0x16')]);return _0x1a52df(_0x48c061['error'][_0x05de('0x16')]);}logger[_0x05de('0x14')]('VoiceTransferReport,\x20%s,\x20%s',_0x4b37fe,_0x48c061[_0x05de('0x14')][_0x05de('0x16')]);return _0x17198a(_0x48c061['error'][_0x05de('0x16')]);}else{logger[_0x05de('0x17')](_0x05de('0xf'),_0x4b37fe,_0x05de('0x10'));_0x17198a(_0x48c061[_0x05de('0x18')][_0x05de('0x16')]);}})['catch'](function(_0x144db6){logger[_0x05de('0x14')]('VoiceTransferReport,\x20%s,\x20%s',_0x4b37fe,_0x144db6);_0x1a52df(_0x144db6);});});}exports[_0x05de('0x19')]=function(_0x20164c){var _0x59d011=this;return new Promise(function(_0x14cd00,_0x481a45){return db[_0x05de('0x1a')]['create'](_0x20164c[_0x05de('0x1b')],{'raw':_0x20164c[_0x05de('0x1c')]?_0x20164c[_0x05de('0x1c')]['raw']===undefined?!![]:![]:!![]})[_0x05de('0xe')](function(_0x4633cc){logger[_0x05de('0x17')](_0x05de('0x19'),_0x20164c);logger[_0x05de('0x11')](_0x05de('0x19'),_0x20164c,JSON[_0x05de('0x13')](_0x4633cc));_0x14cd00(_0x4633cc);})[_0x05de('0x1d')](function(_0x4398ed){logger[_0x05de('0x14')](_0x05de('0x19'),_0x4398ed[_0x05de('0x16')],_0x20164c);_0x481a45(_0x59d011[_0x05de('0x14')](0x1f4,_0x4398ed[_0x05de('0x16')]));});});};
\ No newline at end of file
diff --git a/server/api/webbar/index.js b/server/api/webbar/index.js
index 92c4c70..47f064b 100644
--- a/server/api/webbar/index.js
+++ b/server/api/webbar/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8e94=['answer','/hold','hold','unhold','/calls','calls','/transfer','exports','express','Router','./webbar.controller','/originate','canUpdate','isAuthenticated','post'];(function(_0x498c78,_0x2eab48){var _0xb7697f=function(_0x1f6da7){while(--_0x1f6da7){_0x498c78['push'](_0x498c78['shift']());}};_0xb7697f(++_0x2eab48);}(_0x8e94,0xf8));var _0x48e9=function(_0x13f2ec,_0x407206){_0x13f2ec=_0x13f2ec-0x0;var _0x389ca9=_0x8e94[_0x13f2ec];return _0x389ca9;};'use strict';var express=require(_0x48e9('0x0'));var router=express[_0x48e9('0x1')]();var auth=require('../../components/auth/service');var controller=require(_0x48e9('0x2'));router['post'](_0x48e9('0x3'),auth['isAuthenticated'](),auth[_0x48e9('0x4')](),controller['originate']);router['post']('/hangup',auth[_0x48e9('0x5')](),auth[_0x48e9('0x4')](),controller['hangup']);router[_0x48e9('0x6')]('/answer',auth[_0x48e9('0x5')](),auth['canUpdate'](),controller[_0x48e9('0x7')]);router[_0x48e9('0x6')](_0x48e9('0x8'),auth[_0x48e9('0x5')](),auth['canUpdate'](),controller[_0x48e9('0x9')]);router[_0x48e9('0x6')]('/unhold',auth[_0x48e9('0x5')](),auth['canUpdate'](),controller[_0x48e9('0xa')]);router[_0x48e9('0x6')](_0x48e9('0xb'),auth[_0x48e9('0x5')](),auth[_0x48e9('0x4')](),controller[_0x48e9('0xc')]);router['post'](_0x48e9('0xd'),auth[_0x48e9('0x5')](),auth[_0x48e9('0x4')](),controller['transfer']);module[_0x48e9('0xe')]=router;
\ No newline at end of file
+var _0x12c9=['hold','/unhold','unhold','/calls','calls','/transfer','transfer','express','Router','../../components/auth/service','./webbar.controller','post','isAuthenticated','canUpdate','originate','/hangup','hangup','/answer'];(function(_0x398f94,_0x51c708){var _0x1ab4a5=function(_0x3dd4ad){while(--_0x3dd4ad){_0x398f94['push'](_0x398f94['shift']());}};_0x1ab4a5(++_0x51c708);}(_0x12c9,0x1c9));var _0x912c=function(_0x54a8db,_0x10a6ad){_0x54a8db=_0x54a8db-0x0;var _0x36ceca=_0x12c9[_0x54a8db];return _0x36ceca;};'use strict';var express=require(_0x912c('0x0'));var router=express[_0x912c('0x1')]();var auth=require(_0x912c('0x2'));var controller=require(_0x912c('0x3'));router[_0x912c('0x4')]('/originate',auth[_0x912c('0x5')](),auth[_0x912c('0x6')](),controller[_0x912c('0x7')]);router[_0x912c('0x4')](_0x912c('0x8'),auth['isAuthenticated'](),auth['canUpdate'](),controller[_0x912c('0x9')]);router[_0x912c('0x4')](_0x912c('0xa'),auth[_0x912c('0x5')](),auth[_0x912c('0x6')](),controller['answer']);router[_0x912c('0x4')]('/hold',auth[_0x912c('0x5')](),auth['canUpdate'](),controller[_0x912c('0xb')]);router['post'](_0x912c('0xc'),auth['isAuthenticated'](),auth[_0x912c('0x6')](),controller[_0x912c('0xd')]);router['post'](_0x912c('0xe'),auth['isAuthenticated'](),auth[_0x912c('0x6')](),controller[_0x912c('0xf')]);router[_0x912c('0x4')](_0x912c('0x10'),auth[_0x912c('0x5')](),auth['canUpdate'](),controller[_0x912c('0x11')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/webbar/webbar.controller.js b/server/api/webbar/webbar.controller.js
index 6f260b8..4242ff9 100644
--- a/server/api/webbar/webbar.controller.js
+++ b/server/api/webbar/webbar.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac55=['stack','name','status','send','NotFound','request','then','error','message','catch','User','findOne','agent','VoiceChannels','filter','UserId','sessionId','length','sessionId\x20','originate','originate\x20fired:','body','userId','callNumber','callerId','callbackUrl','entityFound:','webbar:originate','originate\x20executed!','hangup','hangup\x20fired:','json','user:%s','webbar:hangup','answer','answer\x20fired:','webbar:answer','answer\x20executed!','hold','webbar:hold','hold\x20executed!','unhold','unhold\x20fired:','format','webbar:unhold','unhold\x20executed!','calls','conference','conference\x20fired:','webbar:conference','conference\x20executed!','transfer','transfer\x20fired:','transferNumber','webbar:transfer','transfer\x20executed!','path','lodash','../../mysqldb','../../config/environment','bluebird','jayson/promise','client','http','../../config/logger','webbarapi','ioredis','redis','localhost','socket.io-emitter','validate','number','userId\x20is\x20required','string','sessionId\x20is\x20required','transferNumber\x20is\x20required','info','stringify','log','handleError:'];(function(_0x1a4935,_0x5d410f){var _0x207ed3=function(_0x5c9e36){while(--_0x5c9e36){_0x1a4935['push'](_0x1a4935['shift']());}};_0x207ed3(++_0x5d410f);}(_0xac55,0x1c8));var _0x5ac5=function(_0x1fb265,_0x571796){_0x1fb265=_0x1fb265-0x0;var _0x542ec6=_0xac55[_0x1fb265];return _0x542ec6;};'use strict';var path=require(_0x5ac5('0x0'));var fs=require('fs');var _=require(_0x5ac5('0x1'));var db=require(_0x5ac5('0x2'))['db'];var config=require(_0x5ac5('0x3'));var util=require('util');var BPromise=require(_0x5ac5('0x4'));var jayson=require(_0x5ac5('0x5'));var amiClient=jayson[_0x5ac5('0x6')][_0x5ac5('0x7')]({'port':0x232a});var logger=require(_0x5ac5('0x8'))(_0x5ac5('0x9'));var Redis=require(_0x5ac5('0xa'));config['redis']=_['defaults'](config[_0x5ac5('0xb')],{'host':_0x5ac5('0xc'),'port':0x18eb});var io=require(_0x5ac5('0xd'))(new Redis(config[_0x5ac5('0xb')]));var Schema=require(_0x5ac5('0xe'));var originateValidation=new Schema({'userId':{'type':_0x5ac5('0xf'),'required':[!![],_0x5ac5('0x10')]},'callNumber':{'type':'string','required':[!![],'callNumber\x20is\x20required']},'callerId':{'type':_0x5ac5('0x11')},'callbackUrl':{'type':_0x5ac5('0x11')}});var hangupValidation=new Schema({'userId':{'type':'number','required':[!![],_0x5ac5('0x10')]},'sessionId':{'type':_0x5ac5('0x11'),'required':![]}});var answerValidation=new Schema({'userId':{'type':'number','required':[!![],_0x5ac5('0x10')]},'sessionId':{'type':_0x5ac5('0x11'),'required':![]}});var transferValidation=new Schema({'userId':{'type':'number','required':[!![],_0x5ac5('0x10')]},'sessionId':{'type':_0x5ac5('0x11'),'required':[!![],_0x5ac5('0x12')]},'transferNumber':{'type':_0x5ac5('0x11'),'required':[!![],_0x5ac5('0x13')]}});var holdValidation=new Schema({'userId':{'type':'number','required':[!![],_0x5ac5('0x10')]},'sessionId':{'type':'string','required':![]}});var unholdValidation=new Schema({'userId':{'type':_0x5ac5('0xf'),'required':[!![],_0x5ac5('0x10')]},'sessionId':{'type':'string','required':![]}});var callsValidation=new Schema({'userId':{'type':_0x5ac5('0xf'),'required':[!![],'userId\x20is\x20required']}});var conferenceValidation=new Schema({'userId':{'type':_0x5ac5('0xf'),'required':[!![],_0x5ac5('0x10')]}});function emit(_0x30244d,_0x1282be,_0x34a95e){logger[_0x5ac5('0x14')](_0x30244d,_0x1282be,JSON[_0x5ac5('0x15')](_0x34a95e));io['to'](_0x30244d)['emit'](_0x1282be,_0x34a95e);}function handleError(_0x4e186a){return function(_0x5364a6){console[_0x5ac5('0x16')](_0x5ac5('0x17'),_0x5364a6,_0x5364a6 instanceof RangeError);logger['error'](_0x5364a6[_0x5ac5('0x18')]);if(_0x5364a6 instanceof RangeError){if(_0x5364a6['name']){delete _0x5364a6[_0x5ac5('0x19')];}_0x4e186a['status'](0x194)['send'](_0x5364a6);}else{if(_0x5364a6[_0x5ac5('0x19')]){delete _0x5364a6['name'];}_0x4e186a[_0x5ac5('0x1a')](0x1f4)[_0x5ac5('0x1b')](_0x5364a6);}};}function checkError(){return function(_0x5c21d8){if(!_0x5c21d8){throw new RangeError(_0x5ac5('0x1c'));}return _0x5c21d8;};}function respondWithRpcPromise(_0x4ac526,_0x29a44c){return new BPromise(function(_0x40bdbc,_0x47993e){var _0x47a898=amiClient;return _0x47a898[_0x5ac5('0x1d')](_0x4ac526,_0x29a44c)[_0x5ac5('0x1e')](function(_0x400308){if(_0x400308[_0x5ac5('0x1f')]){if(_0x400308[_0x5ac5('0x1f')]['code']===0x1f4){return _0x47993e(_0x400308[_0x5ac5('0x1f')][_0x5ac5('0x20')]);}return _0x40bdbc(_0x400308[_0x5ac5('0x1f')][_0x5ac5('0x20')]);}else{_0x40bdbc(_0x400308['result']);}})[_0x5ac5('0x21')](function(_0x4eda97){_0x47993e(_0x4eda97);});});}function getAgent(_0x17c507){return db[_0x5ac5('0x22')][_0x5ac5('0x23')]({'where':{'id':_0x17c507,'role':_0x5ac5('0x24')}})[_0x5ac5('0x1e')](checkError());}function getAgentCheckSession(_0x3b3ec0,_0x5ce67c){return new BPromise(function(_0x31f9cc,_0x4a5f4d){var _0x24e8c7=respondWithRpcPromise(_0x5ac5('0x25'));var _0x35535f=getAgent(_0x3b3ec0);Promise['all']([_0x24e8c7,_0x35535f])[_0x5ac5('0x1e')](function(_0x229941){var _0x21df31=_0x229941[0x0];var _0x21307c=_0x229941[0x1];var _0x4eafa1=_[_0x5ac5('0x26')](_0x21df31['rows'],function(_0x3414ba){return _0x3414ba[_0x5ac5('0x27')]==_0x21307c['id']&&_0x3414ba[_0x5ac5('0x28')]==_0x5ce67c;});if(_0x4eafa1[_0x5ac5('0x29')]==0x1){_0x31f9cc(_0x21307c);}else{_0x4a5f4d(new RangeError(_0x5ac5('0x2a')+_0x5ce67c+'\x20not\x20found!'));}});});}exports[_0x5ac5('0x2b')]=function(_0x21116,_0x36285d){logger['info'](_0x5ac5('0x2c'),_0x21116['body']);var _0x472782=originateValidation[_0x5ac5('0xe')](_0x21116[_0x5ac5('0x2d')]);if(_0x472782[_0x5ac5('0x29')]>0x0){return _0x36285d[_0x5ac5('0x1a')](0x190)['json'](_0x472782);}var _0x39a895=_0x21116['body'][_0x5ac5('0x2e')];var _0x5ae4af=_0x21116[_0x5ac5('0x2d')][_0x5ac5('0x2f')];var _0x47a5d8=_0x21116[_0x5ac5('0x2d')][_0x5ac5('0x30')];var _0x585e4b=_0x21116['body'][_0x5ac5('0x31')];return getAgent(_0x39a895)[_0x5ac5('0x1e')](function(_0x243204){logger[_0x5ac5('0x14')](_0x5ac5('0x32'),_0x243204[_0x5ac5('0x19')]);emit(util['format']('user:%s',_0x243204['name']),_0x5ac5('0x33'),{'callNumber':_0x5ae4af,'callerId':_0x47a5d8,'callbackUrl':_0x585e4b});return _0x36285d[_0x5ac5('0x1a')](0xc8)['json']({'error':![],'message':_0x5ac5('0x34')});})[_0x5ac5('0x21')](handleError(_0x36285d));};exports[_0x5ac5('0x35')]=function(_0x38667d,_0x46290f){logger[_0x5ac5('0x14')](_0x5ac5('0x36'),_0x38667d[_0x5ac5('0x2d')]);var _0x2d726e=hangupValidation['validate'](_0x38667d[_0x5ac5('0x2d')]);if(_0x2d726e['length']>0x0){return _0x46290f[_0x5ac5('0x1a')](0x190)[_0x5ac5('0x37')](_0x2d726e);}var _0x1ca0f0=_0x38667d[_0x5ac5('0x2d')][_0x5ac5('0x2e')];var _0x1ec79a=_0x38667d[_0x5ac5('0x2d')][_0x5ac5('0x28')];return getAgent(_0x1ca0f0)[_0x5ac5('0x1e')](function(_0x5105fc){logger[_0x5ac5('0x14')](_0x5ac5('0x32'),_0x5105fc['name']);emit(util['format'](_0x5ac5('0x38'),_0x5105fc['name']),_0x5ac5('0x39'),{'sessionId':_0x1ec79a});return _0x46290f[_0x5ac5('0x1a')](0xc8)['json']({'error':![],'message':'hangup\x20executed!'});})[_0x5ac5('0x21')](handleError(_0x46290f));};exports[_0x5ac5('0x3a')]=function(_0x32cc92,_0x1475b0){logger[_0x5ac5('0x14')](_0x5ac5('0x3b'),_0x32cc92[_0x5ac5('0x2d')]);var _0x5a86a0=answerValidation[_0x5ac5('0xe')](_0x32cc92[_0x5ac5('0x2d')]);if(_0x5a86a0[_0x5ac5('0x29')]>0x0){return _0x1475b0[_0x5ac5('0x1a')](0x190)[_0x5ac5('0x37')](_0x5a86a0);}var _0x3abf39=_0x32cc92['body'][_0x5ac5('0x2e')];var _0x24657d=_0x32cc92[_0x5ac5('0x2d')][_0x5ac5('0x28')];return getAgent(_0x3abf39)['then'](function(_0x228179){logger[_0x5ac5('0x14')](_0x5ac5('0x32'),_0x228179['name']);emit(util['format'](_0x5ac5('0x38'),_0x228179[_0x5ac5('0x19')]),_0x5ac5('0x3c'),{'sessionId':_0x24657d});return _0x1475b0[_0x5ac5('0x1a')](0xc8)['json']({'error':![],'message':_0x5ac5('0x3d')});})['catch'](handleError(_0x1475b0));};exports[_0x5ac5('0x3e')]=function(_0x3dfeba,_0x4d90cf){logger[_0x5ac5('0x14')]('hold\x20fired:',_0x3dfeba[_0x5ac5('0x2d')]);var _0x3f26e0=holdValidation[_0x5ac5('0xe')](_0x3dfeba['body']);if(_0x3f26e0['length']>0x0){return _0x4d90cf[_0x5ac5('0x1a')](0x190)[_0x5ac5('0x37')](_0x3f26e0);}var _0xd6ae55=_0x3dfeba[_0x5ac5('0x2d')][_0x5ac5('0x2e')];var _0x3534ce=_0x3dfeba[_0x5ac5('0x2d')][_0x5ac5('0x28')];return getAgent(_0xd6ae55)[_0x5ac5('0x1e')](function(_0x536765){logger[_0x5ac5('0x14')](_0x5ac5('0x32'),_0x536765[_0x5ac5('0x19')]);emit(util['format']('user:%s',_0x536765[_0x5ac5('0x19')]),_0x5ac5('0x3f'),{'sessionId':_0x3534ce});return _0x4d90cf[_0x5ac5('0x1a')](0xc8)['json']({'error':![],'message':_0x5ac5('0x40')});})[_0x5ac5('0x21')](handleError(_0x4d90cf));};exports[_0x5ac5('0x41')]=function(_0x2a3396,_0x326f60){logger[_0x5ac5('0x14')](_0x5ac5('0x42'),_0x2a3396['body']);var _0x5ac4e3=unholdValidation['validate'](_0x2a3396[_0x5ac5('0x2d')]);if(_0x5ac4e3[_0x5ac5('0x29')]>0x0){return _0x326f60[_0x5ac5('0x1a')](0x190)['json'](_0x5ac4e3);}var _0x1973f6=_0x2a3396[_0x5ac5('0x2d')][_0x5ac5('0x2e')];var _0x286304=_0x2a3396[_0x5ac5('0x2d')]['sessionId'];return getAgent(_0x1973f6)['then'](function(_0x516ffd){logger[_0x5ac5('0x14')](_0x5ac5('0x32'),_0x516ffd[_0x5ac5('0x19')]);emit(util[_0x5ac5('0x43')](_0x5ac5('0x38'),_0x516ffd[_0x5ac5('0x19')]),_0x5ac5('0x44'),{'sessionId':_0x286304});return _0x326f60[_0x5ac5('0x1a')](0xc8)[_0x5ac5('0x37')]({'error':![],'message':_0x5ac5('0x45')});})[_0x5ac5('0x21')](handleError(_0x326f60));};exports[_0x5ac5('0x46')]=function(_0x447603,_0x252030){logger[_0x5ac5('0x14')]('calls\x20fired:',_0x252030[_0x5ac5('0x2d')]);var _0x360fb8=callsValidation['validate'](_0x447603[_0x5ac5('0x2d')]);if(_0x360fb8[_0x5ac5('0x29')]>0x0){return _0x252030[_0x5ac5('0x1a')](0x190)[_0x5ac5('0x37')](_0x360fb8);}var _0x316af1=_0x447603[_0x5ac5('0x2d')]['userId'];var _0x2b5329=respondWithRpcPromise(_0x5ac5('0x25'));var _0x424bed=getAgent(_0x316af1);return Promise['all']([_0x2b5329,_0x424bed])[_0x5ac5('0x1e')](function(_0x44e349){var _0x4dd8be=_0x44e349[0x0];var _0x1a6428=_0x44e349[0x1];var _0x3227dc=_['filter'](_0x4dd8be['rows'],function(_0x4d1346){return _0x4d1346[_0x5ac5('0x27')]==_0x1a6428['id'];});return _0x252030[_0x5ac5('0x1a')](0xc8)[_0x5ac5('0x37')]({'count':_0x3227dc[_0x5ac5('0x29')],'rows':_0x3227dc});})[_0x5ac5('0x21')](handleError(_0x252030));};exports[_0x5ac5('0x47')]=function(_0x4ee231,_0x75ca64){logger[_0x5ac5('0x14')](_0x5ac5('0x48'),_0x4ee231[_0x5ac5('0x2d')]);var _0x1f9b9b=conferenceValidation['validate'](_0x4ee231['body']);if(_0x1f9b9b['length']>0x0){return _0x75ca64[_0x5ac5('0x1a')](0x190)[_0x5ac5('0x37')](_0x1f9b9b);}var _0x334a1c=_0x4ee231[_0x5ac5('0x2d')]['userId'];return getAgent(_0x334a1c)[_0x5ac5('0x1e')](function(_0x38b128){logger[_0x5ac5('0x14')]('entityFound:',_0x38b128['name']);emit(util['format'](_0x5ac5('0x38'),_0x38b128[_0x5ac5('0x19')]),_0x5ac5('0x49'));return _0x75ca64[_0x5ac5('0x1a')](0xc8)[_0x5ac5('0x37')]({'error':![],'message':_0x5ac5('0x4a')});})['catch'](handleError(_0x75ca64));};exports[_0x5ac5('0x4b')]=function(_0x5532d6,_0x492179){logger[_0x5ac5('0x14')](_0x5ac5('0x4c'),_0x5532d6[_0x5ac5('0x2d')]);var _0x324ec9=transferValidation[_0x5ac5('0xe')](_0x5532d6[_0x5ac5('0x2d')]);if(_0x324ec9[_0x5ac5('0x29')]>0x0){return _0x492179[_0x5ac5('0x1a')](0x190)[_0x5ac5('0x37')](_0x324ec9);}var _0x130c67=_0x5532d6[_0x5ac5('0x2d')][_0x5ac5('0x2e')];var _0x299b02=_0x5532d6[_0x5ac5('0x2d')][_0x5ac5('0x28')];var _0x46315b=_0x5532d6[_0x5ac5('0x2d')][_0x5ac5('0x4d')];return getAgent(_0x130c67)[_0x5ac5('0x1e')](function(_0xc95ae5){logger[_0x5ac5('0x14')]('entityFound:',_0xc95ae5[_0x5ac5('0x19')]);emit(util['format'](_0x5ac5('0x38'),_0xc95ae5['name']),_0x5ac5('0x4e'),{'sessionId':_0x299b02,'transferNumber':_0x46315b});return _0x492179['status'](0xc8)['json']({'error':![],'message':_0x5ac5('0x4f')});})['catch'](handleError(_0x492179));};
\ No newline at end of file
+var _0x6208=['number','userId\x20is\x20required','string','callNumber\x20is\x20required','sessionId\x20is\x20required','transferNumber\x20is\x20required','info','emit','log','handleError:','error','stack','name','status','send','NotFound','request','then','code','message','catch','findOne','agent','VoiceChannels','all','filter','UserId','sessionId','length','sessionId\x20','\x20not\x20found!','originate\x20fired:','body','callNumber','callerId','callbackUrl','entityFound:','user:%s','webbar:originate','json','originate\x20executed!','hangup','hangup\x20fired:','userId','answer','webbar:answer','answer\x20executed!','hold\x20fired:','webbar:hold','hold\x20executed!','unhold','unhold\x20fired:','webbar:unhold','unhold\x20executed!','calls','calls\x20fired:','rows','conference','conference\x20fired:','format','webbar:conference','conference\x20executed!','transfer','webbar:transfer','transfer\x20executed!','path','../../mysqldb','../../config/environment','bluebird','client','http','../../config/logger','webbarapi','ioredis','redis','defaults','localhost','socket.io-emitter','validate'];(function(_0xdac62f,_0x437a7e){var _0x53b732=function(_0x4fc310){while(--_0x4fc310){_0xdac62f['push'](_0xdac62f['shift']());}};_0x53b732(++_0x437a7e);}(_0x6208,0x17d));var _0x8620=function(_0x25bca6,_0xe415ea){_0x25bca6=_0x25bca6-0x0;var _0x3f8d02=_0x6208[_0x25bca6];return _0x3f8d02;};'use strict';var path=require(_0x8620('0x0'));var fs=require('fs');var _=require('lodash');var db=require(_0x8620('0x1'))['db'];var config=require(_0x8620('0x2'));var util=require('util');var BPromise=require(_0x8620('0x3'));var jayson=require('jayson/promise');var amiClient=jayson[_0x8620('0x4')][_0x8620('0x5')]({'port':0x232a});var logger=require(_0x8620('0x6'))(_0x8620('0x7'));var Redis=require(_0x8620('0x8'));config[_0x8620('0x9')]=_[_0x8620('0xa')](config['redis'],{'host':_0x8620('0xb'),'port':0x18eb});var io=require(_0x8620('0xc'))(new Redis(config[_0x8620('0x9')]));var Schema=require(_0x8620('0xd'));var originateValidation=new Schema({'userId':{'type':_0x8620('0xe'),'required':[!![],_0x8620('0xf')]},'callNumber':{'type':_0x8620('0x10'),'required':[!![],_0x8620('0x11')]},'callerId':{'type':_0x8620('0x10')},'callbackUrl':{'type':'string'}});var hangupValidation=new Schema({'userId':{'type':_0x8620('0xe'),'required':[!![],_0x8620('0xf')]},'sessionId':{'type':'string','required':![]}});var answerValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8620('0xf')]},'sessionId':{'type':_0x8620('0x10'),'required':![]}});var transferValidation=new Schema({'userId':{'type':_0x8620('0xe'),'required':[!![],_0x8620('0xf')]},'sessionId':{'type':_0x8620('0x10'),'required':[!![],_0x8620('0x12')]},'transferNumber':{'type':'string','required':[!![],_0x8620('0x13')]}});var holdValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8620('0xf')]},'sessionId':{'type':_0x8620('0x10'),'required':![]}});var unholdValidation=new Schema({'userId':{'type':_0x8620('0xe'),'required':[!![],_0x8620('0xf')]},'sessionId':{'type':'string','required':![]}});var callsValidation=new Schema({'userId':{'type':_0x8620('0xe'),'required':[!![],_0x8620('0xf')]}});var conferenceValidation=new Schema({'userId':{'type':'number','required':[!![],'userId\x20is\x20required']}});function emit(_0x213668,_0x12fe8d,_0x597e21){logger[_0x8620('0x14')](_0x213668,_0x12fe8d,JSON['stringify'](_0x597e21));io['to'](_0x213668)[_0x8620('0x15')](_0x12fe8d,_0x597e21);}function handleError(_0x10b053){return function(_0x114e25){console[_0x8620('0x16')](_0x8620('0x17'),_0x114e25,_0x114e25 instanceof RangeError);logger[_0x8620('0x18')](_0x114e25[_0x8620('0x19')]);if(_0x114e25 instanceof RangeError){if(_0x114e25[_0x8620('0x1a')]){delete _0x114e25[_0x8620('0x1a')];}_0x10b053[_0x8620('0x1b')](0x194)[_0x8620('0x1c')](_0x114e25);}else{if(_0x114e25[_0x8620('0x1a')]){delete _0x114e25[_0x8620('0x1a')];}_0x10b053[_0x8620('0x1b')](0x1f4)[_0x8620('0x1c')](_0x114e25);}};}function checkError(){return function(_0x186878){if(!_0x186878){throw new RangeError(_0x8620('0x1d'));}return _0x186878;};}function respondWithRpcPromise(_0x1c1780,_0x2cc7d0){return new BPromise(function(_0x88ef0f,_0x49334a){var _0xa63ba9=amiClient;return _0xa63ba9[_0x8620('0x1e')](_0x1c1780,_0x2cc7d0)[_0x8620('0x1f')](function(_0x3fb864){if(_0x3fb864[_0x8620('0x18')]){if(_0x3fb864[_0x8620('0x18')][_0x8620('0x20')]===0x1f4){return _0x49334a(_0x3fb864[_0x8620('0x18')][_0x8620('0x21')]);}return _0x88ef0f(_0x3fb864['error']['message']);}else{_0x88ef0f(_0x3fb864['result']);}})[_0x8620('0x22')](function(_0x35ebda){_0x49334a(_0x35ebda);});});}function getAgent(_0x451a9b){return db['User'][_0x8620('0x23')]({'where':{'id':_0x451a9b,'role':_0x8620('0x24')}})[_0x8620('0x1f')](checkError());}function getAgentCheckSession(_0x18ef1d,_0xe0e33){return new BPromise(function(_0x33819f,_0x520d9d){var _0x5e515c=respondWithRpcPromise(_0x8620('0x25'));var _0x524fc5=getAgent(_0x18ef1d);Promise[_0x8620('0x26')]([_0x5e515c,_0x524fc5])[_0x8620('0x1f')](function(_0x25e3c1){var _0x5c836b=_0x25e3c1[0x0];var _0x1c4169=_0x25e3c1[0x1];var _0x4c48c0=_[_0x8620('0x27')](_0x5c836b['rows'],function(_0x45bf71){return _0x45bf71[_0x8620('0x28')]==_0x1c4169['id']&&_0x45bf71[_0x8620('0x29')]==_0xe0e33;});if(_0x4c48c0[_0x8620('0x2a')]==0x1){_0x33819f(_0x1c4169);}else{_0x520d9d(new RangeError(_0x8620('0x2b')+_0xe0e33+_0x8620('0x2c')));}});});}exports['originate']=function(_0x4dd19d,_0x5d6693){logger['info'](_0x8620('0x2d'),_0x4dd19d[_0x8620('0x2e')]);var _0xb440cf=originateValidation['validate'](_0x4dd19d['body']);if(_0xb440cf['length']>0x0){return _0x5d6693[_0x8620('0x1b')](0x190)['json'](_0xb440cf);}var _0x4cf4da=_0x4dd19d['body']['userId'];var _0x132b39=_0x4dd19d[_0x8620('0x2e')][_0x8620('0x2f')];var _0x373071=_0x4dd19d[_0x8620('0x2e')][_0x8620('0x30')];var _0x202b91=_0x4dd19d[_0x8620('0x2e')][_0x8620('0x31')];return getAgent(_0x4cf4da)['then'](function(_0x21bf55){logger[_0x8620('0x14')](_0x8620('0x32'),_0x21bf55[_0x8620('0x1a')]);emit(util['format'](_0x8620('0x33'),_0x21bf55[_0x8620('0x1a')]),_0x8620('0x34'),{'callNumber':_0x132b39,'callerId':_0x373071,'callbackUrl':_0x202b91});return _0x5d6693[_0x8620('0x1b')](0xc8)[_0x8620('0x35')]({'error':![],'message':_0x8620('0x36')});})[_0x8620('0x22')](handleError(_0x5d6693));};exports[_0x8620('0x37')]=function(_0x3aee4a,_0x27f7f3){logger[_0x8620('0x14')](_0x8620('0x38'),_0x3aee4a[_0x8620('0x2e')]);var _0x362976=hangupValidation[_0x8620('0xd')](_0x3aee4a[_0x8620('0x2e')]);if(_0x362976['length']>0x0){return _0x27f7f3[_0x8620('0x1b')](0x190)[_0x8620('0x35')](_0x362976);}var _0x54fb16=_0x3aee4a['body'][_0x8620('0x39')];var _0x1dd5ec=_0x3aee4a[_0x8620('0x2e')][_0x8620('0x29')];return getAgent(_0x54fb16)[_0x8620('0x1f')](function(_0x4cc173){logger[_0x8620('0x14')](_0x8620('0x32'),_0x4cc173[_0x8620('0x1a')]);emit(util['format'](_0x8620('0x33'),_0x4cc173[_0x8620('0x1a')]),'webbar:hangup',{'sessionId':_0x1dd5ec});return _0x27f7f3[_0x8620('0x1b')](0xc8)[_0x8620('0x35')]({'error':![],'message':'hangup\x20executed!'});})[_0x8620('0x22')](handleError(_0x27f7f3));};exports[_0x8620('0x3a')]=function(_0x58fe38,_0x710867){logger[_0x8620('0x14')]('answer\x20fired:',_0x58fe38[_0x8620('0x2e')]);var _0x4b5430=answerValidation[_0x8620('0xd')](_0x58fe38[_0x8620('0x2e')]);if(_0x4b5430['length']>0x0){return _0x710867[_0x8620('0x1b')](0x190)['json'](_0x4b5430);}var _0x36e027=_0x58fe38[_0x8620('0x2e')][_0x8620('0x39')];var _0x4961da=_0x58fe38[_0x8620('0x2e')]['sessionId'];return getAgent(_0x36e027)[_0x8620('0x1f')](function(_0x35fe58){logger[_0x8620('0x14')](_0x8620('0x32'),_0x35fe58[_0x8620('0x1a')]);emit(util['format'](_0x8620('0x33'),_0x35fe58[_0x8620('0x1a')]),_0x8620('0x3b'),{'sessionId':_0x4961da});return _0x710867['status'](0xc8)[_0x8620('0x35')]({'error':![],'message':_0x8620('0x3c')});})[_0x8620('0x22')](handleError(_0x710867));};exports['hold']=function(_0x1661b3,_0x46126f){logger[_0x8620('0x14')](_0x8620('0x3d'),_0x1661b3['body']);var _0x210e26=holdValidation['validate'](_0x1661b3[_0x8620('0x2e')]);if(_0x210e26[_0x8620('0x2a')]>0x0){return _0x46126f['status'](0x190)[_0x8620('0x35')](_0x210e26);}var _0x1091fe=_0x1661b3[_0x8620('0x2e')][_0x8620('0x39')];var _0x23f565=_0x1661b3[_0x8620('0x2e')][_0x8620('0x29')];return getAgent(_0x1091fe)['then'](function(_0x2d8ea9){logger[_0x8620('0x14')](_0x8620('0x32'),_0x2d8ea9[_0x8620('0x1a')]);emit(util['format']('user:%s',_0x2d8ea9[_0x8620('0x1a')]),_0x8620('0x3e'),{'sessionId':_0x23f565});return _0x46126f[_0x8620('0x1b')](0xc8)[_0x8620('0x35')]({'error':![],'message':_0x8620('0x3f')});})[_0x8620('0x22')](handleError(_0x46126f));};exports[_0x8620('0x40')]=function(_0x541d45,_0x3800b9){logger[_0x8620('0x14')](_0x8620('0x41'),_0x541d45[_0x8620('0x2e')]);var _0x5ec0c5=unholdValidation[_0x8620('0xd')](_0x541d45[_0x8620('0x2e')]);if(_0x5ec0c5[_0x8620('0x2a')]>0x0){return _0x3800b9['status'](0x190)[_0x8620('0x35')](_0x5ec0c5);}var _0x54e0b5=_0x541d45['body'][_0x8620('0x39')];var _0x32d7cc=_0x541d45[_0x8620('0x2e')][_0x8620('0x29')];return getAgent(_0x54e0b5)[_0x8620('0x1f')](function(_0xce895){logger[_0x8620('0x14')]('entityFound:',_0xce895[_0x8620('0x1a')]);emit(util['format']('user:%s',_0xce895[_0x8620('0x1a')]),_0x8620('0x42'),{'sessionId':_0x32d7cc});return _0x3800b9[_0x8620('0x1b')](0xc8)[_0x8620('0x35')]({'error':![],'message':_0x8620('0x43')});})[_0x8620('0x22')](handleError(_0x3800b9));};exports[_0x8620('0x44')]=function(_0x14ef8d,_0x40fbe1){logger[_0x8620('0x14')](_0x8620('0x45'),_0x40fbe1[_0x8620('0x2e')]);var _0x5828f0=callsValidation[_0x8620('0xd')](_0x14ef8d['body']);if(_0x5828f0[_0x8620('0x2a')]>0x0){return _0x40fbe1[_0x8620('0x1b')](0x190)['json'](_0x5828f0);}var _0x3d1a8e=_0x14ef8d[_0x8620('0x2e')][_0x8620('0x39')];var _0x8e6711=respondWithRpcPromise('VoiceChannels');var _0x3329d4=getAgent(_0x3d1a8e);return Promise[_0x8620('0x26')]([_0x8e6711,_0x3329d4])[_0x8620('0x1f')](function(_0x2ef201){var _0x1a1de3=_0x2ef201[0x0];var _0x19023d=_0x2ef201[0x1];var _0x3c3c2c=_[_0x8620('0x27')](_0x1a1de3[_0x8620('0x46')],function(_0x1d5a1c){return _0x1d5a1c['UserId']==_0x19023d['id'];});return _0x40fbe1['status'](0xc8)[_0x8620('0x35')]({'count':_0x3c3c2c[_0x8620('0x2a')],'rows':_0x3c3c2c});})[_0x8620('0x22')](handleError(_0x40fbe1));};exports[_0x8620('0x47')]=function(_0x51ee32,_0x226d66){logger['info'](_0x8620('0x48'),_0x51ee32[_0x8620('0x2e')]);var _0x1b33e2=conferenceValidation[_0x8620('0xd')](_0x51ee32[_0x8620('0x2e')]);if(_0x1b33e2[_0x8620('0x2a')]>0x0){return _0x226d66[_0x8620('0x1b')](0x190)[_0x8620('0x35')](_0x1b33e2);}var _0x2ea79b=_0x51ee32[_0x8620('0x2e')][_0x8620('0x39')];return getAgent(_0x2ea79b)[_0x8620('0x1f')](function(_0x3f7dc7){logger[_0x8620('0x14')](_0x8620('0x32'),_0x3f7dc7[_0x8620('0x1a')]);emit(util[_0x8620('0x49')]('user:%s',_0x3f7dc7[_0x8620('0x1a')]),_0x8620('0x4a'));return _0x226d66['status'](0xc8)[_0x8620('0x35')]({'error':![],'message':_0x8620('0x4b')});})[_0x8620('0x22')](handleError(_0x226d66));};exports[_0x8620('0x4c')]=function(_0x4617cc,_0x7aa271){logger[_0x8620('0x14')]('transfer\x20fired:',_0x4617cc['body']);var _0x580560=transferValidation[_0x8620('0xd')](_0x4617cc['body']);if(_0x580560[_0x8620('0x2a')]>0x0){return _0x7aa271[_0x8620('0x1b')](0x190)['json'](_0x580560);}var _0x3115dd=_0x4617cc[_0x8620('0x2e')][_0x8620('0x39')];var _0x5c6bb8=_0x4617cc[_0x8620('0x2e')]['sessionId'];var _0x53cf47=_0x4617cc[_0x8620('0x2e')]['transferNumber'];return getAgent(_0x3115dd)[_0x8620('0x1f')](function(_0x2b6e4c){logger[_0x8620('0x14')](_0x8620('0x32'),_0x2b6e4c[_0x8620('0x1a')]);emit(util[_0x8620('0x49')]('user:%s',_0x2b6e4c[_0x8620('0x1a')]),_0x8620('0x4d'),{'sessionId':_0x5c6bb8,'transferNumber':_0x53cf47});return _0x7aa271[_0x8620('0x1b')](0xc8)[_0x8620('0x35')]({'error':![],'message':_0x8620('0x4e')});})[_0x8620('0x22')](handleError(_0x7aa271));};
\ No newline at end of file
diff --git a/server/api/whatsappAccount/index.js b/server/api/whatsappAccount/index.js
index e055d5b..4cbca9c 100644
--- a/server/api/whatsappAccount/index.js
+++ b/server/api/whatsappAccount/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd38f=['destroy','delete','removeDispositions','removeAnswers','exports','multer','path','connect-timeout','../../components/auth/service','./whatsappAccount.controller','isAuthenticated','get','describe','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/users','getAgents','post','create','addDisposition','addAgents','/:id/applications','/:id/notify','notify','/:id/send','send','put','/:id','update'];(function(_0x2c948a,_0xc4f63f){var _0x15175f=function(_0xaa2674){while(--_0xaa2674){_0x2c948a['push'](_0x2c948a['shift']());}};_0x15175f(++_0xc4f63f);}(_0xd38f,0x165));var _0xfd38=function(_0x4556da,_0x36fd60){_0x4556da=_0x4556da-0x0;var _0x58692e=_0xd38f[_0x4556da];return _0x58692e;};'use strict';var multer=require(_0xfd38('0x0'));var util=require('util');var path=require(_0xfd38('0x1'));var timeout=require(_0xfd38('0x2'));var express=require('express');var router=express['Router']();var auth=require(_0xfd38('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xfd38('0x4'));router['get']('/',auth[_0xfd38('0x5')](),controller['index']);router[_0xfd38('0x6')]('/describe',auth[_0xfd38('0x5')](),controller[_0xfd38('0x7')]);router[_0xfd38('0x6')]('/:id',auth[_0xfd38('0x5')](),controller[_0xfd38('0x8')]);router['get'](_0xfd38('0x9'),auth[_0xfd38('0x5')](),controller[_0xfd38('0xa')]);router[_0xfd38('0x6')](_0xfd38('0xb'),auth[_0xfd38('0x5')](),controller[_0xfd38('0xc')]);router[_0xfd38('0x6')](_0xfd38('0xd'),auth['isAuthenticated'](),controller[_0xfd38('0xe')]);router['get']('/:id/applications',auth[_0xfd38('0x5')](),controller['getApplications']);router[_0xfd38('0xf')]('/',auth[_0xfd38('0x5')](),controller[_0xfd38('0x10')]);router[_0xfd38('0xf')](_0xfd38('0x9'),auth[_0xfd38('0x5')](),controller[_0xfd38('0x11')]);router['post']('/:id/canned_answers',auth[_0xfd38('0x5')](),controller['addAnswer']);router[_0xfd38('0xf')](_0xfd38('0xd'),auth[_0xfd38('0x5')](),controller[_0xfd38('0x12')]);router[_0xfd38('0xf')](_0xfd38('0x13'),auth[_0xfd38('0x5')](),controller['addApplications']);router[_0xfd38('0xf')](_0xfd38('0x14'),controller[_0xfd38('0x15')]);router[_0xfd38('0xf')](_0xfd38('0x16'),auth[_0xfd38('0x5')](),controller[_0xfd38('0x17')]);router[_0xfd38('0x18')](_0xfd38('0x19'),auth[_0xfd38('0x5')](),controller[_0xfd38('0x1a')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xfd38('0x1b')]);router[_0xfd38('0x1c')]('/:id/dispositions',auth[_0xfd38('0x5')](),controller[_0xfd38('0x1d')]);router[_0xfd38('0x1c')](_0xfd38('0xb'),auth[_0xfd38('0x5')](),controller[_0xfd38('0x1e')]);router['delete'](_0xfd38('0xd'),auth[_0xfd38('0x5')](),controller['removeAgents']);module[_0xfd38('0x1f')]=router;
\ No newline at end of file
+var _0x5bcb=['getApplications','post','create','addDisposition','addAnswer','/:id/users','addAgents','addApplications','/:id/notify','notify','/:id/send','send','put','update','delete','removeAnswers','removeAgents','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','/:id/dispositions','/:id/canned_answers','/:id/applications'];(function(_0x462414,_0x5a265a){var _0xbf0a2b=function(_0x2387f7){while(--_0x2387f7){_0x462414['push'](_0x462414['shift']());}};_0xbf0a2b(++_0x5a265a);}(_0x5bcb,0x7a));var _0xb5bc=function(_0x2b39eb,_0x531ed7){_0x2b39eb=_0x2b39eb-0x0;var _0x1987db=_0x5bcb[_0x2b39eb];return _0x1987db;};'use strict';var multer=require(_0xb5bc('0x0'));var util=require(_0xb5bc('0x1'));var path=require(_0xb5bc('0x2'));var timeout=require(_0xb5bc('0x3'));var express=require(_0xb5bc('0x4'));var router=express[_0xb5bc('0x5')]();var auth=require(_0xb5bc('0x6'));var interaction=require(_0xb5bc('0x7'));var config=require(_0xb5bc('0x8'));var controller=require('./whatsappAccount.controller');router['get']('/',auth[_0xb5bc('0x9')](),controller[_0xb5bc('0xa')]);router[_0xb5bc('0xb')]('/describe',auth['isAuthenticated'](),controller[_0xb5bc('0xc')]);router[_0xb5bc('0xb')](_0xb5bc('0xd'),auth['isAuthenticated'](),controller[_0xb5bc('0xe')]);router['get'](_0xb5bc('0xf'),auth[_0xb5bc('0x9')](),controller['getDispositions']);router[_0xb5bc('0xb')](_0xb5bc('0x10'),auth[_0xb5bc('0x9')](),controller['getAnswers']);router[_0xb5bc('0xb')]('/:id/users',auth[_0xb5bc('0x9')](),controller['getAgents']);router[_0xb5bc('0xb')](_0xb5bc('0x11'),auth[_0xb5bc('0x9')](),controller[_0xb5bc('0x12')]);router[_0xb5bc('0x13')]('/',auth[_0xb5bc('0x9')](),controller[_0xb5bc('0x14')]);router[_0xb5bc('0x13')]('/:id/dispositions',auth[_0xb5bc('0x9')](),controller[_0xb5bc('0x15')]);router[_0xb5bc('0x13')](_0xb5bc('0x10'),auth['isAuthenticated'](),controller[_0xb5bc('0x16')]);router[_0xb5bc('0x13')](_0xb5bc('0x17'),auth[_0xb5bc('0x9')](),controller[_0xb5bc('0x18')]);router[_0xb5bc('0x13')]('/:id/applications',auth[_0xb5bc('0x9')](),controller[_0xb5bc('0x19')]);router[_0xb5bc('0x13')](_0xb5bc('0x1a'),controller[_0xb5bc('0x1b')]);router[_0xb5bc('0x13')](_0xb5bc('0x1c'),auth[_0xb5bc('0x9')](),controller[_0xb5bc('0x1d')]);router[_0xb5bc('0x1e')](_0xb5bc('0xd'),auth[_0xb5bc('0x9')](),controller[_0xb5bc('0x1f')]);router[_0xb5bc('0x20')](_0xb5bc('0xd'),auth[_0xb5bc('0x9')](),controller['destroy']);router['delete']('/:id/dispositions',auth['isAuthenticated'](),controller['removeDispositions']);router['delete'](_0xb5bc('0x10'),auth['isAuthenticated'](),controller[_0xb5bc('0x21')]);router[_0xb5bc('0x20')]('/:id/users',auth['isAuthenticated'](),controller[_0xb5bc('0x22')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/whatsappAccount/whatsappAccount.attributes.js b/server/api/whatsappAccount/whatsappAccount.attributes.js
index a873249..3f2592b 100644
--- a/server/api/whatsappAccount/whatsappAccount.attributes.js
+++ b/server/api/whatsappAccount/whatsappAccount.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe150=['generate','ENUM','twilio','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','exports','name','STRING'];(function(_0x5a1a51,_0x144c79){var _0x47edd7=function(_0x2259bb){while(--_0x2259bb){_0x5a1a51['push'](_0x5a1a51['shift']());}};_0x47edd7(++_0x144c79);}(_0xe150,0xc0));var _0x0e15=function(_0x11645d,_0x262e1a){_0x11645d=_0x11645d-0x0;var _0x496677=_0xe150[_0x11645d];return _0x496677;};'use strict';var Sequelize=require('sequelize');var rs=require('randomstring');module[_0x0e15('0x0')]={'name':{'type':Sequelize['STRING'],'unique':_0x0e15('0x1'),'allowNull':![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'remote':{'type':Sequelize[_0x0e15('0x2')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x0e15('0x3')]();}},'phone':{'type':Sequelize[_0x0e15('0x2')]},'type':{'type':Sequelize[_0x0e15('0x4')](_0x0e15('0x5'))},'accountSid':{'type':Sequelize['STRING']},'authToken':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0x0e15('0x6')],'defaultValue':function(){return _0x0e15('0x7');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0x0e15('0x8')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x0e15('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x0e15('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x0e15('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x0e15('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x0e15('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x0e15('0x9')],'comment':_0x0e15('0xa')},'mandatoryDisposition':{'type':Sequelize[_0x0e15('0x8')],'defaultValue':![],'comment':_0x0e15('0xb'),'set':function(_0xee67ac){if(!_0xee67ac){this[_0x0e15('0xc')](_0x0e15('0xd'),null);}this[_0x0e15('0xc')](_0x0e15('0xe'),_0xee67ac);}},'description':{'type':Sequelize[_0x0e15('0x2')]}};
\ No newline at end of file
+var _0xa927=['exports','STRING','name','generate','twilio','TEXT','Account:\x20{{account.name}} {{#queue}}Queue:\x20{{queue.name}} {{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','setDataValue','mandatoryDisposition','sequelize','randomstring'];(function(_0x4b7b62,_0x4920a9){var _0x2280df=function(_0x21e1f8){while(--_0x21e1f8){_0x4b7b62['push'](_0x4b7b62['shift']());}};_0x2280df(++_0x4920a9);}(_0xa927,0x7e));var _0x7a92=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xa927[_0xfae23b];return _0x200640;};'use strict';var Sequelize=require(_0x7a92('0x0'));var rs=require(_0x7a92('0x1'));module[_0x7a92('0x2')]={'name':{'type':Sequelize[_0x7a92('0x3')],'unique':_0x7a92('0x4'),'allowNull':![]},'key':{'type':Sequelize[_0x7a92('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x7a92('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0x7a92('0x3')],'defaultValue':function(){return rs[_0x7a92('0x5')]();}},'phone':{'type':Sequelize[_0x7a92('0x3')]},'type':{'type':Sequelize['ENUM'](_0x7a92('0x6'))},'accountSid':{'type':Sequelize[_0x7a92('0x3')]},'authToken':{'type':Sequelize[_0x7a92('0x3')]},'notificationTemplate':{'type':Sequelize[_0x7a92('0x7')],'defaultValue':function(){return _0x7a92('0x8');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0x7a92('0x9')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x7a92('0x9')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x7a92('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x7a92('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x7a92('0xa')],'comment':_0x7a92('0xb')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x7a92('0xc'),'set':function(_0x1d97e8){if(!_0x1d97e8){this['setDataValue'](_0x7a92('0xd'),null);}this[_0x7a92('0xe')](_0x7a92('0xf'),_0x1d97e8);}},'description':{'type':Sequelize[_0x7a92('0x3')]}};
\ No newline at end of file
diff --git a/server/api/whatsappAccount/whatsappAccount.controller.js b/server/api/whatsappAccount/whatsappAccount.controller.js
index c511cc6..2b473d3 100644
--- a/server/api/whatsappAccount/whatsappAccount.controller.js
+++ b/server/api/whatsappAccount/whatsappAccount.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4e81=['addApplications','sequelize','transaction','WhatsappApplication','bulkCreate','findAndCountAll','priority','getApplications','notify','Applications','account','applications','orderBy','asc','describe','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','mobile','twilio','from','replace','whatsapp:','Body','MessageSid','isNil','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','includes','mapKey','CmList','ListId','CmContact','Contacts','DESC','list','contact','WhatsappInteraction','interaction','created','autoclose','push','unmanaged','*,*,*,*','WhatsappMessage','messageId','ContactId','AttachmentId','UserId','unshift','agent','waitForTheAssignedAgent','Start','startRouting','receiveMessage','entity\x20found','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','set','Content-Type','text/xml','\x0a ','send','List','spread','dataValues','Messages','html-pdf','eml-format','rimraf','moment','bluebird','mustache','util','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','defaults','localhost','socket.io-emitter','redis','register','client','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','WhatsappAccount,\x20%s,\x20%s','message','result','catch','status','end','json','count','offset','limit','Content-Range','save','update','destroy','WhatsappAccounts','stack','name','index','mandatoryDispositionPause','map','WhatsappAccount','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','filters','pick','where','merge','VIRTUAL','filter','options','includeAll','include','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Pause','addDisposition','WhatsappAccountId','findOne','Disposition','order','sort','findAll','rows','removeDispositions','ids','addAnswer','CannedAnswer','removeAnswers','addAgents','emit','removeAgents','userWhatsappAccount:remove','getAgents'];(function(_0x26342c,_0x2c3dee){var _0x2d50aa=function(_0x258944){while(--_0x258944){_0x26342c['push'](_0x26342c['shift']());}};_0x2d50aa(++_0x2c3dee);}(_0x4e81,0x1bc));var _0x14e8=function(_0xdd0313,_0x251c2b){_0xdd0313=_0xdd0313-0x0;var _0x2bd7e8=_0x4e81[_0xdd0313];return _0x2bd7e8;};'use strict';var pdf=require(_0x14e8('0x0'));var emlformat=require(_0x14e8('0x1'));var rimraf=require(_0x14e8('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x14e8('0x3'));var BPromise=require(_0x14e8('0x4'));var Mustache=require(_0x14e8('0x5'));var util=require(_0x14e8('0x6'));var path=require(_0x14e8('0x7'));var sox=require(_0x14e8('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0x14e8('0x9'));var squel=require(_0x14e8('0xa'));var crypto=require(_0x14e8('0xb'));var jsforce=require(_0x14e8('0xc'));var deskjs=require(_0x14e8('0xd'));var toCsv=require(_0x14e8('0xe'));var querystring=require(_0x14e8('0xf'));var Papa=require(_0x14e8('0x10'));var Redis=require(_0x14e8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x14e8('0x12'));var as=require(_0x14e8('0x13'));var hardwareService=require(_0x14e8('0x14'));var logger=require(_0x14e8('0x15'))(_0x14e8('0x16'));var utils=require(_0x14e8('0x17'));var config=require(_0x14e8('0x18'));var db=require(_0x14e8('0x19'))['db'];config['redis']=_[_0x14e8('0x1a')](config['redis'],{'host':_0x14e8('0x1b'),'port':0x18eb});var socket=require(_0x14e8('0x1c'))(new Redis(config[_0x14e8('0x1d')]));require('./whatsappAccount.socket')[_0x14e8('0x1e')](socket);var jayson=require('jayson/promise');var client=jayson[_0x14e8('0x1f')]['http']({'port':0x232c});function checkPasswordPattern(_0x347216,_0x3761a1,_0xc6101f){if(_0xc6101f){var _0x135996=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x135996['test'](_0x3761a1)){return _0x347216;}else{throw new db[(_0x14e8('0x20'))][(_0x14e8('0x21'))](_0x14e8('0x22'));}}else{return _0x347216;}}function respondWithRpcPromise(_0x412c0a,_0xd4d6b2,_0x1f1a0d,_0x10dc8b){return new BPromise(function(_0x462259,_0x5a38c1){var _0x328c5a=_0x10dc8b||client;return _0x328c5a[_0x14e8('0x23')](_0x412c0a,_0x1f1a0d)[_0x14e8('0x24')](function(_0x7b10f2){logger[_0x14e8('0x25')]('WhatsappAccount,\x20%s,\x20%s',_0xd4d6b2,_0x14e8('0x26'));logger[_0x14e8('0x27')](_0x14e8('0x28'),_0xd4d6b2,'request\x20sent',JSON[_0x14e8('0x29')](_0x7b10f2));if(_0x7b10f2['error']){if(_0x7b10f2[_0x14e8('0x2a')][_0x14e8('0x2b')]===0x1f4){logger[_0x14e8('0x2a')](_0x14e8('0x2c'),_0xd4d6b2,_0x7b10f2[_0x14e8('0x2a')]['message']);return _0x5a38c1(_0x7b10f2[_0x14e8('0x2a')]['message']);}logger[_0x14e8('0x2a')](_0x14e8('0x2c'),_0xd4d6b2,_0x7b10f2['error']['message']);return _0x462259(_0x7b10f2['error'][_0x14e8('0x2d')]);}else{logger[_0x14e8('0x25')](_0x14e8('0x2c'),_0xd4d6b2,_0x14e8('0x26'));_0x462259(_0x7b10f2[_0x14e8('0x2e')]['message']);}})[_0x14e8('0x2f')](function(_0x3fd96d){logger[_0x14e8('0x2a')](_0x14e8('0x2c'),_0xd4d6b2,_0x3fd96d);_0x5a38c1(_0x3fd96d);});});}function respondWithStatusCode(_0x28035a,_0xfc0545){_0xfc0545=_0xfc0545||0xcc;return function(_0x2813ae){if(_0x2813ae){return _0x28035a['sendStatus'](_0xfc0545);}return _0x28035a[_0x14e8('0x30')](_0xfc0545)[_0x14e8('0x31')]();};}function respondWithResult(_0x393ab0,_0x5f5abb){_0x5f5abb=_0x5f5abb||0xc8;return function(_0x48eed0){if(_0x48eed0){return _0x393ab0['status'](_0x5f5abb)[_0x14e8('0x32')](_0x48eed0);}};}function respondWithFilteredResult(_0x2a408d,_0x567385){return function(_0x204524){if(_0x204524){var _0x1d71ca=_0x204524[_0x14e8('0x33')],_0x176e8f=_0x567385[_0x14e8('0x34')],_0xa83433=_0x567385[_0x14e8('0x34')]+_0x567385[_0x14e8('0x35')],_0x5c2635;if(_0xa83433>=_0x1d71ca){_0xa83433=_0x1d71ca;_0x5c2635=0xc8;}else{_0x5c2635=0xce;}_0x2a408d[_0x14e8('0x30')](_0x5c2635);return _0x2a408d['set'](_0x14e8('0x36'),_0x176e8f+'-'+_0xa83433+'/'+_0x1d71ca)[_0x14e8('0x32')](_0x204524);}return null;};}function patchUpdates(_0xc398b6){return function(_0xe63f00){try{jsonpatch['apply'](_0xe63f00,_0xc398b6,!![]);}catch(_0xbb8003){return BPromise['reject'](_0xbb8003);}return _0xe63f00[_0x14e8('0x37')]();};}function saveUpdates(_0x44c6fb,_0x1f4876){return function(_0x34a7c8){if(_0x34a7c8){return _0x34a7c8[_0x14e8('0x38')](_0x44c6fb)[_0x14e8('0x24')](function(_0xbe9eab){return _0xbe9eab;});}return null;};}function removeEntity(_0x47cbe0,_0xd144b){return function(_0x2acf6a){if(_0x2acf6a){return _0x2acf6a[_0x14e8('0x39')]()[_0x14e8('0x24')](function(){var _0x54e624=_0x2acf6a['get']({'plain':!![]});var _0x4dac15=_0x14e8('0x3a');return db['UserProfileResource'][_0x14e8('0x39')]({'where':{'type':_0x4dac15,'resourceId':_0x54e624['id']}})['then'](function(){return _0x2acf6a;});})[_0x14e8('0x24')](function(){_0x47cbe0[_0x14e8('0x30')](0xcc)[_0x14e8('0x31')]();});}};}function handleEntityNotFound(_0x2fc030,_0x51a63d){return function(_0x13b44e){if(!_0x13b44e){_0x2fc030['sendStatus'](0x194);}return _0x13b44e;};}function handleError(_0x5f0ee3,_0x3ae459){_0x3ae459=_0x3ae459||0x1f4;return function(_0x74dce4){logger[_0x14e8('0x2a')](_0x74dce4[_0x14e8('0x3b')]);if(_0x74dce4[_0x14e8('0x3c')]){delete _0x74dce4['name'];}_0x5f0ee3[_0x14e8('0x30')](_0x3ae459)['send'](_0x74dce4);};}exports[_0x14e8('0x3d')]=function(_0x20f69d,_0x14b9f1){var _0x4cafe6={'include':[{'model':db['Pause'],'as':_0x14e8('0x3e')}]},_0x27d51b={},_0x12c8ff={'count':0x0,'rows':[]};var _0x38b874=_[_0x14e8('0x3f')](db[_0x14e8('0x40')][_0x14e8('0x41')],function(_0x2850a5){return{'name':_0x2850a5[_0x14e8('0x42')],'type':_0x2850a5[_0x14e8('0x43')][_0x14e8('0x44')]};});_0x27d51b[_0x14e8('0x45')]=_[_0x14e8('0x3f')](_0x38b874,_0x14e8('0x3c'));_0x27d51b[_0x14e8('0x46')]=_[_0x14e8('0x47')](_0x20f69d[_0x14e8('0x46')]);_0x27d51b['filters']=_[_0x14e8('0x48')](_0x27d51b['model'],_0x27d51b['query']);_0x4cafe6['attributes']=_[_0x14e8('0x48')](_0x27d51b['model'],qs[_0x14e8('0x49')](_0x20f69d[_0x14e8('0x46')][_0x14e8('0x49')]));_0x4cafe6[_0x14e8('0x4a')]=_0x4cafe6[_0x14e8('0x4a')][_0x14e8('0x4b')]?_0x4cafe6[_0x14e8('0x4a')]:_0x27d51b[_0x14e8('0x45')];if(!_0x20f69d[_0x14e8('0x46')][_0x14e8('0x4c')](_0x14e8('0x4d'))){_0x4cafe6['limit']=qs[_0x14e8('0x35')](_0x20f69d[_0x14e8('0x46')][_0x14e8('0x35')]);_0x4cafe6[_0x14e8('0x34')]=qs['offset'](_0x20f69d[_0x14e8('0x46')][_0x14e8('0x34')]);}_0x4cafe6['order']=qs['sort'](_0x20f69d[_0x14e8('0x46')]['sort']);_0x4cafe6['where']=qs[_0x14e8('0x4e')](_[_0x14e8('0x4f')](_0x20f69d['query'],_0x27d51b[_0x14e8('0x4e')]),_0x38b874);if(_0x20f69d[_0x14e8('0x46')]['filter']){_0x4cafe6[_0x14e8('0x50')]=_[_0x14e8('0x51')](_0x4cafe6[_0x14e8('0x50')],{'$or':_[_0x14e8('0x3f')](_0x38b874,function(_0xa73d38){if(_0xa73d38[_0x14e8('0x43')]!==_0x14e8('0x52')){var _0x2541ad={};_0x2541ad[_0xa73d38[_0x14e8('0x3c')]]={'$like':'%'+_0x20f69d[_0x14e8('0x46')][_0x14e8('0x53')]+'%'};return _0x2541ad;}})});}_0x4cafe6=_[_0x14e8('0x51')]({},_0x4cafe6,_0x20f69d[_0x14e8('0x54')]);var _0x3a51f3={'where':_0x4cafe6[_0x14e8('0x50')]};return db[_0x14e8('0x40')]['count'](_0x3a51f3)[_0x14e8('0x24')](function(_0x49324a){_0x12c8ff[_0x14e8('0x33')]=_0x49324a;if(_0x20f69d[_0x14e8('0x46')][_0x14e8('0x55')]){_0x4cafe6[_0x14e8('0x56')]=[{'all':!![]}];}return db['WhatsappAccount']['findAll'](_0x4cafe6);})['then'](function(_0x291fe2){_0x12c8ff['rows']=_0x291fe2;return _0x12c8ff;})['then'](respondWithFilteredResult(_0x14b9f1,_0x4cafe6))[_0x14e8('0x2f')](handleError(_0x14b9f1,null));};exports[_0x14e8('0x57')]=function(_0x590bcd,_0x15058e){var _0x27e319={'raw':![],'where':{'id':_0x590bcd[_0x14e8('0x58')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x7d6759={};_0x7d6759[_0x14e8('0x45')]=_[_0x14e8('0x47')](db[_0x14e8('0x40')][_0x14e8('0x41')]);_0x7d6759[_0x14e8('0x46')]=_[_0x14e8('0x47')](_0x590bcd['query']);_0x7d6759[_0x14e8('0x4e')]=_[_0x14e8('0x48')](_0x7d6759[_0x14e8('0x45')],_0x7d6759[_0x14e8('0x46')]);_0x27e319['attributes']=_[_0x14e8('0x48')](_0x7d6759[_0x14e8('0x45')],qs[_0x14e8('0x49')](_0x590bcd[_0x14e8('0x46')]['fields']));_0x27e319[_0x14e8('0x4a')]=_0x27e319[_0x14e8('0x4a')][_0x14e8('0x4b')]?_0x27e319[_0x14e8('0x4a')]:_0x7d6759[_0x14e8('0x45')];if(_0x590bcd[_0x14e8('0x46')][_0x14e8('0x55')]){_0x27e319[_0x14e8('0x56')]=[{'all':!![]}];}_0x27e319=_['merge']({},_0x27e319,_0x590bcd['options']);return db[_0x14e8('0x40')][_0x14e8('0x59')](_0x27e319)[_0x14e8('0x24')](handleEntityNotFound(_0x15058e,null))[_0x14e8('0x24')](respondWithResult(_0x15058e,null))[_0x14e8('0x2f')](handleError(_0x15058e,null));};exports['create']=function(_0x4a631a,_0x4c49e5){return db[_0x14e8('0x40')][_0x14e8('0x5a')](_0x4a631a[_0x14e8('0x5b')],{})['then'](function(_0x8c9182){var _0xbd38ae=_0x4a631a[_0x14e8('0x5c')]['get']({'plain':!![]});if(!_0xbd38ae)throw new Error(_0x14e8('0x5d'));if(_0xbd38ae[_0x14e8('0x5e')]===_0x14e8('0x5c')){var _0xb18cf1=_0x8c9182[_0x14e8('0x5f')]({'plain':!![]});var _0x12ec12=_0x14e8('0x3a');return db[_0x14e8('0x60')][_0x14e8('0x59')]({'where':{'name':_0x12ec12,'userProfileId':_0xbd38ae[_0x14e8('0x61')]},'raw':!![]})[_0x14e8('0x24')](function(_0x4c6f1d){if(_0x4c6f1d&&_0x4c6f1d[_0x14e8('0x62')]===0x0){return db[_0x14e8('0x63')][_0x14e8('0x5a')]({'name':_0xb18cf1[_0x14e8('0x3c')],'resourceId':_0xb18cf1['id'],'type':_0x4c6f1d[_0x14e8('0x3c')],'sectionId':_0x4c6f1d['id']},{})[_0x14e8('0x24')](function(){return _0x8c9182;});}else{return _0x8c9182;}})[_0x14e8('0x2f')](function(_0x12e0a8){logger[_0x14e8('0x2a')](_0x14e8('0x64'),_0x12e0a8);throw _0x12e0a8;});}return _0x8c9182;})[_0x14e8('0x24')](respondWithResult(_0x4c49e5,0xc9))[_0x14e8('0x2f')](handleError(_0x4c49e5,null));};exports['update']=function(_0xc988b8,_0x93238a){if(_0xc988b8['body']['id']){delete _0xc988b8[_0x14e8('0x5b')]['id'];}return db[_0x14e8('0x40')][_0x14e8('0x59')]({'where':{'id':_0xc988b8[_0x14e8('0x58')]['id']},'include':[{'model':db[_0x14e8('0x65')],'as':_0x14e8('0x3e')}]})[_0x14e8('0x24')](handleEntityNotFound(_0x93238a,null))['then'](saveUpdates(_0xc988b8['body'],null))['then'](respondWithResult(_0x93238a,null))[_0x14e8('0x2f')](handleError(_0x93238a,null));};exports[_0x14e8('0x39')]=function(_0x2755f7,_0x2c6d33){return db[_0x14e8('0x40')][_0x14e8('0x59')]({'where':{'id':_0x2755f7[_0x14e8('0x58')]['id']}})['then'](handleEntityNotFound(_0x2c6d33,null))[_0x14e8('0x24')](removeEntity(_0x2c6d33,null))[_0x14e8('0x2f')](handleError(_0x2c6d33,null));};exports['describe']=function(_0x27afee,_0x3a5602){return db['WhatsappAccount']['describe']()['then'](respondWithResult(_0x3a5602,null))[_0x14e8('0x2f')](handleError(_0x3a5602,null));};exports[_0x14e8('0x66')]=function(_0x1109d3,_0x29b4af,_0x4a8417){if(_0x1109d3[_0x14e8('0x5b')]['id']){delete _0x1109d3[_0x14e8('0x5b')]['id'];}return db[_0x14e8('0x40')][_0x14e8('0x59')]({'where':{'id':_0x1109d3[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x29b4af,null))['then'](function(_0xf32eb7){if(_0xf32eb7){_0x1109d3[_0x14e8('0x5b')][_0x14e8('0x67')]=_0xf32eb7['id'];return db['Disposition']['create'](_0x1109d3[_0x14e8('0x5b')]);}})['then'](respondWithResult(_0x29b4af,null))[_0x14e8('0x2f')](handleError(_0x29b4af,null));};exports['getDispositions']=function(_0x13ebe6,_0x54b023,_0x28aac4){var _0x362bda={'raw':![],'where':{}};var _0x4cdb7e={};var _0x1daa74={'count':0x0,'rows':[]};return db[_0x14e8('0x40')][_0x14e8('0x68')]({'where':{'id':_0x13ebe6[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x54b023,null))[_0x14e8('0x24')](function(_0x858bab){if(_0x858bab){_0x4cdb7e[_0x14e8('0x45')]=_[_0x14e8('0x47')](db[_0x14e8('0x69')][_0x14e8('0x41')]);_0x4cdb7e[_0x14e8('0x46')]=_[_0x14e8('0x47')](_0x13ebe6['query']);_0x4cdb7e['filters']=_['intersection'](_0x4cdb7e[_0x14e8('0x45')],_0x4cdb7e[_0x14e8('0x46')]);_0x362bda[_0x14e8('0x4a')]=_['intersection'](_0x4cdb7e[_0x14e8('0x45')],qs['fields'](_0x13ebe6['query']['fields']));_0x362bda[_0x14e8('0x4a')]=_0x362bda[_0x14e8('0x4a')][_0x14e8('0x4b')]?_0x362bda['attributes']:_0x4cdb7e[_0x14e8('0x45')];if(!_0x13ebe6['query'][_0x14e8('0x4c')](_0x14e8('0x4d'))){_0x362bda[_0x14e8('0x35')]=qs[_0x14e8('0x35')](_0x13ebe6[_0x14e8('0x46')][_0x14e8('0x35')]);_0x362bda[_0x14e8('0x34')]=qs[_0x14e8('0x34')](_0x13ebe6[_0x14e8('0x46')]['offset']);}_0x362bda[_0x14e8('0x6a')]=qs['sort'](_0x13ebe6[_0x14e8('0x46')][_0x14e8('0x6b')]);_0x362bda[_0x14e8('0x50')]=qs[_0x14e8('0x4e')](_[_0x14e8('0x4f')](_0x13ebe6[_0x14e8('0x46')],_0x4cdb7e[_0x14e8('0x4e')]));_0x362bda[_0x14e8('0x50')][_0x14e8('0x67')]=_0x858bab['id'];if(_0x13ebe6['query'][_0x14e8('0x53')]){_0x362bda[_0x14e8('0x50')]=_[_0x14e8('0x51')](_0x362bda[_0x14e8('0x50')],{'$or':_['map'](_0x362bda[_0x14e8('0x4a')],function(_0x21ead5){var _0x141eaa={};_0x141eaa[_0x21ead5]={'$like':'%'+_0x13ebe6[_0x14e8('0x46')]['filter']+'%'};return _0x141eaa;})});}_0x362bda=_[_0x14e8('0x51')]({},_0x362bda,_0x13ebe6['options']);return db[_0x14e8('0x69')]['count']({'where':_0x362bda['where']})[_0x14e8('0x24')](function(_0xb68079){_0x1daa74[_0x14e8('0x33')]=_0xb68079;if(_0x13ebe6[_0x14e8('0x46')][_0x14e8('0x55')]){_0x362bda[_0x14e8('0x56')]=[{'all':!![]}];}return db[_0x14e8('0x69')][_0x14e8('0x6c')](_0x362bda);})[_0x14e8('0x24')](function(_0x280a8c){_0x1daa74[_0x14e8('0x6d')]=_0x280a8c;return _0x1daa74;});}})['then'](respondWithFilteredResult(_0x54b023,_0x362bda))[_0x14e8('0x2f')](handleError(_0x54b023,null));};exports[_0x14e8('0x6e')]=function(_0xf2304c,_0x5418e0,_0x5a9e57){return db[_0x14e8('0x40')][_0x14e8('0x59')]({'where':{'id':_0xf2304c[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x5418e0,null))[_0x14e8('0x24')](function(_0x468721){if(_0x468721){return _0x468721[_0x14e8('0x6e')](_0xf2304c[_0x14e8('0x46')][_0x14e8('0x6f')]);}})[_0x14e8('0x24')](respondWithStatusCode(_0x5418e0,null))[_0x14e8('0x2f')](handleError(_0x5418e0,null));};exports[_0x14e8('0x70')]=function(_0x1ea3f1,_0x13ffd2,_0x5c6fcb){if(_0x1ea3f1[_0x14e8('0x5b')]['id']){delete _0x1ea3f1['body']['id'];}return db[_0x14e8('0x40')][_0x14e8('0x59')]({'where':{'id':_0x1ea3f1[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x13ffd2,null))[_0x14e8('0x24')](function(_0x281932){if(_0x281932){_0x1ea3f1['body'][_0x14e8('0x67')]=_0x281932['id'];return db[_0x14e8('0x71')]['create'](_0x1ea3f1[_0x14e8('0x5b')]);}})[_0x14e8('0x24')](respondWithResult(_0x13ffd2,null))[_0x14e8('0x2f')](handleError(_0x13ffd2,null));};exports['getAnswers']=function(_0x2f05f7,_0x3f3dab,_0x2b334d){var _0x1a0e68={'raw':![],'where':{}};var _0x2bdf32={};var _0x45a22f={'count':0x0,'rows':[]};return db[_0x14e8('0x40')][_0x14e8('0x68')]({'where':{'id':_0x2f05f7[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x3f3dab,null))[_0x14e8('0x24')](function(_0x2491f9){if(_0x2491f9){_0x2bdf32['model']=_[_0x14e8('0x47')](db['CannedAnswer']['rawAttributes']);_0x2bdf32[_0x14e8('0x46')]=_['keys'](_0x2f05f7[_0x14e8('0x46')]);_0x2bdf32[_0x14e8('0x4e')]=_[_0x14e8('0x48')](_0x2bdf32[_0x14e8('0x45')],_0x2bdf32['query']);_0x1a0e68[_0x14e8('0x4a')]=_[_0x14e8('0x48')](_0x2bdf32[_0x14e8('0x45')],qs['fields'](_0x2f05f7['query'][_0x14e8('0x49')]));_0x1a0e68[_0x14e8('0x4a')]=_0x1a0e68[_0x14e8('0x4a')]['length']?_0x1a0e68[_0x14e8('0x4a')]:_0x2bdf32[_0x14e8('0x45')];if(!_0x2f05f7['query'][_0x14e8('0x4c')](_0x14e8('0x4d'))){_0x1a0e68[_0x14e8('0x35')]=qs[_0x14e8('0x35')](_0x2f05f7[_0x14e8('0x46')][_0x14e8('0x35')]);_0x1a0e68[_0x14e8('0x34')]=qs[_0x14e8('0x34')](_0x2f05f7[_0x14e8('0x46')][_0x14e8('0x34')]);}_0x1a0e68['order']=qs[_0x14e8('0x6b')](_0x2f05f7['query'][_0x14e8('0x6b')]);_0x1a0e68[_0x14e8('0x50')]=qs[_0x14e8('0x4e')](_['pick'](_0x2f05f7['query'],_0x2bdf32[_0x14e8('0x4e')]));_0x1a0e68[_0x14e8('0x50')][_0x14e8('0x67')]=_0x2491f9['id'];if(_0x2f05f7[_0x14e8('0x46')][_0x14e8('0x53')]){_0x1a0e68[_0x14e8('0x50')]=_['merge'](_0x1a0e68[_0x14e8('0x50')],{'$or':_['map'](_0x1a0e68[_0x14e8('0x4a')],function(_0x7fbf71){var _0x22b066={};_0x22b066[_0x7fbf71]={'$like':'%'+_0x2f05f7['query'][_0x14e8('0x53')]+'%'};return _0x22b066;})});}_0x1a0e68=_[_0x14e8('0x51')]({},_0x1a0e68,_0x2f05f7[_0x14e8('0x54')]);return db[_0x14e8('0x71')][_0x14e8('0x33')]({'where':_0x1a0e68['where']})[_0x14e8('0x24')](function(_0x2cb268){_0x45a22f['count']=_0x2cb268;if(_0x2f05f7['query']['includeAll']){_0x1a0e68[_0x14e8('0x56')]=[{'all':!![]}];}return db['CannedAnswer'][_0x14e8('0x6c')](_0x1a0e68);})[_0x14e8('0x24')](function(_0xcfd95e){_0x45a22f[_0x14e8('0x6d')]=_0xcfd95e;return _0x45a22f;});}})[_0x14e8('0x24')](respondWithFilteredResult(_0x3f3dab,_0x1a0e68))[_0x14e8('0x2f')](handleError(_0x3f3dab,null));};exports[_0x14e8('0x72')]=function(_0x4b6a71,_0x2eb108,_0x586f7f){return db[_0x14e8('0x40')]['find']({'where':{'id':_0x4b6a71[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x2eb108,null))['then'](function(_0x238154){if(_0x238154){return _0x238154['removeAnswers'](_0x4b6a71[_0x14e8('0x46')][_0x14e8('0x6f')]);}})[_0x14e8('0x24')](respondWithStatusCode(_0x2eb108,null))['catch'](handleError(_0x2eb108,null));};exports[_0x14e8('0x73')]=function(_0x4ccc18,_0xcb4d16,_0x53d846){return db['WhatsappAccount']['find']({'where':{'id':_0x4ccc18[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0xcb4d16,null))[_0x14e8('0x24')](function(_0x29d121){if(_0x29d121){return _0x29d121['addAgents'](_0x4ccc18['body'][_0x14e8('0x6f')],_['omit'](_0x4ccc18[_0x14e8('0x5b')],[_0x14e8('0x6f'),'id'])||{})['spread'](function(_0x4d80d2){for(var _0x14846c=0x0;_0x14846c<_0x4ccc18[_0x14e8('0x5b')][_0x14e8('0x6f')]['length'];_0x14846c+=0x1){socket[_0x14e8('0x74')]('userWhatsappAccount:save',{'UserId':_0x4ccc18[_0x14e8('0x5b')][_0x14e8('0x6f')][_0x14846c],'WhatsappAccountId':_0x4ccc18[_0x14e8('0x58')]['id']});}return _0x4d80d2;});}})[_0x14e8('0x24')](respondWithResult(_0xcb4d16,null))[_0x14e8('0x2f')](handleError(_0xcb4d16,null));};exports[_0x14e8('0x75')]=function(_0x87e54c,_0x2b512c,_0x110a61){return db[_0x14e8('0x40')][_0x14e8('0x59')]({'where':{'id':_0x87e54c[_0x14e8('0x58')]['id']}})['then'](handleEntityNotFound(_0x2b512c,null))[_0x14e8('0x24')](function(_0x2a0198){if(_0x2a0198){return _0x2a0198[_0x14e8('0x75')](_0x87e54c[_0x14e8('0x46')]['ids'])[_0x14e8('0x24')](function(){if(_['isArray'](_0x87e54c[_0x14e8('0x46')][_0x14e8('0x6f')])){for(var _0x1262c1=0x0;_0x1262c1<_0x87e54c[_0x14e8('0x46')][_0x14e8('0x6f')][_0x14e8('0x4b')];_0x1262c1+=0x1){socket[_0x14e8('0x74')](_0x14e8('0x76'),{'UserId':Number(_0x87e54c[_0x14e8('0x46')][_0x14e8('0x6f')][_0x1262c1]),'WhatsappAccountId':Number(_0x87e54c[_0x14e8('0x58')]['id'])});}}else{socket[_0x14e8('0x74')](_0x14e8('0x76'),{'UserId':Number(_0x87e54c['query']['ids']),'WhatsappAccountId':Number(_0x87e54c[_0x14e8('0x58')]['id'])});}});}})['then'](respondWithStatusCode(_0x2b512c,null))[_0x14e8('0x2f')](handleError(_0x2b512c,null));};exports[_0x14e8('0x77')]=function(_0x4f9858,_0x312ab0,_0x3cf162){var _0x11f58f={};var _0x130fcb={};var _0x2d2a21;var _0x34475c;return db['WhatsappAccount'][_0x14e8('0x68')]({'where':{'id':_0x4f9858[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x312ab0,null))[_0x14e8('0x24')](function(_0x2e7cb9){if(_0x2e7cb9){_0x2d2a21=_0x2e7cb9;_0x130fcb['model']=_[_0x14e8('0x47')](db['User']['rawAttributes']);_0x130fcb[_0x14e8('0x46')]=_[_0x14e8('0x47')](_0x4f9858['query']);_0x130fcb[_0x14e8('0x4e')]=_['intersection'](_0x130fcb[_0x14e8('0x45')],_0x130fcb[_0x14e8('0x46')]);_0x11f58f['attributes']=_[_0x14e8('0x48')](_0x130fcb[_0x14e8('0x45')],qs[_0x14e8('0x49')](_0x4f9858[_0x14e8('0x46')][_0x14e8('0x49')]));_0x11f58f['attributes']=_0x11f58f[_0x14e8('0x4a')][_0x14e8('0x4b')]?_0x11f58f[_0x14e8('0x4a')]:_0x130fcb['model'];_0x11f58f['order']=qs[_0x14e8('0x6b')](_0x4f9858['query']['sort']);_0x11f58f[_0x14e8('0x50')]=qs['filters'](_['pick'](_0x4f9858[_0x14e8('0x46')],_0x130fcb[_0x14e8('0x4e')]));if(_0x4f9858[_0x14e8('0x46')]['filter']){_0x11f58f[_0x14e8('0x50')]=_['merge'](_0x11f58f['where'],{'$or':_['map'](_0x11f58f[_0x14e8('0x4a')],function(_0x23fa20){var _0x1607be={};_0x1607be[_0x23fa20]={'$like':'%'+_0x4f9858[_0x14e8('0x46')][_0x14e8('0x53')]+'%'};return _0x1607be;})});}_0x11f58f=_['merge']({},_0x11f58f,_0x4f9858[_0x14e8('0x54')]);return _0x2d2a21[_0x14e8('0x77')](_0x11f58f);}})[_0x14e8('0x24')](function(_0x348dc9){if(_0x348dc9){_0x34475c=_0x348dc9[_0x14e8('0x4b')];if(!_0x4f9858[_0x14e8('0x46')][_0x14e8('0x4c')](_0x14e8('0x4d'))){_0x11f58f[_0x14e8('0x35')]=qs[_0x14e8('0x35')](_0x4f9858[_0x14e8('0x46')][_0x14e8('0x35')]);_0x11f58f[_0x14e8('0x34')]=qs[_0x14e8('0x34')](_0x4f9858[_0x14e8('0x46')]['offset']);}return _0x2d2a21[_0x14e8('0x77')](_0x11f58f);}})[_0x14e8('0x24')](function(_0x4396fb){if(_0x4396fb){return _0x4396fb?{'count':_0x34475c,'rows':_0x4396fb}:null;}})[_0x14e8('0x24')](respondWithResult(_0x312ab0,null))['catch'](handleError(_0x312ab0,null));};exports[_0x14e8('0x78')]=function(_0x9401b7,_0x2801e9,_0x35da7f){return db['WhatsappAccount'][_0x14e8('0x68')]({'where':{'id':_0x9401b7[_0x14e8('0x58')]['id']}})[_0x14e8('0x24')](handleEntityNotFound(_0x2801e9,null))[_0x14e8('0x24')](function(_0x36ce45){if(_0x36ce45){return db[_0x14e8('0x79')][_0x14e8('0x7a')](function(_0x723645){return db['WhatsappApplication'][_0x14e8('0x39')]({'where':{'WhatsappAccountId':_0x9401b7[_0x14e8('0x58')]['id']},'transaction':_0x723645})[_0x14e8('0x24')](function(_0xc32225){var _0x3c7847=_[_0x14e8('0x3f')](_0x9401b7['body'],function(_0x460e8b){_0x460e8b[_0x14e8('0x67')]=_0x9401b7[_0x14e8('0x58')]['id'];return _0x460e8b;});return db[_0x14e8('0x7b')][_0x14e8('0x7c')](_0x3c7847,{'transaction':_0x723645});});})['then'](function(){return db[_0x14e8('0x7b')][_0x14e8('0x7d')]({'where':{'WhatsappAccountId':_0x9401b7[_0x14e8('0x58')]['id']},'order':_0x14e8('0x7e')});});}})[_0x14e8('0x24')](respondWithResult(_0x2801e9,null))[_0x14e8('0x2f')](handleError(_0x2801e9,null));};exports[_0x14e8('0x7f')]=function(_0x334ec7,_0x4c024d,_0x82622a){var _0x330024={};var _0x107fbc={};var _0x549f96;var _0x3e2159;return db['WhatsappAccount']['findOne']({'where':{'id':_0x334ec7[_0x14e8('0x58')]['id']}})['then'](handleEntityNotFound(_0x4c024d,null))[_0x14e8('0x24')](function(_0x3950fa){if(_0x3950fa){_0x549f96=_0x3950fa;_0x107fbc[_0x14e8('0x45')]=_[_0x14e8('0x47')](db[_0x14e8('0x7b')][_0x14e8('0x41')]);_0x107fbc[_0x14e8('0x46')]=_[_0x14e8('0x47')](_0x334ec7['query']);_0x107fbc[_0x14e8('0x4e')]=_[_0x14e8('0x48')](_0x107fbc[_0x14e8('0x45')],_0x107fbc[_0x14e8('0x46')]);_0x330024[_0x14e8('0x4a')]=_[_0x14e8('0x48')](_0x107fbc[_0x14e8('0x45')],qs['fields'](_0x334ec7['query']['fields']));_0x330024[_0x14e8('0x4a')]=_0x330024[_0x14e8('0x4a')]['length']?_0x330024[_0x14e8('0x4a')]:_0x107fbc['model'];_0x330024[_0x14e8('0x6a')]=qs[_0x14e8('0x6b')](_0x334ec7[_0x14e8('0x46')][_0x14e8('0x6b')]);_0x330024['where']=qs[_0x14e8('0x4e')](_[_0x14e8('0x4f')](_0x334ec7[_0x14e8('0x46')],_0x107fbc[_0x14e8('0x4e')]));if(_0x334ec7[_0x14e8('0x46')]['filter']){_0x330024[_0x14e8('0x50')]=_[_0x14e8('0x51')](_0x330024[_0x14e8('0x50')],{'$or':_['map'](_0x330024['attributes'],function(_0x66f44e){var _0x1d90ee={};_0x1d90ee[_0x66f44e]={'$like':'%'+_0x334ec7[_0x14e8('0x46')][_0x14e8('0x53')]+'%'};return _0x1d90ee;})});}_0x330024=_[_0x14e8('0x51')]({},_0x330024,_0x334ec7['options']);return _0x549f96['getApplications'](_0x330024);}})['then'](function(_0xeff5b6){if(_0xeff5b6){_0x3e2159=_0xeff5b6['length'];if(!_0x334ec7[_0x14e8('0x46')][_0x14e8('0x4c')]('nolimit')){_0x330024['limit']=qs[_0x14e8('0x35')](_0x334ec7[_0x14e8('0x46')]['limit']);_0x330024[_0x14e8('0x34')]=qs[_0x14e8('0x34')](_0x334ec7[_0x14e8('0x46')]['offset']);}return _0x549f96[_0x14e8('0x7f')](_0x330024);}})[_0x14e8('0x24')](function(_0x383f70){if(_0x383f70){return _0x383f70?{'count':_0x3e2159,'rows':_0x383f70}:null;}})[_0x14e8('0x24')](respondWithResult(_0x4c024d,null))['catch'](handleError(_0x4c024d,null));};exports[_0x14e8('0x80')]=function(_0x3b29a7,_0x18adca,_0x236d30){var _0x339f71={'channel':'whatsapp'};var _0x58ca59=[];var _0x4dc977=[];var _0x4611f9={};return db[_0x14e8('0x40')]['find']({'where':{'id':_0x3b29a7['params']['id']},'include':[{'model':db['WhatsappApplication'],'as':_0x14e8('0x81')}]})[_0x14e8('0x24')](handleEntityNotFound(_0x18adca,null))[_0x14e8('0x24')](function(_0x4e11ec){_0x339f71[_0x14e8('0x82')]=_0x4e11ec;_0x339f71[_0x14e8('0x83')]=_[_0x14e8('0x84')](_0x4e11ec[_0x14e8('0x81')],[_0x14e8('0x7e')],[_0x14e8('0x85')]);if(_0x339f71[_0x14e8('0x82')][_0x14e8('0x81')]){delete _0x339f71[_0x14e8('0x82')]['Applications'];}return db['CmContact'][_0x14e8('0x86')]();})[_0x14e8('0x24')](function(_0x242ebc){if(!_0x242ebc){throw new db['Sequelize']['ValidationError'](_0x14e8('0x87'));}_0x58ca59=_[_0x14e8('0x88')](_[_0x14e8('0x47')](_0x242ebc),[_0x14e8('0x89'),_0x14e8('0x8a')]);_0x4dc977=_[_0x14e8('0x88')](_['keys'](_0x242ebc),[_0x14e8('0x89'),_0x14e8('0x8a'),_0x14e8('0x8b'),'ListId']);_0x339f71[_0x14e8('0x5b')]={'mapKey':_0x14e8('0x8c')};if(_0x339f71[_0x14e8('0x82')][_0x14e8('0x43')]&&_0x339f71[_0x14e8('0x82')][_0x14e8('0x43')]===_0x14e8('0x8d')){_0x339f71['body'][_0x14e8('0x8e')]=_0x3b29a7['body']['From'][_0x14e8('0x8f')](_0x14e8('0x90'),'');_0x339f71['body'][_0x14e8('0x5b')]=_0x3b29a7['body'][_0x14e8('0x91')];_0x339f71[_0x14e8('0x5b')]['messageId']=_0x3b29a7['body'][_0x14e8('0x92')];}if(_0x339f71[_0x14e8('0x5b')]['id']){delete _0x339f71[_0x14e8('0x5b')]['id'];}if(_[_0x14e8('0x93')](_0x339f71[_0x14e8('0x5b')][_0x14e8('0x8e')])){throw new db[(_0x14e8('0x20'))][(_0x14e8('0x21'))](_0x14e8('0x94'));}if(_[_0x14e8('0x93')](_0x339f71[_0x14e8('0x5b')]['body'])||_0x339f71[_0x14e8('0x5b')][_0x14e8('0x5b')]===''){throw new db[(_0x14e8('0x20'))]['ValidationError'](_0x14e8('0x95'));}if(_[_0x14e8('0x93')](_0x339f71[_0x14e8('0x5b')]['mapKey'])){throw new db[(_0x14e8('0x20'))][(_0x14e8('0x21'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x4dc977);}if(!_[_0x14e8('0x96')](_0x4dc977,_0x339f71[_0x14e8('0x5b')]['mapKey'])){throw new db['Sequelize']['ValidationError']('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x4dc977);}_0x4611f9[_0x339f71[_0x14e8('0x5b')][_0x14e8('0x97')]]=_0x339f71[_0x14e8('0x5b')]['from'];return db[_0x14e8('0x98')][_0x14e8('0x59')]({'where':{'id':_0x339f71['account'][_0x14e8('0x99')]},'include':[{'model':db[_0x14e8('0x9a')],'as':_0x14e8('0x9b'),'where':_0x4611f9,'limit':0x1,'order':[[_0x14e8('0x8a'),_0x14e8('0x9c')]]}]});})[_0x14e8('0x24')](handleEntityNotFound(_0x18adca,null))['then'](function(_0x3b76ef){if(_0x3b76ef){_0x339f71[_0x14e8('0x9d')]=_['omit'](_0x3b76ef,[_0x14e8('0x9b')]);if(_0x3b76ef[_0x14e8('0x9b')][_0x14e8('0x4b')]){return _0x3b76ef[_0x14e8('0x9b')][0x0];}var _0x2d1b6a=_[_0x14e8('0x1a')](_0x339f71['body'],{'firstName':_0x339f71[_0x14e8('0x5b')][_0x14e8('0x8e')],'ListId':_0x3b76ef['id']});_0x2d1b6a[_0x339f71['body']['mapKey']]=_0x339f71['body'][_0x14e8('0x8e')];return db[_0x14e8('0x9a')]['create'](_0x2d1b6a,{'fields':_0x58ca59,'raw':!![]});}})[_0x14e8('0x24')](handleEntityNotFound(_0x18adca,null))[_0x14e8('0x24')](function(_0x38cd69){if(_0x38cd69){_0x339f71[_0x14e8('0x9e')]=_0x38cd69;var _0x418ff2={'ContactId':_0x38cd69['id'],'phone':_0x339f71[_0x14e8('0x5b')][_0x14e8('0x8e')],'WhatsappAccountId':_0x3b29a7[_0x14e8('0x58')]['id']};var _0x24e019={'ContactId':_0x38cd69['id'],'WhatsappAccountId':_0x3b29a7['params']['id'],'closed':![]};return db[_0x14e8('0x9f')]['find']({'where':_0x24e019})[_0x14e8('0x24')](function(_0x5e9698){if(_0x5e9698){return[_0x5e9698,![]];}return db[_0x14e8('0x9f')][_0x14e8('0x5a')](_0x418ff2)[_0x14e8('0x24')](function(_0x23cfb7){return[_0x23cfb7,!![]];});});}})['spread'](function(_0x28386c,_0x2d9891){_0x339f71['interaction']=_0x28386c[_0x14e8('0x5f')]({'plain':!![]});_0x339f71[_0x14e8('0xa0')][_0x14e8('0xa1')]=![];if(_0x2d9891){if(_0x339f71[_0x14e8('0x82')][_0x14e8('0xa2')]){_0x339f71[_0x14e8('0x83')][_0x14e8('0xa3')]({'id':0x0,'priority':_0x339f71[_0x14e8('0x83')][_0x14e8('0x4b')]+0x1,'app':'close','appdata':_0x14e8('0xa4'),'interval':_0x14e8('0xa5')});}_0x339f71[_0x14e8('0xa0')][_0x14e8('0xa1')]=!![];}return db[_0x14e8('0xa6')][_0x14e8('0x5a')]({'phone':_0x339f71[_0x14e8('0x5b')]['from'],'messageId':_0x339f71[_0x14e8('0x5b')][_0x14e8('0xa7')],'body':_0x339f71[_0x14e8('0x5b')]['body'],'WhatsappAccountId':_0x3b29a7['params']['id'],'WhatsappInteractionId':_0x28386c['id'],'direction':'in','ContactId':_0x28386c[_0x14e8('0xa8')],'AttachmentId':_0x339f71[_0x14e8('0x5b')][_0x14e8('0xa9')]});})[_0x14e8('0x24')](function(_0x5b739d){_0x339f71[_0x14e8('0x2d')]=_0x5b739d;if(_0x339f71[_0x14e8('0xa0')][_0x14e8('0xaa')]){return db['User'][_0x14e8('0x59')]({'attributes':['id',_0x14e8('0x3c')],'where':{'id':_0x339f71[_0x14e8('0xa0')][_0x14e8('0xaa')]}})['then'](function(_0x2f74ab){if(_0x2f74ab){_0x339f71[_0x14e8('0x83')][_0x14e8('0xab')]({'id':0x0,'priority':0x0,'app':_0x14e8('0xac'),'appdata':_0x2f74ab[_0x14e8('0x3c')]+','+(_0x339f71[_0x14e8('0x82')][_0x14e8('0xad')]||0xa),'interval':_0x14e8('0xa5')});}return respondWithRpcPromise(_0x14e8('0xae'),'startRouting',_0x339f71);});}return respondWithRpcPromise(_0x14e8('0xae'),_0x14e8('0xaf'),_0x339f71);})[_0x14e8('0x24')](function(_0x17ce0c){if(_0x17ce0c){var _0x4c38d9=0xc8;var _0x3c6e0b=_0x14e8('0xb0');logger[_0x14e8('0x25')]('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x3c6e0b,_0x4c38d9,_0x14e8('0xb1'));logger['debug'](_0x14e8('0xb2'),_0x3c6e0b,_0x4c38d9,'entity\x20found',JSON[_0x14e8('0x29')](_0x17ce0c));if(_0x339f71[_0x14e8('0x82')][_0x14e8('0x43')]===_0x14e8('0x8d')){return _0x18adca[_0x14e8('0x30')](_0x4c38d9)[_0x14e8('0xb3')](_0x14e8('0xb4'),_0x14e8('0xb5'))['send'](_0x14e8('0xb6'));}else{return _0x18adca[_0x14e8('0x30')](_0x4c38d9)[_0x14e8('0x32')](_0x17ce0c);}}})['catch'](handleError(_0x18adca,null));};exports[_0x14e8('0xb7')]=function(_0x22d2e8,_0x506c27,_0x1a330f){var _0x570219,_0x4484cd,_0x5ac161;if(_[_0x14e8('0x93')](_0x22d2e8[_0x14e8('0x5b')][_0x14e8('0x5b')])||_0x22d2e8[_0x14e8('0x5b')][_0x14e8('0x5b')]===''){throw new db['Sequelize']['ValidationError'](_0x14e8('0x95'));}if(_['isNil'](_0x22d2e8['body']['to'])){throw new db[(_0x14e8('0x20'))][(_0x14e8('0x21'))]('to\x20is\x20mandatory');}_0x570219=_0x22d2e8['body']['to'];return db[_0x14e8('0x40')][_0x14e8('0x59')]({'where':{'id':_0x22d2e8[_0x14e8('0x58')]['id']},'include':[{'model':db['CmList'],'as':_0x14e8('0xb8'),'include':[{'model':db[_0x14e8('0x9a')],'as':_0x14e8('0x9b'),'where':{'mobile':_0x570219},'limit':0x1,'order':[[_0x14e8('0x8a'),_0x14e8('0x9c')]]}]}]})[_0x14e8('0x24')](handleEntityNotFound(_0x506c27,null))['then'](function(_0x48fcbc){if(_0x48fcbc&&_0x48fcbc[_0x14e8('0xb8')]){_0x4484cd=_0x48fcbc[_0x14e8('0x5f')]({'plain':!![]});if(_0x4484cd['List']&&_0x4484cd[_0x14e8('0xb8')]['Contacts'][_0x14e8('0x4b')]){return _0x4484cd[_0x14e8('0xb8')][_0x14e8('0x9b')][0x0];}return db[_0x14e8('0x9a')][_0x14e8('0x5a')](_['defaults'](_0x22d2e8[_0x14e8('0x5b')],{'firstName':_0x570219,'mobile':_0x570219,'phone':_0x570219,'ListId':_0x4484cd[_0x14e8('0x99')]}));}})[_0x14e8('0x24')](handleEntityNotFound(_0x506c27,null))[_0x14e8('0x24')](function(_0x3fe1cf){if(_0x3fe1cf){_0x5ac161=_0x3fe1cf;return db[_0x14e8('0x9f')]['find']({'where':{'ContactId':_0x5ac161['id'],'closed':![],'WhatsappAccountId':_0x4484cd['id']}})[_0x14e8('0x24')](function(_0x400b86){if(_0x400b86){return[_0x400b86,![]];}return db['WhatsappInteraction'][_0x14e8('0x5a')]({'UserId':_0x22d2e8[_0x14e8('0x5c')]['id'],'ContactId':_0x5ac161['id'],'WhatsappAccountId':_0x4484cd['id'],'phone':_0x570219,'firstMsgDirection':'out','Messages':[_[_0x14e8('0x51')](_0x22d2e8[_0x14e8('0x5b')],{'read':![],'body':_0x22d2e8[_0x14e8('0x5b')][_0x14e8('0x5b')],'phone':_0x570219,'WhatsappAccountId':_0x4484cd['id'],'UserId':_0x22d2e8[_0x14e8('0x5c')]['id'],'ContactId':_0x5ac161['id']})]},{'include':[{'model':db[_0x14e8('0xa6')],'as':'Messages'}]})[_0x14e8('0x24')](function(_0x1e3c05){return[_0x1e3c05,!![]];});});}})[_0x14e8('0xb9')](function(_0x263777,_0x247061){if(_0x247061){return _0x263777;}return db[_0x14e8('0xa6')]['create'](_[_0x14e8('0x51')](_0x22d2e8[_0x14e8('0x5b')],{'read':![],'body':_0x22d2e8[_0x14e8('0x5b')]['body'],'phone':_0x570219,'WhatsappAccountId':_0x4484cd['id'],'WhatsappInteractionId':_0x263777['id'],'UserId':_0x22d2e8[_0x14e8('0x5c')]['id'],'ContactId':_0x5ac161['id']}))[_0x14e8('0x24')](function(_0x74f292){_0x263777[_0x14e8('0xba')][_0x14e8('0xbb')]=[];_0x263777['dataValues'][_0x14e8('0xbb')][_0x14e8('0xa3')](_0x74f292[_0x14e8('0xba')]);return _0x263777;});})[_0x14e8('0x24')](respondWithResult(_0x506c27,null))[_0x14e8('0x2f')](handleError(_0x506c27,null));};
\ No newline at end of file
+var _0x58a4=['out','Messages','dataValues','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','redis','defaults','localhost','./whatsappAccount.socket','jayson/promise','client','http','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','WhatsappAccount,\x20%s,\x20%s','request\x20sent','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','end','status','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','get','WhatsappAccounts','UserProfileResource','sendStatus','stack','name','index','Pause','mandatoryDispositionPause','map','WhatsappAccount','fieldName','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','where','pick','filter','merge','options','includeAll','include','findAll','rows','params','rawAttributes','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','WhatsappAccountId','Disposition','getDispositions','findOne','length','sort','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','addAgents','omit','spread','emit','removeAgents','isArray','userWhatsappAccount:remove','getAgents','sequelize','transaction','WhatsappApplication','bulkCreate','findAndCountAll','priority','getApplications','notify','Applications','account','applications','orderBy','Sequelize','no\x20available\x20attributes','difference','updatedAt','createdAt','CompanyId','ListId','mobile','type','twilio','from','From','replace','whatsapp:','Body','messageId','isNil','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','DESC','list','CmContact','contact','WhatsappInteraction','interaction','created','push','close','unmanaged','WhatsappMessage','ContactId','UserId','agent','waitForTheAssignedAgent','*,*,*,*','startRouting','Start','debug','entity\x20found','Content-Type','text/xml','\x0a ','body\x20is\x20mandatory\x20and\x20not\x20empty','to\x20is\x20mandatory','List'];(function(_0x2420e2,_0x589381){var _0x4635a0=function(_0x4694d9){while(--_0x4694d9){_0x2420e2['push'](_0x2420e2['shift']());}};_0x4635a0(++_0x589381);}(_0x58a4,0xbf));var _0x458a=function(_0x5c2e3e,_0x26ecd3){_0x5c2e3e=_0x5c2e3e-0x0;var _0x53f64a=_0x58a4[_0x5c2e3e];return _0x53f64a;};'use strict';var pdf=require(_0x458a('0x0'));var emlformat=require(_0x458a('0x1'));var rimraf=require(_0x458a('0x2'));var zipdir=require(_0x458a('0x3'));var jsonpatch=require(_0x458a('0x4'));var rp=require(_0x458a('0x5'));var moment=require(_0x458a('0x6'));var BPromise=require(_0x458a('0x7'));var Mustache=require(_0x458a('0x8'));var util=require(_0x458a('0x9'));var path=require(_0x458a('0xa'));var sox=require(_0x458a('0xb'));var csv=require(_0x458a('0xc'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x458a('0xd'));var crypto=require(_0x458a('0xe'));var jsforce=require(_0x458a('0xf'));var deskjs=require(_0x458a('0x10'));var toCsv=require(_0x458a('0xc'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x458a('0x11'));var authService=require(_0x458a('0x12'));var qs=require(_0x458a('0x13'));var as=require(_0x458a('0x14'));var hardwareService=require(_0x458a('0x15'));var logger=require('../../config/logger')(_0x458a('0x16'));var utils=require(_0x458a('0x17'));var config=require('../../config/environment');var db=require(_0x458a('0x18'))['db'];config[_0x458a('0x19')]=_[_0x458a('0x1a')](config[_0x458a('0x19')],{'host':_0x458a('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x458a('0x1c'))['register'](socket);var jayson=require(_0x458a('0x1d'));var client=jayson[_0x458a('0x1e')][_0x458a('0x1f')]({'port':0x232c});function checkPasswordPattern(_0x3b74f9,_0xad80f9,_0x29acee){if(_0x29acee){var _0x507b0f=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x507b0f['test'](_0xad80f9)){return _0x3b74f9;}else{throw new db['Sequelize'][(_0x458a('0x20'))](_0x458a('0x21'));}}else{return _0x3b74f9;}}function respondWithRpcPromise(_0x3558b9,_0x5c5b41,_0x310569,_0x260c87){return new BPromise(function(_0x18504d,_0x392986){var _0xa91473=_0x260c87||client;return _0xa91473['request'](_0x3558b9,_0x310569)['then'](function(_0x178db9){logger['info'](_0x458a('0x22'),_0x5c5b41,_0x458a('0x23'));logger['debug'](_0x458a('0x24'),_0x5c5b41,'request\x20sent',JSON[_0x458a('0x25')](_0x178db9));if(_0x178db9[_0x458a('0x26')]){if(_0x178db9['error'][_0x458a('0x27')]===0x1f4){logger[_0x458a('0x26')]('WhatsappAccount,\x20%s,\x20%s',_0x5c5b41,_0x178db9[_0x458a('0x26')]['message']);return _0x392986(_0x178db9[_0x458a('0x26')]['message']);}logger[_0x458a('0x26')]('WhatsappAccount,\x20%s,\x20%s',_0x5c5b41,_0x178db9[_0x458a('0x26')][_0x458a('0x28')]);return _0x18504d(_0x178db9[_0x458a('0x26')][_0x458a('0x28')]);}else{logger[_0x458a('0x29')](_0x458a('0x22'),_0x5c5b41,_0x458a('0x23'));_0x18504d(_0x178db9[_0x458a('0x2a')][_0x458a('0x28')]);}})[_0x458a('0x2b')](function(_0x52efed){logger[_0x458a('0x26')](_0x458a('0x22'),_0x5c5b41,_0x52efed);_0x392986(_0x52efed);});});}function respondWithStatusCode(_0x5a55b7,_0xb94bd9){_0xb94bd9=_0xb94bd9||0xcc;return function(_0x112fa6){if(_0x112fa6){return _0x5a55b7['sendStatus'](_0xb94bd9);}return _0x5a55b7['status'](_0xb94bd9)[_0x458a('0x2c')]();};}function respondWithResult(_0x596fe2,_0x33c5d8){_0x33c5d8=_0x33c5d8||0xc8;return function(_0x29f9b5){if(_0x29f9b5){return _0x596fe2[_0x458a('0x2d')](_0x33c5d8)['json'](_0x29f9b5);}};}function respondWithFilteredResult(_0xa6fdf,_0x2531f7){return function(_0x1426a8){if(_0x1426a8){var _0x562c36=_0x1426a8[_0x458a('0x2e')],_0x47e20d=_0x2531f7['offset'],_0x18c890=_0x2531f7[_0x458a('0x2f')]+_0x2531f7[_0x458a('0x30')],_0x4cf059;if(_0x18c890>=_0x562c36){_0x18c890=_0x562c36;_0x4cf059=0xc8;}else{_0x4cf059=0xce;}_0xa6fdf['status'](_0x4cf059);return _0xa6fdf[_0x458a('0x31')](_0x458a('0x32'),_0x47e20d+'-'+_0x18c890+'/'+_0x562c36)[_0x458a('0x33')](_0x1426a8);}return null;};}function patchUpdates(_0x525caf){return function(_0x3371c3){try{jsonpatch[_0x458a('0x34')](_0x3371c3,_0x525caf,!![]);}catch(_0xaf233b){return BPromise[_0x458a('0x35')](_0xaf233b);}return _0x3371c3[_0x458a('0x36')]();};}function saveUpdates(_0x4fd30f,_0x244ae0){return function(_0x40c80c){if(_0x40c80c){return _0x40c80c[_0x458a('0x37')](_0x4fd30f)[_0x458a('0x38')](function(_0x35ec8f){return _0x35ec8f;});}return null;};}function removeEntity(_0xb1ed1e,_0x4a4808){return function(_0x2a6b9c){if(_0x2a6b9c){return _0x2a6b9c[_0x458a('0x39')]()[_0x458a('0x38')](function(){var _0x2f9b7b=_0x2a6b9c[_0x458a('0x3a')]({'plain':!![]});var _0x19d73a=_0x458a('0x3b');return db[_0x458a('0x3c')][_0x458a('0x39')]({'where':{'type':_0x19d73a,'resourceId':_0x2f9b7b['id']}})['then'](function(){return _0x2a6b9c;});})[_0x458a('0x38')](function(){_0xb1ed1e[_0x458a('0x2d')](0xcc)[_0x458a('0x2c')]();});}};}function handleEntityNotFound(_0x101ece,_0x42e092){return function(_0x2ba6ca){if(!_0x2ba6ca){_0x101ece[_0x458a('0x3d')](0x194);}return _0x2ba6ca;};}function handleError(_0x240cf8,_0x44cf62){_0x44cf62=_0x44cf62||0x1f4;return function(_0x1ecf2f){logger[_0x458a('0x26')](_0x1ecf2f[_0x458a('0x3e')]);if(_0x1ecf2f[_0x458a('0x3f')]){delete _0x1ecf2f[_0x458a('0x3f')];}_0x240cf8[_0x458a('0x2d')](_0x44cf62)['send'](_0x1ecf2f);};}exports[_0x458a('0x40')]=function(_0x397a41,_0x12849d){var _0x12dad4={'include':[{'model':db[_0x458a('0x41')],'as':_0x458a('0x42')}]},_0x3c5840={},_0x46c1de={'count':0x0,'rows':[]};var _0x41d125=_[_0x458a('0x43')](db[_0x458a('0x44')]['rawAttributes'],function(_0x95c42c){return{'name':_0x95c42c[_0x458a('0x45')],'type':_0x95c42c['type'][_0x458a('0x46')]};});_0x3c5840[_0x458a('0x47')]=_[_0x458a('0x43')](_0x41d125,'name');_0x3c5840[_0x458a('0x48')]=_[_0x458a('0x49')](_0x397a41[_0x458a('0x48')]);_0x3c5840[_0x458a('0x4a')]=_[_0x458a('0x4b')](_0x3c5840[_0x458a('0x47')],_0x3c5840[_0x458a('0x48')]);_0x12dad4[_0x458a('0x4c')]=_['intersection'](_0x3c5840[_0x458a('0x47')],qs[_0x458a('0x4d')](_0x397a41[_0x458a('0x48')]['fields']));_0x12dad4[_0x458a('0x4c')]=_0x12dad4[_0x458a('0x4c')]['length']?_0x12dad4[_0x458a('0x4c')]:_0x3c5840[_0x458a('0x47')];if(!_0x397a41[_0x458a('0x48')][_0x458a('0x4e')](_0x458a('0x4f'))){_0x12dad4['limit']=qs['limit'](_0x397a41[_0x458a('0x48')][_0x458a('0x30')]);_0x12dad4[_0x458a('0x2f')]=qs[_0x458a('0x2f')](_0x397a41['query'][_0x458a('0x2f')]);}_0x12dad4[_0x458a('0x50')]=qs['sort'](_0x397a41[_0x458a('0x48')]['sort']);_0x12dad4[_0x458a('0x51')]=qs[_0x458a('0x4a')](_[_0x458a('0x52')](_0x397a41['query'],_0x3c5840[_0x458a('0x4a')]),_0x41d125);if(_0x397a41[_0x458a('0x48')][_0x458a('0x53')]){_0x12dad4['where']=_['merge'](_0x12dad4[_0x458a('0x51')],{'$or':_[_0x458a('0x43')](_0x41d125,function(_0x319863){if(_0x319863['type']!=='VIRTUAL'){var _0x3a7005={};_0x3a7005[_0x319863[_0x458a('0x3f')]]={'$like':'%'+_0x397a41[_0x458a('0x48')][_0x458a('0x53')]+'%'};return _0x3a7005;}})});}_0x12dad4=_[_0x458a('0x54')]({},_0x12dad4,_0x397a41[_0x458a('0x55')]);var _0x41ed70={'where':_0x12dad4[_0x458a('0x51')]};return db[_0x458a('0x44')][_0x458a('0x2e')](_0x41ed70)[_0x458a('0x38')](function(_0x39c41c){_0x46c1de[_0x458a('0x2e')]=_0x39c41c;if(_0x397a41[_0x458a('0x48')][_0x458a('0x56')]){_0x12dad4[_0x458a('0x57')]=[{'all':!![]}];}return db['WhatsappAccount'][_0x458a('0x58')](_0x12dad4);})[_0x458a('0x38')](function(_0x422f6b){_0x46c1de[_0x458a('0x59')]=_0x422f6b;return _0x46c1de;})[_0x458a('0x38')](respondWithFilteredResult(_0x12849d,_0x12dad4))['catch'](handleError(_0x12849d,null));};exports['show']=function(_0x514d82,_0x2abf75){var _0x5b47e0={'raw':![],'where':{'id':_0x514d82[_0x458a('0x5a')]['id']},'include':[{'model':db[_0x458a('0x41')],'as':_0x458a('0x42')}]},_0x236d2f={};_0x236d2f[_0x458a('0x47')]=_['keys'](db['WhatsappAccount'][_0x458a('0x5b')]);_0x236d2f[_0x458a('0x48')]=_[_0x458a('0x49')](_0x514d82[_0x458a('0x48')]);_0x236d2f[_0x458a('0x4a')]=_['intersection'](_0x236d2f[_0x458a('0x47')],_0x236d2f['query']);_0x5b47e0[_0x458a('0x4c')]=_['intersection'](_0x236d2f[_0x458a('0x47')],qs['fields'](_0x514d82['query']['fields']));_0x5b47e0[_0x458a('0x4c')]=_0x5b47e0[_0x458a('0x4c')]['length']?_0x5b47e0[_0x458a('0x4c')]:_0x236d2f[_0x458a('0x47')];if(_0x514d82[_0x458a('0x48')]['includeAll']){_0x5b47e0[_0x458a('0x57')]=[{'all':!![]}];}_0x5b47e0=_[_0x458a('0x54')]({},_0x5b47e0,_0x514d82[_0x458a('0x55')]);return db[_0x458a('0x44')][_0x458a('0x5c')](_0x5b47e0)[_0x458a('0x38')](handleEntityNotFound(_0x2abf75,null))['then'](respondWithResult(_0x2abf75,null))[_0x458a('0x2b')](handleError(_0x2abf75,null));};exports[_0x458a('0x5d')]=function(_0x45325f,_0x39e5b5){return db[_0x458a('0x44')][_0x458a('0x5d')](_0x45325f[_0x458a('0x5e')],{})[_0x458a('0x38')](function(_0x50fdf4){var _0xb365f5=_0x45325f['user'][_0x458a('0x3a')]({'plain':!![]});if(!_0xb365f5)throw new Error(_0x458a('0x5f'));if(_0xb365f5[_0x458a('0x60')]===_0x458a('0x61')){var _0x4da240=_0x50fdf4['get']({'plain':!![]});var _0xe7dc86=_0x458a('0x3b');return db[_0x458a('0x62')][_0x458a('0x5c')]({'where':{'name':_0xe7dc86,'userProfileId':_0xb365f5[_0x458a('0x63')]},'raw':!![]})[_0x458a('0x38')](function(_0x549cc2){if(_0x549cc2&&_0x549cc2[_0x458a('0x64')]===0x0){return db[_0x458a('0x3c')]['create']({'name':_0x4da240[_0x458a('0x3f')],'resourceId':_0x4da240['id'],'type':_0x549cc2['name'],'sectionId':_0x549cc2['id']},{})[_0x458a('0x38')](function(){return _0x50fdf4;});}else{return _0x50fdf4;}})[_0x458a('0x2b')](function(_0xa37d44){logger[_0x458a('0x26')](_0x458a('0x65'),_0xa37d44);throw _0xa37d44;});}return _0x50fdf4;})[_0x458a('0x38')](respondWithResult(_0x39e5b5,0xc9))[_0x458a('0x2b')](handleError(_0x39e5b5,null));};exports[_0x458a('0x37')]=function(_0x4c97b4,_0x3fd126){if(_0x4c97b4[_0x458a('0x5e')]['id']){delete _0x4c97b4['body']['id'];}return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0x4c97b4['params']['id']},'include':[{'model':db[_0x458a('0x41')],'as':_0x458a('0x42')}]})['then'](handleEntityNotFound(_0x3fd126,null))[_0x458a('0x38')](saveUpdates(_0x4c97b4[_0x458a('0x5e')],null))['then'](respondWithResult(_0x3fd126,null))[_0x458a('0x2b')](handleError(_0x3fd126,null));};exports[_0x458a('0x39')]=function(_0xce9756,_0x404d93){return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0xce9756[_0x458a('0x5a')]['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x404d93,null))['then'](removeEntity(_0x404d93,null))[_0x458a('0x2b')](handleError(_0x404d93,null));};exports[_0x458a('0x66')]=function(_0x29b11e,_0x31d520){return db[_0x458a('0x44')][_0x458a('0x66')]()[_0x458a('0x38')](respondWithResult(_0x31d520,null))[_0x458a('0x2b')](handleError(_0x31d520,null));};exports[_0x458a('0x67')]=function(_0xfe46ae,_0x546519,_0x3837b7){if(_0xfe46ae['body']['id']){delete _0xfe46ae[_0x458a('0x5e')]['id'];}return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0xfe46ae[_0x458a('0x5a')]['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x546519,null))[_0x458a('0x38')](function(_0x2c6a00){if(_0x2c6a00){_0xfe46ae[_0x458a('0x5e')][_0x458a('0x68')]=_0x2c6a00['id'];return db[_0x458a('0x69')][_0x458a('0x5d')](_0xfe46ae[_0x458a('0x5e')]);}})[_0x458a('0x38')](respondWithResult(_0x546519,null))[_0x458a('0x2b')](handleError(_0x546519,null));};exports[_0x458a('0x6a')]=function(_0x2c131b,_0x4c426a,_0x120b8e){var _0x573089={'raw':![],'where':{}};var _0x10dde3={};var _0x2ea9ce={'count':0x0,'rows':[]};return db['WhatsappAccount'][_0x458a('0x6b')]({'where':{'id':_0x2c131b[_0x458a('0x5a')]['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x4c426a,null))['then'](function(_0x3cf58c){if(_0x3cf58c){_0x10dde3[_0x458a('0x47')]=_[_0x458a('0x49')](db[_0x458a('0x69')][_0x458a('0x5b')]);_0x10dde3[_0x458a('0x48')]=_['keys'](_0x2c131b[_0x458a('0x48')]);_0x10dde3['filters']=_['intersection'](_0x10dde3[_0x458a('0x47')],_0x10dde3[_0x458a('0x48')]);_0x573089[_0x458a('0x4c')]=_[_0x458a('0x4b')](_0x10dde3[_0x458a('0x47')],qs[_0x458a('0x4d')](_0x2c131b[_0x458a('0x48')][_0x458a('0x4d')]));_0x573089[_0x458a('0x4c')]=_0x573089[_0x458a('0x4c')][_0x458a('0x6c')]?_0x573089[_0x458a('0x4c')]:_0x10dde3[_0x458a('0x47')];if(!_0x2c131b[_0x458a('0x48')]['hasOwnProperty']('nolimit')){_0x573089['limit']=qs[_0x458a('0x30')](_0x2c131b['query'][_0x458a('0x30')]);_0x573089[_0x458a('0x2f')]=qs[_0x458a('0x2f')](_0x2c131b[_0x458a('0x48')][_0x458a('0x2f')]);}_0x573089[_0x458a('0x50')]=qs[_0x458a('0x6d')](_0x2c131b['query'][_0x458a('0x6d')]);_0x573089[_0x458a('0x51')]=qs['filters'](_[_0x458a('0x52')](_0x2c131b['query'],_0x10dde3[_0x458a('0x4a')]));_0x573089['where'][_0x458a('0x68')]=_0x3cf58c['id'];if(_0x2c131b[_0x458a('0x48')][_0x458a('0x53')]){_0x573089[_0x458a('0x51')]=_['merge'](_0x573089[_0x458a('0x51')],{'$or':_[_0x458a('0x43')](_0x573089[_0x458a('0x4c')],function(_0x239e2f){var _0x18fb71={};_0x18fb71[_0x239e2f]={'$like':'%'+_0x2c131b[_0x458a('0x48')][_0x458a('0x53')]+'%'};return _0x18fb71;})});}_0x573089=_[_0x458a('0x54')]({},_0x573089,_0x2c131b['options']);return db[_0x458a('0x69')][_0x458a('0x2e')]({'where':_0x573089[_0x458a('0x51')]})[_0x458a('0x38')](function(_0x591dbb){_0x2ea9ce[_0x458a('0x2e')]=_0x591dbb;if(_0x2c131b[_0x458a('0x48')]['includeAll']){_0x573089[_0x458a('0x57')]=[{'all':!![]}];}return db[_0x458a('0x69')][_0x458a('0x58')](_0x573089);})[_0x458a('0x38')](function(_0x3b0888){_0x2ea9ce['rows']=_0x3b0888;return _0x2ea9ce;});}})[_0x458a('0x38')](respondWithFilteredResult(_0x4c426a,_0x573089))[_0x458a('0x2b')](handleError(_0x4c426a,null));};exports[_0x458a('0x6e')]=function(_0x1dbaa7,_0x2006d7,_0x46ac5c){return db[_0x458a('0x44')]['find']({'where':{'id':_0x1dbaa7[_0x458a('0x5a')]['id']}})['then'](handleEntityNotFound(_0x2006d7,null))[_0x458a('0x38')](function(_0x36e650){if(_0x36e650){return _0x36e650[_0x458a('0x6e')](_0x1dbaa7['query'][_0x458a('0x6f')]);}})['then'](respondWithStatusCode(_0x2006d7,null))['catch'](handleError(_0x2006d7,null));};exports[_0x458a('0x70')]=function(_0x400601,_0x5464a5,_0x480e71){if(_0x400601[_0x458a('0x5e')]['id']){delete _0x400601[_0x458a('0x5e')]['id'];}return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0x400601[_0x458a('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5464a5,null))[_0x458a('0x38')](function(_0x579fa4){if(_0x579fa4){_0x400601[_0x458a('0x5e')][_0x458a('0x68')]=_0x579fa4['id'];return db[_0x458a('0x71')]['create'](_0x400601[_0x458a('0x5e')]);}})[_0x458a('0x38')](respondWithResult(_0x5464a5,null))['catch'](handleError(_0x5464a5,null));};exports[_0x458a('0x72')]=function(_0x5bf72f,_0x2c11c8,_0x3fc263){var _0x470a3f={'raw':![],'where':{}};var _0xcd3781={};var _0x55a431={'count':0x0,'rows':[]};return db[_0x458a('0x44')]['findOne']({'where':{'id':_0x5bf72f['params']['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x2c11c8,null))[_0x458a('0x38')](function(_0x28c3e5){if(_0x28c3e5){_0xcd3781[_0x458a('0x47')]=_[_0x458a('0x49')](db[_0x458a('0x71')]['rawAttributes']);_0xcd3781[_0x458a('0x48')]=_[_0x458a('0x49')](_0x5bf72f[_0x458a('0x48')]);_0xcd3781[_0x458a('0x4a')]=_[_0x458a('0x4b')](_0xcd3781[_0x458a('0x47')],_0xcd3781['query']);_0x470a3f[_0x458a('0x4c')]=_[_0x458a('0x4b')](_0xcd3781[_0x458a('0x47')],qs['fields'](_0x5bf72f[_0x458a('0x48')][_0x458a('0x4d')]));_0x470a3f[_0x458a('0x4c')]=_0x470a3f['attributes']['length']?_0x470a3f[_0x458a('0x4c')]:_0xcd3781['model'];if(!_0x5bf72f['query']['hasOwnProperty']('nolimit')){_0x470a3f['limit']=qs[_0x458a('0x30')](_0x5bf72f['query'][_0x458a('0x30')]);_0x470a3f[_0x458a('0x2f')]=qs[_0x458a('0x2f')](_0x5bf72f[_0x458a('0x48')][_0x458a('0x2f')]);}_0x470a3f[_0x458a('0x50')]=qs['sort'](_0x5bf72f[_0x458a('0x48')]['sort']);_0x470a3f[_0x458a('0x51')]=qs['filters'](_[_0x458a('0x52')](_0x5bf72f[_0x458a('0x48')],_0xcd3781['filters']));_0x470a3f['where']['WhatsappAccountId']=_0x28c3e5['id'];if(_0x5bf72f[_0x458a('0x48')][_0x458a('0x53')]){_0x470a3f[_0x458a('0x51')]=_[_0x458a('0x54')](_0x470a3f[_0x458a('0x51')],{'$or':_['map'](_0x470a3f[_0x458a('0x4c')],function(_0x41e32f){var _0x137c4d={};_0x137c4d[_0x41e32f]={'$like':'%'+_0x5bf72f[_0x458a('0x48')][_0x458a('0x53')]+'%'};return _0x137c4d;})});}_0x470a3f=_[_0x458a('0x54')]({},_0x470a3f,_0x5bf72f[_0x458a('0x55')]);return db[_0x458a('0x71')]['count']({'where':_0x470a3f[_0x458a('0x51')]})[_0x458a('0x38')](function(_0x3dec45){_0x55a431[_0x458a('0x2e')]=_0x3dec45;if(_0x5bf72f[_0x458a('0x48')][_0x458a('0x56')]){_0x470a3f[_0x458a('0x57')]=[{'all':!![]}];}return db['CannedAnswer']['findAll'](_0x470a3f);})['then'](function(_0x53a93e){_0x55a431[_0x458a('0x59')]=_0x53a93e;return _0x55a431;});}})[_0x458a('0x38')](respondWithFilteredResult(_0x2c11c8,_0x470a3f))[_0x458a('0x2b')](handleError(_0x2c11c8,null));};exports[_0x458a('0x73')]=function(_0x4d2115,_0x7db038,_0x4514df){return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0x4d2115['params']['id']}})['then'](handleEntityNotFound(_0x7db038,null))[_0x458a('0x38')](function(_0x2a5b20){if(_0x2a5b20){return _0x2a5b20[_0x458a('0x73')](_0x4d2115[_0x458a('0x48')]['ids']);}})[_0x458a('0x38')](respondWithStatusCode(_0x7db038,null))[_0x458a('0x2b')](handleError(_0x7db038,null));};exports[_0x458a('0x74')]=function(_0x2e730c,_0x42a0dd,_0x1a658e){return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0x2e730c[_0x458a('0x5a')]['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x42a0dd,null))['then'](function(_0x5d334b){if(_0x5d334b){return _0x5d334b[_0x458a('0x74')](_0x2e730c[_0x458a('0x5e')][_0x458a('0x6f')],_[_0x458a('0x75')](_0x2e730c[_0x458a('0x5e')],[_0x458a('0x6f'),'id'])||{})[_0x458a('0x76')](function(_0x583d8a){for(var _0x36e854=0x0;_0x36e854<_0x2e730c['body'][_0x458a('0x6f')][_0x458a('0x6c')];_0x36e854+=0x1){socket[_0x458a('0x77')]('userWhatsappAccount:save',{'UserId':_0x2e730c['body'][_0x458a('0x6f')][_0x36e854],'WhatsappAccountId':_0x2e730c[_0x458a('0x5a')]['id']});}return _0x583d8a;});}})[_0x458a('0x38')](respondWithResult(_0x42a0dd,null))[_0x458a('0x2b')](handleError(_0x42a0dd,null));};exports[_0x458a('0x78')]=function(_0x53d065,_0x391854,_0x35d811){return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0x53d065[_0x458a('0x5a')]['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x391854,null))[_0x458a('0x38')](function(_0x3dc1fe){if(_0x3dc1fe){return _0x3dc1fe[_0x458a('0x78')](_0x53d065['query'][_0x458a('0x6f')])['then'](function(){if(_[_0x458a('0x79')](_0x53d065[_0x458a('0x48')][_0x458a('0x6f')])){for(var _0x58b920=0x0;_0x58b920<_0x53d065['query'][_0x458a('0x6f')]['length'];_0x58b920+=0x1){socket[_0x458a('0x77')]('userWhatsappAccount:remove',{'UserId':Number(_0x53d065[_0x458a('0x48')][_0x458a('0x6f')][_0x58b920]),'WhatsappAccountId':Number(_0x53d065[_0x458a('0x5a')]['id'])});}}else{socket['emit'](_0x458a('0x7a'),{'UserId':Number(_0x53d065[_0x458a('0x48')]['ids']),'WhatsappAccountId':Number(_0x53d065[_0x458a('0x5a')]['id'])});}});}})['then'](respondWithStatusCode(_0x391854,null))[_0x458a('0x2b')](handleError(_0x391854,null));};exports[_0x458a('0x7b')]=function(_0xe55a17,_0x49bdfc,_0x2c51f6){var _0x198306={};var _0x9f7d4={};var _0x3c09e2;var _0x395456;return db[_0x458a('0x44')]['findOne']({'where':{'id':_0xe55a17[_0x458a('0x5a')]['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x49bdfc,null))['then'](function(_0x13db18){if(_0x13db18){_0x3c09e2=_0x13db18;_0x9f7d4[_0x458a('0x47')]=_[_0x458a('0x49')](db['User'][_0x458a('0x5b')]);_0x9f7d4[_0x458a('0x48')]=_[_0x458a('0x49')](_0xe55a17['query']);_0x9f7d4[_0x458a('0x4a')]=_[_0x458a('0x4b')](_0x9f7d4[_0x458a('0x47')],_0x9f7d4[_0x458a('0x48')]);_0x198306[_0x458a('0x4c')]=_[_0x458a('0x4b')](_0x9f7d4[_0x458a('0x47')],qs[_0x458a('0x4d')](_0xe55a17['query'][_0x458a('0x4d')]));_0x198306['attributes']=_0x198306['attributes'][_0x458a('0x6c')]?_0x198306[_0x458a('0x4c')]:_0x9f7d4['model'];_0x198306[_0x458a('0x50')]=qs['sort'](_0xe55a17[_0x458a('0x48')]['sort']);_0x198306[_0x458a('0x51')]=qs[_0x458a('0x4a')](_[_0x458a('0x52')](_0xe55a17[_0x458a('0x48')],_0x9f7d4['filters']));if(_0xe55a17[_0x458a('0x48')][_0x458a('0x53')]){_0x198306[_0x458a('0x51')]=_['merge'](_0x198306[_0x458a('0x51')],{'$or':_[_0x458a('0x43')](_0x198306[_0x458a('0x4c')],function(_0x274ac2){var _0x4ca16b={};_0x4ca16b[_0x274ac2]={'$like':'%'+_0xe55a17[_0x458a('0x48')]['filter']+'%'};return _0x4ca16b;})});}_0x198306=_['merge']({},_0x198306,_0xe55a17['options']);return _0x3c09e2[_0x458a('0x7b')](_0x198306);}})[_0x458a('0x38')](function(_0x4a1acc){if(_0x4a1acc){_0x395456=_0x4a1acc[_0x458a('0x6c')];if(!_0xe55a17['query'][_0x458a('0x4e')]('nolimit')){_0x198306[_0x458a('0x30')]=qs['limit'](_0xe55a17[_0x458a('0x48')][_0x458a('0x30')]);_0x198306[_0x458a('0x2f')]=qs[_0x458a('0x2f')](_0xe55a17[_0x458a('0x48')][_0x458a('0x2f')]);}return _0x3c09e2[_0x458a('0x7b')](_0x198306);}})['then'](function(_0x45ae1f){if(_0x45ae1f){return _0x45ae1f?{'count':_0x395456,'rows':_0x45ae1f}:null;}})[_0x458a('0x38')](respondWithResult(_0x49bdfc,null))[_0x458a('0x2b')](handleError(_0x49bdfc,null));};exports['addApplications']=function(_0x5c5a07,_0x334129,_0x39e9c2){return db[_0x458a('0x44')][_0x458a('0x6b')]({'where':{'id':_0x5c5a07[_0x458a('0x5a')]['id']}})['then'](handleEntityNotFound(_0x334129,null))[_0x458a('0x38')](function(_0x2416e1){if(_0x2416e1){return db[_0x458a('0x7c')][_0x458a('0x7d')](function(_0x250165){return db['WhatsappApplication'][_0x458a('0x39')]({'where':{'WhatsappAccountId':_0x5c5a07[_0x458a('0x5a')]['id']},'transaction':_0x250165})[_0x458a('0x38')](function(_0x2c2fbf){var _0x3cdc9f=_[_0x458a('0x43')](_0x5c5a07[_0x458a('0x5e')],function(_0x50c20c){_0x50c20c[_0x458a('0x68')]=_0x5c5a07['params']['id'];return _0x50c20c;});return db[_0x458a('0x7e')][_0x458a('0x7f')](_0x3cdc9f,{'transaction':_0x250165});});})[_0x458a('0x38')](function(){return db[_0x458a('0x7e')][_0x458a('0x80')]({'where':{'WhatsappAccountId':_0x5c5a07['params']['id']},'order':_0x458a('0x81')});});}})[_0x458a('0x38')](respondWithResult(_0x334129,null))[_0x458a('0x2b')](handleError(_0x334129,null));};exports[_0x458a('0x82')]=function(_0x1eca8e,_0x59bb86,_0x1f8d7f){var _0x381116={};var _0x3e3c19={};var _0x3d9af8;var _0x33e755;return db['WhatsappAccount']['findOne']({'where':{'id':_0x1eca8e['params']['id']}})[_0x458a('0x38')](handleEntityNotFound(_0x59bb86,null))[_0x458a('0x38')](function(_0xe951c6){if(_0xe951c6){_0x3d9af8=_0xe951c6;_0x3e3c19[_0x458a('0x47')]=_[_0x458a('0x49')](db['WhatsappApplication'][_0x458a('0x5b')]);_0x3e3c19[_0x458a('0x48')]=_['keys'](_0x1eca8e[_0x458a('0x48')]);_0x3e3c19[_0x458a('0x4a')]=_['intersection'](_0x3e3c19[_0x458a('0x47')],_0x3e3c19[_0x458a('0x48')]);_0x381116[_0x458a('0x4c')]=_['intersection'](_0x3e3c19['model'],qs[_0x458a('0x4d')](_0x1eca8e[_0x458a('0x48')]['fields']));_0x381116[_0x458a('0x4c')]=_0x381116['attributes'][_0x458a('0x6c')]?_0x381116[_0x458a('0x4c')]:_0x3e3c19['model'];_0x381116[_0x458a('0x50')]=qs[_0x458a('0x6d')](_0x1eca8e[_0x458a('0x48')]['sort']);_0x381116[_0x458a('0x51')]=qs[_0x458a('0x4a')](_[_0x458a('0x52')](_0x1eca8e[_0x458a('0x48')],_0x3e3c19['filters']));if(_0x1eca8e[_0x458a('0x48')][_0x458a('0x53')]){_0x381116[_0x458a('0x51')]=_[_0x458a('0x54')](_0x381116[_0x458a('0x51')],{'$or':_[_0x458a('0x43')](_0x381116['attributes'],function(_0x41920e){var _0x1968c6={};_0x1968c6[_0x41920e]={'$like':'%'+_0x1eca8e[_0x458a('0x48')]['filter']+'%'};return _0x1968c6;})});}_0x381116=_[_0x458a('0x54')]({},_0x381116,_0x1eca8e[_0x458a('0x55')]);return _0x3d9af8[_0x458a('0x82')](_0x381116);}})[_0x458a('0x38')](function(_0x4a1d9d){if(_0x4a1d9d){_0x33e755=_0x4a1d9d[_0x458a('0x6c')];if(!_0x1eca8e[_0x458a('0x48')][_0x458a('0x4e')](_0x458a('0x4f'))){_0x381116[_0x458a('0x30')]=qs[_0x458a('0x30')](_0x1eca8e['query'][_0x458a('0x30')]);_0x381116[_0x458a('0x2f')]=qs[_0x458a('0x2f')](_0x1eca8e[_0x458a('0x48')]['offset']);}return _0x3d9af8[_0x458a('0x82')](_0x381116);}})['then'](function(_0x208aa9){if(_0x208aa9){return _0x208aa9?{'count':_0x33e755,'rows':_0x208aa9}:null;}})[_0x458a('0x38')](respondWithResult(_0x59bb86,null))[_0x458a('0x2b')](handleError(_0x59bb86,null));};exports[_0x458a('0x83')]=function(_0x3c991a,_0x2f305a,_0x4bdead){var _0x3132f0={'channel':'whatsapp'};var _0x1675ac=[];var _0x4b61bf=[];var _0x3245fc={};return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0x3c991a[_0x458a('0x5a')]['id']},'include':[{'model':db[_0x458a('0x7e')],'as':_0x458a('0x84')}]})[_0x458a('0x38')](handleEntityNotFound(_0x2f305a,null))[_0x458a('0x38')](function(_0x1201f9){_0x3132f0[_0x458a('0x85')]=_0x1201f9;_0x3132f0[_0x458a('0x86')]=_[_0x458a('0x87')](_0x1201f9['Applications'],[_0x458a('0x81')],['asc']);if(_0x3132f0[_0x458a('0x85')][_0x458a('0x84')]){delete _0x3132f0[_0x458a('0x85')]['Applications'];}return db['CmContact']['describe']();})[_0x458a('0x38')](function(_0x1ebd4a){if(!_0x1ebd4a){throw new db[(_0x458a('0x88'))]['ValidationError'](_0x458a('0x89'));}_0x1675ac=_[_0x458a('0x8a')](_[_0x458a('0x49')](_0x1ebd4a),['createdAt',_0x458a('0x8b')]);_0x4b61bf=_[_0x458a('0x8a')](_['keys'](_0x1ebd4a),[_0x458a('0x8c'),_0x458a('0x8b'),_0x458a('0x8d'),_0x458a('0x8e')]);_0x3132f0['body']={'mapKey':_0x458a('0x8f')};if(_0x3132f0[_0x458a('0x85')][_0x458a('0x90')]&&_0x3132f0[_0x458a('0x85')][_0x458a('0x90')]===_0x458a('0x91')){_0x3132f0[_0x458a('0x5e')][_0x458a('0x92')]=_0x3c991a[_0x458a('0x5e')][_0x458a('0x93')][_0x458a('0x94')](_0x458a('0x95'),'');_0x3132f0['body']['body']=_0x3c991a[_0x458a('0x5e')][_0x458a('0x96')];_0x3132f0[_0x458a('0x5e')][_0x458a('0x97')]=_0x3c991a[_0x458a('0x5e')]['MessageSid'];}if(_0x3132f0[_0x458a('0x5e')]['id']){delete _0x3132f0[_0x458a('0x5e')]['id'];}if(_[_0x458a('0x98')](_0x3132f0[_0x458a('0x5e')][_0x458a('0x92')])){throw new db[(_0x458a('0x88'))][(_0x458a('0x20'))]('from\x20is\x20mandatory');}if(_[_0x458a('0x98')](_0x3132f0[_0x458a('0x5e')]['body'])||_0x3132f0[_0x458a('0x5e')][_0x458a('0x5e')]===''){throw new db[(_0x458a('0x88'))][(_0x458a('0x20'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x458a('0x98')](_0x3132f0[_0x458a('0x5e')][_0x458a('0x99')])){throw new db[(_0x458a('0x88'))][(_0x458a('0x20'))](_0x458a('0x9a')+_0x4b61bf);}if(!_[_0x458a('0x9b')](_0x4b61bf,_0x3132f0[_0x458a('0x5e')]['mapKey'])){throw new db[(_0x458a('0x88'))][(_0x458a('0x20'))](_0x458a('0x9c')+_0x4b61bf);}_0x3245fc[_0x3132f0['body'][_0x458a('0x99')]]=_0x3132f0[_0x458a('0x5e')]['from'];return db[_0x458a('0x9d')][_0x458a('0x5c')]({'where':{'id':_0x3132f0[_0x458a('0x85')][_0x458a('0x8e')]},'include':[{'model':db['CmContact'],'as':_0x458a('0x9e'),'where':_0x3245fc,'limit':0x1,'order':[['updatedAt',_0x458a('0x9f')]]}]});})[_0x458a('0x38')](handleEntityNotFound(_0x2f305a,null))[_0x458a('0x38')](function(_0x2255e6){if(_0x2255e6){_0x3132f0[_0x458a('0xa0')]=_[_0x458a('0x75')](_0x2255e6,[_0x458a('0x9e')]);if(_0x2255e6['Contacts'][_0x458a('0x6c')]){return _0x2255e6[_0x458a('0x9e')][0x0];}var _0x48e560=_[_0x458a('0x1a')](_0x3132f0[_0x458a('0x5e')],{'firstName':_0x3132f0['body']['from'],'ListId':_0x2255e6['id']});_0x48e560[_0x3132f0[_0x458a('0x5e')][_0x458a('0x99')]]=_0x3132f0[_0x458a('0x5e')][_0x458a('0x92')];return db[_0x458a('0xa1')]['create'](_0x48e560,{'fields':_0x1675ac,'raw':!![]});}})[_0x458a('0x38')](handleEntityNotFound(_0x2f305a,null))[_0x458a('0x38')](function(_0x388d7c){if(_0x388d7c){_0x3132f0[_0x458a('0xa2')]=_0x388d7c;var _0x582783={'ContactId':_0x388d7c['id'],'phone':_0x3132f0[_0x458a('0x5e')][_0x458a('0x92')],'WhatsappAccountId':_0x3c991a[_0x458a('0x5a')]['id']};var _0x1017f2={'ContactId':_0x388d7c['id'],'WhatsappAccountId':_0x3c991a[_0x458a('0x5a')]['id'],'closed':![]};return db[_0x458a('0xa3')][_0x458a('0x5c')]({'where':_0x1017f2})['then'](function(_0x3f82aa){if(_0x3f82aa){return[_0x3f82aa,![]];}return db[_0x458a('0xa3')][_0x458a('0x5d')](_0x582783)[_0x458a('0x38')](function(_0x161287){return[_0x161287,!![]];});});}})[_0x458a('0x76')](function(_0x416a29,_0x6dd18d){_0x3132f0['interaction']=_0x416a29[_0x458a('0x3a')]({'plain':!![]});_0x3132f0[_0x458a('0xa4')][_0x458a('0xa5')]=![];if(_0x6dd18d){if(_0x3132f0[_0x458a('0x85')]['autoclose']){_0x3132f0[_0x458a('0x86')][_0x458a('0xa6')]({'id':0x0,'priority':_0x3132f0['applications']['length']+0x1,'app':_0x458a('0xa7'),'appdata':_0x458a('0xa8'),'interval':'*,*,*,*'});}_0x3132f0[_0x458a('0xa4')]['created']=!![];}return db[_0x458a('0xa9')]['create']({'phone':_0x3132f0[_0x458a('0x5e')][_0x458a('0x92')],'messageId':_0x3132f0['body'][_0x458a('0x97')],'body':_0x3132f0[_0x458a('0x5e')][_0x458a('0x5e')],'WhatsappAccountId':_0x3c991a[_0x458a('0x5a')]['id'],'WhatsappInteractionId':_0x416a29['id'],'direction':'in','ContactId':_0x416a29[_0x458a('0xaa')],'AttachmentId':_0x3132f0[_0x458a('0x5e')]['AttachmentId']});})['then'](function(_0x7327fd){_0x3132f0[_0x458a('0x28')]=_0x7327fd;if(_0x3132f0['interaction'][_0x458a('0xab')]){return db['User'][_0x458a('0x5c')]({'attributes':['id',_0x458a('0x3f')],'where':{'id':_0x3132f0[_0x458a('0xa4')][_0x458a('0xab')]}})['then'](function(_0x5b06b6){if(_0x5b06b6){_0x3132f0[_0x458a('0x86')]['unshift']({'id':0x0,'priority':0x0,'app':_0x458a('0xac'),'appdata':_0x5b06b6['name']+','+(_0x3132f0[_0x458a('0x85')][_0x458a('0xad')]||0xa),'interval':_0x458a('0xae')});}return respondWithRpcPromise('Start',_0x458a('0xaf'),_0x3132f0);});}return respondWithRpcPromise(_0x458a('0xb0'),'startRouting',_0x3132f0);})[_0x458a('0x38')](function(_0x4401d9){if(_0x4401d9){var _0x2f7643=0xc8;var _0x246cad='receiveMessage';logger['info']('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x246cad,_0x2f7643,'entity\x20found');logger[_0x458a('0xb1')]('WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s',_0x246cad,_0x2f7643,_0x458a('0xb2'),JSON[_0x458a('0x25')](_0x4401d9));if(_0x3132f0[_0x458a('0x85')][_0x458a('0x90')]===_0x458a('0x91')){return _0x2f305a['status'](_0x2f7643)[_0x458a('0x31')](_0x458a('0xb3'),_0x458a('0xb4'))['send'](_0x458a('0xb5'));}else{return _0x2f305a['status'](_0x2f7643)[_0x458a('0x33')](_0x4401d9);}}})[_0x458a('0x2b')](handleError(_0x2f305a,null));};exports['send']=function(_0x4788e1,_0x292c1e,_0x4b275f){var _0x1897bb,_0x564bdb,_0x183db9;if(_[_0x458a('0x98')](_0x4788e1[_0x458a('0x5e')][_0x458a('0x5e')])||_0x4788e1['body'][_0x458a('0x5e')]===''){throw new db['Sequelize'][(_0x458a('0x20'))](_0x458a('0xb6'));}if(_[_0x458a('0x98')](_0x4788e1[_0x458a('0x5e')]['to'])){throw new db[(_0x458a('0x88'))][(_0x458a('0x20'))](_0x458a('0xb7'));}_0x1897bb=_0x4788e1['body']['to'];return db[_0x458a('0x44')][_0x458a('0x5c')]({'where':{'id':_0x4788e1[_0x458a('0x5a')]['id']},'include':[{'model':db[_0x458a('0x9d')],'as':'List','include':[{'model':db[_0x458a('0xa1')],'as':'Contacts','where':{'mobile':_0x1897bb},'limit':0x1,'order':[['updatedAt',_0x458a('0x9f')]]}]}]})[_0x458a('0x38')](handleEntityNotFound(_0x292c1e,null))[_0x458a('0x38')](function(_0x3f9375){if(_0x3f9375&&_0x3f9375[_0x458a('0xb8')]){_0x564bdb=_0x3f9375[_0x458a('0x3a')]({'plain':!![]});if(_0x564bdb[_0x458a('0xb8')]&&_0x564bdb[_0x458a('0xb8')][_0x458a('0x9e')][_0x458a('0x6c')]){return _0x564bdb[_0x458a('0xb8')][_0x458a('0x9e')][0x0];}return db['CmContact'][_0x458a('0x5d')](_[_0x458a('0x1a')](_0x4788e1[_0x458a('0x5e')],{'firstName':_0x1897bb,'mobile':_0x1897bb,'phone':_0x1897bb,'ListId':_0x564bdb['ListId']}));}})[_0x458a('0x38')](handleEntityNotFound(_0x292c1e,null))['then'](function(_0x53c6bc){if(_0x53c6bc){_0x183db9=_0x53c6bc;return db[_0x458a('0xa3')][_0x458a('0x5c')]({'where':{'ContactId':_0x183db9['id'],'closed':![],'WhatsappAccountId':_0x564bdb['id']}})[_0x458a('0x38')](function(_0xa608fb){if(_0xa608fb){return[_0xa608fb,![]];}return db[_0x458a('0xa3')][_0x458a('0x5d')]({'UserId':_0x4788e1[_0x458a('0x61')]['id'],'ContactId':_0x183db9['id'],'WhatsappAccountId':_0x564bdb['id'],'phone':_0x1897bb,'firstMsgDirection':_0x458a('0xb9'),'Messages':[_[_0x458a('0x54')](_0x4788e1['body'],{'read':![],'body':_0x4788e1['body']['body'],'phone':_0x1897bb,'WhatsappAccountId':_0x564bdb['id'],'UserId':_0x4788e1[_0x458a('0x61')]['id'],'ContactId':_0x183db9['id']})]},{'include':[{'model':db[_0x458a('0xa9')],'as':_0x458a('0xba')}]})[_0x458a('0x38')](function(_0xc5ce00){return[_0xc5ce00,!![]];});});}})[_0x458a('0x76')](function(_0x513721,_0x3e8093){if(_0x3e8093){return _0x513721;}return db[_0x458a('0xa9')][_0x458a('0x5d')](_[_0x458a('0x54')](_0x4788e1[_0x458a('0x5e')],{'read':![],'body':_0x4788e1['body'][_0x458a('0x5e')],'phone':_0x1897bb,'WhatsappAccountId':_0x564bdb['id'],'WhatsappInteractionId':_0x513721['id'],'UserId':_0x4788e1[_0x458a('0x61')]['id'],'ContactId':_0x183db9['id']}))[_0x458a('0x38')](function(_0x5f4244){_0x513721[_0x458a('0xbb')][_0x458a('0xba')]=[];_0x513721[_0x458a('0xbb')][_0x458a('0xba')][_0x458a('0xa6')](_0x5f4244[_0x458a('0xbb')]);return _0x513721;});})['then'](respondWithResult(_0x292c1e,null))['catch'](handleError(_0x292c1e,null));};
\ No newline at end of file
diff --git a/server/api/whatsappAccount/whatsappAccount.events.js b/server/api/whatsappAccount/whatsappAccount.events.js
index d435f84..04d9da5 100644
--- a/server/api/whatsappAccount/whatsappAccount.events.js
+++ b/server/api/whatsappAccount/whatsappAccount.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x583c=['../../mysqldb','WhatsappAccount','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x3c307c,_0x1b06c4){var _0x32cf08=function(_0x371144){while(--_0x371144){_0x3c307c['push'](_0x3c307c['shift']());}};_0x32cf08(++_0x1b06c4);}(_0x583c,0x12b));var _0xc583=function(_0x1762b4,_0x33d836){_0x1762b4=_0x1762b4-0x0;var _0x29beda=_0x583c[_0x1762b4];return _0x29beda;};'use strict';var EventEmitter=require(_0xc583('0x0'));var WhatsappAccount=require(_0xc583('0x1'))['db'][_0xc583('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents[_0xc583('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc583('0x4'),'afterDestroy':_0xc583('0x5')};function emitEvent(_0x4f7814){return function(_0x4ca8e3,_0x13b8a7,_0xf03852){WhatsappAccountEvents['emit'](_0x4f7814+':'+_0x4ca8e3['id'],_0x4ca8e3);WhatsappAccountEvents[_0xc583('0x6')](_0x4f7814,_0x4ca8e3);_0xf03852(null);};}for(var e in events){if(events[_0xc583('0x7')](e)){var event=events[e];WhatsappAccount[_0xc583('0x8')](e,emitEvent(event));}}module[_0xc583('0x9')]=WhatsappAccountEvents;
\ No newline at end of file
+var _0xf072=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappAccount','save','remove'];(function(_0x1abfff,_0x6b509){var _0x2414c0=function(_0x517df7){while(--_0x517df7){_0x1abfff['push'](_0x1abfff['shift']());}};_0x2414c0(++_0x6b509);}(_0xf072,0x1cf));var _0x2f07=function(_0x2523db,_0x5935c7){_0x2523db=_0x2523db-0x0;var _0x6fa64b=_0xf072[_0x2523db];return _0x6fa64b;};'use strict';var EventEmitter=require(_0x2f07('0x0'));var WhatsappAccount=require(_0x2f07('0x1'))['db'][_0x2f07('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2f07('0x3'),'afterUpdate':'update','afterDestroy':_0x2f07('0x4')};function emitEvent(_0x432696){return function(_0x1536c3,_0x48d7b6,_0x1d5a33){WhatsappAccountEvents[_0x2f07('0x5')](_0x432696+':'+_0x1536c3['id'],_0x1536c3);WhatsappAccountEvents[_0x2f07('0x5')](_0x432696,_0x1536c3);_0x1d5a33(null);};}for(var e in events){if(events[_0x2f07('0x6')](e)){var event=events[e];WhatsappAccount[_0x2f07('0x7')](e,emitEvent(event));}}module[_0x2f07('0x8')]=WhatsappAccountEvents;
\ No newline at end of file
diff --git a/server/api/whatsappAccount/whatsappAccount.model.js b/server/api/whatsappAccount/whatsappAccount.model.js
index 8adedfa..32d4186 100644
--- a/server/api/whatsappAccount/whatsappAccount.model.js
+++ b/server/api/whatsappAccount/whatsappAccount.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x10a4=['path','rimraf','../../config/environment','exports','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x508dc5,_0x1aa23c){var _0x403554=function(_0x25d1ac){while(--_0x25d1ac){_0x508dc5['push'](_0x508dc5['shift']());}};_0x403554(++_0x1aa23c);}(_0x10a4,0xb4));var _0x410a=function(_0x5b1f65,_0x1b5cb4){_0x5b1f65=_0x5b1f65-0x0;var _0x290cc6=_0x10a4[_0x5b1f65];return _0x290cc6;};'use strict';var _=require(_0x410a('0x0'));var util=require(_0x410a('0x1'));var logger=require(_0x410a('0x2'))(_0x410a('0x3'));var moment=require(_0x410a('0x4'));var BPromise=require(_0x410a('0x5'));var rp=require(_0x410a('0x6'));var fs=require('fs');var path=require(_0x410a('0x7'));var rimraf=require(_0x410a('0x8'));var config=require(_0x410a('0x9'));var attributes=require('./whatsappAccount.attributes');module[_0x410a('0xa')]=function(_0x3f649b,_0x1b2c42){return _0x3f649b['define']('WhatsappAccount',attributes,{'tableName':'whatsapp_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x51d6=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappAccount.attributes','define','WhatsappAccount','whatsapp_accounts','util','../../config/logger'];(function(_0x45da6f,_0x3d85d3){var _0x1c7d63=function(_0x36d10c){while(--_0x36d10c){_0x45da6f['push'](_0x45da6f['shift']());}};_0x1c7d63(++_0x3d85d3);}(_0x51d6,0x1c6));var _0x651d=function(_0x471d81,_0x1255db){_0x471d81=_0x471d81-0x0;var _0x2395ec=_0x51d6[_0x471d81];return _0x2395ec;};'use strict';var _=require('lodash');var util=require(_0x651d('0x0'));var logger=require(_0x651d('0x1'))('api');var moment=require(_0x651d('0x2'));var BPromise=require(_0x651d('0x3'));var rp=require(_0x651d('0x4'));var fs=require('fs');var path=require(_0x651d('0x5'));var rimraf=require(_0x651d('0x6'));var config=require(_0x651d('0x7'));var attributes=require(_0x651d('0x8'));module['exports']=function(_0x5a6687,_0x150dda){return _0x5a6687[_0x651d('0x9')](_0x651d('0xa'),attributes,{'tableName':_0x651d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/whatsappAccount/whatsappAccount.rpc.js b/server/api/whatsappAccount/whatsappAccount.rpc.js
index 3673d7d..ed0b2ac 100644
--- a/server/api/whatsappAccount/whatsappAccount.rpc.js
+++ b/server/api/whatsappAccount/whatsappAccount.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5bc0=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./whatsappAccount.socket','register','request','info','WhatsappAccount,\x20%s,\x20%s','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','ShowWhatsappAccount','WhatsappAccount','find','options','raw','attributes','include','model','map','then','lodash'];(function(_0x5f35ca,_0x53b309){var _0x1e13a5=function(_0x5066ea){while(--_0x5066ea){_0x5f35ca['push'](_0x5f35ca['shift']());}};_0x1e13a5(++_0x53b309);}(_0x5bc0,0xcc));var _0x05bc=function(_0x2cd14a,_0x1bed9e){_0x2cd14a=_0x2cd14a-0x0;var _0x5cb21a=_0x5bc0[_0x2cd14a];return _0x5cb21a;};'use strict';var _=require(_0x05bc('0x0'));var util=require(_0x05bc('0x1'));var moment=require(_0x05bc('0x2'));var BPromise=require(_0x05bc('0x3'));var rs=require(_0x05bc('0x4'));var fs=require('fs');var Redis=require(_0x05bc('0x5'));var db=require(_0x05bc('0x6'))['db'];var utils=require(_0x05bc('0x7'));var logger=require(_0x05bc('0x8'))(_0x05bc('0x9'));var config=require(_0x05bc('0xa'));var jayson=require(_0x05bc('0xb'));var client=jayson[_0x05bc('0xc')][_0x05bc('0xd')]({'port':0x232a});config[_0x05bc('0xe')]=_['defaults'](config[_0x05bc('0xe')],{'host':_0x05bc('0xf'),'port':0x18eb});var socket=require(_0x05bc('0x10'))(new Redis(config['redis']));require(_0x05bc('0x11'))[_0x05bc('0x12')](socket);function respondWithRpcPromise(_0x290499,_0xe9bdab,_0x7c6ee5){return new BPromise(function(_0x1dad72,_0x3e487a){return client[_0x05bc('0x13')](_0x290499,_0x7c6ee5)['then'](function(_0x1e5a51){logger[_0x05bc('0x14')](_0x05bc('0x15'),_0xe9bdab,'request\x20sent');logger[_0x05bc('0x16')](_0x05bc('0x17'),_0xe9bdab,_0x05bc('0x18'),JSON[_0x05bc('0x19')](_0x1e5a51));if(_0x1e5a51['error']){if(_0x1e5a51[_0x05bc('0x1a')][_0x05bc('0x1b')]===0x1f4){logger['error']('WhatsappAccount,\x20%s,\x20%s',_0xe9bdab,_0x1e5a51['error'][_0x05bc('0x1c')]);return _0x3e487a(_0x1e5a51['error']['message']);}logger[_0x05bc('0x1a')](_0x05bc('0x15'),_0xe9bdab,_0x1e5a51[_0x05bc('0x1a')][_0x05bc('0x1c')]);return _0x1dad72(_0x1e5a51['error']['message']);}else{logger[_0x05bc('0x14')]('WhatsappAccount,\x20%s,\x20%s',_0xe9bdab,_0x05bc('0x18'));_0x1dad72(_0x1e5a51[_0x05bc('0x1d')][_0x05bc('0x1c')]);}})[_0x05bc('0x1e')](function(_0x301326){logger[_0x05bc('0x1a')](_0x05bc('0x15'),_0xe9bdab,_0x301326);_0x3e487a(_0x301326);});});}exports[_0x05bc('0x1f')]=function(_0x470986){var _0x5a26f4=this;return new Promise(function(_0x1fbcfa,_0x22e653){return db[_0x05bc('0x20')][_0x05bc('0x21')]({'raw':_0x470986[_0x05bc('0x22')]?_0x470986[_0x05bc('0x22')][_0x05bc('0x23')]===undefined?!![]:![]:!![],'where':_0x470986[_0x05bc('0x22')]?_0x470986[_0x05bc('0x22')]['where']||null:null,'attributes':_0x470986[_0x05bc('0x22')]?_0x470986['options'][_0x05bc('0x24')]||null:null,'include':_0x470986[_0x05bc('0x22')]?_0x470986['options'][_0x05bc('0x25')]?_['map'](_0x470986[_0x05bc('0x22')][_0x05bc('0x25')],function(_0x25396f){return{'model':db[_0x25396f[_0x05bc('0x26')]],'as':_0x25396f['as'],'attributes':_0x25396f[_0x05bc('0x24')],'include':_0x25396f['include']?_['map'](_0x25396f[_0x05bc('0x25')],function(_0x89cc5){return{'model':db[_0x89cc5[_0x05bc('0x26')]],'as':_0x89cc5['as'],'attributes':_0x89cc5[_0x05bc('0x24')],'include':_0x89cc5[_0x05bc('0x25')]?_[_0x05bc('0x27')](_0x89cc5[_0x05bc('0x25')],function(_0x481a95){return{'model':db[_0x481a95[_0x05bc('0x26')]],'as':_0x481a95['as'],'attributes':_0x481a95['attributes']};}):[]};}):[]};}):[]:[]})[_0x05bc('0x28')](function(_0x44a7cc){logger[_0x05bc('0x14')](_0x05bc('0x1f'),_0x470986);logger[_0x05bc('0x16')](_0x05bc('0x1f'),_0x470986,JSON[_0x05bc('0x19')](_0x44a7cc));_0x1fbcfa(_0x44a7cc);})['catch'](function(_0x40b54c){logger[_0x05bc('0x1a')](_0x05bc('0x1f'),_0x40b54c[_0x05bc('0x1c')],_0x470986);_0x22e653(_0x5a26f4['error'](0x1f4,_0x40b54c[_0x05bc('0x1c')]));});});};
\ No newline at end of file
+var _0x88e8=['request','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','ShowWhatsappAccount','WhatsappAccount','find','raw','options','where','attributes','include','model','map','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','defaults','redis','socket.io-emitter','./whatsappAccount.socket','register'];(function(_0x17be48,_0x7135fc){var _0x555377=function(_0x57112f){while(--_0x57112f){_0x17be48['push'](_0x17be48['shift']());}};_0x555377(++_0x7135fc);}(_0x88e8,0xcf));var _0x888e=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x88e8[_0x5d4607];return _0x5e4a86;};'use strict';var _=require('lodash');var util=require(_0x888e('0x0'));var moment=require(_0x888e('0x1'));var BPromise=require(_0x888e('0x2'));var rs=require(_0x888e('0x3'));var fs=require('fs');var Redis=require(_0x888e('0x4'));var db=require(_0x888e('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x888e('0x6'))('rpc');var config=require(_0x888e('0x7'));var jayson=require(_0x888e('0x8'));var client=jayson[_0x888e('0x9')]['http']({'port':0x232a});config['redis']=_[_0x888e('0xa')](config[_0x888e('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x888e('0xc'))(new Redis(config[_0x888e('0xb')]));require(_0x888e('0xd'))[_0x888e('0xe')](socket);function respondWithRpcPromise(_0x5a5baf,_0x33f2e5,_0x2831df){return new BPromise(function(_0x411ed7,_0x8e27bd){return client[_0x888e('0xf')](_0x5a5baf,_0x2831df)[_0x888e('0x10')](function(_0x35e1bb){logger[_0x888e('0x11')](_0x888e('0x12'),_0x33f2e5,_0x888e('0x13'));logger[_0x888e('0x14')](_0x888e('0x15'),_0x33f2e5,_0x888e('0x13'),JSON[_0x888e('0x16')](_0x35e1bb));if(_0x35e1bb[_0x888e('0x17')]){if(_0x35e1bb[_0x888e('0x17')]['code']===0x1f4){logger['error'](_0x888e('0x12'),_0x33f2e5,_0x35e1bb['error'][_0x888e('0x18')]);return _0x8e27bd(_0x35e1bb[_0x888e('0x17')][_0x888e('0x18')]);}logger[_0x888e('0x17')](_0x888e('0x12'),_0x33f2e5,_0x35e1bb['error'][_0x888e('0x18')]);return _0x411ed7(_0x35e1bb[_0x888e('0x17')]['message']);}else{logger[_0x888e('0x11')]('WhatsappAccount,\x20%s,\x20%s',_0x33f2e5,'request\x20sent');_0x411ed7(_0x35e1bb[_0x888e('0x19')][_0x888e('0x18')]);}})[_0x888e('0x1a')](function(_0x70fad3){logger[_0x888e('0x17')](_0x888e('0x12'),_0x33f2e5,_0x70fad3);_0x8e27bd(_0x70fad3);});});}exports[_0x888e('0x1b')]=function(_0x25f7e4){var _0x1d6549=this;return new Promise(function(_0x62a86a,_0x53422f){return db[_0x888e('0x1c')][_0x888e('0x1d')]({'raw':_0x25f7e4['options']?_0x25f7e4['options'][_0x888e('0x1e')]===undefined?!![]:![]:!![],'where':_0x25f7e4[_0x888e('0x1f')]?_0x25f7e4[_0x888e('0x1f')][_0x888e('0x20')]||null:null,'attributes':_0x25f7e4[_0x888e('0x1f')]?_0x25f7e4[_0x888e('0x1f')][_0x888e('0x21')]||null:null,'include':_0x25f7e4['options']?_0x25f7e4[_0x888e('0x1f')][_0x888e('0x22')]?_['map'](_0x25f7e4['options'][_0x888e('0x22')],function(_0x3841ef){return{'model':db[_0x3841ef[_0x888e('0x23')]],'as':_0x3841ef['as'],'attributes':_0x3841ef['attributes'],'include':_0x3841ef['include']?_[_0x888e('0x24')](_0x3841ef[_0x888e('0x22')],function(_0x2c51cf){return{'model':db[_0x2c51cf[_0x888e('0x23')]],'as':_0x2c51cf['as'],'attributes':_0x2c51cf[_0x888e('0x21')],'include':_0x2c51cf['include']?_[_0x888e('0x24')](_0x2c51cf[_0x888e('0x22')],function(_0x3d3290){return{'model':db[_0x3d3290['model']],'as':_0x3d3290['as'],'attributes':_0x3d3290[_0x888e('0x21')]};}):[]};}):[]};}):[]:[]})[_0x888e('0x10')](function(_0x19ae22){logger[_0x888e('0x11')](_0x888e('0x1b'),_0x25f7e4);logger[_0x888e('0x14')](_0x888e('0x1b'),_0x25f7e4,JSON[_0x888e('0x16')](_0x19ae22));_0x62a86a(_0x19ae22);})[_0x888e('0x1a')](function(_0x323793){logger[_0x888e('0x17')]('ShowWhatsappAccount',_0x323793[_0x888e('0x18')],_0x25f7e4);_0x53422f(_0x1d6549['error'](0x1f4,_0x323793['message']));});});};
\ No newline at end of file
diff --git a/server/api/whatsappAccount/whatsappAccount.socket.js b/server/api/whatsappAccount/whatsappAccount.socket.js
index bd46fe7..5967f8a 100644
--- a/server/api/whatsappAccount/whatsappAccount.socket.js
+++ b/server/api/whatsappAccount/whatsappAccount.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdf70=['emit','removeListener','length','whatsappAccount:','./whatsappAccount.events','save','remove','update'];(function(_0x527a53,_0x3265d6){var _0x2332f5=function(_0x3b2d90){while(--_0x3b2d90){_0x527a53['push'](_0x527a53['shift']());}};_0x2332f5(++_0x3265d6);}(_0xdf70,0x9c));var _0x0df7=function(_0x93c6e1,_0x1c4f9c){_0x93c6e1=_0x93c6e1-0x0;var _0x43a6a0=_0xdf70[_0x93c6e1];return _0x43a6a0;};'use strict';var WhatsappAccountEvents=require(_0x0df7('0x0'));var events=[_0x0df7('0x1'),_0x0df7('0x2'),_0x0df7('0x3')];function createListener(_0x501aad,_0xd6f885){return function(_0x5bceaa){_0xd6f885[_0x0df7('0x4')](_0x501aad,_0x5bceaa);};}function removeListener(_0x613e43,_0x27c1e2){return function(){WhatsappAccountEvents[_0x0df7('0x5')](_0x613e43,_0x27c1e2);};}exports['register']=function(_0x1d9962){for(var _0x5e220f=0x0,_0x428251=events[_0x0df7('0x6')];_0x5e220f<_0x428251;_0x5e220f++){var _0x2d8402=events[_0x5e220f];var _0x5cfa70=createListener(_0x0df7('0x7')+_0x2d8402,_0x1d9962);WhatsappAccountEvents['on'](_0x2d8402,_0x5cfa70);}};
\ No newline at end of file
+var _0x74a5=['register','length','./whatsappAccount.events','remove','update','emit','removeListener'];(function(_0x23e7c1,_0x35110c){var _0x1add43=function(_0x238918){while(--_0x238918){_0x23e7c1['push'](_0x23e7c1['shift']());}};_0x1add43(++_0x35110c);}(_0x74a5,0x17c));var _0x574a=function(_0x520712,_0x336674){_0x520712=_0x520712-0x0;var _0xe7ab1c=_0x74a5[_0x520712];return _0xe7ab1c;};'use strict';var WhatsappAccountEvents=require(_0x574a('0x0'));var events=['save',_0x574a('0x1'),_0x574a('0x2')];function createListener(_0x43bb15,_0x319298){return function(_0x16eecc){_0x319298[_0x574a('0x3')](_0x43bb15,_0x16eecc);};}function removeListener(_0x1bc4a1,_0x27992f){return function(){WhatsappAccountEvents[_0x574a('0x4')](_0x1bc4a1,_0x27992f);};}exports[_0x574a('0x5')]=function(_0x3e99aa){for(var _0x2be7e0=0x0,_0x6d4e99=events[_0x574a('0x6')];_0x2be7e0<_0x6d4e99;_0x2be7e0++){var _0x43ed18=events[_0x2be7e0];var _0x461453=createListener('whatsappAccount:'+_0x43ed18,_0x3e99aa);WhatsappAccountEvents['on'](_0x43ed18,_0x461453);}};
\ No newline at end of file
diff --git a/server/api/whatsappApplication/index.js b/server/api/whatsappApplication/index.js
index 0e3a028..50d7cd9 100644
--- a/server/api/whatsappApplication/index.js
+++ b/server/api/whatsappApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x60f2=['show','create','put','/:id','update','destroy','exports','multer','util','path','Router','../../components/auth/service','../../config/environment','get','isAuthenticated'];(function(_0x1b7d3e,_0xa4cadf){var _0xe9147f=function(_0x4a5dad){while(--_0x4a5dad){_0x1b7d3e['push'](_0x1b7d3e['shift']());}};_0xe9147f(++_0xa4cadf);}(_0x60f2,0x9d));var _0x260f=function(_0x5b9fc6,_0x4001ac){_0x5b9fc6=_0x5b9fc6-0x0;var _0x4a679e=_0x60f2[_0x5b9fc6];return _0x4a679e;};'use strict';var multer=require(_0x260f('0x0'));var util=require(_0x260f('0x1'));var path=require(_0x260f('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x260f('0x3')]();var auth=require(_0x260f('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x260f('0x5'));var controller=require('./whatsappApplication.controller');router[_0x260f('0x6')]('/',auth[_0x260f('0x7')](),controller['index']);router[_0x260f('0x6')]('/:id',auth[_0x260f('0x7')](),controller[_0x260f('0x8')]);router['post']('/',auth['isAuthenticated'](),controller[_0x260f('0x9')]);router[_0x260f('0xa')](_0x260f('0xb'),auth['isAuthenticated'](),controller[_0x260f('0xc')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x260f('0xd')]);module[_0x260f('0xe')]=router;
\ No newline at end of file
+var _0x1004=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappApplication.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','path','express'];(function(_0x3b7e6f,_0x1565b5){var _0x4873c3=function(_0x3f0ac6){while(--_0x3f0ac6){_0x3b7e6f['push'](_0x3b7e6f['shift']());}};_0x4873c3(++_0x1565b5);}(_0x1004,0xd9));var _0x4100=function(_0x212e99,_0x2b537a){_0x212e99=_0x212e99-0x0;var _0x276ad1=_0x1004[_0x212e99];return _0x276ad1;};'use strict';var multer=require(_0x4100('0x0'));var util=require('util');var path=require(_0x4100('0x1'));var timeout=require('connect-timeout');var express=require(_0x4100('0x2'));var router=express[_0x4100('0x3')]();var auth=require(_0x4100('0x4'));var interaction=require(_0x4100('0x5'));var config=require(_0x4100('0x6'));var controller=require(_0x4100('0x7'));router[_0x4100('0x8')]('/',auth[_0x4100('0x9')](),controller[_0x4100('0xa')]);router[_0x4100('0x8')](_0x4100('0xb'),auth['isAuthenticated'](),controller[_0x4100('0xc')]);router[_0x4100('0xd')]('/',auth[_0x4100('0x9')](),controller[_0x4100('0xe')]);router[_0x4100('0xf')]('/:id',auth[_0x4100('0x9')](),controller[_0x4100('0x10')]);router[_0x4100('0x11')](_0x4100('0xb'),auth['isAuthenticated'](),controller[_0x4100('0x12')]);module[_0x4100('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/whatsappApplication/whatsappApplication.attributes.js b/server/api/whatsappApplication/whatsappApplication.attributes.js
index 41f6703..5258cea 100644
--- a/server/api/whatsappApplication/whatsappApplication.attributes.js
+++ b/server/api/whatsappApplication/whatsappApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x669c=['STRING','*,*,*,*','noop'];(function(_0x3d5798,_0x11a5a4){var _0x2f9b86=function(_0x2023cd){while(--_0x2023cd){_0x3d5798['push'](_0x3d5798['shift']());}};_0x2f9b86(++_0x11a5a4);}(_0x669c,0x1f4));var _0xc669=function(_0x546163,_0x2d4d18){_0x546163=_0x546163-0x0;var _0x1a07cb=_0x669c[_0x546163];return _0x1a07cb;};'use strict';var Sequelize=require('sequelize');module['exports']={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xc669('0x0')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0xc669('0x1')]},'interval':{'type':Sequelize[_0xc669('0x1')],'defaultValue':_0xc669('0x2')}};
\ No newline at end of file
+var _0x36e9=['TEXT','*,*,*,*','sequelize','exports','INTEGER','STRING'];(function(_0x54d4fe,_0x55e869){var _0x1ab5bb=function(_0x5b1af2){while(--_0x5b1af2){_0x54d4fe['push'](_0x54d4fe['shift']());}};_0x1ab5bb(++_0x55e869);}(_0x36e9,0x1d6));var _0x936e=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0x36e9[_0x29b609];return _0x54c952;};'use strict';var Sequelize=require(_0x936e('0x0'));module[_0x936e('0x1')]={'priority':{'type':Sequelize[_0x936e('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x936e('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0x936e('0x4')]()},'description':{'type':Sequelize[_0x936e('0x3')]},'interval':{'type':Sequelize[_0x936e('0x3')],'defaultValue':_0x936e('0x5')}};
\ No newline at end of file
diff --git a/server/api/whatsappApplication/whatsappApplication.controller.js b/server/api/whatsappApplication/whatsappApplication.controller.js
index 77effd3..77d99a7 100644
--- a/server/api/whatsappApplication/whatsappApplication.controller.js
+++ b/server/api/whatsappApplication/whatsappApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8db0=['nolimit','order','sort','pick','filter','merge','type','options','where','includeAll','include','rows','catch','show','find','create','body','params','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','reject','then','error','stack','name','send','map','WhatsappApplication','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0x3d804a,_0x5649aa){var _0xbf2d4e=function(_0x9e0345){while(--_0x9e0345){_0x3d804a['push'](_0x3d804a['shift']());}};_0xbf2d4e(++_0x5649aa);}(_0x8db0,0x9e));var _0x08db=function(_0x3be2e2,_0x5c166d){_0x3be2e2=_0x3be2e2-0x0;var _0x53b9c5=_0x8db0[_0x3be2e2];return _0x53b9c5;};'use strict';var pdf=require('html-pdf');var emlformat=require(_0x08db('0x0'));var rimraf=require(_0x08db('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x08db('0x2'));var rp=require(_0x08db('0x3'));var moment=require(_0x08db('0x4'));var BPromise=require(_0x08db('0x5'));var Mustache=require('mustache');var util=require(_0x08db('0x6'));var path=require(_0x08db('0x7'));var sox=require(_0x08db('0x8'));var csv=require(_0x08db('0x9'));var ejs=require(_0x08db('0xa'));var fs=require('fs');var _=require(_0x08db('0xb'));var squel=require(_0x08db('0xc'));var crypto=require('crypto');var jsforce=require(_0x08db('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x08db('0xe'));var Redis=require(_0x08db('0xf'));var authService=require(_0x08db('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x08db('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x08db('0x12'))(_0x08db('0x13'));var utils=require(_0x08db('0x14'));var config=require(_0x08db('0x15'));var db=require(_0x08db('0x16'))['db'];function respondWithStatusCode(_0x15b15b,_0x888846){_0x888846=_0x888846||0xcc;return function(_0x2ae0c0){if(_0x2ae0c0){return _0x15b15b[_0x08db('0x17')](_0x888846);}return _0x15b15b[_0x08db('0x18')](_0x888846)[_0x08db('0x19')]();};}function respondWithResult(_0x474ff6,_0x2364cc){_0x2364cc=_0x2364cc||0xc8;return function(_0x246de4){if(_0x246de4){return _0x474ff6[_0x08db('0x18')](_0x2364cc)[_0x08db('0x1a')](_0x246de4);}};}function respondWithFilteredResult(_0x3577d7,_0x3f42b2){return function(_0x25d6ef){if(_0x25d6ef){var _0x45e2a7=_0x25d6ef[_0x08db('0x1b')],_0x2617cb=_0x3f42b2['offset'],_0x3e897f=_0x3f42b2[_0x08db('0x1c')]+_0x3f42b2[_0x08db('0x1d')],_0x291b9d;if(_0x3e897f>=_0x45e2a7){_0x3e897f=_0x45e2a7;_0x291b9d=0xc8;}else{_0x291b9d=0xce;}_0x3577d7[_0x08db('0x18')](_0x291b9d);return _0x3577d7[_0x08db('0x1e')](_0x08db('0x1f'),_0x2617cb+'-'+_0x3e897f+'/'+_0x45e2a7)[_0x08db('0x1a')](_0x25d6ef);}return null;};}function patchUpdates(_0x3eb90f){return function(_0x56f1e9){try{jsonpatch['apply'](_0x56f1e9,_0x3eb90f,!![]);}catch(_0x328d26){return BPromise[_0x08db('0x20')](_0x328d26);}return _0x56f1e9['save']();};}function saveUpdates(_0x5b1758,_0x47399e){return function(_0x54a423){if(_0x54a423){return _0x54a423['update'](_0x5b1758)[_0x08db('0x21')](function(_0x2dce9d){return _0x2dce9d;});}return null;};}function removeEntity(_0x3c3bb3,_0xbd403c){return function(_0x5aa834){if(_0x5aa834){return _0x5aa834['destroy']()['then'](function(){_0x3c3bb3[_0x08db('0x18')](0xcc)[_0x08db('0x19')]();});}};}function handleEntityNotFound(_0x2f7842,_0x11f034){return function(_0x18ef3f){if(!_0x18ef3f){_0x2f7842[_0x08db('0x17')](0x194);}return _0x18ef3f;};}function handleError(_0x171919,_0x526de8){_0x526de8=_0x526de8||0x1f4;return function(_0x20f22f){logger[_0x08db('0x22')](_0x20f22f[_0x08db('0x23')]);if(_0x20f22f[_0x08db('0x24')]){delete _0x20f22f['name'];}_0x171919[_0x08db('0x18')](_0x526de8)[_0x08db('0x25')](_0x20f22f);};}exports['index']=function(_0x3ea5e0,_0x454687){var _0x128a81={},_0x36d3c4={},_0x4bbf46={'count':0x0,'rows':[]};var _0x10d8cc=_[_0x08db('0x26')](db[_0x08db('0x27')][_0x08db('0x28')],function(_0x1490f3){return{'name':_0x1490f3[_0x08db('0x29')],'type':_0x1490f3['type'][_0x08db('0x2a')]};});_0x36d3c4[_0x08db('0x2b')]=_[_0x08db('0x26')](_0x10d8cc,_0x08db('0x24'));_0x36d3c4['query']=_[_0x08db('0x2c')](_0x3ea5e0[_0x08db('0x2d')]);_0x36d3c4[_0x08db('0x2e')]=_[_0x08db('0x2f')](_0x36d3c4[_0x08db('0x2b')],_0x36d3c4[_0x08db('0x2d')]);_0x128a81[_0x08db('0x30')]=_[_0x08db('0x2f')](_0x36d3c4[_0x08db('0x2b')],qs[_0x08db('0x31')](_0x3ea5e0['query'][_0x08db('0x31')]));_0x128a81['attributes']=_0x128a81[_0x08db('0x30')][_0x08db('0x32')]?_0x128a81[_0x08db('0x30')]:_0x36d3c4[_0x08db('0x2b')];if(!_0x3ea5e0['query'][_0x08db('0x33')](_0x08db('0x34'))){_0x128a81[_0x08db('0x1d')]=qs[_0x08db('0x1d')](_0x3ea5e0[_0x08db('0x2d')][_0x08db('0x1d')]);_0x128a81['offset']=qs[_0x08db('0x1c')](_0x3ea5e0['query'][_0x08db('0x1c')]);}_0x128a81[_0x08db('0x35')]=qs['sort'](_0x3ea5e0[_0x08db('0x2d')][_0x08db('0x36')]);_0x128a81['where']=qs[_0x08db('0x2e')](_[_0x08db('0x37')](_0x3ea5e0['query'],_0x36d3c4[_0x08db('0x2e')]),_0x10d8cc);if(_0x3ea5e0[_0x08db('0x2d')][_0x08db('0x38')]){_0x128a81['where']=_[_0x08db('0x39')](_0x128a81['where'],{'$or':_[_0x08db('0x26')](_0x10d8cc,function(_0x4e7881){if(_0x4e7881[_0x08db('0x3a')]!=='VIRTUAL'){var _0x3d7cd7={};_0x3d7cd7[_0x4e7881[_0x08db('0x24')]]={'$like':'%'+_0x3ea5e0[_0x08db('0x2d')][_0x08db('0x38')]+'%'};return _0x3d7cd7;}})});}_0x128a81=_[_0x08db('0x39')]({},_0x128a81,_0x3ea5e0[_0x08db('0x3b')]);var _0x2cfb23={'where':_0x128a81[_0x08db('0x3c')]};return db[_0x08db('0x27')][_0x08db('0x1b')](_0x2cfb23)[_0x08db('0x21')](function(_0x3d5afa){_0x4bbf46[_0x08db('0x1b')]=_0x3d5afa;if(_0x3ea5e0[_0x08db('0x2d')][_0x08db('0x3d')]){_0x128a81[_0x08db('0x3e')]=[{'all':!![]}];}return db[_0x08db('0x27')]['findAll'](_0x128a81);})[_0x08db('0x21')](function(_0x120145){_0x4bbf46[_0x08db('0x3f')]=_0x120145;return _0x4bbf46;})[_0x08db('0x21')](respondWithFilteredResult(_0x454687,_0x128a81))[_0x08db('0x40')](handleError(_0x454687,null));};exports[_0x08db('0x41')]=function(_0x137edb,_0x2e5176){var _0x851d35={'raw':!![],'where':{'id':_0x137edb['params']['id']}},_0x48e201={};_0x48e201[_0x08db('0x2b')]=_[_0x08db('0x2c')](db['WhatsappApplication'][_0x08db('0x28')]);_0x48e201[_0x08db('0x2d')]=_[_0x08db('0x2c')](_0x137edb[_0x08db('0x2d')]);_0x48e201[_0x08db('0x2e')]=_[_0x08db('0x2f')](_0x48e201[_0x08db('0x2b')],_0x48e201[_0x08db('0x2d')]);_0x851d35['attributes']=_['intersection'](_0x48e201[_0x08db('0x2b')],qs[_0x08db('0x31')](_0x137edb[_0x08db('0x2d')][_0x08db('0x31')]));_0x851d35['attributes']=_0x851d35[_0x08db('0x30')]['length']?_0x851d35[_0x08db('0x30')]:_0x48e201[_0x08db('0x2b')];if(_0x137edb[_0x08db('0x2d')][_0x08db('0x3d')]){_0x851d35[_0x08db('0x3e')]=[{'all':!![]}];}_0x851d35=_[_0x08db('0x39')]({},_0x851d35,_0x137edb[_0x08db('0x3b')]);return db[_0x08db('0x27')][_0x08db('0x42')](_0x851d35)[_0x08db('0x21')](handleEntityNotFound(_0x2e5176,null))[_0x08db('0x21')](respondWithResult(_0x2e5176,null))[_0x08db('0x40')](handleError(_0x2e5176,null));};exports[_0x08db('0x43')]=function(_0x4738dd,_0x58eeff){return db[_0x08db('0x27')][_0x08db('0x43')](_0x4738dd[_0x08db('0x44')],{})[_0x08db('0x21')](respondWithResult(_0x58eeff,0xc9))[_0x08db('0x40')](handleError(_0x58eeff,null));};exports['update']=function(_0x47edfe,_0x364f1a){if(_0x47edfe[_0x08db('0x44')]['id']){delete _0x47edfe[_0x08db('0x44')]['id'];}return db[_0x08db('0x27')][_0x08db('0x42')]({'where':{'id':_0x47edfe['params']['id']}})['then'](handleEntityNotFound(_0x364f1a,null))[_0x08db('0x21')](saveUpdates(_0x47edfe[_0x08db('0x44')],null))['then'](respondWithResult(_0x364f1a,null))['catch'](handleError(_0x364f1a,null));};exports['destroy']=function(_0x4ec85e,_0x5c04a1){return db['WhatsappApplication'][_0x08db('0x42')]({'where':{'id':_0x4ec85e[_0x08db('0x45')]['id']}})[_0x08db('0x21')](handleEntityNotFound(_0x5c04a1,null))['then'](removeEntity(_0x5c04a1,null))[_0x08db('0x40')](handleError(_0x5c04a1,null));};
\ No newline at end of file
+var _0x0f16=['fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','catch','show','options','find','create','body','params','destroy','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','update','then','sendStatus','error','name','index','map','WhatsappApplication','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection'];(function(_0x38bbbe,_0x1c65f1){var _0x4d2355=function(_0x3296dd){while(--_0x3296dd){_0x38bbbe['push'](_0x38bbbe['shift']());}};_0x4d2355(++_0x1c65f1);}(_0x0f16,0x186));var _0x60f1=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x0f16[_0x2641f9];return _0x585741;};'use strict';var pdf=require(_0x60f1('0x0'));var emlformat=require(_0x60f1('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x60f1('0x2'));var jsonpatch=require(_0x60f1('0x3'));var rp=require(_0x60f1('0x4'));var moment=require('moment');var BPromise=require(_0x60f1('0x5'));var Mustache=require(_0x60f1('0x6'));var util=require(_0x60f1('0x7'));var path=require(_0x60f1('0x8'));var sox=require(_0x60f1('0x9'));var csv=require(_0x60f1('0xa'));var ejs=require('ejs');var fs=require('fs');var _=require(_0x60f1('0xb'));var squel=require(_0x60f1('0xc'));var crypto=require(_0x60f1('0xd'));var jsforce=require(_0x60f1('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x60f1('0xf'));var Papa=require(_0x60f1('0x10'));var Redis=require(_0x60f1('0x11'));var authService=require(_0x60f1('0x12'));var qs=require(_0x60f1('0x13'));var as=require(_0x60f1('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x60f1('0x15'));var utils=require(_0x60f1('0x16'));var config=require(_0x60f1('0x17'));var db=require(_0x60f1('0x18'))['db'];function respondWithStatusCode(_0x499379,_0x3e8209){_0x3e8209=_0x3e8209||0xcc;return function(_0x49c78d){if(_0x49c78d){return _0x499379['sendStatus'](_0x3e8209);}return _0x499379[_0x60f1('0x19')](_0x3e8209)[_0x60f1('0x1a')]();};}function respondWithResult(_0x166e1d,_0x55102c){_0x55102c=_0x55102c||0xc8;return function(_0xed0a4b){if(_0xed0a4b){return _0x166e1d[_0x60f1('0x19')](_0x55102c)[_0x60f1('0x1b')](_0xed0a4b);}};}function respondWithFilteredResult(_0x4d71d8,_0xe73a15){return function(_0x329c34){if(_0x329c34){var _0x374356=_0x329c34[_0x60f1('0x1c')],_0x56694e=_0xe73a15[_0x60f1('0x1d')],_0x509f78=_0xe73a15[_0x60f1('0x1d')]+_0xe73a15[_0x60f1('0x1e')],_0x517671;if(_0x509f78>=_0x374356){_0x509f78=_0x374356;_0x517671=0xc8;}else{_0x517671=0xce;}_0x4d71d8[_0x60f1('0x19')](_0x517671);return _0x4d71d8[_0x60f1('0x1f')](_0x60f1('0x20'),_0x56694e+'-'+_0x509f78+'/'+_0x374356)[_0x60f1('0x1b')](_0x329c34);}return null;};}function patchUpdates(_0x126bc7){return function(_0x53c3c4){try{jsonpatch[_0x60f1('0x21')](_0x53c3c4,_0x126bc7,!![]);}catch(_0xf86694){return BPromise[_0x60f1('0x22')](_0xf86694);}return _0x53c3c4[_0x60f1('0x23')]();};}function saveUpdates(_0x1f6703,_0x47b8b6){return function(_0x397501){if(_0x397501){return _0x397501[_0x60f1('0x24')](_0x1f6703)['then'](function(_0x55915f){return _0x55915f;});}return null;};}function removeEntity(_0x29497f,_0x508569){return function(_0x51ac9a){if(_0x51ac9a){return _0x51ac9a['destroy']()[_0x60f1('0x25')](function(){_0x29497f[_0x60f1('0x19')](0xcc)[_0x60f1('0x1a')]();});}};}function handleEntityNotFound(_0x23d1da,_0x19133b){return function(_0xb8a2e9){if(!_0xb8a2e9){_0x23d1da[_0x60f1('0x26')](0x194);}return _0xb8a2e9;};}function handleError(_0xc6baa5,_0x58e300){_0x58e300=_0x58e300||0x1f4;return function(_0x54fdbc){logger[_0x60f1('0x27')](_0x54fdbc['stack']);if(_0x54fdbc[_0x60f1('0x28')]){delete _0x54fdbc[_0x60f1('0x28')];}_0xc6baa5[_0x60f1('0x19')](_0x58e300)['send'](_0x54fdbc);};}exports[_0x60f1('0x29')]=function(_0x49dd78,_0x9be177){var _0x3ff02f={},_0x52a7b2={},_0x40e7c0={'count':0x0,'rows':[]};var _0x268907=_[_0x60f1('0x2a')](db[_0x60f1('0x2b')][_0x60f1('0x2c')],function(_0x1f1a84){return{'name':_0x1f1a84[_0x60f1('0x2d')],'type':_0x1f1a84[_0x60f1('0x2e')][_0x60f1('0x2f')]};});_0x52a7b2[_0x60f1('0x30')]=_[_0x60f1('0x2a')](_0x268907,_0x60f1('0x28'));_0x52a7b2[_0x60f1('0x31')]=_[_0x60f1('0x32')](_0x49dd78[_0x60f1('0x31')]);_0x52a7b2[_0x60f1('0x33')]=_['intersection'](_0x52a7b2[_0x60f1('0x30')],_0x52a7b2[_0x60f1('0x31')]);_0x3ff02f[_0x60f1('0x34')]=_[_0x60f1('0x35')](_0x52a7b2[_0x60f1('0x30')],qs[_0x60f1('0x36')](_0x49dd78[_0x60f1('0x31')][_0x60f1('0x36')]));_0x3ff02f['attributes']=_0x3ff02f['attributes'][_0x60f1('0x37')]?_0x3ff02f[_0x60f1('0x34')]:_0x52a7b2[_0x60f1('0x30')];if(!_0x49dd78[_0x60f1('0x31')][_0x60f1('0x38')]('nolimit')){_0x3ff02f['limit']=qs[_0x60f1('0x1e')](_0x49dd78[_0x60f1('0x31')][_0x60f1('0x1e')]);_0x3ff02f['offset']=qs[_0x60f1('0x1d')](_0x49dd78['query'][_0x60f1('0x1d')]);}_0x3ff02f[_0x60f1('0x39')]=qs[_0x60f1('0x3a')](_0x49dd78[_0x60f1('0x31')][_0x60f1('0x3a')]);_0x3ff02f[_0x60f1('0x3b')]=qs['filters'](_[_0x60f1('0x3c')](_0x49dd78[_0x60f1('0x31')],_0x52a7b2[_0x60f1('0x33')]),_0x268907);if(_0x49dd78['query'][_0x60f1('0x3d')]){_0x3ff02f[_0x60f1('0x3b')]=_[_0x60f1('0x3e')](_0x3ff02f[_0x60f1('0x3b')],{'$or':_['map'](_0x268907,function(_0x1bf3b5){if(_0x1bf3b5[_0x60f1('0x2e')]!==_0x60f1('0x3f')){var _0x5046cc={};_0x5046cc[_0x1bf3b5['name']]={'$like':'%'+_0x49dd78[_0x60f1('0x31')][_0x60f1('0x3d')]+'%'};return _0x5046cc;}})});}_0x3ff02f=_[_0x60f1('0x3e')]({},_0x3ff02f,_0x49dd78['options']);var _0x3260b7={'where':_0x3ff02f[_0x60f1('0x3b')]};return db[_0x60f1('0x2b')][_0x60f1('0x1c')](_0x3260b7)[_0x60f1('0x25')](function(_0x10448d){_0x40e7c0[_0x60f1('0x1c')]=_0x10448d;if(_0x49dd78['query'][_0x60f1('0x40')]){_0x3ff02f['include']=[{'all':!![]}];}return db[_0x60f1('0x2b')][_0x60f1('0x41')](_0x3ff02f);})[_0x60f1('0x25')](function(_0x5c84de){_0x40e7c0['rows']=_0x5c84de;return _0x40e7c0;})[_0x60f1('0x25')](respondWithFilteredResult(_0x9be177,_0x3ff02f))[_0x60f1('0x42')](handleError(_0x9be177,null));};exports[_0x60f1('0x43')]=function(_0x5904b5,_0x18099e){var _0x1a1b1e={'raw':!![],'where':{'id':_0x5904b5['params']['id']}},_0xda4c84={};_0xda4c84[_0x60f1('0x30')]=_[_0x60f1('0x32')](db['WhatsappApplication'][_0x60f1('0x2c')]);_0xda4c84[_0x60f1('0x31')]=_[_0x60f1('0x32')](_0x5904b5[_0x60f1('0x31')]);_0xda4c84['filters']=_[_0x60f1('0x35')](_0xda4c84[_0x60f1('0x30')],_0xda4c84[_0x60f1('0x31')]);_0x1a1b1e[_0x60f1('0x34')]=_[_0x60f1('0x35')](_0xda4c84[_0x60f1('0x30')],qs[_0x60f1('0x36')](_0x5904b5['query'][_0x60f1('0x36')]));_0x1a1b1e['attributes']=_0x1a1b1e['attributes']['length']?_0x1a1b1e[_0x60f1('0x34')]:_0xda4c84[_0x60f1('0x30')];if(_0x5904b5['query'][_0x60f1('0x40')]){_0x1a1b1e['include']=[{'all':!![]}];}_0x1a1b1e=_['merge']({},_0x1a1b1e,_0x5904b5[_0x60f1('0x44')]);return db[_0x60f1('0x2b')][_0x60f1('0x45')](_0x1a1b1e)[_0x60f1('0x25')](handleEntityNotFound(_0x18099e,null))[_0x60f1('0x25')](respondWithResult(_0x18099e,null))[_0x60f1('0x42')](handleError(_0x18099e,null));};exports[_0x60f1('0x46')]=function(_0x151e40,_0x52a91b){return db[_0x60f1('0x2b')]['create'](_0x151e40[_0x60f1('0x47')],{})[_0x60f1('0x25')](respondWithResult(_0x52a91b,0xc9))[_0x60f1('0x42')](handleError(_0x52a91b,null));};exports['update']=function(_0x5ec6fd,_0x468c87){if(_0x5ec6fd['body']['id']){delete _0x5ec6fd[_0x60f1('0x47')]['id'];}return db[_0x60f1('0x2b')][_0x60f1('0x45')]({'where':{'id':_0x5ec6fd[_0x60f1('0x48')]['id']}})[_0x60f1('0x25')](handleEntityNotFound(_0x468c87,null))['then'](saveUpdates(_0x5ec6fd[_0x60f1('0x47')],null))['then'](respondWithResult(_0x468c87,null))[_0x60f1('0x42')](handleError(_0x468c87,null));};exports[_0x60f1('0x49')]=function(_0x5400ee,_0x379fdd){return db[_0x60f1('0x2b')][_0x60f1('0x45')]({'where':{'id':_0x5400ee['params']['id']}})['then'](handleEntityNotFound(_0x379fdd,null))['then'](removeEntity(_0x379fdd,null))['catch'](handleError(_0x379fdd,null));};
\ No newline at end of file
diff --git a/server/api/whatsappApplication/whatsappApplication.model.js b/server/api/whatsappApplication/whatsappApplication.model.js
index bf93fa3..738d3cc 100644
--- a/server/api/whatsappApplication/whatsappApplication.model.js
+++ b/server/api/whatsappApplication/whatsappApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5870=['api','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','WhatsappApplication','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger'];(function(_0x35b8c7,_0x3e8585){var _0x46c137=function(_0x4918dd){while(--_0x4918dd){_0x35b8c7['push'](_0x35b8c7['shift']());}};_0x46c137(++_0x3e8585);}(_0x5870,0x14d));var _0x0587=function(_0x263a74,_0xc31414){_0x263a74=_0x263a74-0x0;var _0x2aa86c=_0x5870[_0x263a74];return _0x2aa86c;};'use strict';var _=require(_0x0587('0x0'));var util=require(_0x0587('0x1'));var logger=require(_0x0587('0x2'))(_0x0587('0x3'));var moment=require('moment');var BPromise=require(_0x0587('0x4'));var rp=require(_0x0587('0x5'));var fs=require('fs');var path=require(_0x0587('0x6'));var rimraf=require(_0x0587('0x7'));var config=require(_0x0587('0x8'));var attributes=require('./whatsappApplication.attributes');module[_0x0587('0x9')]=function(_0x99edf0,_0xef9206){return _0x99edf0[_0x0587('0xa')](_0x0587('0xb'),attributes,{'tableName':'whatsapp_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x0587('0xc'),'collate':_0x0587('0xd')});};
\ No newline at end of file
+var _0x16b8=['utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','define','WhatsappApplication'];(function(_0x254d9f,_0x54ddb5){var _0x1eedb9=function(_0x2d05f1){while(--_0x2d05f1){_0x254d9f['push'](_0x254d9f['shift']());}};_0x1eedb9(++_0x54ddb5);}(_0x16b8,0xc5));var _0x816b=function(_0x22277e,_0x9e9f4d){_0x22277e=_0x22277e-0x0;var _0x120115=_0x16b8[_0x22277e];return _0x120115;};'use strict';var _=require(_0x816b('0x0'));var util=require(_0x816b('0x1'));var logger=require(_0x816b('0x2'))(_0x816b('0x3'));var moment=require('moment');var BPromise=require(_0x816b('0x4'));var rp=require(_0x816b('0x5'));var fs=require('fs');var path=require(_0x816b('0x6'));var rimraf=require(_0x816b('0x7'));var config=require(_0x816b('0x8'));var attributes=require('./whatsappApplication.attributes');module['exports']=function(_0x197ef6,_0x441248){return _0x197ef6[_0x816b('0x9')](_0x816b('0xa'),attributes,{'tableName':'whatsapp_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x816b('0xb'),'collate':_0x816b('0xc')});};
\ No newline at end of file
diff --git a/server/api/whatsappApplication/whatsappApplication.rpc.js b/server/api/whatsappApplication/whatsappApplication.rpc.js
index 877ce97..b01a8d7 100644
--- a/server/api/whatsappApplication/whatsappApplication.rpc.js
+++ b/server/api/whatsappApplication/whatsappApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdded=['error','code','message','info','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','WhatsappApplication,\x20%s,\x20%s','debug','request\x20sent','stringify'];(function(_0x2a024f,_0x1ef412){var _0x13a416=function(_0x17f059){while(--_0x17f059){_0x2a024f['push'](_0x2a024f['shift']());}};_0x13a416(++_0x1ef412);}(_0xdded,0x17a));var _0xddde=function(_0x4274b5,_0x4994c8){_0x4274b5=_0x4274b5-0x0;var _0x1eea06=_0xdded[_0x4274b5];return _0x1eea06;};'use strict';var _=require(_0xddde('0x0'));var util=require(_0xddde('0x1'));var moment=require(_0xddde('0x2'));var BPromise=require(_0xddde('0x3'));var rs=require(_0xddde('0x4'));var fs=require('fs');var Redis=require(_0xddde('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xddde('0x6'));var logger=require(_0xddde('0x7'))(_0xddde('0x8'));var config=require(_0xddde('0x9'));var jayson=require(_0xddde('0xa'));var client=jayson[_0xddde('0xb')][_0xddde('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3cea18,_0x516eb5,_0x18d8b8){return new BPromise(function(_0x3a5e8a,_0x5f1a34){return client[_0xddde('0xd')](_0x3cea18,_0x18d8b8)['then'](function(_0x48dd55){logger['info'](_0xddde('0xe'),_0x516eb5,'request\x20sent');logger[_0xddde('0xf')]('WhatsappApplication,\x20%s,\x20%s,\x20%s',_0x516eb5,_0xddde('0x10'),JSON[_0xddde('0x11')](_0x48dd55));if(_0x48dd55[_0xddde('0x12')]){if(_0x48dd55[_0xddde('0x12')][_0xddde('0x13')]===0x1f4){logger[_0xddde('0x12')](_0xddde('0xe'),_0x516eb5,_0x48dd55[_0xddde('0x12')]['message']);return _0x5f1a34(_0x48dd55[_0xddde('0x12')][_0xddde('0x14')]);}logger[_0xddde('0x12')](_0xddde('0xe'),_0x516eb5,_0x48dd55[_0xddde('0x12')][_0xddde('0x14')]);return _0x3a5e8a(_0x48dd55['error'][_0xddde('0x14')]);}else{logger[_0xddde('0x15')](_0xddde('0xe'),_0x516eb5,'request\x20sent');_0x3a5e8a(_0x48dd55['result'][_0xddde('0x14')]);}})['catch'](function(_0x30a9da){logger[_0xddde('0x12')](_0xddde('0xe'),_0x516eb5,_0x30a9da);_0x5f1a34(_0x30a9da);});});}
\ No newline at end of file
+var _0x3bd7=['request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','WhatsappApplication,\x20%s,\x20%s','message','result','catch','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','info'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3bd7,0x199));var _0x73bd=function(_0x46cf00,_0x457a43){_0x46cf00=_0x46cf00-0x0;var _0x3974dc=_0x3bd7[_0x46cf00];return _0x3974dc;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x73bd('0x0'));var BPromise=require(_0x73bd('0x1'));var rs=require(_0x73bd('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x73bd('0x3'))['db'];var utils=require(_0x73bd('0x4'));var logger=require(_0x73bd('0x5'))('rpc');var config=require(_0x73bd('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x73bd('0x7')][_0x73bd('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4bca41,_0x38ffbb,_0x4c1254){return new BPromise(function(_0x569bef,_0x549abe){return client[_0x73bd('0x9')](_0x4bca41,_0x4c1254)['then'](function(_0x4f627c){logger[_0x73bd('0xa')]('WhatsappApplication,\x20%s,\x20%s',_0x38ffbb,_0x73bd('0xb'));logger[_0x73bd('0xc')](_0x73bd('0xd'),_0x38ffbb,_0x73bd('0xb'),JSON[_0x73bd('0xe')](_0x4f627c));if(_0x4f627c[_0x73bd('0xf')]){if(_0x4f627c['error'][_0x73bd('0x10')]===0x1f4){logger[_0x73bd('0xf')](_0x73bd('0x11'),_0x38ffbb,_0x4f627c[_0x73bd('0xf')][_0x73bd('0x12')]);return _0x549abe(_0x4f627c[_0x73bd('0xf')]['message']);}logger[_0x73bd('0xf')]('WhatsappApplication,\x20%s,\x20%s',_0x38ffbb,_0x4f627c[_0x73bd('0xf')][_0x73bd('0x12')]);return _0x569bef(_0x4f627c[_0x73bd('0xf')][_0x73bd('0x12')]);}else{logger[_0x73bd('0xa')]('WhatsappApplication,\x20%s,\x20%s',_0x38ffbb,_0x73bd('0xb'));_0x569bef(_0x4f627c[_0x73bd('0x13')][_0x73bd('0x12')]);}})[_0x73bd('0x14')](function(_0x411931){logger[_0x73bd('0xf')](_0x73bd('0x11'),_0x38ffbb,_0x411931);_0x549abe(_0x411931);});});}
\ No newline at end of file
diff --git a/server/api/whatsappInteraction/index.js b/server/api/whatsappInteraction/index.js
index dc75ac7..e784cff 100644
--- a/server/api/whatsappInteraction/index.js
+++ b/server/api/whatsappInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0642=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappInteraction.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/messages','/:id/download','download','post','create','addMessage','whatsapp','addTags','tracked','whatsappinteraction:update','update','delete','whatsappinteraction:destroy','/:id/tags','removeTags','exports','multer','path','connect-timeout','express'];(function(_0x595665,_0xeef749){var _0xfe2a65=function(_0x5216d6){while(--_0x5216d6){_0x595665['push'](_0x595665['shift']());}};_0xfe2a65(++_0xeef749);}(_0x0642,0x1dc));var _0x2064=function(_0x602ca8,_0x568e82){_0x602ca8=_0x602ca8-0x0;var _0x26e8ab=_0x0642[_0x602ca8];return _0x26e8ab;};'use strict';var multer=require(_0x2064('0x0'));var util=require('util');var path=require(_0x2064('0x1'));var timeout=require(_0x2064('0x2'));var express=require(_0x2064('0x3'));var router=express[_0x2064('0x4')]();var auth=require(_0x2064('0x5'));var interaction=require(_0x2064('0x6'));var config=require(_0x2064('0x7'));var controller=require(_0x2064('0x8'));router['get']('/',auth[_0x2064('0x9')](),controller[_0x2064('0xa')]);router[_0x2064('0xb')](_0x2064('0xc'),auth[_0x2064('0x9')](),controller[_0x2064('0xd')]);router['get'](_0x2064('0xe'),auth[_0x2064('0x9')](),controller[_0x2064('0xf')]);router[_0x2064('0xb')](_0x2064('0x10'),auth[_0x2064('0x9')](),controller['getMessages']);router['get'](_0x2064('0x11'),auth['isAuthenticated'](),controller[_0x2064('0x12')]);router[_0x2064('0x13')]('/',auth[_0x2064('0x9')](),controller[_0x2064('0x14')]);router[_0x2064('0x13')]('/:id/messages',auth['isAuthenticated'](),controller[_0x2064('0x15')]);router[_0x2064('0x13')]('/:id/tags',auth[_0x2064('0x9')](),interaction['tracked'](_0x2064('0x16'),'whatsappinteraction:addtags'),controller[_0x2064('0x17')]);router['put'](_0x2064('0xe'),auth[_0x2064('0x9')](),interaction[_0x2064('0x18')](_0x2064('0x16'),_0x2064('0x19')),controller[_0x2064('0x1a')]);router[_0x2064('0x1b')]('/:id',auth[_0x2064('0x9')](),interaction[_0x2064('0x18')](_0x2064('0x16'),_0x2064('0x1c')),controller['destroy']);router['delete'](_0x2064('0x1d'),auth[_0x2064('0x9')](),controller[_0x2064('0x1e')]);module[_0x2064('0x1f')]=router;
\ No newline at end of file
+var _0x168b=['index','get','describe','/:id','show','/:id/messages','getMessages','/:id/download','post','addMessage','/:id/tags','tracked','whatsappinteraction:addtags','addTags','put','whatsapp','whatsappinteraction:update','update','whatsappinteraction:destroy','destroy','delete','removeTags','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappInteraction.controller','isAuthenticated'];(function(_0xbc4659,_0x578fba){var _0x5831f9=function(_0x5eb0eb){while(--_0x5eb0eb){_0xbc4659['push'](_0xbc4659['shift']());}};_0x5831f9(++_0x578fba);}(_0x168b,0x9b));var _0xb168=function(_0x1df443,_0x2860fe){_0x1df443=_0x1df443-0x0;var _0x3ee434=_0x168b[_0x1df443];return _0x3ee434;};'use strict';var multer=require(_0xb168('0x0'));var util=require(_0xb168('0x1'));var path=require(_0xb168('0x2'));var timeout=require('connect-timeout');var express=require(_0xb168('0x3'));var router=express[_0xb168('0x4')]();var auth=require(_0xb168('0x5'));var interaction=require(_0xb168('0x6'));var config=require(_0xb168('0x7'));var controller=require(_0xb168('0x8'));router['get']('/',auth[_0xb168('0x9')](),controller[_0xb168('0xa')]);router[_0xb168('0xb')]('/describe',auth[_0xb168('0x9')](),controller[_0xb168('0xc')]);router[_0xb168('0xb')](_0xb168('0xd'),auth[_0xb168('0x9')](),controller[_0xb168('0xe')]);router[_0xb168('0xb')](_0xb168('0xf'),auth[_0xb168('0x9')](),controller[_0xb168('0x10')]);router[_0xb168('0xb')](_0xb168('0x11'),auth[_0xb168('0x9')](),controller['download']);router[_0xb168('0x12')]('/',auth['isAuthenticated'](),controller['create']);router[_0xb168('0x12')]('/:id/messages',auth[_0xb168('0x9')](),controller[_0xb168('0x13')]);router[_0xb168('0x12')](_0xb168('0x14'),auth[_0xb168('0x9')](),interaction[_0xb168('0x15')]('whatsapp',_0xb168('0x16')),controller[_0xb168('0x17')]);router[_0xb168('0x18')]('/:id',auth[_0xb168('0x9')](),interaction[_0xb168('0x15')](_0xb168('0x19'),_0xb168('0x1a')),controller[_0xb168('0x1b')]);router['delete'](_0xb168('0xd'),auth[_0xb168('0x9')](),interaction[_0xb168('0x15')](_0xb168('0x19'),_0xb168('0x1c')),controller[_0xb168('0x1d')]);router[_0xb168('0x1e')](_0xb168('0x14'),auth['isAuthenticated'](),controller[_0xb168('0x1f')]);module[_0xb168('0x20')]=router;
\ No newline at end of file
diff --git a/server/api/whatsappInteraction/whatsappInteraction.attributes.js b/server/api/whatsappInteraction/whatsappInteraction.attributes.js
index b246183..9856576 100644
--- a/server/api/whatsappInteraction/whatsappInteraction.attributes.js
+++ b/server/api/whatsappInteraction/whatsappInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5bd7=['DATE','STRING','ENUM','out','moment','exports','BOOLEAN'];(function(_0x153e7d,_0x10a35f){var _0x3c22dd=function(_0x4d33f6){while(--_0x4d33f6){_0x153e7d['push'](_0x153e7d['shift']());}};_0x3c22dd(++_0x10a35f);}(_0x5bd7,0xc1));var _0x75bd=function(_0xe80efa,_0x12648f){_0xe80efa=_0xe80efa-0x0;var _0x137549=_0x5bd7[_0xe80efa];return _0x137549;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x75bd('0x0'));module[_0x75bd('0x1')]={'closed':{'type':Sequelize[_0x75bd('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x75bd('0x3')]},'disposition':{'type':Sequelize[_0x75bd('0x4')]},'note':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x75bd('0x4')]},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x75bd('0x5')]('in',_0x75bd('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x75bd('0x3')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x75bd('0x6')),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
+var _0x129d=['DATE','STRING','ENUM','out','moment','BOOLEAN'];(function(_0x2b0180,_0x27ae1a){var _0x346a84=function(_0x8c2e27){while(--_0x8c2e27){_0x2b0180['push'](_0x2b0180['shift']());}};_0x346a84(++_0x27ae1a);}(_0x129d,0x1ea));var _0xd129=function(_0x24ec07,_0x3f2b8f){_0x24ec07=_0x24ec07-0x0;var _0x1dfafb=_0x129d[_0x24ec07];return _0x1dfafb;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xd129('0x0'));module['exports']={'closed':{'type':Sequelize[_0xd129('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xd129('0x2')]},'disposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xd129('0x3')]},'phone':{'type':Sequelize[_0xd129('0x3')]},'read1stAt':{'type':Sequelize[_0xd129('0x2')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xd129('0x2')]},'lastMsgDirection':{'type':Sequelize[_0xd129('0x4')]('in',_0xd129('0x5')),'defaultValue':'in','allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/whatsappInteraction/whatsappInteraction.controller.js b/server/api/whatsappInteraction/whatsappInteraction.controller.js
index e1a85c5..98a0750 100644
--- a/server/api/whatsappInteraction/whatsappInteraction.controller.js
+++ b/server/api/whatsappInteraction/whatsappInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x814b=['index','rawAttributes','type','key','model','query','intersection','attributes','length','nolimit','limit','order','sort','filters','select','field','color','from','tools_tags','u.id','u.fullname','ui.WhatsappInteractionId','users','u.id\x20=\x20ui.UserId','whatsapp_interactions','left_join','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','whatsapp_accounts','me.WhatsappInteractionId\x20=\x20i.id','whatsapp_interaction_has_tags','it.WhatsappInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','parseSearch','conditions','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','operator','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','start','Tag','union','$substring','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','find','UserId','body','keys','some','compact','WhatsappAccountId','where','i.WhatsappAccountId\x20IN\x20?','concat','createdAt','parse','$lte','\x20IS\x20NULL','\x20=\x20?','`unreadMessages`\x20>\x200','isArray','tag','filter','replace','\x27\x27\x27\x27','isNumeric','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','i.id','Sequelize','QueryTypes','SELECT','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','DESC','isEmpty','t.id\x20IN\x20?','journey','i.WhatsappAccountId\x20IS\x20NOT\x20NULL','user','getWhatsappAccounts','toString','count','sequelize','fields','a.key','Account.key','Account.mandatoryDisposition','i.*','Contact.firstName','c.lastName','Contact.lastName','Contact.phone','Contact.mobile','c.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','ui.WhatsappInteractionId\x20IN\x20?','groupBy','all','rows','show','params','WhatsappInteraction','includeAll','merge','options','create','describe','addMessage','WhatsappMessage','ids','getMessages','findOne','hasOwnProperty','WhatsappInteractionId','$gte','format','YYYY-MM-DD\x20HH:mm:ss','include','findAll','addTags','setTags','spread','emit','whatsappInteractionTags:save','removeTags','download','unix','root','server','files','tmp','join','attachments','transcript-%d-%s.zip','User','fullname','Contact','firstName','lastName','Attachment','Messages','direction','secret','read','WhatsappAccount','Account','Owner','get','mkdirSync','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
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','%s\x20#%d','Whatsapp','YYYY-MM-DD','closedAt','disposition','existsSync','basename','out','System','renderFile','downloadInteraction.html','toFile','transcript-','.pdf','log','unlinkSync','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappInteraction.socket','register','sendStatus','status','end','json','offset','set','Content-Range','reject','save','update','destroy','then','error','stack','name','send','map','TagIds','split','forEach','push','catch'];(function(_0x23851f,_0x30b5b1){var _0x5c3247=function(_0x2396a9){while(--_0x2396a9){_0x23851f['push'](_0x23851f['shift']());}};_0x5c3247(++_0x30b5b1);}(_0x814b,0x1a2));var _0xb814=function(_0x1bc445,_0x2d6fe0){_0x1bc445=_0x1bc445-0x0;var _0x589e6b=_0x814b[_0x1bc445];return _0x589e6b;};'use strict';var pdf=require(_0xb814('0x0'));var emlformat=require(_0xb814('0x1'));var rimraf=require(_0xb814('0x2'));var zipdir=require(_0xb814('0x3'));var jsonpatch=require(_0xb814('0x4'));var rp=require(_0xb814('0x5'));var moment=require('moment');var BPromise=require(_0xb814('0x6'));var Mustache=require(_0xb814('0x7'));var util=require(_0xb814('0x8'));var path=require(_0xb814('0x9'));var sox=require(_0xb814('0xa'));var csv=require(_0xb814('0xb'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xb814('0xc'));var squel=require(_0xb814('0xd'));var crypto=require('crypto');var jsforce=require(_0xb814('0xe'));var deskjs=require(_0xb814('0xf'));var toCsv=require(_0xb814('0xb'));var querystring=require(_0xb814('0x10'));var Papa=require(_0xb814('0x11'));var Redis=require(_0xb814('0x12'));var authService=require(_0xb814('0x13'));var qs=require(_0xb814('0x14'));var as=require(_0xb814('0x15'));var hardwareService=require(_0xb814('0x16'));var logger=require(_0xb814('0x17'))('api');var utils=require(_0xb814('0x18'));var config=require('../../config/environment');var db=require(_0xb814('0x19'))['db'];config[_0xb814('0x1a')]=_[_0xb814('0x1b')](config[_0xb814('0x1a')],{'host':_0xb814('0x1c'),'port':0x18eb});var socket=require(_0xb814('0x1d'))(new Redis(config[_0xb814('0x1a')]));require(_0xb814('0x1e'))[_0xb814('0x1f')](socket);function respondWithStatusCode(_0x2ab627,_0x3f4881){_0x3f4881=_0x3f4881||0xcc;return function(_0x44fb96){if(_0x44fb96){return _0x2ab627[_0xb814('0x20')](_0x3f4881);}return _0x2ab627[_0xb814('0x21')](_0x3f4881)[_0xb814('0x22')]();};}function respondWithResult(_0x3a71d6,_0x45e0d0){_0x45e0d0=_0x45e0d0||0xc8;return function(_0x265a83){if(_0x265a83){return _0x3a71d6[_0xb814('0x21')](_0x45e0d0)[_0xb814('0x23')](_0x265a83);}};}function respondWithFilteredResult(_0x7a21ef,_0x48c9df){return function(_0x168a48){if(_0x168a48){var _0x55ba16=_0x168a48['count'],_0x270598=_0x48c9df['offset'],_0xfac75b=_0x48c9df[_0xb814('0x24')]+_0x48c9df['limit'],_0x4c3007;if(_0xfac75b>=_0x55ba16){_0xfac75b=_0x55ba16;_0x4c3007=0xc8;}else{_0x4c3007=0xce;}_0x7a21ef['status'](_0x4c3007);return _0x7a21ef[_0xb814('0x25')](_0xb814('0x26'),_0x270598+'-'+_0xfac75b+'/'+_0x55ba16)[_0xb814('0x23')](_0x168a48);}return null;};}function patchUpdates(_0x4e139e){return function(_0xf5b8aa){try{jsonpatch['apply'](_0xf5b8aa,_0x4e139e,!![]);}catch(_0x1e6393){return BPromise[_0xb814('0x27')](_0x1e6393);}return _0xf5b8aa[_0xb814('0x28')]();};}function saveUpdates(_0x470e81,_0x27352e){return function(_0x2bd039){if(_0x2bd039){return _0x2bd039[_0xb814('0x29')](_0x470e81)['then'](function(_0x2ead86){return _0x2ead86;});}return null;};}function removeEntity(_0x52b7a3,_0x3f81d0){return function(_0x457dac){if(_0x457dac){return _0x457dac[_0xb814('0x2a')]()[_0xb814('0x2b')](function(){_0x52b7a3[_0xb814('0x21')](0xcc)[_0xb814('0x22')]();});}};}function handleEntityNotFound(_0x3d836c,_0x5755ea){return function(_0x392222){if(!_0x392222){_0x3d836c[_0xb814('0x20')](0x194);}return _0x392222;};}function handleError(_0x1c2625,_0x349394){_0x349394=_0x349394||0x1f4;return function(_0x32ed56){logger[_0xb814('0x2c')](_0x32ed56[_0xb814('0x2d')]);if(_0x32ed56[_0xb814('0x2e')]){delete _0x32ed56['name'];}_0x1c2625[_0xb814('0x21')](_0x349394)[_0xb814('0x2f')](_0x32ed56);};}function getInteractionUsers(_0x52ed64,_0x9008b2){return new BPromise(function(_0x37d24d,_0x530744){try{if(_0x9008b2[_0x52ed64['id']]){_0x52ed64['Users']=_[_0xb814('0x30')](_0x9008b2[_0x52ed64['id']],function(_0x2051d0){return{'id':_0x2051d0['id'],'fullname':_0x2051d0['fullname']};});}}catch(_0x338a28){_0x530744(_0x338a28);}_0x37d24d(_0x52ed64);});}function getInteractionTags(_0x526610,_0x6efe9a){return new BPromise(function(_0x5f3e9b,_0x4cfc58){try{if(_0x526610[_0xb814('0x31')]){_0x526610['Tags']=[];_0x526610[_0xb814('0x31')][_0xb814('0x32')](',')[_0xb814('0x33')](function(_0x599f9f){_0x526610['Tags'][_0xb814('0x34')](_0x6efe9a[_0x599f9f]);});}delete _0x526610[_0xb814('0x31')];}catch(_0x523566){_0x4cfc58(_0x523566);}_0x5f3e9b(_0x526610);});}function updateWhatsappInteraction(_0x2c8943,_0xe558d5,_0x692c72){return new BPromise(function(_0x217b7e,_0x1b78de){return getInteractionUsers(_0x2c8943,_0x692c72)[_0xb814('0x2b')](function(_0x3672f3){return getInteractionTags(_0x3672f3,_0xe558d5);})['then'](function(_0x3207ec){_0x217b7e(_0x3207ec);})[_0xb814('0x35')](function(_0x30de5a){_0x1b78de(_0x30de5a);});});}exports[_0xb814('0x36')]=function(_0x14100d,_0x4ff31a){var _0x16ef82={},_0x57e6e6={},_0x43db67={'count':0x0,'rows':[]};var _0x16e21c=_[_0xb814('0x30')](db['WhatsappInteraction'][_0xb814('0x37')],function(_0xbdb3e9){return{'name':_0xbdb3e9['fieldName'],'type':_0xbdb3e9[_0xb814('0x38')][_0xb814('0x39')]};});_0x57e6e6[_0xb814('0x3a')]=_[_0xb814('0x30')](_0x16e21c,_0xb814('0x2e'));_0x57e6e6[_0xb814('0x3b')]=_['keys'](_0x14100d[_0xb814('0x3b')]);_0x57e6e6['filters']=_[_0xb814('0x3c')](_0x57e6e6['model'],_0x57e6e6[_0xb814('0x3b')]);_0x16ef82['attributes']=_[_0xb814('0x3c')](_0x57e6e6[_0xb814('0x3a')],qs['fields'](_0x14100d['query']['fields']));_0x16ef82['attributes']=_0x16ef82[_0xb814('0x3d')][_0xb814('0x3e')]?_0x16ef82[_0xb814('0x3d')]:_0x57e6e6[_0xb814('0x3a')];if(!_0x14100d['query']['hasOwnProperty'](_0xb814('0x3f'))){_0x16ef82['limit']=qs[_0xb814('0x40')](_0x14100d[_0xb814('0x3b')][_0xb814('0x40')]);_0x16ef82[_0xb814('0x24')]=qs[_0xb814('0x24')](_0x14100d[_0xb814('0x3b')][_0xb814('0x24')]);}_0x16ef82[_0xb814('0x41')]=qs[_0xb814('0x42')](_0x14100d['query']['sort']);_0x16ef82['where']=qs[_0xb814('0x43')](_['pick'](_0x14100d[_0xb814('0x3b')],_0x57e6e6['filters']),_0x16e21c);var _0x411723=[];var _0x44ff56=squel[_0xb814('0x44')]()[_0xb814('0x45')]('id')['field'](_0xb814('0x2e'))[_0xb814('0x45')](_0xb814('0x46'))[_0xb814('0x47')](_0xb814('0x48'));var _0x450a08=squel['select']()[_0xb814('0x45')](_0xb814('0x49'))[_0xb814('0x45')](_0xb814('0x4a'))[_0xb814('0x45')](_0xb814('0x4b'))[_0xb814('0x47')]('user_has_whatsapp_interactions','ui')['left_join'](_0xb814('0x4c'),'u',_0xb814('0x4d'));var _0x4c08d6=squel[_0xb814('0x44')]()[_0xb814('0x47')](_0xb814('0x4e'),'i')[_0xb814('0x4f')](_0xb814('0x50'),'c',_0xb814('0x51'))[_0xb814('0x4f')](_0xb814('0x4c'),'o','o.id\x20=\x20i.UserId')[_0xb814('0x4f')](_0xb814('0x52'),'a','a.id\x20=\x20i.WhatsappAccountId')[_0xb814('0x4f')]('whatsapp_messages','me',_0xb814('0x53'))[_0xb814('0x4f')](_0xb814('0x54'),'it',_0xb814('0x55'))[_0xb814('0x4f')](_0xb814('0x48'),'t',_0xb814('0x56'));var _0x45480e=squel[_0xb814('0x57')]();var _0x2a422a=[];var _0x5e6df7=squel['expr']();var _0x32eca6;if(_0x14100d[_0xb814('0x3b')][_0xb814('0x58')]){_0x32eca6=as[_0xb814('0x59')](_0x14100d[_0xb814('0x3b')][_0xb814('0x58')]);var _0x135208=_0x32eca6['sqlOperator'];for(var _0x26fd0b=0x0;_0x26fd0b<_0x32eca6[_0xb814('0x5a')][_0xb814('0x3e')];_0x26fd0b++){var _0x5a916d=_0x32eca6[_0xb814('0x5a')][_0x26fd0b];var _0x4e6f3c='i';var _0x252293=_['find'](_0x16e21c,[_0xb814('0x2e'),_0x5a916d[_0xb814('0x45')]]);if(!_0x252293){switch(_0x5a916d['field']){case _0xb814('0x5b'):if(_0x5a916d[_0xb814('0x5c')]==0x1){_0x4c08d6[_0xb814('0x5d')]('`'+_0x5a916d['field']+_0xb814('0x5e'));}else{_0x4c08d6['having']('`'+_0x5a916d[_0xb814('0x45')]+_0xb814('0x5f'));}break;case'Contact':if(_0x5a916d[_0xb814('0x60')]==='$substring'){if(_0x5a916d['value'][_0xb814('0x32')]('\x20')[_0xb814('0x3e')]>0x1){_0x45480e[_0x135208](_0xb814('0x61'),qs['getFullTextValue'](_0x5a916d[_0xb814('0x5c')]),null);}else{var _0x538b0f='%'+_0x5a916d[_0xb814('0x5c')]+'%';_0x45480e[_0x135208](_0xb814('0x62'),_0x538b0f,_0x538b0f,_0x538b0f);}}else{_0x252293=_['find'](_0x16e21c,[_0xb814('0x2e'),'ContactId']);_0x5a916d[_0xb814('0x45')]=_0xb814('0x63');_0x135e13=as[_0xb814('0x64')](_0x4e6f3c,_0x252293[_0xb814('0x38')],_0x5a916d);_0x45480e[_0x135208](_0x135e13[_0xb814('0x65')],_0x135e13[_0xb814('0x5c')][_0xb814('0x66')],_0x135e13[_0xb814('0x5c')]['end']);}break;case _0xb814('0x67'):var _0x5441c5=_0x5a916d['value'][_0xb814('0x32')](',')[_0xb814('0x30')](function(_0x4d13db){return Number(_0x4d13db);});_0x5441c5[_0xb814('0x33')](function(_0x58b9a6){_0x5e6df7['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x58b9a6+',%');});_0x2a422a=_[_0xb814('0x68')](_0x2a422a,_0x5441c5);break;case'User':if(_0x5a916d[_0xb814('0x60')]===_0xb814('0x69')){_0x45480e[_0x135208](_0xb814('0x6a'),'%'+_0x5a916d['value']+'%',null);}else{_0x252293=_[_0xb814('0x6b')](_0x16e21c,['name',_0xb814('0x6c')]);_0x5a916d[_0xb814('0x45')]=_0xb814('0x6c');_0x135e13=as[_0xb814('0x64')](_0x4e6f3c,_0x252293[_0xb814('0x38')],_0x5a916d);_0x45480e[_0x135208](_0x135e13[_0xb814('0x65')],_0x135e13[_0xb814('0x5c')][_0xb814('0x66')],_0x135e13[_0xb814('0x5c')]['end']);}break;case _0xb814('0x6d'):_0x135e13=as[_0xb814('0x64')]('me',null,_0x5a916d);_0x45480e[_0x135208](_0x135e13[_0xb814('0x65')],_0x135e13[_0xb814('0x5c')][_0xb814('0x66')],_0x135e13[_0xb814('0x5c')]['end']);break;}}else{var _0x135e13=as['buildExpression'](_0x4e6f3c,_0x252293[_0xb814('0x38')],_0x5a916d);_0x45480e[_0x135208](_0x135e13[_0xb814('0x65')],_0x135e13[_0xb814('0x5c')]['start'],_0x135e13[_0xb814('0x5c')]['end']);}}}else{var _0x37e9c5=_(_0x14100d['query'])[_0xb814('0x6e')]()[_0xb814('0x30')](function(_0xa03cd2){return _[_0xb814('0x6f')](_0x16e21c,[_0xb814('0x2e'),_0xa03cd2])?_0xa03cd2:undefined;})[_0xb814('0x70')]()[_0xb814('0x5c')]();if(!_['isEmpty'](_0x37e9c5)){_0x37e9c5[_0xb814('0x33')](function(_0x51ca51){if(_0x51ca51===_0xb814('0x71')){_0x4c08d6[_0xb814('0x72')](_0xb814('0x73'),[][_0xb814('0x74')](_0x14100d[_0xb814('0x3b')][_0x51ca51]));}else if(_0x51ca51===_0xb814('0x75')){var _0x514dab=JSON[_0xb814('0x76')](_0x14100d[_0xb814('0x3b')][_0x51ca51])['$gte'];var _0x3bb2b4=JSON[_0xb814('0x76')](_0x14100d[_0xb814('0x3b')][_0x51ca51])[_0xb814('0x77')];_0x4c08d6[_0xb814('0x72')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x514dab,_0x3bb2b4);}else{if(_0x14100d[_0xb814('0x3b')][_0x51ca51]==='null'){_0x4c08d6[_0xb814('0x72')]('i.'+_0x51ca51+_0xb814('0x78'));}else{_0x4c08d6[_0xb814('0x72')]('i.'+_0x51ca51+_0xb814('0x79'),_0x14100d[_0xb814('0x3b')][_0x51ca51]);}}});}if(_0x14100d[_0xb814('0x3b')]['read']){if(_0x14100d['query']['read']==0x1){_0x4c08d6[_0xb814('0x5d')]('`unreadMessages`\x20=\x200');}else{_0x4c08d6[_0xb814('0x5d')](_0xb814('0x7a'));}}if(_0x14100d[_0xb814('0x3b')]['tag']){_0x2a422a=_[_0xb814('0x7b')](_0x14100d[_0xb814('0x3b')][_0xb814('0x7c')])?_0x14100d['query'][_0xb814('0x7c')]:new Array(_0x14100d[_0xb814('0x3b')][_0xb814('0x7c')]);_0x2a422a[_0xb814('0x33')](function(_0x555be0){_0x5e6df7['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x555be0+',%');});}if(_0x14100d[_0xb814('0x3b')][_0xb814('0x7d')]){var _0x39863d=_0x14100d[_0xb814('0x3b')][_0xb814('0x7d')][_0xb814('0x7e')]('\x5c','\x5c\x5c')[_0xb814('0x7e')]('\x27\x27',_0xb814('0x7f'));if(qs[_0xb814('0x80')](_0x39863d)){_0x45480e['or'](_0xb814('0x81'),_0x39863d+'%')['or'](_0xb814('0x82'),_0x39863d+'%');}else{_0x45480e['or'](_0xb814('0x83'),qs[_0xb814('0x84')](_0x39863d))['or'](_0xb814('0x85'),_0x39863d+'%');}}}_0x4c08d6[_0xb814('0x72')](_0x45480e);_0x4c08d6['group'](_0xb814('0x86'));var _0x33cfc4={'type':db[_0xb814('0x87')][_0xb814('0x88')][_0xb814('0x89')],'raw':!![]};var _0x283b0f=_0x4c08d6['clone']();_0x283b0f[_0xb814('0x45')]('i.id');_0x283b0f[_0xb814('0x45')](_0xb814('0x8a'),_0xb814('0x5b'));if(_0x16ef82[_0xb814('0x41')]){_0x16ef82[_0xb814('0x41')]['forEach'](function(_0x4c44ee){_0x4c08d6[_0xb814('0x41')]('i.'+_0x4c44ee[0x0],_0x4c44ee[0x1]===_0xb814('0x8b')?![]:!![]);});}if(!_[_0xb814('0x8c')](_0x2a422a)){_0x4c08d6[_0xb814('0x5d')](_0x5e6df7);_0x283b0f['where'](_0xb814('0x8d'),_0x2a422a);}BPromise['resolve']()[_0xb814('0x2b')](function(){if(!_0x32eca6){if(_0x14100d[_0xb814('0x3b')]['WhatsappAccountId']||_0x14100d['query'][_0xb814('0x8e')])return;_0x283b0f['where'](_0xb814('0x8f'));_0x4c08d6[_0xb814('0x72')](_0xb814('0x8f'));return;}return _0x14100d[_0xb814('0x90')][_0xb814('0x91')]({'attributes':['id'],'raw':!![]})[_0xb814('0x2b')](function(_0x40fe4a){if(_['isEmpty'](_0x40fe4a)){_0x283b0f[_0xb814('0x72')]('i.WhatsappAccountId\x20IS\x20NULL');_0x4c08d6[_0xb814('0x72')]('i.WhatsappAccountId\x20IS\x20NULL');}else{_0x283b0f[_0xb814('0x72')](_0xb814('0x73'),_['map'](_0x40fe4a,'id'));_0x4c08d6[_0xb814('0x72')]('i.WhatsappAccountId\x20IN\x20?',_[_0xb814('0x30')](_0x40fe4a,'id'));}});})[_0xb814('0x2b')](function(){db['sequelize']['query'](_0x283b0f[_0xb814('0x92')](),_0x33cfc4)[_0xb814('0x2b')](function(_0x3309c5){_0x43db67[_0xb814('0x93')]=_0x3309c5[_0xb814('0x3e')];if(_0x43db67[_0xb814('0x93')]===0x0)return[];return db[_0xb814('0x94')][_0xb814('0x3b')](_0x44ff56[_0xb814('0x92')](),_0x33cfc4)[_0xb814('0x2b')](function(_0x53e705){_0x411723=_['keyBy'](_0x53e705,'id');_0x33cfc4=_['merge'](_0x33cfc4,{'model':db['WhatsappInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x14100d['query'][_0xb814('0x95')]){_0x16ef82[_0xb814('0x3d')][_0xb814('0x33')](function(_0x59f3ff){_0x4c08d6[_0xb814('0x45')]('i.'+_0x59f3ff);});}else{_0x4c08d6[_0xb814('0x45')](_0xb814('0x8a'),_0xb814('0x5b'));_0x4c08d6[_0xb814('0x45')](_0xb814('0x96'),_0xb814('0x97'));_0x4c08d6[_0xb814('0x45')]('a.mandatoryDisposition',_0xb814('0x98'));_0x4c08d6[_0xb814('0x45')](_0xb814('0x99'));_0x4c08d6[_0xb814('0x45')]('c.firstName',_0xb814('0x9a'));_0x4c08d6[_0xb814('0x45')](_0xb814('0x9b'),_0xb814('0x9c'));_0x4c08d6[_0xb814('0x45')]('c.email','Contact.email');_0x4c08d6[_0xb814('0x45')]('c.phone',_0xb814('0x9d'));_0x4c08d6[_0xb814('0x45')]('c.mobile',_0xb814('0x9e'));_0x4c08d6['field'](_0xb814('0x9f'),'Contact.fax');_0x4c08d6[_0xb814('0x45')](_0xb814('0xa0'),_0xb814('0xa1'));_0x4c08d6[_0xb814('0x45')](_0xb814('0xa2'),_0xb814('0xa3'));_0x4c08d6[_0xb814('0x45')]('GROUP_CONCAT(DISTINCT\x20t.id)','TagIds');}if(_0x16ef82[_0xb814('0x40')])_0x4c08d6['limit'](_0x16ef82['limit']);if(_0x16ef82[_0xb814('0x24')])_0x4c08d6[_0xb814('0x24')](_0x16ef82[_0xb814('0x24')]);return db['sequelize'][_0xb814('0x3b')](_0x4c08d6['toString'](),_0x33cfc4);})[_0xb814('0x2b')](function(_0x19d508){_0x450a08[_0xb814('0x72')](_0xb814('0xa4'),_['map'](_0x19d508,'id'));return db[_0xb814('0x94')][_0xb814('0x3b')](_0x450a08[_0xb814('0x92')](),_0x33cfc4)['then'](function(_0x1ebbf6){var _0x3fc77d=_[_0xb814('0xa5')](_0x1ebbf6,'WhatsappInteractionId');var _0x5d8626=[];_0x19d508[_0xb814('0x33')](function(_0x9dc06b){_0x5d8626[_0xb814('0x34')](updateWhatsappInteraction(_0x9dc06b,_0x411723,_0x3fc77d));});return BPromise[_0xb814('0xa6')](_0x5d8626);});});})[_0xb814('0x2b')](function(_0x37a7ab){_0x43db67[_0xb814('0xa7')]=_0x37a7ab;return _0x43db67;})[_0xb814('0x2b')](respondWithFilteredResult(_0x4ff31a,_0x16ef82));})[_0xb814('0x35')](handleError(_0x4ff31a,null));};exports[_0xb814('0xa8')]=function(_0x2569a5,_0x2a13fb){var _0x5b8d2e={'raw':![],'where':{'id':_0x2569a5[_0xb814('0xa9')]['id']}},_0x5416dc={};_0x5416dc['model']=_[_0xb814('0x6e')](db[_0xb814('0xaa')][_0xb814('0x37')]);_0x5416dc[_0xb814('0x3b')]=_[_0xb814('0x6e')](_0x2569a5[_0xb814('0x3b')]);_0x5416dc[_0xb814('0x43')]=_['intersection'](_0x5416dc['model'],_0x5416dc[_0xb814('0x3b')]);_0x5b8d2e['attributes']=_[_0xb814('0x3c')](_0x5416dc[_0xb814('0x3a')],qs[_0xb814('0x95')](_0x2569a5['query'][_0xb814('0x95')]));_0x5b8d2e[_0xb814('0x3d')]=_0x5b8d2e[_0xb814('0x3d')][_0xb814('0x3e')]?_0x5b8d2e[_0xb814('0x3d')]:_0x5416dc['model'];if(_0x2569a5[_0xb814('0x3b')][_0xb814('0xab')]){_0x5b8d2e['include']=[{'all':!![]}];}_0x5b8d2e=_[_0xb814('0xac')]({},_0x5b8d2e,_0x2569a5[_0xb814('0xad')]);return db[_0xb814('0xaa')]['find'](_0x5b8d2e)[_0xb814('0x2b')](handleEntityNotFound(_0x2a13fb,null))[_0xb814('0x2b')](respondWithResult(_0x2a13fb,null))['catch'](handleError(_0x2a13fb,null));};exports[_0xb814('0xae')]=function(_0x171f83,_0x5b5634){return db[_0xb814('0xaa')][_0xb814('0xae')](_0x171f83[_0xb814('0x6d')],{})[_0xb814('0x2b')](respondWithResult(_0x5b5634,0xc9))[_0xb814('0x35')](handleError(_0x5b5634,null));};exports[_0xb814('0x29')]=function(_0x40ae0b,_0x336a8f){if(_0x40ae0b[_0xb814('0x6d')]['id']){delete _0x40ae0b[_0xb814('0x6d')]['id'];}return db[_0xb814('0xaa')][_0xb814('0x6b')]({'where':{'id':_0x40ae0b['params']['id']}})['then'](handleEntityNotFound(_0x336a8f,null))[_0xb814('0x2b')](saveUpdates(_0x40ae0b['body'],null))['then'](respondWithResult(_0x336a8f,null))[_0xb814('0x35')](handleError(_0x336a8f,null));};exports['destroy']=function(_0x4f0427,_0x50cb34){return db[_0xb814('0xaa')][_0xb814('0x6b')]({'where':{'id':_0x4f0427[_0xb814('0xa9')]['id']}})['then'](handleEntityNotFound(_0x50cb34,null))[_0xb814('0x2b')](removeEntity(_0x50cb34,null))['catch'](handleError(_0x50cb34,null));};exports[_0xb814('0xaf')]=function(_0x2e6660,_0x49a8de){return db[_0xb814('0xaa')]['describe']()[_0xb814('0x2b')](respondWithResult(_0x49a8de,null))[_0xb814('0x35')](handleError(_0x49a8de,null));};exports[_0xb814('0xb0')]=function(_0x39ce17,_0x11efb8,_0xaf705d){return db[_0xb814('0xb1')][_0xb814('0x6b')]({'where':{'id':_0x39ce17[_0xb814('0xa9')]['id']}})[_0xb814('0x2b')](handleEntityNotFound(_0x11efb8,null))[_0xb814('0x2b')](function(_0x3e7a9a){if(_0x3e7a9a){return _0x3e7a9a[_0xb814('0xb0')](_0x39ce17[_0xb814('0x6d')][_0xb814('0xb2')],_['omit'](_0x39ce17[_0xb814('0x6d')],[_0xb814('0xb2'),'id'])||{});}})['then'](respondWithResult(_0x11efb8,null))[_0xb814('0x35')](handleError(_0x11efb8,null));};exports[_0xb814('0xb3')]=function(_0x1868d9,_0x570191,_0x56b2aa){var _0x473b30={'raw':![],'where':{}};var _0x4af71e={};var _0x2d40e6={'count':0x0,'rows':[]};return db['WhatsappInteraction'][_0xb814('0xb4')]({'where':{'id':_0x1868d9['params']['id']}})['then'](handleEntityNotFound(_0x570191,null))[_0xb814('0x2b')](function(_0x32c956){if(_0x32c956){_0x4af71e[_0xb814('0x3a')]=_[_0xb814('0x6e')](db[_0xb814('0xb1')][_0xb814('0x37')]);_0x4af71e[_0xb814('0x3b')]=_[_0xb814('0x6e')](_0x1868d9[_0xb814('0x3b')]);_0x4af71e[_0xb814('0x43')]=_[_0xb814('0x3c')](_0x4af71e['model'],_0x4af71e[_0xb814('0x3b')]);_0x473b30['attributes']=_[_0xb814('0x3c')](_0x4af71e[_0xb814('0x3a')],qs[_0xb814('0x95')](_0x1868d9['query'][_0xb814('0x95')]));_0x473b30[_0xb814('0x3d')]=_0x473b30[_0xb814('0x3d')][_0xb814('0x3e')]?_0x473b30[_0xb814('0x3d')]:_0x4af71e[_0xb814('0x3a')];if(!_0x1868d9[_0xb814('0x3b')][_0xb814('0xb5')](_0xb814('0x3f'))){_0x473b30[_0xb814('0x40')]=qs[_0xb814('0x40')](_0x1868d9[_0xb814('0x3b')][_0xb814('0x40')]);_0x473b30[_0xb814('0x24')]=qs[_0xb814('0x24')](_0x1868d9['query'][_0xb814('0x24')]);}_0x473b30[_0xb814('0x41')]=qs[_0xb814('0x42')](_0x1868d9['query']['sort']);_0x473b30[_0xb814('0x72')]=qs['filters'](_['pick'](_0x1868d9['query'],_0x4af71e['filters']));_0x473b30[_0xb814('0x72')][_0xb814('0xb6')]=_0x32c956['id'];if(_0x1868d9['query'][_0xb814('0x7d')]){_0x473b30[_0xb814('0x72')]=_[_0xb814('0xac')](_0x473b30[_0xb814('0x72')],{'$or':_[_0xb814('0x30')](_0x473b30[_0xb814('0x3d')],function(_0x20e608){var _0x7b9948={};_0x7b9948[_0x20e608]={'$like':'%'+_0x1868d9[_0xb814('0x3b')][_0xb814('0x7d')]+'%'};return _0x7b9948;})});}if(_0x1868d9[_0xb814('0x3b')]['$gte']){var _0x2a5dff=_0x1868d9['query'][_0xb814('0xb7')][_0xb814('0x32')](',');var _0x35e8f7={};_0x35e8f7[_0x2a5dff[0x0]]={'$gte':moment(_0x2a5dff[0x1])[_0xb814('0xb8')](_0xb814('0xb9'))};_0x473b30[_0xb814('0x72')]=_[_0xb814('0xac')](_0x473b30[_0xb814('0x72')],_0x35e8f7);}_0x473b30=_['merge']({},_0x473b30,_0x1868d9['options']);return db['WhatsappMessage'][_0xb814('0x93')]({'where':_0x473b30[_0xb814('0x72')]})[_0xb814('0x2b')](function(_0x3b7bee){_0x2d40e6[_0xb814('0x93')]=_0x3b7bee;if(_0x1868d9[_0xb814('0x3b')][_0xb814('0xab')]){_0x473b30[_0xb814('0xba')]=[{'all':!![]}];}return db[_0xb814('0xb1')][_0xb814('0xbb')](_0x473b30);})['then'](function(_0x5c989a){_0x2d40e6[_0xb814('0xa7')]=_0x5c989a;return _0x2d40e6;});}})[_0xb814('0x2b')](respondWithFilteredResult(_0x570191,_0x473b30))[_0xb814('0x35')](handleError(_0x570191,null));};exports[_0xb814('0xbc')]=function(_0x3f0c9c,_0x2642ab,_0x48358c){return db[_0xb814('0xaa')]['find']({'where':{'id':_0x3f0c9c[_0xb814('0xa9')]['id']}})[_0xb814('0x2b')](handleEntityNotFound(_0x2642ab,null))[_0xb814('0x2b')](function(_0x94aa05){if(_0x94aa05){return _0x94aa05[_0xb814('0xbd')](_0x3f0c9c[_0xb814('0x6d')][_0xb814('0xb2')],_['omit'](_0x3f0c9c[_0xb814('0x6d')],[_0xb814('0xb2'),'id'])||{})[_0xb814('0xbe')](function(){return db[_0xb814('0x67')]['findAll']({'attributes':['id',_0xb814('0x2e'),_0xb814('0x46')],'where':{'id':_0x3f0c9c[_0xb814('0x6d')][_0xb814('0xb2')]}});})[_0xb814('0x2b')](function(_0x4a2aa5){socket[_0xb814('0xbf')](_0xb814('0xc0'),{'id':Number(_0x3f0c9c[_0xb814('0xa9')]['id']),'tags':_0x4a2aa5||[]});return{'id':Number(_0x3f0c9c['params']['id']),'tags':_0x4a2aa5||[]};});}})[_0xb814('0x2b')](respondWithResult(_0x2642ab,null))['catch'](handleError(_0x2642ab,null));};exports[_0xb814('0xc1')]=function(_0x5b4315,_0x22f6f1,_0x3467bd){return db[_0xb814('0xaa')][_0xb814('0x6b')]({'where':{'id':_0x5b4315['params']['id']}})[_0xb814('0x2b')](handleEntityNotFound(_0x22f6f1,null))[_0xb814('0x2b')](function(_0x3fda0d){if(_0x3fda0d){return _0x3fda0d[_0xb814('0xc1')](_0x5b4315[_0xb814('0x3b')][_0xb814('0xb2')]);}})[_0xb814('0x2b')](respondWithStatusCode(_0x22f6f1,null))[_0xb814('0x35')](handleError(_0x22f6f1,null));};exports[_0xb814('0xc2')]=function(_0x152260,_0x3bc03a){var _0x368696=moment()[_0xb814('0xc3')]()[_0xb814('0x92')]();var _0x8e882a=path['join'](config[_0xb814('0xc4')],_0xb814('0xc5'),_0xb814('0xc6'),_0xb814('0xc7'));var _0x4017b6=path[_0xb814('0xc8')](config['root'],_0xb814('0xc5'),_0xb814('0xc6'),_0xb814('0xc9'));var _0x31b4f5=path['join'](_0x8e882a,_0x368696);var _0x5b5a26=util[_0xb814('0xb8')](_0xb814('0xca'),_0x152260[_0xb814('0xa9')]['id'],_0x368696);var _0x667ca1=path[_0xb814('0xc8')](_0x8e882a,_0x5b5a26);var _0x2c510a=[];_0x2c510a['push']({'model':db[_0xb814('0xcb')],'as':_0xb814('0xcb'),'attributes':['id',_0xb814('0xcc')],'raw':!![]});_0x2c510a[_0xb814('0x34')]({'model':db['CmContact'],'as':_0xb814('0xcd'),'attributes':['id',_0xb814('0xce'),_0xb814('0xcf')],'raw':!![]});if(_0x152260[_0xb814('0x3b')][_0xb814('0xc9')]){_0x2c510a['push']({'model':db[_0xb814('0xd0')],'as':_0xb814('0xd0'),'raw':!![]});}var _0x371dd7=[{'model':db[_0xb814('0xb1')],'as':_0xb814('0xd1'),'attributes':['id',_0xb814('0x6d'),_0xb814('0x75'),_0xb814('0xd2'),_0xb814('0xd3'),_0xb814('0xd4')],'include':_0x2c510a}];_0x371dd7[_0xb814('0x34')]({'model':db[_0xb814('0xd5')],'as':_0xb814('0xd6'),'attributes':['id','name']});_0x371dd7['push']({'model':db[_0xb814('0xcb')],'as':_0xb814('0xd7'),'attributes':['id',_0xb814('0xcc')]});return db['WhatsappInteraction'][_0xb814('0x6b')]({'where':{'id':_0x152260[_0xb814('0xa9')]['id']},'include':_0x371dd7})[_0xb814('0x2b')](handleEntityNotFound(_0x3bc03a,null))['then'](function(_0x10537d){if(_0x10537d){var _0xa651a=_0x10537d[_0xb814('0xd8')]({'plain':!![]});fs[_0xb814('0xd9')](_0x31b4f5);var _0x6ec0f5={'format':'A4','border':_0xb814('0xda'),'header':{'height':'40px','contents':{'first':_0xb814('0xdb')}},'footer':{'height':'30px','contents':{'default':util[_0xb814('0xb8')](' \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\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
\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%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
\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
\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{{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
\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
\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%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
\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
',util[_0xb814('0xb8')](_0xb814('0xdc'),_0xb814('0xdd'),_0xa651a['id']),moment()['format'](_0xb814('0xde'))[_0xb814('0x92')]())}}};var _0x164304={'channel':'Whatsapp','account':_0xa651a[_0xb814('0xd6')]['name'],'agent':_0xa651a[_0xb814('0xd7')]?_0xa651a[_0xb814('0xd7')][_0xb814('0xcc')]:'N.A.','createdAt':moment(_0xa651a[_0xb814('0x75')])[_0xb814('0xb8')](_0xb814('0xb9'))[_0xb814('0x92')](),'closedAt':_0xa651a['closed']?moment(_0xa651a[_0xb814('0xdf')])[_0xb814('0xb8')](_0xb814('0xb9'))[_0xb814('0x92')]():'','disposition':_0xa651a[_0xb814('0xe0')],'messages':_(_0xa651a[_0xb814('0xd1')])[_0xb814('0x7d')]({'secret':![]})[_0xb814('0x30')](function(_0x9a33d0){if(_0x9a33d0['Attachment']){var _0x2fe47b=path[_0xb814('0xc8')](_0x4017b6,_0x9a33d0[_0xb814('0xd0')]['basename']);if(fs[_0xb814('0xe1')](_0x2fe47b)){fs['createReadStream'](_0x2fe47b)['pipe'](fs['createWriteStream'](path[_0xb814('0xc8')](_0x31b4f5,_0x9a33d0['Attachment'][_0xb814('0xe2')])));}}return{'date':moment(_0x9a33d0[_0xb814('0x75')])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0xb814('0x92')](),'sender':_0x9a33d0['direction']===_0xb814('0xe3')?_0x9a33d0['User']?_0x9a33d0[_0xb814('0xcb')][_0xb814('0xcc')]:_0xb814('0xe4'):_0x9a33d0['Contact']['firstName']+(_0x9a33d0['Contact'][_0xb814('0xcf')]?'\x20'+_0x9a33d0['Contact']['lastName']:''),'body':_0x9a33d0[_0xb814('0xd0')]?_0x9a33d0['Attachment']['basename']:_0x9a33d0['body'],'direction':_0x9a33d0[_0xb814('0xd2')]===_0xb814('0xe3')?'A':'C','secret':_0x9a33d0[_0xb814('0xd3')],'read':_0x9a33d0['read'],'attachment':_0x9a33d0[_0xb814('0xd0')]};})[_0xb814('0x5c')]()};return ejs[_0xb814('0xe5')](path[_0xb814('0xc8')](config[_0xb814('0xc4')],_0xb814('0xc5'),'views',_0xb814('0xe6')),{'interaction':_0x164304})[_0xb814('0x2b')](function(_0x28b818){return new BPromise(function(_0x171845,_0x4f2db2){pdf[_0xb814('0xae')](_0x28b818,_0x6ec0f5)[_0xb814('0xe7')](path[_0xb814('0xc8')](_0x31b4f5,_0xb814('0xe8')+_0xa651a['id']+'-'+_0x368696+_0xb814('0xe9')),function(_0x2cb01d,_0x1f4540){if(_0x2cb01d)return _0x4f2db2(_0x2cb01d);_0x171845(_0x1f4540);});});})[_0xb814('0x2b')](function(){return new BPromise(function(_0x81ebc0,_0x2e7959){zipdir(_0x31b4f5,{'saveTo':_0x667ca1},function(_0x47f054,_0x1aa70b){if(_0x47f054)return _0x2e7959(_0x47f054);return _0x81ebc0(_0x1aa70b);});})[_0xb814('0x2b')](function(){return new BPromise(function(_0x5706ad,_0x3b8438){rimraf(_0x31b4f5,function(_0x56e231){if(_0x56e231)_0x3b8438(_0x56e231);return _0x5706ad();});});})[_0xb814('0x2b')](function(){return _0x3bc03a[_0xb814('0xc2')](_0x667ca1,_0x5b5a26,function(_0x5e2273){if(_0x5e2273){console[_0xb814('0xea')]('err',_0x5e2273);}else{fs[_0xb814('0xeb')](_0x667ca1);}});});});}else{return _0x3bc03a[_0xb814('0x20')](0xc8);}})[_0xb814('0x35')](handleError(_0x3bc03a,null));};
\ No newline at end of file
+var _0xc4aa=['status','end','json','count','offset','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','map','fullname','TagIds','Tags','split','push','catch','WhatsappInteraction','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','hasOwnProperty','nolimit','limit','sort','where','pick','select','field','color','from','u.id','u.fullname','ui.WhatsappInteractionId','user_has_whatsapp_interactions','left_join','users','u.id\x20=\x20ui.UserId','whatsapp_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','a.id\x20=\x20i.WhatsappAccountId','whatsapp_messages','me.WhatsappInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','parseSearch','search','sqlOperator','conditions','find','unreadMessages','value','having','`\x20=\x200','Contact','operator','length','getFullTextValue','ContactId','buildExpression','type','start','Tag','forEach','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','text','body','some','compact','isEmpty','WhatsappAccountId','i.WhatsappAccountId\x20IN\x20?','concat','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','isArray','tag','filter','replace','\x27\x27\x27\x27','i.phone\x20LIKE\x20?','group','QueryTypes','SELECT','clone','order','journey','i.WhatsappAccountId\x20IS\x20NOT\x20NULL','getWhatsappAccounts','i.WhatsappAccountId\x20IS\x20NULL','sequelize','toString','keyBy','fields','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','c.firstName','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.email','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.WhatsappInteractionId\x20IN\x20?','groupBy','WhatsappInteractionId','all','rows','show','params','include','merge','create','describe','addMessage','WhatsappMessage','ids','getMessages','findOne','YYYY-MM-DD\x20HH:mm:ss','options','findAll','setTags','omit','emit','whatsappInteractionTags:save','removeTags','unix','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','CmContact','firstName','lastName','Attachment','createdAt','secret','WhatsappAccount','Account','get','mkdirSync','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
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','30px','format','%s\x20#%d','Whatsapp','YYYY-MM-DD','Owner','N.A.','closed','closedAt','disposition','basename','existsSync','createReadStream','pipe','createWriteStream','direction','out','System','downloadInteraction.html','transcript-','download','log','err','unlinkSync','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappInteraction.socket','register','sendStatus'];(function(_0x199baa,_0x1556c7){var _0x1dbf7e=function(_0x3424ae){while(--_0x3424ae){_0x199baa['push'](_0x199baa['shift']());}};_0x1dbf7e(++_0x1556c7);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x11005e,_0x20c3d2){_0x11005e=_0x11005e-0x0;var _0x29338f=_0xc4aa[_0x11005e];return _0x29338f;};'use strict';var pdf=require(_0xac4a('0x0'));var emlformat=require(_0xac4a('0x1'));var rimraf=require(_0xac4a('0x2'));var zipdir=require(_0xac4a('0x3'));var jsonpatch=require(_0xac4a('0x4'));var rp=require(_0xac4a('0x5'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xac4a('0x6'));var path=require(_0xac4a('0x7'));var sox=require(_0xac4a('0x8'));var csv=require(_0xac4a('0x9'));var ejs=require(_0xac4a('0xa'));var fs=require('fs');var _=require(_0xac4a('0xb'));var squel=require(_0xac4a('0xc'));var crypto=require(_0xac4a('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xac4a('0x9'));var querystring=require(_0xac4a('0xe'));var Papa=require(_0xac4a('0xf'));var Redis=require('ioredis');var authService=require(_0xac4a('0x10'));var qs=require(_0xac4a('0x11'));var as=require(_0xac4a('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xac4a('0x13'))('api');var utils=require(_0xac4a('0x14'));var config=require('../../config/environment');var db=require(_0xac4a('0x15'))['db'];config[_0xac4a('0x16')]=_[_0xac4a('0x17')](config['redis'],{'host':_0xac4a('0x18'),'port':0x18eb});var socket=require(_0xac4a('0x19'))(new Redis(config[_0xac4a('0x16')]));require(_0xac4a('0x1a'))[_0xac4a('0x1b')](socket);function respondWithStatusCode(_0x3b71c0,_0x34bc01){_0x34bc01=_0x34bc01||0xcc;return function(_0x33c287){if(_0x33c287){return _0x3b71c0[_0xac4a('0x1c')](_0x34bc01);}return _0x3b71c0[_0xac4a('0x1d')](_0x34bc01)[_0xac4a('0x1e')]();};}function respondWithResult(_0x26dbb8,_0x4a2119){_0x4a2119=_0x4a2119||0xc8;return function(_0x402fff){if(_0x402fff){return _0x26dbb8[_0xac4a('0x1d')](_0x4a2119)[_0xac4a('0x1f')](_0x402fff);}};}function respondWithFilteredResult(_0x144553,_0x3e88e3){return function(_0x387a54){if(_0x387a54){var _0x28e304=_0x387a54[_0xac4a('0x20')],_0x44ec59=_0x3e88e3[_0xac4a('0x21')],_0x546c5d=_0x3e88e3[_0xac4a('0x21')]+_0x3e88e3['limit'],_0x5ac21e;if(_0x546c5d>=_0x28e304){_0x546c5d=_0x28e304;_0x5ac21e=0xc8;}else{_0x5ac21e=0xce;}_0x144553[_0xac4a('0x1d')](_0x5ac21e);return _0x144553[_0xac4a('0x22')](_0xac4a('0x23'),_0x44ec59+'-'+_0x546c5d+'/'+_0x28e304)[_0xac4a('0x1f')](_0x387a54);}return null;};}function patchUpdates(_0x123694){return function(_0x3e829c){try{jsonpatch[_0xac4a('0x24')](_0x3e829c,_0x123694,!![]);}catch(_0x3ca790){return BPromise['reject'](_0x3ca790);}return _0x3e829c[_0xac4a('0x25')]();};}function saveUpdates(_0x3204ad,_0x599787){return function(_0x3d7ce0){if(_0x3d7ce0){return _0x3d7ce0[_0xac4a('0x26')](_0x3204ad)[_0xac4a('0x27')](function(_0x947d8e){return _0x947d8e;});}return null;};}function removeEntity(_0x4d2d6c,_0x1b7998){return function(_0x2503d8){if(_0x2503d8){return _0x2503d8[_0xac4a('0x28')]()[_0xac4a('0x27')](function(){_0x4d2d6c[_0xac4a('0x1d')](0xcc)[_0xac4a('0x1e')]();});}};}function handleEntityNotFound(_0x222507,_0x36054a){return function(_0x3e2c69){if(!_0x3e2c69){_0x222507[_0xac4a('0x1c')](0x194);}return _0x3e2c69;};}function handleError(_0x1d0539,_0x215a31){_0x215a31=_0x215a31||0x1f4;return function(_0x14832b){logger[_0xac4a('0x29')](_0x14832b[_0xac4a('0x2a')]);if(_0x14832b[_0xac4a('0x2b')]){delete _0x14832b['name'];}_0x1d0539[_0xac4a('0x1d')](_0x215a31)[_0xac4a('0x2c')](_0x14832b);};}function getInteractionUsers(_0x42a33c,_0x2772fe){return new BPromise(function(_0x116700,_0x4a5a9e){try{if(_0x2772fe[_0x42a33c['id']]){_0x42a33c['Users']=_[_0xac4a('0x2d')](_0x2772fe[_0x42a33c['id']],function(_0x7a948b){return{'id':_0x7a948b['id'],'fullname':_0x7a948b[_0xac4a('0x2e')]};});}}catch(_0x546b65){_0x4a5a9e(_0x546b65);}_0x116700(_0x42a33c);});}function getInteractionTags(_0x4bda1f,_0x355755){return new BPromise(function(_0x2896bc,_0x228629){try{if(_0x4bda1f[_0xac4a('0x2f')]){_0x4bda1f[_0xac4a('0x30')]=[];_0x4bda1f['TagIds'][_0xac4a('0x31')](',')['forEach'](function(_0x30364b){_0x4bda1f['Tags'][_0xac4a('0x32')](_0x355755[_0x30364b]);});}delete _0x4bda1f[_0xac4a('0x2f')];}catch(_0x31501b){_0x228629(_0x31501b);}_0x2896bc(_0x4bda1f);});}function updateWhatsappInteraction(_0x228aa7,_0x34577f,_0x61e552){return new BPromise(function(_0xbd4591,_0x1f13f3){return getInteractionUsers(_0x228aa7,_0x61e552)[_0xac4a('0x27')](function(_0xfd7c16){return getInteractionTags(_0xfd7c16,_0x34577f);})[_0xac4a('0x27')](function(_0x1634df){_0xbd4591(_0x1634df);})[_0xac4a('0x33')](function(_0x1a9d4e){_0x1f13f3(_0x1a9d4e);});});}exports['index']=function(_0x30442d,_0x1c41fb){var _0x5a4e2b={},_0x2a5419={},_0x1af1c1={'count':0x0,'rows':[]};var _0x565164=_['map'](db[_0xac4a('0x34')][_0xac4a('0x35')],function(_0x1b42b6){return{'name':_0x1b42b6[_0xac4a('0x36')],'type':_0x1b42b6['type'][_0xac4a('0x37')]};});_0x2a5419[_0xac4a('0x38')]=_['map'](_0x565164,_0xac4a('0x2b'));_0x2a5419[_0xac4a('0x39')]=_[_0xac4a('0x3a')](_0x30442d['query']);_0x2a5419[_0xac4a('0x3b')]=_[_0xac4a('0x3c')](_0x2a5419[_0xac4a('0x38')],_0x2a5419['query']);_0x5a4e2b[_0xac4a('0x3d')]=_[_0xac4a('0x3c')](_0x2a5419['model'],qs['fields'](_0x30442d[_0xac4a('0x39')]['fields']));_0x5a4e2b['attributes']=_0x5a4e2b['attributes']['length']?_0x5a4e2b[_0xac4a('0x3d')]:_0x2a5419[_0xac4a('0x38')];if(!_0x30442d[_0xac4a('0x39')][_0xac4a('0x3e')](_0xac4a('0x3f'))){_0x5a4e2b[_0xac4a('0x40')]=qs[_0xac4a('0x40')](_0x30442d[_0xac4a('0x39')][_0xac4a('0x40')]);_0x5a4e2b[_0xac4a('0x21')]=qs[_0xac4a('0x21')](_0x30442d[_0xac4a('0x39')]['offset']);}_0x5a4e2b['order']=qs['sort'](_0x30442d[_0xac4a('0x39')][_0xac4a('0x41')]);_0x5a4e2b[_0xac4a('0x42')]=qs[_0xac4a('0x3b')](_[_0xac4a('0x43')](_0x30442d[_0xac4a('0x39')],_0x2a5419[_0xac4a('0x3b')]),_0x565164);var _0x3441f2=[];var _0x3e9973=squel[_0xac4a('0x44')]()['field']('id')[_0xac4a('0x45')](_0xac4a('0x2b'))[_0xac4a('0x45')](_0xac4a('0x46'))[_0xac4a('0x47')]('tools_tags');var _0x8700b4=squel[_0xac4a('0x44')]()['field'](_0xac4a('0x48'))['field'](_0xac4a('0x49'))[_0xac4a('0x45')](_0xac4a('0x4a'))[_0xac4a('0x47')](_0xac4a('0x4b'),'ui')[_0xac4a('0x4c')](_0xac4a('0x4d'),'u',_0xac4a('0x4e'));var _0x98e0c4=squel[_0xac4a('0x44')]()[_0xac4a('0x47')](_0xac4a('0x4f'),'i')['left_join'](_0xac4a('0x50'),'c',_0xac4a('0x51'))[_0xac4a('0x4c')]('users','o',_0xac4a('0x52'))[_0xac4a('0x4c')]('whatsapp_accounts','a',_0xac4a('0x53'))['left_join'](_0xac4a('0x54'),'me',_0xac4a('0x55'))[_0xac4a('0x4c')]('whatsapp_interaction_has_tags','it','it.WhatsappInteractionId\x20=\x20i.id')[_0xac4a('0x4c')]('tools_tags','t',_0xac4a('0x56'));var _0x566258=squel[_0xac4a('0x57')]();var _0x530bbb=[];var _0x3be103=squel[_0xac4a('0x57')]();var _0x424f9b;if(_0x30442d[_0xac4a('0x39')]['search']){_0x424f9b=as[_0xac4a('0x58')](_0x30442d[_0xac4a('0x39')][_0xac4a('0x59')]);var _0x1ee454=_0x424f9b[_0xac4a('0x5a')];for(var _0x138876=0x0;_0x138876<_0x424f9b[_0xac4a('0x5b')]['length'];_0x138876++){var _0x35dee5=_0x424f9b[_0xac4a('0x5b')][_0x138876];var _0x4828e3='i';var _0x16afbe=_[_0xac4a('0x5c')](_0x565164,[_0xac4a('0x2b'),_0x35dee5[_0xac4a('0x45')]]);if(!_0x16afbe){switch(_0x35dee5['field']){case _0xac4a('0x5d'):if(_0x35dee5[_0xac4a('0x5e')]==0x1){_0x98e0c4[_0xac4a('0x5f')]('`'+_0x35dee5[_0xac4a('0x45')]+_0xac4a('0x60'));}else{_0x98e0c4['having']('`'+_0x35dee5[_0xac4a('0x45')]+'`\x20>\x200');}break;case _0xac4a('0x61'):if(_0x35dee5[_0xac4a('0x62')]==='$substring'){if(_0x35dee5['value'][_0xac4a('0x31')]('\x20')[_0xac4a('0x63')]>0x1){_0x566258[_0x1ee454]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xac4a('0x64')](_0x35dee5[_0xac4a('0x5e')]),null);}else{var _0x26b582='%'+_0x35dee5[_0xac4a('0x5e')]+'%';_0x566258[_0x1ee454]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x26b582,_0x26b582,_0x26b582);}}else{_0x16afbe=_[_0xac4a('0x5c')](_0x565164,[_0xac4a('0x2b'),_0xac4a('0x65')]);_0x35dee5[_0xac4a('0x45')]=_0xac4a('0x65');_0x19ce2c=as[_0xac4a('0x66')](_0x4828e3,_0x16afbe[_0xac4a('0x67')],_0x35dee5);_0x566258[_0x1ee454](_0x19ce2c['text'],_0x19ce2c[_0xac4a('0x5e')][_0xac4a('0x68')],_0x19ce2c[_0xac4a('0x5e')][_0xac4a('0x1e')]);}break;case _0xac4a('0x69'):var _0x2ac1e9=_0x35dee5[_0xac4a('0x5e')][_0xac4a('0x31')](',')[_0xac4a('0x2d')](function(_0x786d9){return Number(_0x786d9);});_0x2ac1e9[_0xac4a('0x6a')](function(_0x38dd4f){_0x3be103['or'](_0xac4a('0x6b'),'%,'+_0x38dd4f+',%');});_0x530bbb=_[_0xac4a('0x6c')](_0x530bbb,_0x2ac1e9);break;case _0xac4a('0x6d'):if(_0x35dee5[_0xac4a('0x62')]==='$substring'){_0x566258[_0x1ee454](_0xac4a('0x6e'),'%'+_0x35dee5['value']+'%',null);}else{_0x16afbe=_[_0xac4a('0x5c')](_0x565164,['name',_0xac4a('0x6f')]);_0x35dee5['field']=_0xac4a('0x6f');_0x19ce2c=as['buildExpression'](_0x4828e3,_0x16afbe['type'],_0x35dee5);_0x566258[_0x1ee454](_0x19ce2c[_0xac4a('0x70')],_0x19ce2c[_0xac4a('0x5e')][_0xac4a('0x68')],_0x19ce2c[_0xac4a('0x5e')][_0xac4a('0x1e')]);}break;case _0xac4a('0x71'):_0x19ce2c=as['buildExpression']('me',null,_0x35dee5);_0x566258[_0x1ee454](_0x19ce2c[_0xac4a('0x70')],_0x19ce2c['value'][_0xac4a('0x68')],_0x19ce2c['value'][_0xac4a('0x1e')]);break;}}else{var _0x19ce2c=as[_0xac4a('0x66')](_0x4828e3,_0x16afbe[_0xac4a('0x67')],_0x35dee5);_0x566258[_0x1ee454](_0x19ce2c[_0xac4a('0x70')],_0x19ce2c[_0xac4a('0x5e')][_0xac4a('0x68')],_0x19ce2c[_0xac4a('0x5e')][_0xac4a('0x1e')]);}}}else{var _0x430dd0=_(_0x30442d[_0xac4a('0x39')])[_0xac4a('0x3a')]()[_0xac4a('0x2d')](function(_0x2cc410){return _[_0xac4a('0x72')](_0x565164,[_0xac4a('0x2b'),_0x2cc410])?_0x2cc410:undefined;})[_0xac4a('0x73')]()['value']();if(!_[_0xac4a('0x74')](_0x430dd0)){_0x430dd0[_0xac4a('0x6a')](function(_0x4fb812){if(_0x4fb812===_0xac4a('0x75')){_0x98e0c4[_0xac4a('0x42')](_0xac4a('0x76'),[][_0xac4a('0x77')](_0x30442d[_0xac4a('0x39')][_0x4fb812]));}else if(_0x4fb812==='createdAt'){var _0x47c6d8=JSON[_0xac4a('0x78')](_0x30442d[_0xac4a('0x39')][_0x4fb812])[_0xac4a('0x79')];var _0x148288=JSON[_0xac4a('0x78')](_0x30442d[_0xac4a('0x39')][_0x4fb812])[_0xac4a('0x7a')];_0x98e0c4[_0xac4a('0x42')](_0xac4a('0x7b'),_0x47c6d8,_0x148288);}else{if(_0x30442d[_0xac4a('0x39')][_0x4fb812]===_0xac4a('0x7c')){_0x98e0c4['where']('i.'+_0x4fb812+'\x20IS\x20NULL');}else{_0x98e0c4[_0xac4a('0x42')]('i.'+_0x4fb812+_0xac4a('0x7d'),_0x30442d[_0xac4a('0x39')][_0x4fb812]);}}});}if(_0x30442d[_0xac4a('0x39')][_0xac4a('0x7e')]){if(_0x30442d[_0xac4a('0x39')][_0xac4a('0x7e')]==0x1){_0x98e0c4[_0xac4a('0x5f')](_0xac4a('0x7f'));}else{_0x98e0c4[_0xac4a('0x5f')](_0xac4a('0x80'));}}if(_0x30442d[_0xac4a('0x39')]['tag']){_0x530bbb=_[_0xac4a('0x81')](_0x30442d[_0xac4a('0x39')][_0xac4a('0x82')])?_0x30442d[_0xac4a('0x39')]['tag']:new Array(_0x30442d[_0xac4a('0x39')]['tag']);_0x530bbb[_0xac4a('0x6a')](function(_0x3af39a){_0x3be103['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x3af39a+',%');});}if(_0x30442d['query'][_0xac4a('0x83')]){var _0x3b8974=_0x30442d[_0xac4a('0x39')]['filter'][_0xac4a('0x84')]('\x5c','\x5c\x5c')['replace']('\x27\x27',_0xac4a('0x85'));if(qs['isNumeric'](_0x3b8974)){_0x566258['or']('i.id\x20LIKE\x20?',_0x3b8974+'%')['or'](_0xac4a('0x86'),_0x3b8974+'%');}else{_0x566258['or']('MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xac4a('0x64')](_0x3b8974))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x3b8974+'%');}}}_0x98e0c4[_0xac4a('0x42')](_0x566258);_0x98e0c4[_0xac4a('0x87')]('i.id');var _0x3980ae={'type':db['Sequelize'][_0xac4a('0x88')][_0xac4a('0x89')],'raw':!![]};var _0x522949=_0x98e0c4[_0xac4a('0x8a')]();_0x522949['field']('i.id');_0x522949[_0xac4a('0x45')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0xac4a('0x5d'));if(_0x5a4e2b['order']){_0x5a4e2b['order'][_0xac4a('0x6a')](function(_0x4065c0){_0x98e0c4[_0xac4a('0x8b')]('i.'+_0x4065c0[0x0],_0x4065c0[0x1]==='DESC'?![]:!![]);});}if(!_['isEmpty'](_0x530bbb)){_0x98e0c4[_0xac4a('0x5f')](_0x3be103);_0x522949[_0xac4a('0x42')]('t.id\x20IN\x20?',_0x530bbb);}BPromise['resolve']()[_0xac4a('0x27')](function(){if(!_0x424f9b){if(_0x30442d[_0xac4a('0x39')][_0xac4a('0x75')]||_0x30442d[_0xac4a('0x39')][_0xac4a('0x8c')])return;_0x522949[_0xac4a('0x42')](_0xac4a('0x8d'));_0x98e0c4[_0xac4a('0x42')](_0xac4a('0x8d'));return;}return _0x30442d['user'][_0xac4a('0x8e')]({'attributes':['id'],'raw':!![]})[_0xac4a('0x27')](function(_0x3ba61e){if(_['isEmpty'](_0x3ba61e)){_0x522949[_0xac4a('0x42')](_0xac4a('0x8f'));_0x98e0c4[_0xac4a('0x42')](_0xac4a('0x8f'));}else{_0x522949[_0xac4a('0x42')]('i.WhatsappAccountId\x20IN\x20?',_[_0xac4a('0x2d')](_0x3ba61e,'id'));_0x98e0c4[_0xac4a('0x42')](_0xac4a('0x76'),_[_0xac4a('0x2d')](_0x3ba61e,'id'));}});})[_0xac4a('0x27')](function(){db[_0xac4a('0x90')][_0xac4a('0x39')](_0x522949['toString'](),_0x3980ae)[_0xac4a('0x27')](function(_0x2be178){_0x1af1c1[_0xac4a('0x20')]=_0x2be178[_0xac4a('0x63')];if(_0x1af1c1[_0xac4a('0x20')]===0x0)return[];return db[_0xac4a('0x90')]['query'](_0x3e9973[_0xac4a('0x91')](),_0x3980ae)[_0xac4a('0x27')](function(_0x1b9a33){_0x3441f2=_[_0xac4a('0x92')](_0x1b9a33,'id');_0x3980ae=_['merge'](_0x3980ae,{'model':db[_0xac4a('0x34')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x30442d['query'][_0xac4a('0x93')]){_0x5a4e2b[_0xac4a('0x3d')]['forEach'](function(_0x5b95ab){_0x98e0c4[_0xac4a('0x45')]('i.'+_0x5b95ab);});}else{_0x98e0c4[_0xac4a('0x45')](_0xac4a('0x94'),'unreadMessages');_0x98e0c4[_0xac4a('0x45')]('a.key',_0xac4a('0x95'));_0x98e0c4[_0xac4a('0x45')](_0xac4a('0x96'),_0xac4a('0x97'));_0x98e0c4[_0xac4a('0x45')]('i.*');_0x98e0c4['field'](_0xac4a('0x98'),_0xac4a('0x99'));_0x98e0c4[_0xac4a('0x45')](_0xac4a('0x9a'),_0xac4a('0x9b'));_0x98e0c4[_0xac4a('0x45')](_0xac4a('0x9c'),_0xac4a('0x9d'));_0x98e0c4['field']('c.phone',_0xac4a('0x9e'));_0x98e0c4[_0xac4a('0x45')](_0xac4a('0x9f'),_0xac4a('0xa0'));_0x98e0c4[_0xac4a('0x45')](_0xac4a('0xa1'),_0xac4a('0xa2'));_0x98e0c4[_0xac4a('0x45')]('o.fullname','Owner.fullname');_0x98e0c4[_0xac4a('0x45')](_0xac4a('0xa3'),_0xac4a('0xa4'));_0x98e0c4[_0xac4a('0x45')](_0xac4a('0xa5'),_0xac4a('0x2f'));}if(_0x5a4e2b[_0xac4a('0x40')])_0x98e0c4['limit'](_0x5a4e2b[_0xac4a('0x40')]);if(_0x5a4e2b[_0xac4a('0x21')])_0x98e0c4[_0xac4a('0x21')](_0x5a4e2b['offset']);return db[_0xac4a('0x90')][_0xac4a('0x39')](_0x98e0c4[_0xac4a('0x91')](),_0x3980ae);})[_0xac4a('0x27')](function(_0x1a7448){_0x8700b4[_0xac4a('0x42')](_0xac4a('0xa6'),_[_0xac4a('0x2d')](_0x1a7448,'id'));return db[_0xac4a('0x90')]['query'](_0x8700b4[_0xac4a('0x91')](),_0x3980ae)['then'](function(_0x203321){var _0x1199f6=_[_0xac4a('0xa7')](_0x203321,_0xac4a('0xa8'));var _0x840fec=[];_0x1a7448[_0xac4a('0x6a')](function(_0x19766a){_0x840fec['push'](updateWhatsappInteraction(_0x19766a,_0x3441f2,_0x1199f6));});return BPromise[_0xac4a('0xa9')](_0x840fec);});});})[_0xac4a('0x27')](function(_0x279f9b){_0x1af1c1[_0xac4a('0xaa')]=_0x279f9b;return _0x1af1c1;})[_0xac4a('0x27')](respondWithFilteredResult(_0x1c41fb,_0x5a4e2b));})['catch'](handleError(_0x1c41fb,null));};exports[_0xac4a('0xab')]=function(_0x360d4f,_0x4f2b19){var _0x55af32={'raw':![],'where':{'id':_0x360d4f[_0xac4a('0xac')]['id']}},_0x386d6d={};_0x386d6d['model']=_[_0xac4a('0x3a')](db[_0xac4a('0x34')][_0xac4a('0x35')]);_0x386d6d[_0xac4a('0x39')]=_[_0xac4a('0x3a')](_0x360d4f[_0xac4a('0x39')]);_0x386d6d['filters']=_[_0xac4a('0x3c')](_0x386d6d[_0xac4a('0x38')],_0x386d6d[_0xac4a('0x39')]);_0x55af32['attributes']=_[_0xac4a('0x3c')](_0x386d6d[_0xac4a('0x38')],qs[_0xac4a('0x93')](_0x360d4f[_0xac4a('0x39')][_0xac4a('0x93')]));_0x55af32[_0xac4a('0x3d')]=_0x55af32['attributes'][_0xac4a('0x63')]?_0x55af32[_0xac4a('0x3d')]:_0x386d6d['model'];if(_0x360d4f[_0xac4a('0x39')]['includeAll']){_0x55af32[_0xac4a('0xad')]=[{'all':!![]}];}_0x55af32=_[_0xac4a('0xae')]({},_0x55af32,_0x360d4f['options']);return db[_0xac4a('0x34')]['find'](_0x55af32)[_0xac4a('0x27')](handleEntityNotFound(_0x4f2b19,null))['then'](respondWithResult(_0x4f2b19,null))[_0xac4a('0x33')](handleError(_0x4f2b19,null));};exports[_0xac4a('0xaf')]=function(_0x24f464,_0xfe8977){return db[_0xac4a('0x34')][_0xac4a('0xaf')](_0x24f464[_0xac4a('0x71')],{})[_0xac4a('0x27')](respondWithResult(_0xfe8977,0xc9))[_0xac4a('0x33')](handleError(_0xfe8977,null));};exports[_0xac4a('0x26')]=function(_0x3a0163,_0x455eb7){if(_0x3a0163[_0xac4a('0x71')]['id']){delete _0x3a0163[_0xac4a('0x71')]['id'];}return db['WhatsappInteraction'][_0xac4a('0x5c')]({'where':{'id':_0x3a0163[_0xac4a('0xac')]['id']}})['then'](handleEntityNotFound(_0x455eb7,null))[_0xac4a('0x27')](saveUpdates(_0x3a0163[_0xac4a('0x71')],null))[_0xac4a('0x27')](respondWithResult(_0x455eb7,null))[_0xac4a('0x33')](handleError(_0x455eb7,null));};exports[_0xac4a('0x28')]=function(_0x5d5bb3,_0x101137){return db['WhatsappInteraction'][_0xac4a('0x5c')]({'where':{'id':_0x5d5bb3[_0xac4a('0xac')]['id']}})[_0xac4a('0x27')](handleEntityNotFound(_0x101137,null))[_0xac4a('0x27')](removeEntity(_0x101137,null))['catch'](handleError(_0x101137,null));};exports[_0xac4a('0xb0')]=function(_0x55866d,_0x277fd1){return db[_0xac4a('0x34')][_0xac4a('0xb0')]()['then'](respondWithResult(_0x277fd1,null))[_0xac4a('0x33')](handleError(_0x277fd1,null));};exports[_0xac4a('0xb1')]=function(_0x127ede,_0x52f3f2,_0x2da95f){return db[_0xac4a('0xb2')][_0xac4a('0x5c')]({'where':{'id':_0x127ede[_0xac4a('0xac')]['id']}})[_0xac4a('0x27')](handleEntityNotFound(_0x52f3f2,null))[_0xac4a('0x27')](function(_0x3b4183){if(_0x3b4183){return _0x3b4183[_0xac4a('0xb1')](_0x127ede['body'][_0xac4a('0xb3')],_['omit'](_0x127ede['body'],['ids','id'])||{});}})['then'](respondWithResult(_0x52f3f2,null))['catch'](handleError(_0x52f3f2,null));};exports[_0xac4a('0xb4')]=function(_0x58fcb0,_0xc014a6,_0x377444){var _0x2132b2={'raw':![],'where':{}};var _0x525d50={};var _0x9ea4d1={'count':0x0,'rows':[]};return db[_0xac4a('0x34')][_0xac4a('0xb5')]({'where':{'id':_0x58fcb0[_0xac4a('0xac')]['id']}})[_0xac4a('0x27')](handleEntityNotFound(_0xc014a6,null))[_0xac4a('0x27')](function(_0x7a1b25){if(_0x7a1b25){_0x525d50[_0xac4a('0x38')]=_['keys'](db[_0xac4a('0xb2')][_0xac4a('0x35')]);_0x525d50[_0xac4a('0x39')]=_[_0xac4a('0x3a')](_0x58fcb0[_0xac4a('0x39')]);_0x525d50[_0xac4a('0x3b')]=_[_0xac4a('0x3c')](_0x525d50['model'],_0x525d50['query']);_0x2132b2[_0xac4a('0x3d')]=_[_0xac4a('0x3c')](_0x525d50['model'],qs[_0xac4a('0x93')](_0x58fcb0[_0xac4a('0x39')]['fields']));_0x2132b2['attributes']=_0x2132b2[_0xac4a('0x3d')][_0xac4a('0x63')]?_0x2132b2[_0xac4a('0x3d')]:_0x525d50[_0xac4a('0x38')];if(!_0x58fcb0[_0xac4a('0x39')]['hasOwnProperty'](_0xac4a('0x3f'))){_0x2132b2['limit']=qs['limit'](_0x58fcb0['query'][_0xac4a('0x40')]);_0x2132b2[_0xac4a('0x21')]=qs[_0xac4a('0x21')](_0x58fcb0[_0xac4a('0x39')][_0xac4a('0x21')]);}_0x2132b2[_0xac4a('0x8b')]=qs[_0xac4a('0x41')](_0x58fcb0[_0xac4a('0x39')]['sort']);_0x2132b2['where']=qs['filters'](_[_0xac4a('0x43')](_0x58fcb0[_0xac4a('0x39')],_0x525d50[_0xac4a('0x3b')]));_0x2132b2[_0xac4a('0x42')][_0xac4a('0xa8')]=_0x7a1b25['id'];if(_0x58fcb0[_0xac4a('0x39')][_0xac4a('0x83')]){_0x2132b2[_0xac4a('0x42')]=_[_0xac4a('0xae')](_0x2132b2[_0xac4a('0x42')],{'$or':_[_0xac4a('0x2d')](_0x2132b2[_0xac4a('0x3d')],function(_0xe0fd57){var _0x32b013={};_0x32b013[_0xe0fd57]={'$like':'%'+_0x58fcb0[_0xac4a('0x39')][_0xac4a('0x83')]+'%'};return _0x32b013;})});}if(_0x58fcb0[_0xac4a('0x39')][_0xac4a('0x79')]){var _0x41cdb5=_0x58fcb0[_0xac4a('0x39')][_0xac4a('0x79')][_0xac4a('0x31')](',');var _0x3e2575={};_0x3e2575[_0x41cdb5[0x0]]={'$gte':moment(_0x41cdb5[0x1])['format'](_0xac4a('0xb6'))};_0x2132b2[_0xac4a('0x42')]=_[_0xac4a('0xae')](_0x2132b2[_0xac4a('0x42')],_0x3e2575);}_0x2132b2=_[_0xac4a('0xae')]({},_0x2132b2,_0x58fcb0[_0xac4a('0xb7')]);return db[_0xac4a('0xb2')][_0xac4a('0x20')]({'where':_0x2132b2['where']})['then'](function(_0x113f80){_0x9ea4d1[_0xac4a('0x20')]=_0x113f80;if(_0x58fcb0[_0xac4a('0x39')]['includeAll']){_0x2132b2['include']=[{'all':!![]}];}return db['WhatsappMessage'][_0xac4a('0xb8')](_0x2132b2);})['then'](function(_0x59e82c){_0x9ea4d1[_0xac4a('0xaa')]=_0x59e82c;return _0x9ea4d1;});}})['then'](respondWithFilteredResult(_0xc014a6,_0x2132b2))[_0xac4a('0x33')](handleError(_0xc014a6,null));};exports['addTags']=function(_0x3f95a4,_0x2b4f28,_0x413f5f){return db[_0xac4a('0x34')][_0xac4a('0x5c')]({'where':{'id':_0x3f95a4[_0xac4a('0xac')]['id']}})['then'](handleEntityNotFound(_0x2b4f28,null))[_0xac4a('0x27')](function(_0x34b6d7){if(_0x34b6d7){return _0x34b6d7[_0xac4a('0xb9')](_0x3f95a4['body'][_0xac4a('0xb3')],_[_0xac4a('0xba')](_0x3f95a4[_0xac4a('0x71')],[_0xac4a('0xb3'),'id'])||{})['spread'](function(){return db[_0xac4a('0x69')][_0xac4a('0xb8')]({'attributes':['id',_0xac4a('0x2b'),_0xac4a('0x46')],'where':{'id':_0x3f95a4[_0xac4a('0x71')][_0xac4a('0xb3')]}});})['then'](function(_0x57d3cd){socket[_0xac4a('0xbb')](_0xac4a('0xbc'),{'id':Number(_0x3f95a4[_0xac4a('0xac')]['id']),'tags':_0x57d3cd||[]});return{'id':Number(_0x3f95a4[_0xac4a('0xac')]['id']),'tags':_0x57d3cd||[]};});}})[_0xac4a('0x27')](respondWithResult(_0x2b4f28,null))[_0xac4a('0x33')](handleError(_0x2b4f28,null));};exports['removeTags']=function(_0x21a6f6,_0x580c9b,_0xe4165d){return db['WhatsappInteraction'][_0xac4a('0x5c')]({'where':{'id':_0x21a6f6[_0xac4a('0xac')]['id']}})[_0xac4a('0x27')](handleEntityNotFound(_0x580c9b,null))[_0xac4a('0x27')](function(_0x5650ce){if(_0x5650ce){return _0x5650ce[_0xac4a('0xbd')](_0x21a6f6[_0xac4a('0x39')][_0xac4a('0xb3')]);}})[_0xac4a('0x27')](respondWithStatusCode(_0x580c9b,null))[_0xac4a('0x33')](handleError(_0x580c9b,null));};exports['download']=function(_0x3dd60a,_0xbe1958){var _0x462964=moment()[_0xac4a('0xbe')]()[_0xac4a('0x91')]();var _0x5e5eb1=path[_0xac4a('0xbf')](config[_0xac4a('0xc0')],_0xac4a('0xc1'),_0xac4a('0xc2'),_0xac4a('0xc3'));var _0x55ccc3=path['join'](config['root'],'server',_0xac4a('0xc2'),_0xac4a('0xc4'));var _0x17f815=path[_0xac4a('0xbf')](_0x5e5eb1,_0x462964);var _0xa8b5bb=util['format'](_0xac4a('0xc5'),_0x3dd60a[_0xac4a('0xac')]['id'],_0x462964);var _0x5aad90=path[_0xac4a('0xbf')](_0x5e5eb1,_0xa8b5bb);var _0x14b425=[];_0x14b425[_0xac4a('0x32')]({'model':db['User'],'as':_0xac4a('0x6d'),'attributes':['id',_0xac4a('0x2e')],'raw':!![]});_0x14b425[_0xac4a('0x32')]({'model':db[_0xac4a('0xc6')],'as':_0xac4a('0x61'),'attributes':['id',_0xac4a('0xc7'),_0xac4a('0xc8')],'raw':!![]});if(_0x3dd60a[_0xac4a('0x39')][_0xac4a('0xc4')]){_0x14b425['push']({'model':db[_0xac4a('0xc9')],'as':_0xac4a('0xc9'),'raw':!![]});}var _0x579181=[{'model':db[_0xac4a('0xb2')],'as':'Messages','attributes':['id',_0xac4a('0x71'),_0xac4a('0xca'),'direction',_0xac4a('0xcb'),_0xac4a('0x7e')],'include':_0x14b425}];_0x579181[_0xac4a('0x32')]({'model':db[_0xac4a('0xcc')],'as':_0xac4a('0xcd'),'attributes':['id',_0xac4a('0x2b')]});_0x579181[_0xac4a('0x32')]({'model':db[_0xac4a('0x6d')],'as':'Owner','attributes':['id','fullname']});return db[_0xac4a('0x34')]['find']({'where':{'id':_0x3dd60a['params']['id']},'include':_0x579181})[_0xac4a('0x27')](handleEntityNotFound(_0xbe1958,null))[_0xac4a('0x27')](function(_0x3254c3){if(_0x3254c3){var _0x516225=_0x3254c3[_0xac4a('0xce')]({'plain':!![]});fs[_0xac4a('0xcf')](_0x17f815);var _0x5a2abf={'format':'A4','border':'10px','header':{'height':_0xac4a('0xd0'),'contents':{'first':_0xac4a('0xd1')}},'footer':{'height':_0xac4a('0xd2'),'contents':{'default':util[_0xac4a('0xd3')](' \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\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
\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%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
\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
\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{{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
\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
\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%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
\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
',util[_0xac4a('0xd3')](_0xac4a('0xd4'),_0xac4a('0xd5'),_0x516225['id']),moment()['format'](_0xac4a('0xd6'))[_0xac4a('0x91')]())}}};var _0x15b97a={'channel':_0xac4a('0xd5'),'account':_0x516225[_0xac4a('0xcd')]['name'],'agent':_0x516225['Owner']?_0x516225[_0xac4a('0xd7')][_0xac4a('0x2e')]:_0xac4a('0xd8'),'createdAt':moment(_0x516225[_0xac4a('0xca')])[_0xac4a('0xd3')](_0xac4a('0xb6'))[_0xac4a('0x91')](),'closedAt':_0x516225[_0xac4a('0xd9')]?moment(_0x516225[_0xac4a('0xda')])[_0xac4a('0xd3')](_0xac4a('0xb6'))[_0xac4a('0x91')]():'','disposition':_0x516225[_0xac4a('0xdb')],'messages':_(_0x516225['Messages'])[_0xac4a('0x83')]({'secret':![]})['map'](function(_0x4ec2c3){if(_0x4ec2c3[_0xac4a('0xc9')]){var _0x27833a=path[_0xac4a('0xbf')](_0x55ccc3,_0x4ec2c3[_0xac4a('0xc9')][_0xac4a('0xdc')]);if(fs[_0xac4a('0xdd')](_0x27833a)){fs[_0xac4a('0xde')](_0x27833a)[_0xac4a('0xdf')](fs[_0xac4a('0xe0')](path['join'](_0x17f815,_0x4ec2c3[_0xac4a('0xc9')][_0xac4a('0xdc')])));}}return{'date':moment(_0x4ec2c3[_0xac4a('0xca')])[_0xac4a('0xd3')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'sender':_0x4ec2c3[_0xac4a('0xe1')]===_0xac4a('0xe2')?_0x4ec2c3[_0xac4a('0x6d')]?_0x4ec2c3[_0xac4a('0x6d')][_0xac4a('0x2e')]:_0xac4a('0xe3'):_0x4ec2c3[_0xac4a('0x61')][_0xac4a('0xc7')]+(_0x4ec2c3[_0xac4a('0x61')]['lastName']?'\x20'+_0x4ec2c3[_0xac4a('0x61')][_0xac4a('0xc8')]:''),'body':_0x4ec2c3[_0xac4a('0xc9')]?_0x4ec2c3[_0xac4a('0xc9')][_0xac4a('0xdc')]:_0x4ec2c3[_0xac4a('0x71')],'direction':_0x4ec2c3['direction']==='out'?'A':'C','secret':_0x4ec2c3['secret'],'read':_0x4ec2c3[_0xac4a('0x7e')],'attachment':_0x4ec2c3[_0xac4a('0xc9')]};})['value']()};return ejs['renderFile'](path[_0xac4a('0xbf')](config['root'],_0xac4a('0xc1'),'views',_0xac4a('0xe4')),{'interaction':_0x15b97a})[_0xac4a('0x27')](function(_0x1888c3){return new BPromise(function(_0x4a04c3,_0x14435d){pdf[_0xac4a('0xaf')](_0x1888c3,_0x5a2abf)['toFile'](path[_0xac4a('0xbf')](_0x17f815,_0xac4a('0xe5')+_0x516225['id']+'-'+_0x462964+'.pdf'),function(_0x48a75c,_0x4514a5){if(_0x48a75c)return _0x14435d(_0x48a75c);_0x4a04c3(_0x4514a5);});});})[_0xac4a('0x27')](function(){return new BPromise(function(_0x43df37,_0x45e45b){zipdir(_0x17f815,{'saveTo':_0x5aad90},function(_0x367254,_0x22cc71){if(_0x367254)return _0x45e45b(_0x367254);return _0x43df37(_0x22cc71);});})[_0xac4a('0x27')](function(){return new BPromise(function(_0x1ea4ef,_0x156b67){rimraf(_0x17f815,function(_0x330070){if(_0x330070)_0x156b67(_0x330070);return _0x1ea4ef();});});})[_0xac4a('0x27')](function(){return _0xbe1958[_0xac4a('0xe6')](_0x5aad90,_0xa8b5bb,function(_0x2d755c){if(_0x2d755c){console[_0xac4a('0xe7')](_0xac4a('0xe8'),_0x2d755c);}else{fs[_0xac4a('0xe9')](_0x5aad90);}});});});}else{return _0xbe1958[_0xac4a('0x1c')](0xc8);}})['catch'](handleError(_0xbe1958,null));};
\ No newline at end of file
diff --git a/server/api/whatsappInteraction/whatsappInteraction.events.js b/server/api/whatsappInteraction/whatsappInteraction.events.js
index 7ea5c93..b1d86b1 100644
--- a/server/api/whatsappInteraction/whatsappInteraction.events.js
+++ b/server/api/whatsappInteraction/whatsappInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf453=['setMaxListeners','save','update','remove','getUsers','setDataValue','Users','findAll','then','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappMessage'];(function(_0x2cfb48,_0x24b83b){var _0xc4594f=function(_0x3bc089){while(--_0x3bc089){_0x2cfb48['push'](_0x2cfb48['shift']());}};_0xc4594f(++_0x24b83b);}(_0xf453,0xe1));var _0x3f45=function(_0x4cef01,_0x2d95b3){_0x4cef01=_0x4cef01-0x0;var _0x11d2b7=_0xf453[_0x4cef01];return _0x11d2b7;};'use strict';var EventEmitter=require(_0x3f45('0x0'));var WhatsappInteraction=require(_0x3f45('0x1'))['db']['WhatsappInteraction'];var WhatsappMessage=require(_0x3f45('0x1'))['db'][_0x3f45('0x2')];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0x3f45('0x3')](0x0);var events={'afterCreate':_0x3f45('0x4'),'afterUpdate':_0x3f45('0x5'),'afterDestroy':_0x3f45('0x6')};function emitEvent(_0x93b8ba){return function(_0x36329f,_0x2d5464,_0x44538d){_0x36329f[_0x3f45('0x7')]({'attributes':['id'],'raw':!![]})['then'](function(_0x1e1ed8){_0x36329f[_0x3f45('0x8')](_0x3f45('0x9'),_0x1e1ed8['map'](function(_0x5c79d1){return{'id':_0x5c79d1['id']};}));return WhatsappMessage[_0x3f45('0xa')]({'where':{'WhatsappInteractionId':_0x36329f['id'],'direction':'in','read':![]},'raw':!![]});})[_0x3f45('0xb')](function(_0x7f3ef8){_0x36329f[_0x3f45('0x8')](_0x3f45('0xc'),_0x7f3ef8[_0x3f45('0xd')]);WhatsappInteractionEvents[_0x3f45('0xe')](_0x93b8ba+':'+_0x36329f['id'],_0x36329f);WhatsappInteractionEvents[_0x3f45('0xe')](_0x93b8ba,_0x36329f);_0x44538d(null);})[_0x3f45('0xf')](_0x44538d(null));};}for(var e in events){if(events[_0x3f45('0x10')](e)){var event=events[e];WhatsappInteraction[_0x3f45('0x11')](e,emitEvent(event));}}module[_0x3f45('0x12')]=WhatsappInteractionEvents;
\ No newline at end of file
+var _0xf441=['emit','catch','hasOwnProperty','exports','events','../../mysqldb','WhatsappInteraction','WhatsappMessage','save','remove','then','setDataValue','Users','findAll','unreadMessages'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0xf441,0xf4));var _0x1f44=function(_0x1b8524,_0x1bb669){_0x1b8524=_0x1b8524-0x0;var _0x81418d=_0xf441[_0x1b8524];return _0x81418d;};'use strict';var EventEmitter=require(_0x1f44('0x0'));var WhatsappInteraction=require(_0x1f44('0x1'))['db'][_0x1f44('0x2')];var WhatsappMessage=require(_0x1f44('0x1'))['db'][_0x1f44('0x3')];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x1f44('0x4'),'afterUpdate':'update','afterDestroy':_0x1f44('0x5')};function emitEvent(_0x34f249){return function(_0x4e5b8a,_0x392228,_0x21155c){_0x4e5b8a['getUsers']({'attributes':['id'],'raw':!![]})[_0x1f44('0x6')](function(_0x3f63fe){_0x4e5b8a[_0x1f44('0x7')](_0x1f44('0x8'),_0x3f63fe['map'](function(_0x35436c){return{'id':_0x35436c['id']};}));return WhatsappMessage[_0x1f44('0x9')]({'where':{'WhatsappInteractionId':_0x4e5b8a['id'],'direction':'in','read':![]},'raw':!![]});})[_0x1f44('0x6')](function(_0x1a4654){_0x4e5b8a[_0x1f44('0x7')](_0x1f44('0xa'),_0x1a4654['length']);WhatsappInteractionEvents[_0x1f44('0xb')](_0x34f249+':'+_0x4e5b8a['id'],_0x4e5b8a);WhatsappInteractionEvents['emit'](_0x34f249,_0x4e5b8a);_0x21155c(null);})[_0x1f44('0xc')](_0x21155c(null));};}for(var e in events){if(events[_0x1f44('0xd')](e)){var event=events[e];WhatsappInteraction['hook'](e,emitEvent(event));}}module[_0x1f44('0xe')]=WhatsappInteractionEvents;
\ No newline at end of file
diff --git a/server/api/whatsappInteraction/whatsappInteraction.model.js b/server/api/whatsappInteraction/whatsappInteraction.model.js
index b68c181..3fc9e04 100644
--- a/server/api/whatsappInteraction/whatsappInteraction.model.js
+++ b/server/api/whatsappInteraction/whatsappInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3b82=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','WhatsappInteraction','whatsapp_interactions','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api'];(function(_0x56ab7e,_0x3d47af){var _0x4205b9=function(_0x362220){while(--_0x362220){_0x56ab7e['push'](_0x56ab7e['shift']());}};_0x4205b9(++_0x3d47af);}(_0x3b82,0x12f));var _0x23b8=function(_0x1ab35d,_0x3f401d){_0x1ab35d=_0x1ab35d-0x0;var _0x133d6d=_0x3b82[_0x1ab35d];return _0x133d6d;};'use strict';var _=require(_0x23b8('0x0'));var util=require('util');var logger=require(_0x23b8('0x1'))(_0x23b8('0x2'));var moment=require(_0x23b8('0x3'));var BPromise=require(_0x23b8('0x4'));var rp=require(_0x23b8('0x5'));var fs=require('fs');var path=require(_0x23b8('0x6'));var rimraf=require(_0x23b8('0x7'));var config=require(_0x23b8('0x8'));var attributes=require('./whatsappInteraction.attributes');module[_0x23b8('0x9')]=function(_0x30ef25,_0xd06d13){return _0x30ef25[_0x23b8('0xa')](_0x23b8('0xb'),attributes,{'tableName':_0x23b8('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x25b684,_0x251f7a,_0xa5525c){if(_0x25b684[_0x23b8('0xd')](_0x23b8('0xe'))){_0x25b684['closedAt']=moment()[_0x23b8('0xf')](_0x23b8('0x10'));}_0xa5525c(null,_0x25b684);}}});};
\ No newline at end of file
+var _0xf481=['exports','define','whatsapp_interactions','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./whatsappInteraction.attributes'];(function(_0x41878d,_0x26905e){var _0x52306e=function(_0x53138d){while(--_0x53138d){_0x41878d['push'](_0x41878d['shift']());}};_0x52306e(++_0x26905e);}(_0xf481,0x107));var _0x1f48=function(_0xb17208,_0x16f568){_0xb17208=_0xb17208-0x0;var _0x160444=_0xf481[_0xb17208];return _0x160444;};'use strict';var _=require('lodash');var util=require(_0x1f48('0x0'));var logger=require(_0x1f48('0x1'))(_0x1f48('0x2'));var moment=require(_0x1f48('0x3'));var BPromise=require('bluebird');var rp=require(_0x1f48('0x4'));var fs=require('fs');var path=require(_0x1f48('0x5'));var rimraf=require(_0x1f48('0x6'));var config=require(_0x1f48('0x7'));var attributes=require(_0x1f48('0x8'));module[_0x1f48('0x9')]=function(_0x5029f7,_0xa8a9f0){return _0x5029f7[_0x1f48('0xa')]('WhatsappInteraction',attributes,{'tableName':_0x1f48('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x40f12f,_0x20641a,_0xaec99c){if(_0x40f12f[_0x1f48('0xc')](_0x1f48('0xd'))){_0x40f12f['closedAt']=moment()[_0x1f48('0xe')](_0x1f48('0xf'));}_0xaec99c(null,_0x40f12f);}}});};
\ No newline at end of file
diff --git a/server/api/whatsappInteraction/whatsappInteraction.rpc.js b/server/api/whatsappInteraction/whatsappInteraction.rpc.js
index 9136afe..34b101e 100644
--- a/server/api/whatsappInteraction/whatsappInteraction.rpc.js
+++ b/server/api/whatsappInteraction/whatsappInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2ad8=['register','request','then','info','WhatsappInteraction,\x20%s,\x20%s','request\x20sent','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','UpdateWhatsappInteraction','WhatsappInteraction','update','options','where','attributes','limit','AddTagsToWhatsappInteraction','find','addTags','body','ids','spread','AddTags','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x6adab6,_0x19f506){var _0x31c1c5=function(_0x3c14a5){while(--_0x3c14a5){_0x6adab6['push'](_0x6adab6['shift']());}};_0x31c1c5(++_0x19f506);}(_0x2ad8,0x1d3));var _0x82ad=function(_0x3b3b16,_0x3689d2){_0x3b3b16=_0x3b3b16-0x0;var _0x31be1d=_0x2ad8[_0x3b3b16];return _0x31be1d;};'use strict';var _=require(_0x82ad('0x0'));var util=require('util');var moment=require(_0x82ad('0x1'));var BPromise=require(_0x82ad('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x82ad('0x3'));var db=require(_0x82ad('0x4'))['db'];var utils=require(_0x82ad('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x82ad('0x6'));var jayson=require(_0x82ad('0x7'));var client=jayson[_0x82ad('0x8')][_0x82ad('0x9')]({'port':0x232a});config[_0x82ad('0xa')]=_['defaults'](config['redis'],{'host':_0x82ad('0xb'),'port':0x18eb});var socket=require(_0x82ad('0xc'))(new Redis(config[_0x82ad('0xa')]));require('./whatsappInteraction.socket')[_0x82ad('0xd')](socket);function respondWithRpcPromise(_0x5bd157,_0x31ad32,_0x4d9341){return new BPromise(function(_0x2981dd,_0x25c125){return client[_0x82ad('0xe')](_0x5bd157,_0x4d9341)[_0x82ad('0xf')](function(_0x36b98a){logger[_0x82ad('0x10')](_0x82ad('0x11'),_0x31ad32,_0x82ad('0x12'));logger[_0x82ad('0x13')](_0x82ad('0x14'),_0x31ad32,_0x82ad('0x12'),JSON[_0x82ad('0x15')](_0x36b98a));if(_0x36b98a[_0x82ad('0x16')]){if(_0x36b98a[_0x82ad('0x16')][_0x82ad('0x17')]===0x1f4){logger[_0x82ad('0x16')](_0x82ad('0x11'),_0x31ad32,_0x36b98a[_0x82ad('0x16')][_0x82ad('0x18')]);return _0x25c125(_0x36b98a[_0x82ad('0x16')]['message']);}logger[_0x82ad('0x16')]('WhatsappInteraction,\x20%s,\x20%s',_0x31ad32,_0x36b98a[_0x82ad('0x16')]['message']);return _0x2981dd(_0x36b98a[_0x82ad('0x16')]['message']);}else{logger['info']('WhatsappInteraction,\x20%s,\x20%s',_0x31ad32,'request\x20sent');_0x2981dd(_0x36b98a['result'][_0x82ad('0x18')]);}})[_0x82ad('0x19')](function(_0x470126){logger[_0x82ad('0x16')](_0x82ad('0x11'),_0x31ad32,_0x470126);_0x25c125(_0x470126);});});}exports[_0x82ad('0x1a')]=function(_0x2d6d8e){var _0x4127ac=this;return new Promise(function(_0x58c0a1,_0xb2d045){return db[_0x82ad('0x1b')][_0x82ad('0x1c')](_0x2d6d8e['body'],{'raw':_0x2d6d8e[_0x82ad('0x1d')]?_0x2d6d8e[_0x82ad('0x1d')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2d6d8e[_0x82ad('0x1d')]?_0x2d6d8e[_0x82ad('0x1d')][_0x82ad('0x1e')]||null:null,'attributes':_0x2d6d8e[_0x82ad('0x1d')]?_0x2d6d8e['options'][_0x82ad('0x1f')]||null:null,'limit':_0x2d6d8e[_0x82ad('0x1d')]?_0x2d6d8e[_0x82ad('0x1d')][_0x82ad('0x20')]||null:null})[_0x82ad('0xf')](function(_0x4de1ac){logger['info'](_0x82ad('0x1a'),_0x2d6d8e);logger[_0x82ad('0x13')](_0x82ad('0x1a'),_0x2d6d8e,JSON['stringify'](_0x4de1ac));_0x58c0a1(_0x4de1ac);})[_0x82ad('0x19')](function(_0x3bbe77){logger[_0x82ad('0x16')]('UpdateWhatsappInteraction',_0x3bbe77[_0x82ad('0x18')],_0x2d6d8e);_0xb2d045(_0x4127ac[_0x82ad('0x16')](0x1f4,_0x3bbe77[_0x82ad('0x18')]));});});};exports[_0x82ad('0x21')]=function(_0x2530d2){return new Promise(function(_0x27c4bb,_0x1e69fa){return db[_0x82ad('0x1b')][_0x82ad('0x22')]({'where':_0x2530d2[_0x82ad('0x1d')]?_0x2530d2[_0x82ad('0x1d')][_0x82ad('0x1e')]||null:null})['then'](function(_0x42bc42){if(_0x42bc42){return _0x42bc42[_0x82ad('0x23')](_0x2530d2[_0x82ad('0x24')][_0x82ad('0x25')],_['omit'](_0x2530d2[_0x82ad('0x24')],['ids','id'])||{});}})[_0x82ad('0x26')](function(_0xe83d0e){logger[_0x82ad('0x10')]('AddTags',_0x2530d2);logger['debug'](_0x82ad('0x27'),_0x2530d2,JSON[_0x82ad('0x15')](_0xe83d0e));_0x27c4bb(_0xe83d0e);})[_0x82ad('0x19')](function(_0x50839b){logger[_0x82ad('0x16')](_0x82ad('0x27'),_0x50839b[_0x82ad('0x18')],_0x2530d2);_0x1e69fa(_this[_0x82ad('0x16')](0x1f4,_0x50839b[_0x82ad('0x18')]));});});};
\ No newline at end of file
+var _0x8cbc=['addTags','ids','omit','spread','AddTags','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','WhatsappInteraction,\x20%s,\x20%s','request\x20sent','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s','error','code','message','catch','UpdateWhatsappInteraction','WhatsappInteraction','update','body','options','raw','where','attributes','limit','stringify','AddTagsToWhatsappInteraction'];(function(_0x5f313e,_0x4a7c0c){var _0x1f353a=function(_0x34ad24){while(--_0x34ad24){_0x5f313e['push'](_0x5f313e['shift']());}};_0x1f353a(++_0x4a7c0c);}(_0x8cbc,0x132));var _0xc8cb=function(_0x58235e,_0xbfe9ff){_0x58235e=_0x58235e-0x0;var _0x167446=_0x8cbc[_0x58235e];return _0x167446;};'use strict';var _=require(_0xc8cb('0x0'));var util=require('util');var moment=require(_0xc8cb('0x1'));var BPromise=require(_0xc8cb('0x2'));var rs=require(_0xc8cb('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc8cb('0x4'))['db'];var utils=require(_0xc8cb('0x5'));var logger=require(_0xc8cb('0x6'))(_0xc8cb('0x7'));var config=require('../../config/environment');var jayson=require(_0xc8cb('0x8'));var client=jayson[_0xc8cb('0x9')][_0xc8cb('0xa')]({'port':0x232a});config[_0xc8cb('0xb')]=_[_0xc8cb('0xc')](config['redis'],{'host':_0xc8cb('0xd'),'port':0x18eb});var socket=require(_0xc8cb('0xe'))(new Redis(config[_0xc8cb('0xb')]));require('./whatsappInteraction.socket')[_0xc8cb('0xf')](socket);function respondWithRpcPromise(_0x3fc994,_0x444c14,_0x270f81){return new BPromise(function(_0x425e5a,_0x4e56c){return client[_0xc8cb('0x10')](_0x3fc994,_0x270f81)[_0xc8cb('0x11')](function(_0x2b2ca1){logger[_0xc8cb('0x12')](_0xc8cb('0x13'),_0x444c14,_0xc8cb('0x14'));logger[_0xc8cb('0x15')](_0xc8cb('0x16'),_0x444c14,_0xc8cb('0x14'),JSON['stringify'](_0x2b2ca1));if(_0x2b2ca1[_0xc8cb('0x17')]){if(_0x2b2ca1[_0xc8cb('0x17')][_0xc8cb('0x18')]===0x1f4){logger[_0xc8cb('0x17')](_0xc8cb('0x13'),_0x444c14,_0x2b2ca1[_0xc8cb('0x17')][_0xc8cb('0x19')]);return _0x4e56c(_0x2b2ca1[_0xc8cb('0x17')][_0xc8cb('0x19')]);}logger['error']('WhatsappInteraction,\x20%s,\x20%s',_0x444c14,_0x2b2ca1[_0xc8cb('0x17')][_0xc8cb('0x19')]);return _0x425e5a(_0x2b2ca1[_0xc8cb('0x17')][_0xc8cb('0x19')]);}else{logger[_0xc8cb('0x12')]('WhatsappInteraction,\x20%s,\x20%s',_0x444c14,'request\x20sent');_0x425e5a(_0x2b2ca1['result'][_0xc8cb('0x19')]);}})[_0xc8cb('0x1a')](function(_0x1ba979){logger['error'](_0xc8cb('0x13'),_0x444c14,_0x1ba979);_0x4e56c(_0x1ba979);});});}exports[_0xc8cb('0x1b')]=function(_0x54e3d7){var _0x29e391=this;return new Promise(function(_0x97a599,_0x5843a7){return db[_0xc8cb('0x1c')][_0xc8cb('0x1d')](_0x54e3d7[_0xc8cb('0x1e')],{'raw':_0x54e3d7[_0xc8cb('0x1f')]?_0x54e3d7['options'][_0xc8cb('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x54e3d7[_0xc8cb('0x1f')]?_0x54e3d7[_0xc8cb('0x1f')][_0xc8cb('0x21')]||null:null,'attributes':_0x54e3d7[_0xc8cb('0x1f')]?_0x54e3d7[_0xc8cb('0x1f')][_0xc8cb('0x22')]||null:null,'limit':_0x54e3d7[_0xc8cb('0x1f')]?_0x54e3d7[_0xc8cb('0x1f')][_0xc8cb('0x23')]||null:null})[_0xc8cb('0x11')](function(_0x2ffbe0){logger[_0xc8cb('0x12')](_0xc8cb('0x1b'),_0x54e3d7);logger['debug'](_0xc8cb('0x1b'),_0x54e3d7,JSON[_0xc8cb('0x24')](_0x2ffbe0));_0x97a599(_0x2ffbe0);})[_0xc8cb('0x1a')](function(_0x16c844){logger['error'](_0xc8cb('0x1b'),_0x16c844[_0xc8cb('0x19')],_0x54e3d7);_0x5843a7(_0x29e391['error'](0x1f4,_0x16c844['message']));});});};exports[_0xc8cb('0x25')]=function(_0xba6718){return new Promise(function(_0x6c01e3,_0x3ef3a3){return db[_0xc8cb('0x1c')]['find']({'where':_0xba6718[_0xc8cb('0x1f')]?_0xba6718[_0xc8cb('0x1f')][_0xc8cb('0x21')]||null:null})[_0xc8cb('0x11')](function(_0x18cde5){if(_0x18cde5){return _0x18cde5[_0xc8cb('0x26')](_0xba6718[_0xc8cb('0x1e')][_0xc8cb('0x27')],_[_0xc8cb('0x28')](_0xba6718['body'],[_0xc8cb('0x27'),'id'])||{});}})[_0xc8cb('0x29')](function(_0x200971){logger[_0xc8cb('0x12')]('AddTags',_0xba6718);logger[_0xc8cb('0x15')](_0xc8cb('0x2a'),_0xba6718,JSON[_0xc8cb('0x24')](_0x200971));_0x6c01e3(_0x200971);})[_0xc8cb('0x1a')](function(_0x52aff5){logger[_0xc8cb('0x17')](_0xc8cb('0x2a'),_0x52aff5[_0xc8cb('0x19')],_0xba6718);_0x3ef3a3(_this[_0xc8cb('0x17')](0x1f4,_0x52aff5[_0xc8cb('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/whatsappInteraction/whatsappInteraction.socket.js b/server/api/whatsappInteraction/whatsappInteraction.socket.js
index aad6a25..f7e9967 100644
--- a/server/api/whatsappInteraction/whatsappInteraction.socket.js
+++ b/server/api/whatsappInteraction/whatsappInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa840=['length','whatsappInteraction:','./whatsappInteraction.events','emit','removeListener','register'];(function(_0x19628b,_0x449889){var _0x4164a3=function(_0x12485c){while(--_0x12485c){_0x19628b['push'](_0x19628b['shift']());}};_0x4164a3(++_0x449889);}(_0xa840,0xa4));var _0x0a84=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa840[_0x3dd15e];return _0x231fd0;};'use strict';var WhatsappInteractionEvents=require(_0x0a84('0x0'));var events=['save','remove','update'];function createListener(_0xfb6ab2,_0x67119a){return function(_0x29f17d){_0x67119a[_0x0a84('0x1')](_0xfb6ab2,_0x29f17d);};}function removeListener(_0x1636f3,_0x546fc0){return function(){WhatsappInteractionEvents[_0x0a84('0x2')](_0x1636f3,_0x546fc0);};}exports[_0x0a84('0x3')]=function(_0x190c68){for(var _0xdb2d2a=0x0,_0x17ab18=events[_0x0a84('0x4')];_0xdb2d2a<_0x17ab18;_0xdb2d2a++){var _0xa3e892=events[_0xdb2d2a];var _0x4bad00=createListener(_0x0a84('0x5')+_0xa3e892,_0x190c68);WhatsappInteractionEvents['on'](_0xa3e892,_0x4bad00);}};
\ No newline at end of file
+var _0x3a76=['save','update','emit','removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x5d30b4,_0x199248){var _0x1acfb8=function(_0x3544b2){while(--_0x3544b2){_0x5d30b4['push'](_0x5d30b4['shift']());}};_0x1acfb8(++_0x199248);}(_0x3a76,0x87));var _0x63a7=function(_0x422302,_0x25a4e4){_0x422302=_0x422302-0x0;var _0x46cee9=_0x3a76[_0x422302];return _0x46cee9;};'use strict';var WhatsappInteractionEvents=require(_0x63a7('0x0'));var events=[_0x63a7('0x1'),'remove',_0x63a7('0x2')];function createListener(_0x4f8d61,_0x5c8e47){return function(_0x1dc4c8){_0x5c8e47[_0x63a7('0x3')](_0x4f8d61,_0x1dc4c8);};}function removeListener(_0x1d85f6,_0x106f2b){return function(){WhatsappInteractionEvents[_0x63a7('0x4')](_0x1d85f6,_0x106f2b);};}exports[_0x63a7('0x5')]=function(_0x5dfc3d){for(var _0x2b3b6a=0x0,_0x41b1dc=events[_0x63a7('0x6')];_0x2b3b6a<_0x41b1dc;_0x2b3b6a++){var _0x2bc363=events[_0x2b3b6a];var _0x2ef04f=createListener(_0x63a7('0x7')+_0x2bc363,_0x5dfc3d);WhatsappInteractionEvents['on'](_0x2bc363,_0x2ef04f);}};
\ No newline at end of file
diff --git a/server/api/whatsappMessage/index.js b/server/api/whatsappMessage/index.js
index 5fb6dc9..13dc0fa 100644
--- a/server/api/whatsappMessage/index.js
+++ b/server/api/whatsappMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x93ab=['update','put','/:id/accept','/:id/reject','reject','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./whatsappMessage.controller','get','/describe','describe','/:id','isAuthenticated','post','whatsapp','whatsappmessage:create','create','/:id/status','status'];(function(_0x8c4b53,_0x26d9dd){var _0x3340cd=function(_0xa68a56){while(--_0xa68a56){_0x8c4b53['push'](_0x8c4b53['shift']());}};_0x3340cd(++_0x26d9dd);}(_0x93ab,0x73));var _0xb93a=function(_0x5179a5,_0x419746){_0x5179a5=_0x5179a5-0x0;var _0x15c8ce=_0x93ab[_0x5179a5];return _0x15c8ce;};'use strict';var multer=require(_0xb93a('0x0'));var util=require(_0xb93a('0x1'));var path=require(_0xb93a('0x2'));var timeout=require(_0xb93a('0x3'));var express=require(_0xb93a('0x4'));var router=express[_0xb93a('0x5')]();var auth=require(_0xb93a('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xb93a('0x7'));var controller=require(_0xb93a('0x8'));router[_0xb93a('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xb93a('0x9')](_0xb93a('0xa'),auth['isAuthenticated'](),controller[_0xb93a('0xb')]);router[_0xb93a('0x9')](_0xb93a('0xc'),auth[_0xb93a('0xd')](),controller['show']);router[_0xb93a('0xe')]('/',auth[_0xb93a('0xd')](),interaction['tracked'](_0xb93a('0xf'),_0xb93a('0x10')),controller[_0xb93a('0x11')]);router['post'](_0xb93a('0x12'),controller[_0xb93a('0x13')]);router['put']('/:id',auth[_0xb93a('0xd')](),controller[_0xb93a('0x14')]);router[_0xb93a('0x15')](_0xb93a('0x16'),auth[_0xb93a('0xd')](),controller['accept']);router[_0xb93a('0x15')](_0xb93a('0x17'),auth[_0xb93a('0xd')](),controller[_0xb93a('0x18')]);router[_0xb93a('0x19')]('/:id',auth[_0xb93a('0xd')](),controller[_0xb93a('0x1a')]);module['exports']=router;
\ No newline at end of file
+var _0xfdd7=['reject','delete','util','path','connect-timeout','express','Router','../../components/auth/service','./whatsappMessage.controller','isAuthenticated','get','/describe','describe','show','tracked','whatsappmessage:create','post','/:id/status','status','put','/:id','update','/:id/accept','accept'];(function(_0x915a15,_0x31b9d2){var _0x24f642=function(_0x575d4c){while(--_0x575d4c){_0x915a15['push'](_0x915a15['shift']());}};_0x24f642(++_0x31b9d2);}(_0xfdd7,0x182));var _0x7fdd=function(_0x547bad,_0x12a493){_0x547bad=_0x547bad-0x0;var _0x166969=_0xfdd7[_0x547bad];return _0x166969;};'use strict';var multer=require('multer');var util=require(_0x7fdd('0x0'));var path=require(_0x7fdd('0x1'));var timeout=require(_0x7fdd('0x2'));var express=require(_0x7fdd('0x3'));var router=express[_0x7fdd('0x4')]();var auth=require(_0x7fdd('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x7fdd('0x6'));router['get']('/',auth[_0x7fdd('0x7')](),controller['index']);router[_0x7fdd('0x8')](_0x7fdd('0x9'),auth['isAuthenticated'](),controller[_0x7fdd('0xa')]);router[_0x7fdd('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x7fdd('0xb')]);router['post']('/',auth['isAuthenticated'](),interaction[_0x7fdd('0xc')]('whatsapp',_0x7fdd('0xd')),controller['create']);router[_0x7fdd('0xe')](_0x7fdd('0xf'),controller[_0x7fdd('0x10')]);router[_0x7fdd('0x11')](_0x7fdd('0x12'),auth[_0x7fdd('0x7')](),controller[_0x7fdd('0x13')]);router[_0x7fdd('0x11')](_0x7fdd('0x14'),auth['isAuthenticated'](),controller[_0x7fdd('0x15')]);router[_0x7fdd('0x11')]('/:id/reject',auth[_0x7fdd('0x7')](),controller[_0x7fdd('0x16')]);router[_0x7fdd('0x17')]('/:id',auth[_0x7fdd('0x7')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/whatsappMessage/whatsappMessage.attributes.js b/server/api/whatsappMessage/whatsappMessage.attributes.js
index 0f60b14..fa9dbd9 100644
--- a/server/api/whatsappMessage/whatsappMessage.attributes.js
+++ b/server/api/whatsappMessage/whatsappMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb646=['exports','medium','BOOLEAN','ENUM','out','DATE','sequelize'];(function(_0x2e77b0,_0x543857){var _0x1d1f90=function(_0x1bb522){while(--_0x1bb522){_0x2e77b0['push'](_0x2e77b0['shift']());}};_0x1d1f90(++_0x543857);}(_0xb646,0xae));var _0x6b64=function(_0x5e42a7,_0x3eba35){_0x5e42a7=_0x5e42a7-0x0;var _0x36d21b=_0xb646[_0x5e42a7];return _0x36d21b;};'use strict';var Sequelize=require(_0x6b64('0x0'));module[_0x6b64('0x1')]={'body':{'type':Sequelize['TEXT'](_0x6b64('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x6b64('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x6b64('0x4')]('in',_0x6b64('0x5')),'defaultValue':_0x6b64('0x5'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize[_0x6b64('0x6')]},'secret':{'type':Sequelize[_0x6b64('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0xad22=['ENUM','out','STRING','sequelize','TEXT','medium','BOOLEAN'];(function(_0x2e8548,_0x50ca5d){var _0x1afacc=function(_0x4bf222){while(--_0x4bf222){_0x2e8548['push'](_0x2e8548['shift']());}};_0x1afacc(++_0x50ca5d);}(_0xad22,0x1ed));var _0x2ad2=function(_0x367a3d,_0x452717){_0x367a3d=_0x367a3d-0x0;var _0x460539=_0xad22[_0x367a3d];return _0x460539;};'use strict';var Sequelize=require(_0x2ad2('0x0'));module['exports']={'body':{'type':Sequelize[_0x2ad2('0x1')](_0x2ad2('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x2ad2('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x2ad2('0x4')]('in',_0x2ad2('0x5')),'defaultValue':_0x2ad2('0x5'),'allowNull':![]},'messageId':{'type':Sequelize[_0x2ad2('0x6')](0xbe)},'phone':{'type':Sequelize[_0x2ad2('0x6')]},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize[_0x2ad2('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/whatsappMessage/whatsappMessage.controller.js b/server/api/whatsappMessage/whatsappMessage.controller.js
index ce4f51b..01429f7 100644
--- a/server/api/whatsappMessage/whatsappMessage.controller.js
+++ b/server/api/whatsappMessage/whatsappMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xebd3=['request-promise','moment','mustache','util','path','sox','ejs','lodash','squel','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappMessage.socket','register','jayson/promise','client','http','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','status','json','count','offset','limit','set','Content-Range','apply','update','then','end','sendStatus','stack','name','send','index','map','WhatsappMessage','rawAttributes','fieldName','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','show','params','keys','create','body','find','destroy','describe','accept','whatsapp','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','Contact','WhatsappInteraction','WhatsappInteractionId','isNil','interaction','get','[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','acceptMessage','manual','interface','SIP/%s','channel','EventManager','acceptmessage','whatsapp-interactions','reject','role','rejectMessage','event','rejectmessage','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch'];(function(_0x1709ec,_0x3b4858){var _0x109e3e=function(_0x5063c2){while(--_0x5063c2){_0x1709ec['push'](_0x1709ec['shift']());}};_0x109e3e(++_0x3b4858);}(_0xebd3,0x190));var _0x3ebd=function(_0x2a7b50,_0x545d55){_0x2a7b50=_0x2a7b50-0x0;var _0x4224c9=_0xebd3[_0x2a7b50];return _0x4224c9;};'use strict';var pdf=require(_0x3ebd('0x0'));var emlformat=require(_0x3ebd('0x1'));var rimraf=require(_0x3ebd('0x2'));var zipdir=require(_0x3ebd('0x3'));var jsonpatch=require(_0x3ebd('0x4'));var rp=require(_0x3ebd('0x5'));var moment=require(_0x3ebd('0x6'));var BPromise=require('bluebird');var Mustache=require(_0x3ebd('0x7'));var util=require(_0x3ebd('0x8'));var path=require(_0x3ebd('0x9'));var sox=require(_0x3ebd('0xa'));var csv=require('to-csv');var ejs=require(_0x3ebd('0xb'));var fs=require('fs');var _=require(_0x3ebd('0xc'));var squel=require(_0x3ebd('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x3ebd('0xe'));var querystring=require(_0x3ebd('0xf'));var Papa=require(_0x3ebd('0x10'));var Redis=require(_0x3ebd('0x11'));var authService=require(_0x3ebd('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x3ebd('0x13'));var hardwareService=require(_0x3ebd('0x14'));var logger=require(_0x3ebd('0x15'))(_0x3ebd('0x16'));var utils=require(_0x3ebd('0x17'));var config=require(_0x3ebd('0x18'));var db=require(_0x3ebd('0x19'))['db'];config[_0x3ebd('0x1a')]=_[_0x3ebd('0x1b')](config['redis'],{'host':_0x3ebd('0x1c'),'port':0x18eb});var socket=require(_0x3ebd('0x1d'))(new Redis(config[_0x3ebd('0x1a')]));require(_0x3ebd('0x1e'))[_0x3ebd('0x1f')](socket);var jayson=require(_0x3ebd('0x20'));var client=jayson[_0x3ebd('0x21')][_0x3ebd('0x22')]({'port':0x232c});var client9002=jayson[_0x3ebd('0x21')][_0x3ebd('0x22')]({'port':0x232a});function checkPasswordPattern(_0x33dc48,_0x220446,_0x1853bf){if(_0x1853bf){var _0x4ef401=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x4ef401[_0x3ebd('0x23')](_0x220446)){return _0x33dc48;}else{throw new db[(_0x3ebd('0x24'))][(_0x3ebd('0x25'))](_0x3ebd('0x26'));}}else{return _0x33dc48;}}function respondWithRpcPromise(_0x1b0f94,_0x56849a,_0xd60729,_0x38a730){return new BPromise(function(_0x51e77d,_0xc15f6c){var _0x2f82a1=_0x38a730||client;return _0x2f82a1[_0x3ebd('0x27')](_0x1b0f94,_0xd60729)['then'](function(_0x69cf74){logger[_0x3ebd('0x28')](_0x3ebd('0x29'),_0x56849a,_0x3ebd('0x2a'));logger[_0x3ebd('0x2b')](_0x3ebd('0x2c'),_0x56849a,'request\x20sent',JSON[_0x3ebd('0x2d')](_0x69cf74));if(_0x69cf74['error']){if(_0x69cf74[_0x3ebd('0x2e')][_0x3ebd('0x2f')]===0x1f4){logger['error']('WhatsappMessage,\x20%s,\x20%s',_0x56849a,_0x69cf74['error'][_0x3ebd('0x30')]);return _0xc15f6c(_0x69cf74[_0x3ebd('0x2e')][_0x3ebd('0x30')]);}logger[_0x3ebd('0x2e')](_0x3ebd('0x29'),_0x56849a,_0x69cf74[_0x3ebd('0x2e')]['message']);return _0x51e77d(_0x69cf74[_0x3ebd('0x2e')][_0x3ebd('0x30')]);}else{logger[_0x3ebd('0x28')]('WhatsappMessage,\x20%s,\x20%s',_0x56849a,_0x3ebd('0x2a'));_0x51e77d(_0x69cf74['result']['message']);}})[_0x3ebd('0x31')](function(_0x151e06){logger['error'](_0x3ebd('0x29'),_0x56849a,_0x151e06);_0xc15f6c(_0x151e06);});});}function respondWithStatusCode(_0x3fcf05,_0x204729){_0x204729=_0x204729||0xcc;return function(_0x21a9cf){if(_0x21a9cf){return _0x3fcf05['sendStatus'](_0x204729);}return _0x3fcf05[_0x3ebd('0x32')](_0x204729)['end']();};}function respondWithResult(_0x295e5a,_0x252249){_0x252249=_0x252249||0xc8;return function(_0x551668){if(_0x551668){return _0x295e5a[_0x3ebd('0x32')](_0x252249)[_0x3ebd('0x33')](_0x551668);}};}function respondWithFilteredResult(_0x5440fb,_0xbc703f){return function(_0x177adf){if(_0x177adf){var _0x15922d=_0x177adf[_0x3ebd('0x34')],_0x1d4403=_0xbc703f['offset'],_0x225a18=_0xbc703f[_0x3ebd('0x35')]+_0xbc703f[_0x3ebd('0x36')],_0xce42c8;if(_0x225a18>=_0x15922d){_0x225a18=_0x15922d;_0xce42c8=0xc8;}else{_0xce42c8=0xce;}_0x5440fb[_0x3ebd('0x32')](_0xce42c8);return _0x5440fb[_0x3ebd('0x37')](_0x3ebd('0x38'),_0x1d4403+'-'+_0x225a18+'/'+_0x15922d)['json'](_0x177adf);}return null;};}function patchUpdates(_0x23b03a){return function(_0x5d9258){try{jsonpatch[_0x3ebd('0x39')](_0x5d9258,_0x23b03a,!![]);}catch(_0x514962){return BPromise['reject'](_0x514962);}return _0x5d9258['save']();};}function saveUpdates(_0x4c0cd5,_0x33b4fc){return function(_0x484ba2){if(_0x484ba2){return _0x484ba2[_0x3ebd('0x3a')](_0x4c0cd5)[_0x3ebd('0x3b')](function(_0x4a5a41){return _0x4a5a41;});}return null;};}function removeEntity(_0x3b371f,_0x33a65d){return function(_0x3bb31b){if(_0x3bb31b){return _0x3bb31b['destroy']()[_0x3ebd('0x3b')](function(){_0x3b371f['status'](0xcc)[_0x3ebd('0x3c')]();});}};}function handleEntityNotFound(_0x41fa36,_0x132c57){return function(_0x58825e){if(!_0x58825e){_0x41fa36[_0x3ebd('0x3d')](0x194);}return _0x58825e;};}function handleError(_0x8bc0c0,_0x2068ce){_0x2068ce=_0x2068ce||0x1f4;return function(_0x22c3b6){logger[_0x3ebd('0x2e')](_0x22c3b6[_0x3ebd('0x3e')]);if(_0x22c3b6[_0x3ebd('0x3f')]){delete _0x22c3b6[_0x3ebd('0x3f')];}_0x8bc0c0[_0x3ebd('0x32')](_0x2068ce)[_0x3ebd('0x40')](_0x22c3b6);};}exports[_0x3ebd('0x41')]=function(_0x334146,_0x2d8490){var _0x346dbb={},_0x2dbfb7={},_0x25d6b4={'count':0x0,'rows':[]};var _0x5819cc=_[_0x3ebd('0x42')](db[_0x3ebd('0x43')][_0x3ebd('0x44')],function(_0x515475){return{'name':_0x515475[_0x3ebd('0x45')],'type':_0x515475[_0x3ebd('0x46')][_0x3ebd('0x47')]};});_0x2dbfb7[_0x3ebd('0x48')]=_['map'](_0x5819cc,_0x3ebd('0x3f'));_0x2dbfb7[_0x3ebd('0x49')]=_['keys'](_0x334146[_0x3ebd('0x49')]);_0x2dbfb7['filters']=_[_0x3ebd('0x4a')](_0x2dbfb7[_0x3ebd('0x48')],_0x2dbfb7[_0x3ebd('0x49')]);_0x346dbb[_0x3ebd('0x4b')]=_[_0x3ebd('0x4a')](_0x2dbfb7['model'],qs[_0x3ebd('0x4c')](_0x334146['query'][_0x3ebd('0x4c')]));_0x346dbb[_0x3ebd('0x4b')]=_0x346dbb[_0x3ebd('0x4b')][_0x3ebd('0x4d')]?_0x346dbb['attributes']:_0x2dbfb7[_0x3ebd('0x48')];if(!_0x334146[_0x3ebd('0x49')][_0x3ebd('0x4e')](_0x3ebd('0x4f'))){_0x346dbb['limit']=qs['limit'](_0x334146[_0x3ebd('0x49')][_0x3ebd('0x36')]);_0x346dbb['offset']=qs[_0x3ebd('0x35')](_0x334146[_0x3ebd('0x49')]['offset']);}_0x346dbb[_0x3ebd('0x50')]=qs[_0x3ebd('0x51')](_0x334146[_0x3ebd('0x49')][_0x3ebd('0x51')]);_0x346dbb[_0x3ebd('0x52')]=qs[_0x3ebd('0x53')](_['pick'](_0x334146[_0x3ebd('0x49')],_0x2dbfb7[_0x3ebd('0x53')]),_0x5819cc);if(_0x334146[_0x3ebd('0x49')][_0x3ebd('0x54')]){_0x346dbb[_0x3ebd('0x52')]=_[_0x3ebd('0x55')](_0x346dbb[_0x3ebd('0x52')],{'$or':_[_0x3ebd('0x42')](_0x5819cc,function(_0x5b4502){if(_0x5b4502[_0x3ebd('0x46')]!==_0x3ebd('0x56')){var _0xccc887={};_0xccc887[_0x5b4502[_0x3ebd('0x3f')]]={'$like':'%'+_0x334146[_0x3ebd('0x49')][_0x3ebd('0x54')]+'%'};return _0xccc887;}})});}_0x346dbb=_[_0x3ebd('0x55')]({},_0x346dbb,_0x334146[_0x3ebd('0x57')]);var _0x1ef3f3={'where':_0x346dbb[_0x3ebd('0x52')]};return db['WhatsappMessage'][_0x3ebd('0x34')](_0x1ef3f3)[_0x3ebd('0x3b')](function(_0x3807b1){_0x25d6b4[_0x3ebd('0x34')]=_0x3807b1;if(_0x334146['query'][_0x3ebd('0x58')]){_0x346dbb[_0x3ebd('0x59')]=[{'all':!![]}];}return db[_0x3ebd('0x43')][_0x3ebd('0x5a')](_0x346dbb);})['then'](function(_0x584656){_0x25d6b4['rows']=_0x584656;return _0x25d6b4;})[_0x3ebd('0x3b')](respondWithFilteredResult(_0x2d8490,_0x346dbb))[_0x3ebd('0x31')](handleError(_0x2d8490,null));};exports[_0x3ebd('0x5b')]=function(_0x45527d,_0x3fafd0){var _0xc4c42={'raw':!![],'where':{'id':_0x45527d[_0x3ebd('0x5c')]['id']}},_0x13593c={};_0x13593c['model']=_[_0x3ebd('0x5d')](db[_0x3ebd('0x43')][_0x3ebd('0x44')]);_0x13593c[_0x3ebd('0x49')]=_['keys'](_0x45527d[_0x3ebd('0x49')]);_0x13593c[_0x3ebd('0x53')]=_[_0x3ebd('0x4a')](_0x13593c[_0x3ebd('0x48')],_0x13593c['query']);_0xc4c42[_0x3ebd('0x4b')]=_[_0x3ebd('0x4a')](_0x13593c[_0x3ebd('0x48')],qs[_0x3ebd('0x4c')](_0x45527d['query'][_0x3ebd('0x4c')]));_0xc4c42[_0x3ebd('0x4b')]=_0xc4c42[_0x3ebd('0x4b')][_0x3ebd('0x4d')]?_0xc4c42['attributes']:_0x13593c[_0x3ebd('0x48')];if(_0x45527d['query'][_0x3ebd('0x58')]){_0xc4c42['include']=[{'all':!![]}];}_0xc4c42=_[_0x3ebd('0x55')]({},_0xc4c42,_0x45527d[_0x3ebd('0x57')]);return db[_0x3ebd('0x43')]['find'](_0xc4c42)[_0x3ebd('0x3b')](handleEntityNotFound(_0x3fafd0,null))[_0x3ebd('0x3b')](respondWithResult(_0x3fafd0,null))['catch'](handleError(_0x3fafd0,null));};exports[_0x3ebd('0x5e')]=function(_0x42f4eb,_0x589c6a){return db[_0x3ebd('0x43')]['create'](_0x42f4eb['body'],{})['then'](respondWithResult(_0x589c6a,0xc9))['catch'](handleError(_0x589c6a,null));};exports[_0x3ebd('0x3a')]=function(_0x29d594,_0x3aff82){if(_0x29d594['body']['id']){delete _0x29d594[_0x3ebd('0x5f')]['id'];}return db[_0x3ebd('0x43')][_0x3ebd('0x60')]({'where':{'id':_0x29d594[_0x3ebd('0x5c')]['id']}})[_0x3ebd('0x3b')](handleEntityNotFound(_0x3aff82,null))[_0x3ebd('0x3b')](saveUpdates(_0x29d594['body'],null))['then'](respondWithResult(_0x3aff82,null))[_0x3ebd('0x31')](handleError(_0x3aff82,null));};exports[_0x3ebd('0x61')]=function(_0x4b3756,_0x343c68){return db['WhatsappMessage'][_0x3ebd('0x60')]({'where':{'id':_0x4b3756[_0x3ebd('0x5c')]['id']}})[_0x3ebd('0x3b')](handleEntityNotFound(_0x343c68,null))[_0x3ebd('0x3b')](removeEntity(_0x343c68,null))[_0x3ebd('0x31')](handleError(_0x343c68,null));};exports[_0x3ebd('0x62')]=function(_0x2df389,_0x5e3eb0){return db[_0x3ebd('0x43')][_0x3ebd('0x62')]()[_0x3ebd('0x3b')](respondWithResult(_0x5e3eb0,null))[_0x3ebd('0x31')](handleError(_0x5e3eb0,null));};var interaction_log=require(_0x3ebd('0x15'))('whatsapp-interactions');exports[_0x3ebd('0x63')]=function(_0x21586e,_0x37c3d2,_0x554ea5){var _0x27276c={'channel':_0x3ebd('0x64')};if(_0x21586e['body']['id']){delete _0x21586e[_0x3ebd('0x5f')]['id'];}_0x21586e[_0x3ebd('0x5f')][_0x3ebd('0x65')]=!![];_0x21586e[_0x3ebd('0x5f')]['readAt']=moment()[_0x3ebd('0x66')](_0x3ebd('0x67'));_0x21586e[_0x3ebd('0x5f')][_0x3ebd('0x68')]=_0x21586e[_0x3ebd('0x5f')][_0x3ebd('0x68')]||_0x21586e[_0x3ebd('0x69')]['id'];return db[_0x3ebd('0x43')]['find']({'where':{'id':_0x21586e[_0x3ebd('0x5c')]['id'],'UserId':null},'include':[{'model':db[_0x3ebd('0x6a')],'as':_0x3ebd('0x6b')}]})[_0x3ebd('0x3b')](handleEntityNotFound(_0x37c3d2,null))[_0x3ebd('0x3b')](saveUpdates(_0x21586e[_0x3ebd('0x5f')],null))[_0x3ebd('0x3b')](function(_0x547820){if(_0x547820){_0x27276c[_0x3ebd('0x30')]=_0x547820['get']({'plain':!![]});return db[_0x3ebd('0x6c')][_0x3ebd('0x60')]({'where':{'id':_0x547820[_0x3ebd('0x6d')]}});}return null;})[_0x3ebd('0x3b')](handleEntityNotFound(_0x37c3d2,null))[_0x3ebd('0x3b')](function(_0x29e71a){if(_0x29e71a){return _0x29e71a[_0x3ebd('0x3a')]({'UserId':_0x21586e[_0x3ebd('0x5f')][_0x3ebd('0x68')],'read1stAt':_[_0x3ebd('0x6e')](_0x29e71a['read1stAt'])?moment()[_0x3ebd('0x66')](_0x3ebd('0x67')):undefined});}return null;})[_0x3ebd('0x3b')](function(_0x5b8a6c){if(_0x5b8a6c){_0x27276c[_0x3ebd('0x6f')]=_0x5b8a6c[_0x3ebd('0x70')]({'plain':!![]});interaction_log['info'](_0x3ebd('0x71'),_0x21586e['user']['id'],_0x21586e[_0x3ebd('0x69')][_0x3ebd('0x3f')],_0x21586e[_0x3ebd('0x69')]['role'],_0x27276c[_0x3ebd('0x6f')]['id'],_0x21586e[_0x3ebd('0x5f')]?JSON['stringify'](_0x21586e[_0x3ebd('0x5f')]):'null');return respondWithRpcPromise('AcceptMessage',_0x3ebd('0x72'),_0x27276c);}return null;})[_0x3ebd('0x3b')](function(_0x15be3f){if(_0x15be3f){if(_0x21586e['body'][_0x3ebd('0x73')]){_0x27276c[_0x3ebd('0x30')][_0x3ebd('0x74')]=util[_0x3ebd('0x66')](_0x3ebd('0x75'),_0x21586e[_0x3ebd('0x69')][_0x3ebd('0x3f')]);_0x27276c[_0x3ebd('0x30')][_0x3ebd('0x76')]=_0x27276c[_0x3ebd('0x76')];_0x27276c[_0x3ebd('0x30')]['event']=_0x3ebd('0x63');return respondWithRpcPromise(_0x3ebd('0x77'),'EventManager',{'event':_0x3ebd('0x78'),'message':_0x27276c[_0x3ebd('0x30')]},client9002)[_0x3ebd('0x3b')](function(){return _0x27276c;});}return _0x27276c;}return null;})[_0x3ebd('0x3b')](respondWithResult(_0x37c3d2,null))['catch'](handleError(_0x37c3d2,null));};var interaction_log=require('../../config/logger')(_0x3ebd('0x79'));exports[_0x3ebd('0x7a')]=function(_0x30849e,_0x347ccc,_0x1d782e){var _0x42bf4b={'agent':{},'channel':_0x3ebd('0x64')};if(_0x30849e[_0x3ebd('0x5f')]['id']){delete _0x30849e[_0x3ebd('0x5f')]['id'];}_0x30849e[_0x3ebd('0x5f')][_0x3ebd('0x68')]=_0x30849e[_0x3ebd('0x5f')][_0x3ebd('0x68')]||_0x30849e[_0x3ebd('0x69')]['id'];_0x42bf4b['agent']['id']=_0x30849e['body'][_0x3ebd('0x68')];return db[_0x3ebd('0x43')][_0x3ebd('0x60')]({'where':{'id':_0x30849e[_0x3ebd('0x5c')]['id'],'UserId':null}})[_0x3ebd('0x3b')](handleEntityNotFound(_0x347ccc,null))[_0x3ebd('0x3b')](function(_0x37c5bc){if(_0x37c5bc){_0x42bf4b[_0x3ebd('0x30')]=_0x37c5bc['get']({'plain':!![]});return db[_0x3ebd('0x6c')]['find']({'where':{'id':_0x37c5bc[_0x3ebd('0x6d')]}});}return null;})[_0x3ebd('0x3b')](handleEntityNotFound(_0x347ccc,null))[_0x3ebd('0x3b')](function(_0x2701f9){if(_0x2701f9){_0x42bf4b[_0x3ebd('0x6f')]=_0x2701f9[_0x3ebd('0x70')]({'plain':!![]});interaction_log[_0x3ebd('0x28')]('[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x30849e[_0x3ebd('0x69')]['id'],_0x30849e[_0x3ebd('0x69')][_0x3ebd('0x3f')],_0x30849e[_0x3ebd('0x69')][_0x3ebd('0x7b')],_0x42bf4b['interaction']['id'],_0x30849e[_0x3ebd('0x5f')]?JSON['stringify'](_0x30849e[_0x3ebd('0x5f')]):'null');return respondWithRpcPromise('RejectMessage',_0x3ebd('0x7c'),_0x42bf4b);}return null;})[_0x3ebd('0x3b')](function(_0x32aab9){if(_0x32aab9){_0x32aab9[_0x3ebd('0x30')]['interface']=util[_0x3ebd('0x66')](_0x3ebd('0x75'),_0x30849e[_0x3ebd('0x69')][_0x3ebd('0x3f')]);_0x32aab9[_0x3ebd('0x30')][_0x3ebd('0x76')]=_0x42bf4b[_0x3ebd('0x76')];_0x32aab9['message'][_0x3ebd('0x7d')]='reject';respondWithRpcPromise('EventManager',_0x3ebd('0x77'),{'event':_0x3ebd('0x7e'),'message':_0x32aab9['message']},client9002);return _0x42bf4b;}return null;})[_0x3ebd('0x3b')](respondWithResult(_0x347ccc,null))[_0x3ebd('0x31')](handleError(_0x347ccc,null));};exports['status']=function(_0x408c1f,_0x4f22e4,_0x3e48f9){if(_0x408c1f['body']['id']){delete _0x408c1f['body']['id'];}var _0x5de80;return db[_0x3ebd('0x43')][_0x3ebd('0x60')]({'where':{'id':_0x408c1f[_0x3ebd('0x5c')]['id']}})['then'](handleEntityNotFound(_0x4f22e4,null))[_0x3ebd('0x3b')](function(_0x5cb487){if(_0x5cb487){_0x5de80=_0x5cb487;return db['WhatsappAccount'][_0x3ebd('0x60')]({'where':{'id':_0x5cb487[_0x3ebd('0x7f')]}});}})[_0x3ebd('0x3b')](handleEntityNotFound(_0x4f22e4,null))[_0x3ebd('0x3b')](function(_0x169e60){if(_0x169e60){logger['debug'](_0x3ebd('0x80'),_0x3ebd('0x32'),_0x3ebd('0x81'),_0x169e60['type'],util[_0x3ebd('0x82')](_0x408c1f[_0x3ebd('0x5f')],{'showHidden':![],'depth':null}));switch(_0x169e60['type']){case'twilio':if(_0x408c1f[_0x3ebd('0x5f')]['MessageSid']&&_0x408c1f[_0x3ebd('0x5f')][_0x3ebd('0x83')]===_0x5de80[_0x3ebd('0x84')]&&_0x408c1f[_0x3ebd('0x5f')][_0x3ebd('0x85')]&&_0x408c1f[_0x3ebd('0x5f')]['MessageStatus']===_0x3ebd('0x65')){return _0x5de80[_0x3ebd('0x3a')]({'read':!![]});}else{logger[_0x3ebd('0x2e')](_0x3ebd('0x86'),_0x3ebd('0x32'),'twilio',util[_0x3ebd('0x82')](_0x408c1f['body'],{'showHidden':![],'depth':null}));}break;}return _0x5de80;}})[_0x3ebd('0x3b')](respondWithResult(_0x4f22e4,null))[_0x3ebd('0x31')](handleError(_0x4f22e4,null));};
\ No newline at end of file
+var _0x07a1=['intersection','attributes','fields','length','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','show','find','create','body','params','destroy','describe','accept','read','readAt','YYYY-MM-DD\x20HH:mm:ss','UserId','user','CmContact','Contact','get','WhatsappInteraction','isNil','read1stAt','format','interaction','role','null','AcceptMessage','acceptMessage','channel','event','EventManager','acceptmessage','whatsapp','agent','WhatsappInteractionId','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','interface','SIP/%s','rejectmessage','WhatsappAccount','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','ejs','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./whatsappMessage.socket','register','jayson/promise','client','http','test','Sequelize','ValidationError','then','info','WhatsappMessage,\x20%s,\x20%s','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','sendStatus','status','json','count','offset','limit','apply','reject','save','update','stack','name','send','map','WhatsappMessage','rawAttributes','fieldName','type','key','model','query','keys','filters'];(function(_0x119d5a,_0x19b457){var _0x15bff4=function(_0x1b7c78){while(--_0x1b7c78){_0x119d5a['push'](_0x119d5a['shift']());}};_0x15bff4(++_0x19b457);}(_0x07a1,0xc2));var _0x107a=function(_0x1fb705,_0x3e3fbc){_0x1fb705=_0x1fb705-0x0;var _0x5ba967=_0x07a1[_0x1fb705];return _0x5ba967;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x107a('0x0'));var zipdir=require(_0x107a('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x107a('0x2'));var BPromise=require(_0x107a('0x3'));var Mustache=require(_0x107a('0x4'));var util=require(_0x107a('0x5'));var path=require(_0x107a('0x6'));var sox=require(_0x107a('0x7'));var csv=require('to-csv');var ejs=require(_0x107a('0x8'));var fs=require('fs');var _=require('lodash');var squel=require(_0x107a('0x9'));var crypto=require('crypto');var jsforce=require(_0x107a('0xa'));var deskjs=require(_0x107a('0xb'));var toCsv=require(_0x107a('0xc'));var querystring=require(_0x107a('0xd'));var Papa=require(_0x107a('0xe'));var Redis=require(_0x107a('0xf'));var authService=require(_0x107a('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x107a('0x11'));var hardwareService=require(_0x107a('0x12'));var logger=require(_0x107a('0x13'))('api');var utils=require(_0x107a('0x14'));var config=require(_0x107a('0x15'));var db=require(_0x107a('0x16'))['db'];config[_0x107a('0x17')]=_[_0x107a('0x18')](config[_0x107a('0x17')],{'host':'localhost','port':0x18eb});var socket=require(_0x107a('0x19'))(new Redis(config['redis']));require(_0x107a('0x1a'))[_0x107a('0x1b')](socket);var jayson=require(_0x107a('0x1c'));var client=jayson[_0x107a('0x1d')][_0x107a('0x1e')]({'port':0x232c});var client9002=jayson['client'][_0x107a('0x1e')]({'port':0x232a});function checkPasswordPattern(_0x520537,_0x3bff6d,_0x1a4e0d){if(_0x1a4e0d){var _0x111389=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x111389[_0x107a('0x1f')](_0x3bff6d)){return _0x520537;}else{throw new db[(_0x107a('0x20'))][(_0x107a('0x21'))]('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 _0x520537;}}function respondWithRpcPromise(_0x31c0a3,_0x43e3c1,_0xb06006,_0xb337bd){return new BPromise(function(_0x2a287b,_0x2920a2){var _0x1cea4d=_0xb337bd||client;return _0x1cea4d['request'](_0x31c0a3,_0xb06006)[_0x107a('0x22')](function(_0x49813b){logger[_0x107a('0x23')](_0x107a('0x24'),_0x43e3c1,'request\x20sent');logger[_0x107a('0x25')](_0x107a('0x26'),_0x43e3c1,_0x107a('0x27'),JSON[_0x107a('0x28')](_0x49813b));if(_0x49813b[_0x107a('0x29')]){if(_0x49813b['error'][_0x107a('0x2a')]===0x1f4){logger['error'](_0x107a('0x24'),_0x43e3c1,_0x49813b[_0x107a('0x29')][_0x107a('0x2b')]);return _0x2920a2(_0x49813b[_0x107a('0x29')][_0x107a('0x2b')]);}logger[_0x107a('0x29')]('WhatsappMessage,\x20%s,\x20%s',_0x43e3c1,_0x49813b[_0x107a('0x29')]['message']);return _0x2a287b(_0x49813b['error']['message']);}else{logger[_0x107a('0x23')]('WhatsappMessage,\x20%s,\x20%s',_0x43e3c1,'request\x20sent');_0x2a287b(_0x49813b['result'][_0x107a('0x2b')]);}})[_0x107a('0x2c')](function(_0x3ecddc){logger[_0x107a('0x29')](_0x107a('0x24'),_0x43e3c1,_0x3ecddc);_0x2920a2(_0x3ecddc);});});}function respondWithStatusCode(_0x497937,_0x2eb678){_0x2eb678=_0x2eb678||0xcc;return function(_0x3693c9){if(_0x3693c9){return _0x497937[_0x107a('0x2d')](_0x2eb678);}return _0x497937[_0x107a('0x2e')](_0x2eb678)['end']();};}function respondWithResult(_0x3230f2,_0xe848f3){_0xe848f3=_0xe848f3||0xc8;return function(_0xf9dc53){if(_0xf9dc53){return _0x3230f2['status'](_0xe848f3)[_0x107a('0x2f')](_0xf9dc53);}};}function respondWithFilteredResult(_0xdf9fcc,_0x38c5b6){return function(_0x325df2){if(_0x325df2){var _0x26eaff=_0x325df2[_0x107a('0x30')],_0x320196=_0x38c5b6[_0x107a('0x31')],_0x40cc30=_0x38c5b6[_0x107a('0x31')]+_0x38c5b6[_0x107a('0x32')],_0x8755de;if(_0x40cc30>=_0x26eaff){_0x40cc30=_0x26eaff;_0x8755de=0xc8;}else{_0x8755de=0xce;}_0xdf9fcc[_0x107a('0x2e')](_0x8755de);return _0xdf9fcc['set']('Content-Range',_0x320196+'-'+_0x40cc30+'/'+_0x26eaff)[_0x107a('0x2f')](_0x325df2);}return null;};}function patchUpdates(_0x5a8999){return function(_0x4f0a31){try{jsonpatch[_0x107a('0x33')](_0x4f0a31,_0x5a8999,!![]);}catch(_0x488440){return BPromise[_0x107a('0x34')](_0x488440);}return _0x4f0a31[_0x107a('0x35')]();};}function saveUpdates(_0x1c41f6,_0x47617d){return function(_0x3d89f2){if(_0x3d89f2){return _0x3d89f2[_0x107a('0x36')](_0x1c41f6)[_0x107a('0x22')](function(_0x347620){return _0x347620;});}return null;};}function removeEntity(_0x14f70d,_0x21376d){return function(_0x414afb){if(_0x414afb){return _0x414afb['destroy']()['then'](function(){_0x14f70d[_0x107a('0x2e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x472d33,_0x57e07a){return function(_0x59eff7){if(!_0x59eff7){_0x472d33[_0x107a('0x2d')](0x194);}return _0x59eff7;};}function handleError(_0x95f4c9,_0x5a6c58){_0x5a6c58=_0x5a6c58||0x1f4;return function(_0xeb2bd3){logger[_0x107a('0x29')](_0xeb2bd3[_0x107a('0x37')]);if(_0xeb2bd3[_0x107a('0x38')]){delete _0xeb2bd3[_0x107a('0x38')];}_0x95f4c9['status'](_0x5a6c58)[_0x107a('0x39')](_0xeb2bd3);};}exports['index']=function(_0xc4e216,_0x115eee){var _0x9a6aa7={},_0x422c30={},_0x566560={'count':0x0,'rows':[]};var _0x300136=_[_0x107a('0x3a')](db[_0x107a('0x3b')][_0x107a('0x3c')],function(_0x570594){return{'name':_0x570594[_0x107a('0x3d')],'type':_0x570594[_0x107a('0x3e')][_0x107a('0x3f')]};});_0x422c30[_0x107a('0x40')]=_['map'](_0x300136,_0x107a('0x38'));_0x422c30[_0x107a('0x41')]=_[_0x107a('0x42')](_0xc4e216[_0x107a('0x41')]);_0x422c30[_0x107a('0x43')]=_[_0x107a('0x44')](_0x422c30[_0x107a('0x40')],_0x422c30[_0x107a('0x41')]);_0x9a6aa7[_0x107a('0x45')]=_[_0x107a('0x44')](_0x422c30[_0x107a('0x40')],qs[_0x107a('0x46')](_0xc4e216['query'][_0x107a('0x46')]));_0x9a6aa7[_0x107a('0x45')]=_0x9a6aa7[_0x107a('0x45')][_0x107a('0x47')]?_0x9a6aa7[_0x107a('0x45')]:_0x422c30[_0x107a('0x40')];if(!_0xc4e216[_0x107a('0x41')]['hasOwnProperty']('nolimit')){_0x9a6aa7[_0x107a('0x32')]=qs['limit'](_0xc4e216['query']['limit']);_0x9a6aa7[_0x107a('0x31')]=qs[_0x107a('0x31')](_0xc4e216[_0x107a('0x41')][_0x107a('0x31')]);}_0x9a6aa7[_0x107a('0x48')]=qs['sort'](_0xc4e216['query'][_0x107a('0x49')]);_0x9a6aa7[_0x107a('0x4a')]=qs['filters'](_[_0x107a('0x4b')](_0xc4e216['query'],_0x422c30['filters']),_0x300136);if(_0xc4e216[_0x107a('0x41')][_0x107a('0x4c')]){_0x9a6aa7[_0x107a('0x4a')]=_[_0x107a('0x4d')](_0x9a6aa7[_0x107a('0x4a')],{'$or':_['map'](_0x300136,function(_0x2488a9){if(_0x2488a9[_0x107a('0x3e')]!==_0x107a('0x4e')){var _0x3e200d={};_0x3e200d[_0x2488a9[_0x107a('0x38')]]={'$like':'%'+_0xc4e216[_0x107a('0x41')][_0x107a('0x4c')]+'%'};return _0x3e200d;}})});}_0x9a6aa7=_['merge']({},_0x9a6aa7,_0xc4e216[_0x107a('0x4f')]);var _0x839384={'where':_0x9a6aa7['where']};return db[_0x107a('0x3b')][_0x107a('0x30')](_0x839384)[_0x107a('0x22')](function(_0x5a73a6){_0x566560[_0x107a('0x30')]=_0x5a73a6;if(_0xc4e216[_0x107a('0x41')]['includeAll']){_0x9a6aa7[_0x107a('0x50')]=[{'all':!![]}];}return db[_0x107a('0x3b')][_0x107a('0x51')](_0x9a6aa7);})['then'](function(_0x3ae2cb){_0x566560[_0x107a('0x52')]=_0x3ae2cb;return _0x566560;})['then'](respondWithFilteredResult(_0x115eee,_0x9a6aa7))[_0x107a('0x2c')](handleError(_0x115eee,null));};exports[_0x107a('0x53')]=function(_0x3f400f,_0x4ef888){var _0x39bdef={'raw':!![],'where':{'id':_0x3f400f['params']['id']}},_0x413901={};_0x413901['model']=_['keys'](db[_0x107a('0x3b')]['rawAttributes']);_0x413901['query']=_['keys'](_0x3f400f[_0x107a('0x41')]);_0x413901[_0x107a('0x43')]=_[_0x107a('0x44')](_0x413901[_0x107a('0x40')],_0x413901[_0x107a('0x41')]);_0x39bdef[_0x107a('0x45')]=_[_0x107a('0x44')](_0x413901[_0x107a('0x40')],qs[_0x107a('0x46')](_0x3f400f[_0x107a('0x41')][_0x107a('0x46')]));_0x39bdef['attributes']=_0x39bdef[_0x107a('0x45')]['length']?_0x39bdef[_0x107a('0x45')]:_0x413901['model'];if(_0x3f400f[_0x107a('0x41')]['includeAll']){_0x39bdef['include']=[{'all':!![]}];}_0x39bdef=_[_0x107a('0x4d')]({},_0x39bdef,_0x3f400f[_0x107a('0x4f')]);return db[_0x107a('0x3b')][_0x107a('0x54')](_0x39bdef)['then'](handleEntityNotFound(_0x4ef888,null))['then'](respondWithResult(_0x4ef888,null))[_0x107a('0x2c')](handleError(_0x4ef888,null));};exports[_0x107a('0x55')]=function(_0x15fd89,_0x144650){return db[_0x107a('0x3b')][_0x107a('0x55')](_0x15fd89['body'],{})[_0x107a('0x22')](respondWithResult(_0x144650,0xc9))[_0x107a('0x2c')](handleError(_0x144650,null));};exports[_0x107a('0x36')]=function(_0x3dc486,_0x4b4720){if(_0x3dc486['body']['id']){delete _0x3dc486[_0x107a('0x56')]['id'];}return db[_0x107a('0x3b')][_0x107a('0x54')]({'where':{'id':_0x3dc486[_0x107a('0x57')]['id']}})[_0x107a('0x22')](handleEntityNotFound(_0x4b4720,null))['then'](saveUpdates(_0x3dc486[_0x107a('0x56')],null))[_0x107a('0x22')](respondWithResult(_0x4b4720,null))[_0x107a('0x2c')](handleError(_0x4b4720,null));};exports[_0x107a('0x58')]=function(_0x478e15,_0x21220a){return db[_0x107a('0x3b')][_0x107a('0x54')]({'where':{'id':_0x478e15[_0x107a('0x57')]['id']}})[_0x107a('0x22')](handleEntityNotFound(_0x21220a,null))[_0x107a('0x22')](removeEntity(_0x21220a,null))[_0x107a('0x2c')](handleError(_0x21220a,null));};exports[_0x107a('0x59')]=function(_0x58dcf2,_0x3a151d){return db['WhatsappMessage']['describe']()[_0x107a('0x22')](respondWithResult(_0x3a151d,null))[_0x107a('0x2c')](handleError(_0x3a151d,null));};var interaction_log=require('../../config/logger')('whatsapp-interactions');exports[_0x107a('0x5a')]=function(_0x337b4a,_0x189f57,_0x4a6746){var _0x22c871={'channel':'whatsapp'};if(_0x337b4a['body']['id']){delete _0x337b4a[_0x107a('0x56')]['id'];}_0x337b4a['body'][_0x107a('0x5b')]=!![];_0x337b4a[_0x107a('0x56')][_0x107a('0x5c')]=moment()['format'](_0x107a('0x5d'));_0x337b4a[_0x107a('0x56')][_0x107a('0x5e')]=_0x337b4a['body']['UserId']||_0x337b4a[_0x107a('0x5f')]['id'];return db[_0x107a('0x3b')]['find']({'where':{'id':_0x337b4a[_0x107a('0x57')]['id'],'UserId':null},'include':[{'model':db[_0x107a('0x60')],'as':_0x107a('0x61')}]})['then'](handleEntityNotFound(_0x189f57,null))[_0x107a('0x22')](saveUpdates(_0x337b4a[_0x107a('0x56')],null))[_0x107a('0x22')](function(_0x5e4ee9){if(_0x5e4ee9){_0x22c871[_0x107a('0x2b')]=_0x5e4ee9[_0x107a('0x62')]({'plain':!![]});return db[_0x107a('0x63')][_0x107a('0x54')]({'where':{'id':_0x5e4ee9['WhatsappInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x189f57,null))[_0x107a('0x22')](function(_0x21931d){if(_0x21931d){return _0x21931d[_0x107a('0x36')]({'UserId':_0x337b4a['body'][_0x107a('0x5e')],'read1stAt':_[_0x107a('0x64')](_0x21931d[_0x107a('0x65')])?moment()[_0x107a('0x66')](_0x107a('0x5d')):undefined});}return null;})[_0x107a('0x22')](function(_0x387e17){if(_0x387e17){_0x22c871[_0x107a('0x67')]=_0x387e17['get']({'plain':!![]});interaction_log['info']('[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x337b4a[_0x107a('0x5f')]['id'],_0x337b4a[_0x107a('0x5f')]['name'],_0x337b4a['user'][_0x107a('0x68')],_0x22c871[_0x107a('0x67')]['id'],_0x337b4a['body']?JSON['stringify'](_0x337b4a[_0x107a('0x56')]):_0x107a('0x69'));return respondWithRpcPromise(_0x107a('0x6a'),_0x107a('0x6b'),_0x22c871);}return null;})['then'](function(_0x1221c7){if(_0x1221c7){if(_0x337b4a[_0x107a('0x56')]['manual']){_0x22c871['message']['interface']=util[_0x107a('0x66')]('SIP/%s',_0x337b4a['user'][_0x107a('0x38')]);_0x22c871[_0x107a('0x2b')][_0x107a('0x6c')]=_0x22c871[_0x107a('0x6c')];_0x22c871['message'][_0x107a('0x6d')]=_0x107a('0x5a');return respondWithRpcPromise(_0x107a('0x6e'),_0x107a('0x6e'),{'event':_0x107a('0x6f'),'message':_0x22c871[_0x107a('0x2b')]},client9002)[_0x107a('0x22')](function(){return _0x22c871;});}return _0x22c871;}return null;})[_0x107a('0x22')](respondWithResult(_0x189f57,null))['catch'](handleError(_0x189f57,null));};var interaction_log=require(_0x107a('0x13'))('whatsapp-interactions');exports[_0x107a('0x34')]=function(_0x33f9e7,_0x1e6572,_0x27cdc6){var _0xb43dd4={'agent':{},'channel':_0x107a('0x70')};if(_0x33f9e7[_0x107a('0x56')]['id']){delete _0x33f9e7[_0x107a('0x56')]['id'];}_0x33f9e7[_0x107a('0x56')][_0x107a('0x5e')]=_0x33f9e7[_0x107a('0x56')]['UserId']||_0x33f9e7['user']['id'];_0xb43dd4[_0x107a('0x71')]['id']=_0x33f9e7['body'][_0x107a('0x5e')];return db['WhatsappMessage'][_0x107a('0x54')]({'where':{'id':_0x33f9e7[_0x107a('0x57')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x1e6572,null))['then'](function(_0x15b54c){if(_0x15b54c){_0xb43dd4['message']=_0x15b54c[_0x107a('0x62')]({'plain':!![]});return db['WhatsappInteraction']['find']({'where':{'id':_0x15b54c[_0x107a('0x72')]}});}return null;})[_0x107a('0x22')](handleEntityNotFound(_0x1e6572,null))[_0x107a('0x22')](function(_0x5f01d4){if(_0x5f01d4){_0xb43dd4[_0x107a('0x67')]=_0x5f01d4[_0x107a('0x62')]({'plain':!![]});interaction_log[_0x107a('0x23')](_0x107a('0x73'),_0x33f9e7[_0x107a('0x5f')]['id'],_0x33f9e7[_0x107a('0x5f')][_0x107a('0x38')],_0x33f9e7[_0x107a('0x5f')][_0x107a('0x68')],_0xb43dd4[_0x107a('0x67')]['id'],_0x33f9e7[_0x107a('0x56')]?JSON[_0x107a('0x28')](_0x33f9e7[_0x107a('0x56')]):_0x107a('0x69'));return respondWithRpcPromise(_0x107a('0x74'),_0x107a('0x75'),_0xb43dd4);}return null;})['then'](function(_0xe9fd8){if(_0xe9fd8){_0xe9fd8['message'][_0x107a('0x76')]=util[_0x107a('0x66')](_0x107a('0x77'),_0x33f9e7[_0x107a('0x5f')][_0x107a('0x38')]);_0xe9fd8[_0x107a('0x2b')][_0x107a('0x6c')]=_0xb43dd4[_0x107a('0x6c')];_0xe9fd8[_0x107a('0x2b')][_0x107a('0x6d')]=_0x107a('0x34');respondWithRpcPromise(_0x107a('0x6e'),_0x107a('0x6e'),{'event':_0x107a('0x78'),'message':_0xe9fd8[_0x107a('0x2b')]},client9002);return _0xb43dd4;}return null;})[_0x107a('0x22')](respondWithResult(_0x1e6572,null))[_0x107a('0x2c')](handleError(_0x1e6572,null));};exports[_0x107a('0x2e')]=function(_0x14a210,_0x198a6a,_0x124e24){if(_0x14a210[_0x107a('0x56')]['id']){delete _0x14a210['body']['id'];}var _0x54f959;return db[_0x107a('0x3b')][_0x107a('0x54')]({'where':{'id':_0x14a210['params']['id']}})[_0x107a('0x22')](handleEntityNotFound(_0x198a6a,null))[_0x107a('0x22')](function(_0x43e737){if(_0x43e737){_0x54f959=_0x43e737;return db[_0x107a('0x79')]['find']({'where':{'id':_0x43e737[_0x107a('0x7a')]}});}})[_0x107a('0x22')](handleEntityNotFound(_0x198a6a,null))[_0x107a('0x22')](function(_0x5bdb4f){if(_0x5bdb4f){logger['debug'](_0x107a('0x7b'),_0x107a('0x2e'),_0x107a('0x7c'),_0x5bdb4f['type'],util[_0x107a('0x7d')](_0x14a210['body'],{'showHidden':![],'depth':null}));switch(_0x5bdb4f['type']){case _0x107a('0x7e'):if(_0x14a210['body'][_0x107a('0x7f')]&&_0x14a210['body'][_0x107a('0x7f')]===_0x54f959[_0x107a('0x80')]&&_0x14a210[_0x107a('0x56')][_0x107a('0x81')]&&_0x14a210['body'][_0x107a('0x81')]===_0x107a('0x5b')){return _0x54f959['update']({'read':!![]});}else{logger[_0x107a('0x29')](_0x107a('0x82'),_0x107a('0x2e'),_0x107a('0x7e'),util[_0x107a('0x7d')](_0x14a210[_0x107a('0x56')],{'showHidden':![],'depth':null}));}break;}return _0x54f959;}})[_0x107a('0x22')](respondWithResult(_0x198a6a,null))[_0x107a('0x2c')](handleError(_0x198a6a,null));};
\ No newline at end of file
diff --git a/server/api/whatsappMessage/whatsappMessage.events.js b/server/api/whatsappMessage/whatsappMessage.events.js
index 5bdfdee..80689fb 100644
--- a/server/api/whatsappMessage/whatsappMessage.events.js
+++ b/server/api/whatsappMessage/whatsappMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f2f=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappMessage','setMaxListeners','save','update'];(function(_0x3e4d14,_0x2155fa){var _0x43fc99=function(_0x3bd452){while(--_0x3bd452){_0x3e4d14['push'](_0x3e4d14['shift']());}};_0x43fc99(++_0x2155fa);}(_0x5f2f,0x73));var _0xf5f2=function(_0x7fd75e,_0x238d72){_0x7fd75e=_0x7fd75e-0x0;var _0x4c1317=_0x5f2f[_0x7fd75e];return _0x4c1317;};'use strict';var EventEmitter=require(_0xf5f2('0x0'));var WhatsappMessage=require(_0xf5f2('0x1'))['db'][_0xf5f2('0x2')];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents[_0xf5f2('0x3')](0x0);var events={'afterCreate':_0xf5f2('0x4'),'afterUpdate':_0xf5f2('0x5'),'afterDestroy':_0xf5f2('0x6')};function emitEvent(_0x107cf){return function(_0x501fbd,_0x4854b6,_0x1665c7){WhatsappMessageEvents[_0xf5f2('0x7')](_0x107cf+':'+_0x501fbd['id'],_0x501fbd);WhatsappMessageEvents[_0xf5f2('0x7')](_0x107cf,_0x501fbd);_0x1665c7(null);};}for(var e in events){if(events[_0xf5f2('0x8')](e)){var event=events[e];WhatsappMessage[_0xf5f2('0x9')](e,emitEvent(event));}}module[_0xf5f2('0xa')]=WhatsappMessageEvents;
\ No newline at end of file
+var _0x5f2f=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappMessage','setMaxListeners','save','update'];(function(_0xae8143,_0x21eb52){var _0x4d65f4=function(_0x3b5c1d){while(--_0x3b5c1d){_0xae8143['push'](_0xae8143['shift']());}};_0x4d65f4(++_0x21eb52);}(_0x5f2f,0x73));var _0xf5f2=function(_0x58f678,_0x18b3cc){_0x58f678=_0x58f678-0x0;var _0x238aef=_0x5f2f[_0x58f678];return _0x238aef;};'use strict';var EventEmitter=require(_0xf5f2('0x0'));var WhatsappMessage=require(_0xf5f2('0x1'))['db'][_0xf5f2('0x2')];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents[_0xf5f2('0x3')](0x0);var events={'afterCreate':_0xf5f2('0x4'),'afterUpdate':_0xf5f2('0x5'),'afterDestroy':_0xf5f2('0x6')};function emitEvent(_0x107cf){return function(_0x501fbd,_0x4854b6,_0x1665c7){WhatsappMessageEvents[_0xf5f2('0x7')](_0x107cf+':'+_0x501fbd['id'],_0x501fbd);WhatsappMessageEvents[_0xf5f2('0x7')](_0x107cf,_0x501fbd);_0x1665c7(null);};}for(var e in events){if(events[_0xf5f2('0x8')](e)){var event=events[e];WhatsappMessage[_0xf5f2('0x9')](e,emitEvent(event));}}module[_0xf5f2('0xa')]=WhatsappMessageEvents;
\ No newline at end of file
diff --git a/server/api/whatsappMessage/whatsappMessage.model.js b/server/api/whatsappMessage/whatsappMessage.model.js
index 2a9ed6c..8fc3cde 100644
--- a/server/api/whatsappMessage/whatsappMessage.model.js
+++ b/server/api/whatsappMessage/whatsappMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb466=['utf8mb4','utf8mb4_unicode_ci','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappMessage.attributes','exports','WhatsappMessage','whatsapp_messages','messageId','fti_whatsapp_messages','body','FULLTEXT','direction','toLowerCase','out','secret','isNil','WhatsappInteraction','findOne','WhatsappInteractionId','then','update','createdAt','catch','error','WhatsappAccount','find','type','twilio','accountSid','authToken','phone','create','whatsapp:','remote','/api/whatsapp/messages/','/status?token=','token','sid','WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken'];(function(_0x1c12e4,_0x7ea559){var _0x47fb5a=function(_0x52c224){while(--_0x52c224){_0x1c12e4['push'](_0x1c12e4['shift']());}};_0x47fb5a(++_0x7ea559);}(_0xb466,0x182));var _0x6b46=function(_0x318b46,_0x2bccbc){_0x318b46=_0x318b46-0x0;var _0x227a3f=_0xb466[_0x318b46];return _0x227a3f;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x6b46('0x0'));var moment=require(_0x6b46('0x1'));var BPromise=require(_0x6b46('0x2'));var rp=require(_0x6b46('0x3'));var fs=require('fs');var path=require(_0x6b46('0x4'));var rimraf=require(_0x6b46('0x5'));var config=require(_0x6b46('0x6'));var attributes=require(_0x6b46('0x7'));module[_0x6b46('0x8')]=function(_0x5c9c3c,_0x39ee31){return _0x5c9c3c['define'](_0x6b46('0x9'),attributes,{'tableName':_0x6b46('0xa'),'paranoid':![],'indexes':[{'name':_0x6b46('0xb'),'fields':[_0x6b46('0xb')]},{'name':_0x6b46('0xc'),'fields':[_0x6b46('0xd')],'type':_0x6b46('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0xf3d0a,_0x297848,_0x13ee0a){var _0x39a0ef=_0x5c9c3c['models'];var _0x4615d6=_0xf3d0a['get']({'plain':!![]});if(_0x4615d6[_0x6b46('0xf')]['toLowerCase']()==='in'||_0x4615d6[_0x6b46('0xf')][_0x6b46('0x10')]()===_0x6b46('0x11')&&!_0x4615d6[_0x6b46('0x12')]&&!_[_0x6b46('0x13')](_0x4615d6['UserId'])){_0x39a0ef[_0x6b46('0x14')][_0x6b46('0x15')]({'where':{'id':_0x4615d6[_0x6b46('0x16')]}})[_0x6b46('0x17')](function(_0x9bf111){if(_0x9bf111){_0x9bf111[_0x6b46('0x18')]({'lastMsgAt':_0x4615d6[_0x6b46('0x19')],'lastMsgDirection':_0x4615d6[_0x6b46('0xf')][_0x6b46('0x10')]()});}})[_0x6b46('0x1a')](function(_0x46fff6){console[_0x6b46('0x1b')](_0x46fff6);});}if(_0x4615d6['direction']===_0x6b46('0x11')&&!_0x4615d6[_0x6b46('0x12')]){var _0x40b949;_0x39a0ef[_0x6b46('0x1c')][_0x6b46('0x1d')]({'where':{'id':_0x4615d6['WhatsappAccountId']},'raw':!![]})[_0x6b46('0x17')](function(_0x9ba260){_0x40b949=_0x9ba260;if(_0x40b949&&_0x40b949[_0x6b46('0x1e')]){switch(_0x40b949[_0x6b46('0x1e')]){case _0x6b46('0x1f'):var _0x726ffa=require(_0x6b46('0x1f'));if(_0x40b949[_0x6b46('0x20')]&&_0x40b949[_0x6b46('0x21')]&&_0x40b949[_0x6b46('0x22')]){var _0x53f5b8=new _0x726ffa(_0x40b949[_0x6b46('0x20')],_0x40b949[_0x6b46('0x21')]);_0x53f5b8['messages'][_0x6b46('0x23')]({'body':_0x4615d6[_0x6b46('0xd')],'to':_0x6b46('0x24')+_0x4615d6[_0x6b46('0x22')],'from':'whatsapp:'+_0x40b949[_0x6b46('0x22')],'statusCallback':_0x40b949[_0x6b46('0x25')]+_0x6b46('0x26')+_0x4615d6['id']+_0x6b46('0x27')+_0x40b949[_0x6b46('0x28')]})[_0x6b46('0x17')](function(_0x511258){if(_0x511258[_0x6b46('0x29')]){return _0xf3d0a[_0x6b46('0x18')]({'messageId':_0x511258['sid']});}})[_0x6b46('0x1a')](function(_0x3c7c23){logger[_0x6b46('0x1b')](_0x6b46('0x2a'),_0x6b46('0x2b'),'twilio',util[_0x6b46('0x2c')](_0x3c7c23,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x6b46('0x2a'),_0x6b46('0x2b'),'twilio',_0x6b46('0x2d'));}break;}}})['finally'](function(){_0x13ee0a();});}else{_0x13ee0a();}}},'charset':_0x6b46('0x2e'),'collate':_0x6b46('0x2f')});};
\ No newline at end of file
+var _0xcae6=['twilio','accountSid','authToken','create','whatsapp:','phone','remote','/status?token=','token','sid','update','WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','path','rimraf','../../config/environment','exports','define','WhatsappMessage','messageId','fti_whatsapp_messages','body','FULLTEXT','get','direction','toLowerCase','secret','isNil','UserId','WhatsappInteraction','findOne','then','createdAt','catch','error','out','find','type'];(function(_0x2a0183,_0x3fc93c){var _0x158c3a=function(_0x57a903){while(--_0x57a903){_0x2a0183['push'](_0x2a0183['shift']());}};_0x158c3a(++_0x3fc93c);}(_0xcae6,0x124));var _0x6cae=function(_0x65c50e,_0x1aa926){_0x65c50e=_0x65c50e-0x0;var _0x4573e7=_0xcae6[_0x65c50e];return _0x4573e7;};'use strict';var _=require(_0x6cae('0x0'));var util=require(_0x6cae('0x1'));var logger=require('../../config/logger')(_0x6cae('0x2'));var moment=require(_0x6cae('0x3'));var BPromise=require(_0x6cae('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6cae('0x5'));var rimraf=require(_0x6cae('0x6'));var config=require(_0x6cae('0x7'));var attributes=require('./whatsappMessage.attributes');module[_0x6cae('0x8')]=function(_0x57ecca,_0x56d395){return _0x57ecca[_0x6cae('0x9')](_0x6cae('0xa'),attributes,{'tableName':'whatsapp_messages','paranoid':![],'indexes':[{'name':'messageId','fields':[_0x6cae('0xb')]},{'name':_0x6cae('0xc'),'fields':[_0x6cae('0xd')],'type':_0x6cae('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x23912a,_0x190e8b,_0x42a9c2){var _0x6c7454=_0x57ecca['models'];var _0x2b9ca2=_0x23912a[_0x6cae('0xf')]({'plain':!![]});if(_0x2b9ca2[_0x6cae('0x10')][_0x6cae('0x11')]()==='in'||_0x2b9ca2['direction']['toLowerCase']()==='out'&&!_0x2b9ca2[_0x6cae('0x12')]&&!_[_0x6cae('0x13')](_0x2b9ca2[_0x6cae('0x14')])){_0x6c7454[_0x6cae('0x15')][_0x6cae('0x16')]({'where':{'id':_0x2b9ca2['WhatsappInteractionId']}})[_0x6cae('0x17')](function(_0x2996e8){if(_0x2996e8){_0x2996e8['update']({'lastMsgAt':_0x2b9ca2[_0x6cae('0x18')],'lastMsgDirection':_0x2b9ca2[_0x6cae('0x10')]['toLowerCase']()});}})[_0x6cae('0x19')](function(_0x439db7){console[_0x6cae('0x1a')](_0x439db7);});}if(_0x2b9ca2[_0x6cae('0x10')]===_0x6cae('0x1b')&&!_0x2b9ca2['secret']){var _0x141cbe;_0x6c7454['WhatsappAccount'][_0x6cae('0x1c')]({'where':{'id':_0x2b9ca2['WhatsappAccountId']},'raw':!![]})[_0x6cae('0x17')](function(_0x481c51){_0x141cbe=_0x481c51;if(_0x141cbe&&_0x141cbe[_0x6cae('0x1d')]){switch(_0x141cbe[_0x6cae('0x1d')]){case'twilio':var _0x57c5dd=require(_0x6cae('0x1e'));if(_0x141cbe[_0x6cae('0x1f')]&&_0x141cbe[_0x6cae('0x20')]&&_0x141cbe['phone']){var _0x1251bd=new _0x57c5dd(_0x141cbe[_0x6cae('0x1f')],_0x141cbe['authToken']);_0x1251bd['messages'][_0x6cae('0x21')]({'body':_0x2b9ca2[_0x6cae('0xd')],'to':_0x6cae('0x22')+_0x2b9ca2[_0x6cae('0x23')],'from':'whatsapp:'+_0x141cbe['phone'],'statusCallback':_0x141cbe[_0x6cae('0x24')]+'/api/whatsapp/messages/'+_0x2b9ca2['id']+_0x6cae('0x25')+_0x141cbe[_0x6cae('0x26')]})[_0x6cae('0x17')](function(_0x40afce){if(_0x40afce[_0x6cae('0x27')]){return _0x23912a[_0x6cae('0x28')]({'messageId':_0x40afce[_0x6cae('0x27')]});}})[_0x6cae('0x19')](function(_0x26d83a){logger['error'](_0x6cae('0x29'),'afterCreate',_0x6cae('0x1e'),util['inspect'](_0x26d83a,{'showHidden':![],'depth':null}));});}else{logger[_0x6cae('0x1a')](_0x6cae('0x29'),_0x6cae('0x2a'),'twilio','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;}}})[_0x6cae('0x2b')](function(){_0x42a9c2();});}else{_0x42a9c2();}}},'charset':_0x6cae('0x2c'),'collate':_0x6cae('0x2d')});};
\ No newline at end of file
diff --git a/server/api/whatsappMessage/whatsappMessage.rpc.js b/server/api/whatsappMessage/whatsappMessage.rpc.js
index 478a7b8..a1a4648 100644
--- a/server/api/whatsappMessage/whatsappMessage.rpc.js
+++ b/server/api/whatsappMessage/whatsappMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd003=['../../config/environment','client','http','redis','defaults','./whatsappMessage.socket','request','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','CreateWhatsappMessage','WhatsappMessage','options','raw','stringify','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x26a911,_0x5af7af){var _0x53f3c9=function(_0x495e81){while(--_0x495e81){_0x26a911['push'](_0x26a911['shift']());}};_0x53f3c9(++_0x5af7af);}(_0xd003,0x16c));var _0x3d00=function(_0x488fc6,_0x362d94){_0x488fc6=_0x488fc6-0x0;var _0x2dad83=_0xd003[_0x488fc6];return _0x2dad83;};'use strict';var _=require(_0x3d00('0x0'));var util=require(_0x3d00('0x1'));var moment=require('moment');var BPromise=require(_0x3d00('0x2'));var rs=require(_0x3d00('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3d00('0x4'))['db'];var utils=require(_0x3d00('0x5'));var logger=require(_0x3d00('0x6'))(_0x3d00('0x7'));var config=require(_0x3d00('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x3d00('0x9')][_0x3d00('0xa')]({'port':0x232a});config[_0x3d00('0xb')]=_[_0x3d00('0xc')](config[_0x3d00('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3d00('0xb')]));require(_0x3d00('0xd'))['register'](socket);function respondWithRpcPromise(_0x1e6021,_0x45b064,_0x3ddc80){return new BPromise(function(_0x4fb338,_0x3670d8){return client[_0x3d00('0xe')](_0x1e6021,_0x3ddc80)[_0x3d00('0xf')](function(_0x4b3961){logger[_0x3d00('0x10')](_0x3d00('0x11'),_0x45b064,_0x3d00('0x12'));logger[_0x3d00('0x13')](_0x3d00('0x14'),_0x45b064,_0x3d00('0x12'),JSON['stringify'](_0x4b3961));if(_0x4b3961['error']){if(_0x4b3961[_0x3d00('0x15')][_0x3d00('0x16')]===0x1f4){logger['error'](_0x3d00('0x11'),_0x45b064,_0x4b3961['error']['message']);return _0x3670d8(_0x4b3961['error']['message']);}logger[_0x3d00('0x15')](_0x3d00('0x11'),_0x45b064,_0x4b3961[_0x3d00('0x15')][_0x3d00('0x17')]);return _0x4fb338(_0x4b3961[_0x3d00('0x15')][_0x3d00('0x17')]);}else{logger[_0x3d00('0x10')]('WhatsappMessage,\x20%s,\x20%s',_0x45b064,_0x3d00('0x12'));_0x4fb338(_0x4b3961[_0x3d00('0x18')]['message']);}})['catch'](function(_0x574bdb){logger['error']('WhatsappMessage,\x20%s,\x20%s',_0x45b064,_0x574bdb);_0x3670d8(_0x574bdb);});});}exports[_0x3d00('0x19')]=function(_0x132802){var _0x1036f8=this;return new Promise(function(_0x2110b7,_0x56e655){return db[_0x3d00('0x1a')]['create'](_0x132802['body'],{'raw':_0x132802[_0x3d00('0x1b')]?_0x132802[_0x3d00('0x1b')][_0x3d00('0x1c')]===undefined?!![]:![]:!![]})[_0x3d00('0xf')](function(_0x556473){logger[_0x3d00('0x10')](_0x3d00('0x19'),_0x132802);logger[_0x3d00('0x13')]('CreateWhatsappMessage',_0x132802,JSON[_0x3d00('0x1d')](_0x556473));_0x2110b7(_0x556473);})[_0x3d00('0x1e')](function(_0x38ae20){logger[_0x3d00('0x15')](_0x3d00('0x19'),_0x38ae20[_0x3d00('0x17')],_0x132802);_0x56e655(_0x1036f8[_0x3d00('0x15')](0x1f4,_0x38ae20[_0x3d00('0x17')]));});});};
\ No newline at end of file
+var _0xe2d0=['options','stringify','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','./whatsappMessage.socket','register','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','CreateWhatsappMessage','create','body'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xe2d0,0x1a3));var _0x0e2d=function(_0x2e27c5,_0x34b2ed){_0x2e27c5=_0x2e27c5-0x0;var _0x3cf88a=_0xe2d0[_0x2e27c5];return _0x3cf88a;};'use strict';var _=require(_0x0e2d('0x0'));var util=require(_0x0e2d('0x1'));var moment=require(_0x0e2d('0x2'));var BPromise=require(_0x0e2d('0x3'));var rs=require(_0x0e2d('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0e2d('0x5'))['db'];var utils=require(_0x0e2d('0x6'));var logger=require(_0x0e2d('0x7'))(_0x0e2d('0x8'));var config=require(_0x0e2d('0x9'));var jayson=require(_0x0e2d('0xa'));var client=jayson[_0x0e2d('0xb')][_0x0e2d('0xc')]({'port':0x232a});config[_0x0e2d('0xd')]=_['defaults'](config[_0x0e2d('0xd')],{'host':_0x0e2d('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0e2d('0xd')]));require(_0x0e2d('0xf'))[_0x0e2d('0x10')](socket);function respondWithRpcPromise(_0x1ea79a,_0x135574,_0x324d85){return new BPromise(function(_0x57ae71,_0x320810){return client['request'](_0x1ea79a,_0x324d85)[_0x0e2d('0x11')](function(_0x244b38){logger[_0x0e2d('0x12')](_0x0e2d('0x13'),_0x135574,_0x0e2d('0x14'));logger[_0x0e2d('0x15')]('WhatsappMessage,\x20%s,\x20%s,\x20%s',_0x135574,_0x0e2d('0x14'),JSON['stringify'](_0x244b38));if(_0x244b38[_0x0e2d('0x16')]){if(_0x244b38['error'][_0x0e2d('0x17')]===0x1f4){logger[_0x0e2d('0x16')]('WhatsappMessage,\x20%s,\x20%s',_0x135574,_0x244b38[_0x0e2d('0x16')][_0x0e2d('0x18')]);return _0x320810(_0x244b38['error'][_0x0e2d('0x18')]);}logger[_0x0e2d('0x16')](_0x0e2d('0x13'),_0x135574,_0x244b38[_0x0e2d('0x16')]['message']);return _0x57ae71(_0x244b38['error'][_0x0e2d('0x18')]);}else{logger[_0x0e2d('0x12')](_0x0e2d('0x13'),_0x135574,_0x0e2d('0x14'));_0x57ae71(_0x244b38[_0x0e2d('0x19')][_0x0e2d('0x18')]);}})['catch'](function(_0x506450){logger[_0x0e2d('0x16')]('WhatsappMessage,\x20%s,\x20%s',_0x135574,_0x506450);_0x320810(_0x506450);});});}exports[_0x0e2d('0x1a')]=function(_0x35100e){var _0x3e0a02=this;return new Promise(function(_0x27a027,_0x40c13e){return db['WhatsappMessage'][_0x0e2d('0x1b')](_0x35100e[_0x0e2d('0x1c')],{'raw':_0x35100e[_0x0e2d('0x1d')]?_0x35100e[_0x0e2d('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0x0e2d('0x11')](function(_0x44f98e){logger['info'](_0x0e2d('0x1a'),_0x35100e);logger[_0x0e2d('0x15')](_0x0e2d('0x1a'),_0x35100e,JSON[_0x0e2d('0x1e')](_0x44f98e));_0x27a027(_0x44f98e);})[_0x0e2d('0x1f')](function(_0x33546d){logger[_0x0e2d('0x16')]('CreateWhatsappMessage',_0x33546d[_0x0e2d('0x18')],_0x35100e);_0x40c13e(_0x3e0a02['error'](0x1f4,_0x33546d[_0x0e2d('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/whatsappMessage/whatsappMessage.socket.js b/server/api/whatsappMessage/whatsappMessage.socket.js
index 310bdea..7e410d5 100644
--- a/server/api/whatsappMessage/whatsappMessage.socket.js
+++ b/server/api/whatsappMessage/whatsappMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8628=['save','emit','removeListener','register','length','whatsappMessage:'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x8628,0xf0));var _0x8862=function(_0x585d36,_0xa31c34){_0x585d36=_0x585d36-0x0;var _0x28b0ac=_0x8628[_0x585d36];return _0x28b0ac;};'use strict';var WhatsappMessageEvents=require('./whatsappMessage.events');var events=[_0x8862('0x0'),'remove','update'];function createListener(_0x3f3718,_0x2cb26f){return function(_0x3fc6b8){_0x2cb26f[_0x8862('0x1')](_0x3f3718,_0x3fc6b8);};}function removeListener(_0x10f039,_0x171695){return function(){WhatsappMessageEvents[_0x8862('0x2')](_0x10f039,_0x171695);};}exports[_0x8862('0x3')]=function(_0x4e011d){for(var _0x5bd6fd=0x0,_0x1e702f=events[_0x8862('0x4')];_0x5bd6fd<_0x1e702f;_0x5bd6fd++){var _0x7a8b4e=events[_0x5bd6fd];var _0x3b5875=createListener(_0x8862('0x5')+_0x7a8b4e,_0x4e011d);WhatsappMessageEvents['on'](_0x7a8b4e,_0x3b5875);}};
\ No newline at end of file
+var _0xab98=['remove','update','emit','removeListener','register','length','whatsappMessage:','./whatsappMessage.events','save'];(function(_0x1cc9c9,_0x9c9690){var _0x2eefba=function(_0x4ba4b4){while(--_0x4ba4b4){_0x1cc9c9['push'](_0x1cc9c9['shift']());}};_0x2eefba(++_0x9c9690);}(_0xab98,0x1c0));var _0x8ab9=function(_0x145ac7,_0x34f629){_0x145ac7=_0x145ac7-0x0;var _0xdd8ab3=_0xab98[_0x145ac7];return _0xdd8ab3;};'use strict';var WhatsappMessageEvents=require(_0x8ab9('0x0'));var events=[_0x8ab9('0x1'),_0x8ab9('0x2'),_0x8ab9('0x3')];function createListener(_0x1196a9,_0x1c0bf1){return function(_0x8692ac){_0x1c0bf1[_0x8ab9('0x4')](_0x1196a9,_0x8692ac);};}function removeListener(_0x516ebe,_0x4b6071){return function(){WhatsappMessageEvents[_0x8ab9('0x5')](_0x516ebe,_0x4b6071);};}exports[_0x8ab9('0x6')]=function(_0x47942e){for(var _0x3b321a=0x0,_0x1c9db7=events[_0x8ab9('0x7')];_0x3b321a<_0x1c9db7;_0x3b321a++){var _0x4e99ac=events[_0x3b321a];var _0x6dd0fd=createListener(_0x8ab9('0x8')+_0x4e99ac,_0x47942e);WhatsappMessageEvents['on'](_0x4e99ac,_0x6dd0fd);}};
\ No newline at end of file
diff --git a/server/api/whatsappQueue/index.js b/server/api/whatsappQueue/index.js
index 59e06ce..c35704a 100644
--- a/server/api/whatsappQueue/index.js
+++ b/server/api/whatsappQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9003=['removeAgents','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members','getMembers','/:id/teams','/:id/users','getAgents','post','create','addAgents','put','update','delete'];(function(_0x21353c,_0x2ea587){var _0xa99120=function(_0x557f33){while(--_0x557f33){_0x21353c['push'](_0x21353c['shift']());}};_0xa99120(++_0x2ea587);}(_0x9003,0x110));var _0x3900=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x9003[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0x3900('0x0'));var util=require(_0x3900('0x1'));var path=require(_0x3900('0x2'));var timeout=require(_0x3900('0x3'));var express=require(_0x3900('0x4'));var router=express[_0x3900('0x5')]();var auth=require(_0x3900('0x6'));var interaction=require(_0x3900('0x7'));var config=require(_0x3900('0x8'));var controller=require(_0x3900('0x9'));router[_0x3900('0xa')]('/',auth[_0x3900('0xb')](),controller[_0x3900('0xc')]);router[_0x3900('0xa')](_0x3900('0xd'),auth['isAuthenticated'](),controller[_0x3900('0xe')]);router[_0x3900('0xa')](_0x3900('0xf'),auth[_0x3900('0xb')](),controller[_0x3900('0x10')]);router['get'](_0x3900('0x11'),auth[_0x3900('0xb')](),controller[_0x3900('0x12')]);router[_0x3900('0xa')](_0x3900('0x13'),auth[_0x3900('0xb')](),controller['getTeams']);router[_0x3900('0xa')](_0x3900('0x14'),auth[_0x3900('0xb')](),controller[_0x3900('0x15')]);router[_0x3900('0x16')]('/',auth[_0x3900('0xb')](),controller[_0x3900('0x17')]);router[_0x3900('0x16')]('/:id/teams',auth[_0x3900('0xb')](),controller['addTeams']);router[_0x3900('0x16')]('/:id/users',auth['isAuthenticated'](),controller[_0x3900('0x18')]);router[_0x3900('0x19')](_0x3900('0xf'),auth[_0x3900('0xb')](),controller[_0x3900('0x1a')]);router['delete'](_0x3900('0xf'),auth['isAuthenticated'](),controller['destroy']);router[_0x3900('0x1b')](_0x3900('0x13'),auth[_0x3900('0xb')](),controller['removeTeams']);router[_0x3900('0x1b')](_0x3900('0x14'),auth['isAuthenticated'](),controller[_0x3900('0x1c')]);module[_0x3900('0x1d')]=router;
\ No newline at end of file
+var _0x6d70=['show','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','addTeams','addAgents','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','./whatsappQueue.controller','get','isAuthenticated','/describe','describe','/:id'];(function(_0x2afacc,_0x3f7f54){var _0x5df7f=function(_0x46f775){while(--_0x46f775){_0x2afacc['push'](_0x2afacc['shift']());}};_0x5df7f(++_0x3f7f54);}(_0x6d70,0xe7));var _0x06d7=function(_0xda6c79,_0x33d237){_0xda6c79=_0xda6c79-0x0;var _0x37d374=_0x6d70[_0xda6c79];return _0x37d374;};'use strict';var multer=require(_0x06d7('0x0'));var util=require(_0x06d7('0x1'));var path=require(_0x06d7('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x06d7('0x3')]();var auth=require(_0x06d7('0x4'));var interaction=require(_0x06d7('0x5'));var config=require('../../config/environment');var controller=require(_0x06d7('0x6'));router[_0x06d7('0x7')]('/',auth[_0x06d7('0x8')](),controller['index']);router[_0x06d7('0x7')](_0x06d7('0x9'),auth[_0x06d7('0x8')](),controller[_0x06d7('0xa')]);router[_0x06d7('0x7')](_0x06d7('0xb'),auth['isAuthenticated'](),controller[_0x06d7('0xc')]);router[_0x06d7('0x7')]('/:id/members',auth[_0x06d7('0x8')](),controller[_0x06d7('0xd')]);router[_0x06d7('0x7')](_0x06d7('0xe'),auth[_0x06d7('0x8')](),controller[_0x06d7('0xf')]);router[_0x06d7('0x7')](_0x06d7('0x10'),auth[_0x06d7('0x8')](),controller[_0x06d7('0x11')]);router[_0x06d7('0x12')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/teams',auth['isAuthenticated'](),controller[_0x06d7('0x13')]);router[_0x06d7('0x12')](_0x06d7('0x10'),auth[_0x06d7('0x8')](),controller[_0x06d7('0x14')]);router['put'](_0x06d7('0xb'),auth['isAuthenticated'](),controller[_0x06d7('0x15')]);router[_0x06d7('0x16')](_0x06d7('0xb'),auth[_0x06d7('0x8')](),controller[_0x06d7('0x17')]);router[_0x06d7('0x16')](_0x06d7('0xe'),auth[_0x06d7('0x8')](),controller[_0x06d7('0x18')]);router['delete']('/:id/users',auth['isAuthenticated'](),controller[_0x06d7('0x19')]);module[_0x06d7('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/whatsappQueue/whatsappQueue.attributes.js b/server/api/whatsappQueue/whatsappQueue.attributes.js
index 9e59364..7ee31c2 100644
--- a/server/api/whatsappQueue/whatsappQueue.attributes.js
+++ b/server/api/whatsappQueue/whatsappQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1ed3=['rrmemory','roundrobin','STRING','sequelize','exports','name','INTEGER','ENUM'];(function(_0x3d4407,_0x2735be){var _0x5ea719=function(_0x549c4b){while(--_0x549c4b){_0x3d4407['push'](_0x3d4407['shift']());}};_0x5ea719(++_0x2735be);}(_0x1ed3,0x6b));var _0x31ed=function(_0x3dc538,_0x4f7702){_0x3dc538=_0x3dc538-0x0;var _0x72c2fd=_0x1ed3[_0x3dc538];return _0x72c2fd;};'use strict';var Sequelize=require(_0x31ed('0x0'));module[_0x31ed('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x31ed('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize[_0x31ed('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x31ed('0x4')](_0x31ed('0x5'),'beepall',_0x31ed('0x6'))},'description':{'type':Sequelize[_0x31ed('0x7')]}};
\ No newline at end of file
+var _0x323c=['beepall','STRING','sequelize','exports','name','INTEGER','rrmemory'];(function(_0x9b884b,_0x42a726){var _0x22593c=function(_0x58dcd1){while(--_0x58dcd1){_0x9b884b['push'](_0x9b884b['shift']());}};_0x22593c(++_0x42a726);}(_0x323c,0x1de));var _0xc323=function(_0x2c753c,_0x3378e7){_0x2c753c=_0x2c753c-0x0;var _0x23ba20=_0x323c[_0x2c753c];return _0x23ba20;};'use strict';var Sequelize=require(_0xc323('0x0'));module[_0xc323('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xc323('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize[_0xc323('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0xc323('0x4'),_0xc323('0x5'),'roundrobin')},'description':{'type':Sequelize[_0xc323('0x6')]}};
\ No newline at end of file
diff --git a/server/api/whatsappQueue/whatsappQueue.controller.js b/server/api/whatsappQueue/whatsappQueue.controller.js
index 7b9144d..1738b56 100644
--- a/server/api/whatsappQueue/whatsappQueue.controller.js
+++ b/server/api/whatsappQueue/whatsappQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbee2=['WhatsappQueue','rawAttributes','fieldName','key','model','map','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','pick','filter','where','merge','type','includeAll','include','rows','catch','show','params','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','describe','getMembers','findOne','UserWhatsappQueue','nolimit','WhatsappQueueId','findAll','User','findAndCountAll','agent','whatsappPause','updatedAt','createdAt','format','%s/%s','SIP','Team','getTeams','addTeams','ids','Agents','online','interface','flatMap','transaction','each','findOrCreate','forEach','emit','removeTeams','select','field','tq.TeamId','from','team_has_whatsapp_queues','join','ut.TeamId\x20=\x20tq.TeamId','WhatsappQueueId\x20=\x20?','clone','sequelize','QueryTypes','SELECT','every','TeamId','compact','value','removeAgents','userWhatsappQueue:remove','omit','userWhatsappQueue:save','isArray','getAgents','html-pdf','eml-format','rimraf','request-promise','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','redis','defaults','localhost','./whatsappQueue.socket','register','sendStatus','end','status','count','offset','limit','json','apply','reject','save','update','then','destroy','get','UserProfileResource','error','stack','name','index'];(function(_0x3491c8,_0x53691d){var _0x541bb6=function(_0x186b1d){while(--_0x186b1d){_0x3491c8['push'](_0x3491c8['shift']());}};_0x541bb6(++_0x53691d);}(_0xbee2,0x1e0));var _0x2bee=function(_0x454cbd,_0x436d19){_0x454cbd=_0x454cbd-0x0;var _0x45b4bf=_0xbee2[_0x454cbd];return _0x45b4bf;};'use strict';var pdf=require(_0x2bee('0x0'));var emlformat=require(_0x2bee('0x1'));var rimraf=require(_0x2bee('0x2'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x2bee('0x3'));var moment=require('moment');var BPromise=require(_0x2bee('0x4'));var Mustache=require('mustache');var util=require(_0x2bee('0x5'));var path=require('path');var sox=require(_0x2bee('0x6'));var csv=require(_0x2bee('0x7'));var ejs=require(_0x2bee('0x8'));var fs=require('fs');var _=require(_0x2bee('0x9'));var squel=require(_0x2bee('0xa'));var crypto=require(_0x2bee('0xb'));var jsforce=require(_0x2bee('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x2bee('0xd'));var Papa=require(_0x2bee('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x2bee('0xf'));var as=require(_0x2bee('0x10'));var hardwareService=require(_0x2bee('0x11'));var logger=require(_0x2bee('0x12'))(_0x2bee('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x2bee('0x14')]=_[_0x2bee('0x15')](config['redis'],{'host':_0x2bee('0x16'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2bee('0x14')]));require(_0x2bee('0x17'))[_0x2bee('0x18')](socket);function respondWithStatusCode(_0xf51bbb,_0x29cec0){_0x29cec0=_0x29cec0||0xcc;return function(_0x105794){if(_0x105794){return _0xf51bbb[_0x2bee('0x19')](_0x29cec0);}return _0xf51bbb['status'](_0x29cec0)[_0x2bee('0x1a')]();};}function respondWithResult(_0x974572,_0x31221b){_0x31221b=_0x31221b||0xc8;return function(_0x2793c1){if(_0x2793c1){return _0x974572[_0x2bee('0x1b')](_0x31221b)['json'](_0x2793c1);}};}function respondWithFilteredResult(_0x22a901,_0x3dcc73){return function(_0x5b27db){if(_0x5b27db){var _0x40945f=_0x5b27db[_0x2bee('0x1c')],_0x241e4e=_0x3dcc73[_0x2bee('0x1d')],_0x58c98b=_0x3dcc73[_0x2bee('0x1d')]+_0x3dcc73[_0x2bee('0x1e')],_0x468221;if(_0x58c98b>=_0x40945f){_0x58c98b=_0x40945f;_0x468221=0xc8;}else{_0x468221=0xce;}_0x22a901[_0x2bee('0x1b')](_0x468221);return _0x22a901['set']('Content-Range',_0x241e4e+'-'+_0x58c98b+'/'+_0x40945f)[_0x2bee('0x1f')](_0x5b27db);}return null;};}function patchUpdates(_0x23a0ae){return function(_0x3c4013){try{jsonpatch[_0x2bee('0x20')](_0x3c4013,_0x23a0ae,!![]);}catch(_0x5a4eaa){return BPromise[_0x2bee('0x21')](_0x5a4eaa);}return _0x3c4013[_0x2bee('0x22')]();};}function saveUpdates(_0x2626e0,_0x4f192d){return function(_0x14307f){if(_0x14307f){return _0x14307f[_0x2bee('0x23')](_0x2626e0)[_0x2bee('0x24')](function(_0x2f8e35){return _0x2f8e35;});}return null;};}function removeEntity(_0x3c278d,_0x1ba57c){return function(_0xab8147){if(_0xab8147){return _0xab8147[_0x2bee('0x25')]()['then'](function(){var _0x4986ff=_0xab8147[_0x2bee('0x26')]({'plain':!![]});var _0x3f59c6='WhatsappQueues';return db[_0x2bee('0x27')][_0x2bee('0x25')]({'where':{'type':_0x3f59c6,'resourceId':_0x4986ff['id']}})['then'](function(){return _0xab8147;});})['then'](function(){_0x3c278d[_0x2bee('0x1b')](0xcc)[_0x2bee('0x1a')]();});}};}function handleEntityNotFound(_0x25f5cf,_0x199e3c){return function(_0x57b850){if(!_0x57b850){_0x25f5cf[_0x2bee('0x19')](0x194);}return _0x57b850;};}function handleError(_0x22f634,_0x2f057a){_0x2f057a=_0x2f057a||0x1f4;return function(_0x5a5234){logger[_0x2bee('0x28')](_0x5a5234[_0x2bee('0x29')]);if(_0x5a5234[_0x2bee('0x2a')]){delete _0x5a5234[_0x2bee('0x2a')];}_0x22f634[_0x2bee('0x1b')](_0x2f057a)['send'](_0x5a5234);};}exports[_0x2bee('0x2b')]=function(_0x22ad87,_0x5550be){var _0x507ba2={},_0x2bd193={},_0x4e485e={'count':0x0,'rows':[]};var _0x2dfe3b=_['map'](db[_0x2bee('0x2c')][_0x2bee('0x2d')],function(_0x544f9a){return{'name':_0x544f9a[_0x2bee('0x2e')],'type':_0x544f9a['type'][_0x2bee('0x2f')]};});_0x2bd193[_0x2bee('0x30')]=_[_0x2bee('0x31')](_0x2dfe3b,'name');_0x2bd193['query']=_[_0x2bee('0x32')](_0x22ad87[_0x2bee('0x33')]);_0x2bd193[_0x2bee('0x34')]=_['intersection'](_0x2bd193[_0x2bee('0x30')],_0x2bd193[_0x2bee('0x33')]);_0x507ba2['attributes']=_[_0x2bee('0x35')](_0x2bd193[_0x2bee('0x30')],qs[_0x2bee('0x36')](_0x22ad87['query']['fields']));_0x507ba2[_0x2bee('0x37')]=_0x507ba2[_0x2bee('0x37')][_0x2bee('0x38')]?_0x507ba2[_0x2bee('0x37')]:_0x2bd193[_0x2bee('0x30')];if(!_0x22ad87['query'][_0x2bee('0x39')]('nolimit')){_0x507ba2[_0x2bee('0x1e')]=qs[_0x2bee('0x1e')](_0x22ad87['query'][_0x2bee('0x1e')]);_0x507ba2[_0x2bee('0x1d')]=qs[_0x2bee('0x1d')](_0x22ad87[_0x2bee('0x33')][_0x2bee('0x1d')]);}_0x507ba2[_0x2bee('0x3a')]=qs[_0x2bee('0x3b')](_0x22ad87[_0x2bee('0x33')][_0x2bee('0x3b')]);_0x507ba2['where']=qs['filters'](_[_0x2bee('0x3c')](_0x22ad87[_0x2bee('0x33')],_0x2bd193[_0x2bee('0x34')]),_0x2dfe3b);if(_0x22ad87['query'][_0x2bee('0x3d')]){_0x507ba2[_0x2bee('0x3e')]=_[_0x2bee('0x3f')](_0x507ba2[_0x2bee('0x3e')],{'$or':_['map'](_0x2dfe3b,function(_0x2bc638){if(_0x2bc638[_0x2bee('0x40')]!=='VIRTUAL'){var _0x40f652={};_0x40f652[_0x2bc638[_0x2bee('0x2a')]]={'$like':'%'+_0x22ad87[_0x2bee('0x33')][_0x2bee('0x3d')]+'%'};return _0x40f652;}})});}_0x507ba2=_['merge']({},_0x507ba2,_0x22ad87['options']);var _0x5c9b32={'where':_0x507ba2['where']};return db[_0x2bee('0x2c')][_0x2bee('0x1c')](_0x5c9b32)[_0x2bee('0x24')](function(_0x2c0640){_0x4e485e[_0x2bee('0x1c')]=_0x2c0640;if(_0x22ad87[_0x2bee('0x33')][_0x2bee('0x41')]){_0x507ba2[_0x2bee('0x42')]=[{'all':!![]}];}return db[_0x2bee('0x2c')]['findAll'](_0x507ba2);})[_0x2bee('0x24')](function(_0x4507fc){_0x4e485e[_0x2bee('0x43')]=_0x4507fc;return _0x4e485e;})['then'](respondWithFilteredResult(_0x5550be,_0x507ba2))[_0x2bee('0x44')](handleError(_0x5550be,null));};exports[_0x2bee('0x45')]=function(_0x229baf,_0x2b6eae){var _0x11c8d1={'raw':!![],'where':{'id':_0x229baf[_0x2bee('0x46')]['id']}},_0x40d8af={};_0x40d8af[_0x2bee('0x30')]=_['keys'](db[_0x2bee('0x2c')][_0x2bee('0x2d')]);_0x40d8af[_0x2bee('0x33')]=_[_0x2bee('0x32')](_0x229baf[_0x2bee('0x33')]);_0x40d8af[_0x2bee('0x34')]=_[_0x2bee('0x35')](_0x40d8af[_0x2bee('0x30')],_0x40d8af['query']);_0x11c8d1[_0x2bee('0x37')]=_[_0x2bee('0x35')](_0x40d8af[_0x2bee('0x30')],qs[_0x2bee('0x36')](_0x229baf[_0x2bee('0x33')]['fields']));_0x11c8d1[_0x2bee('0x37')]=_0x11c8d1[_0x2bee('0x37')][_0x2bee('0x38')]?_0x11c8d1[_0x2bee('0x37')]:_0x40d8af[_0x2bee('0x30')];if(_0x229baf[_0x2bee('0x33')][_0x2bee('0x41')]){_0x11c8d1[_0x2bee('0x42')]=[{'all':!![]}];}_0x11c8d1=_[_0x2bee('0x3f')]({},_0x11c8d1,_0x229baf[_0x2bee('0x47')]);return db['WhatsappQueue'][_0x2bee('0x48')](_0x11c8d1)['then'](handleEntityNotFound(_0x2b6eae,null))[_0x2bee('0x24')](respondWithResult(_0x2b6eae,null))[_0x2bee('0x44')](handleError(_0x2b6eae,null));};exports[_0x2bee('0x49')]=function(_0x1eddfd,_0x1cde4f){return db[_0x2bee('0x2c')]['create'](_0x1eddfd[_0x2bee('0x4a')],{})[_0x2bee('0x24')](function(_0x35e44b){var _0x87527c=_0x1eddfd[_0x2bee('0x4b')]['get']({'plain':!![]});if(!_0x87527c)throw new Error(_0x2bee('0x4c'));if(_0x87527c[_0x2bee('0x4d')]===_0x2bee('0x4b')){var _0x4cd1ff=_0x35e44b[_0x2bee('0x26')]({'plain':!![]});var _0x327f4d='WhatsappQueues';return db['UserProfileSection']['find']({'where':{'name':_0x327f4d,'userProfileId':_0x87527c[_0x2bee('0x4e')]},'raw':!![]})[_0x2bee('0x24')](function(_0x31ad8e){if(_0x31ad8e&&_0x31ad8e['autoAssociation']===0x0){return db[_0x2bee('0x27')][_0x2bee('0x49')]({'name':_0x4cd1ff[_0x2bee('0x2a')],'resourceId':_0x4cd1ff['id'],'type':_0x31ad8e[_0x2bee('0x2a')],'sectionId':_0x31ad8e['id']},{})[_0x2bee('0x24')](function(){return _0x35e44b;});}else{return _0x35e44b;}})['catch'](function(_0x2d427a){logger[_0x2bee('0x28')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2d427a);throw _0x2d427a;});}return _0x35e44b;})[_0x2bee('0x24')](respondWithResult(_0x1cde4f,0xc9))[_0x2bee('0x44')](handleError(_0x1cde4f,null));};exports[_0x2bee('0x23')]=function(_0x13e03a,_0xcccff){if(_0x13e03a[_0x2bee('0x4a')]['id']){delete _0x13e03a[_0x2bee('0x4a')]['id'];}return db['WhatsappQueue'][_0x2bee('0x48')]({'where':{'id':_0x13e03a[_0x2bee('0x46')]['id']}})[_0x2bee('0x24')](handleEntityNotFound(_0xcccff,null))[_0x2bee('0x24')](saveUpdates(_0x13e03a[_0x2bee('0x4a')],null))[_0x2bee('0x24')](respondWithResult(_0xcccff,null))[_0x2bee('0x44')](handleError(_0xcccff,null));};exports[_0x2bee('0x25')]=function(_0x165efa,_0x1792e4){return db['WhatsappQueue'][_0x2bee('0x48')]({'where':{'id':_0x165efa[_0x2bee('0x46')]['id']}})[_0x2bee('0x24')](handleEntityNotFound(_0x1792e4,null))['then'](removeEntity(_0x1792e4,null))[_0x2bee('0x44')](handleError(_0x1792e4,null));};exports['describe']=function(_0xe3ad86,_0x18108a){return db[_0x2bee('0x2c')][_0x2bee('0x4f')]()[_0x2bee('0x24')](respondWithResult(_0x18108a,null))['catch'](handleError(_0x18108a,null));};exports[_0x2bee('0x50')]=function(_0x31b764,_0x26c4b5,_0x224dfe){var _0x1805da={'raw':!![],'where':{}},_0x56be6f={},_0x11edaf;return db[_0x2bee('0x2c')][_0x2bee('0x51')]({'where':{'id':_0x31b764['params']['id']}})[_0x2bee('0x24')](handleEntityNotFound(_0x26c4b5,null))[_0x2bee('0x24')](function(_0x378b5c){if(_0x378b5c){_0x11edaf=_0x378b5c[_0x2bee('0x26')]({'plain':!![]});_0x56be6f['model']=_[_0x2bee('0x32')](db[_0x2bee('0x52')][_0x2bee('0x2d')]);_0x56be6f[_0x2bee('0x33')]=_[_0x2bee('0x32')](_0x31b764[_0x2bee('0x33')]);_0x56be6f[_0x2bee('0x34')]=_[_0x2bee('0x35')](_0x56be6f[_0x2bee('0x30')],_0x56be6f[_0x2bee('0x33')]);_0x1805da['attributes']=_['intersection'](_0x56be6f['model'],qs[_0x2bee('0x36')](_0x31b764[_0x2bee('0x33')][_0x2bee('0x36')]));_0x1805da[_0x2bee('0x37')]=_0x1805da[_0x2bee('0x37')][_0x2bee('0x38')]?_0x1805da[_0x2bee('0x37')]:_0x56be6f[_0x2bee('0x30')];if(!_0x31b764[_0x2bee('0x33')][_0x2bee('0x39')](_0x2bee('0x53'))){_0x1805da[_0x2bee('0x1e')]=qs[_0x2bee('0x1e')](_0x31b764[_0x2bee('0x33')][_0x2bee('0x1e')]);_0x1805da[_0x2bee('0x1d')]=qs[_0x2bee('0x1d')](_0x31b764[_0x2bee('0x33')]['offset']);}_0x1805da[_0x2bee('0x3a')]=qs[_0x2bee('0x3b')](_0x31b764[_0x2bee('0x33')][_0x2bee('0x3b')]);_0x1805da[_0x2bee('0x3e')]=qs[_0x2bee('0x34')](_[_0x2bee('0x3c')](_0x31b764[_0x2bee('0x33')],_0x56be6f[_0x2bee('0x34')]));_0x1805da[_0x2bee('0x3e')][_0x2bee('0x54')]=_0x378b5c['id'];if(_0x31b764[_0x2bee('0x33')][_0x2bee('0x3d')]){_0x1805da[_0x2bee('0x3e')]=_['merge'](_0x1805da[_0x2bee('0x3e')],{'$or':_['map'](_0x1805da[_0x2bee('0x37')],function(_0x4af527){var _0x3abfb5={};_0x3abfb5[_0x4af527]={'$like':'%'+_0x31b764['query'][_0x2bee('0x3d')]+'%'};return _0x3abfb5;})});}_0x1805da=_[_0x2bee('0x3f')]({},_0x1805da,_0x31b764[_0x2bee('0x47')]);return db[_0x2bee('0x52')][_0x2bee('0x55')](_0x1805da);}})[_0x2bee('0x24')](function(_0x3d64e0){if(_0x3d64e0){return db[_0x2bee('0x56')][_0x2bee('0x57')]({'where':{'id':_[_0x2bee('0x31')](_0x3d64e0,'UserId'),'role':_0x2bee('0x58')},'attributes':['id',_0x2bee('0x2a'),_0x2bee('0x59'),_0x2bee('0x5a'),_0x2bee('0x5b')]});}})[_0x2bee('0x24')](function(_0x517dc8){if(_0x517dc8){return{'count':_0x517dc8[_0x2bee('0x1c')],'rows':_[_0x2bee('0x31')](_0x517dc8[_0x2bee('0x43')],function(_0x4776b9){return{'membername':_0x4776b9[_0x2bee('0x2a')],'UserId':_0x4776b9['id'],'queue_name':_0x11edaf[_0x2bee('0x2a')],'WhatsappQueueId':_0x11edaf['id'],'interface':util[_0x2bee('0x5c')](_0x2bee('0x5d'),_0x2bee('0x5e'),_0x4776b9[_0x2bee('0x2a')]),'penalty':0x0,'paused':_0x4776b9[_0x2bee('0x59')],'createdAt':_0x4776b9['createdAt'],'updatedAt':_0x4776b9[_0x2bee('0x5a')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x2bee('0x24')](respondWithFilteredResult(_0x26c4b5,_0x1805da))[_0x2bee('0x44')](handleError(_0x26c4b5,null));};exports['getTeams']=function(_0x2c9d1b,_0x2dcc2a,_0x5e8036){var _0x565823={};var _0x47280d={};var _0x24e97e;var _0xaaeaf8;return db[_0x2bee('0x2c')][_0x2bee('0x51')]({'where':{'id':_0x2c9d1b['params']['id']}})[_0x2bee('0x24')](handleEntityNotFound(_0x2dcc2a,null))['then'](function(_0x4a65ab){if(_0x4a65ab){_0x24e97e=_0x4a65ab;_0x47280d[_0x2bee('0x30')]=_[_0x2bee('0x32')](db[_0x2bee('0x5f')][_0x2bee('0x2d')]);_0x47280d[_0x2bee('0x33')]=_[_0x2bee('0x32')](_0x2c9d1b['query']);_0x47280d[_0x2bee('0x34')]=_[_0x2bee('0x35')](_0x47280d[_0x2bee('0x30')],_0x47280d[_0x2bee('0x33')]);_0x565823[_0x2bee('0x37')]=_['intersection'](_0x47280d['model'],qs[_0x2bee('0x36')](_0x2c9d1b[_0x2bee('0x33')][_0x2bee('0x36')]));_0x565823['attributes']=_0x565823[_0x2bee('0x37')][_0x2bee('0x38')]?_0x565823[_0x2bee('0x37')]:_0x47280d[_0x2bee('0x30')];_0x565823[_0x2bee('0x3a')]=qs[_0x2bee('0x3b')](_0x2c9d1b[_0x2bee('0x33')][_0x2bee('0x3b')]);_0x565823[_0x2bee('0x3e')]=qs[_0x2bee('0x34')](_[_0x2bee('0x3c')](_0x2c9d1b[_0x2bee('0x33')],_0x47280d['filters']));if(_0x2c9d1b[_0x2bee('0x33')][_0x2bee('0x3d')]){_0x565823['where']=_['merge'](_0x565823['where'],{'$or':_[_0x2bee('0x31')](_0x565823[_0x2bee('0x37')],function(_0x3394bc){var _0x2ba08c={};_0x2ba08c[_0x3394bc]={'$like':'%'+_0x2c9d1b['query'][_0x2bee('0x3d')]+'%'};return _0x2ba08c;})});}_0x565823=_[_0x2bee('0x3f')]({},_0x565823,_0x2c9d1b[_0x2bee('0x47')]);return _0x24e97e['getTeams'](_0x565823);}})['then'](function(_0x3b32c8){if(_0x3b32c8){_0xaaeaf8=_0x3b32c8[_0x2bee('0x38')];if(!_0x2c9d1b['query'][_0x2bee('0x39')]('nolimit')){_0x565823[_0x2bee('0x1e')]=qs['limit'](_0x2c9d1b[_0x2bee('0x33')]['limit']);_0x565823[_0x2bee('0x1d')]=qs[_0x2bee('0x1d')](_0x2c9d1b['query'][_0x2bee('0x1d')]);}return _0x24e97e[_0x2bee('0x60')](_0x565823);}})['then'](function(_0x44b1b4){if(_0x44b1b4){return _0x44b1b4?{'count':_0xaaeaf8,'rows':_0x44b1b4}:null;}})[_0x2bee('0x24')](respondWithResult(_0x2dcc2a,null))['catch'](handleError(_0x2dcc2a,null));};exports[_0x2bee('0x61')]=function(_0x2bdc47,_0x13d650,_0x44bca4){var _0x2ac7ed=_0x2bdc47['body'][_0x2bee('0x62')];return db[_0x2bee('0x5f')][_0x2bee('0x55')]({'where':{'id':_0x2ac7ed},'attributes':['id'],'include':[{'model':db[_0x2bee('0x56')],'as':_0x2bee('0x63'),'attributes':['id',_0x2bee('0x2a'),_0x2bee('0x64'),'voicePause',_0x2bee('0x65')],'raw':!![]}]})[_0x2bee('0x24')](function(_0x4697f8){if(_0x4697f8){var _0x484bd8=_[_0x2bee('0x66')](_0x4697f8,function(_0x196008){var _0x28f06a=_0x196008[_0x2bee('0x26')]({'plain':!![]});return _0x28f06a[_0x2bee('0x63')];});return db[_0x2bee('0x2c')][_0x2bee('0x48')]({'where':{'id':_0x2bdc47[_0x2bee('0x46')]['id']}})[_0x2bee('0x24')](function(_0x259d24){return db['sequelize'][_0x2bee('0x67')](function(_0x2bb9cb){return _0x259d24['addTeams'](_0x2ac7ed,{'transaction':_0x2bb9cb})['then'](function(){return BPromise[_0x2bee('0x68')](_0x484bd8,function(_0x156c90){return db[_0x2bee('0x52')][_0x2bee('0x69')]({'where':{'UserId':_0x156c90['id'],'WhatsappQueueId':_0x2bdc47[_0x2bee('0x46')]['id']},'transaction':_0x2bb9cb});});})[_0x2bee('0x24')](function(){_0x484bd8[_0x2bee('0x6a')](function(_0x259f0d){socket[_0x2bee('0x6b')]('userWhatsappQueue:save',{'UserId':_0x259f0d['id'],'WhatsappQueueId':_0x259d24['id']});});});});});}})['then'](respondWithStatusCode(_0x13d650,null))[_0x2bee('0x44')](handleError(_0x13d650,null));};exports[_0x2bee('0x6c')]=function(_0x435d87,_0x29a6d3,_0x4a9070){return db[_0x2bee('0x5f')]['findAll']({'where':{'id':_0x435d87[_0x2bee('0x33')][_0x2bee('0x62')]},'attributes':['id'],'include':[{'model':db[_0x2bee('0x56')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x2bee('0x24')](handleEntityNotFound(_0x29a6d3,null))[_0x2bee('0x24')](function(_0x3d44bf){var _0x3c6214=_[_0x2bee('0x31')](_0x3d44bf,'id');var _0x4e3308=[];var _0x502e1a=[];var _0xae5d3d=squel[_0x2bee('0x6d')]();_0xae5d3d[_0x2bee('0x6e')](_0x2bee('0x6f'))[_0x2bee('0x70')](_0x2bee('0x71'),'tq')[_0x2bee('0x72')]('user_has_teams','ut',_0x2bee('0x73'))[_0x2bee('0x3e')](_0x2bee('0x74'),_0x435d87['params']['id']);for(var _0x5112b4=0x0;_0x5112b4<_0x3d44bf['length'];_0x5112b4+=0x1){let _0x1395d7=_0x3d44bf[_0x5112b4];for(var _0xfc023b=0x0;_0xfc023b<_0x1395d7[_0x2bee('0x63')][_0x2bee('0x38')];_0xfc023b+=0x1){let _0x450f94=_0x1395d7[_0x2bee('0x63')][_0xfc023b];var _0x1a203a=_0xae5d3d[_0x2bee('0x75')]();_0x1a203a[_0x2bee('0x3e')]('ut.UserId\x20=\x20?',_0x450f94['id']);_0x502e1a['push'](db['sequelize'][_0x2bee('0x33')](_0x1a203a['toString'](),{'type':db[_0x2bee('0x76')][_0x2bee('0x77')][_0x2bee('0x78')]})['then'](function(_0x1df232){if(_0x1df232['length']===0x1){return _0x450f94['id'];}else{var _0x1ec22b=_[_0x2bee('0x79')](_['map'](_0x1df232,_0x2bee('0x7a')),function(_0x50704c){return _['includes'](_0x3c6214,_0x50704c);});if(_0x1ec22b){return _0x450f94['id'];}}}));}}return BPromise['all'](_0x502e1a)[_0x2bee('0x24')](function(_0x25254e){_0x4e3308=_(_0x4e3308)['union'](_0x25254e)[_0x2bee('0x7b')]()[_0x2bee('0x7c')]();return db[_0x2bee('0x2c')][_0x2bee('0x48')]({'where':{'id':_0x435d87[_0x2bee('0x46')]['id']}})[_0x2bee('0x24')](function(_0x213c9f){return db['sequelize'][_0x2bee('0x67')](function(_0x1a6d51){return _0x213c9f[_0x2bee('0x6c')](_0x435d87[_0x2bee('0x33')][_0x2bee('0x62')],{'transaction':_0x1a6d51})[_0x2bee('0x24')](function(){if(!_['isEmpty'](_0x4e3308)){return _0x213c9f[_0x2bee('0x7d')](_0x4e3308,{'transaction':_0x1a6d51});}})[_0x2bee('0x24')](function(){_0x4e3308[_0x2bee('0x6a')](function(_0x337d99){socket[_0x2bee('0x6b')](_0x2bee('0x7e'),{'UserId':_0x337d99,'WhatsappQueueId':_0x213c9f['id']});});});});});});})[_0x2bee('0x24')](respondWithStatusCode(_0x29a6d3,null))[_0x2bee('0x44')](handleError(_0x29a6d3,null));};exports['addAgents']=function(_0x52e38d,_0x34f9c3,_0x495fce){return db[_0x2bee('0x2c')][_0x2bee('0x48')]({'where':{'id':_0x52e38d['params']['id']}})[_0x2bee('0x24')](handleEntityNotFound(_0x34f9c3,null))[_0x2bee('0x24')](function(_0x51ff9d){if(_0x51ff9d){return _0x51ff9d['addAgents'](_0x52e38d[_0x2bee('0x4a')]['ids'],_[_0x2bee('0x7f')](_0x52e38d[_0x2bee('0x4a')],[_0x2bee('0x62'),'id'])||{})['spread'](function(_0x536be2){for(var _0x4ac153=0x0;_0x4ac153<_0x52e38d[_0x2bee('0x4a')][_0x2bee('0x62')]['length'];_0x4ac153+=0x1){socket[_0x2bee('0x6b')](_0x2bee('0x80'),{'UserId':_0x52e38d[_0x2bee('0x4a')][_0x2bee('0x62')][_0x4ac153],'WhatsappQueueId':_0x52e38d[_0x2bee('0x46')]['id']});}return _0x536be2;});}})[_0x2bee('0x24')](respondWithResult(_0x34f9c3,null))['catch'](handleError(_0x34f9c3,null));};exports[_0x2bee('0x7d')]=function(_0x4777c8,_0x1535dc,_0x1e3cbc){return db[_0x2bee('0x2c')]['find']({'where':{'id':_0x4777c8['params']['id']}})['then'](handleEntityNotFound(_0x1535dc,null))[_0x2bee('0x24')](function(_0x201a1c){if(_0x201a1c){return _0x201a1c[_0x2bee('0x7d')](_0x4777c8[_0x2bee('0x33')][_0x2bee('0x62')])[_0x2bee('0x24')](function(){if(_[_0x2bee('0x81')](_0x4777c8['query']['ids'])){for(var _0x484349=0x0;_0x484349<_0x4777c8[_0x2bee('0x33')][_0x2bee('0x62')][_0x2bee('0x38')];_0x484349+=0x1){socket[_0x2bee('0x6b')](_0x2bee('0x7e'),{'UserId':Number(_0x4777c8[_0x2bee('0x33')]['ids'][_0x484349]),'WhatsappQueueId':Number(_0x4777c8[_0x2bee('0x46')]['id'])});}}else{socket[_0x2bee('0x6b')](_0x2bee('0x7e'),{'UserId':Number(_0x4777c8['query'][_0x2bee('0x62')]),'WhatsappQueueId':Number(_0x4777c8[_0x2bee('0x46')]['id'])});}});}})[_0x2bee('0x24')](respondWithStatusCode(_0x1535dc,null))[_0x2bee('0x44')](handleError(_0x1535dc,null));};exports[_0x2bee('0x82')]=function(_0x10fab2,_0x5a7083,_0x5ae8cb){var _0x25aae8={};var _0x13c387={};var _0x319cca;var _0x2e08e2;return db['WhatsappQueue'][_0x2bee('0x51')]({'where':{'id':_0x10fab2[_0x2bee('0x46')]['id']}})[_0x2bee('0x24')](handleEntityNotFound(_0x5a7083,null))['then'](function(_0x592967){if(_0x592967){_0x319cca=_0x592967;_0x13c387[_0x2bee('0x30')]=_[_0x2bee('0x32')](db[_0x2bee('0x56')]['rawAttributes']);_0x13c387[_0x2bee('0x33')]=_[_0x2bee('0x32')](_0x10fab2[_0x2bee('0x33')]);_0x13c387[_0x2bee('0x34')]=_['intersection'](_0x13c387['model'],_0x13c387[_0x2bee('0x33')]);_0x25aae8['attributes']=_[_0x2bee('0x35')](_0x13c387['model'],qs[_0x2bee('0x36')](_0x10fab2[_0x2bee('0x33')]['fields']));_0x25aae8[_0x2bee('0x37')]=_0x25aae8[_0x2bee('0x37')]['length']?_0x25aae8['attributes']:_0x13c387['model'];_0x25aae8[_0x2bee('0x3a')]=qs[_0x2bee('0x3b')](_0x10fab2['query'][_0x2bee('0x3b')]);_0x25aae8[_0x2bee('0x3e')]=qs[_0x2bee('0x34')](_[_0x2bee('0x3c')](_0x10fab2[_0x2bee('0x33')],_0x13c387[_0x2bee('0x34')]));if(_0x10fab2[_0x2bee('0x33')][_0x2bee('0x3d')]){_0x25aae8[_0x2bee('0x3e')]=_[_0x2bee('0x3f')](_0x25aae8['where'],{'$or':_[_0x2bee('0x31')](_0x25aae8[_0x2bee('0x37')],function(_0x186300){var _0x24ea31={};_0x24ea31[_0x186300]={'$like':'%'+_0x10fab2[_0x2bee('0x33')]['filter']+'%'};return _0x24ea31;})});}_0x25aae8=_[_0x2bee('0x3f')]({},_0x25aae8,_0x10fab2['options']);return _0x319cca[_0x2bee('0x82')](_0x25aae8);}})[_0x2bee('0x24')](function(_0x1504cf){if(_0x1504cf){_0x2e08e2=_0x1504cf[_0x2bee('0x38')];if(!_0x10fab2[_0x2bee('0x33')][_0x2bee('0x39')](_0x2bee('0x53'))){_0x25aae8[_0x2bee('0x1e')]=qs['limit'](_0x10fab2[_0x2bee('0x33')]['limit']);_0x25aae8[_0x2bee('0x1d')]=qs[_0x2bee('0x1d')](_0x10fab2[_0x2bee('0x33')]['offset']);}return _0x319cca[_0x2bee('0x82')](_0x25aae8);}})['then'](function(_0x40479a){if(_0x40479a){return _0x40479a?{'count':_0x2e08e2,'rows':_0x40479a}:null;}})[_0x2bee('0x24')](respondWithResult(_0x5a7083,null))[_0x2bee('0x44')](handleError(_0x5a7083,null));};
\ No newline at end of file
+var _0x6b4a=['getTeams','Team','addTeams','ids','User','online','flatMap','sequelize','transaction','each','findOrCreate','removeTeams','Agents','select','tq.TeamId','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','WhatsappQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value','isEmpty','removeAgents','addAgents','omit','emit','userWhatsappQueue:save','isArray','userWhatsappQueue:remove','getAgents','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./whatsappQueue.socket','register','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','reject','update','then','destroy','get','WhatsappQueues','UserProfileResource','error','stack','name','send','index','map','WhatsappQueue','fieldName','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','length','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserWhatsappQueue','findAndCountAll','UserId','updatedAt','createdAt','format','%s/%s','SIP','whatsappPause'];(function(_0x5053ff,_0x3fb835){var _0x2d4f6c=function(_0x5a6323){while(--_0x5a6323){_0x5053ff['push'](_0x5053ff['shift']());}};_0x2d4f6c(++_0x3fb835);}(_0x6b4a,0x147));var _0xa6b4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6b4a[_0x3dd15e];return _0x231fd0;};'use strict';var pdf=require(_0xa6b4('0x0'));var emlformat=require(_0xa6b4('0x1'));var rimraf=require(_0xa6b4('0x2'));var zipdir=require(_0xa6b4('0x3'));var jsonpatch=require(_0xa6b4('0x4'));var rp=require('request-promise');var moment=require(_0xa6b4('0x5'));var BPromise=require(_0xa6b4('0x6'));var Mustache=require('mustache');var util=require(_0xa6b4('0x7'));var path=require(_0xa6b4('0x8'));var sox=require('sox');var csv=require(_0xa6b4('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require(_0xa6b4('0xa'));var squel=require(_0xa6b4('0xb'));var crypto=require(_0xa6b4('0xc'));var jsforce=require(_0xa6b4('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xa6b4('0xe'));var Papa=require(_0xa6b4('0xf'));var Redis=require(_0xa6b4('0x10'));var authService=require(_0xa6b4('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xa6b4('0x12'));var hardwareService=require(_0xa6b4('0x13'));var logger=require(_0xa6b4('0x14'))(_0xa6b4('0x15'));var utils=require(_0xa6b4('0x16'));var config=require(_0xa6b4('0x17'));var db=require(_0xa6b4('0x18'))['db'];config['redis']=_['defaults'](config[_0xa6b4('0x19')],{'host':_0xa6b4('0x1a'),'port':0x18eb});var socket=require(_0xa6b4('0x1b'))(new Redis(config[_0xa6b4('0x19')]));require(_0xa6b4('0x1c'))[_0xa6b4('0x1d')](socket);function respondWithStatusCode(_0x55b6ec,_0x4c9944){_0x4c9944=_0x4c9944||0xcc;return function(_0x5bdb6d){if(_0x5bdb6d){return _0x55b6ec[_0xa6b4('0x1e')](_0x4c9944);}return _0x55b6ec[_0xa6b4('0x1f')](_0x4c9944)[_0xa6b4('0x20')]();};}function respondWithResult(_0x101068,_0x3d666c){_0x3d666c=_0x3d666c||0xc8;return function(_0x4a24fe){if(_0x4a24fe){return _0x101068[_0xa6b4('0x1f')](_0x3d666c)[_0xa6b4('0x21')](_0x4a24fe);}};}function respondWithFilteredResult(_0x3dfd7b,_0x16f53c){return function(_0x1e9a2f){if(_0x1e9a2f){var _0x290db6=_0x1e9a2f[_0xa6b4('0x22')],_0x5157e6=_0x16f53c[_0xa6b4('0x23')],_0x5438b6=_0x16f53c[_0xa6b4('0x23')]+_0x16f53c[_0xa6b4('0x24')],_0x1d0d9b;if(_0x5438b6>=_0x290db6){_0x5438b6=_0x290db6;_0x1d0d9b=0xc8;}else{_0x1d0d9b=0xce;}_0x3dfd7b[_0xa6b4('0x1f')](_0x1d0d9b);return _0x3dfd7b[_0xa6b4('0x25')](_0xa6b4('0x26'),_0x5157e6+'-'+_0x5438b6+'/'+_0x290db6)[_0xa6b4('0x21')](_0x1e9a2f);}return null;};}function patchUpdates(_0x170f10){return function(_0x21685a){try{jsonpatch[_0xa6b4('0x27')](_0x21685a,_0x170f10,!![]);}catch(_0x3f9dd3){return BPromise[_0xa6b4('0x28')](_0x3f9dd3);}return _0x21685a['save']();};}function saveUpdates(_0x5cfdcb,_0x1acaae){return function(_0x100124){if(_0x100124){return _0x100124[_0xa6b4('0x29')](_0x5cfdcb)[_0xa6b4('0x2a')](function(_0x5a76fb){return _0x5a76fb;});}return null;};}function removeEntity(_0x4277ce,_0x272996){return function(_0x2026a2){if(_0x2026a2){return _0x2026a2[_0xa6b4('0x2b')]()[_0xa6b4('0x2a')](function(){var _0x211f0a=_0x2026a2[_0xa6b4('0x2c')]({'plain':!![]});var _0x10ddf0=_0xa6b4('0x2d');return db[_0xa6b4('0x2e')][_0xa6b4('0x2b')]({'where':{'type':_0x10ddf0,'resourceId':_0x211f0a['id']}})[_0xa6b4('0x2a')](function(){return _0x2026a2;});})[_0xa6b4('0x2a')](function(){_0x4277ce[_0xa6b4('0x1f')](0xcc)[_0xa6b4('0x20')]();});}};}function handleEntityNotFound(_0x3781de,_0x150e54){return function(_0x3b7565){if(!_0x3b7565){_0x3781de[_0xa6b4('0x1e')](0x194);}return _0x3b7565;};}function handleError(_0x404f64,_0x3fe0dd){_0x3fe0dd=_0x3fe0dd||0x1f4;return function(_0x341cde){logger[_0xa6b4('0x2f')](_0x341cde[_0xa6b4('0x30')]);if(_0x341cde[_0xa6b4('0x31')]){delete _0x341cde[_0xa6b4('0x31')];}_0x404f64[_0xa6b4('0x1f')](_0x3fe0dd)[_0xa6b4('0x32')](_0x341cde);};}exports[_0xa6b4('0x33')]=function(_0x5df8a4,_0x423a2c){var _0x33ecac={},_0x2d7a65={},_0x5e9a8a={'count':0x0,'rows':[]};var _0x47ca5b=_[_0xa6b4('0x34')](db[_0xa6b4('0x35')]['rawAttributes'],function(_0x1fc27a){return{'name':_0x1fc27a[_0xa6b4('0x36')],'type':_0x1fc27a[_0xa6b4('0x37')][_0xa6b4('0x38')]};});_0x2d7a65[_0xa6b4('0x39')]=_['map'](_0x47ca5b,'name');_0x2d7a65['query']=_['keys'](_0x5df8a4[_0xa6b4('0x3a')]);_0x2d7a65[_0xa6b4('0x3b')]=_[_0xa6b4('0x3c')](_0x2d7a65['model'],_0x2d7a65['query']);_0x33ecac[_0xa6b4('0x3d')]=_[_0xa6b4('0x3c')](_0x2d7a65['model'],qs['fields'](_0x5df8a4['query'][_0xa6b4('0x3e')]));_0x33ecac['attributes']=_0x33ecac[_0xa6b4('0x3d')]['length']?_0x33ecac[_0xa6b4('0x3d')]:_0x2d7a65[_0xa6b4('0x39')];if(!_0x5df8a4['query'][_0xa6b4('0x3f')](_0xa6b4('0x40'))){_0x33ecac['limit']=qs[_0xa6b4('0x24')](_0x5df8a4[_0xa6b4('0x3a')][_0xa6b4('0x24')]);_0x33ecac[_0xa6b4('0x23')]=qs[_0xa6b4('0x23')](_0x5df8a4[_0xa6b4('0x3a')]['offset']);}_0x33ecac[_0xa6b4('0x41')]=qs[_0xa6b4('0x42')](_0x5df8a4[_0xa6b4('0x3a')][_0xa6b4('0x42')]);_0x33ecac[_0xa6b4('0x43')]=qs[_0xa6b4('0x3b')](_[_0xa6b4('0x44')](_0x5df8a4['query'],_0x2d7a65[_0xa6b4('0x3b')]),_0x47ca5b);if(_0x5df8a4[_0xa6b4('0x3a')][_0xa6b4('0x45')]){_0x33ecac[_0xa6b4('0x43')]=_[_0xa6b4('0x46')](_0x33ecac[_0xa6b4('0x43')],{'$or':_['map'](_0x47ca5b,function(_0x2924a0){if(_0x2924a0[_0xa6b4('0x37')]!==_0xa6b4('0x47')){var _0x4f2321={};_0x4f2321[_0x2924a0[_0xa6b4('0x31')]]={'$like':'%'+_0x5df8a4['query']['filter']+'%'};return _0x4f2321;}})});}_0x33ecac=_[_0xa6b4('0x46')]({},_0x33ecac,_0x5df8a4[_0xa6b4('0x48')]);var _0x1d8c33={'where':_0x33ecac[_0xa6b4('0x43')]};return db[_0xa6b4('0x35')]['count'](_0x1d8c33)[_0xa6b4('0x2a')](function(_0x46b80b){_0x5e9a8a[_0xa6b4('0x22')]=_0x46b80b;if(_0x5df8a4['query'][_0xa6b4('0x49')]){_0x33ecac[_0xa6b4('0x4a')]=[{'all':!![]}];}return db[_0xa6b4('0x35')][_0xa6b4('0x4b')](_0x33ecac);})[_0xa6b4('0x2a')](function(_0x41d55a){_0x5e9a8a[_0xa6b4('0x4c')]=_0x41d55a;return _0x5e9a8a;})['then'](respondWithFilteredResult(_0x423a2c,_0x33ecac))[_0xa6b4('0x4d')](handleError(_0x423a2c,null));};exports[_0xa6b4('0x4e')]=function(_0x12a8fa,_0x2527a9){var _0xfb7aa5={'raw':!![],'where':{'id':_0x12a8fa[_0xa6b4('0x4f')]['id']}},_0x4f7c0e={};_0x4f7c0e[_0xa6b4('0x39')]=_[_0xa6b4('0x50')](db[_0xa6b4('0x35')][_0xa6b4('0x51')]);_0x4f7c0e[_0xa6b4('0x3a')]=_[_0xa6b4('0x50')](_0x12a8fa['query']);_0x4f7c0e[_0xa6b4('0x3b')]=_[_0xa6b4('0x3c')](_0x4f7c0e[_0xa6b4('0x39')],_0x4f7c0e[_0xa6b4('0x3a')]);_0xfb7aa5[_0xa6b4('0x3d')]=_[_0xa6b4('0x3c')](_0x4f7c0e['model'],qs[_0xa6b4('0x3e')](_0x12a8fa[_0xa6b4('0x3a')][_0xa6b4('0x3e')]));_0xfb7aa5[_0xa6b4('0x3d')]=_0xfb7aa5[_0xa6b4('0x3d')][_0xa6b4('0x52')]?_0xfb7aa5['attributes']:_0x4f7c0e['model'];if(_0x12a8fa['query'][_0xa6b4('0x49')]){_0xfb7aa5[_0xa6b4('0x4a')]=[{'all':!![]}];}_0xfb7aa5=_[_0xa6b4('0x46')]({},_0xfb7aa5,_0x12a8fa['options']);return db['WhatsappQueue'][_0xa6b4('0x53')](_0xfb7aa5)['then'](handleEntityNotFound(_0x2527a9,null))[_0xa6b4('0x2a')](respondWithResult(_0x2527a9,null))[_0xa6b4('0x4d')](handleError(_0x2527a9,null));};exports['create']=function(_0x353f1a,_0x1a9442){return db[_0xa6b4('0x35')]['create'](_0x353f1a[_0xa6b4('0x54')],{})[_0xa6b4('0x2a')](function(_0x3cef91){var _0x2cb265=_0x353f1a[_0xa6b4('0x55')][_0xa6b4('0x2c')]({'plain':!![]});if(!_0x2cb265)throw new Error(_0xa6b4('0x56'));if(_0x2cb265[_0xa6b4('0x57')]===_0xa6b4('0x55')){var _0x3b3e39=_0x3cef91[_0xa6b4('0x2c')]({'plain':!![]});var _0x1c2d5d=_0xa6b4('0x2d');return db['UserProfileSection'][_0xa6b4('0x53')]({'where':{'name':_0x1c2d5d,'userProfileId':_0x2cb265[_0xa6b4('0x58')]},'raw':!![]})[_0xa6b4('0x2a')](function(_0x45a2f4){if(_0x45a2f4&&_0x45a2f4['autoAssociation']===0x0){return db[_0xa6b4('0x2e')]['create']({'name':_0x3b3e39['name'],'resourceId':_0x3b3e39['id'],'type':_0x45a2f4[_0xa6b4('0x31')],'sectionId':_0x45a2f4['id']},{})[_0xa6b4('0x2a')](function(){return _0x3cef91;});}else{return _0x3cef91;}})[_0xa6b4('0x4d')](function(_0xc2eae7){logger[_0xa6b4('0x2f')](_0xa6b4('0x59'),_0xc2eae7);throw _0xc2eae7;});}return _0x3cef91;})[_0xa6b4('0x2a')](respondWithResult(_0x1a9442,0xc9))[_0xa6b4('0x4d')](handleError(_0x1a9442,null));};exports['update']=function(_0x36e202,_0x2bc7c7){if(_0x36e202['body']['id']){delete _0x36e202[_0xa6b4('0x54')]['id'];}return db[_0xa6b4('0x35')][_0xa6b4('0x53')]({'where':{'id':_0x36e202['params']['id']}})[_0xa6b4('0x2a')](handleEntityNotFound(_0x2bc7c7,null))[_0xa6b4('0x2a')](saveUpdates(_0x36e202[_0xa6b4('0x54')],null))[_0xa6b4('0x2a')](respondWithResult(_0x2bc7c7,null))[_0xa6b4('0x4d')](handleError(_0x2bc7c7,null));};exports['destroy']=function(_0x43786d,_0x2cff8f){return db[_0xa6b4('0x35')][_0xa6b4('0x53')]({'where':{'id':_0x43786d[_0xa6b4('0x4f')]['id']}})[_0xa6b4('0x2a')](handleEntityNotFound(_0x2cff8f,null))['then'](removeEntity(_0x2cff8f,null))['catch'](handleError(_0x2cff8f,null));};exports['describe']=function(_0x1808fb,_0x10a608){return db[_0xa6b4('0x35')][_0xa6b4('0x5a')]()['then'](respondWithResult(_0x10a608,null))[_0xa6b4('0x4d')](handleError(_0x10a608,null));};exports[_0xa6b4('0x5b')]=function(_0x347d64,_0x48f465,_0x48ad81){var _0x4a576e={'raw':!![],'where':{}},_0x2c9d41={},_0x3152ea;return db['WhatsappQueue'][_0xa6b4('0x5c')]({'where':{'id':_0x347d64[_0xa6b4('0x4f')]['id']}})[_0xa6b4('0x2a')](handleEntityNotFound(_0x48f465,null))['then'](function(_0x56b0e1){if(_0x56b0e1){_0x3152ea=_0x56b0e1[_0xa6b4('0x2c')]({'plain':!![]});_0x2c9d41['model']=_[_0xa6b4('0x50')](db[_0xa6b4('0x5d')][_0xa6b4('0x51')]);_0x2c9d41[_0xa6b4('0x3a')]=_[_0xa6b4('0x50')](_0x347d64[_0xa6b4('0x3a')]);_0x2c9d41[_0xa6b4('0x3b')]=_[_0xa6b4('0x3c')](_0x2c9d41['model'],_0x2c9d41[_0xa6b4('0x3a')]);_0x4a576e[_0xa6b4('0x3d')]=_[_0xa6b4('0x3c')](_0x2c9d41['model'],qs[_0xa6b4('0x3e')](_0x347d64[_0xa6b4('0x3a')]['fields']));_0x4a576e[_0xa6b4('0x3d')]=_0x4a576e[_0xa6b4('0x3d')][_0xa6b4('0x52')]?_0x4a576e['attributes']:_0x2c9d41[_0xa6b4('0x39')];if(!_0x347d64[_0xa6b4('0x3a')][_0xa6b4('0x3f')](_0xa6b4('0x40'))){_0x4a576e[_0xa6b4('0x24')]=qs[_0xa6b4('0x24')](_0x347d64['query'][_0xa6b4('0x24')]);_0x4a576e[_0xa6b4('0x23')]=qs[_0xa6b4('0x23')](_0x347d64['query']['offset']);}_0x4a576e['order']=qs['sort'](_0x347d64['query']['sort']);_0x4a576e['where']=qs[_0xa6b4('0x3b')](_[_0xa6b4('0x44')](_0x347d64[_0xa6b4('0x3a')],_0x2c9d41[_0xa6b4('0x3b')]));_0x4a576e[_0xa6b4('0x43')]['WhatsappQueueId']=_0x56b0e1['id'];if(_0x347d64[_0xa6b4('0x3a')][_0xa6b4('0x45')]){_0x4a576e[_0xa6b4('0x43')]=_['merge'](_0x4a576e['where'],{'$or':_[_0xa6b4('0x34')](_0x4a576e[_0xa6b4('0x3d')],function(_0x4a2c25){var _0x15bb3b={};_0x15bb3b[_0x4a2c25]={'$like':'%'+_0x347d64[_0xa6b4('0x3a')][_0xa6b4('0x45')]+'%'};return _0x15bb3b;})});}_0x4a576e=_[_0xa6b4('0x46')]({},_0x4a576e,_0x347d64['options']);return db[_0xa6b4('0x5d')][_0xa6b4('0x4b')](_0x4a576e);}})[_0xa6b4('0x2a')](function(_0x4874c5){if(_0x4874c5){return db['User'][_0xa6b4('0x5e')]({'where':{'id':_[_0xa6b4('0x34')](_0x4874c5,_0xa6b4('0x5f')),'role':'agent'},'attributes':['id','name','whatsappPause',_0xa6b4('0x60'),_0xa6b4('0x61')]});}})[_0xa6b4('0x2a')](function(_0x417a68){if(_0x417a68){return{'count':_0x417a68['count'],'rows':_['map'](_0x417a68['rows'],function(_0x302191){return{'membername':_0x302191['name'],'UserId':_0x302191['id'],'queue_name':_0x3152ea[_0xa6b4('0x31')],'WhatsappQueueId':_0x3152ea['id'],'interface':util[_0xa6b4('0x62')](_0xa6b4('0x63'),_0xa6b4('0x64'),_0x302191[_0xa6b4('0x31')]),'penalty':0x0,'paused':_0x302191[_0xa6b4('0x65')],'createdAt':_0x302191[_0xa6b4('0x61')],'updatedAt':_0x302191[_0xa6b4('0x60')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xa6b4('0x2a')](respondWithFilteredResult(_0x48f465,_0x4a576e))[_0xa6b4('0x4d')](handleError(_0x48f465,null));};exports[_0xa6b4('0x66')]=function(_0xb80652,_0x13e697,_0x3a78bb){var _0x4c0aef={};var _0x3d55d8={};var _0x52aa35;var _0x511f57;return db[_0xa6b4('0x35')][_0xa6b4('0x5c')]({'where':{'id':_0xb80652[_0xa6b4('0x4f')]['id']}})['then'](handleEntityNotFound(_0x13e697,null))[_0xa6b4('0x2a')](function(_0x7c5f2a){if(_0x7c5f2a){_0x52aa35=_0x7c5f2a;_0x3d55d8['model']=_[_0xa6b4('0x50')](db[_0xa6b4('0x67')][_0xa6b4('0x51')]);_0x3d55d8[_0xa6b4('0x3a')]=_[_0xa6b4('0x50')](_0xb80652[_0xa6b4('0x3a')]);_0x3d55d8[_0xa6b4('0x3b')]=_[_0xa6b4('0x3c')](_0x3d55d8[_0xa6b4('0x39')],_0x3d55d8['query']);_0x4c0aef[_0xa6b4('0x3d')]=_[_0xa6b4('0x3c')](_0x3d55d8['model'],qs[_0xa6b4('0x3e')](_0xb80652['query'][_0xa6b4('0x3e')]));_0x4c0aef[_0xa6b4('0x3d')]=_0x4c0aef[_0xa6b4('0x3d')][_0xa6b4('0x52')]?_0x4c0aef[_0xa6b4('0x3d')]:_0x3d55d8[_0xa6b4('0x39')];_0x4c0aef['order']=qs[_0xa6b4('0x42')](_0xb80652[_0xa6b4('0x3a')][_0xa6b4('0x42')]);_0x4c0aef[_0xa6b4('0x43')]=qs[_0xa6b4('0x3b')](_['pick'](_0xb80652[_0xa6b4('0x3a')],_0x3d55d8[_0xa6b4('0x3b')]));if(_0xb80652[_0xa6b4('0x3a')][_0xa6b4('0x45')]){_0x4c0aef[_0xa6b4('0x43')]=_[_0xa6b4('0x46')](_0x4c0aef[_0xa6b4('0x43')],{'$or':_[_0xa6b4('0x34')](_0x4c0aef[_0xa6b4('0x3d')],function(_0x2a2f72){var _0x3af6a6={};_0x3af6a6[_0x2a2f72]={'$like':'%'+_0xb80652['query'][_0xa6b4('0x45')]+'%'};return _0x3af6a6;})});}_0x4c0aef=_[_0xa6b4('0x46')]({},_0x4c0aef,_0xb80652[_0xa6b4('0x48')]);return _0x52aa35['getTeams'](_0x4c0aef);}})[_0xa6b4('0x2a')](function(_0x3c8e58){if(_0x3c8e58){_0x511f57=_0x3c8e58[_0xa6b4('0x52')];if(!_0xb80652[_0xa6b4('0x3a')][_0xa6b4('0x3f')](_0xa6b4('0x40'))){_0x4c0aef['limit']=qs[_0xa6b4('0x24')](_0xb80652[_0xa6b4('0x3a')][_0xa6b4('0x24')]);_0x4c0aef[_0xa6b4('0x23')]=qs['offset'](_0xb80652[_0xa6b4('0x3a')][_0xa6b4('0x23')]);}return _0x52aa35[_0xa6b4('0x66')](_0x4c0aef);}})[_0xa6b4('0x2a')](function(_0x39a8de){if(_0x39a8de){return _0x39a8de?{'count':_0x511f57,'rows':_0x39a8de}:null;}})[_0xa6b4('0x2a')](respondWithResult(_0x13e697,null))[_0xa6b4('0x4d')](handleError(_0x13e697,null));};exports[_0xa6b4('0x68')]=function(_0x52203a,_0x395df7,_0x6ee1fa){var _0x13327a=_0x52203a[_0xa6b4('0x54')][_0xa6b4('0x69')];return db[_0xa6b4('0x67')][_0xa6b4('0x4b')]({'where':{'id':_0x13327a},'attributes':['id'],'include':[{'model':db[_0xa6b4('0x6a')],'as':'Agents','attributes':['id',_0xa6b4('0x31'),_0xa6b4('0x6b'),'voicePause','interface'],'raw':!![]}]})[_0xa6b4('0x2a')](function(_0x5291d8){if(_0x5291d8){var _0x553984=_[_0xa6b4('0x6c')](_0x5291d8,function(_0xa06813){var _0x6e09ba=_0xa06813[_0xa6b4('0x2c')]({'plain':!![]});return _0x6e09ba['Agents'];});return db[_0xa6b4('0x35')]['find']({'where':{'id':_0x52203a[_0xa6b4('0x4f')]['id']}})[_0xa6b4('0x2a')](function(_0x9ed271){return db[_0xa6b4('0x6d')][_0xa6b4('0x6e')](function(_0x717ed0){return _0x9ed271[_0xa6b4('0x68')](_0x13327a,{'transaction':_0x717ed0})[_0xa6b4('0x2a')](function(){return BPromise[_0xa6b4('0x6f')](_0x553984,function(_0xb8c926){return db['UserWhatsappQueue'][_0xa6b4('0x70')]({'where':{'UserId':_0xb8c926['id'],'WhatsappQueueId':_0x52203a['params']['id']},'transaction':_0x717ed0});});})[_0xa6b4('0x2a')](function(){_0x553984['forEach'](function(_0x2185dc){socket['emit']('userWhatsappQueue:save',{'UserId':_0x2185dc['id'],'WhatsappQueueId':_0x9ed271['id']});});});});});}})[_0xa6b4('0x2a')](respondWithStatusCode(_0x395df7,null))[_0xa6b4('0x4d')](handleError(_0x395df7,null));};exports[_0xa6b4('0x71')]=function(_0x48955f,_0x56c9c1,_0x26e6c4){return db[_0xa6b4('0x67')]['findAll']({'where':{'id':_0x48955f[_0xa6b4('0x3a')][_0xa6b4('0x69')]},'attributes':['id'],'include':[{'model':db[_0xa6b4('0x6a')],'as':_0xa6b4('0x72'),'attributes':['id'],'raw':!![]}]})[_0xa6b4('0x2a')](handleEntityNotFound(_0x56c9c1,null))[_0xa6b4('0x2a')](function(_0x359a28){var _0x417fa7=_[_0xa6b4('0x34')](_0x359a28,'id');var _0x1de1f1=[];var _0x58bc46=[];var _0x1338e0=squel[_0xa6b4('0x73')]();_0x1338e0['field'](_0xa6b4('0x74'))[_0xa6b4('0x75')]('team_has_whatsapp_queues','tq')[_0xa6b4('0x76')](_0xa6b4('0x77'),'ut',_0xa6b4('0x78'))[_0xa6b4('0x43')](_0xa6b4('0x79'),_0x48955f[_0xa6b4('0x4f')]['id']);for(var _0x31d8d9=0x0;_0x31d8d9<_0x359a28['length'];_0x31d8d9+=0x1){let _0x5b6d91=_0x359a28[_0x31d8d9];for(var _0x3ff6d9=0x0;_0x3ff6d9<_0x5b6d91['Agents'][_0xa6b4('0x52')];_0x3ff6d9+=0x1){let _0x49a29b=_0x5b6d91[_0xa6b4('0x72')][_0x3ff6d9];var _0x135646=_0x1338e0[_0xa6b4('0x7a')]();_0x135646[_0xa6b4('0x43')](_0xa6b4('0x7b'),_0x49a29b['id']);_0x58bc46[_0xa6b4('0x7c')](db[_0xa6b4('0x6d')][_0xa6b4('0x3a')](_0x135646[_0xa6b4('0x7d')](),{'type':db[_0xa6b4('0x6d')][_0xa6b4('0x7e')][_0xa6b4('0x7f')]})[_0xa6b4('0x2a')](function(_0x393e71){if(_0x393e71[_0xa6b4('0x52')]===0x1){return _0x49a29b['id'];}else{var _0x30b2be=_[_0xa6b4('0x80')](_[_0xa6b4('0x34')](_0x393e71,_0xa6b4('0x81')),function(_0x532d0c){return _['includes'](_0x417fa7,_0x532d0c);});if(_0x30b2be){return _0x49a29b['id'];}}}));}}return BPromise[_0xa6b4('0x82')](_0x58bc46)[_0xa6b4('0x2a')](function(_0x10ddbe){_0x1de1f1=_(_0x1de1f1)[_0xa6b4('0x83')](_0x10ddbe)[_0xa6b4('0x84')]()[_0xa6b4('0x85')]();return db[_0xa6b4('0x35')][_0xa6b4('0x53')]({'where':{'id':_0x48955f['params']['id']}})['then'](function(_0x4b519b){return db[_0xa6b4('0x6d')]['transaction'](function(_0x87b333){return _0x4b519b[_0xa6b4('0x71')](_0x48955f[_0xa6b4('0x3a')][_0xa6b4('0x69')],{'transaction':_0x87b333})[_0xa6b4('0x2a')](function(){if(!_[_0xa6b4('0x86')](_0x1de1f1)){return _0x4b519b[_0xa6b4('0x87')](_0x1de1f1,{'transaction':_0x87b333});}})['then'](function(){_0x1de1f1['forEach'](function(_0x52c8a8){socket['emit']('userWhatsappQueue:remove',{'UserId':_0x52c8a8,'WhatsappQueueId':_0x4b519b['id']});});});});});});})[_0xa6b4('0x2a')](respondWithStatusCode(_0x56c9c1,null))[_0xa6b4('0x4d')](handleError(_0x56c9c1,null));};exports[_0xa6b4('0x88')]=function(_0x4446da,_0x1af549,_0x51c805){return db[_0xa6b4('0x35')][_0xa6b4('0x53')]({'where':{'id':_0x4446da[_0xa6b4('0x4f')]['id']}})[_0xa6b4('0x2a')](handleEntityNotFound(_0x1af549,null))['then'](function(_0x2d5807){if(_0x2d5807){return _0x2d5807[_0xa6b4('0x88')](_0x4446da[_0xa6b4('0x54')][_0xa6b4('0x69')],_[_0xa6b4('0x89')](_0x4446da[_0xa6b4('0x54')],[_0xa6b4('0x69'),'id'])||{})['spread'](function(_0x3734da){for(var _0x4245d6=0x0;_0x4245d6<_0x4446da[_0xa6b4('0x54')][_0xa6b4('0x69')][_0xa6b4('0x52')];_0x4245d6+=0x1){socket[_0xa6b4('0x8a')](_0xa6b4('0x8b'),{'UserId':_0x4446da[_0xa6b4('0x54')]['ids'][_0x4245d6],'WhatsappQueueId':_0x4446da[_0xa6b4('0x4f')]['id']});}return _0x3734da;});}})[_0xa6b4('0x2a')](respondWithResult(_0x1af549,null))['catch'](handleError(_0x1af549,null));};exports[_0xa6b4('0x87')]=function(_0x4f0590,_0x226920,_0x5c5e9b){return db[_0xa6b4('0x35')]['find']({'where':{'id':_0x4f0590[_0xa6b4('0x4f')]['id']}})['then'](handleEntityNotFound(_0x226920,null))['then'](function(_0x576266){if(_0x576266){return _0x576266[_0xa6b4('0x87')](_0x4f0590[_0xa6b4('0x3a')]['ids'])[_0xa6b4('0x2a')](function(){if(_[_0xa6b4('0x8c')](_0x4f0590[_0xa6b4('0x3a')][_0xa6b4('0x69')])){for(var _0x438bc4=0x0;_0x438bc4<_0x4f0590['query'][_0xa6b4('0x69')][_0xa6b4('0x52')];_0x438bc4+=0x1){socket[_0xa6b4('0x8a')](_0xa6b4('0x8d'),{'UserId':Number(_0x4f0590[_0xa6b4('0x3a')]['ids'][_0x438bc4]),'WhatsappQueueId':Number(_0x4f0590[_0xa6b4('0x4f')]['id'])});}}else{socket[_0xa6b4('0x8a')](_0xa6b4('0x8d'),{'UserId':Number(_0x4f0590['query'][_0xa6b4('0x69')]),'WhatsappQueueId':Number(_0x4f0590[_0xa6b4('0x4f')]['id'])});}});}})[_0xa6b4('0x2a')](respondWithStatusCode(_0x226920,null))['catch'](handleError(_0x226920,null));};exports[_0xa6b4('0x8e')]=function(_0x588b5b,_0x41c277,_0x591c2c){var _0x5da003={};var _0x4001ad={};var _0x2083ea;var _0x58d039;return db['WhatsappQueue'][_0xa6b4('0x5c')]({'where':{'id':_0x588b5b[_0xa6b4('0x4f')]['id']}})[_0xa6b4('0x2a')](handleEntityNotFound(_0x41c277,null))[_0xa6b4('0x2a')](function(_0x4f0e91){if(_0x4f0e91){_0x2083ea=_0x4f0e91;_0x4001ad['model']=_['keys'](db[_0xa6b4('0x6a')][_0xa6b4('0x51')]);_0x4001ad['query']=_[_0xa6b4('0x50')](_0x588b5b['query']);_0x4001ad[_0xa6b4('0x3b')]=_[_0xa6b4('0x3c')](_0x4001ad[_0xa6b4('0x39')],_0x4001ad[_0xa6b4('0x3a')]);_0x5da003['attributes']=_[_0xa6b4('0x3c')](_0x4001ad[_0xa6b4('0x39')],qs[_0xa6b4('0x3e')](_0x588b5b['query'][_0xa6b4('0x3e')]));_0x5da003[_0xa6b4('0x3d')]=_0x5da003['attributes'][_0xa6b4('0x52')]?_0x5da003[_0xa6b4('0x3d')]:_0x4001ad['model'];_0x5da003[_0xa6b4('0x41')]=qs[_0xa6b4('0x42')](_0x588b5b[_0xa6b4('0x3a')][_0xa6b4('0x42')]);_0x5da003['where']=qs['filters'](_[_0xa6b4('0x44')](_0x588b5b[_0xa6b4('0x3a')],_0x4001ad['filters']));if(_0x588b5b[_0xa6b4('0x3a')][_0xa6b4('0x45')]){_0x5da003[_0xa6b4('0x43')]=_[_0xa6b4('0x46')](_0x5da003[_0xa6b4('0x43')],{'$or':_['map'](_0x5da003[_0xa6b4('0x3d')],function(_0x52f24c){var _0x267bdc={};_0x267bdc[_0x52f24c]={'$like':'%'+_0x588b5b['query'][_0xa6b4('0x45')]+'%'};return _0x267bdc;})});}_0x5da003=_[_0xa6b4('0x46')]({},_0x5da003,_0x588b5b[_0xa6b4('0x48')]);return _0x2083ea[_0xa6b4('0x8e')](_0x5da003);}})[_0xa6b4('0x2a')](function(_0x499d56){if(_0x499d56){_0x58d039=_0x499d56[_0xa6b4('0x52')];if(!_0x588b5b[_0xa6b4('0x3a')][_0xa6b4('0x3f')]('nolimit')){_0x5da003[_0xa6b4('0x24')]=qs[_0xa6b4('0x24')](_0x588b5b['query'][_0xa6b4('0x24')]);_0x5da003[_0xa6b4('0x23')]=qs[_0xa6b4('0x23')](_0x588b5b[_0xa6b4('0x3a')][_0xa6b4('0x23')]);}return _0x2083ea[_0xa6b4('0x8e')](_0x5da003);}})[_0xa6b4('0x2a')](function(_0x9ef8a5){if(_0x9ef8a5){return _0x9ef8a5?{'count':_0x58d039,'rows':_0x9ef8a5}:null;}})[_0xa6b4('0x2a')](respondWithResult(_0x41c277,null))[_0xa6b4('0x4d')](handleError(_0x41c277,null));};
\ No newline at end of file
diff --git a/server/api/whatsappQueue/whatsappQueue.events.js b/server/api/whatsappQueue/whatsappQueue.events.js
index e14de1b..676185b 100644
--- a/server/api/whatsappQueue/whatsappQueue.events.js
+++ b/server/api/whatsappQueue/whatsappQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6e45=['WhatsappQueue','setMaxListeners','save','update','remove','events','../../mysqldb'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x6e45,0x140));var _0x56e4=function(_0x150214,_0x3767a7){_0x150214=_0x150214-0x0;var _0x27f83d=_0x6e45[_0x150214];return _0x27f83d;};'use strict';var EventEmitter=require(_0x56e4('0x0'));var WhatsappQueue=require(_0x56e4('0x1'))['db'][_0x56e4('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0x56e4('0x3')](0x0);var events={'afterCreate':_0x56e4('0x4'),'afterUpdate':_0x56e4('0x5'),'afterDestroy':_0x56e4('0x6')};function emitEvent(_0x24b7fb){return function(_0x1dc33a,_0x1d4c7e,_0x51f01a){WhatsappQueueEvents['emit'](_0x24b7fb+':'+_0x1dc33a['id'],_0x1dc33a);WhatsappQueueEvents['emit'](_0x24b7fb,_0x1dc33a);_0x51f01a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappQueue['hook'](e,emitEvent(event));}}module['exports']=WhatsappQueueEvents;
\ No newline at end of file
+var _0x7f5f=['hook','exports','events','WhatsappQueue','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x1dec6d,_0x434790){var _0x2c3f50=function(_0x44a10d){while(--_0x44a10d){_0x1dec6d['push'](_0x1dec6d['shift']());}};_0x2c3f50(++_0x434790);}(_0x7f5f,0x1a9));var _0xf7f5=function(_0x696b76,_0x261852){_0x696b76=_0x696b76-0x0;var _0x3a4649=_0x7f5f[_0x696b76];return _0x3a4649;};'use strict';var EventEmitter=require(_0xf7f5('0x0'));var WhatsappQueue=require('../../mysqldb')['db'][_0xf7f5('0x1')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0xf7f5('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf7f5('0x3'),'afterDestroy':_0xf7f5('0x4')};function emitEvent(_0x52d4fe){return function(_0x1de027,_0x4d65d9,_0x3e416a){WhatsappQueueEvents[_0xf7f5('0x5')](_0x52d4fe+':'+_0x1de027['id'],_0x1de027);WhatsappQueueEvents[_0xf7f5('0x5')](_0x52d4fe,_0x1de027);_0x3e416a(null);};}for(var e in events){if(events[_0xf7f5('0x6')](e)){var event=events[e];WhatsappQueue[_0xf7f5('0x7')](e,emitEvent(event));}}module[_0xf7f5('0x8')]=WhatsappQueueEvents;
\ No newline at end of file
diff --git a/server/api/whatsappQueue/whatsappQueue.model.js b/server/api/whatsappQueue/whatsappQueue.model.js
index ecc58da..5cfd0d8 100644
--- a/server/api/whatsappQueue/whatsappQueue.model.js
+++ b/server/api/whatsappQueue/whatsappQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1d9b=['../../config/environment','./whatsappQueue.attributes','exports','WhatsappQueue','whatsapp_queues','lodash','../../config/logger','moment','bluebird','path'];(function(_0x20a7e6,_0x5be6ed){var _0x4f7bdb=function(_0x26535a){while(--_0x26535a){_0x20a7e6['push'](_0x20a7e6['shift']());}};_0x4f7bdb(++_0x5be6ed);}(_0x1d9b,0x69));var _0xb1d9=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1d9b[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xb1d9('0x0'));var util=require('util');var logger=require(_0xb1d9('0x1'))('api');var moment=require(_0xb1d9('0x2'));var BPromise=require(_0xb1d9('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb1d9('0x4'));var rimraf=require('rimraf');var config=require(_0xb1d9('0x5'));var attributes=require(_0xb1d9('0x6'));module[_0xb1d9('0x7')]=function(_0x232899,_0x2aab25){return _0x232899['define'](_0xb1d9('0x8'),attributes,{'tableName':_0xb1d9('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcd89=['whatsapp_queues','util','../../config/logger','api','moment','bluebird','rimraf','exports','WhatsappQueue'];(function(_0x1fee9d,_0x268602){var _0x2d5ff5=function(_0x2c428f){while(--_0x2c428f){_0x1fee9d['push'](_0x1fee9d['shift']());}};_0x2d5ff5(++_0x268602);}(_0xcd89,0x157));var _0x9cd8=function(_0x279f10,_0x57e812){_0x279f10=_0x279f10-0x0;var _0x59cd5c=_0xcd89[_0x279f10];return _0x59cd5c;};'use strict';var _=require('lodash');var util=require(_0x9cd8('0x0'));var logger=require(_0x9cd8('0x1'))(_0x9cd8('0x2'));var moment=require(_0x9cd8('0x3'));var BPromise=require(_0x9cd8('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x9cd8('0x5'));var config=require('../../config/environment');var attributes=require('./whatsappQueue.attributes');module[_0x9cd8('0x6')]=function(_0x255503,_0xfdc230){return _0x255503['define'](_0x9cd8('0x7'),attributes,{'tableName':_0x9cd8('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/whatsappQueue/whatsappQueue.rpc.js b/server/api/whatsappQueue/whatsappQueue.rpc.js
index 479728b..722ab75 100644
--- a/server/api/whatsappQueue/whatsappQueue.rpc.js
+++ b/server/api/whatsappQueue/whatsappQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3ecf=['localhost','socket.io-emitter','./whatsappQueue.socket','register','request','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','WhatsappQueue,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetWhatsappQueue','findAll','options','where','limit','map','include','attributes','model','stringify','WhatsappQueue','find','raw','then','ShowWhatsappQueue','debug','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis'];(function(_0x529c59,_0x1d42fb){var _0x28da8f=function(_0x50d236){while(--_0x50d236){_0x529c59['push'](_0x529c59['shift']());}};_0x28da8f(++_0x1d42fb);}(_0x3ecf,0x144));var _0xf3ec=function(_0x16ac65,_0x178f03){_0x16ac65=_0x16ac65-0x0;var _0x1a37e6=_0x3ecf[_0x16ac65];return _0x1a37e6;};'use strict';var _=require(_0xf3ec('0x0'));var util=require('util');var moment=require(_0xf3ec('0x1'));var BPromise=require(_0xf3ec('0x2'));var rs=require(_0xf3ec('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf3ec('0x4'))['db'];var utils=require(_0xf3ec('0x5'));var logger=require(_0xf3ec('0x6'))(_0xf3ec('0x7'));var config=require(_0xf3ec('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xf3ec('0x9')][_0xf3ec('0xa')]({'port':0x232a});config[_0xf3ec('0xb')]=_['defaults'](config[_0xf3ec('0xb')],{'host':_0xf3ec('0xc'),'port':0x18eb});var socket=require(_0xf3ec('0xd'))(new Redis(config[_0xf3ec('0xb')]));require(_0xf3ec('0xe'))[_0xf3ec('0xf')](socket);function respondWithRpcPromise(_0x20547e,_0x447b75,_0x9a1641){return new BPromise(function(_0x44d021,_0x16c601){return client[_0xf3ec('0x10')](_0x20547e,_0x9a1641)['then'](function(_0x1bbce7){logger[_0xf3ec('0x11')](_0xf3ec('0x12'),_0x447b75,_0xf3ec('0x13'));logger['debug'](_0xf3ec('0x14'),_0x447b75,_0xf3ec('0x13'),JSON['stringify'](_0x1bbce7));if(_0x1bbce7[_0xf3ec('0x15')]){if(_0x1bbce7['error'][_0xf3ec('0x16')]===0x1f4){logger[_0xf3ec('0x15')]('WhatsappQueue,\x20%s,\x20%s',_0x447b75,_0x1bbce7[_0xf3ec('0x15')][_0xf3ec('0x17')]);return _0x16c601(_0x1bbce7['error'][_0xf3ec('0x17')]);}logger[_0xf3ec('0x15')]('WhatsappQueue,\x20%s,\x20%s',_0x447b75,_0x1bbce7[_0xf3ec('0x15')][_0xf3ec('0x17')]);return _0x44d021(_0x1bbce7[_0xf3ec('0x15')][_0xf3ec('0x17')]);}else{logger[_0xf3ec('0x11')](_0xf3ec('0x12'),_0x447b75,_0xf3ec('0x13'));_0x44d021(_0x1bbce7[_0xf3ec('0x18')][_0xf3ec('0x17')]);}})[_0xf3ec('0x19')](function(_0x28b8b0){logger[_0xf3ec('0x15')](_0xf3ec('0x12'),_0x447b75,_0x28b8b0);_0x16c601(_0x28b8b0);});});}exports[_0xf3ec('0x1a')]=function(_0x4f0d44){var _0x22784f=this;return new Promise(function(_0xdebdf1,_0x18f98b){return db['WhatsappQueue'][_0xf3ec('0x1b')]({'raw':_0x4f0d44[_0xf3ec('0x1c')]?_0x4f0d44[_0xf3ec('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x4f0d44[_0xf3ec('0x1c')]?_0x4f0d44[_0xf3ec('0x1c')][_0xf3ec('0x1d')]||null:null,'attributes':_0x4f0d44[_0xf3ec('0x1c')]?_0x4f0d44[_0xf3ec('0x1c')]['attributes']||null:null,'limit':_0x4f0d44[_0xf3ec('0x1c')]?_0x4f0d44[_0xf3ec('0x1c')][_0xf3ec('0x1e')]||null:null,'include':_0x4f0d44[_0xf3ec('0x1c')]?_0x4f0d44[_0xf3ec('0x1c')]['include']?_[_0xf3ec('0x1f')](_0x4f0d44[_0xf3ec('0x1c')][_0xf3ec('0x20')],function(_0x292d83){return{'model':db[_0x292d83['model']],'as':_0x292d83['as'],'attributes':_0x292d83[_0xf3ec('0x21')],'include':_0x292d83[_0xf3ec('0x20')]?_[_0xf3ec('0x1f')](_0x292d83['include'],function(_0x1f2b79){return{'model':db[_0x1f2b79[_0xf3ec('0x22')]],'as':_0x1f2b79['as'],'attributes':_0x1f2b79[_0xf3ec('0x21')],'include':_0x1f2b79[_0xf3ec('0x20')]?_[_0xf3ec('0x1f')](_0x1f2b79['include'],function(_0x4d5493){return{'model':db[_0x4d5493[_0xf3ec('0x22')]],'as':_0x4d5493['as'],'attributes':_0x4d5493[_0xf3ec('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x179a09){logger[_0xf3ec('0x11')](_0xf3ec('0x1a'),_0x4f0d44);logger['debug'](_0xf3ec('0x1a'),_0x4f0d44,JSON[_0xf3ec('0x23')](_0x179a09));_0xdebdf1(_0x179a09);})[_0xf3ec('0x19')](function(_0x28076d){logger[_0xf3ec('0x15')]('GetWhatsappQueue',_0x28076d[_0xf3ec('0x17')],_0x4f0d44);_0x18f98b(_0x22784f[_0xf3ec('0x15')](0x1f4,_0x28076d[_0xf3ec('0x17')]));});});};exports['ShowWhatsappQueue']=function(_0x2ee579){var _0x407cb3=this;return new Promise(function(_0x117907,_0x333df4){return db[_0xf3ec('0x24')][_0xf3ec('0x25')]({'raw':_0x2ee579[_0xf3ec('0x1c')]?_0x2ee579[_0xf3ec('0x1c')][_0xf3ec('0x26')]===undefined?!![]:![]:!![],'where':_0x2ee579[_0xf3ec('0x1c')]?_0x2ee579[_0xf3ec('0x1c')][_0xf3ec('0x1d')]||null:null,'attributes':_0x2ee579[_0xf3ec('0x1c')]?_0x2ee579[_0xf3ec('0x1c')][_0xf3ec('0x21')]||null:null,'include':_0x2ee579['options']?_0x2ee579[_0xf3ec('0x1c')][_0xf3ec('0x20')]?_[_0xf3ec('0x1f')](_0x2ee579[_0xf3ec('0x1c')][_0xf3ec('0x20')],function(_0x33b1fe){return{'model':db[_0x33b1fe[_0xf3ec('0x22')]],'as':_0x33b1fe['as'],'attributes':_0x33b1fe[_0xf3ec('0x21')],'include':_0x33b1fe[_0xf3ec('0x20')]?_[_0xf3ec('0x1f')](_0x33b1fe[_0xf3ec('0x20')],function(_0x513c15){return{'model':db[_0x513c15[_0xf3ec('0x22')]],'as':_0x513c15['as'],'attributes':_0x513c15[_0xf3ec('0x21')],'include':_0x513c15[_0xf3ec('0x20')]?_[_0xf3ec('0x1f')](_0x513c15[_0xf3ec('0x20')],function(_0x348eb3){return{'model':db[_0x348eb3[_0xf3ec('0x22')]],'as':_0x348eb3['as'],'attributes':_0x348eb3[_0xf3ec('0x21')]};}):[]};}):[]};}):[]:[]})[_0xf3ec('0x27')](function(_0x12f27e){logger['info'](_0xf3ec('0x28'),_0x2ee579);logger[_0xf3ec('0x29')](_0xf3ec('0x28'),_0x2ee579,JSON[_0xf3ec('0x23')](_0x12f27e));_0x117907(_0x12f27e);})[_0xf3ec('0x19')](function(_0x10b03d){logger[_0xf3ec('0x15')]('ShowWhatsappQueue',_0x10b03d[_0xf3ec('0x17')],_0x2ee579);_0x333df4(_0x407cb3['error'](0x1f4,_0x10b03d['message']));});});};
\ No newline at end of file
+var _0x92bd=['error','code','message','WhatsappQueue','findAll','options','raw','where','attributes','limit','map','include','model','debug','GetWhatsappQueue','catch','find','ShowWhatsappQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','http','redis','defaults','localhost','socket.io-emitter','./whatsappQueue.socket','register','request','then','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x18237a,_0x3a2b11){var _0x5eab0e=function(_0x4aad3e){while(--_0x4aad3e){_0x18237a['push'](_0x18237a['shift']());}};_0x5eab0e(++_0x3a2b11);}(_0x92bd,0x108));var _0xd92b=function(_0x505756,_0x4f41dc){_0x505756=_0x505756-0x0;var _0x52ca07=_0x92bd[_0x505756];return _0x52ca07;};'use strict';var _=require(_0xd92b('0x0'));var util=require(_0xd92b('0x1'));var moment=require(_0xd92b('0x2'));var BPromise=require(_0xd92b('0x3'));var rs=require(_0xd92b('0x4'));var fs=require('fs');var Redis=require(_0xd92b('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xd92b('0x6'));var logger=require(_0xd92b('0x7'))(_0xd92b('0x8'));var config=require(_0xd92b('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xd92b('0xa')]({'port':0x232a});config[_0xd92b('0xb')]=_[_0xd92b('0xc')](config['redis'],{'host':_0xd92b('0xd'),'port':0x18eb});var socket=require(_0xd92b('0xe'))(new Redis(config['redis']));require(_0xd92b('0xf'))[_0xd92b('0x10')](socket);function respondWithRpcPromise(_0x27cfc4,_0x3d6428,_0x1ade6e){return new BPromise(function(_0x54d075,_0x592c8c){return client[_0xd92b('0x11')](_0x27cfc4,_0x1ade6e)[_0xd92b('0x12')](function(_0x42a757){logger[_0xd92b('0x13')](_0xd92b('0x14'),_0x3d6428,'request\x20sent');logger['debug']('WhatsappQueue,\x20%s,\x20%s,\x20%s',_0x3d6428,_0xd92b('0x15'),JSON[_0xd92b('0x16')](_0x42a757));if(_0x42a757['error']){if(_0x42a757[_0xd92b('0x17')][_0xd92b('0x18')]===0x1f4){logger[_0xd92b('0x17')](_0xd92b('0x14'),_0x3d6428,_0x42a757[_0xd92b('0x17')][_0xd92b('0x19')]);return _0x592c8c(_0x42a757[_0xd92b('0x17')][_0xd92b('0x19')]);}logger[_0xd92b('0x17')](_0xd92b('0x14'),_0x3d6428,_0x42a757[_0xd92b('0x17')]['message']);return _0x54d075(_0x42a757[_0xd92b('0x17')][_0xd92b('0x19')]);}else{logger[_0xd92b('0x13')](_0xd92b('0x14'),_0x3d6428,_0xd92b('0x15'));_0x54d075(_0x42a757['result'][_0xd92b('0x19')]);}})['catch'](function(_0x56b8e8){logger[_0xd92b('0x17')]('WhatsappQueue,\x20%s,\x20%s',_0x3d6428,_0x56b8e8);_0x592c8c(_0x56b8e8);});});}exports['GetWhatsappQueue']=function(_0x40ed96){var _0x5457f6=this;return new Promise(function(_0x1d211a,_0x17776a){return db[_0xd92b('0x1a')][_0xd92b('0x1b')]({'raw':_0x40ed96[_0xd92b('0x1c')]?_0x40ed96[_0xd92b('0x1c')][_0xd92b('0x1d')]===undefined?!![]:![]:!![],'where':_0x40ed96[_0xd92b('0x1c')]?_0x40ed96[_0xd92b('0x1c')][_0xd92b('0x1e')]||null:null,'attributes':_0x40ed96[_0xd92b('0x1c')]?_0x40ed96[_0xd92b('0x1c')][_0xd92b('0x1f')]||null:null,'limit':_0x40ed96[_0xd92b('0x1c')]?_0x40ed96[_0xd92b('0x1c')][_0xd92b('0x20')]||null:null,'include':_0x40ed96[_0xd92b('0x1c')]?_0x40ed96[_0xd92b('0x1c')]['include']?_[_0xd92b('0x21')](_0x40ed96[_0xd92b('0x1c')][_0xd92b('0x22')],function(_0x27089c){return{'model':db[_0x27089c[_0xd92b('0x23')]],'as':_0x27089c['as'],'attributes':_0x27089c[_0xd92b('0x1f')],'include':_0x27089c[_0xd92b('0x22')]?_[_0xd92b('0x21')](_0x27089c[_0xd92b('0x22')],function(_0x5de926){return{'model':db[_0x5de926[_0xd92b('0x23')]],'as':_0x5de926['as'],'attributes':_0x5de926[_0xd92b('0x1f')],'include':_0x5de926[_0xd92b('0x22')]?_[_0xd92b('0x21')](_0x5de926[_0xd92b('0x22')],function(_0x202d84){return{'model':db[_0x202d84[_0xd92b('0x23')]],'as':_0x202d84['as'],'attributes':_0x202d84[_0xd92b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xd92b('0x12')](function(_0x4736b6){logger[_0xd92b('0x13')]('GetWhatsappQueue',_0x40ed96);logger[_0xd92b('0x24')](_0xd92b('0x25'),_0x40ed96,JSON[_0xd92b('0x16')](_0x4736b6));_0x1d211a(_0x4736b6);})[_0xd92b('0x26')](function(_0x3587e8){logger[_0xd92b('0x17')](_0xd92b('0x25'),_0x3587e8['message'],_0x40ed96);_0x17776a(_0x5457f6[_0xd92b('0x17')](0x1f4,_0x3587e8[_0xd92b('0x19')]));});});};exports['ShowWhatsappQueue']=function(_0x19e3d3){var _0x331ace=this;return new Promise(function(_0x4b429a,_0x2525cc){return db[_0xd92b('0x1a')][_0xd92b('0x27')]({'raw':_0x19e3d3[_0xd92b('0x1c')]?_0x19e3d3[_0xd92b('0x1c')][_0xd92b('0x1d')]===undefined?!![]:![]:!![],'where':_0x19e3d3[_0xd92b('0x1c')]?_0x19e3d3[_0xd92b('0x1c')][_0xd92b('0x1e')]||null:null,'attributes':_0x19e3d3[_0xd92b('0x1c')]?_0x19e3d3['options'][_0xd92b('0x1f')]||null:null,'include':_0x19e3d3[_0xd92b('0x1c')]?_0x19e3d3['options']['include']?_['map'](_0x19e3d3[_0xd92b('0x1c')][_0xd92b('0x22')],function(_0x447268){return{'model':db[_0x447268['model']],'as':_0x447268['as'],'attributes':_0x447268[_0xd92b('0x1f')],'include':_0x447268['include']?_[_0xd92b('0x21')](_0x447268[_0xd92b('0x22')],function(_0x4099be){return{'model':db[_0x4099be['model']],'as':_0x4099be['as'],'attributes':_0x4099be['attributes'],'include':_0x4099be['include']?_[_0xd92b('0x21')](_0x4099be['include'],function(_0x53a00e){return{'model':db[_0x53a00e[_0xd92b('0x23')]],'as':_0x53a00e['as'],'attributes':_0x53a00e[_0xd92b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xd92b('0x12')](function(_0x1d69c3){logger[_0xd92b('0x13')]('ShowWhatsappQueue',_0x19e3d3);logger[_0xd92b('0x24')](_0xd92b('0x28'),_0x19e3d3,JSON['stringify'](_0x1d69c3));_0x4b429a(_0x1d69c3);})[_0xd92b('0x26')](function(_0x20fb61){logger[_0xd92b('0x17')]('ShowWhatsappQueue',_0x20fb61[_0xd92b('0x19')],_0x19e3d3);_0x2525cc(_0x331ace[_0xd92b('0x17')](0x1f4,_0x20fb61[_0xd92b('0x19')]));});});};
\ No newline at end of file
diff --git a/server/api/whatsappQueue/whatsappQueue.socket.js b/server/api/whatsappQueue/whatsappQueue.socket.js
index 38589dd..3a39dff 100644
--- a/server/api/whatsappQueue/whatsappQueue.socket.js
+++ b/server/api/whatsappQueue/whatsappQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc081=['remove','update','emit','removeListener','register','length','whatsappQueue:','save'];(function(_0x56877e,_0x51d150){var _0x2a0327=function(_0x88b19f){while(--_0x88b19f){_0x56877e['push'](_0x56877e['shift']());}};_0x2a0327(++_0x51d150);}(_0xc081,0x14f));var _0x1c08=function(_0x44c768,_0x552a5e){_0x44c768=_0x44c768-0x0;var _0x55daf5=_0xc081[_0x44c768];return _0x55daf5;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=[_0x1c08('0x0'),_0x1c08('0x1'),_0x1c08('0x2')];function createListener(_0xc6bfd5,_0x1eefd9){return function(_0x7caddf){_0x1eefd9[_0x1c08('0x3')](_0xc6bfd5,_0x7caddf);};}function removeListener(_0x1ee90c,_0x502a5b){return function(){WhatsappQueueEvents[_0x1c08('0x4')](_0x1ee90c,_0x502a5b);};}exports[_0x1c08('0x5')]=function(_0x42283c){for(var _0x4e6eec=0x0,_0x47018b=events[_0x1c08('0x6')];_0x4e6eec<_0x47018b;_0x4e6eec++){var _0x14cc19=events[_0x4e6eec];var _0xbf3b44=createListener(_0x1c08('0x7')+_0x14cc19,_0x42283c);WhatsappQueueEvents['on'](_0x14cc19,_0xbf3b44);}};
\ No newline at end of file
+var _0x6902=['length','whatsappQueue:','./whatsappQueue.events','remove','update','emit','removeListener','register'];(function(_0x59b2a1,_0x1f631f){var _0x4908d1=function(_0x14c9b8){while(--_0x14c9b8){_0x59b2a1['push'](_0x59b2a1['shift']());}};_0x4908d1(++_0x1f631f);}(_0x6902,0x13a));var _0x2690=function(_0x442933,_0x4ff906){_0x442933=_0x442933-0x0;var _0x2d954d=_0x6902[_0x442933];return _0x2d954d;};'use strict';var WhatsappQueueEvents=require(_0x2690('0x0'));var events=['save',_0x2690('0x1'),_0x2690('0x2')];function createListener(_0x59df1c,_0x560f7c){return function(_0x46444b){_0x560f7c[_0x2690('0x3')](_0x59df1c,_0x46444b);};}function removeListener(_0x4a996d,_0x4285a4){return function(){WhatsappQueueEvents[_0x2690('0x4')](_0x4a996d,_0x4285a4);};}exports[_0x2690('0x5')]=function(_0x539bca){for(var _0x3afaa2=0x0,_0x2805a0=events[_0x2690('0x6')];_0x3afaa2<_0x2805a0;_0x3afaa2++){var _0x290744=events[_0x3afaa2];var _0x3d3f5a=createListener(_0x2690('0x7')+_0x290744,_0x539bca);WhatsappQueueEvents['on'](_0x290744,_0x3d3f5a);}};
\ No newline at end of file
diff --git a/server/api/whatsappQueueReport/index.js b/server/api/whatsappQueueReport/index.js
index 6fb9379..00b243b 100644
--- a/server/api/whatsappQueueReport/index.js
+++ b/server/api/whatsappQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa665=['create','put','/:id','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/describe','describe','show'];(function(_0x1142f7,_0x168ad8){var _0x19d762=function(_0x141e4f){while(--_0x141e4f){_0x1142f7['push'](_0x1142f7['shift']());}};_0x19d762(++_0x168ad8);}(_0xa665,0x7e));var _0x5a66=function(_0x1b1a3b,_0x52a88a){_0x1b1a3b=_0x1b1a3b-0x0;var _0x385347=_0xa665[_0x1b1a3b];return _0x385347;};'use strict';var multer=require(_0x5a66('0x0'));var util=require(_0x5a66('0x1'));var path=require(_0x5a66('0x2'));var timeout=require(_0x5a66('0x3'));var express=require(_0x5a66('0x4'));var router=express[_0x5a66('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0x5a66('0x6'));var config=require(_0x5a66('0x7'));var controller=require('./whatsappQueueReport.controller');router['get']('/',auth[_0x5a66('0x8')](),controller[_0x5a66('0x9')]);router[_0x5a66('0xa')](_0x5a66('0xb'),auth[_0x5a66('0x8')](),controller[_0x5a66('0xc')]);router['get']('/:id',auth[_0x5a66('0x8')](),controller[_0x5a66('0xd')]);router['post']('/',auth[_0x5a66('0x8')](),controller[_0x5a66('0xe')]);router[_0x5a66('0xf')](_0x5a66('0x10'),auth[_0x5a66('0x8')](),controller[_0x5a66('0x11')]);router[_0x5a66('0x12')](_0x5a66('0x10'),auth[_0x5a66('0x8')](),controller[_0x5a66('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xf0b0=['multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/describe','isAuthenticated','describe','show','post','put','/:id','destroy','exports'];(function(_0x3dc94a,_0x12eb9c){var _0x4e508b=function(_0x2ad99a){while(--_0x2ad99a){_0x3dc94a['push'](_0x3dc94a['shift']());}};_0x4e508b(++_0x12eb9c);}(_0xf0b0,0xc8));var _0x0f0b=function(_0x5acebc,_0x12109b){_0x5acebc=_0x5acebc-0x0;var _0x3b6599=_0xf0b0[_0x5acebc];return _0x3b6599;};'use strict';var multer=require(_0x0f0b('0x0'));var util=require(_0x0f0b('0x1'));var path=require(_0x0f0b('0x2'));var timeout=require(_0x0f0b('0x3'));var express=require(_0x0f0b('0x4'));var router=express[_0x0f0b('0x5')]();var auth=require(_0x0f0b('0x6'));var interaction=require(_0x0f0b('0x7'));var config=require(_0x0f0b('0x8'));var controller=require('./whatsappQueueReport.controller');router[_0x0f0b('0x9')]('/',auth['isAuthenticated'](),controller[_0x0f0b('0xa')]);router[_0x0f0b('0x9')](_0x0f0b('0xb'),auth[_0x0f0b('0xc')](),controller[_0x0f0b('0xd')]);router[_0x0f0b('0x9')]('/:id',auth[_0x0f0b('0xc')](),controller[_0x0f0b('0xe')]);router[_0x0f0b('0xf')]('/',auth[_0x0f0b('0xc')](),controller['create']);router[_0x0f0b('0x10')](_0x0f0b('0x11'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x0f0b('0x11'),auth['isAuthenticated'](),controller[_0x0f0b('0x12')]);module[_0x0f0b('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js b/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js
index a1f56ec..baffe6f 100644
--- a/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js
+++ b/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x55ca=['DATE','STRING','sequelize','exports'];(function(_0x1aa98f,_0x4c1e6e){var _0x13b4d7=function(_0x50fea4){while(--_0x50fea4){_0x1aa98f['push'](_0x1aa98f['shift']());}};_0x13b4d7(++_0x4c1e6e);}(_0x55ca,0x126));var _0xa55c=function(_0x407461,_0x1cf61c){_0x407461=_0x407461-0x0;var _0x2b3ffa=_0x55ca[_0x407461];return _0x2b3ffa;};'use strict';var Sequelize=require(_0xa55c('0x0'));module[_0xa55c('0x1')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0xa55c('0x2')]},'acceptAt':{'type':Sequelize[_0xa55c('0x2')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0xa55c('0x3')]}};
\ No newline at end of file
+var _0x9957=['exports','STRING','DATE','sequelize'];(function(_0x4aa4c6,_0x2ce264){var _0x16c50c=function(_0x559a1e){while(--_0x559a1e){_0x4aa4c6['push'](_0x4aa4c6['shift']());}};_0x16c50c(++_0x2ce264);}(_0x9957,0x93));var _0x7995=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x9957[_0x1ac595];return _0x455fff;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'uniqueid':{'type':Sequelize[_0x7995('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x7995('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x7995('0x3')]},'acceptAt':{'type':Sequelize[_0x7995('0x3')]},'exitAt':{'type':Sequelize[_0x7995('0x3')]},'reason':{'type':Sequelize[_0x7995('0x2')]}};
\ No newline at end of file
diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.controller.js b/server/api/whatsappQueueReport/whatsappQueueReport.controller.js
index 6be2314..3195607 100644
--- a/server/api/whatsappQueueReport/whatsappQueueReport.controller.js
+++ b/server/api/whatsappQueueReport/whatsappQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x45bb=['status','count','offset','limit','set','Content-Range','json','apply','save','update','then','destroy','error','name','send','index','map','WhatsappQueueReport','rawAttributes','fieldName','model','keys','query','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','params','fields','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','lodash','crypto','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','sendStatus'];(function(_0x3c5bfd,_0x505705){var _0x15b73c=function(_0x117642){while(--_0x117642){_0x3c5bfd['push'](_0x3c5bfd['shift']());}};_0x15b73c(++_0x505705);}(_0x45bb,0x79));var _0xb45b=function(_0x39c7e8,_0x2a867f){_0x39c7e8=_0x39c7e8-0x0;var _0x4af3a6=_0x45bb[_0x39c7e8];return _0x4af3a6;};'use strict';var pdf=require(_0xb45b('0x0'));var emlformat=require(_0xb45b('0x1'));var rimraf=require(_0xb45b('0x2'));var zipdir=require(_0xb45b('0x3'));var jsonpatch=require(_0xb45b('0x4'));var rp=require(_0xb45b('0x5'));var moment=require(_0xb45b('0x6'));var BPromise=require(_0xb45b('0x7'));var Mustache=require(_0xb45b('0x8'));var util=require(_0xb45b('0x9'));var path=require(_0xb45b('0xa'));var sox=require(_0xb45b('0xb'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var _=require(_0xb45b('0xc'));var squel=require('squel');var crypto=require(_0xb45b('0xd'));var jsforce=require(_0xb45b('0xe'));var deskjs=require(_0xb45b('0xf'));var toCsv=require(_0xb45b('0x10'));var querystring=require('querystring');var Papa=require(_0xb45b('0x11'));var Redis=require('ioredis');var authService=require(_0xb45b('0x12'));var qs=require(_0xb45b('0x13'));var as=require(_0xb45b('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xb45b('0x15'));var utils=require(_0xb45b('0x16'));var config=require(_0xb45b('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4743fd,_0x1c12bb){_0x1c12bb=_0x1c12bb||0xcc;return function(_0x3d3e78){if(_0x3d3e78){return _0x4743fd[_0xb45b('0x18')](_0x1c12bb);}return _0x4743fd['status'](_0x1c12bb)['end']();};}function respondWithResult(_0x4626f1,_0x16de59){_0x16de59=_0x16de59||0xc8;return function(_0x10b686){if(_0x10b686){return _0x4626f1[_0xb45b('0x19')](_0x16de59)['json'](_0x10b686);}};}function respondWithFilteredResult(_0x563f96,_0xbbfaf1){return function(_0xf5fdb7){if(_0xf5fdb7){var _0x2c4254=_0xf5fdb7[_0xb45b('0x1a')],_0x133c16=_0xbbfaf1[_0xb45b('0x1b')],_0x11e806=_0xbbfaf1[_0xb45b('0x1b')]+_0xbbfaf1[_0xb45b('0x1c')],_0x1be5b1;if(_0x11e806>=_0x2c4254){_0x11e806=_0x2c4254;_0x1be5b1=0xc8;}else{_0x1be5b1=0xce;}_0x563f96[_0xb45b('0x19')](_0x1be5b1);return _0x563f96[_0xb45b('0x1d')](_0xb45b('0x1e'),_0x133c16+'-'+_0x11e806+'/'+_0x2c4254)[_0xb45b('0x1f')](_0xf5fdb7);}return null;};}function patchUpdates(_0x3b4d2d){return function(_0xf75bf1){try{jsonpatch[_0xb45b('0x20')](_0xf75bf1,_0x3b4d2d,!![]);}catch(_0x9417f){return BPromise['reject'](_0x9417f);}return _0xf75bf1[_0xb45b('0x21')]();};}function saveUpdates(_0x438f65,_0x38efa5){return function(_0x297635){if(_0x297635){return _0x297635[_0xb45b('0x22')](_0x438f65)[_0xb45b('0x23')](function(_0x52a375){return _0x52a375;});}return null;};}function removeEntity(_0x8ae730,_0x4f7f94){return function(_0x53e28c){if(_0x53e28c){return _0x53e28c[_0xb45b('0x24')]()[_0xb45b('0x23')](function(){_0x8ae730['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a85e2,_0x47e35f){return function(_0x203228){if(!_0x203228){_0x3a85e2[_0xb45b('0x18')](0x194);}return _0x203228;};}function handleError(_0x16a26b,_0x2e1500){_0x2e1500=_0x2e1500||0x1f4;return function(_0x5102fa){logger[_0xb45b('0x25')](_0x5102fa['stack']);if(_0x5102fa[_0xb45b('0x26')]){delete _0x5102fa[_0xb45b('0x26')];}_0x16a26b[_0xb45b('0x19')](_0x2e1500)[_0xb45b('0x27')](_0x5102fa);};}exports[_0xb45b('0x28')]=function(_0x2516c8,_0x11c27f){var _0x534c57={},_0x3fb7b6={},_0x2502cc={'count':0x0,'rows':[]};var _0x291f0d=_[_0xb45b('0x29')](db[_0xb45b('0x2a')][_0xb45b('0x2b')],function(_0x35e843){return{'name':_0x35e843[_0xb45b('0x2c')],'type':_0x35e843['type']['key']};});_0x3fb7b6[_0xb45b('0x2d')]=_['map'](_0x291f0d,_0xb45b('0x26'));_0x3fb7b6['query']=_[_0xb45b('0x2e')](_0x2516c8[_0xb45b('0x2f')]);_0x3fb7b6['filters']=_[_0xb45b('0x30')](_0x3fb7b6['model'],_0x3fb7b6[_0xb45b('0x2f')]);_0x534c57['attributes']=_[_0xb45b('0x30')](_0x3fb7b6[_0xb45b('0x2d')],qs['fields'](_0x2516c8[_0xb45b('0x2f')]['fields']));_0x534c57[_0xb45b('0x31')]=_0x534c57['attributes'][_0xb45b('0x32')]?_0x534c57[_0xb45b('0x31')]:_0x3fb7b6['model'];if(!_0x2516c8['query'][_0xb45b('0x33')](_0xb45b('0x34'))){_0x534c57[_0xb45b('0x1c')]=qs[_0xb45b('0x1c')](_0x2516c8[_0xb45b('0x2f')][_0xb45b('0x1c')]);_0x534c57[_0xb45b('0x1b')]=qs['offset'](_0x2516c8[_0xb45b('0x2f')][_0xb45b('0x1b')]);}_0x534c57[_0xb45b('0x35')]=qs[_0xb45b('0x36')](_0x2516c8[_0xb45b('0x2f')]['sort']);_0x534c57[_0xb45b('0x37')]=qs[_0xb45b('0x38')](_['pick'](_0x2516c8[_0xb45b('0x2f')],_0x3fb7b6[_0xb45b('0x38')]),_0x291f0d);if(_0x2516c8[_0xb45b('0x2f')]['filter']){_0x534c57['where']=_[_0xb45b('0x39')](_0x534c57[_0xb45b('0x37')],{'$or':_['map'](_0x291f0d,function(_0x19d264){if(_0x19d264['type']!==_0xb45b('0x3a')){var _0x4455f3={};_0x4455f3[_0x19d264[_0xb45b('0x26')]]={'$like':'%'+_0x2516c8[_0xb45b('0x2f')][_0xb45b('0x3b')]+'%'};return _0x4455f3;}})});}_0x534c57=_[_0xb45b('0x39')]({},_0x534c57,_0x2516c8[_0xb45b('0x3c')]);var _0x5f3492={'where':_0x534c57[_0xb45b('0x37')]};return db[_0xb45b('0x2a')][_0xb45b('0x1a')](_0x5f3492)[_0xb45b('0x23')](function(_0x4c1191){_0x2502cc[_0xb45b('0x1a')]=_0x4c1191;if(_0x2516c8[_0xb45b('0x2f')][_0xb45b('0x3d')]){_0x534c57[_0xb45b('0x3e')]=[{'all':!![]}];}return db[_0xb45b('0x2a')][_0xb45b('0x3f')](_0x534c57);})[_0xb45b('0x23')](function(_0x386185){_0x2502cc[_0xb45b('0x40')]=_0x386185;return _0x2502cc;})[_0xb45b('0x23')](respondWithFilteredResult(_0x11c27f,_0x534c57))[_0xb45b('0x41')](handleError(_0x11c27f,null));};exports[_0xb45b('0x42')]=function(_0x50a0f3,_0x568e8f){var _0x3c021f={'raw':!![],'where':{'id':_0x50a0f3[_0xb45b('0x43')]['id']}},_0x11d434={};_0x11d434[_0xb45b('0x2d')]=_['keys'](db[_0xb45b('0x2a')][_0xb45b('0x2b')]);_0x11d434['query']=_[_0xb45b('0x2e')](_0x50a0f3['query']);_0x11d434[_0xb45b('0x38')]=_[_0xb45b('0x30')](_0x11d434[_0xb45b('0x2d')],_0x11d434[_0xb45b('0x2f')]);_0x3c021f[_0xb45b('0x31')]=_['intersection'](_0x11d434[_0xb45b('0x2d')],qs[_0xb45b('0x44')](_0x50a0f3[_0xb45b('0x2f')][_0xb45b('0x44')]));_0x3c021f[_0xb45b('0x31')]=_0x3c021f['attributes']['length']?_0x3c021f[_0xb45b('0x31')]:_0x11d434[_0xb45b('0x2d')];if(_0x50a0f3['query'][_0xb45b('0x3d')]){_0x3c021f[_0xb45b('0x3e')]=[{'all':!![]}];}_0x3c021f=_['merge']({},_0x3c021f,_0x50a0f3[_0xb45b('0x3c')]);return db['WhatsappQueueReport'][_0xb45b('0x45')](_0x3c021f)[_0xb45b('0x23')](handleEntityNotFound(_0x568e8f,null))['then'](respondWithResult(_0x568e8f,null))[_0xb45b('0x41')](handleError(_0x568e8f,null));};exports['create']=function(_0x22cb45,_0x18f329){return db['WhatsappQueueReport'][_0xb45b('0x46')](_0x22cb45[_0xb45b('0x47')],{})['then'](respondWithResult(_0x18f329,0xc9))['catch'](handleError(_0x18f329,null));};exports[_0xb45b('0x22')]=function(_0x15a158,_0x47e466){if(_0x15a158['body']['id']){delete _0x15a158['body']['id'];}return db[_0xb45b('0x2a')][_0xb45b('0x45')]({'where':{'id':_0x15a158['params']['id']}})[_0xb45b('0x23')](handleEntityNotFound(_0x47e466,null))[_0xb45b('0x23')](saveUpdates(_0x15a158['body'],null))[_0xb45b('0x23')](respondWithResult(_0x47e466,null))[_0xb45b('0x41')](handleError(_0x47e466,null));};exports[_0xb45b('0x24')]=function(_0x408b10,_0x19d63e){return db[_0xb45b('0x2a')]['find']({'where':{'id':_0x408b10[_0xb45b('0x43')]['id']}})[_0xb45b('0x23')](handleEntityNotFound(_0x19d63e,null))['then'](removeEntity(_0x19d63e,null))[_0xb45b('0x41')](handleError(_0x19d63e,null));};exports[_0xb45b('0x48')]=function(_0x5281f1,_0x26194f){return db[_0xb45b('0x2a')][_0xb45b('0x48')]()[_0xb45b('0x23')](respondWithResult(_0x26194f,null))[_0xb45b('0x41')](handleError(_0x26194f,null));};
\ No newline at end of file
+var _0xdf0e=['zip-dir','fast-json-patch','request-promise','moment','util','path','to-csv','ejs','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','count','offset','limit','set','apply','update','then','end','sendStatus','error','stack','name','send','index','map','WhatsappQueueReport','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','pick','merge','VIRTUAL','filter','where','include','findAll','rows','catch','show','params','rawAttributes','includeAll','find','create','body','destroy','describe','html-pdf','eml-format','rimraf'];(function(_0x33128b,_0x5cea02){var _0x3adaac=function(_0x22dfe7){while(--_0x22dfe7){_0x33128b['push'](_0x33128b['shift']());}};_0x3adaac(++_0x5cea02);}(_0xdf0e,0xd5));var _0xedf0=function(_0x3fe6df,_0x5a04d4){_0x3fe6df=_0x3fe6df-0x0;var _0x372a0e=_0xdf0e[_0x3fe6df];return _0x372a0e;};'use strict';var pdf=require(_0xedf0('0x0'));var emlformat=require(_0xedf0('0x1'));var rimraf=require(_0xedf0('0x2'));var zipdir=require(_0xedf0('0x3'));var jsonpatch=require(_0xedf0('0x4'));var rp=require(_0xedf0('0x5'));var moment=require(_0xedf0('0x6'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xedf0('0x7'));var path=require(_0xedf0('0x8'));var sox=require('sox');var csv=require(_0xedf0('0x9'));var ejs=require(_0xedf0('0xa'));var fs=require('fs');var _=require(_0xedf0('0xb'));var squel=require('squel');var crypto=require(_0xedf0('0xc'));var jsforce=require(_0xedf0('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xedf0('0xe'));var Papa=require(_0xedf0('0xf'));var Redis=require(_0xedf0('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xedf0('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xedf0('0x12'));var logger=require(_0xedf0('0x13'))(_0xedf0('0x14'));var utils=require(_0xedf0('0x15'));var config=require(_0xedf0('0x16'));var db=require(_0xedf0('0x17'))['db'];function respondWithStatusCode(_0x25c21a,_0x163c9b){_0x163c9b=_0x163c9b||0xcc;return function(_0x11d091){if(_0x11d091){return _0x25c21a['sendStatus'](_0x163c9b);}return _0x25c21a[_0xedf0('0x18')](_0x163c9b)['end']();};}function respondWithResult(_0x4c7321,_0xe20d34){_0xe20d34=_0xe20d34||0xc8;return function(_0x38e90a){if(_0x38e90a){return _0x4c7321['status'](_0xe20d34)[_0xedf0('0x19')](_0x38e90a);}};}function respondWithFilteredResult(_0x43a665,_0x27d053){return function(_0x1d0f88){if(_0x1d0f88){var _0xc0444e=_0x1d0f88[_0xedf0('0x1a')],_0x429c98=_0x27d053[_0xedf0('0x1b')],_0x95f879=_0x27d053[_0xedf0('0x1b')]+_0x27d053[_0xedf0('0x1c')],_0x4359d6;if(_0x95f879>=_0xc0444e){_0x95f879=_0xc0444e;_0x4359d6=0xc8;}else{_0x4359d6=0xce;}_0x43a665['status'](_0x4359d6);return _0x43a665[_0xedf0('0x1d')]('Content-Range',_0x429c98+'-'+_0x95f879+'/'+_0xc0444e)[_0xedf0('0x19')](_0x1d0f88);}return null;};}function patchUpdates(_0x5e678c){return function(_0x4bdcb4){try{jsonpatch[_0xedf0('0x1e')](_0x4bdcb4,_0x5e678c,!![]);}catch(_0xac2e6e){return BPromise['reject'](_0xac2e6e);}return _0x4bdcb4['save']();};}function saveUpdates(_0x218013,_0x3f0845){return function(_0x32a292){if(_0x32a292){return _0x32a292[_0xedf0('0x1f')](_0x218013)[_0xedf0('0x20')](function(_0x238d3e){return _0x238d3e;});}return null;};}function removeEntity(_0x5b8ec1,_0x585873){return function(_0x42fb7b){if(_0x42fb7b){return _0x42fb7b['destroy']()[_0xedf0('0x20')](function(){_0x5b8ec1[_0xedf0('0x18')](0xcc)[_0xedf0('0x21')]();});}};}function handleEntityNotFound(_0x346bd9,_0x586645){return function(_0x262024){if(!_0x262024){_0x346bd9[_0xedf0('0x22')](0x194);}return _0x262024;};}function handleError(_0x4fdedb,_0x36cee6){_0x36cee6=_0x36cee6||0x1f4;return function(_0x14aa14){logger[_0xedf0('0x23')](_0x14aa14[_0xedf0('0x24')]);if(_0x14aa14[_0xedf0('0x25')]){delete _0x14aa14[_0xedf0('0x25')];}_0x4fdedb[_0xedf0('0x18')](_0x36cee6)[_0xedf0('0x26')](_0x14aa14);};}exports[_0xedf0('0x27')]=function(_0x543767,_0x1b7067){var _0xebfcb7={},_0x5314a2={},_0xae9e0d={'count':0x0,'rows':[]};var _0x858bb=_[_0xedf0('0x28')](db[_0xedf0('0x29')]['rawAttributes'],function(_0x331aa5){return{'name':_0x331aa5['fieldName'],'type':_0x331aa5[_0xedf0('0x2a')][_0xedf0('0x2b')]};});_0x5314a2[_0xedf0('0x2c')]=_[_0xedf0('0x28')](_0x858bb,_0xedf0('0x25'));_0x5314a2[_0xedf0('0x2d')]=_[_0xedf0('0x2e')](_0x543767['query']);_0x5314a2[_0xedf0('0x2f')]=_[_0xedf0('0x30')](_0x5314a2[_0xedf0('0x2c')],_0x5314a2['query']);_0xebfcb7[_0xedf0('0x31')]=_[_0xedf0('0x30')](_0x5314a2[_0xedf0('0x2c')],qs[_0xedf0('0x32')](_0x543767['query'][_0xedf0('0x32')]));_0xebfcb7[_0xedf0('0x31')]=_0xebfcb7[_0xedf0('0x31')][_0xedf0('0x33')]?_0xebfcb7[_0xedf0('0x31')]:_0x5314a2['model'];if(!_0x543767[_0xedf0('0x2d')][_0xedf0('0x34')]('nolimit')){_0xebfcb7[_0xedf0('0x1c')]=qs[_0xedf0('0x1c')](_0x543767['query'][_0xedf0('0x1c')]);_0xebfcb7[_0xedf0('0x1b')]=qs[_0xedf0('0x1b')](_0x543767[_0xedf0('0x2d')][_0xedf0('0x1b')]);}_0xebfcb7['order']=qs[_0xedf0('0x35')](_0x543767[_0xedf0('0x2d')]['sort']);_0xebfcb7['where']=qs[_0xedf0('0x2f')](_[_0xedf0('0x36')](_0x543767[_0xedf0('0x2d')],_0x5314a2[_0xedf0('0x2f')]),_0x858bb);if(_0x543767['query']['filter']){_0xebfcb7['where']=_[_0xedf0('0x37')](_0xebfcb7['where'],{'$or':_[_0xedf0('0x28')](_0x858bb,function(_0x107e01){if(_0x107e01[_0xedf0('0x2a')]!==_0xedf0('0x38')){var _0x2b90b6={};_0x2b90b6[_0x107e01[_0xedf0('0x25')]]={'$like':'%'+_0x543767[_0xedf0('0x2d')][_0xedf0('0x39')]+'%'};return _0x2b90b6;}})});}_0xebfcb7=_[_0xedf0('0x37')]({},_0xebfcb7,_0x543767['options']);var _0x400e4b={'where':_0xebfcb7[_0xedf0('0x3a')]};return db[_0xedf0('0x29')]['count'](_0x400e4b)[_0xedf0('0x20')](function(_0x33e898){_0xae9e0d[_0xedf0('0x1a')]=_0x33e898;if(_0x543767[_0xedf0('0x2d')]['includeAll']){_0xebfcb7[_0xedf0('0x3b')]=[{'all':!![]}];}return db[_0xedf0('0x29')][_0xedf0('0x3c')](_0xebfcb7);})['then'](function(_0x56c921){_0xae9e0d[_0xedf0('0x3d')]=_0x56c921;return _0xae9e0d;})['then'](respondWithFilteredResult(_0x1b7067,_0xebfcb7))[_0xedf0('0x3e')](handleError(_0x1b7067,null));};exports[_0xedf0('0x3f')]=function(_0xc8dd4c,_0xbad4a){var _0xb897f={'raw':!![],'where':{'id':_0xc8dd4c[_0xedf0('0x40')]['id']}},_0x466e18={};_0x466e18[_0xedf0('0x2c')]=_[_0xedf0('0x2e')](db[_0xedf0('0x29')][_0xedf0('0x41')]);_0x466e18['query']=_['keys'](_0xc8dd4c[_0xedf0('0x2d')]);_0x466e18[_0xedf0('0x2f')]=_[_0xedf0('0x30')](_0x466e18[_0xedf0('0x2c')],_0x466e18[_0xedf0('0x2d')]);_0xb897f[_0xedf0('0x31')]=_['intersection'](_0x466e18[_0xedf0('0x2c')],qs[_0xedf0('0x32')](_0xc8dd4c[_0xedf0('0x2d')][_0xedf0('0x32')]));_0xb897f['attributes']=_0xb897f[_0xedf0('0x31')][_0xedf0('0x33')]?_0xb897f[_0xedf0('0x31')]:_0x466e18[_0xedf0('0x2c')];if(_0xc8dd4c[_0xedf0('0x2d')][_0xedf0('0x42')]){_0xb897f[_0xedf0('0x3b')]=[{'all':!![]}];}_0xb897f=_[_0xedf0('0x37')]({},_0xb897f,_0xc8dd4c['options']);return db['WhatsappQueueReport'][_0xedf0('0x43')](_0xb897f)['then'](handleEntityNotFound(_0xbad4a,null))['then'](respondWithResult(_0xbad4a,null))[_0xedf0('0x3e')](handleError(_0xbad4a,null));};exports[_0xedf0('0x44')]=function(_0x561ed2,_0x55900d){return db['WhatsappQueueReport'][_0xedf0('0x44')](_0x561ed2[_0xedf0('0x45')],{})['then'](respondWithResult(_0x55900d,0xc9))['catch'](handleError(_0x55900d,null));};exports['update']=function(_0x29618c,_0x788731){if(_0x29618c[_0xedf0('0x45')]['id']){delete _0x29618c[_0xedf0('0x45')]['id'];}return db[_0xedf0('0x29')]['find']({'where':{'id':_0x29618c[_0xedf0('0x40')]['id']}})[_0xedf0('0x20')](handleEntityNotFound(_0x788731,null))[_0xedf0('0x20')](saveUpdates(_0x29618c[_0xedf0('0x45')],null))[_0xedf0('0x20')](respondWithResult(_0x788731,null))[_0xedf0('0x3e')](handleError(_0x788731,null));};exports[_0xedf0('0x46')]=function(_0x444fb7,_0x499881){return db[_0xedf0('0x29')][_0xedf0('0x43')]({'where':{'id':_0x444fb7['params']['id']}})['then'](handleEntityNotFound(_0x499881,null))[_0xedf0('0x20')](removeEntity(_0x499881,null))[_0xedf0('0x3e')](handleError(_0x499881,null));};exports[_0xedf0('0x47')]=function(_0x1cef16,_0x19cfee){return db[_0xedf0('0x29')][_0xedf0('0x47')]()[_0xedf0('0x20')](respondWithResult(_0x19cfee,null))[_0xedf0('0x3e')](handleError(_0x19cfee,null));};
\ No newline at end of file
diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.model.js b/server/api/whatsappQueueReport/whatsappQueueReport.model.js
index 410dfa7..2602cf8 100644
--- a/server/api/whatsappQueueReport/whatsappQueueReport.model.js
+++ b/server/api/whatsappQueueReport/whatsappQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6687=['./whatsappQueueReport.attributes','define','WhatsappQueueReport','report_whatsapp_queue','uniqueid','lodash','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment'];(function(_0x3efb26,_0x202d91){var _0x4bff6b=function(_0x51d1b6){while(--_0x51d1b6){_0x3efb26['push'](_0x3efb26['shift']());}};_0x4bff6b(++_0x202d91);}(_0x6687,0x1f3));var _0x7668=function(_0x3dfef9,_0xbdf53d){_0x3dfef9=_0x3dfef9-0x0;var _0x32e0fe=_0x6687[_0x3dfef9];return _0x32e0fe;};'use strict';var _=require(_0x7668('0x0'));var util=require(_0x7668('0x1'));var logger=require(_0x7668('0x2'))(_0x7668('0x3'));var moment=require(_0x7668('0x4'));var BPromise=require('bluebird');var rp=require(_0x7668('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7668('0x6'));var config=require(_0x7668('0x7'));var attributes=require(_0x7668('0x8'));module['exports']=function(_0xdfbe64,_0x125795){return _0xdfbe64[_0x7668('0x9')](_0x7668('0xa'),attributes,{'tableName':_0x7668('0xb'),'paranoid':![],'indexes':[{'name':_0x7668('0xc'),'fields':[_0x7668('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8cf2=['util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./whatsappQueueReport.attributes','define','WhatsappQueueReport','report_whatsapp_queue','uniqueid','lodash'];(function(_0x6cf19c,_0x2f3f02){var _0xce14f3=function(_0x474587){while(--_0x474587){_0x6cf19c['push'](_0x6cf19c['shift']());}};_0xce14f3(++_0x2f3f02);}(_0x8cf2,0x103));var _0x28cf=function(_0x227b44,_0x92c667){_0x227b44=_0x227b44-0x0;var _0x1fe89d=_0x8cf2[_0x227b44];return _0x1fe89d;};'use strict';var _=require(_0x28cf('0x0'));var util=require(_0x28cf('0x1'));var logger=require(_0x28cf('0x2'))(_0x28cf('0x3'));var moment=require(_0x28cf('0x4'));var BPromise=require(_0x28cf('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x28cf('0x6'));var config=require(_0x28cf('0x7'));var attributes=require(_0x28cf('0x8'));module['exports']=function(_0x1d2d8d,_0x4b7ad9){return _0x1d2d8d[_0x28cf('0x9')](_0x28cf('0xa'),attributes,{'tableName':_0x28cf('0xb'),'paranoid':![],'indexes':[{'name':_0x28cf('0xc'),'fields':[_0x28cf('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js b/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js
index 3eff629..c43c450 100644
--- a/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js
+++ b/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7ed9=['client','http','request','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','WhatsappQueueReport,\x20%s,\x20%s','message','info','result','catch','create','body','options','raw','then','CreateWhatsappQueueReport','UpdateWhatsappQueueReport','update','where','attributes','limit','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise'];(function(_0x2cc161,_0x562de0){var _0x22854c=function(_0x45b24f){while(--_0x45b24f){_0x2cc161['push'](_0x2cc161['shift']());}};_0x22854c(++_0x562de0);}(_0x7ed9,0x178));var _0x97ed=function(_0x431f91,_0x29f355){_0x431f91=_0x431f91-0x0;var _0x3a1fd8=_0x7ed9[_0x431f91];return _0x3a1fd8;};'use strict';var _=require(_0x97ed('0x0'));var util=require('util');var moment=require(_0x97ed('0x1'));var BPromise=require(_0x97ed('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x97ed('0x3'));var db=require(_0x97ed('0x4'))['db'];var utils=require(_0x97ed('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x97ed('0x6'));var jayson=require(_0x97ed('0x7'));var client=jayson[_0x97ed('0x8')][_0x97ed('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2195c4,_0x4ff114,_0x56dbf0){return new BPromise(function(_0xa3a205,_0x263d2e){return client[_0x97ed('0xa')](_0x2195c4,_0x56dbf0)['then'](function(_0x123516){logger['info']('WhatsappQueueReport,\x20%s,\x20%s',_0x4ff114,'request\x20sent');logger[_0x97ed('0xb')](_0x97ed('0xc'),_0x4ff114,_0x97ed('0xd'),JSON[_0x97ed('0xe')](_0x123516));if(_0x123516[_0x97ed('0xf')]){if(_0x123516['error']['code']===0x1f4){logger[_0x97ed('0xf')](_0x97ed('0x10'),_0x4ff114,_0x123516[_0x97ed('0xf')]['message']);return _0x263d2e(_0x123516[_0x97ed('0xf')]['message']);}logger['error'](_0x97ed('0x10'),_0x4ff114,_0x123516['error'][_0x97ed('0x11')]);return _0xa3a205(_0x123516['error']['message']);}else{logger[_0x97ed('0x12')](_0x97ed('0x10'),_0x4ff114,_0x97ed('0xd'));_0xa3a205(_0x123516[_0x97ed('0x13')][_0x97ed('0x11')]);}})[_0x97ed('0x14')](function(_0x50352b){logger[_0x97ed('0xf')](_0x97ed('0x10'),_0x4ff114,_0x50352b);_0x263d2e(_0x50352b);});});}exports['CreateWhatsappQueueReport']=function(_0x743c93){var _0x4ace6b=this;return new Promise(function(_0x2048d9,_0x484198){return db['WhatsappQueueReport'][_0x97ed('0x15')](_0x743c93[_0x97ed('0x16')],{'raw':_0x743c93[_0x97ed('0x17')]?_0x743c93[_0x97ed('0x17')][_0x97ed('0x18')]===undefined?!![]:![]:!![]})[_0x97ed('0x19')](function(_0x3caf9f){logger[_0x97ed('0x12')](_0x97ed('0x1a'),_0x743c93);logger[_0x97ed('0xb')](_0x97ed('0x1a'),_0x743c93,JSON[_0x97ed('0xe')](_0x3caf9f));_0x2048d9(_0x3caf9f);})[_0x97ed('0x14')](function(_0x4ea4e2){logger[_0x97ed('0xf')](_0x97ed('0x1a'),_0x4ea4e2[_0x97ed('0x11')],_0x743c93);_0x484198(_0x4ace6b[_0x97ed('0xf')](0x1f4,_0x4ea4e2[_0x97ed('0x11')]));});});};exports[_0x97ed('0x1b')]=function(_0x15a114){var _0x132917=this;return new Promise(function(_0x24c5f2,_0x421cbe){return db['WhatsappQueueReport'][_0x97ed('0x1c')](_0x15a114['body'],{'raw':_0x15a114['options']?_0x15a114[_0x97ed('0x17')][_0x97ed('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x15a114[_0x97ed('0x17')]?_0x15a114['options'][_0x97ed('0x1d')]||null:null,'attributes':_0x15a114[_0x97ed('0x17')]?_0x15a114[_0x97ed('0x17')][_0x97ed('0x1e')]||null:null,'limit':_0x15a114[_0x97ed('0x17')]?_0x15a114['options'][_0x97ed('0x1f')]||null:null})['then'](function(_0x42fbb4){logger[_0x97ed('0x12')](_0x97ed('0x1b'),_0x15a114);logger[_0x97ed('0xb')](_0x97ed('0x1b'),_0x15a114,JSON[_0x97ed('0xe')](_0x42fbb4));_0x24c5f2(_0x42fbb4);})[_0x97ed('0x14')](function(_0x576de4){logger['error'](_0x97ed('0x1b'),_0x576de4[_0x97ed('0x11')],_0x15a114);_0x421cbe(_0x132917[_0x97ed('0xf')](0x1f4,_0x576de4[_0x97ed('0x11')]));});});};
\ No newline at end of file
+var _0x674b=['error','code','WhatsappQueueReport,\x20%s,\x20%s','message','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','options','raw','UpdateWhatsappQueueReport','update','body','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x481bf7,_0x437f69){var _0x461787=function(_0xb3bc9d){while(--_0xb3bc9d){_0x481bf7['push'](_0x481bf7['shift']());}};_0x461787(++_0x437f69);}(_0x674b,0x10e));var _0xb674=function(_0xf20b6,_0x49ddbb){_0xf20b6=_0xf20b6-0x0;var _0x4ff567=_0x674b[_0xf20b6];return _0x4ff567;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xb674('0x0'));var BPromise=require(_0xb674('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb674('0x2'));var db=require(_0xb674('0x3'))['db'];var utils=require(_0xb674('0x4'));var logger=require(_0xb674('0x5'))(_0xb674('0x6'));var config=require(_0xb674('0x7'));var jayson=require(_0xb674('0x8'));var client=jayson[_0xb674('0x9')][_0xb674('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4b4f47,_0x27d5a7,_0x43a55c){return new BPromise(function(_0x343c9e,_0x1adab2){return client[_0xb674('0xb')](_0x4b4f47,_0x43a55c)[_0xb674('0xc')](function(_0x687df1){logger[_0xb674('0xd')]('WhatsappQueueReport,\x20%s,\x20%s',_0x27d5a7,_0xb674('0xe'));logger[_0xb674('0xf')](_0xb674('0x10'),_0x27d5a7,_0xb674('0xe'),JSON[_0xb674('0x11')](_0x687df1));if(_0x687df1[_0xb674('0x12')]){if(_0x687df1[_0xb674('0x12')][_0xb674('0x13')]===0x1f4){logger[_0xb674('0x12')](_0xb674('0x14'),_0x27d5a7,_0x687df1[_0xb674('0x12')][_0xb674('0x15')]);return _0x1adab2(_0x687df1['error']['message']);}logger[_0xb674('0x12')]('WhatsappQueueReport,\x20%s,\x20%s',_0x27d5a7,_0x687df1[_0xb674('0x12')]['message']);return _0x343c9e(_0x687df1[_0xb674('0x12')]['message']);}else{logger['info']('WhatsappQueueReport,\x20%s,\x20%s',_0x27d5a7,'request\x20sent');_0x343c9e(_0x687df1[_0xb674('0x16')]['message']);}})[_0xb674('0x17')](function(_0xc640e5){logger[_0xb674('0x12')]('WhatsappQueueReport,\x20%s,\x20%s',_0x27d5a7,_0xc640e5);_0x1adab2(_0xc640e5);});});}exports[_0xb674('0x18')]=function(_0x3b79c8){var _0x44444b=this;return new Promise(function(_0x124499,_0x18be0b){return db[_0xb674('0x19')][_0xb674('0x1a')](_0x3b79c8['body'],{'raw':_0x3b79c8[_0xb674('0x1b')]?_0x3b79c8[_0xb674('0x1b')][_0xb674('0x1c')]===undefined?!![]:![]:!![]})[_0xb674('0xc')](function(_0x9bd0a5){logger['info']('CreateWhatsappQueueReport',_0x3b79c8);logger['debug']('CreateWhatsappQueueReport',_0x3b79c8,JSON[_0xb674('0x11')](_0x9bd0a5));_0x124499(_0x9bd0a5);})[_0xb674('0x17')](function(_0x5ad086){logger[_0xb674('0x12')]('CreateWhatsappQueueReport',_0x5ad086[_0xb674('0x15')],_0x3b79c8);_0x18be0b(_0x44444b[_0xb674('0x12')](0x1f4,_0x5ad086[_0xb674('0x15')]));});});};exports[_0xb674('0x1d')]=function(_0x17db59){var _0x1d0681=this;return new Promise(function(_0x440f41,_0x170b9d){return db[_0xb674('0x19')][_0xb674('0x1e')](_0x17db59[_0xb674('0x1f')],{'raw':_0x17db59[_0xb674('0x1b')]?_0x17db59[_0xb674('0x1b')][_0xb674('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x17db59['options']?_0x17db59['options']['where']||null:null,'attributes':_0x17db59[_0xb674('0x1b')]?_0x17db59[_0xb674('0x1b')]['attributes']||null:null,'limit':_0x17db59[_0xb674('0x1b')]?_0x17db59['options']['limit']||null:null})[_0xb674('0xc')](function(_0x5eed50){logger[_0xb674('0xd')](_0xb674('0x1d'),_0x17db59);logger[_0xb674('0xf')](_0xb674('0x1d'),_0x17db59,JSON[_0xb674('0x11')](_0x5eed50));_0x440f41(_0x5eed50);})[_0xb674('0x17')](function(_0x2c0562){logger[_0xb674('0x12')](_0xb674('0x1d'),_0x2c0562[_0xb674('0x15')],_0x17db59);_0x170b9d(_0x1d0681[_0xb674('0x12')](0x1f4,_0x2c0562[_0xb674('0x15')]));});});};
\ No newline at end of file
diff --git a/server/api/whatsappTransferReport/index.js b/server/api/whatsappTransferReport/index.js
index 5fdd11b..bafd480 100644
--- a/server/api/whatsappTransferReport/index.js
+++ b/server/api/whatsappTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x70c8=['../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x3a7e01,_0x51204c){var _0x5b8398=function(_0x4dcfab){while(--_0x4dcfab){_0x3a7e01['push'](_0x3a7e01['shift']());}};_0x5b8398(++_0x51204c);}(_0x70c8,0x7d));var _0x870c=function(_0x2d374c,_0x46cc89){_0x2d374c=_0x2d374c-0x0;var _0x4c7954=_0x70c8[_0x2d374c];return _0x4c7954;};'use strict';var multer=require(_0x870c('0x0'));var util=require(_0x870c('0x1'));var path=require(_0x870c('0x2'));var timeout=require(_0x870c('0x3'));var express=require(_0x870c('0x4'));var router=express[_0x870c('0x5')]();var auth=require(_0x870c('0x6'));var interaction=require(_0x870c('0x7'));var config=require(_0x870c('0x8'));var controller=require('./whatsappTransferReport.controller');router[_0x870c('0x9')]('/',auth[_0x870c('0xa')](),controller['index']);router[_0x870c('0x9')](_0x870c('0xb'),auth['isAuthenticated'](),controller[_0x870c('0xc')]);router[_0x870c('0x9')](_0x870c('0xd'),auth[_0x870c('0xa')](),controller[_0x870c('0xe')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x870c('0xf')](_0x870c('0xd'),auth[_0x870c('0xa')](),controller[_0x870c('0x10')]);router['delete'](_0x870c('0xd'),auth[_0x870c('0xa')](),controller[_0x870c('0x11')]);module[_0x870c('0x12')]=router;
\ No newline at end of file
+var _0x3946=['create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','isAuthenticated','describe','/:id','show','post'];(function(_0x5097a5,_0x5688dd){var _0xf5d41e=function(_0x3e73d1){while(--_0x3e73d1){_0x5097a5['push'](_0x5097a5['shift']());}};_0xf5d41e(++_0x5688dd);}(_0x3946,0x10e));var _0x6394=function(_0x1f48e5,_0x451e6e){_0x1f48e5=_0x1f48e5-0x0;var _0x342f42=_0x3946[_0x1f48e5];return _0x342f42;};'use strict';var multer=require(_0x6394('0x0'));var util=require(_0x6394('0x1'));var path=require(_0x6394('0x2'));var timeout=require(_0x6394('0x3'));var express=require(_0x6394('0x4'));var router=express[_0x6394('0x5')]();var auth=require(_0x6394('0x6'));var interaction=require(_0x6394('0x7'));var config=require(_0x6394('0x8'));var controller=require('./whatsappTransferReport.controller');router[_0x6394('0x9')]('/',auth['isAuthenticated'](),controller[_0x6394('0xa')]);router[_0x6394('0x9')]('/describe',auth[_0x6394('0xb')](),controller[_0x6394('0xc')]);router[_0x6394('0x9')](_0x6394('0xd'),auth[_0x6394('0xb')](),controller[_0x6394('0xe')]);router[_0x6394('0xf')]('/',auth[_0x6394('0xb')](),controller[_0x6394('0x10')]);router[_0x6394('0x11')](_0x6394('0xd'),auth['isAuthenticated'](),controller[_0x6394('0x12')]);router[_0x6394('0x13')]('/:id',auth[_0x6394('0xb')](),controller[_0x6394('0x14')]);module[_0x6394('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js b/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js
index f5b7705..377bf7e 100644
--- a/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js
+++ b/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x757a=['queue','DATE','exports','STRING'];(function(_0x2046dd,_0x40a9ab){var _0x2eb055=function(_0x1c65e8){while(--_0x1c65e8){_0x2046dd['push'](_0x2046dd['shift']());}};_0x2eb055(++_0x40a9ab);}(_0x757a,0xde));var _0xa757=function(_0x36e8c4,_0x19251b){_0x36e8c4=_0x36e8c4-0x0;var _0x2c9886=_0x757a[_0x36e8c4];return _0x2c9886;};'use strict';var Sequelize=require('sequelize');module[_0xa757('0x0')]={'uniqueid':{'type':Sequelize[_0xa757('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM']('account','agent',_0xa757('0x2')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0xa757('0x3')]}};
\ No newline at end of file
+var _0x0b0e=['DATE','sequelize','STRING','account','agent','queue'];(function(_0x22b68a,_0x2bffc3){var _0x1ac67a=function(_0x25f9d5){while(--_0x25f9d5){_0x22b68a['push'](_0x22b68a['shift']());}};_0x1ac67a(++_0x2bffc3);}(_0x0b0e,0x187));var _0xe0b0=function(_0x139b63,_0x389ca8){_0x139b63=_0x139b63-0x0;var _0x2493f2=_0x0b0e[_0x139b63];return _0x2493f2;};'use strict';var Sequelize=require(_0xe0b0('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0xe0b0('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xe0b0('0x2'),_0xe0b0('0x3'),_0xe0b0('0x4')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0xe0b0('0x5')]}};
\ No newline at end of file
diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.controller.js b/server/api/whatsappTransferReport/whatsappTransferReport.controller.js
index b546589..8ce4d5f 100644
--- a/server/api/whatsappTransferReport/whatsappTransferReport.controller.js
+++ b/server/api/whatsappTransferReport/whatsappTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb708=['body','params','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','squel','crypto','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','count','offset','limit','set','Content-Range','save','update','destroy','then','stack','name','send','map','WhatsappTransferReport','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','filter','merge','VIRTUAL','includeAll','include','findAll','rows','keys','rawAttributes','find','catch','create'];(function(_0x58c62e,_0x1cfd49){var _0x545853=function(_0x26731e){while(--_0x26731e){_0x58c62e['push'](_0x58c62e['shift']());}};_0x545853(++_0x1cfd49);}(_0xb708,0x1d8));var _0x8b70=function(_0x205e5a,_0x5c19fb){_0x205e5a=_0x205e5a-0x0;var _0x10da58=_0xb708[_0x205e5a];return _0x10da58;};'use strict';var pdf=require('html-pdf');var emlformat=require('eml-format');var rimraf=require(_0x8b70('0x0'));var zipdir=require(_0x8b70('0x1'));var jsonpatch=require(_0x8b70('0x2'));var rp=require(_0x8b70('0x3'));var moment=require(_0x8b70('0x4'));var BPromise=require(_0x8b70('0x5'));var Mustache=require(_0x8b70('0x6'));var util=require(_0x8b70('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x8b70('0x8'));var ejs=require(_0x8b70('0x9'));var fs=require('fs');var _=require(_0x8b70('0xa'));var squel=require(_0x8b70('0xb'));var crypto=require(_0x8b70('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8b70('0xd'));var toCsv=require(_0x8b70('0x8'));var querystring=require('querystring');var Papa=require(_0x8b70('0xe'));var Redis=require('ioredis');var authService=require(_0x8b70('0xf'));var qs=require(_0x8b70('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8b70('0x11'));var logger=require(_0x8b70('0x12'))('api');var utils=require(_0x8b70('0x13'));var config=require(_0x8b70('0x14'));var db=require(_0x8b70('0x15'))['db'];function respondWithStatusCode(_0x252328,_0x5cb74b){_0x5cb74b=_0x5cb74b||0xcc;return function(_0x5031a2){if(_0x5031a2){return _0x252328[_0x8b70('0x16')](_0x5cb74b);}return _0x252328[_0x8b70('0x17')](_0x5cb74b)[_0x8b70('0x18')]();};}function respondWithResult(_0x1f30b1,_0x5f2630){_0x5f2630=_0x5f2630||0xc8;return function(_0x2e5254){if(_0x2e5254){return _0x1f30b1[_0x8b70('0x17')](_0x5f2630)[_0x8b70('0x19')](_0x2e5254);}};}function respondWithFilteredResult(_0x2d77f5,_0xac3854){return function(_0x14672b){if(_0x14672b){var _0x281c7b=_0x14672b[_0x8b70('0x1a')],_0x1e0a69=_0xac3854['offset'],_0x31a4da=_0xac3854[_0x8b70('0x1b')]+_0xac3854[_0x8b70('0x1c')],_0x4060c3;if(_0x31a4da>=_0x281c7b){_0x31a4da=_0x281c7b;_0x4060c3=0xc8;}else{_0x4060c3=0xce;}_0x2d77f5[_0x8b70('0x17')](_0x4060c3);return _0x2d77f5[_0x8b70('0x1d')](_0x8b70('0x1e'),_0x1e0a69+'-'+_0x31a4da+'/'+_0x281c7b)[_0x8b70('0x19')](_0x14672b);}return null;};}function patchUpdates(_0x5c0e8c){return function(_0xa17120){try{jsonpatch['apply'](_0xa17120,_0x5c0e8c,!![]);}catch(_0x98d354){return BPromise['reject'](_0x98d354);}return _0xa17120[_0x8b70('0x1f')]();};}function saveUpdates(_0x513dda,_0x202b7b){return function(_0x318ffe){if(_0x318ffe){return _0x318ffe[_0x8b70('0x20')](_0x513dda)['then'](function(_0x4ba213){return _0x4ba213;});}return null;};}function removeEntity(_0x39fb96,_0x76ca70){return function(_0x1f7f6c){if(_0x1f7f6c){return _0x1f7f6c[_0x8b70('0x21')]()[_0x8b70('0x22')](function(){_0x39fb96['status'](0xcc)[_0x8b70('0x18')]();});}};}function handleEntityNotFound(_0x996ea6,_0x50ab0d){return function(_0x23ce05){if(!_0x23ce05){_0x996ea6['sendStatus'](0x194);}return _0x23ce05;};}function handleError(_0x2c615d,_0x24d910){_0x24d910=_0x24d910||0x1f4;return function(_0x5cd57c){logger['error'](_0x5cd57c[_0x8b70('0x23')]);if(_0x5cd57c['name']){delete _0x5cd57c[_0x8b70('0x24')];}_0x2c615d[_0x8b70('0x17')](_0x24d910)[_0x8b70('0x25')](_0x5cd57c);};}exports['index']=function(_0x5a6c6d,_0x261f15){var _0x11ce25={},_0x3676d3={},_0x517feb={'count':0x0,'rows':[]};var _0x5e79eb=_[_0x8b70('0x26')](db[_0x8b70('0x27')]['rawAttributes'],function(_0x11c827){return{'name':_0x11c827['fieldName'],'type':_0x11c827[_0x8b70('0x28')][_0x8b70('0x29')]};});_0x3676d3[_0x8b70('0x2a')]=_[_0x8b70('0x26')](_0x5e79eb,_0x8b70('0x24'));_0x3676d3[_0x8b70('0x2b')]=_['keys'](_0x5a6c6d[_0x8b70('0x2b')]);_0x3676d3[_0x8b70('0x2c')]=_[_0x8b70('0x2d')](_0x3676d3[_0x8b70('0x2a')],_0x3676d3[_0x8b70('0x2b')]);_0x11ce25[_0x8b70('0x2e')]=_['intersection'](_0x3676d3[_0x8b70('0x2a')],qs[_0x8b70('0x2f')](_0x5a6c6d[_0x8b70('0x2b')]['fields']));_0x11ce25[_0x8b70('0x2e')]=_0x11ce25['attributes'][_0x8b70('0x30')]?_0x11ce25[_0x8b70('0x2e')]:_0x3676d3[_0x8b70('0x2a')];if(!_0x5a6c6d[_0x8b70('0x2b')][_0x8b70('0x31')]('nolimit')){_0x11ce25[_0x8b70('0x1c')]=qs['limit'](_0x5a6c6d[_0x8b70('0x2b')][_0x8b70('0x1c')]);_0x11ce25[_0x8b70('0x1b')]=qs['offset'](_0x5a6c6d[_0x8b70('0x2b')]['offset']);}_0x11ce25['order']=qs[_0x8b70('0x32')](_0x5a6c6d['query']['sort']);_0x11ce25[_0x8b70('0x33')]=qs['filters'](_['pick'](_0x5a6c6d[_0x8b70('0x2b')],_0x3676d3[_0x8b70('0x2c')]),_0x5e79eb);if(_0x5a6c6d[_0x8b70('0x2b')][_0x8b70('0x34')]){_0x11ce25[_0x8b70('0x33')]=_[_0x8b70('0x35')](_0x11ce25[_0x8b70('0x33')],{'$or':_[_0x8b70('0x26')](_0x5e79eb,function(_0xb2336b){if(_0xb2336b[_0x8b70('0x28')]!==_0x8b70('0x36')){var _0x1da8d9={};_0x1da8d9[_0xb2336b['name']]={'$like':'%'+_0x5a6c6d[_0x8b70('0x2b')][_0x8b70('0x34')]+'%'};return _0x1da8d9;}})});}_0x11ce25=_[_0x8b70('0x35')]({},_0x11ce25,_0x5a6c6d['options']);var _0x4c9c7e={'where':_0x11ce25['where']};return db[_0x8b70('0x27')][_0x8b70('0x1a')](_0x4c9c7e)[_0x8b70('0x22')](function(_0x16b5fd){_0x517feb[_0x8b70('0x1a')]=_0x16b5fd;if(_0x5a6c6d[_0x8b70('0x2b')][_0x8b70('0x37')]){_0x11ce25[_0x8b70('0x38')]=[{'all':!![]}];}return db['WhatsappTransferReport'][_0x8b70('0x39')](_0x11ce25);})[_0x8b70('0x22')](function(_0x440ad0){_0x517feb[_0x8b70('0x3a')]=_0x440ad0;return _0x517feb;})[_0x8b70('0x22')](respondWithFilteredResult(_0x261f15,_0x11ce25))['catch'](handleError(_0x261f15,null));};exports['show']=function(_0x2016be,_0x4b2fff){var _0x2aeedc={'raw':!![],'where':{'id':_0x2016be['params']['id']}},_0x1fe076={};_0x1fe076[_0x8b70('0x2a')]=_[_0x8b70('0x3b')](db[_0x8b70('0x27')][_0x8b70('0x3c')]);_0x1fe076[_0x8b70('0x2b')]=_[_0x8b70('0x3b')](_0x2016be[_0x8b70('0x2b')]);_0x1fe076['filters']=_[_0x8b70('0x2d')](_0x1fe076[_0x8b70('0x2a')],_0x1fe076['query']);_0x2aeedc[_0x8b70('0x2e')]=_[_0x8b70('0x2d')](_0x1fe076[_0x8b70('0x2a')],qs[_0x8b70('0x2f')](_0x2016be[_0x8b70('0x2b')][_0x8b70('0x2f')]));_0x2aeedc[_0x8b70('0x2e')]=_0x2aeedc['attributes']['length']?_0x2aeedc[_0x8b70('0x2e')]:_0x1fe076['model'];if(_0x2016be[_0x8b70('0x2b')][_0x8b70('0x37')]){_0x2aeedc['include']=[{'all':!![]}];}_0x2aeedc=_[_0x8b70('0x35')]({},_0x2aeedc,_0x2016be['options']);return db[_0x8b70('0x27')][_0x8b70('0x3d')](_0x2aeedc)[_0x8b70('0x22')](handleEntityNotFound(_0x4b2fff,null))[_0x8b70('0x22')](respondWithResult(_0x4b2fff,null))[_0x8b70('0x3e')](handleError(_0x4b2fff,null));};exports[_0x8b70('0x3f')]=function(_0x3c6c84,_0x44f1a7){return db[_0x8b70('0x27')]['create'](_0x3c6c84[_0x8b70('0x40')],{})['then'](respondWithResult(_0x44f1a7,0xc9))[_0x8b70('0x3e')](handleError(_0x44f1a7,null));};exports['update']=function(_0x30b03b,_0x50078e){if(_0x30b03b['body']['id']){delete _0x30b03b[_0x8b70('0x40')]['id'];}return db['WhatsappTransferReport'][_0x8b70('0x3d')]({'where':{'id':_0x30b03b[_0x8b70('0x41')]['id']}})[_0x8b70('0x22')](handleEntityNotFound(_0x50078e,null))['then'](saveUpdates(_0x30b03b[_0x8b70('0x40')],null))[_0x8b70('0x22')](respondWithResult(_0x50078e,null))['catch'](handleError(_0x50078e,null));};exports[_0x8b70('0x21')]=function(_0xc3b8c5,_0x1ccd51){return db[_0x8b70('0x27')][_0x8b70('0x3d')]({'where':{'id':_0xc3b8c5[_0x8b70('0x41')]['id']}})[_0x8b70('0x22')](handleEntityNotFound(_0x1ccd51,null))[_0x8b70('0x22')](removeEntity(_0x1ccd51,null))[_0x8b70('0x3e')](handleError(_0x1ccd51,null));};exports[_0x8b70('0x42')]=function(_0x3c195d,_0x4ea163){return db[_0x8b70('0x27')][_0x8b70('0x42')]()[_0x8b70('0x22')](respondWithResult(_0x4ea163,null))[_0x8b70('0x3e')](handleError(_0x4ea163,null));};
\ No newline at end of file
+var _0x4417=['findAll','rows','catch','show','params','keys','include','find','create','body','describe','html-pdf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','sendStatus','status','json','count','offset','limit','apply','reject','save','update','destroy','then','error','name','send','index','map','rawAttributes','model','query','filters','intersection','attributes','fields','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','WhatsappTransferReport','includeAll'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x4417,0x1bb));var _0x7441=function(_0x8e1031,_0x2882fb){_0x8e1031=_0x8e1031-0x0;var _0xd0002e=_0x4417[_0x8e1031];return _0xd0002e;};'use strict';var pdf=require(_0x7441('0x0'));var emlformat=require(_0x7441('0x1'));var rimraf=require(_0x7441('0x2'));var zipdir=require(_0x7441('0x3'));var jsonpatch=require(_0x7441('0x4'));var rp=require(_0x7441('0x5'));var moment=require('moment');var BPromise=require(_0x7441('0x6'));var Mustache=require(_0x7441('0x7'));var util=require(_0x7441('0x8'));var path=require(_0x7441('0x9'));var sox=require(_0x7441('0xa'));var csv=require('to-csv');var ejs=require(_0x7441('0xb'));var fs=require('fs');var _=require('lodash');var squel=require(_0x7441('0xc'));var crypto=require(_0x7441('0xd'));var jsforce=require(_0x7441('0xe'));var deskjs=require(_0x7441('0xf'));var toCsv=require(_0x7441('0x10'));var querystring=require(_0x7441('0x11'));var Papa=require(_0x7441('0x12'));var Redis=require(_0x7441('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x7441('0x14'));var as=require(_0x7441('0x15'));var hardwareService=require(_0x7441('0x16'));var logger=require('../../config/logger')(_0x7441('0x17'));var utils=require('../../config/utils');var config=require(_0x7441('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3d9992,_0x5b6034){_0x5b6034=_0x5b6034||0xcc;return function(_0x3ee7cf){if(_0x3ee7cf){return _0x3d9992[_0x7441('0x19')](_0x5b6034);}return _0x3d9992[_0x7441('0x1a')](_0x5b6034)['end']();};}function respondWithResult(_0x1dadf7,_0x50d5fb){_0x50d5fb=_0x50d5fb||0xc8;return function(_0x1c417b){if(_0x1c417b){return _0x1dadf7[_0x7441('0x1a')](_0x50d5fb)[_0x7441('0x1b')](_0x1c417b);}};}function respondWithFilteredResult(_0x3ef0a5,_0x4ad0a7){return function(_0x3cc8e4){if(_0x3cc8e4){var _0x284b08=_0x3cc8e4[_0x7441('0x1c')],_0x3012e5=_0x4ad0a7['offset'],_0x44087d=_0x4ad0a7[_0x7441('0x1d')]+_0x4ad0a7[_0x7441('0x1e')],_0x27a251;if(_0x44087d>=_0x284b08){_0x44087d=_0x284b08;_0x27a251=0xc8;}else{_0x27a251=0xce;}_0x3ef0a5[_0x7441('0x1a')](_0x27a251);return _0x3ef0a5['set']('Content-Range',_0x3012e5+'-'+_0x44087d+'/'+_0x284b08)[_0x7441('0x1b')](_0x3cc8e4);}return null;};}function patchUpdates(_0x20c047){return function(_0x6e677c){try{jsonpatch[_0x7441('0x1f')](_0x6e677c,_0x20c047,!![]);}catch(_0x1637df){return BPromise[_0x7441('0x20')](_0x1637df);}return _0x6e677c[_0x7441('0x21')]();};}function saveUpdates(_0x145709,_0x56560f){return function(_0x59c773){if(_0x59c773){return _0x59c773[_0x7441('0x22')](_0x145709)['then'](function(_0x31f1de){return _0x31f1de;});}return null;};}function removeEntity(_0x185fc5,_0x5120c2){return function(_0x314f11){if(_0x314f11){return _0x314f11[_0x7441('0x23')]()[_0x7441('0x24')](function(){_0x185fc5[_0x7441('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0xd0c091,_0x1b892d){return function(_0x2f4e1f){if(!_0x2f4e1f){_0xd0c091[_0x7441('0x19')](0x194);}return _0x2f4e1f;};}function handleError(_0xc63fa2,_0x281838){_0x281838=_0x281838||0x1f4;return function(_0x3471be){logger[_0x7441('0x25')](_0x3471be['stack']);if(_0x3471be[_0x7441('0x26')]){delete _0x3471be[_0x7441('0x26')];}_0xc63fa2[_0x7441('0x1a')](_0x281838)[_0x7441('0x27')](_0x3471be);};}exports[_0x7441('0x28')]=function(_0x2d4c34,_0x2da2da){var _0x3e4dd3={},_0x51bf9b={},_0x333f14={'count':0x0,'rows':[]};var _0x331c6a=_[_0x7441('0x29')](db['WhatsappTransferReport'][_0x7441('0x2a')],function(_0x4f2d46){return{'name':_0x4f2d46['fieldName'],'type':_0x4f2d46['type']['key']};});_0x51bf9b[_0x7441('0x2b')]=_[_0x7441('0x29')](_0x331c6a,'name');_0x51bf9b[_0x7441('0x2c')]=_['keys'](_0x2d4c34['query']);_0x51bf9b[_0x7441('0x2d')]=_[_0x7441('0x2e')](_0x51bf9b['model'],_0x51bf9b[_0x7441('0x2c')]);_0x3e4dd3[_0x7441('0x2f')]=_[_0x7441('0x2e')](_0x51bf9b[_0x7441('0x2b')],qs[_0x7441('0x30')](_0x2d4c34[_0x7441('0x2c')][_0x7441('0x30')]));_0x3e4dd3[_0x7441('0x2f')]=_0x3e4dd3[_0x7441('0x2f')]['length']?_0x3e4dd3[_0x7441('0x2f')]:_0x51bf9b[_0x7441('0x2b')];if(!_0x2d4c34[_0x7441('0x2c')]['hasOwnProperty'](_0x7441('0x31'))){_0x3e4dd3[_0x7441('0x1e')]=qs[_0x7441('0x1e')](_0x2d4c34[_0x7441('0x2c')][_0x7441('0x1e')]);_0x3e4dd3[_0x7441('0x1d')]=qs[_0x7441('0x1d')](_0x2d4c34[_0x7441('0x2c')][_0x7441('0x1d')]);}_0x3e4dd3[_0x7441('0x32')]=qs[_0x7441('0x33')](_0x2d4c34[_0x7441('0x2c')][_0x7441('0x33')]);_0x3e4dd3[_0x7441('0x34')]=qs[_0x7441('0x2d')](_[_0x7441('0x35')](_0x2d4c34[_0x7441('0x2c')],_0x51bf9b[_0x7441('0x2d')]),_0x331c6a);if(_0x2d4c34['query'][_0x7441('0x36')]){_0x3e4dd3[_0x7441('0x34')]=_[_0x7441('0x37')](_0x3e4dd3[_0x7441('0x34')],{'$or':_[_0x7441('0x29')](_0x331c6a,function(_0x237279){if(_0x237279[_0x7441('0x38')]!==_0x7441('0x39')){var _0x1f11eb={};_0x1f11eb[_0x237279[_0x7441('0x26')]]={'$like':'%'+_0x2d4c34[_0x7441('0x2c')][_0x7441('0x36')]+'%'};return _0x1f11eb;}})});}_0x3e4dd3=_[_0x7441('0x37')]({},_0x3e4dd3,_0x2d4c34[_0x7441('0x3a')]);var _0x5816d3={'where':_0x3e4dd3[_0x7441('0x34')]};return db[_0x7441('0x3b')][_0x7441('0x1c')](_0x5816d3)['then'](function(_0x3dbe1c){_0x333f14[_0x7441('0x1c')]=_0x3dbe1c;if(_0x2d4c34[_0x7441('0x2c')][_0x7441('0x3c')]){_0x3e4dd3['include']=[{'all':!![]}];}return db[_0x7441('0x3b')][_0x7441('0x3d')](_0x3e4dd3);})[_0x7441('0x24')](function(_0x5b1ee9){_0x333f14[_0x7441('0x3e')]=_0x5b1ee9;return _0x333f14;})[_0x7441('0x24')](respondWithFilteredResult(_0x2da2da,_0x3e4dd3))[_0x7441('0x3f')](handleError(_0x2da2da,null));};exports[_0x7441('0x40')]=function(_0x17e706,_0x72d957){var _0x46d9cf={'raw':!![],'where':{'id':_0x17e706[_0x7441('0x41')]['id']}},_0x5b02b5={};_0x5b02b5[_0x7441('0x2b')]=_[_0x7441('0x42')](db[_0x7441('0x3b')][_0x7441('0x2a')]);_0x5b02b5[_0x7441('0x2c')]=_[_0x7441('0x42')](_0x17e706[_0x7441('0x2c')]);_0x5b02b5[_0x7441('0x2d')]=_[_0x7441('0x2e')](_0x5b02b5[_0x7441('0x2b')],_0x5b02b5['query']);_0x46d9cf[_0x7441('0x2f')]=_[_0x7441('0x2e')](_0x5b02b5['model'],qs[_0x7441('0x30')](_0x17e706[_0x7441('0x2c')]['fields']));_0x46d9cf['attributes']=_0x46d9cf['attributes']['length']?_0x46d9cf['attributes']:_0x5b02b5['model'];if(_0x17e706[_0x7441('0x2c')][_0x7441('0x3c')]){_0x46d9cf[_0x7441('0x43')]=[{'all':!![]}];}_0x46d9cf=_[_0x7441('0x37')]({},_0x46d9cf,_0x17e706['options']);return db[_0x7441('0x3b')][_0x7441('0x44')](_0x46d9cf)[_0x7441('0x24')](handleEntityNotFound(_0x72d957,null))[_0x7441('0x24')](respondWithResult(_0x72d957,null))[_0x7441('0x3f')](handleError(_0x72d957,null));};exports['create']=function(_0x268fc1,_0x531a45){return db['WhatsappTransferReport'][_0x7441('0x45')](_0x268fc1[_0x7441('0x46')],{})[_0x7441('0x24')](respondWithResult(_0x531a45,0xc9))[_0x7441('0x3f')](handleError(_0x531a45,null));};exports['update']=function(_0x343ee6,_0x51e657){if(_0x343ee6[_0x7441('0x46')]['id']){delete _0x343ee6['body']['id'];}return db['WhatsappTransferReport']['find']({'where':{'id':_0x343ee6[_0x7441('0x41')]['id']}})[_0x7441('0x24')](handleEntityNotFound(_0x51e657,null))[_0x7441('0x24')](saveUpdates(_0x343ee6['body'],null))[_0x7441('0x24')](respondWithResult(_0x51e657,null))['catch'](handleError(_0x51e657,null));};exports['destroy']=function(_0x5150cd,_0x58ce18){return db[_0x7441('0x3b')][_0x7441('0x44')]({'where':{'id':_0x5150cd['params']['id']}})[_0x7441('0x24')](handleEntityNotFound(_0x58ce18,null))[_0x7441('0x24')](removeEntity(_0x58ce18,null))['catch'](handleError(_0x58ce18,null));};exports['describe']=function(_0x3582e8,_0x28dbf7){return db[_0x7441('0x3b')][_0x7441('0x47')]()[_0x7441('0x24')](respondWithResult(_0x28dbf7,null))['catch'](handleError(_0x28dbf7,null));};
\ No newline at end of file
diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.model.js b/server/api/whatsappTransferReport/whatsappTransferReport.model.js
index 4811c3f..3732982 100644
--- a/server/api/whatsappTransferReport/whatsappTransferReport.model.js
+++ b/server/api/whatsappTransferReport/whatsappTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x60c1=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappTransferReport.attributes','exports','WhatsappTransferReport','report_whatsapp_transfer','uniqueid'];(function(_0x229de7,_0x4850d1){var _0x12e031=function(_0x5b2369){while(--_0x5b2369){_0x229de7['push'](_0x229de7['shift']());}};_0x12e031(++_0x4850d1);}(_0x60c1,0x1c0));var _0x160c=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x60c1[_0x40a045];return _0x1a687c;};'use strict';var _=require('lodash');var util=require(_0x160c('0x0'));var logger=require(_0x160c('0x1'))(_0x160c('0x2'));var moment=require(_0x160c('0x3'));var BPromise=require(_0x160c('0x4'));var rp=require(_0x160c('0x5'));var fs=require('fs');var path=require(_0x160c('0x6'));var rimraf=require(_0x160c('0x7'));var config=require(_0x160c('0x8'));var attributes=require(_0x160c('0x9'));module[_0x160c('0xa')]=function(_0x3127e7,_0x3fe67c){return _0x3127e7['define'](_0x160c('0xb'),attributes,{'tableName':_0x160c('0xc'),'paranoid':![],'indexes':[{'name':_0x160c('0xd'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x0348=['bluebird','path','rimraf','../../config/environment','./whatsappTransferReport.attributes','exports','define','WhatsappTransferReport','report_whatsapp_transfer','uniqueid','util','../../config/logger'];(function(_0x487a38,_0x126142){var _0xc5197d=function(_0x53715d){while(--_0x53715d){_0x487a38['push'](_0x487a38['shift']());}};_0xc5197d(++_0x126142);}(_0x0348,0x172));var _0x8034=function(_0x38080e,_0x95512d){_0x38080e=_0x38080e-0x0;var _0x4e4c87=_0x0348[_0x38080e];return _0x4e4c87;};'use strict';var _=require('lodash');var util=require(_0x8034('0x0'));var logger=require(_0x8034('0x1'))('api');var moment=require('moment');var BPromise=require(_0x8034('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8034('0x3'));var rimraf=require(_0x8034('0x4'));var config=require(_0x8034('0x5'));var attributes=require(_0x8034('0x6'));module[_0x8034('0x7')]=function(_0x4f2bef,_0x11e9d8){return _0x4f2bef[_0x8034('0x8')](_0x8034('0x9'),attributes,{'tableName':_0x8034('0xa'),'paranoid':![],'indexes':[{'name':_0x8034('0xb'),'fields':[_0x8034('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js b/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js
index 499715e..8a1544f 100644
--- a/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js
+++ b/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['http','info','WhatsappTransferReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappTransferReport,\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(_0x11b70a,_0x5030fd){var _0x399cac=function(_0x4e1d25){while(--_0x4e1d25){_0x11b70a['push'](_0x11b70a['shift']());}};_0x399cac(++_0x5030fd);}(_0xa9e0,0x123));var _0x0a9e=function(_0x484e36,_0x4482d8){_0x484e36=_0x484e36-0x0;var _0xafc85d=_0xa9e0[_0x484e36];return _0xafc85d;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','WhatsappTransferReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappTransferReport,\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(_0x553dfe,_0x4253d6){var _0x106b5d=function(_0xeacc99){while(--_0xeacc99){_0x553dfe['push'](_0x553dfe['shift']());}};_0x106b5d(++_0x4253d6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x45e98e,_0x169b60){_0x45e98e=_0x45e98e-0x0;var _0x374dba=_0xa9e0[_0x45e98e];return _0x374dba;};'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/app.js b/server/app.js
index 3073135..d283362 100644
--- a/server/app.js
+++ b/server/app.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa1de=['online','name','join','./config/seedDB','default','./config/license','exit','lodash','./mysqldb','./rpc','./config/logger','app','./config/pm2','./config/pm2/config','listen','then','info','start','Online\x20apps:','map','filter'];(function(_0x297eea,_0x5060be){var _0x1c42d2=function(_0x3afff4){while(--_0x3afff4){_0x297eea['push'](_0x297eea['shift']());}};_0x1c42d2(++_0x5060be);}(_0xa1de,0x70));var _0xea1d=function(_0x4ae43e,_0x236ca7){_0x4ae43e=_0x4ae43e-0x0;var _0x3ef83d=_0xa1de[_0x4ae43e];return _0x3ef83d;};'use strict';var _=require(_0xea1d('0x0'));var mysqldb=require(_0xea1d('0x1'));var rpc=require(_0xea1d('0x2'));var config=require('./config/environment');var logger=require(_0xea1d('0x3'))(_0xea1d('0x4'));var pm2=require(_0xea1d('0x5'));var pm2Config=require(_0xea1d('0x6'));var schedule=require('./config/schedule');var chat=require('./config/schedule/chat');function main(){return mysqldb['db']['sequelize']['sync']()['then'](function(){return rpc[_0xea1d('0x7')]();})[_0xea1d('0x8')](function(_0x4c859f){logger[_0xea1d('0x9')](_0x4c859f);return chat[_0xea1d('0xa')]();})['then'](function(){return schedule[_0xea1d('0xa')]();})[_0xea1d('0x8')](function(_0x547903){logger[_0xea1d('0x9')](_0x547903);return pm2[_0xea1d('0xa')](pm2Config);})[_0xea1d('0x8')](function(_0x53d224){logger[_0xea1d('0x9')](_0xea1d('0xb'),_[_0xea1d('0xc')](_[_0xea1d('0xd')](_0x53d224,{'status':_0xea1d('0xe')}),_0xea1d('0xf'))[_0xea1d('0x10')]());logger[_0xea1d('0x9')]('Offline\x20apps:',_[_0xea1d('0xc')](_[_0xea1d('0xd')](_0x53d224,function(_0xa6ea0a){return _0xa6ea0a['status']!==_0xea1d('0xe');}),_0xea1d('0xf'))[_0xea1d('0x10')]()||'None');config['seedDB']&&require(_0xea1d('0x11'))[_0xea1d('0x12')]();require(_0xea1d('0x13'))[_0xea1d('0x12')]();})['catch'](function(_0x41e4a1){logger['error']('Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s',_0x41e4a1);process[_0xea1d('0x14')](0x1);});}main();
\ No newline at end of file
+var _0xf1b1=['Online\x20apps:','map','filter','name','join','Offline\x20apps:','status','online','None','seedDB','./config/seedDB','default','./config/license','catch','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','./mysqldb','./rpc','app','./config/pm2','./config/pm2/config','./config/schedule','sequelize','then','listen','info','start'];(function(_0x3b2e81,_0x16effb){var _0x15bdbf=function(_0x876e4a){while(--_0x876e4a){_0x3b2e81['push'](_0x3b2e81['shift']());}};_0x15bdbf(++_0x16effb);}(_0xf1b1,0x16f));var _0x1f1b=function(_0x54d5c8,_0x344ce5){_0x54d5c8=_0x54d5c8-0x0;var _0x525e2e=_0xf1b1[_0x54d5c8];return _0x525e2e;};'use strict';var _=require('lodash');var mysqldb=require(_0x1f1b('0x0'));var rpc=require(_0x1f1b('0x1'));var config=require('./config/environment');var logger=require('./config/logger')(_0x1f1b('0x2'));var pm2=require(_0x1f1b('0x3'));var pm2Config=require(_0x1f1b('0x4'));var schedule=require(_0x1f1b('0x5'));var chat=require('./config/schedule/chat');function main(){return mysqldb['db'][_0x1f1b('0x6')]['sync']()[_0x1f1b('0x7')](function(){return rpc[_0x1f1b('0x8')]();})[_0x1f1b('0x7')](function(_0xb81490){logger[_0x1f1b('0x9')](_0xb81490);return chat['start']();})['then'](function(){return schedule['start']();})[_0x1f1b('0x7')](function(_0x5cb0b0){logger[_0x1f1b('0x9')](_0x5cb0b0);return pm2[_0x1f1b('0xa')](pm2Config);})[_0x1f1b('0x7')](function(_0x27ab36){logger[_0x1f1b('0x9')](_0x1f1b('0xb'),_[_0x1f1b('0xc')](_[_0x1f1b('0xd')](_0x27ab36,{'status':'online'}),_0x1f1b('0xe'))[_0x1f1b('0xf')]());logger[_0x1f1b('0x9')](_0x1f1b('0x10'),_[_0x1f1b('0xc')](_['filter'](_0x27ab36,function(_0x506f4c){return _0x506f4c[_0x1f1b('0x11')]!==_0x1f1b('0x12');}),_0x1f1b('0xe'))['join']()||_0x1f1b('0x13'));config[_0x1f1b('0x14')]&&require(_0x1f1b('0x15'))[_0x1f1b('0x16')]();require(_0x1f1b('0x17'))[_0x1f1b('0x16')]();})[_0x1f1b('0x18')](function(_0x49898f){logger['error'](_0x1f1b('0x19'),_0x49898f);process[_0x1f1b('0x1a')](0x1);});}main();
\ No newline at end of file
diff --git a/server/components/auth/service.js b/server/components/auth/service.js
index e0fa927..13c215d 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 _0xdb28=['use','user','ChatInteraction','findOne','params','closed','status','disposition','json','unmanaged','Unmanaged.','Forbidden.','isAuthenticated','authorization','User','find','name','then','pass','Wrong\x20credentials.','catch','startsWith','headers','Bearer','Unknown\x20authorization\x20format','apikey','getUuid','query','sub','apiKeyNonce','nonce','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','Invalid\x20API\x20access\x20key','User\x20not\x20found.','User\x20object\x20not\x20found.','canUpdate','../../config/license/util','update','Forbidden','isMiddleware','signToken','setTokenCookie','cookie','motion.token','redirect','send','isNil','generateApiKey','apiKeyIat','regenerateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','promisify','sign','secret','secrets','options','verify','randomBytes','toString','hex','floor','now','../../mysqldb','../../config/environment','../../config/license/hardware','lodash','express-jwt','composable-middleware','basic-auth','crypto','bluebird','session','role','internal','email','userpic','permissions','md5secret','voicePause','chatPause','faxPause','smsPause','openchannelPause','showWebBar','lastLoginAt','crudPermissions','allowmessenger','passwordResetAt','alias','phoneBarAutoAnswer','phoneBarEnableDtmfTone','phoneBarEnableSettings','phoneBarExpires','phoneBarPrefixRequired','phoneBarRemoteControl','phoneBarRemoteControlPort','hotdesk','interface','userProfileId','isChatInteractionAuthorized'];(function(_0x250ada,_0x3d92c9){var _0x2d31ac=function(_0x3337c5){while(--_0x3337c5){_0x250ada['push'](_0x250ada['shift']());}};_0x2d31ac(++_0x3d92c9);}(_0xdb28,0x106));var _0x8db2=function(_0x52c964,_0x1cd2cf){_0x52c964=_0x52c964-0x0;var _0x4b74d6=_0xdb28[_0x52c964];return _0x4b74d6;};'use strict';var db=require(_0x8db2('0x0'))['db'];var config=require(_0x8db2('0x1'));var hardwareConf=require(_0x8db2('0x2'));var _=require(_0x8db2('0x3'));var jwt=require('jsonwebtoken');var expressJwt=require(_0x8db2('0x4'));var compose=require(_0x8db2('0x5'));var basicAuth=require(_0x8db2('0x6'));var crypto=require(_0x8db2('0x7'));var BPromise=require(_0x8db2('0x8'));var validateJwt=expressJwt({'secret':config['secrets'][_0x8db2('0x9')]});var userAttributes=['id',_0x8db2('0xa'),'fullname','name',_0x8db2('0xb'),_0x8db2('0xc'),_0x8db2('0xd'),_0x8db2('0xe'),_0x8db2('0xf'),_0x8db2('0x10'),_0x8db2('0x11'),'mailPause',_0x8db2('0x12'),_0x8db2('0x13'),_0x8db2('0x14'),'pauseType',_0x8db2('0x15'),_0x8db2('0x16'),'lastPauseAt',_0x8db2('0x17'),_0x8db2('0x18'),_0x8db2('0x19'),_0x8db2('0x1a'),_0x8db2('0x1b'),'phoneBarAutoAnswerDelay','phoneBarEnableRecording',_0x8db2('0x1c'),_0x8db2('0x1d'),_0x8db2('0x1e'),_0x8db2('0x1f'),_0x8db2('0x20'),_0x8db2('0x21'),_0x8db2('0x22'),_0x8db2('0x23'),_0x8db2('0x24')];exports[_0x8db2('0x25')]=function(){return this['isAuthenticated'](!![])[_0x8db2('0x26')](function(_0x24da1b,_0x48101e,_0x2b3f73){if(_0x24da1b[_0x8db2('0x27')]){_0x2b3f73();}else{return db[_0x8db2('0x28')][_0x8db2('0x29')]({'where':{'id':_0x24da1b[_0x8db2('0x2a')]['id']},'attributes':['id',_0x8db2('0x2b'),'disposition'],'raw':!![]})['then'](function(_0x77789){if(_0x77789&&_0x77789[_0x8db2('0x2b')]){return _0x48101e[_0x8db2('0x2c')](_0x77789[_0x8db2('0x2d')]==='unmanaged'?0x195:0x193)[_0x8db2('0x2e')]({'message':_0x77789[_0x8db2('0x2d')]===_0x8db2('0x2f')?_0x8db2('0x30'):_0x8db2('0x31')});}else{_0x2b3f73();}})['catch'](function(_0x124467){_0x2b3f73(_0x124467);});}});};exports[_0x8db2('0x32')]=function isAuthenticated(_0x18f69c){return compose()[_0x8db2('0x26')](function(_0x2260d8,_0x21704c,_0x796ec1){if(_0x2260d8['headers'][_0x8db2('0x33')]){if(_['startsWith'](_0x2260d8['headers']['authorization'],'Basic')){var _0xec8cd2=basicAuth(_0x2260d8);db[_0x8db2('0x34')][_0x8db2('0x35')]({'where':{'name':_0xec8cd2[_0x8db2('0x36')]}})[_0x8db2('0x37')](function(_0x8d4f54){if(!_0x8d4f54||!_0x8d4f54['authenticate'](_0xec8cd2[_0x8db2('0x38')])){return _0x21704c[_0x8db2('0x2c')](0x191)[_0x8db2('0x2e')]({'message':_0x8db2('0x39')});}_0x2260d8['user']={'id':_0x8d4f54['id']};_0x796ec1();})[_0x8db2('0x3a')](function(_0x11f398){_0x796ec1(_0x11f398);});}else if(_[_0x8db2('0x3b')](_0x2260d8[_0x8db2('0x3c')][_0x8db2('0x33')],_0x8db2('0x3d'))){validateJwt(_0x2260d8,_0x21704c,_0x796ec1);}else{if(_0x18f69c){_0x796ec1();}else{return _0x21704c[_0x8db2('0x2c')](0x193)[_0x8db2('0x2e')]({'message':_0x8db2('0x3e')});}}}else if(_0x2260d8['query'][_0x8db2('0x3f')]){try{var _0x50b28d={'audience':hardwareConf['getUuid'](),'issuer':hardwareConf[_0x8db2('0x40')]()};verifyJwt(_0x2260d8[_0x8db2('0x41')][_0x8db2('0x3f')],_0x50b28d)['then'](function(_0x42b272){return db['User'][_0x8db2('0x35')]({'where':{'id':_0x42b272[_0x8db2('0x42')]}})[_0x8db2('0x37')](function(_0x4d9e26){if(!_0x4d9e26||!_['isEqual'](_0x4d9e26[_0x8db2('0x43')],_0x42b272[_0x8db2('0x44')])){return _0x21704c['status'](0x191)['json']({'message':_0x8db2('0x45')});}_0x2260d8[_0x8db2('0x27')]={'id':_0x4d9e26['id']};_0x796ec1();});})[_0x8db2('0x3a')](function(){return _0x21704c[_0x8db2('0x2c')](0x191)[_0x8db2('0x2e')]({'message':_0x8db2('0x46')});});}catch(_0x101711){_0x796ec1(_0x101711);}}else if(_0x18f69c){_0x796ec1();}else{return _0x21704c[_0x8db2('0x2c')](0x193)[_0x8db2('0x2e')]({'message':_0x8db2('0x3e')});}})['use'](function(_0x1ab5eb,_0x304a72,_0x5d2a5b){if(_0x1ab5eb[_0x8db2('0x27')]){db[_0x8db2('0x34')]['find']({'where':{'id':_0x1ab5eb['user']['id']},'attributes':userAttributes})[_0x8db2('0x37')](function(_0x4a45dd){if(!_0x4a45dd){return _0x304a72[_0x8db2('0x2c')](0x194)[_0x8db2('0x2e')]({'message':_0x8db2('0x47')});}_0x1ab5eb[_0x8db2('0x27')]=_0x4a45dd;_0x5d2a5b();})['catch'](function(_0x2d3e98){_0x5d2a5b(_0x2d3e98);});}else if(_0x18f69c){_0x5d2a5b();}else{return _0x304a72['status'](0x194)[_0x8db2('0x2e')]({'message':_0x8db2('0x48')});}});};exports[_0x8db2('0x49')]=function canUpdate(){return compose()[_0x8db2('0x26')](function(_0x50e88a,_0x50ee17,_0x2acd1f){return require(_0x8db2('0x4a'))['getLicense']()[_0x8db2('0x37')](function(_0x24bcfe){if(_0x24bcfe[_0x8db2('0x4b')]){_0x2acd1f();}else{return _0x50ee17['status'](0x193)[_0x8db2('0x2e')]({'message':_0x8db2('0x4c')});}})[_0x8db2('0x3a')](function(_0x279e74){_0x2acd1f(_0x279e74);});});};exports[_0x8db2('0x4d')]=function(_0x40d82a,_0x380046,_0x1575ea){_0x40d82a[_0x8db2('0x4d')]=!![];return _0x1575ea();};exports[_0x8db2('0x4e')]=function signToken(_0x21cf7c){return signJwt(_0x21cf7c);};exports[_0x8db2('0x4f')]=function(_0x1d9025,_0x4a1c60){if(!_0x1d9025[_0x8db2('0x27')]){return _0x4a1c60[_0x8db2('0x2c')](0x194)['json']({'message':'It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.'});}var _0x249c73={'payload':{'id':_0x1d9025['user']['id'],'role':_0x1d9025[_0x8db2('0x27')][_0x8db2('0xa')]},'options':{'expiresIn':0x15180}};return signJwt(_0x249c73)[_0x8db2('0x37')](function(_0x307783){_0x4a1c60[_0x8db2('0x50')](_0x8db2('0x51'),_0x307783);_0x4a1c60[_0x8db2('0x52')]('/dashboards/general');})[_0x8db2('0x3a')](function(_0x3d44de){return _0x4a1c60[_0x8db2('0x2c')](0x1f4)[_0x8db2('0x53')](_0x3d44de);});};exports['retrieveApiKey']=function(_0x424c27){if(_[_0x8db2('0x54')](_0x424c27[_0x8db2('0x43')])||_[_0x8db2('0x54')](_0x424c27['apiKeyIat'])){return null;}else{return createJwt(_0x424c27);}};exports[_0x8db2('0x55')]=function(_0x4e0749){_0x4e0749[_0x8db2('0x43')]=generateNonce();_0x4e0749[_0x8db2('0x56')]=generateIssuedAt();return createJwt(_0x4e0749);};exports[_0x8db2('0x57')]=function(_0x4d2164,_0x4b0e72){var _0x1ec3d0=_0x4d2164['query'][_0x8db2('0x3f')];if(_0x1ec3d0){var _0x467866={'nonce':_0x4b0e72[_0x8db2('0x43')],'iat':_0x4b0e72[_0x8db2('0x56')],'audience':hardwareConf[_0x8db2('0x40')](),'issuer':hardwareConf[_0x8db2('0x40')]()};return verifyJwt(_0x1ec3d0,_0x467866)[_0x8db2('0x37')](function(){return generateApiKey(_0x4b0e72);});}else{throw{'message':_0x8db2('0x58')};}};function signJwt(_0x4291e3){var _0x12a1ef=BPromise[_0x8db2('0x59')](jwt[_0x8db2('0x5a')],{'context':jwt});var _0x532180=_0x4291e3[_0x8db2('0x5b')]||config[_0x8db2('0x5c')][_0x8db2('0x9')];return new BPromise(function(_0x3244db,_0x4f5018){_0x12a1ef(_0x4291e3['payload'],_0x532180,_0x4291e3[_0x8db2('0x5d')])[_0x8db2('0x37')](function(_0x164020){_0x3244db(_0x164020);})['catch'](function(_0x540d90){_0x4f5018(_0x540d90);});});}function verifyJwt(_0x494d6e,_0x44ac56,_0x368c37){var _0x55c7dd=BPromise[_0x8db2('0x59')](jwt[_0x8db2('0x5e')],{'context':jwt});var _0x4195ef=_0x368c37||config[_0x8db2('0x5c')]['session'];return new BPromise(function(_0x5329e6,_0x3d29bc){_0x55c7dd(_0x494d6e,_0x4195ef,_0x44ac56)[_0x8db2('0x37')](function(_0x2908e4){_0x5329e6(_0x2908e4);})[_0x8db2('0x3a')](function(_0x3daed6){_0x3d29bc(_0x3daed6);});});}function generateNonce(){return crypto[_0x8db2('0x5f')](0x10)[_0x8db2('0x60')](_0x8db2('0x61'));}function generateIssuedAt(){return Math[_0x8db2('0x62')](Date[_0x8db2('0x63')]()/0x3e8)[_0x8db2('0x60')]();}function createJwt(_0x319273){var _0x345c74={'payload':{'iat':_0x319273[_0x8db2('0x56')],'nonce':_0x319273[_0x8db2('0x43')]},'options':{'algorithm':'HS512','subject':_0x319273['id'][_0x8db2('0x60')](),'issuer':hardwareConf[_0x8db2('0x40')](),'audience':hardwareConf['getUuid']()}};return signJwt(_0x345c74)[_0x8db2('0x37')](function(_0xd78022){return{'iat':_0x319273[_0x8db2('0x56')],'nonce':_0x319273['apiKeyNonce'],'token':_0xd78022};});}
\ No newline at end of file
+var _0x5f2f=['send','retrieveApiKey','isNil','apiKeyIat','generateApiKey','regenerateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','promisify','sign','secret','payload','options','verify','toString','hex','now','HS512','../../mysqldb','../../config/environment','../../config/license/hardware','lodash','jsonwebtoken','express-jwt','composable-middleware','basic-auth','secrets','session','role','fullname','name','internal','userpic','permissions','md5secret','chatPause','mailPause','faxPause','openchannelPause','lastLoginAt','lastPauseAt','allowmessenger','passwordResetAt','alias','phoneBarAutoAnswer','phoneBarAutoAnswerDelay','phoneBarEnableRecording','phoneBarEnableSettings','phoneBarExpires','phoneBarPrefixRequired','phoneBarRemoteControl','phoneBarRemoteControlPort','interface','userProfileId','isChatInteractionAuthorized','isAuthenticated','use','user','ChatInteraction','findOne','params','closed','disposition','then','unmanaged','Unmanaged.','catch','headers','authorization','startsWith','Basic','User','find','authenticate','pass','json','Wrong\x20credentials.','Bearer','status','apikey','getUuid','query','isEqual','apiKeyNonce','nonce','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','Invalid\x20API\x20access\x20key','User\x20not\x20found.','canUpdate','../../config/license/util','getLicense','update','Forbidden','isMiddleware','signToken','setTokenCookie','cookie','motion.token','/dashboards/general'];(function(_0x278e3c,_0x1c9cfd){var _0x3e2d9b=function(_0x34d928){while(--_0x34d928){_0x278e3c['push'](_0x278e3c['shift']());}};_0x3e2d9b(++_0x1c9cfd);}(_0x5f2f,0x73));var _0xf5f2=function(_0x2df939,_0x537d39){_0x2df939=_0x2df939-0x0;var _0x294c83=_0x5f2f[_0x2df939];return _0x294c83;};'use strict';var db=require(_0xf5f2('0x0'))['db'];var config=require(_0xf5f2('0x1'));var hardwareConf=require(_0xf5f2('0x2'));var _=require(_0xf5f2('0x3'));var jwt=require(_0xf5f2('0x4'));var expressJwt=require(_0xf5f2('0x5'));var compose=require(_0xf5f2('0x6'));var basicAuth=require(_0xf5f2('0x7'));var crypto=require('crypto');var BPromise=require('bluebird');var validateJwt=expressJwt({'secret':config[_0xf5f2('0x8')][_0xf5f2('0x9')]});var userAttributes=['id',_0xf5f2('0xa'),_0xf5f2('0xb'),_0xf5f2('0xc'),_0xf5f2('0xd'),'email',_0xf5f2('0xe'),_0xf5f2('0xf'),_0xf5f2('0x10'),'voicePause',_0xf5f2('0x11'),_0xf5f2('0x12'),_0xf5f2('0x13'),'smsPause',_0xf5f2('0x14'),'pauseType','showWebBar',_0xf5f2('0x15'),_0xf5f2('0x16'),'crudPermissions',_0xf5f2('0x17'),_0xf5f2('0x18'),_0xf5f2('0x19'),_0xf5f2('0x1a'),_0xf5f2('0x1b'),_0xf5f2('0x1c'),'phoneBarEnableDtmfTone',_0xf5f2('0x1d'),_0xf5f2('0x1e'),_0xf5f2('0x1f'),_0xf5f2('0x20'),_0xf5f2('0x21'),'hotdesk',_0xf5f2('0x22'),_0xf5f2('0x23')];exports[_0xf5f2('0x24')]=function(){return this[_0xf5f2('0x25')](!![])[_0xf5f2('0x26')](function(_0x3a9dbb,_0xdb61b3,_0x395a5a){if(_0x3a9dbb[_0xf5f2('0x27')]){_0x395a5a();}else{return db[_0xf5f2('0x28')][_0xf5f2('0x29')]({'where':{'id':_0x3a9dbb[_0xf5f2('0x2a')]['id']},'attributes':['id',_0xf5f2('0x2b'),_0xf5f2('0x2c')],'raw':!![]})[_0xf5f2('0x2d')](function(_0x626999){if(_0x626999&&_0x626999[_0xf5f2('0x2b')]){return _0xdb61b3['status'](_0x626999[_0xf5f2('0x2c')]===_0xf5f2('0x2e')?0x195:0x193)['json']({'message':_0x626999['disposition']===_0xf5f2('0x2e')?_0xf5f2('0x2f'):'Forbidden.'});}else{_0x395a5a();}})[_0xf5f2('0x30')](function(_0x170042){_0x395a5a(_0x170042);});}});};exports[_0xf5f2('0x25')]=function isAuthenticated(_0x39c024){return compose()[_0xf5f2('0x26')](function(_0x4c691a,_0x21cd91,_0x4669a6){if(_0x4c691a[_0xf5f2('0x31')][_0xf5f2('0x32')]){if(_[_0xf5f2('0x33')](_0x4c691a['headers']['authorization'],_0xf5f2('0x34'))){var _0x3f79d5=basicAuth(_0x4c691a);db[_0xf5f2('0x35')][_0xf5f2('0x36')]({'where':{'name':_0x3f79d5[_0xf5f2('0xc')]}})[_0xf5f2('0x2d')](function(_0x13a3be){if(!_0x13a3be||!_0x13a3be[_0xf5f2('0x37')](_0x3f79d5[_0xf5f2('0x38')])){return _0x21cd91['status'](0x191)[_0xf5f2('0x39')]({'message':_0xf5f2('0x3a')});}_0x4c691a[_0xf5f2('0x27')]={'id':_0x13a3be['id']};_0x4669a6();})[_0xf5f2('0x30')](function(_0x198c73){_0x4669a6(_0x198c73);});}else if(_[_0xf5f2('0x33')](_0x4c691a['headers']['authorization'],_0xf5f2('0x3b'))){validateJwt(_0x4c691a,_0x21cd91,_0x4669a6);}else{if(_0x39c024){_0x4669a6();}else{return _0x21cd91[_0xf5f2('0x3c')](0x193)[_0xf5f2('0x39')]({'message':'Unknown\x20authorization\x20format'});}}}else if(_0x4c691a['query'][_0xf5f2('0x3d')]){try{var _0x50b8a2={'audience':hardwareConf[_0xf5f2('0x3e')](),'issuer':hardwareConf[_0xf5f2('0x3e')]()};verifyJwt(_0x4c691a[_0xf5f2('0x3f')]['apikey'],_0x50b8a2)['then'](function(_0x2f4778){return db['User'][_0xf5f2('0x36')]({'where':{'id':_0x2f4778['sub']}})[_0xf5f2('0x2d')](function(_0x31087c){if(!_0x31087c||!_[_0xf5f2('0x40')](_0x31087c[_0xf5f2('0x41')],_0x2f4778[_0xf5f2('0x42')])){return _0x21cd91[_0xf5f2('0x3c')](0x191)[_0xf5f2('0x39')]({'message':_0xf5f2('0x43')});}_0x4c691a['user']={'id':_0x31087c['id']};_0x4669a6();});})[_0xf5f2('0x30')](function(){return _0x21cd91[_0xf5f2('0x3c')](0x191)[_0xf5f2('0x39')]({'message':_0xf5f2('0x44')});});}catch(_0x1408b9){_0x4669a6(_0x1408b9);}}else if(_0x39c024){_0x4669a6();}else{return _0x21cd91[_0xf5f2('0x3c')](0x193)[_0xf5f2('0x39')]({'message':'Unknown\x20authorization\x20format'});}})[_0xf5f2('0x26')](function(_0xf503e8,_0x55989d,_0x3fc168){if(_0xf503e8['user']){db[_0xf5f2('0x35')][_0xf5f2('0x36')]({'where':{'id':_0xf503e8[_0xf5f2('0x27')]['id']},'attributes':userAttributes})[_0xf5f2('0x2d')](function(_0x59a6dd){if(!_0x59a6dd){return _0x55989d['status'](0x194)[_0xf5f2('0x39')]({'message':_0xf5f2('0x45')});}_0xf503e8[_0xf5f2('0x27')]=_0x59a6dd;_0x3fc168();})['catch'](function(_0x41447f){_0x3fc168(_0x41447f);});}else if(_0x39c024){_0x3fc168();}else{return _0x55989d['status'](0x194)[_0xf5f2('0x39')]({'message':'User\x20object\x20not\x20found.'});}});};exports[_0xf5f2('0x46')]=function canUpdate(){return compose()[_0xf5f2('0x26')](function(_0x5337a6,_0x29694f,_0x46eb22){return require(_0xf5f2('0x47'))[_0xf5f2('0x48')]()['then'](function(_0x5d2d82){if(_0x5d2d82[_0xf5f2('0x49')]){_0x46eb22();}else{return _0x29694f[_0xf5f2('0x3c')](0x193)[_0xf5f2('0x39')]({'message':_0xf5f2('0x4a')});}})[_0xf5f2('0x30')](function(_0xe62b57){_0x46eb22(_0xe62b57);});});};exports[_0xf5f2('0x4b')]=function(_0x4c0ac7,_0x110fe5,_0x3b4ea6){_0x4c0ac7['isMiddleware']=!![];return _0x3b4ea6();};exports[_0xf5f2('0x4c')]=function signToken(_0x3f3895){return signJwt(_0x3f3895);};exports[_0xf5f2('0x4d')]=function(_0x85b6d0,_0xd10701){if(!_0x85b6d0[_0xf5f2('0x27')]){return _0xd10701[_0xf5f2('0x3c')](0x194)[_0xf5f2('0x39')]({'message':'It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.'});}var _0x31c3c={'payload':{'id':_0x85b6d0[_0xf5f2('0x27')]['id'],'role':_0x85b6d0[_0xf5f2('0x27')]['role']},'options':{'expiresIn':0x15180}};return signJwt(_0x31c3c)['then'](function(_0x59eb00){_0xd10701[_0xf5f2('0x4e')](_0xf5f2('0x4f'),_0x59eb00);_0xd10701['redirect'](_0xf5f2('0x50'));})[_0xf5f2('0x30')](function(_0x28e33f){return _0xd10701[_0xf5f2('0x3c')](0x1f4)[_0xf5f2('0x51')](_0x28e33f);});};exports[_0xf5f2('0x52')]=function(_0x1a6ec1){if(_[_0xf5f2('0x53')](_0x1a6ec1[_0xf5f2('0x41')])||_[_0xf5f2('0x53')](_0x1a6ec1[_0xf5f2('0x54')])){return null;}else{return createJwt(_0x1a6ec1);}};exports[_0xf5f2('0x55')]=function(_0x4252a3){_0x4252a3[_0xf5f2('0x41')]=generateNonce();_0x4252a3['apiKeyIat']=generateIssuedAt();return createJwt(_0x4252a3);};exports[_0xf5f2('0x56')]=function(_0x578c93,_0x3d62c1){var _0xc04f44=_0x578c93[_0xf5f2('0x3f')][_0xf5f2('0x3d')];if(_0xc04f44){var _0x31bf0e={'nonce':_0x3d62c1[_0xf5f2('0x41')],'iat':_0x3d62c1['apiKeyIat'],'audience':hardwareConf[_0xf5f2('0x3e')](),'issuer':hardwareConf[_0xf5f2('0x3e')]()};return verifyJwt(_0xc04f44,_0x31bf0e)[_0xf5f2('0x2d')](function(){return generateApiKey(_0x3d62c1);});}else{throw{'message':_0xf5f2('0x57')};}};function signJwt(_0x12124d){var _0x10753a=BPromise[_0xf5f2('0x58')](jwt[_0xf5f2('0x59')],{'context':jwt});var _0x5e6071=_0x12124d[_0xf5f2('0x5a')]||config[_0xf5f2('0x8')][_0xf5f2('0x9')];return new BPromise(function(_0x492eea,_0x1177ba){_0x10753a(_0x12124d[_0xf5f2('0x5b')],_0x5e6071,_0x12124d[_0xf5f2('0x5c')])['then'](function(_0x57a7cb){_0x492eea(_0x57a7cb);})[_0xf5f2('0x30')](function(_0x27c472){_0x1177ba(_0x27c472);});});}function verifyJwt(_0x5db519,_0x14aa81,_0x533cca){var _0x740321=BPromise['promisify'](jwt[_0xf5f2('0x5d')],{'context':jwt});var _0x5d9120=_0x533cca||config[_0xf5f2('0x8')][_0xf5f2('0x9')];return new BPromise(function(_0xbb658c,_0x11a083){_0x740321(_0x5db519,_0x5d9120,_0x14aa81)['then'](function(_0x3154c1){_0xbb658c(_0x3154c1);})[_0xf5f2('0x30')](function(_0x4f6b01){_0x11a083(_0x4f6b01);});});}function generateNonce(){return crypto['randomBytes'](0x10)[_0xf5f2('0x5e')](_0xf5f2('0x5f'));}function generateIssuedAt(){return Math['floor'](Date[_0xf5f2('0x60')]()/0x3e8)[_0xf5f2('0x5e')]();}function createJwt(_0x29c9b6){var _0x41b1c7={'payload':{'iat':_0x29c9b6['apiKeyIat'],'nonce':_0x29c9b6['apiKeyNonce']},'options':{'algorithm':_0xf5f2('0x61'),'subject':_0x29c9b6['id'][_0xf5f2('0x5e')](),'issuer':hardwareConf['getUuid'](),'audience':hardwareConf[_0xf5f2('0x3e')]()}};return signJwt(_0x41b1c7)[_0xf5f2('0x2d')](function(_0x255125){return{'iat':_0x29c9b6[_0xf5f2('0x54')],'nonce':_0x29c9b6[_0xf5f2('0x41')],'token':_0x255125};});}
\ No newline at end of file
diff --git a/server/components/encryptor/index.js b/server/components/encryptor/index.js
index a2ca970..90af82b 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 _0xa9e0=['update','close','crypto','bluebird','aes192','hasOwnProperty','encryptFile','createReadStream','createCipher','algorithm','data','final','binary','write','end','unlink','decryptFile'];(function(_0x3d044e,_0x268380){var _0x43008a=function(_0x2e7b7f){while(--_0x2e7b7f){_0x3d044e['push'](_0x3d044e['shift']());}};_0x43008a(++_0x268380);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xa9e0[_0x1facfa];return _0x9ec701;};'use strict';var crypto=require(_0x0a9e('0x0'));var fs=require('fs');var BPromise=require(_0x0a9e('0x1'));var defaultOptions={'algorithm':_0x0a9e('0x2')};function combineOptions(_0x5dd881){var _0x550fbc={};for(var _0x18d5c9 in defaultOptions){if(defaultOptions['hasOwnProperty'](_0x18d5c9)){_0x550fbc[_0x18d5c9]=defaultOptions[_0x18d5c9];}}if(_0x5dd881){for(var _0x333808 in _0x5dd881){if(_0x5dd881[_0x0a9e('0x3')](_0x333808)){_0x550fbc[_0x333808]=_0x5dd881[_0x333808];}}}return _0x550fbc;}exports[_0x0a9e('0x4')]=function(_0x991246,_0x981158,_0x57b080,_0x219af0){return new BPromise(function(_0x441e3a,_0x2cc193){_0x219af0=combineOptions(_0x219af0);var _0x5f41ea=new Buffer(_0x57b080);var _0x503809=fs[_0x0a9e('0x5')](_0x991246);var _0x56465b=fs['createWriteStream'](_0x981158);var _0x39753a=crypto[_0x0a9e('0x6')](_0x219af0[_0x0a9e('0x7')],_0x5f41ea);_0x503809['on'](_0x0a9e('0x8'),function(_0xfeb75b){var _0xbd1168=new Buffer(_0x39753a['update'](_0xfeb75b),'binary');_0x56465b['write'](_0xbd1168);});_0x503809['on']('end',function(){try{var _0x273d4d=new Buffer(_0x39753a[_0x0a9e('0x9')](_0x0a9e('0xa')),_0x0a9e('0xa'));_0x56465b[_0x0a9e('0xb')](_0x273d4d);_0x56465b[_0x0a9e('0xc')]();_0x56465b['on']('close',function(){return _0x441e3a(_0x981158);});}catch(_0x4283ce){fs[_0x0a9e('0xd')](_0x981158);return _0x2cc193(_0x4283ce);}});});};exports[_0x0a9e('0xe')]=function(_0x281129,_0x44dcfd,_0x4d5611,_0x52a03d){return new BPromise(function(_0x22dccb,_0x5d0880){_0x52a03d=combineOptions(_0x52a03d);var _0x1985b6=new Buffer(_0x4d5611);var _0x519dfd=fs[_0x0a9e('0x5')](_0x281129);var _0x12066b=fs['createWriteStream'](_0x44dcfd);var _0x225616=crypto['createDecipher'](_0x52a03d[_0x0a9e('0x7')],_0x1985b6);_0x519dfd['on'](_0x0a9e('0x8'),function(_0x106033){var _0x205fd6=new Buffer(_0x225616[_0x0a9e('0xf')](_0x106033),_0x0a9e('0xa'));_0x12066b[_0x0a9e('0xb')](_0x205fd6);});_0x519dfd['on'](_0x0a9e('0xc'),function(){try{var _0x1314ae=new Buffer(_0x225616[_0x0a9e('0x9')](_0x0a9e('0xa')),_0x0a9e('0xa'));_0x12066b['write'](_0x1314ae);_0x12066b[_0x0a9e('0xc')]();_0x12066b['on'](_0x0a9e('0x10'),function(){return _0x22dccb(_0x44dcfd);});}catch(_0x53682f){fs[_0x0a9e('0xd')](_0x44dcfd);return _0x5d0880(_0x53682f);}});});};
\ No newline at end of file
+var _0xa9e0=['update','close','crypto','bluebird','aes192','hasOwnProperty','encryptFile','createReadStream','createCipher','algorithm','data','final','binary','write','end','unlink','decryptFile'];(function(_0x27a916,_0x19d785){var _0x1daf53=function(_0x292451){while(--_0x292451){_0x27a916['push'](_0x27a916['shift']());}};_0x1daf53(++_0x19d785);}(_0xa9e0,0x123));var _0x0a9e=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xa9e0[_0x43d11d];return _0x38cd08;};'use strict';var crypto=require(_0x0a9e('0x0'));var fs=require('fs');var BPromise=require(_0x0a9e('0x1'));var defaultOptions={'algorithm':_0x0a9e('0x2')};function combineOptions(_0x5dd881){var _0x550fbc={};for(var _0x18d5c9 in defaultOptions){if(defaultOptions['hasOwnProperty'](_0x18d5c9)){_0x550fbc[_0x18d5c9]=defaultOptions[_0x18d5c9];}}if(_0x5dd881){for(var _0x333808 in _0x5dd881){if(_0x5dd881[_0x0a9e('0x3')](_0x333808)){_0x550fbc[_0x333808]=_0x5dd881[_0x333808];}}}return _0x550fbc;}exports[_0x0a9e('0x4')]=function(_0x991246,_0x981158,_0x57b080,_0x219af0){return new BPromise(function(_0x441e3a,_0x2cc193){_0x219af0=combineOptions(_0x219af0);var _0x5f41ea=new Buffer(_0x57b080);var _0x503809=fs[_0x0a9e('0x5')](_0x991246);var _0x56465b=fs['createWriteStream'](_0x981158);var _0x39753a=crypto[_0x0a9e('0x6')](_0x219af0[_0x0a9e('0x7')],_0x5f41ea);_0x503809['on'](_0x0a9e('0x8'),function(_0xfeb75b){var _0xbd1168=new Buffer(_0x39753a['update'](_0xfeb75b),'binary');_0x56465b['write'](_0xbd1168);});_0x503809['on']('end',function(){try{var _0x273d4d=new Buffer(_0x39753a[_0x0a9e('0x9')](_0x0a9e('0xa')),_0x0a9e('0xa'));_0x56465b[_0x0a9e('0xb')](_0x273d4d);_0x56465b[_0x0a9e('0xc')]();_0x56465b['on']('close',function(){return _0x441e3a(_0x981158);});}catch(_0x4283ce){fs[_0x0a9e('0xd')](_0x981158);return _0x2cc193(_0x4283ce);}});});};exports[_0x0a9e('0xe')]=function(_0x281129,_0x44dcfd,_0x4d5611,_0x52a03d){return new BPromise(function(_0x22dccb,_0x5d0880){_0x52a03d=combineOptions(_0x52a03d);var _0x1985b6=new Buffer(_0x4d5611);var _0x519dfd=fs[_0x0a9e('0x5')](_0x281129);var _0x12066b=fs['createWriteStream'](_0x44dcfd);var _0x225616=crypto['createDecipher'](_0x52a03d[_0x0a9e('0x7')],_0x1985b6);_0x519dfd['on'](_0x0a9e('0x8'),function(_0x106033){var _0x205fd6=new Buffer(_0x225616[_0x0a9e('0xf')](_0x106033),_0x0a9e('0xa'));_0x12066b[_0x0a9e('0xb')](_0x205fd6);});_0x519dfd['on'](_0x0a9e('0xc'),function(){try{var _0x1314ae=new Buffer(_0x225616[_0x0a9e('0x9')](_0x0a9e('0xa')),_0x0a9e('0xa'));_0x12066b['write'](_0x1314ae);_0x12066b[_0x0a9e('0xc')]();_0x12066b['on'](_0x0a9e('0x10'),function(){return _0x22dccb(_0x44dcfd);});}catch(_0x53682f){fs[_0x0a9e('0xd')](_0x44dcfd);return _0x5d0880(_0x53682f);}});});};
\ No newline at end of file
diff --git a/server/components/export/csv.js b/server/components/export/csv.js
index 6a4ae6a..40ef30b 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 _0xaa88=['join','each','csv','writeFileSync','%s.%s','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','util','path','lodash','to-csv','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','argv','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV','find','split','then','splitSizeCsv','sequelize','query','num','Empty','length','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','push','SELECT','dirname','basename','existsSync','mkdirSync'];(function(_0x3df161,_0x276432){var _0x47a29c=function(_0x3eba79){while(--_0x3eba79){_0x3df161['push'](_0x3df161['shift']());}};_0x47a29c(++_0x276432);}(_0xaa88,0x137));var _0x8aa8=function(_0x1cb18a,_0x33167a){_0x1cb18a=_0x1cb18a-0x0;var _0x22442e=_0xaa88[_0x1cb18a];return _0x22442e;};'use strict';var util=require(_0x8aa8('0x0'));var path=require(_0x8aa8('0x1'));var _=require(_0x8aa8('0x2'));var csv=require(_0x8aa8('0x3'));var fs=require('fs');var BPromise=require('bluebird');var zipdir=require(_0x8aa8('0x4'));var rimraf=require(_0x8aa8('0x5'));var db=require(_0x8aa8('0x6'))['db'];var dbH=require(_0x8aa8('0x6'))[_0x8aa8('0x7')];var logger=require(_0x8aa8('0x8'))('analytics');var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x8aa8('0x9')][0x3];var PATH=process['argv'][0x4];function analyticExtractedReport(_0x449d2d,_0x1ed84d){var _0x27c08d={'status':_0x449d2d};var _0x40826f={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x1ed84d){_0x27c08d['savename']=_0x1ed84d;}return db[_0x8aa8('0xa')][_0x8aa8('0xb')](_0x27c08d,_0x40826f);}function main(){var _0x224f25=0x1388;var _0x5c94d4;logger[_0x8aa8('0xc')](util[_0x8aa8('0xd')](_0x8aa8('0xe'),EXTRACTED_REPORT_ID,_0x8aa8('0xf')));return db['Setting'][_0x8aa8('0x10')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x8aa8('0x11'),'splitSizeCsv']})[_0x8aa8('0x12')](function(_0xa691d6){if(_0xa691d6){_0x5c94d4=_0xa691d6;_0x224f25=_0x5c94d4[_0x8aa8('0x13')]||0x1388;}})['then'](function(){return dbH[_0x8aa8('0x14')][_0x8aa8('0x15')](util[_0x8aa8('0xd')]('SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t',QUERY),{'type':dbH[_0x8aa8('0x14')]['QueryTypes']['SELECT']});})[_0x8aa8('0x12')](function(_0x200662){if(!_0x200662[0x0][_0x8aa8('0x16')]){return analyticExtractedReport(_0x8aa8('0x17'));}var _0x42a6a4=[];var _0x3778f4=0x0;var _0x1bdd39=!![];if(_0x200662&&_0x200662[_0x8aa8('0x18')]){var _0x20d303=_0x200662[0x0]['num']%(_0x3778f4+_0x224f25);if(_0x5c94d4['split']){for(;_0x1bdd39;_0x3778f4+=_0x224f25,_0x20d303=_0x200662[0x0][_0x8aa8('0x16')]%(_0x3778f4+_0x224f25)){if(_0x20d303==0x0||_0x20d303==_0x200662[0x0]['num']){_0x1bdd39=![];}_0x42a6a4['push'](dbH[_0x8aa8('0x14')]['query'](util[_0x8aa8('0xd')](_0x8aa8('0x19'),QUERY,_0x224f25,_0x3778f4),{'type':dbH[_0x8aa8('0x14')][_0x8aa8('0x1a')]['SELECT']}));}}else{_0x42a6a4[_0x8aa8('0x1b')](dbH[_0x8aa8('0x14')][_0x8aa8('0x15')](QUERY,{'type':dbH[_0x8aa8('0x14')][_0x8aa8('0x1a')][_0x8aa8('0x1c')]}));}}var _0x5d9b62=path[_0x8aa8('0x1d')](PATH);var _0x4cc455=path[_0x8aa8('0x1e')](PATH,'.csv');var _0x2c1828=_0x5c94d4['split']&&_0x42a6a4[_0x8aa8('0x18')]>0x1;var _0x40adb5=[];if(!fs[_0x8aa8('0x1f')](path['join'](_0x5d9b62,_0x4cc455))&&_0x2c1828){fs[_0x8aa8('0x20')](path[_0x8aa8('0x21')](_0x5d9b62,_0x4cc455));}return BPromise[_0x8aa8('0x22')](_0x42a6a4,function(_0x547a7b){_0x40adb5['push'](_0x547a7b);})[_0x8aa8('0x12')](function(){for(var _0x44e2d8=0x0;_0x44e2d8<_0x40adb5[_0x8aa8('0x18')];_0x44e2d8+=0x1){var _0x3a3c7a;var _0x24143e=_0x40adb5[_0x44e2d8];if(_0x2c1828){_0x3a3c7a=path['join'](_0x5d9b62,_0x4cc455,util[_0x8aa8('0xd')]('%s%d.%s',_0x4cc455,_0x44e2d8,_0x8aa8('0x23')));}else{_0x3a3c7a=path[_0x8aa8('0x21')](_0x5d9b62,util[_0x8aa8('0xd')]('%s.%s',_0x4cc455,'csv'));}fs[_0x8aa8('0x24')](_0x3a3c7a,csv(_0x24143e));}})['then'](function(){if(_0x2c1828){zipdir(path[_0x8aa8('0x21')](_0x5d9b62,_0x4cc455),{'saveTo':path[_0x8aa8('0x21')](_0x5d9b62,util[_0x8aa8('0xd')](_0x8aa8('0x25'),_0x4cc455,_0x8aa8('0x26')))},function(_0x4d5c2e,_0x267f4c){});rimraf(path[_0x8aa8('0x21')](_0x5d9b62,_0x4cc455),function(){});}})['then'](function(){logger[_0x8aa8('0xc')](util[_0x8aa8('0xd')](_0x8aa8('0x27'),EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0x8aa8('0x28'),_0x2c1828?util[_0x8aa8('0xd')](_0x8aa8('0x25'),_0x4cc455,_0x2c1828?_0x8aa8('0x26'):_0x8aa8('0x23')):null);});})[_0x8aa8('0x29')](function(_0x370401){logger[_0x8aa8('0xc')](util[_0x8aa8('0xd')](_0x8aa8('0x2a'),EXTRACTED_REPORT_ID,_0x8aa8('0xf')),util['inspect'](_0x370401,{'showHidden':![],'depth':null}));return analyticExtractedReport('Failed');});}main();
\ No newline at end of file
+var _0xb4e6=['splitSizeCsv','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','SELECT','num','Empty','split','push','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','dirname','basename','.csv','length','existsSync','mkdirSync','join','each','csv','%s.%s','writeFileSync','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','catch','CSV','inspect','Failed','util','lodash','to-csv','bluebird','zip-dir','rimraf','../../mysqldb','../../config/logger','analytics','argv','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Setting','find'];(function(_0x556c13,_0x24a62a){var _0x341621=function(_0x36c278){while(--_0x36c278){_0x556c13['push'](_0x556c13['shift']());}};_0x341621(++_0x24a62a);}(_0xb4e6,0x1f4));var _0x6b4e=function(_0x133277,_0xb1d6b2){_0x133277=_0x133277-0x0;var _0x5b4a22=_0xb4e6[_0x133277];return _0x5b4a22;};'use strict';var util=require(_0x6b4e('0x0'));var path=require('path');var _=require(_0x6b4e('0x1'));var csv=require(_0x6b4e('0x2'));var fs=require('fs');var BPromise=require(_0x6b4e('0x3'));var zipdir=require(_0x6b4e('0x4'));var rimraf=require(_0x6b4e('0x5'));var db=require(_0x6b4e('0x6'))['db'];var dbH=require(_0x6b4e('0x6'))['dbH'];var logger=require(_0x6b4e('0x7'))(_0x6b4e('0x8'));var EXTRACTED_REPORT_ID=Number(process[_0x6b4e('0x9')][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0x6b4e('0x9')][0x4];function analyticExtractedReport(_0x570346,_0x4f00be){var _0x2311d9={'status':_0x570346};var _0x48c870={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x4f00be){_0x2311d9['savename']=_0x4f00be;}return db[_0x6b4e('0xa')][_0x6b4e('0xb')](_0x2311d9,_0x48c870);}function main(){var _0x1e3bf6=0x1388;var _0x39ed74;logger[_0x6b4e('0xc')](util[_0x6b4e('0xd')](_0x6b4e('0xe'),EXTRACTED_REPORT_ID,'CSV'));return db[_0x6b4e('0xf')][_0x6b4e('0x10')]({'where':{'id':0x1},'raw':!![],'attributes':['id','split',_0x6b4e('0x11')]})[_0x6b4e('0x12')](function(_0x432399){if(_0x432399){_0x39ed74=_0x432399;_0x1e3bf6=_0x39ed74[_0x6b4e('0x11')]||0x1388;}})[_0x6b4e('0x12')](function(){return dbH[_0x6b4e('0x13')][_0x6b4e('0x14')](util['format'](_0x6b4e('0x15'),QUERY),{'type':dbH[_0x6b4e('0x13')]['QueryTypes'][_0x6b4e('0x16')]});})['then'](function(_0x355f10){if(!_0x355f10[0x0][_0x6b4e('0x17')]){return analyticExtractedReport(_0x6b4e('0x18'));}var _0x42e265=[];var _0x28c3ba=0x0;var _0x135568=!![];if(_0x355f10&&_0x355f10['length']){var _0x5775f4=_0x355f10[0x0][_0x6b4e('0x17')]%(_0x28c3ba+_0x1e3bf6);if(_0x39ed74[_0x6b4e('0x19')]){for(;_0x135568;_0x28c3ba+=_0x1e3bf6,_0x5775f4=_0x355f10[0x0][_0x6b4e('0x17')]%(_0x28c3ba+_0x1e3bf6)){if(_0x5775f4==0x0||_0x5775f4==_0x355f10[0x0][_0x6b4e('0x17')]){_0x135568=![];}_0x42e265[_0x6b4e('0x1a')](dbH[_0x6b4e('0x13')][_0x6b4e('0x14')](util[_0x6b4e('0xd')](_0x6b4e('0x1b'),QUERY,_0x1e3bf6,_0x28c3ba),{'type':dbH[_0x6b4e('0x13')][_0x6b4e('0x1c')]['SELECT']}));}}else{_0x42e265[_0x6b4e('0x1a')](dbH[_0x6b4e('0x13')][_0x6b4e('0x14')](QUERY,{'type':dbH[_0x6b4e('0x13')]['QueryTypes'][_0x6b4e('0x16')]}));}}var _0x507703=path[_0x6b4e('0x1d')](PATH);var _0x163dea=path[_0x6b4e('0x1e')](PATH,_0x6b4e('0x1f'));var _0xa06ccd=_0x39ed74[_0x6b4e('0x19')]&&_0x42e265[_0x6b4e('0x20')]>0x1;var _0x5c33be=[];if(!fs[_0x6b4e('0x21')](path['join'](_0x507703,_0x163dea))&&_0xa06ccd){fs[_0x6b4e('0x22')](path[_0x6b4e('0x23')](_0x507703,_0x163dea));}return BPromise[_0x6b4e('0x24')](_0x42e265,function(_0xdba4fe){_0x5c33be['push'](_0xdba4fe);})[_0x6b4e('0x12')](function(){for(var _0x3f72d7=0x0;_0x3f72d7<_0x5c33be['length'];_0x3f72d7+=0x1){var _0x32102f;var _0x381ff0=_0x5c33be[_0x3f72d7];if(_0xa06ccd){_0x32102f=path[_0x6b4e('0x23')](_0x507703,_0x163dea,util[_0x6b4e('0xd')]('%s%d.%s',_0x163dea,_0x3f72d7,_0x6b4e('0x25')));}else{_0x32102f=path[_0x6b4e('0x23')](_0x507703,util['format'](_0x6b4e('0x26'),_0x163dea,_0x6b4e('0x25')));}fs[_0x6b4e('0x27')](_0x32102f,csv(_0x381ff0));}})[_0x6b4e('0x12')](function(){if(_0xa06ccd){zipdir(path['join'](_0x507703,_0x163dea),{'saveTo':path[_0x6b4e('0x23')](_0x507703,util[_0x6b4e('0xd')]('%s.%s',_0x163dea,_0x6b4e('0x28')))},function(_0x3f9868,_0x37b636){});rimraf(path['join'](_0x507703,_0x163dea),function(){});}})['then'](function(){logger[_0x6b4e('0xc')](util[_0x6b4e('0xd')](_0x6b4e('0x29'),EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0x6b4e('0x2a'),_0xa06ccd?util[_0x6b4e('0xd')](_0x6b4e('0x26'),_0x163dea,_0xa06ccd?'zip':'csv'):null);});})[_0x6b4e('0x2b')](function(_0x4952ef){logger[_0x6b4e('0xc')](util[_0x6b4e('0xd')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x6b4e('0x2c')),util[_0x6b4e('0x2d')](_0x4952ef,{'showHidden':![],'depth':null}));return analyticExtractedReport(_0x6b4e('0x2e'));});}main();
\ No newline at end of file
diff --git a/server/components/export/pdf.js b/server/components/export/pdf.js
index 5c59287..e50f024 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 _0xb10b=['query','format','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','push','SELECT','existsSync','join','mkdirSync','each','name','startDate','endDate','landscape','black','body','content','/fonts/Roboto-Medium.ttf','/fonts/Roboto-Italic.ttf','/fonts/Roboto-MediumItalic.ttf','createPdfKitDocument','pdf','%s.%s','pipe','createWriteStream','finish','log','err','end','zip','info','Completed','PDF','findOne','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','lodash','util','path','moment','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','hasOwnProperty','tableHeader','num','Empty','dirname','basename','.pdf','Setting','find','split','then','splitSizePdf','length','sequelize'];(function(_0x34234f,_0x51ee02){var _0x45c502=function(_0x45e521){while(--_0x45e521){_0x34234f['push'](_0x34234f['shift']());}};_0x45c502(++_0x51ee02);}(_0xb10b,0x12a));var _0xbb10=function(_0xc7d92f,_0x2f2193){_0xc7d92f=_0xc7d92f-0x0;var _0x3a17ea=_0xb10b[_0xc7d92f];return _0x3a17ea;};'use strict';var _=require(_0xbb10('0x0'));var fs=require('fs');var BPromise=require('bluebird');var util=require(_0xbb10('0x1'));var path=require(_0xbb10('0x2'));var moment=require(_0xbb10('0x3'));var PdfPrinter=require('pdfmake/src/printer');var zipdir=require(_0xbb10('0x4'));var rimraf=require(_0xbb10('0x5'));var db=require(_0xbb10('0x6'))['db'];var dbH=require(_0xbb10('0x6'))[_0xbb10('0x7')];var logger=require(_0xbb10('0x8'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0xbb10('0x9')][0x2]);var QUERY=process[_0xbb10('0x9')][0x3];var PATH=process['argv'][0x4];var NAME=process[_0xbb10('0x9')][0x5];var FORMAT=_0xbb10('0xa');var _extractedReport;function analyticExtractedReport(_0x21370f,_0x1c3ee5){var _0x2353ef={'status':_0x21370f};var _0x1ce33e={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x1c3ee5){_0x2353ef[_0xbb10('0xb')]=_0x1c3ee5;}return db[_0xbb10('0xc')]['update'](_0x2353ef,_0x1ce33e);}function getHeader(_0x4e47f8){var _0x20bd61=[];for(var _0x118a74 in _0x4e47f8){if(_0x4e47f8[_0xbb10('0xd')](_0x118a74)){_0x20bd61['push']({'text':_0x118a74,'style':_0xbb10('0xe')});}}return _0x20bd61;}function extractReport(_0x5be7e0){var _0x44fb19=0x1388;var _0x916a32;if(!_0x5be7e0[0x0][_0xbb10('0xf')]){return analyticExtractedReport(_0xbb10('0x10'));}var _0x442548=[];var _0x147230=0x0;var _0x58a612=!![];var _0x26e021=path[_0xbb10('0x11')](PATH);var _0x45b9d6=path[_0xbb10('0x12')](PATH,_0xbb10('0x13'));var _0x2f2ebf=![];var _0x24a57b=[];return db[_0xbb10('0x14')][_0xbb10('0x15')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xbb10('0x16'),'splitSizePdf']})[_0xbb10('0x17')](function(_0x1145f1){if(_0x1145f1){_0x916a32=_0x1145f1;_0x44fb19=_0x916a32[_0xbb10('0x18')]||0x3e8;}})[_0xbb10('0x17')](function(){if(_0x5be7e0&&_0x5be7e0[_0xbb10('0x19')]){var _0x1682a4=_0x5be7e0[0x0][_0xbb10('0xf')]%(_0x147230+_0x44fb19);if(_0x916a32[_0xbb10('0x16')]){for(;_0x58a612;_0x147230+=_0x44fb19,_0x1682a4=_0x5be7e0[0x0][_0xbb10('0xf')]%(_0x147230+_0x44fb19)){if(_0x1682a4==0x0||_0x1682a4==_0x5be7e0[0x0][_0xbb10('0xf')]){_0x58a612=![];}_0x442548['push'](dbH[_0xbb10('0x1a')][_0xbb10('0x1b')](util[_0xbb10('0x1c')](_0xbb10('0x1d'),QUERY,_0x44fb19,_0x147230),{'type':dbH[_0xbb10('0x1a')][_0xbb10('0x1e')]['SELECT']}));}}else{_0x442548[_0xbb10('0x1f')](dbH[_0xbb10('0x1a')]['query'](QUERY,{'type':dbH['sequelize'][_0xbb10('0x1e')][_0xbb10('0x20')]}));}}_0x2f2ebf=_0x916a32[_0xbb10('0x16')]&&_0x442548[_0xbb10('0x19')]>0x1;if(!fs[_0xbb10('0x21')](path[_0xbb10('0x22')](_0x26e021,_0x45b9d6))&&_0x2f2ebf){fs[_0xbb10('0x23')](path[_0xbb10('0x22')](_0x26e021,_0x45b9d6));}return BPromise[_0xbb10('0x24')](_0x442548,function(_0x395404){_0x24a57b[_0xbb10('0x1f')](_0x395404);});})[_0xbb10('0x17')](function(){return BPromise['each'](_0x442548,function(_0x4fedac,_0x4fb5e0){var _0xc93a04;var _0x3c5ae7=util[_0xbb10('0x1c')]('Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s',NAME,_extractedReport[_0xbb10('0x25')],moment(_extractedReport[_0xbb10('0x26')])[_0xbb10('0x1c')](FORMAT),moment(_extractedReport[_0xbb10('0x27')])[_0xbb10('0x1c')](FORMAT));var _0x20d946={'pageSize':'A4','pageOrientation':_0xbb10('0x28'),'content':[{'text':_0x3c5ae7,'style':'header'}],'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0xbb10('0x29')}}};var _0x21ac54={'headerRows':0x1,'body':[]};_0x21ac54[_0xbb10('0x2a')][_0xbb10('0x1f')](getHeader(_0x4fedac[0x0]));var _0x1d30aa;for(var _0x2ff4c1=0x0;_0x2ff4c1<_0x4fedac['length'];_0x2ff4c1+=0x1){_0x1d30aa=[];for(var _0x221624 in _0x4fedac[_0x2ff4c1]){if(_0x4fedac[_0x2ff4c1]['hasOwnProperty'](_0x221624)){_0x1d30aa[_0xbb10('0x1f')](_0x4fedac[_0x2ff4c1][_0x221624]?_['toString'](_0x4fedac[_0x2ff4c1][_0x221624]):'');}}_0x21ac54[_0xbb10('0x2a')][_0xbb10('0x1f')](_0x1d30aa);}_0x20d946[_0xbb10('0x2b')]['push']({'table':_0x21ac54});return new BPromise(function(_0x518d47,_0x4c3744){var _0x34f65e=new PdfPrinter({'Roboto':{'normal':__dirname+'/fonts/Roboto-Regular.ttf','bold':__dirname+_0xbb10('0x2c'),'italics':__dirname+_0xbb10('0x2d'),'bolditalics':__dirname+_0xbb10('0x2e')}});var _0x1c0b57=_0x34f65e[_0xbb10('0x2f')](_0x20d946);if(_0x2f2ebf){_0xc93a04=path[_0xbb10('0x22')](_0x26e021,_0x45b9d6,util[_0xbb10('0x1c')]('%s%d.%s',_0x45b9d6,_0x4fb5e0,_0xbb10('0x30')));}else{_0xc93a04=path[_0xbb10('0x22')](_0x26e021,util[_0xbb10('0x1c')](_0xbb10('0x31'),_0x45b9d6,_0xbb10('0x30')));}var _0x9de708=_0x1c0b57[_0xbb10('0x32')](fs[_0xbb10('0x33')](_0xc93a04));_0x9de708['on'](_0xbb10('0x34'),function(){_0x518d47();});_0x9de708['on']('error',function(_0x2b5352){console[_0xbb10('0x35')](_0xbb10('0x36'),_0x2b5352);_0x4c3744(_0x2b5352);});_0x1c0b57[_0xbb10('0x37')]();});});})['then'](function(){if(_0x2f2ebf){return new BPromise(function(_0x111762,_0x5de37b){zipdir(path['join'](_0x26e021,_0x45b9d6),{'saveTo':path[_0xbb10('0x22')](_0x26e021,util[_0xbb10('0x1c')](_0xbb10('0x31'),_0x45b9d6,_0xbb10('0x38')))},function(_0x15d895){if(_0x15d895){_0x5de37b(_0x15d895);}else{_0x111762();}});});}})[_0xbb10('0x17')](function(){if(_0x2f2ebf){rimraf(path['join'](_0x26e021,_0x45b9d6),function(){});}})[_0xbb10('0x17')](function(){logger[_0xbb10('0x39')](util['format']('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0xbb10('0x3a'),_0x2f2ebf?util[_0xbb10('0x1c')](_0xbb10('0x31'),_0x45b9d6,_0x2f2ebf?'zip':_0xbb10('0x30')):null);});}function main(){logger[_0xbb10('0x39')](util[_0xbb10('0x1c')]('Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0xbb10('0x3b')));return db[_0xbb10('0xc')][_0xbb10('0x3c')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0xbb10('0x17')](function(_0x4f1cdd){_extractedReport=_0x4f1cdd;return dbH[_0xbb10('0x1a')][_0xbb10('0x1b')](util['format'](_0xbb10('0x3d'),QUERY),{'type':dbH[_0xbb10('0x1a')][_0xbb10('0x1e')][_0xbb10('0x20')]});})[_0xbb10('0x17')](extractReport)[_0xbb10('0x3e')](function(_0x5f3d67){logger[_0xbb10('0x39')](util[_0xbb10('0x1c')](_0xbb10('0x3f'),EXTRACTED_REPORT_ID,_0xbb10('0x3b')),util['inspect'](_0x5f3d67,{'showHidden':![],'depth':null}));return analyticExtractedReport(_0xbb10('0x40'));});}main();
\ No newline at end of file
+var _0xb10b=['query','format','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','push','SELECT','existsSync','join','mkdirSync','each','name','startDate','endDate','landscape','black','body','content','/fonts/Roboto-Medium.ttf','/fonts/Roboto-Italic.ttf','/fonts/Roboto-MediumItalic.ttf','createPdfKitDocument','pdf','%s.%s','pipe','createWriteStream','finish','log','err','end','zip','info','Completed','PDF','findOne','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','lodash','util','path','moment','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','hasOwnProperty','tableHeader','num','Empty','dirname','basename','.pdf','Setting','find','split','then','splitSizePdf','length','sequelize'];(function(_0x5b2011,_0x53f15c){var _0x4c2f63=function(_0x3aebca){while(--_0x3aebca){_0x5b2011['push'](_0x5b2011['shift']());}};_0x4c2f63(++_0x53f15c);}(_0xb10b,0x12a));var _0xbb10=function(_0x4bcf38,_0x3c12be){_0x4bcf38=_0x4bcf38-0x0;var _0x4a89be=_0xb10b[_0x4bcf38];return _0x4a89be;};'use strict';var _=require(_0xbb10('0x0'));var fs=require('fs');var BPromise=require('bluebird');var util=require(_0xbb10('0x1'));var path=require(_0xbb10('0x2'));var moment=require(_0xbb10('0x3'));var PdfPrinter=require('pdfmake/src/printer');var zipdir=require(_0xbb10('0x4'));var rimraf=require(_0xbb10('0x5'));var db=require(_0xbb10('0x6'))['db'];var dbH=require(_0xbb10('0x6'))[_0xbb10('0x7')];var logger=require(_0xbb10('0x8'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0xbb10('0x9')][0x2]);var QUERY=process[_0xbb10('0x9')][0x3];var PATH=process['argv'][0x4];var NAME=process[_0xbb10('0x9')][0x5];var FORMAT=_0xbb10('0xa');var _extractedReport;function analyticExtractedReport(_0x21370f,_0x1c3ee5){var _0x2353ef={'status':_0x21370f};var _0x1ce33e={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x1c3ee5){_0x2353ef[_0xbb10('0xb')]=_0x1c3ee5;}return db[_0xbb10('0xc')]['update'](_0x2353ef,_0x1ce33e);}function getHeader(_0x4e47f8){var _0x20bd61=[];for(var _0x118a74 in _0x4e47f8){if(_0x4e47f8[_0xbb10('0xd')](_0x118a74)){_0x20bd61['push']({'text':_0x118a74,'style':_0xbb10('0xe')});}}return _0x20bd61;}function extractReport(_0x5be7e0){var _0x44fb19=0x1388;var _0x916a32;if(!_0x5be7e0[0x0][_0xbb10('0xf')]){return analyticExtractedReport(_0xbb10('0x10'));}var _0x442548=[];var _0x147230=0x0;var _0x58a612=!![];var _0x26e021=path[_0xbb10('0x11')](PATH);var _0x45b9d6=path[_0xbb10('0x12')](PATH,_0xbb10('0x13'));var _0x2f2ebf=![];var _0x24a57b=[];return db[_0xbb10('0x14')][_0xbb10('0x15')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xbb10('0x16'),'splitSizePdf']})[_0xbb10('0x17')](function(_0x1145f1){if(_0x1145f1){_0x916a32=_0x1145f1;_0x44fb19=_0x916a32[_0xbb10('0x18')]||0x3e8;}})[_0xbb10('0x17')](function(){if(_0x5be7e0&&_0x5be7e0[_0xbb10('0x19')]){var _0x1682a4=_0x5be7e0[0x0][_0xbb10('0xf')]%(_0x147230+_0x44fb19);if(_0x916a32[_0xbb10('0x16')]){for(;_0x58a612;_0x147230+=_0x44fb19,_0x1682a4=_0x5be7e0[0x0][_0xbb10('0xf')]%(_0x147230+_0x44fb19)){if(_0x1682a4==0x0||_0x1682a4==_0x5be7e0[0x0][_0xbb10('0xf')]){_0x58a612=![];}_0x442548['push'](dbH[_0xbb10('0x1a')][_0xbb10('0x1b')](util[_0xbb10('0x1c')](_0xbb10('0x1d'),QUERY,_0x44fb19,_0x147230),{'type':dbH[_0xbb10('0x1a')][_0xbb10('0x1e')]['SELECT']}));}}else{_0x442548[_0xbb10('0x1f')](dbH[_0xbb10('0x1a')]['query'](QUERY,{'type':dbH['sequelize'][_0xbb10('0x1e')][_0xbb10('0x20')]}));}}_0x2f2ebf=_0x916a32[_0xbb10('0x16')]&&_0x442548[_0xbb10('0x19')]>0x1;if(!fs[_0xbb10('0x21')](path[_0xbb10('0x22')](_0x26e021,_0x45b9d6))&&_0x2f2ebf){fs[_0xbb10('0x23')](path[_0xbb10('0x22')](_0x26e021,_0x45b9d6));}return BPromise[_0xbb10('0x24')](_0x442548,function(_0x395404){_0x24a57b[_0xbb10('0x1f')](_0x395404);});})[_0xbb10('0x17')](function(){return BPromise['each'](_0x442548,function(_0x4fedac,_0x4fb5e0){var _0xc93a04;var _0x3c5ae7=util[_0xbb10('0x1c')]('Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s',NAME,_extractedReport[_0xbb10('0x25')],moment(_extractedReport[_0xbb10('0x26')])[_0xbb10('0x1c')](FORMAT),moment(_extractedReport[_0xbb10('0x27')])[_0xbb10('0x1c')](FORMAT));var _0x20d946={'pageSize':'A4','pageOrientation':_0xbb10('0x28'),'content':[{'text':_0x3c5ae7,'style':'header'}],'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0xbb10('0x29')}}};var _0x21ac54={'headerRows':0x1,'body':[]};_0x21ac54[_0xbb10('0x2a')][_0xbb10('0x1f')](getHeader(_0x4fedac[0x0]));var _0x1d30aa;for(var _0x2ff4c1=0x0;_0x2ff4c1<_0x4fedac['length'];_0x2ff4c1+=0x1){_0x1d30aa=[];for(var _0x221624 in _0x4fedac[_0x2ff4c1]){if(_0x4fedac[_0x2ff4c1]['hasOwnProperty'](_0x221624)){_0x1d30aa[_0xbb10('0x1f')](_0x4fedac[_0x2ff4c1][_0x221624]?_['toString'](_0x4fedac[_0x2ff4c1][_0x221624]):'');}}_0x21ac54[_0xbb10('0x2a')][_0xbb10('0x1f')](_0x1d30aa);}_0x20d946[_0xbb10('0x2b')]['push']({'table':_0x21ac54});return new BPromise(function(_0x518d47,_0x4c3744){var _0x34f65e=new PdfPrinter({'Roboto':{'normal':__dirname+'/fonts/Roboto-Regular.ttf','bold':__dirname+_0xbb10('0x2c'),'italics':__dirname+_0xbb10('0x2d'),'bolditalics':__dirname+_0xbb10('0x2e')}});var _0x1c0b57=_0x34f65e[_0xbb10('0x2f')](_0x20d946);if(_0x2f2ebf){_0xc93a04=path[_0xbb10('0x22')](_0x26e021,_0x45b9d6,util[_0xbb10('0x1c')]('%s%d.%s',_0x45b9d6,_0x4fb5e0,_0xbb10('0x30')));}else{_0xc93a04=path[_0xbb10('0x22')](_0x26e021,util[_0xbb10('0x1c')](_0xbb10('0x31'),_0x45b9d6,_0xbb10('0x30')));}var _0x9de708=_0x1c0b57[_0xbb10('0x32')](fs[_0xbb10('0x33')](_0xc93a04));_0x9de708['on'](_0xbb10('0x34'),function(){_0x518d47();});_0x9de708['on']('error',function(_0x2b5352){console[_0xbb10('0x35')](_0xbb10('0x36'),_0x2b5352);_0x4c3744(_0x2b5352);});_0x1c0b57[_0xbb10('0x37')]();});});})['then'](function(){if(_0x2f2ebf){return new BPromise(function(_0x111762,_0x5de37b){zipdir(path['join'](_0x26e021,_0x45b9d6),{'saveTo':path[_0xbb10('0x22')](_0x26e021,util[_0xbb10('0x1c')](_0xbb10('0x31'),_0x45b9d6,_0xbb10('0x38')))},function(_0x15d895){if(_0x15d895){_0x5de37b(_0x15d895);}else{_0x111762();}});});}})[_0xbb10('0x17')](function(){if(_0x2f2ebf){rimraf(path['join'](_0x26e021,_0x45b9d6),function(){});}})[_0xbb10('0x17')](function(){logger[_0xbb10('0x39')](util['format']('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0xbb10('0x3a'),_0x2f2ebf?util[_0xbb10('0x1c')](_0xbb10('0x31'),_0x45b9d6,_0x2f2ebf?'zip':_0xbb10('0x30')):null);});}function main(){logger[_0xbb10('0x39')](util[_0xbb10('0x1c')]('Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0xbb10('0x3b')));return db[_0xbb10('0xc')][_0xbb10('0x3c')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0xbb10('0x17')](function(_0x4f1cdd){_extractedReport=_0x4f1cdd;return dbH[_0xbb10('0x1a')][_0xbb10('0x1b')](util['format'](_0xbb10('0x3d'),QUERY),{'type':dbH[_0xbb10('0x1a')][_0xbb10('0x1e')][_0xbb10('0x20')]});})[_0xbb10('0x17')](extractReport)[_0xbb10('0x3e')](function(_0x5f3d67){logger[_0xbb10('0x39')](util[_0xbb10('0x1c')](_0xbb10('0x3f'),EXTRACTED_REPORT_ID,_0xbb10('0x3b')),util['inspect'](_0x5f3d67,{'showHidden':![],'depth':null}));return analyticExtractedReport(_0xbb10('0x40'));});}main();
\ No newline at end of file
diff --git a/server/components/export/xlsx.js b/server/components/export/xlsx.js
index 6eae13f..c1acf2f 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 _0xdadd=['%s.%s','writeFileSync','zip','xlsx','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','inspect','util','path','json2xls','bluebird','zip-dir','../../mysqldb','dbH','../../config/logger','analytics','argv','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Setting','find','split','then','splitSizeXlsx','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','SELECT','num','length','push','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','basename','.xlsx','existsSync','join','mkdirSync','each'];(function(_0x56e2a0,_0x13b891){var _0x1b3b78=function(_0x79e8b1){while(--_0x79e8b1){_0x56e2a0['push'](_0x56e2a0['shift']());}};_0x1b3b78(++_0x13b891);}(_0xdadd,0x18b));var _0xddad=function(_0x335a62,_0xfafea4){_0x335a62=_0x335a62-0x0;var _0x249a9a=_0xdadd[_0x335a62];return _0x249a9a;};'use strict';var util=require(_0xddad('0x0'));var path=require(_0xddad('0x1'));var _=require('lodash');var fs=require('fs');var json2xls=require(_0xddad('0x2'));var BPromise=require(_0xddad('0x3'));var zipdir=require(_0xddad('0x4'));var rimraf=require('rimraf');var db=require(_0xddad('0x5'))['db'];var dbH=require('../../mysqldb')[_0xddad('0x6')];var logger=require(_0xddad('0x7'))(_0xddad('0x8'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0xddad('0x9')][0x3];var PATH=process['argv'][0x4];function analyticExtractedReport(_0xdfdb42,_0x939d9e){var _0x18e403={'status':_0xdfdb42};var _0x5777a5={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x939d9e){_0x18e403['savename']=_0x939d9e;}return db[_0xddad('0xa')][_0xddad('0xb')](_0x18e403,_0x5777a5);}function main(){var _0x4c49e2=0x1388;var _0x2a3fe7;logger[_0xddad('0xc')](util[_0xddad('0xd')](_0xddad('0xe'),EXTRACTED_REPORT_ID,'XLSX'));return db[_0xddad('0xf')][_0xddad('0x10')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xddad('0x11'),'splitSizeXlsx']})[_0xddad('0x12')](function(_0x1fd47c){if(_0x1fd47c){_0x2a3fe7=_0x1fd47c;_0x4c49e2=_0x2a3fe7[_0xddad('0x13')]||0x1388;}})[_0xddad('0x12')](function(){return dbH[_0xddad('0x14')][_0xddad('0x15')](util[_0xddad('0xd')](_0xddad('0x16'),QUERY),{'type':dbH[_0xddad('0x14')]['QueryTypes'][_0xddad('0x17')]});})['then'](function(_0x1a7660){if(!_0x1a7660[0x0][_0xddad('0x18')]){return analyticExtractedReport('Empty');}var _0x23218a=[];var _0x2aea31=0x0;var _0xc187a8=!![];if(_0x2a3fe7['split']){if(_0x1a7660&&_0x1a7660[_0xddad('0x19')]){var _0x218bdd=_0x1a7660[0x0][_0xddad('0x18')]%(_0x2aea31+_0x4c49e2);for(;_0xc187a8;_0x2aea31+=_0x4c49e2,_0x218bdd=_0x1a7660[0x0][_0xddad('0x18')]%(_0x2aea31+_0x4c49e2)){if(_0x218bdd==0x0||_0x218bdd==_0x1a7660[0x0]['num']){_0xc187a8=![];}_0x23218a[_0xddad('0x1a')](dbH['sequelize'][_0xddad('0x15')](util[_0xddad('0xd')](_0xddad('0x1b'),QUERY,_0x4c49e2,_0x2aea31),{'type':dbH['sequelize'][_0xddad('0x1c')][_0xddad('0x17')]}));}}}else{_0x23218a[_0xddad('0x1a')](dbH[_0xddad('0x14')][_0xddad('0x15')](QUERY,{'type':dbH[_0xddad('0x14')][_0xddad('0x1c')]['SELECT']}));}var _0x4cdcf0=path['dirname'](PATH);var _0x1ffebe=path[_0xddad('0x1d')](PATH,_0xddad('0x1e'));var _0xb1392e=_0x2a3fe7[_0xddad('0x11')]&&_0x23218a[_0xddad('0x19')]>0x1;var _0x224604=[];if(!fs[_0xddad('0x1f')](path[_0xddad('0x20')](_0x4cdcf0,_0x1ffebe))&&_0xb1392e){fs[_0xddad('0x21')](path[_0xddad('0x20')](_0x4cdcf0,_0x1ffebe));}return BPromise[_0xddad('0x22')](_0x23218a,function(_0x5635e1){_0x224604[_0xddad('0x1a')](_0x5635e1);})[_0xddad('0x12')](function(){for(var _0x371e5f=0x0;_0x371e5f<_0x224604[_0xddad('0x19')];_0x371e5f+=0x1){var _0x5f5a9e;var _0x4920bf=_0x224604[_0x371e5f];if(_0xb1392e){_0x5f5a9e=path[_0xddad('0x20')](_0x4cdcf0,_0x1ffebe,util[_0xddad('0xd')]('%s%d.%s',_0x1ffebe,_0x371e5f,'xlsx'));}else{_0x5f5a9e=path[_0xddad('0x20')](_0x4cdcf0,util[_0xddad('0xd')](_0xddad('0x23'),_0x1ffebe,'xlsx'));}fs[_0xddad('0x24')](_0x5f5a9e,json2xls(_0x4920bf),'binary');}})[_0xddad('0x12')](function(){if(_0xb1392e){zipdir(path[_0xddad('0x20')](_0x4cdcf0,_0x1ffebe),{'saveTo':path[_0xddad('0x20')](_0x4cdcf0,util[_0xddad('0xd')](_0xddad('0x23'),_0x1ffebe,'zip'))},function(_0x1a51a1,_0x4dd0e5){});rimraf(path[_0xddad('0x20')](_0x4cdcf0,_0x1ffebe),function(){});}})[_0xddad('0x12')](function(){logger['info'](util[_0xddad('0xd')]('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,'XLSX'));return analyticExtractedReport('Completed',_0xb1392e?util[_0xddad('0xd')](_0xddad('0x23'),_0x1ffebe,_0xb1392e?_0xddad('0x25'):_0xddad('0x26')):null);});})[_0xddad('0x27')](function(_0x586ae7){logger['info'](util[_0xddad('0xd')](_0xddad('0x28'),EXTRACTED_REPORT_ID,_0xddad('0x29')),util[_0xddad('0x2a')](_0x586ae7,{'showHidden':![],'depth':null}));return analyticExtractedReport('Failed');});}main();
\ No newline at end of file
+var _0xfe61=['.xlsx','length','existsSync','join','mkdirSync','each','%s%d.%s','xlsx','%s.%s','writeFileSync','binary','zip','Completed','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','bluebird','zip-dir','rimraf','../../mysqldb','dbH','analytics','argv','savename','AnalyticExtractedReport','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','split','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty','push','dirname','basename'];(function(_0x2dedf8,_0x4c3cc4){var _0x19e4e2=function(_0x1640f7){while(--_0x1640f7){_0x2dedf8['push'](_0x2dedf8['shift']());}};_0x19e4e2(++_0x4c3cc4);}(_0xfe61,0x1b4));var _0x1fe6=function(_0x59e0d1,_0x37adae){_0x59e0d1=_0x59e0d1-0x0;var _0x106a79=_0xfe61[_0x59e0d1];return _0x106a79;};'use strict';var util=require('util');var path=require('path');var _=require('lodash');var fs=require('fs');var json2xls=require('json2xls');var BPromise=require(_0x1fe6('0x0'));var zipdir=require(_0x1fe6('0x1'));var rimraf=require(_0x1fe6('0x2'));var db=require(_0x1fe6('0x3'))['db'];var dbH=require(_0x1fe6('0x3'))[_0x1fe6('0x4')];var logger=require('../../config/logger')(_0x1fe6('0x5'));var EXTRACTED_REPORT_ID=Number(process[_0x1fe6('0x6')][0x2]);var QUERY=process[_0x1fe6('0x6')][0x3];var PATH=process[_0x1fe6('0x6')][0x4];function analyticExtractedReport(_0x482a35,_0x414a21){var _0xefa21={'status':_0x482a35};var _0x3591b4={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x414a21){_0xefa21[_0x1fe6('0x7')]=_0x414a21;}return db[_0x1fe6('0x8')]['update'](_0xefa21,_0x3591b4);}function main(){var _0x40105d=0x1388;var _0x280c47;logger[_0x1fe6('0x9')](util[_0x1fe6('0xa')](_0x1fe6('0xb'),EXTRACTED_REPORT_ID,_0x1fe6('0xc')));return db[_0x1fe6('0xd')]['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x1fe6('0xe'),'splitSizeXlsx']})[_0x1fe6('0xf')](function(_0x4c1e07){if(_0x4c1e07){_0x280c47=_0x4c1e07;_0x40105d=_0x280c47['splitSizeXlsx']||0x1388;}})[_0x1fe6('0xf')](function(){return dbH[_0x1fe6('0x10')][_0x1fe6('0x11')](util[_0x1fe6('0xa')](_0x1fe6('0x12'),QUERY),{'type':dbH[_0x1fe6('0x10')][_0x1fe6('0x13')][_0x1fe6('0x14')]});})[_0x1fe6('0xf')](function(_0x3983cd){if(!_0x3983cd[0x0][_0x1fe6('0x15')]){return analyticExtractedReport(_0x1fe6('0x16'));}var _0x3be6e7=[];var _0x5848e6=0x0;var _0x60e584=!![];if(_0x280c47[_0x1fe6('0xe')]){if(_0x3983cd&&_0x3983cd['length']){var _0x288217=_0x3983cd[0x0][_0x1fe6('0x15')]%(_0x5848e6+_0x40105d);for(;_0x60e584;_0x5848e6+=_0x40105d,_0x288217=_0x3983cd[0x0]['num']%(_0x5848e6+_0x40105d)){if(_0x288217==0x0||_0x288217==_0x3983cd[0x0][_0x1fe6('0x15')]){_0x60e584=![];}_0x3be6e7[_0x1fe6('0x17')](dbH[_0x1fe6('0x10')][_0x1fe6('0x11')](util['format']('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x40105d,_0x5848e6),{'type':dbH[_0x1fe6('0x10')][_0x1fe6('0x13')][_0x1fe6('0x14')]}));}}}else{_0x3be6e7[_0x1fe6('0x17')](dbH[_0x1fe6('0x10')][_0x1fe6('0x11')](QUERY,{'type':dbH[_0x1fe6('0x10')][_0x1fe6('0x13')][_0x1fe6('0x14')]}));}var _0x51b8d4=path[_0x1fe6('0x18')](PATH);var _0x55ab19=path[_0x1fe6('0x19')](PATH,_0x1fe6('0x1a'));var _0x82ee6f=_0x280c47[_0x1fe6('0xe')]&&_0x3be6e7[_0x1fe6('0x1b')]>0x1;var _0x1c0830=[];if(!fs[_0x1fe6('0x1c')](path[_0x1fe6('0x1d')](_0x51b8d4,_0x55ab19))&&_0x82ee6f){fs[_0x1fe6('0x1e')](path[_0x1fe6('0x1d')](_0x51b8d4,_0x55ab19));}return BPromise[_0x1fe6('0x1f')](_0x3be6e7,function(_0x139ab4){_0x1c0830[_0x1fe6('0x17')](_0x139ab4);})['then'](function(){for(var _0x39827e=0x0;_0x39827e<_0x1c0830[_0x1fe6('0x1b')];_0x39827e+=0x1){var _0x4008cb;var _0x587b0a=_0x1c0830[_0x39827e];if(_0x82ee6f){_0x4008cb=path['join'](_0x51b8d4,_0x55ab19,util[_0x1fe6('0xa')](_0x1fe6('0x20'),_0x55ab19,_0x39827e,_0x1fe6('0x21')));}else{_0x4008cb=path['join'](_0x51b8d4,util[_0x1fe6('0xa')](_0x1fe6('0x22'),_0x55ab19,_0x1fe6('0x21')));}fs[_0x1fe6('0x23')](_0x4008cb,json2xls(_0x587b0a),_0x1fe6('0x24'));}})['then'](function(){if(_0x82ee6f){zipdir(path[_0x1fe6('0x1d')](_0x51b8d4,_0x55ab19),{'saveTo':path['join'](_0x51b8d4,util[_0x1fe6('0xa')](_0x1fe6('0x22'),_0x55ab19,_0x1fe6('0x25')))},function(_0x24f97e,_0x17a1d2){});rimraf(path[_0x1fe6('0x1d')](_0x51b8d4,_0x55ab19),function(){});}})[_0x1fe6('0xf')](function(){logger[_0x1fe6('0x9')](util['format']('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0x1fe6('0xc')));return analyticExtractedReport(_0x1fe6('0x26'),_0x82ee6f?util[_0x1fe6('0xa')](_0x1fe6('0x22'),_0x55ab19,_0x82ee6f?_0x1fe6('0x25'):_0x1fe6('0x21')):null);});})[_0x1fe6('0x27')](function(_0x4b9ee8){logger[_0x1fe6('0x9')](util[_0x1fe6('0xa')](_0x1fe6('0x28'),EXTRACTED_REPORT_ID,_0x1fe6('0xc')),util['inspect'](_0x4b9ee8,{'showHidden':![],'depth':null}));return analyticExtractedReport(_0x1fe6('0x29'));});}main();
\ No newline at end of file
diff --git a/server/components/extensions/rewrite.js b/server/components/extensions/rewrite.js
index d8b053d..0856a0e 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 _0xff2e=['priority','extensions','find','exten','type','Set','CDR(type)=%s','context','VoiceExtensionId','outbound','extension','CDR(destination)=','cutdigits','${EXTEN:','CDR(routeid)=','push','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=${EXTEN:0:','outboundrouteid=','recordingFormat','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','wav','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','length','toLowerCase','createdAt','updatedAt','interval','*,*,*,*','IntervalId','map','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','appType','custom','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice','GotoIfTime',',${EXTEN},','last','concat','transaction','destroy','bulkCreate','sortBy','catch','error','rewrite','models','Interval','intervals','VoiceExtension','findAll','then','uniq','filter','groupBy','queue','playback','hasOwnProperty'];(function(_0x495096,_0x533f92){var _0x49ee27=function(_0x3f260f){while(--_0x3f260f){_0x495096['push'](_0x495096['shift']());}};_0x49ee27(++_0x533f92);}(_0xff2e,0x198));var _0xeff2=function(_0x55a6f1,_0x33d9a8){_0x55a6f1=_0x55a6f1-0x0;var _0x41b08a=_0xff2e[_0x55a6f1];return _0x41b08a;};'use strict';var _=require('lodash');var util=require('util');function rewrite(_0x46935f,_0x565b62){var _0x4e5937=this;return _0x46935f[_0xeff2('0x0')][_0xeff2('0x1')]['findAll']({'raw':!![]})['then'](function(_0x4b727e){_0x4e5937[_0xeff2('0x2')]=_0x4b727e;return _0x46935f[_0xeff2('0x0')][_0xeff2('0x3')][_0xeff2('0x4')]({'where':{'IntervalId':_0x565b62['IntervalId']},'raw':!![]});})[_0xeff2('0x5')](function(_0x3722d5){return _0x46935f[_0xeff2('0x0')][_0xeff2('0x3')][_0xeff2('0x4')]({'where':{'exten':{'$in':_[_0xeff2('0x6')](_['map'](_0x3722d5,'exten'))}},'order':[{'raw':'CAST(priority\x20AS\x20UNSIGNED)'}],'raw':!![]});})[_0xeff2('0x5')](function(_0xd8348e){var _0x5c2cf2=_[_0xeff2('0x7')](_0xd8348e,{'priority':'1'});var _0x49a4c0=_[_0xeff2('0x7')](_0xd8348e,{'isApp':0x1});var _0x5eab5e=_[_0xeff2('0x8')](_0x49a4c0,'exten');var _0x19fa74=[_0xeff2('0x9'),_0xeff2('0xa')];var _0x5c4dc7=[];var _0x114613=[];for(var _0x136d49 in _0x5eab5e){if(_0x5eab5e[_0xeff2('0xb')](_0x136d49)){_0x4e5937[_0xeff2('0xc')]=0x2;_0x4e5937[_0xeff2('0xd')]=[];_0x4e5937['extension']=_[_0xeff2('0xe')](_0x5c2cf2,{'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')]});_0x4e5937[_0xeff2('0xd')]['push']({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':util['format'](_0xeff2('0x12'),_0x5eab5e[_0x136d49][0x0]['type']),'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});if(_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')]===_0xeff2('0x15')){if(_0x4e5937[_0xeff2('0x16')]){_0x4e5937[_0xeff2('0xd')]['push']({'type':_0x5eab5e[_0x136d49][0x0]['type'],'app':_0xeff2('0x11'),'appdata':_0xeff2('0x17')+(_0x4e5937['extension'][_0xeff2('0x18')]?_0xeff2('0x19')+_0x4e5937[_0xeff2('0x16')][_0xeff2('0x18')]+'}':'${EXTEN}'),'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});}_0x4e5937['extensions']['push']({'type':_0x5eab5e[_0x136d49][0x0]['type'],'app':_0xeff2('0x11'),'appdata':_0xeff2('0x1a')+_0x5eab5e[_0x136d49][0x0]['VoiceExtensionId'],'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0]['VoiceExtensionId']});var _0x7b992d=_0x4e5937[_0xeff2('0xc')]++;_0x4e5937['extensions'][_0xeff2('0x1b')]({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':'ExecIf','appdata':_0xeff2('0x1c')+(_0x7b992d+0x2)+_0xeff2('0x1d')+(_0x7b992d+0x1)+')','context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x7b992d,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});if(_0x4e5937[_0xeff2('0x16')]){_0x4e5937[_0xeff2('0xd')][_0xeff2('0x1b')]({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':_0x4e5937[_0xeff2('0x16')][_0xeff2('0x18')]?_0xeff2('0x1e')+_0x4e5937['extension']['cutdigits']+'}':'CDR(prefix)=noprefix','context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});}_0x4e5937[_0xeff2('0xd')][_0xeff2('0x1b')]({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':'Set','appdata':_0xeff2('0x1f')+_0x5eab5e[_0x136d49][0x0]['VoiceExtensionId'],'context':_0x5eab5e[_0x136d49][0x0]['context'],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});if(_0x4e5937[_0xeff2('0x16')]&&_0x4e5937['extension']['hasOwnProperty'](_0xeff2('0x20'))&&_0x4e5937[_0xeff2('0x16')]['recordingFormat']!=='none'){_0x4e5937[_0xeff2('0xd')]['push']({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':_0xeff2('0x21'),'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0]['exten'],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});_0x4e5937[_0xeff2('0xd')]['push']({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x4e5937[_0xeff2('0x16')][_0xeff2('0x20')]||_0xeff2('0x22'),'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937['priority']++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});}}_0x4e5937[_0xeff2('0xd')][_0xeff2('0x1b')]({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':_0xeff2('0x23'),'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});_0x4e5937[_0xeff2('0xd')][_0xeff2('0x1b')]({'type':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':_0xeff2('0x24'),'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'priority':_0x4e5937[_0xeff2('0xc')]++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});_0x4e5937['extensions'][_0xeff2('0x1b')]({'type':_0x5eab5e[_0x136d49][0x0]['type'],'app':'Set','appdata':'MONITOR_OPTIONS=ab','context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'exten':_0x5eab5e[_0x136d49][0x0]['exten'],'priority':_0x4e5937['priority']++,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});for(var _0x97da6a=0x0,_0x2e2c53=0x0;_0x97da6a<_0x5eab5e[_0x136d49][_0xeff2('0x25')];_0x97da6a+=0x1,_0x2e2c53=0x0){var _0x1a5505=_0x5eab5e[_0x136d49][_0x97da6a];if(_0x1a5505[_0xeff2('0x10')]){_0x1a5505[_0xeff2('0x10')]=_0x1a5505['type'][_0xeff2('0x26')]();}var _0x4621ac=[];var _0x232d07=[];delete _0x1a5505['id'];delete _0x1a5505[_0xeff2('0x27')];delete _0x1a5505[_0xeff2('0x28')];var _0x142fb9=_0x1a5505[_0xeff2('0x29')]!==_0xeff2('0x2a')?[_0x1a5505[_0xeff2('0x29')]]:_0x1a5505[_0xeff2('0x2b')]?_[_0xeff2('0x2c')](_[_0xeff2('0x7')](_0x4e5937[_0xeff2('0x2')],{'IntervalId':_0x1a5505[_0xeff2('0x2b')]}),_0xeff2('0x29')):[];if(_0x1a5505['hasOwnProperty'](_0xeff2('0x2d'))){if(_0x1a5505[_0xeff2('0x2d')]&&_0x1a5505[_0xeff2('0x2d')]!=='--'){_0x4621ac['push']({'type':_0x1a5505['type'],'app':_0xeff2('0x11'),'appdata':_0xeff2('0x2e')+_0x1a5505['tag'],'context':_0x1a5505['context'],'exten':_0x1a5505[_0xeff2('0xf')],'priority':_0x142fb9['length']+_0x4e5937[_0xeff2('0xc')]+_0x2e2c53++,'VoiceExtensionId':_0x1a5505[_0xeff2('0x14')]});}}if(_0x1a5505[_0xeff2('0x10')]===_0xeff2('0x15')&&_0x1a5505[_0xeff2('0xb')](_0xeff2('0x2f'))){if(_0x1a5505[_0xeff2('0x2f')]){_0x4621ac['push']({'type':_0x1a5505[_0xeff2('0x10')],'app':_0xeff2('0x30'),'appdata':_0xeff2('0x31')+_0x1a5505[_0xeff2('0x2f')]+')','context':_0x1a5505[_0xeff2('0x13')],'exten':_0x1a5505[_0xeff2('0xf')],'priority':_0x142fb9[_0xeff2('0x25')]+_0x4e5937['priority']+_0x2e2c53++,'VoiceExtensionId':_0x1a5505[_0xeff2('0x14')]});}else{_0x4621ac[_0xeff2('0x1b')]({'type':_0x1a5505[_0xeff2('0x10')],'app':_0xeff2('0x30'),'appdata':_0xeff2('0x32'),'context':_0x1a5505[_0xeff2('0x13')],'exten':_0x1a5505[_0xeff2('0xf')],'priority':_0x142fb9['length']+_0x4e5937[_0xeff2('0xc')]+_0x2e2c53++,'VoiceExtensionId':_0x1a5505['VoiceExtensionId']});}}if(_0x1a5505[_0xeff2('0xb')](_0xeff2('0x33'))){if(_0x19fa74[_0xeff2('0x34')](_0x1a5505[_0xeff2('0x35')][_0xeff2('0x26')]())>=0x0&&_0x1a5505[_0xeff2('0x36')]!==_0xeff2('0x37')){if(_0x1a5505[_0xeff2('0x33')]){_0x4621ac[_0xeff2('0x1b')]({'type':_0x1a5505[_0xeff2('0x10')],'app':_0xeff2('0x30'),'appdata':'$[${XCALLY-MOTION-ANSWER}=0]?Answer','context':_0x1a5505[_0xeff2('0x13')],'exten':_0x1a5505[_0xeff2('0xf')],'priority':_0x142fb9[_0xeff2('0x25')]+_0x4e5937[_0xeff2('0xc')]+_0x2e2c53++,'VoiceExtensionId':_0x1a5505['VoiceExtensionId']});_0x4621ac['push']({'type':_0x1a5505[_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':'XCALLY-MOTION-ANSWER=1','context':_0x1a5505[_0xeff2('0x13')],'exten':_0x1a5505[_0xeff2('0xf')],'priority':_0x142fb9[_0xeff2('0x25')]+_0x4e5937['priority']+_0x2e2c53++,'VoiceExtensionId':_0x1a5505[_0xeff2('0x14')]});}else{_0x4621ac['push']({'type':_0x1a5505[_0xeff2('0x10')],'app':'ExecIf','appdata':_0xeff2('0x38'),'context':_0x1a5505[_0xeff2('0x13')],'exten':_0x1a5505['exten'],'priority':_0x142fb9[_0xeff2('0x25')]+_0x4e5937[_0xeff2('0xc')]+_0x2e2c53++,'VoiceExtensionId':_0x1a5505['VoiceExtensionId']});_0x4621ac[_0xeff2('0x1b')]({'type':_0x1a5505[_0xeff2('0x10')],'app':_0xeff2('0x11'),'appdata':_0xeff2('0x39'),'context':_0x1a5505[_0xeff2('0x13')],'exten':_0x1a5505[_0xeff2('0xf')],'priority':_0x142fb9[_0xeff2('0x25')]+_0x4e5937[_0xeff2('0xc')]+_0x2e2c53++,'VoiceExtensionId':_0x1a5505['VoiceExtensionId']});}}}for(var _0x13a1f6=0x0;_0x13a1f6<_0x142fb9['length'];_0x13a1f6+=0x1){var _0x2f8ab4=_0x4e5937[_0xeff2('0xc')]+_0x142fb9[_0xeff2('0x25')];var _0x985f4e=_0x13a1f6===_0x142fb9[_0xeff2('0x25')]-0x1?_0x4e5937[_0xeff2('0xc')]+_0x4621ac[_0xeff2('0x25')]+_0x232d07[_0xeff2('0x25')]+0x2:_0x4e5937['priority']+_0x13a1f6+0x1;_0x4621ac[_0xeff2('0x3a')](_0x13a1f6,0x0,{'type':_0x1a5505[_0xeff2('0x10')],'app':_0xeff2('0x3b'),'appdata':_0x142fb9[_0x13a1f6]+'?'+_0x1a5505['context']+_0xeff2('0x3c')+_0x2f8ab4+':'+_0x1a5505[_0xeff2('0x13')]+_0xeff2('0x3c')+_0x985f4e,'exten':_0x1a5505[_0xeff2('0xf')],'context':_0x1a5505[_0xeff2('0x13')],'priority':_0x4e5937[_0xeff2('0xc')]+_0x13a1f6,'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});}_0x1a5505['priority']=_0x4621ac[_0xeff2('0x25')]?_[_0xeff2('0x3d')](_0x4621ac)[_0xeff2('0xc')]+0x1:_0x4e5937[_0xeff2('0xc')];_0x4e5937[_0xeff2('0xc')]=(_0x232d07[_0xeff2('0x25')]?_['last'](_0x232d07)[_0xeff2('0xc')]:_0x1a5505[_0xeff2('0xc')])+0x1;_0x4e5937['extensions']=_[_0xeff2('0x3e')](_0x4e5937[_0xeff2('0xd')],_0x4621ac,[_0x1a5505],_0x232d07);}_0x4e5937['extensions'][_0xeff2('0x1b')]({'type':_0x5eab5e[_0x136d49][0x0]['type'],'app':'Hangup','exten':_0x5eab5e[_0x136d49][0x0][_0xeff2('0xf')],'context':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x13')],'priority':_0x4e5937[_0xeff2('0xc')],'VoiceExtensionId':_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]});_0x5c4dc7[_0xeff2('0x1b')](_0x5eab5e[_0x136d49][0x0][_0xeff2('0x14')]);_0x114613=_['concat'](_0x114613,_0x4e5937['extensions']);}}return _0x46935f[_0xeff2('0x3f')](function(_0x3cf8f5){return _0x46935f[_0xeff2('0x0')][_0xeff2('0x3')][_0xeff2('0x40')]({'where':{'VoiceExtensionId':{'$in':_0x5c4dc7}},'transaction':_0x3cf8f5})[_0xeff2('0x5')](function(_0x5a0c80){return _0x46935f[_0xeff2('0x0')][_0xeff2('0x3')][_0xeff2('0x41')](_[_0xeff2('0x42')](_0x114613,_0xeff2('0xc')),{'transaction':_0x3cf8f5});});});})[_0xeff2('0x43')](function(_0x10a4de){console[_0xeff2('0x44')](_0x10a4de);});}exports[_0xeff2('0x45')]=rewrite;
\ No newline at end of file
+var _0x845b=['CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','queue','playback','hasOwnProperty','priority','extensions','extension','push','type','Set','format','VoiceExtensionId','outbound','CDR(destination)=','${EXTEN:','cutdigits','${EXTEN}','context','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','outboundrouteid=','recordingFormat','_XCALLY_MIXMONITOR_FORMAT=','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','length','toLowerCase','createdAt','updatedAt','interval','*,*,*,*','intervals','tag','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','indexOf','app','custom','answer','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice','GotoIfTime',',${EXTEN},','last','Hangup','concat','transaction','destroy','bulkCreate','sortBy','catch','error','rewrite','lodash','util','models','Interval','findAll','then','IntervalId','VoiceExtension','uniq','map','exten'];(function(_0x515d39,_0x263b44){var _0x1bc318=function(_0x4c8c0e){while(--_0x4c8c0e){_0x515d39['push'](_0x515d39['shift']());}};_0x1bc318(++_0x263b44);}(_0x845b,0x1ab));var _0xb845=function(_0x55d70d,_0x32fa55){_0x55d70d=_0x55d70d-0x0;var _0x41dbc4=_0x845b[_0x55d70d];return _0x41dbc4;};'use strict';var _=require(_0xb845('0x0'));var util=require(_0xb845('0x1'));function rewrite(_0x441da2,_0x3a9ab2){var _0x4e2ae0=this;return _0x441da2[_0xb845('0x2')][_0xb845('0x3')][_0xb845('0x4')]({'raw':!![]})[_0xb845('0x5')](function(_0x2ffce9){_0x4e2ae0['intervals']=_0x2ffce9;return _0x441da2[_0xb845('0x2')]['VoiceExtension'][_0xb845('0x4')]({'where':{'IntervalId':_0x3a9ab2[_0xb845('0x6')]},'raw':!![]});})['then'](function(_0x5678dd){return _0x441da2['models'][_0xb845('0x7')][_0xb845('0x4')]({'where':{'exten':{'$in':_[_0xb845('0x8')](_[_0xb845('0x9')](_0x5678dd,_0xb845('0xa')))}},'order':[{'raw':_0xb845('0xb')}],'raw':!![]});})['then'](function(_0x2345fa){var _0xc2262e=_[_0xb845('0xc')](_0x2345fa,{'priority':'1'});var _0x592e79=_[_0xb845('0xc')](_0x2345fa,{'isApp':0x1});var _0xe0f0a3=_[_0xb845('0xd')](_0x592e79,_0xb845('0xa'));var _0x447111=[_0xb845('0xe'),_0xb845('0xf')];var _0x313f26=[];var _0x35c20b=[];for(var _0x1857c0 in _0xe0f0a3){if(_0xe0f0a3[_0xb845('0x10')](_0x1857c0)){_0x4e2ae0[_0xb845('0x11')]=0x2;_0x4e2ae0[_0xb845('0x12')]=[];_0x4e2ae0[_0xb845('0x13')]=_['find'](_0xc2262e,{'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')]});_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x16'),'appdata':util[_0xb845('0x17')]('CDR(type)=%s',_0xe0f0a3[_0x1857c0][0x0]['type']),'context':_0xe0f0a3[_0x1857c0][0x0]['context'],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});if(_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')]===_0xb845('0x19')){if(_0x4e2ae0['extension']){_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':'Set','appdata':_0xb845('0x1a')+(_0x4e2ae0[_0xb845('0x13')]['cutdigits']?_0xb845('0x1b')+_0x4e2ae0[_0xb845('0x13')][_0xb845('0x1c')]+'}':_0xb845('0x1d')),'context':_0xe0f0a3[_0x1857c0][0x0]['context'],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});}_0x4e2ae0[_0xb845('0x12')]['push']({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x16'),'appdata':'CDR(routeid)='+_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')],'context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});var _0x3f660f=_0x4e2ae0['priority']++;_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x1f'),'appdata':_0xb845('0x20')+(_0x3f660f+0x2)+_0xb845('0x21')+(_0x3f660f+0x1)+')','context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x3f660f,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});if(_0x4e2ae0['extension']){_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x16'),'appdata':_0x4e2ae0[_0xb845('0x13')][_0xb845('0x1c')]?_0xb845('0x22')+_0x4e2ae0[_0xb845('0x13')][_0xb845('0x1c')]+'}':_0xb845('0x23'),'context':_0xe0f0a3[_0x1857c0][0x0]['context'],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});}_0x4e2ae0[_0xb845('0x12')]['push']({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':'Set','appdata':_0xb845('0x24')+_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')],'context':_0xe0f0a3[_0x1857c0][0x0]['context'],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0['priority']++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});if(_0x4e2ae0[_0xb845('0x13')]&&_0x4e2ae0[_0xb845('0x13')][_0xb845('0x10')]('recordingFormat')&&_0x4e2ae0[_0xb845('0x13')][_0xb845('0x25')]!=='none'){_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x16'),'appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});_0x4e2ae0[_0xb845('0x12')]['push']({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x16'),'appdata':_0xb845('0x26')+_0x4e2ae0[_0xb845('0x13')][_0xb845('0x25')]||'wav','context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0]['VoiceExtensionId']});}}_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x16'),'appdata':_0xb845('0x27'),'context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0['priority']++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});_0x4e2ae0[_0xb845('0x12')]['push']({'type':_0xe0f0a3[_0x1857c0][0x0]['type'],'app':_0xb845('0x16'),'appdata':_0xb845('0x28'),'context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':'Set','appdata':_0xb845('0x29'),'context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'priority':_0x4e2ae0[_0xb845('0x11')]++,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]});for(var _0xa871d3=0x0,_0x1d42a1=0x0;_0xa871d3<_0xe0f0a3[_0x1857c0][_0xb845('0x2a')];_0xa871d3+=0x1,_0x1d42a1=0x0){var _0x6992e0=_0xe0f0a3[_0x1857c0][_0xa871d3];if(_0x6992e0[_0xb845('0x15')]){_0x6992e0[_0xb845('0x15')]=_0x6992e0[_0xb845('0x15')][_0xb845('0x2b')]();}var _0x22d3bb=[];var _0x3fb610=[];delete _0x6992e0['id'];delete _0x6992e0[_0xb845('0x2c')];delete _0x6992e0[_0xb845('0x2d')];var _0x4a926c=_0x6992e0[_0xb845('0x2e')]!==_0xb845('0x2f')?[_0x6992e0[_0xb845('0x2e')]]:_0x6992e0[_0xb845('0x6')]?_[_0xb845('0x9')](_[_0xb845('0xc')](_0x4e2ae0[_0xb845('0x30')],{'IntervalId':_0x6992e0[_0xb845('0x6')]}),_0xb845('0x2e')):[];if(_0x6992e0['hasOwnProperty'](_0xb845('0x31'))){if(_0x6992e0[_0xb845('0x31')]&&_0x6992e0[_0xb845('0x31')]!=='--'){_0x22d3bb[_0xb845('0x14')]({'type':_0x6992e0[_0xb845('0x15')],'app':'Set','appdata':'CDR(tag)='+_0x6992e0['tag'],'context':_0x6992e0[_0xb845('0x1e')],'exten':_0x6992e0['exten'],'priority':_0x4a926c[_0xb845('0x2a')]+_0x4e2ae0[_0xb845('0x11')]+_0x1d42a1++,'VoiceExtensionId':_0x6992e0[_0xb845('0x18')]});}}if(_0x6992e0[_0xb845('0x15')]===_0xb845('0x19')&&_0x6992e0[_0xb845('0x10')](_0xb845('0x32'))){if(_0x6992e0['callerID']){_0x22d3bb[_0xb845('0x14')]({'type':_0x6992e0[_0xb845('0x15')],'app':_0xb845('0x1f'),'appdata':_0xb845('0x33')+_0x6992e0[_0xb845('0x32')]+')','context':_0x6992e0[_0xb845('0x1e')],'exten':_0x6992e0[_0xb845('0xa')],'priority':_0x4a926c[_0xb845('0x2a')]+_0x4e2ae0[_0xb845('0x11')]+_0x1d42a1++,'VoiceExtensionId':_0x6992e0[_0xb845('0x18')]});}else{_0x22d3bb[_0xb845('0x14')]({'type':_0x6992e0[_0xb845('0x15')],'app':'ExecIf','appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','context':_0x6992e0[_0xb845('0x1e')],'exten':_0x6992e0[_0xb845('0xa')],'priority':_0x4a926c[_0xb845('0x2a')]+_0x4e2ae0[_0xb845('0x11')]+_0x1d42a1++,'VoiceExtensionId':_0x6992e0[_0xb845('0x18')]});}}if(_0x6992e0['hasOwnProperty']('answer')){if(_0x447111[_0xb845('0x34')](_0x6992e0[_0xb845('0x35')][_0xb845('0x2b')]())>=0x0&&_0x6992e0['appType']!==_0xb845('0x36')){if(_0x6992e0[_0xb845('0x37')]){_0x22d3bb[_0xb845('0x14')]({'type':_0x6992e0[_0xb845('0x15')],'app':_0xb845('0x1f'),'appdata':_0xb845('0x38'),'context':_0x6992e0['context'],'exten':_0x6992e0[_0xb845('0xa')],'priority':_0x4a926c['length']+_0x4e2ae0[_0xb845('0x11')]+_0x1d42a1++,'VoiceExtensionId':_0x6992e0[_0xb845('0x18')]});_0x22d3bb[_0xb845('0x14')]({'type':_0x6992e0[_0xb845('0x15')],'app':'Set','appdata':_0xb845('0x39'),'context':_0x6992e0['context'],'exten':_0x6992e0[_0xb845('0xa')],'priority':_0x4a926c[_0xb845('0x2a')]+_0x4e2ae0['priority']+_0x1d42a1++,'VoiceExtensionId':_0x6992e0[_0xb845('0x18')]});}else{_0x22d3bb['push']({'type':_0x6992e0[_0xb845('0x15')],'app':_0xb845('0x1f'),'appdata':_0xb845('0x3a'),'context':_0x6992e0[_0xb845('0x1e')],'exten':_0x6992e0[_0xb845('0xa')],'priority':_0x4a926c['length']+_0x4e2ae0[_0xb845('0x11')]+_0x1d42a1++,'VoiceExtensionId':_0x6992e0[_0xb845('0x18')]});_0x22d3bb[_0xb845('0x14')]({'type':_0x6992e0[_0xb845('0x15')],'app':_0xb845('0x16'),'appdata':_0xb845('0x3b'),'context':_0x6992e0[_0xb845('0x1e')],'exten':_0x6992e0[_0xb845('0xa')],'priority':_0x4a926c[_0xb845('0x2a')]+_0x4e2ae0[_0xb845('0x11')]+_0x1d42a1++,'VoiceExtensionId':_0x6992e0[_0xb845('0x18')]});}}}for(var _0x150288=0x0;_0x150288<_0x4a926c['length'];_0x150288+=0x1){var _0x1f6df3=_0x4e2ae0[_0xb845('0x11')]+_0x4a926c[_0xb845('0x2a')];var _0x1fbd47=_0x150288===_0x4a926c[_0xb845('0x2a')]-0x1?_0x4e2ae0[_0xb845('0x11')]+_0x22d3bb['length']+_0x3fb610[_0xb845('0x2a')]+0x2:_0x4e2ae0[_0xb845('0x11')]+_0x150288+0x1;_0x22d3bb[_0xb845('0x3c')](_0x150288,0x0,{'type':_0x6992e0[_0xb845('0x15')],'app':_0xb845('0x3d'),'appdata':_0x4a926c[_0x150288]+'?'+_0x6992e0[_0xb845('0x1e')]+_0xb845('0x3e')+_0x1f6df3+':'+_0x6992e0[_0xb845('0x1e')]+',${EXTEN},'+_0x1fbd47,'exten':_0x6992e0[_0xb845('0xa')],'context':_0x6992e0[_0xb845('0x1e')],'priority':_0x4e2ae0[_0xb845('0x11')]+_0x150288,'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0]['VoiceExtensionId']});}_0x6992e0[_0xb845('0x11')]=_0x22d3bb[_0xb845('0x2a')]?_['last'](_0x22d3bb)[_0xb845('0x11')]+0x1:_0x4e2ae0[_0xb845('0x11')];_0x4e2ae0['priority']=(_0x3fb610[_0xb845('0x2a')]?_[_0xb845('0x3f')](_0x3fb610)[_0xb845('0x11')]:_0x6992e0[_0xb845('0x11')])+0x1;_0x4e2ae0[_0xb845('0x12')]=_['concat'](_0x4e2ae0[_0xb845('0x12')],_0x22d3bb,[_0x6992e0],_0x3fb610);}_0x4e2ae0[_0xb845('0x12')][_0xb845('0x14')]({'type':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x15')],'app':_0xb845('0x40'),'exten':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0xa')],'context':_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x1e')],'priority':_0x4e2ae0[_0xb845('0x11')],'VoiceExtensionId':_0xe0f0a3[_0x1857c0][0x0]['VoiceExtensionId']});_0x313f26[_0xb845('0x14')](_0xe0f0a3[_0x1857c0][0x0][_0xb845('0x18')]);_0x35c20b=_[_0xb845('0x41')](_0x35c20b,_0x4e2ae0[_0xb845('0x12')]);}}return _0x441da2[_0xb845('0x42')](function(_0x586d90){return _0x441da2['models']['VoiceExtension'][_0xb845('0x43')]({'where':{'VoiceExtensionId':{'$in':_0x313f26}},'transaction':_0x586d90})[_0xb845('0x5')](function(_0x2a4641){return _0x441da2[_0xb845('0x2')][_0xb845('0x7')][_0xb845('0x44')](_[_0xb845('0x45')](_0x35c20b,_0xb845('0x11')),{'transaction':_0x586d90});});});})[_0xb845('0x46')](function(_0x354ce3){console[_0xb845('0x47')](_0x354ce3);});}exports[_0xb845('0x48')]=rewrite;
\ No newline at end of file
diff --git a/server/components/import/cm/csv.js b/server/components/import/cm/csv.js
index 78b11a8..17e567a 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 _0xb7e7=['birthDate','YYYY-MM-DD','isValid','email','email\x20format\x20is\x20not\x20valid!','ListId','CompanyId','find','Duplicate\x20Contact','CmContact','create','then','push','pick','catch','Error\x20while\x20creating\x20contact:\x20','message','stringify','cmContact','checkHopper','insert','into','cm_hopper','fromQuery','scheduledAt','createdAt','updatedAt','select','field','toString','NOW()','from','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','\x20=\x20?','ContactId','cm_contacts','where','str','id\x20IN\x20?','cm_hopper_black','VoiceQueue','findAll','outbound','dialCheckDuplicateType','CmList','Lists','get','always','query','VoiceQueueId','onlyIfOpen','sequelize','all','BlackLists','Campaign','CampaignId','cmContact,\x20%s,\x20%s','generalCheckHopper','Error\x20processing\x20rows\x20block:','finally','emit','contact:csv_','resolve','unlinkSync','Unable\x20to\x20delete\x20temp\x20file:','SIGINT','createReadStream','parse','duplicate','pause','info','CSV\x20parsed\x20correctly!','CSV\x20parse\x20error','Error\x20executing\x20contact\x20csv\x20import:','bluebird','lodash','papaparse','../../../mysqldb','../../../config/logger','api','redis','localhost','socket.io-emitter','register','argv','undefined','null','Missing\x20filepath\x20parameter!','Missing\x20binding\x20parameters!','zipObject','split','error','contact','index','test','isNil','errors','length','map','join','data','phone','phone\x20not\x20specified!'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xb7e7,0x121));var _0x7b7e=function(_0x1ccdf7,_0x215d5a){_0x1ccdf7=_0x1ccdf7-0x0;var _0x52a0ae=_0xb7e7[_0x1ccdf7];return _0x52a0ae;};'use strict';var BPromise=require(_0x7b7e('0x0'));var util=require('util');var _=require(_0x7b7e('0x1'));var fs=require('fs');var squel=require('squel');var Papa=require(_0x7b7e('0x2'));var Redis=require('ioredis');var db=require(_0x7b7e('0x3'))['db'];var config=require('../../../config/environment');var logger=require(_0x7b7e('0x4'))(_0x7b7e('0x5'));config[_0x7b7e('0x6')]=_['defaults'](config['redis'],{'host':_0x7b7e('0x7'),'port':0x18eb});var socket=require(_0x7b7e('0x8'))(new Redis(config[_0x7b7e('0x6')]));require('../../../api/cmContact/cmContact.socket')[_0x7b7e('0x9')](socket);try{if(!process[_0x7b7e('0xa')][0x2]||process[_0x7b7e('0xa')][0x2]===_0x7b7e('0xb')||process[_0x7b7e('0xa')][0x2]===_0x7b7e('0xc')){throw new Error(_0x7b7e('0xd'));}var FILEPATH=process['argv'][0x2];if(!process[_0x7b7e('0xa')][0x3]||process[_0x7b7e('0xa')][0x3]===_0x7b7e('0xb')||process[_0x7b7e('0xa')][0x3]===_0x7b7e('0xc')||!process[_0x7b7e('0xa')][0x4]||process[_0x7b7e('0xa')][0x4]===_0x7b7e('0xb')||process[_0x7b7e('0xa')][0x4]==='null'){throw new Error(_0x7b7e('0xe'));}var FIELDS=_[_0x7b7e('0xf')](process['argv'][0x3][_0x7b7e('0x10')](','),process['argv'][0x4]['split'](','));if(!process[_0x7b7e('0xa')][0x5]||process[_0x7b7e('0xa')][0x5]===_0x7b7e('0xb')||process[_0x7b7e('0xa')][0x5]===_0x7b7e('0xc')){throw new Error('Missing\x20ListId\x20parameter!');}var LISTID=process['argv'][0x5];var COMPANYID=process[_0x7b7e('0xa')][0x6]&&process[_0x7b7e('0xa')][0x6]!==_0x7b7e('0xb')&&process[_0x7b7e('0xa')][0x6]!==_0x7b7e('0xc')?process[_0x7b7e('0xa')][0x6]:null;var DUPLICATES=process[_0x7b7e('0xa')][0x7]&&process[_0x7b7e('0xa')][0x7]!==_0x7b7e('0xb')&&process[_0x7b7e('0xa')][0x7]!==_0x7b7e('0xc')?process[_0x7b7e('0xa')][0x7]:null;if(!process[_0x7b7e('0xa')][0x8]||process[_0x7b7e('0xa')][0x8]===_0x7b7e('0xb')||process[_0x7b7e('0xa')][0x8]===_0x7b7e('0xc')){throw new Error('Missing\x20socket_timestamp\x20parameter!');}var SOCKET_TIMESTAMP=process[_0x7b7e('0xa')][0x8];}catch(_0x43db4f){logger[_0x7b7e('0x11')](_0x43db4f);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(_0x4c0647,_0x313122,_0xbf0cb3,_0x14243b){var _0x200156={'message':_0x313122};_0x200156[_0x4c0647]=!![];if(_0xbf0cb3){_0x200156[_0x7b7e('0x12')]=_0xbf0cb3;}if(_0x14243b){_0x200156[_0x7b7e('0x13')]=_0x14243b;}return _0x200156;}function isEmail(_0x28bf43){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))*$/[_0x7b7e('0x14')](_0x28bf43);}function checkRow(_0x53bbb3,_0x5d6215,_0x4a836a){return new BPromise(function(_0x26ee14,_0x22598e){if(_[_0x7b7e('0x15')](_0x53bbb3)){return _0x22598e(handleCheckRowError('error','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!',null,_0x4a836a));}if(_0x53bbb3['errors']&&_0x53bbb3[_0x7b7e('0x16')][_0x7b7e('0x17')]){var _0x16a3c7=_[_0x7b7e('0x18')](_0x53bbb3[_0x7b7e('0x16')],'message')[_0x7b7e('0x19')](';');return _0x22598e(handleCheckRowError(_0x7b7e('0x11'),_0x16a3c7,null,_0x4a836a));}var _0x4c46b8={};for(var _0x57b9da in FIELDS){if(FIELDS['hasOwnProperty'](_0x57b9da)&&FIELDS[_0x57b9da]){_0x4c46b8[_0x57b9da]=_0x53bbb3[_0x7b7e('0x1a')][0x0][FIELDS[_0x57b9da]]||_0x53bbb3[_0x7b7e('0x1a')][0x0]['\ufeff'+FIELDS[_0x57b9da]];}}if(!_0x4c46b8['firstName']){return _0x22598e(handleCheckRowError(_0x7b7e('0x11'),'firstName\x20not\x20specified!',null,_0x4a836a));}if(!_0x4c46b8[_0x7b7e('0x1b')]){return _0x22598e(handleCheckRowError(_0x7b7e('0x11'),_0x7b7e('0x1c'),null,_0x4a836a));}if(_0x4c46b8['birthDate']){var _0x3960b8=moment(_0x4c46b8[_0x7b7e('0x1d')],_0x7b7e('0x1e'));if(!_0x3960b8[_0x7b7e('0x1f')]()){return _0x22598e(handleCheckRowError(_0x7b7e('0x11'),'birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!',null,_0x4a836a));}}if(_0x4c46b8[_0x7b7e('0x20')]){if(!isEmail(_0x4c46b8['email'])){return _0x22598e(handleCheckRowError(_0x7b7e('0x11'),_0x7b7e('0x21'),null,_0x4a836a));}}_0x4c46b8[_0x7b7e('0x22')]=LISTID;_0x4c46b8[_0x7b7e('0x23')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x7b7e('0x17')]&&_0x5d6215){var _0x247ea0={};for(var _0x29cb58=0x0,_0x4bfe7f=DUPLICATES['length'];_0x29cb58<_0x4bfe7f;_0x29cb58+=0x1){_0x247ea0[DUPLICATES[_0x29cb58]]=_0x4c46b8[DUPLICATES[_0x29cb58]];}var _0xebcdbc=_[_0x7b7e('0x24')](_0x5d6215,_0x247ea0);if(_0xebcdbc){return _0x22598e(handleCheckRowError('duplicate',_0x7b7e('0x25'),_0xebcdbc,_0x4a836a));}}return db[_0x7b7e('0x26')][_0x7b7e('0x27')](_0x4c46b8,{'raw':!![],'hooks':![],'fields':_['keys'](_0x4c46b8)})[_0x7b7e('0x28')](function(_0x256908){if(DUPLICATES&&DUPLICATES[_0x7b7e('0x17')]&&_0x5d6215){_0x5d6215[_0x7b7e('0x29')](_[_0x7b7e('0x2a')](_0x4c46b8,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x256908['id'];return _0x26ee14();})[_0x7b7e('0x2b')](function(_0x3e8cf4){return _0x22598e(handleCheckRowError(_0x7b7e('0x11'),_0x7b7e('0x2c')+(_0x3e8cf4[_0x7b7e('0x2d')]||JSON[_0x7b7e('0x2e')](_0x3e8cf4)),null,_0x4a836a));});});}function checkHopper(){function _0x2d0620(){return function(_0x442366){logger[_0x7b7e('0x11')](_0x7b7e('0x2f'),_0x7b7e('0x30'),util['inspect'](_0x442366,{'showHidden':![],'depth':null}));};}var _0x8c80d5=function(_0x156dca,_0xb20532){var _0x242609=squel[_0x7b7e('0x31')]()[_0x7b7e('0x32')](_0x7b7e('0x33'))[_0x7b7e('0x34')]([_0x7b7e('0x1b'),_0x7b7e('0x35'),'ContactId',_0x7b7e('0x22'),_0xb20532,_0x7b7e('0x36'),_0x7b7e('0x37')],squel[_0x7b7e('0x38')]()['field'](_0x7b7e('0x1b'),_0x7b7e('0x1b'))[_0x7b7e('0x39')]('NOW()','scheduledAt')[_0x7b7e('0x39')]('id','ContactId')[_0x7b7e('0x39')](LISTID[_0x7b7e('0x3a')](),'ListId')[_0x7b7e('0x39')](_0x156dca['id'][_0x7b7e('0x3a')](),_0xb20532)[_0x7b7e('0x39')](_0x7b7e('0x3b'),_0x7b7e('0x36'))[_0x7b7e('0x39')](_0x7b7e('0x3b'),_0x7b7e('0x37'))[_0x7b7e('0x3c')]('cm_contacts')['where'](_0x7b7e('0x3d'))['where'](_0x7b7e('0x3e'),LISTID['toString']())['where'](_0x7b7e('0x3f'))['where'](_0x7b7e('0x40'),squel['select']()[_0x7b7e('0x39')](_0x7b7e('0x1b'))[_0x7b7e('0x3c')](_0x7b7e('0x33'))['where'](_0xb20532+_0x7b7e('0x41'),_0x156dca['id'][_0x7b7e('0x3a')]())))[_0x7b7e('0x3a')]();return _0x242609;};var _0x37895a=function(_0x3e4f21,_0xccdfc7){var _0x5e8572=squel['insert']()['into'](_0x7b7e('0x33'))[_0x7b7e('0x34')]([_0x7b7e('0x1b'),_0x7b7e('0x35'),_0x7b7e('0x42'),_0x7b7e('0x22'),_0xccdfc7,'createdAt',_0x7b7e('0x37')],squel[_0x7b7e('0x38')]()['field']('phone',_0x7b7e('0x1b'))[_0x7b7e('0x39')](_0x7b7e('0x3b'),_0x7b7e('0x35'))[_0x7b7e('0x39')]('id',_0x7b7e('0x42'))['field'](LISTID[_0x7b7e('0x3a')](),'ListId')[_0x7b7e('0x39')](_0x3e4f21['id'][_0x7b7e('0x3a')](),_0xccdfc7)[_0x7b7e('0x39')](_0x7b7e('0x3b'),'createdAt')[_0x7b7e('0x39')](_0x7b7e('0x3b'),_0x7b7e('0x37'))[_0x7b7e('0x3c')](_0x7b7e('0x43'))['where'](_0x7b7e('0x3d'))[_0x7b7e('0x44')](_0x7b7e('0x3e'),LISTID[_0x7b7e('0x3a')]())[_0x7b7e('0x44')]('id\x20IN\x20?',squel[_0x7b7e('0x45')](hopperContacts))[_0x7b7e('0x44')](_0x7b7e('0x3f'))[_0x7b7e('0x44')](_0x7b7e('0x40'),squel[_0x7b7e('0x38')]()[_0x7b7e('0x39')]('calleridnum')[_0x7b7e('0x3c')]('cm_hopper_final')[_0x7b7e('0x44')](_0xccdfc7+_0x7b7e('0x41'),_0x3e4f21['id']['toString']()))[_0x7b7e('0x44')](_0x7b7e('0x40'),squel[_0x7b7e('0x38')]()[_0x7b7e('0x39')](_0x7b7e('0x1b'))[_0x7b7e('0x3c')](_0x7b7e('0x33'))['where'](_0xccdfc7+_0x7b7e('0x41'),_0x3e4f21['id'][_0x7b7e('0x3a')]())))[_0x7b7e('0x3a')]();return _0x5e8572;};function _0x24481a(_0x5b9ab5,_0x527403){var _0x5bdf1d=squel[_0x7b7e('0x31')]()[_0x7b7e('0x32')](_0x7b7e('0x33'))['fromQuery'](['phone',_0x7b7e('0x35'),_0x7b7e('0x42'),'ListId',_0x527403,_0x7b7e('0x36'),_0x7b7e('0x37')],squel[_0x7b7e('0x38')]()['field'](_0x7b7e('0x1b'),_0x7b7e('0x1b'))['field'](_0x7b7e('0x3b'),_0x7b7e('0x35'))[_0x7b7e('0x39')]('id',_0x7b7e('0x42'))[_0x7b7e('0x39')](LISTID[_0x7b7e('0x3a')](),_0x7b7e('0x22'))[_0x7b7e('0x39')](_0x5b9ab5['id'][_0x7b7e('0x3a')](),_0x527403)['field'](_0x7b7e('0x3b'),_0x7b7e('0x36'))['field'](_0x7b7e('0x3b'),_0x7b7e('0x37'))[_0x7b7e('0x3c')]('cm_contacts')[_0x7b7e('0x44')]('deletedAt\x20IS\x20NULL')[_0x7b7e('0x44')](_0x7b7e('0x3e'),LISTID['toString']())[_0x7b7e('0x44')](_0x7b7e('0x46'),squel['str'](hopperContacts))[_0x7b7e('0x44')](_0x7b7e('0x3f')))[_0x7b7e('0x3a')]();return _0x5bdf1d;}function _0x3b1adb(_0x5eb32c,_0x101896){var _0x73904d=squel[_0x7b7e('0x31')]()[_0x7b7e('0x32')](_0x7b7e('0x47'))[_0x7b7e('0x34')]([_0x7b7e('0x1b'),_0x7b7e('0x42'),_0x7b7e('0x22'),_0x101896,_0x7b7e('0x36'),'updatedAt'],squel[_0x7b7e('0x38')]()['field']('phone',_0x7b7e('0x1b'))[_0x7b7e('0x39')]('id',_0x7b7e('0x42'))[_0x7b7e('0x39')](LISTID['toString'](),_0x7b7e('0x22'))[_0x7b7e('0x39')](_0x5eb32c['id'][_0x7b7e('0x3a')](),_0x101896)[_0x7b7e('0x39')](_0x7b7e('0x3b'),_0x7b7e('0x36'))['field'](_0x7b7e('0x3b'),'updatedAt')['from'](_0x7b7e('0x43'))['where'](_0x7b7e('0x3d'))['where'](_0x7b7e('0x3e'),LISTID[_0x7b7e('0x3a')]())['where'](_0x7b7e('0x46'),squel[_0x7b7e('0x45')](hopperContacts))['where'](_0x7b7e('0x3f')))[_0x7b7e('0x3a')]();return _0x73904d;}return db[_0x7b7e('0x48')][_0x7b7e('0x49')]({'where':{'type':_0x7b7e('0x4a')},'attributes':['id',_0x7b7e('0x4b')],'include':[{'model':db[_0x7b7e('0x4c')],'as':_0x7b7e('0x4d'),'where':{'id':LISTID}}]})[_0x7b7e('0x28')](function(_0x17e5ba){var _0x589b02=[];if(_0x17e5ba){var _0x59ecf9;for(var _0x34e7df=0x0,_0x46ac1f;_0x34e7df<_0x17e5ba[_0x7b7e('0x17')];_0x34e7df+=0x1){_0x46ac1f=_0x17e5ba[_0x34e7df][_0x7b7e('0x4e')]({'plain':!![]});switch(_0x46ac1f[_0x7b7e('0x4b')]){case _0x7b7e('0x4f'):_0x589b02[_0x7b7e('0x29')](db['sequelize'][_0x7b7e('0x50')](_0x37895a(_0x46ac1f,_0x7b7e('0x51')))['then'](function(){})[_0x7b7e('0x2b')](_0x2d0620()));break;case _0x7b7e('0x52'):_0x589b02[_0x7b7e('0x29')](db[_0x7b7e('0x53')][_0x7b7e('0x50')](_0x8c80d5(_0x46ac1f,_0x7b7e('0x51')))[_0x7b7e('0x28')](function(){})[_0x7b7e('0x2b')](_0x2d0620()));break;default:_0x589b02[_0x7b7e('0x29')](db[_0x7b7e('0x53')][_0x7b7e('0x50')](_0x24481a(_0x46ac1f,'VoiceQueueId'))[_0x7b7e('0x28')](function(){})[_0x7b7e('0x2b')](_0x2d0620()));}}}return _0x589b02;})[_0x7b7e('0x54')]()[_0x7b7e('0x28')](function(){return db[_0x7b7e('0x48')][_0x7b7e('0x49')]({'where':{'type':_0x7b7e('0x4a')},'attributes':['id'],'include':[{'model':db['CmList'],'as':_0x7b7e('0x55'),'where':{'id':LISTID}}]})[_0x7b7e('0x28')](function(_0x1eb5ce){var _0x49f0a4=[];if(_0x1eb5ce){var _0x1d6aa4;for(var _0x195ae2=0x0,_0x381ee6;_0x195ae2<_0x1eb5ce[_0x7b7e('0x17')];_0x195ae2+=0x1){_0x381ee6=_0x1eb5ce[_0x195ae2][_0x7b7e('0x4e')]({'plain':!![]});_0x49f0a4['push'](db['sequelize']['query'](_0x3b1adb(_0x381ee6,_0x7b7e('0x51')))[_0x7b7e('0x28')](function(){})[_0x7b7e('0x2b')](_0x2d0620()));}}return _0x49f0a4;})['all']();})[_0x7b7e('0x28')](function(){return db[_0x7b7e('0x56')][_0x7b7e('0x49')]({'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db[_0x7b7e('0x4c')],'as':_0x7b7e('0x4d'),'where':{'id':LISTID}}]})[_0x7b7e('0x28')](function(_0x34a06c){var _0x538c5f=[];if(_0x34a06c){for(var _0x315923=0x0,_0x40b4ae;_0x315923<_0x34a06c[_0x7b7e('0x17')];_0x315923+=0x1){_0x40b4ae=_0x34a06c[_0x315923][_0x7b7e('0x4e')]({'plain':!![]});switch(_0x40b4ae['dialCheckDuplicateType']){case'always':_0x538c5f[_0x7b7e('0x29')](db['sequelize'][_0x7b7e('0x50')](_0x37895a(_0x40b4ae,_0x7b7e('0x57')))[_0x7b7e('0x28')](function(){})[_0x7b7e('0x2b')](_0x2d0620()));break;case'onlyIfOpen':_0x538c5f[_0x7b7e('0x29')](db[_0x7b7e('0x53')][_0x7b7e('0x50')](_0x8c80d5(_0x40b4ae,_0x7b7e('0x57')))[_0x7b7e('0x28')](function(){})[_0x7b7e('0x2b')](_0x2d0620()));break;default:_0x538c5f[_0x7b7e('0x29')](db[_0x7b7e('0x53')][_0x7b7e('0x50')](_0x24481a(_0x40b4ae,_0x7b7e('0x57')))[_0x7b7e('0x28')](function(){})[_0x7b7e('0x2b')](_0x2d0620()));}}}return _0x538c5f;})[_0x7b7e('0x54')]();})[_0x7b7e('0x28')](function(){return db[_0x7b7e('0x56')][_0x7b7e('0x49')]({'attributes':['id'],'include':[{'model':db['CmList'],'as':_0x7b7e('0x55'),'where':{'id':LISTID}}]})[_0x7b7e('0x28')](function(_0x1d9e08){var _0xa03d7a=[];if(_0x1d9e08){for(var _0x10c35e=0x0,_0x302462;_0x10c35e<_0x1d9e08[_0x7b7e('0x17')];_0x10c35e+=0x1){_0x302462=_0x1d9e08[_0x10c35e]['get']({'plain':!![]});_0xa03d7a[_0x7b7e('0x29')](db[_0x7b7e('0x53')][_0x7b7e('0x50')](_0x3b1adb(_0x302462,_0x7b7e('0x57')))[_0x7b7e('0x28')](function(){})['catch'](_0x2d0620()));}}return _0xa03d7a;})['all']();})[_0x7b7e('0x2b')](function(_0x110f2b){logger[_0x7b7e('0x11')](_0x7b7e('0x58'),_0x7b7e('0x59'),_0x110f2b[_0x7b7e('0x2d')]);});}var processPromises=function(_0x2c65b8){return BPromise[_0x7b7e('0x54')](promises)[_0x7b7e('0x28')](function(_0x850d0f){})['catch'](function(_0x27402a){logger[_0x7b7e('0x11')](_0x7b7e('0x5a'),JSON[_0x7b7e('0x2e')](_0x27402a));})[_0x7b7e('0x5b')](function(){socket[_0x7b7e('0x5c')](_0x7b7e('0x5d')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x2c65b8){return _0x2c65b8['resume']();}});};var endCsv=function(){return BPromise[_0x7b7e('0x5e')]()['then'](function(){if(hopperContacts){return checkHopper();}})[_0x7b7e('0x28')](function(){socket[_0x7b7e('0x5c')]('contact:csv_'+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0x7b7e('0x5f')](FILEPATH);}catch(_0x38fd40){logger[_0x7b7e('0x11')](_0x7b7e('0x60'),JSON[_0x7b7e('0x2e')](_0x38fd40));}finally{process['exit'](0x0);}});};process['on'](_0x7b7e('0x61'),function(){logger['info']('CSV\x20import\x20process\x20stopped!');endCsv();});function main(){return BPromise[_0x7b7e('0x5e')]()[_0x7b7e('0x28')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x7b7e('0x10')](',');return db[_0x7b7e('0x26')]['findAll']({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x7b7e('0x28')](function(_0x5cedd4){var _0x25233a=fs[_0x7b7e('0x62')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0x7b7e('0x63')](_0x25233a,{'header':!![],'skipEmptyLines':!![],'step':function(_0x1e71ab,_0x11d615){total+=0x1;var _0x3afd15=total;promises[_0x7b7e('0x29')](checkRow(_0x1e71ab,_0x5cedd4,_0x3afd15)['then'](function(){success+=0x1;})[_0x7b7e('0x2b')](function(_0x30eeee){if(_0x30eeee['error']){errors+=0x1;delete _0x30eeee[_0x7b7e('0x11')];}else if(_0x30eeee[_0x7b7e('0x64')]){duplicates+=0x1;delete _0x30eeee[_0x7b7e('0x64')];}rows[_0x7b7e('0x29')](_0x30eeee);}));if(total%0xc8===0x0){_0x11d615[_0x7b7e('0x65')]();return processPromises(_0x11d615);}},'complete':function(){return processPromises()[_0x7b7e('0x28')](function(){logger[_0x7b7e('0x66')](_0x7b7e('0x67'));endCsv();});},'error':function(_0x41e2b5,_0x97232d){logger[_0x7b7e('0x66')](_0x7b7e('0x68'),JSON[_0x7b7e('0x2e')](_0x41e2b5));endCsv();}});})[_0x7b7e('0x2b')](function(_0x12d0cb){logger[_0x7b7e('0x11')](_0x7b7e('0x69'),JSON[_0x7b7e('0x2e')](_0x12d0cb));});}main();
\ No newline at end of file
+var _0xd8b0=['find','Duplicate\x20Contact','CmContact','keys','then','push','pick','catch','message','stringify','cmContact','checkHopper','inspect','into','cm_hopper','fromQuery','scheduledAt','ContactId','createdAt','updatedAt','select','field','ListId','toString','NOW()','from','cm_contacts','where','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','\x20=\x20?','ListId\x20=\x20?','id\x20IN\x20?','insert','deletedAt\x20IS\x20NULL','str','cm_hopper_black','VoiceQueue','outbound','Lists','get','dialCheckDuplicateType','always','sequelize','VoiceQueueId','onlyIfOpen','query','all','CmList','Campaign','findAll','CampaignId','cmContact,\x20%s,\x20%s','Error\x20processing\x20rows\x20block:','finally','emit','contact:csv_','resume','unlinkSync','Unable\x20to\x20delete\x20temp\x20file:','exit','info','createReadStream','parse','duplicate','pause','CSV\x20parse\x20error','Error\x20executing\x20contact\x20csv\x20import:','bluebird','util','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','api','redis','localhost','socket.io-emitter','../../../api/cmContact/cmContact.socket','register','argv','undefined','null','Missing\x20filepath\x20parameter!','Missing\x20binding\x20parameters!','zipObject','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','contact','index','test','error','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','map','hasOwnProperty','data','phone','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','email','CompanyId','length'];(function(_0x4cf10a,_0x160696){var _0x1d536e=function(_0x2d2171){while(--_0x2d2171){_0x4cf10a['push'](_0x4cf10a['shift']());}};_0x1d536e(++_0x160696);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var BPromise=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var _=require('lodash');var fs=require('fs');var squel=require('squel');var Papa=require('papaparse');var Redis=require(_0x0d8b('0x2'));var db=require(_0x0d8b('0x3'))['db'];var config=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));config['redis']=_['defaults'](config[_0x0d8b('0x7')],{'host':_0x0d8b('0x8'),'port':0x18eb});var socket=require(_0x0d8b('0x9'))(new Redis(config['redis']));require(_0x0d8b('0xa'))[_0x0d8b('0xb')](socket);try{if(!process['argv'][0x2]||process[_0x0d8b('0xc')][0x2]===_0x0d8b('0xd')||process[_0x0d8b('0xc')][0x2]===_0x0d8b('0xe')){throw new Error(_0x0d8b('0xf'));}var FILEPATH=process[_0x0d8b('0xc')][0x2];if(!process[_0x0d8b('0xc')][0x3]||process[_0x0d8b('0xc')][0x3]==='undefined'||process[_0x0d8b('0xc')][0x3]==='null'||!process[_0x0d8b('0xc')][0x4]||process[_0x0d8b('0xc')][0x4]===_0x0d8b('0xd')||process[_0x0d8b('0xc')][0x4]===_0x0d8b('0xe')){throw new Error(_0x0d8b('0x10'));}var FIELDS=_[_0x0d8b('0x11')](process[_0x0d8b('0xc')][0x3][_0x0d8b('0x12')](','),process[_0x0d8b('0xc')][0x4][_0x0d8b('0x12')](','));if(!process[_0x0d8b('0xc')][0x5]||process[_0x0d8b('0xc')][0x5]===_0x0d8b('0xd')||process['argv'][0x5]===_0x0d8b('0xe')){throw new Error(_0x0d8b('0x13'));}var LISTID=process[_0x0d8b('0xc')][0x5];var COMPANYID=process[_0x0d8b('0xc')][0x6]&&process[_0x0d8b('0xc')][0x6]!=='undefined'&&process[_0x0d8b('0xc')][0x6]!==_0x0d8b('0xe')?process[_0x0d8b('0xc')][0x6]:null;var DUPLICATES=process[_0x0d8b('0xc')][0x7]&&process[_0x0d8b('0xc')][0x7]!==_0x0d8b('0xd')&&process[_0x0d8b('0xc')][0x7]!==_0x0d8b('0xe')?process['argv'][0x7]:null;if(!process[_0x0d8b('0xc')][0x8]||process[_0x0d8b('0xc')][0x8]===_0x0d8b('0xd')||process[_0x0d8b('0xc')][0x8]===_0x0d8b('0xe')){throw new Error(_0x0d8b('0x14'));}var SOCKET_TIMESTAMP=process[_0x0d8b('0xc')][0x8];}catch(_0x352c17){logger['error'](_0x352c17);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(_0x4f0a1a,_0x33fb87,_0x54a9a7,_0x56c729){var _0x5527d8={'message':_0x33fb87};_0x5527d8[_0x4f0a1a]=!![];if(_0x54a9a7){_0x5527d8[_0x0d8b('0x15')]=_0x54a9a7;}if(_0x56c729){_0x5527d8[_0x0d8b('0x16')]=_0x56c729;}return _0x5527d8;}function isEmail(_0x214778){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))*$/[_0x0d8b('0x17')](_0x214778);}function checkRow(_0x221071,_0x2c64e2,_0x30980c){return new BPromise(function(_0x4562cb,_0x27b695){if(_['isNil'](_0x221071)){return _0x27b695(handleCheckRowError(_0x0d8b('0x18'),_0x0d8b('0x19'),null,_0x30980c));}if(_0x221071['errors']&&_0x221071[_0x0d8b('0x1a')]['length']){var _0x3dd149=_[_0x0d8b('0x1b')](_0x221071[_0x0d8b('0x1a')],'message')['join'](';');return _0x27b695(handleCheckRowError(_0x0d8b('0x18'),_0x3dd149,null,_0x30980c));}var _0x3ef745={};for(var _0x4c05ee in FIELDS){if(FIELDS[_0x0d8b('0x1c')](_0x4c05ee)&&FIELDS[_0x4c05ee]){_0x3ef745[_0x4c05ee]=_0x221071['data'][0x0][FIELDS[_0x4c05ee]]||_0x221071[_0x0d8b('0x1d')][0x0]['\ufeff'+FIELDS[_0x4c05ee]];}}if(!_0x3ef745['firstName']){return _0x27b695(handleCheckRowError(_0x0d8b('0x18'),'firstName\x20not\x20specified!',null,_0x30980c));}if(!_0x3ef745[_0x0d8b('0x1e')]){return _0x27b695(handleCheckRowError('error',_0x0d8b('0x1f'),null,_0x30980c));}if(_0x3ef745['birthDate']){var _0x3c8887=moment(_0x3ef745[_0x0d8b('0x20')],_0x0d8b('0x21'));if(!_0x3c8887['isValid']()){return _0x27b695(handleCheckRowError('error','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!',null,_0x30980c));}}if(_0x3ef745[_0x0d8b('0x22')]){if(!isEmail(_0x3ef745['email'])){return _0x27b695(handleCheckRowError(_0x0d8b('0x18'),'email\x20format\x20is\x20not\x20valid!',null,_0x30980c));}}_0x3ef745['ListId']=LISTID;_0x3ef745[_0x0d8b('0x23')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x0d8b('0x24')]&&_0x2c64e2){var _0x109c14={};for(var _0xdeee5d=0x0,_0x183220=DUPLICATES[_0x0d8b('0x24')];_0xdeee5d<_0x183220;_0xdeee5d+=0x1){_0x109c14[DUPLICATES[_0xdeee5d]]=_0x3ef745[DUPLICATES[_0xdeee5d]];}var _0x4a99d3=_[_0x0d8b('0x25')](_0x2c64e2,_0x109c14);if(_0x4a99d3){return _0x27b695(handleCheckRowError('duplicate',_0x0d8b('0x26'),_0x4a99d3,_0x30980c));}}return db[_0x0d8b('0x27')]['create'](_0x3ef745,{'raw':!![],'hooks':![],'fields':_[_0x0d8b('0x28')](_0x3ef745)})[_0x0d8b('0x29')](function(_0x18a905){if(DUPLICATES&&DUPLICATES['length']&&_0x2c64e2){_0x2c64e2[_0x0d8b('0x2a')](_[_0x0d8b('0x2b')](_0x3ef745,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x18a905['id'];return _0x4562cb();})[_0x0d8b('0x2c')](function(_0x31ceba){return _0x27b695(handleCheckRowError(_0x0d8b('0x18'),'Error\x20while\x20creating\x20contact:\x20'+(_0x31ceba[_0x0d8b('0x2d')]||JSON[_0x0d8b('0x2e')](_0x31ceba)),null,_0x30980c));});});}function checkHopper(){function _0x5ad0fe(){return function(_0x1180ac){logger[_0x0d8b('0x18')](_0x0d8b('0x2f'),_0x0d8b('0x30'),util[_0x0d8b('0x31')](_0x1180ac,{'showHidden':![],'depth':null}));};}var _0x519088=function(_0x497a71,_0x41b4f9){var _0x5c2c04=squel['insert']()[_0x0d8b('0x32')](_0x0d8b('0x33'))[_0x0d8b('0x34')]([_0x0d8b('0x1e'),_0x0d8b('0x35'),_0x0d8b('0x36'),'ListId',_0x41b4f9,_0x0d8b('0x37'),_0x0d8b('0x38')],squel[_0x0d8b('0x39')]()[_0x0d8b('0x3a')](_0x0d8b('0x1e'),_0x0d8b('0x1e'))[_0x0d8b('0x3a')]('NOW()',_0x0d8b('0x35'))[_0x0d8b('0x3a')]('id',_0x0d8b('0x36'))[_0x0d8b('0x3a')](LISTID['toString'](),_0x0d8b('0x3b'))['field'](_0x497a71['id'][_0x0d8b('0x3c')](),_0x41b4f9)[_0x0d8b('0x3a')](_0x0d8b('0x3d'),_0x0d8b('0x37'))[_0x0d8b('0x3a')](_0x0d8b('0x3d'),_0x0d8b('0x38'))[_0x0d8b('0x3e')](_0x0d8b('0x3f'))[_0x0d8b('0x40')]('deletedAt\x20IS\x20NULL')['where']('ListId\x20=\x20?',LISTID['toString']())['where'](_0x0d8b('0x41'))[_0x0d8b('0x40')](_0x0d8b('0x42'),squel['select']()['field'](_0x0d8b('0x1e'))[_0x0d8b('0x3e')](_0x0d8b('0x33'))['where'](_0x41b4f9+_0x0d8b('0x43'),_0x497a71['id'][_0x0d8b('0x3c')]())))['toString']();return _0x5c2c04;};var _0x4d7bb0=function(_0x372740,_0x495870){var _0x1e22e5=squel['insert']()['into'](_0x0d8b('0x33'))[_0x0d8b('0x34')](['phone','scheduledAt','ContactId','ListId',_0x495870,_0x0d8b('0x37'),_0x0d8b('0x38')],squel[_0x0d8b('0x39')]()['field'](_0x0d8b('0x1e'),_0x0d8b('0x1e'))[_0x0d8b('0x3a')](_0x0d8b('0x3d'),_0x0d8b('0x35'))[_0x0d8b('0x3a')]('id',_0x0d8b('0x36'))[_0x0d8b('0x3a')](LISTID[_0x0d8b('0x3c')](),_0x0d8b('0x3b'))[_0x0d8b('0x3a')](_0x372740['id'][_0x0d8b('0x3c')](),_0x495870)[_0x0d8b('0x3a')](_0x0d8b('0x3d'),_0x0d8b('0x37'))[_0x0d8b('0x3a')](_0x0d8b('0x3d'),_0x0d8b('0x38'))[_0x0d8b('0x3e')]('cm_contacts')[_0x0d8b('0x40')]('deletedAt\x20IS\x20NULL')['where'](_0x0d8b('0x44'),LISTID[_0x0d8b('0x3c')]())[_0x0d8b('0x40')](_0x0d8b('0x45'),squel['str'](hopperContacts))[_0x0d8b('0x40')](_0x0d8b('0x41'))[_0x0d8b('0x40')](_0x0d8b('0x42'),squel[_0x0d8b('0x39')]()['field']('calleridnum')['from']('cm_hopper_final')[_0x0d8b('0x40')](_0x495870+_0x0d8b('0x43'),_0x372740['id']['toString']()))['where'](_0x0d8b('0x42'),squel[_0x0d8b('0x39')]()['field']('phone')[_0x0d8b('0x3e')](_0x0d8b('0x33'))[_0x0d8b('0x40')](_0x495870+_0x0d8b('0x43'),_0x372740['id'][_0x0d8b('0x3c')]())))['toString']();return _0x1e22e5;};function _0x2de903(_0x2afe34,_0x5481fc){var _0x580580=squel[_0x0d8b('0x46')]()[_0x0d8b('0x32')]('cm_hopper')['fromQuery']([_0x0d8b('0x1e'),_0x0d8b('0x35'),_0x0d8b('0x36'),_0x0d8b('0x3b'),_0x5481fc,'createdAt',_0x0d8b('0x38')],squel['select']()['field'](_0x0d8b('0x1e'),_0x0d8b('0x1e'))['field']('NOW()',_0x0d8b('0x35'))[_0x0d8b('0x3a')]('id',_0x0d8b('0x36'))[_0x0d8b('0x3a')](LISTID[_0x0d8b('0x3c')](),_0x0d8b('0x3b'))[_0x0d8b('0x3a')](_0x2afe34['id'][_0x0d8b('0x3c')](),_0x5481fc)['field'](_0x0d8b('0x3d'),_0x0d8b('0x37'))[_0x0d8b('0x3a')](_0x0d8b('0x3d'),_0x0d8b('0x38'))[_0x0d8b('0x3e')](_0x0d8b('0x3f'))[_0x0d8b('0x40')](_0x0d8b('0x47'))['where'](_0x0d8b('0x44'),LISTID[_0x0d8b('0x3c')]())[_0x0d8b('0x40')](_0x0d8b('0x45'),squel[_0x0d8b('0x48')](hopperContacts))['where'](_0x0d8b('0x41')))[_0x0d8b('0x3c')]();return _0x580580;}function _0x181d49(_0x17a87f,_0x1d6cd4){var _0x59ada2=squel['insert']()[_0x0d8b('0x32')](_0x0d8b('0x49'))[_0x0d8b('0x34')]([_0x0d8b('0x1e'),'ContactId',_0x0d8b('0x3b'),_0x1d6cd4,_0x0d8b('0x37'),_0x0d8b('0x38')],squel['select']()[_0x0d8b('0x3a')]('phone',_0x0d8b('0x1e'))[_0x0d8b('0x3a')]('id',_0x0d8b('0x36'))[_0x0d8b('0x3a')](LISTID[_0x0d8b('0x3c')](),_0x0d8b('0x3b'))['field'](_0x17a87f['id'][_0x0d8b('0x3c')](),_0x1d6cd4)['field'](_0x0d8b('0x3d'),_0x0d8b('0x37'))[_0x0d8b('0x3a')](_0x0d8b('0x3d'),'updatedAt')[_0x0d8b('0x3e')](_0x0d8b('0x3f'))[_0x0d8b('0x40')](_0x0d8b('0x47'))[_0x0d8b('0x40')](_0x0d8b('0x44'),LISTID[_0x0d8b('0x3c')]())[_0x0d8b('0x40')](_0x0d8b('0x45'),squel[_0x0d8b('0x48')](hopperContacts))['where']('phone\x20IS\x20NOT\x20NULL'))[_0x0d8b('0x3c')]();return _0x59ada2;}return db[_0x0d8b('0x4a')]['findAll']({'where':{'type':_0x0d8b('0x4b')},'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db['CmList'],'as':_0x0d8b('0x4c'),'where':{'id':LISTID}}]})[_0x0d8b('0x29')](function(_0x4f4b4d){var _0x587128=[];if(_0x4f4b4d){var _0x1900e3;for(var _0x1c007b=0x0,_0x70e4b2;_0x1c007b<_0x4f4b4d[_0x0d8b('0x24')];_0x1c007b+=0x1){_0x70e4b2=_0x4f4b4d[_0x1c007b][_0x0d8b('0x4d')]({'plain':!![]});switch(_0x70e4b2[_0x0d8b('0x4e')]){case _0x0d8b('0x4f'):_0x587128['push'](db[_0x0d8b('0x50')]['query'](_0x4d7bb0(_0x70e4b2,_0x0d8b('0x51')))[_0x0d8b('0x29')](function(){})[_0x0d8b('0x2c')](_0x5ad0fe()));break;case _0x0d8b('0x52'):_0x587128['push'](db[_0x0d8b('0x50')]['query'](_0x519088(_0x70e4b2,_0x0d8b('0x51')))[_0x0d8b('0x29')](function(){})[_0x0d8b('0x2c')](_0x5ad0fe()));break;default:_0x587128[_0x0d8b('0x2a')](db[_0x0d8b('0x50')][_0x0d8b('0x53')](_0x2de903(_0x70e4b2,_0x0d8b('0x51')))[_0x0d8b('0x29')](function(){})[_0x0d8b('0x2c')](_0x5ad0fe()));}}}return _0x587128;})[_0x0d8b('0x54')]()['then'](function(){return db[_0x0d8b('0x4a')]['findAll']({'where':{'type':_0x0d8b('0x4b')},'attributes':['id'],'include':[{'model':db[_0x0d8b('0x55')],'as':'BlackLists','where':{'id':LISTID}}]})[_0x0d8b('0x29')](function(_0x56e03c){var _0x10c318=[];if(_0x56e03c){var _0x445a00;for(var _0x24f75=0x0,_0x259ac9;_0x24f75<_0x56e03c[_0x0d8b('0x24')];_0x24f75+=0x1){_0x259ac9=_0x56e03c[_0x24f75][_0x0d8b('0x4d')]({'plain':!![]});_0x10c318[_0x0d8b('0x2a')](db[_0x0d8b('0x50')]['query'](_0x181d49(_0x259ac9,_0x0d8b('0x51')))[_0x0d8b('0x29')](function(){})['catch'](_0x5ad0fe()));}}return _0x10c318;})[_0x0d8b('0x54')]();})[_0x0d8b('0x29')](function(){return db[_0x0d8b('0x56')][_0x0d8b('0x57')]({'attributes':['id',_0x0d8b('0x4e')],'include':[{'model':db[_0x0d8b('0x55')],'as':_0x0d8b('0x4c'),'where':{'id':LISTID}}]})[_0x0d8b('0x29')](function(_0x466082){var _0x5007c0=[];if(_0x466082){for(var _0xe35028=0x0,_0x16df83;_0xe35028<_0x466082['length'];_0xe35028+=0x1){_0x16df83=_0x466082[_0xe35028][_0x0d8b('0x4d')]({'plain':!![]});switch(_0x16df83[_0x0d8b('0x4e')]){case _0x0d8b('0x4f'):_0x5007c0['push'](db['sequelize'][_0x0d8b('0x53')](_0x4d7bb0(_0x16df83,_0x0d8b('0x58')))[_0x0d8b('0x29')](function(){})['catch'](_0x5ad0fe()));break;case'onlyIfOpen':_0x5007c0[_0x0d8b('0x2a')](db[_0x0d8b('0x50')][_0x0d8b('0x53')](_0x519088(_0x16df83,_0x0d8b('0x58')))[_0x0d8b('0x29')](function(){})[_0x0d8b('0x2c')](_0x5ad0fe()));break;default:_0x5007c0[_0x0d8b('0x2a')](db[_0x0d8b('0x50')][_0x0d8b('0x53')](_0x2de903(_0x16df83,_0x0d8b('0x58')))[_0x0d8b('0x29')](function(){})[_0x0d8b('0x2c')](_0x5ad0fe()));}}}return _0x5007c0;})[_0x0d8b('0x54')]();})['then'](function(){return db[_0x0d8b('0x56')][_0x0d8b('0x57')]({'attributes':['id'],'include':[{'model':db['CmList'],'as':'BlackLists','where':{'id':LISTID}}]})[_0x0d8b('0x29')](function(_0x1dad9f){var _0x3573b4=[];if(_0x1dad9f){for(var _0x14b1b8=0x0,_0x23e2e0;_0x14b1b8<_0x1dad9f[_0x0d8b('0x24')];_0x14b1b8+=0x1){_0x23e2e0=_0x1dad9f[_0x14b1b8]['get']({'plain':!![]});_0x3573b4['push'](db['sequelize'][_0x0d8b('0x53')](_0x181d49(_0x23e2e0,_0x0d8b('0x58')))[_0x0d8b('0x29')](function(){})[_0x0d8b('0x2c')](_0x5ad0fe()));}}return _0x3573b4;})[_0x0d8b('0x54')]();})[_0x0d8b('0x2c')](function(_0x5ef461){logger[_0x0d8b('0x18')](_0x0d8b('0x59'),'generalCheckHopper',_0x5ef461[_0x0d8b('0x2d')]);});}var processPromises=function(_0x57e3c2){return BPromise[_0x0d8b('0x54')](promises)[_0x0d8b('0x29')](function(_0x9dfa5a){})[_0x0d8b('0x2c')](function(_0x10c7ab){logger[_0x0d8b('0x18')](_0x0d8b('0x5a'),JSON[_0x0d8b('0x2e')](_0x10c7ab));})[_0x0d8b('0x5b')](function(){socket[_0x0d8b('0x5c')](_0x0d8b('0x5d')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x57e3c2){return _0x57e3c2[_0x0d8b('0x5e')]();}});};var endCsv=function(){return BPromise['resolve']()['then'](function(){if(hopperContacts){return checkHopper();}})[_0x0d8b('0x29')](function(){socket[_0x0d8b('0x5c')](_0x0d8b('0x5d')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0x0d8b('0x5f')](FILEPATH);}catch(_0xf91ecd){logger[_0x0d8b('0x18')](_0x0d8b('0x60'),JSON['stringify'](_0xf91ecd));}finally{process[_0x0d8b('0x61')](0x0);}});};process['on']('SIGINT',function(){logger[_0x0d8b('0x62')]('CSV\x20import\x20process\x20stopped!');endCsv();});function main(){return BPromise['resolve']()[_0x0d8b('0x29')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x0d8b('0x12')](',');return db[_0x0d8b('0x27')][_0x0d8b('0x57')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x0d8b('0x29')](function(_0x2eece2){var _0x3c7b9b=fs[_0x0d8b('0x63')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0x0d8b('0x64')](_0x3c7b9b,{'header':!![],'skipEmptyLines':!![],'step':function(_0x20a8b6,_0x3a6014){total+=0x1;var _0x180539=total;promises['push'](checkRow(_0x20a8b6,_0x2eece2,_0x180539)[_0x0d8b('0x29')](function(){success+=0x1;})[_0x0d8b('0x2c')](function(_0x8be77c){if(_0x8be77c['error']){errors+=0x1;delete _0x8be77c['error'];}else if(_0x8be77c[_0x0d8b('0x65')]){duplicates+=0x1;delete _0x8be77c[_0x0d8b('0x65')];}rows[_0x0d8b('0x2a')](_0x8be77c);}));if(total%0xc8===0x0){_0x3a6014[_0x0d8b('0x66')]();return processPromises(_0x3a6014);}},'complete':function(){return processPromises()[_0x0d8b('0x29')](function(){logger[_0x0d8b('0x62')]('CSV\x20parsed\x20correctly!');endCsv();});},'error':function(_0x1a96ce,_0x3d6267){logger[_0x0d8b('0x62')](_0x0d8b('0x67'),JSON[_0x0d8b('0x2e')](_0x1a96ce));endCsv();}});})['catch'](function(_0x4dbcfc){logger[_0x0d8b('0x18')](_0x0d8b('0x68'),JSON[_0x0d8b('0x2e')](_0x4dbcfc));});}main();
\ No newline at end of file
diff --git a/server/components/import/cm/csv2.js b/server/components/import/cm/csv2.js
index faa0cea..20df166 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 _0x8934=['scheduledat','ContactId','ListId','updatedAt','priority','fields','cm_contacts.ListId\x20=\x20','.CmListId','where','.CmListId\x20=\x20?','cm_hopper','\x22always\x22','\x22onlyIfOpen\x22','cm_contacts.phone\x20NOT\x20IN\x20(?)','toString','cm_contacts.updatedAt','cm_hopper_black','createdAt','cm_contacts','cm_contacts.createdAt\x20=\x20?','field','ListId\x20=\x20?','\x20=\x20?','concat','keys',')\x20NOT\x20IN\x20?','deletedAt\x20IS\x20NULL','id\x20IN\x20?','MIN(id)','min_id','group','info','Received\x20SIGINT','exit','errors','push','code','sequelize','query','catch','error','message','main','send','start','socket_timestamp','root','server/files/tmp','header','writeFileSync','parse','createReadStream','data','length','rows','hasOwnProperty','trim','replace','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNaN','includes','agent\x20not\x20exists','dateOfBirth','YYYY-MM-DD','firstName','appendFileSync','emit','contact:import:','abort','SystemError','duplicates','cm_contacts_','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','format','CompanyId','isNil',',\x20scheduledAt\x20=\x20NOW()','voice_queues','VoiceQueueId','voice_queues_has_cm_blacklists','campaigns','CampaignId','campaigns_has_cm_blacklists','then','affectedRows','unlink','complete','argv','existsSync','binding','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','SIGINT','uncaughtException','papaparse','util','bluebird','moment','squel','ioredis','../../../mysqldb','../../../config/logger','defaults','redis','localhost','socket.io-emitter','YYYY-MM-DD\x20HH:mm:ss','test','select','phone','from','.id\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','join','cm_contacts.id','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.priority','insert','into','fromQuery'];(function(_0x1463fe,_0x471e10){var _0x395273=function(_0x158dbb){while(--_0x158dbb){_0x1463fe['push'](_0x1463fe['shift']());}};_0x395273(++_0x471e10);}(_0x8934,0xe1));var _0x4893=function(_0x5dddd5,_0x9556e0){_0x5dddd5=_0x5dddd5-0x0;var _0x29637f=_0x8934[_0x5dddd5];return _0x29637f;};'use strict';var fs=require('fs');var path=require('path');var _=require('lodash');var Papa=require(_0x4893('0x0'));var util=require(_0x4893('0x1'));var BPromise=require(_0x4893('0x2'));var moment=require(_0x4893('0x3'));var squel=require(_0x4893('0x4'));var Redis=require(_0x4893('0x5'));var db=require(_0x4893('0x6'))['db'];var config=require('../../../config/environment');var logger=require(_0x4893('0x7'))('import');config['redis']=_[_0x4893('0x8')](config[_0x4893('0x9')],{'host':_0x4893('0xa'),'port':0x18eb});var socket=require(_0x4893('0xb'))(new Redis(config[_0x4893('0x9')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var stopped=![];var NOW=moment()['format'](_0x4893('0xc'));function isEmail(_0x105ee6){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))*$/[_0x4893('0xd')](_0x105ee6);}function selectNotIn(_0x58ea8b,_0x3b612f,_0x5edbf1,_0x4cfd42,_0x4c7c69){return squel[_0x4893('0xe')]()['field'](_0x4893('0xf'))[_0x4893('0x10')](_0x4cfd42)['join'](_0x3b612f,null,_0x3b612f+_0x4893('0x11')+_0x4cfd42+'.'+_0x5edbf1)['where'](_0x4cfd42+'.'+_0x5edbf1+'\x20=\x20'+_0x58ea8b+'.'+_0x5edbf1)['where'](_0x3b612f+_0x4893('0x12')+_0x4c7c69[_0x4893('0x13')]()+')');}function insertCmHopper(_0x411f82,_0x67d612,_0x13f201,_0x492342,_0x3427d6){var _0x69d849=['cm_contacts.phone','cm_contacts.scheduledat',_0x4893('0x14'),_0x4893('0x15'),_0x67d612+'.'+_0x492342,_0x4893('0x16'),'cm_contacts.updatedAt',_0x4893('0x17'),'cm_contacts.UserId','\x22'+_0x3427d6+'\x22'];return squel[_0x4893('0x18')]()[_0x4893('0x19')]('cm_hopper')[_0x4893('0x1a')]([_0x4893('0xf'),_0x4893('0x1b'),_0x4893('0x1c'),_0x4893('0x1d'),_0x492342,'createdAt',_0x4893('0x1e'),_0x4893('0x1f'),'UserId','recallme'],squel['select']()[_0x4893('0x20')](_0x69d849)[_0x4893('0x10')](_0x67d612)[_0x4893('0x13')]('cm_contacts',null,_0x4893('0x21')+_0x67d612+_0x4893('0x22'))[_0x4893('0x13')](_0x13f201,null,_0x13f201+'.id\x20=\x20'+_0x67d612+'.'+_0x492342)[_0x4893('0x23')](_0x67d612+_0x4893('0x24'),_0x411f82)['where']('cm_contacts.createdAt\x20=\x20?',NOW)[_0x4893('0x23')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x67d612,_0x13f201,_0x492342,_0x4893('0x25'),[_0x4893('0x26'),_0x4893('0x27')]))[_0x4893('0x23')](_0x4893('0x28'),selectNotIn(_0x67d612,_0x13f201,_0x492342,'cm_hopper',[_0x4893('0x26')])))[_0x4893('0x29')]();}function insertCmHopperBlack(_0x489ce9,_0x96dc9b,_0x519440,_0x517a9d){var _0xa6c8cd=['cm_contacts.phone',_0x4893('0x14'),_0x4893('0x15'),_0x96dc9b+'.'+_0x517a9d,_0x4893('0x16'),_0x4893('0x2a')];return squel['insert']()[_0x4893('0x19')](_0x4893('0x2b'))[_0x4893('0x1a')]([_0x4893('0xf'),_0x4893('0x1c'),_0x4893('0x1d'),_0x517a9d,_0x4893('0x2c'),'updatedAt'],squel[_0x4893('0xe')]()[_0x4893('0x20')](_0xa6c8cd)[_0x4893('0x10')](_0x96dc9b)[_0x4893('0x13')](_0x4893('0x2d'),null,_0x4893('0x21')+_0x96dc9b+'.CmListId')[_0x4893('0x13')](_0x519440,null,_0x519440+_0x4893('0x11')+_0x96dc9b+'.'+_0x517a9d)['where'](_0x96dc9b+'.CmListId\x20=\x20?',_0x489ce9)[_0x4893('0x23')](_0x4893('0x2e'),NOW)[_0x4893('0x23')](_0x4893('0x28'),squel[_0x4893('0xe')]()[_0x4893('0x2f')](_0x4893('0xf'))[_0x4893('0x10')]('cm_hopper_black')['where'](_0x4893('0x30'),_0x489ce9)['where'](_0x517a9d+_0x4893('0x31'),_0x96dc9b+'.'+_0x517a9d)))[_0x4893('0x29')]();}function insertCmContact(_0x4b2f93,_0x1dcca8,_0x28e674,_0x3b71ce){var _0x19052e=_[_0x4893('0x32')](_[_0x4893('0x33')](_0x3b71ce),[_0x4893('0x1d'),'CompanyId','createdAt',_0x4893('0x1e')]);return squel[_0x4893('0x18')]()[_0x4893('0x19')]('cm_contacts')['fromQuery'](_0x19052e,squel['select']()[_0x4893('0x20')](_0x19052e)[_0x4893('0x10')](_0x1dcca8)['where']('('+_0x28e674[_0x4893('0x13')](',')+_0x4893('0x34'),squel[_0x4893('0xe')]()['fields'](_0x28e674)[_0x4893('0x10')](_0x4893('0x2d'))['where']('ListId\x20=\x20?',_0x4b2f93)['where'](_0x4893('0x35')))['where'](_0x4893('0x36'),squel['select']()['field'](_0x4893('0x37'),_0x4893('0x38'))[_0x4893('0x10')](_0x1dcca8)[_0x4893('0x39')](_0x28e674[_0x4893('0x13')](','))))[_0x4893('0x29')]();}function handleStop(){logger[_0x4893('0x3a')](_0x4893('0x3b'));stopped=!![];}function handleUncaughtException(_0x2bc638){logger['error'](_0x2bc638['message']);process[_0x4893('0x3c')](0x1);}function handleError(_0x1249bf,_0x3a4d60){stats[_0x4893('0x3d')][_0x4893('0x3e')]({'name':_0x3a4d60[_0x4893('0x3f')],'message':_0x3a4d60['message'],'row':_0x1249bf});}function handleQuery(_0xfd1194){logger[_0x4893('0x3a')](_0xfd1194);return db[_0x4893('0x40')][_0x4893('0x41')](_0xfd1194)['spread'](function(_0x13ddbd){results[_0x4893('0x3e')](_0x13ddbd);})[_0x4893('0x42')](function(_0x3b3ccc){logger[_0x4893('0x43')](_0x3b3ccc[_0x4893('0x44')]);});}function main(_0x182058,_0x5b8af0,_0x28aac3,_0x253298){logger[_0x4893('0x3a')](_0x4893('0x45'),_0x182058,JSON['stringify'](_0x5b8af0));process[_0x4893('0x46')](_0x4893('0x47'));var _0x409d62=_0x5b8af0['binding'];var _0x174dc3=_0x5b8af0[_0x4893('0x48')];var _0x3c0f0b=path[_0x4893('0x13')](config[_0x4893('0x49')],_0x4893('0x4a'),_0x174dc3+'.csv');var _0x7de93d=_['keys'](_0x409d62)[_0x4893('0x13')]();logger[_0x4893('0x3a')](_0x4893('0x4b'),_0x7de93d);fs[_0x4893('0x4c')](_0x3c0f0b,_0x7de93d+'\x0a');Papa[_0x4893('0x4d')](fs[_0x4893('0x4e')](_0x182058),{'header':!![],'skipEmptyLines':!![],'step':function(_0x428b4d,_0x146fc6){try{for(var _0x24e614=0x0,_0x1e0d18=[];_0x24e614<_0x428b4d[_0x4893('0x4f')][_0x4893('0x50')];_0x24e614++){stats[_0x4893('0x51')]+=0x1;if(_0x428b4d[_0x4893('0x3d')][_0x24e614]){handleError(_0x428b4d['data'][_0x24e614],_0x428b4d[_0x4893('0x3d')][_0x24e614]);}else{var _0x1022b6=[];for(var _0x26f32e in _0x409d62){if(_0x409d62[_0x4893('0x52')](_0x26f32e)){if(_0x428b4d[_0x4893('0x4f')][_0x24e614][_0x409d62[_0x26f32e]]){var _0x457a5f=_[_0x4893('0x53')](_0x428b4d['data'][_0x24e614][_0x409d62[_0x26f32e]][_0x4893('0x54')](/"/g,'\x27'));switch(_0x26f32e){case _0x4893('0x1b'):var _0x4388f6=moment(_0x457a5f,_0x4893('0xc'),!![]);if(_0x4388f6[_0x4893('0x55')]()){_0x1e0d18[_0x4893('0x3e')]('\x22'+_0x457a5f+'\x22');}else{_0x1022b6[_0x4893('0x3e')](_0x4893('0x56'));}break;case _0x4893('0x1f'):var _0x463463=parseInt(_0x457a5f);_0x457a5f=_[_0x4893('0x57')](_0x463463)||_0x463463<0x0||_0x463463>0x4?_0x253298?0x3:0x2:_0x463463;_0x1e0d18[_0x4893('0x3e')]('\x22'+_0x457a5f+'\x22');break;case'UserId':var _0x1cfcba=parseInt(_0x457a5f);if(_['isNumber'](_0x1cfcba)&&_[_0x4893('0x58')](_0x28aac3,_0x1cfcba)){_0x1e0d18[_0x4893('0x3e')]('\x22'+_0x1cfcba+'\x22');}else{_0x1022b6[_0x4893('0x3e')](_0x4893('0x59'));}break;case'email':if(isEmail(_0x457a5f)){_0x1e0d18[_0x4893('0x3e')]('\x22'+_0x457a5f+'\x22');}else{_0x1022b6[_0x4893('0x3e')]('email\x20wrong\x20format');}break;case _0x4893('0x5a'):var _0x4b15cb=moment(_0x457a5f,_0x4893('0x5b'),!![]);if(_0x4b15cb['isValid']()){_0x1e0d18[_0x4893('0x3e')]('\x22'+_0x457a5f+'\x22');}else{_0x1022b6[_0x4893('0x3e')]('dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)');}break;default:_0x1e0d18[_0x4893('0x3e')]('\x22'+_0x457a5f+'\x22');}}else{switch(_0x26f32e){case _0x4893('0x5c'):case'phone':_0x1022b6[_0x4893('0x3e')](_0x26f32e+'\x20not\x20specified');break;default:_0x1e0d18[_0x4893('0x3e')]('\x22\x22');}}}}if(_0x1022b6['length']){handleError(_0x428b4d[_0x4893('0x4f')][_0x24e614],{'code':'SystemRow','message':_0x1022b6[_0x4893('0x13')]()});}else{fs[_0x4893('0x5d')](_0x3c0f0b,_0x1e0d18[_0x4893('0x13')]()+'\x0a');}_0x1e0d18=[];}if(!(stats[_0x4893('0x51')]%0xc8)){socket[_0x4893('0x5e')](_0x4893('0x5f')+_0x174dc3,stats);stats[_0x4893('0x3d')]=[];}}if(stopped){logger['info']('Abort\x20parser');_0x146fc6[_0x4893('0x60')]();}}catch(_0x8d56d){handleError(_0x428b4d[_0x4893('0x4f')][_0x24e614],{'code':_0x4893('0x61'),'message':_0x8d56d[_0x4893('0x44')]});logger[_0x4893('0x43')]('step',_0x8d56d[_0x4893('0x44')]);}},'complete':function(){try{var _0x516e30=[];var _0x3611a5=_0x4893('0x2d');if(_0x5b8af0[_0x4893('0x62')]&&_0x5b8af0['duplicates'][_0x4893('0x50')]){_0x3611a5=_0x4893('0x63')+_0x174dc3;_0x516e30[_0x4893('0x3e')](_0x4893('0x64')+_0x3611a5+_0x4893('0x65'));}var _0x26b2b8=util[_0x4893('0x66')]('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',_0x3c0f0b,_0x3611a5,_0x7de93d,_0x5b8af0[_0x4893('0x1d')],_0x5b8af0[_0x4893('0x67')]||null,NOW,NOW);if(_[_0x4893('0x68')](_0x409d62['scheduledat'])){_0x26b2b8+=_0x4893('0x69');}_0x516e30['push'](_0x26b2b8);if(_0x5b8af0[_0x4893('0x62')]&&_0x5b8af0[_0x4893('0x62')]['length']){_0x516e30[_0x4893('0x3e')](insertCmContact(_0x5b8af0[_0x4893('0x1d')],_0x3611a5,_0x5b8af0[_0x4893('0x62')],_0x409d62));_0x516e30[_0x4893('0x3e')]('DROP\x20TABLE\x20'+_0x3611a5+';');}_0x516e30[_0x4893('0x3e')](insertCmHopper(_0x5b8af0[_0x4893('0x1d')],'voice_queues_has_cm_lists',_0x4893('0x6a'),_0x4893('0x6b'),_0x253298));_0x516e30[_0x4893('0x3e')](insertCmHopperBlack(_0x5b8af0[_0x4893('0x1d')],_0x4893('0x6c'),_0x4893('0x6a'),_0x4893('0x6b')));_0x516e30[_0x4893('0x3e')](insertCmHopper(_0x5b8af0[_0x4893('0x1d')],'campaigns_has_cm_lists',_0x4893('0x6d'),_0x4893('0x6e'),_0x253298));_0x516e30[_0x4893('0x3e')](insertCmHopperBlack(_0x5b8af0['ListId'],_0x4893('0x6f'),_0x4893('0x6d'),_0x4893('0x6e')));BPromise['each'](_0x516e30,handleQuery)[_0x4893('0x70')](function(_0x176c7c){stats['finish']=!![];stats[_0x4893('0x71')]=_0x5b8af0['duplicates']&&_0x5b8af0['duplicates']['length']?results[0x2]['affectedRows']:results[0x0][_0x4893('0x71')];socket['emit'](_0x4893('0x5f')+_0x174dc3,stats);fs[_0x4893('0x72')](_0x182058);fs[_0x4893('0x72')](_0x3c0f0b);process['exit'](0x0);})[_0x4893('0x42')](function(_0x27b93e){logger[_0x4893('0x43')](_0x27b93e['message']);process[_0x4893('0x3c')](0x1);});}catch(_0x460f55){logger['error'](_0x4893('0x73'),_0x460f55[_0x4893('0x44')]);process[_0x4893('0x3c')](0x1);}},'error':function(_0x5d88ae,_0xa932d4,_0x4518a5,_0x28028a){throw new Error(_0x28028a);}});}function validate(){if(process['argv']&&process[_0x4893('0x74')]['length']<0x4){throw new Error('arguments\x20\x20\x20');}var _0x707315=path[_0x4893('0x13')](config['root'],_0x4893('0x4a'),process[_0x4893('0x74')][0x2]);if(!fs[_0x4893('0x75')](_0x707315)){throw new Error('file\x20doesn\x27t\x20exists');}var _0x5d95f5={};try{_0x5d95f5=JSON[_0x4893('0x4d')](process[_0x4893('0x74')][0x3]);if(!_0x5d95f5[_0x4893('0x76')]){throw new Error(_0x4893('0x77'));}if(!_0x5d95f5[_0x4893('0x76')][_0x4893('0xf')]){throw new Error(_0x4893('0x78'));}if(!_0x5d95f5[_0x4893('0x76')]['firstName']){throw new Error('firstName\x20is\x20mandatory');}var _0x1b2906=0x0;if(_0x5d95f5[_0x4893('0x76')]['UserId']){_0x1b2906=0x1;}if(!_0x5d95f5[_0x4893('0x1d')]){throw new Error(_0x4893('0x79'));}}catch(_0x3ee4d9){throw new Error(_0x4893('0x7a'));}var _0x32f46a=[];try{_0x32f46a=_[_0x4893('0x7b')](JSON[_0x4893('0x4d')](process['argv'][0x4]),'id');}catch(_0x3cdb57){logger[_0x4893('0x3a')]('No\x20agent\x20available');}main(_0x707315,_0x5d95f5,_0x32f46a,_0x1b2906);}validate();process['on'](_0x4893('0x7c'),handleStop);process['on'](_0x4893('0x7d'),handleUncaughtException);
\ No newline at end of file
+var _0x9b19=['redis','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','field','from','join','.id\x20=\x20','where','\x20=\x20','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.updatedAt','into','cm_hopper','fromQuery','phone','scheduledat','ContactId','ListId','updatedAt','priority','UserId','recallme','select','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','\x22onlyIfOpen\x22','insert','cm_hopper_black','createdAt','ListId\x20=\x20?','\x20=\x20?','concat','keys','CompanyId',')\x20NOT\x20IN\x20?','deletedAt\x20IS\x20NULL','id\x20IN\x20?','MIN(id)','min_id','group','info','Received\x20SIGINT','error','message','errors','push','code','sequelize','main','stringify','send','start','binding','socket_timestamp','root','server/files/tmp','.csv','writeFileSync','parse','createReadStream','length','rows','data','trim','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNumber','email','email\x20wrong\x20format','YYYY-MM-DD','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','\x20not\x20specified','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','DROP\x20TABLE\x20','voice_queues_has_cm_lists','voice_queues','VoiceQueueId','campaigns_has_cm_lists','campaigns','campaigns_has_cm_blacklists','CampaignId','then','finish','affectedRows','emit','unlink','catch','exit','complete','argv','existsSync','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','No\x20agent\x20available','SIGINT','uncaughtException','path','lodash','papaparse','util','moment','../../../mysqldb'];(function(_0x39314f,_0x3ae131){var _0x26771b=function(_0x32dafa){while(--_0x32dafa){_0x39314f['push'](_0x39314f['shift']());}};_0x26771b(++_0x3ae131);}(_0x9b19,0x77));var _0x99b1=function(_0x9861ff,_0x41fb17){_0x9861ff=_0x9861ff-0x0;var _0x48852b=_0x9b19[_0x9861ff];return _0x48852b;};'use strict';var fs=require('fs');var path=require(_0x99b1('0x0'));var _=require(_0x99b1('0x1'));var Papa=require(_0x99b1('0x2'));var util=require(_0x99b1('0x3'));var BPromise=require('bluebird');var moment=require(_0x99b1('0x4'));var squel=require('squel');var Redis=require('ioredis');var db=require(_0x99b1('0x5'))['db'];var config=require('../../../config/environment');var logger=require('../../../config/logger')('import');config[_0x99b1('0x6')]=_['defaults'](config[_0x99b1('0x6')],{'host':_0x99b1('0x7'),'port':0x18eb});var socket=require(_0x99b1('0x8'))(new Redis(config[_0x99b1('0x6')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var stopped=![];var NOW=moment()[_0x99b1('0x9')](_0x99b1('0xa'));function isEmail(_0xf08008){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/['test'](_0xf08008);}function selectNotIn(_0x14014d,_0x18324a,_0x5f4b63,_0x3b427a,_0x319b88){return squel['select']()[_0x99b1('0xb')]('phone')[_0x99b1('0xc')](_0x3b427a)[_0x99b1('0xd')](_0x18324a,null,_0x18324a+_0x99b1('0xe')+_0x3b427a+'.'+_0x5f4b63)[_0x99b1('0xf')](_0x3b427a+'.'+_0x5f4b63+_0x99b1('0x10')+_0x14014d+'.'+_0x5f4b63)['where'](_0x18324a+'.dialCheckDuplicateType\x20IN\x20('+_0x319b88[_0x99b1('0xd')]()+')');}function insertCmHopper(_0x9102cc,_0x42bb9f,_0x1be2fb,_0x104d3f,_0x44682e){var _0x10089e=[_0x99b1('0x11'),_0x99b1('0x12'),_0x99b1('0x13'),_0x99b1('0x14'),_0x42bb9f+'.'+_0x104d3f,_0x99b1('0x15'),_0x99b1('0x16'),'cm_contacts.priority','cm_contacts.UserId','\x22'+_0x44682e+'\x22'];return squel['insert']()[_0x99b1('0x17')](_0x99b1('0x18'))[_0x99b1('0x19')]([_0x99b1('0x1a'),_0x99b1('0x1b'),_0x99b1('0x1c'),_0x99b1('0x1d'),_0x104d3f,'createdAt',_0x99b1('0x1e'),_0x99b1('0x1f'),_0x99b1('0x20'),_0x99b1('0x21')],squel[_0x99b1('0x22')]()[_0x99b1('0x23')](_0x10089e)['from'](_0x42bb9f)['join'](_0x99b1('0x24'),null,_0x99b1('0x25')+_0x42bb9f+_0x99b1('0x26'))['join'](_0x1be2fb,null,_0x1be2fb+'.id\x20=\x20'+_0x42bb9f+'.'+_0x104d3f)['where'](_0x42bb9f+_0x99b1('0x27'),_0x9102cc)['where'](_0x99b1('0x28'),NOW)['where'](_0x99b1('0x29'),selectNotIn(_0x42bb9f,_0x1be2fb,_0x104d3f,_0x99b1('0x18'),[_0x99b1('0x2a'),_0x99b1('0x2b')]))[_0x99b1('0xf')](_0x99b1('0x29'),selectNotIn(_0x42bb9f,_0x1be2fb,_0x104d3f,_0x99b1('0x18'),[_0x99b1('0x2a')])))['toString']();}function insertCmHopperBlack(_0x2355cc,_0x15a546,_0x5e06bc,_0x1056c9){var _0x4012be=[_0x99b1('0x11'),_0x99b1('0x13'),_0x99b1('0x14'),_0x15a546+'.'+_0x1056c9,'cm_contacts.createdAt','cm_contacts.updatedAt'];return squel[_0x99b1('0x2c')]()['into'](_0x99b1('0x2d'))['fromQuery']([_0x99b1('0x1a'),'ContactId',_0x99b1('0x1d'),_0x1056c9,_0x99b1('0x2e'),'updatedAt'],squel['select']()[_0x99b1('0x23')](_0x4012be)[_0x99b1('0xc')](_0x15a546)[_0x99b1('0xd')]('cm_contacts',null,_0x99b1('0x25')+_0x15a546+_0x99b1('0x26'))[_0x99b1('0xd')](_0x5e06bc,null,_0x5e06bc+'.id\x20=\x20'+_0x15a546+'.'+_0x1056c9)[_0x99b1('0xf')](_0x15a546+_0x99b1('0x27'),_0x2355cc)[_0x99b1('0xf')](_0x99b1('0x28'),NOW)[_0x99b1('0xf')](_0x99b1('0x29'),squel[_0x99b1('0x22')]()[_0x99b1('0xb')](_0x99b1('0x1a'))['from'](_0x99b1('0x2d'))[_0x99b1('0xf')](_0x99b1('0x2f'),_0x2355cc)['where'](_0x1056c9+_0x99b1('0x30'),_0x15a546+'.'+_0x1056c9)))['toString']();}function insertCmContact(_0xa17445,_0x52ab8b,_0x5a9906,_0x45eea8){var _0x4eeb31=_[_0x99b1('0x31')](_[_0x99b1('0x32')](_0x45eea8),[_0x99b1('0x1d'),_0x99b1('0x33'),_0x99b1('0x2e'),'updatedAt']);return squel[_0x99b1('0x2c')]()[_0x99b1('0x17')]('cm_contacts')[_0x99b1('0x19')](_0x4eeb31,squel[_0x99b1('0x22')]()[_0x99b1('0x23')](_0x4eeb31)[_0x99b1('0xc')](_0x52ab8b)[_0x99b1('0xf')]('('+_0x5a9906[_0x99b1('0xd')](',')+_0x99b1('0x34'),squel[_0x99b1('0x22')]()[_0x99b1('0x23')](_0x5a9906)[_0x99b1('0xc')](_0x99b1('0x24'))[_0x99b1('0xf')](_0x99b1('0x2f'),_0xa17445)['where'](_0x99b1('0x35')))[_0x99b1('0xf')](_0x99b1('0x36'),squel[_0x99b1('0x22')]()[_0x99b1('0xb')](_0x99b1('0x37'),_0x99b1('0x38'))[_0x99b1('0xc')](_0x52ab8b)[_0x99b1('0x39')](_0x5a9906[_0x99b1('0xd')](','))))['toString']();}function handleStop(){logger[_0x99b1('0x3a')](_0x99b1('0x3b'));stopped=!![];}function handleUncaughtException(_0x3d16d4){logger[_0x99b1('0x3c')](_0x3d16d4[_0x99b1('0x3d')]);process['exit'](0x1);}function handleError(_0x2b3840,_0x15f64e){stats[_0x99b1('0x3e')][_0x99b1('0x3f')]({'name':_0x15f64e[_0x99b1('0x40')],'message':_0x15f64e[_0x99b1('0x3d')],'row':_0x2b3840});}function handleQuery(_0x1108cb){logger[_0x99b1('0x3a')](_0x1108cb);return db[_0x99b1('0x41')]['query'](_0x1108cb)['spread'](function(_0x128a14){results[_0x99b1('0x3f')](_0x128a14);})['catch'](function(_0x24ab55){logger['error'](_0x24ab55[_0x99b1('0x3d')]);});}function main(_0x35480a,_0x295613,_0x34dd4a,_0x29d405){logger[_0x99b1('0x3a')](_0x99b1('0x42'),_0x35480a,JSON[_0x99b1('0x43')](_0x295613));process[_0x99b1('0x44')](_0x99b1('0x45'));var _0x1f3548=_0x295613[_0x99b1('0x46')];var _0x374c16=_0x295613[_0x99b1('0x47')];var _0x14d823=path[_0x99b1('0xd')](config[_0x99b1('0x48')],_0x99b1('0x49'),_0x374c16+_0x99b1('0x4a'));var _0x1e11e7=_[_0x99b1('0x32')](_0x1f3548)[_0x99b1('0xd')]();logger[_0x99b1('0x3a')]('header',_0x1e11e7);fs[_0x99b1('0x4b')](_0x14d823,_0x1e11e7+'\x0a');Papa[_0x99b1('0x4c')](fs[_0x99b1('0x4d')](_0x35480a),{'header':!![],'skipEmptyLines':!![],'step':function(_0x2596e1,_0x522e85){try{for(var _0x15d8af=0x0,_0xa6c448=[];_0x15d8af<_0x2596e1['data'][_0x99b1('0x4e')];_0x15d8af++){stats[_0x99b1('0x4f')]+=0x1;if(_0x2596e1[_0x99b1('0x3e')][_0x15d8af]){handleError(_0x2596e1[_0x99b1('0x50')][_0x15d8af],_0x2596e1['errors'][_0x15d8af]);}else{var _0x3f9c26=[];for(var _0x2dba86 in _0x1f3548){if(_0x1f3548['hasOwnProperty'](_0x2dba86)){if(_0x2596e1[_0x99b1('0x50')][_0x15d8af][_0x1f3548[_0x2dba86]]){var _0x95b804=_[_0x99b1('0x51')](_0x2596e1[_0x99b1('0x50')][_0x15d8af][_0x1f3548[_0x2dba86]]['replace'](/"/g,'\x27'));switch(_0x2dba86){case _0x99b1('0x1b'):var _0x3eb568=moment(_0x95b804,'YYYY-MM-DD\x20HH:mm:ss',!![]);if(_0x3eb568[_0x99b1('0x52')]()){_0xa6c448[_0x99b1('0x3f')]('\x22'+_0x95b804+'\x22');}else{_0x3f9c26['push'](_0x99b1('0x53'));}break;case'priority':var _0x5dc7ee=parseInt(_0x95b804);_0x95b804=_['isNaN'](_0x5dc7ee)||_0x5dc7ee<0x0||_0x5dc7ee>0x4?_0x29d405?0x3:0x2:_0x5dc7ee;_0xa6c448[_0x99b1('0x3f')]('\x22'+_0x95b804+'\x22');break;case'UserId':var _0x5dc5c5=parseInt(_0x95b804);if(_[_0x99b1('0x54')](_0x5dc5c5)&&_['includes'](_0x34dd4a,_0x5dc5c5)){_0xa6c448[_0x99b1('0x3f')]('\x22'+_0x5dc5c5+'\x22');}else{_0x3f9c26[_0x99b1('0x3f')]('agent\x20not\x20exists');}break;case _0x99b1('0x55'):if(isEmail(_0x95b804)){_0xa6c448['push']('\x22'+_0x95b804+'\x22');}else{_0x3f9c26[_0x99b1('0x3f')](_0x99b1('0x56'));}break;case'dateOfBirth':var _0x5dabd2=moment(_0x95b804,_0x99b1('0x57'),!![]);if(_0x5dabd2[_0x99b1('0x52')]()){_0xa6c448[_0x99b1('0x3f')]('\x22'+_0x95b804+'\x22');}else{_0x3f9c26['push'](_0x99b1('0x58'));}break;default:_0xa6c448[_0x99b1('0x3f')]('\x22'+_0x95b804+'\x22');}}else{switch(_0x2dba86){case'firstName':case _0x99b1('0x1a'):_0x3f9c26[_0x99b1('0x3f')](_0x2dba86+_0x99b1('0x59'));break;default:_0xa6c448['push']('\x22\x22');}}}}if(_0x3f9c26[_0x99b1('0x4e')]){handleError(_0x2596e1[_0x99b1('0x50')][_0x15d8af],{'code':'SystemRow','message':_0x3f9c26['join']()});}else{fs['appendFileSync'](_0x14d823,_0xa6c448[_0x99b1('0xd')]()+'\x0a');}_0xa6c448=[];}if(!(stats['rows']%0xc8)){socket['emit']('contact:import:'+_0x374c16,stats);stats[_0x99b1('0x3e')]=[];}}if(stopped){logger[_0x99b1('0x3a')](_0x99b1('0x5a'));_0x522e85[_0x99b1('0x5b')]();}}catch(_0x407199){handleError(_0x2596e1[_0x99b1('0x50')][_0x15d8af],{'code':_0x99b1('0x5c'),'message':_0x407199[_0x99b1('0x3d')]});logger[_0x99b1('0x3c')](_0x99b1('0x5d'),_0x407199[_0x99b1('0x3d')]);}},'complete':function(){try{var _0x1f1818=[];var _0x47bc0b='cm_contacts';if(_0x295613[_0x99b1('0x5e')]&&_0x295613[_0x99b1('0x5e')][_0x99b1('0x4e')]){_0x47bc0b=_0x99b1('0x5f')+_0x374c16;_0x1f1818[_0x99b1('0x3f')]('CREATE\x20TABLE\x20'+_0x47bc0b+_0x99b1('0x60'));}var _0x14da1=util[_0x99b1('0x9')](_0x99b1('0x61'),_0x14d823,_0x47bc0b,_0x1e11e7,_0x295613['ListId'],_0x295613[_0x99b1('0x33')]||null,NOW,NOW);if(_['isNil'](_0x1f3548[_0x99b1('0x1b')])){_0x14da1+=',\x20scheduledAt\x20=\x20NOW()';}_0x1f1818['push'](_0x14da1);if(_0x295613[_0x99b1('0x5e')]&&_0x295613[_0x99b1('0x5e')]['length']){_0x1f1818[_0x99b1('0x3f')](insertCmContact(_0x295613[_0x99b1('0x1d')],_0x47bc0b,_0x295613['duplicates'],_0x1f3548));_0x1f1818[_0x99b1('0x3f')](_0x99b1('0x62')+_0x47bc0b+';');}_0x1f1818['push'](insertCmHopper(_0x295613['ListId'],_0x99b1('0x63'),_0x99b1('0x64'),'VoiceQueueId',_0x29d405));_0x1f1818[_0x99b1('0x3f')](insertCmHopperBlack(_0x295613[_0x99b1('0x1d')],'voice_queues_has_cm_blacklists',_0x99b1('0x64'),_0x99b1('0x65')));_0x1f1818[_0x99b1('0x3f')](insertCmHopper(_0x295613['ListId'],_0x99b1('0x66'),_0x99b1('0x67'),'CampaignId',_0x29d405));_0x1f1818['push'](insertCmHopperBlack(_0x295613[_0x99b1('0x1d')],_0x99b1('0x68'),_0x99b1('0x67'),_0x99b1('0x69')));BPromise['each'](_0x1f1818,handleQuery)[_0x99b1('0x6a')](function(_0x41a8d4){stats[_0x99b1('0x6b')]=!![];stats[_0x99b1('0x6c')]=_0x295613['duplicates']&&_0x295613[_0x99b1('0x5e')]['length']?results[0x2][_0x99b1('0x6c')]:results[0x0]['affectedRows'];socket[_0x99b1('0x6d')]('contact:import:'+_0x374c16,stats);fs[_0x99b1('0x6e')](_0x35480a);fs[_0x99b1('0x6e')](_0x14d823);process['exit'](0x0);})[_0x99b1('0x6f')](function(_0x2a732a){logger[_0x99b1('0x3c')](_0x2a732a[_0x99b1('0x3d')]);process[_0x99b1('0x70')](0x1);});}catch(_0x4d1888){logger[_0x99b1('0x3c')](_0x99b1('0x71'),_0x4d1888[_0x99b1('0x3d')]);process['exit'](0x1);}},'error':function(_0x2e8c64,_0x12b941,_0x215338,_0x9e9e44){throw new Error(_0x9e9e44);}});}function validate(){if(process[_0x99b1('0x72')]&&process[_0x99b1('0x72')][_0x99b1('0x4e')]<0x4){throw new Error('arguments\x20\x20\x20');}var _0x38ed97=path[_0x99b1('0xd')](config[_0x99b1('0x48')],_0x99b1('0x49'),process['argv'][0x2]);if(!fs[_0x99b1('0x73')](_0x38ed97)){throw new Error('file\x20doesn\x27t\x20exists');}var _0x2c4f1a={};try{_0x2c4f1a=JSON[_0x99b1('0x4c')](process['argv'][0x3]);if(!_0x2c4f1a[_0x99b1('0x46')]){throw new Error(_0x99b1('0x74'));}if(!_0x2c4f1a[_0x99b1('0x46')][_0x99b1('0x1a')]){throw new Error(_0x99b1('0x75'));}if(!_0x2c4f1a['binding'][_0x99b1('0x76')]){throw new Error('firstName\x20is\x20mandatory');}var _0x5b19ea=0x0;if(_0x2c4f1a[_0x99b1('0x46')][_0x99b1('0x20')]){_0x5b19ea=0x1;}if(!_0x2c4f1a['ListId']){throw new Error(_0x99b1('0x77'));}}catch(_0x46222f){throw new Error(_0x99b1('0x78'));}var _0x14d38b=[];try{_0x14d38b=_[_0x99b1('0x79')](JSON['parse'](process[_0x99b1('0x72')][0x4]),'id');}catch(_0x5eec61){logger[_0x99b1('0x3a')](_0x99b1('0x7a'));}main(_0x38ed97,_0x2c4f1a,_0x14d38b,_0x5b19ea);}validate();process['on'](_0x99b1('0x7b'),handleStop);process['on'](_0x99b1('0x7c'),handleUncaughtException);
\ No newline at end of file
diff --git a/server/components/integrations/configuration.js b/server/components/integrations/configuration.js
index 5749619..cc1cfcf 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 _0x4483=['Billable\x20Time','getSubjects','string','[xCALLY\x20Ticket]','toLowerCase','voice','push','variable','queue','calleridnum','outbound','destcalleridnum','getDescriptions','inbound','keyValue','Caller\x20Number','Caller\x20Name','calleridname','destexten','UniqueId','uniqueid','Date','agentcalledAt','Agent\x20Name','destcalleridname','Agent\x20Number','***\x20Time\x20Info\x20***','Agent\x20Connect','Agent\x20Complete','agentcompleteAt','holdtime','Talk\x20Time','Called\x20Number','Member\x20Name','membername','answertime','Complete\x20Time','Duration'];(function(_0x353328,_0x5291a2){var _0x36f447=function(_0x54d4a7){while(--_0x54d4a7){_0x353328['push'](_0x353328['shift']());}};_0x36f447(++_0x5291a2);}(_0x4483,0x1a3));var _0x3448=function(_0x3c8639,_0x8716f){_0x3c8639=_0x3c8639-0x0;var _0x3d65b3=_0x4483[_0x3c8639];return _0x3d65b3;};'use strict';exports[_0x3448('0x0')]=function(_0x1bd034,_0x229c0c){var _0x481d0c=[{'type':_0x3448('0x1'),'content':_0x3448('0x2'),'variableName':null}];switch(_0x1bd034[_0x3448('0x3')]()){case _0x3448('0x4'):switch(_0x229c0c[_0x3448('0x3')]()){case'inbound':_0x481d0c[_0x3448('0x5')]({'type':_0x3448('0x6'),'content':'','variableName':_0x3448('0x7')});_0x481d0c[_0x3448('0x5')]({'type':_0x3448('0x6'),'content':'','variableName':_0x3448('0x8')});break;case _0x3448('0x9'):_0x481d0c[_0x3448('0x5')]({'type':'string','content':'Outbound\x20Call','variableName':null});_0x481d0c[_0x3448('0x5')]({'type':_0x3448('0x6'),'content':'','variableName':_0x3448('0xa')});break;}}return _0x481d0c;};exports[_0x3448('0xb')]=function(_0x3f4364,_0x1e645a){var _0x2bdf02=[];switch(_0x3f4364[_0x3448('0x3')]()){case _0x3448('0x4'):switch(_0x1e645a[_0x3448('0x3')]()){case _0x3448('0xc'):_0x2bdf02=[{'type':'string','content':'***\x20Call\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0xe'),'keyType':'variable','variableName':_0x3448('0x8')},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0xf'),'keyType':'variable','variableName':_0x3448('0x10')},{'type':_0x3448('0xd'),'content':'','key':'Call\x20To','keyType':_0x3448('0x6'),'variableName':_0x3448('0x11')},{'type':_0x3448('0xd'),'content':'','key':'Queue','keyType':_0x3448('0x6'),'variableName':_0x3448('0x7')},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x12'),'keyType':_0x3448('0x6'),'variableName':_0x3448('0x13')},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x14'),'keyType':'variable','variableName':_0x3448('0x15')},{'type':'string','content':'***\x20Agent\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0x3448('0x16'),'keyType':_0x3448('0x6'),'variableName':_0x3448('0x17')},{'type':'keyValue','content':'','key':_0x3448('0x18'),'keyType':_0x3448('0x6'),'variableName':_0x3448('0xa')},{'type':_0x3448('0x1'),'content':_0x3448('0x19'),'key':null,'keyType':null,'variableName':null},{'type':_0x3448('0xd'),'content':'','key':'Agent\x20Ring','keyType':'variable','variableName':'agentcalledAt'},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x1a'),'keyType':'variable','variableName':'agentconnectAt'},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x1b'),'keyType':_0x3448('0x6'),'variableName':_0x3448('0x1c')},{'type':_0x3448('0xd'),'content':'','key':'Hold\x20Time','keyType':_0x3448('0x6'),'variableName':_0x3448('0x1d')},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x1e'),'keyType':_0x3448('0x6'),'variableName':'talktime'}];break;case _0x3448('0x9'):_0x2bdf02=[{'type':_0x3448('0x1'),'content':'***\x20Call\x20Info\x20***','variableName':null},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x1f'),'keyType':_0x3448('0x6'),'keyContent':'','variableName':_0x3448('0xa')},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x20'),'keyType':_0x3448('0x6'),'keyContent':'','variableName':_0x3448('0x21')},{'type':'keyValue','content':'','key':_0x3448('0x12'),'keyType':_0x3448('0x6'),'keyContent':'','variableName':_0x3448('0x13')},{'type':'keyValue','content':'','key':_0x3448('0x14'),'keyType':'variable','keyContent':'','variableName':'starttime'},{'type':'string','content':_0x3448('0x19')},{'type':_0x3448('0xd'),'content':'','key':'Answer\x20Time','keyType':'variable','keyContent':'','variableName':_0x3448('0x22')},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x23'),'keyType':_0x3448('0x6'),'keyContent':'','variableName':'endtime'},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x24'),'keyType':_0x3448('0x6'),'keyContent':'','variableName':'duration'},{'type':_0x3448('0xd'),'content':'','key':_0x3448('0x25'),'keyType':'variable','keyContent':'','variableName':'billableseconds'}];break;}}return _0x2bdf02;};
\ No newline at end of file
+var _0xe5b5=['Complete\x20Time','endtime','Duration','Billable\x20Time','billableseconds','getSubjects','string','[xCALLY\x20Ticket]','toLowerCase','voice','inbound','push','variable','queue','calleridnum','outbound','Outbound\x20Call','destcalleridnum','keyValue','Caller\x20Number','Caller\x20Name','Call\x20To','destexten','Date','agentcalledAt','***\x20Agent\x20Info\x20***','Agent\x20Name','Agent\x20Number','***\x20Time\x20Info\x20***','Agent\x20Ring','Agent\x20Connect','agentconnectAt','Agent\x20Complete','agentcompleteAt','Hold\x20Time','Talk\x20Time','Called\x20Number','Member\x20Name','membername','UniqueId','uniqueid','starttime'];(function(_0x4a1017,_0x1c9d4a){var _0x479609=function(_0x479fc4){while(--_0x479fc4){_0x4a1017['push'](_0x4a1017['shift']());}};_0x479609(++_0x1c9d4a);}(_0xe5b5,0x12b));var _0x5e5b=function(_0x134192,_0x36adc5){_0x134192=_0x134192-0x0;var _0x3cd080=_0xe5b5[_0x134192];return _0x3cd080;};'use strict';exports[_0x5e5b('0x0')]=function(_0x3e363f,_0x418c87){var _0x3b3efd=[{'type':_0x5e5b('0x1'),'content':_0x5e5b('0x2'),'variableName':null}];switch(_0x3e363f[_0x5e5b('0x3')]()){case _0x5e5b('0x4'):switch(_0x418c87[_0x5e5b('0x3')]()){case _0x5e5b('0x5'):_0x3b3efd[_0x5e5b('0x6')]({'type':_0x5e5b('0x7'),'content':'','variableName':_0x5e5b('0x8')});_0x3b3efd[_0x5e5b('0x6')]({'type':_0x5e5b('0x7'),'content':'','variableName':_0x5e5b('0x9')});break;case _0x5e5b('0xa'):_0x3b3efd[_0x5e5b('0x6')]({'type':_0x5e5b('0x1'),'content':_0x5e5b('0xb'),'variableName':null});_0x3b3efd[_0x5e5b('0x6')]({'type':_0x5e5b('0x7'),'content':'','variableName':_0x5e5b('0xc')});break;}}return _0x3b3efd;};exports['getDescriptions']=function(_0x300890,_0x59112d){var _0x108c34=[];switch(_0x300890[_0x5e5b('0x3')]()){case _0x5e5b('0x4'):switch(_0x59112d[_0x5e5b('0x3')]()){case'inbound':_0x108c34=[{'type':'string','content':'***\x20Call\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0xe'),'keyType':_0x5e5b('0x7'),'variableName':_0x5e5b('0x9')},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0xf'),'keyType':_0x5e5b('0x7'),'variableName':'calleridname'},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x10'),'keyType':'variable','variableName':_0x5e5b('0x11')},{'type':'keyValue','content':'','key':'Queue','keyType':_0x5e5b('0x7'),'variableName':_0x5e5b('0x8')},{'type':_0x5e5b('0xd'),'content':'','key':'UniqueId','keyType':_0x5e5b('0x7'),'variableName':'uniqueid'},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x12'),'keyType':'variable','variableName':_0x5e5b('0x13')},{'type':_0x5e5b('0x1'),'content':_0x5e5b('0x14'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0x5e5b('0x15'),'keyType':_0x5e5b('0x7'),'variableName':'destcalleridname'},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x16'),'keyType':_0x5e5b('0x7'),'variableName':_0x5e5b('0xc')},{'type':_0x5e5b('0x1'),'content':_0x5e5b('0x17'),'key':null,'keyType':null,'variableName':null},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x18'),'keyType':'variable','variableName':'agentcalledAt'},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x19'),'keyType':_0x5e5b('0x7'),'variableName':_0x5e5b('0x1a')},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x1b'),'keyType':_0x5e5b('0x7'),'variableName':_0x5e5b('0x1c')},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x1d'),'keyType':_0x5e5b('0x7'),'variableName':'holdtime'},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x1e'),'keyType':_0x5e5b('0x7'),'variableName':'talktime'}];break;case _0x5e5b('0xa'):_0x108c34=[{'type':_0x5e5b('0x1'),'content':'***\x20Call\x20Info\x20***','variableName':null},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x1f'),'keyType':_0x5e5b('0x7'),'keyContent':'','variableName':_0x5e5b('0xc')},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x20'),'keyType':_0x5e5b('0x7'),'keyContent':'','variableName':_0x5e5b('0x21')},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x22'),'keyType':_0x5e5b('0x7'),'keyContent':'','variableName':_0x5e5b('0x23')},{'type':'keyValue','content':'','key':'Date','keyType':_0x5e5b('0x7'),'keyContent':'','variableName':_0x5e5b('0x24')},{'type':_0x5e5b('0x1'),'content':_0x5e5b('0x17')},{'type':_0x5e5b('0xd'),'content':'','key':'Answer\x20Time','keyType':_0x5e5b('0x7'),'keyContent':'','variableName':'answertime'},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x25'),'keyType':_0x5e5b('0x7'),'keyContent':'','variableName':_0x5e5b('0x26')},{'type':'keyValue','content':'','key':_0x5e5b('0x27'),'keyType':_0x5e5b('0x7'),'keyContent':'','variableName':'duration'},{'type':_0x5e5b('0xd'),'content':'','key':_0x5e5b('0x28'),'keyType':_0x5e5b('0x7'),'keyContent':'','variableName':_0x5e5b('0x29')}];break;}}return _0x108c34;};
\ No newline at end of file
diff --git a/server/components/interaction/service.js b/server/components/interaction/service.js
index 7edcda4..623070e 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 _0xafb6=['tracked','query','clone','body','html','phone','fax','mobile','lodash','../../mysqldb','../../config/logger','openchannel-interactions','mail-interactions','sms-interactions','chat-interactions','InteractionId','upperFirst','toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name','stringify','null','Interaction','findOne','update','info','catch','error'];(function(_0xa3498,_0xef37a7){var _0x30c05f=function(_0x3da1e4){while(--_0x3da1e4){_0xa3498['push'](_0xa3498['shift']());}};_0x30c05f(++_0xef37a7);}(_0xafb6,0x164));var _0x6afb=function(_0x4c70c4,_0x963969){_0x4c70c4=_0x4c70c4-0x0;var _0x437865=_0xafb6[_0x4c70c4];return _0x437865;};'use strict';var _=require(_0x6afb('0x0'));var db=require(_0x6afb('0x1'))['db'];var loggers={'openchannel':require(_0x6afb('0x2'))(_0x6afb('0x3')),'mail':require(_0x6afb('0x2'))(_0x6afb('0x4')),'fax':require('../../config/logger')('fax-interactions'),'sms':require(_0x6afb('0x2'))(_0x6afb('0x5')),'chat':require('../../config/logger')(_0x6afb('0x6'))};function getInteractionId(_0x26cf49,_0xdfa3ca,_0x14790){if(_0x26cf49&&_0x26cf49[_['upperFirst'](_0x14790)+_0x6afb('0x7')]){return _0x26cf49[_[_0x6afb('0x8')](_0x14790)+'InteractionId'];}else if(_0x26cf49&&_0x26cf49['id']){return _0x26cf49['id'];}else if(_0xdfa3ca&&_0xdfa3ca['id']){return _0xdfa3ca['id'];}else{return'unknown';}}function log(_0x22abb2,_0x56aab2,_0x3ca013,_0x3ef314,_0x122a70,_0xb083c9){loggers[_0x122a70[_0x6afb('0x9')]()][_0x22abb2](_0x6afb('0xa'),_0xb083c9[_0x6afb('0xb')](),_0x56aab2?_0x56aab2['id']:null,_0x56aab2?_0x56aab2[_0x6afb('0xc')]:null,_0x56aab2?_0x56aab2['role']:null,getInteractionId(_0x3ca013,_0x3ef314,_0x122a70),_0x3ca013?JSON[_0x6afb('0xd')](_0x3ca013):_0x6afb('0xe'));}function updateUser(_0x47eef1,_0x403276,_0x3df8b4,_0x5c1441,_0x5df991){db[_[_0x6afb('0x8')](_0x5c1441)+_0x6afb('0xf')][_0x6afb('0x10')]({'where':{'id':getInteractionId(_0x403276,_0x3df8b4,_0x5c1441)}})['then'](function(_0x540274){if(_0x540274){return _0x540274[_0x6afb('0x11')]({'UserId':_0x47eef1?_0x47eef1['id']:null});}})['then'](function(_0x4b0805){if(_0x4b0805){log(_0x6afb('0x12'),_0x47eef1,_0x403276,_0x3df8b4,_0x5c1441,_0x5df991);}})[_0x6afb('0x13')](function(){log(_0x6afb('0x14'),_0x47eef1,_0x403276,_0x3df8b4,_0x5c1441,_0x5df991);});}exports[_0x6afb('0x15')]=function(_0x37fa36,_0x50a778){return function(_0xe5dd33,_0x22aaea,_0x576546){var _0x4961cc=_0xe5dd33['user'];var _0x5aa692={};var _0x337afc=_0xe5dd33[_0x6afb('0x16')];if(_0x5aa692){_0x5aa692=_[_0x6afb('0x17')](_0xe5dd33[_0x6afb('0x18')]);_0x5aa692=_['omit'](_0x5aa692,[_0x6afb('0x18'),_0x6afb('0x19'),_0x6afb('0x1a'),_0x6afb('0x1b'),_0x6afb('0x1c')]);}updateUser(_0x4961cc,_0x5aa692,_0x337afc,_0x37fa36,_0x50a778);_0x576546(null);};};
\ No newline at end of file
+var _0xfb4f=['sms-interactions','chat-interactions','InteractionId','unknown','toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name','role','null','upperFirst','Interaction','findOne','then','info','tracked','query','body','omit','html','phone','fax','mobile','../../mysqldb','../../config/logger','mail-interactions'];(function(_0x279436,_0x4a69da){var _0x32d6ca=function(_0x4ccb62){while(--_0x4ccb62){_0x279436['push'](_0x279436['shift']());}};_0x32d6ca(++_0x4a69da);}(_0xfb4f,0x135));var _0xffb4=function(_0x4b5f55,_0x37198c){_0x4b5f55=_0x4b5f55-0x0;var _0x2326bd=_0xfb4f[_0x4b5f55];return _0x2326bd;};'use strict';var _=require('lodash');var db=require(_0xffb4('0x0'))['db'];var loggers={'openchannel':require(_0xffb4('0x1'))('openchannel-interactions'),'mail':require(_0xffb4('0x1'))(_0xffb4('0x2')),'fax':require(_0xffb4('0x1'))('fax-interactions'),'sms':require(_0xffb4('0x1'))(_0xffb4('0x3')),'chat':require(_0xffb4('0x1'))(_0xffb4('0x4'))};function getInteractionId(_0x4031ad,_0x2b1bbf,_0x5b4975){if(_0x4031ad&&_0x4031ad[_['upperFirst'](_0x5b4975)+_0xffb4('0x5')]){return _0x4031ad[_['upperFirst'](_0x5b4975)+_0xffb4('0x5')];}else if(_0x4031ad&&_0x4031ad['id']){return _0x4031ad['id'];}else if(_0x2b1bbf&&_0x2b1bbf['id']){return _0x2b1bbf['id'];}else{return _0xffb4('0x6');}}function log(_0x2fe18d,_0x31ef6f,_0x2bc82c,_0x3ca00d,_0x414047,_0x45421d){loggers[_0x414047[_0xffb4('0x7')]()][_0x2fe18d](_0xffb4('0x8'),_0x45421d[_0xffb4('0x9')](),_0x31ef6f?_0x31ef6f['id']:null,_0x31ef6f?_0x31ef6f[_0xffb4('0xa')]:null,_0x31ef6f?_0x31ef6f[_0xffb4('0xb')]:null,getInteractionId(_0x2bc82c,_0x3ca00d,_0x414047),_0x2bc82c?JSON['stringify'](_0x2bc82c):_0xffb4('0xc'));}function updateUser(_0x1f3619,_0xb3abe5,_0x1acb3d,_0x28eec4,_0x16549d){db[_[_0xffb4('0xd')](_0x28eec4)+_0xffb4('0xe')][_0xffb4('0xf')]({'where':{'id':getInteractionId(_0xb3abe5,_0x1acb3d,_0x28eec4)}})[_0xffb4('0x10')](function(_0x1e1654){if(_0x1e1654){return _0x1e1654['update']({'UserId':_0x1f3619?_0x1f3619['id']:null});}})['then'](function(_0x5c5285){if(_0x5c5285){log(_0xffb4('0x11'),_0x1f3619,_0xb3abe5,_0x1acb3d,_0x28eec4,_0x16549d);}})['catch'](function(){log('error',_0x1f3619,_0xb3abe5,_0x1acb3d,_0x28eec4,_0x16549d);});}exports[_0xffb4('0x12')]=function(_0x7be524,_0x198b05){return function(_0xcfea9c,_0x5519cd,_0x1cc6c9){var _0x35c1d6=_0xcfea9c['user'];var _0x237d55={};var _0xcac1ff=_0xcfea9c[_0xffb4('0x13')];if(_0x237d55){_0x237d55=_['clone'](_0xcfea9c[_0xffb4('0x14')]);_0x237d55=_[_0xffb4('0x15')](_0x237d55,[_0xffb4('0x14'),_0xffb4('0x16'),_0xffb4('0x17'),_0xffb4('0x18'),_0xffb4('0x19')]);}updateUser(_0x35c1d6,_0x237d55,_0xcac1ff,_0x7be524,_0x198b05);_0x1cc6c9(null);};};
\ No newline at end of file
diff --git a/server/components/license/service.js b/server/components/license/service.js
index 090cf32..3d8e982 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 _0x22ab=['Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','User','admin','composable-middleware','../../mysqldb','license','data1','split','aes-256-ctr','update','base64','utf8','final','parse','hasOwnProperty','use','License','findOne','then','count','status','json'];(function(_0x4a568d,_0x2d5444){var _0x2644cc=function(_0x3062a3){while(--_0x3062a3){_0x4a568d['push'](_0x4a568d['shift']());}};_0x2644cc(++_0x2d5444);}(_0x22ab,0x8e));var _0xb22a=function(_0x47fb54,_0x28698c){_0x47fb54=_0x47fb54-0x0;var _0x1139a7=_0x22ab[_0x47fb54];return _0x1139a7;};'use strict';var crypto=require('crypto');var util=require('util');var compose=require(_0xb22a('0x0'));var db=require(_0xb22a('0x1'))['db'];var config=require('../../config/environment');function getValueFromLicense(_0x99fae9,_0x2ab8c9){if(_0x99fae9&&_0x2ab8c9){if(_0x2ab8c9['data1']&&_0x2ab8c9[_0xb22a('0x2')]){var _0x322120=_0x2ab8c9[_0xb22a('0x3')];var _0x4eb512=_0x2ab8c9[_0xb22a('0x2')];var _0x3f2598=_0x322120[_0xb22a('0x4')]('-')[0x4];var _0x1e24fa=_0x322120[_0xb22a('0x4')]('-')[0x0];var _0x298bc1=crypto['createDecipher'](_0xb22a('0x5'),util['format']('%s:%s:%s',_0x3f2598,_0x322120,_0x1e24fa));var _0x1d4dd7=_0x298bc1[_0xb22a('0x6')](_0x4eb512,_0xb22a('0x7'),_0xb22a('0x8'));_0x1d4dd7+=_0x298bc1[_0xb22a('0x9')](_0xb22a('0x8'));var _0x1fe8fa=JSON[_0xb22a('0xa')](_0x1d4dd7);return _0x1fe8fa[_0xb22a('0xb')](_0x99fae9)?_0x1fe8fa[_0x99fae9]:null;}}return null;}function isLimit(_0x930086,_0x3cf04f,_0x4e0d4f,_0x201955){var _0x2b1298=_0x3cf04f;return compose()[_0xb22a('0xc')](function(_0x38352a,_0x22a25c,_0x123837){return db[_0xb22a('0xd')][_0xb22a('0xe')]({'where':{'id':0x1},'raw':!![]})[_0xb22a('0xf')](function(_0x158974){var _0xdad799=getValueFromLicense(_0x930086,_0x158974);return _0xdad799?_0xdad799:_0x2b1298;})[_0xb22a('0xf')](function(_0x235294){_0x2b1298=_0x235294;return _0x4e0d4f[_0xb22a('0x10')](_0x201955);})[_0xb22a('0xf')](function(_0x571603){if(_0x571603>=_0x2b1298){return _0x22a25c[_0xb22a('0x11')](0x193)[_0xb22a('0x12')]({'message':util['format'](_0xb22a('0x13'),_0x930086)});}_0x123837();})[_0xb22a('0x14')](function(_0x583934){_0x123837(_0x583934);});});}function isUserLimit(){return isLimit('users',0x1,db[_0xb22a('0x15')],{'where':{'$or':[{'role':_0xb22a('0x16')},{'role':'user'}]}});}exports['isUserLimit']=isUserLimit;
\ No newline at end of file
+var _0x622a=['then','count','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','users','User','admin','user','isUserLimit','crypto','../../mysqldb','data1','license','split','createDecipher','aes-256-ctr','format','update','utf8','final','parse','hasOwnProperty','use','License','findOne'];(function(_0x99d0df,_0x1b52d7){var _0x19fab4=function(_0x5b1165){while(--_0x5b1165){_0x99d0df['push'](_0x99d0df['shift']());}};_0x19fab4(++_0x1b52d7);}(_0x622a,0x1aa));var _0xa622=function(_0x179fdf,_0x53b69d){_0x179fdf=_0x179fdf-0x0;var _0x13777c=_0x622a[_0x179fdf];return _0x13777c;};'use strict';var crypto=require(_0xa622('0x0'));var util=require('util');var compose=require('composable-middleware');var db=require(_0xa622('0x1'))['db'];var config=require('../../config/environment');function getValueFromLicense(_0x4733b5,_0xe293){if(_0x4733b5&&_0xe293){if(_0xe293[_0xa622('0x2')]&&_0xe293['license']){var _0x350246=_0xe293[_0xa622('0x2')];var _0x506e90=_0xe293[_0xa622('0x3')];var _0x278db9=_0x350246[_0xa622('0x4')]('-')[0x4];var _0x98edc6=_0x350246[_0xa622('0x4')]('-')[0x0];var _0x1157e9=crypto[_0xa622('0x5')](_0xa622('0x6'),util[_0xa622('0x7')]('%s:%s:%s',_0x278db9,_0x350246,_0x98edc6));var _0x3cb849=_0x1157e9[_0xa622('0x8')](_0x506e90,'base64',_0xa622('0x9'));_0x3cb849+=_0x1157e9[_0xa622('0xa')](_0xa622('0x9'));var _0x5f49ca=JSON[_0xa622('0xb')](_0x3cb849);return _0x5f49ca[_0xa622('0xc')](_0x4733b5)?_0x5f49ca[_0x4733b5]:null;}}return null;}function isLimit(_0x675f27,_0x12de39,_0xcc2372,_0x43b472){var _0x2de090=_0x12de39;return compose()[_0xa622('0xd')](function(_0x3e8300,_0x4a05b2,_0x3d28bd){return db[_0xa622('0xe')][_0xa622('0xf')]({'where':{'id':0x1},'raw':!![]})[_0xa622('0x10')](function(_0x3f789d){var _0x37bcdf=getValueFromLicense(_0x675f27,_0x3f789d);return _0x37bcdf?_0x37bcdf:_0x2de090;})[_0xa622('0x10')](function(_0x200ec1){_0x2de090=_0x200ec1;return _0xcc2372[_0xa622('0x11')](_0x43b472);})[_0xa622('0x10')](function(_0x3d6d16){if(_0x3d6d16>=_0x2de090){return _0x4a05b2['status'](0x193)[_0xa622('0x12')]({'message':util[_0xa622('0x7')](_0xa622('0x13'),_0x675f27)});}_0x3d28bd();})[_0xa622('0x14')](function(_0x3ad595){_0x3d28bd(_0x3ad595);});});}function isUserLimit(){return isLimit(_0xa622('0x15'),0x1,db[_0xa622('0x16')],{'where':{'$or':[{'role':_0xa622('0x17')},{'role':_0xa622('0x18')}]}});}exports[_0xa622('0x19')]=isUserLimit;
\ No newline at end of file
diff --git a/server/components/parsers/advancedSearch.js b/server/components/parsers/advancedSearch.js
index b7fccc6..ab6d271 100644
--- a/server/components/parsers/advancedSearch.js
+++ b/server/components/parsers/advancedSearch.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x65cd=['$eq','$between','$gt','value','days','format','YYYY-MM-DD','castTo','CAST(','field','\x20AS\x20','text','includes','$ne','$notIn','\x20OR\x20','\x20IS\x20NULL)','$in','IN\x20?','NOT\x20IN\x20?','=\x20?','$substring','$startsWith','$endsWith','LIKE\x20?','$lt','<\x20?','>\x20?','$lte','<=\x20?','$gte','>=\x20?','BETWEEN\x20?\x20AND\x20?','start','pop','DATE','utcOffset','add','hours','minutes','seconds','parseSearch','startsWith','[$or]','and','replace','[$and]','length','split','slice','forEach','shift','match','filter','indexOf','conditions','push','buildExpression','operator'];(function(_0x3826ad,_0x49a30d){var _0x17b900=function(_0x38474f){while(--_0x38474f){_0x3826ad['push'](_0x3826ad['shift']());}};_0x17b900(++_0x49a30d);}(_0x65cd,0x64));var _0xd65c=function(_0xd4470d,_0x47318d){_0xd4470d=_0xd4470d-0x0;var _0x5544c5=_0x65cd[_0xd4470d];return _0x5544c5;};'use strict';var _=require('lodash');var moment=require('moment');exports[_0xd65c('0x0')]=function(_0x74c24f){var _0x404efe={'conditions':[]};_0x404efe['sqlOperator']=_[_0xd65c('0x1')](_0x74c24f,_0xd65c('0x2'))?'or':_0xd65c('0x3');var _0x8ff7f6=_0x74c24f[_0xd65c('0x4')](_0xd65c('0x5'),'')[_0xd65c('0x4')](_0xd65c('0x2'),'')['split']('||');for(var _0x3c33d8=0x0;_0x3c33d8<_0x8ff7f6[_0xd65c('0x6')];_0x3c33d8++){var _0x31f417=_0x8ff7f6[_0x3c33d8][_0xd65c('0x7')](':=');var _0x54cfd9=_0x31f417[0x0];var _0x137da5=_0x31f417[_0xd65c('0x8')](0x1);_0x137da5[_0xd65c('0x9')](function(_0x239e1a){var _0x1bc2bf=_0x239e1a[_0xd65c('0x7')]('[')[_0xd65c('0xa')]();var _0xafaedb=_0x239e1a[_0xd65c('0xb')](/\[(.*?)\]/g);_0xafaedb[_0xd65c('0x9')](function(_0x2b534d){var _0x91393=_0x2b534d['split']('[')[_0xd65c('0xc')](function(_0x1b89a4){return _0x1b89a4[_0xd65c('0xd')](']')>-0x1;})['map'](function(_0x36ccc0){return _0x36ccc0[_0xd65c('0x7')](']')[0x0];})[0x0];_0x404efe[_0xd65c('0xe')][_0xd65c('0xf')]({'field':_0x54cfd9,'operator':_0x1bc2bf,'value':_0x91393});});});}return _0x404efe;};exports[_0xd65c('0x10')]=function(_0x1b9c7b,_0x4db6f3,_0x66184b){var _0x54c9e4={};if(_0x4db6f3==='DATE'){if(_0x66184b[_0xd65c('0x11')]===_0xd65c('0x12')){_0x66184b[_0xd65c('0x11')]=_0xd65c('0x13');_0x66184b['value']+=','+_0x66184b['value'];}else if(_['includes']([_0xd65c('0x14'),'$lte'],_0x66184b[_0xd65c('0x11')])){_0x66184b[_0xd65c('0x15')]=moment(_0x66184b[_0xd65c('0x15')])['add'](0x1,_0xd65c('0x16'))[_0xd65c('0x17')](_0xd65c('0x18'));}}if(_0x66184b[_0xd65c('0x19')]){_0x4db6f3=_0x66184b[_0xd65c('0x19')];_0x54c9e4['text']=_0xd65c('0x1a')+_0x1b9c7b+'.'+_0x66184b[_0xd65c('0x1b')]+_0xd65c('0x1c')+_0x66184b[_0xd65c('0x19')]+')\x20'+parseOperator(_0x66184b[_0xd65c('0x11')]);}else{_0x54c9e4[_0xd65c('0x1d')]=_0x1b9c7b+'.'+_0x66184b[_0xd65c('0x1b')]+'\x20'+parseOperator(_0x66184b[_0xd65c('0x11')]);}if(_[_0xd65c('0x1e')]([_0xd65c('0x1f'),_0xd65c('0x20')],_0x66184b[_0xd65c('0x11')]))_0x54c9e4[_0xd65c('0x1d')]='('+_0x54c9e4[_0xd65c('0x1d')]+_0xd65c('0x21')+_0x1b9c7b+'.'+_0x66184b[_0xd65c('0x1b')]+_0xd65c('0x22');_0x54c9e4[_0xd65c('0x15')]=parseValue(_0x4db6f3,_0x66184b['operator'],_0x66184b[_0xd65c('0x15')]);return _0x54c9e4;};function parseOperator(_0x3c4a8a){var _0x36e1ac;switch(_0x3c4a8a){case _0xd65c('0x23'):_0x36e1ac=_0xd65c('0x24');break;case'$notIn':_0x36e1ac=_0xd65c('0x25');break;case _0xd65c('0x12'):_0x36e1ac=_0xd65c('0x26');break;case _0xd65c('0x1f'):_0x36e1ac='<>\x20?';break;case _0xd65c('0x27'):case _0xd65c('0x28'):case _0xd65c('0x29'):_0x36e1ac=_0xd65c('0x2a');break;case _0xd65c('0x2b'):_0x36e1ac=_0xd65c('0x2c');break;case _0xd65c('0x14'):_0x36e1ac=_0xd65c('0x2d');break;case _0xd65c('0x2e'):_0x36e1ac=_0xd65c('0x2f');break;case _0xd65c('0x30'):_0x36e1ac=_0xd65c('0x31');break;case _0xd65c('0x13'):_0x36e1ac=_0xd65c('0x32');break;}return _0x36e1ac;}function parseValue(_0x5a3c0f,_0x978f8a,_0x44b35d){var _0x44e446={'start':undefined,'end':undefined};switch(_0x978f8a){case'$in':case'$notIn':_0x44e446[_0xd65c('0x33')]=_0x44b35d[_0xd65c('0x7')](',');break;case _0xd65c('0x27'):_0x44e446[_0xd65c('0x33')]='%'+_0x44b35d+'%';break;case'$startsWith':_0x44e446[_0xd65c('0x33')]=_0x44b35d+'%';break;case _0xd65c('0x29'):_0x44e446[_0xd65c('0x33')]='%'+_0x44b35d;break;case'$between':var _0x2d1c3c=_0x44b35d[_0xd65c('0x7')](',');var _0x44b35d=_0x2d1c3c[_0xd65c('0xa')]();var _0x51375a=_0x2d1c3c[_0xd65c('0x34')]();if(_0x5a3c0f===_0xd65c('0x35')){_0x44b35d=moment(_0x44b35d)[_0xd65c('0x36')](0x0,!![])[_0xd65c('0x17')]();_0x51375a=moment(_0x51375a)[_0xd65c('0x36')](0x0,!![])[_0xd65c('0x37')](0x17,_0xd65c('0x38'))[_0xd65c('0x37')](0x3b,_0xd65c('0x39'))[_0xd65c('0x37')](0x3b,_0xd65c('0x3a'))[_0xd65c('0x17')]();}_0x44e446={'start':_0x44b35d,'end':_0x51375a};break;default:_0x44e446[_0xd65c('0x33')]=_0x44b35d;break;}return _0x44e446;}
\ No newline at end of file
+var _0xfe2c=['add','hours','minutes','seconds','lodash','moment','sqlOperator','startsWith','[$or]','and','replace','[$and]','split','length','slice','shift','map','push','DATE','operator','$eq','$between','value','includes','$gt','$lte','days','castTo','text','CAST(','field','\x20AS\x20','$ne','$notIn','\x20OR\x20','\x20IS\x20NULL)','NOT\x20IN\x20?','<>\x20?','$endsWith','$lt','<\x20?','>\x20?','<=\x20?','$gte','>=\x20?','BETWEEN\x20?\x20AND\x20?','$in','$substring','start','pop','utcOffset','format'];(function(_0x2c5c49,_0x8640df){var _0x3b047d=function(_0x4119d7){while(--_0x4119d7){_0x2c5c49['push'](_0x2c5c49['shift']());}};_0x3b047d(++_0x8640df);}(_0xfe2c,0x6c));var _0xcfe2=function(_0xaf5e1e,_0x292663){_0xaf5e1e=_0xaf5e1e-0x0;var _0x4fc45c=_0xfe2c[_0xaf5e1e];return _0x4fc45c;};'use strict';var _=require(_0xcfe2('0x0'));var moment=require(_0xcfe2('0x1'));exports['parseSearch']=function(_0x452f8){var _0x38110c={'conditions':[]};_0x38110c[_0xcfe2('0x2')]=_[_0xcfe2('0x3')](_0x452f8,_0xcfe2('0x4'))?'or':_0xcfe2('0x5');var _0x283e70=_0x452f8[_0xcfe2('0x6')](_0xcfe2('0x7'),'')['replace'](_0xcfe2('0x4'),'')[_0xcfe2('0x8')]('||');for(var _0x341cd2=0x0;_0x341cd2<_0x283e70[_0xcfe2('0x9')];_0x341cd2++){var _0x6bbbd1=_0x283e70[_0x341cd2][_0xcfe2('0x8')](':=');var _0x1edc93=_0x6bbbd1[0x0];var _0x3b17c6=_0x6bbbd1[_0xcfe2('0xa')](0x1);_0x3b17c6['forEach'](function(_0x3b3427){var _0x8041f7=_0x3b3427['split']('[')[_0xcfe2('0xb')]();var _0xe71bbc=_0x3b3427['match'](/\[(.*?)\]/g);_0xe71bbc['forEach'](function(_0xa2f0fb){var _0x307297=_0xa2f0fb[_0xcfe2('0x8')]('[')['filter'](function(_0x5629ff){return _0x5629ff['indexOf'](']')>-0x1;})[_0xcfe2('0xc')](function(_0x2cb5a6){return _0x2cb5a6[_0xcfe2('0x8')](']')[0x0];})[0x0];_0x38110c['conditions'][_0xcfe2('0xd')]({'field':_0x1edc93,'operator':_0x8041f7,'value':_0x307297});});});}return _0x38110c;};exports['buildExpression']=function(_0x4b0421,_0x369994,_0x4d9ada){var _0x5c0f1e={};if(_0x369994===_0xcfe2('0xe')){if(_0x4d9ada[_0xcfe2('0xf')]===_0xcfe2('0x10')){_0x4d9ada[_0xcfe2('0xf')]=_0xcfe2('0x11');_0x4d9ada['value']+=','+_0x4d9ada[_0xcfe2('0x12')];}else if(_[_0xcfe2('0x13')]([_0xcfe2('0x14'),_0xcfe2('0x15')],_0x4d9ada[_0xcfe2('0xf')])){_0x4d9ada['value']=moment(_0x4d9ada[_0xcfe2('0x12')])['add'](0x1,_0xcfe2('0x16'))['format']('YYYY-MM-DD');}}if(_0x4d9ada[_0xcfe2('0x17')]){_0x369994=_0x4d9ada[_0xcfe2('0x17')];_0x5c0f1e[_0xcfe2('0x18')]=_0xcfe2('0x19')+_0x4b0421+'.'+_0x4d9ada[_0xcfe2('0x1a')]+_0xcfe2('0x1b')+_0x4d9ada[_0xcfe2('0x17')]+')\x20'+parseOperator(_0x4d9ada[_0xcfe2('0xf')]);}else{_0x5c0f1e[_0xcfe2('0x18')]=_0x4b0421+'.'+_0x4d9ada[_0xcfe2('0x1a')]+'\x20'+parseOperator(_0x4d9ada[_0xcfe2('0xf')]);}if(_[_0xcfe2('0x13')]([_0xcfe2('0x1c'),_0xcfe2('0x1d')],_0x4d9ada['operator']))_0x5c0f1e[_0xcfe2('0x18')]='('+_0x5c0f1e['text']+_0xcfe2('0x1e')+_0x4b0421+'.'+_0x4d9ada['field']+_0xcfe2('0x1f');_0x5c0f1e['value']=parseValue(_0x369994,_0x4d9ada['operator'],_0x4d9ada[_0xcfe2('0x12')]);return _0x5c0f1e;};function parseOperator(_0x21a6e1){var _0x1b4801;switch(_0x21a6e1){case'$in':_0x1b4801='IN\x20?';break;case _0xcfe2('0x1d'):_0x1b4801=_0xcfe2('0x20');break;case _0xcfe2('0x10'):_0x1b4801='=\x20?';break;case _0xcfe2('0x1c'):_0x1b4801=_0xcfe2('0x21');break;case'$substring':case'$startsWith':case _0xcfe2('0x22'):_0x1b4801='LIKE\x20?';break;case _0xcfe2('0x23'):_0x1b4801=_0xcfe2('0x24');break;case _0xcfe2('0x14'):_0x1b4801=_0xcfe2('0x25');break;case _0xcfe2('0x15'):_0x1b4801=_0xcfe2('0x26');break;case _0xcfe2('0x27'):_0x1b4801=_0xcfe2('0x28');break;case _0xcfe2('0x11'):_0x1b4801=_0xcfe2('0x29');break;}return _0x1b4801;}function parseValue(_0x37a140,_0x6c9c85,_0xd40d62){var _0x576a1b={'start':undefined,'end':undefined};switch(_0x6c9c85){case _0xcfe2('0x2a'):case _0xcfe2('0x1d'):_0x576a1b['start']=_0xd40d62['split'](',');break;case _0xcfe2('0x2b'):_0x576a1b[_0xcfe2('0x2c')]='%'+_0xd40d62+'%';break;case'$startsWith':_0x576a1b['start']=_0xd40d62+'%';break;case _0xcfe2('0x22'):_0x576a1b[_0xcfe2('0x2c')]='%'+_0xd40d62;break;case _0xcfe2('0x11'):var _0x5d9c55=_0xd40d62[_0xcfe2('0x8')](',');var _0xd40d62=_0x5d9c55[_0xcfe2('0xb')]();var _0x8311d6=_0x5d9c55[_0xcfe2('0x2d')]();if(_0x37a140==='DATE'){_0xd40d62=moment(_0xd40d62)[_0xcfe2('0x2e')](0x0,!![])[_0xcfe2('0x2f')]();_0x8311d6=moment(_0x8311d6)[_0xcfe2('0x2e')](0x0,!![])[_0xcfe2('0x30')](0x17,_0xcfe2('0x31'))[_0xcfe2('0x30')](0x3b,_0xcfe2('0x32'))[_0xcfe2('0x30')](0x3b,_0xcfe2('0x33'))[_0xcfe2('0x2f')]();}_0x576a1b={'start':_0xd40d62,'end':_0x8311d6};break;default:_0x576a1b[_0xcfe2('0x2c')]=_0xd40d62;break;}return _0x576a1b;}
\ No newline at end of file
diff --git a/server/components/parsers/qs.js b/server/components/parsers/qs.js
index c68aad3..c1be884 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 _0xc4e2=['parse','split','limit','sort','map','indexOf','priority','cast','col','substr','DESC','unsigned','ASC','omit','length','isString','unset','hasOwnProperty','isNumeric','match','^[0-9]*$','isEmail','getFullTextValue','forEach','push','join','lodash','sequelize','fields','filters','isEmpty','isArray'];(function(_0x382e89,_0x4768c0){var _0x3a1318=function(_0x79e1ce){while(--_0x79e1ce){_0x382e89['push'](_0x382e89['shift']());}};_0x3a1318(++_0x4768c0);}(_0xc4e2,0xfa));var _0x2c4e=function(_0x2a6809,_0x44edde){_0x2a6809=_0x2a6809-0x0;var _0x11c371=_0xc4e2[_0x2a6809];return _0x11c371;};'use strict';var _=require(_0x2c4e('0x0'));var sequelize=require(_0x2c4e('0x1'));var LIMIT_VALUE=0xfa;exports[_0x2c4e('0x2')]=function(_0x4961b7){var _0x283b1a=null;if(_0x4961b7){_0x283b1a=_0x4961b7['split'](',');}return _0x283b1a;};exports[_0x2c4e('0x3')]=function(_0x259926){var _0x5dba7c={};if(!_[_0x2c4e('0x4')](_0x259926)){_0x5dba7c={};_['forOwn'](_0x259926,function(_0x30c4c0,_0x3db320){try{_0x5dba7c[_0x3db320]=_[_0x2c4e('0x5')](_0x30c4c0)?_0x30c4c0:JSON[_0x2c4e('0x6')](_0x30c4c0);}catch(_0x3081bb){_0x5dba7c[_0x3db320]=_0x30c4c0[_0x2c4e('0x7')](',');}});}return _0x5dba7c;};exports[_0x2c4e('0x8')]=function(_0x4a565f){_0x4a565f=parseInt(_0x4a565f,0xa);if(!_0x4a565f||_0x4a565f<0x0){_0x4a565f=LIMIT_VALUE;}return _0x4a565f;};exports['offset']=function(_0xe2220a){_0xe2220a=parseInt(_0xe2220a,0xa);if(!_0xe2220a||_0xe2220a<0x0){_0xe2220a=0x0;}return _0xe2220a;};exports[_0x2c4e('0x9')]=function(_0x3cbf25){var _0x6cae06,_0x4ad4a0=null;if(_0x3cbf25){_0x6cae06=_0x3cbf25[_0x2c4e('0x7')](',');_0x4ad4a0=_[_0x2c4e('0xa')](_0x6cae06,function(_0x2e97b5){if(_0x2e97b5[_0x2c4e('0xb')]('-')===0x0){return[_0x2e97b5===_0x2c4e('0xc')?sequelize[_0x2c4e('0xd')](sequelize[_0x2c4e('0xe')]('priority'),'unsigned'):_0x2e97b5[_0x2c4e('0xf')](0x1),_0x2c4e('0x10')];}else{return[_0x2e97b5===_0x2c4e('0xc')?sequelize[_0x2c4e('0xd')](sequelize[_0x2c4e('0xe')](_0x2c4e('0xc')),_0x2c4e('0x11')):_0x2e97b5,_0x2c4e('0x12')];}});}return _0x4ad4a0;};exports[_0x2c4e('0x13')]=function(_0x37932c,_0x42e399){if(_[_0x2c4e('0x4')](_0x37932c)){return _0x37932c;}if(_[_0x2c4e('0x5')](_0x37932c)){for(var _0x418719=0x0;_0x418719<_0x37932c[_0x2c4e('0x14')];_0x418719+=0x1){_0x37932c[_0x418719]=this['omit'](_0x37932c[_0x418719],_0x42e399);}return _0x37932c;}if(!_['isObject'](_0x37932c)){return _0x37932c;}if(_[_0x2c4e('0x15')](_0x42e399)){_0x42e399=[_0x42e399];}if(!_[_0x2c4e('0x5')](_0x42e399)){return _0x37932c;}for(var _0x487a28=0x0;_0x487a28<_0x42e399['length'];_0x487a28+=0x1){_[_0x2c4e('0x16')](_0x37932c,_0x42e399[_0x487a28]);}for(var _0x2faec5 in _0x37932c){if(_0x37932c[_0x2c4e('0x17')](_0x2faec5)){_0x37932c[_0x2faec5]=this[_0x2c4e('0x13')](_0x37932c[_0x2faec5],_0x42e399);}}return _0x37932c;};exports[_0x2c4e('0x18')]=function(_0x36b7f9){return _0x36b7f9[_0x2c4e('0x19')](RegExp(_0x2c4e('0x1a')))?!![]:![];};exports[_0x2c4e('0x1b')]=function(_0x237ec8){return _0x237ec8[_0x2c4e('0x19')](/^\S+@\S+$/)?!![]:![];};exports[_0x2c4e('0x1c')]=function(_0x19e23f){var _0x967cff=[];_0x19e23f[_0x2c4e('0x7')]('\x20')[_0x2c4e('0x1d')](function(_0x331ec1){_0x967cff[_0x2c4e('0x1e')]('+'+_0x331ec1['toString']()+'*');});return _0x967cff[_0x2c4e('0x1f')]('\x20');};
\ No newline at end of file
+var _0x6c5d=['offset','sort','map','indexOf','priority','cast','col','unsigned','substr','DESC','ASC','omit','length','isObject','isString','hasOwnProperty','isNumeric','isEmail','getFullTextValue','forEach','push','toString','join','lodash','sequelize','split','filters','isEmpty','forOwn','isArray','parse','limit'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x6c5d,0x77));var _0xd6c5=function(_0x25ff42,_0x1dd28a){_0x25ff42=_0x25ff42-0x0;var _0x2b9f64=_0x6c5d[_0x25ff42];return _0x2b9f64;};'use strict';var _=require(_0xd6c5('0x0'));var sequelize=require(_0xd6c5('0x1'));var LIMIT_VALUE=0xfa;exports['fields']=function(_0x2943c1){var _0x53785d=null;if(_0x2943c1){_0x53785d=_0x2943c1[_0xd6c5('0x2')](',');}return _0x53785d;};exports[_0xd6c5('0x3')]=function(_0x5ae8a6){var _0x5b344b={};if(!_[_0xd6c5('0x4')](_0x5ae8a6)){_0x5b344b={};_[_0xd6c5('0x5')](_0x5ae8a6,function(_0x237ca6,_0x147557){try{_0x5b344b[_0x147557]=_[_0xd6c5('0x6')](_0x237ca6)?_0x237ca6:JSON[_0xd6c5('0x7')](_0x237ca6);}catch(_0x20c142){_0x5b344b[_0x147557]=_0x237ca6['split'](',');}});}return _0x5b344b;};exports[_0xd6c5('0x8')]=function(_0x41f3e){_0x41f3e=parseInt(_0x41f3e,0xa);if(!_0x41f3e||_0x41f3e<0x0){_0x41f3e=LIMIT_VALUE;}return _0x41f3e;};exports[_0xd6c5('0x9')]=function(_0x2e08d1){_0x2e08d1=parseInt(_0x2e08d1,0xa);if(!_0x2e08d1||_0x2e08d1<0x0){_0x2e08d1=0x0;}return _0x2e08d1;};exports[_0xd6c5('0xa')]=function(_0x2a9fcc){var _0x32134a,_0x42f425=null;if(_0x2a9fcc){_0x32134a=_0x2a9fcc[_0xd6c5('0x2')](',');_0x42f425=_[_0xd6c5('0xb')](_0x32134a,function(_0x153c2f){if(_0x153c2f[_0xd6c5('0xc')]('-')===0x0){return[_0x153c2f===_0xd6c5('0xd')?sequelize[_0xd6c5('0xe')](sequelize[_0xd6c5('0xf')](_0xd6c5('0xd')),_0xd6c5('0x10')):_0x153c2f[_0xd6c5('0x11')](0x1),_0xd6c5('0x12')];}else{return[_0x153c2f===_0xd6c5('0xd')?sequelize[_0xd6c5('0xe')](sequelize[_0xd6c5('0xf')](_0xd6c5('0xd')),_0xd6c5('0x10')):_0x153c2f,_0xd6c5('0x13')];}});}return _0x42f425;};exports[_0xd6c5('0x14')]=function(_0x609c59,_0x153e52){if(_[_0xd6c5('0x4')](_0x609c59)){return _0x609c59;}if(_[_0xd6c5('0x6')](_0x609c59)){for(var _0x42ac2d=0x0;_0x42ac2d<_0x609c59[_0xd6c5('0x15')];_0x42ac2d+=0x1){_0x609c59[_0x42ac2d]=this['omit'](_0x609c59[_0x42ac2d],_0x153e52);}return _0x609c59;}if(!_[_0xd6c5('0x16')](_0x609c59)){return _0x609c59;}if(_[_0xd6c5('0x17')](_0x153e52)){_0x153e52=[_0x153e52];}if(!_[_0xd6c5('0x6')](_0x153e52)){return _0x609c59;}for(var _0x2237d3=0x0;_0x2237d3<_0x153e52[_0xd6c5('0x15')];_0x2237d3+=0x1){_['unset'](_0x609c59,_0x153e52[_0x2237d3]);}for(var _0x23b50a in _0x609c59){if(_0x609c59[_0xd6c5('0x18')](_0x23b50a)){_0x609c59[_0x23b50a]=this[_0xd6c5('0x14')](_0x609c59[_0x23b50a],_0x153e52);}}return _0x609c59;};exports[_0xd6c5('0x19')]=function(_0x78f336){return _0x78f336['match'](RegExp('^[0-9]*$'))?!![]:![];};exports[_0xd6c5('0x1a')]=function(_0x175f9f){return _0x175f9f['match'](/^\S+@\S+$/)?!![]:![];};exports[_0xd6c5('0x1b')]=function(_0x38dec6){var _0x21bc81=[];_0x38dec6['split']('\x20')[_0xd6c5('0x1c')](function(_0x4e9945){_0x21bc81[_0xd6c5('0x1d')]('+'+_0x4e9945[_0xd6c5('0x1e')]()+'*');});return _0x21bc81[_0xd6c5('0x1f')]('\x20');};
\ No newline at end of file
diff --git a/server/config/express.js b/server/config/express.js
index a7e9a21..7058b4b 100644
--- a/server/config/express.js
+++ b/server/config/express.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4f76=['cookie-parser','errorhandler','path','cors','moment','../mysqldb','get','env','production','set','public','test','appPath','join','root','client','use','json\x20replacer','toISOString','split','static','views','/server/views','engine','ejs','renderFile','view\x20engine','urlencoded','json','50mb','serve-favicon','method-override'];(function(_0x41e8bd,_0x52511c){var _0x5999a7=function(_0x189fec){while(--_0x189fec){_0x41e8bd['push'](_0x41e8bd['shift']());}};_0x5999a7(++_0x52511c);}(_0x4f76,0x11e));var _0x64f7=function(_0x2bfd4f,_0x1bbf2c){_0x2bfd4f=_0x2bfd4f-0x0;var _0x341849=_0x4f76[_0x2bfd4f];return _0x341849;};'use strict';var express=require('express');var favicon=require(_0x64f7('0x0'));var bodyParser=require('body-parser');var methodOverride=require(_0x64f7('0x1'));var cookieParser=require(_0x64f7('0x2'));var errorHandler=require(_0x64f7('0x3'));var path=require(_0x64f7('0x4'));var passport=require('passport');var cors=require(_0x64f7('0x5'));var moment=require(_0x64f7('0x6'));var config=require('./environment');var db=require(_0x64f7('0x7'))['db'];exports['default']=function(_0x1e9a5d){var _0x1c0fc0=_0x1e9a5d[_0x64f7('0x8')](_0x64f7('0x9'));if(_0x1c0fc0===_0x64f7('0xa')){_0x1e9a5d[_0x64f7('0xb')]('appPath',path['join'](config['root'],_0x64f7('0xc')));}if(_0x1c0fc0==='development'||_0x1c0fc0===_0x64f7('0xd')){_0x1e9a5d['set'](_0x64f7('0xe'),path[_0x64f7('0xf')](config[_0x64f7('0x10')],_0x64f7('0x11')));_0x1e9a5d[_0x64f7('0x12')](errorHandler());}_0x1e9a5d[_0x64f7('0xb')](_0x64f7('0x13'),function(_0x31037c,_0xd2bf78){if(this[_0x31037c]instanceof Date){_0xd2bf78=this[_0x31037c][_0x64f7('0x14')]()[_0x64f7('0x15')]('.')[0x0]+'Z';}return _0xd2bf78;});_0x1e9a5d[_0x64f7('0x12')](express[_0x64f7('0x16')](_0x1e9a5d[_0x64f7('0x8')](_0x64f7('0xe'))));_0x1e9a5d[_0x64f7('0xb')](_0x64f7('0x17'),config[_0x64f7('0x10')]+_0x64f7('0x18'));_0x1e9a5d[_0x64f7('0x19')]('html',require(_0x64f7('0x1a'))[_0x64f7('0x1b')]);_0x1e9a5d['set'](_0x64f7('0x1c'),'html');_0x1e9a5d[_0x64f7('0x12')](bodyParser[_0x64f7('0x1d')]({'limit':'50mb','extended':!![]}));_0x1e9a5d[_0x64f7('0x12')](bodyParser[_0x64f7('0x1e')]({'limit':_0x64f7('0x1f')}));_0x1e9a5d[_0x64f7('0x12')](cors());_0x1e9a5d[_0x64f7('0x12')](methodOverride());_0x1e9a5d[_0x64f7('0x12')](cookieParser());_0x1e9a5d[_0x64f7('0x12')](passport['initialize']());};
\ No newline at end of file
+var _0xf99e=['body-parser','method-override','errorhandler','path','passport','cors','moment','./environment','../mysqldb','default','get','env','production','set','appPath','join','public','test','root','use','json\x20replacer','toISOString','split','views','engine','html','ejs','renderFile','view\x20engine','urlencoded','50mb','json','express','serve-favicon'];(function(_0x367e5b,_0x5721e4){var _0x4b909e=function(_0x22c6a4){while(--_0x22c6a4){_0x367e5b['push'](_0x367e5b['shift']());}};_0x4b909e(++_0x5721e4);}(_0xf99e,0x130));var _0xef99=function(_0x559a80,_0x3d193d){_0x559a80=_0x559a80-0x0;var _0x42f555=_0xf99e[_0x559a80];return _0x42f555;};'use strict';var express=require(_0xef99('0x0'));var favicon=require(_0xef99('0x1'));var bodyParser=require(_0xef99('0x2'));var methodOverride=require(_0xef99('0x3'));var cookieParser=require('cookie-parser');var errorHandler=require(_0xef99('0x4'));var path=require(_0xef99('0x5'));var passport=require(_0xef99('0x6'));var cors=require(_0xef99('0x7'));var moment=require(_0xef99('0x8'));var config=require(_0xef99('0x9'));var db=require(_0xef99('0xa'))['db'];exports[_0xef99('0xb')]=function(_0xcd4691){var _0x32f4b6=_0xcd4691[_0xef99('0xc')](_0xef99('0xd'));if(_0x32f4b6===_0xef99('0xe')){_0xcd4691[_0xef99('0xf')](_0xef99('0x10'),path[_0xef99('0x11')](config['root'],_0xef99('0x12')));}if(_0x32f4b6==='development'||_0x32f4b6===_0xef99('0x13')){_0xcd4691[_0xef99('0xf')]('appPath',path[_0xef99('0x11')](config[_0xef99('0x14')],'client'));_0xcd4691[_0xef99('0x15')](errorHandler());}_0xcd4691['set'](_0xef99('0x16'),function(_0x34f9ba,_0x53359f){if(this[_0x34f9ba]instanceof Date){_0x53359f=this[_0x34f9ba][_0xef99('0x17')]()[_0xef99('0x18')]('.')[0x0]+'Z';}return _0x53359f;});_0xcd4691[_0xef99('0x15')](express['static'](_0xcd4691[_0xef99('0xc')](_0xef99('0x10'))));_0xcd4691[_0xef99('0xf')](_0xef99('0x19'),config[_0xef99('0x14')]+'/server/views');_0xcd4691[_0xef99('0x1a')](_0xef99('0x1b'),require(_0xef99('0x1c'))[_0xef99('0x1d')]);_0xcd4691['set'](_0xef99('0x1e'),_0xef99('0x1b'));_0xcd4691[_0xef99('0x15')](bodyParser[_0xef99('0x1f')]({'limit':_0xef99('0x20'),'extended':!![]}));_0xcd4691[_0xef99('0x15')](bodyParser[_0xef99('0x21')]({'limit':_0xef99('0x20')}));_0xcd4691[_0xef99('0x15')](cors());_0xcd4691['use'](methodOverride());_0xcd4691[_0xef99('0x15')](cookieParser());_0xcd4691[_0xef99('0x15')](passport['initialize']());};
\ No newline at end of file
diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js
index 8183408..331e79a 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 _0x5fc3=['head','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','cpus','model','createHash','md5','update','digest','hex','utf8','replace','hostname','ipAddress','substring','lodash','crypto','child_process','execSync','networkInterfaces','orderBy','keys','filter','family','IPv4','internal','concat'];(function(_0xd02c72,_0x29213f){var _0x2f842a=function(_0x455040){while(--_0x455040){_0xd02c72['push'](_0xd02c72['shift']());}};_0x2f842a(++_0x29213f);}(_0x5fc3,0xa8));var _0x35fc=function(_0x56138f,_0x1e9ebb){_0x56138f=_0x56138f-0x0;var _0x1acaf7=_0x5fc3[_0x56138f];return _0x1acaf7;};'use strict';var _=require(_0x35fc('0x0'));var os=require('os');var crypto=require(_0x35fc('0x1'));var machine=require('bimedia-machine-uuid');var exec=require(_0x35fc('0x2'))[_0x35fc('0x3')];function getInterfaces(){var _0x196bc2=[];var _0x91d024=os[_0x35fc('0x4')]();var _0x5e75e6=_[_0x35fc('0x5')](_[_0x35fc('0x6')](_0x91d024));for(var _0x186a06=0x0;_0x186a06<_0x5e75e6['length'];_0x186a06++){var _0x5754be=_0x91d024[_0x5e75e6[_0x186a06]][_0x35fc('0x7')](function(_0x508b32){return _0x508b32[_0x35fc('0x8')]===_0x35fc('0x9')&&_0x508b32[_0x35fc('0xa')]===![];});_0x196bc2=_0x196bc2[_0x35fc('0xb')](_0x5754be);}return _0x196bc2;}function getFirstInterface(){var _0x34ff19=_[_0x35fc('0xc')](getInterfaces());return{'macAddress':_0x34ff19&&_0x34ff19[_0x35fc('0xd')]?_0x34ff19['mac']:_0x35fc('0xe'),'ipAddress':_0x34ff19&&_0x34ff19[_0x35fc('0xf')]?_0x34ff19['address']:_0x35fc('0x10')};}exports[_0x35fc('0x11')]=getFirstInterface;function getCPUhash(){var _0x5021d4=_[_0x35fc('0x5')](os[_0x35fc('0x12')]()['map'](function(_0x4cbe74){return _0x4cbe74[_0x35fc('0x13')];}))['join'](':');return crypto[_0x35fc('0x14')](_0x35fc('0x15'))[_0x35fc('0x16')](_0x5021d4)[_0x35fc('0x17')](_0x35fc('0x18'));}exports['getUuid']=function(){switch(os['platform']()){case'win32':return exec('dmidecode\x20--string\x20system-uuid',{'encoding':_0x35fc('0x19')})[_0x35fc('0x1a')]('\x0d\x0a','');default:var _0x53b898=getFirstInterface();var _0x154958=getCPUhash();var _0x227a49=_0x154958+'|'+os[_0x35fc('0x1b')]()+'|'+_0x53b898['macAddress']+'|'+_0x53b898[_0x35fc('0x1c')];var _0x45c8b7=crypto['createHash'](_0x35fc('0x15'))[_0x35fc('0x16')](_0x227a49)[_0x35fc('0x17')]('hex');return _0x45c8b7[_0x35fc('0x1d')](0x0,0x8)+'-'+_0x45c8b7[_0x35fc('0x1d')](0x8,0xc)+'-'+_0x45c8b7[_0x35fc('0x1d')](0xc,0x10)+'-'+_0x45c8b7['substring'](0x10,0x14)+'-'+_0x45c8b7[_0x35fc('0x1d')](0x14);}};
\ No newline at end of file
+var _0x7676=['bimedia-machine-uuid','execSync','networkInterfaces','orderBy','keys','filter','IPv4','internal','concat','head','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','cpus','map','join','createHash','update','digest','getUuid','platform','win32','dmidecode\x20--string\x20system-uuid','replace','hostname','ipAddress','substring','lodash','crypto'];(function(_0x4f1dd6,_0x21e91d){var _0xc773ca=function(_0x508f0a){while(--_0x508f0a){_0x4f1dd6['push'](_0x4f1dd6['shift']());}};_0xc773ca(++_0x21e91d);}(_0x7676,0xb8));var _0x6767=function(_0x10eb28,_0x2b773f){_0x10eb28=_0x10eb28-0x0;var _0x7940e1=_0x7676[_0x10eb28];return _0x7940e1;};'use strict';var _=require(_0x6767('0x0'));var os=require('os');var crypto=require(_0x6767('0x1'));var machine=require(_0x6767('0x2'));var exec=require('child_process')[_0x6767('0x3')];function getInterfaces(){var _0x478b23=[];var _0x51f099=os[_0x6767('0x4')]();var _0x4bd37b=_[_0x6767('0x5')](_[_0x6767('0x6')](_0x51f099));for(var _0x3e0c16=0x0;_0x3e0c16<_0x4bd37b['length'];_0x3e0c16++){var _0x24d747=_0x51f099[_0x4bd37b[_0x3e0c16]][_0x6767('0x7')](function(_0x211a93){return _0x211a93['family']===_0x6767('0x8')&&_0x211a93[_0x6767('0x9')]===![];});_0x478b23=_0x478b23[_0x6767('0xa')](_0x24d747);}return _0x478b23;}function getFirstInterface(){var _0x343933=_[_0x6767('0xb')](getInterfaces());return{'macAddress':_0x343933&&_0x343933[_0x6767('0xc')]?_0x343933[_0x6767('0xc')]:_0x6767('0xd'),'ipAddress':_0x343933&&_0x343933[_0x6767('0xe')]?_0x343933[_0x6767('0xe')]:_0x6767('0xf')};}exports[_0x6767('0x10')]=getFirstInterface;function getCPUhash(){var _0x47b7a4=_[_0x6767('0x5')](os[_0x6767('0x11')]()[_0x6767('0x12')](function(_0x4968aa){return _0x4968aa['model'];}))[_0x6767('0x13')](':');return crypto[_0x6767('0x14')]('md5')[_0x6767('0x15')](_0x47b7a4)[_0x6767('0x16')]('hex');}exports[_0x6767('0x17')]=function(){switch(os[_0x6767('0x18')]()){case _0x6767('0x19'):return exec(_0x6767('0x1a'),{'encoding':'utf8'})[_0x6767('0x1b')]('\x0d\x0a','');default:var _0x49b65f=getFirstInterface();var _0x6526b3=getCPUhash();var _0x1598e8=_0x6526b3+'|'+os[_0x6767('0x1c')]()+'|'+_0x49b65f['macAddress']+'|'+_0x49b65f[_0x6767('0x1d')];var _0x4d3499=crypto[_0x6767('0x14')]('md5')[_0x6767('0x15')](_0x1598e8)['digest']('hex');return _0x4d3499[_0x6767('0x1e')](0x0,0x8)+'-'+_0x4d3499[_0x6767('0x1e')](0x8,0xc)+'-'+_0x4d3499['substring'](0xc,0x10)+'-'+_0x4d3499[_0x6767('0x1e')](0x10,0x14)+'-'+_0x4d3499[_0x6767('0x1e')](0x14);}};
\ No newline at end of file
diff --git a/server/config/license/index.js b/server/config/license/index.js
index da187eb..991a4de 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 _0x853e=['YYYY-MM-DD\x20HH:mm','diff','days','DEMO\x20START\x20AT\x20%s','error','getUuid','findOrCreate','SERVICE\x20LICENSE\x20STARTED\x20%s','message','default','crypto','request-promise','pkginfo','../../mysqldb','../environment','./hardware','../logger','license','https://www.xcallymotion.com','format','%s/api/servers/%s/check?version=%s','exports','version','catch','createCipher','aes-256-ctr','secrets','session','update','createDecipher','base64','utf8','final','User','findOne','admin','fullname','email','then','|reason|','|uuid|','|machineUuid|','|name|','|email|','getFirstInterface','ipAddress','openIssue','Motion\x20License\x20Alert','Alert','get','data2','info','THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED','THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','data1','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','Changed','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','uuid','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s'];(function(_0x53b55f,_0x7980d0){var _0x71d9fa=function(_0x1c30c2){while(--_0x1c30c2){_0x53b55f['push'](_0x53b55f['shift']());}};_0x71d9fa(++_0x7980d0);}(_0x853e,0x1ea));var _0xe853=function(_0x2220a0,_0x38684f){_0x2220a0=_0x2220a0-0x0;var _0x510bfc=_0x853e[_0x2220a0];return _0x510bfc;};'use strict';var util=require('util');var crypto=require(_0xe853('0x0'));var moment=require('moment');var rp=require(_0xe853('0x1'));var BPromise=require('bluebird');var pkginfo=require(_0xe853('0x2'))(module,'version');var db=require(_0xe853('0x3'))['db'];var config=require(_0xe853('0x4'));var hardware=require(_0xe853('0x5'));var logger=require(_0xe853('0x6'))(_0xe853('0x7'));var jira=require('../../api/jira/jira.controller');var HOST=_0xe853('0x8');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var ADMIN;var oldToken;function httpRequest(_0x131614){return new BPromise(function(_0xab8d0d,_0x25e6e1){var _0xe3d468=util[_0xe853('0x9')](_0xe853('0xa'),HOST,_0x131614,module[_0xe853('0xb')][_0xe853('0xc')]);if(oldToken){_0xe3d468=util[_0xe853('0x9')]('%s/api/servers/%s/check?version=%s&oldtoken=%s',HOST,_0x131614,module['exports']['version'],oldToken);}var _0xd985c6={'uri':_0xe3d468,'method':'GET','timeout':0xea60,'json':!![]};return rp(_0xd985c6)['then'](function(_0x1c6224){_0xab8d0d(_0x1c6224);})[_0xe853('0xd')](function(_0x20ec95){_0x25e6e1(_0x20ec95);});});}function encryptDate(_0x5aed92){var _0x88883f=crypto[_0xe853('0xe')](_0xe853('0xf'),config[_0xe853('0x10')][_0xe853('0x11')]);var _0x696c79=_0x88883f[_0xe853('0x12')](_0x5aed92,'utf8','base64');_0x696c79+=_0x88883f['final']('base64');return _0x696c79;}function decryptDate(_0x156940){var _0x3840b5=crypto[_0xe853('0x13')](_0xe853('0xf'),config[_0xe853('0x10')][_0xe853('0x11')]);var _0x335ca3=_0x3840b5[_0xe853('0x12')](_0x156940,_0xe853('0x14'),_0xe853('0x15'));_0x335ca3+=_0x3840b5[_0xe853('0x16')](_0xe853('0x15'));return _0x335ca3;}function sendJiraAlert(_0x459007,_0x3295cc,_0x25a5e2){var _0x1758da='||FIELD||VALUE||\x0a';return db[_0xe853('0x17')][_0xe853('0x18')]({'where':{'role':_0xe853('0x19')},'attributes':[_0xe853('0x1a'),_0xe853('0x1b')],'raw':!![]})[_0xe853('0x1c')](function(_0x3a8065){ADMIN=_0x3a8065;_0x1758da+=_0xe853('0x1d')+_0x25a5e2+'|\x0a';_0x1758da+=_0xe853('0x1e')+_0x459007+'|\x0a';_0x1758da+=_0xe853('0x1f')+_0x3295cc+'|\x0a';_0x1758da+=_0xe853('0x20')+ADMIN['fullname']+'|\x0a';_0x1758da+=_0xe853('0x21')+ADMIN[_0xe853('0x1b')]+'|\x0a';return _0x1758da;})[_0xe853('0x1c')](function(_0x209049){var _0x1af209=hardware[_0xe853('0x22')]()[_0xe853('0x23')];return jira[_0xe853('0x24')]({'key':'MOTLICENSE','summary':_0xe853('0x25'),'description':_0x209049,'issuetype':_0xe853('0x26'),'oldToken':_0x459007,'newToken':_0x3295cc,'email':ADMIN[_0xe853('0x1b')],'name':ADMIN[_0xe853('0x1a')],'reason':GRAY_PERIOD_REASON,'ip':_0x1af209});});}function manageLicense(_0x105ce2,_0x58454e){var _0x1fdaaf=_0x58454e[_0xe853('0x27')]({'plain':!![]});httpRequest(_0x105ce2)['then'](function(_0x176794){if(oldToken){oldToken=undefined;}if(_0x176794['active']){if(!_0x1fdaaf[_0xe853('0x7')]&&_0x1fdaaf['license']!=_0x176794['license']||_0x1fdaaf[_0xe853('0x7')]&&_0x1fdaaf[_0xe853('0x28')]){logger[_0xe853('0x29')](_0xe853('0x2a'));}if(_0x1fdaaf[_0xe853('0x7')]&&!_0x1fdaaf[_0xe853('0x28')]&&_0x1fdaaf[_0xe853('0x7')]!=_0x176794[_0xe853('0x7')]){logger[_0xe853('0x29')](_0xe853('0x2b'));}if(_0x1fdaaf[_0xe853('0x7')]&&!_0x1fdaaf['data2']&&_0x1fdaaf[_0xe853('0x7')]==_0x176794[_0xe853('0x7')]){return _0x58454e;}return _0x58454e['update']({'data1':_0x105ce2,'data2':null,'license':_0x176794[_0xe853('0x7')]});}else{if(_0x176794['license']||_0x1fdaaf[_0xe853('0x7')]){if(!_0x1fdaaf[_0xe853('0x28')]){if(_0x1fdaaf[_0xe853('0x2c')]==_0x105ce2){GRAY_PERIOD_REASON='Disabled';logger[_0xe853('0x29')](_0xe853('0x2d'));}else{GRAY_PERIOD_REASON=_0xe853('0x2e');oldToken=_0x1fdaaf[_0xe853('0x2c')];logger[_0xe853('0x29')](_0xe853('0x2f'),_0x1fdaaf[_0xe853('0x2c')],_0x105ce2);}sendJiraAlert(_0x1fdaaf[_0xe853('0x2c')],_0x176794[_0xe853('0x30')],GRAY_PERIOD_REASON);logger[_0xe853('0x29')](_0xe853('0x31'),GRAY_PERIOD_REASON['toUpperCase'](),moment()[_0xe853('0x9')]('YYYY-MM-DD\x20HH:mm'));return _0x58454e[_0xe853('0x12')]({'data2':encryptDate(moment()[_0xe853('0x9')](_0xe853('0x32')))});}else{if(moment()[_0xe853('0x33')](decryptDate(_0x1fdaaf['data2']),_0xe853('0x34'))>DAYS){logger[_0xe853('0x29')](_0xe853('0x35'),moment()[_0xe853('0x9')](_0xe853('0x32')));return _0x58454e[_0xe853('0x12')]({'data1':_0x105ce2,'data2':null,'license':null});}}}else{if(_0x1fdaaf['data1']!=_0x105ce2){logger[_0xe853('0x29')](_0xe853('0x2f'),_0x1fdaaf[_0xe853('0x2c')],_0x105ce2);return _0x58454e[_0xe853('0x12')]({'data1':_0x105ce2,'data2':null,'license':null});}}}return _0x58454e;})[_0xe853('0x1c')](function(_0x2dbf3b){_0x58454e=_0x2dbf3b;})[_0xe853('0xd')](function(_0x1ef84e){logger[_0xe853('0x36')](_0x1ef84e['message']);})['finally'](function(){setTimeout(function(){manageLicense(hardware[_0xe853('0x37')](),_0x58454e);},TIME);});}function defaultLicense(){var _0x40fe3a=hardware[_0xe853('0x37')]();if(_0x40fe3a){return db['License'][_0xe853('0x38')]({'where':{'id':0x1},'defaults':{'data1':_0x40fe3a}})['spread'](function(_0x52bbaa,_0x4af4fc){logger[_0xe853('0x29')](_0xe853('0x39'),_0x40fe3a);manageLicense(_0x40fe3a,_0x52bbaa);})[_0xe853('0xd')](function(_0x5ac611){logger[_0xe853('0x36')](_0x5ac611[_0xe853('0x3a')]);});}}exports[_0xe853('0x3b')]=defaultLicense;
\ No newline at end of file
+var _0x2542=['then','createCipher','aes-256-ctr','secrets','update','base64','final','createDecipher','utf8','||FIELD||VALUE||\x0a','User','findOne','admin','fullname','|reason|','|email|','email','MOTLICENSE','Motion\x20License\x20Alert','Alert','get','active','data2','info','THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED','THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','data1','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','Changed','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','uuid','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','days','DEMO\x20START\x20AT\x20%s','catch','error','message','finally','getUuid','License','findOrCreate','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','default','util','crypto','moment','request-promise','pkginfo','../../mysqldb','../environment','./hardware','../logger','license','https://www.xcallymotion.com','format','%s/api/servers/%s/check?version=%s','exports','version','%s/api/servers/%s/check?version=%s&oldtoken=%s','GET'];(function(_0x30ab42,_0x2f40fc){var _0x5cdf61=function(_0x4280b6){while(--_0x4280b6){_0x30ab42['push'](_0x30ab42['shift']());}};_0x5cdf61(++_0x2f40fc);}(_0x2542,0x169));var _0x2254=function(_0x2560ee,_0x546d61){_0x2560ee=_0x2560ee-0x0;var _0x27920d=_0x2542[_0x2560ee];return _0x27920d;};'use strict';var util=require(_0x2254('0x0'));var crypto=require(_0x2254('0x1'));var moment=require(_0x2254('0x2'));var rp=require(_0x2254('0x3'));var BPromise=require('bluebird');var pkginfo=require(_0x2254('0x4'))(module,'version');var db=require(_0x2254('0x5'))['db'];var config=require(_0x2254('0x6'));var hardware=require(_0x2254('0x7'));var logger=require(_0x2254('0x8'))(_0x2254('0x9'));var jira=require('../../api/jira/jira.controller');var HOST=_0x2254('0xa');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var ADMIN;var oldToken;function httpRequest(_0xe8ca50){return new BPromise(function(_0x2ee7ee,_0x3c45ec){var _0x1637ad=util[_0x2254('0xb')](_0x2254('0xc'),HOST,_0xe8ca50,module[_0x2254('0xd')][_0x2254('0xe')]);if(oldToken){_0x1637ad=util[_0x2254('0xb')](_0x2254('0xf'),HOST,_0xe8ca50,module['exports'][_0x2254('0xe')],oldToken);}var _0x2655ea={'uri':_0x1637ad,'method':_0x2254('0x10'),'timeout':0xea60,'json':!![]};return rp(_0x2655ea)[_0x2254('0x11')](function(_0x575d58){_0x2ee7ee(_0x575d58);})['catch'](function(_0xe4fc71){_0x3c45ec(_0xe4fc71);});});}function encryptDate(_0x3e4213){var _0x116b70=crypto[_0x2254('0x12')](_0x2254('0x13'),config[_0x2254('0x14')]['session']);var _0x439238=_0x116b70[_0x2254('0x15')](_0x3e4213,'utf8',_0x2254('0x16'));_0x439238+=_0x116b70[_0x2254('0x17')](_0x2254('0x16'));return _0x439238;}function decryptDate(_0x145272){var _0x26285a=crypto[_0x2254('0x18')]('aes-256-ctr',config[_0x2254('0x14')]['session']);var _0x327d6d=_0x26285a[_0x2254('0x15')](_0x145272,_0x2254('0x16'),_0x2254('0x19'));_0x327d6d+=_0x26285a[_0x2254('0x17')](_0x2254('0x19'));return _0x327d6d;}function sendJiraAlert(_0x497724,_0x51b395,_0x5ec98d){var _0xb05559=_0x2254('0x1a');return db[_0x2254('0x1b')][_0x2254('0x1c')]({'where':{'role':_0x2254('0x1d')},'attributes':[_0x2254('0x1e'),'email'],'raw':!![]})[_0x2254('0x11')](function(_0x16148d){ADMIN=_0x16148d;_0xb05559+=_0x2254('0x1f')+_0x5ec98d+'|\x0a';_0xb05559+='|uuid|'+_0x497724+'|\x0a';_0xb05559+='|machineUuid|'+_0x51b395+'|\x0a';_0xb05559+='|name|'+ADMIN[_0x2254('0x1e')]+'|\x0a';_0xb05559+=_0x2254('0x20')+ADMIN[_0x2254('0x21')]+'|\x0a';return _0xb05559;})['then'](function(_0x5713e4){var _0x4d8faf=hardware['getFirstInterface']()['ipAddress'];return jira['openIssue']({'key':_0x2254('0x22'),'summary':_0x2254('0x23'),'description':_0x5713e4,'issuetype':_0x2254('0x24'),'oldToken':_0x497724,'newToken':_0x51b395,'email':ADMIN[_0x2254('0x21')],'name':ADMIN[_0x2254('0x1e')],'reason':GRAY_PERIOD_REASON,'ip':_0x4d8faf});});}function manageLicense(_0x1349c9,_0x51b578){var _0x4a8274=_0x51b578[_0x2254('0x25')]({'plain':!![]});httpRequest(_0x1349c9)['then'](function(_0x35608a){if(oldToken){oldToken=undefined;}if(_0x35608a[_0x2254('0x26')]){if(!_0x4a8274[_0x2254('0x9')]&&_0x4a8274[_0x2254('0x9')]!=_0x35608a[_0x2254('0x9')]||_0x4a8274['license']&&_0x4a8274[_0x2254('0x27')]){logger[_0x2254('0x28')](_0x2254('0x29'));}if(_0x4a8274[_0x2254('0x9')]&&!_0x4a8274[_0x2254('0x27')]&&_0x4a8274[_0x2254('0x9')]!=_0x35608a[_0x2254('0x9')]){logger[_0x2254('0x28')](_0x2254('0x2a'));}if(_0x4a8274[_0x2254('0x9')]&&!_0x4a8274[_0x2254('0x27')]&&_0x4a8274[_0x2254('0x9')]==_0x35608a[_0x2254('0x9')]){return _0x51b578;}return _0x51b578[_0x2254('0x15')]({'data1':_0x1349c9,'data2':null,'license':_0x35608a[_0x2254('0x9')]});}else{if(_0x35608a[_0x2254('0x9')]||_0x4a8274[_0x2254('0x9')]){if(!_0x4a8274[_0x2254('0x27')]){if(_0x4a8274[_0x2254('0x2b')]==_0x1349c9){GRAY_PERIOD_REASON='Disabled';logger[_0x2254('0x28')](_0x2254('0x2c'));}else{GRAY_PERIOD_REASON=_0x2254('0x2d');oldToken=_0x4a8274[_0x2254('0x2b')];logger[_0x2254('0x28')](_0x2254('0x2e'),_0x4a8274[_0x2254('0x2b')],_0x1349c9);}sendJiraAlert(_0x4a8274[_0x2254('0x2b')],_0x35608a[_0x2254('0x2f')],GRAY_PERIOD_REASON);logger['info'](_0x2254('0x30'),GRAY_PERIOD_REASON[_0x2254('0x31')](),moment()['format'](_0x2254('0x32')));return _0x51b578[_0x2254('0x15')]({'data2':encryptDate(moment()[_0x2254('0xb')](_0x2254('0x32')))});}else{if(moment()['diff'](decryptDate(_0x4a8274['data2']),_0x2254('0x33'))>DAYS){logger['info'](_0x2254('0x34'),moment()[_0x2254('0xb')](_0x2254('0x32')));return _0x51b578[_0x2254('0x15')]({'data1':_0x1349c9,'data2':null,'license':null});}}}else{if(_0x4a8274[_0x2254('0x2b')]!=_0x1349c9){logger[_0x2254('0x28')](_0x2254('0x2e'),_0x4a8274['data1'],_0x1349c9);return _0x51b578[_0x2254('0x15')]({'data1':_0x1349c9,'data2':null,'license':null});}}}return _0x51b578;})[_0x2254('0x11')](function(_0x32d2ea){_0x51b578=_0x32d2ea;})[_0x2254('0x35')](function(_0x17dc49){logger[_0x2254('0x36')](_0x17dc49[_0x2254('0x37')]);})[_0x2254('0x38')](function(){setTimeout(function(){manageLicense(hardware[_0x2254('0x39')](),_0x51b578);},TIME);});}function defaultLicense(){var _0x34543d=hardware['getUuid']();if(_0x34543d){return db[_0x2254('0x3a')][_0x2254('0x3b')]({'where':{'id':0x1},'defaults':{'data1':_0x34543d}})[_0x2254('0x3c')](function(_0x26b9b7,_0x4c7cc3){logger[_0x2254('0x28')](_0x2254('0x3d'),_0x34543d);manageLicense(_0x34543d,_0x26b9b7);})[_0x2254('0x35')](function(_0x144ae1){logger[_0x2254('0x36')](_0x144ae1[_0x2254('0x37')]);});}}exports[_0x2254('0x3e')]=defaultLicense;
\ No newline at end of file
diff --git a/server/config/license/util.js b/server/config/license/util.js
index 9bd126d..4e703fa 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 _0xd4b0=['split','createDecipher','aes-256-ctr','format','%s:%s:%s','base64','utf8','demo','machineUuid','getUuid','secrets','session','gray','deadline','add','days','grayReason','uuid','changed','disabled','2027-01-01T00:00:00.000Z','Breaking\x20license','message','getLicense','find','defaults','then','checkLicense','util','lodash','moment','./hardware','../environment','license','isEmpty','License\x20key\x20value\x20not\x20found','data1','data2'];(function(_0x3e5a98,_0x3b9d0f){var _0x566319=function(_0x262949){while(--_0x262949){_0x3e5a98['push'](_0x3e5a98['shift']());}};_0x566319(++_0x3b9d0f);}(_0xd4b0,0x198));var _0x0d4b=function(_0x99cb68,_0x512345){_0x99cb68=_0x99cb68-0x0;var _0x39c6eb=_0xd4b0[_0x99cb68];return _0x39c6eb;};'use strict';var crypto=require('crypto');var util=require(_0x0d4b('0x0'));var _=require(_0x0d4b('0x1'));var moment=require(_0x0d4b('0x2'));var hardware=require(_0x0d4b('0x3'));var config=require(_0x0d4b('0x4'));var db=require('../../mysqldb')['db'];function checkLicense(_0x410ad0,_0x985adc){if(_0x410ad0){try{var _0x3d4144=_0x985adc||_0x410ad0[_0x0d4b('0x5')];if(_[_0x0d4b('0x6')](_0x3d4144)){throw new Error(_0x0d4b('0x7'));}var _0x4a3aea=_0x410ad0[_0x0d4b('0x8')];var _0x11edd7=_0x410ad0[_0x0d4b('0x9')];var _0x4f59a8=_0x4a3aea[_0x0d4b('0xa')]('-')[0x4];var _0x2a5c50=_0x4a3aea[_0x0d4b('0xa')]('-')[0x0];var _0x48c62c=crypto[_0x0d4b('0xb')](_0x0d4b('0xc'),util[_0x0d4b('0xd')](_0x0d4b('0xe'),_0x4f59a8,_0x4a3aea,_0x2a5c50));var _0xf988a5=_0x48c62c['update'](_0x3d4144,_0x0d4b('0xf'),_0x0d4b('0x10'));_0xf988a5+=_0x48c62c['final'](_0x0d4b('0x10'));var _0x4f771c=JSON['parse'](_0xf988a5);_0x4f771c[_0x0d4b('0x11')]=![];_0x4f771c['uuid']=_0x4a3aea;_0x4f771c[_0x0d4b('0x12')]=hardware[_0x0d4b('0x13')]();if(_0x11edd7){var _0x52988c=crypto['createDecipher'](_0x0d4b('0xc'),config[_0x0d4b('0x14')][_0x0d4b('0x15')]);var _0x822dc6=_0x52988c['update'](_0x11edd7,'base64','utf8');_0x822dc6+=_0x52988c['final'](_0x0d4b('0x10'));_0x4f771c[_0x0d4b('0x16')]=_0x822dc6;_0x4f771c[_0x0d4b('0x17')]=moment(_0x822dc6)[_0x0d4b('0x18')](0x7,_0x0d4b('0x19'))[_0x0d4b('0xd')]();_0x4f771c[_0x0d4b('0x1a')]=_0x4f771c[_0x0d4b('0x1b')]!=_0x4f771c['machineUuid']?_0x0d4b('0x1c'):_0x0d4b('0x1d');}return _0x4f771c;}catch(_0x43c004){return{'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x0d4b('0x1e'),'chat':![],'mail':![],'fax':![],'messaging':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0x0d4b('0x1f'),'uuid':_0x410ad0['data1'],'machineUuid':hardware[_0x0d4b('0x13')](),'message':_0x43c004[_0x0d4b('0x20')],'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}}return{'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x0d4b('0x1e'),'chat':![],'mail':![],'fax':![],'messaging':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':'Demo\x20license','uuid':_0x410ad0[_0x0d4b('0x8')],'machineUuid':hardware[_0x0d4b('0x13')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}exports[_0x0d4b('0x21')]=function(_0x50a7bb){return db['License'][_0x0d4b('0x22')](_[_0x0d4b('0x23')](_0x50a7bb,{'raw':!![],'where':{'id':0x1}}))[_0x0d4b('0x24')](function(_0x2c16db){return checkLicense(_0x2c16db,null);});};exports[_0x0d4b('0x25')]=checkLicense;
\ No newline at end of file
+var _0x5449=['createDecipher','aes-256-ctr','format','update','final','utf8','parse','demo','machineUuid','getUuid','secrets','base64','gray','add','days','uuid','changed','disabled','2027-01-01T00:00:00.000Z','Breaking\x20license','message','Demo\x20license','getLicense','License','find','then','checkLicense','lodash','moment','./hardware','../../mysqldb','license','isEmpty','License\x20key\x20value\x20not\x20found','data1','split'];(function(_0x4cce93,_0xf52676){var _0x3d8d18=function(_0x4c041d){while(--_0x4c041d){_0x4cce93['push'](_0x4cce93['shift']());}};_0x3d8d18(++_0xf52676);}(_0x5449,0x15f));var _0x9544=function(_0x3207aa,_0xe86a72){_0x3207aa=_0x3207aa-0x0;var _0x51758f=_0x5449[_0x3207aa];return _0x51758f;};'use strict';var crypto=require('crypto');var util=require('util');var _=require(_0x9544('0x0'));var moment=require(_0x9544('0x1'));var hardware=require(_0x9544('0x2'));var config=require('../environment');var db=require(_0x9544('0x3'))['db'];function checkLicense(_0x5738c6,_0x386572){if(_0x5738c6){try{var _0x2de989=_0x386572||_0x5738c6[_0x9544('0x4')];if(_[_0x9544('0x5')](_0x2de989)){throw new Error(_0x9544('0x6'));}var _0x4c2b07=_0x5738c6[_0x9544('0x7')];var _0x4b6cc4=_0x5738c6['data2'];var _0x22cfee=_0x4c2b07[_0x9544('0x8')]('-')[0x4];var _0x5ad82a=_0x4c2b07[_0x9544('0x8')]('-')[0x0];var _0x5c6caf=crypto[_0x9544('0x9')](_0x9544('0xa'),util[_0x9544('0xb')]('%s:%s:%s',_0x22cfee,_0x4c2b07,_0x5ad82a));var _0x19281b=_0x5c6caf[_0x9544('0xc')](_0x2de989,'base64','utf8');_0x19281b+=_0x5c6caf[_0x9544('0xd')](_0x9544('0xe'));var _0x19f4b7=JSON[_0x9544('0xf')](_0x19281b);_0x19f4b7[_0x9544('0x10')]=![];_0x19f4b7['uuid']=_0x4c2b07;_0x19f4b7[_0x9544('0x11')]=hardware[_0x9544('0x12')]();if(_0x4b6cc4){var _0xbaef7b=crypto[_0x9544('0x9')]('aes-256-ctr',config[_0x9544('0x13')]['session']);var _0x16e090=_0xbaef7b[_0x9544('0xc')](_0x4b6cc4,_0x9544('0x14'),_0x9544('0xe'));_0x16e090+=_0xbaef7b[_0x9544('0xd')](_0x9544('0xe'));_0x19f4b7[_0x9544('0x15')]=_0x16e090;_0x19f4b7['deadline']=moment(_0x16e090)[_0x9544('0x16')](0x7,_0x9544('0x17'))[_0x9544('0xb')]();_0x19f4b7['grayReason']=_0x19f4b7[_0x9544('0x18')]!=_0x19f4b7[_0x9544('0x11')]?_0x9544('0x19'):_0x9544('0x1a');}return _0x19f4b7;}catch(_0x47b7e0){return{'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x9544('0x1b'),'chat':![],'mail':![],'fax':![],'messaging':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0x9544('0x1c'),'uuid':_0x5738c6[_0x9544('0x7')],'machineUuid':hardware[_0x9544('0x12')](),'message':_0x47b7e0[_0x9544('0x1d')],'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}}return{'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':![],'description':_0x9544('0x1e'),'uuid':_0x5738c6[_0x9544('0x7')],'machineUuid':hardware[_0x9544('0x12')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![]};}exports[_0x9544('0x1f')]=function(_0x2f7202){return db[_0x9544('0x20')][_0x9544('0x21')](_['defaults'](_0x2f7202,{'raw':!![],'where':{'id':0x1}}))[_0x9544('0x22')](function(_0x53d15f){return checkLicense(_0x53d15f,null);});};exports[_0x9544('0x23')]=checkLicense;
\ No newline at end of file
diff --git a/server/config/local.env.js b/server/config/local.env.js
index 0427e87..313e4fa 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 _0xf59f=['secret','exports','http://localhost:9000','myappanuglar-secret','app-id'];(function(_0x3e49fe,_0x552dba){var _0x150873=function(_0x88c188){while(--_0x88c188){_0x3e49fe['push'](_0x3e49fe['shift']());}};_0x150873(++_0x552dba);}(_0xf59f,0x182));var _0xff59=function(_0x3e919c,_0x4fcf35){_0x3e919c=_0x3e919c-0x0;var _0x313507=_0xf59f[_0x3e919c];return _0x313507;};'use strict';module[_0xff59('0x0')]={'DOMAIN':_0xff59('0x1'),'SESSION_SECRET':_0xff59('0x2'),'GOOGLE_ID':_0xff59('0x3'),'GOOGLE_SECRET':_0xff59('0x4'),'DEBUG':''};
\ No newline at end of file
+var _0x1226=['http://localhost:9000','myappanuglar-secret','app-id','secret','exports'];(function(_0x1b391d,_0x520bf6){var _0x2ab6aa=function(_0x837571){while(--_0x837571){_0x1b391d['push'](_0x1b391d['shift']());}};_0x2ab6aa(++_0x520bf6);}(_0x1226,0x1c1));var _0x6122=function(_0xba3d5a,_0x356a7b){_0xba3d5a=_0xba3d5a-0x0;var _0x4809d5=_0x1226[_0xba3d5a];return _0x4809d5;};'use strict';module[_0x6122('0x0')]={'DOMAIN':_0x6122('0x1'),'SESSION_SECRET':_0x6122('0x2'),'GOOGLE_ID':_0x6122('0x3'),'GOOGLE_SECRET':_0x6122('0x4'),'DEBUG':''};
\ No newline at end of file
diff --git a/server/config/logger.js b/server/config/logger.js
index 49a7d16..6b9b3e3 100644
--- a/server/config/logger.js
+++ b/server/config/logger.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x028a=['File','%s-%s','error','info','Console','env','debugLevel','moment','winston','util','path','INFO','join','log','xcally','format','%s-%s.log','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','level','toUpperCase','exports','Logger','transports'];(function(_0x1e1efb,_0x5a19b6){var _0x22fc3e=function(_0x2dde0a){while(--_0x2dde0a){_0x1e1efb['push'](_0x1e1efb['shift']());}};_0x22fc3e(++_0x5a19b6);}(_0x028a,0xdf));var _0xa028=function(_0x28a2a6,_0x1b8c56){_0x28a2a6=_0x28a2a6-0x0;var _0x560b55=_0x028a[_0x28a2a6];return _0x560b55;};'use strict';var moment=require(_0xa028('0x0'));var winston=require(_0xa028('0x1'));var util=require(_0xa028('0x2'));var path=require(_0xa028('0x3'));var debugLevel=_0xa028('0x4');function filename(_0x31b663,_0x214d46){return path[_0xa028('0x5')]('/var',_0xa028('0x6'),_0xa028('0x7'),util[_0xa028('0x8')](_0xa028('0x9'),_0x31b663,_0x214d46));}function formatter(_0xb3cfe,_0x314b61){return util['format'](_0xa028('0xa'),moment()[_0xa028('0x8')](_0xa028('0xb')),_0x314b61[_0xa028('0xc')][_0xa028('0xd')](),_0xb3cfe,_0x314b61['message']);}module[_0xa028('0xe')]=function(_0x3f1c83){return new winston[(_0xa028('0xf'))]({'transports':[new winston[(_0xa028('0x10'))][(_0xa028('0x11'))]({'name':util['format'](_0xa028('0x12'),_0x3f1c83,'error'),'filename':filename(_0x3f1c83,_0xa028('0x13')),'level':_0xa028('0x13'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x506622){return formatter(_0x3f1c83,_0x506622);}}),new winston['transports'][(_0xa028('0x11'))]({'name':util[_0xa028('0x8')](_0xa028('0x12'),_0x3f1c83,_0xa028('0x14')),'filename':filename(_0x3f1c83,_0xa028('0x14')),'level':_0xa028('0x14'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x4928aa){return formatter(_0x3f1c83,_0x4928aa);}}),new winston[(_0xa028('0x10'))][(_0xa028('0x15'))]({'level':process[_0xa028('0x16')][_0xa028('0x17')]||debugLevel,'json':![],'formatter':function(_0x166bb4){return formatter(_0x3f1c83,_0x166bb4);}})]});};
\ No newline at end of file
+var _0x2821=['path','/var','log','xcally','%s-%s.log','format','level','toUpperCase','message','exports','Logger','%s-%s','error','File','info','transports','env','debugLevel','moment','util'];(function(_0x188f91,_0x279508){var _0x27ccd9=function(_0x3a1001){while(--_0x3a1001){_0x188f91['push'](_0x188f91['shift']());}};_0x27ccd9(++_0x279508);}(_0x2821,0x166));var _0x1282=function(_0x142da5,_0xcd1a46){_0x142da5=_0x142da5-0x0;var _0x727fb5=_0x2821[_0x142da5];return _0x727fb5;};'use strict';var moment=require(_0x1282('0x0'));var winston=require('winston');var util=require(_0x1282('0x1'));var path=require(_0x1282('0x2'));var debugLevel='INFO';function filename(_0x47c3bd,_0x1920db){return path['join'](_0x1282('0x3'),_0x1282('0x4'),_0x1282('0x5'),util['format'](_0x1282('0x6'),_0x47c3bd,_0x1920db));}function formatter(_0x14758d,_0x20175a){return util[_0x1282('0x7')]('[%s]\x20[%s]\x20%s\x20-\x20%s',moment()[_0x1282('0x7')]('YYYY-MM-DD\x20HH:mm:ss'),_0x20175a[_0x1282('0x8')][_0x1282('0x9')](),_0x14758d,_0x20175a[_0x1282('0xa')]);}module[_0x1282('0xb')]=function(_0x5d732a){return new winston[(_0x1282('0xc'))]({'transports':[new winston['transports']['File']({'name':util[_0x1282('0x7')](_0x1282('0xd'),_0x5d732a,_0x1282('0xe')),'filename':filename(_0x5d732a,_0x1282('0xe')),'level':_0x1282('0xe'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0xa57916){return formatter(_0x5d732a,_0xa57916);}}),new winston['transports'][(_0x1282('0xf'))]({'name':util['format'](_0x1282('0xd'),_0x5d732a,_0x1282('0x10')),'filename':filename(_0x5d732a,_0x1282('0x10')),'level':_0x1282('0x10'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x113e50){return formatter(_0x5d732a,_0x113e50);}}),new winston[(_0x1282('0x11'))]['Console']({'level':process[_0x1282('0x12')][_0x1282('0x13')]||debugLevel,'json':![],'formatter':function(_0x6b38e4){return formatter(_0x5d732a,_0x6b38e4);}})]});};
\ No newline at end of file
diff --git a/server/config/pm2/config.js b/server/config/pm2/config.js
index 52898e6..0d58cea 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 _0x24d3=['routing','../../services/routing/index.js','../../services/xdr/index.js','path','express','join','../../services/express/index.js','ami','../../services/ami/index.js','agi','../../services/agi/index.js','../../services/email/index.js'];(function(_0x2be0e6,_0x5c666d){var _0x58c903=function(_0x3a5d1c){while(--_0x3a5d1c){_0x2be0e6['push'](_0x2be0e6['shift']());}};_0x58c903(++_0x5c666d);}(_0x24d3,0xcf));var _0x324d=function(_0x5ec548,_0xf21387){_0x5ec548=_0x5ec548-0x0;var _0x4093fb=_0x24d3[_0x5ec548];return _0x4093fb;};'use strict';var path=require(_0x324d('0x0'));var os=require('os');var config={'apps':[{'name':_0x324d('0x1'),'script':path[_0x324d('0x2')](__dirname,_0x324d('0x3'))},{'name':_0x324d('0x4'),'script':path[_0x324d('0x2')](__dirname,_0x324d('0x5'))},{'name':_0x324d('0x6'),'script':path['join'](__dirname,_0x324d('0x7'))},{'name':'email','script':path[_0x324d('0x2')](__dirname,_0x324d('0x8'))},{'name':_0x324d('0x9'),'script':path[_0x324d('0x2')](__dirname,_0x324d('0xa'))},{'name':'xdr','script':path[_0x324d('0x2')](__dirname,_0x324d('0xb'))}]};module['exports']=config;
\ No newline at end of file
+var _0xc94e=['../../services/express/index.js','ami','../../services/agi/index.js','../../services/email/index.js','routing','../../services/xdr/index.js','path','join'];(function(_0xec61e8,_0x30ea78){var _0x5c256b=function(_0x44ad65){while(--_0x44ad65){_0xec61e8['push'](_0xec61e8['shift']());}};_0x5c256b(++_0x30ea78);}(_0xc94e,0x76));var _0xec94=function(_0x7ced0c,_0x45a052){_0x7ced0c=_0x7ced0c-0x0;var _0x5217b6=_0xc94e[_0x7ced0c];return _0x5217b6;};'use strict';var path=require(_0xec94('0x0'));var os=require('os');var config={'apps':[{'name':'express','script':path[_0xec94('0x1')](__dirname,_0xec94('0x2'))},{'name':_0xec94('0x3'),'script':path['join'](__dirname,'../../services/ami/index.js')},{'name':'agi','script':path[_0xec94('0x1')](__dirname,_0xec94('0x4'))},{'name':'email','script':path[_0xec94('0x1')](__dirname,_0xec94('0x5'))},{'name':_0xec94('0x6'),'script':path['join'](__dirname,'../../services/routing/index.js')},{'name':'xdr','script':path[_0xec94('0x1')](__dirname,_0xec94('0x7'))}]};module['exports']=config;
\ No newline at end of file
diff --git a/server/config/pm2/index.js b/server/config/pm2/index.js
index deda6c3..97b0289 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 _0x7676=['dump','saved','pm2','bluebird','./config','connected','then','start','stop','disconnect','restart','list','describe','delete'];(function(_0x287059,_0x499940){var _0x225c79=function(_0x3aa36e){while(--_0x3aa36e){_0x287059['push'](_0x287059['shift']());}};_0x225c79(++_0x499940);}(_0x7676,0xb8));var _0x6767=function(_0x27c3ab,_0x19307b){_0x27c3ab=_0x27c3ab-0x0;var _0x3e84fd=_0x7676[_0x27c3ab];return _0x3e84fd;};'use strict';var pm2=require(_0x6767('0x0'));var BPromise=require(_0x6767('0x1'));var config=require(_0x6767('0x2'));function connect(){return new BPromise(function(_0x5550f4,_0x38ffba){return pm2['connect'](function(_0x51f099){if(_0x51f099){return _0x38ffba(_0x51f099);}return _0x5550f4(_0x6767('0x3'));});});};exports['start']=function(_0x4005ff){return connect()[_0x6767('0x4')](function(){return new BPromise(function(_0x3e0c16,_0x4d0c08){return pm2[_0x6767('0x5')](_0x4005ff,function(_0x3f61f5,_0x211a93){if(_0x3f61f5){return _0x4d0c08(_0x3f61f5);}pm2['disconnect']();return _0x3e0c16(_0x211a93);});});});};exports[_0x6767('0x6')]=function(_0x31366b){return connect()[_0x6767('0x4')](function(){return new BPromise(function(_0x343933,_0xbda9c9){return pm2[_0x6767('0x6')](_0x31366b,function(_0x2d5260,_0x94cf0d){if(_0x2d5260){return _0xbda9c9(_0x2d5260);}pm2[_0x6767('0x7')]();return _0x343933(_0x94cf0d);});});});};exports[_0x6767('0x8')]=function(_0x27f0ad){return connect()[_0x6767('0x4')](function(){return new BPromise(function(_0x47b7a4,_0x462927){return pm2[_0x6767('0x8')](_0x27f0ad,function(_0xa6edf,_0x4968aa){if(_0xa6edf){return _0x462927(_0xa6edf);}pm2['disconnect']();return _0x47b7a4(_0x4968aa);});});});};exports[_0x6767('0x9')]=function(){return connect()[_0x6767('0x4')](function(){return new BPromise(function(_0x563654,_0x109507){return pm2[_0x6767('0x9')](function(_0x51f1b0,_0x259320){if(_0x51f1b0){return _0x109507(_0x51f1b0);}pm2[_0x6767('0x7')]();return _0x563654(_0x259320);});});});};exports[_0x6767('0xa')]=function(_0x4079c7){return connect()['then'](function(){return new BPromise(function(_0x428d2c,_0x49b65f){return pm2[_0x6767('0xa')](_0x4079c7,function(_0x1598e8,_0x475194){if(_0x1598e8){return _0x49b65f(_0x1598e8);}pm2['disconnect']();return _0x428d2c(_0x475194);});});});};exports[_0x6767('0xb')]=function(_0x4d3499){return connect()[_0x6767('0x4')](function(){return new BPromise(function(_0x54568f,_0x3c309f){return pm2['delete'](_0x4d3499,function(_0x47e032,_0x9cad4d){if(_0x47e032){return _0x3c309f(_0x47e032);}pm2[_0x6767('0x7')]();return _0x54568f(_0x9cad4d);});});});};exports['dump']=function(){return connect()[_0x6767('0x4')](function(){return new BPromise(function(_0x234676,_0x58a483){return pm2[_0x6767('0xc')](function(_0x4a89c5){if(_0x4a89c5){return _0x58a483(_0x4a89c5);}return _0x234676(_0x6767('0xd'));});});});};
\ No newline at end of file
+var _0x98a8=['restart','list','describe','delete','dump','saved','pm2','bluebird','./config','connect','start','then','disconnect','stop'];(function(_0x215f20,_0x10e56d){var _0x22b34b=function(_0x280974){while(--_0x280974){_0x215f20['push'](_0x215f20['shift']());}};_0x22b34b(++_0x10e56d);}(_0x98a8,0x12c));var _0x898a=function(_0x4be29f,_0x2ab8d7){_0x4be29f=_0x4be29f-0x0;var _0x20e1ce=_0x98a8[_0x4be29f];return _0x20e1ce;};'use strict';var pm2=require(_0x898a('0x0'));var BPromise=require(_0x898a('0x1'));var config=require(_0x898a('0x2'));function connect(){return new BPromise(function(_0x4583d9,_0x213c5d){return pm2[_0x898a('0x3')](function(_0x69c61f){if(_0x69c61f){return _0x213c5d(_0x69c61f);}return _0x4583d9('connected');});});};exports[_0x898a('0x4')]=function(_0xf84a19){return connect()[_0x898a('0x5')](function(){return new BPromise(function(_0x101b7b,_0x3e7ddd){return pm2['start'](_0xf84a19,function(_0x3aadc2,_0x564583){if(_0x3aadc2){return _0x3e7ddd(_0x3aadc2);}pm2[_0x898a('0x6')]();return _0x101b7b(_0x564583);});});});};exports['stop']=function(_0x42021d){return connect()[_0x898a('0x5')](function(){return new BPromise(function(_0x2101b3,_0x96b636){return pm2[_0x898a('0x7')](_0x42021d,function(_0x388a47,_0x42faa4){if(_0x388a47){return _0x96b636(_0x388a47);}pm2[_0x898a('0x6')]();return _0x2101b3(_0x42faa4);});});});};exports[_0x898a('0x8')]=function(_0x5d2de4){return connect()[_0x898a('0x5')](function(){return new BPromise(function(_0x502e95,_0x30257f){return pm2['restart'](_0x5d2de4,function(_0x25d7f2,_0x2c76b7){if(_0x25d7f2){return _0x30257f(_0x25d7f2);}pm2[_0x898a('0x6')]();return _0x502e95(_0x2c76b7);});});});};exports['list']=function(){return connect()['then'](function(){return new BPromise(function(_0x5b5c9c,_0x373d53){return pm2[_0x898a('0x9')](function(_0xb24335,_0x116fbe){if(_0xb24335){return _0x373d53(_0xb24335);}pm2[_0x898a('0x6')]();return _0x5b5c9c(_0x116fbe);});});});};exports[_0x898a('0xa')]=function(_0x506023){return connect()[_0x898a('0x5')](function(){return new BPromise(function(_0x53a4b8,_0x3fec7a){return pm2['describe'](_0x506023,function(_0x303321,_0x4fb05b){if(_0x303321){return _0x3fec7a(_0x303321);}pm2[_0x898a('0x6')]();return _0x53a4b8(_0x4fb05b);});});});};exports['delete']=function(_0xee4408){return connect()[_0x898a('0x5')](function(){return new BPromise(function(_0x28cc63,_0x4ddd4d){return pm2[_0x898a('0xb')](_0xee4408,function(_0x5960e0,_0x54c8f3){if(_0x5960e0){return _0x4ddd4d(_0x5960e0);}pm2[_0x898a('0x6')]();return _0x28cc63(_0x54c8f3);});});});};exports[_0x898a('0xc')]=function(){return connect()['then'](function(){return new BPromise(function(_0x4d374b,_0x12bc0f){return pm2[_0x898a('0xc')](function(_0x38a8f0){if(_0x38a8f0){return _0x12bc0f(_0x38a8f0);}return _0x4d374b(_0x898a('0xd'));});});});};
\ No newline at end of file
diff --git a/server/config/schedule/chat.js b/server/config/schedule/chat.js
index 9a839b7..090c16e 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 _0x1a5a=['error','lodash','moment','ioredis','../../mysqldb','../../config/environment','defaults','redis','localhost','socket.io-emitter','Setting','chatTimeout','then','ChatInteraction','findAll','minutes','update','system','timeout','format','YYYY-MM-DD\x20HH:mm:ss','map','length','emit','chatInteraction:update'];(function(_0x29de0f,_0x3b1f9d){var _0x46a9c5=function(_0x24fc1a){while(--_0x24fc1a){_0x29de0f['push'](_0x29de0f['shift']());}};_0x46a9c5(++_0x3b1f9d);}(_0x1a5a,0x7e));var _0xa1a5=function(_0x11a465,_0x4efd98){_0x11a465=_0x11a465-0x0;var _0x36f5b7=_0x1a5a[_0x11a465];return _0x36f5b7;};'use strict';var _=require(_0xa1a5('0x0'));var moment=require(_0xa1a5('0x1'));var Redis=require(_0xa1a5('0x2'));var db=require(_0xa1a5('0x3'))['db'];var config=require(_0xa1a5('0x4'));config['redis']=_[_0xa1a5('0x5')](config[_0xa1a5('0x6')],{'host':_0xa1a5('0x7'),'port':0x18eb});var io=require(_0xa1a5('0x8'))(new Redis(config[_0xa1a5('0x6')]));function closeInteractions(){var _0xd81363=0x0;var _0x1fd95b=[];return db[_0xa1a5('0x9')]['find']({'raw':!![],'attributes':['id',_0xa1a5('0xa')],'where':{'id':0x1}})[_0xa1a5('0xb')](function(_0x2c1ea3){_0xd81363=_0x2c1ea3[_0xa1a5('0xa')];if(_0xd81363){return db[_0xa1a5('0xc')][_0xa1a5('0xd')]({'raw':!![],'attributes':['id','lastMsgAt'],'where':{'closed':![],'lastMsgAt':{'$lt':moment()['subtract'](_0x2c1ea3[_0xa1a5('0xa')],_0xa1a5('0xe'))}}});}else{return[];}})[_0xa1a5('0xb')](function(_0x5816a3){_0x1fd95b=_0x5816a3;if(_0xd81363){return db[_0xa1a5('0xc')][_0xa1a5('0xf')]({'closeReason':_0xa1a5('0x10'),'disposition':_0xa1a5('0x11'),'closed':!![],'closedAt':moment()[_0xa1a5('0x12')](_0xa1a5('0x13'))},{'where':{'id':_[_0xa1a5('0x14')](_0x1fd95b||[],'id')}});}})['then'](function(_0x2d4e5d){for(var _0xe117d8=0x0;_0xe117d8<_0x1fd95b[_0xa1a5('0x15')];_0xe117d8++){io[_0xa1a5('0x16')](_0xa1a5('0x17'),{'id':_0x1fd95b[_0xe117d8]['id'],'closed':!![]});}})['catch'](function(_0x48fe00){console[_0xa1a5('0x18')](_0x48fe00);});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
+var _0x19b9=['lodash','moment','ioredis','../../mysqldb','../../config/environment','defaults','localhost','redis','Setting','chatTimeout','then','ChatInteraction','lastMsgAt','subtract','minutes','update','system','YYYY-MM-DD\x20HH:mm:ss','map','error','start'];(function(_0xdea41a,_0x552987){var _0x15d0d8=function(_0x1e0d0b){while(--_0x1e0d0b){_0xdea41a['push'](_0xdea41a['shift']());}};_0x15d0d8(++_0x552987);}(_0x19b9,0x1a4));var _0x919b=function(_0x2ccca0,_0x30b9ac){_0x2ccca0=_0x2ccca0-0x0;var _0x24eac3=_0x19b9[_0x2ccca0];return _0x24eac3;};'use strict';var _=require(_0x919b('0x0'));var moment=require(_0x919b('0x1'));var Redis=require(_0x919b('0x2'));var db=require(_0x919b('0x3'))['db'];var config=require(_0x919b('0x4'));config['redis']=_[_0x919b('0x5')](config['redis'],{'host':_0x919b('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x919b('0x7')]));function closeInteractions(){var _0x499e83=0x0;var _0x320c44=[];return db[_0x919b('0x8')]['find']({'raw':!![],'attributes':['id',_0x919b('0x9')],'where':{'id':0x1}})[_0x919b('0xa')](function(_0x2e1c9a){_0x499e83=_0x2e1c9a[_0x919b('0x9')];if(_0x499e83){return db[_0x919b('0xb')]['findAll']({'raw':!![],'attributes':['id',_0x919b('0xc')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x919b('0xd')](_0x2e1c9a[_0x919b('0x9')],_0x919b('0xe'))}}});}else{return[];}})['then'](function(_0x59b589){_0x320c44=_0x59b589;if(_0x499e83){return db[_0x919b('0xb')][_0x919b('0xf')]({'closeReason':_0x919b('0x10'),'disposition':'timeout','closed':!![],'closedAt':moment()['format'](_0x919b('0x11'))},{'where':{'id':_[_0x919b('0x12')](_0x320c44||[],'id')}});}})[_0x919b('0xa')](function(_0x333e51){for(var _0x39e05b=0x0;_0x39e05b<_0x320c44['length'];_0x39e05b++){io['emit']('chatInteraction:update',{'id':_0x320c44[_0x39e05b]['id'],'closed':!![]});}})['catch'](function(_0x6f816d){console[_0x919b('0x13')](_0x6f816d);});}exports[_0x919b('0x14')]=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 3e46adf..5ab80b4 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 _0xe798=['cron-job-manager','jayson/promise','bluebird','../logger','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','info','email','MailAccount','Smtp','service','host','port','auth','user','pass','format','\x22%s\x22\x20<%s>','name','bcc','subtractNumber','subtractUnit','../../files/reports','savename','%s.%s','basename','extname','zip','join','existsSync','message','attachments','text','Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a','status','Sent','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','request','then','error','error\x20mail','stringify','email\x20sent','catch','data','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','scheduled','output','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','CustomReportId','no\x20report\x20id','Schedule','keys','toString','keyBy','difference','intersection','length','exists','deleteJob','delete\x20cron','toRun','index','my\x20id','resolve','run\x20job','cron','active','isBetween','startAt','endAt','add','start','stop','stop\x20cron','update\x20cron','run','util','path','lodash','moment'];(function(_0xfd1325,_0x3d389a){var _0x536acf=function(_0x939c44){while(--_0x939c44){_0xfd1325['push'](_0xfd1325['shift']());}};_0x536acf(++_0x3d389a);}(_0xe798,0x158));var _0x8e79=function(_0x57c812,_0x4b5776){_0x57c812=_0x57c812-0x0;var _0x574950=_0xe798[_0x57c812];return _0x574950;};'use strict';var fs=require('fs');var util=require(_0x8e79('0x0'));var path=require(_0x8e79('0x1'));var _=require(_0x8e79('0x2'));var moment=require(_0x8e79('0x3'));var CronJobManager=require(_0x8e79('0x4'));var jayson=require(_0x8e79('0x5'));var BPromise=require(_0x8e79('0x6'));var logger=require(_0x8e79('0x7'))('schedule');var db=require(_0x8e79('0x8'))['db'];var analyticCustomReportController=require(_0x8e79('0x9'));var analyticDefaultReportController=require(_0x8e79('0xa'));var client=jayson['client']['http']({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x55f62d,_0x135bb3){return function(){logger[_0x8e79('0xb')]('Try\x20to\x20send\x20a\x20mail\x20to',_0x55f62d[_0x8e79('0xc')]);var _0x1ba20b=!![];var _0x2a92a1={'tls':{'rejectUnauthorized':![]}};if(_0x55f62d[_0x8e79('0xd')][_0x8e79('0xe')][_0x8e79('0xf')]){_0x2a92a1['service']=_0x55f62d[_0x8e79('0xd')][_0x8e79('0xe')][_0x8e79('0xf')];}else{_0x2a92a1[_0x8e79('0x10')]=_0x55f62d[_0x8e79('0xd')][_0x8e79('0xe')][_0x8e79('0x10')];_0x2a92a1[_0x8e79('0x11')]=_0x55f62d['MailAccount'][_0x8e79('0xe')][_0x8e79('0x11')];_0x2a92a1['secure']=_0x55f62d[_0x8e79('0xd')][_0x8e79('0xe')]['secure'];}if(_0x55f62d['MailAccount']['Smtp']['authentication']){_0x2a92a1[_0x8e79('0x12')]={'user':_0x55f62d['MailAccount'][_0x8e79('0xe')][_0x8e79('0x13')],'pass':_0x55f62d[_0x8e79('0xd')]['Smtp'][_0x8e79('0x14')]};}var _0xc7b60b={'account':_0x2a92a1,'message':{'from':util[_0x8e79('0x15')](_0x8e79('0x16'),_0x55f62d['MailAccount'][_0x8e79('0x17')],_0x55f62d[_0x8e79('0xd')]['email']||_0x55f62d[_0x8e79('0xd')][_0x8e79('0xe')][_0x8e79('0x13')]),'to':_0x55f62d[_0x8e79('0xc')],'cc':_0x55f62d['cc'],'bcc':_0x55f62d[_0x8e79('0x18')],'subject':util[_0x8e79('0x15')]('Report\x20%s\x20last\x20%s\x20%s',_0x135bb3[_0x8e79('0x17')],_0x55f62d[_0x8e79('0x19')],_0x55f62d[_0x8e79('0x1a')])}};var _0x452472=path['join'](__dirname,_0x8e79('0x1b'));var _0x5579c1=_0x135bb3[_0x8e79('0x1c')];var _0x172fa9=util[_0x8e79('0x15')](_0x8e79('0x1d'),path[_0x8e79('0x1e')](_0x135bb3[_0x8e79('0x1c')],path[_0x8e79('0x1f')](_0x135bb3['savename'])),_0x8e79('0x20'));var _0x25b333=path[_0x8e79('0x21')](_0x452472,_0x5579c1);var _0x451b05=path['join'](_0x452472,_0x172fa9);if(fs[_0x8e79('0x22')](_0x25b333)){_0x135bb3['status']='Sent';_0xc7b60b[_0x8e79('0x23')][_0x8e79('0x24')]=[{'filename':_0x5579c1,'path':_0x25b333}];_0xc7b60b[_0x8e79('0x23')][_0x8e79('0x25')]=util[_0x8e79('0x15')](_0x8e79('0x26'),JSON['stringify'](_0x135bb3,null,0x2));}else if(fs['existsSync'](_0x451b05)){_0x135bb3[_0x8e79('0x27')]=_0x8e79('0x28');_0xc7b60b[_0x8e79('0x23')][_0x8e79('0x24')]=[{'filename':_0x172fa9,'path':_0x451b05}];}else{_0xc7b60b[_0x8e79('0x23')][_0x8e79('0x25')]=_0x8e79('0x29');if(!_0x55f62d['sendIfEmpty']){_0x1ba20b=![];logger[_0x8e79('0xb')]('empty\x20file,\x20email\x20not\x20sent');}}if(_0x1ba20b){return client[_0x8e79('0x2a')]('SendMail',_0xc7b60b)[_0x8e79('0x2b')](function(_0x320fa0){if(_0x320fa0[_0x8e79('0x2c')]){return logger[_0x8e79('0x2c')](_0x8e79('0x2d'),JSON[_0x8e79('0x2e')](_0x320fa0));}return logger[_0x8e79('0xb')](_0x8e79('0x2f'));})[_0x8e79('0x30')](function(_0x56a456){return logger['error']('error\x20mail',JSON[_0x8e79('0x2e')](_0x56a456));});}};}function handleError(){return function(_0x5d8bc9){return logger[_0x8e79('0x2c')](JSON[_0x8e79('0x2e')](_0x5d8bc9));};}function handleResult(_0x3bff6a){return function(_0x1fe62c){logger[_0x8e79('0xb')](_0x8e79('0x31'),JSON[_0x8e79('0x2e')](_0x1fe62c));if(_0x3bff6a[_0x8e79('0xd')]&&_0x3bff6a['MailAccount']['Smtp']&&!_[_0x8e79('0x32')](_0x3bff6a[_0x8e79('0xc')])){setTimeout(handleSendEmail(_0x3bff6a,_0x1fe62c),0x3c*0x3e8);}};}function handleJob(_0x11fb33){return function(){try{if(_[_0x8e79('0x32')](_0x11fb33[_0x8e79('0x19')])){return logger[_0x8e79('0xb')](_0x8e79('0x33'));}if(_[_0x8e79('0x32')](_0x11fb33[_0x8e79('0x1a')])){return logger[_0x8e79('0xb')](_0x8e79('0x34'));}var _0x1775db={'startDate':moment()['subtract'](_0x11fb33['subtractNumber'],_0x11fb33[_0x8e79('0x1a')])['format'](_0x8e79('0x35')),'endDate':moment()[_0x8e79('0x15')]('YYYY-MM-DD\x20HH:mm:ss'),'type':_0x8e79('0x36'),'output':_0x11fb33[_0x8e79('0x37')],'name':_0x11fb33[_0x8e79('0x17')]};if(!_[_0x8e79('0x32')](_0x11fb33[_0x8e79('0x38')])){logger['info'](_0x8e79('0x39'),_0x11fb33[_0x8e79('0x38')]);return analyticDefaultReportController[_0x8e79('0x3a')]({'id':_0x11fb33['DefaultReportId']},_0x1775db)['then'](handleResult(_0x11fb33))['catch'](handleError());}if(!_[_0x8e79('0x32')](_0x11fb33[_0x8e79('0x3b')])){logger[_0x8e79('0xb')]('exec\x20custom\x20report\x20id:%s',_0x11fb33[_0x8e79('0x3b')]);return analyticCustomReportController[_0x8e79('0x3a')]({'id':_0x11fb33['CustomReportId']},_0x1775db)[_0x8e79('0x2b')](handleResult(_0x11fb33))[_0x8e79('0x30')](handleError());}}catch(_0x38f84){logger[_0x8e79('0x2c')](JSON['stringify'](_0x38f84));}return logger[_0x8e79('0xb')](_0x8e79('0x3c'));};}function getJobs(_0x2084ca){var _0x5bf976={};if(_0x2084ca){_0x5bf976['id']=_0x2084ca;}return db[_0x8e79('0x3d')]['findAll']({'where':_0x5bf976,'include':[{'model':db[_0x8e79('0xd')],'attributes':['id',_0x8e79('0x17'),_0x8e79('0xc')],'include':[{'model':db['MailServerOut'],'as':_0x8e79('0xe')}]}]})[_0x8e79('0x2b')](function(_0x14f9be){var _0x51d7ee=_[_0x8e79('0x3e')](manager['jobs']);var _0x550092=_['map'](_0x14f9be,function(_0x451e51){return _0x451e51['id'][_0x8e79('0x3f')]();});var _0x1e94ef=_[_0x8e79('0x40')](_0x14f9be,function(_0x3d37a4){return _0x3d37a4['id'][_0x8e79('0x3f')]();});var _0x4c30e4=_0x2084ca?_0x550092:_[_0x8e79('0x41')](_0x550092,_0x51d7ee);var _0x2c3b68=_[_0x8e79('0x42')](_0x550092,_0x51d7ee);var _0x24f2a5=_[_0x8e79('0x41')](_0x51d7ee,_0x550092);var _0x5ea56b;var _0x4cfb8f;for(_0x5ea56b=0x0;_0x5ea56b<_0x24f2a5[_0x8e79('0x43')]&&!_0x2084ca;_0x5ea56b+=0x1){_0x4cfb8f=_0x24f2a5[_0x5ea56b][_0x8e79('0x3f')]();if(manager[_0x8e79('0x44')](_0x4cfb8f)){manager['stop'](_0x4cfb8f);manager[_0x8e79('0x45')](_0x4cfb8f);logger[_0x8e79('0xb')](_0x8e79('0x46'),_0x4cfb8f);}}logger[_0x8e79('0xb')](_0x8e79('0x47'),JSON['stringify'](_0x4c30e4));for(_0x5ea56b=0x0;_0x5ea56b<_0x4c30e4[_0x8e79('0x43')];_0x5ea56b+=0x1){_0x4cfb8f=_0x4c30e4[_0x5ea56b][_0x8e79('0x3f')]();logger[_0x8e79('0xb')](_0x8e79('0x48'),_0x4cfb8f);if(_0x2084ca){logger[_0x8e79('0xb')](_0x8e79('0x49'),_0x2084ca);logger[_0x8e79('0xb')](JSON[_0x8e79('0x2e')](_0x1e94ef[_0x4cfb8f]));BPromise[_0x8e79('0x4a')]()['then'](handleJob(_0x1e94ef[_0x4cfb8f]));logger[_0x8e79('0xb')](_0x8e79('0x4b'),_0x1e94ef[_0x4cfb8f][_0x8e79('0x17')],_0x1e94ef[_0x4cfb8f][_0x8e79('0x4c')]);}else if(_0x1e94ef[_0x4cfb8f][_0x8e79('0x4c')]&&_0x1e94ef[_0x4cfb8f][_0x8e79('0x4d')]&&moment()[_0x8e79('0x4e')](_0x1e94ef[_0x4cfb8f][_0x8e79('0x4f')],_0x1e94ef[_0x4cfb8f][_0x8e79('0x50')])){manager[_0x8e79('0x51')](_0x4cfb8f,_0x1e94ef[_0x4cfb8f][_0x8e79('0x4c')],handleJob(_0x1e94ef[_0x4cfb8f]));manager[_0x8e79('0x52')](_0x4cfb8f);logger[_0x8e79('0xb')]('add\x20cron',_0x1e94ef[_0x4cfb8f][_0x8e79('0x17')],_0x1e94ef[_0x4cfb8f][_0x8e79('0x4c')]);}else if(manager['exists'](_0x4cfb8f)){manager[_0x8e79('0x53')](_0x4cfb8f);manager[_0x8e79('0x45')](_0x4cfb8f);logger[_0x8e79('0xb')](_0x8e79('0x54'),_0x1e94ef[_0x4cfb8f][_0x8e79('0x17')],_0x1e94ef[_0x4cfb8f][_0x8e79('0x4c')]);}}for(_0x5ea56b=0x0,_0x4cfb8f;_0x5ea56b<_0x2c3b68['length']&&!_0x2084ca;_0x5ea56b+=0x1){_0x4cfb8f=_0x2c3b68[_0x5ea56b][_0x8e79('0x3f')]();if(manager[_0x8e79('0x44')](_0x4cfb8f)){if(_0x1e94ef[_0x4cfb8f]['cron']&&_0x1e94ef[_0x4cfb8f][_0x8e79('0x4d')]&&moment()[_0x8e79('0x4e')](_0x1e94ef[_0x4cfb8f][_0x8e79('0x4f')],_0x1e94ef[_0x4cfb8f]['endAt'])){manager['update'](_0x4cfb8f,_0x1e94ef[_0x4cfb8f][_0x8e79('0x4c')],handleJob(_0x1e94ef[_0x4cfb8f]));logger[_0x8e79('0xb')](_0x8e79('0x55'),_0x1e94ef[_0x4cfb8f][_0x8e79('0x17')],_0x1e94ef[_0x4cfb8f][_0x8e79('0x4c')]);}else{manager[_0x8e79('0x53')](_0x4cfb8f);manager['deleteJob'](_0x4cfb8f);logger['info'](_0x8e79('0x54'),_0x1e94ef[_0x4cfb8f][_0x8e79('0x17')],_0x1e94ef[_0x4cfb8f]['cron']);}}}})['catch'](function(_0x210648){logger[_0x8e79('0x2c')](JSON['stringify'](_0x210648));});}exports[_0x8e79('0x56')]=function(_0x17a7ce){return getJobs(_0x17a7ce);};exports[_0x8e79('0x52')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
+var _0x3d9d=['port','secure','authentication','auth','user','pass','\x22%s\x22\x20<%s>','name','format','Report\x20%s\x20last\x20%s\x20%s','subtractNumber','subtractUnit','join','savename','basename','zip','existsSync','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','attachments','sendIfEmpty','empty\x20file,\x20email\x20not\x20sent','request','SendMail','then','error','error\x20mail','email\x20sent','data','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit\x20null\x20or\x20undefined','subtract','YYYY-MM-DD\x20HH:mm:ss','scheduled','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','catch','CustomReportId','no\x20report\x20id','Schedule','findAll','keys','jobs','map','toString','keyBy','difference','intersection','length','exists','stop','deleteJob','toRun','index','resolve','run\x20job','cron','active','isBetween','startAt','endAt','add','start','add\x20cron','stop\x20cron','update','run','util','path','lodash','moment','cron-job-manager','jayson/promise','../logger','schedule','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','http','info','Try\x20to\x20send\x20a\x20mail\x20to','email','MailAccount','service','Smtp','host'];(function(_0x126d6e,_0x1d8f3a){var _0x1e7281=function(_0x14fcf0){while(--_0x14fcf0){_0x126d6e['push'](_0x126d6e['shift']());}};_0x1e7281(++_0x1d8f3a);}(_0x3d9d,0xa3));var _0xd3d9=function(_0x2f5fbb,_0x144c9d){_0x2f5fbb=_0x2f5fbb-0x0;var _0x23ead5=_0x3d9d[_0x2f5fbb];return _0x23ead5;};'use strict';var fs=require('fs');var util=require(_0xd3d9('0x0'));var path=require(_0xd3d9('0x1'));var _=require(_0xd3d9('0x2'));var moment=require(_0xd3d9('0x3'));var CronJobManager=require(_0xd3d9('0x4'));var jayson=require(_0xd3d9('0x5'));var BPromise=require('bluebird');var logger=require(_0xd3d9('0x6'))(_0xd3d9('0x7'));var db=require(_0xd3d9('0x8'))['db'];var analyticCustomReportController=require(_0xd3d9('0x9'));var analyticDefaultReportController=require(_0xd3d9('0xa'));var client=jayson['client'][_0xd3d9('0xb')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x17527e,_0x17efba){return function(){logger[_0xd3d9('0xc')](_0xd3d9('0xd'),_0x17527e[_0xd3d9('0xe')]);var _0x2a387d=!![];var _0x4ec041={'tls':{'rejectUnauthorized':![]}};if(_0x17527e[_0xd3d9('0xf')]['Smtp'][_0xd3d9('0x10')]){_0x4ec041[_0xd3d9('0x10')]=_0x17527e[_0xd3d9('0xf')][_0xd3d9('0x11')]['service'];}else{_0x4ec041[_0xd3d9('0x12')]=_0x17527e['MailAccount'][_0xd3d9('0x11')][_0xd3d9('0x12')];_0x4ec041[_0xd3d9('0x13')]=_0x17527e['MailAccount'][_0xd3d9('0x11')][_0xd3d9('0x13')];_0x4ec041[_0xd3d9('0x14')]=_0x17527e[_0xd3d9('0xf')][_0xd3d9('0x11')][_0xd3d9('0x14')];}if(_0x17527e[_0xd3d9('0xf')][_0xd3d9('0x11')][_0xd3d9('0x15')]){_0x4ec041[_0xd3d9('0x16')]={'user':_0x17527e[_0xd3d9('0xf')]['Smtp'][_0xd3d9('0x17')],'pass':_0x17527e['MailAccount'][_0xd3d9('0x11')][_0xd3d9('0x18')]};}var _0x1cf923={'account':_0x4ec041,'message':{'from':util['format'](_0xd3d9('0x19'),_0x17527e[_0xd3d9('0xf')][_0xd3d9('0x1a')],_0x17527e[_0xd3d9('0xf')][_0xd3d9('0xe')]||_0x17527e[_0xd3d9('0xf')]['Smtp']['user']),'to':_0x17527e[_0xd3d9('0xe')],'cc':_0x17527e['cc'],'bcc':_0x17527e['bcc'],'subject':util[_0xd3d9('0x1b')](_0xd3d9('0x1c'),_0x17efba['name'],_0x17527e[_0xd3d9('0x1d')],_0x17527e[_0xd3d9('0x1e')])}};var _0x408049=path[_0xd3d9('0x1f')](__dirname,'../../files/reports');var _0x4a3e8b=_0x17efba[_0xd3d9('0x20')];var _0x3b6718=util['format']('%s.%s',path[_0xd3d9('0x21')](_0x17efba[_0xd3d9('0x20')],path['extname'](_0x17efba['savename'])),_0xd3d9('0x22'));var _0x4cb61d=path[_0xd3d9('0x1f')](_0x408049,_0x4a3e8b);var _0x5c5afe=path[_0xd3d9('0x1f')](_0x408049,_0x3b6718);if(fs[_0xd3d9('0x23')](_0x4cb61d)){_0x17efba['status']='Sent';_0x1cf923['message']['attachments']=[{'filename':_0x4a3e8b,'path':_0x4cb61d}];_0x1cf923[_0xd3d9('0x24')][_0xd3d9('0x25')]=util[_0xd3d9('0x1b')](_0xd3d9('0x26'),JSON[_0xd3d9('0x27')](_0x17efba,null,0x2));}else if(fs['existsSync'](_0x5c5afe)){_0x17efba[_0xd3d9('0x28')]='Sent';_0x1cf923[_0xd3d9('0x24')][_0xd3d9('0x29')]=[{'filename':_0x3b6718,'path':_0x5c5afe}];}else{_0x1cf923[_0xd3d9('0x24')][_0xd3d9('0x25')]='Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a';if(!_0x17527e[_0xd3d9('0x2a')]){_0x2a387d=![];logger['info'](_0xd3d9('0x2b'));}}if(_0x2a387d){return client[_0xd3d9('0x2c')](_0xd3d9('0x2d'),_0x1cf923)[_0xd3d9('0x2e')](function(_0x28752a){if(_0x28752a[_0xd3d9('0x2f')]){return logger['error'](_0xd3d9('0x30'),JSON[_0xd3d9('0x27')](_0x28752a));}return logger['info'](_0xd3d9('0x31'));})['catch'](function(_0xa8d077){return logger[_0xd3d9('0x2f')](_0xd3d9('0x30'),JSON[_0xd3d9('0x27')](_0xa8d077));});}};}function handleError(){return function(_0x29cf79){return logger[_0xd3d9('0x2f')](JSON[_0xd3d9('0x27')](_0x29cf79));};}function handleResult(_0x50f941){return function(_0x3d86a4){logger[_0xd3d9('0xc')](_0xd3d9('0x32'),JSON['stringify'](_0x3d86a4));if(_0x50f941[_0xd3d9('0xf')]&&_0x50f941[_0xd3d9('0xf')][_0xd3d9('0x11')]&&!_[_0xd3d9('0x33')](_0x50f941[_0xd3d9('0xe')])){setTimeout(handleSendEmail(_0x50f941,_0x3d86a4),0x3c*0x3e8);}};}function handleJob(_0x1ab830){return function(){try{if(_[_0xd3d9('0x33')](_0x1ab830[_0xd3d9('0x1d')])){return logger[_0xd3d9('0xc')](_0xd3d9('0x34'));}if(_[_0xd3d9('0x33')](_0x1ab830[_0xd3d9('0x1e')])){return logger[_0xd3d9('0xc')](_0xd3d9('0x35'));}var _0x4fcc1c={'startDate':moment()[_0xd3d9('0x36')](_0x1ab830[_0xd3d9('0x1d')],_0x1ab830[_0xd3d9('0x1e')])[_0xd3d9('0x1b')](_0xd3d9('0x37')),'endDate':moment()[_0xd3d9('0x1b')](_0xd3d9('0x37')),'type':_0xd3d9('0x38'),'output':_0x1ab830['output'],'name':_0x1ab830[_0xd3d9('0x1a')]};if(!_[_0xd3d9('0x33')](_0x1ab830[_0xd3d9('0x39')])){logger[_0xd3d9('0xc')](_0xd3d9('0x3a'),_0x1ab830['DefaultReportId']);return analyticDefaultReportController[_0xd3d9('0x3b')]({'id':_0x1ab830[_0xd3d9('0x39')]},_0x4fcc1c)[_0xd3d9('0x2e')](handleResult(_0x1ab830))[_0xd3d9('0x3c')](handleError());}if(!_[_0xd3d9('0x33')](_0x1ab830[_0xd3d9('0x3d')])){logger[_0xd3d9('0xc')]('exec\x20custom\x20report\x20id:%s',_0x1ab830[_0xd3d9('0x3d')]);return analyticCustomReportController[_0xd3d9('0x3b')]({'id':_0x1ab830[_0xd3d9('0x3d')]},_0x4fcc1c)[_0xd3d9('0x2e')](handleResult(_0x1ab830))[_0xd3d9('0x3c')](handleError());}}catch(_0x10545e){logger[_0xd3d9('0x2f')](JSON[_0xd3d9('0x27')](_0x10545e));}return logger['info'](_0xd3d9('0x3e'));};}function getJobs(_0x47b406){var _0x6197c={};if(_0x47b406){_0x6197c['id']=_0x47b406;}return db[_0xd3d9('0x3f')][_0xd3d9('0x40')]({'where':_0x6197c,'include':[{'model':db['MailAccount'],'attributes':['id',_0xd3d9('0x1a'),'email'],'include':[{'model':db['MailServerOut'],'as':_0xd3d9('0x11')}]}]})[_0xd3d9('0x2e')](function(_0x301505){var _0xec17db=_[_0xd3d9('0x41')](manager[_0xd3d9('0x42')]);var _0x2e0997=_[_0xd3d9('0x43')](_0x301505,function(_0x51f454){return _0x51f454['id'][_0xd3d9('0x44')]();});var _0x540a03=_[_0xd3d9('0x45')](_0x301505,function(_0x5a1b93){return _0x5a1b93['id'][_0xd3d9('0x44')]();});var _0x2ec745=_0x47b406?_0x2e0997:_[_0xd3d9('0x46')](_0x2e0997,_0xec17db);var _0x2f5989=_[_0xd3d9('0x47')](_0x2e0997,_0xec17db);var _0x507616=_[_0xd3d9('0x46')](_0xec17db,_0x2e0997);var _0x13af28;var _0x518f66;for(_0x13af28=0x0;_0x13af28<_0x507616[_0xd3d9('0x48')]&&!_0x47b406;_0x13af28+=0x1){_0x518f66=_0x507616[_0x13af28]['toString']();if(manager[_0xd3d9('0x49')](_0x518f66)){manager[_0xd3d9('0x4a')](_0x518f66);manager[_0xd3d9('0x4b')](_0x518f66);logger[_0xd3d9('0xc')]('delete\x20cron',_0x518f66);}}logger[_0xd3d9('0xc')](_0xd3d9('0x4c'),JSON[_0xd3d9('0x27')](_0x2ec745));for(_0x13af28=0x0;_0x13af28<_0x2ec745[_0xd3d9('0x48')];_0x13af28+=0x1){_0x518f66=_0x2ec745[_0x13af28][_0xd3d9('0x44')]();logger['info'](_0xd3d9('0x4d'),_0x518f66);if(_0x47b406){logger[_0xd3d9('0xc')]('my\x20id',_0x47b406);logger['info'](JSON[_0xd3d9('0x27')](_0x540a03[_0x518f66]));BPromise[_0xd3d9('0x4e')]()[_0xd3d9('0x2e')](handleJob(_0x540a03[_0x518f66]));logger[_0xd3d9('0xc')](_0xd3d9('0x4f'),_0x540a03[_0x518f66][_0xd3d9('0x1a')],_0x540a03[_0x518f66][_0xd3d9('0x50')]);}else if(_0x540a03[_0x518f66][_0xd3d9('0x50')]&&_0x540a03[_0x518f66][_0xd3d9('0x51')]&&moment()[_0xd3d9('0x52')](_0x540a03[_0x518f66][_0xd3d9('0x53')],_0x540a03[_0x518f66][_0xd3d9('0x54')])){manager[_0xd3d9('0x55')](_0x518f66,_0x540a03[_0x518f66][_0xd3d9('0x50')],handleJob(_0x540a03[_0x518f66]));manager[_0xd3d9('0x56')](_0x518f66);logger[_0xd3d9('0xc')](_0xd3d9('0x57'),_0x540a03[_0x518f66][_0xd3d9('0x1a')],_0x540a03[_0x518f66][_0xd3d9('0x50')]);}else if(manager[_0xd3d9('0x49')](_0x518f66)){manager[_0xd3d9('0x4a')](_0x518f66);manager[_0xd3d9('0x4b')](_0x518f66);logger[_0xd3d9('0xc')](_0xd3d9('0x58'),_0x540a03[_0x518f66]['name'],_0x540a03[_0x518f66]['cron']);}}for(_0x13af28=0x0,_0x518f66;_0x13af28<_0x2f5989[_0xd3d9('0x48')]&&!_0x47b406;_0x13af28+=0x1){_0x518f66=_0x2f5989[_0x13af28][_0xd3d9('0x44')]();if(manager[_0xd3d9('0x49')](_0x518f66)){if(_0x540a03[_0x518f66][_0xd3d9('0x50')]&&_0x540a03[_0x518f66]['active']&&moment()['isBetween'](_0x540a03[_0x518f66][_0xd3d9('0x53')],_0x540a03[_0x518f66][_0xd3d9('0x54')])){manager[_0xd3d9('0x59')](_0x518f66,_0x540a03[_0x518f66]['cron'],handleJob(_0x540a03[_0x518f66]));logger[_0xd3d9('0xc')]('update\x20cron',_0x540a03[_0x518f66][_0xd3d9('0x1a')],_0x540a03[_0x518f66]['cron']);}else{manager[_0xd3d9('0x4a')](_0x518f66);manager['deleteJob'](_0x518f66);logger[_0xd3d9('0xc')](_0xd3d9('0x58'),_0x540a03[_0x518f66]['name'],_0x540a03[_0x518f66][_0xd3d9('0x50')]);}}}})[_0xd3d9('0x3c')](function(_0xb5b9e7){logger['error'](JSON[_0xd3d9('0x27')](_0xb5b9e7));});}exports[_0xd3d9('0x5a')]=function(_0x2c148e){return getJobs(_0x2c148e);};exports[_0xd3d9('0x56')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
diff --git a/server/config/schedule/transcribe.js b/server/config/schedule/transcribe.js
index 8b85b93..b6ecdf1 100644
--- a/server/config/schedule/transcribe.js
+++ b/server/config/schedule/transcribe.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc149=['substring','format','transcribeName','data1','transcribeRegion','then','info','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJobStatus','COMPLETED','TranscriptionJob','Transcript','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','fileText','transcript','update','tempSentiment','Sequelize','ValidationError','Sentiment\x20Analysis\x20not\x20requested','sentiment','sentimentAccountId','sentimentRegion','language','Sentiment\x20Analysis\x20not\x20configured','Transcript\x20not\x20available','CloudProvider','findOne','data2','Sentiment','SentimentScore','Positive','Negative','Mixed','Neutral','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','FAILED','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','resolve','Cloud\x20Provider\x20not\x20configured','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','catch','name','SequelizeValidationError','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','inspect','VoiceRecording','findAll','No\x20transcribe\x20job\x20to\x20check','transcribeAccountId','Transcribe\x20not\x20configured','Cloud\x20Provider\x20not\x20available','forEach','push','error','start','lodash','aws-sdk','request-promise','util','bluebird','../../mysqldb','../../config/logger','transcribe','TranscribeService','Comprehend','detectSentiment'];(function(_0x13e741,_0x5d3c24){var _0x3f8bb3=function(_0x4440a0){while(--_0x4440a0){_0x13e741['push'](_0x13e741['shift']());}};_0x3f8bb3(++_0x5d3c24);}(_0xc149,0x87));var _0x9c14=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xc149[_0x19e35c];return _0x3e1fe8;};var _=require(_0x9c14('0x0'));var AWS=require(_0x9c14('0x1'));var rp=require(_0x9c14('0x2'));var util=require(_0x9c14('0x3'));var BPromise=require(_0x9c14('0x4'));var db=require(_0x9c14('0x5'))['db'];var logger=require(_0x9c14('0x6'))(_0x9c14('0x7'));function getTranscriptionJob(_0x373444,_0x53a205,_0x296b03,_0x32904e){return new Promise(function(_0x356bf2,_0x1a12fe){var _0x27720f=new AWS[(_0x9c14('0x8'))]({'accessKeyId':_0x53a205,'secretAccessKey':_0x373444,'region':_0x296b03});_0x27720f['getTranscriptionJob']({'TranscriptionJobName':_0x32904e},function(_0x450512,_0x3768af){if(_0x450512){return _0x1a12fe(_0x450512);}else{return _0x356bf2(_0x3768af);}});});}function sentiment(_0x15a733,_0x100bd6,_0x565b68,_0x2ea680,_0x439880){return new Promise(function(_0x298df7,_0x428f1c){var _0x1d477c=new AWS[(_0x9c14('0x9'))]({'accessKeyId':_0x100bd6,'secretAccessKey':_0x15a733,'region':_0x565b68});_0x1d477c[_0x9c14('0xa')]({'Text':_0x2ea680,'LanguageCode':_0x439880[_0x9c14('0xb')](0x0,0x2)},function(_0x245eb7,_0x2dfff8){if(_0x245eb7){return _0x428f1c(_0x245eb7);}else{return _0x298df7(_0x2dfff8);}});});}function checkTranscribeJob(_0x3d57e3,_0x378c6c,_0x432c4b){var _0x18ce4d;return new BPromise(function(_0x3708fe,_0x912bed){logger['info'](util[_0x9c14('0xc')]('[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)',_0x3d57e3['id'],_0x3d57e3[_0x9c14('0xd')]));return getTranscriptionJob(_0x432c4b[_0x9c14('0xe')],_0x432c4b['data2'],_0x378c6c[_0x9c14('0xf')],_0x3d57e3[_0x9c14('0xd')])[_0x9c14('0x10')](function(_0x358637){logger[_0x9c14('0x11')](util[_0x9c14('0xc')](_0x9c14('0x12'),_0x3d57e3['id'],_0x3d57e3['transcribeName'],_0x358637['TranscriptionJob'][_0x9c14('0x13')]));if(!_0x3d57e3['fileText']){switch(_0x358637['TranscriptionJob'][_0x9c14('0x13')]){case _0x9c14('0x14'):var _0x520189={'transcribeStatus':_0x358637[_0x9c14('0x15')][_0x9c14('0x13')],'fileUri':_0x358637[_0x9c14('0x15')][_0x9c14('0x16')][_0x9c14('0x17')]};logger[_0x9c14('0x11')](util[_0x9c14('0xc')](_0x9c14('0x18'),_0x3d57e3['id']));return rp({'uri':_0x358637[_0x9c14('0x15')]['Transcript'][_0x9c14('0x17')],'json':!![]})[_0x9c14('0x10')](function(_0x564339){logger[_0x9c14('0x11')](util[_0x9c14('0xc')](_0x9c14('0x19'),_0x3d57e3['id']));if(_0x564339&&_0x564339[_0x9c14('0x1a')]&&_0x564339[_0x9c14('0x1a')][_0x9c14('0x1b')]&&_0x564339[_0x9c14('0x1a')][_0x9c14('0x1b')][_0x9c14('0x1c')]){_0x520189[_0x9c14('0x1d')]='';for(var _0x7034a5=0x0;_0x7034a5<_0x564339[_0x9c14('0x1a')][_0x9c14('0x1b')][_0x9c14('0x1c')];_0x7034a5++){_0x520189[_0x9c14('0x1d')]+=_0x564339[_0x9c14('0x1a')][_0x9c14('0x1b')][_0x7034a5][_0x9c14('0x1e')]+'';}}return _0x3d57e3[_0x9c14('0x1f')](_0x520189);})[_0x9c14('0x10')](function(){logger['info'](util[_0x9c14('0xc')]('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x3d57e3['id']));if(!_0x3d57e3[_0x9c14('0x20')]){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))](_0x9c14('0x23'));}if(!_0x378c6c[_0x9c14('0x24')]||!_0x378c6c[_0x9c14('0x25')]||!_0x378c6c[_0x9c14('0x26')]||!_0x378c6c[_0x9c14('0x27')]||!_0x378c6c['bucket']){throw new db[(_0x9c14('0x21'))]['ValidationError'](_0x9c14('0x28'));}if(!_0x520189['fileText']){throw new Error(_0x9c14('0x29'));}if(_0x378c6c[_0x9c14('0x25')]===_0x432c4b['id']){return _0x432c4b;}else{return db[_0x9c14('0x2a')][_0x9c14('0x2b')]({'where':{'id':_settings[_0x9c14('0x25')]}});}})[_0x9c14('0x10')](function(_0x24065b){if(!_0x24065b){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x24065b[_0x9c14('0xe')]||!_0x24065b[_0x9c14('0x2c')]){throw new db['Sequelize']['ValidationError']('Cloud\x20Provider\x20not\x20configured');}_0x18ce4d=_0x24065b;logger[_0x9c14('0x11')](util[_0x9c14('0xc')]('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x3d57e3['id']));return sentiment(_0x18ce4d[_0x9c14('0xe')],_0x18ce4d[_0x9c14('0x2c')],_0x378c6c[_0x9c14('0x26')],_0x520189[_0x9c14('0x1d')],_0x378c6c[_0x9c14('0x27')]);})[_0x9c14('0x10')](function(_0x17191d){logger[_0x9c14('0x11')](util[_0x9c14('0xc')]('[RECORDING:%d]\x20Sentiment\x20Analysis\x20available',_0x3d57e3['id']));return _0x3d57e3[_0x9c14('0x1f')]({'sentiment':_0x17191d[_0x9c14('0x2d')],'sPositive':_0x17191d[_0x9c14('0x2e')][_0x9c14('0x2f')],'sNegative':_0x17191d['SentimentScore'][_0x9c14('0x30')],'sMixed':_0x17191d[_0x9c14('0x2e')][_0x9c14('0x31')],'sNeutral':_0x17191d[_0x9c14('0x2e')][_0x9c14('0x32')]});})[_0x9c14('0x10')](function(){logger[_0x9c14('0x11')](util['format'](_0x9c14('0x33'),_0x3d57e3['id']));_0x3708fe();});case _0x9c14('0x34'):return _0x3d57e3['update']({'transcribeStatus':_0x9c14('0x34'),'failureReason':_0x358637[_0x9c14('0x15')]['FailureReason']})[_0x9c14('0x10')](function(){logger[_0x9c14('0x11')](util[_0x9c14('0xc')](_0x9c14('0x33'),_0x3d57e3['id']));_0x3708fe();});default:logger[_0x9c14('0x11')](util['format'](_0x9c14('0x35'),_0x3d57e3['id']));break;}}else{return BPromise[_0x9c14('0x36')]()[_0x9c14('0x10')](function(){if(!_0x3d57e3[_0x9c14('0x20')]){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))](_0x9c14('0x23'));}if(!_0x378c6c[_0x9c14('0x24')]||!_0x378c6c[_0x9c14('0x25')]||!_0x378c6c[_0x9c14('0x26')]||!_0x378c6c[_0x9c14('0x27')]||!_0x378c6c['bucket']){throw new db['Sequelize']['ValidationError'](_0x9c14('0x28'));}if(!_0x3d57e3[_0x9c14('0x1d')]){throw new Error(_0x9c14('0x29'));}if(_0x378c6c[_0x9c14('0x25')]===_0x432c4b['id']){return _0x432c4b;}else{return db[_0x9c14('0x2a')][_0x9c14('0x2b')]({'where':{'id':_settings[_0x9c14('0x25')]}});}})[_0x9c14('0x10')](function(_0x2b044b){if(!_0x2b044b){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x2b044b['data1']||!_0x2b044b[_0x9c14('0x2c')]){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))](_0x9c14('0x37'));}_0x18ce4d=_0x2b044b;logger['info'](util[_0x9c14('0xc')](_0x9c14('0x38'),_0x3d57e3['id']));return sentiment(_0x18ce4d[_0x9c14('0xe')],_0x18ce4d[_0x9c14('0x2c')],_0x378c6c['sentimentRegion'],_0x3d57e3[_0x9c14('0x1d')],_0x378c6c[_0x9c14('0x27')]);})[_0x9c14('0x10')](function(_0x2f03a6){logger[_0x9c14('0x11')](util['format'](_0x9c14('0x39'),_0x3d57e3['id']));return _0x3d57e3[_0x9c14('0x1f')]({'sentiment':_0x2f03a6[_0x9c14('0x2d')],'sPositive':_0x2f03a6[_0x9c14('0x2e')]['Positive'],'sNegative':_0x2f03a6[_0x9c14('0x2e')][_0x9c14('0x30')],'sMixed':_0x2f03a6[_0x9c14('0x2e')][_0x9c14('0x31')],'sNeutral':_0x2f03a6['SentimentScore'][_0x9c14('0x32')],'transcribeStatus':'COMPLETED'});})[_0x9c14('0x10')](function(){logger[_0x9c14('0x11')](util[_0x9c14('0xc')](_0x9c14('0x33'),_0x3d57e3['id']));_0x3708fe();});}})[_0x9c14('0x3a')](function(_0x183ed8){if(_0x183ed8){if(!_0x183ed8[_0x9c14('0x3b')]||_0x183ed8[_0x9c14('0x3b')]!==_0x9c14('0x3c')){logger['error'](util[_0x9c14('0xc')](_0x9c14('0x3d'),_0x3d57e3['id']),util[_0x9c14('0x3e')](_0x183ed8,{'showHidden':![],'depth':null}));}}_0x3708fe();});});}function checkTranscribe(){var _0x561575;var _0xf9cd50;var _0x5c211c;return db[_0x9c14('0x3f')][_0x9c14('0x40')]({'where':{'transcribeStatus':'IN_PROGRESS'}})['then'](function(_0x47305c){if(!_0x47305c||!_0x47305c[_0x9c14('0x1c')]){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))](_0x9c14('0x41'));}_0x561575=_0x47305c;return db['Setting'][_0x9c14('0x2b')]({'where':{'id':0x1}});})[_0x9c14('0x10')](function(_0x23fb19){if(!_0x23fb19){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))]('Settings\x20not\x20available');}_0xf9cd50=_0x23fb19;if(!_0xf9cd50['transcribe']||!_0xf9cd50[_0x9c14('0x42')]||!_0xf9cd50['transcribeRegion']||!_0xf9cd50[_0x9c14('0x27')]||!_0xf9cd50['bucket']){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))](_0x9c14('0x43'));}return db[_0x9c14('0x2a')][_0x9c14('0x2b')]({'where':{'id':_0xf9cd50[_0x9c14('0x42')]}});})[_0x9c14('0x10')](function(_0x56c1bb){if(!_0x56c1bb){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))](_0x9c14('0x44'));}if(!_0x56c1bb[_0x9c14('0xe')]||!_0x56c1bb[_0x9c14('0x2c')]){throw new db[(_0x9c14('0x21'))][(_0x9c14('0x22'))](_0x9c14('0x37'));}_0x5c211c=_0x56c1bb;var _0x475876=[];_0x561575[_0x9c14('0x45')](function(_0x133a2f){_0x475876[_0x9c14('0x46')](checkTranscribeJob(_0x133a2f,_0xf9cd50,_0x5c211c));});return BPromise['all'](_0x475876);})[_0x9c14('0x3a')](function(_0x52015a){if(_0x52015a){if(!_0x52015a[_0x9c14('0x3b')]||_0x52015a[_0x9c14('0x3b')]!=='SequelizeValidationError'){logger[_0x9c14('0x47')](util[_0x9c14('0x3e')](_0x52015a,{'showHidden':![],'depth':null}));}}});}exports[_0x9c14('0x48')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();};
\ No newline at end of file
+var _0x7fcd=['[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','transcribeName','data2','transcribeRegion','info','format','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','fileText','COMPLETED','Transcript','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript','then','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','transcript','update','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','tempSentiment','Sentiment\x20Analysis\x20not\x20requested','language','Sequelize','Sentiment\x20Analysis\x20not\x20configured','Transcript\x20not\x20available','sentimentAccountId','CloudProvider','findOne','ValidationError','data1','Cloud\x20Provider\x20not\x20configured','sentimentRegion','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','Sentiment','SentimentScore','Positive','Negative','Mixed','Neutral','FAILED','FailureReason','resolve','sentiment','bucket','Cloud\x20Provider\x20not\x20available','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','name','SequelizeValidationError','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','inspect','VoiceRecording','findAll','IN_PROGRESS','No\x20transcribe\x20job\x20to\x20check','Setting','Settings\x20not\x20available','transcribeAccountId','Transcribe\x20not\x20configured','forEach','all','catch','lodash','aws-sdk','request-promise','util','transcribe','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment'];(function(_0x4a53d,_0x58a95e){var _0x27410e=function(_0x38fc90){while(--_0x38fc90){_0x4a53d['push'](_0x4a53d['shift']());}};_0x27410e(++_0x58a95e);}(_0x7fcd,0x11f));var _0xd7fc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7fcd[_0x3dd15e];return _0x231fd0;};var _=require(_0xd7fc('0x0'));var AWS=require(_0xd7fc('0x1'));var rp=require(_0xd7fc('0x2'));var util=require(_0xd7fc('0x3'));var BPromise=require('bluebird');var db=require('../../mysqldb')['db'];var logger=require('../../config/logger')(_0xd7fc('0x4'));function getTranscriptionJob(_0x4663e4,_0x2446fa,_0x28d2f0,_0x4d0b02){return new Promise(function(_0x2a8600,_0x254026){var _0x2878e0=new AWS[(_0xd7fc('0x5'))]({'accessKeyId':_0x2446fa,'secretAccessKey':_0x4663e4,'region':_0x28d2f0});_0x2878e0[_0xd7fc('0x6')]({'TranscriptionJobName':_0x4d0b02},function(_0x406fe2,_0x3637e0){if(_0x406fe2){return _0x254026(_0x406fe2);}else{return _0x2a8600(_0x3637e0);}});});}function sentiment(_0xe77d95,_0x3c1337,_0x1dba44,_0x5e1913,_0xc331be){return new Promise(function(_0x1ffb22,_0x5d0a56){var _0x2f63fe=new AWS[(_0xd7fc('0x7'))]({'accessKeyId':_0x3c1337,'secretAccessKey':_0xe77d95,'region':_0x1dba44});_0x2f63fe[_0xd7fc('0x8')]({'Text':_0x5e1913,'LanguageCode':_0xc331be['substring'](0x0,0x2)},function(_0x1d5b17,_0x500105){if(_0x1d5b17){return _0x5d0a56(_0x1d5b17);}else{return _0x1ffb22(_0x500105);}});});}function checkTranscribeJob(_0x5ce35e,_0x221556,_0xdc1f45){var _0x5e2764;return new BPromise(function(_0x13edea,_0x2200d1){logger['info'](util['format'](_0xd7fc('0x9'),_0x5ce35e['id'],_0x5ce35e[_0xd7fc('0xa')]));return getTranscriptionJob(_0xdc1f45['data1'],_0xdc1f45[_0xd7fc('0xb')],_0x221556[_0xd7fc('0xc')],_0x5ce35e['transcribeName'])['then'](function(_0x5a432e){logger[_0xd7fc('0xd')](util[_0xd7fc('0xe')](_0xd7fc('0xf'),_0x5ce35e['id'],_0x5ce35e[_0xd7fc('0xa')],_0x5a432e[_0xd7fc('0x10')][_0xd7fc('0x11')]));if(!_0x5ce35e[_0xd7fc('0x12')]){switch(_0x5a432e[_0xd7fc('0x10')][_0xd7fc('0x11')]){case _0xd7fc('0x13'):var _0x97881b={'transcribeStatus':_0x5a432e['TranscriptionJob'][_0xd7fc('0x11')],'fileUri':_0x5a432e[_0xd7fc('0x10')][_0xd7fc('0x14')][_0xd7fc('0x15')]};logger['info'](util['format'](_0xd7fc('0x16'),_0x5ce35e['id']));return rp({'uri':_0x5a432e[_0xd7fc('0x10')]['Transcript'][_0xd7fc('0x15')],'json':!![]})[_0xd7fc('0x17')](function(_0x3fe139){logger[_0xd7fc('0xd')](util[_0xd7fc('0xe')](_0xd7fc('0x18'),_0x5ce35e['id']));if(_0x3fe139&&_0x3fe139[_0xd7fc('0x19')]&&_0x3fe139[_0xd7fc('0x19')][_0xd7fc('0x1a')]&&_0x3fe139[_0xd7fc('0x19')][_0xd7fc('0x1a')]['length']){_0x97881b[_0xd7fc('0x12')]='';for(var _0x205e02=0x0;_0x205e02<_0x3fe139[_0xd7fc('0x19')][_0xd7fc('0x1a')][_0xd7fc('0x1b')];_0x205e02++){_0x97881b[_0xd7fc('0x12')]+=_0x3fe139[_0xd7fc('0x19')][_0xd7fc('0x1a')][_0x205e02][_0xd7fc('0x1c')]+'';}}return _0x5ce35e[_0xd7fc('0x1d')](_0x97881b);})[_0xd7fc('0x17')](function(){logger[_0xd7fc('0xd')](util['format'](_0xd7fc('0x1e'),_0x5ce35e['id']));if(!_0x5ce35e[_0xd7fc('0x1f')]){throw new db['Sequelize']['ValidationError'](_0xd7fc('0x20'));}if(!_0x221556['sentiment']||!_0x221556['sentimentAccountId']||!_0x221556['sentimentRegion']||!_0x221556[_0xd7fc('0x21')]||!_0x221556['bucket']){throw new db[(_0xd7fc('0x22'))]['ValidationError'](_0xd7fc('0x23'));}if(!_0x97881b[_0xd7fc('0x12')]){throw new Error(_0xd7fc('0x24'));}if(_0x221556[_0xd7fc('0x25')]===_0xdc1f45['id']){return _0xdc1f45;}else{return db[_0xd7fc('0x26')][_0xd7fc('0x27')]({'where':{'id':_settings[_0xd7fc('0x25')]}});}})[_0xd7fc('0x17')](function(_0x29f65d){if(!_0x29f65d){throw new db[(_0xd7fc('0x22'))][(_0xd7fc('0x28'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x29f65d[_0xd7fc('0x29')]||!_0x29f65d[_0xd7fc('0xb')]){throw new db['Sequelize'][(_0xd7fc('0x28'))](_0xd7fc('0x2a'));}_0x5e2764=_0x29f65d;logger[_0xd7fc('0xd')](util['format']('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x5ce35e['id']));return sentiment(_0x5e2764[_0xd7fc('0x29')],_0x5e2764[_0xd7fc('0xb')],_0x221556[_0xd7fc('0x2b')],_0x97881b['fileText'],_0x221556[_0xd7fc('0x21')]);})[_0xd7fc('0x17')](function(_0x2170cf){logger[_0xd7fc('0xd')](util['format'](_0xd7fc('0x2c'),_0x5ce35e['id']));return _0x5ce35e[_0xd7fc('0x1d')]({'sentiment':_0x2170cf[_0xd7fc('0x2d')],'sPositive':_0x2170cf[_0xd7fc('0x2e')][_0xd7fc('0x2f')],'sNegative':_0x2170cf['SentimentScore'][_0xd7fc('0x30')],'sMixed':_0x2170cf['SentimentScore'][_0xd7fc('0x31')],'sNeutral':_0x2170cf[_0xd7fc('0x2e')][_0xd7fc('0x32')]});})[_0xd7fc('0x17')](function(){logger[_0xd7fc('0xd')](util['format']('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x5ce35e['id']));_0x13edea();});case _0xd7fc('0x33'):return _0x5ce35e[_0xd7fc('0x1d')]({'transcribeStatus':_0xd7fc('0x33'),'failureReason':_0x5a432e['TranscriptionJob'][_0xd7fc('0x34')]})[_0xd7fc('0x17')](function(){logger['info'](util[_0xd7fc('0xe')]('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x5ce35e['id']));_0x13edea();});default:logger['info'](util[_0xd7fc('0xe')]('[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed',_0x5ce35e['id']));break;}}else{return BPromise[_0xd7fc('0x35')]()[_0xd7fc('0x17')](function(){if(!_0x5ce35e[_0xd7fc('0x1f')]){throw new db[(_0xd7fc('0x22'))]['ValidationError']('Sentiment\x20Analysis\x20not\x20requested');}if(!_0x221556[_0xd7fc('0x36')]||!_0x221556[_0xd7fc('0x25')]||!_0x221556[_0xd7fc('0x2b')]||!_0x221556[_0xd7fc('0x21')]||!_0x221556[_0xd7fc('0x37')]){throw new db['Sequelize'][(_0xd7fc('0x28'))](_0xd7fc('0x23'));}if(!_0x5ce35e[_0xd7fc('0x12')]){throw new Error('Transcript\x20not\x20available');}if(_0x221556[_0xd7fc('0x25')]===_0xdc1f45['id']){return _0xdc1f45;}else{return db[_0xd7fc('0x26')][_0xd7fc('0x27')]({'where':{'id':_settings[_0xd7fc('0x25')]}});}})[_0xd7fc('0x17')](function(_0x45db78){if(!_0x45db78){throw new db[(_0xd7fc('0x22'))][(_0xd7fc('0x28'))](_0xd7fc('0x38'));}if(!_0x45db78[_0xd7fc('0x29')]||!_0x45db78['data2']){throw new db[(_0xd7fc('0x22'))][(_0xd7fc('0x28'))](_0xd7fc('0x2a'));}_0x5e2764=_0x45db78;logger[_0xd7fc('0xd')](util['format'](_0xd7fc('0x39'),_0x5ce35e['id']));return sentiment(_0x5e2764[_0xd7fc('0x29')],_0x5e2764[_0xd7fc('0xb')],_0x221556[_0xd7fc('0x2b')],_0x5ce35e[_0xd7fc('0x12')],_0x221556[_0xd7fc('0x21')]);})['then'](function(_0xa2f427){logger[_0xd7fc('0xd')](util['format']('[RECORDING:%d]\x20Sentiment\x20Analysis\x20available',_0x5ce35e['id']));return _0x5ce35e[_0xd7fc('0x1d')]({'sentiment':_0xa2f427[_0xd7fc('0x2d')],'sPositive':_0xa2f427[_0xd7fc('0x2e')][_0xd7fc('0x2f')],'sNegative':_0xa2f427[_0xd7fc('0x2e')][_0xd7fc('0x30')],'sMixed':_0xa2f427[_0xd7fc('0x2e')][_0xd7fc('0x31')],'sNeutral':_0xa2f427[_0xd7fc('0x2e')][_0xd7fc('0x32')],'transcribeStatus':_0xd7fc('0x13')});})[_0xd7fc('0x17')](function(){logger[_0xd7fc('0xd')](util[_0xd7fc('0xe')](_0xd7fc('0x1e'),_0x5ce35e['id']));_0x13edea();});}})['catch'](function(_0x4fc624){if(_0x4fc624){if(!_0x4fc624[_0xd7fc('0x3a')]||_0x4fc624[_0xd7fc('0x3a')]!==_0xd7fc('0x3b')){logger[_0xd7fc('0x3c')](util[_0xd7fc('0xe')](_0xd7fc('0x3d'),_0x5ce35e['id']),util[_0xd7fc('0x3e')](_0x4fc624,{'showHidden':![],'depth':null}));}}_0x13edea();});});}function checkTranscribe(){var _0x6658df;var _0x5317c0;var _0x15349f;return db[_0xd7fc('0x3f')][_0xd7fc('0x40')]({'where':{'transcribeStatus':_0xd7fc('0x41')}})['then'](function(_0x48f2ab){if(!_0x48f2ab||!_0x48f2ab[_0xd7fc('0x1b')]){throw new db[(_0xd7fc('0x22'))][(_0xd7fc('0x28'))](_0xd7fc('0x42'));}_0x6658df=_0x48f2ab;return db[_0xd7fc('0x43')][_0xd7fc('0x27')]({'where':{'id':0x1}});})['then'](function(_0x5c02ce){if(!_0x5c02ce){throw new db[(_0xd7fc('0x22'))]['ValidationError'](_0xd7fc('0x44'));}_0x5317c0=_0x5c02ce;if(!_0x5317c0['transcribe']||!_0x5317c0[_0xd7fc('0x45')]||!_0x5317c0['transcribeRegion']||!_0x5317c0[_0xd7fc('0x21')]||!_0x5317c0[_0xd7fc('0x37')]){throw new db['Sequelize'][(_0xd7fc('0x28'))](_0xd7fc('0x46'));}return db[_0xd7fc('0x26')][_0xd7fc('0x27')]({'where':{'id':_0x5317c0[_0xd7fc('0x45')]}});})['then'](function(_0x232595){if(!_0x232595){throw new db[(_0xd7fc('0x22'))]['ValidationError'](_0xd7fc('0x38'));}if(!_0x232595[_0xd7fc('0x29')]||!_0x232595['data2']){throw new db[(_0xd7fc('0x22'))][(_0xd7fc('0x28'))]('Cloud\x20Provider\x20not\x20configured');}_0x15349f=_0x232595;var _0x1a8c02=[];_0x6658df[_0xd7fc('0x47')](function(_0x51d8a0){_0x1a8c02['push'](checkTranscribeJob(_0x51d8a0,_0x5317c0,_0x15349f));});return BPromise[_0xd7fc('0x48')](_0x1a8c02);})[_0xd7fc('0x49')](function(_0x37ba54){if(_0x37ba54){if(!_0x37ba54[_0xd7fc('0x3a')]||_0x37ba54[_0xd7fc('0x3a')]!==_0xd7fc('0x3b')){logger[_0xd7fc('0x3c')](util['inspect'](_0x37ba54,{'showHidden':![],'depth':null}));}}});}exports['start']=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();};
\ No newline at end of file
diff --git a/server/config/seedContact.js b/server/config/seedContact.js
index 6456f0c..d315c14 100644
--- a/server/config/seedContact.js
+++ b/server/config/seedContact.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x89b7=['util','../mysqldb','push','innocenzo.biondo','@xcally.com','now','Innocenzo','Biondo','CmContact','destroy','bulkCreate','log','finished\x20populating','CmHopper','then','hopper1','contacts2','hopper2','catch'];(function(_0x43f1d1,_0x567996){var _0x44a47d=function(_0x3d2b45){while(--_0x3d2b45){_0x43f1d1['push'](_0x43f1d1['shift']());}};_0x44a47d(++_0x567996);}(_0x89b7,0x156));var _0x789b=function(_0x2d4421,_0x15a84f){_0x2d4421=_0x2d4421-0x0;var _0x2d3b01=_0x89b7[_0x2d4421];return _0x2d3b01;};'use strict';var util=require(_0x789b('0x0'));var db=require(_0x789b('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x789b('0x2')]({'id':i,'firstName':'Innocenzo'+i,'lastName':'Biondo'+i,'phone':0xf879fb460+i,'email':_0x789b('0x3')+i+_0x789b('0x4')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper['push']({'id':i,'active':![],'scheduledat':Date[_0x789b('0x5')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x789b('0x5')](),'updatedAt':Date[_0x789b('0x5')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2['push']({'id':i,'firstName':_0x789b('0x6')+i,'lastName':_0x789b('0x7')+i,'phone':0xf879fb460+i,'email':_0x789b('0x3')+i+_0x789b('0x4')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x789b('0x2')]({'id':i,'active':![],'scheduledat':Date[_0x789b('0x5')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x789b('0x5')](),'updatedAt':Date[_0x789b('0x5')]()});}db[_0x789b('0x8')][_0x789b('0x9')]({'where':{}})['then'](function(){return db[_0x789b('0x8')][_0x789b('0xa')](contacts);})['then'](function(){console[_0x789b('0xb')](_0x789b('0xc'),'contacts1');return db[_0x789b('0xd')][_0x789b('0x9')]({'where':{}});})[_0x789b('0xe')](function(){return db[_0x789b('0xd')][_0x789b('0xa')](hopper);})[_0x789b('0xe')](function(){console[_0x789b('0xb')](_0x789b('0xc'),_0x789b('0xf'));return db[_0x789b('0x8')][_0x789b('0xa')](contacts2);})[_0x789b('0xe')](function(){console[_0x789b('0xb')](_0x789b('0xc'),_0x789b('0x10'));return db['CmHopper'][_0x789b('0xa')](hopper2);})[_0x789b('0xe')](function(){console[_0x789b('0xb')]('finished\x20populating',_0x789b('0x11'));})[_0x789b('0x12')](function(_0x3746d8){console[_0x789b('0xb')](_0x3746d8);});
\ No newline at end of file
+var _0xb097=['Biondo','innocenzo.biondo','now','@xcally.com','CmContact','destroy','then','bulkCreate','log','finished\x20populating','contacts1','CmHopper','hopper1','contacts2','hopper2','catch','util','../mysqldb','push','Innocenzo'];(function(_0x52ef79,_0x23f3f0){var _0x23f33f=function(_0x353634){while(--_0x353634){_0x52ef79['push'](_0x52ef79['shift']());}};_0x23f33f(++_0x23f3f0);}(_0xb097,0x178));var _0x7b09=function(_0x4fd149,_0x163b09){_0x4fd149=_0x4fd149-0x0;var _0x703385=_0xb097[_0x4fd149];return _0x703385;};'use strict';var util=require(_0x7b09('0x0'));var db=require(_0x7b09('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x7b09('0x2')]({'id':i,'firstName':_0x7b09('0x3')+i,'lastName':_0x7b09('0x4')+i,'phone':0xf879fb460+i,'email':_0x7b09('0x5')+i+'@xcally.com'});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x7b09('0x2')]({'id':i,'active':![],'scheduledat':Date['now'](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x7b09('0x6')](),'updatedAt':Date[_0x7b09('0x6')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2['push']({'id':i,'firstName':_0x7b09('0x3')+i,'lastName':_0x7b09('0x4')+i,'phone':0xf879fb460+i,'email':_0x7b09('0x5')+i+_0x7b09('0x7')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x7b09('0x2')]({'id':i,'active':![],'scheduledat':Date[_0x7b09('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x7b09('0x6')](),'updatedAt':Date[_0x7b09('0x6')]()});}db[_0x7b09('0x8')][_0x7b09('0x9')]({'where':{}})[_0x7b09('0xa')](function(){return db['CmContact'][_0x7b09('0xb')](contacts);})[_0x7b09('0xa')](function(){console[_0x7b09('0xc')](_0x7b09('0xd'),_0x7b09('0xe'));return db[_0x7b09('0xf')][_0x7b09('0x9')]({'where':{}});})[_0x7b09('0xa')](function(){return db[_0x7b09('0xf')]['bulkCreate'](hopper);})['then'](function(){console[_0x7b09('0xc')](_0x7b09('0xd'),_0x7b09('0x10'));return db['CmContact'][_0x7b09('0xb')](contacts2);})['then'](function(){console['log'](_0x7b09('0xd'),_0x7b09('0x11'));return db['CmHopper'][_0x7b09('0xb')](hopper2);})[_0x7b09('0xa')](function(){console[_0x7b09('0xc')]('finished\x20populating',_0x7b09('0x12'));})[_0x7b09('0x13')](function(_0x26c654){console[_0x7b09('0xc')](_0x26c654);});
\ No newline at end of file
diff --git a/server/config/seedUsers.js b/server/config/seedUsers.js
index f6dce07..a32d0d5 100644
--- a/server/config/seedUsers.js
+++ b/server/config/seedUsers.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa2c3=['yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','\x22%s\x22\x20<%s>','User','then','add\x20user','util','../mysqldb','%s%s','format','%s%s@xcally.com','agent','password','friend','udp','wss'];(function(_0x1203f,_0x554bbc){var _0x365f0a=function(_0x3531d0){while(--_0x3531d0){_0x1203f['push'](_0x1203f['shift']());}};_0x365f0a(++_0x554bbc);}(_0xa2c3,0x1b8));var _0x3a2c=function(_0x10a938,_0x17db84){_0x10a938=_0x10a938-0x0;var _0x4643b4=_0xa2c3[_0x10a938];return _0x4643b4;};'use strict';var util=require(_0x3a2c('0x0'));var db=require(_0x3a2c('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util['format'](_0x3a2c('0x2'),'agent',i),'fullname':util[_0x3a2c('0x3')](_0x3a2c('0x2'),'agent',i),'email':util[_0x3a2c('0x3')](_0x3a2c('0x4'),_0x3a2c('0x5'),i),'role':_0x3a2c('0x5'),'password':_0x3a2c('0x6'),'internal':0xfa0+i,'type':_0x3a2c('0x7'),'transport':[_0x3a2c('0x8'),'ws',_0x3a2c('0x9')],'disallow':['all'],'allow':['ulaw'],'defaultuser':util[_0x3a2c('0x3')](_0x3a2c('0x2'),'agent',i),'encryption':_0x3a2c('0xa'),'avpf':_0x3a2c('0xa'),'force_avp':'yes','icesupport':'yes','dtlsenable':'yes','dtlsverify':'no','dtlscertfile':_0x3a2c('0xb'),'dtlsprivatekey':_0x3a2c('0xc'),'dtlssetup':_0x3a2c('0xd'),'callerid':util[_0x3a2c('0x3')](_0x3a2c('0xe'),util[_0x3a2c('0x3')](_0x3a2c('0x2'),_0x3a2c('0x5'),i),0xfa0+i)});}db[_0x3a2c('0xf')]['bulkCreate'](users)[_0x3a2c('0x10')](function(){console['log'](_0x3a2c('0x11'));})['catch'](function(_0x9e95a8){console['log'](_0x9e95a8);});
\ No newline at end of file
+var _0x1091=['push','format','%s%s','agent','%s%s@xcally.com','password','friend','udp','wss','ulaw','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','\x22%s\x22\x20<%s>','then','log','add\x20user','catch','util'];(function(_0x465dcb,_0x281765){var _0x4af0c8=function(_0x269144){while(--_0x269144){_0x465dcb['push'](_0x465dcb['shift']());}};_0x4af0c8(++_0x281765);}(_0x1091,0x12b));var _0x1109=function(_0x822bd8,_0x50e8d2){_0x822bd8=_0x822bd8-0x0;var _0x68a369=_0x1091[_0x822bd8];return _0x68a369;};'use strict';var util=require(_0x1109('0x0'));var db=require('../mysqldb')['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x1109('0x1')]({'name':util[_0x1109('0x2')](_0x1109('0x3'),_0x1109('0x4'),i),'fullname':util['format'](_0x1109('0x3'),'agent',i),'email':util['format'](_0x1109('0x5'),'agent',i),'role':_0x1109('0x4'),'password':_0x1109('0x6'),'internal':0xfa0+i,'type':_0x1109('0x7'),'transport':[_0x1109('0x8'),'ws',_0x1109('0x9')],'disallow':['all'],'allow':[_0x1109('0xa')],'defaultuser':util['format'](_0x1109('0x3'),_0x1109('0x4'),i),'encryption':_0x1109('0xb'),'avpf':_0x1109('0xb'),'force_avp':_0x1109('0xb'),'icesupport':_0x1109('0xb'),'dtlsenable':_0x1109('0xb'),'dtlsverify':'no','dtlscertfile':_0x1109('0xc'),'dtlsprivatekey':_0x1109('0xd'),'dtlssetup':_0x1109('0xe'),'callerid':util[_0x1109('0x2')](_0x1109('0xf'),util['format'](_0x1109('0x3'),_0x1109('0x4'),i),0xfa0+i)});}db['User']['bulkCreate'](users)[_0x1109('0x10')](function(){console[_0x1109('0x11')](_0x1109('0x12'));})[_0x1109('0x13')](function(_0x5e939e){console[_0x1109('0x11')](_0x5e939e);});
\ No newline at end of file
diff --git a/server/config/socketio.js b/server/config/socketio.js
index 0e95219..f46d001 100644
--- a/server/config/socketio.js
+++ b/server/config/socketio.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x307a=['MailInteractions','FaxInteraction','SmsInteraction','SmsInteractions','OpenchannelInteractions','voice:inbound','voice:outbound','hasOwnProperty','include','push','VoiceQueue','ChatQueue','FaxQueue','SmsQueue','MailQueue','OpenchannelQueue','Trunk','user','IvrCampaigns','getVoiceQueues','getChatQueues','getFaxQueues','getSmsQueues','getOpenchannelQueues','length','voice','chat','fax','sms','openchannel','trunk:%s','campaign:%s:%s','leave','map','emit','user_has_chat_interactions:remove','user_has_mail_interactions:remove','FaxInteractions','removeFaxInteractions','user_has_fax_interactions:remove','removeSmsInteractions','user_has_sms_interactions:remove','removeOpenchannelInteractions','catch','join','default','connection','address','request','remoteAddress','remotePort','connectedAt','log','SocketIO\x20','DISCONNECTED','CONNECTED','util','../mysqldb','name','Agents','User','role','agent','type','ivr','UserProfileSection','findOne','then','autoAssociation','VoiceQueues','ChatQueues','FaxQueues','SmsQueues','MailQueues','OpenchannelQueues','findAll','Telephones','Trunks','UserProfileResource','resourceId','telephone','Campaign','format','user:%s','query','userProfileId','handshake','ChatInteraction','ChatInteractions','MailInteraction'];(function(_0x47f7dd,_0x43c225){var _0x2c3739=function(_0x2cad75){while(--_0x2cad75){_0x47f7dd['push'](_0x47f7dd['shift']());}};_0x2c3739(++_0x43c225);}(_0x307a,0x1a0));var _0xa307=function(_0x5cfd3a,_0x33e2c2){_0x5cfd3a=_0x5cfd3a-0x0;var _0x5a5bfe=_0x307a[_0x5cfd3a];return _0x5a5bfe;};'use strict';var _=require('lodash');var util=require(_0xa307('0x0'));var BPromise=require('bluebird');var db=require(_0xa307('0x1'))['db'];var config=require('./environment');var queryQueues={'attributes':['id',_0xa307('0x2')],'include':[{'as':_0xa307('0x3'),'model':db[_0xa307('0x4')],'attributes':['id','name',_0xa307('0x5')],'raw':!![],'where':{'role':_0xa307('0x6')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0xa307('0x2')],'where':{'role':'telephone'}};var queryTrunks={'raw':!![],'attributes':['id',_0xa307('0x2')]};var queryAgents={'raw':!![],'attributes':['id','name'],'where':{'role':_0xa307('0x6')}};var queryCampaigns={'raw':!![],'attributes':['id','name',_0xa307('0x7')],'where':{'type':_0xa307('0x8')}};function getAssociatedResources(_0x1fef35,_0x3eb9b3,_0xe14ed6){return db[_0xa307('0x9')][_0xa307('0xa')]({'where':{'name':_0x1fef35,'userProfileId':_0x3eb9b3},'raw':!![]})[_0xa307('0xb')](function(_0x302554){if(_0x302554){if(_0x302554[_0xa307('0xc')]){switch(_0x1fef35){case _0xa307('0xd'):case _0xa307('0xe'):case _0xa307('0xf'):case _0xa307('0x10'):case _0xa307('0x11'):case _0xa307('0x12'):return db[_0xe14ed6][_0xa307('0x13')](queryQueues);case _0xa307('0x14'):return db[_0xe14ed6][_0xa307('0x13')](queryTelephones);case _0xa307('0x15'):return db[_0xe14ed6][_0xa307('0x13')](queryTrunks);case'IvrCampaigns':return db[_0xe14ed6][_0xa307('0x13')](queryCampaigns);}}else{return db[_0xa307('0x16')][_0xa307('0x13')]({'attributes':[_0xa307('0x17')],'where':{'sectionId':_0x302554['id']},'raw':!![]})[_0xa307('0xb')](function(_0x220a57){if(_0x220a57){var _0xa82c20={'where':{'id':_['map'](_0x220a57,_0xa307('0x17'))},'raw':!![]};switch(_0xe14ed6){case'User':_0xa82c20['where'][_0xa307('0x5')]=_0xa307('0x18');break;case _0xa307('0x19'):_0xa82c20['where'][_0xa307('0x7')]=_0xa307('0x8');break;}return db[_0xe14ed6][_0xa307('0x13')](_0xa82c20);}else{return[];}});}}else{return[];}})[_0xa307('0xb')](function(_0x157e4b){return _0x157e4b;});}function joinOrLeaveQueues(_0x5f5946,_0x2542ce,_0x56aeb4,_0x17448d){_0x5f5946[_0x2542ce](util[_0xa307('0x1a')]('%s:queue:%s',_0x56aeb4,_0x17448d[_0xa307('0x2')]));if(_0x17448d[_0xa307('0x3')]){for(var _0xfd707f=0x0;_0xfd707f<_0x17448d[_0xa307('0x3')]['length'];_0xfd707f+=0x1){_0x5f5946[_0x2542ce](util[_0xa307('0x1a')](_0xa307('0x1b'),_0x17448d[_0xa307('0x3')][_0xfd707f][_0xa307('0x2')]));}}}function joinOrLeave(_0x38c738,_0x320e16,_0x42d220){var _0x29cca2;if(_0x38c738['handshake'][_0xa307('0x1c')]['id']){db[_0xa307('0x4')]['find']({'attributes':['id',_0xa307('0x2'),_0xa307('0x5'),_0xa307('0x1d')],'where':{'id':_0x38c738[_0xa307('0x1e')]['query']['id']},'include':[{'model':db[_0xa307('0x1f')],'as':_0xa307('0x20'),'attributes':['id'],'raw':!![]},{'model':db[_0xa307('0x21')],'as':_0xa307('0x22'),'attributes':['id'],'raw':!![]},{'model':db[_0xa307('0x23')],'as':'FaxInteractions','attributes':['id'],'raw':!![]},{'model':db[_0xa307('0x24')],'as':_0xa307('0x25'),'attributes':['id'],'raw':!![]},{'model':db['OpenchannelInteraction'],'as':_0xa307('0x26'),'attributes':['id'],'raw':!![]}]})[_0xa307('0xb')](function(_0x4d48ef){if(_0x4d48ef){_0x29cca2=_0x4d48ef;_0x38c738[_0x320e16](util[_0xa307('0x1a')](_0xa307('0x1b'),_0x4d48ef[_0xa307('0x2')]));var _0xa218aa=[];switch(_0x4d48ef[_0xa307('0x5')]){case'admin':_0x38c738[_0x320e16](_0xa307('0x27'));_0x38c738[_0x320e16](_0xa307('0x28'));if(queryQueues[_0xa307('0x29')](_0xa307('0x2a'))){delete queryQueues[_0xa307('0x2a')];}_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x2c')][_0xa307('0x13')](queryQueues));_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x2d')][_0xa307('0x13')](queryQueues));_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x2e')][_0xa307('0x13')](queryQueues));_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x2f')][_0xa307('0x13')](queryQueues));_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x30')]['findAll'](queryQueues));_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x31')]['findAll'](queryQueues));_0xa218aa[_0xa307('0x2b')](db['User']['findAll'](queryTelephones));_0xa218aa['push'](db[_0xa307('0x32')][_0xa307('0x13')](queryTrunks));_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x19')]['findAll'](queryCampaigns));_0xa218aa[_0xa307('0x2b')](db[_0xa307('0x4')][_0xa307('0x13')](queryAgents));break;case _0xa307('0x33'):_0x38c738[_0x320e16]('voice:inbound');_0x38c738[_0x320e16](_0xa307('0x28'));_0xa218aa[_0xa307('0x2b')](getAssociatedResources(_0xa307('0xd'),_0x4d48ef[_0xa307('0x1d')],_0xa307('0x2c')));_0xa218aa[_0xa307('0x2b')](getAssociatedResources('ChatQueues',_0x4d48ef['userProfileId'],'ChatQueue'));_0xa218aa[_0xa307('0x2b')](getAssociatedResources(_0xa307('0xf'),_0x4d48ef[_0xa307('0x1d')],'FaxQueue'));_0xa218aa[_0xa307('0x2b')](getAssociatedResources(_0xa307('0x10'),_0x4d48ef['userProfileId'],_0xa307('0x2f')));_0xa218aa['push'](getAssociatedResources(_0xa307('0x11'),_0x4d48ef[_0xa307('0x1d')],_0xa307('0x30')));_0xa218aa[_0xa307('0x2b')](getAssociatedResources('OpenchannelQueues',_0x4d48ef[_0xa307('0x1d')],_0xa307('0x31')));_0xa218aa[_0xa307('0x2b')](getAssociatedResources(_0xa307('0x14'),_0x4d48ef[_0xa307('0x1d')],_0xa307('0x4')));_0xa218aa[_0xa307('0x2b')](getAssociatedResources(_0xa307('0x15'),_0x4d48ef['userProfileId'],'Trunk'));_0xa218aa['push'](getAssociatedResources(_0xa307('0x34'),_0x4d48ef[_0xa307('0x1d')],_0xa307('0x19')));_0xa218aa['push'](db[_0xa307('0x4')][_0xa307('0x13')](queryAgents));break;case _0xa307('0x6'):_0x38c738[_0x320e16]('voice:inbound');_0x38c738[_0x320e16](_0xa307('0x28'));_0xa218aa[_0xa307('0x2b')](_0x4d48ef[_0xa307('0x35')]({'attributes':['id',_0xa307('0x2')]}));_0xa218aa[_0xa307('0x2b')](_0x4d48ef[_0xa307('0x36')]({'attributes':['id',_0xa307('0x2')]}));_0xa218aa['push'](_0x4d48ef[_0xa307('0x37')]({'attributes':['id',_0xa307('0x2')]}));_0xa218aa['push'](_0x4d48ef[_0xa307('0x38')]({'attributes':['id',_0xa307('0x2')]}));_0xa218aa['push'](_0x4d48ef['getMailQueues']({'attributes':['id',_0xa307('0x2')]}));_0xa218aa['push'](_0x4d48ef[_0xa307('0x39')]({'attributes':['id',_0xa307('0x2')]}));break;}return BPromise['all'](_0xa218aa);}})[_0xa307('0xb')](function(_0x3a9d8d){if(_0x3a9d8d&&_0x3a9d8d[_0xa307('0x3a')]){for(var _0x270e32=0x0;_0x270e32<_0x3a9d8d[_0xa307('0x3a')];_0x270e32+=0x1){for(var _0x52ccc2=0x0;_0x52ccc2<_0x3a9d8d[_0x270e32][_0xa307('0x3a')];_0x52ccc2+=0x1){switch(_0x270e32){case 0x0:joinOrLeaveQueues(_0x38c738,_0x320e16,_0xa307('0x3b'),_0x3a9d8d[_0x270e32][_0x52ccc2]);break;case 0x1:joinOrLeaveQueues(_0x38c738,_0x320e16,_0xa307('0x3c'),_0x3a9d8d[_0x270e32][_0x52ccc2]);break;case 0x2:joinOrLeaveQueues(_0x38c738,_0x320e16,_0xa307('0x3d'),_0x3a9d8d[_0x270e32][_0x52ccc2]);break;case 0x3:joinOrLeaveQueues(_0x38c738,_0x320e16,_0xa307('0x3e'),_0x3a9d8d[_0x270e32][_0x52ccc2]);break;case 0x4:joinOrLeaveQueues(_0x38c738,_0x320e16,'mail',_0x3a9d8d[_0x270e32][_0x52ccc2]);break;case 0x5:joinOrLeaveQueues(_0x38c738,_0x320e16,_0xa307('0x3f'),_0x3a9d8d[_0x270e32][_0x52ccc2]);break;case 0x6:_0x38c738[_0x320e16](util[_0xa307('0x1a')]('telephone:%s',_0x3a9d8d[_0x270e32][_0x52ccc2][_0xa307('0x2')]));break;case 0x7:_0x38c738[_0x320e16](util[_0xa307('0x1a')](_0xa307('0x40'),_0x3a9d8d[_0x270e32][_0x52ccc2][_0xa307('0x2')]));break;case 0x8:_0x38c738[_0x320e16](util['format'](_0xa307('0x41'),_0x3a9d8d[_0x270e32][_0x52ccc2][_0xa307('0x7')],_0x3a9d8d[_0x270e32][_0x52ccc2]['name']));break;case 0x9:_0x38c738[_0x320e16](util[_0xa307('0x1a')](_0xa307('0x1b'),_0x3a9d8d[_0x270e32][_0x52ccc2]['name']));break;}}}}})[_0xa307('0xb')](function(){if(_0x320e16===_0xa307('0x42')){var _0x48149c=_[_0xa307('0x43')](_0x29cca2[_0xa307('0x20')],'id');return _0x29cca2['removeChatInteractions'](_0x48149c)[_0xa307('0xb')](function(){for(var _0x12b5f2=0x0;_0x12b5f2<_0x48149c[_0xa307('0x3a')];_0x12b5f2+=0x1){_0x42d220[_0xa307('0x44')](_0xa307('0x45'),{'ChatInteractionId':Number(_0x48149c[_0x12b5f2]),'UserId':Number(_0x29cca2['id'])});}});}})['then'](function(){if(_0x320e16==='leave'){var _0x2c9bb1=_[_0xa307('0x43')](_0x29cca2[_0xa307('0x22')],'id');return _0x29cca2['removeMailInteractions'](_0x2c9bb1)[_0xa307('0xb')](function(){for(var _0x2f6e0a=0x0;_0x2f6e0a<_0x2c9bb1[_0xa307('0x3a')];_0x2f6e0a+=0x1){_0x42d220['emit'](_0xa307('0x46'),{'MailInteractionId':Number(_0x2c9bb1[_0x2f6e0a]),'UserId':Number(_0x29cca2['id'])});}});}})[_0xa307('0xb')](function(){if(_0x320e16===_0xa307('0x42')){var _0x113797=_[_0xa307('0x43')](_0x29cca2[_0xa307('0x47')],'id');return _0x29cca2[_0xa307('0x48')](_0x113797)['then'](function(){for(var _0x1b0429=0x0;_0x1b0429<_0x113797[_0xa307('0x3a')];_0x1b0429+=0x1){_0x42d220[_0xa307('0x44')](_0xa307('0x49'),{'FaxInteractionId':Number(_0x113797[_0x1b0429]),'UserId':Number(_0x29cca2['id'])});}});}})[_0xa307('0xb')](function(){if(_0x320e16===_0xa307('0x42')){var _0x35967f=_[_0xa307('0x43')](_0x29cca2[_0xa307('0x25')],'id');return _0x29cca2[_0xa307('0x4a')](_0x35967f)[_0xa307('0xb')](function(){for(var _0x3e2ad2=0x0;_0x3e2ad2<_0x35967f['length'];_0x3e2ad2+=0x1){_0x42d220[_0xa307('0x44')](_0xa307('0x4b'),{'SmsInteractionId':Number(_0x35967f[_0x3e2ad2]),'UserId':Number(_0x29cca2['id'])});}});}})[_0xa307('0xb')](function(){if(_0x320e16===_0xa307('0x42')){var _0x290fb0=_[_0xa307('0x43')](_0x29cca2['OpenchannelInteractions'],'id');return _0x29cca2[_0xa307('0x4c')](_0x290fb0)[_0xa307('0xb')](function(){for(var _0x2864b5=0x0;_0x2864b5<_0x290fb0[_0xa307('0x3a')];_0x2864b5+=0x1){_0x42d220['emit']('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x290fb0[_0x2864b5]),'UserId':Number(_0x29cca2['id'])});}});}})[_0xa307('0x4d')](function(_0x4d4f2b){_0x38c738['log'](_0x4d4f2b);});}}function onDisconnect(_0x2ad0d8,_0x5395d8){joinOrLeave(_0x2ad0d8,_0xa307('0x42'),_0x5395d8);}function onConnect(_0x4adbca){joinOrLeave(_0x4adbca,_0xa307('0x4e'));}exports[_0xa307('0x4f')]=function(_0x43a3ec){_0x43a3ec['on'](_0xa307('0x50'),function(_0x218c21){_0x218c21['setMaxListeners'](0x0);_0x218c21[_0xa307('0x51')]=_0x218c21[_0xa307('0x52')]['connection'][_0xa307('0x53')]+':'+_0x218c21['request'][_0xa307('0x50')][_0xa307('0x54')];_0x218c21[_0xa307('0x55')]=new Date();_0x218c21[_0xa307('0x56')]=function(_0x573e38){console['log'](_0xa307('0x57')+_0x218c21['nsp']['name']+'['+_0x218c21[_0xa307('0x51')]+']',_0x573e38);};_0x218c21['on']('disconnect',function(){onDisconnect(_0x218c21,_0x43a3ec);_0x218c21['log'](_0xa307('0x58'));});onConnect(_0x218c21);_0x218c21['log'](_0xa307('0x59'));});};
\ No newline at end of file
+var _0x1b38=['FaxQueues','FaxQueue','Trunk','getVoiceQueues','getChatQueues','getFaxQueues','getMailQueues','getOpenchannelQueues','all','voice','chat','fax','sms','openchannel','telephone:%s','trunk:%s','leave','removeChatInteractions','user_has_chat_interactions:remove','removeMailInteractions','user_has_mail_interactions:remove','removeFaxInteractions','emit','user_has_fax_interactions:remove','removeSmsInteractions','user_has_sms_interactions:remove','user_has_openchannel_interactions:remove','log','default','connection','setMaxListeners','remoteAddress','request','remotePort','nsp','address','disconnect','DISCONNECTED','CONNECTED','lodash','bluebird','../mysqldb','./environment','Agents','User','role','agent','name','telephone','type','ivr','UserProfileSection','findOne','then','autoAssociation','VoiceQueues','SmsQueues','MailQueues','OpenchannelQueues','findAll','Telephones','Trunks','IvrCampaigns','UserProfileResource','resourceId','map','%s:queue:%s','length','format','user:%s','handshake','userProfileId','query','ChatInteraction','ChatInteractions','MailInteraction','MailInteractions','FaxInteraction','FaxInteractions','SmsInteraction','OpenchannelInteraction','OpenchannelInteractions','admin','hasOwnProperty','include','push','VoiceQueue','ChatQueue','SmsQueue','MailQueue','OpenchannelQueue','user','voice:inbound','voice:outbound','ChatQueues'];(function(_0x39a270,_0xde30ec){var _0x3b3985=function(_0x48c5dc){while(--_0x48c5dc){_0x39a270['push'](_0x39a270['shift']());}};_0x3b3985(++_0xde30ec);}(_0x1b38,0xe5));var _0x81b3=function(_0x38ff5d,_0x1d13f3){_0x38ff5d=_0x38ff5d-0x0;var _0x4ddbf1=_0x1b38[_0x38ff5d];return _0x4ddbf1;};'use strict';var _=require(_0x81b3('0x0'));var util=require('util');var BPromise=require(_0x81b3('0x1'));var db=require(_0x81b3('0x2'))['db'];var config=require(_0x81b3('0x3'));var queryQueues={'attributes':['id','name'],'include':[{'as':_0x81b3('0x4'),'model':db[_0x81b3('0x5')],'attributes':['id','name',_0x81b3('0x6')],'raw':!![],'where':{'role':_0x81b3('0x7')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0x81b3('0x8')],'where':{'role':_0x81b3('0x9')}};var queryTrunks={'raw':!![],'attributes':['id',_0x81b3('0x8')]};var queryAgents={'raw':!![],'attributes':['id','name'],'where':{'role':_0x81b3('0x7')}};var queryCampaigns={'raw':!![],'attributes':['id',_0x81b3('0x8'),_0x81b3('0xa')],'where':{'type':_0x81b3('0xb')}};function getAssociatedResources(_0xa96a16,_0x5b50c3,_0x4e0daa){return db[_0x81b3('0xc')][_0x81b3('0xd')]({'where':{'name':_0xa96a16,'userProfileId':_0x5b50c3},'raw':!![]})[_0x81b3('0xe')](function(_0x1cee68){if(_0x1cee68){if(_0x1cee68[_0x81b3('0xf')]){switch(_0xa96a16){case _0x81b3('0x10'):case'ChatQueues':case'FaxQueues':case _0x81b3('0x11'):case _0x81b3('0x12'):case _0x81b3('0x13'):return db[_0x4e0daa][_0x81b3('0x14')](queryQueues);case _0x81b3('0x15'):return db[_0x4e0daa]['findAll'](queryTelephones);case _0x81b3('0x16'):return db[_0x4e0daa][_0x81b3('0x14')](queryTrunks);case _0x81b3('0x17'):return db[_0x4e0daa][_0x81b3('0x14')](queryCampaigns);}}else{return db[_0x81b3('0x18')][_0x81b3('0x14')]({'attributes':[_0x81b3('0x19')],'where':{'sectionId':_0x1cee68['id']},'raw':!![]})[_0x81b3('0xe')](function(_0x48cfc4){if(_0x48cfc4){var _0x3deb9a={'where':{'id':_[_0x81b3('0x1a')](_0x48cfc4,'resourceId')},'raw':!![]};switch(_0x4e0daa){case'User':_0x3deb9a['where']['role']=_0x81b3('0x9');break;case'Campaign':_0x3deb9a['where'][_0x81b3('0xa')]=_0x81b3('0xb');break;}return db[_0x4e0daa]['findAll'](_0x3deb9a);}else{return[];}});}}else{return[];}})[_0x81b3('0xe')](function(_0x3a1931){return _0x3a1931;});}function joinOrLeaveQueues(_0x3827da,_0x1c651f,_0x597cb7,_0x27ab08){_0x3827da[_0x1c651f](util['format'](_0x81b3('0x1b'),_0x597cb7,_0x27ab08[_0x81b3('0x8')]));if(_0x27ab08['Agents']){for(var _0x5f4d18=0x0;_0x5f4d18<_0x27ab08[_0x81b3('0x4')][_0x81b3('0x1c')];_0x5f4d18+=0x1){_0x3827da[_0x1c651f](util[_0x81b3('0x1d')](_0x81b3('0x1e'),_0x27ab08['Agents'][_0x5f4d18][_0x81b3('0x8')]));}}}function joinOrLeave(_0x4c0725,_0x4465bc,_0x103629){var _0x1e133d;if(_0x4c0725[_0x81b3('0x1f')]['query']['id']){db[_0x81b3('0x5')]['find']({'attributes':['id',_0x81b3('0x8'),_0x81b3('0x6'),_0x81b3('0x20')],'where':{'id':_0x4c0725[_0x81b3('0x1f')][_0x81b3('0x21')]['id']},'include':[{'model':db[_0x81b3('0x22')],'as':_0x81b3('0x23'),'attributes':['id'],'raw':!![]},{'model':db[_0x81b3('0x24')],'as':_0x81b3('0x25'),'attributes':['id'],'raw':!![]},{'model':db[_0x81b3('0x26')],'as':_0x81b3('0x27'),'attributes':['id'],'raw':!![]},{'model':db[_0x81b3('0x28')],'as':'SmsInteractions','attributes':['id'],'raw':!![]},{'model':db[_0x81b3('0x29')],'as':_0x81b3('0x2a'),'attributes':['id'],'raw':!![]}]})[_0x81b3('0xe')](function(_0x263867){if(_0x263867){_0x1e133d=_0x263867;_0x4c0725[_0x4465bc](util[_0x81b3('0x1d')](_0x81b3('0x1e'),_0x263867[_0x81b3('0x8')]));var _0x5cbad2=[];switch(_0x263867['role']){case _0x81b3('0x2b'):_0x4c0725[_0x4465bc]('voice:inbound');_0x4c0725[_0x4465bc]('voice:outbound');if(queryQueues[_0x81b3('0x2c')](_0x81b3('0x2d'))){delete queryQueues[_0x81b3('0x2d')];}_0x5cbad2[_0x81b3('0x2e')](db[_0x81b3('0x2f')]['findAll'](queryQueues));_0x5cbad2[_0x81b3('0x2e')](db[_0x81b3('0x30')][_0x81b3('0x14')](queryQueues));_0x5cbad2[_0x81b3('0x2e')](db['FaxQueue'][_0x81b3('0x14')](queryQueues));_0x5cbad2['push'](db[_0x81b3('0x31')][_0x81b3('0x14')](queryQueues));_0x5cbad2[_0x81b3('0x2e')](db[_0x81b3('0x32')][_0x81b3('0x14')](queryQueues));_0x5cbad2[_0x81b3('0x2e')](db[_0x81b3('0x33')][_0x81b3('0x14')](queryQueues));_0x5cbad2[_0x81b3('0x2e')](db['User']['findAll'](queryTelephones));_0x5cbad2[_0x81b3('0x2e')](db['Trunk'][_0x81b3('0x14')](queryTrunks));_0x5cbad2[_0x81b3('0x2e')](db['Campaign'][_0x81b3('0x14')](queryCampaigns));_0x5cbad2[_0x81b3('0x2e')](db[_0x81b3('0x5')][_0x81b3('0x14')](queryAgents));break;case _0x81b3('0x34'):_0x4c0725[_0x4465bc](_0x81b3('0x35'));_0x4c0725[_0x4465bc](_0x81b3('0x36'));_0x5cbad2[_0x81b3('0x2e')](getAssociatedResources('VoiceQueues',_0x263867[_0x81b3('0x20')],'VoiceQueue'));_0x5cbad2['push'](getAssociatedResources(_0x81b3('0x37'),_0x263867[_0x81b3('0x20')],_0x81b3('0x30')));_0x5cbad2[_0x81b3('0x2e')](getAssociatedResources(_0x81b3('0x38'),_0x263867[_0x81b3('0x20')],_0x81b3('0x39')));_0x5cbad2['push'](getAssociatedResources(_0x81b3('0x11'),_0x263867['userProfileId'],_0x81b3('0x31')));_0x5cbad2['push'](getAssociatedResources(_0x81b3('0x12'),_0x263867[_0x81b3('0x20')],_0x81b3('0x32')));_0x5cbad2['push'](getAssociatedResources(_0x81b3('0x13'),_0x263867['userProfileId'],_0x81b3('0x33')));_0x5cbad2[_0x81b3('0x2e')](getAssociatedResources(_0x81b3('0x15'),_0x263867[_0x81b3('0x20')],'User'));_0x5cbad2[_0x81b3('0x2e')](getAssociatedResources('Trunks',_0x263867['userProfileId'],_0x81b3('0x3a')));_0x5cbad2[_0x81b3('0x2e')](getAssociatedResources(_0x81b3('0x17'),_0x263867[_0x81b3('0x20')],'Campaign'));_0x5cbad2[_0x81b3('0x2e')](db['User'][_0x81b3('0x14')](queryAgents));break;case _0x81b3('0x7'):_0x4c0725[_0x4465bc](_0x81b3('0x35'));_0x4c0725[_0x4465bc](_0x81b3('0x36'));_0x5cbad2[_0x81b3('0x2e')](_0x263867[_0x81b3('0x3b')]({'attributes':['id',_0x81b3('0x8')]}));_0x5cbad2[_0x81b3('0x2e')](_0x263867[_0x81b3('0x3c')]({'attributes':['id','name']}));_0x5cbad2[_0x81b3('0x2e')](_0x263867[_0x81b3('0x3d')]({'attributes':['id','name']}));_0x5cbad2[_0x81b3('0x2e')](_0x263867['getSmsQueues']({'attributes':['id',_0x81b3('0x8')]}));_0x5cbad2[_0x81b3('0x2e')](_0x263867[_0x81b3('0x3e')]({'attributes':['id',_0x81b3('0x8')]}));_0x5cbad2[_0x81b3('0x2e')](_0x263867[_0x81b3('0x3f')]({'attributes':['id',_0x81b3('0x8')]}));break;}return BPromise[_0x81b3('0x40')](_0x5cbad2);}})[_0x81b3('0xe')](function(_0x115c84){if(_0x115c84&&_0x115c84[_0x81b3('0x1c')]){for(var _0x43414f=0x0;_0x43414f<_0x115c84[_0x81b3('0x1c')];_0x43414f+=0x1){for(var _0xa5d3a1=0x0;_0xa5d3a1<_0x115c84[_0x43414f][_0x81b3('0x1c')];_0xa5d3a1+=0x1){switch(_0x43414f){case 0x0:joinOrLeaveQueues(_0x4c0725,_0x4465bc,_0x81b3('0x41'),_0x115c84[_0x43414f][_0xa5d3a1]);break;case 0x1:joinOrLeaveQueues(_0x4c0725,_0x4465bc,_0x81b3('0x42'),_0x115c84[_0x43414f][_0xa5d3a1]);break;case 0x2:joinOrLeaveQueues(_0x4c0725,_0x4465bc,_0x81b3('0x43'),_0x115c84[_0x43414f][_0xa5d3a1]);break;case 0x3:joinOrLeaveQueues(_0x4c0725,_0x4465bc,_0x81b3('0x44'),_0x115c84[_0x43414f][_0xa5d3a1]);break;case 0x4:joinOrLeaveQueues(_0x4c0725,_0x4465bc,'mail',_0x115c84[_0x43414f][_0xa5d3a1]);break;case 0x5:joinOrLeaveQueues(_0x4c0725,_0x4465bc,_0x81b3('0x45'),_0x115c84[_0x43414f][_0xa5d3a1]);break;case 0x6:_0x4c0725[_0x4465bc](util[_0x81b3('0x1d')](_0x81b3('0x46'),_0x115c84[_0x43414f][_0xa5d3a1][_0x81b3('0x8')]));break;case 0x7:_0x4c0725[_0x4465bc](util[_0x81b3('0x1d')](_0x81b3('0x47'),_0x115c84[_0x43414f][_0xa5d3a1][_0x81b3('0x8')]));break;case 0x8:_0x4c0725[_0x4465bc](util['format']('campaign:%s:%s',_0x115c84[_0x43414f][_0xa5d3a1][_0x81b3('0xa')],_0x115c84[_0x43414f][_0xa5d3a1][_0x81b3('0x8')]));break;case 0x9:_0x4c0725[_0x4465bc](util[_0x81b3('0x1d')]('user:%s',_0x115c84[_0x43414f][_0xa5d3a1][_0x81b3('0x8')]));break;}}}}})[_0x81b3('0xe')](function(){if(_0x4465bc===_0x81b3('0x48')){var _0x2566af=_[_0x81b3('0x1a')](_0x1e133d[_0x81b3('0x23')],'id');return _0x1e133d[_0x81b3('0x49')](_0x2566af)['then'](function(){for(var _0xeefbf3=0x0;_0xeefbf3<_0x2566af['length'];_0xeefbf3+=0x1){_0x103629['emit'](_0x81b3('0x4a'),{'ChatInteractionId':Number(_0x2566af[_0xeefbf3]),'UserId':Number(_0x1e133d['id'])});}});}})[_0x81b3('0xe')](function(){if(_0x4465bc===_0x81b3('0x48')){var _0x51fa24=_[_0x81b3('0x1a')](_0x1e133d['MailInteractions'],'id');return _0x1e133d[_0x81b3('0x4b')](_0x51fa24)['then'](function(){for(var _0x1d4a6a=0x0;_0x1d4a6a<_0x51fa24[_0x81b3('0x1c')];_0x1d4a6a+=0x1){_0x103629['emit'](_0x81b3('0x4c'),{'MailInteractionId':Number(_0x51fa24[_0x1d4a6a]),'UserId':Number(_0x1e133d['id'])});}});}})[_0x81b3('0xe')](function(){if(_0x4465bc===_0x81b3('0x48')){var _0x162247=_[_0x81b3('0x1a')](_0x1e133d[_0x81b3('0x27')],'id');return _0x1e133d[_0x81b3('0x4d')](_0x162247)[_0x81b3('0xe')](function(){for(var _0x5d5a32=0x0;_0x5d5a32<_0x162247[_0x81b3('0x1c')];_0x5d5a32+=0x1){_0x103629[_0x81b3('0x4e')](_0x81b3('0x4f'),{'FaxInteractionId':Number(_0x162247[_0x5d5a32]),'UserId':Number(_0x1e133d['id'])});}});}})[_0x81b3('0xe')](function(){if(_0x4465bc==='leave'){var _0x3fb30c=_[_0x81b3('0x1a')](_0x1e133d['SmsInteractions'],'id');return _0x1e133d[_0x81b3('0x50')](_0x3fb30c)[_0x81b3('0xe')](function(){for(var _0x32a68c=0x0;_0x32a68c<_0x3fb30c['length'];_0x32a68c+=0x1){_0x103629[_0x81b3('0x4e')](_0x81b3('0x51'),{'SmsInteractionId':Number(_0x3fb30c[_0x32a68c]),'UserId':Number(_0x1e133d['id'])});}});}})[_0x81b3('0xe')](function(){if(_0x4465bc===_0x81b3('0x48')){var _0x1e2bbe=_['map'](_0x1e133d[_0x81b3('0x2a')],'id');return _0x1e133d['removeOpenchannelInteractions'](_0x1e2bbe)[_0x81b3('0xe')](function(){for(var _0x5c3cec=0x0;_0x5c3cec<_0x1e2bbe[_0x81b3('0x1c')];_0x5c3cec+=0x1){_0x103629[_0x81b3('0x4e')](_0x81b3('0x52'),{'OpenchannelInteractionId':Number(_0x1e2bbe[_0x5c3cec]),'UserId':Number(_0x1e133d['id'])});}});}})['catch'](function(_0x48ccbf){_0x4c0725[_0x81b3('0x53')](_0x48ccbf);});}}function onDisconnect(_0x3e196b,_0x251943){joinOrLeave(_0x3e196b,'leave',_0x251943);}function onConnect(_0x3b1259){joinOrLeave(_0x3b1259,'join');}exports[_0x81b3('0x54')]=function(_0x10376a){_0x10376a['on'](_0x81b3('0x55'),function(_0x78c8b){_0x78c8b[_0x81b3('0x56')](0x0);_0x78c8b['address']=_0x78c8b['request'][_0x81b3('0x55')][_0x81b3('0x57')]+':'+_0x78c8b[_0x81b3('0x58')]['connection'][_0x81b3('0x59')];_0x78c8b['connectedAt']=new Date();_0x78c8b['log']=function(_0xf51a1e){console['log']('SocketIO\x20'+_0x78c8b[_0x81b3('0x5a')][_0x81b3('0x8')]+'['+_0x78c8b[_0x81b3('0x5b')]+']',_0xf51a1e);};_0x78c8b['on'](_0x81b3('0x5c'),function(){onDisconnect(_0x78c8b,_0x10376a);_0x78c8b['log'](_0x81b3('0x5d'));});onConnect(_0x78c8b);_0x78c8b[_0x81b3('0x53')](_0x81b3('0x5e'));});};
\ No newline at end of file
diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js
index 96a5cf5..299c557 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 _0x4bc0=['Mail','MailInteraction','MailMessage','OpenchannelInteraction','Openchannel','OpenchannelMessage','request','EventManager','info','Trigger,\x20%s','error','code','catch','channel','event','direction','UserId','User','find','name','then','interface','format','outgoingmessage','get','opened','changed','closed','length','hasOwnProperty','model','callback','toLowerCase','condition','util','../../mysqldb','jayson/promise','../logger','triggers','client','http','Chat','afterCreate','newinteraction','ChatInteraction','closedinteraction','ChatMessage','newmessage','Sms','SmsInteraction','afterUpdate','SmsMessage','Fax','FaxInteraction','FaxMessage'];(function(_0x2a2385,_0x483814){var _0x2c75=function(_0x1991da){while(--_0x1991da){_0x2a2385['push'](_0x2a2385['shift']());}};_0x2c75(++_0x483814);}(_0x4bc0,0x90));var _0x04bc=function(_0x53fb1b,_0x524dce){_0x53fb1b=_0x53fb1b-0x0;var _0x4a1366=_0x4bc0[_0x53fb1b];return _0x4a1366;};'use strict';var util=require(_0x04bc('0x0'));var db=require(_0x04bc('0x1'))['db'];var jayson=require(_0x04bc('0x2'));var logger=require(_0x04bc('0x3'))(_0x04bc('0x4'));var client=jayson[_0x04bc('0x5')][_0x04bc('0x6')]({'port':0x232a});var triggers=[{'channel':_0x04bc('0x7'),'model':'ChatInteraction','event':_0x04bc('0x8'),'condition':_0x04bc('0x9'),'callback':afterCreate},{'channel':_0x04bc('0x7'),'model':_0x04bc('0xa'),'event':'afterUpdate','condition':_0x04bc('0xb'),'callback':afterUpdate},{'channel':'Chat','model':_0x04bc('0xc'),'event':'afterCreate','condition':_0x04bc('0xd'),'callback':afterCreateMessage},{'channel':_0x04bc('0xe'),'model':'SmsInteraction','event':'afterCreate','condition':_0x04bc('0x9'),'callback':afterCreate},{'channel':_0x04bc('0xe'),'model':_0x04bc('0xf'),'event':_0x04bc('0x10'),'condition':_0x04bc('0xb'),'callback':afterUpdate},{'channel':'Sms','model':_0x04bc('0x11'),'event':_0x04bc('0x8'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0x04bc('0x12'),'model':'FaxInteraction','event':_0x04bc('0x8'),'condition':_0x04bc('0x9'),'callback':afterCreate},{'channel':'Fax','model':_0x04bc('0x13'),'event':_0x04bc('0x10'),'condition':_0x04bc('0xb'),'callback':afterUpdate},{'channel':_0x04bc('0x12'),'model':_0x04bc('0x14'),'event':_0x04bc('0x8'),'condition':_0x04bc('0xd'),'callback':afterCreateMessage},{'channel':_0x04bc('0x15'),'model':_0x04bc('0x16'),'event':'afterCreate','condition':_0x04bc('0x9'),'callback':afterCreate},{'channel':_0x04bc('0x15'),'model':_0x04bc('0x16'),'event':'afterUpdate','condition':'closedinteraction','callback':afterUpdate},{'channel':_0x04bc('0x15'),'model':_0x04bc('0x17'),'event':_0x04bc('0x8'),'condition':_0x04bc('0xd'),'callback':afterCreateMessage},{'channel':'Openchannel','model':_0x04bc('0x18'),'event':_0x04bc('0x8'),'condition':_0x04bc('0x9'),'callback':afterCreate},{'channel':_0x04bc('0x19'),'model':_0x04bc('0x18'),'event':_0x04bc('0x10'),'condition':_0x04bc('0xb'),'callback':afterUpdate},{'channel':_0x04bc('0x19'),'model':_0x04bc('0x1a'),'event':_0x04bc('0x8'),'condition':_0x04bc('0xd'),'callback':afterCreateMessage}];function request(_0x187480){return client[_0x04bc('0x1b')](_0x04bc('0x1c'),_0x187480)['then'](function(_0xed6d0b){logger[_0x04bc('0x1d')](_0x04bc('0x1e'),_0x04bc('0x1c'),_0xed6d0b);if(_0xed6d0b[_0x04bc('0x1f')]){if(_0xed6d0b[_0x04bc('0x1f')][_0x04bc('0x20')]===0x1f4){logger[_0x04bc('0x1f')](_0x04bc('0x1e'),_0x04bc('0x1c'),_0xed6d0b[_0x04bc('0x1f')]);}}})[_0x04bc('0x21')](function(_0x585c65){logger[_0x04bc('0x1f')](_0x04bc('0x1e'),'EventManager',_0x585c65);});}function afterCreateMessage(_0x4cd5e5,_0x41ef24){return function(_0x84505f,_0x397d47){_0x84505f=_0x84505f['get']({'plain':!![]});_0x84505f[_0x04bc('0x22')]=_0x4cd5e5;_0x84505f[_0x04bc('0x23')]=_0x84505f[_0x04bc('0x24')];if(_0x84505f[_0x04bc('0x25')]){return db[_0x04bc('0x26')][_0x04bc('0x27')]({'where':{'id':_0x84505f[_0x04bc('0x25')]},'attributes':['id',_0x04bc('0x28')],'raw':!![]})[_0x04bc('0x29')](function(_0x51e67e){_0x84505f[_0x04bc('0x2a')]=util[_0x04bc('0x2b')]('SIP/%s',_0x51e67e[_0x04bc('0x28')]);_0x84505f['channel']=_0x4cd5e5;return request({'event':'incomingmessage','message':_0x84505f});})['catch'](function(_0x2dda55){console[_0x04bc('0x1f')](_0x2dda55);});}else{return request({'event':_0x04bc('0x2c'),'message':_0x84505f});}};}function afterCreate(_0x1e56fe,_0x5460b2){return function(_0x776d4d,_0x73156e){_0x776d4d=_0x776d4d[_0x04bc('0x2d')]({'plain':!![]});_0x776d4d[_0x04bc('0x22')]=_0x1e56fe;_0x776d4d[_0x04bc('0x23')]=_0x04bc('0x2e');return request({'event':_0x5460b2,'message':_0x776d4d});};}function afterUpdate(_0x96539b,_0x26fe5d){return function(_0x1f173d,_0x19b002){if(_0x1f173d[_0x04bc('0x2f')](_0x04bc('0x30'))&&_0x1f173d['closed']){_0x1f173d=_0x1f173d['get']({'plain':!![]});_0x1f173d[_0x04bc('0x22')]=_0x96539b;_0x1f173d[_0x04bc('0x23')]=_0x04bc('0x30');if(_0x1f173d['UserId']){return db[_0x04bc('0x26')][_0x04bc('0x27')]({'where':{'id':_0x1f173d[_0x04bc('0x25')]},'attributes':['id',_0x04bc('0x28')],'raw':!![]})['then'](function(_0x545997){_0x1f173d[_0x04bc('0x2a')]=util[_0x04bc('0x2b')]('SIP/%s',_0x545997['name']);return request({'event':_0x26fe5d,'message':_0x1f173d});})[_0x04bc('0x21')](function(_0x39fc13){console[_0x04bc('0x1f')](_0x39fc13);});}else{return request({'event':_0x26fe5d,'message':_0x1f173d});}}};}exports['default']=function(){for(var _0x1a8bce=0x0;_0x1a8bce=_0x103730['agents']){throw Error(_0x68e6('0x11'));}_0x2a89af(_0x28c80f);})[_0x68e6('0x12')](function(_0x43bb67){_0xd61849(_0x43bb67);});});};
\ No newline at end of file
+var _0xbbc1=['role','User','count','agent','then','agents','catch','bluebird','voice','fax','sms','openchannel','getChannels','isValidChannel','toLowerCase','includes','clearBlockUser','isUndefined','blockedAt','updateAttributes','getLicense'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xbbc1,0x103));var _0x1bbc=function(_0x1001d2,_0x3be9a1){_0x1001d2=_0x1001d2-0x0;var _0x382391=_0xbbc1[_0x1001d2];return _0x382391;};'use strict';var _=require('lodash');var BPromise=require(_0x1bbc('0x0'));var db=require('../mysqldb')['db'];var util=require('./license/util');var channels=[_0x1bbc('0x1'),'mail','chat',_0x1bbc('0x2'),_0x1bbc('0x3'),_0x1bbc('0x4')];exports[_0x1bbc('0x5')]=function(){return channels;};exports[_0x1bbc('0x6')]=function(_0x1b8b91){_0x1b8b91=_0x1b8b91[_0x1bbc('0x7')]();return _[_0x1bbc('0x8')](channels,_0x1b8b91);};exports[_0x1bbc('0x9')]=function(_0x21d728,_0x36a7db,_0x157fc6,_0x5c287b){var _0x2f8c88={'loginAttempts':_0x36a7db,'blocked':_0x157fc6};if(!_[_0x1bbc('0xa')](_0x5c287b)){_0x2f8c88[_0x1bbc('0xb')]=_0x5c287b;}return _0x21d728[_0x1bbc('0xc')](_0x2f8c88);};exports[_0x1bbc('0xd')]=function(_0x5eccd3){return new BPromise(function(_0x4803f2,_0x2b8000){var _0x5add21=0x0;if(_0x5eccd3[_0x1bbc('0xe')]!=='agent'){_0x4803f2(_0x5eccd3);}db[_0x1bbc('0xf')][_0x1bbc('0x10')]({'where':{'role':_0x1bbc('0x11'),'online':!![],'id':{'$ne':_0x5eccd3['id']}}})[_0x1bbc('0x12')](function(_0x36ff94){_0x5add21=_0x36ff94;return util[_0x1bbc('0xd')]();})[_0x1bbc('0x12')](function(_0xb74632){if(_0xb74632&&_0xb74632[_0x1bbc('0x13')]&&_0x5add21>=_0xb74632[_0x1bbc('0x13')]){throw Error('Maximum\x20login\x20has\x20been\x20reached');}_0x4803f2(_0x5eccd3);})[_0x1bbc('0x14')](function(_0x4bf685){_0x2b8000(_0x4bf685);});});};
\ No newline at end of file
diff --git a/server/errors/index.js b/server/errors/index.js
index 1818d9f..3eef527 100644
--- a/server/errors/index.js
+++ b/server/errors/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x44b5=['json','send','404','status'];(function(_0x311909,_0x414bf7){var _0x8d3163=function(_0x226f55){while(--_0x226f55){_0x311909['push'](_0x311909['shift']());}};_0x8d3163(++_0x414bf7);}(_0x44b5,0xbe));var _0x544b=function(_0x4749d2,_0x22be1e){_0x4749d2=_0x4749d2-0x0;var _0x5c1340=_0x44b5[_0x4749d2];return _0x5c1340;};'use strict';module['exports'][0x194]=function pageNotFound(_0x433e5b,_0x1d9868){var _0x405c51=_0x544b('0x0');var _0x360eb8=0x194;var _0x5418ef={'status':_0x360eb8};_0x1d9868[_0x544b('0x1')](_0x5418ef[_0x544b('0x1')]);_0x1d9868['render'](_0x405c51,{},function(_0x4b5888,_0x74d468){if(_0x4b5888){return _0x1d9868[_0x544b('0x1')](_0x5418ef[_0x544b('0x1')])[_0x544b('0x2')](_0x5418ef);}_0x1d9868[_0x544b('0x3')](_0x74d468);});};
\ No newline at end of file
+var _0x5c25=['render','json','send','404','status'];(function(_0x1922e5,_0x103563){var _0x49708b=function(_0x2afdf7){while(--_0x2afdf7){_0x1922e5['push'](_0x1922e5['shift']());}};_0x49708b(++_0x103563);}(_0x5c25,0x148));var _0x55c2=function(_0x338c81,_0x566dff){_0x338c81=_0x338c81-0x0;var _0x4b1fa0=_0x5c25[_0x338c81];return _0x4b1fa0;};'use strict';module['exports'][0x194]=function pageNotFound(_0xc71964,_0x17ec61){var _0x4eb494=_0x55c2('0x0');var _0x4ebfbe=0x194;var _0x74c909={'status':_0x4ebfbe};_0x17ec61[_0x55c2('0x1')](_0x74c909[_0x55c2('0x1')]);_0x17ec61[_0x55c2('0x2')](_0x4eb494,{},function(_0x58e950,_0x32361f){if(_0x58e950){return _0x17ec61[_0x55c2('0x1')](_0x74c909['status'])[_0x55c2('0x3')](_0x74c909);}_0x17ec61[_0x55c2('0x4')](_0x32361f);});};
\ No newline at end of file
diff --git a/server/mysqldb/index.js b/server/mysqldb/index.js
index 74fc1d9..f03f662 100644
--- a/server/mysqldb/index.js
+++ b/server/mysqldb/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8a7=['../api/chatInteraction/chatInteraction.model','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','../api/chatGroup/chatGroup.model','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','../api/cmCompany/cmCompany.model','CmContact','../api/cmContact/cmContact.model','CmHopper','CmHopperBlack','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/reportAgentPreview/reportAgentPreview.model','../api/cmCustomField/cmCustomField.model','Automation','../api/automation/automation.model','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','../api/disposition/disposition.model','Condition','../api/condition/condition.model','Interval','Pause','../api/pause/pause.model','Cdr','../api/cdr/cdr.model','VoiceQueuesLog','../api/voiceQueuesLog/voiceQueuesLog.model','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','IntegrationReport','../api/integrationReport/integrationReport.model','../api/analyticCustomReport/analyticCustomReport.model','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','AnalyticMetric','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','SalesforceField','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','../api/intDeskField/intDeskField.model','ZohoAccount','ZohoConfiguration','ZohoField','../api/intZohoField/intZohoField.model','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','FreshdeskAccount','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','VtigerAccount','VtigerConfiguration','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','../api/intServicenowField/intServicenowField.model','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','Network','../api/network/network.model','ChatQueueReport','../api/chatInternalMessage/chatInternalMessage.model','JscriptyQuestionReport','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','SquareDetailsReport','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','SquareOdbc','SquareProject','SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','Team','../api/team/team.model','License','Campaign','../api/campaign/campaign.model','../api/migration/migration.model','Attachment','../api/attachment/attachment.model','Plugin','../api/plugin/plugin.model','MailTransferReport','ChatTransferReport','../api/chatTransferReport/chatTransferReport.model','../api/faxTransferReport/faxTransferReport.model','../api/openchannelTransferReport/openchannelTransferReport.model','../api/smsTransferReport/smsTransferReport.model','CmList','../api/cmList/cmList.model','../api/voicePrefix/voicePrefix.model','UserProfile','../api/userProfile/userProfile.model','UserProfileResource','hasOne','cascade','UserId','hasMany','Recordings','VoiceQueuesRt','Extensions','CmHopperFinal','HopperFinals','HopperHistory','OpenchannelInteractions','ChatInteractions','SmsInteraction','SmsInteractions','FaxInteractions','MailInteractions','userProfileId','belongsToMany','Groups','chat_group_has_users','Contacts','cm_user_has_contacts','cm_user_has_lists','user_has_teams','user_has_chat_interactions','user_has_fax_interactions','user_has_sms_interactions','user_has_openchannel_interactions','VoiceQueues','UserVoiceQueue','MailQueues','ChatQueues','FaxQueue','SmsQueues','OpenchannelQueues','VoicePrefix','user_has_voice_prefixes','ChatWebsites','user_has_chat_websites','FaxAccounts','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','user_has_sms_accounts','SquareProjects','user_has_square_projects','ChanSpyId','Applications','Sounds','moh_has_sounds','Members','VoiceQueueId','Hoppers','HopperHistories','HopperBlacks','JscriptySessions','belongsTo','Trunk','TrunkId','TrunkBackup','TrunkBackupId','mandatoryDispositionPauseId','Lists','voice_queues_has_cm_lists','Agents','Teams','BlackLists','voice_queues_has_cm_blacklists','mailboxuser','mailbox','QueueCalls','uniqueid','AgentReports','Contact','ContactId','MailAccountId','MailServerIn','Imap','Smtp','Dispositions','Answers','Interactions','team_has_mail_queues','Messages','MailInteractionId','Owner','mail_interaction_has_tags','Tags','ThroughTags','user_has_mail_interactions','Attachments','Account','restrict','TagId','List','ListId','Items','Disposition','FaxAccountId','FaxApplication','Exntensions','mandatoryDispositionPause','FaxInteractionId','Users','Interaction','AttachmentId','SmsAccountId','IntervalId','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelMessage','OpenchannelInteractionId','openchannel_interaction_has_tags','OpenchannelQueueId','team_has_openchannel_queues','ChatWebsiteId','ProactiveActions','ChatMessage','OpenchannelQueueReport','Agent','ChatApplication','Queue','ChatInteractionId','chat_interaction_has_tags','ChatOfflineMessage','team_has_chat_queues','ChatGroup','ChatGroupId','Website','CmCompany','ReportAgentPreview','Company','cm_contact_has_tags','CampaignId','OwnerId','All','OneAll','AutomationAllId','Any','Action','Actions','Intervals','MailApplications','FaxApplications','DefaultReportId','AnalyticCustomReport','CustomReportId','fax_interaction_has_tags','AllCondition','TriggerAllId','AnyConditions','AnyCondition','Fields','AnalyticDefaultReport','MetricId','Configurations','AccountId','SubjectId','Descriptions','Subject','Description','Field','FieldId','VariableId','Subjects','DescriptionId','DeskField','int_desk_configuration_has_tags','ZendeskConfiguration','int_zendesk_configuration_has_tags','int_freshdesk_configuration_has_tags','ServicenowAccount','ServicenowField','Dynamics365Account','FreshsalesAccount','ChatInternalMessage','ToId','SessionId','ProjectId','JscriptyAnswerReport','campaigns_has_cm_lists','campaigns_has_cm_blacklists','FromMailAccountId','FromAccount','FromUserId','ToAgent','ToAccount','FromChatWebsiteId','ToChatQueueId','FaxTransferReport','FromAgent','ToUserId','ToFaxQueueId','ToQueue','OpenchannelTransferReport','FromOpenchannelAccountId','ToOpenchannelQueueId','ToOpenchannelAccountId','SmsTransferReport','FromSmsAccountId','ToSmsQueueId','ToSmsAccountId','CustomFields','Queues','UserProfileSections','UserProfileSection','Resources','exports','path','sequelize','lodash','jstz','determine','defaultsDeep','motion2','mysql','utf8mb4','name','utf8','sequelizeHistory','xC@LL1234','127.0.0.1','utf8_general_ci','database','password','options','username','User','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','import','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','VoiceRecording','../api/voiceRecording/voiceRecording.model','ScreenRecording','VoiceMail','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','../api/trunk/trunk.model','VoiceTransferReport','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueue/userVoiceQueue.model','UserChatQueue','UserMailQueue','UserFaxQueue','UserSmsQueue','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','../api/mailServerIn/mailServerIn.model','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','../api/mailSubstatus/mailSubstatus.model','MailInteraction','MailMessage','../api/mailMessage/mailMessage.model','MailApplication','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','Dashboard','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxInteraction','../api/faxInteraction/faxInteraction.model','FaxMessage','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','SmsApplication','../api/smsApplication/smsApplication.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','OpenchannelApplication','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','ChatWebsite','../api/chatWebsite/chatWebsite.model','../api/chatApplication/chatApplication.model','ChatInteraction'];(function(_0x46066f,_0x23105c){var _0x411977=function(_0x5743ff){while(--_0x5743ff){_0x46066f['push'](_0x46066f['shift']());}};_0x411977(++_0x23105c);}(_0xd8a7,0x15e));var _0x7d8a=function(_0x1bbf30,_0x11d481){_0x1bbf30=_0x1bbf30-0x0;var _0x5da038=_0xd8a7[_0x1bbf30];return _0x5da038;};'use strict';var path=require(_0x7d8a('0x0'));var config=require('../config/environment');var Sequelize=require(_0x7d8a('0x1'));var _=require(_0x7d8a('0x2'));var jstz=require(_0x7d8a('0x3'));var timezone=jstz[_0x7d8a('0x4')]();config[_0x7d8a('0x1')]=_[_0x7d8a('0x5')](config[_0x7d8a('0x1')],{'database':_0x7d8a('0x6'),'username':'xcall','password':'xC@LL1234','options':{'host':'127.0.0.1','port':0xcea,'dialect':_0x7d8a('0x7'),'dialectOptions':{'charset':_0x7d8a('0x8')},'logging':![],'timezone':timezone[_0x7d8a('0x9')](),'define':{'charset':_0x7d8a('0xa'),'collate':'utf8_general_ci'}}});config[_0x7d8a('0xb')]=_[_0x7d8a('0x5')](config[_0x7d8a('0xb')],{'database':'motion2','username':'xcall','password':_0x7d8a('0xc'),'options':{'host':_0x7d8a('0xd'),'port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0x7d8a('0x8')},'logging':![],'timezone':timezone[_0x7d8a('0x9')](),'define':{'charset':_0x7d8a('0xa'),'collate':_0x7d8a('0xe')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize'][_0x7d8a('0xf')],config[_0x7d8a('0x1')]['username'],config[_0x7d8a('0x1')][_0x7d8a('0x10')],config[_0x7d8a('0x1')][_0x7d8a('0x11')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x7d8a('0xb')][_0x7d8a('0xf')],config[_0x7d8a('0xb')][_0x7d8a('0x12')],config[_0x7d8a('0xb')][_0x7d8a('0x10')],config[_0x7d8a('0xb')][_0x7d8a('0x11')])};db[_0x7d8a('0x13')]=db['sequelize']['import'](_0x7d8a('0x14'));db[_0x7d8a('0x15')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x16'));db[_0x7d8a('0x17')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x19'));db[_0x7d8a('0x1a')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x1b'));db[_0x7d8a('0x1c')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x1d'));db[_0x7d8a('0x1e')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x1f'));db[_0x7d8a('0x20')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x21'));db[_0x7d8a('0x22')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/screenRecording/screenRecording.model');db[_0x7d8a('0x23')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x24'));db[_0x7d8a('0x25')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x26'));db[_0x7d8a('0x27')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x28'));db[_0x7d8a('0x29')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x2a'));db[_0x7d8a('0x2b')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/voiceAgentReport/voiceAgentReport.model');db[_0x7d8a('0x2c')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x2d'));db[_0x7d8a('0x2e')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x2f'));db['Trunk']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x30'));db[_0x7d8a('0x31')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x32'));db[_0x7d8a('0x33')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/userVoiceQueueRt/userVoiceQueueRt.model');db['UserVoiceQueue']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x34'));db[_0x7d8a('0x35')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/userChatQueue/userChatQueue.model');db[_0x7d8a('0x36')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/userMailQueue/userMailQueue.model');db[_0x7d8a('0x37')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/userFaxQueue/userFaxQueue.model');db[_0x7d8a('0x38')]=db[_0x7d8a('0x1')]['import']('../api/userSmsQueue/userSmsQueue.model');db[_0x7d8a('0x39')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x3a'));db['MailServerIn']=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x3b'));db['MailServerOut']=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/mailServerOut/mailServerOut.model');db[_0x7d8a('0x3c')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x3d'));db[_0x7d8a('0x3e')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x3f'));db[_0x7d8a('0x40')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x41'));db[_0x7d8a('0x42')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/mailInteraction/mailInteraction.model');db[_0x7d8a('0x43')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x44'));db[_0x7d8a('0x45')]=db[_0x7d8a('0x1')]['import']('../api/mailApplication/mailApplication.model');db[_0x7d8a('0x46')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x47'));db[_0x7d8a('0x48')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x49'));db[_0x7d8a('0x4a')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x4b'));db[_0x7d8a('0x4c')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x4d'));db['FaxApplication']=db[_0x7d8a('0x1')]['import']('../api/faxApplication/faxApplication.model');db[_0x7d8a('0x4e')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x4f'));db[_0x7d8a('0x50')]=db['sequelize'][_0x7d8a('0x18')]('../api/faxMessage/faxMessage.model');db['FaxQueue']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x51'));db[_0x7d8a('0x52')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x53'));db[_0x7d8a('0x54')]=db['sequelize'][_0x7d8a('0x18')]('../api/smsAccount/smsAccount.model');db[_0x7d8a('0x55')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x56'));db['SmsInteraction']=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/smsInteraction/smsInteraction.model');db[_0x7d8a('0x57')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x58'));db[_0x7d8a('0x59')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x5a'));db[_0x7d8a('0x5b')]=db['sequelize']['import']('../api/openchannelAccount/openchannelAccount.model');db[_0x7d8a('0x5c')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/openchannelApplication/openchannelApplication.model');db[_0x7d8a('0x5d')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x5e'));db['OpenchannelMessage']=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x5f'));db[_0x7d8a('0x60')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x61'));db[_0x7d8a('0x62')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x63'));db['OpenchannelQueueReport']=db[_0x7d8a('0x1')]['import']('../api/openchannelQueueReport/openchannelQueueReport.model');db['ChatApplication']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x64'));db[_0x7d8a('0x65')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x66'));db['ChatMessage']=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/chatMessage/chatMessage.model');db['ChatOfflineMessage']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x67'));db[_0x7d8a('0x68')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/chatQueue/chatQueue.model');db['ChatGroup']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x69'));db[_0x7d8a('0x6a')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x6b'));db['CmCompany']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x6c'));db[_0x7d8a('0x6d')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x6e'));db[_0x7d8a('0x6f')]=db['sequelize'][_0x7d8a('0x18')]('../api/cmHopper/cmHopper.model');db[_0x7d8a('0x70')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/cmHopperBlack/cmHopperBlack.model');db['CmHopperFinal']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x71'));db[_0x7d8a('0x72')]=db[_0x7d8a('0x1')]['import']('../api/cmHopperHistory/cmHopperHistory.model');db['ReportAgentPreview']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x73'));db['CmCustomField']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x74'));db['Action']=db[_0x7d8a('0x1')]['import']('../api/action/action.model');db[_0x7d8a('0x75')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x76'));db[_0x7d8a('0x77')]=db['sequelize']['import'](_0x7d8a('0x78'));db['Disposition']=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x79'));db[_0x7d8a('0x7a')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x7b'));db[_0x7d8a('0x7c')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/interval/interval.model');db[_0x7d8a('0x7d')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x7e'));db[_0x7d8a('0x7f')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x80'));db[_0x7d8a('0x81')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x82'));db[_0x7d8a('0x83')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x84'));db[_0x7d8a('0x85')]=db['sequelize']['import'](_0x7d8a('0x86'));db[_0x7d8a('0x87')]=db['sequelize']['import'](_0x7d8a('0x88'));db[_0x7d8a('0x89')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x8a'));db[_0x7d8a('0x8b')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0x8c'));db[_0x7d8a('0x8d')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x8e'));db[_0x7d8a('0x8f')]=db[_0x7d8a('0x1')]['import']('../api/integration/integration.model');db[_0x7d8a('0x90')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x91'));db['AnalyticCustomReport']=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x92'));db['AnalyticDefaultReport']=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x93'));db[_0x7d8a('0x94')]=db[_0x7d8a('0x1')]['import']('../api/analyticExtractedReport/analyticExtractedReport.model');db[_0x7d8a('0x95')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/analyticMetric/analyticMetric.model');db[_0x7d8a('0x96')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x97'));db['AnalyticTreeReport']=db[_0x7d8a('0x1')]['import']('../api/analyticTreeReport/analyticTreeReport.model');db[_0x7d8a('0x98')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x99'));db[_0x7d8a('0x9a')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/intSalesforceConfiguration/intSalesforceConfiguration.model');db[_0x7d8a('0x9b')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0x9c'));db[_0x7d8a('0x9d')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0x9e'));db[_0x7d8a('0x9f')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xa0'));db[_0x7d8a('0xa1')]=db['sequelize']['import'](_0x7d8a('0xa2'));db[_0x7d8a('0xa3')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xa4'));db[_0x7d8a('0xa5')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0xa6'));db['DeskField']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xa7'));db[_0x7d8a('0xa8')]=db['sequelize'][_0x7d8a('0x18')]('../api/intZohoAccount/intZohoAccount.model');db[_0x7d8a('0xa9')]=db['sequelize']['import']('../api/intZohoConfiguration/intZohoConfiguration.model');db[_0x7d8a('0xaa')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xab'));db[_0x7d8a('0xac')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0xad'));db['ZendeskConfiguration']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xae'));db[_0x7d8a('0xaf')]=db['sequelize']['import']('../api/intZendeskField/intZendeskField.model');db[_0x7d8a('0xb0')]=db[_0x7d8a('0x1')]['import']('../api/intFreshdeskAccount/intFreshdeskAccount.model');db[_0x7d8a('0xb1')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xb2'));db[_0x7d8a('0xb3')]=db['sequelize'][_0x7d8a('0x18')]('../api/intFreshdeskField/intFreshdeskField.model');db[_0x7d8a('0xb4')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/intVtigerAccount/intVtigerAccount.model');db[_0x7d8a('0xb5')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xb6'));db[_0x7d8a('0xb7')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0xb8'));db['ServicenowAccount']=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/intServicenowAccount/intServicenowAccount.model');db[_0x7d8a('0xb9')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xba'));db['ServicenowField']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xbb'));db['Dynamics365Account']=db['sequelize'][_0x7d8a('0x18')]('../api/intDynamics365Account/intDynamics365Account.model');db[_0x7d8a('0xbc')]=db['sequelize']['import'](_0x7d8a('0xbd'));db[_0x7d8a('0xbe')]=db['sequelize'][_0x7d8a('0x18')]('../api/intDynamics365Field/intDynamics365Field.model');db['FreshsalesAccount']=db['sequelize']['import'](_0x7d8a('0xbf'));db[_0x7d8a('0xc0')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xc1'));db[_0x7d8a('0xc2')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xc3'));db[_0x7d8a('0x8f')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/integration/integration.model');db[_0x7d8a('0xc4')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xc5'));db[_0x7d8a('0xc6')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/chatQueueReport/chatQueueReport.model');db['ChatInternalMessage']=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0xc7'));db['JscriptyAnswerReport']=db[_0x7d8a('0x1')]['import']('../api/jscriptyAnswerReport/jscriptyAnswerReport.model');db[_0x7d8a('0xc8')]=db[_0x7d8a('0x1')]['import']('../api/jscriptyQuestionReport/jscriptyQuestionReport.model');db[_0x7d8a('0xc9')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xca'));db[_0x7d8a('0xcb')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xcc'));db[_0x7d8a('0xcd')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/squareReport/squareReport.model');db[_0x7d8a('0xce')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/squareReportDetail/squareReportDetail.model');db[_0x7d8a('0xcf')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xd0'));db[_0x7d8a('0xd1')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xd2'));db[_0x7d8a('0xd3')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/squareOdbc/squareOdbc.model');db[_0x7d8a('0xd4')]=db['sequelize'][_0x7d8a('0x18')]('../api/squareProject/squareProject.model');db[_0x7d8a('0xd5')]=db['sequelize']['import'](_0x7d8a('0xd6'));db[_0x7d8a('0xd7')]=db['sequelize']['import'](_0x7d8a('0xd8'));db[_0x7d8a('0xd9')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xda'));db[_0x7d8a('0xdb')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/license/license.model');db[_0x7d8a('0xdc')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xdd'));db['Migration']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xde'));db[_0x7d8a('0xdf')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xe0'));db[_0x7d8a('0xe1')]=db['sequelize']['import'](_0x7d8a('0xe2'));db[_0x7d8a('0xe3')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/mailTransferReport/mailTransferReport.model');db[_0x7d8a('0xe4')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xe5'));db['FaxTransferReport']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xe6'));db['OpenchannelTransferReport']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xe7'));db['SmsTransferReport']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xe8'));db[_0x7d8a('0xe9')]=db[_0x7d8a('0x1')]['import'](_0x7d8a('0xea'));db['VoicePrefix']=db[_0x7d8a('0x1')][_0x7d8a('0x18')](_0x7d8a('0xeb'));db[_0x7d8a('0xec')]=db['sequelize'][_0x7d8a('0x18')](_0x7d8a('0xed'));db['UserProfileSection']=db['sequelize']['import']('../api/userProfileSection/userProfileSection.model');db[_0x7d8a('0xee')]=db[_0x7d8a('0x1')][_0x7d8a('0x18')]('../api/userProfileResource/userProfileResource.model');db['User'][_0x7d8a('0xef')](db[_0x7d8a('0x23')],{'as':_0x7d8a('0x23'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db['VoiceRecording'],{'as':_0x7d8a('0xf3'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db[_0x7d8a('0x33')],{'as':_0x7d8a('0xf4'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a')],{'as':_0x7d8a('0xf5'),'onDelete':'cascade','hooks':!![]});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db[_0x7d8a('0xf6')],{'as':_0x7d8a('0xf7'),'foreignKey':_0x7d8a('0xf1')});db['User']['hasMany'](db[_0x7d8a('0x72')],{'as':_0x7d8a('0xf8'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db['ReportAgentPreview'],{'as':'ReportAgentPreview','foreignKey':'UserId'});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db['OpenchannelInteraction'],{'as':_0x7d8a('0xf9'),'foreignKey':_0x7d8a('0xf1')});db['User'][_0x7d8a('0xf2')](db['ChatInteraction'],{'as':_0x7d8a('0xfa'),'foreignKey':'UserId'});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db[_0x7d8a('0xfb')],{'as':_0x7d8a('0xfc'),'foreignKey':_0x7d8a('0xf1')});db['User']['hasMany'](db[_0x7d8a('0x4e')],{'as':_0x7d8a('0xfd'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x13')][_0x7d8a('0xf2')](db[_0x7d8a('0x42')],{'as':_0x7d8a('0xfe'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x13')]['belongsTo'](db['UserProfile'],{'as':_0x7d8a('0xec'),'foreignKey':_0x7d8a('0xff')});db['User'][_0x7d8a('0x100')](db['ChatGroup'],{'as':_0x7d8a('0x101'),'through':_0x7d8a('0x102')});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x103'),'through':_0x7d8a('0x104')});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0xe9')],{'as':'Lists','through':_0x7d8a('0x105')});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0xd9')],{'through':_0x7d8a('0x106')});db['User']['belongsToMany'](db[_0x7d8a('0x42')],{'as':_0x7d8a('0xfe'),'through':'user_has_mail_interactions'});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0x65')],{'as':_0x7d8a('0xfa'),'through':_0x7d8a('0x107')});db['User'][_0x7d8a('0x100')](db['FaxInteraction'],{'as':_0x7d8a('0xfd'),'through':_0x7d8a('0x108')});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0xfb')],{'as':'SmsInteractions','through':_0x7d8a('0x109')});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0x5d')],{'as':'OpenchannelInteractions','through':_0x7d8a('0x10a')});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0x1e')],{'as':_0x7d8a('0x10b'),'through':_0x7d8a('0x10c'),'required':![]});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db['MailQueue'],{'as':_0x7d8a('0x10d'),'through':_0x7d8a('0x36'),'required':![]});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0x68')],{'as':_0x7d8a('0x10e'),'through':_0x7d8a('0x35'),'required':![],'hooks':!![]});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0x10f')],{'as':'FaxQueues','through':'UserFaxQueue','required':![]});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0x59')],{'as':_0x7d8a('0x110'),'through':_0x7d8a('0x38'),'required':![]});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0x60')],{'as':_0x7d8a('0x111'),'through':_0x7d8a('0x39'),'required':![]});db['User'][_0x7d8a('0x100')](db['CmList'],{'through':_0x7d8a('0x105')});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0x112')],{'as':'VoicePrefixes','through':_0x7d8a('0x113'),'required':![]});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0x62')],{'as':_0x7d8a('0x114'),'through':_0x7d8a('0x115')});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0x4c')],{'as':_0x7d8a('0x116'),'through':_0x7d8a('0x117')});db[_0x7d8a('0x13')]['belongsToMany'](db[_0x7d8a('0x3c')],{'as':_0x7d8a('0x118'),'through':_0x7d8a('0x119')});db[_0x7d8a('0x13')][_0x7d8a('0x100')](db[_0x7d8a('0x5b')],{'as':_0x7d8a('0x11a'),'through':_0x7d8a('0x11b')});db['User'][_0x7d8a('0x100')](db[_0x7d8a('0x54')],{'as':'SmsAccounts','through':_0x7d8a('0x11c')});db['User'][_0x7d8a('0x100')](db['SquareProject'],{'as':_0x7d8a('0x11d'),'through':_0x7d8a('0x11e')});db[_0x7d8a('0x15')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a')],{'as':'SpiedAgents','onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x11f')});db[_0x7d8a('0x17')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a')],{'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x1a')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a')],{'as':_0x7d8a('0x120'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x1c')][_0x7d8a('0x100')](db[_0x7d8a('0x85')],{'as':_0x7d8a('0x121'),'through':_0x7d8a('0x122')});db[_0x7d8a('0x1e')][_0x7d8a('0xf2')](db[_0x7d8a('0x33')],{'as':_0x7d8a('0x123'),'foreignKey':_0x7d8a('0x124')});db[_0x7d8a('0x1e')][_0x7d8a('0xf2')](db[_0x7d8a('0x6f')],{'as':_0x7d8a('0x125'),'foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0x7d8a('0xf2')](db[_0x7d8a('0xf6')],{'as':_0x7d8a('0xf7'),'foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0x7d8a('0xf2')](db['CmHopperHistory'],{'as':_0x7d8a('0x126'),'foreignKey':_0x7d8a('0x124')});db[_0x7d8a('0x1e')]['hasMany'](db['ReportAgentPreview'],{'as':'ReportAgentPreview','foreignKey':_0x7d8a('0x124')});db[_0x7d8a('0x1e')][_0x7d8a('0xf2')](db['CmHopperBlack'],{'as':_0x7d8a('0x127'),'foreignKey':_0x7d8a('0x124')});db['VoiceQueue']['hasMany'](db[_0x7d8a('0xc9')],{'as':_0x7d8a('0x128'),'foreignKey':_0x7d8a('0x124')});db[_0x7d8a('0x1e')][_0x7d8a('0x129')](db['Trunk'],{'as':_0x7d8a('0x12a'),'foreignKey':_0x7d8a('0x12b')});db['VoiceQueue'][_0x7d8a('0x129')](db[_0x7d8a('0x12a')],{'as':_0x7d8a('0x12c'),'foreignKey':_0x7d8a('0x12d')});db['VoiceQueue'][_0x7d8a('0x129')](db[_0x7d8a('0x7c')],{'as':'Interval','foreignKey':'IntervalId'});db['VoiceQueue'][_0x7d8a('0x129')](db[_0x7d8a('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':_0x7d8a('0x12e')});db[_0x7d8a('0x1e')][_0x7d8a('0x100')](db['CmList'],{'as':_0x7d8a('0x12f'),'through':_0x7d8a('0x130')});db['VoiceQueue'][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x10c')});db[_0x7d8a('0x1e')][_0x7d8a('0x100')](db[_0x7d8a('0xd9')],{'as':_0x7d8a('0x132'),'through':'team_has_voice_queues'});db[_0x7d8a('0x1e')][_0x7d8a('0x100')](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x133'),'through':_0x7d8a('0x134')});db['VoiceRecording'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x13'),'foreignKey':'UserId'});db[_0x7d8a('0x22')]['belongsTo'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x13'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x23')][_0x7d8a('0xf2')](db[_0x7d8a('0x25')],{'as':'Messages','onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x135'),'sourceKey':'mailbox'});db[_0x7d8a('0x25')][_0x7d8a('0x129')](db['VoiceMail'],{'foreignKey':_0x7d8a('0x135'),'targetKey':_0x7d8a('0x136')});db['VoiceCallReport']['hasMany'](db[_0x7d8a('0x2c')],{'as':_0x7d8a('0x137'),'foreignKey':_0x7d8a('0x138'),'constraints':![]});db[_0x7d8a('0x27')][_0x7d8a('0xf2')](db[_0x7d8a('0x2b')],{'as':_0x7d8a('0x139'),'foreignKey':_0x7d8a('0x138'),'constraints':![]});db[_0x7d8a('0x27')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x13'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x27')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db['MailServerIn'][_0x7d8a('0x129')](db['MailAccount'],{'as':'MailAccount','foreignKey':_0x7d8a('0x13c')});db['MailServerOut'][_0x7d8a('0x129')](db[_0x7d8a('0x3c')],{'as':_0x7d8a('0x3c'),'foreignKey':_0x7d8a('0x13c')});db[_0x7d8a('0x3c')][_0x7d8a('0xef')](db[_0x7d8a('0x13d')],{'as':_0x7d8a('0x13e'),'onDelete':_0x7d8a('0xf0')});db['MailAccount'][_0x7d8a('0xef')](db['MailServerOut'],{'as':_0x7d8a('0x13f'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x3c')][_0x7d8a('0xf2')](db['Disposition'],{'as':_0x7d8a('0x140'),'foreignKey':_0x7d8a('0x13c')});db[_0x7d8a('0x3c')][_0x7d8a('0xf2')](db[_0x7d8a('0x77')],{'as':_0x7d8a('0x141'),'foreignKey':'MailAccountId'});db[_0x7d8a('0x3c')][_0x7d8a('0xf2')](db['MailMessage'],{'as':'Messages','foreignKey':_0x7d8a('0x13c')});db[_0x7d8a('0x3c')][_0x7d8a('0xf2')](db[_0x7d8a('0x42')],{'as':_0x7d8a('0x142')});db['MailAccount'][_0x7d8a('0xf2')](db[_0x7d8a('0x45')],{'as':'Applications'});db[_0x7d8a('0x3c')][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':'List','foreignKey':'ListId'});db[_0x7d8a('0x3c')][_0x7d8a('0x129')](db[_0x7d8a('0x89')],{'as':_0x7d8a('0x89'),'foreignKey':'TemplateId'});db['MailAccount']['belongsTo'](db[_0x7d8a('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':_0x7d8a('0x12e')});db[_0x7d8a('0x3c')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x119')});db[_0x7d8a('0x3e')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x36')});db['MailQueue']['belongsToMany'](db[_0x7d8a('0xd9')],{'through':_0x7d8a('0x143'),'as':_0x7d8a('0x132')});db[_0x7d8a('0x42')][_0x7d8a('0xf2')](db[_0x7d8a('0x43')],{'as':_0x7d8a('0x144'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x145')});db[_0x7d8a('0x42')][_0x7d8a('0x129')](db[_0x7d8a('0x3c')],{'as':'Account','foreignKey':_0x7d8a('0x13c')});db[_0x7d8a('0x42')]['belongsTo'](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x42')]['belongsTo'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x146'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x42')][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x147'),'as':_0x7d8a('0x148')});db[_0x7d8a('0x42')][_0x7d8a('0x100')](db['Tag'],{'through':_0x7d8a('0x147'),'as':_0x7d8a('0x149')});db[_0x7d8a('0x42')][_0x7d8a('0x100')](db['User'],{'as':'Users','through':_0x7d8a('0x14a'),'foreignKey':_0x7d8a('0x145')});db[_0x7d8a('0x43')][_0x7d8a('0xf2')](db['Attachment'],{'as':_0x7d8a('0x14b'),'onDelete':_0x7d8a('0xf0')});db['MailMessage']['belongsTo'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x13')});db[_0x7d8a('0x43')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'onDelete':_0x7d8a('0xf0'),'as':_0x7d8a('0x13a')});db[_0x7d8a('0x43')][_0x7d8a('0x129')](db['MailInteraction'],{'as':'Interaction','foreignKey':_0x7d8a('0x145')});db[_0x7d8a('0x43')][_0x7d8a('0x129')](db[_0x7d8a('0x3c')],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x13c')});db[_0x7d8a('0x45')][_0x7d8a('0x129')](db['User'],{'onDelete':_0x7d8a('0x14d')});db['MailApplication']['belongsTo'](db['MailQueue'],{'onDelete':_0x7d8a('0x14d')});db['MailApplication']['belongsTo'](db[_0x7d8a('0x3c')],{'onDelete':_0x7d8a('0x14d')});db['MailApplication']['belongsTo'](db[_0x7d8a('0x7c')],{'onDelete':_0x7d8a('0x14d'),'foreignKey':'IntervalId'});db['MailApplication'][_0x7d8a('0x129')](db[_0x7d8a('0x87')],{'onDelete':_0x7d8a('0x14d'),'foreignKey':_0x7d8a('0x14e')});db[_0x7d8a('0x46')]['belongsTo'](db['MailAccount'],{});db[_0x7d8a('0x46')]['belongsTo'](db['CmList'],{'as':_0x7d8a('0x14f'),'foreignKey':_0x7d8a('0x150')});db[_0x7d8a('0x46')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x46')][_0x7d8a('0x129')](db['MailInteraction'],{});db[_0x7d8a('0x46')]['belongsTo'](db[_0x7d8a('0x43')],{});db[_0x7d8a('0x46')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{});db['MailQueueReport']['belongsTo'](db[_0x7d8a('0x3e')],{});db[_0x7d8a('0x48')][_0x7d8a('0xf2')](db['DashboardItem'],{'as':_0x7d8a('0x151'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x4c')][_0x7d8a('0xf2')](db[_0x7d8a('0x152')],{'as':'Dispositions','foreignKey':'FaxAccountId'});db[_0x7d8a('0x4c')][_0x7d8a('0xf2')](db[_0x7d8a('0x77')],{'as':_0x7d8a('0x141'),'foreignKey':_0x7d8a('0x153')});db[_0x7d8a('0x4c')][_0x7d8a('0xf2')](db['FaxInteraction'],{'as':'Interactions'});db[_0x7d8a('0x4c')][_0x7d8a('0xf2')](db[_0x7d8a('0x154')],{'as':_0x7d8a('0x120')});db[_0x7d8a('0x4c')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a')],{'as':_0x7d8a('0x155'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x4c')]['hasMany'](db[_0x7d8a('0x50')],{'as':_0x7d8a('0x144')});db[_0x7d8a('0x4c')][_0x7d8a('0x129')](db['Trunk'],{'as':_0x7d8a('0x12a')});db[_0x7d8a('0x4c')][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':'List','foreignKey':'ListId'});db['FaxAccount'][_0x7d8a('0x129')](db[_0x7d8a('0x7d')],{'as':_0x7d8a('0x156'),'foreignKey':_0x7d8a('0x12e')});db[_0x7d8a('0x4c')][_0x7d8a('0x100')](db['User'],{'as':'Agents','through':_0x7d8a('0x117')});db[_0x7d8a('0x154')]['belongsTo'](db[_0x7d8a('0x13')],{'onDelete':'restrict'});db['FaxApplication'][_0x7d8a('0x129')](db[_0x7d8a('0x10f')],{'onDelete':_0x7d8a('0x14d')});db[_0x7d8a('0x154')][_0x7d8a('0x129')](db[_0x7d8a('0x4c')],{'onDelete':_0x7d8a('0x14d')});db['FaxApplication'][_0x7d8a('0x129')](db['Tag'],{'onDelete':_0x7d8a('0x14d'),'foreignKey':'TagId'});db[_0x7d8a('0x4e')][_0x7d8a('0xf2')](db[_0x7d8a('0x50')],{'as':_0x7d8a('0x144'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x157')});db['FaxInteraction'][_0x7d8a('0x129')](db[_0x7d8a('0x4c')],{'as':_0x7d8a('0x14c'),'foreignKey':'FaxAccountId'});db[_0x7d8a('0x4e')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x4e')][_0x7d8a('0x129')](db['User'],{'as':'Owner','foreignKey':_0x7d8a('0xf1')});db['FaxInteraction'][_0x7d8a('0x100')](db['Tag'],{'through':'fax_interaction_has_tags','as':_0x7d8a('0x148')});db[_0x7d8a('0x4e')][_0x7d8a('0x100')](db['Tag'],{'through':'fax_interaction_has_tags','as':'ThroughTags'});db[_0x7d8a('0x4e')]['belongsToMany'](db['User'],{'as':_0x7d8a('0x158'),'through':_0x7d8a('0x108'),'foreignKey':_0x7d8a('0x157')});db['FaxMessage'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'onDelete':_0x7d8a('0xf0'),'as':_0x7d8a('0x13')});db[_0x7d8a('0x50')][_0x7d8a('0x129')](db['FaxInteraction'],{'as':_0x7d8a('0x159'),'foreignKey':_0x7d8a('0x157')});db['FaxMessage']['belongsTo'](db[_0x7d8a('0x6d')],{'onDelete':_0x7d8a('0xf0'),'as':'Contact'});db[_0x7d8a('0x50')]['belongsTo'](db[_0x7d8a('0xdf')],{'as':_0x7d8a('0xdf'),'foreignKey':_0x7d8a('0x15a')});db['FaxMessage']['belongsTo'](db[_0x7d8a('0x4c')],{'as':_0x7d8a('0x14c'),'foreignKey':'FaxAccountId'});db[_0x7d8a('0x10f')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x37')});db[_0x7d8a('0x10f')][_0x7d8a('0x100')](db['Team'],{'through':'team_has_fax_queues','as':_0x7d8a('0x132')});db[_0x7d8a('0x52')]['belongsTo'](db[_0x7d8a('0x4c')],{});db['FaxQueueReport'][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x14f'),'foreignKey':_0x7d8a('0x150')});db[_0x7d8a('0x52')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x52')][_0x7d8a('0x129')](db[_0x7d8a('0x4e')],{});db[_0x7d8a('0x52')][_0x7d8a('0x129')](db[_0x7d8a('0x50')],{});db[_0x7d8a('0x52')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{});db[_0x7d8a('0x52')][_0x7d8a('0x129')](db[_0x7d8a('0x10f')],{});db[_0x7d8a('0x54')][_0x7d8a('0xf2')](db[_0x7d8a('0x152')],{'as':_0x7d8a('0x140'),'foreignKey':'SmsAccountId'});db[_0x7d8a('0x54')][_0x7d8a('0xf2')](db['CannedAnswer'],{'as':_0x7d8a('0x141'),'foreignKey':_0x7d8a('0x15b')});db[_0x7d8a('0x54')][_0x7d8a('0xf2')](db['SmsMessage'],{'as':_0x7d8a('0x144'),'foreignKey':_0x7d8a('0x15b')});db[_0x7d8a('0x54')][_0x7d8a('0xf2')](db[_0x7d8a('0xfb')],{'as':'Interactions'});db[_0x7d8a('0x54')][_0x7d8a('0xf2')](db[_0x7d8a('0x55')],{'as':_0x7d8a('0x120')});db['SmsAccount'][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x14f'),'foreignKey':'ListId'});db[_0x7d8a('0x54')][_0x7d8a('0x129')](db[_0x7d8a('0x7d')],{'as':_0x7d8a('0x156'),'foreignKey':_0x7d8a('0x12e')});db[_0x7d8a('0x54')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x11c')});db['SmsApplication'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'onDelete':_0x7d8a('0x14d')});db[_0x7d8a('0x55')][_0x7d8a('0x129')](db[_0x7d8a('0x59')],{'onDelete':'restrict'});db['SmsApplication'][_0x7d8a('0x129')](db[_0x7d8a('0x54')],{'onDelete':_0x7d8a('0x14d')});db['SmsApplication'][_0x7d8a('0x129')](db['Interval'],{'onDelete':'restrict','foreignKey':_0x7d8a('0x15c')});db[_0x7d8a('0x55')][_0x7d8a('0x129')](db[_0x7d8a('0x87')],{'onDelete':_0x7d8a('0x14d'),'foreignKey':'TagId'});db[_0x7d8a('0xfb')][_0x7d8a('0xf2')](db[_0x7d8a('0x57')],{'as':_0x7d8a('0x144'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x15d')});db[_0x7d8a('0xfb')]['belongsTo'](db[_0x7d8a('0x54')],{'as':'Account','foreignKey':_0x7d8a('0x15b')});db[_0x7d8a('0xfb')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0xfb')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':'Owner','foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0xfb')][_0x7d8a('0x100')](db['Tag'],{'through':_0x7d8a('0x15e'),'as':_0x7d8a('0x148')});db[_0x7d8a('0xfb')][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x15e'),'as':_0x7d8a('0x149')});db[_0x7d8a('0xfb')]['belongsToMany'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x158'),'through':_0x7d8a('0x109'),'foreignKey':_0x7d8a('0x15d')});db['SmsMessage'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':'User'});db[_0x7d8a('0x57')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'onDelete':_0x7d8a('0xf0'),'as':_0x7d8a('0x13a')});db[_0x7d8a('0x57')][_0x7d8a('0x129')](db['SmsInteraction'],{'onDelete':_0x7d8a('0xf0'),'as':_0x7d8a('0x159'),'foreignKey':_0x7d8a('0x15d')});db[_0x7d8a('0x57')]['belongsTo'](db[_0x7d8a('0x54')],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x15b')});db[_0x7d8a('0x59')]['belongsToMany'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':'UserSmsQueue','foreignKey':_0x7d8a('0x15f')});db[_0x7d8a('0x59')][_0x7d8a('0x100')](db[_0x7d8a('0xd9')],{'through':_0x7d8a('0x160'),'as':_0x7d8a('0x132')});db['OpenchannelAccount'][_0x7d8a('0xf2')](db[_0x7d8a('0x152')],{'as':_0x7d8a('0x140'),'foreignKey':_0x7d8a('0x161')});db[_0x7d8a('0x5b')][_0x7d8a('0xf2')](db[_0x7d8a('0x77')],{'as':_0x7d8a('0x141'),'foreignKey':_0x7d8a('0x161')});db[_0x7d8a('0x5b')][_0x7d8a('0xf2')](db[_0x7d8a('0x5d')],{'as':'Interactions','foreignKey':_0x7d8a('0x161')});db['OpenchannelAccount'][_0x7d8a('0xf2')](db[_0x7d8a('0x162')],{'as':_0x7d8a('0x144'),'foreignKey':_0x7d8a('0x161')});db['OpenchannelAccount'][_0x7d8a('0xf2')](db[_0x7d8a('0x5c')],{'as':_0x7d8a('0x120'),'foreignKey':_0x7d8a('0x161')});db[_0x7d8a('0x5b')][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x14f'),'foreignKey':'ListId'});db[_0x7d8a('0x5b')][_0x7d8a('0x129')](db[_0x7d8a('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':_0x7d8a('0x12e')});db[_0x7d8a('0x5b')]['belongsToMany'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x11b')});db[_0x7d8a('0x5c')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'onDelete':_0x7d8a('0x14d')});db['OpenchannelApplication'][_0x7d8a('0x129')](db[_0x7d8a('0x60')],{'onDelete':_0x7d8a('0x14d'),'foreignKey':'OpenchannelQueueId'});db[_0x7d8a('0x5c')][_0x7d8a('0x129')](db[_0x7d8a('0x5b')],{'onDelete':_0x7d8a('0x14d'),'foreignKey':_0x7d8a('0x161')});db[_0x7d8a('0x5c')][_0x7d8a('0x129')](db['Interval'],{'onDelete':_0x7d8a('0x14d'),'foreignKey':_0x7d8a('0x15c')});db[_0x7d8a('0x5c')][_0x7d8a('0x129')](db[_0x7d8a('0x87')],{'onDelete':'restrict','foreignKey':_0x7d8a('0x14e')});db[_0x7d8a('0x5d')][_0x7d8a('0xf2')](db['OpenchannelMessage'],{'as':'Messages','onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x163')});db[_0x7d8a('0x5d')]['belongsTo'](db[_0x7d8a('0x5b')],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x161')});db[_0x7d8a('0x5d')][_0x7d8a('0x129')](db['CmContact'],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x5d')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x146'),'foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x5d')][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x164'),'as':_0x7d8a('0x148')});db[_0x7d8a('0x5d')][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x164'),'as':_0x7d8a('0x149')});db['OpenchannelInteraction'][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x158'),'through':_0x7d8a('0x10a'),'foreignKey':_0x7d8a('0x163')});db['OpenchannelMessage'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'onDelete':_0x7d8a('0xf0'),'as':_0x7d8a('0x13')});db['OpenchannelMessage'][_0x7d8a('0x129')](db['CmContact'],{'onDelete':_0x7d8a('0xf0'),'as':'Contact'});db[_0x7d8a('0x162')]['belongsTo'](db[_0x7d8a('0x5d')],{'onDelete':_0x7d8a('0xf0'),'as':'Interaction','foreignKey':'OpenchannelInteractionId'});db[_0x7d8a('0x162')]['belongsTo'](db[_0x7d8a('0xdf')],{'as':_0x7d8a('0xdf'),'foreignKey':_0x7d8a('0x15a')});db[_0x7d8a('0x162')][_0x7d8a('0x129')](db[_0x7d8a('0x5b')],{'as':'Account','foreignKey':_0x7d8a('0x161')});db[_0x7d8a('0x60')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':'Agents','through':_0x7d8a('0x39'),'foreignKey':_0x7d8a('0x165')});db[_0x7d8a('0x60')][_0x7d8a('0x100')](db['Team'],{'through':_0x7d8a('0x166'),'as':_0x7d8a('0x132')});db[_0x7d8a('0x62')][_0x7d8a('0xf2')](db[_0x7d8a('0x152')],{'as':_0x7d8a('0x140'),'foreignKey':_0x7d8a('0x167')});db[_0x7d8a('0x62')][_0x7d8a('0xf2')](db[_0x7d8a('0x77')],{'as':'Answers','foreignKey':_0x7d8a('0x167')});db[_0x7d8a('0x62')]['hasMany'](db['ChatProactiveAction'],{'as':_0x7d8a('0x168')});db[_0x7d8a('0x62')][_0x7d8a('0xf2')](db['ChatInteraction'],{'as':_0x7d8a('0x142')});db[_0x7d8a('0x62')][_0x7d8a('0xf2')](db['ChatApplication'],{'as':_0x7d8a('0x120')});db[_0x7d8a('0x62')][_0x7d8a('0xf2')](db[_0x7d8a('0x169')],{'as':_0x7d8a('0x144')});db[_0x7d8a('0x62')][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':'List','foreignKey':'ListId'});db[_0x7d8a('0x62')][_0x7d8a('0x129')](db[_0x7d8a('0x7c')],{'as':_0x7d8a('0x7c'),'foreignKey':_0x7d8a('0x15c')});db[_0x7d8a('0x62')]['belongsTo'](db[_0x7d8a('0x7d')],{'as':_0x7d8a('0x156'),'foreignKey':_0x7d8a('0x12e')});db[_0x7d8a('0x62')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x115')});db['OpenchannelQueueReport'][_0x7d8a('0x129')](db[_0x7d8a('0x5b')],{});db['OpenchannelQueueReport'][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':'List','foreignKey':_0x7d8a('0x150')});db['OpenchannelQueueReport'][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x16a')][_0x7d8a('0x129')](db[_0x7d8a('0x5d')],{});db[_0x7d8a('0x16a')][_0x7d8a('0x129')](db[_0x7d8a('0x162')],{});db['OpenchannelQueueReport'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{});db[_0x7d8a('0x16a')][_0x7d8a('0x129')](db[_0x7d8a('0x60')],{});db['ChatApplication']['belongsTo'](db['User'],{'as':_0x7d8a('0x16b'),'foreignKey':_0x7d8a('0xf1'),'onDelete':_0x7d8a('0x14d')});db[_0x7d8a('0x16c')]['belongsTo'](db[_0x7d8a('0x68')],{'as':_0x7d8a('0x16d'),'foreignKey':'ChatQueueId','onDelete':_0x7d8a('0x14d')});db[_0x7d8a('0x16c')][_0x7d8a('0x129')](db[_0x7d8a('0x62')],{'as':'Website','foreignKey':'ChatWebsiteId','onDelete':'restrict'});db[_0x7d8a('0x16c')][_0x7d8a('0x129')](db[_0x7d8a('0x87')],{'onDelete':_0x7d8a('0x14d'),'foreignKey':_0x7d8a('0x14e')});db[_0x7d8a('0x65')][_0x7d8a('0xf2')](db[_0x7d8a('0x169')],{'as':'Messages','onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x16e')});db[_0x7d8a('0x65')]['belongsTo'](db['ChatWebsite'],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x167')});db['ChatInteraction'][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db['ChatInteraction'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x146'),'foreignKey':_0x7d8a('0xf1')});db['ChatInteraction'][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x16f'),'as':_0x7d8a('0x148')});db[_0x7d8a('0x65')][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x16f'),'as':_0x7d8a('0x149')});db[_0x7d8a('0x65')]['belongsToMany'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x158'),'through':_0x7d8a('0x107'),'foreignKey':_0x7d8a('0x16e')});db['ChatMessage'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'onDelete':_0x7d8a('0xf0'),'as':'User'});db[_0x7d8a('0x169')][_0x7d8a('0x129')](db['CmContact'],{'onDelete':_0x7d8a('0xf0'),'as':'Contact','foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x169')][_0x7d8a('0x129')](db[_0x7d8a('0x65')],{'onDelete':_0x7d8a('0xf0'),'as':_0x7d8a('0x159'),'foreignKey':_0x7d8a('0x16e')});db[_0x7d8a('0x169')][_0x7d8a('0x129')](db['Attachment'],{'as':_0x7d8a('0xdf'),'foreignKey':'AttachmentId'});db['ChatMessage'][_0x7d8a('0x129')](db[_0x7d8a('0x62')],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x167')});db['ChatOfflineMessage'][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'onDelete':_0x7d8a('0xf0'),'as':'Contact','foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x170')]['belongsTo'](db[_0x7d8a('0x62')],{'as':'Account','foreignKey':_0x7d8a('0x167')});db['ChatQueue'][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':'UserChatQueue','hooks':!![]});db[_0x7d8a('0x68')][_0x7d8a('0x100')](db[_0x7d8a('0xd9')],{'through':_0x7d8a('0x171'),'as':'Teams'});db[_0x7d8a('0x172')]['hasMany'](db['ChatInternalMessage'],{'as':_0x7d8a('0x144'),'foreignKey':_0x7d8a('0x173'),'onDelete':'cascade'});db[_0x7d8a('0x172')][_0x7d8a('0x100')](db['User'],{'as':'Members','through':_0x7d8a('0x102')});db['ChatProactiveAction'][_0x7d8a('0x129')](db[_0x7d8a('0x62')],{'as':_0x7d8a('0x174'),'foreignKey':_0x7d8a('0x167')});db[_0x7d8a('0x175')][_0x7d8a('0xf2')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x103'),'foreignKey':'CompanyId'});db[_0x7d8a('0x6d')]['hasMany'](db['CmHopper'],{'as':_0x7d8a('0x125'),'foreignKey':'ContactId'});db[_0x7d8a('0x6d')][_0x7d8a('0xf2')](db[_0x7d8a('0xf6')],{'as':_0x7d8a('0xf7'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0x6d')][_0x7d8a('0xf2')](db[_0x7d8a('0x72')],{'as':_0x7d8a('0x126'),'foreignKey':_0x7d8a('0x13b')});db['CmContact'][_0x7d8a('0xf2')](db[_0x7d8a('0x176')],{'as':'ReportAgentPreview','foreignKey':'ContactId'});db[_0x7d8a('0x6d')][_0x7d8a('0xf2')](db[_0x7d8a('0xc9')],{'as':_0x7d8a('0x128'),'foreignKey':'ContactId'});db[_0x7d8a('0x6d')][_0x7d8a('0xf2')](db['OpenchannelInteraction'],{'as':_0x7d8a('0xf9'),'foreignKey':_0x7d8a('0x13b'),'onDelete':_0x7d8a('0x14d')});db[_0x7d8a('0x6d')][_0x7d8a('0xf2')](db[_0x7d8a('0x65')],{'as':_0x7d8a('0xfa'),'foreignKey':_0x7d8a('0x13b'),'onDelete':'restrict'});db[_0x7d8a('0x6d')][_0x7d8a('0xf2')](db[_0x7d8a('0xfb')],{'as':_0x7d8a('0xfc'),'foreignKey':'ContactId','onDelete':_0x7d8a('0x14d')});db['CmContact']['hasMany'](db[_0x7d8a('0x4e')],{'as':'FaxInteractions','foreignKey':_0x7d8a('0x13b'),'onDelete':'restrict'});db[_0x7d8a('0x6d')][_0x7d8a('0xf2')](db[_0x7d8a('0x42')],{'as':_0x7d8a('0xfe'),'foreignKey':_0x7d8a('0x13b'),'onDelete':_0x7d8a('0x14d')});db[_0x7d8a('0x6d')][_0x7d8a('0x129')](db['CmCompany'],{'as':_0x7d8a('0x177'),'foreignKey':'CompanyId'});db['CmContact']['belongsTo'](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x14f'),'foreignKey':_0x7d8a('0x150'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x6d')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x158'),'through':'cm_user_has_contacts'});db['CmContact'][_0x7d8a('0x100')](db['Tag'],{'as':_0x7d8a('0x148'),'through':_0x7d8a('0x178')});db['CmContact'][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':'cm_contact_has_tags','as':_0x7d8a('0x149')});db[_0x7d8a('0x6f')]['belongsTo'](db['CmContact'],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b'),'onDelete':'cascade'});db['CmHopper'][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x14f'),'foreignKey':_0x7d8a('0x150'),'onDelete':'cascade'});db[_0x7d8a('0x6f')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':'Agent','foreignKey':_0x7d8a('0xf1')});db[_0x7d8a('0x6f')]['belongsTo'](db[_0x7d8a('0x1e')],{'as':_0x7d8a('0x16d'),'foreignKey':'VoiceQueueId','onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x6f')]['belongsTo'](db['Campaign'],{'as':'Campaign','foreignKey':_0x7d8a('0x179'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x6f')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'as':'Owner','foreignKey':_0x7d8a('0x17a')});db[_0x7d8a('0x70')][_0x7d8a('0x129')](db[_0x7d8a('0x6d')],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b'),'onDelete':_0x7d8a('0xf0')});db['CmHopperBlack']['belongsTo'](db['CmList'],{'as':'List','foreignKey':'ListId','onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x70')][_0x7d8a('0x129')](db[_0x7d8a('0x1e')],{'as':'Queue','foreignKey':'VoiceQueueId','onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x70')][_0x7d8a('0x129')](db[_0x7d8a('0xdc')],{'as':_0x7d8a('0xdc'),'foreignKey':_0x7d8a('0x179'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x75')][_0x7d8a('0xf2')](db[_0x7d8a('0x7a')],{'as':{'plural':_0x7d8a('0x17b'),'singular':_0x7d8a('0x17c')},'foreignKey':_0x7d8a('0x17d'),'onDelete':'cascade','hooks':!![]});db[_0x7d8a('0x75')][_0x7d8a('0xf2')](db[_0x7d8a('0x7a')],{'as':{'plural':_0x7d8a('0x17e'),'singular':'OneAny'},'foreignKey':'AutomationAnyId','onDelete':_0x7d8a('0xf0'),'hooks':!![]});db[_0x7d8a('0x75')][_0x7d8a('0xf2')](db[_0x7d8a('0x17f')],{'as':_0x7d8a('0x180'),'foreignKey':'AutomationId','onDelete':_0x7d8a('0xf0'),'hooks':!![]});db['Interval']['hasMany'](db['Interval'],{'as':_0x7d8a('0x181'),'foreignKey':'IntervalId','onDelete':'cascade','hooks':!![],'required':![]});db['Interval'][_0x7d8a('0xf2')](db['VoiceExtension'],{'as':'Extensions','foreignKey':_0x7d8a('0x15c'),'onDelete':_0x7d8a('0x14d')});db['Interval'][_0x7d8a('0xf2')](db[_0x7d8a('0x45')],{'as':_0x7d8a('0x182'),'foreignKey':'IntervalId'});db[_0x7d8a('0x7c')][_0x7d8a('0xf2')](db[_0x7d8a('0x16c')],{'as':'ChatApplications','foreignKey':_0x7d8a('0x15c')});db[_0x7d8a('0x7c')][_0x7d8a('0xf2')](db['FaxApplication'],{'as':_0x7d8a('0x183'),'foreignKey':_0x7d8a('0x15c')});db[_0x7d8a('0x7c')][_0x7d8a('0xf2')](db[_0x7d8a('0x55')],{'as':'SmsApplications','foreignKey':_0x7d8a('0x15c')});db['Schedule']['belongsTo'](db[_0x7d8a('0x3c')],{});db['Schedule'][_0x7d8a('0x129')](db['AnalyticDefaultReport'],{'foreignKey':_0x7d8a('0x184')});db['Schedule'][_0x7d8a('0x129')](db[_0x7d8a('0x185')],{'foreignKey':_0x7d8a('0x186')});db[_0x7d8a('0x85')]['belongsToMany'](db['VoiceMusicOnHold'],{'as':'Mohs','through':_0x7d8a('0x122'),'onDelete':'restrict'});db['Tag'][_0x7d8a('0x100')](db[_0x7d8a('0x6d')],{'through':'cm_contact_has_tags'});db['Tag'][_0x7d8a('0x100')](db[_0x7d8a('0x65')],{'through':_0x7d8a('0x16f')});db['Tag'][_0x7d8a('0x100')](db['MailInteraction'],{'through':'mail_interaction_has_tags'});db[_0x7d8a('0x87')]['belongsToMany'](db['SmsInteraction'],{'through':_0x7d8a('0x15e')});db[_0x7d8a('0x87')][_0x7d8a('0x100')](db['FaxInteraction'],{'through':_0x7d8a('0x187')});db[_0x7d8a('0x87')][_0x7d8a('0x100')](db['OpenchannelInteraction'],{'through':'openchannel_interaction_has_tags'});db['Trigger'][_0x7d8a('0xf2')](db[_0x7d8a('0x7a')],{'as':{'plural':'AllConditions','singular':_0x7d8a('0x188')},'foreignKey':_0x7d8a('0x189'),'onDelete':_0x7d8a('0xf0'),'hooks':!![]});db[_0x7d8a('0x8b')][_0x7d8a('0xf2')](db['Condition'],{'as':{'plural':_0x7d8a('0x18a'),'singular':_0x7d8a('0x18b')},'foreignKey':'TriggerAnyId','onDelete':_0x7d8a('0xf0'),'hooks':!![]});db[_0x7d8a('0x8b')][_0x7d8a('0xf2')](db[_0x7d8a('0x17f')],{'as':_0x7d8a('0x180'),'foreignKey':'TriggerId','onDelete':'cascade','hooks':!![]});db['AnalyticCustomReport'][_0x7d8a('0xf2')](db['AnalyticFieldReport'],{'as':_0x7d8a('0x18c'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x186'),'hooks':!![]});db[_0x7d8a('0x18d')][_0x7d8a('0xf2')](db[_0x7d8a('0x96')],{'as':_0x7d8a('0x18c'),'onDelete':_0x7d8a('0xf0'),'foreignKey':'DefaultReportId'});db[_0x7d8a('0x95')][_0x7d8a('0xf2')](db['AnalyticFieldReport'],{'as':_0x7d8a('0x18c'),'onDelete':'cascade','foreignKey':_0x7d8a('0x18e')});db[_0x7d8a('0x96')][_0x7d8a('0x129')](db['AnalyticMetric'],{'foreignKey':_0x7d8a('0x18e')});db[_0x7d8a('0x98')][_0x7d8a('0xf2')](db[_0x7d8a('0x9a')],{'as':_0x7d8a('0x18f'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0x9a')][_0x7d8a('0xf2')](db['SalesforceField'],{'as':'Subjects','onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0x9a')]['hasMany'](db[_0x7d8a('0x9b')],{'as':_0x7d8a('0x192'),'onDelete':_0x7d8a('0xf0'),'foreignKey':'DescriptionId'});db['SalesforceConfiguration'][_0x7d8a('0xf2')](db['SalesforceField'],{'as':_0x7d8a('0x18c'),'onDelete':_0x7d8a('0xf0'),'foreignKey':'FieldId'});db['SalesforceConfiguration']['belongsTo'](db[_0x7d8a('0x98')],{'as':'Account','foreignKey':'AccountId'});db[_0x7d8a('0x9b')][_0x7d8a('0xf2')](db[_0x7d8a('0x9b')],{'as':_0x7d8a('0x193'),'foreignKey':_0x7d8a('0x191')});db['SalesforceField']['hasMany'](db[_0x7d8a('0x9b')],{'as':_0x7d8a('0x194'),'foreignKey':'DescriptionId'});db['SalesforceField']['hasMany'](db[_0x7d8a('0x9b')],{'as':_0x7d8a('0x195'),'foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0x9b')][_0x7d8a('0x129')](db['Variable'],{'as':'Variable','foreignKey':_0x7d8a('0x197')});db['SugarcrmAccount'][_0x7d8a('0xf2')](db[_0x7d8a('0x9f')],{'as':_0x7d8a('0x18f'),'onDelete':'cascade','foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0x9f')]['hasMany'](db['SugarcrmField'],{'as':_0x7d8a('0x198'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0x9f')][_0x7d8a('0xf2')](db[_0x7d8a('0xa1')],{'as':_0x7d8a('0x192'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x199')});db['SugarcrmConfiguration'][_0x7d8a('0xf2')](db['SugarcrmField'],{'as':_0x7d8a('0x18c'),'onDelete':'cascade','foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0x9f')][_0x7d8a('0x129')](db[_0x7d8a('0x9d')],{'as':_0x7d8a('0x14c'),'foreignKey':'AccountId'});db[_0x7d8a('0xa1')][_0x7d8a('0xf2')](db['SugarcrmField'],{'as':_0x7d8a('0x193'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xa1')][_0x7d8a('0xf2')](db[_0x7d8a('0xa1')],{'as':'Description','foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xa1')][_0x7d8a('0xf2')](db[_0x7d8a('0xa1')],{'as':'Field','foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xa1')]['belongsTo'](db[_0x7d8a('0x8d')],{'as':_0x7d8a('0x8d'),'foreignKey':'VariableId'});db['DeskAccount'][_0x7d8a('0xf2')](db[_0x7d8a('0xa5')],{'as':_0x7d8a('0x18f'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x190')});db['DeskConfiguration'][_0x7d8a('0xf2')](db[_0x7d8a('0x19a')],{'as':_0x7d8a('0x198'),'onDelete':_0x7d8a('0xf0'),'foreignKey':'SubjectId'});db[_0x7d8a('0xa5')][_0x7d8a('0xf2')](db['DeskField'],{'as':_0x7d8a('0x192'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xa5')][_0x7d8a('0xf2')](db['DeskField'],{'as':_0x7d8a('0x18c'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xa5')][_0x7d8a('0x129')](db[_0x7d8a('0xa3')],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0xa5')][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x19b')});db[_0x7d8a('0x19a')]['hasMany'](db[_0x7d8a('0x19a')],{'as':'Subject','foreignKey':'SubjectId'});db['DeskField'][_0x7d8a('0xf2')](db[_0x7d8a('0x19a')],{'as':'Description','foreignKey':_0x7d8a('0x199')});db['DeskField'][_0x7d8a('0xf2')](db[_0x7d8a('0x19a')],{'as':_0x7d8a('0x195'),'foreignKey':'FieldId'});db[_0x7d8a('0x19a')][_0x7d8a('0x129')](db[_0x7d8a('0x8d')],{'as':_0x7d8a('0x8d'),'foreignKey':_0x7d8a('0x197')});db['ZohoAccount']['hasMany'](db[_0x7d8a('0xa9')],{'as':_0x7d8a('0x18f'),'onDelete':'cascade','foreignKey':_0x7d8a('0x190')});db['ZohoConfiguration'][_0x7d8a('0xf2')](db['ZohoField'],{'as':_0x7d8a('0x198'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xa9')][_0x7d8a('0xf2')](db[_0x7d8a('0xaa')],{'as':_0x7d8a('0x192'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xa9')]['hasMany'](db[_0x7d8a('0xaa')],{'as':_0x7d8a('0x18c'),'onDelete':'cascade','foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xa9')][_0x7d8a('0x129')](db['ZohoAccount'],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0xaa')]['hasMany'](db['ZohoField'],{'as':_0x7d8a('0x193'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xaa')][_0x7d8a('0xf2')](db[_0x7d8a('0xaa')],{'as':_0x7d8a('0x194'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xaa')][_0x7d8a('0xf2')](db[_0x7d8a('0xaa')],{'as':_0x7d8a('0x195'),'foreignKey':_0x7d8a('0x196')});db['ZohoField']['belongsTo'](db['Variable'],{'as':_0x7d8a('0x8d'),'foreignKey':'VariableId'});db[_0x7d8a('0xac')][_0x7d8a('0xf2')](db['ZendeskConfiguration'],{'as':_0x7d8a('0x18f'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0x19c')][_0x7d8a('0xf2')](db['ZendeskField'],{'as':_0x7d8a('0x198'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0x19c')][_0x7d8a('0xf2')](db['ZendeskField'],{'as':_0x7d8a('0x192'),'foreignKey':'DescriptionId'});db['ZendeskConfiguration']['hasMany'](db['ZendeskField'],{'as':_0x7d8a('0x18c'),'foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0x19c')][_0x7d8a('0x129')](db['ZendeskAccount'],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0x19c')][_0x7d8a('0x100')](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x19d')});db[_0x7d8a('0xaf')][_0x7d8a('0xf2')](db[_0x7d8a('0xaf')],{'as':_0x7d8a('0x193'),'foreignKey':_0x7d8a('0x191')});db['ZendeskField'][_0x7d8a('0xf2')](db[_0x7d8a('0xaf')],{'as':_0x7d8a('0x194'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xaf')]['hasMany'](db['ZendeskField'],{'as':_0x7d8a('0x195'),'foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xaf')][_0x7d8a('0x129')](db[_0x7d8a('0x8d')],{'as':_0x7d8a('0x8d'),'foreignKey':'VariableId'});db[_0x7d8a('0xb0')][_0x7d8a('0xf2')](db[_0x7d8a('0xb1')],{'as':_0x7d8a('0x18f'),'onDelete':'cascade','foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0xb1')][_0x7d8a('0xf2')](db['FreshdeskField'],{'as':'Subjects','onDelete':_0x7d8a('0xf0'),'foreignKey':'SubjectId'});db['FreshdeskConfiguration'][_0x7d8a('0xf2')](db[_0x7d8a('0xb3')],{'as':_0x7d8a('0x192'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xb1')][_0x7d8a('0xf2')](db[_0x7d8a('0xb3')],{'as':_0x7d8a('0x18c'),'onDelete':'cascade','foreignKey':'FieldId'});db[_0x7d8a('0xb1')][_0x7d8a('0x129')](db['FreshdeskAccount'],{'as':_0x7d8a('0x14c'),'foreignKey':'AccountId'});db[_0x7d8a('0xb1')]['belongsToMany'](db[_0x7d8a('0x87')],{'through':_0x7d8a('0x19e')});db['FreshdeskField'][_0x7d8a('0xf2')](db[_0x7d8a('0xb3')],{'as':_0x7d8a('0x193'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xb3')][_0x7d8a('0xf2')](db[_0x7d8a('0xb3')],{'as':_0x7d8a('0x194'),'foreignKey':_0x7d8a('0x199')});db['FreshdeskField']['hasMany'](db[_0x7d8a('0xb3')],{'as':_0x7d8a('0x195'),'foreignKey':'FieldId'});db['FreshdeskField'][_0x7d8a('0x129')](db[_0x7d8a('0x8d')],{'as':_0x7d8a('0x8d'),'foreignKey':_0x7d8a('0x197')});db[_0x7d8a('0xb4')][_0x7d8a('0xf2')](db[_0x7d8a('0xb5')],{'as':_0x7d8a('0x18f'),'onDelete':_0x7d8a('0xf0'),'foreignKey':'AccountId'});db[_0x7d8a('0xb5')][_0x7d8a('0xf2')](db[_0x7d8a('0xb7')],{'as':_0x7d8a('0x198'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xb5')]['hasMany'](db[_0x7d8a('0xb7')],{'as':_0x7d8a('0x192'),'foreignKey':'DescriptionId'});db['VtigerConfiguration'][_0x7d8a('0xf2')](db[_0x7d8a('0xb7')],{'as':'Fields','foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xb5')][_0x7d8a('0x129')](db['VtigerAccount'],{'as':'Account','foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0xb7')][_0x7d8a('0xf2')](db[_0x7d8a('0xb7')],{'as':_0x7d8a('0x193'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xb7')]['hasMany'](db[_0x7d8a('0xb7')],{'as':_0x7d8a('0x194'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xb7')][_0x7d8a('0xf2')](db[_0x7d8a('0xb7')],{'as':_0x7d8a('0x195'),'foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xb7')]['belongsTo'](db[_0x7d8a('0x8d')],{'as':'Variable','foreignKey':_0x7d8a('0x197')});db[_0x7d8a('0x19f')][_0x7d8a('0xf2')](db[_0x7d8a('0xb9')],{'as':'Configurations','onDelete':_0x7d8a('0xf0'),'foreignKey':'AccountId'});db['ServicenowConfiguration'][_0x7d8a('0xf2')](db['ServicenowField'],{'as':_0x7d8a('0x198'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xb9')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a0')],{'as':_0x7d8a('0x192'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xb9')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a0')],{'as':_0x7d8a('0x18c'),'foreignKey':_0x7d8a('0x196')});db['ServicenowConfiguration'][_0x7d8a('0x129')](db[_0x7d8a('0x19f')],{'as':'Account','foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0x1a0')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a0')],{'as':_0x7d8a('0x193'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0x1a0')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a0')],{'as':'Description','foreignKey':'DescriptionId'});db['ServicenowField'][_0x7d8a('0xf2')](db[_0x7d8a('0x1a0')],{'as':_0x7d8a('0x195'),'foreignKey':_0x7d8a('0x196')});db['ServicenowField'][_0x7d8a('0x129')](db[_0x7d8a('0x8d')],{'as':_0x7d8a('0x8d'),'foreignKey':_0x7d8a('0x197')});db[_0x7d8a('0x1a1')][_0x7d8a('0xf2')](db['Dynamics365Configuration'],{'as':_0x7d8a('0x18f'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x190')});db['Dynamics365Configuration'][_0x7d8a('0xf2')](db[_0x7d8a('0xbe')],{'as':'Subjects','onDelete':_0x7d8a('0xf0'),'foreignKey':'SubjectId'});db[_0x7d8a('0xbc')]['hasMany'](db[_0x7d8a('0xbe')],{'as':'Descriptions','onDelete':'cascade','foreignKey':_0x7d8a('0x199')});db['Dynamics365Configuration'][_0x7d8a('0xf2')](db[_0x7d8a('0xbe')],{'as':'Fields','onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xbc')][_0x7d8a('0x129')](db[_0x7d8a('0x1a1')],{'as':_0x7d8a('0x14c'),'foreignKey':_0x7d8a('0x190')});db[_0x7d8a('0xbe')][_0x7d8a('0xf2')](db[_0x7d8a('0xbe')],{'as':'Subject','foreignKey':_0x7d8a('0x191')});db['Dynamics365Field'][_0x7d8a('0xf2')](db['Dynamics365Field'],{'as':_0x7d8a('0x194'),'foreignKey':'DescriptionId'});db[_0x7d8a('0xbe')][_0x7d8a('0xf2')](db[_0x7d8a('0xbe')],{'as':_0x7d8a('0x195'),'foreignKey':'FieldId'});db[_0x7d8a('0xbe')][_0x7d8a('0x129')](db['Variable'],{'as':_0x7d8a('0x8d'),'foreignKey':_0x7d8a('0x197')});db[_0x7d8a('0x1a2')]['hasMany'](db[_0x7d8a('0xc0')],{'as':_0x7d8a('0x18f'),'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x190')});db['FreshsalesConfiguration'][_0x7d8a('0xf2')](db[_0x7d8a('0xc2')],{'as':_0x7d8a('0x198'),'foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xc0')]['hasMany'](db[_0x7d8a('0xc2')],{'as':_0x7d8a('0x192'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xc0')][_0x7d8a('0xf2')](db[_0x7d8a('0xc2')],{'as':'Fields','foreignKey':_0x7d8a('0x196')});db[_0x7d8a('0xc0')][_0x7d8a('0x129')](db[_0x7d8a('0x1a2')],{'as':'Account','foreignKey':'AccountId'});db[_0x7d8a('0xc2')][_0x7d8a('0xf2')](db[_0x7d8a('0xc2')],{'as':'Subject','foreignKey':_0x7d8a('0x191')});db[_0x7d8a('0xc2')]['hasMany'](db[_0x7d8a('0xc2')],{'as':_0x7d8a('0x194'),'foreignKey':_0x7d8a('0x199')});db[_0x7d8a('0xc2')]['hasMany'](db[_0x7d8a('0xc2')],{'as':'Field','foreignKey':'FieldId'});db['FreshsalesField'][_0x7d8a('0x129')](db[_0x7d8a('0x8d')],{'as':_0x7d8a('0x8d'),'foreignKey':'VariableId'});db[_0x7d8a('0xc6')][_0x7d8a('0x129')](db[_0x7d8a('0x62')],{});db[_0x7d8a('0xc6')][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':'List','foreignKey':_0x7d8a('0x150')});db[_0x7d8a('0xc6')][_0x7d8a('0x129')](db['CmContact'],{'as':_0x7d8a('0x13a'),'foreignKey':_0x7d8a('0x13b')});db[_0x7d8a('0xc6')]['belongsTo'](db[_0x7d8a('0x65')],{});db['ChatQueueReport'][_0x7d8a('0x129')](db['ChatMessage'],{});db[_0x7d8a('0xc6')]['belongsTo'](db[_0x7d8a('0x13')],{});db[_0x7d8a('0xc6')][_0x7d8a('0x129')](db[_0x7d8a('0x68')],{});db[_0x7d8a('0x1a3')]['belongsTo'](db['User'],{'onDelete':_0x7d8a('0xf0'),'foreignKey':'FromId'});db[_0x7d8a('0x1a3')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x1a4')});db[_0x7d8a('0xc9')][_0x7d8a('0xf2')](db[_0x7d8a('0xc8')],{'foreignKey':_0x7d8a('0x1a5'),'onDelete':'cascade'});db['JscriptySessionReport'][_0x7d8a('0xf2')](db['JscriptyAnswerReport'],{'foreignKey':_0x7d8a('0x1a5'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0xcb')]['belongsTo'](db[_0x7d8a('0x54')],{});db[_0x7d8a('0xcb')][_0x7d8a('0x129')](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x14f'),'foreignKey':'ListId'});db['SmsQueueReport']['belongsTo'](db[_0x7d8a('0x6d')],{'as':'Contact','foreignKey':_0x7d8a('0x13b')});db['SmsQueueReport']['belongsTo'](db[_0x7d8a('0xfb')],{});db['SmsQueueReport'][_0x7d8a('0x129')](db[_0x7d8a('0x57')],{});db['SmsQueueReport']['belongsTo'](db[_0x7d8a('0x13')],{});db[_0x7d8a('0xcb')]['belongsTo'](db[_0x7d8a('0x59')],{});db[_0x7d8a('0xcf')][_0x7d8a('0xf2')](db[_0x7d8a('0xc9')],{'foreignKey':_0x7d8a('0x1a6')});db['JscriptyProject'][_0x7d8a('0xf2')](db[_0x7d8a('0xc8')],{'foreignKey':_0x7d8a('0x1a6')});db[_0x7d8a('0xcf')][_0x7d8a('0xf2')](db[_0x7d8a('0x1a7')],{'foreignKey':_0x7d8a('0x1a6')});db[_0x7d8a('0xd4')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x158'),'through':_0x7d8a('0x11e')});db[_0x7d8a('0xd9')]['belongsToMany'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':'user_has_teams'});db['Team'][_0x7d8a('0x100')](db['VoiceQueue'],{'through':'team_has_voice_queues','as':_0x7d8a('0x10b')});db[_0x7d8a('0xd9')][_0x7d8a('0x100')](db[_0x7d8a('0x3e')],{'through':_0x7d8a('0x143'),'as':'MailQueues'});db[_0x7d8a('0xd9')][_0x7d8a('0x100')](db[_0x7d8a('0x68')],{'through':_0x7d8a('0x171'),'as':'ChatQueues'});db[_0x7d8a('0xd9')][_0x7d8a('0x100')](db[_0x7d8a('0x10f')],{'through':'team_has_fax_queues','as':'FaxQueues'});db[_0x7d8a('0xd9')][_0x7d8a('0x100')](db['SmsQueue'],{'through':_0x7d8a('0x160'),'as':_0x7d8a('0x110')});db['Team'][_0x7d8a('0x100')](db[_0x7d8a('0x60')],{'through':_0x7d8a('0x166'),'as':_0x7d8a('0x111')});db['Campaign'][_0x7d8a('0xf2')](db[_0x7d8a('0x6f')],{'as':'Hoppers','foreignKey':_0x7d8a('0x179')});db[_0x7d8a('0xdc')]['hasMany'](db[_0x7d8a('0xf6')],{'as':'HopperFinals','foreignKey':_0x7d8a('0x179')});db[_0x7d8a('0xdc')][_0x7d8a('0xf2')](db[_0x7d8a('0x72')],{'as':_0x7d8a('0x126'),'foreignKey':_0x7d8a('0x179')});db[_0x7d8a('0xdc')][_0x7d8a('0xf2')](db[_0x7d8a('0x70')],{'as':'HopperBlacks','foreignKey':_0x7d8a('0x179')});db[_0x7d8a('0xdc')][_0x7d8a('0x129')](db[_0x7d8a('0x12a')],{'as':_0x7d8a('0x12a'),'foreignKey':_0x7d8a('0x12b')});db[_0x7d8a('0xdc')][_0x7d8a('0x129')](db['Trunk'],{'as':_0x7d8a('0x12c'),'foreignKey':_0x7d8a('0x12d')});db['Campaign'][_0x7d8a('0x129')](db[_0x7d8a('0x7c')],{'as':_0x7d8a('0x7c'),'foreignKey':'IntervalId'});db[_0x7d8a('0xdc')][_0x7d8a('0x129')](db['SquareProject'],{'as':_0x7d8a('0xd4'),'foreignKey':'SquareProjectId'});db[_0x7d8a('0xdc')][_0x7d8a('0x100')](db[_0x7d8a('0xe9')],{'as':'Lists','through':_0x7d8a('0x1a8')});db['Campaign'][_0x7d8a('0x100')](db[_0x7d8a('0xe9')],{'as':_0x7d8a('0x133'),'through':_0x7d8a('0x1a9')});db[_0x7d8a('0xe3')]['belongsTo'](db[_0x7d8a('0x43')],{});db[_0x7d8a('0xe3')][_0x7d8a('0x129')](db[_0x7d8a('0x42')],{});db['MailTransferReport'][_0x7d8a('0x129')](db[_0x7d8a('0x3c')],{'foreignKey':_0x7d8a('0x1aa'),'as':_0x7d8a('0x1ab')});db['MailTransferReport'][_0x7d8a('0x129')](db['User'],{'foreignKey':_0x7d8a('0x1ac'),'as':'FromAgent'});db[_0x7d8a('0xe3')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'foreignKey':'ToUserId','as':_0x7d8a('0x1ad')});db[_0x7d8a('0xe3')][_0x7d8a('0x129')](db[_0x7d8a('0x3e')],{'foreignKey':'ToMailQueueId','as':'ToQueue'});db[_0x7d8a('0xe3')][_0x7d8a('0x129')](db[_0x7d8a('0x3c')],{'foreignKey':'ToMailAccountId','as':_0x7d8a('0x1ae')});db['ChatTransferReport'][_0x7d8a('0x129')](db[_0x7d8a('0x169')],{});db[_0x7d8a('0xe4')][_0x7d8a('0x129')](db['ChatInteraction'],{});db[_0x7d8a('0xe4')]['belongsTo'](db[_0x7d8a('0x62')],{'foreignKey':_0x7d8a('0x1af'),'as':_0x7d8a('0x1ab')});db[_0x7d8a('0xe4')][_0x7d8a('0x129')](db['User'],{'foreignKey':_0x7d8a('0x1ac'),'as':'FromAgent'});db[_0x7d8a('0xe4')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'foreignKey':'ToUserId','as':'ToAgent'});db[_0x7d8a('0xe4')][_0x7d8a('0x129')](db[_0x7d8a('0x68')],{'foreignKey':_0x7d8a('0x1b0'),'as':'ToQueue'});db[_0x7d8a('0xe4')][_0x7d8a('0x129')](db[_0x7d8a('0x62')],{'foreignKey':'ToChatWebsiteId','as':_0x7d8a('0x1ae')});db[_0x7d8a('0x1b1')][_0x7d8a('0x129')](db[_0x7d8a('0x50')],{});db[_0x7d8a('0x1b1')][_0x7d8a('0x129')](db[_0x7d8a('0x4e')],{});db[_0x7d8a('0x1b1')][_0x7d8a('0x129')](db['FaxAccount'],{'foreignKey':'FromFaxAccountId','as':'FromAccount'});db[_0x7d8a('0x1b1')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'foreignKey':_0x7d8a('0x1ac'),'as':_0x7d8a('0x1b2')});db[_0x7d8a('0x1b1')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'foreignKey':_0x7d8a('0x1b3'),'as':_0x7d8a('0x1ad')});db[_0x7d8a('0x1b1')][_0x7d8a('0x129')](db['FaxQueue'],{'foreignKey':_0x7d8a('0x1b4'),'as':_0x7d8a('0x1b5')});db['FaxTransferReport'][_0x7d8a('0x129')](db[_0x7d8a('0x4c')],{'foreignKey':'ToFaxAccountId','as':'ToAccount'});db['OpenchannelTransferReport'][_0x7d8a('0x129')](db[_0x7d8a('0x162')],{});db[_0x7d8a('0x1b6')][_0x7d8a('0x129')](db['OpenchannelInteraction'],{});db[_0x7d8a('0x1b6')][_0x7d8a('0x129')](db[_0x7d8a('0x5b')],{'foreignKey':_0x7d8a('0x1b7'),'as':_0x7d8a('0x1ab')});db['OpenchannelTransferReport'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'foreignKey':_0x7d8a('0x1ac'),'as':_0x7d8a('0x1b2')});db[_0x7d8a('0x1b6')]['belongsTo'](db[_0x7d8a('0x13')],{'foreignKey':'ToUserId','as':_0x7d8a('0x1ad')});db['OpenchannelTransferReport']['belongsTo'](db['OpenchannelQueue'],{'foreignKey':_0x7d8a('0x1b8'),'as':_0x7d8a('0x1b5')});db[_0x7d8a('0x1b6')][_0x7d8a('0x129')](db[_0x7d8a('0x5b')],{'foreignKey':_0x7d8a('0x1b9'),'as':'ToAccount'});db['SmsTransferReport']['belongsTo'](db['SmsMessage'],{});db['SmsTransferReport'][_0x7d8a('0x129')](db['SmsInteraction'],{});db[_0x7d8a('0x1ba')]['belongsTo'](db['SmsAccount'],{'foreignKey':_0x7d8a('0x1bb'),'as':'FromAccount'});db['SmsTransferReport'][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'foreignKey':_0x7d8a('0x1ac'),'as':_0x7d8a('0x1b2')});db[_0x7d8a('0x1ba')][_0x7d8a('0x129')](db[_0x7d8a('0x13')],{'foreignKey':_0x7d8a('0x1b3'),'as':'ToAgent'});db[_0x7d8a('0x1ba')]['belongsTo'](db[_0x7d8a('0x59')],{'foreignKey':_0x7d8a('0x1bc'),'as':_0x7d8a('0x1b5')});db['SmsTransferReport'][_0x7d8a('0x129')](db[_0x7d8a('0x54')],{'foreignKey':_0x7d8a('0x1bd'),'as':_0x7d8a('0x1ae')});db[_0x7d8a('0xe9')][_0x7d8a('0xf2')](db[_0x7d8a('0x152')],{'as':_0x7d8a('0x140'),'foreignKey':_0x7d8a('0x150')});db['CmList']['hasMany'](db['CmCustomField'],{'as':_0x7d8a('0x1be'),'foreignKey':_0x7d8a('0x150')});db[_0x7d8a('0xe9')]['hasMany'](db[_0x7d8a('0x6d')],{'as':'Contacts','onDelete':_0x7d8a('0xf0'),'foreignKey':_0x7d8a('0x150')});db[_0x7d8a('0xe9')][_0x7d8a('0xf2')](db[_0x7d8a('0xf6')],{'as':_0x7d8a('0xf7'),'foreignKey':'ListId'});db['CmList'][_0x7d8a('0xf2')](db['CmHopperHistory'],{'as':_0x7d8a('0xf8'),'foreignKey':_0x7d8a('0x150')});db['CmList'][_0x7d8a('0xf2')](db[_0x7d8a('0x176')],{'as':_0x7d8a('0x176'),'foreignKey':_0x7d8a('0x150')});db[_0x7d8a('0xe9')]['belongsToMany'](db[_0x7d8a('0x1e')],{'as':_0x7d8a('0x1bf'),'through':_0x7d8a('0x130')});db['CmList']['belongsToMany'](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x131'),'through':_0x7d8a('0x105')});db[_0x7d8a('0x112')]['hasMany'](db[_0x7d8a('0x1a')],{'as':_0x7d8a('0xf5'),'onDelete':_0x7d8a('0x14d')});db[_0x7d8a('0x112')][_0x7d8a('0x100')](db[_0x7d8a('0x13')],{'as':'Agents','through':_0x7d8a('0x113')});db[_0x7d8a('0xec')][_0x7d8a('0xf2')](db[_0x7d8a('0x13')],{'as':_0x7d8a('0x158'),'foreignKey':_0x7d8a('0xff')});db[_0x7d8a('0xec')]['hasMany'](db['UserProfileSection'],{'as':_0x7d8a('0x1c0'),'foreignKey':_0x7d8a('0xff'),'onDelete':_0x7d8a('0xf0')});db[_0x7d8a('0x1c1')][_0x7d8a('0xf2')](db['UserProfileResource'],{'as':_0x7d8a('0x1c2'),'foreignKey':'sectionId','onDelete':_0x7d8a('0xf0')});module[_0x7d8a('0x1c3')]={'db':db,'dbH':dbH};
\ No newline at end of file
+var _0xeb77=['MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts','SquareProjects','SpiedAgents','ChanSpyId','Applications','moh_has_sounds','Members','VoiceQueueId','HopperFinals','HopperBlacks','JscriptySessions','TrunkId','TrunkBackup','TrunkBackupId','Interval','mandatoryDispositionPause','mandatoryDispositionPauseId','voice_queues_has_cm_lists','team_has_voice_queues','BlackLists','voice_queues_has_cm_blacklists','Messages','mailboxuser','mailbox','QueueCalls','uniqueid','VoiceAgentReport','AgentReports','Contact','ContactId','MailAccountId','Imap','Smtp','Dispositions','Answers','Interactions','MailApplication','ListId','Agents','MailMessage','Account','Owner','Tags','mail_interaction_has_tags','ThroughTags','MailInteractionId','Attachments','Interaction','restrict','IntervalId','TagId','List','Disposition','FaxAccountId','Exntensions','FaxInteractionId','fax_interaction_has_tags','Users','Teams','FaxQueueReport','SmsAccountId','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelQueueId','OpenchannelInteractionId','openchannel_interaction_has_tags','AttachmentId','team_has_openchannel_queues','ChatWebsiteId','ProactiveActions','Agent','ChatInteractionId','chat_interaction_has_tags','team_has_chat_queues','ChatGroupId','Website','CompanyId','Hoppers','HopperHistories','cm_user_has_contacts','Queue','Campaign','CampaignId','OwnerId','All','AutomationAllId','Any','OneAny','AutomationAnyId','Actions','Intervals','MailApplications','SmsApplications','Schedule','DefaultReportId','CustomReportId','Mohs','cm_contact_has_tags','AllConditions','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','Configurations','Subjects','SubjectId','DescriptionId','Fields','FieldId','AccountId','Subject','Description','VariableId','SugarcrmConfiguration','Descriptions','Field','int_desk_configuration_has_tags','ZohoConfiguration','ZendeskAccount','FreshdeskConfiguration','VtigerConfiguration','ServicenowConfiguration','FreshsalesAccount','FreshsalesField','ChatInternalMessage','FromId','ToId','JscriptySessionReport','SessionId','ProjectId','user_has_square_projects','VoiceQueues','team_has_mail_queues','MailQueues','team_has_fax_queues','FaxQueues','SmsQueues','campaigns_has_cm_lists','campaigns_has_cm_blacklists','MailTransferReport','FromMailAccountId','FromAccount','FromUserId','FromAgent','ToUserId','ToAgent','ToMailQueueId','ToQueue','ToMailAccountId','ToAccount','ChatTransferReport','ToChatQueueId','ToChatWebsiteId','FromFaxAccountId','ToFaxQueueId','ToFaxAccountId','FromOpenchannelAccountId','ToOpenchannelQueueId','ToOpenchannelAccountId','SmsTransferReport','FromSmsAccountId','ToSmsQueueId','ToSmsAccountId','CmCustomField','CustomFields','HopperHistory','Queues','UserProfileSections','Resources','exports','path','sequelize','lodash','jstz','determine','defaultsDeep','motion2','xcall','mysql','utf8mb4','name','utf8','sequelizeHistory','127.0.0.1','utf8_general_ci','database','options','username','password','User','import','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','VoiceRecording','../api/voiceRecording/voiceRecording.model','ScreenRecording','../api/screenRecording/screenRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','../api/voiceMailMessage/voiceMailMessage.model','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','MemberReport','Trunk','../api/trunk/trunk.model','VoiceTransferReport','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','../api/userVoiceQueue/userVoiceQueue.model','UserChatQueue','../api/userChatQueue/userChatQueue.model','UserMailQueue','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','MailServerIn','../api/mailServerIn/mailServerIn.model','MailServerOut','../api/mailServerOut/mailServerOut.model','MailAccount','MailQueue','../api/mailQueue/mailQueue.model','../api/mailSubstatus/mailSubstatus.model','MailInteraction','../api/mailInteraction/mailInteraction.model','../api/mailMessage/mailMessage.model','../api/mailApplication/mailApplication.model','MailQueueReport','Dashboard','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','../api/faxApplication/faxApplication.model','FaxInteraction','../api/faxInteraction/faxInteraction.model','FaxMessage','../api/faxMessage/faxMessage.model','../api/faxQueueReport/faxQueueReport.model','SmsAccount','../api/smsAccount/smsAccount.model','SmsApplication','../api/smsApplication/smsApplication.model','SmsInteraction','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','OpenchannelApplication','../api/openchannelApplication/openchannelApplication.model','OpenchannelInteraction','OpenchannelMessage','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','../api/chatApplication/chatApplication.model','ChatInteraction','../api/chatInteraction/chatInteraction.model','ChatMessage','../api/chatMessage/chatMessage.model','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','../api/chatQueue/chatQueue.model','ChatGroup','../api/chatGroup/chatGroup.model','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','CmCompany','CmContact','../api/cmContact/cmContact.model','CmHopper','../api/cmHopper/cmHopper.model','CmHopperBlack','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','../api/reportAgentPreview/reportAgentPreview.model','../api/cmCustomField/cmCustomField.model','Action','../api/action/action.model','Automation','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','../api/disposition/disposition.model','Condition','../api/condition/condition.model','../api/interval/interval.model','Pause','../api/pause/pause.model','Cdr','../api/cdr/cdr.model','VoiceQueuesLog','../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','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','../api/analyticMetric/analyticMetric.model','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','SalesforceConfiguration','SalesforceField','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','ZohoField','ZendeskConfiguration','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','../api/intZendeskField/intZendeskField.model','FreshdeskAccount','../api/intFreshdeskAccount/intFreshdeskAccount.model','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowAccount','../api/intServicenowAccount/intServicenowAccount.model','ServicenowField','../api/intServicenowField/intServicenowField.model','Dynamics365Account','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','../api/intFreshsalesField/intFreshsalesField.model','Integration','../api/integration/integration.model','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','../api/chatInternalMessage/chatInternalMessage.model','JscriptyAnswerReport','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','SquareDetailsReport','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','../api/setting/setting.model','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareProject','../api/squareProject/squareProject.model','SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','Team','License','../api/license/license.model','../api/migration/migration.model','Attachment','../api/attachment/attachment.model','Plugin','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','OpenchannelTransferReport','../api/cmList/cmList.model','VoicePrefix','../api/voicePrefix/voicePrefix.model','UserProfileSection','../api/userProfileSection/userProfileSection.model','UserProfileResource','hasOne','cascade','UserId','hasMany','VoiceQueuesRt','Extensions','CmHopperHistory','ChatInteractions','SmsInteractions','belongsTo','UserProfile','userProfileId','belongsToMany','Groups','chat_group_has_users','Contacts','Lists','cm_user_has_lists','user_has_teams','MailInteractions','user_has_chat_interactions','FaxInteractions','user_has_fax_interactions','user_has_sms_interactions','OpenchannelInteractions','user_has_openchannel_interactions','UserVoiceQueue','ChatQueues','FaxQueue','UserOpenchannelQueue','CmList','VoicePrefixes','user_has_voice_prefixes','ChatWebsite','ChatWebsites','user_has_chat_websites','FaxAccounts','user_has_fax_accounts'];(function(_0x47ff34,_0x452468){var _0x116398=function(_0x3de726){while(--_0x3de726){_0x47ff34['push'](_0x47ff34['shift']());}};_0x116398(++_0x452468);}(_0xeb77,0xb4));var _0x7eb7=function(_0x2e6dbf,_0x57dd06){_0x2e6dbf=_0x2e6dbf-0x0;var _0x2680e5=_0xeb77[_0x2e6dbf];return _0x2680e5;};'use strict';var path=require(_0x7eb7('0x0'));var config=require('../config/environment');var Sequelize=require(_0x7eb7('0x1'));var _=require(_0x7eb7('0x2'));var jstz=require(_0x7eb7('0x3'));var timezone=jstz[_0x7eb7('0x4')]();config[_0x7eb7('0x1')]=_[_0x7eb7('0x5')](config[_0x7eb7('0x1')],{'database':_0x7eb7('0x6'),'username':_0x7eb7('0x7'),'password':'xC@LL1234','options':{'host':'127.0.0.1','port':0xcea,'dialect':_0x7eb7('0x8'),'dialectOptions':{'charset':_0x7eb7('0x9')},'logging':![],'timezone':timezone[_0x7eb7('0xa')](),'define':{'charset':_0x7eb7('0xb'),'collate':'utf8_general_ci'}}});config[_0x7eb7('0xc')]=_[_0x7eb7('0x5')](config['sequelizeHistory'],{'database':'motion2','username':'xcall','password':'xC@LL1234','options':{'host':_0x7eb7('0xd'),'port':0xcea,'dialect':_0x7eb7('0x8'),'dialectOptions':{'charset':'utf8mb4'},'logging':![],'timezone':timezone[_0x7eb7('0xa')](),'define':{'charset':_0x7eb7('0xb'),'collate':_0x7eb7('0xe')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x7eb7('0x1')][_0x7eb7('0xf')],config[_0x7eb7('0x1')]['username'],config[_0x7eb7('0x1')]['password'],config[_0x7eb7('0x1')][_0x7eb7('0x10')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelizeHistory'][_0x7eb7('0xf')],config[_0x7eb7('0xc')][_0x7eb7('0x11')],config[_0x7eb7('0xc')][_0x7eb7('0x12')],config[_0x7eb7('0xc')][_0x7eb7('0x10')])};db[_0x7eb7('0x13')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/user/user.model');db[_0x7eb7('0x15')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x16'));db[_0x7eb7('0x17')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x18'));db[_0x7eb7('0x19')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x1a'));db[_0x7eb7('0x1b')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x1c'));db[_0x7eb7('0x1d')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0x1e'));db[_0x7eb7('0x1f')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0x20'));db[_0x7eb7('0x21')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x22'));db[_0x7eb7('0x23')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x24'));db['VoiceMailMessage']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x25'));db[_0x7eb7('0x26')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x27'));db[_0x7eb7('0x28')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x29'));db['VoiceAgentReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x2a'));db[_0x7eb7('0x2b')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/voiceQueueReport/voiceQueueReport.model');db[_0x7eb7('0x2c')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/memberReport/memberReport.model');db[_0x7eb7('0x2d')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x2e'));db[_0x7eb7('0x2f')]=db['sequelize']['import'](_0x7eb7('0x30'));db[_0x7eb7('0x31')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x32'));db['UserVoiceQueue']=db['sequelize']['import'](_0x7eb7('0x33'));db[_0x7eb7('0x34')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x35'));db[_0x7eb7('0x36')]=db['sequelize'][_0x7eb7('0x14')]('../api/userMailQueue/userMailQueue.model');db[_0x7eb7('0x37')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x38'));db[_0x7eb7('0x39')]=db[_0x7eb7('0x1')]['import']('../api/userSmsQueue/userSmsQueue.model');db['UserOpenchannelQueue']=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/userOpenchannelQueue/userOpenchannelQueue.model');db[_0x7eb7('0x3a')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0x3b'));db[_0x7eb7('0x3c')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x3d'));db[_0x7eb7('0x3e')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/mailAccount/mailAccount.model');db[_0x7eb7('0x3f')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x40'));db['MailSubstatus']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x41'));db[_0x7eb7('0x42')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x43'));db['MailMessage']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x44'));db['MailApplication']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x45'));db[_0x7eb7('0x46')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/mailQueueReport/mailQueueReport.model');db[_0x7eb7('0x47')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0x48'));db[_0x7eb7('0x49')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x4a'));db[_0x7eb7('0x4b')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x4c'));db[_0x7eb7('0x4d')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x4e'));db[_0x7eb7('0x4f')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x50'));db[_0x7eb7('0x51')]=db['sequelize']['import'](_0x7eb7('0x52'));db['FaxQueue']=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/faxQueue/faxQueue.model');db['FaxQueueReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x53'));db[_0x7eb7('0x54')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x55'));db[_0x7eb7('0x56')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x57'));db[_0x7eb7('0x58')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/smsInteraction/smsInteraction.model');db[_0x7eb7('0x59')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x5a'));db[_0x7eb7('0x5b')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x5c'));db[_0x7eb7('0x5d')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x5e'));db[_0x7eb7('0x5f')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x60'));db[_0x7eb7('0x61')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/openchannelInteraction/openchannelInteraction.model');db[_0x7eb7('0x62')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/openchannelMessage/openchannelMessage.model');db[_0x7eb7('0x63')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0x64'));db['ChatWebsite']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x65'));db[_0x7eb7('0x66')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x67'));db[_0x7eb7('0x68')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x69'));db[_0x7eb7('0x6a')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x6b'));db[_0x7eb7('0x6c')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x6d'));db[_0x7eb7('0x6e')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x6f'));db[_0x7eb7('0x70')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x71'));db[_0x7eb7('0x72')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x73'));db[_0x7eb7('0x74')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x75'));db[_0x7eb7('0x76')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/cmCompany/cmCompany.model');db[_0x7eb7('0x77')]=db['sequelize']['import'](_0x7eb7('0x78'));db[_0x7eb7('0x79')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x7a'));db[_0x7eb7('0x7b')]=db['sequelize']['import']('../api/cmHopperBlack/cmHopperBlack.model');db[_0x7eb7('0x7c')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0x7d'));db['CmHopperHistory']=db['sequelize']['import'](_0x7eb7('0x7e'));db[_0x7eb7('0x7f')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x80'));db['CmCustomField']=db[_0x7eb7('0x1')]['import'](_0x7eb7('0x81'));db[_0x7eb7('0x82')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x83'));db[_0x7eb7('0x84')]=db['sequelize'][_0x7eb7('0x14')]('../api/automation/automation.model');db[_0x7eb7('0x85')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x86'));db['Disposition']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x87'));db[_0x7eb7('0x88')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x89'));db['Interval']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x8a'));db[_0x7eb7('0x8b')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x8c'));db[_0x7eb7('0x8d')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0x8e'));db[_0x7eb7('0x8f')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/voiceQueuesLog/voiceQueuesLog.model');db['Schedule']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x90'));db[_0x7eb7('0x91')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x92'));db[_0x7eb7('0x93')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x94'));db[_0x7eb7('0x95')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x96'));db[_0x7eb7('0x97')]=db['sequelize']['import'](_0x7eb7('0x98'));db[_0x7eb7('0x99')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x9a'));db['Integration']=db[_0x7eb7('0x1')]['import']('../api/integration/integration.model');db[_0x7eb7('0x9b')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x9c'));db[_0x7eb7('0x9d')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0x9e'));db[_0x7eb7('0x9f')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xa0'));db['AnalyticExtractedReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xa1'));db[_0x7eb7('0xa2')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xa3'));db[_0x7eb7('0xa4')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xa5'));db[_0x7eb7('0xa6')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xa7'));db[_0x7eb7('0xa8')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/intSalesforceAccount/intSalesforceAccount.model');db[_0x7eb7('0xa9')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/intSalesforceConfiguration/intSalesforceConfiguration.model');db[_0x7eb7('0xaa')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xab'));db[_0x7eb7('0xac')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xad'));db['SugarcrmConfiguration']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xae'));db[_0x7eb7('0xaf')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xb0'));db[_0x7eb7('0xb1')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xb2'));db[_0x7eb7('0xb3')]=db['sequelize']['import'](_0x7eb7('0xb4'));db[_0x7eb7('0xb5')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xb6'));db[_0x7eb7('0xb7')]=db['sequelize'][_0x7eb7('0x14')]('../api/intZohoAccount/intZohoAccount.model');db['ZohoConfiguration']=db['sequelize'][_0x7eb7('0x14')]('../api/intZohoConfiguration/intZohoConfiguration.model');db[_0x7eb7('0xb8')]=db['sequelize'][_0x7eb7('0x14')]('../api/intZohoField/intZohoField.model');db['ZendeskAccount']=db['sequelize'][_0x7eb7('0x14')]('../api/intZendeskAccount/intZendeskAccount.model');db[_0x7eb7('0xb9')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xba'));db[_0x7eb7('0xbb')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xbc'));db[_0x7eb7('0xbd')]=db['sequelize']['import'](_0x7eb7('0xbe'));db['FreshdeskConfiguration']=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xbf'));db[_0x7eb7('0xc0')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/intFreshdeskField/intFreshdeskField.model');db[_0x7eb7('0xc1')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xc2'));db['VtigerConfiguration']=db['sequelize'][_0x7eb7('0x14')]('../api/intVtigerConfiguration/intVtigerConfiguration.model');db[_0x7eb7('0xc3')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xc4'));db[_0x7eb7('0xc5')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xc6'));db['ServicenowConfiguration']=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/intServicenowConfiguration/intServicenowConfiguration.model');db[_0x7eb7('0xc7')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xc8'));db[_0x7eb7('0xc9')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xca'));db[_0x7eb7('0xcb')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xcc'));db[_0x7eb7('0xcd')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xce'));db['FreshsalesAccount']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xcf'));db[_0x7eb7('0xd0')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xd1'));db['FreshsalesField']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xd2'));db[_0x7eb7('0xd3')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xd4'));db['Network']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xd5'));db[_0x7eb7('0xd6')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xd7'));db['ChatInternalMessage']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xd8'));db[_0x7eb7('0xd9')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xda'));db['JscriptyQuestionReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/jscriptyQuestionReport/jscriptyQuestionReport.model');db['JscriptySessionReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xdb'));db[_0x7eb7('0xdc')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xdd'));db[_0x7eb7('0xde')]=db['sequelize']['import'](_0x7eb7('0xdf'));db[_0x7eb7('0xe0')]=db[_0x7eb7('0x1')]['import']('../api/squareReportDetail/squareReportDetail.model');db[_0x7eb7('0xe1')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xe2'));db['Setting']=db['sequelize']['import'](_0x7eb7('0xe3'));db[_0x7eb7('0xe4')]=db[_0x7eb7('0x1')]['import'](_0x7eb7('0xe5'));db[_0x7eb7('0xe6')]=db['sequelize'][_0x7eb7('0x14')](_0x7eb7('0xe7'));db[_0x7eb7('0xe8')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xe9'));db[_0x7eb7('0xea')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xeb'));db[_0x7eb7('0xec')]=db[_0x7eb7('0x1')]['import']('../api/team/team.model');db[_0x7eb7('0xed')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xee'));db['Campaign']=db['sequelize'][_0x7eb7('0x14')]('../api/campaign/campaign.model');db['Migration']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xef'));db[_0x7eb7('0xf0')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xf1'));db[_0x7eb7('0xf2')]=db['sequelize'][_0x7eb7('0x14')]('../api/plugin/plugin.model');db['MailTransferReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/mailTransferReport/mailTransferReport.model');db['ChatTransferReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xf3'));db[_0x7eb7('0xf4')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/faxTransferReport/faxTransferReport.model');db[_0x7eb7('0xf5')]=db[_0x7eb7('0x1')]['import']('../api/openchannelTransferReport/openchannelTransferReport.model');db['SmsTransferReport']=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/smsTransferReport/smsTransferReport.model');db['CmList']=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xf6'));db[_0x7eb7('0xf7')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xf8'));db['UserProfile']=db[_0x7eb7('0x1')][_0x7eb7('0x14')]('../api/userProfile/userProfile.model');db[_0x7eb7('0xf9')]=db[_0x7eb7('0x1')][_0x7eb7('0x14')](_0x7eb7('0xfa'));db[_0x7eb7('0xfb')]=db['sequelize']['import']('../api/userProfileResource/userProfileResource.model');db['User'][_0x7eb7('0xfc')](db[_0x7eb7('0x23')],{'as':_0x7eb7('0x23'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db[_0x7eb7('0x1f')],{'as':'Recordings','foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db[_0x7eb7('0x31')],{'as':_0x7eb7('0x100'),'foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db['VoiceExtension'],{'as':_0x7eb7('0x101'),'onDelete':_0x7eb7('0xfd'),'hooks':!![]});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db[_0x7eb7('0x7c')],{'as':'HopperFinals','foreignKey':_0x7eb7('0xfe')});db['User'][_0x7eb7('0xff')](db[_0x7eb7('0x102')],{'as':'HopperHistory','foreignKey':'UserId'});db[_0x7eb7('0x13')]['hasMany'](db[_0x7eb7('0x7f')],{'as':'ReportAgentPreview','foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db[_0x7eb7('0x61')],{'as':'OpenchannelInteractions','foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db[_0x7eb7('0x6a')],{'as':_0x7eb7('0x103'),'foreignKey':'UserId'});db['User'][_0x7eb7('0xff')](db[_0x7eb7('0x58')],{'as':_0x7eb7('0x104'),'foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db[_0x7eb7('0x4f')],{'as':'FaxInteractions','foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x13')][_0x7eb7('0xff')](db[_0x7eb7('0x42')],{'as':'MailInteractions','foreignKey':'UserId'});db['User'][_0x7eb7('0x105')](db[_0x7eb7('0x106')],{'as':_0x7eb7('0x106'),'foreignKey':_0x7eb7('0x107')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['ChatGroup'],{'as':_0x7eb7('0x109'),'through':_0x7eb7('0x10a')});db['User'][_0x7eb7('0x108')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x10b'),'through':'cm_user_has_contacts'});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['CmList'],{'as':_0x7eb7('0x10c'),'through':_0x7eb7('0x10d')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0xec')],{'through':_0x7eb7('0x10e')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x42')],{'as':_0x7eb7('0x10f'),'through':'user_has_mail_interactions'});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['ChatInteraction'],{'as':_0x7eb7('0x103'),'through':_0x7eb7('0x110')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x4f')],{'as':_0x7eb7('0x111'),'through':_0x7eb7('0x112')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x58')],{'as':_0x7eb7('0x104'),'through':_0x7eb7('0x113')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x61')],{'as':_0x7eb7('0x114'),'through':_0x7eb7('0x115')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x1d')],{'as':'VoiceQueues','through':_0x7eb7('0x116'),'required':![]});db[_0x7eb7('0x13')]['belongsToMany'](db['MailQueue'],{'as':'MailQueues','through':_0x7eb7('0x36'),'required':![]});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x70')],{'as':_0x7eb7('0x117'),'through':_0x7eb7('0x34'),'required':![],'hooks':!![]});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x118')],{'as':'FaxQueues','through':_0x7eb7('0x37'),'required':![]});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x5b')],{'as':'SmsQueues','through':'UserSmsQueue','required':![]});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['OpenchannelQueue'],{'as':'OpenchannelQueues','through':_0x7eb7('0x119'),'required':![]});db['User'][_0x7eb7('0x108')](db[_0x7eb7('0x11a')],{'through':_0x7eb7('0x10d')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['VoicePrefix'],{'as':_0x7eb7('0x11b'),'through':_0x7eb7('0x11c'),'required':![]});db[_0x7eb7('0x13')]['belongsToMany'](db[_0x7eb7('0x11d')],{'as':_0x7eb7('0x11e'),'through':_0x7eb7('0x11f')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['FaxAccount'],{'as':_0x7eb7('0x120'),'through':_0x7eb7('0x121')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0x3e')],{'as':_0x7eb7('0x122'),'through':_0x7eb7('0x123')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['OpenchannelAccount'],{'as':_0x7eb7('0x124'),'through':_0x7eb7('0x125')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db['SmsAccount'],{'as':_0x7eb7('0x126'),'through':_0x7eb7('0x127')});db[_0x7eb7('0x13')][_0x7eb7('0x108')](db[_0x7eb7('0xe6')],{'as':_0x7eb7('0x128'),'through':'user_has_square_projects'});db[_0x7eb7('0x15')][_0x7eb7('0xff')](db[_0x7eb7('0x19')],{'as':_0x7eb7('0x129'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x12a')});db[_0x7eb7('0x17')][_0x7eb7('0xff')](db['VoiceExtension'],{'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x19')][_0x7eb7('0xff')](db['VoiceExtension'],{'as':_0x7eb7('0x12b'),'onDelete':'cascade'});db[_0x7eb7('0x1b')][_0x7eb7('0x108')](db[_0x7eb7('0x91')],{'as':'Sounds','through':_0x7eb7('0x12c')});db[_0x7eb7('0x1d')][_0x7eb7('0xff')](db[_0x7eb7('0x31')],{'as':_0x7eb7('0x12d'),'foreignKey':_0x7eb7('0x12e')});db[_0x7eb7('0x1d')][_0x7eb7('0xff')](db[_0x7eb7('0x79')],{'as':'Hoppers','foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0x7eb7('0xff')](db[_0x7eb7('0x7c')],{'as':_0x7eb7('0x12f'),'foreignKey':_0x7eb7('0x12e')});db[_0x7eb7('0x1d')][_0x7eb7('0xff')](db[_0x7eb7('0x102')],{'as':'HopperHistories','foreignKey':_0x7eb7('0x12e')});db['VoiceQueue']['hasMany'](db[_0x7eb7('0x7f')],{'as':_0x7eb7('0x7f'),'foreignKey':_0x7eb7('0x12e')});db[_0x7eb7('0x1d')][_0x7eb7('0xff')](db[_0x7eb7('0x7b')],{'as':_0x7eb7('0x130'),'foreignKey':_0x7eb7('0x12e')});db[_0x7eb7('0x1d')][_0x7eb7('0xff')](db['JscriptySessionReport'],{'as':_0x7eb7('0x131'),'foreignKey':_0x7eb7('0x12e')});db['VoiceQueue'][_0x7eb7('0x105')](db[_0x7eb7('0x2d')],{'as':_0x7eb7('0x2d'),'foreignKey':_0x7eb7('0x132')});db[_0x7eb7('0x1d')]['belongsTo'](db[_0x7eb7('0x2d')],{'as':_0x7eb7('0x133'),'foreignKey':_0x7eb7('0x134')});db[_0x7eb7('0x1d')][_0x7eb7('0x105')](db[_0x7eb7('0x135')],{'as':_0x7eb7('0x135'),'foreignKey':'IntervalId'});db[_0x7eb7('0x1d')][_0x7eb7('0x105')](db[_0x7eb7('0x8b')],{'as':_0x7eb7('0x136'),'foreignKey':_0x7eb7('0x137')});db['VoiceQueue'][_0x7eb7('0x108')](db[_0x7eb7('0x11a')],{'as':'Lists','through':_0x7eb7('0x138')});db[_0x7eb7('0x1d')]['belongsToMany'](db[_0x7eb7('0x13')],{'as':'Agents','through':'UserVoiceQueue'});db[_0x7eb7('0x1d')][_0x7eb7('0x108')](db['Team'],{'as':'Teams','through':_0x7eb7('0x139')});db['VoiceQueue'][_0x7eb7('0x108')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x13a'),'through':_0x7eb7('0x13b')});db[_0x7eb7('0x1f')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x13'),'foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x21')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x13'),'foreignKey':'UserId'});db[_0x7eb7('0x23')]['hasMany'](db['VoiceMailMessage'],{'as':_0x7eb7('0x13c'),'onDelete':'cascade','foreignKey':_0x7eb7('0x13d'),'sourceKey':'mailbox'});db['VoiceMailMessage'][_0x7eb7('0x105')](db[_0x7eb7('0x23')],{'foreignKey':'mailboxuser','targetKey':_0x7eb7('0x13e')});db[_0x7eb7('0x26')][_0x7eb7('0xff')](db[_0x7eb7('0x2b')],{'as':_0x7eb7('0x13f'),'foreignKey':_0x7eb7('0x140'),'constraints':![]});db[_0x7eb7('0x26')][_0x7eb7('0xff')](db[_0x7eb7('0x141')],{'as':_0x7eb7('0x142'),'foreignKey':_0x7eb7('0x140'),'constraints':![]});db[_0x7eb7('0x26')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':'User','foreignKey':_0x7eb7('0xfe')});db['VoiceCallReport'][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0x3a')][_0x7eb7('0x105')](db[_0x7eb7('0x3e')],{'as':_0x7eb7('0x3e'),'foreignKey':'MailAccountId'});db[_0x7eb7('0x3c')][_0x7eb7('0x105')](db['MailAccount'],{'as':'MailAccount','foreignKey':_0x7eb7('0x145')});db[_0x7eb7('0x3e')]['hasOne'](db[_0x7eb7('0x3a')],{'as':_0x7eb7('0x146'),'onDelete':'cascade'});db[_0x7eb7('0x3e')][_0x7eb7('0xfc')](db[_0x7eb7('0x3c')],{'as':_0x7eb7('0x147'),'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x3e')]['hasMany'](db['Disposition'],{'as':_0x7eb7('0x148'),'foreignKey':_0x7eb7('0x145')});db['MailAccount']['hasMany'](db[_0x7eb7('0x85')],{'as':_0x7eb7('0x149'),'foreignKey':_0x7eb7('0x145')});db[_0x7eb7('0x3e')][_0x7eb7('0xff')](db['MailMessage'],{'as':'Messages','foreignKey':_0x7eb7('0x145')});db['MailAccount']['hasMany'](db['MailInteraction'],{'as':_0x7eb7('0x14a')});db[_0x7eb7('0x3e')][_0x7eb7('0xff')](db[_0x7eb7('0x14b')],{'as':_0x7eb7('0x12b')});db[_0x7eb7('0x3e')][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':'List','foreignKey':_0x7eb7('0x14c')});db[_0x7eb7('0x3e')][_0x7eb7('0x105')](db[_0x7eb7('0x95')],{'as':'Template','foreignKey':'TemplateId'});db['MailAccount']['belongsTo'](db[_0x7eb7('0x8b')],{'as':_0x7eb7('0x136'),'foreignKey':_0x7eb7('0x137')});db[_0x7eb7('0x3e')]['belongsToMany'](db['User'],{'as':'Agents','through':_0x7eb7('0x123')});db[_0x7eb7('0x3f')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x36')});db[_0x7eb7('0x3f')][_0x7eb7('0x108')](db[_0x7eb7('0xec')],{'through':'team_has_mail_queues','as':'Teams'});db[_0x7eb7('0x42')][_0x7eb7('0xff')](db[_0x7eb7('0x14e')],{'as':'Messages','onDelete':'cascade','foreignKey':'MailInteractionId'});db[_0x7eb7('0x42')]['belongsTo'](db[_0x7eb7('0x3e')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x145')});db['MailInteraction'][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0x42')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x150'),'foreignKey':'UserId'});db[_0x7eb7('0x42')]['belongsToMany'](db[_0x7eb7('0x93')],{'through':'mail_interaction_has_tags','as':_0x7eb7('0x151')});db['MailInteraction']['belongsToMany'](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x152'),'as':_0x7eb7('0x153')});db[_0x7eb7('0x42')]['belongsToMany'](db[_0x7eb7('0x13')],{'as':'Users','through':'user_has_mail_interactions','foreignKey':_0x7eb7('0x154')});db[_0x7eb7('0x14e')][_0x7eb7('0xff')](db['Attachment'],{'as':_0x7eb7('0x155'),'onDelete':'cascade'});db[_0x7eb7('0x14e')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':'User'});db[_0x7eb7('0x14e')][_0x7eb7('0x105')](db['CmContact'],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x143')});db[_0x7eb7('0x14e')][_0x7eb7('0x105')](db[_0x7eb7('0x42')],{'as':_0x7eb7('0x156'),'foreignKey':_0x7eb7('0x154')});db[_0x7eb7('0x14e')][_0x7eb7('0x105')](db['MailAccount'],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x145')});db[_0x7eb7('0x14b')]['belongsTo'](db[_0x7eb7('0x13')],{'onDelete':_0x7eb7('0x157')});db['MailApplication'][_0x7eb7('0x105')](db[_0x7eb7('0x3f')],{'onDelete':'restrict'});db[_0x7eb7('0x14b')]['belongsTo'](db[_0x7eb7('0x3e')],{'onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x14b')][_0x7eb7('0x105')](db[_0x7eb7('0x135')],{'onDelete':_0x7eb7('0x157'),'foreignKey':_0x7eb7('0x158')});db[_0x7eb7('0x14b')][_0x7eb7('0x105')](db[_0x7eb7('0x93')],{'onDelete':_0x7eb7('0x157'),'foreignKey':_0x7eb7('0x159')});db[_0x7eb7('0x46')][_0x7eb7('0x105')](db[_0x7eb7('0x3e')],{});db['MailQueueReport'][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':'ListId'});db[_0x7eb7('0x46')][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0x46')]['belongsTo'](db[_0x7eb7('0x42')],{});db[_0x7eb7('0x46')][_0x7eb7('0x105')](db[_0x7eb7('0x14e')],{});db['MailQueueReport'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{});db['MailQueueReport'][_0x7eb7('0x105')](db[_0x7eb7('0x3f')],{});db[_0x7eb7('0x47')][_0x7eb7('0xff')](db[_0x7eb7('0x49')],{'as':'Items','onDelete':_0x7eb7('0xfd')});db['FaxAccount'][_0x7eb7('0xff')](db[_0x7eb7('0x15b')],{'as':'Dispositions','foreignKey':_0x7eb7('0x15c')});db[_0x7eb7('0x4b')][_0x7eb7('0xff')](db[_0x7eb7('0x85')],{'as':'Answers','foreignKey':'FaxAccountId'});db[_0x7eb7('0x4b')][_0x7eb7('0xff')](db[_0x7eb7('0x4f')],{'as':'Interactions'});db[_0x7eb7('0x4b')][_0x7eb7('0xff')](db[_0x7eb7('0x4d')],{'as':_0x7eb7('0x12b')});db['FaxAccount'][_0x7eb7('0xff')](db[_0x7eb7('0x19')],{'as':_0x7eb7('0x15d'),'onDelete':_0x7eb7('0xfd')});db['FaxAccount'][_0x7eb7('0xff')](db[_0x7eb7('0x51')],{'as':'Messages'});db[_0x7eb7('0x4b')][_0x7eb7('0x105')](db[_0x7eb7('0x2d')],{'as':_0x7eb7('0x2d')});db['FaxAccount'][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':'ListId'});db[_0x7eb7('0x4b')]['belongsTo'](db[_0x7eb7('0x8b')],{'as':_0x7eb7('0x136'),'foreignKey':_0x7eb7('0x137')});db['FaxAccount']['belongsToMany'](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x121')});db[_0x7eb7('0x4d')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'onDelete':_0x7eb7('0x157')});db['FaxApplication'][_0x7eb7('0x105')](db[_0x7eb7('0x118')],{'onDelete':'restrict'});db[_0x7eb7('0x4d')][_0x7eb7('0x105')](db[_0x7eb7('0x4b')],{'onDelete':'restrict'});db[_0x7eb7('0x4d')][_0x7eb7('0x105')](db[_0x7eb7('0x93')],{'onDelete':_0x7eb7('0x157'),'foreignKey':_0x7eb7('0x159')});db['FaxInteraction']['hasMany'](db[_0x7eb7('0x51')],{'as':'Messages','onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x15e')});db['FaxInteraction'][_0x7eb7('0x105')](db['FaxAccount'],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x15c')});db['FaxInteraction'][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db['FaxInteraction'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':'Owner','foreignKey':_0x7eb7('0xfe')});db['FaxInteraction'][_0x7eb7('0x108')](db['Tag'],{'through':_0x7eb7('0x15f'),'as':_0x7eb7('0x151')});db[_0x7eb7('0x4f')][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x15f'),'as':'ThroughTags'});db[_0x7eb7('0x4f')]['belongsToMany'](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x160'),'through':'user_has_fax_interactions','foreignKey':_0x7eb7('0x15e')});db[_0x7eb7('0x51')][_0x7eb7('0x105')](db['User'],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x13')});db[_0x7eb7('0x51')][_0x7eb7('0x105')](db[_0x7eb7('0x4f')],{'as':_0x7eb7('0x156'),'foreignKey':_0x7eb7('0x15e')});db[_0x7eb7('0x51')][_0x7eb7('0x105')](db['CmContact'],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x143')});db[_0x7eb7('0x51')][_0x7eb7('0x105')](db[_0x7eb7('0xf0')],{'as':_0x7eb7('0xf0'),'foreignKey':'AttachmentId'});db[_0x7eb7('0x51')][_0x7eb7('0x105')](db[_0x7eb7('0x4b')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x15c')});db[_0x7eb7('0x118')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':'Agents','through':_0x7eb7('0x37')});db[_0x7eb7('0x118')][_0x7eb7('0x108')](db['Team'],{'through':'team_has_fax_queues','as':_0x7eb7('0x161')});db['FaxQueueReport'][_0x7eb7('0x105')](db[_0x7eb7('0x4b')],{});db['FaxQueueReport']['belongsTo'](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':_0x7eb7('0x14c')});db[_0x7eb7('0x162')]['belongsTo'](db['CmContact'],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0x162')][_0x7eb7('0x105')](db[_0x7eb7('0x4f')],{});db[_0x7eb7('0x162')][_0x7eb7('0x105')](db[_0x7eb7('0x51')],{});db[_0x7eb7('0x162')]['belongsTo'](db[_0x7eb7('0x13')],{});db['FaxQueueReport']['belongsTo'](db['FaxQueue'],{});db[_0x7eb7('0x54')][_0x7eb7('0xff')](db['Disposition'],{'as':_0x7eb7('0x148'),'foreignKey':_0x7eb7('0x163')});db[_0x7eb7('0x54')][_0x7eb7('0xff')](db[_0x7eb7('0x85')],{'as':'Answers','foreignKey':'SmsAccountId'});db[_0x7eb7('0x54')]['hasMany'](db['SmsMessage'],{'as':_0x7eb7('0x13c'),'foreignKey':_0x7eb7('0x163')});db[_0x7eb7('0x54')][_0x7eb7('0xff')](db[_0x7eb7('0x58')],{'as':'Interactions'});db[_0x7eb7('0x54')]['hasMany'](db[_0x7eb7('0x56')],{'as':'Applications'});db[_0x7eb7('0x54')][_0x7eb7('0x105')](db['CmList'],{'as':'List','foreignKey':'ListId'});db[_0x7eb7('0x54')]['belongsTo'](db[_0x7eb7('0x8b')],{'as':'mandatoryDispositionPause','foreignKey':_0x7eb7('0x137')});db['SmsAccount'][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x127')});db['SmsApplication']['belongsTo'](db[_0x7eb7('0x13')],{'onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x56')][_0x7eb7('0x105')](db[_0x7eb7('0x5b')],{'onDelete':_0x7eb7('0x157')});db['SmsApplication']['belongsTo'](db[_0x7eb7('0x54')],{'onDelete':'restrict'});db['SmsApplication'][_0x7eb7('0x105')](db[_0x7eb7('0x135')],{'onDelete':'restrict','foreignKey':_0x7eb7('0x158')});db[_0x7eb7('0x56')][_0x7eb7('0x105')](db[_0x7eb7('0x93')],{'onDelete':_0x7eb7('0x157'),'foreignKey':'TagId'});db[_0x7eb7('0x58')][_0x7eb7('0xff')](db[_0x7eb7('0x59')],{'as':_0x7eb7('0x13c'),'onDelete':'cascade','foreignKey':_0x7eb7('0x164')});db[_0x7eb7('0x58')][_0x7eb7('0x105')](db[_0x7eb7('0x54')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x163')});db[_0x7eb7('0x58')]['belongsTo'](db['CmContact'],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db['SmsInteraction'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x150'),'foreignKey':'UserId'});db[_0x7eb7('0x58')][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':'sms_interaction_has_tags','as':'Tags'});db['SmsInteraction'][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x165'),'as':'ThroughTags'});db[_0x7eb7('0x58')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x160'),'through':_0x7eb7('0x113'),'foreignKey':'SmsInteractionId'});db['SmsMessage'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x13')});db[_0x7eb7('0x59')][_0x7eb7('0x105')](db['CmContact'],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x143')});db[_0x7eb7('0x59')][_0x7eb7('0x105')](db[_0x7eb7('0x58')],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x156'),'foreignKey':'SmsInteractionId'});db[_0x7eb7('0x59')][_0x7eb7('0x105')](db['SmsAccount'],{'as':'Account','foreignKey':_0x7eb7('0x163')});db[_0x7eb7('0x5b')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':'Agents','through':'UserSmsQueue','foreignKey':_0x7eb7('0x166')});db['SmsQueue'][_0x7eb7('0x108')](db[_0x7eb7('0xec')],{'through':_0x7eb7('0x167'),'as':'Teams'});db[_0x7eb7('0x5d')]['hasMany'](db['Disposition'],{'as':_0x7eb7('0x148'),'foreignKey':_0x7eb7('0x168')});db[_0x7eb7('0x5d')][_0x7eb7('0xff')](db['CannedAnswer'],{'as':'Answers','foreignKey':_0x7eb7('0x168')});db[_0x7eb7('0x5d')][_0x7eb7('0xff')](db[_0x7eb7('0x61')],{'as':_0x7eb7('0x14a'),'foreignKey':_0x7eb7('0x168')});db[_0x7eb7('0x5d')]['hasMany'](db[_0x7eb7('0x62')],{'as':'Messages','foreignKey':_0x7eb7('0x168')});db[_0x7eb7('0x5d')][_0x7eb7('0xff')](db['OpenchannelApplication'],{'as':_0x7eb7('0x12b'),'foreignKey':'OpenchannelAccountId'});db[_0x7eb7('0x5d')][_0x7eb7('0x105')](db['CmList'],{'as':_0x7eb7('0x15a'),'foreignKey':'ListId'});db[_0x7eb7('0x5d')][_0x7eb7('0x105')](db[_0x7eb7('0x8b')],{'as':_0x7eb7('0x136'),'foreignKey':_0x7eb7('0x137')});db[_0x7eb7('0x5d')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x125')});db['OpenchannelApplication']['belongsTo'](db[_0x7eb7('0x13')],{'onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x5f')][_0x7eb7('0x105')](db[_0x7eb7('0x63')],{'onDelete':_0x7eb7('0x157'),'foreignKey':_0x7eb7('0x169')});db[_0x7eb7('0x5f')][_0x7eb7('0x105')](db['OpenchannelAccount'],{'onDelete':_0x7eb7('0x157'),'foreignKey':_0x7eb7('0x168')});db['OpenchannelApplication'][_0x7eb7('0x105')](db[_0x7eb7('0x135')],{'onDelete':_0x7eb7('0x157'),'foreignKey':_0x7eb7('0x158')});db[_0x7eb7('0x5f')][_0x7eb7('0x105')](db[_0x7eb7('0x93')],{'onDelete':_0x7eb7('0x157'),'foreignKey':_0x7eb7('0x159')});db[_0x7eb7('0x61')][_0x7eb7('0xff')](db[_0x7eb7('0x62')],{'as':'Messages','onDelete':'cascade','foreignKey':_0x7eb7('0x16a')});db[_0x7eb7('0x61')][_0x7eb7('0x105')](db[_0x7eb7('0x5d')],{'as':'Account','foreignKey':'OpenchannelAccountId'});db['OpenchannelInteraction'][_0x7eb7('0x105')](db['CmContact'],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0x61')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':'Owner','foreignKey':_0x7eb7('0xfe')});db['OpenchannelInteraction'][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x16b'),'as':_0x7eb7('0x151')});db[_0x7eb7('0x61')][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x16b'),'as':'ThroughTags'});db[_0x7eb7('0x61')]['belongsToMany'](db['User'],{'as':_0x7eb7('0x160'),'through':'user_has_openchannel_interactions','foreignKey':'OpenchannelInteractionId'});db[_0x7eb7('0x62')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'onDelete':_0x7eb7('0xfd'),'as':'User'});db['OpenchannelMessage']['belongsTo'](db[_0x7eb7('0x77')],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x143')});db[_0x7eb7('0x62')]['belongsTo'](db[_0x7eb7('0x61')],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x156'),'foreignKey':_0x7eb7('0x16a')});db[_0x7eb7('0x62')][_0x7eb7('0x105')](db[_0x7eb7('0xf0')],{'as':'Attachment','foreignKey':_0x7eb7('0x16c')});db['OpenchannelMessage'][_0x7eb7('0x105')](db['OpenchannelAccount'],{'as':'Account','foreignKey':'OpenchannelAccountId'});db['OpenchannelQueue'][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x119'),'foreignKey':_0x7eb7('0x169')});db[_0x7eb7('0x63')][_0x7eb7('0x108')](db['Team'],{'through':_0x7eb7('0x16d'),'as':'Teams'});db[_0x7eb7('0x11d')][_0x7eb7('0xff')](db[_0x7eb7('0x15b')],{'as':_0x7eb7('0x148'),'foreignKey':_0x7eb7('0x16e')});db['ChatWebsite'][_0x7eb7('0xff')](db[_0x7eb7('0x85')],{'as':_0x7eb7('0x149'),'foreignKey':'ChatWebsiteId'});db[_0x7eb7('0x11d')][_0x7eb7('0xff')](db[_0x7eb7('0x74')],{'as':_0x7eb7('0x16f')});db[_0x7eb7('0x11d')][_0x7eb7('0xff')](db['ChatInteraction'],{'as':'Interactions'});db[_0x7eb7('0x11d')][_0x7eb7('0xff')](db[_0x7eb7('0x68')],{'as':'Applications'});db[_0x7eb7('0x11d')][_0x7eb7('0xff')](db['ChatMessage'],{'as':_0x7eb7('0x13c')});db[_0x7eb7('0x11d')][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':_0x7eb7('0x14c')});db[_0x7eb7('0x11d')][_0x7eb7('0x105')](db[_0x7eb7('0x135')],{'as':_0x7eb7('0x135'),'foreignKey':_0x7eb7('0x158')});db[_0x7eb7('0x11d')][_0x7eb7('0x105')](db['Pause'],{'as':_0x7eb7('0x136'),'foreignKey':_0x7eb7('0x137')});db[_0x7eb7('0x11d')][_0x7eb7('0x108')](db['User'],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x11f')});db[_0x7eb7('0x66')][_0x7eb7('0x105')](db[_0x7eb7('0x5d')],{});db[_0x7eb7('0x66')][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':_0x7eb7('0x14c')});db[_0x7eb7('0x66')][_0x7eb7('0x105')](db['CmContact'],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db['OpenchannelQueueReport'][_0x7eb7('0x105')](db['OpenchannelInteraction'],{});db[_0x7eb7('0x66')][_0x7eb7('0x105')](db[_0x7eb7('0x62')],{});db[_0x7eb7('0x66')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{});db[_0x7eb7('0x66')][_0x7eb7('0x105')](db[_0x7eb7('0x63')],{});db[_0x7eb7('0x68')][_0x7eb7('0x105')](db['User'],{'as':_0x7eb7('0x170'),'foreignKey':_0x7eb7('0xfe'),'onDelete':'restrict'});db[_0x7eb7('0x68')][_0x7eb7('0x105')](db[_0x7eb7('0x70')],{'as':'Queue','foreignKey':'ChatQueueId','onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x68')][_0x7eb7('0x105')](db[_0x7eb7('0x11d')],{'as':'Website','foreignKey':_0x7eb7('0x16e'),'onDelete':'restrict'});db[_0x7eb7('0x68')][_0x7eb7('0x105')](db[_0x7eb7('0x93')],{'onDelete':'restrict','foreignKey':_0x7eb7('0x159')});db[_0x7eb7('0x6a')][_0x7eb7('0xff')](db['ChatMessage'],{'as':_0x7eb7('0x13c'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x171')});db[_0x7eb7('0x6a')][_0x7eb7('0x105')](db['ChatWebsite'],{'as':'Account','foreignKey':'ChatWebsiteId'});db[_0x7eb7('0x6a')]['belongsTo'](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144')});db['ChatInteraction'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x150'),'foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x6a')]['belongsToMany'](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x172'),'as':_0x7eb7('0x151')});db[_0x7eb7('0x6a')][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x172'),'as':_0x7eb7('0x153')});db[_0x7eb7('0x6a')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x160'),'through':'user_has_chat_interactions','foreignKey':_0x7eb7('0x171')});db[_0x7eb7('0x6c')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x13')});db[_0x7eb7('0x6c')][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'onDelete':_0x7eb7('0xfd'),'as':_0x7eb7('0x143'),'foreignKey':'ContactId'});db['ChatMessage'][_0x7eb7('0x105')](db[_0x7eb7('0x6a')],{'onDelete':'cascade','as':'Interaction','foreignKey':_0x7eb7('0x171')});db[_0x7eb7('0x6c')][_0x7eb7('0x105')](db['Attachment'],{'as':_0x7eb7('0xf0'),'foreignKey':'AttachmentId'});db[_0x7eb7('0x6c')][_0x7eb7('0x105')](db[_0x7eb7('0x11d')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x16e')});db['ChatOfflineMessage'][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'onDelete':'cascade','as':'Contact','foreignKey':'ContactId'});db[_0x7eb7('0x6e')][_0x7eb7('0x105')](db[_0x7eb7('0x11d')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x16e')});db[_0x7eb7('0x70')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x34'),'hooks':!![]});db[_0x7eb7('0x70')][_0x7eb7('0x108')](db[_0x7eb7('0xec')],{'through':_0x7eb7('0x173'),'as':_0x7eb7('0x161')});db[_0x7eb7('0x72')][_0x7eb7('0xff')](db['ChatInternalMessage'],{'as':'Messages','foreignKey':_0x7eb7('0x174'),'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x72')][_0x7eb7('0x108')](db['User'],{'as':'Members','through':_0x7eb7('0x10a')});db['ChatProactiveAction']['belongsTo'](db[_0x7eb7('0x11d')],{'as':_0x7eb7('0x175'),'foreignKey':'ChatWebsiteId'});db['CmCompany']['hasMany'](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x10b'),'foreignKey':_0x7eb7('0x176')});db[_0x7eb7('0x77')][_0x7eb7('0xff')](db['CmHopper'],{'as':_0x7eb7('0x177'),'foreignKey':'ContactId'});db[_0x7eb7('0x77')][_0x7eb7('0xff')](db[_0x7eb7('0x7c')],{'as':_0x7eb7('0x12f'),'foreignKey':'ContactId'});db[_0x7eb7('0x77')][_0x7eb7('0xff')](db[_0x7eb7('0x102')],{'as':_0x7eb7('0x178'),'foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0x77')][_0x7eb7('0xff')](db['ReportAgentPreview'],{'as':_0x7eb7('0x7f'),'foreignKey':_0x7eb7('0x144')});db['CmContact'][_0x7eb7('0xff')](db['JscriptySessionReport'],{'as':'JscriptySessions','foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0x77')][_0x7eb7('0xff')](db[_0x7eb7('0x61')],{'as':'OpenchannelInteractions','foreignKey':_0x7eb7('0x144'),'onDelete':_0x7eb7('0x157')});db['CmContact'][_0x7eb7('0xff')](db['ChatInteraction'],{'as':_0x7eb7('0x103'),'foreignKey':_0x7eb7('0x144'),'onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x77')][_0x7eb7('0xff')](db[_0x7eb7('0x58')],{'as':_0x7eb7('0x104'),'foreignKey':_0x7eb7('0x144'),'onDelete':_0x7eb7('0x157')});db['CmContact']['hasMany'](db[_0x7eb7('0x4f')],{'as':_0x7eb7('0x111'),'foreignKey':_0x7eb7('0x144'),'onDelete':'restrict'});db['CmContact']['hasMany'](db[_0x7eb7('0x42')],{'as':_0x7eb7('0x10f'),'foreignKey':_0x7eb7('0x144'),'onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x77')][_0x7eb7('0x105')](db[_0x7eb7('0x76')],{'as':'Company','foreignKey':_0x7eb7('0x176')});db[_0x7eb7('0x77')][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':'List','foreignKey':'ListId','onDelete':'cascade'});db['CmContact']['belongsToMany'](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x160'),'through':_0x7eb7('0x179')});db[_0x7eb7('0x77')][_0x7eb7('0x108')](db['Tag'],{'as':_0x7eb7('0x151'),'through':'cm_contact_has_tags'});db[_0x7eb7('0x77')][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':'cm_contact_has_tags','as':_0x7eb7('0x153')});db[_0x7eb7('0x79')][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144'),'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x79')]['belongsTo'](db[_0x7eb7('0x11a')],{'as':'List','foreignKey':_0x7eb7('0x14c'),'onDelete':'cascade'});db['CmHopper']['belongsTo'](db[_0x7eb7('0x13')],{'as':'Agent','foreignKey':_0x7eb7('0xfe')});db[_0x7eb7('0x79')][_0x7eb7('0x105')](db[_0x7eb7('0x1d')],{'as':_0x7eb7('0x17a'),'foreignKey':'VoiceQueueId','onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x79')]['belongsTo'](db[_0x7eb7('0x17b')],{'as':'Campaign','foreignKey':_0x7eb7('0x17c'),'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x79')]['belongsTo'](db['User'],{'as':_0x7eb7('0x150'),'foreignKey':_0x7eb7('0x17d')});db[_0x7eb7('0x7b')][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x143'),'foreignKey':_0x7eb7('0x144'),'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x7b')][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':_0x7eb7('0x14c'),'onDelete':'cascade'});db[_0x7eb7('0x7b')][_0x7eb7('0x105')](db[_0x7eb7('0x1d')],{'as':_0x7eb7('0x17a'),'foreignKey':'VoiceQueueId','onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x7b')]['belongsTo'](db[_0x7eb7('0x17b')],{'as':_0x7eb7('0x17b'),'foreignKey':_0x7eb7('0x17c'),'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x84')][_0x7eb7('0xff')](db[_0x7eb7('0x88')],{'as':{'plural':_0x7eb7('0x17e'),'singular':'OneAll'},'foreignKey':_0x7eb7('0x17f'),'onDelete':'cascade','hooks':!![]});db[_0x7eb7('0x84')][_0x7eb7('0xff')](db['Condition'],{'as':{'plural':_0x7eb7('0x180'),'singular':_0x7eb7('0x181')},'foreignKey':_0x7eb7('0x182'),'onDelete':_0x7eb7('0xfd'),'hooks':!![]});db[_0x7eb7('0x84')][_0x7eb7('0xff')](db[_0x7eb7('0x82')],{'as':_0x7eb7('0x183'),'foreignKey':'AutomationId','onDelete':_0x7eb7('0xfd'),'hooks':!![]});db[_0x7eb7('0x135')][_0x7eb7('0xff')](db[_0x7eb7('0x135')],{'as':_0x7eb7('0x184'),'foreignKey':_0x7eb7('0x158'),'onDelete':_0x7eb7('0xfd'),'hooks':!![],'required':![]});db['Interval'][_0x7eb7('0xff')](db[_0x7eb7('0x19')],{'as':_0x7eb7('0x101'),'foreignKey':_0x7eb7('0x158'),'onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x135')][_0x7eb7('0xff')](db[_0x7eb7('0x14b')],{'as':_0x7eb7('0x185'),'foreignKey':'IntervalId'});db[_0x7eb7('0x135')][_0x7eb7('0xff')](db[_0x7eb7('0x68')],{'as':'ChatApplications','foreignKey':_0x7eb7('0x158')});db[_0x7eb7('0x135')][_0x7eb7('0xff')](db[_0x7eb7('0x4d')],{'as':'FaxApplications','foreignKey':_0x7eb7('0x158')});db['Interval'][_0x7eb7('0xff')](db[_0x7eb7('0x56')],{'as':_0x7eb7('0x186'),'foreignKey':_0x7eb7('0x158')});db['Schedule'][_0x7eb7('0x105')](db['MailAccount'],{});db[_0x7eb7('0x187')][_0x7eb7('0x105')](db['AnalyticDefaultReport'],{'foreignKey':_0x7eb7('0x188')});db[_0x7eb7('0x187')][_0x7eb7('0x105')](db['AnalyticCustomReport'],{'foreignKey':_0x7eb7('0x189')});db[_0x7eb7('0x91')]['belongsToMany'](db[_0x7eb7('0x1b')],{'as':_0x7eb7('0x18a'),'through':'moh_has_sounds','onDelete':_0x7eb7('0x157')});db[_0x7eb7('0x93')][_0x7eb7('0x108')](db[_0x7eb7('0x77')],{'through':_0x7eb7('0x18b')});db[_0x7eb7('0x93')][_0x7eb7('0x108')](db[_0x7eb7('0x6a')],{'through':_0x7eb7('0x172')});db[_0x7eb7('0x93')][_0x7eb7('0x108')](db[_0x7eb7('0x42')],{'through':_0x7eb7('0x152')});db[_0x7eb7('0x93')][_0x7eb7('0x108')](db[_0x7eb7('0x58')],{'through':_0x7eb7('0x165')});db['Tag'][_0x7eb7('0x108')](db[_0x7eb7('0x4f')],{'through':_0x7eb7('0x15f')});db[_0x7eb7('0x93')][_0x7eb7('0x108')](db['OpenchannelInteraction'],{'through':_0x7eb7('0x16b')});db[_0x7eb7('0x97')]['hasMany'](db[_0x7eb7('0x88')],{'as':{'plural':_0x7eb7('0x18c'),'singular':_0x7eb7('0x18d')},'foreignKey':_0x7eb7('0x18e'),'onDelete':_0x7eb7('0xfd'),'hooks':!![]});db['Trigger'][_0x7eb7('0xff')](db[_0x7eb7('0x88')],{'as':{'plural':_0x7eb7('0x18f'),'singular':_0x7eb7('0x190')},'foreignKey':_0x7eb7('0x191'),'onDelete':_0x7eb7('0xfd'),'hooks':!![]});db[_0x7eb7('0x97')][_0x7eb7('0xff')](db[_0x7eb7('0x82')],{'as':_0x7eb7('0x183'),'foreignKey':_0x7eb7('0x192'),'onDelete':_0x7eb7('0xfd'),'hooks':!![]});db[_0x7eb7('0x9d')][_0x7eb7('0xff')](db['AnalyticFieldReport'],{'as':'Fields','onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x189'),'hooks':!![]});db[_0x7eb7('0x9f')][_0x7eb7('0xff')](db['AnalyticFieldReport'],{'as':'Fields','onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x188')});db['AnalyticMetric'][_0x7eb7('0xff')](db[_0x7eb7('0xa4')],{'as':'Fields','onDelete':_0x7eb7('0xfd'),'foreignKey':'MetricId'});db[_0x7eb7('0xa4')][_0x7eb7('0x105')](db['AnalyticMetric'],{'foreignKey':'MetricId'});db['SalesforceAccount']['hasMany'](db[_0x7eb7('0xa9')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':'AccountId'});db[_0x7eb7('0xa9')][_0x7eb7('0xff')](db[_0x7eb7('0xaa')],{'as':_0x7eb7('0x194'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0xa9')][_0x7eb7('0xff')](db[_0x7eb7('0xaa')],{'as':'Descriptions','onDelete':'cascade','foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0xa9')][_0x7eb7('0xff')](db[_0x7eb7('0xaa')],{'as':_0x7eb7('0x197'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xa9')][_0x7eb7('0x105')](db[_0x7eb7('0xa8')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xaa')]['hasMany'](db['SalesforceField'],{'as':_0x7eb7('0x19a'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0xaa')][_0x7eb7('0xff')](db[_0x7eb7('0xaa')],{'as':_0x7eb7('0x19b'),'foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0xaa')][_0x7eb7('0xff')](db[_0x7eb7('0xaa')],{'as':'Field','foreignKey':'FieldId'});db[_0x7eb7('0xaa')][_0x7eb7('0x105')](db[_0x7eb7('0x99')],{'as':_0x7eb7('0x99'),'foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0xac')]['hasMany'](db[_0x7eb7('0x19d')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':'AccountId'});db[_0x7eb7('0x19d')][_0x7eb7('0xff')](db[_0x7eb7('0xaf')],{'as':_0x7eb7('0x194'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0x19d')][_0x7eb7('0xff')](db['SugarcrmField'],{'as':_0x7eb7('0x19e'),'onDelete':'cascade','foreignKey':_0x7eb7('0x196')});db['SugarcrmConfiguration'][_0x7eb7('0xff')](db[_0x7eb7('0xaf')],{'as':_0x7eb7('0x197'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0x19d')][_0x7eb7('0x105')](db[_0x7eb7('0xac')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xaf')][_0x7eb7('0xff')](db[_0x7eb7('0xaf')],{'as':_0x7eb7('0x19a'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0xaf')][_0x7eb7('0xff')](db['SugarcrmField'],{'as':'Description','foreignKey':'DescriptionId'});db['SugarcrmField'][_0x7eb7('0xff')](db['SugarcrmField'],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xaf')]['belongsTo'](db[_0x7eb7('0x99')],{'as':_0x7eb7('0x99'),'foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0xb1')][_0x7eb7('0xff')](db[_0x7eb7('0xb3')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x199')});db['DeskConfiguration'][_0x7eb7('0xff')](db[_0x7eb7('0xb5')],{'as':_0x7eb7('0x194'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x195')});db['DeskConfiguration'][_0x7eb7('0xff')](db[_0x7eb7('0xb5')],{'as':_0x7eb7('0x19e'),'onDelete':_0x7eb7('0xfd'),'foreignKey':'DescriptionId'});db[_0x7eb7('0xb3')]['hasMany'](db[_0x7eb7('0xb5')],{'as':_0x7eb7('0x197'),'onDelete':_0x7eb7('0xfd'),'foreignKey':'FieldId'});db[_0x7eb7('0xb3')][_0x7eb7('0x105')](db[_0x7eb7('0xb1')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xb3')]['belongsToMany'](db[_0x7eb7('0x93')],{'through':_0x7eb7('0x1a0')});db[_0x7eb7('0xb5')][_0x7eb7('0xff')](db['DeskField'],{'as':_0x7eb7('0x19a'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0xb5')]['hasMany'](db[_0x7eb7('0xb5')],{'as':_0x7eb7('0x19b'),'foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0xb5')][_0x7eb7('0xff')](db[_0x7eb7('0xb5')],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xb5')][_0x7eb7('0x105')](db[_0x7eb7('0x99')],{'as':_0x7eb7('0x99'),'foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0xb7')]['hasMany'](db[_0x7eb7('0x1a1')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0x1a1')][_0x7eb7('0xff')](db[_0x7eb7('0xb8')],{'as':_0x7eb7('0x194'),'onDelete':'cascade','foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0x1a1')][_0x7eb7('0xff')](db['ZohoField'],{'as':_0x7eb7('0x19e'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0x1a1')][_0x7eb7('0xff')](db['ZohoField'],{'as':'Fields','onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0x1a1')][_0x7eb7('0x105')](db['ZohoAccount'],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xb8')][_0x7eb7('0xff')](db[_0x7eb7('0xb8')],{'as':'Subject','foreignKey':'SubjectId'});db[_0x7eb7('0xb8')][_0x7eb7('0xff')](db[_0x7eb7('0xb8')],{'as':_0x7eb7('0x19b'),'foreignKey':'DescriptionId'});db[_0x7eb7('0xb8')][_0x7eb7('0xff')](db['ZohoField'],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xb8')][_0x7eb7('0x105')](db[_0x7eb7('0x99')],{'as':'Variable','foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0x1a2')][_0x7eb7('0xff')](db[_0x7eb7('0xb9')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xb9')]['hasMany'](db['ZendeskField'],{'as':_0x7eb7('0x194'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0xb9')][_0x7eb7('0xff')](db['ZendeskField'],{'as':'Descriptions','foreignKey':'DescriptionId'});db['ZendeskConfiguration'][_0x7eb7('0xff')](db['ZendeskField'],{'as':_0x7eb7('0x197'),'foreignKey':'FieldId'});db[_0x7eb7('0xb9')][_0x7eb7('0x105')](db[_0x7eb7('0x1a2')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xb9')][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':'int_zendesk_configuration_has_tags'});db[_0x7eb7('0xbb')][_0x7eb7('0xff')](db[_0x7eb7('0xbb')],{'as':_0x7eb7('0x19a'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0xbb')][_0x7eb7('0xff')](db['ZendeskField'],{'as':_0x7eb7('0x19b'),'foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0xbb')][_0x7eb7('0xff')](db[_0x7eb7('0xbb')],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xbb')][_0x7eb7('0x105')](db[_0x7eb7('0x99')],{'as':_0x7eb7('0x99'),'foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0xbd')][_0x7eb7('0xff')](db[_0x7eb7('0x1a3')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0x1a3')]['hasMany'](db[_0x7eb7('0xc0')],{'as':'Subjects','onDelete':'cascade','foreignKey':_0x7eb7('0x195')});db['FreshdeskConfiguration'][_0x7eb7('0xff')](db[_0x7eb7('0xc0')],{'as':_0x7eb7('0x19e'),'onDelete':'cascade','foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0x1a3')][_0x7eb7('0xff')](db[_0x7eb7('0xc0')],{'as':_0x7eb7('0x197'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0x1a3')][_0x7eb7('0x105')](db['FreshdeskAccount'],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db['FreshdeskConfiguration'][_0x7eb7('0x108')](db[_0x7eb7('0x93')],{'through':'int_freshdesk_configuration_has_tags'});db['FreshdeskField'][_0x7eb7('0xff')](db[_0x7eb7('0xc0')],{'as':'Subject','foreignKey':'SubjectId'});db[_0x7eb7('0xc0')][_0x7eb7('0xff')](db[_0x7eb7('0xc0')],{'as':_0x7eb7('0x19b'),'foreignKey':'DescriptionId'});db['FreshdeskField']['hasMany'](db[_0x7eb7('0xc0')],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xc0')]['belongsTo'](db[_0x7eb7('0x99')],{'as':_0x7eb7('0x99'),'foreignKey':'VariableId'});db[_0x7eb7('0xc1')][_0x7eb7('0xff')](db[_0x7eb7('0x1a4')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':'AccountId'});db[_0x7eb7('0x1a4')][_0x7eb7('0xff')](db[_0x7eb7('0xc3')],{'as':'Subjects','foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0x1a4')]['hasMany'](db[_0x7eb7('0xc3')],{'as':_0x7eb7('0x19e'),'foreignKey':_0x7eb7('0x196')});db['VtigerConfiguration'][_0x7eb7('0xff')](db['VtigerField'],{'as':_0x7eb7('0x197'),'foreignKey':'FieldId'});db[_0x7eb7('0x1a4')][_0x7eb7('0x105')](db[_0x7eb7('0xc1')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xc3')][_0x7eb7('0xff')](db[_0x7eb7('0xc3')],{'as':_0x7eb7('0x19a'),'foreignKey':_0x7eb7('0x195')});db[_0x7eb7('0xc3')][_0x7eb7('0xff')](db[_0x7eb7('0xc3')],{'as':_0x7eb7('0x19b'),'foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0xc3')][_0x7eb7('0xff')](db[_0x7eb7('0xc3')],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xc3')][_0x7eb7('0x105')](db[_0x7eb7('0x99')],{'as':_0x7eb7('0x99'),'foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0xc5')][_0x7eb7('0xff')](db[_0x7eb7('0x1a5')],{'as':'Configurations','onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0x1a5')][_0x7eb7('0xff')](db[_0x7eb7('0xc7')],{'as':'Subjects','foreignKey':'SubjectId'});db[_0x7eb7('0x1a5')][_0x7eb7('0xff')](db[_0x7eb7('0xc7')],{'as':_0x7eb7('0x19e'),'foreignKey':_0x7eb7('0x196')});db['ServicenowConfiguration'][_0x7eb7('0xff')](db[_0x7eb7('0xc7')],{'as':_0x7eb7('0x197'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0x1a5')][_0x7eb7('0x105')](db[_0x7eb7('0xc5')],{'as':'Account','foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xc7')][_0x7eb7('0xff')](db[_0x7eb7('0xc7')],{'as':_0x7eb7('0x19a'),'foreignKey':'SubjectId'});db[_0x7eb7('0xc7')][_0x7eb7('0xff')](db[_0x7eb7('0xc7')],{'as':_0x7eb7('0x19b'),'foreignKey':'DescriptionId'});db[_0x7eb7('0xc7')][_0x7eb7('0xff')](db[_0x7eb7('0xc7')],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db['ServicenowField']['belongsTo'](db['Variable'],{'as':_0x7eb7('0x99'),'foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0xc9')][_0x7eb7('0xff')](db[_0x7eb7('0xcb')],{'as':_0x7eb7('0x193'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x199')});db['Dynamics365Configuration'][_0x7eb7('0xff')](db[_0x7eb7('0xcd')],{'as':'Subjects','onDelete':_0x7eb7('0xfd'),'foreignKey':'SubjectId'});db[_0x7eb7('0xcb')][_0x7eb7('0xff')](db['Dynamics365Field'],{'as':_0x7eb7('0x19e'),'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x196')});db[_0x7eb7('0xcb')]['hasMany'](db['Dynamics365Field'],{'as':'Fields','onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xcb')][_0x7eb7('0x105')](db[_0x7eb7('0xc9')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xcd')][_0x7eb7('0xff')](db[_0x7eb7('0xcd')],{'as':_0x7eb7('0x19a'),'foreignKey':'SubjectId'});db[_0x7eb7('0xcd')][_0x7eb7('0xff')](db[_0x7eb7('0xcd')],{'as':'Description','foreignKey':_0x7eb7('0x196')});db['Dynamics365Field']['hasMany'](db[_0x7eb7('0xcd')],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xcd')][_0x7eb7('0x105')](db[_0x7eb7('0x99')],{'as':_0x7eb7('0x99'),'foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0x1a6')][_0x7eb7('0xff')](db[_0x7eb7('0xd0')],{'as':'Configurations','onDelete':'cascade','foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0xd0')]['hasMany'](db[_0x7eb7('0x1a7')],{'as':'Subjects','foreignKey':'SubjectId'});db['FreshsalesConfiguration']['hasMany'](db[_0x7eb7('0x1a7')],{'as':_0x7eb7('0x19e'),'foreignKey':'DescriptionId'});db[_0x7eb7('0xd0')]['hasMany'](db[_0x7eb7('0x1a7')],{'as':_0x7eb7('0x197'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0xd0')][_0x7eb7('0x105')](db[_0x7eb7('0x1a6')],{'as':_0x7eb7('0x14f'),'foreignKey':_0x7eb7('0x199')});db[_0x7eb7('0x1a7')]['hasMany'](db[_0x7eb7('0x1a7')],{'as':_0x7eb7('0x19a'),'foreignKey':_0x7eb7('0x195')});db['FreshsalesField']['hasMany'](db['FreshsalesField'],{'as':_0x7eb7('0x19b'),'foreignKey':_0x7eb7('0x196')});db['FreshsalesField']['hasMany'](db[_0x7eb7('0x1a7')],{'as':_0x7eb7('0x19f'),'foreignKey':_0x7eb7('0x198')});db[_0x7eb7('0x1a7')][_0x7eb7('0x105')](db[_0x7eb7('0x99')],{'as':'Variable','foreignKey':_0x7eb7('0x19c')});db[_0x7eb7('0xd6')][_0x7eb7('0x105')](db['ChatWebsite'],{});db['ChatQueueReport'][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':'ListId'});db['ChatQueueReport'][_0x7eb7('0x105')](db[_0x7eb7('0x77')],{'as':'Contact','foreignKey':_0x7eb7('0x144')});db[_0x7eb7('0xd6')][_0x7eb7('0x105')](db[_0x7eb7('0x6a')],{});db[_0x7eb7('0xd6')]['belongsTo'](db[_0x7eb7('0x6c')],{});db[_0x7eb7('0xd6')][_0x7eb7('0x105')](db['User'],{});db[_0x7eb7('0xd6')]['belongsTo'](db['ChatQueue'],{});db[_0x7eb7('0x1a8')][_0x7eb7('0x105')](db['User'],{'onDelete':_0x7eb7('0xfd'),'foreignKey':_0x7eb7('0x1a9')});db[_0x7eb7('0x1a8')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'onDelete':'cascade','foreignKey':_0x7eb7('0x1aa')});db[_0x7eb7('0x1ab')]['hasMany'](db['JscriptyQuestionReport'],{'foreignKey':_0x7eb7('0x1ac'),'onDelete':_0x7eb7('0xfd')});db[_0x7eb7('0x1ab')][_0x7eb7('0xff')](db[_0x7eb7('0xd9')],{'foreignKey':'SessionId','onDelete':'cascade'});db[_0x7eb7('0xdc')][_0x7eb7('0x105')](db[_0x7eb7('0x54')],{});db[_0x7eb7('0xdc')][_0x7eb7('0x105')](db[_0x7eb7('0x11a')],{'as':_0x7eb7('0x15a'),'foreignKey':'ListId'});db[_0x7eb7('0xdc')][_0x7eb7('0x105')](db['CmContact'],{'as':'Contact','foreignKey':_0x7eb7('0x144')});db['SmsQueueReport'][_0x7eb7('0x105')](db[_0x7eb7('0x58')],{});db[_0x7eb7('0xdc')][_0x7eb7('0x105')](db[_0x7eb7('0x59')],{});db[_0x7eb7('0xdc')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{});db[_0x7eb7('0xdc')][_0x7eb7('0x105')](db['SmsQueue'],{});db[_0x7eb7('0xe1')][_0x7eb7('0xff')](db[_0x7eb7('0x1ab')],{'foreignKey':_0x7eb7('0x1ad')});db[_0x7eb7('0xe1')][_0x7eb7('0xff')](db['JscriptyQuestionReport'],{'foreignKey':_0x7eb7('0x1ad')});db['JscriptyProject'][_0x7eb7('0xff')](db[_0x7eb7('0xd9')],{'foreignKey':_0x7eb7('0x1ad')});db['SquareProject']['belongsToMany'](db['User'],{'as':_0x7eb7('0x160'),'through':_0x7eb7('0x1ae')});db[_0x7eb7('0xec')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x10e')});db[_0x7eb7('0xec')][_0x7eb7('0x108')](db[_0x7eb7('0x1d')],{'through':'team_has_voice_queues','as':_0x7eb7('0x1af')});db['Team'][_0x7eb7('0x108')](db[_0x7eb7('0x3f')],{'through':_0x7eb7('0x1b0'),'as':_0x7eb7('0x1b1')});db[_0x7eb7('0xec')][_0x7eb7('0x108')](db[_0x7eb7('0x70')],{'through':_0x7eb7('0x173'),'as':_0x7eb7('0x117')});db[_0x7eb7('0xec')][_0x7eb7('0x108')](db['FaxQueue'],{'through':_0x7eb7('0x1b2'),'as':_0x7eb7('0x1b3')});db['Team'][_0x7eb7('0x108')](db[_0x7eb7('0x5b')],{'through':_0x7eb7('0x167'),'as':_0x7eb7('0x1b4')});db[_0x7eb7('0xec')][_0x7eb7('0x108')](db[_0x7eb7('0x63')],{'through':'team_has_openchannel_queues','as':'OpenchannelQueues'});db[_0x7eb7('0x17b')]['hasMany'](db[_0x7eb7('0x79')],{'as':_0x7eb7('0x177'),'foreignKey':_0x7eb7('0x17c')});db[_0x7eb7('0x17b')][_0x7eb7('0xff')](db[_0x7eb7('0x7c')],{'as':_0x7eb7('0x12f'),'foreignKey':'CampaignId'});db['Campaign'][_0x7eb7('0xff')](db[_0x7eb7('0x102')],{'as':_0x7eb7('0x178'),'foreignKey':_0x7eb7('0x17c')});db['Campaign'][_0x7eb7('0xff')](db[_0x7eb7('0x7b')],{'as':_0x7eb7('0x130'),'foreignKey':_0x7eb7('0x17c')});db['Campaign'][_0x7eb7('0x105')](db['Trunk'],{'as':_0x7eb7('0x2d'),'foreignKey':_0x7eb7('0x132')});db[_0x7eb7('0x17b')][_0x7eb7('0x105')](db['Trunk'],{'as':_0x7eb7('0x133'),'foreignKey':_0x7eb7('0x134')});db[_0x7eb7('0x17b')][_0x7eb7('0x105')](db[_0x7eb7('0x135')],{'as':_0x7eb7('0x135'),'foreignKey':_0x7eb7('0x158')});db[_0x7eb7('0x17b')][_0x7eb7('0x105')](db['SquareProject'],{'as':_0x7eb7('0xe6'),'foreignKey':'SquareProjectId'});db[_0x7eb7('0x17b')][_0x7eb7('0x108')](db['CmList'],{'as':_0x7eb7('0x10c'),'through':_0x7eb7('0x1b5')});db[_0x7eb7('0x17b')][_0x7eb7('0x108')](db[_0x7eb7('0x11a')],{'as':'BlackLists','through':_0x7eb7('0x1b6')});db[_0x7eb7('0x1b7')][_0x7eb7('0x105')](db['MailMessage'],{});db[_0x7eb7('0x1b7')][_0x7eb7('0x105')](db[_0x7eb7('0x42')],{});db[_0x7eb7('0x1b7')][_0x7eb7('0x105')](db[_0x7eb7('0x3e')],{'foreignKey':_0x7eb7('0x1b8'),'as':_0x7eb7('0x1b9')});db['MailTransferReport'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'foreignKey':_0x7eb7('0x1ba'),'as':_0x7eb7('0x1bb')});db['MailTransferReport'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'foreignKey':_0x7eb7('0x1bc'),'as':_0x7eb7('0x1bd')});db[_0x7eb7('0x1b7')][_0x7eb7('0x105')](db['MailQueue'],{'foreignKey':_0x7eb7('0x1be'),'as':_0x7eb7('0x1bf')});db[_0x7eb7('0x1b7')][_0x7eb7('0x105')](db[_0x7eb7('0x3e')],{'foreignKey':_0x7eb7('0x1c0'),'as':_0x7eb7('0x1c1')});db[_0x7eb7('0x1c2')][_0x7eb7('0x105')](db[_0x7eb7('0x6c')],{});db['ChatTransferReport'][_0x7eb7('0x105')](db[_0x7eb7('0x6a')],{});db[_0x7eb7('0x1c2')][_0x7eb7('0x105')](db['ChatWebsite'],{'foreignKey':'FromChatWebsiteId','as':'FromAccount'});db[_0x7eb7('0x1c2')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'foreignKey':_0x7eb7('0x1ba'),'as':_0x7eb7('0x1bb')});db[_0x7eb7('0x1c2')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'foreignKey':_0x7eb7('0x1bc'),'as':_0x7eb7('0x1bd')});db[_0x7eb7('0x1c2')][_0x7eb7('0x105')](db[_0x7eb7('0x70')],{'foreignKey':_0x7eb7('0x1c3'),'as':_0x7eb7('0x1bf')});db[_0x7eb7('0x1c2')][_0x7eb7('0x105')](db[_0x7eb7('0x11d')],{'foreignKey':_0x7eb7('0x1c4'),'as':_0x7eb7('0x1c1')});db[_0x7eb7('0xf4')]['belongsTo'](db[_0x7eb7('0x51')],{});db[_0x7eb7('0xf4')]['belongsTo'](db['FaxInteraction'],{});db['FaxTransferReport']['belongsTo'](db[_0x7eb7('0x4b')],{'foreignKey':_0x7eb7('0x1c5'),'as':'FromAccount'});db[_0x7eb7('0xf4')][_0x7eb7('0x105')](db['User'],{'foreignKey':'FromUserId','as':_0x7eb7('0x1bb')});db[_0x7eb7('0xf4')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'foreignKey':'ToUserId','as':_0x7eb7('0x1bd')});db[_0x7eb7('0xf4')][_0x7eb7('0x105')](db[_0x7eb7('0x118')],{'foreignKey':_0x7eb7('0x1c6'),'as':_0x7eb7('0x1bf')});db['FaxTransferReport'][_0x7eb7('0x105')](db[_0x7eb7('0x4b')],{'foreignKey':_0x7eb7('0x1c7'),'as':_0x7eb7('0x1c1')});db[_0x7eb7('0xf5')][_0x7eb7('0x105')](db[_0x7eb7('0x62')],{});db[_0x7eb7('0xf5')][_0x7eb7('0x105')](db[_0x7eb7('0x61')],{});db[_0x7eb7('0xf5')][_0x7eb7('0x105')](db[_0x7eb7('0x5d')],{'foreignKey':_0x7eb7('0x1c8'),'as':'FromAccount'});db[_0x7eb7('0xf5')][_0x7eb7('0x105')](db['User'],{'foreignKey':'FromUserId','as':_0x7eb7('0x1bb')});db[_0x7eb7('0xf5')]['belongsTo'](db[_0x7eb7('0x13')],{'foreignKey':_0x7eb7('0x1bc'),'as':_0x7eb7('0x1bd')});db['OpenchannelTransferReport'][_0x7eb7('0x105')](db[_0x7eb7('0x63')],{'foreignKey':_0x7eb7('0x1c9'),'as':_0x7eb7('0x1bf')});db[_0x7eb7('0xf5')][_0x7eb7('0x105')](db['OpenchannelAccount'],{'foreignKey':_0x7eb7('0x1ca'),'as':'ToAccount'});db[_0x7eb7('0x1cb')]['belongsTo'](db[_0x7eb7('0x59')],{});db[_0x7eb7('0x1cb')][_0x7eb7('0x105')](db[_0x7eb7('0x58')],{});db[_0x7eb7('0x1cb')]['belongsTo'](db[_0x7eb7('0x54')],{'foreignKey':_0x7eb7('0x1cc'),'as':_0x7eb7('0x1b9')});db['SmsTransferReport'][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'foreignKey':_0x7eb7('0x1ba'),'as':_0x7eb7('0x1bb')});db[_0x7eb7('0x1cb')][_0x7eb7('0x105')](db[_0x7eb7('0x13')],{'foreignKey':_0x7eb7('0x1bc'),'as':_0x7eb7('0x1bd')});db[_0x7eb7('0x1cb')]['belongsTo'](db[_0x7eb7('0x5b')],{'foreignKey':_0x7eb7('0x1cd'),'as':_0x7eb7('0x1bf')});db['SmsTransferReport'][_0x7eb7('0x105')](db[_0x7eb7('0x54')],{'foreignKey':_0x7eb7('0x1ce'),'as':_0x7eb7('0x1c1')});db['CmList'][_0x7eb7('0xff')](db[_0x7eb7('0x15b')],{'as':_0x7eb7('0x148'),'foreignKey':_0x7eb7('0x14c')});db[_0x7eb7('0x11a')][_0x7eb7('0xff')](db[_0x7eb7('0x1cf')],{'as':_0x7eb7('0x1d0'),'foreignKey':_0x7eb7('0x14c')});db['CmList'][_0x7eb7('0xff')](db[_0x7eb7('0x77')],{'as':_0x7eb7('0x10b'),'onDelete':'cascade','foreignKey':_0x7eb7('0x14c')});db[_0x7eb7('0x11a')]['hasMany'](db[_0x7eb7('0x7c')],{'as':_0x7eb7('0x12f'),'foreignKey':_0x7eb7('0x14c')});db[_0x7eb7('0x11a')]['hasMany'](db['CmHopperHistory'],{'as':_0x7eb7('0x1d1'),'foreignKey':'ListId'});db[_0x7eb7('0x11a')]['hasMany'](db[_0x7eb7('0x7f')],{'as':_0x7eb7('0x7f'),'foreignKey':_0x7eb7('0x14c')});db['CmList'][_0x7eb7('0x108')](db['VoiceQueue'],{'as':_0x7eb7('0x1d2'),'through':'voice_queues_has_cm_lists'});db[_0x7eb7('0x11a')][_0x7eb7('0x108')](db['User'],{'as':_0x7eb7('0x14d'),'through':_0x7eb7('0x10d')});db[_0x7eb7('0xf7')][_0x7eb7('0xff')](db[_0x7eb7('0x19')],{'as':'Extensions','onDelete':_0x7eb7('0x157')});db[_0x7eb7('0xf7')][_0x7eb7('0x108')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x14d'),'through':'user_has_voice_prefixes'});db['UserProfile'][_0x7eb7('0xff')](db[_0x7eb7('0x13')],{'as':_0x7eb7('0x160'),'foreignKey':_0x7eb7('0x107')});db[_0x7eb7('0x106')][_0x7eb7('0xff')](db['UserProfileSection'],{'as':_0x7eb7('0x1d3'),'foreignKey':_0x7eb7('0x107'),'onDelete':'cascade'});db['UserProfileSection'][_0x7eb7('0xff')](db[_0x7eb7('0xfb')],{'as':_0x7eb7('0x1d4'),'foreignKey':'sectionId','onDelete':_0x7eb7('0xfd')});module[_0x7eb7('0x1d5')]={'db':db,'dbH':dbH};
\ No newline at end of file
diff --git a/server/routes.js b/server/routes.js
index cb6bba0..8fb4372 100644
--- a/server/routes.js
+++ b/server/routes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0a17=['./api/chatApplication','/api/chat/interactions','./api/chatInteraction','/api/chat/messages','/api/chat/offline_messages','./api/chatOfflineMessage','/api/chat/queues','./api/chatQueue','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany','/api/cm/contacts','./api/cmContact','/api/cm/hopper','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperBlack','/api/cm/hopper_final','/api/cm/hopper_history','./api/cmHopperHistory','/api/cm/custom_fields','./api/cmCustomField','/api/actions','./api/action','./api/automation','/api/canned_answers','/api/dispositions','./api/disposition','/api/intervals','./api/interval','/api/pauses','./api/pause','/api/cdr','./api/cdr','./api/voiceQueuesLog','./api/schedule','/api/sounds','/api/tags','/api/templates','./api/template','./api/trigger','/api/variables','/api/integrations','/api/integrations/reports','./api/integrationReport','/api/analytics/custom_reports','./api/analyticCustomReport','/api/analytics/default_reports','/api/analytics/extracted_reports','./api/analyticExtractedReport','/api/analytics/metrics','./api/analyticMetric','/api/analytics/field_reports','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','/api/integrations/salesforce/configurations','./api/intSalesforceConfiguration','./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/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/desk/fields','./api/intDeskField','/api/integrations/zoho/accounts','./api/intZohoAccount','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','./api/intZendeskAccount','/api/integrations/zendesk/configurations','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','./api/intServicenowAccount','/api/integrations/servicenow/configurations','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/accounts','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','./api/intDynamics365Field','./api/intFreshsalesAccount','/api/integrations/freshsales/fields','./api/intFreshsalesField','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','/api/jscripty/answers/reports','./api/jscriptyAnswerReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','./api/smsQueueReport','/api/square/reports','./api/squareReport','/api/square/details/reports','./api/squareReportDetail','./api/jscriptyProject','/api/settings','./api/setting','./api/squareOdbc','/api/square/projects','/api/square/recordings','./api/squareRecording','/api/square/messages','./api/squareMessage','./api/team','/api/license','/api/campaigns','/api/migrations','./api/migration','/api/attachments','/api/plugins','./api/plugin','./api/mailTransferReport','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','/api/openchannel/reports/transfer','./api/openchannelTransferReport','/api/sms/reports/transfer','./api/smsTransferReport','/api/cm/lists','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','./api/userProfile','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/auth/local','/api/auth/google','./api/authGoogle','./api/jira','/api/rpc','./api/rpc','./api/version','/api/system','./api/system','./api/pm2','/apidoc','static','/www','root','/demo','/snippet','join','/plugins','/server/files/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','get','sendFile','appPath','/index.html','path','express','util','./config/environment','./config/logger','api','auth','default','use','format','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','method','headers','x-forwarded-for','connection','remoteAddress','url','user','name','role','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','body','device','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','responseTime','agent_name','test','/api/users','/api/voice/chanspy','/api/voice/contexts','/api/voice/extensions','/api/voice/mohs','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','/api/voice/mails','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/members/reports','./api/memberReport','/api/trunks','./api/trunk','./api/voiceTransferReport','./api/mailServerOut','/api/mail/accounts','./api/mailAccount','/api/mail/queues','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','./api/mailMessage','/api/mail/applications','./api/mailApplication','/api/dashboards','./api/dashboard','/api/dashboards/items','/api/fax/accounts','./api/faxAccount','/api/fax/applications','/api/fax/interactions','./api/faxInteraction','/api/fax/messages','./api/faxMessage','./api/faxQueue','/api/fax/reports/queue','./api/faxQueueReport','./api/smsAccount','./api/smsApplication','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/smsQueue','/api/openchannel/accounts','./api/openchannelAccount','/api/openchannel/applications','./api/openchannelApplication','/api/openchannel/interactions','/api/openchannel/messages','./api/openchannelMessage','./api/openchannelQueue','/api/chat/websites','./api/chatWebsite','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications'];(function(_0x581af1,_0x4f02c5){var _0x54c22e=function(_0x5a7a5a){while(--_0x5a7a5a){_0x581af1['push'](_0x581af1['shift']());}};_0x54c22e(++_0x4f02c5);}(_0x0a17,0x1bd));var _0x70a1=function(_0x3371c0,_0x47b8c7){_0x3371c0=_0x3371c0-0x0;var _0x572d30=_0x0a17[_0x3371c0];return _0x572d30;};'use strict';var path=require(_0x70a1('0x0'));var express=require(_0x70a1('0x1'));var ewinston=require('express-winston');var util=require(_0x70a1('0x2'));var errors=require('./errors');var config=require(_0x70a1('0x3'));var logger=require(_0x70a1('0x4'))(_0x70a1('0x5'));var authLogger=require(_0x70a1('0x4'))(_0x70a1('0x6'));exports[_0x70a1('0x7')]=function(_0x45666e){_0x45666e[_0x70a1('0x8')](ewinston['logger']({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x28e434,_0x4fb863){return util[_0x70a1('0x9')](_0x70a1('0xa'),_0x28e434[_0x70a1('0xb')],_0x28e434[_0x70a1('0xc')][_0x70a1('0xd')]?_0x28e434[_0x70a1('0xc')][_0x70a1('0xd')]:_0x28e434[_0x70a1('0xe')][_0x70a1('0xf')]||_0x28e434['ip'],_0x28e434[_0x70a1('0x10')],_0x4fb863['statusCode'],_0x4fb863['responseTime'],_0x28e434[_0x70a1('0x11')]?_0x28e434[_0x70a1('0x11')]['id']:null,_0x28e434[_0x70a1('0x11')]?_0x28e434[_0x70a1('0x11')][_0x70a1('0x12')]:null,_0x28e434[_0x70a1('0x11')]?_0x28e434[_0x70a1('0x11')][_0x70a1('0x13')]:null);}}));_0x45666e[_0x70a1('0x8')](ewinston[_0x70a1('0x14')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x3c0de9,_0x50ebaa){var _0x254e40=_0x70a1('0x15');if(_0x3c0de9[_0x70a1('0x16')]&&_0x3c0de9[_0x70a1('0x16')][_0x70a1('0x17')]&&_0x3c0de9[_0x70a1('0x16')][_0x70a1('0x18')]){_0x254e40=_0x70a1('0x19');}return util['format'](_0x254e40,_0x3c0de9[_0x70a1('0xb')],_0x3c0de9[_0x70a1('0xc')][_0x70a1('0xd')]?_0x3c0de9[_0x70a1('0xc')]['x-forwarded-for']:_0x3c0de9[_0x70a1('0xe')][_0x70a1('0xf')]||_0x3c0de9['ip'],_0x3c0de9['url'],_0x50ebaa['statusCode'],_0x50ebaa[_0x70a1('0x1a')],_0x3c0de9[_0x70a1('0x11')]?_0x3c0de9[_0x70a1('0x11')]['id']:null,_0x3c0de9[_0x70a1('0x11')]?_0x3c0de9[_0x70a1('0x11')]['name']:null,_0x3c0de9['user']?_0x3c0de9[_0x70a1('0x11')][_0x70a1('0x13')]:null,_0x3c0de9[_0x70a1('0x16')]&&_0x3c0de9[_0x70a1('0x16')][_0x70a1('0x17')]?_0x3c0de9['body'][_0x70a1('0x17')]:'other',_0x3c0de9[_0x70a1('0x16')]&&_0x3c0de9[_0x70a1('0x16')][_0x70a1('0x18')]?_0x3c0de9[_0x70a1('0x16')][_0x70a1('0x18')]:'',_0x3c0de9[_0x70a1('0x16')]&&_0x3c0de9[_0x70a1('0x16')][_0x70a1('0x1b')]?_0x3c0de9[_0x70a1('0x16')][_0x70a1('0x1b')]:'');},'ignoreRoute':function(_0x28e24c){var _0x59242d=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x59242d[_0x70a1('0x1c')](_0x28e24c[_0x70a1('0x10')]);}}));_0x45666e[_0x70a1('0x8')](_0x70a1('0x1d'),require('./api/user'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x1e'),require('./api/voiceChanSpy'));_0x45666e['use'](_0x70a1('0x1f'),require('./api/voiceContext'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x20'),require('./api/voiceExtension'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x21'),require('./api/voiceMusicOnHold'));_0x45666e[_0x70a1('0x8')]('/api/voice/queues',require('./api/voiceQueue'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x22'),require(_0x70a1('0x23')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x24'),require(_0x70a1('0x25')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x26'),require('./api/voiceMail'));_0x45666e[_0x70a1('0x8')]('/api/voice/mails/messages',require(_0x70a1('0x27')));_0x45666e['use'](_0x70a1('0x28'),require(_0x70a1('0x29')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x2a'),require(_0x70a1('0x2b')));_0x45666e[_0x70a1('0x8')]('/api/voice/agents/reports',require('./api/voiceAgentReport'));_0x45666e[_0x70a1('0x8')]('/api/voice/queues/reports',require('./api/voiceQueueReport'));_0x45666e['use'](_0x70a1('0x2c'),require(_0x70a1('0x2d')));_0x45666e['use'](_0x70a1('0x2e'),require(_0x70a1('0x2f')));_0x45666e[_0x70a1('0x8')]('/api/voice/transfers/reports',require(_0x70a1('0x30')));_0x45666e['use']('/api/mail/out_servers',require(_0x70a1('0x31')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x32'),require(_0x70a1('0x33')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x34'),require('./api/mailQueue'));_0x45666e[_0x70a1('0x8')]('/api/mail/substatuses',require(_0x70a1('0x35')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x36'),require(_0x70a1('0x37')));_0x45666e['use'](_0x70a1('0x38'),require(_0x70a1('0x39')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x3a'),require(_0x70a1('0x3b')));_0x45666e[_0x70a1('0x8')]('/api/mail/reports/queue',require('./api/mailQueueReport'));_0x45666e['use'](_0x70a1('0x3c'),require(_0x70a1('0x3d')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x3e'),require('./api/dashboardItem'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x3f'),require(_0x70a1('0x40')));_0x45666e['use'](_0x70a1('0x41'),require('./api/faxApplication'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x42'),require(_0x70a1('0x43')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x44'),require(_0x70a1('0x45')));_0x45666e[_0x70a1('0x8')]('/api/fax/queues',require(_0x70a1('0x46')));_0x45666e['use'](_0x70a1('0x47'),require(_0x70a1('0x48')));_0x45666e[_0x70a1('0x8')]('/api/sms/accounts',require(_0x70a1('0x49')));_0x45666e['use']('/api/sms/applications',require(_0x70a1('0x4a')));_0x45666e[_0x70a1('0x8')]('/api/sms/interactions',require(_0x70a1('0x4b')));_0x45666e['use'](_0x70a1('0x4c'),require(_0x70a1('0x4d')));_0x45666e['use'](_0x70a1('0x4e'),require(_0x70a1('0x4f')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x50'),require(_0x70a1('0x51')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x52'),require(_0x70a1('0x53')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x54'),require('./api/openchannelInteraction'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x55'),require(_0x70a1('0x56')));_0x45666e[_0x70a1('0x8')]('/api/openchannel/queues',require(_0x70a1('0x57')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x58'),require(_0x70a1('0x59')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x5a'),require(_0x70a1('0x5b')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x5c'),require(_0x70a1('0x5d')));_0x45666e['use'](_0x70a1('0x5e'),require(_0x70a1('0x5f')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x60'),require('./api/chatMessage'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x61'),require(_0x70a1('0x62')));_0x45666e['use'](_0x70a1('0x63'),require(_0x70a1('0x64')));_0x45666e[_0x70a1('0x8')]('/api/chat/groups',require(_0x70a1('0x65')));_0x45666e['use'](_0x70a1('0x66'),require(_0x70a1('0x67')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x68'),require(_0x70a1('0x69')));_0x45666e['use'](_0x70a1('0x6a'),require(_0x70a1('0x6b')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x6c'),require(_0x70a1('0x6d')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x6e'),require(_0x70a1('0x6f')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x70'),require('./api/cmHopperFinal'));_0x45666e['use'](_0x70a1('0x71'),require(_0x70a1('0x72')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x73'),require(_0x70a1('0x74')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x75'),require(_0x70a1('0x76')));_0x45666e['use']('/api/automations',require(_0x70a1('0x77')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x78'),require('./api/cannedAnswer'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x79'),require(_0x70a1('0x7a')));_0x45666e[_0x70a1('0x8')]('/api/conditions',require('./api/condition'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x7b'),require(_0x70a1('0x7c')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x7d'),require(_0x70a1('0x7e')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x7f'),require(_0x70a1('0x80')));_0x45666e[_0x70a1('0x8')]('/api/voiceQueuesLog',require(_0x70a1('0x81')));_0x45666e[_0x70a1('0x8')]('/api/schedules',require(_0x70a1('0x82')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x83'),require('./api/sound'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x84'),require('./api/tag'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x85'),require(_0x70a1('0x86')));_0x45666e[_0x70a1('0x8')]('/api/triggers',require(_0x70a1('0x87')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x88'),require('./api/variable'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x89'),require('./api/integration'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x8a'),require(_0x70a1('0x8b')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x8c'),require(_0x70a1('0x8d')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x8e'),require('./api/analyticDefaultReport'));_0x45666e[_0x70a1('0x8')](_0x70a1('0x8f'),require(_0x70a1('0x90')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x91'),require(_0x70a1('0x92')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x93'),require(_0x70a1('0x94')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x95'),require(_0x70a1('0x96')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x97'),require(_0x70a1('0x98')));_0x45666e['use'](_0x70a1('0x99'),require(_0x70a1('0x9a')));_0x45666e['use']('/api/integrations/salesforce/fields',require(_0x70a1('0x9b')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x9c'),require(_0x70a1('0x9d')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x9e'),require(_0x70a1('0x9f')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xa0'),require(_0x70a1('0xa1')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xa2'),require(_0x70a1('0xa3')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xa4'),require(_0x70a1('0xa5')));_0x45666e['use'](_0x70a1('0xa6'),require(_0x70a1('0xa7')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xa8'),require(_0x70a1('0xa9')));_0x45666e[_0x70a1('0x8')]('/api/integrations/zoho/configurations',require(_0x70a1('0xaa')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xab'),require(_0x70a1('0xac')));_0x45666e[_0x70a1('0x8')]('/api/integrations/zendesk/accounts',require(_0x70a1('0xad')));_0x45666e['use'](_0x70a1('0xae'),require('./api/intZendeskConfiguration'));_0x45666e[_0x70a1('0x8')]('/api/integrations/zendesk/fields',require(_0x70a1('0xaf')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xb0'),require(_0x70a1('0xb1')));_0x45666e['use']('/api/integrations/freshdesk/configurations',require(_0x70a1('0xb2')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xb3'),require(_0x70a1('0xb4')));_0x45666e['use'](_0x70a1('0xb5'),require('./api/intVtigerAccount'));_0x45666e['use'](_0x70a1('0xb6'),require(_0x70a1('0xb7')));_0x45666e['use'](_0x70a1('0xb8'),require(_0x70a1('0xb9')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xba'),require(_0x70a1('0xbb')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xbc'),require('./api/intServicenowConfiguration'));_0x45666e['use'](_0x70a1('0xbd'),require(_0x70a1('0xbe')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xbf'),require(_0x70a1('0xc0')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xc1'),require('./api/intDynamics365Configuration'));_0x45666e[_0x70a1('0x8')]('/api/integrations/dynamics365/fields',require(_0x70a1('0xc2')));_0x45666e[_0x70a1('0x8')]('/api/integrations/freshsales/accounts',require(_0x70a1('0xc3')));_0x45666e[_0x70a1('0x8')]('/api/integrations/freshsales/configurations',require('./api/intFreshsalesConfiguration'));_0x45666e[_0x70a1('0x8')](_0x70a1('0xc4'),require(_0x70a1('0xc5')));_0x45666e[_0x70a1('0x8')]('/api/networks',require(_0x70a1('0xc6')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xc7'),require(_0x70a1('0xc8')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xc9'),require('./api/chatInternalMessage'));_0x45666e[_0x70a1('0x8')](_0x70a1('0xca'),require(_0x70a1('0xcb')));_0x45666e['use']('/api/jscripty/questions/reports',require('./api/jscriptyQuestionReport'));_0x45666e[_0x70a1('0x8')](_0x70a1('0xcc'),require(_0x70a1('0xcd')));_0x45666e[_0x70a1('0x8')]('/api/sms/reports/queue',require(_0x70a1('0xce')));_0x45666e['use'](_0x70a1('0xcf'),require(_0x70a1('0xd0')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xd1'),require(_0x70a1('0xd2')));_0x45666e['use']('/api/jscripty/projects',require(_0x70a1('0xd3')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xd4'),require(_0x70a1('0xd5')));_0x45666e[_0x70a1('0x8')]('/api/square/odbc',require(_0x70a1('0xd6')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xd7'),require('./api/squareProject'));_0x45666e['use'](_0x70a1('0xd8'),require(_0x70a1('0xd9')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xda'),require(_0x70a1('0xdb')));_0x45666e[_0x70a1('0x8')]('/api/teams',require(_0x70a1('0xdc')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xdd'),require('./api/license'));_0x45666e['use'](_0x70a1('0xde'),require('./api/campaign'));_0x45666e['use'](_0x70a1('0xdf'),require(_0x70a1('0xe0')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xe1'),require('./api/attachment'));_0x45666e[_0x70a1('0x8')](_0x70a1('0xe2'),require(_0x70a1('0xe3')));_0x45666e['use']('/api/mail/reports/transfer',require(_0x70a1('0xe4')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xe5'),require(_0x70a1('0xe6')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xe7'),require('./api/faxTransferReport'));_0x45666e[_0x70a1('0x8')](_0x70a1('0xe8'),require(_0x70a1('0xe9')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xea'),require(_0x70a1('0xeb')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xec'),require('./api/cmList'));_0x45666e['use'](_0x70a1('0xed'),require(_0x70a1('0xee')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xef'),require(_0x70a1('0xf0')));_0x45666e[_0x70a1('0x8')]('/api/userProfile/sections',require(_0x70a1('0xf1')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xf2'),require(_0x70a1('0xf3')));_0x45666e[_0x70a1('0x8')](_0x70a1('0xf4'),require('./api/authLocal'));_0x45666e[_0x70a1('0x8')](_0x70a1('0xf5'),require(_0x70a1('0xf6')));_0x45666e[_0x70a1('0x8')]('/api/jira',require(_0x70a1('0xf7')));_0x45666e['use'](_0x70a1('0xf8'),require(_0x70a1('0xf9')));_0x45666e[_0x70a1('0x8')]('/api/version',require(_0x70a1('0xfa')));_0x45666e['use'](_0x70a1('0xfb'),require(_0x70a1('0xfc')));_0x45666e[_0x70a1('0x8')]('/api/pm2',require(_0x70a1('0xfd')));_0x45666e['use'](_0x70a1('0xfe'),express[_0x70a1('0xff')](path['join'](config['root'],'/apidoc')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x100'),express[_0x70a1('0xff')](path['join'](config[_0x70a1('0x101')],_0x70a1('0x100'))));_0x45666e['use'](_0x70a1('0x102'),express[_0x70a1('0xff')](path['join'](config[_0x70a1('0x101')],_0x70a1('0x102'))));_0x45666e[_0x70a1('0x8')](_0x70a1('0x103'),express[_0x70a1('0xff')](path[_0x70a1('0x104')](config[_0x70a1('0x101')],'snippet','1.0.16')));_0x45666e[_0x70a1('0x8')](_0x70a1('0x105'),express[_0x70a1('0xff')](path[_0x70a1('0x104')](config['root'],_0x70a1('0x106'))));_0x45666e[_0x70a1('0x107')](_0x70a1('0x108'))[_0x70a1('0x109')](errors[0x194]);_0x45666e[_0x70a1('0x107')]('/*')[_0x70a1('0x109')](function(_0x3c8648,_0x5affd4){_0x5affd4[_0x70a1('0x10a')](path['resolve'](_0x45666e[_0x70a1('0x109')](_0x70a1('0x10b'))+_0x70a1('0x10c')));});};
\ No newline at end of file
+var _0xb4cb=['./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','/api/integrations/salesforce/configurations','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','./api/intSugarcrmConfiguration','/api/integrations/sugarcrm/fields','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intDeskConfiguration','./api/intDeskField','/api/integrations/zoho/accounts','./api/intZohoAccount','/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/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','./api/intServicenowAccount','/api/integrations/servicenow/fields','/api/integrations/dynamics365/accounts','./api/intDynamics365Account','./api/intDynamics365Configuration','/api/integrations/dynamics365/fields','./api/intDynamics365Field','/api/integrations/freshsales/accounts','/api/integrations/freshsales/configurations','./api/intFreshsalesConfiguration','/api/integrations/freshsales/fields','./api/intFreshsalesField','/api/networks','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','/api/jscripty/questions/reports','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','/api/sms/reports/queue','./api/smsQueueReport','/api/square/reports','./api/squareReport','./api/squareReportDetail','/api/jscripty/projects','./api/jscriptyProject','./api/squareOdbc','./api/squareProject','/api/square/recordings','/api/square/messages','./api/squareMessage','/api/teams','/api/license','./api/license','/api/campaigns','./api/campaign','./api/migration','./api/attachment','/api/plugins','./api/plugin','/api/mail/reports/transfer','/api/chat/reports/transfer','/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/auth/local','/api/auth/google','./api/authGoogle','/api/jira','./api/jira','/api/rpc','./api/rpc','/api/version','./api/version','./api/pm2','static','join','/apidoc','/www','/demo','/snippet','root','snippet','route','/:url(api|auth|components|app|bower_components|assets)/*','get','sendFile','resolve','appPath','express','express-winston','util','./errors','./config/environment','./config/logger','api','default','use','format','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','method','headers','x-forwarded-for','remoteAddress','statusCode','responseTime','user','name','role','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','body','device','agent_id','connection','url','other','agent_name','/api/users','./api/user','/api/voice/chanspy','./api/voiceChanSpy','/api/voice/contexts','./api/voiceContext','/api/voice/extensions','./api/voiceExtension','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','./api/screenRecording','/api/voice/mails','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','/api/trunks','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/accounts','./api/mailAccount','/api/mail/queues','./api/mailQueue','/api/mail/substatuses','./api/mailSubstatus','./api/mailInteraction','./api/mailMessage','./api/mailApplication','/api/mail/reports/queue','./api/mailQueueReport','/api/dashboards','./api/dashboard','/api/dashboards/items','./api/dashboardItem','/api/fax/accounts','./api/faxAccount','/api/fax/interactions','./api/faxInteraction','/api/fax/queues','/api/sms/accounts','/api/sms/applications','./api/smsApplication','/api/sms/interactions','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/smsQueue','./api/openchannelAccount','/api/openchannel/applications','./api/openchannelApplication','/api/openchannel/interactions','/api/openchannel/messages','./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/groups','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany','./api/cmContact','/api/cm/hopper','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperFinal','/api/cm/hopper_history','/api/cm/custom_fields','./api/cmCustomField','./api/action','/api/automations','./api/automation','/api/canned_answers','./api/cannedAnswer','/api/dispositions','./api/disposition','/api/conditions','/api/intervals','./api/interval','/api/pauses','./api/pause','./api/cdr','/api/voiceQueuesLog','./api/schedule','/api/sounds','/api/tags','./api/tag','./api/template','/api/triggers','./api/trigger','./api/variable','/api/integrations','./api/integration','/api/integrations/reports','./api/integrationReport','./api/analyticCustomReport','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticExtractedReport','/api/analytics/metrics','./api/analyticMetric','/api/analytics/field_reports'];(function(_0x5e238b,_0x17ae49){var _0x389bea=function(_0x3cc1c1){while(--_0x3cc1c1){_0x5e238b['push'](_0x5e238b['shift']());}};_0x389bea(++_0x17ae49);}(_0xb4cb,0x18b));var _0xbb4c=function(_0x3252c3,_0x30939b){_0x3252c3=_0x3252c3-0x0;var _0x11be4a=_0xb4cb[_0x3252c3];return _0x11be4a;};'use strict';var path=require('path');var express=require(_0xbb4c('0x0'));var ewinston=require(_0xbb4c('0x1'));var util=require(_0xbb4c('0x2'));var errors=require(_0xbb4c('0x3'));var config=require(_0xbb4c('0x4'));var logger=require(_0xbb4c('0x5'))(_0xbb4c('0x6'));var authLogger=require('./config/logger')('auth');exports[_0xbb4c('0x7')]=function(_0x5b3fdb){_0x5b3fdb[_0xbb4c('0x8')](ewinston['logger']({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x371f27,_0x32651e){return util[_0xbb4c('0x9')](_0xbb4c('0xa'),_0x371f27[_0xbb4c('0xb')],_0x371f27[_0xbb4c('0xc')][_0xbb4c('0xd')]?_0x371f27[_0xbb4c('0xc')][_0xbb4c('0xd')]:_0x371f27['connection'][_0xbb4c('0xe')]||_0x371f27['ip'],_0x371f27['url'],_0x32651e[_0xbb4c('0xf')],_0x32651e[_0xbb4c('0x10')],_0x371f27['user']?_0x371f27[_0xbb4c('0x11')]['id']:null,_0x371f27[_0xbb4c('0x11')]?_0x371f27[_0xbb4c('0x11')][_0xbb4c('0x12')]:null,_0x371f27[_0xbb4c('0x11')]?_0x371f27[_0xbb4c('0x11')][_0xbb4c('0x13')]:null);}}));_0x5b3fdb[_0xbb4c('0x8')](ewinston[_0xbb4c('0x14')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x5c19ec,_0x1ee4d9){var _0x52e613=_0xbb4c('0x15');if(_0x5c19ec['body']&&_0x5c19ec[_0xbb4c('0x16')][_0xbb4c('0x17')]&&_0x5c19ec['body'][_0xbb4c('0x18')]){_0x52e613='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)';}return util[_0xbb4c('0x9')](_0x52e613,_0x5c19ec[_0xbb4c('0xb')],_0x5c19ec[_0xbb4c('0xc')][_0xbb4c('0xd')]?_0x5c19ec[_0xbb4c('0xc')][_0xbb4c('0xd')]:_0x5c19ec[_0xbb4c('0x19')][_0xbb4c('0xe')]||_0x5c19ec['ip'],_0x5c19ec[_0xbb4c('0x1a')],_0x1ee4d9['statusCode'],_0x1ee4d9[_0xbb4c('0x10')],_0x5c19ec[_0xbb4c('0x11')]?_0x5c19ec[_0xbb4c('0x11')]['id']:null,_0x5c19ec[_0xbb4c('0x11')]?_0x5c19ec['user']['name']:null,_0x5c19ec['user']?_0x5c19ec[_0xbb4c('0x11')][_0xbb4c('0x13')]:null,_0x5c19ec['body']&&_0x5c19ec[_0xbb4c('0x16')][_0xbb4c('0x17')]?_0x5c19ec[_0xbb4c('0x16')][_0xbb4c('0x17')]:_0xbb4c('0x1b'),_0x5c19ec['body']&&_0x5c19ec[_0xbb4c('0x16')][_0xbb4c('0x18')]?_0x5c19ec['body'][_0xbb4c('0x18')]:'',_0x5c19ec['body']&&_0x5c19ec[_0xbb4c('0x16')][_0xbb4c('0x1c')]?_0x5c19ec[_0xbb4c('0x16')]['agent_name']:'');},'ignoreRoute':function(_0x48a7b1){var _0x540d6b=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x540d6b['test'](_0x48a7b1[_0xbb4c('0x1a')]);}}));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x1d'),require(_0xbb4c('0x1e')));_0x5b3fdb['use'](_0xbb4c('0x1f'),require(_0xbb4c('0x20')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x21'),require(_0xbb4c('0x22')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x23'),require(_0xbb4c('0x24')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x25'),require(_0xbb4c('0x26')));_0x5b3fdb['use'](_0xbb4c('0x27'),require(_0xbb4c('0x28')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x29'),require(_0xbb4c('0x2a')));_0x5b3fdb['use']('/api/screen/recordings',require(_0xbb4c('0x2b')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x2c'),require('./api/voiceMail'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x2d'),require(_0xbb4c('0x2e')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x2f'),require(_0xbb4c('0x30')));_0x5b3fdb['use'](_0xbb4c('0x31'),require(_0xbb4c('0x32')));_0x5b3fdb['use']('/api/voice/agents/reports',require('./api/voiceAgentReport'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x33'),require(_0xbb4c('0x34')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x35'),require('./api/memberReport'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x36'),require('./api/trunk'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x37'),require(_0xbb4c('0x38')));_0x5b3fdb['use']('/api/mail/out_servers',require('./api/mailServerOut'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x39'),require(_0xbb4c('0x3a')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x3b'),require(_0xbb4c('0x3c')));_0x5b3fdb['use'](_0xbb4c('0x3d'),require(_0xbb4c('0x3e')));_0x5b3fdb[_0xbb4c('0x8')]('/api/mail/interactions',require(_0xbb4c('0x3f')));_0x5b3fdb[_0xbb4c('0x8')]('/api/mail/messages',require(_0xbb4c('0x40')));_0x5b3fdb[_0xbb4c('0x8')]('/api/mail/applications',require(_0xbb4c('0x41')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x42'),require(_0xbb4c('0x43')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x44'),require(_0xbb4c('0x45')));_0x5b3fdb['use'](_0xbb4c('0x46'),require(_0xbb4c('0x47')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x48'),require(_0xbb4c('0x49')));_0x5b3fdb['use']('/api/fax/applications',require('./api/faxApplication'));_0x5b3fdb['use'](_0xbb4c('0x4a'),require(_0xbb4c('0x4b')));_0x5b3fdb[_0xbb4c('0x8')]('/api/fax/messages',require('./api/faxMessage'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x4c'),require('./api/faxQueue'));_0x5b3fdb[_0xbb4c('0x8')]('/api/fax/reports/queue',require('./api/faxQueueReport'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x4d'),require('./api/smsAccount'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x4e'),require(_0xbb4c('0x4f')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x50'),require(_0xbb4c('0x51')));_0x5b3fdb['use'](_0xbb4c('0x52'),require(_0xbb4c('0x53')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x54'),require(_0xbb4c('0x55')));_0x5b3fdb[_0xbb4c('0x8')]('/api/openchannel/accounts',require(_0xbb4c('0x56')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x57'),require(_0xbb4c('0x58')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x59'),require('./api/openchannelInteraction'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x5a'),require(_0xbb4c('0x5b')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x5c'),require(_0xbb4c('0x5d')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x5e'),require(_0xbb4c('0x5f')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x60'),require(_0xbb4c('0x61')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x62'),require(_0xbb4c('0x63')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x64'),require(_0xbb4c('0x65')));_0x5b3fdb['use'](_0xbb4c('0x66'),require(_0xbb4c('0x67')));_0x5b3fdb['use'](_0xbb4c('0x68'),require(_0xbb4c('0x69')));_0x5b3fdb[_0xbb4c('0x8')]('/api/chat/queues',require('./api/chatQueue'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x6a'),require('./api/chatGroup'));_0x5b3fdb['use'](_0xbb4c('0x6b'),require(_0xbb4c('0x6c')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x6d'),require(_0xbb4c('0x6e')));_0x5b3fdb[_0xbb4c('0x8')]('/api/cm/contacts',require(_0xbb4c('0x6f')));_0x5b3fdb['use'](_0xbb4c('0x70'),require(_0xbb4c('0x71')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x72'),require('./api/cmHopperBlack'));_0x5b3fdb['use']('/api/cm/hopper_final',require(_0xbb4c('0x73')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x74'),require('./api/cmHopperHistory'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x75'),require(_0xbb4c('0x76')));_0x5b3fdb['use']('/api/actions',require(_0xbb4c('0x77')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x78'),require(_0xbb4c('0x79')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x7a'),require(_0xbb4c('0x7b')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x7c'),require(_0xbb4c('0x7d')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x7e'),require('./api/condition'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x7f'),require(_0xbb4c('0x80')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x81'),require(_0xbb4c('0x82')));_0x5b3fdb[_0xbb4c('0x8')]('/api/cdr',require(_0xbb4c('0x83')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x84'),require('./api/voiceQueuesLog'));_0x5b3fdb[_0xbb4c('0x8')]('/api/schedules',require(_0xbb4c('0x85')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x86'),require('./api/sound'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x87'),require(_0xbb4c('0x88')));_0x5b3fdb['use']('/api/templates',require(_0xbb4c('0x89')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x8a'),require(_0xbb4c('0x8b')));_0x5b3fdb[_0xbb4c('0x8')]('/api/variables',require(_0xbb4c('0x8c')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x8d'),require(_0xbb4c('0x8e')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x8f'),require(_0xbb4c('0x90')));_0x5b3fdb[_0xbb4c('0x8')]('/api/analytics/custom_reports',require(_0xbb4c('0x91')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x92'),require(_0xbb4c('0x93')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x94'),require(_0xbb4c('0x95')));_0x5b3fdb['use'](_0xbb4c('0x96'),require(_0xbb4c('0x97')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x98'),require(_0xbb4c('0x99')));_0x5b3fdb['use'](_0xbb4c('0x9a'),require(_0xbb4c('0x9b')));_0x5b3fdb['use'](_0xbb4c('0x9c'),require(_0xbb4c('0x9d')));_0x5b3fdb['use'](_0xbb4c('0x9e'),require(_0xbb4c('0x9f')));_0x5b3fdb['use'](_0xbb4c('0xa0'),require('./api/intSalesforceField'));_0x5b3fdb['use'](_0xbb4c('0xa1'),require(_0xbb4c('0xa2')));_0x5b3fdb[_0xbb4c('0x8')]('/api/integrations/sugarcrm/configurations',require(_0xbb4c('0xa3')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xa4'),require('./api/intSugarcrmField'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xa5'),require(_0xbb4c('0xa6')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xa7'),require(_0xbb4c('0xa8')));_0x5b3fdb[_0xbb4c('0x8')]('/api/integrations/desk/fields',require(_0xbb4c('0xa9')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xaa'),require(_0xbb4c('0xab')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xac'),require(_0xbb4c('0xad')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xae'),require('./api/intZohoField'));_0x5b3fdb['use'](_0xbb4c('0xaf'),require(_0xbb4c('0xb0')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xb1'),require(_0xbb4c('0xb2')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xb3'),require(_0xbb4c('0xb4')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xb5'),require(_0xbb4c('0xb6')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xb7'),require(_0xbb4c('0xb8')));_0x5b3fdb[_0xbb4c('0x8')]('/api/integrations/freshdesk/fields',require('./api/intFreshdeskField'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xb9'),require(_0xbb4c('0xba')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xbb'),require(_0xbb4c('0xbc')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xbd'),require(_0xbb4c('0xbe')));_0x5b3fdb[_0xbb4c('0x8')]('/api/integrations/servicenow/accounts',require(_0xbb4c('0xbf')));_0x5b3fdb[_0xbb4c('0x8')]('/api/integrations/servicenow/configurations',require('./api/intServicenowConfiguration'));_0x5b3fdb['use'](_0xbb4c('0xc0'),require('./api/intServicenowField'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xc1'),require(_0xbb4c('0xc2')));_0x5b3fdb[_0xbb4c('0x8')]('/api/integrations/dynamics365/configurations',require(_0xbb4c('0xc3')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xc4'),require(_0xbb4c('0xc5')));_0x5b3fdb['use'](_0xbb4c('0xc6'),require('./api/intFreshsalesAccount'));_0x5b3fdb['use'](_0xbb4c('0xc7'),require(_0xbb4c('0xc8')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xc9'),require(_0xbb4c('0xca')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xcb'),require(_0xbb4c('0xcc')));_0x5b3fdb['use'](_0xbb4c('0xcd'),require(_0xbb4c('0xce')));_0x5b3fdb['use'](_0xbb4c('0xcf'),require(_0xbb4c('0xd0')));_0x5b3fdb[_0xbb4c('0x8')]('/api/jscripty/answers/reports',require('./api/jscriptyAnswerReport'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xd1'),require(_0xbb4c('0xd2')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xd3'),require('./api/jscriptySessionReport'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xd4'),require(_0xbb4c('0xd5')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xd6'),require(_0xbb4c('0xd7')));_0x5b3fdb[_0xbb4c('0x8')]('/api/square/details/reports',require(_0xbb4c('0xd8')));_0x5b3fdb['use'](_0xbb4c('0xd9'),require(_0xbb4c('0xda')));_0x5b3fdb['use']('/api/settings',require('./api/setting'));_0x5b3fdb[_0xbb4c('0x8')]('/api/square/odbc',require(_0xbb4c('0xdb')));_0x5b3fdb[_0xbb4c('0x8')]('/api/square/projects',require(_0xbb4c('0xdc')));_0x5b3fdb['use'](_0xbb4c('0xdd'),require('./api/squareRecording'));_0x5b3fdb['use'](_0xbb4c('0xde'),require(_0xbb4c('0xdf')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xe0'),require('./api/team'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xe1'),require(_0xbb4c('0xe2')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xe3'),require(_0xbb4c('0xe4')));_0x5b3fdb[_0xbb4c('0x8')]('/api/migrations',require(_0xbb4c('0xe5')));_0x5b3fdb[_0xbb4c('0x8')]('/api/attachments',require(_0xbb4c('0xe6')));_0x5b3fdb['use'](_0xbb4c('0xe7'),require(_0xbb4c('0xe8')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xe9'),require('./api/mailTransferReport'));_0x5b3fdb['use'](_0xbb4c('0xea'),require('./api/chatTransferReport'));_0x5b3fdb['use'](_0xbb4c('0xeb'),require(_0xbb4c('0xec')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xed'),require(_0xbb4c('0xee')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xef'),require(_0xbb4c('0xf0')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xf1'),require(_0xbb4c('0xf2')));_0x5b3fdb['use'](_0xbb4c('0xf3'),require(_0xbb4c('0xf4')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xf5'),require(_0xbb4c('0xf6')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xf7'),require(_0xbb4c('0xf8')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xf9'),require('./api/userProfileResource'));_0x5b3fdb['use'](_0xbb4c('0xfa'),require('./api/authLocal'));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xfb'),require(_0xbb4c('0xfc')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xfd'),require(_0xbb4c('0xfe')));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0xff'),require(_0xbb4c('0x100')));_0x5b3fdb['use'](_0xbb4c('0x101'),require(_0xbb4c('0x102')));_0x5b3fdb['use']('/api/system',require('./api/system'));_0x5b3fdb[_0xbb4c('0x8')]('/api/pm2',require(_0xbb4c('0x103')));_0x5b3fdb['use']('/apidoc',express[_0xbb4c('0x104')](path[_0xbb4c('0x105')](config['root'],_0xbb4c('0x106'))));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x107'),express[_0xbb4c('0x104')](path[_0xbb4c('0x105')](config['root'],_0xbb4c('0x107'))));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x108'),express[_0xbb4c('0x104')](path[_0xbb4c('0x105')](config['root'],_0xbb4c('0x108'))));_0x5b3fdb[_0xbb4c('0x8')](_0xbb4c('0x109'),express['static'](path[_0xbb4c('0x105')](config[_0xbb4c('0x10a')],_0xbb4c('0x10b'),'1.0.16')));_0x5b3fdb[_0xbb4c('0x8')]('/plugins',express['static'](path['join'](config['root'],'/server/files/plugins')));_0x5b3fdb[_0xbb4c('0x10c')](_0xbb4c('0x10d'))[_0xbb4c('0x10e')](errors[0x194]);_0x5b3fdb['route']('/*')[_0xbb4c('0x10e')](function(_0x405ebf,_0x4e750e){_0x4e750e[_0xbb4c('0x10f')](path[_0xbb4c('0x110')](_0x5b3fdb[_0xbb4c('0x10e')](_0xbb4c('0x111'))+'/index.html'));});};
\ No newline at end of file
diff --git a/server/rpc/index.js b/server/rpc/index.js
index cbaf9a5..5a9ba12 100644
--- a/server/rpc/index.js
+++ b/server/rpc/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5d36=['../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopper/cmHopper.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/squareOdbc/squareOdbc.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','http','rpc','port','error','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','RPC\x20listening\x20on\x20','jayson/promise','bluebird','lodash','../config/environment','listen','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceRecording/voiceRecording.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/mailAccount/mailAccount.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x5d36,0x15a));var _0x65d3=function(_0x3adad8,_0x5aef55){_0x3adad8=_0x3adad8-0x0;var _0x177095=_0x5d36[_0x3adad8];return _0x177095;};'use strict';var jayson=require(_0x65d3('0x0'));var BPromise=require(_0x65d3('0x1'));var _=require(_0x65d3('0x2'));var config=require(_0x65d3('0x3'));exports[_0x65d3('0x4')]=function(){return new BPromise(function(_0x34faa9,_0x5cb555){var _0x55acdf={};_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x6')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x7')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/voiceQueue/voiceQueue.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x8')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x9')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/voiceDialReport/voiceDialReport.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0xa')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0xb')));_0x55acdf=_['merge'](_0x55acdf,require(_0x65d3('0xc')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0xd')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0xe')));_0x55acdf=_['merge'](_0x55acdf,require(_0x65d3('0xf')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x10')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x11')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/mailQueue/mailQueue.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x12')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x13')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/mailApplication/mailApplication.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x14')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/faxAccount/faxAccount.rpc'));_0x55acdf=_['merge'](_0x55acdf,require('../api/faxApplication/faxApplication.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x15')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x16')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x17')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/faxQueueReport/faxQueueReport.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x18')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x19')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x1a')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x1b')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x1c')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x1d')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x1e')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x1f')));_0x55acdf=_['merge'](_0x55acdf,require(_0x65d3('0x20')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x21')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x22')));_0x55acdf=_['merge'](_0x55acdf,require(_0x65d3('0x23')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x24')));_0x55acdf=_['merge'](_0x55acdf,require(_0x65d3('0x25')));_0x55acdf=_['merge'](_0x55acdf,require('../api/cmHopperBlack/cmHopperBlack.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/cmHopperFinal/cmHopperFinal.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/cmHopperHistory/cmHopperHistory.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x26')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x27')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/pause/pause.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/sound/sound.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/template/template.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/trigger/trigger.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x28')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x29')));_0x55acdf=_['merge'](_0x55acdf,require('../api/intSugarcrmAccount/intSugarcrmAccount.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x2a')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/intZohoAccount/intZohoAccount.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x2b')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x2c')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x2d')));_0x55acdf=_['merge'](_0x55acdf,require(_0x65d3('0x2e')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/intDynamics365Account/intDynamics365Account.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x2f')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/chatQueueReport/chatQueueReport.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x30')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x31')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x32')));_0x55acdf=_['merge'](_0x55acdf,require(_0x65d3('0x33')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/squareProject/squareProject.rpc'));_0x55acdf=_['merge'](_0x55acdf,require('../api/squareRecording/squareRecording.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require('../api/squareMessage/squareMessage.rpc'));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x34')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x35')));_0x55acdf=_[_0x65d3('0x5')](_0x55acdf,require(_0x65d3('0x36')));var _0x50fb60=jayson['server'](_0x55acdf)[_0x65d3('0x37')]();var _0x3ba775=config[_0x65d3('0x38')][_0x65d3('0x39')]||config['port']+0x1;var _0xbd1083=config['rpc']['ip']||'localhost';_0x50fb60['on'](_0x65d3('0x3a'),function(_0x18cd23){return _0x5cb555(_0x18cd23);});_0x50fb60[_0x65d3('0x4')](_0x3ba775,_0xbd1083,function(){console['log'](_0x65d3('0x3b'),_0xbd1083,_0x3ba775);require(_0x65d3('0x3c'))['default']();return _0x34faa9(_0x65d3('0x3d')+_0xbd1083+':'+_0x3ba775);});});};
\ No newline at end of file
+var _0x6668=['RPC\x20listening\x20on\x20','jayson/promise','bluebird','lodash','listen','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceDialReport/voiceDialReport.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/mailAccount/mailAccount.rpc','../api/mailQueue/mailQueue.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/faxAccount/faxAccount.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopper/cmHopper.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/template/template.rpc','../api/variable/variable.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/intServicenowAccount/intServicenowAccount.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareRecording/squareRecording.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','server','http','rpc','port','localhost','../config/triggers'];(function(_0x408144,_0x211a81){var _0x151cfe=function(_0x2edc25){while(--_0x2edc25){_0x408144['push'](_0x408144['shift']());}};_0x151cfe(++_0x211a81);}(_0x6668,0xca));var _0x8666=function(_0xffd9e8,_0x165d2a){_0xffd9e8=_0xffd9e8-0x0;var _0x5d6c6e=_0x6668[_0xffd9e8];return _0x5d6c6e;};'use strict';var jayson=require(_0x8666('0x0'));var BPromise=require(_0x8666('0x1'));var _=require(_0x8666('0x2'));var config=require('../config/environment');exports[_0x8666('0x3')]=function(){return new BPromise(function(_0xd01727,_0x1811c9){var _0x1635aa={};_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x5')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x6')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x7')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/voiceRecording/voiceRecording.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/voiceCallReport/voiceCallReport.rpc'));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x8')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x9')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0xa')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0xb')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0xc')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0xd')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0xe')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0xf')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x10')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x11')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/mailInteraction/mailInteraction.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x12')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x13')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/mailQueueReport/mailQueueReport.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x14')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x15')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x16')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x17')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x18')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x19')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x1a')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x1b')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/smsMessage/smsMessage.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x1c')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x1d')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x1e')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/openchannelMessage/openchannelMessage.rpc'));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x1f')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x20')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/chatInteraction/chatInteraction.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x21')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x22')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x23')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x24')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/cmHopperBlack/cmHopperBlack.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x25')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x26')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/reportAgentPreview/reportAgentPreview.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x27')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x28')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x29')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x2a')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/trigger/trigger.rpc'));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x2b')));_0x1635aa=_['merge'](_0x1635aa,require('../api/intSalesforceAccount/intSalesforceAccount.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x2c')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x2d')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x2e')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x2f')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x30')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x31')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x32')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/intDynamics365Account/intDynamics365Account.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x33')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x34')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x35')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/squareReport/squareReport.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x36')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x37')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/squareProject/squareProject.rpc'));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x38')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require('../api/squareMessage/squareMessage.rpc'));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x39')));_0x1635aa=_['merge'](_0x1635aa,require(_0x8666('0x3a')));_0x1635aa=_[_0x8666('0x4')](_0x1635aa,require(_0x8666('0x3b')));var _0x198ab4=jayson[_0x8666('0x3c')](_0x1635aa)[_0x8666('0x3d')]();var _0x28230f=config[_0x8666('0x3e')][_0x8666('0x3f')]||config[_0x8666('0x3f')]+0x1;var _0x381d5f=config[_0x8666('0x3e')]['ip']||_0x8666('0x40');_0x198ab4['on']('error',function(_0x198987){return _0x1811c9(_0x198987);});_0x198ab4[_0x8666('0x3')](_0x28230f,_0x381d5f,function(){console['log']('Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!',_0x381d5f,_0x28230f);require(_0x8666('0x41'))['default']();return _0xd01727(_0x8666('0x42')+_0x381d5f+':'+_0x28230f);});});};
\ No newline at end of file
diff --git a/server/services/agi/channel.js b/server/services/agi/channel.js
index c12e628..c9b766d 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 _0xedd9=['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','wait','WAIT','noop','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','exports','lodash','events','EventEmitter','./reply','./error','call','setEncoding','utf8','headers','emit','line','toLowerCase','hangup','substring','search','520\x20End\x20of\x20proper','function','no\x20code','replace','result=','indexOf','substr','startsWith','split','length','match','error','code','close','E_AGI_SOCKET_CLOSE','destroy','pipe','write','inherits','prototype','command','sync','answer','getData','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','NO\x20MESSAGE','sendRequest','exec','isArray','EXEC\x20%s\x20%s','join','setContext','SET\x20CONTEXT\x20%s','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','isNumber','toString','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayNumber','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','continueAt','extension','GOTO\x20%s\x20%s\x20%s'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xedd9,0xfc));var _0x9edd=function(_0x429649,_0xfe6499){_0x429649=_0x429649-0x0;var _0x55dbcc=_0xedd9[_0x429649];return _0x55dbcc;};'use strict';var util=require('util');var _=require(_0x9edd('0x0'));var EventEmitter=require(_0x9edd('0x1'))[_0x9edd('0x2')];var AGIReply=require(_0x9edd('0x3'));var AGIError=require(_0x9edd('0x4'));function AGIChannel(_0x127cbe){var _0x3e6d3a=this,_0x36b53f=new AGIReply(),_0x5943b3=![],_0x33679f={};EventEmitter[_0x9edd('0x5')](_0x3e6d3a);_0x127cbe[_0x9edd('0x6')](_0x9edd('0x7'));_0x127cbe['setTimeout'](0x8*0x3c*0x3c*0x3e8);_0x36b53f[_0x9edd('0x6')]('utf8');_0x36b53f['on'](_0x9edd('0x8'),function(_0x190185){for(var _0x1355be in _0x190185){_0x3e6d3a[_0x1355be]=_0x190185[_0x1355be];}_0x3e6d3a[_0x9edd('0x9')]('ready');});_0x36b53f['on'](_0x9edd('0xa'),function(_0x5d2f90){if(_0x5d2f90[_0x9edd('0xb')]()==_0x9edd('0xc')){_0x3e6d3a['emit'](_0x9edd('0xc'));return;}if(_0x5d2f90[_0x9edd('0xd')](0x0,0xb)=='520-Invalid'){_0x5943b3=!![];}if(_0x5943b3){_0x33679f['rx']+=_0x5d2f90+'\x0a';if(_0x5d2f90[_0x9edd('0xe')](_0x9edd('0xf'))!=-0x1){_0x5943b3=![];}}else{_0x33679f['rx']=_0x5d2f90;}if(_0x5943b3){return;}if(typeof _0x33679f['cb']==_0x9edd('0x10')){var _0xfd544a=_0x33679f['rx'][_0x9edd('0xd')](0x0,0x3),_0x287ddd=null,_0x3a7b84=null;_0xfd544a=parseInt(_0xfd544a);if(isNaN(_0xfd544a)){_0x33679f['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x9edd('0x11')});return;}if(_0xfd544a!=0xc8){_0x33679f['cb'](null,{'code':_0xfd544a,'result':-0x1,'extra':'KO'});return;}_0x287ddd=_0x33679f['rx']['substring'](0x4)[_0x9edd('0x12')](_0x9edd('0x13'),'');if(_0x287ddd[_0x9edd('0x14')]('\x20')!=-0x1){_0x287ddd=_0x287ddd[_0x9edd('0x15')](0x0,_0x287ddd[_0x9edd('0x14')]('\x20'));}if(_[_0x9edd('0x16')](_0x287ddd,'-1')){_0x287ddd=parseInt(_0x287ddd);}_0x3a7b84=_0x33679f['rx'][_0x9edd('0x17')]('\x20');if(_0x3a7b84[_0x9edd('0x18')]==0x3){_0x3a7b84=_0x3a7b84[0x2]['substring'](0x1,_0x3a7b84[0x2][_0x9edd('0x18')]-0x1);}else if(_0x3a7b84[_0x9edd('0x18')]>0x3){var _0x449cee=/\((.+)\)/;var _0x5acf65=_0x33679f['rx'][_0x9edd('0x19')](_0x449cee);if(_0x5acf65){_0x3a7b84=_0x5acf65[0x1];}else{_0x3a7b84=null;}}else{_0x3a7b84=null;}_0x33679f['cb'](null,{'code':_0xfd544a,'result':_0x287ddd,'extra':_0x3a7b84});}});_0x127cbe['on'](_0x9edd('0x1a'),function(_0x40ba32){_0x3e6d3a['emit'](_0x9edd('0x1a'),new AGIError('E_AGI_SOCKET_ERROR',_0x40ba32[_0x9edd('0x1b')]));});_0x127cbe['on'](_0x9edd('0x1c'),function(){_0x3e6d3a['emit']('close',new AGIError(_0x9edd('0x1d')));});_0x127cbe['on']('timeout',function(){_0x3e6d3a[_0x9edd('0x9')]('timeout',new AGIError('E_AGI_SOCKET_TIMEOUT'));_0x127cbe[_0x9edd('0x1e')]();});_0x127cbe[_0x9edd('0x1f')](_0x36b53f);this['command']=function(_0x5823bc,_0x341d67){var _0x5823bc=_0x5823bc||'',_0x341d67=typeof _0x341d67=='function'?_0x341d67:new Function();_0x33679f={'tx':_0x5823bc,'rx':'','cb':_0x341d67};_0x127cbe[_0x9edd('0x20')](_0x5823bc+'\x0a');},this[_0x9edd('0x1c')]=function(){_0x127cbe[_0x9edd('0x1e')]();};}util[_0x9edd('0x21')](AGIChannel,EventEmitter);AGIChannel[_0x9edd('0x22')]['sendRequest']=function(_0x46c383){return this[_0x9edd('0x23')][_0x9edd('0x24')](this,_0x46c383);};AGIChannel[_0x9edd('0x22')][_0x9edd('0x25')]=function(){return this['sendRequest']('ANSWER');};AGIChannel[_0x9edd('0x22')][_0x9edd('0x26')]=function(_0x8d67aa,_0x25e135,_0x3c2227){_0x8d67aa=_0x8d67aa===undefined?'beep':_0x8d67aa;_0x25e135=_0x25e135===undefined?'5':_0x25e135;_0x3c2227=_0x3c2227===undefined?'1':_0x3c2227;return this['sendRequest'](util[_0x9edd('0x27')](_0x9edd('0x28'),_0x8d67aa,_0x25e135*0x3e8,_0x3c2227));};AGIChannel[_0x9edd('0x22')]['noop']=function(_0x238b22){_0x238b22=_0x238b22||_0x9edd('0x29');return this[_0x9edd('0x2a')](util[_0x9edd('0x27')]('VERBOSE\x20\x22%s\x22',_0x238b22));};AGIChannel[_0x9edd('0x22')][_0x9edd('0x2b')]=function(_0xbe87e1,_0x12c1bc){if(_[_0x9edd('0x2c')](_0x12c1bc)){return this[_0x9edd('0x2a')](util[_0x9edd('0x27')](_0x9edd('0x2d'),_0xbe87e1,_0x12c1bc[_0x9edd('0x2e')](',')));}return this[_0x9edd('0x2a')](util[_0x9edd('0x27')](_0x9edd('0x2d'),_0xbe87e1,_0x12c1bc));};AGIChannel[_0x9edd('0x22')][_0x9edd('0x2f')]=function(_0x1a6c23){return this['sendRequest'](util[_0x9edd('0x27')](_0x9edd('0x30'),_0x1a6c23));};AGIChannel[_0x9edd('0x22')]['setExtension']=function(_0x2d2f88){return this[_0x9edd('0x2a')](util[_0x9edd('0x27')](_0x9edd('0x31'),_0x2d2f88));};AGIChannel[_0x9edd('0x22')][_0x9edd('0x32')]=function(_0x473068){return this[_0x9edd('0x2a')](util[_0x9edd('0x27')](_0x9edd('0x33'),_0x473068));};AGIChannel[_0x9edd('0x22')][_0x9edd('0xc')]=function(){return this[_0x9edd('0x2a')](_0x9edd('0x34'));};AGIChannel['prototype'][_0x9edd('0x35')]=function(_0x5ed62d,_0x968303){var _0x148630=_[_0x9edd('0x36')](_0x968303)||_[_0x9edd('0x37')](_0x968303)?_0x968303[_0x9edd('0x38')]():_0x968303;return this['sendRequest'](util[_0x9edd('0x27')](_0x9edd('0x39'),_0x5ed62d,_0x148630?_0x148630[_0x9edd('0x38')]()[_0x9edd('0x12')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x9edd('0x22')][_0x9edd('0x3a')]=function(_0x5c0627,_0x1cbbac){return this[_0x9edd('0x2a')](util[_0x9edd('0x27')]('SAY\x20NUMBER\x20%s\x20%s',_0x5c0627,_0x1cbbac));};AGIChannel[_0x9edd('0x22')]['sayDigits']=function(_0x3ef1d5,_0x5658d6){return this[_0x9edd('0x2a')](util[_0x9edd('0x27')](_0x9edd('0x3b'),_0x3ef1d5,_0x5658d6));};AGIChannel['prototype'][_0x9edd('0x3c')]=function(_0xcbd0ef,_0x2f8f61){return this['sendRequest'](util[_0x9edd('0x27')]('SAY\x20PHONETIC\x20\x22%s\x22\x20%s',_0xcbd0ef,_0x2f8f61));};AGIChannel[_0x9edd('0x22')][_0x9edd('0x3d')]=function(_0x50be2c,_0x315f52,_0x40fdfb){_0x315f52=_0x315f52||this[_0x9edd('0x3e')];_0x40fdfb=_0x40fdfb||0x1;this[_0x9edd('0x2f')](_0x50be2c);this['setExtension'](_0x315f52);this[_0x9edd('0x32')](_0x40fdfb);return this['noop'](util[_0x9edd('0x27')](_0x9edd('0x3f'),_0x50be2c,_0x315f52,_0x40fdfb));};AGIChannel['prototype'][_0x9edd('0x40')]=function(_0x49a128){return this['sendRequest'](util[_0x9edd('0x27')](_0x9edd('0x41'),_0x49a128));};AGIChannel[_0x9edd('0x22')][_0x9edd('0x42')]=function(_0x25e6ec,_0x4737ae,_0x3ff512,_0x75efbe,_0x18c149,_0x2b081a){_0x4737ae=_0x4737ae||_0x9edd('0x43');_0x3ff512=_0x3ff512||'';_0x75efbe=_0x75efbe===undefined?-0x1:_0x75efbe==='-1'?-0x1:_0x75efbe*0x3e8;_0x18c149=_0x18c149===undefined?'':'s='+_0x18c149;_0x2b081a=_0x2b081a?_0x9edd('0x44'):'';return this[_0x9edd('0x2a')](util[_0x9edd('0x27')](_0x9edd('0x45'),_0x25e6ec,_0x4737ae,_0x3ff512,_0x75efbe,_0x2b081a,_0x18c149));};AGIChannel['prototype'][_0x9edd('0x46')]=function(_0x2570e3,_0x2231c1){_0x2231c1=_0x2231c1||'';return this[_0x9edd('0x2a')](util[_0x9edd('0x27')](_0x9edd('0x47'),_0x2570e3,_0x2231c1));};AGIChannel[_0x9edd('0x22')]['agi']=function(_0x4a4656){return this['exec'](_0x9edd('0x48'),_0x4a4656);};AGIChannel['prototype'][_0x9edd('0x49')]=function(_0x19b56b){return this[_0x9edd('0x2b')](_0x9edd('0x4a'),_0x19b56b);};AGIChannel[_0x9edd('0x22')]['error']=function(_0x387fb8,_0x35e63c){this[_0x9edd('0x4b')](util['format'](_0x9edd('0x4c'),_0x387fb8['id'],_0x387fb8[_0x9edd('0x4d')],_0x35e63c));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x9edd('0x4e')]=AGIChannel;
\ No newline at end of file
+var _0x0713=['noop','NO\x20MESSAGE','exec','isArray','EXEC\x20%s\x20%s','join','setContext','SET\x20CONTEXT\x20%s','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','isNumber','toString','sayNumber','SAY\x20NUMBER\x20%s\x20%s','sayDigits','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','setExtension','GET\x20VARIABLE\x20\x22%s\x22','recordFile','wav','BEEP','streamFile','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','AGI','wait','WAIT','label','exports','events','EventEmitter','./reply','./error','call','setEncoding','utf8','setTimeout','headers','emit','line','toLowerCase','hangup','substring','520-Invalid','search','520\x20End\x20of\x20proper','function','no\x20code','result=','substr','indexOf','startsWith','split','length','error','E_AGI_SOCKET_ERROR','code','close','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','pipe','command','write','inherits','prototype','sendRequest','sync','answer','getData','beep','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s'];(function(_0x778569,_0x172ed4){var _0x4eeb5c=function(_0x19302f){while(--_0x19302f){_0x778569['push'](_0x778569['shift']());}};_0x4eeb5c(++_0x172ed4);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var util=require('util');var _=require('lodash');var EventEmitter=require(_0x3071('0x0'))[_0x3071('0x1')];var AGIReply=require(_0x3071('0x2'));var AGIError=require(_0x3071('0x3'));function AGIChannel(_0x864539){var _0x52b5fb=this,_0x2c547f=new AGIReply(),_0x7b18a4=![],_0x33a70c={};EventEmitter[_0x3071('0x4')](_0x52b5fb);_0x864539[_0x3071('0x5')](_0x3071('0x6'));_0x864539[_0x3071('0x7')](0x8*0x3c*0x3c*0x3e8);_0x2c547f[_0x3071('0x5')](_0x3071('0x6'));_0x2c547f['on'](_0x3071('0x8'),function(_0x3e9a5e){for(var _0x2fce7a in _0x3e9a5e){_0x52b5fb[_0x2fce7a]=_0x3e9a5e[_0x2fce7a];}_0x52b5fb[_0x3071('0x9')]('ready');});_0x2c547f['on'](_0x3071('0xa'),function(_0x2610b4){if(_0x2610b4[_0x3071('0xb')]()==_0x3071('0xc')){_0x52b5fb[_0x3071('0x9')]('hangup');return;}if(_0x2610b4[_0x3071('0xd')](0x0,0xb)==_0x3071('0xe')){_0x7b18a4=!![];}if(_0x7b18a4){_0x33a70c['rx']+=_0x2610b4+'\x0a';if(_0x2610b4[_0x3071('0xf')](_0x3071('0x10'))!=-0x1){_0x7b18a4=![];}}else{_0x33a70c['rx']=_0x2610b4;}if(_0x7b18a4){return;}if(typeof _0x33a70c['cb']==_0x3071('0x11')){var _0x4a8cc7=_0x33a70c['rx']['substring'](0x0,0x3),_0x5330a8=null,_0x1826ca=null;_0x4a8cc7=parseInt(_0x4a8cc7);if(isNaN(_0x4a8cc7)){_0x33a70c['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x3071('0x12')});return;}if(_0x4a8cc7!=0xc8){_0x33a70c['cb'](null,{'code':_0x4a8cc7,'result':-0x1,'extra':'KO'});return;}_0x5330a8=_0x33a70c['rx'][_0x3071('0xd')](0x4)['replace'](_0x3071('0x13'),'');if(_0x5330a8['indexOf']('\x20')!=-0x1){_0x5330a8=_0x5330a8[_0x3071('0x14')](0x0,_0x5330a8[_0x3071('0x15')]('\x20'));}if(_[_0x3071('0x16')](_0x5330a8,'-1')){_0x5330a8=parseInt(_0x5330a8);}_0x1826ca=_0x33a70c['rx'][_0x3071('0x17')]('\x20');if(_0x1826ca[_0x3071('0x18')]==0x3){_0x1826ca=_0x1826ca[0x2][_0x3071('0xd')](0x1,_0x1826ca[0x2][_0x3071('0x18')]-0x1);}else if(_0x1826ca[_0x3071('0x18')]>0x3){var _0x21aad3=/\((.+)\)/;var _0x344ea6=_0x33a70c['rx']['match'](_0x21aad3);if(_0x344ea6){_0x1826ca=_0x344ea6[0x1];}else{_0x1826ca=null;}}else{_0x1826ca=null;}_0x33a70c['cb'](null,{'code':_0x4a8cc7,'result':_0x5330a8,'extra':_0x1826ca});}});_0x864539['on'](_0x3071('0x19'),function(_0x17dbda){_0x52b5fb[_0x3071('0x9')](_0x3071('0x19'),new AGIError(_0x3071('0x1a'),_0x17dbda[_0x3071('0x1b')]));});_0x864539['on'](_0x3071('0x1c'),function(){_0x52b5fb[_0x3071('0x9')]('close',new AGIError(_0x3071('0x1d')));});_0x864539['on'](_0x3071('0x1e'),function(){_0x52b5fb[_0x3071('0x9')]('timeout',new AGIError(_0x3071('0x1f')));_0x864539['destroy']();});_0x864539[_0x3071('0x20')](_0x2c547f);this[_0x3071('0x21')]=function(_0x3762d8,_0x457b57){var _0x3762d8=_0x3762d8||'',_0x457b57=typeof _0x457b57==_0x3071('0x11')?_0x457b57:new Function();_0x33a70c={'tx':_0x3762d8,'rx':'','cb':_0x457b57};_0x864539[_0x3071('0x22')](_0x3762d8+'\x0a');},this['close']=function(){_0x864539['destroy']();};}util[_0x3071('0x23')](AGIChannel,EventEmitter);AGIChannel[_0x3071('0x24')][_0x3071('0x25')]=function(_0x13df9f){return this[_0x3071('0x21')][_0x3071('0x26')](this,_0x13df9f);};AGIChannel[_0x3071('0x24')][_0x3071('0x27')]=function(){return this[_0x3071('0x25')]('ANSWER');};AGIChannel[_0x3071('0x24')][_0x3071('0x28')]=function(_0x177138,_0x4d5c4b,_0x4fb1ca){_0x177138=_0x177138===undefined?_0x3071('0x29'):_0x177138;_0x4d5c4b=_0x4d5c4b===undefined?'5':_0x4d5c4b;_0x4fb1ca=_0x4fb1ca===undefined?'1':_0x4fb1ca;return this[_0x3071('0x25')](util[_0x3071('0x2a')](_0x3071('0x2b'),_0x177138,_0x4d5c4b*0x3e8,_0x4fb1ca));};AGIChannel[_0x3071('0x24')][_0x3071('0x2c')]=function(_0x3921a1){_0x3921a1=_0x3921a1||_0x3071('0x2d');return this[_0x3071('0x25')](util[_0x3071('0x2a')]('VERBOSE\x20\x22%s\x22',_0x3921a1));};AGIChannel['prototype'][_0x3071('0x2e')]=function(_0x149e0d,_0x6ddf96){if(_[_0x3071('0x2f')](_0x6ddf96)){return this[_0x3071('0x25')](util[_0x3071('0x2a')](_0x3071('0x30'),_0x149e0d,_0x6ddf96[_0x3071('0x31')](',')));}return this['sendRequest'](util['format']('EXEC\x20%s\x20%s',_0x149e0d,_0x6ddf96));};AGIChannel[_0x3071('0x24')][_0x3071('0x32')]=function(_0x5b5bf1){return this[_0x3071('0x25')](util[_0x3071('0x2a')](_0x3071('0x33'),_0x5b5bf1));};AGIChannel[_0x3071('0x24')]['setExtension']=function(_0x218a82){return this[_0x3071('0x25')](util[_0x3071('0x2a')](_0x3071('0x34'),_0x218a82));};AGIChannel[_0x3071('0x24')][_0x3071('0x35')]=function(_0x3c55c){return this[_0x3071('0x25')](util['format'](_0x3071('0x36'),_0x3c55c));};AGIChannel['prototype']['hangup']=function(){return this[_0x3071('0x25')](_0x3071('0x37'));};AGIChannel['prototype'][_0x3071('0x38')]=function(_0x46e94e,_0x265d76){var _0x14ac42=_[_0x3071('0x39')](_0x265d76)||_[_0x3071('0x3a')](_0x265d76)?_0x265d76['toString']():_0x265d76;return this[_0x3071('0x25')](util[_0x3071('0x2a')]('SET\x20VARIABLE\x20%s\x20\x22%s\x22',_0x46e94e,_0x14ac42?_0x14ac42[_0x3071('0x3b')]()['replace'](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x3071('0x24')][_0x3071('0x3c')]=function(_0x5733e9,_0x593c99){return this[_0x3071('0x25')](util[_0x3071('0x2a')](_0x3071('0x3d'),_0x5733e9,_0x593c99));};AGIChannel['prototype'][_0x3071('0x3e')]=function(_0x534a77,_0x1ac90a){return this['sendRequest'](util[_0x3071('0x2a')](_0x3071('0x3f'),_0x534a77,_0x1ac90a));};AGIChannel[_0x3071('0x24')][_0x3071('0x40')]=function(_0x30ab68,_0x593c9c){return this['sendRequest'](util[_0x3071('0x2a')](_0x3071('0x41'),_0x30ab68,_0x593c9c));};AGIChannel[_0x3071('0x24')][_0x3071('0x42')]=function(_0x525389,_0x3cfc05,_0x60549a){_0x3cfc05=_0x3cfc05||this[_0x3071('0x43')];_0x60549a=_0x60549a||0x1;this[_0x3071('0x32')](_0x525389);this[_0x3071('0x44')](_0x3cfc05);this[_0x3071('0x35')](_0x60549a);return this['noop'](util[_0x3071('0x2a')]('GOTO\x20%s\x20%s\x20%s',_0x525389,_0x3cfc05,_0x60549a));};AGIChannel['prototype']['getVariable']=function(_0x47ceaf){return this[_0x3071('0x25')](util[_0x3071('0x2a')](_0x3071('0x45'),_0x47ceaf));};AGIChannel[_0x3071('0x24')][_0x3071('0x46')]=function(_0x3a81e9,_0xa711b5,_0x2e6c70,_0x56589e,_0x1e8222,_0x1641d9){_0xa711b5=_0xa711b5||_0x3071('0x47');_0x2e6c70=_0x2e6c70||'';_0x56589e=_0x56589e===undefined?-0x1:_0x56589e==='-1'?-0x1:_0x56589e*0x3e8;_0x1e8222=_0x1e8222===undefined?'':'s='+_0x1e8222;_0x1641d9=_0x1641d9?_0x3071('0x48'):'';return this[_0x3071('0x25')](util['format']('RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s',_0x3a81e9,_0xa711b5,_0x2e6c70,_0x56589e,_0x1641d9,_0x1e8222));};AGIChannel[_0x3071('0x24')][_0x3071('0x49')]=function(_0x1fe5e0,_0x5c5865){_0x5c5865=_0x5c5865||'';return this[_0x3071('0x25')](util['format'](_0x3071('0x4a'),_0x1fe5e0,_0x5c5865));};AGIChannel['prototype'][_0x3071('0x4b')]=function(_0x509178){return this['exec'](_0x3071('0x4c'),_0x509178);};AGIChannel['prototype'][_0x3071('0x4d')]=function(_0x5a0a69){return this[_0x3071('0x2e')](_0x3071('0x4e'),_0x5a0a69);};AGIChannel[_0x3071('0x24')][_0x3071('0x19')]=function(_0x554047,_0x2d70bf){this['noop'](util[_0x3071('0x2a')]('ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s',_0x554047['id'],_0x554047[_0x3071('0x4f')],_0x2d70bf));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x3071('0x50')]=AGIChannel;
\ No newline at end of file
diff --git a/server/services/agi/error.js b/server/services/agi/error.js
index f33120c..6d7d450 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 _0x58f4=['Server\x20closed.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push','format','apply','message','name','exports','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.'];(function(_0x292380,_0x2c9565){var _0x148f5d=function(_0x1b9a10){while(--_0x1b9a10){_0x292380['push'](_0x292380['shift']());}};_0x148f5d(++_0x2c9565);}(_0x58f4,0x1b2));var _0x458f=function(_0x4ce82f,_0x25f046){_0x4ce82f=_0x4ce82f-0x0;var _0x3407f2=_0x58f4[_0x4ce82f];return _0x3407f2;};'use strict';var util=require('util');var error={'E_AGI_UNDEFINED':_0x458f('0x0'),'E_AGI_ARGUMENT_PORT':_0x458f('0x1'),'E_AGI_SERVER_ERROR':_0x458f('0x2'),'E_AGI_SERVER_CLOSE':_0x458f('0x3'),'E_AGI_SERVER_MAXCONNECTION':_0x458f('0x4'),'E_AGI_SERVER_VOICE_DISABLED':_0x458f('0x5'),'E_AGI_SOCKET_ERROR':_0x458f('0x6'),'E_AGI_SOCKET_CLOSE':_0x458f('0x7'),'E_AGI_SOCKET_TIMEOUT':_0x458f('0x8'),'E_AGI_COMMAND_EMPTY':_0x458f('0x9'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0x458f('0xa'),'E_AGI_IVR_ENTRY':_0x458f('0xb')};function AGIError(_0x5a1908){var _0x5a1908=_0x5a1908||null,_0x5ad8b4=_0x5ad8b4||[],_0x4cd15f=0x1,_0x2a5c36='';if(!error[_0x5a1908]){_0x5a1908=_0x458f('0xc');}_0x5ad8b4['push'](error[_0x5a1908]);while(arguments[_0x4cd15f]){_0x5ad8b4[_0x458f('0xd')](arguments[_0x4cd15f]);_0x4cd15f++;}_0x2a5c36=util[_0x458f('0xe')][_0x458f('0xf')](util,_0x5ad8b4);this[_0x458f('0x10')]=_0x2a5c36;this[_0x458f('0x11')]=_0x5a1908;}module[_0x458f('0x12')]=AGIError;
\ No newline at end of file
+var _0x33ed=['E_AGI_UNDEFINED','push','format','apply','name','exports','Undefined\x20error.','Server\x20closed.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.','Missing\x20\x27ivr.entry\x27\x20menu.'];(function(_0x3611a7,_0x59563c){var _0x569692=function(_0x5bbdc7){while(--_0x5bbdc7){_0x3611a7['push'](_0x3611a7['shift']());}};_0x569692(++_0x59563c);}(_0x33ed,0x66));var _0xd33e=function(_0x4536a4,_0x55af7b){_0x4536a4=_0x4536a4-0x0;var _0x4fd1c1=_0x33ed[_0x4536a4];return _0x4fd1c1;};'use strict';var util=require('util');var error={'E_AGI_UNDEFINED':_0xd33e('0x0'),'E_AGI_ARGUMENT_PORT':'Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','E_AGI_SERVER_ERROR':'Server\x20error.\x20Code:\x20%s.','E_AGI_SERVER_CLOSE':_0xd33e('0x1'),'E_AGI_SERVER_MAXCONNECTION':'[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','E_AGI_SERVER_VOICE_DISABLED':'[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','E_AGI_SOCKET_ERROR':_0xd33e('0x2'),'E_AGI_SOCKET_CLOSE':_0xd33e('0x3'),'E_AGI_SOCKET_TIMEOUT':_0xd33e('0x4'),'E_AGI_COMMAND_EMPTY':'Empty\x20command.','E_AGI_IVR_AGI_NETWORK_SCRIPT':'Missing\x20\x27ivr.agi_network_script\x27.','E_AGI_IVR_ENTRY':_0xd33e('0x5')};function AGIError(_0x230ec8){var _0x230ec8=_0x230ec8||null,_0x8cc24b=_0x8cc24b||[],_0x32c230=0x1,_0x3baad9='';if(!error[_0x230ec8]){_0x230ec8=_0xd33e('0x6');}_0x8cc24b[_0xd33e('0x7')](error[_0x230ec8]);while(arguments[_0x32c230]){_0x8cc24b[_0xd33e('0x7')](arguments[_0x32c230]);_0x32c230++;}_0x3baad9=util[_0xd33e('0x8')][_0xd33e('0x9')](util,_0x8cc24b);this['message']=_0x3baad9;this[_0xd33e('0xa')]=_0x230ec8;}module[_0xd33e('0xb')]=AGIError;
\ No newline at end of file
diff --git a/server/services/agi/graph/index.js b/server/services/agi/graph/index.js
index 6a9f986..b663097 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 _0x24cf=['target','invalid','default\x20on\x20switch\x20not\x20found','max\x20retry\x20reach','exports','agi','menu','getdigits','getsecretdigits','vertices','numberOfEdges','prototype','addVertex','addEdge','edges','push','size','relations','getVertex','traverseBFS','no\x20vertex\x20found','info','stop\x20traverse','length','condition','split','agicommand','vswitch','default'];(function(_0x149033,_0x4fbd54){var _0x1fb5c7=function(_0x7dc3f5){while(--_0x7dc3f5){_0x149033['push'](_0x149033['shift']());}};_0x1fb5c7(++_0x4fbd54);}(_0x24cf,0x1d5));var _0xf24c=function(_0x114e29,_0x16b323){_0x114e29=_0x114e29-0x0;var _0x12d649=_0x24cf[_0x114e29];return _0x12d649;};'use strict';var _=require('lodash');var logger=require('../../../config/logger')(_0xf24c('0x0'));var verticesWithRetry=[_0xf24c('0x1'),_0xf24c('0x2'),_0xf24c('0x3')];var Graph=function(){this[_0xf24c('0x4')]={};this['edges']={};this[_0xf24c('0x5')]=0x0;};Graph[_0xf24c('0x6')][_0xf24c('0x7')]=function(_0x10c351){this['vertices'][_0x10c351['id']]=_0x10c351;this['edges'][_0x10c351['id']]=[];};Graph['prototype'][_0xf24c('0x8')]=function(_0x596e81,_0x3b7cf1,_0x13163e){this[_0xf24c('0x9')][_0x596e81][_0xf24c('0xa')]({'target':_0x3b7cf1,'condition':_0x13163e});this['numberOfEdges']+=0x1;};Graph[_0xf24c('0x6')][_0xf24c('0xb')]=function(){return _[_0xf24c('0xb')](this[_0xf24c('0x4')]);};Graph[_0xf24c('0x6')][_0xf24c('0xc')]=function(){return this['numberOfEdges'];};Graph[_0xf24c('0x6')][_0xf24c('0xd')]=function(_0x233ee8){return this['vertices'][_0x233ee8];};Graph[_0xf24c('0x6')][_0xf24c('0xe')]=function(_0x57edfa,_0x5a0bbf){if(!this[_0xf24c('0x4')][_0x57edfa]){return logger['info'](_0xf24c('0xf'));}var _0x2fd9a8=_0x5a0bbf(this['vertices'][_0x57edfa]);if(!_0x2fd9a8){return logger[_0xf24c('0x10')](_0xf24c('0x11'));}if(this[_0xf24c('0x9')][_0x57edfa][_0xf24c('0x12')]===0x0){return logger[_0xf24c('0x10')]('no\x20edge/s\x20available');}for(var _0x5c46a5=0x0,_0x32787d=[],_0x462801=![];_0x5c46a5\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','calleridname','callerid','dnid','uniqueid','info','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','mxGraphModel','agicommand','hasOwnProperty','retry','maxRetry','addVertex','omit','mxCell','isArray','length','source','target','addEdge','value','getSquareProject','createSquareReport','agi_','substring','inspect','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','close','timeout','evtHangup','hangup','production','start','root','joinAt','YYYY-MM-DD\x20HH:mm:ss','traverseBFS','clear','vertex','gotoc','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','code','response','isUndefined','result','toString','agicommand\x20not\x20found','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','finally','[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','getLicense','then','voice','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20CHANNELS:\x20UNLIMITED','catch','connection','xml2json','syncho','util','moment','../../config/logger'];(function(_0x42ef7b,_0x47a064){var _0x4b3064=function(_0x4cc748){while(--_0x4cc748){_0x42ef7b['push'](_0x42ef7b['shift']());}};_0x4b3064(++_0x47a064);}(_0xbeea,0xb1));var _0xabee=function(_0xc30635,_0x2273d5){_0xc30635=_0xc30635-0x0;var _0x15a09b=_0xbeea[_0xc30635];return _0x15a09b;};'use strict';var parser=require(_0xabee('0x0'));var _=require('lodash');var syncho=require(_0xabee('0x1'));var util=require(_0xabee('0x2'));var moment=require(_0xabee('0x3'));var config=require('../../config/environment');var logger=require(_0xabee('0x4'))('agi');var utilLicense=require(_0xabee('0x5'));var rpc=require(_0xabee('0x6'));var mailRpc=require(_0xabee('0x7'));var Graph=require(_0xabee('0x8'));var Vertices=require(_0xabee('0x9'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config['agi']=_['defaults'](config[_0xabee('0xa')],{'ip':_0xabee('0xb'),'port':0x11dd});function connectionHandler(_0x4a2999){process[_0xabee('0xc')](function(){syncho(function(){try{setChannelVariables(_0x4a2999);agiHandler(_0x4a2999);}catch(_0x507deb){logger[_0xabee('0xd')](_0x507deb[_0xabee('0xe')]);}});});}function listeningHandler(){console[_0xabee('0xf')](_0xabee('0x10'),config[_0xabee('0xa')][_0xabee('0x11')]);logger['info'](util[_0xabee('0x12')](_0xabee('0x13'),config[_0xabee('0xa')]['ip'],config['agi'][_0xabee('0x11')]));}function errorHandler(_0x168202){if(_0x168202&&_0x168202[_0xabee('0x14')]&&_0x168202['message']){logger['error'](util['format']('[%s]\x20%s',_0x168202['name'],_0x168202[_0xabee('0x15')]));}else{logger[_0xabee('0xd')](util[_0xabee('0x12')](_0xabee('0x16'),_0x168202[_0xabee('0xe')]));}}function closeHandler(){logger['info'](util[_0xabee('0x12')](_0xabee('0x17'),this[_0xabee('0x18')],this[_0xabee('0x19')],this[_0xabee('0x1a')],this[_0xabee('0x1b')],this[_0xabee('0x1c')]));try{createSquareReport(this);}catch(_0x5a9562){logger[_0xabee('0xd')](_0x5a9562[_0xabee('0xe')]);}}function timeoutHandler(){logger[_0xabee('0x1d')](util[_0xabee('0x12')](_0xabee('0x1e'),this[_0xabee('0x18')],this['calleridname'],this['callerid'],this[_0xabee('0x1b')],this['uniqueid']));}function hangupHandler(){logger['info'](util[_0xabee('0x12')](_0xabee('0x1f'),this[_0xabee('0x18')],this[_0xabee('0x19')],this[_0xabee('0x1a')],this['dnid'],this[_0xabee('0x1c')]));this['evtHangup']=!![];}function getRoot(_0x4f5501){return parser['toJson'](_0x4f5501,{'object':!![]})[_0xabee('0x20')]['root'];}function addVertex(_0x870569,_0x2834e3,_0x520bc){_0x2834e3[_0xabee('0x21')]=_0x520bc;if(_0x2834e3[_0xabee('0x22')](_0xabee('0x23'))){_0x2834e3[_0xabee('0x24')]=parseInt(_0x2834e3['retry'],0xa);}_0x870569[_0xabee('0x25')](_[_0xabee('0x26')](_0x2834e3,_0xabee('0x27')));}function initGraph(_0x21e4fd,_0x4ae65e){var _0x2aa470=new Graph();for(var _0x123d58 in _0x21e4fd){if(_0x21e4fd['hasOwnProperty'](_0x123d58)){if(_[_0xabee('0x28')](_0x21e4fd[_0x123d58])){for(var _0x232144=0x0;_0x232144<_0x21e4fd[_0x123d58][_0xabee('0x29')];_0x232144+=0x1){addVertex(_0x2aa470,_0x21e4fd[_0x123d58][_0x232144],_0x123d58);}}else{addVertex(_0x2aa470,_0x21e4fd[_0x123d58],_0x123d58);}}}for(var _0x26a5d1=0x0;_0x26a5d1<_0x4ae65e['length'];_0x26a5d1+=0x1){if(_0x4ae65e[_0x26a5d1][_0xabee('0x2a')]&&_0x4ae65e[_0x26a5d1][_0xabee('0x2b')]){_0x2aa470[_0xabee('0x2c')](_0x4ae65e[_0x26a5d1][_0xabee('0x2a')],_0x4ae65e[_0x26a5d1][_0xabee('0x2b')],_0x4ae65e[_0x26a5d1][_0xabee('0x2d')]);}}return _0x2aa470;}function getSquareProject(_0x3df00d,_0x42368d){rpc[_0xabee('0x2e')](_0x3df00d)['then'](function(_0x2a2441){_0x42368d(null,_0x2a2441);})['catch'](function(_0x1afe17){_0x42368d(null,_0x1afe17);});}function createSquareReport(_0x1ebc01,_0xe0b7bd){rpc[_0xabee('0x2f')](_0x1ebc01)['then'](function(_0x297180){if(_0xe0b7bd){_0xe0b7bd(null,_0x297180);}})['catch'](function(_0x4098ec){if(_0xe0b7bd){_0xe0b7bd(null,_0x4098ec);}});}function setChannelVariables(_0x525e85){for(var _0x123a34 in _0x525e85){if(_0x525e85['hasOwnProperty'](_0x123a34)){if(_0x123a34['indexOf'](_0xabee('0x30'))===0x0){_0x525e85[_0x123a34[_0xabee('0x31')](0x4)]=_0x525e85[_0x123a34];delete _0x525e85[_0x123a34];}}}}function getLogFromObject(_0x3c839e){return util[_0xabee('0x32')](_0x3c839e,{'showHidden':![],'depth':null});}function agiHandler(_0x42e434){var _0xaefbc3,_0x199929,_0x2a67fb,_0x55a27b,_0x261bfb;logger[_0xabee('0x33')](_0xabee('0x34'),JSON[_0xabee('0x35')](_0x42e434,null,0x2));logger[_0xabee('0x1d')](util[_0xabee('0x12')](_0xabee('0x36'),_0x42e434[_0xabee('0x18')],_0x42e434[_0xabee('0x19')],_0x42e434[_0xabee('0x1a')],_0x42e434[_0xabee('0x1b')],_0x42e434[_0xabee('0x1c')]));_0x42e434['on'](_0xabee('0xd'),errorHandler);_0x42e434['on'](_0xabee('0x37'),closeHandler);_0x42e434['on'](_0xabee('0x38'),timeoutHandler);_0x42e434[_0xabee('0x39')]=![];_0x42e434['on'](_0xabee('0x3a'),hangupHandler);var _0x491279=getSquareProject['sync'](null,_0x42e434[_0xabee('0x18')]);if(_0x491279){if(_0x491279[_0xabee('0x3b')]){_0xaefbc3=getRoot(_0x491279[_0xabee('0x3b')]);if(_0xaefbc3&&_0xaefbc3[_0xabee('0x3c')]){logger['debug'](_0xabee('0x3d'),JSON[_0xabee('0x35')](_0xaefbc3,null,0x2));_0x42e434[_0xabee('0x3e')]=moment()['format'](_0xabee('0x3f'));_0x199929=initGraph(_['omit'](_0xaefbc3,_0xabee('0x27')),_0xaefbc3[_0xabee('0x27')]);_0x2a67fb=new Vertices(_0x42e434,rpc,mailRpc);logger[_0xabee('0x1d')](util[_0xabee('0x12')]('[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x42e434['arg_1'],_0x42e434[_0xabee('0x19')],_0x42e434[_0xabee('0x1a')],_0x42e434[_0xabee('0x1b')],_0x42e434[_0xabee('0x1c')]));_0x199929[_0xabee('0x40')](_0xaefbc3['start']['id'],function(_0x229b00){try{_0x229b00=_0x2a67fb[_0xabee('0x41')](_0x229b00);logger['debug'](_0xabee('0x42'),JSON[_0xabee('0x35')](_0x229b00,null,0x2));if(_0x229b00['agicommand']===_0xabee('0x43')){logger[_0xabee('0x1d')](_0xabee('0x44'));_0x42e434[_0xabee('0x45')]=_0x229b00[_0xabee('0x45')]||_0x42e434[_0xabee('0x45')];_0x42e434[_0xabee('0x46')]=_0x229b00['extension'];_0x42e434[_0xabee('0x47')]=_0x229b00[_0xabee('0x47')]?_0x229b00[_0xabee('0x47')]-0x1:0x1;return null;}else if(_0x229b00&&_0x2a67fb[_0x229b00['agicommand']]){_0x261bfb=_0x2a67fb[_0x229b00[_0xabee('0x21')]](_0x229b00);logger[_0xabee('0x1d')]('response',JSON[_0xabee('0x35')](_0x261bfb,null,0x2));if(_0x261bfb&&_0x261bfb[_0xabee('0x48')]===AGI_CODE_SUCCESS&&_0x261bfb['result']!==AGI_RESULT_ERROR&&!_0x42e434[_0xabee('0x39')]){logger[_0xabee('0x33')](_0xabee('0x49'),getLogFromObject(_0x261bfb));return _[_0xabee('0x4a')](_0x261bfb[_0xabee('0x4b')])?null:_0x261bfb[_0xabee('0x4b')][_0xabee('0x4c')]();}else{logger['error'](_0xabee('0x49'),getLogFromObject(_0x261bfb));return null;}}else{logger[_0xabee('0xd')](_0xabee('0x4d'));return null;}}catch(_0x5e1879){logger[_0xabee('0xd')](_0x5e1879[_0xabee('0xe')]);return null;}});if(_0xaefbc3['finally']){logger['info'](util['format'](_0xabee('0x4e'),_0x42e434[_0xabee('0x18')],_0x42e434['calleridname'],_0x42e434['callerid'],_0x42e434[_0xabee('0x1b')],_0x42e434[_0xabee('0x1c')]));_0x199929[_0xabee('0x40')](_0xaefbc3[_0xabee('0x4f')]['id'],function(_0x184058){try{_0x184058=_0x2a67fb[_0xabee('0x41')](_0x184058);logger[_0xabee('0x33')](_0xabee('0x42'),JSON[_0xabee('0x35')](_0x184058,null,0x2));if(_0x184058&&_0x2a67fb[_0x184058[_0xabee('0x21')]]){_0x261bfb=_0x2a67fb[_0x184058[_0xabee('0x21')]](_0x184058);if(_0x261bfb){logger[_0xabee('0x33')](_0xabee('0x49'),getLogFromObject(_0x261bfb));return _[_0xabee('0x4a')](_0x261bfb[_0xabee('0x4b')])?null:_0x261bfb[_0xabee('0x4b')][_0xabee('0x4c')]();}else{logger[_0xabee('0xd')]('response',getLogFromObject(_0x261bfb));return null;}}else{logger[_0xabee('0xd')](_0xabee('0x4d'));return null;}}catch(_0x4bee06){logger['error'](_0x4bee06[_0xabee('0xe')]);return null;}});}logger[_0xabee('0x1d')](util[_0xabee('0x12')](_0xabee('0x50'),_0x42e434[_0xabee('0x18')],_0x42e434[_0xabee('0x19')],_0x42e434[_0xabee('0x1a')],_0x42e434['dnid'],_0x42e434[_0xabee('0x1c')]));logger['info'](util[_0xabee('0x12')](_0xabee('0x51'),_0x42e434['context'],_0x42e434[_0xabee('0x46')],parseInt(_0x42e434[_0xabee('0x47')],0xa)+0x1));_0x42e434[_0xabee('0x52')](_0x42e434['context'],_0x42e434[_0xabee('0x46')],parseInt(_0x42e434['priority'],0xa)+0x1);_0x42e434[_0xabee('0x37')]();}}else{logger[_0xabee('0xd')](util[_0xabee('0x12')]('Project\x20%s\x20not\x20published',_0x42e434[_0xabee('0x18')]));_0x42e434[_0xabee('0x52')](_0x42e434[_0xabee('0x45')],_0x42e434['extension'],parseInt(_0x42e434[_0xabee('0x47')],0xa)+0x1);_0x42e434[_0xabee('0x37')]();}}else{logger[_0xabee('0xd')](util[_0xabee('0x12')]('Project\x20%s\x20not\x20found',_0x42e434[_0xabee('0x18')]));_0x42e434[_0xabee('0x52')](_0x42e434[_0xabee('0x45')],_0x42e434['extension'],parseInt(_0x42e434[_0xabee('0x47')],0xa)+0x1);_0x42e434[_0xabee('0x37')]();}}function main(){var _0x92baa3;return utilLicense[_0xabee('0x53')]()[_0xabee('0x54')](function(_0x105130){if(_0x105130){if(_0x105130[_0xabee('0x55')]){if(_0x105130[_0xabee('0x56')]&&_0x105130[_0xabee('0x56')]>0x0){logger['info'](util['format'](_0xabee('0x57'),_0x105130[_0xabee('0x56')]));_0x92baa3=_0x105130[_0xabee('0x56')];}else{logger[_0xabee('0x1d')](_0xabee('0x58'));}}else{logger[_0xabee('0x1d')]('[LICENSE]\x20VOICE\x20IS\x20DISABLED');_0x92baa3=-0x1;}}})[_0xabee('0x59')](function(_0x269fed){logger[_0xabee('0xd')]('[LICENSE]',_0x269fed['stack']);})[_0xabee('0x4f')](function(){var _0x4b1448=require('./server')(config['agi'][_0xabee('0x11')],config['agi']['ip'],_0x92baa3);_0x4b1448['on'](_0xabee('0xd'),errorHandler);_0x4b1448['on']('listening',listeningHandler);_0x4b1448['on'](_0xabee('0x5a'),connectionHandler);_0x4b1448['on']('close',closeHandler);});}main();
\ No newline at end of file
+var _0x60c2=['retry','addVertex','omit','isArray','length','target','addEdge','source','then','catch','createSquareReport','substring','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','production','start','debug','joinAt','YYYY-MM-DD\x20HH:mm:ss','mxCell','traverseBFS','clear','vertex','gotoc','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','code','result','evtHangup','isUndefined','toString','agicommand\x20not\x20found','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[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]\x20VOICE\x20IS\x20DISABLED','[LICENSE]','./server','listening','connection','lodash','syncho','util','moment','../../config/environment','../../config/logger','agi','../../config/license/util','./rpc','./mailRpc','./graph','./vertices','defaults','127.0.0.1','error','stack','log','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','port','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name','[%s]\x20%s','message','info','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','callerid','dnid','uniqueid','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','toJson','mxGraphModel','root','agicommand','hasOwnProperty','maxRetry'];(function(_0x47a802,_0x424bf1){var _0xb3badc=function(_0x5f44d3){while(--_0x5f44d3){_0x47a802['push'](_0x47a802['shift']());}};_0xb3badc(++_0x424bf1);}(_0x60c2,0x8f));var _0x260c=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x60c2[_0x432682];return _0x463d05;};'use strict';var parser=require('xml2json');var _=require(_0x260c('0x0'));var syncho=require(_0x260c('0x1'));var util=require(_0x260c('0x2'));var moment=require(_0x260c('0x3'));var config=require(_0x260c('0x4'));var logger=require(_0x260c('0x5'))(_0x260c('0x6'));var utilLicense=require(_0x260c('0x7'));var rpc=require(_0x260c('0x8'));var mailRpc=require(_0x260c('0x9'));var Graph=require(_0x260c('0xa'));var Vertices=require(_0x260c('0xb'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config['agi']=_[_0x260c('0xc')](config[_0x260c('0x6')],{'ip':_0x260c('0xd'),'port':0x11dd});function connectionHandler(_0xf22c37){process['nextTick'](function(){syncho(function(){try{setChannelVariables(_0xf22c37);agiHandler(_0xf22c37);}catch(_0xb36958){logger[_0x260c('0xe')](_0xb36958[_0x260c('0xf')]);}});});}function listeningHandler(){console[_0x260c('0x10')](_0x260c('0x11'),config[_0x260c('0x6')][_0x260c('0x12')]);logger['info'](util[_0x260c('0x13')](_0x260c('0x14'),config[_0x260c('0x6')]['ip'],config['agi'][_0x260c('0x12')]));}function errorHandler(_0x1d4f43){if(_0x1d4f43&&_0x1d4f43[_0x260c('0x15')]&&_0x1d4f43['message']){logger[_0x260c('0xe')](util[_0x260c('0x13')](_0x260c('0x16'),_0x1d4f43[_0x260c('0x15')],_0x1d4f43[_0x260c('0x17')]));}else{logger['error'](util[_0x260c('0x13')]('[ERROR]\x20%s',_0x1d4f43[_0x260c('0xf')]));}}function closeHandler(){logger[_0x260c('0x18')](util['format'](_0x260c('0x19'),this['arg_1'],this[_0x260c('0x1a')],this[_0x260c('0x1b')],this[_0x260c('0x1c')],this[_0x260c('0x1d')]));try{createSquareReport(this);}catch(_0x2bf3b8){logger[_0x260c('0xe')](_0x2bf3b8[_0x260c('0xf')]);}}function timeoutHandler(){logger[_0x260c('0x18')](util[_0x260c('0x13')](_0x260c('0x1e'),this[_0x260c('0x1f')],this['calleridname'],this[_0x260c('0x1b')],this['dnid'],this[_0x260c('0x1d')]));}function hangupHandler(){logger[_0x260c('0x18')](util['format'](_0x260c('0x20'),this[_0x260c('0x1f')],this[_0x260c('0x1a')],this[_0x260c('0x1b')],this[_0x260c('0x1c')],this[_0x260c('0x1d')]));this['evtHangup']=!![];}function getRoot(_0xd5b7d8){return parser[_0x260c('0x21')](_0xd5b7d8,{'object':!![]})[_0x260c('0x22')][_0x260c('0x23')];}function addVertex(_0x58688c,_0x3f299f,_0x304961){_0x3f299f[_0x260c('0x24')]=_0x304961;if(_0x3f299f[_0x260c('0x25')]('retry')){_0x3f299f[_0x260c('0x26')]=parseInt(_0x3f299f[_0x260c('0x27')],0xa);}_0x58688c[_0x260c('0x28')](_[_0x260c('0x29')](_0x3f299f,'mxCell'));}function initGraph(_0xc4280e,_0x2957e5){var _0x480179=new Graph();for(var _0x5def72 in _0xc4280e){if(_0xc4280e[_0x260c('0x25')](_0x5def72)){if(_[_0x260c('0x2a')](_0xc4280e[_0x5def72])){for(var _0x43a894=0x0;_0x43a894<_0xc4280e[_0x5def72][_0x260c('0x2b')];_0x43a894+=0x1){addVertex(_0x480179,_0xc4280e[_0x5def72][_0x43a894],_0x5def72);}}else{addVertex(_0x480179,_0xc4280e[_0x5def72],_0x5def72);}}}for(var _0x357790=0x0;_0x357790<_0x2957e5[_0x260c('0x2b')];_0x357790+=0x1){if(_0x2957e5[_0x357790]['source']&&_0x2957e5[_0x357790][_0x260c('0x2c')]){_0x480179[_0x260c('0x2d')](_0x2957e5[_0x357790][_0x260c('0x2e')],_0x2957e5[_0x357790][_0x260c('0x2c')],_0x2957e5[_0x357790]['value']);}}return _0x480179;}function getSquareProject(_0xc6868a,_0x3c33d6){rpc['getSquareProject'](_0xc6868a)[_0x260c('0x2f')](function(_0xcb8c28){_0x3c33d6(null,_0xcb8c28);})[_0x260c('0x30')](function(_0x157883){_0x3c33d6(null,_0x157883);});}function createSquareReport(_0x414580,_0x23d71a){rpc[_0x260c('0x31')](_0x414580)[_0x260c('0x2f')](function(_0x5e49c6){if(_0x23d71a){_0x23d71a(null,_0x5e49c6);}})[_0x260c('0x30')](function(_0x2dccb3){if(_0x23d71a){_0x23d71a(null,_0x2dccb3);}});}function setChannelVariables(_0x5ebf4c){for(var _0x18c952 in _0x5ebf4c){if(_0x5ebf4c['hasOwnProperty'](_0x18c952)){if(_0x18c952['indexOf']('agi_')===0x0){_0x5ebf4c[_0x18c952[_0x260c('0x32')](0x4)]=_0x5ebf4c[_0x18c952];delete _0x5ebf4c[_0x18c952];}}}}function getLogFromObject(_0x455b6c){return util['inspect'](_0x455b6c,{'showHidden':![],'depth':null});}function agiHandler(_0x329279){var _0x2b3cd9,_0x35e4a8,_0x2477b1,_0x46d3e0,_0x141bb2;logger['debug'](_0x260c('0x33'),JSON[_0x260c('0x34')](_0x329279,null,0x2));logger[_0x260c('0x18')](util[_0x260c('0x13')](_0x260c('0x35'),_0x329279[_0x260c('0x1f')],_0x329279[_0x260c('0x1a')],_0x329279[_0x260c('0x1b')],_0x329279[_0x260c('0x1c')],_0x329279['uniqueid']));_0x329279['on'](_0x260c('0xe'),errorHandler);_0x329279['on']('close',closeHandler);_0x329279['on']('timeout',timeoutHandler);_0x329279['evtHangup']=![];_0x329279['on']('hangup',hangupHandler);var _0x4e2c9f=getSquareProject['sync'](null,_0x329279['arg_1']);if(_0x4e2c9f){if(_0x4e2c9f[_0x260c('0x36')]){_0x2b3cd9=getRoot(_0x4e2c9f[_0x260c('0x36')]);if(_0x2b3cd9&&_0x2b3cd9[_0x260c('0x37')]){logger[_0x260c('0x38')]('root',JSON[_0x260c('0x34')](_0x2b3cd9,null,0x2));_0x329279[_0x260c('0x39')]=moment()['format'](_0x260c('0x3a'));_0x35e4a8=initGraph(_[_0x260c('0x29')](_0x2b3cd9,_0x260c('0x3b')),_0x2b3cd9[_0x260c('0x3b')]);_0x2477b1=new Vertices(_0x329279,rpc,mailRpc);logger[_0x260c('0x18')](util['format']('[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x329279[_0x260c('0x1f')],_0x329279[_0x260c('0x1a')],_0x329279[_0x260c('0x1b')],_0x329279[_0x260c('0x1c')],_0x329279['uniqueid']));_0x35e4a8[_0x260c('0x3c')](_0x2b3cd9[_0x260c('0x37')]['id'],function(_0x265bd8){try{_0x265bd8=_0x2477b1[_0x260c('0x3d')](_0x265bd8);logger[_0x260c('0x38')](_0x260c('0x3e'),JSON[_0x260c('0x34')](_0x265bd8,null,0x2));if(_0x265bd8[_0x260c('0x24')]===_0x260c('0x3f')){logger[_0x260c('0x18')](_0x260c('0x40'));_0x329279[_0x260c('0x41')]=_0x265bd8[_0x260c('0x41')]||_0x329279['context'];_0x329279['extension']=_0x265bd8[_0x260c('0x42')];_0x329279[_0x260c('0x43')]=_0x265bd8[_0x260c('0x43')]?_0x265bd8['priority']-0x1:0x1;return null;}else if(_0x265bd8&&_0x2477b1[_0x265bd8[_0x260c('0x24')]]){_0x141bb2=_0x2477b1[_0x265bd8['agicommand']](_0x265bd8);logger['info'](_0x260c('0x44'),JSON['stringify'](_0x141bb2,null,0x2));if(_0x141bb2&&_0x141bb2[_0x260c('0x45')]===AGI_CODE_SUCCESS&&_0x141bb2[_0x260c('0x46')]!==AGI_RESULT_ERROR&&!_0x329279[_0x260c('0x47')]){logger[_0x260c('0x38')]('response',getLogFromObject(_0x141bb2));return _[_0x260c('0x48')](_0x141bb2[_0x260c('0x46')])?null:_0x141bb2['result'][_0x260c('0x49')]();}else{logger['error'](_0x260c('0x44'),getLogFromObject(_0x141bb2));return null;}}else{logger[_0x260c('0xe')](_0x260c('0x4a'));return null;}}catch(_0x5f40a7){logger[_0x260c('0xe')](_0x5f40a7[_0x260c('0xf')]);return null;}});if(_0x2b3cd9[_0x260c('0x4b')]){logger[_0x260c('0x18')](util[_0x260c('0x13')](_0x260c('0x4c'),_0x329279[_0x260c('0x1f')],_0x329279[_0x260c('0x1a')],_0x329279[_0x260c('0x1b')],_0x329279[_0x260c('0x1c')],_0x329279[_0x260c('0x1d')]));_0x35e4a8[_0x260c('0x3c')](_0x2b3cd9['finally']['id'],function(_0x558563){try{_0x558563=_0x2477b1[_0x260c('0x3d')](_0x558563);logger[_0x260c('0x38')](_0x260c('0x3e'),JSON[_0x260c('0x34')](_0x558563,null,0x2));if(_0x558563&&_0x2477b1[_0x558563['agicommand']]){_0x141bb2=_0x2477b1[_0x558563[_0x260c('0x24')]](_0x558563);if(_0x141bb2){logger[_0x260c('0x38')](_0x260c('0x44'),getLogFromObject(_0x141bb2));return _[_0x260c('0x48')](_0x141bb2[_0x260c('0x46')])?null:_0x141bb2[_0x260c('0x46')][_0x260c('0x49')]();}else{logger[_0x260c('0xe')](_0x260c('0x44'),getLogFromObject(_0x141bb2));return null;}}else{logger['error'](_0x260c('0x4a'));return null;}}catch(_0x9ef48e){logger['error'](_0x9ef48e[_0x260c('0xf')]);return null;}});}logger['info'](util[_0x260c('0x13')]('[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x329279['arg_1'],_0x329279[_0x260c('0x1a')],_0x329279[_0x260c('0x1b')],_0x329279[_0x260c('0x1c')],_0x329279[_0x260c('0x1d')]));logger[_0x260c('0x18')](util[_0x260c('0x13')](_0x260c('0x4d'),_0x329279['context'],_0x329279[_0x260c('0x42')],parseInt(_0x329279['priority'],0xa)+0x1));_0x329279[_0x260c('0x4e')](_0x329279[_0x260c('0x41')],_0x329279[_0x260c('0x42')],parseInt(_0x329279[_0x260c('0x43')],0xa)+0x1);_0x329279[_0x260c('0x4f')]();}}else{logger[_0x260c('0xe')](util[_0x260c('0x13')](_0x260c('0x50'),_0x329279['arg_1']));_0x329279[_0x260c('0x4e')](_0x329279[_0x260c('0x41')],_0x329279[_0x260c('0x42')],parseInt(_0x329279[_0x260c('0x43')],0xa)+0x1);_0x329279['close']();}}else{logger[_0x260c('0xe')](util['format'](_0x260c('0x51'),_0x329279['arg_1']));_0x329279['continueAt'](_0x329279[_0x260c('0x41')],_0x329279['extension'],parseInt(_0x329279[_0x260c('0x43')],0xa)+0x1);_0x329279['close']();}}function main(){var _0xe22dbf;return utilLicense[_0x260c('0x52')]()[_0x260c('0x2f')](function(_0x1bed1f){if(_0x1bed1f){if(_0x1bed1f[_0x260c('0x53')]){if(_0x1bed1f[_0x260c('0x54')]&&_0x1bed1f[_0x260c('0x54')]>0x0){logger[_0x260c('0x18')](util[_0x260c('0x13')](_0x260c('0x55'),_0x1bed1f['callysquare']));_0xe22dbf=_0x1bed1f['callysquare'];}else{logger['info']('[LICENSE]\x20CHANNELS:\x20UNLIMITED');}}else{logger[_0x260c('0x18')](_0x260c('0x56'));_0xe22dbf=-0x1;}}})[_0x260c('0x30')](function(_0x3d7e49){logger[_0x260c('0xe')](_0x260c('0x57'),_0x3d7e49[_0x260c('0xf')]);})['finally'](function(){var _0x2fff3f=require(_0x260c('0x58'))(config['agi'][_0x260c('0x12')],config[_0x260c('0x6')]['ip'],_0xe22dbf);_0x2fff3f['on'](_0x260c('0xe'),errorHandler);_0x2fff3f['on'](_0x260c('0x59'),listeningHandler);_0x2fff3f['on'](_0x260c('0x5a'),connectionHandler);_0x2fff3f['on'](_0x260c('0x4f'),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 0cee66a..4ace8b1 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 _0x9957=['result','catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','request','error','message'];(function(_0x14e3f1,_0x37786e){var _0x3c100c=function(_0x178da9){while(--_0x178da9){_0x14e3f1['push'](_0x14e3f1['shift']());}};_0x3c100c(++_0x37786e);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'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
+var _0x34e8=['catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','request','then','error','message'];(function(_0x30a432,_0x161b44){var _0x548de3=function(_0x346d41){while(--_0x346d41){_0x30a432['push'](_0x30a432['shift']());}};_0x548de3(++_0x161b44);}(_0x34e8,0x12c));var _0x834e=function(_0x411b85,_0x294ed2){_0x411b85=_0x411b85-0x0;var _0x506696=_0x34e8[_0x411b85];return _0x506696;};'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
diff --git a/server/services/agi/reply.js b/server/services/agi/reply.js
index df2fe38..ce9f1be 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(_0x3d73ae,_0x23c679){var _0x1fd52e=function(_0x44d9a6){while(--_0x44d9a6){_0x3d73ae['push'](_0x3d73ae['shift']());}};_0x1fd52e(++_0x23c679);}(_0x7a54,0x106));var _0x47a5=function(_0x3d5ca6,_0x35dc50){_0x3d5ca6=_0x3d5ca6-0x0;var _0x267bd9=_0x7a54[_0x3d5ca6];return _0x267bd9;};'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(_0x52f4d6,_0x2f4818){var _0xaa4059=function(_0x1ecfb3){while(--_0x1ecfb3){_0x52f4d6['push'](_0x52f4d6['shift']());}};_0xaa4059(++_0x2f4818);}(_0x5f2f,0x73));var _0xf5f2=function(_0x3bb403,_0x44ad62){_0x3bb403=_0x3bb403-0x0;var _0x3b45=_0x5f2f[_0x3bb403];return _0x3b45;};'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 d048d63..de7c466 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 _0xf2f3=['CreateSmsMessage','CreateSquareDetailsReport','CreateSquareReport','merge','arg_1','arg_2','format','createSquareRecording','createSquareMessage','CreateSquareMessage','ListId','CreateCmContact','getPauseById','agentLogin','LoginUser','agentPause','agentUnpause','UnpauseUser','LogoutUser','moment','lodash','util','client','http','request','then','error','message','result','catch','getSquareProject','ShowSquareProject','production','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','email','getSquareProjectById','name','ShowVoiceQueue','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','getTrunkById','ShowTrunk','getSoundById','save_name','getIntervalById','Interval','getSmsAccountById','ShowSmsAccount','createSmsMessage'];(function(_0x3f0b30,_0x159bc8){var _0x2748a5=function(_0x3b42cc){while(--_0x3b42cc){_0x3f0b30['push'](_0x3f0b30['shift']());}};_0x2748a5(++_0x159bc8);}(_0xf2f3,0x15d));var _0x3f2f=function(_0x5130e1,_0x5c9a45){_0x5130e1=_0x5130e1-0x0;var _0x1e9e35=_0xf2f3[_0x5130e1];return _0x1e9e35;};'use strict';var BPromise=require('bluebird');var moment=require(_0x3f2f('0x0'));var _=require(_0x3f2f('0x1'));var util=require(_0x3f2f('0x2'));var jayson=require('jayson/promise');var client=jayson[_0x3f2f('0x3')][_0x3f2f('0x4')]({'port':0x2329});function request(_0x363002,_0x4b0e9e){return new BPromise(function(_0x54ae3d,_0x4749a5){return client[_0x3f2f('0x5')](_0x363002,_0x4b0e9e)[_0x3f2f('0x6')](function(_0x13227a){if(_0x13227a[_0x3f2f('0x7')]){return _0x4749a5(_0x13227a[_0x3f2f('0x7')][_0x3f2f('0x8')]);}else{return _0x54ae3d(_0x13227a[_0x3f2f('0x9')]);}})[_0x3f2f('0xa')](function(_0x2c54f8){return _0x4749a5(_0x2c54f8);});});}exports[_0x3f2f('0xb')]=function(_0x438f59){return request(_0x3f2f('0xc'),{'options':{'raw':![],'where':{'name':_0x438f59},'attributes':[_0x3f2f('0xd')]}});};exports[_0x3f2f('0xe')]=function(_0x5bb9b2){return request(_0x3f2f('0xf'),{'options':{'raw':![],'where':{'id':_0x5bb9b2},'include':[{'model':_0x3f2f('0x10'),'as':_0x3f2f('0x11')}],'attributes':['id','name',_0x3f2f('0x12')]}});};exports[_0x3f2f('0x13')]=function(_0x5e6169){return request('ShowSquareProject',{'options':{'where':{'id':_0x5e6169},'attributes':[_0x3f2f('0x14')]}});};exports['getVoiceQueueById']=function(_0x55a491){return request(_0x3f2f('0x15'),{'options':{'where':{'id':_0x55a491},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x16')]=function(_0x55e319){return request('ShowVariable',{'options':{'where':{'id':_0x55e319},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x17')]=function(_0x1ef904){return request(_0x3f2f('0x18'),{'options':{'where':{'id':_0x1ef904},'attributes':[_0x3f2f('0x19')]}});};exports[_0x3f2f('0x1a')]=function(_0x1d3fb7){return request('ShowUser',{'options':{'where':{'id':_0x1d3fb7},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x1b')]=function(_0x32ac1c){return request(_0x3f2f('0x1c'),{'options':{'where':{'id':_0x32ac1c},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x1d')]=function(_0xb1602f){return request('ShowSound',{'options':{'where':{'id':_0xb1602f},'attributes':[_0x3f2f('0x1e')]}});};exports[_0x3f2f('0x1f')]=function(_0x286d84){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x286d84},'include':[{'model':_0x3f2f('0x20'),'as':'Intervals'}]}});};exports[_0x3f2f('0x21')]=function(_0x28a669){return request(_0x3f2f('0x22'),{'options':{'where':{'id':_0x28a669},'attributes':['id',_0x3f2f('0x14')]}});};exports[_0x3f2f('0x23')]=function(_0x3800d6){return request(_0x3f2f('0x24'),{'body':_0x3800d6});};exports['createSquareDetailsReport']=function(_0xa6488d){return request(_0x3f2f('0x25'),{'body':_0xa6488d});};exports['createSquareReport']=function(_0x335c59){return request(_0x3f2f('0x26'),{'body':_[_0x3f2f('0x27')](_0x335c59,{'project_name':_0x335c59[_0x3f2f('0x28')],'prev_project_name':_0x335c59[_0x3f2f('0x29')]||'','is_subproject':_0x335c59[_0x3f2f('0x29')]?!![]:![],'leaveAt':moment()[_0x3f2f('0x2a')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports[_0x3f2f('0x2b')]=function(_0x443024){return request('CreateSquareRecording',{'body':_0x443024});};exports[_0x3f2f('0x2c')]=function(_0x117753){return request(_0x3f2f('0x2d'),{'body':_0x117753});};exports['createCmContact']=function(_0x68bb0d){return request('ShowCmHopper',{'options':{'raw':![],'where':{'phone':_0x68bb0d['phone'],'ListId':_0x68bb0d[_0x3f2f('0x2e')]}}})[_0x3f2f('0x6')](function(_0x422763){if(_0x422763){return _0x422763;}return request(_0x3f2f('0x2f'),{'body':_0x68bb0d});});};exports[_0x3f2f('0x30')]=function(_0x57d989){return request('ShowPause',{'options':{'where':{'id':_0x57d989},'attributes':[_0x3f2f('0x14')]}});};exports[_0x3f2f('0x31')]=function(_0x13195f,_0x449674){return request(_0x3f2f('0x32'),{'body':{'interface':_0x449674},'options':{'where':_0x13195f}});};exports[_0x3f2f('0x33')]=function(_0x2916fa,_0x2fde83,_0x544b4b){return request('PauseUser',{'body':{'type':_0x2fde83,'uniqueid':_0x544b4b},'options':{'where':_0x2916fa}});};exports[_0x3f2f('0x34')]=function(_0x4420c0){return request(_0x3f2f('0x35'),{'body':{},'options':{'where':_0x4420c0}});};exports['agentLogout']=function(_0x3f510c){return request(_0x3f2f('0x36'),{'body':{},'options':{'where':_0x3f510c}});};
\ No newline at end of file
+var _0xd732=['LoginUser','agentPause','PauseUser','agentUnpause','agentLogout','LogoutUser','bluebird','lodash','client','http','request','then','error','result','catch','getSquareProject','ShowSquareProject','production','getMailAccountById','MailServerOut','Smtp','name','email','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','ShowSquareOdbc','dsn','getUserById','ShowTrunk','ShowSound','save_name','getIntervalById','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','phone','CreateCmContact','ShowPause'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xd732,0x18e));var _0x2d73=function(_0x197987,_0x480625){_0x197987=_0x197987-0x0;var _0x5bc8c5=_0xd732[_0x197987];return _0x5bc8c5;};'use strict';var BPromise=require(_0x2d73('0x0'));var moment=require('moment');var _=require(_0x2d73('0x1'));var util=require('util');var jayson=require('jayson/promise');var client=jayson[_0x2d73('0x2')][_0x2d73('0x3')]({'port':0x2329});function request(_0x58479e,_0x591de9){return new BPromise(function(_0x274113,_0x4b7d8b){return client[_0x2d73('0x4')](_0x58479e,_0x591de9)[_0x2d73('0x5')](function(_0x47d40d){if(_0x47d40d['error']){return _0x4b7d8b(_0x47d40d[_0x2d73('0x6')]['message']);}else{return _0x274113(_0x47d40d[_0x2d73('0x7')]);}})[_0x2d73('0x8')](function(_0x28ad42){return _0x4b7d8b(_0x28ad42);});});}exports[_0x2d73('0x9')]=function(_0x56f52d){return request(_0x2d73('0xa'),{'options':{'raw':![],'where':{'name':_0x56f52d},'attributes':[_0x2d73('0xb')]}});};exports[_0x2d73('0xc')]=function(_0x2655b1){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x2655b1},'include':[{'model':_0x2d73('0xd'),'as':_0x2d73('0xe')}],'attributes':['id',_0x2d73('0xf'),_0x2d73('0x10')]}});};exports[_0x2d73('0x11')]=function(_0x45008a){return request(_0x2d73('0xa'),{'options':{'where':{'id':_0x45008a},'attributes':[_0x2d73('0xf')]}});};exports[_0x2d73('0x12')]=function(_0x1e75fa){return request(_0x2d73('0x13'),{'options':{'where':{'id':_0x1e75fa},'attributes':[_0x2d73('0xf')]}});};exports['getVariableById']=function(_0x370fa5){return request('ShowVariable',{'options':{'where':{'id':_0x370fa5},'attributes':[_0x2d73('0xf')]}});};exports['getSquareOdbcById']=function(_0x1e9bc3){return request(_0x2d73('0x14'),{'options':{'where':{'id':_0x1e9bc3},'attributes':[_0x2d73('0x15')]}});};exports[_0x2d73('0x16')]=function(_0x1cb370){return request('ShowUser',{'options':{'where':{'id':_0x1cb370},'attributes':['name']}});};exports['getTrunkById']=function(_0x3cde1d){return request(_0x2d73('0x17'),{'options':{'where':{'id':_0x3cde1d},'attributes':[_0x2d73('0xf')]}});};exports['getSoundById']=function(_0x303dfe){return request(_0x2d73('0x18'),{'options':{'where':{'id':_0x303dfe},'attributes':[_0x2d73('0x19')]}});};exports[_0x2d73('0x1a')]=function(_0x5934e2){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x5934e2},'include':[{'model':_0x2d73('0x1b'),'as':_0x2d73('0x1c')}]}});};exports[_0x2d73('0x1d')]=function(_0x350d7d){return request(_0x2d73('0x1e'),{'options':{'where':{'id':_0x350d7d},'attributes':['id',_0x2d73('0xf')]}});};exports[_0x2d73('0x1f')]=function(_0xa14d31){return request('CreateSmsMessage',{'body':_0xa14d31});};exports[_0x2d73('0x20')]=function(_0x233f57){return request(_0x2d73('0x21'),{'body':_0x233f57});};exports[_0x2d73('0x22')]=function(_0x51030d){return request(_0x2d73('0x23'),{'body':_[_0x2d73('0x24')](_0x51030d,{'project_name':_0x51030d[_0x2d73('0x25')],'prev_project_name':_0x51030d[_0x2d73('0x26')]||'','is_subproject':_0x51030d[_0x2d73('0x26')]?!![]:![],'leaveAt':moment()[_0x2d73('0x27')](_0x2d73('0x28'))})});};exports[_0x2d73('0x29')]=function(_0x350848){return request(_0x2d73('0x2a'),{'body':_0x350848});};exports[_0x2d73('0x2b')]=function(_0x20b818){return request(_0x2d73('0x2c'),{'body':_0x20b818});};exports[_0x2d73('0x2d')]=function(_0x24aecc){return request(_0x2d73('0x2e'),{'options':{'raw':![],'where':{'phone':_0x24aecc[_0x2d73('0x2f')],'ListId':_0x24aecc['ListId']}}})[_0x2d73('0x5')](function(_0x59b4cf){if(_0x59b4cf){return _0x59b4cf;}return request(_0x2d73('0x30'),{'body':_0x24aecc});});};exports['getPauseById']=function(_0x59075b){return request(_0x2d73('0x31'),{'options':{'where':{'id':_0x59075b},'attributes':[_0x2d73('0xf')]}});};exports['agentLogin']=function(_0x5aa9ea,_0x1beaef){return request(_0x2d73('0x32'),{'body':{'interface':_0x1beaef},'options':{'where':_0x5aa9ea}});};exports[_0x2d73('0x33')]=function(_0x5955a8,_0x4a47d3,_0x425144){return request(_0x2d73('0x34'),{'body':{'type':_0x4a47d3,'uniqueid':_0x425144},'options':{'where':_0x5955a8}});};exports[_0x2d73('0x35')]=function(_0x4b22b6){return request('UnpauseUser',{'body':{},'options':{'where':_0x4b22b6}});};exports[_0x2d73('0x36')]=function(_0x5258d8){return request(_0x2d73('0x37'),{'body':{},'options':{'where':_0x5258d8}});};
\ 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 d764618..aa0c88d 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 _0x4bc3=['./polly','./lex'];(function(_0x1d4c92,_0x1a3da1){var _0x5b7189=function(_0x332d6a){while(--_0x332d6a){_0x1d4c92['push'](_0x1d4c92['shift']());}};_0x5b7189(++_0x1a3da1);}(_0x4bc3,0x16e));var _0x34bc=function(_0x2e4aa2,_0x11956a){_0x2e4aa2=_0x2e4aa2-0x0;var _0x5e6092=_0x4bc3[_0x2e4aa2];return _0x5e6092;};var polly=require(_0x34bc('0x0'));var lex=require(_0x34bc('0x1'));module['exports']={'polly':polly,'lex':lex};
\ No newline at end of file
+var _0x5178=['exports','./lex'];(function(_0x43db87,_0x2098a6){var _0x4e941e=function(_0x6aa543){while(--_0x6aa543){_0x43db87['push'](_0x43db87['shift']());}};_0x4e941e(++_0x2098a6);}(_0x5178,0x171));var _0x8517=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x5178[_0x3bf83f];return _0x22c4a9;};var polly=require('./polly');var lex=require(_0x8517('0x0'));module[_0x8517('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 227c330..f0c499e 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 _0x12fd=['exports','./lib/api'];(function(_0x49da41,_0xd030dd){var _0x364522=function(_0x285b7d){while(--_0x285b7d){_0x49da41['push'](_0x49da41['shift']());}};_0x364522(++_0xd030dd);}(_0x12fd,0x199));var _0xd12f=function(_0x5c192f,_0x351235){_0x5c192f=_0x5c192f-0x0;var _0x126f9d=_0x12fd[_0x5c192f];return _0x126f9d;};'use strict';var lex=require(_0xd12f('0x0'));module[_0xd12f('0x1')]=function(_0x718bb5,_0x3e2e32,_0x18abfb,_0x48fb45,_0x1e72a3,_0x37f6b4){return lex(_0x718bb5,_0x3e2e32,_0x18abfb,_0x48fb45,_0x1e72a3,_0x37f6b4);};
\ No newline at end of file
+var _0x2917=['./lib/api','exports'];(function(_0x1f0cd,_0x54c5cb){var _0x535f85=function(_0x3a278e){while(--_0x3a278e){_0x1f0cd['push'](_0x1f0cd['shift']());}};_0x535f85(++_0x54c5cb);}(_0x2917,0x142));var _0x7291=function(_0x3e3bee,_0x4f91fe){_0x3e3bee=_0x3e3bee-0x0;var _0x3ae14c=_0x2917[_0x3e3bee];return _0x3ae14c;};'use strict';var lex=require(_0x7291('0x0'));module[_0x7291('0x1')]=function(_0x292b68,_0x105174,_0x37515c,_0x398f9f,_0x90e67,_0x535c15){return lex(_0x292b68,_0x105174,_0x37515c,_0x398f9f,_0x90e67,_0x535c15);};
\ 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 bed118f..659afc8 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 _0x42da=['exports','LexRuntime','$LATEST','bluebird','aws-sdk','postText','slots','hasOwnProperty','slot_'];(function(_0x185a5a,_0x19442b){var _0x39bd2d=function(_0xfe0213){while(--_0xfe0213){_0x185a5a['push'](_0x185a5a['shift']());}};_0x39bd2d(++_0x19442b);}(_0x42da,0x198));var _0xa42d=function(_0x2db67b,_0x399668){_0x2db67b=_0x2db67b-0x0;var _0x2bcea5=_0x42da[_0x2db67b];return _0x2bcea5;};'use strict';var BPromise=require(_0xa42d('0x0'));var AWS=require(_0xa42d('0x1'));function lexResult(_0x54e378,_0x1a1729){return new BPromise(function(_0x4ee1e2,_0x5a37b8){_0x54e378[_0xa42d('0x2')](_0x1a1729,function(_0xf16c1e,_0x16630b){if(_0xf16c1e){_0x5a37b8(_0xf16c1e);}if(_0x16630b['slots']){for(const _0x31a22e in _0x16630b[_0xa42d('0x3')]){if(_0x16630b[_0xa42d('0x3')][_0xa42d('0x4')](_0x31a22e)){var _0x5db0be=_0x16630b[_0xa42d('0x3')][_0x31a22e];_0x16630b[_0xa42d('0x5')+_0x31a22e]=_0x5db0be;}}}_0x4ee1e2(_0x16630b);});});}module[_0xa42d('0x6')]=function(_0x18aba7,_0x42b64b,_0x2d18c1,_0x499f5d,_0x21d0da,_0x3cacae){var _0x2d59a6=new AWS[(_0xa42d('0x7'))]({'accessKeyId':_0x42b64b,'secretAccessKey':_0x2d18c1,'region':_0x499f5d});var _0x46fb4c={'botAlias':_0xa42d('0x8'),'botName':_0x3cacae,'inputText':_0x21d0da,'userId':_0x18aba7};return lexResult(_0x2d59a6,_0x46fb4c);};
\ No newline at end of file
+var _0x6ef6=['slots','slot_','exports','LexRuntime','$LATEST','bluebird','postText'];(function(_0x2e938d,_0x346e53){var _0x50d42d=function(_0x144326){while(--_0x144326){_0x2e938d['push'](_0x2e938d['shift']());}};_0x50d42d(++_0x346e53);}(_0x6ef6,0x14e));var _0x66ef=function(_0x419c4a,_0x5d525d){_0x419c4a=_0x419c4a-0x0;var _0x4dae37=_0x6ef6[_0x419c4a];return _0x4dae37;};'use strict';var BPromise=require(_0x66ef('0x0'));var AWS=require('aws-sdk');function lexResult(_0x2d1c2f,_0x4c1476){return new BPromise(function(_0x3561b5,_0x3c9002){_0x2d1c2f[_0x66ef('0x1')](_0x4c1476,function(_0x340bdb,_0x449923){if(_0x340bdb){_0x3c9002(_0x340bdb);}if(_0x449923[_0x66ef('0x2')]){for(const _0x29f243 in _0x449923[_0x66ef('0x2')]){if(_0x449923[_0x66ef('0x2')]['hasOwnProperty'](_0x29f243)){var _0xd9b9f4=_0x449923[_0x66ef('0x2')][_0x29f243];_0x449923[_0x66ef('0x3')+_0x29f243]=_0xd9b9f4;}}}_0x3561b5(_0x449923);});});}module[_0x66ef('0x4')]=function(_0x5b30a9,_0x13968b,_0x3acee2,_0x79dd85,_0xd3e348,_0x9fdf9){var _0x124040=new AWS[(_0x66ef('0x5'))]({'accessKeyId':_0x13968b,'secretAccessKey':_0x3acee2,'region':_0x79dd85});var _0x4bcdda={'botAlias':_0x66ef('0x6'),'botName':_0x9fdf9,'inputText':_0xd3e348,'userId':_0x5b30a9};return lexResult(_0x124040,_0x4bcdda);};
\ 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 368dc74..99b92dd 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 _0x778e=['./lib/api','exports'];(function(_0x1d24c0,_0x2179c1){var _0x4e96aa=function(_0xf55fe2){while(--_0xf55fe2){_0x1d24c0['push'](_0x1d24c0['shift']());}};_0x4e96aa(++_0x2179c1);}(_0x778e,0x132));var _0xe778=function(_0xf54af0,_0xea94f5){_0xf54af0=_0xf54af0-0x0;var _0x493195=_0x778e[_0xf54af0];return _0x493195;};'use strict';var polly=require(_0xe778('0x0'));module[_0xe778('0x1')]=function(_0xc7e9ad,_0xefc9cd,_0x3a1243,_0x5e9eec,_0x1d1424,_0x49b579,_0x34c07f){return polly(_0xc7e9ad,_0xefc9cd,_0x3a1243,_0x5e9eec,_0x1d1424,_0x49b579,_0x34c07f);};
\ No newline at end of file
+var _0x61b9=['./lib/api','exports'];(function(_0x2cf2e9,_0xd58ea1){var _0xd3670d=function(_0x272868){while(--_0x272868){_0x2cf2e9['push'](_0x2cf2e9['shift']());}};_0xd3670d(++_0xd58ea1);}(_0x61b9,0xe0));var _0x961b=function(_0x2678d6,_0x4e2001){_0x2678d6=_0x2678d6-0x0;var _0x475503=_0x61b9[_0x2678d6];return _0x475503;};'use strict';var polly=require(_0x961b('0x0'));module[_0x961b('0x1')]=function(_0x34ce2d,_0x185f4d,_0x128249,_0x3c28c0,_0x365223,_0x50c4c9,_0x4f33e0){return polly(_0x34ce2d,_0x185f4d,_0x128249,_0x3c28c0,_0x365223,_0x50c4c9,_0x4f33e0);};
\ 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 f52d5aa..0131870 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 _0x963c=['AudioStream','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','mp3','path','randomstring','aws-sdk','synthesizeSpeech','writeFile'];(function(_0x7488c6,_0x1b2889){var _0x50fafa=function(_0x5dbf64){while(--_0x5dbf64){_0x7488c6['push'](_0x7488c6['shift']());}};_0x50fafa(++_0x1b2889);}(_0x963c,0xa0));var _0xc963=function(_0x4bcf49,_0x422ef0){_0x4bcf49=_0x4bcf49-0x0;var _0x3a523e=_0x963c[_0x4bcf49];return _0x3a523e;};'use strict';var fs=require('fs');var path=require(_0xc963('0x0'));var BPromise=require('bluebird');var rs=require(_0xc963('0x1'));var AWS=require(_0xc963('0x2'));function pollyResult(_0x36b5f8,_0x5d3443,_0x4281b0){return new BPromise(function(_0x3cb5a2,_0x14d15c){_0x36b5f8[_0xc963('0x3')](_0x5d3443,function(_0x4fddbf,_0x5bf44e){if(_0x4fddbf){_0x14d15c(_0x4fddbf);}else if(_0x5bf44e){if(_0x5bf44e['AudioStream']instanceof Buffer){fs[_0xc963('0x4')](_0x4281b0,_0x5bf44e[_0xc963('0x5')],function(_0xb42558){if(_0xb42558){_0x14d15c(_0xb42558);}else{_0x3cb5a2();}});}else{_0x14d15c(new Error(_0xc963('0x6')));}}else{_0x14d15c(new Error(_0xc963('0x7')));}});});}module[_0xc963('0x8')]=function(_0x1b519f,_0x512a4b,_0x32e728,_0x818e2a,_0x12882a,_0x10a6d1,_0x5daa4c){var _0x774458=new AWS[(_0xc963('0x9'))]({'accessKeyId':_0x1b519f,'secretAccessKey':_0x512a4b,'region':_0x32e728});var _0x8268af={'Text':_0x12882a,'TextType':_0x10a6d1||'text','OutputFormat':_0xc963('0xa'),'VoiceId':_0x818e2a};return pollyResult(_0x774458,_0x8268af,_0x5daa4c);};
\ No newline at end of file
+var _0xa12c=['text','mp3','path','bluebird','randomstring','aws-sdk','synthesizeSpeech','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly'];(function(_0x1f9f37,_0x18776e){var _0x21c080=function(_0x4acb93){while(--_0x4acb93){_0x1f9f37['push'](_0x1f9f37['shift']());}};_0x21c080(++_0x18776e);}(_0xa12c,0x84));var _0xca12=function(_0x1ef901,_0x3e39e3){_0x1ef901=_0x1ef901-0x0;var _0x333d2b=_0xa12c[_0x1ef901];return _0x333d2b;};'use strict';var fs=require('fs');var path=require(_0xca12('0x0'));var BPromise=require(_0xca12('0x1'));var rs=require(_0xca12('0x2'));var AWS=require(_0xca12('0x3'));function pollyResult(_0x2c0fc9,_0x524053,_0x5b5bd6){return new BPromise(function(_0x17c517,_0x1d371f){_0x2c0fc9[_0xca12('0x4')](_0x524053,function(_0x44e530,_0x287886){if(_0x44e530){_0x1d371f(_0x44e530);}else if(_0x287886){if(_0x287886[_0xca12('0x5')]instanceof Buffer){fs[_0xca12('0x6')](_0x5b5bd6,_0x287886[_0xca12('0x5')],function(_0x38b73d){if(_0x38b73d){_0x1d371f(_0x38b73d);}else{_0x17c517();}});}else{_0x1d371f(new Error(_0xca12('0x7')));}}else{_0x1d371f(new Error(_0xca12('0x8')));}});});}module[_0xca12('0x9')]=function(_0x129b77,_0x3f116b,_0x11d9ca,_0x5d5ea1,_0x3ed4b7,_0x41438a,_0x72122f){var _0x1435fc=new AWS[(_0xca12('0xa'))]({'accessKeyId':_0x129b77,'secretAccessKey':_0x3f116b,'region':_0x11d9ca});var _0x5ac9cb={'Text':_0x3ed4b7,'TextType':_0x41438a||_0xca12('0xb'),'OutputFormat':_0xca12('0xc'),'VoiceId':_0x5d5ea1};return pollyResult(_0x1435fc,_0x5ac9cb,_0x72122f);};
\ 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 2cdf0a6..9849f31 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 _0x8169=['exports','./lib/api'];(function(_0x1a9952,_0x1fe7eb){var _0x45d24c=function(_0x12c3cc){while(--_0x12c3cc){_0x1a9952['push'](_0x1a9952['shift']());}};_0x45d24c(++_0x1fe7eb);}(_0x8169,0x1cf));var _0x9816=function(_0x1041df,_0x103a2e){_0x1041df=_0x1041df-0x0;var _0x2a5b79=_0x8169[_0x1041df];return _0x2a5b79;};'use strict';var asr=require(_0x9816('0x0'));module[_0x9816('0x1')]=function(_0xde75d0,_0x46f35a,_0x30ee02,_0x485f64){return asr(_0xde75d0,_0x46f35a,_0x30ee02);};
\ No newline at end of file
+var _0xd253=['./lib/api'];(function(_0x2136d5,_0x4b0479){var _0x3bee2e=function(_0x119e88){while(--_0x119e88){_0x2136d5['push'](_0x2136d5['shift']());}};_0x3bee2e(++_0x4b0479);}(_0xd253,0x125));var _0x3d25=function(_0x1cfa0d,_0x4391f2){_0x1cfa0d=_0x1cfa0d-0x0;var _0xe33279=_0xd253[_0x1cfa0d];return _0xe33279;};'use strict';var asr=require(_0x3d25('0x0'));module['exports']=function(_0x3bff39,_0x37c7de,_0x2f1f66,_0x1b91e0){return asr(_0x3bff39,_0x37c7de,_0x2f1f66);};
\ 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 17eb6aa..dcca213 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 _0x01f5=['LINEAR16','8000','url','https://speech.googleapis.com','exports','string','length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','toString','base64','POST'];(function(_0x2b9061,_0x1af183){var _0x3e661c=function(_0x288e9d){while(--_0x288e9d){_0x2b9061['push'](_0x2b9061['shift']());}};_0x3e661c(++_0x1af183);}(_0x01f5,0x64));var _0x501f=function(_0x31088e,_0x5e7aed){_0x31088e=_0x31088e-0x0;var _0x18486b=_0x01f5[_0x31088e];return _0x18486b;};'use strict';var url=require(_0x501f('0x0'));var BPromise=require('bluebird');var fs=require('fs');var host=_0x501f('0x1');module[_0x501f('0x2')]=function(_0x20c04c,_0x3179b4,_0x2be00b){return new BPromise(function(_0x563f37,_0xd8c776){var _0x24e5d9;if(typeof _0x20c04c!==_0x501f('0x3')||_0x20c04c[_0x501f('0x4')]===0x0){return _0xd8c776(_0x501f('0x5'));}if(typeof _0x3179b4!==_0x501f('0x3')||_0x3179b4['length']===0x0){return _0xd8c776(_0x501f('0x6'));}if(typeof _0x2be00b!==_0x501f('0x7')&&(typeof _0x2be00b!==_0x501f('0x3')||_0x2be00b['length']===0x0)){return _0xd8c776(_0x501f('0x8'));}try{_0x24e5d9=fs['readFileSync'](_0x20c04c)[_0x501f('0x9')](_0x501f('0xa'));}catch(_0x129f41){return _0xd8c776(_0x129f41);}return _0x563f37({'method':_0x501f('0xb'),'uri':host+'/v1/speech:recognize?key='+_0x3179b4,'body':{'config':{'encoding':_0x501f('0xc'),'sampleRateHertz':_0x501f('0xd'),'languageCode':_0x2be00b},'audio':{'content':_0x24e5d9}},'json':!![]});});};
\ No newline at end of file
+var _0x7905=['base64','/v1/speech:recognize?key=','LINEAR16','bluebird','https://speech.googleapis.com','exports','string','length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','readFileSync'];(function(_0x594e99,_0x3ffa2e){var _0x5d1c27=function(_0x518766){while(--_0x518766){_0x594e99['push'](_0x594e99['shift']());}};_0x5d1c27(++_0x3ffa2e);}(_0x7905,0x1e4));var _0x5790=function(_0x5dad7b,_0x2e6b5d){_0x5dad7b=_0x5dad7b-0x0;var _0x52297c=_0x7905[_0x5dad7b];return _0x52297c;};'use strict';var url=require('url');var BPromise=require(_0x5790('0x0'));var fs=require('fs');var host=_0x5790('0x1');module[_0x5790('0x2')]=function(_0x532546,_0x22b643,_0x165d42){return new BPromise(function(_0x36cf95,_0x3bbfaa){var _0x2bad45;if(typeof _0x532546!==_0x5790('0x3')||_0x532546[_0x5790('0x4')]===0x0){return _0x3bbfaa(_0x5790('0x5'));}if(typeof _0x22b643!==_0x5790('0x3')||_0x22b643['length']===0x0){return _0x3bbfaa(_0x5790('0x6'));}if(typeof _0x165d42!==_0x5790('0x7')&&(typeof _0x165d42!==_0x5790('0x3')||_0x165d42[_0x5790('0x4')]===0x0)){return _0x3bbfaa(_0x5790('0x8'));}try{_0x2bad45=fs[_0x5790('0x9')](_0x532546)['toString'](_0x5790('0xa'));}catch(_0x5122a4){return _0x3bbfaa(_0x5122a4);}return _0x36cf95({'method':'POST','uri':host+_0x5790('0xb')+_0x22b643,'body':{'config':{'encoding':_0x5790('0xc'),'sampleRateHertz':'8000','languageCode':_0x165d42},'audio':{'content':_0x2bad45}},'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 f983fad..0f944e3 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 _0xb4f8=['exports'];(function(_0x171636,_0x3319eb){var _0x32235a=function(_0xb47eb1){while(--_0xb47eb1){_0x171636['push'](_0x171636['shift']());}};_0x32235a(++_0x3319eb);}(_0xb4f8,0x83));var _0x8b4f=function(_0x19b84f,_0x48765e){_0x19b84f=_0x19b84f-0x0;var _0x18067b=_0xb4f8[_0x19b84f];return _0x18067b;};var asr=require('./asr');module[_0x8b4f('0x0')]={'asr':asr};
\ No newline at end of file
+var _0x4991=['./asr'];(function(_0x1fe33c,_0x282321){var _0x383fa2=function(_0x1dafa9){while(--_0x1dafa9){_0x1fe33c['push'](_0x1fe33c['shift']());}};_0x383fa2(++_0x282321);}(_0x4991,0xf7));var _0x1499=function(_0xd80bdb,_0x4c0946){_0xd80bdb=_0xd80bdb-0x0;var _0x44a07b=_0x4991[_0xd80bdb];return _0x44a07b;};var asr=require(_0x1499('0x0'));module['exports']={'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 b645f2c..58dcbad 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 _0x46a7=['action','status','code','metadata','tildeASR','Tilde\x20ASR\x20transcription','awsPolly','polly','awsLex','ispeechTTS','format','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','model=%s','sestekNDA','nda','text','channelData','CustomAction','AudioFromTts','Data','audiofile','dirName','path','http','https','url','parse','bluebird','randomstring','sox','request-promise','util','querystring','apiai-promise','./google','./aws','./tilde','./sestek','../../../config/logger','agi','protocol','host','WHAT_EVER','get','statusCode','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','info','finish\x20download\x20file','close','unlink','download\x20error','pipe','end','https:','transcode','wav','error\x20convert','finish\x20to\x20convert','start','resolve','tmp','generate','.wav','writeFileSync','base64','then','split','toString','googleCloudTTS','https://texttospeech.googleapis.com/v1/','?key=','input','voice','audioConfig','text:synthesize','POST','.mp3','chmodSync','777','googleCloudTTS\x20path','googleTTS','googleASR','asr','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','name','message','googleDialogflow','textRequest','stringify','result','source','resolvedQuery'];(function(_0x3dcd64,_0x40d910){var _0x38c720=function(_0x1b63a0){while(--_0x1b63a0){_0x3dcd64['push'](_0x3dcd64['shift']());}};_0x38c720(++_0x40d910);}(_0x46a7,0x14e));var _0x746a=function(_0x1d9ec7,_0x11f406){_0x1d9ec7=_0x1d9ec7-0x0;var _0x2d4a79=_0x46a7[_0x1d9ec7];return _0x2d4a79;};'use strict';var fs=require('fs');var path=require(_0x746a('0x0'));var http=require(_0x746a('0x1'));var https=require(_0x746a('0x2'));var urlParse=require(_0x746a('0x3'))[_0x746a('0x4')];var BPromise=require(_0x746a('0x5'));var rs=require(_0x746a('0x6'));var sox=require(_0x746a('0x7'));var rp=require(_0x746a('0x8'));var util=require(_0x746a('0x9'));var querystring=require(_0x746a('0xa'));var tts=require('google-tts-api');var apiai=require(_0x746a('0xb'));var md5=require('md5');var google=require(_0x746a('0xc'));var aws=require(_0x746a('0xd'));var tilde=require(_0x746a('0xe'));var sestek=require(_0x746a('0xf'));var logger=require(_0x746a('0x10'))(_0x746a('0x11'));var ISPEECH_API='https://api.ispeech.org/api/rest';function downloadFile(_0x1dcebf,_0x5bb767){return new BPromise(function(_0x2a0b97,_0x45757e){var _0xedb14=urlParse(_0x1dcebf);var _0x1bc1e0=_0xedb14[_0x746a('0x12')]==='https:'?https:http;var _0x36f6c6={'host':_0xedb14[_0x746a('0x13')],'path':_0xedb14[_0x746a('0x0')],'headers':{'user-agent':_0x746a('0x14')}};_0x1bc1e0[_0x746a('0x15')](_0x36f6c6,function(_0x289992){if(_0x289992[_0x746a('0x16')]!==0xc8){logger[_0x746a('0x17')](_0x746a('0x18')+_0x1dcebf+_0x746a('0x19')+_0x289992[_0x746a('0x16')]+'\x20('+_0x289992[_0x746a('0x1a')]+')');_0x45757e(new Error(_0x746a('0x18')+_0x1dcebf+'\x20failed,\x20status\x20code\x20=\x20'+_0x289992['statusCode']+'\x20('+_0x289992['statusMessage']+')'));return;}var _0x51507f=fs[_0x746a('0x1b')](_0x5bb767);_0x51507f['on']('finish',function(){logger[_0x746a('0x1c')](_0x746a('0x1d'));_0x51507f[_0x746a('0x1e')](_0x2a0b97);});_0x51507f['on']('error',function(_0xccc10e){fs[_0x746a('0x1f')](_0x5bb767);logger[_0x746a('0x17')](_0x746a('0x20'),_0xccc10e);_0x45757e(_0xccc10e);});_0x289992[_0x746a('0x21')](_0x51507f);})['on'](_0x746a('0x17'),function(_0x59f5a8){logger[_0x746a('0x17')](_0x59f5a8);_0x45757e(_0x59f5a8);})[_0x746a('0x22')]();});}function uploadFile(_0x1b8634){return new BPromise(function(_0x289681,_0x3a22dd){var _0x12e87f=urlParse(_0x1b8634);var _0x4ebd18=_0x12e87f[_0x746a('0x12')]===_0x746a('0x23')?https:http;var _0x510753={'host':_0x12e87f[_0x746a('0x13')],'path':_0x12e87f[_0x746a('0x0')],'headers':{'user-agent':_0x746a('0x14')}};_0x4ebd18[_0x746a('0x15')](_0x510753,function(_0x3860f4){if(_0x3860f4['statusCode']!==0xc8){_0x3a22dd(new Error(_0x746a('0x18')+_0x1b8634+_0x746a('0x19')+_0x3860f4[_0x746a('0x16')]+'\x20('+_0x3860f4[_0x746a('0x1a')]+')'));return;}var _0x3ce7e6='';_0x3860f4['on']('data',function(_0x44c3bb){_0x3ce7e6+=_0x44c3bb;});_0x3860f4['on'](_0x746a('0x22'),function(){_0x289681(_0x3ce7e6);});})['on'](_0x746a('0x17'),function(_0x3c74d6){_0x3a22dd(_0x3c74d6);})['end']();});}function convertFile(_0x558eee,_0x4963bd){return new BPromise(function(_0x21710a,_0x573444){var _0x1d82ef=sox[_0x746a('0x24')](_0x558eee,_0x4963bd,{'sampleRate':0x1f40,'format':_0x746a('0x25'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x1d82ef['on'](_0x746a('0x17'),function(_0x4ca4a5){logger[_0x746a('0x17')](_0x746a('0x26'),_0x4ca4a5);_0x573444(_0x4ca4a5);});_0x1d82ef['on']('end',function(){logger[_0x746a('0x1c')](_0x746a('0x27'));_0x21710a();});_0x1d82ef[_0x746a('0x28')]();});}function base64Decode(_0x3376a2,_0x24af9a){var _0x5a8cc5=path[_0x746a('0x29')](__dirname,_0x746a('0x2a'),rs[_0x746a('0x2b')](0x4)+_0x746a('0x2c'));fs[_0x746a('0x2d')](_0x5a8cc5,_0x3376a2,_0x746a('0x2e'));return convertFile(_0x5a8cc5,_0x24af9a)[_0x746a('0x2f')](function(){try{fs[_0x746a('0x1f')](_0x5a8cc5);fs['chmodSync'](_0x24af9a,'777');}catch(_0x2d3486){logger['error'](_0x2d3486);}return _0x24af9a[_0x746a('0x30')]('.')[0x0];});}function base64Encode(_0x2f6147){var _0x1b14b7=fs['readFileSync'](_0x2f6147);return new Buffer(_0x1b14b7)[_0x746a('0x31')](_0x746a('0x2e'));}exports[_0x746a('0x32')]=function(_0x3fe3e0,_0x4bd6ab,_0x4247d4,_0x6b3c8d,_0x5937f2,_0x388f98){var _0x3e41c0,_0xdb6cd1;var _0x2236a2=_0x746a('0x33');var _0x53402e=_0x746a('0x34')+_0x3fe3e0;var _0x50ed0d={};if(_0x4bd6ab==='ssml'){_0x50ed0d[_0x746a('0x35')]={'ssml':_0x4247d4};}else{_0x50ed0d[_0x746a('0x35')]={'text':_0x4247d4};};_0x50ed0d[_0x746a('0x36')]={'languageCode':_0x6b3c8d,'ssmlGender':_0x5937f2};_0x50ed0d[_0x746a('0x37')]={'audioEncoding':'MP3','sampleRateHertz':0x1f40};var _0x29071f={'url':_0x2236a2+_0x746a('0x38')+_0x53402e,'method':_0x746a('0x39'),'json':!![],'body':_0x50ed0d};return rp(_0x29071f)['then'](function(_0x56af07){return new BPromise(function(_0x5ca75b,_0x518cba){_0x3e41c0=path[_0x746a('0x29')](__dirname,_0x746a('0x2a'),rs[_0x746a('0x2b')](0x4)+_0x746a('0x3a'));var _0x5386e4=Buffer['from'](_0x56af07['audioContent'],_0x746a('0x2e'));return fs['writeFile'](_0x3e41c0,_0x5386e4,function(_0x4088c3){_0x518cba(_0x4088c3);},function(_0x20efee){fs[_0x746a('0x3b')](_0x3e41c0,_0x746a('0x3c'));_0x5ca75b(_0x20efee);});});})[_0x746a('0x2f')](function(_0x580599){_0xdb6cd1=path[_0x746a('0x29')](__dirname,_0x746a('0x2a'),rs[_0x746a('0x2b')](0x4)+_0x746a('0x2c'));return convertFile(_0x3e41c0,_0xdb6cd1);})[_0x746a('0x2f')](function(){try{fs[_0x746a('0x1f')](_0x3e41c0);fs[_0x746a('0x3b')](_0xdb6cd1,_0x746a('0x3c'));}catch(_0x49d9d8){logger[_0x746a('0x17')](_0x49d9d8);}logger[_0x746a('0x1c')](_0x746a('0x3d'),_0xdb6cd1[_0x746a('0x30')]('.')[0x0]);return _0xdb6cd1[_0x746a('0x30')]('.')[0x0];});};exports[_0x746a('0x3e')]=function(_0x1b411c,_0x57c306){var _0xa24f2d,_0x585119;return tts(_0x1b411c,_0x57c306||'en',0x1)[_0x746a('0x2f')](function(_0x14ad94){logger[_0x746a('0x1c')](_0x14ad94);_0xa24f2d=path['resolve'](__dirname,_0x746a('0x2a'),rs['generate'](0x4)+_0x746a('0x3a'));return downloadFile(_0x14ad94,_0xa24f2d);})[_0x746a('0x2f')](function(){_0x585119=path['resolve'](__dirname,_0x746a('0x2a'),rs[_0x746a('0x2b')](0x4)+_0x746a('0x2c'));return convertFile(_0xa24f2d,_0x585119);})[_0x746a('0x2f')](function(){try{fs[_0x746a('0x1f')](_0xa24f2d);fs[_0x746a('0x3b')](_0x585119,'777');}catch(_0x23d1b9){logger[_0x746a('0x17')](_0x23d1b9);}logger['info']('goggleTTS\x20path',_0x585119[_0x746a('0x30')]('.')[0x0]);return _0x585119[_0x746a('0x30')]('.')[0x0];});};exports[_0x746a('0x3f')]=function(_0x305256,_0x16eab0,_0x5bdd67){return google[_0x746a('0x40')](_0x305256,_0x16eab0,_0x5bdd67)[_0x746a('0x2f')](function(_0x3abafd){logger[_0x746a('0x1c')](_0x3abafd[_0x746a('0x41')]);return rp(_0x3abafd);})[_0x746a('0x2f')](function(_0x4592e1){var _0x23bf58='';var _0x3bb458=0x0;try{fs[_0x746a('0x1f')](_0x305256);}catch(_0x395b7b){logger[_0x746a('0x17')](_0x395b7b);}if(_0x4592e1&&_0x4592e1[_0x746a('0x42')]){_0x23bf58=_0x4592e1['results'][_0x746a('0x43')](function(_0x3bc4e8){return _0x3bc4e8&&_0x3bc4e8[_0x746a('0x44')][0x0]&&_0x3bc4e8[_0x746a('0x44')][0x0][_0x746a('0x45')]?_0x3bc4e8[_0x746a('0x44')][0x0][_0x746a('0x45')]:'';})[_0x746a('0x46')]('\x0a');_0x3bb458=_0x4592e1[_0x746a('0x42')][_0x746a('0x43')](function(_0x9dc85d){return _0x9dc85d&&_0x9dc85d[_0x746a('0x44')][0x0]&&_0x9dc85d[_0x746a('0x44')][0x0][_0x746a('0x47')]?_0x9dc85d[_0x746a('0x44')][0x0][_0x746a('0x47')]:0x0;})[_0x746a('0x46')]('\x0a');}logger[_0x746a('0x1c')](_0x746a('0x48'),_0x23bf58);logger[_0x746a('0x1c')](_0x746a('0x49'),_0x3bb458);return{'transcript':_0x23bf58,'confidence':_0x3bb458};})['catch'](function(_0x31903f){logger['error']('[%s]\x20%s:%s',_0x31903f[_0x746a('0x16')],_0x31903f[_0x746a('0x4a')],_0x31903f[_0x746a('0x4b')]);});};exports[_0x746a('0x4c')]=function(_0x2701f9,_0x20ae6d,_0x17c6cd,_0x11740d){var _0x1ed10b=apiai(_0x20ae6d,{'language':_0x11740d||'en'});return _0x1ed10b[_0x746a('0x4d')](_0x17c6cd,{'sessionId':md5(_0x2701f9)})[_0x746a('0x2f')](function(_0x8c97c0){logger[_0x746a('0x1c')](JSON[_0x746a('0x4e')](_0x8c97c0));return{'source':_0x8c97c0[_0x746a('0x4f')][_0x746a('0x50')],'resolvedQuery':_0x8c97c0[_0x746a('0x4f')][_0x746a('0x51')],'action':_0x8c97c0[_0x746a('0x4f')][_0x746a('0x52')],'actionIncomplete':_0x8c97c0[_0x746a('0x4f')]['actionIncomplete'],'speech':_0x8c97c0[_0x746a('0x4f')]['fulfillment']['speech'],'score':_0x8c97c0[_0x746a('0x4f')]['score'],'statusCode':_0x8c97c0[_0x746a('0x53')][_0x746a('0x54')],'endConversation':_0x8c97c0[_0x746a('0x4f')]['metadata']['endConversation']||![],'isFallbackIntent':_0x8c97c0[_0x746a('0x4f')][_0x746a('0x55')]['isFallbackIntent']};});};exports[_0x746a('0x56')]=function(_0x309f94,_0x50408e,_0x57601a,_0x15af8d){return tilde[_0x746a('0x40')](_0x309f94,_0x50408e,_0x57601a,_0x15af8d)[_0x746a('0x2f')](function(_0x49d8a2){try{fs['unlink'](_0x309f94);}catch(_0x1ad7e7){logger['error'](_0x1ad7e7);}logger[_0x746a('0x1c')](_0x746a('0x57'),_0x49d8a2['transcript']);logger[_0x746a('0x1c')]('Tilde\x20ASR\x20confidence',_0x49d8a2[_0x746a('0x47')]);return _0x49d8a2;});};exports[_0x746a('0x58')]=function(_0x27ad7f,_0xb45aad,_0x503322,_0x578bc0,_0x4b19c2,_0x2ab318){var _0x44ecd7=path[_0x746a('0x29')](__dirname,'tmp',rs[_0x746a('0x2b')](0x4)+'.mp3');var _0x463d0e;return aws[_0x746a('0x59')](_0x27ad7f,_0xb45aad,_0x503322,_0x578bc0,_0x4b19c2,_0x2ab318,_0x44ecd7)['then'](function(){_0x463d0e=path[_0x746a('0x29')](__dirname,_0x746a('0x2a'),rs['generate'](0x4)+'.wav');return convertFile(_0x44ecd7,_0x463d0e);})['then'](function(){try{fs[_0x746a('0x1f')](_0x44ecd7);fs[_0x746a('0x3b')](_0x463d0e,_0x746a('0x3c'));}catch(_0xc5f5f6){logger['error'](_0xc5f5f6);}return _0x463d0e[_0x746a('0x30')]('.')[0x0];});};exports[_0x746a('0x5a')]=function(_0x55fe9b,_0xf78be2,_0x1eafc9,_0x29e4d4,_0x374f9c,_0xf1e75f){return aws['lex'](_0x55fe9b,_0xf78be2,_0x1eafc9,_0x29e4d4,_0x374f9c,_0xf1e75f)[_0x746a('0x2f')](function(_0x3bdd2a){logger[_0x746a('0x1c')](JSON[_0x746a('0x4e')](_0x3bdd2a));return _0x3bdd2a;});};exports[_0x746a('0x5b')]=function(_0x4cd9ea,_0x575e38,_0x4a47b8,_0x1d2004){var _0x1584e1=util[_0x746a('0x5c')]('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x4cd9ea,encodeURIComponent(_0x575e38),_0x4a47b8,_0x1d2004);var _0x158fb6=path[_0x746a('0x29')](__dirname,'tmp',rs[_0x746a('0x2b')](0x4)+_0x746a('0x3a'));var _0x43adbe;return downloadFile(_0x1584e1,_0x158fb6)[_0x746a('0x2f')](function(){_0x43adbe=path['resolve'](__dirname,_0x746a('0x2a'),rs[_0x746a('0x2b')](0x4)+_0x746a('0x2c'));return convertFile(_0x158fb6,_0x43adbe);})[_0x746a('0x2f')](function(){try{fs[_0x746a('0x1f')](_0x158fb6);fs['chmodSync'](_0x43adbe,_0x746a('0x3c'));}catch(_0x46956d){logger[_0x746a('0x17')](_0x46956d);}return _0x43adbe[_0x746a('0x30')]('.')[0x0];});};exports['ispeechASR']=function(_0x30b3ac,_0x391d53,_0x2f2219,_0x3ccd54){var _0x29ab06=util['format'](_0x746a('0x5d'),ISPEECH_API,_0x391d53,_0x2f2219,base64Encode(_0x30b3ac),_0x3ccd54?util[_0x746a('0x5c')](_0x746a('0x5e'),encodeURIComponent(_0x3ccd54)):'freeform=3');return uploadFile(_0x29ab06)[_0x746a('0x2f')](function(_0x17ef95){return querystring[_0x746a('0x4')](_0x17ef95);});};exports[_0x746a('0x5f')]=function(_0x18180e,_0x433ec1){return sestek[_0x746a('0x60')](_0x18180e,_0x433ec1)[_0x746a('0x2f')](function(_0x5f4a88){logger[_0x746a('0x1c')](JSON[_0x746a('0x4e')](_0x5f4a88));var _0x1b6736={'speech':_0x5f4a88[_0x746a('0x61')],'action':_0x5f4a88[_0x746a('0x62')]?_0x5f4a88[_0x746a('0x62')][_0x746a('0x63')]:undefined,'actiondata':_0x5f4a88['channelData']?_0x5f4a88['channelData']['CustomActionData']:undefined};if(_0x5f4a88[_0x746a('0x62')]&&_0x5f4a88[_0x746a('0x62')][_0x746a('0x64')]){return base64Decode(_0x5f4a88[_0x746a('0x62')][_0x746a('0x64')][_0x746a('0x65')],path[_0x746a('0x29')](__dirname,_0x746a('0x2a'),rs['generate'](0x4)+_0x746a('0x2c')))[_0x746a('0x2f')](function(_0x2e695a){_0x1b6736[_0x746a('0x66')]=_0x2e695a;return _0x1b6736;});}return _0x1b6736;});};exports[_0x746a('0x67')]=function(){return __dirname;};
\ No newline at end of file
+var _0x27c9=['catch','[%s]\x20%s:%s','name','message','googleDialogflow','result','source','resolvedQuery','action','actionIncomplete','fulfillment','speech','status','metadata','endConversation','isFallbackIntent','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','awsPolly','polly','awsLex','stringify','ispeechTTS','format','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','model=%s','freeform=3','text','channelData','CustomAction','CustomActionData','AudioFromTts','Data','path','http','https','parse','bluebird','randomstring','sox','request-promise','util','querystring','google-tts-api','apiai-promise','./google','./aws','./tilde','./sestek','../../../config/logger','agi','https://api.ispeech.org/api/rest','protocol','https:','host','WHAT_EVER','get','statusCode','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','finish','finish\x20download\x20file','close','unlink','download\x20error','pipe','end','data','error\x20convert','info','finish\x20to\x20convert','start','resolve','tmp','generate','.wav','writeFileSync','base64','then','chmodSync','777','split','readFileSync','toString','https://texttospeech.googleapis.com/v1/','?key=','ssml','input','voice','audioConfig','MP3','POST','.mp3','from','audioContent','writeFile','googleCloudTTS\x20path','googleTTS','goggleTTS\x20path','googleASR','asr','map','alternatives','transcript','join','results','confidence','googleASR\x20confidence'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x27c9,0x1e7));var _0x927c=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x27c9[_0x465028];return _0xb783d4;};'use strict';var fs=require('fs');var path=require(_0x927c('0x0'));var http=require(_0x927c('0x1'));var https=require(_0x927c('0x2'));var urlParse=require('url')[_0x927c('0x3')];var BPromise=require(_0x927c('0x4'));var rs=require(_0x927c('0x5'));var sox=require(_0x927c('0x6'));var rp=require(_0x927c('0x7'));var util=require(_0x927c('0x8'));var querystring=require(_0x927c('0x9'));var tts=require(_0x927c('0xa'));var apiai=require(_0x927c('0xb'));var md5=require('md5');var google=require(_0x927c('0xc'));var aws=require(_0x927c('0xd'));var tilde=require(_0x927c('0xe'));var sestek=require(_0x927c('0xf'));var logger=require(_0x927c('0x10'))(_0x927c('0x11'));var ISPEECH_API=_0x927c('0x12');function downloadFile(_0x53608a,_0x1bbf19){return new BPromise(function(_0x413876,_0x29839f){var _0x37be84=urlParse(_0x53608a);var _0x7a4fbd=_0x37be84[_0x927c('0x13')]===_0x927c('0x14')?https:http;var _0x24b575={'host':_0x37be84[_0x927c('0x15')],'path':_0x37be84[_0x927c('0x0')],'headers':{'user-agent':_0x927c('0x16')}};_0x7a4fbd[_0x927c('0x17')](_0x24b575,function(_0x2bb0ae){if(_0x2bb0ae[_0x927c('0x18')]!==0xc8){logger[_0x927c('0x19')](_0x927c('0x1a')+_0x53608a+_0x927c('0x1b')+_0x2bb0ae[_0x927c('0x18')]+'\x20('+_0x2bb0ae[_0x927c('0x1c')]+')');_0x29839f(new Error(_0x927c('0x1a')+_0x53608a+_0x927c('0x1b')+_0x2bb0ae[_0x927c('0x18')]+'\x20('+_0x2bb0ae['statusMessage']+')'));return;}var _0x4e60b6=fs[_0x927c('0x1d')](_0x1bbf19);_0x4e60b6['on'](_0x927c('0x1e'),function(){logger['info'](_0x927c('0x1f'));_0x4e60b6[_0x927c('0x20')](_0x413876);});_0x4e60b6['on'](_0x927c('0x19'),function(_0x2b9008){fs[_0x927c('0x21')](_0x1bbf19);logger[_0x927c('0x19')](_0x927c('0x22'),_0x2b9008);_0x29839f(_0x2b9008);});_0x2bb0ae[_0x927c('0x23')](_0x4e60b6);})['on'](_0x927c('0x19'),function(_0x5a46d4){logger[_0x927c('0x19')](_0x5a46d4);_0x29839f(_0x5a46d4);})[_0x927c('0x24')]();});}function uploadFile(_0x574405){return new BPromise(function(_0x450f0b,_0xeac4c9){var _0x57c762=urlParse(_0x574405);var _0x451f05=_0x57c762[_0x927c('0x13')]===_0x927c('0x14')?https:http;var _0x2e56a9={'host':_0x57c762['host'],'path':_0x57c762[_0x927c('0x0')],'headers':{'user-agent':_0x927c('0x16')}};_0x451f05[_0x927c('0x17')](_0x2e56a9,function(_0x13bdde){if(_0x13bdde[_0x927c('0x18')]!==0xc8){_0xeac4c9(new Error('request\x20to\x20'+_0x574405+_0x927c('0x1b')+_0x13bdde[_0x927c('0x18')]+'\x20('+_0x13bdde[_0x927c('0x1c')]+')'));return;}var _0x35f9ba='';_0x13bdde['on'](_0x927c('0x25'),function(_0xde7048){_0x35f9ba+=_0xde7048;});_0x13bdde['on'](_0x927c('0x24'),function(){_0x450f0b(_0x35f9ba);});})['on'](_0x927c('0x19'),function(_0x3e89a9){_0xeac4c9(_0x3e89a9);})['end']();});}function convertFile(_0x5dd7be,_0x32670f){return new BPromise(function(_0x10b11b,_0x5bb058){var _0x37eac7=sox['transcode'](_0x5dd7be,_0x32670f,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x37eac7['on'](_0x927c('0x19'),function(_0x524a90){logger[_0x927c('0x19')](_0x927c('0x26'),_0x524a90);_0x5bb058(_0x524a90);});_0x37eac7['on']('end',function(){logger[_0x927c('0x27')](_0x927c('0x28'));_0x10b11b();});_0x37eac7[_0x927c('0x29')]();});}function base64Decode(_0x367d94,_0x15985b){var _0x1e4c13=path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs[_0x927c('0x2c')](0x4)+_0x927c('0x2d'));fs[_0x927c('0x2e')](_0x1e4c13,_0x367d94,_0x927c('0x2f'));return convertFile(_0x1e4c13,_0x15985b)[_0x927c('0x30')](function(){try{fs[_0x927c('0x21')](_0x1e4c13);fs[_0x927c('0x31')](_0x15985b,_0x927c('0x32'));}catch(_0x42b005){logger[_0x927c('0x19')](_0x42b005);}return _0x15985b[_0x927c('0x33')]('.')[0x0];});}function base64Encode(_0x38ae98){var _0x463d58=fs[_0x927c('0x34')](_0x38ae98);return new Buffer(_0x463d58)[_0x927c('0x35')](_0x927c('0x2f'));}exports['googleCloudTTS']=function(_0x17f0cb,_0x5cc176,_0x230d6d,_0x413d64,_0x408183,_0x49eb28){var _0x44510c,_0x253839;var _0x2c9bc9=_0x927c('0x36');var _0x47929=_0x927c('0x37')+_0x17f0cb;var _0x13b3a3={};if(_0x5cc176===_0x927c('0x38')){_0x13b3a3[_0x927c('0x39')]={'ssml':_0x230d6d};}else{_0x13b3a3[_0x927c('0x39')]={'text':_0x230d6d};};_0x13b3a3[_0x927c('0x3a')]={'languageCode':_0x413d64,'ssmlGender':_0x408183};_0x13b3a3[_0x927c('0x3b')]={'audioEncoding':_0x927c('0x3c'),'sampleRateHertz':0x1f40};var _0x3d9440={'url':_0x2c9bc9+'text:synthesize'+_0x47929,'method':_0x927c('0x3d'),'json':!![],'body':_0x13b3a3};return rp(_0x3d9440)[_0x927c('0x30')](function(_0x234cfc){return new BPromise(function(_0x3c5655,_0xbef4a3){_0x44510c=path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs[_0x927c('0x2c')](0x4)+_0x927c('0x3e'));var _0x36bf63=Buffer[_0x927c('0x3f')](_0x234cfc[_0x927c('0x40')],_0x927c('0x2f'));return fs[_0x927c('0x41')](_0x44510c,_0x36bf63,function(_0x4341fd){_0xbef4a3(_0x4341fd);},function(_0x2c36c6){fs[_0x927c('0x31')](_0x44510c,'777');_0x3c5655(_0x2c36c6);});});})[_0x927c('0x30')](function(_0x2014c6){_0x253839=path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs[_0x927c('0x2c')](0x4)+'.wav');return convertFile(_0x44510c,_0x253839);})['then'](function(){try{fs[_0x927c('0x21')](_0x44510c);fs['chmodSync'](_0x253839,'777');}catch(_0x179b8d){logger[_0x927c('0x19')](_0x179b8d);}logger['info'](_0x927c('0x42'),_0x253839[_0x927c('0x33')]('.')[0x0]);return _0x253839[_0x927c('0x33')]('.')[0x0];});};exports[_0x927c('0x43')]=function(_0x5c9c4b,_0x1e2e5f){var _0x5db3ed,_0xef7c01;return tts(_0x5c9c4b,_0x1e2e5f||'en',0x1)['then'](function(_0x3692d1){logger['info'](_0x3692d1);_0x5db3ed=path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs['generate'](0x4)+_0x927c('0x3e'));return downloadFile(_0x3692d1,_0x5db3ed);})[_0x927c('0x30')](function(){_0xef7c01=path['resolve'](__dirname,'tmp',rs[_0x927c('0x2c')](0x4)+_0x927c('0x2d'));return convertFile(_0x5db3ed,_0xef7c01);})[_0x927c('0x30')](function(){try{fs[_0x927c('0x21')](_0x5db3ed);fs[_0x927c('0x31')](_0xef7c01,_0x927c('0x32'));}catch(_0x37efbe){logger[_0x927c('0x19')](_0x37efbe);}logger[_0x927c('0x27')](_0x927c('0x44'),_0xef7c01[_0x927c('0x33')]('.')[0x0]);return _0xef7c01['split']('.')[0x0];});};exports[_0x927c('0x45')]=function(_0x38b0df,_0xd72e77,_0x14250b){return google[_0x927c('0x46')](_0x38b0df,_0xd72e77,_0x14250b)['then'](function(_0x49c89b){logger[_0x927c('0x27')](_0x49c89b['uri']);return rp(_0x49c89b);})[_0x927c('0x30')](function(_0x506def){var _0x33cd84='';var _0x972d81=0x0;try{fs[_0x927c('0x21')](_0x38b0df);}catch(_0x514af3){logger[_0x927c('0x19')](_0x514af3);}if(_0x506def&&_0x506def['results']){_0x33cd84=_0x506def['results'][_0x927c('0x47')](function(_0x1d2144){return _0x1d2144&&_0x1d2144['alternatives'][0x0]&&_0x1d2144[_0x927c('0x48')][0x0][_0x927c('0x49')]?_0x1d2144['alternatives'][0x0][_0x927c('0x49')]:'';})[_0x927c('0x4a')]('\x0a');_0x972d81=_0x506def[_0x927c('0x4b')][_0x927c('0x47')](function(_0xc40a0c){return _0xc40a0c&&_0xc40a0c[_0x927c('0x48')][0x0]&&_0xc40a0c['alternatives'][0x0][_0x927c('0x4c')]?_0xc40a0c[_0x927c('0x48')][0x0][_0x927c('0x4c')]:0x0;})[_0x927c('0x4a')]('\x0a');}logger[_0x927c('0x27')]('googleASR\x20transcription',_0x33cd84);logger[_0x927c('0x27')](_0x927c('0x4d'),_0x972d81);return{'transcript':_0x33cd84,'confidence':_0x972d81};})[_0x927c('0x4e')](function(_0x437b71){logger['error'](_0x927c('0x4f'),_0x437b71[_0x927c('0x18')],_0x437b71[_0x927c('0x50')],_0x437b71[_0x927c('0x51')]);});};exports[_0x927c('0x52')]=function(_0x45535a,_0x51471d,_0x2ddc07,_0x2621ba){var _0x22578e=apiai(_0x51471d,{'language':_0x2621ba||'en'});return _0x22578e['textRequest'](_0x2ddc07,{'sessionId':md5(_0x45535a)})[_0x927c('0x30')](function(_0x203893){logger[_0x927c('0x27')](JSON['stringify'](_0x203893));return{'source':_0x203893[_0x927c('0x53')][_0x927c('0x54')],'resolvedQuery':_0x203893['result'][_0x927c('0x55')],'action':_0x203893[_0x927c('0x53')][_0x927c('0x56')],'actionIncomplete':_0x203893['result'][_0x927c('0x57')],'speech':_0x203893[_0x927c('0x53')][_0x927c('0x58')][_0x927c('0x59')],'score':_0x203893[_0x927c('0x53')]['score'],'statusCode':_0x203893[_0x927c('0x5a')]['code'],'endConversation':_0x203893[_0x927c('0x53')][_0x927c('0x5b')][_0x927c('0x5c')]||![],'isFallbackIntent':_0x203893['result'][_0x927c('0x5b')][_0x927c('0x5d')]};});};exports[_0x927c('0x5e')]=function(_0x14bf54,_0x11bcde,_0xa82a9b,_0x306460){return tilde[_0x927c('0x46')](_0x14bf54,_0x11bcde,_0xa82a9b,_0x306460)[_0x927c('0x30')](function(_0x3fe387){try{fs[_0x927c('0x21')](_0x14bf54);}catch(_0x151c9f){logger['error'](_0x151c9f);}logger[_0x927c('0x27')](_0x927c('0x5f'),_0x3fe387[_0x927c('0x49')]);logger[_0x927c('0x27')](_0x927c('0x60'),_0x3fe387[_0x927c('0x4c')]);return _0x3fe387;});};exports[_0x927c('0x61')]=function(_0x50d51e,_0x15b3cb,_0x39226a,_0x3536ce,_0x40f464,_0x5eeea0){var _0xfb9399=path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs['generate'](0x4)+_0x927c('0x3e'));var _0x4a113d;return aws[_0x927c('0x62')](_0x50d51e,_0x15b3cb,_0x39226a,_0x3536ce,_0x40f464,_0x5eeea0,_0xfb9399)['then'](function(){_0x4a113d=path['resolve'](__dirname,'tmp',rs[_0x927c('0x2c')](0x4)+_0x927c('0x2d'));return convertFile(_0xfb9399,_0x4a113d);})[_0x927c('0x30')](function(){try{fs[_0x927c('0x21')](_0xfb9399);fs[_0x927c('0x31')](_0x4a113d,_0x927c('0x32'));}catch(_0x4a3b1c){logger[_0x927c('0x19')](_0x4a3b1c);}return _0x4a113d[_0x927c('0x33')]('.')[0x0];});};exports[_0x927c('0x63')]=function(_0xacf376,_0x5d080b,_0x53f052,_0x89590a,_0x26ec8b,_0x15c7b6){return aws['lex'](_0xacf376,_0x5d080b,_0x53f052,_0x89590a,_0x26ec8b,_0x15c7b6)[_0x927c('0x30')](function(_0x1eb11d){logger['info'](JSON[_0x927c('0x64')](_0x1eb11d));return _0x1eb11d;});};exports[_0x927c('0x65')]=function(_0x47cd8e,_0x5e8583,_0x5379a0,_0x3e1065){var _0x198ebd=util[_0x927c('0x66')]('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x47cd8e,encodeURIComponent(_0x5e8583),_0x5379a0,_0x3e1065);var _0xb150c=path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs['generate'](0x4)+_0x927c('0x3e'));var _0x11a6aa;return downloadFile(_0x198ebd,_0xb150c)['then'](function(){_0x11a6aa=path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs[_0x927c('0x2c')](0x4)+_0x927c('0x2d'));return convertFile(_0xb150c,_0x11a6aa);})[_0x927c('0x30')](function(){try{fs[_0x927c('0x21')](_0xb150c);fs[_0x927c('0x31')](_0x11a6aa,_0x927c('0x32'));}catch(_0x38d0da){logger[_0x927c('0x19')](_0x38d0da);}return _0x11a6aa[_0x927c('0x33')]('.')[0x0];});};exports[_0x927c('0x67')]=function(_0x260d79,_0x1cd07a,_0x5a12b3,_0x1f4c33){var _0x493269=util[_0x927c('0x66')](_0x927c('0x68'),ISPEECH_API,_0x1cd07a,_0x5a12b3,base64Encode(_0x260d79),_0x1f4c33?util['format'](_0x927c('0x69'),encodeURIComponent(_0x1f4c33)):_0x927c('0x6a'));return uploadFile(_0x493269)[_0x927c('0x30')](function(_0x3c3b8){return querystring['parse'](_0x3c3b8);});};exports['sestekNDA']=function(_0x42ffa6,_0x24e3cb){return sestek['nda'](_0x42ffa6,_0x24e3cb)[_0x927c('0x30')](function(_0x2beab6){logger['info'](JSON[_0x927c('0x64')](_0x2beab6));var _0x4665f8={'speech':_0x2beab6[_0x927c('0x6b')],'action':_0x2beab6[_0x927c('0x6c')]?_0x2beab6[_0x927c('0x6c')][_0x927c('0x6d')]:undefined,'actiondata':_0x2beab6[_0x927c('0x6c')]?_0x2beab6[_0x927c('0x6c')][_0x927c('0x6e')]:undefined};if(_0x2beab6[_0x927c('0x6c')]&&_0x2beab6[_0x927c('0x6c')][_0x927c('0x6f')]){return base64Decode(_0x2beab6['channelData'][_0x927c('0x6f')][_0x927c('0x70')],path[_0x927c('0x2a')](__dirname,_0x927c('0x2b'),rs[_0x927c('0x2c')](0x4)+_0x927c('0x2d')))[_0x927c('0x30')](function(_0x188f82){_0x4665f8['audiofile']=_0x188f82;return _0x4665f8;});}return _0x4665f8;});};exports['dirName']=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 0423866..d22f4c2 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 _0x5901=['./nda'];(function(_0x408559,_0x175326){var _0x3dbd3d=function(_0x105bee){while(--_0x105bee){_0x408559['push'](_0x408559['shift']());}};_0x3dbd3d(++_0x175326);}(_0x5901,0x1b3));var _0x1590=function(_0x7c5a3d,_0x26f546){_0x7c5a3d=_0x7c5a3d-0x0;var _0x5df2d6=_0x5901[_0x7c5a3d];return _0x5df2d6;};var nda=require(_0x1590('0x0'));module['exports']={'nda':nda};
\ No newline at end of file
+var _0x5eac=['./nda','exports'];(function(_0x5eb048,_0x5069ab){var _0x17f0c0=function(_0x484a2a){while(--_0x484a2a){_0x5eb048['push'](_0x5eb048['shift']());}};_0x17f0c0(++_0x5069ab);}(_0x5eac,0x76));var _0xc5ea=function(_0x382eb3,_0x411573){_0x382eb3=_0x382eb3-0x0;var _0x3a60b4=_0x5eac[_0x382eb3];return _0x3a60b4;};var nda=require(_0xc5ea('0x0'));module[_0xc5ea('0x1')]={'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 86c8618..72cb434 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 _0x13d9=['body','channelData','ProjectName','ndagenerate_audio','AudioOutputSettings','custom_action','CustomAction','custom_action_data','CustomActionData','info','stringify','request-promise','url','agi','exports','POST','resolve','/token','password','username','then','ndaactivity_type','calleridname','dnid','text','Bearer\x20','access_token','project'];(function(_0x10c555,_0x12c27b){var _0x2bd097=function(_0x3fba08){while(--_0x3fba08){_0x10c555['push'](_0x10c555['shift']());}};_0x2bd097(++_0x12c27b);}(_0x13d9,0xcf));var _0x913d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x13d9[_0x3dd15e];return _0x231fd0;};'use strict';var rp=require(_0x913d('0x0'));var url=require(_0x913d('0x1'));var logger=require('../../../../../config/logger')(_0x913d('0x2'));module[_0x913d('0x3')]=function(_0x406c5d,_0x53437c){var _0x3fd70e={'method':_0x913d('0x4'),'uri':url[_0x913d('0x5')](_0x53437c['ndauth_url'],_0x913d('0x6')),'form':{'grant_type':_0x913d('0x7'),'username':_0x53437c[_0x913d('0x8')],'password':_0x53437c[_0x913d('0x7')]},'json':!![]};return rp(_0x3fd70e)[_0x913d('0x9')](function(_0x1a4f45){var _0x1ca576={'method':_0x913d('0x4'),'uri':url[_0x913d('0x5')](_0x53437c['ndassistant_url'],'/api/NaturalDialogAssistant/v1/Run'),'body':{'type':_0x53437c[_0x913d('0xa')]||'message','channelId':'Nda','conversation':{'id':_0x406c5d['uniqueid']},'from':{'id':_0x406c5d['callerid'],'name':_0x406c5d[_0x913d('0xb')]},'recipient':{'id':_0x406c5d[_0x913d('0xc')],'name':_0x406c5d['extension']},'text':_0x53437c[_0x913d('0xd')],'channelData':{}},'headers':{'Authorization':_0x913d('0xe')+_0x1a4f45[_0x913d('0xf')]},'json':!![]};if(_0x53437c[_0x913d('0x10')]){_0x1ca576[_0x913d('0x11')][_0x913d('0x12')][_0x913d('0x13')]=_0x53437c[_0x913d('0x10')];}if(_0x53437c[_0x913d('0x14')]=='1'){_0x1ca576[_0x913d('0x11')][_0x913d('0x12')][_0x913d('0x15')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':'audio/wav'};}if(_0x53437c[_0x913d('0x16')]){_0x1ca576['body']['channelData'][_0x913d('0x17')]=_0x53437c[_0x913d('0x16')];if(_0x53437c[_0x913d('0x18')]){_0x1ca576[_0x913d('0x11')]['channelData'][_0x913d('0x19')]=_0x53437c[_0x913d('0x18')];}}logger[_0x913d('0x1a')](JSON[_0x913d('0x1b')](_0x1ca576));return rp(_0x1ca576);});};
\ No newline at end of file
+var _0xa9fd=['ndagenerate_audio','AudioOutputSettings','audio/wav','custom_action','CustomAction','CustomActionData','custom_action_data','info','stringify','request-promise','../../../../../config/logger','agi','exports','POST','resolve','ndauth_url','username','password','then','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','dnid','extension','text','Bearer\x20','access_token','project','body','channelData'];(function(_0x29c112,_0x42b33d){var _0x4c8e98=function(_0x18f758){while(--_0x18f758){_0x29c112['push'](_0x29c112['shift']());}};_0x4c8e98(++_0x42b33d);}(_0xa9fd,0x13f));var _0xda9f=function(_0x120cdd,_0x58ae44){_0x120cdd=_0x120cdd-0x0;var _0x18c10f=_0xa9fd[_0x120cdd];return _0x18c10f;};'use strict';var rp=require(_0xda9f('0x0'));var url=require('url');var logger=require(_0xda9f('0x1'))(_0xda9f('0x2'));module[_0xda9f('0x3')]=function(_0x2cad10,_0x5a4da8){var _0x26dca3={'method':_0xda9f('0x4'),'uri':url[_0xda9f('0x5')](_0x5a4da8[_0xda9f('0x6')],'/token'),'form':{'grant_type':'password','username':_0x5a4da8[_0xda9f('0x7')],'password':_0x5a4da8[_0xda9f('0x8')]},'json':!![]};return rp(_0x26dca3)[_0xda9f('0x9')](function(_0x4901f8){var _0x2bba19={'method':_0xda9f('0x4'),'uri':url[_0xda9f('0x5')](_0x5a4da8['ndassistant_url'],_0xda9f('0xa')),'body':{'type':_0x5a4da8[_0xda9f('0xb')]||_0xda9f('0xc'),'channelId':_0xda9f('0xd'),'conversation':{'id':_0x2cad10['uniqueid']},'from':{'id':_0x2cad10['callerid'],'name':_0x2cad10['calleridname']},'recipient':{'id':_0x2cad10[_0xda9f('0xe')],'name':_0x2cad10[_0xda9f('0xf')]},'text':_0x5a4da8[_0xda9f('0x10')],'channelData':{}},'headers':{'Authorization':_0xda9f('0x11')+_0x4901f8[_0xda9f('0x12')]},'json':!![]};if(_0x5a4da8[_0xda9f('0x13')]){_0x2bba19[_0xda9f('0x14')][_0xda9f('0x15')]['ProjectName']=_0x5a4da8[_0xda9f('0x13')];}if(_0x5a4da8[_0xda9f('0x16')]=='1'){_0x2bba19[_0xda9f('0x14')][_0xda9f('0x15')][_0xda9f('0x17')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0xda9f('0x18')};}if(_0x5a4da8[_0xda9f('0x19')]){_0x2bba19['body'][_0xda9f('0x15')][_0xda9f('0x1a')]=_0x5a4da8[_0xda9f('0x19')];if(_0x5a4da8['custom_action_data']){_0x2bba19[_0xda9f('0x14')][_0xda9f('0x15')][_0xda9f('0x1b')]=_0x5a4da8[_0xda9f('0x1c')];}}logger[_0xda9f('0x1d')](JSON[_0xda9f('0x1e')](_0x2bba19));return rp(_0x2bba19);});};
\ 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 b7b1573..2dc2ebd 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 _0x241b=['exports'];(function(_0x5ab910,_0x713866){var _0xff7a7a=function(_0x2222f2){while(--_0x2222f2){_0x5ab910['push'](_0x5ab910['shift']());}};_0xff7a7a(++_0x713866);}(_0x241b,0x13f));var _0xb241=function(_0x53addd,_0x438479){_0x53addd=_0x53addd-0x0;var _0x10df6a=_0x241b[_0x53addd];return _0x10df6a;};'use strict';var asr=require('./lib/api');module[_0xb241('0x0')]=function(_0x2e7bbb,_0x3c3353,_0x363220,_0x3e1e2f){return asr(_0x2e7bbb,_0x3c3353,_0x363220,_0x3e1e2f);};
\ No newline at end of file
+'use strict';var asr=require('./lib/api');module['exports']=function(_0x326133,_0x73247c,_0x138f93,_0x3a9b38){return asr(_0x326133,_0x73247c,_0x138f93,_0x3a9b38);};
\ 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 2f91b28..c1d2e25 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 _0xc9ab=['result','final','Tilde\x20ASR\x20hypoteses','hypotheses','transcript','likelihood','Success.','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isNil','isObject','open','message','close','bluebird','lodash','moment','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','createHash','hex','Open\x20Tilde\x20ASR\x20socket','unix','send','stringify','data','EOS','error','Tilde\x20ASR\x20send\x20error','terminate','parse'];(function(_0x3d27ba,_0x2671a3){var _0xf01885=function(_0x311f5c){while(--_0x311f5c){_0x3d27ba['push'](_0x3d27ba['shift']());}};_0xf01885(++_0x2671a3);}(_0xc9ab,0x125));var _0xbc9a=function(_0x54f366,_0x2dea22){_0x54f366=_0x54f366-0x0;var _0x18e790=_0xc9ab[_0x54f366];return _0x18e790;};'use strict';var BPromise=require(_0xbc9a('0x0'));var _=require(_0xbc9a('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0xbc9a('0x2'));var crypto=require('crypto');var logger=require('../../../../../../config/logger')('agi');module[_0xbc9a('0x3')]=function(_0x20e8eb,_0x23d40c,_0x33e557,_0x16f84d){return new BPromise(function(_0x3e54f8,_0x5478ec){logger[_0xbc9a('0x4')](_0xbc9a('0x5'),_0x16f84d||_0xbc9a('0x6'));var _0x26f5f4=new WebSocket(_0x16f84d||_0xbc9a('0x6'),{'perMessageDeflate':![]});var _0x18beac='';var _0x342888='0';var _0x4b08b2='1';var _0x54caf0='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';function _0x2d927f(_0x58f385){var _0x3ba3bc=crypto[_0xbc9a('0x7')]('sha1');_0x3ba3bc['update'](_0x58f385);return _0x3ba3bc['digest'](_0xbc9a('0x8'));}function _0x350e8d(){try{logger['info'](_0xbc9a('0x9'));var _0x29538f=moment()[_0xbc9a('0xa')]();var _0x3f0436=_0x2d927f(_0x29538f+_0x23d40c+_0x33e557);_0x26f5f4[_0xbc9a('0xb')](JSON[_0xbc9a('0xc')]({'appID':_0x23d40c,'timestamp':_0x29538f,'appKey':_0x3f0436}));var _0x4601c9=fs['createReadStream'](_0x20e8eb);_0x4601c9['on'](_0xbc9a('0xd'),function(_0x417527){_0x26f5f4[_0xbc9a('0xb')](_0x417527);});_0x4601c9['on']('close',function(){_0x26f5f4['send'](_0xbc9a('0xe'));});}catch(_0x2026fa){logger[_0xbc9a('0xf')](_0xbc9a('0x10'),JSON[_0xbc9a('0xc')](_0x2026fa));_0x26f5f4[_0xbc9a('0x11')]();}}function _0x585954(_0x4b1f4a){try{if(_0x4b1f4a){var _0x1f11ca=JSON[_0xbc9a('0x12')](_0x4b1f4a);switch(_0x1f11ca['status']){case 0x0:if(_0x1f11ca[_0xbc9a('0x13')]){if(_0x1f11ca[_0xbc9a('0x13')][_0xbc9a('0x14')]){logger['info'](_0xbc9a('0x15'),JSON[_0xbc9a('0xc')](_0x1f11ca[_0xbc9a('0x13')][_0xbc9a('0x16')]));_0x18beac=_0x1f11ca[_0xbc9a('0x13')][_0xbc9a('0x16')][0x0][_0xbc9a('0x17')];_0x342888=_0x1f11ca[_0xbc9a('0x13')][_0xbc9a('0x16')][0x0][_0xbc9a('0x18')];_0x4b08b2='0';_0x54caf0=_0xbc9a('0x19');_0x26f5f4['terminate']();}}break;case 0x1:logger['info'](_0xbc9a('0x1a'));_0x4b08b2='1';_0x54caf0=_0xbc9a('0x1a');break;case 0x2:logger[_0xbc9a('0x4')](_0xbc9a('0x1b'));_0x4b08b2='2';_0x54caf0=_0xbc9a('0x1b');break;case 0x9:logger[_0xbc9a('0x4')](_0xbc9a('0x1c'));_0x4b08b2='9';_0x54caf0=_0xbc9a('0x1c');break;case 0xa:logger[_0xbc9a('0x4')](_0xbc9a('0x1d'));_0x4b08b2='10';_0x54caf0=_0xbc9a('0x1d');break;case 0xb:logger[_0xbc9a('0x4')]('All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.');_0x4b08b2='11';_0x54caf0=_0xbc9a('0x1e');}}}catch(_0x2c2b68){logger[_0xbc9a('0xf')](_0xbc9a('0x1f'),JSON[_0xbc9a('0xc')](_0x2c2b68));_0x26f5f4[_0xbc9a('0x11')]();}}function _0x2ea21b(){logger['info'](_0xbc9a('0x20'));_0x3e54f8({'transcript':_0x18beac,'confidence':_0x342888,'status':_0x4b08b2,'status_message':_0x54caf0});}function _0x176a4f(_0x34a217){logger['error'](_0xbc9a('0x21'));if(!_[_0xbc9a('0x22')](_0x34a217)){logger[_0xbc9a('0xf')](_[_0xbc9a('0x23')](_0x34a217)?JSON[_0xbc9a('0xc')](_0x34a217):_0x34a217);}}_0x26f5f4['on'](_0xbc9a('0x24'),_0x350e8d);_0x26f5f4['on'](_0xbc9a('0x25'),_0x585954);_0x26f5f4['on'](_0xbc9a('0x26'),_0x2ea21b);_0x26f5f4['on'](_0xbc9a('0xf'),_0x176a4f);});};
\ No newline at end of file
+var _0xbf97=['stringify','createReadStream','EOS','error','Tilde\x20ASR\x20send\x20error','terminate','parse','status','result','final','hypotheses','transcript','likelihood','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isObject','message','lodash','moment','crypto','../../../../../../config/logger','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','createHash','sha1','update','hex','Open\x20Tilde\x20ASR\x20socket','send'];(function(_0x55c355,_0x2cd263){var _0x2e2f75=function(_0x2cc805){while(--_0x2cc805){_0x55c355['push'](_0x55c355['shift']());}};_0x2e2f75(++_0x2cd263);}(_0xbf97,0x1d3));var _0x7bf9=function(_0x24cb69,_0x4395be){_0x24cb69=_0x24cb69-0x0;var _0xed5ecd=_0xbf97[_0x24cb69];return _0xed5ecd;};'use strict';var BPromise=require('bluebird');var _=require(_0x7bf9('0x0'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0x7bf9('0x1'));var crypto=require(_0x7bf9('0x2'));var logger=require(_0x7bf9('0x3'))('agi');module[_0x7bf9('0x4')]=function(_0x2e49ab,_0x4697d0,_0x150b30,_0x23b7e6){return new BPromise(function(_0x26e0cf,_0x4f81bc){logger[_0x7bf9('0x5')](_0x7bf9('0x6'),_0x23b7e6||_0x7bf9('0x7'));var _0x1fd1b9=new WebSocket(_0x23b7e6||_0x7bf9('0x7'),{'perMessageDeflate':![]});var _0x49ea63='';var _0x3f7c8a='0';var _0x2abc5f='1';var _0x42a247='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';function _0x552b95(_0x5bc675){var _0x5d2683=crypto[_0x7bf9('0x8')](_0x7bf9('0x9'));_0x5d2683[_0x7bf9('0xa')](_0x5bc675);return _0x5d2683['digest'](_0x7bf9('0xb'));}function _0x35cb39(){try{logger[_0x7bf9('0x5')](_0x7bf9('0xc'));var _0x5f4b6d=moment()['unix']();var _0x1a07e8=_0x552b95(_0x5f4b6d+_0x4697d0+_0x150b30);_0x1fd1b9[_0x7bf9('0xd')](JSON[_0x7bf9('0xe')]({'appID':_0x4697d0,'timestamp':_0x5f4b6d,'appKey':_0x1a07e8}));var _0x453301=fs[_0x7bf9('0xf')](_0x2e49ab);_0x453301['on']('data',function(_0x479ab9){_0x1fd1b9[_0x7bf9('0xd')](_0x479ab9);});_0x453301['on']('close',function(){_0x1fd1b9['send'](_0x7bf9('0x10'));});}catch(_0x49917c){logger[_0x7bf9('0x11')](_0x7bf9('0x12'),JSON[_0x7bf9('0xe')](_0x49917c));_0x1fd1b9[_0x7bf9('0x13')]();}}function _0x38e6df(_0x13fe6d){try{if(_0x13fe6d){var _0x558b85=JSON[_0x7bf9('0x14')](_0x13fe6d);switch(_0x558b85[_0x7bf9('0x15')]){case 0x0:if(_0x558b85[_0x7bf9('0x16')]){if(_0x558b85['result'][_0x7bf9('0x17')]){logger[_0x7bf9('0x5')]('Tilde\x20ASR\x20hypoteses',JSON[_0x7bf9('0xe')](_0x558b85[_0x7bf9('0x16')][_0x7bf9('0x18')]));_0x49ea63=_0x558b85['result'][_0x7bf9('0x18')][0x0][_0x7bf9('0x19')];_0x3f7c8a=_0x558b85['result'][_0x7bf9('0x18')][0x0][_0x7bf9('0x1a')];_0x2abc5f='0';_0x42a247='Success.';_0x1fd1b9[_0x7bf9('0x13')]();}}break;case 0x1:logger['info'](_0x7bf9('0x1b'));_0x2abc5f='1';_0x42a247=_0x7bf9('0x1b');break;case 0x2:logger['info']('Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.');_0x2abc5f='2';_0x42a247=_0x7bf9('0x1c');break;case 0x9:logger[_0x7bf9('0x5')](_0x7bf9('0x1d'));_0x2abc5f='9';_0x42a247=_0x7bf9('0x1d');break;case 0xa:logger[_0x7bf9('0x5')]('Authentication\x20failed.');_0x2abc5f='10';_0x42a247=_0x7bf9('0x1e');break;case 0xb:logger[_0x7bf9('0x5')](_0x7bf9('0x1f'));_0x2abc5f='11';_0x42a247='All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.';}}}catch(_0x29309a){logger['error'](_0x7bf9('0x20'),JSON[_0x7bf9('0xe')](_0x29309a));_0x1fd1b9[_0x7bf9('0x13')]();}}function _0x4401f7(){logger['info'](_0x7bf9('0x21'));_0x26e0cf({'transcript':_0x49ea63,'confidence':_0x3f7c8a,'status':_0x2abc5f,'status_message':_0x42a247});}function _0x2e1296(_0x52bd63){logger['error'](_0x7bf9('0x22'));if(!_['isNil'](_0x52bd63)){logger['error'](_[_0x7bf9('0x23')](_0x52bd63)?JSON[_0x7bf9('0xe')](_0x52bd63):_0x52bd63);}}_0x1fd1b9['on']('open',_0x35cb39);_0x1fd1b9['on'](_0x7bf9('0x24'),_0x38e6df);_0x1fd1b9['on']('close',_0x4401f7);_0x1fd1b9['on'](_0x7bf9('0x11'),_0x2e1296);});};
\ 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 9934f51..2025cc9 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 _0x6351=['exports','./asr'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6351,0x12f));var _0x1635=function(_0x1a3a9c,_0x4d1ad7){_0x1a3a9c=_0x1a3a9c-0x0;var _0xe1dd66=_0x6351[_0x1a3a9c];return _0xe1dd66;};var asr=require(_0x1635('0x0'));module[_0x1635('0x1')]={'asr':asr};
\ No newline at end of file
+var _0xda90=['./asr','exports'];(function(_0x42c445,_0x41cf5b){var _0x4f9158=function(_0x3ad169){while(--_0x3ad169){_0x42c445['push'](_0x42c445['shift']());}};_0x4f9158(++_0x41cf5b);}(_0xda90,0x152));var _0x0da9=function(_0x105575,_0x21416b){_0x105575=_0x105575-0x0;var _0xac03b2=_0xda90[_0x105575];return _0xac03b2;};var asr=require(_0x0da9('0x0'));module[_0x0da9('0x1')]={'asr':asr};
\ No newline at end of file
diff --git a/server/services/agi/server.js b/server/services/agi/server.js
index 6261c9b..5f43a5f 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 _0xa739=['E_AGI_SERVER_MAXCONNECTION','ready','code','close','E_AGI_SERVER_CLOSE','inherits','net','EventEmitter','./error','127.0.0.1','call','emit','E_AGI_ARGUMENT_PORT','listen','listening','connection','E_AGI_SERVER_ERROR','error','destroy'];(function(_0x2751e8,_0x19ee57){var _0x455c9b=function(_0x481a2d){while(--_0x481a2d){_0x2751e8['push'](_0x2751e8['shift']());}};_0x455c9b(++_0x19ee57);}(_0xa739,0x1e1));var _0x9a73=function(_0x2835ca,_0x1be6ae){_0x2835ca=_0x2835ca-0x0;var _0x4f0109=_0xa739[_0x2835ca];return _0x4f0109;};'use strict';var util=require('util');var net=require(_0x9a73('0x0'));var EventEmitter=require('events')[_0x9a73('0x1')];var AGIError=require(_0x9a73('0x2'));var AGIChannel=require('./channel');var AGIServer=function(_0x149e72,_0x352cec,_0x40fb76){var _0x4ffb1a=this,_0x149e72=_0x149e72||0x11dd,_0x352cec=_0x352cec||_0x9a73('0x3'),_0xcb4e9e=null,_0x65115e=0x0;EventEmitter[_0x9a73('0x4')](_0x4ffb1a);function _0x3a6506(){if(!_0x149e72){_0x4ffb1a[_0x9a73('0x5')]('error',new AGIError(_0x9a73('0x6')));return![];}_0xcb4e9e=net['createServer']();_0xcb4e9e[_0x9a73('0x7')](_0x149e72,_0x352cec);_0xcb4e9e['on'](_0x9a73('0x8'),function(){_0x4ffb1a[_0x9a73('0x5')]('listening');});_0xcb4e9e['on'](_0x9a73('0x9'),function(_0x2ef479){_0xcb4e9e['getConnections'](function(_0x58904c,_0x379b0b){if(_0x58904c){_0x4ffb1a[_0x9a73('0x5')]('error',new AGIError(_0x9a73('0xa'),_0x58904c));}else if(_0x40fb76&&_0x40fb76<0x0){_0x4ffb1a[_0x9a73('0x5')](_0x9a73('0xb'),new AGIError('E_AGI_SERVER_VOICE_DISABLED'));_0x2ef479[_0x9a73('0xc')]();}else if(_0x40fb76&&_0x40fb76>0x0&&_0x40fb76<_0x379b0b){_0x65115e+=0x1;_0x4ffb1a[_0x9a73('0x5')]('error',new AGIError(_0x9a73('0xd'),_0x65115e));_0x2ef479[_0x9a73('0xc')]();}else{var _0x57a89a=new AGIChannel(_0x2ef479);_0x57a89a['on'](_0x9a73('0xe'),function(){_0x4ffb1a['emit'](_0x9a73('0x9'),_0x57a89a);});}});});_0xcb4e9e['on']('error',function(_0x174f26){_0x4ffb1a['emit'](_0x9a73('0xb'),new AGIError(_0x9a73('0xa'),_0x174f26[_0x9a73('0xf')]));});_0xcb4e9e['on'](_0x9a73('0x10'),function(){_0x4ffb1a[_0x9a73('0x5')](_0x9a73('0x10'),new AGIError(_0x9a73('0x11')));});}process['nextTick'](function(){_0x3a6506();});};util[_0x9a73('0x12')](AGIServer,EventEmitter);module['exports']=function(_0x9f2893,_0x451637,_0x4203a2){return new AGIServer(_0x9f2893,_0x451637,_0x4203a2);};
\ No newline at end of file
+var _0xc7b4=['error','E_AGI_SERVER_VOICE_DISABLED','destroy','ready','E_AGI_SERVER_ERROR','close','E_AGI_SERVER_CLOSE','nextTick','inherits','exports','util','events','EventEmitter','./channel','127.0.0.1','call','emit','listen','listening','connection'];(function(_0x43d11d,_0xccff91){var _0x38cd08=function(_0x131ae2){while(--_0x131ae2){_0x43d11d['push'](_0x43d11d['shift']());}};_0x38cd08(++_0xccff91);}(_0xc7b4,0x15e));var _0x4c7b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc7b4[_0x3dd15e];return _0x231fd0;};'use strict';var util=require(_0x4c7b('0x0'));var net=require('net');var EventEmitter=require(_0x4c7b('0x1'))[_0x4c7b('0x2')];var AGIError=require('./error');var AGIChannel=require(_0x4c7b('0x3'));var AGIServer=function(_0x9305d5,_0x279c21,_0x2a8b1d){var _0x109687=this,_0x9305d5=_0x9305d5||0x11dd,_0x279c21=_0x279c21||_0x4c7b('0x4'),_0x2272e8=null,_0x46532e=0x0;EventEmitter[_0x4c7b('0x5')](_0x109687);function _0x2c005a(){if(!_0x9305d5){_0x109687[_0x4c7b('0x6')]('error',new AGIError('E_AGI_ARGUMENT_PORT'));return![];}_0x2272e8=net['createServer']();_0x2272e8[_0x4c7b('0x7')](_0x9305d5,_0x279c21);_0x2272e8['on'](_0x4c7b('0x8'),function(){_0x109687[_0x4c7b('0x6')](_0x4c7b('0x8'));});_0x2272e8['on'](_0x4c7b('0x9'),function(_0x22441d){_0x2272e8['getConnections'](function(_0x1dc629,_0x3da36){if(_0x1dc629){_0x109687[_0x4c7b('0x6')](_0x4c7b('0xa'),new AGIError('E_AGI_SERVER_ERROR',_0x1dc629));}else if(_0x2a8b1d&&_0x2a8b1d<0x0){_0x109687['emit'](_0x4c7b('0xa'),new AGIError(_0x4c7b('0xb')));_0x22441d[_0x4c7b('0xc')]();}else if(_0x2a8b1d&&_0x2a8b1d>0x0&&_0x2a8b1d<_0x3da36){_0x46532e+=0x1;_0x109687[_0x4c7b('0x6')](_0x4c7b('0xa'),new AGIError('E_AGI_SERVER_MAXCONNECTION',_0x46532e));_0x22441d['destroy']();}else{var _0x4ad52f=new AGIChannel(_0x22441d);_0x4ad52f['on'](_0x4c7b('0xd'),function(){_0x109687['emit'](_0x4c7b('0x9'),_0x4ad52f);});}});});_0x2272e8['on'](_0x4c7b('0xa'),function(_0x450cb8){_0x109687[_0x4c7b('0x6')](_0x4c7b('0xa'),new AGIError(_0x4c7b('0xe'),_0x450cb8['code']));});_0x2272e8['on']('close',function(){_0x109687['emit'](_0x4c7b('0xf'),new AGIError(_0x4c7b('0x10')));});}process[_0x4c7b('0x11')](function(){_0x2c005a();});};util[_0x4c7b('0x12')](AGIServer,EventEmitter);module[_0x4c7b('0x13')]=function(_0x49d3a0,_0x30d481,_0x407bed){return new AGIServer(_0x49d3a0,_0x30d481,_0x407bed);};
\ No newline at end of file
diff --git a/server/services/agi/vertices.js b/server/services/agi/vertices.js
index 46bd48e..3e498b2 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 _0x321c=['math\x20%s','%s[%s]','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','no\x20file\x20audio\x20found','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','agentPause','PLAYBACK','Executed\x20command\x20%s\x20%s','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','indexOf','XMCS-QUEUE','toLowerCase','macro','gosub','position','QUEUE','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','RECORDING_SAVENAME','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','Response:','inspect','%s_STATUS_CODE','statusMessage','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','variable\x20%s\x20set','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','getMailAccount','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','user','bcc','subject','service','host','port','secure','authentication','pass','template_id','debug','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20found','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','Enter\x20in\x20SET\x20(%s)\x20block','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','yes','Skipped\x20Answer','subproject','project_id','no\x20subproject\x20selected','no\x20subproject\x20found\x20with\x20id\x20%d','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','sh\x20command:\x20%s\x20result\x20no\x20stored','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','Trying\x20Google\x20Cloud\x20TTS\x20%s','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','VOICEMAIL','mailbox','join','exports','path','lodash','shelljs','odbc','randomstring','moment','mustache','request-promise','../../config/logger','agi','../../config/environment','rawHeaders','rawBody','menu','getdigits','getsecretdigits','channel','rpc','prototype','getVariable','getVariableById','then','getVoiceQueue','name','getSquareProject','getSquareProjectById','catch','getSquareOdbc','getSquareOdbcById','dsn','getUser','getUserById','getTrunkById','getSound','getSoundById','save_name','getMailAccountById','sendMailMessage','mailRpc','getIntervals','getIntervalById','IntervalId','interval','%s/sounds/converted/%s','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','info','Query\x20executed\x20correctly\x20%s','close','getSmsAccount','getSmsAccountById','createSmsMessage','uniqueid','label','agicommand','callerid','createSquareRecording','calleridname','extension','accountcode','dnid','arg_1','file','createSquareMessage','createCmContact','isEmpty','callback_','random','lastName','isNil','phone','list_id','Callback\x20scheduled\x20at\x20','scheduledAt','toString','callback_priority','getPause','agent','agentUnpause','agentLogin','internal','format','%s/%s@from-sip/n','shellCommand','exec','replace','googleCloudTTS','apiKey','google_cloud_tts_text_type','text','en-US','ssmlGender','MALE','MP3','googleTTS','google_tts_language','restAPI','method','timeout','number','includes','POST','PUT','body','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','uri','render','url','stringify','headers','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','sestekNDA','ispeechTTS','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_secret_access_key','aws_polly_region','aws_polly_voice','Amy','aws_text_type','awsLex','aws_access_key_id','aws_bot_name','googleASR','google_asr_language','appid','appsecret','clear','hasOwnProperty','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','isPlainObject','isArray','saveRestApiResult','length','setVariable','%s.%s','split','replaceAll','extra','getAndSetVariable','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','sync','retry','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','result','delay','add','minutes','noop','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','no\x20text\x20configured','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','grammar','no\x20grammar\x20configured','RECOG_CONFIDENCE()','LUMENVOX_ASR_CONFIDENCE','RECOG_INPUT()','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','MRCPRecog','SESTEK_ASR_TRANSCRIPT','RECOG_INSTANCE()','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20query\x20configured','query:\x20%s','createSquareDetailsReport','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','%s[%s][%s]','%s_ROWS_COUNT','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','no\x20user\x20found','DIAL','SIP/%s','opts','Executed\x20command\x20%s','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','bot','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','toUpperCase','out','Dialogflow\x20Result\x20%s','speech','Dialogflow\x20is\x20unreachable','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','password','no\x20password\x20configured','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','unlink','.wav','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','finally','Enter\x20in\x20FINALLY\x20(%s)\x20block','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','no\x20file\x20audio\x20selected','file_id','getData','maxdigit','mindigit','hiddendigitsnum','generate','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','goalname','GOAL\x20%s','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','%s/recordings/%s','NOBEEP','recordFile','intKey','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','wav','tilde\x20%s\x20file\x20created','tildeASR','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','context','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','true','false','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','no\x20key\x20configured','beep','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','ispeech\x20TTS\x20is\x20unreachable','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','no\x20find\x20by\x20configured','agentLogout','math','operation','no\x20operation\x20configured'];(function(_0x2fad38,_0x34ee09){var _0x4d2d61=function(_0x1d0254){while(--_0x1d0254){_0x2fad38['push'](_0x2fad38['shift']());}};_0x4d2d61(++_0x34ee09);}(_0x321c,0x70));var _0xc321=function(_0x241bac,_0x2fef81){_0x241bac=_0x241bac-0x0;var _0x2ac7e7=_0x321c[_0x241bac];return _0x2ac7e7;};'use strict';var fs=require('fs');var path=require(_0xc321('0x0'));var util=require('util');var _=require(_0xc321('0x1'));var sh=require(_0xc321('0x2'));var odbc=require(_0xc321('0x3'))();var rs=require(_0xc321('0x4'));var moment=require(_0xc321('0x5'));var Mustache=require(_0xc321('0x6'));var rp=require(_0xc321('0x7'));var logger=require(_0xc321('0x8'))(_0xc321('0x9'));var config=require(_0xc321('0xa'));var scripts=require('./scripts');var FILES_PATH='/var/opt/motion2/server/files';var recursiveMapAttributes=[_0xc321('0xb'),_0xc321('0xc')];var verticesWithRetry=[_0xc321('0xd'),_0xc321('0xe'),_0xc321('0xf')];var AGIVertices=function(_0x13e28d,_0x1feca,_0x1c2719){this[_0xc321('0x10')]=_0x13e28d;this[_0xc321('0x11')]=_0x1feca;this['mailRpc']=_0x1c2719;};AGIVertices[_0xc321('0x12')][_0xc321('0x13')]=function(_0x5de002,_0x10ca91){this['rpc'][_0xc321('0x14')](_0x5de002)[_0xc321('0x15')](function(_0x3003d8){_0x10ca91(null,_0x3003d8?_0x3003d8['name']:![]);})['catch'](function(_0x5c603c){_0x10ca91(_0x5c603c);});};AGIVertices[_0xc321('0x12')][_0xc321('0x16')]=function(_0x2eb052,_0x2aee7e){this[_0xc321('0x11')]['getVoiceQueueById'](_0x2eb052)['then'](function(_0x2e2539){_0x2aee7e(null,_0x2e2539?_0x2e2539[_0xc321('0x17')]:![]);})['catch'](function(_0x46a0ff){_0x2aee7e(_0x46a0ff);});};AGIVertices[_0xc321('0x12')][_0xc321('0x18')]=function(_0x139efb,_0x2eaf07){this[_0xc321('0x11')][_0xc321('0x19')](_0x139efb)[_0xc321('0x15')](function(_0x4fab2c){_0x2eaf07(null,_0x4fab2c?_0x4fab2c[_0xc321('0x17')]:![]);})[_0xc321('0x1a')](function(_0x229378){_0x2eaf07(_0x229378);});};AGIVertices['prototype'][_0xc321('0x1b')]=function(_0x24514a,_0xbbc625){this[_0xc321('0x11')][_0xc321('0x1c')](_0x24514a)[_0xc321('0x15')](function(_0x2ef889){_0xbbc625(null,_0x2ef889?_0x2ef889[_0xc321('0x1d')]:![]);})[_0xc321('0x1a')](function(_0xf2295a){_0xbbc625(_0xf2295a);});};AGIVertices[_0xc321('0x12')][_0xc321('0x1e')]=function(_0x2374c9,_0x3ebb69){this[_0xc321('0x11')][_0xc321('0x1f')](_0x2374c9)[_0xc321('0x15')](function(_0x3de375){_0x3ebb69(null,_0x3de375?_0x3de375[_0xc321('0x17')]:![]);})[_0xc321('0x1a')](function(_0xec29b){_0x3ebb69(_0xec29b);});};AGIVertices[_0xc321('0x12')]['getTrunk']=function(_0x310bf7,_0x41c144){this[_0xc321('0x11')][_0xc321('0x20')](_0x310bf7)[_0xc321('0x15')](function(_0x5a4d1c){_0x41c144(null,_0x5a4d1c?_0x5a4d1c['name']:![]);})[_0xc321('0x1a')](function(_0x3d7061){_0x41c144(_0x3d7061);});};AGIVertices[_0xc321('0x12')][_0xc321('0x21')]=function(_0x3dc386,_0x45c429){var _0x14d41c=this;this[_0xc321('0x11')][_0xc321('0x22')](_0x3dc386)['then'](function(_0x52aca1){_0x45c429(null,_0x52aca1?_0x14d41c['getSoundPath'](_0x52aca1[_0xc321('0x23')]):![]);})['catch'](function(_0x4df5a4){_0x45c429(_0x4df5a4);});};AGIVertices['prototype']['getMailAccount']=function(_0x4db485,_0x3eb853){this[_0xc321('0x11')][_0xc321('0x24')](_0x4db485)[_0xc321('0x15')](function(_0x1a43ac){_0x3eb853(null,_0x1a43ac?_0x1a43ac:![]);})[_0xc321('0x1a')](function(_0x216150){_0x3eb853(_0x216150);});};AGIVertices[_0xc321('0x12')][_0xc321('0x25')]=function(_0x45d52e,_0x5e78b7,_0x1fdbe5){this[_0xc321('0x26')][_0xc321('0x25')](_0x45d52e,_0x5e78b7)[_0xc321('0x15')](function(){_0x1fdbe5(null);})[_0xc321('0x1a')](function(_0x2c7b98){_0x1fdbe5(_0x2c7b98);});};AGIVertices[_0xc321('0x12')][_0xc321('0x27')]=function(_0x4e7bff,_0x3101d2){this['rpc'][_0xc321('0x28')](_0x4e7bff)[_0xc321('0x15')](function(_0x59d021){if(_0x59d021){if(_0x59d021[_0xc321('0x29')]){_0x3101d2(null,[_0x59d021['interval']]);}else{_0x3101d2(null,_['map'](_0x59d021['Intervals'],_0xc321('0x2a')));}}else{_0x3101d2(null,![]);}})[_0xc321('0x1a')](function(_0x58fafe){_0x3101d2(_0x58fafe);});};AGIVertices[_0xc321('0x12')]['getSoundPath']=function(_0x1286d9){return util['format'](_0xc321('0x2b'),FILES_PATH,_0x1286d9);};AGIVertices[_0xc321('0x12')][_0xc321('0x2c')]=function(_0x42af0f,_0x96f938,_0x30e1ca){odbc[_0xc321('0x2d')](_0x42af0f,function(_0x5356a3){if(_0x5356a3){logger[_0xc321('0x2e')](_0xc321('0x2f'),_0x5356a3);_0x30e1ca(_0x5356a3);}else{logger['info'](_0xc321('0x30'));odbc[_0xc321('0x31')](_0x96f938,function(_0x114b0b,_0x187f52){if(_0x114b0b){logger['info'](_0xc321('0x32'),_0x96f938);_0x30e1ca(_0x114b0b);}else{logger[_0xc321('0x33')](_0xc321('0x34'),_0x96f938);odbc[_0xc321('0x35')](function(_0x3c3365){if(_0x3c3365){logger['error']('Error\x20closing\x20connection\x20to\x20odbc\x20%s',_0x3c3365);}_0x30e1ca(null,_0x187f52);});}});}});};AGIVertices['prototype'][_0xc321('0x36')]=function(_0x10debb,_0x1b2cd2){this[_0xc321('0x11')][_0xc321('0x37')](_0x10debb)['then'](function(_0x329d02){_0x1b2cd2(null,_0x329d02?_0x329d02:![]);})[_0xc321('0x1a')](function(_0x590d6b){_0x1b2cd2(_0x590d6b);});};AGIVertices['prototype'][_0xc321('0x38')]=function(_0x154a9b,_0x144ef7){this[_0xc321('0x11')]['createSmsMessage'](_0x154a9b)[_0xc321('0x15')](function(_0x1b5a43){_0x144ef7(null,_0x1b5a43);})[_0xc321('0x1a')](function(_0x2c5e6d){_0x144ef7(_0x2c5e6d);});};AGIVertices[_0xc321('0x12')]['createSquareDetailsReport']=function(_0x3a17cf,_0x3b22b0,_0x486fae){this[_0xc321('0x11')]['createSquareDetailsReport']({'uniqueid':this[_0xc321('0x10')][_0xc321('0x39')],'node':_0x3a17cf[_0xc321('0x3a')],'application':_0x3a17cf[_0xc321('0x3b')],'data':_0x3b22b0||null,'project_name':this[_0xc321('0x10')]['arg_1'],'callerid':this[_0xc321('0x10')][_0xc321('0x3c')]})[_0xc321('0x15')](function(_0x29e7b4){if(_0x486fae){_0x486fae(null,_0x29e7b4);}})[_0xc321('0x1a')](function(_0x16d52f){if(_0x486fae){_0x486fae(_0x16d52f);}});};AGIVertices[_0xc321('0x12')][_0xc321('0x3d')]=function(_0x25b00d,_0x2ac634,_0x412172,_0x22b564){this[_0xc321('0x11')][_0xc321('0x3d')]({'uniqueid':this[_0xc321('0x10')]['uniqueid'],'callerid':this[_0xc321('0x10')][_0xc321('0x3c')],'calleridname':this[_0xc321('0x10')][_0xc321('0x3e')],'context':this[_0xc321('0x10')]['context'],'extension':this[_0xc321('0x10')][_0xc321('0x3f')],'priority':this[_0xc321('0x10')]['priority'],'accountcode':this[_0xc321('0x10')][_0xc321('0x40')],'dnid':this[_0xc321('0x10')][_0xc321('0x41')],'projectName':this[_0xc321('0x10')][_0xc321('0x42')],'saveName':_0x2ac634,'filename':_0x25b00d[_0xc321('0x43')]||_0x2ac634,'savePath':_0x412172})['then'](function(_0x5db0f5){_0x22b564(null,_0x5db0f5);})[_0xc321('0x1a')](function(_0x2fd4bc){_0x22b564(_0x2fd4bc);});};AGIVertices[_0xc321('0x12')]['createSquareMessage']=function(_0x565f7d,_0x23c7a4,_0x513ace){this[_0xc321('0x11')][_0xc321('0x44')]({'uniqueid':this[_0xc321('0x10')]['uniqueid'],'body':_0x565f7d,'direction':_0x23c7a4})['then'](function(_0x5e5e0a){if(_0x513ace){_0x513ace(null,_0x5e5e0a);}})[_0xc321('0x1a')](function(_0x44f22d){if(_0x513ace){_0x513ace(_0x44f22d);}});};AGIVertices[_0xc321('0x12')][_0xc321('0x45')]=function(_0x15b27d,_0x19142f){this['rpc']['createCmContact']({'firstName':_[_0xc321('0x46')](_0x15b27d['name'])||_['isNil'](_0x15b27d[_0xc321('0x17')])?_0xc321('0x47')+Math[_0xc321('0x48')]():_0x15b27d['name'],'lastName':_['isEmpty'](_0x15b27d[_0xc321('0x49')])||_[_0xc321('0x4a')](_0x15b27d[_0xc321('0x49')])?null:_0x15b27d[_0xc321('0x49')],'phone':_0x15b27d[_0xc321('0x4b')],'ListId':_0x15b27d[_0xc321('0x4c')],'scheduledat':_0x15b27d['scheduledAt'],'callbackUniqueid':this['channel'][_0xc321('0x39')],'tags':'callback','description':_0xc321('0x4d')+_0x15b27d[_0xc321('0x4e')][_0xc321('0x4f')](),'priority':_0x15b27d[_0xc321('0x50')]})['then'](function(_0x3d7756){_0x19142f(null,_0x3d7756);})[_0xc321('0x1a')](function(_0x39f52e){_0x19142f(_0x39f52e);});};AGIVertices['prototype'][_0xc321('0x51')]=function(_0x23ee44,_0x4d9dac){this['rpc']['getPauseById'](_0x23ee44)[_0xc321('0x15')](function(_0x1ed659){_0x4d9dac(null,_0x1ed659?_0x1ed659[_0xc321('0x17')]:![]);})[_0xc321('0x1a')](function(_0x4831d7){_0x4d9dac(_0x4831d7);});};AGIVertices[_0xc321('0x12')]['agentPause']=function(_0x5594a9,_0x545175,_0x4d4e56){var _0x3c81ee={'role':_0xc321('0x52')};_0x3c81ee[_0x5594a9]=this['channel'][_0xc321('0x3c')];this[_0xc321('0x11')]['agentPause'](_0x3c81ee,_0x545175,this['channel']['uniqueid'])['then'](function(_0x2ea22c){_0x4d4e56(null,_[_0xc321('0x4a')](_0x2ea22c)?![]:!![]);})[_0xc321('0x1a')](function(_0x1a9c97){logger[_0xc321('0x2e')](_0x1a9c97);_0x4d4e56(null,![]);});};AGIVertices[_0xc321('0x12')][_0xc321('0x53')]=function(_0x1e07a2,_0x338921){var _0x1f370d={'role':_0xc321('0x52')};_0x1f370d[_0x1e07a2]=this['channel'][_0xc321('0x3c')];this['rpc'][_0xc321('0x53')](_0x1f370d)[_0xc321('0x15')](function(_0x1dac53){_0x338921(null,_[_0xc321('0x4a')](_0x1dac53)?![]:!![]);})[_0xc321('0x1a')](function(_0x451ffd){logger[_0xc321('0x2e')](_0x451ffd);_0x338921(null,![]);});};AGIVertices[_0xc321('0x12')]['agentLogout']=function(_0x3247c9,_0x3ec5ad){var _0x3e5677={'role':_0xc321('0x52')};_0x3e5677[_0x3247c9]=this[_0xc321('0x10')][_0xc321('0x3c')];this[_0xc321('0x11')]['agentLogout'](_0x3e5677)[_0xc321('0x15')](function(_0x21c9eb){_0x3ec5ad(null,_[_0xc321('0x4a')](_0x21c9eb)?![]:!![]);})['catch'](function(_0x386b4c){logger[_0xc321('0x2e')](_0x386b4c);_0x3ec5ad(null,![]);});};AGIVertices[_0xc321('0x12')][_0xc321('0x54')]=function(_0x1dacdb,_0x35a8ae){var _0x54ce87={'role':_0xc321('0x52')};_0x54ce87[_0x1dacdb]=this[_0xc321('0x10')][_0xc321('0x3c')];var _0x551477=_0x1dacdb!=_0xc321('0x55')?util[_0xc321('0x56')](_0xc321('0x57'),'LOCAL',this[_0xc321('0x10')][_0xc321('0x3c')]):undefined;this['rpc'][_0xc321('0x54')](_0x54ce87,_0x551477)['then'](function(_0x334a57){_0x35a8ae(null,_[_0xc321('0x4a')](_0x334a57)?![]:!![]);})[_0xc321('0x1a')](function(_0x591a89){logger[_0xc321('0x2e')](_0x591a89);_0x35a8ae(null,![]);});};AGIVertices[_0xc321('0x12')][_0xc321('0x58')]=function(_0x328a0b,_0x99d575){sh[_0xc321('0x59')](_['trim'](_0x328a0b),function(_0x25ecbb,_0x3d0c30){var _0x43c58a=_0x3d0c30[_0xc321('0x5a')](/(\r\n|\n|\r)/gm,'');_0x99d575(null,_0x43c58a);});};AGIVertices[_0xc321('0x12')]['googleCloudTTS']=function(_0x4fa5bd,_0x985577){scripts[_0xc321('0x5b')](_0x4fa5bd[_0xc321('0x5c')],_0x4fa5bd[_0xc321('0x5d')]||_0xc321('0x5e'),_0x4fa5bd[_0xc321('0x5e')],_0x4fa5bd['languageCode']||_0xc321('0x5f'),_0x4fa5bd[_0xc321('0x60')]||_0xc321('0x61'),_0x4fa5bd['audioEncoding']||_0xc321('0x62'))[_0xc321('0x15')](function(_0x3a4368){_0x985577(null,_0x3a4368);})['catch'](function(_0x416042){_0x985577(_0x416042);});};AGIVertices[_0xc321('0x12')][_0xc321('0x63')]=function(_0x1d7493,_0x13c232){scripts['googleTTS'](_0x1d7493['text'],_0x1d7493[_0xc321('0x64')]||'en',0x1)[_0xc321('0x15')](function(_0x4fb2e8){_0x13c232(null,_0x4fb2e8);})[_0xc321('0x1a')](function(_0x5b1dc6){_0x13c232(_0x5b1dc6);});};AGIVertices[_0xc321('0x12')][_0xc321('0x65')]=function(_0x4f24c3,_0x550dd4){var _0x31f763={'uri':_0x4f24c3['url'],'method':_0x4f24c3[_0xc321('0x66')],'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x4f24c3[_0xc321('0x67')])===_0xc321('0x68')&&parseInt(_0x4f24c3[_0xc321('0x67')])>=0x1?parseInt(_0x4f24c3[_0xc321('0x67')])*0x3e8:0x5*0x3e8};if(_[_0xc321('0x69')]([_0xc321('0x6a'),_0xc321('0x6b')],_0x31f763[_0xc321('0x66')]['toUpperCase']())){try{_0x31f763[_0xc321('0x6c')]=_0x4f24c3['rawBody']?JSON[_0xc321('0x6d')](_0x4f24c3['rawBody']):{};}catch(_0x39b50a){logger[_0xc321('0x2e')](_0xc321('0x6e'),_0x39b50a);}}try{_0x31f763['headers']=_0x4f24c3[_0xc321('0xb')]?JSON[_0xc321('0x6d')](_0x4f24c3['rawHeaders']):{};}catch(_0xf692d5){logger[_0xc321('0x2e')](_0xc321('0x6f'),_0xf692d5);}if(_0x4f24c3[_0xc321('0x70')]){try{var _0x1cf674=require(_0x4f24c3[_0xc321('0x70')])['sync'](this,_0x31f763);_0x31f763[_0xc321('0x71')]=Mustache[_0xc321('0x72')](_0x4f24c3[_0xc321('0x73')],_0x1cf674,{},['$$','$$']);if(_0x31f763['headers']){_0x31f763['headers']=JSON[_0xc321('0x6d')](Mustache[_0xc321('0x72')](JSON[_0xc321('0x74')](_0x31f763[_0xc321('0x75')]),_0x1cf674,{},['$$','$$']));}if(_0x31f763['body']){_0x31f763[_0xc321('0x6c')]=JSON[_0xc321('0x6d')](Mustache[_0xc321('0x72')](JSON[_0xc321('0x74')](_0x31f763[_0xc321('0x6c')]),_0x1cf674,{},['$$','$$']));}}catch(_0x4921d7){logger[_0xc321('0x2e')](_0xc321('0x76'),_0x4921d7);}}rp(_0x31f763)[_0xc321('0x15')](function(_0x3c6336){var _0x337d43={'statusCode':_0x3c6336[_0xc321('0x77')]||0xc8,'statusMessage':_0x3c6336['statusMessage']||'OK','headers':_0x3c6336[_0xc321('0x75')]||{},'body':_0x3c6336[_0xc321('0x6c')]||{}};_0x550dd4(null,_0x337d43);})[_0xc321('0x1a')](function(_0x963c8){var _0x2d90eb={'statusCode':_0x963c8[_0xc321('0x77')]||0x1f4,'statusMessage':_0x963c8[_0xc321('0x78')]||_0xc321('0x79'),'headers':_0x963c8[_0xc321('0x7a')]['headers']||{},'body':_0x963c8[_0xc321('0x7a')][_0xc321('0x6c')]||{}};_0x550dd4(null,_0x2d90eb);});};AGIVertices[_0xc321('0x12')][_0xc321('0x7b')]=function(_0x15ab8f,_0x51f973){scripts[_0xc321('0x7b')](this['channel'][_0xc321('0x39')],_0x15ab8f[_0xc321('0x7c')],_0x15ab8f[_0xc321('0x5e')],_0x15ab8f['dialogflow_language']||'en')[_0xc321('0x15')](function(_0x25028e){_0x51f973(null,_0x25028e);})['catch'](function(_0x5a68b7){_0x51f973(_0x5a68b7);});};AGIVertices[_0xc321('0x12')][_0xc321('0x7d')]=function(_0x1b6638,_0x1131b5){scripts[_0xc321('0x7d')](this[_0xc321('0x10')],_0x1b6638)[_0xc321('0x15')](function(_0x39bb97){_0x1131b5(null,_0x39bb97);})[_0xc321('0x1a')](function(_0x1ac437){_0x1131b5(_0x1ac437);});};AGIVertices[_0xc321('0x12')][_0xc321('0x7e')]=function(_0x4feb58,_0x24a5d7){scripts[_0xc321('0x7e')](_0x4feb58[_0xc321('0x7c')],_0x4feb58[_0xc321('0x5e')],_0x4feb58['ispeech_tts_language']||_0xc321('0x5f'),_0x4feb58[_0xc321('0x7f')])[_0xc321('0x15')](function(_0xd87b17){_0x24a5d7(null,_0xd87b17);})[_0xc321('0x1a')](function(_0x8acf7){_0x24a5d7(_0x8acf7);});};AGIVertices[_0xc321('0x12')][_0xc321('0x80')]=function(_0x3e9da1,_0x4a2c98,_0x435922){scripts[_0xc321('0x80')](_0x4a2c98,_0x3e9da1[_0xc321('0x7c')],_0x3e9da1[_0xc321('0x81')]||_0xc321('0x5f'),this[_0xc321('0x82')](_0x3e9da1[_0xc321('0x83')])?_0x3e9da1[_0xc321('0x83')]:undefined)[_0xc321('0x15')](function(_0x594520){_0x435922(null,_0x594520);})['catch'](function(_0x4cb3fb){_0x435922(_0x4cb3fb);});};AGIVertices[_0xc321('0x12')][_0xc321('0x84')]=function(_0x30cee0,_0x150483){scripts[_0xc321('0x84')](_0x30cee0['aws_access_key_id'],_0x30cee0[_0xc321('0x85')],_0x30cee0[_0xc321('0x86')],_0x30cee0[_0xc321('0x87')]||_0xc321('0x88'),_0x30cee0[_0xc321('0x5e')],_0x30cee0[_0xc321('0x89')]||_0xc321('0x5e'))[_0xc321('0x15')](function(_0x167578){_0x150483(null,_0x167578);})[_0xc321('0x1a')](function(_0x5110f4){_0x150483(_0x5110f4);});};AGIVertices['prototype'][_0xc321('0x8a')]=function(_0x343e37,_0x224413){scripts[_0xc321('0x8a')](this['channel'][_0xc321('0x39')],_0x343e37[_0xc321('0x8b')],_0x343e37[_0xc321('0x85')],_0x343e37['aws_lex_region'],_0x343e37[_0xc321('0x5e')],_0x343e37[_0xc321('0x8c')])[_0xc321('0x15')](function(_0x3164aa){_0x224413(null,_0x3164aa);})[_0xc321('0x1a')](function(_0x230f9f){_0x224413(_0x230f9f);});};AGIVertices['prototype'][_0xc321('0x8d')]=function(_0x16ffb3,_0x361a49,_0x2b5527){scripts[_0xc321('0x8d')](_0x361a49,_0x16ffb3[_0xc321('0x7c')],_0x16ffb3[_0xc321('0x8e')]||_0xc321('0x5f'))[_0xc321('0x15')](function(_0x2fb515){_0x2b5527(null,_0x2fb515);})[_0xc321('0x1a')](function(_0x8f3ec1){_0x2b5527(_0x8f3ec1);});};AGIVertices[_0xc321('0x12')]['tildeASR']=function(_0x2b0253,_0x59f7ed,_0x4b5ce8){scripts['tildeASR'](_0x59f7ed,_0x2b0253[_0xc321('0x8f')],_0x2b0253[_0xc321('0x90')],_0x2b0253[_0xc321('0x71')])[_0xc321('0x15')](function(_0x572961){_0x4b5ce8(null,_0x572961);})['catch'](function(_0x2633b0){_0x4b5ce8(_0x2633b0);});};AGIVertices[_0xc321('0x12')][_0xc321('0x91')]=function(_0x488a83){var _0x20289a=_['includes'](verticesWithRetry,_0x488a83[_0xc321('0x3b')])?_0x488a83:_['clone'](_0x488a83);for(var _0x5da42e in _0x20289a){if(_0x20289a[_0xc321('0x92')](_0x5da42e)){if(_0x20289a[_0x5da42e]&&_[_0xc321('0x93')](_0x20289a[_0x5da42e])){if(_['includes'](recursiveMapAttributes,_0x5da42e)){_0x20289a[_0x5da42e]=this[_0xc321('0x94')](_0x20289a[_0x5da42e]);}else{_0x20289a[_0x5da42e]=this[_0xc321('0x95')](_0x20289a[_0x5da42e]);}}}}return _0x20289a;};AGIVertices[_0xc321('0x12')][_0xc321('0x96')]=function(_0x255344){for(var _0xb56ffa in _0x255344){if(_0x255344[_0xc321('0x92')](_0xb56ffa)){if(_[_0xc321('0x97')](_0x255344[_0xb56ffa])){this[_0xc321('0x96')](_0x255344[_0xb56ffa]);}else if(_[_0xc321('0x98')](_0x255344[_0xb56ffa])){for(var _0x438d6c=0x0;_0x438d6c<_0x255344[_0xb56ffa]['length'];_0x438d6c++){this['recursiveNodeIndex'](_0x255344[_0xb56ffa][_0x438d6c]);}}else if(_[_0xc321('0x93')](_0x255344[_0xb56ffa])){_0x255344[_0xb56ffa]=this[_0xc321('0x95')](_0x255344[_0xb56ffa]);}}}};AGIVertices['prototype'][_0xc321('0x99')]=function(_0x394b51,_0x1f6d4d){for(var _0x5718be in _0x394b51){if(_0x394b51['hasOwnProperty'](_0x5718be)){if(_['isPlainObject'](_0x394b51[_0x5718be])){if(!_[_0xc321('0x46')](_0x394b51[_0x5718be])){this[_0xc321('0x99')](_0x394b51[_0x5718be],util[_0xc321('0x56')]('%s.%s',_0x1f6d4d,_0x5718be));}}else if(_[_0xc321('0x98')](_0x394b51[_0x5718be])){for(var _0x2f9994=0x0;_0x2f9994<_0x394b51[_0x5718be][_0xc321('0x9a')];_0x2f9994++){this['saveRestApiResult'](_0x394b51[_0x5718be][_0x2f9994],util[_0xc321('0x56')]('%s.%s',_0x1f6d4d,_0x5718be+'['+_0x2f9994+']'));}}else{if(!_['isNil'](_0x394b51[_0x5718be])){this[_0xc321('0x10')][_0xc321('0x9b')](util['format'](_0xc321('0x9c'),_0x1f6d4d,_0x5718be),_0x394b51[_0x5718be]);}}}}};AGIVertices[_0xc321('0x12')][_0xc321('0x94')]=function(_0x47f8f9){try{var _0x188c1e=JSON[_0xc321('0x6d')](_0x47f8f9);this[_0xc321('0x96')](_0x188c1e);return JSON['stringify'](_0x188c1e);}catch(_0x36a5cd){return this[_0xc321('0x95')](_0x47f8f9);}};AGIVertices[_0xc321('0x12')]['replaceAllVariables']=function(_0x239c39){var _0x555cf8=_0x239c39[_0xc321('0x9d')]('{');for(var _0x4399f8=0x1;_0x4399f8<_0x555cf8[_0xc321('0x9a')];_0x4399f8+=0x1){var _0x5b2fe0=_0x555cf8[_0x4399f8][_0xc321('0x9d')]('}');if(_0x5b2fe0[_0xc321('0x9a')]>0x1){_0x239c39=_0x239c39[_0xc321('0x9e')]('{'+_0x5b2fe0[0x0]+'}',this['channel'][_0xc321('0x13')](_0x5b2fe0[0x0])[_0xc321('0x9f')]||_0x5b2fe0[0x0]);}}if(_0x555cf8[_0xc321('0x9a')]===0x1){return _0x239c39[_0xc321('0x4f')]();}return this[_0xc321('0x95')](_0x239c39);};AGIVertices[_0xc321('0x12')][_0xc321('0xa0')]=function(_0x1a4538,_0x26752c){var _0x46f835=this['channel'][_0xc321('0x13')](_0x1a4538);if(_0x46f835['result']===-0x1){return _0x46f835;}logger[_0xc321('0x33')](util['format'](_0xc321('0xa1'),_0x26752c,_0x46f835[_0xc321('0x9f')]));return this[_0xc321('0x10')]['setVariable'](_0x26752c,_0x46f835['extra']);};AGIVertices[_0xc321('0x12')][_0xc321('0x82')]=function(_0x18618b){return _0x18618b&&_0x18618b!=='0'&&_0x18618b!=='-1'&&_0x18618b!=='';};AGIVertices['prototype'][_0xc321('0xa2')]=function(_0x300162){this['createSquareDetailsReport'][_0xc321('0xa3')](this,_0x300162,'-');_0x300162[_0xc321('0xa4')]=_0x300162[_0xc321('0xa2')];return{'code':0xc8,'result':'-'};};AGIVertices[_0xc321('0x12')]['agi']=function(_0x1034a0){logger['info'](util[_0xc321('0x56')](_0xc321('0xa5'),_0x1034a0['label']));return this[_0xc321('0x10')][_0xc321('0x9')]([_0x1034a0[_0xc321('0xa6')],_0x1034a0[_0xc321('0xa7')]]);};AGIVertices[_0xc321('0x12')][_0xc321('0xa8')]=function(_0x55e9a8){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0xa9'),_0x55e9a8['label']));if(this['isConfigured'](_0x55e9a8[_0xc321('0x67')])){logger['info'](util[_0xc321('0x56')](_0xc321('0xaa'),_0x55e9a8[_0xc321('0x67')]));var _0x21998c=this['channel'][_0xc321('0xab')](_0x55e9a8[_0xc321('0x67')]);if(_0x21998c[_0xc321('0xac')]===-0x1){return _0x21998c;}}return this[_0xc321('0x10')][_0xc321('0xa8')]();};AGIVertices[_0xc321('0x12')]['callback']=function(_0x25abd2){logger[_0xc321('0x33')](util[_0xc321('0x56')]('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x25abd2['label']));if(!this['isConfigured'](_0x25abd2[_0xc321('0x4c')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x25abd2,'no\x20list\x20selected');}_0x25abd2[_0xc321('0x4e')]=moment();if(this[_0xc321('0x82')](_0x25abd2[_0xc321('0xad')])){_0x25abd2[_0xc321('0x4e')]=moment()[_0xc321('0xae')](_0x25abd2[_0xc321('0xad')],_0xc321('0xaf'));}if(!this[_0xc321('0x82')](_0x25abd2[_0xc321('0x50')])){_0x25abd2[_0xc321('0x50')]=0x2;}this[_0xc321('0x45')][_0xc321('0xa3')](this,_0x25abd2);return this[_0xc321('0x10')][_0xc321('0xb0')](util['format'](_0xc321('0xb1'),_0x25abd2[_0xc321('0x4b')],_0x25abd2[_0xc321('0x4c')],_0x25abd2[_0xc321('0x4e')]));};AGIVertices[_0xc321('0x12')][_0xc321('0xb2')]=function(_0x322212){logger['info'](util[_0xc321('0x56')](_0xc321('0xb3'),_0x322212['label']));var _0x1ac3a7=this['channel'][_0xc321('0x59')](_0x322212[_0xc321('0xb4')],_0x322212[_0xc321('0x7a')]);if(_0x1ac3a7['result']===-0x1){return _0x1ac3a7;}return this[_0xc321('0x10')]['noop'](util['format']('Executed\x20command\x20%s\x20%s',_0x322212[_0xc321('0xb4')],_0x322212[_0xc321('0x7a')]));};AGIVertices[_0xc321('0x12')]['lumenvoxtts']=function(_0x56b15a){logger['info'](util[_0xc321('0x56')](_0xc321('0xb5'),_0x56b15a[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x56b15a[_0xc321('0x5e')])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0xb6'));}var _0x42f8e9='\x22'+_0x56b15a['text']+'\x22';if(this[_0xc321('0x82')](_0x56b15a[_0xc321('0x7a')])){_0x42f8e9+=','+_0x56b15a[_0xc321('0x7a')];}var _0x320172=this[_0xc321('0x10')][_0xc321('0x59')](_0xc321('0xb7'),_0x42f8e9);if(_0x320172[_0xc321('0xac')]===-0x1){return _0x320172;}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xb8'),_0x42f8e9));};AGIVertices[_0xc321('0x12')][_0xc321('0xb9')]=function(_0x2c0377){logger['info'](util[_0xc321('0x56')](_0xc321('0xba'),_0x2c0377['label']));if(!this[_0xc321('0x82')](_0x2c0377[_0xc321('0x5e')])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0xb6'));}var _0x1a1e75='\x22'+_0x2c0377[_0xc321('0x5e')]+'\x22';if(this[_0xc321('0x82')](_0x2c0377[_0xc321('0x7a')])){_0x1a1e75+=','+_0x2c0377[_0xc321('0x7a')];}var _0x4ea8f3=this['channel']['exec']('MRCPSynth',_0x1a1e75);if(_0x4ea8f3[_0xc321('0xac')]===-0x1){return _0x4ea8f3;}return this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xb8'),_0x1a1e75));};AGIVertices[_0xc321('0x12')][_0xc321('0xbb')]=function(_0x3dea97){logger[_0xc321('0x33')](util['format']('Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block',_0x3dea97[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x3dea97[_0xc321('0xbc')])){return this['channel'][_0xc321('0xb0')](_0xc321('0xbd'));}var _0x3cbc6c=_0x3dea97[_0xc321('0xbc')];if(this[_0xc321('0x82')](_0x3dea97[_0xc321('0x7a')])){_0x3cbc6c+=','+_0x3dea97[_0xc321('0x7a')];}var _0x378fde=this['channel'][_0xc321('0x59')]('MRCPRecog',_0x3cbc6c);if(_0x378fde[_0xc321('0xac')]===-0x1){return _0x378fde;}var _0xcab9c6=this[_0xc321('0xa0')](_0xc321('0xbe'),_0xc321('0xbf'));if(_0xcab9c6[_0xc321('0xac')]===-0x1){return _0xcab9c6;}var _0x1f7db4=this[_0xc321('0xa0')](_0xc321('0xc0'),'LUMENVOX_ASR_TRANSCRIPT');if(_0x1f7db4['result']===-0x1){return _0x1f7db4;}var _0x2b4fbc=this['getAndSetVariable']('RECOG_INSTANCE()',_0xc321('0xc1'));if(_0x2b4fbc[_0xc321('0xac')]===-0x1){return _0x2b4fbc;}return this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xc2'),_0x3cbc6c));};AGIVertices['prototype']['sestekasr']=function(_0x50d2d0){logger['info'](util[_0xc321('0x56')](_0xc321('0xc3'),_0x50d2d0[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x50d2d0['grammar'])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0xbd'));}var _0x5d0cee=_0x50d2d0['grammar'];if(this[_0xc321('0x82')](_0x50d2d0[_0xc321('0x7a')])){_0x5d0cee+=','+_0x50d2d0[_0xc321('0x7a')];}var _0x115280=this['channel'][_0xc321('0x59')](_0xc321('0xc4'),_0x5d0cee);if(_0x115280['result']===-0x1){return _0x115280;}var _0x5e43d0=this['getAndSetVariable'](_0xc321('0xbe'),'SESTEK_ASR_CONFIDENCE');if(_0x5e43d0['result']===-0x1){return _0x5e43d0;}var _0x1ecc1d=this['getAndSetVariable'](_0xc321('0xc0'),_0xc321('0xc5'));if(_0x1ecc1d[_0xc321('0xac')]===-0x1){return _0x1ecc1d;}var _0x41cb46=this['getAndSetVariable'](_0xc321('0xc6'),'SESTEK_ASR_INSTANCE');if(_0x41cb46[_0xc321('0xac')]===-0x1){return _0x41cb46;}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xc2'),_0x5d0cee));};AGIVertices[_0xc321('0x12')][_0xc321('0xc7')]=function(_0x2bd219){logger['info'](util[_0xc321('0x56')](_0xc321('0xc8'),_0x2bd219[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x2bd219[_0xc321('0xc9')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x2bd219,'no\x20database\x20selected');}var _0x39e293=this[_0xc321('0x1b')][_0xc321('0xa3')](this,_0x2bd219[_0xc321('0xc9')]);if(!_0x39e293){return this[_0xc321('0x10')]['error'](_0x2bd219,'no\x20odbc\x20database\x20found');}if(!this[_0xc321('0x82')](_0x2bd219[_0xc321('0x31')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x2bd219,_0xc321('0xca'));}var _0x39f222=_0x2bd219[_0xc321('0x31')]['replace'](/(\r\n|\n|\r)/gm,'\x20');this['channel'][_0xc321('0xb0')](util['format'](_0xc321('0xcb'),_0x39f222));var _0x1d1beb=this[_0xc321('0x2c')][_0xc321('0xa3')](this,_0x39e293,_0x39f222);this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0x2bd219,_0x39f222);if(!this[_0xc321('0x82')](_0x2bd219[_0xc321('0xcd')])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0xce'));}var _0x35f360=this[_0xc321('0x13')][_0xc321('0xa3')](this,_0x2bd219['variable_id']);if(!_0x35f360){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x2bd219,_0xc321('0xcf'));}var _0x1d621b=this;_0x1d1beb[_0xc321('0xd0')](function(_0x35092d,_0x33b243){Object['keys'](_0x35092d)[_0xc321('0xd0')](function(_0x48d975){_0x1d621b[_0xc321('0x10')][_0xc321('0x9b')](util[_0xc321('0x56')](_0xc321('0xd1'),_0x35f360,_0x33b243,_0x48d975),_0x35092d[_0x48d975]);});});this[_0xc321('0x10')]['setVariable'](util[_0xc321('0x56')](_0xc321('0xd2'),_0x35f360),_0x1d1beb[_0xc321('0x9a')]);return this[_0xc321('0x10')]['noop'](util[_0xc321('0x56')]('variable\x20%s\x20set',_0x35f360));};AGIVertices[_0xc321('0x12')]['dial']=function(_0x27a1a9){logger['debug'](util['format'](_0xc321('0xd3'),_0x27a1a9[_0xc321('0x3a')]));if(!this['isConfigured'](_0x27a1a9[_0xc321('0xd4')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x27a1a9,_0xc321('0xd5'));}var _0x32a4be=this[_0xc321('0x1e')]['sync'](this,_0x27a1a9[_0xc321('0xd4')]);if(!_0x32a4be){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x27a1a9,_0xc321('0xd6'));}var _0x23d25c=this['channel'][_0xc321('0x59')](_0xc321('0xd7'),[util[_0xc321('0x56')](_0xc321('0xd8'),_0x32a4be),_0x27a1a9[_0xc321('0x67')],_0x27a1a9[_0xc321('0xd9')],_0x27a1a9[_0xc321('0x73')]]);if(_0x23d25c[_0xc321('0xac')]===-0x1){return _0x23d25c;}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xda'),_0xc321('0xd7')));};AGIVertices[_0xc321('0x12')]['dialogflow']=function(_0x2d31c5){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0xdb'),_0x2d31c5[_0xc321('0x3a')]));if(!this['isConfigured'](_0x2d31c5[_0xc321('0x7c')])){return this[_0xc321('0x10')]['noop']('no\x20key\x20configured');}if(!this[_0xc321('0x82')](_0x2d31c5[_0xc321('0x5e')])){return this[_0xc321('0x10')]['noop'](_0xc321('0xb6'));}this[_0xc321('0x10')][_0xc321('0xdc')]=!![];this[_0xc321('0xcc')](_0x2d31c5);this['createSquareMessage'](_0x2d31c5[_0xc321('0x5e')],'in');this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xdd'),_0x2d31c5[_0xc321('0x5e')]));var _0x30df1b=this[_0xc321('0x7b')][_0xc321('0xa3')](this,_0x2d31c5);if(_0x30df1b){for(var _0x5338b3 in _0x30df1b){if(_0x30df1b[_0xc321('0x92')](_0x5338b3)){this[_0xc321('0x10')][_0xc321('0x9b')](util[_0xc321('0x56')](_0xc321('0xde'),_0x5338b3[_0xc321('0xdf')]()),_0x30df1b[_0x5338b3]);}}this[_0xc321('0x44')](_0x30df1b['speech'],_0xc321('0xe0'));return this[_0xc321('0x10')]['noop'](util['format'](_0xc321('0xe1'),_0x30df1b[_0xc321('0xe2')]));}return this[_0xc321('0x10')]['error'](_0x2d31c5,_0xc321('0xe3'));};AGIVertices[_0xc321('0x12')][_0xc321('0xe4')]=function(_0x329ccb){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0xe5'),_0x329ccb['label']));if(!this[_0xc321('0x82')](_0x329ccb[_0xc321('0xe6')])){return this['channel'][_0xc321('0xb0')](_0xc321('0xe7'));}if(!this[_0xc321('0x82')](_0x329ccb[_0xc321('0xe8')])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0xe9'));}if(!this[_0xc321('0x82')](_0x329ccb[_0xc321('0xea')])){return this['channel'][_0xc321('0xb0')](_0xc321('0xeb'));}if(!this[_0xc321('0x82')](_0x329ccb['ndassistant_url'])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0xb6'));}this[_0xc321('0x10')][_0xc321('0xdc')]=!![];this[_0xc321('0xcc')](_0x329ccb);this[_0xc321('0x44')](_0x329ccb['text'],'in');this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xec'),_0x329ccb[_0xc321('0x5e')]));var _0x72666=this['sestekNDA'][_0xc321('0xa3')](this,_0x329ccb);if(_0x72666){for(var _0x4ed5c0 in _0x72666){if(_0x72666[_0xc321('0x92')](_0x4ed5c0)){this[_0xc321('0x10')][_0xc321('0x9b')](util[_0xc321('0x56')](_0xc321('0xed'),_0x4ed5c0[_0xc321('0xdf')]()),_0x72666[_0x4ed5c0]);}}this[_0xc321('0x44')](_0x72666['speech'],'out');if(_0x72666[_0xc321('0xee')]){this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xef'),_0x72666[_0xc321('0xee')]));var _0x59a05=this[_0xc321('0x10')][_0xc321('0xf0')](_0x72666[_0xc321('0xee')]);try{fs[_0xc321('0xf1')](_0x72666[_0xc321('0xee')]+_0xc321('0xf2'));}catch(_0x4500f5){logger[_0xc321('0x2e')](_0x4500f5);}return _0x59a05;}else{return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xf3'),_0x72666['speech']));}}return this[_0xc321('0x10')][_0xc321('0x2e')](_0x329ccb,_0xc321('0xf4'));};AGIVertices[_0xc321('0x12')][_0xc321('0xf5')]=function(_0x1d55ed){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0xf6'),_0x1d55ed[_0xc321('0x3a')]));return this['channel'][_0xc321('0xb0')](_0xc321('0xf5'));};AGIVertices[_0xc321('0x12')][_0xc321('0xf7')]=function(_0x3500cc){logger['info'](util['format']('Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block',_0x3500cc['label']));var _0x3a5c03='';if(_0x3500cc[_0xc321('0xf8')]){if(!this[_0xc321('0x82')](_0x3500cc[_0xc321('0xf8')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x3500cc,_0xc321('0xf9'));}else{var _0x314690=parseInt(_0x3500cc[_0xc321('0xf8')],0xa);if(isNaN(_0x314690)){_0x3a5c03=_0x3500cc[_0xc321('0xf8')];}else{_0x3a5c03=this['getTrunk'][_0xc321('0xa3')](this,_0x3500cc['trunk_id']);if(!_0x3a5c03){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x3500cc,_0xc321('0xfa'));}}}}else if(_0x3500cc[_0xc321('0xfb')]){_0x3a5c03=_0x3500cc[_0xc321('0xfb')];}else{return this['channel'][_0xc321('0x2e')](_0x3500cc,_0xc321('0xf9'));}var _0x1e4106=this[_0xc321('0x10')][_0xc321('0x59')](_0xc321('0xd7'),[util['format']('SIP/%s/%s',_0x3a5c03,_0x3500cc[_0xc321('0x4b')]),_0x3500cc[_0xc321('0x67')],_0x3500cc[_0xc321('0xd9')],_0x3500cc[_0xc321('0x73')]]);if(_0x1e4106[_0xc321('0xac')]===-0x1){return _0x1e4106;}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0xda'),'DIAL'));};AGIVertices[_0xc321('0x12')][_0xc321('0xfc')]=function(_0x48c933){logger[_0xc321('0x33')](util['format'](_0xc321('0xfd'),_0x48c933[_0xc321('0x3a')]));return this['channel'][_0xc321('0xb0')]('finally');};AGIVertices[_0xc321('0x12')][_0xc321('0xe')]=function(_0x282c8a){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0xfe'),_0x282c8a[_0xc321('0x3a')]));if(_0x282c8a[_0xc321('0xa4')]===0x0){return this['maxRetry'](_0x282c8a);}_0x282c8a[_0xc321('0xa4')]-=0x1;if(!this[_0xc321('0x82')](_0x282c8a['file_id'])){return this['channel'][_0xc321('0x2e')](_0x282c8a,_0xc321('0xff'));}var _0x33ac3=this[_0xc321('0x21')]['sync'](this,_0x282c8a[_0xc321('0x100')]);if(!_0x33ac3){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x282c8a,'no\x20file\x20audio\x20found');}if(!this[_0xc321('0x82')](_0x282c8a['variable_id'])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0xc321('0xce'));}var _0x47747f=this[_0xc321('0x10')][_0xc321('0x101')](_0x33ac3,_0x282c8a['response'],_0x282c8a[_0xc321('0x102')]);var _0x1855e6=_0x47747f[_0xc321('0xac')]?_0x47747f[_0xc321('0xac')][_0xc321('0x4f')]():'';logger[_0xc321('0x33')]('test',JSON[_0xc321('0x74')](_0x47747f));if(_0x47747f[_0xc321('0xac')]===-0x1){this['createSquareDetailsReport'][_0xc321('0xa3')](this,_0x282c8a,_0x1855e6);return _0x47747f;}else if(_0x47747f['extra']===_0xc321('0x67')){_0x47747f[_0xc321('0xac')]=_0x1855e6[_0xc321('0x9a')]>=parseInt(_0x282c8a['mindigit'])?'x':'i';}else{_0x47747f[_0xc321('0xac')]=_0x1855e6[_0xc321('0x9a')]>=parseInt(_0x282c8a[_0xc321('0x103')])&&_0x1855e6[_0xc321('0x9a')]<=parseInt(_0x282c8a[_0xc321('0x102')])?'x':'i';}var _0xfff76d=this[_0xc321('0x13')][_0xc321('0xa3')](this,_0x282c8a['variable_id']);if(!_0xfff76d){return this[_0xc321('0x10')]['error'](_0x282c8a,_0xc321('0xcf'));}this[_0xc321('0x10')][_0xc321('0x9b')](_0xfff76d,_0x1855e6);if(this[_0xc321('0x82')](_0x282c8a[_0xc321('0x104')])){var _0x28e0b9=parseInt(_0x282c8a[_0xc321('0x104')],0xa);var _0x1728a9=rs[_0xc321('0x105')]({'charset':'*','length':_0x28e0b9});var _0x554005=_0x1855e6[_0xc321('0x9a')];if(_0x554005>0x0){if(_0x554005>_0x28e0b9){this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0x282c8a,_0x282c8a['hiddendigitspos']===_0xc321('0x106')?_0x1728a9+_0x1855e6[_0xc321('0x107')](_0x28e0b9):_0x1855e6[_0xc321('0x107')](0x0,_0x554005-_0x28e0b9)+_0x1728a9);}else{this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0x282c8a,rs[_0xc321('0x105')]({'charset':'*','length':_0x554005}));}}else{this['createSquareDetailsReport'][_0xc321('0xa3')](this,_0x282c8a,'');}}else{this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0x282c8a,_0x1855e6);}return _0x47747f;};AGIVertices[_0xc321('0x12')][_0xc321('0xf')]=function(_0x237fdc){logger['info'](util[_0xc321('0x56')](_0xc321('0x108'),_0x237fdc[_0xc321('0x3a')]));return this[_0xc321('0xe')](_0x237fdc);};AGIVertices[_0xc321('0x12')][_0xc321('0x109')]=function(_0x226791){logger['info'](util[_0xc321('0x56')]('Enter\x20in\x20GOAL\x20(%s)\x20block',_0x226791['label']));this[_0xc321('0xcc')]['sync'](this,_0x226791,_0x226791[_0xc321('0x10a')]);return this['channel']['noop'](util['format'](_0xc321('0x10b'),_0x226791[_0xc321('0x10a')]));};AGIVertices[_0xc321('0x12')][_0xc321('0x10c')]=function(_0x1a74dd){logger[_0xc321('0x33')](util['format'](_0xc321('0x10d'),_0x1a74dd[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x1a74dd['aws_access_key_id'])||!this[_0xc321('0x82')](_0x1a74dd['aws_secret_access_key'])){return this[_0xc321('0x10')][_0xc321('0xb0')]('no\x20valid\x20credentials\x20configured');}if(!this[_0xc321('0x82')](_0x1a74dd['text'])){return this['channel']['noop'](_0xc321('0xb6'));}this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x10e'),_0x1a74dd[_0xc321('0x5e')]));var _0x41be15=this[_0xc321('0x84')]['sync'](this,_0x1a74dd);if(_0x41be15){this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x10f'),_0x41be15));var _0x5d372e=this[_0xc321('0x10')][_0xc321('0xf0')](_0x41be15);try{fs[_0xc321('0xf1')](_0x41be15+'.wav');}catch(_0x56af67){logger[_0xc321('0x2e')](_0x56af67);}return _0x5d372e;}return this[_0xc321('0x10')]['error'](_0x1a74dd,_0xc321('0x110'));};AGIVertices[_0xc321('0x12')][_0xc321('0x111')]=function(_0x48ae51){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x112'),_0x48ae51[_0xc321('0x3a')]));if(!this['isConfigured'](_0x48ae51['aws_access_key_id'])||!this[_0xc321('0x82')](_0x48ae51[_0xc321('0x85')])){return this[_0xc321('0x10')][_0xc321('0xb0')]('no\x20valid\x20credentials\x20configured');}if(!this[_0xc321('0x82')](_0x48ae51[_0xc321('0x8c')])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0x113'));}if(!this[_0xc321('0x82')](_0x48ae51[_0xc321('0x5e')])){return this['channel'][_0xc321('0xb0')](_0xc321('0xb6'));}this[_0xc321('0x10')]['bot']=!![];this[_0xc321('0xcc')](_0x48ae51);this[_0xc321('0x44')](_0x48ae51[_0xc321('0x5e')],'in');this['channel']['noop'](util['format'](_0xc321('0x114'),_0x48ae51['text']));var _0x2f5b97=this[_0xc321('0x8a')][_0xc321('0xa3')](this,_0x48ae51);if(_0x2f5b97){for(var _0x365d9f in _0x2f5b97){if(_0x2f5b97[_0xc321('0x92')](_0x365d9f)&&_[_0xc321('0x93')](_0x2f5b97[_0x365d9f])){this['channel'][_0xc321('0x9b')](util[_0xc321('0x56')](_0xc321('0x115'),_0x365d9f[_0xc321('0xdf')]()),_0x2f5b97[_0x365d9f]);}}if(_[_0xc321('0x4a')](_0x2f5b97['message'])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0x116'));}else{this[_0xc321('0x44')](_0x2f5b97[_0xc321('0x78')],_0xc321('0xe0'));return this['channel'][_0xc321('0xb0')](util['format'](_0xc321('0x117'),_0x2f5b97[_0xc321('0x78')]));}}return this[_0xc321('0x10')][_0xc321('0x2e')](_0x48ae51,_0xc321('0x118'));};AGIVertices[_0xc321('0x12')][_0xc321('0x119')]=function(_0x4a7871){logger['info'](util[_0xc321('0x56')](_0xc321('0x11a'),_0x4a7871[_0xc321('0x3a')],_0x4a7871['timeout']));if(!this[_0xc321('0x82')](_0x4a7871[_0xc321('0x7c')])){return this[_0xc321('0x10')][_0xc321('0xb0')]('no\x20key\x20configured');}var _0x751332='wav';var _0x24f684=util['format'](_0xc321('0x11b'),FILES_PATH,rs[_0xc321('0x105')](0x4));var _0x2bdb29=util[_0xc321('0x56')](_0xc321('0x9c'),_0x24f684,_0x751332);var _0x5cb12d=!![];if(_0x4a7871['beep']===_0xc321('0x11c')){_0x5cb12d=![];}var _0x58f1e9=this[_0xc321('0x10')][_0xc321('0x11d')](_0x24f684,_0x751332,_0x4a7871[_0xc321('0x11e')],_0x4a7871['timeout'],undefined,_0x5cb12d);if(_0x58f1e9[_0xc321('0xac')]!==-0x1){this[_0xc321('0x10')]['noop'](util['format'](_0xc321('0x11f'),_0x2bdb29));var _0x5d66c9=this[_0xc321('0x8d')][_0xc321('0xa3')](this,_0x4a7871,_0x2bdb29);if(_0x5d66c9){for(var _0x51cab3 in _0x5d66c9){if(_0x5d66c9[_0xc321('0x92')](_0x51cab3)){this[_0xc321('0x10')][_0xc321('0x9b')](util[_0xc321('0x56')](_0xc321('0x120'),_0x51cab3['toUpperCase']()),_0x5d66c9[_0x51cab3]);}}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x121'),JSON[_0xc321('0x74')](_0x5d66c9)));}}return _0x58f1e9;};AGIVertices[_0xc321('0x12')][_0xc321('0x122')]=function(_0x5ac64a){logger[_0xc321('0x33')](util['format'](_0xc321('0x123'),_0x5ac64a[_0xc321('0x3a')]));if(!this['isConfigured'](_0x5ac64a['appid'])){return this[_0xc321('0x10')]['noop'](_0xc321('0x124'));}if(!this[_0xc321('0x82')](_0x5ac64a['appsecret'])){return this['channel']['noop'](_0xc321('0x125'));}var _0x3afb1e=_0xc321('0x126');var _0x48e610=util[_0xc321('0x56')](_0xc321('0x11b'),FILES_PATH,rs[_0xc321('0x105')](0x4));var _0x4298f4=util['format'](_0xc321('0x9c'),_0x48e610,_0x3afb1e);var _0x3c5fc7=!![];if(_0x5ac64a['beep']===_0xc321('0x11c')){_0x3c5fc7=![];}var _0x1d8c83=this[_0xc321('0x10')][_0xc321('0x11d')](_0x48e610,_0x3afb1e,_0x5ac64a[_0xc321('0x11e')],_0x5ac64a['timeout'],undefined,_0x3c5fc7);if(_0x1d8c83[_0xc321('0xac')]!==-0x1){this[_0xc321('0x10')]['noop'](util['format'](_0xc321('0x127'),_0x4298f4));var _0x5d5fef=this[_0xc321('0x128')][_0xc321('0xa3')](this,_0x5ac64a,_0x4298f4);if(_0x5d5fef){for(var _0x3a8b2c in _0x5d5fef){if(_0x5d5fef[_0xc321('0x92')](_0x3a8b2c)){this[_0xc321('0x10')][_0xc321('0x9b')](util[_0xc321('0x56')]('TILDE_ASR_%s',_0x3a8b2c['toUpperCase']()),_0x5d5fef[_0x3a8b2c]);}}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x129'),JSON[_0xc321('0x74')](_0x5d5fef)));}}return _0x1d8c83;};AGIVertices[_0xc321('0x12')][_0xc321('0x12a')]=function(_0x49262b){logger['info'](util['format'](_0xc321('0x12b'),_0x49262b[_0xc321('0x3a')]));return this[_0xc321('0x10')][_0xc321('0x12c')](_0x49262b[_0xc321('0x12d')],_0x49262b[_0xc321('0x3f')],_0x49262b['priority']);};AGIVertices[_0xc321('0x12')][_0xc321('0x12e')]=function(_0x3b9027){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x12f'),_0x3b9027['label']));if(!this[_0xc321('0x82')](_0x3b9027[_0xc321('0x130')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x3b9027,_0xc321('0x131'));}try{var _0x45b6d4=eval(_0x3b9027['condition'])?_0xc321('0x132'):_0xc321('0x133');this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')]('EVAL\x20CONDITION\x20%s\x20%s',_0x3b9027[_0xc321('0x130')],_0x45b6d4));return{'code':0xc8,'result':_0x45b6d4};}catch(_0x48a620){return{'code':0xc8,'result':_0xc321('0x133')};}};AGIVertices[_0xc321('0x12')]['gotoiftime']=function(_0x1d4572){logger[_0xc321('0x33')](util['format'](_0xc321('0x134'),_0x1d4572['label']));if(!this[_0xc321('0x82')](_0x1d4572[_0xc321('0x135')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x1d4572,_0xc321('0x136'));}var _0x37e80a=this[_0xc321('0x27')]['sync'](this,_0x1d4572[_0xc321('0x135')]);if(!_0x37e80a){return this[_0xc321('0x10')]['error'](_0x1d4572,_0xc321('0x137'));}for(var _0x1c0e6b=0x0;_0x1c0e6b<_0x37e80a[_0xc321('0x9a')];_0x1c0e6b+=0x1){var _0x4eff39=this[_0xc321('0x10')][_0xc321('0x13')](util[_0xc321('0x56')](_0xc321('0x138'),_0x37e80a[_0x1c0e6b]));if(_0x4eff39['result']===-0x1){return _0x4eff39;}logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x139'),_0x37e80a[_0x1c0e6b],_0x4eff39[_0xc321('0x9f')]));if(_0x4eff39[_0xc321('0x9f')]===_0xc321('0x132')){logger['info'](util[_0xc321('0x56')](_0xc321('0x139'),_0x37e80a[_0x1c0e6b],_0xc321('0x132')));this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x139'),_0x37e80a[_0x1c0e6b],'true'));return{'code':0xc8,'result':_0xc321('0x132')};}else{logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x139'),_0x37e80a[_0x1c0e6b],_0xc321('0x133')));this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x139'),_0x37e80a[_0x1c0e6b],_0xc321('0x133')));}}return{'code':0xc8,'result':_0xc321('0x133')};};AGIVertices[_0xc321('0x12')][_0xc321('0x13a')]=function(_0x14fc26){logger[_0xc321('0x33')](util[_0xc321('0x56')]('Enter\x20in\x20HANGUP\x20(%s)\x20block',_0x14fc26[_0xc321('0x3a')]));return this[_0xc321('0x10')][_0xc321('0x13a')]();};AGIVertices['prototype'][_0xc321('0x13b')]=function(_0x30d1ab){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x13c'),_0x30d1ab[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x30d1ab[_0xc321('0x7c')])){return this[_0xc321('0x10')]['noop'](_0xc321('0x13d'));}var _0x2c35c6='wav';var _0x4589bc=util[_0xc321('0x56')]('%s/recordings/%s',FILES_PATH,rs[_0xc321('0x105')](0x4));var _0x51e110=util[_0xc321('0x56')](_0xc321('0x9c'),_0x4589bc,_0x2c35c6);var _0x5b3f6d=!![];if(_0x30d1ab[_0xc321('0x13e')]===_0xc321('0x11c')){_0x5b3f6d=![];}var _0x4861d8=this['channel']['recordFile'](_0x4589bc,_0x2c35c6,_0x30d1ab['intKey'],_0x30d1ab[_0xc321('0x67')],undefined,_0x5b3f6d);if(_0x4861d8[_0xc321('0xac')]!==-0x1){this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')]('ispeech\x20%s\x20file\x20created',_0x51e110));var _0x336a4e=this['ispeechASR'][_0xc321('0xa3')](this,_0x30d1ab,_0x51e110);if(_0x336a4e){for(var _0x39c076 in _0x336a4e){if(_0x336a4e[_0xc321('0x92')](_0x39c076)){this[_0xc321('0x10')]['setVariable'](util[_0xc321('0x56')]('ISPEECH_ASR_%s',_0x39c076[_0xc321('0xdf')]()),_0x336a4e[_0x39c076]);}}return this[_0xc321('0x10')]['noop'](util[_0xc321('0x56')]('IspeechASR\x20Result\x20%s',JSON[_0xc321('0x74')](_0x336a4e)));}}return _0x4861d8;};AGIVertices[_0xc321('0x12')][_0xc321('0x13f')]=function(_0x1afe14){logger['info'](util[_0xc321('0x56')](_0xc321('0x140'),_0x1afe14[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x1afe14[_0xc321('0x7c')])){return this[_0xc321('0x10')]['noop']('no\x20key\x20configured');}if(!this[_0xc321('0x82')](_0x1afe14[_0xc321('0x5e')])){return this['channel'][_0xc321('0xb0')](_0xc321('0xb6'));}this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')]('Trying\x20ispeech\x20TTS\x20%s',_0x1afe14[_0xc321('0x5e')]));var _0x14bdde=this[_0xc321('0x7e')][_0xc321('0xa3')](this,_0x1afe14);if(_0x14bdde){this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x141'),_0x14bdde));var _0x2b19cc=this['channel'][_0xc321('0xf0')](_0x14bdde,_0x1afe14[_0xc321('0x11e')]);try{fs[_0xc321('0xf1')](_0x14bdde+_0xc321('0xf2'));}catch(_0xe6e9aa){logger[_0xc321('0x2e')](_0xe6e9aa);}return _0x2b19cc;}return this['channel'][_0xc321('0x2e')](_0x1afe14,_0xc321('0x142'));};AGIVertices[_0xc321('0x12')][_0xc321('0x143')]=function(_0xe3f48c){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x144'),_0xe3f48c[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0xe3f48c[_0xc321('0x145')])){return this['channel'][_0xc321('0x2e')](_0xe3f48c,'no\x20find\x20by\x20configured');}logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x146'),this['channel'][_0xc321('0x3c')],_0xe3f48c['findBy']));var _0x507a94=this['agentLogin']['sync'](this,_0xe3f48c['findBy']);if(_0x507a94){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x147'),this['channel'][_0xc321('0x3c')],_0xe3f48c[_0xc321('0x145')]));this[_0xc321('0x10')]['noop'](util[_0xc321('0x56')]('AGENT\x20%s\x20FOUND\x20BY',this[_0xc321('0x10')][_0xc321('0x3c')],_0xe3f48c[_0xc321('0x145')]));return{'code':0xc8,'result':_0xc321('0x148')};}else{logger[_0xc321('0x33')](util['format'](_0xc321('0x149'),this['channel'][_0xc321('0x3c')],_0xe3f48c[_0xc321('0x145')]));this[_0xc321('0x10')][_0xc321('0xb0')](util['format'](_0xc321('0x149'),this['channel'][_0xc321('0x3c')],_0xe3f48c[_0xc321('0x145')]));return{'code':0xc8,'result':_0xc321('0x14a')};}};AGIVertices[_0xc321('0x12')][_0xc321('0x14b')]=function(_0x126bfb){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x14c'),_0x126bfb['label']));if(!this[_0xc321('0x82')](_0x126bfb[_0xc321('0x145')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x126bfb,_0xc321('0x14d'));}logger['info'](util[_0xc321('0x56')](_0xc321('0x146'),this['channel']['callerid'],_0x126bfb[_0xc321('0x145')]));var _0x8726c1=this[_0xc321('0x14e')][_0xc321('0xa3')](this,_0x126bfb['findBy']);if(_0x8726c1){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x147'),this['channel'][_0xc321('0x3c')],_0x126bfb[_0xc321('0x145')]));this[_0xc321('0x10')]['noop'](util['format'](_0xc321('0x147'),this[_0xc321('0x10')]['callerid'],_0x126bfb[_0xc321('0x145')]));return{'code':0xc8,'result':_0xc321('0x148')};}else{logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x149'),this[_0xc321('0x10')][_0xc321('0x3c')],_0x126bfb[_0xc321('0x145')]));this[_0xc321('0x10')][_0xc321('0xb0')](util['format'](_0xc321('0x149'),this['channel'][_0xc321('0x3c')],_0x126bfb[_0xc321('0x145')]));return{'code':0xc8,'result':_0xc321('0x14a')};}};AGIVertices[_0xc321('0x12')][_0xc321('0x14f')]=function(_0x103cb9){logger[_0xc321('0x33')](util[_0xc321('0x56')]('Enter\x20in\x20MATH\x20(%s)\x20block',_0x103cb9['label']));if(!this[_0xc321('0x82')](_0x103cb9[_0xc321('0x150')])){return this[_0xc321('0x10')]['error'](_0x103cb9,_0xc321('0x151'));}this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x152'),_0x103cb9[_0xc321('0x150')]));var _0xe763f3=eval(_0x103cb9[_0xc321('0x150')]);if(!this['isConfigured'](_0x103cb9['variable_id'])){return this[_0xc321('0x10')][_0xc321('0xb0')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x46798a=this[_0xc321('0x13')][_0xc321('0xa3')](this,_0x103cb9[_0xc321('0xcd')]);if(!_0x46798a){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x103cb9,_0xc321('0xcf'));}if(_[_0xc321('0x98')](_0xe763f3)){var _0xe9c038=this;_0xe763f3[_0xc321('0xd0')](function(_0x29a83d,_0x4878b2){_0xe9c038['channel'][_0xc321('0x9b')](util['format'](_0xc321('0x153'),_0x46798a,_0x4878b2),_0x29a83d);});return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x154'),_0x46798a));}else{return this[_0xc321('0x10')][_0xc321('0x9b')](_0x46798a,_0xe763f3);}};AGIVertices[_0xc321('0x12')][_0xc321('0xd')]=function(_0x20232d){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x155'),_0x20232d[_0xc321('0x3a')]));if(_0x20232d['retry']===0x0){return this[_0xc321('0xa2')](_0x20232d);}_0x20232d[_0xc321('0xa4')]-=0x1;if(!this[_0xc321('0x82')](_0x20232d[_0xc321('0x100')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x20232d,_0xc321('0xff'));}var _0x559f71=this['getSound']['sync'](this,_0x20232d['file_id']);if(!_0x559f71){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x20232d,_0xc321('0x156'));}var _0x596767=this[_0xc321('0x10')][_0xc321('0x101')](_0x559f71,_0x20232d['response'],_0x20232d[_0xc321('0x157')]);var _0x443518=_0x596767[_0xc321('0xac')];if(_0x596767['result']===-0x1){this['createSquareDetailsReport'][_0xc321('0xa3')](this,_0x20232d,'-1');return _0x596767;}else if(_0x596767[_0xc321('0x9f')]===_0xc321('0x67')){_0x596767[_0xc321('0xac')]=_0x596767['result'][_0xc321('0x9a')]>0x0?_0x596767[_0xc321('0xac')]:'t';}else if(_[_0xc321('0x46')](_0x596767[_0xc321('0xac')])){_0x596767[_0xc321('0xac')]='#';_0x443518='#';}if(!this[_0xc321('0x82')](_0x20232d['variable_id'])){this['channel'][_0xc321('0xb0')]('no\x20variable\x20selected\x20for\x20the\x20result');}else{var _0xe5705=this['getVariable'][_0xc321('0xa3')](this,_0x20232d[_0xc321('0xcd')]);if(!_0xe5705){return this[_0xc321('0x10')]['error'](_0x20232d,_0xc321('0xcf'));}this[_0xc321('0x10')]['setVariable'](_0xe5705,_0x443518);}this['createSquareDetailsReport'][_0xc321('0xa3')](this,_0x20232d,_0x443518);return _0x596767;};AGIVertices['prototype']['noop']=function(_0xf82e45){logger['info'](util[_0xc321('0x56')](_0xc321('0x158'),_0xf82e45['label']));return this[_0xc321('0x10')]['noop'](_0xf82e45[_0xc321('0x159')]||_0xf82e45['label']);};AGIVertices['prototype'][_0xc321('0x15a')]=function(_0x2e1f0f){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x15b'),_0x2e1f0f[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x2e1f0f[_0xc321('0x145')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x2e1f0f,_0xc321('0x14d'));}logger[_0xc321('0x33')](util[_0xc321('0x56')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0xc321('0x3c')],_0x2e1f0f[_0xc321('0x145')]));var _0x5974aa=this[_0xc321('0x51')][_0xc321('0xa3')](this,_0x2e1f0f[_0xc321('0x15c')]);var _0x595ca8=this[_0xc321('0x15d')][_0xc321('0xa3')](this,_0x2e1f0f[_0xc321('0x145')],_0x5974aa);if(_0x595ca8){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x147'),this[_0xc321('0x10')][_0xc321('0x3c')],_0x2e1f0f[_0xc321('0x145')]));this['channel'][_0xc321('0xb0')](util['format'](_0xc321('0x147'),this[_0xc321('0x10')][_0xc321('0x3c')],_0x2e1f0f['findBy']));return{'code':0xc8,'result':_0xc321('0x148')};}else{logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x149'),this[_0xc321('0x10')][_0xc321('0x3c')],_0x2e1f0f[_0xc321('0x145')]));this[_0xc321('0x10')][_0xc321('0xb0')](util['format'](_0xc321('0x147'),this[_0xc321('0x10')][_0xc321('0x3c')],_0x2e1f0f[_0xc321('0x145')]));return{'code':0xc8,'result':_0xc321('0x14a')};}};AGIVertices[_0xc321('0x12')]['playback']=function(_0x1d7faf){logger[_0xc321('0x33')](util['format']('Enter\x20in\x20PLAYBACK\x20(%s)\x20block',_0x1d7faf[_0xc321('0x3a')]));if(!this['isConfigured'](_0x1d7faf['file_id'])){return this['channel'][_0xc321('0x2e')](_0x1d7faf,_0xc321('0xff'));}var _0x4238c6=this[_0xc321('0x21')][_0xc321('0xa3')](this,_0x1d7faf[_0xc321('0x100')]);if(!_0x4238c6){return this[_0xc321('0x10')]['error'](_0x1d7faf,_0xc321('0x156'));}var _0x31ed0f=this['channel'][_0xc321('0x59')](_0xc321('0x15e'),[_0x4238c6,_0x1d7faf[_0xc321('0xd9')]]);if(_0x31ed0f[_0xc321('0xac')]===-0x1){return _0x31ed0f;}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x15f'),_0xc321('0x15e'),_0x4238c6));};AGIVertices[_0xc321('0x12')][_0xc321('0x160')]=function(_0xd931bd){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x161'),_0xd931bd[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0xd931bd[_0xc321('0x162')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0xd931bd,_0xc321('0x163'));}var _0x4993ee='';var _0x8c2587=parseInt(_0xd931bd['queue_id'],0xa);if(isNaN(_0x8c2587)){_0x4993ee=_0xd931bd['queue_id'];}else{_0x4993ee=this['getVoiceQueue'][_0xc321('0xa3')](this,_0xd931bd['queue_id']);if(!_0x4993ee){return this['channel'][_0xc321('0x2e')](_0xd931bd,'no\x20queue\x20found');}}var _0x5c98c3='';if(this[_0xc321('0x82')](_0xd931bd[_0xc321('0x100')])){var _0x5c3d3d=this[_0xc321('0x21')][_0xc321('0xa3')](this,_0xd931bd['file_id']);if(_0x5c3d3d){_0x5c98c3=_0x5c3d3d;}}this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0xd931bd,_0x4993ee);if(_0xd931bd[_0xc321('0xd9')][_0xc321('0x164')]('x')<0x0){_0xd931bd['opts']+='x';}if(_0xd931bd[_0xc321('0xd9')][_0xc321('0x164')]('X')<0x0){_0xd931bd['opts']+='X';}this[_0xc321('0x10')][_0xc321('0x9b')](_0xc321('0x165'),_0x4993ee?_0x4993ee[_0xc321('0x166')]():'');var _0x5b62ed=this[_0xc321('0x10')]['exec']('QUEUE',[_0x4993ee,_0xd931bd[_0xc321('0xd9')],_0xd931bd[_0xc321('0x73')],_0x5c98c3,_0xd931bd[_0xc321('0x67')],_0xd931bd[_0xc321('0x9')],_0xd931bd[_0xc321('0x167')],_0xd931bd[_0xc321('0x168')],'',_0xd931bd[_0xc321('0x169')]]);if(_0x5b62ed[_0xc321('0xac')]===-0x1){return _0x5b62ed;}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')]('Executed\x20command\x20%s\x20%s',_0xc321('0x16a'),_0x4993ee));};AGIVertices[_0xc321('0x12')][_0xc321('0x16b')]=function(_0x14767a){logger['info'](util[_0xc321('0x56')](_0xc321('0x16c'),_0x14767a['label']));var _0x2cbc25=_0x14767a[_0xc321('0x16d')]||_0xc321('0x126');var _0xdf77b4=util[_0xc321('0x56')](_0xc321('0x16e'),this[_0xc321('0x10')]['uniqueid'],rs[_0xc321('0x105')](0x5));var _0x1ce4b2=util[_0xc321('0x56')](_0xc321('0x16f'),FILES_PATH,_0xdf77b4,_0x2cbc25);var _0x252800=util['format'](_0xc321('0x11b'),FILES_PATH,_0xdf77b4);this[_0xc321('0x3d')][_0xc321('0xa3')](this,_0x14767a,_0xdf77b4,_0x1ce4b2);this[_0xc321('0x10')][_0xc321('0x9b')](_0xc321('0x170'),_0xdf77b4);logger['info']('Recording\x20%s\x20%s\x20%s\x20%s',_0x252800,_0x2cbc25,_0x14767a[_0xc321('0x171')],_0x14767a['timeout']);return this[_0xc321('0x10')][_0xc321('0x11d')](_0x252800,_0x2cbc25,_0x14767a[_0xc321('0x171')],_0x14767a[_0xc321('0x67')],undefined,!![]);};AGIVertices[_0xc321('0x12')][_0xc321('0x172')]=function(_0x17bb7d){logger[_0xc321('0x33')](util['format'](_0xc321('0x173'),_0x17bb7d['label']));if(!this[_0xc321('0x82')](_0x17bb7d[_0xc321('0x73')])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0x174'));}var _0xb840aa=this[_0xc321('0x65')]['sync'](this,_0x17bb7d);logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x175'),util[_0xc321('0x176')](_0xb840aa,{'showHidden':![],'depth':null})));if(!this[_0xc321('0x82')](_0x17bb7d[_0xc321('0xcd')])){return this[_0xc321('0x10')][_0xc321('0xb0')]('no\x20variable\x20selected\x20for\x20the\x20response');}var _0x1f1b39=this['getVariable'][_0xc321('0xa3')](this,_0x17bb7d[_0xc321('0xcd')]);if(!_0x1f1b39){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x17bb7d,_0xc321('0xcf'));}this[_0xc321('0x10')][_0xc321('0x9b')](util['format'](_0xc321('0x177'),_0x1f1b39),_0xb840aa[_0xc321('0x77')]?_0xb840aa[_0xc321('0x77')]:'200');this[_0xc321('0x10')][_0xc321('0x9b')](util[_0xc321('0x56')]('%s_STATUS_MESSAGE',_0x1f1b39),_0xb840aa[_0xc321('0x178')]?_0xb840aa[_0xc321('0x178')]:'OK');if(_0xb840aa[_0xc321('0x6c')]){try{this[_0xc321('0x99')](_0xb840aa[_0xc321('0x6c')],_0x1f1b39);}catch(_0x2d47fa){logger[_0xc321('0x2e')](util[_0xc321('0x56')](_0xc321('0x179'),_0x1f1b39));}}return this['channel']['noop'](util[_0xc321('0x56')](_0xc321('0x17a'),_0x1f1b39));};AGIVertices['prototype'][_0xc321('0x17b')]=function(_0x3ce50c){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x17c'),_0x3ce50c[_0xc321('0x3a')]));return this[_0xc321('0x10')][_0xc321('0x17d')](_0x3ce50c[_0xc321('0x17e')][_0xc321('0x5a')](/\s+/g,''),_0x3ce50c[_0xc321('0x171')]);};AGIVertices[_0xc321('0x12')]['saynumber']=function(_0x280d0a){logger[_0xc321('0x33')](util['format'](_0xc321('0x17f'),_0x280d0a[_0xc321('0x3a')]));return this[_0xc321('0x10')][_0xc321('0x180')](_0x280d0a[_0xc321('0x68')][_0xc321('0x5a')](/\s+/g,''),_0x280d0a[_0xc321('0x171')]);};AGIVertices[_0xc321('0x12')][_0xc321('0x181')]=function(_0x58eac0){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x182'),_0x58eac0[_0xc321('0x3a')]));return this['channel'][_0xc321('0x183')](_0x58eac0[_0xc321('0x5e')],_0x58eac0['escape_digits']);};AGIVertices[_0xc321('0x12')][_0xc321('0x184')]=function(_0x534897){logger['info'](util['format'](_0xc321('0x185'),_0x534897[_0xc321('0x3a')]));if(!this['isConfigured'](_0x534897[_0xc321('0x186')])){return this['channel'][_0xc321('0xb0')](_0xc321('0x187'));}var _0x242c3d=this[_0xc321('0x188')]['sync'](this,_0x534897[_0xc321('0x186')]);if(!_0x242c3d||!_0x242c3d[_0xc321('0x189')]){return this['channel']['error'](_0x534897,_0xc321('0x18a'));}var _0x59c752={'from':util[_0xc321('0x56')](_0xc321('0x18b'),_0x242c3d['name'],_0x242c3d['email']||_0x242c3d[_0xc321('0x189')][_0xc321('0x18c')]),'to':_0x534897['to']||'','cc':_0x534897['cc']||'','bcc':_0x534897[_0xc321('0x18d')]||'','subject':_0x534897[_0xc321('0x18e')],'html':_0x534897['text'],'text':_0x534897[_0xc321('0x5e')]};var _0x10be4e={'tls':{'rejectUnauthorized':![]}};if(_0x242c3d[_0xc321('0x189')][_0xc321('0x18f')]){_0x10be4e[_0xc321('0x18f')]=_0x242c3d[_0xc321('0x189')][_0xc321('0x18f')];}else{_0x10be4e['host']=_0x242c3d[_0xc321('0x189')][_0xc321('0x190')];_0x10be4e[_0xc321('0x191')]=_0x242c3d[_0xc321('0x189')]['port'];_0x10be4e[_0xc321('0x192')]=_0x242c3d[_0xc321('0x189')][_0xc321('0x192')];}if(_0x242c3d[_0xc321('0x189')][_0xc321('0x193')]){_0x10be4e['auth']={'user':_0x242c3d[_0xc321('0x189')]['user'],'pass':_0x242c3d[_0xc321('0x189')][_0xc321('0x194')]};}if(this[_0xc321('0x82')](_0x534897[_0xc321('0x195')])){}logger[_0xc321('0x196')](_0xc321('0x197'),JSON[_0xc321('0x74')](_0x59c752));this['createSquareDetailsReport'][_0xc321('0xa3')](this,_0x534897,_0x534897[_0xc321('0x186')]);this[_0xc321('0x10')]['noop'](util[_0xc321('0x56')](_0xc321('0x198'),_0x242c3d[_0xc321('0x17')]));this[_0xc321('0x25')]['sync'](this,_0x10be4e,_0x59c752);return this['channel']['noop'](_0xc321('0x199'));};AGIVertices[_0xc321('0x12')][_0xc321('0x19a')]=function(_0x5efe28){logger[_0xc321('0x33')](util[_0xc321('0x56')]('Enter\x20in\x20SENDFAX\x20(%s)\x20block',_0x5efe28[_0xc321('0x3a')]));return this[_0xc321('0x10')]['noop']('SENDFAX\x20block\x20not\x20implemented');};AGIVertices[_0xc321('0x12')]['sendSMS']=function(_0x32dae5){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x19b'),_0x32dae5[_0xc321('0x3a')]));if(!this['isConfigured'](_0x32dae5[_0xc321('0x19c')])){return this[_0xc321('0x10')][_0xc321('0xb0')]('no\x20sms\x20account\x20configured');}var _0x8e6210=this[_0xc321('0x36')][_0xc321('0xa3')](this,_0x32dae5[_0xc321('0x19c')]);if(!_0x8e6210){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x32dae5,_0xc321('0x19d'));}var _0x96c153={'body':_0x32dae5['sms_text'],'phone':_0x32dae5['to']||'','SmsAccountId':_0x8e6210['id']};logger[_0xc321('0x196')]('sendSMS\x20message',JSON[_0xc321('0x74')](_0x96c153));this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0x32dae5,_0x32dae5[_0xc321('0x19c')]);this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x19e'),_0x8e6210[_0xc321('0x17')]));this[_0xc321('0x38')][_0xc321('0xa3')](this,_0x96c153);return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0x19f'));};AGIVertices[_0xc321('0x12')]['set']=function(_0x728755){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x1a0'),_0x728755[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x728755['variable_id'])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x728755,'no\x20variable\x20selected');}var _0x39ee1b=this[_0xc321('0x13')][_0xc321('0xa3')](this,_0x728755[_0xc321('0xcd')]);if(!_0x39ee1b){return this[_0xc321('0x10')]['error'](_0x728755,_0xc321('0xcf'));}return this[_0xc321('0x10')][_0xc321('0x9b')](_0x39ee1b,_0x728755[_0xc321('0x1a1')]);};AGIVertices[_0xc321('0x12')][_0xc321('0x1a2')]=function(_0x35cbf2){logger[_0xc321('0x33')](util['format'](_0xc321('0x1a3'),_0x35cbf2[_0xc321('0x3a')]));this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0x1a4'));if(_0x35cbf2[_0xc321('0xa8')]===_0xc321('0x1a5')){this[_0xc321('0x10')][_0xc321('0xb0')]('Answer');return this[_0xc321('0x10')][_0xc321('0xa8')]();}return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0x1a6'));};AGIVertices[_0xc321('0x12')][_0xc321('0x1a7')]=function(_0x4ff3df){logger[_0xc321('0x33')](util[_0xc321('0x56')]('Enter\x20in\x20SUBPROJECT\x20(%s)\x20block',_0x4ff3df[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x4ff3df[_0xc321('0x1a8')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x4ff3df,_0xc321('0x1a9'));}var _0x4d0c69=this[_0xc321('0x18')]['sync'](this,_0x4ff3df[_0xc321('0x1a8')]);if(!this[_0xc321('0x82')](_0x4d0c69)){return this['channel'][_0xc321('0x2e')](_0x4ff3df,util[_0xc321('0x56')](_0xc321('0x1aa'),_0x4ff3df['project_id']));}if(_0x4d0c69===this['channel'][_0xc321('0x42')]){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x4ff3df,_0xc321('0x1ab'));}this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0x4ff3df,_0x4d0c69);var _0x4add02=this[_0xc321('0x10')][_0xc321('0x59')](_0xc321('0x1ac'),util['format'](_0xc321('0x1ad'),config[_0xc321('0x9')][_0xc321('0x190')]||'127.0.0.1',_0x4d0c69,this[_0xc321('0x10')][_0xc321('0x42')]));if(_0x4add02['result']===-0x1){return _0x4add02;}return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x15f'),'AGI',_0x4d0c69));};AGIVertices[_0xc321('0x12')][_0xc321('0x1ae')]=function(_0x32586e){logger['info'](util[_0xc321('0x56')](_0xc321('0x1af'),_0x32586e[_0xc321('0x3a')]));var _0x36db4f=this[_0xc321('0x58')][_0xc321('0xa3')](this,_0x32586e[_0xc321('0xa6')]);this[_0xc321('0xcc')][_0xc321('0xa3')](this,_0x32586e,_0x32586e[_0xc321('0xa6')]);if(this[_0xc321('0x82')](_0x32586e[_0xc321('0xcd')])){var _0xff4dfe=this['getVariable'][_0xc321('0xa3')](this,_0x32586e[_0xc321('0xcd')]);if(_0xff4dfe){this[_0xc321('0x10')][_0xc321('0x9b')](_0xff4dfe,_0x36db4f);return this[_0xc321('0x10')][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x1b0'),_0x32586e['command'],_0xff4dfe));}}return this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x1b1'),_0x32586e[_0xc321('0xa6')]));};AGIVertices[_0xc321('0x12')]['google_cloud_tts']=function(_0x31026a){logger[_0xc321('0x33')](util['format'](_0xc321('0x1b2'),_0x31026a[_0xc321('0x3a')]));if(!this[_0xc321('0x82')](_0x31026a[_0xc321('0x5c')])){return this[_0xc321('0x10')][_0xc321('0xb0')]('no\x20apiKey\x20configured');}if(!this[_0xc321('0x82')](_0x31026a[_0xc321('0x5e')])){return this['channel'][_0xc321('0xb0')](_0xc321('0xb6'));}this[_0xc321('0x10')][_0xc321('0xb0')](util['format'](_0xc321('0x1b3'),_0x31026a[_0xc321('0x5e')]));var _0x2fd60e=this['googleCloudTTS'][_0xc321('0xa3')](this,_0x31026a);if(_0x2fd60e){this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x1b4'),_0x2fd60e));var _0x30ed37=this['channel']['streamFile'](_0x2fd60e);try{fs[_0xc321('0xf1')](_0x2fd60e+'.wav');}catch(_0x36accc){logger[_0xc321('0x2e')](_0x36accc);}return _0x30ed37;}return this[_0xc321('0x10')][_0xc321('0x2e')](_0x31026a,_0xc321('0x1b5'));};AGIVertices['prototype'][_0xc321('0x1b6')]=function(_0x26ee6a){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x1b7'),_0x26ee6a['label']));if(!this[_0xc321('0x82')](_0x26ee6a['text'])){return this[_0xc321('0x10')][_0xc321('0xb0')](_0xc321('0xb6'));}this[_0xc321('0x10')][_0xc321('0xb0')](util['format'](_0xc321('0x1b8'),_0x26ee6a[_0xc321('0x5e')]));var _0x5545b2=this[_0xc321('0x63')][_0xc321('0xa3')](this,_0x26ee6a);if(_0x5545b2){this['channel']['noop'](util[_0xc321('0x56')](_0xc321('0x1b9'),_0x5545b2));var _0x218168=this[_0xc321('0x10')]['streamFile'](_0x5545b2);try{fs[_0xc321('0xf1')](_0x5545b2+_0xc321('0xf2'));}catch(_0x8201d2){logger[_0xc321('0x2e')](_0x8201d2);}return _0x218168;}return this[_0xc321('0x10')][_0xc321('0x2e')](_0x26ee6a,_0xc321('0x1ba'));};AGIVertices[_0xc321('0x12')][_0xc321('0x1bb')]=function(_0xd20149){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x1bc'),_0xd20149[_0xc321('0x3a')]));if(!this['isConfigured'](_0xd20149[_0xc321('0x145')])){return this[_0xc321('0x10')][_0xc321('0x2e')](_0xd20149,'no\x20find\x20by\x20configured');}logger[_0xc321('0x33')](util[_0xc321('0x56')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0xc321('0x3c')],_0xd20149[_0xc321('0x145')]));var _0x1bb6aa=this[_0xc321('0x53')][_0xc321('0xa3')](this,_0xd20149['findBy']);if(_0x1bb6aa){logger[_0xc321('0x33')](util[_0xc321('0x56')](_0xc321('0x147'),this[_0xc321('0x10')][_0xc321('0x3c')],_0xd20149[_0xc321('0x145')]));this['channel'][_0xc321('0xb0')](util[_0xc321('0x56')](_0xc321('0x147'),this['channel'][_0xc321('0x3c')],_0xd20149[_0xc321('0x145')]));return{'code':0xc8,'result':_0xc321('0x148')};}else{logger['info'](util[_0xc321('0x56')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0xc321('0x3c')],_0xd20149[_0xc321('0x145')]));this[_0xc321('0x10')][_0xc321('0xb0')](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0xc321('0x10')][_0xc321('0x3c')],_0xd20149['findBy']));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0xc321('0x12')][_0xc321('0x1bd')]=function(_0x2e49fd){logger[_0xc321('0x33')](util[_0xc321('0x56')]('Enter\x20in\x20VOICEMAIL\x20(%s)\x20block',_0x2e49fd[_0xc321('0x3a')]));var _0x3d9e61=this[_0xc321('0x10')]['exec'](_0xc321('0x1be'),[_0x2e49fd['mailbox'],_0x2e49fd[_0xc321('0x7a')]]);if(_0x3d9e61[_0xc321('0xac')]===-0x1){return _0x3d9e61;}return this['channel']['noop'](util[_0xc321('0x56')](_0xc321('0x15f'),_0xc321('0x1be'),_0x2e49fd[_0xc321('0x1bf')]));};AGIVertices[_0xc321('0x12')]['vswitch']=function(_0x4ac430){logger[_0xc321('0x33')](util[_0xc321('0x56')]('Enter\x20in\x20SWITCH\x20(%s)\x20block',_0x4ac430['label']));if(!this[_0xc321('0x82')](_0x4ac430[_0xc321('0xcd')])){return this['channel'][_0xc321('0x2e')](_0x4ac430,'no\x20variable\x20selected');}var _0x5a65cf=this['getVariable'][_0xc321('0xa3')](this,_0x4ac430['variable_id']);if(!_0x5a65cf){return this[_0xc321('0x10')][_0xc321('0x2e')](_0x4ac430,_0xc321('0xcf'));}var _0x239e32=this[_0xc321('0x10')][_0xc321('0x13')](_0x5a65cf);return{'code':0xc8,'result':_0x239e32[_0xc321('0x9f')]?_0x239e32[_0xc321('0x9f')]:'-'};};String[_0xc321('0x12')]['replaceAll']=function(_0x4e74a2,_0x3afe31){return this[_0xc321('0x9d')](_0x4e74a2)[_0xc321('0x1c0')](_0x3afe31);};module[_0xc321('0x1c1')]=AGIVertices;
\ No newline at end of file
+var _0x6545=['Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','127.0.0.1','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','shellCommand','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','googleCloudTTS','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','exports','path','shelljs','odbc','randomstring','moment','mustache','../../config/logger','agi','../../config/environment','./scripts','/var/opt/motion2/server/files','rawHeaders','getdigits','getsecretdigits','channel','rpc','prototype','getVariable','getVariableById','then','name','catch','getVoiceQueue','getSquareProject','getSquareProjectById','dsn','getUser','getUserById','getSound','getSoundById','save_name','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','IntervalId','Intervals','getSoundPath','%s/sounds/converted/%s','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','agicommand','callerid','createSquareRecording','calleridname','context','priority','accountcode','arg_1','file','createSquareMessage','createCmContact','isEmpty','isNil','random','lastName','phone','list_id','scheduledAt','callback','toString','callback_priority','getPause','getPauseById','agent','agentPause','agentUnpause','agentLogout','agentLogin','internal','format','LOCAL','replace','apiKey','google_cloud_tts_text_type','text','languageCode','en-US','ssmlGender','MALE','audioEncoding','MP3','googleTTS','google_tts_language','restAPI','url','method','timeout','includes','POST','PUT','body','parse','rawBody','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','sync','uri','render','stringify','statusCode','statusMessage','message','options','googleDialogflow','dialogflow_language','sestekNDA','key','ispeech_tts_language','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_polly_region','aws_polly_voice','Amy','awsLex','aws_secret_access_key','aws_lex_region','googleASR','google_asr_language','tildeASR','appsecret','clear','hasOwnProperty','isString','replaceAllVariables','recursiveNodeIndex','isPlainObject','saveRestApiResult','isArray','length','%s.%s','setVariable','split','replaceAll','extra','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','retry','maxRetry','label','command','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','delay','add','minutes','noop','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','exec','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','no\x20text\x20configured','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','grammar','no\x20grammar\x20configured','LUMENVOX_ASR_CONFIDENCE','RECOG_INPUT()','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','sestekasr','RECOG_CONFIDENCE()','SESTEK_ASR_TRANSCRIPT','RECOG_INSTANCE()','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','getSquareOdbc','no\x20odbc\x20database\x20found','query','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','debug','sip_id','DIAL','opts','Executed\x20command\x20%s','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','bot','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','toUpperCase','speech','out','Dialogflow\x20Result\x20%s','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','password','no\x20password\x20configured','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','audiofile','streamFile','unlink','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','trunk_id','no\x20trunk\x20selected','getTrunk','no\x20trunk\x20found','trunk_name','SIP/%s/%s','Enter\x20in\x20FINALLY\x20(%s)\x20block','file_id','no\x20file\x20audio\x20found','maxdigit','test','mindigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','GOAL\x20%s','goalname','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','.wav','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','no\x20bot\x20name\x20configured','Amazon\x20Lex\x20ready\x20for\x20fulfillment','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','beep','intKey','GOOGLE_ASR_%s','Enter\x20in\x20TILDEASR\x20(%s)\x20block','appid','no\x20appid\x20configured','no\x20appsecret\x20configured','%s/recordings/%s','NOBEEP','recordFile','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','extension','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','no\x20interval\x20configured','interval_id','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','true','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Trying\x20ispeech\x20TTS\x20%s','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','no\x20find\x20by\x20configured','findBy','AGENT\x20%s\x20FOUND\x20BY','success','failure','Enter\x20in\x20LOGOUT\x20(%s)\x20block','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20NOT\x20FOUND\x20BY','Enter\x20in\x20MATH\x20(%s)\x20block','operation','%s[%s]','menu','Enter\x20in\x20MENU\x20(%s)\x20block','no\x20file\x20audio\x20selected','getData','response','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','playback','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','indexOf','XMCS-QUEUE','toLowerCase','macro','gosub','position','QUEUE','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','Response:','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','number','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','no\x20mail\x20account\x20configured','getMailAccount','Smtp','\x22%s\x22\x20<%s>','email','user','bcc','subject','service','host','port','secure','authentication','auth','sendMail\x20message','account_id','Trying\x20SendMail\x20with\x20account\x20%s','Mail\x20message\x20added\x20to\x20outgoing\x20process','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','Enter\x20in\x20SENDSMS\x20(%s)\x20block','no\x20sms\x20account\x20configured','sms_account_id','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','yes','Answer','subproject'];(function(_0x28868d,_0xd3a4b0){var _0x4aeb1d=function(_0x3a1ed7){while(--_0x3a1ed7){_0x28868d['push'](_0x28868d['shift']());}};_0x4aeb1d(++_0xd3a4b0);}(_0x6545,0x1d5));var _0x5654=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6545[_0x14add3];return _0x4a174f;};'use strict';var fs=require('fs');var path=require(_0x5654('0x0'));var util=require('util');var _=require('lodash');var sh=require(_0x5654('0x1'));var odbc=require(_0x5654('0x2'))();var rs=require(_0x5654('0x3'));var moment=require(_0x5654('0x4'));var Mustache=require(_0x5654('0x5'));var rp=require('request-promise');var logger=require(_0x5654('0x6'))(_0x5654('0x7'));var config=require(_0x5654('0x8'));var scripts=require(_0x5654('0x9'));var FILES_PATH=_0x5654('0xa');var recursiveMapAttributes=[_0x5654('0xb'),'rawBody'];var verticesWithRetry=['menu',_0x5654('0xc'),_0x5654('0xd')];var AGIVertices=function(_0x2ff1c7,_0x3b3784,_0x1e16ea){this[_0x5654('0xe')]=_0x2ff1c7;this[_0x5654('0xf')]=_0x3b3784;this['mailRpc']=_0x1e16ea;};AGIVertices[_0x5654('0x10')][_0x5654('0x11')]=function(_0x570b03,_0x3b386b){this[_0x5654('0xf')][_0x5654('0x12')](_0x570b03)[_0x5654('0x13')](function(_0x21b657){_0x3b386b(null,_0x21b657?_0x21b657[_0x5654('0x14')]:![]);})[_0x5654('0x15')](function(_0x486d9b){_0x3b386b(_0x486d9b);});};AGIVertices[_0x5654('0x10')][_0x5654('0x16')]=function(_0xa0a5cc,_0x4eb861){this[_0x5654('0xf')]['getVoiceQueueById'](_0xa0a5cc)[_0x5654('0x13')](function(_0xbecefe){_0x4eb861(null,_0xbecefe?_0xbecefe[_0x5654('0x14')]:![]);})['catch'](function(_0x2a746c){_0x4eb861(_0x2a746c);});};AGIVertices[_0x5654('0x10')][_0x5654('0x17')]=function(_0x215208,_0x237dcc){this[_0x5654('0xf')][_0x5654('0x18')](_0x215208)[_0x5654('0x13')](function(_0x436690){_0x237dcc(null,_0x436690?_0x436690['name']:![]);})[_0x5654('0x15')](function(_0x1a4ae5){_0x237dcc(_0x1a4ae5);});};AGIVertices['prototype']['getSquareOdbc']=function(_0x49887f,_0x7d5709){this['rpc']['getSquareOdbcById'](_0x49887f)[_0x5654('0x13')](function(_0x120170){_0x7d5709(null,_0x120170?_0x120170[_0x5654('0x19')]:![]);})[_0x5654('0x15')](function(_0x49ad48){_0x7d5709(_0x49ad48);});};AGIVertices['prototype'][_0x5654('0x1a')]=function(_0x2dcc69,_0x382e61){this[_0x5654('0xf')][_0x5654('0x1b')](_0x2dcc69)[_0x5654('0x13')](function(_0x60c174){_0x382e61(null,_0x60c174?_0x60c174['name']:![]);})[_0x5654('0x15')](function(_0x1a1357){_0x382e61(_0x1a1357);});};AGIVertices[_0x5654('0x10')]['getTrunk']=function(_0x168553,_0x1099de){this[_0x5654('0xf')]['getTrunkById'](_0x168553)[_0x5654('0x13')](function(_0x401c28){_0x1099de(null,_0x401c28?_0x401c28[_0x5654('0x14')]:![]);})[_0x5654('0x15')](function(_0x20a67a){_0x1099de(_0x20a67a);});};AGIVertices[_0x5654('0x10')][_0x5654('0x1c')]=function(_0x25831a,_0x1da47c){var _0x1fb353=this;this[_0x5654('0xf')][_0x5654('0x1d')](_0x25831a)[_0x5654('0x13')](function(_0x5e2291){_0x1da47c(null,_0x5e2291?_0x1fb353['getSoundPath'](_0x5e2291[_0x5654('0x1e')]):![]);})[_0x5654('0x15')](function(_0xbba9cb){_0x1da47c(_0xbba9cb);});};AGIVertices[_0x5654('0x10')]['getMailAccount']=function(_0x17cf3c,_0x536e34){this[_0x5654('0xf')][_0x5654('0x1f')](_0x17cf3c)[_0x5654('0x13')](function(_0xd75e8b){_0x536e34(null,_0xd75e8b?_0xd75e8b:![]);})[_0x5654('0x15')](function(_0x37f42e){_0x536e34(_0x37f42e);});};AGIVertices[_0x5654('0x10')][_0x5654('0x20')]=function(_0x4e2605,_0x47bdae,_0x5f4cd9){this['mailRpc']['sendMailMessage'](_0x4e2605,_0x47bdae)[_0x5654('0x13')](function(){_0x5f4cd9(null);})[_0x5654('0x15')](function(_0xa3e510){_0x5f4cd9(_0xa3e510);});};AGIVertices[_0x5654('0x10')][_0x5654('0x21')]=function(_0x2614c5,_0x5d3859){this[_0x5654('0xf')][_0x5654('0x22')](_0x2614c5)['then'](function(_0x2cbaec){if(_0x2cbaec){if(_0x2cbaec[_0x5654('0x23')]){_0x5d3859(null,[_0x2cbaec['interval']]);}else{_0x5d3859(null,_['map'](_0x2cbaec[_0x5654('0x24')],'interval'));}}else{_0x5d3859(null,![]);}})[_0x5654('0x15')](function(_0x2eb954){_0x5d3859(_0x2eb954);});};AGIVertices[_0x5654('0x10')][_0x5654('0x25')]=function(_0x22c70a){return util['format'](_0x5654('0x26'),FILES_PATH,_0x22c70a);};AGIVertices[_0x5654('0x10')][_0x5654('0x27')]=function(_0x2bd45e,_0x44874a,_0xad83f0){odbc[_0x5654('0x28')](_0x2bd45e,function(_0xc3e6c1){if(_0xc3e6c1){logger[_0x5654('0x29')](_0x5654('0x2a'),_0xc3e6c1);_0xad83f0(_0xc3e6c1);}else{logger[_0x5654('0x2b')]('ODBC\x20connection\x20successfully');odbc['query'](_0x44874a,function(_0xeb7eb9,_0x270cde){if(_0xeb7eb9){logger[_0x5654('0x2b')](_0x5654('0x2c'),_0x44874a);_0xad83f0(_0xeb7eb9);}else{logger[_0x5654('0x2b')](_0x5654('0x2d'),_0x44874a);odbc['close'](function(_0x1013f0){if(_0x1013f0){logger['error'](_0x5654('0x2e'),_0x1013f0);}_0xad83f0(null,_0x270cde);});}});}});};AGIVertices[_0x5654('0x10')][_0x5654('0x2f')]=function(_0x854fcd,_0x5c9c6e){this[_0x5654('0xf')][_0x5654('0x30')](_0x854fcd)['then'](function(_0xf52228){_0x5c9c6e(null,_0xf52228?_0xf52228:![]);})['catch'](function(_0x5c4384){_0x5c9c6e(_0x5c4384);});};AGIVertices['prototype']['createSmsMessage']=function(_0x223ee9,_0x1e8007){this[_0x5654('0xf')][_0x5654('0x31')](_0x223ee9)[_0x5654('0x13')](function(_0x4ab180){_0x1e8007(null,_0x4ab180);})['catch'](function(_0x2ae705){_0x1e8007(_0x2ae705);});};AGIVertices[_0x5654('0x10')][_0x5654('0x32')]=function(_0x1ad822,_0x13131c,_0x25528a){this['rpc']['createSquareDetailsReport']({'uniqueid':this[_0x5654('0xe')][_0x5654('0x33')],'node':_0x1ad822['label'],'application':_0x1ad822[_0x5654('0x34')],'data':_0x13131c||null,'project_name':this[_0x5654('0xe')]['arg_1'],'callerid':this[_0x5654('0xe')][_0x5654('0x35')]})[_0x5654('0x13')](function(_0x45386d){if(_0x25528a){_0x25528a(null,_0x45386d);}})[_0x5654('0x15')](function(_0x52b9d8){if(_0x25528a){_0x25528a(_0x52b9d8);}});};AGIVertices[_0x5654('0x10')]['createSquareRecording']=function(_0x3ab4d9,_0x146829,_0x1b2018,_0x1375d9){this['rpc'][_0x5654('0x36')]({'uniqueid':this[_0x5654('0xe')][_0x5654('0x33')],'callerid':this['channel'][_0x5654('0x35')],'calleridname':this[_0x5654('0xe')][_0x5654('0x37')],'context':this['channel'][_0x5654('0x38')],'extension':this[_0x5654('0xe')]['extension'],'priority':this[_0x5654('0xe')][_0x5654('0x39')],'accountcode':this[_0x5654('0xe')][_0x5654('0x3a')],'dnid':this[_0x5654('0xe')]['dnid'],'projectName':this['channel'][_0x5654('0x3b')],'saveName':_0x146829,'filename':_0x3ab4d9[_0x5654('0x3c')]||_0x146829,'savePath':_0x1b2018})[_0x5654('0x13')](function(_0x2f18f8){_0x1375d9(null,_0x2f18f8);})[_0x5654('0x15')](function(_0x351a6f){_0x1375d9(_0x351a6f);});};AGIVertices[_0x5654('0x10')][_0x5654('0x3d')]=function(_0x945da0,_0x54471c,_0x3136ad){this[_0x5654('0xf')]['createSquareMessage']({'uniqueid':this['channel'][_0x5654('0x33')],'body':_0x945da0,'direction':_0x54471c})[_0x5654('0x13')](function(_0x436789){if(_0x3136ad){_0x3136ad(null,_0x436789);}})[_0x5654('0x15')](function(_0x56923f){if(_0x3136ad){_0x3136ad(_0x56923f);}});};AGIVertices[_0x5654('0x10')][_0x5654('0x3e')]=function(_0x38ce51,_0x509b0a){this['rpc'][_0x5654('0x3e')]({'firstName':_[_0x5654('0x3f')](_0x38ce51[_0x5654('0x14')])||_[_0x5654('0x40')](_0x38ce51[_0x5654('0x14')])?'callback_'+Math[_0x5654('0x41')]():_0x38ce51[_0x5654('0x14')],'lastName':_[_0x5654('0x3f')](_0x38ce51['lastName'])||_[_0x5654('0x40')](_0x38ce51[_0x5654('0x42')])?null:_0x38ce51[_0x5654('0x42')],'phone':_0x38ce51[_0x5654('0x43')],'ListId':_0x38ce51[_0x5654('0x44')],'scheduledat':_0x38ce51[_0x5654('0x45')],'callbackUniqueid':this[_0x5654('0xe')][_0x5654('0x33')],'tags':_0x5654('0x46'),'description':'Callback\x20scheduled\x20at\x20'+_0x38ce51[_0x5654('0x45')][_0x5654('0x47')](),'priority':_0x38ce51[_0x5654('0x48')]})['then'](function(_0x38023b){_0x509b0a(null,_0x38023b);})[_0x5654('0x15')](function(_0x40f7fe){_0x509b0a(_0x40f7fe);});};AGIVertices[_0x5654('0x10')][_0x5654('0x49')]=function(_0x133fc6,_0x4b251f){this['rpc'][_0x5654('0x4a')](_0x133fc6)[_0x5654('0x13')](function(_0x90b3ca){_0x4b251f(null,_0x90b3ca?_0x90b3ca[_0x5654('0x14')]:![]);})['catch'](function(_0x3041db){_0x4b251f(_0x3041db);});};AGIVertices[_0x5654('0x10')]['agentPause']=function(_0x3a4d77,_0x11232c,_0x3c5300){var _0x137779={'role':_0x5654('0x4b')};_0x137779[_0x3a4d77]=this['channel'][_0x5654('0x35')];this['rpc'][_0x5654('0x4c')](_0x137779,_0x11232c,this[_0x5654('0xe')][_0x5654('0x33')])[_0x5654('0x13')](function(_0x17af46){_0x3c5300(null,_[_0x5654('0x40')](_0x17af46)?![]:!![]);})['catch'](function(_0x198ac4){logger['error'](_0x198ac4);_0x3c5300(null,![]);});};AGIVertices[_0x5654('0x10')][_0x5654('0x4d')]=function(_0x5a7493,_0x1455d4){var _0x3c495f={'role':'agent'};_0x3c495f[_0x5a7493]=this[_0x5654('0xe')]['callerid'];this['rpc'][_0x5654('0x4d')](_0x3c495f)['then'](function(_0x47a535){_0x1455d4(null,_[_0x5654('0x40')](_0x47a535)?![]:!![]);})[_0x5654('0x15')](function(_0x214906){logger[_0x5654('0x29')](_0x214906);_0x1455d4(null,![]);});};AGIVertices[_0x5654('0x10')][_0x5654('0x4e')]=function(_0xf20d67,_0x1dfe4e){var _0x38238f={'role':_0x5654('0x4b')};_0x38238f[_0xf20d67]=this[_0x5654('0xe')]['callerid'];this[_0x5654('0xf')][_0x5654('0x4e')](_0x38238f)[_0x5654('0x13')](function(_0x3549de){_0x1dfe4e(null,_[_0x5654('0x40')](_0x3549de)?![]:!![]);})[_0x5654('0x15')](function(_0x2a74a3){logger[_0x5654('0x29')](_0x2a74a3);_0x1dfe4e(null,![]);});};AGIVertices[_0x5654('0x10')][_0x5654('0x4f')]=function(_0x347315,_0x12a508){var _0x2bd790={'role':_0x5654('0x4b')};_0x2bd790[_0x347315]=this['channel'][_0x5654('0x35')];var _0x578e8f=_0x347315!=_0x5654('0x50')?util[_0x5654('0x51')]('%s/%s@from-sip/n',_0x5654('0x52'),this[_0x5654('0xe')]['callerid']):undefined;this['rpc'][_0x5654('0x4f')](_0x2bd790,_0x578e8f)[_0x5654('0x13')](function(_0x1261d9){_0x12a508(null,_[_0x5654('0x40')](_0x1261d9)?![]:!![]);})[_0x5654('0x15')](function(_0x14c670){logger[_0x5654('0x29')](_0x14c670);_0x12a508(null,![]);});};AGIVertices[_0x5654('0x10')]['shellCommand']=function(_0x403c0a,_0x28a1d0){sh['exec'](_['trim'](_0x403c0a),function(_0x1359d7,_0x4a1338){var _0x323293=_0x4a1338[_0x5654('0x53')](/(\r\n|\n|\r)/gm,'');_0x28a1d0(null,_0x323293);});};AGIVertices[_0x5654('0x10')]['googleCloudTTS']=function(_0x493e5f,_0x221e58){scripts['googleCloudTTS'](_0x493e5f[_0x5654('0x54')],_0x493e5f[_0x5654('0x55')]||_0x5654('0x56'),_0x493e5f[_0x5654('0x56')],_0x493e5f[_0x5654('0x57')]||_0x5654('0x58'),_0x493e5f[_0x5654('0x59')]||_0x5654('0x5a'),_0x493e5f[_0x5654('0x5b')]||_0x5654('0x5c'))[_0x5654('0x13')](function(_0x55a29c){_0x221e58(null,_0x55a29c);})[_0x5654('0x15')](function(_0x1a05df){_0x221e58(_0x1a05df);});};AGIVertices[_0x5654('0x10')][_0x5654('0x5d')]=function(_0x21a237,_0x189565){scripts[_0x5654('0x5d')](_0x21a237['text'],_0x21a237[_0x5654('0x5e')]||'en',0x1)['then'](function(_0x3f1177){_0x189565(null,_0x3f1177);})[_0x5654('0x15')](function(_0x3b037c){_0x189565(_0x3b037c);});};AGIVertices[_0x5654('0x10')][_0x5654('0x5f')]=function(_0x1f2960,_0x1a4c8d){var _0x14fc24={'uri':_0x1f2960[_0x5654('0x60')],'method':_0x1f2960[_0x5654('0x61')],'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x1f2960[_0x5654('0x62')])==='number'&&parseInt(_0x1f2960[_0x5654('0x62')])>=0x1?parseInt(_0x1f2960[_0x5654('0x62')])*0x3e8:0x5*0x3e8};if(_[_0x5654('0x63')]([_0x5654('0x64'),_0x5654('0x65')],_0x14fc24[_0x5654('0x61')]['toUpperCase']())){try{_0x14fc24[_0x5654('0x66')]=_0x1f2960['rawBody']?JSON[_0x5654('0x67')](_0x1f2960[_0x5654('0x68')]):{};}catch(_0x221c34){logger[_0x5654('0x29')](_0x5654('0x69'),_0x221c34);}}try{_0x14fc24[_0x5654('0x6a')]=_0x1f2960[_0x5654('0xb')]?JSON[_0x5654('0x67')](_0x1f2960['rawHeaders']):{};}catch(_0x1f05cb){logger['error'](_0x5654('0x6b'),_0x1f05cb);}if(_0x1f2960['computedVariables']){try{var _0x43998b=require(_0x1f2960[_0x5654('0x6c')])[_0x5654('0x6d')](this,_0x14fc24);_0x14fc24[_0x5654('0x6e')]=Mustache['render'](_0x1f2960['url'],_0x43998b,{},['$$','$$']);if(_0x14fc24[_0x5654('0x6a')]){_0x14fc24[_0x5654('0x6a')]=JSON[_0x5654('0x67')](Mustache[_0x5654('0x6f')](JSON[_0x5654('0x70')](_0x14fc24[_0x5654('0x6a')]),_0x43998b,{},['$$','$$']));}if(_0x14fc24[_0x5654('0x66')]){_0x14fc24[_0x5654('0x66')]=JSON[_0x5654('0x67')](Mustache[_0x5654('0x6f')](JSON[_0x5654('0x70')](_0x14fc24[_0x5654('0x66')]),_0x43998b,{},['$$','$$']));}}catch(_0x540d2b){logger['error']('An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function',_0x540d2b);}}rp(_0x14fc24)[_0x5654('0x13')](function(_0x1ff504){var _0x3e8dc3={'statusCode':_0x1ff504[_0x5654('0x71')]||0xc8,'statusMessage':_0x1ff504[_0x5654('0x72')]||'OK','headers':_0x1ff504['headers']||{},'body':_0x1ff504[_0x5654('0x66')]||{}};_0x1a4c8d(null,_0x3e8dc3);})['catch'](function(_0x22b218){var _0x57bf2b={'statusCode':_0x22b218['statusCode']||0x1f4,'statusMessage':_0x22b218[_0x5654('0x73')]||'500\x20-\x20Internal\x20Server\x20Error','headers':_0x22b218[_0x5654('0x74')][_0x5654('0x6a')]||{},'body':_0x22b218[_0x5654('0x74')]['body']||{}};_0x1a4c8d(null,_0x57bf2b);});};AGIVertices[_0x5654('0x10')][_0x5654('0x75')]=function(_0x347e79,_0x3e2a93){scripts[_0x5654('0x75')](this[_0x5654('0xe')]['uniqueid'],_0x347e79['key'],_0x347e79[_0x5654('0x56')],_0x347e79[_0x5654('0x76')]||'en')[_0x5654('0x13')](function(_0x4d0429){_0x3e2a93(null,_0x4d0429);})['catch'](function(_0x471ae8){_0x3e2a93(_0x471ae8);});};AGIVertices[_0x5654('0x10')]['sestekNDA']=function(_0x3f8da6,_0x16cdd0){scripts[_0x5654('0x77')](this[_0x5654('0xe')],_0x3f8da6)[_0x5654('0x13')](function(_0x52b417){_0x16cdd0(null,_0x52b417);})[_0x5654('0x15')](function(_0x5c80ed){_0x16cdd0(_0x5c80ed);});};AGIVertices[_0x5654('0x10')]['ispeechTTS']=function(_0x52f58e,_0x3bac00){scripts['ispeechTTS'](_0x52f58e[_0x5654('0x78')],_0x52f58e[_0x5654('0x56')],_0x52f58e[_0x5654('0x79')]||'en-US',_0x52f58e[_0x5654('0x7a')])[_0x5654('0x13')](function(_0x2ca41e){_0x3bac00(null,_0x2ca41e);})['catch'](function(_0x2fc004){_0x3bac00(_0x2fc004);});};AGIVertices[_0x5654('0x10')][_0x5654('0x7b')]=function(_0x1dd7e5,_0x5a961d,_0x79e304){scripts[_0x5654('0x7b')](_0x5a961d,_0x1dd7e5[_0x5654('0x78')],_0x1dd7e5[_0x5654('0x7c')]||'en-US',this[_0x5654('0x7d')](_0x1dd7e5[_0x5654('0x7e')])?_0x1dd7e5[_0x5654('0x7e')]:undefined)[_0x5654('0x13')](function(_0x32552e){_0x79e304(null,_0x32552e);})[_0x5654('0x15')](function(_0x53b622){_0x79e304(_0x53b622);});};AGIVertices['prototype']['awsPolly']=function(_0x5f1327,_0x35e544){scripts[_0x5654('0x7f')](_0x5f1327[_0x5654('0x80')],_0x5f1327['aws_secret_access_key'],_0x5f1327[_0x5654('0x81')],_0x5f1327[_0x5654('0x82')]||_0x5654('0x83'),_0x5f1327['text'],_0x5f1327['aws_text_type']||_0x5654('0x56'))[_0x5654('0x13')](function(_0xf8fb74){_0x35e544(null,_0xf8fb74);})[_0x5654('0x15')](function(_0x14d0b3){_0x35e544(_0x14d0b3);});};AGIVertices[_0x5654('0x10')]['awsLex']=function(_0x2f983b,_0x3402a5){scripts[_0x5654('0x84')](this['channel']['uniqueid'],_0x2f983b['aws_access_key_id'],_0x2f983b[_0x5654('0x85')],_0x2f983b[_0x5654('0x86')],_0x2f983b[_0x5654('0x56')],_0x2f983b['aws_bot_name'])[_0x5654('0x13')](function(_0x455278){_0x3402a5(null,_0x455278);})['catch'](function(_0x2b99a8){_0x3402a5(_0x2b99a8);});};AGIVertices[_0x5654('0x10')][_0x5654('0x87')]=function(_0x4ea3a8,_0xe618d0,_0x3e6876){scripts[_0x5654('0x87')](_0xe618d0,_0x4ea3a8[_0x5654('0x78')],_0x4ea3a8[_0x5654('0x88')]||_0x5654('0x58'))[_0x5654('0x13')](function(_0x564e63){_0x3e6876(null,_0x564e63);})['catch'](function(_0x2daa20){_0x3e6876(_0x2daa20);});};AGIVertices[_0x5654('0x10')][_0x5654('0x89')]=function(_0x497e42,_0x304932,_0x3cab6d){scripts['tildeASR'](_0x304932,_0x497e42['appid'],_0x497e42[_0x5654('0x8a')],_0x497e42[_0x5654('0x6e')])[_0x5654('0x13')](function(_0x3d96aa){_0x3cab6d(null,_0x3d96aa);})[_0x5654('0x15')](function(_0x43b8e7){_0x3cab6d(_0x43b8e7);});};AGIVertices['prototype'][_0x5654('0x8b')]=function(_0x3855da){var _0x50a8fc=_['includes'](verticesWithRetry,_0x3855da[_0x5654('0x34')])?_0x3855da:_['clone'](_0x3855da);for(var _0x84ec5c in _0x50a8fc){if(_0x50a8fc[_0x5654('0x8c')](_0x84ec5c)){if(_0x50a8fc[_0x84ec5c]&&_[_0x5654('0x8d')](_0x50a8fc[_0x84ec5c])){if(_[_0x5654('0x63')](recursiveMapAttributes,_0x84ec5c)){_0x50a8fc[_0x84ec5c]=this['replaceObjectAllVariables'](_0x50a8fc[_0x84ec5c]);}else{_0x50a8fc[_0x84ec5c]=this[_0x5654('0x8e')](_0x50a8fc[_0x84ec5c]);}}}}return _0x50a8fc;};AGIVertices['prototype'][_0x5654('0x8f')]=function(_0x2c2d84){for(var _0x527ac3 in _0x2c2d84){if(_0x2c2d84[_0x5654('0x8c')](_0x527ac3)){if(_[_0x5654('0x90')](_0x2c2d84[_0x527ac3])){this[_0x5654('0x8f')](_0x2c2d84[_0x527ac3]);}else if(_['isArray'](_0x2c2d84[_0x527ac3])){for(var _0x3202e0=0x0;_0x3202e0<_0x2c2d84[_0x527ac3]['length'];_0x3202e0++){this[_0x5654('0x8f')](_0x2c2d84[_0x527ac3][_0x3202e0]);}}else if(_[_0x5654('0x8d')](_0x2c2d84[_0x527ac3])){_0x2c2d84[_0x527ac3]=this[_0x5654('0x8e')](_0x2c2d84[_0x527ac3]);}}}};AGIVertices[_0x5654('0x10')][_0x5654('0x91')]=function(_0x3d5cae,_0x203a8b){for(var _0x2fbaa6 in _0x3d5cae){if(_0x3d5cae[_0x5654('0x8c')](_0x2fbaa6)){if(_[_0x5654('0x90')](_0x3d5cae[_0x2fbaa6])){if(!_[_0x5654('0x3f')](_0x3d5cae[_0x2fbaa6])){this['saveRestApiResult'](_0x3d5cae[_0x2fbaa6],util[_0x5654('0x51')]('%s.%s',_0x203a8b,_0x2fbaa6));}}else if(_[_0x5654('0x92')](_0x3d5cae[_0x2fbaa6])){for(var _0x361910=0x0;_0x361910<_0x3d5cae[_0x2fbaa6][_0x5654('0x93')];_0x361910++){this[_0x5654('0x91')](_0x3d5cae[_0x2fbaa6][_0x361910],util[_0x5654('0x51')](_0x5654('0x94'),_0x203a8b,_0x2fbaa6+'['+_0x361910+']'));}}else{if(!_['isNil'](_0x3d5cae[_0x2fbaa6])){this[_0x5654('0xe')][_0x5654('0x95')](util[_0x5654('0x51')](_0x5654('0x94'),_0x203a8b,_0x2fbaa6),_0x3d5cae[_0x2fbaa6]);}}}}};AGIVertices[_0x5654('0x10')]['replaceObjectAllVariables']=function(_0xb904e2){try{var _0x77529a=JSON[_0x5654('0x67')](_0xb904e2);this[_0x5654('0x8f')](_0x77529a);return JSON[_0x5654('0x70')](_0x77529a);}catch(_0x1c78f9){return this[_0x5654('0x8e')](_0xb904e2);}};AGIVertices[_0x5654('0x10')]['replaceAllVariables']=function(_0x3831d2){var _0x863334=_0x3831d2[_0x5654('0x96')]('{');for(var _0x4b1b4f=0x1;_0x4b1b4f<_0x863334['length'];_0x4b1b4f+=0x1){var _0x3ad36c=_0x863334[_0x4b1b4f][_0x5654('0x96')]('}');if(_0x3ad36c[_0x5654('0x93')]>0x1){_0x3831d2=_0x3831d2[_0x5654('0x97')]('{'+_0x3ad36c[0x0]+'}',this[_0x5654('0xe')][_0x5654('0x11')](_0x3ad36c[0x0])[_0x5654('0x98')]||_0x3ad36c[0x0]);}}if(_0x863334[_0x5654('0x93')]===0x1){return _0x3831d2[_0x5654('0x47')]();}return this[_0x5654('0x8e')](_0x3831d2);};AGIVertices[_0x5654('0x10')][_0x5654('0x99')]=function(_0x52f99c,_0x2acfa9){var _0x55c2fc=this[_0x5654('0xe')][_0x5654('0x11')](_0x52f99c);if(_0x55c2fc[_0x5654('0x9a')]===-0x1){return _0x55c2fc;}logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x9b'),_0x2acfa9,_0x55c2fc['extra']));return this[_0x5654('0xe')][_0x5654('0x95')](_0x2acfa9,_0x55c2fc['extra']);};AGIVertices[_0x5654('0x10')][_0x5654('0x7d')]=function(_0x1ac89b){return _0x1ac89b&&_0x1ac89b!=='0'&&_0x1ac89b!=='-1'&&_0x1ac89b!=='';};AGIVertices[_0x5654('0x10')]['maxRetry']=function(_0xfdc5f9){this[_0x5654('0x32')][_0x5654('0x6d')](this,_0xfdc5f9,'-');_0xfdc5f9[_0x5654('0x9c')]=_0xfdc5f9[_0x5654('0x9d')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x5654('0x10')]['agi']=function(_0x34b087){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20AGI\x20(%s)\x20block',_0x34b087[_0x5654('0x9e')]));return this[_0x5654('0xe')]['agi']([_0x34b087[_0x5654('0x9f')],_0x34b087['args']]);};AGIVertices[_0x5654('0x10')][_0x5654('0xa0')]=function(_0x46badc){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0xa1'),_0x46badc[_0x5654('0x9e')]));if(this[_0x5654('0x7d')](_0x46badc[_0x5654('0x62')])){logger['info'](util[_0x5654('0x51')](_0x5654('0xa2'),_0x46badc[_0x5654('0x62')]));var _0x17678f=this[_0x5654('0xe')][_0x5654('0xa3')](_0x46badc[_0x5654('0x62')]);if(_0x17678f[_0x5654('0x9a')]===-0x1){return _0x17678f;}}return this[_0x5654('0xe')][_0x5654('0xa0')]();};AGIVertices['prototype']['callback']=function(_0x111baa){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0xa4'),_0x111baa[_0x5654('0x9e')]));if(!this['isConfigured'](_0x111baa[_0x5654('0x44')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x111baa,_0x5654('0xa5'));}_0x111baa[_0x5654('0x45')]=moment();if(this['isConfigured'](_0x111baa[_0x5654('0xa6')])){_0x111baa[_0x5654('0x45')]=moment()[_0x5654('0xa7')](_0x111baa[_0x5654('0xa6')],_0x5654('0xa8'));}if(!this['isConfigured'](_0x111baa[_0x5654('0x48')])){_0x111baa['callback_priority']=0x2;}this['createCmContact'][_0x5654('0x6d')](this,_0x111baa);return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xaa'),_0x111baa['phone'],_0x111baa[_0x5654('0x44')],_0x111baa[_0x5654('0x45')]));};AGIVertices[_0x5654('0x10')]['custom_app']=function(_0x1464e9){logger[_0x5654('0x2b')](util['format'](_0x5654('0xab'),_0x1464e9['label']));var _0x31e01b=this['channel'][_0x5654('0xac')](_0x1464e9[_0x5654('0xad')],_0x1464e9[_0x5654('0x74')]);if(_0x31e01b[_0x5654('0x9a')]===-0x1){return _0x31e01b;}return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xae'),_0x1464e9[_0x5654('0xad')],_0x1464e9[_0x5654('0x74')]));};AGIVertices[_0x5654('0x10')][_0x5654('0xaf')]=function(_0x47494b){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0xb0'),_0x47494b[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x47494b[_0x5654('0x56')])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xb1'));}var _0x2e6fc4='\x22'+_0x47494b['text']+'\x22';if(this['isConfigured'](_0x47494b[_0x5654('0x74')])){_0x2e6fc4+=','+_0x47494b[_0x5654('0x74')];}var _0x441ebf=this[_0x5654('0xe')][_0x5654('0xac')](_0x5654('0xb2'),_0x2e6fc4);if(_0x441ebf[_0x5654('0x9a')]===-0x1){return _0x441ebf;}return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xb3'),_0x2e6fc4));};AGIVertices[_0x5654('0x10')][_0x5654('0xb4')]=function(_0x32e8be){logger['info'](util[_0x5654('0x51')](_0x5654('0xb5'),_0x32e8be[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x32e8be[_0x5654('0x56')])){return this[_0x5654('0xe')][_0x5654('0xa9')]('no\x20text\x20configured');}var _0x115356='\x22'+_0x32e8be[_0x5654('0x56')]+'\x22';if(this['isConfigured'](_0x32e8be[_0x5654('0x74')])){_0x115356+=','+_0x32e8be[_0x5654('0x74')];}var _0x560d30=this[_0x5654('0xe')][_0x5654('0xac')]('MRCPSynth',_0x115356);if(_0x560d30['result']===-0x1){return _0x560d30;}return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xb3'),_0x115356));};AGIVertices['prototype'][_0x5654('0xb6')]=function(_0x712d54){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block',_0x712d54[_0x5654('0x9e')]));if(!this['isConfigured'](_0x712d54[_0x5654('0xb7')])){return this[_0x5654('0xe')]['noop'](_0x5654('0xb8'));}var _0x235709=_0x712d54[_0x5654('0xb7')];if(this[_0x5654('0x7d')](_0x712d54[_0x5654('0x74')])){_0x235709+=','+_0x712d54['options'];}var _0x1b8de7=this[_0x5654('0xe')][_0x5654('0xac')]('MRCPRecog',_0x235709);if(_0x1b8de7['result']===-0x1){return _0x1b8de7;}var _0x23e371=this[_0x5654('0x99')]('RECOG_CONFIDENCE()',_0x5654('0xb9'));if(_0x23e371[_0x5654('0x9a')]===-0x1){return _0x23e371;}var _0x1a7ec7=this[_0x5654('0x99')](_0x5654('0xba'),_0x5654('0xbb'));if(_0x1a7ec7[_0x5654('0x9a')]===-0x1){return _0x1a7ec7;}var _0x3ebc9d=this[_0x5654('0x99')]('RECOG_INSTANCE()',_0x5654('0xbc'));if(_0x3ebc9d[_0x5654('0x9a')]===-0x1){return _0x3ebc9d;}return this['channel'][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xbd'),_0x235709));};AGIVertices[_0x5654('0x10')][_0x5654('0xbe')]=function(_0x519c5f){logger['info'](util[_0x5654('0x51')]('Enter\x20in\x20SESTEKASR\x20(%s)\x20block',_0x519c5f['label']));if(!this[_0x5654('0x7d')](_0x519c5f[_0x5654('0xb7')])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xb8'));}var _0x301348=_0x519c5f[_0x5654('0xb7')];if(this[_0x5654('0x7d')](_0x519c5f[_0x5654('0x74')])){_0x301348+=','+_0x519c5f[_0x5654('0x74')];}var _0x2f1a98=this['channel']['exec']('MRCPRecog',_0x301348);if(_0x2f1a98[_0x5654('0x9a')]===-0x1){return _0x2f1a98;}var _0x2612ac=this[_0x5654('0x99')](_0x5654('0xbf'),'SESTEK_ASR_CONFIDENCE');if(_0x2612ac[_0x5654('0x9a')]===-0x1){return _0x2612ac;}var _0x2f6448=this[_0x5654('0x99')]('RECOG_INPUT()',_0x5654('0xc0'));if(_0x2f6448[_0x5654('0x9a')]===-0x1){return _0x2f6448;}var _0x8acec1=this['getAndSetVariable'](_0x5654('0xc1'),_0x5654('0xc2'));if(_0x8acec1[_0x5654('0x9a')]===-0x1){return _0x8acec1;}return this[_0x5654('0xe')]['noop'](util['format'](_0x5654('0xbd'),_0x301348));};AGIVertices[_0x5654('0x10')][_0x5654('0xc3')]=function(_0x5a47fe){logger[_0x5654('0x2b')](util['format'](_0x5654('0xc4'),_0x5a47fe[_0x5654('0x9e')]));if(!this['isConfigured'](_0x5a47fe[_0x5654('0xc5')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x5a47fe,_0x5654('0xc6'));}var _0x2313d9=this[_0x5654('0xc7')][_0x5654('0x6d')](this,_0x5a47fe['odbc_id']);if(!_0x2313d9){return this[_0x5654('0xe')]['error'](_0x5a47fe,_0x5654('0xc8'));}if(!this[_0x5654('0x7d')](_0x5a47fe[_0x5654('0xc9')])){return this[_0x5654('0xe')]['error'](_0x5a47fe,_0x5654('0xca'));}var _0x3a83dc=_0x5a47fe['query']['replace'](/(\r\n|\n|\r)/gm,'\x20');this['channel'][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xcb'),_0x3a83dc));var _0x48375b=this[_0x5654('0x27')][_0x5654('0x6d')](this,_0x2313d9,_0x3a83dc);this['createSquareDetailsReport'][_0x5654('0x6d')](this,_0x5a47fe,_0x3a83dc);if(!this[_0x5654('0x7d')](_0x5a47fe[_0x5654('0xcc')])){return this['channel'][_0x5654('0xa9')](_0x5654('0xcd'));}var _0xf9f444=this[_0x5654('0x11')][_0x5654('0x6d')](this,_0x5a47fe['variable_id']);if(!_0xf9f444){return this['channel']['error'](_0x5a47fe,_0x5654('0xce'));}var _0x1e2a9a=this;_0x48375b[_0x5654('0xcf')](function(_0x5bda88,_0x465085){Object['keys'](_0x5bda88)[_0x5654('0xcf')](function(_0x3b4aa9){_0x1e2a9a[_0x5654('0xe')]['setVariable'](util['format'](_0x5654('0xd0'),_0xf9f444,_0x465085,_0x3b4aa9),_0x5bda88[_0x3b4aa9]);});});this[_0x5654('0xe')][_0x5654('0x95')](util[_0x5654('0x51')](_0x5654('0xd1'),_0xf9f444),_0x48375b[_0x5654('0x93')]);return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xd2'),_0xf9f444));};AGIVertices[_0x5654('0x10')]['dial']=function(_0x384f49){logger[_0x5654('0xd3')](util['format']('Enter\x20in\x20DIAL\x20(%s)\x20block',_0x384f49[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x384f49[_0x5654('0xd4')])){return this['channel'][_0x5654('0x29')](_0x384f49,'no\x20user\x20selected');}var _0x1ebe58=this[_0x5654('0x1a')][_0x5654('0x6d')](this,_0x384f49['sip_id']);if(!_0x1ebe58){return this[_0x5654('0xe')][_0x5654('0x29')](_0x384f49,'no\x20user\x20found');}var _0x407d74=this[_0x5654('0xe')]['exec'](_0x5654('0xd5'),[util['format']('SIP/%s',_0x1ebe58),_0x384f49[_0x5654('0x62')],_0x384f49[_0x5654('0xd6')],_0x384f49[_0x5654('0x60')]]);if(_0x407d74['result']===-0x1){return _0x407d74;}return this[_0x5654('0xe')]['noop'](util[_0x5654('0x51')](_0x5654('0xd7'),_0x5654('0xd5')));};AGIVertices['prototype'][_0x5654('0xd8')]=function(_0x4348d2){logger[_0x5654('0x2b')](util['format'](_0x5654('0xd9'),_0x4348d2[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x4348d2[_0x5654('0x78')])){return this[_0x5654('0xe')]['noop'](_0x5654('0xda'));}if(!this[_0x5654('0x7d')](_0x4348d2['text'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xb1'));}this['channel'][_0x5654('0xdb')]=!![];this[_0x5654('0x32')](_0x4348d2);this[_0x5654('0x3d')](_0x4348d2[_0x5654('0x56')],'in');this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xdc'),_0x4348d2['text']));var _0x14cd46=this['googleDialogflow']['sync'](this,_0x4348d2);if(_0x14cd46){for(var _0x259d2e in _0x14cd46){if(_0x14cd46[_0x5654('0x8c')](_0x259d2e)){this['channel']['setVariable'](util[_0x5654('0x51')](_0x5654('0xdd'),_0x259d2e[_0x5654('0xde')]()),_0x14cd46[_0x259d2e]);}}this['createSquareMessage'](_0x14cd46[_0x5654('0xdf')],_0x5654('0xe0'));return this[_0x5654('0xe')][_0x5654('0xa9')](util['format'](_0x5654('0xe1'),_0x14cd46[_0x5654('0xdf')]));}return this[_0x5654('0xe')][_0x5654('0x29')](_0x4348d2,'Dialogflow\x20is\x20unreachable');};AGIVertices[_0x5654('0x10')][_0x5654('0xe2')]=function(_0x2cc7af){logger['info'](util[_0x5654('0x51')](_0x5654('0xe3'),_0x2cc7af[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x2cc7af[_0x5654('0xe4')])){return this['channel'][_0x5654('0xa9')](_0x5654('0xe5'));}if(!this[_0x5654('0x7d')](_0x2cc7af[_0x5654('0xe6')])){return this['channel']['noop'](_0x5654('0xe7'));}if(!this[_0x5654('0x7d')](_0x2cc7af[_0x5654('0xe8')])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xe9'));}if(!this[_0x5654('0x7d')](_0x2cc7af['ndassistant_url'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xb1'));}this[_0x5654('0xe')][_0x5654('0xdb')]=!![];this[_0x5654('0x32')](_0x2cc7af);this[_0x5654('0x3d')](_0x2cc7af['text'],'in');this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xea'),_0x2cc7af[_0x5654('0x56')]));var _0x19732f=this['sestekNDA'][_0x5654('0x6d')](this,_0x2cc7af);if(_0x19732f){for(var _0x3482fd in _0x19732f){if(_0x19732f[_0x5654('0x8c')](_0x3482fd)){this['channel'][_0x5654('0x95')](util[_0x5654('0x51')](_0x5654('0xeb'),_0x3482fd[_0x5654('0xde')]()),_0x19732f[_0x3482fd]);}}this[_0x5654('0x3d')](_0x19732f[_0x5654('0xdf')],_0x5654('0xe0'));if(_0x19732f['audiofile']){this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')]('Sestek\x20NDA\x20%s\x20file\x20created',_0x19732f[_0x5654('0xec')]));var _0x182862=this[_0x5654('0xe')][_0x5654('0xed')](_0x19732f['audiofile']);try{fs[_0x5654('0xee')](_0x19732f['audiofile']+'.wav');}catch(_0x3b9db3){logger[_0x5654('0x29')](_0x3b9db3);}return _0x182862;}else{return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xef'),_0x19732f[_0x5654('0xdf')]));}}return this[_0x5654('0xe')][_0x5654('0x29')](_0x2cc7af,_0x5654('0xf0'));};AGIVertices['prototype'][_0x5654('0xf1')]=function(_0x1f8175){logger[_0x5654('0x2b')](util['format'](_0x5654('0xf2'),_0x1f8175['label']));return this['channel'][_0x5654('0xa9')](_0x5654('0xf1'));};AGIVertices[_0x5654('0x10')][_0x5654('0xf3')]=function(_0x5e6472){logger['info'](util['format']('Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block',_0x5e6472['label']));var _0x549fa2='';if(_0x5e6472[_0x5654('0xf4')]){if(!this[_0x5654('0x7d')](_0x5e6472[_0x5654('0xf4')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x5e6472,_0x5654('0xf5'));}else{var _0x458490=parseInt(_0x5e6472[_0x5654('0xf4')],0xa);if(isNaN(_0x458490)){_0x549fa2=_0x5e6472[_0x5654('0xf4')];}else{_0x549fa2=this[_0x5654('0xf6')]['sync'](this,_0x5e6472[_0x5654('0xf4')]);if(!_0x549fa2){return this['channel'][_0x5654('0x29')](_0x5e6472,_0x5654('0xf7'));}}}}else if(_0x5e6472['trunk_name']){_0x549fa2=_0x5e6472[_0x5654('0xf8')];}else{return this[_0x5654('0xe')]['error'](_0x5e6472,_0x5654('0xf5'));}var _0x4a381a=this[_0x5654('0xe')][_0x5654('0xac')](_0x5654('0xd5'),[util[_0x5654('0x51')](_0x5654('0xf9'),_0x549fa2,_0x5e6472[_0x5654('0x43')]),_0x5e6472[_0x5654('0x62')],_0x5e6472[_0x5654('0xd6')],_0x5e6472[_0x5654('0x60')]]);if(_0x4a381a[_0x5654('0x9a')]===-0x1){return _0x4a381a;}return this['channel'][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xd7'),_0x5654('0xd5')));};AGIVertices[_0x5654('0x10')]['finally']=function(_0x112d85){logger[_0x5654('0x2b')](util['format'](_0x5654('0xfa'),_0x112d85['label']));return this[_0x5654('0xe')][_0x5654('0xa9')]('finally');};AGIVertices['prototype'][_0x5654('0xc')]=function(_0x352f70){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20GETDIGITS\x20(%s)\x20block',_0x352f70[_0x5654('0x9e')]));if(_0x352f70[_0x5654('0x9c')]===0x0){return this['maxRetry'](_0x352f70);}_0x352f70['retry']-=0x1;if(!this[_0x5654('0x7d')](_0x352f70['file_id'])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x352f70,'no\x20file\x20audio\x20selected');}var _0x19e179=this['getSound']['sync'](this,_0x352f70[_0x5654('0xfb')]);if(!_0x19e179){return this[_0x5654('0xe')][_0x5654('0x29')](_0x352f70,_0x5654('0xfc'));}if(!this['isConfigured'](_0x352f70[_0x5654('0xcc')])){return this['channel']['error'](_0x5654('0xcd'));}var _0x268ab8=this[_0x5654('0xe')]['getData'](_0x19e179,_0x352f70['response'],_0x352f70[_0x5654('0xfd')]);var _0xcf87dc=_0x268ab8[_0x5654('0x9a')]?_0x268ab8[_0x5654('0x9a')]['toString']():'';logger[_0x5654('0x2b')](_0x5654('0xfe'),JSON[_0x5654('0x70')](_0x268ab8));if(_0x268ab8[_0x5654('0x9a')]===-0x1){this[_0x5654('0x32')]['sync'](this,_0x352f70,_0xcf87dc);return _0x268ab8;}else if(_0x268ab8[_0x5654('0x98')]==='timeout'){_0x268ab8[_0x5654('0x9a')]=_0xcf87dc[_0x5654('0x93')]>=parseInt(_0x352f70[_0x5654('0xff')])?'x':'i';}else{_0x268ab8[_0x5654('0x9a')]=_0xcf87dc['length']>=parseInt(_0x352f70[_0x5654('0xff')])&&_0xcf87dc['length']<=parseInt(_0x352f70[_0x5654('0xfd')])?'x':'i';}var _0x57233c=this[_0x5654('0x11')][_0x5654('0x6d')](this,_0x352f70[_0x5654('0xcc')]);if(!_0x57233c){return this[_0x5654('0xe')][_0x5654('0x29')](_0x352f70,_0x5654('0xce'));}this[_0x5654('0xe')][_0x5654('0x95')](_0x57233c,_0xcf87dc);if(this[_0x5654('0x7d')](_0x352f70[_0x5654('0x100')])){var _0x19f005=parseInt(_0x352f70[_0x5654('0x100')],0xa);var _0x4d4297=rs[_0x5654('0x101')]({'charset':'*','length':_0x19f005});var _0x135e46=_0xcf87dc['length'];if(_0x135e46>0x0){if(_0x135e46>_0x19f005){this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x352f70,_0x352f70[_0x5654('0x102')]===_0x5654('0x103')?_0x4d4297+_0xcf87dc['substr'](_0x19f005):_0xcf87dc[_0x5654('0x104')](0x0,_0x135e46-_0x19f005)+_0x4d4297);}else{this['createSquareDetailsReport'][_0x5654('0x6d')](this,_0x352f70,rs['generate']({'charset':'*','length':_0x135e46}));}}else{this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x352f70,'');}}else{this['createSquareDetailsReport'][_0x5654('0x6d')](this,_0x352f70,_0xcf87dc);}return _0x268ab8;};AGIVertices[_0x5654('0x10')][_0x5654('0xd')]=function(_0x3d4a97){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block',_0x3d4a97[_0x5654('0x9e')]));return this[_0x5654('0xc')](_0x3d4a97);};AGIVertices[_0x5654('0x10')][_0x5654('0x105')]=function(_0x4b4830){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x106'),_0x4b4830['label']));this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x4b4830,_0x4b4830['goalname']);return this['channel'][_0x5654('0xa9')](util['format'](_0x5654('0x107'),_0x4b4830[_0x5654('0x108')]));};AGIVertices[_0x5654('0x10')]['awspolly']=function(_0x139702){logger[_0x5654('0x2b')](util['format'](_0x5654('0x109'),_0x139702['label']));if(!this[_0x5654('0x7d')](_0x139702['aws_access_key_id'])||!this[_0x5654('0x7d')](_0x139702['aws_secret_access_key'])){return this[_0x5654('0xe')][_0x5654('0xa9')]('no\x20valid\x20credentials\x20configured');}if(!this[_0x5654('0x7d')](_0x139702['text'])){return this[_0x5654('0xe')]['noop']('no\x20text\x20configured');}this[_0x5654('0xe')][_0x5654('0xa9')](util['format'](_0x5654('0x10a'),_0x139702[_0x5654('0x56')]));var _0x54a9cd=this[_0x5654('0x7f')][_0x5654('0x6d')](this,_0x139702);if(_0x54a9cd){this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x10b'),_0x54a9cd));var _0x4beb2b=this[_0x5654('0xe')][_0x5654('0xed')](_0x54a9cd);try{fs[_0x5654('0xee')](_0x54a9cd+_0x5654('0x10c'));}catch(_0x6ebef8){logger[_0x5654('0x29')](_0x6ebef8);}return _0x4beb2b;}return this[_0x5654('0xe')]['error'](_0x139702,_0x5654('0x10d'));};AGIVertices[_0x5654('0x10')][_0x5654('0x10e')]=function(_0x11daa6){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x10f'),_0x11daa6['label']));if(!this[_0x5654('0x7d')](_0x11daa6[_0x5654('0x80')])||!this[_0x5654('0x7d')](_0x11daa6[_0x5654('0x85')])){return this['channel'][_0x5654('0xa9')](_0x5654('0x110'));}if(!this[_0x5654('0x7d')](_0x11daa6['aws_bot_name'])){return this[_0x5654('0xe')]['noop'](_0x5654('0x111'));}if(!this[_0x5654('0x7d')](_0x11daa6['text'])){return this['channel'][_0x5654('0xa9')](_0x5654('0xb1'));}this[_0x5654('0xe')][_0x5654('0xdb')]=!![];this[_0x5654('0x32')](_0x11daa6);this[_0x5654('0x3d')](_0x11daa6[_0x5654('0x56')],'in');this['channel']['noop'](util[_0x5654('0x51')]('Trying\x20Amazon\x20Lex:\x20%s',_0x11daa6[_0x5654('0x56')]));var _0x34931a=this[_0x5654('0x84')][_0x5654('0x6d')](this,_0x11daa6);if(_0x34931a){for(var _0x32bb4c in _0x34931a){if(_0x34931a['hasOwnProperty'](_0x32bb4c)&&_['isString'](_0x34931a[_0x32bb4c])){this[_0x5654('0xe')][_0x5654('0x95')](util[_0x5654('0x51')]('AWS_LEX_%s',_0x32bb4c[_0x5654('0xde')]()),_0x34931a[_0x32bb4c]);}}if(_['isNil'](_0x34931a[_0x5654('0x73')])){return this['channel'][_0x5654('0xa9')](_0x5654('0x112'));}else{this[_0x5654('0x3d')](_0x34931a[_0x5654('0x73')],_0x5654('0xe0'));return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x113'),_0x34931a[_0x5654('0x73')]));}}return this[_0x5654('0xe')][_0x5654('0x29')](_0x11daa6,_0x5654('0x114'));};AGIVertices[_0x5654('0x10')][_0x5654('0x115')]=function(_0x4111bc){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x116'),_0x4111bc[_0x5654('0x9e')],_0x4111bc['timeout']));if(!this[_0x5654('0x7d')](_0x4111bc[_0x5654('0x78')])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xda'));}var _0x58cdc0=_0x5654('0x117');var _0x35809f=util[_0x5654('0x51')]('%s/recordings/%s',FILES_PATH,rs['generate'](0x4));var _0x5ab830=util['format'](_0x5654('0x94'),_0x35809f,_0x58cdc0);var _0x46f2ca=!![];if(_0x4111bc[_0x5654('0x118')]==='NOBEEP'){_0x46f2ca=![];}var _0x4151fe=this[_0x5654('0xe')]['recordFile'](_0x35809f,_0x58cdc0,_0x4111bc[_0x5654('0x119')],_0x4111bc[_0x5654('0x62')],undefined,_0x46f2ca);if(_0x4151fe[_0x5654('0x9a')]!==-0x1){this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')]('google\x20%s\x20file\x20created',_0x5ab830));var _0x5b1a38=this[_0x5654('0x87')][_0x5654('0x6d')](this,_0x4111bc,_0x5ab830);if(_0x5b1a38){for(var _0x56a581 in _0x5b1a38){if(_0x5b1a38[_0x5654('0x8c')](_0x56a581)){this[_0x5654('0xe')][_0x5654('0x95')](util[_0x5654('0x51')](_0x5654('0x11a'),_0x56a581['toUpperCase']()),_0x5b1a38[_0x56a581]);}}return this['channel']['noop'](util[_0x5654('0x51')]('GoogleASR\x20Result\x20%s',JSON[_0x5654('0x70')](_0x5b1a38)));}}return _0x4151fe;};AGIVertices[_0x5654('0x10')]['tildeasr']=function(_0xb6725c){logger[_0x5654('0x2b')](util['format'](_0x5654('0x11b'),_0xb6725c[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0xb6725c[_0x5654('0x11c')])){return this['channel'][_0x5654('0xa9')](_0x5654('0x11d'));}if(!this[_0x5654('0x7d')](_0xb6725c['appsecret'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0x11e'));}var _0x255da1='wav';var _0xa05577=util[_0x5654('0x51')](_0x5654('0x11f'),FILES_PATH,rs[_0x5654('0x101')](0x4));var _0x3f291f=util[_0x5654('0x51')](_0x5654('0x94'),_0xa05577,_0x255da1);var _0x2e289e=!![];if(_0xb6725c[_0x5654('0x118')]===_0x5654('0x120')){_0x2e289e=![];}var _0x139425=this[_0x5654('0xe')][_0x5654('0x121')](_0xa05577,_0x255da1,_0xb6725c['intKey'],_0xb6725c[_0x5654('0x62')],undefined,_0x2e289e);if(_0x139425[_0x5654('0x9a')]!==-0x1){this['channel']['noop'](util['format'](_0x5654('0x122'),_0x3f291f));var _0xbaf0a1=this[_0x5654('0x89')][_0x5654('0x6d')](this,_0xb6725c,_0x3f291f);if(_0xbaf0a1){for(var _0x4880d8 in _0xbaf0a1){if(_0xbaf0a1[_0x5654('0x8c')](_0x4880d8)){this['channel'][_0x5654('0x95')](util['format'](_0x5654('0x123'),_0x4880d8[_0x5654('0xde')]()),_0xbaf0a1[_0x4880d8]);}}return this['channel'][_0x5654('0xa9')](util['format'](_0x5654('0x124'),JSON[_0x5654('0x70')](_0xbaf0a1)));}}return _0x139425;};AGIVertices[_0x5654('0x10')][_0x5654('0x125')]=function(_0x279d58){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x279d58[_0x5654('0x9e')]));return this['channel']['continueAt'](_0x279d58[_0x5654('0x38')],_0x279d58[_0x5654('0x126')],_0x279d58['priority']);};AGIVertices[_0x5654('0x10')]['gotoif']=function(_0xd78e23){logger['info'](util['format'](_0x5654('0x127'),_0xd78e23[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0xd78e23['condition'])){return this[_0x5654('0xe')]['error'](_0xd78e23,'no\x20condition\x20configured');}try{var _0x56fb98=eval(_0xd78e23[_0x5654('0x128')])?'true':_0x5654('0x129');this['channel'][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x12a'),_0xd78e23[_0x5654('0x128')],_0x56fb98));return{'code':0xc8,'result':_0x56fb98};}catch(_0x1e5ca0){return{'code':0xc8,'result':_0x5654('0x129')};}};AGIVertices[_0x5654('0x10')][_0x5654('0x12b')]=function(_0x59f0b9){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x12c'),_0x59f0b9[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x59f0b9['interval_id'])){return this[_0x5654('0xe')]['error'](_0x59f0b9,_0x5654('0x12d'));}var _0x45a774=this[_0x5654('0x21')]['sync'](this,_0x59f0b9[_0x5654('0x12e')]);if(!_0x45a774){return this['channel'][_0x5654('0x29')](_0x59f0b9,_0x5654('0x12f'));}for(var _0x2cba73=0x0;_0x2cba73<_0x45a774[_0x5654('0x93')];_0x2cba73+=0x1){var _0x1bcc4e=this[_0x5654('0xe')]['getVariable'](util[_0x5654('0x51')](_0x5654('0x130'),_0x45a774[_0x2cba73]));if(_0x1bcc4e[_0x5654('0x9a')]===-0x1){return _0x1bcc4e;}logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x131'),_0x45a774[_0x2cba73],_0x1bcc4e[_0x5654('0x98')]));if(_0x1bcc4e[_0x5654('0x98')]===_0x5654('0x132')){logger[_0x5654('0x2b')](util['format'](_0x5654('0x131'),_0x45a774[_0x2cba73],_0x5654('0x132')));this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x131'),_0x45a774[_0x2cba73],_0x5654('0x132')));return{'code':0xc8,'result':_0x5654('0x132')};}else{logger['info'](util[_0x5654('0x51')]('IFTIME\x20%s\x20%s',_0x45a774[_0x2cba73],'false'));this[_0x5654('0xe')]['noop'](util[_0x5654('0x51')](_0x5654('0x131'),_0x45a774[_0x2cba73],_0x5654('0x129')));}}return{'code':0xc8,'result':_0x5654('0x129')};};AGIVertices[_0x5654('0x10')][_0x5654('0x133')]=function(_0x116cd7){logger['info'](util[_0x5654('0x51')](_0x5654('0x134'),_0x116cd7[_0x5654('0x9e')]));return this[_0x5654('0xe')][_0x5654('0x133')]();};AGIVertices['prototype'][_0x5654('0x135')]=function(_0x4e4a00){logger[_0x5654('0x2b')](util['format']('Enter\x20in\x20ISPEECHASR\x20(%s)\x20block',_0x4e4a00['label']));if(!this[_0x5654('0x7d')](_0x4e4a00[_0x5654('0x78')])){return this['channel'][_0x5654('0xa9')](_0x5654('0xda'));}var _0x4f2538='wav';var _0x57826c=util[_0x5654('0x51')](_0x5654('0x11f'),FILES_PATH,rs[_0x5654('0x101')](0x4));var _0x2bc3d4=util[_0x5654('0x51')](_0x5654('0x94'),_0x57826c,_0x4f2538);var _0x7b2b34=!![];if(_0x4e4a00[_0x5654('0x118')]==='NOBEEP'){_0x7b2b34=![];}var _0x41aeb7=this[_0x5654('0xe')]['recordFile'](_0x57826c,_0x4f2538,_0x4e4a00[_0x5654('0x119')],_0x4e4a00['timeout'],undefined,_0x7b2b34);if(_0x41aeb7[_0x5654('0x9a')]!==-0x1){this[_0x5654('0xe')]['noop'](util['format'](_0x5654('0x136'),_0x2bc3d4));var _0x167fc4=this[_0x5654('0x7b')][_0x5654('0x6d')](this,_0x4e4a00,_0x2bc3d4);if(_0x167fc4){for(var _0x2b2876 in _0x167fc4){if(_0x167fc4[_0x5654('0x8c')](_0x2b2876)){this[_0x5654('0xe')][_0x5654('0x95')](util[_0x5654('0x51')](_0x5654('0x137'),_0x2b2876[_0x5654('0xde')]()),_0x167fc4[_0x2b2876]);}}return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x138'),JSON[_0x5654('0x70')](_0x167fc4)));}}return _0x41aeb7;};AGIVertices[_0x5654('0x10')][_0x5654('0x139')]=function(_0x332ecb){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block',_0x332ecb[_0x5654('0x9e')]));if(!this['isConfigured'](_0x332ecb['key'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xda'));}if(!this[_0x5654('0x7d')](_0x332ecb['text'])){return this['channel'][_0x5654('0xa9')](_0x5654('0xb1'));}this[_0x5654('0xe')][_0x5654('0xa9')](util['format'](_0x5654('0x13a'),_0x332ecb[_0x5654('0x56')]));var _0x4f8d79=this['ispeechTTS'][_0x5654('0x6d')](this,_0x332ecb);if(_0x4f8d79){this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x136'),_0x4f8d79));var _0x205069=this['channel'][_0x5654('0xed')](_0x4f8d79,_0x332ecb[_0x5654('0x119')]);try{fs[_0x5654('0xee')](_0x4f8d79+_0x5654('0x10c'));}catch(_0x3b9306){logger['error'](_0x3b9306);}return _0x205069;}return this[_0x5654('0xe')][_0x5654('0x29')](_0x332ecb,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices[_0x5654('0x10')][_0x5654('0x13b')]=function(_0x4f6e65){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x13c'),_0x4f6e65[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x4f6e65['findBy'])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x4f6e65,_0x5654('0x13d'));}logger[_0x5654('0x2b')](util[_0x5654('0x51')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x5654('0xe')]['callerid'],_0x4f6e65[_0x5654('0x13e')]));var _0x3f0200=this['agentLogin'][_0x5654('0x6d')](this,_0x4f6e65[_0x5654('0x13e')]);if(_0x3f0200){logger[_0x5654('0x2b')](util['format'](_0x5654('0x13f'),this[_0x5654('0xe')][_0x5654('0x35')],_0x4f6e65[_0x5654('0x13e')]));this[_0x5654('0xe')]['noop'](util[_0x5654('0x51')](_0x5654('0x13f'),this[_0x5654('0xe')][_0x5654('0x35')],_0x4f6e65[_0x5654('0x13e')]));return{'code':0xc8,'result':_0x5654('0x140')};}else{logger[_0x5654('0x2b')](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x5654('0xe')][_0x5654('0x35')],_0x4f6e65[_0x5654('0x13e')]));this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x5654('0xe')][_0x5654('0x35')],_0x4f6e65[_0x5654('0x13e')]));return{'code':0xc8,'result':_0x5654('0x141')};}};AGIVertices[_0x5654('0x10')]['logout']=function(_0x4919f5){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x142'),_0x4919f5['label']));if(!this['isConfigured'](_0x4919f5[_0x5654('0x13e')])){return this['channel'][_0x5654('0x29')](_0x4919f5,_0x5654('0x13d'));}logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x143'),this['channel'][_0x5654('0x35')],_0x4919f5['findBy']));var _0x134023=this['agentLogout'][_0x5654('0x6d')](this,_0x4919f5[_0x5654('0x13e')]);if(_0x134023){logger[_0x5654('0x2b')](util['format'](_0x5654('0x13f'),this['channel'][_0x5654('0x35')],_0x4919f5[_0x5654('0x13e')]));this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x13f'),this[_0x5654('0xe')][_0x5654('0x35')],_0x4919f5[_0x5654('0x13e')]));return{'code':0xc8,'result':'success'};}else{logger['info'](util[_0x5654('0x51')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x5654('0x35')],_0x4919f5['findBy']));this[_0x5654('0xe')]['noop'](util[_0x5654('0x51')](_0x5654('0x144'),this['channel'][_0x5654('0x35')],_0x4919f5[_0x5654('0x13e')]));return{'code':0xc8,'result':_0x5654('0x141')};}};AGIVertices[_0x5654('0x10')]['math']=function(_0x370687){logger['info'](util[_0x5654('0x51')](_0x5654('0x145'),_0x370687['label']));if(!this[_0x5654('0x7d')](_0x370687[_0x5654('0x146')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x370687,'no\x20operation\x20configured');}this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')]('math\x20%s',_0x370687[_0x5654('0x146')]));var _0xb768fa=eval(_0x370687[_0x5654('0x146')]);if(!this['isConfigured'](_0x370687[_0x5654('0xcc')])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xcd'));}var _0xa59f0f=this[_0x5654('0x11')][_0x5654('0x6d')](this,_0x370687[_0x5654('0xcc')]);if(!_0xa59f0f){return this[_0x5654('0xe')][_0x5654('0x29')](_0x370687,_0x5654('0xce'));}if(_[_0x5654('0x92')](_0xb768fa)){var _0xf88841=this;_0xb768fa['forEach'](function(_0x55776e,_0x3c9177){_0xf88841[_0x5654('0xe')][_0x5654('0x95')](util['format'](_0x5654('0x147'),_0xa59f0f,_0x3c9177),_0x55776e);});return this[_0x5654('0xe')]['noop'](util[_0x5654('0x51')]('variable\x20%s[key]\x20set',_0xa59f0f));}else{return this[_0x5654('0xe')]['setVariable'](_0xa59f0f,_0xb768fa);}};AGIVertices['prototype'][_0x5654('0x148')]=function(_0x369a05){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x149'),_0x369a05[_0x5654('0x9e')]));if(_0x369a05[_0x5654('0x9c')]===0x0){return this[_0x5654('0x9d')](_0x369a05);}_0x369a05[_0x5654('0x9c')]-=0x1;if(!this[_0x5654('0x7d')](_0x369a05[_0x5654('0xfb')])){return this['channel'][_0x5654('0x29')](_0x369a05,_0x5654('0x14a'));}var _0x4a774f=this[_0x5654('0x1c')][_0x5654('0x6d')](this,_0x369a05[_0x5654('0xfb')]);if(!_0x4a774f){return this[_0x5654('0xe')][_0x5654('0x29')](_0x369a05,_0x5654('0xfc'));}var _0x2d3524=this[_0x5654('0xe')][_0x5654('0x14b')](_0x4a774f,_0x369a05[_0x5654('0x14c')],_0x369a05[_0x5654('0x14d')]);var _0xfc5c01=_0x2d3524[_0x5654('0x9a')];if(_0x2d3524[_0x5654('0x9a')]===-0x1){this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x369a05,'-1');return _0x2d3524;}else if(_0x2d3524[_0x5654('0x98')]==='timeout'){_0x2d3524[_0x5654('0x9a')]=_0x2d3524['result'][_0x5654('0x93')]>0x0?_0x2d3524[_0x5654('0x9a')]:'t';}else if(_['isEmpty'](_0x2d3524[_0x5654('0x9a')])){_0x2d3524[_0x5654('0x9a')]='#';_0xfc5c01='#';}if(!this[_0x5654('0x7d')](_0x369a05[_0x5654('0xcc')])){this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xcd'));}else{var _0x370b5b=this['getVariable'][_0x5654('0x6d')](this,_0x369a05[_0x5654('0xcc')]);if(!_0x370b5b){return this[_0x5654('0xe')]['error'](_0x369a05,_0x5654('0xce'));}this['channel'][_0x5654('0x95')](_0x370b5b,_0xfc5c01);}this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x369a05,_0xfc5c01);return _0x2d3524;};AGIVertices[_0x5654('0x10')][_0x5654('0xa9')]=function(_0x52a95c){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x14e'),_0x52a95c[_0x5654('0x9e')]));return this[_0x5654('0xe')][_0x5654('0xa9')](_0x52a95c[_0x5654('0x14f')]||_0x52a95c[_0x5654('0x9e')]);};AGIVertices[_0x5654('0x10')][_0x5654('0x150')]=function(_0x430802){logger['info'](util[_0x5654('0x51')](_0x5654('0x151'),_0x430802['label']));if(!this[_0x5654('0x7d')](_0x430802[_0x5654('0x13e')])){return this['channel']['error'](_0x430802,_0x5654('0x13d'));}logger['info'](util[_0x5654('0x51')](_0x5654('0x143'),this[_0x5654('0xe')][_0x5654('0x35')],_0x430802['findBy']));var _0x1cae43=this[_0x5654('0x49')][_0x5654('0x6d')](this,_0x430802['pause_id']);var _0x3dc69f=this[_0x5654('0x4c')][_0x5654('0x6d')](this,_0x430802[_0x5654('0x13e')],_0x1cae43);if(_0x3dc69f){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x5654('0xe')]['callerid'],_0x430802[_0x5654('0x13e')]));this['channel'][_0x5654('0xa9')](util[_0x5654('0x51')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x5654('0xe')][_0x5654('0x35')],_0x430802[_0x5654('0x13e')]));return{'code':0xc8,'result':_0x5654('0x140')};}else{logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x144'),this[_0x5654('0xe')][_0x5654('0x35')],_0x430802['findBy']));this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x13f'),this[_0x5654('0xe')][_0x5654('0x35')],_0x430802[_0x5654('0x13e')]));return{'code':0xc8,'result':_0x5654('0x141')};}};AGIVertices[_0x5654('0x10')][_0x5654('0x152')]=function(_0x56acb2){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20PLAYBACK\x20(%s)\x20block',_0x56acb2['label']));if(!this['isConfigured'](_0x56acb2[_0x5654('0xfb')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x56acb2,_0x5654('0x14a'));}var _0x4a701f=this[_0x5654('0x1c')][_0x5654('0x6d')](this,_0x56acb2[_0x5654('0xfb')]);if(!_0x4a701f){return this[_0x5654('0xe')][_0x5654('0x29')](_0x56acb2,_0x5654('0xfc'));}var _0x6df6=this[_0x5654('0xe')]['exec']('PLAYBACK',[_0x4a701f,_0x56acb2[_0x5654('0xd6')]]);if(_0x6df6[_0x5654('0x9a')]===-0x1){return _0x6df6;}return this[_0x5654('0xe')][_0x5654('0xa9')](util['format'](_0x5654('0xae'),_0x5654('0x153'),_0x4a701f));};AGIVertices[_0x5654('0x10')][_0x5654('0x154')]=function(_0x49c417){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x155'),_0x49c417[_0x5654('0x9e')]));if(!this['isConfigured'](_0x49c417[_0x5654('0x156')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x49c417,'no\x20queue\x20selected');}var _0x89ff11='';var _0x1c3999=parseInt(_0x49c417[_0x5654('0x156')],0xa);if(isNaN(_0x1c3999)){_0x89ff11=_0x49c417[_0x5654('0x156')];}else{_0x89ff11=this[_0x5654('0x16')][_0x5654('0x6d')](this,_0x49c417['queue_id']);if(!_0x89ff11){return this[_0x5654('0xe')]['error'](_0x49c417,'no\x20queue\x20found');}}var _0x320c87='';if(this[_0x5654('0x7d')](_0x49c417['file_id'])){var _0x450892=this[_0x5654('0x1c')]['sync'](this,_0x49c417[_0x5654('0xfb')]);if(_0x450892){_0x320c87=_0x450892;}}this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x49c417,_0x89ff11);if(_0x49c417['opts']['indexOf']('x')<0x0){_0x49c417[_0x5654('0xd6')]+='x';}if(_0x49c417[_0x5654('0xd6')][_0x5654('0x157')]('X')<0x0){_0x49c417[_0x5654('0xd6')]+='X';}this['channel'][_0x5654('0x95')](_0x5654('0x158'),_0x89ff11?_0x89ff11[_0x5654('0x159')]():'');var _0x4786e5=this[_0x5654('0xe')][_0x5654('0xac')]('QUEUE',[_0x89ff11,_0x49c417[_0x5654('0xd6')],_0x49c417[_0x5654('0x60')],_0x320c87,_0x49c417['timeout'],_0x49c417[_0x5654('0x7')],_0x49c417[_0x5654('0x15a')],_0x49c417[_0x5654('0x15b')],'',_0x49c417[_0x5654('0x15c')]]);if(_0x4786e5[_0x5654('0x9a')]===-0x1){return _0x4786e5;}return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xae'),_0x5654('0x15d'),_0x89ff11));};AGIVertices[_0x5654('0x10')]['record']=function(_0x4582e6){logger[_0x5654('0x2b')](util['format'](_0x5654('0x15e'),_0x4582e6[_0x5654('0x9e')]));var _0xe363a3=_0x4582e6[_0x5654('0x15f')]||_0x5654('0x117');var _0xc07dec=util['format'](_0x5654('0x160'),this[_0x5654('0xe')][_0x5654('0x33')],rs[_0x5654('0x101')](0x5));var _0x2f42df=util[_0x5654('0x51')](_0x5654('0x161'),FILES_PATH,_0xc07dec,_0xe363a3);var _0xdf3ec0=util['format'](_0x5654('0x11f'),FILES_PATH,_0xc07dec);this[_0x5654('0x36')][_0x5654('0x6d')](this,_0x4582e6,_0xc07dec,_0x2f42df);this['channel'][_0x5654('0x95')](_0x5654('0x162'),_0xc07dec);logger[_0x5654('0x2b')](_0x5654('0x163'),_0xdf3ec0,_0xe363a3,_0x4582e6[_0x5654('0x164')],_0x4582e6[_0x5654('0x62')]);return this['channel'][_0x5654('0x121')](_0xdf3ec0,_0xe363a3,_0x4582e6[_0x5654('0x164')],_0x4582e6[_0x5654('0x62')],undefined,!![]);};AGIVertices[_0x5654('0x10')][_0x5654('0x165')]=function(_0x58e67c){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x166'),_0x58e67c[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x58e67c['url'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0x167'));}var _0x546dce=this[_0x5654('0x5f')][_0x5654('0x6d')](this,_0x58e67c);logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x168'),util['inspect'](_0x546dce,{'showHidden':![],'depth':null})));if(!this[_0x5654('0x7d')](_0x58e67c[_0x5654('0xcc')])){return this['channel'][_0x5654('0xa9')](_0x5654('0x169'));}var _0xdf44df=this[_0x5654('0x11')][_0x5654('0x6d')](this,_0x58e67c[_0x5654('0xcc')]);if(!_0xdf44df){return this[_0x5654('0xe')][_0x5654('0x29')](_0x58e67c,'no\x20variable\x20found');}this[_0x5654('0xe')][_0x5654('0x95')](util[_0x5654('0x51')](_0x5654('0x16a'),_0xdf44df),_0x546dce[_0x5654('0x71')]?_0x546dce[_0x5654('0x71')]:'200');this[_0x5654('0xe')][_0x5654('0x95')](util[_0x5654('0x51')]('%s_STATUS_MESSAGE',_0xdf44df),_0x546dce[_0x5654('0x72')]?_0x546dce['statusMessage']:'OK');if(_0x546dce[_0x5654('0x66')]){try{this[_0x5654('0x91')](_0x546dce['body'],_0xdf44df);}catch(_0x43237a){logger[_0x5654('0x29')](util[_0x5654('0x51')]('Unable\x20to\x20set\x20result\x20in\x20variable\x20%s',_0xdf44df));}}return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xd2'),_0xdf44df));};AGIVertices[_0x5654('0x10')][_0x5654('0x16b')]=function(_0x42d139){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x16c'),_0x42d139['label']));return this['channel'][_0x5654('0x16d')](_0x42d139[_0x5654('0x16e')][_0x5654('0x53')](/\s+/g,''),_0x42d139['escape_digits']);};AGIVertices[_0x5654('0x10')]['saynumber']=function(_0x3c5cfb){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x16f'),_0x3c5cfb[_0x5654('0x9e')]));return this[_0x5654('0xe')][_0x5654('0x170')](_0x3c5cfb[_0x5654('0x171')]['replace'](/\s+/g,''),_0x3c5cfb['escape_digits']);};AGIVertices['prototype'][_0x5654('0x172')]=function(_0x5f233b){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x173'),_0x5f233b[_0x5654('0x9e')]));return this[_0x5654('0xe')]['sayPhonetic'](_0x5f233b['text'],_0x5f233b['escape_digits']);};AGIVertices[_0x5654('0x10')][_0x5654('0x174')]=function(_0x374633){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x175'),_0x374633[_0x5654('0x9e')]));if(!this['isConfigured'](_0x374633['account_id'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0x176'));}var _0x4894ba=this[_0x5654('0x177')][_0x5654('0x6d')](this,_0x374633['account_id']);if(!_0x4894ba||!_0x4894ba[_0x5654('0x178')]){return this['channel'][_0x5654('0x29')](_0x374633,'no\x20mail\x20account\x20found');}var _0x1b603e={'from':util[_0x5654('0x51')](_0x5654('0x179'),_0x4894ba[_0x5654('0x14')],_0x4894ba[_0x5654('0x17a')]||_0x4894ba[_0x5654('0x178')][_0x5654('0x17b')]),'to':_0x374633['to']||'','cc':_0x374633['cc']||'','bcc':_0x374633[_0x5654('0x17c')]||'','subject':_0x374633[_0x5654('0x17d')],'html':_0x374633[_0x5654('0x56')],'text':_0x374633[_0x5654('0x56')]};var _0x37a6f4={'tls':{'rejectUnauthorized':![]}};if(_0x4894ba[_0x5654('0x178')]['service']){_0x37a6f4[_0x5654('0x17e')]=_0x4894ba[_0x5654('0x178')][_0x5654('0x17e')];}else{_0x37a6f4['host']=_0x4894ba['Smtp'][_0x5654('0x17f')];_0x37a6f4[_0x5654('0x180')]=_0x4894ba[_0x5654('0x178')][_0x5654('0x180')];_0x37a6f4[_0x5654('0x181')]=_0x4894ba[_0x5654('0x178')][_0x5654('0x181')];}if(_0x4894ba[_0x5654('0x178')][_0x5654('0x182')]){_0x37a6f4[_0x5654('0x183')]={'user':_0x4894ba[_0x5654('0x178')][_0x5654('0x17b')],'pass':_0x4894ba[_0x5654('0x178')]['pass']};}if(this['isConfigured'](_0x374633['template_id'])){}logger['debug'](_0x5654('0x184'),JSON['stringify'](_0x1b603e));this[_0x5654('0x32')]['sync'](this,_0x374633,_0x374633[_0x5654('0x185')]);this['channel'][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x186'),_0x4894ba[_0x5654('0x14')]));this[_0x5654('0x20')]['sync'](this,_0x37a6f4,_0x1b603e);return this['channel'][_0x5654('0xa9')](_0x5654('0x187'));};AGIVertices['prototype']['sendFax']=function(_0x145a6d){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x188'),_0x145a6d['label']));return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0x189'));};AGIVertices['prototype']['sendSMS']=function(_0x125d11){logger[_0x5654('0x2b')](util['format'](_0x5654('0x18a'),_0x125d11[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x125d11['sms_account_id'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0x18b'));}var _0x292676=this[_0x5654('0x2f')]['sync'](this,_0x125d11[_0x5654('0x18c')]);if(!_0x292676){return this[_0x5654('0xe')]['error'](_0x125d11,_0x5654('0x18d'));}var _0x5ac3a2={'body':_0x125d11[_0x5654('0x18e')],'phone':_0x125d11['to']||'','SmsAccountId':_0x292676['id']};logger[_0x5654('0xd3')](_0x5654('0x18f'),JSON[_0x5654('0x70')](_0x5ac3a2));this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x125d11,_0x125d11[_0x5654('0x18c')]);this['channel'][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x190'),_0x292676[_0x5654('0x14')]));this[_0x5654('0x31')]['sync'](this,_0x5ac3a2);return this[_0x5654('0xe')]['noop'](_0x5654('0x191'));};AGIVertices[_0x5654('0x10')][_0x5654('0x192')]=function(_0x41bb35){logger[_0x5654('0x2b')](util['format'](_0x5654('0x193'),_0x41bb35['label']));if(!this[_0x5654('0x7d')](_0x41bb35[_0x5654('0xcc')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x41bb35,_0x5654('0x194'));}var _0x1b4d86=this[_0x5654('0x11')][_0x5654('0x6d')](this,_0x41bb35[_0x5654('0xcc')]);if(!_0x1b4d86){return this['channel'][_0x5654('0x29')](_0x41bb35,_0x5654('0xce'));}return this[_0x5654('0xe')][_0x5654('0x95')](_0x1b4d86,_0x41bb35[_0x5654('0x195')]);};AGIVertices[_0x5654('0x10')][_0x5654('0x196')]=function(_0x8cd8a0){logger['info'](util[_0x5654('0x51')](_0x5654('0x197'),_0x8cd8a0[_0x5654('0x9e')]));this[_0x5654('0xe')][_0x5654('0xa9')]('START\x20CALLY\x20SQUARE');if(_0x8cd8a0['answer']===_0x5654('0x198')){this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0x199'));return this[_0x5654('0xe')][_0x5654('0xa0')]();}return this['channel'][_0x5654('0xa9')]('Skipped\x20Answer');};AGIVertices[_0x5654('0x10')][_0x5654('0x19a')]=function(_0x1b6f4f){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x19b'),_0x1b6f4f[_0x5654('0x9e')]));if(!this['isConfigured'](_0x1b6f4f[_0x5654('0x19c')])){return this[_0x5654('0xe')]['error'](_0x1b6f4f,'no\x20subproject\x20selected');}var _0x44baa1=this['getSquareProject'][_0x5654('0x6d')](this,_0x1b6f4f[_0x5654('0x19c')]);if(!this[_0x5654('0x7d')](_0x44baa1)){return this['channel'][_0x5654('0x29')](_0x1b6f4f,util[_0x5654('0x51')]('no\x20subproject\x20found\x20with\x20id\x20%d',_0x1b6f4f[_0x5654('0x19c')]));}if(_0x44baa1===this[_0x5654('0xe')][_0x5654('0x3b')]){return this[_0x5654('0xe')][_0x5654('0x29')](_0x1b6f4f,_0x5654('0x19d'));}this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x1b6f4f,_0x44baa1);var _0x4a6218=this[_0x5654('0xe')][_0x5654('0xac')](_0x5654('0x19e'),util[_0x5654('0x51')](_0x5654('0x19f'),config['agi']['host']||_0x5654('0x1a0'),_0x44baa1,this[_0x5654('0xe')][_0x5654('0x3b')]));if(_0x4a6218[_0x5654('0x9a')]===-0x1){return _0x4a6218;}return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0xae'),_0x5654('0x19e'),_0x44baa1));};AGIVertices[_0x5654('0x10')][_0x5654('0x1a1')]=function(_0x11a48a){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x1a2'),_0x11a48a[_0x5654('0x9e')]));var _0x124eb8=this[_0x5654('0x1a3')][_0x5654('0x6d')](this,_0x11a48a[_0x5654('0x9f')]);this[_0x5654('0x32')][_0x5654('0x6d')](this,_0x11a48a,_0x11a48a[_0x5654('0x9f')]);if(this[_0x5654('0x7d')](_0x11a48a[_0x5654('0xcc')])){var _0x1db790=this['getVariable'][_0x5654('0x6d')](this,_0x11a48a[_0x5654('0xcc')]);if(_0x1db790){this[_0x5654('0xe')]['setVariable'](_0x1db790,_0x124eb8);return this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x1a4'),_0x11a48a[_0x5654('0x9f')],_0x1db790));}}return this[_0x5654('0xe')][_0x5654('0xa9')](util['format'](_0x5654('0x1a5'),_0x11a48a[_0x5654('0x9f')]));};AGIVertices[_0x5654('0x10')][_0x5654('0x1a6')]=function(_0xaabfa8){logger['info'](util[_0x5654('0x51')](_0x5654('0x1a7'),_0xaabfa8[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0xaabfa8['apiKey'])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0x1a8'));}if(!this[_0x5654('0x7d')](_0xaabfa8[_0x5654('0x56')])){return this[_0x5654('0xe')][_0x5654('0xa9')](_0x5654('0xb1'));}this[_0x5654('0xe')][_0x5654('0xa9')](util[_0x5654('0x51')](_0x5654('0x1a9'),_0xaabfa8[_0x5654('0x56')]));var _0x4f88b4=this[_0x5654('0x1aa')]['sync'](this,_0xaabfa8);if(_0x4f88b4){this[_0x5654('0xe')]['noop'](util['format'](_0x5654('0x1ab'),_0x4f88b4));var _0xe84040=this[_0x5654('0xe')][_0x5654('0xed')](_0x4f88b4);try{fs[_0x5654('0xee')](_0x4f88b4+_0x5654('0x10c'));}catch(_0x43edff){logger[_0x5654('0x29')](_0x43edff);}return _0xe84040;}return this[_0x5654('0xe')][_0x5654('0x29')](_0xaabfa8,_0x5654('0x1ac'));};AGIVertices[_0x5654('0x10')][_0x5654('0x1ad')]=function(_0x8c4bdf){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x1ae'),_0x8c4bdf[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x8c4bdf[_0x5654('0x56')])){return this[_0x5654('0xe')]['noop'](_0x5654('0xb1'));}this[_0x5654('0xe')]['noop'](util[_0x5654('0x51')](_0x5654('0x1af'),_0x8c4bdf[_0x5654('0x56')]));var _0x2abf83=this[_0x5654('0x5d')][_0x5654('0x6d')](this,_0x8c4bdf);if(_0x2abf83){this[_0x5654('0xe')]['noop'](util[_0x5654('0x51')]('Google\x20TTS\x20%s\x20file\x20created',_0x2abf83));var _0x1b4745=this[_0x5654('0xe')][_0x5654('0xed')](_0x2abf83);try{fs['unlink'](_0x2abf83+'.wav');}catch(_0x4a4078){logger[_0x5654('0x29')](_0x4a4078);}return _0x1b4745;}return this['channel'][_0x5654('0x29')](_0x8c4bdf,_0x5654('0x1b0'));};AGIVertices[_0x5654('0x10')][_0x5654('0x1b1')]=function(_0x2e8c7a){logger[_0x5654('0x2b')](util[_0x5654('0x51')]('Enter\x20in\x20UNPAUSE\x20(%s)\x20block',_0x2e8c7a[_0x5654('0x9e')]));if(!this['isConfigured'](_0x2e8c7a[_0x5654('0x13e')])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x2e8c7a,'no\x20find\x20by\x20configured');}logger[_0x5654('0x2b')](util['format'](_0x5654('0x143'),this[_0x5654('0xe')][_0x5654('0x35')],_0x2e8c7a[_0x5654('0x13e')]));var _0xd851a3=this[_0x5654('0x4d')][_0x5654('0x6d')](this,_0x2e8c7a[_0x5654('0x13e')]);if(_0xd851a3){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x13f'),this[_0x5654('0xe')][_0x5654('0x35')],_0x2e8c7a['findBy']));this[_0x5654('0xe')][_0x5654('0xa9')](util['format'](_0x5654('0x13f'),this['channel'][_0x5654('0x35')],_0x2e8c7a['findBy']));return{'code':0xc8,'result':_0x5654('0x140')};}else{logger[_0x5654('0x2b')](util['format'](_0x5654('0x144'),this[_0x5654('0xe')][_0x5654('0x35')],_0x2e8c7a[_0x5654('0x13e')]));this[_0x5654('0xe')][_0x5654('0xa9')](util['format'](_0x5654('0x144'),this[_0x5654('0xe')][_0x5654('0x35')],_0x2e8c7a[_0x5654('0x13e')]));return{'code':0xc8,'result':_0x5654('0x141')};}};AGIVertices[_0x5654('0x10')]['voicemail']=function(_0x3047ec){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x1b2'),_0x3047ec[_0x5654('0x9e')]));var _0x3e6875=this['channel'][_0x5654('0xac')](_0x5654('0x1b3'),[_0x3047ec[_0x5654('0x1b4')],_0x3047ec[_0x5654('0x74')]]);if(_0x3e6875[_0x5654('0x9a')]===-0x1){return _0x3e6875;}return this['channel']['noop'](util['format'](_0x5654('0xae'),_0x5654('0x1b3'),_0x3047ec[_0x5654('0x1b4')]));};AGIVertices[_0x5654('0x10')][_0x5654('0x1b5')]=function(_0x2a5058){logger[_0x5654('0x2b')](util[_0x5654('0x51')](_0x5654('0x1b6'),_0x2a5058[_0x5654('0x9e')]));if(!this[_0x5654('0x7d')](_0x2a5058['variable_id'])){return this[_0x5654('0xe')][_0x5654('0x29')](_0x2a5058,_0x5654('0x194'));}var _0x368c40=this[_0x5654('0x11')][_0x5654('0x6d')](this,_0x2a5058[_0x5654('0xcc')]);if(!_0x368c40){return this['channel'][_0x5654('0x29')](_0x2a5058,'no\x20variable\x20found');}var _0x969502=this[_0x5654('0xe')]['getVariable'](_0x368c40);return{'code':0xc8,'result':_0x969502[_0x5654('0x98')]?_0x969502[_0x5654('0x98')]:'-'};};String[_0x5654('0x10')]['replaceAll']=function(_0x5c2fdf,_0x2f2c33){return this[_0x5654('0x96')](_0x5c2fdf)['join'](_0x2f2c33);};module[_0x5654('0x1b7')]=AGIVertices;
\ No newline at end of file
diff --git a/server/services/ami/acw/index.js b/server/services/ami/acw/index.js
index 4ea0d4c..0d7fcd0 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 _0x6aa7=['[%s][HANGUPATTENDEDTRANSFER:LINKEDID]','[ACW][syncHangup]\x20%s','isNil','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','syncBlindTransfer','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','stringify','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','[ACW][syncBlindTransfer]\x20%s','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','util','moment','../ami','../../../config/logger','acw','../rpc/voiceAgentReport','voiceQueues','agents','timers','channels','agentconnect','bind','hanguprequest','syncHangupRequest','hangup','syncHangup','agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncAgentConnectPreview','milliseconds','diff','prototype','startAcw','queue','mandatoryDisposition','mandatoryDispositionPause','name','Action','QueuePause','then','getAgent','voicePause','info','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','timer','stopAcw','format','YYYY-MM-DD\x20HH:mm:ss','uniqueid','updateAcw','update','catch','error','finally','[ACW][START]\x20%s','[TIMER][STOP][AGENT:%s]','saveUnpause','[%s][UPDATE][ACWTIME:%s]','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','[ACW][STOP]\x20%s','message','syncAgentConnect','interface','[ACW][syncAgentConnect]\x20%s','[ACW][syncAgentConnectPreview]\x20%s','[%s][HANGUP:UNIQUEID]','linkedid','isUndefined','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s'];(function(_0x55db5b,_0x1c9178){var _0x47925a=function(_0x505879){while(--_0x505879){_0x55db5b['push'](_0x55db5b['shift']());}};_0x47925a(++_0x1c9178);}(_0x6aa7,0x178));var _0x76aa=function(_0xe6351f,_0x26e73b){_0xe6351f=_0xe6351f-0x0;var _0x18fd5c=_0x6aa7[_0xe6351f];return _0x18fd5c;};'use strict';var util=require(_0x76aa('0x0'));var _=require('lodash');var moment=require(_0x76aa('0x1'));var ami=require(_0x76aa('0x2'));var logger=require(_0x76aa('0x3'))(_0x76aa('0x4'));var RpcUser=require('../rpc/user');var RpcVoiceAgentReport=require(_0x76aa('0x5'));function Acw(_0xef15ef){this[_0x76aa('0x6')]=_0xef15ef['voiceQueues'];this['agents']=_0xef15ef[_0x76aa('0x7')];this['timers']=_0xef15ef[_0x76aa('0x8')];this[_0x76aa('0x9')]={};ami['on'](_0x76aa('0xa'),this['syncAgentConnect'][_0x76aa('0xb')](this));ami['on'](_0x76aa('0xc'),this[_0x76aa('0xd')]['bind'](this));ami['on'](_0x76aa('0xe'),this[_0x76aa('0xf')][_0x76aa('0xb')](this));ami['on'](_0x76aa('0x10'),this[_0x76aa('0x11')][_0x76aa('0xb')](this));ami['on'](_0x76aa('0x12'),this[_0x76aa('0x13')][_0x76aa('0xb')](this));ami['on'](_0x76aa('0x14'),this['syncBlindTransfer'][_0x76aa('0xb')](this));ami['on']('custom:agentConnectPreview',this[_0x76aa('0x15')][_0x76aa('0xb')](this));}function getDiff(_0x3f8f6b){var _0x8e44ed=moment()[_0x76aa('0x16')](0x0);var _0x4e309f=moment(_0x3f8f6b)['milliseconds'](0x0);return _0x8e44ed[_0x76aa('0x17')](_0x4e309f,'seconds');}Acw[_0x76aa('0x18')][_0x76aa('0x19')]=function(_0x5cf594){try{var _0x2111c7=this;var _0x550d9a=this[_0x76aa('0x9')][_0x5cf594]['interface'];var _0x1515e9=this[_0x76aa('0x9')][_0x5cf594][_0x76aa('0x1a')];var _0x21c16d=this[_0x76aa('0x6')][_0x1515e9];var _0x3ead3f=![];var _0x496902='ACW';if(_0x21c16d[_0x76aa('0x1b')]){if(_0x21c16d[_0x76aa('0x1c')][_0x76aa('0x1d')]){_0x3ead3f=!![];_0x496902=_0x21c16d[_0x76aa('0x1c')][_0x76aa('0x1d')];}}ami[_0x76aa('0x1e')]({'action':_0x76aa('0x1f'),'interface':_0x550d9a,'paused':!![],'reason':_0x496902})[_0x76aa('0x20')](function(_0x385157){if(_0x2111c7['agents'][_0x550d9a]){return RpcUser[_0x76aa('0x21')](_0x2111c7[_0x76aa('0x7')][_0x550d9a]['id'])[_0x76aa('0x20')](function(_0x5b3f55){if(_0x5b3f55&&!_0x5b3f55[_0x76aa('0x22')]){logger[_0x76aa('0x23')](_0x76aa('0x24'),_0x5cf594,_0x550d9a,_0x1515e9);var _0x2bd2c6=_0x2111c7[_0x76aa('0x9')][_0x5cf594][_0x76aa('0x25')]&&_0x2111c7[_0x76aa('0x9')][_0x5cf594][_0x76aa('0x26')]?_0x2111c7[_0x76aa('0x9')][_0x5cf594][_0x76aa('0x26')]:_0x5cf594;return RpcUser[_0x76aa('0x27')](_0x2111c7[_0x76aa('0x7')][_0x550d9a],_0x496902,_0x2bd2c6)[_0x76aa('0x20')](function(_0x4ef9b0){if(!_0x3ead3f){_0x2111c7[_0x76aa('0x8')][_0x550d9a]={};logger[_0x76aa('0x23')](_0x76aa('0x28'),_0x5cf594,_0x2111c7[_0x76aa('0x6')][_0x1515e9][_0x76aa('0x29')],_0x550d9a,_0x1515e9);_0x2111c7[_0x76aa('0x8')][_0x550d9a][_0x76aa('0x2a')]=setTimeout(_0x2111c7[_0x76aa('0x2b')][_0x76aa('0xb')](_0x2111c7,_0x550d9a),_0x2111c7[_0x76aa('0x6')][_0x1515e9]['acwTimeout']*0x3e8);_0x2111c7[_0x76aa('0x8')][_0x550d9a]['lastPauseAt']=moment()[_0x76aa('0x2c')](_0x76aa('0x2d'));_0x2111c7[_0x76aa('0x8')][_0x550d9a][_0x76aa('0x2e')]=_0x5cf594;_0x2111c7[_0x76aa('0x8')][_0x550d9a][_0x76aa('0x1a')]=_0x1515e9;_0x2111c7[_0x76aa('0x8')][_0x550d9a][_0x76aa('0x2f')]=function(){var _0x19fd4f=getDiff(_0x2111c7[_0x76aa('0x8')][_0x550d9a]['lastPauseAt']);clearTimeout(_0x2111c7[_0x76aa('0x8')][_0x550d9a][_0x76aa('0x2a')]);_0x2111c7[_0x76aa('0x8')][_0x550d9a][_0x76aa('0x2a')]=![];RpcVoiceAgentReport[_0x76aa('0x30')]({'acwtime':_0x19fd4f},_0x2111c7[_0x76aa('0x8')][_0x550d9a][_0x76aa('0x2e')],_0x550d9a)['then'](function(_0x258624){logger[_0x76aa('0x23')]('[%s][UPDATE][ACWTIME:%s]',_0x5cf594,_0x19fd4f,_0x258624);})[_0x76aa('0x31')](function(_0x58d860){logger[_0x76aa('0x32')]('[%s][UPDATE][ERRORS:%s]',_0x5cf594,_0x58d860);});delete _0x2111c7[_0x76aa('0x8')][_0x550d9a];};}});}else{logger['info']('[%s][INPAUSE][AGENT:%s][QUEUE:%s]',_0x5cf594,_0x550d9a,_0x1515e9);}});}})[_0x76aa('0x31')](function(_0x282c56){logger[_0x76aa('0x32')](_0x76aa('0x28'),_0x5cf594,_0x2111c7['voiceQueues'][_0x1515e9]['acwTimeout'],_0x550d9a,_0x1515e9);})[_0x76aa('0x33')](function(){delete _0x2111c7[_0x76aa('0x9')][_0x5cf594];});}catch(_0x58127c){logger[_0x76aa('0x32')](_0x76aa('0x34'),_0x58127c['message']);}};Acw[_0x76aa('0x18')]['stopAcw']=function(_0x5086f5){try{var _0x4fdbde=this;if(_0x4fdbde[_0x76aa('0x8')][_0x5086f5]){_0x4fdbde[_0x76aa('0x8')][_0x5086f5][_0x76aa('0x2a')]=![];var _0x48cf51=_0x4fdbde[_0x76aa('0x8')][_0x5086f5][_0x76aa('0x2e')];var _0x2eea79=_0x4fdbde['timers'][_0x5086f5][_0x76aa('0x1a')];var _0x1638db=_0x4fdbde[_0x76aa('0x6')][_0x2eea79][_0x76aa('0x29')];logger[_0x76aa('0x23')](_0x76aa('0x35'),_0x5086f5);RpcUser[_0x76aa('0x36')](this[_0x76aa('0x7')][_0x5086f5]);RpcVoiceAgentReport[_0x76aa('0x30')]({'acwtime':_0x1638db,'agentacw':!![]},_0x48cf51,_0x5086f5)['then'](function(_0x1525cb){logger[_0x76aa('0x23')](_0x76aa('0x37'),_0x48cf51,_0x1638db,_0x1525cb);})[_0x76aa('0x31')](function(_0x64612e){logger[_0x76aa('0x32')]('[%s][UPDATE][ERRORS:%s]',_0x48cf51,_0x64612e);});}else{logger['error'](_0x76aa('0x38'),_0x5086f5);if(_0x4fdbde[_0x76aa('0x8')]){logger[_0x76aa('0x23')](_0x76aa('0x39'),JSON['stringify'](_0x4fdbde[_0x76aa('0x8')]));}}}catch(_0x403084){logger[_0x76aa('0x32')](_0x76aa('0x3a'),_0x403084[_0x76aa('0x3b')]);}};Acw['prototype'][_0x76aa('0x3c')]=function(_0x556f59){try{if(this[_0x76aa('0x6')][_0x556f59['queue']]&&(this['voiceQueues'][_0x556f59['queue']][_0x76aa('0x4')]||this['voiceQueues'][_0x556f59['queue']]['mandatoryDisposition'])){if(this[_0x76aa('0x7')][_0x556f59[_0x76aa('0x3d')]]){this[_0x76aa('0x9')][_0x556f59[_0x76aa('0x2e')]]={'queue':_0x556f59[_0x76aa('0x1a')],'interface':_0x556f59['interface'],'destlinkedid':_0x556f59[_0x76aa('0x26')]};}}}catch(_0x14df8c){logger[_0x76aa('0x32')](_0x76aa('0x3e'),_0x14df8c[_0x76aa('0x3b')]);}};Acw['prototype'][_0x76aa('0x15')]=function(_0x1c62a9){try{if(this['voiceQueues'][_0x1c62a9[_0x76aa('0x1a')]]&&(this['voiceQueues'][_0x1c62a9[_0x76aa('0x1a')]][_0x76aa('0x4')]||this[_0x76aa('0x6')][_0x1c62a9[_0x76aa('0x1a')]][_0x76aa('0x1b')])){if(this[_0x76aa('0x7')][_0x1c62a9[_0x76aa('0x3d')]]){this[_0x76aa('0x9')][_0x1c62a9[_0x76aa('0x2e')]]={'queue':_0x1c62a9[_0x76aa('0x1a')],'interface':_0x1c62a9['interface']};}}}catch(_0xbbd734){logger['error'](_0x76aa('0x3f'),_0xbbd734[_0x76aa('0x3b')]);}};Acw[_0x76aa('0x18')][_0x76aa('0xd')]=function(_0x5ca721){try{if(this['channels'][_0x5ca721[_0x76aa('0x2e')]]&&_['isUndefined'](this[_0x76aa('0x9')][_0x5ca721[_0x76aa('0x2e')]][_0x76aa('0x25')])){logger[_0x76aa('0x23')](_0x76aa('0x40'),_0x5ca721[_0x76aa('0x2e')]);this['startAcw'](_0x5ca721['uniqueid']);}else if(this[_0x76aa('0x9')][_0x5ca721[_0x76aa('0x41')]]&&_[_0x76aa('0x42')](this[_0x76aa('0x9')][_0x5ca721[_0x76aa('0x41')]][_0x76aa('0x25')])){logger['info'](_0x76aa('0x43'),_0x5ca721[_0x76aa('0x41')]);this[_0x76aa('0x19')](_0x5ca721['linkedid']);}}catch(_0x30d930){logger['error'](_0x76aa('0x44'),_0x30d930['message']);}};Acw[_0x76aa('0x18')][_0x76aa('0xf')]=function(_0x3c63e5){try{if(this[_0x76aa('0x9')][_0x3c63e5[_0x76aa('0x2e')]]&&this[_0x76aa('0x9')][_0x3c63e5[_0x76aa('0x2e')]]['attended']){logger[_0x76aa('0x23')]('[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]',_0x3c63e5[_0x76aa('0x2e')]);this[_0x76aa('0x19')](_0x3c63e5[_0x76aa('0x2e')]);}else if(this[_0x76aa('0x9')][_0x3c63e5[_0x76aa('0x41')]]&&this[_0x76aa('0x9')][_0x3c63e5[_0x76aa('0x41')]]['attended']){logger[_0x76aa('0x23')](_0x76aa('0x45'),_0x3c63e5[_0x76aa('0x41')]);this[_0x76aa('0x19')](_0x3c63e5['linkedid']);}}catch(_0xb9401b){logger[_0x76aa('0x32')](_0x76aa('0x46'),_0xb9401b[_0x76aa('0x3b')]);}};Acw[_0x76aa('0x18')][_0x76aa('0x13')]=function(_0x4e6c09){try{if(!_[_0x76aa('0x47')](this[_0x76aa('0x9')][_0x4e6c09[_0x76aa('0x48')]])){this[_0x76aa('0x19')](_0x4e6c09[_0x76aa('0x48')]);if(this[_0x76aa('0x9')][_0x4e6c09[_0x76aa('0x49')]]){this['channels'][_0x4e6c09['secondtransfereruniqueid']][_0x76aa('0x25')]=!![];this[_0x76aa('0x9')][_0x4e6c09['transfertargetuniqueid']]=this[_0x76aa('0x9')][_0x4e6c09[_0x76aa('0x49')]];delete this['channels'][_0x4e6c09[_0x76aa('0x49')]];}}else if(!_[_0x76aa('0x47')](this[_0x76aa('0x9')][_0x4e6c09[_0x76aa('0x4a')]])){this[_0x76aa('0x19')](_0x4e6c09[_0x76aa('0x4a')]);if(this[_0x76aa('0x9')][_0x4e6c09[_0x76aa('0x4b')]]){this[_0x76aa('0x9')][_0x4e6c09['origtransfereruniqueid']][_0x76aa('0x25')]=!![];this['channels'][_0x4e6c09[_0x76aa('0x48')]]=this[_0x76aa('0x9')][_0x4e6c09[_0x76aa('0x4b')]];delete this[_0x76aa('0x9')][_0x4e6c09[_0x76aa('0x4b')]];}}}catch(_0x260ad2){logger[_0x76aa('0x32')](_0x76aa('0x4c'),_0x260ad2[_0x76aa('0x3b')]);}};Acw['prototype'][_0x76aa('0x4d')]=function(_0x3d4025){try{if(this[_0x76aa('0x9')][_0x3d4025[_0x76aa('0x4e')]]){logger[_0x76aa('0x23')](_0x76aa('0x4f'),JSON[_0x76aa('0x50')](_0x3d4025[_0x76aa('0x4e')]));this['startAcw'](_0x3d4025[_0x76aa('0x4e')]);}else if(this['channels'][_0x3d4025[_0x76aa('0x51')]]){logger[_0x76aa('0x23')](_0x76aa('0x52'),JSON[_0x76aa('0x50')](_0x3d4025[_0x76aa('0x51')]));this[_0x76aa('0x19')](_0x3d4025[_0x76aa('0x51')]);}}catch(_0x4a37f1){logger[_0x76aa('0x32')](_0x76aa('0x53'),_0x4a37f1['message']);}};Acw['prototype'][_0x76aa('0x11')]=function(_0x13389d){try{if(this['voiceQueues'][_0x13389d[_0x76aa('0x1a')]]&&this[_0x76aa('0x6')][_0x13389d[_0x76aa('0x1a')]]['autopause']===_0x76aa('0x54')){if(this['agents'][_0x13389d[_0x76aa('0x3d')]]){logger[_0x76aa('0x23')](_0x76aa('0x55'),_0x13389d[_0x76aa('0x2e')],_0x13389d['interface'],_0x13389d['queue']);return RpcUser[_0x76aa('0x27')](this['agents'][_0x13389d[_0x76aa('0x3d')]],_0x76aa('0x56'),_0x13389d[_0x76aa('0x2e')]);}}}catch(_0x43a2af){logger[_0x76aa('0x32')](_0x76aa('0x57'),_0x43a2af[_0x76aa('0x3b')]);}};module[_0x76aa('0x58')]=Acw;
\ No newline at end of file
+var _0x425d=['syncAgentConnectPreview','milliseconds','diff','seconds','prototype','startAcw','interface','queue','name','mandatoryDispositionPause','QueuePause','then','getAgent','voicePause','info','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','timer','stopAcw','lastPauseAt','format','YYYY-MM-DD\x20HH:mm:ss','updateAcw','uniqueid','catch','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','finally','error','message','[TIMER][STOP][AGENT:%s]','[%s][UPDATE][ACWTIME:%s]','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','stringify','[ACW][STOP]\x20%s','mandatoryDisposition','[ACW][syncAgentConnect]\x20%s','[%s][HANGUP:UNIQUEID]','linkedid','isUndefined','[%s][HANGUP:LINKEDID]','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','isNil','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','[ACW][syncBlindTransfer]\x20%s','autopause','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','util','moment','../ami','../../../config/logger','acw','../rpc/user','../rpc/voiceAgentReport','voiceQueues','agents','timers','channels','syncAgentConnect','bind','hanguprequest','syncHangupRequest','hangup','syncHangup','agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview'];(function(_0x35d8af,_0x14fd75){var _0x1d08b0=function(_0x36b437){while(--_0x36b437){_0x35d8af['push'](_0x35d8af['shift']());}};_0x1d08b0(++_0x14fd75);}(_0x425d,0x1e0));var _0xd425=function(_0x272638,_0x53c9ea){_0x272638=_0x272638-0x0;var _0x5a5739=_0x425d[_0x272638];return _0x5a5739;};'use strict';var util=require(_0xd425('0x0'));var _=require('lodash');var moment=require(_0xd425('0x1'));var ami=require(_0xd425('0x2'));var logger=require(_0xd425('0x3'))(_0xd425('0x4'));var RpcUser=require(_0xd425('0x5'));var RpcVoiceAgentReport=require(_0xd425('0x6'));function Acw(_0x47043f){this['voiceQueues']=_0x47043f[_0xd425('0x7')];this[_0xd425('0x8')]=_0x47043f[_0xd425('0x8')];this[_0xd425('0x9')]=_0x47043f[_0xd425('0x9')];this[_0xd425('0xa')]={};ami['on']('agentconnect',this[_0xd425('0xb')][_0xd425('0xc')](this));ami['on'](_0xd425('0xd'),this[_0xd425('0xe')][_0xd425('0xc')](this));ami['on'](_0xd425('0xf'),this[_0xd425('0x10')][_0xd425('0xc')](this));ami['on'](_0xd425('0x11'),this[_0xd425('0x12')][_0xd425('0xc')](this));ami['on'](_0xd425('0x13'),this[_0xd425('0x14')][_0xd425('0xc')](this));ami['on'](_0xd425('0x15'),this[_0xd425('0x16')][_0xd425('0xc')](this));ami['on'](_0xd425('0x17'),this[_0xd425('0x18')][_0xd425('0xc')](this));}function getDiff(_0x51263f){var _0x27318c=moment()[_0xd425('0x19')](0x0);var _0x336dc3=moment(_0x51263f)['milliseconds'](0x0);return _0x27318c[_0xd425('0x1a')](_0x336dc3,_0xd425('0x1b'));}Acw[_0xd425('0x1c')][_0xd425('0x1d')]=function(_0x1fc822){try{var _0x538a0a=this;var _0x278626=this[_0xd425('0xa')][_0x1fc822][_0xd425('0x1e')];var _0x5dda0c=this['channels'][_0x1fc822][_0xd425('0x1f')];var _0x434d97=this[_0xd425('0x7')][_0x5dda0c];var _0x1155bc=![];var _0x4e88fa='ACW';if(_0x434d97['mandatoryDisposition']){if(_0x434d97['mandatoryDispositionPause'][_0xd425('0x20')]){_0x1155bc=!![];_0x4e88fa=_0x434d97[_0xd425('0x21')][_0xd425('0x20')];}}ami['Action']({'action':_0xd425('0x22'),'interface':_0x278626,'paused':!![],'reason':_0x4e88fa})[_0xd425('0x23')](function(_0x5f1e7e){if(_0x538a0a[_0xd425('0x8')][_0x278626]){return RpcUser[_0xd425('0x24')](_0x538a0a[_0xd425('0x8')][_0x278626]['id'])[_0xd425('0x23')](function(_0x3e93db){if(_0x3e93db&&!_0x3e93db[_0xd425('0x25')]){logger[_0xd425('0x26')](_0xd425('0x27'),_0x1fc822,_0x278626,_0x5dda0c);var _0x314201=_0x538a0a[_0xd425('0xa')][_0x1fc822][_0xd425('0x28')]&&_0x538a0a[_0xd425('0xa')][_0x1fc822]['destlinkedid']?_0x538a0a[_0xd425('0xa')][_0x1fc822][_0xd425('0x29')]:_0x1fc822;return RpcUser[_0xd425('0x2a')](_0x538a0a[_0xd425('0x8')][_0x278626],_0x4e88fa,_0x314201)[_0xd425('0x23')](function(_0x400dd7){if(!_0x1155bc){_0x538a0a[_0xd425('0x9')][_0x278626]={};logger['info'](_0xd425('0x2b'),_0x1fc822,_0x538a0a[_0xd425('0x7')][_0x5dda0c][_0xd425('0x2c')],_0x278626,_0x5dda0c);_0x538a0a['timers'][_0x278626][_0xd425('0x2d')]=setTimeout(_0x538a0a[_0xd425('0x2e')][_0xd425('0xc')](_0x538a0a,_0x278626),_0x538a0a[_0xd425('0x7')][_0x5dda0c][_0xd425('0x2c')]*0x3e8);_0x538a0a[_0xd425('0x9')][_0x278626][_0xd425('0x2f')]=moment()[_0xd425('0x30')](_0xd425('0x31'));_0x538a0a[_0xd425('0x9')][_0x278626]['uniqueid']=_0x1fc822;_0x538a0a[_0xd425('0x9')][_0x278626][_0xd425('0x1f')]=_0x5dda0c;_0x538a0a[_0xd425('0x9')][_0x278626][_0xd425('0x32')]=function(){var _0x3275b1=getDiff(_0x538a0a[_0xd425('0x9')][_0x278626][_0xd425('0x2f')]);clearTimeout(_0x538a0a[_0xd425('0x9')][_0x278626][_0xd425('0x2d')]);_0x538a0a[_0xd425('0x9')][_0x278626][_0xd425('0x2d')]=![];RpcVoiceAgentReport['update']({'acwtime':_0x3275b1},_0x538a0a[_0xd425('0x9')][_0x278626][_0xd425('0x33')],_0x278626)[_0xd425('0x23')](function(_0x21e0bd){logger[_0xd425('0x26')]('[%s][UPDATE][ACWTIME:%s]',_0x1fc822,_0x3275b1,_0x21e0bd);})[_0xd425('0x34')](function(_0x3badcc){logger['error']('[%s][UPDATE][ERRORS:%s]',_0x1fc822,_0x3badcc);});delete _0x538a0a['timers'][_0x278626];};}});}else{logger[_0xd425('0x26')](_0xd425('0x35'),_0x1fc822,_0x278626,_0x5dda0c);}});}})[_0xd425('0x34')](function(_0x2d586f){logger['error'](_0xd425('0x2b'),_0x1fc822,_0x538a0a[_0xd425('0x7')][_0x5dda0c][_0xd425('0x2c')],_0x278626,_0x5dda0c);})[_0xd425('0x36')](function(){delete _0x538a0a[_0xd425('0xa')][_0x1fc822];});}catch(_0x1e12f2){logger[_0xd425('0x37')]('[ACW][START]\x20%s',_0x1e12f2[_0xd425('0x38')]);}};Acw['prototype'][_0xd425('0x2e')]=function(_0x29cca9){try{var _0x36c8da=this;if(_0x36c8da['timers'][_0x29cca9]){_0x36c8da[_0xd425('0x9')][_0x29cca9][_0xd425('0x2d')]=![];var _0xbbb05f=_0x36c8da[_0xd425('0x9')][_0x29cca9]['uniqueid'];var _0x1d38fa=_0x36c8da[_0xd425('0x9')][_0x29cca9]['queue'];var _0x5d310e=_0x36c8da['voiceQueues'][_0x1d38fa][_0xd425('0x2c')];logger[_0xd425('0x26')](_0xd425('0x39'),_0x29cca9);RpcUser['saveUnpause'](this['agents'][_0x29cca9]);RpcVoiceAgentReport['update']({'acwtime':_0x5d310e,'agentacw':!![]},_0xbbb05f,_0x29cca9)[_0xd425('0x23')](function(_0x3f9090){logger[_0xd425('0x26')](_0xd425('0x3a'),_0xbbb05f,_0x5d310e,_0x3f9090);})[_0xd425('0x34')](function(_0x14f3be){logger[_0xd425('0x37')]('[%s][UPDATE][ERRORS:%s]',_0xbbb05f,_0x14f3be);});}else{logger[_0xd425('0x37')](_0xd425('0x3b'),_0x29cca9);if(_0x36c8da[_0xd425('0x9')]){logger['info'](_0xd425('0x3c'),JSON[_0xd425('0x3d')](_0x36c8da[_0xd425('0x9')]));}}}catch(_0x5dc4c4){logger[_0xd425('0x37')](_0xd425('0x3e'),_0x5dc4c4[_0xd425('0x38')]);}};Acw[_0xd425('0x1c')]['syncAgentConnect']=function(_0x1e9be2){try{if(this[_0xd425('0x7')][_0x1e9be2[_0xd425('0x1f')]]&&(this[_0xd425('0x7')][_0x1e9be2[_0xd425('0x1f')]][_0xd425('0x4')]||this[_0xd425('0x7')][_0x1e9be2['queue']][_0xd425('0x3f')])){if(this[_0xd425('0x8')][_0x1e9be2['interface']]){this[_0xd425('0xa')][_0x1e9be2['uniqueid']]={'queue':_0x1e9be2['queue'],'interface':_0x1e9be2[_0xd425('0x1e')],'destlinkedid':_0x1e9be2['destlinkedid']};}}}catch(_0x1be60a){logger['error'](_0xd425('0x40'),_0x1be60a[_0xd425('0x38')]);}};Acw[_0xd425('0x1c')][_0xd425('0x18')]=function(_0x4420d2){try{if(this['voiceQueues'][_0x4420d2[_0xd425('0x1f')]]&&(this['voiceQueues'][_0x4420d2[_0xd425('0x1f')]]['acw']||this[_0xd425('0x7')][_0x4420d2[_0xd425('0x1f')]][_0xd425('0x3f')])){if(this[_0xd425('0x8')][_0x4420d2[_0xd425('0x1e')]]){this['channels'][_0x4420d2[_0xd425('0x33')]]={'queue':_0x4420d2[_0xd425('0x1f')],'interface':_0x4420d2[_0xd425('0x1e')]};}}}catch(_0x4091a7){logger[_0xd425('0x37')]('[ACW][syncAgentConnectPreview]\x20%s',_0x4091a7[_0xd425('0x38')]);}};Acw[_0xd425('0x1c')][_0xd425('0xe')]=function(_0x2a2ab4){try{if(this[_0xd425('0xa')][_0x2a2ab4[_0xd425('0x33')]]&&_['isUndefined'](this[_0xd425('0xa')][_0x2a2ab4[_0xd425('0x33')]]['attended'])){logger[_0xd425('0x26')](_0xd425('0x41'),_0x2a2ab4[_0xd425('0x33')]);this[_0xd425('0x1d')](_0x2a2ab4['uniqueid']);}else if(this[_0xd425('0xa')][_0x2a2ab4[_0xd425('0x42')]]&&_[_0xd425('0x43')](this[_0xd425('0xa')][_0x2a2ab4[_0xd425('0x42')]]['attended'])){logger['info'](_0xd425('0x44'),_0x2a2ab4['linkedid']);this[_0xd425('0x1d')](_0x2a2ab4[_0xd425('0x42')]);}}catch(_0x5594f9){logger[_0xd425('0x37')]('[ACW][syncHangupRequest]\x20%s',_0x5594f9['message']);}};Acw[_0xd425('0x1c')][_0xd425('0x10')]=function(_0xe6451f){try{if(this[_0xd425('0xa')][_0xe6451f[_0xd425('0x33')]]&&this[_0xd425('0xa')][_0xe6451f[_0xd425('0x33')]][_0xd425('0x28')]){logger['info'](_0xd425('0x45'),_0xe6451f[_0xd425('0x33')]);this[_0xd425('0x1d')](_0xe6451f[_0xd425('0x33')]);}else if(this[_0xd425('0xa')][_0xe6451f[_0xd425('0x42')]]&&this[_0xd425('0xa')][_0xe6451f[_0xd425('0x42')]]['attended']){logger['info']('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0xe6451f[_0xd425('0x42')]);this[_0xd425('0x1d')](_0xe6451f[_0xd425('0x42')]);}}catch(_0x3c6b49){logger['error']('[ACW][syncHangup]\x20%s',_0x3c6b49['message']);}};Acw['prototype'][_0xd425('0x14')]=function(_0x44c5e4){try{if(!_['isNil'](this[_0xd425('0xa')][_0x44c5e4[_0xd425('0x46')]])){this[_0xd425('0x1d')](_0x44c5e4['transfereeuniqueid']);if(this['channels'][_0x44c5e4[_0xd425('0x47')]]){this['channels'][_0x44c5e4['secondtransfereruniqueid']]['attended']=!![];this[_0xd425('0xa')][_0x44c5e4[_0xd425('0x48')]]=this[_0xd425('0xa')][_0x44c5e4['secondtransfereruniqueid']];delete this[_0xd425('0xa')][_0x44c5e4['secondtransfereruniqueid']];}}else if(!_[_0xd425('0x49')](this[_0xd425('0xa')][_0x44c5e4[_0xd425('0x48')]])){this[_0xd425('0x1d')](_0x44c5e4[_0xd425('0x48')]);if(this[_0xd425('0xa')][_0x44c5e4[_0xd425('0x4a')]]){this[_0xd425('0xa')][_0x44c5e4[_0xd425('0x4a')]]['attended']=!![];this[_0xd425('0xa')][_0x44c5e4[_0xd425('0x46')]]=this[_0xd425('0xa')][_0x44c5e4[_0xd425('0x4a')]];delete this['channels'][_0x44c5e4['origtransfereruniqueid']];}}}catch(_0x307e9a){logger[_0xd425('0x37')](_0xd425('0x4b'),_0x307e9a[_0xd425('0x38')]);}};Acw[_0xd425('0x1c')][_0xd425('0x16')]=function(_0x28d1ec){try{if(this[_0xd425('0xa')][_0x28d1ec[_0xd425('0x4c')]]){logger[_0xd425('0x26')](_0xd425('0x4d'),JSON[_0xd425('0x3d')](_0x28d1ec[_0xd425('0x4c')]));this[_0xd425('0x1d')](_0x28d1ec['transfereruniqueid']);}else if(this[_0xd425('0xa')][_0x28d1ec[_0xd425('0x4e')]]){logger[_0xd425('0x26')]('[%s][BLINDTRANSFER:LINKEDID]',JSON['stringify'](_0x28d1ec['transfererlinkedid']));this[_0xd425('0x1d')](_0x28d1ec[_0xd425('0x4e')]);}}catch(_0x27c60e){logger['error'](_0xd425('0x4f'),_0x27c60e['message']);}};Acw[_0xd425('0x1c')][_0xd425('0x12')]=function(_0x21d26e){try{if(this['voiceQueues'][_0x21d26e[_0xd425('0x1f')]]&&this[_0xd425('0x7')][_0x21d26e[_0xd425('0x1f')]][_0xd425('0x50')]===_0xd425('0x51')){if(this[_0xd425('0x8')][_0x21d26e[_0xd425('0x1e')]]){logger[_0xd425('0x26')](_0xd425('0x52'),_0x21d26e[_0xd425('0x33')],_0x21d26e[_0xd425('0x1e')],_0x21d26e[_0xd425('0x1f')]);return RpcUser[_0xd425('0x2a')](this[_0xd425('0x8')][_0x21d26e[_0xd425('0x1e')]],_0xd425('0x53'),_0x21d26e[_0xd425('0x33')]);}}}catch(_0x25cae6){logger['error']('[ACW][syncAgentRingNoAnswer]\x20%s',_0x25cae6[_0xd425('0x38')]);}};module['exports']=Acw;
\ No newline at end of file
diff --git a/server/services/ami/ami.js b/server/services/ami/ami.js
index f575c16..64168aa 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 _0xdf60=['Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','port','inspect','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','sipshowregistry','devicestatelist','actionSipPeerStatus','sippeerstatus','actionQueueSummary','queuesummary','actionCoreShowChannels','coreshowchannels','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','connect','shutdown','info','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','actionDeviceStateList','log','asterisk-manager','bluebird','util','lodash','../../config/logger','asterisk','username','password','keepConnected','Action','promisify','error','format'];(function(_0x3a68c3,_0x228f50){var _0x1b1191=function(_0x208220){while(--_0x208220){_0x3a68c3['push'](_0x3a68c3['shift']());}};_0x1b1191(++_0x228f50);}(_0xdf60,0x8f));var _0x0df6=function(_0x4132ff,_0xac73b){_0x4132ff=_0x4132ff-0x0;var _0x5d9e71=_0xdf60[_0x4132ff];return _0x5d9e71;};'use strict';var Manager=require(_0x0df6('0x0'));var BPromise=require(_0x0df6('0x1'));var moment=require('moment');var util=require(_0x0df6('0x2'));var _=require(_0x0df6('0x3'));var logger=require(_0x0df6('0x4'))('ami');var config=require('../../config/environment');var ami=new Manager(config[_0x0df6('0x5')]['port'],config['asterisk']['ip'],config[_0x0df6('0x5')][_0x0df6('0x6')],config['asterisk'][_0x0df6('0x7')],!![]);ami[_0x0df6('0x8')]();ami[_0x0df6('0x9')]=BPromise[_0x0df6('0xa')](ami['action']);function error(_0x2cbbe6){logger[_0x0df6('0xb')](util[_0x0df6('0xc')](_0x0df6('0xd'),config[_0x0df6('0x5')][_0x0df6('0x6')],config['asterisk']['ip'],config[_0x0df6('0x5')][_0x0df6('0xe')],util[_0x0df6('0xf')](_0x2cbbe6,![],null)));}function close(){logger[_0x0df6('0xb')](util[_0x0df6('0xc')](_0x0df6('0x10'),config[_0x0df6('0x5')][_0x0df6('0x6')],config[_0x0df6('0x5')]['ip'],config[_0x0df6('0x5')][_0x0df6('0xe')]));}ami[_0x0df6('0x11')]=function(){return function(){return ami[_0x0df6('0x9')]({'action':_0x0df6('0x12')});};};ami['actionDeviceStateList']=function(){return function(){return ami[_0x0df6('0x9')]({'action':_0x0df6('0x13')});};};ami[_0x0df6('0x14')]=function(){return function(){return ami[_0x0df6('0x9')]({'action':_0x0df6('0x15')});};};ami[_0x0df6('0x16')]=function(){return function(){return ami['Action']({'action':_0x0df6('0x17')});};};ami[_0x0df6('0x18')]=function(){return function(){return ami[_0x0df6('0x9')]({'action':_0x0df6('0x19')});};};function connect(_0x4d1539){logger['info'](util[_0x0df6('0xc')](_0x0df6('0x1a'),config['asterisk'][_0x0df6('0x6')],config[_0x0df6('0x5')]['ip'],config[_0x0df6('0x5')][_0x0df6('0xe')]));ami[_0x0df6('0x1b')](_0x0df6('0xb'),error);ami[_0x0df6('0x1b')](_0x0df6('0x1c'),close);}ami['on'](_0x0df6('0x1d'),connect);ami['on'](_0x0df6('0x1e'),function(_0x3730ce){logger[_0x0df6('0x1f')](util[_0x0df6('0xc')](_0x0df6('0x20'),config[_0x0df6('0x5')][_0x0df6('0x6')],config[_0x0df6('0x5')]['ip'],config[_0x0df6('0x5')]['port'],util[_0x0df6('0xf')](_0x3730ce,![],null)));});ami['on'](_0x0df6('0x21'),function(_0x2a0fbf){logger[_0x0df6('0x1f')](util['format'](_0x0df6('0x22'),config[_0x0df6('0x5')][_0x0df6('0x6')],config[_0x0df6('0x5')]['ip'],config[_0x0df6('0x5')][_0x0df6('0xe')]));return BPromise[_0x0df6('0x23')]()[_0x0df6('0x24')](ami['actionSipShowRegistry']())[_0x0df6('0x24')](ami[_0x0df6('0x25')]())[_0x0df6('0x24')](ami[_0x0df6('0x14')]())[_0x0df6('0x24')](ami[_0x0df6('0x16')]())[_0x0df6('0x24')](ami[_0x0df6('0x18')]())['catch'](function(_0x50b8a3){console[_0x0df6('0x26')](_0x50b8a3);});});ami[_0x0df6('0x1b')](_0x0df6('0xb'),error);ami['once']('close',close);module['exports']=ami;
\ No newline at end of file
+var _0x684e=['Action','sipshowregistry','actionDeviceStateList','devicestatelist','actionSipPeerStatus','queuesummary','actionCoreShowChannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','actionQueueSummary','catch','log','exports','asterisk-manager','bluebird','moment','util','lodash','../../config/logger','../../config/environment','asterisk','port','username','password','keepConnected','error','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry'];(function(_0x35a8ad,_0x3b03f8){var _0x10ef61=function(_0xa8a94d){while(--_0xa8a94d){_0x35a8ad['push'](_0x35a8ad['shift']());}};_0x10ef61(++_0x3b03f8);}(_0x684e,0x1a6));var _0xe684=function(_0x4f98bd,_0x223ff3){_0x4f98bd=_0x4f98bd-0x0;var _0x54fcdb=_0x684e[_0x4f98bd];return _0x54fcdb;};'use strict';var Manager=require(_0xe684('0x0'));var BPromise=require(_0xe684('0x1'));var moment=require(_0xe684('0x2'));var util=require(_0xe684('0x3'));var _=require(_0xe684('0x4'));var logger=require(_0xe684('0x5'))('ami');var config=require(_0xe684('0x6'));var ami=new Manager(config[_0xe684('0x7')][_0xe684('0x8')],config[_0xe684('0x7')]['ip'],config['asterisk'][_0xe684('0x9')],config[_0xe684('0x7')][_0xe684('0xa')],!![]);ami[_0xe684('0xb')]();ami['Action']=BPromise['promisify'](ami['action']);function error(_0x42212a){logger[_0xe684('0xc')](util[_0xe684('0xd')](_0xe684('0xe'),config[_0xe684('0x7')][_0xe684('0x9')],config[_0xe684('0x7')]['ip'],config['asterisk'][_0xe684('0x8')],util[_0xe684('0xf')](_0x42212a,![],null)));}function close(){logger[_0xe684('0xc')](util[_0xe684('0xd')](_0xe684('0x10'),config['asterisk']['username'],config[_0xe684('0x7')]['ip'],config[_0xe684('0x7')][_0xe684('0x8')]));}ami[_0xe684('0x11')]=function(){return function(){return ami[_0xe684('0x12')]({'action':_0xe684('0x13')});};};ami[_0xe684('0x14')]=function(){return function(){return ami['Action']({'action':_0xe684('0x15')});};};ami[_0xe684('0x16')]=function(){return function(){return ami['Action']({'action':'sippeerstatus'});};};ami['actionQueueSummary']=function(){return function(){return ami['Action']({'action':_0xe684('0x17')});};};ami[_0xe684('0x18')]=function(){return function(){return ami['Action']({'action':'coreshowchannels'});};};function connect(_0x24b14e){logger[_0xe684('0x19')](util[_0xe684('0xd')](_0xe684('0x1a'),config[_0xe684('0x7')][_0xe684('0x9')],config[_0xe684('0x7')]['ip'],config['asterisk'][_0xe684('0x8')]));ami[_0xe684('0x1b')]('error',error);ami['once'](_0xe684('0x1c'),close);}ami['on'](_0xe684('0x1d'),connect);ami['on'](_0xe684('0x1e'),function(_0x5cd83a){logger['info'](util['format'](_0xe684('0x1f'),config[_0xe684('0x7')][_0xe684('0x9')],config[_0xe684('0x7')]['ip'],config[_0xe684('0x7')][_0xe684('0x8')],util[_0xe684('0xf')](_0x5cd83a,![],null)));});ami['on'](_0xe684('0x20'),function(_0x1399ec){logger['info'](util[_0xe684('0xd')](_0xe684('0x21'),config[_0xe684('0x7')][_0xe684('0x9')],config['asterisk']['ip'],config[_0xe684('0x7')][_0xe684('0x8')]));return BPromise[_0xe684('0x22')]()['then'](ami['actionSipShowRegistry']())[_0xe684('0x23')](ami['actionDeviceStateList']())[_0xe684('0x23')](ami[_0xe684('0x16')]())[_0xe684('0x23')](ami[_0xe684('0x24')]())[_0xe684('0x23')](ami['actionCoreShowChannels']())[_0xe684('0x25')](function(_0x3e19ed){console[_0xe684('0x26')](_0x3e19ed);});});ami[_0xe684('0x1b')]('error',error);ami[_0xe684('0x1b')](_0xe684('0x1c'),close);module[_0xe684('0x27')]=ami;
\ No newline at end of file
diff --git a/server/services/ami/client.js b/server/services/ami/client.js
index 669efb9..a00a987 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 _0x3f68=['Request','request','debug','rpc','memberReport','error','message','result','catch','exports','bluebird','../../config/logger','ami'];(function(_0x49b207,_0x408ade){var _0x2dc8fa=function(_0x150975){while(--_0x150975){_0x49b207['push'](_0x49b207['shift']());}};_0x2dc8fa(++_0x408ade);}(_0x3f68,0x190));var _0x83f6=function(_0x54fe03,_0x3b0d89){_0x54fe03=_0x54fe03-0x0;var _0x3a1f59=_0x3f68[_0x54fe03];return _0x3a1f59;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0x83f6('0x0'));var logger=require(_0x83f6('0x1'))(_0x83f6('0x2'));var client=jayson['client']['http']({'port':0x2329});client[_0x83f6('0x3')]=function(_0x21a41c,_0x43077b){return new BPromise(function(_0x1af2b4,_0x4a36d2){return client[_0x83f6('0x4')](_0x21a41c,_0x43077b)['then'](function(_0x17db0d){logger[_0x83f6('0x5')](_0x83f6('0x6'),_0x83f6('0x7'),_0x21a41c,_0x43077b,_0x17db0d);if(_0x17db0d[_0x83f6('0x8')]){logger[_0x83f6('0x8')](_0x83f6('0x6'),_0x83f6('0x7'),_0x21a41c,_0x17db0d[_0x83f6('0x8')][_0x83f6('0x9')],_0x43077b);return _0x4a36d2(_0x17db0d['error'][_0x83f6('0x9')]);}else{return _0x1af2b4(_0x17db0d[_0x83f6('0xa')]);}})[_0x83f6('0xb')](function(_0x28dd29){logger['error']('rpc',_0x83f6('0x7'),_0x21a41c,_0x28dd29,_0x43077b);return _0x4a36d2(_0x28dd29);});});};module[_0x83f6('0xc')]=client;
\ No newline at end of file
+var _0xf135=['jayson/promise','bluebird','../../config/logger','ami','client','Request','request','then','debug','rpc','memberReport','error','message','exports'];(function(_0x1fe138,_0x1c33d4){var _0x2ef18c=function(_0x333764){while(--_0x333764){_0x1fe138['push'](_0x1fe138['shift']());}};_0x2ef18c(++_0x1c33d4);}(_0xf135,0x17a));var _0x5f13=function(_0x2e90ce,_0x3bcb4c){_0x2e90ce=_0x2e90ce-0x0;var _0x5cd2db=_0xf135[_0x2e90ce];return _0x5cd2db;};'use strict';var jayson=require(_0x5f13('0x0'));var BPromise=require(_0x5f13('0x1'));var logger=require(_0x5f13('0x2'))(_0x5f13('0x3'));var client=jayson[_0x5f13('0x4')]['http']({'port':0x2329});client[_0x5f13('0x5')]=function(_0x542d6e,_0x4dfd94){return new BPromise(function(_0xc4677c,_0x386185){return client[_0x5f13('0x6')](_0x542d6e,_0x4dfd94)[_0x5f13('0x7')](function(_0x38c87b){logger[_0x5f13('0x8')](_0x5f13('0x9'),_0x5f13('0xa'),_0x542d6e,_0x4dfd94,_0x38c87b);if(_0x38c87b[_0x5f13('0xb')]){logger['error'](_0x5f13('0x9'),_0x5f13('0xa'),_0x542d6e,_0x38c87b[_0x5f13('0xb')]['message'],_0x4dfd94);return _0x386185(_0x38c87b['error'][_0x5f13('0xc')]);}else{return _0xc4677c(_0x38c87b['result']);}})['catch'](function(_0x9fda85){logger[_0x5f13('0xb')](_0x5f13('0x9'),_0x5f13('0xa'),_0x542d6e,_0x9fda85,_0x4dfd94);return _0x386185(_0x9fda85);});});};module[_0x5f13('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 4807932..9f3eefb 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 _0xf78d=['Contact','lastName','number','queue','name','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','VoiceQueueId','CampaignId','idHopper','firstName','starttime','format','callback','callbackat','recallme','originatecalleridnum','originatecalleridname','prototype','getCaller','\x22%s\x22\x20<%s>','dialCutDigit','substring','exports','lodash','moment','isNil','string','voiceQueue','uniqueid','phone'];(function(_0x5f0898,_0x580e12){var _0x13ea3b=function(_0x1349a7){while(--_0x1349a7){_0x5f0898['push'](_0x5f0898['shift']());}};_0x13ea3b(++_0x580e12);}(_0xf78d,0x1c7));var _0xdf78=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf78d[_0x3dd15e];return _0x231fd0;};'use strict';var util=require('util');var _=require(_0xdf78('0x0'));var moment=require(_0xdf78('0x1'));function checkNameSurname(_0x11e263,_0x38adcd,_0x226bb5){var _0x1258ad='';if(!_['isNil'](_0x38adcd)&&'string'===typeof _0x38adcd){_0x1258ad+=_0x38adcd;}if(!_[_0xdf78('0x2')](_0x226bb5)&&_0xdf78('0x3')===typeof _0x226bb5){_0x1258ad+='\x20'+_0x226bb5;}if(_0x1258ad!==''){return _0x1258ad;}return _0x11e263;}function Action(_0xd532b1,_0xee00d9,_0x22d3d3){this[_0xdf78('0x4')]=_0xd532b1;this[_0xdf78('0x5')]=_0x22d3d3||undefined;this['name']=checkNameSurname(_0xee00d9['Contact'][_0xdf78('0x6')],_0xee00d9[_0xdf78('0x7')]['firstName'],_0xee00d9[_0xdf78('0x7')][_0xdf78('0x8')]);this[_0xdf78('0x9')]=_0xee00d9[_0xdf78('0x7')][_0xdf78('0x6')];this[_0xdf78('0xa')]=_0xd532b1[_0xdf78('0xb')];this[_0xdf78('0xc')]=_0xee00d9[_0xdf78('0xc')]||![];this[_0xdf78('0xd')]=_0xd532b1['type'];this[_0xdf78('0xe')]=_0xd532b1['dialQueueTimeout']||0x3;this[_0xdf78('0xf')]=_0xee00d9[_0xdf78('0xf')];this[_0xdf78('0x10')]=_0xee00d9[_0xdf78('0x10')];this[_0xdf78('0x11')]=_0xee00d9[_0xdf78('0x11')];this['countnoanswerretry']=_0xee00d9['countnoanswerretry'];this[_0xdf78('0x12')]=_0xee00d9[_0xdf78('0x12')];this[_0xdf78('0x13')]=_0xee00d9[_0xdf78('0x13')];this[_0xdf78('0x14')]=_0xee00d9[_0xdf78('0x14')];this['countmachineretry']=_0xee00d9[_0xdf78('0x15')];this[_0xdf78('0x16')]=_0xee00d9[_0xdf78('0x16')];this[_0xdf78('0x17')]=_0xee00d9[_0xdf78('0x17')];this[_0xdf78('0x18')]=_0xee00d9['ListId'];this['UserId']=_0xee00d9['UserId'];this[_0xdf78('0x19')]=_0xee00d9[_0xdf78('0x19')];this[_0xdf78('0x1a')]=_0xee00d9[_0xdf78('0x1a')];this[_0xdf78('0x1b')]=_0xee00d9['id'];this['ContactFirstName']=_0xee00d9[_0xdf78('0x7')][_0xdf78('0x1c')]||'';this[_0xdf78('0x1d')]=moment()[_0xdf78('0x1e')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xdf78('0x1f')]=_0xee00d9[_0xdf78('0x1f')];this['callbackuniqueid']=_0xee00d9['callbackuniqueid'];this[_0xdf78('0x20')]=_0xee00d9[_0xdf78('0x20')];this['recallme']=_0xee00d9[_0xdf78('0x21')];this[_0xdf78('0x22')]='';this[_0xdf78('0x23')]='';}Action[_0xdf78('0x24')][_0xdf78('0x25')]=function(){return util[_0xdf78('0x1e')](_0xdf78('0x26'),this['name'],this[_0xdf78('0x4')][_0xdf78('0x27')]>0x0?this[_0xdf78('0x9')][_0xdf78('0x28')](this['voiceQueue'][_0xdf78('0x27')]):this[_0xdf78('0x9')]);};Action[_0xdf78('0x24')]['getQueue']=function(){return this[_0xdf78('0xa')];};module[_0xdf78('0x29')]=Action;
\ No newline at end of file
+var _0x6b24=['countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','idHopper','ContactFirstName','starttime','format','YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid','callbackat','recallme','originatecalleridname','\x22%s\x22\x20<%s>','voiceQueue','dialCutDigit','substring','getQueue','exports','lodash','moment','string','uniqueid','name','Contact','phone','firstName','lastName','number','queue','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry'];(function(_0x1c72b8,_0x104b7e){var _0x191114=function(_0x5d76da){while(--_0x5d76da){_0x1c72b8['push'](_0x1c72b8['shift']());}};_0x191114(++_0x104b7e);}(_0x6b24,0x1ce));var _0x46b2=function(_0x22e47a,_0x4ea10c){_0x22e47a=_0x22e47a-0x0;var _0x15a12a=_0x6b24[_0x22e47a];return _0x15a12a;};'use strict';var util=require('util');var _=require(_0x46b2('0x0'));var moment=require(_0x46b2('0x1'));function checkNameSurname(_0x87e10b,_0x3eeaae,_0x4afaba){var _0x529a0c='';if(!_['isNil'](_0x3eeaae)&&_0x46b2('0x2')===typeof _0x3eeaae){_0x529a0c+=_0x3eeaae;}if(!_['isNil'](_0x4afaba)&&_0x46b2('0x2')===typeof _0x4afaba){_0x529a0c+='\x20'+_0x4afaba;}if(_0x529a0c!==''){return _0x529a0c;}return _0x87e10b;}function Action(_0x49d2b5,_0x2e5227,_0x5598df){this['voiceQueue']=_0x49d2b5;this[_0x46b2('0x3')]=_0x5598df||undefined;this[_0x46b2('0x4')]=checkNameSurname(_0x2e5227[_0x46b2('0x5')][_0x46b2('0x6')],_0x2e5227[_0x46b2('0x5')][_0x46b2('0x7')],_0x2e5227[_0x46b2('0x5')][_0x46b2('0x8')]);this[_0x46b2('0x9')]=_0x2e5227['Contact']['phone'];this[_0x46b2('0xa')]=_0x49d2b5[_0x46b2('0x4')];this[_0x46b2('0xb')]=_0x2e5227['active']||![];this[_0x46b2('0xc')]=_0x49d2b5[_0x46b2('0xc')];this[_0x46b2('0xd')]=_0x49d2b5['dialQueueTimeout']||0x3;this[_0x46b2('0xe')]=_0x2e5227[_0x46b2('0xe')];this[_0x46b2('0xf')]=_0x2e5227[_0x46b2('0xf')];this[_0x46b2('0x10')]=_0x2e5227[_0x46b2('0x10')];this[_0x46b2('0x11')]=_0x2e5227[_0x46b2('0x11')];this[_0x46b2('0x12')]=_0x2e5227[_0x46b2('0x12')];this['countdropretry']=_0x2e5227[_0x46b2('0x13')];this[_0x46b2('0x14')]=_0x2e5227['countabandonedretry'];this[_0x46b2('0x15')]=_0x2e5227[_0x46b2('0x15')];this[_0x46b2('0x16')]=_0x2e5227[_0x46b2('0x16')];this[_0x46b2('0x17')]=_0x2e5227[_0x46b2('0x17')];this[_0x46b2('0x18')]=_0x2e5227['ListId'];this[_0x46b2('0x19')]=_0x2e5227['UserId'];this[_0x46b2('0x1a')]=_0x2e5227[_0x46b2('0x1a')];this[_0x46b2('0x1b')]=_0x2e5227['CampaignId'];this[_0x46b2('0x1c')]=_0x2e5227['id'];this[_0x46b2('0x1d')]=_0x2e5227[_0x46b2('0x5')][_0x46b2('0x7')]||'';this[_0x46b2('0x1e')]=moment()[_0x46b2('0x1f')](_0x46b2('0x20'));this[_0x46b2('0x21')]=_0x2e5227[_0x46b2('0x21')];this[_0x46b2('0x22')]=_0x2e5227[_0x46b2('0x22')];this[_0x46b2('0x23')]=_0x2e5227[_0x46b2('0x23')];this[_0x46b2('0x24')]=_0x2e5227[_0x46b2('0x24')];this['originatecalleridnum']='';this[_0x46b2('0x25')]='';}Action['prototype']['getCaller']=function(){return util[_0x46b2('0x1f')](_0x46b2('0x26'),this[_0x46b2('0x4')],this[_0x46b2('0x27')][_0x46b2('0x28')]>0x0?this['number'][_0x46b2('0x29')](this[_0x46b2('0x27')]['dialCutDigit']):this[_0x46b2('0x9')]);};Action['prototype'][_0x46b2('0x2a')]=function(){return this[_0x46b2('0xa')];};module[_0x46b2('0x2b')]=Action;
\ No newline at end of file
diff --git a/server/services/ami/dialer/agentComplete.js b/server/services/ami/dialer/agentComplete.js
index 507d33a..4e4cd61 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 _0xcb12=['YYYY-MM-DD\x20HH:mm:ss','ringtime','talktime','queue','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countabandonedretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','answertime','endtime','format'];(function(_0x4ce761,_0x5452f1){var _0x35031b=function(_0xfe044a){while(--_0xfe044a){_0x4ce761['push'](_0x4ce761['shift']());}};_0x35031b(++_0x5452f1);}(_0xcb12,0x106));var _0x2cb1=function(_0x377447,_0x249a3b){_0x377447=_0x377447-0x0;var _0x2098e5=_0xcb12[_0x377447];return _0x2098e5;};'use strict';var util=require(_0x2cb1('0x0'));var _=require(_0x2cb1('0x1'));var moment=require(_0x2cb1('0x2'));function getSeconds(_0x21e85c,_0x20a254){var _0x52dcb6=moment(_0x21e85c)[_0x2cb1('0x3')](0x0);var _0x27de19=moment(_0x20a254)[_0x2cb1('0x3')](0x0);return _0x52dcb6[_0x2cb1('0x4')](_0x27de19,_0x2cb1('0x5'));}function AgentComplete(_0x25fc1a,_0x1ae87c){this[_0x2cb1('0x6')]=0x4;this[_0x2cb1('0x7')]=_0x2cb1('0x8');this[_0x2cb1('0x9')]=_0x25fc1a[_0x2cb1('0x9')];this[_0x2cb1('0xa')]=_0x25fc1a[_0x2cb1('0xa')];this[_0x2cb1('0xb')]=_0x25fc1a[_0x2cb1('0xa')]===_0x2cb1('0xc')?'queue':_0x25fc1a[_0x2cb1('0xa')];this[_0x2cb1('0xd')]=_0x25fc1a['countbusyretry'];this[_0x2cb1('0xe')]=_0x25fc1a[_0x2cb1('0xe')];this[_0x2cb1('0xf')]=_0x25fc1a[_0x2cb1('0xf')];this[_0x2cb1('0x10')]=_0x25fc1a[_0x2cb1('0xd')]+_0x25fc1a[_0x2cb1('0xe')]+_0x25fc1a['countnoanswerretry']+_0x25fc1a['countnosuchnumberretry']+_0x25fc1a[_0x2cb1('0x11')]+_0x25fc1a['countabandonedretry']+_0x25fc1a[_0x2cb1('0x12')]+_0x25fc1a[_0x2cb1('0x13')];this['countnosuchnumberretry']=_0x25fc1a[_0x2cb1('0x14')];this[_0x2cb1('0x11')]=_0x25fc1a['countdropretry'];this[_0x2cb1('0x15')]=_0x25fc1a[_0x2cb1('0x15')];this[_0x2cb1('0x12')]=_0x25fc1a['countmachineretry'];this[_0x2cb1('0x13')]=_0x25fc1a[_0x2cb1('0x13')];this[_0x2cb1('0x16')]=_0x1ae87c[_0x2cb1('0x16')];this[_0x2cb1('0x17')]=_0x25fc1a[_0x2cb1('0x18')];this[_0x2cb1('0x19')]=_0x25fc1a[_0x2cb1('0x1a')];this[_0x2cb1('0x1b')]=_0x25fc1a[_0x2cb1('0x1b')];this[_0x2cb1('0x1c')]=_0x25fc1a[_0x2cb1('0x1c')];this[_0x2cb1('0x1d')]=_0x25fc1a[_0x2cb1('0x1d')];this[_0x2cb1('0x1e')]=moment()[_0x2cb1('0x1f')](_0x2cb1('0x20'));this[_0x2cb1('0x21')]=getSeconds(_0x25fc1a[_0x2cb1('0x1c')],_0x25fc1a[_0x2cb1('0x1b')]);this['holdtime']=getSeconds(_0x25fc1a['answertime'],_0x25fc1a['responsetime']);this[_0x2cb1('0x22')]=getSeconds(this['endtime'],_0x25fc1a[_0x2cb1('0x1d')]);this[_0x2cb1('0x23')]=_0x1ae87c[_0x2cb1('0x23')];this[_0x2cb1('0x24')]=_0x1ae87c[_0x2cb1('0x24')];this['reason']=_0x1ae87c[_0x2cb1('0x25')];this['callback']=_0x25fc1a[_0x2cb1('0x26')];this[_0x2cb1('0x27')]=_0x25fc1a[_0x2cb1('0x27')];this[_0x2cb1('0x28')]=_0x25fc1a['callbackat'];this[_0x2cb1('0x29')]=_0x25fc1a[_0x2cb1('0x29')];this[_0x2cb1('0x2a')]=_0x25fc1a[_0x2cb1('0x2a')];this['ListId']=_0x25fc1a[_0x2cb1('0x2b')];this[_0x2cb1('0x2c')]=_0x25fc1a[_0x2cb1('0x2c')];this['VoiceQueueId']=_0x25fc1a['VoiceQueueId'];this[_0x2cb1('0x2d')]=_0x25fc1a[_0x2cb1('0x2d')];this[_0x2cb1('0x2e')]=_0x25fc1a['originatecalleridnum']||'';this[_0x2cb1('0x2f')]=_0x25fc1a['originatecalleridname']||'';}module[_0x2cb1('0x30')]=AgentComplete;
\ No newline at end of file
+var _0x0fd4=['Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','responsetime','answertime','YYYY-MM-DD\x20HH:mm:ss','ringtime','starttime','holdtime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','state','statedesc'];(function(_0x4d4223,_0x325b3b){var _0x2f5cd7=function(_0x1c7ec2){while(--_0x1c7ec2){_0x4d4223['push'](_0x4d4223['shift']());}};_0x2f5cd7(++_0x325b3b);}(_0x0fd4,0x148));var _0x40fd=function(_0x416cdc,_0x213b87){_0x416cdc=_0x416cdc-0x0;var _0x1931ce=_0x0fd4[_0x416cdc];return _0x1931ce;};'use strict';var util=require(_0x40fd('0x0'));var _=require(_0x40fd('0x1'));var moment=require(_0x40fd('0x2'));function getSeconds(_0x1387aa,_0x4184db){var _0x3e0e84=moment(_0x1387aa)[_0x40fd('0x3')](0x0);var _0x4801a9=moment(_0x4184db)[_0x40fd('0x3')](0x0);return _0x3e0e84[_0x40fd('0x4')](_0x4801a9,_0x40fd('0x5'));}function AgentComplete(_0x2f0309,_0x137ff8){this[_0x40fd('0x6')]=0x4;this[_0x40fd('0x7')]=_0x40fd('0x8');this[_0x40fd('0x9')]=_0x2f0309[_0x40fd('0x9')];this['type']=_0x2f0309[_0x40fd('0xa')];this[_0x40fd('0xb')]=_0x2f0309[_0x40fd('0xa')]===_0x40fd('0xc')?_0x40fd('0xd'):_0x2f0309['type'];this[_0x40fd('0xe')]=_0x2f0309[_0x40fd('0xe')];this['countcongestionretry']=_0x2f0309[_0x40fd('0xf')];this[_0x40fd('0x10')]=_0x2f0309['countnoanswerretry'];this[_0x40fd('0x11')]=_0x2f0309[_0x40fd('0xe')]+_0x2f0309[_0x40fd('0xf')]+_0x2f0309[_0x40fd('0x10')]+_0x2f0309[_0x40fd('0x12')]+_0x2f0309[_0x40fd('0x13')]+_0x2f0309[_0x40fd('0x14')]+_0x2f0309[_0x40fd('0x15')]+_0x2f0309[_0x40fd('0x16')];this[_0x40fd('0x12')]=_0x2f0309[_0x40fd('0x12')];this[_0x40fd('0x13')]=_0x2f0309[_0x40fd('0x13')];this[_0x40fd('0x14')]=_0x2f0309[_0x40fd('0x14')];this[_0x40fd('0x15')]=_0x2f0309[_0x40fd('0x15')];this['countagentrejectretry']=_0x2f0309[_0x40fd('0x16')];this[_0x40fd('0x17')]=_0x137ff8[_0x40fd('0x17')];this[_0x40fd('0x18')]=_0x2f0309[_0x40fd('0x19')];this[_0x40fd('0x1a')]=_0x2f0309[_0x40fd('0x1b')];this['starttime']=_0x2f0309['starttime'];this['responsetime']=_0x2f0309[_0x40fd('0x1c')];this['answertime']=_0x2f0309[_0x40fd('0x1d')];this['endtime']=moment()['format'](_0x40fd('0x1e'));this[_0x40fd('0x1f')]=getSeconds(_0x2f0309[_0x40fd('0x1c')],_0x2f0309[_0x40fd('0x20')]);this[_0x40fd('0x21')]=getSeconds(_0x2f0309[_0x40fd('0x1d')],_0x2f0309[_0x40fd('0x1c')]);this['talktime']=getSeconds(this['endtime'],_0x2f0309[_0x40fd('0x1d')]);this[_0x40fd('0xd')]=_0x137ff8[_0x40fd('0xd')];this['membername']=_0x137ff8[_0x40fd('0x22')];this[_0x40fd('0x23')]=_0x137ff8[_0x40fd('0x23')];this[_0x40fd('0x24')]=_0x2f0309[_0x40fd('0x24')];this[_0x40fd('0x25')]=_0x2f0309[_0x40fd('0x25')];this[_0x40fd('0x26')]=_0x2f0309[_0x40fd('0x26')];this[_0x40fd('0x27')]=_0x2f0309['recallme'];this['ContactId']=_0x2f0309[_0x40fd('0x28')];this[_0x40fd('0x29')]=_0x2f0309[_0x40fd('0x29')];this[_0x40fd('0x2a')]=_0x2f0309['UserId'];this['VoiceQueueId']=_0x2f0309[_0x40fd('0x2b')];this[_0x40fd('0x2c')]=_0x2f0309['CampaignId'];this['originatecalleridnum']=_0x2f0309[_0x40fd('0x2d')]||'';this[_0x40fd('0x2e')]=_0x2f0309['originatecalleridname']||'';}module[_0x40fd('0x2f')]=AgentComplete;
\ No newline at end of file
diff --git a/server/services/ami/dialer/final.js b/server/services/ami/dialer/final.js
index d78d9b7..d45f38b 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 _0xfa09=['ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','callback','callbackuniqueid','recallme','ContactId'];(function(_0x4c9285,_0x311815){var _0x81d0db=function(_0x14ea49){while(--_0x14ea49){_0x4c9285['push'](_0x4c9285['shift']());}};_0x81d0db(++_0x311815);}(_0xfa09,0x1c3));var _0x9fa0=function(_0x9ebc1b,_0x2823d0){_0x9ebc1b=_0x9ebc1b-0x0;var _0x1dd2b9=_0xfa09[_0x9ebc1b];return _0x1dd2b9;};'use strict';var util=require('util');var _=require(_0x9fa0('0x0'));var moment=require('moment');function getSeconds(_0x412c9f,_0x353b6e){var _0x27f778=moment(_0x412c9f)[_0x9fa0('0x1')](0x0);var _0x3ae57c=moment(_0x353b6e)[_0x9fa0('0x1')](0x0);return _0x27f778[_0x9fa0('0x2')](_0x3ae57c,_0x9fa0('0x3'));}function Final(_0x2b9e23){this[_0x9fa0('0x4')]=_0x2b9e23[_0x9fa0('0x4')];this[_0x9fa0('0x5')]=_0x2b9e23[_0x9fa0('0x5')];this[_0x9fa0('0x6')]=_0x2b9e23[_0x9fa0('0x6')];this[_0x9fa0('0x7')]=_0x2b9e23[_0x9fa0('0x6')]===_0x9fa0('0x8')?_0x9fa0('0x9'):_0x2b9e23[_0x9fa0('0x6')];this['countbusyretry']=_0x2b9e23[_0x9fa0('0xa')];this['countcongestionretry']=_0x2b9e23[_0x9fa0('0xb')];this[_0x9fa0('0xc')]=_0x2b9e23[_0x9fa0('0xc')];this[_0x9fa0('0xd')]=_0x2b9e23[_0x9fa0('0xa')]+_0x2b9e23[_0x9fa0('0xb')]+_0x2b9e23[_0x9fa0('0xc')]+_0x2b9e23[_0x9fa0('0xe')]+_0x2b9e23[_0x9fa0('0xf')]+_0x2b9e23[_0x9fa0('0x10')]+_0x2b9e23[_0x9fa0('0x11')]+_0x2b9e23[_0x9fa0('0x12')];this[_0x9fa0('0xe')]=_0x2b9e23[_0x9fa0('0xe')];this[_0x9fa0('0xf')]=_0x2b9e23[_0x9fa0('0xf')];this['countabandonedretry']=_0x2b9e23[_0x9fa0('0x10')];this[_0x9fa0('0x11')]=_0x2b9e23[_0x9fa0('0x11')];this[_0x9fa0('0x12')]=_0x2b9e23[_0x9fa0('0x12')];this['queue']=_0x2b9e23['queue'];this[_0x9fa0('0x13')]=_0x2b9e23['calleridname'];this['calleridnum']=_0x2b9e23[_0x9fa0('0x14')];this[_0x9fa0('0x15')]=_0x2b9e23['starttime'];this['responsetime']=_0x2b9e23[_0x9fa0('0x16')];this[_0x9fa0('0x17')]=_0x2b9e23[_0x9fa0('0x16')];this['ringtime']=_0x2b9e23[_0x9fa0('0x18')]||0x0;this['holdtime']=_0x2b9e23[_0x9fa0('0x19')]||0x0;this['talktime']=_0x2b9e23['talktime']||0x0;this[_0x9fa0('0x1a')]=_0x2b9e23[_0x9fa0('0x1a')];this[_0x9fa0('0x1b')]=_0x2b9e23[_0x9fa0('0x1b')];this['callbackat']=_0x2b9e23['callbackat'];this[_0x9fa0('0x1c')]=_0x2b9e23[_0x9fa0('0x1c')];this[_0x9fa0('0x1d')]=_0x2b9e23[_0x9fa0('0x1d')];this['ListId']=_0x2b9e23[_0x9fa0('0x1e')];this[_0x9fa0('0x1f')]=_0x2b9e23['UserId'];this[_0x9fa0('0x20')]=_0x2b9e23[_0x9fa0('0x20')];this['CampaignId']=_0x2b9e23[_0x9fa0('0x21')];this[_0x9fa0('0x22')]=_0x2b9e23[_0x9fa0('0x22')]||'';this[_0x9fa0('0x23')]=_0x2b9e23[_0x9fa0('0x23')]||'';}module[_0x9fa0('0x24')]=Final;
\ No newline at end of file
+var _0xc023=['originatecalleridnum','originatecalleridname','exports','lodash','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridnum','starttime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId'];(function(_0x44bcb0,_0x235aa9){var _0xfaf881=function(_0x25d81d){while(--_0x25d81d){_0x44bcb0['push'](_0x44bcb0['shift']());}};_0xfaf881(++_0x235aa9);}(_0xc023,0x13e));var _0x3c02=function(_0xb12603,_0x142505){_0xb12603=_0xb12603-0x0;var _0x2bdc24=_0xc023[_0xb12603];return _0x2bdc24;};'use strict';var util=require('util');var _=require(_0x3c02('0x0'));var moment=require('moment');function getSeconds(_0x308af5,_0x225667){var _0xebb611=moment(_0x308af5)[_0x3c02('0x1')](0x0);var _0x15099e=moment(_0x225667)[_0x3c02('0x1')](0x0);return _0xebb611['diff'](_0x15099e,_0x3c02('0x2'));}function Final(_0x4a7dd3){this[_0x3c02('0x3')]=_0x4a7dd3['uniqueid'];this[_0x3c02('0x4')]=_0x4a7dd3[_0x3c02('0x4')];this['type']=_0x4a7dd3[_0x3c02('0x5')];this[_0x3c02('0x6')]=_0x4a7dd3['type']==='outbound'?_0x3c02('0x7'):_0x4a7dd3[_0x3c02('0x5')];this[_0x3c02('0x8')]=_0x4a7dd3[_0x3c02('0x8')];this[_0x3c02('0x9')]=_0x4a7dd3[_0x3c02('0x9')];this[_0x3c02('0xa')]=_0x4a7dd3['countnoanswerretry'];this[_0x3c02('0xb')]=_0x4a7dd3['countbusyretry']+_0x4a7dd3['countcongestionretry']+_0x4a7dd3[_0x3c02('0xa')]+_0x4a7dd3[_0x3c02('0xc')]+_0x4a7dd3[_0x3c02('0xd')]+_0x4a7dd3[_0x3c02('0xe')]+_0x4a7dd3[_0x3c02('0xf')]+_0x4a7dd3['countagentrejectretry'];this['countnosuchnumberretry']=_0x4a7dd3[_0x3c02('0xc')];this[_0x3c02('0xd')]=_0x4a7dd3[_0x3c02('0xd')];this[_0x3c02('0xe')]=_0x4a7dd3['countabandonedretry'];this['countmachineretry']=_0x4a7dd3[_0x3c02('0xf')];this[_0x3c02('0x10')]=_0x4a7dd3[_0x3c02('0x10')];this[_0x3c02('0x7')]=_0x4a7dd3['queue'];this['calleridname']=_0x4a7dd3['calleridname'];this['calleridnum']=_0x4a7dd3[_0x3c02('0x11')];this[_0x3c02('0x12')]=_0x4a7dd3['starttime'];this['responsetime']=_0x4a7dd3['responsetime'];this[_0x3c02('0x13')]=_0x4a7dd3['responsetime'];this[_0x3c02('0x14')]=_0x4a7dd3[_0x3c02('0x14')]||0x0;this[_0x3c02('0x15')]=_0x4a7dd3[_0x3c02('0x15')]||0x0;this[_0x3c02('0x16')]=_0x4a7dd3[_0x3c02('0x16')]||0x0;this[_0x3c02('0x17')]=_0x4a7dd3[_0x3c02('0x17')];this[_0x3c02('0x18')]=_0x4a7dd3[_0x3c02('0x18')];this[_0x3c02('0x19')]=_0x4a7dd3['callbackat'];this['recallme']=_0x4a7dd3[_0x3c02('0x1a')];this[_0x3c02('0x1b')]=_0x4a7dd3[_0x3c02('0x1b')];this[_0x3c02('0x1c')]=_0x4a7dd3['ListId'];this[_0x3c02('0x1d')]=_0x4a7dd3[_0x3c02('0x1d')];this[_0x3c02('0x1e')]=_0x4a7dd3[_0x3c02('0x1e')];this[_0x3c02('0x1f')]=_0x4a7dd3[_0x3c02('0x1f')];this['originatecalleridnum']=_0x4a7dd3[_0x3c02('0x20')]||'';this[_0x3c02('0x21')]=_0x4a7dd3[_0x3c02('0x21')]||'';}module[_0x3c02('0x22')]=Final;
\ No newline at end of file
diff --git a/server/services/ami/dialer/hangup.js b/server/services/ami/dialer/hangup.js
index e9ad288..e78ebdc 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 _0x17ad=['countdropretry','countmachineretry','countagentrejectretry','countabandonedretry','uniqueid','calleridname','calleridnum','starttime','format','YYYY-MM-DD\x20HH:mm:ss','holdtime','talktime','responsetime','membername','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','util','lodash','moment','diff','seconds','state','statedesc','Answer','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry'];(function(_0x5c2a2b,_0x22c94e){var _0x19921f=function(_0x3fb937){while(--_0x3fb937){_0x5c2a2b['push'](_0x5c2a2b['shift']());}};_0x19921f(++_0x22c94e);}(_0x17ad,0xe0));var _0xd17a=function(_0x2e8500,_0x385e6d){_0x2e8500=_0x2e8500-0x0;var _0x2f2015=_0x17ad[_0x2e8500];return _0x2f2015;};'use strict';var util=require(_0xd17a('0x0'));var _=require(_0xd17a('0x1'));var moment=require(_0xd17a('0x2'));function getSeconds(_0x1baba8,_0xae8b39){var _0x3fba8f=moment(_0x1baba8)['milliseconds'](0x0);var _0x5e4fd8=moment(_0xae8b39)['milliseconds'](0x0);return _0x3fba8f[_0xd17a('0x3')](_0x5e4fd8,_0xd17a('0x4'));}function Hangup(_0x38b7be,_0x1c49c3){this[_0xd17a('0x5')]=0x4;this[_0xd17a('0x6')]=_0xd17a('0x7');this[_0xd17a('0x8')]=_0x38b7be[_0xd17a('0x8')];this['type']=_0x38b7be[_0xd17a('0x9')];this['campaigntype']=_0x38b7be[_0xd17a('0x9')]===_0xd17a('0xa')?_0xd17a('0xb'):_0x38b7be[_0xd17a('0x9')];this['countbusyretry']=_0x38b7be[_0xd17a('0xc')];this['countcongestionretry']=_0x38b7be[_0xd17a('0xd')];this[_0xd17a('0xe')]=_0x38b7be['countnoanswerretry'];this['countglobal']=_0x38b7be[_0xd17a('0xc')]+_0x38b7be[_0xd17a('0xd')]+_0x38b7be[_0xd17a('0xe')]+_0x38b7be[_0xd17a('0xf')]+_0x38b7be[_0xd17a('0x10')]+_0x38b7be['countabandonedretry']+_0x38b7be[_0xd17a('0x11')]+_0x38b7be[_0xd17a('0x12')];this[_0xd17a('0xf')]=_0x38b7be['countnosuchnumberretry'];this[_0xd17a('0x10')]=_0x38b7be[_0xd17a('0x10')];this[_0xd17a('0x13')]=_0x38b7be[_0xd17a('0x13')];this[_0xd17a('0x11')]=_0x38b7be[_0xd17a('0x11')];this[_0xd17a('0x12')]=_0x38b7be[_0xd17a('0x12')];this[_0xd17a('0x14')]=_0x1c49c3['uniqueid'];this[_0xd17a('0x15')]=_0x38b7be['name'];this[_0xd17a('0x16')]=_0x38b7be['number'];this[_0xd17a('0x17')]=_0x38b7be[_0xd17a('0x17')];this['responsetime']=_0x38b7be['responsetime'];this['endtime']=moment()[_0xd17a('0x18')](_0xd17a('0x19'));this['ringtime']=getSeconds(_0x38b7be['responsetime'],_0x38b7be[_0xd17a('0x17')]);this[_0xd17a('0x1a')]=0x0;this[_0xd17a('0x1b')]=getSeconds(this['endtime'],_0x38b7be[_0xd17a('0x1c')]);this[_0xd17a('0xb')]=_0x38b7be[_0xd17a('0xb')];this[_0xd17a('0x1d')]=_0xd17a('0x1e');this[_0xd17a('0x1f')]=_0x1c49c3[_0xd17a('0x20')];this['callback']=_0x38b7be[_0xd17a('0x21')];this['callbackuniqueid']=_0x38b7be[_0xd17a('0x22')];this[_0xd17a('0x23')]=_0x38b7be['callbackat'];this[_0xd17a('0x24')]=_0x38b7be[_0xd17a('0x24')];this[_0xd17a('0x25')]=_0x38b7be[_0xd17a('0x25')];this['ListId']=_0x38b7be['ListId'];this[_0xd17a('0x26')]=_0x38b7be[_0xd17a('0x26')];this[_0xd17a('0x27')]=_0x38b7be[_0xd17a('0x27')];this['CampaignId']=_0x38b7be['CampaignId'];}module['exports']=Hangup;
\ No newline at end of file
+var _0xacf8=['IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','lodash','moment','milliseconds','diff','seconds','state','scheduledat','campaigntype','type','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','format','YYYY-MM-DD\x20HH:mm:ss','talktime','queue','membername'];(function(_0x26462c,_0xd20a35){var _0x509a42=function(_0x1b22c9){while(--_0x1b22c9){_0x26462c['push'](_0x26462c['shift']());}};_0x509a42(++_0xd20a35);}(_0xacf8,0x186));var _0x8acf=function(_0x77c2b3,_0x3fd965){_0x77c2b3=_0x77c2b3-0x0;var _0x3744de=_0xacf8[_0x77c2b3];return _0x3744de;};'use strict';var util=require('util');var _=require(_0x8acf('0x0'));var moment=require(_0x8acf('0x1'));function getSeconds(_0x1ba3d0,_0x4211da){var _0x1e4f56=moment(_0x1ba3d0)[_0x8acf('0x2')](0x0);var _0x4289b6=moment(_0x4211da)[_0x8acf('0x2')](0x0);return _0x1e4f56[_0x8acf('0x3')](_0x4289b6,_0x8acf('0x4'));}function Hangup(_0x4fbc6d,_0x13d829){this[_0x8acf('0x5')]=0x4;this['statedesc']='Answer';this[_0x8acf('0x6')]=_0x4fbc6d[_0x8acf('0x6')];this['type']=_0x4fbc6d['type'];this[_0x8acf('0x7')]=_0x4fbc6d['type']==='outbound'?'queue':_0x4fbc6d[_0x8acf('0x8')];this[_0x8acf('0x9')]=_0x4fbc6d[_0x8acf('0x9')];this[_0x8acf('0xa')]=_0x4fbc6d[_0x8acf('0xa')];this[_0x8acf('0xb')]=_0x4fbc6d[_0x8acf('0xb')];this[_0x8acf('0xc')]=_0x4fbc6d[_0x8acf('0x9')]+_0x4fbc6d['countcongestionretry']+_0x4fbc6d['countnoanswerretry']+_0x4fbc6d[_0x8acf('0xd')]+_0x4fbc6d[_0x8acf('0xe')]+_0x4fbc6d[_0x8acf('0xf')]+_0x4fbc6d['countmachineretry']+_0x4fbc6d[_0x8acf('0x10')];this[_0x8acf('0xd')]=_0x4fbc6d['countnosuchnumberretry'];this[_0x8acf('0xe')]=_0x4fbc6d[_0x8acf('0xe')];this[_0x8acf('0xf')]=_0x4fbc6d[_0x8acf('0xf')];this[_0x8acf('0x11')]=_0x4fbc6d[_0x8acf('0x11')];this[_0x8acf('0x10')]=_0x4fbc6d[_0x8acf('0x10')];this[_0x8acf('0x12')]=_0x13d829[_0x8acf('0x12')];this[_0x8acf('0x13')]=_0x4fbc6d[_0x8acf('0x14')];this[_0x8acf('0x15')]=_0x4fbc6d[_0x8acf('0x16')];this[_0x8acf('0x17')]=_0x4fbc6d[_0x8acf('0x17')];this['responsetime']=_0x4fbc6d[_0x8acf('0x18')];this['endtime']=moment()[_0x8acf('0x19')](_0x8acf('0x1a'));this['ringtime']=getSeconds(_0x4fbc6d[_0x8acf('0x18')],_0x4fbc6d[_0x8acf('0x17')]);this['holdtime']=0x0;this[_0x8acf('0x1b')]=getSeconds(this['endtime'],_0x4fbc6d[_0x8acf('0x18')]);this['queue']=_0x4fbc6d[_0x8acf('0x1c')];this[_0x8acf('0x1d')]=_0x8acf('0x1e');this[_0x8acf('0x1f')]=_0x13d829[_0x8acf('0x20')];this[_0x8acf('0x21')]=_0x4fbc6d[_0x8acf('0x21')];this[_0x8acf('0x22')]=_0x4fbc6d[_0x8acf('0x22')];this[_0x8acf('0x23')]=_0x4fbc6d[_0x8acf('0x23')];this['recallme']=_0x4fbc6d['recallme'];this[_0x8acf('0x24')]=_0x4fbc6d[_0x8acf('0x24')];this[_0x8acf('0x25')]=_0x4fbc6d[_0x8acf('0x25')];this[_0x8acf('0x26')]=_0x4fbc6d[_0x8acf('0x26')];this[_0x8acf('0x27')]=_0x4fbc6d['VoiceQueueId'];this[_0x8acf('0x28')]=_0x4fbc6d[_0x8acf('0x28')];}module[_0x8acf('0x29')]=Hangup;
\ No newline at end of file
diff --git a/server/services/ami/dialer/history.js b/server/services/ami/dialer/history.js
index 168c94a..c6319a9 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 _0x5c71=['ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countmachineretry','countabandonedretry','countagentrejectretry','name','calleridnum','number','starttime','responsetime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme'];(function(_0x56c407,_0x19b194){var _0x501820=function(_0x5764cf){while(--_0x5764cf){_0x56c407['push'](_0x56c407['shift']());}};_0x501820(++_0x19b194);}(_0x5c71,0x188));var _0x15c7=function(_0x36b444,_0x505b35){_0x36b444=_0x36b444-0x0;var _0x786323=_0x5c71[_0x36b444];return _0x786323;};'use strict';var util=require(_0x15c7('0x0'));var _=require(_0x15c7('0x1'));var moment=require(_0x15c7('0x2'));function getSeconds(_0x15984b,_0x3b701f){var _0x36ce39=moment(_0x15984b)['milliseconds'](0x0);var _0x1b470d=moment(_0x3b701f)['milliseconds'](0x0);return _0x36ce39['diff'](_0x1b470d,'seconds');}function History(_0x25cec1){this['uniqueid']=_0x25cec1[_0x15c7('0x3')];this[_0x15c7('0x4')]=_0x25cec1[_0x15c7('0x4')]||undefined;this[_0x15c7('0x5')]=_0x25cec1['type'];this[_0x15c7('0x6')]=_0x25cec1[_0x15c7('0x5')]===_0x15c7('0x7')?_0x15c7('0x8'):_0x25cec1[_0x15c7('0x5')];this[_0x15c7('0x9')]=_0x25cec1[_0x15c7('0x9')];this['countcongestionretry']=_0x25cec1['countcongestionretry'];this[_0x15c7('0xa')]=_0x25cec1[_0x15c7('0xa')];this[_0x15c7('0xb')]=_0x25cec1[_0x15c7('0x9')]+_0x25cec1['countcongestionretry']+_0x25cec1[_0x15c7('0xa')]+_0x25cec1[_0x15c7('0xc')]+_0x25cec1[_0x15c7('0xd')]+_0x25cec1['countabandonedretry']+_0x25cec1[_0x15c7('0xe')]+_0x25cec1['countagentrejectretry'];this[_0x15c7('0xc')]=_0x25cec1[_0x15c7('0xc')];this[_0x15c7('0xd')]=_0x25cec1['countdropretry'];this[_0x15c7('0xf')]=_0x25cec1[_0x15c7('0xf')];this[_0x15c7('0xe')]=_0x25cec1[_0x15c7('0xe')];this[_0x15c7('0x10')]=_0x25cec1[_0x15c7('0x10')];this[_0x15c7('0x8')]=_0x25cec1[_0x15c7('0x8')];this['calleridname']=_0x25cec1[_0x15c7('0x11')];this[_0x15c7('0x12')]=_0x25cec1[_0x15c7('0x13')];this['starttime']=_0x25cec1[_0x15c7('0x14')];this['responsetime']=_0x25cec1[_0x15c7('0x15')];this['endtime']=_0x25cec1[_0x15c7('0x15')];this[_0x15c7('0x16')]=getSeconds(_0x25cec1['responsetime'],_0x25cec1[_0x15c7('0x14')]);this['holdtime']=0x0;this[_0x15c7('0x17')]=0x0;this['callback']=_0x25cec1[_0x15c7('0x18')];this[_0x15c7('0x19')]=_0x25cec1[_0x15c7('0x19')];this[_0x15c7('0x1a')]=_0x25cec1['callbackat'];this[_0x15c7('0x1b')]=_0x25cec1[_0x15c7('0x1b')];this['ContactId']=_0x25cec1['ContactId'];this[_0x15c7('0x1c')]=_0x25cec1[_0x15c7('0x1c')];this['UserId']=_0x25cec1[_0x15c7('0x1d')];this[_0x15c7('0x1e')]=_0x25cec1[_0x15c7('0x1e')];this[_0x15c7('0x1f')]=_0x25cec1['CampaignId'];this[_0x15c7('0x20')]=_0x25cec1[_0x15c7('0x20')]||'';this[_0x15c7('0x21')]=_0x25cec1['originatecalleridname']||'';}module[_0x15c7('0x22')]=History;
\ No newline at end of file
+var _0x0590=['lodash','milliseconds','seconds','uniqueid','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countnosuchnumberretry','countagentrejectretry','queue','calleridname','name','starttime','endtime','responsetime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util'];(function(_0x53b7d2,_0x334640){var _0x38d64a=function(_0x22db72){while(--_0x22db72){_0x53b7d2['push'](_0x53b7d2['shift']());}};_0x38d64a(++_0x334640);}(_0x0590,0x1d3));var _0x0059=function(_0x1a3326,_0x26c35a){_0x1a3326=_0x1a3326-0x0;var _0x1895a3=_0x0590[_0x1a3326];return _0x1895a3;};'use strict';var util=require(_0x0059('0x0'));var _=require(_0x0059('0x1'));var moment=require('moment');function getSeconds(_0x2fbd91,_0x909e1f){var _0x63464d=moment(_0x2fbd91)[_0x0059('0x2')](0x0);var _0x5b1297=moment(_0x909e1f)['milliseconds'](0x0);return _0x63464d['diff'](_0x5b1297,_0x0059('0x3'));}function History(_0x3ca87d){this[_0x0059('0x4')]=_0x3ca87d['uniqueid'];this[_0x0059('0x5')]=_0x3ca87d[_0x0059('0x5')]||undefined;this[_0x0059('0x6')]=_0x3ca87d[_0x0059('0x6')];this[_0x0059('0x7')]=_0x3ca87d[_0x0059('0x6')]==='outbound'?'queue':_0x3ca87d[_0x0059('0x6')];this[_0x0059('0x8')]=_0x3ca87d['countbusyretry'];this[_0x0059('0x9')]=_0x3ca87d[_0x0059('0x9')];this[_0x0059('0xa')]=_0x3ca87d[_0x0059('0xa')];this[_0x0059('0xb')]=_0x3ca87d['countbusyretry']+_0x3ca87d['countcongestionretry']+_0x3ca87d[_0x0059('0xa')]+_0x3ca87d['countnosuchnumberretry']+_0x3ca87d[_0x0059('0xc')]+_0x3ca87d[_0x0059('0xd')]+_0x3ca87d[_0x0059('0xe')]+_0x3ca87d['countagentrejectretry'];this['countnosuchnumberretry']=_0x3ca87d[_0x0059('0xf')];this[_0x0059('0xc')]=_0x3ca87d[_0x0059('0xc')];this['countabandonedretry']=_0x3ca87d[_0x0059('0xd')];this[_0x0059('0xe')]=_0x3ca87d[_0x0059('0xe')];this[_0x0059('0x10')]=_0x3ca87d[_0x0059('0x10')];this[_0x0059('0x11')]=_0x3ca87d[_0x0059('0x11')];this[_0x0059('0x12')]=_0x3ca87d[_0x0059('0x13')];this['calleridnum']=_0x3ca87d['number'];this[_0x0059('0x14')]=_0x3ca87d[_0x0059('0x14')];this['responsetime']=_0x3ca87d['responsetime'];this[_0x0059('0x15')]=_0x3ca87d[_0x0059('0x16')];this['ringtime']=getSeconds(_0x3ca87d[_0x0059('0x16')],_0x3ca87d[_0x0059('0x14')]);this['holdtime']=0x0;this[_0x0059('0x17')]=0x0;this[_0x0059('0x18')]=_0x3ca87d[_0x0059('0x18')];this['callbackuniqueid']=_0x3ca87d[_0x0059('0x19')];this['callbackat']=_0x3ca87d[_0x0059('0x1a')];this[_0x0059('0x1b')]=_0x3ca87d[_0x0059('0x1b')];this[_0x0059('0x1c')]=_0x3ca87d['ContactId'];this[_0x0059('0x1d')]=_0x3ca87d[_0x0059('0x1d')];this[_0x0059('0x1e')]=_0x3ca87d['UserId'];this[_0x0059('0x1f')]=_0x3ca87d[_0x0059('0x1f')];this[_0x0059('0x20')]=_0x3ca87d['CampaignId'];this[_0x0059('0x21')]=_0x3ca87d[_0x0059('0x21')]||'';this['originatecalleridname']=_0x3ca87d[_0x0059('0x22')]||'';}module[_0x0059('0x23')]=History;
\ No newline at end of file
diff --git a/server/services/ami/dialer/index.js b/server/services/ami/dialer/index.js
index deaccf6..143929e 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 _0xa9e0=['[syncMachineIvr]','[syncHangupIvr][createHistory]','dialQueueProject','AGI','[syncHangupIvr]','cause-txt','Unknow','reason','agent','agiafterat','dialQueueProject2','YYYY-MM-DD\x20HH:mm:ss','[syncAgentComplete][createHistory]','[syncAgentComplete]','answertime','queueCallerAbandonCreateState','droptime','responsetime','dialQueueTimeout','Drop','TIMEOUT','dialDropMaxRetry','countdropretry','dialDropRetryFrequency','minutes','[rescheduleContact][Drop]','calleridname','calleridnum','CRIS\x20evt\x2010.1','CRIS\x20queueCallerAbandon\x2010.1','log','CRIS\x20createHistory\x2010.1','[syncAgentComplete][createHistory][10]','Abandoned','dropreason','CALLEREXIT','countabandonedretry','add','dialAbandonedRetryFrequency','[rescheduleContact][Abandoned]','endtime','CRIS\x20createHistory\x2011','[syncAgentComplete][createHistory][11]','syncNewExten','channel','actionid','locked','paused','stateinterface','push','merge','idHopper','[unlockQueueStatus][undefined]','queueStatusComplete','[booked][unlockQueueStatus]','preview','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','[booked][unlock2]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncCampaigns','checkIsTrunkReachable','TrunkBackup','TRUNK_IS_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTime','checkIfTimeIntervals','\x20Intervals\x20is\x20null\x20','INTERVAL_IS_EMPTY','Failure','\x20Timezone\x20unknow\x20','isArray','Action','command','iftime\x20%s,%s','interval','timezones','content','true','all','some','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','checkDialMethod','power','handlePower','Queue','method\x20not\x20recognized','launchHandleIvr','handleIvr','syncQueueSummary','dialGlobalInterval','dialTimezone','[syncQueueSummary]','[syncCampaigns]','\x5cw{0,','pow','replace','random','match','actionOriginate','object','voiceQueue\x20is\x20undefine','Contact','phone','originate','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','\x22%s,%s%s,,,%s\x22','dialAgiAfterHangupAgent','ACTIVE','xcally-motion-dialer','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','XMD-CAMPAIGNID','tags','createdAt','updatedAt','XMD-','toUpper','callerid','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','originatecalleridname','SIP/%s/%s%s','trim','dialCutDigit','substring','from-sip','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','isSuccess','response','callProgressDetecting','[callProgressDetecting]\x20','checkRetriveMax','countnoanswerretry','countnosuchnumberretry','countmachineretry','countagentrejectretry','dialGlobalMaxRetry','dialNoAnswerMaxRetry','countbusyretry','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','countcongestionretry','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialNoSuchNumberRetryFrequency','dialMachineRetryFrequency','[rescheduleContact][Machine]','dialAgentRejectMaxRetry','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','NoSuchNumber','countglobal','reason\x200\x20no\x20such\x20number....','createStateFinal','NoAnswer','stateGlobal','reason\x203\x20ringing\x20no\x20answer','Busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','Congestion','reason\x208\x20congestion','outboundAbandonedCallsDay','dialAbandonedMaxRetry','reason\x2011\x20abandoned','AgentReject','[syncAgentComplete][createHistory][20]','outboundUnknownCallsDay','[syncAgentComplete][createHistory][?]','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','floor','[startMethodPredictive][StartProgressive]','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dropRate','agentBusyFactor','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','outboundQueuePauses','[CatchErlangB]','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','Agent','voicePause','Contact\x20updated','RECALLINQUEUE','RecallInQueue','RECALLFAILEDTIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','Blacklist','[Originate][MoveBlacklist]','limitCalls','temp','dialOrderByScheduledAt','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','Contact.phone','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','reachable','[actionOriginate]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','interval\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','Interval:\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','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[busyFactor]','Umin\x20=\x20','exports','util','lodash','bluebird','md5','../../../config/environment/','../../../config/logger','dialer','booked','predictive','predictiveCalls','../ami','redis','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/cmHopperFinal','./history','./final','./agentComplete','./queueCallerAbandon','./hangup','env','127.0.0.1','rrmemory','roundrobin','prototype','enqueue','tail','finally','sequence','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','uniqueId','startPredictive','startProgressive','queueBooked','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','hangup','syncHangup','newexten','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','isUndefined','message','name','\x20AGENTS\x20NOT\x20LOGGED','NOT_ACTIVE','\x20NOT\x20Active','Interval','INTERVAL_IS_NULL','\x20INTERVAL_IS_NULL','Intervals','isEmpty','Error','stringify','diff','seconds','emit','type','strategy','loggedIn','pTalking','sumDuration','sumHoldTime','talking','total','abandoned','waiting','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','Trunk','active','format','voice:queue:%s','voice_queue:save','ivr','campaign:save','-----\x20Stats\x20Predictive\x20---','info','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','predictiveIntervalAnsweredCalls','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','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','---------------------------','clearing\x20variable\x20start\x20progressive','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','outbound','string','\x22%s\x22\x20<%s>','\x22\x22\x20<>','error','inspect','stack','length','originated','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','contactsRescheduled','RESCHEDULED_CONTACTS','[getContactDialer2][ReScheduled]','contacts','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','sendMessageOneNotActive','available','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20not\x20active','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','IS_DISACTIVED','is\x20disactive','state','statedesc','starttime','[uniqueid]','clearZombieChannels','hasOwnProperty','isNil','catch','No\x20such\x20channel','[Dialer][checkChannel]','queue','updateOriginated','[Dialer][checkChannel][ivr]','countReScheduled','resolve','then','[countReScheduled]\x20','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','[rescheduleContact]\x20','unlockContact','getContactDialer','[getContactDialer]\x20','getContactDialerIvr','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','loggerHandler','emptyContact','saveInDb','pick','ContactId','ListId','UserId','VoiceQueueId','CampaignId','[emptyContact][createHistory]','[emptyContact]','Success','isTrunkReachable','SIP/%s','status','unmonitored','uniqueid','variable','exten','dialAMDActive','value','HANGUP','membername','AMD','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','MACHINE','Machine','amd','[syncMachine][createHistory]','HangupInAMD','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','[syncMachineIvr][createHistory]'];(function(_0x2064e5,_0x4f6fa2){var _0x21a233=function(_0x1b2491){while(--_0x1b2491){_0x2064e5['push'](_0x2064e5['shift']());}};_0x21a233(++_0x4f6fa2);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1cfa0d,_0x4391f2){_0x1cfa0d=_0x1cfa0d-0x0;var _0xe33279=_0xa9e0[_0x1cfa0d];return _0xe33279;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var BPromise=require(_0x0a9e('0x2'));var uuid=require('uuid');var moment=require('moment');var rr=require('rr');var md5=require(_0x0a9e('0x3'));var Redis=require('ioredis');var config=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var loggerBooked=require(_0x0a9e('0x5'))(_0x0a9e('0x7'));var loggerPredictive=require('../../../config/logger')(_0x0a9e('0x8'));var loggerPredictiveCalls=require(_0x0a9e('0x5'))(_0x0a9e('0x9'));var loggerSyncQueueSummary=require('../../../config/logger')('syncQueueSummary');var ami=require(_0x0a9e('0xa'));config['redis']=_['defaults'](config[_0x0a9e('0xb')],{'host':_0x0a9e('0xc'),'port':0x18eb});var io=require(_0x0a9e('0xd'))(new Redis(config[_0x0a9e('0xb')]));var cmHopper=require(_0x0a9e('0xe'));var cmHopperFinal=require(_0x0a9e('0xf'));var cmHopperHistory=require('../rpc/cmHopperHistory');var cmHopperBlack=require('../rpc/cmHopperBlack');var voiceQueueRt=require('../rpc/voiceQueueRt');var Action=require('./action');var History=require(_0x0a9e('0x10'));var Final=require(_0x0a9e('0x11'));var AgentComplete=require(_0x0a9e('0x12'));var QueueCallerAbandon=require(_0x0a9e('0x13'));var Hangup=require(_0x0a9e('0x14'));var ipAgi=process[_0x0a9e('0x15')]['XCALLY_IP_AGI']||_0x0a9e('0x16');var strategy={'rrmemory':_0x0a9e('0x17'),'roundrobin':_0x0a9e('0x18')};var Sequence=function(){};Sequence[_0x0a9e('0x19')][_0x0a9e('0x1a')]=function(_0x4d5611){this['tail']=this[_0x0a9e('0x1b')]?this['tail'][_0x0a9e('0x1c')](_0x4d5611):_0x4d5611();};function Dialer(_0x519dfd,_0x16033c){this[_0x0a9e('0x1d')]=new Sequence();this['preview']=_0x16033c;this[_0x0a9e('0x1e')]=_0x519dfd['voiceQueues'];this[_0x0a9e('0x1f')]=_0x519dfd[_0x0a9e('0x1f')];this[_0x0a9e('0x20')]=_0x519dfd[_0x0a9e('0x20')];this[_0x0a9e('0x21')]=_0x519dfd[_0x0a9e('0x21')];this[_0x0a9e('0x22')]=config[_0x0a9e('0x22')]||0x2;this[_0x0a9e('0x23')]={};this[_0x0a9e('0x24')]={};this[_0x0a9e('0x25')]={};this[_0x0a9e('0x26')]={};this['optionPredictive']={};this[_0x0a9e('0x27')]={};this[_0x0a9e('0x28')]={};this['ivrOriginated']={};this[_0x0a9e('0x29')]={};this['queueBookedRR']={};ami['on']('agentconnect',this[_0x0a9e('0x2a')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x2c'),this[_0x0a9e('0x2d')]['bind'](this));ami['on'](_0x0a9e('0x2e'),this[_0x0a9e('0x2f')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x30'),this[_0x0a9e('0x31')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x32'),this['syncQueueSummary']['bind'](this));ami['on'](_0x0a9e('0x33'),this[_0x0a9e('0x34')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x35'),this['syncNewExten'][_0x0a9e('0x2b')](this));ami['on']('varset',this[_0x0a9e('0x36')]['bind'](this));ami['on'](_0x0a9e('0x37'),this[_0x0a9e('0x38')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x39'),this[_0x0a9e('0x3a')][_0x0a9e('0x2b')](this));this[_0x0a9e('0x3b')]();this[_0x0a9e('0x3c')]();}function isNotNull(_0x5a101a){return _0x5a101a!==null&&!_[_0x0a9e('0x3d')](_0x5a101a);}function checkIsLoggedIn(_0x468813,_0x2b1f27){return function(){if(_0x2b1f27<=0x0){_0x468813[_0x0a9e('0x3e')]='AGENTS_NOT_LOGGED';throw _0x468813[_0x0a9e('0x3f')]+_0x0a9e('0x40');}};}function isActive(_0x1843b2){return _0x1843b2;}function checkIsActive(_0x824a4f,_0x58b06f){return function(){if(!isActive(_0x58b06f)){_0x824a4f[_0x0a9e('0x3e')]=_0x0a9e('0x41');throw _0x824a4f[_0x0a9e('0x3f')]+_0x0a9e('0x42');}};}function checkInterval(_0x540530){return function(){if(!isNotNull(_0x540530[_0x0a9e('0x43')])){_0x540530['message']=_0x0a9e('0x44');throw _0x540530[_0x0a9e('0x3f')]+_0x0a9e('0x45');}if(!isNotNull(_0x540530[_0x0a9e('0x43')][_0x0a9e('0x46')])){_0x540530['message']=_0x0a9e('0x44');throw _0x540530[_0x0a9e('0x3f')]+_0x0a9e('0x45');}if(!isNotNull(_[_0x0a9e('0x47')](_0x540530[_0x0a9e('0x43')][_0x0a9e('0x46')]))){_0x540530[_0x0a9e('0x3e')]=_0x0a9e('0x44');throw _0x540530['name']+_0x0a9e('0x45');}};}function msgResponse(_0x5e7238,_0x2cc7a0,_0x14b13f){return{'action':_0x5e7238,'response':_0x2cc7a0,'message':_0x14b13f,'stack':_0x14b13f};}function myreject(_0x2b7e7f){return function(_0x3f3d41){return _0x2b7e7f(msgResponse('[ifTime][Action]',_0x0a9e('0x48'),JSON[_0x0a9e('0x49')](_0x3f3d41)));};}function getSeconds(_0x1fa90d,_0x15de0e){var _0x4853b1=moment(_0x1fa90d)['milliseconds'](0x0);var _0x1e8694=moment(_0x15de0e)['milliseconds'](0x0);return _0x4853b1[_0x0a9e('0x4a')](_0x1e8694,_0x0a9e('0x4b'));}function emit(_0x381c37,_0x1ef87a,_0x4f41ae){io['to'](_0x381c37)[_0x0a9e('0x4c')](_0x1ef87a,_0x4f41ae);}function emitVoiceQueueSummary(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x4d')]==='outbound'){var _0x1dbf74={'id':_0x3bfce8['id'],'name':_0x3bfce8[_0x0a9e('0x3f')],'strategy':_0x3bfce8[_0x0a9e('0x4e')],'answered':_0x3bfce8['answered'],'available':_0x3bfce8['available'],'loggedIn':_0x3bfce8[_0x0a9e('0x4f')],'pTalking':_0x3bfce8[_0x0a9e('0x50')],'sumBillable':_0x3bfce8['sumBillable'],'sumDuration':_0x3bfce8[_0x0a9e('0x51')],'sumHoldTime':_0x3bfce8[_0x0a9e('0x52')]||0x0,'talking':_0x3bfce8[_0x0a9e('0x53')],'total':_0x3bfce8[_0x0a9e('0x54')],'type':_0x3bfce8['type'],'unmanaged':_0x3bfce8['unmanaged'],'abandoned':_0x3bfce8[_0x0a9e('0x55')],'waiting':_0x3bfce8[_0x0a9e('0x56')],'loggedInDb':_0x3bfce8['loggedInDb'],'dialActive':_0x3bfce8[_0x0a9e('0x57')],'dialMethod':_0x3bfce8[_0x0a9e('0x58')],'dialOriginateCallerIdName':_0x3bfce8[_0x0a9e('0x59')],'dialOriginateCallerIdNumber':_0x3bfce8['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x3bfce8[_0x0a9e('0x5a')],'dialPrefix':_0x3bfce8[_0x0a9e('0x5b')],'outboundAnswerAgiCallsDay':_0x3bfce8[_0x0a9e('0x5c')],'outboundAnswerCallsDay':_0x3bfce8[_0x0a9e('0x5d')],'outboundBlacklistCallsDay':_0x3bfce8[_0x0a9e('0x5e')],'outboundBusyCallsDay':_0x3bfce8[_0x0a9e('0x5f')],'outboundCongestionCallsDay':_0x3bfce8[_0x0a9e('0x60')],'outboundDropCallsDayACS':_0x3bfce8[_0x0a9e('0x61')],'outboundDropCallsDayCallersExit':_0x3bfce8[_0x0a9e('0x62')],'outboundDropCallsDayTimeout':_0x3bfce8[_0x0a9e('0x63')],'outboundNoAnswerCallsDay':_0x3bfce8[_0x0a9e('0x64')],'outboundNoSuchCallsDay':_0x3bfce8[_0x0a9e('0x65')],'outboundOriginateFailureCallsDay':_0x3bfce8[_0x0a9e('0x66')],'outboundReCallsDay':_0x3bfce8[_0x0a9e('0x67')],'outboundRejectCallsDay':_0x3bfce8[_0x0a9e('0x68')],'outboundUnknownCallsDay':_0x3bfce8['outboundUnknownCallsDay'],'predictiveIntervalAnsweredCalls':_0x3bfce8['predictiveIntervalAnsweredCalls'],'predictiveIntervalAvgHoldtime':_0x3bfce8[_0x0a9e('0x69')],'predictiveIntervalAvgTalktime':_0x3bfce8[_0x0a9e('0x6a')],'predictiveIntervalDroppedCallsCallersExit':_0x3bfce8[_0x0a9e('0x6b')],'predictiveIntervalDroppedCallsTimeout':_0x3bfce8[_0x0a9e('0x6c')],'predictiveIntervalErlangCalls':_0x3bfce8[_0x0a9e('0x6d')],'predictiveIntervalErlangCallsDroppedCalls':_0x3bfce8[_0x0a9e('0x6e')],'predictiveIntervalHitRate':_0x3bfce8[_0x0a9e('0x6f')],'predictiveIntervalMultiplicativeFactor':_0x3bfce8[_0x0a9e('0x70')],'predictiveIntervalPauses':_0x3bfce8[_0x0a9e('0x71')],'predictiveIntervalAvailable':_0x3bfce8[_0x0a9e('0x72')],'predictiveIntervalTotalCalls':_0x3bfce8[_0x0a9e('0x73')],'message':_0x3bfce8[_0x0a9e('0x3e')],'originated':_0x3bfce8['originated'],'erlangCalls':_0x3bfce8[_0x0a9e('0x74')],'erlangCallToSecond':_0x3bfce8[_0x0a9e('0x75')],'erlangAbandonmentRate':_0x3bfce8[_0x0a9e('0x76')],'erlangBusyFactor':_0x3bfce8[_0x0a9e('0x77')],'startPredictive':_0x3bfce8[_0x0a9e('0x27')],'startProgressive':_0x3bfce8[_0x0a9e('0x28')]};if(_0x3bfce8[_0x0a9e('0x78')]){_0x1dbf74[_0x0a9e('0x78')]={'id':_0x3bfce8['Trunk']['id'],'name':_0x3bfce8[_0x0a9e('0x78')]['name'],'active':_0x3bfce8[_0x0a9e('0x78')][_0x0a9e('0x79')],'callerid':_0x3bfce8[_0x0a9e('0x78')]['callerid']};}if(_0x3bfce8[_0x0a9e('0x43')]){_0x1dbf74[_0x0a9e('0x43')]={'id':_0x3bfce8[_0x0a9e('0x43')]['id'],'name':_0x3bfce8[_0x0a9e('0x43')][_0x0a9e('0x3f')]};}var _0x37be73=md5(JSON[_0x0a9e('0x49')](_0x1dbf74));if(_0x3bfce8['md5']!==_0x37be73){_0x3bfce8[_0x0a9e('0x3')]=_0x37be73;emit(util[_0x0a9e('0x7a')](_0x0a9e('0x7b'),_0x1dbf74[_0x0a9e('0x3f')]),_0x0a9e('0x7c'),_0x1dbf74);}}}function emitCampaignSummary(_0x992c77){if(_0x992c77[_0x0a9e('0x4d')]===_0x0a9e('0x7d')){emit(util[_0x0a9e('0x7a')]('campaign:ivr:%s',_0x992c77[_0x0a9e('0x3f')]),_0x0a9e('0x7e'),_0x992c77);}}function checkGetDataPredictive(_0x4f7240){if(isNotNull(_0x4f7240)){if(!_['isEmpty'](_0x4f7240)){loggerPredictive['info'](_0x0a9e('0x7f'));loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x81'),_0x4f7240[_0x0a9e('0x73')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x82'),_0x4f7240[_0x0a9e('0x83')]);loggerPredictive[_0x0a9e('0x80')]('Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4f7240['predictiveIntervalDroppedCallsTimeout']);loggerPredictive['info'](_0x0a9e('0x84'),_0x4f7240[_0x0a9e('0x6b')]);loggerPredictive[_0x0a9e('0x80')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4f7240[_0x0a9e('0x69')]);loggerPredictive[_0x0a9e('0x80')]('AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4f7240['predictiveIntervalAvgTalktime']);loggerPredictive[_0x0a9e('0x80')]('---------------------------');if(_0x4f7240[_0x0a9e('0x73')]>0x0){if(!_['isUndefined'](_0x4f7240[_0x0a9e('0x6a')])&&_0x4f7240[_0x0a9e('0x6a')]>0x0){return!![];}else{loggerPredictive[_0x0a9e('0x80')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}if(!_[_0x0a9e('0x3d')](_0x4f7240[_0x0a9e('0x69')])&&_0x4f7240['predictiveIntervalAvgHoldtime']>0x0){return!![];}else{loggerPredictive['info'](_0x0a9e('0x85'));}}else{loggerPredictive[_0x0a9e('0x80')]('Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive');}}else{loggerPredictive[_0x0a9e('0x80')]('History\x20information\x20are\x20empty');}}else{loggerPredictive[_0x0a9e('0x80')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0xe22ccc){return function(_0x4a6deb){loggerPredictive['info']('---------\x20ErlangB\x20---------');loggerPredictive[_0x0a9e('0x80')]('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4a6deb[_0x0a9e('0x74')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x86'),_0x4a6deb[_0x0a9e('0x75')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x87'),_0x4a6deb[_0x0a9e('0x76')]);loggerPredictive[_0x0a9e('0x80')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4a6deb[_0x0a9e('0x77')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x87'),_0x4a6deb[_0x0a9e('0x76')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x88'));_['merge'](_0xe22ccc,_0x4a6deb);};}function getDiff(_0x956fbe){var _0x26bc80=moment()['milliseconds'](0x0);var _0x3649cc=moment(_0x956fbe)['milliseconds'](0x0);return _0x26bc80[_0x0a9e('0x4a')](_0x3649cc,'seconds');}function ifInterval(_0x4b3c1a,_0x5674ee){if(_[_0x0a9e('0x3d')](_0x5674ee)){return![];}if(getDiff(_0x5674ee)<_0x4b3c1a*0x3c){return!![];}else{return![];}}function freeVariablesPredictive(_0x49d231){if(isNotNull(_0x49d231)){if(!_[_0x0a9e('0x3d')](_0x49d231[_0x0a9e('0x28')])){_0x49d231[_0x0a9e('0x28')]=undefined;loggerPredictive[_0x0a9e('0x80')](_0x49d231[_0x0a9e('0x3f')],_0x0a9e('0x89'));}if(!_['isUndefined'](_0x49d231[_0x0a9e('0x27')])){_0x49d231['startPredictive']=undefined;loggerPredictive[_0x0a9e('0x80')](_0x49d231[_0x0a9e('0x3f')],_0x0a9e('0x8a'));}if(!_['isUndefined'](_0x49d231[_0x0a9e('0x8b')])){clearInterval(_0x49d231[_0x0a9e('0x8b')]);_0x49d231[_0x0a9e('0x8b')]=undefined;loggerPredictive[_0x0a9e('0x80')](_0x49d231['name'],_0x0a9e('0x8c'));}}}function erlangb(_0xe05a5a,_0x54327c){if(_0x54327c===0x0){return 0x0;}var _0x797b45=0x1;for(var _0x17e88c=0x1;_0x17e88c<=_0x54327c;_0x17e88c+=0x1){_0x797b45=0x1+_0x797b45*_0x17e88c/_0xe05a5a;}return 0x1/_0x797b45;}function isVoiceQueueOutbound(_0x88dcbf){return _0x88dcbf===_0x0a9e('0x8d');}function isNotPreview(_0x401837){return _0x401837!=='preview';}function isCampaignIvr(_0x176840){return _0x176840===_0x0a9e('0x7d');}function getCallerId(_0x281c7d,_0x47bb43,_0x3528b7){if(!_['isUndefined'](_0x3528b7)&&'string'===typeof _0x3528b7&&!_[_0x0a9e('0x47')](_0x3528b7)){if(!_[_0x0a9e('0x3d')](_0x47bb43)&&_0x0a9e('0x8e')===typeof _0x47bb43&&!_[_0x0a9e('0x47')](_0x47bb43)){return util[_0x0a9e('0x7a')](_0x0a9e('0x8f'),_0x47bb43,_0x3528b7);}return util[_0x0a9e('0x7a')](_0x0a9e('0x8f'),_0x3528b7,_0x3528b7);}if(!_[_0x0a9e('0x3d')](_0x281c7d)&&_0x0a9e('0x8e')===typeof _0x281c7d&&!_[_0x0a9e('0x47')](_0x281c7d)){return _0x281c7d;}return _0x0a9e('0x90');}function loggerCatchQueueSummary(_0x2bbb86,_0x2b8192){return function(_0x320898){freeVariablesPredictive(_0x2b8192);emitVoiceQueueSummary(_0x2b8192);emitCampaignSummary(_0x2b8192);loggerSyncQueueSummary[_0x0a9e('0x91')](_0x2bbb86,util[_0x0a9e('0x92')](_0x320898,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x4257c9,_0x5150a4){return function(_0x1b0b98){loggerPredictive[_0x0a9e('0x91')](_0x5150a4[_0x0a9e('0x3f')],_0x4257c9);loggerPredictive['error'](_0x1b0b98[_0x0a9e('0x93')]);freeVariablesPredictive(_0x5150a4);};}function loggerCatch(_0x30944e){return function(_0x4b341d){logger[_0x0a9e('0x91')](_0x30944e,util[_0x0a9e('0x92')](_0x4b341d,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x3ef315){return _0x3ef315&&!_[_0x0a9e('0x3d')](_0x3ef315)&&_0x3ef315[_0x0a9e('0x94')]>0x0;}function decremetOriginate(_0x4a43a8){if(!_['isUndefined'](_0x4a43a8)&&_0x4a43a8!==null){if(_0x4a43a8['hasOwnProperty'](_0x0a9e('0x95'))){if(_0x4a43a8[_0x0a9e('0x95')]>0x0){_0x4a43a8[_0x0a9e('0x95')]-=0x1;}else{logger[_0x0a9e('0x91')](_0x0a9e('0x96'));}}}else{logger[_0x0a9e('0x91')](_0x0a9e('0x97'));}}function checkContactLowerLimitOriginate(_0x1a0677,_0x5512d1,_0x235f8f){if(_0x5512d1>_0x235f8f){for(var _0xcbc8b2=0x0;_0xcbc8b2<_0x5512d1-_0x235f8f;_0xcbc8b2+=0x1){decremetOriginate(_0x1a0677);}}}function loggerGetContactDialer(_0x12ccdb,_0x4a4fc7,_0x2bdc44){return function(_0x583b2e){checkContactLowerLimitOriginate(_0x4a4fc7,_0x2bdc44,0x0);logger[_0x0a9e('0x91')](_0x12ccdb,util[_0x0a9e('0x92')](_0x583b2e,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x4c46c1){return function(_0x2ed01e){if(isNotNull(_0x2ed01e)&&isNotNull(_0x2ed01e[0x0])){if(_0x2ed01e[0x0][_0x0a9e('0x98')]>0x0){_0x4c46c1[_0x0a9e('0x3e')]=_0x0a9e('0x99');logger['info'](_0x0a9e('0x9a')+_0x4c46c1[_0x0a9e('0x3f')],_0x2ed01e[0x0][_0x0a9e('0x98')],_0x0a9e('0x9b'));}else{_0x4c46c1['message']=_0x0a9e('0x9c');logger[_0x0a9e('0x80')](_0x0a9e('0x9d')+_0x4c46c1[_0x0a9e('0x3f')]);}}};}function notSendMessagesQueue(_0x4abc8f){if(_0x4abc8f[_0x0a9e('0x9e')]){freeVariablesPredictive(_0x4abc8f);if(_0x4abc8f[_0x0a9e('0x95')]===0x0&&_0x4abc8f[_0x0a9e('0x53')]===0x0&&_0x4abc8f[_0x0a9e('0x56')]===0x0&&(_0x4abc8f[_0x0a9e('0x50')]||0x0)===0x0){_0x4abc8f[_0x0a9e('0x9e')]=![];_0x4abc8f[_0x0a9e('0x9f')]=0x0;_0x4abc8f[_0x0a9e('0x3e')]=_0x0a9e('0x41');loggerSyncQueueSummary[_0x0a9e('0x91')](_0x0a9e('0xa0'),_0x4abc8f[_0x0a9e('0x3f')],_0x0a9e('0xa1'));}else{_0x4abc8f[_0x0a9e('0x3e')]='IS_DISACTIVED';loggerSyncQueueSummary[_0x0a9e('0x91')](_0x0a9e('0xa0'),_0x4abc8f[_0x0a9e('0x3f')],'is\x20disactive');}emitVoiceQueueSummary(_0x4abc8f);}}function notSendMessagesCampaign(_0x3736e0){if(_0x3736e0[_0x0a9e('0x9e')]){if(_0x3736e0[_0x0a9e('0x95')]===0x0){_0x3736e0[_0x0a9e('0x9e')]=![];_0x3736e0['message']='NOT_ACTIVE';loggerSyncQueueSummary[_0x0a9e('0x91')](_0x0a9e('0xa2'),_0x3736e0['name'],_0x0a9e('0xa1'));}else{_0x3736e0['message']=_0x0a9e('0xa3');loggerSyncQueueSummary[_0x0a9e('0x91')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x3736e0[_0x0a9e('0x3f')],_0x0a9e('0xa4'));}emitCampaignSummary(_0x3736e0);}}function createObjHistory(_0x2d2286,_0x42b959,_0x3755fe,_0x1f42a0,_0x444f1f){_0x2d2286['message']=_0x3755fe;var _0x2973d3=new Action(_0x2d2286,_0x42b959);var _0x3ca9b9=new History(_0x2973d3);_0x3ca9b9[_0x0a9e('0xa5')]=_0x1f42a0;_0x3ca9b9[_0x0a9e('0xa6')]=_0x444f1f;_0x3ca9b9['endtime']=_0x2973d3[_0x0a9e('0xa7')];return _0x3ca9b9;}Dialer[_0x0a9e('0x19')]['loopClearZombieChannels']=function(){var _0x1d6834=this;setInterval(function(){_0x1d6834['clearZombieChannels'](_0x1d6834[_0x0a9e('0x26')],_0x0a9e('0xa8'));_0x1d6834[_0x0a9e('0xa9')](_0x1d6834[_0x0a9e('0x24')],'[actions]');},0x32c8);};Dialer['prototype'][_0x0a9e('0xa9')]=function(_0x2b9c01,_0x94dcf5){var _0x5ac73d=this;for(var _0x3b4a9f in _0x2b9c01){if(_0x2b9c01[_0x0a9e('0xaa')](_0x3b4a9f)){this['sequence']['enqueue'](function(){if(!_[_0x0a9e('0xab')](_0x2b9c01[_0x3b4a9f])){return ami['Action']({'action':'status','channel':_0x2b9c01[_0x3b4a9f]['channel']})[_0x0a9e('0xac')](function(_0xf3601c){if(_0xf3601c[_0x0a9e('0x3e')]===_0x0a9e('0xad')){setTimeout(function(){if(_0x2b9c01[_0x3b4a9f]&&_0x2b9c01[_0x3b4a9f][_0x0a9e('0x4d')]!==_0x0a9e('0x7d')){_0x5ac73d['updateOriginated'](_0x5ac73d[_0x0a9e('0x1e')][_0x2b9c01[_0x3b4a9f]['queue']]);logger[_0x0a9e('0x91')](_0x0a9e('0xae'),_0x94dcf5,_0x3b4a9f,_0x2b9c01[_0x3b4a9f][_0x0a9e('0xaf')]);delete _0x2b9c01[_0x3b4a9f];}if(_0x2b9c01[_0x3b4a9f]&&_0x2b9c01[_0x3b4a9f][_0x0a9e('0x4d')]==='ivr'){_0x5ac73d[_0x0a9e('0xb0')](_0x5ac73d[_0x0a9e('0x1f')][_0x2b9c01[_0x3b4a9f][_0x0a9e('0xaf')]]);logger['error'](_0x0a9e('0xb1'),_0x94dcf5,_0x3b4a9f,_0x2b9c01[_0x3b4a9f][_0x0a9e('0xaf')]);delete _0x2b9c01[_0x3b4a9f];}},0x2328);}});}});}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0xb2')]=function(_0x255e49){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xb2')](_0x255e49))['catch'](loggerCatch(_0x0a9e('0xb5')));};Dialer[_0x0a9e('0x19')]['checkIsBlackList']=function(_0x40e0f0){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopperBlack['checkIsBlackList'](_0x40e0f0))[_0x0a9e('0xac')](loggerCatch('[checkIsBlackList]\x20'));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xb6')]=function(_0x558a87){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopperBlack[_0x0a9e('0xb6')](_0x558a87))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xb7')));};Dialer['prototype'][_0x0a9e('0xb8')]=function(_0x31d25a){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopperHistory[_0x0a9e('0xb9')](_0x31d25a))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xba')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xbb')]=function(_0x31af8c){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xbb')](_0x31af8c))['catch'](loggerCatch(_0x0a9e('0xbc')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xbd')]=function(_0x2ed526,_0xb0599a,_0x5d9ddb){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper['unlockContact'](_0x2ed526,_0xb0599a,_0x5d9ddb))[_0x0a9e('0xac')](loggerCatch('[unlockContact]\x20'));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xbe')]=function(_0x1d93b1,_0xf8c6c4,_0x4f4d2d,_0x3ceba6){return BPromise['resolve']()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xbe')](_0x1d93b1,_0xf8c6c4,_0x4f4d2d,_0x3ceba6))['catch'](loggerCatch(_0x0a9e('0xbf')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc0')]=function(_0x4ab276,_0x4c788f,_0x1b82b7){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xc0')](_0x4ab276,_0x4c788f,_0x1b82b7))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xbf')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc1')]=function(_0x3f8124){return BPromise['resolve']()[_0x0a9e('0xb4')](voiceQueueRt['getVoiceQueueRtPauses'](_0x3f8124))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xc2')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc3')]=function(_0x1b61d5){return BPromise['resolve']()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xc3')](_0x1b61d5))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xc4')));};Dialer[_0x0a9e('0x19')]['createHistory']=function(_0x4f074c){return BPromise[_0x0a9e('0xb3')]()['then'](cmHopperHistory[_0x0a9e('0xc5')](_0x4f074c))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xc6')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xb0')]=function(_0x213e5d){if(!_['isUndefined'](_0x213e5d)&&_0x213e5d!==null){if(_0x213e5d['hasOwnProperty'](_0x0a9e('0x95'))){if(_0x213e5d['originated']>0x0){_0x213e5d[_0x0a9e('0x95')]-=0x1;}else{logger['error'](_0x0a9e('0xc7'));}}}else{logger['error']('[updateOriginated]\x20is\x20null\x20or\x20undefined');}};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc8')]=function(_0x5e9b0b,_0x170af6){var _0x17cb30=this;return function(_0x15c6b9){_0x17cb30[_0x0a9e('0xb0')](_0x170af6);logger[_0x0a9e('0x91')](_0x5e9b0b,util['inspect'](_0x15c6b9,{'showHidden':![],'depth':null}));};};Dialer['prototype'][_0x0a9e('0xc9')]=function(_0x22286c,_0x41c8cd,_0x24beb6){var _0x59303b={'state':0x19,'statedesc':'notFound'};this[_0x0a9e('0xb0')](_0x41c8cd);this[_0x0a9e('0xca')](_['merge'](_0x59303b,_[_0x0a9e('0xcb')](_0x24beb6,[_0x0a9e('0xcc'),_0x0a9e('0xcd'),_0x0a9e('0xce'),_0x0a9e('0xcf'),_0x0a9e('0xd0')])),_0x0a9e('0xd1'),_0x0a9e('0xd2'));logger[_0x0a9e('0x91')](_0x22286c);};Dialer[_0x0a9e('0x19')]['isSuccess']=function(_0x1065a7){return _0x1065a7===_0x0a9e('0xd3');};Dialer[_0x0a9e('0x19')][_0x0a9e('0xd4')]=function(_0x1d0b02){return!_['isUndefined'](_0x1d0b02)&&_0x1d0b02&&!_['isUndefined'](_0x1d0b02[_0x0a9e('0x3f')])&&!_[_0x0a9e('0x3d')](_0x1d0b02[_0x0a9e('0x79')])&&_0x1d0b02[_0x0a9e('0x79')]&&(this[_0x0a9e('0x21')][util['format'](_0x0a9e('0xd5'),_0x1d0b02[_0x0a9e('0x3f')])][_0x0a9e('0xd6')]==='reachable'||this[_0x0a9e('0x21')][util['format'](_0x0a9e('0xd5'),_0x1d0b02['name'])][_0x0a9e('0xd6')]===_0x0a9e('0xd7'));};Dialer[_0x0a9e('0x19')]['saveInDb']=function(_0xc9529d,_0x5ed560,_0x4383da){this[_0x0a9e('0xc5')](_0xc9529d)[_0x0a9e('0xac')](loggerCatch(_0x5ed560));this[_0x0a9e('0xc3')](_0xc9529d)[_0x0a9e('0xac')](loggerCatch(_0x4383da));};Dialer[_0x0a9e('0x19')][_0x0a9e('0x36')]=function(_0xe89aaa){var _0x2aaf07=this[_0x0a9e('0x26')][_0xe89aaa[_0x0a9e('0xd8')]];var _0xc876d4;if(!_[_0x0a9e('0xab')](_0xe89aaa)&&!_[_0x0a9e('0xab')](_0xe89aaa[_0x0a9e('0xd9')])&&!_[_0x0a9e('0xab')](_0xe89aaa['variable']['amdstatus'])&&_0xe89aaa[_0x0a9e('0xda')]==='xcally-motion-dialer'&&_0x2aaf07){if(_0x2aaf07[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')&&this['voiceQueues'][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0xdb')]&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xdd')){delete this['uniqueId'][_0xe89aaa[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x2aaf07[_0x0a9e('0xaf')]]);this['voiceQueues'][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;this[_0x0a9e('0x1e')][_0x2aaf07['queue']][_0x0a9e('0x5c')]+=0x1;_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x12;_0xc876d4[_0x0a9e('0xa6')]='HangupInAMD';_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe0'),_0x0a9e('0xe1'));}if(_0x2aaf07['type']!==_0x0a9e('0x7d')&&this[_0x0a9e('0x1e')][_0x2aaf07['queue']][_0x0a9e('0xdb')]&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xe2')){delete this['uniqueId'][_0xe89aaa['uniqueid']];this['updateOriginated'](this[_0x0a9e('0x1e')][_0x2aaf07[_0x0a9e('0xaf')]]);this['voiceQueues'][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;this[_0x0a9e('0x1e')][_0x2aaf07['queue']][_0x0a9e('0x5c')]+=0x1;_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x13;_0xc876d4[_0x0a9e('0xa6')]=_0x0a9e('0xe3');_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');_0xc876d4[_0x0a9e('0xe4')]=!![];this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe5'),'[syncMachine]');}if(_0x2aaf07[_0x0a9e('0x4d')]==='ivr'&&this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0xdb')]&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xdd')){delete this[_0x0a9e('0x26')][_0xe89aaa['uniqueid']];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]]);_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x12;_0xc876d4['statedesc']=_0x0a9e('0xe6');_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe7'),_0x0a9e('0xe8'));}if(_0x2aaf07[_0x0a9e('0x4d')]===_0x0a9e('0x7d')&&this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]]['dialAMDActive']&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xe2')){delete this[_0x0a9e('0x26')][_0xe89aaa[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]]);_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x13;_0xc876d4['statedesc']=_0x0a9e('0xe3');_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');_0xc876d4['amd']=!![];this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe9'),_0x0a9e('0xea'));}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x34')]=function(_0x1ba457){var _0x424f1b=this[_0x0a9e('0x26')][_0x1ba457[_0x0a9e('0xd8')]];var _0x451010=this;var _0x5a7dad;if(_0x424f1b&&_0x424f1b[_0x0a9e('0x4d')]===_0x0a9e('0x7d')){delete this[_0x0a9e('0x26')][_0x1ba457[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1f')][_0x424f1b['queue']]);this[_0x0a9e('0x1f')][_0x424f1b['queue']]['ivrAnswerCallsDay']+=0x1;_0x5a7dad=new Hangup(_0x424f1b,_0x1ba457);this['createHistory'](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xeb')));this[_0x0a9e('0xc3')](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch('[syncHangupIvr]'));}if(_0x424f1b&&_0x424f1b[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')&&isNotNull(this[_0x0a9e('0x1e')][_0x424f1b[_0x0a9e('0xaf')]][_0x0a9e('0xec')])){delete this['uniqueId'][_0x1ba457['uniqueid']];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x424f1b[_0x0a9e('0xaf')]]);this['voiceQueues'][_0x424f1b[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;this[_0x0a9e('0x1e')][_0x424f1b['queue']][_0x0a9e('0x5c')]+=0x1;_0x5a7dad=new Hangup(_0x424f1b,_0x1ba457);_0x5a7dad[_0x0a9e('0xa5')]=0x10;_0x5a7dad[_0x0a9e('0xa6')]='AnswerAGI';_0x5a7dad[_0x0a9e('0xde')]=_0x0a9e('0xed');this[_0x0a9e('0xc5')](_0x5a7dad)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));this['moveContactManagedDialer'](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xee')));}if(_0x424f1b&&_0x424f1b[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')&&!isNotNull(this['voiceQueues'][_0x424f1b[_0x0a9e('0xaf')]]['dialQueueProject'])){delete this[_0x0a9e('0x26')][_0x1ba457[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this['voiceQueues'][_0x424f1b[_0x0a9e('0xaf')]]);this[_0x0a9e('0x1e')][_0x424f1b[_0x0a9e('0xaf')]]['outboundUnknownCallsDay']+=0x1;_0x5a7dad=new Hangup(_0x424f1b,_0x1ba457);_0x5a7dad[_0x0a9e('0xa5')]=0xc;_0x5a7dad['statedesc']=_0x1ba457[_0x0a9e('0xef')];_0x5a7dad['membername']=_0x0a9e('0xf0');this['createHistory'](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xeb')));this[_0x0a9e('0xc3')](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xee')));}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x31')]=function(_0x5acdc9){var _0x35ace3=this[_0x0a9e('0x26')][_0x5acdc9['uniqueid']];var _0xf4fb77=this;if(this[_0x0a9e('0x1e')][_0x5acdc9['queue']]){if(_0x35ace3&&_0x35ace3[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')){delete this[_0x0a9e('0x26')][_0x5acdc9['uniqueid']];this[_0x0a9e('0x1e')][_0x5acdc9[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;var _0x3f0d64=new AgentComplete(_0x35ace3,_0x5acdc9);if(_0x5acdc9[_0x0a9e('0xf1')]===_0x0a9e('0xf2')){_0x3f0d64[_0x0a9e('0xf3')]=this[_0x0a9e('0x1e')][_0x5acdc9[_0x0a9e('0xaf')]][_0x0a9e('0xf4')]&&this['voiceQueues'][_0x5acdc9[_0x0a9e('0xaf')]]['dialAgiAfterHangupAgent']?moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5')):undefined;}this[_0x0a9e('0xc5')](_0x3f0d64)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xf6')));this[_0x0a9e('0xc3')](_0x3f0d64)['catch'](loggerCatch(_0x0a9e('0xf7')));}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x2a')]=function(_0x55a599){if(this[_0x0a9e('0x1e')][_0x55a599[_0x0a9e('0xaf')]]){if(this[_0x0a9e('0x26')][_0x55a599[_0x0a9e('0xd8')]]&&this[_0x0a9e('0x26')][_0x55a599[_0x0a9e('0xd8')]][_0x0a9e('0x4d')]!=='ivr'){this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x55a599[_0x0a9e('0xaf')]]);this[_0x0a9e('0x26')][_0x55a599[_0x0a9e('0xd8')]][_0x0a9e('0xf8')]=moment()[_0x0a9e('0x7a')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer['prototype'][_0x0a9e('0xf9')]=function(_0x3f507c){this[_0x0a9e('0xc5')](_0x3f507c)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xf6')));this[_0x0a9e('0xc3')](_0x3f507c)[_0x0a9e('0xac')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));};Dialer[_0x0a9e('0x19')][_0x0a9e('0x2d')]=function(_0x2d8e91){var _0x2675a5=this[_0x0a9e('0x26')][_0x2d8e91[_0x0a9e('0xd8')]];var _0x16be7e=this;if(this['voiceQueues'][_0x2d8e91[_0x0a9e('0xaf')]]){if(_0x2675a5&&_0x2675a5[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')){delete this['uniqueId'][_0x2d8e91[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]]);_0x2675a5['droptime']=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));var _0x21d082=new QueueCallerAbandon(_0x2675a5,_0x2d8e91);if(getSeconds(_0x2675a5[_0x0a9e('0xfa')],_0x2675a5[_0x0a9e('0xfb')])>=_0x2675a5[_0x0a9e('0xfc')]){this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x63')]+=0x1;this[_0x0a9e('0x1e')][_0x2d8e91['queue']]['predictiveIntervalErlangCallsDroppedCalls']+=0x1;_0x21d082[_0x0a9e('0xa5')]=0xa;_0x21d082[_0x0a9e('0xa6')]=_0x0a9e('0xfd');_0x21d082['dropreason']=_0x0a9e('0xfe');_0x21d082[_0x0a9e('0xf3')]=this['voiceQueues'][_0x2d8e91[_0x0a9e('0xaf')]]['dialQueueProject2']?moment()[_0x0a9e('0x7a')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x21d082['countdropretry']+=0x1;if(_0x21d082['countdropretry']>=this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0xff')]){this[_0x0a9e('0xf9')](_0x21d082);}else{this[_0x0a9e('0xbb')]({'active':![],'countdropretry':_0x21d082[_0x0a9e('0x100')],'scheduledat':moment()['add'](this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x101')],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x2675a5[_0x0a9e('0xcc')],'ListId':_0x2675a5['ListId'],'VoiceQueueId':_0x2675a5['VoiceQueueId']||undefined,'CampaignId':_0x2675a5[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x103')));var _0x19e024=new History(_0x21d082);_0x19e024[_0x0a9e('0xa5')]=0xa;_0x19e024[_0x0a9e('0xa6')]=_0x0a9e('0xfd');_0x19e024[_0x0a9e('0xa7')]=moment()['format'](_0x0a9e('0xf5'));_0x19e024['endtime']=_0x19e024['starttime'];_0x19e024[_0x0a9e('0x104')]=_0x21d082['calleridname'];_0x19e024[_0x0a9e('0x105')]=_0x21d082['calleridnum'];console['log'](_0x0a9e('0x106'),_0x2d8e91);console['log'](_0x0a9e('0x107'),_0x21d082);console[_0x0a9e('0x108')](_0x0a9e('0x109'),_0x19e024);this['createHistory'](_0x19e024)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x10a')));}}else{this[_0x0a9e('0x1e')][_0x2d8e91['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x62')]+=0x1;_0x21d082[_0x0a9e('0xa5')]=0xb;_0x21d082[_0x0a9e('0xa6')]=_0x0a9e('0x10b');_0x21d082[_0x0a9e('0x10c')]=_0x0a9e('0x10d');_0x21d082[_0x0a9e('0x10e')]+=0x1;if(_0x21d082[_0x0a9e('0x10e')]>=this['voiceQueues'][_0x2d8e91['queue']]['dialAbandonedMaxRetry']){this[_0x0a9e('0xf9')](_0x21d082);}else{this[_0x0a9e('0xbb')]({'active':![],'countabandonedretry':_0x21d082[_0x0a9e('0x10e')],'scheduledat':moment()[_0x0a9e('0x10f')](this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x110')],_0x0a9e('0x102'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2675a5[_0x0a9e('0xcc')],'ListId':_0x2675a5[_0x0a9e('0xcd')],'VoiceQueueId':_0x2675a5['VoiceQueueId']||undefined,'CampaignId':_0x2675a5[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x111')));var _0x19e024=new History(_0x21d082);_0x19e024[_0x0a9e('0xa5')]=0xb;_0x19e024[_0x0a9e('0xa6')]=_0x0a9e('0x10b');_0x19e024[_0x0a9e('0xa7')]=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));_0x19e024[_0x0a9e('0x112')]=_0x19e024[_0x0a9e('0xa7')];console['log'](_0x0a9e('0x113'),_0x19e024);this[_0x0a9e('0xc5')](_0x19e024)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x114')));}}}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x115')]=function(_0x292e67){if(this[_0x0a9e('0x24')][_0x292e67[_0x0a9e('0xd8')]]){this[_0x0a9e('0x24')][_0x292e67[_0x0a9e('0xd8')]][_0x0a9e('0x116')]=_0x292e67['channel'];}if(this['uniqueId'][_0x292e67[_0x0a9e('0xd8')]]){this[_0x0a9e('0x26')][_0x292e67[_0x0a9e('0xd8')]][_0x0a9e('0x116')]=_0x292e67[_0x0a9e('0x116')];}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x38')]=function(_0x4f7907){if(strategy[this[_0x0a9e('0x1e')][this['actions'][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]][_0x0a9e('0x4e')]]===_0x0a9e('0x18')){if(this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]]&&_[_0x0a9e('0xab')](this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0x118')])&&_0x4f7907[_0x0a9e('0xd6')]==='1'&&_0x4f7907[_0x0a9e('0x119')]==='0'){if(this[_0x0a9e('0x20')][_0x4f7907[_0x0a9e('0x11a')]]){if(!this[_0x0a9e('0x20')][_0x4f7907[_0x0a9e('0x11a')]]['locked']){this['agents'][_0x4f7907[_0x0a9e('0x11a')]][_0x0a9e('0x118')]=!![];this['actions'][_0x4f7907['actionid']][_0x0a9e('0x118')]=!![];this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]]['stateinterface']=_0x4f7907[_0x0a9e('0x11a')];}}}}else if((strategy[this['voiceQueues'][this[_0x0a9e('0x24')][_0x4f7907['actionid']][_0x0a9e('0xaf')]]['strategy']]||_0x0a9e('0x17'))===_0x0a9e('0x17')){if(this[_0x0a9e('0x24')][_0x4f7907['actionid']]){if(this[_0x0a9e('0x20')][_0x4f7907['stateinterface']]){this['actions'][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0x11a')]=_0x4f7907[_0x0a9e('0x11a')];if(_[_0x0a9e('0xab')](this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]])){this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]=[];}this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]][_0x0a9e('0x11b')](_[_0x0a9e('0x11c')](_[_0x0a9e('0xcb')](this['actions'][_0x4f7907[_0x0a9e('0x117')]],[_0x0a9e('0x11d'),_0x0a9e('0x11a')]),{'status':_0x4f7907[_0x0a9e('0xd6')],'paused':_0x4f7907['paused']}));}}}};function unlockQueueStatus(_0x49c3be,_0x54658d){setTimeout(function(){if(_[_0x0a9e('0x3d')](_0x49c3be['queueStatusComplete'])){loggerBooked[_0x0a9e('0x91')](_0x0a9e('0x11e'),_0x54658d);}_0x49c3be[_0x0a9e('0x11f')]=!![];loggerBooked[_0x0a9e('0x80')](_0x0a9e('0x120'),_0x54658d,JSON[_0x0a9e('0x49')](_[_0x0a9e('0xcb')](_0x49c3be,[_0x0a9e('0x3f'),_0x0a9e('0x11f')])));},0x1f3);}Dialer[_0x0a9e('0x19')]['syncQueueStatusComplete']=function(_0x283c59){var _0x47a018=this;var _0x2509f3=_0x47a018['voiceQueues'][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]];if(strategy[this['voiceQueues'][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']]['strategy']]===_0x0a9e('0x18')){if(this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]&&this['actions'][_0x283c59['actionid']]['stateinterface']){this[_0x0a9e('0x121')][_0x0a9e('0x122')](this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0x11d')],this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0x11a')])[_0x0a9e('0xac')](function(_0x18e38b){logger[_0x0a9e('0x91')](_0x0a9e('0x123'),util[_0x0a9e('0x92')](_0x18e38b,{'showHidden':![],'depth':null}));})[_0x0a9e('0x1c')](function(){_0x47a018[_0x0a9e('0xb0')](_0x47a018[_0x0a9e('0x1e')][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']]);_0x47a018[_0x0a9e('0x20')][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0x11a')]][_0x0a9e('0x118')]=![];delete _0x47a018[_0x0a9e('0x24')][_0x283c59['actionid']];unlockQueueStatus(_0x2509f3);});}else{this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]);this[_0x0a9e('0xbb')]({'active':![],'ContactId':this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xcc')],'ListId':this['actions'][_0x283c59['actionid']][_0x0a9e('0xcd')],'VoiceQueueId':this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xcf')]||undefined,'CampaignId':this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x124')));delete this[_0x0a9e('0x24')][_0x283c59['actionid']];unlockQueueStatus(_0x2509f3);}}else if((strategy[this[_0x0a9e('0x1e')][this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xaf')]][_0x0a9e('0x4e')]]||'rrmemory')===_0x0a9e('0x17')){var _0x237994;if(this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]&&!_[_0x0a9e('0x47')](this[_0x0a9e('0x29')][this['actions'][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]])){if(this['queueBookedRR'][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]){this[_0x0a9e('0x125')][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]=this['queueBookedRR'][this['actions'][_0x283c59['actionid']]['queue']]?this['queueBookedRR'][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']]:this['queueBooked'][this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xaf')]]?this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]][_0x0a9e('0x126')]||0x0:0x0;}this['queueBooked'][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']][_0x0a9e('0x126')]=this[_0x0a9e('0x125')][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]];for(var _0x2f1cc0=0x0;_0x2f1cc0=0x0?!![]:![];})[_0x0a9e('0xac')](myreject(_0x1ba7b2)));}}else{_0x45630b[_0x0a9e('0x11b')](ami['Action']({'action':'command','command':util[_0x0a9e('0x7a')](_0x0a9e('0x13e'),_0x1c738f,!_[_0x0a9e('0x3d')](config[_0x0a9e('0x140')][_0x57425c])?_0x57425c:'')})[_0x0a9e('0xb4')](function(_0x5ac14c){return _0x5ac14c[_0x0a9e('0x141')]['indexOf'](_0x0a9e('0x142'))>=0x0?!![]:![];})['catch'](myreject(_0x1ba7b2)));}BPromise[_0x0a9e('0x143')](_0x45630b)[_0x0a9e('0xb4')](function(_0x595a5e){var _0x1fe77c=_[_0x0a9e('0x144')](_0x595a5e);if(_0x1fe77c){return _0x121aa2(_0x1fe77c);}else{_0x45c980[_0x0a9e('0x3e')]=_0x465b51?_0x0a9e('0x145'):_0x0a9e('0x146');return _0x1ba7b2(msgResponse(_0x0a9e('0x147'),'Failure',_0x0a9e('0x148')+_0x465b51+'\x20'+_0x5d4935+_0x0a9e('0x149')+util[_0x0a9e('0x92')](_0x1c738f,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x57425c));}})[_0x0a9e('0xac')](function(_0x934f69){return _0x1ba7b2(msgResponse(_0x0a9e('0x135'),'Failure',JSON[_0x0a9e('0x49')](_0x934f69)));});});};Dialer[_0x0a9e('0x19')][_0x0a9e('0x14a')]=function(_0x2317e7){var _0x1d39bd=this;return function(){switch(_0x2317e7[_0x0a9e('0x58')]){case'progressive':freeVariablesPredictive(_0x2317e7);_0x1d39bd['handlePower'](_0x2317e7,0x1);break;case _0x0a9e('0x14b'):freeVariablesPredictive(_0x2317e7);_0x1d39bd[_0x0a9e('0x14c')](_0x2317e7,_0x2317e7['dialPowerLevel']);break;case _0x0a9e('0x8'):_0x1d39bd[_0x0a9e('0x8')](_0x2317e7);break;case _0x0a9e('0x7'):freeVariablesPredictive(_0x2317e7);_0x1d39bd[_0x0a9e('0x14c')](_0x2317e7,0x1);break;default:freeVariablesPredictive(_0x2317e7);logger[_0x0a9e('0x91')](_0x0a9e('0x14d'),_0x2317e7['name'],_0x0a9e('0x14e'));}};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x14f')]=function(_0x4edb79){var _0x45c6ce=this;return function(){_0x45c6ce[_0x0a9e('0x150')](_0x4edb79);};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x151')]=function(_0x5beea6){var _0x49bb4f=this;if(isNotPreview(_0x5beea6[_0x0a9e('0x58')])){if(isVoiceQueueOutbound(_0x5beea6[_0x0a9e('0x4d')])&&isActive(_0x5beea6[_0x0a9e('0x57')])){_0x5beea6['sendMessageOneNotActive']=!![];BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](checkIsLoggedIn(_0x5beea6,_0x5beea6[_0x0a9e('0x4f')]))[_0x0a9e('0xb4')](checkIsActive(_0x5beea6,_0x5beea6[_0x0a9e('0x57')]))[_0x0a9e('0xb4')](checkInterval(_0x5beea6))[_0x0a9e('0xb4')](_0x49bb4f[_0x0a9e('0x130')](_0x5beea6))['then'](_0x49bb4f['checkIfTime'](_0x5beea6[_0x0a9e('0x152')],_0x5beea6[_0x0a9e('0x153')],_0x5beea6['name'],_0x5beea6))[_0x0a9e('0xb4')](_0x49bb4f['checkIfTimeIntervals'](_0x5beea6[_0x0a9e('0x43')],_0x5beea6[_0x0a9e('0x153')],_0x5beea6['name'],_0x5beea6))[_0x0a9e('0xb4')](_0x49bb4f[_0x0a9e('0x14a')](_0x5beea6))['catch'](loggerCatchQueueSummary(_0x0a9e('0x154'),_0x5beea6));}else{notSendMessagesQueue(_0x5beea6);}}else{freeVariablesPredictive(_0x5beea6);}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x12f')]=function(){var _0x17259c=this;var _0x434df7;for(var _0x45b8ed in this[_0x0a9e('0x1f')]){if(this['campaigns'][_0x0a9e('0xaa')](_0x45b8ed)){_0x434df7=this[_0x0a9e('0x1f')][_0x45b8ed];if(isCampaignIvr(_0x434df7[_0x0a9e('0x4d')])&&isActive(_0x434df7[_0x0a9e('0x79')])){_0x434df7[_0x0a9e('0x9e')]=!![];BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](checkIsActive(_0x434df7,_0x434df7['active']))['then'](checkInterval(_0x434df7))[_0x0a9e('0xb4')](_0x17259c[_0x0a9e('0x130')](_0x434df7))[_0x0a9e('0xb4')](_0x17259c['checkIfTime'](_0x434df7['dialGlobalInterval'],_0x434df7[_0x0a9e('0x153')],_0x434df7['name'],_0x434df7))[_0x0a9e('0xb4')](_0x17259c[_0x0a9e('0x136')](_0x434df7[_0x0a9e('0x43')],_0x434df7[_0x0a9e('0x153')],_0x434df7[_0x0a9e('0x3f')],_0x434df7))[_0x0a9e('0xb4')](_0x17259c[_0x0a9e('0x14f')](_0x434df7))[_0x0a9e('0xac')](loggerCatchQueueSummary(_0x0a9e('0x155'),_0x434df7));}else{notSendMessagesCampaign(_0x434df7);}}}};function getCallerIdRandom(_0x47e61e,_0x516859){var _0x399cf4,_0x54d34e,_0x2f4540;if(_0x516859<=0x0){_0x516859=0x1;}_0x399cf4=new RegExp(_0x0a9e('0x156')+_0x516859+'}$');_0x54d34e=Math[_0x0a9e('0x157')](0xa,_0x516859-0x1);_0x2f4540=Math[_0x0a9e('0x157')](0xa,_0x516859)-0x1;return util['format']('%s',_[_0x0a9e('0x158')](_0x47e61e,_0x399cf4,_[_0x0a9e('0x159')](_0x54d34e,_0x2f4540)));}function extractCalleridName(_0x2bc6a3){var _0x5174c5=_0x2bc6a3[_0x0a9e('0x15a')](/"(.*?)"/);return _0x5174c5?_0x5174c5[0x1]:_0x2bc6a3;}function extractCalleridNumber(_0xcdd954){var _0x1e30bc=_0xcdd954['match'](/<(.*?)>/);return _0x1e30bc?_0x1e30bc[0x1]:_0xcdd954;}Dialer[_0x0a9e('0x19')][_0x0a9e('0x15b')]=function(_0x459ab7,_0x6e8a19){var _0x69b4d6=this;var _0x1ab878=uuid['v4']();this['actions'][_0x1ab878]=new Action(_0x459ab7,_0x6e8a19,_0x1ab878);return new BPromise(function(_0x5613e3,_0x46146f){if(_[_0x0a9e('0x3d')](_0x459ab7)&&_0x0a9e('0x15c')!==typeof _0x459ab7){return _0x46146f(msgResponse('originate','Failure',_0x0a9e('0x15d')));}if(_[_0x0a9e('0x3d')](_0x6e8a19[_0x0a9e('0x15e')]['phone'])||_0x6e8a19['Contact'][_0x0a9e('0x15f')]===null){return _0x46146f(msgResponse(_0x0a9e('0x160'),_0x0a9e('0x139'),_0x0a9e('0x161')));}var _0x1bafdd={'XMD-CALLERID':_0x69b4d6['actions'][_0x1ab878][_0x0a9e('0x162')](),'XMD-AGI':_0x459ab7['dialQueueProject']?util[_0x0a9e('0x7a')](_0x0a9e('0x163'),ipAgi,_0x459ab7['dialQueueProject']):_0x0a9e('0x164'),'XMD-AGIAFTER':_0x459ab7['dialQueueProject2']?util[_0x0a9e('0x7a')](_0x0a9e('0x163'),ipAgi,_0x459ab7[_0x0a9e('0xf4')]):_0x0a9e('0x164'),'XMD-QUEUE':_0x459ab7[_0x0a9e('0x4d')]==='outbound'?util[_0x0a9e('0x7a')](_0x0a9e('0x165'),_0x459ab7[_0x0a9e('0x3f')],_0x459ab7['dialQueueOptions']||'',_0x459ab7[_0x0a9e('0x166')]?'c':'',_0x459ab7['dialQueueTimeout']||0x3):_0x0a9e('0x164'),'XMD-CONTACTID':_0x6e8a19[_0x0a9e('0xcc')],'XMD-CDRTYPE':_0x0a9e('0x6'),'CALLERID(all)':_0x69b4d6['actions'][_0x1ab878][_0x0a9e('0x162')](),'XMD-AMD':_0x459ab7[_0x0a9e('0xdb')]?_0x0a9e('0x167'):_0x0a9e('0x164'),'XMD-DESTINATION':_0x0a9e('0x168')};if(_0x459ab7[_0x0a9e('0xdb')]){_0x1bafdd['XMD-AMDINITIALSILENCE']=_0x459ab7[_0x0a9e('0x169')]||0x9c4;_0x1bafdd[_0x0a9e('0x16a')]=_0x459ab7[_0x0a9e('0x16b')]||0x5dc;_0x1bafdd[_0x0a9e('0x16c')]=_0x459ab7[_0x0a9e('0x16d')]||0x320;_0x1bafdd[_0x0a9e('0x16e')]=_0x459ab7[_0x0a9e('0x16f')]||0x1388;_0x1bafdd[_0x0a9e('0x170')]=_0x459ab7['dialAMDMinWordLength']||0x64;_0x1bafdd[_0x0a9e('0x171')]=_0x459ab7[_0x0a9e('0x172')]||0x32;_0x1bafdd[_0x0a9e('0x173')]=_0x459ab7[_0x0a9e('0x174')]||0x3;_0x1bafdd['XMD-AMDSILENCETHRESHOLD']=_0x459ab7[_0x0a9e('0x175')]||0x100;_0x1bafdd['XMD-AMDMAXIMUMWORDLENGTH']=_0x459ab7[_0x0a9e('0x176')]||0x1388;}if(_0x459ab7[_0x0a9e('0x4d')]===_0x0a9e('0x8d')){_0x1bafdd['XMD-VOICEQUEUEID']=_0x6e8a19[_0x0a9e('0xcf')];}else{_0x1bafdd[_0x0a9e('0x177')]=_0x6e8a19[_0x0a9e('0xd0')];}for(var _0x36c0f4 in _0x6e8a19['Contact']){if(_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0xaa')](_0x36c0f4)){if(isNotNull(_0x6e8a19[_0x0a9e('0x15e')][_0x36c0f4])&&_0x36c0f4!=='id'&&_0x36c0f4!==_0x0a9e('0x178')&&_0x36c0f4!==_0x0a9e('0x179')&&_0x36c0f4!==_0x0a9e('0x17a')){_0x1bafdd[util[_0x0a9e('0x7a')]('%s%s',_0x0a9e('0x17b'),_[_0x0a9e('0x17c')](_0x36c0f4))]=_0x6e8a19[_0x0a9e('0x15e')][_0x36c0f4];}}}var _0xa42055=_0x69b4d6['isTrunkReachable'](_0x459ab7[_0x0a9e('0x78')])?getCallerId(_0x459ab7['Trunk'][_0x0a9e('0x17d')],_0x459ab7[_0x0a9e('0x59')],_0x459ab7[_0x0a9e('0x17e')]>0x0?getCallerIdRandom(_0x459ab7[_0x0a9e('0x17f')],_0x459ab7[_0x0a9e('0x17e')]):_0x459ab7[_0x0a9e('0x17f')]):getCallerId(_[_0x0a9e('0xab')](_0x459ab7['TrunkBackup'])?_0x459ab7[_0x0a9e('0x78')]['callerid']:_0x459ab7[_0x0a9e('0x131')][_0x0a9e('0x17d')],_0x459ab7['dialOriginateCallerIdName'],_0x459ab7[_0x0a9e('0x17e')]>0x0?getCallerIdRandom(_0x459ab7[_0x0a9e('0x17f')],_0x459ab7[_0x0a9e('0x17e')]):_0x459ab7[_0x0a9e('0x17f')]);if(_0xa42055){_0x1bafdd['XMD-ORIGINATECALLERIDNAME']=_0x69b4d6[_0x0a9e('0x24')][_0x1ab878][_0x0a9e('0x180')]=extractCalleridName(_0xa42055);_0x1bafdd['XMD-ORIGINATECALLERIDNUM']=_0x69b4d6[_0x0a9e('0x24')][_0x1ab878]['originatecalleridnum']=extractCalleridNumber(_0xa42055);}return ami['Action']({'actionid':_0x1ab878,'action':'originate','channel':_0x69b4d6[_0x0a9e('0xd4')](_0x459ab7[_0x0a9e('0x78')])?util['format'](_0x0a9e('0x181'),_0x459ab7[_0x0a9e('0x78')]['name'],isNotNull(_0x459ab7[_0x0a9e('0x5b')])?_0x459ab7[_0x0a9e('0x5b')][_0x0a9e('0x182')]()||'':'',_0x459ab7[_0x0a9e('0x183')]>0x0?_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0x15f')][_0x0a9e('0x184')](_0x459ab7['dialCutDigit']):_0x6e8a19[_0x0a9e('0x15e')]['phone']):util[_0x0a9e('0x7a')](_0x0a9e('0x181'),_[_0x0a9e('0xab')](_0x459ab7[_0x0a9e('0x131')])?_0x459ab7[_0x0a9e('0x78')][_0x0a9e('0x3f')]:_0x459ab7['TrunkBackup'][_0x0a9e('0x3f')],isNotNull(_0x459ab7[_0x0a9e('0x5b')])?_0x459ab7[_0x0a9e('0x5b')]['trim']()||'':'',_0x459ab7[_0x0a9e('0x183')]>0x0?_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0x15f')][_0x0a9e('0x184')](_0x459ab7[_0x0a9e('0x183')]):_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0x15f')]),'callerid':_0xa42055,'Exten':_0x0a9e('0x168'),'Context':_0x0a9e('0x185'),'Priority':'1','variable':_0x1bafdd,'timeout':(_0x459ab7[_0x0a9e('0x5a')]||0x1e)*0x3e8,'async':!![],'channelid':_0x1ab878})[_0x0a9e('0xb4')](function(_0x19732c){return _0x5613e3(_0x19732c);})[_0x0a9e('0xac')](function(_0x130947){_0x459ab7[_0x0a9e('0x66')]+=0x1;var _0x2efc65=new History(_0x69b4d6['actions'][_0x1ab878]);logger[_0x0a9e('0x91')](util[_0x0a9e('0x7a')](_0x0a9e('0x186'),JSON['stringify'](_0x130947)));_0x2efc65[_0x0a9e('0xa5')]=0xe;_0x2efc65[_0x0a9e('0xa6')]=_0x0a9e('0x187');_0x2efc65[_0x0a9e('0xa7')]=moment()['format'](_0x0a9e('0xf5'));_0x2efc65[_0x0a9e('0x112')]=_0x2efc65[_0x0a9e('0xa7')];_0x69b4d6[_0x0a9e('0xc5')](_0x2efc65)['catch'](loggerCatch(_0x0a9e('0x188')));_0x69b4d6[_0x0a9e('0xc3')](_0x2efc65)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x188')))['finally'](function(){delete _0x69b4d6['actions'][_0x1ab878];return _0x46146f(msgResponse(_0x0a9e('0x160'),_0x0a9e('0x48'),_0x0a9e('0x189')));});});});};Dialer[_0x0a9e('0x19')][_0x0a9e('0x2f')]=function(_0x433b5d){var _0x15df71=this[_0x0a9e('0x24')][_0x433b5d[_0x0a9e('0x117')]];var _0x84117=this;if(_0x15df71){delete this[_0x0a9e('0x24')][_0x433b5d[_0x0a9e('0x117')]];_0x15df71[_0x0a9e('0xfb')]=moment()[_0x0a9e('0x7a')]('YYYY-MM-DD\x20HH:mm:ss');var _0x7f3b59=_0x15df71[_0x0a9e('0x4d')]===_0x0a9e('0x7d')?this['campaigns'][_0x15df71['queue']]:this[_0x0a9e('0x1e')][_0x15df71['getQueue']()];if(!this[_0x0a9e('0x18a')](_0x433b5d[_0x0a9e('0x18b')])){this[_0x0a9e('0xb0')](_0x7f3b59);return this[_0x0a9e('0x18c')](_0x15df71,_0x7f3b59,_0x433b5d)['then'](function(_0x59ce14){})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x18d')));}else{this[_0x0a9e('0x26')][_0x433b5d[_0x0a9e('0xd8')]]=_0x15df71;}}};Dialer['prototype'][_0x0a9e('0x18e')]=function(_0xc1811b,_0xa64f55,_0x25f5fa){var _0x193ef7=new History(_0xa64f55);if(_0x193ef7['countbusyretry']+_0x193ef7['countcongestionretry']+_0x193ef7[_0x0a9e('0x18f')]+_0x193ef7[_0x0a9e('0x190')]+_0x193ef7[_0x0a9e('0x100')]+_0x193ef7[_0x0a9e('0x10e')]+_0x193ef7[_0x0a9e('0x191')]+_0x193ef7[_0x0a9e('0x192')]>=_0x25f5fa[_0x0a9e('0x193')]-0x1){return!![];}switch(_0xc1811b){case 0x3:if(_0x193ef7['countnoanswerretry']>=_0x25f5fa[_0x0a9e('0x194')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countnoanswerretry':_0x193ef7[_0x0a9e('0x18f')]+=0x1,'scheduledat':moment()['add'](_0x25f5fa['dialNoAnswerRetryFrequency'],'minutes')[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7['ContactId'],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch('[rescheduleContact][NoAnswer]'));}break;case 0x5:if(_0x193ef7[_0x0a9e('0x195')]>=_0x25f5fa[_0x0a9e('0x196')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countbusyretry':_0x193ef7[_0x0a9e('0x195')]+=0x1,'scheduledat':moment()['add'](_0x25f5fa[_0x0a9e('0x197')],'minutes')['format'](_0x0a9e('0xf5')),'ContactId':_0x193ef7['ContactId'],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x198')));}break;case 0x8:if(_0x193ef7[_0x0a9e('0x199')]>=_0x25f5fa[_0x0a9e('0x19a')]-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countcongestionretry':_0x193ef7['countcongestionretry']+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa[_0x0a9e('0x19b')],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7['ListId'],'VoiceQueueId':_0x193ef7['VoiceQueueId']||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact]\x20[Congestion]'));}break;case 0x0:if(_0x193ef7['countnosuchnumberretry']>=_0x25f5fa['dialNoSuchNumberMaxRetry']-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countnosuchnumberretry':_0x193ef7['countnosuchnumberretry']+=0x1,'scheduledat':moment()['add'](_0x25f5fa[_0x0a9e('0x19c')],'minutes')[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0x193ef7[_0x0a9e('0x100')]>=_0x25f5fa[_0x0a9e('0xff')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countdropretry':_0x193ef7[_0x0a9e('0x100')]+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa[_0x0a9e('0x101')],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7['VoiceQueueId']||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][Drop]'));}break;case 0xb:if(_0x193ef7[_0x0a9e('0x10e')]>=_0x25f5fa['dialAbandonedMaxRetry']-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countabandonedretry':_0x193ef7[_0x0a9e('0x10e')]+=0x1,'scheduledat':moment()['add'](_0x25f5fa['dialAbandonedRetryFrequency'],_0x0a9e('0x102'))['format'](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x111')));}break;case 0x13:if(_0x193ef7['countmachineretry']>=_0x25f5fa['dialMachineMaxRetry']-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countmachineretry':_0x193ef7[_0x0a9e('0x191')]+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa[_0x0a9e('0x19d')],_0x0a9e('0x102'))['format'](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7['CampaignId']||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x19e')));}break;case 0x14:if(_0x193ef7['countagentrejectretry']>=_0x25f5fa[_0x0a9e('0x19f')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countagentrejectretry':_0x193ef7[_0x0a9e('0x192')]+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa['dialAgentRejectRetryFrequency'],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7['VoiceQueueId']||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][AgentReject]'));}break;default:return!![];}};Dialer[_0x0a9e('0x19')]['callProgressDetecting']=function(_0x151abc,_0x2f5bfc,_0x41354f){var _0x1f2eaa=this;var _0x9c7523=new History(_0x151abc);return new BPromise(function(_0x115092,_0x25de7c){if(_[_0x0a9e('0x3d')](_0x2f5bfc)&&_0x0a9e('0x15c')!==typeof _0x2f5bfc){return _0x25de7c(msgResponse(_0x0a9e('0x1a0'),_0x0a9e('0x139'),_0x0a9e('0x1a1')));}if(_[_0x0a9e('0x3d')](_0x41354f)&&_0x0a9e('0x15c')!==typeof _0x41354f){return _0x25de7c(msgResponse(_0x0a9e('0x1a0'),'Failure',_0x0a9e('0x1a2')));}switch(_0x41354f[_0x0a9e('0xf1')]){case'0':_0x2f5bfc[_0x0a9e('0x65')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x0;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1a3');_0x9c7523[_0x0a9e('0x190')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa['createHistory'](_0x9c7523)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x1f2eaa['checkRetriveMax'](0x0,_0x151abc,_0x2f5bfc)){if(_0x9c7523[_0x0a9e('0x195')]+_0x9c7523['countcongestionretry']+_0x9c7523['countnoanswerretry']+_0x9c7523['countnosuchnumberretry']+_0x9c7523[_0x0a9e('0x100')]+_0x9c7523[_0x0a9e('0x10e')]+_0x9c7523[_0x0a9e('0x191')]+_0x9c7523[_0x0a9e('0x192')]>=_0x2f5bfc['dialGlobalMaxRetry']){_0x1f2eaa['stateGlobal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1a5'));}else{_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1a5'));}}break;case'3':_0x2f5bfc[_0x0a9e('0x64')]+=0x1;_0x9c7523['state']=0x3;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1a7');_0x9c7523[_0x0a9e('0x18f')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)[_0x0a9e('0xac')](loggerCatch('[syncAgentComplete][createHistory][3]'));if(_0x1f2eaa[_0x0a9e('0x18e')](0x3,_0x151abc,_0x2f5bfc)){if(_0x9c7523['countnoanswerretry']>=_0x2f5bfc['dialNoAnswerMaxRetry']){_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,'reason\x203\x20ringing\x20no\x20answer');}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1a9'));}}break;case'5':_0x2f5bfc[_0x0a9e('0x5f')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x5;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1aa');_0x9c7523[_0x0a9e('0x195')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)['catch'](loggerCatch(_0x0a9e('0x1ab')));if(_0x1f2eaa[_0x0a9e('0x18e')](0x5,_0x151abc,_0x2f5bfc)){if(_0x9c7523['countbusyretry']>=_0x2f5bfc[_0x0a9e('0x196')]){_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1ac'));}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,'reason\x205\x20busy');}}break;case'8':_0x2f5bfc[_0x0a9e('0x60')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x8;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1ad');_0x9c7523[_0x0a9e('0x199')]+=0x1;_0x9c7523['countglobal']+=0x1;_0x1f2eaa['createHistory'](_0x9c7523)[_0x0a9e('0xac')](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0x1f2eaa[_0x0a9e('0x18e')](0x8,_0x151abc,_0x2f5bfc)){if(_0x9c7523['countcongestionretry']>=_0x2f5bfc[_0x0a9e('0x19a')]){_0x1f2eaa['createStateFinal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1ae'));}else{_0x1f2eaa['stateGlobal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1ae'));}}break;case'11':_0x2f5bfc[_0x0a9e('0x1af')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0xb;_0x9c7523['statedesc']='Abandoned';_0x9c7523[_0x0a9e('0x10e')]+=0x1;_0x9c7523['countglobal']+=0x1;_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)['catch'](loggerCatch(_0x0a9e('0x114')));if(_0x1f2eaa['checkRetriveMax'](0xb,_0x151abc,_0x2f5bfc)){if(_0x9c7523[_0x0a9e('0x10e')]>=_0x2f5bfc[_0x0a9e('0x1b0')]){_0x1f2eaa['createStateFinal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1b1'));}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1b1'));}}break;case'20':_0x2f5bfc[_0x0a9e('0x68')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x14;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1b2');_0x9c7523[_0x0a9e('0x192')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa['createHistory'](_0x9c7523)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1b3')));if(_0x1f2eaa[_0x0a9e('0x18e')](0x14,_0x151abc,_0x2f5bfc)){if(_0x9c7523[_0x0a9e('0x192')]>=_0x2f5bfc[_0x0a9e('0x19f')]){_0x1f2eaa['createStateFinal'](_0x9c7523,_0x115092,_0x25de7c,'reason\x2020\x20agentreject');}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,'reason\x2020\x20agentreject');}}break;default:_0x2f5bfc[_0x0a9e('0x1b4')]+=0x1;_0x9c7523['state']=0xc;_0x9c7523[_0x0a9e('0xa6')]=_0x41354f[_0x0a9e('0xf1')];_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1b5')));if(_0x1f2eaa[_0x0a9e('0x18e')](_0x41354f[_0x0a9e('0xf1')],_0x151abc,_0x2f5bfc)){if(_0x9c7523['countbusyretry']+_0x9c7523['countcongestionretry']+_0x9c7523[_0x0a9e('0x18f')]+_0x9c7523[_0x0a9e('0x190')]+_0x9c7523['countdropretry']+_0x9c7523[_0x0a9e('0x10e')]+_0x9c7523[_0x0a9e('0x191')]+_0x9c7523[_0x0a9e('0x192')]>=_0x2f5bfc['dialGlobalMaxRetry']){_0x1f2eaa['stateGlobal'](_0x9c7523,_0x115092,_0x25de7c,_0x41354f['reason']);}else{_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,_0x41354f[_0x0a9e('0xf1')]);}}}});};Dialer[_0x0a9e('0x19')][_0x0a9e('0x1a8')]=function(_0x4ab36f,_0x2fec22,_0x5d0eb5,_0x103402){var _0x547a2a=new Final(_0x4ab36f);_0x547a2a[_0x0a9e('0xa5')]=0xf;_0x547a2a['statedesc']='Global';this[_0x0a9e('0x1a6')](_0x547a2a,_0x2fec22,_0x5d0eb5,_0x103402);};Dialer[_0x0a9e('0x19')]['createStateFinal']=function(_0x5dbf0b,_0x31114d,_0x5dacb3,_0x1352c){this['moveContactManagedDialer'](_0x5dbf0b)[_0x0a9e('0xb4')](function(_0xb5209d){return _0x31114d(msgResponse(_0x0a9e('0x1a0'),'Success',_0x1352c));})['catch'](function(_0x1754c8){return _0x5dacb3(msgResponse(_0x0a9e('0x1b6'),_0x0a9e('0x139'),_0x0a9e('0x1b7')));});};Dialer['prototype'][_0x0a9e('0x8')]=function(_0x136d28){var _0x539ad9=this;var _0x360306=_0x136d28[_0x0a9e('0x1b8')]/0x64;var _0x11ba87=_0x136d28['outboundDropCallsDayTimeout']/(_0x136d28[_0x0a9e('0x63')]+_0x136d28[_0x0a9e('0x5d')]);var _0xb1fd37=Math[_0x0a9e('0x1b9')](_0x136d28[_0x0a9e('0x72')]*(_0x136d28[_0x0a9e('0x1ba')]/0x64));var _0x7412c=Math[_0x0a9e('0x1b9')](_0x136d28[_0x0a9e('0x72')]*(_0x136d28[_0x0a9e('0x1bb')]/0x64));var _0x3f5891=_0x136d28[_0x0a9e('0x9f')]+_0x136d28[_0x0a9e('0x53')];var _0x34ff77=Math[_0x0a9e('0x1bc')](_0x136d28[_0x0a9e('0x74')]*_0x136d28[_0x0a9e('0x76')]*_0x136d28[_0x0a9e('0x6f')]*_0x136d28[_0x0a9e('0x70')]);if(_[_0x0a9e('0x3d')](_0x136d28[_0x0a9e('0x28')])){if(!_[_0x0a9e('0x3d')](_0x136d28['startPredictive'])){_0x136d28[_0x0a9e('0x27')]=undefined;loggerPredictive[_0x0a9e('0x91')](_0x0a9e('0x1bd'),'check\x20predictive\x20is\x20not\x20undefine');}if(!_[_0x0a9e('0x3d')](_0x136d28[_0x0a9e('0x8b')])){loggerPredictive[_0x0a9e('0x91')](_0x0a9e('0x1bd'),'check\x20handlePredictive\x20is\x20not\x20undefine');clearInterval(_0x136d28[_0x0a9e('0x8b')]);_0x136d28[_0x0a9e('0x8b')]=undefined;}_0x136d28['startProgressive']=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));loggerPredictive[_0x0a9e('0x80')](_0x136d28['name'],'collection\x20data\x20in\x20progressive\x20at',_0x136d28[_0x0a9e('0x28')]);this[_0x0a9e('0x14c')](_0x136d28,0x1);}else if(ifInterval(_0x136d28[_0x0a9e('0x1be')],_0x136d28['startProgressive'])){this['handlePower'](_0x136d28,0x1);loggerPredictiveCalls[_0x0a9e('0x80')](_0x0a9e('0x1bf'),_0x136d28[_0x0a9e('0x28')],_0x136d28[_0x0a9e('0x3f')]);_0x136d28['erlangCalls']=0x0;_0x136d28[_0x0a9e('0x6e')]=0x0;}else if(_0x360306<_0x11ba87&&_0x136d28['dialPredictiveOptimization']==='dropRate'){freeVariablesPredictive(_0x136d28);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x1c0'),_0x0a9e('0x1c1'),_0x11ba87,'startProgressive',_0x136d28[_0x0a9e('0x3f')]);}else if(_0x34ff77<_0x136d28[_0x0a9e('0x6e')]&&_0x136d28[_0x0a9e('0x1c2')]==='dropRate'){freeVariablesPredictive(_0x136d28);loggerPredictive['info'](_0x0a9e('0x1c3'),_0x0a9e('0x1c4'),_0x34ff77,_0x0a9e('0x1c5'),_0x136d28['predictiveIntervalErlangCallsDroppedCalls'],'startProgressive',_0x136d28[_0x0a9e('0x3f')]);}else if(!ifInterval(_0x136d28['dialPredictiveInterval'],_0x136d28['startProgressive'])&&_['isUndefined'](_0x136d28[_0x0a9e('0x27')])&&!_[_0x0a9e('0x3d')](_0x136d28[_0x0a9e('0x28')])){_0x136d28['startPredictive']=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));loggerPredictive['info'](_0x136d28[_0x0a9e('0x3f')],'started\x20in\x20predictive\x20at',_0x136d28[_0x0a9e('0x27')]);this[_0x0a9e('0xb8')](_0x136d28['dialPredictiveInterval'])[_0x0a9e('0xb4')](this[_0x0a9e('0x1c6')](_0x136d28))[_0x0a9e('0xb4')](mergeDataErlangB(_0x136d28))['then'](this[_0x0a9e('0x1c7')](_0x136d28))[_0x0a9e('0xac')](loggerCatchPredictive(_0x0a9e('0x1c8'),_0x136d28));}else if(!ifInterval(_0x136d28['dialPredictiveInterval'],_0x136d28[_0x0a9e('0x27')])){_0x136d28[_0x0a9e('0x6e')]=0x0;_0x136d28[_0x0a9e('0x27')]=moment()['format'](_0x0a9e('0xf5'));loggerPredictive[_0x0a9e('0x80')](_0x136d28[_0x0a9e('0x3f')],_0x0a9e('0x1c9'),_0x136d28[_0x0a9e('0x27')]);clearInterval(_0x136d28[_0x0a9e('0x8b')]);_0x136d28[_0x0a9e('0x8b')]=undefined;this[_0x0a9e('0xb8')](_0x136d28['dialPredictiveInterval'])[_0x0a9e('0xb4')](this[_0x0a9e('0x1c6')](_0x136d28))[_0x0a9e('0xb4')](mergeDataErlangB(_0x136d28))[_0x0a9e('0xb4')](this['startMethodPredictive'](_0x136d28))[_0x0a9e('0xac')](loggerCatchPredictive(_0x0a9e('0x1ca'),_0x136d28));}else if(_0x136d28['predictiveIntervalAvailable']&&_0x3f5891<_0x136d28[_0x0a9e('0x72')]-_0x7412c){freeVariablesPredictive(_0x136d28);loggerPredictive[_0x0a9e('0x80')](_0x136d28[_0x0a9e('0x3f')],_0x0a9e('0x1cb'),_0x3f5891,_0x0a9e('0x1cc'),_0x136d28[_0x0a9e('0x72')],'-',_0x7412c,'=',_0x136d28[_0x0a9e('0x72')]-_0x7412c,')');}else if(_0x136d28[_0x0a9e('0x72')]&&_0x3f5891>_0x136d28['predictiveIntervalAvailable']+_0xb1fd37){freeVariablesPredictive(_0x136d28);loggerPredictive[_0x0a9e('0x80')](_0x136d28['name'],_0x0a9e('0x1cb'),_0x3f5891,_0x0a9e('0x1cd'),_0x136d28['predictiveIntervalAvailable'],'+',_0xb1fd37,'=',_0x136d28[_0x0a9e('0x72')]+_0xb1fd37,')');}};Dialer[_0x0a9e('0x19')]['getDataPredictive']=function(_0x1b4341){var _0x3eff33=this;return function(_0x5b6054){return new BPromise(function(_0xe89e7c,_0x4e8b2a){_['merge'](_0x1b4341,_0x5b6054[0x0]);if(checkGetDataPredictive(_0x5b6054[0x0])){var _0x57d6ff=_0x1b4341[_0x0a9e('0x72')]=_0x1b4341[_0x0a9e('0x53')]+_0x1b4341['available'];var _0x41a8f0=_0x1b4341[_0x0a9e('0x1be')]*0x3c;var _0x5d26c8=_0x5b6054[0x0][_0x0a9e('0x6a')]+_0x5b6054[0x0][_0x0a9e('0x69')];var _0x4bdcd3=(_0x5b6054[0x0][_0x0a9e('0x83')]+_0x5b6054[0x0][_0x0a9e('0x6c')]+_0x5b6054[0x0][_0x0a9e('0x6b')])/_0x5b6054[0x0]['predictiveIntervalTotalCalls'];_0x1b4341[_0x0a9e('0x6f')]=_0x4bdcd3>0x0?_0x4bdcd3:0x1;switch(_0x1b4341[_0x0a9e('0x1c2')]){case _0x0a9e('0x1ce'):var _0x956255=_0x1b4341[_0x0a9e('0x1b8')]/0x64;return _0x3eff33['abandonmentRate'](_0x57d6ff,_0x41a8f0,_0x5d26c8,_0x4bdcd3,_0x956255)[_0x0a9e('0xb4')](function(_0x495ac6){return _0xe89e7c(_0x495ac6);});case _0x0a9e('0x1cf'):var _0x43e45a=_0x1b4341[_0x0a9e('0x1b8')]/0x64;return _0x3eff33[_0x0a9e('0x1d0')](_0x57d6ff,_0x41a8f0,_0x5d26c8,_0x4bdcd3,_0x43e45a)[_0x0a9e('0xb4')](function(_0x25cae1){return _0xe89e7c(_0x25cae1);});default:return _0x4e8b2a(msgResponse(_0x0a9e('0x1d1'),_0x0a9e('0x139'),_0x0a9e('0x1d2')));}}else{return _0x4e8b2a(msgResponse('[getDataPredictive]',_0x0a9e('0x139'),_0x0a9e('0x1d3')));}});};};Dialer[_0x0a9e('0x19')]['getDataPredictiveOld']=function(_0x48782d){var _0x5c2e1b=this;return function(_0x4b99fb){return new BPromise(function(_0x49e349,_0x347d13){_['merge'](_0x48782d,_0x4b99fb[0x0]);if(checkGetDataPredictive(_0x4b99fb[0x0])){loggerPredictive[_0x0a9e('0x80')](JSON[_0x0a9e('0x49')](_0x4b99fb[0x0]));if(_0x48782d[_0x0a9e('0x1c2')]===_0x0a9e('0x1ce')){return _0x5c2e1b[_0x0a9e('0xc1')](_0x48782d['id'])[_0x0a9e('0xb4')](function(_0x5dd837){var _0x20a1c0=_0x48782d['loggedIn']-_0x5dd837[0x0]['outboundQueuePauses'];var _0x139b02=_0x48782d['dialPredictiveInterval']*0x3c;var _0x2885c8=_0x4b99fb[0x0]['predictiveIntervalAvgTalktime']+_0x4b99fb[0x0][_0x0a9e('0x69')];var _0x638297=(_0x4b99fb[0x0][_0x0a9e('0x83')]+_0x4b99fb[0x0][_0x0a9e('0x6c')]+_0x4b99fb[0x0][_0x0a9e('0x6b')])/_0x4b99fb[0x0]['predictiveIntervalTotalCalls'];var _0x1ee915=_0x48782d[_0x0a9e('0x1b8')]/0x64;_0x48782d['predictiveIntervalPauses']=_0x5dd837[0x0][_0x0a9e('0x1d4')]||0x0;_0x48782d[_0x0a9e('0x6f')]=_0x638297>0x0?_0x638297:0x1;return _0x5c2e1b['abandonmentRate'](_0x20a1c0,_0x139b02,_0x2885c8,_0x638297,_0x1ee915);})[_0x0a9e('0xb4')](function(_0x26320a){return _0x49e349(_0x26320a);})[_0x0a9e('0xac')](function(_0x3f8171){return _0x347d13(msgResponse(_0x0a9e('0x1d5'),_0x0a9e('0x139'),JSON[_0x0a9e('0x49')](_0x3f8171)));});}if(_0x48782d['dialPredictiveOptimization']===_0x0a9e('0x1cf')){return _0x5c2e1b[_0x0a9e('0xc1')](_0x48782d['id'])[_0x0a9e('0xb4')](function(_0x16a8c4){var _0x587f68=_0x48782d[_0x0a9e('0x4f')]-_0x16a8c4[0x0][_0x0a9e('0x1d4')];var _0x189e15=_0x48782d[_0x0a9e('0x1be')]*0x3c;var _0x32c53e=_0x4b99fb[0x0][_0x0a9e('0x6a')]+_0x4b99fb[0x0][_0x0a9e('0x69')];var _0x8095d6=(_0x4b99fb[0x0]['predictiveIntervalAnsweredCalls']+_0x4b99fb[0x0][_0x0a9e('0x6c')]+_0x4b99fb[0x0][_0x0a9e('0x6b')])/_0x4b99fb[0x0][_0x0a9e('0x73')];var _0x4a80a0=_0x48782d[_0x0a9e('0x1b8')]/0x64;_0x48782d[_0x0a9e('0x71')]=_0x16a8c4[0x0][_0x0a9e('0x1d4')]||0x0;_0x48782d[_0x0a9e('0x6f')]=_0x8095d6>0x0?_0x8095d6:0x1;return _0x5c2e1b[_0x0a9e('0x1d0')](_0x587f68,_0x189e15,_0x32c53e,_0x8095d6,_0x4a80a0);})[_0x0a9e('0xb4')](function(_0x13f18){return _0x49e349(_0x13f18);})[_0x0a9e('0xac')](function(_0x16b449){return _0x347d13(msgResponse(_0x0a9e('0x1d5'),'Failure',JSON[_0x0a9e('0x49')](_0x16b449)));});}}else{return _0x347d13(msgResponse(_0x0a9e('0x1d1'),_0x0a9e('0x139'),'check\x20failure'));}});};};Dialer['prototype'][_0x0a9e('0x1c7')]=function(_0x37165a){var _0x395034=this;return function(){var _0x73014f=0x0;var _0x2cbfa3=Math[_0x0a9e('0x1bc')](_0x37165a[_0x0a9e('0x75')]*0x3e8);if(_0x2cbfa3>0x0){_0x2cbfa3=_0x2cbfa3<0x64?0x64:_0x2cbfa3;loggerPredictive[_0x0a9e('0x80')](_0x37165a[_0x0a9e('0x3f')],'one\x20call\x20every:',_0x2cbfa3,_0x0a9e('0x1d6'));_0x37165a[_0x0a9e('0x8b')]=setInterval(function(){_0x395034['handlePredictive'](_0x37165a);loggerPredictiveCalls[_0x0a9e('0x80')](_0x0a9e('0x1d7'),_0x73014f+=0x1);},_0x2cbfa3);}else{loggerPredictive['info'](_0x37165a['name'],_0x0a9e('0x1d8'));}};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x1d9')]=function(_0x31f9fe,_0x33d28f){var _0x548204=this;return function(_0x468a11){if(_['isEmpty'](_0x468a11)){if(_['isNil'](_0x33d28f['UserId'])||!_0x33d28f[_0x0a9e('0x1da')]){if(_0x31f9fe['dialMethod']==='booked'){_0x31f9fe['queueStatusComplete']=_[_0x0a9e('0x3d')](_0x31f9fe[_0x0a9e('0x11f')])?!![]:_0x31f9fe[_0x0a9e('0x11f')];var _0x45520d=uuid['v4']();_0x548204['actions'][_0x45520d]=new Action(_0x31f9fe,_0x33d28f,_0x45520d);loggerBooked[_0x0a9e('0x80')]('[booked][checkContactBlack]',_0x45520d,'queueStatusComplete:\x20',JSON[_0x0a9e('0x49')](_0x31f9fe[_0x0a9e('0x11f')]),_0x0a9e('0x1db'),_0x31f9fe['name']);if(_0x31f9fe['queueStatusComplete']){_0x31f9fe['queueStatusComplete']=![];_0x548204[_0x0a9e('0x29')][_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xaf')]]=[];ami[_0x0a9e('0x13c')]({'actionid':_0x45520d,'action':_0x0a9e('0x1dc'),'queue':_0x31f9fe['name']})[_0x0a9e('0xac')](function(_0x1036d4){_0x548204[_0x0a9e('0xb0')](_0x31f9fe);_0x548204[_0x0a9e('0xbb')]({'active':![],'ContactId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xcc')],'ListId':_0x548204['actions'][_0x45520d][_0x0a9e('0xcd')],'VoiceQueueId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xcf')]||undefined,'CampaignId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1dd')));delete _0x548204[_0x0a9e('0x24')][_0x45520d];});}else{loggerBooked[_0x0a9e('0x80')](_0x0a9e('0x1de'),JSON[_0x0a9e('0x49')](_0x31f9fe[_0x0a9e('0x11f')]),_0x0a9e('0x1db'),_0x31f9fe[_0x0a9e('0x3f')]);_0x548204[_0x0a9e('0xb0')](_0x31f9fe);_0x548204[_0x0a9e('0xbb')]({'active':![],'ContactId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xcc')],'ListId':_0x548204['actions'][_0x45520d][_0x0a9e('0xcd')],'VoiceQueueId':_0x548204[_0x0a9e('0x24')][_0x45520d]['VoiceQueueId']||undefined,'CampaignId':_0x548204['actions'][_0x45520d]['CampaignId']||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1dd')));delete _0x548204['actions'][_0x45520d];}}else{return _0x548204[_0x0a9e('0x15b')](_0x31f9fe,_0x33d28f);}}else{if(getDiff(_0x33d28f[_0x0a9e('0x1df')])<_0x31f9fe['dialRecallMeTimeout']*0x3c){if(_0x33d28f[_0x0a9e('0x1e0')]&&!_0x33d28f['Agent'][_0x0a9e('0x1e1')]){_0x548204['preview'][_0x0a9e('0x122')](_0x33d28f['id'])[_0x0a9e('0x1c')](function(){_0x548204[_0x0a9e('0xb0')](_0x31f9fe);});}else{_0x548204[_0x0a9e('0xbd')]({'active':![]},_0x33d28f['id'],0x1)['finally'](function(){console[_0x0a9e('0x108')](_0x0a9e('0x1e2'));_0x548204[_0x0a9e('0xb0')](_0x31f9fe);});}}else{_0x31f9fe['outboundReCallsDay']+=0x1;_0x548204['updateOriginated'](_0x31f9fe);if(_0x31f9fe['dialRecallInQueue']){_0x548204['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x33d28f[_0x0a9e('0xcc')],'ListId':_0x33d28f[_0x0a9e('0xcd')],'VoiceQueueId':_0x33d28f[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x33d28f[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));_0x548204[_0x0a9e('0xc5')](createObjHistory(_0x31f9fe,_0x33d28f,_0x0a9e('0x1e3'),0x17,_0x0a9e('0x1e4')))[_0x0a9e('0xac')](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x548204[_0x0a9e('0xca')](createObjHistory(_0x31f9fe,_0x33d28f,_0x0a9e('0x1e5'),0x16,_0x0a9e('0x1e6')),_0x0a9e('0x1e7'),_0x0a9e('0x1e8'));}}}}else{_0x31f9fe['outboundBlacklistCallsDay']+=0x1;_0x548204[_0x0a9e('0xca')](createObjHistory(_0x31f9fe,_0x33d28f,_0x0a9e('0x1e9'),0xd,_0x0a9e('0x1ea')),'[Originate][historyBlacklist]',_0x0a9e('0x1eb'));throw'inBlackList';}};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x150')]=function(_0x126fa7){var _0xda737b=this;var _0x415fce=[];var _0x59f11d=_0x126fa7[_0x0a9e('0x1ec')]-_0x126fa7[_0x0a9e('0x95')]-_0x126fa7[_0x0a9e('0x1ed')];emitCampaignSummary(_0x126fa7);if(_0x59f11d>0x0){if(_0x59f11d>this[_0x0a9e('0x22')]){_0x59f11d=this[_0x0a9e('0x22')];}_0x126fa7['temp']+=_0x59f11d;this[_0x0a9e('0xc0')](_0x126fa7['id'],_0x59f11d,_0x126fa7[_0x0a9e('0x1ee')])[_0x0a9e('0xb4')](function(_0x5bba8b){_0x126fa7[_0x0a9e('0x1ed')]-=_0x59f11d;_0x126fa7['temp']=_0x126fa7['temp']>0x0?_0x126fa7[_0x0a9e('0x1ed')]:0x0;if(!checkContactEmpty(_0x5bba8b)){_0x126fa7['message']=_0x0a9e('0x9c');logger[_0x0a9e('0x80')](_0x0a9e('0x1ef')+_0x126fa7['name']);}else{_0x126fa7[_0x0a9e('0x95')]+=_0x5bba8b[_0x0a9e('0x94')];_0x126fa7[_0x0a9e('0x3e')]=_0x0a9e('0x1f0');for(var _0x3bd4da=0x0;_0x3bd4da<_0x5bba8b[_0x0a9e('0x94')];_0x3bd4da+=0x1){_0x126fa7[_0x0a9e('0x1f1')]+=0x1;if(_[_0x0a9e('0xab')](_0x5bba8b[_0x3bd4da])||_['isNil'](_0x5bba8b[_0x3bd4da][_0x0a9e('0x15e')])||_[_0x0a9e('0xab')](_0x5bba8b[_0x3bd4da][_0x0a9e('0x15e')][_0x0a9e('0x15f')])){_0xda737b[_0x0a9e('0xc9')]('[actionOriginate]\x20',_0x126fa7,_0x5bba8b[_0x3bd4da]);}else{_0xda737b['checkIsBlackListIvr'](_[_0x0a9e('0xcb')](_0x5bba8b[_0x3bd4da],['CampaignId',_0x0a9e('0x1f2')]))[_0x0a9e('0xb4')](_0xda737b['checkContactBlack'](_0x126fa7,_0x5bba8b[_0x3bd4da]))[_0x0a9e('0xac')](_0xda737b[_0x0a9e('0xc8')](_0x0a9e('0x1f3'),_0x126fa7));}}}})['catch'](loggerGetContactDialer(_0x0a9e('0x1f4'),_0x126fa7,_0x59f11d));}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x14c')]=function(_0x14cf4c,_0x1b2cf5){var _0x1d7537=this;var _0x9ecf57=[];var _0x305a4b=_0x1b2cf5>=0x1?_0x1b2cf5:0x1;var _0x5695b6=[];if(_0x14cf4c[_0x0a9e('0x58')]===_0x0a9e('0x7')){_0x305a4b=0x1;}var _0x459efc=Math[_0x0a9e('0x1bc')](_0x14cf4c[_0x0a9e('0x9f')]*_0x305a4b)-_0x14cf4c['originated']-_0x14cf4c[_0x0a9e('0x1ed')];emitVoiceQueueSummary(_0x14cf4c);if(_0x14cf4c['dialLimitQueue']>0x0){var _0x36ff91=_0x14cf4c[_0x0a9e('0x1f5')]-_0x14cf4c[_0x0a9e('0x95')]-_0x14cf4c['talking']-_0x14cf4c[_0x0a9e('0x1ed')]-_0x14cf4c['pTalking'];if(_0x459efc>_0x36ff91){_0x459efc=_0x36ff91;}}if(_0x459efc>0x0){if(_0x14cf4c[_0x0a9e('0x58')]===_0x0a9e('0x7')){_0x459efc=0x1;}if(_0x459efc>this[_0x0a9e('0x22')]){_0x459efc=this[_0x0a9e('0x22')];}_0x14cf4c['temp']+=_0x459efc;for(var _0x323936 in this['agents']){if(this[_0x0a9e('0x20')][_0x0a9e('0xaa')](_0x323936)){if(this['agents'][_0x323936][_0x0a9e('0xa5')]===_0x0a9e('0x1f6')&&this[_0x0a9e('0x20')][_0x323936]['status']===_0x0a9e('0x1f7')){_0x9ecf57['push'](this[_0x0a9e('0x20')][_0x323936]['id']);}}}this[_0x0a9e('0xbe')](_0x14cf4c['id'],_0x9ecf57,_0x459efc,_0x14cf4c['dialOrderByScheduledAt'])['then'](function(_0x4b3f95){_0x14cf4c['temp']-=_0x459efc;_0x14cf4c[_0x0a9e('0x1ed')]=_0x14cf4c[_0x0a9e('0x1ed')]>0x0?_0x14cf4c[_0x0a9e('0x1ed')]:0x0;if(!checkContactEmpty(_0x4b3f95)){_0x1d7537[_0x0a9e('0xb2')](_0x14cf4c)['then'](sendMessageReschedule(_0x14cf4c))[_0x0a9e('0xac')](loggerCatch('[countReScheduled]\x20'));}else{_0x14cf4c[_0x0a9e('0x95')]+=_0x4b3f95[_0x0a9e('0x94')];_0x14cf4c['message']=_0x14cf4c[_0x0a9e('0x58')]===_0x0a9e('0x7')?_0x0a9e('0x167'):_0x0a9e('0x1f0');for(var _0x37c272=0x0;_0x37c272<_0x4b3f95[_0x0a9e('0x94')];_0x37c272+=0x1){if(_[_0x0a9e('0xab')](_0x4b3f95[_0x37c272])||_['isNil'](_0x4b3f95[_0x37c272][_0x0a9e('0x15e')])||_[_0x0a9e('0xab')](_0x4b3f95[_0x37c272][_0x0a9e('0x15e')][_0x0a9e('0x15f')])){_0x1d7537[_0x0a9e('0xc9')](_0x0a9e('0x1f8'),_0x14cf4c,_0x4b3f95[_0x37c272]);}else{_0x1d7537[_0x0a9e('0x1f9')](_[_0x0a9e('0xcb')](_0x4b3f95[_0x37c272],[_0x0a9e('0xcf'),_0x0a9e('0x1f2')]))[_0x0a9e('0xb4')](_0x1d7537['checkContactBlack'](_0x14cf4c,_0x4b3f95[_0x37c272]))[_0x0a9e('0xac')](_0x1d7537[_0x0a9e('0xc8')](_0x0a9e('0x1f8'),_0x14cf4c));}}}})[_0x0a9e('0xac')](loggerGetContactDialer(_0x0a9e('0x1fa'),_0x14cf4c,_0x459efc));}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x8b')]=function(_0x5b393b){var _0x2c2a3e=this;if(_0x5b393b[_0x0a9e('0x1f5')]>0x0){var _0x1d504a=_0x5b393b['dialLimitQueue']-_0x5b393b[_0x0a9e('0x95')]-_0x5b393b[_0x0a9e('0x53')];if(_0x1d504a>0x0){this[_0x0a9e('0x1fb')](_0x5b393b);}else{loggerPredictiveCalls['info']('[handlePredictive][limitChannel]');}}else{this[_0x0a9e('0x1fb')](_0x5b393b);}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x1fb')]=function(_0x4061b2){var _0x241492=this;var _0x5e29c1=[];_0x4061b2[_0x0a9e('0x95')]+=0x1;for(var _0x584f70 in this[_0x0a9e('0x20')]){if(this[_0x0a9e('0x20')]['hasOwnProperty'](_0x584f70)){if(this[_0x0a9e('0x20')][_0x584f70]['state']===_0x0a9e('0x1f6')&&this[_0x0a9e('0x20')][_0x584f70]['status']===_0x0a9e('0x1f7')){_0x5e29c1[_0x0a9e('0x11b')](this[_0x0a9e('0x20')][_0x584f70]['id']);}}}this['getContactDialer'](_0x4061b2['id'],_0x5e29c1,0x1,_0x4061b2[_0x0a9e('0x1ee')])[_0x0a9e('0xb4')](function(_0x15b9f7){if(!checkContactEmpty(_0x15b9f7)){checkContactLowerLimitOriginate(_0x4061b2,0x1,0x0);_0x241492[_0x0a9e('0xb2')](_0x4061b2)[_0x0a9e('0xb4')](sendMessageReschedule(_0x4061b2))[_0x0a9e('0xac')](loggerCatch('[countReScheduled]\x20'));}else{_0x4061b2[_0x0a9e('0x3e')]=_0x0a9e('0x1f0');if(_[_0x0a9e('0xab')](_0x15b9f7[0x0])||_[_0x0a9e('0xab')](_0x15b9f7[0x0]['Contact'])||_['isNil'](_0x15b9f7[0x0][_0x0a9e('0x15e')][_0x0a9e('0x15f')])){_0x241492[_0x0a9e('0xc9')]('[actionOriginate]\x20',_0x4061b2,_0x15b9f7[0x0]);}else{_0x241492['checkIsBlackList'](_[_0x0a9e('0xcb')](_0x15b9f7[0x0],['VoiceQueueId','Contact.phone']))[_0x0a9e('0xb4')](_0x241492[_0x0a9e('0x1d9')](_0x4061b2,_0x15b9f7[0x0]))['catch'](_0x241492[_0x0a9e('0xc8')](_0x0a9e('0x1fc'),_0x4061b2));}}})[_0x0a9e('0xac')](loggerGetContactDialer(_0x0a9e('0x1fd'),_0x4061b2,0x1));emitVoiceQueueSummary(_0x4061b2);};Dialer[_0x0a9e('0x19')]['abandonmentRate']=function(_0x395897,_0x1db07,_0x499e86,_0x12c434,_0x27668b,_0x1b6408){loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x1fe'));loggerPredictive['info'](_0x0a9e('0x1ff'),_0x395897);loggerPredictive[_0x0a9e('0x80')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1db07);loggerPredictive['info'](_0x0a9e('0x200'),_0x499e86);loggerPredictive[_0x0a9e('0x80')]('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',_0x12c434);loggerPredictive['info'](_0x0a9e('0x201'),_0x27668b);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x88'));return new BPromise(function(_0x46ba2c,_0xb6d223){if(_0x395897<=0x0||isNaN(_0x395897)){return _0xb6d223(msgResponse('[abandonmentRate]',_0x0a9e('0x48'),'m\x20=\x20'+_0x395897));}if(_0x499e86<=0x0||isNaN(_0x499e86)){return _0xb6d223(msgResponse('[abandonmentRate]',_0x0a9e('0x48'),'Ts\x20=\x20'+_0x499e86));}if(_0x12c434<=0x0||isNaN(_0x12c434)){return _0xb6d223(msgResponse(_0x0a9e('0x202'),'Error',_0x0a9e('0x203')+_0x12c434));}if(_0x1db07<=0x0||isNaN(_0x1db07)){return _0xb6d223(msgResponse('[abandonmentRate]','Error',_0x0a9e('0x204')+_0x1db07));}if(_0x27668b<=0x0||isNaN(_0x27668b)){return _0xb6d223(msgResponse(_0x0a9e('0x202'),_0x0a9e('0x48'),'Amax\x20=\x20'+_0x27668b));}_0x1b6408=_0x1b6408||0x0;var _0x58c6a8=0x1/_0x499e86;var _0x537da0=0x0;var _0x4239b8=0x0;var _0x70ca91=0x0;var _0x4a3895=0x0;for(var _0x2ed3ba=0x0;_0x70ca91<_0x27668b;_0x2ed3ba+=0x1){_0x4239b8=_0x2ed3ba/_0x1db07;_0x537da0=(_0x12c434*_0x4239b8+_0x1b6408)/_0x58c6a8;_0x70ca91=erlangb(_0x537da0,_0x395897);_0x4a3895=_0x537da0/_0x395897*(0x1-erlangb(_0x537da0,_0x395897));}return _0x46ba2c({'erlangCalls':_0x2ed3ba,'erlangCallToSecond':_0x1db07/_0x2ed3ba,'erlangAbandonmentRate':_0x70ca91,'erlangBusyFactor':_0x4a3895});});};Dialer['prototype'][_0x0a9e('0x1d0')]=function(_0x4e8586,_0x4665ea,_0x247806,_0x56736e,_0x5925f7,_0x4c4874){loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x205'));loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x1ff'),_0x4e8586);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x206'),_0x4665ea);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x200'),_0x247806);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x207'),_0x56736e);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x208'),_0x5925f7);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x88'));return new BPromise(function(_0x2e8669,_0x5242e9){if(_0x4e8586<=0x0||isNaN(_0x4e8586)){return _0x5242e9(msgResponse('[busyFactor]',_0x0a9e('0x48'),_0x0a9e('0x209')+_0x4e8586));}if(_0x247806<=0x0||isNaN(_0x247806)){return _0x5242e9(msgResponse(_0x0a9e('0x20a'),_0x0a9e('0x48'),'Ts\x20=\x20'+_0x247806));}if(_0x56736e<=0x0||isNaN(_0x56736e)){return _0x5242e9(msgResponse(_0x0a9e('0x20a'),'Error',_0x0a9e('0x203')+_0x56736e));}if(_0x4665ea<=0x0||isNaN(_0x4665ea)){return _0x5242e9(msgResponse('[busyFactor]',_0x0a9e('0x48'),'interval\x20=\x20'+_0x4665ea));}if(_0x5925f7<=0x0||isNaN(_0x5925f7)){return _0x5242e9(msgResponse('[busyFactor]',_0x0a9e('0x48'),_0x0a9e('0x20b')+_0x5925f7));}_0x4c4874=_0x4c4874||0x0;var _0xc2ae55=0x1/_0x247806;var _0x164ba4=0x0;var _0x502bd9=0x0;var _0x48b8e7=0x0;var _0x5b53aa=0x0;for(var _0x5d54fb=0x0;_0x5b53aa<_0x5925f7;_0x5d54fb+=0x1){_0x502bd9=_0x5d54fb/_0x4665ea;_0x164ba4=(_0x56736e*_0x502bd9+_0x4c4874)/_0xc2ae55;_0x48b8e7=erlangb(_0x164ba4,_0x4e8586);_0x5b53aa=_0x164ba4/_0x4e8586*(0x1-erlangb(_0x164ba4,_0x4e8586));}return _0x2e8669({'erlangCalls':_0x5d54fb,'erlangCallToSecond':_0x4665ea/_0x5d54fb,'erlangAbandonmentRate':_0x48b8e7,'erlangBusyFactor':_0x5b53aa});});};module[_0x0a9e('0x20c')]=Dialer;
\ No newline at end of file
+var _0xa9e0=['[syncMachineIvr]','[syncHangupIvr][createHistory]','dialQueueProject','AGI','[syncHangupIvr]','cause-txt','Unknow','reason','agent','agiafterat','dialQueueProject2','YYYY-MM-DD\x20HH:mm:ss','[syncAgentComplete][createHistory]','[syncAgentComplete]','answertime','queueCallerAbandonCreateState','droptime','responsetime','dialQueueTimeout','Drop','TIMEOUT','dialDropMaxRetry','countdropretry','dialDropRetryFrequency','minutes','[rescheduleContact][Drop]','calleridname','calleridnum','CRIS\x20evt\x2010.1','CRIS\x20queueCallerAbandon\x2010.1','log','CRIS\x20createHistory\x2010.1','[syncAgentComplete][createHistory][10]','Abandoned','dropreason','CALLEREXIT','countabandonedretry','add','dialAbandonedRetryFrequency','[rescheduleContact][Abandoned]','endtime','CRIS\x20createHistory\x2011','[syncAgentComplete][createHistory][11]','syncNewExten','channel','actionid','locked','paused','stateinterface','push','merge','idHopper','[unlockQueueStatus][undefined]','queueStatusComplete','[booked][unlockQueueStatus]','preview','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','[booked][unlock2]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncCampaigns','checkIsTrunkReachable','TrunkBackup','TRUNK_IS_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTime','checkIfTimeIntervals','\x20Intervals\x20is\x20null\x20','INTERVAL_IS_EMPTY','Failure','\x20Timezone\x20unknow\x20','isArray','Action','command','iftime\x20%s,%s','interval','timezones','content','true','all','some','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','checkDialMethod','power','handlePower','Queue','method\x20not\x20recognized','launchHandleIvr','handleIvr','syncQueueSummary','dialGlobalInterval','dialTimezone','[syncQueueSummary]','[syncCampaigns]','\x5cw{0,','pow','replace','random','match','actionOriginate','object','voiceQueue\x20is\x20undefine','Contact','phone','originate','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','\x22%s,%s%s,,,%s\x22','dialAgiAfterHangupAgent','ACTIVE','xcally-motion-dialer','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','XMD-CAMPAIGNID','tags','createdAt','updatedAt','XMD-','toUpper','callerid','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','originatecalleridname','SIP/%s/%s%s','trim','dialCutDigit','substring','from-sip','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','isSuccess','response','callProgressDetecting','[callProgressDetecting]\x20','checkRetriveMax','countnoanswerretry','countnosuchnumberretry','countmachineretry','countagentrejectretry','dialGlobalMaxRetry','dialNoAnswerMaxRetry','countbusyretry','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','countcongestionretry','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialNoSuchNumberRetryFrequency','dialMachineRetryFrequency','[rescheduleContact][Machine]','dialAgentRejectMaxRetry','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','NoSuchNumber','countglobal','reason\x200\x20no\x20such\x20number....','createStateFinal','NoAnswer','stateGlobal','reason\x203\x20ringing\x20no\x20answer','Busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','Congestion','reason\x208\x20congestion','outboundAbandonedCallsDay','dialAbandonedMaxRetry','reason\x2011\x20abandoned','AgentReject','[syncAgentComplete][createHistory][20]','outboundUnknownCallsDay','[syncAgentComplete][createHistory][?]','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','floor','[startMethodPredictive][StartProgressive]','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dropRate','agentBusyFactor','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','outboundQueuePauses','[CatchErlangB]','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','Agent','voicePause','Contact\x20updated','RECALLINQUEUE','RecallInQueue','RECALLFAILEDTIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','Blacklist','[Originate][MoveBlacklist]','limitCalls','temp','dialOrderByScheduledAt','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','Contact.phone','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','reachable','[actionOriginate]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','interval\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','Interval:\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','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[busyFactor]','Umin\x20=\x20','exports','util','lodash','bluebird','md5','../../../config/environment/','../../../config/logger','dialer','booked','predictive','predictiveCalls','../ami','redis','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/cmHopperFinal','./history','./final','./agentComplete','./queueCallerAbandon','./hangup','env','127.0.0.1','rrmemory','roundrobin','prototype','enqueue','tail','finally','sequence','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','uniqueId','startPredictive','startProgressive','queueBooked','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','hangup','syncHangup','newexten','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','isUndefined','message','name','\x20AGENTS\x20NOT\x20LOGGED','NOT_ACTIVE','\x20NOT\x20Active','Interval','INTERVAL_IS_NULL','\x20INTERVAL_IS_NULL','Intervals','isEmpty','Error','stringify','diff','seconds','emit','type','strategy','loggedIn','pTalking','sumDuration','sumHoldTime','talking','total','abandoned','waiting','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','Trunk','active','format','voice:queue:%s','voice_queue:save','ivr','campaign:save','-----\x20Stats\x20Predictive\x20---','info','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','predictiveIntervalAnsweredCalls','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','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','---------------------------','clearing\x20variable\x20start\x20progressive','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','outbound','string','\x22%s\x22\x20<%s>','\x22\x22\x20<>','error','inspect','stack','length','originated','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','contactsRescheduled','RESCHEDULED_CONTACTS','[getContactDialer2][ReScheduled]','contacts','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','sendMessageOneNotActive','available','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20not\x20active','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','IS_DISACTIVED','is\x20disactive','state','statedesc','starttime','[uniqueid]','clearZombieChannels','hasOwnProperty','isNil','catch','No\x20such\x20channel','[Dialer][checkChannel]','queue','updateOriginated','[Dialer][checkChannel][ivr]','countReScheduled','resolve','then','[countReScheduled]\x20','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','[rescheduleContact]\x20','unlockContact','getContactDialer','[getContactDialer]\x20','getContactDialerIvr','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','loggerHandler','emptyContact','saveInDb','pick','ContactId','ListId','UserId','VoiceQueueId','CampaignId','[emptyContact][createHistory]','[emptyContact]','Success','isTrunkReachable','SIP/%s','status','unmonitored','uniqueid','variable','exten','dialAMDActive','value','HANGUP','membername','AMD','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','MACHINE','Machine','amd','[syncMachine][createHistory]','HangupInAMD','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','[syncMachineIvr][createHistory]'];(function(_0x556bb1,_0x34830d){var _0x45455f=function(_0x13c6ba){while(--_0x13c6ba){_0x556bb1['push'](_0x556bb1['shift']());}};_0x45455f(++_0x34830d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x9df060,_0x253d33){_0x9df060=_0x9df060-0x0;var _0x338dfe=_0xa9e0[_0x9df060];return _0x338dfe;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var BPromise=require(_0x0a9e('0x2'));var uuid=require('uuid');var moment=require('moment');var rr=require('rr');var md5=require(_0x0a9e('0x3'));var Redis=require('ioredis');var config=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var loggerBooked=require(_0x0a9e('0x5'))(_0x0a9e('0x7'));var loggerPredictive=require('../../../config/logger')(_0x0a9e('0x8'));var loggerPredictiveCalls=require(_0x0a9e('0x5'))(_0x0a9e('0x9'));var loggerSyncQueueSummary=require('../../../config/logger')('syncQueueSummary');var ami=require(_0x0a9e('0xa'));config['redis']=_['defaults'](config[_0x0a9e('0xb')],{'host':_0x0a9e('0xc'),'port':0x18eb});var io=require(_0x0a9e('0xd'))(new Redis(config[_0x0a9e('0xb')]));var cmHopper=require(_0x0a9e('0xe'));var cmHopperFinal=require(_0x0a9e('0xf'));var cmHopperHistory=require('../rpc/cmHopperHistory');var cmHopperBlack=require('../rpc/cmHopperBlack');var voiceQueueRt=require('../rpc/voiceQueueRt');var Action=require('./action');var History=require(_0x0a9e('0x10'));var Final=require(_0x0a9e('0x11'));var AgentComplete=require(_0x0a9e('0x12'));var QueueCallerAbandon=require(_0x0a9e('0x13'));var Hangup=require(_0x0a9e('0x14'));var ipAgi=process[_0x0a9e('0x15')]['XCALLY_IP_AGI']||_0x0a9e('0x16');var strategy={'rrmemory':_0x0a9e('0x17'),'roundrobin':_0x0a9e('0x18')};var Sequence=function(){};Sequence[_0x0a9e('0x19')][_0x0a9e('0x1a')]=function(_0x4d5611){this['tail']=this[_0x0a9e('0x1b')]?this['tail'][_0x0a9e('0x1c')](_0x4d5611):_0x4d5611();};function Dialer(_0x519dfd,_0x16033c){this[_0x0a9e('0x1d')]=new Sequence();this['preview']=_0x16033c;this[_0x0a9e('0x1e')]=_0x519dfd['voiceQueues'];this[_0x0a9e('0x1f')]=_0x519dfd[_0x0a9e('0x1f')];this[_0x0a9e('0x20')]=_0x519dfd[_0x0a9e('0x20')];this[_0x0a9e('0x21')]=_0x519dfd[_0x0a9e('0x21')];this[_0x0a9e('0x22')]=config[_0x0a9e('0x22')]||0x2;this[_0x0a9e('0x23')]={};this[_0x0a9e('0x24')]={};this[_0x0a9e('0x25')]={};this[_0x0a9e('0x26')]={};this['optionPredictive']={};this[_0x0a9e('0x27')]={};this[_0x0a9e('0x28')]={};this['ivrOriginated']={};this[_0x0a9e('0x29')]={};this['queueBookedRR']={};ami['on']('agentconnect',this[_0x0a9e('0x2a')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x2c'),this[_0x0a9e('0x2d')]['bind'](this));ami['on'](_0x0a9e('0x2e'),this[_0x0a9e('0x2f')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x30'),this[_0x0a9e('0x31')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x32'),this['syncQueueSummary']['bind'](this));ami['on'](_0x0a9e('0x33'),this[_0x0a9e('0x34')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x35'),this['syncNewExten'][_0x0a9e('0x2b')](this));ami['on']('varset',this[_0x0a9e('0x36')]['bind'](this));ami['on'](_0x0a9e('0x37'),this[_0x0a9e('0x38')][_0x0a9e('0x2b')](this));ami['on'](_0x0a9e('0x39'),this[_0x0a9e('0x3a')][_0x0a9e('0x2b')](this));this[_0x0a9e('0x3b')]();this[_0x0a9e('0x3c')]();}function isNotNull(_0x5a101a){return _0x5a101a!==null&&!_[_0x0a9e('0x3d')](_0x5a101a);}function checkIsLoggedIn(_0x468813,_0x2b1f27){return function(){if(_0x2b1f27<=0x0){_0x468813[_0x0a9e('0x3e')]='AGENTS_NOT_LOGGED';throw _0x468813[_0x0a9e('0x3f')]+_0x0a9e('0x40');}};}function isActive(_0x1843b2){return _0x1843b2;}function checkIsActive(_0x824a4f,_0x58b06f){return function(){if(!isActive(_0x58b06f)){_0x824a4f[_0x0a9e('0x3e')]=_0x0a9e('0x41');throw _0x824a4f[_0x0a9e('0x3f')]+_0x0a9e('0x42');}};}function checkInterval(_0x540530){return function(){if(!isNotNull(_0x540530[_0x0a9e('0x43')])){_0x540530['message']=_0x0a9e('0x44');throw _0x540530[_0x0a9e('0x3f')]+_0x0a9e('0x45');}if(!isNotNull(_0x540530[_0x0a9e('0x43')][_0x0a9e('0x46')])){_0x540530['message']=_0x0a9e('0x44');throw _0x540530[_0x0a9e('0x3f')]+_0x0a9e('0x45');}if(!isNotNull(_[_0x0a9e('0x47')](_0x540530[_0x0a9e('0x43')][_0x0a9e('0x46')]))){_0x540530[_0x0a9e('0x3e')]=_0x0a9e('0x44');throw _0x540530['name']+_0x0a9e('0x45');}};}function msgResponse(_0x5e7238,_0x2cc7a0,_0x14b13f){return{'action':_0x5e7238,'response':_0x2cc7a0,'message':_0x14b13f,'stack':_0x14b13f};}function myreject(_0x2b7e7f){return function(_0x3f3d41){return _0x2b7e7f(msgResponse('[ifTime][Action]',_0x0a9e('0x48'),JSON[_0x0a9e('0x49')](_0x3f3d41)));};}function getSeconds(_0x1fa90d,_0x15de0e){var _0x4853b1=moment(_0x1fa90d)['milliseconds'](0x0);var _0x1e8694=moment(_0x15de0e)['milliseconds'](0x0);return _0x4853b1[_0x0a9e('0x4a')](_0x1e8694,_0x0a9e('0x4b'));}function emit(_0x381c37,_0x1ef87a,_0x4f41ae){io['to'](_0x381c37)[_0x0a9e('0x4c')](_0x1ef87a,_0x4f41ae);}function emitVoiceQueueSummary(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x4d')]==='outbound'){var _0x1dbf74={'id':_0x3bfce8['id'],'name':_0x3bfce8[_0x0a9e('0x3f')],'strategy':_0x3bfce8[_0x0a9e('0x4e')],'answered':_0x3bfce8['answered'],'available':_0x3bfce8['available'],'loggedIn':_0x3bfce8[_0x0a9e('0x4f')],'pTalking':_0x3bfce8[_0x0a9e('0x50')],'sumBillable':_0x3bfce8['sumBillable'],'sumDuration':_0x3bfce8[_0x0a9e('0x51')],'sumHoldTime':_0x3bfce8[_0x0a9e('0x52')]||0x0,'talking':_0x3bfce8[_0x0a9e('0x53')],'total':_0x3bfce8[_0x0a9e('0x54')],'type':_0x3bfce8['type'],'unmanaged':_0x3bfce8['unmanaged'],'abandoned':_0x3bfce8[_0x0a9e('0x55')],'waiting':_0x3bfce8[_0x0a9e('0x56')],'loggedInDb':_0x3bfce8['loggedInDb'],'dialActive':_0x3bfce8[_0x0a9e('0x57')],'dialMethod':_0x3bfce8[_0x0a9e('0x58')],'dialOriginateCallerIdName':_0x3bfce8[_0x0a9e('0x59')],'dialOriginateCallerIdNumber':_0x3bfce8['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x3bfce8[_0x0a9e('0x5a')],'dialPrefix':_0x3bfce8[_0x0a9e('0x5b')],'outboundAnswerAgiCallsDay':_0x3bfce8[_0x0a9e('0x5c')],'outboundAnswerCallsDay':_0x3bfce8[_0x0a9e('0x5d')],'outboundBlacklistCallsDay':_0x3bfce8[_0x0a9e('0x5e')],'outboundBusyCallsDay':_0x3bfce8[_0x0a9e('0x5f')],'outboundCongestionCallsDay':_0x3bfce8[_0x0a9e('0x60')],'outboundDropCallsDayACS':_0x3bfce8[_0x0a9e('0x61')],'outboundDropCallsDayCallersExit':_0x3bfce8[_0x0a9e('0x62')],'outboundDropCallsDayTimeout':_0x3bfce8[_0x0a9e('0x63')],'outboundNoAnswerCallsDay':_0x3bfce8[_0x0a9e('0x64')],'outboundNoSuchCallsDay':_0x3bfce8[_0x0a9e('0x65')],'outboundOriginateFailureCallsDay':_0x3bfce8[_0x0a9e('0x66')],'outboundReCallsDay':_0x3bfce8[_0x0a9e('0x67')],'outboundRejectCallsDay':_0x3bfce8[_0x0a9e('0x68')],'outboundUnknownCallsDay':_0x3bfce8['outboundUnknownCallsDay'],'predictiveIntervalAnsweredCalls':_0x3bfce8['predictiveIntervalAnsweredCalls'],'predictiveIntervalAvgHoldtime':_0x3bfce8[_0x0a9e('0x69')],'predictiveIntervalAvgTalktime':_0x3bfce8[_0x0a9e('0x6a')],'predictiveIntervalDroppedCallsCallersExit':_0x3bfce8[_0x0a9e('0x6b')],'predictiveIntervalDroppedCallsTimeout':_0x3bfce8[_0x0a9e('0x6c')],'predictiveIntervalErlangCalls':_0x3bfce8[_0x0a9e('0x6d')],'predictiveIntervalErlangCallsDroppedCalls':_0x3bfce8[_0x0a9e('0x6e')],'predictiveIntervalHitRate':_0x3bfce8[_0x0a9e('0x6f')],'predictiveIntervalMultiplicativeFactor':_0x3bfce8[_0x0a9e('0x70')],'predictiveIntervalPauses':_0x3bfce8[_0x0a9e('0x71')],'predictiveIntervalAvailable':_0x3bfce8[_0x0a9e('0x72')],'predictiveIntervalTotalCalls':_0x3bfce8[_0x0a9e('0x73')],'message':_0x3bfce8[_0x0a9e('0x3e')],'originated':_0x3bfce8['originated'],'erlangCalls':_0x3bfce8[_0x0a9e('0x74')],'erlangCallToSecond':_0x3bfce8[_0x0a9e('0x75')],'erlangAbandonmentRate':_0x3bfce8[_0x0a9e('0x76')],'erlangBusyFactor':_0x3bfce8[_0x0a9e('0x77')],'startPredictive':_0x3bfce8[_0x0a9e('0x27')],'startProgressive':_0x3bfce8[_0x0a9e('0x28')]};if(_0x3bfce8[_0x0a9e('0x78')]){_0x1dbf74[_0x0a9e('0x78')]={'id':_0x3bfce8['Trunk']['id'],'name':_0x3bfce8[_0x0a9e('0x78')]['name'],'active':_0x3bfce8[_0x0a9e('0x78')][_0x0a9e('0x79')],'callerid':_0x3bfce8[_0x0a9e('0x78')]['callerid']};}if(_0x3bfce8[_0x0a9e('0x43')]){_0x1dbf74[_0x0a9e('0x43')]={'id':_0x3bfce8[_0x0a9e('0x43')]['id'],'name':_0x3bfce8[_0x0a9e('0x43')][_0x0a9e('0x3f')]};}var _0x37be73=md5(JSON[_0x0a9e('0x49')](_0x1dbf74));if(_0x3bfce8['md5']!==_0x37be73){_0x3bfce8[_0x0a9e('0x3')]=_0x37be73;emit(util[_0x0a9e('0x7a')](_0x0a9e('0x7b'),_0x1dbf74[_0x0a9e('0x3f')]),_0x0a9e('0x7c'),_0x1dbf74);}}}function emitCampaignSummary(_0x992c77){if(_0x992c77[_0x0a9e('0x4d')]===_0x0a9e('0x7d')){emit(util[_0x0a9e('0x7a')]('campaign:ivr:%s',_0x992c77[_0x0a9e('0x3f')]),_0x0a9e('0x7e'),_0x992c77);}}function checkGetDataPredictive(_0x4f7240){if(isNotNull(_0x4f7240)){if(!_['isEmpty'](_0x4f7240)){loggerPredictive['info'](_0x0a9e('0x7f'));loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x81'),_0x4f7240[_0x0a9e('0x73')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x82'),_0x4f7240[_0x0a9e('0x83')]);loggerPredictive[_0x0a9e('0x80')]('Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4f7240['predictiveIntervalDroppedCallsTimeout']);loggerPredictive['info'](_0x0a9e('0x84'),_0x4f7240[_0x0a9e('0x6b')]);loggerPredictive[_0x0a9e('0x80')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4f7240[_0x0a9e('0x69')]);loggerPredictive[_0x0a9e('0x80')]('AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4f7240['predictiveIntervalAvgTalktime']);loggerPredictive[_0x0a9e('0x80')]('---------------------------');if(_0x4f7240[_0x0a9e('0x73')]>0x0){if(!_['isUndefined'](_0x4f7240[_0x0a9e('0x6a')])&&_0x4f7240[_0x0a9e('0x6a')]>0x0){return!![];}else{loggerPredictive[_0x0a9e('0x80')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}if(!_[_0x0a9e('0x3d')](_0x4f7240[_0x0a9e('0x69')])&&_0x4f7240['predictiveIntervalAvgHoldtime']>0x0){return!![];}else{loggerPredictive['info'](_0x0a9e('0x85'));}}else{loggerPredictive[_0x0a9e('0x80')]('Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive');}}else{loggerPredictive[_0x0a9e('0x80')]('History\x20information\x20are\x20empty');}}else{loggerPredictive[_0x0a9e('0x80')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0xe22ccc){return function(_0x4a6deb){loggerPredictive['info']('---------\x20ErlangB\x20---------');loggerPredictive[_0x0a9e('0x80')]('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4a6deb[_0x0a9e('0x74')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x86'),_0x4a6deb[_0x0a9e('0x75')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x87'),_0x4a6deb[_0x0a9e('0x76')]);loggerPredictive[_0x0a9e('0x80')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4a6deb[_0x0a9e('0x77')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x87'),_0x4a6deb[_0x0a9e('0x76')]);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x88'));_['merge'](_0xe22ccc,_0x4a6deb);};}function getDiff(_0x956fbe){var _0x26bc80=moment()['milliseconds'](0x0);var _0x3649cc=moment(_0x956fbe)['milliseconds'](0x0);return _0x26bc80[_0x0a9e('0x4a')](_0x3649cc,'seconds');}function ifInterval(_0x4b3c1a,_0x5674ee){if(_[_0x0a9e('0x3d')](_0x5674ee)){return![];}if(getDiff(_0x5674ee)<_0x4b3c1a*0x3c){return!![];}else{return![];}}function freeVariablesPredictive(_0x49d231){if(isNotNull(_0x49d231)){if(!_[_0x0a9e('0x3d')](_0x49d231[_0x0a9e('0x28')])){_0x49d231[_0x0a9e('0x28')]=undefined;loggerPredictive[_0x0a9e('0x80')](_0x49d231[_0x0a9e('0x3f')],_0x0a9e('0x89'));}if(!_['isUndefined'](_0x49d231[_0x0a9e('0x27')])){_0x49d231['startPredictive']=undefined;loggerPredictive[_0x0a9e('0x80')](_0x49d231[_0x0a9e('0x3f')],_0x0a9e('0x8a'));}if(!_['isUndefined'](_0x49d231[_0x0a9e('0x8b')])){clearInterval(_0x49d231[_0x0a9e('0x8b')]);_0x49d231[_0x0a9e('0x8b')]=undefined;loggerPredictive[_0x0a9e('0x80')](_0x49d231['name'],_0x0a9e('0x8c'));}}}function erlangb(_0xe05a5a,_0x54327c){if(_0x54327c===0x0){return 0x0;}var _0x797b45=0x1;for(var _0x17e88c=0x1;_0x17e88c<=_0x54327c;_0x17e88c+=0x1){_0x797b45=0x1+_0x797b45*_0x17e88c/_0xe05a5a;}return 0x1/_0x797b45;}function isVoiceQueueOutbound(_0x88dcbf){return _0x88dcbf===_0x0a9e('0x8d');}function isNotPreview(_0x401837){return _0x401837!=='preview';}function isCampaignIvr(_0x176840){return _0x176840===_0x0a9e('0x7d');}function getCallerId(_0x281c7d,_0x47bb43,_0x3528b7){if(!_['isUndefined'](_0x3528b7)&&'string'===typeof _0x3528b7&&!_[_0x0a9e('0x47')](_0x3528b7)){if(!_[_0x0a9e('0x3d')](_0x47bb43)&&_0x0a9e('0x8e')===typeof _0x47bb43&&!_[_0x0a9e('0x47')](_0x47bb43)){return util[_0x0a9e('0x7a')](_0x0a9e('0x8f'),_0x47bb43,_0x3528b7);}return util[_0x0a9e('0x7a')](_0x0a9e('0x8f'),_0x3528b7,_0x3528b7);}if(!_[_0x0a9e('0x3d')](_0x281c7d)&&_0x0a9e('0x8e')===typeof _0x281c7d&&!_[_0x0a9e('0x47')](_0x281c7d)){return _0x281c7d;}return _0x0a9e('0x90');}function loggerCatchQueueSummary(_0x2bbb86,_0x2b8192){return function(_0x320898){freeVariablesPredictive(_0x2b8192);emitVoiceQueueSummary(_0x2b8192);emitCampaignSummary(_0x2b8192);loggerSyncQueueSummary[_0x0a9e('0x91')](_0x2bbb86,util[_0x0a9e('0x92')](_0x320898,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x4257c9,_0x5150a4){return function(_0x1b0b98){loggerPredictive[_0x0a9e('0x91')](_0x5150a4[_0x0a9e('0x3f')],_0x4257c9);loggerPredictive['error'](_0x1b0b98[_0x0a9e('0x93')]);freeVariablesPredictive(_0x5150a4);};}function loggerCatch(_0x30944e){return function(_0x4b341d){logger[_0x0a9e('0x91')](_0x30944e,util[_0x0a9e('0x92')](_0x4b341d,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x3ef315){return _0x3ef315&&!_[_0x0a9e('0x3d')](_0x3ef315)&&_0x3ef315[_0x0a9e('0x94')]>0x0;}function decremetOriginate(_0x4a43a8){if(!_['isUndefined'](_0x4a43a8)&&_0x4a43a8!==null){if(_0x4a43a8['hasOwnProperty'](_0x0a9e('0x95'))){if(_0x4a43a8[_0x0a9e('0x95')]>0x0){_0x4a43a8[_0x0a9e('0x95')]-=0x1;}else{logger[_0x0a9e('0x91')](_0x0a9e('0x96'));}}}else{logger[_0x0a9e('0x91')](_0x0a9e('0x97'));}}function checkContactLowerLimitOriginate(_0x1a0677,_0x5512d1,_0x235f8f){if(_0x5512d1>_0x235f8f){for(var _0xcbc8b2=0x0;_0xcbc8b2<_0x5512d1-_0x235f8f;_0xcbc8b2+=0x1){decremetOriginate(_0x1a0677);}}}function loggerGetContactDialer(_0x12ccdb,_0x4a4fc7,_0x2bdc44){return function(_0x583b2e){checkContactLowerLimitOriginate(_0x4a4fc7,_0x2bdc44,0x0);logger[_0x0a9e('0x91')](_0x12ccdb,util[_0x0a9e('0x92')](_0x583b2e,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x4c46c1){return function(_0x2ed01e){if(isNotNull(_0x2ed01e)&&isNotNull(_0x2ed01e[0x0])){if(_0x2ed01e[0x0][_0x0a9e('0x98')]>0x0){_0x4c46c1[_0x0a9e('0x3e')]=_0x0a9e('0x99');logger['info'](_0x0a9e('0x9a')+_0x4c46c1[_0x0a9e('0x3f')],_0x2ed01e[0x0][_0x0a9e('0x98')],_0x0a9e('0x9b'));}else{_0x4c46c1['message']=_0x0a9e('0x9c');logger[_0x0a9e('0x80')](_0x0a9e('0x9d')+_0x4c46c1[_0x0a9e('0x3f')]);}}};}function notSendMessagesQueue(_0x4abc8f){if(_0x4abc8f[_0x0a9e('0x9e')]){freeVariablesPredictive(_0x4abc8f);if(_0x4abc8f[_0x0a9e('0x95')]===0x0&&_0x4abc8f[_0x0a9e('0x53')]===0x0&&_0x4abc8f[_0x0a9e('0x56')]===0x0&&(_0x4abc8f[_0x0a9e('0x50')]||0x0)===0x0){_0x4abc8f[_0x0a9e('0x9e')]=![];_0x4abc8f[_0x0a9e('0x9f')]=0x0;_0x4abc8f[_0x0a9e('0x3e')]=_0x0a9e('0x41');loggerSyncQueueSummary[_0x0a9e('0x91')](_0x0a9e('0xa0'),_0x4abc8f[_0x0a9e('0x3f')],_0x0a9e('0xa1'));}else{_0x4abc8f[_0x0a9e('0x3e')]='IS_DISACTIVED';loggerSyncQueueSummary[_0x0a9e('0x91')](_0x0a9e('0xa0'),_0x4abc8f[_0x0a9e('0x3f')],'is\x20disactive');}emitVoiceQueueSummary(_0x4abc8f);}}function notSendMessagesCampaign(_0x3736e0){if(_0x3736e0[_0x0a9e('0x9e')]){if(_0x3736e0[_0x0a9e('0x95')]===0x0){_0x3736e0[_0x0a9e('0x9e')]=![];_0x3736e0['message']='NOT_ACTIVE';loggerSyncQueueSummary[_0x0a9e('0x91')](_0x0a9e('0xa2'),_0x3736e0['name'],_0x0a9e('0xa1'));}else{_0x3736e0['message']=_0x0a9e('0xa3');loggerSyncQueueSummary[_0x0a9e('0x91')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x3736e0[_0x0a9e('0x3f')],_0x0a9e('0xa4'));}emitCampaignSummary(_0x3736e0);}}function createObjHistory(_0x2d2286,_0x42b959,_0x3755fe,_0x1f42a0,_0x444f1f){_0x2d2286['message']=_0x3755fe;var _0x2973d3=new Action(_0x2d2286,_0x42b959);var _0x3ca9b9=new History(_0x2973d3);_0x3ca9b9[_0x0a9e('0xa5')]=_0x1f42a0;_0x3ca9b9[_0x0a9e('0xa6')]=_0x444f1f;_0x3ca9b9['endtime']=_0x2973d3[_0x0a9e('0xa7')];return _0x3ca9b9;}Dialer[_0x0a9e('0x19')]['loopClearZombieChannels']=function(){var _0x1d6834=this;setInterval(function(){_0x1d6834['clearZombieChannels'](_0x1d6834[_0x0a9e('0x26')],_0x0a9e('0xa8'));_0x1d6834[_0x0a9e('0xa9')](_0x1d6834[_0x0a9e('0x24')],'[actions]');},0x32c8);};Dialer['prototype'][_0x0a9e('0xa9')]=function(_0x2b9c01,_0x94dcf5){var _0x5ac73d=this;for(var _0x3b4a9f in _0x2b9c01){if(_0x2b9c01[_0x0a9e('0xaa')](_0x3b4a9f)){this['sequence']['enqueue'](function(){if(!_[_0x0a9e('0xab')](_0x2b9c01[_0x3b4a9f])){return ami['Action']({'action':'status','channel':_0x2b9c01[_0x3b4a9f]['channel']})[_0x0a9e('0xac')](function(_0xf3601c){if(_0xf3601c[_0x0a9e('0x3e')]===_0x0a9e('0xad')){setTimeout(function(){if(_0x2b9c01[_0x3b4a9f]&&_0x2b9c01[_0x3b4a9f][_0x0a9e('0x4d')]!==_0x0a9e('0x7d')){_0x5ac73d['updateOriginated'](_0x5ac73d[_0x0a9e('0x1e')][_0x2b9c01[_0x3b4a9f]['queue']]);logger[_0x0a9e('0x91')](_0x0a9e('0xae'),_0x94dcf5,_0x3b4a9f,_0x2b9c01[_0x3b4a9f][_0x0a9e('0xaf')]);delete _0x2b9c01[_0x3b4a9f];}if(_0x2b9c01[_0x3b4a9f]&&_0x2b9c01[_0x3b4a9f][_0x0a9e('0x4d')]==='ivr'){_0x5ac73d[_0x0a9e('0xb0')](_0x5ac73d[_0x0a9e('0x1f')][_0x2b9c01[_0x3b4a9f][_0x0a9e('0xaf')]]);logger['error'](_0x0a9e('0xb1'),_0x94dcf5,_0x3b4a9f,_0x2b9c01[_0x3b4a9f][_0x0a9e('0xaf')]);delete _0x2b9c01[_0x3b4a9f];}},0x2328);}});}});}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0xb2')]=function(_0x255e49){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xb2')](_0x255e49))['catch'](loggerCatch(_0x0a9e('0xb5')));};Dialer[_0x0a9e('0x19')]['checkIsBlackList']=function(_0x40e0f0){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopperBlack['checkIsBlackList'](_0x40e0f0))[_0x0a9e('0xac')](loggerCatch('[checkIsBlackList]\x20'));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xb6')]=function(_0x558a87){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopperBlack[_0x0a9e('0xb6')](_0x558a87))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xb7')));};Dialer['prototype'][_0x0a9e('0xb8')]=function(_0x31d25a){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopperHistory[_0x0a9e('0xb9')](_0x31d25a))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xba')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xbb')]=function(_0x31af8c){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xbb')](_0x31af8c))['catch'](loggerCatch(_0x0a9e('0xbc')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xbd')]=function(_0x2ed526,_0xb0599a,_0x5d9ddb){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper['unlockContact'](_0x2ed526,_0xb0599a,_0x5d9ddb))[_0x0a9e('0xac')](loggerCatch('[unlockContact]\x20'));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xbe')]=function(_0x1d93b1,_0xf8c6c4,_0x4f4d2d,_0x3ceba6){return BPromise['resolve']()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xbe')](_0x1d93b1,_0xf8c6c4,_0x4f4d2d,_0x3ceba6))['catch'](loggerCatch(_0x0a9e('0xbf')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc0')]=function(_0x4ab276,_0x4c788f,_0x1b82b7){return BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xc0')](_0x4ab276,_0x4c788f,_0x1b82b7))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xbf')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc1')]=function(_0x3f8124){return BPromise['resolve']()[_0x0a9e('0xb4')](voiceQueueRt['getVoiceQueueRtPauses'](_0x3f8124))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xc2')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc3')]=function(_0x1b61d5){return BPromise['resolve']()[_0x0a9e('0xb4')](cmHopper[_0x0a9e('0xc3')](_0x1b61d5))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xc4')));};Dialer[_0x0a9e('0x19')]['createHistory']=function(_0x4f074c){return BPromise[_0x0a9e('0xb3')]()['then'](cmHopperHistory[_0x0a9e('0xc5')](_0x4f074c))[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xc6')));};Dialer[_0x0a9e('0x19')][_0x0a9e('0xb0')]=function(_0x213e5d){if(!_['isUndefined'](_0x213e5d)&&_0x213e5d!==null){if(_0x213e5d['hasOwnProperty'](_0x0a9e('0x95'))){if(_0x213e5d['originated']>0x0){_0x213e5d[_0x0a9e('0x95')]-=0x1;}else{logger['error'](_0x0a9e('0xc7'));}}}else{logger['error']('[updateOriginated]\x20is\x20null\x20or\x20undefined');}};Dialer[_0x0a9e('0x19')][_0x0a9e('0xc8')]=function(_0x5e9b0b,_0x170af6){var _0x17cb30=this;return function(_0x15c6b9){_0x17cb30[_0x0a9e('0xb0')](_0x170af6);logger[_0x0a9e('0x91')](_0x5e9b0b,util['inspect'](_0x15c6b9,{'showHidden':![],'depth':null}));};};Dialer['prototype'][_0x0a9e('0xc9')]=function(_0x22286c,_0x41c8cd,_0x24beb6){var _0x59303b={'state':0x19,'statedesc':'notFound'};this[_0x0a9e('0xb0')](_0x41c8cd);this[_0x0a9e('0xca')](_['merge'](_0x59303b,_[_0x0a9e('0xcb')](_0x24beb6,[_0x0a9e('0xcc'),_0x0a9e('0xcd'),_0x0a9e('0xce'),_0x0a9e('0xcf'),_0x0a9e('0xd0')])),_0x0a9e('0xd1'),_0x0a9e('0xd2'));logger[_0x0a9e('0x91')](_0x22286c);};Dialer[_0x0a9e('0x19')]['isSuccess']=function(_0x1065a7){return _0x1065a7===_0x0a9e('0xd3');};Dialer[_0x0a9e('0x19')][_0x0a9e('0xd4')]=function(_0x1d0b02){return!_['isUndefined'](_0x1d0b02)&&_0x1d0b02&&!_['isUndefined'](_0x1d0b02[_0x0a9e('0x3f')])&&!_[_0x0a9e('0x3d')](_0x1d0b02[_0x0a9e('0x79')])&&_0x1d0b02[_0x0a9e('0x79')]&&(this[_0x0a9e('0x21')][util['format'](_0x0a9e('0xd5'),_0x1d0b02[_0x0a9e('0x3f')])][_0x0a9e('0xd6')]==='reachable'||this[_0x0a9e('0x21')][util['format'](_0x0a9e('0xd5'),_0x1d0b02['name'])][_0x0a9e('0xd6')]===_0x0a9e('0xd7'));};Dialer[_0x0a9e('0x19')]['saveInDb']=function(_0xc9529d,_0x5ed560,_0x4383da){this[_0x0a9e('0xc5')](_0xc9529d)[_0x0a9e('0xac')](loggerCatch(_0x5ed560));this[_0x0a9e('0xc3')](_0xc9529d)[_0x0a9e('0xac')](loggerCatch(_0x4383da));};Dialer[_0x0a9e('0x19')][_0x0a9e('0x36')]=function(_0xe89aaa){var _0x2aaf07=this[_0x0a9e('0x26')][_0xe89aaa[_0x0a9e('0xd8')]];var _0xc876d4;if(!_[_0x0a9e('0xab')](_0xe89aaa)&&!_[_0x0a9e('0xab')](_0xe89aaa[_0x0a9e('0xd9')])&&!_[_0x0a9e('0xab')](_0xe89aaa['variable']['amdstatus'])&&_0xe89aaa[_0x0a9e('0xda')]==='xcally-motion-dialer'&&_0x2aaf07){if(_0x2aaf07[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')&&this['voiceQueues'][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0xdb')]&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xdd')){delete this['uniqueId'][_0xe89aaa[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x2aaf07[_0x0a9e('0xaf')]]);this['voiceQueues'][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;this[_0x0a9e('0x1e')][_0x2aaf07['queue']][_0x0a9e('0x5c')]+=0x1;_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x12;_0xc876d4[_0x0a9e('0xa6')]='HangupInAMD';_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe0'),_0x0a9e('0xe1'));}if(_0x2aaf07['type']!==_0x0a9e('0x7d')&&this[_0x0a9e('0x1e')][_0x2aaf07['queue']][_0x0a9e('0xdb')]&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xe2')){delete this['uniqueId'][_0xe89aaa['uniqueid']];this['updateOriginated'](this[_0x0a9e('0x1e')][_0x2aaf07[_0x0a9e('0xaf')]]);this['voiceQueues'][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;this[_0x0a9e('0x1e')][_0x2aaf07['queue']][_0x0a9e('0x5c')]+=0x1;_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x13;_0xc876d4[_0x0a9e('0xa6')]=_0x0a9e('0xe3');_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');_0xc876d4[_0x0a9e('0xe4')]=!![];this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe5'),'[syncMachine]');}if(_0x2aaf07[_0x0a9e('0x4d')]==='ivr'&&this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]][_0x0a9e('0xdb')]&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xdd')){delete this[_0x0a9e('0x26')][_0xe89aaa['uniqueid']];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]]);_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x12;_0xc876d4['statedesc']=_0x0a9e('0xe6');_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe7'),_0x0a9e('0xe8'));}if(_0x2aaf07[_0x0a9e('0x4d')]===_0x0a9e('0x7d')&&this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]]['dialAMDActive']&&_0xe89aaa[_0x0a9e('0xdc')]===_0x0a9e('0xe2')){delete this[_0x0a9e('0x26')][_0xe89aaa[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1f')][_0x2aaf07[_0x0a9e('0xaf')]]);_0xc876d4=new Hangup(_0x2aaf07,_0xe89aaa);_0xc876d4[_0x0a9e('0xa5')]=0x13;_0xc876d4['statedesc']=_0x0a9e('0xe3');_0xc876d4[_0x0a9e('0xde')]=_0x0a9e('0xdf');_0xc876d4['amd']=!![];this[_0x0a9e('0xca')](_0xc876d4,_0x0a9e('0xe9'),_0x0a9e('0xea'));}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x34')]=function(_0x1ba457){var _0x424f1b=this[_0x0a9e('0x26')][_0x1ba457[_0x0a9e('0xd8')]];var _0x451010=this;var _0x5a7dad;if(_0x424f1b&&_0x424f1b[_0x0a9e('0x4d')]===_0x0a9e('0x7d')){delete this[_0x0a9e('0x26')][_0x1ba457[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1f')][_0x424f1b['queue']]);this[_0x0a9e('0x1f')][_0x424f1b['queue']]['ivrAnswerCallsDay']+=0x1;_0x5a7dad=new Hangup(_0x424f1b,_0x1ba457);this['createHistory'](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xeb')));this[_0x0a9e('0xc3')](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch('[syncHangupIvr]'));}if(_0x424f1b&&_0x424f1b[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')&&isNotNull(this[_0x0a9e('0x1e')][_0x424f1b[_0x0a9e('0xaf')]][_0x0a9e('0xec')])){delete this['uniqueId'][_0x1ba457['uniqueid']];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x424f1b[_0x0a9e('0xaf')]]);this['voiceQueues'][_0x424f1b[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;this[_0x0a9e('0x1e')][_0x424f1b['queue']][_0x0a9e('0x5c')]+=0x1;_0x5a7dad=new Hangup(_0x424f1b,_0x1ba457);_0x5a7dad[_0x0a9e('0xa5')]=0x10;_0x5a7dad[_0x0a9e('0xa6')]='AnswerAGI';_0x5a7dad[_0x0a9e('0xde')]=_0x0a9e('0xed');this[_0x0a9e('0xc5')](_0x5a7dad)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));this['moveContactManagedDialer'](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xee')));}if(_0x424f1b&&_0x424f1b[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')&&!isNotNull(this['voiceQueues'][_0x424f1b[_0x0a9e('0xaf')]]['dialQueueProject'])){delete this[_0x0a9e('0x26')][_0x1ba457[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this['voiceQueues'][_0x424f1b[_0x0a9e('0xaf')]]);this[_0x0a9e('0x1e')][_0x424f1b[_0x0a9e('0xaf')]]['outboundUnknownCallsDay']+=0x1;_0x5a7dad=new Hangup(_0x424f1b,_0x1ba457);_0x5a7dad[_0x0a9e('0xa5')]=0xc;_0x5a7dad['statedesc']=_0x1ba457[_0x0a9e('0xef')];_0x5a7dad['membername']=_0x0a9e('0xf0');this['createHistory'](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xeb')));this[_0x0a9e('0xc3')](_0x5a7dad)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xee')));}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x31')]=function(_0x5acdc9){var _0x35ace3=this[_0x0a9e('0x26')][_0x5acdc9['uniqueid']];var _0xf4fb77=this;if(this[_0x0a9e('0x1e')][_0x5acdc9['queue']]){if(_0x35ace3&&_0x35ace3[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')){delete this[_0x0a9e('0x26')][_0x5acdc9['uniqueid']];this[_0x0a9e('0x1e')][_0x5acdc9[_0x0a9e('0xaf')]][_0x0a9e('0x5d')]+=0x1;var _0x3f0d64=new AgentComplete(_0x35ace3,_0x5acdc9);if(_0x5acdc9[_0x0a9e('0xf1')]===_0x0a9e('0xf2')){_0x3f0d64[_0x0a9e('0xf3')]=this[_0x0a9e('0x1e')][_0x5acdc9[_0x0a9e('0xaf')]][_0x0a9e('0xf4')]&&this['voiceQueues'][_0x5acdc9[_0x0a9e('0xaf')]]['dialAgiAfterHangupAgent']?moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5')):undefined;}this[_0x0a9e('0xc5')](_0x3f0d64)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xf6')));this[_0x0a9e('0xc3')](_0x3f0d64)['catch'](loggerCatch(_0x0a9e('0xf7')));}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x2a')]=function(_0x55a599){if(this[_0x0a9e('0x1e')][_0x55a599[_0x0a9e('0xaf')]]){if(this[_0x0a9e('0x26')][_0x55a599[_0x0a9e('0xd8')]]&&this[_0x0a9e('0x26')][_0x55a599[_0x0a9e('0xd8')]][_0x0a9e('0x4d')]!=='ivr'){this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x55a599[_0x0a9e('0xaf')]]);this[_0x0a9e('0x26')][_0x55a599[_0x0a9e('0xd8')]][_0x0a9e('0xf8')]=moment()[_0x0a9e('0x7a')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer['prototype'][_0x0a9e('0xf9')]=function(_0x3f507c){this[_0x0a9e('0xc5')](_0x3f507c)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0xf6')));this[_0x0a9e('0xc3')](_0x3f507c)[_0x0a9e('0xac')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));};Dialer[_0x0a9e('0x19')][_0x0a9e('0x2d')]=function(_0x2d8e91){var _0x2675a5=this[_0x0a9e('0x26')][_0x2d8e91[_0x0a9e('0xd8')]];var _0x16be7e=this;if(this['voiceQueues'][_0x2d8e91[_0x0a9e('0xaf')]]){if(_0x2675a5&&_0x2675a5[_0x0a9e('0x4d')]!==_0x0a9e('0x7d')){delete this['uniqueId'][_0x2d8e91[_0x0a9e('0xd8')]];this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]]);_0x2675a5['droptime']=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));var _0x21d082=new QueueCallerAbandon(_0x2675a5,_0x2d8e91);if(getSeconds(_0x2675a5[_0x0a9e('0xfa')],_0x2675a5[_0x0a9e('0xfb')])>=_0x2675a5[_0x0a9e('0xfc')]){this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x63')]+=0x1;this[_0x0a9e('0x1e')][_0x2d8e91['queue']]['predictiveIntervalErlangCallsDroppedCalls']+=0x1;_0x21d082[_0x0a9e('0xa5')]=0xa;_0x21d082[_0x0a9e('0xa6')]=_0x0a9e('0xfd');_0x21d082['dropreason']=_0x0a9e('0xfe');_0x21d082[_0x0a9e('0xf3')]=this['voiceQueues'][_0x2d8e91[_0x0a9e('0xaf')]]['dialQueueProject2']?moment()[_0x0a9e('0x7a')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x21d082['countdropretry']+=0x1;if(_0x21d082['countdropretry']>=this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0xff')]){this[_0x0a9e('0xf9')](_0x21d082);}else{this[_0x0a9e('0xbb')]({'active':![],'countdropretry':_0x21d082[_0x0a9e('0x100')],'scheduledat':moment()['add'](this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x101')],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x2675a5[_0x0a9e('0xcc')],'ListId':_0x2675a5['ListId'],'VoiceQueueId':_0x2675a5['VoiceQueueId']||undefined,'CampaignId':_0x2675a5[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x103')));var _0x19e024=new History(_0x21d082);_0x19e024[_0x0a9e('0xa5')]=0xa;_0x19e024[_0x0a9e('0xa6')]=_0x0a9e('0xfd');_0x19e024[_0x0a9e('0xa7')]=moment()['format'](_0x0a9e('0xf5'));_0x19e024['endtime']=_0x19e024['starttime'];_0x19e024[_0x0a9e('0x104')]=_0x21d082['calleridname'];_0x19e024[_0x0a9e('0x105')]=_0x21d082['calleridnum'];console['log'](_0x0a9e('0x106'),_0x2d8e91);console['log'](_0x0a9e('0x107'),_0x21d082);console[_0x0a9e('0x108')](_0x0a9e('0x109'),_0x19e024);this['createHistory'](_0x19e024)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x10a')));}}else{this[_0x0a9e('0x1e')][_0x2d8e91['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x62')]+=0x1;_0x21d082[_0x0a9e('0xa5')]=0xb;_0x21d082[_0x0a9e('0xa6')]=_0x0a9e('0x10b');_0x21d082[_0x0a9e('0x10c')]=_0x0a9e('0x10d');_0x21d082[_0x0a9e('0x10e')]+=0x1;if(_0x21d082[_0x0a9e('0x10e')]>=this['voiceQueues'][_0x2d8e91['queue']]['dialAbandonedMaxRetry']){this[_0x0a9e('0xf9')](_0x21d082);}else{this[_0x0a9e('0xbb')]({'active':![],'countabandonedretry':_0x21d082[_0x0a9e('0x10e')],'scheduledat':moment()[_0x0a9e('0x10f')](this[_0x0a9e('0x1e')][_0x2d8e91[_0x0a9e('0xaf')]][_0x0a9e('0x110')],_0x0a9e('0x102'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2675a5[_0x0a9e('0xcc')],'ListId':_0x2675a5[_0x0a9e('0xcd')],'VoiceQueueId':_0x2675a5['VoiceQueueId']||undefined,'CampaignId':_0x2675a5[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x111')));var _0x19e024=new History(_0x21d082);_0x19e024[_0x0a9e('0xa5')]=0xb;_0x19e024[_0x0a9e('0xa6')]=_0x0a9e('0x10b');_0x19e024[_0x0a9e('0xa7')]=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));_0x19e024[_0x0a9e('0x112')]=_0x19e024[_0x0a9e('0xa7')];console['log'](_0x0a9e('0x113'),_0x19e024);this[_0x0a9e('0xc5')](_0x19e024)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x114')));}}}}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x115')]=function(_0x292e67){if(this[_0x0a9e('0x24')][_0x292e67[_0x0a9e('0xd8')]]){this[_0x0a9e('0x24')][_0x292e67[_0x0a9e('0xd8')]][_0x0a9e('0x116')]=_0x292e67['channel'];}if(this['uniqueId'][_0x292e67[_0x0a9e('0xd8')]]){this[_0x0a9e('0x26')][_0x292e67[_0x0a9e('0xd8')]][_0x0a9e('0x116')]=_0x292e67[_0x0a9e('0x116')];}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x38')]=function(_0x4f7907){if(strategy[this[_0x0a9e('0x1e')][this['actions'][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]][_0x0a9e('0x4e')]]===_0x0a9e('0x18')){if(this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]]&&_[_0x0a9e('0xab')](this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0x118')])&&_0x4f7907[_0x0a9e('0xd6')]==='1'&&_0x4f7907[_0x0a9e('0x119')]==='0'){if(this[_0x0a9e('0x20')][_0x4f7907[_0x0a9e('0x11a')]]){if(!this[_0x0a9e('0x20')][_0x4f7907[_0x0a9e('0x11a')]]['locked']){this['agents'][_0x4f7907[_0x0a9e('0x11a')]][_0x0a9e('0x118')]=!![];this['actions'][_0x4f7907['actionid']][_0x0a9e('0x118')]=!![];this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]]['stateinterface']=_0x4f7907[_0x0a9e('0x11a')];}}}}else if((strategy[this['voiceQueues'][this[_0x0a9e('0x24')][_0x4f7907['actionid']][_0x0a9e('0xaf')]]['strategy']]||_0x0a9e('0x17'))===_0x0a9e('0x17')){if(this[_0x0a9e('0x24')][_0x4f7907['actionid']]){if(this[_0x0a9e('0x20')][_0x4f7907['stateinterface']]){this['actions'][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0x11a')]=_0x4f7907[_0x0a9e('0x11a')];if(_[_0x0a9e('0xab')](this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]])){this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]=[];}this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x4f7907[_0x0a9e('0x117')]][_0x0a9e('0xaf')]][_0x0a9e('0x11b')](_[_0x0a9e('0x11c')](_[_0x0a9e('0xcb')](this['actions'][_0x4f7907[_0x0a9e('0x117')]],[_0x0a9e('0x11d'),_0x0a9e('0x11a')]),{'status':_0x4f7907[_0x0a9e('0xd6')],'paused':_0x4f7907['paused']}));}}}};function unlockQueueStatus(_0x49c3be,_0x54658d){setTimeout(function(){if(_[_0x0a9e('0x3d')](_0x49c3be['queueStatusComplete'])){loggerBooked[_0x0a9e('0x91')](_0x0a9e('0x11e'),_0x54658d);}_0x49c3be[_0x0a9e('0x11f')]=!![];loggerBooked[_0x0a9e('0x80')](_0x0a9e('0x120'),_0x54658d,JSON[_0x0a9e('0x49')](_[_0x0a9e('0xcb')](_0x49c3be,[_0x0a9e('0x3f'),_0x0a9e('0x11f')])));},0x1f3);}Dialer[_0x0a9e('0x19')]['syncQueueStatusComplete']=function(_0x283c59){var _0x47a018=this;var _0x2509f3=_0x47a018['voiceQueues'][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]];if(strategy[this['voiceQueues'][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']]['strategy']]===_0x0a9e('0x18')){if(this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]&&this['actions'][_0x283c59['actionid']]['stateinterface']){this[_0x0a9e('0x121')][_0x0a9e('0x122')](this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0x11d')],this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0x11a')])[_0x0a9e('0xac')](function(_0x18e38b){logger[_0x0a9e('0x91')](_0x0a9e('0x123'),util[_0x0a9e('0x92')](_0x18e38b,{'showHidden':![],'depth':null}));})[_0x0a9e('0x1c')](function(){_0x47a018[_0x0a9e('0xb0')](_0x47a018[_0x0a9e('0x1e')][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']]);_0x47a018[_0x0a9e('0x20')][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0x11a')]][_0x0a9e('0x118')]=![];delete _0x47a018[_0x0a9e('0x24')][_0x283c59['actionid']];unlockQueueStatus(_0x2509f3);});}else{this[_0x0a9e('0xb0')](this[_0x0a9e('0x1e')][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]);this[_0x0a9e('0xbb')]({'active':![],'ContactId':this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xcc')],'ListId':this['actions'][_0x283c59['actionid']][_0x0a9e('0xcd')],'VoiceQueueId':this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xcf')]||undefined,'CampaignId':this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x124')));delete this[_0x0a9e('0x24')][_0x283c59['actionid']];unlockQueueStatus(_0x2509f3);}}else if((strategy[this[_0x0a9e('0x1e')][this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xaf')]][_0x0a9e('0x4e')]]||'rrmemory')===_0x0a9e('0x17')){var _0x237994;if(this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]&&!_[_0x0a9e('0x47')](this[_0x0a9e('0x29')][this['actions'][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]])){if(this['queueBookedRR'][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]){this[_0x0a9e('0x125')][_0x47a018[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]]=this['queueBookedRR'][this['actions'][_0x283c59['actionid']]['queue']]?this['queueBookedRR'][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']]:this['queueBooked'][this[_0x0a9e('0x24')][_0x283c59['actionid']][_0x0a9e('0xaf')]]?this[_0x0a9e('0x29')][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]][_0x0a9e('0x126')]||0x0:0x0;}this['queueBooked'][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]]['queue']][_0x0a9e('0x126')]=this[_0x0a9e('0x125')][this[_0x0a9e('0x24')][_0x283c59[_0x0a9e('0x117')]][_0x0a9e('0xaf')]];for(var _0x2f1cc0=0x0;_0x2f1cc0=0x0?!![]:![];})[_0x0a9e('0xac')](myreject(_0x1ba7b2)));}}else{_0x45630b[_0x0a9e('0x11b')](ami['Action']({'action':'command','command':util[_0x0a9e('0x7a')](_0x0a9e('0x13e'),_0x1c738f,!_[_0x0a9e('0x3d')](config[_0x0a9e('0x140')][_0x57425c])?_0x57425c:'')})[_0x0a9e('0xb4')](function(_0x5ac14c){return _0x5ac14c[_0x0a9e('0x141')]['indexOf'](_0x0a9e('0x142'))>=0x0?!![]:![];})['catch'](myreject(_0x1ba7b2)));}BPromise[_0x0a9e('0x143')](_0x45630b)[_0x0a9e('0xb4')](function(_0x595a5e){var _0x1fe77c=_[_0x0a9e('0x144')](_0x595a5e);if(_0x1fe77c){return _0x121aa2(_0x1fe77c);}else{_0x45c980[_0x0a9e('0x3e')]=_0x465b51?_0x0a9e('0x145'):_0x0a9e('0x146');return _0x1ba7b2(msgResponse(_0x0a9e('0x147'),'Failure',_0x0a9e('0x148')+_0x465b51+'\x20'+_0x5d4935+_0x0a9e('0x149')+util[_0x0a9e('0x92')](_0x1c738f,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x57425c));}})[_0x0a9e('0xac')](function(_0x934f69){return _0x1ba7b2(msgResponse(_0x0a9e('0x135'),'Failure',JSON[_0x0a9e('0x49')](_0x934f69)));});});};Dialer[_0x0a9e('0x19')][_0x0a9e('0x14a')]=function(_0x2317e7){var _0x1d39bd=this;return function(){switch(_0x2317e7[_0x0a9e('0x58')]){case'progressive':freeVariablesPredictive(_0x2317e7);_0x1d39bd['handlePower'](_0x2317e7,0x1);break;case _0x0a9e('0x14b'):freeVariablesPredictive(_0x2317e7);_0x1d39bd[_0x0a9e('0x14c')](_0x2317e7,_0x2317e7['dialPowerLevel']);break;case _0x0a9e('0x8'):_0x1d39bd[_0x0a9e('0x8')](_0x2317e7);break;case _0x0a9e('0x7'):freeVariablesPredictive(_0x2317e7);_0x1d39bd[_0x0a9e('0x14c')](_0x2317e7,0x1);break;default:freeVariablesPredictive(_0x2317e7);logger[_0x0a9e('0x91')](_0x0a9e('0x14d'),_0x2317e7['name'],_0x0a9e('0x14e'));}};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x14f')]=function(_0x4edb79){var _0x45c6ce=this;return function(){_0x45c6ce[_0x0a9e('0x150')](_0x4edb79);};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x151')]=function(_0x5beea6){var _0x49bb4f=this;if(isNotPreview(_0x5beea6[_0x0a9e('0x58')])){if(isVoiceQueueOutbound(_0x5beea6[_0x0a9e('0x4d')])&&isActive(_0x5beea6[_0x0a9e('0x57')])){_0x5beea6['sendMessageOneNotActive']=!![];BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](checkIsLoggedIn(_0x5beea6,_0x5beea6[_0x0a9e('0x4f')]))[_0x0a9e('0xb4')](checkIsActive(_0x5beea6,_0x5beea6[_0x0a9e('0x57')]))[_0x0a9e('0xb4')](checkInterval(_0x5beea6))[_0x0a9e('0xb4')](_0x49bb4f[_0x0a9e('0x130')](_0x5beea6))['then'](_0x49bb4f['checkIfTime'](_0x5beea6[_0x0a9e('0x152')],_0x5beea6[_0x0a9e('0x153')],_0x5beea6['name'],_0x5beea6))[_0x0a9e('0xb4')](_0x49bb4f['checkIfTimeIntervals'](_0x5beea6[_0x0a9e('0x43')],_0x5beea6[_0x0a9e('0x153')],_0x5beea6['name'],_0x5beea6))[_0x0a9e('0xb4')](_0x49bb4f[_0x0a9e('0x14a')](_0x5beea6))['catch'](loggerCatchQueueSummary(_0x0a9e('0x154'),_0x5beea6));}else{notSendMessagesQueue(_0x5beea6);}}else{freeVariablesPredictive(_0x5beea6);}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x12f')]=function(){var _0x17259c=this;var _0x434df7;for(var _0x45b8ed in this[_0x0a9e('0x1f')]){if(this['campaigns'][_0x0a9e('0xaa')](_0x45b8ed)){_0x434df7=this[_0x0a9e('0x1f')][_0x45b8ed];if(isCampaignIvr(_0x434df7[_0x0a9e('0x4d')])&&isActive(_0x434df7[_0x0a9e('0x79')])){_0x434df7[_0x0a9e('0x9e')]=!![];BPromise[_0x0a9e('0xb3')]()[_0x0a9e('0xb4')](checkIsActive(_0x434df7,_0x434df7['active']))['then'](checkInterval(_0x434df7))[_0x0a9e('0xb4')](_0x17259c[_0x0a9e('0x130')](_0x434df7))[_0x0a9e('0xb4')](_0x17259c['checkIfTime'](_0x434df7['dialGlobalInterval'],_0x434df7[_0x0a9e('0x153')],_0x434df7['name'],_0x434df7))[_0x0a9e('0xb4')](_0x17259c[_0x0a9e('0x136')](_0x434df7[_0x0a9e('0x43')],_0x434df7[_0x0a9e('0x153')],_0x434df7[_0x0a9e('0x3f')],_0x434df7))[_0x0a9e('0xb4')](_0x17259c[_0x0a9e('0x14f')](_0x434df7))[_0x0a9e('0xac')](loggerCatchQueueSummary(_0x0a9e('0x155'),_0x434df7));}else{notSendMessagesCampaign(_0x434df7);}}}};function getCallerIdRandom(_0x47e61e,_0x516859){var _0x399cf4,_0x54d34e,_0x2f4540;if(_0x516859<=0x0){_0x516859=0x1;}_0x399cf4=new RegExp(_0x0a9e('0x156')+_0x516859+'}$');_0x54d34e=Math[_0x0a9e('0x157')](0xa,_0x516859-0x1);_0x2f4540=Math[_0x0a9e('0x157')](0xa,_0x516859)-0x1;return util['format']('%s',_[_0x0a9e('0x158')](_0x47e61e,_0x399cf4,_[_0x0a9e('0x159')](_0x54d34e,_0x2f4540)));}function extractCalleridName(_0x2bc6a3){var _0x5174c5=_0x2bc6a3[_0x0a9e('0x15a')](/"(.*?)"/);return _0x5174c5?_0x5174c5[0x1]:_0x2bc6a3;}function extractCalleridNumber(_0xcdd954){var _0x1e30bc=_0xcdd954['match'](/<(.*?)>/);return _0x1e30bc?_0x1e30bc[0x1]:_0xcdd954;}Dialer[_0x0a9e('0x19')][_0x0a9e('0x15b')]=function(_0x459ab7,_0x6e8a19){var _0x69b4d6=this;var _0x1ab878=uuid['v4']();this['actions'][_0x1ab878]=new Action(_0x459ab7,_0x6e8a19,_0x1ab878);return new BPromise(function(_0x5613e3,_0x46146f){if(_[_0x0a9e('0x3d')](_0x459ab7)&&_0x0a9e('0x15c')!==typeof _0x459ab7){return _0x46146f(msgResponse('originate','Failure',_0x0a9e('0x15d')));}if(_[_0x0a9e('0x3d')](_0x6e8a19[_0x0a9e('0x15e')]['phone'])||_0x6e8a19['Contact'][_0x0a9e('0x15f')]===null){return _0x46146f(msgResponse(_0x0a9e('0x160'),_0x0a9e('0x139'),_0x0a9e('0x161')));}var _0x1bafdd={'XMD-CALLERID':_0x69b4d6['actions'][_0x1ab878][_0x0a9e('0x162')](),'XMD-AGI':_0x459ab7['dialQueueProject']?util[_0x0a9e('0x7a')](_0x0a9e('0x163'),ipAgi,_0x459ab7['dialQueueProject']):_0x0a9e('0x164'),'XMD-AGIAFTER':_0x459ab7['dialQueueProject2']?util[_0x0a9e('0x7a')](_0x0a9e('0x163'),ipAgi,_0x459ab7[_0x0a9e('0xf4')]):_0x0a9e('0x164'),'XMD-QUEUE':_0x459ab7[_0x0a9e('0x4d')]==='outbound'?util[_0x0a9e('0x7a')](_0x0a9e('0x165'),_0x459ab7[_0x0a9e('0x3f')],_0x459ab7['dialQueueOptions']||'',_0x459ab7[_0x0a9e('0x166')]?'c':'',_0x459ab7['dialQueueTimeout']||0x3):_0x0a9e('0x164'),'XMD-CONTACTID':_0x6e8a19[_0x0a9e('0xcc')],'XMD-CDRTYPE':_0x0a9e('0x6'),'CALLERID(all)':_0x69b4d6['actions'][_0x1ab878][_0x0a9e('0x162')](),'XMD-AMD':_0x459ab7[_0x0a9e('0xdb')]?_0x0a9e('0x167'):_0x0a9e('0x164'),'XMD-DESTINATION':_0x0a9e('0x168')};if(_0x459ab7[_0x0a9e('0xdb')]){_0x1bafdd['XMD-AMDINITIALSILENCE']=_0x459ab7[_0x0a9e('0x169')]||0x9c4;_0x1bafdd[_0x0a9e('0x16a')]=_0x459ab7[_0x0a9e('0x16b')]||0x5dc;_0x1bafdd[_0x0a9e('0x16c')]=_0x459ab7[_0x0a9e('0x16d')]||0x320;_0x1bafdd[_0x0a9e('0x16e')]=_0x459ab7[_0x0a9e('0x16f')]||0x1388;_0x1bafdd[_0x0a9e('0x170')]=_0x459ab7['dialAMDMinWordLength']||0x64;_0x1bafdd[_0x0a9e('0x171')]=_0x459ab7[_0x0a9e('0x172')]||0x32;_0x1bafdd[_0x0a9e('0x173')]=_0x459ab7[_0x0a9e('0x174')]||0x3;_0x1bafdd['XMD-AMDSILENCETHRESHOLD']=_0x459ab7[_0x0a9e('0x175')]||0x100;_0x1bafdd['XMD-AMDMAXIMUMWORDLENGTH']=_0x459ab7[_0x0a9e('0x176')]||0x1388;}if(_0x459ab7[_0x0a9e('0x4d')]===_0x0a9e('0x8d')){_0x1bafdd['XMD-VOICEQUEUEID']=_0x6e8a19[_0x0a9e('0xcf')];}else{_0x1bafdd[_0x0a9e('0x177')]=_0x6e8a19[_0x0a9e('0xd0')];}for(var _0x36c0f4 in _0x6e8a19['Contact']){if(_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0xaa')](_0x36c0f4)){if(isNotNull(_0x6e8a19[_0x0a9e('0x15e')][_0x36c0f4])&&_0x36c0f4!=='id'&&_0x36c0f4!==_0x0a9e('0x178')&&_0x36c0f4!==_0x0a9e('0x179')&&_0x36c0f4!==_0x0a9e('0x17a')){_0x1bafdd[util[_0x0a9e('0x7a')]('%s%s',_0x0a9e('0x17b'),_[_0x0a9e('0x17c')](_0x36c0f4))]=_0x6e8a19[_0x0a9e('0x15e')][_0x36c0f4];}}}var _0xa42055=_0x69b4d6['isTrunkReachable'](_0x459ab7[_0x0a9e('0x78')])?getCallerId(_0x459ab7['Trunk'][_0x0a9e('0x17d')],_0x459ab7[_0x0a9e('0x59')],_0x459ab7[_0x0a9e('0x17e')]>0x0?getCallerIdRandom(_0x459ab7[_0x0a9e('0x17f')],_0x459ab7[_0x0a9e('0x17e')]):_0x459ab7[_0x0a9e('0x17f')]):getCallerId(_[_0x0a9e('0xab')](_0x459ab7['TrunkBackup'])?_0x459ab7[_0x0a9e('0x78')]['callerid']:_0x459ab7[_0x0a9e('0x131')][_0x0a9e('0x17d')],_0x459ab7['dialOriginateCallerIdName'],_0x459ab7[_0x0a9e('0x17e')]>0x0?getCallerIdRandom(_0x459ab7[_0x0a9e('0x17f')],_0x459ab7[_0x0a9e('0x17e')]):_0x459ab7[_0x0a9e('0x17f')]);if(_0xa42055){_0x1bafdd['XMD-ORIGINATECALLERIDNAME']=_0x69b4d6[_0x0a9e('0x24')][_0x1ab878][_0x0a9e('0x180')]=extractCalleridName(_0xa42055);_0x1bafdd['XMD-ORIGINATECALLERIDNUM']=_0x69b4d6[_0x0a9e('0x24')][_0x1ab878]['originatecalleridnum']=extractCalleridNumber(_0xa42055);}return ami['Action']({'actionid':_0x1ab878,'action':'originate','channel':_0x69b4d6[_0x0a9e('0xd4')](_0x459ab7[_0x0a9e('0x78')])?util['format'](_0x0a9e('0x181'),_0x459ab7[_0x0a9e('0x78')]['name'],isNotNull(_0x459ab7[_0x0a9e('0x5b')])?_0x459ab7[_0x0a9e('0x5b')][_0x0a9e('0x182')]()||'':'',_0x459ab7[_0x0a9e('0x183')]>0x0?_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0x15f')][_0x0a9e('0x184')](_0x459ab7['dialCutDigit']):_0x6e8a19[_0x0a9e('0x15e')]['phone']):util[_0x0a9e('0x7a')](_0x0a9e('0x181'),_[_0x0a9e('0xab')](_0x459ab7[_0x0a9e('0x131')])?_0x459ab7[_0x0a9e('0x78')][_0x0a9e('0x3f')]:_0x459ab7['TrunkBackup'][_0x0a9e('0x3f')],isNotNull(_0x459ab7[_0x0a9e('0x5b')])?_0x459ab7[_0x0a9e('0x5b')]['trim']()||'':'',_0x459ab7[_0x0a9e('0x183')]>0x0?_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0x15f')][_0x0a9e('0x184')](_0x459ab7[_0x0a9e('0x183')]):_0x6e8a19[_0x0a9e('0x15e')][_0x0a9e('0x15f')]),'callerid':_0xa42055,'Exten':_0x0a9e('0x168'),'Context':_0x0a9e('0x185'),'Priority':'1','variable':_0x1bafdd,'timeout':(_0x459ab7[_0x0a9e('0x5a')]||0x1e)*0x3e8,'async':!![],'channelid':_0x1ab878})[_0x0a9e('0xb4')](function(_0x19732c){return _0x5613e3(_0x19732c);})[_0x0a9e('0xac')](function(_0x130947){_0x459ab7[_0x0a9e('0x66')]+=0x1;var _0x2efc65=new History(_0x69b4d6['actions'][_0x1ab878]);logger[_0x0a9e('0x91')](util[_0x0a9e('0x7a')](_0x0a9e('0x186'),JSON['stringify'](_0x130947)));_0x2efc65[_0x0a9e('0xa5')]=0xe;_0x2efc65[_0x0a9e('0xa6')]=_0x0a9e('0x187');_0x2efc65[_0x0a9e('0xa7')]=moment()['format'](_0x0a9e('0xf5'));_0x2efc65[_0x0a9e('0x112')]=_0x2efc65[_0x0a9e('0xa7')];_0x69b4d6[_0x0a9e('0xc5')](_0x2efc65)['catch'](loggerCatch(_0x0a9e('0x188')));_0x69b4d6[_0x0a9e('0xc3')](_0x2efc65)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x188')))['finally'](function(){delete _0x69b4d6['actions'][_0x1ab878];return _0x46146f(msgResponse(_0x0a9e('0x160'),_0x0a9e('0x48'),_0x0a9e('0x189')));});});});};Dialer[_0x0a9e('0x19')][_0x0a9e('0x2f')]=function(_0x433b5d){var _0x15df71=this[_0x0a9e('0x24')][_0x433b5d[_0x0a9e('0x117')]];var _0x84117=this;if(_0x15df71){delete this[_0x0a9e('0x24')][_0x433b5d[_0x0a9e('0x117')]];_0x15df71[_0x0a9e('0xfb')]=moment()[_0x0a9e('0x7a')]('YYYY-MM-DD\x20HH:mm:ss');var _0x7f3b59=_0x15df71[_0x0a9e('0x4d')]===_0x0a9e('0x7d')?this['campaigns'][_0x15df71['queue']]:this[_0x0a9e('0x1e')][_0x15df71['getQueue']()];if(!this[_0x0a9e('0x18a')](_0x433b5d[_0x0a9e('0x18b')])){this[_0x0a9e('0xb0')](_0x7f3b59);return this[_0x0a9e('0x18c')](_0x15df71,_0x7f3b59,_0x433b5d)['then'](function(_0x59ce14){})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x18d')));}else{this[_0x0a9e('0x26')][_0x433b5d[_0x0a9e('0xd8')]]=_0x15df71;}}};Dialer['prototype'][_0x0a9e('0x18e')]=function(_0xc1811b,_0xa64f55,_0x25f5fa){var _0x193ef7=new History(_0xa64f55);if(_0x193ef7['countbusyretry']+_0x193ef7['countcongestionretry']+_0x193ef7[_0x0a9e('0x18f')]+_0x193ef7[_0x0a9e('0x190')]+_0x193ef7[_0x0a9e('0x100')]+_0x193ef7[_0x0a9e('0x10e')]+_0x193ef7[_0x0a9e('0x191')]+_0x193ef7[_0x0a9e('0x192')]>=_0x25f5fa[_0x0a9e('0x193')]-0x1){return!![];}switch(_0xc1811b){case 0x3:if(_0x193ef7['countnoanswerretry']>=_0x25f5fa[_0x0a9e('0x194')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countnoanswerretry':_0x193ef7[_0x0a9e('0x18f')]+=0x1,'scheduledat':moment()['add'](_0x25f5fa['dialNoAnswerRetryFrequency'],'minutes')[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7['ContactId'],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch('[rescheduleContact][NoAnswer]'));}break;case 0x5:if(_0x193ef7[_0x0a9e('0x195')]>=_0x25f5fa[_0x0a9e('0x196')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countbusyretry':_0x193ef7[_0x0a9e('0x195')]+=0x1,'scheduledat':moment()['add'](_0x25f5fa[_0x0a9e('0x197')],'minutes')['format'](_0x0a9e('0xf5')),'ContactId':_0x193ef7['ContactId'],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x198')));}break;case 0x8:if(_0x193ef7[_0x0a9e('0x199')]>=_0x25f5fa[_0x0a9e('0x19a')]-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countcongestionretry':_0x193ef7['countcongestionretry']+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa[_0x0a9e('0x19b')],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7['ListId'],'VoiceQueueId':_0x193ef7['VoiceQueueId']||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact]\x20[Congestion]'));}break;case 0x0:if(_0x193ef7['countnosuchnumberretry']>=_0x25f5fa['dialNoSuchNumberMaxRetry']-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countnosuchnumberretry':_0x193ef7['countnosuchnumberretry']+=0x1,'scheduledat':moment()['add'](_0x25f5fa[_0x0a9e('0x19c')],'minutes')[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0x193ef7[_0x0a9e('0x100')]>=_0x25f5fa[_0x0a9e('0xff')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countdropretry':_0x193ef7[_0x0a9e('0x100')]+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa[_0x0a9e('0x101')],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7['VoiceQueueId']||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][Drop]'));}break;case 0xb:if(_0x193ef7[_0x0a9e('0x10e')]>=_0x25f5fa['dialAbandonedMaxRetry']-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countabandonedretry':_0x193ef7[_0x0a9e('0x10e')]+=0x1,'scheduledat':moment()['add'](_0x25f5fa['dialAbandonedRetryFrequency'],_0x0a9e('0x102'))['format'](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})['catch'](loggerCatch(_0x0a9e('0x111')));}break;case 0x13:if(_0x193ef7['countmachineretry']>=_0x25f5fa['dialMachineMaxRetry']-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countmachineretry':_0x193ef7[_0x0a9e('0x191')]+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa[_0x0a9e('0x19d')],_0x0a9e('0x102'))['format'](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x193ef7['CampaignId']||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x19e')));}break;case 0x14:if(_0x193ef7['countagentrejectretry']>=_0x25f5fa[_0x0a9e('0x19f')]-0x1){return!![];}else{this[_0x0a9e('0xbb')]({'active':![],'countagentrejectretry':_0x193ef7[_0x0a9e('0x192')]+=0x1,'scheduledat':moment()[_0x0a9e('0x10f')](_0x25f5fa['dialAgentRejectRetryFrequency'],_0x0a9e('0x102'))[_0x0a9e('0x7a')](_0x0a9e('0xf5')),'ContactId':_0x193ef7[_0x0a9e('0xcc')],'ListId':_0x193ef7[_0x0a9e('0xcd')],'VoiceQueueId':_0x193ef7['VoiceQueueId']||undefined,'CampaignId':_0x193ef7[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][AgentReject]'));}break;default:return!![];}};Dialer[_0x0a9e('0x19')]['callProgressDetecting']=function(_0x151abc,_0x2f5bfc,_0x41354f){var _0x1f2eaa=this;var _0x9c7523=new History(_0x151abc);return new BPromise(function(_0x115092,_0x25de7c){if(_[_0x0a9e('0x3d')](_0x2f5bfc)&&_0x0a9e('0x15c')!==typeof _0x2f5bfc){return _0x25de7c(msgResponse(_0x0a9e('0x1a0'),_0x0a9e('0x139'),_0x0a9e('0x1a1')));}if(_[_0x0a9e('0x3d')](_0x41354f)&&_0x0a9e('0x15c')!==typeof _0x41354f){return _0x25de7c(msgResponse(_0x0a9e('0x1a0'),'Failure',_0x0a9e('0x1a2')));}switch(_0x41354f[_0x0a9e('0xf1')]){case'0':_0x2f5bfc[_0x0a9e('0x65')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x0;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1a3');_0x9c7523[_0x0a9e('0x190')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa['createHistory'](_0x9c7523)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x1f2eaa['checkRetriveMax'](0x0,_0x151abc,_0x2f5bfc)){if(_0x9c7523[_0x0a9e('0x195')]+_0x9c7523['countcongestionretry']+_0x9c7523['countnoanswerretry']+_0x9c7523['countnosuchnumberretry']+_0x9c7523[_0x0a9e('0x100')]+_0x9c7523[_0x0a9e('0x10e')]+_0x9c7523[_0x0a9e('0x191')]+_0x9c7523[_0x0a9e('0x192')]>=_0x2f5bfc['dialGlobalMaxRetry']){_0x1f2eaa['stateGlobal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1a5'));}else{_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1a5'));}}break;case'3':_0x2f5bfc[_0x0a9e('0x64')]+=0x1;_0x9c7523['state']=0x3;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1a7');_0x9c7523[_0x0a9e('0x18f')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)[_0x0a9e('0xac')](loggerCatch('[syncAgentComplete][createHistory][3]'));if(_0x1f2eaa[_0x0a9e('0x18e')](0x3,_0x151abc,_0x2f5bfc)){if(_0x9c7523['countnoanswerretry']>=_0x2f5bfc['dialNoAnswerMaxRetry']){_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,'reason\x203\x20ringing\x20no\x20answer');}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1a9'));}}break;case'5':_0x2f5bfc[_0x0a9e('0x5f')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x5;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1aa');_0x9c7523[_0x0a9e('0x195')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)['catch'](loggerCatch(_0x0a9e('0x1ab')));if(_0x1f2eaa[_0x0a9e('0x18e')](0x5,_0x151abc,_0x2f5bfc)){if(_0x9c7523['countbusyretry']>=_0x2f5bfc[_0x0a9e('0x196')]){_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1ac'));}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,'reason\x205\x20busy');}}break;case'8':_0x2f5bfc[_0x0a9e('0x60')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x8;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1ad');_0x9c7523[_0x0a9e('0x199')]+=0x1;_0x9c7523['countglobal']+=0x1;_0x1f2eaa['createHistory'](_0x9c7523)[_0x0a9e('0xac')](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0x1f2eaa[_0x0a9e('0x18e')](0x8,_0x151abc,_0x2f5bfc)){if(_0x9c7523['countcongestionretry']>=_0x2f5bfc[_0x0a9e('0x19a')]){_0x1f2eaa['createStateFinal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1ae'));}else{_0x1f2eaa['stateGlobal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1ae'));}}break;case'11':_0x2f5bfc[_0x0a9e('0x1af')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0xb;_0x9c7523['statedesc']='Abandoned';_0x9c7523[_0x0a9e('0x10e')]+=0x1;_0x9c7523['countglobal']+=0x1;_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)['catch'](loggerCatch(_0x0a9e('0x114')));if(_0x1f2eaa['checkRetriveMax'](0xb,_0x151abc,_0x2f5bfc)){if(_0x9c7523[_0x0a9e('0x10e')]>=_0x2f5bfc[_0x0a9e('0x1b0')]){_0x1f2eaa['createStateFinal'](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1b1'));}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,_0x0a9e('0x1b1'));}}break;case'20':_0x2f5bfc[_0x0a9e('0x68')]+=0x1;_0x9c7523[_0x0a9e('0xa5')]=0x14;_0x9c7523[_0x0a9e('0xa6')]=_0x0a9e('0x1b2');_0x9c7523[_0x0a9e('0x192')]+=0x1;_0x9c7523[_0x0a9e('0x1a4')]+=0x1;_0x1f2eaa['createHistory'](_0x9c7523)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1b3')));if(_0x1f2eaa[_0x0a9e('0x18e')](0x14,_0x151abc,_0x2f5bfc)){if(_0x9c7523[_0x0a9e('0x192')]>=_0x2f5bfc[_0x0a9e('0x19f')]){_0x1f2eaa['createStateFinal'](_0x9c7523,_0x115092,_0x25de7c,'reason\x2020\x20agentreject');}else{_0x1f2eaa[_0x0a9e('0x1a8')](_0x9c7523,_0x115092,_0x25de7c,'reason\x2020\x20agentreject');}}break;default:_0x2f5bfc[_0x0a9e('0x1b4')]+=0x1;_0x9c7523['state']=0xc;_0x9c7523[_0x0a9e('0xa6')]=_0x41354f[_0x0a9e('0xf1')];_0x1f2eaa[_0x0a9e('0xc5')](_0x9c7523)[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1b5')));if(_0x1f2eaa[_0x0a9e('0x18e')](_0x41354f[_0x0a9e('0xf1')],_0x151abc,_0x2f5bfc)){if(_0x9c7523['countbusyretry']+_0x9c7523['countcongestionretry']+_0x9c7523[_0x0a9e('0x18f')]+_0x9c7523[_0x0a9e('0x190')]+_0x9c7523['countdropretry']+_0x9c7523[_0x0a9e('0x10e')]+_0x9c7523[_0x0a9e('0x191')]+_0x9c7523[_0x0a9e('0x192')]>=_0x2f5bfc['dialGlobalMaxRetry']){_0x1f2eaa['stateGlobal'](_0x9c7523,_0x115092,_0x25de7c,_0x41354f['reason']);}else{_0x1f2eaa[_0x0a9e('0x1a6')](_0x9c7523,_0x115092,_0x25de7c,_0x41354f[_0x0a9e('0xf1')]);}}}});};Dialer[_0x0a9e('0x19')][_0x0a9e('0x1a8')]=function(_0x4ab36f,_0x2fec22,_0x5d0eb5,_0x103402){var _0x547a2a=new Final(_0x4ab36f);_0x547a2a[_0x0a9e('0xa5')]=0xf;_0x547a2a['statedesc']='Global';this[_0x0a9e('0x1a6')](_0x547a2a,_0x2fec22,_0x5d0eb5,_0x103402);};Dialer[_0x0a9e('0x19')]['createStateFinal']=function(_0x5dbf0b,_0x31114d,_0x5dacb3,_0x1352c){this['moveContactManagedDialer'](_0x5dbf0b)[_0x0a9e('0xb4')](function(_0xb5209d){return _0x31114d(msgResponse(_0x0a9e('0x1a0'),'Success',_0x1352c));})['catch'](function(_0x1754c8){return _0x5dacb3(msgResponse(_0x0a9e('0x1b6'),_0x0a9e('0x139'),_0x0a9e('0x1b7')));});};Dialer['prototype'][_0x0a9e('0x8')]=function(_0x136d28){var _0x539ad9=this;var _0x360306=_0x136d28[_0x0a9e('0x1b8')]/0x64;var _0x11ba87=_0x136d28['outboundDropCallsDayTimeout']/(_0x136d28[_0x0a9e('0x63')]+_0x136d28[_0x0a9e('0x5d')]);var _0xb1fd37=Math[_0x0a9e('0x1b9')](_0x136d28[_0x0a9e('0x72')]*(_0x136d28[_0x0a9e('0x1ba')]/0x64));var _0x7412c=Math[_0x0a9e('0x1b9')](_0x136d28[_0x0a9e('0x72')]*(_0x136d28[_0x0a9e('0x1bb')]/0x64));var _0x3f5891=_0x136d28[_0x0a9e('0x9f')]+_0x136d28[_0x0a9e('0x53')];var _0x34ff77=Math[_0x0a9e('0x1bc')](_0x136d28[_0x0a9e('0x74')]*_0x136d28[_0x0a9e('0x76')]*_0x136d28[_0x0a9e('0x6f')]*_0x136d28[_0x0a9e('0x70')]);if(_[_0x0a9e('0x3d')](_0x136d28[_0x0a9e('0x28')])){if(!_[_0x0a9e('0x3d')](_0x136d28['startPredictive'])){_0x136d28[_0x0a9e('0x27')]=undefined;loggerPredictive[_0x0a9e('0x91')](_0x0a9e('0x1bd'),'check\x20predictive\x20is\x20not\x20undefine');}if(!_[_0x0a9e('0x3d')](_0x136d28[_0x0a9e('0x8b')])){loggerPredictive[_0x0a9e('0x91')](_0x0a9e('0x1bd'),'check\x20handlePredictive\x20is\x20not\x20undefine');clearInterval(_0x136d28[_0x0a9e('0x8b')]);_0x136d28[_0x0a9e('0x8b')]=undefined;}_0x136d28['startProgressive']=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));loggerPredictive[_0x0a9e('0x80')](_0x136d28['name'],'collection\x20data\x20in\x20progressive\x20at',_0x136d28[_0x0a9e('0x28')]);this[_0x0a9e('0x14c')](_0x136d28,0x1);}else if(ifInterval(_0x136d28[_0x0a9e('0x1be')],_0x136d28['startProgressive'])){this['handlePower'](_0x136d28,0x1);loggerPredictiveCalls[_0x0a9e('0x80')](_0x0a9e('0x1bf'),_0x136d28[_0x0a9e('0x28')],_0x136d28[_0x0a9e('0x3f')]);_0x136d28['erlangCalls']=0x0;_0x136d28[_0x0a9e('0x6e')]=0x0;}else if(_0x360306<_0x11ba87&&_0x136d28['dialPredictiveOptimization']==='dropRate'){freeVariablesPredictive(_0x136d28);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x1c0'),_0x0a9e('0x1c1'),_0x11ba87,'startProgressive',_0x136d28[_0x0a9e('0x3f')]);}else if(_0x34ff77<_0x136d28[_0x0a9e('0x6e')]&&_0x136d28[_0x0a9e('0x1c2')]==='dropRate'){freeVariablesPredictive(_0x136d28);loggerPredictive['info'](_0x0a9e('0x1c3'),_0x0a9e('0x1c4'),_0x34ff77,_0x0a9e('0x1c5'),_0x136d28['predictiveIntervalErlangCallsDroppedCalls'],'startProgressive',_0x136d28[_0x0a9e('0x3f')]);}else if(!ifInterval(_0x136d28['dialPredictiveInterval'],_0x136d28['startProgressive'])&&_['isUndefined'](_0x136d28[_0x0a9e('0x27')])&&!_[_0x0a9e('0x3d')](_0x136d28[_0x0a9e('0x28')])){_0x136d28['startPredictive']=moment()[_0x0a9e('0x7a')](_0x0a9e('0xf5'));loggerPredictive['info'](_0x136d28[_0x0a9e('0x3f')],'started\x20in\x20predictive\x20at',_0x136d28[_0x0a9e('0x27')]);this[_0x0a9e('0xb8')](_0x136d28['dialPredictiveInterval'])[_0x0a9e('0xb4')](this[_0x0a9e('0x1c6')](_0x136d28))[_0x0a9e('0xb4')](mergeDataErlangB(_0x136d28))['then'](this[_0x0a9e('0x1c7')](_0x136d28))[_0x0a9e('0xac')](loggerCatchPredictive(_0x0a9e('0x1c8'),_0x136d28));}else if(!ifInterval(_0x136d28['dialPredictiveInterval'],_0x136d28[_0x0a9e('0x27')])){_0x136d28[_0x0a9e('0x6e')]=0x0;_0x136d28[_0x0a9e('0x27')]=moment()['format'](_0x0a9e('0xf5'));loggerPredictive[_0x0a9e('0x80')](_0x136d28[_0x0a9e('0x3f')],_0x0a9e('0x1c9'),_0x136d28[_0x0a9e('0x27')]);clearInterval(_0x136d28[_0x0a9e('0x8b')]);_0x136d28[_0x0a9e('0x8b')]=undefined;this[_0x0a9e('0xb8')](_0x136d28['dialPredictiveInterval'])[_0x0a9e('0xb4')](this[_0x0a9e('0x1c6')](_0x136d28))[_0x0a9e('0xb4')](mergeDataErlangB(_0x136d28))[_0x0a9e('0xb4')](this['startMethodPredictive'](_0x136d28))[_0x0a9e('0xac')](loggerCatchPredictive(_0x0a9e('0x1ca'),_0x136d28));}else if(_0x136d28['predictiveIntervalAvailable']&&_0x3f5891<_0x136d28[_0x0a9e('0x72')]-_0x7412c){freeVariablesPredictive(_0x136d28);loggerPredictive[_0x0a9e('0x80')](_0x136d28[_0x0a9e('0x3f')],_0x0a9e('0x1cb'),_0x3f5891,_0x0a9e('0x1cc'),_0x136d28[_0x0a9e('0x72')],'-',_0x7412c,'=',_0x136d28[_0x0a9e('0x72')]-_0x7412c,')');}else if(_0x136d28[_0x0a9e('0x72')]&&_0x3f5891>_0x136d28['predictiveIntervalAvailable']+_0xb1fd37){freeVariablesPredictive(_0x136d28);loggerPredictive[_0x0a9e('0x80')](_0x136d28['name'],_0x0a9e('0x1cb'),_0x3f5891,_0x0a9e('0x1cd'),_0x136d28['predictiveIntervalAvailable'],'+',_0xb1fd37,'=',_0x136d28[_0x0a9e('0x72')]+_0xb1fd37,')');}};Dialer[_0x0a9e('0x19')]['getDataPredictive']=function(_0x1b4341){var _0x3eff33=this;return function(_0x5b6054){return new BPromise(function(_0xe89e7c,_0x4e8b2a){_['merge'](_0x1b4341,_0x5b6054[0x0]);if(checkGetDataPredictive(_0x5b6054[0x0])){var _0x57d6ff=_0x1b4341[_0x0a9e('0x72')]=_0x1b4341[_0x0a9e('0x53')]+_0x1b4341['available'];var _0x41a8f0=_0x1b4341[_0x0a9e('0x1be')]*0x3c;var _0x5d26c8=_0x5b6054[0x0][_0x0a9e('0x6a')]+_0x5b6054[0x0][_0x0a9e('0x69')];var _0x4bdcd3=(_0x5b6054[0x0][_0x0a9e('0x83')]+_0x5b6054[0x0][_0x0a9e('0x6c')]+_0x5b6054[0x0][_0x0a9e('0x6b')])/_0x5b6054[0x0]['predictiveIntervalTotalCalls'];_0x1b4341[_0x0a9e('0x6f')]=_0x4bdcd3>0x0?_0x4bdcd3:0x1;switch(_0x1b4341[_0x0a9e('0x1c2')]){case _0x0a9e('0x1ce'):var _0x956255=_0x1b4341[_0x0a9e('0x1b8')]/0x64;return _0x3eff33['abandonmentRate'](_0x57d6ff,_0x41a8f0,_0x5d26c8,_0x4bdcd3,_0x956255)[_0x0a9e('0xb4')](function(_0x495ac6){return _0xe89e7c(_0x495ac6);});case _0x0a9e('0x1cf'):var _0x43e45a=_0x1b4341[_0x0a9e('0x1b8')]/0x64;return _0x3eff33[_0x0a9e('0x1d0')](_0x57d6ff,_0x41a8f0,_0x5d26c8,_0x4bdcd3,_0x43e45a)[_0x0a9e('0xb4')](function(_0x25cae1){return _0xe89e7c(_0x25cae1);});default:return _0x4e8b2a(msgResponse(_0x0a9e('0x1d1'),_0x0a9e('0x139'),_0x0a9e('0x1d2')));}}else{return _0x4e8b2a(msgResponse('[getDataPredictive]',_0x0a9e('0x139'),_0x0a9e('0x1d3')));}});};};Dialer[_0x0a9e('0x19')]['getDataPredictiveOld']=function(_0x48782d){var _0x5c2e1b=this;return function(_0x4b99fb){return new BPromise(function(_0x49e349,_0x347d13){_['merge'](_0x48782d,_0x4b99fb[0x0]);if(checkGetDataPredictive(_0x4b99fb[0x0])){loggerPredictive[_0x0a9e('0x80')](JSON[_0x0a9e('0x49')](_0x4b99fb[0x0]));if(_0x48782d[_0x0a9e('0x1c2')]===_0x0a9e('0x1ce')){return _0x5c2e1b[_0x0a9e('0xc1')](_0x48782d['id'])[_0x0a9e('0xb4')](function(_0x5dd837){var _0x20a1c0=_0x48782d['loggedIn']-_0x5dd837[0x0]['outboundQueuePauses'];var _0x139b02=_0x48782d['dialPredictiveInterval']*0x3c;var _0x2885c8=_0x4b99fb[0x0]['predictiveIntervalAvgTalktime']+_0x4b99fb[0x0][_0x0a9e('0x69')];var _0x638297=(_0x4b99fb[0x0][_0x0a9e('0x83')]+_0x4b99fb[0x0][_0x0a9e('0x6c')]+_0x4b99fb[0x0][_0x0a9e('0x6b')])/_0x4b99fb[0x0]['predictiveIntervalTotalCalls'];var _0x1ee915=_0x48782d[_0x0a9e('0x1b8')]/0x64;_0x48782d['predictiveIntervalPauses']=_0x5dd837[0x0][_0x0a9e('0x1d4')]||0x0;_0x48782d[_0x0a9e('0x6f')]=_0x638297>0x0?_0x638297:0x1;return _0x5c2e1b['abandonmentRate'](_0x20a1c0,_0x139b02,_0x2885c8,_0x638297,_0x1ee915);})[_0x0a9e('0xb4')](function(_0x26320a){return _0x49e349(_0x26320a);})[_0x0a9e('0xac')](function(_0x3f8171){return _0x347d13(msgResponse(_0x0a9e('0x1d5'),_0x0a9e('0x139'),JSON[_0x0a9e('0x49')](_0x3f8171)));});}if(_0x48782d['dialPredictiveOptimization']===_0x0a9e('0x1cf')){return _0x5c2e1b[_0x0a9e('0xc1')](_0x48782d['id'])[_0x0a9e('0xb4')](function(_0x16a8c4){var _0x587f68=_0x48782d[_0x0a9e('0x4f')]-_0x16a8c4[0x0][_0x0a9e('0x1d4')];var _0x189e15=_0x48782d[_0x0a9e('0x1be')]*0x3c;var _0x32c53e=_0x4b99fb[0x0][_0x0a9e('0x6a')]+_0x4b99fb[0x0][_0x0a9e('0x69')];var _0x8095d6=(_0x4b99fb[0x0]['predictiveIntervalAnsweredCalls']+_0x4b99fb[0x0][_0x0a9e('0x6c')]+_0x4b99fb[0x0][_0x0a9e('0x6b')])/_0x4b99fb[0x0][_0x0a9e('0x73')];var _0x4a80a0=_0x48782d[_0x0a9e('0x1b8')]/0x64;_0x48782d[_0x0a9e('0x71')]=_0x16a8c4[0x0][_0x0a9e('0x1d4')]||0x0;_0x48782d[_0x0a9e('0x6f')]=_0x8095d6>0x0?_0x8095d6:0x1;return _0x5c2e1b[_0x0a9e('0x1d0')](_0x587f68,_0x189e15,_0x32c53e,_0x8095d6,_0x4a80a0);})[_0x0a9e('0xb4')](function(_0x13f18){return _0x49e349(_0x13f18);})[_0x0a9e('0xac')](function(_0x16b449){return _0x347d13(msgResponse(_0x0a9e('0x1d5'),'Failure',JSON[_0x0a9e('0x49')](_0x16b449)));});}}else{return _0x347d13(msgResponse(_0x0a9e('0x1d1'),_0x0a9e('0x139'),'check\x20failure'));}});};};Dialer['prototype'][_0x0a9e('0x1c7')]=function(_0x37165a){var _0x395034=this;return function(){var _0x73014f=0x0;var _0x2cbfa3=Math[_0x0a9e('0x1bc')](_0x37165a[_0x0a9e('0x75')]*0x3e8);if(_0x2cbfa3>0x0){_0x2cbfa3=_0x2cbfa3<0x64?0x64:_0x2cbfa3;loggerPredictive[_0x0a9e('0x80')](_0x37165a[_0x0a9e('0x3f')],'one\x20call\x20every:',_0x2cbfa3,_0x0a9e('0x1d6'));_0x37165a[_0x0a9e('0x8b')]=setInterval(function(){_0x395034['handlePredictive'](_0x37165a);loggerPredictiveCalls[_0x0a9e('0x80')](_0x0a9e('0x1d7'),_0x73014f+=0x1);},_0x2cbfa3);}else{loggerPredictive['info'](_0x37165a['name'],_0x0a9e('0x1d8'));}};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x1d9')]=function(_0x31f9fe,_0x33d28f){var _0x548204=this;return function(_0x468a11){if(_['isEmpty'](_0x468a11)){if(_['isNil'](_0x33d28f['UserId'])||!_0x33d28f[_0x0a9e('0x1da')]){if(_0x31f9fe['dialMethod']==='booked'){_0x31f9fe['queueStatusComplete']=_[_0x0a9e('0x3d')](_0x31f9fe[_0x0a9e('0x11f')])?!![]:_0x31f9fe[_0x0a9e('0x11f')];var _0x45520d=uuid['v4']();_0x548204['actions'][_0x45520d]=new Action(_0x31f9fe,_0x33d28f,_0x45520d);loggerBooked[_0x0a9e('0x80')]('[booked][checkContactBlack]',_0x45520d,'queueStatusComplete:\x20',JSON[_0x0a9e('0x49')](_0x31f9fe[_0x0a9e('0x11f')]),_0x0a9e('0x1db'),_0x31f9fe['name']);if(_0x31f9fe['queueStatusComplete']){_0x31f9fe['queueStatusComplete']=![];_0x548204[_0x0a9e('0x29')][_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xaf')]]=[];ami[_0x0a9e('0x13c')]({'actionid':_0x45520d,'action':_0x0a9e('0x1dc'),'queue':_0x31f9fe['name']})[_0x0a9e('0xac')](function(_0x1036d4){_0x548204[_0x0a9e('0xb0')](_0x31f9fe);_0x548204[_0x0a9e('0xbb')]({'active':![],'ContactId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xcc')],'ListId':_0x548204['actions'][_0x45520d][_0x0a9e('0xcd')],'VoiceQueueId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xcf')]||undefined,'CampaignId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1dd')));delete _0x548204[_0x0a9e('0x24')][_0x45520d];});}else{loggerBooked[_0x0a9e('0x80')](_0x0a9e('0x1de'),JSON[_0x0a9e('0x49')](_0x31f9fe[_0x0a9e('0x11f')]),_0x0a9e('0x1db'),_0x31f9fe[_0x0a9e('0x3f')]);_0x548204[_0x0a9e('0xb0')](_0x31f9fe);_0x548204[_0x0a9e('0xbb')]({'active':![],'ContactId':_0x548204[_0x0a9e('0x24')][_0x45520d][_0x0a9e('0xcc')],'ListId':_0x548204['actions'][_0x45520d][_0x0a9e('0xcd')],'VoiceQueueId':_0x548204[_0x0a9e('0x24')][_0x45520d]['VoiceQueueId']||undefined,'CampaignId':_0x548204['actions'][_0x45520d]['CampaignId']||undefined})[_0x0a9e('0xac')](loggerCatch(_0x0a9e('0x1dd')));delete _0x548204['actions'][_0x45520d];}}else{return _0x548204[_0x0a9e('0x15b')](_0x31f9fe,_0x33d28f);}}else{if(getDiff(_0x33d28f[_0x0a9e('0x1df')])<_0x31f9fe['dialRecallMeTimeout']*0x3c){if(_0x33d28f[_0x0a9e('0x1e0')]&&!_0x33d28f['Agent'][_0x0a9e('0x1e1')]){_0x548204['preview'][_0x0a9e('0x122')](_0x33d28f['id'])[_0x0a9e('0x1c')](function(){_0x548204[_0x0a9e('0xb0')](_0x31f9fe);});}else{_0x548204[_0x0a9e('0xbd')]({'active':![]},_0x33d28f['id'],0x1)['finally'](function(){console[_0x0a9e('0x108')](_0x0a9e('0x1e2'));_0x548204[_0x0a9e('0xb0')](_0x31f9fe);});}}else{_0x31f9fe['outboundReCallsDay']+=0x1;_0x548204['updateOriginated'](_0x31f9fe);if(_0x31f9fe['dialRecallInQueue']){_0x548204['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x33d28f[_0x0a9e('0xcc')],'ListId':_0x33d28f[_0x0a9e('0xcd')],'VoiceQueueId':_0x33d28f[_0x0a9e('0xcf')]||undefined,'CampaignId':_0x33d28f[_0x0a9e('0xd0')]||undefined})[_0x0a9e('0xac')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));_0x548204[_0x0a9e('0xc5')](createObjHistory(_0x31f9fe,_0x33d28f,_0x0a9e('0x1e3'),0x17,_0x0a9e('0x1e4')))[_0x0a9e('0xac')](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x548204[_0x0a9e('0xca')](createObjHistory(_0x31f9fe,_0x33d28f,_0x0a9e('0x1e5'),0x16,_0x0a9e('0x1e6')),_0x0a9e('0x1e7'),_0x0a9e('0x1e8'));}}}}else{_0x31f9fe['outboundBlacklistCallsDay']+=0x1;_0x548204[_0x0a9e('0xca')](createObjHistory(_0x31f9fe,_0x33d28f,_0x0a9e('0x1e9'),0xd,_0x0a9e('0x1ea')),'[Originate][historyBlacklist]',_0x0a9e('0x1eb'));throw'inBlackList';}};};Dialer[_0x0a9e('0x19')][_0x0a9e('0x150')]=function(_0x126fa7){var _0xda737b=this;var _0x415fce=[];var _0x59f11d=_0x126fa7[_0x0a9e('0x1ec')]-_0x126fa7[_0x0a9e('0x95')]-_0x126fa7[_0x0a9e('0x1ed')];emitCampaignSummary(_0x126fa7);if(_0x59f11d>0x0){if(_0x59f11d>this[_0x0a9e('0x22')]){_0x59f11d=this[_0x0a9e('0x22')];}_0x126fa7['temp']+=_0x59f11d;this[_0x0a9e('0xc0')](_0x126fa7['id'],_0x59f11d,_0x126fa7[_0x0a9e('0x1ee')])[_0x0a9e('0xb4')](function(_0x5bba8b){_0x126fa7[_0x0a9e('0x1ed')]-=_0x59f11d;_0x126fa7['temp']=_0x126fa7['temp']>0x0?_0x126fa7[_0x0a9e('0x1ed')]:0x0;if(!checkContactEmpty(_0x5bba8b)){_0x126fa7['message']=_0x0a9e('0x9c');logger[_0x0a9e('0x80')](_0x0a9e('0x1ef')+_0x126fa7['name']);}else{_0x126fa7[_0x0a9e('0x95')]+=_0x5bba8b[_0x0a9e('0x94')];_0x126fa7[_0x0a9e('0x3e')]=_0x0a9e('0x1f0');for(var _0x3bd4da=0x0;_0x3bd4da<_0x5bba8b[_0x0a9e('0x94')];_0x3bd4da+=0x1){_0x126fa7[_0x0a9e('0x1f1')]+=0x1;if(_[_0x0a9e('0xab')](_0x5bba8b[_0x3bd4da])||_['isNil'](_0x5bba8b[_0x3bd4da][_0x0a9e('0x15e')])||_[_0x0a9e('0xab')](_0x5bba8b[_0x3bd4da][_0x0a9e('0x15e')][_0x0a9e('0x15f')])){_0xda737b[_0x0a9e('0xc9')]('[actionOriginate]\x20',_0x126fa7,_0x5bba8b[_0x3bd4da]);}else{_0xda737b['checkIsBlackListIvr'](_[_0x0a9e('0xcb')](_0x5bba8b[_0x3bd4da],['CampaignId',_0x0a9e('0x1f2')]))[_0x0a9e('0xb4')](_0xda737b['checkContactBlack'](_0x126fa7,_0x5bba8b[_0x3bd4da]))[_0x0a9e('0xac')](_0xda737b[_0x0a9e('0xc8')](_0x0a9e('0x1f3'),_0x126fa7));}}}})['catch'](loggerGetContactDialer(_0x0a9e('0x1f4'),_0x126fa7,_0x59f11d));}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x14c')]=function(_0x14cf4c,_0x1b2cf5){var _0x1d7537=this;var _0x9ecf57=[];var _0x305a4b=_0x1b2cf5>=0x1?_0x1b2cf5:0x1;var _0x5695b6=[];if(_0x14cf4c[_0x0a9e('0x58')]===_0x0a9e('0x7')){_0x305a4b=0x1;}var _0x459efc=Math[_0x0a9e('0x1bc')](_0x14cf4c[_0x0a9e('0x9f')]*_0x305a4b)-_0x14cf4c['originated']-_0x14cf4c[_0x0a9e('0x1ed')];emitVoiceQueueSummary(_0x14cf4c);if(_0x14cf4c['dialLimitQueue']>0x0){var _0x36ff91=_0x14cf4c[_0x0a9e('0x1f5')]-_0x14cf4c[_0x0a9e('0x95')]-_0x14cf4c['talking']-_0x14cf4c[_0x0a9e('0x1ed')]-_0x14cf4c['pTalking'];if(_0x459efc>_0x36ff91){_0x459efc=_0x36ff91;}}if(_0x459efc>0x0){if(_0x14cf4c[_0x0a9e('0x58')]===_0x0a9e('0x7')){_0x459efc=0x1;}if(_0x459efc>this[_0x0a9e('0x22')]){_0x459efc=this[_0x0a9e('0x22')];}_0x14cf4c['temp']+=_0x459efc;for(var _0x323936 in this['agents']){if(this[_0x0a9e('0x20')][_0x0a9e('0xaa')](_0x323936)){if(this['agents'][_0x323936][_0x0a9e('0xa5')]===_0x0a9e('0x1f6')&&this[_0x0a9e('0x20')][_0x323936]['status']===_0x0a9e('0x1f7')){_0x9ecf57['push'](this[_0x0a9e('0x20')][_0x323936]['id']);}}}this[_0x0a9e('0xbe')](_0x14cf4c['id'],_0x9ecf57,_0x459efc,_0x14cf4c['dialOrderByScheduledAt'])['then'](function(_0x4b3f95){_0x14cf4c['temp']-=_0x459efc;_0x14cf4c[_0x0a9e('0x1ed')]=_0x14cf4c[_0x0a9e('0x1ed')]>0x0?_0x14cf4c[_0x0a9e('0x1ed')]:0x0;if(!checkContactEmpty(_0x4b3f95)){_0x1d7537[_0x0a9e('0xb2')](_0x14cf4c)['then'](sendMessageReschedule(_0x14cf4c))[_0x0a9e('0xac')](loggerCatch('[countReScheduled]\x20'));}else{_0x14cf4c[_0x0a9e('0x95')]+=_0x4b3f95[_0x0a9e('0x94')];_0x14cf4c['message']=_0x14cf4c[_0x0a9e('0x58')]===_0x0a9e('0x7')?_0x0a9e('0x167'):_0x0a9e('0x1f0');for(var _0x37c272=0x0;_0x37c272<_0x4b3f95[_0x0a9e('0x94')];_0x37c272+=0x1){if(_[_0x0a9e('0xab')](_0x4b3f95[_0x37c272])||_['isNil'](_0x4b3f95[_0x37c272][_0x0a9e('0x15e')])||_[_0x0a9e('0xab')](_0x4b3f95[_0x37c272][_0x0a9e('0x15e')][_0x0a9e('0x15f')])){_0x1d7537[_0x0a9e('0xc9')](_0x0a9e('0x1f8'),_0x14cf4c,_0x4b3f95[_0x37c272]);}else{_0x1d7537[_0x0a9e('0x1f9')](_[_0x0a9e('0xcb')](_0x4b3f95[_0x37c272],[_0x0a9e('0xcf'),_0x0a9e('0x1f2')]))[_0x0a9e('0xb4')](_0x1d7537['checkContactBlack'](_0x14cf4c,_0x4b3f95[_0x37c272]))[_0x0a9e('0xac')](_0x1d7537[_0x0a9e('0xc8')](_0x0a9e('0x1f8'),_0x14cf4c));}}}})[_0x0a9e('0xac')](loggerGetContactDialer(_0x0a9e('0x1fa'),_0x14cf4c,_0x459efc));}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x8b')]=function(_0x5b393b){var _0x2c2a3e=this;if(_0x5b393b[_0x0a9e('0x1f5')]>0x0){var _0x1d504a=_0x5b393b['dialLimitQueue']-_0x5b393b[_0x0a9e('0x95')]-_0x5b393b[_0x0a9e('0x53')];if(_0x1d504a>0x0){this[_0x0a9e('0x1fb')](_0x5b393b);}else{loggerPredictiveCalls['info']('[handlePredictive][limitChannel]');}}else{this[_0x0a9e('0x1fb')](_0x5b393b);}};Dialer[_0x0a9e('0x19')][_0x0a9e('0x1fb')]=function(_0x4061b2){var _0x241492=this;var _0x5e29c1=[];_0x4061b2[_0x0a9e('0x95')]+=0x1;for(var _0x584f70 in this[_0x0a9e('0x20')]){if(this[_0x0a9e('0x20')]['hasOwnProperty'](_0x584f70)){if(this[_0x0a9e('0x20')][_0x584f70]['state']===_0x0a9e('0x1f6')&&this[_0x0a9e('0x20')][_0x584f70]['status']===_0x0a9e('0x1f7')){_0x5e29c1[_0x0a9e('0x11b')](this[_0x0a9e('0x20')][_0x584f70]['id']);}}}this['getContactDialer'](_0x4061b2['id'],_0x5e29c1,0x1,_0x4061b2[_0x0a9e('0x1ee')])[_0x0a9e('0xb4')](function(_0x15b9f7){if(!checkContactEmpty(_0x15b9f7)){checkContactLowerLimitOriginate(_0x4061b2,0x1,0x0);_0x241492[_0x0a9e('0xb2')](_0x4061b2)[_0x0a9e('0xb4')](sendMessageReschedule(_0x4061b2))[_0x0a9e('0xac')](loggerCatch('[countReScheduled]\x20'));}else{_0x4061b2[_0x0a9e('0x3e')]=_0x0a9e('0x1f0');if(_[_0x0a9e('0xab')](_0x15b9f7[0x0])||_[_0x0a9e('0xab')](_0x15b9f7[0x0]['Contact'])||_['isNil'](_0x15b9f7[0x0][_0x0a9e('0x15e')][_0x0a9e('0x15f')])){_0x241492[_0x0a9e('0xc9')]('[actionOriginate]\x20',_0x4061b2,_0x15b9f7[0x0]);}else{_0x241492['checkIsBlackList'](_[_0x0a9e('0xcb')](_0x15b9f7[0x0],['VoiceQueueId','Contact.phone']))[_0x0a9e('0xb4')](_0x241492[_0x0a9e('0x1d9')](_0x4061b2,_0x15b9f7[0x0]))['catch'](_0x241492[_0x0a9e('0xc8')](_0x0a9e('0x1fc'),_0x4061b2));}}})[_0x0a9e('0xac')](loggerGetContactDialer(_0x0a9e('0x1fd'),_0x4061b2,0x1));emitVoiceQueueSummary(_0x4061b2);};Dialer[_0x0a9e('0x19')]['abandonmentRate']=function(_0x395897,_0x1db07,_0x499e86,_0x12c434,_0x27668b,_0x1b6408){loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x1fe'));loggerPredictive['info'](_0x0a9e('0x1ff'),_0x395897);loggerPredictive[_0x0a9e('0x80')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1db07);loggerPredictive['info'](_0x0a9e('0x200'),_0x499e86);loggerPredictive[_0x0a9e('0x80')]('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',_0x12c434);loggerPredictive['info'](_0x0a9e('0x201'),_0x27668b);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x88'));return new BPromise(function(_0x46ba2c,_0xb6d223){if(_0x395897<=0x0||isNaN(_0x395897)){return _0xb6d223(msgResponse('[abandonmentRate]',_0x0a9e('0x48'),'m\x20=\x20'+_0x395897));}if(_0x499e86<=0x0||isNaN(_0x499e86)){return _0xb6d223(msgResponse('[abandonmentRate]',_0x0a9e('0x48'),'Ts\x20=\x20'+_0x499e86));}if(_0x12c434<=0x0||isNaN(_0x12c434)){return _0xb6d223(msgResponse(_0x0a9e('0x202'),'Error',_0x0a9e('0x203')+_0x12c434));}if(_0x1db07<=0x0||isNaN(_0x1db07)){return _0xb6d223(msgResponse('[abandonmentRate]','Error',_0x0a9e('0x204')+_0x1db07));}if(_0x27668b<=0x0||isNaN(_0x27668b)){return _0xb6d223(msgResponse(_0x0a9e('0x202'),_0x0a9e('0x48'),'Amax\x20=\x20'+_0x27668b));}_0x1b6408=_0x1b6408||0x0;var _0x58c6a8=0x1/_0x499e86;var _0x537da0=0x0;var _0x4239b8=0x0;var _0x70ca91=0x0;var _0x4a3895=0x0;for(var _0x2ed3ba=0x0;_0x70ca91<_0x27668b;_0x2ed3ba+=0x1){_0x4239b8=_0x2ed3ba/_0x1db07;_0x537da0=(_0x12c434*_0x4239b8+_0x1b6408)/_0x58c6a8;_0x70ca91=erlangb(_0x537da0,_0x395897);_0x4a3895=_0x537da0/_0x395897*(0x1-erlangb(_0x537da0,_0x395897));}return _0x46ba2c({'erlangCalls':_0x2ed3ba,'erlangCallToSecond':_0x1db07/_0x2ed3ba,'erlangAbandonmentRate':_0x70ca91,'erlangBusyFactor':_0x4a3895});});};Dialer['prototype'][_0x0a9e('0x1d0')]=function(_0x4e8586,_0x4665ea,_0x247806,_0x56736e,_0x5925f7,_0x4c4874){loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x205'));loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x1ff'),_0x4e8586);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x206'),_0x4665ea);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x200'),_0x247806);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x207'),_0x56736e);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x208'),_0x5925f7);loggerPredictive[_0x0a9e('0x80')](_0x0a9e('0x88'));return new BPromise(function(_0x2e8669,_0x5242e9){if(_0x4e8586<=0x0||isNaN(_0x4e8586)){return _0x5242e9(msgResponse('[busyFactor]',_0x0a9e('0x48'),_0x0a9e('0x209')+_0x4e8586));}if(_0x247806<=0x0||isNaN(_0x247806)){return _0x5242e9(msgResponse(_0x0a9e('0x20a'),_0x0a9e('0x48'),'Ts\x20=\x20'+_0x247806));}if(_0x56736e<=0x0||isNaN(_0x56736e)){return _0x5242e9(msgResponse(_0x0a9e('0x20a'),'Error',_0x0a9e('0x203')+_0x56736e));}if(_0x4665ea<=0x0||isNaN(_0x4665ea)){return _0x5242e9(msgResponse('[busyFactor]',_0x0a9e('0x48'),'interval\x20=\x20'+_0x4665ea));}if(_0x5925f7<=0x0||isNaN(_0x5925f7)){return _0x5242e9(msgResponse('[busyFactor]',_0x0a9e('0x48'),_0x0a9e('0x20b')+_0x5925f7));}_0x4c4874=_0x4c4874||0x0;var _0xc2ae55=0x1/_0x247806;var _0x164ba4=0x0;var _0x502bd9=0x0;var _0x48b8e7=0x0;var _0x5b53aa=0x0;for(var _0x5d54fb=0x0;_0x5b53aa<_0x5925f7;_0x5d54fb+=0x1){_0x502bd9=_0x5d54fb/_0x4665ea;_0x164ba4=(_0x56736e*_0x502bd9+_0x4c4874)/_0xc2ae55;_0x48b8e7=erlangb(_0x164ba4,_0x4e8586);_0x5b53aa=_0x164ba4/_0x4e8586*(0x1-erlangb(_0x164ba4,_0x4e8586));}return _0x2e8669({'erlangCalls':_0x5d54fb,'erlangCallToSecond':_0x4665ea/_0x5d54fb,'erlangAbandonmentRate':_0x48b8e7,'erlangBusyFactor':_0x5b53aa});});};module[_0x0a9e('0x20c')]=Dialer;
\ No newline at end of file
diff --git a/server/services/ami/dialer/queueCallerAbandon.js b/server/services/ami/dialer/queueCallerAbandon.js
index c308a10..94b82ab 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 _0xe7a9=['callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','queue','membername','reason','callback'];(function(_0x5447fd,_0x52a6b5){var _0x15b28a=function(_0x370d4f){while(--_0x370d4f){_0x5447fd['push'](_0x5447fd['shift']());}};_0x15b28a(++_0x52a6b5);}(_0xe7a9,0x1d8));var _0x9e7a=function(_0x36ff2b,_0x468de7){_0x36ff2b=_0x36ff2b-0x0;var _0xadeed6=_0xe7a9[_0x36ff2b];return _0xadeed6;};'use strict';var util=require(_0x9e7a('0x0'));var _=require(_0x9e7a('0x1'));var moment=require('moment');function getSeconds(_0x4d7705,_0xbe8650){var _0x295c86=moment(_0x4d7705)[_0x9e7a('0x2')](0x0);var _0x2fcf7d=moment(_0xbe8650)[_0x9e7a('0x2')](0x0);return _0x295c86[_0x9e7a('0x3')](_0x2fcf7d,_0x9e7a('0x4'));}function QueueCallerAbandon(_0x2ffa36,_0x2b4239){this[_0x9e7a('0x5')]=_0x2ffa36[_0x9e7a('0x5')];this['type']=_0x2ffa36[_0x9e7a('0x6')];this[_0x9e7a('0x7')]=_0x2ffa36[_0x9e7a('0x6')]===_0x9e7a('0x8')?'queue':_0x2ffa36['type'];this['countbusyretry']=_0x2ffa36[_0x9e7a('0x9')];this[_0x9e7a('0xa')]=_0x2ffa36[_0x9e7a('0xa')];this[_0x9e7a('0xb')]=_0x2ffa36['countnoanswerretry'];this[_0x9e7a('0xc')]=_0x2ffa36[_0x9e7a('0x9')]+_0x2ffa36['countcongestionretry']+_0x2ffa36['countnoanswerretry']+_0x2ffa36[_0x9e7a('0xd')]+_0x2ffa36[_0x9e7a('0xe')]+_0x2ffa36[_0x9e7a('0xf')]+_0x2ffa36[_0x9e7a('0x10')]+_0x2ffa36['countagentrejectretry'];this['countnosuchnumberretry']=_0x2ffa36['countnosuchnumberretry'];this[_0x9e7a('0xe')]=_0x2ffa36['countdropretry'];this[_0x9e7a('0xf')]=_0x2ffa36[_0x9e7a('0xf')];this['countmachineretry']=_0x2ffa36[_0x9e7a('0x10')];this['countagentrejectretry']=_0x2ffa36[_0x9e7a('0x11')];this['uniqueid']=_0x2b4239[_0x9e7a('0x12')];this['calleridname']=_0x2ffa36['name'];this[_0x9e7a('0x13')]=_0x2ffa36[_0x9e7a('0x14')];this[_0x9e7a('0x15')]=_0x2ffa36[_0x9e7a('0x15')];this[_0x9e7a('0x16')]=_0x2ffa36['responsetime'];this[_0x9e7a('0x17')]=_0x2ffa36['droptime'];this[_0x9e7a('0x18')]=this['droptime'];this[_0x9e7a('0x19')]=getSeconds(_0x2ffa36['responsetime'],_0x2ffa36['starttime']);this[_0x9e7a('0x1a')]=getSeconds(this[_0x9e7a('0x17')],_0x2ffa36[_0x9e7a('0x16')]);this[_0x9e7a('0x1b')]=0x0;this['queue']=_0x2b4239[_0x9e7a('0x1c')];this[_0x9e7a('0x1d')]=_0x2b4239['connectedlinename'];this['reason']=_0x2b4239[_0x9e7a('0x1e')];this[_0x9e7a('0x1f')]=_0x2ffa36[_0x9e7a('0x1f')];this[_0x9e7a('0x20')]=_0x2ffa36[_0x9e7a('0x20')];this[_0x9e7a('0x21')]=_0x2ffa36[_0x9e7a('0x21')];this[_0x9e7a('0x22')]=_0x2ffa36[_0x9e7a('0x22')];this[_0x9e7a('0x23')]=_0x2ffa36[_0x9e7a('0x23')];this['ListId']=_0x2ffa36[_0x9e7a('0x24')];this[_0x9e7a('0x25')]=_0x2ffa36[_0x9e7a('0x25')];this['VoiceQueueId']=_0x2ffa36['VoiceQueueId'];this['CampaignId']=_0x2ffa36[_0x9e7a('0x26')];this[_0x9e7a('0x27')]=_0x2ffa36[_0x9e7a('0x27')]||'';this[_0x9e7a('0x28')]=_0x2ffa36[_0x9e7a('0x28')]||'';}module[_0x9e7a('0x29')]=QueueCallerAbandon;
\ No newline at end of file
+var _0x9b0d=['ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','uniqueid','calleridname','name','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId'];(function(_0x1ba842,_0x225c51){var _0x5db13e=function(_0x4ef692){while(--_0x4ef692){_0x1ba842['push'](_0x1ba842['shift']());}};_0x5db13e(++_0x225c51);}(_0x9b0d,0x1d5));var _0xd9b0=function(_0x324dae,_0x22b0da){_0x324dae=_0x324dae-0x0;var _0x4aaf58=_0x9b0d[_0x324dae];return _0x4aaf58;};'use strict';var util=require(_0xd9b0('0x0'));var _=require(_0xd9b0('0x1'));var moment=require(_0xd9b0('0x2'));function getSeconds(_0x1a5a79,_0x3b8ad9){var _0x643b20=moment(_0x1a5a79)['milliseconds'](0x0);var _0x1edb81=moment(_0x3b8ad9)[_0xd9b0('0x3')](0x0);return _0x643b20[_0xd9b0('0x4')](_0x1edb81,_0xd9b0('0x5'));}function QueueCallerAbandon(_0x58e37d,_0xf809c2){this[_0xd9b0('0x6')]=_0x58e37d['scheduledat'];this[_0xd9b0('0x7')]=_0x58e37d[_0xd9b0('0x7')];this['campaigntype']=_0x58e37d[_0xd9b0('0x7')]===_0xd9b0('0x8')?_0xd9b0('0x9'):_0x58e37d['type'];this[_0xd9b0('0xa')]=_0x58e37d[_0xd9b0('0xa')];this[_0xd9b0('0xb')]=_0x58e37d[_0xd9b0('0xb')];this[_0xd9b0('0xc')]=_0x58e37d[_0xd9b0('0xc')];this['countglobal']=_0x58e37d['countbusyretry']+_0x58e37d['countcongestionretry']+_0x58e37d['countnoanswerretry']+_0x58e37d[_0xd9b0('0xd')]+_0x58e37d[_0xd9b0('0xe')]+_0x58e37d[_0xd9b0('0xf')]+_0x58e37d[_0xd9b0('0x10')]+_0x58e37d['countagentrejectretry'];this[_0xd9b0('0xd')]=_0x58e37d[_0xd9b0('0xd')];this[_0xd9b0('0xe')]=_0x58e37d[_0xd9b0('0xe')];this['countabandonedretry']=_0x58e37d[_0xd9b0('0xf')];this[_0xd9b0('0x10')]=_0x58e37d[_0xd9b0('0x10')];this['countagentrejectretry']=_0x58e37d['countagentrejectretry'];this[_0xd9b0('0x11')]=_0xf809c2[_0xd9b0('0x11')];this[_0xd9b0('0x12')]=_0x58e37d[_0xd9b0('0x13')];this['calleridnum']=_0x58e37d[_0xd9b0('0x14')];this[_0xd9b0('0x15')]=_0x58e37d[_0xd9b0('0x15')];this[_0xd9b0('0x16')]=_0x58e37d[_0xd9b0('0x16')];this[_0xd9b0('0x17')]=_0x58e37d[_0xd9b0('0x17')];this[_0xd9b0('0x18')]=this[_0xd9b0('0x17')];this[_0xd9b0('0x19')]=getSeconds(_0x58e37d[_0xd9b0('0x16')],_0x58e37d[_0xd9b0('0x15')]);this[_0xd9b0('0x1a')]=getSeconds(this['droptime'],_0x58e37d[_0xd9b0('0x16')]);this[_0xd9b0('0x1b')]=0x0;this[_0xd9b0('0x9')]=_0xf809c2[_0xd9b0('0x9')];this['membername']=_0xf809c2[_0xd9b0('0x1c')];this[_0xd9b0('0x1d')]=_0xf809c2[_0xd9b0('0x1d')];this['callback']=_0x58e37d[_0xd9b0('0x1e')];this[_0xd9b0('0x1f')]=_0x58e37d[_0xd9b0('0x1f')];this[_0xd9b0('0x20')]=_0x58e37d[_0xd9b0('0x20')];this['recallme']=_0x58e37d[_0xd9b0('0x21')];this[_0xd9b0('0x22')]=_0x58e37d[_0xd9b0('0x22')];this[_0xd9b0('0x23')]=_0x58e37d['ListId'];this[_0xd9b0('0x24')]=_0x58e37d[_0xd9b0('0x24')];this[_0xd9b0('0x25')]=_0x58e37d[_0xd9b0('0x25')];this[_0xd9b0('0x26')]=_0x58e37d['CampaignId'];this[_0xd9b0('0x27')]=_0x58e37d[_0xd9b0('0x27')]||'';this['originatecalleridname']=_0x58e37d[_0xd9b0('0x28')]||'';}module[_0xd9b0('0x29')]=QueueCallerAbandon;
\ No newline at end of file
diff --git a/server/services/ami/fax/action.js b/server/services/ami/fax/action.js
index a3b1124..3a351d0 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 _0x0386=['localstationid','headerinfo','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk','name','fax'];(function(_0x2ce4bb,_0x4bc632){var _0x19356b=function(_0x47137b){while(--_0x47137b){_0x2ce4bb['push'](_0x2ce4bb['shift']());}};_0x19356b(++_0x4bc632);}(_0x0386,0x15e));var _0x6038=function(_0x1d6fff,_0x5a8399){_0x1d6fff=_0x1d6fff-0x0;var _0x5eaa54=_0x0386[_0x1d6fff];return _0x5eaa54;};'use strict';var util=require(_0x6038('0x0'));var _=require(_0x6038('0x1'));var moment=require(_0x6038('0x2'));function Action(_0x4c6b4d,_0x47de60,_0x67618e){this['uniqueid']=_0x4c6b4d||undefined;this[_0x6038('0x3')]=util[_0x6038('0x4')](_0x6038('0x5'),_0x47de60[_0x6038('0x6')],_0x47de60[_0x6038('0x7')][_0x6038('0x8')],_0x67618e[_0x6038('0x9')]);this[_0x6038('0xa')]=_0x47de60[_0x6038('0xa')];this['headerinfo']=_0x47de60[_0x6038('0xb')];this[_0x6038('0xc')]=_0x67618e['path'];this[_0x6038('0xd')]=_0x67618e[_0x6038('0xd')];}module[_0x6038('0xe')]=Action;
\ No newline at end of file
+var _0x733b=['exports','moment','channel','format','%s/%s/%s','tech','fax','localstationid','headerinfo','path','AttachmentId'];(function(_0x3c22e0,_0x1dc6ea){var _0x215811=function(_0x1b453c){while(--_0x1b453c){_0x3c22e0['push'](_0x3c22e0['shift']());}};_0x215811(++_0x1dc6ea);}(_0x733b,0xa6));var _0xb733=function(_0x2b9bed,_0x18e9b1){_0x2b9bed=_0x2b9bed-0x0;var _0x3ffcc7=_0x733b[_0x2b9bed];return _0x3ffcc7;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0xb733('0x0'));function Action(_0x2a5dbe,_0x372a22,_0x15849b){this['uniqueid']=_0x2a5dbe||undefined;this[_0xb733('0x1')]=util[_0xb733('0x2')](_0xb733('0x3'),_0x372a22[_0xb733('0x4')],_0x372a22['Trunk']['name'],_0x15849b[_0xb733('0x5')]);this[_0xb733('0x6')]=_0x372a22['localstationid'];this[_0xb733('0x7')]=_0x372a22[_0xb733('0x7')];this[_0xb733('0x8')]=_0x15849b['path'];this[_0xb733('0x9')]=_0x15849b['AttachmentId'];}module[_0xb733('0xa')]=Action;
\ No newline at end of file
diff --git a/server/services/ami/fax/index.js b/server/services/ami/fax/index.js
index feb3e50..0a55d3f 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 _0xc2f9=['tiff2pdf','./util/gs','../../../config/logger','../ami','./channel','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','channels','faxAccounts','trunks','newchannel','syncNewchannel','bind','varset','syncVarSet','syncNewState','newexten','syncNewExten','syncFaxStatus','receivefax','syncReceiveFax','hangup','syncHangup','originateresponse','syncOriginateResponse','prototype','context','from-voip-provider','hasOwnProperty','exten','localstationid','channel','uniqueid','name','info','\x20syncNewchannel\x20','variable','value','channelstate','channelstatedesc','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','create','parse','.pdf','application/pdf','notify','catch','\x20notify\x20','stringify','\x20receiveFax\x20','actions','pick','reason','AttachmentId','update','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][NoUpdate2]','updateStatus','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','[Fax][Message][NoUpdate2]','\x20hangup\x20sendFile\x20','\x20hangup\x20faxRiceive\x20','faxpages','SUCCESS','faxstatusstring','SENDING\x20FAILED:\x20','SENDING\x20FAILED','then','[Fax][execOriginate][success]','Fax\x20failed','checkAfterSend','FaxAccountId','Trunk','Trunk\x20Reachable','format','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','execute','%s/%s.tif','XMF-PATH','variablesAction','Action','execOriginate','addVariables','isNil','active','SIP/%s','checkTrunk','isTrunkReachable','[Fax][checkTrunk][Trunk\x20not\x20work]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working','fax','Empty\x20Fax','[Fax][checkTrunk][Empty\x20path]','Empty\x20path','Is\x20Valid','exports','bluebird','uuid','moment','path'];(function(_0x378117,_0x291154){var _0x4823b9=function(_0x4a7116){while(--_0x4a7116){_0x378117['push'](_0x378117['shift']());}};_0x4823b9(++_0x291154);}(_0xc2f9,0x155));var _0x9c2f=function(_0x51f85a,_0x15ed97){_0x51f85a=_0x51f85a-0x0;var _0x1baceb=_0xc2f9[_0x51f85a];return _0x1baceb;};'use strict';var util=require('util');var _=require('lodash');var BPromise=require(_0x9c2f('0x0'));var uuid=require(_0x9c2f('0x1'));var moment=require(_0x9c2f('0x2'));var path=require(_0x9c2f('0x3'));var tiff2pdf=require(_0x9c2f('0x4'));var gs=require(_0x9c2f('0x5'));var logger=require(_0x9c2f('0x6'))('fax');var ami=require(_0x9c2f('0x7'));var rpcDb=require('./rpcDb');var Channel=require(_0x9c2f('0x8'));var ut=require('./util/util');var Action=require('./action');var faxAccount=require(_0x9c2f('0x9'));var attachment=require(_0x9c2f('0xa'));var faxMessage=require(_0x9c2f('0xb'));function Fax(_0x2eb69a){this[_0x9c2f('0xc')]={};this[_0x9c2f('0xd')]=_0x2eb69a[_0x9c2f('0xd')];this[_0x9c2f('0xe')]=_0x2eb69a[_0x9c2f('0xe')];this['actions']={};ami['on'](_0x9c2f('0xf'),this[_0x9c2f('0x10')][_0x9c2f('0x11')](this));ami['on'](_0x9c2f('0x12'),this[_0x9c2f('0x13')][_0x9c2f('0x11')](this));ami['on']('newstate',this[_0x9c2f('0x14')][_0x9c2f('0x11')](this));ami['on'](_0x9c2f('0x15'),this[_0x9c2f('0x16')][_0x9c2f('0x11')](this));ami['on']('faxstatus',this[_0x9c2f('0x17')][_0x9c2f('0x11')](this));ami['on'](_0x9c2f('0x18'),this[_0x9c2f('0x19')]['bind'](this));ami['on'](_0x9c2f('0x1a'),this[_0x9c2f('0x1b')]['bind'](this));ami['on'](_0x9c2f('0x1c'),this[_0x9c2f('0x1d')][_0x9c2f('0x11')](this));}Fax[_0x9c2f('0x1e')][_0x9c2f('0x10')]=function(_0x29558f){if(_0x29558f[_0x9c2f('0x1f')]===_0x9c2f('0x20')){for(var _0x306581 in this[_0x9c2f('0xd')]){if(this[_0x9c2f('0xd')][_0x9c2f('0x21')](_0x306581)){if(_0x29558f[_0x9c2f('0x22')]===this['faxAccounts'][_0x306581][_0x9c2f('0x23')]){this[_0x9c2f('0xc')][_0x29558f['uniqueid']]={};this['channels'][_0x29558f['uniqueid']][_0x9c2f('0x24')]=_0x29558f[_0x9c2f('0x24')];this[_0x9c2f('0xc')][_0x29558f[_0x9c2f('0x25')]]['id']=this[_0x9c2f('0xd')][_0x306581]['id'];this[_0x9c2f('0xc')][_0x29558f[_0x9c2f('0x25')]][_0x9c2f('0x26')]=this['faxAccounts'][_0x306581][_0x9c2f('0x26')];logger[_0x9c2f('0x27')](_0x29558f[_0x9c2f('0x25')],_0x9c2f('0x28'));}}}}if(this['actions'][_0x29558f[_0x9c2f('0x25')]]){this[_0x9c2f('0xc')][_0x29558f['uniqueid']]={};this['channels'][_0x29558f[_0x9c2f('0x25')]][_0x9c2f('0x24')]=_0x29558f['channel'];logger[_0x9c2f('0x27')](_0x29558f['uniqueid'],'\x20syncNewchannel\x20');}};Fax[_0x9c2f('0x1e')]['syncVarSet']=function(_0x3ddca8){if(this[_0x9c2f('0xc')][_0x3ddca8[_0x9c2f('0x25')]]){for(var _0x4b4418 in _0x3ddca8[_0x9c2f('0x29')]){if(_0x3ddca8['variable'][_0x9c2f('0x21')](_0x4b4418)){this[_0x9c2f('0xc')][_0x3ddca8[_0x9c2f('0x25')]][_0x4b4418]=_0x3ddca8[_0x9c2f('0x2a')];}}}};Fax['prototype'][_0x9c2f('0x14')]=function(_0x5a308a){if(this[_0x9c2f('0xc')][_0x5a308a['uniqueid']]){this[_0x9c2f('0xc')][_0x5a308a['uniqueid']][_0x9c2f('0x2b')]=_0x5a308a[_0x9c2f('0x2b')];this[_0x9c2f('0xc')][_0x5a308a[_0x9c2f('0x25')]][_0x9c2f('0x2c')]=_0x5a308a[_0x9c2f('0x2c')];}};Fax[_0x9c2f('0x1e')][_0x9c2f('0x16')]=function(_0x2f53b8){if(this[_0x9c2f('0xc')][_0x2f53b8['uniqueid']]){for(var _0x33b16a in _0x2f53b8[_0x9c2f('0x29')]){if(_0x2f53b8[_0x9c2f('0x29')][_0x9c2f('0x21')](_0x33b16a)){this[_0x9c2f('0xc')][_0x2f53b8[_0x9c2f('0x25')]][_0x33b16a]=_0x2f53b8[_0x9c2f('0x2a')];}}}};Fax['prototype'][_0x9c2f('0x17')]=function(_0x4350c0){if(this[_0x9c2f('0xc')][_0x4350c0[_0x9c2f('0x25')]]){this[_0x9c2f('0xc')][_0x4350c0[_0x9c2f('0x25')]][_0x9c2f('0x2d')]=_0x4350c0[_0x9c2f('0x2d')];this[_0x9c2f('0xc')][_0x4350c0[_0x9c2f('0x25')]][_0x9c2f('0x2e')]=_0x4350c0['status'];this[_0x9c2f('0xc')][_0x4350c0[_0x9c2f('0x25')]]['localstationid']=_0x4350c0[_0x9c2f('0x23')];this[_0x9c2f('0xc')][_0x4350c0[_0x9c2f('0x25')]][_0x9c2f('0x2f')]=_0x4350c0[_0x9c2f('0x2f')];logger['info'](_0x4350c0[_0x9c2f('0x25')],_0x9c2f('0x30'));}};Fax[_0x9c2f('0x1e')][_0x9c2f('0x19')]=function(_0x4bb5a9){var _0x3e3ba2=this;if(this[_0x9c2f('0xc')][_0x4bb5a9['uniqueid']]){var _0x262609=this[_0x9c2f('0xc')][_0x4bb5a9[_0x9c2f('0x25')]]['id'];this['channels'][_0x4bb5a9[_0x9c2f('0x25')]]['remotestationid']=_0x4bb5a9[_0x9c2f('0x31')];this[_0x9c2f('0xc')][_0x4bb5a9['uniqueid']][_0x9c2f('0x32')]=_0x4bb5a9[_0x9c2f('0x32')];this[_0x9c2f('0xc')][_0x4bb5a9[_0x9c2f('0x25')]][_0x9c2f('0x23')]=_0x4bb5a9['localstationid'];this[_0x9c2f('0xc')][_0x4bb5a9[_0x9c2f('0x25')]][_0x9c2f('0x33')]=_0x4bb5a9[_0x9c2f('0x33')];this[_0x9c2f('0xc')][_0x4bb5a9[_0x9c2f('0x25')]][_0x9c2f('0x34')]=_0x4bb5a9['transferrate'];this[_0x9c2f('0xc')][_0x4bb5a9[_0x9c2f('0x25')]][_0x9c2f('0x2f')]=_0x4bb5a9[_0x9c2f('0x2f')];this[_0x9c2f('0xc')][_0x4bb5a9['uniqueid']][_0x9c2f('0x35')]=_0x4bb5a9[_0x9c2f('0x35')];if(this[_0x9c2f('0xc')][_0x4bb5a9[_0x9c2f('0x25')]]['pagestransferred']>0x0){tiff2pdf(_0x4bb5a9[_0x9c2f('0x2f')],_0x9c2f('0x36'),function(_0x236568){logger[_0x9c2f('0x27')](_0x4bb5a9[_0x9c2f('0x25')],_0x9c2f('0x37'),_0x236568[_0x9c2f('0x38')]);attachment[_0x9c2f('0x39')]({'name':path[_0x9c2f('0x3a')](_0x4bb5a9['filename'])[_0x9c2f('0x26')],'basename':path[_0x9c2f('0x3a')](_0x4bb5a9[_0x9c2f('0x2f')])[_0x9c2f('0x26')]+_0x9c2f('0x3b'),'type':_0x9c2f('0x3c')})['then'](function(_0x401842){faxAccount[_0x9c2f('0x3d')](_0x262609,{'from':_0x4bb5a9[_0x9c2f('0x35')],'mapKey':'fax','body':path[_0x9c2f('0x3a')](_0x4bb5a9[_0x9c2f('0x2f')])[_0x9c2f('0x26')]+_0x9c2f('0x3b'),'AttachmentId':_0x401842['id']})[_0x9c2f('0x3e')](function(_0x1e2248){logger['error'](_0x4bb5a9[_0x9c2f('0x25')],_0x9c2f('0x3f'),JSON[_0x9c2f('0x40')](_0x1e2248));});})[_0x9c2f('0x3e')](function(_0x533e61){logger['error'](_0x4bb5a9[_0x9c2f('0x25')],_0x9c2f('0x41'),JSON[_0x9c2f('0x40')](_0x533e61));});});}logger['info'](_0x4bb5a9[_0x9c2f('0x25')],_0x9c2f('0x41'));}};Fax[_0x9c2f('0x1e')]['syncOriginateResponse']=function(_0x2ef326){if(this[_0x9c2f('0x42')][_0x2ef326[_0x9c2f('0x25')]]){_['merge'](this[_0x9c2f('0xc')][_0x2ef326[_0x9c2f('0x25')]],_[_0x9c2f('0x43')](_0x2ef326,['response',_0x9c2f('0x44')]));}};function updateStatus(_0x3725ae){if(_0x3725ae[_0x9c2f('0x45')]){faxMessage[_0x9c2f('0x46')](_0x3725ae['AttachmentId'],{'failMessage':_0x9c2f('0x47')})['then'](function(_0x2d3a6c){ut[_0x9c2f('0x48')]('[Fax][Message][Error][Updated]',_0x2d3a6c);})[_0x9c2f('0x3e')](function(_0x507e3d){ut[_0x9c2f('0x48')]('[Fax][Message][Error][NoUpdate1]',_0x507e3d);});}else{ut['logger'](_0x9c2f('0x49'));}}Fax[_0x9c2f('0x1e')][_0x9c2f('0x4a')]=function(_0x2cfa46,_0x2b3671,_0x3e7101){var _0x5810a7=this;var _0x97510d={};if(_0x2b3671){_0x97510d={'read':_0x2b3671};}else{_0x97510d={'failMessage':_0x3e7101};}if(this[_0x9c2f('0x42')][_0x2cfa46][_0x9c2f('0x45')]){faxMessage[_0x9c2f('0x46')](this['actions'][_0x2cfa46]['AttachmentId'],_0x97510d)['then'](function(_0x110538){ut[_0x9c2f('0x48')](_0x9c2f('0x4b'),_0x110538);})[_0x9c2f('0x3e')](function(_0x17638e){ut[_0x9c2f('0x48')](_0x9c2f('0x4c'),_0x17638e);})['finally'](function(){delete _0x5810a7[_0x9c2f('0xc')][_0x2cfa46];delete _0x5810a7[_0x9c2f('0x42')][_0x2cfa46];});}else{ut[_0x9c2f('0x48')](_0x9c2f('0x4d'));delete this[_0x9c2f('0xc')][_0x2cfa46];delete this[_0x9c2f('0x42')][_0x2cfa46];}};Fax[_0x9c2f('0x1e')]['syncHangup']=function(_0x118c49){var _0x2f532c=this;if(this[_0x9c2f('0xc')][_0x118c49['uniqueid']]){if(this[_0x9c2f('0x42')][_0x118c49[_0x9c2f('0x25')]]){this[_0x9c2f('0xc')][_0x118c49[_0x9c2f('0x25')]]['id']=this['actions'][_0x118c49['uniqueid']]['id'];this[_0x9c2f('0xc')][_0x118c49[_0x9c2f('0x25')]]['name']=this[_0x9c2f('0x42')][_0x118c49[_0x9c2f('0x25')]][_0x9c2f('0x26')];}logger[_0x9c2f('0x27')](_0x118c49[_0x9c2f('0x25')],this[_0x9c2f('0x42')][_0x118c49[_0x9c2f('0x25')]]?_0x9c2f('0x4e'):_0x9c2f('0x4f'),JSON[_0x9c2f('0x40')](this[_0x9c2f('0xc')][_0x118c49['uniqueid']]));if(this[_0x9c2f('0x42')][_0x118c49[_0x9c2f('0x25')]]){if(this[_0x9c2f('0xc')][_0x118c49[_0x9c2f('0x25')]][_0x9c2f('0x50')]>0x0&&this[_0x9c2f('0xc')][_0x118c49[_0x9c2f('0x25')]]['faxstatus']===_0x9c2f('0x51')){this[_0x9c2f('0x4a')](_0x118c49[_0x9c2f('0x25')],!![]);}else{this[_0x9c2f('0x4a')](_0x118c49['uniqueid'],![],this['channels'][_0x118c49[_0x9c2f('0x25')]][_0x9c2f('0x52')]?_0x9c2f('0x53')+this[_0x9c2f('0xc')][_0x118c49[_0x9c2f('0x25')]][_0x9c2f('0x52')]:_0x9c2f('0x54'));}}}};Fax[_0x9c2f('0x1e')]['send']=function(_0x478065){var _0x289a94=this;return new BPromise(function(_0x11a204,_0x3d97a4){_0x289a94['execOriginate'](_0x478065,_0x289a94[_0x9c2f('0xd')][_0x478065['FaxAccountId']])[_0x9c2f('0x55')](function(_0x553695){ut['logger'](_0x9c2f('0x56'),_0x553695);_0x11a204(ut[_0x9c2f('0x38')]('Fax\x20received'));})[_0x9c2f('0x3e')](function(_0x4d5280){ut[_0x9c2f('0x48')]('[Fax][execOriginate][failure]',_0x4d5280);updateStatus(_0x478065);_0x3d97a4(ut[_0x9c2f('0x38')](_0x9c2f('0x57')));});});};Fax[_0x9c2f('0x1e')][_0x9c2f('0x58')]=function(_0x5904d1){var _0x5c3ad0=this;return new BPromise(function(_0x4cd3e8,_0x2725a2){var _0x20ff6e=_0x5c3ad0['checkTrunk'](_0x5c3ad0[_0x9c2f('0xd')][_0x5904d1[_0x9c2f('0x59')]][_0x9c2f('0x5a')],_0x5904d1);if(_0x20ff6e['isValid']){_0x4cd3e8(ut[_0x9c2f('0x38')](_0x9c2f('0x5b')));}else{_0x2725a2(ut['message'](_0x20ff6e[_0x9c2f('0x38')]));}});};function originate(_0x3b636c,_0x126c2f,_0x1be234){return new BPromise(function(_0x1f1505,_0xab85b4){if(_0x1be234){var _0x15abc1=util[_0x9c2f('0x5c')](_0x9c2f('0x5d'),path[_0x9c2f('0x3a')](_0x3b636c['path'])[_0x9c2f('0x26')],_0x3b636c[_0x9c2f('0x3')]);gs[_0x9c2f('0x5e')](_0x15abc1)[_0x9c2f('0x55')](function(){_0x3b636c[_0x9c2f('0x3')]=util['format'](_0x9c2f('0x5f'),path[_0x9c2f('0x3a')](_0x3b636c[_0x9c2f('0x3')])['dir'],path[_0x9c2f('0x3a')](_0x3b636c[_0x9c2f('0x3')])[_0x9c2f('0x26')]);_0x126c2f[_0x9c2f('0x60')]=_0x3b636c[_0x9c2f('0x3')];ut['logger']('Convert\x20pdf\x20to\x20tif','');ami['Action'](ut[_0x9c2f('0x61')](_0x3b636c,_0x126c2f))[_0x9c2f('0x55')](function(_0xab83ed){_0x1f1505(_0xab83ed);})[_0x9c2f('0x3e')](function(_0x5b4788){_0xab85b4(_0x5b4788);});})[_0x9c2f('0x3e')](function(_0x2afde1){_0xab85b4(_0x2afde1);});}else{ami[_0x9c2f('0x62')](ut[_0x9c2f('0x61')](_0x3b636c,_0x126c2f))[_0x9c2f('0x55')](function(_0x176d70){_0x1f1505(_0x176d70);})[_0x9c2f('0x3e')](function(_0x5277d5){_0xab85b4(_0x5277d5);});}});}Fax[_0x9c2f('0x1e')][_0x9c2f('0x63')]=function(_0x5da93f,_0x471c1b){var _0x2f360e=this;return new BPromise(function(_0x285ac3,_0x2a7f5d){var _0x500c2b=uuid['v4']();var _0x3e9272=ut[_0x9c2f('0x64')](_0x5da93f,_0x471c1b);_0x2f360e[_0x9c2f('0x42')][_0x500c2b]=new Action(_0x500c2b,_0x471c1b,_0x5da93f);var _0x51af50=_0x2f360e[_0x9c2f('0x42')][_0x500c2b];if(path[_0x9c2f('0x3a')](_0x5da93f['path'])['ext']===_0x9c2f('0x3b')){originate(_0x51af50,_0x3e9272,!![])[_0x9c2f('0x55')](function(_0x38ae35){_0x285ac3(_0x38ae35);})['catch'](function(_0x3e0f40){_0x2a7f5d(_0x3e0f40);});}else{originate(_0x51af50,_0x3e9272,![])['then'](function(_0x479cbf){_0x285ac3(_0x479cbf);})[_0x9c2f('0x3e')](function(_0x24099a){_0x2a7f5d(_0x24099a);});}});};Fax[_0x9c2f('0x1e')]['isTrunkReachable']=function(_0x4f9837){return!_[_0x9c2f('0x65')](_0x4f9837)&&!_['isNil'](_0x4f9837[_0x9c2f('0x26')])&&!_[_0x9c2f('0x65')](_0x4f9837[_0x9c2f('0x66')])&&_0x4f9837['active']&&!_[_0x9c2f('0x65')](this[_0x9c2f('0xe')][util[_0x9c2f('0x5c')](_0x9c2f('0x67'),_0x4f9837[_0x9c2f('0x26')])])&&!_[_0x9c2f('0x65')](this[_0x9c2f('0xe')][util[_0x9c2f('0x5c')]('SIP/%s',_0x4f9837[_0x9c2f('0x26')])][_0x9c2f('0x2e')])&&(this[_0x9c2f('0xe')][util[_0x9c2f('0x5c')](_0x9c2f('0x67'),_0x4f9837[_0x9c2f('0x26')])][_0x9c2f('0x2e')]==='reachable'||this[_0x9c2f('0xe')][util[_0x9c2f('0x5c')](_0x9c2f('0x67'),_0x4f9837[_0x9c2f('0x26')])][_0x9c2f('0x2e')]==='unmonitored');};Fax[_0x9c2f('0x1e')][_0x9c2f('0x68')]=function(_0x14e41c,_0xd5d4){if(!this[_0x9c2f('0x69')](_0x14e41c)){ut[_0x9c2f('0x48')](_0x9c2f('0x6a'),_[_0x9c2f('0x65')](_0x14e41c)?'':_0x14e41c[_0x9c2f('0x26')]+_0x9c2f('0x6b'));return{'isValid':![],'message':_0x9c2f('0x6c')};}if(_[_0x9c2f('0x65')](_0xd5d4[_0x9c2f('0x6d')])){ut[_0x9c2f('0x48')]('[Fax][checkTrunk][Empty\x20Fax]',JSON[_0x9c2f('0x40')](_0xd5d4));return{'isValid':![],'message':_0x9c2f('0x6e')};}if(_[_0x9c2f('0x65')](_0xd5d4['path'])){ut[_0x9c2f('0x48')](_0x9c2f('0x6f'),JSON[_0x9c2f('0x40')](_0xd5d4));return{'isValid':![],'message':_0x9c2f('0x70')};}return{'isValid':!![],'message':_0x9c2f('0x71')};};module[_0x9c2f('0x72')]=Fax;
\ No newline at end of file
+var _0x5caa=['path','tiff2pdf','./util/gs','../../../config/logger','../ami','./rpcDb','./channel','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','faxAccounts','trunks','newchannel','varset','bind','newstate','syncNewState','newexten','faxstatus','syncFaxStatus','syncReceiveFax','syncHangup','originateresponse','syncOriginateResponse','prototype','syncNewchannel','context','hasOwnProperty','exten','localstationid','channels','uniqueid','channel','name','info','actions','syncVarSet','variable','value','channelstate','channelstatedesc','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','create','parse','.pdf','application/pdf','notify','calleridnum','fax','catch','error','\x20notify\x20','stringify','\x20receiveFax\x20','merge','pick','response','reason','AttachmentId','then','[Fax][Message][Error][Updated]','logger','[Fax][Message][Error][NoUpdate2]','updateStatus','update','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','\x20hangup\x20sendFile\x20','\x20hangup\x20faxRiceive\x20','faxpages','faxstatusstring','SENDING\x20FAILED:\x20','send','FaxAccountId','[Fax][execOriginate][success]','[Fax][execOriginate][failure]','checkAfterSend','checkTrunk','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','dir','Convert\x20pdf\x20to\x20tif','variablesAction','Action','execOriginate','isTrunkReachable','isNil','active','SIP/%s','reachable','unmonitored','[Fax][checkTrunk][Trunk\x20not\x20work]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working','[Fax][checkTrunk][Empty\x20Fax]','Empty\x20Fax','[Fax][checkTrunk][Empty\x20path]','Is\x20Valid','exports','util','bluebird','uuid','moment'];(function(_0xaa0309,_0x1c8008){var _0x5de7ce=function(_0x3aa6ae){while(--_0x3aa6ae){_0xaa0309['push'](_0xaa0309['shift']());}};_0x5de7ce(++_0x1c8008);}(_0x5caa,0x72));var _0xa5ca=function(_0x54fe1c,_0x5d208c){_0x54fe1c=_0x54fe1c-0x0;var _0x460aaa=_0x5caa[_0x54fe1c];return _0x460aaa;};'use strict';var util=require(_0xa5ca('0x0'));var _=require('lodash');var BPromise=require(_0xa5ca('0x1'));var uuid=require(_0xa5ca('0x2'));var moment=require(_0xa5ca('0x3'));var path=require(_0xa5ca('0x4'));var tiff2pdf=require(_0xa5ca('0x5'));var gs=require(_0xa5ca('0x6'));var logger=require(_0xa5ca('0x7'))('fax');var ami=require(_0xa5ca('0x8'));var rpcDb=require(_0xa5ca('0x9'));var Channel=require(_0xa5ca('0xa'));var ut=require('./util/util');var Action=require('./action');var faxAccount=require(_0xa5ca('0xb'));var attachment=require(_0xa5ca('0xc'));var faxMessage=require(_0xa5ca('0xd'));function Fax(_0xcb0945){this['channels']={};this['faxAccounts']=_0xcb0945[_0xa5ca('0xe')];this[_0xa5ca('0xf')]=_0xcb0945[_0xa5ca('0xf')];this['actions']={};ami['on'](_0xa5ca('0x10'),this['syncNewchannel']['bind'](this));ami['on'](_0xa5ca('0x11'),this['syncVarSet'][_0xa5ca('0x12')](this));ami['on'](_0xa5ca('0x13'),this[_0xa5ca('0x14')][_0xa5ca('0x12')](this));ami['on'](_0xa5ca('0x15'),this['syncNewExten'][_0xa5ca('0x12')](this));ami['on'](_0xa5ca('0x16'),this[_0xa5ca('0x17')][_0xa5ca('0x12')](this));ami['on']('receivefax',this[_0xa5ca('0x18')][_0xa5ca('0x12')](this));ami['on']('hangup',this[_0xa5ca('0x19')][_0xa5ca('0x12')](this));ami['on'](_0xa5ca('0x1a'),this[_0xa5ca('0x1b')]['bind'](this));}Fax[_0xa5ca('0x1c')][_0xa5ca('0x1d')]=function(_0x301f1c){if(_0x301f1c[_0xa5ca('0x1e')]==='from-voip-provider'){for(var _0xc5c161 in this[_0xa5ca('0xe')]){if(this[_0xa5ca('0xe')][_0xa5ca('0x1f')](_0xc5c161)){if(_0x301f1c[_0xa5ca('0x20')]===this['faxAccounts'][_0xc5c161][_0xa5ca('0x21')]){this[_0xa5ca('0x22')][_0x301f1c[_0xa5ca('0x23')]]={};this[_0xa5ca('0x22')][_0x301f1c[_0xa5ca('0x23')]]['channel']=_0x301f1c[_0xa5ca('0x24')];this[_0xa5ca('0x22')][_0x301f1c[_0xa5ca('0x23')]]['id']=this[_0xa5ca('0xe')][_0xc5c161]['id'];this[_0xa5ca('0x22')][_0x301f1c[_0xa5ca('0x23')]][_0xa5ca('0x25')]=this['faxAccounts'][_0xc5c161][_0xa5ca('0x25')];logger[_0xa5ca('0x26')](_0x301f1c[_0xa5ca('0x23')],'\x20syncNewchannel\x20');}}}}if(this[_0xa5ca('0x27')][_0x301f1c['uniqueid']]){this[_0xa5ca('0x22')][_0x301f1c[_0xa5ca('0x23')]]={};this[_0xa5ca('0x22')][_0x301f1c['uniqueid']][_0xa5ca('0x24')]=_0x301f1c[_0xa5ca('0x24')];logger[_0xa5ca('0x26')](_0x301f1c[_0xa5ca('0x23')],'\x20syncNewchannel\x20');}};Fax[_0xa5ca('0x1c')][_0xa5ca('0x28')]=function(_0x16a598){if(this[_0xa5ca('0x22')][_0x16a598[_0xa5ca('0x23')]]){for(var _0x47a92b in _0x16a598[_0xa5ca('0x29')]){if(_0x16a598[_0xa5ca('0x29')]['hasOwnProperty'](_0x47a92b)){this['channels'][_0x16a598[_0xa5ca('0x23')]][_0x47a92b]=_0x16a598[_0xa5ca('0x2a')];}}}};Fax[_0xa5ca('0x1c')][_0xa5ca('0x14')]=function(_0xdb1f0d){if(this[_0xa5ca('0x22')][_0xdb1f0d['uniqueid']]){this['channels'][_0xdb1f0d['uniqueid']]['channelstate']=_0xdb1f0d[_0xa5ca('0x2b')];this[_0xa5ca('0x22')][_0xdb1f0d['uniqueid']][_0xa5ca('0x2c')]=_0xdb1f0d[_0xa5ca('0x2c')];}};Fax['prototype']['syncNewExten']=function(_0x4396f9){if(this['channels'][_0x4396f9['uniqueid']]){for(var _0x391c3d in _0x4396f9['variable']){if(_0x4396f9[_0xa5ca('0x29')]['hasOwnProperty'](_0x391c3d)){this[_0xa5ca('0x22')][_0x4396f9[_0xa5ca('0x23')]][_0x391c3d]=_0x4396f9[_0xa5ca('0x2a')];}}}};Fax[_0xa5ca('0x1c')][_0xa5ca('0x17')]=function(_0x103d83){if(this['channels'][_0x103d83[_0xa5ca('0x23')]]){this[_0xa5ca('0x22')][_0x103d83[_0xa5ca('0x23')]][_0xa5ca('0x2d')]=_0x103d83['operation'];this[_0xa5ca('0x22')][_0x103d83[_0xa5ca('0x23')]]['status']=_0x103d83[_0xa5ca('0x2e')];this[_0xa5ca('0x22')][_0x103d83[_0xa5ca('0x23')]][_0xa5ca('0x21')]=_0x103d83[_0xa5ca('0x21')];this[_0xa5ca('0x22')][_0x103d83['uniqueid']]['filename']=_0x103d83[_0xa5ca('0x2f')];logger['info'](_0x103d83[_0xa5ca('0x23')],_0xa5ca('0x30'));}};Fax[_0xa5ca('0x1c')][_0xa5ca('0x18')]=function(_0x331acd){var _0x5bb01b=this;if(this[_0xa5ca('0x22')][_0x331acd[_0xa5ca('0x23')]]){var _0x4c62f8=this[_0xa5ca('0x22')][_0x331acd[_0xa5ca('0x23')]]['id'];this[_0xa5ca('0x22')][_0x331acd[_0xa5ca('0x23')]][_0xa5ca('0x31')]=_0x331acd[_0xa5ca('0x31')];this[_0xa5ca('0x22')][_0x331acd['uniqueid']][_0xa5ca('0x32')]=_0x331acd['pagestransferred'];this[_0xa5ca('0x22')][_0x331acd['uniqueid']][_0xa5ca('0x21')]=_0x331acd[_0xa5ca('0x21')];this[_0xa5ca('0x22')][_0x331acd[_0xa5ca('0x23')]][_0xa5ca('0x33')]=_0x331acd[_0xa5ca('0x33')];this[_0xa5ca('0x22')][_0x331acd['uniqueid']][_0xa5ca('0x34')]=_0x331acd['transferrate'];this[_0xa5ca('0x22')][_0x331acd[_0xa5ca('0x23')]][_0xa5ca('0x2f')]=_0x331acd[_0xa5ca('0x2f')];this[_0xa5ca('0x22')][_0x331acd[_0xa5ca('0x23')]]['calleridnum']=_0x331acd['calleridnum'];if(this[_0xa5ca('0x22')][_0x331acd[_0xa5ca('0x23')]]['pagestransferred']>0x0){tiff2pdf(_0x331acd[_0xa5ca('0x2f')],_0xa5ca('0x35'),function(_0x265ece){logger['info'](_0x331acd[_0xa5ca('0x23')],_0xa5ca('0x36'),_0x265ece[_0xa5ca('0x37')]);attachment[_0xa5ca('0x38')]({'name':path[_0xa5ca('0x39')](_0x331acd[_0xa5ca('0x2f')])[_0xa5ca('0x25')],'basename':path[_0xa5ca('0x39')](_0x331acd[_0xa5ca('0x2f')])[_0xa5ca('0x25')]+_0xa5ca('0x3a'),'type':_0xa5ca('0x3b')})['then'](function(_0x4ab7f7){faxAccount[_0xa5ca('0x3c')](_0x4c62f8,{'from':_0x331acd[_0xa5ca('0x3d')],'mapKey':_0xa5ca('0x3e'),'body':path[_0xa5ca('0x39')](_0x331acd[_0xa5ca('0x2f')])[_0xa5ca('0x25')]+_0xa5ca('0x3a'),'AttachmentId':_0x4ab7f7['id']})[_0xa5ca('0x3f')](function(_0x5263b4){logger[_0xa5ca('0x40')](_0x331acd[_0xa5ca('0x23')],_0xa5ca('0x41'),JSON[_0xa5ca('0x42')](_0x5263b4));});})[_0xa5ca('0x3f')](function(_0x2780b2){logger[_0xa5ca('0x40')](_0x331acd['uniqueid'],_0xa5ca('0x43'),JSON[_0xa5ca('0x42')](_0x2780b2));});});}logger[_0xa5ca('0x26')](_0x331acd['uniqueid'],_0xa5ca('0x43'));}};Fax[_0xa5ca('0x1c')][_0xa5ca('0x1b')]=function(_0x3c3205){if(this[_0xa5ca('0x27')][_0x3c3205['uniqueid']]){_[_0xa5ca('0x44')](this[_0xa5ca('0x22')][_0x3c3205[_0xa5ca('0x23')]],_[_0xa5ca('0x45')](_0x3c3205,[_0xa5ca('0x46'),_0xa5ca('0x47')]));}};function updateStatus(_0x4d77b8){if(_0x4d77b8[_0xa5ca('0x48')]){faxMessage['update'](_0x4d77b8[_0xa5ca('0x48')],{'failMessage':'SENDING\x20FAILED\x20'})[_0xa5ca('0x49')](function(_0x14d879){ut['logger'](_0xa5ca('0x4a'),_0x14d879);})[_0xa5ca('0x3f')](function(_0xb98786){ut[_0xa5ca('0x4b')]('[Fax][Message][Error][NoUpdate1]',_0xb98786);});}else{ut[_0xa5ca('0x4b')](_0xa5ca('0x4c'));}}Fax[_0xa5ca('0x1c')][_0xa5ca('0x4d')]=function(_0x5ce6aa,_0x14e7cd,_0x3e3128){var _0x2d999a=this;var _0x504a50={};if(_0x14e7cd){_0x504a50={'read':_0x14e7cd};}else{_0x504a50={'failMessage':_0x3e3128};}if(this[_0xa5ca('0x27')][_0x5ce6aa][_0xa5ca('0x48')]){faxMessage[_0xa5ca('0x4e')](this[_0xa5ca('0x27')][_0x5ce6aa][_0xa5ca('0x48')],_0x504a50)[_0xa5ca('0x49')](function(_0x960a4b){ut[_0xa5ca('0x4b')](_0xa5ca('0x4f'),_0x960a4b);})[_0xa5ca('0x3f')](function(_0x28c64f){ut['logger'](_0xa5ca('0x50'),_0x28c64f);})[_0xa5ca('0x51')](function(){delete _0x2d999a['channels'][_0x5ce6aa];delete _0x2d999a[_0xa5ca('0x27')][_0x5ce6aa];});}else{ut['logger']('[Fax][Message][NoUpdate2]');delete this['channels'][_0x5ce6aa];delete this[_0xa5ca('0x27')][_0x5ce6aa];}};Fax[_0xa5ca('0x1c')][_0xa5ca('0x19')]=function(_0x45b2de){var _0x248a61=this;if(this[_0xa5ca('0x22')][_0x45b2de[_0xa5ca('0x23')]]){if(this['actions'][_0x45b2de[_0xa5ca('0x23')]]){this[_0xa5ca('0x22')][_0x45b2de[_0xa5ca('0x23')]]['id']=this['actions'][_0x45b2de[_0xa5ca('0x23')]]['id'];this[_0xa5ca('0x22')][_0x45b2de[_0xa5ca('0x23')]][_0xa5ca('0x25')]=this[_0xa5ca('0x27')][_0x45b2de[_0xa5ca('0x23')]][_0xa5ca('0x25')];}logger[_0xa5ca('0x26')](_0x45b2de[_0xa5ca('0x23')],this[_0xa5ca('0x27')][_0x45b2de[_0xa5ca('0x23')]]?_0xa5ca('0x52'):_0xa5ca('0x53'),JSON[_0xa5ca('0x42')](this['channels'][_0x45b2de[_0xa5ca('0x23')]]));if(this[_0xa5ca('0x27')][_0x45b2de[_0xa5ca('0x23')]]){if(this[_0xa5ca('0x22')][_0x45b2de['uniqueid']][_0xa5ca('0x54')]>0x0&&this[_0xa5ca('0x22')][_0x45b2de['uniqueid']][_0xa5ca('0x16')]==='SUCCESS'){this[_0xa5ca('0x4d')](_0x45b2de[_0xa5ca('0x23')],!![]);}else{this[_0xa5ca('0x4d')](_0x45b2de[_0xa5ca('0x23')],![],this[_0xa5ca('0x22')][_0x45b2de[_0xa5ca('0x23')]][_0xa5ca('0x55')]?_0xa5ca('0x56')+this[_0xa5ca('0x22')][_0x45b2de['uniqueid']][_0xa5ca('0x55')]:'SENDING\x20FAILED');}}}};Fax[_0xa5ca('0x1c')][_0xa5ca('0x57')]=function(_0x145df8){var _0x4e4fb3=this;return new BPromise(function(_0x27f5fe,_0x404c5c){_0x4e4fb3['execOriginate'](_0x145df8,_0x4e4fb3[_0xa5ca('0xe')][_0x145df8[_0xa5ca('0x58')]])[_0xa5ca('0x49')](function(_0x12e626){ut[_0xa5ca('0x4b')](_0xa5ca('0x59'),_0x12e626);_0x27f5fe(ut[_0xa5ca('0x37')]('Fax\x20received'));})[_0xa5ca('0x3f')](function(_0x2ce975){ut[_0xa5ca('0x4b')](_0xa5ca('0x5a'),_0x2ce975);updateStatus(_0x145df8);_0x404c5c(ut[_0xa5ca('0x37')]('Fax\x20failed'));});});};Fax[_0xa5ca('0x1c')][_0xa5ca('0x5b')]=function(_0x4a8599){var _0x142be9=this;return new BPromise(function(_0x36b696,_0x5a7804){var _0x44e29a=_0x142be9[_0xa5ca('0x5c')](_0x142be9[_0xa5ca('0xe')][_0x4a8599[_0xa5ca('0x58')]]['Trunk'],_0x4a8599);if(_0x44e29a[_0xa5ca('0x5d')]){_0x36b696(ut['message'](_0xa5ca('0x5e')));}else{_0x5a7804(ut[_0xa5ca('0x37')](_0x44e29a['message']));}});};function originate(_0x10f146,_0x33b443,_0x5b897f){return new BPromise(function(_0x72b364,_0x4ff82d){if(_0x5b897f){var _0x5426e7=util['format'](_0xa5ca('0x5f'),path[_0xa5ca('0x39')](_0x10f146['path'])[_0xa5ca('0x25')],_0x10f146[_0xa5ca('0x4')]);gs[_0xa5ca('0x60')](_0x5426e7)[_0xa5ca('0x49')](function(){_0x10f146[_0xa5ca('0x4')]=util[_0xa5ca('0x61')](_0xa5ca('0x62'),path[_0xa5ca('0x39')](_0x10f146[_0xa5ca('0x4')])[_0xa5ca('0x63')],path[_0xa5ca('0x39')](_0x10f146[_0xa5ca('0x4')])['name']);_0x33b443['XMF-PATH']=_0x10f146['path'];ut[_0xa5ca('0x4b')](_0xa5ca('0x64'),'');ami['Action'](ut[_0xa5ca('0x65')](_0x10f146,_0x33b443))[_0xa5ca('0x49')](function(_0x341e6b){_0x72b364(_0x341e6b);})['catch'](function(_0x18a618){_0x4ff82d(_0x18a618);});})[_0xa5ca('0x3f')](function(_0x27a06d){_0x4ff82d(_0x27a06d);});}else{ami[_0xa5ca('0x66')](ut['variablesAction'](_0x10f146,_0x33b443))[_0xa5ca('0x49')](function(_0x41bcaf){_0x72b364(_0x41bcaf);})[_0xa5ca('0x3f')](function(_0x3f4567){_0x4ff82d(_0x3f4567);});}});}Fax[_0xa5ca('0x1c')][_0xa5ca('0x67')]=function(_0x320733,_0x644b8f){var _0x4a60b0=this;return new BPromise(function(_0x13d8b0,_0x167f57){var _0xd6e93e=uuid['v4']();var _0x575ce9=ut['addVariables'](_0x320733,_0x644b8f);_0x4a60b0[_0xa5ca('0x27')][_0xd6e93e]=new Action(_0xd6e93e,_0x644b8f,_0x320733);var _0xf2c1dd=_0x4a60b0[_0xa5ca('0x27')][_0xd6e93e];if(path[_0xa5ca('0x39')](_0x320733['path'])['ext']==='.pdf'){originate(_0xf2c1dd,_0x575ce9,!![])[_0xa5ca('0x49')](function(_0x2f2eb6){_0x13d8b0(_0x2f2eb6);})[_0xa5ca('0x3f')](function(_0x13a199){_0x167f57(_0x13a199);});}else{originate(_0xf2c1dd,_0x575ce9,![])[_0xa5ca('0x49')](function(_0x34cd27){_0x13d8b0(_0x34cd27);})[_0xa5ca('0x3f')](function(_0x5eb742){_0x167f57(_0x5eb742);});}});};Fax[_0xa5ca('0x1c')][_0xa5ca('0x68')]=function(_0x13a295){return!_[_0xa5ca('0x69')](_0x13a295)&&!_['isNil'](_0x13a295[_0xa5ca('0x25')])&&!_[_0xa5ca('0x69')](_0x13a295['active'])&&_0x13a295[_0xa5ca('0x6a')]&&!_[_0xa5ca('0x69')](this['trunks'][util['format']('SIP/%s',_0x13a295['name'])])&&!_[_0xa5ca('0x69')](this[_0xa5ca('0xf')][util[_0xa5ca('0x61')](_0xa5ca('0x6b'),_0x13a295['name'])][_0xa5ca('0x2e')])&&(this[_0xa5ca('0xf')][util[_0xa5ca('0x61')](_0xa5ca('0x6b'),_0x13a295[_0xa5ca('0x25')])][_0xa5ca('0x2e')]===_0xa5ca('0x6c')||this[_0xa5ca('0xf')][util[_0xa5ca('0x61')](_0xa5ca('0x6b'),_0x13a295[_0xa5ca('0x25')])]['status']===_0xa5ca('0x6d'));};Fax[_0xa5ca('0x1c')][_0xa5ca('0x5c')]=function(_0x42387e,_0x3d4149){if(!this['isTrunkReachable'](_0x42387e)){ut[_0xa5ca('0x4b')](_0xa5ca('0x6e'),_['isNil'](_0x42387e)?'':_0x42387e[_0xa5ca('0x25')]+_0xa5ca('0x6f'));return{'isValid':![],'message':_0xa5ca('0x70')};}if(_[_0xa5ca('0x69')](_0x3d4149[_0xa5ca('0x3e')])){ut[_0xa5ca('0x4b')](_0xa5ca('0x71'),JSON[_0xa5ca('0x42')](_0x3d4149));return{'isValid':![],'message':_0xa5ca('0x72')};}if(_['isNil'](_0x3d4149[_0xa5ca('0x4')])){ut[_0xa5ca('0x4b')](_0xa5ca('0x73'),JSON['stringify'](_0x3d4149));return{'isValid':![],'message':'Empty\x20path'};}return{'isValid':!![],'message':_0xa5ca('0x74')};};module[_0xa5ca('0x75')]=Fax;
\ No newline at end of file
diff --git a/server/services/ami/fax/rpcDb.js b/server/services/ami/fax/rpcDb.js
index 41e7442..9a94366 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 _0x69fe=['error','inspect','resolve','then','notify','catch','[Notify]\x20','bluebird','../../../config/logger','lodash','../rpc/faxAccount'];(function(_0xfb1b76,_0x43ca5b){var _0x246c82=function(_0xa4058c){while(--_0xa4058c){_0xfb1b76['push'](_0xfb1b76['shift']());}};_0x246c82(++_0x43ca5b);}(_0x69fe,0x1e0));var _0xe69f=function(_0x11787e,_0x46178f){_0x11787e=_0x11787e-0x0;var _0x254845=_0x69fe[_0x11787e];return _0x254845;};'use strict';var util=require('util');var BPromise=require(_0xe69f('0x0'));var logger=require(_0xe69f('0x1'))('preview');var _=require(_0xe69f('0x2'));var faxAccount=require(_0xe69f('0x3'));function loggerCatch(_0x12ede4){return function(_0x454c90){logger[_0xe69f('0x4')](_0x12ede4,util[_0xe69f('0x5')](_0x454c90,{'showHidden':![],'depth':null}));};}exports['notify']=function(_0x1296dd,_0x4b3f63){return BPromise[_0xe69f('0x6')]()[_0xe69f('0x7')](faxAccount[_0xe69f('0x8')](_0x1296dd,_0x4b3f63))[_0xe69f('0x9')](loggerCatch(_0xe69f('0xa')));};
\ No newline at end of file
+var _0xfd0f=['../rpc/faxAccount','error','notify','then','catch','[Notify]\x20','../../../config/logger','preview'];(function(_0x3a72c5,_0x44dfa9){var _0x2ff06f=function(_0x40fcf4){while(--_0x40fcf4){_0x3a72c5['push'](_0x3a72c5['shift']());}};_0x2ff06f(++_0x44dfa9);}(_0xfd0f,0xf6));var _0xffd0=function(_0x38fb25,_0x2b69b2){_0x38fb25=_0x38fb25-0x0;var _0xfa0fea=_0xfd0f[_0x38fb25];return _0xfa0fea;};'use strict';var util=require('util');var BPromise=require('bluebird');var logger=require(_0xffd0('0x0'))(_0xffd0('0x1'));var _=require('lodash');var faxAccount=require(_0xffd0('0x2'));function loggerCatch(_0x56a6b2){return function(_0x3e194e){logger[_0xffd0('0x3')](_0x56a6b2,util['inspect'](_0x3e194e,{'showHidden':![],'depth':null}));};}exports[_0xffd0('0x4')]=function(_0x5f4401,_0x4658bb){return BPromise['resolve']()[_0xffd0('0x5')](faxAccount[_0xffd0('0x4')](_0x5f4401,_0x4658bb))[_0xffd0('0x6')](loggerCatch(_0xffd0('0x7')));};
\ 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 6390420..68dbfce 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 _0x354a=['Exec\x20gs','inspect','util','fax','child_process','exec','info'];(function(_0x1ca2fd,_0x2059a0){var _0x313d8e=function(_0x3486ed){while(--_0x3486ed){_0x1ca2fd['push'](_0x1ca2fd['shift']());}};_0x313d8e(++_0x2059a0);}(_0x354a,0x128));var _0xa354=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x354a[_0x122ef9];return _0x42fba0;};'use strict';var util=require(_0xa354('0x0'));var logger=require('../../../../config/logger')(_0xa354('0x1'));var BPromise=require('bluebird');var exec=require(_0xa354('0x2'))[_0xa354('0x3')];exports['execute']=function(_0x29c21a){return new BPromise(function(_0x343ca6,_0x418054){exec(_0x29c21a,function(_0x31807e,_0x4e64b9,_0x323943){logger[_0xa354('0x4')](_0xa354('0x5'),_0x4e64b9);if(_0x31807e){logger['info'](_0xa354('0x5'),'\x20Error\x20:',util[_0xa354('0x6')](_0x31807e,{'showHidden':![],'depth':null}),_0x4e64b9,_0x323943);_0x418054(_0x31807e);}_0x343ca6(_0x4e64b9);});});};
\ No newline at end of file
+var _0x7865=['util','../../../../config/logger','fax','child_process','exec','execute','info','Exec\x20gs','\x20Error\x20:','inspect'];(function(_0x5317b5,_0x4dfd6e){var _0x3b7ce2=function(_0xc146d6){while(--_0xc146d6){_0x5317b5['push'](_0x5317b5['shift']());}};_0x3b7ce2(++_0x4dfd6e);}(_0x7865,0x10e));var _0x5786=function(_0x131c3b,_0x2ee862){_0x131c3b=_0x131c3b-0x0;var _0x3af0a9=_0x7865[_0x131c3b];return _0x3af0a9;};'use strict';var util=require(_0x5786('0x0'));var logger=require(_0x5786('0x1'))(_0x5786('0x2'));var BPromise=require('bluebird');var exec=require(_0x5786('0x3'))[_0x5786('0x4')];exports[_0x5786('0x5')]=function(_0x24397c){return new BPromise(function(_0x10f42c,_0x11fe33){exec(_0x24397c,function(_0x56ff1d,_0x48174c,_0x8c6fb7){logger[_0x5786('0x6')]('Exec\x20gs',_0x48174c);if(_0x56ff1d){logger[_0x5786('0x6')](_0x5786('0x7'),_0x5786('0x8'),util[_0x5786('0x9')](_0x56ff1d,{'showHidden':![],'depth':null}),_0x48174c,_0x8c6fb7);_0x11fe33(_0x56ff1d);}_0x10f42c(_0x48174c);});});};
\ 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 e870a7d..d9dee11 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 _0x76dc=['headerinfo','minrate','\x22%s\x22','modem','faxdetect','localstationid','path','variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','format','\x22%s\x22\x20<%s>','util','lodash','moment','../../../../config/logger','message','inspect','addVariables','ecm'];(function(_0x151c7b,_0x535801){var _0x37de1d=function(_0x475b18){while(--_0x475b18){_0x151c7b['push'](_0x151c7b['shift']());}};_0x37de1d(++_0x535801);}(_0x76dc,0x1f2));var _0xc76d=function(_0x2b6178,_0x3fd661){_0x2b6178=_0x2b6178-0x0;var _0xd13fb=_0x76dc[_0x2b6178];return _0xd13fb;};'use strict';var util=require(_0xc76d('0x0'));var _=require(_0xc76d('0x1'));var moment=require(_0xc76d('0x2'));var logger=require(_0xc76d('0x3'))('fax');exports[_0xc76d('0x4')]=function(_0x1ba6a1){return{'message':_0x1ba6a1};};exports['logger']=function(_0x300f11,_0x50ed3a){logger['info'](_0x300f11,util[_0xc76d('0x5')](_0x50ed3a,{'showHidden':![],'depth':null}));};exports[_0xc76d('0x6')]=function(_0x1c86fc,_0x4832bd){var _0x4ce0bd={'XMF-ECM':_0x4832bd[_0xc76d('0x7')],'XMF-HEADERINFO':_0x4832bd[_0xc76d('0x8')],'XMF-MINRATE':_0x4832bd[_0xc76d('0x9')],'XMF-MAXRATE':_0x4832bd['maxrate'],'XMF-MODEM':util['format'](_0xc76d('0xa'),_0x4832bd[_0xc76d('0xb')]),'XMF-GATEWAY':_0x4832bd['gateway'],'XMF-FAXDETECT':_0x4832bd[_0xc76d('0xc')],'XMF-T38TIMEOUT':_0x4832bd['t38timeout'],'XMF-LOCALSTATIONID':_0x4832bd[_0xc76d('0xd')],'XMF-PATH':_0x1c86fc[_0xc76d('0xe')]};return _0x4ce0bd;};exports[_0xc76d('0xf')]=function(_0x95e06b,_0x3f59ea){return{'actionid':_0x95e06b[_0xc76d('0x10')],'action':_0xc76d('0x11'),'channel':_0x95e06b[_0xc76d('0x12')],'Exten':_0xc76d('0x13'),'Context':_0xc76d('0x14'),'Priority':'1','callerid':util[_0xc76d('0x15')](_0xc76d('0x16'),_0x95e06b[_0xc76d('0x8')]?_0x95e06b[_0xc76d('0x8')]:'',_0x95e06b['localstationid']),'variable':_0x3f59ea,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x95e06b[_0xc76d('0x10')]};};
\ No newline at end of file
+var _0xd2ea=['variablesAction','uniqueid','originate','channel','from-sip','\x22%s\x22\x20<%s>','util','lodash','moment','../../../../config/logger','fax','logger','info','inspect','addVariables','ecm','minrate','maxrate','\x22%s\x22','gateway','faxdetect','t38timeout','localstationid'];(function(_0x5eb70f,_0x15e9ee){var _0x14090c=function(_0x353739){while(--_0x353739){_0x5eb70f['push'](_0x5eb70f['shift']());}};_0x14090c(++_0x15e9ee);}(_0xd2ea,0x15f));var _0xad2e=function(_0x1f8ac5,_0xd07676){_0x1f8ac5=_0x1f8ac5-0x0;var _0x312c32=_0xd2ea[_0x1f8ac5];return _0x312c32;};'use strict';var util=require(_0xad2e('0x0'));var _=require(_0xad2e('0x1'));var moment=require(_0xad2e('0x2'));var logger=require(_0xad2e('0x3'))(_0xad2e('0x4'));exports['message']=function(_0x3a9d11){return{'message':_0x3a9d11};};exports[_0xad2e('0x5')]=function(_0xcba7cb,_0x3e0741){logger[_0xad2e('0x6')](_0xcba7cb,util[_0xad2e('0x7')](_0x3e0741,{'showHidden':![],'depth':null}));};exports[_0xad2e('0x8')]=function(_0x592e8b,_0x3b5170){var _0x3e3d1f={'XMF-ECM':_0x3b5170[_0xad2e('0x9')],'XMF-HEADERINFO':_0x3b5170['headerinfo'],'XMF-MINRATE':_0x3b5170[_0xad2e('0xa')],'XMF-MAXRATE':_0x3b5170[_0xad2e('0xb')],'XMF-MODEM':util['format'](_0xad2e('0xc'),_0x3b5170['modem']),'XMF-GATEWAY':_0x3b5170[_0xad2e('0xd')],'XMF-FAXDETECT':_0x3b5170[_0xad2e('0xe')],'XMF-T38TIMEOUT':_0x3b5170[_0xad2e('0xf')],'XMF-LOCALSTATIONID':_0x3b5170[_0xad2e('0x10')],'XMF-PATH':_0x592e8b['path']};return _0x3e3d1f;};exports[_0xad2e('0x11')]=function(_0x5707a5,_0x42d2ac){return{'actionid':_0x5707a5[_0xad2e('0x12')],'action':_0xad2e('0x13'),'channel':_0x5707a5[_0xad2e('0x14')],'Exten':'xcally-motion-fax','Context':_0xad2e('0x15'),'Priority':'1','callerid':util['format'](_0xad2e('0x16'),_0x5707a5['headerinfo']?_0x5707a5['headerinfo']:'',_0x5707a5['localstationid']),'variable':_0x42d2ac,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x5707a5['uniqueid']};};
\ No newline at end of file
diff --git a/server/services/ami/index.js b/server/services/ami/index.js
index 569b4c0..27916a8 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 _0x686f=['./dialer','./fax','./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trunk','./rpc/template','./rpc/cmHopperHistory','./rpc/faxAccount','./rpc/integrations/salesforce','./rpc/integrations/freshdesk','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','get','hour','resolve','then','getAgents','getTelephones','initTelephones','getTrunks','initTrunks','getVoiceQueues','getTriggers','initTriggers','getTemplates','getZendeskAccounts','initZendeskAccounts','getSalesforceAccounts','getFreshdeskAccounts','getDeskAccounts','initDeskAccounts','getZohoAccounts','initZohoAccounts','getVtigerAccounts','initVtigerAccounts','getFreshsalesAccounts','initFreshsalesAccounts','getDynamics365Accounts','initDynamics365Accounts','initCampaigns','getVoiceExtensions','getFaxAccounts','initFaxAccounts','initVoiceQueueReports','initVoiceQueueHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','sync','log','bluebird','util','moment','./server','./realtime','./report','./acw','./trigger'];(function(_0xb1e2bf,_0x55bae1){var _0x3fbefc=function(_0x2e7ac2){while(--_0x2e7ac2){_0xb1e2bf['push'](_0xb1e2bf['shift']());}};_0x3fbefc(++_0x55bae1);}(_0x686f,0xf8));var _0xf686=function(_0x3ac351,_0x87910e){_0x3ac351=_0x3ac351-0x0;var _0x494d8a=_0x686f[_0x3ac351];return _0x494d8a;};'use strict';var BPromise=require(_0xf686('0x0'));var util=require(_0xf686('0x1'));var moment=require(_0xf686('0x2'));var server=require(_0xf686('0x3'));var Realtime=require(_0xf686('0x4'));var Report=require(_0xf686('0x5'));var Acw=require(_0xf686('0x6'));var Trigger=require(_0xf686('0x7'));var Dialer=require(_0xf686('0x8'));var Preview=require('./preview');var Fax=require(_0xf686('0x9'));var user=require(_0xf686('0xa'));var voiceQueue=require(_0xf686('0xb'));var voiceQueueReport=require(_0xf686('0xc'));var voiceCallReport=require(_0xf686('0xd'));var trunk=require(_0xf686('0xe'));var trigger=require('./rpc/trigger');var template=require(_0xf686('0xf'));var cmHopperHistory=require(_0xf686('0x10'));var campaign=require('./rpc/campaign');var voiceExtension=require('./rpc/voiceExtension');var faxAccount=require(_0xf686('0x11'));var zendesk=require('./rpc/integrations/zendesk');var salesforce=require(_0xf686('0x12'));var sugarcrm=require('./rpc/integrations/sugarcrm');var freshdesk=require(_0xf686('0x13'));var desk=require('./rpc/integrations/desk');var zoho=require(_0xf686('0x14'));var vtiger=require(_0xf686('0x15'));var freshsales=require(_0xf686('0x16'));var servicenow=require(_0xf686('0x17'));var dynamics365=require(_0xf686('0x18'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()[_0xf686('0x19')](_0xf686('0x1a'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0xf686('0x19')]('hour')===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0xf686('0x1b')]()[_0xf686('0x1c')](user[_0xf686('0x1d')]())[_0xf686('0x1c')](realtime['initAgents']())[_0xf686('0x1c')](user[_0xf686('0x1e')]())[_0xf686('0x1c')](realtime[_0xf686('0x1f')]())['then'](trunk[_0xf686('0x20')]())['then'](realtime[_0xf686('0x21')]())[_0xf686('0x1c')](voiceQueue[_0xf686('0x22')]())[_0xf686('0x1c')](realtime['initVoiceQueues']())[_0xf686('0x1c')](trigger[_0xf686('0x23')]())[_0xf686('0x1c')](realtime[_0xf686('0x24')]())[_0xf686('0x1c')](template[_0xf686('0x25')]())[_0xf686('0x1c')](realtime['initTemplates']())[_0xf686('0x1c')](zendesk[_0xf686('0x26')]())[_0xf686('0x1c')](realtime[_0xf686('0x27')]())[_0xf686('0x1c')](salesforce[_0xf686('0x28')]())['then'](realtime['initSalesforceAccounts']())[_0xf686('0x1c')](sugarcrm['getSugarcrmAccounts']())[_0xf686('0x1c')](realtime['initSugarcrmAccounts']())[_0xf686('0x1c')](freshdesk[_0xf686('0x29')]())['then'](realtime['initFreshdeskAccounts']())[_0xf686('0x1c')](desk[_0xf686('0x2a')]())[_0xf686('0x1c')](realtime[_0xf686('0x2b')]())['then'](zoho[_0xf686('0x2c')]())[_0xf686('0x1c')](realtime[_0xf686('0x2d')]())['then'](vtiger[_0xf686('0x2e')]())[_0xf686('0x1c')](realtime[_0xf686('0x2f')]())[_0xf686('0x1c')](freshsales[_0xf686('0x30')]())[_0xf686('0x1c')](realtime[_0xf686('0x31')]())[_0xf686('0x1c')](servicenow['getServicenowAccounts']())[_0xf686('0x1c')](realtime['initServicenowAccounts']())[_0xf686('0x1c')](dynamics365[_0xf686('0x32')]())[_0xf686('0x1c')](realtime[_0xf686('0x33')]())[_0xf686('0x1c')](campaign['getCampaigns']())[_0xf686('0x1c')](realtime[_0xf686('0x34')]())['then'](voiceExtension[_0xf686('0x35')]())[_0xf686('0x1c')](realtime['initVoiceExtensions']())[_0xf686('0x1c')](faxAccount[_0xf686('0x36')]())['then'](realtime[_0xf686('0x37')]())[_0xf686('0x1c')](function(){return realtime;});}function initParams(){return BPromise[_0xf686('0x1b')]()[_0xf686('0x1c')](voiceQueueReport['getVoiceQueueReports']())[_0xf686('0x1c')](realtime[_0xf686('0x38')]())[_0xf686('0x1c')](cmHopperHistory['getVoiceQueueHopperHistory']())[_0xf686('0x1c')](realtime[_0xf686('0x39')]())[_0xf686('0x1c')](cmHopperHistory['getCampaignHopperHistory']())[_0xf686('0x1c')](realtime[_0xf686('0x3a')]())[_0xf686('0x1c')](voiceCallReport[_0xf686('0x3b')]())['then'](realtime[_0xf686('0x3c')]())['then'](function(_0x137e3c){})[_0xf686('0x3d')](function(_0x1d5b46){console['log'](_0x1d5b46);});}function main(){return server['listen'](realtime,preview,fax)[_0xf686('0x1c')](function(_0xc21a95){return initRealtime();})[_0xf686('0x1c')](function(){return initParams();})['then'](function(){report[_0xf686('0x3e')]();setInterval(initRealtime,0x1388);})[_0xf686('0x3d')](function(_0x2cc492){console[_0xf686('0x3f')](_0x2cc492);});}main();
\ No newline at end of file
+var _0xb973=['getZohoAccounts','getVtigerAccounts','initVtigerAccounts','getFreshsalesAccounts','initFreshsalesAccounts','initServicenowAccounts','getCampaigns','getVoiceExtensions','initVoiceExtensions','getFaxAccounts','initFaxAccounts','getVoiceQueueReports','initVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','getCampaignHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','log','listen','sync','util','moment','./realtime','./report','./acw','./trigger','./dialer','./preview','./fax','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/trunk','./rpc/trigger','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/sugarcrm','./rpc/integrations/freshdesk','./rpc/integrations/desk','./rpc/integrations/zoho','./rpc/integrations/freshsales','./rpc/integrations/dynamics365','hour','get','resolve','then','initAgents','getTelephones','initTelephones','getTrunks','getVoiceQueues','initVoiceQueues','getTriggers','getTemplates','initTemplates','getZendeskAccounts','initZendeskAccounts','getSugarcrmAccounts','initSugarcrmAccounts','initFreshdeskAccounts','getDeskAccounts','initDeskAccounts'];(function(_0x15ad6e,_0x1d118c){var _0x7eccad=function(_0x13c5e4){while(--_0x13c5e4){_0x15ad6e['push'](_0x15ad6e['shift']());}};_0x7eccad(++_0x1d118c);}(_0xb973,0x127));var _0x3b97=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb973[_0x3dd15e];return _0x231fd0;};'use strict';var BPromise=require('bluebird');var util=require(_0x3b97('0x0'));var moment=require(_0x3b97('0x1'));var server=require('./server');var Realtime=require(_0x3b97('0x2'));var Report=require(_0x3b97('0x3'));var Acw=require(_0x3b97('0x4'));var Trigger=require(_0x3b97('0x5'));var Dialer=require(_0x3b97('0x6'));var Preview=require(_0x3b97('0x7'));var Fax=require(_0x3b97('0x8'));var user=require('./rpc/user');var voiceQueue=require(_0x3b97('0x9'));var voiceQueueReport=require(_0x3b97('0xa'));var voiceCallReport=require('./rpc/voiceCallReport');var trunk=require(_0x3b97('0xb'));var trigger=require(_0x3b97('0xc'));var template=require(_0x3b97('0xd'));var cmHopperHistory=require(_0x3b97('0xe'));var campaign=require(_0x3b97('0xf'));var voiceExtension=require(_0x3b97('0x10'));var faxAccount=require(_0x3b97('0x11'));var zendesk=require(_0x3b97('0x12'));var salesforce=require('./rpc/integrations/salesforce');var sugarcrm=require(_0x3b97('0x13'));var freshdesk=require(_0x3b97('0x14'));var desk=require(_0x3b97('0x15'));var zoho=require(_0x3b97('0x16'));var vtiger=require('./rpc/integrations/vtiger');var freshsales=require(_0x3b97('0x17'));var servicenow=require('./rpc/integrations/servicenow');var dynamics365=require(_0x3b97('0x18'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()['get'](_0x3b97('0x19'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x3b97('0x1a')](_0x3b97('0x19'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0x3b97('0x1b')]()[_0x3b97('0x1c')](user['getAgents']())[_0x3b97('0x1c')](realtime[_0x3b97('0x1d')]())[_0x3b97('0x1c')](user[_0x3b97('0x1e')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x1f')]())[_0x3b97('0x1c')](trunk[_0x3b97('0x20')]())[_0x3b97('0x1c')](realtime['initTrunks']())['then'](voiceQueue[_0x3b97('0x21')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x22')]())[_0x3b97('0x1c')](trigger[_0x3b97('0x23')]())[_0x3b97('0x1c')](realtime['initTriggers']())[_0x3b97('0x1c')](template[_0x3b97('0x24')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x25')]())[_0x3b97('0x1c')](zendesk[_0x3b97('0x26')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x27')]())['then'](salesforce['getSalesforceAccounts']())['then'](realtime['initSalesforceAccounts']())[_0x3b97('0x1c')](sugarcrm[_0x3b97('0x28')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x29')]())[_0x3b97('0x1c')](freshdesk['getFreshdeskAccounts']())[_0x3b97('0x1c')](realtime[_0x3b97('0x2a')]())['then'](desk[_0x3b97('0x2b')]())['then'](realtime[_0x3b97('0x2c')]())['then'](zoho[_0x3b97('0x2d')]())[_0x3b97('0x1c')](realtime['initZohoAccounts']())['then'](vtiger[_0x3b97('0x2e')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x2f')]())[_0x3b97('0x1c')](freshsales[_0x3b97('0x30')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x31')]())['then'](servicenow['getServicenowAccounts']())[_0x3b97('0x1c')](realtime[_0x3b97('0x32')]())[_0x3b97('0x1c')](dynamics365['getDynamics365Accounts']())[_0x3b97('0x1c')](realtime['initDynamics365Accounts']())[_0x3b97('0x1c')](campaign[_0x3b97('0x33')]())[_0x3b97('0x1c')](realtime['initCampaigns']())[_0x3b97('0x1c')](voiceExtension[_0x3b97('0x34')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x35')]())[_0x3b97('0x1c')](faxAccount[_0x3b97('0x36')]())['then'](realtime[_0x3b97('0x37')]())[_0x3b97('0x1c')](function(){return realtime;});}function initParams(){return BPromise[_0x3b97('0x1b')]()[_0x3b97('0x1c')](voiceQueueReport[_0x3b97('0x38')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x39')]())[_0x3b97('0x1c')](cmHopperHistory[_0x3b97('0x3a')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x3b')]())[_0x3b97('0x1c')](cmHopperHistory[_0x3b97('0x3c')]())[_0x3b97('0x1c')](realtime[_0x3b97('0x3d')]())[_0x3b97('0x1c')](voiceCallReport[_0x3b97('0x3e')]())['then'](realtime[_0x3b97('0x3f')]())[_0x3b97('0x1c')](function(_0x3bf646){})[_0x3b97('0x40')](function(_0x16ff51){console[_0x3b97('0x41')](_0x16ff51);});}function main(){return server[_0x3b97('0x42')](realtime,preview,fax)[_0x3b97('0x1c')](function(_0xfc9b3f){return initRealtime();})['then'](function(){return initParams();})[_0x3b97('0x1c')](function(){report[_0x3b97('0x43')]();setInterval(initRealtime,0x1388);})[_0x3b97('0x40')](function(_0x2fa324){console[_0x3b97('0x41')](_0x2fa324);});}main();
\ No newline at end of file
diff --git a/server/services/ami/model/agent.js b/server/services/ami/model/agent.js
index 67d713f..fd0ab35 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 _0xf7b7=['online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','voiceStatusQueue','local','prototype','updateStatusRealtime','toLowerCase','not_inuse','idle','talking','toNumber','format','user:%s','user:save','exports','lodash','util','md5','ioredis','defaults','localhost','socket.io-emitter','redis','name','email','accountcode','fullname','state','unknown','stateTime','status','address','phone','mobile','interface'];(function(_0x3c614d,_0x4f317f){var _0x5266dd=function(_0x309a31){while(--_0x309a31){_0x3c614d['push'](_0x3c614d['shift']());}};_0x5266dd(++_0x4f317f);}(_0xf7b7,0x1cd));var _0x7f7b=function(_0x3fb807,_0x3f694d){_0x3fb807=_0x3fb807-0x0;var _0x5e4710=_0xf7b7[_0x3fb807];return _0x5e4710;};'use strict';var _=require(_0x7f7b('0x0'));var util=require(_0x7f7b('0x1'));var moment=require('moment');var md5=require(_0x7f7b('0x2'));var Redis=require(_0x7f7b('0x3'));var config=require('../../../config/environment');config['redis']=_[_0x7f7b('0x4')](config['redis'],{'host':_0x7f7b('0x5'),'port':0x18eb});var io=require(_0x7f7b('0x6'))(new Redis(config[_0x7f7b('0x7')]));function Agent(_0xdf40f2){this['id']=_0xdf40f2['id']||0x0;this[_0x7f7b('0x8')]=_0xdf40f2[_0x7f7b('0x8')]||'';this[_0x7f7b('0x9')]=_0xdf40f2['email']||'';this[_0x7f7b('0xa')]=_0xdf40f2[_0x7f7b('0xa')]||'';this[_0x7f7b('0xb')]=_0xdf40f2[_0x7f7b('0xb')]||'';this[_0x7f7b('0xc')]=_0x7f7b('0xd');this[_0x7f7b('0xe')]=0x0;this[_0x7f7b('0xf')]='unknown';this[_0x7f7b('0x10')]='';this[_0x7f7b('0x11')]='';this[_0x7f7b('0x12')]='';this[_0x7f7b('0x13')]='';this[_0x7f7b('0x14')]=_0xdf40f2[_0x7f7b('0x14')]||![];this[_0x7f7b('0x15')]=_0x7f7b('0xd');this[_0x7f7b('0x16')]=0x0;this[_0x7f7b('0x17')]='';this[_0x7f7b('0x18')]='';this['onhold']=![];this[_0x7f7b('0x19')]=![];this[_0x7f7b('0x2')]='';}Agent[_0x7f7b('0x1a')][_0x7f7b('0x1b')]=function(_0x445152){var _0x465bd8;if(_0x445152&&_0x445152[_0x7f7b('0xc')]){_0x465bd8=_0x445152[_0x7f7b('0xc')][_0x7f7b('0x1c')]();switch(_0x465bd8){case _0x7f7b('0x1d'):_0x465bd8=_0x7f7b('0x1e');break;case'inuse':_0x465bd8=_0x7f7b('0x1f');break;}}if(_0x465bd8&&this[_0x7f7b('0x15')]!==_0x465bd8||_0x445152['statePause']){this[_0x7f7b('0x16')]=_[_0x7f7b('0x20')](moment()[_0x7f7b('0x21')]('x'));}if(_0x465bd8){this['voiceStatus']=_0x465bd8;}var _0x574fd4={'id':this['id'],'name':this[_0x7f7b('0x8')],'email':this[_0x7f7b('0x9')],'accountcode':this['accountcode'],'fullname':this[_0x7f7b('0xb')],'state':this[_0x7f7b('0xc')],'stateTime':this[_0x7f7b('0xe')],'status':this['status'],'address':this[_0x7f7b('0x10')],'online':this[_0x7f7b('0x14')],'voiceStatus':this[_0x7f7b('0x15')],'voiceStatusTime':this[_0x7f7b('0x16')],'voiceStatusCallerIdNumber':this['voiceStatusCallerIdNumber'],'voiceStatusQueue':this['voiceStatusQueue'],'interface':this[_0x7f7b('0x13')],'onhold':this['onhold']};var _0x1f1972=md5(JSON['stringify'](_0x574fd4));if(this['md5']!==_0x1f1972){this[_0x7f7b('0x2')]=_0x1f1972;io['to'](util[_0x7f7b('0x21')](_0x7f7b('0x22'),_0x574fd4[_0x7f7b('0x8')]))['emit'](_0x7f7b('0x23'),_0x574fd4);}};module[_0x7f7b('0x24')]=Agent;
\ No newline at end of file
+var _0x96d8=['status','address','phone','mobile','interface','online','voiceStatus','voiceStatusQueue','local','md5','prototype','toLowerCase','not_inuse','idle','inuse','talking','voiceStatusTime','toNumber','format','name','email','stateTime','voiceStatusCallerIdNumber','onhold','stringify','user:save','lodash','ioredis','../../../config/environment','redis','localhost','socket.io-emitter','accountcode','fullname','state','unknown'];(function(_0x519756,_0x288785){var _0x37047e=function(_0x3d64a7){while(--_0x3d64a7){_0x519756['push'](_0x519756['shift']());}};_0x37047e(++_0x288785);}(_0x96d8,0x1ca));var _0x896d=function(_0x4d17e9,_0x37b067){_0x4d17e9=_0x4d17e9-0x0;var _0x81868=_0x96d8[_0x4d17e9];return _0x81868;};'use strict';var _=require(_0x896d('0x0'));var util=require('util');var moment=require('moment');var md5=require('md5');var Redis=require(_0x896d('0x1'));var config=require(_0x896d('0x2'));config[_0x896d('0x3')]=_['defaults'](config['redis'],{'host':_0x896d('0x4'),'port':0x18eb});var io=require(_0x896d('0x5'))(new Redis(config['redis']));function Agent(_0x4232fa){this['id']=_0x4232fa['id']||0x0;this['name']=_0x4232fa['name']||'';this['email']=_0x4232fa['email']||'';this['accountcode']=_0x4232fa[_0x896d('0x6')]||'';this['fullname']=_0x4232fa[_0x896d('0x7')]||'';this[_0x896d('0x8')]=_0x896d('0x9');this['stateTime']=0x0;this[_0x896d('0xa')]=_0x896d('0x9');this[_0x896d('0xb')]='';this[_0x896d('0xc')]='';this[_0x896d('0xd')]='';this[_0x896d('0xe')]='';this['online']=_0x4232fa[_0x896d('0xf')]||![];this[_0x896d('0x10')]=_0x896d('0x9');this['voiceStatusTime']=0x0;this['voiceStatusCallerIdNumber']='';this[_0x896d('0x11')]='';this['onhold']=![];this[_0x896d('0x12')]=![];this[_0x896d('0x13')]='';}Agent[_0x896d('0x14')]['updateStatusRealtime']=function(_0x3271a9){var _0x46f967;if(_0x3271a9&&_0x3271a9[_0x896d('0x8')]){_0x46f967=_0x3271a9['state'][_0x896d('0x15')]();switch(_0x46f967){case _0x896d('0x16'):_0x46f967=_0x896d('0x17');break;case _0x896d('0x18'):_0x46f967=_0x896d('0x19');break;}}if(_0x46f967&&this[_0x896d('0x10')]!==_0x46f967||_0x3271a9['statePause']){this[_0x896d('0x1a')]=_[_0x896d('0x1b')](moment()[_0x896d('0x1c')]('x'));}if(_0x46f967){this['voiceStatus']=_0x46f967;}var _0x4def9c={'id':this['id'],'name':this[_0x896d('0x1d')],'email':this[_0x896d('0x1e')],'accountcode':this['accountcode'],'fullname':this['fullname'],'state':this[_0x896d('0x8')],'stateTime':this[_0x896d('0x1f')],'status':this['status'],'address':this['address'],'online':this[_0x896d('0xf')],'voiceStatus':this[_0x896d('0x10')],'voiceStatusTime':this['voiceStatusTime'],'voiceStatusCallerIdNumber':this[_0x896d('0x20')],'voiceStatusQueue':this['voiceStatusQueue'],'interface':this[_0x896d('0xe')],'onhold':this[_0x896d('0x21')]};var _0x3af182=md5(JSON[_0x896d('0x22')](_0x4def9c));if(this['md5']!==_0x3af182){this[_0x896d('0x13')]=_0x3af182;io['to'](util[_0x896d('0x1c')]('user:%s',_0x4def9c['name']))['emit'](_0x896d('0x23'),_0x4def9c);}};module['exports']=Agent;
\ No newline at end of file
diff --git a/server/services/ami/model/campaign.js b/server/services/ami/model/campaign.js
index 33925d5..0ac545b 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 _0x757a=['sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialBusyRetryFrequency','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','originated','temp','ivrAnswerCallsDay','ivrTotalCallsDays','message'];(function(_0x4e9274,_0x49576e){var _0x8b474c=function(_0x204cca){while(--_0x204cca){_0x4e9274['push'](_0x4e9274['shift']());}};_0x8b474c(++_0x49576e);}(_0x757a,0xde));var _0xa757=function(_0x30bd84,_0x18dc9e){_0x30bd84=_0x30bd84-0x0;var _0x21a222=_0x757a[_0x30bd84];return _0x21a222;};'use strict';function Campaign(_0x1acf7d){this['id']=_0x1acf7d['id']||0x0;this[_0xa757('0x0')]=_0x1acf7d[_0xa757('0x0')]||'';this['type']=_0x1acf7d['type']||'campaign';this[_0xa757('0x1')]=0x0;this[_0xa757('0x2')]=0x0;this[_0xa757('0x3')]=0x0;this[_0xa757('0x4')]=0x0;this[_0xa757('0x5')]='';this[_0xa757('0x6')]=!![];this['active']=_0x1acf7d[_0xa757('0x7')];this[_0xa757('0x8')]=_0x1acf7d['limitCalls'];this[_0xa757('0x9')]=_0x1acf7d[_0xa757('0x9')]||null;this[_0xa757('0xa')]=_0x1acf7d[_0xa757('0xa')]?_0x1acf7d[_0xa757('0xa')]:null;this['dialOriginateCallerIdName']=_0x1acf7d[_0xa757('0xb')];this[_0xa757('0xc')]=_0x1acf7d[_0xa757('0xc')];this[_0xa757('0xd')]=_0x1acf7d[_0xa757('0xd')]||0x1e;this[_0xa757('0xe')]=_0x1acf7d[_0xa757('0xe')];this['dialCongestionRetryFrequency']=_0x1acf7d['dialCongestionRetryFrequency'];this['dialBusyMaxRetry']=_0x1acf7d['dialBusyMaxRetry'];this['dialBusyRetryFrequency']=_0x1acf7d[_0xa757('0xf')];this['dialNoAnswerMaxRetry']=_0x1acf7d['dialNoAnswerMaxRetry'];this[_0xa757('0x10')]=_0x1acf7d['dialNoAnswerRetryFrequency'];this['dialGlobalMaxRetry']=_0x1acf7d[_0xa757('0x11')];this[_0xa757('0x12')]=_0x1acf7d[_0xa757('0x12')]||_0xa757('0x13');this[_0xa757('0x14')]=_0x1acf7d[_0xa757('0x14')]||undefined;this[_0xa757('0x15')]=_0x1acf7d[_0xa757('0x15')]||undefined;this[_0xa757('0x16')]=_0x1acf7d[_0xa757('0x16')]||undefined;this['TrunkBackup']=_0x1acf7d[_0xa757('0x17')]?_0x1acf7d[_0xa757('0x17')]:undefined;this[_0xa757('0x18')]=_0x1acf7d['Trunk']?_0x1acf7d['Trunk']:undefined;this[_0xa757('0x19')]=_0x1acf7d[_0xa757('0x19')]?_0x1acf7d[_0xa757('0x19')]:undefined;this[_0xa757('0x1a')]=_0x1acf7d[_0xa757('0x1a')]?_0x1acf7d[_0xa757('0x1a')]:undefined;this['dialQueueProject']=_0x1acf7d[_0xa757('0x1a')]?_0x1acf7d['SquareProject'][_0xa757('0x0')]:undefined;this[_0xa757('0x1b')]=_0x1acf7d[_0xa757('0x1b')]||![];this[_0xa757('0x1c')]=_0x1acf7d['dialAMDInitialSilence'];this['dialAMDGreeting']=_0x1acf7d[_0xa757('0x1d')];this[_0xa757('0x1e')]=_0x1acf7d[_0xa757('0x1e')];this[_0xa757('0x1f')]=_0x1acf7d[_0xa757('0x1f')];this[_0xa757('0x20')]=_0x1acf7d[_0xa757('0x20')];this[_0xa757('0x21')]=_0x1acf7d[_0xa757('0x21')];this['dialAMDMaximumNumberOfWords']=_0x1acf7d[_0xa757('0x22')];this['dialAMDSilenceThreshold']=_0x1acf7d[_0xa757('0x23')];this['dialAMDMaximumWordLength']=_0x1acf7d[_0xa757('0x24')];}module[_0xa757('0x25')]=Campaign;
\ No newline at end of file
+var _0xd8b0=['dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDActive','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','name','campaign','originated','temp','ivrAnswerCallsDay','ivrTotalCallsDays','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency'];(function(_0x5a7e3c,_0xdc9219){var _0x59252b=function(_0x29655c){while(--_0x29655c){_0x5a7e3c['push'](_0x5a7e3c['shift']());}};_0x59252b(++_0xdc9219);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';function Campaign(_0x5d04de){this['id']=_0x5d04de['id']||0x0;this[_0x0d8b('0x0')]=_0x5d04de['name']||'';this['type']=_0x5d04de['type']||_0x0d8b('0x1');this[_0x0d8b('0x2')]=0x0;this[_0x0d8b('0x3')]=0x0;this[_0x0d8b('0x4')]=0x0;this[_0x0d8b('0x5')]=0x0;this['message']='';this['sendMessageOneNotActive']=!![];this[_0x0d8b('0x6')]=_0x5d04de[_0x0d8b('0x6')];this[_0x0d8b('0x7')]=_0x5d04de['limitCalls'];this[_0x0d8b('0x8')]=_0x5d04de[_0x0d8b('0x8')]||null;this['dialGlobalInterval']=_0x5d04de[_0x0d8b('0x9')]?_0x5d04de[_0x0d8b('0x9')]:null;this[_0x0d8b('0xa')]=_0x5d04de[_0x0d8b('0xa')];this[_0x0d8b('0xb')]=_0x5d04de[_0x0d8b('0xb')];this[_0x0d8b('0xc')]=_0x5d04de[_0x0d8b('0xc')]||0x1e;this['dialCongestionMaxRetry']=_0x5d04de[_0x0d8b('0xd')];this['dialCongestionRetryFrequency']=_0x5d04de[_0x0d8b('0xe')];this[_0x0d8b('0xf')]=_0x5d04de[_0x0d8b('0xf')];this[_0x0d8b('0x10')]=_0x5d04de[_0x0d8b('0x10')];this[_0x0d8b('0x11')]=_0x5d04de[_0x0d8b('0x11')];this[_0x0d8b('0x12')]=_0x5d04de[_0x0d8b('0x12')];this[_0x0d8b('0x13')]=_0x5d04de[_0x0d8b('0x13')];this[_0x0d8b('0x14')]=_0x5d04de[_0x0d8b('0x14')]||_0x0d8b('0x15');this['dialPrefix']=_0x5d04de[_0x0d8b('0x16')]||undefined;this[_0x0d8b('0x17')]=_0x5d04de[_0x0d8b('0x17')]||undefined;this[_0x0d8b('0x18')]=_0x5d04de[_0x0d8b('0x18')]||undefined;this['TrunkBackup']=_0x5d04de[_0x0d8b('0x19')]?_0x5d04de[_0x0d8b('0x19')]:undefined;this[_0x0d8b('0x1a')]=_0x5d04de[_0x0d8b('0x1a')]?_0x5d04de[_0x0d8b('0x1a')]:undefined;this[_0x0d8b('0x1b')]=_0x5d04de[_0x0d8b('0x1b')]?_0x5d04de[_0x0d8b('0x1b')]:undefined;this['SquareProject']=_0x5d04de[_0x0d8b('0x1c')]?_0x5d04de[_0x0d8b('0x1c')]:undefined;this[_0x0d8b('0x1d')]=_0x5d04de[_0x0d8b('0x1c')]?_0x5d04de[_0x0d8b('0x1c')][_0x0d8b('0x0')]:undefined;this[_0x0d8b('0x1e')]=_0x5d04de[_0x0d8b('0x1e')]||![];this['dialAMDInitialSilence']=_0x5d04de['dialAMDInitialSilence'];this[_0x0d8b('0x1f')]=_0x5d04de['dialAMDGreeting'];this['dialAMDAfterGreetingSilence']=_0x5d04de['dialAMDAfterGreetingSilence'];this[_0x0d8b('0x20')]=_0x5d04de[_0x0d8b('0x20')];this[_0x0d8b('0x21')]=_0x5d04de[_0x0d8b('0x21')];this[_0x0d8b('0x22')]=_0x5d04de[_0x0d8b('0x22')];this[_0x0d8b('0x23')]=_0x5d04de[_0x0d8b('0x23')];this[_0x0d8b('0x24')]=_0x5d04de['dialAMDSilenceThreshold'];this[_0x0d8b('0x25')]=_0x5d04de[_0x0d8b('0x25')];}module['exports']=Campaign;
\ No newline at end of file
diff --git a/server/services/ami/model/channel.js b/server/services/ami/model/channel.js
index 360d39f..c570602 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 _0x753c=['billableseconds','holdtime','type','tag','disposition','monitor','monitorFilename','monitors','transfercalleridnum','mohtime','channel','calleridnum','calleridname','connectedlinenum','connectedlinename','accountcode','context','uniqueid','linkedid','exten','answered','answertime','endtime','unmanaged','abandoned','lastapplication','lastdata','duration'];(function(_0xe470b2,_0x13d3be){var _0x373fd7=function(_0x5c782b){while(--_0x5c782b){_0xe470b2['push'](_0xe470b2['shift']());}};_0x373fd7(++_0x13d3be);}(_0x753c,0x96));var _0xc753=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x753c[_0x432682];return _0x463d05;};'use strict';function Channel(){this['starttime']=null;this[_0xc753('0x0')]='';this['destinationchannel']='';this[_0xc753('0x1')]=0x0;this[_0xc753('0x2')]='';this[_0xc753('0x3')]=undefined;this[_0xc753('0x4')]=undefined;this[_0xc753('0x5')]=0x0;this[_0xc753('0x6')]='';this[_0xc753('0x7')]=0x0;this[_0xc753('0x8')]=0x0;this[_0xc753('0x9')]=0x0;this[_0xc753('0xa')]=![];this[_0xc753('0xb')]=null;this[_0xc753('0xc')]=null;this[_0xc753('0xd')]=![];this[_0xc753('0xe')]=![];this[_0xc753('0xf')]='';this[_0xc753('0x10')]='';this[_0xc753('0x11')]=0x0;this[_0xc753('0x12')]=0x0;this[_0xc753('0x13')]=0x0;this[_0xc753('0x14')]=null;this[_0xc753('0x15')]=null;this[_0xc753('0x16')]=null;this[_0xc753('0x17')]=![];this[_0xc753('0x18')]=null;this['queue']=null;this[_0xc753('0x19')]=[];this[_0xc753('0x1a')]=undefined;this['transferconnectedlinenum']=undefined;this[_0xc753('0x1b')]=0x0;}module['exports']=Channel;
\ No newline at end of file
+var _0x1867=['linkedid','exten','answered','answertime','unmanaged','abandoned','lastdata','duration','billableseconds','holdtime','tag','disposition','monitor','monitorFilename','queue','transfercalleridnum','transferconnectedlinenum','mohtime','exports','starttime','channel','calleridnum','connectedlinenum','connectedlinename','accountcode','context','uniqueid'];(function(_0xc09ab7,_0x13a21c){var _0x425def=function(_0x3a16d7){while(--_0x3a16d7){_0xc09ab7['push'](_0xc09ab7['shift']());}};_0x425def(++_0x13a21c);}(_0x1867,0xb5));var _0x7186=function(_0x191879,_0x29729a){_0x191879=_0x191879-0x0;var _0x2b0998=_0x1867[_0x191879];return _0x2b0998;};'use strict';function Channel(){this[_0x7186('0x0')]=null;this[_0x7186('0x1')]='';this['destinationchannel']='';this[_0x7186('0x2')]=0x0;this['calleridname']='';this[_0x7186('0x3')]=undefined;this[_0x7186('0x4')]=undefined;this[_0x7186('0x5')]=0x0;this[_0x7186('0x6')]='';this[_0x7186('0x7')]=0x0;this[_0x7186('0x8')]=0x0;this[_0x7186('0x9')]=0x0;this[_0x7186('0xa')]=![];this[_0x7186('0xb')]=null;this['endtime']=null;this[_0x7186('0xc')]=![];this[_0x7186('0xd')]=![];this['lastapplication']='';this[_0x7186('0xe')]='';this[_0x7186('0xf')]=0x0;this[_0x7186('0x10')]=0x0;this[_0x7186('0x11')]=0x0;this['type']=null;this[_0x7186('0x12')]=null;this[_0x7186('0x13')]=null;this[_0x7186('0x14')]=![];this[_0x7186('0x15')]=null;this[_0x7186('0x16')]=null;this['monitors']=[];this[_0x7186('0x17')]=undefined;this[_0x7186('0x18')]=undefined;this[_0x7186('0x19')]=0x0;}module[_0x7186('0x1a')]=Channel;
\ No newline at end of file
diff --git a/server/services/ami/model/deskAccount.js b/server/services/ami/model/deskAccount.js
index a7610df..0047c85 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 _0x0c02=['name','username','remoteUri','authType','password','consumerKey','consumerSecret','tokenSecret','type','serverUrl','Configurations'];(function(_0x1aac1d,_0x1dca6c){var _0x140f0d=function(_0x3e4db4){while(--_0x3e4db4){_0x1aac1d['push'](_0x1aac1d['shift']());}};_0x140f0d(++_0x1dca6c);}(_0x0c02,0x84));var _0x20c0=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0c02[_0x3dd15e];return _0x231fd0;};'use strict';function DeskAccount(_0x434f02){this['id']=_0x434f02['id']||0x0;this[_0x20c0('0x0')]=_0x434f02[_0x20c0('0x0')]||'';this['username']=_0x434f02[_0x20c0('0x1')]||'';this[_0x20c0('0x2')]=_0x434f02[_0x20c0('0x2')]||'';this[_0x20c0('0x3')]=_0x434f02[_0x20c0('0x3')]||'';this[_0x20c0('0x4')]=_0x434f02[_0x20c0('0x4')]||'';this[_0x20c0('0x5')]=_0x434f02[_0x20c0('0x5')]||'';this[_0x20c0('0x6')]=_0x434f02['consumerSecret']||'';this['token']=_0x434f02['token']||'';this['tokenSecret']=_0x434f02[_0x20c0('0x7')]||'';this[_0x20c0('0x8')]=_0x434f02[_0x20c0('0x8')]||'';this[_0x20c0('0x9')]=_0x434f02[_0x20c0('0x9')]||'';this[_0x20c0('0xa')]=_0x434f02['Configurations']||{};}module['exports']=DeskAccount;
\ No newline at end of file
+var _0x4403=['serverUrl','Configurations','exports','username','remoteUri','authType','password','consumerSecret','token','tokenSecret','type'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x4403,0x179));var _0x3440=function(_0x10734e,_0x51cadb){_0x10734e=_0x10734e-0x0;var _0x2a059c=_0x4403[_0x10734e];return _0x2a059c;};'use strict';function DeskAccount(_0x5e2430){this['id']=_0x5e2430['id']||0x0;this['name']=_0x5e2430['name']||'';this[_0x3440('0x0')]=_0x5e2430['username']||'';this[_0x3440('0x1')]=_0x5e2430[_0x3440('0x1')]||'';this[_0x3440('0x2')]=_0x5e2430[_0x3440('0x2')]||'';this['password']=_0x5e2430[_0x3440('0x3')]||'';this['consumerKey']=_0x5e2430['consumerKey']||'';this[_0x3440('0x4')]=_0x5e2430[_0x3440('0x4')]||'';this[_0x3440('0x5')]=_0x5e2430['token']||'';this[_0x3440('0x6')]=_0x5e2430['tokenSecret']||'';this[_0x3440('0x7')]=_0x5e2430[_0x3440('0x7')]||'';this[_0x3440('0x8')]=_0x5e2430['serverUrl']||'';this[_0x3440('0x9')]=_0x5e2430[_0x3440('0x9')]||{};}module[_0x3440('0xa')]=DeskAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/dynamics365Account.js b/server/services/ami/model/dynamics365Account.js
index 9b1fe46..2bfaa88 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 _0x141a=['Configurations','name','username','password','remoteUri','tenantId','clientId','clientSecret','serverUrl'];(function(_0x163053,_0x3a51c3){var _0x37877e=function(_0x516f7b){while(--_0x516f7b){_0x163053['push'](_0x163053['shift']());}};_0x37877e(++_0x3a51c3);}(_0x141a,0xa3));var _0xa141=function(_0x576c53,_0x2b81dd){_0x576c53=_0x576c53-0x0;var _0x56a73f=_0x141a[_0x576c53];return _0x56a73f;};'use strict';function Dynamics365Account(_0x3565f2){this['id']=_0x3565f2['id']||0x0;this[_0xa141('0x0')]=_0x3565f2['name']||'';this['username']=_0x3565f2[_0xa141('0x1')]||'';this[_0xa141('0x2')]=_0x3565f2[_0xa141('0x2')]||'';this[_0xa141('0x3')]=_0x3565f2[_0xa141('0x3')]||'';this['tenantId']=_0x3565f2[_0xa141('0x4')]||'';this[_0xa141('0x5')]=_0x3565f2[_0xa141('0x5')]||'';this[_0xa141('0x6')]=_0x3565f2[_0xa141('0x6')]||{};this['serverUrl']=_0x3565f2[_0xa141('0x7')]||'';this[_0xa141('0x8')]=_0x3565f2['Configurations']||{};}module['exports']=Dynamics365Account;
\ No newline at end of file
+var _0x86a8=['clientSecret','serverUrl','Configurations','exports','name','username','password','remoteUri','tenantId','clientId'];(function(_0x210e3e,_0x1dae2c){var _0x4603fe=function(_0x2e4e31){while(--_0x2e4e31){_0x210e3e['push'](_0x210e3e['shift']());}};_0x4603fe(++_0x1dae2c);}(_0x86a8,0x19e));var _0x886a=function(_0x272a7c,_0x51aa28){_0x272a7c=_0x272a7c-0x0;var _0x5e24ca=_0x86a8[_0x272a7c];return _0x5e24ca;};'use strict';function Dynamics365Account(_0x1cd09c){this['id']=_0x1cd09c['id']||0x0;this[_0x886a('0x0')]=_0x1cd09c['name']||'';this[_0x886a('0x1')]=_0x1cd09c['username']||'';this[_0x886a('0x2')]=_0x1cd09c[_0x886a('0x2')]||'';this['remoteUri']=_0x1cd09c[_0x886a('0x3')]||'';this[_0x886a('0x4')]=_0x1cd09c[_0x886a('0x4')]||'';this[_0x886a('0x5')]=_0x1cd09c[_0x886a('0x5')]||'';this[_0x886a('0x6')]=_0x1cd09c[_0x886a('0x6')]||{};this['serverUrl']=_0x1cd09c[_0x886a('0x7')]||'';this[_0x886a('0x8')]=_0x1cd09c[_0x886a('0x8')]||{};}module[_0x886a('0x9')]=Dynamics365Account;
\ No newline at end of file
diff --git a/server/services/ami/model/faxAccount.js b/server/services/ami/model/faxAccount.js
index 0e035ca..9c2292c 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 _0x3408=['headerinfo','localstationid','minrate','maxrate','modem','gateway','t38timeout','tech','SIP','Trunk','key','name','description','ecm'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x3408,0x177));var _0x8340=function(_0x326d7a,_0x357907){_0x326d7a=_0x326d7a-0x0;var _0x27b987=_0x3408[_0x326d7a];return _0x27b987;};'use strict';function FaxAccount(_0x37f584){this['id']=_0x37f584['id']||0x0;this[_0x8340('0x0')]=_0x37f584[_0x8340('0x0')]||'';this[_0x8340('0x1')]=_0x37f584[_0x8340('0x1')];this[_0x8340('0x2')]=_0x37f584[_0x8340('0x2')];this[_0x8340('0x3')]=_0x37f584[_0x8340('0x3')];this[_0x8340('0x4')]=_0x37f584[_0x8340('0x4')];this[_0x8340('0x5')]=_0x37f584[_0x8340('0x5')]||0x960;this[_0x8340('0x6')]=_0x37f584[_0x8340('0x6')]||0x3840;this[_0x8340('0x7')]=_0x37f584[_0x8340('0x7')]||'v17,v27,v29';this[_0x8340('0x8')]=_0x37f584['gateway']||'no';this['faxdetect']=_0x37f584['faxdetect']||'no';this[_0x8340('0x9')]=_0x37f584[_0x8340('0x9')]||0x1388;this[_0x8340('0xa')]=_0x37f584[_0x8340('0xa')]||_0x8340('0xb');this[_0x8340('0xc')]=_0x37f584['Trunk']?_0x37f584[_0x8340('0xc')]:undefined;this['ListId']=_0x37f584['ListId'];this[_0x8340('0xd')]=_0x37f584[_0x8340('0xd')];}module['exports']=FaxAccount;
\ No newline at end of file
+var _0x5e05=['headerinfo','localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect','t38timeout','Trunk','ListId','key','description','ecm'];(function(_0x3f0b2a,_0x52f963){var _0x23bd63=function(_0x238936){while(--_0x238936){_0x3f0b2a['push'](_0x3f0b2a['shift']());}};_0x23bd63(++_0x52f963);}(_0x5e05,0x8a));var _0x55e0=function(_0x2d7b7d,_0x1110dc){_0x2d7b7d=_0x2d7b7d-0x0;var _0x552e03=_0x5e05[_0x2d7b7d];return _0x552e03;};'use strict';function FaxAccount(_0x50bbf7){this['id']=_0x50bbf7['id']||0x0;this['name']=_0x50bbf7['name']||'';this[_0x55e0('0x0')]=_0x50bbf7[_0x55e0('0x0')];this[_0x55e0('0x1')]=_0x50bbf7[_0x55e0('0x1')];this[_0x55e0('0x2')]=_0x50bbf7[_0x55e0('0x2')];this['localstationid']=_0x50bbf7[_0x55e0('0x3')];this[_0x55e0('0x4')]=_0x50bbf7[_0x55e0('0x4')]||0x960;this[_0x55e0('0x5')]=_0x50bbf7[_0x55e0('0x5')]||0x3840;this[_0x55e0('0x6')]=_0x50bbf7['modem']||_0x55e0('0x7');this[_0x55e0('0x8')]=_0x50bbf7[_0x55e0('0x8')]||'no';this[_0x55e0('0x9')]=_0x50bbf7['faxdetect']||'no';this[_0x55e0('0xa')]=_0x50bbf7[_0x55e0('0xa')]||0x1388;this['tech']=_0x50bbf7['tech']||'SIP';this['Trunk']=_0x50bbf7[_0x55e0('0xb')]?_0x50bbf7[_0x55e0('0xb')]:undefined;this[_0x55e0('0xc')]=_0x50bbf7[_0x55e0('0xc')];this[_0x55e0('0xd')]=_0x50bbf7['key'];}module['exports']=FaxAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/freshdeskAccount.js b/server/services/ami/model/freshdeskAccount.js
index fe2d1d1..0c6acc1 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 _0x0140=['username','apiKey','token','remoteUri','serverUrl','Configurations','name'];(function(_0xd897e4,_0x11e197){var _0x43b275=function(_0x1e3f40){while(--_0x1e3f40){_0xd897e4['push'](_0xd897e4['shift']());}};_0x43b275(++_0x11e197);}(_0x0140,0x180));var _0x0014=function(_0x4e7d25,_0x58285f){_0x4e7d25=_0x4e7d25-0x0;var _0x526fe6=_0x0140[_0x4e7d25];return _0x526fe6;};'use strict';function FreshdeskAccount(_0x429690){this['id']=_0x429690['id']||0x0;this[_0x0014('0x0')]=_0x429690['name']||'';this[_0x0014('0x1')]=_0x429690[_0x0014('0x1')]||'';this[_0x0014('0x2')]=_0x429690[_0x0014('0x3')]||'';this['remoteUri']=_0x429690[_0x0014('0x4')]||'';this['serverUrl']=_0x429690[_0x0014('0x5')]||'';this[_0x0014('0x6')]=_0x429690['Configurations']||{};}module['exports']=FreshdeskAccount;
\ No newline at end of file
+var _0xd230=['serverUrl','Configurations','exports','name','username','token','remoteUri'];(function(_0x3ff972,_0x47f092){var _0x195e2a=function(_0x1f15a8){while(--_0x1f15a8){_0x3ff972['push'](_0x3ff972['shift']());}};_0x195e2a(++_0x47f092);}(_0xd230,0x16f));var _0x0d23=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0xd230[_0x387777];return _0x3f84c0;};'use strict';function FreshdeskAccount(_0x1db698){this['id']=_0x1db698['id']||0x0;this[_0x0d23('0x0')]=_0x1db698[_0x0d23('0x0')]||'';this['username']=_0x1db698[_0x0d23('0x1')]||'';this['apiKey']=_0x1db698[_0x0d23('0x2')]||'';this['remoteUri']=_0x1db698[_0x0d23('0x3')]||'';this[_0x0d23('0x4')]=_0x1db698[_0x0d23('0x4')]||'';this[_0x0d23('0x5')]=_0x1db698['Configurations']||{};}module[_0x0d23('0x6')]=FreshdeskAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/freshsalesAccount.js b/server/services/ami/model/freshsalesAccount.js
index e641689..7b4bb4e 100644
--- a/server/services/ami/model/freshsalesAccount.js
+++ b/server/services/ami/model/freshsalesAccount.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbc5f=['token','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbc5f,0x140));var _0xfbc5=function(_0xb7ca22,_0x990f7a){_0xb7ca22=_0xb7ca22-0x0;var _0x498ae8=_0xbc5f[_0xb7ca22];return _0x498ae8;};'use strict';function FreshsalesAccount(_0x9a623d){this['id']=_0x9a623d['id']||0x0;this[_0xfbc5('0x0')]=_0x9a623d[_0xfbc5('0x0')]||'';this[_0xfbc5('0x1')]=_0x9a623d['username']||'';this['apiKey']=_0x9a623d[_0xfbc5('0x2')]||'';this['remoteUri']=_0x9a623d[_0xfbc5('0x3')]||'';this[_0xfbc5('0x4')]=_0x9a623d[_0xfbc5('0x4')]||'';this[_0xfbc5('0x5')]=_0x9a623d[_0xfbc5('0x5')]||{};}module[_0xfbc5('0x6')]=FreshsalesAccount;
\ No newline at end of file
+var _0x678b=['apiKey','token','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0x678b,0x7e));var _0xb678=function(_0x10b2d5,_0x5a7743){_0x10b2d5=_0x10b2d5-0x0;var _0x14b8d1=_0x678b[_0x10b2d5];return _0x14b8d1;};'use strict';function FreshsalesAccount(_0x30e56f){this['id']=_0x30e56f['id']||0x0;this['name']=_0x30e56f[_0xb678('0x0')]||'';this[_0xb678('0x1')]=_0x30e56f[_0xb678('0x1')]||'';this[_0xb678('0x2')]=_0x30e56f[_0xb678('0x3')]||'';this['remoteUri']=_0x30e56f[_0xb678('0x4')]||'';this[_0xb678('0x5')]=_0x30e56f[_0xb678('0x5')]||'';this['Configurations']=_0x30e56f[_0xb678('0x6')]||{};}module[_0xb678('0x7')]=FreshsalesAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/queueReport.js b/server/services/ami/model/queueReport.js
index b4bb65c..e802767 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 _0xbe34=['connectedlinenum','connectedlinename','accountcode','exten','holdtime','assigned','lastAssignedTo','mohtime','variables','exports','inbound','uniqueid','calleridnum','calleridname','queuecallerjoinAt','queuecallerleaveAt','position','count','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','originalposition','channel'];(function(_0x110ea8,_0xacb6fa){var _0x4073cf=function(_0x444fcb){while(--_0x444fcb){_0x110ea8['push'](_0x110ea8['shift']());}};_0x4073cf(++_0xacb6fa);}(_0xbe34,0x15a));var _0x4be3=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xbe34[_0x40a045];return _0x1a687c;};'use strict';function QueueReport(){this['type']=_0x4be3('0x0');this[_0x4be3('0x1')]='';this[_0x4be3('0x2')]='';this[_0x4be3('0x3')]='';this['queue']='';this[_0x4be3('0x4')]=null;this[_0x4be3('0x5')]=null;this[_0x4be3('0x6')]=0x1;this[_0x4be3('0x7')]=0x1;this['queuecallerabandon']=![];this['queuecallerabandonAt']=null;this[_0x4be3('0x8')]=![];this[_0x4be3('0x9')]=null;this[_0x4be3('0xa')]=![];this[_0x4be3('0xb')]=null;this[_0x4be3('0xc')]=0x1;this[_0x4be3('0xd')]='';this[_0x4be3('0xe')]='';this[_0x4be3('0xf')]='';this[_0x4be3('0x10')]='';this['context']='';this[_0x4be3('0x11')]='';this['priority']='';this[_0x4be3('0x12')]=0x0;this[_0x4be3('0x13')]=![];this[_0x4be3('0x14')]='';this[_0x4be3('0x15')]=0x0;this[_0x4be3('0x16')]={};}module[_0x4be3('0x17')]=QueueReport;
\ No newline at end of file
+var _0x2e3c=['queuecallerjoinAt','queuecallerleaveAt','position','count','queuecallerabandon','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','channel','connectedlinename','accountcode','context','exten','priority','assigned','lastAssignedTo','variables','exports','type','inbound','uniqueid','calleridnum'];(function(_0x28762c,_0x2625e7){var _0x441a0b=function(_0x298b03){while(--_0x298b03){_0x28762c['push'](_0x28762c['shift']());}};_0x441a0b(++_0x2625e7);}(_0x2e3c,0x1b1));var _0xc2e3=function(_0x38ab01,_0x4a377b){_0x38ab01=_0x38ab01-0x0;var _0x34d70b=_0x2e3c[_0x38ab01];return _0x34d70b;};'use strict';function QueueReport(){this[_0xc2e3('0x0')]=_0xc2e3('0x1');this[_0xc2e3('0x2')]='';this[_0xc2e3('0x3')]='';this['calleridname']='';this['queue']='';this[_0xc2e3('0x4')]=null;this[_0xc2e3('0x5')]=null;this[_0xc2e3('0x6')]=0x1;this[_0xc2e3('0x7')]=0x1;this[_0xc2e3('0x8')]=![];this['queuecallerabandonAt']=null;this[_0xc2e3('0x9')]=![];this[_0xc2e3('0xa')]=null;this[_0xc2e3('0xb')]=![];this[_0xc2e3('0xc')]=null;this['originalposition']=0x1;this[_0xc2e3('0xd')]='';this['connectedlinenum']='';this[_0xc2e3('0xe')]='';this[_0xc2e3('0xf')]='';this[_0xc2e3('0x10')]='';this[_0xc2e3('0x11')]='';this[_0xc2e3('0x12')]='';this['holdtime']=0x0;this[_0xc2e3('0x13')]=![];this[_0xc2e3('0x14')]='';this['mohtime']=0x0;this[_0xc2e3('0x15')]={};}module[_0xc2e3('0x16')]=QueueReport;
\ No newline at end of file
diff --git a/server/services/ami/model/salesforceAccount.js b/server/services/ami/model/salesforceAccount.js
index dca682f..68cab24 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 _0x8f32=['name','username','remoteUri','password','securityToken','type','integrationTab','serverUrl','Configurations','exports'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x8f32,0x14a));var _0x28f3=function(_0x312d69,_0x17efd2){_0x312d69=_0x312d69-0x0;var _0x1b4177=_0x8f32[_0x312d69];return _0x1b4177;};'use strict';function SalesforceAccount(_0x4ba47c){this['id']=_0x4ba47c['id']||0x0;this['name']=_0x4ba47c[_0x28f3('0x0')]||'';this[_0x28f3('0x1')]=_0x4ba47c[_0x28f3('0x1')]||'';this[_0x28f3('0x2')]=_0x4ba47c[_0x28f3('0x2')]||'';this[_0x28f3('0x3')]=_0x4ba47c['password']||'';this['clientId']=_0x4ba47c['clientId']||'';this['clientSecret']=_0x4ba47c['clientSecret']||'';this[_0x28f3('0x4')]=_0x4ba47c[_0x28f3('0x4')]||'';this['type']=_0x4ba47c[_0x28f3('0x5')]||_0x28f3('0x6');this['serverUrl']=_0x4ba47c[_0x28f3('0x7')]||'';this['Configurations']=_0x4ba47c[_0x28f3('0x8')]||{};}module[_0x28f3('0x9')]=SalesforceAccount;
\ No newline at end of file
+var _0x41ea=['integrationTab','serverUrl','Configurations','exports','name','username','remoteUri','password','clientSecret','securityToken','type'];(function(_0x49b207,_0x408ade){var _0x2dc8fa=function(_0x150975){while(--_0x150975){_0x49b207['push'](_0x49b207['shift']());}};_0x2dc8fa(++_0x408ade);}(_0x41ea,0x138));var _0xa41e=function(_0xae5e48,_0x330fce){_0xae5e48=_0xae5e48-0x0;var _0x47d3bf=_0x41ea[_0xae5e48];return _0x47d3bf;};'use strict';function SalesforceAccount(_0x21b7e0){this['id']=_0x21b7e0['id']||0x0;this[_0xa41e('0x0')]=_0x21b7e0[_0xa41e('0x0')]||'';this[_0xa41e('0x1')]=_0x21b7e0[_0xa41e('0x1')]||'';this['remoteUri']=_0x21b7e0[_0xa41e('0x2')]||'';this[_0xa41e('0x3')]=_0x21b7e0[_0xa41e('0x3')]||'';this['clientId']=_0x21b7e0['clientId']||'';this['clientSecret']=_0x21b7e0[_0xa41e('0x4')]||'';this[_0xa41e('0x5')]=_0x21b7e0[_0xa41e('0x5')]||'';this[_0xa41e('0x6')]=_0x21b7e0[_0xa41e('0x6')]||_0xa41e('0x7');this[_0xa41e('0x8')]=_0x21b7e0[_0xa41e('0x8')]||'';this['Configurations']=_0x21b7e0[_0xa41e('0x9')]||{};}module[_0xa41e('0xa')]=SalesforceAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/servicenowAccount.js b/server/services/ami/model/servicenowAccount.js
index 8554e22..5502b04 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 _0x8f12=['name','username','password','remoteUri','serverUrl','Configurations','exports'];(function(_0x275054,_0x19838b){var _0x2691b2=function(_0x37020){while(--_0x37020){_0x275054['push'](_0x275054['shift']());}};_0x2691b2(++_0x19838b);}(_0x8f12,0x196));var _0x28f1=function(_0x5a778b,_0x717daa){_0x5a778b=_0x5a778b-0x0;var _0x32f0da=_0x8f12[_0x5a778b];return _0x32f0da;};'use strict';function ServicenowAccount(_0x515e0a){this['id']=_0x515e0a['id']||0x0;this[_0x28f1('0x0')]=_0x515e0a['name']||'';this[_0x28f1('0x1')]=_0x515e0a[_0x28f1('0x1')]||'';this[_0x28f1('0x2')]=_0x515e0a['password']||'';this[_0x28f1('0x3')]=_0x515e0a[_0x28f1('0x3')]||'';this[_0x28f1('0x4')]=_0x515e0a[_0x28f1('0x4')]||'';this[_0x28f1('0x5')]=_0x515e0a[_0x28f1('0x5')]||{};}module[_0x28f1('0x6')]=ServicenowAccount;
\ No newline at end of file
+var _0xebdc=['remoteUri','serverUrl','Configurations','exports','name','username','password'];(function(_0x2ac04f,_0x509ce0){var _0x127e3d=function(_0x38cd44){while(--_0x38cd44){_0x2ac04f['push'](_0x2ac04f['shift']());}};_0x127e3d(++_0x509ce0);}(_0xebdc,0x1b6));var _0xcebd=function(_0x45b841,_0x2c08ca){_0x45b841=_0x45b841-0x0;var _0x2e4de7=_0xebdc[_0x45b841];return _0x2e4de7;};'use strict';function ServicenowAccount(_0xc2c47e){this['id']=_0xc2c47e['id']||0x0;this['name']=_0xc2c47e[_0xcebd('0x0')]||'';this[_0xcebd('0x1')]=_0xc2c47e['username']||'';this['password']=_0xc2c47e[_0xcebd('0x2')]||'';this[_0xcebd('0x3')]=_0xc2c47e[_0xcebd('0x3')]||'';this['serverUrl']=_0xc2c47e[_0xcebd('0x4')]||'';this[_0xcebd('0x5')]=_0xc2c47e[_0xcebd('0x5')]||{};}module[_0xcebd('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 03b34ed..016ff64 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 _0x77af=['password','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x77af,0x71));var _0xf77a=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x77af[_0x2dafbe];return _0x58a45a;};'use strict';function SugarcrmAccount(_0x572de1){this['id']=_0x572de1['id']||0x0;this[_0xf77a('0x0')]=_0x572de1[_0xf77a('0x0')]||'';this['username']=_0x572de1['username']||'';this[_0xf77a('0x1')]=_0x572de1[_0xf77a('0x1')]||'';this[_0xf77a('0x2')]=_0x572de1['remoteUri']||'';this['serverUrl']=_0x572de1[_0xf77a('0x3')]||'';this[_0xf77a('0x4')]=_0x572de1['Configurations']||{};}module[_0xf77a('0x5')]=SugarcrmAccount;
\ No newline at end of file
+var _0xcdaf=['username','password','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x17b6e3,_0x4522ed){var _0x3906f3=function(_0x430f87){while(--_0x430f87){_0x17b6e3['push'](_0x17b6e3['shift']());}};_0x3906f3(++_0x4522ed);}(_0xcdaf,0xd8));var _0xfcda=function(_0x564c9c,_0x30b3dc){_0x564c9c=_0x564c9c-0x0;var _0x82635e=_0xcdaf[_0x564c9c];return _0x82635e;};'use strict';function SugarcrmAccount(_0x4b6215){this['id']=_0x4b6215['id']||0x0;this[_0xfcda('0x0')]=_0x4b6215[_0xfcda('0x0')]||'';this[_0xfcda('0x1')]=_0x4b6215[_0xfcda('0x1')]||'';this[_0xfcda('0x2')]=_0x4b6215[_0xfcda('0x2')]||'';this[_0xfcda('0x3')]=_0x4b6215[_0xfcda('0x3')]||'';this[_0xfcda('0x4')]=_0x4b6215['serverUrl']||'';this[_0xfcda('0x5')]=_0x4b6215[_0xfcda('0x5')]||{};}module[_0xfcda('0x6')]=SugarcrmAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/telephone.js b/server/services/ami/model/telephone.js
index c8ffb49..ae70773 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 _0xf5d4=['state','unknown','stateTime','status','address','name','accountcode'];(function(_0x13ead4,_0x293dd2){var _0x4a7247=function(_0x1913bd){while(--_0x1913bd){_0x13ead4['push'](_0x13ead4['shift']());}};_0x4a7247(++_0x293dd2);}(_0xf5d4,0xad));var _0x4f5d=function(_0x1b3ec1,_0x35c76a){_0x1b3ec1=_0x1b3ec1-0x0;var _0x26d30b=_0xf5d4[_0x1b3ec1];return _0x26d30b;};'use strict';function Telephone(_0x1f48ea){this['id']=_0x1f48ea['id']||0x0;this[_0x4f5d('0x0')]=_0x1f48ea[_0x4f5d('0x0')]||'';this['accountcode']=_0x1f48ea[_0x4f5d('0x1')]||'';this[_0x4f5d('0x2')]=_0x4f5d('0x3');this[_0x4f5d('0x4')]=0x0;this[_0x4f5d('0x5')]='unknown';this[_0x4f5d('0x6')]='';}module['exports']=Telephone;
\ No newline at end of file
+var _0xb8ce=['exports','accountcode','state','unknown','status'];(function(_0x35c7cc,_0x20a644){var _0x19dc86=function(_0x2bbf46){while(--_0x2bbf46){_0x35c7cc['push'](_0x35c7cc['shift']());}};_0x19dc86(++_0x20a644);}(_0xb8ce,0x1aa));var _0xeb8c=function(_0x5da641,_0x2de7b5){_0x5da641=_0x5da641-0x0;var _0x4ec934=_0xb8ce[_0x5da641];return _0x4ec934;};'use strict';function Telephone(_0xf4547c){this['id']=_0xf4547c['id']||0x0;this['name']=_0xf4547c['name']||'';this[_0xeb8c('0x0')]=_0xf4547c[_0xeb8c('0x0')]||'';this[_0xeb8c('0x1')]=_0xeb8c('0x2');this['stateTime']=0x0;this[_0xeb8c('0x3')]=_0xeb8c('0x2');this['address']='';}module[_0xeb8c('0x4')]=Telephone;
\ No newline at end of file
diff --git a/server/services/ami/model/template.js b/server/services/ami/model/template.js
index 480e218..144fa31 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 _0x7409=['exports','name','html'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7409,0x64));var _0x9740=function(_0x8e2d4d,_0x310930){_0x8e2d4d=_0x8e2d4d-0x0;var _0x5e3047=_0x7409[_0x8e2d4d];return _0x5e3047;};'use strict';function template(_0x5183ac){this['id']=_0x5183ac['id']||0x0;this[_0x9740('0x0')]=_0x5183ac[_0x9740('0x0')]||'';this[_0x9740('0x1')]=_0x5183ac['html']||'';}module[_0x9740('0x2')]=template;
\ No newline at end of file
+var _0x1aca=['exports','name','html'];(function(_0x256d6a,_0x2f002f){var _0x460058=function(_0x195be7){while(--_0x195be7){_0x256d6a['push'](_0x256d6a['shift']());}};_0x460058(++_0x2f002f);}(_0x1aca,0x19f));var _0xa1ac=function(_0x43b487,_0x21893a){_0x43b487=_0x43b487-0x0;var _0x2f707a=_0x1aca[_0x43b487];return _0x2f707a;};'use strict';function template(_0x430c48){this['id']=_0x430c48['id']||0x0;this[_0xa1ac('0x0')]=_0x430c48[_0xa1ac('0x0')]||'';this[_0xa1ac('0x1')]=_0x430c48[_0xa1ac('0x1')]||'';}module[_0xa1ac('0x2')]=template;
\ No newline at end of file
diff --git a/server/services/ami/model/trigger.js b/server/services/ami/model/trigger.js
index d5525fd..cdc4f67 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 _0xa41a=['AnyConditions','Actions','name','channel','voice','status','AllConditions'];(function(_0x2cab96,_0x9a1bbc){var _0x517cc0=function(_0x4f56cd){while(--_0x4f56cd){_0x2cab96['push'](_0x2cab96['shift']());}};_0x517cc0(++_0x9a1bbc);}(_0xa41a,0x6b));var _0xaa41=function(_0x8ecc5c,_0x462d90){_0x8ecc5c=_0x8ecc5c-0x0;var _0x3275e5=_0xa41a[_0x8ecc5c];return _0x3275e5;};'use strict';function Trigger(_0x33e667){this['id']=_0x33e667['id']||0x0;this[_0xaa41('0x0')]=_0x33e667['name']||'';this[_0xaa41('0x1')]=_0x33e667[_0xaa41('0x1')]||_0xaa41('0x2');this[_0xaa41('0x3')]=_0x33e667[_0xaa41('0x3')]||![];this[_0xaa41('0x4')]=_0x33e667[_0xaa41('0x4')]||[];this[_0xaa41('0x5')]=_0x33e667['AnyConditions']||[];this[_0xaa41('0x6')]=_0x33e667[_0xaa41('0x6')]||[];}module['exports']=Trigger;
\ No newline at end of file
+var _0x008c=['name','channel','status','AllConditions','AnyConditions','Actions','exports'];(function(_0x305d8c,_0x153576){var _0x1e6143=function(_0x30913b){while(--_0x30913b){_0x305d8c['push'](_0x305d8c['shift']());}};_0x1e6143(++_0x153576);}(_0x008c,0x188));var _0xc008=function(_0x42184d,_0x264f92){_0x42184d=_0x42184d-0x0;var _0x144722=_0x008c[_0x42184d];return _0x144722;};'use strict';function Trigger(_0x2be4ba){this['id']=_0x2be4ba['id']||0x0;this[_0xc008('0x0')]=_0x2be4ba[_0xc008('0x0')]||'';this[_0xc008('0x1')]=_0x2be4ba[_0xc008('0x1')]||'voice';this[_0xc008('0x2')]=_0x2be4ba[_0xc008('0x2')]||![];this[_0xc008('0x3')]=_0x2be4ba[_0xc008('0x3')]||[];this[_0xc008('0x4')]=_0x2be4ba[_0xc008('0x4')]||[];this[_0xc008('0x5')]=_0x2be4ba[_0xc008('0x5')]||[];}module[_0xc008('0x6')]=Trigger;
\ No newline at end of file
diff --git a/server/services/ami/model/trunk.js b/server/services/ami/model/trunk.js
index 64b0563..f16cc4d 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 _0x801f=['stateTime','status','unknown','registry','indexOf','split','host','domain','stateRegistry','registrationtime','address','active','name','state'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x801f,0x13f));var _0xf801=function(_0x5375cc,_0xe3f11a){_0x5375cc=_0x5375cc-0x0;var _0x8d92bc=_0x801f[_0x5375cc];return _0x8d92bc;};'use strict';function Trunk(_0x3e3d4c){this['id']=_0x3e3d4c['id']||0x0;this[_0xf801('0x0')]=_0x3e3d4c[_0xf801('0x0')]||![];this[_0xf801('0x1')]=_0x3e3d4c[_0xf801('0x1')]||'';this[_0xf801('0x2')]='unknown';this[_0xf801('0x3')]=0x0;this[_0xf801('0x4')]=_0xf801('0x5');this['registry']=_0x3e3d4c['registry']&&_0x3e3d4c[_0xf801('0x6')][_0xf801('0x7')](':')?_0x3e3d4c[_0xf801('0x6')][_0xf801('0x8')](':')[0x0]:'';this[_0xf801('0x9')]='';this['port']='';this[_0xf801('0xa')]='';this['domainport']='';this['refresh']='';this[_0xf801('0xb')]=_0xf801('0x5');this[_0xf801('0xc')]='';this[_0xf801('0xd')]='';}module['exports']=Trunk;
\ No newline at end of file
+var _0xcf82=['domainport','refresh','stateRegistry','address','exports','active','name','state','unknown','stateTime','status','registry','indexOf','split','port','domain'];(function(_0x37b67e,_0x2c3ceb){var _0x2072bf=function(_0x4f2d2b){while(--_0x4f2d2b){_0x37b67e['push'](_0x37b67e['shift']());}};_0x2072bf(++_0x2c3ceb);}(_0xcf82,0x165));var _0x2cf8=function(_0x42977e,_0x4e7963){_0x42977e=_0x42977e-0x0;var _0x29eca9=_0xcf82[_0x42977e];return _0x29eca9;};'use strict';function Trunk(_0xad4697){this['id']=_0xad4697['id']||0x0;this[_0x2cf8('0x0')]=_0xad4697[_0x2cf8('0x0')]||![];this[_0x2cf8('0x1')]=_0xad4697['name']||'';this[_0x2cf8('0x2')]=_0x2cf8('0x3');this[_0x2cf8('0x4')]=0x0;this[_0x2cf8('0x5')]=_0x2cf8('0x3');this[_0x2cf8('0x6')]=_0xad4697[_0x2cf8('0x6')]&&_0xad4697[_0x2cf8('0x6')][_0x2cf8('0x7')](':')?_0xad4697[_0x2cf8('0x6')][_0x2cf8('0x8')](':')[0x0]:'';this['host']='';this[_0x2cf8('0x9')]='';this[_0x2cf8('0xa')]='';this[_0x2cf8('0xb')]='';this[_0x2cf8('0xc')]='';this[_0x2cf8('0xd')]=_0x2cf8('0x3');this['registrationtime']='';this[_0x2cf8('0xe')]='';}module[_0x2cf8('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 266742a..8c7982c 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 _0xa4e0=['none','mandatoryDisposition','exports','exten','recordingFormat'];(function(_0x17522e,_0x11213d){var _0x4e2576=function(_0x112b32){while(--_0x112b32){_0x17522e['push'](_0x17522e['shift']());}};_0x4e2576(++_0x11213d);}(_0xa4e0,0xa8));var _0x0a4e=function(_0x28b3d7,_0x17b41d){_0x28b3d7=_0x28b3d7-0x0;var _0x49619d=_0xa4e0[_0x28b3d7];return _0x49619d;};'use strict';function voiceExtension(_0x5953db){this['id']=_0x5953db['id']||0x0;this[_0x0a4e('0x0')]=_0x5953db['exten']||'';this[_0x0a4e('0x1')]=_0x5953db[_0x0a4e('0x1')]||_0x0a4e('0x2');this[_0x0a4e('0x3')]=_0x5953db['mandatoryDisposition']||![];}module[_0x0a4e('0x4')]=voiceExtension;
\ No newline at end of file
+var _0x8946=['mandatoryDisposition','exten','recordingFormat','none'];(function(_0x46db2c,_0x1da848){var _0xaafba4=function(_0x12123b){while(--_0x12123b){_0x46db2c['push'](_0x46db2c['shift']());}};_0xaafba4(++_0x1da848);}(_0x8946,0x195));var _0x6894=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0x8946[_0x413feb];return _0x40ee88;};'use strict';function voiceExtension(_0x5adec4){this['id']=_0x5adec4['id']||0x0;this[_0x6894('0x0')]=_0x5adec4[_0x6894('0x0')]||'';this[_0x6894('0x1')]=_0x5adec4[_0x6894('0x1')]||_0x6894('0x2');this['mandatoryDisposition']=_0x5adec4[_0x6894('0x3')]||![];}module['exports']=voiceExtension;
\ No newline at end of file
diff --git a/server/services/ami/model/voiceQueue.js b/server/services/ami/model/voiceQueue.js
index 89f95cb..8922ae0 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 _0x47c2=['dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','timeout','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundReCallsDay','outboundAbandonedDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalErlangCalls','predictiveIntervalHitRate','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','unknown','not_inuse','busy','invalid','unavailable','onhold','wav','wav49','gsm','rrmemory','roundrobin','name','monitor_format','type','inbound','talking','sumDuration','sumHoldTime','unmanaged','abandoned','loggedIn','available','acw','acwTimeout','autopause','sendMessageOneNotActive','message','originated','dialTimezone','dialGlobalInterval','dialActive','dialMethod','dialLimitQueue','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval'];(function(_0x51169f,_0x4cd8ce){var _0x4cf36b=function(_0x18c56f){while(--_0x18c56f){_0x51169f['push'](_0x51169f['shift']());}};_0x4cf36b(++_0x4cd8ce);}(_0x47c2,0x11c));var _0x247c=function(_0x443316,_0x286c90){_0x443316=_0x443316-0x0;var _0x187fed=_0x47c2[_0x443316];return _0x187fed;};'use strict';var statusDesc=[_0x247c('0x0'),_0x247c('0x1'),'inuse',_0x247c('0x2'),_0x247c('0x3'),_0x247c('0x4'),'ringing','ringinuse',_0x247c('0x5')];var monitorFormat={'wav':_0x247c('0x6'),'wav49':_0x247c('0x7'),'gsm':_0x247c('0x8')};var strategy={'rrmemory':_0x247c('0x9'),'roundrobin':_0x247c('0xa')};function VoiceQueue(_0x550045){this['id']=_0x550045['id']||0x0;this[_0x247c('0xb')]=_0x550045[_0x247c('0xb')]||'';this['monitor_format']=_0x550045[_0x247c('0xc')]||'';this[_0x247c('0xd')]=_0x550045['type']||_0x247c('0xe');this['waiting']=0x0;this[_0x247c('0xf')]=0x0;this['total']=0x0;this['answered']=0x0;this[_0x247c('0x10')]=0x0;this[_0x247c('0x11')]=0x0;this['sumBillable']=0x0;this[_0x247c('0x12')]=0x0;this[_0x247c('0x13')]=0x0;this[_0x247c('0x14')]=0x0;this[_0x247c('0x15')]=0x0;this[_0x247c('0x16')]=_0x550045[_0x247c('0x16')]||![];this[_0x247c('0x17')]=_0x550045[_0x247c('0x17')]||0xa;this[_0x247c('0x18')]=_0x550045['autopause']||'no';this[_0x247c('0x19')]=!![];this[_0x247c('0x1a')]='';this[_0x247c('0x1b')]=0x0;this['temp']=0x0;this['dialTimezone']=_0x550045[_0x247c('0x1c')]||null;this[_0x247c('0x1d')]=_0x550045[_0x247c('0x1d')]?_0x550045[_0x247c('0x1d')]:null;this[_0x247c('0x1e')]=_0x550045[_0x247c('0x1e')];this[_0x247c('0x1f')]=_0x550045[_0x247c('0x1f')]||'progressive';this['dialLimitChannel']=_0x550045['dialLimitChannel']||0x0;this[_0x247c('0x20')]=_0x550045['dialLimitQueue']||0x0;this['dialPowerLevel']=_0x550045['dialPowerLevel']||0x1;this['dialPredictiveOptimization']=_0x550045[_0x247c('0x21')]||_0x247c('0x22');this[_0x247c('0x23')]=_0x550045[_0x247c('0x23')]||0.03;this[_0x247c('0x24')]=_0x550045[_0x247c('0x24')]||0x258;this['dialOriginateCallerIdName']=_0x550045[_0x247c('0x25')]||_0x247c('0x26');this[_0x247c('0x27')]=_0x550045[_0x247c('0x27')]||'anonymous';this[_0x247c('0x28')]=_0x550045['dialOriginateTimeout']||0x1e;this[_0x247c('0x29')]=_0x550045['dialQueueOptions']||'tTxX';this[_0x247c('0x2a')]=_0x550045[_0x247c('0x2a')]||0x3;this[_0x247c('0x2b')]=_0x550045[_0x247c('0x2b')]||undefined;this[_0x247c('0x2c')]=_0x550045[_0x247c('0x2c')]||0x3;this[_0x247c('0x2d')]=_0x550045[_0x247c('0x2d')]||0x96;this[_0x247c('0x2e')]=_0x550045[_0x247c('0x2e')]||0x3;this[_0x247c('0x2f')]=_0x550045[_0x247c('0x2f')]||0x96;this[_0x247c('0x30')]=_0x550045[_0x247c('0x30')]||0x3;this[_0x247c('0x31')]=_0x550045[_0x247c('0x31')]||0x96;this['dialNoSuchNumberMaxRetry']=_0x550045['dialNoSuchNumberMaxRetry']||0x3;this['dialNoSuchNumberRetryFrequency']=_0x550045[_0x247c('0x32')]||0x96;this[_0x247c('0x33')]=_0x550045['dialDropMaxRetry']||0x3;this['dialDropRetryFrequency']=_0x550045[_0x247c('0x34')]||0x96;this[_0x247c('0x35')]=_0x550045[_0x247c('0x35')]||0x3;this['dialAbandonedRetryFrequency']=_0x550045[_0x247c('0x36')]||0x96;this[_0x247c('0x37')]=_0x550045['dialMachineMaxRetry']||0x3;this['dialMachineRetryFrequency']=_0x550045[_0x247c('0x38')]||0x96;this['dialAgentRejectMaxRetry']=_0x550045[_0x247c('0x39')]||0x3;this['dialAgentRejectRetryFrequency']=_0x550045[_0x247c('0x3a')]||0x96;this['dialGlobalMaxRetry']=_0x550045[_0x247c('0x3b')]||0x4;this[_0x247c('0x3c')]=_0x550045[_0x247c('0x3c')]?_0x550045['Trunk']:undefined;this[_0x247c('0x3d')]=_0x550045[_0x247c('0x3d')]?_0x550045['TrunkBackup']:undefined;this[_0x247c('0x3e')]=_0x550045[_0x247c('0x3e')]||undefined;this[_0x247c('0x3f')]=_0x550045['Interval']?_0x550045['Interval']:undefined;this[_0x247c('0x40')]=_0x550045[_0x247c('0x40')]||_0x247c('0x41');this[_0x247c('0x42')]=_0x550045[_0x247c('0x42')]||undefined;this[_0x247c('0x43')]=_0x550045[_0x247c('0x43')]||undefined;this[_0x247c('0x44')]=strategy[_0x550045[_0x247c('0x44')]]||_0x247c('0x9');this[_0x247c('0x45')]=!![];this[_0x247c('0x46')]=_0x550045['dialAMDActive']||![];this['dialAMDInitialSilence']=_0x550045[_0x247c('0x47')];this[_0x247c('0x48')]=_0x550045[_0x247c('0x48')];this[_0x247c('0x49')]=_0x550045[_0x247c('0x49')];this[_0x247c('0x4a')]=_0x550045['dialAMDTotalAnalysisTime'];this['dialAMDMinWordLength']=_0x550045['dialAMDMinWordLength'];this[_0x247c('0x4b')]=_0x550045[_0x247c('0x4b')];this['dialAMDMaximumNumberOfWords']=_0x550045[_0x247c('0x4c')];this[_0x247c('0x4d')]=_0x550045[_0x247c('0x4d')];this[_0x247c('0x4e')]=_0x550045[_0x247c('0x4e')];this[_0x247c('0x4f')]=0x0;this['pTalking']=0x0;this['timeout']=_0x550045[_0x247c('0x50')];this['outboundAnswerCallsDay']=0x0;this[_0x247c('0x51')]=0x0;this[_0x247c('0x52')]=0x0;this[_0x247c('0x53')]=0x0;this[_0x247c('0x54')]=0x0;this[_0x247c('0x55')]=0x0;this['outboundUnknownCallsDay']=0x0;this[_0x247c('0x56')]=0x0;this[_0x247c('0x57')]=0x0;this['outboundDropCallsDayCallersExit']=0x0;this[_0x247c('0x58')]=0x0;this[_0x247c('0x59')]=0x0;this[_0x247c('0x5a')]=0x0;this[_0x247c('0x5b')]=0x0;this[_0x247c('0x5c')]=undefined;this[_0x247c('0x5d')]=undefined;this[_0x247c('0x5e')]=undefined;this[_0x247c('0x5f')]=1.05;this[_0x247c('0x60')]=0x0;this[_0x247c('0x61')]=0x0;this[_0x247c('0x62')]=0x0;this[_0x247c('0x63')]=0x0;this[_0x247c('0x64')]=0x0;this['predictiveIntervalAvgTalktime']=0x0;this[_0x247c('0x65')]=0x0;this[_0x247c('0x66')]=0x0;this['predictiveIntervalMaxThreshold']=_0x550045['dialPredictiveIntervalMaxThreshold']||0x14;this['predictiveIntervalMinThreshold']=_0x550045['dialPredictiveIntervalMaxThreshold']||0xa;this[_0x247c('0x67')]=0x0;this['predictiveIntervalErlangCallsDroppedCalls']=0x0;this[_0x247c('0x68')]=0x1;this[_0x247c('0x69')]=0x0;this[_0x247c('0x6a')]=0x0;this[_0x247c('0x6b')]=0x0;this[_0x247c('0x6c')]=0x0;this[_0x247c('0x6d')]=_0x550045[_0x247c('0x6d')]||0x1e;this[_0x247c('0x6e')]=_0x550045[_0x247c('0x6e')]||![];this['dialQueueProject2']=_0x550045[_0x247c('0x6f')]||undefined;this[_0x247c('0x70')]=_0x550045[_0x247c('0x70')]||![];this[_0x247c('0x71')]=_0x550045['dialAgiAfterHangupAgent']||![];this[_0x247c('0xc')]=monitorFormat[_0x550045[_0x247c('0xc')]]?monitorFormat[_0x550045[_0x247c('0xc')]]:undefined;this[_0x247c('0x72')]=_0x550045[_0x247c('0x72')]||![];this[_0x247c('0x73')]=_0x550045[_0x247c('0x73')]?_0x550045['mandatoryDispositionPause']:undefined;}module['exports']=VoiceQueue;
\ No newline at end of file
+var _0x3eb4=['outboundBusyCallsDay','outboundUnknownCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundReCallsDay','startProgressive','handlePredictive','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCallToSecond','erlangAbandonmentRate','dialRecallMeTimeout','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','exports','unknown','not_inuse','busy','invalid','ringinuse','gsm','roundrobin','name','monitor_format','type','inbound','waiting','talking','total','answered','sumDuration','sumHoldTime','unmanaged','abandoned','loggedIn','available','acw','acwTimeout','autopause','sendMessageOneNotActive','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialGlobalMaxRetry','Trunk','TrunkBackup','Interval','dialOrderByScheduledAt','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','rrmemory','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay'];(function(_0x11005e,_0x20c3d2){var _0x29338f=function(_0x3384e9){while(--_0x3384e9){_0x11005e['push'](_0x11005e['shift']());}};_0x29338f(++_0x20c3d2);}(_0x3eb4,0x1dc));var _0x43eb=function(_0x415d90,_0x55544a){_0x415d90=_0x415d90-0x0;var _0x40a1d7=_0x3eb4[_0x415d90];return _0x40a1d7;};'use strict';var statusDesc=[_0x43eb('0x0'),_0x43eb('0x1'),'inuse',_0x43eb('0x2'),_0x43eb('0x3'),'unavailable','ringing',_0x43eb('0x4'),'onhold'];var monitorFormat={'wav':'wav','wav49':'wav49','gsm':_0x43eb('0x5')};var strategy={'rrmemory':'rrmemory','roundrobin':_0x43eb('0x6')};function VoiceQueue(_0x132f56){this['id']=_0x132f56['id']||0x0;this['name']=_0x132f56[_0x43eb('0x7')]||'';this[_0x43eb('0x8')]=_0x132f56[_0x43eb('0x8')]||'';this[_0x43eb('0x9')]=_0x132f56['type']||_0x43eb('0xa');this[_0x43eb('0xb')]=0x0;this[_0x43eb('0xc')]=0x0;this[_0x43eb('0xd')]=0x0;this[_0x43eb('0xe')]=0x0;this[_0x43eb('0xf')]=0x0;this[_0x43eb('0x10')]=0x0;this['sumBillable']=0x0;this[_0x43eb('0x11')]=0x0;this[_0x43eb('0x12')]=0x0;this[_0x43eb('0x13')]=0x0;this[_0x43eb('0x14')]=0x0;this[_0x43eb('0x15')]=_0x132f56[_0x43eb('0x15')]||![];this[_0x43eb('0x16')]=_0x132f56[_0x43eb('0x16')]||0xa;this[_0x43eb('0x17')]=_0x132f56[_0x43eb('0x17')]||'no';this[_0x43eb('0x18')]=!![];this['message']='';this[_0x43eb('0x19')]=0x0;this[_0x43eb('0x1a')]=0x0;this['dialTimezone']=_0x132f56[_0x43eb('0x1b')]||null;this[_0x43eb('0x1c')]=_0x132f56[_0x43eb('0x1c')]?_0x132f56[_0x43eb('0x1c')]:null;this[_0x43eb('0x1d')]=_0x132f56[_0x43eb('0x1d')];this['dialMethod']=_0x132f56[_0x43eb('0x1e')]||'progressive';this[_0x43eb('0x1f')]=_0x132f56[_0x43eb('0x1f')]||0x0;this['dialLimitQueue']=_0x132f56[_0x43eb('0x20')]||0x0;this['dialPowerLevel']=_0x132f56[_0x43eb('0x21')]||0x1;this[_0x43eb('0x22')]=_0x132f56[_0x43eb('0x22')]||_0x43eb('0x23');this[_0x43eb('0x24')]=_0x132f56[_0x43eb('0x24')]||0.03;this[_0x43eb('0x25')]=_0x132f56['dialPredictiveInterval']||0x258;this[_0x43eb('0x26')]=_0x132f56['dialOriginateCallerIdName']||_0x43eb('0x27');this[_0x43eb('0x28')]=_0x132f56[_0x43eb('0x28')]||'anonymous';this[_0x43eb('0x29')]=_0x132f56['dialOriginateTimeout']||0x1e;this[_0x43eb('0x2a')]=_0x132f56[_0x43eb('0x2a')]||_0x43eb('0x2b');this[_0x43eb('0x2c')]=_0x132f56['dialQueueTimeout']||0x3;this[_0x43eb('0x2d')]=_0x132f56[_0x43eb('0x2d')]||undefined;this[_0x43eb('0x2e')]=_0x132f56[_0x43eb('0x2e')]||0x3;this[_0x43eb('0x2f')]=_0x132f56[_0x43eb('0x2f')]||0x96;this['dialBusyMaxRetry']=_0x132f56['dialBusyMaxRetry']||0x3;this[_0x43eb('0x30')]=_0x132f56[_0x43eb('0x30')]||0x96;this[_0x43eb('0x31')]=_0x132f56['dialNoAnswerMaxRetry']||0x3;this[_0x43eb('0x32')]=_0x132f56[_0x43eb('0x32')]||0x96;this[_0x43eb('0x33')]=_0x132f56[_0x43eb('0x33')]||0x3;this['dialNoSuchNumberRetryFrequency']=_0x132f56[_0x43eb('0x34')]||0x96;this[_0x43eb('0x35')]=_0x132f56['dialDropMaxRetry']||0x3;this[_0x43eb('0x36')]=_0x132f56[_0x43eb('0x36')]||0x96;this[_0x43eb('0x37')]=_0x132f56[_0x43eb('0x37')]||0x3;this['dialAbandonedRetryFrequency']=_0x132f56['dialAbandonedRetryFrequency']||0x96;this[_0x43eb('0x38')]=_0x132f56['dialMachineMaxRetry']||0x3;this[_0x43eb('0x39')]=_0x132f56[_0x43eb('0x39')]||0x96;this[_0x43eb('0x3a')]=_0x132f56[_0x43eb('0x3a')]||0x3;this['dialAgentRejectRetryFrequency']=_0x132f56['dialAgentRejectRetryFrequency']||0x96;this[_0x43eb('0x3b')]=_0x132f56['dialGlobalMaxRetry']||0x4;this[_0x43eb('0x3c')]=_0x132f56[_0x43eb('0x3c')]?_0x132f56[_0x43eb('0x3c')]:undefined;this[_0x43eb('0x3d')]=_0x132f56[_0x43eb('0x3d')]?_0x132f56[_0x43eb('0x3d')]:undefined;this['dialPrefix']=_0x132f56['dialPrefix']||undefined;this['Interval']=_0x132f56[_0x43eb('0x3e')]?_0x132f56['Interval']:undefined;this[_0x43eb('0x3f')]=_0x132f56[_0x43eb('0x3f')]||'DESC';this['dialRandomLastDigitCallerIdNumber']=_0x132f56[_0x43eb('0x40')]||undefined;this[_0x43eb('0x41')]=_0x132f56['dialCutDigit']||undefined;this[_0x43eb('0x42')]=strategy[_0x132f56['strategy']]||_0x43eb('0x43');this[_0x43eb('0x44')]=!![];this['dialAMDActive']=_0x132f56[_0x43eb('0x45')]||![];this[_0x43eb('0x46')]=_0x132f56[_0x43eb('0x46')];this['dialAMDGreeting']=_0x132f56[_0x43eb('0x47')];this['dialAMDAfterGreetingSilence']=_0x132f56[_0x43eb('0x48')];this[_0x43eb('0x49')]=_0x132f56[_0x43eb('0x49')];this[_0x43eb('0x4a')]=_0x132f56['dialAMDMinWordLength'];this[_0x43eb('0x4b')]=_0x132f56[_0x43eb('0x4b')];this['dialAMDMaximumNumberOfWords']=_0x132f56[_0x43eb('0x4c')];this[_0x43eb('0x4d')]=_0x132f56[_0x43eb('0x4d')];this['dialAMDMaximumWordLength']=_0x132f56[_0x43eb('0x4e')];this['outboundRejectCallsDay']=0x0;this[_0x43eb('0x4f')]=0x0;this[_0x43eb('0x50')]=_0x132f56[_0x43eb('0x50')];this[_0x43eb('0x51')]=0x0;this[_0x43eb('0x52')]=0x0;this[_0x43eb('0x53')]=0x0;this[_0x43eb('0x54')]=0x0;this['outboundCongestionCallsDay']=0x0;this['outboundNoSuchCallsDay']=0x0;this[_0x43eb('0x55')]=0x0;this['outboundBlacklistCallsDay']=0x0;this[_0x43eb('0x56')]=0x0;this[_0x43eb('0x57')]=0x0;this[_0x43eb('0x58')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0x43eb('0x59')]=0x0;this['outboundAbandonedDay']=0x0;this[_0x43eb('0x5a')]=undefined;this['startPredictive']=undefined;this[_0x43eb('0x5b')]=undefined;this['predictiveIntervalMultiplicativeFactor']=1.05;this['predictiveIntervalTotalCalls']=0x0;this[_0x43eb('0x5c')]=0x0;this[_0x43eb('0x5d')]=0x0;this['predictiveIntervalDroppedCallsTimeout']=0x0;this[_0x43eb('0x5e')]=0x0;this[_0x43eb('0x5f')]=0x0;this[_0x43eb('0x60')]=0x0;this[_0x43eb('0x61')]=0x0;this[_0x43eb('0x62')]=_0x132f56[_0x43eb('0x63')]||0x14;this[_0x43eb('0x64')]=_0x132f56[_0x43eb('0x63')]||0xa;this['predictiveIntervalErlangCalls']=0x0;this[_0x43eb('0x65')]=0x0;this[_0x43eb('0x66')]=0x1;this['erlangCalls']=0x0;this[_0x43eb('0x67')]=0x0;this[_0x43eb('0x68')]=0x0;this['erlangBusyFactor']=0x0;this[_0x43eb('0x69')]=_0x132f56[_0x43eb('0x69')]||0x1e;this[_0x43eb('0x6a')]=_0x132f56[_0x43eb('0x6a')]||![];this[_0x43eb('0x6b')]=_0x132f56['dialQueueProject2']||undefined;this['dialAgiAfterHangupClient']=_0x132f56['dialAgiAfterHangupClient']||![];this[_0x43eb('0x6c')]=_0x132f56['dialAgiAfterHangupAgent']||![];this[_0x43eb('0x8')]=monitorFormat[_0x132f56['monitor_format']]?monitorFormat[_0x132f56[_0x43eb('0x8')]]:undefined;this[_0x43eb('0x6d')]=_0x132f56[_0x43eb('0x6d')]||![];this[_0x43eb('0x6e')]=_0x132f56['mandatoryDispositionPause']?_0x132f56[_0x43eb('0x6e')]:undefined;}module[_0x43eb('0x6f')]=VoiceQueue;
\ No newline at end of file
diff --git a/server/services/ami/model/vtigerAccount.js b/server/services/ami/model/vtigerAccount.js
index 6ad3383..b6e902d 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 _0x1c40=['accessKey','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x66a065,_0x2e2eec){var _0x28bb95=function(_0x39ed4b){while(--_0x39ed4b){_0x66a065['push'](_0x66a065['shift']());}};_0x28bb95(++_0x2e2eec);}(_0x1c40,0x139));var _0x01c4=function(_0x58afd5,_0x534a48){_0x58afd5=_0x58afd5-0x0;var _0x3e503b=_0x1c40[_0x58afd5];return _0x3e503b;};'use strict';function VtigerAccount(_0x2cd165){this['id']=_0x2cd165['id']||0x0;this['name']=_0x2cd165[_0x01c4('0x0')]||'';this['username']=_0x2cd165[_0x01c4('0x1')]||'';this[_0x01c4('0x2')]=_0x2cd165['accessKey']||'';this[_0x01c4('0x3')]=_0x2cd165[_0x01c4('0x3')]||'';this[_0x01c4('0x4')]=_0x2cd165['serverUrl']||'';this['Configurations']=_0x2cd165[_0x01c4('0x5')]||{};}module[_0x01c4('0x6')]=VtigerAccount;
\ No newline at end of file
+var _0xa871=['exports','name','username','remoteUri','serverUrl','Configurations'];(function(_0x12fc8d,_0x19ee33){var _0x3f9d04=function(_0x52e51c){while(--_0x52e51c){_0x12fc8d['push'](_0x12fc8d['shift']());}};_0x3f9d04(++_0x19ee33);}(_0xa871,0xaf));var _0x1a87=function(_0x15d18f,_0x126b0e){_0x15d18f=_0x15d18f-0x0;var _0xd12bf7=_0xa871[_0x15d18f];return _0xd12bf7;};'use strict';function VtigerAccount(_0x16e20c){this['id']=_0x16e20c['id']||0x0;this[_0x1a87('0x0')]=_0x16e20c[_0x1a87('0x0')]||'';this['username']=_0x16e20c[_0x1a87('0x1')]||'';this['accessKey']=_0x16e20c['accessKey']||'';this[_0x1a87('0x2')]=_0x16e20c[_0x1a87('0x2')]||'';this[_0x1a87('0x3')]=_0x16e20c['serverUrl']||'';this[_0x1a87('0x4')]=_0x16e20c[_0x1a87('0x4')]||{};}module[_0x1a87('0x5')]=VtigerAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/zendeskAccount.js b/server/services/ami/model/zendeskAccount.js
index d384a03..0300a1e 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 _0x5f2f=['authType','type','integrationTab','serverUrl','Configurations','name','username','password','token','remoteUri'];(function(_0x442ac1,_0x4c5bdc){var _0x30c4c6=function(_0x44a97d){while(--_0x44a97d){_0x442ac1['push'](_0x442ac1['shift']());}};_0x30c4c6(++_0x4c5bdc);}(_0x5f2f,0x73));var _0xf5f2=function(_0x2fcd0c,_0xe4db7d){_0x2fcd0c=_0x2fcd0c-0x0;var _0x18230c=_0x5f2f[_0x2fcd0c];return _0x18230c;};'use strict';function ZendeskAccount(_0x7c86d8){this['id']=_0x7c86d8['id']||0x0;this[_0xf5f2('0x0')]=_0x7c86d8[_0xf5f2('0x0')]||'';this[_0xf5f2('0x1')]=_0x7c86d8[_0xf5f2('0x1')]||'';this[_0xf5f2('0x2')]=_0x7c86d8[_0xf5f2('0x2')]||'';this[_0xf5f2('0x3')]=_0x7c86d8['token']||'';this['remoteUri']=_0x7c86d8[_0xf5f2('0x4')]||'';this[_0xf5f2('0x5')]=_0x7c86d8[_0xf5f2('0x5')]||'';this[_0xf5f2('0x6')]=_0x7c86d8[_0xf5f2('0x6')]||_0xf5f2('0x7');this['serverUrl']=_0x7c86d8[_0xf5f2('0x8')]||'';this[_0xf5f2('0x9')]=_0x7c86d8[_0xf5f2('0x9')]||{};}module['exports']=ZendeskAccount;
\ No newline at end of file
+var _0xadb5=['token','remoteUri','authType','type','integrationTab','serverUrl','Configurations','exports','name','username','password'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xadb5,0xad));var _0x5adb=function(_0x187f3b,_0x1a3955){_0x187f3b=_0x187f3b-0x0;var _0x31e96b=_0xadb5[_0x187f3b];return _0x31e96b;};'use strict';function ZendeskAccount(_0x1f969c){this['id']=_0x1f969c['id']||0x0;this[_0x5adb('0x0')]=_0x1f969c['name']||'';this[_0x5adb('0x1')]=_0x1f969c[_0x5adb('0x1')]||'';this[_0x5adb('0x2')]=_0x1f969c['password']||'';this[_0x5adb('0x3')]=_0x1f969c[_0x5adb('0x3')]||'';this[_0x5adb('0x4')]=_0x1f969c['remoteUri']||'';this[_0x5adb('0x5')]=_0x1f969c[_0x5adb('0x5')]||'';this[_0x5adb('0x6')]=_0x1f969c[_0x5adb('0x6')]||_0x5adb('0x7');this[_0x5adb('0x8')]=_0x1f969c[_0x5adb('0x8')]||'';this[_0x5adb('0x9')]=_0x1f969c[_0x5adb('0x9')]||{};}module[_0x5adb('0xa')]=ZendeskAccount;
\ No newline at end of file
diff --git a/server/services/ami/model/zohoAccount.js b/server/services/ami/model/zohoAccount.js
index 32ebbe6..c7899cd 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 _0x9ab9=['clientSecret','serverUrl','code','refreshToken','Configurations','exports','name','description','host','zone','clientId'];(function(_0x1cbd9c,_0x215752){var _0x1a6561=function(_0x3f94be){while(--_0x3f94be){_0x1cbd9c['push'](_0x1cbd9c['shift']());}};_0x1a6561(++_0x215752);}(_0x9ab9,0x19d));var _0x99ab=function(_0x584a80,_0x320c25){_0x584a80=_0x584a80-0x0;var _0x170069=_0x9ab9[_0x584a80];return _0x170069;};'use strict';function ZohoAccount(_0x5f428c){this['id']=_0x5f428c['id']||0x0;this[_0x99ab('0x0')]=_0x5f428c[_0x99ab('0x0')]||'';this[_0x99ab('0x1')]=_0x5f428c[_0x99ab('0x1')]||'';this['host']=_0x5f428c[_0x99ab('0x2')]||'';this[_0x99ab('0x3')]=_0x5f428c['zone']||'';this[_0x99ab('0x4')]=_0x5f428c['clientId']||'';this[_0x99ab('0x5')]=_0x5f428c[_0x99ab('0x5')]||'';this[_0x99ab('0x6')]=_0x5f428c[_0x99ab('0x6')]||'';this[_0x99ab('0x7')]=_0x5f428c['code']||'';this['refreshToken']=_0x5f428c[_0x99ab('0x8')]||'';this[_0x99ab('0x9')]=_0x5f428c['Configurations']||{};}module[_0x99ab('0xa')]=ZohoAccount;
\ No newline at end of file
+var _0x9c9b=['code','refreshToken','Configurations','exports','name','description','host','zone','clientSecret','serverUrl'];(function(_0x3fe6b5,_0x356359){var _0x10c32d=function(_0x12dcd0){while(--_0x12dcd0){_0x3fe6b5['push'](_0x3fe6b5['shift']());}};_0x10c32d(++_0x356359);}(_0x9c9b,0x194));var _0xb9c9=function(_0x37e1f1,_0x4c2b49){_0x37e1f1=_0x37e1f1-0x0;var _0x445373=_0x9c9b[_0x37e1f1];return _0x445373;};'use strict';function ZohoAccount(_0x1592f2){this['id']=_0x1592f2['id']||0x0;this[_0xb9c9('0x0')]=_0x1592f2[_0xb9c9('0x0')]||'';this[_0xb9c9('0x1')]=_0x1592f2[_0xb9c9('0x1')]||'';this[_0xb9c9('0x2')]=_0x1592f2['host']||'';this[_0xb9c9('0x3')]=_0x1592f2[_0xb9c9('0x3')]||'';this['clientId']=_0x1592f2['clientId']||'';this['clientSecret']=_0x1592f2[_0xb9c9('0x4')]||'';this[_0xb9c9('0x5')]=_0x1592f2[_0xb9c9('0x5')]||'';this[_0xb9c9('0x6')]=_0x1592f2[_0xb9c9('0x6')]||'';this[_0xb9c9('0x7')]=_0x1592f2[_0xb9c9('0x7')]||'';this[_0xb9c9('0x8')]=_0x1592f2[_0xb9c9('0x8')]||{};}module[_0xb9c9('0x9')]=ZohoAccount;
\ No newline at end of file
diff --git a/server/services/ami/preview/action.js b/server/services/ami/preview/action.js
index 9b779a2..c3bf47e 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 _0xa53c=['isNil','string','idContact','queue','name','type','campaigntype','dialAnswer','membername','Agent','channelAgent','format','SIP/%s','calleridname','Contact','phone','firstName','active','calleridnum','scheduledat','countbusyretry','countnoanswerretry','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','callback','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','prototype','getCaller','\x22%s\x22\x20<%s>','number','exports','util','moment'];(function(_0x4239af,_0x36c8ed){var _0x31391a=function(_0x5ca7c7){while(--_0x5ca7c7){_0x4239af['push'](_0x4239af['shift']());}};_0x31391a(++_0x36c8ed);}(_0xa53c,0x15e));var _0xca53=function(_0x4c83cc,_0x45753d){_0x4c83cc=_0x4c83cc-0x0;var _0x466bd8=_0xa53c[_0x4c83cc];return _0x466bd8;};'use strict';var util=require(_0xca53('0x0'));var _=require('lodash');var moment=require(_0xca53('0x1'));function checkNameSurname(_0x262fa6,_0x1746f3,_0x1cb13e){var _0x5178d5='';if(!_[_0xca53('0x2')](_0x1746f3)&&_0xca53('0x3')===typeof _0x1746f3){_0x5178d5+=_0x1746f3;}if(!_[_0xca53('0x2')](_0x1cb13e)&&'string'===typeof _0x1cb13e){_0x5178d5+='\x20'+_0x1cb13e;}if(_0x5178d5!==''){return _0x5178d5;}return _0x262fa6;}function Action(_0x14ebeb,_0x4770e9,_0x24a2b5,_0x1067e0,_0x51f58c){this['uniqueid']=_0x24a2b5||undefined;this[_0xca53('0x4')]=_0x14ebeb['id'];this[_0xca53('0x5')]=_0x4770e9[_0xca53('0x6')];this[_0xca53('0x7')]=_0x4770e9[_0xca53('0x7')];this[_0xca53('0x8')]='queue';this[_0xca53('0x9')]=![];this[_0xca53('0xa')]=_[_0xca53('0x2')](_0x14ebeb[_0xca53('0xb')])?undefined:_0x14ebeb[_0xca53('0xb')][_0xca53('0x6')];this[_0xca53('0xc')]=this['membername']?util[_0xca53('0xd')](_0xca53('0xe'),this[_0xca53('0xa')]):_0x1067e0||undefined;this[_0xca53('0xf')]=checkNameSurname(_0x14ebeb[_0xca53('0x10')][_0xca53('0x11')],_0x14ebeb['Contact'][_0xca53('0x12')],_0x14ebeb[_0xca53('0x10')]['lastName']);this[_0xca53('0x13')]=_0x14ebeb[_0xca53('0x13')]||![];this[_0xca53('0x14')]=_0x14ebeb['Contact']['phone'];this[_0xca53('0x15')]=_0x14ebeb[_0xca53('0x15')];this[_0xca53('0x16')]=_0x14ebeb['countbusyretry']||0x0;this['countcongestionretry']=_0x14ebeb['countcongestionretry']||0x0;this['countnoanswerretry']=_0x14ebeb[_0xca53('0x17')]||0x0;this['countglobal']=(_0x14ebeb[_0xca53('0x16')]||0x0)+(_0x14ebeb[_0xca53('0x18')]||0x0)+(_0x14ebeb[_0xca53('0x17')]||0x0);this['countnosuchnumberretry']=_0x14ebeb[_0xca53('0x19')]||0x0;this[_0xca53('0x1a')]=_0x14ebeb['countdropretry']||0x0;this[_0xca53('0x1b')]=_0x14ebeb['countabandonedretry']||0x0;this[_0xca53('0x1c')]=_0x14ebeb[_0xca53('0x1c')]||0x0;this[_0xca53('0x1d')]=_0x14ebeb['countagentrejectretry']||0x0;this[_0xca53('0x1e')]=_0x14ebeb[_0xca53('0x1e')];this['callbackuniqueid']=_0x14ebeb['callbackuniqueid'];this[_0xca53('0x1f')]=_0x14ebeb[_0xca53('0x1f')];this[_0xca53('0x20')]=_0x14ebeb[_0xca53('0x20')];this[_0xca53('0x21')]=_0x14ebeb[_0xca53('0x21')];this[_0xca53('0x22')]=_0x14ebeb[_0xca53('0x22')];this[_0xca53('0x23')]=_[_0xca53('0x2')](_0x14ebeb[_0xca53('0xb')])?_0x14ebeb[_0xca53('0x23')]:_0x14ebeb[_0xca53('0xb')]['id'];this[_0xca53('0x24')]=_0x14ebeb['VoiceQueueId'];this[_0xca53('0x25')]='';this[_0xca53('0x26')]='';}Action[_0xca53('0x27')][_0xca53('0x28')]=function(){return util[_0xca53('0xd')](_0xca53('0x29'),this[_0xca53('0xf')],this[_0xca53('0x2a')]);};module[_0xca53('0x2b')]=Action;
\ No newline at end of file
+var _0x930a=['countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','getCaller','format','\x22%s\x22\x20<%s>','exports','lodash','moment','isNil','string','uniqueid','idContact','queue','name','type','campaigntype','dialAnswer','membername','Agent','channelAgent','SIP/%s','calleridname','Contact','active','calleridnum','phone','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry'];(function(_0xf83277,_0x55487e){var _0x361e0e=function(_0xa2b602){while(--_0xa2b602){_0xf83277['push'](_0xf83277['shift']());}};_0x361e0e(++_0x55487e);}(_0x930a,0x1c0));var _0xa930=function(_0x599f41,_0x4db732){_0x599f41=_0x599f41-0x0;var _0x2e4d58=_0x930a[_0x599f41];return _0x2e4d58;};'use strict';var util=require('util');var _=require(_0xa930('0x0'));var moment=require(_0xa930('0x1'));function checkNameSurname(_0x32250d,_0x1c251f,_0xbb3c9b){var _0x4efc59='';if(!_[_0xa930('0x2')](_0x1c251f)&&_0xa930('0x3')===typeof _0x1c251f){_0x4efc59+=_0x1c251f;}if(!_[_0xa930('0x2')](_0xbb3c9b)&&_0xa930('0x3')===typeof _0xbb3c9b){_0x4efc59+='\x20'+_0xbb3c9b;}if(_0x4efc59!==''){return _0x4efc59;}return _0x32250d;}function Action(_0x17605c,_0x1ad783,_0x422cf5,_0xb31099,_0x3dd042){this[_0xa930('0x4')]=_0x422cf5||undefined;this[_0xa930('0x5')]=_0x17605c['id'];this[_0xa930('0x6')]=_0x1ad783[_0xa930('0x7')];this[_0xa930('0x8')]=_0x1ad783[_0xa930('0x8')];this[_0xa930('0x9')]=_0xa930('0x6');this[_0xa930('0xa')]=![];this[_0xa930('0xb')]=_[_0xa930('0x2')](_0x17605c[_0xa930('0xc')])?undefined:_0x17605c[_0xa930('0xc')]['name'];this[_0xa930('0xd')]=this['membername']?util['format'](_0xa930('0xe'),this['membername']):_0xb31099||undefined;this[_0xa930('0xf')]=checkNameSurname(_0x17605c['Contact']['phone'],_0x17605c[_0xa930('0x10')]['firstName'],_0x17605c['Contact']['lastName']);this[_0xa930('0x11')]=_0x17605c[_0xa930('0x11')]||![];this[_0xa930('0x12')]=_0x17605c['Contact'][_0xa930('0x13')];this[_0xa930('0x14')]=_0x17605c['scheduledat'];this[_0xa930('0x15')]=_0x17605c['countbusyretry']||0x0;this[_0xa930('0x16')]=_0x17605c[_0xa930('0x16')]||0x0;this[_0xa930('0x17')]=_0x17605c[_0xa930('0x17')]||0x0;this['countglobal']=(_0x17605c[_0xa930('0x15')]||0x0)+(_0x17605c[_0xa930('0x16')]||0x0)+(_0x17605c['countnoanswerretry']||0x0);this[_0xa930('0x18')]=_0x17605c[_0xa930('0x18')]||0x0;this[_0xa930('0x19')]=_0x17605c[_0xa930('0x19')]||0x0;this[_0xa930('0x1a')]=_0x17605c[_0xa930('0x1a')]||0x0;this['countmachineretry']=_0x17605c[_0xa930('0x1b')]||0x0;this['countagentrejectretry']=_0x17605c[_0xa930('0x1c')]||0x0;this[_0xa930('0x1d')]=_0x17605c[_0xa930('0x1d')];this[_0xa930('0x1e')]=_0x17605c['callbackuniqueid'];this[_0xa930('0x1f')]=_0x17605c[_0xa930('0x1f')];this['recallme']=_0x17605c[_0xa930('0x20')];this[_0xa930('0x21')]=_0x17605c[_0xa930('0x21')];this['ListId']=_0x17605c[_0xa930('0x22')];this['UserId']=_[_0xa930('0x2')](_0x17605c['Agent'])?_0x17605c[_0xa930('0x23')]:_0x17605c[_0xa930('0xc')]['id'];this[_0xa930('0x24')]=_0x17605c[_0xa930('0x24')];this[_0xa930('0x25')]='';this[_0xa930('0x26')]='';}Action['prototype'][_0xa930('0x27')]=function(){return util[_0xa930('0x28')](_0xa930('0x29'),this['calleridname'],this['number']);};module[_0xa930('0x2a')]=Action;
\ No newline at end of file
diff --git a/server/services/ami/preview/index.js b/server/services/ami/preview/index.js
index a461438..8fe2aec 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 _0x5616=['scheduledAt','dialNoAnswerRetryFrequency','CONGESTION','outboundCongestionCallsDay','countcongestionretry','Congestion','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','dialCongestionMaxRetry','CANCEL','countagentrejectretry','AgentReject','[callProgressDetectingCustomer][logAgentReject]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','outboundAbandonedCallsDay','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','dialAbandonedMaxRety','dialAbandonedRetryFrequency','[default]','outboundUnknownCallsDay','dialstatus','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','linkedid','[callProgressDetectingCustomer]','\x20Queue','originated:\x20','destlinkedid','callProgressDetectingAgent','object','reason','logAgent','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','checkInBlack','Contact','phone','Contact\x20is\x20undefined','lookAgent','isEmpty','Queue:\x20','\x20IdHopper:\x20','idContact','called','Calling','Call\x20failed','logBlacklist','createHistory','[Blacklist][error]','SIP/%s','status','reachable','execRun','unlock','unlockContact','validateContact','isValid','checkIsBlackList','[Preview][checkIsBlackList]','Call\x20unsuccessful','[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','Trunk\x20not\x20work','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','execCall','trim','dialCutDigit','substring','SIP/%s/%s%s','getCallerId','dialRandomLastDigitCallerIdNumber','originatecalleridname','extractCalleridName','originatecalleridnum','toLowerVariables','YYYY-MM-DD\x20HH:mm:ss','variablesAction','[originated][increment]','OriginateError','[originateFailure][logOriginateFailure]','actionid','clone','responsetime','isFailure','custom:agentringnoanswer','rejected','[callProgressDetectingAgent][logAnswer]','[syncHangup][talking]','cause','[syncHangup][talking][cause]','dialQueueProject','channelstate','isUndefined','transfer','[syncHangup][talking][transfer]','destuniqueid','variables','variable','keys','value','error','[syncVarSet][Preview]','inspect','syncAttendedTransfer','transfertargetlinkedid','transfererlinkedid','exports','util','bluebird','uuid','moment','md5','ioredis','../../../config/environment','../../../config/logger','preview','actionPreview','../ami','./action','./util/util','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','finally','sequence','campaignsPreview','voiceQueues','trunks','agents','clockClearZombieChannels','syncOriginateResponse','bind','hangup','syncHangup','hanguprequest','syncHangupRequest','dialend','syncDialEnd','newexten','syncNewExten','varset','syncVarSet','blindtransfer','syncBlindTransfer','emit','outbound','name','strategy','available','loggedIn','pTalking','sumBillable','sumDuration','sumHoldTime','total','type','unmanaged','waiting','loggedInDb','dialActive','dialMethod','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundDropCallsDayACS','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundReCallsDay','outboundRejectCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','message','originated','erlangCalls','erlangAbandonmentRate','erlangBusyFactor','startPredictive','Trunk','active','callerid','Interval','voice:queue:%s','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','stringify','format','voice_queue_channel:remove','sendMessageOneNotActive','paused','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','IS_DISACTIVED','syncCampaigns','booked','setMessage','recallMe','clearZombieChannel','isNil','[clearZombieChannels][talking]','Queue','queue','actions','pTalking:\x20','dialAnswer','pick','contactId','UserId','VoiceQueueId','ListId','Action','channel','catch','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','decrementTalkink','[Dialer][checkChannel][pTalking][Preview]','loggerError','info','size','hasOwnProperty','agentReadyId','then','length','scheduledat','dialRecallMeTimeout','Agent','run','logger2','[RecallMe]','disableContact','starttime','logCustomer','RecallInQueue','rescheduleContactInQueue','createCustomerHistory','RecallFailedTimeout','[HistoryRecallClose]','[getContactRecallMe]','IsNotLoggedIn','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','TRUNK_IS_NOT_REACHABLE','ACTIVE','callProgressDetectingCustomer','countnosuchnumberretry','countglobal','totalGlobal','NoSuchNumber','[callProgressDetectingCustomer][logNoSuch]','dialGlobalMaxRetry','cloneAction','Global','createCustomerFinal','[callProgressDetectingCustomer][logNoSuchGlobal]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','unlockAgent','ANSWER','answertime','[syncHangup][talking][increment]','uniqueid','custom:agentconnect','buildObj','connect','custom:agentConnectPreview','buildAcw','custom:agentcomplete','complete','answered','Answer','crateCustomerReportQueue','talktime','[syncHangup][talking][decrement]','countbusyretry','Busy','[callProgressDetectingCustomer][logBusy]','[callProgressDetectingCustomer][logBusyGlobal]','dialBusyMaxRetry','rescheduleContact','dialBusyRetryFrequency','activeContact','NOANSWER','countnoanswerretry','NoAnswer','[callProgressDetectingCustomer][logNoAnswer]','[callProgressDetectingCustomer][logNoAnswerGlobal]','dialNoAnswerMaxRetry'];(function(_0x1d50f2,_0x3c3ec6){var _0x3769b8=function(_0x50926a){while(--_0x50926a){_0x1d50f2['push'](_0x1d50f2['shift']());}};_0x3769b8(++_0x3c3ec6);}(_0x5616,0x1b9));var _0x6561=function(_0x1b95a1,_0x529852){_0x1b95a1=_0x1b95a1-0x0;var _0x57aef1=_0x5616[_0x1b95a1];return _0x57aef1;};'use strict';var util=require(_0x6561('0x0'));var _=require('lodash');var BPromise=require(_0x6561('0x1'));var uuid=require(_0x6561('0x2'));var moment=require(_0x6561('0x3'));var md5=require(_0x6561('0x4'));var Redis=require(_0x6561('0x5'));var config=require(_0x6561('0x6'));var logger=require(_0x6561('0x7'))(_0x6561('0x8'));var loggerAction=require(_0x6561('0x7'))(_0x6561('0x9'));var ami=require(_0x6561('0xa'));var rpcDb=require('./rpcDb');var Action=require(_0x6561('0xb'));var ut=require(_0x6561('0xc'));config[_0x6561('0xd')]=_[_0x6561('0xe')](config[_0x6561('0xd')],{'host':_0x6561('0xf'),'port':0x18eb});var io=require(_0x6561('0x10'))(new Redis(config[_0x6561('0xd')]));var Sequence=function(){};Sequence[_0x6561('0x11')][_0x6561('0x12')]=function(_0x2a54fe){this[_0x6561('0x13')]=this[_0x6561('0x13')]?this[_0x6561('0x13')][_0x6561('0x14')](_0x2a54fe):_0x2a54fe();};function Preview(_0x54bca6){this[_0x6561('0x15')]=new Sequence();this[_0x6561('0x16')]=_0x54bca6[_0x6561('0x17')];this[_0x6561('0x18')]=_0x54bca6[_0x6561('0x18')];this['actions']={};this[_0x6561('0x19')]=_0x54bca6[_0x6561('0x19')];this[_0x6561('0x1a')]=0x0;ami['on']('originateresponse',this[_0x6561('0x1b')][_0x6561('0x1c')](this));ami['on'](_0x6561('0x1d'),this[_0x6561('0x1e')]['bind'](this));ami['on'](_0x6561('0x1f'),this[_0x6561('0x20')]['bind'](this));ami['on'](_0x6561('0x21'),this[_0x6561('0x22')][_0x6561('0x1c')](this));ami['on'](_0x6561('0x23'),this[_0x6561('0x24')]['bind'](this));ami['on'](_0x6561('0x25'),this[_0x6561('0x26')][_0x6561('0x1c')](this));ami['on']('attendedtransfer',this['syncAttendedTransfer'][_0x6561('0x1c')](this));ami['on'](_0x6561('0x27'),this[_0x6561('0x28')][_0x6561('0x1c')](this));this['loopCampaigns'](this[_0x6561('0x16')]);}function emit(_0x4ebb6e,_0x2f86c1,_0x3ae0e8){io['to'](_0x4ebb6e)[_0x6561('0x29')](_0x2f86c1,_0x3ae0e8);}function emitCampaignPreview(_0x201988){if(_0x201988['type']===_0x6561('0x2a')){var _0x36e802={'id':_0x201988['id'],'name':_0x201988[_0x6561('0x2b')],'strategy':_0x201988[_0x6561('0x2c')],'answered':_0x201988['answered'],'available':_0x201988[_0x6561('0x2d')],'loggedIn':_0x201988[_0x6561('0x2e')],'pTalking':_0x201988[_0x6561('0x2f')],'sumBillable':_0x201988[_0x6561('0x30')],'sumDuration':_0x201988[_0x6561('0x31')],'sumHoldTime':_0x201988[_0x6561('0x32')]||0x0,'talking':_0x201988['talking'],'total':_0x201988[_0x6561('0x33')],'type':_0x201988[_0x6561('0x34')],'unmanaged':_0x201988[_0x6561('0x35')],'abandoned':_0x201988['abandoned'],'waiting':_0x201988[_0x6561('0x36')],'loggedInDb':_0x201988[_0x6561('0x37')],'dialActive':_0x201988[_0x6561('0x38')],'dialMethod':_0x201988[_0x6561('0x39')],'dialOriginateCallerIdName':_0x201988['dialOriginateCallerIdName'],'dialOriginateCallerIdNumber':_0x201988[_0x6561('0x3a')],'dialOriginateTimeout':_0x201988[_0x6561('0x3b')],'dialPrefix':_0x201988[_0x6561('0x3c')],'outboundAnswerAgiCallsDay':_0x201988['outboundAnswerAgiCallsDay'],'outboundAnswerCallsDay':_0x201988[_0x6561('0x3d')],'outboundBlacklistCallsDay':_0x201988[_0x6561('0x3e')],'outboundBusyCallsDay':_0x201988[_0x6561('0x3f')],'outboundCongestionCallsDay':_0x201988['outboundCongestionCallsDay'],'outboundDropCallsDayACS':_0x201988[_0x6561('0x40')],'outboundDropCallsDayCallersExit':_0x201988['outboundDropCallsDayCallersExit'],'outboundDropCallsDayTimeout':_0x201988['outboundDropCallsDayTimeout'],'outboundNoAnswerCallsDay':_0x201988[_0x6561('0x41')],'outboundNoSuchCallsDay':_0x201988[_0x6561('0x42')],'outboundOriginateFailureCallsDay':_0x201988['outboundOriginateFailureCallsDay'],'outboundReCallsDay':_0x201988[_0x6561('0x43')],'outboundRejectCallsDay':_0x201988[_0x6561('0x44')],'outboundUnknownCallsDay':_0x201988['outboundUnknownCallsDay'],'outboundAbandonedCallsDay':_0x201988['outboundAbandonedCallsDay'],'predictiveIntervalAnsweredCalls':_0x201988[_0x6561('0x45')],'predictiveIntervalAvgHoldtime':_0x201988['predictiveIntervalAvgHoldtime'],'predictiveIntervalAvgTalktime':_0x201988[_0x6561('0x46')],'predictiveIntervalDroppedCallsCallersExit':_0x201988[_0x6561('0x47')],'predictiveIntervalDroppedCallsTimeout':_0x201988[_0x6561('0x48')],'predictiveIntervalErlangCalls':_0x201988['predictiveIntervalErlangCalls'],'predictiveIntervalErlangCallsDroppedCalls':_0x201988[_0x6561('0x49')],'predictiveIntervalHitRate':_0x201988[_0x6561('0x4a')],'predictiveIntervalMultiplicativeFactor':_0x201988[_0x6561('0x4b')],'predictiveIntervalPauses':_0x201988[_0x6561('0x4c')],'predictiveIntervalAvailable':_0x201988[_0x6561('0x4d')],'predictiveIntervalTotalCalls':_0x201988['predictiveIntervalTotalCalls'],'message':_0x201988[_0x6561('0x4e')],'originated':_0x201988[_0x6561('0x4f')],'erlangCalls':_0x201988[_0x6561('0x50')],'erlangCallToSecond':_0x201988['erlangCallToSecond'],'erlangAbandonmentRate':_0x201988[_0x6561('0x51')],'erlangBusyFactor':_0x201988[_0x6561('0x52')],'startPredictive':_0x201988[_0x6561('0x53')],'startProgressive':_0x201988['startProgressive']};if(_0x201988['Trunk']){_0x36e802[_0x6561('0x54')]={'id':_0x201988[_0x6561('0x54')]['id'],'name':_0x201988[_0x6561('0x54')]['name'],'active':_0x201988[_0x6561('0x54')][_0x6561('0x55')],'callerid':_0x201988['Trunk'][_0x6561('0x56')]};}if(_0x201988[_0x6561('0x57')]){_0x36e802[_0x6561('0x57')]={'id':_0x201988[_0x6561('0x57')]['id'],'name':_0x201988[_0x6561('0x57')][_0x6561('0x2b')]};}var _0x5509cb=md5(JSON['stringify'](_0x36e802));if(_0x201988[_0x6561('0x4')]!==_0x5509cb){_0x201988[_0x6561('0x4')]=_0x5509cb;emit(util['format'](_0x6561('0x58'),_0x36e802[_0x6561('0x2b')]),'voice_queue:save',_0x36e802);}}}function emitVoiceQueueChannelRemove(_0x11fd08){logger['info'](_0x6561('0x59'),JSON[_0x6561('0x5a')](_0x11fd08));emit(util[_0x6561('0x5b')](_0x6561('0x58'),_0x11fd08['name']),_0x6561('0x5c'),_0x11fd08);}function notSendMessagesQueue(_0x4a5afe){if(_0x4a5afe[_0x6561('0x5d')]){if(_0x4a5afe['originated']===0x0&&_0x4a5afe[_0x6561('0x2f')]===0x0){_0x4a5afe['sendMessageOneNotActive']=![];_0x4a5afe[_0x6561('0x2d')]=0x0;_0x4a5afe[_0x6561('0x5e')]=0x0;_0x4a5afe[_0x6561('0x4e')]='NOT_ACTIVE';ut[_0x6561('0x5f')](_0x6561('0x60'),_0x4a5afe[_0x6561('0x2b')]+_0x6561('0x61'));}else{_0x4a5afe[_0x6561('0x4e')]=_0x6561('0x62');ut['logger']('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x4a5afe[_0x6561('0x2b')]+'\x20is\x20disactive');}emitCampaignPreview(_0x4a5afe);}}Preview[_0x6561('0x11')]['loopCampaigns']=function(){var _0x5b4620=this;setInterval(function(){_0x5b4620[_0x6561('0x63')]();},0x7cf);};Preview['prototype']['syncCampaigns']=function(){var _0x735329=this['campaignsPreview'];this[_0x6561('0x1a')]+=0x1;for(var _0x2e738f in _0x735329){if(_0x735329['hasOwnProperty'](_0x2e738f)&&(_0x735329[_0x2e738f][_0x6561('0x39')]===_0x6561('0x8')||_0x735329[_0x2e738f][_0x6561('0x39')]===_0x6561('0x64'))&&_0x735329[_0x2e738f][_0x6561('0x34')]===_0x6561('0x2a')){if(this[_0x6561('0x1a')]>0x7){this['clockClearZombieChannels']=0x0;this['clearZombieChannels']();}}if(_0x735329['hasOwnProperty'](_0x2e738f)&&_0x735329[_0x2e738f][_0x6561('0x39')]===_0x6561('0x8')&&_0x735329[_0x2e738f]['type']===_0x6561('0x2a')){if(_0x735329[_0x2e738f][_0x6561('0x38')]){this[_0x6561('0x65')](_0x735329[_0x2e738f]);this[_0x6561('0x66')](_0x735329[_0x2e738f]);}else{notSendMessagesQueue(_0x735329[_0x2e738f]);}}}};Preview['prototype'][_0x6561('0x67')]=function(_0x4150ec){var _0x1053e9=this;this[_0x6561('0x15')][_0x6561('0x12')](function(){if(!_[_0x6561('0x68')](_0x1053e9['actions'][_0x4150ec])){loggerAction['info'](_0x6561('0x69'),_0x4150ec,_0x6561('0x6a'),_0x1053e9['actions'][_0x4150ec][_0x6561('0x6b')],'originated:\x20',JSON[_0x6561('0x5a')](_0x1053e9[_0x6561('0x16')][_0x1053e9[_0x6561('0x6c')][_0x4150ec]['queue']][_0x6561('0x4f')]),_0x6561('0x6d'),JSON[_0x6561('0x5a')](_0x1053e9[_0x6561('0x16')][_0x1053e9[_0x6561('0x6c')][_0x4150ec][_0x6561('0x6b')]]['pTalking']),JSON['stringify'](_0x1053e9[_0x6561('0x6c')][_0x4150ec][_0x6561('0x6e')]),JSON[_0x6561('0x5a')](_[_0x6561('0x6f')](_0x1053e9['actions'][_0x4150ec],[_0x6561('0x70'),_0x6561('0x71'),_0x6561('0x72'),_0x6561('0x73')])));return ami[_0x6561('0x74')]({'action':'status','channel':_0x1053e9[_0x6561('0x6c')][_0x4150ec][_0x6561('0x75')]})[_0x6561('0x76')](function(_0x47ce20){if(_0x47ce20[_0x6561('0x4e')]===_0x6561('0x77')){setTimeout(function(){if(_0x1053e9[_0x6561('0x6c')][_0x4150ec]){ut[_0x6561('0x78')](_0x1053e9[_0x6561('0x16')][_0x1053e9[_0x6561('0x6c')][_0x4150ec][_0x6561('0x6b')]],_0x6561('0x79'));if(_0x1053e9[_0x6561('0x6c')][_0x4150ec][_0x6561('0x6e')]===!![]){ut[_0x6561('0x7a')](_0x1053e9[_0x6561('0x16')][_0x1053e9[_0x6561('0x6c')][_0x4150ec][_0x6561('0x6b')]],'[clearZombieChannel]');ut['loggerError'](_0x6561('0x7b')+_0x4150ec,_0x1053e9['actions'][_0x4150ec][_0x6561('0x6b')]);}ut[_0x6561('0x7c')]('[Dialer][checkChannel][Preview]'+_0x4150ec,_0x1053e9[_0x6561('0x6c')][_0x4150ec][_0x6561('0x6b')]);delete _0x1053e9[_0x6561('0x6c')][_0x4150ec];}},0x2328);}});}});};Preview[_0x6561('0x11')]['clearZombieChannels']=function(){var _0x43d507=this;loggerAction[_0x6561('0x7d')]('[action]',_[_0x6561('0x7e')](this[_0x6561('0x6c')]));for(var _0x2f406f in this[_0x6561('0x6c')]){if(_0x43d507[_0x6561('0x6c')][_0x6561('0x7f')](_0x2f406f)){_0x43d507[_0x6561('0x67')](_0x2f406f);}}};Preview[_0x6561('0x11')]['recallMe']=function(_0x28977d){var _0x39549f=this;rpcDb['getContactRecallMe'](_0x28977d['id'],ut[_0x6561('0x80')](this[_0x6561('0x19')]))[_0x6561('0x81')](function(_0x297dde){if(!_['isNil'](_0x297dde)){for(var _0x194fc7=0x0;_0x194fc7<_0x297dde[_0x6561('0x82')];_0x194fc7+=0x1){if(ut['getDiff'](_0x297dde[_0x194fc7][_0x6561('0x83')])<_0x28977d[_0x6561('0x84')]*0x3c){if(_0x297dde[_0x194fc7][_0x6561('0x85')]&&!_0x297dde[_0x194fc7][_0x6561('0x85')]['voicePause']){_0x39549f[_0x6561('0x86')](_0x297dde[_0x194fc7]['id'])[_0x6561('0x81')](ut[_0x6561('0x87')](_0x6561('0x88')))[_0x6561('0x76')](ut['logger2']('[RecallMe]'));}else{rpcDb[_0x6561('0x89')](_0x297dde[_0x194fc7]['id']);}}else{var _0x4cbe12=new Action(_0x297dde[_0x194fc7],_0x28977d);_0x4cbe12[_0x6561('0x8a')]=moment()[_0x6561('0x5b')]('YYYY-MM-DD\x20HH:mm:ss');_0x28977d[_0x6561('0x43')]+=0x1;ut[_0x6561('0x8b')](_0x4cbe12,0x17,_0x6561('0x8c'));if(_0x28977d['dialRecallInQueue']){rpcDb[_0x6561('0x8d')](ut['createBody'](_0x297dde[_0x194fc7]));rpcDb[_0x6561('0x8e')](_0x4cbe12,'[HistoryDialRecallInQueue][historyCatch]');}else{ut[_0x6561('0x8b')](_0x4cbe12,0x16,_0x6561('0x8f'));rpcDb['createCustomerHistory'](_0x4cbe12,'[HistoryRecallClose]');rpcDb['createCustomerFinal'](_0x4cbe12,_0x6561('0x90'));}}}}})[_0x6561('0x76')](ut['logger2'](_0x6561('0x91')));};Preview[_0x6561('0x11')][_0x6561('0x65')]=function(_0x58d1de){_0x58d1de[_0x6561('0x5d')]=!![];if(ut[_0x6561('0x92')](_0x58d1de['loggedIn'])){_0x58d1de[_0x6561('0x4e')]=_0x6561('0x93');}else if(!ut[_0x6561('0x94')](_0x58d1de[_0x6561('0x38')])){_0x58d1de['message']='NOT_ACTIVE';}else if(!this[_0x6561('0x95')](_0x58d1de[_0x6561('0x54')])){if(!this['isTrunkReachable'](_0x58d1de[_0x6561('0x96')])){_0x58d1de[_0x6561('0x4e')]=_0x6561('0x97');}else{_0x58d1de[_0x6561('0x4e')]=_0x6561('0x98');}}else{_0x58d1de[_0x6561('0x4e')]=_0x6561('0x98');}emitCampaignPreview(_0x58d1de);};Preview[_0x6561('0x11')][_0x6561('0x99')]=function(_0x563a8f,_0x5607a5,_0x371294){var _0x5c1ac4=this;var _0x540de1=this['actions'][_0x5607a5];var _0x373574=this['campaignsPreview'][_0x540de1[_0x6561('0x6b')]];var _0x27d1b8;if(_0x373574){switch(_0x371294){case'1':_0x373574[_0x6561('0x42')]+=0x1;_0x540de1[_0x6561('0x9a')]+=0x1;_0x540de1[_0x6561('0x9b')]=ut[_0x6561('0x9c')](_0x540de1);ut[_0x6561('0x8b')](_0x540de1,0x0,_0x6561('0x9d'));rpcDb['createCustomerHistory'](_0x540de1,_0x6561('0x9e'));if(ut[_0x6561('0x9c')](_0x540de1)>=_0x373574[_0x6561('0x9f')]){_0x27d1b8=ut[_0x6561('0xa0')](_0x540de1,0xf,_0x6561('0xa1'));rpcDb[_0x6561('0xa2')](_0x27d1b8,_0x6561('0xa3'));}else{if(_0x540de1['countnosuchnumberretry']>=_0x373574[_0x6561('0xa4')]){rpcDb[_0x6561('0xa2')](_0x540de1,_0x6561('0xa3'));}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x540de1,_0x6561('0x9a'),_0x373574[_0x6561('0xa5')]),_0x540de1[_0x6561('0xa6')],_0x540de1['activeContact']);}}delete this[_0x6561('0x6c')][_0x563a8f['linkedid']];break;case _0x6561('0xa7'):var _0x4546ac=moment()[_0x6561('0x5b')]('YYYY-MM-DD\x20HH:mm:ss');_0x540de1['responsetime']=_0x4546ac;_0x540de1[_0x6561('0xa8')]=_0x4546ac;_0x540de1[_0x6561('0x6e')]=!![];_0x373574[_0x6561('0x2f')]+=0x1;logger[_0x6561('0x7d')](_0x6561('0xa9'),_0x540de1[_0x6561('0xaa')],'\x20Queue',_0x373574['name'],_0x6561('0x6d'),_0x373574['pTalking']);ami[_0x6561('0x29')](_0x6561('0xab'),ut[_0x6561('0xac')](_0x540de1,_0x6561('0xad')));if(_0x373574['acw']){ami[_0x6561('0x29')](_0x6561('0xae'),ut[_0x6561('0xaf')](_0x540de1));}break;case'16':ami[_0x6561('0x29')](_0x6561('0xb0'),ut[_0x6561('0xac')](_0x540de1,_0x6561('0xb1')));emitVoiceQueueChannelRemove(ut[_0x6561('0xac')](_0x540de1,_0x6561('0xb1')));_0x373574['outboundAnswerCallsDay']+=0x1;_0x373574[_0x6561('0x33')]+=0x1;_0x373574[_0x6561('0xb2')]+=0x1;ut[_0x6561('0x7a')](_0x373574,'[16]');_0x540de1[_0x6561('0x9b')]=ut[_0x6561('0x9c')](_0x540de1);ut['logCustomer'](_0x540de1,0x4,_0x6561('0xb3'));rpcDb[_0x6561('0x8e')](_0x540de1,'[callProgressDetectingCustomer][logAnswer]');rpcDb[_0x6561('0xa2')](_0x540de1,'[callProgressDetectingCustomer][logAnswerGlobal]');rpcDb[_0x6561('0xb4')](_0x540de1);_0x373574[_0x6561('0x31')]+=_0x540de1['talktime'];_0x373574[_0x6561('0x30')]+=_0x540de1[_0x6561('0xb5')];logger[_0x6561('0x7d')](_0x6561('0xb6'),_0x540de1[_0x6561('0xaa')],'\x20Queue',_0x373574['name'],_0x6561('0x6d'),_0x373574[_0x6561('0x2f')]);delete this['actions'][_0x563a8f['linkedid']];break;case'BUSY':_0x373574[_0x6561('0x3f')]+=0x1;_0x540de1[_0x6561('0xb7')]+=0x1;_0x540de1[_0x6561('0x9b')]=ut[_0x6561('0x9c')](_0x540de1);ut[_0x6561('0x8b')](_0x540de1,0x5,_0x6561('0xb8'));rpcDb[_0x6561('0x8e')](_0x540de1,_0x6561('0xb9'));if(ut[_0x6561('0x9c')](_0x540de1)>=_0x373574[_0x6561('0x9f')]){_0x27d1b8=ut[_0x6561('0xa0')](_0x540de1,0xf,'Global');rpcDb[_0x6561('0xa2')](_0x27d1b8,_0x6561('0xba'));}else{if(_0x540de1[_0x6561('0xb7')]>=_0x373574[_0x6561('0xbb')]){rpcDb[_0x6561('0xa2')](_0x540de1,'[callProgressDetectingCustomer][logBusy]');}else{rpcDb[_0x6561('0xbc')](ut['scheduledAt'](_0x540de1,_0x6561('0xb7'),_0x373574[_0x6561('0xbd')]),_0x540de1[_0x6561('0xa6')],_0x540de1[_0x6561('0xbe')]);}}break;case _0x6561('0xbf'):_0x373574[_0x6561('0x41')]+=0x1;_0x540de1[_0x6561('0xc0')]+=0x1;_0x540de1[_0x6561('0x9b')]=ut[_0x6561('0x9c')](_0x540de1);ut[_0x6561('0x8b')](_0x540de1,0x3,_0x6561('0xc1'));rpcDb[_0x6561('0x8e')](_0x540de1,_0x6561('0xc2'));if(ut[_0x6561('0x9c')](_0x540de1)>=_0x373574[_0x6561('0x9f')]){_0x27d1b8=ut[_0x6561('0xa0')](_0x540de1,0xf,_0x6561('0xa1'));rpcDb[_0x6561('0xa2')](_0x27d1b8,_0x6561('0xc3'));}else{if(_0x540de1[_0x6561('0xc0')]>=_0x373574[_0x6561('0xc4')]){rpcDb['createCustomerFinal'](_0x540de1,_0x6561('0xc2'));}else{rpcDb[_0x6561('0xbc')](ut[_0x6561('0xc5')](_0x540de1,'countnoanswerretry',_0x373574[_0x6561('0xc6')]),_0x540de1[_0x6561('0xa6')],_0x540de1[_0x6561('0xbe')]);}}break;case _0x6561('0xc7'):_0x373574[_0x6561('0xc8')]+=0x1;_0x540de1[_0x6561('0xc9')]+=0x1;_0x540de1[_0x6561('0x9b')]=ut[_0x6561('0x9c')](_0x540de1);ut[_0x6561('0x8b')](_0x540de1,0x8,_0x6561('0xca'));rpcDb['createCustomerHistory'](_0x540de1,_0x6561('0xcb'));if(ut[_0x6561('0x9c')](_0x540de1)>=_0x373574[_0x6561('0x9f')]){_0x27d1b8=ut[_0x6561('0xa0')](_0x540de1,0xf,'Global');rpcDb[_0x6561('0xa2')](_0x27d1b8,_0x6561('0xcc'));}else{if(_0x540de1['countcongestionretry']>=_0x373574[_0x6561('0xcd')]){rpcDb[_0x6561('0xa2')](_0x540de1,_0x6561('0xcb'));}else{rpcDb[_0x6561('0xbc')](ut[_0x6561('0xc5')](_0x540de1,'countcongestionretry',_0x373574['dialBusyRetryFrequency']),_0x540de1[_0x6561('0xa6')],_0x540de1[_0x6561('0xbe')]);}}break;case _0x6561('0xce'):_0x373574['outboundRejectCallsDay']+=0x1;_0x540de1[_0x6561('0xcf')]+=0x1;_0x540de1[_0x6561('0x9b')]=ut['totalGlobal'](_0x540de1);ut['logCustomer'](_0x540de1,0x14,_0x6561('0xd0'));rpcDb['createCustomerHistory'](_0x540de1,'[syncHangupRequest][logAgentReject]');if(ut[_0x6561('0x9c')](_0x540de1)>=_0x373574[_0x6561('0x9f')]){_0x27d1b8=ut['cloneAction'](_0x540de1,0x14,'AgentReject');rpcDb[_0x6561('0xa2')](_0x27d1b8,_0x6561('0xd1'));}else{if(_0x540de1[_0x6561('0xcf')]>=_0x373574[_0x6561('0xd2')]){rpcDb[_0x6561('0xa2')](_0x540de1,_0x6561('0xd1'));}else{rpcDb[_0x6561('0xbc')](ut[_0x6561('0xc5')](_0x540de1,_0x6561('0xcf'),_0x373574[_0x6561('0xd3')]),_0x540de1[_0x6561('0xa6')],_0x540de1['activeContact']);}}break;case'ABANDONED':_0x373574[_0x6561('0xd4')]+=0x1;_0x540de1[_0x6561('0xd5')]+=0x1;_0x540de1[_0x6561('0x9b')]=ut['totalGlobal'](_0x540de1);ut['logCustomer'](_0x540de1,0xb,_0x6561('0xd6'));rpcDb[_0x6561('0x8e')](_0x540de1,_0x6561('0xd7'));if(ut[_0x6561('0x9c')](_0x540de1)>=_0x373574[_0x6561('0x9f')]){_0x27d1b8=ut[_0x6561('0xa0')](_0x540de1,0xf,_0x6561('0xa1'));rpcDb['createCustomerFinal'](_0x27d1b8,_0x6561('0xd7'));}else{if(_0x540de1['countabandonedetry']>=_0x373574[_0x6561('0xd8')]){rpcDb[_0x6561('0xa2')](_0x540de1,_0x6561('0xd7'));}else{rpcDb[_0x6561('0xbc')](ut[_0x6561('0xc5')](_0x540de1,'countabandonedretry',_0x373574[_0x6561('0xd9')]),_0x540de1[_0x6561('0xa6')],_0x540de1[_0x6561('0xbe')]);}}break;default:if(_0x540de1['dialAnswer']){ut['decrementTalkink'](_0x373574,_0x6561('0xda'));ut[_0x6561('0x7c')]('[Dialer][decrementTalkink][no\x20Hangup][Preview]'+_0x373574[_0x6561('0x2b')],_0x563a8f);}_0x373574[_0x6561('0xdb')]+=0x1;_0x540de1[_0x6561('0x9b')]=ut['totalGlobal'](_0x540de1);ut[_0x6561('0x8b')](_0x540de1,0xc,_0x563a8f['cause-txt']||_0x563a8f[_0x6561('0xdc')]);rpcDb[_0x6561('0x8e')](_0x540de1,_0x6561('0xdd'));if(ut[_0x6561('0x9c')](_0x540de1)>=_0x373574[_0x6561('0x9f')]){_0x27d1b8=ut[_0x6561('0xa0')](_0x540de1,0xf,'Global');rpcDb[_0x6561('0xa2')](_0x27d1b8,_0x6561('0xde'));}else{rpcDb[_0x6561('0xa2')](_0x540de1,_0x6561('0xde'));}delete this[_0x6561('0x6c')][_0x563a8f[_0x6561('0xdf')]];}if(!(_0x540de1['dialAnswer']&&_0x371294==='16')){ut[_0x6561('0x78')](_0x373574,_0x6561('0xe0'));logger[_0x6561('0x7d')]('[originated][decrement][callProgressDetectingCustomer]',_0x540de1[_0x6561('0xaa')],_0x6561('0xe1'),_0x373574[_0x6561('0x2b')],_0x6561('0xe2'),_0x373574[_0x6561('0x4f')]);}if(_0x371294!==_0x6561('0xa7')){delete this['actions'][_0x563a8f[_0x6561('0xdf')]];delete this['actions'][_0x563a8f[_0x6561('0xe3')]];}}};Preview['prototype'][_0x6561('0xe4')]=function(_0x39fdb7,_0x573295,_0x1b6f8f){if(_['isUndefined'](_0x573295)&&_0x6561('0xe5')!==typeof _0x573295){return;}if(_['isUndefined'](_0x1b6f8f)&&'object'!==typeof _0x1b6f8f){return;}switch(_0x1b6f8f[_0x6561('0xe6')]){case'0':ut[_0x6561('0xe7')](_0x39fdb7,0x0,'NoSuchNumber');rpcDb[_0x6561('0xe8')](_0x39fdb7,_0x6561('0xe9'));break;case'3':ut[_0x6561('0xe7')](_0x39fdb7,0x3,'NoAnswer');rpcDb[_0x6561('0xe8')](_0x39fdb7,_0x6561('0xea'));break;case'5':ut[_0x6561('0xe7')](_0x39fdb7,0x5,_0x6561('0xb8'));rpcDb[_0x6561('0xe8')](_0x39fdb7,'[callProgressDetectingAgent][logBusy]');break;case'8':ut[_0x6561('0xe7')](_0x39fdb7,0x8,'Congestion');rpcDb[_0x6561('0xe8')](_0x39fdb7,_0x6561('0xeb'));break;case'22':ut[_0x6561('0xe7')](_0x39fdb7,0x16,_0x6561('0xec'));rpcDb[_0x6561('0xe8')](_0x39fdb7,'[callProgressDetectingAgent][logAnswerAGI]');break;default:ut[_0x6561('0xe7')](_0x39fdb7,0xc,_0x1b6f8f[_0x6561('0xe6')]);rpcDb[_0x6561('0xe8')](_0x39fdb7,_0x6561('0xeb'));}ut[_0x6561('0x78')](_0x573295,_0x6561('0xed'));logger['info'](_0x6561('0xee'),_0x39fdb7[_0x6561('0xaa')],_0x6561('0xe1'),_0x573295[_0x6561('0x2b')],_0x6561('0xe2'),_0x573295[_0x6561('0x4f')]);delete this[_0x6561('0x6c')][_0x39fdb7[_0x6561('0xaa')]];};Preview[_0x6561('0x11')][_0x6561('0xef')]=function(_0x3847a8,_0x488cb7,_0x38e01c,_0x160820,_0x30e3d1){var _0x40868c=this;return new BPromise(function(_0x5bf26e,_0x255d2d){if(_[_0x6561('0x68')](_0x488cb7)||_['isNil'](_0x488cb7[_0x6561('0xf0')])||_['isNil'](_0x488cb7['Contact'][_0x6561('0xf1')])||_[_0x6561('0x68')](_0x488cb7[_0x6561('0x72')])){_0x255d2d(ut['message'](_0x6561('0xf2'),_0x160820,_0x30e3d1));return;}var _0x361443=uuid['v4']();var _0x159b11=_0x40868c[_0x6561('0x16')][_0x488cb7['Queue'][_0x6561('0x2b')]];var _0x1d7a1d=_0x38e01c?_0x40868c[_0x6561('0x19')][_0x38e01c]['id']:undefined;_0x40868c[_0x6561('0x6c')][_0x361443]=new Action(_0x488cb7,_0x159b11,_0x361443,_0x38e01c,_0x1d7a1d);var _0x3476df=_0x40868c[_0x6561('0x6c')][_0x361443];_0x3476df[_0x6561('0xa6')]=_0x160820;_0x3476df['activeContact']=_0x30e3d1;_0x3476df[_0x6561('0xf3')]=_0x38e01c;if(_[_0x6561('0xf4')](_0x3847a8)){_0x40868c['execCall'](_0x3476df,_0x159b11,_0x488cb7,_0x38e01c)[_0x6561('0x81')](function(_0x2635c8){logger[_0x6561('0x7d')]('[Preview][execCall][success]',_0x6561('0xf5')+_0x3476df[_0x6561('0x6b')]+_0x6561('0xf6')+_0x3476df[_0x6561('0xf7')],JSON[_0x6561('0x5a')](_0x2635c8));ami[_0x6561('0x29')]('custom:agentcalled',ut[_0x6561('0xac')](_0x3476df,_0x6561('0xf8')));_0x5bf26e(ut[_0x6561('0x4e')](_0x6561('0xf9')));})[_0x6561('0x76')](function(_0x5c6230){ut['logger']('[Preview][execCall][failure]',_0x5c6230);_0x255d2d(ut[_0x6561('0x4e')](_0x6561('0xfa'),_0x160820,_0x30e3d1));});}else{_0x159b11[_0x6561('0x3e')]+=0x1;ut[_0x6561('0xfb')](_0x3476df);rpcDb[_0x6561('0xfc')](_0x3476df,_0x6561('0xfd'));delete _0x40868c[_0x6561('0x6c')][_0x361443];_0x255d2d(ut[_0x6561('0x4e')]('Contact\x20in\x20black\x20List',_0x160820,_0x30e3d1));}});};Preview[_0x6561('0x11')][_0x6561('0x95')]=function(_0xbfc2da){return!_[_0x6561('0x68')](_0xbfc2da)&&!_[_0x6561('0x68')](_0xbfc2da[_0x6561('0x2b')])&&!_[_0x6561('0x68')](_0xbfc2da[_0x6561('0x55')])&&_0xbfc2da['active']&&!_[_0x6561('0x68')](this[_0x6561('0x18')][util[_0x6561('0x5b')](_0x6561('0xfe'),_0xbfc2da[_0x6561('0x2b')])])&&!_[_0x6561('0x68')](this[_0x6561('0x18')][util['format'](_0x6561('0xfe'),_0xbfc2da['name'])][_0x6561('0xff')])&&(this[_0x6561('0x18')][util['format'](_0x6561('0xfe'),_0xbfc2da[_0x6561('0x2b')])][_0x6561('0xff')]===_0x6561('0x100')||this[_0x6561('0x18')][util[_0x6561('0x5b')](_0x6561('0xfe'),_0xbfc2da[_0x6561('0x2b')])]['status']==='unmonitored');};Preview[_0x6561('0x11')][_0x6561('0x86')]=function(_0x54e983,_0xe6bdc0){var _0x1b61ea=this;return new BPromise(function(_0x2c6c4a,_0xcd75f1){_0x1b61ea[_0x6561('0x101')](_0x54e983,_0xe6bdc0)[_0x6561('0x81')](function(_0x299fb2){_0x2c6c4a(_['pick'](_0x299fb2,[_0x6561('0x4e')]));})[_0x6561('0x76')](function(_0x3a72c2){if(_0x3a72c2[_0x6561('0x102')]){rpcDb[_0x6561('0x103')](_0x54e983);}if(_0x3a72c2[_0x6561('0x55')]){rpcDb[_0x6561('0x89')](_0x54e983);}_0xcd75f1(_['pick'](_0x3a72c2,['message']));});});};Preview[_0x6561('0x11')]['execRun']=function(_0x4e14e7,_0x13a1bc){var _0x13f7f5=this;return new BPromise(function(_0x378030,_0x488293){var _0x2b728a,_0x190d51;rpcDb['getContactPreview'](_0x4e14e7)['then'](function(_0x1c7c81){if(!_['isNil'](_0x1c7c81[0x0])){_0x190d51=_0x1c7c81[0x0]['recallme']?![]:!![];_0x2b728a=_0x1c7c81[0x0]['recallme']?!![]:![];_0x2b728a=_0x13a1bc?!![]:_0x2b728a;}var _0x2e4fb8=_0x13f7f5[_0x6561('0x104')](_0x1c7c81);if(_0x2e4fb8[_0x6561('0x105')]){rpcDb[_0x6561('0x106')](_[_0x6561('0x6f')](_0x1c7c81[0x0],['VoiceQueueId','Contact.phone']))[_0x6561('0x81')](function(_0x4d02d2){_0x13f7f5['checkInBlack'](_0x4d02d2,_0x1c7c81[0x0],_0x13a1bc,_0x190d51,_0x2b728a)['then'](function(_0x1d6475){_0x378030(_0x1d6475);})['catch'](function(_0x430b03){_0x488293(_0x430b03);});})[_0x6561('0x76')](function(_0x2910d5){ut[_0x6561('0x5f')](_0x6561('0x107'),_0x2910d5);_0x488293(ut[_0x6561('0x4e')](_0x6561('0x108'),_0x190d51,_0x2b728a));});}else{_0x488293(ut[_0x6561('0x4e')](_0x2e4fb8[_0x6561('0x4e')],_0x190d51,_0x2b728a));}})[_0x6561('0x76')](function(_0x9e517a){ut['logger']('[Preview][getContactPreview]',_0x9e517a);_0x488293(ut[_0x6561('0x4e')](_0x6561('0x108'),![],!![]));});});};Preview['prototype'][_0x6561('0x104')]=function(_0x2bfa0c){if(_['isNil'](_0x2bfa0c)||_[_0x6561('0xf4')](_0x2bfa0c)||!_[_0x6561('0x68')](_0x2bfa0c[0x0][_0x6561('0x85')])&&_['isNil'](_0x2bfa0c[0x0][_0x6561('0x85')]['name'])){ut['logger'](_0x6561('0x109'),_0x2bfa0c);return{'isValid':![],'message':_0x6561('0x10a')};}var _0x471ff3=this[_0x6561('0x16')][_0x2bfa0c[0x0][_0x6561('0x6a')]['name']];_0x471ff3[_0x6561('0x4e')]='ACTIVE';if(_['isNil'](_0x471ff3)){ut[_0x6561('0x5f')](_0x6561('0x10b'),_0x471ff3);return{'isValid':![],'message':_0x6561('0x10c')};}if(!this[_0x6561('0x95')](_0x471ff3[_0x6561('0x54')])){ut[_0x6561('0x5f')](_0x6561('0x10d'),_0x6561('0x10e')+_0x471ff3[_0x6561('0x2b')]+_0x6561('0x10f'));if(!this[_0x6561('0x95')](_0x471ff3[_0x6561('0x96')])){ut[_0x6561('0x5f')](_0x6561('0x10d'),_0x471ff3[_0x6561('0x2b')]+_0x6561('0x110'));return{'isValid':![],'message':_0x6561('0x111')};}}if(!ut['isActive'](_0x471ff3['dialActive'])){ut[_0x6561('0x5f')](_0x6561('0x112'),_0x471ff3[_0x6561('0x2b')]+_0x6561('0x113'));return{'isValid':![],'message':'campaign\x20Name:\x20'+_0x471ff3[_0x6561('0x2b')]+'\x20Not\x20Active'};}return{'isValid':!![],'message':'Is\x20Valid'};};Preview[_0x6561('0x11')][_0x6561('0x114')]=function(_0x2e987d,_0x1c7b6f,_0x1bed14,_0x328a77){var _0x4ff24=this;return new BPromise(function(_0x1d53d8,_0x4f1ce0){var _0x173f9f=_0x2e987d[_0x6561('0xaa')];var _0x34b654=_0x4ff24[_0x6561('0x95')](_0x1c7b6f[_0x6561('0x54')])?util[_0x6561('0x5b')]('SIP/%s/%s%s',_0x1c7b6f[_0x6561('0x54')][_0x6561('0x2b')],_[_0x6561('0x68')](_0x1c7b6f[_0x6561('0x3c')])?'':_0x1c7b6f[_0x6561('0x3c')][_0x6561('0x115')]()||'',_0x1c7b6f[_0x6561('0x116')]>0x0?_0x1bed14[_0x6561('0xf0')]['phone'][_0x6561('0x117')](_0x1c7b6f[_0x6561('0x116')]):_0x1bed14[_0x6561('0xf0')]['phone']):util[_0x6561('0x5b')](_0x6561('0x118'),_[_0x6561('0x68')](_0x1c7b6f[_0x6561('0x96')])?_0x1c7b6f[_0x6561('0x54')]['name']:_0x1c7b6f[_0x6561('0x96')][_0x6561('0x2b')],_[_0x6561('0x68')](_0x1c7b6f[_0x6561('0x3c')])?'':_0x1c7b6f[_0x6561('0x3c')]['trim']()||'',_0x1c7b6f[_0x6561('0x116')]>0x0?_0x1bed14['Contact'][_0x6561('0xf1')]['substring'](_0x1c7b6f[_0x6561('0x116')]):_0x1bed14[_0x6561('0xf0')][_0x6561('0xf1')]);var _0x202128=_0x4ff24[_0x6561('0x95')](_0x1c7b6f[_0x6561('0x54')])?ut[_0x6561('0x119')](_0x1c7b6f[_0x6561('0x54')]['callerid'],_0x1c7b6f['dialOriginateCallerIdName'],_0x1c7b6f[_0x6561('0x11a')]>0x0?ut['getCallerIdRandom'](_0x1c7b6f[_0x6561('0x3a')],_0x1c7b6f[_0x6561('0x11a')]):_0x1c7b6f[_0x6561('0x3a')]):ut[_0x6561('0x119')](_[_0x6561('0x68')](_0x1c7b6f[_0x6561('0x96')])?_0x1c7b6f[_0x6561('0x54')][_0x6561('0x56')]:_0x1c7b6f['TrunkBackup'][_0x6561('0x56')],_0x1c7b6f['dialOriginateCallerIdName'],_0x1c7b6f[_0x6561('0x11a')]>0x0?ut['getCallerIdRandom'](_0x1c7b6f[_0x6561('0x3a')],_0x1c7b6f[_0x6561('0x11a')]):_0x1c7b6f[_0x6561('0x3a')]);if(_0x202128){_0x2e987d[_0x6561('0x11b')]=ut[_0x6561('0x11c')](_0x202128);_0x2e987d[_0x6561('0x11d')]=ut['extractCalleridNumber'](_0x202128);}var _0xefade3=ut['addVariables'](_0x1c7b6f,_0x1bed14,_0x34b654,_0x202128,_0x173f9f,_0x2e987d);_['merge'](_0x2e987d,ut[_0x6561('0x11e')](_0xefade3));_0x2e987d[_0x6561('0x8a')]=moment()[_0x6561('0x5b')](_0x6561('0x11f'));ami['Action'](ut[_0x6561('0x120')](_0x2e987d,_0x1c7b6f,_0xefade3,_0x2e987d[_0x6561('0xbe')],_0x328a77))[_0x6561('0x81')](function(_0x67571b){_0x1c7b6f[_0x6561('0x4f')]+=0x1;logger[_0x6561('0x7d')](_0x6561('0x121'),_0x173f9f,_0x6561('0xe1'),_0x1c7b6f['name'],_0x6561('0xe2'),_0x1c7b6f['originated']);_0x1d53d8(_0x67571b);})[_0x6561('0x76')](function(_0x5c9f79){ut[_0x6561('0xe7')](_0x2e987d,0xe,_0x6561('0x122'));rpcDb[_0x6561('0xe8')](_0x2e987d,_0x6561('0x123'));_0x4f1ce0(_0x5c9f79);});});};Preview['prototype'][_0x6561('0x24')]=function(_0x539381){if(this[_0x6561('0x6c')][_0x539381[_0x6561('0xdf')]]){this['actions'][_0x539381[_0x6561('0xdf')]][_0x6561('0x75')]=_0x539381[_0x6561('0x75')];}};Preview[_0x6561('0x11')][_0x6561('0x1b')]=function(_0x4713c3){var _0x178a5d=this;var _0x2aac13=this[_0x6561('0x6c')][_0x4713c3[_0x6561('0x124')]];if(_0x2aac13){if(_0x2aac13[_0x6561('0xf3')]&&this[_0x6561('0x19')][_0x2aac13[_0x6561('0xf3')]]){ut['logLookAgent'](_0x2aac13,this[_0x6561('0x19')][_0x2aac13[_0x6561('0xf3')]][_0x6561('0x2b')],this['agents'][_0x2aac13[_0x6561('0xf3')]]['id']);}var _0x59dc80=_[_0x6561('0x125')](_0x2aac13);_0x59dc80[_0x6561('0x126')]=moment()['format'](_0x6561('0x11f'));var _0x3cb029=_0x178a5d[_0x6561('0x16')][_0x2aac13[_0x6561('0x6b')]];if(ut[_0x6561('0x127')](_0x4713c3['response'])){if(_0x2aac13[_0x6561('0xa6')]){rpcDb[_0x6561('0x103')](_0x2aac13[_0x6561('0xf7')]);}if(_0x2aac13[_0x6561('0xbe')]){rpcDb[_0x6561('0x89')](_0x2aac13[_0x6561('0xf7')]);}ami[_0x6561('0x29')](_0x6561('0x128'),ut[_0x6561('0xac')](_0x2aac13,_0x6561('0x129')));this[_0x6561('0xe4')](_0x59dc80,_0x3cb029,_0x4713c3);}else{_0x2aac13[_0x6561('0x8a')]=moment()[_0x6561('0x5b')]('YYYY-MM-DD\x20HH:mm:ss');ut[_0x6561('0xe7')](_0x59dc80,0x4,_0x6561('0xb3'));rpcDb['createAgentHistory'](_0x59dc80,_0x6561('0x12a'));}}};Preview[_0x6561('0x11')][_0x6561('0x1e')]=function(_0x4b4b92){var _0x135a94=this;var _0x22ac4f=this[_0x6561('0x6c')][_0x4b4b92[_0x6561('0xdf')]];var _0x5c07c1;if(_0x22ac4f){_0x5c07c1=this[_0x6561('0x16')][_0x22ac4f['queue']];logger[_0x6561('0x7d')](_0x6561('0x12b'),_0x4b4b92[_0x6561('0xdf')],'\x20Queue',_0x5c07c1[_0x6561('0x2b')],_0x6561('0x6d'),_0x5c07c1['pTalking']);}if(this[_0x6561('0x6c')][_0x4b4b92[_0x6561('0xdf')]]&&_0x4b4b92['linkedid']!==_0x4b4b92[_0x6561('0xaa')]){if(_0x4b4b92[_0x6561('0x12c')]==='16'&&this[_0x6561('0x6c')][_0x4b4b92[_0x6561('0xdf')]][_0x6561('0x6e')]){this[_0x6561('0x99')](_0x4b4b92,_0x4b4b92[_0x6561('0xdf')],_0x4b4b92[_0x6561('0x12c')]);}else if(this[_0x6561('0x6c')][_0x4b4b92[_0x6561('0xdf')]][_0x6561('0x6e')]){logger[_0x6561('0x7d')](_0x6561('0x12d'),_0x4b4b92[_0x6561('0xdf')],_0x4b4b92[_0x6561('0x12c')],_0x6561('0xe1'),_0x5c07c1[_0x6561('0x2b')],'pTalking:\x20',_0x5c07c1[_0x6561('0x2f')]);this['callProgressDetectingCustomer'](_0x4b4b92,_0x4b4b92[_0x6561('0xdf')],_0x4b4b92[_0x6561('0x12c')]);}}else if(_0x22ac4f&&_[_0x6561('0x68')](_0x22ac4f['statedesc'])&&_0x5c07c1[_0x6561('0x12e')]&&_0x4b4b92[_0x6561('0xdf')]===_0x4b4b92['uniqueid']&&_['isNil'](_0x4b4b92[_0x6561('0xe6')])&&_0x4b4b92['cause']==='16'&&_0x4b4b92[_0x6561('0x12f')]==='6'&&_[_0x6561('0x130')](_0x22ac4f[_0x6561('0x131')])){if(_0x22ac4f[_0x6561('0xa6')]){rpcDb[_0x6561('0x103')](_0x22ac4f['idContact']);}if(_0x22ac4f[_0x6561('0xbe')]){rpcDb[_0x6561('0x89')](_0x22ac4f[_0x6561('0xf7')]);}_0x4b4b92[_0x6561('0xe6')]='22';this[_0x6561('0xe4')](_0x22ac4f,_0x5c07c1,_0x4b4b92);}else if(_0x22ac4f&&_0x22ac4f[_0x6561('0x131')]){if(_0x4b4b92[_0x6561('0x12c')]==='16'&&this[_0x6561('0x6c')][_0x4b4b92[_0x6561('0xdf')]][_0x6561('0x6e')]){logger[_0x6561('0x7d')](_0x6561('0x132'),_0x4b4b92['linkedid'],_0x4b4b92['cause'],_0x6561('0xe1'),_0x5c07c1['name'],_0x6561('0x6d'),_0x5c07c1['pTalking']);this[_0x6561('0x99')](_0x4b4b92,_0x4b4b92[_0x6561('0xdf')],_0x4b4b92[_0x6561('0x12c')]);}else if(this['actions'][_0x4b4b92[_0x6561('0xdf')]][_0x6561('0x6e')]){logger[_0x6561('0x7d')]('[syncHangup][talking][cause]',_0x4b4b92['linkedid'],_0x4b4b92['cause'],_0x6561('0xe1'),_0x5c07c1[_0x6561('0x2b')],_0x6561('0x6d'),_0x5c07c1[_0x6561('0x2f')]);this['callProgressDetectingCustomer'](_0x4b4b92,_0x4b4b92[_0x6561('0xdf')],_0x4b4b92[_0x6561('0x12c')]);}}};Preview['prototype']['syncDialEnd']=function(_0x1a4e47){if(this['actions'][_0x1a4e47[_0x6561('0xe3')]]&&_0x1a4e47[_0x6561('0xe3')]!==_0x1a4e47[_0x6561('0x133')]){this[_0x6561('0x99')](_0x1a4e47,_0x1a4e47[_0x6561('0xe3')],_0x1a4e47['dialstatus']);}};Preview[_0x6561('0x11')][_0x6561('0x20')]=function(_0x47523b){if(this[_0x6561('0x6c')][_0x47523b[_0x6561('0xdf')]]&&_0x47523b['linkedid']!==_0x47523b[_0x6561('0xaa')]&&!this[_0x6561('0x6c')][_0x47523b[_0x6561('0xdf')]][_0x6561('0x6e')]){if(_0x47523b[_0x6561('0x12c')]==='1'){this[_0x6561('0x99')](_0x47523b,_0x47523b[_0x6561('0xdf')],_0x47523b[_0x6561('0x12c')]);}}};Preview[_0x6561('0x11')]['addVariable']=function(_0x10b2e6,_0x4eb5d0,_0x9cf861){if(this['actions'][_0x10b2e6]){if(_[_0x6561('0x68')](this[_0x6561('0x6c')][_0x10b2e6][_0x6561('0x134')])){this[_0x6561('0x6c')][_0x10b2e6][_0x6561('0x134')]={};}this[_0x6561('0x6c')][_0x10b2e6][_0x6561('0x134')][_0x4eb5d0]=_0x9cf861;}};Preview[_0x6561('0x11')][_0x6561('0x26')]=function(_0x33b3fe){try{if(!_[_0x6561('0x68')](_0x33b3fe)){if(ut['filterKey'](_['keys'](_0x33b3fe[_0x6561('0x135')])[0x0])){this['addVariable'](_0x33b3fe[_0x6561('0xaa')],_[_0x6561('0x136')](_0x33b3fe['variable'])[0x0],_0x33b3fe[_0x6561('0x137')]);}}}catch(_0x1dfd41){logger[_0x6561('0x138')](_0x6561('0x139'),util[_0x6561('0x13a')](_0x1dfd41,{'showHidden':![],'depth':null}));}};Preview[_0x6561('0x11')][_0x6561('0x13b')]=function(_0x1fbd65){if(_0x1fbd65){if(this[_0x6561('0x6c')][_0x1fbd65[_0x6561('0x13c')]]){this['actions'][_0x1fbd65[_0x6561('0x13c')]][_0x6561('0x131')]=!![];}}};Preview[_0x6561('0x11')][_0x6561('0x28')]=function(_0x5a1bba){if(_0x5a1bba){if(this['actions'][_0x5a1bba[_0x6561('0x13d')]]){this['actions'][_0x5a1bba['transfererlinkedid']][_0x6561('0x131')]=!![];}}};module[_0x6561('0x13e')]=Preview;
\ No newline at end of file
+var _0xaf21=['[callProgressDetectingCustomer][logBusyGlobal]','dialBusyMaxRetry','rescheduleContact','scheduledAt','dialBusyRetryFrequency','NOANSWER','countnoanswerretry','[callProgressDetectingCustomer][logNoAnswer]','Global','[callProgressDetectingCustomer][logNoAnswerGlobal]','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','countcongestionretry','Congestion','[callProgressDetectingCustomer][logCongestion]','dialCongestionMaxRetry','CANCEL','countagentrejectretry','[syncHangupRequest][logAgentReject]','AgentReject','[callProgressDetectingCustomer][logAgentReject]','dialAgentRejectMaxRetry','ABANDONED','Abandoned','[callProgressDetectingCustomer][logAbandoned]','countabandonedetry','dialAbandonedMaxRety','countabandonedretry','[Dialer][decrementTalkink][no\x20Hangup][Preview]','cause-txt','dialstatus','[callProgressDetectingCustomer][logUnknownGlobal]','linkedid','updateOriginated','[callProgressDetectingCustomer]','originated:\x20','destlinkedid','callProgressDetectingAgent','isUndefined','object','reason','logAgent','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','NoAnswer','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[originated][decrement][callProgressDetectingAgent]','checkInBlack','Contact','phone','Contact\x20is\x20undefined','lookAgent','isEmpty','execCall','then','[Preview][execCall][success]','Queue:\x20','\x20IdHopper:\x20','custom:agentcalled','Calling','[Preview][execCall][failure]','Call\x20failed','logBlacklist','createHistory','[Blacklist][error]','SIP/%s','status','unmonitored','unlock','unlockContact','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','Call\x20unsuccessful','[Preview][getContactPreview]','[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','Trunk\x20not\x20work','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','Is\x20Valid','SIP/%s/%s%s','trim','dialCutDigit','getCallerId','callerid','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','originatecalleridname','extractCalleridName','originatecalleridnum','variablesAction','[originateFailure][logOriginateFailure]','syncNewExten','actionid','clone','isFailure','response','idContact','[callProgressDetectingAgent][logAnswer]','[syncHangup][talking]','cause','[syncHangup][talking][cause]','dialQueueProject','channelstate','transfer','[syncHangup][talking][transfer]','destuniqueid','syncHangupRequest','addVariable','variables','filterKey','keys','variable','value','error','inspect','transfertargetlinkedid','transfererlinkedid','util','uuid','moment','md5','ioredis','../../../config/environment','../../../config/logger','preview','actionPreview','../ami','./action','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','campaignsPreview','voiceQueues','trunks','agents','clockClearZombieChannels','originateresponse','syncOriginateResponse','bind','syncHangup','hanguprequest','syncDialEnd','varset','syncVarSet','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','type','strategy','answered','available','sumBillable','sumDuration','talking','total','unmanaged','abandoned','waiting','loggedInDb','dialActive','dialOriginateCallerIdName','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','outboundAbandonedCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','message','originated','erlangCalls','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','name','active','Interval','stringify','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','format','voice:queue:%s','voice_queue_channel:remove','sendMessageOneNotActive','pTalking','paused','NOT_ACTIVE','\x20is\x20not\x20active','IS_DISACTIVED','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','syncCampaigns','hasOwnProperty','dialMethod','booked','outbound','clearZombieChannels','setMessage','clearZombieChannel','sequence','isNil','actions','info','Queue','queue','pTalking:\x20','dialAnswer','pick','contactId','VoiceQueueId','ListId','Action','channel','No\x20such\x20channel','[clearZombieChannel]','decrementTalkink','loggerError','[Dialer][checkChannel][pTalking][Preview]','[Dialer][checkChannel][Preview]','size','recallMe','getContactRecallMe','agentReadyId','length','getDiff','scheduledat','Agent','voicePause','run','logger2','disableContact','starttime','outboundReCallsDay','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','createCustomerFinal','[HistoryRecallClose]','catch','IsNotLoggedIn','loggedIn','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','ACTIVE','callProgressDetectingCustomer','countnosuchnumberretry','countglobal','totalGlobal','logCustomer','NoSuchNumber','[callProgressDetectingCustomer][logNoSuch]','dialGlobalMaxRetry','cloneAction','[callProgressDetectingCustomer][logNoSuchGlobal]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','unlockAgent','activeContact','ANSWER','YYYY-MM-DD\x20HH:mm:ss','responsetime','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','emit','buildObj','connect','acw','custom:agentcomplete','complete','[16]','Answer','[callProgressDetectingCustomer][logAnswer]','crateCustomerReportQueue','talktime','outboundBusyCallsDay','countbusyretry','Busy','[callProgressDetectingCustomer][logBusy]'];(function(_0x348c0f,_0x196872){var _0x462ede=function(_0x22bfde){while(--_0x22bfde){_0x348c0f['push'](_0x348c0f['shift']());}};_0x462ede(++_0x196872);}(_0xaf21,0x83));var _0x1af2=function(_0x587273,_0x34ee16){_0x587273=_0x587273-0x0;var _0xfdb78d=_0xaf21[_0x587273];return _0xfdb78d;};'use strict';var util=require(_0x1af2('0x0'));var _=require('lodash');var BPromise=require('bluebird');var uuid=require(_0x1af2('0x1'));var moment=require(_0x1af2('0x2'));var md5=require(_0x1af2('0x3'));var Redis=require(_0x1af2('0x4'));var config=require(_0x1af2('0x5'));var logger=require(_0x1af2('0x6'))(_0x1af2('0x7'));var loggerAction=require(_0x1af2('0x6'))(_0x1af2('0x8'));var ami=require(_0x1af2('0x9'));var rpcDb=require('./rpcDb');var Action=require(_0x1af2('0xa'));var ut=require('./util/util');config[_0x1af2('0xb')]=_[_0x1af2('0xc')](config[_0x1af2('0xb')],{'host':_0x1af2('0xd'),'port':0x18eb});var io=require(_0x1af2('0xe'))(new Redis(config['redis']));var Sequence=function(){};Sequence[_0x1af2('0xf')][_0x1af2('0x10')]=function(_0x531403){this[_0x1af2('0x11')]=this['tail']?this[_0x1af2('0x11')]['finally'](_0x531403):_0x531403();};function Preview(_0xae7d77){this['sequence']=new Sequence();this[_0x1af2('0x12')]=_0xae7d77[_0x1af2('0x13')];this[_0x1af2('0x14')]=_0xae7d77[_0x1af2('0x14')];this['actions']={};this[_0x1af2('0x15')]=_0xae7d77[_0x1af2('0x15')];this[_0x1af2('0x16')]=0x0;ami['on'](_0x1af2('0x17'),this[_0x1af2('0x18')][_0x1af2('0x19')](this));ami['on']('hangup',this[_0x1af2('0x1a')]['bind'](this));ami['on'](_0x1af2('0x1b'),this['syncHangupRequest']['bind'](this));ami['on']('dialend',this[_0x1af2('0x1c')][_0x1af2('0x19')](this));ami['on']('newexten',this['syncNewExten'][_0x1af2('0x19')](this));ami['on'](_0x1af2('0x1d'),this[_0x1af2('0x1e')][_0x1af2('0x19')](this));ami['on'](_0x1af2('0x1f'),this[_0x1af2('0x20')][_0x1af2('0x19')](this));ami['on'](_0x1af2('0x21'),this[_0x1af2('0x22')][_0x1af2('0x19')](this));this['loopCampaigns'](this[_0x1af2('0x12')]);}function emit(_0x394bf2,_0x39913a,_0x58d230){io['to'](_0x394bf2)['emit'](_0x39913a,_0x58d230);}function emitCampaignPreview(_0x42318c){if(_0x42318c[_0x1af2('0x23')]==='outbound'){var _0x442234={'id':_0x42318c['id'],'name':_0x42318c['name'],'strategy':_0x42318c[_0x1af2('0x24')],'answered':_0x42318c[_0x1af2('0x25')],'available':_0x42318c[_0x1af2('0x26')],'loggedIn':_0x42318c['loggedIn'],'pTalking':_0x42318c['pTalking'],'sumBillable':_0x42318c[_0x1af2('0x27')],'sumDuration':_0x42318c[_0x1af2('0x28')],'sumHoldTime':_0x42318c['sumHoldTime']||0x0,'talking':_0x42318c[_0x1af2('0x29')],'total':_0x42318c[_0x1af2('0x2a')],'type':_0x42318c['type'],'unmanaged':_0x42318c[_0x1af2('0x2b')],'abandoned':_0x42318c[_0x1af2('0x2c')],'waiting':_0x42318c[_0x1af2('0x2d')],'loggedInDb':_0x42318c[_0x1af2('0x2e')],'dialActive':_0x42318c[_0x1af2('0x2f')],'dialMethod':_0x42318c['dialMethod'],'dialOriginateCallerIdName':_0x42318c[_0x1af2('0x30')],'dialOriginateCallerIdNumber':_0x42318c['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x42318c[_0x1af2('0x31')],'dialPrefix':_0x42318c[_0x1af2('0x32')],'outboundAnswerAgiCallsDay':_0x42318c[_0x1af2('0x33')],'outboundAnswerCallsDay':_0x42318c[_0x1af2('0x34')],'outboundBlacklistCallsDay':_0x42318c[_0x1af2('0x35')],'outboundBusyCallsDay':_0x42318c['outboundBusyCallsDay'],'outboundCongestionCallsDay':_0x42318c[_0x1af2('0x36')],'outboundDropCallsDayACS':_0x42318c[_0x1af2('0x37')],'outboundDropCallsDayCallersExit':_0x42318c[_0x1af2('0x38')],'outboundDropCallsDayTimeout':_0x42318c[_0x1af2('0x39')],'outboundNoAnswerCallsDay':_0x42318c[_0x1af2('0x3a')],'outboundNoSuchCallsDay':_0x42318c[_0x1af2('0x3b')],'outboundOriginateFailureCallsDay':_0x42318c[_0x1af2('0x3c')],'outboundReCallsDay':_0x42318c['outboundReCallsDay'],'outboundRejectCallsDay':_0x42318c[_0x1af2('0x3d')],'outboundUnknownCallsDay':_0x42318c[_0x1af2('0x3e')],'outboundAbandonedCallsDay':_0x42318c[_0x1af2('0x3f')],'predictiveIntervalAnsweredCalls':_0x42318c[_0x1af2('0x40')],'predictiveIntervalAvgHoldtime':_0x42318c[_0x1af2('0x41')],'predictiveIntervalAvgTalktime':_0x42318c[_0x1af2('0x42')],'predictiveIntervalDroppedCallsCallersExit':_0x42318c[_0x1af2('0x43')],'predictiveIntervalDroppedCallsTimeout':_0x42318c[_0x1af2('0x44')],'predictiveIntervalErlangCalls':_0x42318c[_0x1af2('0x45')],'predictiveIntervalErlangCallsDroppedCalls':_0x42318c['predictiveIntervalErlangCallsDroppedCalls'],'predictiveIntervalHitRate':_0x42318c['predictiveIntervalHitRate'],'predictiveIntervalMultiplicativeFactor':_0x42318c[_0x1af2('0x46')],'predictiveIntervalPauses':_0x42318c[_0x1af2('0x47')],'predictiveIntervalAvailable':_0x42318c['predictiveIntervalAvailable'],'predictiveIntervalTotalCalls':_0x42318c['predictiveIntervalTotalCalls'],'message':_0x42318c[_0x1af2('0x48')],'originated':_0x42318c[_0x1af2('0x49')],'erlangCalls':_0x42318c[_0x1af2('0x4a')],'erlangCallToSecond':_0x42318c['erlangCallToSecond'],'erlangAbandonmentRate':_0x42318c[_0x1af2('0x4b')],'erlangBusyFactor':_0x42318c[_0x1af2('0x4c')],'startPredictive':_0x42318c[_0x1af2('0x4d')],'startProgressive':_0x42318c[_0x1af2('0x4e')]};if(_0x42318c[_0x1af2('0x4f')]){_0x442234[_0x1af2('0x4f')]={'id':_0x42318c[_0x1af2('0x4f')]['id'],'name':_0x42318c[_0x1af2('0x4f')][_0x1af2('0x50')],'active':_0x42318c[_0x1af2('0x4f')][_0x1af2('0x51')],'callerid':_0x42318c['Trunk']['callerid']};}if(_0x42318c[_0x1af2('0x52')]){_0x442234[_0x1af2('0x52')]={'id':_0x42318c[_0x1af2('0x52')]['id'],'name':_0x42318c['Interval'][_0x1af2('0x50')]};}var _0x37110e=md5(JSON[_0x1af2('0x53')](_0x442234));if(_0x42318c[_0x1af2('0x3')]!==_0x37110e){_0x42318c[_0x1af2('0x3')]=_0x37110e;emit(util['format']('voice:queue:%s',_0x442234[_0x1af2('0x50')]),'voice_queue:save',_0x442234);}}}function emitVoiceQueueChannelRemove(_0x38545f){logger['info'](_0x1af2('0x54'),JSON[_0x1af2('0x53')](_0x38545f));emit(util[_0x1af2('0x55')](_0x1af2('0x56'),_0x38545f[_0x1af2('0x50')]),_0x1af2('0x57'),_0x38545f);}function notSendMessagesQueue(_0x29e419){if(_0x29e419[_0x1af2('0x58')]){if(_0x29e419[_0x1af2('0x49')]===0x0&&_0x29e419[_0x1af2('0x59')]===0x0){_0x29e419[_0x1af2('0x58')]=![];_0x29e419[_0x1af2('0x26')]=0x0;_0x29e419[_0x1af2('0x5a')]=0x0;_0x29e419[_0x1af2('0x48')]=_0x1af2('0x5b');ut['logger']('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x29e419['name']+_0x1af2('0x5c'));}else{_0x29e419[_0x1af2('0x48')]=_0x1af2('0x5d');ut[_0x1af2('0x5e')](_0x1af2('0x5f'),_0x29e419['name']+'\x20is\x20disactive');}emitCampaignPreview(_0x29e419);}}Preview[_0x1af2('0xf')]['loopCampaigns']=function(){var _0x13446d=this;setInterval(function(){_0x13446d[_0x1af2('0x60')]();},0x7cf);};Preview[_0x1af2('0xf')][_0x1af2('0x60')]=function(){var _0x17cf46=this[_0x1af2('0x12')];this[_0x1af2('0x16')]+=0x1;for(var _0x113169 in _0x17cf46){if(_0x17cf46[_0x1af2('0x61')](_0x113169)&&(_0x17cf46[_0x113169][_0x1af2('0x62')]===_0x1af2('0x7')||_0x17cf46[_0x113169]['dialMethod']===_0x1af2('0x63'))&&_0x17cf46[_0x113169]['type']===_0x1af2('0x64')){if(this[_0x1af2('0x16')]>0x7){this[_0x1af2('0x16')]=0x0;this[_0x1af2('0x65')]();}}if(_0x17cf46[_0x1af2('0x61')](_0x113169)&&_0x17cf46[_0x113169][_0x1af2('0x62')]===_0x1af2('0x7')&&_0x17cf46[_0x113169][_0x1af2('0x23')]===_0x1af2('0x64')){if(_0x17cf46[_0x113169][_0x1af2('0x2f')]){this[_0x1af2('0x66')](_0x17cf46[_0x113169]);this['recallMe'](_0x17cf46[_0x113169]);}else{notSendMessagesQueue(_0x17cf46[_0x113169]);}}}};Preview[_0x1af2('0xf')][_0x1af2('0x67')]=function(_0x918207){var _0x30313d=this;this[_0x1af2('0x68')][_0x1af2('0x10')](function(){if(!_[_0x1af2('0x69')](_0x30313d[_0x1af2('0x6a')][_0x918207])){loggerAction[_0x1af2('0x6b')]('[clearZombieChannels][talking]',_0x918207,_0x1af2('0x6c'),_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x6d')],'originated:\x20',JSON[_0x1af2('0x53')](_0x30313d['campaignsPreview'][_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x6d')]][_0x1af2('0x49')]),_0x1af2('0x6e'),JSON[_0x1af2('0x53')](_0x30313d[_0x1af2('0x12')][_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x6d')]]['pTalking']),JSON[_0x1af2('0x53')](_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x6f')]),JSON[_0x1af2('0x53')](_[_0x1af2('0x70')](_0x30313d[_0x1af2('0x6a')][_0x918207],[_0x1af2('0x71'),'UserId',_0x1af2('0x72'),_0x1af2('0x73')])));return ami[_0x1af2('0x74')]({'action':'status','channel':_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x75')]})['catch'](function(_0x321c49){if(_0x321c49[_0x1af2('0x48')]===_0x1af2('0x76')){setTimeout(function(){if(_0x30313d[_0x1af2('0x6a')][_0x918207]){ut['updateOriginated'](_0x30313d[_0x1af2('0x12')][_0x30313d[_0x1af2('0x6a')][_0x918207]['queue']],_0x1af2('0x77'));if(_0x30313d[_0x1af2('0x6a')][_0x918207]['dialAnswer']===!![]){ut[_0x1af2('0x78')](_0x30313d['campaignsPreview'][_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x6d')]],_0x1af2('0x77'));ut[_0x1af2('0x79')](_0x1af2('0x7a')+_0x918207,_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x6d')]);}ut[_0x1af2('0x79')](_0x1af2('0x7b')+_0x918207,_0x30313d[_0x1af2('0x6a')][_0x918207][_0x1af2('0x6d')]);delete _0x30313d['actions'][_0x918207];}},0x2328);}});}});};Preview['prototype'][_0x1af2('0x65')]=function(){var _0x507d82=this;loggerAction[_0x1af2('0x6b')]('[action]',_[_0x1af2('0x7c')](this[_0x1af2('0x6a')]));for(var _0x2fa950 in this['actions']){if(_0x507d82[_0x1af2('0x6a')][_0x1af2('0x61')](_0x2fa950)){_0x507d82[_0x1af2('0x67')](_0x2fa950);}}};Preview[_0x1af2('0xf')][_0x1af2('0x7d')]=function(_0x11bf47){var _0x4014f3=this;rpcDb[_0x1af2('0x7e')](_0x11bf47['id'],ut[_0x1af2('0x7f')](this['agents']))['then'](function(_0x27b2ac){if(!_[_0x1af2('0x69')](_0x27b2ac)){for(var _0x441f87=0x0;_0x441f87<_0x27b2ac[_0x1af2('0x80')];_0x441f87+=0x1){if(ut[_0x1af2('0x81')](_0x27b2ac[_0x441f87][_0x1af2('0x82')])<_0x11bf47['dialRecallMeTimeout']*0x3c){if(_0x27b2ac[_0x441f87][_0x1af2('0x83')]&&!_0x27b2ac[_0x441f87][_0x1af2('0x83')][_0x1af2('0x84')]){_0x4014f3[_0x1af2('0x85')](_0x27b2ac[_0x441f87]['id'])['then'](ut['logger2']('[RecallMe]'))['catch'](ut[_0x1af2('0x86')]('[RecallMe]'));}else{rpcDb[_0x1af2('0x87')](_0x27b2ac[_0x441f87]['id']);}}else{var _0x512fc4=new Action(_0x27b2ac[_0x441f87],_0x11bf47);_0x512fc4[_0x1af2('0x88')]=moment()[_0x1af2('0x55')]('YYYY-MM-DD\x20HH:mm:ss');_0x11bf47[_0x1af2('0x89')]+=0x1;ut['logCustomer'](_0x512fc4,0x17,_0x1af2('0x8a'));if(_0x11bf47[_0x1af2('0x8b')]){rpcDb[_0x1af2('0x8c')](ut[_0x1af2('0x8d')](_0x27b2ac[_0x441f87]));rpcDb[_0x1af2('0x8e')](_0x512fc4,_0x1af2('0x8f'));}else{ut['logCustomer'](_0x512fc4,0x16,_0x1af2('0x90'));rpcDb[_0x1af2('0x8e')](_0x512fc4,'[HistoryRecallClose]');rpcDb[_0x1af2('0x91')](_0x512fc4,_0x1af2('0x92'));}}}}})[_0x1af2('0x93')](ut[_0x1af2('0x86')]('[getContactRecallMe]'));};Preview[_0x1af2('0xf')][_0x1af2('0x66')]=function(_0x169298){_0x169298[_0x1af2('0x58')]=!![];if(ut[_0x1af2('0x94')](_0x169298[_0x1af2('0x95')])){_0x169298[_0x1af2('0x48')]=_0x1af2('0x96');}else if(!ut[_0x1af2('0x97')](_0x169298[_0x1af2('0x2f')])){_0x169298[_0x1af2('0x48')]=_0x1af2('0x5b');}else if(!this[_0x1af2('0x98')](_0x169298['Trunk'])){if(!this[_0x1af2('0x98')](_0x169298[_0x1af2('0x99')])){_0x169298[_0x1af2('0x48')]='TRUNK_IS_NOT_REACHABLE';}else{_0x169298[_0x1af2('0x48')]=_0x1af2('0x9a');}}else{_0x169298['message']='ACTIVE';}emitCampaignPreview(_0x169298);};Preview[_0x1af2('0xf')][_0x1af2('0x9b')]=function(_0x8c9957,_0xb41dd3,_0x2aff98){var _0xd23d96=this;var _0x51cbc6=this[_0x1af2('0x6a')][_0xb41dd3];var _0x3e9353=this[_0x1af2('0x12')][_0x51cbc6[_0x1af2('0x6d')]];var _0x1f50f6;if(_0x3e9353){switch(_0x2aff98){case'1':_0x3e9353[_0x1af2('0x3b')]+=0x1;_0x51cbc6[_0x1af2('0x9c')]+=0x1;_0x51cbc6[_0x1af2('0x9d')]=ut[_0x1af2('0x9e')](_0x51cbc6);ut[_0x1af2('0x9f')](_0x51cbc6,0x0,_0x1af2('0xa0'));rpcDb[_0x1af2('0x8e')](_0x51cbc6,_0x1af2('0xa1'));if(ut[_0x1af2('0x9e')](_0x51cbc6)>=_0x3e9353[_0x1af2('0xa2')]){_0x1f50f6=ut[_0x1af2('0xa3')](_0x51cbc6,0xf,'Global');rpcDb[_0x1af2('0x91')](_0x1f50f6,_0x1af2('0xa4'));}else{if(_0x51cbc6[_0x1af2('0x9c')]>=_0x3e9353[_0x1af2('0xa5')]){rpcDb[_0x1af2('0x91')](_0x51cbc6,_0x1af2('0xa4'));}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x51cbc6,_0x1af2('0x9c'),_0x3e9353[_0x1af2('0xa6')]),_0x51cbc6[_0x1af2('0xa7')],_0x51cbc6[_0x1af2('0xa8')]);}}delete this[_0x1af2('0x6a')][_0x8c9957['linkedid']];break;case _0x1af2('0xa9'):var _0x2ac64e=moment()[_0x1af2('0x55')](_0x1af2('0xaa'));_0x51cbc6[_0x1af2('0xab')]=_0x2ac64e;_0x51cbc6[_0x1af2('0xac')]=_0x2ac64e;_0x51cbc6['dialAnswer']=!![];_0x3e9353[_0x1af2('0x59')]+=0x1;logger[_0x1af2('0x6b')](_0x1af2('0xad'),_0x51cbc6[_0x1af2('0xae')],_0x1af2('0xaf'),_0x3e9353[_0x1af2('0x50')],_0x1af2('0x6e'),_0x3e9353[_0x1af2('0x59')]);ami[_0x1af2('0xb0')]('custom:agentconnect',ut[_0x1af2('0xb1')](_0x51cbc6,_0x1af2('0xb2')));if(_0x3e9353[_0x1af2('0xb3')]){ami[_0x1af2('0xb0')]('custom:agentConnectPreview',ut['buildAcw'](_0x51cbc6));}break;case'16':ami[_0x1af2('0xb0')](_0x1af2('0xb4'),ut[_0x1af2('0xb1')](_0x51cbc6,_0x1af2('0xb5')));emitVoiceQueueChannelRemove(ut[_0x1af2('0xb1')](_0x51cbc6,_0x1af2('0xb5')));_0x3e9353[_0x1af2('0x34')]+=0x1;_0x3e9353['total']+=0x1;_0x3e9353['answered']+=0x1;ut['decrementTalkink'](_0x3e9353,_0x1af2('0xb6'));_0x51cbc6[_0x1af2('0x9d')]=ut['totalGlobal'](_0x51cbc6);ut[_0x1af2('0x9f')](_0x51cbc6,0x4,_0x1af2('0xb7'));rpcDb[_0x1af2('0x8e')](_0x51cbc6,_0x1af2('0xb8'));rpcDb[_0x1af2('0x91')](_0x51cbc6,'[callProgressDetectingCustomer][logAnswerGlobal]');rpcDb[_0x1af2('0xb9')](_0x51cbc6);_0x3e9353[_0x1af2('0x28')]+=_0x51cbc6[_0x1af2('0xba')];_0x3e9353[_0x1af2('0x27')]+=_0x51cbc6[_0x1af2('0xba')];logger[_0x1af2('0x6b')]('[syncHangup][talking][decrement]',_0x51cbc6[_0x1af2('0xae')],_0x1af2('0xaf'),_0x3e9353['name'],'pTalking:\x20',_0x3e9353[_0x1af2('0x59')]);delete this['actions'][_0x8c9957['linkedid']];break;case'BUSY':_0x3e9353[_0x1af2('0xbb')]+=0x1;_0x51cbc6[_0x1af2('0xbc')]+=0x1;_0x51cbc6[_0x1af2('0x9d')]=ut[_0x1af2('0x9e')](_0x51cbc6);ut[_0x1af2('0x9f')](_0x51cbc6,0x5,_0x1af2('0xbd'));rpcDb[_0x1af2('0x8e')](_0x51cbc6,_0x1af2('0xbe'));if(ut[_0x1af2('0x9e')](_0x51cbc6)>=_0x3e9353[_0x1af2('0xa2')]){_0x1f50f6=ut['cloneAction'](_0x51cbc6,0xf,'Global');rpcDb[_0x1af2('0x91')](_0x1f50f6,_0x1af2('0xbf'));}else{if(_0x51cbc6[_0x1af2('0xbc')]>=_0x3e9353[_0x1af2('0xc0')]){rpcDb[_0x1af2('0x91')](_0x51cbc6,_0x1af2('0xbe'));}else{rpcDb[_0x1af2('0xc1')](ut[_0x1af2('0xc2')](_0x51cbc6,_0x1af2('0xbc'),_0x3e9353[_0x1af2('0xc3')]),_0x51cbc6['unlockAgent'],_0x51cbc6[_0x1af2('0xa8')]);}}break;case _0x1af2('0xc4'):_0x3e9353[_0x1af2('0x3a')]+=0x1;_0x51cbc6[_0x1af2('0xc5')]+=0x1;_0x51cbc6[_0x1af2('0x9d')]=ut[_0x1af2('0x9e')](_0x51cbc6);ut[_0x1af2('0x9f')](_0x51cbc6,0x3,'NoAnswer');rpcDb['createCustomerHistory'](_0x51cbc6,_0x1af2('0xc6'));if(ut[_0x1af2('0x9e')](_0x51cbc6)>=_0x3e9353[_0x1af2('0xa2')]){_0x1f50f6=ut[_0x1af2('0xa3')](_0x51cbc6,0xf,_0x1af2('0xc7'));rpcDb[_0x1af2('0x91')](_0x1f50f6,_0x1af2('0xc8'));}else{if(_0x51cbc6[_0x1af2('0xc5')]>=_0x3e9353[_0x1af2('0xc9')]){rpcDb['createCustomerFinal'](_0x51cbc6,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb[_0x1af2('0xc1')](ut[_0x1af2('0xc2')](_0x51cbc6,_0x1af2('0xc5'),_0x3e9353[_0x1af2('0xca')]),_0x51cbc6['unlockAgent'],_0x51cbc6[_0x1af2('0xa8')]);}}break;case'CONGESTION':_0x3e9353[_0x1af2('0x36')]+=0x1;_0x51cbc6[_0x1af2('0xcb')]+=0x1;_0x51cbc6['countglobal']=ut[_0x1af2('0x9e')](_0x51cbc6);ut['logCustomer'](_0x51cbc6,0x8,_0x1af2('0xcc'));rpcDb[_0x1af2('0x8e')](_0x51cbc6,_0x1af2('0xcd'));if(ut[_0x1af2('0x9e')](_0x51cbc6)>=_0x3e9353[_0x1af2('0xa2')]){_0x1f50f6=ut['cloneAction'](_0x51cbc6,0xf,_0x1af2('0xc7'));rpcDb['createCustomerFinal'](_0x1f50f6,'[callProgressDetectingCustomer][logCongestionGlobal]');}else{if(_0x51cbc6[_0x1af2('0xcb')]>=_0x3e9353[_0x1af2('0xce')]){rpcDb[_0x1af2('0x91')](_0x51cbc6,'[callProgressDetectingCustomer][logCongestion]');}else{rpcDb['rescheduleContact'](ut[_0x1af2('0xc2')](_0x51cbc6,_0x1af2('0xcb'),_0x3e9353[_0x1af2('0xc3')]),_0x51cbc6['unlockAgent'],_0x51cbc6['activeContact']);}}break;case _0x1af2('0xcf'):_0x3e9353[_0x1af2('0x3d')]+=0x1;_0x51cbc6[_0x1af2('0xd0')]+=0x1;_0x51cbc6[_0x1af2('0x9d')]=ut[_0x1af2('0x9e')](_0x51cbc6);ut['logCustomer'](_0x51cbc6,0x14,'AgentReject');rpcDb['createCustomerHistory'](_0x51cbc6,_0x1af2('0xd1'));if(ut['totalGlobal'](_0x51cbc6)>=_0x3e9353['dialGlobalMaxRetry']){_0x1f50f6=ut[_0x1af2('0xa3')](_0x51cbc6,0x14,_0x1af2('0xd2'));rpcDb[_0x1af2('0x91')](_0x1f50f6,_0x1af2('0xd3'));}else{if(_0x51cbc6['countagentrejectretry']>=_0x3e9353[_0x1af2('0xd4')]){rpcDb[_0x1af2('0x91')](_0x51cbc6,_0x1af2('0xd3'));}else{rpcDb[_0x1af2('0xc1')](ut[_0x1af2('0xc2')](_0x51cbc6,_0x1af2('0xd0'),_0x3e9353['dialAgentRejectRetryFrequency']),_0x51cbc6['unlockAgent'],_0x51cbc6['activeContact']);}}break;case _0x1af2('0xd5'):_0x3e9353['outboundAbandonedCallsDay']+=0x1;_0x51cbc6['countabandonedretry']+=0x1;_0x51cbc6[_0x1af2('0x9d')]=ut['totalGlobal'](_0x51cbc6);ut['logCustomer'](_0x51cbc6,0xb,_0x1af2('0xd6'));rpcDb[_0x1af2('0x8e')](_0x51cbc6,'[callProgressDetectingCustomer][logAbandoned]');if(ut['totalGlobal'](_0x51cbc6)>=_0x3e9353['dialGlobalMaxRetry']){_0x1f50f6=ut[_0x1af2('0xa3')](_0x51cbc6,0xf,_0x1af2('0xc7'));rpcDb[_0x1af2('0x91')](_0x1f50f6,_0x1af2('0xd7'));}else{if(_0x51cbc6[_0x1af2('0xd8')]>=_0x3e9353[_0x1af2('0xd9')]){rpcDb[_0x1af2('0x91')](_0x51cbc6,'[callProgressDetectingCustomer][logAbandoned]');}else{rpcDb[_0x1af2('0xc1')](ut[_0x1af2('0xc2')](_0x51cbc6,_0x1af2('0xda'),_0x3e9353['dialAbandonedRetryFrequency']),_0x51cbc6[_0x1af2('0xa7')],_0x51cbc6[_0x1af2('0xa8')]);}}break;default:if(_0x51cbc6[_0x1af2('0x6f')]){ut[_0x1af2('0x78')](_0x3e9353,'[default]');ut[_0x1af2('0x79')](_0x1af2('0xdb')+_0x3e9353['name'],_0x8c9957);}_0x3e9353['outboundUnknownCallsDay']+=0x1;_0x51cbc6[_0x1af2('0x9d')]=ut[_0x1af2('0x9e')](_0x51cbc6);ut[_0x1af2('0x9f')](_0x51cbc6,0xc,_0x8c9957[_0x1af2('0xdc')]||_0x8c9957[_0x1af2('0xdd')]);rpcDb['createCustomerHistory'](_0x51cbc6,'[callProgressDetectingCustomer][logUnknown]');if(ut['totalGlobal'](_0x51cbc6)>=_0x3e9353[_0x1af2('0xa2')]){_0x1f50f6=ut['cloneAction'](_0x51cbc6,0xf,_0x1af2('0xc7'));rpcDb[_0x1af2('0x91')](_0x1f50f6,_0x1af2('0xde'));}else{rpcDb['createCustomerFinal'](_0x51cbc6,_0x1af2('0xde'));}delete this[_0x1af2('0x6a')][_0x8c9957[_0x1af2('0xdf')]];}if(!(_0x51cbc6[_0x1af2('0x6f')]&&_0x2aff98==='16')){ut[_0x1af2('0xe0')](_0x3e9353,_0x1af2('0xe1'));logger[_0x1af2('0x6b')]('[originated][decrement][callProgressDetectingCustomer]',_0x51cbc6[_0x1af2('0xae')],'\x20Queue',_0x3e9353[_0x1af2('0x50')],_0x1af2('0xe2'),_0x3e9353[_0x1af2('0x49')]);}if(_0x2aff98!==_0x1af2('0xa9')){delete this[_0x1af2('0x6a')][_0x8c9957[_0x1af2('0xdf')]];delete this[_0x1af2('0x6a')][_0x8c9957[_0x1af2('0xe3')]];}}};Preview[_0x1af2('0xf')][_0x1af2('0xe4')]=function(_0xbb8b83,_0x227e6,_0xab7dd9){if(_[_0x1af2('0xe5')](_0x227e6)&&_0x1af2('0xe6')!==typeof _0x227e6){return;}if(_['isUndefined'](_0xab7dd9)&&_0x1af2('0xe6')!==typeof _0xab7dd9){return;}switch(_0xab7dd9[_0x1af2('0xe7')]){case'0':ut[_0x1af2('0xe8')](_0xbb8b83,0x0,_0x1af2('0xa0'));rpcDb[_0x1af2('0xe9')](_0xbb8b83,_0x1af2('0xea'));break;case'3':ut[_0x1af2('0xe8')](_0xbb8b83,0x3,_0x1af2('0xeb'));rpcDb[_0x1af2('0xe9')](_0xbb8b83,_0x1af2('0xec'));break;case'5':ut[_0x1af2('0xe8')](_0xbb8b83,0x5,_0x1af2('0xbd'));rpcDb[_0x1af2('0xe9')](_0xbb8b83,'[callProgressDetectingAgent][logBusy]');break;case'8':ut[_0x1af2('0xe8')](_0xbb8b83,0x8,'Congestion');rpcDb[_0x1af2('0xe9')](_0xbb8b83,_0x1af2('0xed'));break;case'22':ut[_0x1af2('0xe8')](_0xbb8b83,0x16,_0x1af2('0xee'));rpcDb[_0x1af2('0xe9')](_0xbb8b83,_0x1af2('0xef'));break;default:ut[_0x1af2('0xe8')](_0xbb8b83,0xc,_0xab7dd9['reason']);rpcDb[_0x1af2('0xe9')](_0xbb8b83,'[callProgressDetectingAgent][logCongestion]');}ut[_0x1af2('0xe0')](_0x227e6,'[callProgressDetectingAgent]');logger[_0x1af2('0x6b')](_0x1af2('0xf0'),_0xbb8b83[_0x1af2('0xae')],_0x1af2('0xaf'),_0x227e6['name'],_0x1af2('0xe2'),_0x227e6[_0x1af2('0x49')]);delete this['actions'][_0xbb8b83[_0x1af2('0xae')]];};Preview[_0x1af2('0xf')][_0x1af2('0xf1')]=function(_0x440267,_0x50e40c,_0x1e9098,_0x5d612b,_0xb2670d){var _0x2b985=this;return new BPromise(function(_0x2674fe,_0x229cdd){if(_[_0x1af2('0x69')](_0x50e40c)||_['isNil'](_0x50e40c[_0x1af2('0xf2')])||_['isNil'](_0x50e40c[_0x1af2('0xf2')][_0x1af2('0xf3')])||_[_0x1af2('0x69')](_0x50e40c[_0x1af2('0x72')])){_0x229cdd(ut[_0x1af2('0x48')](_0x1af2('0xf4'),_0x5d612b,_0xb2670d));return;}var _0x16aab1=uuid['v4']();var _0x1e5255=_0x2b985['campaignsPreview'][_0x50e40c[_0x1af2('0x6c')][_0x1af2('0x50')]];var _0x4cb39b=_0x1e9098?_0x2b985['agents'][_0x1e9098]['id']:undefined;_0x2b985['actions'][_0x16aab1]=new Action(_0x50e40c,_0x1e5255,_0x16aab1,_0x1e9098,_0x4cb39b);var _0x136054=_0x2b985[_0x1af2('0x6a')][_0x16aab1];_0x136054[_0x1af2('0xa7')]=_0x5d612b;_0x136054[_0x1af2('0xa8')]=_0xb2670d;_0x136054[_0x1af2('0xf5')]=_0x1e9098;if(_[_0x1af2('0xf6')](_0x440267)){_0x2b985[_0x1af2('0xf7')](_0x136054,_0x1e5255,_0x50e40c,_0x1e9098)[_0x1af2('0xf8')](function(_0x274411){logger[_0x1af2('0x6b')](_0x1af2('0xf9'),_0x1af2('0xfa')+_0x136054[_0x1af2('0x6d')]+_0x1af2('0xfb')+_0x136054['idContact'],JSON['stringify'](_0x274411));ami['emit'](_0x1af2('0xfc'),ut[_0x1af2('0xb1')](_0x136054,'called'));_0x2674fe(ut['message'](_0x1af2('0xfd')));})['catch'](function(_0x502385){ut['logger'](_0x1af2('0xfe'),_0x502385);_0x229cdd(ut[_0x1af2('0x48')](_0x1af2('0xff'),_0x5d612b,_0xb2670d));});}else{_0x1e5255[_0x1af2('0x35')]+=0x1;ut[_0x1af2('0x100')](_0x136054);rpcDb[_0x1af2('0x101')](_0x136054,_0x1af2('0x102'));delete _0x2b985[_0x1af2('0x6a')][_0x16aab1];_0x229cdd(ut[_0x1af2('0x48')]('Contact\x20in\x20black\x20List',_0x5d612b,_0xb2670d));}});};Preview[_0x1af2('0xf')][_0x1af2('0x98')]=function(_0x396cd6){return!_[_0x1af2('0x69')](_0x396cd6)&&!_[_0x1af2('0x69')](_0x396cd6[_0x1af2('0x50')])&&!_[_0x1af2('0x69')](_0x396cd6[_0x1af2('0x51')])&&_0x396cd6[_0x1af2('0x51')]&&!_[_0x1af2('0x69')](this[_0x1af2('0x14')][util[_0x1af2('0x55')](_0x1af2('0x103'),_0x396cd6[_0x1af2('0x50')])])&&!_[_0x1af2('0x69')](this[_0x1af2('0x14')][util[_0x1af2('0x55')](_0x1af2('0x103'),_0x396cd6[_0x1af2('0x50')])][_0x1af2('0x104')])&&(this[_0x1af2('0x14')][util[_0x1af2('0x55')](_0x1af2('0x103'),_0x396cd6[_0x1af2('0x50')])][_0x1af2('0x104')]==='reachable'||this[_0x1af2('0x14')][util['format'](_0x1af2('0x103'),_0x396cd6['name'])][_0x1af2('0x104')]===_0x1af2('0x105'));};Preview[_0x1af2('0xf')][_0x1af2('0x85')]=function(_0x70b36c,_0x44de66){var _0x54a093=this;return new BPromise(function(_0x3d2157,_0x4cd2e9){_0x54a093['execRun'](_0x70b36c,_0x44de66)[_0x1af2('0xf8')](function(_0x4194bf){_0x3d2157(_[_0x1af2('0x70')](_0x4194bf,[_0x1af2('0x48')]));})[_0x1af2('0x93')](function(_0x4d3e64){if(_0x4d3e64[_0x1af2('0x106')]){rpcDb[_0x1af2('0x107')](_0x70b36c);}if(_0x4d3e64['active']){rpcDb[_0x1af2('0x87')](_0x70b36c);}_0x4cd2e9(_[_0x1af2('0x70')](_0x4d3e64,[_0x1af2('0x48')]));});});};Preview[_0x1af2('0xf')]['execRun']=function(_0x1b4ef0,_0x1429fd){var _0x410c4a=this;return new BPromise(function(_0x13bac7,_0x292ad2){var _0x5b726e,_0x3684eb;rpcDb[_0x1af2('0x108')](_0x1b4ef0)['then'](function(_0x568522){if(!_[_0x1af2('0x69')](_0x568522[0x0])){_0x3684eb=_0x568522[0x0][_0x1af2('0x109')]?![]:!![];_0x5b726e=_0x568522[0x0][_0x1af2('0x109')]?!![]:![];_0x5b726e=_0x1429fd?!![]:_0x5b726e;}var _0x4828c3=_0x410c4a[_0x1af2('0x10a')](_0x568522);if(_0x4828c3[_0x1af2('0x10b')]){rpcDb[_0x1af2('0x10c')](_[_0x1af2('0x70')](_0x568522[0x0],[_0x1af2('0x72'),'Contact.phone']))[_0x1af2('0xf8')](function(_0x323e84){_0x410c4a[_0x1af2('0xf1')](_0x323e84,_0x568522[0x0],_0x1429fd,_0x3684eb,_0x5b726e)[_0x1af2('0xf8')](function(_0x52e1ff){_0x13bac7(_0x52e1ff);})['catch'](function(_0x374dbc){_0x292ad2(_0x374dbc);});})['catch'](function(_0x22f238){ut[_0x1af2('0x5e')]('[Preview][checkIsBlackList]',_0x22f238);_0x292ad2(ut[_0x1af2('0x48')](_0x1af2('0x10d'),_0x3684eb,_0x5b726e));});}else{_0x292ad2(ut['message'](_0x4828c3[_0x1af2('0x48')],_0x3684eb,_0x5b726e));}})[_0x1af2('0x93')](function(_0x32efe7){ut['logger'](_0x1af2('0x10e'),_0x32efe7);_0x292ad2(ut['message'](_0x1af2('0x10d'),![],!![]));});});};Preview[_0x1af2('0xf')][_0x1af2('0x10a')]=function(_0x44a785){if(_[_0x1af2('0x69')](_0x44a785)||_[_0x1af2('0xf6')](_0x44a785)||!_[_0x1af2('0x69')](_0x44a785[0x0]['Agent'])&&_[_0x1af2('0x69')](_0x44a785[0x0][_0x1af2('0x83')][_0x1af2('0x50')])){ut[_0x1af2('0x5e')](_0x1af2('0x10f'),_0x44a785);return{'isValid':![],'message':_0x1af2('0x110')};}var _0x474760=this[_0x1af2('0x12')][_0x44a785[0x0][_0x1af2('0x6c')][_0x1af2('0x50')]];_0x474760[_0x1af2('0x48')]=_0x1af2('0x9a');if(_[_0x1af2('0x69')](_0x474760)){ut[_0x1af2('0x5e')](_0x1af2('0x111'),_0x474760);return{'isValid':![],'message':_0x1af2('0x112')};}if(!this[_0x1af2('0x98')](_0x474760[_0x1af2('0x4f')])){ut[_0x1af2('0x5e')](_0x1af2('0x113'),_0x1af2('0x114')+_0x474760[_0x1af2('0x50')]+_0x1af2('0x115'));if(!this[_0x1af2('0x98')](_0x474760['TrunkBackup'])){ut['logger']('[Preview][validateContact][Trunk\x20not\x20work]',_0x474760[_0x1af2('0x50')]+_0x1af2('0x116'));return{'isValid':![],'message':_0x1af2('0x117')};}}if(!ut['isActive'](_0x474760[_0x1af2('0x2f')])){ut[_0x1af2('0x5e')](_0x1af2('0x118'),_0x474760[_0x1af2('0x50')]+_0x1af2('0x119'));return{'isValid':![],'message':_0x1af2('0x114')+_0x474760['name']+_0x1af2('0x119')};}return{'isValid':!![],'message':_0x1af2('0x11a')};};Preview[_0x1af2('0xf')]['execCall']=function(_0x31f978,_0x404962,_0x58d84d,_0x4b81af){var _0x903c51=this;return new BPromise(function(_0x1ae4af,_0x2df057){var _0x3a4ae1=_0x31f978[_0x1af2('0xae')];var _0x15fdc3=_0x903c51['isTrunkReachable'](_0x404962[_0x1af2('0x4f')])?util['format'](_0x1af2('0x11b'),_0x404962[_0x1af2('0x4f')][_0x1af2('0x50')],_[_0x1af2('0x69')](_0x404962[_0x1af2('0x32')])?'':_0x404962['dialPrefix'][_0x1af2('0x11c')]()||'',_0x404962[_0x1af2('0x11d')]>0x0?_0x58d84d[_0x1af2('0xf2')][_0x1af2('0xf3')]['substring'](_0x404962[_0x1af2('0x11d')]):_0x58d84d[_0x1af2('0xf2')][_0x1af2('0xf3')]):util[_0x1af2('0x55')]('SIP/%s/%s%s',_[_0x1af2('0x69')](_0x404962[_0x1af2('0x99')])?_0x404962[_0x1af2('0x4f')][_0x1af2('0x50')]:_0x404962[_0x1af2('0x99')][_0x1af2('0x50')],_[_0x1af2('0x69')](_0x404962[_0x1af2('0x32')])?'':_0x404962[_0x1af2('0x32')]['trim']()||'',_0x404962[_0x1af2('0x11d')]>0x0?_0x58d84d[_0x1af2('0xf2')][_0x1af2('0xf3')]['substring'](_0x404962[_0x1af2('0x11d')]):_0x58d84d['Contact'][_0x1af2('0xf3')]);var _0x1da7aa=_0x903c51['isTrunkReachable'](_0x404962[_0x1af2('0x4f')])?ut[_0x1af2('0x11e')](_0x404962[_0x1af2('0x4f')][_0x1af2('0x11f')],_0x404962[_0x1af2('0x30')],_0x404962[_0x1af2('0x120')]>0x0?ut[_0x1af2('0x121')](_0x404962['dialOriginateCallerIdNumber'],_0x404962[_0x1af2('0x120')]):_0x404962[_0x1af2('0x122')]):ut['getCallerId'](_[_0x1af2('0x69')](_0x404962[_0x1af2('0x99')])?_0x404962['Trunk'][_0x1af2('0x11f')]:_0x404962['TrunkBackup']['callerid'],_0x404962[_0x1af2('0x30')],_0x404962[_0x1af2('0x120')]>0x0?ut[_0x1af2('0x121')](_0x404962[_0x1af2('0x122')],_0x404962['dialRandomLastDigitCallerIdNumber']):_0x404962[_0x1af2('0x122')]);if(_0x1da7aa){_0x31f978[_0x1af2('0x123')]=ut[_0x1af2('0x124')](_0x1da7aa);_0x31f978[_0x1af2('0x125')]=ut['extractCalleridNumber'](_0x1da7aa);}var _0x4296f5=ut['addVariables'](_0x404962,_0x58d84d,_0x15fdc3,_0x1da7aa,_0x3a4ae1,_0x31f978);_['merge'](_0x31f978,ut['toLowerVariables'](_0x4296f5));_0x31f978[_0x1af2('0x88')]=moment()[_0x1af2('0x55')](_0x1af2('0xaa'));ami[_0x1af2('0x74')](ut[_0x1af2('0x126')](_0x31f978,_0x404962,_0x4296f5,_0x31f978[_0x1af2('0xa8')],_0x4b81af))[_0x1af2('0xf8')](function(_0x4cc1f1){_0x404962[_0x1af2('0x49')]+=0x1;logger[_0x1af2('0x6b')]('[originated][increment]',_0x3a4ae1,_0x1af2('0xaf'),_0x404962[_0x1af2('0x50')],_0x1af2('0xe2'),_0x404962[_0x1af2('0x49')]);_0x1ae4af(_0x4cc1f1);})['catch'](function(_0x10628e){ut['logAgent'](_0x31f978,0xe,'OriginateError');rpcDb[_0x1af2('0xe9')](_0x31f978,_0x1af2('0x127'));_0x2df057(_0x10628e);});});};Preview[_0x1af2('0xf')][_0x1af2('0x128')]=function(_0x36e266){if(this['actions'][_0x36e266['linkedid']]){this['actions'][_0x36e266[_0x1af2('0xdf')]][_0x1af2('0x75')]=_0x36e266[_0x1af2('0x75')];}};Preview[_0x1af2('0xf')]['syncOriginateResponse']=function(_0x112929){var _0x156b83=this;var _0x521057=this[_0x1af2('0x6a')][_0x112929[_0x1af2('0x129')]];if(_0x521057){if(_0x521057[_0x1af2('0xf5')]&&this[_0x1af2('0x15')][_0x521057[_0x1af2('0xf5')]]){ut['logLookAgent'](_0x521057,this[_0x1af2('0x15')][_0x521057[_0x1af2('0xf5')]]['name'],this[_0x1af2('0x15')][_0x521057['lookAgent']]['id']);}var _0x4f0c04=_[_0x1af2('0x12a')](_0x521057);_0x4f0c04[_0x1af2('0xab')]=moment()['format'](_0x1af2('0xaa'));var _0x4a83c8=_0x156b83['campaignsPreview'][_0x521057['queue']];if(ut[_0x1af2('0x12b')](_0x112929[_0x1af2('0x12c')])){if(_0x521057[_0x1af2('0xa7')]){rpcDb['unlockContact'](_0x521057['idContact']);}if(_0x521057[_0x1af2('0xa8')]){rpcDb[_0x1af2('0x87')](_0x521057[_0x1af2('0x12d')]);}ami['emit']('custom:agentringnoanswer',ut[_0x1af2('0xb1')](_0x521057,'rejected'));this[_0x1af2('0xe4')](_0x4f0c04,_0x4a83c8,_0x112929);}else{_0x521057[_0x1af2('0x88')]=moment()[_0x1af2('0x55')](_0x1af2('0xaa'));ut[_0x1af2('0xe8')](_0x4f0c04,0x4,_0x1af2('0xb7'));rpcDb['createAgentHistory'](_0x4f0c04,_0x1af2('0x12e'));}}};Preview[_0x1af2('0xf')][_0x1af2('0x1a')]=function(_0x10699b){var _0x3df905=this;var _0x27b1c8=this['actions'][_0x10699b[_0x1af2('0xdf')]];var _0xf96857;if(_0x27b1c8){_0xf96857=this[_0x1af2('0x12')][_0x27b1c8[_0x1af2('0x6d')]];logger['info'](_0x1af2('0x12f'),_0x10699b[_0x1af2('0xdf')],_0x1af2('0xaf'),_0xf96857['name'],_0x1af2('0x6e'),_0xf96857['pTalking']);}if(this[_0x1af2('0x6a')][_0x10699b['linkedid']]&&_0x10699b[_0x1af2('0xdf')]!==_0x10699b[_0x1af2('0xae')]){if(_0x10699b[_0x1af2('0x130')]==='16'&&this['actions'][_0x10699b['linkedid']][_0x1af2('0x6f')]){this[_0x1af2('0x9b')](_0x10699b,_0x10699b['linkedid'],_0x10699b[_0x1af2('0x130')]);}else if(this[_0x1af2('0x6a')][_0x10699b[_0x1af2('0xdf')]]['dialAnswer']){logger[_0x1af2('0x6b')](_0x1af2('0x131'),_0x10699b[_0x1af2('0xdf')],_0x10699b[_0x1af2('0x130')],_0x1af2('0xaf'),_0xf96857[_0x1af2('0x50')],_0x1af2('0x6e'),_0xf96857[_0x1af2('0x59')]);this['callProgressDetectingCustomer'](_0x10699b,_0x10699b['linkedid'],_0x10699b[_0x1af2('0x130')]);}}else if(_0x27b1c8&&_[_0x1af2('0x69')](_0x27b1c8['statedesc'])&&_0xf96857[_0x1af2('0x132')]&&_0x10699b[_0x1af2('0xdf')]===_0x10699b[_0x1af2('0xae')]&&_[_0x1af2('0x69')](_0x10699b['reason'])&&_0x10699b[_0x1af2('0x130')]==='16'&&_0x10699b[_0x1af2('0x133')]==='6'&&_['isUndefined'](_0x27b1c8[_0x1af2('0x134')])){if(_0x27b1c8[_0x1af2('0xa7')]){rpcDb[_0x1af2('0x107')](_0x27b1c8[_0x1af2('0x12d')]);}if(_0x27b1c8[_0x1af2('0xa8')]){rpcDb['disableContact'](_0x27b1c8[_0x1af2('0x12d')]);}_0x10699b['reason']='22';this['callProgressDetectingAgent'](_0x27b1c8,_0xf96857,_0x10699b);}else if(_0x27b1c8&&_0x27b1c8[_0x1af2('0x134')]){if(_0x10699b[_0x1af2('0x130')]==='16'&&this[_0x1af2('0x6a')][_0x10699b[_0x1af2('0xdf')]]['dialAnswer']){logger[_0x1af2('0x6b')](_0x1af2('0x135'),_0x10699b[_0x1af2('0xdf')],_0x10699b[_0x1af2('0x130')],_0x1af2('0xaf'),_0xf96857[_0x1af2('0x50')],'pTalking:\x20',_0xf96857[_0x1af2('0x59')]);this['callProgressDetectingCustomer'](_0x10699b,_0x10699b[_0x1af2('0xdf')],_0x10699b[_0x1af2('0x130')]);}else if(this[_0x1af2('0x6a')][_0x10699b[_0x1af2('0xdf')]][_0x1af2('0x6f')]){logger[_0x1af2('0x6b')](_0x1af2('0x131'),_0x10699b['linkedid'],_0x10699b['cause'],_0x1af2('0xaf'),_0xf96857[_0x1af2('0x50')],'pTalking:\x20',_0xf96857['pTalking']);this['callProgressDetectingCustomer'](_0x10699b,_0x10699b[_0x1af2('0xdf')],_0x10699b[_0x1af2('0x130')]);}}};Preview[_0x1af2('0xf')][_0x1af2('0x1c')]=function(_0x31c80f){if(this['actions'][_0x31c80f[_0x1af2('0xe3')]]&&_0x31c80f[_0x1af2('0xe3')]!==_0x31c80f[_0x1af2('0x136')]){this[_0x1af2('0x9b')](_0x31c80f,_0x31c80f['destlinkedid'],_0x31c80f[_0x1af2('0xdd')]);}};Preview[_0x1af2('0xf')][_0x1af2('0x137')]=function(_0x56d109){if(this['actions'][_0x56d109[_0x1af2('0xdf')]]&&_0x56d109[_0x1af2('0xdf')]!==_0x56d109[_0x1af2('0xae')]&&!this[_0x1af2('0x6a')][_0x56d109[_0x1af2('0xdf')]][_0x1af2('0x6f')]){if(_0x56d109['cause']==='1'){this[_0x1af2('0x9b')](_0x56d109,_0x56d109['linkedid'],_0x56d109[_0x1af2('0x130')]);}}};Preview[_0x1af2('0xf')][_0x1af2('0x138')]=function(_0x3e7465,_0x2b05bb,_0xe843ee){if(this[_0x1af2('0x6a')][_0x3e7465]){if(_[_0x1af2('0x69')](this[_0x1af2('0x6a')][_0x3e7465][_0x1af2('0x139')])){this[_0x1af2('0x6a')][_0x3e7465][_0x1af2('0x139')]={};}this[_0x1af2('0x6a')][_0x3e7465][_0x1af2('0x139')][_0x2b05bb]=_0xe843ee;}};Preview['prototype'][_0x1af2('0x1e')]=function(_0x209834){try{if(!_[_0x1af2('0x69')](_0x209834)){if(ut[_0x1af2('0x13a')](_[_0x1af2('0x13b')](_0x209834[_0x1af2('0x13c')])[0x0])){this['addVariable'](_0x209834[_0x1af2('0xae')],_[_0x1af2('0x13b')](_0x209834[_0x1af2('0x13c')])[0x0],_0x209834[_0x1af2('0x13d')]);}}}catch(_0xd2d508){logger[_0x1af2('0x13e')]('[syncVarSet][Preview]',util[_0x1af2('0x13f')](_0xd2d508,{'showHidden':![],'depth':null}));}};Preview[_0x1af2('0xf')]['syncAttendedTransfer']=function(_0x5a9843){if(_0x5a9843){if(this[_0x1af2('0x6a')][_0x5a9843['transfertargetlinkedid']]){this[_0x1af2('0x6a')][_0x5a9843[_0x1af2('0x140')]][_0x1af2('0x134')]=!![];}}};Preview[_0x1af2('0xf')][_0x1af2('0x22')]=function(_0x354f8c){if(_0x354f8c){if(this[_0x1af2('0x6a')][_0x354f8c[_0x1af2('0x141')]]){this[_0x1af2('0x6a')][_0x354f8c['transfererlinkedid']]['transfer']=!![];}}};module['exports']=Preview;
\ No newline at end of file
diff --git a/server/services/ami/preview/rpcDb.js b/server/services/ami/preview/rpcDb.js
index 4eb590c..ee88db5 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 _0x3937=['queuecallerjoinAt','answertime','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','endtime','context','exten','holdtime','lastAssignedTo','membername','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','rescheduleContact','[rescheduleContactInQueue]\x20','util','../../../config/logger','preview','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/voiceQueueRt','../rpc/agentReportPreview','../rpc/voiceQueueReport','error','inspect','resolve','catch','[createHistory]\x20','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','createHistory','createAgentHistory','createCustomerHistory','createCustomerFinal','UserId','active','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue'];(function(_0x708cfa,_0x413d56){var _0x2418ca=function(_0x215ea2){while(--_0x215ea2){_0x708cfa['push'](_0x708cfa['shift']());}};_0x2418ca(++_0x413d56);}(_0x3937,0xbf));var _0x7393=function(_0x52033b,_0x1a32ba){_0x52033b=_0x52033b-0x0;var _0x4a4843=_0x3937[_0x52033b];return _0x4a4843;};'use strict';var util=require(_0x7393('0x0'));var BPromise=require('bluebird');var logger=require(_0x7393('0x1'))(_0x7393('0x2'));var _=require('lodash');var cmHopper=require(_0x7393('0x3'));var cmHopperFinal=require('../rpc/cmHopperFinal');var cmHopperHistory=require(_0x7393('0x4'));var cmHopperBlack=require('../rpc/cmHopperBlack');var voiceQueueRt=require(_0x7393('0x5'));var agentReportPreview=require(_0x7393('0x6'));var voiceQueueReport=require(_0x7393('0x7'));function loggerCatch(_0x1f538f){return function(_0x15eabd){logger[_0x7393('0x8')](_0x1f538f,util[_0x7393('0x9')](_0x15eabd,{'showHidden':![],'depth':null}));};}function create(_0x26668a){return BPromise[_0x7393('0xa')]()['then'](cmHopperHistory['createHistory'](_0x26668a))[_0x7393('0xb')](loggerCatch(_0x7393('0xc')));}function createAgent(_0x1cc3fd){return BPromise['resolve']()[_0x7393('0xd')](agentReportPreview['createHistory'](_0x1cc3fd))['catch'](loggerCatch('[createHistory]\x20'));}function moveContact(_0x497b6b){return BPromise[_0x7393('0xa')]()[_0x7393('0xd')](cmHopper[_0x7393('0xe')](_0x497b6b,!![]))['catch'](loggerCatch(_0x7393('0xf')));}exports[_0x7393('0x10')]=function(_0x20fb41){return BPromise[_0x7393('0xa')]()[_0x7393('0xd')](cmHopperBlack[_0x7393('0x10')](_0x20fb41))[_0x7393('0xb')](loggerCatch(_0x7393('0x11')));};exports[_0x7393('0x12')]=function(_0x4e521c){return BPromise['resolve']()[_0x7393('0xd')](cmHopper['getContactPreview'](_0x4e521c))['catch'](loggerCatch('[getContactPreview]\x20'));};exports[_0x7393('0x13')]=function(_0x54dc47,_0x2a1180){create(_0x54dc47)[_0x7393('0xb')](loggerCatch(_0x2a1180));moveContact(_0x54dc47)['catch'](loggerCatch(_0x2a1180));};exports[_0x7393('0x14')]=function(_0x5745cb,_0x5694b6){createAgent(_0x5745cb)[_0x7393('0xb')](loggerCatch(_0x5694b6));};exports[_0x7393('0x15')]=function(_0x1b032c,_0x1dc3e3){create(_0x1b032c)[_0x7393('0xb')](loggerCatch(_0x1dc3e3));};exports[_0x7393('0x16')]=function(_0x21f712,_0x208b9a){moveContact(_0x21f712)['catch'](loggerCatch(_0x208b9a));};exports['rescheduleContact']=function(_0x30eae3,_0x16f617,_0x3979b7){if(_0x16f617){_0x30eae3[_0x7393('0x17')]=null;}if(_0x3979b7){_0x30eae3[_0x7393('0x18')]=![];}return BPromise['resolve']()['then'](cmHopper['rescheduleContact'](_0x30eae3))[_0x7393('0xb')](loggerCatch('[rescheduleContact]\x20'));};exports['countReScheduled']=function(_0x2bf7a9){return BPromise[_0x7393('0xa')]()['then'](cmHopper[_0x7393('0x19')](_0x2bf7a9))[_0x7393('0xb')](loggerCatch(_0x7393('0x1a')));};exports[_0x7393('0x1b')]=function(_0x3fe456){return BPromise[_0x7393('0xa')]()[_0x7393('0xd')](cmHopper[_0x7393('0x1b')]({'UserId':null},_0x3fe456,0x1))[_0x7393('0xb')](loggerCatch(_0x7393('0x1c')));};exports[_0x7393('0x1d')]=function(_0x123ab4){return BPromise[_0x7393('0xa')]()['then'](cmHopper[_0x7393('0x1b')]({'active':![]},_0x123ab4,0x1))[_0x7393('0xb')](loggerCatch(_0x7393('0x1e')));};exports[_0x7393('0x1f')]=function(_0x1013aa){var _0xd8dfae={};_0xd8dfae['type']=_0x1013aa[_0x7393('0x20')];_0xd8dfae['uniqueid']=_0x1013aa[_0x7393('0x21')];_0xd8dfae['calleridnum']=_0x1013aa[_0x7393('0x22')];_0xd8dfae[_0x7393('0x23')]=_0x1013aa[_0x7393('0x23')];_0xd8dfae[_0x7393('0x24')]=_0x1013aa[_0x7393('0x24')];_0xd8dfae[_0x7393('0x25')]=_0x1013aa[_0x7393('0x26')];_0xd8dfae[_0x7393('0x27')]=_0x1013aa[_0x7393('0x26')];_0xd8dfae[_0x7393('0x28')]=0x1;_0xd8dfae[_0x7393('0x29')]=_0x1013aa[_0x7393('0x2a')];_0xd8dfae['connectedlinename']=_0x1013aa['membername'];_0xd8dfae[_0x7393('0x2b')]='from-sip';_0xd8dfae[_0x7393('0x2c')]='xcally-motion-preview';_0xd8dfae[_0x7393('0x2d')]=0x0;_0xd8dfae['assigned']=0x1;_0xd8dfae[_0x7393('0x2e')]=_0x1013aa[_0x7393('0x2f')];_0xd8dfae[_0x7393('0x30')]=_0x7393('0x31');return BPromise[_0x7393('0xa')]()[_0x7393('0xd')](voiceQueueReport[_0x7393('0x32')](_0xd8dfae))[_0x7393('0xb')](loggerCatch(_0x7393('0x33')));};exports[_0x7393('0x34')]=function(_0x585d47,_0x17e110){return BPromise['resolve']()[_0x7393('0xd')](cmHopper['getContactRecallMe'](_0x585d47,_0x17e110))[_0x7393('0xb')](loggerCatch(_0x7393('0x35')));};exports[_0x7393('0x36')]=function(_0x308cfb){return BPromise[_0x7393('0xa')]()['then'](cmHopper[_0x7393('0x37')](_0x308cfb,!![],!![]))['catch'](loggerCatch(_0x7393('0x38')));};
\ No newline at end of file
+var _0x0e85=['countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','[activeContact]\x20','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallercomplete','queuecallercompleteAt','endtime','context','from-sip','xcally-motion-preview','holdtime','assigned','lastAssignedTo','queuecallerexitreason','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','bluebird','preview','lodash','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','inspect','resolve','then','createHistory','catch','[createHistory]\x20','[moveContactManagedDialer]\x20','checkIsBlackList','getContactPreview','[getContactPreview]\x20','createCustomerHistory','rescheduleContact','active'];(function(_0xba5f89,_0x3116c0){var _0x3b6958=function(_0x21e526){while(--_0x21e526){_0xba5f89['push'](_0xba5f89['shift']());}};_0x3b6958(++_0x3116c0);}(_0x0e85,0x7c));var _0x50e8=function(_0x56916d,_0x37b935){_0x56916d=_0x56916d-0x0;var _0x2b7f1f=_0x0e85[_0x56916d];return _0x2b7f1f;};'use strict';var util=require(_0x50e8('0x0'));var BPromise=require(_0x50e8('0x1'));var logger=require('../../../config/logger')(_0x50e8('0x2'));var _=require(_0x50e8('0x3'));var cmHopper=require('../rpc/cmHopper');var cmHopperFinal=require('../rpc/cmHopperFinal');var cmHopperHistory=require('../rpc/cmHopperHistory');var cmHopperBlack=require(_0x50e8('0x4'));var voiceQueueRt=require('../rpc/voiceQueueRt');var agentReportPreview=require(_0x50e8('0x5'));var voiceQueueReport=require(_0x50e8('0x6'));function loggerCatch(_0xe3151e){return function(_0xfde42){logger['error'](_0xe3151e,util[_0x50e8('0x7')](_0xfde42,{'showHidden':![],'depth':null}));};}function create(_0x108edc){return BPromise[_0x50e8('0x8')]()[_0x50e8('0x9')](cmHopperHistory[_0x50e8('0xa')](_0x108edc))[_0x50e8('0xb')](loggerCatch('[createHistory]\x20'));}function createAgent(_0x11717c){return BPromise[_0x50e8('0x8')]()[_0x50e8('0x9')](agentReportPreview[_0x50e8('0xa')](_0x11717c))[_0x50e8('0xb')](loggerCatch(_0x50e8('0xc')));}function moveContact(_0x45dc6f){return BPromise[_0x50e8('0x8')]()['then'](cmHopper['moveContactManagedDialer'](_0x45dc6f,!![]))[_0x50e8('0xb')](loggerCatch(_0x50e8('0xd')));}exports['checkIsBlackList']=function(_0x49e02f){return BPromise[_0x50e8('0x8')]()[_0x50e8('0x9')](cmHopperBlack[_0x50e8('0xe')](_0x49e02f))[_0x50e8('0xb')](loggerCatch('[checkIsBlackList]\x20'));};exports[_0x50e8('0xf')]=function(_0x3149d4){return BPromise[_0x50e8('0x8')]()['then'](cmHopper['getContactPreview'](_0x3149d4))[_0x50e8('0xb')](loggerCatch(_0x50e8('0x10')));};exports[_0x50e8('0xa')]=function(_0x291fb7,_0x211731){create(_0x291fb7)[_0x50e8('0xb')](loggerCatch(_0x211731));moveContact(_0x291fb7)['catch'](loggerCatch(_0x211731));};exports['createAgentHistory']=function(_0x441f25,_0xc97063){createAgent(_0x441f25)[_0x50e8('0xb')](loggerCatch(_0xc97063));};exports[_0x50e8('0x11')]=function(_0x5dae4e,_0x90c54c){create(_0x5dae4e)[_0x50e8('0xb')](loggerCatch(_0x90c54c));};exports['createCustomerFinal']=function(_0x415596,_0x55997c){moveContact(_0x415596)[_0x50e8('0xb')](loggerCatch(_0x55997c));};exports[_0x50e8('0x12')]=function(_0xd263d,_0x20f835,_0x46af8e){if(_0x20f835){_0xd263d['UserId']=null;}if(_0x46af8e){_0xd263d[_0x50e8('0x13')]=![];}return BPromise[_0x50e8('0x8')]()['then'](cmHopper[_0x50e8('0x12')](_0xd263d))[_0x50e8('0xb')](loggerCatch('[rescheduleContact]\x20'));};exports[_0x50e8('0x14')]=function(_0xe7e56c){return BPromise['resolve']()['then'](cmHopper['countReScheduled'](_0xe7e56c))[_0x50e8('0xb')](loggerCatch(_0x50e8('0x15')));};exports[_0x50e8('0x16')]=function(_0x371a1f){return BPromise[_0x50e8('0x8')]()[_0x50e8('0x9')](cmHopper['unlockContact']({'UserId':null},_0x371a1f,0x1))[_0x50e8('0xb')](loggerCatch(_0x50e8('0x17')));};exports['disableContact']=function(_0x177201){return BPromise[_0x50e8('0x8')]()[_0x50e8('0x9')](cmHopper[_0x50e8('0x16')]({'active':![]},_0x177201,0x1))['catch'](loggerCatch(_0x50e8('0x18')));};exports['crateCustomerReportQueue']=function(_0x30fedf){var _0x39c0c6={};_0x39c0c6[_0x50e8('0x19')]=_0x30fedf['type'];_0x39c0c6[_0x50e8('0x1a')]=_0x30fedf[_0x50e8('0x1a')];_0x39c0c6[_0x50e8('0x1b')]=_0x30fedf[_0x50e8('0x1b')];_0x39c0c6[_0x50e8('0x1c')]=_0x30fedf[_0x50e8('0x1c')];_0x39c0c6[_0x50e8('0x1d')]=_0x30fedf['queue'];_0x39c0c6[_0x50e8('0x1e')]=_0x30fedf[_0x50e8('0x1f')];_0x39c0c6['queuecallerleaveAt']=_0x30fedf['answertime'];_0x39c0c6[_0x50e8('0x20')]=0x1;_0x39c0c6[_0x50e8('0x21')]=_0x30fedf[_0x50e8('0x22')];_0x39c0c6['connectedlinename']=_0x30fedf['membername'];_0x39c0c6[_0x50e8('0x23')]=_0x50e8('0x24');_0x39c0c6['exten']=_0x50e8('0x25');_0x39c0c6[_0x50e8('0x26')]=0x0;_0x39c0c6[_0x50e8('0x27')]=0x1;_0x39c0c6[_0x50e8('0x28')]=_0x30fedf['membername'];_0x39c0c6[_0x50e8('0x29')]='COMPLETED';return BPromise[_0x50e8('0x8')]()[_0x50e8('0x9')](voiceQueueReport[_0x50e8('0x2a')](_0x39c0c6))['catch'](loggerCatch(_0x50e8('0x2b')));};exports[_0x50e8('0x2c')]=function(_0x548f3c,_0x245b45){return BPromise[_0x50e8('0x8')]()[_0x50e8('0x9')](cmHopper[_0x50e8('0x2c')](_0x548f3c,_0x245b45))['catch'](loggerCatch(_0x50e8('0x2d')));};exports[_0x50e8('0x2e')]=function(_0x24d3ea){return BPromise[_0x50e8('0x8')]()['then'](cmHopper[_0x50e8('0x12')](_0x24d3ea,!![],!![]))[_0x50e8('0xb')](loggerCatch(_0x50e8('0x2f')));};
\ 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 819fcd6..62b7c50 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 _0x8aa5=['\x22\x22\x20<>','isActive','isNil','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialer','VoiceQueueId','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','dialPreviewUrl','\x22agi://%s/square,%s\x22','dialQueueProject','NONE','xcally-motion-preview','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','tags','createdAt','updatedAt','XMD-','toUpper','toLowerVariables','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','Blacklist','starttime','responsetime','endtime','logAgent','ringtime','logLookAgent','membername','UserId','talktime','answertime','isFailure','Failure','variablesAction','BOOKED','uniqueid','originate','channelAgent','from-sip','timeout','totalGlobal','countbusyretry','countnoanswerretry','cloneAction','Global','active','add','minutes','ListId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','[decrementTalkink]\x20is\x20null\x20or\x20undefined','buildObj','lastevent','queue','interface','buildAcw','agentReadyId','not_inuse','status','reachable','push','getDiff','seconds','createBody','CampaignId','filterKey','type','dialAnswer','scheduledat','countcongestionretry','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-queue','xmd-listid','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-contactid','xmd-cdrtype','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','\x5cw{0,','pow','replace','random','extractCalleridName','match','extractCalleridNumber','util','lodash','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','127.0.0.1','milliseconds','diff','loggerCatch','inspect','logger','info','loggerError','error','logger2','message','getCallerId','isUndefined','isEmpty','string','format','\x22%s\x22\x20<%s>'];(function(_0x1e6944,_0x7880d8){var _0x5590c8=function(_0x2a70c0){while(--_0x2a70c0){_0x1e6944['push'](_0x1e6944['shift']());}};_0x5590c8(++_0x7880d8);}(_0x8aa5,0x78));var _0x58aa=function(_0x1148bc,_0x5d29e0){_0x1148bc=_0x1148bc-0x0;var _0x5719dc=_0x8aa5[_0x1148bc];return _0x5719dc;};'use strict';var util=require(_0x58aa('0x0'));var _=require(_0x58aa('0x1'));var moment=require(_0x58aa('0x2'));var logger=require(_0x58aa('0x3'))(_0x58aa('0x4'));var ipAgi=process[_0x58aa('0x5')][_0x58aa('0x6')]||_0x58aa('0x7');function getSeconds(_0x320177,_0x1fb46c){var _0x5dc0fd=moment(_0x320177)[_0x58aa('0x8')](0x0);var _0xada106=moment(_0x1fb46c)[_0x58aa('0x8')](0x0);return _0x5dc0fd[_0x58aa('0x9')](_0xada106,'seconds');}exports[_0x58aa('0xa')]=function(_0x4a70f2){return function(_0x7f3997){logger['error'](_0x4a70f2,util[_0x58aa('0xb')](_0x7f3997,{'showHidden':![],'depth':null}));};};exports[_0x58aa('0xc')]=function(_0x70d950,_0x351777){logger[_0x58aa('0xd')](_0x70d950,util[_0x58aa('0xb')](_0x351777,{'showHidden':![],'depth':null}));};exports[_0x58aa('0xe')]=function(_0xfb416d,_0xaaa50f){logger[_0x58aa('0xf')](_0xfb416d,util['inspect'](_0xaaa50f,{'showHidden':![],'depth':null}));};exports[_0x58aa('0x10')]=function(_0x52aea1){return function(_0xa7e903){logger['info'](_0x52aea1,util[_0x58aa('0xb')](_0xa7e903,{'showHidden':![],'depth':null}));};};exports[_0x58aa('0x11')]=function(_0xe031b3,_0x45fe62,_0x3cbe28){return{'message':_0xe031b3,'unlock':_0x45fe62,'active':_0x3cbe28};};exports[_0x58aa('0x12')]=function(_0xc012e9,_0x421910,_0x10f388){if(!_[_0x58aa('0x13')](_0x10f388)&&'string'===typeof _0x10f388&&!_[_0x58aa('0x14')](_0x10f388)){if(!_[_0x58aa('0x13')](_0x421910)&&_0x58aa('0x15')===typeof _0x421910&&!_[_0x58aa('0x14')](_0x421910)){return util[_0x58aa('0x16')](_0x58aa('0x17'),_0x421910,_0x10f388);}return util[_0x58aa('0x16')](_0x58aa('0x17'),_0x10f388,_0x10f388);}if(!_['isUndefined'](_0xc012e9)&&'string'===typeof _0xc012e9&&!_[_0x58aa('0x14')](_0xc012e9)){return _0xc012e9;}return _0x58aa('0x18');};exports[_0x58aa('0x19')]=function(_0x41d11f){if(_[_0x58aa('0x1a')](_0x41d11f)){return![];}return _0x41d11f;};exports[_0x58aa('0x1b')]=function(_0x106462,_0x114d02,_0x3dcbca,_0x22d20b,_0x1799d4,_0x206147){var _0x3b398e={'XMD-QUEUE':_0x114d02[_0x58aa('0x1c')]?_0x114d02[_0x58aa('0x1c')][_0x58aa('0x1d')]:'','XMD-CALLERID':_0x22d20b,'XMD-CALLERID-PREVIEW':_0x206147?util[_0x58aa('0x16')](_0x58aa('0x17'),_0x206147[_0x58aa('0x1e')],_0x206147[_0x58aa('0x1f')]):_0x22d20b,'XMD-DIALID':_0x1799d4,'XMD-CONTACTID':_0x114d02[_0x58aa('0x20')],'XMD-CDRTYPE':_0x58aa('0x21'),'CALLERID(all)':_0x22d20b,'XMD-VOICEQUEUEID':_0x114d02[_0x58aa('0x22')],'XMD-DIALCHANNEL':_0x3dcbca,'XMD-DIALTIMEOUT':_0x106462['dialOriginateTimeout']||0x1e,'XMD-DIALOPTIONS':util['format'](_0x58aa('0x23'),_0x106462[_0x58aa('0x24')]?'g':'',_[_0x58aa('0x14')](_0x106462[_0x58aa('0x25')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x106462[_0x58aa('0x26')]||'','XMD-AGI':_0x106462['dialQueueProject']?util[_0x58aa('0x16')](_0x58aa('0x27'),ipAgi,_0x106462[_0x58aa('0x28')]):_0x58aa('0x29'),'XMD-AGIAFTER':_0x106462[_0x58aa('0x24')]?util['format']('\x22agi://%s/square,%s\x22',ipAgi,_0x106462['dialQueueProject2']):_0x58aa('0x29'),'XMD-ORIGINATECALLERIDNUM':_0x206147?_0x206147['originatecalleridnum']:'','XMD-ORIGINATECALLERIDNAME':_0x206147?_0x206147['originatecalleridname']:'','XMD-DESTINATION':_0x58aa('0x2a')};if(!_[_0x58aa('0x14')](_0x106462[_0x58aa('0x25')])){_0x3b398e[util['format']('%s',_0x58aa('0x2b'))]=_0x106462[_0x58aa('0x25')];_0x3b398e[util[_0x58aa('0x16')]('%s',_0x58aa('0x2c'))]=_0x1799d4;}if(_0x114d02&&_0x114d02[_0x58aa('0x2d')]){for(var _0x2d535c in _0x114d02['Contact']){if(_0x114d02[_0x58aa('0x2d')][_0x58aa('0x2e')](_0x2d535c)){if(!_[_0x58aa('0x1a')](_0x114d02[_0x58aa('0x2d')][_0x2d535c])&&_0x2d535c!=='id'&&_0x2d535c!==_0x58aa('0x2f')&&_0x2d535c!==_0x58aa('0x30')&&_0x2d535c!==_0x58aa('0x31')){_0x3b398e[util[_0x58aa('0x16')]('%s%s',_0x58aa('0x32'),_[_0x58aa('0x33')](_0x2d535c))]=_0x114d02[_0x58aa('0x2d')][_0x2d535c];}}}}return _0x3b398e;};exports[_0x58aa('0x34')]=function(_0x2a3fe0){var _0x465423={};for(var _0x20ad6e in _0x2a3fe0){if(_0x2a3fe0[_0x58aa('0x2e')](_0x20ad6e)){_0x465423[util[_0x58aa('0x16')]('%s',_[_0x58aa('0x35')](_0x20ad6e))]=_0x2a3fe0[_0x20ad6e];}}return{'variables':_0x465423};};exports[_0x58aa('0x36')]=function(_0x564d06,_0x57a758){if(!_['isNil'](_0x564d06)){if(_0x564d06[_0x58aa('0x2e')](_0x58aa('0x37'))){if(_0x564d06['originated']>0x0){_0x564d06[_0x58aa('0x37')]-=0x1;}else{logger[_0x58aa('0xf')](_0x58aa('0x38'),_0x57a758);}}}else{logger[_0x58aa('0xf')](_0x58aa('0x39'),_0x57a758);}};exports['logBlacklist']=function(_0x11bf30){var _0x31a1c9=moment()['format'](_0x58aa('0x3a'));_0x11bf30[_0x58aa('0x3b')]=0xd;_0x11bf30[_0x58aa('0x3c')]=_0x58aa('0x3d');_0x11bf30[_0x58aa('0x3e')]=_0x31a1c9;_0x11bf30[_0x58aa('0x3f')]=_0x31a1c9;_0x11bf30[_0x58aa('0x40')]=_0x31a1c9;};exports[_0x58aa('0x41')]=function(_0x5ec3f0,_0x442751,_0x546dd7){var _0x456ab7=moment()[_0x58aa('0x16')]('YYYY-MM-DD\x20HH:mm:ss');_0x5ec3f0[_0x58aa('0x3b')]=_0x442751;_0x5ec3f0[_0x58aa('0x3c')]=_0x546dd7;_0x5ec3f0[_0x58aa('0x3f')]=_0x456ab7;_0x5ec3f0[_0x58aa('0x42')]=getSeconds(_0x5ec3f0['responsetime'],_0x5ec3f0[_0x58aa('0x3e')]);};exports[_0x58aa('0x43')]=function(_0x430222,_0x56aee4,_0x4d7513){_0x430222[_0x58aa('0x44')]=_0x56aee4;_0x430222[_0x58aa('0x45')]=_0x4d7513;};exports['logCustomer']=function(_0x530319,_0x192c73,_0x54d383){var _0xa2844c=moment()[_0x58aa('0x16')]('YYYY-MM-DD\x20HH:mm:ss');_0x530319[_0x58aa('0x3b')]=_0x192c73;_0x530319[_0x58aa('0x3c')]=_0x54d383;_0x530319['responsetime']=_0x530319['responsetime']?_0x530319[_0x58aa('0x3f')]:_0xa2844c;_0x530319[_0x58aa('0x40')]=_0x530319[_0x58aa('0x40')]?_0x530319[_0x58aa('0x40')]:_0xa2844c;_0x530319[_0x58aa('0x42')]=getSeconds(_0x530319[_0x58aa('0x3f')]||0x0,_0x530319[_0x58aa('0x3e')]||0x0);_0x530319[_0x58aa('0x46')]=_0x530319[_0x58aa('0x47')]?getSeconds(_0x530319[_0x58aa('0x40')],_0x530319['answertime']):0x0;};exports[_0x58aa('0x48')]=function(_0x1eb3b7){return _0x1eb3b7===_0x58aa('0x49');};exports[_0x58aa('0x4a')]=function(_0x148813,_0x19c75e,_0x55bada,_0x29a006,_0x8a4354){var _0x3774b3=_0x29a006?'RECALL':_0x148813[_0x58aa('0x1e')];_0x3774b3=_0x8a4354?_0x58aa('0x4b'):_0x3774b3;return{'actionid':_0x148813[_0x58aa('0x4c')],'action':_0x58aa('0x4d'),'channel':_0x148813[_0x58aa('0x4e')],'callerid':util[_0x58aa('0x16')]('\x22%s\x22\x20<%s>',_0x3774b3,_0x148813[_0x58aa('0x1f')]),'Exten':_0x58aa('0x2a'),'Context':_0x58aa('0x4f'),'Priority':'1','variable':_0x55bada,'timeout':(_0x19c75e[_0x58aa('0x50')]||0x1e)*0x3e8,'async':!![],'channelid':_0x148813[_0x58aa('0x4c')]};};exports[_0x58aa('0x51')]=function(_0x31198a){return _0x31198a[_0x58aa('0x52')]+_0x31198a['countcongestionretry']+_0x31198a[_0x58aa('0x53')];};exports[_0x58aa('0x54')]=function(_0x13783a){var _0x8bc978=_['clone'](_0x13783a);_0x8bc978[_0x58aa('0x3b')]=0xf;_0x8bc978[_0x58aa('0x3c')]=_0x58aa('0x55');return _0x8bc978;};exports['scheduledAt']=function(_0x3687a9,_0x474fbe,_0x28049b){var _0x366f39={};_0x366f39[_0x474fbe]=_0x3687a9[_0x474fbe];_0x366f39[_0x58aa('0x56')]=![];_0x366f39['scheduledat']=moment()[_0x58aa('0x57')](_0x28049b,_0x58aa('0x58'))[_0x58aa('0x16')](_0x58aa('0x3a'));_0x366f39['ContactId']=_0x3687a9['ContactId'];_0x366f39['ListId']=_0x3687a9[_0x58aa('0x59')];_0x366f39['VoiceQueueId']=_0x3687a9['VoiceQueueId']||undefined;return _0x366f39;};exports[_0x58aa('0x5a')]=function(_0xf1d060,_0x196f20){if(!_['isNil'](_0xf1d060)){if(_0xf1d060[_0x58aa('0x5b')]>0x0){_0xf1d060[_0x58aa('0x5b')]-=0x1;}else{logger['error'](_0x196f20,_0x58aa('0x5c'));}}else{logger['error'](_0x196f20,_0x58aa('0x5d'));}};exports['IsNotLoggedIn']=function(_0x23f26d){if(_0x23f26d<=0x0){return!![];}return![];};exports[_0x58aa('0x5e')]=function(_0x5bfc15,_0xb5297d){_0x5bfc15[_0x58aa('0x5f')]=_0xb5297d;_0x5bfc15['name']=_0x5bfc15[_0x58aa('0x60')];_0x5bfc15[_0x58aa('0x61')]=_0x5bfc15[_0x58aa('0x4e')];return _0x5bfc15;};exports[_0x58aa('0x62')]=function(_0x2c8bd8){var _0x70eef1={};_0x70eef1[_0x58aa('0x60')]=_0x2c8bd8[_0x58aa('0x60')];_0x70eef1[_0x58aa('0x61')]=_0x2c8bd8[_0x58aa('0x4e')];_0x70eef1[_0x58aa('0x4c')]=_0x2c8bd8[_0x58aa('0x4c')];return _0x70eef1;};exports[_0x58aa('0x63')]=function(_0x49e47e){var _0x150cc9=[];for(var _0x44f91c in _0x49e47e){if(_0x49e47e[_0x58aa('0x2e')](_0x44f91c)){if(!_['isNil'](_0x49e47e[_0x44f91c])&&_0x49e47e[_0x44f91c]['state']===_0x58aa('0x64')&&_0x49e47e[_0x44f91c][_0x58aa('0x65')]===_0x58aa('0x66')){_0x150cc9[_0x58aa('0x67')](_0x49e47e[_0x44f91c]['id']);}}}return _0x150cc9;};exports[_0x58aa('0x68')]=function(_0x126abe){var _0x53047b=moment()[_0x58aa('0x8')](0x0);var _0x1712e4=moment(_0x126abe)[_0x58aa('0x8')](0x0);return _0x53047b[_0x58aa('0x9')](_0x1712e4,_0x58aa('0x69'));};exports[_0x58aa('0x6a')]=function(_0x3bc55a){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x3bc55a[_0x58aa('0x20')],'ListId':_0x3bc55a['ListId'],'VoiceQueueId':_0x3bc55a[_0x58aa('0x22')]||undefined,'CampaignId':_0x3bc55a[_0x58aa('0x6b')]||undefined};};exports[_0x58aa('0x6c')]=function(_0x4936f9){if(_0x4936f9==='uniqueid'||_0x4936f9==='idContact'||_0x4936f9===_0x58aa('0x60')||_0x4936f9===_0x58aa('0x6d')||_0x4936f9==='campaigntype'||_0x4936f9===_0x58aa('0x6e')||_0x4936f9==='membername'||_0x4936f9==='channelAgent'||_0x4936f9===_0x58aa('0x1e')||_0x4936f9===_0x58aa('0x56')||_0x4936f9===_0x58aa('0x1f')||_0x4936f9===_0x58aa('0x6f')||_0x4936f9===_0x58aa('0x52')||_0x4936f9===_0x58aa('0x70')||_0x4936f9===_0x58aa('0x53')||_0x4936f9==='countglobal'||_0x4936f9===_0x58aa('0x71')||_0x4936f9===_0x58aa('0x72')||_0x4936f9===_0x58aa('0x73')||_0x4936f9===_0x58aa('0x74')||_0x4936f9===_0x58aa('0x20')||_0x4936f9===_0x58aa('0x59')||_0x4936f9===_0x58aa('0x45')||_0x4936f9===_0x58aa('0x22')||_0x4936f9===_0x58aa('0x75')||_0x4936f9==='xmd-voicequeueid'||_0x4936f9===_0x58aa('0x76')||_0x4936f9==='xmd-phone'||_0x4936f9===_0x58aa('0x77')||_0x4936f9===_0x58aa('0x78')||_0x4936f9===_0x58aa('0x79')||_0x4936f9===_0x58aa('0x7a')||_0x4936f9===_0x58aa('0x7b')||_0x4936f9==='xmd-dialchannel'||_0x4936f9===_0x58aa('0x7c')||_0x4936f9===_0x58aa('0x7d')||_0x4936f9===_0x58aa('0x7e')||_0x4936f9===_0x58aa('0x7f')||_0x4936f9===_0x58aa('0x80')||_0x4936f9===_0x58aa('0x81')||_0x4936f9===_0x58aa('0x82')||_0x4936f9===_0x58aa('0x83')||_0x4936f9==='rtpaudioqosjitterbridged'||_0x4936f9===_0x58aa('0x84')||_0x4936f9==='rtpaudioqoslossbridged'||_0x4936f9===_0x58aa('0x85')||_0x4936f9===_0x58aa('0x86')||_0x4936f9===_0x58aa('0x81')||_0x4936f9===_0x58aa('0x82')||_0x4936f9===_0x58aa('0x83')||_0x4936f9===_0x58aa('0x87')||_0x4936f9===_0x58aa('0x84')||_0x4936f9===_0x58aa('0x88')||_0x4936f9==='rtpaudioqosrtt'||_0x4936f9===_0x58aa('0x86')||_0x4936f9==='bridgepeer'||_0x4936f9==='bridgepvtcallid'||_0x4936f9===_0x58aa('0x3b')||_0x4936f9==='statedesc'){return![];}return!![];};exports['getCallerIdRandom']=function(_0x3fdb7f,_0x403559){var _0x368dfa,_0x8c2571,_0x4b6957;if(_0x403559<=0x0){_0x403559=0x1;}_0x368dfa=new RegExp(_0x58aa('0x89')+_0x403559+'}$');_0x8c2571=Math[_0x58aa('0x8a')](0xa,_0x403559-0x1);_0x4b6957=Math[_0x58aa('0x8a')](0xa,_0x403559)-0x1;return util[_0x58aa('0x16')]('%s',_[_0x58aa('0x8b')](_0x3fdb7f,_0x368dfa,_[_0x58aa('0x8c')](_0x8c2571,_0x4b6957)));};exports[_0x58aa('0x8d')]=function(_0x4df902){var _0xc18683=_0x4df902[_0x58aa('0x8e')](/"(.*?)"/);return _0xc18683?_0xc18683[0x1]:_0x4df902;};exports[_0x58aa('0x8f')]=function(_0xb0324a){var _0x35fd9a=_0xb0324a[_0x58aa('0x8e')](/<(.*?)>/);return _0x35fd9a?_0x35fd9a[0x1]:_0xb0324a;};
\ No newline at end of file
+var _0xb19f=['env','XCALLY_IP_AGI','milliseconds','seconds','error','logger','info','inspect','loggerError','logger2','message','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','isNil','Queue','name','calleridname','ContactId','dialer','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','originatecalleridnum','xcally-motion-preview','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','tags','createdAt','updatedAt','%s%s','XMD-','toLowerVariables','toLower','updateOriginated','originated','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','starttime','responsetime','endtime','logLookAgent','membername','UserId','ringtime','answertime','isFailure','variablesAction','RECALL','uniqueid','originate','channelAgent','from-sip','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','cloneAction','Global','scheduledAt','active','scheduledat','add','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','buildObj','lastevent','queue','interface','agentReadyId','not_inuse','status','reachable','getDiff','createBody','CampaignId','filterKey','idContact','type','campaigntype','calleridnum','countglobal','callback','callbackuniqueid','recallme','sipcallid','xmd-voicequeueid','xmd-queue','xmd-phone','xmd-listid','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-contactid','xmd-cdrtype','xmd-callerid','xmd-agiafter','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqos','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','pow','replace','random','match','extractCalleridNumber','util','lodash','preview'];(function(_0x3a4057,_0x4df9cb){var _0x427d46=function(_0x43fc4d){while(--_0x43fc4d){_0x3a4057['push'](_0x3a4057['shift']());}};_0x427d46(++_0x4df9cb);}(_0xb19f,0x7d));var _0xfb19=function(_0x24d8db,_0x2392c6){_0x24d8db=_0x24d8db-0x0;var _0x13d20d=_0xb19f[_0x24d8db];return _0x13d20d;};'use strict';var util=require(_0xfb19('0x0'));var _=require(_0xfb19('0x1'));var moment=require('moment');var logger=require('../../../../config/logger')(_0xfb19('0x2'));var ipAgi=process[_0xfb19('0x3')][_0xfb19('0x4')]||'127.0.0.1';function getSeconds(_0xe1c6f9,_0x585ed2){var _0x520a16=moment(_0xe1c6f9)['milliseconds'](0x0);var _0x364587=moment(_0x585ed2)[_0xfb19('0x5')](0x0);return _0x520a16['diff'](_0x364587,_0xfb19('0x6'));}exports['loggerCatch']=function(_0x23a6ca){return function(_0x47da2b){logger[_0xfb19('0x7')](_0x23a6ca,util['inspect'](_0x47da2b,{'showHidden':![],'depth':null}));};};exports[_0xfb19('0x8')]=function(_0x588d35,_0x21544c){logger[_0xfb19('0x9')](_0x588d35,util[_0xfb19('0xa')](_0x21544c,{'showHidden':![],'depth':null}));};exports[_0xfb19('0xb')]=function(_0x29a561,_0x36c02d){logger[_0xfb19('0x7')](_0x29a561,util[_0xfb19('0xa')](_0x36c02d,{'showHidden':![],'depth':null}));};exports[_0xfb19('0xc')]=function(_0x1e562f){return function(_0x2b9a50){logger[_0xfb19('0x9')](_0x1e562f,util[_0xfb19('0xa')](_0x2b9a50,{'showHidden':![],'depth':null}));};};exports[_0xfb19('0xd')]=function(_0x50921f,_0x2c999e,_0x3bb302){return{'message':_0x50921f,'unlock':_0x2c999e,'active':_0x3bb302};};exports['getCallerId']=function(_0x2dfcbc,_0x4b61cc,_0x2408b0){if(!_[_0xfb19('0xe')](_0x2408b0)&&_0xfb19('0xf')===typeof _0x2408b0&&!_['isEmpty'](_0x2408b0)){if(!_[_0xfb19('0xe')](_0x4b61cc)&&_0xfb19('0xf')===typeof _0x4b61cc&&!_[_0xfb19('0x10')](_0x4b61cc)){return util[_0xfb19('0x11')]('\x22%s\x22\x20<%s>',_0x4b61cc,_0x2408b0);}return util[_0xfb19('0x11')](_0xfb19('0x12'),_0x2408b0,_0x2408b0);}if(!_[_0xfb19('0xe')](_0x2dfcbc)&&_0xfb19('0xf')===typeof _0x2dfcbc&&!_['isEmpty'](_0x2dfcbc)){return _0x2dfcbc;}return _0xfb19('0x13');};exports[_0xfb19('0x14')]=function(_0x6303a4){if(_[_0xfb19('0x15')](_0x6303a4)){return![];}return _0x6303a4;};exports['addVariables']=function(_0x519914,_0x3fbdd1,_0x2b4b80,_0x44c91c,_0x64f37c,_0x40c57f){var _0x57cc4b={'XMD-QUEUE':_0x3fbdd1[_0xfb19('0x16')]?_0x3fbdd1['Queue'][_0xfb19('0x17')]:'','XMD-CALLERID':_0x44c91c,'XMD-CALLERID-PREVIEW':_0x40c57f?util[_0xfb19('0x11')]('\x22%s\x22\x20<%s>',_0x40c57f[_0xfb19('0x18')],_0x40c57f['calleridnum']):_0x44c91c,'XMD-DIALID':_0x64f37c,'XMD-CONTACTID':_0x3fbdd1[_0xfb19('0x19')],'XMD-CDRTYPE':_0xfb19('0x1a'),'CALLERID(all)':_0x44c91c,'XMD-VOICEQUEUEID':_0x3fbdd1[_0xfb19('0x1b')],'XMD-DIALCHANNEL':_0x2b4b80,'XMD-DIALTIMEOUT':_0x519914[_0xfb19('0x1c')]||0x1e,'XMD-DIALOPTIONS':util[_0xfb19('0x11')](_0xfb19('0x1d'),_0x519914[_0xfb19('0x1e')]?'g':'',_['isEmpty'](_0x519914[_0xfb19('0x1f')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x519914[_0xfb19('0x20')]||'','XMD-AGI':_0x519914[_0xfb19('0x21')]?util[_0xfb19('0x11')](_0xfb19('0x22'),ipAgi,_0x519914['dialQueueProject']):_0xfb19('0x23'),'XMD-AGIAFTER':_0x519914['dialQueueProject2']?util['format'](_0xfb19('0x22'),ipAgi,_0x519914[_0xfb19('0x1e')]):_0xfb19('0x23'),'XMD-ORIGINATECALLERIDNUM':_0x40c57f?_0x40c57f[_0xfb19('0x24')]:'','XMD-ORIGINATECALLERIDNAME':_0x40c57f?_0x40c57f['originatecalleridname']:'','XMD-DESTINATION':_0xfb19('0x25')};if(!_[_0xfb19('0x10')](_0x519914[_0xfb19('0x1f')])){_0x57cc4b[util[_0xfb19('0x11')]('%s','_XCALLY_MIXMONITOR_FORMAT')]=_0x519914[_0xfb19('0x1f')];_0x57cc4b[util[_0xfb19('0x11')]('%s',_0xfb19('0x26'))]=_0x64f37c;}if(_0x3fbdd1&&_0x3fbdd1[_0xfb19('0x27')]){for(var _0x46384a in _0x3fbdd1[_0xfb19('0x27')]){if(_0x3fbdd1[_0xfb19('0x27')][_0xfb19('0x28')](_0x46384a)){if(!_[_0xfb19('0x15')](_0x3fbdd1[_0xfb19('0x27')][_0x46384a])&&_0x46384a!=='id'&&_0x46384a!==_0xfb19('0x29')&&_0x46384a!==_0xfb19('0x2a')&&_0x46384a!==_0xfb19('0x2b')){_0x57cc4b[util[_0xfb19('0x11')](_0xfb19('0x2c'),_0xfb19('0x2d'),_['toUpper'](_0x46384a))]=_0x3fbdd1[_0xfb19('0x27')][_0x46384a];}}}}return _0x57cc4b;};exports[_0xfb19('0x2e')]=function(_0x4673ae){var _0xd434e7={};for(var _0xbac46b in _0x4673ae){if(_0x4673ae[_0xfb19('0x28')](_0xbac46b)){_0xd434e7[util[_0xfb19('0x11')]('%s',_[_0xfb19('0x2f')](_0xbac46b))]=_0x4673ae[_0xbac46b];}}return{'variables':_0xd434e7};};exports[_0xfb19('0x30')]=function(_0x233518,_0xbd5d45){if(!_['isNil'](_0x233518)){if(_0x233518['hasOwnProperty'](_0xfb19('0x31'))){if(_0x233518['originated']>0x0){_0x233518[_0xfb19('0x31')]-=0x1;}else{logger[_0xfb19('0x7')]('[updateOriginated]\x20object\x20originated\x20is\x20negative',_0xbd5d45);}}}else{logger[_0xfb19('0x7')]('[updateOriginated]\x20is\x20null\x20or\x20undefined',_0xbd5d45);}};exports['logBlacklist']=function(_0x1b7bbb){var _0xdc3417=moment()[_0xfb19('0x11')](_0xfb19('0x32'));_0x1b7bbb[_0xfb19('0x33')]=0xd;_0x1b7bbb[_0xfb19('0x34')]='Blacklist';_0x1b7bbb[_0xfb19('0x35')]=_0xdc3417;_0x1b7bbb[_0xfb19('0x36')]=_0xdc3417;_0x1b7bbb[_0xfb19('0x37')]=_0xdc3417;};exports['logAgent']=function(_0x26c5f9,_0x48a949,_0x483d1c){var _0x80fbbb=moment()['format'](_0xfb19('0x32'));_0x26c5f9['state']=_0x48a949;_0x26c5f9[_0xfb19('0x34')]=_0x483d1c;_0x26c5f9['responsetime']=_0x80fbbb;_0x26c5f9['ringtime']=getSeconds(_0x26c5f9[_0xfb19('0x36')],_0x26c5f9['starttime']);};exports[_0xfb19('0x38')]=function(_0x1da2f8,_0x597014,_0x13b7a5){_0x1da2f8[_0xfb19('0x39')]=_0x597014;_0x1da2f8[_0xfb19('0x3a')]=_0x13b7a5;};exports['logCustomer']=function(_0x4a221a,_0x1b94f4,_0x3f17d8){var _0x2fc670=moment()[_0xfb19('0x11')](_0xfb19('0x32'));_0x4a221a['state']=_0x1b94f4;_0x4a221a[_0xfb19('0x34')]=_0x3f17d8;_0x4a221a[_0xfb19('0x36')]=_0x4a221a['responsetime']?_0x4a221a[_0xfb19('0x36')]:_0x2fc670;_0x4a221a['endtime']=_0x4a221a[_0xfb19('0x37')]?_0x4a221a[_0xfb19('0x37')]:_0x2fc670;_0x4a221a[_0xfb19('0x3b')]=getSeconds(_0x4a221a['responsetime']||0x0,_0x4a221a['starttime']||0x0);_0x4a221a['talktime']=_0x4a221a['answertime']?getSeconds(_0x4a221a[_0xfb19('0x37')],_0x4a221a[_0xfb19('0x3c')]):0x0;};exports[_0xfb19('0x3d')]=function(_0x8b72c1){return _0x8b72c1==='Failure';};exports[_0xfb19('0x3e')]=function(_0x517bf7,_0x7aeab4,_0x3ca58c,_0x40ee9a,_0x45cc1c){var _0x40d0a7=_0x40ee9a?_0xfb19('0x3f'):_0x517bf7['calleridname'];_0x40d0a7=_0x45cc1c?'BOOKED':_0x40d0a7;return{'actionid':_0x517bf7[_0xfb19('0x40')],'action':_0xfb19('0x41'),'channel':_0x517bf7[_0xfb19('0x42')],'callerid':util['format'](_0xfb19('0x12'),_0x40d0a7,_0x517bf7['calleridnum']),'Exten':_0xfb19('0x25'),'Context':_0xfb19('0x43'),'Priority':'1','variable':_0x3ca58c,'timeout':(_0x7aeab4['timeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x517bf7[_0xfb19('0x40')]};};exports[_0xfb19('0x44')]=function(_0x3d1bf4){return _0x3d1bf4[_0xfb19('0x45')]+_0x3d1bf4[_0xfb19('0x46')]+_0x3d1bf4[_0xfb19('0x47')];};exports[_0xfb19('0x48')]=function(_0x537ddd){var _0x24d046=_['clone'](_0x537ddd);_0x24d046[_0xfb19('0x33')]=0xf;_0x24d046['statedesc']=_0xfb19('0x49');return _0x24d046;};exports[_0xfb19('0x4a')]=function(_0x2570aa,_0x428f9c,_0x1d3a1f){var _0x59c8c3={};_0x59c8c3[_0x428f9c]=_0x2570aa[_0x428f9c];_0x59c8c3[_0xfb19('0x4b')]=![];_0x59c8c3[_0xfb19('0x4c')]=moment()[_0xfb19('0x4d')](_0x1d3a1f,'minutes')['format'](_0xfb19('0x32'));_0x59c8c3[_0xfb19('0x19')]=_0x2570aa[_0xfb19('0x19')];_0x59c8c3['ListId']=_0x2570aa['ListId'];_0x59c8c3[_0xfb19('0x1b')]=_0x2570aa['VoiceQueueId']||undefined;return _0x59c8c3;};exports[_0xfb19('0x4e')]=function(_0x28f085,_0x589fdd){if(!_['isNil'](_0x28f085)){if(_0x28f085[_0xfb19('0x4f')]>0x0){_0x28f085[_0xfb19('0x4f')]-=0x1;}else{logger[_0xfb19('0x7')](_0x589fdd,_0xfb19('0x50'));}}else{logger[_0xfb19('0x7')](_0x589fdd,_0xfb19('0x51'));}};exports[_0xfb19('0x52')]=function(_0x5716d0){if(_0x5716d0<=0x0){return!![];}return![];};exports[_0xfb19('0x53')]=function(_0x1e2daa,_0x5a47d4){_0x1e2daa[_0xfb19('0x54')]=_0x5a47d4;_0x1e2daa[_0xfb19('0x17')]=_0x1e2daa[_0xfb19('0x55')];_0x1e2daa[_0xfb19('0x56')]=_0x1e2daa['channelAgent'];return _0x1e2daa;};exports['buildAcw']=function(_0x2483d8){var _0x438c1b={};_0x438c1b[_0xfb19('0x55')]=_0x2483d8[_0xfb19('0x55')];_0x438c1b[_0xfb19('0x56')]=_0x2483d8[_0xfb19('0x42')];_0x438c1b['uniqueid']=_0x2483d8['uniqueid'];return _0x438c1b;};exports[_0xfb19('0x57')]=function(_0x1b9844){var _0x394731=[];for(var _0x129001 in _0x1b9844){if(_0x1b9844[_0xfb19('0x28')](_0x129001)){if(!_[_0xfb19('0x15')](_0x1b9844[_0x129001])&&_0x1b9844[_0x129001][_0xfb19('0x33')]===_0xfb19('0x58')&&_0x1b9844[_0x129001][_0xfb19('0x59')]===_0xfb19('0x5a')){_0x394731['push'](_0x1b9844[_0x129001]['id']);}}}return _0x394731;};exports[_0xfb19('0x5b')]=function(_0x52d787){var _0xba5149=moment()[_0xfb19('0x5')](0x0);var _0x16650b=moment(_0x52d787)[_0xfb19('0x5')](0x0);return _0xba5149['diff'](_0x16650b,_0xfb19('0x6'));};exports[_0xfb19('0x5c')]=function(_0x577734){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x577734['ContactId'],'ListId':_0x577734['ListId'],'VoiceQueueId':_0x577734[_0xfb19('0x1b')]||undefined,'CampaignId':_0x577734[_0xfb19('0x5d')]||undefined};};exports[_0xfb19('0x5e')]=function(_0x5a4099){if(_0x5a4099===_0xfb19('0x40')||_0x5a4099===_0xfb19('0x5f')||_0x5a4099==='queue'||_0x5a4099===_0xfb19('0x60')||_0x5a4099===_0xfb19('0x61')||_0x5a4099==='dialAnswer'||_0x5a4099===_0xfb19('0x39')||_0x5a4099==='channelAgent'||_0x5a4099===_0xfb19('0x18')||_0x5a4099===_0xfb19('0x4b')||_0x5a4099===_0xfb19('0x62')||_0x5a4099===_0xfb19('0x4c')||_0x5a4099===_0xfb19('0x45')||_0x5a4099===_0xfb19('0x46')||_0x5a4099===_0xfb19('0x47')||_0x5a4099===_0xfb19('0x63')||_0x5a4099===_0xfb19('0x64')||_0x5a4099===_0xfb19('0x65')||_0x5a4099==='callbackat'||_0x5a4099===_0xfb19('0x66')||_0x5a4099==='ContactId'||_0x5a4099==='ListId'||_0x5a4099===_0xfb19('0x3a')||_0x5a4099===_0xfb19('0x1b')||_0x5a4099===_0xfb19('0x67')||_0x5a4099===_0xfb19('0x68')||_0x5a4099===_0xfb19('0x69')||_0x5a4099===_0xfb19('0x6a')||_0x5a4099===_0xfb19('0x6b')||_0x5a4099===_0xfb19('0x6c')||_0x5a4099===_0xfb19('0x6d')||_0x5a4099===_0xfb19('0x6e')||_0x5a4099===_0xfb19('0x6f')||_0x5a4099==='xmd-dialchannel'||_0x5a4099===_0xfb19('0x70')||_0x5a4099===_0xfb19('0x71')||_0x5a4099===_0xfb19('0x72')||_0x5a4099===_0xfb19('0x73')||_0x5a4099==='xmd-agi'||_0x5a4099==='rtpaudioqos'||_0x5a4099===_0xfb19('0x74')||_0x5a4099===_0xfb19('0x75')||_0x5a4099==='rtpaudioqosjitterbridged'||_0x5a4099===_0xfb19('0x76')||_0x5a4099==='rtpaudioqoslossbridged'||_0x5a4099==='rtpaudioqosrtt'||_0x5a4099==='rtpaudioqosrttbridged'||_0x5a4099===_0xfb19('0x77')||_0x5a4099===_0xfb19('0x74')||_0x5a4099===_0xfb19('0x75')||_0x5a4099===_0xfb19('0x78')||_0x5a4099===_0xfb19('0x76')||_0x5a4099===_0xfb19('0x79')||_0x5a4099===_0xfb19('0x7a')||_0x5a4099==='rtpaudioqosrttbridged'||_0x5a4099==='bridgepeer'||_0x5a4099==='bridgepvtcallid'||_0x5a4099===_0xfb19('0x33')||_0x5a4099==='statedesc'){return![];}return!![];};exports['getCallerIdRandom']=function(_0x482ae1,_0x38c768){var _0x238835,_0x4b28c3,_0x3d701c;if(_0x38c768<=0x0){_0x38c768=0x1;}_0x238835=new RegExp('\x5cw{0,'+_0x38c768+'}$');_0x4b28c3=Math[_0xfb19('0x7b')](0xa,_0x38c768-0x1);_0x3d701c=Math[_0xfb19('0x7b')](0xa,_0x38c768)-0x1;return util[_0xfb19('0x11')]('%s',_[_0xfb19('0x7c')](_0x482ae1,_0x238835,_[_0xfb19('0x7d')](_0x4b28c3,_0x3d701c)));};exports['extractCalleridName']=function(_0x5b834a){var _0x3e7449=_0x5b834a[_0xfb19('0x7e')](/"(.*?)"/);return _0x3e7449?_0x3e7449[0x1]:_0x5b834a;};exports[_0xfb19('0x7f')]=function(_0x414e86){var _0x27cbbc=_0x414e86[_0xfb19('0x7e')](/<(.*?)>/);return _0x27cbbc?_0x27cbbc[0x1]:_0x414e86;};
\ No newline at end of file
diff --git a/server/services/ami/properties.js b/server/services/ami/properties.js
index bd25911..49d84dc 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 _0x5f2f=['number','boolean','queueremove','reload','voicequeuechannel','voicechannel','voicequeuechannelhangup','queueadd','string'];(function(_0x5f4e30,_0x57e2de){var _0x2ffde2=function(_0x2cfc3f){while(--_0x2cfc3f){_0x5f4e30['push'](_0x5f4e30['shift']());}};_0x2ffde2(++_0x57e2de);}(_0x5f2f,0x73));var _0xf5f2=function(_0x3b5c43,_0x5c75ed){_0x3b5c43=_0x3b5c43-0x0;var _0x471d69=_0x5f2f[_0x3b5c43];return _0x471d69;};'use strict';exports[_0xf5f2('0x0')]={'queue':{'type':_0xf5f2('0x1'),'required':!![]},'interface':{'type':_0xf5f2('0x1'),'required':!![]},'membername':{'type':_0xf5f2('0x1'),'required':!![]},'penalty':{'type':_0xf5f2('0x2'),'required':![]},'paused':{'type':_0xf5f2('0x3'),'required':![]}};exports[_0xf5f2('0x4')]={'queue':{'type':_0xf5f2('0x1'),'required':!![]},'interface':{'type':'string','required':!![]}};exports['queuepause']={'interface':{'type':_0xf5f2('0x1'),'required':!![]},'paused':{'type':_0xf5f2('0x3')},'reason':{'type':_0xf5f2('0x1'),'required':![]}};exports[_0xf5f2('0x5')]={'module':{'type':_0xf5f2('0x1'),'required':![]}};exports[_0xf5f2('0x6')]={'uniqueid':{'type':'string','required':!![]}};exports[_0xf5f2('0x7')]={'uniqueid':{'type':_0xf5f2('0x1'),'required':!![]},'filename':{'type':_0xf5f2('0x1')},'format':{'type':'string'},'mixmonitorid':{'type':_0xf5f2('0x1')}};exports[_0xf5f2('0x8')]={'uniqueid':{'type':_0xf5f2('0x1'),'required':!![]}};exports['voicequeuechannelredirect']={'uniqueid':{'type':_0xf5f2('0x1'),'required':!![]},'exten':{'type':'string','required':!![]},'context':{'type':'string'}};
\ No newline at end of file
+var _0xb10b=['voicequeuechannelhangup','queueadd','string','number','queueremove','queuepause','boolean','reload','voicechannel'];(function(_0x49fac0,_0x39a9c3){var _0x387b0b=function(_0x35f7e7){while(--_0x35f7e7){_0x49fac0['push'](_0x49fac0['shift']());}};_0x387b0b(++_0x39a9c3);}(_0xb10b,0x12a));var _0xbb10=function(_0x9fb085,_0x2251a3){_0x9fb085=_0x9fb085-0x0;var _0x400c75=_0xb10b[_0x9fb085];return _0x400c75;};'use strict';exports[_0xbb10('0x0')]={'queue':{'type':'string','required':!![]},'interface':{'type':_0xbb10('0x1'),'required':!![]},'membername':{'type':_0xbb10('0x1'),'required':!![]},'penalty':{'type':_0xbb10('0x2'),'required':![]},'paused':{'type':'boolean','required':![]}};exports[_0xbb10('0x3')]={'queue':{'type':_0xbb10('0x1'),'required':!![]},'interface':{'type':_0xbb10('0x1'),'required':!![]}};exports[_0xbb10('0x4')]={'interface':{'type':_0xbb10('0x1'),'required':!![]},'paused':{'type':_0xbb10('0x5')},'reason':{'type':'string','required':![]}};exports[_0xbb10('0x6')]={'module':{'type':_0xbb10('0x1'),'required':![]}};exports['voicequeuechannel']={'uniqueid':{'type':_0xbb10('0x1'),'required':!![]}};exports[_0xbb10('0x7')]={'uniqueid':{'type':_0xbb10('0x1'),'required':!![]},'filename':{'type':_0xbb10('0x1')},'format':{'type':_0xbb10('0x1')},'mixmonitorid':{'type':_0xbb10('0x1')}};exports[_0xbb10('0x8')]={'uniqueid':{'type':_0xbb10('0x1'),'required':!![]}};exports['voicequeuechannelredirect']={'uniqueid':{'type':'string','required':!![]},'exten':{'type':_0xbb10('0x1'),'required':!![]},'context':{'type':_0xbb10('0x1')}};
\ No newline at end of file
diff --git a/server/services/ami/realtime/index.js b/server/services/ami/realtime/index.js
index c60d718..f18e4b4 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 _0x1697=['deskAccounts','freshsalesAccounts','faxAccounts','mapKeys','hasOwnProperty','format','name','interface','SIP/%s','total','answered','sumDuration','sumBillable','ivrTotalCallsDays','isEmpty','unmanaged','abandoned','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','mergeFromDatabase','initAgents','length','isNil','isUndefined','agents','initTelephones','initTrunks','initVoiceQueues','voiceQueues','initTriggers','initZendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','freshdeskAccounts','initZohoAccounts','initDeskAccounts','initVtigerAccounts','vtigerAccounts','initServicenowAccounts','servicenowAccounts','dynamics365Accounts','initVoiceQueueHopperHistory','merge','initVoiceQueueReports','groupBy','uniqueid','queue','queuecallerexit','sumHoldTime','queuecallerleaveAt','diff','queuecallercompleteAt','queuecallerjoinAt','seconds','initVoiceCallReports','duration','disposition','billableseconds','campaigns','initVoiceExtensions','initCampaignHopperHistory','initFaxAccounts','bluebird','util','lodash','moment','../model/agent','../model/trunk','../model/voiceQueue','../model/trigger','../model/template','../model/campaign','../model/zendeskAccount','../model/salesforceAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/deskAccount','../model/servicenowAccount','../model/faxAccount','telephones','trunks','triggers','templates','outbound','voiceExtensions','channels','queueChannels','timers','zendeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts'];(function(_0x97c6ea,_0x4cffce){var _0x2d7f50=function(_0x54010e){while(--_0x54010e){_0x97c6ea['push'](_0x97c6ea['shift']());}};_0x2d7f50(++_0x4cffce);}(_0x1697,0xb2));var _0x7169=function(_0x2d8fc2,_0x1c461d){_0x2d8fc2=_0x2d8fc2-0x0;var _0x3a9e53=_0x1697[_0x2d8fc2];return _0x3a9e53;};'use strict';var BPromise=require(_0x7169('0x0'));var util=require(_0x7169('0x1'));var _=require(_0x7169('0x2'));var moment=require(_0x7169('0x3'));var Agent=require(_0x7169('0x4'));var Telephone=require('../model/telephone');var Trunk=require(_0x7169('0x5'));var VoiceQueue=require(_0x7169('0x6'));var Trigger=require(_0x7169('0x7'));var Template=require(_0x7169('0x8'));var Campaign=require(_0x7169('0x9'));var VoiceExtension=require('../model/voiceExtension');var ZendeskAccount=require(_0x7169('0xa'));var SalesforceAccount=require(_0x7169('0xb'));var FreshdeskAccount=require(_0x7169('0xc'));var SugarcrmAccount=require(_0x7169('0xd'));var ZohoAccount=require('../model/zohoAccount');var DeskAccount=require(_0x7169('0xe'));var VtigerAccount=require('../model/vtigerAccount');var ServicenowAccount=require(_0x7169('0xf'));var Dynamics365Account=require('../model/dynamics365Account');var FreshsalesAccount=require('../model/freshsalesAccount');var FaxAccount=require(_0x7169('0x10'));var Realtime=function(){this['agents']={};this[_0x7169('0x11')]={};this[_0x7169('0x12')]={};this['voiceQueues']={};this[_0x7169('0x13')]={};this['campaigns']={};this[_0x7169('0x14')]={};this[_0x7169('0x15')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0x7169('0x16')]={};this[_0x7169('0x17')]={};this[_0x7169('0x18')]={};this['outboundChannels']={};this[_0x7169('0x19')]={};this[_0x7169('0x1a')]={};this[_0x7169('0x1b')]={};this[_0x7169('0x1c')]={};this['freshdeskAccounts']={};this[_0x7169('0x1d')]={};this[_0x7169('0x1e')]={};this['vtigerAccounts']={};this['servicenowAccounts']={};this['dynamics365Accounts']={};this[_0x7169('0x1f')]={};this[_0x7169('0x20')]={};};function freeIsNotKey(_0x474bc3,_0x4674df,_0x510381){var _0x505a05=_[_0x7169('0x21')](_0x474bc3,function(_0x297880,_0x33eb7f){return _0x297880[_0x510381];});for(var _0x8e3c7b in _0x4674df){if(_0x4674df[_0x7169('0x22')](_0x8e3c7b)){if(!_0x505a05[_0x8e3c7b]){delete _0x4674df[_0x8e3c7b];}}}}function freeIsNotKeySip(_0x361e65,_0x5c7e26){var _0x4ae6dc=_[_0x7169('0x21')](_0x361e65,function(_0x2cf4fe,_0x130f3b){return util[_0x7169('0x23')]('SIP/%s',_0x2cf4fe[_0x7169('0x24')]);});for(var _0x3e4b64 in _0x5c7e26){if(_0x5c7e26[_0x7169('0x22')](_0x3e4b64)){if(!_0x4ae6dc[_0x3e4b64]){delete _0x5c7e26[_0x3e4b64];}}}}function freeIsNotKeyAgent(_0x182f36,_0x492f18){var _0x181573=_[_0x7169('0x21')](_0x182f36,function(_0x464818,_0x4f46b3){var _0x22c728=_['isNil'](_0x464818[_0x7169('0x25')])?util[_0x7169('0x23')](_0x7169('0x26'),_0x464818[_0x7169('0x24')]):_0x464818['interface'];return _0x22c728;});for(var _0x4c079f in _0x492f18){if(_0x492f18[_0x7169('0x22')](_0x4c079f)){if(!_0x181573[_0x4c079f]){delete _0x492f18[_0x4c079f];}}}}function clearVoiceCallReports(_0x377961){_0x377961[_0x7169('0x27')]=0x0;_0x377961[_0x7169('0x28')]=0x0;_0x377961['sumHoldTime']=0x0;_0x377961[_0x7169('0x29')]=0x0;_0x377961[_0x7169('0x2a')]=0x0;}function clearCampaigns(_0x10fdc1){if(!_['isEmpty'](_0x10fdc1)){for(var _0x25d775 in _0x10fdc1){if(_0x10fdc1[_0x7169('0x22')](_0x25d775)){_0x10fdc1[_0x25d775][_0x7169('0x2b')]=0x0;_0x10fdc1[_0x25d775]['ivrAnswerCallsDay']=0x0;}}}}function clearVoiceQueues(_0x297541){if(!_[_0x7169('0x2c')](_0x297541)){for(var _0x191bc0 in _0x297541){if(_0x297541[_0x7169('0x22')](_0x191bc0)){_0x297541[_0x191bc0][_0x7169('0x27')]=0x0;_0x297541[_0x191bc0][_0x7169('0x28')]=0x0;_0x297541[_0x191bc0][_0x7169('0x2d')]=0x0;_0x297541[_0x191bc0][_0x7169('0x2e')]=0x0;_0x297541[_0x191bc0]['sumHoldTime']=0x0;_0x297541[_0x191bc0]['sumDuration']=0x0;_0x297541[_0x191bc0]['sumBillable']=0x0;_0x297541[_0x191bc0]['outboundAnswerAgiCallsDay']=0x0;_0x297541[_0x191bc0][_0x7169('0x2f')]=0x0;_0x297541[_0x191bc0][_0x7169('0x30')]=0x0;_0x297541[_0x191bc0][_0x7169('0x31')]=0x0;_0x297541[_0x191bc0][_0x7169('0x32')]=0x0;_0x297541[_0x191bc0][_0x7169('0x33')]=0x0;_0x297541[_0x191bc0][_0x7169('0x34')]=0x0;_0x297541[_0x191bc0][_0x7169('0x35')]=0x0;_0x297541[_0x191bc0][_0x7169('0x36')]=0x0;_0x297541[_0x191bc0][_0x7169('0x37')]=0x0;_0x297541[_0x191bc0][_0x7169('0x38')]=0x0;_0x297541[_0x191bc0][_0x7169('0x39')]=0x0;_0x297541[_0x191bc0]['outboundAnswerAgiCallsDay']=0x0;_0x297541[_0x191bc0][_0x7169('0x3a')]=0x0;_0x297541[_0x191bc0][_0x7169('0x3b')]=!![];}}}}Realtime[_0x7169('0x3c')][_0x7169('0x3d')]=function(_0x2a881b,_0x9c3de5){for(var _0x54f945 in _0x9c3de5){if(_0x2a881b['hasOwnProperty'](_0x54f945)){_0x2a881b[_0x54f945]=_0x9c3de5[_0x54f945];}}};Realtime[_0x7169('0x3c')][_0x7169('0x3e')]=function(){var _0x21101c=this;return function(_0x15dda9){if(_0x15dda9){freeIsNotKeyAgent(_0x15dda9,_0x21101c['agents']);for(var _0x47b503=0x0,_0x26c83f={},_0x21cfbb={};_0x47b503<_0x15dda9[_0x7169('0x3f')];_0x47b503+=0x1){_0x26c83f=_0x15dda9[_0x47b503];var _0x3d6851=_[_0x7169('0x40')](_0x26c83f[_0x7169('0x25')])?util[_0x7169('0x23')](_0x7169('0x26'),_0x26c83f['name']):_0x26c83f['interface'];if(_[_0x7169('0x41')](_0x21101c[_0x7169('0x42')][_0x3d6851])){_0x21101c[_0x7169('0x42')][_0x3d6851]=new Agent(_0x26c83f);}else{_0x21101c['mergeFromDatabase'](_0x21101c[_0x7169('0x42')][_0x3d6851],_0x26c83f);}}}return _0x21101c[_0x7169('0x42')];};};Realtime[_0x7169('0x3c')][_0x7169('0x43')]=function(){var _0x5883f1=this;return function(_0x2ae261){if(_0x2ae261){freeIsNotKeySip(_0x2ae261,_0x5883f1[_0x7169('0x11')]);for(var _0x1fc9d1=0x0,_0xc81adc={},_0x45e519={};_0x1fc9d1<_0x2ae261[_0x7169('0x3f')];_0x1fc9d1+=0x1){_0xc81adc=_0x2ae261[_0x1fc9d1];if(_[_0x7169('0x41')](_0x5883f1[_0x7169('0x11')][util[_0x7169('0x23')]('SIP/%s',_0xc81adc[_0x7169('0x24')])])){_0x5883f1[_0x7169('0x11')][util[_0x7169('0x23')](_0x7169('0x26'),_0xc81adc[_0x7169('0x24')])]=new Telephone(_0xc81adc);}else{_0x5883f1[_0x7169('0x3d')](_0x5883f1['telephones'][util[_0x7169('0x23')]('SIP/%s',_0xc81adc[_0x7169('0x24')])],_0xc81adc);}}}return _0x5883f1['telephones'];};};Realtime[_0x7169('0x3c')][_0x7169('0x44')]=function(){var _0x4a2cf2=this;return function(_0x76fc8b){if(_0x76fc8b){freeIsNotKeySip(_0x76fc8b,_0x4a2cf2[_0x7169('0x12')]);for(var _0x46d8c9=0x0,_0x470b20={},_0x535572={};_0x46d8c9<_0x76fc8b[_0x7169('0x3f')];_0x46d8c9+=0x1){_0x470b20=_0x76fc8b[_0x46d8c9];if(_[_0x7169('0x41')](_0x4a2cf2[_0x7169('0x12')][util[_0x7169('0x23')](_0x7169('0x26'),_0x470b20[_0x7169('0x24')])])){_0x4a2cf2[_0x7169('0x12')][util[_0x7169('0x23')](_0x7169('0x26'),_0x470b20[_0x7169('0x24')])]=new Trunk(_0x470b20);}else{_0x4a2cf2[_0x7169('0x3d')](_0x4a2cf2[_0x7169('0x12')][util[_0x7169('0x23')](_0x7169('0x26'),_0x470b20[_0x7169('0x24')])],_0x470b20);}}}return _0x4a2cf2[_0x7169('0x12')];};};Realtime[_0x7169('0x3c')][_0x7169('0x45')]=function(){var _0x50c53f=this;return function(_0x292aa2){if(_0x292aa2){freeIsNotKey(_0x292aa2,_0x50c53f[_0x7169('0x46')],'name');for(var _0x2b5616=0x0,_0x585993={},_0x264ea2={};_0x2b5616<_0x292aa2[_0x7169('0x3f')];_0x2b5616+=0x1){_0x585993=_0x292aa2[_0x2b5616];if(_['isUndefined'](_0x50c53f[_0x7169('0x46')][_0x585993['name']])){_0x50c53f[_0x7169('0x46')][_0x585993[_0x7169('0x24')]]=new VoiceQueue(_0x585993);}else{_0x50c53f[_0x7169('0x3d')](_0x50c53f[_0x7169('0x46')][_0x585993[_0x7169('0x24')]],_0x585993);}}}return _0x50c53f[_0x7169('0x46')];};};Realtime[_0x7169('0x3c')][_0x7169('0x47')]=function(){var _0x1e34cc=this;return function(_0xc055fc){if(_0xc055fc){freeIsNotKey(_0xc055fc,_0x1e34cc[_0x7169('0x13')],'id');for(var _0x45d822=0x0,_0x594655={},_0x228e36={};_0x45d822<_0xc055fc['length'];_0x45d822+=0x1){_0x594655=_0xc055fc[_0x45d822];if(_[_0x7169('0x41')](_0x1e34cc[_0x7169('0x13')][_0x594655['id']])){_0x1e34cc[_0x7169('0x13')][_0x594655['id']]=new Trigger(_0x594655);}else{_0x1e34cc[_0x7169('0x3d')](_0x1e34cc[_0x7169('0x13')][_0x594655['id']],_0x594655);}}}return _0x1e34cc[_0x7169('0x13')];};};Realtime[_0x7169('0x3c')]['initTemplates']=function(){var _0x4eb462=this;return function(_0x305f11){if(_0x305f11){freeIsNotKey(_0x305f11,_0x4eb462[_0x7169('0x14')],'id');for(var _0x253b81=0x0,_0x4ec33f={},_0x59411f={};_0x253b81<_0x305f11[_0x7169('0x3f')];_0x253b81+=0x1){_0x4ec33f=_0x305f11[_0x253b81];if(_[_0x7169('0x41')](_0x4eb462[_0x7169('0x14')][_0x4ec33f['id']])){_0x4eb462['templates'][_0x4ec33f['id']]=new Template(_0x4ec33f);}else{_0x4eb462[_0x7169('0x3d')](_0x4eb462[_0x7169('0x14')][_0x4ec33f['id']],_0x4ec33f);}}}return _0x4eb462['templates'];};};Realtime[_0x7169('0x3c')][_0x7169('0x48')]=function(){var _0x14fb93=this;return function(_0x27fb6f){if(_0x27fb6f){freeIsNotKey(_0x27fb6f,_0x14fb93[_0x7169('0x1a')],'id');for(var _0x326706=0x0,_0x55f4f5={},_0x5d35b9={};_0x326706<_0x27fb6f[_0x7169('0x3f')];_0x326706+=0x1){_0x55f4f5=_0x27fb6f[_0x326706];if(_[_0x7169('0x41')](_0x14fb93[_0x7169('0x1a')][_0x55f4f5['id']])){_0x14fb93['zendeskAccounts'][_0x55f4f5['id']]=new ZendeskAccount(_0x55f4f5);}else{_0x14fb93[_0x7169('0x3d')](_0x14fb93['zendeskAccounts'][_0x55f4f5['id']],_0x55f4f5);}}}return _0x14fb93[_0x7169('0x1a')];};};Realtime['prototype'][_0x7169('0x49')]=function(){var _0x4d984c=this;return function(_0x17131f){if(_0x17131f){freeIsNotKey(_0x17131f,_0x4d984c[_0x7169('0x1b')],'id');for(var _0x3cfe5b=0x0,_0x54bcc6={},_0x3f898c={};_0x3cfe5b<_0x17131f['length'];_0x3cfe5b+=0x1){_0x54bcc6=_0x17131f[_0x3cfe5b];if(_[_0x7169('0x41')](_0x4d984c[_0x7169('0x1b')][_0x54bcc6['id']])){_0x4d984c[_0x7169('0x1b')][_0x54bcc6['id']]=new SalesforceAccount(_0x54bcc6);}else{_0x4d984c[_0x7169('0x3d')](_0x4d984c[_0x7169('0x1b')][_0x54bcc6['id']],_0x54bcc6);}}}return _0x4d984c[_0x7169('0x1b')];};};Realtime[_0x7169('0x3c')][_0x7169('0x4a')]=function(){var _0x1499ae=this;return function(_0x4d5a63){if(_0x4d5a63){freeIsNotKey(_0x4d5a63,_0x1499ae['freshdeskAccounts'],'id');for(var _0x322931=0x0,_0x1a9c78={},_0x2cabdd={};_0x322931<_0x4d5a63[_0x7169('0x3f')];_0x322931+=0x1){_0x1a9c78=_0x4d5a63[_0x322931];if(_['isUndefined'](_0x1499ae[_0x7169('0x4b')][_0x1a9c78['id']])){_0x1499ae[_0x7169('0x4b')][_0x1a9c78['id']]=new FreshdeskAccount(_0x1a9c78);}else{_0x1499ae[_0x7169('0x3d')](_0x1499ae[_0x7169('0x4b')][_0x1a9c78['id']],_0x1a9c78);}}}return _0x1499ae[_0x7169('0x4b')];};};Realtime['prototype'][_0x7169('0x4c')]=function(){var _0x1588b0=this;return function(_0x18a87f){if(_0x18a87f){freeIsNotKey(_0x18a87f,_0x1588b0[_0x7169('0x1d')],'id');for(var _0x3951e2=0x0,_0x5217df={},_0xebfd26={};_0x3951e2<_0x18a87f['length'];_0x3951e2+=0x1){_0x5217df=_0x18a87f[_0x3951e2];if(_[_0x7169('0x41')](_0x1588b0[_0x7169('0x1d')][_0x5217df['id']])){_0x1588b0[_0x7169('0x1d')][_0x5217df['id']]=new ZohoAccount(_0x5217df);}else{_0x1588b0['mergeFromDatabase'](_0x1588b0['zohoAccounts'][_0x5217df['id']],_0x5217df);}}}return _0x1588b0[_0x7169('0x1d')];};};Realtime['prototype'][_0x7169('0x4d')]=function(){var _0xc94592=this;return function(_0x19e868){if(_0x19e868){freeIsNotKey(_0x19e868,_0xc94592[_0x7169('0x1e')],'id');for(var _0x447453=0x0,_0x3a706d={},_0x5a37f3={};_0x447453<_0x19e868[_0x7169('0x3f')];_0x447453+=0x1){_0x3a706d=_0x19e868[_0x447453];if(_[_0x7169('0x41')](_0xc94592['deskAccounts'][_0x3a706d['id']])){_0xc94592['deskAccounts'][_0x3a706d['id']]=new DeskAccount(_0x3a706d);}else{_0xc94592[_0x7169('0x3d')](_0xc94592[_0x7169('0x1e')][_0x3a706d['id']],_0x3a706d);}}}return _0xc94592['deskAccounts'];};};Realtime[_0x7169('0x3c')]['initSugarcrmAccounts']=function(){var _0x310e14=this;return function(_0x30ab68){if(_0x30ab68){freeIsNotKey(_0x30ab68,_0x310e14[_0x7169('0x1c')],'id');for(var _0x611836=0x0,_0x445229={},_0x2bfd57={};_0x611836<_0x30ab68[_0x7169('0x3f')];_0x611836+=0x1){_0x445229=_0x30ab68[_0x611836];if(_[_0x7169('0x41')](_0x310e14[_0x7169('0x1c')][_0x445229['id']])){_0x310e14[_0x7169('0x1c')][_0x445229['id']]=new SugarcrmAccount(_0x445229);}else{_0x310e14[_0x7169('0x3d')](_0x310e14[_0x7169('0x1c')][_0x445229['id']],_0x445229);}}}return _0x310e14['sugarcrmAccounts'];};};Realtime['prototype'][_0x7169('0x4e')]=function(){var _0x3f09e7=this;return function(_0x20953c){if(_0x20953c){freeIsNotKey(_0x20953c,_0x3f09e7['vtigerAccounts'],'id');for(var _0x3cb145=0x0,_0x103a6d={},_0xf0eb00={};_0x3cb145<_0x20953c[_0x7169('0x3f')];_0x3cb145+=0x1){_0x103a6d=_0x20953c[_0x3cb145];if(_['isUndefined'](_0x3f09e7['vtigerAccounts'][_0x103a6d['id']])){_0x3f09e7[_0x7169('0x4f')][_0x103a6d['id']]=new VtigerAccount(_0x103a6d);}else{_0x3f09e7[_0x7169('0x3d')](_0x3f09e7[_0x7169('0x4f')][_0x103a6d['id']],_0x103a6d);}}}return _0x3f09e7[_0x7169('0x4f')];};};Realtime[_0x7169('0x3c')][_0x7169('0x50')]=function(){var _0x1216b0=this;return function(_0x2bdc5b){if(_0x2bdc5b){freeIsNotKey(_0x2bdc5b,_0x1216b0['servicenowAccounts'],'id');for(var _0x48cb0f=0x0,_0x17f9ee={},_0xf0a931={};_0x48cb0f<_0x2bdc5b['length'];_0x48cb0f+=0x1){_0x17f9ee=_0x2bdc5b[_0x48cb0f];if(_['isUndefined'](_0x1216b0[_0x7169('0x51')][_0x17f9ee['id']])){_0x1216b0[_0x7169('0x51')][_0x17f9ee['id']]=new ServicenowAccount(_0x17f9ee);}else{_0x1216b0['mergeFromDatabase'](_0x1216b0[_0x7169('0x51')][_0x17f9ee['id']],_0x17f9ee);}}}return _0x1216b0['servicenowAccounts'];};};Realtime[_0x7169('0x3c')]['initDynamics365Accounts']=function(){var _0x532110=this;return function(_0x51ce67){if(_0x51ce67){freeIsNotKey(_0x51ce67,_0x532110[_0x7169('0x52')],'id');for(var _0x5acd30=0x0,_0x4af01e={},_0x233aa8={};_0x5acd30<_0x51ce67[_0x7169('0x3f')];_0x5acd30+=0x1){_0x4af01e=_0x51ce67[_0x5acd30];if(_[_0x7169('0x41')](_0x532110[_0x7169('0x52')][_0x4af01e['id']])){_0x532110[_0x7169('0x52')][_0x4af01e['id']]=new Dynamics365Account(_0x4af01e);}else{_0x532110['mergeFromDatabase'](_0x532110[_0x7169('0x52')][_0x4af01e['id']],_0x4af01e);}}}return _0x532110[_0x7169('0x52')];};};Realtime[_0x7169('0x3c')]['initFreshsalesAccounts']=function(){var _0x500219=this;return function(_0x1825ac){if(_0x1825ac){freeIsNotKey(_0x1825ac,_0x500219[_0x7169('0x1f')],'id');for(var _0x1c4ddf=0x0,_0x2d7a3a={},_0x416a43={};_0x1c4ddf<_0x1825ac[_0x7169('0x3f')];_0x1c4ddf+=0x1){_0x2d7a3a=_0x1825ac[_0x1c4ddf];if(_[_0x7169('0x41')](_0x500219[_0x7169('0x1f')][_0x2d7a3a['id']])){_0x500219['freshsalesAccounts'][_0x2d7a3a['id']]=new FreshsalesAccount(_0x2d7a3a);}else{_0x500219['mergeFromDatabase'](_0x500219['freshsalesAccounts'][_0x2d7a3a['id']],_0x2d7a3a);}}}return _0x500219['freshsalesAccounts'];};};Realtime['prototype'][_0x7169('0x53')]=function(){var _0x574cff=this;return function(_0x1babf6){for(var _0x394449=0x0;_0x394449<_0x1babf6[_0x7169('0x3f')];_0x394449+=0x1){_[_0x7169('0x54')](_0x574cff[_0x7169('0x46')][_0x1babf6[_0x394449][_0x7169('0x24')]],_0x1babf6[_0x394449]);}return _0x574cff['voiceQueues'];};};Realtime[_0x7169('0x3c')][_0x7169('0x55')]=function(){var _0x3d0a2c=this;return function(_0x1755ef){clearVoiceQueues(_0x3d0a2c[_0x7169('0x46')]);if(_0x1755ef){_0x1755ef=_[_0x7169('0x56')](_0x1755ef,_0x7169('0x57'));for(var _0x797319 in _0x1755ef){if(_0x1755ef['hasOwnProperty'](_0x797319)){var _0x394b02={};for(var _0x5d41e0=0x0;_0x5d41e0<_0x1755ef[_0x797319]['length'];_0x5d41e0+=0x1){var _0x59ed8d=_0x1755ef[_0x797319][_0x5d41e0][_0x7169('0x58')];if(_0x3d0a2c[_0x7169('0x46')][_0x59ed8d]){if(_0x1755ef[_0x797319][_0x5d41e0][_0x7169('0x59')]){_0x3d0a2c[_0x7169('0x46')][_0x59ed8d][_0x7169('0x2d')]+=0x1;}if(_0x1755ef[_0x797319][_0x5d41e0]['queuecallerabandon']){_0x3d0a2c['voiceQueues'][_0x59ed8d][_0x7169('0x2e')]+=0x1;}_0x3d0a2c[_0x7169('0x46')][_0x59ed8d][_0x7169('0x5a')]+=moment(_0x1755ef[_0x797319][_0x5d41e0][_0x7169('0x5b')])[_0x7169('0x5c')](moment(_0x1755ef[_0x797319][_0x5d41e0]['queuecallerjoinAt']),'seconds')||0x0;if(_0x5d41e0===_0x1755ef[_0x797319]['length']-0x1){_0x3d0a2c[_0x7169('0x46')][_0x59ed8d]['sumDuration']+=moment(_0x1755ef[_0x797319][_0x5d41e0][_0x7169('0x5d')]||_0x1755ef[_0x797319][_0x5d41e0]['queuecallerabandonAt']||_0x1755ef[_0x797319][_0x5d41e0]['queuecallerexitAt'])[_0x7169('0x5c')](moment(_0x1755ef[_0x797319][_0x5d41e0][_0x7169('0x5e')]),_0x7169('0x5f'))||0x0;_0x3d0a2c[_0x7169('0x46')][_0x59ed8d]['total']+=0x1;if(_0x1755ef[_0x797319][_0x5d41e0]['queuecallercomplete']){_0x3d0a2c[_0x7169('0x46')][_0x59ed8d]['answered']+=0x1;_0x3d0a2c[_0x7169('0x46')][_0x59ed8d]['sumBillable']+=moment(_0x1755ef[_0x797319][_0x5d41e0][_0x7169('0x5d')])[_0x7169('0x5c')](moment(_0x1755ef[_0x797319][_0x5d41e0][_0x7169('0x5b')]),_0x7169('0x5f'))||0x0;}}else{_0x3d0a2c[_0x7169('0x46')][_0x59ed8d][_0x7169('0x29')]+=_0x3d0a2c['voiceQueues'][_0x59ed8d]['sumHoldTime']||0x0;}}}}}}return _0x3d0a2c['voiceQueues'];};};Realtime[_0x7169('0x3c')][_0x7169('0x60')]=function(){var _0x236d2f=this;return function(_0x3c7d15){clearVoiceCallReports(_0x236d2f[_0x7169('0x15')]);if(_0x3c7d15){for(var _0x57e298=0x0;_0x57e298<_0x3c7d15[_0x7169('0x3f')];_0x57e298+=0x1){_0x236d2f[_0x7169('0x15')][_0x7169('0x27')]+=0x1;_0x236d2f[_0x7169('0x15')][_0x7169('0x29')]+=_0x3c7d15[_0x57e298][_0x7169('0x61')];if(_0x3c7d15[_0x57e298][_0x7169('0x62')]==='ANSWERED'){_0x236d2f['outbound']['answered']+=0x1;_0x236d2f['outbound'][_0x7169('0x5a')]+=_0x3c7d15[_0x57e298][_0x7169('0x61')]-_0x3c7d15[_0x57e298][_0x7169('0x63')]||0x0;_0x236d2f[_0x7169('0x15')][_0x7169('0x2a')]+=_0x3c7d15[_0x57e298]['billableseconds'];}}}return _0x236d2f[_0x7169('0x15')];};};Realtime[_0x7169('0x3c')]['initCampaigns']=function(){var _0x331b56=this;return function(_0x5501c5){if(_0x5501c5){freeIsNotKey(_0x5501c5,_0x331b56[_0x7169('0x64')],'name');for(var _0x2b25ca=0x0,_0x12b6fb={};_0x2b25ca<_0x5501c5['length'];_0x2b25ca+=0x1){_0x12b6fb=_0x5501c5[_0x2b25ca];if(_['isUndefined'](_0x331b56[_0x7169('0x64')][_0x12b6fb['name']])){_0x331b56[_0x7169('0x64')][_0x12b6fb['name']]=new Campaign(_0x12b6fb);}else{_0x331b56[_0x7169('0x3d')](_0x331b56[_0x7169('0x64')][_0x12b6fb[_0x7169('0x24')]],_0x12b6fb);}}}return _0x331b56[_0x7169('0x64')];};};Realtime['prototype'][_0x7169('0x65')]=function(){var _0x518c97=this;return function(_0x1ca25c){if(_0x1ca25c){freeIsNotKey(_0x1ca25c,_0x518c97[_0x7169('0x16')],'id');for(var _0x4c56cf=0x0,_0x1b0879={};_0x4c56cf<_0x1ca25c[_0x7169('0x3f')];_0x4c56cf+=0x1){_0x1b0879=_0x1ca25c[_0x4c56cf];if(_[_0x7169('0x41')](_0x518c97[_0x7169('0x16')][_0x1b0879['id']])){_0x518c97[_0x7169('0x16')][_0x1b0879['id']]=new VoiceExtension(_0x1b0879);}else{_0x518c97[_0x7169('0x3d')](_0x518c97['voiceExtensions'][_0x1b0879['id']],_0x1b0879);}}}return _0x518c97['voiceExtensions'];};};Realtime[_0x7169('0x3c')][_0x7169('0x66')]=function(){var _0x72caa1=this;return function(_0x4b2046){clearCampaigns(_0x72caa1[_0x7169('0x64')]);for(var _0x5b4e54=0x0;_0x5b4e54<_0x4b2046['length'];_0x5b4e54+=0x1){_[_0x7169('0x54')](_0x72caa1[_0x7169('0x64')][_0x4b2046[_0x5b4e54][_0x7169('0x24')]],_0x4b2046[_0x5b4e54]);}return _0x72caa1[_0x7169('0x64')];};};Realtime[_0x7169('0x3c')][_0x7169('0x67')]=function(){var _0x175d50=this;return function(_0x111a2c){if(_0x111a2c){freeIsNotKey(_0x111a2c,_0x175d50[_0x7169('0x20')],'id');for(var _0x48c69c=0x0,_0xe738cb={},_0x11205f={};_0x48c69c<_0x111a2c[_0x7169('0x3f')];_0x48c69c+=0x1){_0xe738cb=_0x111a2c[_0x48c69c];if(_[_0x7169('0x41')](_0x175d50['faxAccounts'][_0xe738cb['id']])){_0x175d50['faxAccounts'][_0xe738cb['id']]=new FaxAccount(_0xe738cb);}else{_0x175d50[_0x7169('0x3d')](_0x175d50['faxAccounts'][_0xe738cb['id']],_0xe738cb);}}}return _0x175d50['faxAccounts'];};};module['exports']=Realtime;
\ No newline at end of file
+var _0x2cf4=['outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','initAgents','format','isUndefined','initTelephones','length','mergeFromDatabase','trunks','initVoiceQueues','initTriggers','triggers','zendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','freshdeskAccounts','initZohoAccounts','initSugarcrmAccounts','initServicenowAccounts','initDynamics365Accounts','initFreshsalesAccounts','initVoiceQueueHopperHistory','initVoiceQueueReports','groupBy','uniqueid','queue','queuecallerexit','queuecallerabandon','queuecallerleaveAt','diff','queuecallerjoinAt','seconds','queuecallercompleteAt','queuecallerabandonAt','queuecallerexitAt','queuecallercomplete','initVoiceCallReports','outbound','duration','disposition','ANSWERED','billableseconds','initCampaigns','merge','faxAccounts','bluebird','util','lodash','moment','../model/agent','../model/telephone','../model/voiceQueue','../model/template','../model/campaign','../model/zendeskAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/deskAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','agents','telephones','voiceQueues','campaigns','templates','voiceExtensions','channels','outboundChannels','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','hasOwnProperty','mapKeys','name','isNil','interface','SIP/%s','total','answered','sumHoldTime','sumDuration','isEmpty','ivrTotalCallsDays','ivrAnswerCallsDay','unmanaged','abandoned','sumBillable','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit'];(function(_0x384412,_0x6ad830){var _0x4c3e4f=function(_0x4bc660){while(--_0x4bc660){_0x384412['push'](_0x384412['shift']());}};_0x4c3e4f(++_0x6ad830);}(_0x2cf4,0x9b));var _0x42cf=function(_0xdeac17,_0x19ad66){_0xdeac17=_0xdeac17-0x0;var _0x33aabd=_0x2cf4[_0xdeac17];return _0x33aabd;};'use strict';var BPromise=require(_0x42cf('0x0'));var util=require(_0x42cf('0x1'));var _=require(_0x42cf('0x2'));var moment=require(_0x42cf('0x3'));var Agent=require(_0x42cf('0x4'));var Telephone=require(_0x42cf('0x5'));var Trunk=require('../model/trunk');var VoiceQueue=require(_0x42cf('0x6'));var Trigger=require('../model/trigger');var Template=require(_0x42cf('0x7'));var Campaign=require(_0x42cf('0x8'));var VoiceExtension=require('../model/voiceExtension');var ZendeskAccount=require(_0x42cf('0x9'));var SalesforceAccount=require('../model/salesforceAccount');var FreshdeskAccount=require(_0x42cf('0xa'));var SugarcrmAccount=require(_0x42cf('0xb'));var ZohoAccount=require(_0x42cf('0xc'));var DeskAccount=require(_0x42cf('0xd'));var VtigerAccount=require('../model/vtigerAccount');var ServicenowAccount=require(_0x42cf('0xe'));var Dynamics365Account=require(_0x42cf('0xf'));var FreshsalesAccount=require(_0x42cf('0x10'));var FaxAccount=require('../model/faxAccount');var Realtime=function(){this[_0x42cf('0x11')]={};this[_0x42cf('0x12')]={};this['trunks']={};this[_0x42cf('0x13')]={};this['triggers']={};this[_0x42cf('0x14')]={};this[_0x42cf('0x15')]={};this['outbound']={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0x42cf('0x16')]={};this[_0x42cf('0x17')]={};this['queueChannels']={};this[_0x42cf('0x18')]={};this['timers']={};this['zendeskAccounts']={};this[_0x42cf('0x19')]={};this[_0x42cf('0x1a')]={};this['freshdeskAccounts']={};this[_0x42cf('0x1b')]={};this[_0x42cf('0x1c')]={};this[_0x42cf('0x1d')]={};this[_0x42cf('0x1e')]={};this[_0x42cf('0x1f')]={};this[_0x42cf('0x20')]={};this['faxAccounts']={};};function freeIsNotKey(_0x4707c1,_0x161b68,_0x5de23f){var _0x6252af=_['mapKeys'](_0x4707c1,function(_0x48c538,_0x41b43d){return _0x48c538[_0x5de23f];});for(var _0x8e134f in _0x161b68){if(_0x161b68[_0x42cf('0x21')](_0x8e134f)){if(!_0x6252af[_0x8e134f]){delete _0x161b68[_0x8e134f];}}}}function freeIsNotKeySip(_0x1f9374,_0x1cf205){var _0x5163dd=_[_0x42cf('0x22')](_0x1f9374,function(_0x765da7,_0x2c4a5d){return util['format']('SIP/%s',_0x765da7[_0x42cf('0x23')]);});for(var _0x542b5a in _0x1cf205){if(_0x1cf205[_0x42cf('0x21')](_0x542b5a)){if(!_0x5163dd[_0x542b5a]){delete _0x1cf205[_0x542b5a];}}}}function freeIsNotKeyAgent(_0x171411,_0x19f46b){var _0x151fa1=_[_0x42cf('0x22')](_0x171411,function(_0x2ce85f,_0x866ad4){var _0x5a519b=_[_0x42cf('0x24')](_0x2ce85f[_0x42cf('0x25')])?util['format'](_0x42cf('0x26'),_0x2ce85f['name']):_0x2ce85f[_0x42cf('0x25')];return _0x5a519b;});for(var _0xd39dd9 in _0x19f46b){if(_0x19f46b['hasOwnProperty'](_0xd39dd9)){if(!_0x151fa1[_0xd39dd9]){delete _0x19f46b[_0xd39dd9];}}}}function clearVoiceCallReports(_0x16930b){_0x16930b[_0x42cf('0x27')]=0x0;_0x16930b[_0x42cf('0x28')]=0x0;_0x16930b[_0x42cf('0x29')]=0x0;_0x16930b[_0x42cf('0x2a')]=0x0;_0x16930b['sumBillable']=0x0;}function clearCampaigns(_0x442efa){if(!_[_0x42cf('0x2b')](_0x442efa)){for(var _0x1e49d7 in _0x442efa){if(_0x442efa[_0x42cf('0x21')](_0x1e49d7)){_0x442efa[_0x1e49d7][_0x42cf('0x2c')]=0x0;_0x442efa[_0x1e49d7][_0x42cf('0x2d')]=0x0;}}}}function clearVoiceQueues(_0x58c66a){if(!_[_0x42cf('0x2b')](_0x58c66a)){for(var _0x3d8843 in _0x58c66a){if(_0x58c66a[_0x42cf('0x21')](_0x3d8843)){_0x58c66a[_0x3d8843]['total']=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x28')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x2e')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x2f')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x29')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x2a')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x30')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x31')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x32')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x33')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x34')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x35')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x36')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x37')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x38')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x39')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x3a')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x3b')]=0x0;_0x58c66a[_0x3d8843]['outboundReCallsDay']=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x31')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x3c')]=0x0;_0x58c66a[_0x3d8843][_0x42cf('0x3d')]=!![];}}}}Realtime[_0x42cf('0x3e')]['mergeFromDatabase']=function(_0x1e8f66,_0x317c6f){for(var _0x567068 in _0x317c6f){if(_0x1e8f66[_0x42cf('0x21')](_0x567068)){_0x1e8f66[_0x567068]=_0x317c6f[_0x567068];}}};Realtime[_0x42cf('0x3e')][_0x42cf('0x3f')]=function(){var _0xaf479e=this;return function(_0x10c6ae){if(_0x10c6ae){freeIsNotKeyAgent(_0x10c6ae,_0xaf479e['agents']);for(var _0x5d1dbf=0x0,_0x9b2d86={},_0x352a8e={};_0x5d1dbf<_0x10c6ae['length'];_0x5d1dbf+=0x1){_0x9b2d86=_0x10c6ae[_0x5d1dbf];var _0x2283ad=_[_0x42cf('0x24')](_0x9b2d86[_0x42cf('0x25')])?util[_0x42cf('0x40')](_0x42cf('0x26'),_0x9b2d86[_0x42cf('0x23')]):_0x9b2d86[_0x42cf('0x25')];if(_[_0x42cf('0x41')](_0xaf479e['agents'][_0x2283ad])){_0xaf479e[_0x42cf('0x11')][_0x2283ad]=new Agent(_0x9b2d86);}else{_0xaf479e['mergeFromDatabase'](_0xaf479e['agents'][_0x2283ad],_0x9b2d86);}}}return _0xaf479e[_0x42cf('0x11')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x42')]=function(){var _0x552749=this;return function(_0x2238e8){if(_0x2238e8){freeIsNotKeySip(_0x2238e8,_0x552749[_0x42cf('0x12')]);for(var _0xb45d8f=0x0,_0x27c723={},_0x3af3fa={};_0xb45d8f<_0x2238e8[_0x42cf('0x43')];_0xb45d8f+=0x1){_0x27c723=_0x2238e8[_0xb45d8f];if(_[_0x42cf('0x41')](_0x552749[_0x42cf('0x12')][util[_0x42cf('0x40')](_0x42cf('0x26'),_0x27c723[_0x42cf('0x23')])])){_0x552749[_0x42cf('0x12')][util['format'](_0x42cf('0x26'),_0x27c723[_0x42cf('0x23')])]=new Telephone(_0x27c723);}else{_0x552749[_0x42cf('0x44')](_0x552749[_0x42cf('0x12')][util[_0x42cf('0x40')]('SIP/%s',_0x27c723['name'])],_0x27c723);}}}return _0x552749[_0x42cf('0x12')];};};Realtime[_0x42cf('0x3e')]['initTrunks']=function(){var _0x4c6183=this;return function(_0x4d1874){if(_0x4d1874){freeIsNotKeySip(_0x4d1874,_0x4c6183[_0x42cf('0x45')]);for(var _0x300d20=0x0,_0x135424={},_0x2477a1={};_0x300d20<_0x4d1874[_0x42cf('0x43')];_0x300d20+=0x1){_0x135424=_0x4d1874[_0x300d20];if(_[_0x42cf('0x41')](_0x4c6183[_0x42cf('0x45')][util[_0x42cf('0x40')]('SIP/%s',_0x135424[_0x42cf('0x23')])])){_0x4c6183[_0x42cf('0x45')][util[_0x42cf('0x40')](_0x42cf('0x26'),_0x135424['name'])]=new Trunk(_0x135424);}else{_0x4c6183[_0x42cf('0x44')](_0x4c6183[_0x42cf('0x45')][util[_0x42cf('0x40')](_0x42cf('0x26'),_0x135424[_0x42cf('0x23')])],_0x135424);}}}return _0x4c6183['trunks'];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x46')]=function(){var _0x309ca9=this;return function(_0x181c2e){if(_0x181c2e){freeIsNotKey(_0x181c2e,_0x309ca9[_0x42cf('0x13')],_0x42cf('0x23'));for(var _0x24e141=0x0,_0xbbdd0c={},_0x10d5bf={};_0x24e141<_0x181c2e[_0x42cf('0x43')];_0x24e141+=0x1){_0xbbdd0c=_0x181c2e[_0x24e141];if(_['isUndefined'](_0x309ca9[_0x42cf('0x13')][_0xbbdd0c[_0x42cf('0x23')]])){_0x309ca9[_0x42cf('0x13')][_0xbbdd0c['name']]=new VoiceQueue(_0xbbdd0c);}else{_0x309ca9[_0x42cf('0x44')](_0x309ca9['voiceQueues'][_0xbbdd0c[_0x42cf('0x23')]],_0xbbdd0c);}}}return _0x309ca9[_0x42cf('0x13')];};};Realtime['prototype'][_0x42cf('0x47')]=function(){var _0xb5dd9a=this;return function(_0x576f37){if(_0x576f37){freeIsNotKey(_0x576f37,_0xb5dd9a[_0x42cf('0x48')],'id');for(var _0x4ce72f=0x0,_0x2c06cf={},_0x3df92d={};_0x4ce72f<_0x576f37['length'];_0x4ce72f+=0x1){_0x2c06cf=_0x576f37[_0x4ce72f];if(_['isUndefined'](_0xb5dd9a[_0x42cf('0x48')][_0x2c06cf['id']])){_0xb5dd9a[_0x42cf('0x48')][_0x2c06cf['id']]=new Trigger(_0x2c06cf);}else{_0xb5dd9a[_0x42cf('0x44')](_0xb5dd9a[_0x42cf('0x48')][_0x2c06cf['id']],_0x2c06cf);}}}return _0xb5dd9a[_0x42cf('0x48')];};};Realtime[_0x42cf('0x3e')]['initTemplates']=function(){var _0xacbfcb=this;return function(_0x128a13){if(_0x128a13){freeIsNotKey(_0x128a13,_0xacbfcb[_0x42cf('0x15')],'id');for(var _0xef9a37=0x0,_0x91fe89={},_0x104c02={};_0xef9a37<_0x128a13[_0x42cf('0x43')];_0xef9a37+=0x1){_0x91fe89=_0x128a13[_0xef9a37];if(_[_0x42cf('0x41')](_0xacbfcb[_0x42cf('0x15')][_0x91fe89['id']])){_0xacbfcb[_0x42cf('0x15')][_0x91fe89['id']]=new Template(_0x91fe89);}else{_0xacbfcb[_0x42cf('0x44')](_0xacbfcb[_0x42cf('0x15')][_0x91fe89['id']],_0x91fe89);}}}return _0xacbfcb[_0x42cf('0x15')];};};Realtime['prototype']['initZendeskAccounts']=function(){var _0x5bcf61=this;return function(_0x37db47){if(_0x37db47){freeIsNotKey(_0x37db47,_0x5bcf61[_0x42cf('0x49')],'id');for(var _0x5bf394=0x0,_0x33ecec={},_0x35a6e2={};_0x5bf394<_0x37db47[_0x42cf('0x43')];_0x5bf394+=0x1){_0x33ecec=_0x37db47[_0x5bf394];if(_[_0x42cf('0x41')](_0x5bcf61['zendeskAccounts'][_0x33ecec['id']])){_0x5bcf61[_0x42cf('0x49')][_0x33ecec['id']]=new ZendeskAccount(_0x33ecec);}else{_0x5bcf61[_0x42cf('0x44')](_0x5bcf61[_0x42cf('0x49')][_0x33ecec['id']],_0x33ecec);}}}return _0x5bcf61[_0x42cf('0x49')];};};Realtime['prototype'][_0x42cf('0x4a')]=function(){var _0x33ec7f=this;return function(_0xdb6b1e){if(_0xdb6b1e){freeIsNotKey(_0xdb6b1e,_0x33ec7f[_0x42cf('0x19')],'id');for(var _0x2c239e=0x0,_0x3489c6={},_0x873f5c={};_0x2c239e<_0xdb6b1e['length'];_0x2c239e+=0x1){_0x3489c6=_0xdb6b1e[_0x2c239e];if(_[_0x42cf('0x41')](_0x33ec7f['salesforceAccounts'][_0x3489c6['id']])){_0x33ec7f[_0x42cf('0x19')][_0x3489c6['id']]=new SalesforceAccount(_0x3489c6);}else{_0x33ec7f['mergeFromDatabase'](_0x33ec7f[_0x42cf('0x19')][_0x3489c6['id']],_0x3489c6);}}}return _0x33ec7f[_0x42cf('0x19')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x4b')]=function(){var _0x546df3=this;return function(_0x560143){if(_0x560143){freeIsNotKey(_0x560143,_0x546df3[_0x42cf('0x4c')],'id');for(var _0xdba955=0x0,_0x2d280d={},_0x5ddf98={};_0xdba955<_0x560143[_0x42cf('0x43')];_0xdba955+=0x1){_0x2d280d=_0x560143[_0xdba955];if(_[_0x42cf('0x41')](_0x546df3[_0x42cf('0x4c')][_0x2d280d['id']])){_0x546df3[_0x42cf('0x4c')][_0x2d280d['id']]=new FreshdeskAccount(_0x2d280d);}else{_0x546df3[_0x42cf('0x44')](_0x546df3[_0x42cf('0x4c')][_0x2d280d['id']],_0x2d280d);}}}return _0x546df3[_0x42cf('0x4c')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x4d')]=function(){var _0x32f6c6=this;return function(_0x3dcddd){if(_0x3dcddd){freeIsNotKey(_0x3dcddd,_0x32f6c6['zohoAccounts'],'id');for(var _0x50b6ef=0x0,_0x4fa72a={},_0x518e1b={};_0x50b6ef<_0x3dcddd[_0x42cf('0x43')];_0x50b6ef+=0x1){_0x4fa72a=_0x3dcddd[_0x50b6ef];if(_[_0x42cf('0x41')](_0x32f6c6['zohoAccounts'][_0x4fa72a['id']])){_0x32f6c6[_0x42cf('0x1b')][_0x4fa72a['id']]=new ZohoAccount(_0x4fa72a);}else{_0x32f6c6['mergeFromDatabase'](_0x32f6c6[_0x42cf('0x1b')][_0x4fa72a['id']],_0x4fa72a);}}}return _0x32f6c6[_0x42cf('0x1b')];};};Realtime[_0x42cf('0x3e')]['initDeskAccounts']=function(){var _0x64cd4d=this;return function(_0x3d962a){if(_0x3d962a){freeIsNotKey(_0x3d962a,_0x64cd4d[_0x42cf('0x1c')],'id');for(var _0x22d7b4=0x0,_0xa3d74c={},_0x5dae76={};_0x22d7b4<_0x3d962a['length'];_0x22d7b4+=0x1){_0xa3d74c=_0x3d962a[_0x22d7b4];if(_['isUndefined'](_0x64cd4d[_0x42cf('0x1c')][_0xa3d74c['id']])){_0x64cd4d[_0x42cf('0x1c')][_0xa3d74c['id']]=new DeskAccount(_0xa3d74c);}else{_0x64cd4d['mergeFromDatabase'](_0x64cd4d[_0x42cf('0x1c')][_0xa3d74c['id']],_0xa3d74c);}}}return _0x64cd4d[_0x42cf('0x1c')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x4e')]=function(){var _0xbd43cf=this;return function(_0x1849cf){if(_0x1849cf){freeIsNotKey(_0x1849cf,_0xbd43cf[_0x42cf('0x1a')],'id');for(var _0x1be863=0x0,_0x42a905={},_0x56fde8={};_0x1be863<_0x1849cf[_0x42cf('0x43')];_0x1be863+=0x1){_0x42a905=_0x1849cf[_0x1be863];if(_[_0x42cf('0x41')](_0xbd43cf['sugarcrmAccounts'][_0x42a905['id']])){_0xbd43cf[_0x42cf('0x1a')][_0x42a905['id']]=new SugarcrmAccount(_0x42a905);}else{_0xbd43cf[_0x42cf('0x44')](_0xbd43cf[_0x42cf('0x1a')][_0x42a905['id']],_0x42a905);}}}return _0xbd43cf['sugarcrmAccounts'];};};Realtime['prototype']['initVtigerAccounts']=function(){var _0x48fa16=this;return function(_0x377f02){if(_0x377f02){freeIsNotKey(_0x377f02,_0x48fa16[_0x42cf('0x1d')],'id');for(var _0x4ffff6=0x0,_0x29cc8b={},_0x33fff8={};_0x4ffff6<_0x377f02['length'];_0x4ffff6+=0x1){_0x29cc8b=_0x377f02[_0x4ffff6];if(_['isUndefined'](_0x48fa16[_0x42cf('0x1d')][_0x29cc8b['id']])){_0x48fa16['vtigerAccounts'][_0x29cc8b['id']]=new VtigerAccount(_0x29cc8b);}else{_0x48fa16[_0x42cf('0x44')](_0x48fa16[_0x42cf('0x1d')][_0x29cc8b['id']],_0x29cc8b);}}}return _0x48fa16[_0x42cf('0x1d')];};};Realtime['prototype'][_0x42cf('0x4f')]=function(){var _0x42ab25=this;return function(_0x3ebc20){if(_0x3ebc20){freeIsNotKey(_0x3ebc20,_0x42ab25[_0x42cf('0x1e')],'id');for(var _0x38de53=0x0,_0x435d87={},_0x2e4d7c={};_0x38de53<_0x3ebc20[_0x42cf('0x43')];_0x38de53+=0x1){_0x435d87=_0x3ebc20[_0x38de53];if(_[_0x42cf('0x41')](_0x42ab25['servicenowAccounts'][_0x435d87['id']])){_0x42ab25[_0x42cf('0x1e')][_0x435d87['id']]=new ServicenowAccount(_0x435d87);}else{_0x42ab25[_0x42cf('0x44')](_0x42ab25['servicenowAccounts'][_0x435d87['id']],_0x435d87);}}}return _0x42ab25[_0x42cf('0x1e')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x50')]=function(){var _0x425b1a=this;return function(_0x5f1b44){if(_0x5f1b44){freeIsNotKey(_0x5f1b44,_0x425b1a[_0x42cf('0x1f')],'id');for(var _0x330b77=0x0,_0x32b8d2={},_0x3edbc5={};_0x330b77<_0x5f1b44['length'];_0x330b77+=0x1){_0x32b8d2=_0x5f1b44[_0x330b77];if(_[_0x42cf('0x41')](_0x425b1a[_0x42cf('0x1f')][_0x32b8d2['id']])){_0x425b1a[_0x42cf('0x1f')][_0x32b8d2['id']]=new Dynamics365Account(_0x32b8d2);}else{_0x425b1a[_0x42cf('0x44')](_0x425b1a[_0x42cf('0x1f')][_0x32b8d2['id']],_0x32b8d2);}}}return _0x425b1a[_0x42cf('0x1f')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x51')]=function(){var _0x6886bb=this;return function(_0x5b76e8){if(_0x5b76e8){freeIsNotKey(_0x5b76e8,_0x6886bb[_0x42cf('0x20')],'id');for(var _0x7574b2=0x0,_0x1668c1={},_0x4ed4f4={};_0x7574b2<_0x5b76e8[_0x42cf('0x43')];_0x7574b2+=0x1){_0x1668c1=_0x5b76e8[_0x7574b2];if(_[_0x42cf('0x41')](_0x6886bb[_0x42cf('0x20')][_0x1668c1['id']])){_0x6886bb[_0x42cf('0x20')][_0x1668c1['id']]=new FreshsalesAccount(_0x1668c1);}else{_0x6886bb[_0x42cf('0x44')](_0x6886bb[_0x42cf('0x20')][_0x1668c1['id']],_0x1668c1);}}}return _0x6886bb[_0x42cf('0x20')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x52')]=function(){var _0x54f8e5=this;return function(_0x21a66e){for(var _0x25095c=0x0;_0x25095c<_0x21a66e['length'];_0x25095c+=0x1){_['merge'](_0x54f8e5[_0x42cf('0x13')][_0x21a66e[_0x25095c]['name']],_0x21a66e[_0x25095c]);}return _0x54f8e5['voiceQueues'];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x53')]=function(){var _0x51a751=this;return function(_0xbd61e1){clearVoiceQueues(_0x51a751[_0x42cf('0x13')]);if(_0xbd61e1){_0xbd61e1=_[_0x42cf('0x54')](_0xbd61e1,_0x42cf('0x55'));for(var _0x14f7ce in _0xbd61e1){if(_0xbd61e1[_0x42cf('0x21')](_0x14f7ce)){var _0x18c2f3={};for(var _0x525a45=0x0;_0x525a45<_0xbd61e1[_0x14f7ce][_0x42cf('0x43')];_0x525a45+=0x1){var _0x12a95a=_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x56')];if(_0x51a751[_0x42cf('0x13')][_0x12a95a]){if(_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x57')]){_0x51a751[_0x42cf('0x13')][_0x12a95a][_0x42cf('0x2e')]+=0x1;}if(_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x58')]){_0x51a751[_0x42cf('0x13')][_0x12a95a]['abandoned']+=0x1;}_0x51a751[_0x42cf('0x13')][_0x12a95a][_0x42cf('0x29')]+=moment(_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x59')])[_0x42cf('0x5a')](moment(_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x5b')]),_0x42cf('0x5c'))||0x0;if(_0x525a45===_0xbd61e1[_0x14f7ce][_0x42cf('0x43')]-0x1){_0x51a751[_0x42cf('0x13')][_0x12a95a][_0x42cf('0x2a')]+=moment(_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x5d')]||_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x5e')]||_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x5f')])[_0x42cf('0x5a')](moment(_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x5b')]),_0x42cf('0x5c'))||0x0;_0x51a751[_0x42cf('0x13')][_0x12a95a][_0x42cf('0x27')]+=0x1;if(_0xbd61e1[_0x14f7ce][_0x525a45][_0x42cf('0x60')]){_0x51a751[_0x42cf('0x13')][_0x12a95a]['answered']+=0x1;_0x51a751[_0x42cf('0x13')][_0x12a95a][_0x42cf('0x30')]+=moment(_0xbd61e1[_0x14f7ce][_0x525a45]['queuecallercompleteAt'])[_0x42cf('0x5a')](moment(_0xbd61e1[_0x14f7ce][_0x525a45]['queuecallerleaveAt']),_0x42cf('0x5c'))||0x0;}}else{_0x51a751[_0x42cf('0x13')][_0x12a95a][_0x42cf('0x2a')]+=_0x51a751[_0x42cf('0x13')][_0x12a95a]['sumHoldTime']||0x0;}}}}}}return _0x51a751[_0x42cf('0x13')];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x61')]=function(){var _0x58b9d0=this;return function(_0x3f0f62){clearVoiceCallReports(_0x58b9d0[_0x42cf('0x62')]);if(_0x3f0f62){for(var _0x1facd2=0x0;_0x1facd2<_0x3f0f62[_0x42cf('0x43')];_0x1facd2+=0x1){_0x58b9d0[_0x42cf('0x62')][_0x42cf('0x27')]+=0x1;_0x58b9d0[_0x42cf('0x62')][_0x42cf('0x2a')]+=_0x3f0f62[_0x1facd2][_0x42cf('0x63')];if(_0x3f0f62[_0x1facd2][_0x42cf('0x64')]===_0x42cf('0x65')){_0x58b9d0[_0x42cf('0x62')][_0x42cf('0x28')]+=0x1;_0x58b9d0[_0x42cf('0x62')][_0x42cf('0x29')]+=_0x3f0f62[_0x1facd2][_0x42cf('0x63')]-_0x3f0f62[_0x1facd2][_0x42cf('0x66')]||0x0;_0x58b9d0['outbound']['sumBillable']+=_0x3f0f62[_0x1facd2][_0x42cf('0x66')];}}}return _0x58b9d0['outbound'];};};Realtime[_0x42cf('0x3e')][_0x42cf('0x67')]=function(){var _0xb38a42=this;return function(_0x5b28d2){if(_0x5b28d2){freeIsNotKey(_0x5b28d2,_0xb38a42[_0x42cf('0x14')],_0x42cf('0x23'));for(var _0x314864=0x0,_0xbd93a9={};_0x314864<_0x5b28d2[_0x42cf('0x43')];_0x314864+=0x1){_0xbd93a9=_0x5b28d2[_0x314864];if(_[_0x42cf('0x41')](_0xb38a42[_0x42cf('0x14')][_0xbd93a9[_0x42cf('0x23')]])){_0xb38a42[_0x42cf('0x14')][_0xbd93a9['name']]=new Campaign(_0xbd93a9);}else{_0xb38a42['mergeFromDatabase'](_0xb38a42[_0x42cf('0x14')][_0xbd93a9['name']],_0xbd93a9);}}}return _0xb38a42[_0x42cf('0x14')];};};Realtime['prototype']['initVoiceExtensions']=function(){var _0x901876=this;return function(_0x4999b3){if(_0x4999b3){freeIsNotKey(_0x4999b3,_0x901876[_0x42cf('0x16')],'id');for(var _0x3a2ae9=0x0,_0x5e58eb={};_0x3a2ae9<_0x4999b3[_0x42cf('0x43')];_0x3a2ae9+=0x1){_0x5e58eb=_0x4999b3[_0x3a2ae9];if(_['isUndefined'](_0x901876['voiceExtensions'][_0x5e58eb['id']])){_0x901876[_0x42cf('0x16')][_0x5e58eb['id']]=new VoiceExtension(_0x5e58eb);}else{_0x901876[_0x42cf('0x44')](_0x901876[_0x42cf('0x16')][_0x5e58eb['id']],_0x5e58eb);}}}return _0x901876[_0x42cf('0x16')];};};Realtime[_0x42cf('0x3e')]['initCampaignHopperHistory']=function(){var _0x22f09f=this;return function(_0x31de56){clearCampaigns(_0x22f09f[_0x42cf('0x14')]);for(var _0x2c7ff4=0x0;_0x2c7ff4<_0x31de56[_0x42cf('0x43')];_0x2c7ff4+=0x1){_[_0x42cf('0x68')](_0x22f09f[_0x42cf('0x14')][_0x31de56[_0x2c7ff4]['name']],_0x31de56[_0x2c7ff4]);}return _0x22f09f[_0x42cf('0x14')];};};Realtime[_0x42cf('0x3e')]['initFaxAccounts']=function(){var _0xc7ffd9=this;return function(_0x30aaa6){if(_0x30aaa6){freeIsNotKey(_0x30aaa6,_0xc7ffd9[_0x42cf('0x69')],'id');for(var _0x472571=0x0,_0x35f456={},_0x4c77b9={};_0x472571<_0x30aaa6[_0x42cf('0x43')];_0x472571+=0x1){_0x35f456=_0x30aaa6[_0x472571];if(_[_0x42cf('0x41')](_0xc7ffd9[_0x42cf('0x69')][_0x35f456['id']])){_0xc7ffd9[_0x42cf('0x69')][_0x35f456['id']]=new FaxAccount(_0x35f456);}else{_0xc7ffd9[_0x42cf('0x44')](_0xc7ffd9[_0x42cf('0x69')][_0x35f456['id']],_0x35f456);}}}return _0xc7ffd9[_0x42cf('0x69')];};};module['exports']=Realtime;
\ No newline at end of file
diff --git a/server/services/ami/report/index.js b/server/services/ami/report/index.js
index b306a28..69b7c8c 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 _0xcfdf=['phone','lastIndexOf','exports','bluebird','moment','util','../../../config/environment','../../../config/logger','ami','../ami','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./userReport','agents','telephones','sync','realtime','xdr','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','findAgent','find','accountcode','name','isNil','interface','SIP/%s','prototype','length','connectedlinenum','assigned','lastAssignedTo','format','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','create','match','destination','type','dialer','lastapplication','queue','context','from-voip-provider','from-sip','xcally-motion-preview','calleridnum','originatecalleridnum','destinationchannel','channel','callerid','calleridpreview','\x22%s\x22\x20<%s>','calleridname','monitor','monitors','filename','createdAt','exten','connectedlinename','membername','voiceAgentReport','forEach','Local','substring','indexOf','mobile'];(function(_0x4ccde9,_0x40fce2){var _0x280f19=function(_0x4aefa4){while(--_0x4aefa4){_0x4ccde9['push'](_0x4ccde9['shift']());}};_0x280f19(++_0x40fce2);}(_0xcfdf,0x14b));var _0xfcfd=function(_0x57b9bc,_0x564e60){_0x57b9bc=_0x57b9bc-0x0;var _0x2ef040=_0xcfdf[_0x57b9bc];return _0x2ef040;};'use strict';var BPromise=require(_0xfcfd('0x0'));var _=require('lodash');var moment=require(_0xfcfd('0x1'));var util=require(_0xfcfd('0x2'));var config=require(_0xfcfd('0x3'));var logger=require(_0xfcfd('0x4'))(_0xfcfd('0x5'));var ami=require(_0xfcfd('0x6'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require(_0xfcfd('0x7'));var RpcVoiceDialReport=require(_0xfcfd('0x8'));var RpcMemberReport=require(_0xfcfd('0x9'));var RpcVoiceQueueReport=require('../rpc/voiceQueueReport');var RpcVoiceRecording=require(_0xfcfd('0xa'));var RpcVoiceTransferReport=require(_0xfcfd('0xb'));var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require('./voiceAgentReport');var VoiceDialReport=require('./voiceDialReport');var UserReport=require(_0xfcfd('0xc'));function Report(_0x4c83be){this['realtime']=_0x4c83be;this[_0xfcfd('0xd')]=_0x4c83be['agents'];this[_0xfcfd('0xe')]=_0x4c83be[_0xfcfd('0xe')];}Report['prototype'][_0xfcfd('0xf')]=function(_0x1f8c30){var _0x392bab=new VoiceQueueReport(this[_0xfcfd('0x10')]);var _0x564c6b=new VoiceAgentReport(this[_0xfcfd('0x10')]);var _0x18bb9d=new VoiceDialReport(this[_0xfcfd('0x10')]);var _0x54200b=new VoiceCallReport(this['realtime']);var _0xc99a=new UserReport(this[_0xfcfd('0x10')]);if(config[_0xfcfd('0x11')]&&config['xdr']['disabled']){ami['on'](_0xfcfd('0x12'),this[_0xfcfd('0x13')][_0xfcfd('0x14')](this));ami['on'](_0xfcfd('0x15'),this[_0xfcfd('0x16')][_0xfcfd('0x14')](this));ami['on'](_0xfcfd('0x17'),this['voiceAgentReport']['bind'](this));ami['on']('custom:voiceDialReport',this[_0xfcfd('0x18')][_0xfcfd('0x14')](this));ami['on'](_0xfcfd('0x19'),this[_0xfcfd('0x1a')]['bind'](this));ami['on'](_0xfcfd('0x1b'),this[_0xfcfd('0x1c')]['bind'](this));}};Report['prototype'][_0xfcfd('0x1d')]=function(_0x119431){var _0x6d6399=undefined;_0x6d6399=_[_0xfcfd('0x1e')](this[_0xfcfd('0xd')],function(_0x3c7830){return _0x3c7830[_0xfcfd('0x1f')]==_0x119431||_0x3c7830[_0xfcfd('0x20')]==_0x119431;});if(_[_0xfcfd('0x21')](_0x6d6399)){var _0x4aeaf3=_['find'](this[_0xfcfd('0xe')],function(_0x2184ed){return _0x2184ed[_0xfcfd('0x1f')]==_0x119431||_0x2184ed[_0xfcfd('0x20')]==_0x119431;});if(_0x4aeaf3){_0x6d6399=_[_0xfcfd('0x1e')](this[_0xfcfd('0xd')],function(_0x287360){return _0x287360[_0xfcfd('0x22')]==util['format'](_0xfcfd('0x23'),_0x4aeaf3[_0xfcfd('0x20')]);});}}return _0x6d6399;};Report[_0xfcfd('0x24')][_0xfcfd('0x13')]=function(_0x9b4586){for(var _0x371b34=0x0;_0x371b34<_0x9b4586[_0xfcfd('0x25')];_0x371b34+=0x1){var _0x5907cd=this[_0xfcfd('0x1d')](_0x9b4586[_0x371b34][_0xfcfd('0x26')]);if(_0x5907cd){_0x9b4586[_0x371b34]['accountcode']=_0x5907cd[_0xfcfd('0x1f')];_0x9b4586[_0x371b34][_0xfcfd('0x27')]=!![];_0x9b4586[_0x371b34][_0xfcfd('0x28')]=_0x5907cd[_0xfcfd('0x20')];_0x9b4586[_0x371b34][_0xfcfd('0x22')]=_[_0xfcfd('0x21')](_0x5907cd[_0xfcfd('0x22')])?util[_0xfcfd('0x29')]('SIP/%s',_0x5907cd[_0xfcfd('0x20')]):_0x5907cd[_0xfcfd('0x22')];if(_0x9b4586[_0x371b34][_0xfcfd('0x2a')]){_0x9b4586[_0x371b34][_0xfcfd('0x2b')]=moment()['format'](_0xfcfd('0x2c'));}if(_0x9b4586[_0x371b34][_0xfcfd('0x2d')]){_0x9b4586[_0x371b34][_0xfcfd('0x2e')]=moment()[_0xfcfd('0x29')](_0xfcfd('0x2c'));}RpcMemberReport[_0xfcfd('0x13')](_0x9b4586[_0x371b34]);}RpcVoiceQueueReport[_0xfcfd('0x2f')](_0x9b4586[_0x371b34]);}};function extractCalleridNumber(_0x323d79){var _0x113136=_0x323d79[_0xfcfd('0x30')](/<(.*?)>/);return _0x113136?_0x113136[0x1]:_0x323d79;}Report[_0xfcfd('0x24')][_0xfcfd('0x16')]=function(_0x3864fe){_0x3864fe[_0xfcfd('0x31')]=_0x3864fe[_0xfcfd('0x31')]||_0x3864fe['exten'];if(_0x3864fe[_0xfcfd('0x32')]==_0xfcfd('0x33')){_0x3864fe[_0xfcfd('0x34')]='queue';_0x3864fe['lastdata']=_0x3864fe[_0xfcfd('0x35')];if(_0x3864fe[_0xfcfd('0x36')]==_0xfcfd('0x37')){_0x3864fe[_0xfcfd('0x1f')]='';_0x3864fe[_0xfcfd('0x31')]=extractCalleridNumber(_0x3864fe['callerid']);}else if(_0x3864fe[_0xfcfd('0x36')]==_0xfcfd('0x38')){if(_0x3864fe[_0xfcfd('0x31')]==_0xfcfd('0x39')){_0x3864fe['destination']=extractCalleridNumber(_0x3864fe['calleridpreview']);_0x3864fe[_0xfcfd('0x3a')]=_0x3864fe[_0xfcfd('0x3b')];_0x3864fe[_0xfcfd('0x3c')]=[_0x3864fe[_0xfcfd('0x3d')],_0x3864fe['channel']=_0x3864fe[_0xfcfd('0x3c')]][0x0];_0x3864fe[_0xfcfd('0x3e')]=_0x3864fe[_0xfcfd('0x3f')];}else{_0x3864fe['destination']=_0x3864fe['calleridnum'];_0x3864fe['calleridnum']=_0x3864fe['originatecalleridnum'];if(_0x3864fe['disposition']=='ANSWERED'){_0x3864fe[_0xfcfd('0x1f')]=_0x3864fe[_0xfcfd('0x26')];}else{_0x3864fe[_0xfcfd('0x1f')]='';}}}}else{_0x3864fe[_0xfcfd('0x3e')]=util['format'](_0xfcfd('0x40'),_0x3864fe[_0xfcfd('0x41')],_0x3864fe[_0xfcfd('0x3a')]);}RpcVoiceCallReport['create'](_0x3864fe);if(_0x3864fe[_0xfcfd('0x42')]){for(var _0x27345e=0x0;_0x27345e<_0x3864fe[_0xfcfd('0x43')]['length'];_0x27345e+=0x1){_0x3864fe['monitorFilename']=_0x3864fe[_0xfcfd('0x43')][_0x27345e][_0xfcfd('0x44')];_0x3864fe[_0xfcfd('0x45')]=_0x3864fe[_0xfcfd('0x43')][_0x27345e]['createdAt'];if(_0x3864fe[_0xfcfd('0x46')]==_0xfcfd('0x39')){_0x3864fe[_0xfcfd('0x3a')]=_0x3864fe[_0xfcfd('0x26')];_0x3864fe[_0xfcfd('0x41')]=_0x3864fe[_0xfcfd('0x47')];_0x3864fe['connectedlinenum']=_0x3864fe[_0xfcfd('0x1f')];_0x3864fe['connectedlinename']=_0x3864fe[_0xfcfd('0x48')];_0x3864fe['exten']=_0x3864fe[_0xfcfd('0x3b')];}else if(_0x3864fe[_0xfcfd('0x46')]=='xcally-motion-dialer'){_0x3864fe['calleridnum']=_0x3864fe['destination'];_0x3864fe[_0xfcfd('0x46')]=_0x3864fe[_0xfcfd('0x3b')];}RpcVoiceRecording['create'](_0x3864fe);}}};Report['prototype'][_0xfcfd('0x49')]=function(_0xa1a568){if(_['isArray'](_0xa1a568)){_0xa1a568[_0xfcfd('0x4a')](function(_0x4ec26f){RpcVoiceAgentReport[_0xfcfd('0x2f')](_0x4ec26f);});}else{RpcVoiceAgentReport[_0xfcfd('0x2f')](_0xa1a568);}};Report[_0xfcfd('0x24')]['voiceDialReport']=function(_0x27cd68){RpcVoiceDialReport[_0xfcfd('0x2f')](_0x27cd68);var _0x92512b=undefined;var _0x2409f7=_0x27cd68[_0xfcfd('0x3d')];if(_['startsWith'](_0x2409f7,_0xfcfd('0x4b'))){var _0x145533=_0x2409f7[_0xfcfd('0x4c')](_0x2409f7[_0xfcfd('0x4d')]('/')+0x1,_0x2409f7['indexOf']('@'));_0x92512b=_['find'](this[_0xfcfd('0xd')],function(_0x426622){return _0x426622[_0xfcfd('0x4e')]==_0x145533||_0x426622[_0xfcfd('0x4f')]==_0x145533||_0x426622[_0xfcfd('0x1f')]==_0x145533;});}else{var _0x145533=_0x2409f7[_0xfcfd('0x4c')](_0x2409f7['indexOf']('/')+0x1,_0x2409f7[_0xfcfd('0x50')]('-'));_0x92512b=this[_0xfcfd('0x1d')](_0x145533);}if(_0x92512b){_0x27cd68[_0xfcfd('0x22')]=_[_0xfcfd('0x21')](_0x92512b[_0xfcfd('0x22')])?util[_0xfcfd('0x29')](_0xfcfd('0x23'),_0x92512b[_0xfcfd('0x20')]):_0x92512b[_0xfcfd('0x22')];_0x27cd68[_0xfcfd('0x48')]=_0x92512b[_0xfcfd('0x20')];_0x27cd68['accountcode']=_0x92512b[_0xfcfd('0x1f')];RpcMemberReport[_0xfcfd('0x18')](_0x27cd68);}};Report[_0xfcfd('0x24')][_0xfcfd('0x1a')]=function(_0x431c23){RpcVoiceTransferReport[_0xfcfd('0x1a')](_0x431c23);};Report[_0xfcfd('0x24')]['attendedTransfer']=function(_0x2b1a25){RpcVoiceTransferReport['attendedTransfer'](_0x2b1a25);};module[_0xfcfd('0x51')]=Report;
\ No newline at end of file
+var _0xf7b9=['realtime','agents','telephones','prototype','sync','xdr','disabled','custom:voiceQueueReport','voiceQueueReport','custom:voiceCallReport','custom:voiceAgentReport','voiceAgentReport','bind','custom:voiceDialReport','voiceDialReport','blindtransfer','attendedTransfer','findAgent','find','accountcode','name','isNil','interface','format','SIP/%s','length','assigned','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','create','match','voiceCallReport','destination','exten','type','dialer','lastapplication','queue','lastdata','context','callerid','xcally-motion-preview','calleridpreview','calleridnum','channel','originatecalleridnum','disposition','ANSWERED','\x22%s\x22\x20<%s>','calleridname','monitor','monitorFilename','monitors','filename','createdAt','connectedlinenum','connectedlinename','membername','isArray','forEach','startsWith','Local','substring','indexOf','phone','lastIndexOf','blindTransfer','exports','bluebird','lodash','moment','util','../../../config/environment','ami','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport','./voiceCallReport','./voiceAgentReport','./voiceDialReport','./userReport'];(function(_0x4a53d,_0x58a95e){var _0x27410e=function(_0x38fc90){while(--_0x38fc90){_0x4a53d['push'](_0x4a53d['shift']());}};_0x27410e(++_0x58a95e);}(_0xf7b9,0xa0));var _0x9f7b=function(_0x34e157,_0x57744d){_0x34e157=_0x34e157-0x0;var _0xab8ee9=_0xf7b9[_0x34e157];return _0xab8ee9;};'use strict';var BPromise=require(_0x9f7b('0x0'));var _=require(_0x9f7b('0x1'));var moment=require(_0x9f7b('0x2'));var util=require(_0x9f7b('0x3'));var config=require(_0x9f7b('0x4'));var logger=require('../../../config/logger')(_0x9f7b('0x5'));var ami=require(_0x9f7b('0x6'));var RpcVoiceAgentReport=require(_0x9f7b('0x7'));var RpcVoiceCallReport=require(_0x9f7b('0x8'));var RpcVoiceDialReport=require(_0x9f7b('0x9'));var RpcMemberReport=require('../rpc/memberReport');var RpcVoiceQueueReport=require(_0x9f7b('0xa'));var RpcVoiceRecording=require(_0x9f7b('0xb'));var RpcVoiceTransferReport=require(_0x9f7b('0xc'));var VoiceQueueReport=require(_0x9f7b('0xd'));var VoiceCallReport=require(_0x9f7b('0xe'));var VoiceAgentReport=require(_0x9f7b('0xf'));var VoiceDialReport=require(_0x9f7b('0x10'));var UserReport=require(_0x9f7b('0x11'));function Report(_0xe469bb){this[_0x9f7b('0x12')]=_0xe469bb;this[_0x9f7b('0x13')]=_0xe469bb['agents'];this[_0x9f7b('0x14')]=_0xe469bb['telephones'];}Report[_0x9f7b('0x15')][_0x9f7b('0x16')]=function(_0x50525a){var _0x202437=new VoiceQueueReport(this[_0x9f7b('0x12')]);var _0x96efb3=new VoiceAgentReport(this[_0x9f7b('0x12')]);var _0x3647aa=new VoiceDialReport(this[_0x9f7b('0x12')]);var _0x24b4ec=new VoiceCallReport(this[_0x9f7b('0x12')]);var _0x476f85=new UserReport(this[_0x9f7b('0x12')]);if(config[_0x9f7b('0x17')]&&config[_0x9f7b('0x17')][_0x9f7b('0x18')]){ami['on'](_0x9f7b('0x19'),this[_0x9f7b('0x1a')]['bind'](this));ami['on'](_0x9f7b('0x1b'),this['voiceCallReport']['bind'](this));ami['on'](_0x9f7b('0x1c'),this[_0x9f7b('0x1d')][_0x9f7b('0x1e')](this));ami['on'](_0x9f7b('0x1f'),this[_0x9f7b('0x20')][_0x9f7b('0x1e')](this));ami['on'](_0x9f7b('0x21'),this['blindTransfer'][_0x9f7b('0x1e')](this));ami['on']('attendedtransfer',this[_0x9f7b('0x22')][_0x9f7b('0x1e')](this));}};Report[_0x9f7b('0x15')][_0x9f7b('0x23')]=function(_0x332ada){var _0x3d2d11=undefined;_0x3d2d11=_[_0x9f7b('0x24')](this[_0x9f7b('0x13')],function(_0x4c5699){return _0x4c5699[_0x9f7b('0x25')]==_0x332ada||_0x4c5699[_0x9f7b('0x26')]==_0x332ada;});if(_[_0x9f7b('0x27')](_0x3d2d11)){var _0x547d25=_[_0x9f7b('0x24')](this['telephones'],function(_0x1dc2ac){return _0x1dc2ac['accountcode']==_0x332ada||_0x1dc2ac['name']==_0x332ada;});if(_0x547d25){_0x3d2d11=_['find'](this[_0x9f7b('0x13')],function(_0x2d8afb){return _0x2d8afb[_0x9f7b('0x28')]==util[_0x9f7b('0x29')](_0x9f7b('0x2a'),_0x547d25[_0x9f7b('0x26')]);});}}return _0x3d2d11;};Report[_0x9f7b('0x15')][_0x9f7b('0x1a')]=function(_0x4f0842){for(var _0x189aac=0x0;_0x189aac<_0x4f0842[_0x9f7b('0x2b')];_0x189aac+=0x1){var _0x94277a=this[_0x9f7b('0x23')](_0x4f0842[_0x189aac]['connectedlinenum']);if(_0x94277a){_0x4f0842[_0x189aac][_0x9f7b('0x25')]=_0x94277a[_0x9f7b('0x25')];_0x4f0842[_0x189aac][_0x9f7b('0x2c')]=!![];_0x4f0842[_0x189aac]['lastAssignedTo']=_0x94277a[_0x9f7b('0x26')];_0x4f0842[_0x189aac][_0x9f7b('0x28')]=_['isNil'](_0x94277a[_0x9f7b('0x28')])?util[_0x9f7b('0x29')]('SIP/%s',_0x94277a['name']):_0x94277a[_0x9f7b('0x28')];if(_0x4f0842[_0x189aac][_0x9f7b('0x2d')]){_0x4f0842[_0x189aac][_0x9f7b('0x2e')]=moment()[_0x9f7b('0x29')](_0x9f7b('0x2f'));}if(_0x4f0842[_0x189aac][_0x9f7b('0x30')]){_0x4f0842[_0x189aac][_0x9f7b('0x31')]=moment()[_0x9f7b('0x29')](_0x9f7b('0x2f'));}RpcMemberReport[_0x9f7b('0x1a')](_0x4f0842[_0x189aac]);}RpcVoiceQueueReport[_0x9f7b('0x32')](_0x4f0842[_0x189aac]);}};function extractCalleridNumber(_0x2c9ce8){var _0x25e637=_0x2c9ce8[_0x9f7b('0x33')](/<(.*?)>/);return _0x25e637?_0x25e637[0x1]:_0x2c9ce8;}Report[_0x9f7b('0x15')][_0x9f7b('0x34')]=function(_0x48eeb5){_0x48eeb5[_0x9f7b('0x35')]=_0x48eeb5['destination']||_0x48eeb5[_0x9f7b('0x36')];if(_0x48eeb5[_0x9f7b('0x37')]==_0x9f7b('0x38')){_0x48eeb5[_0x9f7b('0x39')]=_0x9f7b('0x3a');_0x48eeb5[_0x9f7b('0x3b')]=_0x48eeb5[_0x9f7b('0x3a')];if(_0x48eeb5[_0x9f7b('0x3c')]=='from-voip-provider'){_0x48eeb5[_0x9f7b('0x25')]='';_0x48eeb5['destination']=extractCalleridNumber(_0x48eeb5[_0x9f7b('0x3d')]);}else if(_0x48eeb5[_0x9f7b('0x3c')]=='from-sip'){if(_0x48eeb5['destination']==_0x9f7b('0x3e')){_0x48eeb5[_0x9f7b('0x35')]=extractCalleridNumber(_0x48eeb5[_0x9f7b('0x3f')]);_0x48eeb5[_0x9f7b('0x40')]=_0x48eeb5['originatecalleridnum'];_0x48eeb5['destinationchannel']=[_0x48eeb5[_0x9f7b('0x41')],_0x48eeb5[_0x9f7b('0x41')]=_0x48eeb5['destinationchannel']][0x0];_0x48eeb5[_0x9f7b('0x3d')]=_0x48eeb5['calleridpreview'];}else{_0x48eeb5['destination']=_0x48eeb5[_0x9f7b('0x40')];_0x48eeb5[_0x9f7b('0x40')]=_0x48eeb5[_0x9f7b('0x42')];if(_0x48eeb5[_0x9f7b('0x43')]==_0x9f7b('0x44')){_0x48eeb5[_0x9f7b('0x25')]=_0x48eeb5['connectedlinenum'];}else{_0x48eeb5[_0x9f7b('0x25')]='';}}}}else{_0x48eeb5[_0x9f7b('0x3d')]=util[_0x9f7b('0x29')](_0x9f7b('0x45'),_0x48eeb5[_0x9f7b('0x46')],_0x48eeb5[_0x9f7b('0x40')]);}RpcVoiceCallReport[_0x9f7b('0x32')](_0x48eeb5);if(_0x48eeb5[_0x9f7b('0x47')]){for(var _0x50eaea=0x0;_0x50eaea<_0x48eeb5['monitors'][_0x9f7b('0x2b')];_0x50eaea+=0x1){_0x48eeb5[_0x9f7b('0x48')]=_0x48eeb5[_0x9f7b('0x49')][_0x50eaea][_0x9f7b('0x4a')];_0x48eeb5[_0x9f7b('0x4b')]=_0x48eeb5[_0x9f7b('0x49')][_0x50eaea][_0x9f7b('0x4b')];if(_0x48eeb5['exten']=='xcally-motion-preview'){_0x48eeb5['calleridnum']=_0x48eeb5[_0x9f7b('0x4c')];_0x48eeb5[_0x9f7b('0x46')]=_0x48eeb5['connectedlinename'];_0x48eeb5[_0x9f7b('0x4c')]=_0x48eeb5['accountcode'];_0x48eeb5[_0x9f7b('0x4d')]=_0x48eeb5[_0x9f7b('0x4e')];_0x48eeb5[_0x9f7b('0x36')]=_0x48eeb5[_0x9f7b('0x42')];}else if(_0x48eeb5[_0x9f7b('0x36')]=='xcally-motion-dialer'){_0x48eeb5[_0x9f7b('0x40')]=_0x48eeb5[_0x9f7b('0x35')];_0x48eeb5[_0x9f7b('0x36')]=_0x48eeb5['originatecalleridnum'];}RpcVoiceRecording['create'](_0x48eeb5);}}};Report[_0x9f7b('0x15')]['voiceAgentReport']=function(_0x35b73b){if(_[_0x9f7b('0x4f')](_0x35b73b)){_0x35b73b[_0x9f7b('0x50')](function(_0x49bd8c){RpcVoiceAgentReport['create'](_0x49bd8c);});}else{RpcVoiceAgentReport['create'](_0x35b73b);}};Report[_0x9f7b('0x15')][_0x9f7b('0x20')]=function(_0x735345){RpcVoiceDialReport[_0x9f7b('0x32')](_0x735345);var _0x3b0682=undefined;var _0x15ca3b=_0x735345[_0x9f7b('0x41')];if(_[_0x9f7b('0x51')](_0x15ca3b,_0x9f7b('0x52'))){var _0x202f75=_0x15ca3b[_0x9f7b('0x53')](_0x15ca3b[_0x9f7b('0x54')]('/')+0x1,_0x15ca3b[_0x9f7b('0x54')]('@'));_0x3b0682=_[_0x9f7b('0x24')](this['agents'],function(_0x20dab6){return _0x20dab6['mobile']==_0x202f75||_0x20dab6[_0x9f7b('0x55')]==_0x202f75||_0x20dab6[_0x9f7b('0x25')]==_0x202f75;});}else{var _0x202f75=_0x15ca3b[_0x9f7b('0x53')](_0x15ca3b[_0x9f7b('0x54')]('/')+0x1,_0x15ca3b[_0x9f7b('0x56')]('-'));_0x3b0682=this['findAgent'](_0x202f75);}if(_0x3b0682){_0x735345[_0x9f7b('0x28')]=_[_0x9f7b('0x27')](_0x3b0682[_0x9f7b('0x28')])?util[_0x9f7b('0x29')](_0x9f7b('0x2a'),_0x3b0682['name']):_0x3b0682[_0x9f7b('0x28')];_0x735345[_0x9f7b('0x4e')]=_0x3b0682['name'];_0x735345[_0x9f7b('0x25')]=_0x3b0682['accountcode'];RpcMemberReport['voiceDialReport'](_0x735345);}};Report[_0x9f7b('0x15')][_0x9f7b('0x57')]=function(_0x2e06ad){RpcVoiceTransferReport[_0x9f7b('0x57')](_0x2e06ad);};Report[_0x9f7b('0x15')][_0x9f7b('0x22')]=function(_0x3565ca){RpcVoiceTransferReport[_0x9f7b('0x22')](_0x3565ca);};module[_0x9f7b('0x58')]=Report;
\ No newline at end of file
diff --git a/server/services/ami/report/userReport.js b/server/services/ami/report/userReport.js
index 853bd58..8271cc7 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 _0x6acb=['syncRegistry','registry','bind','devicestatechange','syncDeviceState','peerstatus','resolve','actionSipShowRegistry','actionSipPeerStatus','catch','error','inspect','prototype','loopSyncRealTimeShow','then','[loopSyncRealTimeShow]','isNotNull','isUndefined','emit','find','username','stateRegistry','state','merge','event','actionid','trunk:%s','name','trunk:save','device','toLowerCase','local','stateTime','toNumber','format','updateStatusRealtime','telephone:%s','telephone:save','Local','indexOf','mobile','phone','accountcode','[syncDeviceState][UserReport]','syncPeerStatus','peer','registered','status','address','[syncPeerStatus][UserReport]','exports','lodash','moment','bluebird','util','ioredis','../../../config/environment','../../../config/logger','../ami','redis','defaults','localhost','socket.io-emitter','trunks','agents','telephones','registryentry'];(function(_0x269dfe,_0x306736){var _0x2d03db=function(_0x28caff){while(--_0x28caff){_0x269dfe['push'](_0x269dfe['shift']());}};_0x2d03db(++_0x306736);}(_0x6acb,0x1c5));var _0xb6ac=function(_0xcf0d77,_0x2195aa){_0xcf0d77=_0xcf0d77-0x0;var _0x13b05f=_0x6acb[_0xcf0d77];return _0x13b05f;};'use strict';var _=require(_0xb6ac('0x0'));var moment=require(_0xb6ac('0x1'));var BPromise=require(_0xb6ac('0x2'));var util=require(_0xb6ac('0x3'));var Redis=require(_0xb6ac('0x4'));var config=require(_0xb6ac('0x5'));var logger=require(_0xb6ac('0x6'))('ami');var ami=require(_0xb6ac('0x7'));config[_0xb6ac('0x8')]=_[_0xb6ac('0x9')](config['redis'],{'host':_0xb6ac('0xa'),'port':0x18eb});var io=require(_0xb6ac('0xb'))(new Redis(config[_0xb6ac('0x8')]));function UserReport(_0x14ebcd){this[_0xb6ac('0xc')]=_0x14ebcd[_0xb6ac('0xc')];this[_0xb6ac('0xd')]=_0x14ebcd['agents'];this[_0xb6ac('0xe')]=_0x14ebcd[_0xb6ac('0xe')];ami['on'](_0xb6ac('0xf'),this[_0xb6ac('0x10')]['bind'](this));ami['on'](_0xb6ac('0x11'),this[_0xb6ac('0x10')][_0xb6ac('0x12')](this));ami['on'](_0xb6ac('0x13'),this[_0xb6ac('0x14')]['bind'](this));ami['on'](_0xb6ac('0x15'),this['syncPeerStatus'][_0xb6ac('0x12')](this));this['loopSyncRealTimeShow']();return BPromise[_0xb6ac('0x16')]()['then'](ami[_0xb6ac('0x17')]())['then'](ami['actionDeviceStateList']())['then'](ami[_0xb6ac('0x18')]())[_0xb6ac('0x19')](loggerCatch('[loopSyncRealTimeShow]'));}function loggerCatch(_0x5628e6){return function(_0x242fbe){logger[_0xb6ac('0x1a')](_0x5628e6,util[_0xb6ac('0x1b')](_0x242fbe,{'showHidden':![],'depth':null}));};}UserReport[_0xb6ac('0x1c')][_0xb6ac('0x1d')]=function(){setInterval(function(){BPromise[_0xb6ac('0x16')]()[_0xb6ac('0x1e')](ami['actionSipShowRegistry']())['then'](ami['actionDeviceStateList']())[_0xb6ac('0x1e')](ami['actionSipPeerStatus']())[_0xb6ac('0x19')](loggerCatch(_0xb6ac('0x1f')));},0x32c8);};UserReport[_0xb6ac('0x1c')][_0xb6ac('0x20')]=function(_0x482a93){return _0x482a93!==null&&!_[_0xb6ac('0x21')](_0x482a93);};UserReport[_0xb6ac('0x1c')][_0xb6ac('0x22')]=function(_0x3a955a,_0x1ffb69,_0x4d518f){io['to'](_0x3a955a)[_0xb6ac('0x22')](_0x1ffb69,_0x4d518f);};UserReport[_0xb6ac('0x1c')][_0xb6ac('0x10')]=function(_0x62e26e){try{if(this[_0xb6ac('0x20')](_0x62e26e)){var _0x4e6393=_[_0xb6ac('0x23')](this[_0xb6ac('0xc')],{'registry':_0x62e26e[_0xb6ac('0x24')]});if(_0x4e6393){_0x62e26e[_0xb6ac('0x25')]=_0x62e26e[_0xb6ac('0x26')];_[_0xb6ac('0x27')](_0x4e6393,_['omit'](_0x62e26e,[_0xb6ac('0x28'),_0xb6ac('0x29'),_0xb6ac('0x24'),_0xb6ac('0x26')]));this[_0xb6ac('0x22')](util['format'](_0xb6ac('0x2a'),_0x4e6393[_0xb6ac('0x2b')]),_0xb6ac('0x2c'),_0x4e6393);}}}catch(_0x4dffb0){logger[_0xb6ac('0x1a')]('[syncRegistry][UserReport]',util[_0xb6ac('0x1b')](_0x4dffb0,{'showHidden':![],'depth':null}));}};UserReport[_0xb6ac('0x1c')][_0xb6ac('0x14')]=function(_0x5edc0b){try{if(this[_0xb6ac('0x20')](_0x5edc0b)){if(this[_0xb6ac('0xd')][_0x5edc0b[_0xb6ac('0x2d')]]){if(!this[_0xb6ac('0xd')][_0x5edc0b[_0xb6ac('0x2d')]]['local']||_0x5edc0b['state'][_0xb6ac('0x2e')]()=='inuse'){this[_0xb6ac('0xd')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x2f')]=![];if(this[_0xb6ac('0xd')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x26')]!==_0x5edc0b['state'][_0xb6ac('0x2e')]()){this[_0xb6ac('0xd')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x30')]=_[_0xb6ac('0x31')](moment()[_0xb6ac('0x32')]('x'));}this[_0xb6ac('0xd')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x26')]=_0x5edc0b[_0xb6ac('0x26')]['toLowerCase']();this[_0xb6ac('0xd')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x33')](_0x5edc0b);}}else if(this['telephones'][_0x5edc0b[_0xb6ac('0x2d')]]){if(this[_0xb6ac('0xe')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x26')]!==_0x5edc0b[_0xb6ac('0x26')][_0xb6ac('0x2e')]()){this[_0xb6ac('0xe')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x30')]=_[_0xb6ac('0x31')](moment()[_0xb6ac('0x32')]('x'));}this[_0xb6ac('0xe')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x26')]=_0x5edc0b[_0xb6ac('0x26')][_0xb6ac('0x2e')]();this[_0xb6ac('0x22')](util['format'](_0xb6ac('0x34'),this[_0xb6ac('0xe')][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x2b')]),_0xb6ac('0x35'),this['telephones'][_0x5edc0b[_0xb6ac('0x2d')]]);}else if(this[_0xb6ac('0xc')][_0x5edc0b[_0xb6ac('0x2d')]]){if(this[_0xb6ac('0xc')][_0x5edc0b['device']][_0xb6ac('0x26')]!==_0x5edc0b[_0xb6ac('0x26')][_0xb6ac('0x2e')]()){this[_0xb6ac('0xc')][_0x5edc0b['device']][_0xb6ac('0x30')]=_['toNumber'](moment()[_0xb6ac('0x32')]('x'));}this['trunks'][_0x5edc0b[_0xb6ac('0x2d')]][_0xb6ac('0x26')]=_0x5edc0b['state'][_0xb6ac('0x2e')]();this[_0xb6ac('0x22')](util[_0xb6ac('0x32')](_0xb6ac('0x2a'),this[_0xb6ac('0xc')][_0x5edc0b['device']][_0xb6ac('0x2b')]),_0xb6ac('0x2c'),this[_0xb6ac('0xc')][_0x5edc0b['device']]);}else if(_['startsWith'](_0x5edc0b[_0xb6ac('0x2d')],'Queue')){}else if(_['startsWith'](_0x5edc0b['device'],_0xb6ac('0x36'))){var _0x566a77=_0x5edc0b[_0xb6ac('0x2d')];var _0x46ef9c=_0x566a77['substring'](_0x566a77[_0xb6ac('0x37')]('/')+0x1,_0x566a77['indexOf']('@'));var _0x44ff5c=_[_0xb6ac('0x23')](this[_0xb6ac('0xd')],function(_0x3a5e5c){return _0x3a5e5c[_0xb6ac('0x38')]==_0x46ef9c||_0x3a5e5c[_0xb6ac('0x39')]==_0x46ef9c||_0x3a5e5c[_0xb6ac('0x3a')]==_0x46ef9c;});if(_0x44ff5c){if(_0x44ff5c[_0xb6ac('0x26')]!==_0x5edc0b['state'][_0xb6ac('0x2e')]()){_0x44ff5c[_0xb6ac('0x30')]=_['toNumber'](moment()[_0xb6ac('0x32')]('x'));}_0x44ff5c['state']=_0x5edc0b[_0xb6ac('0x26')][_0xb6ac('0x2e')]();_0x44ff5c[_0xb6ac('0x2f')]=!![];_0x44ff5c[_0xb6ac('0x33')](_0x5edc0b);}}else{}}}catch(_0x26b89e){logger[_0xb6ac('0x1a')](_0xb6ac('0x3b'),util[_0xb6ac('0x1b')](_0x26b89e,{'showHidden':![],'depth':null}));}};UserReport[_0xb6ac('0x1c')][_0xb6ac('0x3c')]=function(_0x46377e){try{if(this[_0xb6ac('0x20')](_0x46377e)&&this[_0xb6ac('0x20')](_0x46377e[_0xb6ac('0x15')])){if(this[_0xb6ac('0xd')][_0x46377e[_0xb6ac('0x3d')]]){if(!this[_0xb6ac('0xd')][_0x46377e[_0xb6ac('0x3d')]][_0xb6ac('0x2f')]||_0x46377e[_0xb6ac('0x15')]['toLowerCase']()==_0xb6ac('0x3e')){this[_0xb6ac('0xd')][_0x46377e[_0xb6ac('0x3d')]][_0xb6ac('0x2f')]=![];this[_0xb6ac('0xd')][_0x46377e['peer']][_0xb6ac('0x3f')]=_0x46377e[_0xb6ac('0x15')]['toLowerCase']();this[_0xb6ac('0xd')][_0x46377e['peer']][_0xb6ac('0x40')]=_0x46377e[_0xb6ac('0x40')];this[_0xb6ac('0xd')][_0x46377e['peer']][_0xb6ac('0x33')](_0x46377e);}}else if(this[_0xb6ac('0xe')][_0x46377e[_0xb6ac('0x3d')]]){this[_0xb6ac('0xe')][_0x46377e[_0xb6ac('0x3d')]]['status']=_0x46377e['peerstatus'][_0xb6ac('0x2e')]();this['telephones'][_0x46377e['peer']][_0xb6ac('0x40')]=_0x46377e[_0xb6ac('0x40')];this[_0xb6ac('0x22')](util[_0xb6ac('0x32')](_0xb6ac('0x34'),this[_0xb6ac('0xe')][_0x46377e[_0xb6ac('0x3d')]][_0xb6ac('0x2b')]),_0xb6ac('0x35'),this[_0xb6ac('0xe')][_0x46377e[_0xb6ac('0x3d')]]);}else if(this['trunks'][_0x46377e[_0xb6ac('0x3d')]]){this[_0xb6ac('0xc')][_0x46377e['peer']][_0xb6ac('0x3f')]=_0x46377e[_0xb6ac('0x15')][_0xb6ac('0x2e')]();this[_0xb6ac('0xc')][_0x46377e[_0xb6ac('0x3d')]]['address']=_0x46377e[_0xb6ac('0x40')];this[_0xb6ac('0x22')](util[_0xb6ac('0x32')]('trunk:%s',this['trunks'][_0x46377e['peer']][_0xb6ac('0x2b')]),_0xb6ac('0x2c'),this['trunks'][_0x46377e['peer']]);}else{}}}catch(_0x1f1826){logger[_0xb6ac('0x1a')](_0xb6ac('0x41'),util[_0xb6ac('0x1b')](_0x1f1826,{'showHidden':![],'depth':null}));}};module[_0xb6ac('0x42')]=UserReport;
\ No newline at end of file
+var _0x5c10=['telephone:save','trunks','startsWith','Queue','Local','substring','mobile','phone','[syncDeviceState][UserReport]','peer','status','address','telephone:%s','[syncPeerStatus][UserReport]','lodash','moment','bluebird','util','../../../config/environment','../../../config/logger','ami','../ami','redis','localhost','socket.io-emitter','agents','telephones','registryentry','syncRegistry','devicestatechange','syncDeviceState','bind','peerstatus','syncPeerStatus','loopSyncRealTimeShow','resolve','then','actionDeviceStateList','actionSipPeerStatus','[loopSyncRealTimeShow]','error','inspect','prototype','catch','isUndefined','emit','stateRegistry','state','omit','event','actionid','format','trunk:%s','trunk:save','[syncRegistry][UserReport]','isNotNull','device','local','inuse','stateTime','toNumber','toLowerCase','updateStatusRealtime','name'];(function(_0x6e51f1,_0x11371a){var _0x141b4c=function(_0x2e85e7){while(--_0x2e85e7){_0x6e51f1['push'](_0x6e51f1['shift']());}};_0x141b4c(++_0x11371a);}(_0x5c10,0x18e));var _0x05c1=function(_0x1cbaeb,_0x300003){_0x1cbaeb=_0x1cbaeb-0x0;var _0x3e7d2e=_0x5c10[_0x1cbaeb];return _0x3e7d2e;};'use strict';var _=require(_0x05c1('0x0'));var moment=require(_0x05c1('0x1'));var BPromise=require(_0x05c1('0x2'));var util=require(_0x05c1('0x3'));var Redis=require('ioredis');var config=require(_0x05c1('0x4'));var logger=require(_0x05c1('0x5'))(_0x05c1('0x6'));var ami=require(_0x05c1('0x7'));config['redis']=_['defaults'](config[_0x05c1('0x8')],{'host':_0x05c1('0x9'),'port':0x18eb});var io=require(_0x05c1('0xa'))(new Redis(config[_0x05c1('0x8')]));function UserReport(_0x5aba64){this['trunks']=_0x5aba64['trunks'];this['agents']=_0x5aba64[_0x05c1('0xb')];this[_0x05c1('0xc')]=_0x5aba64[_0x05c1('0xc')];ami['on'](_0x05c1('0xd'),this[_0x05c1('0xe')]['bind'](this));ami['on']('registry',this[_0x05c1('0xe')]['bind'](this));ami['on'](_0x05c1('0xf'),this[_0x05c1('0x10')][_0x05c1('0x11')](this));ami['on'](_0x05c1('0x12'),this[_0x05c1('0x13')][_0x05c1('0x11')](this));this[_0x05c1('0x14')]();return BPromise[_0x05c1('0x15')]()[_0x05c1('0x16')](ami['actionSipShowRegistry']())[_0x05c1('0x16')](ami[_0x05c1('0x17')]())[_0x05c1('0x16')](ami[_0x05c1('0x18')]())['catch'](loggerCatch(_0x05c1('0x19')));}function loggerCatch(_0x242230){return function(_0x29e1a7){logger[_0x05c1('0x1a')](_0x242230,util[_0x05c1('0x1b')](_0x29e1a7,{'showHidden':![],'depth':null}));};}UserReport[_0x05c1('0x1c')][_0x05c1('0x14')]=function(){setInterval(function(){BPromise[_0x05c1('0x15')]()['then'](ami['actionSipShowRegistry']())[_0x05c1('0x16')](ami['actionDeviceStateList']())['then'](ami[_0x05c1('0x18')]())[_0x05c1('0x1d')](loggerCatch(_0x05c1('0x19')));},0x32c8);};UserReport[_0x05c1('0x1c')]['isNotNull']=function(_0x3da95f){return _0x3da95f!==null&&!_[_0x05c1('0x1e')](_0x3da95f);};UserReport[_0x05c1('0x1c')][_0x05c1('0x1f')]=function(_0x2e0447,_0x8bada,_0x2d39d3){io['to'](_0x2e0447)[_0x05c1('0x1f')](_0x8bada,_0x2d39d3);};UserReport[_0x05c1('0x1c')][_0x05c1('0xe')]=function(_0x3b89e6){try{if(this['isNotNull'](_0x3b89e6)){var _0x1c3dfe=_['find'](this['trunks'],{'registry':_0x3b89e6['username']});if(_0x1c3dfe){_0x3b89e6[_0x05c1('0x20')]=_0x3b89e6[_0x05c1('0x21')];_['merge'](_0x1c3dfe,_[_0x05c1('0x22')](_0x3b89e6,[_0x05c1('0x23'),_0x05c1('0x24'),'username',_0x05c1('0x21')]));this['emit'](util[_0x05c1('0x25')](_0x05c1('0x26'),_0x1c3dfe['name']),_0x05c1('0x27'),_0x1c3dfe);}}}catch(_0x2c383c){logger['error'](_0x05c1('0x28'),util[_0x05c1('0x1b')](_0x2c383c,{'showHidden':![],'depth':null}));}};UserReport[_0x05c1('0x1c')][_0x05c1('0x10')]=function(_0x481304){try{if(this[_0x05c1('0x29')](_0x481304)){if(this[_0x05c1('0xb')][_0x481304[_0x05c1('0x2a')]]){if(!this[_0x05c1('0xb')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x2b')]||_0x481304[_0x05c1('0x21')]['toLowerCase']()==_0x05c1('0x2c')){this[_0x05c1('0xb')][_0x481304['device']][_0x05c1('0x2b')]=![];if(this[_0x05c1('0xb')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x21')]!==_0x481304['state']['toLowerCase']()){this[_0x05c1('0xb')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x2d')]=_[_0x05c1('0x2e')](moment()['format']('x'));}this[_0x05c1('0xb')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x21')]=_0x481304['state'][_0x05c1('0x2f')]();this[_0x05c1('0xb')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x30')](_0x481304);}}else if(this[_0x05c1('0xc')][_0x481304[_0x05c1('0x2a')]]){if(this[_0x05c1('0xc')][_0x481304[_0x05c1('0x2a')]]['state']!==_0x481304[_0x05c1('0x21')][_0x05c1('0x2f')]()){this[_0x05c1('0xc')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x2d')]=_[_0x05c1('0x2e')](moment()[_0x05c1('0x25')]('x'));}this[_0x05c1('0xc')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x21')]=_0x481304[_0x05c1('0x21')]['toLowerCase']();this[_0x05c1('0x1f')](util['format']('telephone:%s',this[_0x05c1('0xc')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x31')]),_0x05c1('0x32'),this['telephones'][_0x481304[_0x05c1('0x2a')]]);}else if(this[_0x05c1('0x33')][_0x481304[_0x05c1('0x2a')]]){if(this[_0x05c1('0x33')][_0x481304[_0x05c1('0x2a')]]['state']!==_0x481304[_0x05c1('0x21')][_0x05c1('0x2f')]()){this[_0x05c1('0x33')][_0x481304[_0x05c1('0x2a')]]['stateTime']=_[_0x05c1('0x2e')](moment()['format']('x'));}this[_0x05c1('0x33')][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x21')]=_0x481304[_0x05c1('0x21')][_0x05c1('0x2f')]();this[_0x05c1('0x1f')](util[_0x05c1('0x25')]('trunk:%s',this['trunks'][_0x481304[_0x05c1('0x2a')]][_0x05c1('0x31')]),_0x05c1('0x27'),this[_0x05c1('0x33')][_0x481304[_0x05c1('0x2a')]]);}else if(_[_0x05c1('0x34')](_0x481304['device'],_0x05c1('0x35'))){}else if(_['startsWith'](_0x481304['device'],_0x05c1('0x36'))){var _0x5e42f1=_0x481304[_0x05c1('0x2a')];var _0x4abdcb=_0x5e42f1[_0x05c1('0x37')](_0x5e42f1['indexOf']('/')+0x1,_0x5e42f1['indexOf']('@'));var _0x392c2c=_['find'](this[_0x05c1('0xb')],function(_0x1c1ffa){return _0x1c1ffa[_0x05c1('0x38')]==_0x4abdcb||_0x1c1ffa[_0x05c1('0x39')]==_0x4abdcb||_0x1c1ffa['accountcode']==_0x4abdcb;});if(_0x392c2c){if(_0x392c2c[_0x05c1('0x21')]!==_0x481304[_0x05c1('0x21')][_0x05c1('0x2f')]()){_0x392c2c[_0x05c1('0x2d')]=_[_0x05c1('0x2e')](moment()[_0x05c1('0x25')]('x'));}_0x392c2c[_0x05c1('0x21')]=_0x481304[_0x05c1('0x21')]['toLowerCase']();_0x392c2c['local']=!![];_0x392c2c[_0x05c1('0x30')](_0x481304);}}else{}}}catch(_0x2e2b65){logger['error'](_0x05c1('0x3a'),util[_0x05c1('0x1b')](_0x2e2b65,{'showHidden':![],'depth':null}));}};UserReport['prototype']['syncPeerStatus']=function(_0xe67e9a){try{if(this[_0x05c1('0x29')](_0xe67e9a)&&this['isNotNull'](_0xe67e9a['peerstatus'])){if(this['agents'][_0xe67e9a[_0x05c1('0x3b')]]){if(!this[_0x05c1('0xb')][_0xe67e9a['peer']][_0x05c1('0x2b')]||_0xe67e9a['peerstatus']['toLowerCase']()=='registered'){this[_0x05c1('0xb')][_0xe67e9a[_0x05c1('0x3b')]][_0x05c1('0x2b')]=![];this[_0x05c1('0xb')][_0xe67e9a['peer']][_0x05c1('0x3c')]=_0xe67e9a[_0x05c1('0x12')]['toLowerCase']();this[_0x05c1('0xb')][_0xe67e9a['peer']][_0x05c1('0x3d')]=_0xe67e9a[_0x05c1('0x3d')];this[_0x05c1('0xb')][_0xe67e9a[_0x05c1('0x3b')]][_0x05c1('0x30')](_0xe67e9a);}}else if(this[_0x05c1('0xc')][_0xe67e9a[_0x05c1('0x3b')]]){this[_0x05c1('0xc')][_0xe67e9a[_0x05c1('0x3b')]][_0x05c1('0x3c')]=_0xe67e9a[_0x05c1('0x12')]['toLowerCase']();this[_0x05c1('0xc')][_0xe67e9a['peer']][_0x05c1('0x3d')]=_0xe67e9a[_0x05c1('0x3d')];this[_0x05c1('0x1f')](util[_0x05c1('0x25')](_0x05c1('0x3e'),this[_0x05c1('0xc')][_0xe67e9a[_0x05c1('0x3b')]][_0x05c1('0x31')]),_0x05c1('0x32'),this[_0x05c1('0xc')][_0xe67e9a[_0x05c1('0x3b')]]);}else if(this[_0x05c1('0x33')][_0xe67e9a[_0x05c1('0x3b')]]){this[_0x05c1('0x33')][_0xe67e9a['peer']][_0x05c1('0x3c')]=_0xe67e9a[_0x05c1('0x12')][_0x05c1('0x2f')]();this[_0x05c1('0x33')][_0xe67e9a['peer']][_0x05c1('0x3d')]=_0xe67e9a[_0x05c1('0x3d')];this[_0x05c1('0x1f')](util[_0x05c1('0x25')]('trunk:%s',this[_0x05c1('0x33')][_0xe67e9a[_0x05c1('0x3b')]]['name']),'trunk:save',this[_0x05c1('0x33')][_0xe67e9a['peer']]);}else{}}}catch(_0x1d2d62){logger['error'](_0x05c1('0x3f'),util[_0x05c1('0x1b')](_0x1d2d62,{'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 d44514f..162fae1 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 _0xdd3f=['agentacw','acwtime','acwTimeout','interface','user:agentcomplete','[syncAgentComplete][VoiceAgentReport]','addVariable','keys','variable','value','[syncVarSet][VoiceAgentReport]','rtpaudioqos','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','agentcompleteAt','custom:voiceAgentReport','values','[syncHangup][VoiceAgentReport]','transfereeuniqueid','origtransfereruniqueid','complete','diff','seconds','secondtransfereruniqueid','[syncAttendedTransfer][VoiceAgentReport]','transfereruniqueid','[syncBlindTransfer][VoiceAgentReport]','syncMusicOnHoldStart','channel','substring','lastIndexOf','[syncMusicOnHoldStop][VoiceAgentReport]','exports','lodash','moment','util','ioredis','../../../config/environment','ami','../ami','redis','localhost','channels','voiceQueues','agents','variables','bind','agentconnect','syncAgentConnect','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','syncVarSet','hangup','musiconholdstart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','uniqueid','destuniqueid','YYYY-MM-DD\x20HH:mm:ss','called','queue','type','omit','privilege','custom:agentcalled','format','membername','user:called','inspect','agentconnectAt','lastevent','connect','holdtime','connectedlinenum','connectedlinename','destchannelstate','destchannelstatedesc','pick','destconnectedlinenum','user:%s','custom:agentconnect','agentringnoanswer','agentringnoanswerAt','answered_elsewhere','answeredelsewheremembername','custom:agentansweredelsewhere','error','rejected','custom:agentringnoanswer','hasOwnProperty','reason','abandoned','custom:agentqueuecallerabandon','talktime','transfer','agent'];(function(_0x439382,_0x392445){var _0x223265=function(_0x4d6046){while(--_0x4d6046){_0x439382['push'](_0x439382['shift']());}};_0x223265(++_0x392445);}(_0xdd3f,0x11b));var _0xfdd3=function(_0x22ad39,_0x1571f5){_0x22ad39=_0x22ad39-0x0;var _0x4be009=_0xdd3f[_0x22ad39];return _0x4be009;};'use strict';var _=require(_0xfdd3('0x0'));var moment=require(_0xfdd3('0x1'));var util=require(_0xfdd3('0x2'));var Redis=require(_0xfdd3('0x3'));var config=require(_0xfdd3('0x4'));var logger=require('../../../config/logger')(_0xfdd3('0x5'));var ami=require(_0xfdd3('0x6'));config['redis']=_['defaults'](config[_0xfdd3('0x7')],{'host':_0xfdd3('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xfdd3('0x7')]));function VoiceAgentReport(_0x3041b9){this[_0xfdd3('0x9')]={};this[_0xfdd3('0xa')]=_0x3041b9[_0xfdd3('0xa')];this[_0xfdd3('0xb')]=_0x3041b9[_0xfdd3('0xb')];this[_0xfdd3('0xc')]={};ami['on']('agentcalled',this['syncAgentCalled'][_0xfdd3('0xd')](this));ami['on'](_0xfdd3('0xe'),this[_0xfdd3('0xf')]['bind'](this));ami['on']('agentringnoanswer',this[_0xfdd3('0x10')][_0xfdd3('0xd')](this));ami['on'](_0xfdd3('0x11'),this[_0xfdd3('0x12')]['bind'](this));ami['on'](_0xfdd3('0x13'),this[_0xfdd3('0x14')][_0xfdd3('0xd')](this));ami['on']('varset',this[_0xfdd3('0x15')][_0xfdd3('0xd')](this));ami['on'](_0xfdd3('0x16'),this['syncHangup'][_0xfdd3('0xd')](this));ami['on'](_0xfdd3('0x17'),this['syncMusicOnHoldStart'][_0xfdd3('0xd')](this));ami['on'](_0xfdd3('0x18'),this[_0xfdd3('0x19')]['bind'](this));ami['on'](_0xfdd3('0x1a'),this[_0xfdd3('0x1b')][_0xfdd3('0xd')](this));ami['on'](_0xfdd3('0x1c'),this[_0xfdd3('0x1d')][_0xfdd3('0xd')](this));}VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x1f')]=function(_0x4587ea,_0x283c3d,_0x463e8f){io['to'](_0x4587ea)[_0xfdd3('0x1f')](_0x283c3d,_0x463e8f);};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x20')]=function(_0xb14ff5){return _0xb14ff5!==null&&!_['isUndefined'](_0xb14ff5);};VoiceAgentReport['prototype']['syncAgentCalled']=function(_0x40e673){try{if(this['isNotNull'](_0x40e673)){if(_[_0xfdd3('0x21')](this[_0xfdd3('0x9')][_0x40e673[_0xfdd3('0x22')]])){this['channels'][_0x40e673[_0xfdd3('0x22')]]={};}if(_[_0xfdd3('0x21')](this[_0xfdd3('0x9')][_0x40e673['uniqueid']][_0x40e673[_0xfdd3('0x23')]])){this['channels'][_0x40e673[_0xfdd3('0x22')]][_0x40e673[_0xfdd3('0x23')]]={'agentcalledAt':moment()['format'](_0xfdd3('0x24')),'lastevent':_0xfdd3('0x25'),'variables':this[_0xfdd3('0xc')][_0x40e673['uniqueid']],'type':this[_0xfdd3('0xa')][_0x40e673[_0xfdd3('0x26')]]?this[_0xfdd3('0xa')][_0x40e673[_0xfdd3('0x26')]][_0xfdd3('0x27')]||'inbound':'inbound'};}_['merge'](this[_0xfdd3('0x9')][_0x40e673[_0xfdd3('0x22')]][_0x40e673[_0xfdd3('0x23')]],_[_0xfdd3('0x28')](_0x40e673,['event',_0xfdd3('0x29')]));ami[_0xfdd3('0x1f')](_0xfdd3('0x2a'),this[_0xfdd3('0x9')][_0x40e673[_0xfdd3('0x22')]][_0x40e673['destuniqueid']]);this[_0xfdd3('0x1f')](util[_0xfdd3('0x2b')]('user:%s',_0x40e673[_0xfdd3('0x2c')]),_0xfdd3('0x2d'),this[_0xfdd3('0x9')][_0x40e673['uniqueid']][_0x40e673[_0xfdd3('0x23')]]);}}catch(_0x1ef680){logger['error']('[syncAgentCalled][VoiceAgentReport]',util[_0xfdd3('0x2e')](_0x1ef680,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0xf')]=function(_0x549c9d){try{if(this[_0xfdd3('0x20')](_0x549c9d)){if(this['channels'][_0x549c9d['uniqueid']]){for(var _0x54035d in this[_0xfdd3('0x9')][_0x549c9d['uniqueid']]){if(this['channels'][_0x549c9d[_0xfdd3('0x22')]]['hasOwnProperty'](_0x54035d)){if(_0x549c9d['destuniqueid']===_0x54035d){this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x2f')]=moment()['format'](_0xfdd3('0x24'));this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x30')]=_0xfdd3('0x31');this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x32')]=_0x549c9d[_0xfdd3('0x32')];this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x33')]=_0x549c9d[_0xfdd3('0x33')];this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x34')]=_0x549c9d['connectedlinename'];this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x35')]=_0x549c9d[_0xfdd3('0x35')];this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x36')]=_0x549c9d['destchannelstatedesc'];_['merge'](this[_0xfdd3('0xb')][_0x549c9d['interface']],_[_0xfdd3('0x37')](_0x549c9d,[_0xfdd3('0x26'),_0xfdd3('0x38')]));this[_0xfdd3('0x1f')](util[_0xfdd3('0x2b')](_0xfdd3('0x39'),_0x549c9d['membername']),'user:agentconnect',this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x549c9d['destuniqueid']]);ami[_0xfdd3('0x1f')](_0xfdd3('0x3a'),this[_0xfdd3('0x9')][_0x549c9d['uniqueid']][_0x54035d]);}else if(!this[_0xfdd3('0x9')][_0x549c9d['uniqueid']][_0x54035d]['agentringnoanswer']&&!this['channels'][_0x549c9d[_0xfdd3('0x22')]][_0x54035d]['agentcomplete']){this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x3b')]=!![];this['channels'][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x3c')]=moment()[_0xfdd3('0x2b')](_0xfdd3('0x24'));this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d]['reason']='answered_elsewhere';this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d][_0xfdd3('0x30')]=_0xfdd3('0x3d');this[_0xfdd3('0x9')][_0x549c9d[_0xfdd3('0x22')]][_0x54035d]['answeredelsewheredestinationuniqueid']=_0x549c9d[_0xfdd3('0x23')];this[_0xfdd3('0x9')][_0x549c9d['uniqueid']][_0x54035d][_0xfdd3('0x3e')]=_0x549c9d[_0xfdd3('0x2c')];ami[_0xfdd3('0x1f')](_0xfdd3('0x3f'),this[_0xfdd3('0x9')][_0x549c9d['uniqueid']][_0x54035d]);}}}}}}catch(_0x123e49){logger[_0xfdd3('0x40')]('[syncAgentConnect][VoiceAgentReport]',util[_0xfdd3('0x2e')](_0x123e49,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xfdd3('0x10')]=function(_0x46f512){try{if(this['isNotNull'](_0x46f512)){if(this[_0xfdd3('0x9')][_0x46f512[_0xfdd3('0x22')]]&&this['channels'][_0x46f512[_0xfdd3('0x22')]][_0x46f512[_0xfdd3('0x23')]]){this[_0xfdd3('0x9')][_0x46f512[_0xfdd3('0x22')]][_0x46f512[_0xfdd3('0x23')]][_0xfdd3('0x3b')]=!![];this[_0xfdd3('0x9')][_0x46f512[_0xfdd3('0x22')]][_0x46f512['destuniqueid']][_0xfdd3('0x3c')]=moment()[_0xfdd3('0x2b')](_0xfdd3('0x24'));this[_0xfdd3('0x9')][_0x46f512['uniqueid']][_0x46f512[_0xfdd3('0x23')]]['reason']=_0xfdd3('0x41');this[_0xfdd3('0x9')][_0x46f512[_0xfdd3('0x22')]][_0x46f512[_0xfdd3('0x23')]][_0xfdd3('0x30')]=_0xfdd3('0x41');ami['emit'](_0xfdd3('0x42'),this[_0xfdd3('0x9')][_0x46f512[_0xfdd3('0x22')]][_0x46f512['destuniqueid']]);}}}catch(_0x587382){logger[_0xfdd3('0x40')]('[syncAgentRingNoAnswer][VoiceAgentReport]',util['inspect'](_0x587382,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x12')]=function(_0x36e396){try{if(this[_0xfdd3('0x20')](_0x36e396)){if(this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]]){for(var _0x180fe4 in this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]]){if(this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]][_0xfdd3('0x43')](_0x180fe4)&&!this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]][_0x180fe4][_0xfdd3('0x3b')]&&!this['channels'][_0x36e396[_0xfdd3('0x22')]][_0x180fe4][_0xfdd3('0x13')]){this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]][_0x180fe4][_0xfdd3('0x3b')]=!![];this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]][_0x180fe4][_0xfdd3('0x3c')]=moment()[_0xfdd3('0x2b')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]][_0x180fe4][_0xfdd3('0x44')]=_0xfdd3('0x45');this[_0xfdd3('0x9')][_0x36e396[_0xfdd3('0x22')]][_0x180fe4][_0xfdd3('0x30')]='abandoned';ami['emit'](_0xfdd3('0x46'),this['channels'][_0x36e396[_0xfdd3('0x22')]][_0x180fe4]);}}}}}catch(_0x171029){logger[_0xfdd3('0x40')]('[syncQueueCallerAbandon][VoiceAgentReport]',util['inspect'](_0x171029,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x14')]=function(_0x35a290){try{if(this[_0xfdd3('0x20')](_0x35a290)){if(this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]]){for(var _0xf4e60e in this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]]){if(this['channels'][_0x35a290[_0xfdd3('0x22')]][_0xfdd3('0x43')](_0xf4e60e)){if(this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e][_0xfdd3('0x2f')]&&!this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e]['agentcomplete']){this['channels'][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e][_0xfdd3('0x13')]=!![];this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e]['agentcompleteAt']=moment()[_0xfdd3('0x2b')](_0xfdd3('0x24'));this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e][_0xfdd3('0x30')]='complete';this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e][_0xfdd3('0x47')]=_0x35a290[_0xfdd3('0x47')];this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e]['reason']=_0x35a290[_0xfdd3('0x44')]==_0xfdd3('0x48')?_0xfdd3('0x49'):_0x35a290['reason'];if(this[_0xfdd3('0xa')][_0x35a290[_0xfdd3('0x26')]]&&this[_0xfdd3('0xa')][_0x35a290[_0xfdd3('0x26')]]['acw']){this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e][_0xfdd3('0x4a')]=!![];this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e][_0xfdd3('0x4b')]=this['voiceQueues'][_0x35a290[_0xfdd3('0x26')]][_0xfdd3('0x4c')];}this[_0xfdd3('0xb')][_0x35a290['interface']]=_[_0xfdd3('0x28')](this['agents'][_0x35a290[_0xfdd3('0x4d')]],[_0xfdd3('0x26'),_0xfdd3('0x38')]);this[_0xfdd3('0x1f')](util['format']('user:%s',_0x35a290[_0xfdd3('0x2c')]),_0xfdd3('0x4e'),this[_0xfdd3('0x9')][_0x35a290[_0xfdd3('0x22')]][_0xf4e60e]);ami[_0xfdd3('0x1f')]('custom:agentcomplete',this['channels'][_0x35a290['uniqueid']][_0xf4e60e]);}}}}}}catch(_0x17aa4f){logger[_0xfdd3('0x40')](_0xfdd3('0x4f'),util[_0xfdd3('0x2e')](_0x17aa4f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x15')]=function(_0x4b73b4){try{if(this['isNotNull'](_0x4b73b4)){this[_0xfdd3('0x50')](_0x4b73b4[_0xfdd3('0x22')],_[_0xfdd3('0x51')](_0x4b73b4[_0xfdd3('0x52')])[0x0],_0x4b73b4[_0xfdd3('0x53')]);if(this['channels'][_0x4b73b4[_0xfdd3('0x22')]]){for(var _0x7f5865 in this[_0xfdd3('0x9')][_0x4b73b4[_0xfdd3('0x22')]]){if(this[_0xfdd3('0x9')][_0x4b73b4['uniqueid']][_0xfdd3('0x43')](_0x7f5865)){if(_[_0xfdd3('0x21')](this['channels'][_0x4b73b4[_0xfdd3('0x22')]][_0x7f5865][_0xfdd3('0xc')])){this['channels'][_0x4b73b4[_0xfdd3('0x22')]][_0x7f5865]['variables']={};}this['channels'][_0x4b73b4['uniqueid']][_0x7f5865]['variables']=this[_0xfdd3('0xc')][_0x4b73b4[_0xfdd3('0x22')]];}}}}}catch(_0x80f2ae){logger[_0xfdd3('0x40')](_0xfdd3('0x54'),util[_0xfdd3('0x2e')](_0x80f2ae,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x50')]=function(_0xe8509e,_0x4a4bf0,_0x5e84ec){var _0x8439e7=[_0xfdd3('0x55'),'rtpaudioqosbridged',_0xfdd3('0x56'),'rtpaudioqosjitterbridged',_0xfdd3('0x57'),_0xfdd3('0x58'),_0xfdd3('0x59'),_0xfdd3('0x5a'),_0xfdd3('0x5b'),'sipuri','bridgepeer',_0xfdd3('0x5c'),_0xfdd3('0x5d'),_0xfdd3('0x5e'),_0xfdd3('0x5f'),_0xfdd3('0x60'),_0xfdd3('0x2c'),_0xfdd3('0x61'),_0xfdd3('0x62')];if(!_[_0xfdd3('0x63')](_0x4a4bf0)&&!_['includes'](_0x8439e7,_0x4a4bf0)){if(_[_0xfdd3('0x21')](this[_0xfdd3('0xc')][_0xe8509e])){this[_0xfdd3('0xc')][_0xe8509e]={};}this[_0xfdd3('0xc')][_0xe8509e][_0x4a4bf0]=_0x5e84ec;}};VoiceAgentReport['prototype']['syncHangup']=function(_0x21ff8f){try{if(this[_0xfdd3('0x20')](_0x21ff8f)){if(this[_0xfdd3('0x9')][_0x21ff8f[_0xfdd3('0x22')]]){for(var _0xbf04b9 in this[_0xfdd3('0x9')][_0x21ff8f[_0xfdd3('0x22')]]){if(this[_0xfdd3('0x9')][_0x21ff8f['uniqueid']][_0xfdd3('0x43')](_0xbf04b9)){if(this['channels'][_0x21ff8f[_0xfdd3('0x22')]][_0xbf04b9][_0xfdd3('0x44')]=='transfer'&&this[_0xfdd3('0x9')][_0x21ff8f[_0xfdd3('0x22')]][_0xbf04b9]['agentcomplete']){this[_0xfdd3('0x9')][_0x21ff8f[_0xfdd3('0x22')]][_0xbf04b9][_0xfdd3('0x64')]=moment()['format'](_0xfdd3('0x24'));}}}ami[_0xfdd3('0x1f')](_0xfdd3('0x65'),_[_0xfdd3('0x66')](this[_0xfdd3('0x9')][_0x21ff8f['uniqueid']]));delete this[_0xfdd3('0x9')][_0x21ff8f['uniqueid']];}if(this[_0xfdd3('0xc')][_0x21ff8f[_0xfdd3('0x22')]]){delete this[_0xfdd3('0xc')][_0x21ff8f[_0xfdd3('0x22')]];}}}catch(_0x3b7639){logger[_0xfdd3('0x40')](_0xfdd3('0x67'),util[_0xfdd3('0x2e')](_0x3b7639,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')]['syncAttendedTransfer']=function(_0x29fa25){try{if(this[_0xfdd3('0x20')](_0x29fa25)){if(this['channels'][_0x29fa25[_0xfdd3('0x68')]]){for(var _0x558379 in this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x68')]]){if(this['channels'][_0x29fa25[_0xfdd3('0x68')]][_0xfdd3('0x43')](_0x558379)){if(_0x29fa25[_0xfdd3('0x69')]===_0x558379){var _0x304135=moment();this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x68')]][_0x558379][_0xfdd3('0x13')]=!![];this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x68')]][_0x558379][_0xfdd3('0x64')]=moment()[_0xfdd3('0x2b')](_0xfdd3('0x24'));this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x68')]][_0x558379][_0xfdd3('0x44')]=_0xfdd3('0x48');this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x68')]][_0x558379][_0xfdd3('0x30')]=_0xfdd3('0x6a');this[_0xfdd3('0x9')][_0x29fa25['transfereeuniqueid']][_0x558379]['talktime']=_0x304135[_0xfdd3('0x6b')](this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x68')]][_0x558379][_0xfdd3('0x2f')],_0xfdd3('0x6c'));}}}}if(this[_0xfdd3('0x9')][_0x29fa25['secondtransfereruniqueid']]){var _0x45affc=this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x6d')]];this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x6d')]]=this[_0xfdd3('0x9')][_0x29fa25[_0xfdd3('0x68')]];this['channels'][_0x29fa25[_0xfdd3('0x68')]]=_0x45affc;}}}catch(_0x505982){logger[_0xfdd3('0x40')](_0xfdd3('0x6e'),util[_0xfdd3('0x2e')](_0x505982,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x1d')]=function(_0x2cc195){try{if(this[_0xfdd3('0x20')](_0x2cc195)){if(this[_0xfdd3('0x9')][_0x2cc195['transfereeuniqueid']]){for(var _0x4389e4 in this[_0xfdd3('0x9')][_0x2cc195['transfereeuniqueid']]){if(this['channels'][_0x2cc195['transfereeuniqueid']][_0xfdd3('0x43')](_0x4389e4)){if(_0x2cc195[_0xfdd3('0x6f')]===_0x4389e4){var _0x319ebc=moment();this['channels'][_0x2cc195[_0xfdd3('0x68')]][_0x4389e4][_0xfdd3('0x13')]=!![];this[_0xfdd3('0x9')][_0x2cc195['transfereeuniqueid']][_0x4389e4][_0xfdd3('0x64')]=_0x319ebc;this[_0xfdd3('0x9')][_0x2cc195[_0xfdd3('0x68')]][_0x4389e4][_0xfdd3('0x44')]=_0xfdd3('0x48');this[_0xfdd3('0x9')][_0x2cc195[_0xfdd3('0x68')]][_0x4389e4][_0xfdd3('0x30')]=_0xfdd3('0x6a');this['channels'][_0x2cc195[_0xfdd3('0x68')]][_0x4389e4][_0xfdd3('0x47')]=_0x319ebc[_0xfdd3('0x6b')](this[_0xfdd3('0x9')][_0x2cc195[_0xfdd3('0x68')]][_0x4389e4][_0xfdd3('0x2f')],_0xfdd3('0x6c'));}}}}}}catch(_0x2a75b2){logger[_0xfdd3('0x40')](_0xfdd3('0x70'),util[_0xfdd3('0x2e')](_0x2a75b2,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')][_0xfdd3('0x71')]=function(_0xacfa6){var _0x5caa42='';try{if(this[_0xfdd3('0x20')](_0xacfa6)){if(_0xacfa6[_0xfdd3('0x72')]){_0x5caa42=_0xacfa6[_0xfdd3('0x72')][_0xfdd3('0x73')](0x0,_0xacfa6[_0xfdd3('0x72')][_0xfdd3('0x74')]('-'));if(this[_0xfdd3('0xb')][_0x5caa42]){this[_0xfdd3('0xb')][_0x5caa42]['onhold']=!![];}}}}catch(_0x5e45d3){logger[_0xfdd3('0x40')]('[syncMusicOnHoldStart][VoiceAgentReport]',util[_0xfdd3('0x2e')](_0x5e45d3,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xfdd3('0x1e')]['syncMusicOnHoldStop']=function(_0x59bc98){var _0x3cf01e='';try{if(this[_0xfdd3('0x20')](_0x59bc98)){if(_0x59bc98[_0xfdd3('0x72')]){_0x3cf01e=_0x59bc98[_0xfdd3('0x72')][_0xfdd3('0x73')](0x0,_0x59bc98['channel'][_0xfdd3('0x74')]('-'));if(this[_0xfdd3('0xb')][_0x3cf01e]){this['agents'][_0x3cf01e]['onhold']=![];}}}}catch(_0x12d6de){logger[_0xfdd3('0x40')](_0xfdd3('0x75'),util[_0xfdd3('0x2e')](_0x12d6de,{'showHidden':![],'depth':null}));}};module[_0xfdd3('0x76')]=VoiceAgentReport;
\ No newline at end of file
+var _0x9fcd=['localhost','socket.io-emitter','channels','voiceQueues','agents','agentcalled','bind','agentconnect','syncAgentConnect','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','varset','syncVarSet','hangup','syncHangup','musiconholdstart','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','emit','isUndefined','syncAgentCalled','uniqueid','destuniqueid','YYYY-MM-DD\x20HH:mm:ss','called','variables','queue','type','inbound','merge','event','privilege','custom:agentcalled','format','user:%s','membername','user:called','[syncAgentCalled][VoiceAgentReport]','inspect','agentconnectAt','lastevent','connect','holdtime','connectedlinenum','connectedlinename','destchannelstate','destchannelstatedesc','interface','destconnectedlinenum','custom:agentconnect','agentringnoanswer','agentringnoanswerAt','reason','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','custom:agentansweredelsewhere','error','isNotNull','rejected','custom:agentringnoanswer','[syncAgentRingNoAnswer][VoiceAgentReport]','hasOwnProperty','abandoned','[syncQueueCallerAbandon][VoiceAgentReport]','agentcompleteAt','complete','talktime','transfer','agent','acw','acwTimeout','omit','user:agentcomplete','custom:agentcomplete','[syncAgentComplete][VoiceAgentReport]','addVariable','keys','variable','value','[syncVarSet][VoiceAgentReport]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','sipcallid','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','memberlastcall','memberrealtime','isNil','includes','[syncHangup][VoiceAgentReport]','transfereeuniqueid','diff','seconds','secondtransfereruniqueid','transfereruniqueid','syncMusicOnHoldStart','channel','substring','onhold','[syncMusicOnHoldStart][VoiceAgentReport]','syncMusicOnHoldStop','lastIndexOf','[syncMusicOnHoldStop][VoiceAgentReport]','lodash','moment','util','../../../config/environment','../../../config/logger','ami','redis'];(function(_0x4970d6,_0x2e6b07){var _0x2857f3=function(_0x447128){while(--_0x447128){_0x4970d6['push'](_0x4970d6['shift']());}};_0x2857f3(++_0x2e6b07);}(_0x9fcd,0x170));var _0xd9fc=function(_0x22f36d,_0xb0e4a7){_0x22f36d=_0x22f36d-0x0;var _0x2878af=_0x9fcd[_0x22f36d];return _0x2878af;};'use strict';var _=require(_0xd9fc('0x0'));var moment=require(_0xd9fc('0x1'));var util=require(_0xd9fc('0x2'));var Redis=require('ioredis');var config=require(_0xd9fc('0x3'));var logger=require(_0xd9fc('0x4'))(_0xd9fc('0x5'));var ami=require('../ami');config[_0xd9fc('0x6')]=_['defaults'](config[_0xd9fc('0x6')],{'host':_0xd9fc('0x7'),'port':0x18eb});var io=require(_0xd9fc('0x8'))(new Redis(config[_0xd9fc('0x6')]));function VoiceAgentReport(_0x44a4fe){this[_0xd9fc('0x9')]={};this[_0xd9fc('0xa')]=_0x44a4fe['voiceQueues'];this[_0xd9fc('0xb')]=_0x44a4fe[_0xd9fc('0xb')];this['variables']={};ami['on'](_0xd9fc('0xc'),this['syncAgentCalled'][_0xd9fc('0xd')](this));ami['on'](_0xd9fc('0xe'),this[_0xd9fc('0xf')][_0xd9fc('0xd')](this));ami['on']('agentringnoanswer',this[_0xd9fc('0x10')]['bind'](this));ami['on'](_0xd9fc('0x11'),this[_0xd9fc('0x12')][_0xd9fc('0xd')](this));ami['on'](_0xd9fc('0x13'),this[_0xd9fc('0x14')][_0xd9fc('0xd')](this));ami['on'](_0xd9fc('0x15'),this[_0xd9fc('0x16')]['bind'](this));ami['on'](_0xd9fc('0x17'),this[_0xd9fc('0x18')][_0xd9fc('0xd')](this));ami['on'](_0xd9fc('0x19'),this['syncMusicOnHoldStart']['bind'](this));ami['on']('musiconholdstop',this['syncMusicOnHoldStop'][_0xd9fc('0xd')](this));ami['on'](_0xd9fc('0x1a'),this[_0xd9fc('0x1b')]['bind'](this));ami['on'](_0xd9fc('0x1c'),this[_0xd9fc('0x1d')][_0xd9fc('0xd')](this));}VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x1f')]=function(_0x1a4ab0,_0x58c66e,_0x3c1f1e){io['to'](_0x1a4ab0)[_0xd9fc('0x1f')](_0x58c66e,_0x3c1f1e);};VoiceAgentReport['prototype']['isNotNull']=function(_0x5af4aa){return _0x5af4aa!==null&&!_[_0xd9fc('0x20')](_0x5af4aa);};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x21')]=function(_0x432bde){try{if(this['isNotNull'](_0x432bde)){if(_[_0xd9fc('0x20')](this['channels'][_0x432bde[_0xd9fc('0x22')]])){this['channels'][_0x432bde[_0xd9fc('0x22')]]={};}if(_[_0xd9fc('0x20')](this[_0xd9fc('0x9')][_0x432bde[_0xd9fc('0x22')]][_0x432bde[_0xd9fc('0x23')]])){this['channels'][_0x432bde[_0xd9fc('0x22')]][_0x432bde[_0xd9fc('0x23')]]={'agentcalledAt':moment()['format'](_0xd9fc('0x24')),'lastevent':_0xd9fc('0x25'),'variables':this[_0xd9fc('0x26')][_0x432bde[_0xd9fc('0x22')]],'type':this[_0xd9fc('0xa')][_0x432bde[_0xd9fc('0x27')]]?this[_0xd9fc('0xa')][_0x432bde['queue']][_0xd9fc('0x28')]||_0xd9fc('0x29'):_0xd9fc('0x29')};}_[_0xd9fc('0x2a')](this[_0xd9fc('0x9')][_0x432bde[_0xd9fc('0x22')]][_0x432bde[_0xd9fc('0x23')]],_['omit'](_0x432bde,[_0xd9fc('0x2b'),_0xd9fc('0x2c')]));ami[_0xd9fc('0x1f')](_0xd9fc('0x2d'),this[_0xd9fc('0x9')][_0x432bde['uniqueid']][_0x432bde[_0xd9fc('0x23')]]);this['emit'](util[_0xd9fc('0x2e')](_0xd9fc('0x2f'),_0x432bde[_0xd9fc('0x30')]),_0xd9fc('0x31'),this['channels'][_0x432bde[_0xd9fc('0x22')]][_0x432bde[_0xd9fc('0x23')]]);}}catch(_0x185f47){logger['error'](_0xd9fc('0x32'),util[_0xd9fc('0x33')](_0x185f47,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')]['syncAgentConnect']=function(_0x866722){try{if(this['isNotNull'](_0x866722)){if(this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]]){for(var _0x287e7d in this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]]){if(this['channels'][_0x866722[_0xd9fc('0x22')]]['hasOwnProperty'](_0x287e7d)){if(_0x866722[_0xd9fc('0x23')]===_0x287e7d){this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x34')]=moment()[_0xd9fc('0x2e')](_0xd9fc('0x24'));this[_0xd9fc('0x9')][_0x866722['uniqueid']][_0x287e7d][_0xd9fc('0x35')]=_0xd9fc('0x36');this[_0xd9fc('0x9')][_0x866722['uniqueid']][_0x287e7d][_0xd9fc('0x37')]=_0x866722['holdtime'];this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x38')]=_0x866722['connectedlinenum'];this[_0xd9fc('0x9')][_0x866722['uniqueid']][_0x287e7d][_0xd9fc('0x39')]=_0x866722[_0xd9fc('0x39')];this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x3a')]=_0x866722['destchannelstate'];this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d]['destchannelstatedesc']=_0x866722[_0xd9fc('0x3b')];_['merge'](this[_0xd9fc('0xb')][_0x866722[_0xd9fc('0x3c')]],_['pick'](_0x866722,['queue',_0xd9fc('0x3d')]));this[_0xd9fc('0x1f')](util[_0xd9fc('0x2e')](_0xd9fc('0x2f'),_0x866722[_0xd9fc('0x30')]),'user:agentconnect',this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x866722[_0xd9fc('0x23')]]);ami[_0xd9fc('0x1f')](_0xd9fc('0x3e'),this[_0xd9fc('0x9')][_0x866722['uniqueid']][_0x287e7d]);}else if(!this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x3f')]&&!this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d]['agentcomplete']){this['channels'][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x3f')]=!![];this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x40')]=moment()[_0xd9fc('0x2e')](_0xd9fc('0x24'));this[_0xd9fc('0x9')][_0x866722['uniqueid']][_0x287e7d][_0xd9fc('0x41')]=_0xd9fc('0x42');this['channels'][_0x866722[_0xd9fc('0x22')]][_0x287e7d]['lastevent']=_0xd9fc('0x42');this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x43')]=_0x866722[_0xd9fc('0x23')];this[_0xd9fc('0x9')][_0x866722[_0xd9fc('0x22')]][_0x287e7d][_0xd9fc('0x44')]=_0x866722['membername'];ami[_0xd9fc('0x1f')](_0xd9fc('0x45'),this['channels'][_0x866722['uniqueid']][_0x287e7d]);}}}}}}catch(_0x4c799f){logger[_0xd9fc('0x46')]('[syncAgentConnect][VoiceAgentReport]',util[_0xd9fc('0x33')](_0x4c799f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x10')]=function(_0x590c25){try{if(this[_0xd9fc('0x47')](_0x590c25)){if(this[_0xd9fc('0x9')][_0x590c25[_0xd9fc('0x22')]]&&this[_0xd9fc('0x9')][_0x590c25['uniqueid']][_0x590c25['destuniqueid']]){this[_0xd9fc('0x9')][_0x590c25['uniqueid']][_0x590c25[_0xd9fc('0x23')]][_0xd9fc('0x3f')]=!![];this[_0xd9fc('0x9')][_0x590c25['uniqueid']][_0x590c25[_0xd9fc('0x23')]]['agentringnoanswerAt']=moment()[_0xd9fc('0x2e')](_0xd9fc('0x24'));this[_0xd9fc('0x9')][_0x590c25[_0xd9fc('0x22')]][_0x590c25[_0xd9fc('0x23')]][_0xd9fc('0x41')]='rejected';this['channels'][_0x590c25[_0xd9fc('0x22')]][_0x590c25[_0xd9fc('0x23')]][_0xd9fc('0x35')]=_0xd9fc('0x48');ami[_0xd9fc('0x1f')](_0xd9fc('0x49'),this[_0xd9fc('0x9')][_0x590c25[_0xd9fc('0x22')]][_0x590c25[_0xd9fc('0x23')]]);}}}catch(_0x5ad2bf){logger[_0xd9fc('0x46')](_0xd9fc('0x4a'),util[_0xd9fc('0x33')](_0x5ad2bf,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')]['syncQueueCallerAbandon']=function(_0x487633){try{if(this[_0xd9fc('0x47')](_0x487633)){if(this[_0xd9fc('0x9')][_0x487633['uniqueid']]){for(var _0x107646 in this[_0xd9fc('0x9')][_0x487633[_0xd9fc('0x22')]]){if(this[_0xd9fc('0x9')][_0x487633['uniqueid']][_0xd9fc('0x4b')](_0x107646)&&!this[_0xd9fc('0x9')][_0x487633['uniqueid']][_0x107646]['agentringnoanswer']&&!this[_0xd9fc('0x9')][_0x487633[_0xd9fc('0x22')]][_0x107646][_0xd9fc('0x13')]){this['channels'][_0x487633[_0xd9fc('0x22')]][_0x107646][_0xd9fc('0x3f')]=!![];this['channels'][_0x487633[_0xd9fc('0x22')]][_0x107646][_0xd9fc('0x40')]=moment()[_0xd9fc('0x2e')](_0xd9fc('0x24'));this[_0xd9fc('0x9')][_0x487633[_0xd9fc('0x22')]][_0x107646][_0xd9fc('0x41')]=_0xd9fc('0x4c');this[_0xd9fc('0x9')][_0x487633['uniqueid']][_0x107646][_0xd9fc('0x35')]=_0xd9fc('0x4c');ami[_0xd9fc('0x1f')]('custom:agentqueuecallerabandon',this['channels'][_0x487633[_0xd9fc('0x22')]][_0x107646]);}}}}}catch(_0x5a618b){logger[_0xd9fc('0x46')](_0xd9fc('0x4d'),util[_0xd9fc('0x33')](_0x5a618b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x14')]=function(_0x1785b4){try{if(this['isNotNull'](_0x1785b4)){if(this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]]){for(var _0x441b93 in this['channels'][_0x1785b4[_0xd9fc('0x22')]]){if(this[_0xd9fc('0x9')][_0x1785b4['uniqueid']]['hasOwnProperty'](_0x441b93)){if(this[_0xd9fc('0x9')][_0x1785b4['uniqueid']][_0x441b93]['agentconnectAt']&&!this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]][_0x441b93][_0xd9fc('0x13')]){this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]][_0x441b93][_0xd9fc('0x13')]=!![];this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]][_0x441b93][_0xd9fc('0x4e')]=moment()['format'](_0xd9fc('0x24'));this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]][_0x441b93][_0xd9fc('0x35')]=_0xd9fc('0x4f');this['channels'][_0x1785b4[_0xd9fc('0x22')]][_0x441b93][_0xd9fc('0x50')]=_0x1785b4[_0xd9fc('0x50')];this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]][_0x441b93][_0xd9fc('0x41')]=_0x1785b4[_0xd9fc('0x41')]==_0xd9fc('0x51')?_0xd9fc('0x52'):_0x1785b4[_0xd9fc('0x41')];if(this[_0xd9fc('0xa')][_0x1785b4['queue']]&&this[_0xd9fc('0xa')][_0x1785b4['queue']][_0xd9fc('0x53')]){this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]][_0x441b93]['agentacw']=!![];this['channels'][_0x1785b4['uniqueid']][_0x441b93]['acwtime']=this[_0xd9fc('0xa')][_0x1785b4['queue']][_0xd9fc('0x54')];}this['agents'][_0x1785b4[_0xd9fc('0x3c')]]=_[_0xd9fc('0x55')](this[_0xd9fc('0xb')][_0x1785b4[_0xd9fc('0x3c')]],[_0xd9fc('0x27'),_0xd9fc('0x3d')]);this[_0xd9fc('0x1f')](util[_0xd9fc('0x2e')](_0xd9fc('0x2f'),_0x1785b4[_0xd9fc('0x30')]),_0xd9fc('0x56'),this[_0xd9fc('0x9')][_0x1785b4[_0xd9fc('0x22')]][_0x441b93]);ami[_0xd9fc('0x1f')](_0xd9fc('0x57'),this[_0xd9fc('0x9')][_0x1785b4['uniqueid']][_0x441b93]);}}}}}}catch(_0x4e5c36){logger[_0xd9fc('0x46')](_0xd9fc('0x58'),util[_0xd9fc('0x33')](_0x4e5c36,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x16')]=function(_0x5ef8e8){try{if(this['isNotNull'](_0x5ef8e8)){this[_0xd9fc('0x59')](_0x5ef8e8[_0xd9fc('0x22')],_[_0xd9fc('0x5a')](_0x5ef8e8[_0xd9fc('0x5b')])[0x0],_0x5ef8e8[_0xd9fc('0x5c')]);if(this[_0xd9fc('0x9')][_0x5ef8e8[_0xd9fc('0x22')]]){for(var _0x495219 in this[_0xd9fc('0x9')][_0x5ef8e8[_0xd9fc('0x22')]]){if(this[_0xd9fc('0x9')][_0x5ef8e8[_0xd9fc('0x22')]][_0xd9fc('0x4b')](_0x495219)){if(_[_0xd9fc('0x20')](this[_0xd9fc('0x9')][_0x5ef8e8['uniqueid']][_0x495219][_0xd9fc('0x26')])){this[_0xd9fc('0x9')][_0x5ef8e8[_0xd9fc('0x22')]][_0x495219]['variables']={};}this['channels'][_0x5ef8e8['uniqueid']][_0x495219][_0xd9fc('0x26')]=this['variables'][_0x5ef8e8['uniqueid']];}}}}}catch(_0x3e5a08){logger[_0xd9fc('0x46')](_0xd9fc('0x5d'),util[_0xd9fc('0x33')](_0x3e5a08,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')]['addVariable']=function(_0xf13523,_0x2dac79,_0x2b8edc){var _0x5b5d2d=[_0xd9fc('0x5e'),_0xd9fc('0x5f'),_0xd9fc('0x60'),_0xd9fc('0x61'),_0xd9fc('0x62'),_0xd9fc('0x63'),_0xd9fc('0x64'),'rtpaudioqosrttbridged',_0xd9fc('0x65'),_0xd9fc('0x66'),_0xd9fc('0x67'),'bridgepvtcallid',_0xd9fc('0x68'),_0xd9fc('0x69'),_0xd9fc('0x6a'),_0xd9fc('0x6b'),_0xd9fc('0x30'),'memberpenalty',_0xd9fc('0x6c')];if(!_[_0xd9fc('0x6d')](_0x2dac79)&&!_[_0xd9fc('0x6e')](_0x5b5d2d,_0x2dac79)){if(_[_0xd9fc('0x20')](this[_0xd9fc('0x26')][_0xf13523])){this[_0xd9fc('0x26')][_0xf13523]={};}this['variables'][_0xf13523][_0x2dac79]=_0x2b8edc;}};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x18')]=function(_0xe326d1){try{if(this[_0xd9fc('0x47')](_0xe326d1)){if(this[_0xd9fc('0x9')][_0xe326d1[_0xd9fc('0x22')]]){for(var _0x3e2c97 in this[_0xd9fc('0x9')][_0xe326d1[_0xd9fc('0x22')]]){if(this[_0xd9fc('0x9')][_0xe326d1[_0xd9fc('0x22')]][_0xd9fc('0x4b')](_0x3e2c97)){if(this[_0xd9fc('0x9')][_0xe326d1[_0xd9fc('0x22')]][_0x3e2c97][_0xd9fc('0x41')]=='transfer'&&this[_0xd9fc('0x9')][_0xe326d1[_0xd9fc('0x22')]][_0x3e2c97]['agentcomplete']){this[_0xd9fc('0x9')][_0xe326d1[_0xd9fc('0x22')]][_0x3e2c97][_0xd9fc('0x4e')]=moment()[_0xd9fc('0x2e')](_0xd9fc('0x24'));}}}ami[_0xd9fc('0x1f')]('custom:voiceAgentReport',_['values'](this[_0xd9fc('0x9')][_0xe326d1[_0xd9fc('0x22')]]));delete this[_0xd9fc('0x9')][_0xe326d1['uniqueid']];}if(this[_0xd9fc('0x26')][_0xe326d1['uniqueid']]){delete this[_0xd9fc('0x26')][_0xe326d1[_0xd9fc('0x22')]];}}}catch(_0x3687be){logger[_0xd9fc('0x46')](_0xd9fc('0x6f'),util['inspect'](_0x3687be,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xd9fc('0x1b')]=function(_0x2c19fd){try{if(this['isNotNull'](_0x2c19fd)){if(this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x70')]]){for(var _0x55352d in this['channels'][_0x2c19fd[_0xd9fc('0x70')]]){if(this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x70')]][_0xd9fc('0x4b')](_0x55352d)){if(_0x2c19fd['origtransfereruniqueid']===_0x55352d){var _0x9b491d=moment();this[_0xd9fc('0x9')][_0x2c19fd['transfereeuniqueid']][_0x55352d][_0xd9fc('0x13')]=!![];this['channels'][_0x2c19fd[_0xd9fc('0x70')]][_0x55352d][_0xd9fc('0x4e')]=moment()['format'](_0xd9fc('0x24'));this['channels'][_0x2c19fd[_0xd9fc('0x70')]][_0x55352d]['reason']=_0xd9fc('0x51');this['channels'][_0x2c19fd['transfereeuniqueid']][_0x55352d][_0xd9fc('0x35')]=_0xd9fc('0x4f');this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x70')]][_0x55352d][_0xd9fc('0x50')]=_0x9b491d[_0xd9fc('0x71')](this[_0xd9fc('0x9')][_0x2c19fd['transfereeuniqueid']][_0x55352d][_0xd9fc('0x34')],_0xd9fc('0x72'));}}}}if(this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x73')]]){var _0x324c18=this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x73')]];this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x73')]]=this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x70')]];this[_0xd9fc('0x9')][_0x2c19fd[_0xd9fc('0x70')]]=_0x324c18;}}}catch(_0x45eb47){logger[_0xd9fc('0x46')]('[syncAttendedTransfer][VoiceAgentReport]',util[_0xd9fc('0x33')](_0x45eb47,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x1d')]=function(_0x1c1b4b){try{if(this[_0xd9fc('0x47')](_0x1c1b4b)){if(this[_0xd9fc('0x9')][_0x1c1b4b['transfereeuniqueid']]){for(var _0x17c867 in this[_0xd9fc('0x9')][_0x1c1b4b[_0xd9fc('0x70')]]){if(this[_0xd9fc('0x9')][_0x1c1b4b[_0xd9fc('0x70')]][_0xd9fc('0x4b')](_0x17c867)){if(_0x1c1b4b[_0xd9fc('0x74')]===_0x17c867){var _0x1c5d78=moment();this[_0xd9fc('0x9')][_0x1c1b4b[_0xd9fc('0x70')]][_0x17c867][_0xd9fc('0x13')]=!![];this[_0xd9fc('0x9')][_0x1c1b4b[_0xd9fc('0x70')]][_0x17c867][_0xd9fc('0x4e')]=_0x1c5d78;this[_0xd9fc('0x9')][_0x1c1b4b['transfereeuniqueid']][_0x17c867][_0xd9fc('0x41')]=_0xd9fc('0x51');this[_0xd9fc('0x9')][_0x1c1b4b['transfereeuniqueid']][_0x17c867][_0xd9fc('0x35')]=_0xd9fc('0x4f');this[_0xd9fc('0x9')][_0x1c1b4b[_0xd9fc('0x70')]][_0x17c867][_0xd9fc('0x50')]=_0x1c5d78[_0xd9fc('0x71')](this['channels'][_0x1c1b4b[_0xd9fc('0x70')]][_0x17c867][_0xd9fc('0x34')],_0xd9fc('0x72'));}}}}}}catch(_0x42876a){logger[_0xd9fc('0x46')]('[syncBlindTransfer][VoiceAgentReport]',util[_0xd9fc('0x33')](_0x42876a,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x75')]=function(_0x11df3b){var _0x388265='';try{if(this[_0xd9fc('0x47')](_0x11df3b)){if(_0x11df3b[_0xd9fc('0x76')]){_0x388265=_0x11df3b[_0xd9fc('0x76')][_0xd9fc('0x77')](0x0,_0x11df3b[_0xd9fc('0x76')]['lastIndexOf']('-'));if(this[_0xd9fc('0xb')][_0x388265]){this[_0xd9fc('0xb')][_0x388265][_0xd9fc('0x78')]=!![];}}}}catch(_0x274ae8){logger[_0xd9fc('0x46')](_0xd9fc('0x79'),util[_0xd9fc('0x33')](_0x274ae8,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xd9fc('0x1e')][_0xd9fc('0x7a')]=function(_0x4f40f8){var _0x3fa0d1='';try{if(this[_0xd9fc('0x47')](_0x4f40f8)){if(_0x4f40f8[_0xd9fc('0x76')]){_0x3fa0d1=_0x4f40f8[_0xd9fc('0x76')][_0xd9fc('0x77')](0x0,_0x4f40f8[_0xd9fc('0x76')][_0xd9fc('0x7b')]('-'));if(this[_0xd9fc('0xb')][_0x3fa0d1]){this[_0xd9fc('0xb')][_0x3fa0d1][_0xd9fc('0x78')]=![];}}}}catch(_0x4495db){logger[_0xd9fc('0x46')](_0xd9fc('0x7c'),util['inspect'](_0x4495db,{'showHidden':![],'depth':null}));}};module['exports']=VoiceAgentReport;
\ No newline at end of file
diff --git a/server/services/ami/report/voiceCallReport.js b/server/services/ami/report/voiceCallReport.js
index 1a6dfda..615a046 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 _0xacd1=['BUSY','redis','defaults','localhost','socket.io-emitter','channels','agents','coreshowchannel','syncNewExten','bind','newexten','newchannel','newstate','syncNewState','syncVarSet','hangup','syncHangup','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','then','actionCoreShowChannels','catch','log','prototype','emit','isNotNull','uniqueid','linkedid','isUndefined','merge','pick','keys','OutgoingSpoolFailed','starttime','format','disposition','toNumber','channelstate','from-sip','channel','split','exten','user:%s','name','user:agentconnect','accountcode','error','inspect','application','toLowerCase','applicationdata','appdata','duration','subtract','seconds','YYYY-MM-DD\x20HH:mm:ss','lastapplication','cdr(','answered','answertime','diff','calleridnum','xcally-motion-preview','connectedlinenum','connectedlinename','calleridname','destinationchannel','UserId','membername','[syncNewState][VoiceCallReport]','syncMixMonitorFilename','monitor','.wav49','.WAV','monitors','isNil','push','rec','variable','mixmonitor_filename','xmd-phone','xmd-callerid','type','value','xmd-queue','xmd-originatecalleridnum','xmd-destination','destination','calleridpreview','xmcs-queue','sipcallid','sipcalluniqueid','parse','sipcalllinkedid','endtime','billableseconds','context','omit','destconnectedlinenum','transfereeuniqueid','transfercalleridnum','origtransferercalleridnum','transferconnectedlinenum','transfertargetcalleridnum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','transfereecalleridnum','extension','BlindTransfer','[syncBlindTransfer][VoiceCallReport]','[syncMusicOnHoldStart][VoiceCallReport]','mohstarttime','mohtime','milliseconds','exports','bluebird','lodash','util','path','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/channel','unknown','not_inuse','busy','invalid','unavailable','ringing','ringinuse','onhold','set','queue','agi','dial','FAILED','NO\x20ANSWER','ANSWERED'];(function(_0x586f2b,_0x1388b){var _0x28e219=function(_0x4a4c38){while(--_0x4a4c38){_0x586f2b['push'](_0x586f2b['shift']());}};_0x28e219(++_0x1388b);}(_0xacd1,0x1a0));var _0x1acd=function(_0x17cd31,_0x424088){_0x17cd31=_0x17cd31-0x0;var _0x3eac1e=_0xacd1[_0x17cd31];return _0x3eac1e;};'use strict';var BPromise=require(_0x1acd('0x0'));var _=require(_0x1acd('0x1'));var moment=require('moment');var util=require(_0x1acd('0x2'));var path=require(_0x1acd('0x3'));var Redis=require(_0x1acd('0x4'));var config=require(_0x1acd('0x5'));var logger=require(_0x1acd('0x6'))(_0x1acd('0x7'));var ami=require(_0x1acd('0x8'));var Channel=require(_0x1acd('0x9'));var statusDesc=[_0x1acd('0xa'),_0x1acd('0xb'),'inuse',_0x1acd('0xc'),_0x1acd('0xd'),_0x1acd('0xe'),_0x1acd('0xf'),_0x1acd('0x10'),_0x1acd('0x11')];var applications=[_0x1acd('0x12'),_0x1acd('0x13'),_0x1acd('0x14'),_0x1acd('0x15'),'playback','voicemail'];var dispositions=['NO\x20ANSWER',_0x1acd('0x16'),_0x1acd('0x16'),'NO\x20ANSWER','NO\x20ANSWER',_0x1acd('0x17'),_0x1acd('0x18'),_0x1acd('0x19'),_0x1acd('0x16'),_0x1acd('0x16'),_0x1acd('0x16')];var actions={};config[_0x1acd('0x1a')]=_[_0x1acd('0x1b')](config[_0x1acd('0x1a')],{'host':_0x1acd('0x1c'),'port':0x18eb});var io=require(_0x1acd('0x1d'))(new Redis(config['redis']));function VoiceCallReport(_0x4fb27c){this[_0x1acd('0x1e')]=_0x4fb27c[_0x1acd('0x1e')];this[_0x1acd('0x1f')]=_0x4fb27c['agents'];ami['on'](_0x1acd('0x20'),this[_0x1acd('0x21')][_0x1acd('0x22')](this));ami['on'](_0x1acd('0x23'),this[_0x1acd('0x21')][_0x1acd('0x22')](this));ami['on'](_0x1acd('0x24'),this['syncNewChannel']['bind'](this));ami['on'](_0x1acd('0x25'),this[_0x1acd('0x26')][_0x1acd('0x22')](this));ami['on']('varset',this[_0x1acd('0x27')][_0x1acd('0x22')](this));ami['on'](_0x1acd('0x28'),this[_0x1acd('0x29')][_0x1acd('0x22')](this));ami['on']('newcallerid',this['syncNewCallerId'][_0x1acd('0x22')](this));ami['on'](_0x1acd('0x2a'),this[_0x1acd('0x2b')][_0x1acd('0x22')](this));ami['on'](_0x1acd('0x2c'),this[_0x1acd('0x2d')][_0x1acd('0x22')](this));ami['on'](_0x1acd('0x2e'),this[_0x1acd('0x2f')][_0x1acd('0x22')](this));ami['on'](_0x1acd('0x30'),this[_0x1acd('0x31')][_0x1acd('0x22')](this));return BPromise['resolve']()[_0x1acd('0x32')](ami[_0x1acd('0x33')]())[_0x1acd('0x34')](function(_0x560f3e){console[_0x1acd('0x35')](_0x560f3e);});}VoiceCallReport[_0x1acd('0x36')]['isNotNull']=function(_0x561717){return _0x561717!==null&&!_['isUndefined'](_0x561717);};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x37')]=function(_0x5066bb,_0x351d3e,_0x4f5de9){io['to'](_0x5066bb)['emit'](_0x351d3e,_0x4f5de9);};VoiceCallReport[_0x1acd('0x36')]['syncNewCallerId']=function(_0x2484a5){try{if(this[_0x1acd('0x38')](_0x2484a5)){if(_0x2484a5[_0x1acd('0x39')]===_0x2484a5[_0x1acd('0x3a')]){if(!_[_0x1acd('0x3b')](this[_0x1acd('0x1e')][_0x2484a5[_0x1acd('0x39')]])){_[_0x1acd('0x3c')](this[_0x1acd('0x1e')][_0x2484a5['uniqueid']],_[_0x1acd('0x3d')](_0x2484a5,_[_0x1acd('0x3e')](this['channels'][_0x2484a5[_0x1acd('0x39')]])));}}}}catch(_0x1c832a){logger['error']('[syncNewCallerId][VoiceCallReport]',util['inspect'](_0x1c832a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')]['syncNewChannel']=function(_0x431192){try{if(this[_0x1acd('0x38')](_0x431192)){if(_0x431192['uniqueid']===_0x431192[_0x1acd('0x3a')]&&_0x431192['channel']!=_0x1acd('0x3f')){if(_['isUndefined'](this[_0x1acd('0x1e')][_0x431192[_0x1acd('0x39')]])){this['channels'][_0x431192['uniqueid']]=new Channel();this[_0x1acd('0x1e')][_0x431192[_0x1acd('0x39')]][_0x1acd('0x40')]=moment()[_0x1acd('0x41')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x1acd('0x1e')][_0x431192[_0x1acd('0x39')]][_0x1acd('0x42')]=dispositions[_[_0x1acd('0x43')](_0x431192[_0x1acd('0x44')])];_[_0x1acd('0x3c')](this[_0x1acd('0x1e')][_0x431192['uniqueid']],_[_0x1acd('0x3d')](_0x431192,_[_0x1acd('0x3e')](this['channels'][_0x431192[_0x1acd('0x39')]])));if(_0x431192['context']===_0x1acd('0x45')){if(this[_0x1acd('0x1f')][_0x431192[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]]){this[_0x1acd('0x1f')][_0x431192[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]]['destconnectedlinenum']=_0x431192[_0x1acd('0x48')];this['emit'](util[_0x1acd('0x41')](_0x1acd('0x49'),this[_0x1acd('0x1f')][_0x431192[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]][_0x1acd('0x4a')]),_0x1acd('0x4b'),{'destaccountcode':this[_0x1acd('0x1f')][_0x431192[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]][_0x1acd('0x4c')],'destconnectedlinenum':_0x431192['exten']});}}}}}}catch(_0x4e9d2a){logger[_0x1acd('0x4d')]('[syncNewChannel][VoiceCallReport]',util[_0x1acd('0x4e')](_0x4e9d2a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x21')]=function(_0x2c6f15){try{if(this[_0x1acd('0x38')](_0x2c6f15)){if(_0x2c6f15['uniqueid']===_0x2c6f15[_0x1acd('0x3a')]&&_0x2c6f15[_0x1acd('0x48')]!='h'&&_0x2c6f15[_0x1acd('0x46')]!=_0x1acd('0x3f')){_0x2c6f15[_0x1acd('0x4f')]=_0x2c6f15[_0x1acd('0x4f')][_0x1acd('0x50')]();_0x2c6f15[_0x1acd('0x51')]=(_0x2c6f15[_0x1acd('0x52')]||_0x2c6f15['applicationdata'])['toLowerCase']();if(_[_0x1acd('0x3b')](this['channels'][_0x2c6f15[_0x1acd('0x39')]])){this['channels'][_0x2c6f15[_0x1acd('0x39')]]=new Channel();this[_0x1acd('0x1e')][_0x2c6f15[_0x1acd('0x39')]][_0x1acd('0x40')]=_0x2c6f15[_0x1acd('0x53')]?moment()[_0x1acd('0x54')](moment[_0x1acd('0x53')](_0x2c6f15['duration'])[_0x1acd('0x55')](),_0x1acd('0x55'))['format'](_0x1acd('0x56')):moment()[_0x1acd('0x41')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x2c6f15[_0x1acd('0x39')]][_0x1acd('0x42')]=_0x1acd('0x17');}_[_0x1acd('0x3c')](this['channels'][_0x2c6f15[_0x1acd('0x39')]],_[_0x1acd('0x3d')](_0x2c6f15,_[_0x1acd('0x3e')](this[_0x1acd('0x1e')][_0x2c6f15['uniqueid']])));if(_['includes'](applications,_0x2c6f15[_0x1acd('0x4f')])){this['channels'][_0x2c6f15['uniqueid']][_0x1acd('0x57')]=_0x2c6f15[_0x1acd('0x4f')];this[_0x1acd('0x1e')][_0x2c6f15[_0x1acd('0x39')]]['lastdata']=_0x2c6f15['applicationdata'];if(_0x2c6f15[_0x1acd('0x4f')]===_0x1acd('0x12')&&_['startsWith'](_0x2c6f15[_0x1acd('0x51')],_0x1acd('0x58'))){var _0x430efb=_0x2c6f15[_0x1acd('0x51')][_0x1acd('0x47')]('=');var _0x5d8aa5=_0x430efb[0x0]['match'](/cdr\((.*)\)/);if(_0x5d8aa5){this[_0x1acd('0x1e')][_0x2c6f15[_0x1acd('0x39')]][_0x5d8aa5[0x1]]=_0x430efb[0x1];}}else if(_0x2c6f15[_0x1acd('0x4f')]==='queue'){this[_0x1acd('0x1e')][_0x2c6f15[_0x1acd('0x39')]][_0x1acd('0x13')]=_0x2c6f15[_0x1acd('0x51')][_0x1acd('0x47')](',')[0x0];}}}}}catch(_0x17df87){logger[_0x1acd('0x4d')]('[syncNewExten][VoiceCallReport]',util[_0x1acd('0x4e')](_0x17df87,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x26')]=function(_0x2e9d7a){try{if(this[_0x1acd('0x38')](_0x2e9d7a)){if(_0x2e9d7a[_0x1acd('0x39')]!==_0x2e9d7a[_0x1acd('0x3a')]){if(this[_0x1acd('0x1e')][_0x2e9d7a['linkedid']]){if(_0x2e9d7a[_0x1acd('0x44')]==='6'){if(!this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x59')]){var _0x3d1b86=moment();this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x59')]=!![];this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x5a')]=_0x3d1b86[_0x1acd('0x41')](_0x1acd('0x56'));if(this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]]['starttime']){this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]]['holdtime']=_0x3d1b86[_0x1acd('0x5b')](this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x40')],_0x1acd('0x55'));}}this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x3a')]=_0x2e9d7a[_0x1acd('0x39')];if(_0x2e9d7a[_0x1acd('0x5c')]!==_0x1acd('0x5d')){this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x5e')]=_0x2e9d7a['calleridnum'];}this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x5f')]=_0x2e9d7a[_0x1acd('0x60')];this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x61')]=_0x2e9d7a[_0x1acd('0x46')];this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x42')]=dispositions[_[_0x1acd('0x43')](_0x2e9d7a[_0x1acd('0x44')])];if(this[_0x1acd('0x1f')][_0x2e9d7a['channel'][_0x1acd('0x47')]('-')[0x0]]){this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x3a')]][_0x1acd('0x62')]=this['agents'][_0x2e9d7a[_0x1acd('0x46')]['split']('-')[0x0]]['id'];this[_0x1acd('0x1e')][_0x2e9d7a['linkedid']]['membername']=this[_0x1acd('0x1f')][_0x2e9d7a[_0x1acd('0x46')]['split']('-')[0x0]][_0x1acd('0x4a')];}}}}else{if(this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x39')]]){if(_0x2e9d7a['channelstate']==='6'){if(this[_0x1acd('0x1f')][_0x2e9d7a[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]]){this[_0x1acd('0x1e')][_0x2e9d7a[_0x1acd('0x39')]][_0x1acd('0x62')]=this['agents'][_0x2e9d7a[_0x1acd('0x46')]['split']('-')[0x0]]['id'];this['channels'][_0x2e9d7a['uniqueid']][_0x1acd('0x63')]=this[_0x1acd('0x1f')][_0x2e9d7a[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]][_0x1acd('0x4a')];}}}}}}catch(_0x8a69b2){logger['error'](_0x1acd('0x64'),util[_0x1acd('0x4e')](_0x8a69b2,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x65')]=function(_0x42b257,_0x38862f){if(this['channels'][_0x42b257]){this[_0x1acd('0x1e')][_0x42b257][_0x1acd('0x66')]=!![];if(_['endsWith'](_0x38862f,_0x1acd('0x67'))){_0x38862f=_0x38862f['replace'](_0x1acd('0x67'),_0x1acd('0x68'));}this[_0x1acd('0x1e')][_0x42b257]['monitorFilename']=_0x38862f;var _0x4c30c6=_['find'](this['channels'][_0x42b257][_0x1acd('0x69')],{'filename':_0x38862f});if(_[_0x1acd('0x6a')](_0x4c30c6)){this['channels'][_0x42b257]['monitors'][_0x1acd('0x6b')]({'filename':_0x38862f,'createdAt':moment()[_0x1acd('0x41')](_0x1acd('0x56')),'mixmonitorid':'','status':_0x1acd('0x6c')});}}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x27')]=function(_0x3c7184){try{if(this[_0x1acd('0x38')](_0x3c7184)){if(this['channels'][_0x3c7184[_0x1acd('0x39')]]&&_0x3c7184[_0x1acd('0x46')]!='OutgoingSpoolFailed'){if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')])){if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')][_0x1acd('0x6e')])){this[_0x1acd('0x65')](_0x3c7184[_0x1acd('0x39')],_0x3c7184['value']);}else if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')][_0x1acd('0x6f')])){this[_0x1acd('0x1e')][_0x3c7184[_0x1acd('0x39')]][_0x1acd('0x5c')]=_0x3c7184['value'];}else if(this['isNotNull'](_0x3c7184['variable'][_0x1acd('0x70')])){this[_0x1acd('0x1e')][_0x3c7184[_0x1acd('0x39')]]['callerid']=_0x3c7184['value'];}else if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')]['xmd-cdrtype'])){this[_0x1acd('0x1e')][_0x3c7184[_0x1acd('0x39')]][_0x1acd('0x71')]=_0x3c7184[_0x1acd('0x72')];}else if(this['isNotNull'](_0x3c7184['variable'][_0x1acd('0x73')])){this['channels'][_0x3c7184['uniqueid']][_0x1acd('0x13')]=_0x3c7184[_0x1acd('0x72')][_0x1acd('0x47')](',')[0x0];}else if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')][_0x1acd('0x74')])){this[_0x1acd('0x1e')][_0x3c7184[_0x1acd('0x39')]]['originatecalleridnum']=_0x3c7184[_0x1acd('0x72')];}else if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')][_0x1acd('0x75')])){this[_0x1acd('0x1e')][_0x3c7184['uniqueid']][_0x1acd('0x76')]=_0x3c7184[_0x1acd('0x72')];}else if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')]['xmd-callerid-preview'])){this['channels'][_0x3c7184[_0x1acd('0x39')]][_0x1acd('0x77')]=_0x3c7184[_0x1acd('0x72')];}else if(this[_0x1acd('0x38')](_0x3c7184['variable'][_0x1acd('0x78')])){this[_0x1acd('0x1e')][_0x3c7184[_0x1acd('0x39')]]['queue']=_0x3c7184['value'];}else if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')][_0x1acd('0x79')])){this[_0x1acd('0x1e')][_0x3c7184[_0x1acd('0x39')]][_0x1acd('0x7a')]=_0x3c7184[_0x1acd('0x72')];}}}else if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')][_0x1acd('0x6e')])){if(_0x3c7184[_0x1acd('0x72')]){var _0x4a6fa4=path[_0x1acd('0x7b')](_0x3c7184['value'])[_0x1acd('0x4a')];this[_0x1acd('0x65')](_0x4a6fa4,_0x3c7184[_0x1acd('0x72')]);}}else if(this[_0x1acd('0x1e')][_0x3c7184['linkedid']]){if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')])){if(this[_0x1acd('0x38')](_0x3c7184[_0x1acd('0x6d')][_0x1acd('0x79')])){this[_0x1acd('0x1e')][_0x3c7184[_0x1acd('0x3a')]][_0x1acd('0x7c')]=_0x3c7184[_0x1acd('0x72')];}}}}}catch(_0x1c8322){logger['error']('[syncVarSet][VoiceCallReport]',util[_0x1acd('0x4e')](_0x1c8322,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x29')]=function(_0x4bb9d9){try{if(this[_0x1acd('0x38')](_0x4bb9d9)){if(this[_0x1acd('0x1e')][_0x4bb9d9['uniqueid']]){var _0x2a01d4=moment();this[_0x1acd('0x1e')][_0x4bb9d9[_0x1acd('0x39')]][_0x1acd('0x7d')]=_0x2a01d4[_0x1acd('0x41')](_0x1acd('0x56'));this[_0x1acd('0x1e')][_0x4bb9d9['uniqueid']][_0x1acd('0x53')]=_0x2a01d4['diff'](this[_0x1acd('0x1e')][_0x4bb9d9[_0x1acd('0x39')]][_0x1acd('0x40')],'seconds');if(this[_0x1acd('0x1e')][_0x4bb9d9[_0x1acd('0x39')]][_0x1acd('0x59')]){this['channels'][_0x4bb9d9[_0x1acd('0x39')]][_0x1acd('0x7e')]=_0x2a01d4[_0x1acd('0x5b')](this['channels'][_0x4bb9d9['uniqueid']][_0x1acd('0x5a')],_0x1acd('0x55'));this[_0x1acd('0x1e')][_0x4bb9d9[_0x1acd('0x39')]]['holdtime']=this[_0x1acd('0x1e')][_0x4bb9d9[_0x1acd('0x39')]][_0x1acd('0x53')]-this[_0x1acd('0x1e')][_0x4bb9d9[_0x1acd('0x39')]][_0x1acd('0x7e')];}if(_0x4bb9d9[_0x1acd('0x7f')]==='from-sip'){if(this[_0x1acd('0x1f')][_0x4bb9d9[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]]){this[_0x1acd('0x1f')][_0x4bb9d9['channel'][_0x1acd('0x47')]('-')[0x0]]=_[_0x1acd('0x80')](this[_0x1acd('0x1f')][_0x4bb9d9[_0x1acd('0x46')]['split']('-')[0x0]],[_0x1acd('0x81')]);this[_0x1acd('0x37')](util[_0x1acd('0x41')](_0x1acd('0x49'),this[_0x1acd('0x1f')][_0x4bb9d9[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]][_0x1acd('0x4a')]),'user:agentcomplete',{'destaccountcode':this[_0x1acd('0x1f')][_0x4bb9d9[_0x1acd('0x46')][_0x1acd('0x47')]('-')[0x0]][_0x1acd('0x4c')]});}}ami['emit']('custom:voiceCallReport',this['channels'][_0x4bb9d9[_0x1acd('0x39')]]);delete this[_0x1acd('0x1e')][_0x4bb9d9['uniqueid']];}}}catch(_0x2056fb){logger[_0x1acd('0x4d')]('[syncHangup][VoiceCallReport]',util[_0x1acd('0x4e')](_0x2056fb,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')]['syncAttendedTransfer']=function(_0x50285c){try{if(this[_0x1acd('0x38')](_0x50285c)){if(this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x82')]]){this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x82')]][_0x1acd('0x83')]=_0x50285c[_0x1acd('0x84')];this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x82')]][_0x1acd('0x85')]=_0x50285c[_0x1acd('0x86')];if(this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x87')]]){var _0x5ea86f=this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x87')]];this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x87')]]=this[_0x1acd('0x1e')][_0x50285c['transfereeuniqueid']];this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x82')]]=_0x5ea86f;}}else if(this[_0x1acd('0x1e')][_0x50285c['transfertargetuniqueid']]){this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x88')]][_0x1acd('0x83')]=_0x50285c['origtransferercalleridnum'];this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x88')]][_0x1acd('0x85')]=_0x50285c[_0x1acd('0x86')];if(this['channels'][_0x50285c[_0x1acd('0x89')]]){var _0x5ea86f=this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x89')]];this[_0x1acd('0x1e')][_0x50285c['origtransfereruniqueid']]=this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x88')]];this[_0x1acd('0x1e')][_0x50285c[_0x1acd('0x88')]]=_0x5ea86f;}}}}catch(_0x39af1b){logger[_0x1acd('0x4d')]('[syncAttendedTransfer][VoiceCallReport]',util['inspect'](_0x39af1b,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x2d')]=function(_0x508622){try{if(this[_0x1acd('0x38')](_0x508622)){if(this['channels'][_0x508622['transfereeuniqueid']]){this[_0x1acd('0x1e')][_0x508622[_0x1acd('0x82')]][_0x1acd('0x83')]=_0x508622[_0x1acd('0x8a')];this['channels'][_0x508622['transfereeuniqueid']][_0x1acd('0x85')]=_0x508622[_0x1acd('0x8b')];this['syncHangup']({'event':_0x1acd('0x8c'),'uniqueid':_0x508622[_0x1acd('0x82')],'context':_0x508622['context'],'channel':_0x508622['transfererchannel']});}}}catch(_0xfcbdc0){logger['error'](_0x1acd('0x8d'),util[_0x1acd('0x4e')](_0xfcbdc0,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x2f')]=function(_0x211e76){try{if(this[_0x1acd('0x38')](_0x211e76)){if(this['channels'][_0x211e76[_0x1acd('0x39')]]){if(!_[_0x1acd('0x6a')](this[_0x1acd('0x1e')][_0x211e76['uniqueid']][_0x1acd('0x5a')])){this[_0x1acd('0x1e')][_0x211e76['uniqueid']]['mohstarttime']=moment()[_0x1acd('0x41')](_0x1acd('0x56'));}}}}catch(_0x1885c6){logger[_0x1acd('0x4d')](_0x1acd('0x8e'),util[_0x1acd('0x4e')](_0x1885c6,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x1acd('0x36')][_0x1acd('0x31')]=function(_0x4bec17){try{if(this[_0x1acd('0x38')](_0x4bec17)){if(this[_0x1acd('0x1e')][_0x4bec17['uniqueid']]){if(!_[_0x1acd('0x6a')](this[_0x1acd('0x1e')][_0x4bec17[_0x1acd('0x39')]][_0x1acd('0x8f')])){this[_0x1acd('0x1e')][_0x4bec17[_0x1acd('0x39')]][_0x1acd('0x90')]+=moment()[_0x1acd('0x91')](0x0)[_0x1acd('0x5b')](this[_0x1acd('0x1e')][_0x4bec17[_0x1acd('0x39')]][_0x1acd('0x8f')],_0x1acd('0x55'));delete this[_0x1acd('0x1e')][_0x4bec17[_0x1acd('0x39')]][_0x1acd('0x8f')];}}}}catch(_0x59f6ed){logger[_0x1acd('0x4d')]('[syncMusicOnHoldStop][VoiceCallReport]',util[_0x1acd('0x4e')](_0x59f6ed,{'showHidden':![],'depth':null}));}};module[_0x1acd('0x92')]=VoiceCallReport;
\ No newline at end of file
+var _0x6317=['syncNewChannel','newstate','varset','syncVarSet','syncHangup','newcallerid','syncNewCallerId','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','resolve','then','actionCoreShowChannels','log','prototype','isUndefined','emit','isNotNull','linkedid','channels','uniqueid','merge','pick','keys','error','inspect','channel','OutgoingSpoolFailed','format','YYYY-MM-DD\x20HH:mm:ss','disposition','toNumber','channelstate','context','from-sip','split','destconnectedlinenum','exten','name','user:agentconnect','accountcode','[syncNewChannel][VoiceCallReport]','toLowerCase','applicationdata','appdata','starttime','subtract','duration','seconds','includes','application','lastapplication','lastdata','cdr(','match','[syncNewExten][VoiceCallReport]','answered','answertime','holdtime','diff','calleridnum','xcally-motion-preview','calleridname','destinationchannel','membername','UserId','[syncNewState][VoiceCallReport]','syncMixMonitorFilename','.wav49','replace','find','monitors','isNil','push','rec','variable','mixmonitor_filename','xmd-phone','value','xmd-callerid','callerid','xmd-cdrtype','xmd-queue','originatecalleridnum','xmd-destination','destination','xmd-callerid-preview','calleridpreview','xmcs-queue','sipcallid','sipcalluniqueid','sipcalllinkedid','[syncVarSet][VoiceCallReport]','billableseconds','omit','user:%s','user:agentcomplete','[syncHangup][VoiceCallReport]','transfereeuniqueid','origtransferercalleridnum','transferconnectedlinenum','transfertargetcalleridnum','secondtransfereruniqueid','transfertargetuniqueid','transfercalleridnum','origtransfereruniqueid','[syncAttendedTransfer][VoiceCallReport]','transfereecalleridnum','extension','BlindTransfer','transfererchannel','[syncBlindTransfer][VoiceCallReport]','mohstarttime','mohtime','milliseconds','[syncMusicOnHoldStop][VoiceCallReport]','exports','bluebird','lodash','moment','util','path','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/channel','unknown','inuse','busy','invalid','unavailable','ringing','ringinuse','onhold','set','queue','agi','dial','playback','voicemail','FAILED','NO\x20ANSWER','ANSWERED','BUSY','redis','defaults','localhost','socket.io-emitter','agents','coreshowchannel','syncNewExten','newexten','bind'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6317,0x11a));var _0x7631=function(_0x2a4d97,_0x343dd5){_0x2a4d97=_0x2a4d97-0x0;var _0x4945be=_0x6317[_0x2a4d97];return _0x4945be;};'use strict';var BPromise=require(_0x7631('0x0'));var _=require(_0x7631('0x1'));var moment=require(_0x7631('0x2'));var util=require(_0x7631('0x3'));var path=require(_0x7631('0x4'));var Redis=require(_0x7631('0x5'));var config=require(_0x7631('0x6'));var logger=require(_0x7631('0x7'))(_0x7631('0x8'));var ami=require(_0x7631('0x9'));var Channel=require(_0x7631('0xa'));var statusDesc=[_0x7631('0xb'),'not_inuse',_0x7631('0xc'),_0x7631('0xd'),_0x7631('0xe'),_0x7631('0xf'),_0x7631('0x10'),_0x7631('0x11'),_0x7631('0x12')];var applications=[_0x7631('0x13'),_0x7631('0x14'),_0x7631('0x15'),_0x7631('0x16'),_0x7631('0x17'),_0x7631('0x18')];var dispositions=['NO\x20ANSWER','FAILED',_0x7631('0x19'),_0x7631('0x1a'),_0x7631('0x1a'),'NO\x20ANSWER',_0x7631('0x1b'),_0x7631('0x1c'),_0x7631('0x19'),'FAILED',_0x7631('0x19')];var actions={};config[_0x7631('0x1d')]=_[_0x7631('0x1e')](config['redis'],{'host':_0x7631('0x1f'),'port':0x18eb});var io=require(_0x7631('0x20'))(new Redis(config['redis']));function VoiceCallReport(_0x12a88c){this['channels']=_0x12a88c['channels'];this[_0x7631('0x21')]=_0x12a88c['agents'];ami['on'](_0x7631('0x22'),this[_0x7631('0x23')]['bind'](this));ami['on'](_0x7631('0x24'),this[_0x7631('0x23')][_0x7631('0x25')](this));ami['on']('newchannel',this[_0x7631('0x26')][_0x7631('0x25')](this));ami['on'](_0x7631('0x27'),this['syncNewState'][_0x7631('0x25')](this));ami['on'](_0x7631('0x28'),this[_0x7631('0x29')][_0x7631('0x25')](this));ami['on']('hangup',this[_0x7631('0x2a')][_0x7631('0x25')](this));ami['on'](_0x7631('0x2b'),this[_0x7631('0x2c')][_0x7631('0x25')](this));ami['on'](_0x7631('0x2d'),this[_0x7631('0x2e')][_0x7631('0x25')](this));ami['on'](_0x7631('0x2f'),this[_0x7631('0x30')][_0x7631('0x25')](this));ami['on'](_0x7631('0x31'),this[_0x7631('0x32')][_0x7631('0x25')](this));ami['on'](_0x7631('0x33'),this[_0x7631('0x34')]['bind'](this));return BPromise[_0x7631('0x35')]()[_0x7631('0x36')](ami[_0x7631('0x37')]())['catch'](function(_0x568944){console[_0x7631('0x38')](_0x568944);});}VoiceCallReport[_0x7631('0x39')]['isNotNull']=function(_0x32581c){return _0x32581c!==null&&!_[_0x7631('0x3a')](_0x32581c);};VoiceCallReport['prototype'][_0x7631('0x3b')]=function(_0x19c397,_0x5deec9,_0x5f4021){io['to'](_0x19c397)['emit'](_0x5deec9,_0x5f4021);};VoiceCallReport['prototype']['syncNewCallerId']=function(_0x46352c){try{if(this[_0x7631('0x3c')](_0x46352c)){if(_0x46352c['uniqueid']===_0x46352c[_0x7631('0x3d')]){if(!_[_0x7631('0x3a')](this[_0x7631('0x3e')][_0x46352c[_0x7631('0x3f')]])){_[_0x7631('0x40')](this[_0x7631('0x3e')][_0x46352c[_0x7631('0x3f')]],_[_0x7631('0x41')](_0x46352c,_[_0x7631('0x42')](this[_0x7631('0x3e')][_0x46352c[_0x7631('0x3f')]])));}}}}catch(_0x470c5a){logger[_0x7631('0x43')]('[syncNewCallerId][VoiceCallReport]',util[_0x7631('0x44')](_0x470c5a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7631('0x39')][_0x7631('0x26')]=function(_0x163ab0){try{if(this['isNotNull'](_0x163ab0)){if(_0x163ab0['uniqueid']===_0x163ab0[_0x7631('0x3d')]&&_0x163ab0[_0x7631('0x45')]!=_0x7631('0x46')){if(_[_0x7631('0x3a')](this[_0x7631('0x3e')][_0x163ab0['uniqueid']])){this[_0x7631('0x3e')][_0x163ab0[_0x7631('0x3f')]]=new Channel();this[_0x7631('0x3e')][_0x163ab0['uniqueid']]['starttime']=moment()[_0x7631('0x47')](_0x7631('0x48'));this[_0x7631('0x3e')][_0x163ab0[_0x7631('0x3f')]][_0x7631('0x49')]=dispositions[_[_0x7631('0x4a')](_0x163ab0[_0x7631('0x4b')])];_[_0x7631('0x40')](this['channels'][_0x163ab0[_0x7631('0x3f')]],_[_0x7631('0x41')](_0x163ab0,_[_0x7631('0x42')](this[_0x7631('0x3e')][_0x163ab0[_0x7631('0x3f')]])));if(_0x163ab0[_0x7631('0x4c')]===_0x7631('0x4d')){if(this[_0x7631('0x21')][_0x163ab0[_0x7631('0x45')][_0x7631('0x4e')]('-')[0x0]]){this[_0x7631('0x21')][_0x163ab0[_0x7631('0x45')]['split']('-')[0x0]][_0x7631('0x4f')]=_0x163ab0[_0x7631('0x50')];this[_0x7631('0x3b')](util[_0x7631('0x47')]('user:%s',this['agents'][_0x163ab0[_0x7631('0x45')]['split']('-')[0x0]][_0x7631('0x51')]),_0x7631('0x52'),{'destaccountcode':this[_0x7631('0x21')][_0x163ab0[_0x7631('0x45')][_0x7631('0x4e')]('-')[0x0]][_0x7631('0x53')],'destconnectedlinenum':_0x163ab0[_0x7631('0x50')]});}}}}}}catch(_0x183eae){logger[_0x7631('0x43')](_0x7631('0x54'),util['inspect'](_0x183eae,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7631('0x39')][_0x7631('0x23')]=function(_0xc1a2de){try{if(this[_0x7631('0x3c')](_0xc1a2de)){if(_0xc1a2de['uniqueid']===_0xc1a2de['linkedid']&&_0xc1a2de[_0x7631('0x50')]!='h'&&_0xc1a2de['channel']!=_0x7631('0x46')){_0xc1a2de['application']=_0xc1a2de['application'][_0x7631('0x55')]();_0xc1a2de[_0x7631('0x56')]=(_0xc1a2de[_0x7631('0x57')]||_0xc1a2de[_0x7631('0x56')])['toLowerCase']();if(_[_0x7631('0x3a')](this[_0x7631('0x3e')][_0xc1a2de[_0x7631('0x3f')]])){this['channels'][_0xc1a2de[_0x7631('0x3f')]]=new Channel();this[_0x7631('0x3e')][_0xc1a2de[_0x7631('0x3f')]][_0x7631('0x58')]=_0xc1a2de['duration']?moment()[_0x7631('0x59')](moment[_0x7631('0x5a')](_0xc1a2de[_0x7631('0x5a')])[_0x7631('0x5b')](),_0x7631('0x5b'))[_0x7631('0x47')](_0x7631('0x48')):moment()[_0x7631('0x47')](_0x7631('0x48'));this['channels'][_0xc1a2de[_0x7631('0x3f')]][_0x7631('0x49')]=_0x7631('0x1a');}_[_0x7631('0x40')](this[_0x7631('0x3e')][_0xc1a2de[_0x7631('0x3f')]],_[_0x7631('0x41')](_0xc1a2de,_[_0x7631('0x42')](this['channels'][_0xc1a2de[_0x7631('0x3f')]])));if(_[_0x7631('0x5c')](applications,_0xc1a2de[_0x7631('0x5d')])){this[_0x7631('0x3e')][_0xc1a2de[_0x7631('0x3f')]][_0x7631('0x5e')]=_0xc1a2de[_0x7631('0x5d')];this[_0x7631('0x3e')][_0xc1a2de[_0x7631('0x3f')]][_0x7631('0x5f')]=_0xc1a2de[_0x7631('0x56')];if(_0xc1a2de[_0x7631('0x5d')]===_0x7631('0x13')&&_['startsWith'](_0xc1a2de[_0x7631('0x56')],_0x7631('0x60'))){var _0x3c0c13=_0xc1a2de['applicationdata']['split']('=');var _0x1c62b8=_0x3c0c13[0x0][_0x7631('0x61')](/cdr\((.*)\)/);if(_0x1c62b8){this[_0x7631('0x3e')][_0xc1a2de[_0x7631('0x3f')]][_0x1c62b8[0x1]]=_0x3c0c13[0x1];}}else if(_0xc1a2de[_0x7631('0x5d')]===_0x7631('0x14')){this[_0x7631('0x3e')][_0xc1a2de['uniqueid']][_0x7631('0x14')]=_0xc1a2de['applicationdata']['split'](',')[0x0];}}}}}catch(_0x4db4ac){logger['error'](_0x7631('0x62'),util[_0x7631('0x44')](_0x4db4ac,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7631('0x39')]['syncNewState']=function(_0x45f813){try{if(this[_0x7631('0x3c')](_0x45f813)){if(_0x45f813[_0x7631('0x3f')]!==_0x45f813[_0x7631('0x3d')]){if(this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3d')]]){if(_0x45f813[_0x7631('0x4b')]==='6'){if(!this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3d')]][_0x7631('0x63')]){var _0x5204e2=moment();this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3d')]][_0x7631('0x63')]=!![];this['channels'][_0x45f813[_0x7631('0x3d')]][_0x7631('0x64')]=_0x5204e2[_0x7631('0x47')](_0x7631('0x48'));if(this[_0x7631('0x3e')][_0x45f813['linkedid']]['starttime']){this['channels'][_0x45f813[_0x7631('0x3d')]][_0x7631('0x65')]=_0x5204e2[_0x7631('0x66')](this[_0x7631('0x3e')][_0x45f813['linkedid']][_0x7631('0x58')],_0x7631('0x5b'));}}this['channels'][_0x45f813['linkedid']]['linkedid']=_0x45f813[_0x7631('0x3f')];if(_0x45f813[_0x7631('0x67')]!==_0x7631('0x68')){this[_0x7631('0x3e')][_0x45f813['linkedid']]['connectedlinenum']=_0x45f813['calleridnum'];}this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3d')]]['connectedlinename']=_0x45f813[_0x7631('0x69')];this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3d')]][_0x7631('0x6a')]=_0x45f813[_0x7631('0x45')];this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3d')]]['disposition']=dispositions[_[_0x7631('0x4a')](_0x45f813[_0x7631('0x4b')])];if(this[_0x7631('0x21')][_0x45f813['channel']['split']('-')[0x0]]){this[_0x7631('0x3e')][_0x45f813['linkedid']]['UserId']=this['agents'][_0x45f813[_0x7631('0x45')][_0x7631('0x4e')]('-')[0x0]]['id'];this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3d')]][_0x7631('0x6b')]=this[_0x7631('0x21')][_0x45f813[_0x7631('0x45')][_0x7631('0x4e')]('-')[0x0]]['name'];}}}}else{if(this['channels'][_0x45f813[_0x7631('0x3f')]]){if(_0x45f813[_0x7631('0x4b')]==='6'){if(this[_0x7631('0x21')][_0x45f813[_0x7631('0x45')][_0x7631('0x4e')]('-')[0x0]]){this['channels'][_0x45f813[_0x7631('0x3f')]][_0x7631('0x6c')]=this[_0x7631('0x21')][_0x45f813['channel'][_0x7631('0x4e')]('-')[0x0]]['id'];this[_0x7631('0x3e')][_0x45f813[_0x7631('0x3f')]][_0x7631('0x6b')]=this[_0x7631('0x21')][_0x45f813['channel'][_0x7631('0x4e')]('-')[0x0]][_0x7631('0x51')];}}}}}}catch(_0x3d530c){logger[_0x7631('0x43')](_0x7631('0x6d'),util['inspect'](_0x3d530c,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7631('0x39')][_0x7631('0x6e')]=function(_0x3783cd,_0x39bf90){if(this[_0x7631('0x3e')][_0x3783cd]){this[_0x7631('0x3e')][_0x3783cd]['monitor']=!![];if(_['endsWith'](_0x39bf90,_0x7631('0x6f'))){_0x39bf90=_0x39bf90[_0x7631('0x70')](_0x7631('0x6f'),'.WAV');}this['channels'][_0x3783cd]['monitorFilename']=_0x39bf90;var _0x530360=_[_0x7631('0x71')](this[_0x7631('0x3e')][_0x3783cd][_0x7631('0x72')],{'filename':_0x39bf90});if(_[_0x7631('0x73')](_0x530360)){this['channels'][_0x3783cd][_0x7631('0x72')][_0x7631('0x74')]({'filename':_0x39bf90,'createdAt':moment()['format'](_0x7631('0x48')),'mixmonitorid':'','status':_0x7631('0x75')});}}};VoiceCallReport[_0x7631('0x39')][_0x7631('0x29')]=function(_0x267857){try{if(this[_0x7631('0x3c')](_0x267857)){if(this['channels'][_0x267857['uniqueid']]&&_0x267857[_0x7631('0x45')]!=_0x7631('0x46')){if(this['isNotNull'](_0x267857[_0x7631('0x76')])){if(this[_0x7631('0x3c')](_0x267857[_0x7631('0x76')][_0x7631('0x77')])){this[_0x7631('0x6e')](_0x267857['uniqueid'],_0x267857['value']);}else if(this[_0x7631('0x3c')](_0x267857[_0x7631('0x76')][_0x7631('0x78')])){this[_0x7631('0x3e')][_0x267857[_0x7631('0x3f')]][_0x7631('0x67')]=_0x267857[_0x7631('0x79')];}else if(this['isNotNull'](_0x267857[_0x7631('0x76')][_0x7631('0x7a')])){this[_0x7631('0x3e')][_0x267857['uniqueid']][_0x7631('0x7b')]=_0x267857[_0x7631('0x79')];}else if(this[_0x7631('0x3c')](_0x267857['variable'][_0x7631('0x7c')])){this[_0x7631('0x3e')][_0x267857[_0x7631('0x3f')]]['type']=_0x267857[_0x7631('0x79')];}else if(this[_0x7631('0x3c')](_0x267857[_0x7631('0x76')][_0x7631('0x7d')])){this['channels'][_0x267857['uniqueid']]['queue']=_0x267857['value'][_0x7631('0x4e')](',')[0x0];}else if(this[_0x7631('0x3c')](_0x267857[_0x7631('0x76')]['xmd-originatecalleridnum'])){this[_0x7631('0x3e')][_0x267857['uniqueid']][_0x7631('0x7e')]=_0x267857[_0x7631('0x79')];}else if(this[_0x7631('0x3c')](_0x267857[_0x7631('0x76')][_0x7631('0x7f')])){this['channels'][_0x267857[_0x7631('0x3f')]][_0x7631('0x80')]=_0x267857['value'];}else if(this[_0x7631('0x3c')](_0x267857[_0x7631('0x76')][_0x7631('0x81')])){this[_0x7631('0x3e')][_0x267857[_0x7631('0x3f')]][_0x7631('0x82')]=_0x267857[_0x7631('0x79')];}else if(this[_0x7631('0x3c')](_0x267857['variable'][_0x7631('0x83')])){this[_0x7631('0x3e')][_0x267857[_0x7631('0x3f')]][_0x7631('0x14')]=_0x267857['value'];}else if(this['isNotNull'](_0x267857['variable'][_0x7631('0x84')])){this['channels'][_0x267857[_0x7631('0x3f')]][_0x7631('0x85')]=_0x267857[_0x7631('0x79')];}}}else if(this['isNotNull'](_0x267857[_0x7631('0x76')]['mixmonitor_filename'])){if(_0x267857[_0x7631('0x79')]){var _0x1c674b=path['parse'](_0x267857[_0x7631('0x79')])[_0x7631('0x51')];this[_0x7631('0x6e')](_0x1c674b,_0x267857['value']);}}else if(this[_0x7631('0x3e')][_0x267857[_0x7631('0x3d')]]){if(this[_0x7631('0x3c')](_0x267857['variable'])){if(this[_0x7631('0x3c')](_0x267857[_0x7631('0x76')]['sipcallid'])){this[_0x7631('0x3e')][_0x267857[_0x7631('0x3d')]][_0x7631('0x86')]=_0x267857[_0x7631('0x79')];}}}}}catch(_0x3ad385){logger[_0x7631('0x43')](_0x7631('0x87'),util[_0x7631('0x44')](_0x3ad385,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7631('0x2a')]=function(_0x39669a){try{if(this['isNotNull'](_0x39669a)){if(this[_0x7631('0x3e')][_0x39669a[_0x7631('0x3f')]]){var _0x47c484=moment();this[_0x7631('0x3e')][_0x39669a['uniqueid']]['endtime']=_0x47c484[_0x7631('0x47')](_0x7631('0x48'));this['channels'][_0x39669a[_0x7631('0x3f')]][_0x7631('0x5a')]=_0x47c484['diff'](this[_0x7631('0x3e')][_0x39669a[_0x7631('0x3f')]][_0x7631('0x58')],_0x7631('0x5b'));if(this['channels'][_0x39669a[_0x7631('0x3f')]][_0x7631('0x63')]){this[_0x7631('0x3e')][_0x39669a['uniqueid']][_0x7631('0x88')]=_0x47c484['diff'](this['channels'][_0x39669a['uniqueid']][_0x7631('0x64')],_0x7631('0x5b'));this['channels'][_0x39669a['uniqueid']][_0x7631('0x65')]=this[_0x7631('0x3e')][_0x39669a[_0x7631('0x3f')]][_0x7631('0x5a')]-this[_0x7631('0x3e')][_0x39669a[_0x7631('0x3f')]]['billableseconds'];}if(_0x39669a['context']==='from-sip'){if(this[_0x7631('0x21')][_0x39669a['channel']['split']('-')[0x0]]){this[_0x7631('0x21')][_0x39669a[_0x7631('0x45')][_0x7631('0x4e')]('-')[0x0]]=_[_0x7631('0x89')](this[_0x7631('0x21')][_0x39669a[_0x7631('0x45')]['split']('-')[0x0]],[_0x7631('0x4f')]);this[_0x7631('0x3b')](util[_0x7631('0x47')](_0x7631('0x8a'),this[_0x7631('0x21')][_0x39669a[_0x7631('0x45')][_0x7631('0x4e')]('-')[0x0]][_0x7631('0x51')]),_0x7631('0x8b'),{'destaccountcode':this[_0x7631('0x21')][_0x39669a['channel'][_0x7631('0x4e')]('-')[0x0]][_0x7631('0x53')]});}}ami[_0x7631('0x3b')]('custom:voiceCallReport',this[_0x7631('0x3e')][_0x39669a['uniqueid']]);delete this[_0x7631('0x3e')][_0x39669a['uniqueid']];}}}catch(_0x239e5d){logger['error'](_0x7631('0x8c'),util[_0x7631('0x44')](_0x239e5d,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncAttendedTransfer']=function(_0x77b239){try{if(this['isNotNull'](_0x77b239)){if(this['channels'][_0x77b239[_0x7631('0x8d')]]){this[_0x7631('0x3e')][_0x77b239[_0x7631('0x8d')]]['transfercalleridnum']=_0x77b239[_0x7631('0x8e')];this[_0x7631('0x3e')][_0x77b239[_0x7631('0x8d')]][_0x7631('0x8f')]=_0x77b239[_0x7631('0x90')];if(this[_0x7631('0x3e')][_0x77b239['secondtransfereruniqueid']]){var _0x33e5f3=this[_0x7631('0x3e')][_0x77b239[_0x7631('0x91')]];this[_0x7631('0x3e')][_0x77b239[_0x7631('0x91')]]=this[_0x7631('0x3e')][_0x77b239[_0x7631('0x8d')]];this[_0x7631('0x3e')][_0x77b239[_0x7631('0x8d')]]=_0x33e5f3;}}else if(this[_0x7631('0x3e')][_0x77b239['transfertargetuniqueid']]){this[_0x7631('0x3e')][_0x77b239[_0x7631('0x92')]][_0x7631('0x93')]=_0x77b239[_0x7631('0x8e')];this[_0x7631('0x3e')][_0x77b239[_0x7631('0x92')]][_0x7631('0x8f')]=_0x77b239[_0x7631('0x90')];if(this['channels'][_0x77b239[_0x7631('0x94')]]){var _0x33e5f3=this['channels'][_0x77b239['origtransfereruniqueid']];this[_0x7631('0x3e')][_0x77b239['origtransfereruniqueid']]=this[_0x7631('0x3e')][_0x77b239[_0x7631('0x92')]];this[_0x7631('0x3e')][_0x77b239[_0x7631('0x92')]]=_0x33e5f3;}}}}catch(_0x503efa){logger[_0x7631('0x43')](_0x7631('0x95'),util[_0x7631('0x44')](_0x503efa,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7631('0x39')][_0x7631('0x30')]=function(_0x174db9){try{if(this[_0x7631('0x3c')](_0x174db9)){if(this[_0x7631('0x3e')][_0x174db9['transfereeuniqueid']]){this['channels'][_0x174db9[_0x7631('0x8d')]][_0x7631('0x93')]=_0x174db9[_0x7631('0x96')];this['channels'][_0x174db9[_0x7631('0x8d')]][_0x7631('0x8f')]=_0x174db9[_0x7631('0x97')];this[_0x7631('0x2a')]({'event':_0x7631('0x98'),'uniqueid':_0x174db9[_0x7631('0x8d')],'context':_0x174db9[_0x7631('0x4c')],'channel':_0x174db9[_0x7631('0x99')]});}}}catch(_0x403480){logger[_0x7631('0x43')](_0x7631('0x9a'),util[_0x7631('0x44')](_0x403480,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7631('0x39')][_0x7631('0x32')]=function(_0x4ef6fc){try{if(this[_0x7631('0x3c')](_0x4ef6fc)){if(this[_0x7631('0x3e')][_0x4ef6fc[_0x7631('0x3f')]]){if(!_[_0x7631('0x73')](this['channels'][_0x4ef6fc['uniqueid']][_0x7631('0x64')])){this['channels'][_0x4ef6fc[_0x7631('0x3f')]]['mohstarttime']=moment()[_0x7631('0x47')]('YYYY-MM-DD\x20HH:mm:ss');}}}}catch(_0x18bc69){logger[_0x7631('0x43')]('[syncMusicOnHoldStart][VoiceCallReport]',util[_0x7631('0x44')](_0x18bc69,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7631('0x34')]=function(_0xf2875d){try{if(this[_0x7631('0x3c')](_0xf2875d)){if(this[_0x7631('0x3e')][_0xf2875d['uniqueid']]){if(!_['isNil'](this[_0x7631('0x3e')][_0xf2875d['uniqueid']][_0x7631('0x9b')])){this[_0x7631('0x3e')][_0xf2875d[_0x7631('0x3f')]][_0x7631('0x9c')]+=moment()[_0x7631('0x9d')](0x0)['diff'](this[_0x7631('0x3e')][_0xf2875d[_0x7631('0x3f')]][_0x7631('0x9b')],'seconds');delete this[_0x7631('0x3e')][_0xf2875d['uniqueid']][_0x7631('0x9b')];}}}}catch(_0x4b873b){logger[_0x7631('0x43')](_0x7631('0x9e'),util[_0x7631('0x44')](_0x4b873b,{'showHidden':![],'depth':null}));}};module[_0x7631('0x9f')]=VoiceCallReport;
\ No newline at end of file
diff --git a/server/services/ami/report/voiceDialReport.js b/server/services/ami/report/voiceDialReport.js
index be8fb42..88b1be6 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 _0x30e7=['value','outboundrouteid','[syncVarSet][VoiceDialReport]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','sipcallid','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','membername','memberpenalty','includes','syncHangup','endtime','duration','diff','starttime','seconds','complete','total','holdtime','billableseconds','sumHoldTime','sumBillable','custom:voiceDialReport','custom:dialend','voice_outbound:save','info','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','voice_outbound_channel:remove','exports','lodash','ioredis','../../../config/environment','ami','redis','defaults','socket.io-emitter','channels','outboundChannels','outbound','variables','dialbegin','syncDialBegin','dialend','syncDialEnd','bind','varset','syncVarSet','prototype','isNotNull','isUndefined','emit','uniqueid','merge','format','YYYY-MM-DD\x20HH:mm:ss','called','channel','substring','lastIndexOf','omit','privilege','voice:outbound','voice_outbound_channel:save','custom:dialbegin','error','[syncDialBegin][VoiceDialReport]','inspect','dialstatus','connectedlinenum','connectedlinename','answertime','lastevent','connect','[syncDialEnd][VoiceDialReport]','addVariable','keys','variable'];(function(_0x21a2b3,_0x5d6564){var _0x4651a7=function(_0x285f59){while(--_0x285f59){_0x21a2b3['push'](_0x21a2b3['shift']());}};_0x4651a7(++_0x5d6564);}(_0x30e7,0xd2));var _0x730e=function(_0x2c702e,_0x16f40a){_0x2c702e=_0x2c702e-0x0;var _0x2ec05f=_0x30e7[_0x2c702e];return _0x2ec05f;};'use strict';var _=require(_0x730e('0x0'));var moment=require('moment');var util=require('util');var Redis=require(_0x730e('0x1'));var config=require(_0x730e('0x2'));var logger=require('../../../config/logger')(_0x730e('0x3'));var ami=require('../ami');config[_0x730e('0x4')]=_[_0x730e('0x5')](config[_0x730e('0x4')],{'host':'localhost','port':0x18eb});var io=require(_0x730e('0x6'))(new Redis(config[_0x730e('0x4')]));function VoiceDialReport(_0x5dba92){this[_0x730e('0x7')]=_0x5dba92[_0x730e('0x8')];this[_0x730e('0x9')]=_0x5dba92['outbound'];this[_0x730e('0xa')]={};ami['on'](_0x730e('0xb'),this[_0x730e('0xc')]['bind'](this));ami['on'](_0x730e('0xd'),this[_0x730e('0xe')][_0x730e('0xf')](this));ami['on'](_0x730e('0x10'),this[_0x730e('0x11')][_0x730e('0xf')](this));ami['on']('hangup',this['syncHangup'][_0x730e('0xf')](this));}VoiceDialReport[_0x730e('0x12')][_0x730e('0x13')]=function(_0x458eb0){return _0x458eb0!==null&&!_[_0x730e('0x14')](_0x458eb0);};VoiceDialReport[_0x730e('0x12')]['emit']=function(_0x5916b9,_0x251adb,_0x238cd6){io['to'](_0x5916b9)[_0x730e('0x15')](_0x251adb,_0x238cd6);};VoiceDialReport[_0x730e('0x12')]['syncDialBegin']=function(_0x1ae73e){try{if(this[_0x730e('0x13')](_0x1ae73e)){if(this[_0x730e('0x7')][_0x1ae73e[_0x730e('0x16')]]){_[_0x730e('0x17')](this[_0x730e('0x7')][_0x1ae73e[_0x730e('0x16')]],{'starttime':moment()[_0x730e('0x18')](_0x730e('0x19')),'lastevent':_0x730e('0x1a'),'interface':_0x1ae73e[_0x730e('0x1b')][_0x730e('0x1c')](0x0,_0x1ae73e[_0x730e('0x1b')][_0x730e('0x1d')]('-')),'membername':_0x1ae73e[_0x730e('0x1b')][_0x730e('0x1c')](_0x1ae73e[_0x730e('0x1b')]['lastIndexOf']('/')+0x1,_0x1ae73e[_0x730e('0x1b')]['lastIndexOf']('-'))},_[_0x730e('0x1e')](_0x1ae73e,['event',_0x730e('0x1f')]));this[_0x730e('0x15')](_0x730e('0x20'),_0x730e('0x21'),this[_0x730e('0x7')][_0x1ae73e[_0x730e('0x16')]]);ami['emit'](_0x730e('0x22'),this['channels'][_0x1ae73e[_0x730e('0x16')]]);}}}catch(_0xe45f1b){logger[_0x730e('0x23')](_0x730e('0x24'),util[_0x730e('0x25')](_0xe45f1b,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x730e('0x12')][_0x730e('0xe')]=function(_0x21cf05){try{if(this[_0x730e('0x13')](_0x21cf05)){if(this[_0x730e('0x7')][_0x21cf05[_0x730e('0x16')]]){this[_0x730e('0x7')][_0x21cf05[_0x730e('0x16')]][_0x730e('0x26')]=_0x21cf05[_0x730e('0x26')];if(_0x21cf05[_0x730e('0x26')]==='ANSWER'){this['channels'][_0x21cf05[_0x730e('0x16')]][_0x730e('0x27')]=_0x21cf05['connectedlinenum'];this[_0x730e('0x7')][_0x21cf05[_0x730e('0x16')]][_0x730e('0x28')]=_0x21cf05[_0x730e('0x28')];this[_0x730e('0x7')][_0x21cf05['uniqueid']][_0x730e('0x29')]=moment()[_0x730e('0x18')](_0x730e('0x19'));this[_0x730e('0x7')][_0x21cf05['uniqueid']][_0x730e('0x2a')]=_0x730e('0x2b');ami['emit']('custom:dialconnect',this[_0x730e('0x7')][_0x21cf05['uniqueid']]);}this[_0x730e('0x15')](_0x730e('0x20'),'voice_outbound_channel:save',this['channels'][_0x21cf05[_0x730e('0x16')]]);}}}catch(_0x327d13){logger[_0x730e('0x23')](_0x730e('0x2c'),util[_0x730e('0x25')](_0x327d13,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x730e('0x12')]['syncVarSet']=function(_0x461262){try{if(this['isNotNull'](_0x461262)){this[_0x730e('0x2d')](_0x461262[_0x730e('0x16')],_[_0x730e('0x2e')](_0x461262[_0x730e('0x2f')])[0x0],_0x461262[_0x730e('0x30')]);if(this[_0x730e('0x13')](_0x461262['variable'])&&this[_0x730e('0x13')](_0x461262[_0x730e('0x2f')][_0x730e('0x31')])){if(_[_0x730e('0x14')](this[_0x730e('0x7')][_0x461262['uniqueid']])){this[_0x730e('0x7')][_0x461262[_0x730e('0x16')]]={'routeId':_0x461262[_0x730e('0x30')],'variables':this[_0x730e('0xa')][_0x461262[_0x730e('0x16')]]};this[_0x730e('0x15')](_0x730e('0x20'),_0x730e('0x21'),this[_0x730e('0x7')][_0x461262[_0x730e('0x16')]]);}}}}catch(_0x55da7f){logger['error'](_0x730e('0x32'),util[_0x730e('0x25')](_0x55da7f,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x730e('0x12')][_0x730e('0x2d')]=function(_0x1d9440,_0x13e327,_0x434376){var _0x5d5420=[_0x730e('0x33'),_0x730e('0x34'),_0x730e('0x35'),_0x730e('0x36'),'rtpaudioqosloss',_0x730e('0x37'),_0x730e('0x38'),'rtpaudioqosrttbridged',_0x730e('0x39'),_0x730e('0x3a'),_0x730e('0x3b'),'bridgepvtcallid',_0x730e('0x3c'),_0x730e('0x3d'),_0x730e('0x3e'),'memberlastcall',_0x730e('0x3f'),_0x730e('0x40'),'memberrealtime'];if(!_['isNil'](_0x13e327)&&!_[_0x730e('0x41')](_0x5d5420,_0x13e327)){if(_[_0x730e('0x14')](this['variables'][_0x1d9440])){this[_0x730e('0xa')][_0x1d9440]={};}this[_0x730e('0xa')][_0x1d9440][_0x13e327]=_0x434376;}};VoiceDialReport[_0x730e('0x12')][_0x730e('0x42')]=function(_0x48c305){try{if(this['isNotNull'](_0x48c305)){if(this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]]){this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x43')]=moment()[_0x730e('0x18')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x44')]=moment(this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x43')])[_0x730e('0x45')](this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x46')],_0x730e('0x47'));this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x2a')]=_0x730e('0x48');this['outbound'][_0x730e('0x49')]+=0x1;if(this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]]['answertime']){this[_0x730e('0x9')]['answered']+=0x1;this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x4a')]=moment(this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]]['answertime'])[_0x730e('0x45')](this[_0x730e('0x7')][_0x48c305['uniqueid']][_0x730e('0x46')],_0x730e('0x47'));this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x4b')]=moment(this['channels'][_0x48c305[_0x730e('0x16')]][_0x730e('0x43')])['diff'](this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x29')],_0x730e('0x47'));this[_0x730e('0x9')][_0x730e('0x4c')]+=this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x4a')]||0x0;this['outbound'][_0x730e('0x4d')]+=this['channels'][_0x48c305[_0x730e('0x16')]][_0x730e('0x4b')];}this[_0x730e('0x9')]['sumDuration']+=this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]][_0x730e('0x44')];ami[_0x730e('0x15')](_0x730e('0x4e'),this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]]);ami[_0x730e('0x15')](_0x730e('0x4f'),this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]]);this[_0x730e('0x15')]('voice:outbound',_0x730e('0x50'),this[_0x730e('0x9')]);logger[_0x730e('0x51')](_0x730e('0x52'),JSON[_0x730e('0x53')](this[_0x730e('0x7')][_0x48c305[_0x730e('0x16')]]));this[_0x730e('0x15')]('voice:outbound',_0x730e('0x54'),this[_0x730e('0x7')][_0x48c305['uniqueid']]);delete this[_0x730e('0x7')][_0x48c305['uniqueid']];}if(this[_0x730e('0xa')][_0x48c305[_0x730e('0x16')]]){delete this['variables'][_0x48c305[_0x730e('0x16')]];}}}catch(_0x307b1f){logger[_0x730e('0x23')]('[syncHangup][VoiceDialReport]',util['inspect'](_0x307b1f,{'showHidden':![],'depth':null}));}};module[_0x730e('0x55')]=VoiceDialReport;
\ No newline at end of file
+var _0x88d5=['rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipuri','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberrealtime','isNil','includes','syncHangup','endtime','duration','diff','starttime','seconds','total','answertime','answered','sumBillable','billableseconds','sumDuration','custom:dialend','info','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','voice_outbound_channel:remove','[syncHangup][VoiceDialReport]','exports','lodash','moment','util','ioredis','../../../config/environment','ami','../ami','defaults','redis','localhost','socket.io-emitter','outbound','variables','dialbegin','bind','syncDialEnd','syncVarSet','hangup','prototype','isUndefined','emit','syncDialBegin','channels','uniqueid','format','YYYY-MM-DD\x20HH:mm:ss','channel','substring','lastIndexOf','omit','event','privilege','voice:outbound','custom:dialbegin','error','[syncDialBegin][VoiceDialReport]','inspect','isNotNull','dialstatus','ANSWER','connectedlinenum','connectedlinename','lastevent','connect','custom:dialconnect','voice_outbound_channel:save','[syncDialEnd][VoiceDialReport]','addVariable','keys','variable','value','outboundrouteid','[syncVarSet][VoiceDialReport]','rtpaudioqos','rtpaudioqosjitter','rtpaudioqosjitterbridged'];(function(_0x239904,_0x4b11e2){var _0x259609=function(_0x41d52a){while(--_0x41d52a){_0x239904['push'](_0x239904['shift']());}};_0x259609(++_0x4b11e2);}(_0x88d5,0x76));var _0x588d=function(_0x3440a4,_0x116b99){_0x3440a4=_0x3440a4-0x0;var _0xef09f2=_0x88d5[_0x3440a4];return _0xef09f2;};'use strict';var _=require(_0x588d('0x0'));var moment=require(_0x588d('0x1'));var util=require(_0x588d('0x2'));var Redis=require(_0x588d('0x3'));var config=require(_0x588d('0x4'));var logger=require('../../../config/logger')(_0x588d('0x5'));var ami=require(_0x588d('0x6'));config['redis']=_[_0x588d('0x7')](config[_0x588d('0x8')],{'host':_0x588d('0x9'),'port':0x18eb});var io=require(_0x588d('0xa'))(new Redis(config[_0x588d('0x8')]));function VoiceDialReport(_0x413748){this['channels']=_0x413748['outboundChannels'];this[_0x588d('0xb')]=_0x413748[_0x588d('0xb')];this[_0x588d('0xc')]={};ami['on'](_0x588d('0xd'),this['syncDialBegin'][_0x588d('0xe')](this));ami['on']('dialend',this[_0x588d('0xf')][_0x588d('0xe')](this));ami['on']('varset',this[_0x588d('0x10')][_0x588d('0xe')](this));ami['on'](_0x588d('0x11'),this['syncHangup'][_0x588d('0xe')](this));}VoiceDialReport[_0x588d('0x12')]['isNotNull']=function(_0x317528){return _0x317528!==null&&!_[_0x588d('0x13')](_0x317528);};VoiceDialReport[_0x588d('0x12')][_0x588d('0x14')]=function(_0x396af0,_0x5652cf,_0x4e741f){io['to'](_0x396af0)[_0x588d('0x14')](_0x5652cf,_0x4e741f);};VoiceDialReport[_0x588d('0x12')][_0x588d('0x15')]=function(_0x4ed8b2){try{if(this['isNotNull'](_0x4ed8b2)){if(this[_0x588d('0x16')][_0x4ed8b2[_0x588d('0x17')]]){_['merge'](this[_0x588d('0x16')][_0x4ed8b2[_0x588d('0x17')]],{'starttime':moment()[_0x588d('0x18')](_0x588d('0x19')),'lastevent':'called','interface':_0x4ed8b2[_0x588d('0x1a')][_0x588d('0x1b')](0x0,_0x4ed8b2['channel'][_0x588d('0x1c')]('-')),'membername':_0x4ed8b2[_0x588d('0x1a')]['substring'](_0x4ed8b2['channel'][_0x588d('0x1c')]('/')+0x1,_0x4ed8b2[_0x588d('0x1a')]['lastIndexOf']('-'))},_[_0x588d('0x1d')](_0x4ed8b2,[_0x588d('0x1e'),_0x588d('0x1f')]));this['emit'](_0x588d('0x20'),'voice_outbound_channel:save',this['channels'][_0x4ed8b2['uniqueid']]);ami['emit'](_0x588d('0x21'),this[_0x588d('0x16')][_0x4ed8b2[_0x588d('0x17')]]);}}}catch(_0x49bd5f){logger[_0x588d('0x22')](_0x588d('0x23'),util[_0x588d('0x24')](_0x49bd5f,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x588d('0x12')][_0x588d('0xf')]=function(_0x430863){try{if(this[_0x588d('0x25')](_0x430863)){if(this[_0x588d('0x16')][_0x430863['uniqueid']]){this[_0x588d('0x16')][_0x430863[_0x588d('0x17')]]['dialstatus']=_0x430863[_0x588d('0x26')];if(_0x430863['dialstatus']===_0x588d('0x27')){this[_0x588d('0x16')][_0x430863[_0x588d('0x17')]][_0x588d('0x28')]=_0x430863['connectedlinenum'];this[_0x588d('0x16')][_0x430863[_0x588d('0x17')]]['connectedlinename']=_0x430863[_0x588d('0x29')];this['channels'][_0x430863[_0x588d('0x17')]]['answertime']=moment()[_0x588d('0x18')](_0x588d('0x19'));this['channels'][_0x430863[_0x588d('0x17')]][_0x588d('0x2a')]=_0x588d('0x2b');ami[_0x588d('0x14')](_0x588d('0x2c'),this[_0x588d('0x16')][_0x430863[_0x588d('0x17')]]);}this[_0x588d('0x14')](_0x588d('0x20'),_0x588d('0x2d'),this['channels'][_0x430863['uniqueid']]);}}}catch(_0x4088c2){logger[_0x588d('0x22')](_0x588d('0x2e'),util[_0x588d('0x24')](_0x4088c2,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x588d('0x12')]['syncVarSet']=function(_0xd96e62){try{if(this['isNotNull'](_0xd96e62)){this[_0x588d('0x2f')](_0xd96e62[_0x588d('0x17')],_[_0x588d('0x30')](_0xd96e62[_0x588d('0x31')])[0x0],_0xd96e62[_0x588d('0x32')]);if(this[_0x588d('0x25')](_0xd96e62['variable'])&&this[_0x588d('0x25')](_0xd96e62['variable'][_0x588d('0x33')])){if(_[_0x588d('0x13')](this[_0x588d('0x16')][_0xd96e62['uniqueid']])){this[_0x588d('0x16')][_0xd96e62['uniqueid']]={'routeId':_0xd96e62['value'],'variables':this['variables'][_0xd96e62[_0x588d('0x17')]]};this['emit'](_0x588d('0x20'),_0x588d('0x2d'),this['channels'][_0xd96e62[_0x588d('0x17')]]);}}}}catch(_0x15d6d7){logger[_0x588d('0x22')](_0x588d('0x34'),util[_0x588d('0x24')](_0x15d6d7,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x588d('0x12')]['addVariable']=function(_0x262b4e,_0x232310,_0x5cb680){var _0x43f540=[_0x588d('0x35'),'rtpaudioqosbridged',_0x588d('0x36'),_0x588d('0x37'),'rtpaudioqosloss',_0x588d('0x38'),_0x588d('0x39'),_0x588d('0x3a'),'sipcallid',_0x588d('0x3b'),'bridgepeer',_0x588d('0x3c'),_0x588d('0x3d'),_0x588d('0x3e'),_0x588d('0x3f'),_0x588d('0x40'),'membername','memberpenalty',_0x588d('0x41')];if(!_[_0x588d('0x42')](_0x232310)&&!_[_0x588d('0x43')](_0x43f540,_0x232310)){if(_[_0x588d('0x13')](this['variables'][_0x262b4e])){this['variables'][_0x262b4e]={};}this[_0x588d('0xc')][_0x262b4e][_0x232310]=_0x5cb680;}};VoiceDialReport['prototype'][_0x588d('0x44')]=function(_0x58b0d7){try{if(this[_0x588d('0x25')](_0x58b0d7)){if(this[_0x588d('0x16')][_0x58b0d7['uniqueid']]){this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x45')]=moment()[_0x588d('0x18')](_0x588d('0x19'));this['channels'][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x46')]=moment(this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x45')])[_0x588d('0x47')](this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x48')],_0x588d('0x49'));this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]]['lastevent']='complete';this[_0x588d('0xb')][_0x588d('0x4a')]+=0x1;if(this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x4b')]){this[_0x588d('0xb')][_0x588d('0x4c')]+=0x1;this[_0x588d('0x16')][_0x58b0d7['uniqueid']]['holdtime']=moment(this[_0x588d('0x16')][_0x58b0d7['uniqueid']][_0x588d('0x4b')])['diff'](this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]]['starttime'],_0x588d('0x49'));this['channels'][_0x58b0d7[_0x588d('0x17')]]['billableseconds']=moment(this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x45')])[_0x588d('0x47')](this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x4b')],_0x588d('0x49'));this['outbound']['sumHoldTime']+=this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]]['holdtime']||0x0;this['outbound'][_0x588d('0x4d')]+=this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x4e')];}this[_0x588d('0xb')][_0x588d('0x4f')]+=this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]][_0x588d('0x46')];ami[_0x588d('0x14')]('custom:voiceDialReport',this['channels'][_0x58b0d7[_0x588d('0x17')]]);ami['emit'](_0x588d('0x50'),this[_0x588d('0x16')][_0x58b0d7['uniqueid']]);this[_0x588d('0x14')]('voice:outbound','voice_outbound:save',this['outbound']);logger[_0x588d('0x51')](_0x588d('0x52'),JSON[_0x588d('0x53')](this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]]));this['emit'](_0x588d('0x20'),_0x588d('0x54'),this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]]);delete this[_0x588d('0x16')][_0x58b0d7[_0x588d('0x17')]];}if(this['variables'][_0x58b0d7[_0x588d('0x17')]]){delete this[_0x588d('0xc')][_0x58b0d7[_0x588d('0x17')]];}}}catch(_0x1c1bd6){logger['error'](_0x588d('0x55'),util[_0x588d('0x24')](_0x1c1bd6,{'showHidden':![],'depth':null}));}};module[_0x588d('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 b59db6a..fd9b622 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 _0x4b45=['syncBlindTransfer','BLIND','extension','BlindTransfer','context','transfererchannel','[syncBlindTransfer][VoiceQueueReport]','syncMusicOnHoldStart','mohstarttime','[syncMusicOnHoldStart][VoiceQueueReport]','[syncMusicOnHoldStop][VoiceQueueReport]','exports','lodash','util','md5','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/queueReport','redis','defaults','enqueue','tail','queueReports','agents','channels','queueChannels','voiceQueues','campaigns','variables','queuesummary','syncQueueSummary','bind','queuesummarycomplete','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','agentconnect','syncAgentConnect','varset','syncVarSet','hangup','syncHangup','fullybooted','syncFullyBooted','musiconholdstart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','blindtransfer','loopQueueSummary','loopQueueShow','isUndefined','isEmpty','hasOwnProperty','originated','waiting','queueStatusComplete','clearZombieChannels','switch','sequence','isNil','message','No\x20such\x20channel','error','[voiceQueueReport][checkChannel]','[voiceQueueReport][checkQueueReport]','[voiceQueueReport][checkVariables]','prototype','[FullyBooted]\x20clear\x20realtime','clearQueueReport','emitVoiceQueueChannelRemove','inspect','emit','emitVoiceQueueChannelSave','format','voice:queue:%s','name','voice_queue_channel:save','stringify','voice_queue_channel:remove','type','inbound','answered','available','pTalking','sumBillable','sumDuration','sumHoldTime','talking','total','abandoned','Trunk','active','callerid','Interval','Action','catch','[queues]','flagQueueSummary','then','[queuesummary]','isNotNull','queue','countBy','callers','toNumber','loggedIn','loggedin','emitVoiceQueueSummary','syncQueueSummaryComplete','syncNewExten','syncQueueCallerJoin','uniqueid','YYYY-MM-DD\x20HH:mm:ss','position','count','merge','keys','push','[syncQueueCallerJoin][VoiceQueueReport]','last','queuecallercomplete','holdtime','originalposition','queuecallerabandon','queuecallerexitreason','ABANDONED','lastAssignedTo','[syncQueueCallerAbandon][VoiceQueueReport]','queuecallerleaveAt','connectedlinenum','connectedlinename','[syncQueueCallerLeave][VoiceQueueReport]','COMPLETEDBYAGENT','[syncAgentConnect][VoiceQueueReport]','assigned','transfer','reason','COMPLETED','startsWith','channel','local/','linkedid','queuecallerexit','queuecallerexitAt','queuecallerjoinAt','add','seconds','FORWARDTRANSFER','transfertype','FORWARD','transferuniqueid','COMPLETEDBY','toUpperCase','[syncAgentComplete][VoiceQueueReport]','addVariable','value','variable','queuestatus','CONTINUE','queuecallerabandonAt','EXITWITHKEY','[syncVarSet][VoiceQueueReport]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','membername','memberpenalty','memberrealtime','diff','length','milliseconds','queuecallercompleteAt','lastevent','unmanaged','custom:queuecallerunmanaged','custom:queuecallerabandon','custom:voiceQueueReport','[syncHangup][VoiceQueueReport]','syncAttendedTransfer','transfereeuniqueid','transferexten','secondtransfererexten','secondtransfereruniqueid','ATTENDEDTRANSFER','ATTENDED','transfertargetuniqueid','origtransfereruniqueid','[syncAttendedTransfer][VoiceQueueReport]'];(function(_0x476540,_0x19552f){var _0x35b450=function(_0x5f1bbd){while(--_0x5f1bbd){_0x476540['push'](_0x476540['shift']());}};_0x35b450(++_0x19552f);}(_0x4b45,0x1aa));var _0x54b4=function(_0x52b0d3,_0x38b9b7){_0x52b0d3=_0x52b0d3-0x0;var _0x1d469b=_0x4b45[_0x52b0d3];return _0x1d469b;};'use strict';var _=require(_0x54b4('0x0'));var moment=require('moment');var BPromise=require('bluebird');var util=require(_0x54b4('0x1'));var md5=require(_0x54b4('0x2'));var Redis=require(_0x54b4('0x3'));var config=require(_0x54b4('0x4'));var logger=require(_0x54b4('0x5'))(_0x54b4('0x6'));var ami=require(_0x54b4('0x7'));var QueueReport=require(_0x54b4('0x8'));config[_0x54b4('0x9')]=_[_0x54b4('0xa')](config[_0x54b4('0x9')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x54b4('0x9')]));var Sequence=function(){};Sequence['prototype'][_0x54b4('0xb')]=function(_0x5957a1){this[_0x54b4('0xc')]=this[_0x54b4('0xc')]?this[_0x54b4('0xc')]['finally'](_0x5957a1):_0x5957a1();};function VoiceQueueReport(_0x4fece6){this['sequence']=new Sequence();this[_0x54b4('0xd')]={};this[_0x54b4('0xe')]=_0x4fece6[_0x54b4('0xe')];this[_0x54b4('0xf')]=_0x4fece6[_0x54b4('0x10')];this[_0x54b4('0x11')]=_0x4fece6[_0x54b4('0x11')];this['flagQueueSummary']=!![];this[_0x54b4('0x12')]=_0x4fece6[_0x54b4('0x12')];this[_0x54b4('0x13')]={};ami['on'](_0x54b4('0x14'),this[_0x54b4('0x15')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x17'),this['syncQueueSummaryComplete'][_0x54b4('0x16')](this));ami['on']('queuecallerjoin',this['syncQueueCallerJoin'][_0x54b4('0x16')](this));ami['on']('queuecallerabandon',this[_0x54b4('0x18')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x19'),this[_0x54b4('0x1a')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x1b'),this[_0x54b4('0x1c')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x1d'),this[_0x54b4('0x1e')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x1f'),this[_0x54b4('0x20')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x21'),this[_0x54b4('0x22')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x23'),this[_0x54b4('0x24')][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x25'),this['syncMusicOnHoldStart'][_0x54b4('0x16')](this));ami['on'](_0x54b4('0x26'),this[_0x54b4('0x27')]['bind'](this));ami['on'](_0x54b4('0x28'),this['syncAttendedTransfer']['bind'](this));ami['on'](_0x54b4('0x29'),this['syncBlindTransfer'][_0x54b4('0x16')](this));this[_0x54b4('0x2a')]();this[_0x54b4('0x2b')]();}function isNotNull(_0x5bf80f){return _0x5bf80f!==null&&!_[_0x54b4('0x2c')](_0x5bf80f);}function clearChannels(_0x3a9391){if(!_[_0x54b4('0x2d')](_0x3a9391)){for(var _0x2e3824 in _0x3a9391){if(_0x3a9391[_0x54b4('0x2e')](_0x2e3824)){delete _0x3a9391[_0x2e3824];}}}}function clearCampaigns(_0x1ccae9){if(!_[_0x54b4('0x2d')](_0x1ccae9)){for(var _0x2270d5 in _0x1ccae9){if(_0x1ccae9[_0x54b4('0x2e')](_0x2270d5)){_0x1ccae9[_0x2270d5][_0x54b4('0x2f')]=0x0;}}}}function clearVoiceQueues(_0x4a1753){if(!_[_0x54b4('0x2d')](_0x4a1753)){for(var _0x287cca in _0x4a1753){if(_0x4a1753[_0x54b4('0x2e')](_0x287cca)){_0x4a1753[_0x287cca][_0x54b4('0x2f')]=0x0;_0x4a1753[_0x287cca]['talking']=0x0;_0x4a1753[_0x287cca]['pTalking']=0x0;_0x4a1753[_0x287cca][_0x54b4('0x30')]=0x0;_0x4a1753[_0x287cca][_0x54b4('0x31')]=!![];}}}}function clearAgentBooked(_0x550158){if(!_[_0x54b4('0x2d')](_0x550158)){for(var _0x542a69 in _0x550158){if(_0x550158[_0x54b4('0x2e')](_0x542a69)){_0x550158[_0x542a69]['unlockRR']=!![];}}}}VoiceQueueReport['prototype'][_0x54b4('0x32')]=function(){var _0x40fb11=this;for(var _0x14b02f in this[_0x54b4('0xf')]){if(this['channels'][_0x54b4('0x2e')](_0x14b02f)&&!this['channels'][_0x14b02f][_0x54b4('0x33')]){this[_0x54b4('0x34')][_0x54b4('0xb')](function(){if(!_[_0x54b4('0x35')](_0x40fb11['channels'][_0x14b02f])){return ami['Action']({'action':'status','channel':_0x40fb11[_0x54b4('0xf')][_0x14b02f]['channel']})['catch'](function(_0x58fa61){if(_0x58fa61[_0x54b4('0x36')]===_0x54b4('0x37')){setTimeout(function(){if(_0x40fb11['channels'][_0x14b02f]){delete _0x40fb11[_0x54b4('0xf')][_0x14b02f];logger[_0x54b4('0x38')](_0x54b4('0x39'),_0x14b02f);}if(_0x40fb11['queueReports'][_0x14b02f]){delete _0x40fb11[_0x54b4('0xd')][_0x14b02f];logger[_0x54b4('0x38')](_0x54b4('0x3a'),_0x14b02f);}if(_0x40fb11[_0x54b4('0x13')][_0x14b02f]){delete _0x40fb11[_0x54b4('0x13')][_0x14b02f];logger[_0x54b4('0x38')](_0x54b4('0x3b'),_0x14b02f);}},0x1f40);}});}});}}};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x24')]=function(){logger['error'](_0x54b4('0x3d'));clearChannels(this['channels']);this[_0x54b4('0x3e')](this['queueReports']);clearAgentBooked(this['agents']);clearVoiceQueues(this[_0x54b4('0x11')]);clearCampaigns(this[_0x54b4('0x12')]);};VoiceQueueReport[_0x54b4('0x3c')]['clearQueueReport']=function(_0x3e57ab){var _0x58e21a=this;if(!_[_0x54b4('0x2d')](_0x3e57ab)){for(var _0x25d51a in _0x3e57ab){if(_0x3e57ab[_0x54b4('0x2e')](_0x25d51a)){_0x58e21a[_0x54b4('0x3f')](_0x3e57ab[_0x25d51a]);delete _0x3e57ab[_0x25d51a];}}}};function loggerCatch(_0x2d676b){return function(_0x59c37f){logger[_0x54b4('0x38')](_0x2d676b,util[_0x54b4('0x40')](_0x59c37f,{'showHidden':![],'depth':null}));};}VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x41')]=function(_0x5e7870,_0x2ea79a,_0x4dd212){io['to'](_0x5e7870)['emit'](_0x2ea79a,_0x4dd212);};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x42')]=function(_0x20483e){this[_0x54b4('0x41')](util[_0x54b4('0x43')](_0x54b4('0x44'),_0x20483e[_0x54b4('0x45')]),_0x54b4('0x46'),_0x20483e);};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x3f')]=function(_0x356075){logger['info']('[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event',JSON[_0x54b4('0x47')](_0x356075));this[_0x54b4('0x41')](util[_0x54b4('0x43')](_0x54b4('0x44'),_0x356075[_0x54b4('0x45')]),_0x54b4('0x48'),_0x356075);};VoiceQueueReport[_0x54b4('0x3c')]['emitVoiceQueueSummary']=function(_0x232b31){if(_0x232b31[_0x54b4('0x49')]===_0x54b4('0x4a')){var _0xb1b45a={'id':_0x232b31['id'],'name':_0x232b31[_0x54b4('0x45')],'strategy':_0x232b31['strategy'],'answered':_0x232b31[_0x54b4('0x4b')],'available':_0x232b31[_0x54b4('0x4c')],'loggedIn':_0x232b31['loggedIn'],'pTalking':_0x232b31[_0x54b4('0x4d')],'sumBillable':_0x232b31[_0x54b4('0x4e')],'sumDuration':_0x232b31[_0x54b4('0x4f')],'sumHoldTime':_0x232b31[_0x54b4('0x50')]||0x0,'talking':_0x232b31[_0x54b4('0x51')],'total':_0x232b31[_0x54b4('0x52')],'type':_0x232b31[_0x54b4('0x49')],'unmanaged':_0x232b31['unmanaged'],'abandoned':_0x232b31[_0x54b4('0x53')],'waiting':_0x232b31[_0x54b4('0x30')]};if(_0x232b31[_0x54b4('0x54')]){_0xb1b45a[_0x54b4('0x54')]={'id':_0x232b31[_0x54b4('0x54')]['id'],'name':_0x232b31[_0x54b4('0x54')][_0x54b4('0x45')],'active':_0x232b31[_0x54b4('0x54')][_0x54b4('0x55')],'callerid':_0x232b31[_0x54b4('0x54')][_0x54b4('0x56')]};}if(_0x232b31[_0x54b4('0x57')]){_0xb1b45a[_0x54b4('0x57')]={'id':_0x232b31['Interval']['id'],'name':_0x232b31[_0x54b4('0x57')][_0x54b4('0x45')]};}var _0x5ca438=md5(JSON['stringify'](_0xb1b45a));if(_0x232b31[_0x54b4('0x2')]!==_0x5ca438){_0x232b31[_0x54b4('0x2')]=_0x5ca438;this[_0x54b4('0x41')](util[_0x54b4('0x43')](_0x54b4('0x44'),_0xb1b45a[_0x54b4('0x45')]),'voice_queue:save',_0xb1b45a);}}};VoiceQueueReport[_0x54b4('0x3c')]['isNotNull']=function(_0x4a5560){return _0x4a5560!==null&&!_[_0x54b4('0x2c')](_0x4a5560);};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x2b')]=function(){var _0x4f32=this;setInterval(function(){_0x4f32['clearZombieChannels']();ami[_0x54b4('0x58')]({'action':'queues'})[_0x54b4('0x59')](loggerCatch(_0x54b4('0x5a')));},0x2710);};VoiceQueueReport['prototype']['loopQueueSummary']=function(){var _0x24a944=this;setInterval(function(){if(_0x24a944[_0x54b4('0x5b')]){return ami['Action']({'action':'queuesummary'})[_0x54b4('0x5c')](function(_0x4db5d5){_0x24a944[_0x54b4('0x5b')]=![];})['catch'](loggerCatch(_0x54b4('0x5d')));}},0x3e8);};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x15')]=function(_0x2a6878){try{if(this[_0x54b4('0x5e')](_0x2a6878)&&this[_0x54b4('0x5e')](_0x2a6878['queue'])){if(this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]]){var _0x337322=_[_0x54b4('0x60')](this[_0x54b4('0xf')],_0x54b4('0x5f'))[_0x2a6878[_0x54b4('0x5f')]]||0x0;var _0x4c5944=_0x337322-_0x2a6878[_0x54b4('0x61')];if(this['voiceQueues'][_0x2a6878[_0x54b4('0x5f')]][_0x54b4('0x30')]!==_[_0x54b4('0x62')](_0x2a6878[_0x54b4('0x61')])||this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]][_0x54b4('0x63')]!==_[_0x54b4('0x62')](_0x2a6878[_0x54b4('0x64')])||this['voiceQueues'][_0x2a6878[_0x54b4('0x5f')]]['available']!==_[_0x54b4('0x62')](_0x2a6878[_0x54b4('0x4c')])||this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]][_0x54b4('0x51')]!==_0x4c5944){this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]][_0x54b4('0x30')]=_['toNumber'](_0x2a6878[_0x54b4('0x61')]);this[_0x54b4('0x11')][_0x2a6878['queue']][_0x54b4('0x63')]=_['toNumber'](_0x2a6878[_0x54b4('0x64')]);this['voiceQueues'][_0x2a6878[_0x54b4('0x5f')]][_0x54b4('0x4c')]=_['toNumber'](_0x2a6878[_0x54b4('0x4c')]);this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]]['talking']=_0x4c5944>0x0?_0x4c5944:0x0;this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]][_0x54b4('0x51')]=this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]]['talking']>_[_0x54b4('0x62')](_0x2a6878['loggedin'])?_[_0x54b4('0x62')](_0x2a6878[_0x54b4('0x64')]):this[_0x54b4('0x11')][_0x2a6878[_0x54b4('0x5f')]][_0x54b4('0x51')];this[_0x54b4('0x65')](this['voiceQueues'][_0x2a6878[_0x54b4('0x5f')]]);}ami[_0x54b4('0x41')]('custom:queuesummary',this[_0x54b4('0x11')][_0x2a6878['queue']]);}}}catch(_0x36b55f){logger[_0x54b4('0x38')]('[syncQueueSummary][VoiceQueueReport]',util[_0x54b4('0x40')](_0x36b55f,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x54b4('0x66')]=function(_0x3dccf3){this[_0x54b4('0x5b')]=!![];};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x67')]=function(_0x2b81cd){};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x68')]=function(_0x92d548){try{if(this[_0x54b4('0x5e')](_0x92d548)){if(_[_0x54b4('0x2c')](this['queueReports'][_0x92d548[_0x54b4('0x69')]])){this[_0x54b4('0xd')][_0x92d548['uniqueid']]=[];this[_0x54b4('0xf')][_0x92d548[_0x54b4('0x69')]]={};}var _0x18c346=new QueueReport();_0x18c346[_0x54b4('0x45')]=_0x92d548['queue'];_0x18c346[_0x54b4('0x49')]=this[_0x54b4('0x11')][_0x18c346[_0x54b4('0x45')]]&&this[_0x54b4('0x11')][_0x18c346['name']][_0x54b4('0x49')]?this[_0x54b4('0x11')][_0x18c346[_0x54b4('0x45')]]['type']||_0x54b4('0x4a'):_0x54b4('0x4a');_0x18c346[_0x54b4('0x5f')]=_0x92d548[_0x54b4('0x5f')];_0x18c346['queuecallerjoinAt']=moment()['format'](_0x54b4('0x6a'));_0x18c346[_0x54b4('0x6b')]=_0x92d548[_0x54b4('0x6b')];_0x18c346[_0x54b4('0x6c')]=_0x92d548[_0x54b4('0x6c')];_[_0x54b4('0x6d')](_0x18c346,_['pick'](_0x92d548,_[_0x54b4('0x6e')](_0x18c346)));this['queueReports'][_0x92d548[_0x54b4('0x69')]][_0x54b4('0x6f')](_0x18c346);this['channels'][_0x92d548[_0x54b4('0x69')]]=_0x18c346;this[_0x54b4('0x42')](_0x18c346);}}catch(_0x442a13){logger[_0x54b4('0x38')](_0x54b4('0x70'),util[_0x54b4('0x40')](_0x442a13,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x54b4('0x18')]=function(_0x2d1823){try{if(this[_0x54b4('0x5e')](_0x2d1823)){if(this['queueReports'][_0x2d1823[_0x54b4('0x69')]]){var _0x5b716e=_[_0x54b4('0x71')](this['queueReports'][_0x2d1823['uniqueid']]);_0x5b716e[_0x54b4('0x72')]=![];_0x5b716e['queuecallercompleteAt']=null;_0x5b716e[_0x54b4('0x73')]=_0x2d1823[_0x54b4('0x73')];_0x5b716e[_0x54b4('0x74')]=_0x2d1823[_0x54b4('0x74')];_0x5b716e[_0x54b4('0x75')]=!![];_0x5b716e['queuecallerabandonAt']=moment()[_0x54b4('0x43')](_0x54b4('0x6a'));_0x5b716e[_0x54b4('0x76')]=_0x54b4('0x77');_0x5b716e[_0x54b4('0x78')]=null;this[_0x54b4('0xf')][_0x2d1823['uniqueid']]=_0x5b716e;this['emitVoiceQueueChannelRemove'](_0x5b716e);}}}catch(_0x2f6e42){logger['error'](_0x54b4('0x79'),util[_0x54b4('0x40')](_0x2f6e42,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x1a')]=function(_0x153ddb){try{if(this[_0x54b4('0x5e')](_0x153ddb)){if(this[_0x54b4('0xd')][_0x153ddb[_0x54b4('0x69')]]){var _0x8bc66=_[_0x54b4('0x71')](this[_0x54b4('0xd')][_0x153ddb['uniqueid']]);_0x8bc66[_0x54b4('0x7a')]=moment()[_0x54b4('0x43')](_0x54b4('0x6a'));_0x8bc66[_0x54b4('0x7b')]=_0x153ddb[_0x54b4('0x7b')];_0x8bc66[_0x54b4('0x7c')]=_0x153ddb[_0x54b4('0x7c')];this[_0x54b4('0xf')][_0x153ddb['uniqueid']]=_0x8bc66;this['emitVoiceQueueChannelSave'](_0x8bc66);}}}catch(_0x4d6f1c){logger[_0x54b4('0x38')](_0x54b4('0x7d'),util[_0x54b4('0x40')](_0x4d6f1c,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x1e')]=function(_0x2c9be1){try{if(this[_0x54b4('0x5e')](_0x2c9be1)){if(this[_0x54b4('0xd')][_0x2c9be1[_0x54b4('0x69')]]){var _0x3a480b=_[_0x54b4('0x71')](this[_0x54b4('0xd')][_0x2c9be1['uniqueid']]);_0x3a480b[_0x54b4('0x72')]=!![];_0x3a480b[_0x54b4('0x76')]=_0x54b4('0x7e');}}}catch(_0x432621){logger[_0x54b4('0x38')](_0x54b4('0x7f'),util[_0x54b4('0x40')](_0x432621,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x54b4('0x3c')][_0x54b4('0x1c')]=function(_0x532f41){try{if(this[_0x54b4('0x5e')](_0x532f41)){if(this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x69')]]){var _0x330dcf=_[_0x54b4('0x71')](this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x69')]]);_0x330dcf[_0x54b4('0x75')]=![];_0x330dcf['queuecallerabandonAt']=null;_0x330dcf[_0x54b4('0x80')]=!![];_0x330dcf['lastAssignedTo']=_0x532f41['membername'];_0x330dcf[_0x54b4('0x73')]=_0x532f41[_0x54b4('0x73')];_0x330dcf[_0x54b4('0x72')]=!![];_0x330dcf['queuecallerexit']=![];_0x330dcf['queuecallerexitAt']=null;if(!_0x330dcf[_0x54b4('0x81')]){if(_0x532f41[_0x54b4('0x82')]==_0x54b4('0x81')){_0x330dcf['queuecallerexitreason']=_0x54b4('0x83');}else{if(_[_0x54b4('0x84')](_0x532f41[_0x54b4('0x85')]['toLowerCase'](),_0x54b4('0x86'))){if(this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x87')]]){var _0x1533b2=_[_0x54b4('0x71')](this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x87')]]);_0x1533b2[_0x54b4('0x72')]=![];_0x1533b2[_0x54b4('0x88')]=!![];_0x1533b2[_0x54b4('0x89')]=moment(_0x330dcf[_0x54b4('0x8a')])[_0x54b4('0x8b')](_0x532f41[_0x54b4('0x73')],_0x54b4('0x8c'))[_0x54b4('0x43')](_0x54b4('0x6a'));_0x1533b2[_0x54b4('0x76')]=_0x54b4('0x8d');_0x1533b2[_0x54b4('0x81')]=!![];_0x1533b2[_0x54b4('0x8e')]=_0x54b4('0x8f');_0x1533b2['transferexten']=_0x532f41['destexten'];_0x1533b2[_0x54b4('0x90')]=_0x532f41['uniqueid'];var _0x2946dc=this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x87')]];this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x87')]]=this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x69')]];this[_0x54b4('0xd')][_0x532f41[_0x54b4('0x69')]]=_0x2946dc;}}else{_0x330dcf['queuecallerexitreason']=_0x54b4('0x91')+_0x532f41[_0x54b4('0x82')][_0x54b4('0x92')]();}}}this['channels'][_0x532f41[_0x54b4('0x69')]]=_0x330dcf;this[_0x54b4('0x3f')](_0x330dcf);}}}catch(_0x52123b){logger[_0x54b4('0x38')](_0x54b4('0x93'),util[_0x54b4('0x40')](_0x52123b,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x54b4('0x3c')]['syncVarSet']=function(_0x1c26a2){try{if(this[_0x54b4('0x5e')](_0x1c26a2)){this[_0x54b4('0x94')](_0x1c26a2[_0x54b4('0x69')],_['keys'](_0x1c26a2['variable'])[0x0],_0x1c26a2[_0x54b4('0x95')]);if(this['queueReports'][_0x1c26a2[_0x54b4('0x69')]]){var _0x350f6f=_[_0x54b4('0x71')](this[_0x54b4('0xd')][_0x1c26a2['uniqueid']]);if(_0x350f6f){if(this[_0x54b4('0x5e')](_0x1c26a2[_0x54b4('0x96')])&&this[_0x54b4('0x5e')](_0x1c26a2['variable'][_0x54b4('0x97')])){switch(_0x1c26a2[_0x54b4('0x95')]){case _0x54b4('0x98'):_0x350f6f[_0x54b4('0x88')]=![];_0x350f6f['queuecallerexitAt']=null;break;default:_0x350f6f[_0x54b4('0x88')]=!![];_0x350f6f[_0x54b4('0x89')]=moment()[_0x54b4('0x43')](_0x54b4('0x6a'));_0x350f6f[_0x54b4('0x7a')]=moment()[_0x54b4('0x43')](_0x54b4('0x6a'));}_0x350f6f[_0x54b4('0x75')]=![];_0x350f6f[_0x54b4('0x99')]=null;_0x350f6f['queuecallerexitreason']=_0x1c26a2['value'];this[_0x54b4('0xf')][_0x1c26a2['uniqueid']]=_0x350f6f;this['emitVoiceQueueChannelRemove'](_0x350f6f);}else if(this[_0x54b4('0x5e')](_0x1c26a2['variable'])&&this[_0x54b4('0x5e')](_0x1c26a2[_0x54b4('0x96')]['queueposition'])){if(!_0x350f6f['queuecallerabandon']){_0x350f6f[_0x54b4('0x88')]=!![];_0x350f6f['queuecallerexitAt']=moment()[_0x54b4('0x43')]('YYYY-MM-DD\x20HH:mm:ss');_0x350f6f[_0x54b4('0x76')]=_0x54b4('0x9a');_0x350f6f['queuecallerleaveAt']=moment()['format'](_0x54b4('0x6a'));this[_0x54b4('0xf')][_0x1c26a2['uniqueid']]=_0x350f6f;}}_0x350f6f[_0x54b4('0x13')]=this[_0x54b4('0x13')][_0x1c26a2[_0x54b4('0x69')]];}}}}catch(_0x4a9194){logger['error'](_0x54b4('0x9b'),util[_0x54b4('0x40')](_0x4a9194,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x54b4('0x3c')]['addVariable']=function(_0xad8e5f,_0x577469,_0x5df6a4){var _0x4e1f8d=[_0x54b4('0x9c'),_0x54b4('0x9d'),_0x54b4('0x9e'),_0x54b4('0x9f'),_0x54b4('0xa0'),_0x54b4('0xa1'),_0x54b4('0xa2'),_0x54b4('0xa3'),_0x54b4('0xa4'),_0x54b4('0xa5'),_0x54b4('0xa6'),_0x54b4('0xa7'),_0x54b4('0xa8'),_0x54b4('0xa9'),_0x54b4('0xaa'),_0x54b4('0xab'),_0x54b4('0xac'),_0x54b4('0xad'),_0x54b4('0xae')];if(!_[_0x54b4('0x35')](_0x577469)&&!_['includes'](_0x4e1f8d,_0x577469)){if(_[_0x54b4('0x2c')](this[_0x54b4('0x13')][_0xad8e5f])){this[_0x54b4('0x13')][_0xad8e5f]={};}this[_0x54b4('0x13')][_0xad8e5f][_0x577469]=_0x5df6a4;}};VoiceQueueReport[_0x54b4('0x3c')]['syncHangup']=function(_0x25429f){try{if(this[_0x54b4('0x5e')](_0x25429f)){if(this[_0x54b4('0xd')][_0x25429f['uniqueid']]){for(var _0x41445f=0x0,_0x298c57={};_0x41445f0x0?_0x5c5da2:0x0;this['voiceQueues'][_0x5c7efa[_0xc003('0x5f')]]['talking']=this[_0xc003('0x12')][_0x5c7efa[_0xc003('0x5f')]][_0xc003('0x64')]>_[_0xc003('0x61')](_0x5c7efa[_0xc003('0x63')])?_[_0xc003('0x61')](_0x5c7efa[_0xc003('0x63')]):this[_0xc003('0x12')][_0x5c7efa[_0xc003('0x5f')]][_0xc003('0x64')];this[_0xc003('0x4c')](this[_0xc003('0x12')][_0x5c7efa[_0xc003('0x5f')]]);}ami[_0xc003('0x45')](_0xc003('0x65'),this['voiceQueues'][_0x5c7efa['queue']]);}}}catch(_0x5a86a8){logger[_0xc003('0x3c')](_0xc003('0x66'),util[_0xc003('0x44')](_0x5a86a8,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc003('0xb')][_0xc003('0x17')]=function(_0x58e04f){this[_0xc003('0x13')]=!![];};VoiceQueueReport[_0xc003('0xb')][_0xc003('0x67')]=function(_0x500154){};VoiceQueueReport['prototype']['syncQueueCallerJoin']=function(_0x2b7819){try{if(this[_0xc003('0x59')](_0x2b7819)){if(_['isUndefined'](this['queueReports'][_0x2b7819[_0xc003('0x68')]])){this[_0xc003('0xf')][_0x2b7819['uniqueid']]=[];this[_0xc003('0x33')][_0x2b7819[_0xc003('0x68')]]={};}var _0x38fde2=new QueueReport();_0x38fde2[_0xc003('0x49')]=_0x2b7819[_0xc003('0x5f')];_0x38fde2[_0xc003('0x4d')]=this['voiceQueues'][_0x38fde2[_0xc003('0x49')]]&&this[_0xc003('0x12')][_0x38fde2[_0xc003('0x49')]]['type']?this[_0xc003('0x12')][_0x38fde2[_0xc003('0x49')]][_0xc003('0x4d')]||'inbound':_0xc003('0x4e');_0x38fde2['queue']=_0x2b7819[_0xc003('0x5f')];_0x38fde2[_0xc003('0x69')]=moment()[_0xc003('0x47')](_0xc003('0x6a'));_0x38fde2[_0xc003('0x6b')]=_0x2b7819['position'];_0x38fde2[_0xc003('0x6c')]=_0x2b7819[_0xc003('0x6c')];_['merge'](_0x38fde2,_[_0xc003('0x6d')](_0x2b7819,_['keys'](_0x38fde2)));this[_0xc003('0xf')][_0x2b7819[_0xc003('0x68')]][_0xc003('0x6e')](_0x38fde2);this[_0xc003('0x33')][_0x2b7819[_0xc003('0x68')]]=_0x38fde2;this[_0xc003('0x46')](_0x38fde2);}}catch(_0x3049d9){logger['error'](_0xc003('0x6f'),util[_0xc003('0x44')](_0x3049d9,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc003('0xb')][_0xc003('0x1b')]=function(_0x18b970){try{if(this['isNotNull'](_0x18b970)){if(this[_0xc003('0xf')][_0x18b970[_0xc003('0x68')]]){var _0x180dba=_[_0xc003('0x70')](this['queueReports'][_0x18b970[_0xc003('0x68')]]);_0x180dba[_0xc003('0x71')]=![];_0x180dba[_0xc003('0x72')]=null;_0x180dba[_0xc003('0x73')]=_0x18b970[_0xc003('0x73')];_0x180dba[_0xc003('0x74')]=_0x18b970['originalposition'];_0x180dba[_0xc003('0x1a')]=!![];_0x180dba[_0xc003('0x75')]=moment()[_0xc003('0x47')](_0xc003('0x6a'));_0x180dba[_0xc003('0x76')]=_0xc003('0x77');_0x180dba['lastAssignedTo']=null;this['channels'][_0x18b970['uniqueid']]=_0x180dba;this[_0xc003('0x43')](_0x180dba);}}}catch(_0x4b214e){logger['error'](_0xc003('0x78'),util[_0xc003('0x44')](_0x4b214e,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncQueueCallerLeave']=function(_0x5a6704){try{if(this[_0xc003('0x59')](_0x5a6704)){if(this['queueReports'][_0x5a6704[_0xc003('0x68')]]){var _0x57a57b=_[_0xc003('0x70')](this['queueReports'][_0x5a6704['uniqueid']]);_0x57a57b['queuecallerleaveAt']=moment()[_0xc003('0x47')](_0xc003('0x6a'));_0x57a57b[_0xc003('0x79')]=_0x5a6704[_0xc003('0x79')];_0x57a57b['connectedlinename']=_0x5a6704['connectedlinename'];this[_0xc003('0x33')][_0x5a6704[_0xc003('0x68')]]=_0x57a57b;this[_0xc003('0x46')](_0x57a57b);}}}catch(_0x171882){logger[_0xc003('0x3c')](_0xc003('0x7a'),util[_0xc003('0x44')](_0x171882,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc003('0xb')][_0xc003('0x7b')]=function(_0x285cf8){try{if(this['isNotNull'](_0x285cf8)){if(this[_0xc003('0xf')][_0x285cf8[_0xc003('0x68')]]){var _0x39a236=_[_0xc003('0x70')](this[_0xc003('0xf')][_0x285cf8[_0xc003('0x68')]]);_0x39a236[_0xc003('0x71')]=!![];_0x39a236[_0xc003('0x76')]=_0xc003('0x7c');}}}catch(_0x43d8d3){logger['error']('[syncAgentConnect][VoiceQueueReport]',util[_0xc003('0x44')](_0x43d8d3,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc003('0xb')][_0xc003('0x1e')]=function(_0x32a9a6){try{if(this[_0xc003('0x59')](_0x32a9a6)){if(this[_0xc003('0xf')][_0x32a9a6['uniqueid']]){var _0x122c49=_[_0xc003('0x70')](this['queueReports'][_0x32a9a6['uniqueid']]);_0x122c49['queuecallerabandon']=![];_0x122c49[_0xc003('0x75')]=null;_0x122c49[_0xc003('0x7d')]=!![];_0x122c49['lastAssignedTo']=_0x32a9a6['membername'];_0x122c49['holdtime']=_0x32a9a6['holdtime'];_0x122c49[_0xc003('0x71')]=!![];_0x122c49[_0xc003('0x7e')]=![];_0x122c49['queuecallerexitAt']=null;if(!_0x122c49[_0xc003('0x7f')]){if(_0x32a9a6[_0xc003('0x80')]=='transfer'){_0x122c49[_0xc003('0x76')]='COMPLETED';}else{if(_[_0xc003('0x81')](_0x32a9a6[_0xc003('0x82')]['toLowerCase'](),_0xc003('0x83'))){if(this[_0xc003('0xf')][_0x32a9a6['linkedid']]){var _0x5551e4=_[_0xc003('0x70')](this[_0xc003('0xf')][_0x32a9a6[_0xc003('0x84')]]);_0x5551e4['queuecallercomplete']=![];_0x5551e4[_0xc003('0x7e')]=!![];_0x5551e4[_0xc003('0x85')]=moment(_0x122c49[_0xc003('0x69')])[_0xc003('0x86')](_0x32a9a6['holdtime'],_0xc003('0x87'))[_0xc003('0x47')]('YYYY-MM-DD\x20HH:mm:ss');_0x5551e4[_0xc003('0x76')]=_0xc003('0x88');_0x5551e4[_0xc003('0x7f')]=!![];_0x5551e4['transfertype']=_0xc003('0x89');_0x5551e4['transferexten']=_0x32a9a6[_0xc003('0x8a')];_0x5551e4[_0xc003('0x8b')]=_0x32a9a6[_0xc003('0x68')];var _0x492c89=this[_0xc003('0xf')][_0x32a9a6['linkedid']];this['queueReports'][_0x32a9a6[_0xc003('0x84')]]=this[_0xc003('0xf')][_0x32a9a6[_0xc003('0x68')]];this['queueReports'][_0x32a9a6[_0xc003('0x68')]]=_0x492c89;}}else{_0x122c49['queuecallerexitreason']=_0xc003('0x8c')+_0x32a9a6[_0xc003('0x80')][_0xc003('0x8d')]();}}}this[_0xc003('0x33')][_0x32a9a6[_0xc003('0x68')]]=_0x122c49;this['emitVoiceQueueChannelRemove'](_0x122c49);}}}catch(_0x5ab937){logger[_0xc003('0x3c')](_0xc003('0x8e'),util[_0xc003('0x44')](_0x5ab937,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xc003('0x21')]=function(_0x703036){try{if(this[_0xc003('0x59')](_0x703036)){this[_0xc003('0x8f')](_0x703036['uniqueid'],_[_0xc003('0x90')](_0x703036[_0xc003('0x91')])[0x0],_0x703036[_0xc003('0x92')]);if(this[_0xc003('0xf')][_0x703036[_0xc003('0x68')]]){var _0x30f8bc=_[_0xc003('0x70')](this[_0xc003('0xf')][_0x703036[_0xc003('0x68')]]);if(_0x30f8bc){if(this[_0xc003('0x59')](_0x703036[_0xc003('0x91')])&&this[_0xc003('0x59')](_0x703036[_0xc003('0x91')][_0xc003('0x93')])){switch(_0x703036['value']){case'CONTINUE':_0x30f8bc[_0xc003('0x7e')]=![];_0x30f8bc[_0xc003('0x85')]=null;break;default:_0x30f8bc[_0xc003('0x7e')]=!![];_0x30f8bc[_0xc003('0x85')]=moment()['format'](_0xc003('0x6a'));_0x30f8bc[_0xc003('0x94')]=moment()[_0xc003('0x47')]('YYYY-MM-DD\x20HH:mm:ss');}_0x30f8bc[_0xc003('0x1a')]=![];_0x30f8bc[_0xc003('0x75')]=null;_0x30f8bc[_0xc003('0x76')]=_0x703036[_0xc003('0x92')];this[_0xc003('0x33')][_0x703036[_0xc003('0x68')]]=_0x30f8bc;this[_0xc003('0x43')](_0x30f8bc);}else if(this[_0xc003('0x59')](_0x703036[_0xc003('0x91')])&&this[_0xc003('0x59')](_0x703036[_0xc003('0x91')][_0xc003('0x95')])){if(!_0x30f8bc[_0xc003('0x1a')]){_0x30f8bc[_0xc003('0x7e')]=!![];_0x30f8bc['queuecallerexitAt']=moment()['format'](_0xc003('0x6a'));_0x30f8bc[_0xc003('0x76')]='EXITWITHKEY';_0x30f8bc[_0xc003('0x94')]=moment()[_0xc003('0x47')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x703036[_0xc003('0x68')]]=_0x30f8bc;}}_0x30f8bc[_0xc003('0x3f')]=this[_0xc003('0x3f')][_0x703036[_0xc003('0x68')]];}}}}catch(_0x1b1d7d){logger['error'](_0xc003('0x96'),util[_0xc003('0x44')](_0x1b1d7d,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xc003('0x8f')]=function(_0x31acde,_0x498f7e,_0x3d505d){var _0x27c079=['rtpaudioqos',_0xc003('0x97'),_0xc003('0x98'),_0xc003('0x99'),_0xc003('0x9a'),_0xc003('0x9b'),_0xc003('0x9c'),_0xc003('0x9d'),'sipcallid','sipuri',_0xc003('0x9e'),_0xc003('0x9f'),_0xc003('0xa0'),_0xc003('0xa1'),_0xc003('0xa2'),_0xc003('0xa3'),_0xc003('0xa4'),_0xc003('0xa5'),_0xc003('0xa6')];if(!_[_0xc003('0x36')](_0x498f7e)&&!_[_0xc003('0xa7')](_0x27c079,_0x498f7e)){if(_[_0xc003('0x5a')](this['variables'][_0x31acde])){this['variables'][_0x31acde]={};}this['variables'][_0x31acde][_0x498f7e]=_0x3d505d;}};VoiceQueueReport[_0xc003('0xb')][_0xc003('0x23')]=function(_0x76a74a){try{if(this[_0xc003('0x59')](_0x76a74a)){if(this[_0xc003('0xf')][_0x76a74a[_0xc003('0x68')]]){for(var _0x1275df=0x0,_0x2be040={};_0x1275df=0x0?moment(_0x3ebb61[_0x9de9('0x18')])[_0x9de9('0xe')](_0x3ebb61[_0x9de9('0x1a')],_0x9de9('0x19')):null,'data1':_0x9de9('0x1b'),'data2':_0x3ebb61[_0x9de9('0x13')],'data3':_0x3ebb61[_0x9de9('0x10')],'data4':_0x3ebb61[_0x9de9('0x1c')]||null,'role':_0x9de9('0x12'),'internal':_0x3ebb61[_0x9de9('0x13')]?_[_0x9de9('0x14')](_0x3ebb61[_0x9de9('0x13')]):undefined,'uniqueid':_0x3ebb61[_0x9de9('0x15')]},'log':_0x9de9('0x16')});};
\ No newline at end of file
+var _0x37e1=['SIP/%s','TALKING','queuecallerleaveAt','seconds','calleridnum','queue','agent','accountcode','toNumber','uniqueid','voiceDialReport','Request','starttime','endtime','diff','outbound','exten','dialstring','moment','lodash','util','../client','queuecallercompleteAt','CreateMemberReport','lastAssignedTo','isNil','interface','format'];(function(_0x4d147f,_0xcd7687){var _0x5eeb49=function(_0x5884b7){while(--_0x5884b7){_0x4d147f['push'](_0x4d147f['shift']());}};_0x5eeb49(++_0xcd7687);}(_0x37e1,0xba));var _0x137e=function(_0x49f832,_0x34a465){_0x49f832=_0x49f832-0x0;var _0x438681=_0x37e1[_0x49f832];return _0x438681;};'use strict';var moment=require(_0x137e('0x0'));var _=require(_0x137e('0x1'));var util=require(_0x137e('0x2'));var client=require(_0x137e('0x3'));exports['voiceQueueReport']=function(_0x1cd1ca){var _0x2a3c65=_0x1cd1ca[_0x137e('0x4')]||_0x1cd1ca['queuecallerexitAt'];return client['Request'](_0x137e('0x5'),{'body':{'channel':'voice','membername':_0x1cd1ca[_0x137e('0x6')],'interface':_[_0x137e('0x7')](_0x1cd1ca[_0x137e('0x8')])?util[_0x137e('0x9')](_0x137e('0xa'),_0x1cd1ca[_0x137e('0x6')]):_0x1cd1ca[_0x137e('0x8')],'type':_0x137e('0xb'),'enterAt':_0x1cd1ca[_0x137e('0xc')],'exitAt':_0x2a3c65,'duration':moment(_0x2a3c65)['diff'](_0x1cd1ca[_0x137e('0xc')],_0x137e('0xd')),'data1':'inbound','data2':_0x1cd1ca[_0x137e('0xe')],'data3':_0x1cd1ca['exten'],'data4':null,'data5':_0x1cd1ca[_0x137e('0xf')],'role':_0x137e('0x10'),'internal':_0x1cd1ca[_0x137e('0x11')]?_[_0x137e('0x12')](_0x1cd1ca[_0x137e('0x11')]):undefined,'uniqueid':_0x1cd1ca[_0x137e('0x13')]},'log':_0x137e('0x5')});};exports[_0x137e('0x14')]=function(_0x3c4f21){return client[_0x137e('0x15')](_0x137e('0x5'),{'body':{'channel':'voice','membername':_0x3c4f21['membername'],'interface':_0x3c4f21[_0x137e('0x8')],'type':_0x137e('0xb'),'enterAt':_0x3c4f21[_0x137e('0x16')],'exitAt':_0x3c4f21['endtime'],'duration':moment(_0x3c4f21[_0x137e('0x17')])[_0x137e('0x18')](_0x3c4f21[_0x137e('0x16')],_0x137e('0xd'))>=0x0?moment(_0x3c4f21[_0x137e('0x17')])[_0x137e('0x18')](_0x3c4f21[_0x137e('0x16')],_0x137e('0xd')):null,'data1':_0x137e('0x19'),'data2':_0x3c4f21[_0x137e('0x11')],'data3':_0x3c4f21[_0x137e('0x1a')],'data4':_0x3c4f21[_0x137e('0x1b')]||null,'role':'agent','internal':_0x3c4f21[_0x137e('0x11')]?_[_0x137e('0x12')](_0x3c4f21[_0x137e('0x11')]):undefined,'uniqueid':_0x3c4f21['uniqueid']},'log':_0x137e('0x5')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/template.js b/server/services/ami/rpc/template.js
index 496c8ea..842adce 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 _0xbdb7=['name','html','../client','getTemplates','Request','GetTemplate'];(function(_0x550428,_0x2fc7a8){var _0x13df59=function(_0xbfb091){while(--_0xbfb091){_0x550428['push'](_0x550428['shift']());}};_0x13df59(++_0x2fc7a8);}(_0xbdb7,0x12e));var _0x7bdb=function(_0x3642e7,_0x16358e){_0x3642e7=_0x3642e7-0x0;var _0x31e3dd=_0xbdb7[_0x3642e7];return _0x31e3dd;};'use strict';var client=require(_0x7bdb('0x0'));exports[_0x7bdb('0x1')]=function(_0x44467d){return function(_0x2a2c1c){return client[_0x7bdb('0x2')](_0x7bdb('0x3'),{'options':{'raw':!![],'attributes':['id',_0x7bdb('0x4'),_0x7bdb('0x5')]},'log':_0x7bdb('0x3')});};};
\ No newline at end of file
+var _0x7d98=['Request','GetTemplate','html','../client'];(function(_0x4adebe,_0x8b39c0){var _0x4e4b7e=function(_0x3e7d5b){while(--_0x3e7d5b){_0x4adebe['push'](_0x4adebe['shift']());}};_0x4e4b7e(++_0x8b39c0);}(_0x7d98,0xe7));var _0x87d9=function(_0x2db667,_0x193cf5){_0x2db667=_0x2db667-0x0;var _0x83ff9=_0x7d98[_0x2db667];return _0x83ff9;};'use strict';var client=require(_0x87d9('0x0'));exports['getTemplates']=function(_0x450298){return function(_0x11bc33){return client[_0x87d9('0x1')](_0x87d9('0x2'),{'options':{'raw':!![],'attributes':['id','name',_0x87d9('0x3')]},'log':_0x87d9('0x2')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/trigger.js b/server/services/ami/rpc/trigger.js
index 15d3cc4..d91ad7d 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 _0xf887=['getTriggers','GetTrigger','name','channel','status','Condition','field','operator','value','Action','Actions','data1','data2','data4','data5','data6','data7','../client'];(function(_0xf8192c,_0x48a106){var _0x574694=function(_0x41b0bb){while(--_0x41b0bb){_0xf8192c['push'](_0xf8192c['shift']());}};_0x574694(++_0x48a106);}(_0xf887,0xb3));var _0x7f88=function(_0x5ec7f2,_0x23179b){_0x5ec7f2=_0x5ec7f2-0x0;var _0x26994b=_0xf887[_0x5ec7f2];return _0x26994b;};'use strict';var client=require(_0x7f88('0x0'));exports[_0x7f88('0x1')]=function(_0x175032){return function(_0x898165){return client['Request'](_0x7f88('0x2'),{'options':{'raw':![],'attributes':['id',_0x7f88('0x3'),_0x7f88('0x4'),_0x7f88('0x5')],'include':[{'model':_0x7f88('0x6'),'as':'AllConditions','attributes':['id',_0x7f88('0x7'),_0x7f88('0x8'),_0x7f88('0x9')]},{'model':_0x7f88('0x6'),'as':'AnyConditions','attributes':['id',_0x7f88('0x7'),'operator',_0x7f88('0x9')]},{'model':_0x7f88('0xa'),'as':_0x7f88('0xb'),'attributes':['id','action',_0x7f88('0xc'),_0x7f88('0xd'),'data3',_0x7f88('0xe'),_0x7f88('0xf'),_0x7f88('0x10'),_0x7f88('0x11')]}]},'log':'GetTrigger'});};};
\ No newline at end of file
+var _0x6d33=['data1','data2','data4','data6','data7','../client','getTriggers','Request','GetTrigger','status','AllConditions','operator','value','Condition','Action','Actions','action'];(function(_0x59a156,_0x225efd){var _0x71b27=function(_0x4544fc){while(--_0x4544fc){_0x59a156['push'](_0x59a156['shift']());}};_0x71b27(++_0x225efd);}(_0x6d33,0x1bf));var _0x36d3=function(_0x631a3c,_0x1b61b6){_0x631a3c=_0x631a3c-0x0;var _0x2bdfa3=_0x6d33[_0x631a3c];return _0x2bdfa3;};'use strict';var client=require(_0x36d3('0x0'));exports[_0x36d3('0x1')]=function(_0x2c6077){return function(_0x3ed980){return client[_0x36d3('0x2')](_0x36d3('0x3'),{'options':{'raw':![],'attributes':['id','name','channel',_0x36d3('0x4')],'include':[{'model':'Condition','as':_0x36d3('0x5'),'attributes':['id','field',_0x36d3('0x6'),_0x36d3('0x7')]},{'model':_0x36d3('0x8'),'as':'AnyConditions','attributes':['id','field',_0x36d3('0x6'),_0x36d3('0x7')]},{'model':_0x36d3('0x9'),'as':_0x36d3('0xa'),'attributes':['id',_0x36d3('0xb'),_0x36d3('0xc'),_0x36d3('0xd'),'data3',_0x36d3('0xe'),'data5',_0x36d3('0xf'),_0x36d3('0x10')]}]},'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 716949a..ec40801 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 _0xdda4=['../client','Request','GetTrunk','name'];(function(_0x4c8779,_0x399ca4){var _0x55a207=function(_0x5323f5){while(--_0x5323f5){_0x4c8779['push'](_0x4c8779['shift']());}};_0x55a207(++_0x399ca4);}(_0xdda4,0xcc));var _0x4dda=function(_0x483ab9,_0x419148){_0x483ab9=_0x483ab9-0x0;var _0x35043b=_0xdda4[_0x483ab9];return _0x35043b;};'use strict';var client=require(_0x4dda('0x0'));exports['getTrunks']=function(_0x22910f){return function(_0x21a085){return client[_0x4dda('0x1')](_0x4dda('0x2'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0x4dda('0x3'),'registry']},'log':'GetTrunk'});};};
\ No newline at end of file
+var _0xa65e=['getTrunks','Request','GetTrunk','registry','../client'];(function(_0x5386e5,_0x15d8f1){var _0x123e7f=function(_0x47a8b4){while(--_0x47a8b4){_0x5386e5['push'](_0x5386e5['shift']());}};_0x123e7f(++_0x15d8f1);}(_0xa65e,0x11c));var _0xea65=function(_0x53758c,_0x5664af){_0x53758c=_0x53758c-0x0;var _0x425eff=_0xa65e[_0x53758c];return _0x425eff;};'use strict';var client=require(_0xea65('0x0'));exports[_0xea65('0x1')]=function(_0x53664e){return function(_0x29a03f){return client[_0xea65('0x2')](_0xea65('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id','name',_0xea65('0x4')]},'log':_0xea65('0x3')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/user.js b/server/services/ami/rpc/user.js
index a17025a..a07d45b 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 _0x3491=['accountcode','online','lastLoginAt','pauseType','lastPauseAt','voicePause','phone','mobile','interface','getTelephones','telephone','name','savePause','PauseUser','UnpauseUser','getAgent','fullname','../client','Request','GetUser','agent','email'];(function(_0x4e4921,_0xf8a1f1){var _0x41b458=function(_0x552578){while(--_0x552578){_0x4e4921['push'](_0x4e4921['shift']());}};_0x41b458(++_0xf8a1f1);}(_0x3491,0x1df));var _0x1349=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x3491[_0x502c7d];return _0x30b7ed;};'use strict';var client=require(_0x1349('0x0'));exports['getAgents']=function(){return function(){return client[_0x1349('0x1')](_0x1349('0x2'),{'options':{'raw':![],'where':{'role':_0x1349('0x3')},'attributes':['id','name',_0x1349('0x4'),_0x1349('0x5'),'fullname',_0x1349('0x6'),_0x1349('0x7'),_0x1349('0x8'),_0x1349('0x9'),_0x1349('0xa'),_0x1349('0xb'),_0x1349('0xc'),_0x1349('0xd')]},'log':'getAgents'});};};exports[_0x1349('0xe')]=function(){return function(){return client[_0x1349('0x1')]('GetUser',{'options':{'raw':!![],'where':{'role':_0x1349('0xf')},'attributes':['id',_0x1349('0x10'),'accountcode','internal']},'log':_0x1349('0xe')});};};exports[_0x1349('0x11')]=function(_0x288d15,_0x13c794,_0x409f52){return client[_0x1349('0x1')](_0x1349('0x12'),{'body':{'type':_0x13c794,'uniqueid':_0x409f52},'options':{'where':{'id':_0x288d15['id']}},'log':_0x1349('0x11')});};exports['saveUnpause']=function(_0x417c4a){return client['Request'](_0x1349('0x13'),{'body':{},'options':{'where':{'id':_0x417c4a['id']}},'log':_0x1349('0x11')});};exports[_0x1349('0x14')]=function(_0x47bd03){return client['Request']('ShowUser',{'options':{'raw':![],'where':{'role':'agent','id':_0x47bd03},'attributes':['id',_0x1349('0x10'),_0x1349('0x4'),_0x1349('0x5'),_0x1349('0x15'),_0x1349('0x6'),_0x1349('0x7'),_0x1349('0x8'),_0x1349('0x9'),_0x1349('0xa'),'interface']},'log':_0x1349('0x14')});};
\ No newline at end of file
+var _0x1284=['lastPauseAt','voicePause','mobile','interface','getTelephones','Request','GetUser','savePause','saveUnpause','UnpauseUser','getAgent','ShowUser','getAgents','agent','name','email','accountcode','fullname','online','lastLoginAt','pauseType'];(function(_0x22b39b,_0x2b7d63){var _0x280e1d=function(_0xc74635){while(--_0xc74635){_0x22b39b['push'](_0x22b39b['shift']());}};_0x280e1d(++_0x2b7d63);}(_0x1284,0x147));var _0x4128=function(_0x15ea09,_0x2f30ab){_0x15ea09=_0x15ea09-0x0;var _0x3e9c78=_0x1284[_0x15ea09];return _0x3e9c78;};'use strict';var client=require('../client');exports[_0x4128('0x0')]=function(){return function(){return client['Request']('GetUser',{'options':{'raw':![],'where':{'role':_0x4128('0x1')},'attributes':['id',_0x4128('0x2'),_0x4128('0x3'),_0x4128('0x4'),_0x4128('0x5'),_0x4128('0x6'),_0x4128('0x7'),_0x4128('0x8'),_0x4128('0x9'),_0x4128('0xa'),'phone',_0x4128('0xb'),_0x4128('0xc')]},'log':_0x4128('0x0')});};};exports[_0x4128('0xd')]=function(){return function(){return client[_0x4128('0xe')](_0x4128('0xf'),{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0x4128('0x2'),_0x4128('0x4'),'internal']},'log':_0x4128('0xd')});};};exports[_0x4128('0x10')]=function(_0x118dfe,_0x1372a9,_0x2b1ce3){return client[_0x4128('0xe')]('PauseUser',{'body':{'type':_0x1372a9,'uniqueid':_0x2b1ce3},'options':{'where':{'id':_0x118dfe['id']}},'log':_0x4128('0x10')});};exports[_0x4128('0x11')]=function(_0x4793d6){return client['Request'](_0x4128('0x12'),{'body':{},'options':{'where':{'id':_0x4793d6['id']}},'log':_0x4128('0x10')});};exports[_0x4128('0x13')]=function(_0x4ab873){return client[_0x4128('0xe')](_0x4128('0x14'),{'options':{'raw':![],'where':{'role':_0x4128('0x1'),'id':_0x4ab873},'attributes':['id',_0x4128('0x2'),_0x4128('0x3'),_0x4128('0x4'),_0x4128('0x5'),'online',_0x4128('0x7'),'pauseType',_0x4128('0x9'),'voicePause',_0x4128('0xc')]},'log':_0x4128('0x13')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceAgentReport.js b/server/services/ami/rpc/voiceAgentReport.js
index f5ed3b2..c7cd980 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 _0xe829=['CreateVoiceAgentReport','update','Request','UpdateVoiceAgentReport','../client','create'];(function(_0x20e52f,_0x3107f5){var _0x338748=function(_0x5dea04){while(--_0x5dea04){_0x20e52f['push'](_0x20e52f['shift']());}};_0x338748(++_0x3107f5);}(_0xe829,0x1d8));var _0x9e82=function(_0xd2e2ab,_0x2440cf){_0xd2e2ab=_0xd2e2ab-0x0;var _0x1703a2=_0xe829[_0xd2e2ab];return _0x1703a2;};'use strict';var client=require(_0x9e82('0x0'));exports[_0x9e82('0x1')]=function(_0x221edd){return client['Request']('CreateVoiceAgentReport',{'body':_0x221edd,'log':_0x9e82('0x2')});};exports[_0x9e82('0x3')]=function(_0x1b47d8,_0x168d3e,_0x31591a){return client[_0x9e82('0x4')]('UpdateVoiceAgentReport',{'body':_0x1b47d8,'options':{'where':{'uniqueid':_0x168d3e,'interface':_0x31591a,'agentcomplete':!![]}},'log':_0x9e82('0x5')});};
\ No newline at end of file
+var _0x1b73=['Request','CreateVoiceAgentReport','update','UpdateVoiceAgentReport','create'];(function(_0x45b7a0,_0x3f2eb8){var _0x19f679=function(_0x13305d){while(--_0x13305d){_0x45b7a0['push'](_0x45b7a0['shift']());}};_0x19f679(++_0x3f2eb8);}(_0x1b73,0x1d5));var _0x31b7=function(_0x499b3c,_0x277688){_0x499b3c=_0x499b3c-0x0;var _0x3f00c4=_0x1b73[_0x499b3c];return _0x3f00c4;};'use strict';var client=require('../client');exports[_0x31b7('0x0')]=function(_0x25ee36){return client[_0x31b7('0x1')](_0x31b7('0x2'),{'body':_0x25ee36,'log':'CreateVoiceAgentReport'});};exports[_0x31b7('0x3')]=function(_0x59e606,_0x40fef2,_0x3682cc){return client['Request'](_0x31b7('0x4'),{'body':_0x59e606,'options':{'where':{'uniqueid':_0x40fef2,'interface':_0x3682cc,'agentcomplete':!![]}},'log':_0x31b7('0x4')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceCallReport.js b/server/services/ami/rpc/voiceCallReport.js
index 80bbe23..4d43349 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 _0x5c82=['YYYY-MM-DD\x20HH:mm:ss','endOf','format','type','disposition','duration','GetVoiceCallReports','moment','lodash','../client','create','Request','CreateVoiceCallReport','merge','context','callerid','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day'];(function(_0x1ceafa,_0x252713){var _0x2cb283=function(_0x3b68c9){while(--_0x3b68c9){_0x1ceafa['push'](_0x1ceafa['shift']());}};_0x2cb283(++_0x252713);}(_0x5c82,0xd9));var _0x25c8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5c82[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require(_0x25c8('0x0'));var util=require('util');var _=require(_0x25c8('0x1'));var client=require(_0x25c8('0x2'));exports[_0x25c8('0x3')]=function(_0x54824d){return client[_0x25c8('0x4')](_0x25c8('0x5'),{'body':_[_0x25c8('0x6')](_0x54824d,{'source':_0x54824d['calleridnum'],'destinationcontext':_0x54824d[_0x25c8('0x7')],'callerid':_0x54824d[_0x25c8('0x8')],'amaflags':'DOCUMENTATION'}),'log':'CreateVoiceCallReport'});};exports[_0x25c8('0x9')]=function(){return function(){return client[_0x25c8('0x4')](_0x25c8('0xa'),{'options':{'where':{'type':[_0x25c8('0xb')],'createdAt':{'$between':[moment()[_0x25c8('0xc')](_0x25c8('0xd'))['format'](_0x25c8('0xe')),moment()[_0x25c8('0xf')]('day')[_0x25c8('0x10')](_0x25c8('0xe'))]}},'attributes':[_0x25c8('0x11'),_0x25c8('0x12'),_0x25c8('0x13'),'billableseconds']},'log':_0x25c8('0x14')});};};
\ No newline at end of file
+var _0xa566=['outbound','startOf','day','YYYY-MM-DD\x20HH:mm:ss','endOf','format','type','duration','billableseconds','GetVoiceCallReports','moment','util','create','Request','CreateVoiceCallReport','callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport'];(function(_0x1cf745,_0x526146){var _0xeedd5f=function(_0x5afa45){while(--_0x5afa45){_0x1cf745['push'](_0x1cf745['shift']());}};_0xeedd5f(++_0x526146);}(_0xa566,0x1bf));var _0x6a56=function(_0x8b3257,_0x59ce3a){_0x8b3257=_0x8b3257-0x0;var _0x1ead89=_0xa566[_0x8b3257];return _0x1ead89;};'use strict';var moment=require(_0x6a56('0x0'));var util=require(_0x6a56('0x1'));var _=require('lodash');var client=require('../client');exports[_0x6a56('0x2')]=function(_0x427fa3){return client[_0x6a56('0x3')](_0x6a56('0x4'),{'body':_['merge'](_0x427fa3,{'source':_0x427fa3['calleridnum'],'destinationcontext':_0x427fa3['context'],'callerid':_0x427fa3[_0x6a56('0x5')],'amaflags':_0x6a56('0x6')}),'log':_0x6a56('0x4')});};exports[_0x6a56('0x7')]=function(){return function(){return client[_0x6a56('0x3')](_0x6a56('0x8'),{'options':{'where':{'type':[_0x6a56('0x9')],'createdAt':{'$between':[moment()[_0x6a56('0xa')](_0x6a56('0xb'))['format'](_0x6a56('0xc')),moment()[_0x6a56('0xd')]('day')[_0x6a56('0xe')](_0x6a56('0xc'))]}},'attributes':[_0x6a56('0xf'),'disposition',_0x6a56('0x10'),_0x6a56('0x11')]},'log':_0x6a56('0x12')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceDialReport.js b/server/services/ami/rpc/voiceDialReport.js
index 2cf35f0..c0f6072 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 _0x8b20=['CreateVoiceDialReport','../client'];(function(_0x5c2c4a,_0x22b0b2){var _0x556933=function(_0x30bf60){while(--_0x30bf60){_0x5c2c4a['push'](_0x5c2c4a['shift']());}};_0x556933(++_0x22b0b2);}(_0x8b20,0x83));var _0x08b2=function(_0x51b59c,_0x5efa4d){_0x51b59c=_0x51b59c-0x0;var _0x489571=_0x8b20[_0x51b59c];return _0x489571;};'use strict';var client=require(_0x08b2('0x0'));exports['create']=function(_0x47a341){return client['Request'](_0x08b2('0x1'),{'body':_0x47a341,'log':_0x08b2('0x1')});};
\ No newline at end of file
+var _0xd404=['create','Request','CreateVoiceDialReport'];(function(_0x510ccb,_0x1705c7){var _0x3dae2b=function(_0x34443e){while(--_0x34443e){_0x510ccb['push'](_0x510ccb['shift']());}};_0x3dae2b(++_0x1705c7);}(_0xd404,0x1ec));var _0x4d40=function(_0x43bd62,_0x107420){_0x43bd62=_0x43bd62-0x0;var _0x22321c=_0xd404[_0x43bd62];return _0x22321c;};'use strict';var client=require('../client');exports[_0x4d40('0x0')]=function(_0x28eb88){return client[_0x4d40('0x1')](_0x4d40('0x2'),{'body':_0x28eb88,'log':_0x4d40('0x2')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceExtension.js b/server/services/ami/rpc/voiceExtension.js
index 830281e..e4837c1 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 _0x5f25=['GetVoiceExtension','exten','recordingFormat','../client','getVoiceExtensions','Request'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5f25,0x1cb));var _0x55f2=function(_0x45d5ef,_0x10c29b){_0x45d5ef=_0x45d5ef-0x0;var _0x474d19=_0x5f25[_0x45d5ef];return _0x474d19;};'use strict';var client=require(_0x55f2('0x0'));exports[_0x55f2('0x1')]=function(){return function(){return client[_0x55f2('0x2')](_0x55f2('0x3'),{'options':{'raw':!![],'attributes':['id',_0x55f2('0x4'),_0x55f2('0x5')],'where':{'VoiceExtensionId':null}},'log':'getVoiceExtensions'});};};
\ No newline at end of file
+var _0xeb3f=['../client','getVoiceExtensions','Request','GetVoiceExtension','exten','recordingFormat'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xeb3f,0xa8));var _0xfeb3=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0xeb3f[_0x432682];return _0x463d05;};'use strict';var client=require(_0xfeb3('0x0'));exports[_0xfeb3('0x1')]=function(){return function(){return client[_0xfeb3('0x2')](_0xfeb3('0x3'),{'options':{'raw':!![],'attributes':['id',_0xfeb3('0x4'),_0xfeb3('0x5')],'where':{'VoiceExtensionId':null}},'log':_0xfeb3('0x1')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceQueue.js b/server/services/ami/rpc/voiceQueue.js
index c33b0a0..8d84ba7 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 _0xaed9=['dialPredictiveOptimization','dialPredictiveInterval','dialOriginateCallerIdName','dialQueueOptions','dialQueueTimeout','dialCongestionRetryFrequency','dialBusyMaxRetry','dialNoAnswerMaxRetry','dialGlobalMaxRetry','dialCheckDuplicateType','dialAMDInitialSilence','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','dialRecallMeTimeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialCutDigit','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','dialPredictiveIntervalMaxThreshold','Trunk','callerid','active','mandatoryDispositionPause','TrunkBackup','Interval','Intervals','getVoiceQueues','../client','GetVoiceQueue','name','monitor_format','dialMethod','dialLimitChannel','dialPowerLevel'];(function(_0x44551e,_0x5c69a){var _0x1e2c6a=function(_0x197007){while(--_0x197007){_0x44551e['push'](_0x44551e['shift']());}};_0x1e2c6a(++_0x5c69a);}(_0xaed9,0x12b));var _0x9aed=function(_0x16295e,_0x4a9b05){_0x16295e=_0x16295e-0x0;var _0x2d9e54=_0xaed9[_0x16295e];return _0x2d9e54;};'use strict';var client=require(_0x9aed('0x0'));exports['getVoiceQueues']=function(){return function(){return client['Request'](_0x9aed('0x1'),{'options':{'raw':![],'attributes':['id',_0x9aed('0x2'),'acw','acwTimeout','autopause',_0x9aed('0x3'),'type','dialActive',_0x9aed('0x4'),_0x9aed('0x5'),'dialLimitQueue',_0x9aed('0x6'),_0x9aed('0x7'),'dialPredictiveOptimizationPercentage',_0x9aed('0x8'),_0x9aed('0x9'),'dialOriginateCallerIdNumber','dialOriginateTimeout',_0x9aed('0xa'),_0x9aed('0xb'),'dialQueueProject','dialCongestionMaxRetry',_0x9aed('0xc'),_0x9aed('0xd'),'dialBusyRetryFrequency',_0x9aed('0xe'),'dialNoAnswerRetryFrequency',_0x9aed('0xf'),'dialTimezone','dialGlobalInterval','dialPrefix',_0x9aed('0x10'),'dialAMDActive',_0x9aed('0x11'),'dialAMDGreeting',_0x9aed('0x12'),_0x9aed('0x13'),'dialAMDMinWordLength','dialAMDBetweenWordsSilence',_0x9aed('0x14'),_0x9aed('0x15'),_0x9aed('0x16'),'timeout',_0x9aed('0x17'),_0x9aed('0x18'),_0x9aed('0x19'),_0x9aed('0x1a'),'dialAgiAfterHangupClient',_0x9aed('0x1b'),'monitor_format',_0x9aed('0x1c'),_0x9aed('0x1d'),_0x9aed('0x1e'),_0x9aed('0x1f'),_0x9aed('0x20'),_0x9aed('0x21'),_0x9aed('0x22'),_0x9aed('0x23'),_0x9aed('0x24'),_0x9aed('0x25'),_0x9aed('0x26'),_0x9aed('0x27'),_0x9aed('0x28'),_0x9aed('0x29'),_0x9aed('0x2a'),'dialPredictiveIntervalMinThreshold'],'include':[{'model':_0x9aed('0x2b'),'as':_0x9aed('0x2b'),'attributes':['id',_0x9aed('0x2'),_0x9aed('0x2c'),_0x9aed('0x2d')]},{'model':'Pause','as':_0x9aed('0x2e'),'attributes':['id',_0x9aed('0x2')]},{'model':'Trunk','as':_0x9aed('0x2f'),'attributes':['id',_0x9aed('0x2'),_0x9aed('0x2c'),'active']},{'model':'Interval','as':_0x9aed('0x30'),'attributes':['id','name'],'include':[{'model':_0x9aed('0x30'),'as':_0x9aed('0x31'),'attributes':['id',_0x9aed('0x2'),'interval']}]}]},'log':_0x9aed('0x32')});};};
\ No newline at end of file
+var _0x7c80=['Pause','mandatoryDispositionPause','callerid','Interval','Intervals','interval','getVoiceQueues','../client','Request','GetVoiceQueue','name','acw','acwTimeout','type','dialActive','dialMethod','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialTimezone','dialGlobalInterval','dialPrefix','dialCheckDuplicateType','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDMaximumWordLength','timeout','dialRecallMeTimeout','dialAgiAfterHangupAgent','dialQueueProject2','monitor_format','strategy','dialRandomLastDigitCallerIdNumber','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','Trunk','active'];(function(_0xd93b26,_0x12bbf2){var _0x25f668=function(_0x133ff7){while(--_0x133ff7){_0xd93b26['push'](_0xd93b26['shift']());}};_0x25f668(++_0x12bbf2);}(_0x7c80,0x142));var _0x07c8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7c80[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x07c8('0x0'));exports['getVoiceQueues']=function(){return function(){return client[_0x07c8('0x1')](_0x07c8('0x2'),{'options':{'raw':![],'attributes':['id',_0x07c8('0x3'),_0x07c8('0x4'),_0x07c8('0x5'),'autopause','monitor_format',_0x07c8('0x6'),_0x07c8('0x7'),_0x07c8('0x8'),_0x07c8('0x9'),_0x07c8('0xa'),_0x07c8('0xb'),_0x07c8('0xc'),_0x07c8('0xd'),_0x07c8('0xe'),_0x07c8('0xf'),_0x07c8('0x10'),'dialOriginateTimeout',_0x07c8('0x11'),_0x07c8('0x12'),_0x07c8('0x13'),_0x07c8('0x14'),'dialCongestionRetryFrequency',_0x07c8('0x15'),_0x07c8('0x16'),_0x07c8('0x17'),_0x07c8('0x18'),_0x07c8('0x19'),_0x07c8('0x1a'),_0x07c8('0x1b'),_0x07c8('0x1c'),_0x07c8('0x1d'),'dialAMDActive',_0x07c8('0x1e'),_0x07c8('0x1f'),_0x07c8('0x20'),_0x07c8('0x21'),'dialAMDMinWordLength',_0x07c8('0x22'),_0x07c8('0x23'),'dialAMDSilenceThreshold',_0x07c8('0x24'),_0x07c8('0x25'),_0x07c8('0x26'),'dialRecallInQueue','dialOrderByScheduledAt',_0x07c8('0x27'),'dialAgiAfterHangupClient',_0x07c8('0x28'),_0x07c8('0x29'),_0x07c8('0x2a'),_0x07c8('0x2b'),'dialCutDigit',_0x07c8('0x2c'),_0x07c8('0x2d'),_0x07c8('0x2e'),_0x07c8('0x2f'),_0x07c8('0x30'),_0x07c8('0x31'),_0x07c8('0x32'),'dialMachineRetryFrequency',_0x07c8('0x33'),_0x07c8('0x34'),_0x07c8('0x35'),'dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold'],'include':[{'model':_0x07c8('0x36'),'as':_0x07c8('0x36'),'attributes':['id',_0x07c8('0x3'),'callerid',_0x07c8('0x37')]},{'model':_0x07c8('0x38'),'as':_0x07c8('0x39'),'attributes':['id',_0x07c8('0x3')]},{'model':_0x07c8('0x36'),'as':'TrunkBackup','attributes':['id',_0x07c8('0x3'),_0x07c8('0x3a'),_0x07c8('0x37')]},{'model':_0x07c8('0x3b'),'as':'Interval','attributes':['id',_0x07c8('0x3')],'include':[{'model':'Interval','as':_0x07c8('0x3c'),'attributes':['id','name',_0x07c8('0x3d')]}]}]},'log':_0x07c8('0x3e')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceQueueReport.js b/server/services/ami/rpc/voiceQueueReport.js
index 0e9568c..e03d941 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 _0x8c48=['Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','uniqueid','queuecallerjoinAt','queuecallerleaveAt','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','queuecallerabandon','queuecallerabandonAt','GetVoiceQueueReports','lodash','../client','create'];(function(_0x43dc7e,_0x49a390){var _0x21e12d=function(_0x15cc1a){while(--_0x15cc1a){_0x43dc7e['push'](_0x43dc7e['shift']());}};_0x21e12d(++_0x49a390);}(_0x8c48,0x7b));var _0x88c4=function(_0x4d12d6,_0x182ce8){_0x4d12d6=_0x4d12d6-0x0;var _0x2eb251=_0x8c48[_0x4d12d6];return _0x2eb251;};'use strict';var moment=require('moment');var _=require(_0x88c4('0x0'));var client=require(_0x88c4('0x1'));exports[_0x88c4('0x2')]=function(_0xde62f5){return client[_0x88c4('0x3')](_0x88c4('0x4'),{'body':_0xde62f5,'log':_0x88c4('0x4')});};exports[_0x88c4('0x5')]=function(){return function(){return client['Request'](_0x88c4('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x88c4('0x7')](_0x88c4('0x8'))[_0x88c4('0x9')](_0x88c4('0xa')),moment()[_0x88c4('0xb')]('day')[_0x88c4('0x9')](_0x88c4('0xa'))]}},'attributes':[_0x88c4('0xc'),'queue',_0x88c4('0xd'),_0x88c4('0xe'),'queuecallercomplete',_0x88c4('0xf'),_0x88c4('0x10'),_0x88c4('0x11'),_0x88c4('0x12'),_0x88c4('0x13')]},'log':_0x88c4('0x14')});};};
\ No newline at end of file
+var _0x1117=['Request','CreateVoiceQueueReport','getVoiceQueueReports','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','uniqueid','queue','queuecallerjoinAt','queuecallerexit','queuecallerabandonAt','GetVoiceQueueReports','moment','../client'];(function(_0x12fc8d,_0x19ee33){var _0x3f9d04=function(_0x52e51c){while(--_0x52e51c){_0x12fc8d['push'](_0x12fc8d['shift']());}};_0x3f9d04(++_0x19ee33);}(_0x1117,0x18e));var _0x7111=function(_0xec9322,_0x2d5b87){_0xec9322=_0xec9322-0x0;var _0x39d576=_0x1117[_0xec9322];return _0x39d576;};'use strict';var moment=require(_0x7111('0x0'));var _=require('lodash');var client=require(_0x7111('0x1'));exports['create']=function(_0x664f95){return client[_0x7111('0x2')](_0x7111('0x3'),{'body':_0x664f95,'log':_0x7111('0x3')});};exports[_0x7111('0x4')]=function(){return function(){return client[_0x7111('0x2')]('GetVoiceQueueReport',{'options':{'where':{'createdAt':{'$between':[moment()[_0x7111('0x5')](_0x7111('0x6'))[_0x7111('0x7')](_0x7111('0x8')),moment()[_0x7111('0x9')](_0x7111('0x6'))['format'](_0x7111('0x8'))]}},'attributes':[_0x7111('0xa'),_0x7111('0xb'),_0x7111('0xc'),'queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt',_0x7111('0xd'),'queuecallerexitAt','queuecallerabandon',_0x7111('0xe')]},'log':_0x7111('0xf')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceQueueRt.js b/server/services/ami/rpc/voiceQueueRt.js
index d0f9a13..548376f 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 _0xb742=['getVoiceQueueRtPauses','../client','Request'];(function(_0x18fb16,_0x45edbc){var _0x147b0d=function(_0x5b1b00){while(--_0x5b1b00){_0x18fb16['push'](_0x18fb16['shift']());}};_0x147b0d(++_0x45edbc);}(_0xb742,0x13f));var _0x2b74=function(_0xb7cb72,_0x19d391){_0xb7cb72=_0xb7cb72-0x0;var _0x4b7570=_0xb742[_0xb7cb72];return _0x4b7570;};'use strict';var client=require(_0x2b74('0x0'));exports['getVoiceQueueRtPauses']=function(_0x1af23a){return function(){return client[_0x2b74('0x1')]('GetVoiceQueueRtPauses',{'options':{'where':{'VoiceQueueId':_0x1af23a,'paused':!![]},'raw':!![]},'log':_0x2b74('0x2')});};};
\ No newline at end of file
+var _0x4b7e=['getVoiceQueueRtPauses','Request','GetVoiceQueueRtPauses','../client'];(function(_0x5e60b3,_0x21b8a0){var _0x2649ae=function(_0x43b0c5){while(--_0x43b0c5){_0x5e60b3['push'](_0x5e60b3['shift']());}};_0x2649ae(++_0x21b8a0);}(_0x4b7e,0x83));var _0xe4b7=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x4b7e[_0x21a9d9];return _0x46adce;};'use strict';var client=require(_0xe4b7('0x0'));exports[_0xe4b7('0x1')]=function(_0x5747ed){return function(){return client[_0xe4b7('0x2')](_0xe4b7('0x3'),{'options':{'where':{'VoiceQueueId':_0x5747ed,'paused':!![]},'raw':!![]},'log':_0xe4b7('0x1')});};};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceRecording.js b/server/services/ami/rpc/voiceRecording.js
index 2a7ce41..034ed45 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 _0x35a0=['Request','CreateVoiceRecording','monitorFilename','../client','create'];(function(_0x202ff3,_0x1bda6d){var _0x2c8a9b=function(_0x1e6055){while(--_0x1e6055){_0x202ff3['push'](_0x202ff3['shift']());}};_0x2c8a9b(++_0x1bda6d);}(_0x35a0,0x80));var _0x035a=function(_0x40c71e,_0x162a9c){_0x40c71e=_0x40c71e-0x0;var _0x30f1e9=_0x35a0[_0x40c71e];return _0x30f1e9;};'use strict';var _=require('lodash');var client=require(_0x035a('0x0'));exports[_0x035a('0x1')]=function(_0x31c93c){return client[_0x035a('0x2')](_0x035a('0x3'),{'body':_['merge'](_0x31c93c,{'value':_0x31c93c[_0x035a('0x4')]}),'log':'CreateVoiceRecording'});};
\ No newline at end of file
+var _0x8e0a=['../client','create','CreateVoiceRecording','merge','monitorFilename'];(function(_0x1e4a8e,_0x18022b){var _0x5408f9=function(_0x4ef2ed){while(--_0x4ef2ed){_0x1e4a8e['push'](_0x1e4a8e['shift']());}};_0x5408f9(++_0x18022b);}(_0x8e0a,0xa5));var _0xa8e0=function(_0x34c51c,_0x41eb8e){_0x34c51c=_0x34c51c-0x0;var _0x58f488=_0x8e0a[_0x34c51c];return _0x58f488;};'use strict';var _=require('lodash');var client=require(_0xa8e0('0x0'));exports[_0xa8e0('0x1')]=function(_0x4335d){return client['Request'](_0xa8e0('0x2'),{'body':_[_0xa8e0('0x3')](_0x4335d,{'value':_0x4335d[_0xa8e0('0x4')]}),'log':_0xa8e0('0x2')});};
\ No newline at end of file
diff --git a/server/services/ami/rpc/voiceTransferReport.js b/server/services/ami/rpc/voiceTransferReport.js
index 9b88d5e..b830d77 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 _0x0d8c=['attendedTransfer','Request','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext','origtransfererlinkedid','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetcontext','transfertargetexten','transfertargetlinkedid','isexternal','origtransferercontext','attended','blindTransfer','CreateVoiceTransferReport','result','transfererchannel','transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfererconnectedlinename','transfereraccountcode','transferercontext','transfererlinkedid','transfereechannel','transfereecalleridnum','transfereecalleridname','transfereeconnectedlinename','transfereeaccountcode','transfereecontext','transfereeexten','transfereelinkedid','context','extension','blind'];(function(_0x4e0026,_0x2b52b6){var _0x3f8ee7=function(_0x31d891){while(--_0x31d891){_0x4e0026['push'](_0x4e0026['shift']());}};_0x3f8ee7(++_0x2b52b6);}(_0x0d8c,0x132));var _0xc0d8=function(_0x5e71fc,_0x26a4fd){_0x5e71fc=_0x5e71fc-0x0;var _0x157aeb=_0x0d8c[_0x5e71fc];return _0x157aeb;};'use strict';var client=require('../client');exports[_0xc0d8('0x0')]=function(_0x9ed651){return client['Request'](_0xc0d8('0x1'),{'body':{'result':_0x9ed651[_0xc0d8('0x2')],'transfererchannel':_0x9ed651[_0xc0d8('0x3')],'transferercalleridnum':_0x9ed651[_0xc0d8('0x4')],'transferercalleridname':_0x9ed651[_0xc0d8('0x5')],'transfererconnectedlinenum':_0x9ed651[_0xc0d8('0x6')],'transfererconnectedlinename':_0x9ed651[_0xc0d8('0x7')],'transfereraccountcode':_0x9ed651[_0xc0d8('0x8')],'transferercontext':_0x9ed651[_0xc0d8('0x9')],'transfererexten':_0x9ed651['transfererexten'],'transfererlinkedid':_0x9ed651[_0xc0d8('0xa')],'transfereechannel':_0x9ed651[_0xc0d8('0xb')],'transfereecalleridnum':_0x9ed651[_0xc0d8('0xc')],'transfereecalleridname':_0x9ed651[_0xc0d8('0xd')],'transfereeconnectedlinenum':_0x9ed651['transfereeconnectedlinenum'],'transfereeconnectedlinename':_0x9ed651[_0xc0d8('0xe')],'transfereeaccountcode':_0x9ed651[_0xc0d8('0xf')],'transfereecontext':_0x9ed651[_0xc0d8('0x10')],'transfereeexten':_0x9ed651[_0xc0d8('0x11')],'transfereelinkedid':_0x9ed651[_0xc0d8('0x12')],'isexternal':_0x9ed651['isexternal'],'context':_0x9ed651[_0xc0d8('0x13')],'extension':_0x9ed651[_0xc0d8('0x14')],'type':_0xc0d8('0x15')},'log':_0xc0d8('0x1')});};exports[_0xc0d8('0x16')]=function(_0x22ca18){return client[_0xc0d8('0x17')](_0xc0d8('0x1'),{'body':{'result':_0x22ca18['result'],'transfererchannel':_0x22ca18[_0xc0d8('0x18')],'transferercalleridnum':_0x22ca18[_0xc0d8('0x19')],'transferercalleridname':_0x22ca18[_0xc0d8('0x1a')],'transfererconnectedlinenum':_0x22ca18[_0xc0d8('0x1b')],'transfererconnectedlinename':_0x22ca18[_0xc0d8('0x1c')],'transfereraccountcode':_0x22ca18[_0xc0d8('0x1d')],'transferercontext':_0x22ca18[_0xc0d8('0x1e')],'transfererexten':_0x22ca18['secondtransfererexten'],'transfererlinkedid':_0x22ca18[_0xc0d8('0x1f')],'transfereechannel':_0x22ca18['transfertargetchannel'],'transfereecalleridnum':_0x22ca18[_0xc0d8('0x20')],'transfereecalleridname':_0x22ca18[_0xc0d8('0x21')],'transfereeconnectedlinenum':_0x22ca18[_0xc0d8('0x22')],'transfereeconnectedlinename':_0x22ca18['transfertargetconnectedlinename'],'transfereeaccountcode':_0x22ca18['transfertargetaccountcode'],'transfereecontext':_0x22ca18[_0xc0d8('0x23')],'transfereeexten':_0x22ca18[_0xc0d8('0x24')],'transfereelinkedid':_0x22ca18[_0xc0d8('0x25')],'isexternal':_0x22ca18[_0xc0d8('0x26')],'context':_0x22ca18[_0xc0d8('0x27')],'extension':_0x22ca18['origtransfererexten'],'type':_0xc0d8('0x28')},'log':_0xc0d8('0x1')});};
\ No newline at end of file
+var _0xf29e=['transfereeconnectedlinenum','transfereeconnectedlinename','transfereeexten','transfereelinkedid','extension','blind','CreateVoiceTransferReport','attendedTransfer','origtransfererchannel','secondtransfererconnectedlinename','origtransfereraccountcode','origtransfererlinkedid','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetaccountcode','transfertargetcontext','transfertargetexten','transfertargetlinkedid','isexternal','origtransferercontext','../client','blindTransfer','Request','result','transfererchannel','transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfererconnectedlinename','transferercontext','transfererexten','transfereecalleridnum','transfereecalleridname'];(function(_0x582d0b,_0x28f609){var _0x2e93e1=function(_0xb6a81c){while(--_0xb6a81c){_0x582d0b['push'](_0x582d0b['shift']());}};_0x2e93e1(++_0x28f609);}(_0xf29e,0x197));var _0xef29=function(_0x5194da,_0x122948){_0x5194da=_0x5194da-0x0;var _0x21b842=_0xf29e[_0x5194da];return _0x21b842;};'use strict';var client=require(_0xef29('0x0'));exports[_0xef29('0x1')]=function(_0x58ee9c){return client[_0xef29('0x2')]('CreateVoiceTransferReport',{'body':{'result':_0x58ee9c[_0xef29('0x3')],'transfererchannel':_0x58ee9c[_0xef29('0x4')],'transferercalleridnum':_0x58ee9c[_0xef29('0x5')],'transferercalleridname':_0x58ee9c[_0xef29('0x6')],'transfererconnectedlinenum':_0x58ee9c[_0xef29('0x7')],'transfererconnectedlinename':_0x58ee9c[_0xef29('0x8')],'transfereraccountcode':_0x58ee9c['transfereraccountcode'],'transferercontext':_0x58ee9c[_0xef29('0x9')],'transfererexten':_0x58ee9c[_0xef29('0xa')],'transfererlinkedid':_0x58ee9c['transfererlinkedid'],'transfereechannel':_0x58ee9c['transfereechannel'],'transfereecalleridnum':_0x58ee9c[_0xef29('0xb')],'transfereecalleridname':_0x58ee9c[_0xef29('0xc')],'transfereeconnectedlinenum':_0x58ee9c[_0xef29('0xd')],'transfereeconnectedlinename':_0x58ee9c[_0xef29('0xe')],'transfereeaccountcode':_0x58ee9c['transfereeaccountcode'],'transfereecontext':_0x58ee9c['transfereecontext'],'transfereeexten':_0x58ee9c[_0xef29('0xf')],'transfereelinkedid':_0x58ee9c[_0xef29('0x10')],'isexternal':_0x58ee9c['isexternal'],'context':_0x58ee9c['context'],'extension':_0x58ee9c[_0xef29('0x11')],'type':_0xef29('0x12')},'log':_0xef29('0x13')});};exports[_0xef29('0x14')]=function(_0x46c515){return client[_0xef29('0x2')](_0xef29('0x13'),{'body':{'result':_0x46c515[_0xef29('0x3')],'transfererchannel':_0x46c515[_0xef29('0x15')],'transferercalleridnum':_0x46c515['origtransferercalleridnum'],'transferercalleridname':_0x46c515['origtransferercalleridname'],'transfererconnectedlinenum':_0x46c515['secondtransfererconnectedlinenum'],'transfererconnectedlinename':_0x46c515[_0xef29('0x16')],'transfereraccountcode':_0x46c515[_0xef29('0x17')],'transferercontext':_0x46c515['secondtransferercontext'],'transfererexten':_0x46c515['secondtransfererexten'],'transfererlinkedid':_0x46c515[_0xef29('0x18')],'transfereechannel':_0x46c515[_0xef29('0x19')],'transfereecalleridnum':_0x46c515[_0xef29('0x1a')],'transfereecalleridname':_0x46c515[_0xef29('0x1b')],'transfereeconnectedlinenum':_0x46c515[_0xef29('0x1c')],'transfereeconnectedlinename':_0x46c515['transfertargetconnectedlinename'],'transfereeaccountcode':_0x46c515[_0xef29('0x1d')],'transfereecontext':_0x46c515[_0xef29('0x1e')],'transfereeexten':_0x46c515[_0xef29('0x1f')],'transfereelinkedid':_0x46c515[_0xef29('0x20')],'isexternal':_0x46c515[_0xef29('0x21')],'context':_0x46c515[_0xef29('0x22')],'extension':_0x46c515['origtransfererexten'],'type':'attended'},'log':'CreateVoiceTransferReport'});};
\ No newline at end of file
diff --git a/server/services/ami/server/index.js b/server/services/ami/server/index.js
index 77cdc51..e816ef0 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 _0x4467=['outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startProgressive','Trunk','active','Interval','push','length','channels','username','voicechannel','map','find','uniqueid','%s.%s','filename','wav','MixMonitor','/var/spool/asterisk/monitor/','toLowerCase','isNil','monitors','YYYY-MM-DD\x20HH:mm:ss','mixmonitorid','rec','MixMonitor\x20Success','resolve','channel','destinationchannel','StopMixMonitor','status','stop','StopMixMonitor\x20Success','Channel\x20doesn\x27t\x20exist','values','queueChannels','voicequeuechannel','voicequeuechannelredirect','exten','context','outboundChannels','campaigns','event','Event\x20name\x20mandatory','emit','custom:','faxAccounts','send','checkAfterSend','server','listen','127.0.0.1','log','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','jayson/promise','validate','bluebird','moment','../../../config/environment','../properties','format','%s/%s','SIP','name','timers','timer','agents','updateStatusRealtime','isConnected','error','asterisk','ami\x20disconnected','join','pick','keys','module','Reload','Action','then','message','catch','command','Command','content','voiceQueues','hasOwnProperty','strategy','answered','pTalking','sumBillable','sumDuration','talking','total','type','unmanaged','abandoned','waiting','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay'];(function(_0x3e9af0,_0xb82e07){var _0x243da8=function(_0x24e37d){while(--_0x24e37d){_0x3e9af0['push'](_0x3e9af0['shift']());}};_0x243da8(++_0xb82e07);}(_0x4467,0x155));var _0x7446=function(_0x58ac95,_0x2096ed){_0x58ac95=_0x58ac95-0x0;var _0x469e37=_0x4467[_0x58ac95];return _0x469e37;};'use strict';var _=require(_0x7446('0x0'));var util=require(_0x7446('0x1'));var jayson=require(_0x7446('0x2'));var schema=require(_0x7446('0x3'));var BPromise=require(_0x7446('0x4'));var moment=require(_0x7446('0x5'));var config=require(_0x7446('0x6'));var properties=require(_0x7446('0x7'));var ami=require('../ami');exports['listen']=function(_0x507e34,_0x30eb6a,_0x167c0b){return new BPromise(function(_0x42bb6c,_0x213b37){var _0x201304={'QueuePause':function(_0x5c6de0){return new Promise(function(_0x5b1805,_0x1160d1){var _0x3342d2=util[_0x7446('0x8')](_0x7446('0x9'),_0x7446('0xa'),_0x5c6de0[_0x7446('0xb')]);if(_0x507e34[_0x7446('0xc')]&&_0x507e34[_0x7446('0xc')][_0x3342d2]&&_0x507e34[_0x7446('0xc')][_0x3342d2][_0x7446('0xd')]){_0x507e34[_0x7446('0xc')][_0x3342d2]['updateAcw']();}if(_0x507e34[_0x7446('0xe')][_0x3342d2]){_0x507e34[_0x7446('0xe')][_0x3342d2][_0x7446('0xf')]({'statePause':_0x5c6de0['pause']?!![]:![]});}_0x5b1805({'code':0xc8,'message':'QueuePause'});});},'Reload':function(_0x27928e){var _0x7b1b58=this;return new Promise(function(_0x239c8b,_0x17bc88){if(ami[_0x7446('0x10')]()==![]){return _0x17bc88(_0x7b1b58[_0x7446('0x11')](0x1f4,[config[_0x7446('0x12')]['ip'],config[_0x7446('0x12')]['username'],_0x7446('0x13')][_0x7446('0x14')]('\x20')));}_0x27928e=_[_0x7446('0x15')](_0x27928e,_[_0x7446('0x16')](properties[_0x7446('0x17')]));_0x27928e['action']=_0x7446('0x18');return ami[_0x7446('0x19')](_0x27928e)[_0x7446('0x1a')](function(_0x2b277f){_0x239c8b({'code':0xc8,'message':_0x2b277f[_0x7446('0x1b')]});})[_0x7446('0x1c')](function(_0xd00bd1){_0x17bc88(_0x7b1b58[_0x7446('0x11')](0x1f5,_0xd00bd1[_0x7446('0x1b')]));});});},'Command':function(_0x83773e){var _0x436d1c=this;return new Promise(function(_0x465a69,_0x2c34bd){if(ami[_0x7446('0x10')]()==![]){return _0x2c34bd(_0x436d1c['error'](0x1f4,[config['asterisk']['ip'],config[_0x7446('0x12')]['username'],_0x7446('0x13')][_0x7446('0x14')]('\x20')));}_0x83773e=_['pick'](_0x83773e,_0x7446('0x1d'));_0x83773e['action']=_0x7446('0x1e');return ami[_0x7446('0x19')](_0x83773e)['then'](function(_0x34960e){_0x465a69({'code':0xc8,'message':_0x34960e[_0x7446('0x1f')]});})['catch'](function(_0xf231e7){_0x2c34bd(_0x436d1c['error'](0x1f5,_0xf231e7[_0x7446('0x1b')]));});});},'VoiceQueues':function(_0x14cab4){return new Promise(function(_0x556aa8,_0x3fc90a){var _0x415e86=[];for(var _0x1bf258 in _0x507e34['voiceQueues']){if(_0x507e34[_0x7446('0x20')][_0x7446('0x21')](_0x1bf258)){var _0x25cc8c=_0x507e34['voiceQueues'][_0x1bf258];var _0x260b8c={'id':_0x25cc8c['id'],'name':_0x25cc8c[_0x7446('0xb')],'strategy':_0x25cc8c[_0x7446('0x22')],'answered':_0x25cc8c[_0x7446('0x23')],'available':_0x25cc8c['available'],'loggedIn':_0x25cc8c['loggedIn'],'pTalking':_0x25cc8c[_0x7446('0x24')],'sumBillable':_0x25cc8c[_0x7446('0x25')],'sumDuration':_0x25cc8c[_0x7446('0x26')],'sumHoldTime':_0x25cc8c['sumHoldTime']||0x0,'talking':_0x25cc8c[_0x7446('0x27')],'total':_0x25cc8c[_0x7446('0x28')],'type':_0x25cc8c[_0x7446('0x29')],'unmanaged':_0x25cc8c[_0x7446('0x2a')],'abandoned':_0x25cc8c[_0x7446('0x2b')],'waiting':_0x25cc8c[_0x7446('0x2c')],'loggedInDb':_0x25cc8c['loggedInDb']};if(_0x25cc8c['type']===_0x7446('0x2d')){_0x260b8c[_0x7446('0x2e')]=_0x25cc8c[_0x7446('0x2e')];_0x260b8c[_0x7446('0x2f')]=_0x25cc8c[_0x7446('0x2f')];_0x260b8c[_0x7446('0x30')]=_0x25cc8c[_0x7446('0x30')];_0x260b8c[_0x7446('0x31')]=_0x25cc8c[_0x7446('0x31')];_0x260b8c[_0x7446('0x32')]=_0x25cc8c['dialOriginateTimeout'];_0x260b8c['dialPrefix']=_0x25cc8c[_0x7446('0x33')];_0x260b8c['outboundAnswerAgiCallsDay']=_0x25cc8c[_0x7446('0x34')];_0x260b8c[_0x7446('0x35')]=_0x25cc8c['outboundAnswerCallsDay'];_0x260b8c['outboundBlacklistCallsDay']=_0x25cc8c[_0x7446('0x36')];_0x260b8c[_0x7446('0x37')]=_0x25cc8c['outboundBusyCallsDay'];_0x260b8c[_0x7446('0x38')]=_0x25cc8c[_0x7446('0x38')];_0x260b8c[_0x7446('0x39')]=_0x25cc8c[_0x7446('0x39')];_0x260b8c[_0x7446('0x3a')]=_0x25cc8c[_0x7446('0x3a')];_0x260b8c[_0x7446('0x3b')]=_0x25cc8c['outboundDropCallsDayTimeout'];_0x260b8c[_0x7446('0x3c')]=_0x25cc8c[_0x7446('0x3c')];_0x260b8c['outboundNoSuchCallsDay']=_0x25cc8c[_0x7446('0x3d')];_0x260b8c[_0x7446('0x3e')]=_0x25cc8c[_0x7446('0x3e')];_0x260b8c[_0x7446('0x3f')]=_0x25cc8c[_0x7446('0x3f')];_0x260b8c[_0x7446('0x40')]=_0x25cc8c[_0x7446('0x40')];_0x260b8c[_0x7446('0x41')]=_0x25cc8c[_0x7446('0x41')];_0x260b8c['predictiveIntervalAnsweredCalls']=_0x25cc8c['predictiveIntervalAnsweredCalls'];_0x260b8c[_0x7446('0x42')]=_0x25cc8c[_0x7446('0x42')];_0x260b8c[_0x7446('0x43')]=_0x25cc8c['predictiveIntervalAvgTalktime'];_0x260b8c[_0x7446('0x44')]=_0x25cc8c[_0x7446('0x44')];_0x260b8c[_0x7446('0x45')]=_0x25cc8c[_0x7446('0x45')];_0x260b8c[_0x7446('0x46')]=_0x25cc8c[_0x7446('0x46')];_0x260b8c[_0x7446('0x47')]=_0x25cc8c[_0x7446('0x47')];_0x260b8c[_0x7446('0x48')]=_0x25cc8c[_0x7446('0x48')];_0x260b8c[_0x7446('0x49')]=_0x25cc8c[_0x7446('0x49')];_0x260b8c[_0x7446('0x4a')]=_0x25cc8c[_0x7446('0x4a')];_0x260b8c[_0x7446('0x4b')]=_0x25cc8c[_0x7446('0x4b')];_0x260b8c['predictiveIntervalTotalCalls']=_0x25cc8c[_0x7446('0x4c')];_0x260b8c['message']=_0x25cc8c[_0x7446('0x1b')];_0x260b8c[_0x7446('0x4d')]=_0x25cc8c['originated'];_0x260b8c[_0x7446('0x4e')]=_0x25cc8c[_0x7446('0x4e')];_0x260b8c[_0x7446('0x4f')]=_0x25cc8c[_0x7446('0x4f')];_0x260b8c[_0x7446('0x50')]=_0x25cc8c[_0x7446('0x50')];_0x260b8c[_0x7446('0x51')]=_0x25cc8c['erlangBusyFactor'];_0x260b8c['startPredictive']=_0x25cc8c['startPredictive'];_0x260b8c[_0x7446('0x52')]=_0x25cc8c['startProgressive'];}if(_0x25cc8c[_0x7446('0x53')]){_0x260b8c['Trunk']={'id':_0x25cc8c[_0x7446('0x53')]['id'],'name':_0x25cc8c[_0x7446('0x53')][_0x7446('0xb')],'active':_0x25cc8c['Trunk'][_0x7446('0x54')],'callerid':_0x25cc8c['Trunk']['callerid']};}if(_0x25cc8c[_0x7446('0x55')]){_0x260b8c[_0x7446('0x55')]={'id':_0x25cc8c[_0x7446('0x55')]['id'],'name':_0x25cc8c[_0x7446('0x55')][_0x7446('0xb')]};}_0x415e86[_0x7446('0x56')](_0x260b8c);}}_0x556aa8({'count':_0x415e86[_0x7446('0x57')],'rows':_0x415e86});});},'VoiceChannels':function(_0x11029d){return new Promise(function(_0x4a19d1,_0x542623){var _0x13f9f8=_['values'](_0x507e34[_0x7446('0x58')]);_0x4a19d1({'count':_0x13f9f8[_0x7446('0x57')],'rows':_0x13f9f8});});},'VoiceChannelMixMonitor':function(_0x52d2ab){var _0x1d4e36=this;return new Promise(function(_0x3fad2f,_0x4b700a){if(ami[_0x7446('0x10')]()==![]){return _0x4b700a(_0x1d4e36[_0x7446('0x11')](0x1f4,[config[_0x7446('0x12')]['ip'],config[_0x7446('0x12')][_0x7446('0x59')],_0x7446('0x13')][_0x7446('0x14')]('\x20')));}var _0x5e53e=schema(properties[_0x7446('0x5a')])[_0x7446('0x3')](_0x52d2ab);if(_0x5e53e[_0x7446('0x57')]>0x0){return _0x4b700a(_0x1d4e36[_0x7446('0x11')](0x1f4,_[_0x7446('0x5b')](_0x5e53e,_0x7446('0x1b'))['join'](',\x20')));}var _0xb06934=_[_0x7446('0x5c')](_0x507e34[_0x7446('0x58')],{'uniqueid':_0x52d2ab[_0x7446('0x5d')]});if(_0xb06934&&_0xb06934['channel']){var _0x14097c=util[_0x7446('0x8')](_0x7446('0x5e'),_0x52d2ab[_0x7446('0x5f')]||_0x52d2ab[_0x7446('0x5d')],_0x52d2ab[_0x7446('0x8')]||_0x7446('0x60'));return ami[_0x7446('0x19')]({'action':_0x7446('0x61'),'channel':_0xb06934['channel'],'file':_0x14097c,'options':'ai(mixmonitorid)'})[_0x7446('0x1a')](function(_0x91452d){var _0x42edd3=_['find'](_0xb06934['monitors'],{'filename':_0x7446('0x62')+_0x14097c[_0x7446('0x63')]()});if(_[_0x7446('0x64')](_0x42edd3)){_0xb06934[_0x7446('0x65')][_0x7446('0x56')]({'filename':_0x7446('0x62')+_0x14097c[_0x7446('0x63')](),'createdAt':moment()[_0x7446('0x8')](_0x7446('0x66')),'mixmonitorid':_0x91452d[_0x7446('0x67')],'status':'rec'});}else{_0x42edd3[_0x7446('0x67')]=_0x91452d[_0x7446('0x67')];_0x42edd3['status']=_0x7446('0x68');}_0x3fad2f({'code':0xc8,'message':[_0x52d2ab[_0x7446('0x5d')],_0x7446('0x69'),_0x91452d[_0x7446('0x67')]]['join']('\x20'),'mixmonitorid':_0x91452d[_0x7446('0x67')]});})[_0x7446('0x1c')](function(_0x3eec8c){_0x4b700a(_0x1d4e36[_0x7446('0x11')](0x1f5,[_0x52d2ab[_0x7446('0x5d')],_0x3eec8c['message']['toLowerCase']()]['join']('\x20')));});}else{return _0x4b700a(_0x1d4e36[_0x7446('0x11')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceChannelStopMixMonitor':function(_0x23dd85){var _0x406a7f=this;return new Promise(function(_0x373bad,_0x5e5301){if(ami[_0x7446('0x10')]()==![]){return _0x5e5301(_0x406a7f[_0x7446('0x11')](0x1f4,[config['asterisk']['ip'],config[_0x7446('0x12')][_0x7446('0x59')],_0x7446('0x13')][_0x7446('0x14')]('\x20')));}var _0x54e005=schema(properties[_0x7446('0x5a')])[_0x7446('0x3')](_0x23dd85);if(_0x54e005[_0x7446('0x57')]>0x0){return _0x5e5301(_0x406a7f[_0x7446('0x11')](0x1f4,_[_0x7446('0x5b')](_0x54e005,'message')[_0x7446('0x14')](',\x20')));}var _0x45a0f7=_[_0x7446('0x5c')](_0x507e34[_0x7446('0x58')],{'uniqueid':_0x23dd85[_0x7446('0x5d')]});if(_0x45a0f7){return BPromise[_0x7446('0x6a')]()[_0x7446('0x1a')](function(){if(_0x45a0f7[_0x7446('0x6b')]){return ami[_0x7446('0x19')]({'action':'StopMixMonitor','channel':_0x45a0f7[_0x7446('0x6b')],'mixmonitorid':_0x23dd85[_0x7446('0x67')]})[_0x7446('0x1c')](function(_0xd426dd){});}})[_0x7446('0x1a')](function(){if(_0x45a0f7[_0x7446('0x6c')]){return ami[_0x7446('0x19')]({'action':_0x7446('0x6d'),'channel':_0x45a0f7[_0x7446('0x6c')],'mixmonitorid':_0x23dd85[_0x7446('0x67')]})[_0x7446('0x1c')](function(_0xd8ed7e){});}})[_0x7446('0x1a')](function(_0x147aa9){var _0x548301=_['find'](_0x45a0f7[_0x7446('0x65')],{'mixmonitorid':_0x23dd85[_0x7446('0x67')]});if(_0x548301){_0x548301[_0x7446('0x6e')]='stop';}})[_0x7446('0x1a')](function(){var _0x21986b=util[_0x7446('0x8')](_0x7446('0x5e'),_0x23dd85[_0x7446('0x5f')]||_0x23dd85['uniqueid'],_0x23dd85[_0x7446('0x8')]||_0x7446('0x60'));var _0x22cf55=_[_0x7446('0x5c')](_0x45a0f7[_0x7446('0x65')],{'filename':_0x7446('0x62')+_0x21986b[_0x7446('0x63')]()});if(_0x22cf55){_0x22cf55[_0x7446('0x6e')]=_0x7446('0x6f');}})[_0x7446('0x1a')](function(){_0x373bad({'code':0xc8,'message':[_0x23dd85['uniqueid'],_0x7446('0x70')][_0x7446('0x14')]('\x20')});})[_0x7446('0x1c')](function(_0x2c1b81){_0x5e5301(_0x406a7f['error'](0x1f5,[_0x23dd85[_0x7446('0x5d')],_0x2c1b81[_0x7446('0x1b')][_0x7446('0x63')]()]['join']('\x20')));});}else{return _0x5e5301(_0x406a7f[_0x7446('0x11')](0x1f5,_0x7446('0x71')));}});},'VoiceQueuesChannels':function(_0x4a4d6b){return new Promise(function(_0x4883d5,_0x213779){var _0x355620=_[_0x7446('0x72')](_0x507e34[_0x7446('0x73')]);_0x4883d5({'count':_0x355620[_0x7446('0x57')],'rows':_0x355620});});},'VoiceQueuesChannel':function(_0x2fe467){var _0x37bf6b=this;return new Promise(function(_0x48a4fd,_0x31a862){var _0x561db9=schema(properties[_0x7446('0x74')])[_0x7446('0x3')](_0x2fe467);if(_0x561db9[_0x7446('0x57')]>0x0){return _0x31a862(_0x37bf6b['error'](0x1f4,_[_0x7446('0x5b')](_0x561db9,_0x7446('0x1b'))[_0x7446('0x14')](',\x20')));}var _0x2364c9=_[_0x7446('0x5c')](_0x507e34['queueChannels'],{'uniqueid':_0x2fe467['uniqueid']});if(_0x2364c9){_0x48a4fd(_0x2364c9);}else{return _0x31a862(_0x37bf6b[_0x7446('0x11')](0x1f5,_0x7446('0x71')));}});},'VoiceQueuesChannelHangup':function(_0x1502fc){var _0x4a22bf=this;return new Promise(function(_0x12e12c,_0x4ff6f1){if(ami[_0x7446('0x10')]()==![]){return _0x4ff6f1(_0x4a22bf[_0x7446('0x11')](0x1f4,[config['asterisk']['ip'],config[_0x7446('0x12')][_0x7446('0x59')],'ami\x20disconnected']['join']('\x20')));}var _0x2d46c8=schema(properties['voicequeuechannelhangup'])[_0x7446('0x3')](_0x1502fc);if(_0x2d46c8[_0x7446('0x57')]>0x0){return _0x4ff6f1(_0x4a22bf[_0x7446('0x11')](0x1f4,_[_0x7446('0x5b')](_0x2d46c8,_0x7446('0x1b'))['join'](',\x20')));}var _0x30b7c0=_[_0x7446('0x5c')](_0x507e34[_0x7446('0x73')],{'uniqueid':_0x1502fc[_0x7446('0x5d')]});if(_0x30b7c0&&_0x30b7c0['channel']){return ami[_0x7446('0x19')]({'action':'Hangup','channel':_0x30b7c0[_0x7446('0x6b')]})[_0x7446('0x1a')](function(_0x12fac8){_0x12e12c({'code':0xc8,'message':[_0x1502fc[_0x7446('0x5d')],_0x12fac8[_0x7446('0x1b')][_0x7446('0x63')]()][_0x7446('0x14')]('\x20')});})['catch'](function(_0x5dbcdd){_0x4ff6f1(_0x4a22bf[_0x7446('0x11')](0x1f5,[_0x1502fc[_0x7446('0x5d')],_0x5dbcdd[_0x7446('0x1b')][_0x7446('0x63')]()][_0x7446('0x14')]('\x20')));});}else{return _0x4ff6f1(_0x4a22bf[_0x7446('0x11')](0x1f5,_0x7446('0x71')));}});},'VoiceQueuesChannelRedirect':function(_0x2e4273){var _0x32f883=this;return new Promise(function(_0x1f7dfb,_0x38cea3){if(ami[_0x7446('0x10')]()==![]){return _0x38cea3(_0x32f883[_0x7446('0x11')](0x1f4,[config[_0x7446('0x12')]['ip'],config[_0x7446('0x12')][_0x7446('0x59')],'ami\x20disconnected'][_0x7446('0x14')]('\x20')));}var _0x107b67=schema(properties[_0x7446('0x75')])['validate'](_0x2e4273);if(_0x107b67[_0x7446('0x57')]>0x0){return _0x38cea3(_0x32f883['error'](0x1f4,_[_0x7446('0x5b')](_0x107b67,_0x7446('0x1b'))[_0x7446('0x14')](',\x20')));}var _0x17e504=_[_0x7446('0x5c')](_0x507e34[_0x7446('0x73')],{'uniqueid':_0x2e4273[_0x7446('0x5d')]});if(_0x17e504&&_0x17e504['channel']){return ami['Action']({'action':'Redirect','channel':_0x17e504['channel'],'exten':_0x2e4273[_0x7446('0x76')],'context':_0x2e4273[_0x7446('0x77')]||_0x17e504[_0x7446('0x77')],'priority':0x1})[_0x7446('0x1a')](function(_0x210489){_0x1f7dfb({'code':0xc8,'message':[_0x2e4273[_0x7446('0x5d')],_0x210489[_0x7446('0x1b')][_0x7446('0x63')]()]['join']('\x20')});})[_0x7446('0x1c')](function(_0x39be8e){_0x38cea3(_0x32f883[_0x7446('0x11')](0x1f5,[_0x2e4273[_0x7446('0x5d')],_0x39be8e[_0x7446('0x1b')][_0x7446('0x63')]()][_0x7446('0x14')]('\x20')));});}else{return _0x38cea3(_0x32f883[_0x7446('0x11')](0x1f5,_0x7446('0x71')));}});},'Agents':function(_0x2ee903){return new Promise(function(_0xf80c5a,_0xd35d06){var _0xf88668=_[_0x7446('0x72')](_0x507e34[_0x7446('0xe')]);_0xf80c5a({'count':_0xf88668[_0x7446('0x57')],'rows':_0xf88668});});},'Telephones':function(_0x5e38ae){return new Promise(function(_0x158a30,_0x10b6e7){var _0x2a84c6=_[_0x7446('0x72')](_0x507e34['telephones']);_0x158a30({'count':_0x2a84c6[_0x7446('0x57')],'rows':_0x2a84c6});});},'Trunks':function(_0x2dbea9){return new Promise(function(_0x61e20e,_0x5e5c2f){var _0x4f61af=_[_0x7446('0x72')](_0x507e34['trunks']);_0x61e20e({'count':_0x4f61af[_0x7446('0x57')],'rows':_0x4f61af});});},'OutboundChannels':function(_0x268cff){return new Promise(function(_0x485651,_0x24629d){var _0x463cf3=_[_0x7446('0x72')](_0x507e34[_0x7446('0x78')]);_0x485651({'count':_0x463cf3[_0x7446('0x57')],'rows':_0x463cf3});});},'Outbound':function(_0x5f2093){return new Promise(function(_0x4e4545,_0x5d7194){_0x4e4545(_0x507e34[_0x7446('0x2d')]);});},'Campaigns':function(_0x2d8143){return new Promise(function(_0x1aa1a,_0x153266){var _0x396b9d=_['values'](_0x507e34[_0x7446('0x79')]);_0x1aa1a({'count':_0x396b9d[_0x7446('0x57')],'rows':_0x396b9d});});},'VoiceQueuesPreview':function(_0x2eece1){var _0x343c13=this;return new Promise(function(_0x81fa14,_0x2df81a){_0x30eb6a['run'](_0x2eece1['id'])[_0x7446('0x1a')](function(_0x318c86){_0x81fa14({'code':0xc8,'message':_0x318c86['message']});})[_0x7446('0x1c')](function(_0x6ebc4e){_0x2df81a(_0x343c13[_0x7446('0x11')](0x1f4,_0x6ebc4e['message']));});});},'EventManager':function(_0xbef79d){var _0x96e1=this;return new Promise(function(_0x179f65,_0x2d7685){if(!_0xbef79d[_0x7446('0x7a')]){return _0x2d7685(_0x96e1[_0x7446('0x11')](0x1f4,_0x7446('0x7b')));}ami[_0x7446('0x7c')](_0x7446('0x7d')+_0xbef79d[_0x7446('0x7a')],_0xbef79d[_0x7446('0x1b')]);_0x179f65({'code':0xc8,'message':_0xbef79d});});},'FaxAccounts':function(_0x5706ed){return new Promise(function(_0x571130,_0x51dafb){var _0x26343a=_[_0x7446('0x72')](_0x507e34[_0x7446('0x7e')]);_0x571130({'count':_0x26343a[_0x7446('0x57')],'rows':_0x26343a});});},'SendFax':function(_0x5e907f){var _0x2afe43=this;return new Promise(function(_0xdcb370,_0x439f4b){_0x167c0b[_0x7446('0x7f')](_0x5e907f)['then'](function(_0x2e0aa8){_0xdcb370({'code':0xc8,'message':_0x2e0aa8['message']});})['catch'](function(_0x7d01de){_0x439f4b(_0x2afe43[_0x7446('0x11')](0x1f4,_0x7d01de['message']));});});},'CheckAfterSend':function(_0x234d5c){var _0x11fedd=this;return new Promise(function(_0x147596,_0x17e1d6){_0x167c0b[_0x7446('0x80')](_0x234d5c)[_0x7446('0x1a')](function(_0x3c2def){_0x147596({'code':0xc8,'message':_0x3c2def['message']});})[_0x7446('0x1c')](function(_0x328a05){_0x17e1d6(_0x11fedd[_0x7446('0x11')](0x1f4,_0x328a05['message']));});});}};var _0x4439fc=jayson[_0x7446('0x81')](_0x201304)['http']();_0x4439fc['on'](_0x7446('0x11'),function(_0x1519d7){return _0x213b37(_0x1519d7);});_0x4439fc[_0x7446('0x82')](0x232a,_0x7446('0x83'),function(){console[_0x7446('0x84')](_0x7446('0x85'),0x232a);return _0x42bb6c(_0x7446('0x86')+0x232a);});});};
\ No newline at end of file
+var _0xaf02=['127.0.0.1','log','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','lodash','util','jayson/promise','validate','bluebird','../properties','../ami','%s/%s','SIP','timers','timer','agents','pause','QueuePause','isConnected','error','asterisk','username','ami\x20disconnected','join','keys','module','Action','then','message','pick','command','action','Command','content','catch','voiceQueues','hasOwnProperty','name','strategy','answered','available','loggedIn','sumDuration','sumHoldTime','talking','total','unmanaged','abandoned','waiting','type','outbound','dialActive','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','active','callerid','Interval','push','length','values','voicechannel','map','find','channels','uniqueid','channel','format','wav','MixMonitor','/var/spool/asterisk/monitor/','toLowerCase','monitors','YYYY-MM-DD\x20HH:mm:ss','mixmonitorid','rec','MixMonitor\x20Success','Channel\x20doesn\x27t\x20exist','resolve','StopMixMonitor','destinationchannel','status','stop','%s.%s','StopMixMonitor\x20Success','queueChannels','voicequeuechannel','voicequeuechannelhangup','Hangup','voicequeuechannelredirect','exten','context','telephones','run','event','Event\x20name\x20mandatory','emit','custom:','faxAccounts','send','server','http','listen'];(function(_0xd37e3d,_0x5c9573){var _0xff1ac0=function(_0x32edb7){while(--_0x32edb7){_0xd37e3d['push'](_0xd37e3d['shift']());}};_0xff1ac0(++_0x5c9573);}(_0xaf02,0x10f));var _0x2af0=function(_0x22570f,_0x611899){_0x22570f=_0x22570f-0x0;var _0x3d6f25=_0xaf02[_0x22570f];return _0x3d6f25;};'use strict';var _=require(_0x2af0('0x0'));var util=require(_0x2af0('0x1'));var jayson=require(_0x2af0('0x2'));var schema=require(_0x2af0('0x3'));var BPromise=require(_0x2af0('0x4'));var moment=require('moment');var config=require('../../../config/environment');var properties=require(_0x2af0('0x5'));var ami=require(_0x2af0('0x6'));exports['listen']=function(_0x5b487e,_0x3932b4,_0x444e6c){return new BPromise(function(_0x500b17,_0x31d67e){var _0x3854f4={'QueuePause':function(_0x3048da){return new Promise(function(_0xc7945,_0x3fc860){var _0x5de753=util['format'](_0x2af0('0x7'),_0x2af0('0x8'),_0x3048da['name']);if(_0x5b487e['timers']&&_0x5b487e[_0x2af0('0x9')][_0x5de753]&&_0x5b487e[_0x2af0('0x9')][_0x5de753][_0x2af0('0xa')]){_0x5b487e[_0x2af0('0x9')][_0x5de753]['updateAcw']();}if(_0x5b487e[_0x2af0('0xb')][_0x5de753]){_0x5b487e[_0x2af0('0xb')][_0x5de753]['updateStatusRealtime']({'statePause':_0x3048da[_0x2af0('0xc')]?!![]:![]});}_0xc7945({'code':0xc8,'message':_0x2af0('0xd')});});},'Reload':function(_0x4f4017){var _0x369ac9=this;return new Promise(function(_0x152b30,_0x315d90){if(ami[_0x2af0('0xe')]()==![]){return _0x315d90(_0x369ac9[_0x2af0('0xf')](0x1f4,[config['asterisk']['ip'],config[_0x2af0('0x10')][_0x2af0('0x11')],_0x2af0('0x12')][_0x2af0('0x13')]('\x20')));}_0x4f4017=_['pick'](_0x4f4017,_[_0x2af0('0x14')](properties[_0x2af0('0x15')]));_0x4f4017['action']='Reload';return ami[_0x2af0('0x16')](_0x4f4017)[_0x2af0('0x17')](function(_0x483bc3){_0x152b30({'code':0xc8,'message':_0x483bc3[_0x2af0('0x18')]});})['catch'](function(_0x20e1b1){_0x315d90(_0x369ac9[_0x2af0('0xf')](0x1f5,_0x20e1b1[_0x2af0('0x18')]));});});},'Command':function(_0x3aeed8){var _0x241e6e=this;return new Promise(function(_0x88bf5e,_0x3f75b8){if(ami[_0x2af0('0xe')]()==![]){return _0x3f75b8(_0x241e6e[_0x2af0('0xf')](0x1f4,[config[_0x2af0('0x10')]['ip'],config[_0x2af0('0x10')][_0x2af0('0x11')],_0x2af0('0x12')]['join']('\x20')));}_0x3aeed8=_[_0x2af0('0x19')](_0x3aeed8,_0x2af0('0x1a'));_0x3aeed8[_0x2af0('0x1b')]=_0x2af0('0x1c');return ami[_0x2af0('0x16')](_0x3aeed8)[_0x2af0('0x17')](function(_0x311ac7){_0x88bf5e({'code':0xc8,'message':_0x311ac7[_0x2af0('0x1d')]});})[_0x2af0('0x1e')](function(_0x460fed){_0x3f75b8(_0x241e6e[_0x2af0('0xf')](0x1f5,_0x460fed[_0x2af0('0x18')]));});});},'VoiceQueues':function(_0x442a1c){return new Promise(function(_0x574580,_0x526a55){var _0x47eb8a=[];for(var _0x3876c5 in _0x5b487e[_0x2af0('0x1f')]){if(_0x5b487e[_0x2af0('0x1f')][_0x2af0('0x20')](_0x3876c5)){var _0x142fbf=_0x5b487e[_0x2af0('0x1f')][_0x3876c5];var _0x263c8c={'id':_0x142fbf['id'],'name':_0x142fbf[_0x2af0('0x21')],'strategy':_0x142fbf[_0x2af0('0x22')],'answered':_0x142fbf[_0x2af0('0x23')],'available':_0x142fbf[_0x2af0('0x24')],'loggedIn':_0x142fbf[_0x2af0('0x25')],'pTalking':_0x142fbf['pTalking'],'sumBillable':_0x142fbf['sumBillable'],'sumDuration':_0x142fbf[_0x2af0('0x26')],'sumHoldTime':_0x142fbf[_0x2af0('0x27')]||0x0,'talking':_0x142fbf[_0x2af0('0x28')],'total':_0x142fbf[_0x2af0('0x29')],'type':_0x142fbf['type'],'unmanaged':_0x142fbf[_0x2af0('0x2a')],'abandoned':_0x142fbf[_0x2af0('0x2b')],'waiting':_0x142fbf[_0x2af0('0x2c')],'loggedInDb':_0x142fbf['loggedInDb']};if(_0x142fbf[_0x2af0('0x2d')]===_0x2af0('0x2e')){_0x263c8c['dialActive']=_0x142fbf[_0x2af0('0x2f')];_0x263c8c['dialMethod']=_0x142fbf['dialMethod'];_0x263c8c[_0x2af0('0x30')]=_0x142fbf[_0x2af0('0x30')];_0x263c8c[_0x2af0('0x31')]=_0x142fbf[_0x2af0('0x31')];_0x263c8c[_0x2af0('0x32')]=_0x142fbf['dialOriginateTimeout'];_0x263c8c[_0x2af0('0x33')]=_0x142fbf[_0x2af0('0x33')];_0x263c8c[_0x2af0('0x34')]=_0x142fbf[_0x2af0('0x34')];_0x263c8c[_0x2af0('0x35')]=_0x142fbf[_0x2af0('0x35')];_0x263c8c[_0x2af0('0x36')]=_0x142fbf[_0x2af0('0x36')];_0x263c8c['outboundBusyCallsDay']=_0x142fbf[_0x2af0('0x37')];_0x263c8c['outboundCongestionCallsDay']=_0x142fbf['outboundCongestionCallsDay'];_0x263c8c[_0x2af0('0x38')]=_0x142fbf['outboundDropCallsDayACS'];_0x263c8c[_0x2af0('0x39')]=_0x142fbf[_0x2af0('0x39')];_0x263c8c[_0x2af0('0x3a')]=_0x142fbf[_0x2af0('0x3a')];_0x263c8c[_0x2af0('0x3b')]=_0x142fbf['outboundNoAnswerCallsDay'];_0x263c8c['outboundNoSuchCallsDay']=_0x142fbf[_0x2af0('0x3c')];_0x263c8c['outboundOriginateFailureCallsDay']=_0x142fbf[_0x2af0('0x3d')];_0x263c8c[_0x2af0('0x3e')]=_0x142fbf[_0x2af0('0x3e')];_0x263c8c[_0x2af0('0x3f')]=_0x142fbf[_0x2af0('0x3f')];_0x263c8c[_0x2af0('0x40')]=_0x142fbf[_0x2af0('0x40')];_0x263c8c[_0x2af0('0x41')]=_0x142fbf[_0x2af0('0x41')];_0x263c8c['predictiveIntervalAvgHoldtime']=_0x142fbf['predictiveIntervalAvgHoldtime'];_0x263c8c['predictiveIntervalAvgTalktime']=_0x142fbf[_0x2af0('0x42')];_0x263c8c[_0x2af0('0x43')]=_0x142fbf['predictiveIntervalDroppedCallsCallersExit'];_0x263c8c[_0x2af0('0x44')]=_0x142fbf[_0x2af0('0x44')];_0x263c8c[_0x2af0('0x45')]=_0x142fbf[_0x2af0('0x45')];_0x263c8c['predictiveIntervalErlangCallsDroppedCalls']=_0x142fbf[_0x2af0('0x46')];_0x263c8c['predictiveIntervalHitRate']=_0x142fbf['predictiveIntervalHitRate'];_0x263c8c[_0x2af0('0x47')]=_0x142fbf['predictiveIntervalMultiplicativeFactor'];_0x263c8c['predictiveIntervalPauses']=_0x142fbf[_0x2af0('0x48')];_0x263c8c[_0x2af0('0x49')]=_0x142fbf['predictiveIntervalAvailable'];_0x263c8c[_0x2af0('0x4a')]=_0x142fbf['predictiveIntervalTotalCalls'];_0x263c8c[_0x2af0('0x18')]=_0x142fbf[_0x2af0('0x18')];_0x263c8c[_0x2af0('0x4b')]=_0x142fbf[_0x2af0('0x4b')];_0x263c8c[_0x2af0('0x4c')]=_0x142fbf[_0x2af0('0x4c')];_0x263c8c['erlangCallToSecond']=_0x142fbf[_0x2af0('0x4d')];_0x263c8c['erlangAbandonmentRate']=_0x142fbf[_0x2af0('0x4e')];_0x263c8c['erlangBusyFactor']=_0x142fbf[_0x2af0('0x4f')];_0x263c8c[_0x2af0('0x50')]=_0x142fbf[_0x2af0('0x50')];_0x263c8c[_0x2af0('0x51')]=_0x142fbf[_0x2af0('0x51')];}if(_0x142fbf['Trunk']){_0x263c8c[_0x2af0('0x52')]={'id':_0x142fbf[_0x2af0('0x52')]['id'],'name':_0x142fbf[_0x2af0('0x52')][_0x2af0('0x21')],'active':_0x142fbf['Trunk'][_0x2af0('0x53')],'callerid':_0x142fbf['Trunk'][_0x2af0('0x54')]};}if(_0x142fbf['Interval']){_0x263c8c['Interval']={'id':_0x142fbf[_0x2af0('0x55')]['id'],'name':_0x142fbf[_0x2af0('0x55')][_0x2af0('0x21')]};}_0x47eb8a[_0x2af0('0x56')](_0x263c8c);}}_0x574580({'count':_0x47eb8a[_0x2af0('0x57')],'rows':_0x47eb8a});});},'VoiceChannels':function(_0x58c3fe){return new Promise(function(_0x5da089,_0x4e1e02){var _0x14a0f9=_[_0x2af0('0x58')](_0x5b487e['channels']);_0x5da089({'count':_0x14a0f9[_0x2af0('0x57')],'rows':_0x14a0f9});});},'VoiceChannelMixMonitor':function(_0x1ebbb4){var _0x5959db=this;return new Promise(function(_0x424c95,_0x4c14df){if(ami[_0x2af0('0xe')]()==![]){return _0x4c14df(_0x5959db[_0x2af0('0xf')](0x1f4,[config[_0x2af0('0x10')]['ip'],config[_0x2af0('0x10')]['username'],_0x2af0('0x12')]['join']('\x20')));}var _0x3b35d0=schema(properties[_0x2af0('0x59')])[_0x2af0('0x3')](_0x1ebbb4);if(_0x3b35d0['length']>0x0){return _0x4c14df(_0x5959db[_0x2af0('0xf')](0x1f4,_[_0x2af0('0x5a')](_0x3b35d0,_0x2af0('0x18'))[_0x2af0('0x13')](',\x20')));}var _0x5e6a0b=_[_0x2af0('0x5b')](_0x5b487e[_0x2af0('0x5c')],{'uniqueid':_0x1ebbb4[_0x2af0('0x5d')]});if(_0x5e6a0b&&_0x5e6a0b[_0x2af0('0x5e')]){var _0x44a478=util[_0x2af0('0x5f')]('%s.%s',_0x1ebbb4['filename']||_0x1ebbb4[_0x2af0('0x5d')],_0x1ebbb4[_0x2af0('0x5f')]||_0x2af0('0x60'));return ami[_0x2af0('0x16')]({'action':_0x2af0('0x61'),'channel':_0x5e6a0b['channel'],'file':_0x44a478,'options':'ai(mixmonitorid)'})[_0x2af0('0x17')](function(_0x2e8c18){var _0x437fa2=_[_0x2af0('0x5b')](_0x5e6a0b['monitors'],{'filename':_0x2af0('0x62')+_0x44a478[_0x2af0('0x63')]()});if(_['isNil'](_0x437fa2)){_0x5e6a0b[_0x2af0('0x64')][_0x2af0('0x56')]({'filename':'/var/spool/asterisk/monitor/'+_0x44a478[_0x2af0('0x63')](),'createdAt':moment()['format'](_0x2af0('0x65')),'mixmonitorid':_0x2e8c18[_0x2af0('0x66')],'status':_0x2af0('0x67')});}else{_0x437fa2[_0x2af0('0x66')]=_0x2e8c18[_0x2af0('0x66')];_0x437fa2['status']=_0x2af0('0x67');}_0x424c95({'code':0xc8,'message':[_0x1ebbb4[_0x2af0('0x5d')],_0x2af0('0x68'),_0x2e8c18['mixmonitorid']]['join']('\x20'),'mixmonitorid':_0x2e8c18[_0x2af0('0x66')]});})['catch'](function(_0x3a510e){_0x4c14df(_0x5959db[_0x2af0('0xf')](0x1f5,[_0x1ebbb4[_0x2af0('0x5d')],_0x3a510e[_0x2af0('0x18')][_0x2af0('0x63')]()][_0x2af0('0x13')]('\x20')));});}else{return _0x4c14df(_0x5959db[_0x2af0('0xf')](0x1f5,_0x2af0('0x69')));}});},'VoiceChannelStopMixMonitor':function(_0x44067f){var _0x2a5508=this;return new Promise(function(_0x40f80b,_0x414031){if(ami['isConnected']()==![]){return _0x414031(_0x2a5508[_0x2af0('0xf')](0x1f4,[config[_0x2af0('0x10')]['ip'],config[_0x2af0('0x10')][_0x2af0('0x11')],_0x2af0('0x12')]['join']('\x20')));}var _0x2b7584=schema(properties[_0x2af0('0x59')])['validate'](_0x44067f);if(_0x2b7584[_0x2af0('0x57')]>0x0){return _0x414031(_0x2a5508[_0x2af0('0xf')](0x1f4,_[_0x2af0('0x5a')](_0x2b7584,_0x2af0('0x18'))['join'](',\x20')));}var _0x3aef2e=_[_0x2af0('0x5b')](_0x5b487e[_0x2af0('0x5c')],{'uniqueid':_0x44067f[_0x2af0('0x5d')]});if(_0x3aef2e){return BPromise[_0x2af0('0x6a')]()['then'](function(){if(_0x3aef2e['channel']){return ami['Action']({'action':_0x2af0('0x6b'),'channel':_0x3aef2e[_0x2af0('0x5e')],'mixmonitorid':_0x44067f[_0x2af0('0x66')]})['catch'](function(_0x3e0274){});}})['then'](function(){if(_0x3aef2e[_0x2af0('0x6c')]){return ami[_0x2af0('0x16')]({'action':_0x2af0('0x6b'),'channel':_0x3aef2e['destinationchannel'],'mixmonitorid':_0x44067f[_0x2af0('0x66')]})[_0x2af0('0x1e')](function(_0x562d30){});}})['then'](function(_0x14603d){var _0x44dc2a=_[_0x2af0('0x5b')](_0x3aef2e[_0x2af0('0x64')],{'mixmonitorid':_0x44067f['mixmonitorid']});if(_0x44dc2a){_0x44dc2a[_0x2af0('0x6d')]=_0x2af0('0x6e');}})['then'](function(){var _0x55bfd6=util['format'](_0x2af0('0x6f'),_0x44067f['filename']||_0x44067f[_0x2af0('0x5d')],_0x44067f[_0x2af0('0x5f')]||_0x2af0('0x60'));var _0x343cef=_['find'](_0x3aef2e[_0x2af0('0x64')],{'filename':'/var/spool/asterisk/monitor/'+_0x55bfd6[_0x2af0('0x63')]()});if(_0x343cef){_0x343cef['status']=_0x2af0('0x6e');}})[_0x2af0('0x17')](function(){_0x40f80b({'code':0xc8,'message':[_0x44067f['uniqueid'],_0x2af0('0x70')][_0x2af0('0x13')]('\x20')});})['catch'](function(_0x244597){_0x414031(_0x2a5508[_0x2af0('0xf')](0x1f5,[_0x44067f[_0x2af0('0x5d')],_0x244597[_0x2af0('0x18')][_0x2af0('0x63')]()]['join']('\x20')));});}else{return _0x414031(_0x2a5508[_0x2af0('0xf')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannels':function(_0x205d30){return new Promise(function(_0x2eb5cc,_0x1a9148){var _0x1ba984=_[_0x2af0('0x58')](_0x5b487e[_0x2af0('0x71')]);_0x2eb5cc({'count':_0x1ba984[_0x2af0('0x57')],'rows':_0x1ba984});});},'VoiceQueuesChannel':function(_0xc5705f){var _0x307a15=this;return new Promise(function(_0x32036f,_0x3d12c6){var _0x496e40=schema(properties[_0x2af0('0x72')])[_0x2af0('0x3')](_0xc5705f);if(_0x496e40[_0x2af0('0x57')]>0x0){return _0x3d12c6(_0x307a15[_0x2af0('0xf')](0x1f4,_[_0x2af0('0x5a')](_0x496e40,_0x2af0('0x18'))['join'](',\x20')));}var _0x28027c=_[_0x2af0('0x5b')](_0x5b487e[_0x2af0('0x71')],{'uniqueid':_0xc5705f['uniqueid']});if(_0x28027c){_0x32036f(_0x28027c);}else{return _0x3d12c6(_0x307a15[_0x2af0('0xf')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannelHangup':function(_0x3a3718){var _0x16a27f=this;return new Promise(function(_0xd5462e,_0x390928){if(ami[_0x2af0('0xe')]()==![]){return _0x390928(_0x16a27f[_0x2af0('0xf')](0x1f4,[config[_0x2af0('0x10')]['ip'],config[_0x2af0('0x10')][_0x2af0('0x11')],_0x2af0('0x12')][_0x2af0('0x13')]('\x20')));}var _0x28d838=schema(properties[_0x2af0('0x73')])[_0x2af0('0x3')](_0x3a3718);if(_0x28d838[_0x2af0('0x57')]>0x0){return _0x390928(_0x16a27f['error'](0x1f4,_[_0x2af0('0x5a')](_0x28d838,_0x2af0('0x18'))[_0x2af0('0x13')](',\x20')));}var _0x1313ee=_[_0x2af0('0x5b')](_0x5b487e[_0x2af0('0x71')],{'uniqueid':_0x3a3718[_0x2af0('0x5d')]});if(_0x1313ee&&_0x1313ee[_0x2af0('0x5e')]){return ami[_0x2af0('0x16')]({'action':_0x2af0('0x74'),'channel':_0x1313ee[_0x2af0('0x5e')]})[_0x2af0('0x17')](function(_0x3f9979){_0xd5462e({'code':0xc8,'message':[_0x3a3718[_0x2af0('0x5d')],_0x3f9979['message'][_0x2af0('0x63')]()][_0x2af0('0x13')]('\x20')});})[_0x2af0('0x1e')](function(_0x5d106b){_0x390928(_0x16a27f[_0x2af0('0xf')](0x1f5,[_0x3a3718['uniqueid'],_0x5d106b[_0x2af0('0x18')][_0x2af0('0x63')]()][_0x2af0('0x13')]('\x20')));});}else{return _0x390928(_0x16a27f[_0x2af0('0xf')](0x1f5,_0x2af0('0x69')));}});},'VoiceQueuesChannelRedirect':function(_0x3aaabf){var _0x478b48=this;return new Promise(function(_0x31e6fc,_0x2378e7){if(ami[_0x2af0('0xe')]()==![]){return _0x2378e7(_0x478b48['error'](0x1f4,[config[_0x2af0('0x10')]['ip'],config[_0x2af0('0x10')][_0x2af0('0x11')],_0x2af0('0x12')][_0x2af0('0x13')]('\x20')));}var _0x2e04a2=schema(properties[_0x2af0('0x75')])[_0x2af0('0x3')](_0x3aaabf);if(_0x2e04a2[_0x2af0('0x57')]>0x0){return _0x2378e7(_0x478b48['error'](0x1f4,_[_0x2af0('0x5a')](_0x2e04a2,_0x2af0('0x18'))[_0x2af0('0x13')](',\x20')));}var _0x9a4bd5=_['find'](_0x5b487e[_0x2af0('0x71')],{'uniqueid':_0x3aaabf[_0x2af0('0x5d')]});if(_0x9a4bd5&&_0x9a4bd5[_0x2af0('0x5e')]){return ami[_0x2af0('0x16')]({'action':'Redirect','channel':_0x9a4bd5[_0x2af0('0x5e')],'exten':_0x3aaabf[_0x2af0('0x76')],'context':_0x3aaabf[_0x2af0('0x77')]||_0x9a4bd5[_0x2af0('0x77')],'priority':0x1})[_0x2af0('0x17')](function(_0x3dd1a4){_0x31e6fc({'code':0xc8,'message':[_0x3aaabf[_0x2af0('0x5d')],_0x3dd1a4[_0x2af0('0x18')]['toLowerCase']()]['join']('\x20')});})[_0x2af0('0x1e')](function(_0x3d61cd){_0x2378e7(_0x478b48[_0x2af0('0xf')](0x1f5,[_0x3aaabf[_0x2af0('0x5d')],_0x3d61cd['message']['toLowerCase']()][_0x2af0('0x13')]('\x20')));});}else{return _0x2378e7(_0x478b48[_0x2af0('0xf')](0x1f5,_0x2af0('0x69')));}});},'Agents':function(_0x5cc232){return new Promise(function(_0x5c167e,_0x37513d){var _0x1966ed=_[_0x2af0('0x58')](_0x5b487e[_0x2af0('0xb')]);_0x5c167e({'count':_0x1966ed['length'],'rows':_0x1966ed});});},'Telephones':function(_0x3a104f){return new Promise(function(_0x3ec7d9,_0x44b913){var _0x599ff0=_['values'](_0x5b487e[_0x2af0('0x78')]);_0x3ec7d9({'count':_0x599ff0[_0x2af0('0x57')],'rows':_0x599ff0});});},'Trunks':function(_0x51d390){return new Promise(function(_0x256ca8,_0x27e2d8){var _0x47a2fd=_[_0x2af0('0x58')](_0x5b487e['trunks']);_0x256ca8({'count':_0x47a2fd[_0x2af0('0x57')],'rows':_0x47a2fd});});},'OutboundChannels':function(_0x34be2d){return new Promise(function(_0x14b965,_0xb87a43){var _0x28f4b0=_[_0x2af0('0x58')](_0x5b487e['outboundChannels']);_0x14b965({'count':_0x28f4b0[_0x2af0('0x57')],'rows':_0x28f4b0});});},'Outbound':function(_0x338bca){return new Promise(function(_0x3651b4,_0x280b48){_0x3651b4(_0x5b487e[_0x2af0('0x2e')]);});},'Campaigns':function(_0x2acb6f){return new Promise(function(_0x22e954,_0x4355f0){var _0xba6c44=_[_0x2af0('0x58')](_0x5b487e['campaigns']);_0x22e954({'count':_0xba6c44[_0x2af0('0x57')],'rows':_0xba6c44});});},'VoiceQueuesPreview':function(_0x1ac90f){var _0x2bef9e=this;return new Promise(function(_0x3fed09,_0x2f5178){_0x3932b4[_0x2af0('0x79')](_0x1ac90f['id'])[_0x2af0('0x17')](function(_0x4905a8){_0x3fed09({'code':0xc8,'message':_0x4905a8[_0x2af0('0x18')]});})[_0x2af0('0x1e')](function(_0x11242c){_0x2f5178(_0x2bef9e[_0x2af0('0xf')](0x1f4,_0x11242c[_0x2af0('0x18')]));});});},'EventManager':function(_0x5569e3){var _0x1d5ad5=this;return new Promise(function(_0x303f7d,_0x5a9707){if(!_0x5569e3[_0x2af0('0x7a')]){return _0x5a9707(_0x1d5ad5[_0x2af0('0xf')](0x1f4,_0x2af0('0x7b')));}ami[_0x2af0('0x7c')](_0x2af0('0x7d')+_0x5569e3[_0x2af0('0x7a')],_0x5569e3[_0x2af0('0x18')]);_0x303f7d({'code':0xc8,'message':_0x5569e3});});},'FaxAccounts':function(_0x31c35b){return new Promise(function(_0x9090c,_0x11b8c3){var _0x30a8aa=_[_0x2af0('0x58')](_0x5b487e[_0x2af0('0x7e')]);_0x9090c({'count':_0x30a8aa[_0x2af0('0x57')],'rows':_0x30a8aa});});},'SendFax':function(_0x2ac8cf){var _0x248898=this;return new Promise(function(_0x193fd1,_0x3115e6){_0x444e6c[_0x2af0('0x7f')](_0x2ac8cf)['then'](function(_0x4f7e0f){_0x193fd1({'code':0xc8,'message':_0x4f7e0f[_0x2af0('0x18')]});})[_0x2af0('0x1e')](function(_0x5b70d4){_0x3115e6(_0x248898[_0x2af0('0xf')](0x1f4,_0x5b70d4[_0x2af0('0x18')]));});});},'CheckAfterSend':function(_0x277dc8){var _0x127ea1=this;return new Promise(function(_0x442ea3,_0x59ea14){_0x444e6c['checkAfterSend'](_0x277dc8)[_0x2af0('0x17')](function(_0x58fc60){_0x442ea3({'code':0xc8,'message':_0x58fc60[_0x2af0('0x18')]});})[_0x2af0('0x1e')](function(_0x306ea6){_0x59ea14(_0x127ea1[_0x2af0('0xf')](0x1f4,_0x306ea6['message']));});});}};var _0x19088c=jayson[_0x2af0('0x80')](_0x3854f4)[_0x2af0('0x81')]();_0x19088c['on'](_0x2af0('0xf'),function(_0x4202e9){return _0x31d67e(_0x4202e9);});_0x19088c[_0x2af0('0x82')](0x232a,_0x2af0('0x83'),function(){console[_0x2af0('0x84')](_0x2af0('0x85'),0x232a);return _0x500b17('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 33043ad..9e2d809 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 _0x6b47=['showContact','omit','xmd-contactid2','format','user:%s','toLowerCase','merge','name','trigger:%s','Error\x20creating\x20contact','action','util','ioredis','../../../../config/environment','../../../../config/logger','trigger','redis','defaults','localhost','socket.io-emitter','info','stringify','emit','exec','autoCreate','data2','data1','calleridnum','routeId','firstName','calleridname','uniqueid','destcalleridname','','destcalleridnum','resolve','then'];(function(_0x551276,_0x5f28eb){var _0x9b1c35=function(_0x5a7939){while(--_0x5a7939){_0x551276['push'](_0x551276['shift']());}};_0x9b1c35(++_0x5f28eb);}(_0x6b47,0xe9));var _0x76b4=function(_0x39979b,_0x2111f9){_0x39979b=_0x39979b-0x0;var _0x560b41=_0x6b47[_0x39979b];return _0x560b41;};'use strict';var BPromise=require('bluebird');var util=require(_0x76b4('0x0'));var _=require('lodash');var Redis=require(_0x76b4('0x1'));var config=require(_0x76b4('0x2'));var logger=require(_0x76b4('0x3'))(_0x76b4('0x4'));var cmContactRpc=require('../../rpc/cmContact');config[_0x76b4('0x5')]=_[_0x76b4('0x6')](config[_0x76b4('0x5')],{'host':_0x76b4('0x7'),'port':0x18eb});var io=require(_0x76b4('0x8'))(new Redis(config['redis']));function emit(_0x461190,_0x2a0690,_0x6b3a2e){logger[_0x76b4('0x9')](_0x461190,_0x2a0690,JSON[_0x76b4('0xa')](_0x6b3a2e));io['to'](_0x461190)[_0x76b4('0xb')](_0x2a0690,_0x6b3a2e);}exports[_0x76b4('0xc')]=function(_0x127be2,_0x29fce8,_0x13de21){_0x13de21[_0x76b4('0xd')]=0x0;if(_0x29fce8[_0x76b4('0xe')]&&parseInt(_0x29fce8[_0x76b4('0xe')],0xa)){var _0x4d8823={'ListId':parseInt(_0x29fce8[_0x76b4('0xf')],0xa),'phone':_0x13de21[_0x76b4('0x10')]};if(_['isNil'](_0x13de21[_0x76b4('0x11')])){_0x4d8823[_0x76b4('0x12')]=_0x13de21[_0x76b4('0x13')]&&_0x13de21['calleridname']!==''?_0x13de21[_0x76b4('0x13')]:_0x13de21[_0x76b4('0x10')]||_0x13de21[_0x76b4('0x14')];}else{_0x4d8823[_0x76b4('0x12')]=_0x13de21[_0x76b4('0x15')]&&_0x13de21[_0x76b4('0x15')]!==_0x76b4('0x16')?_0x13de21[_0x76b4('0x15')]:_0x13de21[_0x76b4('0x17')]||_0x13de21[_0x76b4('0x14')];_0x4d8823['phone']=_0x13de21['destcalleridname']&&_0x13de21[_0x76b4('0x15')]!==_0x76b4('0x16')?_0x13de21['destcalleridname']:_0x13de21['destcalleridnum']||_0x13de21[_0x76b4('0x14')];}BPromise[_0x76b4('0x18')]()[_0x76b4('0x19')](cmContactRpc[_0x76b4('0x1a')]({'where':_[_0x76b4('0x1b')](_0x4d8823,['firstName'])}))[_0x76b4('0x19')](function(_0xac5264){if(_0xac5264){_0x13de21[_0x76b4('0x1c')]=_0xac5264['id'];emit(util[_0x76b4('0x1d')](_0x76b4('0x1e'),_0x127be2['name']),util[_0x76b4('0x1d')]('trigger:%s',_0x29fce8['action'][_0x76b4('0x1f')]()),_[_0x76b4('0x20')](_0x13de21,{'ListId':parseInt(_0x29fce8[_0x76b4('0xf')],0xa)}));return;}else{return BPromise['resolve']()[_0x76b4('0x19')](cmContactRpc['createContact'](_0x4d8823));}})[_0x76b4('0x19')](function(_0x40f3ec){if(_0x40f3ec){_0x13de21[_0x76b4('0x1c')]=_0x40f3ec['id'];emit(util[_0x76b4('0x1d')](_0x76b4('0x1e'),_0x127be2[_0x76b4('0x21')]),util[_0x76b4('0x1d')](_0x76b4('0x22'),_0x29fce8['action'][_0x76b4('0x1f')]()),_['merge'](_0x13de21,{'ListId':parseInt(_0x29fce8[_0x76b4('0xf')],0xa)}));}})['catch'](function(_0x324c0e){logger['error'](_0x76b4('0x23'),JSON[_0x76b4('0xa')](_0x324c0e));});}else{if(_0x127be2){emit(util['format'](_0x76b4('0x1e'),_0x127be2[_0x76b4('0x21')]),util[_0x76b4('0x1d')]('trigger:%s',_0x29fce8[_0x76b4('0x24')][_0x76b4('0x1f')]()),_[_0x76b4('0x20')]({'ListId':parseInt(_0x29fce8['data1'],0xa)},_0x13de21));}}};
\ No newline at end of file
+var _0x6efe=['name','trigger:%s','action','toLowerCase','createContact','merge','catch','error','bluebird','util','lodash','ioredis','../../../../config/environment','../../rpc/cmContact','redis','defaults','localhost','stringify','emit','exec','autoCreate','data2','data1','calleridnum','isNil','routeId','calleridname','','uniqueid','destcalleridname','destcalleridnum','phone','resolve','omit','then','xmd-contactid2','format','user:%s'];(function(_0x39cf43,_0x3a5b9c){var _0x5d6580=function(_0x47d372){while(--_0x47d372){_0x39cf43['push'](_0x39cf43['shift']());}};_0x5d6580(++_0x3a5b9c);}(_0x6efe,0xc6));var _0xe6ef=function(_0x1d0636,_0x21a5e6){_0x1d0636=_0x1d0636-0x0;var _0xa7adc0=_0x6efe[_0x1d0636];return _0xa7adc0;};'use strict';var BPromise=require(_0xe6ef('0x0'));var util=require(_0xe6ef('0x1'));var _=require(_0xe6ef('0x2'));var Redis=require(_0xe6ef('0x3'));var config=require(_0xe6ef('0x4'));var logger=require('../../../../config/logger')('trigger');var cmContactRpc=require(_0xe6ef('0x5'));config[_0xe6ef('0x6')]=_[_0xe6ef('0x7')](config[_0xe6ef('0x6')],{'host':_0xe6ef('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xe6ef('0x6')]));function emit(_0x422e13,_0x599b6c,_0x4a4bb9){logger['info'](_0x422e13,_0x599b6c,JSON[_0xe6ef('0x9')](_0x4a4bb9));io['to'](_0x422e13)[_0xe6ef('0xa')](_0x599b6c,_0x4a4bb9);}exports[_0xe6ef('0xb')]=function(_0x4fca2f,_0x283da2,_0x55a13c){_0x55a13c[_0xe6ef('0xc')]=0x0;if(_0x283da2[_0xe6ef('0xd')]&&parseInt(_0x283da2[_0xe6ef('0xd')],0xa)){var _0x142f4c={'ListId':parseInt(_0x283da2[_0xe6ef('0xe')],0xa),'phone':_0x55a13c[_0xe6ef('0xf')]};if(_[_0xe6ef('0x10')](_0x55a13c[_0xe6ef('0x11')])){_0x142f4c['firstName']=_0x55a13c[_0xe6ef('0x12')]&&_0x55a13c[_0xe6ef('0x12')]!==_0xe6ef('0x13')?_0x55a13c[_0xe6ef('0x12')]:_0x55a13c['calleridnum']||_0x55a13c[_0xe6ef('0x14')];}else{_0x142f4c['firstName']=_0x55a13c[_0xe6ef('0x15')]&&_0x55a13c[_0xe6ef('0x15')]!==_0xe6ef('0x13')?_0x55a13c[_0xe6ef('0x15')]:_0x55a13c[_0xe6ef('0x16')]||_0x55a13c[_0xe6ef('0x14')];_0x142f4c[_0xe6ef('0x17')]=_0x55a13c[_0xe6ef('0x15')]&&_0x55a13c[_0xe6ef('0x15')]!==_0xe6ef('0x13')?_0x55a13c[_0xe6ef('0x15')]:_0x55a13c[_0xe6ef('0x16')]||_0x55a13c[_0xe6ef('0x14')];}BPromise[_0xe6ef('0x18')]()['then'](cmContactRpc['showContact']({'where':_[_0xe6ef('0x19')](_0x142f4c,['firstName'])}))[_0xe6ef('0x1a')](function(_0x592176){if(_0x592176){_0x55a13c[_0xe6ef('0x1b')]=_0x592176['id'];emit(util[_0xe6ef('0x1c')](_0xe6ef('0x1d'),_0x4fca2f[_0xe6ef('0x1e')]),util[_0xe6ef('0x1c')](_0xe6ef('0x1f'),_0x283da2[_0xe6ef('0x20')][_0xe6ef('0x21')]()),_['merge'](_0x55a13c,{'ListId':parseInt(_0x283da2[_0xe6ef('0xe')],0xa)}));return;}else{return BPromise[_0xe6ef('0x18')]()['then'](cmContactRpc[_0xe6ef('0x22')](_0x142f4c));}})[_0xe6ef('0x1a')](function(_0x1d5d55){if(_0x1d5d55){_0x55a13c[_0xe6ef('0x1b')]=_0x1d5d55['id'];emit(util[_0xe6ef('0x1c')]('user:%s',_0x4fca2f[_0xe6ef('0x1e')]),util[_0xe6ef('0x1c')](_0xe6ef('0x1f'),_0x283da2['action'][_0xe6ef('0x21')]()),_[_0xe6ef('0x23')](_0x55a13c,{'ListId':parseInt(_0x283da2['data1'],0xa)}));}})[_0xe6ef('0x24')](function(_0xb9c909){logger[_0xe6ef('0x25')]('Error\x20creating\x20contact',JSON[_0xe6ef('0x9')](_0xb9c909));});}else{if(_0x4fca2f){emit(util[_0xe6ef('0x1c')]('user:%s',_0x4fca2f[_0xe6ef('0x1e')]),util[_0xe6ef('0x1c')](_0xe6ef('0x1f'),_0x283da2[_0xe6ef('0x20')][_0xe6ef('0x21')]()),_['merge']({'ListId':parseInt(_0x283da2[_0xe6ef('0xe')],0xa)},_0x55a13c));}}};
\ No newline at end of file
diff --git a/server/services/ami/trigger/index.js b/server/services/ami/trigger/index.js
index b71b589..046d75b 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 _0x6661=['interaction','message','event','agent','membername','lastevent','exports','util','url','mustache','ioredis','./cmContact','./script','../../../config/environment','../../../config/logger','trigger','../ami','defaults','redis','localhost','socket.io-emitter','popup','winapp','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','custom:agentcalled','syncCustomEvent','bind','custom:agentringnoanswer','custom:agentcomplete','custom:dialbegin','custom:dialconnect','custom:dialend','syncAgentDial','custom:newinteraction','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','emit','info','stringify','prototype','clone','checkTriggers','status','checkTrigger','merge','variables','Actions','length','interface','action','toLowerCase','contactmanager','motionbar','browser','data2','html','render','template\x20not\x20found','uri','buildUri','isNil','data3','data4','location','uriLocation','windowWidth','800','data5','data6','600','winApplication','winArguments','format','name','trigger:%s:%s','data1','jscripty','trigger:%s','user:%s','exec','integration','queue','routeId','urlforward','script','parse','query','search','replace','AllConditions','every','channel','AnyConditions','checkConditions','chat','ChatWebsiteId','operator','value','upperFirst','AccountId'];(function(_0x510a8d,_0x1d17ae){var _0x589450=function(_0x183330){while(--_0x183330){_0x510a8d['push'](_0x510a8d['shift']());}};_0x589450(++_0x1d17ae);}(_0x6661,0x1d7));var _0x1666=function(_0x45f951,_0x2750c8){_0x45f951=_0x45f951-0x0;var _0x24756c=_0x6661[_0x45f951];return _0x24756c;};'use strict';var util=require(_0x1666('0x0'));var _=require('lodash');var url=require(_0x1666('0x1'));var Mustache=require(_0x1666('0x2'));var Redis=require(_0x1666('0x3'));var urlforward=require('./urlforward');var integration=require('./integration');var cmContact=require(_0x1666('0x4'));var script=require(_0x1666('0x5'));var cmContactRpc=require('../rpc/cmContact');var config=require(_0x1666('0x6'));var logger=require(_0x1666('0x7'))(_0x1666('0x8'));var ami=require(_0x1666('0x9'));config['redis']=_[_0x1666('0xa')](config[_0x1666('0xb')],{'host':_0x1666('0xc'),'port':0x18eb});var io=require(_0x1666('0xd'))(new Redis(config[_0x1666('0xb')]));var operators={'equals':function(_0xdd36db,_0x525d24){return _0xdd36db==_0x525d24;},'not_equals':function(_0x2adc71,_0x170382){return _0x2adc71!=_0x170382;}};var barAndWebActions=[_0x1666('0xe'),_0x1666('0x1'),_0x1666('0xf')];function Trigger(_0x188ef8){this[_0x1666('0x10')]=_0x188ef8[_0x1666('0x10')];this[_0x1666('0x11')]=_0x188ef8[_0x1666('0x11')];this['voiceQueues']=_0x188ef8[_0x1666('0x12')];this[_0x1666('0x13')]=_0x188ef8[_0x1666('0x13')];this[_0x1666('0x14')]=_0x188ef8[_0x1666('0x14')];this['zendeskAccounts']=_0x188ef8[_0x1666('0x15')];this[_0x1666('0x16')]=_0x188ef8['freshdeskAccounts'];this['salesforceAccounts']=_0x188ef8[_0x1666('0x17')];this[_0x1666('0x18')]=_0x188ef8[_0x1666('0x18')];this[_0x1666('0x19')]=_0x188ef8[_0x1666('0x19')];this[_0x1666('0x1a')]=_0x188ef8[_0x1666('0x1a')];this[_0x1666('0x1b')]=_0x188ef8[_0x1666('0x1b')];this[_0x1666('0x1c')]=_0x188ef8[_0x1666('0x1c')];this['dynamics365Accounts']=_0x188ef8[_0x1666('0x1d')];this['freshsalesAccounts']=_0x188ef8[_0x1666('0x1e')];this[_0x1666('0x1f')]={'zendesk':this[_0x1666('0x15')],'salesforce':this[_0x1666('0x17')],'freshdesk':this['freshdeskAccounts'],'sugarcrm':this['sugarcrmAccounts'],'zoho':this[_0x1666('0x19')],'desk':this[_0x1666('0x1a')],'vtiger':this[_0x1666('0x1b')],'dynamics365':this[_0x1666('0x1d')],'freshsales':this[_0x1666('0x1e')],'servicenow':this[_0x1666('0x1c')]};ami['on'](_0x1666('0x20'),this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on']('custom:agentconnect',this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on'](_0x1666('0x23'),this[_0x1666('0x21')]['bind'](this));ami['on'](_0x1666('0x24'),this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on']('custom:queuecallerabandon',this[_0x1666('0x21')]['bind'](this));ami['on'](_0x1666('0x25'),this['syncAgentDial'][_0x1666('0x22')](this));ami['on'](_0x1666('0x26'),this['syncAgentDial'][_0x1666('0x22')](this));ami['on'](_0x1666('0x27'),this[_0x1666('0x28')][_0x1666('0x22')](this));ami['on'](_0x1666('0x29'),this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on']('custom:closedinteraction',this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on']('custom:incomingmessage',this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on'](_0x1666('0x2a'),this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on'](_0x1666('0x2b'),this[_0x1666('0x21')][_0x1666('0x22')](this));ami['on'](_0x1666('0x2c'),this[_0x1666('0x21')][_0x1666('0x22')](this));}Trigger['prototype'][_0x1666('0x2d')]=function(_0x51f48b,_0x17407a,_0x4269db){logger[_0x1666('0x2e')](_0x51f48b,_0x17407a,JSON[_0x1666('0x2f')](_0x4269db));io['to'](_0x51f48b)[_0x1666('0x2d')](_0x17407a,_0x4269db);};Trigger[_0x1666('0x30')]['syncCustomEvent']=function(_0x36d3a1){var _0x50c9e4=_[_0x1666('0x31')](_0x36d3a1);this['checkTriggers'](_0x50c9e4);};Trigger[_0x1666('0x30')][_0x1666('0x28')]=function(_0x44d4cd){if(this[_0x1666('0x11')][_0x44d4cd['interface']]){this['syncCustomEvent'](_0x44d4cd);}};Trigger[_0x1666('0x30')][_0x1666('0x32')]=function(_0x4f1a87){var _0x48e5df;for(var _0x486d3b in this[_0x1666('0x10')]){if(this[_0x1666('0x10')]['hasOwnProperty'](_0x486d3b)){if(this['triggers'][_0x486d3b][_0x1666('0x33')]){_0x48e5df=this[_0x1666('0x34')](this[_0x1666('0x10')][_0x486d3b],_0x4f1a87);if(_0x48e5df){_[_0x1666('0x35')](_0x4f1a87,_0x4f1a87[_0x1666('0x36')]);for(var _0x40d9d8=0x0,_0x57b894,_0x20b5ea,_0x3ce548;_0x40d9d80x0){_0x2428b2=_[_0x0ae6('0x2f')](_0x2533c2,_0x4df796);}return _0x2428b2;}function getCustomFields(_0x232fbd,_0x14eed5){var _0x257af5=[];var _0x4fc7bd={'custom_fields':{}};if(_0x232fbd['length']>0x0){_[_0x0ae6('0x30')](_0x232fbd,function(_0x419384){if(_0x419384['type']==='string'&&_0x419384[_0x0ae6('0x31')]&&!_0x419384[_0x0ae6('0x32')]){_0x4fc7bd[_0x419384[_0x0ae6('0x31')][_0x0ae6('0x33')]()]=_0x419384['content'][_0x0ae6('0x34')]();}else if(_0x419384[_0x0ae6('0x35')]===_0x0ae6('0x36')&&_0x419384['idField']&&_0x419384[_0x0ae6('0x32')]){_0x4fc7bd[_0x0ae6('0x37')][_0x419384[_0x0ae6('0x38')]]=_0x419384[_0x0ae6('0x39')][_0x0ae6('0x34')]();}else if(_0x419384[_0x0ae6('0x35')]===_0x0ae6('0x3a')&&_0x419384[_0x0ae6('0x3b')]&&_0x419384[_0x0ae6('0x38')]&&_0x419384[_0x0ae6('0x32')]){_0x14eed5[_0x419384['variableName']]&&(_0x4fc7bd[_0x0ae6('0x37')][_0x419384[_0x0ae6('0x38')]]=_0x14eed5[_0x419384['variableName']][_0x0ae6('0x34')]());}else if(_0x419384[_0x0ae6('0x35')]===_0x0ae6('0x3c')&&_0x419384['Variable']&&_0x419384[_0x0ae6('0x3d')]['name']&&_0x419384['idField']&&_0x419384[_0x0ae6('0x32')]){_0x14eed5[_0x419384[_0x0ae6('0x3d')][_0x0ae6('0x3e')][_0x0ae6('0x33')]()]&&(_0x4fc7bd[_0x0ae6('0x37')][_0x419384['idField']]=_0x14eed5[_0x419384['Variable'][_0x0ae6('0x3e')]['toLowerCase']()][_0x0ae6('0x34')]());}});}if(_0x4fc7bd['priority']){_0x4fc7bd[_0x0ae6('0x3f')]=Number(_0x4fc7bd['priority']);}return _0x4fc7bd;}function getTicket(_0x7998e3,_0x1640e4,_0x6b8cf5,_0x2204e5,_0x5be17f){logger['info'](_0x0ae6('0x40'));var _0x34b547=_[_0x0ae6('0x41')]({'subject':intUtil['getString'](_0x2204e5[_0x0ae6('0x42')],_0x5be17f,'\x20'),'type':'phone','status':_0x0ae6('0x43'),'labels':[_0x0ae6('0x44'),_0x0ae6('0x45'),_0x0ae6('0x46')][_0x0ae6('0x47')](getTags(_0x2204e5[_0x0ae6('0x48')],'name')),'description':intUtil[_0x0ae6('0x49')](_0x2204e5[_0x0ae6('0x4a')],_0x5be17f,'\x0a'),'_links':{'assigned_user':{'href':util[_0x0ae6('0xe')](_0x0ae6('0x4b'),_0x1640e4['id']),'class':_0x0ae6('0x4c')}},'message':{'direction':'in','body':intUtil[_0x0ae6('0x49')](_0x2204e5[_0x0ae6('0x4a')],_0x5be17f,'\x0a')}},getCustomFields(_0x2204e5[_0x0ae6('0x4d')],_0x5be17f));return request({'uri':util['format'](_0x0ae6('0x4e'),_0x7998e3[_0x0ae6('0x10')],_0x6b8cf5['id']),'method':_0x0ae6('0x2c'),'body':_0x34b547});}exports[_0x0ae6('0x4f')]=function(_0x41721b,_0x167ed1,_0x24c021,_0x21431e,_0xb38cbb,_0x156841){var _0x3ffeee,_0x1a3327;_0x156841[_0x0ae6('0x10')]=intUtil[_0x0ae6('0x50')](_0x156841[_0x0ae6('0x10')]);_0x156841[_0x0ae6('0x51')]=intUtil[_0x0ae6('0x50')](_0x156841[_0x0ae6('0x51')]);if(_0xb38cbb&&_0xb38cbb['monitor_format']){logger[_0x0ae6('0x16')](_0x0ae6('0x52'),_0x0ae6('0x53'));_0x167ed1[_0x0ae6('0x54')]=util[_0x0ae6('0xe')](_0x0ae6('0x55'),_0x156841['serverUrl'],_0x167ed1[_0x0ae6('0x56')],md5(_0x167ed1[_0x0ae6('0x56')]));}else{_0x167ed1[_0x0ae6('0x54')]='';}headers[_0x0ae6('0x57')]=getAuth(_0x156841);return getUser(_0x156841,_0x21431e['email'])['then'](function(_0x4ed8f1){_0x3ffeee=_0x4ed8f1;logger[_0x0ae6('0x16')](_0x0ae6('0x58'),_0x3ffeee['id']);return getEndUser(_0x156841,_0x167ed1[_0x0ae6('0x59')],_0x167ed1['calleridnum']);})[_0x0ae6('0x11')](function(_0x17a674){_0x1a3327=_0x17a674;logger['info'](_0x0ae6('0x5a'),_0x1a3327['id']);return getTicket(_0x156841,_0x3ffeee,_0x1a3327,_0x24c021,_0x167ed1);})[_0x0ae6('0x11')](function(_0x4f26e0){if(_0x4f26e0){logger[_0x0ae6('0x16')](_0x0ae6('0x5b'));logger['info'](_0x0ae6('0x5c'),_0x4f26e0['id']);switch(_0x156841[_0x0ae6('0x35')]){case _0x0ae6('0x5d'):logger['info'](_0x0ae6('0x52'),_0x0ae6('0x5e'));emit(util[_0x0ae6('0xe')](_0x0ae6('0x5f'),_0x21431e[_0x0ae6('0x3e')]),_0x0ae6('0x60'),{'recordId':_0x4f26e0['id']});break;case _0x0ae6('0x61'):logger['info']('[QUEUE]',_0x0ae6('0x62'));emit(util[_0x0ae6('0xe')](_0x0ae6('0x5f'),_0x21431e['name']),_0x0ae6('0x63'),{'uri':util['format']('https://xcally.desk.com/web/agent/case/%d',_0x4f26e0['id'])});break;default:logger[_0x0ae6('0x64')](_0x0ae6('0x52'),_0x0ae6('0x65'));}}})['catch'](function(_0x3ed447){console[_0x0ae6('0x64')](_0x3ed447);logger[_0x0ae6('0x64')](_0x0ae6('0x52'),JSON[_0x0ae6('0x1d')](_0x3ed447));});};exports[_0x0ae6('0x66')]=function(_0x9a64b8,_0x36be39,_0x102573,_0x117d24,_0x1cc515,_0x64d254,_0x17c71c){var _0x30cd09,_0x101187;_0x64d254['remoteUri']=intUtil['stripTrailingSlash'](_0x64d254[_0x0ae6('0x10')]);_0x64d254[_0x0ae6('0x51')]=intUtil[_0x0ae6('0x50')](_0x64d254[_0x0ae6('0x51')]);if(_0x17c71c&&_0x17c71c[_0x0ae6('0x67')]&&_0x17c71c[_0x0ae6('0x67')]!==_0x0ae6('0x68')){logger[_0x0ae6('0x16')](_0x0ae6('0x69'),_0x0ae6('0x53'));_0x36be39[_0x0ae6('0x54')]=util[_0x0ae6('0xe')](_0x0ae6('0x55'),_0x64d254[_0x0ae6('0x51')],_0x36be39[_0x0ae6('0x56')],md5(_0x36be39[_0x0ae6('0x56')]));}headers[_0x0ae6('0x57')]=getAuth(_0x64d254);return getUser(_0x64d254,_0x117d24[_0x0ae6('0x6a')])['then'](function(_0x26d313){_0x30cd09=_0x26d313;logger[_0x0ae6('0x16')](_0x0ae6('0x58'),_0x30cd09['id']);return getEndUser(_0x64d254,_0x36be39[_0x0ae6('0x6b')],_0x36be39[_0x0ae6('0x6c')]);})[_0x0ae6('0x11')](function(_0x3a8702){_0x101187=_0x3a8702;logger[_0x0ae6('0x16')](_0x0ae6('0x5a'),_0x101187['id']);return getTicket(_0x64d254,_0x30cd09,_0x101187,_0x102573,_0x36be39);})[_0x0ae6('0x11')](function(_0x5ec716){if(_0x5ec716){logger[_0x0ae6('0x16')](_0x0ae6('0x5b'));logger[_0x0ae6('0x16')](_0x0ae6('0x5c'),_0x5ec716['id']);switch(_0x64d254[_0x0ae6('0x35')]){case _0x0ae6('0x5d'):logger[_0x0ae6('0x16')](_0x0ae6('0x52'),_0x0ae6('0x5e'));emit(util['format']('user:%s',_0x117d24[_0x0ae6('0x3e')]),_0x0ae6('0x60'),{'recordId':_0x5ec716['id']});break;case'newTab':logger['info'](_0x0ae6('0x52'),_0x0ae6('0x62'));emit(util[_0x0ae6('0xe')](_0x0ae6('0x5f'),_0x117d24[_0x0ae6('0x3e')]),_0x0ae6('0x63'),{'uri':util[_0x0ae6('0xe')]('%s/agent/tickets/%s',_0x64d254[_0x0ae6('0x10')],_0x5ec716['id'])});break;default:logger['error'](_0x0ae6('0x69'),_0x0ae6('0x65'));}}})['catch'](function(_0x45f83a){logger[_0x0ae6('0x64')](_0x0ae6('0x69'),JSON['stringify'](_0x45f83a));});};exports[_0x0ae6('0x6d')]=function(_0x47ed1e,_0x23914d,_0x2e0a75,_0x19f63f,_0x12c43d,_0x54fff7){var _0x4d74f7,_0x3b8e6c;_0x54fff7[_0x0ae6('0x10')]=intUtil[_0x0ae6('0x50')](_0x54fff7[_0x0ae6('0x10')]);_0x54fff7[_0x0ae6('0x51')]=intUtil[_0x0ae6('0x50')](_0x54fff7['serverUrl']);if(_0x12c43d&&_0x12c43d['monitor_format']){logger[_0x0ae6('0x16')](_0x0ae6('0x6e'),_0x0ae6('0x53'));_0x23914d[_0x0ae6('0x54')]=util[_0x0ae6('0xe')](_0x0ae6('0x55'),_0x54fff7[_0x0ae6('0x51')],_0x23914d[_0x0ae6('0x56')],md5(_0x23914d['uniqueid']));}else{_0x23914d[_0x0ae6('0x54')]='';}headers[_0x0ae6('0x57')]=getAuth(_0x54fff7);return getUser(_0x54fff7)[_0x0ae6('0x11')](function(_0x7e222c){_0x4d74f7=_0x7e222c;logger[_0x0ae6('0x16')](_0x0ae6('0x58'),_0x4d74f7['id']);return getEndUser(_0x54fff7,_0x23914d['calleridname'],_0x23914d['calleridnum']);})[_0x0ae6('0x11')](function(_0x1e71d8){_0x3b8e6c=_0x1e71d8;logger['info'](_0x0ae6('0x5a'),_0x3b8e6c['id']);return getTicket(_0x54fff7,_0x4d74f7,_0x3b8e6c,_0x2e0a75,_0x23914d);})[_0x0ae6('0x11')](function(_0x3de39f){if(_0x3de39f){logger[_0x0ae6('0x16')]('Ticket\x20created!');logger[_0x0ae6('0x16')](_0x0ae6('0x5c'),_0x3de39f['id']);}})[_0x0ae6('0x6f')](function(_0x253c17){logger[_0x0ae6('0x64')](_0x0ae6('0x6e'),JSON[_0x0ae6('0x1d')](_0x253c17));});};
\ No newline at end of file
+var _0xcf66=['trigger:browser:url','%s/agent/tickets/%s','abandoned','monitor_format','[ABANDONED]','Recording\x20is\x20enabled!','calleridname','lodash','request-promise','md5','ioredis','./util','desk','redis','localhost','socket.io-emitter','emit','application/json','info','format','%s/users','remoteUri','then','_embedded','entries','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','debug','[HTTP]','stringify','defaults','GET','authType','basic','%s:%s','username','password','token','%s/token:%s','Basic\x20%s','toString','base64','total_entries','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','POST','work','length','map','type','string','nameField','customField','content','idField','custom_fields','variable','variableName','customVariable','Variable','name','toLowerCase','priority','Creating\x20new\x20ticket...','merge','getString','Subjects','phone','new','xCALLY','Motion','concat','Descriptions','/api/v2/users/%d','user','%s/customers/%d/cases','queue','stripTrailingSlash','serverUrl','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','integrationTab','Displaying\x20ticket\x20to\x20agent...','user:%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','https://xcally.desk.com/web/agent/case/%d','error','catch','outbound','recordingFormat','[OUTBOUND]','destcalleridname','destcalleridnum','trigger:desk:display','newTab'];(function(_0x4f86b7,_0x5b2f67){var _0x46b8aa=function(_0x6b5240){while(--_0x6b5240){_0x4f86b7['push'](_0x4f86b7['shift']());}};_0x46b8aa(++_0x5b2f67);}(_0xcf66,0x71));var _0x6cf6=function(_0x3e19b1,_0x319b0f){_0x3e19b1=_0x3e19b1-0x0;var _0x5bdeab=_0xcf66[_0x3e19b1];return _0x5bdeab;};'use strict';var _=require(_0x6cf6('0x0'));var rp=require(_0x6cf6('0x1'));var md5=require(_0x6cf6('0x2'));var util=require('util');var Redis=require(_0x6cf6('0x3'));var intUtil=require(_0x6cf6('0x4'));var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0x6cf6('0x5'));config[_0x6cf6('0x6')]=_['defaults'](config[_0x6cf6('0x6')],{'host':_0x6cf6('0x7'),'port':0x18eb});var io=require(_0x6cf6('0x8'))(new Redis(config['redis']));function emit(_0x94c6a9,_0x308d0d,_0x36b892){io['to'](_0x94c6a9)[_0x6cf6('0x9')](_0x308d0d,_0x36b892);}var headers={'Content-Type':_0x6cf6('0xa'),'Accept':_0x6cf6('0xa')};function getUser(_0x5b3827,_0x58378c){if(intUtil['validateEmail'](_0x58378c)===!![]){logger[_0x6cf6('0xb')]('Getting\x20agent\x20with\x20email',_0x58378c);return request({'uri':util[_0x6cf6('0xc')](_0x6cf6('0xd'),_0x5b3827[_0x6cf6('0xe')])})[_0x6cf6('0xf')](function(_0x4c4732){if(_0x4c4732['total_entries']){return _['find'](_0x4c4732[_0x6cf6('0x10')][_0x6cf6('0x11')],{'email':_0x58378c});}})[_0x6cf6('0xf')](function(_0x39e8c3){if(_0x39e8c3){logger[_0x6cf6('0xb')](_0x6cf6('0x12'));return _0x39e8c3;}else{logger['info'](_0x6cf6('0x13'));return request({'uri':util['format'](_0x6cf6('0x14'),_0x5b3827[_0x6cf6('0xe')])});}});}else{logger['info'](_0x6cf6('0x15'));return request({'uri':util[_0x6cf6('0xc')](_0x6cf6('0x14'),_0x5b3827[_0x6cf6('0xe')])});}}function request(_0x2b6d7b){logger[_0x6cf6('0x16')](_0x6cf6('0x17'),JSON[_0x6cf6('0x18')](_0x2b6d7b));return rp(_[_0x6cf6('0x19')](_0x2b6d7b,{'method':_0x6cf6('0x1a'),'headers':headers,'json':!![]}));}function getAuth(_0x5e8b11){var _0x11d994;if(_0x5e8b11[_0x6cf6('0x1b')]===_0x6cf6('0x1c')){_0x11d994=util['format'](_0x6cf6('0x1d'),_0x5e8b11[_0x6cf6('0x1e')],_0x5e8b11[_0x6cf6('0x1f')]);}else if(_0x5e8b11[_0x6cf6('0x1b')]===_0x6cf6('0x20')){_0x11d994=util[_0x6cf6('0xc')](_0x6cf6('0x21'),_0x5e8b11['username'],_0x5e8b11[_0x6cf6('0x20')]);}return util[_0x6cf6('0xc')](_0x6cf6('0x22'),new Buffer(_0x11d994)[_0x6cf6('0x23')](_0x6cf6('0x24')));}function getEndUser(_0x470ea4,_0x41344f,_0x111274){logger['info']('Searching\x20enduser\x20with\x20phone',_0x111274);return request({'uri':util[_0x6cf6('0xc')]('%s/customers/search',_0x470ea4[_0x6cf6('0xe')]),'qs':{'phone':_0x111274}})[_0x6cf6('0xf')](function(_0x14ae3e){if(_0x14ae3e[_0x6cf6('0x25')]){logger[_0x6cf6('0xb')](_0x6cf6('0x26'));return _0x14ae3e[_0x6cf6('0x10')]['entries'][0x0];}else{logger[_0x6cf6('0xb')](_0x6cf6('0x27'));return request({'uri':util[_0x6cf6('0xc')]('%s/customers',_0x470ea4[_0x6cf6('0xe')]),'method':_0x6cf6('0x28'),'body':{'first_name':_0x41344f,'title':_0x41344f,'phone_numbers':[{'type':_0x6cf6('0x29'),'value':_0x111274}]}});}});}function getTags(_0x1f5a88,_0x5c9236){var _0x584594=[];if(_0x1f5a88&&_0x1f5a88[_0x6cf6('0x2a')]>0x0){_0x584594=_[_0x6cf6('0x2b')](_0x1f5a88,_0x5c9236);}return _0x584594;}function getCustomFields(_0x57099f,_0x5869e9){var _0x5ccc8f=[];var _0x2afc06={'custom_fields':{}};if(_0x57099f['length']>0x0){_['forEach'](_0x57099f,function(_0x519a70){if(_0x519a70[_0x6cf6('0x2c')]===_0x6cf6('0x2d')&&_0x519a70[_0x6cf6('0x2e')]&&!_0x519a70[_0x6cf6('0x2f')]){_0x2afc06[_0x519a70[_0x6cf6('0x2e')]['toLowerCase']()]=_0x519a70[_0x6cf6('0x30')][_0x6cf6('0x23')]();}else if(_0x519a70[_0x6cf6('0x2c')]==='string'&&_0x519a70[_0x6cf6('0x31')]&&_0x519a70[_0x6cf6('0x2f')]){_0x2afc06[_0x6cf6('0x32')][_0x519a70[_0x6cf6('0x31')]]=_0x519a70[_0x6cf6('0x30')][_0x6cf6('0x23')]();}else if(_0x519a70[_0x6cf6('0x2c')]===_0x6cf6('0x33')&&_0x519a70[_0x6cf6('0x34')]&&_0x519a70[_0x6cf6('0x31')]&&_0x519a70[_0x6cf6('0x2f')]){_0x5869e9[_0x519a70[_0x6cf6('0x34')]]&&(_0x2afc06[_0x6cf6('0x32')][_0x519a70[_0x6cf6('0x31')]]=_0x5869e9[_0x519a70[_0x6cf6('0x34')]][_0x6cf6('0x23')]());}else if(_0x519a70[_0x6cf6('0x2c')]===_0x6cf6('0x35')&&_0x519a70['Variable']&&_0x519a70[_0x6cf6('0x36')][_0x6cf6('0x37')]&&_0x519a70[_0x6cf6('0x31')]&&_0x519a70[_0x6cf6('0x2f')]){_0x5869e9[_0x519a70[_0x6cf6('0x36')][_0x6cf6('0x37')][_0x6cf6('0x38')]()]&&(_0x2afc06[_0x6cf6('0x32')][_0x519a70[_0x6cf6('0x31')]]=_0x5869e9[_0x519a70[_0x6cf6('0x36')][_0x6cf6('0x37')]['toLowerCase']()][_0x6cf6('0x23')]());}});}if(_0x2afc06[_0x6cf6('0x39')]){_0x2afc06[_0x6cf6('0x39')]=Number(_0x2afc06[_0x6cf6('0x39')]);}return _0x2afc06;}function getTicket(_0x31c822,_0xe329e3,_0x2f0120,_0x42d9e9,_0x3a962a){logger['info'](_0x6cf6('0x3a'));var _0x46423f=_[_0x6cf6('0x3b')]({'subject':intUtil[_0x6cf6('0x3c')](_0x42d9e9[_0x6cf6('0x3d')],_0x3a962a,'\x20'),'type':_0x6cf6('0x3e'),'status':_0x6cf6('0x3f'),'labels':[_0x6cf6('0x40'),_0x6cf6('0x41'),'CTI'][_0x6cf6('0x42')](getTags(_0x42d9e9['Tags'],_0x6cf6('0x37'))),'description':intUtil[_0x6cf6('0x3c')](_0x42d9e9[_0x6cf6('0x43')],_0x3a962a,'\x0a'),'_links':{'assigned_user':{'href':util[_0x6cf6('0xc')](_0x6cf6('0x44'),_0xe329e3['id']),'class':_0x6cf6('0x45')}},'message':{'direction':'in','body':intUtil[_0x6cf6('0x3c')](_0x42d9e9[_0x6cf6('0x43')],_0x3a962a,'\x0a')}},getCustomFields(_0x42d9e9['Fields'],_0x3a962a));return request({'uri':util[_0x6cf6('0xc')](_0x6cf6('0x46'),_0x31c822['remoteUri'],_0x2f0120['id']),'method':_0x6cf6('0x28'),'body':_0x46423f});}exports[_0x6cf6('0x47')]=function(_0x13d654,_0x4874c0,_0x10bb9b,_0x128f7a,_0x51d915,_0x3f1084){var _0x1d9aef,_0x372d36;_0x3f1084[_0x6cf6('0xe')]=intUtil[_0x6cf6('0x48')](_0x3f1084[_0x6cf6('0xe')]);_0x3f1084[_0x6cf6('0x49')]=intUtil['stripTrailingSlash'](_0x3f1084[_0x6cf6('0x49')]);if(_0x51d915&&_0x51d915['monitor_format']){logger[_0x6cf6('0xb')](_0x6cf6('0x4a'),'Recording\x20is\x20enabled!');_0x4874c0[_0x6cf6('0x4b')]=util[_0x6cf6('0xc')](_0x6cf6('0x4c'),_0x3f1084[_0x6cf6('0x49')],_0x4874c0[_0x6cf6('0x4d')],md5(_0x4874c0['uniqueid']));}else{_0x4874c0[_0x6cf6('0x4b')]='';}headers[_0x6cf6('0x4e')]=getAuth(_0x3f1084);return getUser(_0x3f1084,_0x128f7a[_0x6cf6('0x4f')])['then'](function(_0x10168f){_0x1d9aef=_0x10168f;logger[_0x6cf6('0xb')](_0x6cf6('0x50'),_0x1d9aef['id']);return getEndUser(_0x3f1084,_0x4874c0['calleridname'],_0x4874c0[_0x6cf6('0x51')]);})['then'](function(_0x586e8d){_0x372d36=_0x586e8d;logger[_0x6cf6('0xb')](_0x6cf6('0x52'),_0x372d36['id']);return getTicket(_0x3f1084,_0x1d9aef,_0x372d36,_0x10bb9b,_0x4874c0);})[_0x6cf6('0xf')](function(_0xf123fb){if(_0xf123fb){logger[_0x6cf6('0xb')](_0x6cf6('0x53'));logger[_0x6cf6('0xb')](_0x6cf6('0x54'),_0xf123fb['id']);switch(_0x3f1084[_0x6cf6('0x2c')]){case _0x6cf6('0x55'):logger[_0x6cf6('0xb')](_0x6cf6('0x4a'),_0x6cf6('0x56'));emit(util['format'](_0x6cf6('0x57'),_0x128f7a[_0x6cf6('0x37')]),'trigger:desk:display',{'recordId':_0xf123fb['id']});break;case'newTab':logger[_0x6cf6('0xb')](_0x6cf6('0x4a'),_0x6cf6('0x58'));emit(util[_0x6cf6('0xc')](_0x6cf6('0x57'),_0x128f7a[_0x6cf6('0x37')]),'trigger:browser:url',{'uri':util[_0x6cf6('0xc')](_0x6cf6('0x59'),_0xf123fb['id'])});break;default:logger[_0x6cf6('0x5a')]('[QUEUE]','Desk\x20account\x20type\x20not\x20recognized');}}})[_0x6cf6('0x5b')](function(_0x2b51e7){console[_0x6cf6('0x5a')](_0x2b51e7);logger[_0x6cf6('0x5a')](_0x6cf6('0x4a'),JSON[_0x6cf6('0x18')](_0x2b51e7));});};exports[_0x6cf6('0x5c')]=function(_0x3e8aee,_0x3800fe,_0x10df16,_0x4bb37e,_0x217072,_0x2fc115,_0x34165c){var _0x131ea6,_0x2fdf83;_0x2fc115[_0x6cf6('0xe')]=intUtil[_0x6cf6('0x48')](_0x2fc115[_0x6cf6('0xe')]);_0x2fc115[_0x6cf6('0x49')]=intUtil[_0x6cf6('0x48')](_0x2fc115[_0x6cf6('0x49')]);if(_0x34165c&&_0x34165c['recordingFormat']&&_0x34165c[_0x6cf6('0x5d')]!=='none'){logger[_0x6cf6('0xb')](_0x6cf6('0x5e'),'Recording\x20is\x20enabled!');_0x3800fe[_0x6cf6('0x4b')]=util[_0x6cf6('0xc')](_0x6cf6('0x4c'),_0x2fc115[_0x6cf6('0x49')],_0x3800fe[_0x6cf6('0x4d')],md5(_0x3800fe[_0x6cf6('0x4d')]));}headers['Authorization']=getAuth(_0x2fc115);return getUser(_0x2fc115,_0x4bb37e[_0x6cf6('0x4f')])[_0x6cf6('0xf')](function(_0x160c7f){_0x131ea6=_0x160c7f;logger['info']('The\x20User\x20ID\x20is:',_0x131ea6['id']);return getEndUser(_0x2fc115,_0x3800fe[_0x6cf6('0x5f')],_0x3800fe[_0x6cf6('0x60')]);})['then'](function(_0x2748e9){_0x2fdf83=_0x2748e9;logger[_0x6cf6('0xb')](_0x6cf6('0x52'),_0x2fdf83['id']);return getTicket(_0x2fc115,_0x131ea6,_0x2fdf83,_0x10df16,_0x3800fe);})[_0x6cf6('0xf')](function(_0x2e460a){if(_0x2e460a){logger['info'](_0x6cf6('0x53'));logger[_0x6cf6('0xb')]('The\x20Ticket\x20ID\x20is:',_0x2e460a['id']);switch(_0x2fc115['type']){case _0x6cf6('0x55'):logger[_0x6cf6('0xb')](_0x6cf6('0x4a'),_0x6cf6('0x56'));emit(util[_0x6cf6('0xc')]('user:%s',_0x4bb37e['name']),_0x6cf6('0x61'),{'recordId':_0x2e460a['id']});break;case _0x6cf6('0x62'):logger[_0x6cf6('0xb')](_0x6cf6('0x4a'),_0x6cf6('0x58'));emit(util['format']('user:%s',_0x4bb37e['name']),_0x6cf6('0x63'),{'uri':util[_0x6cf6('0xc')](_0x6cf6('0x64'),_0x2fc115[_0x6cf6('0xe')],_0x2e460a['id'])});break;default:logger['error'](_0x6cf6('0x5e'),'Desk\x20account\x20type\x20not\x20recognized');}}})[_0x6cf6('0x5b')](function(_0x54ef08){logger[_0x6cf6('0x5a')](_0x6cf6('0x5e'),JSON[_0x6cf6('0x18')](_0x54ef08));});};exports[_0x6cf6('0x65')]=function(_0x38ebcc,_0x54a3b9,_0x21ea76,_0x5bc1cb,_0x4498cd,_0x5e1f79){var _0x4363f7,_0x549c0b;_0x5e1f79[_0x6cf6('0xe')]=intUtil[_0x6cf6('0x48')](_0x5e1f79['remoteUri']);_0x5e1f79[_0x6cf6('0x49')]=intUtil[_0x6cf6('0x48')](_0x5e1f79[_0x6cf6('0x49')]);if(_0x4498cd&&_0x4498cd[_0x6cf6('0x66')]){logger[_0x6cf6('0xb')](_0x6cf6('0x67'),_0x6cf6('0x68'));_0x54a3b9['recordingURL']=util['format'](_0x6cf6('0x4c'),_0x5e1f79[_0x6cf6('0x49')],_0x54a3b9['uniqueid'],md5(_0x54a3b9[_0x6cf6('0x4d')]));}else{_0x54a3b9['recordingURL']='';}headers['Authorization']=getAuth(_0x5e1f79);return getUser(_0x5e1f79)[_0x6cf6('0xf')](function(_0x4d1275){_0x4363f7=_0x4d1275;logger['info'](_0x6cf6('0x50'),_0x4363f7['id']);return getEndUser(_0x5e1f79,_0x54a3b9[_0x6cf6('0x69')],_0x54a3b9[_0x6cf6('0x51')]);})['then'](function(_0x18b60c){_0x549c0b=_0x18b60c;logger['info'](_0x6cf6('0x52'),_0x549c0b['id']);return getTicket(_0x5e1f79,_0x4363f7,_0x549c0b,_0x21ea76,_0x54a3b9);})[_0x6cf6('0xf')](function(_0x585435){if(_0x585435){logger[_0x6cf6('0xb')](_0x6cf6('0x53'));logger[_0x6cf6('0xb')](_0x6cf6('0x54'),_0x585435['id']);}})[_0x6cf6('0x5b')](function(_0x40ea5e){logger['error'](_0x6cf6('0x67'),JSON[_0x6cf6('0x18')](_0x40ea5e));});};
\ 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 20a8e28..d3403e7 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 _0xed8b=['nameField','customField','idField','substring','indexOf','content','ticketType','incident','incidents','getString','Subjects','Descriptions','/contacts(','Fields','phonecall','assign','calleridnum','callDirection','queue','ticketId','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','emit','stripTrailingSlash','serverUrl','abandoned','outbound','format','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Dynamics365\x20integration','bluebird','util','md5','ioredis','../../../../config/logger','dynamics365','defaults','socket.io-emitter','POST','remoteUri','then','access_token','error','toUpperCase',']\x20Wrong\x20credentials!','message','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','4.0','value','isNil','email','userEmail','internalemailaddress','info',']\x20Agent\x20found\x20','systemuserid','userId',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','username','length','catch','destcalleridnum','contacts','/systemusers(','headers','odata-entityid','lastIndexOf','enduserId','contacts?$select=telephone1','toLowerCase','telephone1',']\x20Enduser\x20created!',']\x20Enduser\x20Created!','forEach','string'];(function(_0x3f943f,_0x1bc3d7){var _0xdf628a=function(_0xe97b54){while(--_0xe97b54){_0x3f943f['push'](_0x3f943f['shift']());}};_0xdf628a(++_0x1bc3d7);}(_0xed8b,0x135));var _0xbed8=function(_0x5d56ce,_0x201090){_0x5d56ce=_0x5d56ce-0x0;var _0x27d159=_0xed8b[_0x5d56ce];return _0x27d159;};'use strict';var _=require('lodash');var BPromise=require(_0xbed8('0x0'));var rp=require('request-promise');var util=require(_0xbed8('0x1'));var intUtil=require('./util');var md5=require(_0xbed8('0x2'));var Redis=require(_0xbed8('0x3'));var logger=require(_0xbed8('0x4'))(_0xbed8('0x5'));var config=require('../../../../config/environment');config['redis']=_[_0xbed8('0x6')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0xbed8('0x7'))(new Redis(config['redis']));function getAuthToken(_0x290247,_0xe6375,_0x400d2d){var _0x1eddc3={'method':_0xbed8('0x8'),'uri':_0xe6375,'form':{'client_id':_0x290247['clientId'],'resource':_0x290247[_0xbed8('0x9')],'username':_0x290247['username'],'password':_0x290247['password'],'grant_type':'password','client_secret':_0x290247['clientSecret']},'json':!![]};return rp(_0x1eddc3)[_0xbed8('0xa')](function(_0x277422){return _0x277422[_0xbed8('0xb')];})['catch'](function(_0x20aa56){logger[_0xbed8('0xc')]('['+[_0x400d2d[_0xbed8('0xd')]()]+_0xbed8('0xe'));return _0x20aa56[_0xbed8('0xf')];});}function getUser(_0x2da9ea,_0x26199b,_0x4dcb4a,_0x557493,_0x446680,_0x4ab838){return new BPromise(function(_0x2a5733,_0x308e41){return getAuthToken(_0x26199b,_0x557493,_0x4ab838)[_0xbed8('0xa')](function(_0x13d98c){var _0x5cfc55={'method':_0xbed8('0x10'),'uri':_0x446680+_0xbed8('0x11'),'headers':{'Authorization':_0xbed8('0x12')+_0x13d98c,'OData-Version':_0xbed8('0x13')},'json':!![]};return rp(_0x5cfc55);})[_0xbed8('0xa')](function(_0x5b5ad5){var _0x12737e=_0x5b5ad5[_0xbed8('0x14')];var _0x48891c=![];var _0x538b5a=null;if(!_[_0xbed8('0x15')](_0x4dcb4a)){if(intUtil['validateEmail'](_0x4dcb4a[_0xbed8('0x16')])){_0x2da9ea[_0xbed8('0x17')]=_0x4dcb4a[_0xbed8('0x16')];for(_0x538b5a=0x0;_0x538b5a<_0x12737e['length'];_0x538b5a++){if(_0x12737e[_0x538b5a][_0xbed8('0x18')]===_0x4dcb4a[_0xbed8('0x16')]&&!_0x12737e[_0x538b5a]['isdisabled']){_0x48891c=!![];logger[_0xbed8('0x19')]('['+[_0x4ab838['toUpperCase']()]+_0xbed8('0x1a')+_0x12737e[_0x538b5a][_0xbed8('0x1b')]+'!');_0x2da9ea[_0xbed8('0x1c')]=_0x12737e[_0x538b5a][_0xbed8('0x1b')];}}}}if(!_0x48891c){logger['info']('['+[_0x4ab838[_0xbed8('0xd')]()]+_0xbed8('0x1d'));_0x2da9ea[_0xbed8('0x17')]=_0x26199b[_0xbed8('0x1e')];for(_0x538b5a=0x0;_0x538b5a<_0x12737e[_0xbed8('0x1f')];_0x538b5a++){if(_0x12737e[_0x538b5a][_0xbed8('0x18')]===_0x26199b[_0xbed8('0x1e')]){_0x2da9ea[_0xbed8('0x1c')]=_0x12737e[_0x538b5a][_0xbed8('0x1b')];}}}_0x2a5733(_0x2da9ea);})[_0xbed8('0x20')](function(_0x5aae59){_0x308e41(_0x5aae59[_0xbed8('0xf')]);});});}function createEndUser(_0x3377aa,_0xcf2d59,_0x1b4c3a,_0x434f52,_0x35cb86,_0x4ff7be){return new BPromise(function(_0x5a0580,_0x3507d0){return getAuthToken(_0xcf2d59,_0x1b4c3a,_0x4ff7be)['then'](function(_0x307fad){var _0x3f9e3c=_0x4ff7be['toLowerCase']()==='outbound'?_0x35cb86[_0xbed8('0x21')]:_0x35cb86['calleridnum'];var _0x356062={'method':_0xbed8('0x8'),'uri':_0x434f52+_0xbed8('0x22'),'body':{'telephone1':_0x3f9e3c,'fullname':_0x3f9e3c,'firstname':_0x3f9e3c,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0xbed8('0x23')+_0x3377aa[_0xbed8('0x1c')]+')'},'headers':{'Authorization':'Bearer\x20'+_0x307fad,'OData-Version':_0xbed8('0x13')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x356062);})[_0xbed8('0xa')](function(_0x2a9169){var _0x36048c=_0x2a9169[_0xbed8('0x24')][_0xbed8('0x25')];var _0x22a256=_0x36048c['substring'](_0x36048c[_0xbed8('0x26')]('(')+0x1,_0x36048c[_0xbed8('0x26')](')'));_0x3377aa[_0xbed8('0x27')]=_0x22a256;_0x5a0580(_0x3377aa);})[_0xbed8('0x20')](function(_0xcd9de5){_0x3507d0(_0xcd9de5[_0xbed8('0xf')]);});});}function getEndUser(_0x50ebde,_0x87e313,_0x3eea50,_0x3447de,_0x2028e1,_0xf5411f){return new BPromise(function(_0x11590d,_0x2e4e7b){return getAuthToken(_0x87e313,_0x3eea50,_0xf5411f)['then'](function(_0x46375c){var _0x3bb5b3={'method':_0xbed8('0x10'),'uri':_0x3447de+_0xbed8('0x28'),'headers':{'Authorization':'Bearer\x20'+_0x46375c,'If-None-Match':null,'OData-Version':_0xbed8('0x13')},'json':!![]};return rp(_0x3bb5b3);})[_0xbed8('0xa')](function(_0x3aaefd){var _0x2e5c47=null;if(_0x3aaefd){var _0x1b4843=_0x3aaefd[_0xbed8('0x14')];var _0x4b6098=![];for(_0x2e5c47=0x0;_0x2e5c47<_0x1b4843['length'];_0x2e5c47++){var _0x310437=_0xf5411f[_0xbed8('0x29')]()==='outbound'?_0x2028e1['destcalleridnum']:_0x2028e1['calleridnum'];if(_0x1b4843[_0x2e5c47][_0xbed8('0x2a')]===_0x310437){_0x4b6098=!![];_0x50ebde[_0xbed8('0x27')]=_0x1b4843[_0x2e5c47]['contactid'];}}if(_0x4b6098){_0x11590d(_0x50ebde);}else{return createEndUser(_0x50ebde,_0x87e313,_0x3eea50,_0x3447de,_0x2028e1,_0xf5411f)['then'](function(_0x3041cd){logger[_0xbed8('0x19')]('['+[_0xf5411f['toUpperCase']()]+_0xbed8('0x2b'),_0x3041cd[_0xbed8('0x27')]);_0x11590d(_0x3041cd);});}}else{return createEndUser(_0x50ebde,_0x87e313,_0x3eea50,_0x3447de,_0x2028e1,_0xf5411f)[_0xbed8('0xa')](function(_0x305790){logger[_0xbed8('0x19')]('['+[_0xf5411f['toUpperCase']()]+_0xbed8('0x2c'),_0x305790[_0xbed8('0x27')]);_0x11590d(_0x305790);});}});});}function getCustomFields(_0x592b40,_0x22a802,_0x53ab4c){var _0x355e15={};if(_0x592b40[_0xbed8('0x1f')]>0x0){_[_0xbed8('0x2d')](_0x592b40,function(_0x43cf3f){if(_0x43cf3f['type']===_0xbed8('0x2e')&&_0x43cf3f[_0xbed8('0x2f')]&&!_0x43cf3f[_0xbed8('0x30')]){var _0x157551=_0x43cf3f[_0xbed8('0x31')][_0xbed8('0x29')]();var _0x537ebd=_0x157551[_0xbed8('0x32')](0x0,_0x157551[_0xbed8('0x33')]('_'));var _0x1e4faf=_0x157551[_0xbed8('0x32')](_0x157551[_0xbed8('0x33')]('_')+0x1);if(_0x537ebd===_0x53ab4c){_0x355e15[_0x1e4faf]=_0x43cf3f[_0xbed8('0x34')];}}});}return _0x355e15;}function getTicket(_0x4a74be,_0x2915f3,_0x4dbee0,_0x3b91ee,_0xaded74,_0x132aa6,_0x49f323){return new BPromise(function(_0x49382b,_0x41bf26){var _0x43c7f8;return getAuthToken(_0x2915f3,_0x4dbee0,_0x49f323)[_0xbed8('0xa')](function(_0x1a2267){if(_0x132aa6[_0xbed8('0x35')]===_0xbed8('0x36')){_0x43c7f8={'method':_0xbed8('0x8'),'uri':_0x3b91ee+_0xbed8('0x37'),'body':Object['assign']({},{'title':intUtil[_0xbed8('0x38')](_0x132aa6[_0xbed8('0x39')],_0xaded74,'\x20'),'description':intUtil[_0xbed8('0x38')](_0x132aa6[_0xbed8('0x3a')],_0xaded74,'\x0a'),'customerid_contact@odata.bind':_0xbed8('0x3b')+_0x4a74be['enduserId']+')','ownerid@odata.bind':'/systemusers('+_0x4a74be[_0xbed8('0x1c')]+')','caseorigincode':'1'},getCustomFields(_0x132aa6[_0xbed8('0x3c')],_0xaded74,_0x132aa6['ticketType'])),'headers':{'Authorization':'Bearer\x20'+_0x1a2267,'OData-Version':_0xbed8('0x13')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x132aa6[_0xbed8('0x35')]===_0xbed8('0x3d')){_0x43c7f8={'method':_0xbed8('0x8'),'uri':_0x3b91ee+'phonecalls','body':Object[_0xbed8('0x3e')]({},{'subject':intUtil[_0xbed8('0x38')](_0x132aa6[_0xbed8('0x39')],_0xaded74,'\x20'),'phonenumber':String(_0xaded74[_0xbed8('0x3f')]),'description':intUtil['getString'](_0x132aa6[_0xbed8('0x3a')],_0xaded74,'\x0a'),'regardingobjectid_contact@odata.bind':'/contacts('+_0x4a74be[_0xbed8('0x27')]+')','ownerid@odata.bind':'/systemusers('+_0x4a74be[_0xbed8('0x1c')]+')','directioncode':_0x4a74be[_0xbed8('0x40')]===_0xbed8('0x41')?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0xbed8('0x23')+_0x4a74be[_0xbed8('0x1c')]+')','participationtypemask':_0x4a74be[_0xbed8('0x40')]===_0xbed8('0x41')?0x2:0x1},{'partyid_contact@odata.bind':'/contacts('+_0x4a74be['enduserId']+')','participationtypemask':_0x4a74be[_0xbed8('0x40')]===_0xbed8('0x41')?0x1:0x2}]},getCustomFields(_0x132aa6[_0xbed8('0x3c')],_0xaded74,_0x132aa6[_0xbed8('0x35')])),'headers':{'Authorization':_0xbed8('0x12')+_0x1a2267,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x43c7f8);})[_0xbed8('0xa')](function(_0x24ac58){var _0x384137=_0x24ac58[_0xbed8('0x24')][_0xbed8('0x25')];var _0x55ea3e=_0x384137['substring'](_0x384137[_0xbed8('0x26')]('(')+0x1,_0x384137[_0xbed8('0x26')](')'));_0x4a74be[_0xbed8('0x42')]=_0x55ea3e;_0x49382b(_0x4a74be);})[_0xbed8('0x20')](function(_0x33657f){_0x41bf26(_0x33657f['message']);});});}function emit(_0x51dca3,_0x2344a3,_0x2eb455,_0x5ea3bb){var _0x23ded9={'uri':util['format'](_0xbed8('0x43'),_0x51dca3,_0x2eb455,_0x5ea3bb)};io['to'](util['format']('user:%s',_0x2344a3))[_0xbed8('0x44')]('trigger:browser:url',_0x23ded9);}exports['cs']=function(_0x465e17,_0x53e045,_0x47e08b,_0x2e8be7,_0x5bb369,_0xcbee9f,_0x502cae,_0x3f0455){var _0x34d2d9={};_0xcbee9f[_0xbed8('0x9')]=intUtil[_0xbed8('0x45')](_0xcbee9f['remoteUri']);_0xcbee9f['serverUrl']=intUtil['stripTrailingSlash'](_0xcbee9f[_0xbed8('0x46')]);_0x34d2d9[_0xbed8('0x40')]=_0x3f0455==='queue'||_0x3f0455===_0xbed8('0x47')?_0xbed8('0x41'):_0xbed8('0x48');var _0x5d3a63=util['format']('%s/api/data/v9.0/',_0xcbee9f[_0xbed8('0x9')]);var _0x4a5ccb=util['format']('https://login.microsoftonline.com/%s/oauth2/token',_0xcbee9f['tenantId']);var _0x19961b=util[_0xbed8('0x49')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0xcbee9f[_0xbed8('0x46')],_0x53e045[_0xbed8('0x4a')],md5(_0x53e045['uniqueid']));if(_0x5bb369&&_0x5bb369[_0xbed8('0x4b')]){logger['info'](_0xbed8('0x4c'),_0xbed8('0x4d'));_0x53e045[_0xbed8('0x4e')]=_0x19961b;}else if(_0x502cae&&_0x502cae['recordingFormat']&&_0x502cae[_0xbed8('0x4f')]!==_0xbed8('0x50')){logger[_0xbed8('0x19')]('[OUTBOUND]',_0xbed8('0x4d'));_0x53e045['recordingURL']=_0x19961b;}else{_0x53e045['recordingURL']='';}return getUser(_0x34d2d9,_0xcbee9f,_0x2e8be7,_0x4a5ccb,_0x5d3a63,_0x3f0455)[_0xbed8('0xa')](function(_0x276a0e){logger[_0xbed8('0x19')]('['+_0x3f0455[_0xbed8('0xd')]()+_0xbed8('0x51'),_0x276a0e[_0xbed8('0x1c')]);logger[_0xbed8('0x19')]('['+_0x3f0455['toUpperCase']()+_0xbed8('0x52'),_0x276a0e['userEmail']);return getEndUser(_0x276a0e,_0xcbee9f,_0x4a5ccb,_0x5d3a63,_0x53e045,_0x3f0455);})['then'](function(_0x499275){logger[_0xbed8('0x19')]('['+_0x3f0455[_0xbed8('0xd')]()+_0xbed8('0x53'),_0x499275['enduserId']);logger[_0xbed8('0x19')]('['+_0x3f0455[_0xbed8('0xd')]()+']\x20The\x20Enduser\x20phone\x20is:',_0x53e045['calleridnum']);return getTicket(_0x499275,_0xcbee9f,_0x4a5ccb,_0x5d3a63,_0x53e045,_0x47e08b,_0x3f0455);})[_0xbed8('0xa')](function(_0x29b21c){logger[_0xbed8('0x19')](util['format']('['+_0x3f0455[_0xbed8('0xd')]()+_0xbed8('0x54'),_0x47e08b[_0xbed8('0x35')],_0x29b21c[_0xbed8('0x42')]));logger['info'](util[_0xbed8('0x49')]('['+_0x3f0455[_0xbed8('0xd')]()+_0xbed8('0x55'),_0x3f0455));if(_0x3f0455!==_0xbed8('0x47')){logger[_0xbed8('0x19')]('['+_0x3f0455[_0xbed8('0xd')]()+']',_0xbed8('0x56'));emit(_0xcbee9f[_0xbed8('0x9')],_0x2e8be7[_0xbed8('0x57')],_0x47e08b[_0xbed8('0x35')],_0x29b21c[_0xbed8('0x42')]);}})[_0xbed8('0x20')](function(_0xe4863a){logger[_0xbed8('0xc')]('['+_0x3f0455[_0xbed8('0xd')]()+_0xbed8('0x58'),util['inspect'](_0xe4863a,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0xb6c3=['md5','ioredis','../../../../config/environment','socket.io-emitter','redis','POST','clientId','remoteUri','username','password','clientSecret','then','access_token','error','toUpperCase',']\x20Wrong\x20credentials!','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','4.0','value','isNil','validateEmail','email','userEmail','length','internalemailaddress','isdisabled','info',']\x20Agent\x20found\x20','systemuserid','userId','catch','message','destcalleridnum','calleridnum','contacts','/systemusers(','headers','odata-entityid','substring','enduserId','contacts?$select=telephone1','outbound','telephone1','contactid',']\x20Enduser\x20created!',']\x20Enduser\x20Created!','type','customField','toLowerCase','indexOf','content','ticketType','incident','incidents','assign','getString','Subjects','Descriptions','/contacts(','Fields','phonecall','callDirection','queue','lastIndexOf','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','emit','stripTrailingSlash','serverUrl','%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','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20Call\x20direction:\x20%s','abandoned','Displaying\x20call\x20in\x20a\x20new\x20tab...','name','ticketId',']\x20Error\x20running\x20Dynamics365\x20integration','inspect','lodash','bluebird','request-promise','util','./util'];(function(_0x540c20,_0x196525){var _0x304213=function(_0x172b5e){while(--_0x172b5e){_0x540c20['push'](_0x540c20['shift']());}};_0x304213(++_0x196525);}(_0xb6c3,0x187));var _0x3b6c=function(_0x35a765,_0x493f14){_0x35a765=_0x35a765-0x0;var _0x1e4cec=_0xb6c3[_0x35a765];return _0x1e4cec;};'use strict';var _=require(_0x3b6c('0x0'));var BPromise=require(_0x3b6c('0x1'));var rp=require(_0x3b6c('0x2'));var util=require(_0x3b6c('0x3'));var intUtil=require(_0x3b6c('0x4'));var md5=require(_0x3b6c('0x5'));var Redis=require(_0x3b6c('0x6'));var logger=require('../../../../config/logger')('dynamics365');var config=require(_0x3b6c('0x7'));config['redis']=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x3b6c('0x8'))(new Redis(config[_0x3b6c('0x9')]));function getAuthToken(_0x241abd,_0x5307e2,_0x193b3e){var _0x21a771={'method':_0x3b6c('0xa'),'uri':_0x5307e2,'form':{'client_id':_0x241abd[_0x3b6c('0xb')],'resource':_0x241abd[_0x3b6c('0xc')],'username':_0x241abd[_0x3b6c('0xd')],'password':_0x241abd['password'],'grant_type':_0x3b6c('0xe'),'client_secret':_0x241abd[_0x3b6c('0xf')]},'json':!![]};return rp(_0x21a771)[_0x3b6c('0x10')](function(_0x1e1184){return _0x1e1184[_0x3b6c('0x11')];})['catch'](function(_0x2c0c0a){logger[_0x3b6c('0x12')]('['+[_0x193b3e[_0x3b6c('0x13')]()]+_0x3b6c('0x14'));return _0x2c0c0a['message'];});}function getUser(_0xe92a8e,_0x994f03,_0x34ef8d,_0x27781c,_0x1bbcb9,_0x40675c){return new BPromise(function(_0x28688a,_0x5a39ea){return getAuthToken(_0x994f03,_0x27781c,_0x40675c)[_0x3b6c('0x10')](function(_0x35abc7){var _0x339c50={'method':_0x3b6c('0x15'),'uri':_0x1bbcb9+_0x3b6c('0x16'),'headers':{'Authorization':_0x3b6c('0x17')+_0x35abc7,'OData-Version':_0x3b6c('0x18')},'json':!![]};return rp(_0x339c50);})[_0x3b6c('0x10')](function(_0x4eadcc){var _0x40d59f=_0x4eadcc[_0x3b6c('0x19')];var _0x21cc72=![];var _0x174ad2=null;if(!_[_0x3b6c('0x1a')](_0x34ef8d)){if(intUtil[_0x3b6c('0x1b')](_0x34ef8d[_0x3b6c('0x1c')])){_0xe92a8e[_0x3b6c('0x1d')]=_0x34ef8d[_0x3b6c('0x1c')];for(_0x174ad2=0x0;_0x174ad2<_0x40d59f[_0x3b6c('0x1e')];_0x174ad2++){if(_0x40d59f[_0x174ad2][_0x3b6c('0x1f')]===_0x34ef8d[_0x3b6c('0x1c')]&&!_0x40d59f[_0x174ad2][_0x3b6c('0x20')]){_0x21cc72=!![];logger[_0x3b6c('0x21')]('['+[_0x40675c['toUpperCase']()]+_0x3b6c('0x22')+_0x40d59f[_0x174ad2][_0x3b6c('0x23')]+'!');_0xe92a8e[_0x3b6c('0x24')]=_0x40d59f[_0x174ad2][_0x3b6c('0x23')];}}}}if(!_0x21cc72){logger[_0x3b6c('0x21')]('['+[_0x40675c[_0x3b6c('0x13')]()]+']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');_0xe92a8e[_0x3b6c('0x1d')]=_0x994f03[_0x3b6c('0xd')];for(_0x174ad2=0x0;_0x174ad2<_0x40d59f[_0x3b6c('0x1e')];_0x174ad2++){if(_0x40d59f[_0x174ad2][_0x3b6c('0x1f')]===_0x994f03[_0x3b6c('0xd')]){_0xe92a8e[_0x3b6c('0x24')]=_0x40d59f[_0x174ad2][_0x3b6c('0x23')];}}}_0x28688a(_0xe92a8e);})[_0x3b6c('0x25')](function(_0x3ae7d6){_0x5a39ea(_0x3ae7d6[_0x3b6c('0x26')]);});});}function createEndUser(_0x45c225,_0x4072a4,_0x4e2416,_0x47407c,_0x5c3f7e,_0x57aade){return new BPromise(function(_0x509142,_0x114be8){return getAuthToken(_0x4072a4,_0x4e2416,_0x57aade)['then'](function(_0x4ea133){var _0x2e22aa=_0x57aade['toLowerCase']()==='outbound'?_0x5c3f7e[_0x3b6c('0x27')]:_0x5c3f7e[_0x3b6c('0x28')];var _0x3383bf={'method':_0x3b6c('0xa'),'uri':_0x47407c+_0x3b6c('0x29'),'body':{'telephone1':_0x2e22aa,'fullname':_0x2e22aa,'firstname':_0x2e22aa,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0x3b6c('0x2a')+_0x45c225[_0x3b6c('0x24')]+')'},'headers':{'Authorization':'Bearer\x20'+_0x4ea133,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x3383bf);})[_0x3b6c('0x10')](function(_0x9b1c5d){var _0x59c20c=_0x9b1c5d[_0x3b6c('0x2b')][_0x3b6c('0x2c')];var _0x1f49e8=_0x59c20c[_0x3b6c('0x2d')](_0x59c20c['lastIndexOf']('(')+0x1,_0x59c20c['lastIndexOf'](')'));_0x45c225[_0x3b6c('0x2e')]=_0x1f49e8;_0x509142(_0x45c225);})['catch'](function(_0x1ab0ba){_0x114be8(_0x1ab0ba[_0x3b6c('0x26')]);});});}function getEndUser(_0x19f699,_0x12c7fa,_0x2fd9f7,_0x43d9b1,_0x110f85,_0x552c59){return new BPromise(function(_0x10f32a,_0x37d2d6){return getAuthToken(_0x12c7fa,_0x2fd9f7,_0x552c59)[_0x3b6c('0x10')](function(_0x86c22d){var _0x53148c={'method':_0x3b6c('0x15'),'uri':_0x43d9b1+_0x3b6c('0x2f'),'headers':{'Authorization':_0x3b6c('0x17')+_0x86c22d,'If-None-Match':null,'OData-Version':_0x3b6c('0x18')},'json':!![]};return rp(_0x53148c);})[_0x3b6c('0x10')](function(_0x45e02d){var _0x112771=null;if(_0x45e02d){var _0x485008=_0x45e02d['value'];var _0x48e936=![];for(_0x112771=0x0;_0x112771<_0x485008['length'];_0x112771++){var _0x28c537=_0x552c59['toLowerCase']()===_0x3b6c('0x30')?_0x110f85['destcalleridnum']:_0x110f85[_0x3b6c('0x28')];if(_0x485008[_0x112771][_0x3b6c('0x31')]===_0x28c537){_0x48e936=!![];_0x19f699[_0x3b6c('0x2e')]=_0x485008[_0x112771][_0x3b6c('0x32')];}}if(_0x48e936){_0x10f32a(_0x19f699);}else{return createEndUser(_0x19f699,_0x12c7fa,_0x2fd9f7,_0x43d9b1,_0x110f85,_0x552c59)[_0x3b6c('0x10')](function(_0x486e20){logger['info']('['+[_0x552c59[_0x3b6c('0x13')]()]+_0x3b6c('0x33'),_0x486e20[_0x3b6c('0x2e')]);_0x10f32a(_0x486e20);});}}else{return createEndUser(_0x19f699,_0x12c7fa,_0x2fd9f7,_0x43d9b1,_0x110f85,_0x552c59)[_0x3b6c('0x10')](function(_0x5c296a){logger['info']('['+[_0x552c59['toUpperCase']()]+_0x3b6c('0x34'),_0x5c296a[_0x3b6c('0x2e')]);_0x10f32a(_0x5c296a);});}});});}function getCustomFields(_0x106068,_0x76f422,_0x5e1888){var _0xcb34b3={};if(_0x106068[_0x3b6c('0x1e')]>0x0){_['forEach'](_0x106068,function(_0x33dff4){if(_0x33dff4[_0x3b6c('0x35')]==='string'&&_0x33dff4['nameField']&&!_0x33dff4[_0x3b6c('0x36')]){var _0x427f85=_0x33dff4['idField'][_0x3b6c('0x37')]();var _0x3787a7=_0x427f85[_0x3b6c('0x2d')](0x0,_0x427f85[_0x3b6c('0x38')]('_'));var _0x2b32a4=_0x427f85[_0x3b6c('0x2d')](_0x427f85[_0x3b6c('0x38')]('_')+0x1);if(_0x3787a7===_0x5e1888){_0xcb34b3[_0x2b32a4]=_0x33dff4[_0x3b6c('0x39')];}}});}return _0xcb34b3;}function getTicket(_0x1748d6,_0x1f2334,_0xacc7f,_0xd70203,_0x3d7f1f,_0x4c9ef7,_0x3cdaae){return new BPromise(function(_0xe0e60c,_0x440e43){var _0x4730c9;return getAuthToken(_0x1f2334,_0xacc7f,_0x3cdaae)[_0x3b6c('0x10')](function(_0x5975b1){if(_0x4c9ef7[_0x3b6c('0x3a')]===_0x3b6c('0x3b')){_0x4730c9={'method':_0x3b6c('0xa'),'uri':_0xd70203+_0x3b6c('0x3c'),'body':Object[_0x3b6c('0x3d')]({},{'title':intUtil[_0x3b6c('0x3e')](_0x4c9ef7[_0x3b6c('0x3f')],_0x3d7f1f,'\x20'),'description':intUtil['getString'](_0x4c9ef7[_0x3b6c('0x40')],_0x3d7f1f,'\x0a'),'customerid_contact@odata.bind':_0x3b6c('0x41')+_0x1748d6[_0x3b6c('0x2e')]+')','ownerid@odata.bind':'/systemusers('+_0x1748d6['userId']+')','caseorigincode':'1'},getCustomFields(_0x4c9ef7[_0x3b6c('0x42')],_0x3d7f1f,_0x4c9ef7[_0x3b6c('0x3a')])),'headers':{'Authorization':_0x3b6c('0x17')+_0x5975b1,'OData-Version':_0x3b6c('0x18')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x4c9ef7['ticketType']===_0x3b6c('0x43')){_0x4730c9={'method':_0x3b6c('0xa'),'uri':_0xd70203+'phonecalls','body':Object['assign']({},{'subject':intUtil['getString'](_0x4c9ef7[_0x3b6c('0x3f')],_0x3d7f1f,'\x20'),'phonenumber':String(_0x3d7f1f[_0x3b6c('0x28')]),'description':intUtil[_0x3b6c('0x3e')](_0x4c9ef7[_0x3b6c('0x40')],_0x3d7f1f,'\x0a'),'regardingobjectid_contact@odata.bind':_0x3b6c('0x41')+_0x1748d6[_0x3b6c('0x2e')]+')','ownerid@odata.bind':'/systemusers('+_0x1748d6[_0x3b6c('0x24')]+')','directioncode':_0x1748d6[_0x3b6c('0x44')]===_0x3b6c('0x45')?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0x3b6c('0x2a')+_0x1748d6[_0x3b6c('0x24')]+')','participationtypemask':_0x1748d6['callDirection']===_0x3b6c('0x45')?0x2:0x1},{'partyid_contact@odata.bind':_0x3b6c('0x41')+_0x1748d6['enduserId']+')','participationtypemask':_0x1748d6[_0x3b6c('0x44')]==='queue'?0x1:0x2}]},getCustomFields(_0x4c9ef7['Fields'],_0x3d7f1f,_0x4c9ef7[_0x3b6c('0x3a')])),'headers':{'Authorization':_0x3b6c('0x17')+_0x5975b1,'OData-Version':_0x3b6c('0x18')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x4730c9);})[_0x3b6c('0x10')](function(_0x419cbb){var _0xd87822=_0x419cbb[_0x3b6c('0x2b')][_0x3b6c('0x2c')];var _0x21dbba=_0xd87822['substring'](_0xd87822[_0x3b6c('0x46')]('(')+0x1,_0xd87822[_0x3b6c('0x46')](')'));_0x1748d6['ticketId']=_0x21dbba;_0xe0e60c(_0x1748d6);})[_0x3b6c('0x25')](function(_0x4e7eb9){_0x440e43(_0x4e7eb9[_0x3b6c('0x26')]);});});}function emit(_0x4ab9b9,_0x1d7d9d,_0x692082,_0x1acb51){var _0x975e27={'uri':util[_0x3b6c('0x47')](_0x3b6c('0x48'),_0x4ab9b9,_0x692082,_0x1acb51)};io['to'](util['format'](_0x3b6c('0x49'),_0x1d7d9d))[_0x3b6c('0x4a')]('trigger:browser:url',_0x975e27);}exports['cs']=function(_0x283fa5,_0x38a332,_0x103219,_0x4c36f4,_0x4ae00a,_0xfc0071,_0x4b400e,_0x254e3b){var _0x5ec310={};_0xfc0071['remoteUri']=intUtil[_0x3b6c('0x4b')](_0xfc0071['remoteUri']);_0xfc0071['serverUrl']=intUtil[_0x3b6c('0x4b')](_0xfc0071[_0x3b6c('0x4c')]);_0x5ec310['callDirection']=_0x254e3b==='queue'||_0x254e3b==='abandoned'?_0x3b6c('0x45'):_0x3b6c('0x30');var _0x2f4c94=util['format'](_0x3b6c('0x4d'),_0xfc0071[_0x3b6c('0xc')]);var _0x3e94af=util[_0x3b6c('0x47')](_0x3b6c('0x4e'),_0xfc0071[_0x3b6c('0x4f')]);var _0x4f0f1f=util[_0x3b6c('0x47')](_0x3b6c('0x50'),_0xfc0071[_0x3b6c('0x4c')],_0x38a332[_0x3b6c('0x51')],md5(_0x38a332[_0x3b6c('0x51')]));if(_0x4ae00a&&_0x4ae00a[_0x3b6c('0x52')]){logger[_0x3b6c('0x21')](_0x3b6c('0x53'),_0x3b6c('0x54'));_0x38a332[_0x3b6c('0x55')]=_0x4f0f1f;}else if(_0x4b400e&&_0x4b400e[_0x3b6c('0x56')]&&_0x4b400e[_0x3b6c('0x56')]!=='none'){logger[_0x3b6c('0x21')](_0x3b6c('0x57'),_0x3b6c('0x54'));_0x38a332[_0x3b6c('0x55')]=_0x4f0f1f;}else{_0x38a332[_0x3b6c('0x55')]='';}return getUser(_0x5ec310,_0xfc0071,_0x4c36f4,_0x3e94af,_0x2f4c94,_0x254e3b)[_0x3b6c('0x10')](function(_0x340cf6){logger[_0x3b6c('0x21')]('['+_0x254e3b[_0x3b6c('0x13')]()+_0x3b6c('0x58'),_0x340cf6[_0x3b6c('0x24')]);logger[_0x3b6c('0x21')]('['+_0x254e3b[_0x3b6c('0x13')]()+_0x3b6c('0x59'),_0x340cf6[_0x3b6c('0x1d')]);return getEndUser(_0x340cf6,_0xfc0071,_0x3e94af,_0x2f4c94,_0x38a332,_0x254e3b);})[_0x3b6c('0x10')](function(_0x284cf4){logger[_0x3b6c('0x21')]('['+_0x254e3b[_0x3b6c('0x13')]()+_0x3b6c('0x5a'),_0x284cf4[_0x3b6c('0x2e')]);logger[_0x3b6c('0x21')]('['+_0x254e3b['toUpperCase']()+_0x3b6c('0x5b'),_0x38a332[_0x3b6c('0x28')]);return getTicket(_0x284cf4,_0xfc0071,_0x3e94af,_0x2f4c94,_0x38a332,_0x103219,_0x254e3b);})[_0x3b6c('0x10')](function(_0x41af19){logger['info'](util['format']('['+_0x254e3b['toUpperCase']()+']\x20The\x20%s\x20ID\x20is:\x20%s',_0x103219[_0x3b6c('0x3a')],_0x41af19['ticketId']));logger['info'](util[_0x3b6c('0x47')]('['+_0x254e3b[_0x3b6c('0x13')]()+_0x3b6c('0x5c'),_0x254e3b));if(_0x254e3b!==_0x3b6c('0x5d')){logger[_0x3b6c('0x21')]('['+_0x254e3b['toUpperCase']()+']',_0x3b6c('0x5e'));emit(_0xfc0071[_0x3b6c('0xc')],_0x4c36f4[_0x3b6c('0x5f')],_0x103219['ticketType'],_0x41af19[_0x3b6c('0x60')]);}})[_0x3b6c('0x25')](function(_0x99a893){logger[_0x3b6c('0x12')]('['+_0x254e3b[_0x3b6c('0x13')]()+_0x3b6c('0x61'),util[_0x3b6c('0x62')](_0x99a893,{'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 80c87d6..bd6ceab 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 _0x79e0=['error','outbound','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','Authorization','destcalleridnum','user:%s','abandoned','[ABANDONED]','calleridname','lodash','request-promise','md5','util','../../../../config/environment','../../../../config/logger','redis','localhost','socket.io-emitter','application/json','emit','Creating\x20new\x20ticket...','merge','format','Caller\x20-\x20%s','calleridnum','getString','Subjects','Descriptions',' ','name','Fields','custom_fields','mapValues','keyBy','value','%s/api/v2/tickets','remoteUri','POST','then','info','Ticket\x20created!','validateEmail','%s/api/v2/agents','length','Agent\x20found!','find','contact','email','%s/api/v2/agents/me','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Enduser\x20created.','Basic\x20%s','apiKey','toString','base64','debug','[HTTP]','stringify','defaults','map','type','string','nameField','customField','toLowerCase','content','idField','push','variable','variableName','customVariable','Variable','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','uniqueid','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','%s/helpdesk/tickets/%d','catch'];(function(_0x12254f,_0x100cfe){var _0x3a4fa2=function(_0x1ce891){while(--_0x1ce891){_0x12254f['push'](_0x12254f['shift']());}};_0x3a4fa2(++_0x100cfe);}(_0x79e0,0x6b));var _0x079e=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x79e0[_0x465028];return _0xb783d4;};'use strict';var _=require(_0x079e('0x0'));var rp=require(_0x079e('0x1'));var md5=require(_0x079e('0x2'));var util=require(_0x079e('0x3'));var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0x079e('0x4'));var logger=require(_0x079e('0x5'))('freshdesk');config[_0x079e('0x6')]=_['defaults'](config[_0x079e('0x6')],{'host':_0x079e('0x7'),'port':0x18eb});var io=require(_0x079e('0x8'))(new Redis(config[_0x079e('0x6')]));var headers={'Content-Type':_0x079e('0x9'),'Accept':'application/json'};function emit(_0x50b945,_0x1501bd,_0x20598f){io['to'](_0x50b945)[_0x079e('0xa')](_0x1501bd,_0x20598f);}function getTicket(_0x4ede5b,_0x33d3f0,_0x4a5f22,_0x231019,_0x14fdc4){logger['info'](_0x079e('0xb'));var _0x478fa6=_[_0x079e('0xc')]({'responder_id':_0x33d3f0['id'],'requester_id':_0x4a5f22['id'],'name':util[_0x079e('0xd')](_0x079e('0xe'),_0x14fdc4['calleridname']),'phone':_0x14fdc4[_0x079e('0xf')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0x079e('0x10')](_0x231019[_0x079e('0x11')],_0x14fdc4,'\x20'),'description':intUtil[_0x079e('0x10')](_0x231019[_0x079e('0x12')],_0x14fdc4,_0x079e('0x13')),'tags':getTags(_0x231019['Tags'],_0x079e('0x14'))},getCustomFields(_0x231019[_0x079e('0x15')],_0x14fdc4));_0x478fa6[_0x079e('0x16')]=_[_0x079e('0x17')](_[_0x079e('0x18')](_0x478fa6[_0x079e('0x16')],'id'),_0x079e('0x19'));return request({'uri':util['format'](_0x079e('0x1a'),_0x4ede5b[_0x079e('0x1b')]),'method':_0x079e('0x1c'),'body':_0x478fa6})[_0x079e('0x1d')](function(_0x19f7a3){logger[_0x079e('0x1e')](_0x079e('0x1f'));return _0x19f7a3;});}function getUser(_0x149a82,_0x2ffb4c){if(intUtil[_0x079e('0x20')](_0x2ffb4c)){return request({'uri':util[_0x079e('0xd')](_0x079e('0x21'),_0x149a82['remoteUri']),'qs':{'email':_0x2ffb4c}})[_0x079e('0x1d')](function(_0x36257c){if(_0x36257c[_0x079e('0x22')]){logger['info'](_0x079e('0x23'));return _[_0x079e('0x24')](_0x36257c,function(_0xc175){return _0xc175[_0x079e('0x25')][_0x079e('0x26')]===_0x2ffb4c;});}else{logger[_0x079e('0x1e')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return request({'uri':util[_0x079e('0xd')](_0x079e('0x27'),_0x149a82[_0x079e('0x1b')])})[_0x079e('0x1d')](function(_0x7b3b1e){logger['info']('Admin\x20account\x20selected.');return _0x7b3b1e;});}});}else{logger[_0x079e('0x1e')](_0x079e('0x28'));return request({'uri':util[_0x079e('0xd')](_0x079e('0x27'),_0x149a82[_0x079e('0x1b')])})[_0x079e('0x1d')](function(_0x50582b){logger[_0x079e('0x1e')](_0x079e('0x29'));return _0x50582b;});}}function getEndUser(_0x3ce74a,_0x16b704,_0x86380b){logger[_0x079e('0x1e')](_0x079e('0x2a'),_0x86380b);return request({'uri':util['format'](_0x079e('0x2b'),_0x3ce74a[_0x079e('0x1b')]),'qs':{'phone':_0x86380b}})[_0x079e('0x1d')](function(_0x356f4a){if(_0x356f4a[_0x079e('0x22')]){logger[_0x079e('0x1e')](_0x079e('0x2c'));return _[_0x079e('0x24')](_0x356f4a,{'phone':_0x86380b});}else{logger[_0x079e('0x1e')](_0x079e('0x2d'));return request({'uri':util[_0x079e('0xd')](_0x079e('0x2b'),_0x3ce74a[_0x079e('0x1b')]),'method':_0x079e('0x1c'),'body':{'name':_0x16b704,'phone':_0x86380b}})[_0x079e('0x1d')](function(_0x59c4a0){logger[_0x079e('0x1e')](_0x079e('0x2e'));return _0x59c4a0;});}});}function getAuth(_0x2b95d0){return util[_0x079e('0xd')](_0x079e('0x2f'),new Buffer(_0x2b95d0[_0x079e('0x30')]+':X')[_0x079e('0x31')](_0x079e('0x32')));}function request(_0xf5e53b){logger[_0x079e('0x33')](_0x079e('0x34'),JSON[_0x079e('0x35')](_0xf5e53b));return rp(_[_0x079e('0x36')](_0xf5e53b,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0x4e5237,_0x25b0d8){var _0xb82082=[];if(_0x4e5237&&_0x4e5237[_0x079e('0x22')]>0x0){_0xb82082=_[_0x079e('0x37')](_0x4e5237,_0x25b0d8);}return _0xb82082;}function getCustomFields(_0x4958cb,_0x152668){var _0x2c5ee6=[];var _0x1e5c28={'custom_fields':[]};if(_0x4958cb['length']>0x0){_['forEach'](_0x4958cb,function(_0x862d84){if(_0x862d84[_0x079e('0x38')]===_0x079e('0x39')&&_0x862d84[_0x079e('0x3a')]&&!_0x862d84[_0x079e('0x3b')]){_0x1e5c28[_0x862d84[_0x079e('0x3a')][_0x079e('0x3c')]()]=_0x862d84[_0x079e('0x3d')][_0x079e('0x31')]();}else if(_0x862d84['type']===_0x079e('0x39')&&_0x862d84[_0x079e('0x3e')]&&_0x862d84[_0x079e('0x3b')]){_0x1e5c28[_0x079e('0x16')][_0x079e('0x3f')]({'id':_0x862d84['idField'],'value':_0x862d84[_0x079e('0x3d')][_0x079e('0x31')]()});}else if(_0x862d84[_0x079e('0x38')]===_0x079e('0x40')&&_0x862d84[_0x079e('0x41')]&&_0x862d84['idField']&&_0x862d84[_0x079e('0x3b')]){_0x152668[_0x862d84[_0x079e('0x41')]]&&_0x1e5c28['custom_fields']['push']({'id':_0x862d84[_0x079e('0x3e')],'value':_0x152668[_0x862d84[_0x079e('0x41')]][_0x079e('0x31')]()});}else if(_0x862d84[_0x079e('0x38')]===_0x079e('0x42')&&_0x862d84[_0x079e('0x43')]&&_0x862d84[_0x079e('0x43')][_0x079e('0x14')]&&_0x862d84[_0x079e('0x3e')]&&_0x862d84['customField']){_0x152668[_0x862d84['Variable'][_0x079e('0x14')]['toLowerCase']()]&&_0x1e5c28[_0x079e('0x16')][_0x079e('0x3f')]({'id':_0x862d84[_0x079e('0x3e')],'value':_0x152668[_0x862d84['Variable'][_0x079e('0x14')]['toLowerCase']()][_0x079e('0x31')]()});}});}return _0x1e5c28;}exports[_0x079e('0x44')]=function(_0x3bb23d,_0x3e45f0,_0x27dd0a,_0x3b81b8,_0x1028b1,_0x405cba){var _0x49296d,_0x3472f4;_0x405cba['remoteUri']=intUtil[_0x079e('0x45')](_0x405cba[_0x079e('0x1b')]);_0x405cba[_0x079e('0x46')]=intUtil[_0x079e('0x45')](_0x405cba[_0x079e('0x46')]);if(_0x1028b1&&_0x1028b1[_0x079e('0x47')]){logger[_0x079e('0x1e')](_0x079e('0x48'),_0x079e('0x49'));_0x3e45f0[_0x079e('0x4a')]=util[_0x079e('0xd')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x405cba[_0x079e('0x46')],_0x3e45f0[_0x079e('0x4b')],md5(_0x3e45f0[_0x079e('0x4b')]));}else{_0x3e45f0['recordingURL']='';}headers['Authorization']=getAuth(_0x405cba);return getUser(_0x405cba,_0x3b81b8[_0x079e('0x26')])[_0x079e('0x1d')](function(_0x52dfee){_0x49296d=_0x52dfee;logger[_0x079e('0x1e')](_0x079e('0x4c'),_0x49296d['id']);return getEndUser(_0x405cba,_0x3e45f0['calleridname'],_0x3e45f0[_0x079e('0xf')]);})[_0x079e('0x1d')](function(_0x4ebafc){_0x3472f4=_0x4ebafc;logger[_0x079e('0x1e')](_0x079e('0x4d'),_0x3472f4['id']);return getTicket(_0x405cba,_0x49296d,_0x3472f4,_0x27dd0a,_0x3e45f0);})[_0x079e('0x1d')](function(_0x469775){if(_0x469775&&_0x469775['id']){logger[_0x079e('0x1e')]('Ticket\x20created!');logger[_0x079e('0x1e')](_0x079e('0x4e'),_0x469775['id']);logger['info'](_0x079e('0x48'),_0x079e('0x4f'));emit(util[_0x079e('0xd')]('user:%s',_0x3b81b8['name']),_0x079e('0x50'),{'uri':util[_0x079e('0xd')](_0x079e('0x51'),_0x405cba['remoteUri'],_0x469775['id'])});}})[_0x079e('0x52')](function(_0x5ac3d3){logger[_0x079e('0x53')]('[QUEUE]',JSON['stringify'](_0x5ac3d3));});};exports[_0x079e('0x54')]=function(_0x4a78b3,_0x339423,_0x5b127d,_0x41898e,_0xe6d578,_0x44741a,_0x29ea32){var _0x24b5e9,_0x4e6eb5;_0x44741a[_0x079e('0x1b')]=intUtil[_0x079e('0x45')](_0x44741a[_0x079e('0x1b')]);_0x44741a[_0x079e('0x46')]=intUtil['stripTrailingSlash'](_0x44741a[_0x079e('0x46')]);if(_0x29ea32&&_0x29ea32[_0x079e('0x55')]&&_0x29ea32[_0x079e('0x55')]!==_0x079e('0x56')){logger[_0x079e('0x1e')](_0x079e('0x57'),_0x079e('0x49'));_0x339423[_0x079e('0x4a')]=util[_0x079e('0xd')](_0x079e('0x58'),_0x44741a['serverUrl'],_0x339423[_0x079e('0x4b')],md5(_0x339423['uniqueid']));}headers[_0x079e('0x59')]=getAuth(_0x44741a);return getUser(_0x44741a,_0x41898e[_0x079e('0x26')])[_0x079e('0x1d')](function(_0x183526){_0x24b5e9=_0x183526;logger[_0x079e('0x1e')](_0x079e('0x4c'),_0x24b5e9['id']);return getEndUser(_0x44741a,_0x339423['destcalleridname'],_0x339423[_0x079e('0x5a')]);})[_0x079e('0x1d')](function(_0x403fb7){_0x4e6eb5=_0x403fb7;logger['info'](_0x079e('0x4d'),_0x4e6eb5['id']);return getTicket(_0x44741a,_0x24b5e9,_0x4e6eb5,_0x5b127d,_0x339423);})[_0x079e('0x1d')](function(_0xfc3307){if(_0xfc3307&&_0xfc3307['id']){logger[_0x079e('0x1e')]('Ticket\x20created!');logger[_0x079e('0x1e')](_0x079e('0x4e'),_0xfc3307['id']);logger[_0x079e('0x1e')](_0x079e('0x57'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x079e('0xd')](_0x079e('0x5b'),_0x41898e[_0x079e('0x14')]),_0x079e('0x50'),{'uri':util[_0x079e('0xd')](_0x079e('0x51'),_0x44741a[_0x079e('0x1b')],_0xfc3307['id'])});}})[_0x079e('0x52')](function(_0x503dcb){logger[_0x079e('0x53')](_0x079e('0x57'),JSON[_0x079e('0x35')](_0x503dcb));});};exports[_0x079e('0x5c')]=function(_0x4daeb2,_0x44d27a,_0x4e4a09,_0xe1cddd,_0x24a8d4,_0x16f14d){var _0x59fb24,_0x57e64a;_0x16f14d['remoteUri']=intUtil[_0x079e('0x45')](_0x16f14d[_0x079e('0x1b')]);_0x16f14d[_0x079e('0x46')]=intUtil[_0x079e('0x45')](_0x16f14d['serverUrl']);if(_0x24a8d4&&_0x24a8d4[_0x079e('0x47')]){logger[_0x079e('0x1e')](_0x079e('0x5d'),_0x079e('0x49'));_0x44d27a[_0x079e('0x4a')]=util[_0x079e('0xd')](_0x079e('0x58'),_0x16f14d[_0x079e('0x46')],_0x44d27a[_0x079e('0x4b')],md5(_0x44d27a[_0x079e('0x4b')]));}else{_0x44d27a[_0x079e('0x4a')]='';}headers[_0x079e('0x59')]=getAuth(_0x16f14d);return getUser(_0x16f14d,'')['then'](function(_0x20678e){_0x59fb24=_0x20678e;logger['info'](_0x079e('0x4c'),_0x59fb24['id']);return getEndUser(_0x16f14d,_0x44d27a[_0x079e('0x5e')],_0x44d27a[_0x079e('0xf')]);})['then'](function(_0x47207a){_0x57e64a=_0x47207a;logger[_0x079e('0x1e')](_0x079e('0x4d'),_0x57e64a['id']);return getTicket(_0x16f14d,_0x59fb24,_0x57e64a,_0x4e4a09,_0x44d27a);})[_0x079e('0x1d')](function(_0xf1fe44){if(_0xf1fe44){logger[_0x079e('0x1e')](_0x079e('0x1f'));logger[_0x079e('0x1e')](_0x079e('0x4e'),_0xf1fe44['id']);}})[_0x079e('0x52')](function(_0x53ea1e){logger[_0x079e('0x53')](_0x079e('0x5d'),JSON[_0x079e('0x35')](_0x53ea1e));});};
\ No newline at end of file
+var _0x482b=['./util','../../../../config/environment','../../../../config/logger','freshdesk','redis','defaults','localhost','socket.io-emitter','application/json','emit','info','merge','format','Caller\x20-\x20%s','calleridname','calleridnum','getString','Descriptions',' ','Tags','Fields','custom_fields','mapValues','%s/api/v2/tickets','remoteUri','POST','then','Ticket\x20created!','validateEmail','length','Agent\x20found!','find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','Enduser\x20found!','Basic\x20%s','apiKey','base64','debug','[HTTP]','stringify','GET','map','forEach','type','string','nameField','toString','push','idField','variableName','customField','customVariable','Variable','name','toLowerCase','stripTrailingSlash','serverUrl','recordingURL','uniqueid','Authorization','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/helpdesk/tickets/%d','catch','error','outbound','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','abandoned','[ABANDONED]','request-promise','md5','util','ioredis'];(function(_0x3c5163,_0xac9816){var _0x2943c=function(_0x5daca7){while(--_0x5daca7){_0x3c5163['push'](_0x3c5163['shift']());}};_0x2943c(++_0xac9816);}(_0x482b,0xac));var _0xb482=function(_0x23f55b,_0x18f6d8){_0x23f55b=_0x23f55b-0x0;var _0x3c9a5a=_0x482b[_0x23f55b];return _0x3c9a5a;};'use strict';var _=require('lodash');var rp=require(_0xb482('0x0'));var md5=require(_0xb482('0x1'));var util=require(_0xb482('0x2'));var Redis=require(_0xb482('0x3'));var intUtil=require(_0xb482('0x4'));var config=require(_0xb482('0x5'));var logger=require(_0xb482('0x6'))(_0xb482('0x7'));config[_0xb482('0x8')]=_[_0xb482('0x9')](config[_0xb482('0x8')],{'host':_0xb482('0xa'),'port':0x18eb});var io=require(_0xb482('0xb'))(new Redis(config['redis']));var headers={'Content-Type':'application/json','Accept':_0xb482('0xc')};function emit(_0x189c53,_0x34ad62,_0x357acd){io['to'](_0x189c53)[_0xb482('0xd')](_0x34ad62,_0x357acd);}function getTicket(_0x483dd4,_0x298fba,_0x3c37f0,_0x3aa878,_0x3ece8c){logger[_0xb482('0xe')]('Creating\x20new\x20ticket...');var _0x123fa0=_[_0xb482('0xf')]({'responder_id':_0x298fba['id'],'requester_id':_0x3c37f0['id'],'name':util[_0xb482('0x10')](_0xb482('0x11'),_0x3ece8c[_0xb482('0x12')]),'phone':_0x3ece8c[_0xb482('0x13')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil['getString'](_0x3aa878['Subjects'],_0x3ece8c,'\x20'),'description':intUtil[_0xb482('0x14')](_0x3aa878[_0xb482('0x15')],_0x3ece8c,_0xb482('0x16')),'tags':getTags(_0x3aa878[_0xb482('0x17')],'name')},getCustomFields(_0x3aa878[_0xb482('0x18')],_0x3ece8c));_0x123fa0[_0xb482('0x19')]=_[_0xb482('0x1a')](_['keyBy'](_0x123fa0['custom_fields'],'id'),'value');return request({'uri':util[_0xb482('0x10')](_0xb482('0x1b'),_0x483dd4[_0xb482('0x1c')]),'method':_0xb482('0x1d'),'body':_0x123fa0})[_0xb482('0x1e')](function(_0x5b4571){logger[_0xb482('0xe')](_0xb482('0x1f'));return _0x5b4571;});}function getUser(_0xe6fedb,_0xa963b6){if(intUtil[_0xb482('0x20')](_0xa963b6)){return request({'uri':util[_0xb482('0x10')]('%s/api/v2/agents',_0xe6fedb[_0xb482('0x1c')]),'qs':{'email':_0xa963b6}})[_0xb482('0x1e')](function(_0x5a10ef){if(_0x5a10ef[_0xb482('0x21')]){logger['info'](_0xb482('0x22'));return _[_0xb482('0x23')](_0x5a10ef,function(_0x1c470f){return _0x1c470f[_0xb482('0x24')][_0xb482('0x25')]===_0xa963b6;});}else{logger[_0xb482('0xe')](_0xb482('0x26'));return request({'uri':util[_0xb482('0x10')]('%s/api/v2/agents/me',_0xe6fedb[_0xb482('0x1c')])})['then'](function(_0x5bd283){logger[_0xb482('0xe')](_0xb482('0x27'));return _0x5bd283;});}});}else{logger[_0xb482('0xe')](_0xb482('0x28'));return request({'uri':util['format']('%s/api/v2/agents/me',_0xe6fedb[_0xb482('0x1c')])})[_0xb482('0x1e')](function(_0x486790){logger['info'](_0xb482('0x27'));return _0x486790;});}}function getEndUser(_0x28c243,_0x33f287,_0x55c49a){logger[_0xb482('0xe')](_0xb482('0x29'),_0x55c49a);return request({'uri':util['format'](_0xb482('0x2a'),_0x28c243[_0xb482('0x1c')]),'qs':{'phone':_0x55c49a}})[_0xb482('0x1e')](function(_0x133147){if(_0x133147[_0xb482('0x21')]){logger[_0xb482('0xe')](_0xb482('0x2b'));return _[_0xb482('0x23')](_0x133147,{'phone':_0x55c49a});}else{logger[_0xb482('0xe')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util[_0xb482('0x10')](_0xb482('0x2a'),_0x28c243[_0xb482('0x1c')]),'method':_0xb482('0x1d'),'body':{'name':_0x33f287,'phone':_0x55c49a}})[_0xb482('0x1e')](function(_0x4aff3b){logger[_0xb482('0xe')]('Enduser\x20created.');return _0x4aff3b;});}});}function getAuth(_0xa2d676){return util[_0xb482('0x10')](_0xb482('0x2c'),new Buffer(_0xa2d676[_0xb482('0x2d')]+':X')['toString'](_0xb482('0x2e')));}function request(_0x5962db){logger[_0xb482('0x2f')](_0xb482('0x30'),JSON[_0xb482('0x31')](_0x5962db));return rp(_[_0xb482('0x9')](_0x5962db,{'method':_0xb482('0x32'),'headers':headers,'json':!![]}));}function getTags(_0x1de8f1,_0x9f70af){var _0x2e72e6=[];if(_0x1de8f1&&_0x1de8f1['length']>0x0){_0x2e72e6=_[_0xb482('0x33')](_0x1de8f1,_0x9f70af);}return _0x2e72e6;}function getCustomFields(_0x4ec597,_0x303ee9){var _0x3c81f6=[];var _0x1c9f9a={'custom_fields':[]};if(_0x4ec597[_0xb482('0x21')]>0x0){_[_0xb482('0x34')](_0x4ec597,function(_0x579ce0){if(_0x579ce0[_0xb482('0x35')]===_0xb482('0x36')&&_0x579ce0[_0xb482('0x37')]&&!_0x579ce0['customField']){_0x1c9f9a[_0x579ce0['nameField']['toLowerCase']()]=_0x579ce0['content'][_0xb482('0x38')]();}else if(_0x579ce0[_0xb482('0x35')]===_0xb482('0x36')&&_0x579ce0['idField']&&_0x579ce0['customField']){_0x1c9f9a[_0xb482('0x19')][_0xb482('0x39')]({'id':_0x579ce0[_0xb482('0x3a')],'value':_0x579ce0['content']['toString']()});}else if(_0x579ce0[_0xb482('0x35')]==='variable'&&_0x579ce0[_0xb482('0x3b')]&&_0x579ce0[_0xb482('0x3a')]&&_0x579ce0[_0xb482('0x3c')]){_0x303ee9[_0x579ce0['variableName']]&&_0x1c9f9a[_0xb482('0x19')]['push']({'id':_0x579ce0[_0xb482('0x3a')],'value':_0x303ee9[_0x579ce0[_0xb482('0x3b')]][_0xb482('0x38')]()});}else if(_0x579ce0[_0xb482('0x35')]===_0xb482('0x3d')&&_0x579ce0[_0xb482('0x3e')]&&_0x579ce0['Variable'][_0xb482('0x3f')]&&_0x579ce0[_0xb482('0x3a')]&&_0x579ce0[_0xb482('0x3c')]){_0x303ee9[_0x579ce0['Variable'][_0xb482('0x3f')][_0xb482('0x40')]()]&&_0x1c9f9a[_0xb482('0x19')][_0xb482('0x39')]({'id':_0x579ce0[_0xb482('0x3a')],'value':_0x303ee9[_0x579ce0['Variable'][_0xb482('0x3f')][_0xb482('0x40')]()]['toString']()});}});}return _0x1c9f9a;}exports['queue']=function(_0x289218,_0x3b17b0,_0x2e1bc3,_0x39b339,_0x2bc17a,_0x10e1c8){var _0xb7245e,_0x5da482;_0x10e1c8['remoteUri']=intUtil[_0xb482('0x41')](_0x10e1c8[_0xb482('0x1c')]);_0x10e1c8[_0xb482('0x42')]=intUtil['stripTrailingSlash'](_0x10e1c8['serverUrl']);if(_0x2bc17a&&_0x2bc17a['monitor_format']){logger[_0xb482('0xe')]('[QUEUE]','Recording\x20is\x20enabled!');_0x3b17b0[_0xb482('0x43')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x10e1c8[_0xb482('0x42')],_0x3b17b0[_0xb482('0x44')],md5(_0x3b17b0['uniqueid']));}else{_0x3b17b0[_0xb482('0x43')]='';}headers[_0xb482('0x45')]=getAuth(_0x10e1c8);return getUser(_0x10e1c8,_0x39b339['email'])[_0xb482('0x1e')](function(_0x5da154){_0xb7245e=_0x5da154;logger['info'](_0xb482('0x46'),_0xb7245e['id']);return getEndUser(_0x10e1c8,_0x3b17b0[_0xb482('0x12')],_0x3b17b0['calleridnum']);})[_0xb482('0x1e')](function(_0x439b52){_0x5da482=_0x439b52;logger[_0xb482('0xe')](_0xb482('0x47'),_0x5da482['id']);return getTicket(_0x10e1c8,_0xb7245e,_0x5da482,_0x2e1bc3,_0x3b17b0);})[_0xb482('0x1e')](function(_0x37a490){if(_0x37a490&&_0x37a490['id']){logger[_0xb482('0xe')](_0xb482('0x1f'));logger['info'](_0xb482('0x48'),_0x37a490['id']);logger[_0xb482('0xe')](_0xb482('0x49'),_0xb482('0x4a'));emit(util[_0xb482('0x10')](_0xb482('0x4b'),_0x39b339['name']),_0xb482('0x4c'),{'uri':util['format'](_0xb482('0x4d'),_0x10e1c8[_0xb482('0x1c')],_0x37a490['id'])});}})[_0xb482('0x4e')](function(_0x47a127){logger[_0xb482('0x4f')](_0xb482('0x49'),JSON[_0xb482('0x31')](_0x47a127));});};exports[_0xb482('0x50')]=function(_0x253263,_0x46307d,_0x23d14e,_0x44ec77,_0x5668d0,_0x3faf62,_0x58fc9d){var _0x13dff9,_0x5cf863;_0x3faf62[_0xb482('0x1c')]=intUtil[_0xb482('0x41')](_0x3faf62['remoteUri']);_0x3faf62[_0xb482('0x42')]=intUtil[_0xb482('0x41')](_0x3faf62[_0xb482('0x42')]);if(_0x58fc9d&&_0x58fc9d[_0xb482('0x51')]&&_0x58fc9d['recordingFormat']!==_0xb482('0x52')){logger['info'](_0xb482('0x53'),_0xb482('0x54'));_0x46307d[_0xb482('0x43')]=util[_0xb482('0x10')](_0xb482('0x55'),_0x3faf62[_0xb482('0x42')],_0x46307d[_0xb482('0x44')],md5(_0x46307d['uniqueid']));}headers[_0xb482('0x45')]=getAuth(_0x3faf62);return getUser(_0x3faf62,_0x44ec77[_0xb482('0x25')])[_0xb482('0x1e')](function(_0x172031){_0x13dff9=_0x172031;logger[_0xb482('0xe')]('The\x20User\x20ID\x20is:',_0x13dff9['id']);return getEndUser(_0x3faf62,_0x46307d['destcalleridname'],_0x46307d['destcalleridnum']);})[_0xb482('0x1e')](function(_0x33a72a){_0x5cf863=_0x33a72a;logger[_0xb482('0xe')](_0xb482('0x47'),_0x5cf863['id']);return getTicket(_0x3faf62,_0x13dff9,_0x5cf863,_0x23d14e,_0x46307d);})[_0xb482('0x1e')](function(_0x3bc849){if(_0x3bc849&&_0x3bc849['id']){logger[_0xb482('0xe')](_0xb482('0x1f'));logger['info'](_0xb482('0x48'),_0x3bc849['id']);logger['info']('[OUTBOUND]',_0xb482('0x4a'));emit(util[_0xb482('0x10')](_0xb482('0x4b'),_0x44ec77[_0xb482('0x3f')]),_0xb482('0x4c'),{'uri':util[_0xb482('0x10')](_0xb482('0x4d'),_0x3faf62[_0xb482('0x1c')],_0x3bc849['id'])});}})['catch'](function(_0x383c80){logger['error']('[OUTBOUND]',JSON['stringify'](_0x383c80));});};exports[_0xb482('0x56')]=function(_0x2db398,_0x3b832e,_0x54e592,_0xe6a1b6,_0x5c779f,_0x36de36){var _0x46b8a6,_0x3aafbf;_0x36de36[_0xb482('0x1c')]=intUtil['stripTrailingSlash'](_0x36de36['remoteUri']);_0x36de36[_0xb482('0x42')]=intUtil['stripTrailingSlash'](_0x36de36[_0xb482('0x42')]);if(_0x5c779f&&_0x5c779f['monitor_format']){logger[_0xb482('0xe')](_0xb482('0x57'),'Recording\x20is\x20enabled!');_0x3b832e[_0xb482('0x43')]=util[_0xb482('0x10')](_0xb482('0x55'),_0x36de36[_0xb482('0x42')],_0x3b832e['uniqueid'],md5(_0x3b832e[_0xb482('0x44')]));}else{_0x3b832e[_0xb482('0x43')]='';}headers['Authorization']=getAuth(_0x36de36);return getUser(_0x36de36,'')[_0xb482('0x1e')](function(_0x5889f0){_0x46b8a6=_0x5889f0;logger[_0xb482('0xe')](_0xb482('0x46'),_0x46b8a6['id']);return getEndUser(_0x36de36,_0x3b832e['calleridname'],_0x3b832e['calleridnum']);})[_0xb482('0x1e')](function(_0x22db2a){_0x3aafbf=_0x22db2a;logger[_0xb482('0xe')](_0xb482('0x47'),_0x3aafbf['id']);return getTicket(_0x36de36,_0x46b8a6,_0x3aafbf,_0x54e592,_0x3b832e);})['then'](function(_0x11450a){if(_0x11450a){logger[_0xb482('0xe')](_0xb482('0x1f'));logger[_0xb482('0xe')](_0xb482('0x48'),_0x11450a['id']);}})[_0xb482('0x4e')](function(_0x15ee39){logger['error'](_0xb482('0x57'),JSON[_0xb482('0x31')](_0x15ee39));});};
\ No newline at end of file
diff --git a/server/services/ami/trigger/integration/freshsales.js b/server/services/ami/trigger/integration/freshsales.js
index a19d232..d74cdee 100644
--- a/server/services/ami/trigger/integration/freshsales.js
+++ b/server/services/ami/trigger/integration/freshsales.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x98c5=['email','adminId','info','Requested\x20Resource\x20not\x20Found','catch','error','toUpperCase','message','GET','Getting\x20user\x20list','agentEmail','Getting\x20user\x20with\x20email','userId','User\x20found:','Admin\x20selected','userEmail','adminEmail','/api/contacts/filters','filters','Getting\x20contact\x20list','/api/contacts/view/','contactNumber','contacts','find','work_number','mobile_number','Contact\x20found:','endUserId','Contact\x20created:','POST','format','YYYY-MM-DDTHH:mm:ss','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','contact','/api/tasks','getString','Subjects','Descriptions','Contact','add','ticketId','task','Task\x20created:','/contacts/','user:%s','emit','trigger:browser:url','Token\x20token=','apiKey','remoteUri','stripTrailingSlash','serverUrl','username','toLowerCase','destcalleridnum','callDirection','abandoned','queue','outbound','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','recordingURL','recordingFormat','Recording\x20is\x20enabled!','The\x20ticket\x20ID\x20is:\x20%s','Displaying\x20task\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Freshsales\x20integration','inspect','lodash','request-promise','md5','util','bluebird','ioredis','./util','../../../../config/environment','../../../../config/logger','freshsales','redis','defaults','localhost','socket.io-emitter','/api/selector/owners','headers','Getting\x20admin\x20information','then','length'];(function(_0x207db1,_0x19c38c){var _0x3744e1=function(_0x1cd678){while(--_0x1cd678){_0x207db1['push'](_0x207db1['shift']());}};_0x3744e1(++_0x19c38c);}(_0x98c5,0xfb));var _0x598c=function(_0x507e40,_0xc60ac4){_0x507e40=_0x507e40-0x0;var _0x4df849=_0x98c5[_0x507e40];return _0x4df849;};'use strict';var _=require(_0x598c('0x0'));var rp=require(_0x598c('0x1'));var md5=require(_0x598c('0x2'));var util=require(_0x598c('0x3'));var moment=require('moment');var Promise=require(_0x598c('0x4'));var Redis=require(_0x598c('0x5'));var intUtil=require(_0x598c('0x6'));var config=require(_0x598c('0x7'));var logger=require(_0x598c('0x8'))(_0x598c('0x9'));config[_0x598c('0xa')]=_[_0x598c('0xb')](config[_0x598c('0xa')],{'host':_0x598c('0xc'),'port':0x18eb});var io=require(_0x598c('0xd'))(new Redis(config[_0x598c('0xa')]));function getAdminId(_0x2a5938,_0x4a388f,_0x127ba2,_0x5e7cc1){return new Promise(function(_0x44b7d3,_0x19337b){var _0x5db707=![];var _0x5c6d71={'method':'GET','uri':_0x5e7cc1+_0x598c('0xe'),'json':!![]};_0x5c6d71[_0x598c('0xf')]=_0x127ba2;logger['info'](_0x598c('0x10'));return rp(_0x5c6d71)[_0x598c('0x11')](function(_0xa331d3){if(_0xa331d3){var _0xa548c0=_0xa331d3['users'];var _0x5b465b=null;for(_0x5b465b=0x0;_0x5b465b<_0xa548c0[_0x598c('0x12')];_0x5b465b++){if(_0xa548c0[_0x5b465b][_0x598c('0x13')]===_0x2a5938['adminEmail']){_0x2a5938[_0x598c('0x14')]=_0xa548c0[_0x5b465b]['id'];_0x5db707=!![];}}if(_0x5db707){logger[_0x598c('0x15')]('Admin\x20found:',_0x2a5938[_0x598c('0x14')]);_0x44b7d3(_0x2a5938);}else{_0x19337b({'statusCode':0x194,'message':_0x598c('0x16')});}}else{_0x19337b({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}})[_0x598c('0x17')](function(_0x23755b){logger[_0x598c('0x18')]('['+[_0x4a388f[_0x598c('0x19')]()]+']',_0x23755b[_0x598c('0x1a')]);_0x19337b(_0x23755b);});});}function getUser(_0x4bf4e4,_0xb3465a,_0x3e4ebe){return function(_0x29edd0){return new Promise(function(_0x47c50c,_0x471e0d){var _0x4e92b6={'method':_0x598c('0x1b'),'uri':_0x3e4ebe+_0x598c('0xe'),'json':!![]};_0x4e92b6['headers']=_0xb3465a;logger[_0x598c('0x15')](_0x598c('0x1c'));return rp(_0x4e92b6)['then'](function(_0x45b912){if(_0x45b912){var _0x182aee=_0x45b912['users'];var _0x11ef4c=![];var _0x262e2d=null;if(_0x29edd0[_0x598c('0x1d')]!==null){logger[_0x598c('0x15')](_0x598c('0x1e'),_0x29edd0[_0x598c('0x1d')]);_0x29edd0['userEmail']=_0x29edd0['agentEmail'];for(_0x262e2d=0x0;_0x262e2d<_0x182aee[_0x598c('0x12')];_0x262e2d++){if(_0x182aee[_0x262e2d][_0x598c('0x13')]===_0x29edd0['agentEmail']){_0x11ef4c=!![];_0x29edd0[_0x598c('0x1f')]=_0x182aee[_0x262e2d]['id'];logger[_0x598c('0x15')](_0x598c('0x20'),_0x29edd0[_0x598c('0x1f')]);}}}if(!_0x11ef4c){logger['info'](_0x598c('0x21'));_0x29edd0[_0x598c('0x22')]=_0x29edd0[_0x598c('0x23')];_0x29edd0[_0x598c('0x1f')]=_0x29edd0[_0x598c('0x14')];_0x11ef4c=!![];}if(_0x11ef4c){_0x47c50c(_0x29edd0);}else{_0x471e0d({'statusCode':0x194,'message':_0x598c('0x16')});}}else{_0x471e0d({'statusCode':0x194,'message':_0x598c('0x16')});}})[_0x598c('0x17')](function(_0x37a1a7){logger[_0x598c('0x18')]('['+[_0x4bf4e4[_0x598c('0x19')]()]+']',_0x37a1a7['message']);_0x471e0d(_0x37a1a7);});});};}function getEndUser(_0x216df6,_0x2cd547,_0x2b5d0d){return function(_0x5eb2aa){return new Promise(function(_0x483389,_0x35d175){var _0x158879=0x0;var _0x5f0536={'method':_0x598c('0x1b'),'uri':_0x2b5d0d+_0x598c('0x24'),'json':!![]};_0x5f0536['headers']=_0x2cd547;logger[_0x598c('0x15')]('Getting\x20contacts\x20filter');return rp(_0x5f0536)['then'](function(_0x26e4f3){_0x26e4f3[_0x598c('0x25')]['forEach'](function(_0xbe4bb3){if(_0xbe4bb3['name']==='All\x20Contacts'){_0x158879=_0xbe4bb3['id'];}});})[_0x598c('0x11')](function(){logger['info'](_0x598c('0x26'));var _0xf8600c={'method':_0x598c('0x1b'),'uri':_0x2b5d0d+_0x598c('0x27')+_0x158879,'json':!![]};_0xf8600c[_0x598c('0xf')]=_0x2cd547;return rp(_0xf8600c);})[_0x598c('0x11')](function(_0x59c1d6){logger[_0x598c('0x15')]('Searching\x20contact\x20with\x20phone',_0x5eb2aa[_0x598c('0x28')]);if(_0x59c1d6[_0x598c('0x29')]['length']>0x0){var _0x57d19c=_[_0x598c('0x2a')](_0x59c1d6[_0x598c('0x29')],function(_0x58dd37){if(_0x58dd37[_0x598c('0x2b')]===_0x5eb2aa[_0x598c('0x28')]||_0x58dd37[_0x598c('0x2c')]===_0x5eb2aa[_0x598c('0x28')]){return _0x58dd37;}});if(_0x57d19c){_0x5eb2aa['endUserId']=_0x57d19c['id'];logger[_0x598c('0x15')](_0x598c('0x2d'),_0x5eb2aa[_0x598c('0x2e')]);_0x483389(_0x5eb2aa);}else{return createEndUser(_0x5eb2aa,_0x216df6,_0x2cd547,_0x2b5d0d)['then'](function(_0x397534){logger[_0x598c('0x15')](_0x598c('0x2f'),_0x5eb2aa[_0x598c('0x2e')]);_0x483389(_0x397534);});}}else{return createEndUser(_0x5eb2aa,_0x216df6,_0x2cd547,_0x2b5d0d)['then'](function(_0x1b6155){logger[_0x598c('0x15')]('Contact\x20created:',_0x5eb2aa[_0x598c('0x2e')]);_0x483389(_0x1b6155);});}})[_0x598c('0x17')](function(_0x4ee651){throw new Error(_0x4ee651[_0x598c('0x1a')]);});});};}function createEndUser(_0xf95cb4,_0x51e037,_0x5726f9,_0x5711a9){return new Promise(function(_0x4c0b29,_0x20eaf6){var _0x1f57be=moment();var _0x7b8f90={'method':_0x598c('0x30'),'uri':_0x5711a9+'/api/contacts','body':{'contact':{'last_name':_0xf95cb4[_0x598c('0x28')],'work_number':_0xf95cb4[_0x598c('0x28')],'mobile_number':_0xf95cb4['contactNumber'],'owner_id':_0xf95cb4[_0x598c('0x1f')],'created_at':_0x1f57be[_0x598c('0x31')](_0x598c('0x32'))}},'json':!![]};_0x7b8f90[_0x598c('0xf')]=_0x5726f9;logger[_0x598c('0x15')](_0x598c('0x33'));return rp(_0x7b8f90)[_0x598c('0x11')](function(_0x4b3b26){_0xf95cb4[_0x598c('0x2e')]=_0x4b3b26[_0x598c('0x34')]['id'];_0x4c0b29(_0xf95cb4);})[_0x598c('0x17')](function(_0x3b4d76){logger[_0x598c('0x18')]('['+[_0x51e037[_0x598c('0x19')]()]+']',_0x3b4d76[_0x598c('0x1a')]);_0x20eaf6(_0x3b4d76[_0x598c('0x1a')]);});});}function getTicket(_0x49519d,_0x853415,_0x64ee86,_0x57fea9,_0x382c64){return function(_0x4058be){logger[_0x598c('0x15')]('Creating\x20new\x20task');return new Promise(function(_0x8d4213,_0x47594d){var _0x5d5aaf=moment();var _0xb900f7={'method':_0x598c('0x30'),'uri':_0x64ee86+_0x598c('0x35'),'body':{'title':intUtil[_0x598c('0x36')](_0x57fea9[_0x598c('0x37')],_0x382c64,'\x20'),'description':intUtil[_0x598c('0x36')](_0x57fea9[_0x598c('0x38')],_0x382c64,'\x0a'),'owner_id':_0x4058be[_0x598c('0x1f')],'creater_id':_0x4058be['adminId'],'targetable_id':_0x4058be[_0x598c('0x2e')],'targetable_type':_0x598c('0x39'),'created_at':_0x5d5aaf['format'](_0x598c('0x32')),'due_date':_0x5d5aaf[_0x598c('0x3a')](0x1e,'m')[_0x598c('0x31')](_0x598c('0x32'))},'json':!![]};_0xb900f7['headers']=_0x853415;return rp(_0xb900f7)[_0x598c('0x11')](function(_0x4d0e76){_0x4058be[_0x598c('0x3b')]=_0x4d0e76[_0x598c('0x3c')]['id'];logger['info'](_0x598c('0x3d'),_0x4058be[_0x598c('0x3b')]);_0x8d4213(_0x4058be);})['catch'](function(_0x12a023){logger['error']('['+[_0x49519d[_0x598c('0x19')]()]+']',_0x12a023[_0x598c('0x1a')]);_0x47594d(_0x12a023[_0x598c('0x1a')]);});});};}function emit(_0x24f99d,_0x272f12,_0x42f4c0){var _0x376896={'uri':_0x24f99d+_0x598c('0x3e')+_0x42f4c0};io['to'](util[_0x598c('0x31')](_0x598c('0x3f'),_0x272f12))[_0x598c('0x40')](_0x598c('0x41'),_0x376896);}exports['cs']=function(_0x25c0a1,_0x48fe0d,_0x2efaf4,_0x29cec6,_0x381251,_0x115601,_0x14bb6b,_0x51df63){var _0x3048ce={};var _0x4c3d55={'Authorization':_0x598c('0x42')+_0x115601[_0x598c('0x43')]};_0x115601[_0x598c('0x44')]=intUtil[_0x598c('0x45')](_0x115601['remoteUri']);_0x115601['serverUrl']=intUtil['stripTrailingSlash'](_0x115601[_0x598c('0x46')]);var _0x1490d1=_0x115601[_0x598c('0x44')];_0x3048ce['adminEmail']=_0x115601[_0x598c('0x47')];_0x3048ce[_0x598c('0x28')]=_0x51df63[_0x598c('0x48')]()==='outbound'?_0x48fe0d[_0x598c('0x49')]:_0x48fe0d['calleridnum'];_0x3048ce[_0x598c('0x4a')]=_0x51df63==='queue'||_0x51df63===_0x598c('0x4b')?_0x598c('0x4c'):_0x598c('0x4d');if(_0x29cec6){_0x3048ce['agentEmail']=_0x29cec6['email'];}var _0x5dbc02=util['format'](_0x598c('0x4e'),_0x115601[_0x598c('0x46')],_0x48fe0d['uniqueid'],md5(_0x48fe0d[_0x598c('0x4f')]));if(_0x381251&&_0x381251[_0x598c('0x50')]){logger[_0x598c('0x15')](_0x598c('0x51'),'Recording\x20is\x20enabled!');_0x48fe0d[_0x598c('0x52')]=_0x5dbc02;}else if(_0x14bb6b&&_0x14bb6b[_0x598c('0x53')]&&_0x14bb6b[_0x598c('0x53')]!=='none'){logger[_0x598c('0x15')]('[OUTBOUND]',_0x598c('0x54'));_0x48fe0d[_0x598c('0x52')]=_0x5dbc02;}else{_0x48fe0d['recordingURL']='';}return getAdminId(_0x3048ce,_0x51df63,_0x4c3d55,_0x1490d1)['then'](getUser(_0x51df63,_0x4c3d55,_0x1490d1))[_0x598c('0x11')](getEndUser(_0x51df63,_0x4c3d55,_0x1490d1))[_0x598c('0x11')](getTicket(_0x51df63,_0x4c3d55,_0x1490d1,_0x2efaf4,_0x48fe0d))[_0x598c('0x11')](function(_0x504e80){logger['info'](util[_0x598c('0x31')](_0x598c('0x55'),_0x504e80[_0x598c('0x3b')]));if(_0x51df63!==_0x598c('0x4b')){logger[_0x598c('0x15')]('['+[_0x51df63[_0x598c('0x19')]()]+']',_0x598c('0x56'));emit(_0x1490d1,_0x29cec6[_0x598c('0x57')],_0x504e80[_0x598c('0x2e')]);}})[_0x598c('0x17')](function(_0x58e05e){logger[_0x598c('0x18')]('['+[_0x51df63[_0x598c('0x19')]()]+_0x598c('0x58'),util[_0x598c('0x59')](_0x58e05e,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0x1849=['stripTrailingSlash','serverUrl','toLowerCase','outbound','calleridnum','callDirection','queue','abandoned','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','[QUEUE]','Recording\x20is\x20enabled!','recordingFormat','none','[OUTBOUND]','recordingURL','The\x20ticket\x20ID\x20is:\x20%s',']\x20Error\x20running\x20Freshsales\x20integration','inspect','request-promise','md5','util','moment','../../../../config/environment','freshsales','redis','defaults','localhost','socket.io-emitter','/api/selector/owners','headers','info','Getting\x20admin\x20information','length','email','adminEmail','adminId','Requested\x20Resource\x20not\x20Found','catch','error','toUpperCase','message','Getting\x20user\x20list','agentEmail','Getting\x20user\x20with\x20email','userEmail','User\x20found:','userId','Admin\x20selected','GET','/api/contacts/filters','Getting\x20contacts\x20filter','then','filters','forEach','name','/api/contacts/view/','Searching\x20contact\x20with\x20phone','contactNumber','contacts','find','work_number','Contact\x20found:','endUserId','Contact\x20created:','/api/contacts','format','YYYY-MM-DDTHH:mm:ss','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','contact','POST','/api/tasks','Subjects','getString','Descriptions','Contact','ticketId','task','Task\x20created:','/contacts/','user:%s','trigger:browser:url','Token\x20token=','remoteUri'];(function(_0x8c9abd,_0x5f5143){var _0x45b78c=function(_0x580474){while(--_0x580474){_0x8c9abd['push'](_0x8c9abd['shift']());}};_0x45b78c(++_0x5f5143);}(_0x1849,0xb8));var _0x9184=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x1849[_0x5ddb1c];return _0x354adc;};'use strict';var _=require('lodash');var rp=require(_0x9184('0x0'));var md5=require(_0x9184('0x1'));var util=require(_0x9184('0x2'));var moment=require(_0x9184('0x3'));var Promise=require('bluebird');var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0x9184('0x4'));var logger=require('../../../../config/logger')(_0x9184('0x5'));config[_0x9184('0x6')]=_[_0x9184('0x7')](config['redis'],{'host':_0x9184('0x8'),'port':0x18eb});var io=require(_0x9184('0x9'))(new Redis(config['redis']));function getAdminId(_0x305a34,_0x532710,_0x5ca39b,_0x16e5f1){return new Promise(function(_0x20cb8f,_0x18531f){var _0x163565=![];var _0x1388bb={'method':'GET','uri':_0x16e5f1+_0x9184('0xa'),'json':!![]};_0x1388bb[_0x9184('0xb')]=_0x5ca39b;logger[_0x9184('0xc')](_0x9184('0xd'));return rp(_0x1388bb)['then'](function(_0xe6b641){if(_0xe6b641){var _0x3b8983=_0xe6b641['users'];var _0x201f10=null;for(_0x201f10=0x0;_0x201f10<_0x3b8983[_0x9184('0xe')];_0x201f10++){if(_0x3b8983[_0x201f10][_0x9184('0xf')]===_0x305a34[_0x9184('0x10')]){_0x305a34[_0x9184('0x11')]=_0x3b8983[_0x201f10]['id'];_0x163565=!![];}}if(_0x163565){logger['info']('Admin\x20found:',_0x305a34[_0x9184('0x11')]);_0x20cb8f(_0x305a34);}else{_0x18531f({'statusCode':0x194,'message':_0x9184('0x12')});}}else{_0x18531f({'statusCode':0x194,'message':_0x9184('0x12')});}})[_0x9184('0x13')](function(_0x14dbca){logger[_0x9184('0x14')]('['+[_0x532710[_0x9184('0x15')]()]+']',_0x14dbca[_0x9184('0x16')]);_0x18531f(_0x14dbca);});});}function getUser(_0x4f18fb,_0x511ba5,_0x299d68){return function(_0x44e719){return new Promise(function(_0x6520dd,_0xd69919){var _0x2a5ff8={'method':'GET','uri':_0x299d68+_0x9184('0xa'),'json':!![]};_0x2a5ff8[_0x9184('0xb')]=_0x511ba5;logger[_0x9184('0xc')](_0x9184('0x17'));return rp(_0x2a5ff8)['then'](function(_0x435b58){if(_0x435b58){var _0x4f7d78=_0x435b58['users'];var _0x30e0ae=![];var _0x13def8=null;if(_0x44e719[_0x9184('0x18')]!==null){logger[_0x9184('0xc')](_0x9184('0x19'),_0x44e719['agentEmail']);_0x44e719[_0x9184('0x1a')]=_0x44e719[_0x9184('0x18')];for(_0x13def8=0x0;_0x13def8<_0x4f7d78['length'];_0x13def8++){if(_0x4f7d78[_0x13def8][_0x9184('0xf')]===_0x44e719['agentEmail']){_0x30e0ae=!![];_0x44e719['userId']=_0x4f7d78[_0x13def8]['id'];logger[_0x9184('0xc')](_0x9184('0x1b'),_0x44e719[_0x9184('0x1c')]);}}}if(!_0x30e0ae){logger[_0x9184('0xc')](_0x9184('0x1d'));_0x44e719['userEmail']=_0x44e719[_0x9184('0x10')];_0x44e719[_0x9184('0x1c')]=_0x44e719[_0x9184('0x11')];_0x30e0ae=!![];}if(_0x30e0ae){_0x6520dd(_0x44e719);}else{_0xd69919({'statusCode':0x194,'message':_0x9184('0x12')});}}else{_0xd69919({'statusCode':0x194,'message':_0x9184('0x12')});}})['catch'](function(_0xa72849){logger[_0x9184('0x14')]('['+[_0x4f18fb[_0x9184('0x15')]()]+']',_0xa72849[_0x9184('0x16')]);_0xd69919(_0xa72849);});});};}function getEndUser(_0x3ac7c6,_0x356141,_0x49dfdf){return function(_0x369908){return new Promise(function(_0x42d286,_0xc845e9){var _0x414a80=0x0;var _0x5797f1={'method':_0x9184('0x1e'),'uri':_0x49dfdf+_0x9184('0x1f'),'json':!![]};_0x5797f1[_0x9184('0xb')]=_0x356141;logger[_0x9184('0xc')](_0x9184('0x20'));return rp(_0x5797f1)[_0x9184('0x21')](function(_0x27acde){_0x27acde[_0x9184('0x22')][_0x9184('0x23')](function(_0x2da7f5){if(_0x2da7f5[_0x9184('0x24')]==='All\x20Contacts'){_0x414a80=_0x2da7f5['id'];}});})[_0x9184('0x21')](function(){logger[_0x9184('0xc')]('Getting\x20contact\x20list');var _0x42453b={'method':_0x9184('0x1e'),'uri':_0x49dfdf+_0x9184('0x25')+_0x414a80,'json':!![]};_0x42453b[_0x9184('0xb')]=_0x356141;return rp(_0x42453b);})[_0x9184('0x21')](function(_0x1348e3){logger[_0x9184('0xc')](_0x9184('0x26'),_0x369908[_0x9184('0x27')]);if(_0x1348e3[_0x9184('0x28')]['length']>0x0){var _0x54cbf3=_[_0x9184('0x29')](_0x1348e3['contacts'],function(_0x4b6c0a){if(_0x4b6c0a[_0x9184('0x2a')]===_0x369908[_0x9184('0x27')]||_0x4b6c0a['mobile_number']===_0x369908[_0x9184('0x27')]){return _0x4b6c0a;}});if(_0x54cbf3){_0x369908['endUserId']=_0x54cbf3['id'];logger[_0x9184('0xc')](_0x9184('0x2b'),_0x369908[_0x9184('0x2c')]);_0x42d286(_0x369908);}else{return createEndUser(_0x369908,_0x3ac7c6,_0x356141,_0x49dfdf)['then'](function(_0x2265b3){logger['info'](_0x9184('0x2d'),_0x369908[_0x9184('0x2c')]);_0x42d286(_0x2265b3);});}}else{return createEndUser(_0x369908,_0x3ac7c6,_0x356141,_0x49dfdf)['then'](function(_0x15b77e){logger[_0x9184('0xc')](_0x9184('0x2d'),_0x369908[_0x9184('0x2c')]);_0x42d286(_0x15b77e);});}})[_0x9184('0x13')](function(_0x4f7557){throw new Error(_0x4f7557['message']);});});};}function createEndUser(_0x4ece1d,_0x7bc320,_0x292297,_0x38627e){return new Promise(function(_0x2b40a4,_0x5f3b74){var _0x28b741=moment();var _0x5d4501={'method':'POST','uri':_0x38627e+_0x9184('0x2e'),'body':{'contact':{'last_name':_0x4ece1d[_0x9184('0x27')],'work_number':_0x4ece1d[_0x9184('0x27')],'mobile_number':_0x4ece1d[_0x9184('0x27')],'owner_id':_0x4ece1d[_0x9184('0x1c')],'created_at':_0x28b741[_0x9184('0x2f')](_0x9184('0x30'))}},'json':!![]};_0x5d4501[_0x9184('0xb')]=_0x292297;logger[_0x9184('0xc')](_0x9184('0x31'));return rp(_0x5d4501)[_0x9184('0x21')](function(_0x2e1779){_0x4ece1d['endUserId']=_0x2e1779[_0x9184('0x32')]['id'];_0x2b40a4(_0x4ece1d);})[_0x9184('0x13')](function(_0xa7b660){logger[_0x9184('0x14')]('['+[_0x7bc320[_0x9184('0x15')]()]+']',_0xa7b660['message']);_0x5f3b74(_0xa7b660[_0x9184('0x16')]);});});}function getTicket(_0x54e418,_0x2e07ad,_0x55f502,_0x502f70,_0x12ae6e){return function(_0x377863){logger[_0x9184('0xc')]('Creating\x20new\x20task');return new Promise(function(_0x3ed5da,_0x2df2c9){var _0x315f34=moment();var _0x171ea8={'method':_0x9184('0x33'),'uri':_0x55f502+_0x9184('0x34'),'body':{'title':intUtil['getString'](_0x502f70[_0x9184('0x35')],_0x12ae6e,'\x20'),'description':intUtil[_0x9184('0x36')](_0x502f70[_0x9184('0x37')],_0x12ae6e,'\x0a'),'owner_id':_0x377863[_0x9184('0x1c')],'creater_id':_0x377863['adminId'],'targetable_id':_0x377863[_0x9184('0x2c')],'targetable_type':_0x9184('0x38'),'created_at':_0x315f34['format'](_0x9184('0x30')),'due_date':_0x315f34['add'](0x1e,'m')[_0x9184('0x2f')]('YYYY-MM-DDTHH:mm:ss')},'json':!![]};_0x171ea8[_0x9184('0xb')]=_0x2e07ad;return rp(_0x171ea8)[_0x9184('0x21')](function(_0x7f5cf7){_0x377863[_0x9184('0x39')]=_0x7f5cf7[_0x9184('0x3a')]['id'];logger[_0x9184('0xc')](_0x9184('0x3b'),_0x377863[_0x9184('0x39')]);_0x3ed5da(_0x377863);})['catch'](function(_0x5d9747){logger['error']('['+[_0x54e418['toUpperCase']()]+']',_0x5d9747[_0x9184('0x16')]);_0x2df2c9(_0x5d9747[_0x9184('0x16')]);});});};}function emit(_0x5409b5,_0x1faa76,_0x4c4971){var _0x5a48c1={'uri':_0x5409b5+_0x9184('0x3c')+_0x4c4971};io['to'](util['format'](_0x9184('0x3d'),_0x1faa76))['emit'](_0x9184('0x3e'),_0x5a48c1);}exports['cs']=function(_0x31f8d7,_0x424e3b,_0x4aa9a2,_0xfd467c,_0x293961,_0x51efa5,_0x8394c4,_0x2fbf57){var _0x5646e2={};var _0x34fb68={'Authorization':_0x9184('0x3f')+_0x51efa5['apiKey']};_0x51efa5[_0x9184('0x40')]=intUtil[_0x9184('0x41')](_0x51efa5['remoteUri']);_0x51efa5[_0x9184('0x42')]=intUtil[_0x9184('0x41')](_0x51efa5[_0x9184('0x42')]);var _0x3a4111=_0x51efa5[_0x9184('0x40')];_0x5646e2['adminEmail']=_0x51efa5['username'];_0x5646e2[_0x9184('0x27')]=_0x2fbf57[_0x9184('0x43')]()===_0x9184('0x44')?_0x424e3b['destcalleridnum']:_0x424e3b[_0x9184('0x45')];_0x5646e2[_0x9184('0x46')]=_0x2fbf57===_0x9184('0x47')||_0x2fbf57===_0x9184('0x48')?'queue':'outbound';if(_0xfd467c){_0x5646e2[_0x9184('0x18')]=_0xfd467c['email'];}var _0x35f458=util[_0x9184('0x2f')](_0x9184('0x49'),_0x51efa5[_0x9184('0x42')],_0x424e3b['uniqueid'],md5(_0x424e3b['uniqueid']));if(_0x293961&&_0x293961['monitor_format']){logger[_0x9184('0xc')](_0x9184('0x4a'),_0x9184('0x4b'));_0x424e3b['recordingURL']=_0x35f458;}else if(_0x8394c4&&_0x8394c4[_0x9184('0x4c')]&&_0x8394c4[_0x9184('0x4c')]!==_0x9184('0x4d')){logger[_0x9184('0xc')](_0x9184('0x4e'),_0x9184('0x4b'));_0x424e3b[_0x9184('0x4f')]=_0x35f458;}else{_0x424e3b[_0x9184('0x4f')]='';}return getAdminId(_0x5646e2,_0x2fbf57,_0x34fb68,_0x3a4111)[_0x9184('0x21')](getUser(_0x2fbf57,_0x34fb68,_0x3a4111))[_0x9184('0x21')](getEndUser(_0x2fbf57,_0x34fb68,_0x3a4111))['then'](getTicket(_0x2fbf57,_0x34fb68,_0x3a4111,_0x4aa9a2,_0x424e3b))[_0x9184('0x21')](function(_0x550e92){logger['info'](util['format'](_0x9184('0x50'),_0x550e92[_0x9184('0x39')]));if(_0x2fbf57!==_0x9184('0x48')){logger[_0x9184('0xc')]('['+[_0x2fbf57[_0x9184('0x15')]()]+']','Displaying\x20task\x20in\x20a\x20new\x20tab...');emit(_0x3a4111,_0xfd467c[_0x9184('0x24')],_0x550e92[_0x9184('0x2c')]);}})['catch'](function(_0xe5d9bb){logger[_0x9184('0x14')]('['+[_0x2fbf57['toUpperCase']()]+_0x9184('0x51'),util[_0x9184('0x52')](_0xe5d9bb,{'showHidden':!![],'depth':null}));});};
\ 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 dd01753..a3fca0b 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 _0xa9e0=['./vtiger','./servicenow','./dynamics365','./freshsales','salesforce','sugarcrm','freshdesk','vtiger','servicenow','exec','toLowerCase','data1','data2','find','Configurations','data3','queue','routeId','log','abandoned','zendesk','zoho','desk','freshsales','dynamics365','unknown\x20integration','../../../../config/logger','error','[EXEC]','%s\x20configuration\x20#%s\x20not\x20found','format','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk','./freshdesk','./desk'];(function(_0x2d8f9b,_0x27b824){var _0x32bf4c=function(_0x4b59a4){while(--_0x4b59a4){_0x2d8f9b['push'](_0x2d8f9b['shift']());}};_0x32bf4c(++_0x27b824);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf0bcac,_0x531755){_0xf0bcac=_0xf0bcac-0x0;var _0x4e4c65=_0xa9e0[_0xf0bcac];return _0x4e4c65;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var zendesk=require(_0x0a9e('0x2'));var salesforce=require('./salesforce');var sugarcrm=require('./sugarcrm');var freshdesk=require(_0x0a9e('0x3'));var zoho=require('./zoho');var desk=require(_0x0a9e('0x4'));var vtiger=require(_0x0a9e('0x5'));var servicenow=require(_0x0a9e('0x6'));var dynamics365=require(_0x0a9e('0x7'));var freshsales=require(_0x0a9e('0x8'));var integrations=['zendesk',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'zoho','desk',_0x0a9e('0xc'),'dynamics365','freshsales',_0x0a9e('0xd')];exports[_0x0a9e('0xe')]=function(_0x307b3e,_0x3ab53f,_0xfeb75b,_0xbd1168,_0x4a4c56,_0x50dfb2){if(_0xfeb75b){if(_['includes'](integrations,_0x307b3e['data1'][_0x0a9e('0xf')]())){try{var _0x36471c=null;var _0xd5b662='';var _0x26d672=_0xfeb75b[_0x307b3e[_0x0a9e('0x10')][_0x0a9e('0xf')]()];if(_0x26d672){var _0x5db4b0=_0x26d672[_0x307b3e[_0x0a9e('0x11')]];if(_0x5db4b0){var _0x239b12=_[_0x0a9e('0x12')](_0x5db4b0[_0x0a9e('0x13')],{'id':parseInt(_0x307b3e[_0x0a9e('0x14')],0xa)});if(_0x239b12){if(_0xbd1168){if(_0x4a4c56&&_0x3ab53f[_0x0a9e('0x15')]){_0xd5b662='queue';}else if(_0x3ab53f[_0x0a9e('0x16')]){_0xd5b662='outbound';}else{console[_0x0a9e('0x17')]('EVENT\x20UNKNOWN',_0x3ab53f);}}else{_0xd5b662=_0x0a9e('0x18');}switch(_0x307b3e[_0x0a9e('0x10')]['toLowerCase']()){case _0x0a9e('0x19'):zendesk[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case'salesforce':salesforce[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0xa'):sugarcrm[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0xb'):freshdesk[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0x1a'):zoho[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0x1b'):desk[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0xc'):vtiger[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0x1c'):freshsales['cs'](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2,_0xd5b662);case _0x0a9e('0xd'):servicenow['cs'](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2,_0xd5b662);break;case _0x0a9e('0x1d'):dynamics365['cs'](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2,_0xd5b662);break;default:console[_0x0a9e('0x17')](_0x0a9e('0x1e'));}}else{_0x36471c=require(_0x0a9e('0x1f'))(_0x307b3e[_0x0a9e('0x10')]['toLowerCase']());_0x36471c[_0x0a9e('0x20')](_0x0a9e('0x21'),util['format'](_0x0a9e('0x22'),_0x307b3e['data1']['toLowerCase'](),_0x307b3e[_0x0a9e('0x14')]));}}else{_0x36471c=require(_0x0a9e('0x1f'))(_0x307b3e[_0x0a9e('0x10')][_0x0a9e('0xf')]());_0x36471c['error'](_0x0a9e('0x21'),util[_0x0a9e('0x23')](_0x0a9e('0x24'),_0x307b3e[_0x0a9e('0x10')][_0x0a9e('0xf')](),_0x307b3e[_0x0a9e('0x11')]));}}else{}}catch(_0x16b1ca){console['error'](_0x16b1ca);}}}};
\ No newline at end of file
+var _0xa9e0=['./vtiger','./servicenow','./dynamics365','./freshsales','salesforce','sugarcrm','freshdesk','vtiger','servicenow','exec','toLowerCase','data1','data2','find','Configurations','data3','queue','routeId','log','abandoned','zendesk','zoho','desk','freshsales','dynamics365','unknown\x20integration','../../../../config/logger','error','[EXEC]','%s\x20configuration\x20#%s\x20not\x20found','format','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk','./freshdesk','./desk'];(function(_0x2353b2,_0x1d83a0){var _0x8a6718=function(_0x1502fc){while(--_0x1502fc){_0x2353b2['push'](_0x2353b2['shift']());}};_0x8a6718(++_0x1d83a0);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0xa9e0[_0x2b4411];return _0x8e41ef;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var zendesk=require(_0x0a9e('0x2'));var salesforce=require('./salesforce');var sugarcrm=require('./sugarcrm');var freshdesk=require(_0x0a9e('0x3'));var zoho=require('./zoho');var desk=require(_0x0a9e('0x4'));var vtiger=require(_0x0a9e('0x5'));var servicenow=require(_0x0a9e('0x6'));var dynamics365=require(_0x0a9e('0x7'));var freshsales=require(_0x0a9e('0x8'));var integrations=['zendesk',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'zoho','desk',_0x0a9e('0xc'),'dynamics365','freshsales',_0x0a9e('0xd')];exports[_0x0a9e('0xe')]=function(_0x307b3e,_0x3ab53f,_0xfeb75b,_0xbd1168,_0x4a4c56,_0x50dfb2){if(_0xfeb75b){if(_['includes'](integrations,_0x307b3e['data1'][_0x0a9e('0xf')]())){try{var _0x36471c=null;var _0xd5b662='';var _0x26d672=_0xfeb75b[_0x307b3e[_0x0a9e('0x10')][_0x0a9e('0xf')]()];if(_0x26d672){var _0x5db4b0=_0x26d672[_0x307b3e[_0x0a9e('0x11')]];if(_0x5db4b0){var _0x239b12=_[_0x0a9e('0x12')](_0x5db4b0[_0x0a9e('0x13')],{'id':parseInt(_0x307b3e[_0x0a9e('0x14')],0xa)});if(_0x239b12){if(_0xbd1168){if(_0x4a4c56&&_0x3ab53f[_0x0a9e('0x15')]){_0xd5b662='queue';}else if(_0x3ab53f[_0x0a9e('0x16')]){_0xd5b662='outbound';}else{console[_0x0a9e('0x17')]('EVENT\x20UNKNOWN',_0x3ab53f);}}else{_0xd5b662=_0x0a9e('0x18');}switch(_0x307b3e[_0x0a9e('0x10')]['toLowerCase']()){case _0x0a9e('0x19'):zendesk[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case'salesforce':salesforce[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0xa'):sugarcrm[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0xb'):freshdesk[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0x1a'):zoho[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0x1b'):desk[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0xc'):vtiger[_0xd5b662](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2);break;case _0x0a9e('0x1c'):freshsales['cs'](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2,_0xd5b662);case _0x0a9e('0xd'):servicenow['cs'](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2,_0xd5b662);break;case _0x0a9e('0x1d'):dynamics365['cs'](_0x307b3e,_0x3ab53f,_0x239b12,_0xbd1168,_0x4a4c56,_0x5db4b0,_0x50dfb2,_0xd5b662);break;default:console[_0x0a9e('0x17')](_0x0a9e('0x1e'));}}else{_0x36471c=require(_0x0a9e('0x1f'))(_0x307b3e[_0x0a9e('0x10')]['toLowerCase']());_0x36471c[_0x0a9e('0x20')](_0x0a9e('0x21'),util['format'](_0x0a9e('0x22'),_0x307b3e['data1']['toLowerCase'](),_0x307b3e[_0x0a9e('0x14')]));}}else{_0x36471c=require(_0x0a9e('0x1f'))(_0x307b3e[_0x0a9e('0x10')][_0x0a9e('0xf')]());_0x36471c['error'](_0x0a9e('0x21'),util[_0x0a9e('0x23')](_0x0a9e('0x24'),_0x307b3e[_0x0a9e('0x10')][_0x0a9e('0xf')](),_0x307b3e[_0x0a9e('0x11')]));}}else{}}catch(_0x16b1ca){console['error'](_0x16b1ca);}}}};
\ 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 4c20784..d321370 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 _0x5de3=['ioredis','./util','../../../../config/environment','../../../../config/logger','redis','localhost','emit','Task','assign','utc','getString','WhoId','ticketType','Subjects','ContactId','sobject','validateEmail','find','execute','then','length','Email','info','Agent\x20%s\x20found.','Name','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','resolve','user_id','display_name','moduleSearch','contact_lead','Contact','Lead','contact','lead','Case','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','Phone','Enduser\x20with\x20phone\x20%s\x20found.','Enduser\x20with\x20phone\x20%s\x20not\x20found.','','format','Caller\x20-\x20%s','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','Company','No\x20Company','upperFirst','create','forEach','type','string','idField','variable','variableName','toString','customVariable','Variable','name','toLowerCase','password','concat','securityToken','Connection','remoteUri','https://login.salesforce.com','clientId','clientSecret','login','username','Connection\x20established.','queue','serverUrl','stripTrailingSlash','Recording\x20is\x20enabled!','uniqueid','recordingURL','calleridname','calleridnum','Fields','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','user:%s','trigger:salesforce:display','newTab','trigger:browser:url','%s/%s/e','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','[QUEUE]','stringify','outbound','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','email','destcalleridnum','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','Salesforce\x20account\x20type\x20not\x20recognized','catch','abandoned','monitor_format','[ABANDONED]','isNil','[ABANDONED]\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','moment','bluebird','jsforce','util'];(function(_0x251592,_0x1e6246){var _0x3e8be9=function(_0x4f32af){while(--_0x4f32af){_0x251592['push'](_0x251592['shift']());}};_0x3e8be9(++_0x1e6246);}(_0x5de3,0xdc));var _0x35de=function(_0x3443d3,_0xf1bb82){_0x3443d3=_0x3443d3-0x0;var _0x3de675=_0x5de3[_0x3443d3];return _0x3de675;};'use strict';var _=require(_0x35de('0x0'));var rp=require(_0x35de('0x1'));var moment=require(_0x35de('0x2'));var BPromise=require(_0x35de('0x3'));var md5=require('md5');var jsforce=require(_0x35de('0x4'));var util=require(_0x35de('0x5'));var Redis=require(_0x35de('0x6'));var intUtil=require(_0x35de('0x7'));var config=require(_0x35de('0x8'));var logger=require(_0x35de('0x9'))('salesforce');config[_0x35de('0xa')]=_['defaults'](config[_0x35de('0xa')],{'host':_0x35de('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x35de('0xa')]));function emit(_0x3f5885,_0x51e1a1,_0x397f2d){io['to'](_0x3f5885)[_0x35de('0xc')](_0x51e1a1,_0x397f2d);}function getTicket(_0x19ac6a,_0x3b617d,_0xcc2d0b,_0x1d7722,_0x1742c3,_0xcce962,_0xe24664,_0x2827ca){var _0x58eb1b={};if(_0x1d7722['ticketType']===_0x35de('0xd')){_0x58eb1b=Object[_0x35de('0xe')]({},{'OwnerId':_0x3b617d['id'],'ActivityDate':moment[_0x35de('0xf')](),'IsReminderSet':![],'IsRecurrence':![],'Subject':intUtil[_0x35de('0x10')](_0x1d7722['Subjects'],_0x1742c3,'\x20'),'Description':intUtil[_0x35de('0x10')](_0x1d7722['Descriptions'],_0x1742c3,'\x0a')},getCustomFields(_0xcce962,_0x1742c3));if(_0xcc2d0b){_0x58eb1b[_0x35de('0x11')]=_0xcc2d0b['id'];}}else if(_0x1d7722[_0x35de('0x12')]==='Case'){_0x58eb1b=Object[_0x35de('0xe')]({},{'OwnerId':_0x3b617d['id'],'Subject':intUtil['getString'](_0x1d7722[_0x35de('0x13')],_0x1742c3,'\x20'),'Description':intUtil[_0x35de('0x10')](_0x1d7722['Descriptions'],_0x1742c3,'\x0a')},getCustomFields(_0xcce962,_0x1742c3));if(_0xcc2d0b){_0x58eb1b[_0x35de('0x14')]=_0xcc2d0b['id'];}}return _0xe24664[_0x35de('0x15')](_0x1d7722['ticketType'])['create'](_0x58eb1b);}function getUser(_0x37eb34,_0xb3ab5d,_0x3f041f){if(!_['isNil'](_0xb3ab5d)&&intUtil[_0x35de('0x16')](_0xb3ab5d)){var _0x20d807={'Email':_0xb3ab5d};var _0x45ef6c={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x3f041f[_0x35de('0x15')]('User')[_0x35de('0x17')](_0x20d807,_0x45ef6c)[_0x35de('0x18')]()[_0x35de('0x19')](function(_0x30390a){if(_0x30390a[_0x35de('0x1a')]){var _0x377959=_[_0x35de('0x17')](_0x30390a,function(_0x3e27fa){return _0x3e27fa[_0x35de('0x1b')]===_0xb3ab5d;});if(_0x377959){logger[_0x35de('0x1c')](_0x35de('0x1d'),_0xb3ab5d);return BPromise['resolve']({'id':_0x377959['Id'],'name':_0x377959[_0x35de('0x1e')]});}}else{logger[_0x35de('0x1c')](_0x35de('0x1f'),_0xb3ab5d);return _0x3f041f['identity']()[_0x35de('0x19')](function(_0x1e998d){return BPromise[_0x35de('0x20')]({'id':_0x1e998d[_0x35de('0x21')],'name':_0x1e998d['display_name']});});}});}else{logger[_0x35de('0x1c')](_0x35de('0x1f'),_0xb3ab5d);return _0x3f041f['identity']()['then'](function(_0x16de68){return BPromise[_0x35de('0x20')]({'id':_0x16de68[_0x35de('0x21')],'name':_0x16de68[_0x35de('0x22')]});});}}function getEndUser(_0x21af52,_0x27b66d,_0x28ba44,_0x3a07d2,_0x3ce123){var _0x2034fb={'Phone':_0x3a07d2};var _0x4e9ffe={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0x35de('0x20')]()[_0x35de('0x19')](function(){if(_0x27b66d['ticketType']===_0x35de('0xd')){logger[_0x35de('0x1c')]('Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.',_0x3a07d2,_0x27b66d[_0x35de('0x23')]);switch(_0x27b66d[_0x35de('0x23')]){case _0x35de('0x24'):return _0x3ce123[_0x35de('0x15')](_0x35de('0x25'))[_0x35de('0x17')](_0x2034fb,_0x4e9ffe)[_0x35de('0x18')]()[_0x35de('0x19')](function(_0x5b6785){if(_0x5b6785&&_0x5b6785[_0x35de('0x1a')]){return _0x5b6785;}else{return _0x3ce123[_0x35de('0x15')](_0x35de('0x26'))[_0x35de('0x17')](_0x2034fb,_0x4e9ffe);}});case _0x35de('0x27'):return _0x3ce123[_0x35de('0x15')]('Contact')[_0x35de('0x17')](_0x2034fb,_0x4e9ffe)['execute']();case _0x35de('0x28'):return _0x3ce123[_0x35de('0x15')]('Lead')[_0x35de('0x17')](_0x2034fb,_0x4e9ffe);default:return null;}}else if(_0x27b66d['ticketType']===_0x35de('0x29')){logger[_0x35de('0x1c')](_0x35de('0x2a'),_0x3a07d2,_0x35de('0x27'));return _0x3ce123[_0x35de('0x15')](_0x35de('0x25'))[_0x35de('0x17')](_0x2034fb,_0x4e9ffe)[_0x35de('0x18')]();}})[_0x35de('0x19')](function(_0x213932){if(_0x213932&&_0x213932[_0x35de('0x1a')]){var _0x4c428a=_[_0x35de('0x17')](_0x213932,function(_0x3a51f4){return _0x3a51f4[_0x35de('0x2b')]===_0x3a07d2;});if(_0x4c428a){return BPromise[_0x35de('0x20')]({'id':_0x4c428a['Id'],'name':_0x4c428a[_0x35de('0x1e')],'phone':_0x4c428a[_0x35de('0x2b')]});}}})['then'](function(_0x723651){if(_0x723651){logger['info'](_0x35de('0x2c'),_0x3a07d2);return BPromise[_0x35de('0x20')](_0x723651);}else{logger[_0x35de('0x1c')](_0x35de('0x2d'),_0x3a07d2);var _0x5c2f5d={'LastName':_0x28ba44!==_0x35de('0x2e')?_0x28ba44:util[_0x35de('0x2f')](_0x35de('0x30'),_0x3a07d2),'Phone':_0x3a07d2};if(_0x27b66d[_0x35de('0x31')]){if(_0x27b66d[_0x35de('0x31')]===_0x35de('0x27')){logger['info'](_0x35de('0x32'),_0x3a07d2,_0x27b66d[_0x35de('0x31')]);}else if(_0x27b66d[_0x35de('0x31')]===_0x35de('0x28')&&_0x27b66d[_0x35de('0x12')]==='Task'){logger['info'](_0x35de('0x32'),_0x3a07d2,_0x27b66d[_0x35de('0x31')]);_0x5c2f5d[_0x35de('0x33')]=_0x35de('0x34');}else{return null;}}return _0x3ce123[_0x35de('0x15')](_[_0x35de('0x35')](_0x27b66d['moduleCreate']))[_0x35de('0x36')](_0x5c2f5d);}});}function getCustomFields(_0x16ce96,_0x27e483){var _0x3c8341={};if(_0x16ce96[_0x35de('0x1a')]>0x0){_[_0x35de('0x37')](_0x16ce96,function(_0x115cfa){if(_0x115cfa[_0x35de('0x38')]===_0x35de('0x39')&&_0x115cfa['idField']){_0x3c8341[_0x115cfa[_0x35de('0x3a')]]=_0x115cfa['content']['toString']();}else if(_0x115cfa['type']===_0x35de('0x3b')&&_0x115cfa['variableName']&&_0x115cfa[_0x35de('0x3a')]){_0x27e483[_0x115cfa[_0x35de('0x3c')]]&&(_0x3c8341[_0x115cfa['idField']]=_0x27e483[_0x115cfa['variableName']][_0x35de('0x3d')]());}else if(_0x115cfa['type']===_0x35de('0x3e')&&_0x115cfa['Variable']&&_0x115cfa[_0x35de('0x3f')][_0x35de('0x40')]&&_0x115cfa[_0x35de('0x3a')]){_0x27e483[_0x115cfa['Variable'][_0x35de('0x40')][_0x35de('0x41')]()]&&(_0x3c8341[_0x115cfa['idField']]=_0x27e483[_0x115cfa['Variable']['name'][_0x35de('0x41')]()][_0x35de('0x3d')]());}});}return _0x3c8341;}function getConnection(_0x2e672a){var _0x1dea27=_0x2e672a[_0x35de('0x42')][_0x35de('0x43')](_0x2e672a[_0x35de('0x44')]);var _0x5e5dc6=new jsforce[(_0x35de('0x45'))]({'oauth2':{'loginUrl':_0x2e672a[_0x35de('0x46')]||_0x35de('0x47'),'clientId':_0x2e672a[_0x35de('0x48')],'clientSecret':_0x2e672a[_0x35de('0x49')]}});return _0x5e5dc6[_0x35de('0x4a')](_0x2e672a[_0x35de('0x4b')],_0x1dea27)[_0x35de('0x19')](function(){logger[_0x35de('0x1c')](_0x35de('0x4c'));return _0x5e5dc6;});}exports[_0x35de('0x4d')]=function(_0x7ad348,_0x522a17,_0x9c01ec,_0x1ba56d,_0x1c61eb,_0x5025c8){var _0x56a3af,_0x20b77e,_0x5e0d25,_0x156332;_0x5025c8[_0x35de('0x4e')]=intUtil[_0x35de('0x4f')](_0x5025c8['serverUrl']);_0x5025c8[_0x35de('0x46')]=intUtil[_0x35de('0x4f')](_0x5025c8['remoteUri']);if(_0x1c61eb&&_0x1c61eb['monitor_format']){logger[_0x35de('0x1c')]('[QUEUE]',_0x35de('0x50'));_0x522a17['recordingURL']=util[_0x35de('0x2f')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x5025c8[_0x35de('0x4e')],_0x522a17[_0x35de('0x51')],md5(_0x522a17[_0x35de('0x51')]));}else{_0x522a17[_0x35de('0x52')]='';}return getConnection(_0x5025c8)[_0x35de('0x19')](function(_0x1f9f54){_0x156332=_0x1f9f54;return getUser(_0x5025c8,_0x1ba56d['email'],_0x156332);})['then'](function(_0x4ccfd7){_0x56a3af=_0x4ccfd7;return getEndUser(_0x5025c8,_0x9c01ec,_0x522a17[_0x35de('0x53')],_0x522a17[_0x35de('0x54')],_0x156332);})[_0x35de('0x19')](function(_0x202101){_0x20b77e=_0x202101;return getTicket(_0x5025c8,_0x56a3af,_0x20b77e,_0x9c01ec,_0x522a17,_0x9c01ec[_0x35de('0x55')],_0x156332,_0x35de('0x4d'));})[_0x35de('0x19')](function(_0x2e14a4){_0x5e0d25=_0x2e14a4;logger[_0x35de('0x1c')](_0x35de('0x56'),_0x5e0d25['id']);logger[_0x35de('0x1c')](_0x35de('0x57'),_0x5e0d25['id'],_0x1ba56d['name'],_0x5025c8['type']);switch(_0x5025c8[_0x35de('0x38')]){case _0x35de('0x58'):emit(util[_0x35de('0x2f')](_0x35de('0x59'),_0x1ba56d[_0x35de('0x40')]),_0x35de('0x5a'),{'recordId':_0x5e0d25['id']});break;case _0x35de('0x5b'):emit(util[_0x35de('0x2f')]('user:%s',_0x1ba56d[_0x35de('0x40')]),_0x35de('0x5c'),{'uri':util['format'](_0x35de('0x5d'),_0x156332['instanceUrl'],_0x5e0d25['id'])});break;default:logger[_0x35de('0x5e')](_0x35de('0x5f'));}})['catch'](function(_0x56ec66){logger[_0x35de('0x5e')](_0x35de('0x60'),JSON[_0x35de('0x61')](_0x56ec66));});};exports[_0x35de('0x62')]=function(_0x3568a5,_0x5de69c,_0x1d48e2,_0x438f00,_0x4f0e24,_0x2fd299,_0x4682a6){var _0x489b3c,_0x27fefb,_0x11370a,_0x412223;_0x2fd299[_0x35de('0x4e')]=intUtil[_0x35de('0x4f')](_0x2fd299[_0x35de('0x4e')]);_0x2fd299['remoteUri']=intUtil[_0x35de('0x4f')](_0x2fd299[_0x35de('0x46')]);if(_0x4682a6&&_0x4682a6[_0x35de('0x63')]&&_0x4682a6[_0x35de('0x63')]!==_0x35de('0x64')){logger['info'](_0x35de('0x65'),_0x35de('0x50'));_0x5de69c[_0x35de('0x52')]=util[_0x35de('0x2f')](_0x35de('0x66'),_0x2fd299[_0x35de('0x4e')],_0x5de69c['uniqueid'],md5(_0x5de69c[_0x35de('0x51')]));}return getConnection(_0x2fd299)[_0x35de('0x19')](function(_0x1aa726){_0x412223=_0x1aa726;return getUser(_0x2fd299,_0x438f00[_0x35de('0x67')],_0x412223);})[_0x35de('0x19')](function(_0x3aad7f){_0x489b3c=_0x3aad7f;return getEndUser(_0x2fd299,_0x1d48e2,_0x5de69c['destcalleridname'],_0x5de69c[_0x35de('0x68')],_0x412223);})['then'](function(_0x3f11e8){_0x27fefb=_0x3f11e8;return getTicket(_0x2fd299,_0x489b3c,_0x27fefb,_0x1d48e2,_0x5de69c,_0x1d48e2[_0x35de('0x55')],_0x412223,_0x35de('0x62'));})[_0x35de('0x19')](function(_0xeac7c2){_0x11370a=_0xeac7c2;logger[_0x35de('0x1c')]('[OUTBOUND]\x20Ticket\x20%s\x20created.',_0x11370a['id']);logger['info'](_0x35de('0x69'),_0x11370a['id'],_0x438f00[_0x35de('0x40')],_0x2fd299[_0x35de('0x38')]);switch(_0x2fd299[_0x35de('0x38')]){case'integrationTab':emit(util[_0x35de('0x2f')]('user:%s',_0x438f00['name']),_0x35de('0x5a'),{'recordId':_0x11370a['id']});break;case'newTab':emit(util['format']('user:%s',_0x438f00[_0x35de('0x40')]),_0x35de('0x5c'),{'uri':util[_0x35de('0x2f')]('%s/%s/e',_0x412223['instanceUrl'],_0x11370a['id'])});break;default:logger[_0x35de('0x5e')](_0x35de('0x65'),_0x35de('0x6a'));}})[_0x35de('0x6b')](function(_0x558f4a){logger[_0x35de('0x5e')](_0x35de('0x65'),JSON[_0x35de('0x61')](_0x558f4a));});};exports[_0x35de('0x6c')]=function(_0x24d1ca,_0x1b8a37,_0x530886,_0x201efd,_0x39e698,_0x325654){var _0x55be84,_0x18a732,_0x4094a7,_0x2b9601;_0x325654[_0x35de('0x4e')]=intUtil['stripTrailingSlash'](_0x325654[_0x35de('0x4e')]);_0x325654['remoteUri']=intUtil[_0x35de('0x4f')](_0x325654['remoteUri']);if(_0x39e698&&_0x39e698[_0x35de('0x6d')]){logger[_0x35de('0x1c')](_0x35de('0x6e'),'Recording\x20is\x20enabled!');_0x1b8a37['recordingURL']=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x325654[_0x35de('0x4e')],_0x1b8a37[_0x35de('0x51')],md5(_0x1b8a37['uniqueid']));}else{_0x1b8a37['recordingURL']='';}return getConnection(_0x325654)[_0x35de('0x19')](function(_0x54af41){_0x2b9601=_0x54af41;if(!_[_0x35de('0x6f')](_0x201efd)){return getUser(_0x325654,_0x201efd[_0x35de('0x40')],_0x2b9601);}else{return getUser(_0x325654,null,_0x2b9601);}})[_0x35de('0x19')](function(_0x4e34d2){_0x55be84=_0x4e34d2;return getEndUser(_0x325654,_0x530886,_0x1b8a37[_0x35de('0x53')],_0x1b8a37[_0x35de('0x54')],_0x2b9601);})['then'](function(_0x3d7dec){_0x18a732=_0x3d7dec;return getTicket(_0x325654,_0x55be84,_0x18a732,_0x530886,_0x1b8a37,_0x530886['Fields'],_0x2b9601);})['then'](function(_0x22f589){_0x4094a7=_0x22f589;logger[_0x35de('0x1c')]('[ABANDONED]\x20Ticket\x20%s\x20created.',_0x4094a7['id']);logger[_0x35de('0x1c')](_0x35de('0x70'),_0x325654[_0x35de('0x38')]);})[_0x35de('0x6b')](function(_0x384a8a){logger[_0x35de('0x5e')](_0x35de('0x6e'),JSON['stringify'](_0x384a8a));});};
\ No newline at end of file
+var _0xc93e=['Connection\x20established.','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','recordingURL','uniqueid','email','calleridnum','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','user:%s','trigger:salesforce:display','newTab','trigger:browser:url','instanceUrl','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','outbound','recordingFormat','none','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','%s/%s/e','[OUTBOUND]','Salesforce\x20account\x20type\x20not\x20recognized','catch','stringify','[ABANDONED]','calleridname','Fields','[ABANDONED]\x20Ticket\x20%s\x20created.','lodash','md5','jsforce','util','ioredis','./util','salesforce','redis','defaults','socket.io-emitter','emit','ticketType','Task','assign','utc','getString','Descriptions','WhoId','Case','Subjects','ContactId','sobject','create','isNil','validateEmail','find','then','Email','info','Agent\x20%s\x20found.','resolve','Name','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','identity','user_id','display_name','moduleSearch','contact_lead','Contact','execute','length','contact','lead','Lead','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','Phone','Enduser\x20with\x20phone\x20%s\x20found.','Enduser\x20with\x20phone\x20%s\x20not\x20found.','','format','Caller\x20-\x20%s','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','Company','No\x20Company','upperFirst','forEach','type','string','idField','content','variable','variableName','toString','customVariable','Variable','name','toLowerCase','password','concat','Connection','remoteUri','clientId','clientSecret','login','username'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xc93e,0x96));var _0xec93=function(_0x28c939,_0x110e29){_0x28c939=_0x28c939-0x0;var _0x527fe9=_0xc93e[_0x28c939];return _0x527fe9;};'use strict';var _=require(_0xec93('0x0'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var md5=require(_0xec93('0x1'));var jsforce=require(_0xec93('0x2'));var util=require(_0xec93('0x3'));var Redis=require(_0xec93('0x4'));var intUtil=require(_0xec93('0x5'));var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0xec93('0x6'));config[_0xec93('0x7')]=_[_0xec93('0x8')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0xec93('0x9'))(new Redis(config['redis']));function emit(_0x13d9f2,_0x1ceb1b,_0x4010c1){io['to'](_0x13d9f2)[_0xec93('0xa')](_0x1ceb1b,_0x4010c1);}function getTicket(_0x4ca703,_0x459e09,_0x1437b9,_0x1c9eea,_0x3db296,_0x588f47,_0x46125e,_0x119232){var _0x2d8bc1={};if(_0x1c9eea[_0xec93('0xb')]===_0xec93('0xc')){_0x2d8bc1=Object[_0xec93('0xd')]({},{'OwnerId':_0x459e09['id'],'ActivityDate':moment[_0xec93('0xe')](),'IsReminderSet':![],'IsRecurrence':![],'Subject':intUtil[_0xec93('0xf')](_0x1c9eea['Subjects'],_0x3db296,'\x20'),'Description':intUtil['getString'](_0x1c9eea[_0xec93('0x10')],_0x3db296,'\x0a')},getCustomFields(_0x588f47,_0x3db296));if(_0x1437b9){_0x2d8bc1[_0xec93('0x11')]=_0x1437b9['id'];}}else if(_0x1c9eea[_0xec93('0xb')]===_0xec93('0x12')){_0x2d8bc1=Object[_0xec93('0xd')]({},{'OwnerId':_0x459e09['id'],'Subject':intUtil[_0xec93('0xf')](_0x1c9eea[_0xec93('0x13')],_0x3db296,'\x20'),'Description':intUtil[_0xec93('0xf')](_0x1c9eea['Descriptions'],_0x3db296,'\x0a')},getCustomFields(_0x588f47,_0x3db296));if(_0x1437b9){_0x2d8bc1[_0xec93('0x14')]=_0x1437b9['id'];}}return _0x46125e[_0xec93('0x15')](_0x1c9eea[_0xec93('0xb')])[_0xec93('0x16')](_0x2d8bc1);}function getUser(_0x8d6e6f,_0x2fcd26,_0x22798f){if(!_[_0xec93('0x17')](_0x2fcd26)&&intUtil[_0xec93('0x18')](_0x2fcd26)){var _0x4797e7={'Email':_0x2fcd26};var _0x5cb86a={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x22798f[_0xec93('0x15')]('User')[_0xec93('0x19')](_0x4797e7,_0x5cb86a)['execute']()[_0xec93('0x1a')](function(_0x4e761f){if(_0x4e761f['length']){var _0x1f6912=_[_0xec93('0x19')](_0x4e761f,function(_0x5dca7b){return _0x5dca7b[_0xec93('0x1b')]===_0x2fcd26;});if(_0x1f6912){logger[_0xec93('0x1c')](_0xec93('0x1d'),_0x2fcd26);return BPromise[_0xec93('0x1e')]({'id':_0x1f6912['Id'],'name':_0x1f6912[_0xec93('0x1f')]});}}else{logger[_0xec93('0x1c')](_0xec93('0x20'),_0x2fcd26);return _0x22798f[_0xec93('0x21')]()['then'](function(_0x2f8c91){return BPromise[_0xec93('0x1e')]({'id':_0x2f8c91[_0xec93('0x22')],'name':_0x2f8c91[_0xec93('0x23')]});});}});}else{logger[_0xec93('0x1c')](_0xec93('0x20'),_0x2fcd26);return _0x22798f[_0xec93('0x21')]()['then'](function(_0x3af788){return BPromise[_0xec93('0x1e')]({'id':_0x3af788['user_id'],'name':_0x3af788['display_name']});});}}function getEndUser(_0x50d361,_0x60a0f8,_0x1840c6,_0x5a3682,_0x5a19df){var _0x5cdf53={'Phone':_0x5a3682};var _0x171827={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0xec93('0x1e')]()[_0xec93('0x1a')](function(){if(_0x60a0f8['ticketType']===_0xec93('0xc')){logger['info']('Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.',_0x5a3682,_0x60a0f8[_0xec93('0x24')]);switch(_0x60a0f8[_0xec93('0x24')]){case _0xec93('0x25'):return _0x5a19df[_0xec93('0x15')](_0xec93('0x26'))[_0xec93('0x19')](_0x5cdf53,_0x171827)[_0xec93('0x27')]()['then'](function(_0x1a3daf){if(_0x1a3daf&&_0x1a3daf[_0xec93('0x28')]){return _0x1a3daf;}else{return _0x5a19df[_0xec93('0x15')]('Lead')['find'](_0x5cdf53,_0x171827);}});case _0xec93('0x29'):return _0x5a19df[_0xec93('0x15')](_0xec93('0x26'))['find'](_0x5cdf53,_0x171827)[_0xec93('0x27')]();case _0xec93('0x2a'):return _0x5a19df[_0xec93('0x15')](_0xec93('0x2b'))['find'](_0x5cdf53,_0x171827);default:return null;}}else if(_0x60a0f8['ticketType']===_0xec93('0x12')){logger[_0xec93('0x1c')](_0xec93('0x2c'),_0x5a3682,'contact');return _0x5a19df['sobject']('Contact')[_0xec93('0x19')](_0x5cdf53,_0x171827)[_0xec93('0x27')]();}})[_0xec93('0x1a')](function(_0x3a7a7a){if(_0x3a7a7a&&_0x3a7a7a['length']){var _0xc72016=_[_0xec93('0x19')](_0x3a7a7a,function(_0x16115a){return _0x16115a[_0xec93('0x2d')]===_0x5a3682;});if(_0xc72016){return BPromise['resolve']({'id':_0xc72016['Id'],'name':_0xc72016['Name'],'phone':_0xc72016['Phone']});}}})[_0xec93('0x1a')](function(_0x78688c){if(_0x78688c){logger[_0xec93('0x1c')](_0xec93('0x2e'),_0x5a3682);return BPromise[_0xec93('0x1e')](_0x78688c);}else{logger['info'](_0xec93('0x2f'),_0x5a3682);var _0x5335b2={'LastName':_0x1840c6!==_0xec93('0x30')?_0x1840c6:util[_0xec93('0x31')](_0xec93('0x32'),_0x5a3682),'Phone':_0x5a3682};if(_0x60a0f8[_0xec93('0x33')]){if(_0x60a0f8['moduleCreate']===_0xec93('0x29')){logger[_0xec93('0x1c')](_0xec93('0x34'),_0x5a3682,_0x60a0f8[_0xec93('0x33')]);}else if(_0x60a0f8[_0xec93('0x33')]===_0xec93('0x2a')&&_0x60a0f8[_0xec93('0xb')]===_0xec93('0xc')){logger[_0xec93('0x1c')](_0xec93('0x34'),_0x5a3682,_0x60a0f8[_0xec93('0x33')]);_0x5335b2[_0xec93('0x35')]=_0xec93('0x36');}else{return null;}}return _0x5a19df[_0xec93('0x15')](_[_0xec93('0x37')](_0x60a0f8[_0xec93('0x33')]))['create'](_0x5335b2);}});}function getCustomFields(_0x3d6b13,_0xaceebd){var _0x55c4ec={};if(_0x3d6b13[_0xec93('0x28')]>0x0){_[_0xec93('0x38')](_0x3d6b13,function(_0x58dac7){if(_0x58dac7[_0xec93('0x39')]===_0xec93('0x3a')&&_0x58dac7[_0xec93('0x3b')]){_0x55c4ec[_0x58dac7[_0xec93('0x3b')]]=_0x58dac7[_0xec93('0x3c')]['toString']();}else if(_0x58dac7[_0xec93('0x39')]===_0xec93('0x3d')&&_0x58dac7[_0xec93('0x3e')]&&_0x58dac7[_0xec93('0x3b')]){_0xaceebd[_0x58dac7[_0xec93('0x3e')]]&&(_0x55c4ec[_0x58dac7['idField']]=_0xaceebd[_0x58dac7[_0xec93('0x3e')]][_0xec93('0x3f')]());}else if(_0x58dac7[_0xec93('0x39')]===_0xec93('0x40')&&_0x58dac7[_0xec93('0x41')]&&_0x58dac7['Variable'][_0xec93('0x42')]&&_0x58dac7[_0xec93('0x3b')]){_0xaceebd[_0x58dac7['Variable']['name']['toLowerCase']()]&&(_0x55c4ec[_0x58dac7[_0xec93('0x3b')]]=_0xaceebd[_0x58dac7['Variable'][_0xec93('0x42')][_0xec93('0x43')]()][_0xec93('0x3f')]());}});}return _0x55c4ec;}function getConnection(_0x10e506){var _0x59dca1=_0x10e506[_0xec93('0x44')][_0xec93('0x45')](_0x10e506['securityToken']);var _0x5028d4=new jsforce[(_0xec93('0x46'))]({'oauth2':{'loginUrl':_0x10e506[_0xec93('0x47')]||'https://login.salesforce.com','clientId':_0x10e506[_0xec93('0x48')],'clientSecret':_0x10e506[_0xec93('0x49')]}});return _0x5028d4[_0xec93('0x4a')](_0x10e506[_0xec93('0x4b')],_0x59dca1)[_0xec93('0x1a')](function(){logger[_0xec93('0x1c')](_0xec93('0x4c'));return _0x5028d4;});}exports['queue']=function(_0x22a398,_0x5dc5ca,_0x256801,_0x3f0974,_0x4fe59a,_0x24406d){var _0x4b9618,_0x1d928a,_0xe82a95,_0x1f1ef5;_0x24406d[_0xec93('0x4d')]=intUtil[_0xec93('0x4e')](_0x24406d[_0xec93('0x4d')]);_0x24406d[_0xec93('0x47')]=intUtil[_0xec93('0x4e')](_0x24406d[_0xec93('0x47')]);if(_0x4fe59a&&_0x4fe59a[_0xec93('0x4f')]){logger['info'](_0xec93('0x50'),'Recording\x20is\x20enabled!');_0x5dc5ca[_0xec93('0x51')]=util[_0xec93('0x31')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x24406d[_0xec93('0x4d')],_0x5dc5ca[_0xec93('0x52')],md5(_0x5dc5ca[_0xec93('0x52')]));}else{_0x5dc5ca[_0xec93('0x51')]='';}return getConnection(_0x24406d)[_0xec93('0x1a')](function(_0x365add){_0x1f1ef5=_0x365add;return getUser(_0x24406d,_0x3f0974[_0xec93('0x53')],_0x1f1ef5);})[_0xec93('0x1a')](function(_0x58ccde){_0x4b9618=_0x58ccde;return getEndUser(_0x24406d,_0x256801,_0x5dc5ca['calleridname'],_0x5dc5ca[_0xec93('0x54')],_0x1f1ef5);})[_0xec93('0x1a')](function(_0x4b798a){_0x1d928a=_0x4b798a;return getTicket(_0x24406d,_0x4b9618,_0x1d928a,_0x256801,_0x5dc5ca,_0x256801['Fields'],_0x1f1ef5,'queue');})[_0xec93('0x1a')](function(_0x4e4721){_0xe82a95=_0x4e4721;logger[_0xec93('0x1c')](_0xec93('0x55'),_0xe82a95['id']);logger['info'](_0xec93('0x56'),_0xe82a95['id'],_0x3f0974[_0xec93('0x42')],_0x24406d['type']);switch(_0x24406d[_0xec93('0x39')]){case _0xec93('0x57'):emit(util['format'](_0xec93('0x58'),_0x3f0974['name']),_0xec93('0x59'),{'recordId':_0xe82a95['id']});break;case _0xec93('0x5a'):emit(util['format']('user:%s',_0x3f0974[_0xec93('0x42')]),_0xec93('0x5b'),{'uri':util[_0xec93('0x31')]('%s/%s/e',_0x1f1ef5[_0xec93('0x5c')],_0xe82a95['id'])});break;default:logger[_0xec93('0x5d')](_0xec93('0x5e'));}})['catch'](function(_0x4cd1c5){logger['error'](_0xec93('0x50'),JSON['stringify'](_0x4cd1c5));});};exports[_0xec93('0x5f')]=function(_0x2864f2,_0x14afd3,_0x40d991,_0x536c50,_0x4121a9,_0x3aedc2,_0x574f59){var _0x250471,_0x536860,_0x5166f7,_0x4c88b9;_0x3aedc2[_0xec93('0x4d')]=intUtil[_0xec93('0x4e')](_0x3aedc2['serverUrl']);_0x3aedc2[_0xec93('0x47')]=intUtil[_0xec93('0x4e')](_0x3aedc2[_0xec93('0x47')]);if(_0x574f59&&_0x574f59[_0xec93('0x60')]&&_0x574f59[_0xec93('0x60')]!==_0xec93('0x61')){logger[_0xec93('0x1c')]('[OUTBOUND]',_0xec93('0x62'));_0x14afd3[_0xec93('0x51')]=util[_0xec93('0x31')](_0xec93('0x63'),_0x3aedc2['serverUrl'],_0x14afd3['uniqueid'],md5(_0x14afd3['uniqueid']));}return getConnection(_0x3aedc2)[_0xec93('0x1a')](function(_0x508a46){_0x4c88b9=_0x508a46;return getUser(_0x3aedc2,_0x536c50[_0xec93('0x53')],_0x4c88b9);})[_0xec93('0x1a')](function(_0xf3659c){_0x250471=_0xf3659c;return getEndUser(_0x3aedc2,_0x40d991,_0x14afd3[_0xec93('0x64')],_0x14afd3[_0xec93('0x65')],_0x4c88b9);})[_0xec93('0x1a')](function(_0x12b50f){_0x536860=_0x12b50f;return getTicket(_0x3aedc2,_0x250471,_0x536860,_0x40d991,_0x14afd3,_0x40d991['Fields'],_0x4c88b9,_0xec93('0x5f'));})['then'](function(_0x12e2a7){_0x5166f7=_0x12e2a7;logger[_0xec93('0x1c')](_0xec93('0x66'),_0x5166f7['id']);logger['info'](_0xec93('0x67'),_0x5166f7['id'],_0x536c50[_0xec93('0x42')],_0x3aedc2['type']);switch(_0x3aedc2[_0xec93('0x39')]){case _0xec93('0x57'):emit(util[_0xec93('0x31')](_0xec93('0x58'),_0x536c50[_0xec93('0x42')]),'trigger:salesforce:display',{'recordId':_0x5166f7['id']});break;case _0xec93('0x5a'):emit(util[_0xec93('0x31')](_0xec93('0x58'),_0x536c50['name']),'trigger:browser:url',{'uri':util[_0xec93('0x31')](_0xec93('0x68'),_0x4c88b9[_0xec93('0x5c')],_0x5166f7['id'])});break;default:logger[_0xec93('0x5d')](_0xec93('0x69'),_0xec93('0x6a'));}})[_0xec93('0x6b')](function(_0x979d90){logger[_0xec93('0x5d')]('[OUTBOUND]',JSON[_0xec93('0x6c')](_0x979d90));});};exports['abandoned']=function(_0x3cd821,_0x515325,_0x2ec5f6,_0x587ecb,_0x44839e,_0xd3d7b4){var _0x16cc5b,_0x4f0d79,_0x2b96a2,_0xa4b6dc;_0xd3d7b4[_0xec93('0x4d')]=intUtil['stripTrailingSlash'](_0xd3d7b4[_0xec93('0x4d')]);_0xd3d7b4[_0xec93('0x47')]=intUtil[_0xec93('0x4e')](_0xd3d7b4[_0xec93('0x47')]);if(_0x44839e&&_0x44839e[_0xec93('0x4f')]){logger[_0xec93('0x1c')](_0xec93('0x6d'),_0xec93('0x62'));_0x515325[_0xec93('0x51')]=util[_0xec93('0x31')](_0xec93('0x63'),_0xd3d7b4['serverUrl'],_0x515325[_0xec93('0x52')],md5(_0x515325[_0xec93('0x52')]));}else{_0x515325[_0xec93('0x51')]='';}return getConnection(_0xd3d7b4)[_0xec93('0x1a')](function(_0x4b639c){_0xa4b6dc=_0x4b639c;if(!_['isNil'](_0x587ecb)){return getUser(_0xd3d7b4,_0x587ecb['name'],_0xa4b6dc);}else{return getUser(_0xd3d7b4,null,_0xa4b6dc);}})[_0xec93('0x1a')](function(_0x5ea575){_0x16cc5b=_0x5ea575;return getEndUser(_0xd3d7b4,_0x2ec5f6,_0x515325[_0xec93('0x6e')],_0x515325['calleridnum'],_0xa4b6dc);})[_0xec93('0x1a')](function(_0x270712){_0x4f0d79=_0x270712;return getTicket(_0xd3d7b4,_0x16cc5b,_0x4f0d79,_0x2ec5f6,_0x515325,_0x2ec5f6[_0xec93('0x6f')],_0xa4b6dc);})[_0xec93('0x1a')](function(_0x591ac6){_0x2b96a2=_0x591ac6;logger[_0xec93('0x1c')](_0xec93('0x70'),_0x2b96a2['id']);logger[_0xec93('0x1c')]('[ABANDONED]\x20Integration\x20account\x20type\x20%s.',_0xd3d7b4[_0xec93('0x39')]);})[_0xec93('0x6b')](function(_0x4278e0){logger[_0xec93('0x5d')](_0xec93('0x6d'),JSON[_0xec93('0x6c')](_0x4278e0));});};
\ 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 2f3f436..63c3b0b 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 _0xa9e0=['validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','then','],\x20getUser\x20entity','userId','adminEmail','],\x20getUser\x20crm','catch','],\x20createEndUser\x20input\x20crm','POST','sys_user?','user','endUserNumber','true','System','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','length','forEach','type','customField','idField','content','toString','toLowerCase','variable','variableName','Variable','name',']\x20getTicket\x20input\x20crm','outbound','incident','assign','getString','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema',']\x20getTicket\x20crm','label','Incident','ticketId','Incident\x20-\x20','ticketNumber','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','map','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','emit','trigger:browser:url','password','sysparm_limit=1','sysparm_display_value=true','serverUrl','stripTrailingSlash','%s/api/now/table/','remoteUri','email','destcalleridnum','calleridnum','queue','abandoned','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingFormat','none','[OUTBOUND]','recordingURL','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s',']\x20Error\x20running\x20ServiceNow\x20integration','lodash','bluebird','request-promise','ioredis','../../../../config/environment','../../../../config/logger','servicenow','redis','defaults','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','adminId','result','sys_id','info','toUpperCase','],\x20getAdminUser\x20crm','error','message'];(function(_0xae7c2f,_0xf31e04){var _0x5d7001=function(_0x4eeadb){while(--_0x4eeadb){_0xae7c2f['push'](_0xae7c2f['shift']());}};_0x5d7001(++_0xf31e04);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xa9e0[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x0a9e('0x0'));var Promise=require(_0x0a9e('0x1'));var rp=require(_0x0a9e('0x2'));var util=require('util');var md5=require('md5');var Redis=require(_0x0a9e('0x3'));var intUtil=require('./util');var config=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));config[_0x0a9e('0x7')]=_[_0x0a9e('0x8')](config['redis'],{'host':_0x0a9e('0x9'),'port':0x18eb});var io=require(_0x0a9e('0xa'))(new Redis(config[_0x0a9e('0x7')]));function getAdminUser(_0x5f41ea,_0x503809,_0xe42b77,_0x56465b,_0x52cace,_0x39753a){return new Promise(function(_0xf81284,_0x307b3e){var _0x3ab53f={'method':_0x0a9e('0xb'),'uri':_0x56465b+_0x0a9e('0xc')+'&'+_0x52cace+'&'+_0x39753a,'auth':_0x503809,'json':!![]};return rp(_0x3ab53f)['then'](function(_0x50dfb2){if(_0x50dfb2['result']['length']>0x0){_0xe42b77[_0x0a9e('0xd')]=_0x50dfb2[_0x0a9e('0xe')][0x0][_0x0a9e('0xf')];}logger[_0x0a9e('0x10')]('['+[_0x5f41ea[_0x0a9e('0x11')]()]+_0x0a9e('0x12'),_0xe42b77);_0xf81284(_0xe42b77);})['catch'](function(_0x4283ce){logger[_0x0a9e('0x13')]('['+[_0x5f41ea[_0x0a9e('0x11')]()]+']',_0x4283ce[_0x0a9e('0x14')]);_0x307b3e(_0x4283ce[_0x0a9e('0x14')]);});});}function getUser(_0x4d5611,_0x52a03d,_0x22dccb,_0x5d0880,_0x1985b6){return function(_0x519dfd){logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+'],\x20getUser\x20input\x20crm',_0x519dfd);return new Promise(function(_0x225616,_0x5a0a06){if(intUtil[_0x0a9e('0x15')](_0x519dfd[_0x0a9e('0x16')])){var _0x106033={'method':_0x0a9e('0xb'),'uri':_0x22dccb+_0x0a9e('0x17')+_0x519dfd[_0x0a9e('0x16')]+'&'+_0x5d0880+'&'+_0x1985b6,'auth':_0x52a03d,'json':!![]};logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+_0x0a9e('0x18'),_0x106033);return rp(_0x106033)[_0x0a9e('0x19')](function(_0x1c696a){logger[_0x0a9e('0x10')]('['+[_0x4d5611['toUpperCase']()]+_0x0a9e('0x1a'),_0x1c696a);if(_0x1c696a[_0x0a9e('0xe')]['length']>0x0&&String(_0x1c696a[_0x0a9e('0xe')][0x0]['active'])==='true'){_0x519dfd[_0x0a9e('0x1b')]=_0x1c696a[_0x0a9e('0xe')][0x0][_0x0a9e('0xf')];}else{_0x519dfd[_0x0a9e('0x1b')]=_0x519dfd['adminId'];_0x519dfd[_0x0a9e('0x16')]=_0x519dfd[_0x0a9e('0x1c')];}logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+_0x0a9e('0x1d'),_0x519dfd);_0x225616(_0x519dfd);})[_0x0a9e('0x1e')](function(_0x16b1ca){logger['error']('['+[_0x4d5611['toUpperCase']()]+']',_0x16b1ca[_0x0a9e('0x14')]);_0x5a0a06(_0x16b1ca[_0x0a9e('0x14')]);});}else{logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+']\x20using\x20admin\x20profile');_0x519dfd[_0x0a9e('0x1b')]=_0x519dfd['adminId'];_0x519dfd[_0x0a9e('0x16')]=_0x519dfd['adminEmail'];_0x225616(_0x519dfd);}});};}function createEndUser(_0x1dc186,_0x34dc65,_0x25fba9,_0x14433c,_0x140511){logger[_0x0a9e('0x10')]('['+[_0x1dc186[_0x0a9e('0x11')]()]+_0x0a9e('0x1f'),_0x25fba9);return new Promise(function(_0x5a101a,_0x3652a7){var _0x468813={'method':_0x0a9e('0x20'),'uri':_0x14433c+_0x0a9e('0x21')+_0x140511,'body':{'user_name':_0x25fba9['endUserNumber'],'roles':_0x0a9e('0x22'),'first_name':_0x25fba9[_0x0a9e('0x23')],'active':_0x0a9e('0x24'),'date_format':_0x0a9e('0x25'),'phone':_0x25fba9[_0x0a9e('0x23')]},'auth':_0x34dc65,'json':!![]};return rp(_0x468813)[_0x0a9e('0x19')](function(_0x296f41){logger[_0x0a9e('0x10')]('['+[_0x1dc186[_0x0a9e('0x11')]()]+'],\x20EndUser\x20schema',_0x296f41[_0x0a9e('0xe')]);_0x25fba9['endUserId']=_0x296f41[_0x0a9e('0xe')][_0x0a9e('0xf')];_0x5a101a(_0x25fba9);})[_0x0a9e('0x1e')](function(_0x33bdb7){logger[_0x0a9e('0x13')]('['+[_0x1dc186['toUpperCase']()]+']',_0x33bdb7[_0x0a9e('0x14')]);_0x3652a7(_0x33bdb7[_0x0a9e('0x14')]);});});}function getEndUser(_0x40cb85,_0x2da5c0,_0x2b45ea,_0x409319,_0x332d35){return function(_0x39e565){logger['info']('['+[_0x40cb85[_0x0a9e('0x11')]()]+'],\x20getEndUser\x20input\x20crm',_0x39e565);return new Promise(function(_0x2cc7a0,_0x14b13f){var _0x2b7e7f={'method':_0x0a9e('0xb'),'uri':_0x2b45ea+'sys_user?sysparm_query=phone%3D'+_0x39e565[_0x0a9e('0x23')]+'&'+_0x409319+'&'+_0x332d35,'auth':_0x2da5c0,'json':!![]};return rp(_0x2b7e7f)[_0x0a9e('0x19')](function(_0x1fa90d){if(_0x1fa90d[_0x0a9e('0xe')]['length']>0x0){_0x39e565['endUserId']=_0x1fa90d[_0x0a9e('0xe')][0x0]['sys_id'];logger[_0x0a9e('0x10')]('['+[_0x40cb85[_0x0a9e('0x11')]()]+_0x0a9e('0x26'),_0x39e565);_0x2cc7a0(_0x39e565);}else{return createEndUser(_0x40cb85,_0x2da5c0,_0x39e565,_0x2b45ea,_0x409319)[_0x0a9e('0x19')](function(_0x4f41ae){logger[_0x0a9e('0x10')]('['+[_0x40cb85[_0x0a9e('0x11')]()]+_0x0a9e('0x27'),_0x4f41ae);_0x2cc7a0(_0x4f41ae);});}})['catch'](function(_0x1dbf74){logger[_0x0a9e('0x13')]('['+[_0x40cb85[_0x0a9e('0x11')]()]+']',_0x1dbf74['message']);_0x14b13f(_0x1dbf74['message']);});});};}function getCustomFields(_0x11b61d,_0x40d766){var _0x5adda1={};if(_0x11b61d[_0x0a9e('0x28')]>0x0){_[_0x0a9e('0x29')](_0x11b61d,function(_0x2e1b3a){if(_0x2e1b3a[_0x0a9e('0x2a')]==='string'&&_0x2e1b3a['nameField']&&!_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')]['toLowerCase']()]=_0x2e1b3a[_0x0a9e('0x2d')][_0x0a9e('0x2e')]();}else if(_0x2e1b3a[_0x0a9e('0x2a')]==='string'&&_0x2e1b3a[_0x0a9e('0x2c')]&&_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')][_0x0a9e('0x2f')]()]=_0x2e1b3a[_0x0a9e('0x2d')][_0x0a9e('0x2e')]();}else if(_0x2e1b3a[_0x0a9e('0x2a')]===_0x0a9e('0x30')&&_0x2e1b3a[_0x0a9e('0x31')]&&_0x2e1b3a[_0x0a9e('0x2c')]&&_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')][_0x0a9e('0x2f')]()]=_0x40d766[_0x2e1b3a[_0x0a9e('0x31')]][_0x0a9e('0x2e')]();}else if(_0x2e1b3a['type']==='customVariable'&&_0x2e1b3a[_0x0a9e('0x32')]&&_0x2e1b3a[_0x0a9e('0x32')][_0x0a9e('0x33')]&&_0x2e1b3a[_0x0a9e('0x2c')]&&_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')][_0x0a9e('0x2f')]()]=_0x40d766[_0x2e1b3a[_0x0a9e('0x32')][_0x0a9e('0x33')][_0x0a9e('0x2f')]()][_0x0a9e('0x2e')]();}});}return _0x5adda1;}function getTicket(_0x35ed4a,_0x5026aa,_0x117c99,_0x138b8b,_0xdd268f,_0xfbd5ad){return function(_0x2e8caf){logger[_0x0a9e('0x10')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+_0x0a9e('0x34'),_0x2e8caf);return new Promise(function(_0x59afe8,_0x2e9d90){var _0x48fd45=_0x35ed4a[_0x0a9e('0x2f')]()===_0x0a9e('0x35')?_0x2e8caf[_0x0a9e('0x1b')]:_0x2e8caf['endUserId'];var _0x14bec2={'method':_0x0a9e('0x20'),'uri':_0x117c99+_0x0a9e('0x36')+'?'+_0xfbd5ad,'body':Object[_0x0a9e('0x37')]({},{'active':_0x0a9e('0x24'),'caller_id':_0x48fd45,'assigned_to':_0x2e8caf[_0x0a9e('0x1b')],'short_description':intUtil[_0x0a9e('0x38')](_0x138b8b['Subjects'],_0xdd268f,'\x20'),'description':intUtil[_0x0a9e('0x38')](_0x138b8b[_0x0a9e('0x39')],_0xdd268f,'\x0a')},getCustomFields(_0x138b8b[_0x0a9e('0x3a')],_0xdd268f)),'auth':_0x5026aa,'json':!![]};return rp(_0x14bec2)[_0x0a9e('0x19')](function(_0x409789){logger[_0x0a9e('0x10')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+_0x0a9e('0x3b'),_0x409789[_0x0a9e('0xe')]);_0x2e8caf['ticketId']=_0x409789[_0x0a9e('0xe')][_0x0a9e('0xf')];_0x2e8caf['ticketNumber']=_0x409789['result']['number'];logger[_0x0a9e('0x10')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+_0x0a9e('0x3c'),_0x2e8caf);_0x59afe8(_0x2e8caf);})[_0x0a9e('0x1e')](function(_0x61bb17){logger[_0x0a9e('0x13')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+']',_0x61bb17[_0x0a9e('0x14')]);_0x2e9d90(_0x61bb17['message']);});});};}function createRemoteTag(_0x4b1b9f,_0x53975a,_0x39d77d,_0x204173){return new Promise(function(_0x14d602,_0x5bb3ed){var _0x2b69d9={'method':_0x0a9e('0x20'),'uri':_0x39d77d+'label'+'?'+_0x204173,'body':{'short_description':_0x4b1b9f,'global':!![],'active':!![],'name':_0x4b1b9f},'auth':_0x53975a,'json':!![]};return rp(_0x2b69d9)['then'](function(_0x2ef381){var _0x59c6ff=_0x2ef381[_0x0a9e('0xe')]['sys_id'];_0x14d602(_0x59c6ff);});});}function getRemoteTag(_0x2e5e62,_0x3c20b2,_0x439340,_0x53613a,_0x2f82da){return new Promise(function(_0x1bf38a,_0x508b47){var _0x50f687={'method':_0x0a9e('0xb'),'uri':_0x439340+_0x0a9e('0x3d')+'?sysparm_query=name%3D'+_0x2e5e62+'&'+_0x53613a,'auth':_0x3c20b2,'json':!![]};return rp(_0x50f687)[_0x0a9e('0x19')](function(_0x5ce9ac){if(_0x5ce9ac[_0x0a9e('0xe')]['length']>0x0){var _0xe22ccc=_0x5ce9ac['result'][0x0]['sys_id'];_0x1bf38a(_0xe22ccc);}else{return createRemoteTag(_0x2e5e62,_0x3c20b2,_0x439340,_0x53613a)['then'](function(_0x2da03c){_0x1bf38a(_0x2da03c);});}});});}function assignTagToIncident(_0x47de4c,_0x2f7092,_0x65432,_0x3cfd00,_0x19b4df){return new Promise(function(_0x232830,_0x272738){var _0xd10662={'method':_0x0a9e('0x20'),'uri':_0x65432+'label_entry'+'?'+_0x19b4df,'body':{'label':_0x47de4c,'table':_0x0a9e('0x36'),'id_type':_0x0a9e('0x3e'),'table_key':_0x3cfd00[_0x0a9e('0x3f')],'title':_0x0a9e('0x40')+_0x3cfd00[_0x0a9e('0x41')],'id_display':_0x3cfd00[_0x0a9e('0x41')]},'auth':_0x2f7092,'json':!![]};return rp(_0xd10662)['then'](function(_0x956fbe){_0x232830();})[_0x0a9e('0x1e')](function(){_0x232830();});});}function manageTags(_0x5239ef,_0x3649cc,_0x5cc8fb,_0x20c668,_0x5ba1f9,_0x4b3c1a,_0x5674ee){return new Promise(function(_0x273cb5,_0x49d231){var _0x2244d6=[];_0x3649cc[_0x0a9e('0x29')](function(_0x261adb){_0x2244d6[_0x0a9e('0x42')](getRemoteTag(_0x261adb,_0x5cc8fb,_0x20c668,_0x4b3c1a,_0x5674ee));});return Promise[_0x0a9e('0x43')](_0x2244d6)[_0x0a9e('0x19')](function(_0x49eed0){if(_0x49eed0[_0x0a9e('0x28')]){logger['info']('['+[_0x5239ef[_0x0a9e('0x11')]()]+_0x0a9e('0x44'),_0x49eed0);var _0x51aaf7=[];_0x49eed0['forEach'](function(_0x453360){_0x51aaf7[_0x0a9e('0x42')](assignTagToIncident(_0x453360,_0x5cc8fb,_0x20c668,_0x5ba1f9,_0x4b3c1a));});return Promise[_0x0a9e('0x43')](_0x51aaf7)[_0x0a9e('0x19')](function(){_0x273cb5();})['catch'](function(){_0x273cb5();});}else{_0x273cb5();}});});}function getTags(_0x1d0dc8,_0xe05a5a,_0x54327c,_0x797b45,_0x17e88c,_0x88dcbf){return function(_0x409b29){return new Promise(function(_0x401837,_0x4d4a35){var _0x176840=[];var _0x2937e0=_0x797b45[_0x0a9e('0x45')];if(_0x2937e0&&_0x2937e0['length']>0x0){_0x176840=_[_0x0a9e('0x46')](_0x2937e0,'name');}if(_0x176840['length']>0x0){return manageTags(_0x1d0dc8,_0x176840,_0xe05a5a,_0x54327c,_0x409b29,_0x17e88c,_0x88dcbf)[_0x0a9e('0x19')](function(){_0x401837(_0x409b29);});}else{_0x401837(_0x409b29);}});};}function emit(_0x4556c5,_0x9375fb,_0x19c995){var _0x186f39=_0x0a9e('0x47')+_0x0a9e('0x48')+_0x0a9e('0x49')+_0x0a9e('0x4a');var _0x1cc4f3={'uri':_0x4556c5+_0x0a9e('0x4b')+_0x19c995+_0x186f39};io['to'](util[_0x0a9e('0x4c')](_0x0a9e('0x4d'),_0x9375fb))[_0x0a9e('0x4e')](_0x0a9e('0x4f'),_0x1cc4f3);}exports['cs']=function(_0x412a72,_0x2a28c0,_0x4257c9,_0x5150a4,_0x1b0b98,_0x295763,_0x243d12,_0x4edbb0){var _0x1148a1={};var _0x30944e={'user':_0x295763['username'],'pass':_0x295763[_0x0a9e('0x50')]};var _0x56e31e=_0x0a9e('0x51');var _0x427946=_0x0a9e('0x52');_0x295763['remoteUri']=intUtil['stripTrailingSlash'](_0x295763['remoteUri']);_0x295763[_0x0a9e('0x53')]=intUtil[_0x0a9e('0x54')](_0x295763[_0x0a9e('0x53')]);var _0x23a7d3=util[_0x0a9e('0x4c')](_0x0a9e('0x55'),_0x295763[_0x0a9e('0x56')]);_0x1148a1[_0x0a9e('0x16')]=!_['isNil'](_0x5150a4)?_0x5150a4[_0x0a9e('0x57')]:null;_0x1148a1[_0x0a9e('0x1c')]=_0x295763[_0x0a9e('0x57')];_0x1148a1['endUserNumber']=_0x4edbb0[_0x0a9e('0x2f')]()==='outbound'?_0x2a28c0[_0x0a9e('0x58')]:_0x2a28c0[_0x0a9e('0x59')];_0x1148a1['callDirection']=_0x4edbb0===_0x0a9e('0x5a')||_0x4edbb0===_0x0a9e('0x5b')?_0x0a9e('0x5a'):_0x0a9e('0x35');var _0x542ece=util[_0x0a9e('0x4c')](_0x0a9e('0x5c'),_0x295763[_0x0a9e('0x53')],_0x2a28c0[_0x0a9e('0x5d')],md5(_0x2a28c0['uniqueid']));if(_0x1b0b98&&_0x1b0b98[_0x0a9e('0x5e')]){logger[_0x0a9e('0x10')](_0x0a9e('0x5f'),_0x0a9e('0x60'));_0x2a28c0['recordingURL']=_0x542ece;}else if(_0x243d12&&_0x243d12[_0x0a9e('0x61')]&&_0x243d12[_0x0a9e('0x61')]!==_0x0a9e('0x62')){logger[_0x0a9e('0x10')](_0x0a9e('0x63'),_0x0a9e('0x60'));_0x2a28c0[_0x0a9e('0x64')]=_0x542ece;}else{_0x2a28c0[_0x0a9e('0x64')]='';}return getAdminUser(_0x4edbb0,_0x30944e,_0x1148a1,_0x23a7d3,_0x427946,_0x56e31e)[_0x0a9e('0x19')](getUser(_0x4edbb0,_0x30944e,_0x23a7d3,_0x427946,_0x56e31e))[_0x0a9e('0x19')](getEndUser(_0x4edbb0,_0x30944e,_0x23a7d3,_0x427946,_0x56e31e))[_0x0a9e('0x19')](getTicket(_0x4edbb0,_0x30944e,_0x23a7d3,_0x4257c9,_0x2a28c0,_0x427946))[_0x0a9e('0x19')](function(_0x25744a){logger[_0x0a9e('0x10')](util['format'](_0x0a9e('0x65'),_0x25744a[_0x0a9e('0x3f')]));logger[_0x0a9e('0x10')](util['format'](_0x0a9e('0x66'),_0x4edbb0));if(_0x4edbb0!==_0x0a9e('0x5b')){logger[_0x0a9e('0x10')]('['+[_0x4edbb0[_0x0a9e('0x11')]()]+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x295763['remoteUri'],_0x5150a4[_0x0a9e('0x33')],_0x25744a[_0x0a9e('0x3f')]);}})['catch'](function(_0x45108c){logger['error']('['+[_0x4edbb0[_0x0a9e('0x11')]()]+_0x0a9e('0x67'),util['inspect'](_0x45108c,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0xa9e0=['validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','then','],\x20getUser\x20entity','userId','adminEmail','],\x20getUser\x20crm','catch','],\x20createEndUser\x20input\x20crm','POST','sys_user?','user','endUserNumber','true','System','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','length','forEach','type','customField','idField','content','toString','toLowerCase','variable','variableName','Variable','name',']\x20getTicket\x20input\x20crm','outbound','incident','assign','getString','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema',']\x20getTicket\x20crm','label','Incident','ticketId','Incident\x20-\x20','ticketNumber','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','map','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','emit','trigger:browser:url','password','sysparm_limit=1','sysparm_display_value=true','serverUrl','stripTrailingSlash','%s/api/now/table/','remoteUri','email','destcalleridnum','calleridnum','queue','abandoned','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingFormat','none','[OUTBOUND]','recordingURL','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s',']\x20Error\x20running\x20ServiceNow\x20integration','lodash','bluebird','request-promise','ioredis','../../../../config/environment','../../../../config/logger','servicenow','redis','defaults','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','adminId','result','sys_id','info','toUpperCase','],\x20getAdminUser\x20crm','error','message'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf71120,_0x25b7f9){_0xf71120=_0xf71120-0x0;var _0xbe2fd3=_0xa9e0[_0xf71120];return _0xbe2fd3;};'use strict';var _=require(_0x0a9e('0x0'));var Promise=require(_0x0a9e('0x1'));var rp=require(_0x0a9e('0x2'));var util=require('util');var md5=require('md5');var Redis=require(_0x0a9e('0x3'));var intUtil=require('./util');var config=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));config[_0x0a9e('0x7')]=_[_0x0a9e('0x8')](config['redis'],{'host':_0x0a9e('0x9'),'port':0x18eb});var io=require(_0x0a9e('0xa'))(new Redis(config[_0x0a9e('0x7')]));function getAdminUser(_0x5f41ea,_0x503809,_0xe42b77,_0x56465b,_0x52cace,_0x39753a){return new Promise(function(_0xf81284,_0x307b3e){var _0x3ab53f={'method':_0x0a9e('0xb'),'uri':_0x56465b+_0x0a9e('0xc')+'&'+_0x52cace+'&'+_0x39753a,'auth':_0x503809,'json':!![]};return rp(_0x3ab53f)['then'](function(_0x50dfb2){if(_0x50dfb2['result']['length']>0x0){_0xe42b77[_0x0a9e('0xd')]=_0x50dfb2[_0x0a9e('0xe')][0x0][_0x0a9e('0xf')];}logger[_0x0a9e('0x10')]('['+[_0x5f41ea[_0x0a9e('0x11')]()]+_0x0a9e('0x12'),_0xe42b77);_0xf81284(_0xe42b77);})['catch'](function(_0x4283ce){logger[_0x0a9e('0x13')]('['+[_0x5f41ea[_0x0a9e('0x11')]()]+']',_0x4283ce[_0x0a9e('0x14')]);_0x307b3e(_0x4283ce[_0x0a9e('0x14')]);});});}function getUser(_0x4d5611,_0x52a03d,_0x22dccb,_0x5d0880,_0x1985b6){return function(_0x519dfd){logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+'],\x20getUser\x20input\x20crm',_0x519dfd);return new Promise(function(_0x225616,_0x5a0a06){if(intUtil[_0x0a9e('0x15')](_0x519dfd[_0x0a9e('0x16')])){var _0x106033={'method':_0x0a9e('0xb'),'uri':_0x22dccb+_0x0a9e('0x17')+_0x519dfd[_0x0a9e('0x16')]+'&'+_0x5d0880+'&'+_0x1985b6,'auth':_0x52a03d,'json':!![]};logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+_0x0a9e('0x18'),_0x106033);return rp(_0x106033)[_0x0a9e('0x19')](function(_0x1c696a){logger[_0x0a9e('0x10')]('['+[_0x4d5611['toUpperCase']()]+_0x0a9e('0x1a'),_0x1c696a);if(_0x1c696a[_0x0a9e('0xe')]['length']>0x0&&String(_0x1c696a[_0x0a9e('0xe')][0x0]['active'])==='true'){_0x519dfd[_0x0a9e('0x1b')]=_0x1c696a[_0x0a9e('0xe')][0x0][_0x0a9e('0xf')];}else{_0x519dfd[_0x0a9e('0x1b')]=_0x519dfd['adminId'];_0x519dfd[_0x0a9e('0x16')]=_0x519dfd[_0x0a9e('0x1c')];}logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+_0x0a9e('0x1d'),_0x519dfd);_0x225616(_0x519dfd);})[_0x0a9e('0x1e')](function(_0x16b1ca){logger['error']('['+[_0x4d5611['toUpperCase']()]+']',_0x16b1ca[_0x0a9e('0x14')]);_0x5a0a06(_0x16b1ca[_0x0a9e('0x14')]);});}else{logger[_0x0a9e('0x10')]('['+[_0x4d5611[_0x0a9e('0x11')]()]+']\x20using\x20admin\x20profile');_0x519dfd[_0x0a9e('0x1b')]=_0x519dfd['adminId'];_0x519dfd[_0x0a9e('0x16')]=_0x519dfd['adminEmail'];_0x225616(_0x519dfd);}});};}function createEndUser(_0x1dc186,_0x34dc65,_0x25fba9,_0x14433c,_0x140511){logger[_0x0a9e('0x10')]('['+[_0x1dc186[_0x0a9e('0x11')]()]+_0x0a9e('0x1f'),_0x25fba9);return new Promise(function(_0x5a101a,_0x3652a7){var _0x468813={'method':_0x0a9e('0x20'),'uri':_0x14433c+_0x0a9e('0x21')+_0x140511,'body':{'user_name':_0x25fba9['endUserNumber'],'roles':_0x0a9e('0x22'),'first_name':_0x25fba9[_0x0a9e('0x23')],'active':_0x0a9e('0x24'),'date_format':_0x0a9e('0x25'),'phone':_0x25fba9[_0x0a9e('0x23')]},'auth':_0x34dc65,'json':!![]};return rp(_0x468813)[_0x0a9e('0x19')](function(_0x296f41){logger[_0x0a9e('0x10')]('['+[_0x1dc186[_0x0a9e('0x11')]()]+'],\x20EndUser\x20schema',_0x296f41[_0x0a9e('0xe')]);_0x25fba9['endUserId']=_0x296f41[_0x0a9e('0xe')][_0x0a9e('0xf')];_0x5a101a(_0x25fba9);})[_0x0a9e('0x1e')](function(_0x33bdb7){logger[_0x0a9e('0x13')]('['+[_0x1dc186['toUpperCase']()]+']',_0x33bdb7[_0x0a9e('0x14')]);_0x3652a7(_0x33bdb7[_0x0a9e('0x14')]);});});}function getEndUser(_0x40cb85,_0x2da5c0,_0x2b45ea,_0x409319,_0x332d35){return function(_0x39e565){logger['info']('['+[_0x40cb85[_0x0a9e('0x11')]()]+'],\x20getEndUser\x20input\x20crm',_0x39e565);return new Promise(function(_0x2cc7a0,_0x14b13f){var _0x2b7e7f={'method':_0x0a9e('0xb'),'uri':_0x2b45ea+'sys_user?sysparm_query=phone%3D'+_0x39e565[_0x0a9e('0x23')]+'&'+_0x409319+'&'+_0x332d35,'auth':_0x2da5c0,'json':!![]};return rp(_0x2b7e7f)[_0x0a9e('0x19')](function(_0x1fa90d){if(_0x1fa90d[_0x0a9e('0xe')]['length']>0x0){_0x39e565['endUserId']=_0x1fa90d[_0x0a9e('0xe')][0x0]['sys_id'];logger[_0x0a9e('0x10')]('['+[_0x40cb85[_0x0a9e('0x11')]()]+_0x0a9e('0x26'),_0x39e565);_0x2cc7a0(_0x39e565);}else{return createEndUser(_0x40cb85,_0x2da5c0,_0x39e565,_0x2b45ea,_0x409319)[_0x0a9e('0x19')](function(_0x4f41ae){logger[_0x0a9e('0x10')]('['+[_0x40cb85[_0x0a9e('0x11')]()]+_0x0a9e('0x27'),_0x4f41ae);_0x2cc7a0(_0x4f41ae);});}})['catch'](function(_0x1dbf74){logger[_0x0a9e('0x13')]('['+[_0x40cb85[_0x0a9e('0x11')]()]+']',_0x1dbf74['message']);_0x14b13f(_0x1dbf74['message']);});});};}function getCustomFields(_0x11b61d,_0x40d766){var _0x5adda1={};if(_0x11b61d[_0x0a9e('0x28')]>0x0){_[_0x0a9e('0x29')](_0x11b61d,function(_0x2e1b3a){if(_0x2e1b3a[_0x0a9e('0x2a')]==='string'&&_0x2e1b3a['nameField']&&!_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')]['toLowerCase']()]=_0x2e1b3a[_0x0a9e('0x2d')][_0x0a9e('0x2e')]();}else if(_0x2e1b3a[_0x0a9e('0x2a')]==='string'&&_0x2e1b3a[_0x0a9e('0x2c')]&&_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')][_0x0a9e('0x2f')]()]=_0x2e1b3a[_0x0a9e('0x2d')][_0x0a9e('0x2e')]();}else if(_0x2e1b3a[_0x0a9e('0x2a')]===_0x0a9e('0x30')&&_0x2e1b3a[_0x0a9e('0x31')]&&_0x2e1b3a[_0x0a9e('0x2c')]&&_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')][_0x0a9e('0x2f')]()]=_0x40d766[_0x2e1b3a[_0x0a9e('0x31')]][_0x0a9e('0x2e')]();}else if(_0x2e1b3a['type']==='customVariable'&&_0x2e1b3a[_0x0a9e('0x32')]&&_0x2e1b3a[_0x0a9e('0x32')][_0x0a9e('0x33')]&&_0x2e1b3a[_0x0a9e('0x2c')]&&_0x2e1b3a[_0x0a9e('0x2b')]){_0x5adda1[_0x2e1b3a[_0x0a9e('0x2c')][_0x0a9e('0x2f')]()]=_0x40d766[_0x2e1b3a[_0x0a9e('0x32')][_0x0a9e('0x33')][_0x0a9e('0x2f')]()][_0x0a9e('0x2e')]();}});}return _0x5adda1;}function getTicket(_0x35ed4a,_0x5026aa,_0x117c99,_0x138b8b,_0xdd268f,_0xfbd5ad){return function(_0x2e8caf){logger[_0x0a9e('0x10')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+_0x0a9e('0x34'),_0x2e8caf);return new Promise(function(_0x59afe8,_0x2e9d90){var _0x48fd45=_0x35ed4a[_0x0a9e('0x2f')]()===_0x0a9e('0x35')?_0x2e8caf[_0x0a9e('0x1b')]:_0x2e8caf['endUserId'];var _0x14bec2={'method':_0x0a9e('0x20'),'uri':_0x117c99+_0x0a9e('0x36')+'?'+_0xfbd5ad,'body':Object[_0x0a9e('0x37')]({},{'active':_0x0a9e('0x24'),'caller_id':_0x48fd45,'assigned_to':_0x2e8caf[_0x0a9e('0x1b')],'short_description':intUtil[_0x0a9e('0x38')](_0x138b8b['Subjects'],_0xdd268f,'\x20'),'description':intUtil[_0x0a9e('0x38')](_0x138b8b[_0x0a9e('0x39')],_0xdd268f,'\x0a')},getCustomFields(_0x138b8b[_0x0a9e('0x3a')],_0xdd268f)),'auth':_0x5026aa,'json':!![]};return rp(_0x14bec2)[_0x0a9e('0x19')](function(_0x409789){logger[_0x0a9e('0x10')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+_0x0a9e('0x3b'),_0x409789[_0x0a9e('0xe')]);_0x2e8caf['ticketId']=_0x409789[_0x0a9e('0xe')][_0x0a9e('0xf')];_0x2e8caf['ticketNumber']=_0x409789['result']['number'];logger[_0x0a9e('0x10')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+_0x0a9e('0x3c'),_0x2e8caf);_0x59afe8(_0x2e8caf);})[_0x0a9e('0x1e')](function(_0x61bb17){logger[_0x0a9e('0x13')]('['+[_0x35ed4a[_0x0a9e('0x11')]()]+']',_0x61bb17[_0x0a9e('0x14')]);_0x2e9d90(_0x61bb17['message']);});});};}function createRemoteTag(_0x4b1b9f,_0x53975a,_0x39d77d,_0x204173){return new Promise(function(_0x14d602,_0x5bb3ed){var _0x2b69d9={'method':_0x0a9e('0x20'),'uri':_0x39d77d+'label'+'?'+_0x204173,'body':{'short_description':_0x4b1b9f,'global':!![],'active':!![],'name':_0x4b1b9f},'auth':_0x53975a,'json':!![]};return rp(_0x2b69d9)['then'](function(_0x2ef381){var _0x59c6ff=_0x2ef381[_0x0a9e('0xe')]['sys_id'];_0x14d602(_0x59c6ff);});});}function getRemoteTag(_0x2e5e62,_0x3c20b2,_0x439340,_0x53613a,_0x2f82da){return new Promise(function(_0x1bf38a,_0x508b47){var _0x50f687={'method':_0x0a9e('0xb'),'uri':_0x439340+_0x0a9e('0x3d')+'?sysparm_query=name%3D'+_0x2e5e62+'&'+_0x53613a,'auth':_0x3c20b2,'json':!![]};return rp(_0x50f687)[_0x0a9e('0x19')](function(_0x5ce9ac){if(_0x5ce9ac[_0x0a9e('0xe')]['length']>0x0){var _0xe22ccc=_0x5ce9ac['result'][0x0]['sys_id'];_0x1bf38a(_0xe22ccc);}else{return createRemoteTag(_0x2e5e62,_0x3c20b2,_0x439340,_0x53613a)['then'](function(_0x2da03c){_0x1bf38a(_0x2da03c);});}});});}function assignTagToIncident(_0x47de4c,_0x2f7092,_0x65432,_0x3cfd00,_0x19b4df){return new Promise(function(_0x232830,_0x272738){var _0xd10662={'method':_0x0a9e('0x20'),'uri':_0x65432+'label_entry'+'?'+_0x19b4df,'body':{'label':_0x47de4c,'table':_0x0a9e('0x36'),'id_type':_0x0a9e('0x3e'),'table_key':_0x3cfd00[_0x0a9e('0x3f')],'title':_0x0a9e('0x40')+_0x3cfd00[_0x0a9e('0x41')],'id_display':_0x3cfd00[_0x0a9e('0x41')]},'auth':_0x2f7092,'json':!![]};return rp(_0xd10662)['then'](function(_0x956fbe){_0x232830();})[_0x0a9e('0x1e')](function(){_0x232830();});});}function manageTags(_0x5239ef,_0x3649cc,_0x5cc8fb,_0x20c668,_0x5ba1f9,_0x4b3c1a,_0x5674ee){return new Promise(function(_0x273cb5,_0x49d231){var _0x2244d6=[];_0x3649cc[_0x0a9e('0x29')](function(_0x261adb){_0x2244d6[_0x0a9e('0x42')](getRemoteTag(_0x261adb,_0x5cc8fb,_0x20c668,_0x4b3c1a,_0x5674ee));});return Promise[_0x0a9e('0x43')](_0x2244d6)[_0x0a9e('0x19')](function(_0x49eed0){if(_0x49eed0[_0x0a9e('0x28')]){logger['info']('['+[_0x5239ef[_0x0a9e('0x11')]()]+_0x0a9e('0x44'),_0x49eed0);var _0x51aaf7=[];_0x49eed0['forEach'](function(_0x453360){_0x51aaf7[_0x0a9e('0x42')](assignTagToIncident(_0x453360,_0x5cc8fb,_0x20c668,_0x5ba1f9,_0x4b3c1a));});return Promise[_0x0a9e('0x43')](_0x51aaf7)[_0x0a9e('0x19')](function(){_0x273cb5();})['catch'](function(){_0x273cb5();});}else{_0x273cb5();}});});}function getTags(_0x1d0dc8,_0xe05a5a,_0x54327c,_0x797b45,_0x17e88c,_0x88dcbf){return function(_0x409b29){return new Promise(function(_0x401837,_0x4d4a35){var _0x176840=[];var _0x2937e0=_0x797b45[_0x0a9e('0x45')];if(_0x2937e0&&_0x2937e0['length']>0x0){_0x176840=_[_0x0a9e('0x46')](_0x2937e0,'name');}if(_0x176840['length']>0x0){return manageTags(_0x1d0dc8,_0x176840,_0xe05a5a,_0x54327c,_0x409b29,_0x17e88c,_0x88dcbf)[_0x0a9e('0x19')](function(){_0x401837(_0x409b29);});}else{_0x401837(_0x409b29);}});};}function emit(_0x4556c5,_0x9375fb,_0x19c995){var _0x186f39=_0x0a9e('0x47')+_0x0a9e('0x48')+_0x0a9e('0x49')+_0x0a9e('0x4a');var _0x1cc4f3={'uri':_0x4556c5+_0x0a9e('0x4b')+_0x19c995+_0x186f39};io['to'](util[_0x0a9e('0x4c')](_0x0a9e('0x4d'),_0x9375fb))[_0x0a9e('0x4e')](_0x0a9e('0x4f'),_0x1cc4f3);}exports['cs']=function(_0x412a72,_0x2a28c0,_0x4257c9,_0x5150a4,_0x1b0b98,_0x295763,_0x243d12,_0x4edbb0){var _0x1148a1={};var _0x30944e={'user':_0x295763['username'],'pass':_0x295763[_0x0a9e('0x50')]};var _0x56e31e=_0x0a9e('0x51');var _0x427946=_0x0a9e('0x52');_0x295763['remoteUri']=intUtil['stripTrailingSlash'](_0x295763['remoteUri']);_0x295763[_0x0a9e('0x53')]=intUtil[_0x0a9e('0x54')](_0x295763[_0x0a9e('0x53')]);var _0x23a7d3=util[_0x0a9e('0x4c')](_0x0a9e('0x55'),_0x295763[_0x0a9e('0x56')]);_0x1148a1[_0x0a9e('0x16')]=!_['isNil'](_0x5150a4)?_0x5150a4[_0x0a9e('0x57')]:null;_0x1148a1[_0x0a9e('0x1c')]=_0x295763[_0x0a9e('0x57')];_0x1148a1['endUserNumber']=_0x4edbb0[_0x0a9e('0x2f')]()==='outbound'?_0x2a28c0[_0x0a9e('0x58')]:_0x2a28c0[_0x0a9e('0x59')];_0x1148a1['callDirection']=_0x4edbb0===_0x0a9e('0x5a')||_0x4edbb0===_0x0a9e('0x5b')?_0x0a9e('0x5a'):_0x0a9e('0x35');var _0x542ece=util[_0x0a9e('0x4c')](_0x0a9e('0x5c'),_0x295763[_0x0a9e('0x53')],_0x2a28c0[_0x0a9e('0x5d')],md5(_0x2a28c0['uniqueid']));if(_0x1b0b98&&_0x1b0b98[_0x0a9e('0x5e')]){logger[_0x0a9e('0x10')](_0x0a9e('0x5f'),_0x0a9e('0x60'));_0x2a28c0['recordingURL']=_0x542ece;}else if(_0x243d12&&_0x243d12[_0x0a9e('0x61')]&&_0x243d12[_0x0a9e('0x61')]!==_0x0a9e('0x62')){logger[_0x0a9e('0x10')](_0x0a9e('0x63'),_0x0a9e('0x60'));_0x2a28c0[_0x0a9e('0x64')]=_0x542ece;}else{_0x2a28c0[_0x0a9e('0x64')]='';}return getAdminUser(_0x4edbb0,_0x30944e,_0x1148a1,_0x23a7d3,_0x427946,_0x56e31e)[_0x0a9e('0x19')](getUser(_0x4edbb0,_0x30944e,_0x23a7d3,_0x427946,_0x56e31e))[_0x0a9e('0x19')](getEndUser(_0x4edbb0,_0x30944e,_0x23a7d3,_0x427946,_0x56e31e))[_0x0a9e('0x19')](getTicket(_0x4edbb0,_0x30944e,_0x23a7d3,_0x4257c9,_0x2a28c0,_0x427946))[_0x0a9e('0x19')](function(_0x25744a){logger[_0x0a9e('0x10')](util['format'](_0x0a9e('0x65'),_0x25744a[_0x0a9e('0x3f')]));logger[_0x0a9e('0x10')](util['format'](_0x0a9e('0x66'),_0x4edbb0));if(_0x4edbb0!==_0x0a9e('0x5b')){logger[_0x0a9e('0x10')]('['+[_0x4edbb0[_0x0a9e('0x11')]()]+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x295763['remoteUri'],_0x5150a4[_0x0a9e('0x33')],_0x25744a[_0x0a9e('0x3f')]);}})['catch'](function(_0x45108c){logger['error']('['+[_0x4edbb0[_0x0a9e('0x11')]()]+_0x0a9e('0x67'),util['inspect'](_0x45108c,{'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 d693f9d..4d5aaf4 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 _0x43ef=['login','username','password','xCALLY\x20Motion\x20integration','sessionID','Account\x20%d\x20is\x20not\x20valid','set_relationship','queue','remoteUri','stripTrailingSlash','serverUrl','uri','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','Fields','Ticket\x20created!','users','contacts','version','%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','catch','error','outbound','%s/service/v4_1/rest.php','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','Outbound','The\x20Ticket\x20ID\x20is:','charAt','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','trigger:browser:url','abandoned','[ABANDONED]','calleridnum','lodash','request-promise','bluebird','util','ioredis','./util','../../../../config/environment','../../../../config/logger','sugarcrm','defaults','localhost','socket.io-emitter','redis','emit','Creating\x20new\x20ticket...','getString','assigned_user_id','created_by','description','Descriptions','date_start','slice','replace','duration_hours','duration_minutes','length','variableName','push','idField','set_entry','JSON','stringify','Calls','apiKey','base64','get_server_info','isNil','info','get_entry_list','Employees','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','name','user_name','then','entry_list','find','name_value_list','value','Agent\x20found!','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_id','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','Contacts','format','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','first_name','Enduser\x20created.','[HTTP]','merge','map','type','string','nameField','customField','toLowerCase','custom_fields','content','toString','variable','Variable','POST'];(function(_0x57951f,_0x2578eb){var _0x53bfd9=function(_0x46622a){while(--_0x46622a){_0x57951f['push'](_0x57951f['shift']());}};_0x53bfd9(++_0x2578eb);}(_0x43ef,0x199));var _0xf43e=function(_0x317d38,_0x30886c){_0x317d38=_0x317d38-0x0;var _0x204c7c=_0x43ef[_0x317d38];return _0x204c7c;};'use strict';var _=require(_0xf43e('0x0'));var rp=require(_0xf43e('0x1'));var BPromise=require(_0xf43e('0x2'));var md5=require('md5');var util=require(_0xf43e('0x3'));var Redis=require(_0xf43e('0x4'));var intUtil=require(_0xf43e('0x5'));var config=require(_0xf43e('0x6'));var logger=require(_0xf43e('0x7'))(_0xf43e('0x8'));config['redis']=_[_0xf43e('0x9')](config['redis'],{'host':_0xf43e('0xa'),'port':0x18eb});var io=require(_0xf43e('0xb'))(new Redis(config[_0xf43e('0xc')]));var def={'method':'POST','json':!![]};function emit(_0xcbdec,_0x34126b,_0x3d39b9){io['to'](_0xcbdec)[_0xf43e('0xd')](_0x34126b,_0x3d39b9);}function getTicket(_0x1b72f9,_0xb969f4,_0x140d8b,_0x4648b5,_0x2ca6f8,_0x5639fc,_0xde231b,_0x5a0f5e){logger['info'](_0xf43e('0xe'));var _0x24fa08=new Date();var _0x1d424e=[{'name':'name','value':intUtil[_0xf43e('0xf')](_0x4648b5['Subjects'],_0x2ca6f8,'\x20')},{'name':_0xf43e('0x10'),'value':_0xb969f4['id']},{'name':_0xf43e('0x11'),'value':_0xb969f4['id']},{'name':_0xf43e('0x12'),'value':intUtil['getString'](_0x4648b5[_0xf43e('0x13')],_0x2ca6f8,'\x0a')},{'name':_0xf43e('0x14'),'value':_0x24fa08['toISOString']()[_0xf43e('0x15')](0x0,0x13)[_0xf43e('0x16')]('T','\x20')},{'name':_0xf43e('0x17'),'value':'0'},{'name':_0xf43e('0x18'),'value':'15'},{'name':'parent_id','value':_0x140d8b['id']},{'name':'parent_type','value':'Contacts'},{'name':'parent_name','value':_0x140d8b['name']},{'name':'direction','value':_0x5a0f5e}];if(_0x5639fc[_0xf43e('0x19')]){_['forEach'](_0x5639fc,function(_0xf8f09){if(_0x2ca6f8[_0xf8f09[_0xf43e('0x1a')]]){_0x1d424e[_0xf43e('0x1b')]({'name':_0xf8f09[_0xf43e('0x1c')],'value':_0x2ca6f8[_0xf8f09['variableName']]});}});}return request({'form':{'method':_0xf43e('0x1d'),'input_type':_0xf43e('0x1e'),'response_type':_0xf43e('0x1e'),'rest_data':JSON[_0xf43e('0x1f')]({'session':_0xde231b['id'],'module_name':_0xf43e('0x20'),'name_value_list':_0x1d424e})}});}function getAuth(_0x2bc2e9){return util['format']('Basic\x20%s',new Buffer(_0x2bc2e9[_0xf43e('0x21')]+':X')['toString'](_0xf43e('0x22')));}function getServerInfo(_0x83c485){return request({'form':{'method':_0xf43e('0x23'),'input_type':'JSON','response_type':_0xf43e('0x1e'),'rest_data':JSON['stringify']({'session':_0x83c485['id']})}});}function getUser(_0x371fcb,_0x1e9bf7,_0x5cdbf9){if(!_[_0xf43e('0x24')](_0x1e9bf7)){logger[_0xf43e('0x25')]('Getting\x20agent\x20with\x20name',_0x1e9bf7);return request({'form':{'method':_0xf43e('0x26'),'input_type':_0xf43e('0x1e'),'response_type':_0xf43e('0x1e'),'rest_data':JSON[_0xf43e('0x1f')]({'session':_0x5cdbf9['id'],'module_name':_0xf43e('0x27'),'query':util['format'](_0xf43e('0x28'),_0x1e9bf7),'order_by':'','offset':'0','select_fields':['id',_0xf43e('0x29'),_0xf43e('0x2a')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xf43e('0x2b')](function(_0x2851ef){if(_0x2851ef[_0xf43e('0x2c')][_0xf43e('0x19')]){var _0x41ca49=_[_0xf43e('0x2d')](_0x2851ef[_0xf43e('0x2c')],function(_0x487075){return _0x487075[_0xf43e('0x2e')]['user_name'][_0xf43e('0x2f')]===_0x1e9bf7;});if(_0x41ca49){logger['info'](_0xf43e('0x30'));return BPromise[_0xf43e('0x31')]({'id':_0x41ca49[_0xf43e('0x2e')]['id']['value'],'name':_0x41ca49[_0xf43e('0x2e')][_0xf43e('0x29')][_0xf43e('0x2f')]});}}logger[_0xf43e('0x25')](_0xf43e('0x32'));return BPromise[_0xf43e('0x31')]({'id':_0x5cdbf9['name_value_list'][_0xf43e('0x33')][_0xf43e('0x2f')],'name':_0x5cdbf9['name_value_list'][_0xf43e('0x2a')][_0xf43e('0x2f')]});});}else{logger[_0xf43e('0x25')](_0xf43e('0x34'));return BPromise[_0xf43e('0x31')]({'id':_0x5cdbf9[_0xf43e('0x2e')][_0xf43e('0x33')]['value'],'name':_0x5cdbf9[_0xf43e('0x2e')][_0xf43e('0x2a')][_0xf43e('0x2f')]});}}function getEndUser(_0x3ea373,_0xc4081d,_0x4780c2,_0x4f2521){logger[_0xf43e('0x25')](_0xf43e('0x35'),_0x4780c2);return request({'form':{'method':_0xf43e('0x26'),'input_type':_0xf43e('0x1e'),'response_type':'JSON','rest_data':JSON['stringify']({'session':_0x4f2521['id'],'module_name':_0xf43e('0x36'),'query':util[_0xf43e('0x37')](_0xf43e('0x38'),_0x4780c2),'order_by':'','offset':'0','select_fields':['id',_0xf43e('0x29'),_0xf43e('0x39')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xf43e('0x2b')](function(_0x55c5f4){if(_0x55c5f4[_0xf43e('0x2c')][_0xf43e('0x19')]){var _0x3e2596=_[_0xf43e('0x2d')](_0x55c5f4[_0xf43e('0x2c')],function(_0x543f75){return _0x543f75['name_value_list'][_0xf43e('0x39')][_0xf43e('0x2f')]===_0x4780c2;});if(_0x3e2596){logger['info']('Enduser\x20found!');return BPromise[_0xf43e('0x31')]({'id':_0x3e2596[_0xf43e('0x2e')]['id'][_0xf43e('0x2f')],'name':_0x3e2596[_0xf43e('0x2e')]['name']['value'],'phone':_0x3e2596['name_value_list'][_0xf43e('0x39')][_0xf43e('0x2f')]});}}else{logger['info'](_0xf43e('0x3a'));return request({'form':{'method':_0xf43e('0x1d'),'input_type':_0xf43e('0x1e'),'response_type':_0xf43e('0x1e'),'rest_data':JSON[_0xf43e('0x1f')]({'session':_0x4f2521['id'],'module_name':_0xf43e('0x36'),'name_value_list':[{'name':_0xf43e('0x3b'),'value':_0xc4081d!==''?_0xc4081d:util[_0xf43e('0x37')]('Caller\x20-\x20%s',_0x4780c2)},{'name':_0xf43e('0x39'),'value':_0x4780c2}]})}})[_0xf43e('0x2b')](function(_0x440738){logger[_0xf43e('0x25')](_0xf43e('0x3c'));return BPromise['resolve']({'id':_0x440738['id'],'name':_0x440738[_0xf43e('0x2c')][_0xf43e('0x3b')][_0xf43e('0x2f')],'phone':_0x440738['entry_list'][_0xf43e('0x39')][_0xf43e('0x2f')]});});}});}function request(_0x5e76e1){logger['debug'](_0xf43e('0x3d'),JSON[_0xf43e('0x1f')](_0x5e76e1));return rp(_[_0xf43e('0x3e')](def,_0x5e76e1));}function getTags(_0x5d69d4,_0x2e43d4){var _0x595f3=[];if(_0x5d69d4&&_0x5d69d4[_0xf43e('0x19')]>0x0){_0x595f3=_[_0xf43e('0x3f')](_0x5d69d4,_0x2e43d4);}return _0x595f3;}function getCustomFields(_0x18fe5b,_0x1a4615){var _0x3eeaae=[];var _0x201756={'custom_fields':[]};if(_0x18fe5b[_0xf43e('0x19')]>0x0){_['forEach'](_0x18fe5b,function(_0x561a53){if(_0x561a53[_0xf43e('0x40')]===_0xf43e('0x41')&&_0x561a53[_0xf43e('0x42')]&&!_0x561a53[_0xf43e('0x43')]){_0x201756[_0x561a53[_0xf43e('0x42')][_0xf43e('0x44')]()]=_0x561a53['content']['toString']();}else if(_0x561a53['type']===_0xf43e('0x41')&&_0x561a53[_0xf43e('0x1c')]&&_0x561a53[_0xf43e('0x43')]){_0x201756[_0xf43e('0x45')][_0xf43e('0x1b')]({'id':_0x561a53[_0xf43e('0x1c')],'value':_0x561a53[_0xf43e('0x46')][_0xf43e('0x47')]()});}else if(_0x561a53[_0xf43e('0x40')]===_0xf43e('0x48')&&_0x561a53[_0xf43e('0x1a')]&&_0x561a53[_0xf43e('0x1c')]&&_0x561a53[_0xf43e('0x43')]){_0x1a4615[_0x561a53[_0xf43e('0x1a')]]&&_0x201756[_0xf43e('0x45')][_0xf43e('0x1b')]({'id':_0x561a53[_0xf43e('0x1c')],'value':_0x1a4615[_0x561a53[_0xf43e('0x1a')]][_0xf43e('0x47')]()});}else if(_0x561a53[_0xf43e('0x40')]==='customVariable'&&_0x561a53[_0xf43e('0x49')]&&_0x561a53[_0xf43e('0x49')][_0xf43e('0x29')]&&_0x561a53[_0xf43e('0x1c')]&&_0x561a53[_0xf43e('0x43')]){_0x1a4615[_0x561a53[_0xf43e('0x49')][_0xf43e('0x29')][_0xf43e('0x44')]()]&&_0x201756[_0xf43e('0x45')][_0xf43e('0x1b')]({'id':_0x561a53[_0xf43e('0x1c')],'value':_0x1a4615[_0x561a53[_0xf43e('0x49')][_0xf43e('0x29')][_0xf43e('0x44')]()][_0xf43e('0x47')]()});}});}return _0x201756;}function getConnection(_0x4c87e7){return request({'method':_0xf43e('0x4a'),'form':{'method':_0xf43e('0x4b'),'input_type':_0xf43e('0x1e'),'response_type':_0xf43e('0x1e'),'rest_data':JSON[_0xf43e('0x1f')]({'user_auth':{'user_name':_0x4c87e7[_0xf43e('0x4c')],'password':_0x4c87e7[_0xf43e('0x4d')],'encryption':'PLAIN'},'application':_0xf43e('0x4e')})}})['then'](function(_0x557c50){var _0x1f9a32=_0x557c50;if(_0x1f9a32['id']){def[_0xf43e('0x4f')]=_0x1f9a32['id'];return BPromise[_0xf43e('0x31')](_0x1f9a32);}else{throw new Error(util[_0xf43e('0x37')](_0xf43e('0x50'),_0x4c87e7['id']));}});}function setRelationship(_0x2a442a,_0x1d1383,_0x289e0e,_0x1a834e){return request({'form':{'method':_0xf43e('0x51'),'input_type':'JSON','response_type':_0xf43e('0x1e'),'rest_data':JSON[_0xf43e('0x1f')]({'session':_0x2a442a['id'],'module_name':_0xf43e('0x20'),'module_id':_0x289e0e['id'],'link_field_name':_0x1a834e,'related_ids':[_0x1d1383['id']]})}});}exports[_0xf43e('0x52')]=function(_0x291ec0,_0x49ce88,_0x2a2d31,_0x29ffcf,_0x30abfe,_0x120d08){var _0x5c5b77,_0x5073c1,_0x2a9728,_0x133471;_0x120d08[_0xf43e('0x53')]=intUtil[_0xf43e('0x54')](_0x120d08['remoteUri']);_0x120d08['serverUrl']=intUtil['stripTrailingSlash'](_0x120d08[_0xf43e('0x55')]);def[_0xf43e('0x56')]=util[_0xf43e('0x37')]('%s/service/v4_1/rest.php',_0x120d08['remoteUri']);if(_0x30abfe&&_0x30abfe[_0xf43e('0x57')]){logger[_0xf43e('0x25')](_0xf43e('0x58'),'Recording\x20is\x20enabled!');_0x49ce88[_0xf43e('0x59')]=util[_0xf43e('0x37')](_0xf43e('0x5a'),_0x120d08[_0xf43e('0x55')],_0x49ce88[_0xf43e('0x5b')],md5(_0x49ce88['uniqueid']));}else{_0x49ce88[_0xf43e('0x59')]='';}return getConnection(_0x120d08)[_0xf43e('0x2b')](function(_0xf4e3dc){_0x133471=_0xf4e3dc;return getUser(_0x120d08,_0x29ffcf[_0xf43e('0x29')],_0x133471);})[_0xf43e('0x2b')](function(_0x30a777){_0x5c5b77=_0x30a777;logger[_0xf43e('0x25')](_0xf43e('0x5c'),_0x5c5b77['id']);return getEndUser(_0x120d08,_0x49ce88[_0xf43e('0x5d')],_0x49ce88['calleridnum'],_0x133471);})[_0xf43e('0x2b')](function(_0x2ca91f){_0x5073c1=_0x2ca91f;logger['info'](_0xf43e('0x5e'),_0x5073c1['id']);return getTicket(_0x120d08,_0x5c5b77,_0x5073c1,_0x2a2d31,_0x49ce88,_0x2a2d31[_0xf43e('0x5f')],_0x133471,'Inbound');})['then'](function(_0x7d7830){_0x2a9728=_0x7d7830;logger[_0xf43e('0x25')](_0xf43e('0x60'));logger[_0xf43e('0x25')]('The\x20Ticket\x20ID\x20is:',_0x2a9728['id']);return setRelationship(_0x133471,_0x5c5b77,_0x2a9728,_0xf43e('0x61'));})[_0xf43e('0x2b')](function(){return setRelationship(_0x133471,_0x5073c1,_0x2a9728,_0xf43e('0x62'));})[_0xf43e('0x2b')](function(){return getServerInfo(_0x133471);})[_0xf43e('0x2b')](function(_0x2c8016){var _0x153b08=parseInt(_0x2c8016[_0xf43e('0x63')]['charAt'](0x0));var _0x1f858a=util[_0xf43e('0x37')](_0xf43e('0x64'),_0x120d08[_0xf43e('0x53')],_0x2a9728['id']);if(_0x153b08>0x6){_0x1f858a=util[_0xf43e('0x37')]('%s/#bwc/index.php?module=Calls&action=EditView&record=%s',_0x120d08[_0xf43e('0x53')],_0x2a9728['id']);}logger[_0xf43e('0x25')]('[QUEUE]',_0xf43e('0x65'));emit(util['format'](_0xf43e('0x66'),_0x29ffcf['name']),'trigger:browser:url',{'uri':_0x1f858a});})[_0xf43e('0x67')](function(_0x421635){logger[_0xf43e('0x68')]('[QUEUE]',JSON[_0xf43e('0x1f')](_0x421635));});};exports[_0xf43e('0x69')]=function(_0x49fc76,_0xc8f728,_0x2687a7,_0x1b3ccb,_0x52fd88,_0x107c9b,_0x4fce8c){var _0x1ce50a,_0x58a39d,_0x17eb46,_0x392ce7;_0x107c9b[_0xf43e('0x53')]=intUtil[_0xf43e('0x54')](_0x107c9b[_0xf43e('0x53')]);_0x107c9b[_0xf43e('0x55')]=intUtil[_0xf43e('0x54')](_0x107c9b['serverUrl']);def['uri']=util[_0xf43e('0x37')](_0xf43e('0x6a'),_0x107c9b[_0xf43e('0x53')]);if(_0x4fce8c&&_0x4fce8c[_0xf43e('0x6b')]&&_0x4fce8c['recordingFormat']!==_0xf43e('0x6c')){logger[_0xf43e('0x25')](_0xf43e('0x6d'),_0xf43e('0x6e'));_0xc8f728[_0xf43e('0x59')]=util['format'](_0xf43e('0x5a'),_0x107c9b['serverUrl'],_0xc8f728[_0xf43e('0x5b')],md5(_0xc8f728[_0xf43e('0x5b')]));}return getConnection(_0x107c9b)[_0xf43e('0x2b')](function(_0x39d6b8){_0x392ce7=_0x39d6b8;return getUser(_0x107c9b,_0x1b3ccb[_0xf43e('0x29')],_0x392ce7);})[_0xf43e('0x2b')](function(_0x5816ae){_0x1ce50a=_0x5816ae;logger[_0xf43e('0x25')](_0xf43e('0x5c'),_0x1ce50a['id']);return getEndUser(_0x107c9b,_0xc8f728[_0xf43e('0x6f')],_0xc8f728[_0xf43e('0x70')],_0x392ce7);})[_0xf43e('0x2b')](function(_0xa6d74e){_0x58a39d=_0xa6d74e;logger[_0xf43e('0x25')](_0xf43e('0x5e'),_0x58a39d['id']);return getTicket(_0x107c9b,_0x1ce50a,_0x58a39d,_0x2687a7,_0xc8f728,_0x2687a7['Fields'],_0x392ce7,_0xf43e('0x71'));})[_0xf43e('0x2b')](function(_0x1a98bf){_0x17eb46=_0x1a98bf;logger[_0xf43e('0x25')]('Ticket\x20created!');logger[_0xf43e('0x25')](_0xf43e('0x72'),_0x17eb46['id']);return setRelationship(_0x392ce7,_0x1ce50a,_0x17eb46,_0xf43e('0x61'));})[_0xf43e('0x2b')](function(){return setRelationship(_0x392ce7,_0x58a39d,_0x17eb46,'contacts');})['then'](function(){return getServerInfo(_0x392ce7);})[_0xf43e('0x2b')](function(_0x2972e8){var _0x5938a6=parseInt(_0x2972e8['version'][_0xf43e('0x73')](0x0));var _0xdc4208=util[_0xf43e('0x37')]('%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s',_0x107c9b[_0xf43e('0x53')],_0x17eb46['id']);if(_0x5938a6>0x6){_0xdc4208=util[_0xf43e('0x37')](_0xf43e('0x74'),_0x107c9b[_0xf43e('0x53')],_0x17eb46['id']);}logger[_0xf43e('0x25')]('[OUTBOUND]',_0xf43e('0x65'));emit(util[_0xf43e('0x37')](_0xf43e('0x66'),_0x1b3ccb[_0xf43e('0x29')]),_0xf43e('0x75'),{'uri':_0xdc4208});})[_0xf43e('0x67')](function(_0x56d03c){logger['error'](_0xf43e('0x6d'),JSON['stringify'](_0x56d03c));});};exports[_0xf43e('0x76')]=function(_0x130830,_0x454a95,_0x21a382,_0x5397cd,_0x6d6af7,_0x96ef57){var _0x24e319,_0x31fb17,_0x449fdc,_0x5616e1;_0x96ef57[_0xf43e('0x53')]=intUtil[_0xf43e('0x54')](_0x96ef57['remoteUri']);_0x96ef57[_0xf43e('0x55')]=intUtil[_0xf43e('0x54')](_0x96ef57['serverUrl']);def[_0xf43e('0x56')]=util[_0xf43e('0x37')](_0xf43e('0x6a'),_0x96ef57[_0xf43e('0x53')]);if(_0x6d6af7&&_0x6d6af7[_0xf43e('0x57')]){logger[_0xf43e('0x25')](_0xf43e('0x77'),_0xf43e('0x6e'));_0x454a95['recordingURL']=util[_0xf43e('0x37')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x96ef57[_0xf43e('0x55')],_0x454a95[_0xf43e('0x5b')],md5(_0x454a95[_0xf43e('0x5b')]));}else{_0x454a95[_0xf43e('0x59')]='';}return getConnection(_0x96ef57)[_0xf43e('0x2b')](function(_0x36d4be){_0x5616e1=_0x36d4be;if(!_[_0xf43e('0x24')](_0x5397cd)){return getUser(_0x96ef57,_0x5397cd[_0xf43e('0x29')],_0x5616e1);}else{return getUser(_0x96ef57,null,_0x5616e1);}})['then'](function(_0x3cc865){_0x24e319=_0x3cc865;logger['info']('The\x20User\x20ID\x20is:',_0x24e319['id']);return getEndUser(_0x96ef57,_0x454a95['calleridname'],_0x454a95[_0xf43e('0x78')],_0x5616e1);})[_0xf43e('0x2b')](function(_0xf3109c){_0x31fb17=_0xf3109c;logger[_0xf43e('0x25')](_0xf43e('0x5e'),_0x31fb17['id']);return getTicket(_0x96ef57,_0x24e319,_0x31fb17,_0x21a382,_0x454a95,_0x21a382['Fields'],_0x5616e1,'Inbound');})['then'](function(_0x305bac){_0x449fdc=_0x305bac;logger[_0xf43e('0x25')]('Ticket\x20created!');logger[_0xf43e('0x25')](_0xf43e('0x72'),_0x449fdc['id']);return setRelationship(_0x5616e1,_0x24e319,_0x449fdc,'users');})[_0xf43e('0x2b')](function(){return setRelationship(_0x5616e1,_0x31fb17,_0x449fdc,_0xf43e('0x62'));})[_0xf43e('0x2b')](function(){return getServerInfo(_0x5616e1);})[_0xf43e('0x67')](function(_0x3f74ef){logger['error'](_0xf43e('0x77'),JSON[_0xf43e('0x1f')](_0x3f74ef));});};
\ No newline at end of file
+var _0x1f19=['toLowerCase','username','password','PLAIN','xCALLY\x20Motion\x20integration','sessionID','Account\x20%d\x20is\x20not\x20valid','set_relationship','queue','remoteUri','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','Fields','Inbound','Ticket\x20created!','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','error','outbound','recordingFormat','none','[OUTBOUND]','recordingURL','catch','abandoned','%s/service/v4_1/rest.php','[ABANDONED]','isNil','lodash','request-promise','bluebird','util','ioredis','../../../../config/environment','../../../../config/logger','sugarcrm','defaults','localhost','socket.io-emitter','redis','POST','emit','info','name','getString','Subjects','assigned_user_id','created_by','description','Descriptions','slice','replace','duration_hours','duration_minutes','parent_id','parent_type','Contacts','parent_name','direction','length','forEach','set_entry','Calls','format','Basic\x20%s','apiKey','JSON','stringify','get_entry_list','Employees','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','user_name','entry_list','find','name_value_list','value','Agent\x20found!','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_id','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','then','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','first_name','Caller\x20-\x20%s','Enduser\x20created.','debug','[HTTP]','merge','map','type','string','nameField','customField','content','toString','idField','custom_fields','push','variable','customVariable','Variable'];(function(_0x300669,_0x52e15c){var _0x331026=function(_0x557277){while(--_0x557277){_0x300669['push'](_0x300669['shift']());}};_0x331026(++_0x52e15c);}(_0x1f19,0xa2));var _0x91f1=function(_0x381fe5,_0x1827a1){_0x381fe5=_0x381fe5-0x0;var _0x7f76cc=_0x1f19[_0x381fe5];return _0x7f76cc;};'use strict';var _=require(_0x91f1('0x0'));var rp=require(_0x91f1('0x1'));var BPromise=require(_0x91f1('0x2'));var md5=require('md5');var util=require(_0x91f1('0x3'));var Redis=require(_0x91f1('0x4'));var intUtil=require('./util');var config=require(_0x91f1('0x5'));var logger=require(_0x91f1('0x6'))(_0x91f1('0x7'));config['redis']=_[_0x91f1('0x8')](config['redis'],{'host':_0x91f1('0x9'),'port':0x18eb});var io=require(_0x91f1('0xa'))(new Redis(config[_0x91f1('0xb')]));var def={'method':_0x91f1('0xc'),'json':!![]};function emit(_0x2150ef,_0x4f974a,_0x1817cd){io['to'](_0x2150ef)[_0x91f1('0xd')](_0x4f974a,_0x1817cd);}function getTicket(_0x30a7e7,_0x5f4633,_0x10d509,_0x8dbb9c,_0x50a70f,_0x21cdf0,_0x586baf,_0x182aa8){logger[_0x91f1('0xe')]('Creating\x20new\x20ticket...');var _0x3b3481=new Date();var _0x30f60d=[{'name':_0x91f1('0xf'),'value':intUtil[_0x91f1('0x10')](_0x8dbb9c[_0x91f1('0x11')],_0x50a70f,'\x20')},{'name':_0x91f1('0x12'),'value':_0x5f4633['id']},{'name':_0x91f1('0x13'),'value':_0x5f4633['id']},{'name':_0x91f1('0x14'),'value':intUtil['getString'](_0x8dbb9c[_0x91f1('0x15')],_0x50a70f,'\x0a')},{'name':'date_start','value':_0x3b3481['toISOString']()[_0x91f1('0x16')](0x0,0x13)[_0x91f1('0x17')]('T','\x20')},{'name':_0x91f1('0x18'),'value':'0'},{'name':_0x91f1('0x19'),'value':'15'},{'name':_0x91f1('0x1a'),'value':_0x10d509['id']},{'name':_0x91f1('0x1b'),'value':_0x91f1('0x1c')},{'name':_0x91f1('0x1d'),'value':_0x10d509[_0x91f1('0xf')]},{'name':_0x91f1('0x1e'),'value':_0x182aa8}];if(_0x21cdf0[_0x91f1('0x1f')]){_[_0x91f1('0x20')](_0x21cdf0,function(_0x4ada06){if(_0x50a70f[_0x4ada06['variableName']]){_0x30f60d['push']({'name':_0x4ada06['idField'],'value':_0x50a70f[_0x4ada06['variableName']]});}});}return request({'form':{'method':_0x91f1('0x21'),'input_type':'JSON','response_type':'JSON','rest_data':JSON['stringify']({'session':_0x586baf['id'],'module_name':_0x91f1('0x22'),'name_value_list':_0x30f60d})}});}function getAuth(_0x7e492e){return util[_0x91f1('0x23')](_0x91f1('0x24'),new Buffer(_0x7e492e[_0x91f1('0x25')]+':X')['toString']('base64'));}function getServerInfo(_0x564c20){return request({'form':{'method':'get_server_info','input_type':_0x91f1('0x26'),'response_type':_0x91f1('0x26'),'rest_data':JSON[_0x91f1('0x27')]({'session':_0x564c20['id']})}});}function getUser(_0x16b27f,_0x25d113,_0x141fda){if(!_['isNil'](_0x25d113)){logger[_0x91f1('0xe')]('Getting\x20agent\x20with\x20name',_0x25d113);return request({'form':{'method':_0x91f1('0x28'),'input_type':_0x91f1('0x26'),'response_type':_0x91f1('0x26'),'rest_data':JSON['stringify']({'session':_0x141fda['id'],'module_name':_0x91f1('0x29'),'query':util[_0x91f1('0x23')](_0x91f1('0x2a'),_0x25d113),'order_by':'','offset':'0','select_fields':['id',_0x91f1('0xf'),_0x91f1('0x2b')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x2c1a0a){if(_0x2c1a0a[_0x91f1('0x2c')][_0x91f1('0x1f')]){var _0x559c11=_[_0x91f1('0x2d')](_0x2c1a0a[_0x91f1('0x2c')],function(_0x4a0e5e){return _0x4a0e5e[_0x91f1('0x2e')][_0x91f1('0x2b')][_0x91f1('0x2f')]===_0x25d113;});if(_0x559c11){logger['info'](_0x91f1('0x30'));return BPromise[_0x91f1('0x31')]({'id':_0x559c11['name_value_list']['id'][_0x91f1('0x2f')],'name':_0x559c11[_0x91f1('0x2e')][_0x91f1('0xf')][_0x91f1('0x2f')]});}}logger['info'](_0x91f1('0x32'));return BPromise['resolve']({'id':_0x141fda[_0x91f1('0x2e')][_0x91f1('0x33')]['value'],'name':_0x141fda['name_value_list'][_0x91f1('0x2b')]['value']});});}else{logger[_0x91f1('0xe')](_0x91f1('0x34'));return BPromise[_0x91f1('0x31')]({'id':_0x141fda[_0x91f1('0x2e')]['user_id']['value'],'name':_0x141fda[_0x91f1('0x2e')][_0x91f1('0x2b')][_0x91f1('0x2f')]});}}function getEndUser(_0xeeb37c,_0x248d51,_0x531894,_0x40c86e){logger[_0x91f1('0xe')](_0x91f1('0x35'),_0x531894);return request({'form':{'method':_0x91f1('0x28'),'input_type':_0x91f1('0x26'),'response_type':_0x91f1('0x26'),'rest_data':JSON['stringify']({'session':_0x40c86e['id'],'module_name':_0x91f1('0x1c'),'query':util[_0x91f1('0x23')](_0x91f1('0x36'),_0x531894),'order_by':'','offset':'0','select_fields':['id',_0x91f1('0xf'),_0x91f1('0x37')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x91f1('0x38')](function(_0x51e13f){if(_0x51e13f['entry_list'][_0x91f1('0x1f')]){var _0x3f2dce=_[_0x91f1('0x2d')](_0x51e13f['entry_list'],function(_0x3fb168){return _0x3fb168[_0x91f1('0x2e')][_0x91f1('0x37')][_0x91f1('0x2f')]===_0x531894;});if(_0x3f2dce){logger[_0x91f1('0xe')](_0x91f1('0x39'));return BPromise[_0x91f1('0x31')]({'id':_0x3f2dce[_0x91f1('0x2e')]['id'][_0x91f1('0x2f')],'name':_0x3f2dce[_0x91f1('0x2e')]['name'][_0x91f1('0x2f')],'phone':_0x3f2dce[_0x91f1('0x2e')][_0x91f1('0x37')]['value']});}}else{logger[_0x91f1('0xe')](_0x91f1('0x3a'));return request({'form':{'method':'set_entry','input_type':_0x91f1('0x26'),'response_type':_0x91f1('0x26'),'rest_data':JSON[_0x91f1('0x27')]({'session':_0x40c86e['id'],'module_name':_0x91f1('0x1c'),'name_value_list':[{'name':_0x91f1('0x3b'),'value':_0x248d51!==''?_0x248d51:util[_0x91f1('0x23')](_0x91f1('0x3c'),_0x531894)},{'name':_0x91f1('0x37'),'value':_0x531894}]})}})[_0x91f1('0x38')](function(_0x34268c){logger['info'](_0x91f1('0x3d'));return BPromise[_0x91f1('0x31')]({'id':_0x34268c['id'],'name':_0x34268c[_0x91f1('0x2c')][_0x91f1('0x3b')]['value'],'phone':_0x34268c[_0x91f1('0x2c')][_0x91f1('0x37')][_0x91f1('0x2f')]});});}});}function request(_0x1c5e0d){logger[_0x91f1('0x3e')](_0x91f1('0x3f'),JSON[_0x91f1('0x27')](_0x1c5e0d));return rp(_[_0x91f1('0x40')](def,_0x1c5e0d));}function getTags(_0x3bd6b1,_0x176dea){var _0x3ac793=[];if(_0x3bd6b1&&_0x3bd6b1[_0x91f1('0x1f')]>0x0){_0x3ac793=_[_0x91f1('0x41')](_0x3bd6b1,_0x176dea);}return _0x3ac793;}function getCustomFields(_0x577359,_0x9d3e7b){var _0x2ab141=[];var _0x4704e1={'custom_fields':[]};if(_0x577359[_0x91f1('0x1f')]>0x0){_[_0x91f1('0x20')](_0x577359,function(_0xaa9ebd){if(_0xaa9ebd[_0x91f1('0x42')]===_0x91f1('0x43')&&_0xaa9ebd[_0x91f1('0x44')]&&!_0xaa9ebd[_0x91f1('0x45')]){_0x4704e1[_0xaa9ebd[_0x91f1('0x44')]['toLowerCase']()]=_0xaa9ebd[_0x91f1('0x46')][_0x91f1('0x47')]();}else if(_0xaa9ebd[_0x91f1('0x42')]==='string'&&_0xaa9ebd[_0x91f1('0x48')]&&_0xaa9ebd[_0x91f1('0x45')]){_0x4704e1[_0x91f1('0x49')][_0x91f1('0x4a')]({'id':_0xaa9ebd[_0x91f1('0x48')],'value':_0xaa9ebd['content'][_0x91f1('0x47')]()});}else if(_0xaa9ebd[_0x91f1('0x42')]===_0x91f1('0x4b')&&_0xaa9ebd['variableName']&&_0xaa9ebd['idField']&&_0xaa9ebd['customField']){_0x9d3e7b[_0xaa9ebd['variableName']]&&_0x4704e1[_0x91f1('0x49')][_0x91f1('0x4a')]({'id':_0xaa9ebd[_0x91f1('0x48')],'value':_0x9d3e7b[_0xaa9ebd['variableName']]['toString']()});}else if(_0xaa9ebd[_0x91f1('0x42')]===_0x91f1('0x4c')&&_0xaa9ebd[_0x91f1('0x4d')]&&_0xaa9ebd[_0x91f1('0x4d')]['name']&&_0xaa9ebd[_0x91f1('0x48')]&&_0xaa9ebd[_0x91f1('0x45')]){_0x9d3e7b[_0xaa9ebd[_0x91f1('0x4d')][_0x91f1('0xf')][_0x91f1('0x4e')]()]&&_0x4704e1[_0x91f1('0x49')][_0x91f1('0x4a')]({'id':_0xaa9ebd[_0x91f1('0x48')],'value':_0x9d3e7b[_0xaa9ebd[_0x91f1('0x4d')]['name'][_0x91f1('0x4e')]()]['toString']()});}});}return _0x4704e1;}function getConnection(_0x379371){return request({'method':_0x91f1('0xc'),'form':{'method':'login','input_type':'JSON','response_type':_0x91f1('0x26'),'rest_data':JSON[_0x91f1('0x27')]({'user_auth':{'user_name':_0x379371[_0x91f1('0x4f')],'password':_0x379371[_0x91f1('0x50')],'encryption':_0x91f1('0x51')},'application':_0x91f1('0x52')})}})[_0x91f1('0x38')](function(_0x3c08b7){var _0x2419e5=_0x3c08b7;if(_0x2419e5['id']){def[_0x91f1('0x53')]=_0x2419e5['id'];return BPromise[_0x91f1('0x31')](_0x2419e5);}else{throw new Error(util['format'](_0x91f1('0x54'),_0x379371['id']));}});}function setRelationship(_0x157e03,_0x31fd9e,_0xfeb487,_0x2d8ba7){return request({'form':{'method':_0x91f1('0x55'),'input_type':'JSON','response_type':_0x91f1('0x26'),'rest_data':JSON['stringify']({'session':_0x157e03['id'],'module_name':_0x91f1('0x22'),'module_id':_0xfeb487['id'],'link_field_name':_0x2d8ba7,'related_ids':[_0x31fd9e['id']]})}});}exports[_0x91f1('0x56')]=function(_0x4134bd,_0x305160,_0x4209fa,_0x636897,_0x22335d,_0x3b0b4c){var _0xfe3d89,_0x37770b,_0x244bf3,_0x38b879;_0x3b0b4c[_0x91f1('0x57')]=intUtil[_0x91f1('0x58')](_0x3b0b4c[_0x91f1('0x57')]);_0x3b0b4c[_0x91f1('0x59')]=intUtil[_0x91f1('0x58')](_0x3b0b4c['serverUrl']);def['uri']=util[_0x91f1('0x23')]('%s/service/v4_1/rest.php',_0x3b0b4c['remoteUri']);if(_0x22335d&&_0x22335d[_0x91f1('0x5a')]){logger[_0x91f1('0xe')](_0x91f1('0x5b'),_0x91f1('0x5c'));_0x305160['recordingURL']=util['format'](_0x91f1('0x5d'),_0x3b0b4c['serverUrl'],_0x305160[_0x91f1('0x5e')],md5(_0x305160[_0x91f1('0x5e')]));}else{_0x305160['recordingURL']='';}return getConnection(_0x3b0b4c)[_0x91f1('0x38')](function(_0x506d39){_0x38b879=_0x506d39;return getUser(_0x3b0b4c,_0x636897['name'],_0x38b879);})[_0x91f1('0x38')](function(_0x55c249){_0xfe3d89=_0x55c249;logger['info'](_0x91f1('0x5f'),_0xfe3d89['id']);return getEndUser(_0x3b0b4c,_0x305160[_0x91f1('0x60')],_0x305160[_0x91f1('0x61')],_0x38b879);})[_0x91f1('0x38')](function(_0x575a0e){_0x37770b=_0x575a0e;logger[_0x91f1('0xe')]('The\x20Enduser\x20ID\x20is:',_0x37770b['id']);return getTicket(_0x3b0b4c,_0xfe3d89,_0x37770b,_0x4209fa,_0x305160,_0x4209fa[_0x91f1('0x62')],_0x38b879,_0x91f1('0x63'));})[_0x91f1('0x38')](function(_0x331b01){_0x244bf3=_0x331b01;logger['info'](_0x91f1('0x64'));logger[_0x91f1('0xe')]('The\x20Ticket\x20ID\x20is:',_0x244bf3['id']);return setRelationship(_0x38b879,_0xfe3d89,_0x244bf3,_0x91f1('0x65'));})[_0x91f1('0x38')](function(){return setRelationship(_0x38b879,_0x37770b,_0x244bf3,_0x91f1('0x66'));})[_0x91f1('0x38')](function(){return getServerInfo(_0x38b879);})[_0x91f1('0x38')](function(_0x57a408){var _0x54de9f=parseInt(_0x57a408[_0x91f1('0x67')][_0x91f1('0x68')](0x0));var _0x1607df=util[_0x91f1('0x23')](_0x91f1('0x69'),_0x3b0b4c[_0x91f1('0x57')],_0x244bf3['id']);if(_0x54de9f>0x6){_0x1607df=util[_0x91f1('0x23')](_0x91f1('0x6a'),_0x3b0b4c[_0x91f1('0x57')],_0x244bf3['id']);}logger[_0x91f1('0xe')](_0x91f1('0x5b'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x91f1('0x23')](_0x91f1('0x6b'),_0x636897[_0x91f1('0xf')]),_0x91f1('0x6c'),{'uri':_0x1607df});})['catch'](function(_0x2ad2c4){logger[_0x91f1('0x6d')]('[QUEUE]',JSON[_0x91f1('0x27')](_0x2ad2c4));});};exports[_0x91f1('0x6e')]=function(_0x13f635,_0x38b6e3,_0x40639b,_0xe20bff,_0x183781,_0x34b435,_0x263a36){var _0x26e427,_0x2849d7,_0x4171ef,_0x5f1431;_0x34b435[_0x91f1('0x57')]=intUtil['stripTrailingSlash'](_0x34b435[_0x91f1('0x57')]);_0x34b435[_0x91f1('0x59')]=intUtil[_0x91f1('0x58')](_0x34b435[_0x91f1('0x59')]);def['uri']=util[_0x91f1('0x23')]('%s/service/v4_1/rest.php',_0x34b435[_0x91f1('0x57')]);if(_0x263a36&&_0x263a36[_0x91f1('0x6f')]&&_0x263a36[_0x91f1('0x6f')]!==_0x91f1('0x70')){logger['info'](_0x91f1('0x71'),_0x91f1('0x5c'));_0x38b6e3[_0x91f1('0x72')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x34b435[_0x91f1('0x59')],_0x38b6e3[_0x91f1('0x5e')],md5(_0x38b6e3[_0x91f1('0x5e')]));}return getConnection(_0x34b435)['then'](function(_0x526d16){_0x5f1431=_0x526d16;return getUser(_0x34b435,_0xe20bff[_0x91f1('0xf')],_0x5f1431);})[_0x91f1('0x38')](function(_0x3f3368){_0x26e427=_0x3f3368;logger[_0x91f1('0xe')](_0x91f1('0x5f'),_0x26e427['id']);return getEndUser(_0x34b435,_0x38b6e3['destcalleridname'],_0x38b6e3['destcalleridnum'],_0x5f1431);})[_0x91f1('0x38')](function(_0x5753c9){_0x2849d7=_0x5753c9;logger['info']('The\x20Enduser\x20ID\x20is:',_0x2849d7['id']);return getTicket(_0x34b435,_0x26e427,_0x2849d7,_0x40639b,_0x38b6e3,_0x40639b[_0x91f1('0x62')],_0x5f1431,'Outbound');})[_0x91f1('0x38')](function(_0x56923e){_0x4171ef=_0x56923e;logger[_0x91f1('0xe')](_0x91f1('0x64'));logger[_0x91f1('0xe')]('The\x20Ticket\x20ID\x20is:',_0x4171ef['id']);return setRelationship(_0x5f1431,_0x26e427,_0x4171ef,_0x91f1('0x65'));})[_0x91f1('0x38')](function(){return setRelationship(_0x5f1431,_0x2849d7,_0x4171ef,_0x91f1('0x66'));})[_0x91f1('0x38')](function(){return getServerInfo(_0x5f1431);})[_0x91f1('0x38')](function(_0x462a64){var _0x5ecee4=parseInt(_0x462a64[_0x91f1('0x67')]['charAt'](0x0));var _0x3d70b0=util[_0x91f1('0x23')](_0x91f1('0x69'),_0x34b435[_0x91f1('0x57')],_0x4171ef['id']);if(_0x5ecee4>0x6){_0x3d70b0=util[_0x91f1('0x23')](_0x91f1('0x6a'),_0x34b435[_0x91f1('0x57')],_0x4171ef['id']);}logger[_0x91f1('0xe')]('[OUTBOUND]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util['format'](_0x91f1('0x6b'),_0xe20bff['name']),_0x91f1('0x6c'),{'uri':_0x3d70b0});})[_0x91f1('0x73')](function(_0x535917){logger[_0x91f1('0x6d')](_0x91f1('0x71'),JSON[_0x91f1('0x27')](_0x535917));});};exports[_0x91f1('0x74')]=function(_0xb001ef,_0xc47c70,_0x51b8f7,_0x552bf5,_0x4d4022,_0x1e4854){var _0x249984,_0x112564,_0x2e2657,_0x295132;_0x1e4854[_0x91f1('0x57')]=intUtil[_0x91f1('0x58')](_0x1e4854[_0x91f1('0x57')]);_0x1e4854[_0x91f1('0x59')]=intUtil[_0x91f1('0x58')](_0x1e4854['serverUrl']);def['uri']=util[_0x91f1('0x23')](_0x91f1('0x75'),_0x1e4854['remoteUri']);if(_0x4d4022&&_0x4d4022['monitor_format']){logger[_0x91f1('0xe')](_0x91f1('0x76'),'Recording\x20is\x20enabled!');_0xc47c70[_0x91f1('0x72')]=util[_0x91f1('0x23')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x1e4854[_0x91f1('0x59')],_0xc47c70[_0x91f1('0x5e')],md5(_0xc47c70[_0x91f1('0x5e')]));}else{_0xc47c70['recordingURL']='';}return getConnection(_0x1e4854)[_0x91f1('0x38')](function(_0x27246e){_0x295132=_0x27246e;if(!_[_0x91f1('0x77')](_0x552bf5)){return getUser(_0x1e4854,_0x552bf5[_0x91f1('0xf')],_0x295132);}else{return getUser(_0x1e4854,null,_0x295132);}})[_0x91f1('0x38')](function(_0x171768){_0x249984=_0x171768;logger[_0x91f1('0xe')]('The\x20User\x20ID\x20is:',_0x249984['id']);return getEndUser(_0x1e4854,_0xc47c70['calleridname'],_0xc47c70[_0x91f1('0x61')],_0x295132);})[_0x91f1('0x38')](function(_0x1fc29e){_0x112564=_0x1fc29e;logger['info']('The\x20Enduser\x20ID\x20is:',_0x112564['id']);return getTicket(_0x1e4854,_0x249984,_0x112564,_0x51b8f7,_0xc47c70,_0x51b8f7['Fields'],_0x295132,'Inbound');})[_0x91f1('0x38')](function(_0x566bb0){_0x2e2657=_0x566bb0;logger[_0x91f1('0xe')](_0x91f1('0x64'));logger[_0x91f1('0xe')]('The\x20Ticket\x20ID\x20is:',_0x2e2657['id']);return setRelationship(_0x295132,_0x249984,_0x2e2657,_0x91f1('0x65'));})[_0x91f1('0x38')](function(){return setRelationship(_0x295132,_0x112564,_0x2e2657,_0x91f1('0x66'));})[_0x91f1('0x38')](function(){return getServerInfo(_0x295132);})[_0x91f1('0x73')](function(_0x4eb9fa){logger[_0x91f1('0x6d')]('[ABANDONED]',JSON['stringify'](_0x4eb9fa));});};
\ 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 23fa6b9..101e3a6 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 _0x6fea=['variableName','toString','customVariable','Variable','name','toLowerCase','keyValue','key','format','%s:\x20%s','keyContent','keyType','join','stripTrailingSlash','slice','substring','lastIndexOf','validateEmail','isNil','test','lodash','util','length','sortBy','type','string','push','variable'];(function(_0x315d84,_0x77cb2){var _0x1f5d4a=function(_0x3f9650){while(--_0x3f9650){_0x315d84['push'](_0x315d84['shift']());}};_0x1f5d4a(++_0x77cb2);}(_0x6fea,0x180));var _0xa6fe=function(_0x4513e8,_0x16f480){_0x4513e8=_0x4513e8-0x0;var _0x1e8758=_0x6fea[_0x4513e8];return _0x1e8758;};'use strict';var _=require(_0xa6fe('0x0'));var util=require(_0xa6fe('0x1'));exports['getString']=function(_0x25f127,_0x24c492,_0x10e868){var _0x414388=[];if(_0x25f127[_0xa6fe('0x2')]>0x0){var _0x2ab187=_[_0xa6fe('0x3')](_0x25f127,['id']);for(var _0x382161=0x0;_0x382161<_0x2ab187[_0xa6fe('0x2')];_0x382161++){var _0x109be9=_0x2ab187[_0x382161];if(_0x109be9[_0xa6fe('0x4')]===_0xa6fe('0x5')){_0x414388[_0xa6fe('0x6')](_0x109be9['content']);}else if(_0x109be9[_0xa6fe('0x4')]===_0xa6fe('0x7')&&_0x109be9[_0xa6fe('0x8')]){_0x24c492[_0x109be9[_0xa6fe('0x8')]]&&_0x414388[_0xa6fe('0x6')](_0x24c492[_0x109be9[_0xa6fe('0x8')]][_0xa6fe('0x9')]());}else if(_0x109be9[_0xa6fe('0x4')]===_0xa6fe('0xa')&&_0x109be9['Variable']&&_0x109be9[_0xa6fe('0xb')][_0xa6fe('0xc')]){_0x24c492[_0x109be9['Variable']['name']['toLowerCase']()]&&_0x414388[_0xa6fe('0x6')](_0x24c492[_0x109be9[_0xa6fe('0xb')][_0xa6fe('0xc')][_0xa6fe('0xd')]()]['toString']());}else if(_0x109be9[_0xa6fe('0x4')]===_0xa6fe('0xe')){if(_0x109be9['keyType']===_0xa6fe('0x5')&&_0x109be9[_0xa6fe('0xf')]){_0x414388[_0xa6fe('0x6')](util[_0xa6fe('0x10')](_0xa6fe('0x11'),_0x109be9[_0xa6fe('0xf')],_0x109be9[_0xa6fe('0x12')]));}else if(_0x109be9[_0xa6fe('0x13')]===_0xa6fe('0x7')&&_0x109be9[_0xa6fe('0x8')]&&_0x109be9[_0xa6fe('0xf')]){_0x24c492[_0x109be9[_0xa6fe('0x8')]]&&_0x414388[_0xa6fe('0x6')](util[_0xa6fe('0x10')](_0xa6fe('0x11'),_0x109be9[_0xa6fe('0xf')],_0x24c492[_0x109be9['variableName']]));}else if(_0x109be9[_0xa6fe('0x13')]===_0xa6fe('0xa')&&_0x109be9['Variable']&&_0x109be9['Variable'][_0xa6fe('0xc')]&&_0x109be9[_0xa6fe('0xf')]){_0x24c492[_0x109be9['Variable'][_0xa6fe('0xc')][_0xa6fe('0xd')]()]&&_0x414388[_0xa6fe('0x6')](util[_0xa6fe('0x10')](_0xa6fe('0x11'),_0x109be9[_0xa6fe('0xf')],_0x24c492[_0x109be9[_0xa6fe('0xb')][_0xa6fe('0xc')][_0xa6fe('0xd')]()]));}}}}return _0x414388[_0xa6fe('0x14')](_0x10e868);};exports[_0xa6fe('0x15')]=function(_0x27b2fc){var _0x274b56=_0x27b2fc[_0xa6fe('0x16')](-0x1);if(_0x274b56==='/'){_0x27b2fc=_0x27b2fc[_0xa6fe('0x17')](0x0,_0x27b2fc[_0xa6fe('0x18')](_0x274b56));}return _0x27b2fc;};exports[_0xa6fe('0x19')]=function(_0x1e3042){if(!_[_0xa6fe('0x1a')](_0x1e3042)&&_0x1e3042!==''){var _0x27bb30=/^(([^<>()\[\]\\.,;:\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 _0x27bb30[_0xa6fe('0x1b')](String(_0x1e3042)[_0xa6fe('0xd')]());}else{return![];}};
\ No newline at end of file
+var _0xf23e=['string','push','content','variableName','toString','customVariable','Variable','name','keyValue','keyType','key','keyContent','format','%s:\x20%s','stripTrailingSlash','slice','substring','lastIndexOf','validateEmail','isNil','test','toLowerCase','lodash','util','getString','type'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xf23e,0x11a));var _0xef23=function(_0x5a3cf0,_0x160a68){_0x5a3cf0=_0x5a3cf0-0x0;var _0x5a64ee=_0xf23e[_0x5a3cf0];return _0x5a64ee;};'use strict';var _=require(_0xef23('0x0'));var util=require(_0xef23('0x1'));exports[_0xef23('0x2')]=function(_0xf5b614,_0x3ba49f,_0x899e2f){var _0x1416fb=[];if(_0xf5b614['length']>0x0){var _0x2b33ed=_['sortBy'](_0xf5b614,['id']);for(var _0xecc67f=0x0;_0xecc67f<_0x2b33ed['length'];_0xecc67f++){var _0x95ae1a=_0x2b33ed[_0xecc67f];if(_0x95ae1a[_0xef23('0x3')]===_0xef23('0x4')){_0x1416fb[_0xef23('0x5')](_0x95ae1a[_0xef23('0x6')]);}else if(_0x95ae1a[_0xef23('0x3')]==='variable'&&_0x95ae1a[_0xef23('0x7')]){_0x3ba49f[_0x95ae1a[_0xef23('0x7')]]&&_0x1416fb['push'](_0x3ba49f[_0x95ae1a[_0xef23('0x7')]][_0xef23('0x8')]());}else if(_0x95ae1a[_0xef23('0x3')]===_0xef23('0x9')&&_0x95ae1a['Variable']&&_0x95ae1a[_0xef23('0xa')][_0xef23('0xb')]){_0x3ba49f[_0x95ae1a['Variable'][_0xef23('0xb')]['toLowerCase']()]&&_0x1416fb['push'](_0x3ba49f[_0x95ae1a['Variable']['name']['toLowerCase']()][_0xef23('0x8')]());}else if(_0x95ae1a[_0xef23('0x3')]===_0xef23('0xc')){if(_0x95ae1a[_0xef23('0xd')]===_0xef23('0x4')&&_0x95ae1a[_0xef23('0xe')]){_0x1416fb[_0xef23('0x5')](util['format']('%s:\x20%s',_0x95ae1a[_0xef23('0xe')],_0x95ae1a[_0xef23('0xf')]));}else if(_0x95ae1a['keyType']==='variable'&&_0x95ae1a[_0xef23('0x7')]&&_0x95ae1a[_0xef23('0xe')]){_0x3ba49f[_0x95ae1a['variableName']]&&_0x1416fb[_0xef23('0x5')](util[_0xef23('0x10')]('%s:\x20%s',_0x95ae1a[_0xef23('0xe')],_0x3ba49f[_0x95ae1a['variableName']]));}else if(_0x95ae1a[_0xef23('0xd')]===_0xef23('0x9')&&_0x95ae1a[_0xef23('0xa')]&&_0x95ae1a['Variable']['name']&&_0x95ae1a[_0xef23('0xe')]){_0x3ba49f[_0x95ae1a[_0xef23('0xa')][_0xef23('0xb')]['toLowerCase']()]&&_0x1416fb[_0xef23('0x5')](util[_0xef23('0x10')](_0xef23('0x11'),_0x95ae1a[_0xef23('0xe')],_0x3ba49f[_0x95ae1a['Variable'][_0xef23('0xb')]['toLowerCase']()]));}}}}return _0x1416fb['join'](_0x899e2f);};exports[_0xef23('0x12')]=function(_0x3463d8){var _0xa3a2ae=_0x3463d8[_0xef23('0x13')](-0x1);if(_0xa3a2ae==='/'){_0x3463d8=_0x3463d8[_0xef23('0x14')](0x0,_0x3463d8[_0xef23('0x15')](_0xa3a2ae));}return _0x3463d8;};exports[_0xef23('0x16')]=function(_0x3f46bd){if(!_[_0xef23('0x17')](_0x3f46bd)&&_0x3f46bd!==''){var _0x225a63=/^(([^<>()\[\]\\.,;:\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 _0x225a63[_0xef23('0x18')](String(_0x3f46bd)[_0xef23('0x19')]());}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 7da21a4..ddeff3b 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 _0x008c=['util','./util','../../../../config/environment','../../../../config/logger','vTiger','redis','defaults','localhost','socket.io-emitter','type','string','idField','content','toString','variable','variableName','customVariable','Variable','name','toLowerCase','merge','Descriptions','POST','format','%s/webservice.php','remoteUri','username','stringify','then','success','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','error','catch','createTicket','validateEmail','info','Getting\x20agent\x20with\x20email','sessionName','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','result','length','Agent\x20found!','resolve','email1','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','admin','statusCode','[vTiger],\x20%s,\x20%s,\x20%s','getUser','Searching\x20end\x20user\x20with\x20phone','GET','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;','firstname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','create','Contacts','Enduser\x20created.','lastname','phone','getEndUser','getchallenge','token','Account\x20%d\x20is\x20not\x20valid','[HTTP]','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','serverUrl','uniqueid','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','split','trigger:browser:url','outbound','stripTrailingSlash','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','Fields','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','abandoned','[ABANDONED]','lodash','request-promise','bluebird','md5'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x008c,0x188));var _0xc008=function(_0x218479,_0x4fb190){_0x218479=_0x218479-0x0;var _0x3b67a0=_0x008c[_0x218479];return _0x3b67a0;};'use strict';var _=require(_0xc008('0x0'));var rp=require(_0xc008('0x1'));var BPromise=require(_0xc008('0x2'));var md5=require(_0xc008('0x3'));var util=require(_0xc008('0x4'));var Redis=require('ioredis');var intUtil=require(_0xc008('0x5'));var config=require(_0xc008('0x6'));var logger=require(_0xc008('0x7'))(_0xc008('0x8'));config[_0xc008('0x9')]=_[_0xc008('0xa')](config[_0xc008('0x9')],{'host':_0xc008('0xb'),'port':0x18eb});var io=require(_0xc008('0xc'))(new Redis(config['redis']));function emit(_0x428fa9,_0x5aa09b,_0x30be38){io['to'](_0x428fa9)['emit'](_0x5aa09b,_0x30be38);}function getCustomFields(_0x52041f,_0x27830d){var _0x7231b4={};if(_0x52041f['length']>0x0){_['forEach'](_0x52041f,function(_0x543eb8){if(_0x543eb8[_0xc008('0xd')]===_0xc008('0xe')&&_0x543eb8['idField']){_0x7231b4[_0x543eb8[_0xc008('0xf')]]=_0x543eb8[_0xc008('0x10')][_0xc008('0x11')]();}else if(_0x543eb8[_0xc008('0xd')]===_0xc008('0x12')&&_0x543eb8[_0xc008('0x13')]&&_0x543eb8[_0xc008('0xf')]&&_0x27830d[_0x543eb8['variableName']]){_0x7231b4[_0x543eb8['idField']]=_0x27830d[_0x543eb8[_0xc008('0x13')]]['toString']();}else if(_0x543eb8[_0xc008('0xd')]===_0xc008('0x14')&&_0x543eb8[_0xc008('0x15')]&&_0x543eb8[_0xc008('0x15')][_0xc008('0x16')]&&_0x543eb8['idField']&&_0x27830d[_0x543eb8['Variable']['name'][_0xc008('0x17')]()]){_0x7231b4[_0x543eb8[_0xc008('0xf')]]=_0x27830d[_0x543eb8[_0xc008('0x15')][_0xc008('0x16')]['toLowerCase']()]['toString']();}});}return _0x7231b4;}function createTicket(_0x540e45,_0x5c2668,_0x46042b,_0x462af5,_0x501137,_0x813397,_0x5906e6){logger['info']('Creating\x20new\x20ticket...');var _0x50261c=_[_0xc008('0x18')]({'parent_id':'','assigned_user_id':_0x5c2668['id'],'ticketpriorities':'Normal','ticketstatus':'Open','ticket_title':intUtil['getString'](_0x462af5['Subjects'],_0x501137,'\x20'),'description':intUtil['getString'](_0x462af5[_0xc008('0x19')],_0x501137,'\x0a'),'contact_id':_0x46042b['id']},getCustomFields(_0x813397,_0x501137));var _0x4777a6={'method':_0xc008('0x1a'),'uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x540e45[_0xc008('0x1d')]),'form':{'operation':'create','username':_0x540e45[_0xc008('0x1e')],'sessionName':_0x5906e6['sessionName'],'elementType':'HelpDesk','element':JSON[_0xc008('0x1f')](_0x50261c)},'json':!![]};return request(_0x4777a6)[_0xc008('0x20')](function(_0x2e3cfb){if(_0x2e3cfb[_0xc008('0x21')]){return BPromise['resolve']({'id':_0x2e3cfb['result']['id']});}else{throw new Error(util['format'](_0xc008('0x22'),JSON[_0xc008('0x1f')](_0x2e3cfb[_0xc008('0x23')])));}})[_0xc008('0x24')](function(_0x5bebd9){var _0x5e2aca=_0x5bebd9['statusCode']||0x1f4;logger['error']('[vTiger],\x20%s,\x20%s,\x20%s',_0xc008('0x25'),_0x5e2aca,JSON[_0xc008('0x1f')](_0x5bebd9));});}function getUser(_0x25eae4,_0x529961,_0x24c14c){if(intUtil[_0xc008('0x26')](_0x529961)){logger[_0xc008('0x27')](_0xc008('0x28'),_0x529961);return request({'method':'GET','uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x25eae4['remoteUri']),'qs':{'operation':'query','username':_0x25eae4['username'],'sessionName':_0x24c14c[_0xc008('0x29')],'query':util[_0xc008('0x1b')](_0xc008('0x2a'),_0x529961)},'json':!![]})[_0xc008('0x20')](function(_0x1de04b){if(_0x1de04b[_0xc008('0x21')]&&_0x1de04b[_0xc008('0x2b')][_0xc008('0x2c')]){logger[_0xc008('0x27')](_0xc008('0x2d'));return BPromise[_0xc008('0x2e')]({'id':_0x1de04b[_0xc008('0x2b')][0x0]['id'],'email':_0x1de04b['result'][0x0][_0xc008('0x2f')],'name':_0x1de04b[_0xc008('0x2b')][0x0]['first_name']+'\x20'+_0x1de04b[_0xc008('0x2b')][_0xc008('0x30')]});}else{logger[_0xc008('0x27')](_0xc008('0x31'));return BPromise[_0xc008('0x2e')]({'id':_0x24c14c[_0xc008('0x32')],'email':_0x25eae4[_0xc008('0x1e')],'name':_0xc008('0x33')});}})[_0xc008('0x24')](function(_0x4f14d2){var _0x415b87=_0x4f14d2[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')](_0xc008('0x35'),_0xc008('0x36'),_0x415b87,JSON[_0xc008('0x1f')](_0x4f14d2));});}else{logger[_0xc008('0x27')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0xc008('0x2e')]({'id':_0x24c14c[_0xc008('0x32')],'email':_0x25eae4['username'],'name':_0xc008('0x33')})[_0xc008('0x24')](function(_0x5e38d5){var _0x263473=_0x5e38d5[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')]('[vTiger],\x20%s,\x20%s,\x20%s','getUser',_0x263473,JSON['stringify'](_0x5e38d5));});}}function getEndUser(_0x234f2a,_0x518024,_0x3dd0ac,_0x3884dd){logger[_0xc008('0x27')](_0xc008('0x37'),_0x3dd0ac);return request({'method':_0xc008('0x38'),'uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x234f2a[_0xc008('0x1d')]),'qs':{'operation':_0xc008('0x39'),'username':_0x234f2a[_0xc008('0x1e')],'sessionName':_0x3884dd[_0xc008('0x29')],'query':util[_0xc008('0x1b')](_0xc008('0x3a'),_0x3dd0ac,_0x3dd0ac,_0x3dd0ac,_0x3dd0ac,_0x3dd0ac)},'json':!![]})[_0xc008('0x20')](function(_0x4cace5){if(_0x4cace5[_0xc008('0x21')]&&_0x4cace5[_0xc008('0x2b')][_0xc008('0x2c')]){logger[_0xc008('0x27')]('Enduser\x20found!');return BPromise[_0xc008('0x2e')]({'id':_0x4cace5[_0xc008('0x2b')][0x0]['id'],'name':_0x4cace5[_0xc008('0x2b')][0x0][_0xc008('0x3b')]+'\x20'+_0x4cace5[_0xc008('0x2b')][0x0]['lastname'],'phone':_0x3dd0ac});}else{logger[_0xc008('0x27')](_0xc008('0x3c'));return request({'method':_0xc008('0x1a'),'uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x234f2a['remoteUri']),'form':{'operation':_0xc008('0x3d'),'sessionName':_0x3884dd[_0xc008('0x29')],'elementType':_0xc008('0x3e'),'element':JSON[_0xc008('0x1f')]({'lastname':_0x518024,'phone':_0x3dd0ac,'assigned_user_id':'\x20'})},'json':!![]})['then'](function(_0x26cd05){logger[_0xc008('0x27')](_0xc008('0x3f'));return BPromise['resolve']({'id':_0x26cd05[_0xc008('0x2b')]['id'],'name':_0x26cd05['result'][_0xc008('0x40')],'phone':_0x26cd05['result'][_0xc008('0x41')]});})[_0xc008('0x24')](function(_0x5a5d85){var _0x31007c=_0x5a5d85[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')]('[vTiger],\x20%s,\x20%s,\x20%s',_0xc008('0x42'),_0x31007c,JSON[_0xc008('0x1f')](_0x5a5d85));});}});}function getConnection(_0x200469){var _0x44fc5d=_0x200469[_0xc008('0x1e')];var _0x372305=_0x200469['accessKey'];return request({'method':'GET','uri':util['format'](_0xc008('0x1c'),_0x200469[_0xc008('0x1d')]),'qs':{'operation':_0xc008('0x43'),'username':_0x44fc5d},'json':!![]})[_0xc008('0x20')](function(_0x25289f){if(_0x25289f[_0xc008('0x21')]){return request({'method':_0xc008('0x1a'),'uri':util[_0xc008('0x1b')]('%s/webservice.php',_0x200469['remoteUri']),'form':{'operation':'login','username':_0x44fc5d,'accessKey':md5(_0x25289f[_0xc008('0x2b')][_0xc008('0x44')]+_0x372305)},'json':!![]});}})[_0xc008('0x20')](function(_0x511383){if(_0x511383[_0xc008('0x21')]){return BPromise[_0xc008('0x2e')](_0x511383[_0xc008('0x2b')]);}else{throw new Error(util[_0xc008('0x1b')](_0xc008('0x45'),_0x200469['id']));}})[_0xc008('0x24')](function(_0x17ec90){var _0x405e87=_0x17ec90[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')]('[vTiger],\x20%s,\x20%s,\x20%s','getConnection',_0x405e87,JSON[_0xc008('0x1f')](_0x17ec90));});}function request(_0x51cb14){logger[_0xc008('0x27')](_0xc008('0x46'),JSON[_0xc008('0x1f')](_0x51cb14));return rp(_0x51cb14);}exports['queue']=function(_0x144ab2,_0x32b435,_0xee64,_0x8b9775,_0x750cc9,_0x51105f){var _0x3a7b3b,_0x27b022,_0x4b4c6d,_0x24f775;_0x51105f[_0xc008('0x1d')]=intUtil['stripTrailingSlash'](_0x51105f['remoteUri']);if(_0x750cc9&&_0x750cc9[_0xc008('0x47')]){logger[_0xc008('0x27')](_0xc008('0x48'),_0xc008('0x49'));_0x32b435[_0xc008('0x4a')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x51105f[_0xc008('0x4b')],_0x32b435['uniqueid'],md5(_0x32b435[_0xc008('0x4c')]));}else{_0x32b435[_0xc008('0x4a')]='';}return getConnection(_0x51105f)[_0xc008('0x20')](function(_0x2f1105){_0x24f775=_0x2f1105;return getUser(_0x51105f,_0x8b9775[_0xc008('0x4d')],_0x24f775);})[_0xc008('0x20')](function(_0x49d8b0){_0x3a7b3b=_0x49d8b0;logger[_0xc008('0x27')](_0xc008('0x4e'),_0x3a7b3b['id']);return getEndUser(_0x51105f,_0x32b435[_0xc008('0x4f')],_0x32b435[_0xc008('0x50')],_0x24f775);})[_0xc008('0x20')](function(_0x5aa385){_0x27b022=_0x5aa385;logger[_0xc008('0x27')]('The\x20Enduser\x20ID\x20is:',_0x27b022['id']);return createTicket(_0x51105f,_0x3a7b3b,_0x27b022,_0xee64,_0x32b435,_0xee64['Fields'],_0x24f775);})['then'](function(_0x89bb20){_0x4b4c6d=_0x89bb20;logger[_0xc008('0x27')](_0xc008('0x51'));logger['info'](_0xc008('0x52'),_0x4b4c6d['id']);var _0x2d8361=util[_0xc008('0x1b')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x51105f[_0xc008('0x1d')],_[_0xc008('0x53')](_0x4b4c6d['id'],'x')[0x1]);logger[_0xc008('0x27')](_0xc008('0x48'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0xc008('0x1b')]('user:%s',_0x8b9775[_0xc008('0x16')]),_0xc008('0x54'),{'uri':_0x2d8361});})[_0xc008('0x24')](function(_0x943c91){logger[_0xc008('0x23')](_0xc008('0x48'),JSON['stringify'](_0x943c91));});};exports[_0xc008('0x55')]=function(_0x570001,_0x5bf4a9,_0x37ce5e,_0x30aa1e,_0x56e755,_0xb1befa,_0xb8ba7){var _0x3e373e,_0x4517c0,_0x21ee6d,_0x31a339;_0xb1befa[_0xc008('0x1d')]=intUtil['stripTrailingSlash'](_0xb1befa[_0xc008('0x1d')]);_0xb1befa[_0xc008('0x4b')]=intUtil[_0xc008('0x56')](_0xb1befa[_0xc008('0x4b')]);if(_0xb8ba7&&_0xb8ba7[_0xc008('0x57')]&&_0xb8ba7[_0xc008('0x57')]!==_0xc008('0x58')){logger[_0xc008('0x27')](_0xc008('0x59'),_0xc008('0x49'));_0x5bf4a9[_0xc008('0x4a')]=util[_0xc008('0x1b')](_0xc008('0x5a'),_0xb1befa[_0xc008('0x4b')],_0x5bf4a9['uniqueid'],md5(_0x5bf4a9[_0xc008('0x4c')]));}return getConnection(_0xb1befa)[_0xc008('0x20')](function(_0x3d3a7e){_0x31a339=_0x3d3a7e;return getUser(_0xb1befa,_0x30aa1e['email'],_0x31a339);})[_0xc008('0x20')](function(_0x3214df){_0x3e373e=_0x3214df;logger['info']('The\x20User\x20ID\x20is:',_0x3e373e['id']);return getEndUser(_0xb1befa,_0x5bf4a9[_0xc008('0x5b')],_0x5bf4a9[_0xc008('0x5c')],_0x31a339);})[_0xc008('0x20')](function(_0x39083c){_0x4517c0=_0x39083c;logger[_0xc008('0x27')](_0xc008('0x5d'),_0x4517c0['id']);return createTicket(_0xb1befa,_0x3e373e,_0x4517c0,_0x37ce5e,_0x5bf4a9,_0x37ce5e[_0xc008('0x5e')],_0x31a339);})[_0xc008('0x20')](function(_0x39e219){_0x21ee6d=_0x39e219;logger[_0xc008('0x27')](_0xc008('0x51'));logger['info'](_0xc008('0x52'),_0x21ee6d['id']);var _0x25a52b=util[_0xc008('0x1b')](_0xc008('0x5f'),_0xb1befa['remoteUri'],_[_0xc008('0x53')](_0x21ee6d['id'],'x')[0x1]);logger['info'](_0xc008('0x59'),_0xc008('0x60'));emit(util[_0xc008('0x1b')]('user:%s',_0x30aa1e[_0xc008('0x16')]),_0xc008('0x54'),{'uri':_0x25a52b});})[_0xc008('0x24')](function(_0x553f5c){logger[_0xc008('0x23')]('[OUTBOUND]',JSON[_0xc008('0x1f')](_0x553f5c));});};exports[_0xc008('0x61')]=function(_0x23012c,_0x6fe732,_0x295ec7,_0x4ca4a6,_0x3c30db,_0x3f2342){var _0x49493b,_0x3efb77,_0x5233bb,_0x278cbe;_0x3f2342['remoteUri']=intUtil[_0xc008('0x56')](_0x3f2342['remoteUri']);_0x3f2342[_0xc008('0x4b')]=intUtil[_0xc008('0x56')](_0x3f2342[_0xc008('0x4b')]);if(_0x3c30db&&_0x3c30db[_0xc008('0x47')]){logger['info'](_0xc008('0x62'),_0xc008('0x49'));_0x6fe732[_0xc008('0x4a')]=util[_0xc008('0x1b')](_0xc008('0x5a'),_0x3f2342[_0xc008('0x4b')],_0x6fe732[_0xc008('0x4c')],md5(_0x6fe732[_0xc008('0x4c')]));}else{_0x6fe732['recordingURL']='';}return getConnection(_0x3f2342)[_0xc008('0x20')](function(_0x530c2f){_0x278cbe=_0x530c2f;return getUser(_0x3f2342,'',_0x278cbe);})['then'](function(_0x4c84da){_0x49493b=_0x4c84da;logger[_0xc008('0x27')](_0xc008('0x4e'),_0x49493b['id']);return getEndUser(_0x3f2342,_0x6fe732[_0xc008('0x4f')],_0x6fe732[_0xc008('0x50')],_0x278cbe);})[_0xc008('0x20')](function(_0x2e9646){_0x3efb77=_0x2e9646;logger[_0xc008('0x27')](_0xc008('0x5d'),_0x3efb77['id']);return createTicket(_0x3f2342,_0x49493b,_0x3efb77,_0x295ec7,_0x6fe732,_0x295ec7[_0xc008('0x5e')],_0x278cbe);})['then'](function(_0x38b603){_0x5233bb=_0x38b603;logger[_0xc008('0x27')](_0xc008('0x51'));logger[_0xc008('0x27')](_0xc008('0x52'),_0x5233bb['id']);})[_0xc008('0x24')](function(_0x23d4ff){logger[_0xc008('0x23')](_0xc008('0x62'),JSON[_0xc008('0x1f')](_0x23d4ff));});};
\ No newline at end of file
+var _0x008c=['util','./util','../../../../config/environment','../../../../config/logger','vTiger','redis','defaults','localhost','socket.io-emitter','type','string','idField','content','toString','variable','variableName','customVariable','Variable','name','toLowerCase','merge','Descriptions','POST','format','%s/webservice.php','remoteUri','username','stringify','then','success','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','error','catch','createTicket','validateEmail','info','Getting\x20agent\x20with\x20email','sessionName','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','result','length','Agent\x20found!','resolve','email1','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','admin','statusCode','[vTiger],\x20%s,\x20%s,\x20%s','getUser','Searching\x20end\x20user\x20with\x20phone','GET','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;','firstname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','create','Contacts','Enduser\x20created.','lastname','phone','getEndUser','getchallenge','token','Account\x20%d\x20is\x20not\x20valid','[HTTP]','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','serverUrl','uniqueid','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','split','trigger:browser:url','outbound','stripTrailingSlash','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','Fields','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','abandoned','[ABANDONED]','lodash','request-promise','bluebird','md5'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x008c,0x188));var _0xc008=function(_0x4ea571,_0x524bc2){_0x4ea571=_0x4ea571-0x0;var _0x122eba=_0x008c[_0x4ea571];return _0x122eba;};'use strict';var _=require(_0xc008('0x0'));var rp=require(_0xc008('0x1'));var BPromise=require(_0xc008('0x2'));var md5=require(_0xc008('0x3'));var util=require(_0xc008('0x4'));var Redis=require('ioredis');var intUtil=require(_0xc008('0x5'));var config=require(_0xc008('0x6'));var logger=require(_0xc008('0x7'))(_0xc008('0x8'));config[_0xc008('0x9')]=_[_0xc008('0xa')](config[_0xc008('0x9')],{'host':_0xc008('0xb'),'port':0x18eb});var io=require(_0xc008('0xc'))(new Redis(config['redis']));function emit(_0x428fa9,_0x5aa09b,_0x30be38){io['to'](_0x428fa9)['emit'](_0x5aa09b,_0x30be38);}function getCustomFields(_0x52041f,_0x27830d){var _0x7231b4={};if(_0x52041f['length']>0x0){_['forEach'](_0x52041f,function(_0x543eb8){if(_0x543eb8[_0xc008('0xd')]===_0xc008('0xe')&&_0x543eb8['idField']){_0x7231b4[_0x543eb8[_0xc008('0xf')]]=_0x543eb8[_0xc008('0x10')][_0xc008('0x11')]();}else if(_0x543eb8[_0xc008('0xd')]===_0xc008('0x12')&&_0x543eb8[_0xc008('0x13')]&&_0x543eb8[_0xc008('0xf')]&&_0x27830d[_0x543eb8['variableName']]){_0x7231b4[_0x543eb8['idField']]=_0x27830d[_0x543eb8[_0xc008('0x13')]]['toString']();}else if(_0x543eb8[_0xc008('0xd')]===_0xc008('0x14')&&_0x543eb8[_0xc008('0x15')]&&_0x543eb8[_0xc008('0x15')][_0xc008('0x16')]&&_0x543eb8['idField']&&_0x27830d[_0x543eb8['Variable']['name'][_0xc008('0x17')]()]){_0x7231b4[_0x543eb8[_0xc008('0xf')]]=_0x27830d[_0x543eb8[_0xc008('0x15')][_0xc008('0x16')]['toLowerCase']()]['toString']();}});}return _0x7231b4;}function createTicket(_0x540e45,_0x5c2668,_0x46042b,_0x462af5,_0x501137,_0x813397,_0x5906e6){logger['info']('Creating\x20new\x20ticket...');var _0x50261c=_[_0xc008('0x18')]({'parent_id':'','assigned_user_id':_0x5c2668['id'],'ticketpriorities':'Normal','ticketstatus':'Open','ticket_title':intUtil['getString'](_0x462af5['Subjects'],_0x501137,'\x20'),'description':intUtil['getString'](_0x462af5[_0xc008('0x19')],_0x501137,'\x0a'),'contact_id':_0x46042b['id']},getCustomFields(_0x813397,_0x501137));var _0x4777a6={'method':_0xc008('0x1a'),'uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x540e45[_0xc008('0x1d')]),'form':{'operation':'create','username':_0x540e45[_0xc008('0x1e')],'sessionName':_0x5906e6['sessionName'],'elementType':'HelpDesk','element':JSON[_0xc008('0x1f')](_0x50261c)},'json':!![]};return request(_0x4777a6)[_0xc008('0x20')](function(_0x2e3cfb){if(_0x2e3cfb[_0xc008('0x21')]){return BPromise['resolve']({'id':_0x2e3cfb['result']['id']});}else{throw new Error(util['format'](_0xc008('0x22'),JSON[_0xc008('0x1f')](_0x2e3cfb[_0xc008('0x23')])));}})[_0xc008('0x24')](function(_0x5bebd9){var _0x5e2aca=_0x5bebd9['statusCode']||0x1f4;logger['error']('[vTiger],\x20%s,\x20%s,\x20%s',_0xc008('0x25'),_0x5e2aca,JSON[_0xc008('0x1f')](_0x5bebd9));});}function getUser(_0x25eae4,_0x529961,_0x24c14c){if(intUtil[_0xc008('0x26')](_0x529961)){logger[_0xc008('0x27')](_0xc008('0x28'),_0x529961);return request({'method':'GET','uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x25eae4['remoteUri']),'qs':{'operation':'query','username':_0x25eae4['username'],'sessionName':_0x24c14c[_0xc008('0x29')],'query':util[_0xc008('0x1b')](_0xc008('0x2a'),_0x529961)},'json':!![]})[_0xc008('0x20')](function(_0x1de04b){if(_0x1de04b[_0xc008('0x21')]&&_0x1de04b[_0xc008('0x2b')][_0xc008('0x2c')]){logger[_0xc008('0x27')](_0xc008('0x2d'));return BPromise[_0xc008('0x2e')]({'id':_0x1de04b[_0xc008('0x2b')][0x0]['id'],'email':_0x1de04b['result'][0x0][_0xc008('0x2f')],'name':_0x1de04b[_0xc008('0x2b')][0x0]['first_name']+'\x20'+_0x1de04b[_0xc008('0x2b')][_0xc008('0x30')]});}else{logger[_0xc008('0x27')](_0xc008('0x31'));return BPromise[_0xc008('0x2e')]({'id':_0x24c14c[_0xc008('0x32')],'email':_0x25eae4[_0xc008('0x1e')],'name':_0xc008('0x33')});}})[_0xc008('0x24')](function(_0x4f14d2){var _0x415b87=_0x4f14d2[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')](_0xc008('0x35'),_0xc008('0x36'),_0x415b87,JSON[_0xc008('0x1f')](_0x4f14d2));});}else{logger[_0xc008('0x27')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0xc008('0x2e')]({'id':_0x24c14c[_0xc008('0x32')],'email':_0x25eae4['username'],'name':_0xc008('0x33')})[_0xc008('0x24')](function(_0x5e38d5){var _0x263473=_0x5e38d5[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')]('[vTiger],\x20%s,\x20%s,\x20%s','getUser',_0x263473,JSON['stringify'](_0x5e38d5));});}}function getEndUser(_0x234f2a,_0x518024,_0x3dd0ac,_0x3884dd){logger[_0xc008('0x27')](_0xc008('0x37'),_0x3dd0ac);return request({'method':_0xc008('0x38'),'uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x234f2a[_0xc008('0x1d')]),'qs':{'operation':_0xc008('0x39'),'username':_0x234f2a[_0xc008('0x1e')],'sessionName':_0x3884dd[_0xc008('0x29')],'query':util[_0xc008('0x1b')](_0xc008('0x3a'),_0x3dd0ac,_0x3dd0ac,_0x3dd0ac,_0x3dd0ac,_0x3dd0ac)},'json':!![]})[_0xc008('0x20')](function(_0x4cace5){if(_0x4cace5[_0xc008('0x21')]&&_0x4cace5[_0xc008('0x2b')][_0xc008('0x2c')]){logger[_0xc008('0x27')]('Enduser\x20found!');return BPromise[_0xc008('0x2e')]({'id':_0x4cace5[_0xc008('0x2b')][0x0]['id'],'name':_0x4cace5[_0xc008('0x2b')][0x0][_0xc008('0x3b')]+'\x20'+_0x4cace5[_0xc008('0x2b')][0x0]['lastname'],'phone':_0x3dd0ac});}else{logger[_0xc008('0x27')](_0xc008('0x3c'));return request({'method':_0xc008('0x1a'),'uri':util[_0xc008('0x1b')](_0xc008('0x1c'),_0x234f2a['remoteUri']),'form':{'operation':_0xc008('0x3d'),'sessionName':_0x3884dd[_0xc008('0x29')],'elementType':_0xc008('0x3e'),'element':JSON[_0xc008('0x1f')]({'lastname':_0x518024,'phone':_0x3dd0ac,'assigned_user_id':'\x20'})},'json':!![]})['then'](function(_0x26cd05){logger[_0xc008('0x27')](_0xc008('0x3f'));return BPromise['resolve']({'id':_0x26cd05[_0xc008('0x2b')]['id'],'name':_0x26cd05['result'][_0xc008('0x40')],'phone':_0x26cd05['result'][_0xc008('0x41')]});})[_0xc008('0x24')](function(_0x5a5d85){var _0x31007c=_0x5a5d85[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')]('[vTiger],\x20%s,\x20%s,\x20%s',_0xc008('0x42'),_0x31007c,JSON[_0xc008('0x1f')](_0x5a5d85));});}});}function getConnection(_0x200469){var _0x44fc5d=_0x200469[_0xc008('0x1e')];var _0x372305=_0x200469['accessKey'];return request({'method':'GET','uri':util['format'](_0xc008('0x1c'),_0x200469[_0xc008('0x1d')]),'qs':{'operation':_0xc008('0x43'),'username':_0x44fc5d},'json':!![]})[_0xc008('0x20')](function(_0x25289f){if(_0x25289f[_0xc008('0x21')]){return request({'method':_0xc008('0x1a'),'uri':util[_0xc008('0x1b')]('%s/webservice.php',_0x200469['remoteUri']),'form':{'operation':'login','username':_0x44fc5d,'accessKey':md5(_0x25289f[_0xc008('0x2b')][_0xc008('0x44')]+_0x372305)},'json':!![]});}})[_0xc008('0x20')](function(_0x511383){if(_0x511383[_0xc008('0x21')]){return BPromise[_0xc008('0x2e')](_0x511383[_0xc008('0x2b')]);}else{throw new Error(util[_0xc008('0x1b')](_0xc008('0x45'),_0x200469['id']));}})[_0xc008('0x24')](function(_0x17ec90){var _0x405e87=_0x17ec90[_0xc008('0x34')]||0x1f4;logger[_0xc008('0x23')]('[vTiger],\x20%s,\x20%s,\x20%s','getConnection',_0x405e87,JSON[_0xc008('0x1f')](_0x17ec90));});}function request(_0x51cb14){logger[_0xc008('0x27')](_0xc008('0x46'),JSON[_0xc008('0x1f')](_0x51cb14));return rp(_0x51cb14);}exports['queue']=function(_0x144ab2,_0x32b435,_0xee64,_0x8b9775,_0x750cc9,_0x51105f){var _0x3a7b3b,_0x27b022,_0x4b4c6d,_0x24f775;_0x51105f[_0xc008('0x1d')]=intUtil['stripTrailingSlash'](_0x51105f['remoteUri']);if(_0x750cc9&&_0x750cc9[_0xc008('0x47')]){logger[_0xc008('0x27')](_0xc008('0x48'),_0xc008('0x49'));_0x32b435[_0xc008('0x4a')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x51105f[_0xc008('0x4b')],_0x32b435['uniqueid'],md5(_0x32b435[_0xc008('0x4c')]));}else{_0x32b435[_0xc008('0x4a')]='';}return getConnection(_0x51105f)[_0xc008('0x20')](function(_0x2f1105){_0x24f775=_0x2f1105;return getUser(_0x51105f,_0x8b9775[_0xc008('0x4d')],_0x24f775);})[_0xc008('0x20')](function(_0x49d8b0){_0x3a7b3b=_0x49d8b0;logger[_0xc008('0x27')](_0xc008('0x4e'),_0x3a7b3b['id']);return getEndUser(_0x51105f,_0x32b435[_0xc008('0x4f')],_0x32b435[_0xc008('0x50')],_0x24f775);})[_0xc008('0x20')](function(_0x5aa385){_0x27b022=_0x5aa385;logger[_0xc008('0x27')]('The\x20Enduser\x20ID\x20is:',_0x27b022['id']);return createTicket(_0x51105f,_0x3a7b3b,_0x27b022,_0xee64,_0x32b435,_0xee64['Fields'],_0x24f775);})['then'](function(_0x89bb20){_0x4b4c6d=_0x89bb20;logger[_0xc008('0x27')](_0xc008('0x51'));logger['info'](_0xc008('0x52'),_0x4b4c6d['id']);var _0x2d8361=util[_0xc008('0x1b')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x51105f[_0xc008('0x1d')],_[_0xc008('0x53')](_0x4b4c6d['id'],'x')[0x1]);logger[_0xc008('0x27')](_0xc008('0x48'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0xc008('0x1b')]('user:%s',_0x8b9775[_0xc008('0x16')]),_0xc008('0x54'),{'uri':_0x2d8361});})[_0xc008('0x24')](function(_0x943c91){logger[_0xc008('0x23')](_0xc008('0x48'),JSON['stringify'](_0x943c91));});};exports[_0xc008('0x55')]=function(_0x570001,_0x5bf4a9,_0x37ce5e,_0x30aa1e,_0x56e755,_0xb1befa,_0xb8ba7){var _0x3e373e,_0x4517c0,_0x21ee6d,_0x31a339;_0xb1befa[_0xc008('0x1d')]=intUtil['stripTrailingSlash'](_0xb1befa[_0xc008('0x1d')]);_0xb1befa[_0xc008('0x4b')]=intUtil[_0xc008('0x56')](_0xb1befa[_0xc008('0x4b')]);if(_0xb8ba7&&_0xb8ba7[_0xc008('0x57')]&&_0xb8ba7[_0xc008('0x57')]!==_0xc008('0x58')){logger[_0xc008('0x27')](_0xc008('0x59'),_0xc008('0x49'));_0x5bf4a9[_0xc008('0x4a')]=util[_0xc008('0x1b')](_0xc008('0x5a'),_0xb1befa[_0xc008('0x4b')],_0x5bf4a9['uniqueid'],md5(_0x5bf4a9[_0xc008('0x4c')]));}return getConnection(_0xb1befa)[_0xc008('0x20')](function(_0x3d3a7e){_0x31a339=_0x3d3a7e;return getUser(_0xb1befa,_0x30aa1e['email'],_0x31a339);})[_0xc008('0x20')](function(_0x3214df){_0x3e373e=_0x3214df;logger['info']('The\x20User\x20ID\x20is:',_0x3e373e['id']);return getEndUser(_0xb1befa,_0x5bf4a9[_0xc008('0x5b')],_0x5bf4a9[_0xc008('0x5c')],_0x31a339);})[_0xc008('0x20')](function(_0x39083c){_0x4517c0=_0x39083c;logger[_0xc008('0x27')](_0xc008('0x5d'),_0x4517c0['id']);return createTicket(_0xb1befa,_0x3e373e,_0x4517c0,_0x37ce5e,_0x5bf4a9,_0x37ce5e[_0xc008('0x5e')],_0x31a339);})[_0xc008('0x20')](function(_0x39e219){_0x21ee6d=_0x39e219;logger[_0xc008('0x27')](_0xc008('0x51'));logger['info'](_0xc008('0x52'),_0x21ee6d['id']);var _0x25a52b=util[_0xc008('0x1b')](_0xc008('0x5f'),_0xb1befa['remoteUri'],_[_0xc008('0x53')](_0x21ee6d['id'],'x')[0x1]);logger['info'](_0xc008('0x59'),_0xc008('0x60'));emit(util[_0xc008('0x1b')]('user:%s',_0x30aa1e[_0xc008('0x16')]),_0xc008('0x54'),{'uri':_0x25a52b});})[_0xc008('0x24')](function(_0x553f5c){logger[_0xc008('0x23')]('[OUTBOUND]',JSON[_0xc008('0x1f')](_0x553f5c));});};exports[_0xc008('0x61')]=function(_0x23012c,_0x6fe732,_0x295ec7,_0x4ca4a6,_0x3c30db,_0x3f2342){var _0x49493b,_0x3efb77,_0x5233bb,_0x278cbe;_0x3f2342['remoteUri']=intUtil[_0xc008('0x56')](_0x3f2342['remoteUri']);_0x3f2342[_0xc008('0x4b')]=intUtil[_0xc008('0x56')](_0x3f2342[_0xc008('0x4b')]);if(_0x3c30db&&_0x3c30db[_0xc008('0x47')]){logger['info'](_0xc008('0x62'),_0xc008('0x49'));_0x6fe732[_0xc008('0x4a')]=util[_0xc008('0x1b')](_0xc008('0x5a'),_0x3f2342[_0xc008('0x4b')],_0x6fe732[_0xc008('0x4c')],md5(_0x6fe732[_0xc008('0x4c')]));}else{_0x6fe732['recordingURL']='';}return getConnection(_0x3f2342)[_0xc008('0x20')](function(_0x530c2f){_0x278cbe=_0x530c2f;return getUser(_0x3f2342,'',_0x278cbe);})['then'](function(_0x4c84da){_0x49493b=_0x4c84da;logger[_0xc008('0x27')](_0xc008('0x4e'),_0x49493b['id']);return getEndUser(_0x3f2342,_0x6fe732[_0xc008('0x4f')],_0x6fe732[_0xc008('0x50')],_0x278cbe);})[_0xc008('0x20')](function(_0x2e9646){_0x3efb77=_0x2e9646;logger[_0xc008('0x27')](_0xc008('0x5d'),_0x3efb77['id']);return createTicket(_0x3f2342,_0x49493b,_0x3efb77,_0x295ec7,_0x6fe732,_0x295ec7[_0xc008('0x5e')],_0x278cbe);})['then'](function(_0x38b603){_0x5233bb=_0x38b603;logger[_0xc008('0x27')](_0xc008('0x51'));logger[_0xc008('0x27')](_0xc008('0x52'),_0x5233bb['id']);})[_0xc008('0x24')](function(_0x23d4ff){logger[_0xc008('0x23')](_0xc008('0x62'),JSON[_0xc008('0x1f')](_0x23d4ff));});};
\ 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 2842618..bd66e8a 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 _0x10c4=['%s:%s','authType','%s/token:%s','token','Basic\x20%s','toString','debug','[HTTP]','stringify','GET','string','nameField','content','type','idField','customField','custom_fields','push','variable','variableName','Variable','toLowerCase','stripTrailingSlash','serverUrl','Recording\x20is\x20enabled!','recordingURL','uniqueid','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','newTab','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','%s/agent/tickets/%s','error','Zendesk\x20account\x20type\x20not\x20recognized','catch','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','recordingFormat','none','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:','[OUTBOUND]','Displaying\x20ticket\x20to\x20agent...','trigger:browser:url','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','monitor_format','[ABANDONED]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','Authorization','[ABANDONED]\x20Error\x20running\x20Zendesk\x20integration','lodash','md5','util','ioredis','./util','../../../../config/environment','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','remoteUri','POST','merge','Tags','name','Subjects','Descriptions','getString','Fields','then','ticket','validateEmail','Getting\x20agent\x20with\x20email','format','type:user\x20role:agent\x20email:%s','count','find','results','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user','%s/users/me.json','Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','length','filter','end-user','first','Caller\x20-\x20%s','Enduser\x20created.','password'];(function(_0x133a62,_0x1f841a){var _0xa3dfe9=function(_0x371cd4){while(--_0x371cd4){_0x133a62['push'](_0x133a62['shift']());}};_0xa3dfe9(++_0x1f841a);}(_0x10c4,0x16b));var _0x410c=function(_0xcfc02f,_0x496077){_0xcfc02f=_0xcfc02f-0x0;var _0x1ae6c5=_0x10c4[_0xcfc02f];return _0x1ae6c5;};'use strict';var _=require(_0x410c('0x0'));var rp=require('request-promise');var md5=require(_0x410c('0x1'));var util=require(_0x410c('0x2'));var Redis=require(_0x410c('0x3'));var intUtil=require(_0x410c('0x4'));var config=require(_0x410c('0x5'));var logger=require(_0x410c('0x6'))('zendesk');config[_0x410c('0x7')]=_[_0x410c('0x8')](config[_0x410c('0x7')],{'host':_0x410c('0x9'),'port':0x18eb});var io=require(_0x410c('0xa'))(new Redis(config[_0x410c('0x7')]));function emit(_0x31c2ae,_0xe8295b,_0x5027fe){io['to'](_0x31c2ae)[_0x410c('0xb')](_0xe8295b,_0x5027fe);}var headers={'Content-Type':_0x410c('0xc'),'Accept':_0x410c('0xc')};function getTicket(_0x31f23e,_0x3dd2a5,_0x2c2980,_0x16b9e0,_0x3cec2f){logger[_0x410c('0xd')](_0x410c('0xe'));return request({'uri':util['format']('%s/tickets.json',_0x31f23e[_0x410c('0xf')]),'method':_0x410c('0x10'),'body':{'ticket':_[_0x410c('0x11')]({'requester_id':_0x2c2980['id'],'submitter_id':_0x3dd2a5?_0x3dd2a5['id']:undefined,'assignee_id':_0x3dd2a5?_0x3dd2a5['id']:undefined,'tags':getTags(_0x16b9e0[_0x410c('0x12')],_0x410c('0x13')),'subject':intUtil['getString'](_0x16b9e0[_0x410c('0x14')],_0x3cec2f,'\x20'),'description':intUtil['getString'](_0x16b9e0[_0x410c('0x15')],_0x3cec2f,'\x0a'),'comment':{'public':![],'body':intUtil[_0x410c('0x16')](_0x16b9e0['Descriptions'],_0x3cec2f,'\x0a')}},getCustomFields(_0x16b9e0[_0x410c('0x17')],_0x3cec2f))}})[_0x410c('0x18')](function(_0x2eece1){logger[_0x410c('0xd')]('Ticket\x20created!');return _0x2eece1[_0x410c('0x19')];});}function getUser(_0x15b1f1,_0x3e0f4f){if(intUtil[_0x410c('0x1a')](_0x3e0f4f)){logger[_0x410c('0xd')](_0x410c('0x1b'),_0x3e0f4f);return request({'uri':util[_0x410c('0x1c')]('%s/search.json',_0x15b1f1[_0x410c('0xf')]),'qs':{'query':util['format'](_0x410c('0x1d'),_0x3e0f4f)}})[_0x410c('0x18')](function(_0x199321){if(_0x199321[_0x410c('0x1e')]){logger[_0x410c('0xd')]('Agent\x20found!');return _[_0x410c('0x1f')](_0x199321[_0x410c('0x20')],{'email':_0x3e0f4f,'role':'agent'});}else{logger[_0x410c('0xd')](_0x410c('0x21'));return request({'uri':util[_0x410c('0x1c')]('%s/users/me.json',_0x15b1f1['remoteUri'])})[_0x410c('0x18')](function(_0x389054){logger[_0x410c('0xd')]('Admin\x20account\x20selected.');return _0x389054[_0x410c('0x22')];});}});}else{logger['info'](_0x410c('0x21'));return request({'uri':util['format'](_0x410c('0x23'),_0x15b1f1[_0x410c('0xf')])})['then'](function(_0x61b8ef){logger[_0x410c('0xd')](_0x410c('0x24'));return _0x61b8ef[_0x410c('0x22')];});}}function getEndUser(_0x36ce8d,_0x347db1,_0x2af156){logger[_0x410c('0xd')](_0x410c('0x25'),_0x2af156);return request({'uri':util[_0x410c('0x1c')]('%s/search.json',_0x36ce8d[_0x410c('0xf')]),'qs':{'query':util[_0x410c('0x1c')]('type:user\x20role:end-user\x20phone:%s',_0x2af156)}})[_0x410c('0x18')](function(_0xeb07b0){var _0x2bbe30;if(_0xeb07b0['results'][_0x410c('0x26')]){_0xeb07b0['results']=_[_0x410c('0x27')](_0xeb07b0[_0x410c('0x20')],{'suspended':![],'role':_0x410c('0x28')});if(_0xeb07b0['results'][_0x410c('0x26')]){_0x2bbe30=_[_0x410c('0x29')](_0xeb07b0[_0x410c('0x20')]);}}if(_0x2bbe30){logger['info']('Enduser\x20found!');return _0x2bbe30;}else{logger[_0x410c('0xd')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util[_0x410c('0x1c')]('%s/users.json',_0x36ce8d['remoteUri']),'method':_0x410c('0x10'),'body':{'user':{'role':_0x410c('0x28'),'name':util[_0x410c('0x1c')](_0x410c('0x2a'),_0x347db1||_0x2af156),'phone':_0x2af156}}})[_0x410c('0x18')](function(_0x3e60d9){logger[_0x410c('0xd')](_0x410c('0x2b'));return _0x3e60d9['user'];});}});}function getAuth(_0x32b0ed){var _0x27c314;if(_0x32b0ed['authType']===_0x410c('0x2c')){_0x27c314=util[_0x410c('0x1c')](_0x410c('0x2d'),_0x32b0ed['username'],_0x32b0ed[_0x410c('0x2c')]);}else if(_0x32b0ed[_0x410c('0x2e')]==='token'){_0x27c314=util[_0x410c('0x1c')](_0x410c('0x2f'),_0x32b0ed['username'],_0x32b0ed[_0x410c('0x30')]);}return util[_0x410c('0x1c')](_0x410c('0x31'),new Buffer(_0x27c314)[_0x410c('0x32')]('base64'));}function request(_0x9feb5e){logger[_0x410c('0x33')](_0x410c('0x34'),JSON[_0x410c('0x35')](_0x9feb5e));return rp(_[_0x410c('0x8')](_0x9feb5e,{'method':_0x410c('0x36'),'headers':headers,'json':!![]}));}function getTags(_0x35d6c7,_0x1f2894){var _0x1b46e=[];if(_0x35d6c7&&_0x35d6c7[_0x410c('0x26')]>0x0){_0x1b46e=_['map'](_0x35d6c7,_0x1f2894);}return _0x1b46e;}function getCustomFields(_0x32ed17,_0x419a78){var _0x2ac7ed=[];var _0x3dfc64={'custom_fields':[]};if(_0x32ed17['length']>0x0){_['forEach'](_0x32ed17,function(_0x455d90){if(_0x455d90['type']===_0x410c('0x37')&&_0x455d90[_0x410c('0x38')]&&!_0x455d90['customField']){_0x3dfc64[_0x455d90[_0x410c('0x38')]['toLowerCase']()]=_0x455d90[_0x410c('0x39')]['toString']();}else if(_0x455d90[_0x410c('0x3a')]===_0x410c('0x37')&&_0x455d90[_0x410c('0x3b')]&&_0x455d90[_0x410c('0x3c')]){_0x3dfc64[_0x410c('0x3d')][_0x410c('0x3e')]({'id':_0x455d90[_0x410c('0x3b')],'value':_0x455d90[_0x410c('0x39')][_0x410c('0x32')]()});}else if(_0x455d90[_0x410c('0x3a')]===_0x410c('0x3f')&&_0x455d90[_0x410c('0x40')]&&_0x455d90[_0x410c('0x3b')]&&_0x455d90[_0x410c('0x3c')]){_0x419a78[_0x455d90[_0x410c('0x40')]]&&_0x3dfc64[_0x410c('0x3d')][_0x410c('0x3e')]({'id':_0x455d90['idField'],'value':_0x419a78[_0x455d90[_0x410c('0x40')]][_0x410c('0x32')]()});}else if(_0x455d90[_0x410c('0x3a')]==='customVariable'&&_0x455d90[_0x410c('0x41')]&&_0x455d90[_0x410c('0x41')]['name']&&_0x455d90[_0x410c('0x3b')]&&_0x455d90[_0x410c('0x3c')]){_0x419a78[_0x455d90['Variable'][_0x410c('0x13')][_0x410c('0x42')]()]&&_0x3dfc64['custom_fields'][_0x410c('0x3e')]({'id':_0x455d90[_0x410c('0x3b')],'value':_0x419a78[_0x455d90[_0x410c('0x41')][_0x410c('0x13')]['toLowerCase']()]['toString']()});}});}return _0x3dfc64;}exports['queue']=function(_0x3e578c,_0x41a12e,_0x2185be,_0x3b3fd0,_0x246c7e,_0x1fe2cd){var _0x1819f9,_0x1d013e;_0x1fe2cd['remoteUri']=intUtil[_0x410c('0x43')](_0x1fe2cd[_0x410c('0xf')]);_0x1fe2cd[_0x410c('0x44')]=intUtil[_0x410c('0x43')](_0x1fe2cd[_0x410c('0x44')]);if(_0x246c7e&&_0x246c7e['monitor_format']){logger[_0x410c('0xd')]('[QUEUE]',_0x410c('0x45'));_0x41a12e[_0x410c('0x46')]=util[_0x410c('0x1c')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x1fe2cd[_0x410c('0x44')],_0x41a12e[_0x410c('0x47')],md5(_0x41a12e[_0x410c('0x47')]));}else{_0x41a12e[_0x410c('0x46')]='';}headers['Authorization']=getAuth(_0x1fe2cd);return getUser(_0x1fe2cd,_0x3b3fd0[_0x410c('0x48')])[_0x410c('0x18')](function(_0x21dc66){_0x1819f9=_0x21dc66;logger[_0x410c('0xd')](_0x410c('0x49'),_0x1819f9['id']);return getEndUser(_0x1fe2cd,_0x41a12e[_0x410c('0x4a')],_0x41a12e[_0x410c('0x4b')]);})['then'](function(_0x1f129c){_0x1d013e=_0x1f129c;logger[_0x410c('0xd')](_0x410c('0x4c'),_0x1d013e['id']);return getTicket(_0x1fe2cd,_0x1819f9,_0x1d013e,_0x2185be,_0x41a12e);})[_0x410c('0x18')](function(_0x21f65f){if(_0x21f65f){logger[_0x410c('0xd')]('The\x20Ticket\x20ID\x20is:',_0x21f65f['id']);switch(_0x1fe2cd[_0x410c('0x3a')]){case'integrationTab':logger[_0x410c('0xd')]('[QUEUE]','Displaying\x20ticket\x20to\x20agent...');return request({'uri':util[_0x410c('0x1c')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x1fe2cd[_0x410c('0xf')],_0x1819f9['id'],_0x21f65f['id']),'method':_0x410c('0x10')});case _0x410c('0x4d'):logger[_0x410c('0xd')](_0x410c('0x4e'),_0x410c('0x4f'));emit(util['format'](_0x410c('0x50'),_0x3b3fd0[_0x410c('0x13')]),'trigger:browser:url',{'uri':util[_0x410c('0x1c')](_0x410c('0x51'),_0x1fe2cd[_0x410c('0xf')],_0x21f65f['id'])});break;default:logger[_0x410c('0x52')](_0x410c('0x4e'),_0x410c('0x53'));}}})[_0x410c('0x54')](function(_0x1531aa){logger[_0x410c('0x52')](_0x410c('0x55'),util[_0x410c('0x56')](_0x1531aa,{'showHidden':!![],'depth':null}));});};exports[_0x410c('0x57')]=function(_0x430dde,_0x5c97ba,_0x2f96e9,_0x244b65,_0x32e9ed,_0x2bdb57,_0x3443f8){var _0xac6aa1,_0x47276a;_0x2bdb57[_0x410c('0xf')]=intUtil[_0x410c('0x43')](_0x2bdb57[_0x410c('0xf')]);_0x2bdb57[_0x410c('0x44')]=intUtil[_0x410c('0x43')](_0x2bdb57[_0x410c('0x44')]);if(_0x3443f8&&_0x3443f8[_0x410c('0x58')]&&_0x3443f8['recordingFormat']!==_0x410c('0x59')){logger[_0x410c('0xd')]('[OUTBOUND]',_0x410c('0x45'));_0x5c97ba[_0x410c('0x46')]=util[_0x410c('0x1c')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2bdb57[_0x410c('0x44')],_0x5c97ba['uniqueid'],md5(_0x5c97ba[_0x410c('0x47')]));}headers['Authorization']=getAuth(_0x2bdb57);return getUser(_0x2bdb57,_0x244b65[_0x410c('0x48')])[_0x410c('0x18')](function(_0x24f090){_0xac6aa1=_0x24f090;logger[_0x410c('0xd')](_0x410c('0x49'),_0xac6aa1['id']);return getEndUser(_0x2bdb57,_0x5c97ba[_0x410c('0x5a')],_0x5c97ba[_0x410c('0x5b')]);})[_0x410c('0x18')](function(_0x420aa5){_0x47276a=_0x420aa5;logger[_0x410c('0xd')]('The\x20Enduser\x20ID\x20is:',_0x47276a['id']);return getTicket(_0x2bdb57,_0xac6aa1,_0x47276a,_0x2f96e9,_0x5c97ba);})[_0x410c('0x18')](function(_0x259cfa){if(_0x259cfa){logger[_0x410c('0xd')](_0x410c('0x5c'),_0x259cfa['id']);switch(_0x2bdb57['type']){case'integrationTab':logger[_0x410c('0xd')](_0x410c('0x5d'),_0x410c('0x5e'));return request({'uri':util[_0x410c('0x1c')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x2bdb57[_0x410c('0xf')],_0xac6aa1['id'],_0x259cfa['id']),'method':'POST'});case _0x410c('0x4d'):logger[_0x410c('0xd')](_0x410c('0x5d'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x410c('0x1c')](_0x410c('0x50'),_0x244b65[_0x410c('0x13')]),_0x410c('0x5f'),{'uri':util['format'](_0x410c('0x51'),_0x2bdb57[_0x410c('0xf')],_0x259cfa['id'])});break;default:logger[_0x410c('0x52')]('[OUTBOUND]',_0x410c('0x53'));}}})[_0x410c('0x54')](function(_0x3c7856){logger['error'](_0x410c('0x60'),util[_0x410c('0x56')](_0x3c7856,{'showHidden':!![],'depth':null}));});};exports['abandoned']=function(_0x215b6c,_0x1ca015,_0x77f46f,_0x2fa08a,_0x3528b5,_0x192492){var _0x127dc4,_0x1fde0f;_0x192492[_0x410c('0xf')]=intUtil[_0x410c('0x43')](_0x192492[_0x410c('0xf')]);_0x192492['serverUrl']=intUtil[_0x410c('0x43')](_0x192492[_0x410c('0x44')]);if(_0x3528b5&&_0x3528b5[_0x410c('0x61')]){logger['info'](_0x410c('0x62'),'Recording\x20is\x20enabled!');_0x1ca015[_0x410c('0x46')]=util['format'](_0x410c('0x63'),_0x192492[_0x410c('0x44')],_0x1ca015[_0x410c('0x47')],md5(_0x1ca015[_0x410c('0x47')]));}else{_0x1ca015[_0x410c('0x46')]='';}headers[_0x410c('0x64')]=getAuth(_0x192492);return getUser(_0x192492)[_0x410c('0x18')](function(_0x4d1e58){_0x127dc4=_0x4d1e58;logger['info']('The\x20User\x20ID\x20is:',_0x127dc4['id']);return getEndUser(_0x192492,_0x1ca015[_0x410c('0x4a')],_0x1ca015['calleridnum']);})[_0x410c('0x18')](function(_0x577917){_0x1fde0f=_0x577917;logger['info']('The\x20Enduser\x20ID\x20is:',_0x1fde0f['id']);return getTicket(_0x192492,_0x127dc4,_0x1fde0f,_0x77f46f,_0x1ca015);})[_0x410c('0x18')](function(_0xe5cc99){if(_0xe5cc99){logger[_0x410c('0xd')](_0x410c('0x5c'),_0xe5cc99['id']);}})['catch'](function(_0x1166b1){logger['error'](_0x410c('0x65'),util['inspect'](_0x1166b1,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0xeec6=['../../../../config/logger','zendesk','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','remoteUri','merge','Tags','name','getString','Subjects','Descriptions','Fields','then','Ticket\x20created!','ticket','validateEmail','Getting\x20agent\x20with\x20email','format','type:user\x20role:agent\x20email:%s','count','Agent\x20found!','find','results','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','Searching\x20enduser\x20with\x20phone','%s/search.json','type:user\x20role:end-user\x20phone:%s','filter','end-user','length','first','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','POST','Enduser\x20created.','authType','password','%s:%s','username','token','Basic\x20%s','toString','base64','debug','[HTTP]','stringify','map','forEach','type','string','customField','nameField','idField','push','variable','variableName','custom_fields','customVariable','Variable','toLowerCase','queue','stripTrailingSlash','serverUrl','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','integrationTab','[QUEUE]','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','%s/agent/tickets/%s','Zendesk\x20account\x20type\x20not\x20recognized','catch','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','user:%s','error','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','abandoned','monitor_format','[ABANDONED]','Recording\x20is\x20enabled!','The\x20Ticket\x20ID\x20is:','[ABANDONED]\x20Error\x20running\x20Zendesk\x20integration','lodash','request-promise','md5','util','./util','../../../../config/environment'];(function(_0xa30766,_0x6f613e){var _0x24e780=function(_0x3d58fb){while(--_0x3d58fb){_0xa30766['push'](_0xa30766['shift']());}};_0x24e780(++_0x6f613e);}(_0xeec6,0x1c2));var _0x6eec=function(_0x25bea7,_0x49ab45){_0x25bea7=_0x25bea7-0x0;var _0x175952=_0xeec6[_0x25bea7];return _0x175952;};'use strict';var _=require(_0x6eec('0x0'));var rp=require(_0x6eec('0x1'));var md5=require(_0x6eec('0x2'));var util=require(_0x6eec('0x3'));var Redis=require('ioredis');var intUtil=require(_0x6eec('0x4'));var config=require(_0x6eec('0x5'));var logger=require(_0x6eec('0x6'))(_0x6eec('0x7'));config[_0x6eec('0x8')]=_[_0x6eec('0x9')](config['redis'],{'host':_0x6eec('0xa'),'port':0x18eb});var io=require(_0x6eec('0xb'))(new Redis(config['redis']));function emit(_0x5a5e47,_0x1c810e,_0x3443c2){io['to'](_0x5a5e47)[_0x6eec('0xc')](_0x1c810e,_0x3443c2);}var headers={'Content-Type':'application/json','Accept':_0x6eec('0xd')};function getTicket(_0x3aca38,_0x1c774d,_0x49ad4c,_0x595dd4,_0x5e8aba){logger[_0x6eec('0xe')](_0x6eec('0xf'));return request({'uri':util['format']('%s/tickets.json',_0x3aca38[_0x6eec('0x10')]),'method':'POST','body':{'ticket':_[_0x6eec('0x11')]({'requester_id':_0x49ad4c['id'],'submitter_id':_0x1c774d?_0x1c774d['id']:undefined,'assignee_id':_0x1c774d?_0x1c774d['id']:undefined,'tags':getTags(_0x595dd4[_0x6eec('0x12')],_0x6eec('0x13')),'subject':intUtil[_0x6eec('0x14')](_0x595dd4[_0x6eec('0x15')],_0x5e8aba,'\x20'),'description':intUtil['getString'](_0x595dd4[_0x6eec('0x16')],_0x5e8aba,'\x0a'),'comment':{'public':![],'body':intUtil[_0x6eec('0x14')](_0x595dd4[_0x6eec('0x16')],_0x5e8aba,'\x0a')}},getCustomFields(_0x595dd4[_0x6eec('0x17')],_0x5e8aba))}})[_0x6eec('0x18')](function(_0x2b35d6){logger[_0x6eec('0xe')](_0x6eec('0x19'));return _0x2b35d6[_0x6eec('0x1a')];});}function getUser(_0x2ac797,_0x5e2a9b){if(intUtil[_0x6eec('0x1b')](_0x5e2a9b)){logger['info'](_0x6eec('0x1c'),_0x5e2a9b);return request({'uri':util[_0x6eec('0x1d')]('%s/search.json',_0x2ac797[_0x6eec('0x10')]),'qs':{'query':util[_0x6eec('0x1d')](_0x6eec('0x1e'),_0x5e2a9b)}})['then'](function(_0x87f3be){if(_0x87f3be[_0x6eec('0x1f')]){logger[_0x6eec('0xe')](_0x6eec('0x20'));return _[_0x6eec('0x21')](_0x87f3be[_0x6eec('0x22')],{'email':_0x5e2a9b,'role':'agent'});}else{logger[_0x6eec('0xe')](_0x6eec('0x23'));return request({'uri':util[_0x6eec('0x1d')](_0x6eec('0x24'),_0x2ac797[_0x6eec('0x10')])})[_0x6eec('0x18')](function(_0x52f941){logger[_0x6eec('0xe')](_0x6eec('0x25'));return _0x52f941[_0x6eec('0x26')];});}});}else{logger[_0x6eec('0xe')](_0x6eec('0x23'));return request({'uri':util[_0x6eec('0x1d')]('%s/users/me.json',_0x2ac797[_0x6eec('0x10')])})[_0x6eec('0x18')](function(_0xd664f5){logger[_0x6eec('0xe')](_0x6eec('0x25'));return _0xd664f5[_0x6eec('0x26')];});}}function getEndUser(_0x29879c,_0x20bed3,_0x316317){logger['info'](_0x6eec('0x27'),_0x316317);return request({'uri':util[_0x6eec('0x1d')](_0x6eec('0x28'),_0x29879c[_0x6eec('0x10')]),'qs':{'query':util['format'](_0x6eec('0x29'),_0x316317)}})[_0x6eec('0x18')](function(_0x518ba5){var _0x54b446;if(_0x518ba5[_0x6eec('0x22')]['length']){_0x518ba5[_0x6eec('0x22')]=_[_0x6eec('0x2a')](_0x518ba5[_0x6eec('0x22')],{'suspended':![],'role':_0x6eec('0x2b')});if(_0x518ba5[_0x6eec('0x22')][_0x6eec('0x2c')]){_0x54b446=_[_0x6eec('0x2d')](_0x518ba5[_0x6eec('0x22')]);}}if(_0x54b446){logger[_0x6eec('0xe')](_0x6eec('0x2e'));return _0x54b446;}else{logger['info'](_0x6eec('0x2f'));return request({'uri':util['format'](_0x6eec('0x30'),_0x29879c[_0x6eec('0x10')]),'method':_0x6eec('0x31'),'body':{'user':{'role':'end-user','name':util['format']('Caller\x20-\x20%s',_0x20bed3||_0x316317),'phone':_0x316317}}})[_0x6eec('0x18')](function(_0x26b0da){logger[_0x6eec('0xe')](_0x6eec('0x32'));return _0x26b0da[_0x6eec('0x26')];});}});}function getAuth(_0x23547d){var _0x22e0cb;if(_0x23547d[_0x6eec('0x33')]===_0x6eec('0x34')){_0x22e0cb=util[_0x6eec('0x1d')](_0x6eec('0x35'),_0x23547d[_0x6eec('0x36')],_0x23547d['password']);}else if(_0x23547d[_0x6eec('0x33')]===_0x6eec('0x37')){_0x22e0cb=util[_0x6eec('0x1d')]('%s/token:%s',_0x23547d[_0x6eec('0x36')],_0x23547d[_0x6eec('0x37')]);}return util[_0x6eec('0x1d')](_0x6eec('0x38'),new Buffer(_0x22e0cb)[_0x6eec('0x39')](_0x6eec('0x3a')));}function request(_0x4a7699){logger[_0x6eec('0x3b')](_0x6eec('0x3c'),JSON[_0x6eec('0x3d')](_0x4a7699));return rp(_['defaults'](_0x4a7699,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0x28e5fa,_0x297f53){var _0x10960b=[];if(_0x28e5fa&&_0x28e5fa[_0x6eec('0x2c')]>0x0){_0x10960b=_[_0x6eec('0x3e')](_0x28e5fa,_0x297f53);}return _0x10960b;}function getCustomFields(_0x563b99,_0x223dfa){var _0x2c3b14=[];var _0x44118c={'custom_fields':[]};if(_0x563b99[_0x6eec('0x2c')]>0x0){_[_0x6eec('0x3f')](_0x563b99,function(_0x2be999){if(_0x2be999[_0x6eec('0x40')]===_0x6eec('0x41')&&_0x2be999['nameField']&&!_0x2be999[_0x6eec('0x42')]){_0x44118c[_0x2be999[_0x6eec('0x43')]['toLowerCase']()]=_0x2be999['content'][_0x6eec('0x39')]();}else if(_0x2be999[_0x6eec('0x40')]===_0x6eec('0x41')&&_0x2be999[_0x6eec('0x44')]&&_0x2be999['customField']){_0x44118c['custom_fields'][_0x6eec('0x45')]({'id':_0x2be999['idField'],'value':_0x2be999['content'][_0x6eec('0x39')]()});}else if(_0x2be999[_0x6eec('0x40')]===_0x6eec('0x46')&&_0x2be999[_0x6eec('0x47')]&&_0x2be999[_0x6eec('0x44')]&&_0x2be999['customField']){_0x223dfa[_0x2be999[_0x6eec('0x47')]]&&_0x44118c[_0x6eec('0x48')]['push']({'id':_0x2be999[_0x6eec('0x44')],'value':_0x223dfa[_0x2be999[_0x6eec('0x47')]]['toString']()});}else if(_0x2be999[_0x6eec('0x40')]===_0x6eec('0x49')&&_0x2be999['Variable']&&_0x2be999[_0x6eec('0x4a')][_0x6eec('0x13')]&&_0x2be999[_0x6eec('0x44')]&&_0x2be999[_0x6eec('0x42')]){_0x223dfa[_0x2be999['Variable'][_0x6eec('0x13')][_0x6eec('0x4b')]()]&&_0x44118c[_0x6eec('0x48')][_0x6eec('0x45')]({'id':_0x2be999[_0x6eec('0x44')],'value':_0x223dfa[_0x2be999['Variable']['name'][_0x6eec('0x4b')]()][_0x6eec('0x39')]()});}});}return _0x44118c;}exports[_0x6eec('0x4c')]=function(_0x18bcc5,_0x44c7b8,_0x59d7a7,_0x194f2e,_0x545f9d,_0x20524a){var _0x408295,_0x2d7c04;_0x20524a['remoteUri']=intUtil[_0x6eec('0x4d')](_0x20524a[_0x6eec('0x10')]);_0x20524a[_0x6eec('0x4e')]=intUtil[_0x6eec('0x4d')](_0x20524a[_0x6eec('0x4e')]);if(_0x545f9d&&_0x545f9d['monitor_format']){logger[_0x6eec('0xe')]('[QUEUE]','Recording\x20is\x20enabled!');_0x44c7b8[_0x6eec('0x4f')]=util['format'](_0x6eec('0x50'),_0x20524a[_0x6eec('0x4e')],_0x44c7b8[_0x6eec('0x51')],md5(_0x44c7b8['uniqueid']));}else{_0x44c7b8['recordingURL']='';}headers[_0x6eec('0x52')]=getAuth(_0x20524a);return getUser(_0x20524a,_0x194f2e[_0x6eec('0x53')])[_0x6eec('0x18')](function(_0x2d0fc0){_0x408295=_0x2d0fc0;logger[_0x6eec('0xe')](_0x6eec('0x54'),_0x408295['id']);return getEndUser(_0x20524a,_0x44c7b8[_0x6eec('0x55')],_0x44c7b8[_0x6eec('0x56')]);})[_0x6eec('0x18')](function(_0x2a1545){_0x2d7c04=_0x2a1545;logger['info']('The\x20Enduser\x20ID\x20is:',_0x2d7c04['id']);return getTicket(_0x20524a,_0x408295,_0x2d7c04,_0x59d7a7,_0x44c7b8);})[_0x6eec('0x18')](function(_0x2270ce){if(_0x2270ce){logger[_0x6eec('0xe')]('The\x20Ticket\x20ID\x20is:',_0x2270ce['id']);switch(_0x20524a[_0x6eec('0x40')]){case _0x6eec('0x57'):logger[_0x6eec('0xe')](_0x6eec('0x58'),_0x6eec('0x59'));return request({'uri':util[_0x6eec('0x1d')](_0x6eec('0x5a'),_0x20524a[_0x6eec('0x10')],_0x408295['id'],_0x2270ce['id']),'method':'POST'});case _0x6eec('0x5b'):logger[_0x6eec('0xe')](_0x6eec('0x58'),_0x6eec('0x5c'));emit(util['format']('user:%s',_0x194f2e['name']),_0x6eec('0x5d'),{'uri':util[_0x6eec('0x1d')](_0x6eec('0x5e'),_0x20524a[_0x6eec('0x10')],_0x2270ce['id'])});break;default:logger['error']('[QUEUE]',_0x6eec('0x5f'));}}})[_0x6eec('0x60')](function(_0x455241){logger['error'](_0x6eec('0x61'),util[_0x6eec('0x62')](_0x455241,{'showHidden':!![],'depth':null}));});};exports[_0x6eec('0x63')]=function(_0xf957c1,_0x15f1de,_0x4624eb,_0xb72d83,_0x19fe55,_0x45fed3,_0x4e921a){var _0x22cf6c,_0x5e51c9;_0x45fed3[_0x6eec('0x10')]=intUtil[_0x6eec('0x4d')](_0x45fed3[_0x6eec('0x10')]);_0x45fed3[_0x6eec('0x4e')]=intUtil[_0x6eec('0x4d')](_0x45fed3[_0x6eec('0x4e')]);if(_0x4e921a&&_0x4e921a[_0x6eec('0x64')]&&_0x4e921a['recordingFormat']!==_0x6eec('0x65')){logger['info'](_0x6eec('0x66'),'Recording\x20is\x20enabled!');_0x15f1de[_0x6eec('0x4f')]=util[_0x6eec('0x1d')](_0x6eec('0x50'),_0x45fed3[_0x6eec('0x4e')],_0x15f1de[_0x6eec('0x51')],md5(_0x15f1de[_0x6eec('0x51')]));}headers[_0x6eec('0x52')]=getAuth(_0x45fed3);return getUser(_0x45fed3,_0xb72d83[_0x6eec('0x53')])[_0x6eec('0x18')](function(_0x4114d1){_0x22cf6c=_0x4114d1;logger['info']('The\x20User\x20ID\x20is:',_0x22cf6c['id']);return getEndUser(_0x45fed3,_0x15f1de[_0x6eec('0x67')],_0x15f1de[_0x6eec('0x68')]);})[_0x6eec('0x18')](function(_0x2c0644){_0x5e51c9=_0x2c0644;logger[_0x6eec('0xe')]('The\x20Enduser\x20ID\x20is:',_0x5e51c9['id']);return getTicket(_0x45fed3,_0x22cf6c,_0x5e51c9,_0x4624eb,_0x15f1de);})[_0x6eec('0x18')](function(_0x20973e){if(_0x20973e){logger['info']('The\x20Ticket\x20ID\x20is:',_0x20973e['id']);switch(_0x45fed3['type']){case _0x6eec('0x57'):logger[_0x6eec('0xe')]('[OUTBOUND]',_0x6eec('0x59'));return request({'uri':util[_0x6eec('0x1d')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x45fed3[_0x6eec('0x10')],_0x22cf6c['id'],_0x20973e['id']),'method':_0x6eec('0x31')});case _0x6eec('0x5b'):logger[_0x6eec('0xe')]('[OUTBOUND]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x6eec('0x1d')](_0x6eec('0x69'),_0xb72d83[_0x6eec('0x13')]),_0x6eec('0x5d'),{'uri':util[_0x6eec('0x1d')](_0x6eec('0x5e'),_0x45fed3[_0x6eec('0x10')],_0x20973e['id'])});break;default:logger[_0x6eec('0x6a')](_0x6eec('0x66'),_0x6eec('0x5f'));}}})[_0x6eec('0x60')](function(_0x9819f6){logger[_0x6eec('0x6a')](_0x6eec('0x6b'),util[_0x6eec('0x62')](_0x9819f6,{'showHidden':!![],'depth':null}));});};exports[_0x6eec('0x6c')]=function(_0x1af7e3,_0x4dac02,_0x2ef374,_0x2236f7,_0x48bb52,_0x2658c4){var _0x464984,_0x5bdb67;_0x2658c4[_0x6eec('0x10')]=intUtil[_0x6eec('0x4d')](_0x2658c4[_0x6eec('0x10')]);_0x2658c4[_0x6eec('0x4e')]=intUtil['stripTrailingSlash'](_0x2658c4[_0x6eec('0x4e')]);if(_0x48bb52&&_0x48bb52[_0x6eec('0x6d')]){logger[_0x6eec('0xe')](_0x6eec('0x6e'),_0x6eec('0x6f'));_0x4dac02[_0x6eec('0x4f')]=util['format'](_0x6eec('0x50'),_0x2658c4['serverUrl'],_0x4dac02[_0x6eec('0x51')],md5(_0x4dac02[_0x6eec('0x51')]));}else{_0x4dac02[_0x6eec('0x4f')]='';}headers[_0x6eec('0x52')]=getAuth(_0x2658c4);return getUser(_0x2658c4)[_0x6eec('0x18')](function(_0x1b3705){_0x464984=_0x1b3705;logger[_0x6eec('0xe')](_0x6eec('0x54'),_0x464984['id']);return getEndUser(_0x2658c4,_0x4dac02[_0x6eec('0x55')],_0x4dac02['calleridnum']);})[_0x6eec('0x18')](function(_0x12bb71){_0x5bdb67=_0x12bb71;logger[_0x6eec('0xe')]('The\x20Enduser\x20ID\x20is:',_0x5bdb67['id']);return getTicket(_0x2658c4,_0x464984,_0x5bdb67,_0x2ef374,_0x4dac02);})[_0x6eec('0x18')](function(_0x2920dc){if(_0x2920dc){logger['info'](_0x6eec('0x70'),_0x2920dc['id']);}})[_0x6eec('0x60')](function(_0x1b1ae9){logger[_0x6eec('0x6a')](_0x6eec('0x71'),util['inspect'](_0x1b1ae9,{'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 d8da651..7d571ac 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 _0x7d12=['contact_lead','uri','/crm/v2/Contacts/search?criteria=((Phone:equals:','nothing','contact','/crm/v2/Leads/search?criteria=((Phone:equals:','Creating\x20new\x20call...','Owner','administrator','Subject','getString','Subjects','Description','Descriptions','Contacts','Full_Name','First_Name','Leads','What_Id','Last_Name','$se_module','talktime','Call_Duration','utc','mm:ss','answertime','endtime','YYYY-MM-DDTHH:mm:ss','lastevent','Call_Result','complete','connect','rejected','Rejected','abandoned','Abandoned','Call_Start_Time','outbound','starttime','agentcalledAt','Call_Type','Inbound','Fields','Call\x20created!','err','queue','host','stripTrailingSlash','serverUrl','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','/api/voice/recordings/','uniqueid','zoho.eu','com','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Call\x20ID\x20is:','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','Outbound','[ABANDONED]','/downloads?type=uniqueid&token=','lodash','request-promise','util','./util','moment','ioredis','bluebird','../../../../config/environment','../../../../config/logger','zoho','redis','defaults','debug','stringify','length','type','string','idField','content','toString','variable','variableName','Variable','name','toLowerCase','indexOf','split','isNil','access_token','isBefore','expires_in','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','refreshToken','clientId','clientSecret','refresh_token','add','catch','error','Failing\x20creating\x20the\x20access_token','stack','info','Search\x20user','GET','format','ActiveUsers','Zoho-oauthtoken\x20','then','users','findIndex','Using\x20the\x20admin\x20account!','profile','Administrator','user','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','data','enduserType','https://www.zohoapis.','/crm/v2/','startCase','moduleCreate','first_name','last_name','code','SUCCESS','details','Error:\x20','log','moduleSearch'];(function(_0x43d16c,_0x2b5447){var _0x208cce=function(_0x371720){while(--_0x371720){_0x43d16c['push'](_0x43d16c['shift']());}};_0x208cce(++_0x2b5447);}(_0x7d12,0x178));var _0x27d1=function(_0x2a690a,_0x4afc04){_0x2a690a=_0x2a690a-0x0;var _0x8ba65a=_0x7d12[_0x2a690a];return _0x8ba65a;};'use strict';var _=require(_0x27d1('0x0'));var rp=require(_0x27d1('0x1'));var md5=require('md5');var util=require(_0x27d1('0x2'));var intUtil=require(_0x27d1('0x3'));var moment=require(_0x27d1('0x4'));var Redis=require(_0x27d1('0x5'));var BPromise=require(_0x27d1('0x6'));var config=require(_0x27d1('0x7'));var logger=require(_0x27d1('0x8'))(_0x27d1('0x9'));config[_0x27d1('0xa')]=_[_0x27d1('0xb')](config[_0x27d1('0xa')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function emit(_0x36cc97,_0x549a76,_0x1f32f5){io['to'](_0x36cc97)['emit'](_0x549a76,_0x1f32f5);}function request(_0x86c5b7){logger[_0x27d1('0xc')]('[HTTP]',JSON[_0x27d1('0xd')](_0x86c5b7));return rp(_0x86c5b7);}function getCustomFields(_0x516df7,_0x281bf5){var _0x21f38c={};if(_0x516df7[_0x27d1('0xe')]>0x0){_['forEach'](_0x516df7,function(_0x577504){if(_0x577504[_0x27d1('0xf')]===_0x27d1('0x10')&&_0x577504['idField']){_0x21f38c[_0x577504[_0x27d1('0x11')]]=_0x577504[_0x27d1('0x12')][_0x27d1('0x13')]();}else if(_0x577504[_0x27d1('0xf')]===_0x27d1('0x14')&&_0x577504[_0x27d1('0x15')]&&_0x577504[_0x27d1('0x11')]&&_0x281bf5[_0x577504[_0x27d1('0x15')]]){_0x21f38c[_0x577504['idField']]=_0x281bf5[_0x577504[_0x27d1('0x15')]]['toString']();}else if(_0x577504[_0x27d1('0xf')]==='customVariable'&&_0x577504['Variable']&&_0x577504[_0x27d1('0x16')][_0x27d1('0x17')]&&_0x577504[_0x27d1('0x11')]&&_0x281bf5[_0x577504[_0x27d1('0x16')][_0x27d1('0x17')][_0x27d1('0x18')]()]){_0x21f38c[_0x577504['idField']]=_0x281bf5[_0x577504[_0x27d1('0x16')][_0x27d1('0x17')][_0x27d1('0x18')]()][_0x27d1('0x13')]();}});}return _0x21f38c;}function getName(_0x14e971){if(_0x14e971[_0x27d1('0x19')]('\x20')>0x0){var _0x22c54d=_0x14e971[_0x27d1('0x1a')](/ (.+)/);if(_0x22c54d[0x1]){return _0x22c54d;}}return[_0x14e971,_0x14e971];}var accountsTokens={};function getAccessToken(_0x53bc86){return new Promise(function(_0x1cc440,_0x151905){if(!_[_0x27d1('0x1b')](accountsTokens[_0x53bc86['id']])&&!_[_0x27d1('0x1b')](accountsTokens[_0x53bc86['id']][_0x27d1('0x1c')])){if(moment()[_0x27d1('0x1d')](accountsTokens[_0x53bc86['id']][_0x27d1('0x1e')])){_0x1cc440(accountsTokens[_0x53bc86['id']][_0x27d1('0x1c')]);}}var _0x3b5c66;switch(_0x53bc86[_0x27d1('0x1f')]){case'US':_0x3b5c66=_0x27d1('0x20');break;case'AU':_0x3b5c66=_0x27d1('0x21');break;case'EU':_0x3b5c66=_0x27d1('0x22');break;case'IN':_0x3b5c66=_0x27d1('0x23');break;case'CN':_0x3b5c66=_0x27d1('0x24');break;default:_0x3b5c66=_0x27d1('0x22');break;}var _0x1cb80a={'method':_0x27d1('0x25'),'uri':_0x3b5c66+_0x27d1('0x26'),'qs':{'refresh_token':_0x53bc86[_0x27d1('0x27')],'client_id':_0x53bc86[_0x27d1('0x28')],'client_secret':_0x53bc86[_0x27d1('0x29')],'grant_type':_0x27d1('0x2a')},'json':!![]};return rp(_0x1cb80a)['then'](function(_0x73b260){accountsTokens[_0x53bc86['id']]={'access_token':_0x73b260['access_token'],'expires_in':moment()[_0x27d1('0x2b')](_0x73b260[_0x27d1('0x1e')],'seconds')};_0x1cc440(_0x73b260[_0x27d1('0x1c')]);})[_0x27d1('0x2c')](function(_0x236743){logger[_0x27d1('0x2d')](_0x27d1('0x2e'),_0x236743[_0x27d1('0x2f')]);_0x151905(_0x236743);});});}function getUser(_0x2002da,_0x289529,_0x457f01,_0x416322){logger[_0x27d1('0x30')](_0x27d1('0x31'));return request({'method':_0x27d1('0x32'),'uri':util[_0x27d1('0x33')]('https://www.zohoapis.%s/crm/v2/users',_0x289529),'qs':{'type':_0x27d1('0x34')},'headers':{'Authorization':_0x27d1('0x35')+_0x2002da},'json':!![]})[_0x27d1('0x36')](function(_0x27c923){if(_0x27c923[_0x27d1('0x37')]){var _0x3924ce=-0x1;if(_['isArrayLikeObject'](_0x27c923[_0x27d1('0x37')])){if(!_[_0x27d1('0x1b')](_0x416322)){_0x3924ce=_[_0x27d1('0x38')](_0x27c923[_0x27d1('0x37')],function(_0x328996){return _0x328996['email']===_0x416322;});}if(_0x3924ce>=0x0){logger[_0x27d1('0x30')]('Agent\x20found!');}else{logger[_0x27d1('0x30')](_0x27d1('0x39'));_0x3924ce=_[_0x27d1('0x38')](_0x27c923[_0x27d1('0x37')],function(_0xf575ca){return _0xf575ca[_0x27d1('0x3a')][_0x27d1('0x17')]===_0x27d1('0x3b');});}return _0x27c923[_0x27d1('0x37')][_0x3924ce];}else{if(_0x27c923['user'][_0x27d1('0x3a')]['name']===_0x27d1('0x3b')){logger[_0x27d1('0x30')](_0x27d1('0x39'));user=_0x27c923[_0x27d1('0x3c')];return user;}else{logger[_0x27d1('0x2d')](_0x27d1('0x3d'),JSON[_0x27d1('0xd')](_0x27c923));throw new Error(_0x27d1('0x3e')+JSON[_0x27d1('0xd')](_0x27c923));}}}else{logger['error'](_0x27d1('0x3d'),JSON['stringify'](_0x27c923));throw new Error('Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20'+JSON[_0x27d1('0xd')](_0x27c923));}})['catch'](function(_0x43a8de){console[_0x27d1('0x2d')](_0x43a8de);});}function getZohoUser(_0x386f0c,_0x25949c){return new BPromise(function(_0x1c9b51,_0x272496){request(_0x386f0c)[_0x27d1('0x36')](function(_0x1c4c17){var _0x414a9c=null;if(_0x1c4c17){_0x414a9c=_0x1c4c17[_0x27d1('0x3f')][0x0];_0x414a9c[_0x27d1('0x40')]=_0x25949c;}_0x1c9b51(_0x414a9c);})[_0x27d1('0x2c')](function(_0x382f48){_0x272496(_0x382f48);});});}function createEndUser(_0x48220a,_0x352175,_0x3ded54,_0x4e5c0f,_0x592998,_0x5113c8){var _0x3ded54=getName(_0x3ded54);return request({'method':_0x27d1('0x25'),'uri':_0x27d1('0x41')+_0x352175+_0x27d1('0x42')+_[_0x27d1('0x43')](_0x5113c8[_0x27d1('0x44')])+'s','body':{'data':[{'Last_Name':_0x3ded54[0x1],'First_Name':_0x3ded54[0x0],'Phone':_0x4e5c0f,'Owner':{'name':!_[_0x27d1('0x1b')](_0x592998['role'][_0x27d1('0x17')])?_0x592998['role'][_0x27d1('0x17')]:!_[_0x27d1('0x1b')](_0x592998[_0x27d1('0x45')])?_0x592998[_0x27d1('0x45')]+'\x20'+_0x592998[_0x27d1('0x46')]:_0x592998['last_name'],'id':_0x592998['id']}}]},'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x48220a},'json':!![]})[_0x27d1('0x36')](function(_0x4c63d2){if(_0x4c63d2&&_0x4c63d2['data'][0x0][_0x27d1('0x47')]===_0x27d1('0x48')){var _0x455b02=_0x4c63d2[_0x27d1('0x3f')][0x0][_0x27d1('0x49')];_0x455b02[_0x27d1('0x40')]=_[_0x27d1('0x43')](_0x5113c8[_0x27d1('0x44')])+'s';return _0x455b02;}logger[_0x27d1('0x2d')](_0x27d1('0x3d'),JSON[_0x27d1('0xd')](data));throw new Error(_0x27d1('0x4a')+JSON['stringify'](data));})[_0x27d1('0x2c')](function(_0x263eda){console[_0x27d1('0x4b')]('CREATE\x20ERROR',_0x263eda);});}function getEndUser(_0x2903b5,_0x2a7661,_0x331b39,_0x1615dc,_0x13d000,_0x58b145,_0x3e768e){var _0x36a2a8={'method':_0x27d1('0x32'),'uri':'','headers':{'Authorization':_0x27d1('0x35')+_0x2903b5},'json':!![]};switch(_0x3e768e[_0x27d1('0x4c')]){case _0x27d1('0x4d'):_0x36a2a8[_0x27d1('0x4e')]=_0x27d1('0x41')+_0x2a7661+_0x27d1('0x4f')+_0x13d000+'))';return getZohoUser(_0x36a2a8,'Contacts')[_0x27d1('0x36')](function(_0x56dde7){if(_0x56dde7)return _0x56dde7;_0x36a2a8[_0x27d1('0x4e')]=_0x27d1('0x41')+_0x2a7661+'/crm/v2/Leads/search?criteria=((Phone:equals:'+_0x13d000+'))';return getZohoUser(_0x36a2a8,'Leads')['then'](function(_0x57fb32){if(_0x57fb32)return _0x57fb32;if(_0x3e768e[_0x27d1('0x44')]!=_0x27d1('0x50')){return createEndUser(_0x2903b5,_0x2a7661,_0x1615dc,_0x13d000,_0x58b145,_0x3e768e);}else{return{};}});});break;case _0x27d1('0x51'):_0x36a2a8['uri']=_0x27d1('0x41')+_0x2a7661+'/crm/v2/Contacts/search?criteria=((Phone:equals:'+_0x13d000+'))';return getZohoUser(_0x36a2a8,'Contacts')['then'](function(_0x24b078){if(_0x24b078)return _0x24b078;if(_0x3e768e['moduleCreate']!=_0x27d1('0x50')){return createEndUser(_0x2903b5,_0x2a7661,_0x1615dc,_0x13d000,_0x58b145,_0x3e768e);}else{return{};}});break;case'lead':_0x36a2a8[_0x27d1('0x4e')]=_0x27d1('0x41')+_0x2a7661+_0x27d1('0x52')+_0x13d000+'))';return getZohoUser(_0x36a2a8,'Leads')['then'](function(_0xa1ad2a){if(_0xa1ad2a)return _0xa1ad2a;if(_0x3e768e[_0x27d1('0x44')]!='nothing'){return createEndUser(_0x2903b5,_0x2a7661,_0x1615dc,_0x13d000,_0x58b145,_0x3e768e);}else{return{};}});break;}}function getCall(_0x3f94cc,_0x56e5ee,_0x1f0850,_0x1f7e52,_0x319dcd,_0x33b8ab,_0x86de47,_0xe078a6){logger[_0x27d1('0x30')](_0x27d1('0x53'));var _0x45edc8={};_0x45edc8[_0x27d1('0x54')]={'name':!_['isNil'](_0x1f7e52['role']['name'])&&!_[_0x27d1('0x1b')](_0x1f7e52[_0x27d1('0x3a')][_0x27d1('0x17')])&&_0x1f7e52[_0x27d1('0x3a')][_0x27d1('0x17')]===_0x27d1('0x55')?_0x1f7e52['role']['name']:!_[_0x27d1('0x1b')](_0x1f7e52[_0x27d1('0x45')])?_0x1f7e52[_0x27d1('0x45')]+'\x20'+_0x1f7e52[_0x27d1('0x46')]:_0x1f7e52['last_name'],'id':_0x1f7e52['id']};_0x45edc8[_0x27d1('0x56')]=intUtil[_0x27d1('0x57')](_0x33b8ab[_0x27d1('0x58')],_0x86de47,'\x20');_0x45edc8[_0x27d1('0x59')]=intUtil[_0x27d1('0x57')](_0x33b8ab[_0x27d1('0x5a')],_0x86de47,'\x0a');if(_0x319dcd[_0x27d1('0x40')]===_0x27d1('0x5b')){_0x45edc8['Who_Id']={'name':!_[_0x27d1('0x1b')](_0x319dcd[_0x27d1('0x5c')])?_0x319dcd[_0x27d1('0x5c')]:!_[_0x27d1('0x1b')](_0x319dcd[_0x27d1('0x5d')])?_0x319dcd['First_Name']+'\x20'+_0x319dcd['Last_Name']:_0x319dcd['Last_Name'],'id':_0x319dcd['id']};}if(_0x319dcd[_0x27d1('0x40')]===_0x27d1('0x5e')){_0x45edc8[_0x27d1('0x5f')]={'name':!_['isNil'](_0x319dcd['Full_Name'])?_0x319dcd[_0x27d1('0x5c')]:!_[_0x27d1('0x1b')](_0x319dcd[_0x27d1('0x5d')])?_0x319dcd[_0x27d1('0x5d')]+'\x20'+_0x319dcd['Last_Name']:_0x319dcd[_0x27d1('0x60')],'id':_0x319dcd['id']};_0x45edc8[_0x27d1('0x61')]=_['startCase'](_0x319dcd[_0x27d1('0x40')]);}if(_0x86de47[_0x27d1('0x62')]){_0x45edc8[_0x27d1('0x63')]=moment[_0x27d1('0x64')](parseInt(_0x86de47[_0x27d1('0x62')])*0x3e8)[_0x27d1('0x33')](_0x27d1('0x65'));}else if(_0x86de47[_0x27d1('0x66')]&&_0x86de47[_0x27d1('0x67')]){_0x45edc8[_0x27d1('0x63')]=moment['utc'](moment(_0x86de47[_0x27d1('0x67')],_0x27d1('0x68'))['diff'](moment(_0x86de47['starttime'],'YYYY-MM-DDTHH:mm:ss')))[_0x27d1('0x33')](_0x27d1('0x65'));}switch(_0x86de47[_0x27d1('0x69')]){case'called':_0x45edc8[_0x27d1('0x6a')]='Called';break;case _0x27d1('0x6b'):case _0x27d1('0x6c'):_0x45edc8[_0x27d1('0x6a')]='Answered';break;case _0x27d1('0x6d'):_0x45edc8[_0x27d1('0x6a')]=_0x27d1('0x6e');break;case _0x27d1('0x6f'):_0x45edc8[_0x27d1('0x6a')]=_0x27d1('0x70');break;default:}_0x45edc8[_0x27d1('0x71')]=(_0xe078a6===_0x27d1('0x72')?moment(_0x86de47[_0x27d1('0x73')])[_0x27d1('0x33')](_0x27d1('0x68')):moment(_0x86de47[_0x27d1('0x74')])['format'](_0x27d1('0x68')))||moment()[_0x27d1('0x33')](_0x27d1('0x68'));_0x45edc8[_0x27d1('0x75')]=_0xe078a6||_0x27d1('0x76');_0x45edc8=_['merge'](_0x45edc8,getCustomFields(_0x33b8ab[_0x27d1('0x77')],_0x86de47));return request({'method':_0x27d1('0x25'),'uri':_0x27d1('0x41')+_0x56e5ee+'/crm/v2/Calls','headers':{'Authorization':_0x27d1('0x35')+_0x3f94cc},'body':{'data':[_0x45edc8]},'json':!![]})[_0x27d1('0x36')](function(_0x361a34){if(_0x361a34&&_0x361a34['data'][0x0][_0x27d1('0x47')]===_0x27d1('0x48')){logger[_0x27d1('0x30')](_0x27d1('0x78'));return{'id':_0x361a34['data'][0x0][_0x27d1('0x49')]['id']};}})[_0x27d1('0x2c')](function(_0xaa999c){logger[_0x27d1('0x30')](_0x27d1('0x79'),_0xaa999c['stack']);console[_0x27d1('0x4b')](_0x27d1('0x79'),_0xaa999c);});}exports[_0x27d1('0x7a')]=function(_0x34f399,_0x5778e4,_0x49d599,_0x22257e,_0x47de03,_0x3ae0dc){var _0x1c4a74,_0x269a2b,_0xa4894b;_0x3ae0dc[_0x27d1('0x7b')]=intUtil[_0x27d1('0x7c')](_0x3ae0dc[_0x27d1('0x7b')]);_0x3ae0dc[_0x27d1('0x7d')]=intUtil[_0x27d1('0x7c')](_0x3ae0dc[_0x27d1('0x7d')]);if(_0x47de03&&_0x47de03['monitor_format']){logger[_0x27d1('0x30')](_0x27d1('0x7e'),_0x27d1('0x7f'));_0x5778e4[_0x27d1('0x80')]=_0x3ae0dc[_0x27d1('0x7d')]+_0x27d1('0x81')+_0x5778e4[_0x27d1('0x82')]+'/downloads?type=uniqueid&token='+md5(_0x5778e4[_0x27d1('0x82')]);}else{_0x5778e4[_0x27d1('0x80')]='';}var _0x31116c=_0x3ae0dc[_0x27d1('0x7b')]===_0x27d1('0x83')?'eu':_0x27d1('0x84');return getAccessToken(_0x3ae0dc)[_0x27d1('0x36')](function(_0x3850d1){_0xa4894b=_0x3850d1;return getUser(_0xa4894b,_0x31116c,_0x3ae0dc,_0x22257e[_0x27d1('0x85')]);})['then'](function(_0x31e00e){_0x1c4a74=_0x31e00e;logger[_0x27d1('0x30')](_0x27d1('0x86'),_0x1c4a74['id']);return getEndUser(_0xa4894b,_0x31116c,_0x3ae0dc,_0x5778e4[_0x27d1('0x87')],_0x5778e4[_0x27d1('0x88')],_0x1c4a74,_0x49d599);})['then'](function(_0x25bfd6){_0x269a2b=_0x25bfd6;return getCall(_0xa4894b,_0x31116c,_0x3ae0dc,_0x1c4a74,_0x269a2b,_0x49d599,_0x5778e4,'Inbound');})['then'](function(_0x8a82ce){if(_0x8a82ce){logger[_0x27d1('0x30')](_0x27d1('0x89'),_0x8a82ce['id']);logger[_0x27d1('0x30')](_0x27d1('0x7e'),_0x27d1('0x8a'));emit(util['format'](_0x27d1('0x8b'),_0x22257e['name']),_0x27d1('0x8c'),{'uri':_0x27d1('0x8d')+_0x3ae0dc[_0x27d1('0x7b')]+_0x27d1('0x8e')+_0x8a82ce['id']});}})[_0x27d1('0x2c')](function(_0x3b37f1){logger[_0x27d1('0x2d')](_0x27d1('0x7e'),JSON[_0x27d1('0xd')](_0x3b37f1));});};exports[_0x27d1('0x72')]=function(_0x26bc07,_0x40725c,_0x5db4a7,_0x5d00cc,_0x391e2b,_0x23bc96,_0x4b23a1){var _0x287123,_0x3146ba,_0x8ada16;_0x23bc96[_0x27d1('0x7b')]=intUtil[_0x27d1('0x7c')](_0x23bc96['host']);_0x23bc96[_0x27d1('0x7d')]=intUtil[_0x27d1('0x7c')](_0x23bc96[_0x27d1('0x7d')]);if(_0x4b23a1&&_0x4b23a1[_0x27d1('0x8f')]&&_0x4b23a1[_0x27d1('0x8f')]!==_0x27d1('0x90')){logger['info'](_0x27d1('0x91'),_0x27d1('0x7f'));_0x40725c[_0x27d1('0x80')]=_0x23bc96[_0x27d1('0x7d')]+_0x27d1('0x81')+_0x40725c[_0x27d1('0x82')]+'/downloads?type=uniqueid&token='+md5(_0x40725c[_0x27d1('0x82')]);}var _0x53a21e=_0x23bc96[_0x27d1('0x7b')]==='zoho.eu'?'eu':_0x27d1('0x84');return getAccessToken(_0x23bc96)[_0x27d1('0x36')](function(_0xe744a2){_0x8ada16=_0xe744a2;return getUser(_0x8ada16,_0x53a21e,_0x23bc96,_0x5d00cc[_0x27d1('0x85')]);})[_0x27d1('0x36')](function(_0x39e3b1){_0x287123=_0x39e3b1;logger[_0x27d1('0x30')](_0x27d1('0x86'),_0x287123['id']);return getEndUser(_0x8ada16,_0x53a21e,_0x23bc96,_0x40725c[_0x27d1('0x92')],_0x40725c[_0x27d1('0x93')],_0x287123,_0x5db4a7);})['then'](function(_0x4486aa){_0x3146ba=_0x4486aa;return getCall(_0x8ada16,_0x53a21e,_0x23bc96,_0x287123,_0x3146ba,_0x5db4a7,_0x40725c,_0x27d1('0x94'));})[_0x27d1('0x36')](function(_0x5ceb5c){if(_0x5ceb5c){logger[_0x27d1('0x30')](_0x27d1('0x89'),_0x5ceb5c['id']);logger[_0x27d1('0x30')]('[OUTBOUND]','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x27d1('0x33')](_0x27d1('0x8b'),_0x5d00cc[_0x27d1('0x17')]),_0x27d1('0x8c'),{'uri':_0x27d1('0x8d')+_0x23bc96[_0x27d1('0x7b')]+_0x27d1('0x8e')+_0x5ceb5c['id']});}})[_0x27d1('0x2c')](function(_0x5fce6d){logger[_0x27d1('0x2d')]('[OUTBOUND]',JSON[_0x27d1('0xd')](_0x5fce6d));});};exports[_0x27d1('0x6f')]=function(_0xf7031f,_0x49d99b,_0x37a60b,_0x31d3c9,_0x54a445,_0xda693e){var _0x17c117,_0x2f85c0,_0x279744;_0xda693e['host']=intUtil['stripTrailingSlash'](_0xda693e[_0x27d1('0x7b')]);_0xda693e[_0x27d1('0x7d')]=intUtil[_0x27d1('0x7c')](_0xda693e['serverUrl']);if(_0x54a445&&_0x54a445['monitor_format']){logger[_0x27d1('0x30')](_0x27d1('0x95'),_0x27d1('0x7f'));_0x49d99b[_0x27d1('0x80')]=_0xda693e[_0x27d1('0x7d')]+'/api/voice/recordings/'+_0x49d99b[_0x27d1('0x82')]+_0x27d1('0x96')+md5(_0x49d99b['uniqueid']);}else{_0x49d99b[_0x27d1('0x80')]='';}var _0x3bb69c=_0xda693e[_0x27d1('0x7b')]===_0x27d1('0x83')?'eu':_0x27d1('0x84');return getAccessToken(_0xda693e)[_0x27d1('0x36')](function(_0x11a27f){_0x279744=_0x11a27f;return getUser(_0x279744,_0x3bb69c,_0xda693e);})[_0x27d1('0x36')](function(_0x5d2bdc){_0x17c117=_0x5d2bdc;logger[_0x27d1('0x30')](_0x27d1('0x86'),_0x17c117['id']);return getEndUser(_0x279744,_0x3bb69c,_0xda693e,_0x49d99b[_0x27d1('0x87')],_0x49d99b[_0x27d1('0x88')],_0x17c117,_0x37a60b);})[_0x27d1('0x36')](function(_0x11ea9b){_0x2f85c0=_0x11ea9b;return getCall(_0x279744,_0x3bb69c,_0xda693e,_0x17c117,_0x2f85c0,_0x37a60b,_0x49d99b,_0x27d1('0x76'));})[_0x27d1('0x36')](function(_0x410246){if(_0x410246){logger['info'](_0x27d1('0x89'),_0x410246['id']);}})[_0x27d1('0x2c')](function(_0x2344c2){logger[_0x27d1('0x2d')](_0x27d1('0x95'),JSON['stringify'](_0x2344c2));});};
\ No newline at end of file
+var _0xd33b=['[HTTP]','stringify','string','idField','content','toString','type','variable','variableName','customVariable','Variable','name','toLowerCase','split','isNil','access_token','isBefore','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','clientId','clientSecret','then','add','expires_in','seconds','catch','error','Failing\x20creating\x20the\x20access_token','stack','info','Search\x20user','GET','format','https://www.zohoapis.%s/crm/v2/users','ActiveUsers','Zoho-oauthtoken\x20','users','isArrayLikeObject','findIndex','email','Agent\x20found!','profile','Administrator','user','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','enduserType','https://www.zohoapis.','/crm/v2/','startCase','moduleCreate','role','first_name','last_name','code','SUCCESS','data','details','Error:\x20','log','CREATE\x20ERROR','moduleSearch','contact_lead','uri','/crm/v2/Leads/search?criteria=((Phone:equals:','nothing','contact','/crm/v2/Contacts/search?criteria=((Phone:equals:','Contacts','Leads','Creating\x20new\x20call...','Owner','administrator','Subject','getString','Subjects','Who_Id','Full_Name','First_Name','Last_Name','$se_module','talktime','utc','mm:ss','answertime','endtime','Call_Duration','diff','starttime','lastevent','Call_Result','Called','complete','connect','Answered','rejected','abandoned','Call_Start_Time','outbound','YYYY-MM-DDTHH:mm:ss','agentcalledAt','Call_Type','Inbound','Fields','err','queue','host','serverUrl','stripTrailingSlash','[QUEUE]','Recording\x20is\x20enabled!','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','recordingURL','zoho.eu','com','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Call\x20ID\x20is:','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','[OUTBOUND]','destcalleridnum','Outbound','trigger:browser:url','monitor_format','[ABANDONED]','request-promise','md5','moment','ioredis','bluebird','../../../../config/environment','../../../../config/logger','zoho','redis','defaults','localhost','socket.io-emitter','debug'];(function(_0x4ece2f,_0xe15b55){var _0x5b662f=function(_0x110f8c){while(--_0x110f8c){_0x4ece2f['push'](_0x4ece2f['shift']());}};_0x5b662f(++_0xe15b55);}(_0xd33b,0x123));var _0xbd33=function(_0x23bbac,_0x5eef01){_0x23bbac=_0x23bbac-0x0;var _0x1cc160=_0xd33b[_0x23bbac];return _0x1cc160;};'use strict';var _=require('lodash');var rp=require(_0xbd33('0x0'));var md5=require(_0xbd33('0x1'));var util=require('util');var intUtil=require('./util');var moment=require(_0xbd33('0x2'));var Redis=require(_0xbd33('0x3'));var BPromise=require(_0xbd33('0x4'));var config=require(_0xbd33('0x5'));var logger=require(_0xbd33('0x6'))(_0xbd33('0x7'));config[_0xbd33('0x8')]=_[_0xbd33('0x9')](config[_0xbd33('0x8')],{'host':_0xbd33('0xa'),'port':0x18eb});var io=require(_0xbd33('0xb'))(new Redis(config[_0xbd33('0x8')]));function emit(_0x24e01e,_0x1799de,_0xbfbdc5){io['to'](_0x24e01e)['emit'](_0x1799de,_0xbfbdc5);}function request(_0x11e57e){logger[_0xbd33('0xc')](_0xbd33('0xd'),JSON[_0xbd33('0xe')](_0x11e57e));return rp(_0x11e57e);}function getCustomFields(_0x4efb26,_0x5716f5){var _0x594bb5={};if(_0x4efb26['length']>0x0){_['forEach'](_0x4efb26,function(_0x470694){if(_0x470694['type']===_0xbd33('0xf')&&_0x470694['idField']){_0x594bb5[_0x470694[_0xbd33('0x10')]]=_0x470694[_0xbd33('0x11')][_0xbd33('0x12')]();}else if(_0x470694[_0xbd33('0x13')]===_0xbd33('0x14')&&_0x470694[_0xbd33('0x15')]&&_0x470694[_0xbd33('0x10')]&&_0x5716f5[_0x470694[_0xbd33('0x15')]]){_0x594bb5[_0x470694[_0xbd33('0x10')]]=_0x5716f5[_0x470694[_0xbd33('0x15')]][_0xbd33('0x12')]();}else if(_0x470694['type']===_0xbd33('0x16')&&_0x470694[_0xbd33('0x17')]&&_0x470694[_0xbd33('0x17')][_0xbd33('0x18')]&&_0x470694[_0xbd33('0x10')]&&_0x5716f5[_0x470694[_0xbd33('0x17')][_0xbd33('0x18')][_0xbd33('0x19')]()]){_0x594bb5[_0x470694[_0xbd33('0x10')]]=_0x5716f5[_0x470694[_0xbd33('0x17')][_0xbd33('0x18')][_0xbd33('0x19')]()][_0xbd33('0x12')]();}});}return _0x594bb5;}function getName(_0x37f1d1){if(_0x37f1d1['indexOf']('\x20')>0x0){var _0x2cc598=_0x37f1d1[_0xbd33('0x1a')](/ (.+)/);if(_0x2cc598[0x1]){return _0x2cc598;}}return[_0x37f1d1,_0x37f1d1];}var accountsTokens={};function getAccessToken(_0x13dc7d){return new Promise(function(_0x278b03,_0x22a734){if(!_[_0xbd33('0x1b')](accountsTokens[_0x13dc7d['id']])&&!_[_0xbd33('0x1b')](accountsTokens[_0x13dc7d['id']][_0xbd33('0x1c')])){if(moment()[_0xbd33('0x1d')](accountsTokens[_0x13dc7d['id']]['expires_in'])){_0x278b03(accountsTokens[_0x13dc7d['id']][_0xbd33('0x1c')]);}}var _0x377018;switch(_0x13dc7d[_0xbd33('0x1e')]){case'US':_0x377018=_0xbd33('0x1f');break;case'AU':_0x377018=_0xbd33('0x20');break;case'EU':_0x377018=_0xbd33('0x21');break;case'IN':_0x377018=_0xbd33('0x22');break;case'CN':_0x377018=_0xbd33('0x23');break;default:_0x377018=_0xbd33('0x21');break;}var _0xe8315a={'method':_0xbd33('0x24'),'uri':_0x377018+_0xbd33('0x25'),'qs':{'refresh_token':_0x13dc7d['refreshToken'],'client_id':_0x13dc7d[_0xbd33('0x26')],'client_secret':_0x13dc7d[_0xbd33('0x27')],'grant_type':'refresh_token'},'json':!![]};return rp(_0xe8315a)[_0xbd33('0x28')](function(_0x2dd99e){accountsTokens[_0x13dc7d['id']]={'access_token':_0x2dd99e[_0xbd33('0x1c')],'expires_in':moment()[_0xbd33('0x29')](_0x2dd99e[_0xbd33('0x2a')],_0xbd33('0x2b'))};_0x278b03(_0x2dd99e[_0xbd33('0x1c')]);})[_0xbd33('0x2c')](function(_0x5de660){logger[_0xbd33('0x2d')](_0xbd33('0x2e'),_0x5de660[_0xbd33('0x2f')]);_0x22a734(_0x5de660);});});}function getUser(_0x5ba3d9,_0x2e7424,_0x248500,_0x3f530d){logger[_0xbd33('0x30')](_0xbd33('0x31'));return request({'method':_0xbd33('0x32'),'uri':util[_0xbd33('0x33')](_0xbd33('0x34'),_0x2e7424),'qs':{'type':_0xbd33('0x35')},'headers':{'Authorization':_0xbd33('0x36')+_0x5ba3d9},'json':!![]})[_0xbd33('0x28')](function(_0x25ea49){if(_0x25ea49[_0xbd33('0x37')]){var _0x500cde=-0x1;if(_[_0xbd33('0x38')](_0x25ea49[_0xbd33('0x37')])){if(!_['isNil'](_0x3f530d)){_0x500cde=_[_0xbd33('0x39')](_0x25ea49[_0xbd33('0x37')],function(_0x2694a5){return _0x2694a5[_0xbd33('0x3a')]===_0x3f530d;});}if(_0x500cde>=0x0){logger[_0xbd33('0x30')](_0xbd33('0x3b'));}else{logger[_0xbd33('0x30')]('Using\x20the\x20admin\x20account!');_0x500cde=_[_0xbd33('0x39')](_0x25ea49[_0xbd33('0x37')],function(_0x481f73){return _0x481f73[_0xbd33('0x3c')]['name']===_0xbd33('0x3d');});}return _0x25ea49[_0xbd33('0x37')][_0x500cde];}else{if(_0x25ea49[_0xbd33('0x3e')][_0xbd33('0x3c')]['name']==='Administrator'){logger[_0xbd33('0x30')]('Using\x20the\x20admin\x20account!');user=_0x25ea49['user'];return user;}else{logger['error'](_0xbd33('0x3f'),JSON[_0xbd33('0xe')](_0x25ea49));throw new Error(_0xbd33('0x40')+JSON[_0xbd33('0xe')](_0x25ea49));}}}else{logger[_0xbd33('0x2d')](_0xbd33('0x3f'),JSON[_0xbd33('0xe')](_0x25ea49));throw new Error(_0xbd33('0x40')+JSON[_0xbd33('0xe')](_0x25ea49));}})[_0xbd33('0x2c')](function(_0x196313){console['error'](_0x196313);});}function getZohoUser(_0x23e0af,_0x5cae10){return new BPromise(function(_0x279b99,_0x189136){request(_0x23e0af)[_0xbd33('0x28')](function(_0x1d2f98){var _0xdaacc7=null;if(_0x1d2f98){_0xdaacc7=_0x1d2f98['data'][0x0];_0xdaacc7[_0xbd33('0x41')]=_0x5cae10;}_0x279b99(_0xdaacc7);})[_0xbd33('0x2c')](function(_0x32e594){_0x189136(_0x32e594);});});}function createEndUser(_0x46eec5,_0x2b2117,_0x4a37a6,_0x365bd9,_0xc2dbcf,_0x5f4662){var _0x4a37a6=getName(_0x4a37a6);return request({'method':_0xbd33('0x24'),'uri':_0xbd33('0x42')+_0x2b2117+_0xbd33('0x43')+_[_0xbd33('0x44')](_0x5f4662[_0xbd33('0x45')])+'s','body':{'data':[{'Last_Name':_0x4a37a6[0x1],'First_Name':_0x4a37a6[0x0],'Phone':_0x365bd9,'Owner':{'name':!_[_0xbd33('0x1b')](_0xc2dbcf[_0xbd33('0x46')][_0xbd33('0x18')])?_0xc2dbcf[_0xbd33('0x46')][_0xbd33('0x18')]:!_[_0xbd33('0x1b')](_0xc2dbcf[_0xbd33('0x47')])?_0xc2dbcf['first_name']+'\x20'+_0xc2dbcf[_0xbd33('0x48')]:_0xc2dbcf[_0xbd33('0x48')],'id':_0xc2dbcf['id']}}]},'headers':{'Authorization':_0xbd33('0x36')+_0x46eec5},'json':!![]})['then'](function(_0x499a83){if(_0x499a83&&_0x499a83['data'][0x0][_0xbd33('0x49')]===_0xbd33('0x4a')){var _0x20353a=_0x499a83[_0xbd33('0x4b')][0x0][_0xbd33('0x4c')];_0x20353a[_0xbd33('0x41')]=_[_0xbd33('0x44')](_0x5f4662[_0xbd33('0x45')])+'s';return _0x20353a;}logger['error'](_0xbd33('0x3f'),JSON['stringify'](data));throw new Error(_0xbd33('0x4d')+JSON[_0xbd33('0xe')](data));})['catch'](function(_0x3f0221){console[_0xbd33('0x4e')](_0xbd33('0x4f'),_0x3f0221);});}function getEndUser(_0x13945c,_0x41f1f4,_0x5951b8,_0x52d6c5,_0x7c465a,_0x51932c,_0x222567){var _0x1cb452={'method':_0xbd33('0x32'),'uri':'','headers':{'Authorization':_0xbd33('0x36')+_0x13945c},'json':!![]};switch(_0x222567[_0xbd33('0x50')]){case _0xbd33('0x51'):_0x1cb452[_0xbd33('0x52')]=_0xbd33('0x42')+_0x41f1f4+'/crm/v2/Contacts/search?criteria=((Phone:equals:'+_0x7c465a+'))';return getZohoUser(_0x1cb452,'Contacts')[_0xbd33('0x28')](function(_0x1eb713){if(_0x1eb713)return _0x1eb713;_0x1cb452[_0xbd33('0x52')]='https://www.zohoapis.'+_0x41f1f4+_0xbd33('0x53')+_0x7c465a+'))';return getZohoUser(_0x1cb452,'Leads')['then'](function(_0x46ba05){if(_0x46ba05)return _0x46ba05;if(_0x222567['moduleCreate']!=_0xbd33('0x54')){return createEndUser(_0x13945c,_0x41f1f4,_0x52d6c5,_0x7c465a,_0x51932c,_0x222567);}else{return{};}});});break;case _0xbd33('0x55'):_0x1cb452[_0xbd33('0x52')]=_0xbd33('0x42')+_0x41f1f4+_0xbd33('0x56')+_0x7c465a+'))';return getZohoUser(_0x1cb452,_0xbd33('0x57'))['then'](function(_0x462b7d){if(_0x462b7d)return _0x462b7d;if(_0x222567[_0xbd33('0x45')]!='nothing'){return createEndUser(_0x13945c,_0x41f1f4,_0x52d6c5,_0x7c465a,_0x51932c,_0x222567);}else{return{};}});break;case'lead':_0x1cb452[_0xbd33('0x52')]=_0xbd33('0x42')+_0x41f1f4+_0xbd33('0x53')+_0x7c465a+'))';return getZohoUser(_0x1cb452,_0xbd33('0x58'))['then'](function(_0x56fa6c){if(_0x56fa6c)return _0x56fa6c;if(_0x222567[_0xbd33('0x45')]!=_0xbd33('0x54')){return createEndUser(_0x13945c,_0x41f1f4,_0x52d6c5,_0x7c465a,_0x51932c,_0x222567);}else{return{};}});break;}}function getCall(_0x55b9ea,_0x351f36,_0x337ec5,_0x35976e,_0x145e87,_0x3e5aed,_0x50c51d,_0x45438d){logger['info'](_0xbd33('0x59'));var _0x4a561d={};_0x4a561d[_0xbd33('0x5a')]={'name':!_['isNil'](_0x35976e['role'][_0xbd33('0x18')])&&!_[_0xbd33('0x1b')](_0x35976e[_0xbd33('0x3c')]['name'])&&_0x35976e[_0xbd33('0x3c')]['name']===_0xbd33('0x5b')?_0x35976e[_0xbd33('0x46')]['name']:!_[_0xbd33('0x1b')](_0x35976e[_0xbd33('0x47')])?_0x35976e[_0xbd33('0x47')]+'\x20'+_0x35976e[_0xbd33('0x48')]:_0x35976e[_0xbd33('0x48')],'id':_0x35976e['id']};_0x4a561d[_0xbd33('0x5c')]=intUtil[_0xbd33('0x5d')](_0x3e5aed[_0xbd33('0x5e')],_0x50c51d,'\x20');_0x4a561d['Description']=intUtil[_0xbd33('0x5d')](_0x3e5aed['Descriptions'],_0x50c51d,'\x0a');if(_0x145e87['enduserType']==='Contacts'){_0x4a561d[_0xbd33('0x5f')]={'name':!_[_0xbd33('0x1b')](_0x145e87[_0xbd33('0x60')])?_0x145e87[_0xbd33('0x60')]:!_[_0xbd33('0x1b')](_0x145e87[_0xbd33('0x61')])?_0x145e87[_0xbd33('0x61')]+'\x20'+_0x145e87[_0xbd33('0x62')]:_0x145e87[_0xbd33('0x62')],'id':_0x145e87['id']};}if(_0x145e87[_0xbd33('0x41')]===_0xbd33('0x58')){_0x4a561d['What_Id']={'name':!_['isNil'](_0x145e87[_0xbd33('0x60')])?_0x145e87['Full_Name']:!_[_0xbd33('0x1b')](_0x145e87[_0xbd33('0x61')])?_0x145e87['First_Name']+'\x20'+_0x145e87[_0xbd33('0x62')]:_0x145e87[_0xbd33('0x62')],'id':_0x145e87['id']};_0x4a561d[_0xbd33('0x63')]=_[_0xbd33('0x44')](_0x145e87[_0xbd33('0x41')]);}if(_0x50c51d[_0xbd33('0x64')]){_0x4a561d['Call_Duration']=moment[_0xbd33('0x65')](parseInt(_0x50c51d[_0xbd33('0x64')])*0x3e8)[_0xbd33('0x33')](_0xbd33('0x66'));}else if(_0x50c51d[_0xbd33('0x67')]&&_0x50c51d[_0xbd33('0x68')]){_0x4a561d[_0xbd33('0x69')]=moment['utc'](moment(_0x50c51d['endtime'],'YYYY-MM-DDTHH:mm:ss')[_0xbd33('0x6a')](moment(_0x50c51d[_0xbd33('0x6b')],'YYYY-MM-DDTHH:mm:ss')))['format'](_0xbd33('0x66'));}switch(_0x50c51d[_0xbd33('0x6c')]){case'called':_0x4a561d[_0xbd33('0x6d')]=_0xbd33('0x6e');break;case _0xbd33('0x6f'):case _0xbd33('0x70'):_0x4a561d[_0xbd33('0x6d')]=_0xbd33('0x71');break;case _0xbd33('0x72'):_0x4a561d[_0xbd33('0x6d')]='Rejected';break;case _0xbd33('0x73'):_0x4a561d['Call_Result']='Abandoned';break;default:}_0x4a561d[_0xbd33('0x74')]=(_0x45438d===_0xbd33('0x75')?moment(_0x50c51d[_0xbd33('0x6b')])['format'](_0xbd33('0x76')):moment(_0x50c51d[_0xbd33('0x77')])[_0xbd33('0x33')](_0xbd33('0x76')))||moment()[_0xbd33('0x33')]('YYYY-MM-DDTHH:mm:ss');_0x4a561d[_0xbd33('0x78')]=_0x45438d||_0xbd33('0x79');_0x4a561d=_['merge'](_0x4a561d,getCustomFields(_0x3e5aed[_0xbd33('0x7a')],_0x50c51d));return request({'method':_0xbd33('0x24'),'uri':_0xbd33('0x42')+_0x351f36+'/crm/v2/Calls','headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x55b9ea},'body':{'data':[_0x4a561d]},'json':!![]})[_0xbd33('0x28')](function(_0x5471ea){if(_0x5471ea&&_0x5471ea['data'][0x0][_0xbd33('0x49')]===_0xbd33('0x4a')){logger[_0xbd33('0x30')]('Call\x20created!');return{'id':_0x5471ea['data'][0x0]['details']['id']};}})[_0xbd33('0x2c')](function(_0x3bed18){logger[_0xbd33('0x30')](_0xbd33('0x7b'),_0x3bed18[_0xbd33('0x2f')]);console[_0xbd33('0x4e')](_0xbd33('0x7b'),_0x3bed18);});}exports[_0xbd33('0x7c')]=function(_0x404a7e,_0x3ff06f,_0x28219f,_0xc1d0d2,_0x44c7f5,_0x1bfdfe){var _0x4399ba,_0x107485,_0x5b6736;_0x1bfdfe['host']=intUtil['stripTrailingSlash'](_0x1bfdfe[_0xbd33('0x7d')]);_0x1bfdfe[_0xbd33('0x7e')]=intUtil[_0xbd33('0x7f')](_0x1bfdfe[_0xbd33('0x7e')]);if(_0x44c7f5&&_0x44c7f5['monitor_format']){logger[_0xbd33('0x30')](_0xbd33('0x80'),_0xbd33('0x81'));_0x3ff06f['recordingURL']=_0x1bfdfe[_0xbd33('0x7e')]+_0xbd33('0x82')+_0x3ff06f[_0xbd33('0x83')]+_0xbd33('0x84')+md5(_0x3ff06f[_0xbd33('0x83')]);}else{_0x3ff06f[_0xbd33('0x85')]='';}var _0x8feb63=_0x1bfdfe[_0xbd33('0x7d')]===_0xbd33('0x86')?'eu':_0xbd33('0x87');return getAccessToken(_0x1bfdfe)[_0xbd33('0x28')](function(_0x20a608){_0x5b6736=_0x20a608;return getUser(_0x5b6736,_0x8feb63,_0x1bfdfe,_0xc1d0d2[_0xbd33('0x3a')]);})['then'](function(_0x361290){_0x4399ba=_0x361290;logger[_0xbd33('0x30')](_0xbd33('0x88'),_0x4399ba['id']);return getEndUser(_0x5b6736,_0x8feb63,_0x1bfdfe,_0x3ff06f[_0xbd33('0x89')],_0x3ff06f[_0xbd33('0x8a')],_0x4399ba,_0x28219f);})[_0xbd33('0x28')](function(_0x30242a){_0x107485=_0x30242a;return getCall(_0x5b6736,_0x8feb63,_0x1bfdfe,_0x4399ba,_0x107485,_0x28219f,_0x3ff06f,_0xbd33('0x79'));})['then'](function(_0x334289){if(_0x334289){logger[_0xbd33('0x30')](_0xbd33('0x8b'),_0x334289['id']);logger['info'](_0xbd33('0x80'),_0xbd33('0x8c'));emit(util['format'](_0xbd33('0x8d'),_0xc1d0d2['name']),'trigger:browser:url',{'uri':_0xbd33('0x8e')+_0x1bfdfe[_0xbd33('0x7d')]+_0xbd33('0x8f')+_0x334289['id']});}})[_0xbd33('0x2c')](function(_0x8a0629){logger[_0xbd33('0x2d')](_0xbd33('0x80'),JSON[_0xbd33('0xe')](_0x8a0629));});};exports[_0xbd33('0x75')]=function(_0x1a9d08,_0x4475b,_0x3abd3c,_0x255b78,_0x541b27,_0x4b9401,_0x186424){var _0x458b27,_0x59ccf3,_0x50f9e6;_0x4b9401['host']=intUtil[_0xbd33('0x7f')](_0x4b9401['host']);_0x4b9401[_0xbd33('0x7e')]=intUtil[_0xbd33('0x7f')](_0x4b9401[_0xbd33('0x7e')]);if(_0x186424&&_0x186424[_0xbd33('0x90')]&&_0x186424[_0xbd33('0x90')]!==_0xbd33('0x91')){logger[_0xbd33('0x30')](_0xbd33('0x92'),'Recording\x20is\x20enabled!');_0x4475b[_0xbd33('0x85')]=_0x4b9401[_0xbd33('0x7e')]+_0xbd33('0x82')+_0x4475b[_0xbd33('0x83')]+_0xbd33('0x84')+md5(_0x4475b[_0xbd33('0x83')]);}var _0x491bdc=_0x4b9401[_0xbd33('0x7d')]==='zoho.eu'?'eu':_0xbd33('0x87');return getAccessToken(_0x4b9401)['then'](function(_0x21661a){_0x50f9e6=_0x21661a;return getUser(_0x50f9e6,_0x491bdc,_0x4b9401,_0x255b78[_0xbd33('0x3a')]);})[_0xbd33('0x28')](function(_0x5e9075){_0x458b27=_0x5e9075;logger['info'](_0xbd33('0x88'),_0x458b27['id']);return getEndUser(_0x50f9e6,_0x491bdc,_0x4b9401,_0x4475b['destcalleridname'],_0x4475b[_0xbd33('0x93')],_0x458b27,_0x3abd3c);})['then'](function(_0x516d5c){_0x59ccf3=_0x516d5c;return getCall(_0x50f9e6,_0x491bdc,_0x4b9401,_0x458b27,_0x59ccf3,_0x3abd3c,_0x4475b,_0xbd33('0x94'));})[_0xbd33('0x28')](function(_0x1a849c){if(_0x1a849c){logger['info'](_0xbd33('0x8b'),_0x1a849c['id']);logger[_0xbd33('0x30')](_0xbd33('0x92'),_0xbd33('0x8c'));emit(util[_0xbd33('0x33')](_0xbd33('0x8d'),_0x255b78['name']),_0xbd33('0x95'),{'uri':_0xbd33('0x8e')+_0x4b9401[_0xbd33('0x7d')]+'/crm/EntityInfo.do?module=Calls&id='+_0x1a849c['id']});}})['catch'](function(_0x3315ba){logger[_0xbd33('0x2d')](_0xbd33('0x92'),JSON[_0xbd33('0xe')](_0x3315ba));});};exports['abandoned']=function(_0x414087,_0x56dcc8,_0x202101,_0x344811,_0x4395c8,_0x4e88d0){var _0x153636,_0x199451,_0x17a9ea;_0x4e88d0[_0xbd33('0x7d')]=intUtil[_0xbd33('0x7f')](_0x4e88d0[_0xbd33('0x7d')]);_0x4e88d0[_0xbd33('0x7e')]=intUtil[_0xbd33('0x7f')](_0x4e88d0[_0xbd33('0x7e')]);if(_0x4395c8&&_0x4395c8[_0xbd33('0x96')]){logger[_0xbd33('0x30')](_0xbd33('0x97'),_0xbd33('0x81'));_0x56dcc8[_0xbd33('0x85')]=_0x4e88d0[_0xbd33('0x7e')]+_0xbd33('0x82')+_0x56dcc8[_0xbd33('0x83')]+_0xbd33('0x84')+md5(_0x56dcc8[_0xbd33('0x83')]);}else{_0x56dcc8[_0xbd33('0x85')]='';}var _0x5406ff=_0x4e88d0['host']==='zoho.eu'?'eu':_0xbd33('0x87');return getAccessToken(_0x4e88d0)[_0xbd33('0x28')](function(_0x540aff){_0x17a9ea=_0x540aff;return getUser(_0x17a9ea,_0x5406ff,_0x4e88d0);})[_0xbd33('0x28')](function(_0x8d47fa){_0x153636=_0x8d47fa;logger[_0xbd33('0x30')]('The\x20User\x20ID\x20is:',_0x153636['id']);return getEndUser(_0x17a9ea,_0x5406ff,_0x4e88d0,_0x56dcc8[_0xbd33('0x89')],_0x56dcc8[_0xbd33('0x8a')],_0x153636,_0x202101);})[_0xbd33('0x28')](function(_0xb64633){_0x199451=_0xb64633;return getCall(_0x17a9ea,_0x5406ff,_0x4e88d0,_0x153636,_0x199451,_0x202101,_0x56dcc8,_0xbd33('0x79'));})[_0xbd33('0x28')](function(_0x45dc6b){if(_0x45dc6b){logger[_0xbd33('0x30')](_0xbd33('0x8b'),_0x45dc6b['id']);}})[_0xbd33('0x2c')](function(_0x276af9){logger[_0xbd33('0x2d')](_0xbd33('0x97'),JSON[_0xbd33('0xe')](_0x276af9));});};
\ 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 c5f0a07..300c6b8 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(_0x4128e0,_0x53bdc5){var _0x1378ac=function(_0xaecf2){while(--_0xaecf2){_0x4128e0['push'](_0x4128e0['shift']());}};_0x1378ac(++_0x53bdc5);}(_0x7a54,0x106));var _0x47a5=function(_0x2f300a,_0xb58181){_0x2f300a=_0x2f300a-0x0;var _0x164571=_0x7a54[_0x2f300a];return _0x164571;};'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(_0x4d702d,_0x3e6f18){var _0x1b6756=function(_0x587203){while(--_0x587203){_0x4d702d['push'](_0x4d702d['shift']());}};_0x1b6756(++_0x3e6f18);}(_0x7a54,0x106));var _0x47a5=function(_0x4923d8,_0x2d8d1d){_0x4923d8=_0x4923d8-0x0;var _0x2529ed=_0x7a54[_0x4923d8];return _0x2529ed;};'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 57b6ea0..d1313f5 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 _0xb10b=['number','headers','data6','parse','error','stack','DELETE','POST','PUT','data7','body','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','data2','stringify','then','isNil',',\x20request\x20body:\x20','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','data1','statusCode','name','message','request-promise','lodash','mustache','../../../../config/logger','exec','toUpperCase','render','data5'];(function(_0x3a7741,_0x34b4a4){var _0x4a82ae=function(_0x1a6358){while(--_0x1a6358){_0x3a7741['push'](_0x3a7741['shift']());}};_0x4a82ae(++_0x34b4a4);}(_0xb10b,0x12a));var _0xbb10=function(_0x49a17d,_0x38066e){_0x49a17d=_0x49a17d-0x0;var _0x1810c0=_0xb10b[_0x49a17d];return _0x1810c0;};'use strict';var rp=require(_0xbb10('0x0'));var util=require('util');var _=require(_0xbb10('0x1'));var Mustache=require(_0xbb10('0x2'));var logger=require(_0xbb10('0x3'))('trigger');exports[_0xbb10('0x4')]=function(_0x9bbed,_0x460981){var _0x22320e,_0x49baf4;var _0x312b72={'method':_0x9bbed['data1'][_0xbb10('0x5')](),'uri':Mustache[_0xbb10('0x6')](_0x9bbed['data2'],_0x460981),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x9bbed[_0xbb10('0x7')])===_0xbb10('0x8')&&parseInt(_0x9bbed[_0xbb10('0x7')])>=0x1&&parseInt(_0x9bbed[_0xbb10('0x7')])<=0xa?parseInt(_0x9bbed[_0xbb10('0x7')])*0x3e8:0x5*0x3e8};try{_0x312b72[_0xbb10('0x9')]=_0x9bbed[_0xbb10('0xa')]?JSON[_0xbb10('0xb')](Mustache['render'](_0x9bbed['data6'],_0x460981)):{};}catch(_0x20bd61){logger[_0xbb10('0xc')](_0x20bd61[_0xbb10('0xd')]);}switch(_0x9bbed['data1'][_0xbb10('0x5')]()){case'GET':case _0xbb10('0xe'):_0x22320e=null;_0x312b72['qs']=_0x460981;break;case _0xbb10('0xf'):case _0xbb10('0x10'):if(_0x9bbed[_0xbb10('0x11')]){try{_0x22320e=JSON[_0xbb10('0xb')](Mustache[_0xbb10('0x6')](_0x9bbed['data7'],_0x460981));_0x312b72[_0xbb10('0x12')]=_0x22320e;}catch(_0x42d7e4){logger[_0xbb10('0xc')](_0x42d7e4[_0xbb10('0xd')]);logger[_0xbb10('0xc')](_0xbb10('0x13'));}}else{_0x22320e=_0x460981;_0x312b72[_0xbb10('0x12')]=_0x22320e;}break;}logger[_0xbb10('0x14')](util[_0xbb10('0x15')](_0xbb10('0x16'),_0x9bbed['data1'],_0x9bbed[_0xbb10('0x17')],JSON[_0xbb10('0x18')](_0x312b72)));rp(_0x312b72)[_0xbb10('0x19')](function(_0x42db98){_0x22320e=!_[_0xbb10('0x1a')](_0x22320e)?_0xbb10('0x1b')+_0x22320e:'';_0x49baf4=typeof _0x42db98[_0xbb10('0x12')]===_0xbb10('0x1c')?JSON[_0xbb10('0x18')](_0x42db98[_0xbb10('0x12')]):_0x42db98['body'];logger[_0xbb10('0x14')](util[_0xbb10('0x15')](_0xbb10('0x1d'),_0x9bbed[_0xbb10('0x1e')],_0x9bbed[_0xbb10('0x17')],_0x42db98[_0xbb10('0x1f')],_0x49baf4));})['catch'](function(_0x12f888){logger[_0xbb10('0xc')](util['format']('%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s',_0x9bbed[_0xbb10('0x1e')],_0x9bbed[_0xbb10('0x17')],_0x12f888[_0xbb10('0x1f')],_0x12f888[_0xbb10('0x20')],_0x12f888[_0xbb10('0x21')]));});};
\ No newline at end of file
+var _0x5f2f=['lodash','mustache','../../../../config/logger','trigger','exec','data1','toUpperCase','render','data2','number','data5','headers','data6','parse','stack','GET','DELETE','POST','PUT','data7','body','error','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','stringify','then','isNil',',\x20request\x20body:\x20','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','name','message','request-promise','util'];(function(_0x58fba0,_0x370b56){var _0x1aac87=function(_0xe3ceed){while(--_0xe3ceed){_0x58fba0['push'](_0x58fba0['shift']());}};_0x1aac87(++_0x370b56);}(_0x5f2f,0x73));var _0xf5f2=function(_0x5aea8e,_0x1d497b){_0x5aea8e=_0x5aea8e-0x0;var _0x56dd57=_0x5f2f[_0x5aea8e];return _0x56dd57;};'use strict';var rp=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var _=require(_0xf5f2('0x2'));var Mustache=require(_0xf5f2('0x3'));var logger=require(_0xf5f2('0x4'))(_0xf5f2('0x5'));exports[_0xf5f2('0x6')]=function(_0x107cf,_0x501fbd){var _0x4854b6,_0x1665c7;var _0x192215={'method':_0x107cf[_0xf5f2('0x7')][_0xf5f2('0x8')](),'uri':Mustache[_0xf5f2('0x9')](_0x107cf[_0xf5f2('0xa')],_0x501fbd),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x107cf['data5'])===_0xf5f2('0xb')&&parseInt(_0x107cf[_0xf5f2('0xc')])>=0x1&&parseInt(_0x107cf[_0xf5f2('0xc')])<=0xa?parseInt(_0x107cf['data5'])*0x3e8:0x5*0x3e8};try{_0x192215[_0xf5f2('0xd')]=_0x107cf[_0xf5f2('0xe')]?JSON[_0xf5f2('0xf')](Mustache['render'](_0x107cf[_0xf5f2('0xe')],_0x501fbd)):{};}catch(_0x4ebbbe){logger['error'](_0x4ebbbe[_0xf5f2('0x10')]);}switch(_0x107cf[_0xf5f2('0x7')]['toUpperCase']()){case _0xf5f2('0x11'):case _0xf5f2('0x12'):_0x4854b6=null;_0x192215['qs']=_0x501fbd;break;case _0xf5f2('0x13'):case _0xf5f2('0x14'):if(_0x107cf[_0xf5f2('0x15')]){try{_0x4854b6=JSON[_0xf5f2('0xf')](Mustache['render'](_0x107cf[_0xf5f2('0x15')],_0x501fbd));_0x192215[_0xf5f2('0x16')]=_0x4854b6;}catch(_0x269909){logger[_0xf5f2('0x17')](_0x269909[_0xf5f2('0x10')]);logger['error'](_0xf5f2('0x18'));}}else{_0x4854b6=_0x501fbd;_0x192215[_0xf5f2('0x16')]=_0x4854b6;}break;}logger[_0xf5f2('0x19')](util[_0xf5f2('0x1a')](_0xf5f2('0x1b'),_0x107cf[_0xf5f2('0x7')],_0x107cf[_0xf5f2('0xa')],JSON[_0xf5f2('0x1c')](_0x192215)));rp(_0x192215)[_0xf5f2('0x1d')](function(_0x228ace){_0x4854b6=!_[_0xf5f2('0x1e')](_0x4854b6)?_0xf5f2('0x1f')+_0x4854b6:'';_0x1665c7=typeof _0x228ace[_0xf5f2('0x16')]===_0xf5f2('0x20')?JSON[_0xf5f2('0x1c')](_0x228ace[_0xf5f2('0x16')]):_0x228ace[_0xf5f2('0x16')];logger['info'](util[_0xf5f2('0x1a')](_0xf5f2('0x21'),_0x107cf['data1'],_0x107cf['data2'],_0x228ace[_0xf5f2('0x22')],_0x1665c7));})[_0xf5f2('0x23')](function(_0x4ae323){logger[_0xf5f2('0x17')](util[_0xf5f2('0x1a')](_0xf5f2('0x24'),_0x107cf[_0xf5f2('0x7')],_0x107cf[_0xf5f2('0xa')],_0x4ae323['statusCode'],_0x4ae323[_0xf5f2('0x25')],_0x4ae323[_0xf5f2('0x26')]));});};
\ No newline at end of file
diff --git a/server/services/email/client.js b/server/services/email/client.js
index 57dedd5..fd402b3 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 _0xbeea=['client','Request','request','then','rpc','error','message','result','exports','jayson/promise','../../config/logger','routing'];(function(_0x55969b,_0x1ebe62){var _0x3d7fc1=function(_0x5f2dbe){while(--_0x5f2dbe){_0x55969b['push'](_0x55969b['shift']());}};_0x3d7fc1(++_0x1ebe62);}(_0xbeea,0xb1));var _0xabee=function(_0x1a81f2,_0x1a3524){_0x1a81f2=_0x1a81f2-0x0;var _0x5a86a9=_0xbeea[_0x1a81f2];return _0x5a86a9;};'use strict';var jayson=require(_0xabee('0x0'));var BPromise=require('bluebird');var logger=require(_0xabee('0x1'))(_0xabee('0x2'));var client=jayson[_0xabee('0x3')]['http']({'port':0x2329});client[_0xabee('0x4')]=function(_0x59e264,_0x58afa7){return new BPromise(function(_0x33571e,_0x2fb6d9){return client[_0xabee('0x5')](_0x59e264,_0x58afa7)[_0xabee('0x6')](function(_0x58c9ef){logger['debug'](_0xabee('0x7'),_0xabee('0x2'),_0x59e264,_0x58afa7,_0x58c9ef);if(_0x58c9ef['error']){logger[_0xabee('0x8')]('rpc',_0xabee('0x2'),_0x59e264,_0x58c9ef[_0xabee('0x8')][_0xabee('0x9')],_0x58afa7);return _0x2fb6d9(_0x58c9ef[_0xabee('0x8')][_0xabee('0x9')]);}else{return _0x33571e(_0x58c9ef[_0xabee('0xa')]);}})['catch'](function(_0x3118bd){logger[_0xabee('0x8')](_0xabee('0x7'),'routing',_0x59e264,_0x3118bd,_0x58afa7);return _0x2fb6d9(_0x3118bd);});});};module[_0xabee('0xb')]=client;
\ No newline at end of file
+var _0x8f7d=['error','message','result','catch','exports','jayson/promise','bluebird','routing','Request','request','debug','rpc'];(function(_0x125ff8,_0x41925f){var _0x2d9ef=function(_0x4ef34c){while(--_0x4ef34c){_0x125ff8['push'](_0x125ff8['shift']());}};_0x2d9ef(++_0x41925f);}(_0x8f7d,0xf5));var _0xd8f7=function(_0x25fc4f,_0xe432bb){_0x25fc4f=_0x25fc4f-0x0;var _0x33ceb6=_0x8f7d[_0x25fc4f];return _0x33ceb6;};'use strict';var jayson=require(_0xd8f7('0x0'));var BPromise=require(_0xd8f7('0x1'));var logger=require('../../config/logger')(_0xd8f7('0x2'));var client=jayson['client']['http']({'port':0x2329});client[_0xd8f7('0x3')]=function(_0x530e1b,_0x9558b6){return new BPromise(function(_0x338be3,_0x1b9964){return client[_0xd8f7('0x4')](_0x530e1b,_0x9558b6)['then'](function(_0x4090c9){logger[_0xd8f7('0x5')](_0xd8f7('0x6'),_0xd8f7('0x2'),_0x530e1b,_0x9558b6,_0x4090c9);if(_0x4090c9[_0xd8f7('0x7')]){logger[_0xd8f7('0x7')](_0xd8f7('0x6'),_0xd8f7('0x2'),_0x530e1b,_0x4090c9['error'][_0xd8f7('0x8')],_0x9558b6);return _0x1b9964(_0x4090c9['error'][_0xd8f7('0x8')]);}else{return _0x338be3(_0x4090c9[_0xd8f7('0x9')]);}})[_0xd8f7('0xa')](function(_0x25e4d3){logger[_0xd8f7('0x7')](_0xd8f7('0x6'),_0xd8f7('0x2'),_0x530e1b,_0x25e4d3,_0x9558b6);return _0x1b9964(_0x25e4d3);});});};module[_0xd8f7('0xb')]=client;
\ No newline at end of file
diff --git a/server/services/email/index.js b/server/services/email/index.js
index cb09a18..f72a16b 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 _0xb073=['getMailAccounts','refresh','mailAccounts','listen','loginMailFrequency','catch','log','./server','./lib/email','./rpc/mailAccount','../../mysqldb','then'];(function(_0x4a099f,_0x2f9240){var _0x516c30=function(_0x3153fb){while(--_0x3153fb){_0x4a099f['push'](_0x4a099f['shift']());}};_0x516c30(++_0x2f9240);}(_0xb073,0x187));var _0x3b07=function(_0x3be917,_0x482b41){_0x3be917=_0x3be917-0x0;var _0x4d77ca=_0xb073[_0x3be917];return _0x4d77ca;};'use strict';var BPromise=require('bluebird');var server=require(_0x3b07('0x0'));var Realtime=require('./realtime');var EmailChannel=require(_0x3b07('0x1'));var mailAccount=require(_0x3b07('0x2'));var realtime=new Realtime();var email=new EmailChannel(realtime);var db=require(_0x3b07('0x3'))['db'];function initRealtime(){return BPromise['resolve']()[_0x3b07('0x4')](mailAccount[_0x3b07('0x5')]())[_0x3b07('0x4')](realtime['initMailAccounts']())[_0x3b07('0x4')](function(){email[_0x3b07('0x6')](realtime[_0x3b07('0x7')]);return realtime;});}function main(){return server[_0x3b07('0x8')](realtime,email)[_0x3b07('0x4')](function(_0x3f8b8f){return initRealtime();})[_0x3b07('0x4')](function(_0x27e133){return db['Setting']['findOne']({'attributes':['id',_0x3b07('0x9')],'raw':!![]});})[_0x3b07('0x4')](function(_0x31cf54){return setInterval(initRealtime,_0x31cf54[_0x3b07('0x9')]*0x3e8);})[_0x3b07('0xa')](function(_0x1ba4b9){console[_0x3b07('0xb')](_0x1ba4b9);});}main();
\ No newline at end of file
+var _0x2b83=['./realtime','./rpc/mailAccount','../../mysqldb','resolve','then','initMailAccounts','refresh','listen','Setting','findOne','catch','log','./server'];(function(_0x28fd66,_0x280ec9){var _0xf66f12=function(_0x304952){while(--_0x304952){_0x28fd66['push'](_0x28fd66['shift']());}};_0xf66f12(++_0x280ec9);}(_0x2b83,0x1d3));var _0x32b8=function(_0x4d6679,_0x3ea59a){_0x4d6679=_0x4d6679-0x0;var _0x50fc8b=_0x2b83[_0x4d6679];return _0x50fc8b;};'use strict';var BPromise=require('bluebird');var server=require(_0x32b8('0x0'));var Realtime=require(_0x32b8('0x1'));var EmailChannel=require('./lib/email');var mailAccount=require(_0x32b8('0x2'));var realtime=new Realtime();var email=new EmailChannel(realtime);var db=require(_0x32b8('0x3'))['db'];function initRealtime(){return BPromise[_0x32b8('0x4')]()['then'](mailAccount['getMailAccounts']())[_0x32b8('0x5')](realtime[_0x32b8('0x6')]())['then'](function(){email[_0x32b8('0x7')](realtime['mailAccounts']);return realtime;});}function main(){return server[_0x32b8('0x8')](realtime,email)[_0x32b8('0x5')](function(_0x36bde3){return initRealtime();})[_0x32b8('0x5')](function(_0x5cc6b2){return db[_0x32b8('0x9')][_0x32b8('0xa')]({'attributes':['id','loginMailFrequency'],'raw':!![]});})['then'](function(_0x3f58a5){return setInterval(initRealtime,_0x3f58a5['loginMailFrequency']*0x3e8);})[_0x32b8('0xb')](function(_0x31b795){console[_0x32b8('0xc')](_0x31b795);});}main();
\ No newline at end of file
diff --git a/server/services/email/lib/email.js b/server/services/email/lib/email.js
index 65032c2..d57ed00 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 _0x62cd=['md5','ioredis','../../../config/environment','email','redis','defaults','localhost','socket.io-emitter','./smtp','mailAccounts','imapAccounts','smtp','emit','name','key','active','Imap','total','isNil','stringify','mailAccount:update','prototype','refresh','hasOwnProperty','handleImapBox','bind','handleImapEmail','handleImapEnd','error','handleImapError','status','disabled','messageStatus','messages','info','from','notify','then','Mail\x20accepted\x20from\x20routing','catch','Mail\x20not\x20accepted\x20from\x20routing\x20%s','lastSync','sendMail','send','Smtp','verify','verified','lodash','moment'];(function(_0x2e0c24,_0x52ef58){var _0x1d5b54=function(_0x269dcf){while(--_0x269dcf){_0x2e0c24['push'](_0x2e0c24['shift']());}};_0x1d5b54(++_0x52ef58);}(_0x62cd,0x186));var _0xd62c=function(_0x578a6c,_0x26add8){_0x578a6c=_0x578a6c-0x0;var _0xffad85=_0x62cd[_0x578a6c];return _0xffad85;};'use strict';var _=require(_0xd62c('0x0'));var moment=require(_0xd62c('0x1'));var BPromise=require('bluebird');var md5=require(_0xd62c('0x2'));var Redis=require(_0xd62c('0x3'));var config=require(_0xd62c('0x4'));var logger=require('../../../config/logger')(_0xd62c('0x5'));config[_0xd62c('0x6')]=_[_0xd62c('0x7')](config[_0xd62c('0x6')],{'host':_0xd62c('0x8'),'port':0x18eb});var io=require(_0xd62c('0x9'))(new Redis(config[_0xd62c('0x6')]));var EmailImap=require('./imap');var EmailSmtp=require(_0xd62c('0xa'));var mailAccount=require('../rpc/mailAccount');var md5Accounts={};function EmailChannel(_0x66b9f4){logger['info']('start\x20email\x20channel');this[_0xd62c('0xb')]=_0x66b9f4[_0xd62c('0xb')];this[_0xd62c('0xc')]={};this[_0xd62c('0xd')]=new EmailSmtp();}EmailChannel['prototype'][_0xd62c('0xe')]=function(_0x5b452f){var _0x579d20=this['mailAccounts'][_0x5b452f];var _0x8cd81e={'id':_0x579d20['id'],'name':_0x579d20[_0xd62c('0xf')],'key':_0x579d20[_0xd62c('0x10')],'active':_0x579d20[_0xd62c('0x11')],'Imap':{'status':_0x579d20[_0xd62c('0x12')]['status'],'messageStatus':_0x579d20['Imap']['messageStatus'],'total':_0x579d20[_0xd62c('0x12')][_0xd62c('0x13')]}};if(_[_0xd62c('0x14')](md5Accounts[_0x5b452f])){md5Accounts[_0x5b452f]={};}var _0x345f50=md5(JSON[_0xd62c('0x15')](_0x8cd81e));if(md5Accounts[_0x5b452f]['md5']!==_0x345f50){md5Accounts[_0x5b452f][_0xd62c('0x2')]=_0x345f50;io[_0xd62c('0xe')](_0xd62c('0x16'),_0x8cd81e);}};EmailChannel[_0xd62c('0x17')][_0xd62c('0x18')]=function(_0x45bf8a){for(var _0x5b5e67 in _0x45bf8a){if(_0x45bf8a['hasOwnProperty'](_0x5b5e67)){if(_0x45bf8a[_0x5b5e67][_0xd62c('0x12')]&&_0x45bf8a[_0x5b5e67][_0xd62c('0x11')]){var _0x2f46fc=_0x45bf8a[_0x5b5e67][_0xd62c('0x12')];if(!this[_0xd62c('0xc')][_0xd62c('0x19')](_0x2f46fc['id'])){this['imapAccounts'][_0x2f46fc['id']]=new EmailImap(_0x2f46fc,_0x45bf8a[_0x5b5e67][_0xd62c('0x5')]);this[_0xd62c('0xc')][_0x2f46fc['id']]['on']('box',this[_0xd62c('0x1a')][_0xd62c('0x1b')](this,_0x5b5e67));this[_0xd62c('0xc')][_0x2f46fc['id']]['on']('email',this[_0xd62c('0x1c')][_0xd62c('0x1b')](this,_0x5b5e67));this[_0xd62c('0xc')][_0x2f46fc['id']]['on']('end',this[_0xd62c('0x1d')]['bind'](this,_0x5b5e67));this[_0xd62c('0xc')][_0x2f46fc['id']]['on'](_0xd62c('0x1e'),this[_0xd62c('0x1f')][_0xd62c('0x1b')](this,_0x5b5e67));}}else{if(_[_0xd62c('0x14')](this[_0xd62c('0xb')][_0x5b5e67][_0xd62c('0x12')])){this['mailAccounts'][_0x5b5e67][_0xd62c('0x12')]={};}this['mailAccounts'][_0x5b5e67][_0xd62c('0x12')][_0xd62c('0x20')]=_0xd62c('0x21');this[_0xd62c('0xb')][_0x5b5e67][_0xd62c('0x12')][_0xd62c('0x22')]='';this[_0xd62c('0xe')](_0x5b5e67);}}}};EmailChannel['prototype']['handleImapBox']=function(_0x4777d9,_0x29772a){if(this['mailAccounts'][_0x4777d9]){this[_0xd62c('0xb')][_0x4777d9][_0xd62c('0x12')][_0xd62c('0x20')]='connected';this['mailAccounts'][_0x4777d9][_0xd62c('0x12')][_0xd62c('0x22')]=_0x29772a['name'];if(_0x29772a[_0xd62c('0x23')]){this['mailAccounts'][_0x4777d9]['Imap'][_0xd62c('0x13')]=_0x29772a['messages'][_0xd62c('0x13')];}return this['emit'](_0x4777d9);}};EmailChannel[_0xd62c('0x17')][_0xd62c('0x1c')]=function(_0x4e3ae5,_0x2de990){logger[_0xd62c('0x24')]('New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s',_0x2de990['firstName'],_0x2de990['lastName'],_0x2de990[_0xd62c('0x25')],_0x4e3ae5);if(this[_0xd62c('0xb')][_0x4e3ae5]){return mailAccount[_0xd62c('0x26')](_0x4e3ae5,_0x2de990)[_0xd62c('0x27')](function(_0x4f82e5){if(_0x4f82e5){logger['info'](_0xd62c('0x28'));}})[_0xd62c('0x29')](function(_0x4e1d4d){logger[_0xd62c('0x1e')](_0xd62c('0x2a'),JSON[_0xd62c('0x15')](_0x4e1d4d));});}};EmailChannel[_0xd62c('0x17')][_0xd62c('0x1d')]=function(_0x2e5bcd){if(this[_0xd62c('0xb')][_0x2e5bcd]&&this[_0xd62c('0xb')][_0x2e5bcd][_0xd62c('0x12')]){if(this[_0xd62c('0xc')][this[_0xd62c('0xb')][_0x2e5bcd][_0xd62c('0x12')]['id']]){delete this[_0xd62c('0xc')][this[_0xd62c('0xb')][_0x2e5bcd][_0xd62c('0x12')]['id']];}this[_0xd62c('0xb')][_0x2e5bcd][_0xd62c('0x12')][_0xd62c('0x2b')]=moment();this['emit'](_0x2e5bcd);}};EmailChannel[_0xd62c('0x17')][_0xd62c('0x1f')]=function(_0x5bd167,_0x764cf0){if(this[_0xd62c('0xb')][_0x5bd167]){this[_0xd62c('0xb')][_0x5bd167]['Imap'][_0xd62c('0x20')]='error';this[_0xd62c('0xb')][_0x5bd167]['Imap'][_0xd62c('0x22')]=_0x764cf0;return this['emit'](_0x5bd167);}};EmailChannel['prototype'][_0xd62c('0x2c')]=function(_0xb4443e,_0x5680f5){return this['smtp'][_0xd62c('0x2d')](_0xb4443e,_0x5680f5);};EmailChannel[_0xd62c('0x17')]['verifySmtp']=function(_0x1a79b8){var _0x4965b8=this;if(this[_0xd62c('0xb')][_0x1a79b8['id']]){if(_[_0xd62c('0x14')](this[_0xd62c('0xb')][_0x1a79b8['id']][_0xd62c('0x2e')])){this['mailAccounts'][_0x1a79b8['id']][_0xd62c('0x2e')]={};}this[_0xd62c('0xb')][_0x1a79b8['id']][_0xd62c('0x2e')][_0xd62c('0x2b')]=moment();return new BPromise(function(_0x41bd65,_0x52912){return _0x4965b8['smtp'][_0xd62c('0x2f')](_0x1a79b8)[_0xd62c('0x27')](function(_0x56048c){_0x4965b8[_0xd62c('0xb')][_0x1a79b8['id']][_0xd62c('0x2e')][_0xd62c('0x20')]=_0xd62c('0x30');_0x4965b8['mailAccounts'][_0x1a79b8['id']][_0xd62c('0x2e')][_0xd62c('0x22')]='';_0x4965b8[_0xd62c('0xe')](_0x1a79b8['id']);_0x41bd65(_0x56048c);})[_0xd62c('0x29')](function(_0x30f6f9){_0x4965b8['mailAccounts'][_0x1a79b8['id']]['Smtp']['status']=_0xd62c('0x1e');_0x4965b8['mailAccounts'][_0x1a79b8['id']][_0xd62c('0x2e')][_0xd62c('0x22')]=_0x30f6f9;_0x4965b8[_0xd62c('0xe')](_0x1a79b8['id']);_0x52912(_0x30f6f9);});});}return this[_0xd62c('0xd')][_0xd62c('0x2f')](_0x1a79b8);};module['exports']=EmailChannel;
\ No newline at end of file
+var _0x0987=['lastSync','sendMail','verifySmtp','Smtp','smtp','verify','verified','exports','lodash','moment','bluebird','md5','ioredis','../../../config/environment','email','defaults','redis','localhost','./imap','./smtp','../rpc/mailAccount','start\x20email\x20channel','mailAccounts','imapAccounts','prototype','emit','key','active','Imap','status','messageStatus','total','isNil','stringify','mailAccount:update','box','handleImapEmail','handleImapEnd','bind','error','handleImapError','handleImapBox','connected','name','messages','info','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','firstName','lastName','from','then','Mail\x20accepted\x20from\x20routing','catch'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x0987,0x1e5));var _0x7098=function(_0x3c680d,_0x134f87){_0x3c680d=_0x3c680d-0x0;var _0x4d1db9=_0x0987[_0x3c680d];return _0x4d1db9;};'use strict';var _=require(_0x7098('0x0'));var moment=require(_0x7098('0x1'));var BPromise=require(_0x7098('0x2'));var md5=require(_0x7098('0x3'));var Redis=require(_0x7098('0x4'));var config=require(_0x7098('0x5'));var logger=require('../../../config/logger')(_0x7098('0x6'));config['redis']=_[_0x7098('0x7')](config[_0x7098('0x8')],{'host':_0x7098('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x7098('0x8')]));var EmailImap=require(_0x7098('0xa'));var EmailSmtp=require(_0x7098('0xb'));var mailAccount=require(_0x7098('0xc'));var md5Accounts={};function EmailChannel(_0x2ac8ce){logger['info'](_0x7098('0xd'));this[_0x7098('0xe')]=_0x2ac8ce['mailAccounts'];this[_0x7098('0xf')]={};this['smtp']=new EmailSmtp();}EmailChannel[_0x7098('0x10')][_0x7098('0x11')]=function(_0x1266f4){var _0x4da61b=this['mailAccounts'][_0x1266f4];var _0x2959fb={'id':_0x4da61b['id'],'name':_0x4da61b['name'],'key':_0x4da61b[_0x7098('0x12')],'active':_0x4da61b[_0x7098('0x13')],'Imap':{'status':_0x4da61b[_0x7098('0x14')][_0x7098('0x15')],'messageStatus':_0x4da61b[_0x7098('0x14')][_0x7098('0x16')],'total':_0x4da61b[_0x7098('0x14')][_0x7098('0x17')]}};if(_[_0x7098('0x18')](md5Accounts[_0x1266f4])){md5Accounts[_0x1266f4]={};}var _0x1348bd=md5(JSON[_0x7098('0x19')](_0x2959fb));if(md5Accounts[_0x1266f4][_0x7098('0x3')]!==_0x1348bd){md5Accounts[_0x1266f4][_0x7098('0x3')]=_0x1348bd;io[_0x7098('0x11')](_0x7098('0x1a'),_0x2959fb);}};EmailChannel[_0x7098('0x10')]['refresh']=function(_0x567805){for(var _0x4982a1 in _0x567805){if(_0x567805['hasOwnProperty'](_0x4982a1)){if(_0x567805[_0x4982a1][_0x7098('0x14')]&&_0x567805[_0x4982a1][_0x7098('0x13')]){var _0x19e078=_0x567805[_0x4982a1][_0x7098('0x14')];if(!this['imapAccounts']['hasOwnProperty'](_0x19e078['id'])){this[_0x7098('0xf')][_0x19e078['id']]=new EmailImap(_0x19e078,_0x567805[_0x4982a1]['email']);this[_0x7098('0xf')][_0x19e078['id']]['on'](_0x7098('0x1b'),this['handleImapBox']['bind'](this,_0x4982a1));this[_0x7098('0xf')][_0x19e078['id']]['on'](_0x7098('0x6'),this[_0x7098('0x1c')]['bind'](this,_0x4982a1));this[_0x7098('0xf')][_0x19e078['id']]['on']('end',this[_0x7098('0x1d')][_0x7098('0x1e')](this,_0x4982a1));this[_0x7098('0xf')][_0x19e078['id']]['on'](_0x7098('0x1f'),this[_0x7098('0x20')]['bind'](this,_0x4982a1));}}else{if(_[_0x7098('0x18')](this['mailAccounts'][_0x4982a1][_0x7098('0x14')])){this['mailAccounts'][_0x4982a1][_0x7098('0x14')]={};}this[_0x7098('0xe')][_0x4982a1][_0x7098('0x14')][_0x7098('0x15')]='disabled';this[_0x7098('0xe')][_0x4982a1]['Imap'][_0x7098('0x16')]='';this[_0x7098('0x11')](_0x4982a1);}}}};EmailChannel[_0x7098('0x10')][_0x7098('0x21')]=function(_0x3828f6,_0x517566){if(this[_0x7098('0xe')][_0x3828f6]){this['mailAccounts'][_0x3828f6]['Imap'][_0x7098('0x15')]=_0x7098('0x22');this[_0x7098('0xe')][_0x3828f6]['Imap']['messageStatus']=_0x517566[_0x7098('0x23')];if(_0x517566['messages']){this[_0x7098('0xe')][_0x3828f6][_0x7098('0x14')][_0x7098('0x17')]=_0x517566[_0x7098('0x24')][_0x7098('0x17')];}return this[_0x7098('0x11')](_0x3828f6);}};EmailChannel[_0x7098('0x10')]['handleImapEmail']=function(_0x325c3f,_0x4c2568){logger[_0x7098('0x25')](_0x7098('0x26'),_0x4c2568[_0x7098('0x27')],_0x4c2568[_0x7098('0x28')],_0x4c2568[_0x7098('0x29')],_0x325c3f);if(this[_0x7098('0xe')][_0x325c3f]){return mailAccount['notify'](_0x325c3f,_0x4c2568)[_0x7098('0x2a')](function(_0xa93e44){if(_0xa93e44){logger[_0x7098('0x25')](_0x7098('0x2b'));}})[_0x7098('0x2c')](function(_0x59f254){logger[_0x7098('0x1f')]('Mail\x20not\x20accepted\x20from\x20routing\x20%s',JSON[_0x7098('0x19')](_0x59f254));});}};EmailChannel[_0x7098('0x10')][_0x7098('0x1d')]=function(_0x97aab6){if(this[_0x7098('0xe')][_0x97aab6]&&this[_0x7098('0xe')][_0x97aab6]['Imap']){if(this[_0x7098('0xf')][this[_0x7098('0xe')][_0x97aab6][_0x7098('0x14')]['id']]){delete this[_0x7098('0xf')][this[_0x7098('0xe')][_0x97aab6][_0x7098('0x14')]['id']];}this[_0x7098('0xe')][_0x97aab6][_0x7098('0x14')][_0x7098('0x2d')]=moment();this[_0x7098('0x11')](_0x97aab6);}};EmailChannel['prototype']['handleImapError']=function(_0x2f2f04,_0x17adb2){if(this[_0x7098('0xe')][_0x2f2f04]){this[_0x7098('0xe')][_0x2f2f04][_0x7098('0x14')]['status']=_0x7098('0x1f');this[_0x7098('0xe')][_0x2f2f04][_0x7098('0x14')][_0x7098('0x16')]=_0x17adb2;return this[_0x7098('0x11')](_0x2f2f04);}};EmailChannel[_0x7098('0x10')][_0x7098('0x2e')]=function(_0x26d5fb,_0x4a2c84){return this['smtp']['send'](_0x26d5fb,_0x4a2c84);};EmailChannel[_0x7098('0x10')][_0x7098('0x2f')]=function(_0xace0d4){var _0x571c80=this;if(this['mailAccounts'][_0xace0d4['id']]){if(_[_0x7098('0x18')](this['mailAccounts'][_0xace0d4['id']][_0x7098('0x30')])){this[_0x7098('0xe')][_0xace0d4['id']][_0x7098('0x30')]={};}this[_0x7098('0xe')][_0xace0d4['id']][_0x7098('0x30')][_0x7098('0x2d')]=moment();return new BPromise(function(_0x2de79d,_0x14e4c5){return _0x571c80[_0x7098('0x31')][_0x7098('0x32')](_0xace0d4)[_0x7098('0x2a')](function(_0x85ab7d){_0x571c80[_0x7098('0xe')][_0xace0d4['id']][_0x7098('0x30')][_0x7098('0x15')]=_0x7098('0x33');_0x571c80['mailAccounts'][_0xace0d4['id']][_0x7098('0x30')][_0x7098('0x16')]='';_0x571c80[_0x7098('0x11')](_0xace0d4['id']);_0x2de79d(_0x85ab7d);})[_0x7098('0x2c')](function(_0x566c9d){_0x571c80['mailAccounts'][_0xace0d4['id']][_0x7098('0x30')][_0x7098('0x15')]=_0x7098('0x1f');_0x571c80[_0x7098('0xe')][_0xace0d4['id']][_0x7098('0x30')][_0x7098('0x16')]=_0x566c9d;_0x571c80['emit'](_0xace0d4['id']);_0x14e4c5(_0x566c9d);});});}return this[_0x7098('0x31')][_0x7098('0x32')](_0xace0d4);};module[_0x7098('0x34')]=EmailChannel;
\ No newline at end of file
diff --git a/server/services/email/lib/imap.js b/server/services/email/lib/imap.js
index 6e31671..91572d1 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 _0xaeeb=['handleFetchEnd','closeBox','body','attributes','handleMessageEnd','handleMessageBody','handleSimpleParser','handleMessageAttributes','handleEnd','textCode','upperFirst','exports','path','util','imap','lodash','randomstring','mailparser','simpleParser','iconv','Iconv','events','EventEmitter','./utils','../../../config/logger','email','mailbox','account','once','ready','handleReady','bind','end','error','handleError','inherits','prototype','getAccount','connTimeout','authTimeout','isNil','authentication','user','password','host','port','tls','autotls','required','service','anonymous@xcally.com','handleOpenBox','emit','box','handleCloseBox','readUnseen','search','UNSEEN','handleReadUnseen','length','fetch','message'];(function(_0x3753bb,_0x17629c){var _0x33765e=function(_0x3cf456){while(--_0x3cf456){_0x3753bb['push'](_0x3753bb['shift']());}};_0x33765e(++_0x17629c);}(_0xaeeb,0x104));var _0xbaee=function(_0x36f5cb,_0x2a720f){_0x36f5cb=_0x36f5cb-0x0;var _0x58d6ce=_0xaeeb[_0x36f5cb];return _0x58d6ce;};'use strict';var fs=require('fs');var path=require(_0xbaee('0x0'));var util=require(_0xbaee('0x1'));var Imap=require(_0xbaee('0x2'));var _=require(_0xbaee('0x3'));var rs=require(_0xbaee('0x4'));var simpleParser=require(_0xbaee('0x5'))[_0xbaee('0x6')];var Iconv=require(_0xbaee('0x7'))[_0xbaee('0x8')];var EventEmitter=require(_0xbaee('0x9'))[_0xbaee('0xa')];var utils=require(_0xbaee('0xb'));var logger=require(_0xbaee('0xc'))(_0xbaee('0xd'));function EmailImap(_0x42c970,_0x29f8a2){this[_0xbaee('0xe')]='INBOX';this['account']=this['getAccount'](_0x42c970,_0x29f8a2);this[_0xbaee('0x2')]=new Imap(this[_0xbaee('0xf')]);this['imap'][_0xbaee('0x10')](_0xbaee('0x11'),this[_0xbaee('0x12')][_0xbaee('0x13')](this));this[_0xbaee('0x2')][_0xbaee('0x10')](_0xbaee('0x14'),this['handleEnd'][_0xbaee('0x13')](this));this[_0xbaee('0x2')]['on'](_0xbaee('0x15'),this[_0xbaee('0x16')]['bind'](this));this[_0xbaee('0x2')]['connect']();}util[_0xbaee('0x17')](EmailImap,EventEmitter);EmailImap[_0xbaee('0x18')][_0xbaee('0x19')]=function(_0x2f2a6f,_0x29def3){var _0x2d3d80={'connTimeout':_0x2f2a6f[_0xbaee('0x1a')]?_0x2f2a6f[_0xbaee('0x1a')]*0x3e8:0x2710,'authTimeout':_0x2f2a6f['authTimeout']?_0x2f2a6f[_0xbaee('0x1b')]*0x3e8:0x1388};if(_[_0xbaee('0x1c')](_0x2f2a6f['service'])){if(_0x2f2a6f[_0xbaee('0x1d')]){_0x2d3d80[_0xbaee('0x1e')]=_0x2f2a6f[_0xbaee('0x1e')];_0x2d3d80[_0xbaee('0x1f')]=_0x2f2a6f[_0xbaee('0x1f')];}_0x2d3d80[_0xbaee('0x20')]=_0x2f2a6f[_0xbaee('0x20')];_0x2d3d80[_0xbaee('0x21')]=_0x2f2a6f[_0xbaee('0x21')]||0x3e1;if(_0x2f2a6f[_0xbaee('0x22')]){_0x2d3d80[_0xbaee('0x22')]=!![];}else{_0x2d3d80['tls']=![];_0x2d3d80[_0xbaee('0x23')]=_0xbaee('0x24');}}else{_0x2d3d80[_0xbaee('0x1e')]=_0x2f2a6f[_0xbaee('0x1e')];_0x2d3d80['password']=_0x2f2a6f[_0xbaee('0x1f')];_0x2d3d80[_0xbaee('0x20')]=utils['getHost'](_0x2f2a6f[_0xbaee('0x25')]);_0x2d3d80[_0xbaee('0x21')]=0x3e1;_0x2d3d80[_0xbaee('0x22')]=!![];}_0x2d3d80[_0xbaee('0xd')]=_0x29def3||_0x2f2a6f['user']||_0xbaee('0x26');return _0x2d3d80;};EmailImap[_0xbaee('0x18')][_0xbaee('0x12')]=function(){this[_0xbaee('0x2')]['openBox'](this[_0xbaee('0xe')],![],this[_0xbaee('0x27')][_0xbaee('0x13')](this));};EmailImap[_0xbaee('0x18')][_0xbaee('0x27')]=function(_0x5e1a47,_0x127f8b){if(_0x5e1a47){this[_0xbaee('0x16')](_0x5e1a47,!![]);}else{this[_0xbaee('0x28')](_0xbaee('0x29'),_0x127f8b);this['readUnseen']();}};EmailImap[_0xbaee('0x18')][_0xbaee('0x2a')]=function(_0x337877){if(_0x337877){this['handleError'](_0x337877,!![]);}else{this[_0xbaee('0x2')][_0xbaee('0x14')]();}};EmailImap[_0xbaee('0x18')][_0xbaee('0x2b')]=function(){this['imap'][_0xbaee('0x2c')]([_0xbaee('0x2d')],this['handleReadUnseen'][_0xbaee('0x13')](this));};EmailImap[_0xbaee('0x18')][_0xbaee('0x2e')]=function(_0x25ddb7,_0x5d427b){if(_0x25ddb7){this[_0xbaee('0x16')](_0x25ddb7,!![]);}else{if(_0x5d427b[_0xbaee('0x2f')]){try{var _0x4fa8d7=this[_0xbaee('0x2')][_0xbaee('0x30')](_0x5d427b,{'bodies':'','markSeen':!![]});_0x4fa8d7['on'](_0xbaee('0x31'),this['handleFetchMessage'][_0xbaee('0x13')](this));_0x4fa8d7[_0xbaee('0x10')]('error',this['handleFetchError']['bind'](this));_0x4fa8d7[_0xbaee('0x10')]('end',this[_0xbaee('0x32')]['bind'](this));}catch(_0x2a6d9a){logger['error'](_0x2a6d9a);}}else{this[_0xbaee('0x2')][_0xbaee('0x33')](!![],this[_0xbaee('0x2a')]['bind'](this));}}};EmailImap[_0xbaee('0x18')]['handleFetchMessage']=function(_0x5453fa,_0x2aeaae){_0x5453fa['on'](_0xbaee('0x34'),this['handleMessageBody'][_0xbaee('0x13')](this));_0x5453fa[_0xbaee('0x10')](_0xbaee('0x35'),this['handleMessageAttributes'][_0xbaee('0x13')](this));_0x5453fa[_0xbaee('0x10')](_0xbaee('0x14'),this[_0xbaee('0x36')][_0xbaee('0x13')](this));};EmailImap[_0xbaee('0x18')][_0xbaee('0x37')]=function(_0x1c4831,_0x5c0e9c){simpleParser(_0x1c4831,{'Iconv':Iconv},this[_0xbaee('0x38')]['bind'](this));};EmailImap[_0xbaee('0x18')][_0xbaee('0x39')]=function(_0x2caa0e){};EmailImap[_0xbaee('0x18')]['handleMessageEnd']=function(){};EmailImap[_0xbaee('0x18')][_0xbaee('0x38')]=function(_0x3556e8,_0x2e353e){if(_0x3556e8){logger[_0xbaee('0x15')](_0x3556e8);}else{var _0x514f45=this;utils['parser'](this[_0xbaee('0xf')],_0x2e353e,function(_0x57edf4){_0x514f45[_0xbaee('0x28')](_0xbaee('0xd'),_0x57edf4);});}};EmailImap['prototype']['handleFetchEnd']=function(){this[_0xbaee('0x2')]['closeBox'](!![],this['handleCloseBox'][_0xbaee('0x13')](this));};EmailImap[_0xbaee('0x18')]['handleFetchError']=function(_0x339fc3){this['handleError'](_0x339fc3);this[_0xbaee('0x2')][_0xbaee('0x33')](!![],this['handleCloseBox'][_0xbaee('0x13')](this));};EmailImap['prototype'][_0xbaee('0x3a')]=function(){this[_0xbaee('0x28')](_0xbaee('0x14'));};EmailImap[_0xbaee('0x18')][_0xbaee('0x16')]=function(_0x4deeea,_0x1115ea){logger[_0xbaee('0x15')](_0xbaee('0x16'),this[_0xbaee('0xf')][_0xbaee('0xd')],JSON['stringify'](_0x4deeea));var _0x4abe51='';if(_0x4deeea){if(_0x4deeea[_0xbaee('0x3b')]){_0x4abe51=_0x4deeea[_0xbaee('0x3b')];}else{for(var _0x806a04 in _0x4deeea){if(_0x4deeea['hasOwnProperty'](_0x806a04)){_0x4abe51+=_[_0xbaee('0x3c')](_0x806a04)+':\x20'+_0x4deeea[_0x806a04]+'\x0a';}}}}if(_0x1115ea){this[_0xbaee('0x2')][_0xbaee('0x14')]();}else{this['emit']('error',_0x4abe51);this[_0xbaee('0x28')](_0xbaee('0x14'));}};module[_0xbaee('0x3d')]=EmailImap;
\ No newline at end of file
+var _0xeaa4=['required','getHost','anonymous@xcally.com','openBox','handleOpenBox','emit','box','readUnseen','handleCloseBox','search','UNSEEN','handleReadUnseen','length','fetch','message','handleFetchError','handleFetchEnd','handleFetchMessage','body','handleMessageBody','attributes','handleMessageEnd','handleSimpleParser','handleMessageAttributes','closeBox','handleEnd','stringify','textCode','hasOwnProperty','upperFirst','exports','path','util','imap','lodash','randomstring','mailparser','simpleParser','EventEmitter','./utils','../../../config/logger','email','mailbox','INBOX','account','handleReady','bind','once','end','error','handleError','inherits','prototype','getAccount','connTimeout','authTimeout','isNil','service','authentication','user','password','host','port','tls','autotls'];(function(_0x41f15f,_0x1a39ef){var _0x269a71=function(_0x52c50e){while(--_0x52c50e){_0x41f15f['push'](_0x41f15f['shift']());}};_0x269a71(++_0x1a39ef);}(_0xeaa4,0xa1));var _0x4eaa=function(_0x27489f,_0x1414df){_0x27489f=_0x27489f-0x0;var _0x1f7159=_0xeaa4[_0x27489f];return _0x1f7159;};'use strict';var fs=require('fs');var path=require(_0x4eaa('0x0'));var util=require(_0x4eaa('0x1'));var Imap=require(_0x4eaa('0x2'));var _=require(_0x4eaa('0x3'));var rs=require(_0x4eaa('0x4'));var simpleParser=require(_0x4eaa('0x5'))[_0x4eaa('0x6')];var Iconv=require('iconv')['Iconv'];var EventEmitter=require('events')[_0x4eaa('0x7')];var utils=require(_0x4eaa('0x8'));var logger=require(_0x4eaa('0x9'))(_0x4eaa('0xa'));function EmailImap(_0x1dc4b5,_0x4e87d1){this[_0x4eaa('0xb')]=_0x4eaa('0xc');this[_0x4eaa('0xd')]=this['getAccount'](_0x1dc4b5,_0x4e87d1);this[_0x4eaa('0x2')]=new Imap(this[_0x4eaa('0xd')]);this['imap']['once']('ready',this[_0x4eaa('0xe')][_0x4eaa('0xf')](this));this['imap'][_0x4eaa('0x10')](_0x4eaa('0x11'),this['handleEnd'][_0x4eaa('0xf')](this));this['imap']['on'](_0x4eaa('0x12'),this[_0x4eaa('0x13')][_0x4eaa('0xf')](this));this[_0x4eaa('0x2')]['connect']();}util[_0x4eaa('0x14')](EmailImap,EventEmitter);EmailImap[_0x4eaa('0x15')][_0x4eaa('0x16')]=function(_0x4d427b,_0xf7761){var _0x1be4dd={'connTimeout':_0x4d427b['connTimeout']?_0x4d427b[_0x4eaa('0x17')]*0x3e8:0x2710,'authTimeout':_0x4d427b[_0x4eaa('0x18')]?_0x4d427b[_0x4eaa('0x18')]*0x3e8:0x1388};if(_[_0x4eaa('0x19')](_0x4d427b[_0x4eaa('0x1a')])){if(_0x4d427b[_0x4eaa('0x1b')]){_0x1be4dd[_0x4eaa('0x1c')]=_0x4d427b[_0x4eaa('0x1c')];_0x1be4dd[_0x4eaa('0x1d')]=_0x4d427b['password'];}_0x1be4dd[_0x4eaa('0x1e')]=_0x4d427b['host'];_0x1be4dd[_0x4eaa('0x1f')]=_0x4d427b[_0x4eaa('0x1f')]||0x3e1;if(_0x4d427b[_0x4eaa('0x20')]){_0x1be4dd[_0x4eaa('0x20')]=!![];}else{_0x1be4dd[_0x4eaa('0x20')]=![];_0x1be4dd[_0x4eaa('0x21')]=_0x4eaa('0x22');}}else{_0x1be4dd[_0x4eaa('0x1c')]=_0x4d427b[_0x4eaa('0x1c')];_0x1be4dd[_0x4eaa('0x1d')]=_0x4d427b[_0x4eaa('0x1d')];_0x1be4dd[_0x4eaa('0x1e')]=utils[_0x4eaa('0x23')](_0x4d427b['service']);_0x1be4dd['port']=0x3e1;_0x1be4dd['tls']=!![];}_0x1be4dd[_0x4eaa('0xa')]=_0xf7761||_0x4d427b['user']||_0x4eaa('0x24');return _0x1be4dd;};EmailImap['prototype']['handleReady']=function(){this[_0x4eaa('0x2')][_0x4eaa('0x25')](this[_0x4eaa('0xb')],![],this[_0x4eaa('0x26')][_0x4eaa('0xf')](this));};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x26')]=function(_0x3aa6cc,_0x34cf83){if(_0x3aa6cc){this[_0x4eaa('0x13')](_0x3aa6cc,!![]);}else{this[_0x4eaa('0x27')](_0x4eaa('0x28'),_0x34cf83);this[_0x4eaa('0x29')]();}};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x2a')]=function(_0x5f5356){if(_0x5f5356){this['handleError'](_0x5f5356,!![]);}else{this[_0x4eaa('0x2')][_0x4eaa('0x11')]();}};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x29')]=function(){this[_0x4eaa('0x2')][_0x4eaa('0x2b')]([_0x4eaa('0x2c')],this['handleReadUnseen'][_0x4eaa('0xf')](this));};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x2d')]=function(_0x47d561,_0x580ca8){if(_0x47d561){this['handleError'](_0x47d561,!![]);}else{if(_0x580ca8[_0x4eaa('0x2e')]){try{var _0x18175a=this['imap'][_0x4eaa('0x2f')](_0x580ca8,{'bodies':'','markSeen':!![]});_0x18175a['on'](_0x4eaa('0x30'),this['handleFetchMessage']['bind'](this));_0x18175a[_0x4eaa('0x10')](_0x4eaa('0x12'),this[_0x4eaa('0x31')]['bind'](this));_0x18175a['once'](_0x4eaa('0x11'),this[_0x4eaa('0x32')][_0x4eaa('0xf')](this));}catch(_0x3ed970){logger[_0x4eaa('0x12')](_0x3ed970);}}else{this[_0x4eaa('0x2')]['closeBox'](!![],this[_0x4eaa('0x2a')][_0x4eaa('0xf')](this));}}};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x33')]=function(_0x40f36f,_0xeba08e){_0x40f36f['on'](_0x4eaa('0x34'),this[_0x4eaa('0x35')]['bind'](this));_0x40f36f['once'](_0x4eaa('0x36'),this['handleMessageAttributes'][_0x4eaa('0xf')](this));_0x40f36f['once'](_0x4eaa('0x11'),this[_0x4eaa('0x37')][_0x4eaa('0xf')](this));};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x35')]=function(_0x224c6e,_0x20b4e5){simpleParser(_0x224c6e,{'Iconv':Iconv},this[_0x4eaa('0x38')][_0x4eaa('0xf')](this));};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x39')]=function(_0x4bc12d){};EmailImap[_0x4eaa('0x15')]['handleMessageEnd']=function(){};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x38')]=function(_0x242acc,_0x85bcc1){if(_0x242acc){logger[_0x4eaa('0x12')](_0x242acc);}else{var _0x322d60=this;utils['parser'](this[_0x4eaa('0xd')],_0x85bcc1,function(_0x3acb67){_0x322d60[_0x4eaa('0x27')]('email',_0x3acb67);});}};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x32')]=function(){this[_0x4eaa('0x2')][_0x4eaa('0x3a')](!![],this['handleCloseBox'][_0x4eaa('0xf')](this));};EmailImap[_0x4eaa('0x15')]['handleFetchError']=function(_0x177bd0){this[_0x4eaa('0x13')](_0x177bd0);this[_0x4eaa('0x2')][_0x4eaa('0x3a')](!![],this[_0x4eaa('0x2a')][_0x4eaa('0xf')](this));};EmailImap[_0x4eaa('0x15')][_0x4eaa('0x3b')]=function(){this[_0x4eaa('0x27')](_0x4eaa('0x11'));};EmailImap['prototype']['handleError']=function(_0x531d96,_0x2236cd){logger[_0x4eaa('0x12')]('handleError',this[_0x4eaa('0xd')][_0x4eaa('0xa')],JSON[_0x4eaa('0x3c')](_0x531d96));var _0x368489='';if(_0x531d96){if(_0x531d96['textCode']){_0x368489=_0x531d96[_0x4eaa('0x3d')];}else{for(var _0x253e0d in _0x531d96){if(_0x531d96[_0x4eaa('0x3e')](_0x253e0d)){_0x368489+=_[_0x4eaa('0x3f')](_0x253e0d)+':\x20'+_0x531d96[_0x253e0d]+'\x0a';}}}}if(_0x2236cd){this[_0x4eaa('0x2')][_0x4eaa('0x11')]();}else{this[_0x4eaa('0x27')](_0x4eaa('0x12'),_0x368489);this['emit']('end');}};module[_0x4eaa('0x40')]=EmailImap;
\ No newline at end of file
diff --git a/server/services/email/lib/smtp.js b/server/services/email/lib/smtp.js
index e25a413..e3c078e 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 _0x82e9=['nodemailer-plugin-inline-base64','prototype','send','createTransport','use','compile','sendMail','verify','Not\x20verifired','nodemailer'];(function(_0x2a5099,_0x329e92){var _0x2802f1=function(_0x53f99b){while(--_0x53f99b){_0x2a5099['push'](_0x2a5099['shift']());}};_0x2802f1(++_0x329e92);}(_0x82e9,0x1c1));var _0x982e=function(_0x42f009,_0x5e27b1){_0x42f009=_0x42f009-0x0;var _0x22a1e0=_0x82e9[_0x42f009];return _0x22a1e0;};'use strict';var nodemailer=require(_0x982e('0x0'));var BPromise=require('bluebird');var inlineBase64=require(_0x982e('0x1'));function EmailSmtp(){}EmailSmtp[_0x982e('0x2')][_0x982e('0x3')]=function(_0x3ef9e8,_0x2e5874){return new BPromise(function(_0x1f7f15,_0x4b04ed){var _0xad3564=nodemailer[_0x982e('0x4')](_0x3ef9e8);_0xad3564[_0x982e('0x5')](_0x982e('0x6'),inlineBase64());_0xad3564[_0x982e('0x7')](_0x2e5874,function(_0x3ca8e5,_0x3005bf){if(_0x3ca8e5){_0x4b04ed(_0x3ca8e5['toString']());}else{_0x1f7f15(_0x3005bf);}});});};EmailSmtp[_0x982e('0x2')][_0x982e('0x8')]=function(_0xef06ae){return new BPromise(function(_0x2ae435,_0xb38b55){var _0x2d95c0=nodemailer['createTransport'](_0xef06ae);_0x2d95c0[_0x982e('0x8')](function(_0x343ae7,_0x1be0f0){if(_0x343ae7){_0xb38b55(_0x343ae7['toString']());}else{if(_0x1be0f0){_0x2ae435(_0x1be0f0);}else{_0xb38b55(_0x982e('0x9'));}}});});};module['exports']=EmailSmtp;
\ No newline at end of file
+var _0x29d4=['exports','nodemailer-plugin-inline-base64','prototype','use','compile','sendMail','toString','createTransport'];(function(_0x32f683,_0x15c1a0){var _0x36497a=function(_0x464f69){while(--_0x464f69){_0x32f683['push'](_0x32f683['shift']());}};_0x36497a(++_0x15c1a0);}(_0x29d4,0x89));var _0x429d=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x29d4[_0x6c993a];return _0x27f547;};'use strict';var nodemailer=require('nodemailer');var BPromise=require('bluebird');var inlineBase64=require(_0x429d('0x0'));function EmailSmtp(){}EmailSmtp[_0x429d('0x1')]['send']=function(_0x2ec7b5,_0x1d4174){return new BPromise(function(_0x29789b,_0x4cae45){var _0x3cbf5a=nodemailer['createTransport'](_0x2ec7b5);_0x3cbf5a[_0x429d('0x2')](_0x429d('0x3'),inlineBase64());_0x3cbf5a[_0x429d('0x4')](_0x1d4174,function(_0x1f43e2,_0x42cefc){if(_0x1f43e2){_0x4cae45(_0x1f43e2[_0x429d('0x5')]());}else{_0x29789b(_0x42cefc);}});});};EmailSmtp[_0x429d('0x1')]['verify']=function(_0x1e55bf){return new BPromise(function(_0x26ed39,_0x42e350){var _0x416b27=nodemailer[_0x429d('0x6')](_0x1e55bf);_0x416b27['verify'](function(_0x57968e,_0x563ef9){if(_0x57968e){_0x42e350(_0x57968e[_0x429d('0x5')]());}else{if(_0x563ef9){_0x26ed39(_0x563ef9);}else{_0x42e350('Not\x20verifired');}}});});};module[_0x429d('0x7')]=EmailSmtp;
\ No newline at end of file
diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js
index 38e3900..9af8bd4 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 _0xc14c=['slice','Anonymous','pop','html','test','replace','body','Empty\x20message ','Attachments','Title','Data','getHost','gmail','imap.gmail.com','imap.mail.yahoo.com','imap-mail.outlook.com','outlook.office365.com','lodash','moment','randomstring','path','util','node-tnef','../../../config/logger','email','../../../config/environment','head','address','anonymous','generate','@xcally.com','value','name','split','length'];(function(_0x53f3cc,_0x940ee){var _0x2a187e=function(_0x43697d){while(--_0x43697d){_0x53f3cc['push'](_0x53f3cc['shift']());}};_0x2a187e(++_0x940ee);}(_0xc14c,0xb4));var _0xcc14=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xc14c[_0x4565bf];return _0x5610ba;};'use strict';var _=require(_0xcc14('0x0'));var moment=require(_0xcc14('0x1'));var random=require(_0xcc14('0x2'));var fs=require('fs');var path=require(_0xcc14('0x3'));var util=require(_0xcc14('0x4'));var tnef=require(_0xcc14('0x5'));var logger=require(_0xcc14('0x6'))(_0xcc14('0x7'));var config=require(_0xcc14('0x8'));function getAddress(_0x337576){var _0x3a71f5=_[_0xcc14('0x9')](_0x337576['value']);return _0x3a71f5&&_0x3a71f5[_0xcc14('0xa')]?_0x3a71f5[_0xcc14('0xa')]:_0xcc14('0xb')+random[_0xcc14('0xc')](0x6)+_0xcc14('0xd');}function getFirstName(_0x205781){var _0x1bcde1=_[_0xcc14('0x9')](_0x205781[_0xcc14('0xe')]);if(_0x1bcde1&&_0x1bcde1[_0xcc14('0xf')]){var _0x1fca4e=_0x1bcde1[_0xcc14('0xf')][_0xcc14('0x10')](/\s+/);return _0x1fca4e[_0xcc14('0x11')]?_0x1fca4e[_0xcc14('0x12')](0x0,-0x1)['join']('\x20'):_0x1bcde1[_0xcc14('0xf')];}return _0xcc14('0x13');}function getLastName(_0x37d414){var _0x4f930c=_[_0xcc14('0x9')](_0x37d414[_0xcc14('0xe')]);if(_0x4f930c&&_0x4f930c[_0xcc14('0xf')]){var _0x3d9dd4=_0x4f930c['name'][_0xcc14('0x10')](/\s+/);return _0x3d9dd4[_0xcc14('0x11')]>0x1?_0x3d9dd4[_0xcc14('0x14')]():'';}return'';}function getMails(_0x498e8f,_0x151952){var _0x4b780a='';for(var _0x53cf87=0x0;_0x53cf87<_0x151952[_0xcc14('0xe')][_0xcc14('0x11')];_0x53cf87+=0x1){if(_0x151952[_0xcc14('0xe')][_0x53cf87]['address']!==_0x498e8f){if(!_['isEmpty'](_0x4b780a)){_0x4b780a+=',';}_0x4b780a+=_0x151952[_0xcc14('0xe')][_0x53cf87]['name']||_0x151952[_0xcc14('0xe')][_0x53cf87]['address']||'';_0x4b780a+='\x20<';_0x4b780a+=_0x151952[_0xcc14('0xe')][_0x53cf87][_0xcc14('0xa')]?_0x151952[_0xcc14('0xe')][_0x53cf87]['address']:_0xcc14('0xb')+random[_0xcc14('0xc')](0x6)+'@xcally.com';_0x4b780a+='>';}}return _0x4b780a;}function parseEmail(_0x3e06b0,_0x1c4b35,_0x5dec57){if(_0x1c4b35[_0xcc14('0x15')]){var _0x2246e7=/